diff --git a/.gitignore b/.gitignore index 6b94fb2e..c565d21f 100644 --- a/.gitignore +++ b/.gitignore @@ -2,12 +2,17 @@ bin obj *.user .vs -/WebRtc.NET/Release -/WebRtc.NET/Release_x64 -/WebRtc.NET/Debug +/WebRtcNative/include/webrtc/examples +/WebRtcNative/Debug +/WebRtcNative/Debug_x64 +/WebRtcNative/Release +/WebRtcNative/Release_x64 /WebRtc.NET.sdf /WebRtc.NET.VC.opendb -/WebRtc.NET/include/webrtc/examples /WebRtc.NET.VC.db /WebRtc.NET.VC.VC.opendb /ipch +/WebRtcNative/lib/x64/Release/libwebrtc_full.lib +/WebRtcNative/lib/x86/Release/libwebrtc_full.lib +/WebRtcNative/lib/x64/Debug/libwebrtc_full.lib +/WebRtcNative/lib/x86/Debug/libwebrtc_full.lib diff --git a/WebRtc.NET.Demo/App.config b/WebRtc.NET.Demo/App.config new file mode 100644 index 00000000..e5af615c --- /dev/null +++ b/WebRtc.NET.Demo/App.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/WebRtc.NET.Demo/MainForm.Designer.cs b/WebRtc.NET.Demo/MainForm.Designer.cs index 085d5352..f5b11ef7 100644 --- a/WebRtc.NET.Demo/MainForm.Designer.cs +++ b/WebRtc.NET.Demo/MainForm.Designer.cs @@ -34,7 +34,10 @@ private void InitializeComponent() this.tabPage3 = new System.Windows.Forms.TabPage(); this.pictureBoxLocal = new System.Windows.Forms.PictureBox(); this.groupBox1 = new System.Windows.Forms.GroupBox(); + this.checkBoxTest = new System.Windows.Forms.CheckBox(); this.groupBox5 = new System.Windows.Forms.GroupBox(); + this.checkBoxInternalScreen = new System.Windows.Forms.CheckBox(); + this.checkBoxScreen = new System.Windows.Forms.CheckBox(); this.comboBoxVideo = new System.Windows.Forms.ComboBox(); this.checkBoxVirtualCam = new System.Windows.Forms.CheckBox(); this.groupBox4 = new System.Windows.Forms.GroupBox(); @@ -45,7 +48,6 @@ private void InitializeComponent() this.numericMaxClients = new System.Windows.Forms.NumericUpDown(); this.checkBoxWebsocket = new System.Windows.Forms.CheckBox(); this.numericWebSocket = new System.Windows.Forms.NumericUpDown(); - this.checkBoxScreen = new System.Windows.Forms.CheckBox(); this.tabControl1.SuspendLayout(); this.tabPage2.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.pictureBoxRemote)).BeginInit(); @@ -69,7 +71,7 @@ private void InitializeComponent() this.tabControl1.Location = new System.Drawing.Point(12, 123); this.tabControl1.Name = "tabControl1"; this.tabControl1.SelectedIndex = 0; - this.tabControl1.Size = new System.Drawing.Size(543, 342); + this.tabControl1.Size = new System.Drawing.Size(626, 399); this.tabControl1.TabIndex = 7; // // tabPage2 @@ -78,7 +80,7 @@ private void InitializeComponent() this.tabPage2.Location = new System.Drawing.Point(4, 22); this.tabPage2.Name = "tabPage2"; this.tabPage2.Padding = new System.Windows.Forms.Padding(3); - this.tabPage2.Size = new System.Drawing.Size(535, 316); + this.tabPage2.Size = new System.Drawing.Size(618, 373); this.tabPage2.TabIndex = 1; this.tabPage2.Text = "RemoteVideo"; this.tabPage2.UseVisualStyleBackColor = true; @@ -89,7 +91,7 @@ private void InitializeComponent() this.pictureBoxRemote.Dock = System.Windows.Forms.DockStyle.Fill; this.pictureBoxRemote.Location = new System.Drawing.Point(3, 3); this.pictureBoxRemote.Name = "pictureBoxRemote"; - this.pictureBoxRemote.Size = new System.Drawing.Size(529, 310); + this.pictureBoxRemote.Size = new System.Drawing.Size(612, 367); this.pictureBoxRemote.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom; this.pictureBoxRemote.TabIndex = 2; this.pictureBoxRemote.TabStop = false; @@ -100,7 +102,7 @@ private void InitializeComponent() this.tabPage3.Location = new System.Drawing.Point(4, 22); this.tabPage3.Name = "tabPage3"; this.tabPage3.Padding = new System.Windows.Forms.Padding(3); - this.tabPage3.Size = new System.Drawing.Size(535, 316); + this.tabPage3.Size = new System.Drawing.Size(618, 373); this.tabPage3.TabIndex = 2; this.tabPage3.Text = "LocalVideo"; this.tabPage3.UseVisualStyleBackColor = true; @@ -111,7 +113,7 @@ private void InitializeComponent() this.pictureBoxLocal.Dock = System.Windows.Forms.DockStyle.Fill; this.pictureBoxLocal.Location = new System.Drawing.Point(3, 3); this.pictureBoxLocal.Name = "pictureBoxLocal"; - this.pictureBoxLocal.Size = new System.Drawing.Size(529, 310); + this.pictureBoxLocal.Size = new System.Drawing.Size(612, 367); this.pictureBoxLocal.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom; this.pictureBoxLocal.TabIndex = 3; this.pictureBoxLocal.TabStop = false; @@ -125,23 +127,58 @@ private void InitializeComponent() this.groupBox1.Controls.Add(this.groupBox3); this.groupBox1.Location = new System.Drawing.Point(12, 12); this.groupBox1.Name = "groupBox1"; - this.groupBox1.Size = new System.Drawing.Size(543, 105); + this.groupBox1.Size = new System.Drawing.Size(626, 105); this.groupBox1.TabIndex = 8; this.groupBox1.TabStop = false; this.groupBox1.Text = "Control"; // + // checkBoxTest + // + this.checkBoxTest.AutoSize = true; + this.checkBoxTest.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(186))); + this.checkBoxTest.Location = new System.Drawing.Point(232, 48); + this.checkBoxTest.Name = "checkBoxTest"; + this.checkBoxTest.Size = new System.Drawing.Size(43, 17); + this.checkBoxTest.TabIndex = 24; + this.checkBoxTest.Text = "test"; + this.checkBoxTest.UseVisualStyleBackColor = true; + // // groupBox5 // + this.groupBox5.Controls.Add(this.checkBoxTest); + this.groupBox5.Controls.Add(this.checkBoxInternalScreen); this.groupBox5.Controls.Add(this.checkBoxScreen); this.groupBox5.Controls.Add(this.comboBoxVideo); this.groupBox5.Controls.Add(this.checkBoxVirtualCam); this.groupBox5.Location = new System.Drawing.Point(172, 19); this.groupBox5.Name = "groupBox5"; - this.groupBox5.Size = new System.Drawing.Size(192, 74); + this.groupBox5.Size = new System.Drawing.Size(281, 74); this.groupBox5.TabIndex = 22; this.groupBox5.TabStop = false; this.groupBox5.Text = "Video capture"; // + // checkBoxInternalScreen + // + this.checkBoxInternalScreen.AutoSize = true; + this.checkBoxInternalScreen.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(186))); + this.checkBoxInternalScreen.Location = new System.Drawing.Point(162, 47); + this.checkBoxInternalScreen.Name = "checkBoxInternalScreen"; + this.checkBoxInternalScreen.Size = new System.Drawing.Size(60, 17); + this.checkBoxInternalScreen.TabIndex = 23; + this.checkBoxInternalScreen.Text = "internal"; + this.checkBoxInternalScreen.UseVisualStyleBackColor = true; + // + // checkBoxScreen + // + this.checkBoxScreen.AutoSize = true; + this.checkBoxScreen.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(186))); + this.checkBoxScreen.Location = new System.Drawing.Point(98, 46); + this.checkBoxScreen.Name = "checkBoxScreen"; + this.checkBoxScreen.Size = new System.Drawing.Size(58, 17); + this.checkBoxScreen.TabIndex = 22; + this.checkBoxScreen.Text = "screen"; + this.checkBoxScreen.UseVisualStyleBackColor = true; + // // comboBoxVideo // this.comboBoxVideo.Dock = System.Windows.Forms.DockStyle.Top; @@ -149,7 +186,7 @@ private void InitializeComponent() this.comboBoxVideo.FormattingEnabled = true; this.comboBoxVideo.Location = new System.Drawing.Point(3, 16); this.comboBoxVideo.Name = "comboBoxVideo"; - this.comboBoxVideo.Size = new System.Drawing.Size(186, 21); + this.comboBoxVideo.Size = new System.Drawing.Size(275, 21); this.comboBoxVideo.TabIndex = 21; this.comboBoxVideo.SelectedIndexChanged += new System.EventHandler(this.comboBoxVideo_SelectedIndexChanged); // @@ -171,7 +208,7 @@ private void InitializeComponent() // this.groupBox4.Controls.Add(this.textBoxExtIP); this.groupBox4.Controls.Add(this.checkBoxTurn); - this.groupBox4.Location = new System.Drawing.Point(370, 19); + this.groupBox4.Location = new System.Drawing.Point(459, 19); this.groupBox4.Name = "groupBox4"; this.groupBox4.Size = new System.Drawing.Size(160, 49); this.groupBox4.TabIndex = 20; @@ -266,22 +303,11 @@ private void InitializeComponent() 0, 0}); // - // checkBoxScreen - // - this.checkBoxScreen.AutoSize = true; - this.checkBoxScreen.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(186))); - this.checkBoxScreen.Location = new System.Drawing.Point(98, 46); - this.checkBoxScreen.Name = "checkBoxScreen"; - this.checkBoxScreen.Size = new System.Drawing.Size(58, 17); - this.checkBoxScreen.TabIndex = 22; - this.checkBoxScreen.Text = "screen"; - this.checkBoxScreen.UseVisualStyleBackColor = true; - // // MainForm // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size(567, 477); + this.ClientSize = new System.Drawing.Size(650, 534); this.Controls.Add(this.groupBox1); this.Controls.Add(this.tabControl1); this.Name = "MainForm"; @@ -324,5 +350,7 @@ private void InitializeComponent() internal System.Windows.Forms.ComboBox comboBoxVideo; internal System.Windows.Forms.CheckBox checkBoxVirtualCam; internal System.Windows.Forms.CheckBox checkBoxScreen; + internal System.Windows.Forms.CheckBox checkBoxInternalScreen; + internal System.Windows.Forms.CheckBox checkBoxTest; } } \ No newline at end of file diff --git a/WebRtc.NET.Demo/MainForm.cs b/WebRtc.NET.Demo/MainForm.cs index 4b5fc4cc..9b331d25 100644 --- a/WebRtc.NET.Demo/MainForm.cs +++ b/WebRtc.NET.Demo/MainForm.cs @@ -1,4 +1,5 @@ using System; +using System.Collections.Generic; using System.Diagnostics; using System.Drawing; using System.Drawing.Imaging; @@ -30,16 +31,10 @@ public MainForm() textBoxExtIP.Text = "192.168.0.100"; - comboBoxVideo.DataSource = ManagedConductor.GetVideoDevices(); } private void MainForm_FormClosing(object sender, FormClosingEventArgs e) { - if (encoderRemote != null) - { - encoderRemote.Dispose(); - } - if (webSocketServer != null) { webSocketServer.Dispose(); @@ -52,21 +47,24 @@ private void MainForm_Shown(object sender, EventArgs e) checkBoxWebsocket.Checked = true; } - readonly TurboJpegEncoder encoderRemote = TurboJpegEncoder.CreateEncoder(); + internal void ResetRemote() + { + pictureBoxRemote.Image = null; + if (remoteImg != null) + { + remoteImg.Dispose(); + remoteImg = null; + } + } - byte[] bgrBuffremote; Bitmap remoteImg; - public unsafe void OnRenderRemote(byte* yuv, uint w, uint h) + public void OnRenderRemote(IntPtr BGR24, uint w, uint h) { - lock (pictureBoxRemote) + if (remoteImg == null) { - if (0 == encoderRemote.EncodeI420toBGR24(yuv, w, h, ref bgrBuffremote, true)) + lock (pictureBoxRemote) { - if (remoteImg == null) - { - var bufHandle = GCHandle.Alloc(bgrBuffremote, GCHandleType.Pinned); - remoteImg = new Bitmap((int)w, (int)h, (int)w * 3, PixelFormat.Format24bppRgb, bufHandle.AddrOfPinnedObject()); - } + remoteImg = new Bitmap((int)w, (int)h, (int)w * 3, PixelFormat.Format24bppRgb, BGR24); } } @@ -96,20 +94,24 @@ public unsafe void OnRenderRemote(byte* yuv, uint w, uint h) } }); - readonly TurboJpegEncoder encoderLocal = TurboJpegEncoder.CreateEncoder(); - byte[] bgrBufflocal; + internal void ResetLocal() + { + pictureBoxLocal.Image = null; + if (localImg != null) + { + localImg.Dispose(); + localImg = null; + } + } + Bitmap localImg; - public unsafe void OnRenderLocal(byte* yuv, uint w, uint h) + public void OnRenderLocal(IntPtr BGR24, uint w, uint h) { - lock (pictureBoxLocal) + if (localImg == null) { - if (0 == encoderLocal.EncodeI420toBGR24(yuv, w, h, ref bgrBufflocal, true)) + lock (pictureBoxLocal) { - if (remoteImg == null) - { - var bufHandle = GCHandle.Alloc(bgrBufflocal, GCHandleType.Pinned); - localImg = new Bitmap((int)w, (int)h, (int)w * 3, PixelFormat.Format24bppRgb, bufHandle.AddrOfPinnedObject()); - } + localImg = new Bitmap((int)w, (int)h, (int)w * 3, PixelFormat.Format24bppRgb, BGR24); } } @@ -185,7 +187,6 @@ private void checkBoxWebsocket_CheckedChanged(object sender, EventArgs e) { webSocketServer = new WebRTCServer((int)numericWebSocket.Value); webSocketServer.Form = this; - unsafe { webSocketServer.OnRenderRemote = OnRenderRemote; webSocketServer.OnRenderLocal = OnRenderLocal; @@ -210,15 +211,15 @@ private void checkBoxWebsocket_CheckedChanged(object sender, EventArgs e) public const int screenWidth = 640; public const int screenHeight = 360; public const int captureFps = 5; - public const bool barCodeScreen = false; readonly byte[] imgBuf = new byte[screenWidth * 3 * screenHeight]; IntPtr imgBufPtr = IntPtr.Zero; Bitmap img; Graphics g; - public int desktopWidth; - public int desktopHeight; + int captureWidth; + int captureHeight; + readonly Dictionary imgCapture = new Dictionary(); private void timerVirtualCam_Tick(object sender, EventArgs e) { @@ -234,6 +235,7 @@ private void timerVirtualCam_Tick(object sender, EventArgs e) { // render + if (!checkBoxTest.Checked) { g.Clear(Color.DarkBlue); @@ -242,60 +244,36 @@ private void timerVirtualCam_Tick(object sender, EventArgs e) g.CopyFromScreen(Cursor.Position, new Point(), new Size(screenWidth, screenHeight)); } - if (checkBoxScreen.Checked) + if (checkBoxInternalScreen.Checked) { - #region -- TODO: native desktop capture -- - //foreach (var s in webSocketServer.Streams) - //{ - // s.Value.WebRtc.CaptureFrame(); - - // if (imgDesktop == null) - // { - // var bufHandle = GCHandle.Alloc(imgBufDesktop, GCHandleType.Pinned); - // varimgBufDesktopPtr = bufHandle.AddrOfPinnedObject(); - // img = new Bitmap(screenWidth, screenHeight, screenWidth * 3, PixelFormat.Format24bppRgb, imgBufPtr); - // g = Graphics.FromImage(img); - // } - // if (desktopWidth == 0) - // { - // s.Value.WebRtc.DesktopCapturerSize(ref desktopWidth, ref desktopHeight); - // } - // unsafe - // { - // var rgba = s.Value.WebRtc.DesktopCapturerRGBAbuffer(); - // if (rgba != null) - // { - // //encoderRemote.EncodeBGRAtoI420((byte*)imgBufPtr.ToPointer(), screenWidth, screenHeight, yuv, 0, true); - // } - // } - //} - #endregion - } + #region -- native webrtc desktop capture -- - var rc = RectangleF.FromLTRB(0, 0, img.Width, img.Height); - g.DrawString(string.Format("{0}", DateTime.Now.ToString("hh:mm:ss.fff")), fBig, Brushes.LimeGreen, rc, sfTopRight); - } + //set internals.h #define DESKTOP_CAPTURE 1 - foreach (var s in webSocketServer.Streams) - { - if (!barCodeScreen) - { - unsafe + foreach (var s in webSocketServer.Streams) { - var yuv = s.Value.WebRtc.VideoCapturerI420Buffer(); - if (yuv != null) + // if no editing is needed & size match + //s.Value.WebRtc.CaptureFrameAndPush(); + //return; + + //if (false) { - encoderRemote.EncodeBGR24toI420((byte*)imgBufPtr.ToPointer(), screenWidth, screenHeight, yuv, 0, true); + int x = -1, y = -1; } + break; } + + #endregion } - s.Value.WebRtc.PushFrame(); + + var rc = RectangleF.FromLTRB(0, 0, img.Width, img.Height); + g.DrawString(string.Format("{0}", DateTime.Now.ToString("hh:mm:ss.fff")), fBig, Brushes.LimeGreen, rc, sfTopRight); } } } catch (Exception ex) { - Debug.WriteLine("timerDemo_Tick: " + ex); + Trace.WriteLine("timerDemo_Tick: " + ex); } } @@ -319,7 +297,7 @@ private void checkBoxTurn_CheckedChanged(object sender, EventArgs e) Task.Factory.StartNew(delegate () { - using (var mc = new ManagedConductor()) + using (var mc = new WebRtcNative()) { var ok = mc.RunTurnServer("0.0.0.0:3478", textBoxExtIP.Text, "test", "auth.txt"); if (!ok) @@ -333,11 +311,11 @@ private void checkBoxTurn_CheckedChanged(object sender, EventArgs e) { using (turnCancel = new CancellationTokenSource()) { - var stop = turnCancel.Token; + var stop = turnCancel.Token; while (!stop.IsCancellationRequested && mc.ProcessMessages(1000)) { Debug.WriteLine("."); - } + } Task.Factory.StartNew(delegate () { diff --git a/WebRtc.NET.Demo/WebRTCServer.cs b/WebRtc.NET.Demo/WebRTCServer.cs index 21d9369a..4055a542 100644 --- a/WebRtc.NET.Demo/WebRTCServer.cs +++ b/WebRtc.NET.Demo/WebRTCServer.cs @@ -12,14 +12,14 @@ class WebRTCServer : IDisposable { public class WebRtcSession { - public readonly ManagedConductor WebRtc; + public readonly WebRtcNative WebRtc; public readonly CancellationTokenSource Cancel; public WebRtcSession() { - WebRtc = new ManagedConductor(); + WebRtc = new WebRtcNative(); Cancel = new CancellationTokenSource(); - } + } } public readonly ConcurrentDictionary UserList = new ConcurrentDictionary(); @@ -30,7 +30,7 @@ public WebRtcSession() public WebRTCServer(int port) : this("ws://0.0.0.0:" + port) { - + } public WebRTCServer(string URL) @@ -38,7 +38,7 @@ public WebRTCServer(string URL) server = new WebSocketServer(URL); server.Start(socket => { - socket.OnOpen = () => + socket.OnOpen = () => { try { @@ -101,7 +101,7 @@ private void OnConnected(IWebSocketConnection context) } } - private int clientLimit = 5; + private int clientLimit = 5; public int ClientLimit { get @@ -140,7 +140,7 @@ private void OnDisconnect(IWebSocketConnection context) { Debug.WriteLine($"OnDisconnect: {context.ConnectionInfo.Id}, {context.ConnectionInfo.ClientIpAddress}"); { - IWebSocketConnection ctx; + IWebSocketConnection ctx; UserList.TryRemove(context.ConnectionInfo.Id, out ctx); WebRtcSession s; @@ -158,14 +158,14 @@ private void OnReceive(IWebSocketConnection context, string msg) { Debug.WriteLine($"OnReceive {context.ConnectionInfo.Id}: {msg}"); - if (!msg.Contains("command")) return; + if (!msg.Contains("command")) return; if(UserList.ContainsKey(context.ConnectionInfo.Id)) { JsonData msgJson = JsonMapper.ToObject(msg); string command = msgJson["command"].ToString(); - switch (command) + switch (command) { case offer: { @@ -177,32 +177,36 @@ private void OnReceive(IWebSocketConnection context, string msg) { var t = Task.Factory.StartNew(() => { - ManagedConductor.InitializeSSL(); + WebRtcNative.InitializeSSL(); using (session.WebRtc) { session.WebRtc.AddServerConfig("stun:stun.l.google.com:19302", string.Empty, string.Empty); session.WebRtc.AddServerConfig("stun:stun.anyfirewall.com:3478", string.Empty, string.Empty); session.WebRtc.AddServerConfig("stun:stun.stunprotocol.org:3478", string.Empty, string.Empty); + session.WebRtc.OnSuccessOffer += WebRtc_OnSuccessOffer; //session.WebRtc.AddServerConfig("turn:192.168.0.100:3478", "test", "test"); - session.WebRtc.SetAudio(MainForm.audio); - - if (!Form.checkBoxVirtualCam.Checked) - { - if (!string.IsNullOrEmpty(Form.videoDevice)) - { - var vok = session.WebRtc.OpenVideoCaptureDevice(Form.videoDevice); - Trace.WriteLine($"OpenVideoCaptureDevice: {vok}, {Form.videoDevice}"); - } - } - else - { - session.WebRtc.SetVideoCapturer(MainForm.screenWidth, - MainForm.screenHeight, - MainForm.captureFps, - MainForm.barCodeScreen); - } + //session.WebRtc.SetAudio(MainForm.audio); + + //if (!Form.checkBoxVirtualCam.Checked) + //{ + // if (!string.IsNullOrEmpty(Form.videoDevice)) + // { + // var vok = session.WebRtc.OpenVideoCaptureDevice(Form.videoDevice); + // Trace.WriteLine($"OpenVideoCaptureDevice: {vok}, {Form.videoDevice}"); + // if (!vok) + // { + // return; + // } + // } + //} + //else + //{ + // session.WebRtc.SetVideoCapturer(MainForm.screenWidth, + // MainForm.screenHeight, + // MainForm.captureFps); + //} var ok = session.WebRtc.InitializePeerConnection(); if (ok) @@ -210,7 +214,8 @@ private void OnReceive(IWebSocketConnection context, string msg) go.Set(); // javascript side makes the offer in this demo - //session.WebRtc.CreateDataChannel("msgDataChannel"); + session.WebRtc.CreateDataChannel("msgDataChannel"); + session.WebRtc.CreateOffer(); while (!session.Cancel.Token.IsCancellationRequested && session.WebRtc.ProcessMessages(1000)) @@ -221,11 +226,11 @@ private void OnReceive(IWebSocketConnection context, string msg) } else { - Debug.WriteLine("InitializePeerConnection failed"); + Trace.WriteLine("InitializePeerConnection failed"); context.Close(); } } - + }, session.Cancel.Token, TaskCreationOptions.LongRunning, TaskScheduler.Default); if (go.WaitOne(9999)) @@ -259,9 +264,9 @@ private void OnReceive(IWebSocketConnection context, string msg) Trace.WriteLine($"OnFailure: {error}"); }; - session.WebRtc.OnError += delegate + session.WebRtc.OnError += delegate(string error) { - Trace.WriteLine("OnError"); + Trace.WriteLine($"OnError: {error}"); }; session.WebRtc.OnDataMessage += delegate(string dmsg) @@ -274,23 +279,22 @@ private void OnReceive(IWebSocketConnection context, string msg) Trace.WriteLine($"OnDataBinaryMessage: {dmsg.Length}"); }; - unsafe + Form.ResetRemote(); + session.WebRtc.OnRenderRemote += delegate (IntPtr BGR24, uint w, uint h) { - session.WebRtc.OnRenderRemote += delegate (byte* frame_buffer, uint w, uint h) - { - OnRenderRemote(frame_buffer, w, h); - }; + OnRenderRemote(BGR24, w, h); + }; - session.WebRtc.OnRenderLocal += delegate (byte* frame_buffer, uint w, uint h) - { - OnRenderLocal(frame_buffer, w, h); - }; - } + Form.ResetLocal(); + session.WebRtc.OnRenderLocal += delegate (IntPtr BGR24, uint w, uint h) + { + OnRenderLocal(BGR24, w, h); + }; var d = msgJson["desc"]; var s = d["sdp"].ToString(); - session.WebRtc.OnOfferRequest(s); + //session.WebRtc.OnOfferRequest(s); } } } @@ -316,8 +320,13 @@ private void OnReceive(IWebSocketConnection context, string msg) } } - public ManagedConductor.OnCallbackRender OnRenderRemote; - public ManagedConductor.OnCallbackRender OnRenderLocal; + private void WebRtc_OnSuccessOffer(string sdp) + { + int x = 0; + } + + public WebRtcNative.OnCallbackRender OnRenderRemote; + public WebRtcNative.OnCallbackRender OnRenderLocal; public void Dispose() { @@ -332,13 +341,13 @@ public void Dispose() } foreach (IWebSocketConnection i in UserList.Values) - { + { i.Close(); } server.Dispose(); UserList.Clear(); - Streams.Clear(); + Streams.Clear(); } catch { } } diff --git a/WebRtc.NET.Demo/WebRtc.NET.Demo.csproj b/WebRtc.NET.Demo/WebRtc.NET.Demo.csproj index 314eeebe..f07ddcd2 100644 --- a/WebRtc.NET.Demo/WebRtc.NET.Demo.csproj +++ b/WebRtc.NET.Demo/WebRtc.NET.Demo.csproj @@ -5,7 +5,7 @@ Debug AnyCPU {EBD5BC94-F7B0-418F-86AB-0827D7559D8E} - WinExe + Exe Properties WebRtc.NET.Demo WebRtc.NET.Demo @@ -56,9 +56,9 @@ MinimumRecommendedRules.ruleset - - ..\packages\Fleck.0.13.0.52\lib\net40\Fleck.dll - True + + False + ..\packages\Fleck.dll ..\packages\LitJson.0.7.0\lib\LitJson.dll @@ -101,16 +101,6 @@ MainForm.cs - - - {01062c91-04f7-486f-bc09-9c5b3ee468ab} - WebRtc.NET.Utils - - - {a07e6cb4-0132-4eb1-9a38-c8c057884dc2} - WebRtc.NET - - @@ -119,6 +109,12 @@ Always + + + {01062c91-04f7-486f-bc09-9c5b3ee468ab} + WebRtc.NET + + - \ No newline at end of file diff --git a/WebRtc.NET.sln b/WebRtc.NET.sln index 9e6781a1..8b001a2b 100644 --- a/WebRtc.NET.sln +++ b/WebRtc.NET.sln @@ -1,12 +1,8 @@  Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 14 -VisualStudioVersion = 14.0.25420.1 +# Visual Studio 15 +VisualStudioVersion = 15.0.26228.9 MinimumVisualStudioVersion = 10.0.40219.1 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "WebRtc.NET", "WebRtc.NET\WebRtc.NET.vcxproj", "{A07E6CB4-0132-4EB1-9A38-C8C057884DC2}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WebRtc.NET.Utils", "WebRtc.NET.Utils\WebRtc.NET.Utils.csproj", "{01062C91-04F7-486F-BC09-9C5B3EE468AB}" -EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "web", "web", "{E28DDFF2-84C7-4D8A-80E4-01EE800BB323}" ProjectSection(SolutionItems) = preProject web\adapter.js = web\adapter.js @@ -15,12 +11,22 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "web", "web", "{E28DDFF2-84C EndProjectSection EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WebRtc.NET.Demo", "WebRtc.NET.Demo\WebRtc.NET.Demo.csproj", "{EBD5BC94-F7B0-418F-86AB-0827D7559D8E}" + ProjectSection(ProjectDependencies) = postProject + {01062C91-04F7-486F-BC09-9C5B3EE468AB} = {01062C91-04F7-486F-BC09-9C5B3EE468AB} + EndProjectSection EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{20E5EFEB-A51D-4A9F-99A4-618745B59043}" ProjectSection(SolutionItems) = preProject README.md = README.md EndProjectSection EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "WebRtcNative", "WebRtcNative\WebRtcNative.vcxproj", "{A07E6CB4-0132-4EB1-9A38-C8C057884DC2}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WebRtc.NET", "WebRtc.NET\WebRtc.NET.csproj", "{01062C91-04F7-486F-BC09-9C5B3EE468AB}" + ProjectSection(ProjectDependencies) = postProject + {A07E6CB4-0132-4EB1-9A38-C8C057884DC2} = {A07E6CB4-0132-4EB1-9A38-C8C057884DC2} + EndProjectSection +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|x64 = Debug|x64 @@ -29,22 +35,6 @@ Global Release|x86 = Release|x86 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution - {A07E6CB4-0132-4EB1-9A38-C8C057884DC2}.Debug|x64.ActiveCfg = Debug|x64 - {A07E6CB4-0132-4EB1-9A38-C8C057884DC2}.Debug|x64.Build.0 = Debug|x64 - {A07E6CB4-0132-4EB1-9A38-C8C057884DC2}.Debug|x86.ActiveCfg = Debug|Win32 - {A07E6CB4-0132-4EB1-9A38-C8C057884DC2}.Debug|x86.Build.0 = Debug|Win32 - {A07E6CB4-0132-4EB1-9A38-C8C057884DC2}.Release|x64.ActiveCfg = Release|x64 - {A07E6CB4-0132-4EB1-9A38-C8C057884DC2}.Release|x64.Build.0 = Release|x64 - {A07E6CB4-0132-4EB1-9A38-C8C057884DC2}.Release|x86.ActiveCfg = Release|Win32 - {A07E6CB4-0132-4EB1-9A38-C8C057884DC2}.Release|x86.Build.0 = Release|Win32 - {01062C91-04F7-486F-BC09-9C5B3EE468AB}.Debug|x64.ActiveCfg = Debug|Any CPU - {01062C91-04F7-486F-BC09-9C5B3EE468AB}.Debug|x64.Build.0 = Debug|Any CPU - {01062C91-04F7-486F-BC09-9C5B3EE468AB}.Debug|x86.ActiveCfg = Debug|Any CPU - {01062C91-04F7-486F-BC09-9C5B3EE468AB}.Debug|x86.Build.0 = Debug|Any CPU - {01062C91-04F7-486F-BC09-9C5B3EE468AB}.Release|x64.ActiveCfg = Release|Any CPU - {01062C91-04F7-486F-BC09-9C5B3EE468AB}.Release|x64.Build.0 = Release|Any CPU - {01062C91-04F7-486F-BC09-9C5B3EE468AB}.Release|x86.ActiveCfg = Release|Any CPU - {01062C91-04F7-486F-BC09-9C5B3EE468AB}.Release|x86.Build.0 = Release|Any CPU {EBD5BC94-F7B0-418F-86AB-0827D7559D8E}.Debug|x64.ActiveCfg = Debug|x64 {EBD5BC94-F7B0-418F-86AB-0827D7559D8E}.Debug|x64.Build.0 = Debug|x64 {EBD5BC94-F7B0-418F-86AB-0827D7559D8E}.Debug|x86.ActiveCfg = Debug|x86 @@ -53,6 +43,22 @@ Global {EBD5BC94-F7B0-418F-86AB-0827D7559D8E}.Release|x64.Build.0 = Release|x64 {EBD5BC94-F7B0-418F-86AB-0827D7559D8E}.Release|x86.ActiveCfg = Release|x86 {EBD5BC94-F7B0-418F-86AB-0827D7559D8E}.Release|x86.Build.0 = Release|x86 + {A07E6CB4-0132-4EB1-9A38-C8C057884DC2}.Debug|x64.ActiveCfg = Debug|x64 + {A07E6CB4-0132-4EB1-9A38-C8C057884DC2}.Debug|x64.Build.0 = Debug|x64 + {A07E6CB4-0132-4EB1-9A38-C8C057884DC2}.Debug|x86.ActiveCfg = Debug|Win32 + {A07E6CB4-0132-4EB1-9A38-C8C057884DC2}.Debug|x86.Build.0 = Debug|Win32 + {A07E6CB4-0132-4EB1-9A38-C8C057884DC2}.Release|x64.ActiveCfg = Release|x64 + {A07E6CB4-0132-4EB1-9A38-C8C057884DC2}.Release|x64.Build.0 = Release|x64 + {A07E6CB4-0132-4EB1-9A38-C8C057884DC2}.Release|x86.ActiveCfg = Release|Win32 + {A07E6CB4-0132-4EB1-9A38-C8C057884DC2}.Release|x86.Build.0 = Release|Win32 + {01062C91-04F7-486F-BC09-9C5B3EE468AB}.Debug|x64.ActiveCfg = Debug|x64 + {01062C91-04F7-486F-BC09-9C5B3EE468AB}.Debug|x64.Build.0 = Debug|x64 + {01062C91-04F7-486F-BC09-9C5B3EE468AB}.Debug|x86.ActiveCfg = Debug|x86 + {01062C91-04F7-486F-BC09-9C5B3EE468AB}.Debug|x86.Build.0 = Debug|x86 + {01062C91-04F7-486F-BC09-9C5B3EE468AB}.Release|x64.ActiveCfg = Release|x64 + {01062C91-04F7-486F-BC09-9C5B3EE468AB}.Release|x64.Build.0 = Release|x64 + {01062C91-04F7-486F-BC09-9C5B3EE468AB}.Release|x86.ActiveCfg = Release|x86 + {01062C91-04F7-486F-BC09-9C5B3EE468AB}.Release|x86.Build.0 = Release|x86 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/WebRtc.NET/Properties/AssemblyInfo.cs b/WebRtc.NET/Properties/AssemblyInfo.cs new file mode 100644 index 00000000..8391ab60 --- /dev/null +++ b/WebRtc.NET/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +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("WebRtc.NET")] +[assembly: AssemblyDescription("WebRTC for C# & C++/CLI")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("2017.05.02-beta")] +[assembly: AssemblyCopyright("FLAT EARTH")] +[assembly: AssemblyTrademark("email@radioman.lt")] +[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(true)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("4dd9ce30-eb76-419a-b8ba-631e49f994c3")] + +// 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 Build and Revision Numbers +// by using the '*' as shown below: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("2.0.0.0")] +[assembly: AssemblyFileVersion("2.0.0.0")] diff --git a/WebRtc.NET/Release/WebRtc.NET.dll b/WebRtc.NET/Release/WebRtc.NET.dll deleted file mode 100644 index 05e72e59..00000000 Binary files a/WebRtc.NET/Release/WebRtc.NET.dll and /dev/null differ diff --git a/WebRtc.NET/Release/concrt140.dll b/WebRtc.NET/Release/concrt140.dll deleted file mode 100644 index 4f9ed11a..00000000 Binary files a/WebRtc.NET/Release/concrt140.dll and /dev/null differ diff --git a/WebRtc.NET/Release/msvcp140.dll b/WebRtc.NET/Release/msvcp140.dll deleted file mode 100644 index 8501b34b..00000000 Binary files a/WebRtc.NET/Release/msvcp140.dll and /dev/null differ diff --git a/WebRtc.NET/Release/ucrtbase.dll b/WebRtc.NET/Release/ucrtbase.dll deleted file mode 100644 index ba8bbfed..00000000 Binary files a/WebRtc.NET/Release/ucrtbase.dll and /dev/null differ diff --git a/WebRtc.NET/Release/vccorlib140.dll b/WebRtc.NET/Release/vccorlib140.dll deleted file mode 100644 index 48f5789c..00000000 Binary files a/WebRtc.NET/Release/vccorlib140.dll and /dev/null differ diff --git a/WebRtc.NET/Release/vcruntime140.dll b/WebRtc.NET/Release/vcruntime140.dll deleted file mode 100644 index 21c18f7e..00000000 Binary files a/WebRtc.NET/Release/vcruntime140.dll and /dev/null differ diff --git a/WebRtc.NET/Release_x64/WebRtc.NET.dll b/WebRtc.NET/Release_x64/WebRtc.NET.dll deleted file mode 100644 index 31d7dfb1..00000000 Binary files a/WebRtc.NET/Release_x64/WebRtc.NET.dll and /dev/null differ diff --git a/WebRtc.NET/Release_x64/concrt140.dll b/WebRtc.NET/Release_x64/concrt140.dll deleted file mode 100644 index 915a13a3..00000000 Binary files a/WebRtc.NET/Release_x64/concrt140.dll and /dev/null differ diff --git a/WebRtc.NET/Release_x64/msvcp140.dll b/WebRtc.NET/Release_x64/msvcp140.dll deleted file mode 100644 index 4a5ca4f4..00000000 Binary files a/WebRtc.NET/Release_x64/msvcp140.dll and /dev/null differ diff --git a/WebRtc.NET/Release_x64/ucrtbase.dll b/WebRtc.NET/Release_x64/ucrtbase.dll deleted file mode 100644 index 56319526..00000000 Binary files a/WebRtc.NET/Release_x64/ucrtbase.dll and /dev/null differ diff --git a/WebRtc.NET/Release_x64/vccorlib140.dll b/WebRtc.NET/Release_x64/vccorlib140.dll deleted file mode 100644 index d3cc8e00..00000000 Binary files a/WebRtc.NET/Release_x64/vccorlib140.dll and /dev/null differ diff --git a/WebRtc.NET/Release_x64/vcruntime140.dll b/WebRtc.NET/Release_x64/vcruntime140.dll deleted file mode 100644 index 52fe06bd..00000000 Binary files a/WebRtc.NET/Release_x64/vcruntime140.dll and /dev/null differ diff --git a/WebRtc.NET.Utils/Util.cs b/WebRtc.NET/Util.cs similarity index 82% rename from WebRtc.NET.Utils/Util.cs rename to WebRtc.NET/Util.cs index 5e47e0af..f242a6f7 100644 --- a/WebRtc.NET.Utils/Util.cs +++ b/WebRtc.NET/Util.cs @@ -1,16 +1,8 @@ using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Windows.Forms; using System.Diagnostics; -using System.Threading; -using System.Drawing; -using System.Drawing.Imaging; -using System.Runtime.InteropServices; using System.IO; -namespace WebRtc.NET.Utils +namespace WebRtc.NET { public class Util { @@ -21,7 +13,7 @@ public class Util static UInt64 i = 0; - public unsafe static void OnFillBuffer(byte * pData, long lDataLen, int part_idx, bool keyFrame) + public unsafe static void OnFillBuffer(byte* pData, long lDataLen, int part_idx, bool keyFrame) { Trace.WriteLine($"{i++}: Encode[{keyFrame}|{part_idx}]: {lDataLen}"); @@ -35,14 +27,14 @@ public unsafe static void OnFillBuffer(byte * pData, long lDataLen, int part_idx using (UnmanagedMemoryStream ms = new UnmanagedMemoryStream(pData, lDataLen)) { - ms.CopyTo(f); + //ms.CopyTo(f); } } } //if (m_Bitmap == null) //{ - // m_Bitmap = new Bitmap(@"D:\Dev\comDemo\Filters\logo.bmp"); + // m_Bitmap = new Bitmap(@"D:\Dev\comDemo\Filters\RTC_LOGo.bmp"); // Rectangle bounds = new Rectangle(0, 0, m_Bitmap.Width, m_Bitmap.Height); // var m_BitmapData = m_Bitmap.LockBits(bounds, ImageLockMode.ReadWrite, PixelFormat.Format24bppRgb); diff --git a/WebRtc.NET/WebRtc.NET.csproj b/WebRtc.NET/WebRtc.NET.csproj new file mode 100644 index 00000000..859f9776 --- /dev/null +++ b/WebRtc.NET/WebRtc.NET.csproj @@ -0,0 +1,118 @@ + + + + Debug + AnyCPU + 8.0.30703 + 2.0 + {01062C91-04F7-486F-BC09-9C5B3EE468AB} + Library + Properties + WebRtc.NET + WebRtc.NET + v2.0 + 512 + + + + true + bin\x86\Debug\ + DEBUG;TRACE + true + full + AnyCPU + prompt + MinimumRecommendedRules.ruleset + + + bin\x86\Release\ + TRACE + true + true + pdbonly + AnyCPU + prompt + MinimumRecommendedRules.ruleset + + + true + bin\x64\Debug\ + DEBUG;TRACE + true + full + AnyCPU + prompt + MinimumRecommendedRules.ruleset + + + bin\x64\Release\ + TRACE;WIN64 + true + true + pdbonly + AnyCPU + prompt + MinimumRecommendedRules.ruleset + + + true + bin\Debug\ + DEBUG;TRACE + true + full + AnyCPU + prompt + MinimumRecommendedRules.ruleset + + + bin\Release\ + TRACE;WIN64 + true + true + pdbonly + AnyCPU + prompt + MinimumRecommendedRules.ruleset + + + + + + + + + + + + + + + + x64\WebRtcNative-x64.dll + + + x64\WebRtcNative-x64.pdb + + + + + + x86\WebRtcNative-x86.dll + + + x86\WebRtcNative-x86.pdb + + + + + + + + + \ No newline at end of file diff --git a/WebRtc.NET/WebRtc.NET.vcxproj b/WebRtc.NET/WebRtc.NET.vcxproj deleted file mode 100644 index 9cd4884d..00000000 --- a/WebRtc.NET/WebRtc.NET.vcxproj +++ /dev/null @@ -1,270 +0,0 @@ - - - - - Debug - Win32 - - - Release - Win32 - - - Debug - x64 - - - Release - x64 - - - - {A07E6CB4-0132-4EB1-9A38-C8C057884DC2} - Win32Proj - WebRtcLibDemo - 8.1 - WebRtc.NET - - - - DynamicLibrary - true - v140 - Unicode - - - DynamicLibrary - false - v140 - true - Unicode - - - DynamicLibrary - true - v140 - Unicode - - - DynamicLibrary - false - v140 - true - Unicode - - - - - - - - - - - - - - - - - - - - - true - $(Configuration)\ - $(Configuration)\obj\ - - - true - $(Configuration)_$(Platform)\ - $(Configuration)_$(Platform)\obj\ - .dll - - - false - $(Configuration)\ - $(Configuration)\obj\ - - - false - $(Configuration)_$(Platform)\ - $(Configuration)_$(Platform)\obj\ - - - - Use - Level3 - Disabled - DEBUG;_DEBUG;WIN32;_CRT_SECURE_NO_WARNINGS;UNICODE;V8_DEPRECATION_WARNINGS;_WINDOWS;NOMINMAX;PSAPI_VERSION=1;_CRT_RAND_S;CERT_CHAIN_PARA_HAS_EXTRA_FIELDS;WIN32_LEAN_AND_MEAN;_ATL_NO_OPENGL;_SECURE_ATL;_HAS_EXCEPTIONS=0;_WINSOCK_DEPRECATED_NO_WARNINGS;CHROMIUM_BUILD;CR_CLANG_REVISION=274369-1;COMPONENT_BUILD;USE_AURA=1;USE_DEFAULT_RENDER_THEME=1;USE_LIBJPEG_TURBO=1;ENABLE_WEBRTC=1;ENABLE_MEDIA_ROUTER=1;ENABLE_PEPPER_CDMS;ENABLE_NOTIFICATIONS;FIELDTRIAL_TESTING_ENABLED;NO_TCMALLOC;__STD_C;_CRT_SECURE_NO_DEPRECATE;_SCL_SECURE_NO_DEPRECATE;NTDDI_VERSION=0x0A000000;_USING_V110_SDK71_;ENABLE_TASK_MANAGER=1;ENABLE_EXTENSIONS=1;ENABLE_PDF=1;ENABLE_PLUGIN_INSTALLATION=1;ENABLE_PLUGINS=1;ENABLE_SESSION_SERVICE=1;ENABLE_THEMES=1;ENABLE_PRINTING=1;ENABLE_BASIC_PRINTING=1;ENABLE_PRINT_PREVIEW=1;ENABLE_SPELLCHECK=1;ENABLE_CAPTIVE_PORTAL_DETECTION=1;ENABLE_SUPERVISED_USERS=1;ENABLE_MDNS=1;ENABLE_SERVICE_DISCOVERY=1;V8_USE_EXTERNAL_STARTUP_DATA;FULL_SAFE_BROWSING;SAFE_BROWSING_CSD;SAFE_BROWSING_DB_LOCAL;WEBRTC_WIN;USE_LIBPCI=1;_CRT_NONSTDC_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;DYNAMIC_ANNOTATIONS_ENABLED=1;WTF_USE_DYNAMIC_ANNOTATIONS=1 - true - include\third_party\libyuv\include;include\third_party\libvpx\source\libvpx;src;.\;include;%(AdditionalIncludeDirectories) - ProgramDatabase - false - Default - - - NotSet - true - libd;%(AdditionalLibraryDirectories) - LIBCPMTD.LIB - - - corflags /32bit+ $(OutDir)$(TargetName)$(TargetExt) - - - - - Use - Level3 - Disabled - _DEBUG;_WINDOWSNDEBUG;WIN64;_CRT_SECURE_NO_WARNINGS;UNICODE;V8_DEPRECATION_WARNINGS;_WINDOWS;NOMINMAX;PSAPI_VERSION=1;_CRT_RAND_S;CERT_CHAIN_PARA_HAS_EXTRA_FIELDS;WIN32_LEAN_AND_MEAN;_ATL_NO_OPENGL;_SECURE_ATL;_HAS_EXCEPTIONS=0;_WINSOCK_DEPRECATED_NO_WARNINGS;CHROMIUM_BUILD;CR_CLANG_REVISION=274369-1;COMPONENT_BUILD;USE_AURA=1;USE_DEFAULT_RENDER_THEME=1;USE_LIBJPEG_TURBO=1;ENABLE_WEBRTC=1;ENABLE_MEDIA_ROUTER=1;ENABLE_PEPPER_CDMS;ENABLE_NOTIFICATIONS;FIELDTRIAL_TESTING_ENABLED;NO_TCMALLOC;__STD_C;_CRT_SECURE_NO_DEPRECATE;_SCL_SECURE_NO_DEPRECATE;NTDDI_VERSION=0x0A000000;_USING_V110_SDK71_;ENABLE_TASK_MANAGER=1;ENABLE_EXTENSIONS=1;ENABLE_PDF=1;ENABLE_PLUGIN_INSTALLATION=1;ENABLE_PLUGINS=1;ENABLE_SESSION_SERVICE=1;ENABLE_THEMES=1;ENABLE_PRINTING=1;ENABLE_BASIC_PRINTING=1;ENABLE_PRINT_PREVIEW=1;ENABLE_SPELLCHECK=1;ENABLE_CAPTIVE_PORTAL_DETECTION=1;ENABLE_SUPERVISED_USERS=1;ENABLE_MDNS=1;ENABLE_SERVICE_DISCOVERY=1;V8_USE_EXTERNAL_STARTUP_DATA;FULL_SAFE_BROWSING;SAFE_BROWSING_CSD;SAFE_BROWSING_DB_LOCAL;WEBRTC_WIN;USE_LIBPCI=1;_CRT_NONSTDC_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;DYNAMIC_ANNOTATIONS_ENABLED=1;WTF_USE_DYNAMIC_ANNOTATIONS=1;%(PreprocessorDefinitions) - true - include\third_party\libyuv\include;include\third_party\libvpx\source\libvpx;src;.\;include;%(AdditionalIncludeDirectories) - ProgramDatabase - false - Default - - - Windows - true - LIBCPMTD.LIB - libd_x64 - - - - - Level3 - Use - MaxSpeed - true - true - NDEBUG;WIN32;_CRT_SECURE_NO_WARNINGS;UNICODE;V8_DEPRECATION_WARNINGS;_WINDOWS;NOMINMAX;PSAPI_VERSION=1;_CRT_RAND_S;CERT_CHAIN_PARA_HAS_EXTRA_FIELDS;WIN32_LEAN_AND_MEAN;_ATL_NO_OPENGL;_SECURE_ATL;_HAS_EXCEPTIONS=0;_WINSOCK_DEPRECATED_NO_WARNINGS;CHROMIUM_BUILD;CR_CLANG_REVISION=274369-1;COMPONENT_BUILD;USE_AURA=1;USE_DEFAULT_RENDER_THEME=1;USE_LIBJPEG_TURBO=1;ENABLE_WEBRTC=1;ENABLE_MEDIA_ROUTER=1;ENABLE_PEPPER_CDMS;ENABLE_NOTIFICATIONS;FIELDTRIAL_TESTING_ENABLED;NO_TCMALLOC;__STD_C;_CRT_SECURE_NO_DEPRECATE;_SCL_SECURE_NO_DEPRECATE;NTDDI_VERSION=0x0A000000;_USING_V110_SDK71_;ENABLE_TASK_MANAGER=1;ENABLE_EXTENSIONS=1;ENABLE_PDF=1;ENABLE_PLUGIN_INSTALLATION=1;ENABLE_PLUGINS=1;ENABLE_SESSION_SERVICE=1;ENABLE_THEMES=1;ENABLE_PRINTING=1;ENABLE_BASIC_PRINTING=1;ENABLE_PRINT_PREVIEW=1;ENABLE_SPELLCHECK=1;ENABLE_CAPTIVE_PORTAL_DETECTION=1;ENABLE_SUPERVISED_USERS=1;ENABLE_MDNS=1;ENABLE_SERVICE_DISCOVERY=1;V8_USE_EXTERNAL_STARTUP_DATA;FULL_SAFE_BROWSING;SAFE_BROWSING_CSD;SAFE_BROWSING_DB_LOCAL;WEBRTC_WIN;USE_LIBPCI=1;_CRT_NONSTDC_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;DYNAMIC_ANNOTATIONS_ENABLED=1;WTF_USE_DYNAMIC_ANNOTATIONS=1 - true - include\third_party\libyuv\include;include\third_party\libvpx\source\libvpx;src;.\;include;%(AdditionalIncludeDirectories) - - - ProgramDatabase - Speed - - - NotSet - true - true - true - lib;%(AdditionalLibraryDirectories) - %(AdditionalDependencies) - LIBCPMT.LIB - NotSet - - - corflags /32bit+ $(OutDir)$(TargetName)$(TargetExt) - - - - - Level3 - NotUsing - MaxSpeed - true - true - NDEBUG;WIN64;_CRT_SECURE_NO_WARNINGS;UNICODE;V8_DEPRECATION_WARNINGS;_WINDOWS;NOMINMAX;PSAPI_VERSION=1;_CRT_RAND_S;CERT_CHAIN_PARA_HAS_EXTRA_FIELDS;WIN32_LEAN_AND_MEAN;_ATL_NO_OPENGL;_SECURE_ATL;_HAS_EXCEPTIONS=0;_WINSOCK_DEPRECATED_NO_WARNINGS;CHROMIUM_BUILD;CR_CLANG_REVISION=274369-1;COMPONENT_BUILD;USE_AURA=1;USE_DEFAULT_RENDER_THEME=1;USE_LIBJPEG_TURBO=1;ENABLE_WEBRTC=1;ENABLE_MEDIA_ROUTER=1;ENABLE_PEPPER_CDMS;ENABLE_NOTIFICATIONS;FIELDTRIAL_TESTING_ENABLED;NO_TCMALLOC;__STD_C;_CRT_SECURE_NO_DEPRECATE;_SCL_SECURE_NO_DEPRECATE;NTDDI_VERSION=0x0A000000;_USING_V110_SDK71_;ENABLE_TASK_MANAGER=1;ENABLE_EXTENSIONS=1;ENABLE_PDF=1;ENABLE_PLUGIN_INSTALLATION=1;ENABLE_PLUGINS=1;ENABLE_SESSION_SERVICE=1;ENABLE_THEMES=1;ENABLE_PRINTING=1;ENABLE_BASIC_PRINTING=1;ENABLE_PRINT_PREVIEW=1;ENABLE_SPELLCHECK=1;ENABLE_CAPTIVE_PORTAL_DETECTION=1;ENABLE_SUPERVISED_USERS=1;ENABLE_MDNS=1;ENABLE_SERVICE_DISCOVERY=1;V8_USE_EXTERNAL_STARTUP_DATA;FULL_SAFE_BROWSING;SAFE_BROWSING_CSD;SAFE_BROWSING_DB_LOCAL;WEBRTC_WIN;USE_LIBPCI=1;_CRT_NONSTDC_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;DYNAMIC_ANNOTATIONS_ENABLED=1;WTF_USE_DYNAMIC_ANNOTATIONS=1;%(PreprocessorDefinitions) - true - include\third_party\libyuv\include;include\third_party\libvpx\source\libvpx;src;.\;include;%(AdditionalIncludeDirectories) - - - Windows - true - true - true - lib_x64;%(AdditionalLibraryDirectories) - LIBCPMT.LIB - - - - - - - - - - - - - NotUsing - NotUsing - NotUsing - NotUsing - - - NotUsing - NotUsing - NotUsing - NotUsing - - - NotUsing - NotUsing - NotUsing - - - NotUsing - NotUsing - NotUsing - NotUsing - - - NotUsing - NotUsing - NotUsing - NotUsing - - - true - true - NotUsing - NotUsing - Async - Async - ProgramDatabase - NotUsing - true - Async - true - NotUsing - Async - - - true - true - Async - Async - NotUsing - NotUsing - - - true - Async - NotUsing - true - Async - - - Create - Create - Create - Create - - - - - {01062c91-04f7-486f-bc09-9c5b3ee468ab} - - - - - - - - - \ No newline at end of file diff --git a/WebRtc.NET/WebRtcNative.cs b/WebRtc.NET/WebRtcNative.cs new file mode 100644 index 00000000..36cab1f3 --- /dev/null +++ b/WebRtc.NET/WebRtcNative.cs @@ -0,0 +1,389 @@ +using System; +using System.Diagnostics; +using System.Runtime.InteropServices; +using System.Security; +using System.IO; + +namespace WebRtc.NET +{ + public class WebRtcNative : IDisposable + { + const string dll = "WebRtcNative"; + const string version = "v2018.07.27.1"; + + static WebRtcNative() + { + var dir = Path.Combine(Path.Combine(Path.GetTempPath(), IntPtr.Size == 8 ? "x64" : "x86"), version); + if (!Directory.Exists(dir)) + { + Directory.CreateDirectory(dir); + } + + var file = Path.Combine(dir, dll) + ".dll"; + + bool fileExists = File.Exists(file); + +//#if DEBUG +// fileExists = false; +//#endif + + if (!fileExists) + { + File.WriteAllBytes(file, IntPtr.Size == 8 ? GetFile("WebRtc.NET.x64.WebRtcNative-x64.dll") : GetFile("WebRtc.NET.x86.WebRtcNative-x86.dll")); +#if DEBUG + File.WriteAllBytes(Path.Combine(dir, dll) + ".pdb", IntPtr.Size == 8 ? GetFile("WebRtc.NET.x64.WebRtcNative-x64.pdb") : GetFile("WebRtc.NET.x86.WebRtcNative-x86.pdb")); +#endif + } + + if (IntPtr.Zero == LoadLibrary(file)) + { + throw new Exception("Failed to load: " + file); + } + } + + public static byte[] GetFile(string fileName) + { + //"WebRtc.NET.x64.WebRtcNative.dll" + + var stream = System.Reflection.Assembly.GetExecutingAssembly().GetManifestResourceStream(fileName); + if (stream == null) + { + throw new Exception("Unable to find embedded resource file:" + fileName); + } + + using (stream) + using (var input = new BinaryReader(stream)) + using (var output = new MemoryStream()) + { + byte[] buffer = new byte[32768]; + int read; + while ((read = input.Read(buffer, 0, buffer.Length)) > 0) + { + output.Write(buffer, 0, read); + } + return output.ToArray(); + } + } + +#region -- Constructs -- + + [DllImport(dll)] + static extern IntPtr NewConductor(); + + [DllImport(dll)] + static extern void DeleteConductor(IntPtr p); + +#endregion + +#region -- Ssl -- + + [DllImport(dll)] + public static extern void InitializeSSL(); + + [DllImport(dll)] + public static extern void CleanupSSL(); + +#endregion + +#region -- Events -- + + [DllImport(dll)] + extern static void onRenderLocal(IntPtr p, IntPtr callback); + + [DllImport(dll)] + extern static void onRenderRemote(IntPtr p, IntPtr callback); + + [DllImport(dll)] + extern static void onError(IntPtr p, IntPtr callback); + + [DllImport(dll)] + extern static void onSuccess(IntPtr p, IntPtr callback); + + [DllImport(dll)] + extern static void onFailure(IntPtr p, IntPtr callback); + + [DllImport(dll)] + extern static void onDataMessage(IntPtr p, IntPtr callback); + + [DllImport(dll)] + extern static void onDataBinaryMessage(IntPtr p, IntPtr callback); + + [DllImport(dll)] + extern static void onIceCandidate(IntPtr p, IntPtr callback); + +#endregion + +#region -- PeerConnection -- + + [DllImport(dll)] + static extern bool InitializePeerConnection(IntPtr p); + public bool InitializePeerConnection() + { + return InitializePeerConnection(p); + } + + [DllImport(dll)] + static extern void CreateOffer(IntPtr p); + public void CreateOffer() + { + CreateOffer(p); + } + + [DllImport(dll)] + static extern void OnOfferReply(IntPtr p, string type, string sdp); + public void OnOfferReply(string type, string sdp) + { + OnOfferReply(p, type, sdp); + } + + [DllImport(dll)] + static extern void OnOfferRequest(IntPtr p, string sdp); + public void OnOfferRequest(string sdp) + { + OnOfferRequest(p, sdp); + } + + [DllImport(dll)] + static extern bool AddIceCandidate(IntPtr p, string sdp_mid, int sdp_mlineindex, string sdp); + public bool AddIceCandidate(string sdp_mid, int sdp_mlineindex, string sdp) + { + return AddIceCandidate(p, sdp_mid, sdp_mlineindex, sdp); + } + +#endregion + +#region -- DataChannel -- + + [DllImport(dll)] + static extern void CreateDataChannel(IntPtr p, string label); + public void CreateDataChannel(string label) + { + CreateDataChannel(p, label); + } + + [DllImport(dll)] + extern static void onDataChannelStateChange(IntPtr p, IntPtr callback); + + [DllImport(dll)] + static extern void DataChannelSendText(IntPtr p, string text); + public void DataChannelSendText(string text) + { + DataChannelSendText(p, text); + } + + [DllImport(dll)] + static extern void DataChannelSendData(IntPtr p, byte[] data, int length); + public void DataChannelSendData(byte[] data, int length) + { + DataChannelSendData(p, data, length); + } + +#endregion + +#region -- Etc -- + + [DllImport(dll)] + static extern void AddServerConfig(IntPtr p, string uri, string username, string password); + public void AddServerConfig(string uri, string username, string password) + { + AddServerConfig(p, uri, username, password); + } + + [SuppressUnmanagedCodeSecurity] + [DllImport(dll)] + static extern bool ProcessMessages(IntPtr p, int delay); + public bool ProcessMessages(int delay) + { + return ProcessMessages(p, delay); + } + + [DllImport("kernel32", SetLastError = true, CharSet = CharSet.Unicode)] + static extern IntPtr LoadLibrary(string lpFileName); + +#endregion + +#region -- Servers -- + + [DllImport(dll)] + static extern bool RunStunServer(IntPtr p, string bindIp); + bool RunStunServer(string bindIp) + { + return RunStunServer(p, bindIp); + } + + [DllImport(dll)] + static extern bool RunTurnServer(IntPtr p, string bindIp, string ip, string realm, string authFile); + public bool RunTurnServer(string bindIp, string ip, string realm, string authFile) + { + return RunTurnServer(p, bindIp, ip, realm, authFile); + } + +#endregion + +#region -- public events -- + + public delegate void OnCallbackSdp(String sdp); + public event OnCallbackSdp OnSuccessOffer; + public event OnCallbackSdp OnSuccessAnswer; + + public delegate void OnCallbackIceCandidate(String sdp_mid, Int32 sdp_mline_index, String sdp); + public event OnCallbackIceCandidate OnIceCandidate; + + public event Action OnError; + + public delegate void OnCallbackError(String error); + public event OnCallbackError OnFailure; + + public delegate void OnCallbackDataMessage(String msg); + public event OnCallbackDataMessage OnDataMessage; + + public delegate void OnCallbackDataBinaryMessage(byte[] msg); + public event OnCallbackDataBinaryMessage OnDataBinaryMessage; + + public delegate void OnCallbackDataChannelStateChanged(String label, uint state); + public event OnCallbackDataChannelStateChanged OnDataChannelStateChanged; + + delegate void _OnDataChannelStateChangedCallback(String msg, UInt32 state); + _OnDataChannelStateChangedCallback _onDataChannelStateChange; + + public unsafe delegate void OnCallbackRender(IntPtr BGR24, UInt32 w, UInt32 h); + public event OnCallbackRender OnRenderLocal; + public event OnCallbackRender OnRenderRemote; + +#endregion + + IntPtr p; + public WebRtcNative() + { + p = NewConductor(); + +#region -- events -- + + _onRenderLocal = new _OnRenderCallback(_OnRenderLocal); + onRenderLocal(p, Marshal.GetFunctionPointerForDelegate(_onRenderLocal)); + + _onRenderRemote = new _OnRenderCallback(_OnRenderRemote); + onRenderRemote(p, Marshal.GetFunctionPointerForDelegate(_onRenderRemote)); + + _onError = new _OnErrorCallback(_OnError); + onError(p, Marshal.GetFunctionPointerForDelegate(_onError)); + + _onSuccess = new _OnSuccessCallback(_OnSuccess); + onSuccess(p, Marshal.GetFunctionPointerForDelegate(_onSuccess)); + + _onFailure = new _OnFailureCallback(_OnFailure); + onFailure(p, Marshal.GetFunctionPointerForDelegate(_onFailure)); + + _onDataMessage = new _OnDataMessageCallback(_OnDataMessage); + onDataMessage(p, Marshal.GetFunctionPointerForDelegate(_onDataMessage)); + + _onDataBinaryMessage = new _OnDataBinaryMessageCallback(_OnDataBinaryMessage); + onDataBinaryMessage(p, Marshal.GetFunctionPointerForDelegate(_onDataBinaryMessage)); + + _onIceCandidate = new _OnIceCandidateCallback(_OnIceCandidate); + onIceCandidate(p, Marshal.GetFunctionPointerForDelegate(_onIceCandidate)); + + _onDataChannelStateChange = new _OnDataChannelStateChangedCallback(_OnDataChannelStateChange); + onDataChannelStateChange(p, Marshal.GetFunctionPointerForDelegate(_onDataChannelStateChange)); + + #endregion + } + + public void Dispose() + { + DeleteConductor(p); + } + +#region -- events -- + + delegate void _OnRenderCallback(IntPtr BGR24, UInt32 w, UInt32 h); + _OnRenderCallback _onRenderLocal; + _OnRenderCallback _onRenderRemote; + + delegate void _OnErrorCallback(); + _OnErrorCallback _onError; + + delegate void _OnSuccessCallback(String type, String sdp); + _OnSuccessCallback _onSuccess; + + delegate void _OnFailureCallback(String error); + _OnFailureCallback _onFailure; + + delegate void _OnDataMessageCallback(String msg); + _OnDataMessageCallback _onDataMessage; + + delegate void _OnDataBinaryMessageCallback(IntPtr msg, UInt32 size); + _OnDataBinaryMessageCallback _onDataBinaryMessage; + + delegate void _OnIceCandidateCallback(String sdp_mid, Int32 sdp_mline_index, String sdp); + _OnIceCandidateCallback _onIceCandidate; + + void _OnRenderLocal(IntPtr BGR24, UInt32 w, UInt32 h) + { + OnRenderLocal(BGR24, w, h); + } + + void _OnRenderRemote(IntPtr BGR24, UInt32 w, UInt32 h) + { + OnRenderRemote(BGR24, w, h); + } + + void _OnError() + { + Debug.WriteLine("OnError"); + + OnError("webrtc error"); + } + + void _OnSuccess(String type, String sdp) + { + Debug.WriteLine(String.Format("OnSuccess: {0} -> {1}", type, sdp)); + + if (type == "offer") + { + OnSuccessOffer(sdp); + } + else if (type == "answer") + { + OnSuccessAnswer(sdp); + } + } + + void _OnIceCandidate(String sdp_mid, Int32 sdp_mline_index, String sdp) + { + Debug.WriteLine(String.Format("OnIceCandidate: {0}", sdp)); + + OnIceCandidate(sdp_mid, sdp_mline_index, sdp); + } + + void _OnFailure(String error) + { + Debug.WriteLine(String.Format("OnFailure: {0}", error)); + + OnFailure(error); + } + + void _OnDataMessage(String msg) + { + OnDataMessage(msg); + } + + void _OnDataBinaryMessage(IntPtr msg, UInt32 size) + { + byte[] data_array = new byte[size]; + + Marshal.Copy(msg, data_array, 0, (int)size); + + OnDataBinaryMessage(data_array); + } + + void _OnDataChannelStateChange(string label, UInt32 state) + { + Debug.WriteLine(String.Format("OnDataChannelStateChanged: {0}", label)); + + OnDataChannelStateChanged(label, state); + } + + #endregion + } +} diff --git a/WebRtc.NET/cmd/genRelease.bat b/WebRtc.NET/cmd/genRelease.bat deleted file mode 100644 index 98aa3aea..00000000 --- a/WebRtc.NET/cmd/genRelease.bat +++ /dev/null @@ -1,9 +0,0 @@ -d: - -cd D:\webrtc-checkout\src - -set DEPOT_TOOLS_WIN_TOOLCHAIN=0 - -gn gen out/ReleaseX86 --ide="vs2015" --args="is_debug=false target_cpu=\"x86\" is_component_build=false symbol_level=0" - -pause diff --git a/WebRtc.NET/gn/build/config/win/BUILD.gn b/WebRtc.NET/gn/build/config/win/BUILD.gn deleted file mode 100644 index e07fa489..00000000 --- a/WebRtc.NET/gn/build/config/win/BUILD.gn +++ /dev/null @@ -1,419 +0,0 @@ -# Copyright (c) 2013 The Chromium Authors. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -import("//build/config/clang/clang.gni") -import("//build/config/compiler/compiler.gni") -import("//build/config/sanitizers/sanitizers.gni") -import("//build/config/win/visual_studio_version.gni") -import("//build/toolchain/toolchain.gni") - -assert(is_win) - -declare_args() { - # Set this to true to enable static analysis through Visual Studio's - # /analyze. This dramatically slows compiles and reports thousands of - # warnings, so normally this is done on a build machine and only the new - # warnings are examined. - use_vs_code_analysis = false - - # Turn this on to have the linker output extra timing information. - win_linker_timing = false -} - -# This is included by reference in the //build/config/compiler config that -# is applied to all targets. It is here to separate out the logic that is -# Windows-only. -config("compiler") { - if (current_cpu == "x86") { - asmflags = [ - # When /safeseh is specified, the linker will only produce an image if it - # can also produce a table of the image's safe exception handlers. This - # table specifies for the operating system which exception handlers are - # valid for the image. Note that /SAFESEH isn't accepted on the command - # line, only /safeseh. This is only accepted by ml.exe, not ml64.exe. - "/safeseh", - ] - } - - cflags = [ - "/Gy", # Enable function-level linking. - "/FS", # Preserve previous PDB behavior. - "/bigobj", # Some of our files are bigger than the regular limits. - ] - - # Force C/C++ mode for the given GN detected file type. This is necessary - # for precompiled headers where the same source file is compiled in both - # modes. - cflags_c = [ "/TC" ] - cflags_cc = [ "/TP" ] - - cflags += [ - # Tell the compiler to crash on failures. This is undocumented - # and unsupported but very handy. - "/d2FastFail", - - # Work around crbug.com/526851, bug in VS 2015 RTM compiler. - "/Zc:sizedDealloc-", - - # Disable thread-safe statics to avoid overhead and because - # they are disabled on other platforms. See crbug.com/587210 - # and -fno-threadsafe-statics. - "/Zc:threadSafeInit-", - ] - - # Building with Clang on Windows is a work in progress and very - # experimental. See crbug.com/82385. - if (is_clang) { - cflags += [ "-fmsc-version=1900" ] - - if (current_cpu == "x86") { - cflags += [ "-m32" ] - } else { - cflags += [ "-m64" ] - } - - if (exec_script("//build/win/use_ansi_codes.py", [], "trim string") == - "True") { - cflags += [ - # cmd.exe doesn't understand ANSI escape codes by default, - # so only enable them if something emulating them is around. - "-fansi-escape-codes", - ] - } - - # Clang runtime libraries, such as the sanitizer runtimes, live here. - lib_dirs = [ "$clang_base_path/lib/clang/$clang_version/lib/windows" ] - } - - # /PROFILE ensures that the PDB file contains FIXUP information (growing the - # PDB file by about 5%) but does not otherwise alter the output binary. This - # information is used by the Syzygy optimization tool when decomposing the - # release image. It is enabled for syzyasan builds and opportunistically for - # other builds where it is not prohibited (not supported when incrementally - # linking, using /debug:fastlink, or building with clang). - if (is_syzyasan) { - assert(!is_win_fastlink) - ldflags = [ "/PROFILE" ] - } else { - if (!is_debug && !is_component_build) { - if (is_win_fastlink || is_clang) { - # /PROFILE implies the following linker flags. Therefore if we are - # skipping /PROFILE because it is incompatible with /DEBUG:FASTLINK - # we should explicitly add these flags in order to avoid unintended - # consequences such as larger binaries. - ldflags = [ - "/OPT:REF", - "/OPT:ICF", - "/INCREMENTAL:NO", - "/FIXED:NO", - ] - } else { - ldflags = [ "/PROFILE" ] - } - } - } - - # arflags apply only to static_libraries. The normal linker configs are only - # set for executable and shared library targets so arflags must be set - # elsewhere. Since this is relatively contained, we just apply them in this - # more general config and they will only have an effect on static libraries. - arflags = [ - # "No public symbols found; archive member will be inaccessible." This - # means that one or more object files in the library can never be - # pulled in to targets that link to this library. It's just a warning that - # the source file is a no-op. - "/ignore:4221", - ] -} - -config("vs_code_analysis") { - if (use_vs_code_analysis) { - # When use_vs_code_analysis is specified add the /analyze switch to enable - # static analysis. Specifying /analyze:WX- says that /analyze warnings - # should not be treated as errors. - cflags = [ "/analyze:WX-" ] - - # Also, disable various noisy warnings that have low value. - cflags += [ - "/wd6011", # Dereferencing NULL pointer - - # C6285 is ~16% of raw warnings and has low value - "/wd6285", # non-zero constant || non-zero constant - "/wd6308", # realloc might return null pointer - - # Possible infinite loop: use of the constant - # EXCEPTION_CONTINUE_EXECUTION in the exception-filter - "/wd6312", - - "/wd6322", # Empty _except block - "/wd6330", # 'char' used instead of 'unsigned char' for istype() call - - # C6334 is ~80% of raw warnings and has low value - "/wd6334", # sizeof applied to an expression with an operator - "/wd6326", # Potential comparison of constant with constant - "/wd6340", # Sign mismatch in function parameter - "/wd28159", # Consider using 'GetTickCount64' - "/wd28196", # The precondition is not satisfied - "/wd28204", # Inconsistent SAL annotations - "/wd28251", # Inconsistent SAL annotations - "/wd28252", # Inconsistent SAL annotations - "/wd28253", # Inconsistent SAL annotations - "/wd28278", # Function appears with no prototype in scope - "/wd28285", # syntax error in SAL annotation (in algorithm) - "/wd28301", # Inconsistent SAL annotations - "/wd28182", # Dereferencing NULL pointer - ] - } -} - -# This is included by reference in the //build/config/compiler:runtime_library -# config that is applied to all targets. It is here to separate out the logic -# that is Windows-only. Please see that target for advice on what should go in -# :runtime_library vs. :compiler. -config("runtime_library") { - cflags = [] - - # Defines that set up the CRT. - defines = [ - "__STD_C", - "_CRT_RAND_S", - "_CRT_SECURE_NO_DEPRECATE", - "_HAS_EXCEPTIONS=0", - "_SCL_SECURE_NO_DEPRECATE", - ] - - # Defines that set up the Windows SDK. - defines += [ - "_ATL_NO_OPENGL", - "_WINDOWS", - "CERT_CHAIN_PARA_HAS_EXTRA_FIELDS", - "PSAPI_VERSION=1", - "WIN32", - "_SECURE_ATL", - ] - - if (!use_vs_code_analysis) { - # This is required for ATL to use XP-safe versions of its functions. - # However it is prohibited when using /analyze - defines += [ "_USING_V110_SDK71_" ] - } -} - -# Sets the default Windows build version. This is separated because some -# targets need to manually override it for their compiles. -config("winver") { - defines = [ - "NTDDI_VERSION=0x06010000", - "_WIN32_WINNT=0x0601", - "WINVER=0x0601", - ] -} - -# Linker flags for Windows SDK setup, this is applied only to EXEs and DLLs. -config("sdk_link") { - if (current_cpu == "x64") { - ldflags = [ "/MACHINE:X64" ] - lib_dirs = [ - "$windows_sdk_path\Lib\winv6.3\um\x64", - "$visual_studio_path\VC\lib\amd64", - "$visual_studio_path\VC\atlmfc\lib\amd64", - ] - } else { - ldflags = [ - "/MACHINE:X86", - "/SAFESEH", # Not compatible with x64 so use only for x86. - "/largeaddressaware", - ] - lib_dirs = [ - "$windows_sdk_path\Lib\winv6.3\um\x86", - "$visual_studio_path\VC\lib", - "$visual_studio_path\VC\atlmfc\lib", - ] - } -} - -# This default linker setup is provided separately from the SDK setup so -# targets who want different library configurations can remove this and specify -# their own. -config("common_linker_setup") { - ldflags = [ - "/fastfail", - "/FIXED:NO", - "/ignore:4199", - "/ignore:4221", - "/NXCOMPAT", - ] - - # ASLR makes debugging with windbg difficult because Chrome.exe and - # Chrome.dll share the same base name. As result, windbg will name the - # Chrome.dll module like chrome_, where - # typically changes with each launch. This in turn means that breakpoints in - # Chrome.dll don't stick from one launch to the next. For this reason, we - # turn ASLR off in debug builds. - if (is_debug) { - ldflags += [ "/DYNAMICBASE:NO" ] - } else { - ldflags += [ "/DYNAMICBASE" ] - } - - if (win_linker_timing) { - ldflags += [ - "/time", - "/verbose:incr", - ] - } -} - -# Control Flow Guard (CFG) -# https://msdn.microsoft.com/en-us/library/windows/desktop/mt637065.aspx -config("win_msvc_cfg") { - # /DYNAMICBASE (ASLR) is turned off in debug builds, therefore CFG can’t be - # turned on either. - if (!is_clang && !is_debug) { - cflags = [ "/guard:cf" ] - ldflags = [ "/guard:cf" ] - } -} - -# CRT -------------------------------------------------------------------------- - -# Configures how the runtime library (CRT) is going to be used. -# See https://msdn.microsoft.com/en-us/library/2kzt1wy3.aspx for a reference of -# what each value does. -config("default_crt") { - configs = [ ":dynamic_crt" ] -} - -config("dynamic_crt") { - if (is_debug) { - cflags = [ "/MDd" ] - arflags = [ "/MDd" ] - } else { - cflags = [ "/MD" ] - arflags = [ "/MD" ] - } -} - -config("static_crt") { - if (is_debug) { - cflags = [ "/MDd" ] - arflags = [ "/MDd" ] - } else { - cflags = [ "/MD" ] - arflags = [ "/MD" ] - } -} - -# Subsystem -------------------------------------------------------------------- - -# This is appended to the subsystem to specify a minimum version. -if (current_cpu == "x64") { - # The number after the comma is the minimum required OS version. - # 5.02 = Windows Server 2003. - subsystem_version_suffix = ",5.02" -} else { - # 5.01 = Windows XP. - subsystem_version_suffix = ",5.01" -} - -config("console") { - ldflags = [ "/SUBSYSTEM:CONSOLE$subsystem_version_suffix" ] -} -config("windowed") { - ldflags = [ "/SUBSYSTEM:WINDOWS$subsystem_version_suffix" ] -} - -# Incremental linking ---------------------------------------------------------- - -incremental_linking_on_switch = [ "/INCREMENTAL" ] -incremental_linking_off_switch = [ "/INCREMENTAL:NO" ] - -# Disable incremental linking for syzyasan, enable for debug builds and all -# component builds - any builds where performance is not job one. -if ((is_debug || is_component_build) && !is_syzyasan) { - default_incremental_linking_switch = incremental_linking_on_switch -} else { - default_incremental_linking_switch = incremental_linking_off_switch -} - -# Applies incremental linking or not depending on the current configuration. -config("default_incremental_linking") { - ldflags = default_incremental_linking_switch -} - -# Explicitly on or off incremental linking -config("incremental_linking") { - ldflags = incremental_linking_on_switch -} -config("no_incremental_linking") { - ldflags = incremental_linking_off_switch -} - -# Some large modules can't handle incremental linking in some situations. This -# config should be applied to large modules to turn off incremental linking -# when it won't work. -config("default_large_module_incremental_linking") { - if (symbol_level > 0 && (current_cpu == "x86" || !is_component_build)) { - # When symbols are on, things get so large that the tools fail due to the - # size of the .ilk files. - ldflags = incremental_linking_off_switch - } else { - # Otherwise just do the default incremental linking for this build type. - ldflags = default_incremental_linking_switch - } -} - -# Character set ---------------------------------------------------------------- - -# Not including this config means "ansi" (8-bit system codepage). -config("unicode") { - defines = [ - "_UNICODE", - "UNICODE", - ] -} - -# Lean and mean ---------------------------------------------------------------- - -# Some third party code might not compile with WIN32_LEAN_AND_MEAN so we have -# to have a separate config for it. Remove this config from your target to -# get the "bloaty and accomodating" version of windows.h. -config("lean_and_mean") { - defines = [ "WIN32_LEAN_AND_MEAN" ] -} - -# Nominmax -------------------------------------------------------------------- - -# Some third party code defines NOMINMAX before including windows.h, which -# then causes warnings when it's been previously defined on the command line. -# For such targets, this config can be removed. - -config("nominmax") { - defines = [ "NOMINMAX" ] -} - -# Target WinRT ---------------------------------------------------------------- - -# When targeting Windows Runtime, certain compiler/linker flags are necessary. - -config("target_winrt") { - defines = [ - "WINRT", - "WINAPI_FAMILY=WINAPI_FAMILY_PC_APP", - ] - cflags_cc = [ - "/ZW", - "/EHsc", - ] -} - -# Internal stuff -------------------------------------------------------------- - -# Config used by the MIDL template to disable warnings. -config("midl_warnings") { - if (is_clang) { - # MIDL generates code like "#endif !_MIDL_USE_GUIDDEF_". - cflags = [ "-Wno-extra-tokens" ] - } -} diff --git a/WebRtc.NET/gn/third_party/libvpx/BUILD.gn b/WebRtc.NET/gn/third_party/libvpx/BUILD.gn deleted file mode 100644 index f64aae96..00000000 --- a/WebRtc.NET/gn/third_party/libvpx/BUILD.gn +++ /dev/null @@ -1,336 +0,0 @@ -# Copyright 2014 The Chromium Authors. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -import("//build/config/arm.gni") -import("//build/config/android/config.gni") -import("//build/config/sanitizers/sanitizers.gni") -import("//third_party/libvpx/libvpx_srcs.gni") -import("//third_party/yasm/yasm_assemble.gni") - -# Sets the architecture name for building libvpx. -if (current_cpu == "x86") { - cpu_arch_full = "ia32" -} else if (current_cpu == "x64") { - if (is_msan) { - cpu_arch_full = "generic" - } else { - cpu_arch_full = "x64" - } -} else if (current_cpu == "arm") { - if (arm_use_neon) { - cpu_arch_full = "arm-neon" - } else if (is_android) { - cpu_arch_full = "arm-neon-cpu-detect" - } else { - cpu_arch_full = "arm" - } -} else { - cpu_arch_full = current_cpu -} - -if (is_nacl) { - platform_include_dir = "//third_party/libvpx/source/config/nacl" -} else { - # The mac configurations are currently a relic. They were useful when - # x86inc.asm did not work for MACH_O but now the build is identical to the - # linux config. iOS for arm on the other hand needs an apple-specific twist in - # vpx_config.asm - if (is_ios && current_cpu == "arm") { - os_category = current_os - } else if (is_posix) { # Should cover linux, mac, and the ios simulator. - os_category = "linux" - } else { # This should only match windows. - os_category = current_os - } - platform_include_dir = - "//third_party/libvpx/source/config/$os_category/$cpu_arch_full" -} - -config("libvpx_config") { - include_dirs = [ - "//third_party/libvpx/source/config", - platform_include_dir, - "//third_party/libvpx/source/libvpx", - "$root_gen_dir/third_party/libvpx", # Provides vpx_rtcd.h. - ] -} - -# gn orders flags on a target before flags from configs. The default config -# adds -Wall, and these flags have to be after -Wall -- so they need to come -# from a config and can't be on the target directly. -config("libvpx_warnings") { - if (is_clang) { - cflags = [ - # libvpx heavily relies on implicit enum casting. - "-Wno-conversion", - - # libvpx does `if ((a == b))` in some places. - "-Wno-parentheses-equality", - - # libvpx has many static functions in header, which trigger this warning. - "-Wno-unused-function", - ] - } else if (!is_win) { - cflags = [ - "-Wno-unused-function", - "-Wno-sign-compare", - ] - } -} - -# This config is applied to targets that depend on libvpx. -config("libvpx_external_config") { - include_dirs = [ "//third_party/libvpx/source/libvpx" ] -} - -if (current_cpu == "x86" || (current_cpu == "x64" && !is_msan)) { - yasm_assemble("libvpx_yasm") { - if (current_cpu == "x86") { - sources = libvpx_srcs_x86_assembly - } else if (current_cpu == "x64") { - sources = libvpx_srcs_x86_64_assembly - } - - defines = [ "CHROMIUM" ] - if (is_android) { - # On Android, define __ANDROID__ to use alternative standard library - # functions. - defines += [ "__ANDROID__" ] - } - include_dirs = [ - platform_include_dir, - "//third_party/libvpx/source/config", - "//third_party/libvpx/source/libvpx", - target_gen_dir, - ] - } -} - -if (current_cpu == "x86" || (current_cpu == "x64" && !is_msan)) { - # The following targets are deliberately source_set rather than - # static_library. The :libvpx target exposes these intrinsic implementations - # via global function pointer symbols, which hides the object dependency at - # link time. On Mac, this results in undefined references to the intrinsic - # symbols. - - static_library("libvpx_intrinsics_mmx") { - configs += [ ":libvpx_config" ] - configs -= [ "//build/config/compiler:chromium_code" ] - configs += [ "//build/config/compiler:no_chromium_code" ] - configs += [ ":libvpx_warnings" ] - if (!is_win) { - cflags = [ "-mmmx" ] - } - if (current_cpu == "x86") { - sources = libvpx_srcs_x86_mmx - } else if (current_cpu == "x64") { - sources = libvpx_srcs_x86_64_mmx - } - } - - static_library("libvpx_intrinsics_sse2") { - configs += [ ":libvpx_config" ] - configs -= [ "//build/config/compiler:chromium_code" ] - configs += [ "//build/config/compiler:no_chromium_code" ] - configs += [ ":libvpx_warnings" ] - if (!is_win || is_clang) { - cflags = [ "-msse2" ] - } - if (current_cpu == "x86") { - sources = libvpx_srcs_x86_sse2 - } else if (current_cpu == "x64") { - sources = libvpx_srcs_x86_64_sse2 - } - } - - static_library("libvpx_intrinsics_ssse3") { - configs += [ ":libvpx_config" ] - configs -= [ "//build/config/compiler:chromium_code" ] - configs += [ "//build/config/compiler:no_chromium_code" ] - configs += [ ":libvpx_warnings" ] - if (!is_win || is_clang) { - cflags = [ "-mssse3" ] - } - if (current_cpu == "x86") { - sources = libvpx_srcs_x86_ssse3 - } else if (current_cpu == "x64") { - sources = libvpx_srcs_x86_64_ssse3 - } - } - - static_library("libvpx_intrinsics_sse4_1") { - configs += [ ":libvpx_config" ] - configs -= [ "//build/config/compiler:chromium_code" ] - configs += [ "//build/config/compiler:no_chromium_code" ] - configs += [ ":libvpx_warnings" ] - if (!is_win || is_clang) { - cflags = [ "-msse4.1" ] - } - if (current_cpu == "x86") { - sources = libvpx_srcs_x86_sse4_1 - } else if (current_cpu == "x64") { - sources = libvpx_srcs_x86_64_sse4_1 - } - } - - static_library("libvpx_intrinsics_avx") { - configs += [ ":libvpx_config" ] - configs -= [ "//build/config/compiler:chromium_code" ] - configs += [ "//build/config/compiler:no_chromium_code" ] - configs += [ ":libvpx_warnings" ] - if (is_win) { - cflags = [ "/arch:AVX" ] - } else { - cflags = [ "-mavx" ] - } - if (current_cpu == "x86") { - sources = libvpx_srcs_x86_avx - } else if (current_cpu == "x64") { - sources = libvpx_srcs_x86_64_avx - } - } - - static_library("libvpx_intrinsics_avx2") { - configs += [ ":libvpx_config" ] - configs -= [ "//build/config/compiler:chromium_code" ] - configs += [ "//build/config/compiler:no_chromium_code" ] - configs += [ ":libvpx_warnings" ] - if (is_win) { - cflags = [ "/arch:AVX2" ] - } else { - cflags = [ "-mavx2" ] - } - if (current_cpu == "x86") { - sources = libvpx_srcs_x86_avx2 - } else if (current_cpu == "x64") { - sources = libvpx_srcs_x86_64_avx2 - } - } -} - -if (cpu_arch_full == "arm-neon-cpu-detect") { - static_library("libvpx_intrinsics_neon") { - configs -= [ "//build/config/compiler:compiler_arm_fpu" ] - configs += [ ":libvpx_config" ] - configs += [ ":libvpx_warnings" ] - cflags = [ "-mfpu=neon" ] - sources = libvpx_srcs_arm_neon_cpu_detect_neon - } -} - -if (current_cpu == "arm") { - if (cpu_arch_full == "arm-neon") { - arm_assembly_sources = libvpx_srcs_arm_neon_assembly - } else if (cpu_arch_full == "arm-neon-cpu-detect") { - arm_assembly_sources = libvpx_srcs_arm_neon_cpu_detect_assembly - } else { - arm_assembly_sources = libvpx_srcs_arm_assembly - } -} - -# Converts ARM assembly files to GAS style. -if (current_cpu == "arm" && arm_assembly_sources != []) { - action_foreach("convert_arm_assembly") { - script = "//third_party/libvpx/run_perl.py" - sources = arm_assembly_sources - gen_file = - get_label_info("//third_party/libvpx/source/libvpx", "root_gen_dir") + - "/{{source_root_relative_dir}}/{{source_file_part}}.S" - outputs = [ - gen_file, - ] - if (is_ios) { - ads2gas_script = - "//third_party/libvpx/source/libvpx/build/make/ads2gas_apple.pl" - } else { - ads2gas_script = - "//third_party/libvpx/source/libvpx/build/make/ads2gas.pl" - } - args = [ - "-s", - rebase_path(ads2gas_script, root_build_dir), - "-i", - "{{source}}", - "-o", - rebase_path(gen_file), - ] - } - - static_library("libvpx_assembly_arm") { - sources = get_target_outputs(":convert_arm_assembly") - configs -= [ "//build/config/compiler:compiler_arm_fpu" ] - configs += [ ":libvpx_config" ] - configs += [ ":libvpx_warnings" ] - if (cpu_arch_full == "arm-neon" || cpu_arch_full == "arm-neon-cpu-detect") { - asmflags = [ "-mfpu=neon" ] - - # allow asm files to include generated sources which match the source - # tree layout, e.g., vpx_dsp/arm/... - include_dirs = [ get_label_info("//third_party/libvpx/source/libvpx", - "target_gen_dir") ] - } - deps = [ - ":convert_arm_assembly", - ] - } -} - -static_library("libvpx") { - if (!is_debug && is_win) { - configs -= [ "//build/config/compiler:default_optimization" ] - configs += [ "//build/config/compiler:optimize_max" ] - } - - if (is_nacl) { - sources = libvpx_srcs_generic - } else if (current_cpu == "x86") { - sources = libvpx_srcs_x86 - } else if (current_cpu == "x64") { - if (is_msan) { - sources = libvpx_srcs_generic - } else { - sources = libvpx_srcs_x86_64 - } - } else if (current_cpu == "mipsel" || current_cpu == "mips64el") { - sources = libvpx_srcs_mips - } else if (current_cpu == "arm") { - if (arm_use_neon) { - sources = libvpx_srcs_arm_neon - } else if (is_android) { - sources = libvpx_srcs_arm_neon_cpu_detect - } else { - sources = libvpx_srcs_arm - } - } else if (current_cpu == "arm64") { - sources = libvpx_srcs_arm64 - } - - configs += [ ":libvpx_config" ] - configs -= [ "//build/config/compiler:chromium_code" ] - configs += [ "//build/config/compiler:no_chromium_code" ] - configs += [ ":libvpx_warnings" ] - deps = [] - if (current_cpu == "x86" || (current_cpu == "x64" && !is_msan)) { - deps += [ - ":libvpx_intrinsics_avx", - ":libvpx_intrinsics_avx2", - ":libvpx_intrinsics_mmx", - ":libvpx_intrinsics_sse2", - ":libvpx_intrinsics_sse4_1", - ":libvpx_intrinsics_ssse3", - ":libvpx_yasm", - ] - } - if (cpu_arch_full == "arm-neon-cpu-detect") { - deps += [ ":libvpx_intrinsics_neon" ] - } - if (is_android) { - deps += [ "//third_party/android_tools:cpu_features" ] - } - if (current_cpu == "arm" && arm_assembly_sources != []) { - deps += [ ":libvpx_assembly_arm" ] - } - - public_configs = [ ":libvpx_external_config" ] -} diff --git a/WebRtc.NET/gn/webrtc/api/BUILD.gn b/WebRtc.NET/gn/webrtc/api/BUILD.gn deleted file mode 100644 index 821260cc..00000000 --- a/WebRtc.NET/gn/webrtc/api/BUILD.gn +++ /dev/null @@ -1,372 +0,0 @@ -# Copyright (c) 2015 The WebRTC project authors. All Rights Reserved. -# -# Use of this source code is governed by a BSD-style license -# that can be found in the LICENSE file in the root of the source -# tree. An additional intellectual property rights grant can be found -# in the file PATENTS. All contributing project authors may -# be found in the AUTHORS file in the root of the source tree. - -import("../build/webrtc.gni") -if (is_android) { - import("//build/config/android/config.gni") - import("//build/config/android/rules.gni") -} - -group("api") { - public_deps = [ - ":libjingle_peerconnection", - ] -} - -rtc_source_set("call_api") { - sources = [ - "call/audio_sink.h", - ] - - deps = [ - # TODO(kjellander): Add remaining dependencies when webrtc:4243 is done. - ":audio_mixer_api", - ":transport_api", - "..:webrtc_common", - "../base:rtc_base_approved", - "../modules/audio_coding:audio_decoder_factory_interface", - "../modules/audio_coding:audio_encoder_interface", - ] -} - -config("libjingle_peerconnection_warnings_config") { - # GN orders flags on a target before flags from configs. The default config - # adds these flags so to cancel them out they need to come from a config and - # cannot be on the target directly. - if (!is_win && !is_clang) { - cflags = [ "-Wno-maybe-uninitialized" ] # Only exists for GCC. - } -} - -rtc_static_library("libjingle_peerconnection") { - check_includes = false # TODO(kjellander): Remove (bugs.webrtc.org/6828) - cflags = [] - sources = [ - "audiotrack.cc", - "audiotrack.h", - "datachannel.cc", - "datachannel.h", - "datachannelinterface.h", - "dtmfsender.cc", - "dtmfsender.h", - "dtmfsenderinterface.h", - "jsep.h", - "jsepicecandidate.cc", - "jsepicecandidate.h", - "jsepsessiondescription.cc", - "jsepsessiondescription.h", - "localaudiosource.cc", - "localaudiosource.h", - "mediaconstraintsinterface.cc", - "mediaconstraintsinterface.h", - "mediacontroller.cc", - "mediacontroller.h", - "mediastream.cc", - "mediastream.h", - "mediastreaminterface.h", - "mediastreamobserver.cc", - "mediastreamobserver.h", - "mediastreamproxy.h", - "mediastreamtrack.h", - "mediastreamtrackproxy.h", - "notifier.h", - "ortcfactory.cc", - "ortcfactory.h", - "ortcfactoryinterface.h", - "peerconnection.cc", - "peerconnection.h", - "peerconnectionfactory.cc", - "peerconnectionfactory.h", - "peerconnectionfactoryproxy.h", - "peerconnectioninterface.h", - "peerconnectionproxy.h", - "proxy.h", - "remoteaudiosource.cc", - "remoteaudiosource.h", - "rtcstatscollector.cc", - "rtcstatscollector.h", - "rtpparameters.h", - "rtpreceiver.cc", - "rtpreceiver.h", - "rtpreceiverinterface.h", - "rtpsender.cc", - "rtpsender.h", - "rtpsenderinterface.h", - "sctputils.cc", - "sctputils.h", - "statscollector.cc", - "statscollector.h", - "statstypes.cc", - "statstypes.h", - "streamcollection.h", - "trackmediainfomap.cc", - "trackmediainfomap.h", - "udptransportinterface.h", - "videocapturertracksource.cc", - "videocapturertracksource.h", - "videosourceproxy.h", - "videotrack.cc", - "videotrack.h", - "videotracksource.cc", - "videotracksource.h", - "webrtcsdp.cc", - "webrtcsdp.h", - "webrtcsession.cc", - "webrtcsession.h", - "webrtcsessiondescriptionfactory.cc", - "webrtcsessiondescriptionfactory.h", - ] - - configs += [ ":libjingle_peerconnection_warnings_config" ] - - if (!build_with_chromium && is_clang) { - # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). - suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] - } - - deps = [ - ":call_api", - ":rtc_stats_api", - "../call", - "../media", - "../pc", - "../stats", - ] - - if (rtc_use_quic) { - sources += [ - "quicdatachannel.cc", - "quicdatachannel.h", - "quicdatatransport.cc", - "quicdatatransport.h", - ] - deps += [ "//third_party/libquic" ] - public_deps = [ - "//third_party/libquic", - ] - } -} - -rtc_source_set("rtc_stats_api") { - cflags = [] - sources = [ - "stats/rtcstats.h", - "stats/rtcstats_objects.h", - "stats/rtcstatsreport.h", - ] - - deps = [ - "../base:rtc_base_approved", - ] -} - -rtc_source_set("audio_mixer_api") { - sources = [ - "audio/audio_mixer.h", - ] - - deps = [ - "../base:rtc_base_approved", - ] -} - -rtc_source_set("transport_api") { - sources = [ - "call/transport.h", - ] -} - -rtc_static_library("video_frame_api") { - sources = [ - "video/i420_buffer.cc", - "video/i420_buffer.h", - "video/video_frame.cc", - "video/video_frame.h", - "video/video_frame_buffer.h", - "video/video_rotation.h", - ] - - deps = [ - "../base:rtc_base_approved", - "../system_wrappers", - ] - - # TODO(nisse): This logic is duplicated in multiple places. - # Define in a single place. - if (rtc_build_libyuv) { - deps += [ "$rtc_libyuv_dir" ] - public_deps = [ - "$rtc_libyuv_dir", - ] - } else { - # Need to add a directory normally exported by libyuv. - include_dirs = [ "$rtc_libyuv_dir/include" ] - } -} - -if (rtc_include_tests) { - config("peerconnection_unittests_config") { - # The warnings below are enabled by default. Since GN orders compiler flags - # for a target before flags from configs, the only way to disable such - # warnings is by having them in a separate config, loaded from the target. - # TODO(kjellander): Make the code compile without disabling these flags. - # See https://bugs.webrtc.org/3307. - if (is_clang && is_win) { - cflags = [ - # See https://bugs.chromium.org/p/webrtc/issues/detail?id=6267 - # for -Wno-sign-compare - "-Wno-sign-compare", - "-Wno-unused-function", - ] - } - - if (!is_win) { - cflags = [ "-Wno-sign-compare" ] - } - } - - rtc_test("peerconnection_unittests") { - check_includes = false # TODO(kjellander): Remove (bugs.webrtc.org/6828) - testonly = true - sources = [ - "datachannel_unittest.cc", - "dtmfsender_unittest.cc", - "jsepsessiondescription_unittest.cc", - "localaudiosource_unittest.cc", - "mediaconstraintsinterface_unittest.cc", - "mediastream_unittest.cc", - "ortcfactory_unittest.cc", - "peerconnection_unittest.cc", - "peerconnectionendtoend_unittest.cc", - "peerconnectionfactory_unittest.cc", - "peerconnectioninterface_unittest.cc", - "proxy_unittest.cc", - "rtcstats_integrationtest.cc", - "rtcstatscollector_unittest.cc", - "rtpsenderreceiver_unittest.cc", - "sctputils_unittest.cc", - "statscollector_unittest.cc", - "test/fakeaudiocapturemodule.cc", - "test/fakeaudiocapturemodule.h", - "test/fakeaudiocapturemodule_unittest.cc", - "test/fakeconstraints.h", - "test/fakedatachannelprovider.h", - "test/fakeperiodicvideocapturer.h", - "test/fakertccertificategenerator.h", - "test/fakevideotrackrenderer.h", - "test/mock_datachannel.h", - "test/mock_peerconnection.h", - "test/mock_rtpreceiver.h", - "test/mock_rtpsender.h", - "test/mock_webrtcsession.h", - "test/mockpeerconnectionobservers.h", - "test/peerconnectiontestwrapper.cc", - "test/peerconnectiontestwrapper.h", - "test/rtcstatsobtainer.h", - "test/testsdpstrings.h", - "trackmediainfomap_unittest.cc", - "videocapturertracksource_unittest.cc", - "videotrack_unittest.cc", - "webrtcsdp_unittest.cc", - "webrtcsession_unittest.cc", - ] - - if (rtc_enable_sctp) { - defines = [ "HAVE_SCTP" ] - } - - configs += [ ":peerconnection_unittests_config" ] - - if (!build_with_chromium && is_clang) { - # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). - suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] - } - - # TODO(jschuh): Bug 1348: fix this warning. - configs += [ "//build/config/compiler:no_size_t_to_int_warning" ] - - if (is_win) { - cflags = [ - "/wd4245", # conversion from int to size_t, signed/unsigned mismatch. - "/wd4389", # signed/unsigned mismatch. - ] - } - - if (rtc_use_quic) { - public_deps = [ - "//third_party/libquic", - ] - sources += [ - "quicdatachannel_unittest.cc", - "quicdatatransport_unittest.cc", - ] - } - - deps = [] - if (is_android) { - sources += [ - "test/androidtestinitializer.cc", - "test/androidtestinitializer.h", - ] - deps += [ - "//testing/android/native_test:native_test_support", - "//webrtc/sdk/android:libjingle_peerconnection_java", - "//webrtc/sdk/android:libjingle_peerconnection_jni", - ] - } - - deps += [ - ":fakemetricsobserver", - ":libjingle_peerconnection", - "..:webrtc_common", - "../base:rtc_base_tests_utils", - "../media:rtc_unittest_main", - "../pc:rtc_pc", - "../system_wrappers:metrics_default", - "//testing/gmock", - ] - - if (is_android) { - deps += [ "//testing/android/native_test:native_test_support" ] - - shard_timeout = 900 - } - } - - rtc_source_set("mock_audio_mixer") { - testonly = true - sources = [ - "test/mock_audio_mixer.h", - ] - - public_deps = [ - ":audio_mixer_api", - ] - - deps = [ - "//testing/gmock", - "//webrtc/test:test_support", - ] - } - - rtc_source_set("fakemetricsobserver") { - testonly = true - sources = [ - "fakemetricsobserver.cc", - "fakemetricsobserver.h", - ] - deps = [ - ":libjingle_peerconnection", - "../base:rtc_base_approved", - ] - if (!build_with_chromium && is_clang) { - # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). - suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] - } - } -} diff --git a/WebRtc.NET/gn/webrtc/call/BUILD.gn b/WebRtc.NET/gn/webrtc/call/BUILD.gn deleted file mode 100644 index d9968294..00000000 --- a/WebRtc.NET/gn/webrtc/call/BUILD.gn +++ /dev/null @@ -1,95 +0,0 @@ -# Copyright (c) 2015 The WebRTC project authors. All Rights Reserved. -# -# Use of this source code is governed by a BSD-style license -# that can be found in the LICENSE file in the root of the source -# tree. An additional intellectual property rights grant can be found -# in the file PATENTS. All contributing project authors may -# be found in the AUTHORS file in the root of the source tree. - -import("../build/webrtc.gni") - -rtc_static_library("call_interfaces") { - sources = [ - "audio_receive_stream.h", - "audio_send_stream.cc", - "audio_send_stream.h", - "audio_state.h", - "call.h", - "flexfec_receive_stream.h", - ] -} - -rtc_static_library("call") { - sources = [ - "bitrate_allocator.cc", - "call.cc", - "flexfec_receive_stream_impl.cc", - "flexfec_receive_stream_impl.h", - ] - - if (!build_with_chromium && is_clang) { - # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). - suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] - } - - public_deps = [ - ":call_interfaces", - "../api:call_api", - ] - - deps = [ - ":call_interfaces", - "..:webrtc_common", - "../api:transport_api", - "../audio", - "../base:rtc_task_queue", - "../logging:rtc_event_log_impl", - "../modules/congestion_controller", - "../modules/rtp_rtcp", - "../system_wrappers", - "../video", - ] -} - -if (rtc_include_tests) { - rtc_source_set("call_tests") { - testonly = true - sources = [ - "bitrate_allocator_unittest.cc", - "bitrate_estimator_tests.cc", - "call_unittest.cc", - "flexfec_receive_stream_unittest.cc", - "packet_injection_tests.cc", - ] - deps = [ - ":call", - "../base:rtc_base_approved", - "../modules/audio_device:mock_audio_device", - "../modules/audio_mixer", - "../test:test_common", - "//testing/gmock", - "//testing/gtest", - ] - if (!build_with_chromium && is_clang) { - # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). - suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] - } - } - - rtc_source_set("call_perf_tests") { - testonly = true - sources = [ - "call_perf_tests.cc", - "rampup_tests.cc", - "rampup_tests.h", - ] - deps = [ - "//testing/gtest", - "//webrtc/test:test_common", - ] - if (!build_with_chromium && is_clang) { - # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). - suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] - } - } -} diff --git a/WebRtc.NET/gn/webrtc/common_audio/BUILD.gn b/WebRtc.NET/gn/webrtc/common_audio/BUILD.gn deleted file mode 100644 index 38e79b3a..00000000 --- a/WebRtc.NET/gn/webrtc/common_audio/BUILD.gn +++ /dev/null @@ -1,349 +0,0 @@ -# Copyright (c) 2014 The WebRTC project authors. All Rights Reserved. -# -# Use of this source code is governed by a BSD-style license -# that can be found in the LICENSE file in the root of the source -# tree. An additional intellectual property rights grant can be found -# in the file PATENTS. All contributing project authors may -# be found in the AUTHORS file in the root of the source tree. - -import("//build/config/arm.gni") -import("../build/webrtc.gni") - -config("common_audio_config") { - include_dirs = [ - "resampler/include", - "signal_processing/include", - "vad/include", - ] -} - -rtc_static_library("common_audio") { - sources = [ - "audio_converter.cc", - "audio_converter.h", - "audio_ring_buffer.cc", - "audio_ring_buffer.h", - "audio_util.cc", - "blocker.cc", - "blocker.h", - "channel_buffer.cc", - "channel_buffer.h", - "fir_filter.cc", - "fir_filter.h", - "fir_filter_neon.h", - "fir_filter_sse.h", - "include/audio_util.h", - "lapped_transform.cc", - "lapped_transform.h", - "real_fourier.cc", - "real_fourier.h", - "real_fourier_ooura.cc", - "real_fourier_ooura.h", - "resampler/include/push_resampler.h", - "resampler/include/resampler.h", - "resampler/push_resampler.cc", - "resampler/push_sinc_resampler.cc", - "resampler/push_sinc_resampler.h", - "resampler/resampler.cc", - "resampler/sinc_resampler.cc", - "resampler/sinc_resampler.h", - "smoothing_filter.cc", - "smoothing_filter.h", - "sparse_fir_filter.cc", - "sparse_fir_filter.h", - "vad/include/vad.h", - "vad/vad.cc", - "wav_file.cc", - "wav_file.h", - "wav_header.cc", - "wav_header.h", - "window_generator.cc", - "window_generator.h", - ] - - deps = [ - "../system_wrappers", - ] - public_deps = [ - ":common_audio_c", - ] - - defines = [] - if (rtc_use_openmax_dl) { - sources += [ - "real_fourier_openmax.cc", - "real_fourier_openmax.h", - ] - defines += [ "RTC_USE_OPENMAX_DL" ] - if (rtc_build_openmax_dl) { - deps += [ "//third_party/openmax_dl/dl" ] - } - } - - if (rtc_build_with_neon) { - deps += [ ":common_audio_neon" ] - } - - if (is_win) { - cflags = [ "/wd4334" ] # Ignore warning on shift operator promotion. - } - - public_configs = [ ":common_audio_config" ] - - if (!build_with_chromium && is_clang) { - # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). - suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] - } - - if (current_cpu == "x86" || current_cpu == "x64") { - deps += [ ":common_audio_sse2" ] - } -} - -rtc_static_library("common_audio_c") { - visibility = [ ":*" ] # Only targets in this file can depend on this. - sources = [ - "fft4g.c", - "fft4g.h", - "ring_buffer.c", - "ring_buffer.h", - "signal_processing/auto_corr_to_refl_coef.c", - "signal_processing/auto_correlation.c", - "signal_processing/complex_fft_tables.h", - "signal_processing/copy_set_operations.c", - "signal_processing/cross_correlation.c", - "signal_processing/division_operations.c", - "signal_processing/dot_product_with_scale.c", - "signal_processing/downsample_fast.c", - "signal_processing/energy.c", - "signal_processing/filter_ar.c", - "signal_processing/filter_ma_fast_q12.c", - "signal_processing/get_hanning_window.c", - "signal_processing/get_scaling_square.c", - "signal_processing/ilbc_specific_functions.c", - "signal_processing/include/real_fft.h", - "signal_processing/include/signal_processing_library.h", - "signal_processing/include/spl_inl.h", - "signal_processing/levinson_durbin.c", - "signal_processing/lpc_to_refl_coef.c", - "signal_processing/min_max_operations.c", - "signal_processing/randomization_functions.c", - "signal_processing/real_fft.c", - "signal_processing/refl_coef_to_lpc.c", - "signal_processing/resample.c", - "signal_processing/resample_48khz.c", - "signal_processing/resample_by_2.c", - "signal_processing/resample_by_2_internal.c", - "signal_processing/resample_by_2_internal.h", - "signal_processing/resample_fractional.c", - "signal_processing/spl_init.c", - "signal_processing/spl_inl.c", - "signal_processing/spl_sqrt.c", - "signal_processing/splitting_filter.c", - "signal_processing/sqrt_of_one_minus_x_squared.c", - "signal_processing/vector_scaling_operations.c", - "vad/include/webrtc_vad.h", - "vad/vad_core.c", - "vad/vad_core.h", - "vad/vad_filterbank.c", - "vad/vad_filterbank.h", - "vad/vad_gmm.c", - "vad/vad_gmm.h", - "vad/vad_sp.c", - "vad/vad_sp.h", - "vad/webrtc_vad.c", - ] - - if (current_cpu == "arm") { - sources += [ - "signal_processing/complex_bit_reverse_arm.S", - "signal_processing/spl_sqrt_floor_arm.S", - ] - - if (arm_version >= 7) { - sources += [ "signal_processing/filter_ar_fast_q12_armv7.S" ] - } else { - sources += [ "signal_processing/filter_ar_fast_q12.c" ] - } - } - - if (current_cpu == "mipsel") { - sources += [ - "signal_processing/complex_bit_reverse_mips.c", - "signal_processing/complex_fft_mips.c", - "signal_processing/cross_correlation_mips.c", - "signal_processing/downsample_fast_mips.c", - "signal_processing/filter_ar_fast_q12_mips.c", - "signal_processing/include/spl_inl_mips.h", - "signal_processing/min_max_operations_mips.c", - "signal_processing/resample_by_2_mips.c", - "signal_processing/spl_sqrt_floor_mips.c", - ] - if (mips_dsp_rev > 0) { - sources += [ "signal_processing/vector_scaling_operations_mips.c" ] - } - } else { - sources += [ "signal_processing/complex_fft.c" ] - } - - if (current_cpu != "arm" && current_cpu != "mipsel") { - sources += [ - "signal_processing/complex_bit_reverse.c", - "signal_processing/filter_ar_fast_q12.c", - "signal_processing/spl_sqrt_floor.c", - ] - } - - if (is_win) { - cflags = [ "/wd4334" ] # Ignore warning on shift operator promotion. - } - - public_configs = [ ":common_audio_config" ] -} - -if (current_cpu == "x86" || current_cpu == "x64") { - rtc_static_library("common_audio_sse2") { - sources = [ - "fir_filter_sse.cc", - "resampler/sinc_resampler_sse.cc", - ] - - if (is_posix) { - cflags = [ "-msse2" ] - } - - if (!build_with_chromium && is_clang) { - # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). - suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] - } - } -} - -if (rtc_build_with_neon) { - rtc_static_library("common_audio_neon") { - sources = [ - "fir_filter_neon.cc", - "resampler/sinc_resampler_neon.cc", - ] - - if (current_cpu != "arm64") { - # Enable compilation for the NEON instruction set. This is needed - # since //build/config/arm.gni only enables NEON for iOS, not Android. - # This provides the same functionality as webrtc/build/arm_neon.gypi. - suppressed_configs += [ "//build/config/compiler:compiler_arm_fpu" ] - cflags = [ "-mfpu=neon" ] - } - - # Disable LTO on NEON targets due to compiler bug. - # TODO(fdegans): Enable this. See crbug.com/408997. - if (rtc_use_lto) { - cflags -= [ - "-flto", - "-ffat-lto-objects", - ] - } - - if (!build_with_chromium && is_clang) { - # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). - suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] - } - - public_deps = [ - ":common_audio_neon_c", - ] - } - - rtc_source_set("common_audio_neon_c") { - visibility = [ ":*" ] # Only targets in this file can depend on this. - sources = [ - "signal_processing/cross_correlation_neon.c", - "signal_processing/downsample_fast_neon.c", - "signal_processing/min_max_operations_neon.c", - ] - - if (current_cpu != "arm64") { - # Enable compilation for the NEON instruction set. This is needed - # since //build/config/arm.gni only enables NEON for iOS, not Android. - # This provides the same functionality as webrtc/build/arm_neon.gypi. - suppressed_configs += [ "//build/config/compiler:compiler_arm_fpu" ] - cflags = [ "-mfpu=neon" ] - } - - # Disable LTO on NEON targets due to compiler bug. - # TODO(fdegans): Enable this. See crbug.com/408997. - if (rtc_use_lto) { - cflags -= [ - "-flto", - "-ffat-lto-objects", - ] - } - - if (!build_with_chromium && is_clang) { - # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). - suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] - } - } -} - -if (rtc_include_tests) { - rtc_test("common_audio_unittests") { - testonly = true - - sources = [ - "audio_converter_unittest.cc", - "audio_ring_buffer_unittest.cc", - "audio_util_unittest.cc", - "blocker_unittest.cc", - "channel_buffer_unittest.cc", - "fir_filter_unittest.cc", - "lapped_transform_unittest.cc", - "real_fourier_unittest.cc", - "resampler/push_resampler_unittest.cc", - "resampler/push_sinc_resampler_unittest.cc", - "resampler/resampler_unittest.cc", - "resampler/sinusoidal_linear_chirp_source.cc", - "resampler/sinusoidal_linear_chirp_source.h", - "ring_buffer_unittest.cc", - "signal_processing/real_fft_unittest.cc", - "signal_processing/signal_processing_unittest.cc", - "smoothing_filter_unittest.cc", - "sparse_fir_filter_unittest.cc", - "vad/vad_core_unittest.cc", - "vad/vad_filterbank_unittest.cc", - "vad/vad_gmm_unittest.cc", - "vad/vad_sp_unittest.cc", - "vad/vad_unittest.cc", - "vad/vad_unittest.h", - "wav_file_unittest.cc", - "wav_header_unittest.cc", - "window_generator_unittest.cc", - ] - - # Does not compile on iOS for arm: webrtc:5544. - if (!is_ios || target_cpu != "arm") { - sources += [ "resampler/sinc_resampler_unittest.cc" ] - } - - if (rtc_use_openmax_dl) { - defines = [ "RTC_USE_OPENMAX_DL" ] - } - - if (!build_with_chromium && is_clang) { - # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). - suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] - } - - deps = [ - ":common_audio", - "../test:test_main", - "//testing/gmock", - "//testing/gtest", - ] - - if (is_android) { - deps += [ "//testing/android/native_test:native_test_support" ] - - shard_timeout = 900 - } - } -} diff --git a/WebRtc.NET/gn/webrtc/modules/audio_coding/BUILD.gn b/WebRtc.NET/gn/webrtc/modules/audio_coding/BUILD.gn deleted file mode 100644 index d18edf7b..00000000 --- a/WebRtc.NET/gn/webrtc/modules/audio_coding/BUILD.gn +++ /dev/null @@ -1,2056 +0,0 @@ -# Copyright (c) 2014 The WebRTC project authors. All Rights Reserved. -# -# Use of this source code is governed by a BSD-style license -# that can be found in the LICENSE file in the root of the source -# tree. An additional intellectual property rights grant can be found -# in the file PATENTS. All contributing project authors may -# be found in the AUTHORS file in the root of the source tree. - -import("../../build/webrtc.gni") -import("audio_coding.gni") -import("//build/config/arm.gni") -import("//third_party/protobuf/proto_library.gni") - -audio_codec_deps = [ - ":cng", - ":g711", - ":pcm16b", -] -if (rtc_include_ilbc) { - audio_codec_deps += [ ":ilbc" ] -} -if (rtc_include_opus) { - audio_codec_deps += [ ":webrtc_opus" ] -} -if (!build_with_mozilla) { - if (current_cpu == "arm") { - audio_codec_deps += [ ":isac_fix" ] - } else { - audio_codec_deps += [ ":isac" ] - } - audio_codec_deps += [ ":g722" ] -} -if (!build_with_mozilla && !build_with_chromium) { - audio_codec_deps += [ ":red" ] -} -audio_coding_deps = audio_codec_deps + [ - "../..:webrtc_common", - "../../common_audio", - "../../system_wrappers", - ] - -rtc_static_library("audio_format") { - sources = [ - "codecs/audio_format.cc", - "codecs/audio_format.h", - ] - deps = [ - "../..:webrtc_common", - ] -} - -rtc_static_library("audio_format_conversion") { - sources = [ - "codecs/audio_format_conversion.cc", - "codecs/audio_format_conversion.h", - ] - deps = [ - ":audio_format", - "../..:webrtc_common", - "../../base:rtc_base_approved", - ] -} - -rtc_source_set("audio_decoder_factory_interface") { - sources = [ - "codecs/audio_decoder_factory.h", - ] - deps = [ - ":audio_decoder_interface", - ":audio_format", - - # TODO(charujain): Clean this dependency when downstream projects are - # updated to properly depend on audio_format_conversion target. - ":audio_format_conversion", - "../../base:rtc_base_approved", - ] -} - -rtc_static_library("builtin_audio_decoder_factory") { - # TODO(kjellander): Remove (bugs.webrtc.org/6828) - # Errors on cyclic dependency with :isac_fix if enabled. - check_includes = false - - sources = [ - "codecs/builtin_audio_decoder_factory.cc", - "codecs/builtin_audio_decoder_factory.h", - ] - deps = [ - "../..:webrtc_common", - "../../base:rtc_base_approved", - ":audio_decoder_factory_interface", - ] + audio_codec_deps - defines = audio_codec_defines -} - -rtc_static_library("rent_a_codec") { - # TODO(kjellander): Remove (bugs.webrtc.org/6828) - # Gives cyclic dependency with :neteq and :audio_coding if enabled. - check_includes = false - - sources = [ - "acm2/acm_codec_database.cc", - "acm2/acm_codec_database.h", - "acm2/rent_a_codec.cc", - "acm2/rent_a_codec.h", - ] - deps = [ - ":audio_decoder_interface", - "../..:webrtc_common", - "../../base:rtc_base_approved", - ] + audio_codec_deps - defines = audio_codec_defines -} - -config("audio_coding_config") { - include_dirs = [ - "include", - "../include", - ] -} - -rtc_static_library("audio_coding") { - sources = [ - "acm2/acm_common_defs.h", - "acm2/acm_receiver.cc", - "acm2/acm_receiver.h", - "acm2/acm_resampler.cc", - "acm2/acm_resampler.h", - "acm2/audio_coding_module.cc", - "acm2/call_statistics.cc", - "acm2/call_statistics.h", - "acm2/codec_manager.cc", - "acm2/codec_manager.h", - "include/audio_coding_module.h", - "include/audio_coding_module_typedefs.h", - ] - - defines = [] - - public_configs = [ ":audio_coding_config" ] - - if (rtc_include_opus) { - public_deps = [ - ":webrtc_opus", - ] - } - - if (is_win) { - cflags = [ - # TODO(kjellander): Bug 261: fix this warning. - "/wd4373", # virtual function override. - ] - } - - deps = audio_coding_deps + [ - ":audio_decoder_interface", - ":audio_decoder_factory_interface", - ":builtin_audio_decoder_factory", - ":neteq", - ":rent_a_codec", - "../../base:rtc_base_approved", - "../../logging:rtc_event_log_api", - ] - defines = audio_coding_defines -} - -rtc_static_library("audio_decoder_interface") { - sources = [ - "codecs/audio_decoder.cc", - "codecs/audio_decoder.h", - "codecs/legacy_encoded_audio_frame.cc", - "codecs/legacy_encoded_audio_frame.h", - ] - deps = [ - "../..:webrtc_common", - "../../base:rtc_base_approved", - ] -} - -rtc_static_library("audio_encoder_interface") { - sources = [ - "codecs/audio_encoder.cc", - "codecs/audio_encoder.h", - ] - deps = [ - "../..:webrtc_common", - "../../base:rtc_base_approved", - ] -} - -config("cng_config") { - include_dirs = [ - "../../..", - "codecs/cng/include", - ] -} - -rtc_static_library("cng") { - sources = [ - "codecs/cng/audio_encoder_cng.cc", - "codecs/cng/audio_encoder_cng.h", - "codecs/cng/webrtc_cng.cc", - "codecs/cng/webrtc_cng.h", - ] - - public_configs = [ ":cng_config" ] - - deps = [ - ":audio_encoder_interface", - "../..:webrtc_common", - "../../base:rtc_base_approved", - "../../common_audio", - ] -} - -config("red_config") { - include_dirs = [ "codecs/red" ] -} - -rtc_static_library("red") { - sources = [ - "codecs/red/audio_encoder_copy_red.cc", - "codecs/red/audio_encoder_copy_red.h", - ] - - public_configs = [ ":red_config" ] - - deps = [ - ":audio_encoder_interface", - "../../base:rtc_base_approved", - "../../common_audio", - ] -} - -config("g711_config") { - include_dirs = [ - "../../..", - "codecs/g711/include", - ] -} - -rtc_static_library("g711") { - sources = [ - "codecs/g711/audio_decoder_pcm.cc", - "codecs/g711/audio_decoder_pcm.h", - "codecs/g711/audio_encoder_pcm.cc", - "codecs/g711/audio_encoder_pcm.h", - ] - - public_configs = [ ":g711_config" ] - - deps = [ - ":audio_decoder_interface", - ":audio_encoder_interface", - "../..:webrtc_common", - "../../base:rtc_base_approved", - ] - public_deps = [ - ":g711_c", - ] -} - -rtc_static_library("g711_c") { - visibility = [ ":*" ] # Only targets in this file can depend on this. - sources = [ - "codecs/g711/g711.c", - "codecs/g711/g711.h", - "codecs/g711/g711_interface.c", - "codecs/g711/g711_interface.h", - ] - deps = [ - "../..:webrtc_common", - ] -} - -config("g722_config") { - include_dirs = [ - "../../..", - "codecs/g722/include", - ] -} - -rtc_static_library("g722") { - sources = [ - "codecs/g722/audio_decoder_g722.cc", - "codecs/g722/audio_decoder_g722.h", - "codecs/g722/audio_encoder_g722.cc", - "codecs/g722/audio_encoder_g722.h", - ] - - public_configs = [ ":g722_config" ] - - deps = [ - ":audio_decoder_interface", - ":audio_encoder_interface", - "../..:webrtc_common", - "../../base:rtc_base_approved", - ] - public_deps = [ - ":g722_c", - ] -} - -rtc_static_library("g722_c") { - visibility = [ ":*" ] # Only targets in this file can depend on this. - sources = [ - "codecs/g722/g722_decode.c", - "codecs/g722/g722_enc_dec.h", - "codecs/g722/g722_encode.c", - "codecs/g722/g722_interface.c", - "codecs/g722/g722_interface.h", - ] - deps = [ - "../..:webrtc_common", - ] -} - -config("ilbc_config") { - include_dirs = [ - "../../..", - "codecs/ilbc/include", - ] -} - -rtc_static_library("ilbc") { - sources = [ - "codecs/ilbc/audio_decoder_ilbc.cc", - "codecs/ilbc/audio_decoder_ilbc.h", - "codecs/ilbc/audio_encoder_ilbc.cc", - "codecs/ilbc/audio_encoder_ilbc.h", - ] - - public_configs = [ ":ilbc_config" ] - - deps = [ - ":audio_decoder_interface", - ":audio_encoder_interface", - "../..:webrtc_common", - "../../base:rtc_base_approved", - "../../common_audio", - ] - public_deps = [ - ":ilbc_c", - ] -} - -rtc_static_library("ilbc_c") { - visibility = [ ":*" ] # Only targets in this file can depend on this. - sources = [ - "codecs/ilbc/abs_quant.c", - "codecs/ilbc/abs_quant.h", - "codecs/ilbc/abs_quant_loop.c", - "codecs/ilbc/abs_quant_loop.h", - "codecs/ilbc/augmented_cb_corr.c", - "codecs/ilbc/augmented_cb_corr.h", - "codecs/ilbc/bw_expand.c", - "codecs/ilbc/bw_expand.h", - "codecs/ilbc/cb_construct.c", - "codecs/ilbc/cb_construct.h", - "codecs/ilbc/cb_mem_energy.c", - "codecs/ilbc/cb_mem_energy.h", - "codecs/ilbc/cb_mem_energy_augmentation.c", - "codecs/ilbc/cb_mem_energy_augmentation.h", - "codecs/ilbc/cb_mem_energy_calc.c", - "codecs/ilbc/cb_mem_energy_calc.h", - "codecs/ilbc/cb_search.c", - "codecs/ilbc/cb_search.h", - "codecs/ilbc/cb_search_core.c", - "codecs/ilbc/cb_search_core.h", - "codecs/ilbc/cb_update_best_index.c", - "codecs/ilbc/cb_update_best_index.h", - "codecs/ilbc/chebyshev.c", - "codecs/ilbc/chebyshev.h", - "codecs/ilbc/comp_corr.c", - "codecs/ilbc/comp_corr.h", - "codecs/ilbc/constants.c", - "codecs/ilbc/constants.h", - "codecs/ilbc/create_augmented_vec.c", - "codecs/ilbc/create_augmented_vec.h", - "codecs/ilbc/decode.c", - "codecs/ilbc/decode.h", - "codecs/ilbc/decode_residual.c", - "codecs/ilbc/decode_residual.h", - "codecs/ilbc/decoder_interpolate_lsf.c", - "codecs/ilbc/decoder_interpolate_lsf.h", - "codecs/ilbc/defines.h", - "codecs/ilbc/do_plc.c", - "codecs/ilbc/do_plc.h", - "codecs/ilbc/encode.c", - "codecs/ilbc/encode.h", - "codecs/ilbc/energy_inverse.c", - "codecs/ilbc/energy_inverse.h", - "codecs/ilbc/enh_upsample.c", - "codecs/ilbc/enh_upsample.h", - "codecs/ilbc/enhancer.c", - "codecs/ilbc/enhancer.h", - "codecs/ilbc/enhancer_interface.c", - "codecs/ilbc/enhancer_interface.h", - "codecs/ilbc/filtered_cb_vecs.c", - "codecs/ilbc/filtered_cb_vecs.h", - "codecs/ilbc/frame_classify.c", - "codecs/ilbc/frame_classify.h", - "codecs/ilbc/gain_dequant.c", - "codecs/ilbc/gain_dequant.h", - "codecs/ilbc/gain_quant.c", - "codecs/ilbc/gain_quant.h", - "codecs/ilbc/get_cd_vec.c", - "codecs/ilbc/get_cd_vec.h", - "codecs/ilbc/get_lsp_poly.c", - "codecs/ilbc/get_lsp_poly.h", - "codecs/ilbc/get_sync_seq.c", - "codecs/ilbc/get_sync_seq.h", - "codecs/ilbc/hp_input.c", - "codecs/ilbc/hp_input.h", - "codecs/ilbc/hp_output.c", - "codecs/ilbc/hp_output.h", - "codecs/ilbc/ilbc.c", - "codecs/ilbc/ilbc.h", - "codecs/ilbc/index_conv_dec.c", - "codecs/ilbc/index_conv_dec.h", - "codecs/ilbc/index_conv_enc.c", - "codecs/ilbc/index_conv_enc.h", - "codecs/ilbc/init_decode.c", - "codecs/ilbc/init_decode.h", - "codecs/ilbc/init_encode.c", - "codecs/ilbc/init_encode.h", - "codecs/ilbc/interpolate.c", - "codecs/ilbc/interpolate.h", - "codecs/ilbc/interpolate_samples.c", - "codecs/ilbc/interpolate_samples.h", - "codecs/ilbc/lpc_encode.c", - "codecs/ilbc/lpc_encode.h", - "codecs/ilbc/lsf_check.c", - "codecs/ilbc/lsf_check.h", - "codecs/ilbc/lsf_interpolate_to_poly_dec.c", - "codecs/ilbc/lsf_interpolate_to_poly_dec.h", - "codecs/ilbc/lsf_interpolate_to_poly_enc.c", - "codecs/ilbc/lsf_interpolate_to_poly_enc.h", - "codecs/ilbc/lsf_to_lsp.c", - "codecs/ilbc/lsf_to_lsp.h", - "codecs/ilbc/lsf_to_poly.c", - "codecs/ilbc/lsf_to_poly.h", - "codecs/ilbc/lsp_to_lsf.c", - "codecs/ilbc/lsp_to_lsf.h", - "codecs/ilbc/my_corr.c", - "codecs/ilbc/my_corr.h", - "codecs/ilbc/nearest_neighbor.c", - "codecs/ilbc/nearest_neighbor.h", - "codecs/ilbc/pack_bits.c", - "codecs/ilbc/pack_bits.h", - "codecs/ilbc/poly_to_lsf.c", - "codecs/ilbc/poly_to_lsf.h", - "codecs/ilbc/poly_to_lsp.c", - "codecs/ilbc/poly_to_lsp.h", - "codecs/ilbc/refiner.c", - "codecs/ilbc/refiner.h", - "codecs/ilbc/simple_interpolate_lsf.c", - "codecs/ilbc/simple_interpolate_lsf.h", - "codecs/ilbc/simple_lpc_analysis.c", - "codecs/ilbc/simple_lpc_analysis.h", - "codecs/ilbc/simple_lsf_dequant.c", - "codecs/ilbc/simple_lsf_dequant.h", - "codecs/ilbc/simple_lsf_quant.c", - "codecs/ilbc/simple_lsf_quant.h", - "codecs/ilbc/smooth.c", - "codecs/ilbc/smooth.h", - "codecs/ilbc/smooth_out_data.c", - "codecs/ilbc/smooth_out_data.h", - "codecs/ilbc/sort_sq.c", - "codecs/ilbc/sort_sq.h", - "codecs/ilbc/split_vq.c", - "codecs/ilbc/split_vq.h", - "codecs/ilbc/state_construct.c", - "codecs/ilbc/state_construct.h", - "codecs/ilbc/state_search.c", - "codecs/ilbc/state_search.h", - "codecs/ilbc/swap_bytes.c", - "codecs/ilbc/swap_bytes.h", - "codecs/ilbc/unpack_bits.c", - "codecs/ilbc/unpack_bits.h", - "codecs/ilbc/vq3.c", - "codecs/ilbc/vq3.h", - "codecs/ilbc/vq4.c", - "codecs/ilbc/vq4.h", - "codecs/ilbc/window32_w32.c", - "codecs/ilbc/window32_w32.h", - "codecs/ilbc/xcorr_coef.c", - "codecs/ilbc/xcorr_coef.h", - ] - - public_configs = [ ":ilbc_config" ] - - deps = [ - ":audio_decoder_interface", - ":audio_encoder_interface", - "../..:webrtc_common", - "../../base:rtc_base_approved", - "../../common_audio", - ] -} - -rtc_static_library("isac_common") { - # TODO(kjellander): Remove (bugs.webrtc.org/6828) - # Has a cyclic dependency with :isac if checks are enabled. - check_includes = false - - sources = [ - "codecs/isac/audio_encoder_isac_t.h", - "codecs/isac/audio_encoder_isac_t_impl.h", - "codecs/isac/locked_bandwidth_info.cc", - "codecs/isac/locked_bandwidth_info.h", - ] - deps = [ - ":audio_encoder_interface", - "../../base:rtc_base_approved", - ] -} - -config("isac_config") { - include_dirs = [ - "../../..", - "codecs/isac/main/include", - ] -} - -rtc_static_library("isac") { - sources = [ - "codecs/isac/main/source/audio_decoder_isac.cc", - "codecs/isac/main/source/audio_encoder_isac.cc", - ] - - deps = [ - ":audio_decoder_interface", - ":audio_encoder_interface", - ":isac_common", - ] - public_deps = [ - ":isac_c", - ] -} - -rtc_static_library("isac_c") { - visibility = [ ":*" ] # Only targets in this file can depend on this. - sources = [ - "codecs/isac/main/include/audio_decoder_isac.h", - "codecs/isac/main/include/audio_encoder_isac.h", - "codecs/isac/main/include/isac.h", - "codecs/isac/main/source/arith_routines.c", - "codecs/isac/main/source/arith_routines.h", - "codecs/isac/main/source/arith_routines_hist.c", - "codecs/isac/main/source/arith_routines_logist.c", - "codecs/isac/main/source/bandwidth_estimator.c", - "codecs/isac/main/source/bandwidth_estimator.h", - "codecs/isac/main/source/codec.h", - "codecs/isac/main/source/crc.c", - "codecs/isac/main/source/crc.h", - "codecs/isac/main/source/decode.c", - "codecs/isac/main/source/decode_bwe.c", - "codecs/isac/main/source/encode.c", - "codecs/isac/main/source/encode_lpc_swb.c", - "codecs/isac/main/source/encode_lpc_swb.h", - "codecs/isac/main/source/entropy_coding.c", - "codecs/isac/main/source/entropy_coding.h", - "codecs/isac/main/source/fft.c", - "codecs/isac/main/source/fft.h", - "codecs/isac/main/source/filter_functions.c", - "codecs/isac/main/source/filterbank_tables.c", - "codecs/isac/main/source/filterbank_tables.h", - "codecs/isac/main/source/filterbanks.c", - "codecs/isac/main/source/intialize.c", - "codecs/isac/main/source/isac.c", - "codecs/isac/main/source/isac_float_type.h", - "codecs/isac/main/source/lattice.c", - "codecs/isac/main/source/lpc_analysis.c", - "codecs/isac/main/source/lpc_analysis.h", - "codecs/isac/main/source/lpc_gain_swb_tables.c", - "codecs/isac/main/source/lpc_gain_swb_tables.h", - "codecs/isac/main/source/lpc_shape_swb12_tables.c", - "codecs/isac/main/source/lpc_shape_swb12_tables.h", - "codecs/isac/main/source/lpc_shape_swb16_tables.c", - "codecs/isac/main/source/lpc_shape_swb16_tables.h", - "codecs/isac/main/source/lpc_tables.c", - "codecs/isac/main/source/lpc_tables.h", - "codecs/isac/main/source/os_specific_inline.h", - "codecs/isac/main/source/pitch_estimator.c", - "codecs/isac/main/source/pitch_estimator.h", - "codecs/isac/main/source/pitch_filter.c", - "codecs/isac/main/source/pitch_gain_tables.c", - "codecs/isac/main/source/pitch_gain_tables.h", - "codecs/isac/main/source/pitch_lag_tables.c", - "codecs/isac/main/source/pitch_lag_tables.h", - "codecs/isac/main/source/settings.h", - "codecs/isac/main/source/spectrum_ar_model_tables.c", - "codecs/isac/main/source/spectrum_ar_model_tables.h", - "codecs/isac/main/source/structs.h", - "codecs/isac/main/source/transform.c", - ] - - if (is_linux) { - libs = [ "m" ] - } - - public_configs = [ ":isac_config" ] - - deps = [ - ":isac_common", - "../..:webrtc_common", - "../../base:rtc_base_approved", - "../../common_audio", - ] -} - -config("isac_fix_config") { - include_dirs = [ - "../../..", - "codecs/isac/fix/include", - ] -} - -rtc_static_library("isac_fix") { - sources = [ - "codecs/isac/fix/source/audio_decoder_isacfix.cc", - "codecs/isac/fix/source/audio_encoder_isacfix.cc", - ] - - public_configs = [ ":isac_fix_config" ] - - deps = [ - ":audio_decoder_interface", - ":audio_encoder_interface", - ":isac_common", - "../../common_audio", - "../../system_wrappers", - ] - public_deps = [ - ":isac_fix_c", - ] - - if (rtc_build_with_neon) { - deps += [ ":isac_neon" ] - } -} - -rtc_static_library("isac_fix_c") { - # TODO(kjellander): Remove (bugs.webrtc.org/6828) - # Errors on cyclic dependency with :builtin_audio_decoder_factory if enabled. - check_includes = false - - visibility = [ ":*" ] # Only targets in this file can depend on this. - sources = [ - "codecs/isac/fix/include/audio_decoder_isacfix.h", - "codecs/isac/fix/include/audio_encoder_isacfix.h", - "codecs/isac/fix/include/isacfix.h", - "codecs/isac/fix/source/arith_routines.c", - "codecs/isac/fix/source/arith_routines_hist.c", - "codecs/isac/fix/source/arith_routines_logist.c", - "codecs/isac/fix/source/arith_routins.h", - "codecs/isac/fix/source/bandwidth_estimator.c", - "codecs/isac/fix/source/bandwidth_estimator.h", - "codecs/isac/fix/source/codec.h", - "codecs/isac/fix/source/decode.c", - "codecs/isac/fix/source/decode_bwe.c", - "codecs/isac/fix/source/decode_plc.c", - "codecs/isac/fix/source/encode.c", - "codecs/isac/fix/source/entropy_coding.c", - "codecs/isac/fix/source/entropy_coding.h", - "codecs/isac/fix/source/fft.c", - "codecs/isac/fix/source/fft.h", - "codecs/isac/fix/source/filterbank_tables.c", - "codecs/isac/fix/source/filterbank_tables.h", - "codecs/isac/fix/source/filterbanks.c", - "codecs/isac/fix/source/filters.c", - "codecs/isac/fix/source/initialize.c", - "codecs/isac/fix/source/isac_fix_type.h", - "codecs/isac/fix/source/isacfix.c", - "codecs/isac/fix/source/lattice.c", - "codecs/isac/fix/source/lattice_c.c", - "codecs/isac/fix/source/lpc_masking_model.c", - "codecs/isac/fix/source/lpc_masking_model.h", - "codecs/isac/fix/source/lpc_tables.c", - "codecs/isac/fix/source/lpc_tables.h", - "codecs/isac/fix/source/pitch_estimator.c", - "codecs/isac/fix/source/pitch_estimator.h", - "codecs/isac/fix/source/pitch_estimator_c.c", - "codecs/isac/fix/source/pitch_filter.c", - "codecs/isac/fix/source/pitch_filter_c.c", - "codecs/isac/fix/source/pitch_gain_tables.c", - "codecs/isac/fix/source/pitch_gain_tables.h", - "codecs/isac/fix/source/pitch_lag_tables.c", - "codecs/isac/fix/source/pitch_lag_tables.h", - "codecs/isac/fix/source/settings.h", - "codecs/isac/fix/source/spectrum_ar_model_tables.c", - "codecs/isac/fix/source/spectrum_ar_model_tables.h", - "codecs/isac/fix/source/structs.h", - "codecs/isac/fix/source/transform.c", - "codecs/isac/fix/source/transform_tables.c", - ] - - public_configs = [ ":isac_fix_config" ] - - deps = [ - ":audio_decoder_interface", - ":audio_encoder_interface", - ":isac_common", - "../..:webrtc_common", - "../../base:rtc_base_approved", - "../../common_audio", - "../../system_wrappers", - ] - - if (current_cpu == "arm" && arm_version >= 7) { - sources += [ - "codecs/isac/fix/source/lattice_armv7.S", - "codecs/isac/fix/source/pitch_filter_armv6.S", - ] - sources -= [ - "codecs/isac/fix/source/lattice_c.c", - "codecs/isac/fix/source/pitch_filter_c.c", - ] - } - - if (current_cpu == "mipsel") { - sources += [ - "codecs/isac/fix/source/entropy_coding_mips.c", - "codecs/isac/fix/source/filters_mips.c", - "codecs/isac/fix/source/lattice_mips.c", - "codecs/isac/fix/source/pitch_estimator_mips.c", - "codecs/isac/fix/source/transform_mips.c", - ] - sources -= [ - "codecs/isac/fix/source/lattice_c.c", - "codecs/isac/fix/source/pitch_estimator_c.c", - ] - if (mips_dsp_rev > 0) { - sources += [ "codecs/isac/fix/source/filterbanks_mips.c" ] - } - if (mips_dsp_rev > 1) { - sources += [ - "codecs/isac/fix/source/lpc_masking_model_mips.c", - "codecs/isac/fix/source/pitch_filter_mips.c", - ] - sources -= [ "codecs/isac/fix/source/pitch_filter_c.c" ] - } - } -} - -if (rtc_build_with_neon) { - rtc_static_library("isac_neon") { - sources = [ - "codecs/isac/fix/source/entropy_coding_neon.c", - "codecs/isac/fix/source/filterbanks_neon.c", - "codecs/isac/fix/source/filters_neon.c", - "codecs/isac/fix/source/lattice_neon.c", - "codecs/isac/fix/source/transform_neon.c", - ] - - if (current_cpu != "arm64") { - # Enable compilation for the NEON instruction set. This is needed - # since //build/config/arm.gni only enables NEON for iOS, not Android. - # This provides the same functionality as webrtc/build/arm_neon.gypi. - suppressed_configs += [ "//build/config/compiler:compiler_arm_fpu" ] - cflags = [ "-mfpu=neon" ] - } - - # Disable LTO on NEON targets due to compiler bug. - # TODO(fdegans): Enable this. See crbug.com/408997. - if (rtc_use_lto) { - cflags -= [ - "-flto", - "-ffat-lto-objects", - ] - } - - deps = [ - ":isac_fix_c", - "../../base:rtc_base_approved", - "../../common_audio", - ] - } -} - -config("pcm16b_config") { - include_dirs = [ - "../../..", - "codecs/pcm16b/include", - ] -} - -rtc_static_library("pcm16b") { - sources = [ - "codecs/pcm16b/audio_decoder_pcm16b.cc", - "codecs/pcm16b/audio_decoder_pcm16b.h", - "codecs/pcm16b/audio_encoder_pcm16b.cc", - "codecs/pcm16b/audio_encoder_pcm16b.h", - ] - - deps = [ - ":audio_decoder_interface", - ":audio_encoder_interface", - ":g711", - "../..:webrtc_common", - "../../base:rtc_base_approved", - ] - public_deps = [ - ":pcm16b_c", - ] - public_configs = [ ":pcm16b_config" ] -} - -rtc_static_library("pcm16b_c") { - visibility = [ ":*" ] # Only targets in this file can depend on this. - sources = [ - "codecs/pcm16b/pcm16b.c", - "codecs/pcm16b/pcm16b.h", - ] - - public_configs = [ ":pcm16b_config" ] - deps = [ - "../..:webrtc_common", - ] -} - -config("opus_config") { - include_dirs = [ "../../.." ] -} - -rtc_static_library("webrtc_opus") { - sources = [ - "codecs/opus/audio_decoder_opus.cc", - "codecs/opus/audio_decoder_opus.h", - "codecs/opus/audio_encoder_opus.cc", - "codecs/opus/audio_encoder_opus.h", - ] - - deps = [ - ":audio_decoder_interface", - ":audio_encoder_interface", - ":audio_network_adaptor", - "../..:webrtc_common", - "../../base:rtc_base_approved", - "../../base:rtc_numerics", - "../../common_audio", - "../../system_wrappers", - ] - public_deps = [ - ":webrtc_opus_c", - ] - - defines = [] - if (rtc_opus_variable_complexity) { - defines += [ "WEBRTC_OPUS_VARIABLE_COMPLEXITY=1" ] - } else { - defines += [ "WEBRTC_OPUS_VARIABLE_COMPLEXITY=0" ] - } - - if (rtc_build_opus) { - public_deps += [ rtc_opus_dir ] - } else if (build_with_mozilla) { - include_dirs = [ getenv("DIST") + "/include/opus" ] - } -} - -rtc_static_library("webrtc_opus_c") { - visibility = [ ":*" ] # Only targets in this file can depend on this. - sources = [ - "codecs/opus/opus_inst.h", - "codecs/opus/opus_interface.c", - "codecs/opus/opus_interface.h", - ] - - if (rtc_build_opus) { - public_deps = [ - rtc_opus_dir, - ] - } else if (build_with_mozilla) { - include_dirs = [ getenv("DIST") + "/include/opus" ] - } - - deps = [ - "../..:webrtc_common", - "../../base:rtc_base_approved", - ] -} - -if (rtc_enable_protobuf) { - proto_library("ana_debug_dump_proto") { - sources = [ - "audio_network_adaptor/debug_dump.proto", - ] - proto_out_dir = "webrtc/modules/audio_coding/audio_network_adaptor" - } - proto_library("ana_config_proto") { - sources = [ - "audio_network_adaptor/config.proto", - ] - proto_out_dir = "webrtc/modules/audio_coding/audio_network_adaptor" - } -} - -rtc_static_library("audio_network_adaptor") { - sources = [ - "audio_network_adaptor/audio_network_adaptor.cc", - "audio_network_adaptor/audio_network_adaptor_impl.cc", - "audio_network_adaptor/audio_network_adaptor_impl.h", - "audio_network_adaptor/bitrate_controller.cc", - "audio_network_adaptor/bitrate_controller.h", - "audio_network_adaptor/channel_controller.cc", - "audio_network_adaptor/channel_controller.h", - "audio_network_adaptor/controller.cc", - "audio_network_adaptor/controller.h", - "audio_network_adaptor/controller_manager.cc", - "audio_network_adaptor/controller_manager.h", - "audio_network_adaptor/debug_dump_writer.cc", - "audio_network_adaptor/debug_dump_writer.h", - "audio_network_adaptor/dtx_controller.cc", - "audio_network_adaptor/dtx_controller.h", - "audio_network_adaptor/fec_controller.cc", - "audio_network_adaptor/fec_controller.h", - "audio_network_adaptor/frame_length_controller.cc", - "audio_network_adaptor/frame_length_controller.h", - "audio_network_adaptor/include/audio_network_adaptor.h", - ] - - deps = [ - "../..:webrtc_common", - "../../base:rtc_base_approved", - "../../common_audio", - "../../system_wrappers", - ] - - if (rtc_enable_protobuf) { - deps += [ - ":ana_config_proto", - ":ana_debug_dump_proto", - ] - defines = [ "WEBRTC_AUDIO_NETWORK_ADAPTOR_DEBUG_DUMP" ] - } -} - -rtc_static_library("neteq") { - # TODO(kjellander): Remove (bugs.webrtc.org/6828) - # Cyclic dependency with :audio_coding if enabled. - check_includes = false - - sources = [ - "neteq/accelerate.cc", - "neteq/accelerate.h", - "neteq/audio_decoder_impl.cc", - "neteq/audio_decoder_impl.h", - "neteq/audio_multi_vector.cc", - "neteq/audio_multi_vector.h", - "neteq/audio_vector.cc", - "neteq/audio_vector.h", - "neteq/background_noise.cc", - "neteq/background_noise.h", - "neteq/buffer_level_filter.cc", - "neteq/buffer_level_filter.h", - "neteq/comfort_noise.cc", - "neteq/comfort_noise.h", - "neteq/cross_correlation.cc", - "neteq/cross_correlation.h", - "neteq/decision_logic.cc", - "neteq/decision_logic.h", - "neteq/decision_logic_fax.cc", - "neteq/decision_logic_fax.h", - "neteq/decision_logic_normal.cc", - "neteq/decision_logic_normal.h", - "neteq/decoder_database.cc", - "neteq/decoder_database.h", - "neteq/defines.h", - "neteq/delay_manager.cc", - "neteq/delay_manager.h", - "neteq/delay_peak_detector.cc", - "neteq/delay_peak_detector.h", - "neteq/dsp_helper.cc", - "neteq/dsp_helper.h", - "neteq/dtmf_buffer.cc", - "neteq/dtmf_buffer.h", - "neteq/dtmf_tone_generator.cc", - "neteq/dtmf_tone_generator.h", - "neteq/expand.cc", - "neteq/expand.h", - "neteq/include/neteq.h", - "neteq/merge.cc", - "neteq/merge.h", - "neteq/nack_tracker.cc", - "neteq/nack_tracker.h", - "neteq/neteq.cc", - "neteq/neteq_impl.cc", - "neteq/neteq_impl.h", - "neteq/normal.cc", - "neteq/normal.h", - "neteq/packet.cc", - "neteq/packet.h", - "neteq/packet_buffer.cc", - "neteq/packet_buffer.h", - "neteq/post_decode_vad.cc", - "neteq/post_decode_vad.h", - "neteq/preemptive_expand.cc", - "neteq/preemptive_expand.h", - "neteq/random_vector.cc", - "neteq/random_vector.h", - "neteq/red_payload_splitter.cc", - "neteq/red_payload_splitter.h", - "neteq/rtcp.cc", - "neteq/rtcp.h", - "neteq/statistics_calculator.cc", - "neteq/statistics_calculator.h", - "neteq/sync_buffer.cc", - "neteq/sync_buffer.h", - "neteq/tick_timer.cc", - "neteq/tick_timer.h", - "neteq/time_stretch.cc", - "neteq/time_stretch.h", - "neteq/timestamp_scaler.cc", - "neteq/timestamp_scaler.h", - ] - - deps = [ - ":audio_decoder_factory_interface", - ":audio_decoder_interface", - ":audio_format", - ":builtin_audio_decoder_factory", - ":cng", - ":g711", - ":isac_fix", - ":pcm16b", - ":rent_a_codec", - "../..:webrtc_common", - "../../base:gtest_prod", - "../../base:rtc_base_approved", - "../../common_audio", - "../../system_wrappers", - ] - - defines = [] - - if (rtc_include_ilbc) { - defines += [ "WEBRTC_CODEC_ILBC" ] - deps += [ ":ilbc" ] - } - if (rtc_include_opus) { - defines += [ "WEBRTC_CODEC_OPUS" ] - deps += [ ":webrtc_opus" ] - } - if (!build_with_mozilla) { - if (current_cpu == "arm") { - defines += [ "WEBRTC_CODEC_ISACFX" ] - deps += [ ":isac_fix" ] - } else { - defines += [ "WEBRTC_CODEC_ISAC" ] - deps += [ ":isac" ] - } - defines += [ "WEBRTC_CODEC_G722" ] - deps += [ ":g722" ] - } -} - -# Although providing only test support, this target must be outside of the -# rtc_include_tests conditional. The reason is that it supports fuzzer tests -# that ultimately are built and run as a part of the Chromium ecosystem, which -# does not set the rtc_include_tests flag. -rtc_source_set("neteq_test_minimal") { - testonly = true - - # TODO(kjellander): Remove (bugs.webrtc.org/6828) - # Has cyclic dependency with :neteq_unittest_tools - check_includes = false - - sources = [ - "neteq/tools/encode_neteq_input.cc", - "neteq/tools/encode_neteq_input.h", - "neteq/tools/neteq_test.cc", - "neteq/tools/neteq_test.h", - ] - - if (!build_with_chromium && is_clang) { - # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). - suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] - } - - deps = [ - ":audio_encoder_interface", - ":builtin_audio_decoder_factory", - ":neteq", - "../..:webrtc_common", - "../../base:rtc_base_approved", - ] -} - -if (rtc_include_tests) { - group("audio_coding_tests") { - testonly = true - public_deps = [ - ":RTPchange", - ":RTPencode", - ":RTPjitter", - ":RTPtimeshift", - ":acm_receive_test", - ":acm_send_test", - ":audio_codec_speed_tests", - ":audio_decoder_unittests", - ":audio_decoder_unittests", - ":delay_test", - ":g711_test", - ":g722_test", - ":ilbc_test", - ":insert_packet_with_timing", - ":isac_api_test", - ":isac_fix_test", - ":isac_switch_samprate_test", - ":isac_test", - ":neteq_ilbc_quality_test", - ":neteq_isac_quality_test", - ":neteq_opus_quality_test", - ":neteq_pcmu_quality_test", - ":neteq_speed_test", - ":rtp_analyze", - ":rtpcat", - ":webrtc_opus_fec_test", - ] - if (rtc_enable_protobuf) { - public_deps += [ ":neteq_rtpplay" ] - } - } - - rtc_source_set("audio_coding_perf_tests") { - testonly = true - sources = [ - "codecs/opus/opus_complexity_unittest.cc", - "neteq/test/neteq_performance_unittest.cc", - ] - deps = [ - ":neteq_test_support", - ":neteq_unittest_tools", - ":webrtc_opus", - "../..:webrtc_common", - "../../base:rtc_base_approved", - "../../system_wrappers:system_wrappers", - "../../test:test_support", - ] - if (!build_with_chromium && is_clang) { - # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). - suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] - } - } - - rtc_source_set("acm_receive_test") { - testonly = true - sources = [ - "acm2/acm_receive_test.cc", - "acm2/acm_receive_test.h", - ] - - defines = audio_coding_defines - - deps = audio_coding_deps + [ - ":audio_coding", - ":audio_format_conversion", - ":audio_decoder_factory_interface", - ":builtin_audio_decoder_factory", - ":neteq_unittest_tools", - "../../base:rtc_base_approved", - "../../test:test_support", - "//testing/gtest", - ] - } - - rtc_source_set("acm_send_test") { - testonly = true - sources = [ - "acm2/acm_send_test.cc", - "acm2/acm_send_test.h", - ] - - defines = audio_coding_defines - - deps = audio_coding_deps + [ - ":audio_coding", - ":audio_decoder_interface", - ":audio_encoder_interface", - ":neteq_unittest_tools", - "../../base:rtc_base_approved", - "../../test:test_support", - "//testing/gtest", - ] - } - - rtc_executable("delay_test") { - testonly = true - sources = [ - "test/Channel.cc", - "test/PCMFile.cc", - "test/delay_test.cc", - "test/utility.cc", - ] - - deps = [ - ":audio_coding", - ":audio_format_conversion", - "../../:webrtc_common", - "../../base:rtc_base_approved", - "../../system_wrappers", - "../../system_wrappers:system_wrappers_default", - "../../test:test_support", - "../rtp_rtcp", - "//testing/gtest", - "//third_party/gflags:gflags", - ] - } # delay_test - - rtc_executable("insert_packet_with_timing") { - testonly = true - sources = [ - "test/Channel.cc", - "test/PCMFile.cc", - "test/insert_packet_with_timing.cc", - ] - - if (!build_with_chromium && is_clang) { - # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). - suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] - } - - deps = [ - ":audio_coding", - ":audio_format_conversion", - "../../:webrtc_common", - "../../base:rtc_base_approved", - "../../system_wrappers", - "../../system_wrappers:system_wrappers_default", - "../../test:test_support", - "../rtp_rtcp", - "//testing/gtest", - "//third_party/gflags:gflags", - ] - } # insert_packet_with_timing - - audio_decoder_unittests_resources = - [ "//resources/audio_coding/testfile32kHz.pcm" ] - - if (is_ios) { - bundle_data("audio_decoder_unittests_bundle_data") { - testonly = true - sources = audio_decoder_unittests_resources - outputs = [ - "{{bundle_resources_dir}}/{{source_file_part}}", - ] - } - } - - rtc_test("audio_decoder_unittests") { - testonly = true - sources = [ - "neteq/audio_decoder_unittest.cc", - ] - - if (!build_with_chromium && is_clang) { - # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). - suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] - } - - deps = [] - - defines = neteq_defines - - deps += audio_coding_deps - deps += [ - ":audio_decoder_interface", - ":isac", - ":isac_fix", - ":neteq", - ":neteq_unittest_tools", - "../../common_audio", - "../../test:test_main", - "//testing/gtest", - ] - - data = audio_decoder_unittests_resources - - if (is_android) { - deps += [ "//testing/android/native_test:native_test_native_code" ] - shard_timeout = 900 - } - if (is_ios) { - deps += [ ":audio_decoder_unittests_bundle_data" ] - } - } # audio_decoder_unittests - - if (rtc_enable_protobuf) { - proto_library("neteq_unittest_proto") { - sources = [ - "neteq/neteq_unittest.proto", - ] - proto_out_dir = "webrtc/audio_coding/neteq" - } - - rtc_static_library("rtc_event_log_source") { - testonly = true - - # TODO(kjellander): Remove (bugs.webrtc.org/6828) - # Needs call.h to be moved to webrtc/api first. - check_includes = false - - sources = [ - "neteq/tools/rtc_event_log_source.cc", - "neteq/tools/rtc_event_log_source.h", - ] - - if (!build_with_chromium && is_clang) { - # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). - suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] - } - - deps = [ - "../../base:rtc_base_approved", - "../../logging:rtc_event_log_parser", - ] - public_deps = [ - "../../logging:rtc_event_log_proto", - ] - } - - rtc_test("neteq_rtpplay") { - testonly = true - defines = [] - deps = [] - sources = [ - "neteq/tools/neteq_rtpplay.cc", - ] - - if (!build_with_chromium && is_clang) { - # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). - suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] - } - - if (is_win) { - cflags = [ - # TODO(kjellander): bugs.webrtc.org/261: Fix this warning. - "/wd4373", # virtual function override. - ] - } - - deps += [ - ":neteq", - ":neteq_unittest_tools", - "../..:webrtc_common", - "../../base:rtc_base_approved", - "../../system_wrappers:system_wrappers_default", - "../../test:test_support", - "//third_party/gflags", - ] - } - } - - rtc_test("audio_codec_speed_tests") { - testonly = true - defines = [] - deps = [] - sources = [ - "codecs/isac/fix/test/isac_speed_test.cc", - "codecs/opus/opus_speed_test.cc", - "codecs/tools/audio_codec_speed_test.cc", - "codecs/tools/audio_codec_speed_test.h", - ] - - if (!build_with_chromium && is_clang) { - # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). - suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] - } - - if (is_android) { - deps += [ "//testing/android/native_test:native_test_native_code" ] - shard_timeout = 900 - } - - deps += [ - ":isac_fix", - ":webrtc_opus", - "../..:webrtc_common", - "../../base:rtc_base_approved", - "../../system_wrappers:system_wrappers_default", - "../../test:test_main", - "../audio_processing", - "//testing/gtest", - ] - } - - rtc_source_set("neteq_test_support") { - testonly = true - sources = [ - "neteq/tools/neteq_external_decoder_test.cc", - "neteq/tools/neteq_external_decoder_test.h", - "neteq/tools/neteq_performance_test.cc", - "neteq/tools/neteq_performance_test.h", - ] - - if (!build_with_chromium && is_clang) { - # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). - suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] - } - - deps = [ - ":audio_decoder_interface", - ":builtin_audio_decoder_factory", - ":neteq", - ":neteq_unittest_tools", - ":pcm16b", - "../..:webrtc_common", - "../../base:rtc_base_approved", - "../../system_wrappers", - "../../test:test_support", - "//testing/gtest", - ] - } - - rtc_source_set("neteq_quality_test_support") { - testonly = true - sources = [ - "neteq/tools/neteq_quality_test.cc", - "neteq/tools/neteq_quality_test.h", - ] - - if (!build_with_chromium && is_clang) { - # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). - suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] - } - - deps = [ - ":builtin_audio_decoder_factory", - ":neteq", - ":neteq_unittest_tools", - "../..:webrtc_common", - "../../base:rtc_base_approved", - "../../test:test_support", - "//testing/gtest", - "//third_party/gflags", - ] - } - - config("neteq_unittest_tools_config") { - include_dirs = [ "tools" ] - } - - rtc_source_set("neteq_unittest_tools") { - testonly = true - sources = [ - "neteq/tools/audio_checksum.h", - "neteq/tools/audio_loop.cc", - "neteq/tools/audio_loop.h", - "neteq/tools/audio_sink.cc", - "neteq/tools/audio_sink.h", - "neteq/tools/constant_pcm_packet_source.cc", - "neteq/tools/constant_pcm_packet_source.h", - "neteq/tools/fake_decode_from_file.cc", - "neteq/tools/fake_decode_from_file.h", - "neteq/tools/input_audio_file.cc", - "neteq/tools/input_audio_file.h", - "neteq/tools/neteq_input.h", - "neteq/tools/neteq_replacement_input.cc", - "neteq/tools/neteq_replacement_input.h", - "neteq/tools/output_audio_file.h", - "neteq/tools/output_wav_file.h", - "neteq/tools/packet.cc", - "neteq/tools/packet.h", - "neteq/tools/packet_source.cc", - "neteq/tools/packet_source.h", - "neteq/tools/resample_input_audio_file.cc", - "neteq/tools/resample_input_audio_file.h", - "neteq/tools/rtp_file_source.cc", - "neteq/tools/rtp_file_source.h", - "neteq/tools/rtp_generator.cc", - "neteq/tools/rtp_generator.h", - ] - - public_configs = [ ":neteq_unittest_tools_config" ] - - if (!build_with_chromium && is_clang) { - # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). - suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] - } - - deps = [ - ":audio_decoder_interface", - ":audio_encoder_interface", - ":pcm16b", - "../..:webrtc_common", - "../../base:rtc_base_approved", - "../../common_audio", - "../../test:rtp_test_utils", - "../rtp_rtcp", - ] - - public_deps = [ - ":neteq_test_minimal", - ] - - if (rtc_enable_protobuf) { - sources += [ - "neteq/tools/neteq_packet_source_input.cc", - "neteq/tools/neteq_packet_source_input.h", - ] - deps += [ ":rtc_event_log_source" ] - } - } - - rtc_source_set("neteq_test_tools") { - testonly = true - sources = [ - "neteq/test/NETEQTEST_DummyRTPpacket.cc", - "neteq/test/NETEQTEST_DummyRTPpacket.h", - "neteq/test/NETEQTEST_RTPpacket.cc", - "neteq/test/NETEQTEST_RTPpacket.h", - ] - - deps = [ - ":cng", - ":g711", - ":g722", - ":ilbc", - ":isac", - ":pcm16b", - "../..:webrtc_common", - "//testing/gtest", - ] - - include_dirs = [ - "neteq/include", - "neteq/test", - "../../", - ] - - if (is_win) { - cflags = [ - # Disable warnings to enable Win64 build, issue 1323. - "/wd4267", # size_t to int truncation - ] - } - } - - config("RTPencode_config") { - defines = [ - "CODEC_ILBC", - "CODEC_PCM16B", - "CODEC_G711", - "CODEC_G722", - "CODEC_ISAC", - "CODEC_PCM16B_WB", - "CODEC_ISAC_SWB", - "CODEC_PCM16B_32KHZ", - "CODEC_PCM16B_48KHZ", - "CODEC_CNGCODEC8", - "CODEC_CNGCODEC16", - "CODEC_CNGCODEC32", - "CODEC_ATEVENT_DECODE", - "CODEC_RED", - "CODEC_OPUS", - ] - } - - rtc_executable("RTPencode") { - testonly = true - - deps = [ - # TODO(hlundin): Make RTPencode use ACM to encode files. - ":cng", - ":g711", - ":g722", - ":ilbc", - ":isac", - ":neteq", - ":neteq_test_tools", - ":pcm16b", - ":webrtc_opus", - "../..:webrtc_common", - "../../base:rtc_base_approved", - "../../common_audio", - ] - - configs += [ ":RTPencode_config" ] - - sources = [ - "neteq/test/RTPencode.cc", - ] - - include_dirs = [ - "neteq/include", - "neteq/test", - ] - - if (is_win) { - cflags = [ - # Disable warnings to enable Win64 build, issue 1323. - "/wd4267", # size_t to int truncation - ] - } - } - - rtc_executable("RTPchange") { - testonly = true - - sources = [ - "neteq/test/RTPchange.cc", - ] - - deps = [ - ":neteq_test_tools", - ] - } - - rtc_executable("rtpcat") { - testonly = true - - sources = [ - "neteq/tools/rtpcat.cc", - ] - - deps = [ - "../../base:rtc_base_approved", - "../../system_wrappers:system_wrappers_default", - "../../test:rtp_test_utils", - "//testing/gtest", - ] - } - - rtc_executable("RTPtimeshift") { - testonly = true - - sources = [ - "neteq/test/RTPtimeshift.cc", - ] - - deps = [ - ":neteq_test_tools", - "../../test:test_support", - "//testing/gtest", - ] - } - - rtc_executable("RTPjitter") { - testonly = true - deps = [ - "../..:webrtc_common", - "../../base:rtc_base_approved", - "../../test:test_support", - "//testing/gtest", - ] - sources = [ - "neteq/test/RTPjitter.cc", - ] - } - - rtc_executable("rtp_analyze") { - testonly = true - - sources = [ - "neteq/tools/rtp_analyze.cc", - ] - - deps = [ - ":neteq", - ":neteq_unittest_tools", - ":pcm16b", - "../../system_wrappers:system_wrappers_default", - "//testing/gtest", - "//third_party/gflags:gflags", - ] - - if (!build_with_chromium && is_clang) { - # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). - suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] - } - } - - rtc_executable("neteq_opus_quality_test") { - testonly = true - - sources = [ - "neteq/test/neteq_opus_quality_test.cc", - ] - - deps = [ - ":neteq", - ":neteq_quality_test_support", - ":neteq_unittest_tools", - ":webrtc_opus", - "../../test:test_main", - "//testing/gtest", - "//third_party/gflags", - ] - } - - rtc_executable("neteq_speed_test") { - testonly = true - - sources = [ - "neteq/test/neteq_speed_test.cc", - ] - - deps = [ - ":neteq", - ":neteq_test_support", - "../..:webrtc_common", - "../../system_wrappers:system_wrappers_default", - "../../test:test_support", - "//third_party/gflags", - ] - } - - rtc_executable("neteq_ilbc_quality_test") { - testonly = true - - sources = [ - "neteq/test/neteq_ilbc_quality_test.cc", - ] - - deps = [ - ":ilbc", - ":neteq", - ":neteq_quality_test_support", - ":neteq_unittest_tools", - "../..:webrtc_common", - "../../base:rtc_base_approved", - "../../system_wrappers:system_wrappers_default", - "../../test:test_main", - "//testing/gtest", - "//third_party/gflags", - ] - } - - rtc_executable("neteq_isac_quality_test") { - testonly = true - - sources = [ - "neteq/test/neteq_isac_quality_test.cc", - ] - - deps = [ - ":isac_fix", - ":neteq", - ":neteq_quality_test_support", - "../../base:rtc_base_approved", - "../../test:test_main", - "//testing/gtest", - "//third_party/gflags", - ] - } - - rtc_executable("neteq_pcmu_quality_test") { - testonly = true - - sources = [ - "neteq/test/neteq_pcmu_quality_test.cc", - ] - - deps = [ - ":g711", - ":neteq", - ":neteq_quality_test_support", - "../../base:rtc_base_approved", - "../../test:test_main", - "//testing/gtest", - "//third_party/gflags", - ] - } - - rtc_executable("isac_fix_test") { - testonly = true - - sources = [ - "codecs/isac/fix/test/kenny.cc", - ] - - deps = [ - ":isac_fix", - "../../test:test_support", - ] - - if (is_win) { - cflags = [ - # Disable warnings to enable Win64 build, issue 1323. - "/wd4267", # size_t to int truncation - ] - } - } - - config("isac_test_warnings_config") { - if (is_win && is_clang) { - cflags = [ - # Disable warnings failing when compiling with Clang on Windows. - # https://bugs.chromium.org/p/webrtc/issues/detail?id=5366 - "-Wno-format", - ] - } - } - - rtc_source_set("isac_test_util") { - testonly = true - sources = [ - "codecs/isac/main/util/utility.c", - ] - } - - rtc_executable("isac_test") { - testonly = true - - sources = [ - "codecs/isac/main/test/simpleKenny.c", - ] - - include_dirs = [ - "codecs/isac/main/include", - "codecs/isac/main/test", - "codecs/isac/main/util", - ] - - deps = [ - ":isac", - ":isac_test_util", - "../../base:rtc_base_approved", - ] - - configs += [ ":isac_test_warnings_config" ] - } - - rtc_executable("g711_test") { - testonly = true - - sources = [ - "codecs/g711/test/testG711.cc", - ] - - deps = [ - ":g711", - ] - } - - rtc_executable("g722_test") { - testonly = true - - sources = [ - "codecs/g722/test/testG722.cc", - ] - - deps = [ - ":g722", - "../..:webrtc_common", - ] - } - - rtc_executable("isac_api_test") { - testonly = true - - sources = [ - "codecs/isac/main/test/ReleaseTest-API/ReleaseTest-API.cc", - ] - - deps = [ - ":isac", - ":isac_test_util", - "../../base:rtc_base_approved", - ] - - include_dirs = [ - "codecs/isac/main/include", - "codecs/isac/main/test", - "codecs/isac/main/util", - ] - } - - rtc_executable("isac_switch_samprate_test") { - testonly = true - - sources = [ - "codecs/isac/main/test/SwitchingSampRate/SwitchingSampRate.cc", - ] - - deps = [ - ":isac", - ":isac_test_util", - ] - - include_dirs = [ - "codecs/isac/main/include", - "codecs/isac/main/test", - "codecs/isac/main/util", - "../../common_audio/signal_processing/include", - ] - } - - rtc_executable("ilbc_test") { - testonly = true - - sources = [ - "codecs/ilbc/test/iLBC_test.c", - ] - - deps = [ - ":ilbc", - ] - } - - rtc_executable("webrtc_opus_fec_test") { - testonly = true - - sources = [ - "codecs/opus/opus_fec_test.cc", - ] - - deps = [ - ":webrtc_opus", - "../../base:rtc_base_approved", - "../../common_audio", - "../../test:test_main", - "//testing/gtest", - ] - - if (!build_with_chromium && is_clang) { - # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). - suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] - } - } - - rtc_source_set("audio_coding_unittests") { - testonly = true - - sources = [ - "acm2/acm_receiver_unittest.cc", - "acm2/audio_coding_module_unittest.cc", - "acm2/call_statistics_unittest.cc", - "acm2/codec_manager_unittest.cc", - "acm2/rent_a_codec_unittest.cc", - "audio_network_adaptor/audio_network_adaptor_impl_unittest.cc", - "audio_network_adaptor/bitrate_controller_unittest.cc", - "audio_network_adaptor/channel_controller_unittest.cc", - "audio_network_adaptor/controller_manager_unittest.cc", - "audio_network_adaptor/dtx_controller_unittest.cc", - "audio_network_adaptor/fec_controller_unittest.cc", - "audio_network_adaptor/frame_length_controller_unittest.cc", - "audio_network_adaptor/mock/mock_controller.h", - "audio_network_adaptor/mock/mock_controller_manager.h", - "codecs/audio_decoder_factory_unittest.cc", - "codecs/cng/audio_encoder_cng_unittest.cc", - "codecs/cng/cng_unittest.cc", - "codecs/ilbc/ilbc_unittest.cc", - "codecs/isac/fix/source/filterbanks_unittest.cc", - "codecs/isac/fix/source/filters_unittest.cc", - "codecs/isac/fix/source/lpc_masking_model_unittest.cc", - "codecs/isac/fix/source/transform_unittest.cc", - "codecs/isac/main/source/audio_encoder_isac_unittest.cc", - "codecs/isac/main/source/isac_unittest.cc", - "codecs/isac/unittest.cc", - "codecs/legacy_encoded_audio_frame_unittest.cc", - "codecs/mock/mock_audio_encoder.cc", - "codecs/opus/audio_encoder_opus_unittest.cc", - "codecs/opus/opus_unittest.cc", - "codecs/red/audio_encoder_copy_red_unittest.cc", - "neteq/audio_multi_vector_unittest.cc", - "neteq/audio_vector_unittest.cc", - "neteq/background_noise_unittest.cc", - "neteq/buffer_level_filter_unittest.cc", - "neteq/comfort_noise_unittest.cc", - "neteq/decision_logic_unittest.cc", - "neteq/decoder_database_unittest.cc", - "neteq/delay_manager_unittest.cc", - "neteq/delay_peak_detector_unittest.cc", - "neteq/dsp_helper_unittest.cc", - "neteq/dtmf_buffer_unittest.cc", - "neteq/dtmf_tone_generator_unittest.cc", - "neteq/expand_unittest.cc", - "neteq/merge_unittest.cc", - "neteq/mock/mock_audio_decoder.h", - "neteq/mock/mock_buffer_level_filter.h", - "neteq/mock/mock_decoder_database.h", - "neteq/mock/mock_delay_manager.h", - "neteq/mock/mock_delay_peak_detector.h", - "neteq/mock/mock_dtmf_buffer.h", - "neteq/mock/mock_dtmf_tone_generator.h", - "neteq/mock/mock_expand.h", - "neteq/mock/mock_external_decoder_pcm16b.h", - "neteq/mock/mock_packet_buffer.h", - "neteq/mock/mock_red_payload_splitter.h", - "neteq/nack_tracker_unittest.cc", - "neteq/neteq_external_decoder_unittest.cc", - "neteq/neteq_impl_unittest.cc", - "neteq/neteq_network_stats_unittest.cc", - "neteq/neteq_stereo_unittest.cc", - "neteq/neteq_unittest.cc", - "neteq/normal_unittest.cc", - "neteq/packet_buffer_unittest.cc", - "neteq/post_decode_vad_unittest.cc", - "neteq/random_vector_unittest.cc", - "neteq/red_payload_splitter_unittest.cc", - "neteq/sync_buffer_unittest.cc", - "neteq/tick_timer_unittest.cc", - "neteq/time_stretch_unittest.cc", - "neteq/timestamp_scaler_unittest.cc", - "neteq/tools/input_audio_file_unittest.cc", - "neteq/tools/packet_unittest.cc", - ] - - deps = [ - ":acm_receive_test", - ":acm_send_test", - ":audio_coding", - ":audio_decoder_interface", - ":audio_encoder_interface", - ":audio_format_conversion", - ":audio_network_adaptor", - ":builtin_audio_decoder_factory", - ":cng", - ":g711", - ":ilbc", - ":isac_c", - ":isac_fix", - ":neteq", - ":neteq_test_support", - ":neteq_unittest_tools", - ":pcm16b", - ":red", - ":rent_a_codec", - ":webrtc_opus", - "../..:webrtc_common", - "../../base:rtc_base", - "../../base:rtc_base_approved", - "../../base:rtc_base_tests_utils", - "../../common_audio", - "../../system_wrappers:system_wrappers", - "../../test:field_trial", - "../../test:rtp_test_utils", - "../../test:test_common", - "../../test:test_support", - "//testing/gmock", - "//testing/gtest", - "//third_party/gflags", - ] - - defines = audio_coding_defines - - if (rtc_enable_protobuf) { - defines += [ - "WEBRTC_AUDIO_NETWORK_ADAPTOR_DEBUG_DUMP", - "WEBRTC_NETEQ_UNITTEST_BITEXACT", - ] - deps += [ - ":ana_config_proto", - ":neteq_unittest_proto", - ] - } - - if (!build_with_chromium && is_clang) { - # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). - suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] - } - } -} diff --git a/WebRtc.NET/gn/webrtc/modules/audio_processing/BUILD.gn b/WebRtc.NET/gn/webrtc/modules/audio_processing/BUILD.gn deleted file mode 100644 index fa2ea947..00000000 --- a/WebRtc.NET/gn/webrtc/modules/audio_processing/BUILD.gn +++ /dev/null @@ -1,727 +0,0 @@ -# Copyright (c) 2014 The WebRTC project authors. All Rights Reserved. -# -# Use of this source code is governed by a BSD-style license -# that can be found in the LICENSE file in the root of the source -# tree. An additional intellectual property rights grant can be found -# in the file PATENTS. All contributing project authors may -# be found in the AUTHORS file in the root of the source tree. - -import("//build/config/arm.gni") -import("//third_party/protobuf/proto_library.gni") -import("../../build/webrtc.gni") - -declare_args() { - # Disables the usual mode where we trust the reported system delay - # values the AEC receives. The corresponding define is set appropriately - # in the code, but it can be force-enabled here for testing. - aec_untrusted_delay_for_testing = false -} - -rtc_static_library("audio_processing") { - sources = [ - "aec/aec_core.cc", - "aec/aec_core.h", - "aec/aec_core_optimized_methods.h", - "aec/aec_resampler.cc", - "aec/aec_resampler.h", - "aec/echo_cancellation.cc", - "aec/echo_cancellation.h", - "aec3/aec3_constants.h", - "aec3/block_framer.cc", - "aec3/block_framer.h", - "aec3/block_processor.cc", - "aec3/block_processor.h", - "aec3/cascaded_biquad_filter.cc", - "aec3/cascaded_biquad_filter.h", - "aec3/echo_canceller3.cc", - "aec3/echo_canceller3.h", - "aec3/frame_blocker.cc", - "aec3/frame_blocker.h", - "aecm/aecm_core.cc", - "aecm/aecm_core.h", - "aecm/echo_control_mobile.cc", - "aecm/echo_control_mobile.h", - "agc/agc.cc", - "agc/agc.h", - "agc/agc_manager_direct.cc", - "agc/agc_manager_direct.h", - "agc/gain_map_internal.h", - "agc/loudness_histogram.cc", - "agc/loudness_histogram.h", - "agc/utility.cc", - "agc/utility.h", - "audio_buffer.cc", - "audio_buffer.h", - "audio_processing_impl.cc", - "audio_processing_impl.h", - "beamformer/array_util.cc", - "beamformer/array_util.h", - "beamformer/complex_matrix.h", - "beamformer/covariance_matrix_generator.cc", - "beamformer/covariance_matrix_generator.h", - "beamformer/matrix.h", - "beamformer/nonlinear_beamformer.cc", - "beamformer/nonlinear_beamformer.h", - "common.h", - "echo_cancellation_impl.cc", - "echo_cancellation_impl.h", - "echo_control_mobile_impl.cc", - "echo_control_mobile_impl.h", - "echo_detector/circular_buffer.cc", - "echo_detector/circular_buffer.h", - "echo_detector/mean_variance_estimator.cc", - "echo_detector/mean_variance_estimator.h", - "echo_detector/moving_max.cc", - "echo_detector/moving_max.h", - "echo_detector/normalized_covariance_estimator.cc", - "echo_detector/normalized_covariance_estimator.h", - "gain_control_for_experimental_agc.cc", - "gain_control_for_experimental_agc.h", - "gain_control_impl.cc", - "gain_control_impl.h", - "include/audio_processing.cc", - "include/audio_processing.h", - "include/config.cc", - "include/config.h", - "level_controller/biquad_filter.cc", - "level_controller/biquad_filter.h", - "level_controller/down_sampler.cc", - "level_controller/down_sampler.h", - "level_controller/gain_applier.cc", - "level_controller/gain_applier.h", - "level_controller/gain_selector.cc", - "level_controller/gain_selector.h", - "level_controller/level_controller.cc", - "level_controller/level_controller.h", - "level_controller/level_controller_constants.h", - "level_controller/noise_level_estimator.cc", - "level_controller/noise_level_estimator.h", - "level_controller/noise_spectrum_estimator.cc", - "level_controller/noise_spectrum_estimator.h", - "level_controller/peak_level_estimator.cc", - "level_controller/peak_level_estimator.h", - "level_controller/saturating_gain_estimator.cc", - "level_controller/saturating_gain_estimator.h", - "level_controller/signal_classifier.cc", - "level_controller/signal_classifier.h", - "level_estimator_impl.cc", - "level_estimator_impl.h", - "logging/apm_data_dumper.cc", - "logging/apm_data_dumper.h", - "low_cut_filter.cc", - "low_cut_filter.h", - "noise_suppression_impl.cc", - "noise_suppression_impl.h", - "render_queue_item_verifier.h", - "residual_echo_detector.cc", - "residual_echo_detector.h", - "rms_level.cc", - "rms_level.h", - "splitting_filter.cc", - "splitting_filter.h", - "three_band_filter_bank.cc", - "three_band_filter_bank.h", - "transient/common.h", - "transient/daubechies_8_wavelet_coeffs.h", - "transient/dyadic_decimator.h", - "transient/moving_moments.cc", - "transient/moving_moments.h", - "transient/transient_detector.cc", - "transient/transient_detector.h", - "transient/transient_suppressor.cc", - "transient/transient_suppressor.h", - "transient/wpd_node.cc", - "transient/wpd_node.h", - "transient/wpd_tree.cc", - "transient/wpd_tree.h", - "typing_detection.cc", - "typing_detection.h", - "utility/block_mean_calculator.cc", - "utility/block_mean_calculator.h", - "utility/delay_estimator.cc", - "utility/delay_estimator.h", - "utility/delay_estimator_internal.h", - "utility/delay_estimator_wrapper.cc", - "utility/delay_estimator_wrapper.h", - "utility/ooura_fft.cc", - "utility/ooura_fft.h", - "utility/ooura_fft_tables_common.h", - "vad/common.h", - "vad/gmm.cc", - "vad/gmm.h", - "vad/noise_gmm_tables.h", - "vad/pitch_based_vad.cc", - "vad/pitch_based_vad.h", - "vad/pitch_internal.cc", - "vad/pitch_internal.h", - "vad/pole_zero_filter.cc", - "vad/pole_zero_filter.h", - "vad/standalone_vad.cc", - "vad/standalone_vad.h", - "vad/vad_audio_proc.cc", - "vad/vad_audio_proc.h", - "vad/vad_audio_proc_internal.h", - "vad/vad_circular_buffer.cc", - "vad/vad_circular_buffer.h", - "vad/voice_activity_detector.cc", - "vad/voice_activity_detector.h", - "vad/voice_gmm_tables.h", - "voice_detection_impl.cc", - "voice_detection_impl.h", - ] - - defines = [] - deps = [ - "../..:webrtc_common", - "../../audio/utility:audio_frame_operations", - "../../base:gtest_prod", - "../audio_coding:isac", - ] - public_deps = [ - ":audio_processing_c", - ] - - if (apm_debug_dump) { - defines += [ "WEBRTC_APM_DEBUG_DUMP=1" ] - } else { - defines += [ "WEBRTC_APM_DEBUG_DUMP=0" ] - } - - if (aec_untrusted_delay_for_testing) { - defines += [ "WEBRTC_UNTRUSTED_DELAY" ] - } - - if (rtc_enable_protobuf) { - defines += [ "WEBRTC_AUDIOPROC_DEBUG_DUMP" ] - deps += [ ":audioproc_debug_proto" ] - } - - if (rtc_enable_intelligibility_enhancer) { - defines += [ "WEBRTC_INTELLIGIBILITY_ENHANCER=1" ] - sources += [ - "intelligibility/intelligibility_enhancer.cc", - "intelligibility/intelligibility_enhancer.h", - "intelligibility/intelligibility_utils.cc", - "intelligibility/intelligibility_utils.h", - ] - } else { - defines += [ "WEBRTC_INTELLIGIBILITY_ENHANCER=0" ] - } - - if (rtc_prefer_fixed_point) { - defines += [ "WEBRTC_NS_FIXED" ] - } else { - defines += [ "WEBRTC_NS_FLOAT" ] - } - - if (current_cpu == "x86" || current_cpu == "x64") { - deps += [ ":audio_processing_sse2" ] - } - - if (rtc_build_with_neon) { - deps += [ ":audio_processing_neon" ] - } - - if (current_cpu == "mipsel") { - sources += [ "aecm/aecm_core_mips.cc" ] - if (mips_float_abi == "hard") { - sources += [ - "aec/aec_core_mips.cc", - "utility/ooura_fft_mips.cc", - ] - } - } else { - sources += [ "aecm/aecm_core_c.cc" ] - } - - # TODO(jschuh): Bug 1348: fix this warning. - configs += [ "//build/config/compiler:no_size_t_to_int_warning" ] - - deps += [ - "../../base:rtc_base_approved", - "../../common_audio", - "../../system_wrappers", - ] -} - -rtc_static_library("audio_processing_c") { - visibility = [ ":*" ] # Only targets in this file can depend on this. - sources = [ - "agc/legacy/analog_agc.c", - "agc/legacy/analog_agc.h", - "agc/legacy/digital_agc.c", - "agc/legacy/digital_agc.h", - "agc/legacy/gain_control.h", - ] - - if (rtc_prefer_fixed_point) { - sources += [ - "ns/noise_suppression_x.c", - "ns/noise_suppression_x.h", - "ns/nsx_core.c", - "ns/nsx_core.h", - "ns/nsx_defines.h", - ] - if (current_cpu == "mipsel") { - sources += [ "ns/nsx_core_mips.c" ] - } else { - sources += [ "ns/nsx_core_c.c" ] - } - } else { - sources += [ - "ns/defines.h", - "ns/noise_suppression.c", - "ns/noise_suppression.h", - "ns/ns_core.c", - "ns/ns_core.h", - "ns/windows_private.h", - ] - } - - deps = [ - "../..:webrtc_common", - "../../base:rtc_base_approved", - "../../common_audio", - "../../system_wrappers", - ] -} - -if (rtc_enable_protobuf) { - proto_library("audioproc_debug_proto") { - sources = [ - "debug.proto", - ] - - proto_out_dir = "webrtc/modules/audio_processing" - } -} - -if (current_cpu == "x86" || current_cpu == "x64") { - rtc_static_library("audio_processing_sse2") { - # TODO(ehmaldonado): Remove (bugs.webrtc.org/6828) - # Errors on cyclic dependency with :audio_processing if enabled. - check_includes = false - - sources = [ - "aec/aec_core_sse2.cc", - "utility/ooura_fft_sse2.cc", - "utility/ooura_fft_tables_neon_sse2.h", - ] - - if (is_posix) { - cflags = [ "-msse2" ] - } - - if (apm_debug_dump) { - defines = [ "WEBRTC_APM_DEBUG_DUMP=1" ] - } else { - defines = [ "WEBRTC_APM_DEBUG_DUMP=0" ] - } - } -} - -if (rtc_build_with_neon) { - rtc_static_library("audio_processing_neon") { - # TODO(ehmaldonado): Remove (bugs.webrtc.org/6828) - # Errors on cyclic dependency with :audio_processing if enabled. - check_includes = false - - sources = [ - "aec/aec_core_neon.cc", - "aecm/aecm_core_neon.cc", - "utility/ooura_fft_neon.cc", - "utility/ooura_fft_tables_neon_sse2.h", - ] - - if (current_cpu != "arm64") { - # Enable compilation for the NEON instruction set. This is needed - # since //build/config/arm.gni only enables NEON for iOS, not Android. - # This provides the same functionality as webrtc/build/arm_neon.gypi. - suppressed_configs += [ "//build/config/compiler:compiler_arm_fpu" ] - cflags = [ "-mfpu=neon" ] - } - - # Disable LTO on NEON targets due to compiler bug. - # TODO(fdegans): Enable this. See crbug.com/408997. - if (rtc_use_lto) { - cflags -= [ - "-flto", - "-ffat-lto-objects", - ] - } - - deps = [ - "../../common_audio", - ] - public_deps = [ - ":audio_processing_neon_c", - ] - - if (apm_debug_dump) { - defines = [ "WEBRTC_APM_DEBUG_DUMP=1" ] - } else { - defines = [ "WEBRTC_APM_DEBUG_DUMP=0" ] - } - } - - rtc_static_library("audio_processing_neon_c") { - sources = [ - "ns/nsx_core_neon.c", - ] - - if (current_cpu != "arm64") { - # Enable compilation for the NEON instruction set. This is needed - # since //build/config/arm.gni only enables NEON for iOS, not Android. - # This provides the same functionality as webrtc/build/arm_neon.gypi. - suppressed_configs += [ "//build/config/compiler:compiler_arm_fpu" ] - cflags = [ "-mfpu=neon" ] - } - - # Disable LTO on NEON targets due to compiler bug. - # TODO(fdegans): Enable this. See crbug.com/408997. - if (rtc_use_lto) { - cflags -= [ - "-flto", - "-ffat-lto-objects", - ] - } - deps = [ - ":audio_processing_c", - "../../base:rtc_base_approved", - ] - } -} - -if (rtc_include_tests) { - group("audio_processing_tests") { - testonly = true - public_deps = [ - ":audioproc_test_utils", - ":click_annotate", - ":nonlinear_beamformer_test", - ":transient_suppression_test", - ] - - if (rtc_enable_intelligibility_enhancer) { - public_deps += [ ":intelligibility_proc" ] - } - - if (rtc_enable_protobuf) { - public_deps += [ - ":audioproc_f", - ":audioproc_unittest_proto", - ":unpack_aecdump", - ] - } - } - - rtc_source_set("audio_processing_unittests") { - testonly = true - sources = [ - "aec/echo_cancellation_unittest.cc", - "aec/system_delay_unittest.cc", - "agc/agc_manager_direct_unittest.cc", - "agc/loudness_histogram_unittest.cc", - "agc/mock_agc.h", - "audio_buffer_unittest.cc", - "beamformer/array_util_unittest.cc", - "beamformer/complex_matrix_unittest.cc", - "beamformer/covariance_matrix_generator_unittest.cc", - "beamformer/matrix_unittest.cc", - "beamformer/mock_nonlinear_beamformer.h", - "beamformer/nonlinear_beamformer_unittest.cc", - "config_unittest.cc", - "echo_cancellation_impl_unittest.cc", - "splitting_filter_unittest.cc", - "transient/dyadic_decimator_unittest.cc", - "transient/file_utils.cc", - "transient/file_utils.h", - "transient/file_utils_unittest.cc", - "transient/moving_moments_unittest.cc", - "transient/transient_detector_unittest.cc", - "transient/transient_suppressor_unittest.cc", - "transient/wpd_node_unittest.cc", - "transient/wpd_tree_unittest.cc", - "utility/block_mean_calculator_unittest.cc", - "utility/delay_estimator_unittest.cc", - "vad/gmm_unittest.cc", - "vad/pitch_based_vad_unittest.cc", - "vad/pitch_internal_unittest.cc", - "vad/pole_zero_filter_unittest.cc", - "vad/standalone_vad_unittest.cc", - "vad/vad_audio_proc_unittest.cc", - "vad/vad_circular_buffer_unittest.cc", - "vad/voice_activity_detector_unittest.cc", - ] - - deps = [ - ":audio_processing", - ":audioproc_debug_proto", - ":audioproc_test_utils", - "../..:webrtc_common", - "../../base:gtest_prod", - "../../base:rtc_base", - "../../base:rtc_base_approved", - "../../common_audio:common_audio", - "../../system_wrappers:system_wrappers", - "../../test:test_support", - "../audio_coding:neteq_unittest_tools", - "//testing/gmock", - "//testing/gtest", - ] - - defines = [] - - if (apm_debug_dump) { - defines += [ "WEBRTC_APM_DEBUG_DUMP=1" ] - } else { - defines += [ "WEBRTC_APM_DEBUG_DUMP=0" ] - } - - if (rtc_enable_intelligibility_enhancer) { - defines += [ "WEBRTC_INTELLIGIBILITY_ENHANCER=1" ] - sources += [ - "intelligibility/intelligibility_enhancer_unittest.cc", - "intelligibility/intelligibility_utils_unittest.cc", - ] - } else { - defines += [ "WEBRTC_INTELLIGIBILITY_ENHANCER=0" ] - } - - if (rtc_prefer_fixed_point) { - defines += [ "WEBRTC_AUDIOPROC_FIXED_PROFILE" ] - } else { - defines += [ "WEBRTC_AUDIOPROC_FLOAT_PROFILE" ] - } - - if (rtc_enable_protobuf) { - defines += [ "WEBRTC_AUDIOPROC_DEBUG_DUMP" ] - deps += [ - ":audioproc_protobuf_utils", - ":audioproc_unittest_proto", - ] - sources += [ - "aec3/block_framer_unittest.cc", - "aec3/block_processor_unittest.cc", - "aec3/cascaded_biquad_filter_unittest.cc", - "aec3/echo_canceller3_unittest.cc", - "aec3/frame_blocker_unittest.cc", - "aec3/mock/mock_block_processor.h", - "audio_processing_impl_locking_unittest.cc", - "audio_processing_impl_unittest.cc", - "audio_processing_unittest.cc", - "echo_cancellation_bit_exact_unittest.cc", - "echo_control_mobile_unittest.cc", - "echo_detector/circular_buffer_unittest.cc", - "echo_detector/mean_variance_estimator_unittest.cc", - "echo_detector/moving_max_unittest.cc", - "echo_detector/normalized_covariance_estimator_unittest.cc", - "gain_control_unittest.cc", - "level_controller/level_controller_unittest.cc", - "level_estimator_unittest.cc", - "low_cut_filter_unittest.cc", - "noise_suppression_unittest.cc", - "residual_echo_detector_unittest.cc", - "rms_level_unittest.cc", - "test/bitexactness_tools.cc", - "test/bitexactness_tools.h", - "test/debug_dump_replayer.cc", - "test/debug_dump_replayer.h", - "test/debug_dump_test.cc", - "test/test_utils.h", - "voice_detection_unittest.cc", - ] - } - - if ((!build_with_chromium || is_win) && is_clang) { - # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). - suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] - } - } - - rtc_source_set("audio_processing_perf_tests") { - # Has problems with autogenerated targets on Android and iOS - # Dependency chain (there may also be others): - # //webrtc/modules/audio_processing:audio_processing_perf_tests --> - # //webrtc/modules:modules_unittests --[private]--> - # //webrtc/modules:modules_unittests_apk --> - # //webrtc/modules:modules_unittests_apk__create --> - # //webrtc/modules:modules_unittests_apk__create__finalize --> - # //webrtc/modules:modules_unittests_apk__create__package --[private]--> - # //webrtc/modules:_modules_unittests__library - check_includes = false - testonly = true - sources = [ - "audio_processing_performance_unittest.cc", - "level_controller/level_controller_complexity_unittest.cc", - "residual_echo_detector_complexity_unittest.cc", - ] - deps = [ - ":audio_processing", - ":audioproc_test_utils", - "//testing/gtest", - ] - if (rtc_enable_intelligibility_enhancer) { - defines = [ "WEBRTC_INTELLIGIBILITY_ENHANCER=1" ] - } else { - defines = [ "WEBRTC_INTELLIGIBILITY_ENHANCER=0" ] - } - } - - if (rtc_enable_protobuf) { - rtc_executable("unpack_aecdump") { - testonly = true - sources = [ - "test/unpack.cc", - ] - - deps = [ - ":audio_processing", - ":audioproc_debug_proto", - ":audioproc_protobuf_utils", - ":audioproc_test_utils", - "../..:webrtc_common", - "../../base:rtc_base_approved", - "../../common_audio", - "../../system_wrappers:system_wrappers_default", - "//third_party/gflags:gflags", - ] - } # unpack_aecdump - - rtc_executable("audioproc_f") { - testonly = true - sources = [ - "test/aec_dump_based_simulator.cc", - "test/aec_dump_based_simulator.h", - "test/audio_processing_simulator.cc", - "test/audio_processing_simulator.h", - "test/audioproc_float.cc", - "test/wav_based_simulator.cc", - "test/wav_based_simulator.h", - ] - - deps = [ - ":audio_processing", - ":audioproc_debug_proto", - ":audioproc_protobuf_utils", - ":audioproc_test_utils", - "../../base:rtc_base_approved", - "../../common_audio:common_audio", - "../../system_wrappers", - "../../system_wrappers:system_wrappers_default", - "../../test:test_support", - "//testing/gtest", - "//third_party/gflags:gflags", - ] - } # audioproc_f - } - - rtc_source_set("audioproc_test_utils") { - testonly = true - sources = [ - "test/audio_buffer_tools.cc", - "test/audio_buffer_tools.h", - "test/performance_timer.cc", - "test/performance_timer.h", - "test/simulator_buffers.cc", - "test/simulator_buffers.h", - "test/test_utils.cc", - "test/test_utils.h", - ] - - deps = [ - ":audio_processing", - "../../base:rtc_base_approved", - "../../common_audio", - "../../system_wrappers:system_wrappers", - ] - } - - rtc_executable("transient_suppression_test") { - testonly = true - sources = [ - "transient/file_utils.cc", - "transient/file_utils.h", - "transient/transient_suppression_test.cc", - ] - deps = [ - ":audio_processing", - "../..:webrtc_common", - "../../common_audio:common_audio", - "../../system_wrappers:metrics_default", - "../../system_wrappers:system_wrappers", - "../../test:test_support", - "//testing/gtest", - "//third_party/gflags", - ] - } - - rtc_executable("click_annotate") { - testonly = true - sources = [ - "transient/click_annotate.cc", - "transient/file_utils.cc", - "transient/file_utils.h", - ] - deps = [ - ":audio_processing", - "../..:webrtc_common", - "../../system_wrappers:metrics_default", - "../../system_wrappers:system_wrappers", - ] - } - - rtc_executable("nonlinear_beamformer_test") { - testonly = true - sources = [ - "beamformer/nonlinear_beamformer_test.cc", - ] - deps = [ - ":audio_processing", - ":audioproc_test_utils", - "../../base:rtc_base_approved", - "../../common_audio:common_audio", - "../../system_wrappers:metrics_default", - "//third_party/gflags", - ] - } - - if (rtc_enable_intelligibility_enhancer) { - rtc_executable("intelligibility_proc") { - testonly = true - sources = [ - "intelligibility/test/intelligibility_proc.cc", - ] - deps = [ - ":audio_processing", - ":audioproc_test_utils", - "../../system_wrappers:metrics_default", - "../../test:test_support", - "//testing/gtest", - "//third_party/gflags", - ] - } - } - - if (rtc_enable_protobuf) { - proto_library("audioproc_unittest_proto") { - sources = [ - "test/unittest.proto", - ] - proto_out_dir = "webrtc/modules/audio_processing" - } - - rtc_static_library("audioproc_protobuf_utils") { - sources = [ - "test/protobuf_utils.cc", - "test/protobuf_utils.h", - ] - - deps = [ - ":audioproc_debug_proto", - "../..:webrtc_common", - "../../base:rtc_base_approved", - ] - } - } -} diff --git a/WebRtc.NET/include/leptonica/allheaders.h b/WebRtc.NET/include/leptonica/allheaders.h deleted file mode 100644 index c47e54eb..00000000 --- a/WebRtc.NET/include/leptonica/allheaders.h +++ /dev/null @@ -1,2706 +0,0 @@ -/*====================================================================* - - Copyright (C) 2001 Leptonica. All rights reserved. - - - - Redistribution and use in source and binary forms, with or without - - modification, are permitted provided that the following conditions - - are met: - - 1. Redistributions of source code must retain the above copyright - - notice, this list of conditions and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above - - copyright notice, this list of conditions and the following - - disclaimer in the documentation and/or other materials - - provided with the distribution. - - - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - - ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - - LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - - A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL ANY - - CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - - EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - - PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - - PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY - - OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - - NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - - SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - *====================================================================*/ - -#ifndef LEPTONICA_ALLHEADERS_H -#define LEPTONICA_ALLHEADERS_H - - -#define LIBLEPT_MAJOR_VERSION 1 -#define LIBLEPT_MINOR_VERSION 74 - -#include "alltypes.h" - -#ifndef NO_PROTOS -/* - * These prototypes were autogen'd by xtractprotos, v. 1.5 - */ -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -LEPT_DLL extern PIX * pixCleanBackgroundToWhite ( PIX *pixs, PIX *pixim, PIX *pixg, l_float32 gamma, l_int32 blackval, l_int32 whiteval ); -LEPT_DLL extern PIX * pixBackgroundNormSimple ( PIX *pixs, PIX *pixim, PIX *pixg ); -LEPT_DLL extern PIX * pixBackgroundNorm ( PIX *pixs, PIX *pixim, PIX *pixg, l_int32 sx, l_int32 sy, l_int32 thresh, l_int32 mincount, l_int32 bgval, l_int32 smoothx, l_int32 smoothy ); -LEPT_DLL extern PIX * pixBackgroundNormMorph ( PIX *pixs, PIX *pixim, l_int32 reduction, l_int32 size, l_int32 bgval ); -LEPT_DLL extern l_int32 pixBackgroundNormGrayArray ( PIX *pixs, PIX *pixim, l_int32 sx, l_int32 sy, l_int32 thresh, l_int32 mincount, l_int32 bgval, l_int32 smoothx, l_int32 smoothy, PIX **ppixd ); -LEPT_DLL extern l_int32 pixBackgroundNormRGBArrays ( PIX *pixs, PIX *pixim, PIX *pixg, l_int32 sx, l_int32 sy, l_int32 thresh, l_int32 mincount, l_int32 bgval, l_int32 smoothx, l_int32 smoothy, PIX **ppixr, PIX **ppixg, PIX **ppixb ); -LEPT_DLL extern l_int32 pixBackgroundNormGrayArrayMorph ( PIX *pixs, PIX *pixim, l_int32 reduction, l_int32 size, l_int32 bgval, PIX **ppixd ); -LEPT_DLL extern l_int32 pixBackgroundNormRGBArraysMorph ( PIX *pixs, PIX *pixim, l_int32 reduction, l_int32 size, l_int32 bgval, PIX **ppixr, PIX **ppixg, PIX **ppixb ); -LEPT_DLL extern l_int32 pixGetBackgroundGrayMap ( PIX *pixs, PIX *pixim, l_int32 sx, l_int32 sy, l_int32 thresh, l_int32 mincount, PIX **ppixd ); -LEPT_DLL extern l_int32 pixGetBackgroundRGBMap ( PIX *pixs, PIX *pixim, PIX *pixg, l_int32 sx, l_int32 sy, l_int32 thresh, l_int32 mincount, PIX **ppixmr, PIX **ppixmg, PIX **ppixmb ); -LEPT_DLL extern l_int32 pixGetBackgroundGrayMapMorph ( PIX *pixs, PIX *pixim, l_int32 reduction, l_int32 size, PIX **ppixm ); -LEPT_DLL extern l_int32 pixGetBackgroundRGBMapMorph ( PIX *pixs, PIX *pixim, l_int32 reduction, l_int32 size, PIX **ppixmr, PIX **ppixmg, PIX **ppixmb ); -LEPT_DLL extern l_int32 pixFillMapHoles ( PIX *pix, l_int32 nx, l_int32 ny, l_int32 filltype ); -LEPT_DLL extern PIX * pixExtendByReplication ( PIX *pixs, l_int32 addw, l_int32 addh ); -LEPT_DLL extern l_int32 pixSmoothConnectedRegions ( PIX *pixs, PIX *pixm, l_int32 factor ); -LEPT_DLL extern PIX * pixGetInvBackgroundMap ( PIX *pixs, l_int32 bgval, l_int32 smoothx, l_int32 smoothy ); -LEPT_DLL extern PIX * pixApplyInvBackgroundGrayMap ( PIX *pixs, PIX *pixm, l_int32 sx, l_int32 sy ); -LEPT_DLL extern PIX * pixApplyInvBackgroundRGBMap ( PIX *pixs, PIX *pixmr, PIX *pixmg, PIX *pixmb, l_int32 sx, l_int32 sy ); -LEPT_DLL extern PIX * pixApplyVariableGrayMap ( PIX *pixs, PIX *pixg, l_int32 target ); -LEPT_DLL extern PIX * pixGlobalNormRGB ( PIX *pixd, PIX *pixs, l_int32 rval, l_int32 gval, l_int32 bval, l_int32 mapval ); -LEPT_DLL extern PIX * pixGlobalNormNoSatRGB ( PIX *pixd, PIX *pixs, l_int32 rval, l_int32 gval, l_int32 bval, l_int32 factor, l_float32 rank ); -LEPT_DLL extern l_int32 pixThresholdSpreadNorm ( PIX *pixs, l_int32 filtertype, l_int32 edgethresh, l_int32 smoothx, l_int32 smoothy, l_float32 gamma, l_int32 minval, l_int32 maxval, l_int32 targetthresh, PIX **ppixth, PIX **ppixb, PIX **ppixd ); -LEPT_DLL extern PIX * pixBackgroundNormFlex ( PIX *pixs, l_int32 sx, l_int32 sy, l_int32 smoothx, l_int32 smoothy, l_int32 delta ); -LEPT_DLL extern PIX * pixContrastNorm ( PIX *pixd, PIX *pixs, l_int32 sx, l_int32 sy, l_int32 mindiff, l_int32 smoothx, l_int32 smoothy ); -LEPT_DLL extern l_int32 pixMinMaxTiles ( PIX *pixs, l_int32 sx, l_int32 sy, l_int32 mindiff, l_int32 smoothx, l_int32 smoothy, PIX **ppixmin, PIX **ppixmax ); -LEPT_DLL extern l_int32 pixSetLowContrast ( PIX *pixs1, PIX *pixs2, l_int32 mindiff ); -LEPT_DLL extern PIX * pixLinearTRCTiled ( PIX *pixd, PIX *pixs, l_int32 sx, l_int32 sy, PIX *pixmin, PIX *pixmax ); -LEPT_DLL extern PIX * pixAffineSampledPta ( PIX *pixs, PTA *ptad, PTA *ptas, l_int32 incolor ); -LEPT_DLL extern PIX * pixAffineSampled ( PIX *pixs, l_float32 *vc, l_int32 incolor ); -LEPT_DLL extern PIX * pixAffinePta ( PIX *pixs, PTA *ptad, PTA *ptas, l_int32 incolor ); -LEPT_DLL extern PIX * pixAffine ( PIX *pixs, l_float32 *vc, l_int32 incolor ); -LEPT_DLL extern PIX * pixAffinePtaColor ( PIX *pixs, PTA *ptad, PTA *ptas, l_uint32 colorval ); -LEPT_DLL extern PIX * pixAffineColor ( PIX *pixs, l_float32 *vc, l_uint32 colorval ); -LEPT_DLL extern PIX * pixAffinePtaGray ( PIX *pixs, PTA *ptad, PTA *ptas, l_uint8 grayval ); -LEPT_DLL extern PIX * pixAffineGray ( PIX *pixs, l_float32 *vc, l_uint8 grayval ); -LEPT_DLL extern PIX * pixAffinePtaWithAlpha ( PIX *pixs, PTA *ptad, PTA *ptas, PIX *pixg, l_float32 fract, l_int32 border ); -LEPT_DLL extern l_int32 getAffineXformCoeffs ( PTA *ptas, PTA *ptad, l_float32 **pvc ); -LEPT_DLL extern l_int32 affineInvertXform ( l_float32 *vc, l_float32 **pvci ); -LEPT_DLL extern l_int32 affineXformSampledPt ( l_float32 *vc, l_int32 x, l_int32 y, l_int32 *pxp, l_int32 *pyp ); -LEPT_DLL extern l_int32 affineXformPt ( l_float32 *vc, l_int32 x, l_int32 y, l_float32 *pxp, l_float32 *pyp ); -LEPT_DLL extern l_int32 linearInterpolatePixelColor ( l_uint32 *datas, l_int32 wpls, l_int32 w, l_int32 h, l_float32 x, l_float32 y, l_uint32 colorval, l_uint32 *pval ); -LEPT_DLL extern l_int32 linearInterpolatePixelGray ( l_uint32 *datas, l_int32 wpls, l_int32 w, l_int32 h, l_float32 x, l_float32 y, l_int32 grayval, l_int32 *pval ); -LEPT_DLL extern l_int32 gaussjordan ( l_float32 **a, l_float32 *b, l_int32 n ); -LEPT_DLL extern PIX * pixAffineSequential ( PIX *pixs, PTA *ptad, PTA *ptas, l_int32 bw, l_int32 bh ); -LEPT_DLL extern l_float32 * createMatrix2dTranslate ( l_float32 transx, l_float32 transy ); -LEPT_DLL extern l_float32 * createMatrix2dScale ( l_float32 scalex, l_float32 scaley ); -LEPT_DLL extern l_float32 * createMatrix2dRotate ( l_float32 xc, l_float32 yc, l_float32 angle ); -LEPT_DLL extern PTA * ptaTranslate ( PTA *ptas, l_float32 transx, l_float32 transy ); -LEPT_DLL extern PTA * ptaScale ( PTA *ptas, l_float32 scalex, l_float32 scaley ); -LEPT_DLL extern PTA * ptaRotate ( PTA *ptas, l_float32 xc, l_float32 yc, l_float32 angle ); -LEPT_DLL extern BOXA * boxaTranslate ( BOXA *boxas, l_float32 transx, l_float32 transy ); -LEPT_DLL extern BOXA * boxaScale ( BOXA *boxas, l_float32 scalex, l_float32 scaley ); -LEPT_DLL extern BOXA * boxaRotate ( BOXA *boxas, l_float32 xc, l_float32 yc, l_float32 angle ); -LEPT_DLL extern PTA * ptaAffineTransform ( PTA *ptas, l_float32 *mat ); -LEPT_DLL extern BOXA * boxaAffineTransform ( BOXA *boxas, l_float32 *mat ); -LEPT_DLL extern l_int32 l_productMatVec ( l_float32 *mat, l_float32 *vecs, l_float32 *vecd, l_int32 size ); -LEPT_DLL extern l_int32 l_productMat2 ( l_float32 *mat1, l_float32 *mat2, l_float32 *matd, l_int32 size ); -LEPT_DLL extern l_int32 l_productMat3 ( l_float32 *mat1, l_float32 *mat2, l_float32 *mat3, l_float32 *matd, l_int32 size ); -LEPT_DLL extern l_int32 l_productMat4 ( l_float32 *mat1, l_float32 *mat2, l_float32 *mat3, l_float32 *mat4, l_float32 *matd, l_int32 size ); -LEPT_DLL extern l_int32 l_getDataBit ( void *line, l_int32 n ); -LEPT_DLL extern void l_setDataBit ( void *line, l_int32 n ); -LEPT_DLL extern void l_clearDataBit ( void *line, l_int32 n ); -LEPT_DLL extern void l_setDataBitVal ( void *line, l_int32 n, l_int32 val ); -LEPT_DLL extern l_int32 l_getDataDibit ( void *line, l_int32 n ); -LEPT_DLL extern void l_setDataDibit ( void *line, l_int32 n, l_int32 val ); -LEPT_DLL extern void l_clearDataDibit ( void *line, l_int32 n ); -LEPT_DLL extern l_int32 l_getDataQbit ( void *line, l_int32 n ); -LEPT_DLL extern void l_setDataQbit ( void *line, l_int32 n, l_int32 val ); -LEPT_DLL extern void l_clearDataQbit ( void *line, l_int32 n ); -LEPT_DLL extern l_int32 l_getDataByte ( void *line, l_int32 n ); -LEPT_DLL extern void l_setDataByte ( void *line, l_int32 n, l_int32 val ); -LEPT_DLL extern l_int32 l_getDataTwoBytes ( void *line, l_int32 n ); -LEPT_DLL extern void l_setDataTwoBytes ( void *line, l_int32 n, l_int32 val ); -LEPT_DLL extern l_int32 l_getDataFourBytes ( void *line, l_int32 n ); -LEPT_DLL extern void l_setDataFourBytes ( void *line, l_int32 n, l_int32 val ); -LEPT_DLL extern char * barcodeDispatchDecoder ( char *barstr, l_int32 format, l_int32 debugflag ); -LEPT_DLL extern l_int32 barcodeFormatIsSupported ( l_int32 format ); -LEPT_DLL extern NUMA * pixFindBaselines ( PIX *pixs, PTA **ppta, l_int32 debug ); -LEPT_DLL extern PIX * pixDeskewLocal ( PIX *pixs, l_int32 nslices, l_int32 redsweep, l_int32 redsearch, l_float32 sweeprange, l_float32 sweepdelta, l_float32 minbsdelta ); -LEPT_DLL extern l_int32 pixGetLocalSkewTransform ( PIX *pixs, l_int32 nslices, l_int32 redsweep, l_int32 redsearch, l_float32 sweeprange, l_float32 sweepdelta, l_float32 minbsdelta, PTA **pptas, PTA **pptad ); -LEPT_DLL extern NUMA * pixGetLocalSkewAngles ( PIX *pixs, l_int32 nslices, l_int32 redsweep, l_int32 redsearch, l_float32 sweeprange, l_float32 sweepdelta, l_float32 minbsdelta, l_float32 *pa, l_float32 *pb ); -LEPT_DLL extern L_BBUFFER * bbufferCreate ( l_uint8 *indata, l_int32 nalloc ); -LEPT_DLL extern void bbufferDestroy ( L_BBUFFER **pbb ); -LEPT_DLL extern l_uint8 * bbufferDestroyAndSaveData ( L_BBUFFER **pbb, size_t *pnbytes ); -LEPT_DLL extern l_int32 bbufferRead ( L_BBUFFER *bb, l_uint8 *src, l_int32 nbytes ); -LEPT_DLL extern l_int32 bbufferReadStream ( L_BBUFFER *bb, FILE *fp, l_int32 nbytes ); -LEPT_DLL extern l_int32 bbufferExtendArray ( L_BBUFFER *bb, l_int32 nbytes ); -LEPT_DLL extern l_int32 bbufferWrite ( L_BBUFFER *bb, l_uint8 *dest, size_t nbytes, size_t *pnout ); -LEPT_DLL extern l_int32 bbufferWriteStream ( L_BBUFFER *bb, FILE *fp, size_t nbytes, size_t *pnout ); -LEPT_DLL extern PIX * pixBilateral ( PIX *pixs, l_float32 spatial_stdev, l_float32 range_stdev, l_int32 ncomps, l_int32 reduction ); -LEPT_DLL extern PIX * pixBilateralGray ( PIX *pixs, l_float32 spatial_stdev, l_float32 range_stdev, l_int32 ncomps, l_int32 reduction ); -LEPT_DLL extern PIX * pixBilateralExact ( PIX *pixs, L_KERNEL *spatial_kel, L_KERNEL *range_kel ); -LEPT_DLL extern PIX * pixBilateralGrayExact ( PIX *pixs, L_KERNEL *spatial_kel, L_KERNEL *range_kel ); -LEPT_DLL extern PIX* pixBlockBilateralExact ( PIX *pixs, l_float32 spatial_stdev, l_float32 range_stdev ); -LEPT_DLL extern L_KERNEL * makeRangeKernel ( l_float32 range_stdev ); -LEPT_DLL extern PIX * pixBilinearSampledPta ( PIX *pixs, PTA *ptad, PTA *ptas, l_int32 incolor ); -LEPT_DLL extern PIX * pixBilinearSampled ( PIX *pixs, l_float32 *vc, l_int32 incolor ); -LEPT_DLL extern PIX * pixBilinearPta ( PIX *pixs, PTA *ptad, PTA *ptas, l_int32 incolor ); -LEPT_DLL extern PIX * pixBilinear ( PIX *pixs, l_float32 *vc, l_int32 incolor ); -LEPT_DLL extern PIX * pixBilinearPtaColor ( PIX *pixs, PTA *ptad, PTA *ptas, l_uint32 colorval ); -LEPT_DLL extern PIX * pixBilinearColor ( PIX *pixs, l_float32 *vc, l_uint32 colorval ); -LEPT_DLL extern PIX * pixBilinearPtaGray ( PIX *pixs, PTA *ptad, PTA *ptas, l_uint8 grayval ); -LEPT_DLL extern PIX * pixBilinearGray ( PIX *pixs, l_float32 *vc, l_uint8 grayval ); -LEPT_DLL extern PIX * pixBilinearPtaWithAlpha ( PIX *pixs, PTA *ptad, PTA *ptas, PIX *pixg, l_float32 fract, l_int32 border ); -LEPT_DLL extern l_int32 getBilinearXformCoeffs ( PTA *ptas, PTA *ptad, l_float32 **pvc ); -LEPT_DLL extern l_int32 bilinearXformSampledPt ( l_float32 *vc, l_int32 x, l_int32 y, l_int32 *pxp, l_int32 *pyp ); -LEPT_DLL extern l_int32 bilinearXformPt ( l_float32 *vc, l_int32 x, l_int32 y, l_float32 *pxp, l_float32 *pyp ); -LEPT_DLL extern l_int32 pixOtsuAdaptiveThreshold ( PIX *pixs, l_int32 sx, l_int32 sy, l_int32 smoothx, l_int32 smoothy, l_float32 scorefract, PIX **ppixth, PIX **ppixd ); -LEPT_DLL extern PIX * pixOtsuThreshOnBackgroundNorm ( PIX *pixs, PIX *pixim, l_int32 sx, l_int32 sy, l_int32 thresh, l_int32 mincount, l_int32 bgval, l_int32 smoothx, l_int32 smoothy, l_float32 scorefract, l_int32 *pthresh ); -LEPT_DLL extern PIX * pixMaskedThreshOnBackgroundNorm ( PIX *pixs, PIX *pixim, l_int32 sx, l_int32 sy, l_int32 thresh, l_int32 mincount, l_int32 smoothx, l_int32 smoothy, l_float32 scorefract, l_int32 *pthresh ); -LEPT_DLL extern l_int32 pixSauvolaBinarizeTiled ( PIX *pixs, l_int32 whsize, l_float32 factor, l_int32 nx, l_int32 ny, PIX **ppixth, PIX **ppixd ); -LEPT_DLL extern l_int32 pixSauvolaBinarize ( PIX *pixs, l_int32 whsize, l_float32 factor, l_int32 addborder, PIX **ppixm, PIX **ppixsd, PIX **ppixth, PIX **ppixd ); -LEPT_DLL extern PIX * pixSauvolaGetThreshold ( PIX *pixm, PIX *pixms, l_float32 factor, PIX **ppixsd ); -LEPT_DLL extern PIX * pixApplyLocalThreshold ( PIX *pixs, PIX *pixth, l_int32 redfactor ); -LEPT_DLL extern l_int32 pixThresholdByConnComp ( PIX *pixs, PIX *pixm, l_int32 start, l_int32 end, l_int32 incr, l_float32 thresh48, l_float32 threshdiff, l_int32 *pglobthresh, PIX **ppixd, l_int32 debugflag ); -LEPT_DLL extern PIX * pixExpandBinaryReplicate ( PIX *pixs, l_int32 xfact, l_int32 yfact ); -LEPT_DLL extern PIX * pixExpandBinaryPower2 ( PIX *pixs, l_int32 factor ); -LEPT_DLL extern PIX * pixReduceBinary2 ( PIX *pixs, l_uint8 *intab ); -LEPT_DLL extern PIX * pixReduceRankBinaryCascade ( PIX *pixs, l_int32 level1, l_int32 level2, l_int32 level3, l_int32 level4 ); -LEPT_DLL extern PIX * pixReduceRankBinary2 ( PIX *pixs, l_int32 level, l_uint8 *intab ); -LEPT_DLL extern l_uint8 * makeSubsampleTab2x ( void ); -LEPT_DLL extern PIX * pixBlend ( PIX *pixs1, PIX *pixs2, l_int32 x, l_int32 y, l_float32 fract ); -LEPT_DLL extern PIX * pixBlendMask ( PIX *pixd, PIX *pixs1, PIX *pixs2, l_int32 x, l_int32 y, l_float32 fract, l_int32 type ); -LEPT_DLL extern PIX * pixBlendGray ( PIX *pixd, PIX *pixs1, PIX *pixs2, l_int32 x, l_int32 y, l_float32 fract, l_int32 type, l_int32 transparent, l_uint32 transpix ); -LEPT_DLL extern PIX * pixBlendGrayInverse ( PIX *pixd, PIX *pixs1, PIX *pixs2, l_int32 x, l_int32 y, l_float32 fract ); -LEPT_DLL extern PIX * pixBlendColor ( PIX *pixd, PIX *pixs1, PIX *pixs2, l_int32 x, l_int32 y, l_float32 fract, l_int32 transparent, l_uint32 transpix ); -LEPT_DLL extern PIX * pixBlendColorByChannel ( PIX *pixd, PIX *pixs1, PIX *pixs2, l_int32 x, l_int32 y, l_float32 rfract, l_float32 gfract, l_float32 bfract, l_int32 transparent, l_uint32 transpix ); -LEPT_DLL extern PIX * pixBlendGrayAdapt ( PIX *pixd, PIX *pixs1, PIX *pixs2, l_int32 x, l_int32 y, l_float32 fract, l_int32 shift ); -LEPT_DLL extern PIX * pixFadeWithGray ( PIX *pixs, PIX *pixb, l_float32 factor, l_int32 type ); -LEPT_DLL extern PIX * pixBlendHardLight ( PIX *pixd, PIX *pixs1, PIX *pixs2, l_int32 x, l_int32 y, l_float32 fract ); -LEPT_DLL extern l_int32 pixBlendCmap ( PIX *pixs, PIX *pixb, l_int32 x, l_int32 y, l_int32 sindex ); -LEPT_DLL extern PIX * pixBlendWithGrayMask ( PIX *pixs1, PIX *pixs2, PIX *pixg, l_int32 x, l_int32 y ); -LEPT_DLL extern PIX * pixBlendBackgroundToColor ( PIX *pixd, PIX *pixs, BOX *box, l_uint32 color, l_float32 gamma, l_int32 minval, l_int32 maxval ); -LEPT_DLL extern PIX * pixMultiplyByColor ( PIX *pixd, PIX *pixs, BOX *box, l_uint32 color ); -LEPT_DLL extern PIX * pixAlphaBlendUniform ( PIX *pixs, l_uint32 color ); -LEPT_DLL extern PIX * pixAddAlphaToBlend ( PIX *pixs, l_float32 fract, l_int32 invert ); -LEPT_DLL extern PIX * pixSetAlphaOverWhite ( PIX *pixs ); -LEPT_DLL extern L_BMF * bmfCreate ( const char *dir, l_int32 fontsize ); -LEPT_DLL extern void bmfDestroy ( L_BMF **pbmf ); -LEPT_DLL extern PIX * bmfGetPix ( L_BMF *bmf, char chr ); -LEPT_DLL extern l_int32 bmfGetWidth ( L_BMF *bmf, char chr, l_int32 *pw ); -LEPT_DLL extern l_int32 bmfGetBaseline ( L_BMF *bmf, char chr, l_int32 *pbaseline ); -LEPT_DLL extern PIXA * pixaGetFont ( const char *dir, l_int32 fontsize, l_int32 *pbl0, l_int32 *pbl1, l_int32 *pbl2 ); -LEPT_DLL extern l_int32 pixaSaveFont ( const char *indir, const char *outdir, l_int32 fontsize ); -LEPT_DLL extern PIXA * pixaGenerateFontFromFile ( const char *dir, l_int32 fontsize, l_int32 *pbl0, l_int32 *pbl1, l_int32 *pbl2 ); -LEPT_DLL extern PIXA * pixaGenerateFontFromString ( l_int32 fontsize, l_int32 *pbl0, l_int32 *pbl1, l_int32 *pbl2 ); -LEPT_DLL extern PIXA * pixaGenerateFont ( PIX *pixs, l_int32 fontsize, l_int32 *pbl0, l_int32 *pbl1, l_int32 *pbl2 ); -LEPT_DLL extern PIX * pixReadStreamBmp ( FILE *fp ); -LEPT_DLL extern l_int32 pixWriteStreamBmp ( FILE *fp, PIX *pix ); -LEPT_DLL extern PIX * pixReadMemBmp ( const l_uint8 *data, size_t size ); -LEPT_DLL extern l_int32 pixWriteMemBmp ( l_uint8 **pdata, size_t *psize, PIX *pix ); -LEPT_DLL extern PIXA * l_bootnum_gen1 ( void ); -LEPT_DLL extern PIXA * l_bootnum_gen2 ( void ); -LEPT_DLL extern PIXA * l_bootnum_gen3 ( void ); -LEPT_DLL extern BOX * boxCreate ( l_int32 x, l_int32 y, l_int32 w, l_int32 h ); -LEPT_DLL extern BOX * boxCreateValid ( l_int32 x, l_int32 y, l_int32 w, l_int32 h ); -LEPT_DLL extern BOX * boxCopy ( BOX *box ); -LEPT_DLL extern BOX * boxClone ( BOX *box ); -LEPT_DLL extern void boxDestroy ( BOX **pbox ); -LEPT_DLL extern l_int32 boxGetGeometry ( BOX *box, l_int32 *px, l_int32 *py, l_int32 *pw, l_int32 *ph ); -LEPT_DLL extern l_int32 boxSetGeometry ( BOX *box, l_int32 x, l_int32 y, l_int32 w, l_int32 h ); -LEPT_DLL extern l_int32 boxGetSideLocations ( BOX *box, l_int32 *pl, l_int32 *pr, l_int32 *pt, l_int32 *pb ); -LEPT_DLL extern l_int32 boxSetSideLocations ( BOX *box, l_int32 l, l_int32 r, l_int32 t, l_int32 b ); -LEPT_DLL extern l_int32 boxGetRefcount ( BOX *box ); -LEPT_DLL extern l_int32 boxChangeRefcount ( BOX *box, l_int32 delta ); -LEPT_DLL extern l_int32 boxIsValid ( BOX *box, l_int32 *pvalid ); -LEPT_DLL extern BOXA * boxaCreate ( l_int32 n ); -LEPT_DLL extern BOXA * boxaCopy ( BOXA *boxa, l_int32 copyflag ); -LEPT_DLL extern void boxaDestroy ( BOXA **pboxa ); -LEPT_DLL extern l_int32 boxaAddBox ( BOXA *boxa, BOX *box, l_int32 copyflag ); -LEPT_DLL extern l_int32 boxaExtendArray ( BOXA *boxa ); -LEPT_DLL extern l_int32 boxaExtendArrayToSize ( BOXA *boxa, l_int32 size ); -LEPT_DLL extern l_int32 boxaGetCount ( BOXA *boxa ); -LEPT_DLL extern l_int32 boxaGetValidCount ( BOXA *boxa ); -LEPT_DLL extern BOX * boxaGetBox ( BOXA *boxa, l_int32 index, l_int32 accessflag ); -LEPT_DLL extern BOX * boxaGetValidBox ( BOXA *boxa, l_int32 index, l_int32 accessflag ); -LEPT_DLL extern NUMA * boxaFindInvalidBoxes ( BOXA *boxa ); -LEPT_DLL extern l_int32 boxaGetBoxGeometry ( BOXA *boxa, l_int32 index, l_int32 *px, l_int32 *py, l_int32 *pw, l_int32 *ph ); -LEPT_DLL extern l_int32 boxaIsFull ( BOXA *boxa, l_int32 *pfull ); -LEPT_DLL extern l_int32 boxaReplaceBox ( BOXA *boxa, l_int32 index, BOX *box ); -LEPT_DLL extern l_int32 boxaInsertBox ( BOXA *boxa, l_int32 index, BOX *box ); -LEPT_DLL extern l_int32 boxaRemoveBox ( BOXA *boxa, l_int32 index ); -LEPT_DLL extern l_int32 boxaRemoveBoxAndSave ( BOXA *boxa, l_int32 index, BOX **pbox ); -LEPT_DLL extern BOXA * boxaSaveValid ( BOXA *boxas, l_int32 copyflag ); -LEPT_DLL extern l_int32 boxaInitFull ( BOXA *boxa, BOX *box ); -LEPT_DLL extern l_int32 boxaClear ( BOXA *boxa ); -LEPT_DLL extern BOXAA * boxaaCreate ( l_int32 n ); -LEPT_DLL extern BOXAA * boxaaCopy ( BOXAA *baas, l_int32 copyflag ); -LEPT_DLL extern void boxaaDestroy ( BOXAA **pbaa ); -LEPT_DLL extern l_int32 boxaaAddBoxa ( BOXAA *baa, BOXA *ba, l_int32 copyflag ); -LEPT_DLL extern l_int32 boxaaExtendArray ( BOXAA *baa ); -LEPT_DLL extern l_int32 boxaaExtendArrayToSize ( BOXAA *baa, l_int32 size ); -LEPT_DLL extern l_int32 boxaaGetCount ( BOXAA *baa ); -LEPT_DLL extern l_int32 boxaaGetBoxCount ( BOXAA *baa ); -LEPT_DLL extern BOXA * boxaaGetBoxa ( BOXAA *baa, l_int32 index, l_int32 accessflag ); -LEPT_DLL extern BOX * boxaaGetBox ( BOXAA *baa, l_int32 iboxa, l_int32 ibox, l_int32 accessflag ); -LEPT_DLL extern l_int32 boxaaInitFull ( BOXAA *baa, BOXA *boxa ); -LEPT_DLL extern l_int32 boxaaExtendWithInit ( BOXAA *baa, l_int32 maxindex, BOXA *boxa ); -LEPT_DLL extern l_int32 boxaaReplaceBoxa ( BOXAA *baa, l_int32 index, BOXA *boxa ); -LEPT_DLL extern l_int32 boxaaInsertBoxa ( BOXAA *baa, l_int32 index, BOXA *boxa ); -LEPT_DLL extern l_int32 boxaaRemoveBoxa ( BOXAA *baa, l_int32 index ); -LEPT_DLL extern l_int32 boxaaAddBox ( BOXAA *baa, l_int32 index, BOX *box, l_int32 accessflag ); -LEPT_DLL extern BOXAA * boxaaReadFromFiles ( const char *dirname, const char *substr, l_int32 first, l_int32 nfiles ); -LEPT_DLL extern BOXAA * boxaaRead ( const char *filename ); -LEPT_DLL extern BOXAA * boxaaReadStream ( FILE *fp ); -LEPT_DLL extern BOXAA * boxaaReadMem ( const l_uint8 *data, size_t size ); -LEPT_DLL extern l_int32 boxaaWrite ( const char *filename, BOXAA *baa ); -LEPT_DLL extern l_int32 boxaaWriteStream ( FILE *fp, BOXAA *baa ); -LEPT_DLL extern l_int32 boxaaWriteMem ( l_uint8 **pdata, size_t *psize, BOXAA *baa ); -LEPT_DLL extern BOXA * boxaRead ( const char *filename ); -LEPT_DLL extern BOXA * boxaReadStream ( FILE *fp ); -LEPT_DLL extern BOXA * boxaReadMem ( const l_uint8 *data, size_t size ); -LEPT_DLL extern l_int32 boxaWrite ( const char *filename, BOXA *boxa ); -LEPT_DLL extern l_int32 boxaWriteStream ( FILE *fp, BOXA *boxa ); -LEPT_DLL extern l_int32 boxaWriteMem ( l_uint8 **pdata, size_t *psize, BOXA *boxa ); -LEPT_DLL extern l_int32 boxPrintStreamInfo ( FILE *fp, BOX *box ); -LEPT_DLL extern l_int32 boxContains ( BOX *box1, BOX *box2, l_int32 *presult ); -LEPT_DLL extern l_int32 boxIntersects ( BOX *box1, BOX *box2, l_int32 *presult ); -LEPT_DLL extern BOXA * boxaContainedInBox ( BOXA *boxas, BOX *box ); -LEPT_DLL extern BOXA * boxaIntersectsBox ( BOXA *boxas, BOX *box ); -LEPT_DLL extern BOXA * boxaClipToBox ( BOXA *boxas, BOX *box ); -LEPT_DLL extern BOXA * boxaCombineOverlaps ( BOXA *boxas ); -LEPT_DLL extern BOX * boxOverlapRegion ( BOX *box1, BOX *box2 ); -LEPT_DLL extern BOX * boxBoundingRegion ( BOX *box1, BOX *box2 ); -LEPT_DLL extern l_int32 boxOverlapFraction ( BOX *box1, BOX *box2, l_float32 *pfract ); -LEPT_DLL extern l_int32 boxOverlapArea ( BOX *box1, BOX *box2, l_int32 *parea ); -LEPT_DLL extern BOXA * boxaHandleOverlaps ( BOXA *boxas, l_int32 op, l_int32 range, l_float32 min_overlap, l_float32 max_ratio, NUMA **pnamap ); -LEPT_DLL extern l_int32 boxSeparationDistance ( BOX *box1, BOX *box2, l_int32 *ph_sep, l_int32 *pv_sep ); -LEPT_DLL extern l_int32 boxContainsPt ( BOX *box, l_float32 x, l_float32 y, l_int32 *pcontains ); -LEPT_DLL extern BOX * boxaGetNearestToPt ( BOXA *boxa, l_int32 x, l_int32 y ); -LEPT_DLL extern l_int32 boxGetCenter ( BOX *box, l_float32 *pcx, l_float32 *pcy ); -LEPT_DLL extern l_int32 boxIntersectByLine ( BOX *box, l_int32 x, l_int32 y, l_float32 slope, l_int32 *px1, l_int32 *py1, l_int32 *px2, l_int32 *py2, l_int32 *pn ); -LEPT_DLL extern BOX * boxClipToRectangle ( BOX *box, l_int32 wi, l_int32 hi ); -LEPT_DLL extern l_int32 boxClipToRectangleParams ( BOX *box, l_int32 w, l_int32 h, l_int32 *pxstart, l_int32 *pystart, l_int32 *pxend, l_int32 *pyend, l_int32 *pbw, l_int32 *pbh ); -LEPT_DLL extern BOX * boxRelocateOneSide ( BOX *boxd, BOX *boxs, l_int32 loc, l_int32 sideflag ); -LEPT_DLL extern BOX * boxAdjustSides ( BOX *boxd, BOX *boxs, l_int32 delleft, l_int32 delright, l_int32 deltop, l_int32 delbot ); -LEPT_DLL extern BOXA * boxaSetSide ( BOXA *boxad, BOXA *boxas, l_int32 side, l_int32 val, l_int32 thresh ); -LEPT_DLL extern BOXA * boxaAdjustWidthToTarget ( BOXA *boxad, BOXA *boxas, l_int32 sides, l_int32 target, l_int32 thresh ); -LEPT_DLL extern BOXA * boxaAdjustHeightToTarget ( BOXA *boxad, BOXA *boxas, l_int32 sides, l_int32 target, l_int32 thresh ); -LEPT_DLL extern l_int32 boxEqual ( BOX *box1, BOX *box2, l_int32 *psame ); -LEPT_DLL extern l_int32 boxaEqual ( BOXA *boxa1, BOXA *boxa2, l_int32 maxdist, NUMA **pnaindex, l_int32 *psame ); -LEPT_DLL extern l_int32 boxSimilar ( BOX *box1, BOX *box2, l_int32 leftdiff, l_int32 rightdiff, l_int32 topdiff, l_int32 botdiff, l_int32 *psimilar ); -LEPT_DLL extern l_int32 boxaSimilar ( BOXA *boxa1, BOXA *boxa2, l_int32 leftdiff, l_int32 rightdiff, l_int32 topdiff, l_int32 botdiff, l_int32 debug, l_int32 *psimilar, NUMA **pnasim ); -LEPT_DLL extern l_int32 boxaJoin ( BOXA *boxad, BOXA *boxas, l_int32 istart, l_int32 iend ); -LEPT_DLL extern l_int32 boxaaJoin ( BOXAA *baad, BOXAA *baas, l_int32 istart, l_int32 iend ); -LEPT_DLL extern l_int32 boxaSplitEvenOdd ( BOXA *boxa, l_int32 fillflag, BOXA **pboxae, BOXA **pboxao ); -LEPT_DLL extern BOXA * boxaMergeEvenOdd ( BOXA *boxae, BOXA *boxao, l_int32 fillflag ); -LEPT_DLL extern BOXA * boxaTransform ( BOXA *boxas, l_int32 shiftx, l_int32 shifty, l_float32 scalex, l_float32 scaley ); -LEPT_DLL extern BOX * boxTransform ( BOX *box, l_int32 shiftx, l_int32 shifty, l_float32 scalex, l_float32 scaley ); -LEPT_DLL extern BOXA * boxaTransformOrdered ( BOXA *boxas, l_int32 shiftx, l_int32 shifty, l_float32 scalex, l_float32 scaley, l_int32 xcen, l_int32 ycen, l_float32 angle, l_int32 order ); -LEPT_DLL extern BOX * boxTransformOrdered ( BOX *boxs, l_int32 shiftx, l_int32 shifty, l_float32 scalex, l_float32 scaley, l_int32 xcen, l_int32 ycen, l_float32 angle, l_int32 order ); -LEPT_DLL extern BOXA * boxaRotateOrth ( BOXA *boxas, l_int32 w, l_int32 h, l_int32 rotation ); -LEPT_DLL extern BOX * boxRotateOrth ( BOX *box, l_int32 w, l_int32 h, l_int32 rotation ); -LEPT_DLL extern BOXA * boxaSort ( BOXA *boxas, l_int32 sorttype, l_int32 sortorder, NUMA **pnaindex ); -LEPT_DLL extern BOXA * boxaBinSort ( BOXA *boxas, l_int32 sorttype, l_int32 sortorder, NUMA **pnaindex ); -LEPT_DLL extern BOXA * boxaSortByIndex ( BOXA *boxas, NUMA *naindex ); -LEPT_DLL extern BOXAA * boxaSort2d ( BOXA *boxas, NUMAA **pnaad, l_int32 delta1, l_int32 delta2, l_int32 minh1 ); -LEPT_DLL extern BOXAA * boxaSort2dByIndex ( BOXA *boxas, NUMAA *naa ); -LEPT_DLL extern l_int32 boxaExtractAsNuma ( BOXA *boxa, NUMA **pnal, NUMA **pnat, NUMA **pnar, NUMA **pnab, NUMA **pnaw, NUMA **pnah, l_int32 keepinvalid ); -LEPT_DLL extern l_int32 boxaExtractAsPta ( BOXA *boxa, PTA **pptal, PTA **pptat, PTA **pptar, PTA **pptab, PTA **pptaw, PTA **pptah, l_int32 keepinvalid ); -LEPT_DLL extern l_int32 boxaGetRankVals ( BOXA *boxa, l_float32 fract, l_int32 *px, l_int32 *py, l_int32 *pw, l_int32 *ph ); -LEPT_DLL extern l_int32 boxaGetMedianVals ( BOXA *boxa, l_int32 *px, l_int32 *py, l_int32 *pw, l_int32 *ph ); -LEPT_DLL extern l_int32 boxaGetAverageSize ( BOXA *boxa, l_float32 *pw, l_float32 *ph ); -LEPT_DLL extern l_int32 boxaaGetExtent ( BOXAA *baa, l_int32 *pw, l_int32 *ph, BOX **pbox, BOXA **pboxa ); -LEPT_DLL extern BOXA * boxaaFlattenToBoxa ( BOXAA *baa, NUMA **pnaindex, l_int32 copyflag ); -LEPT_DLL extern BOXA * boxaaFlattenAligned ( BOXAA *baa, l_int32 num, BOX *fillerbox, l_int32 copyflag ); -LEPT_DLL extern BOXAA * boxaEncapsulateAligned ( BOXA *boxa, l_int32 num, l_int32 copyflag ); -LEPT_DLL extern BOXAA * boxaaTranspose ( BOXAA *baas ); -LEPT_DLL extern l_int32 boxaaAlignBox ( BOXAA *baa, BOX *box, l_int32 delta, l_int32 *pindex ); -LEPT_DLL extern PIX * pixMaskConnComp ( PIX *pixs, l_int32 connectivity, BOXA **pboxa ); -LEPT_DLL extern PIX * pixMaskBoxa ( PIX *pixd, PIX *pixs, BOXA *boxa, l_int32 op ); -LEPT_DLL extern PIX * pixPaintBoxa ( PIX *pixs, BOXA *boxa, l_uint32 val ); -LEPT_DLL extern PIX * pixSetBlackOrWhiteBoxa ( PIX *pixs, BOXA *boxa, l_int32 op ); -LEPT_DLL extern PIX * pixPaintBoxaRandom ( PIX *pixs, BOXA *boxa ); -LEPT_DLL extern PIX * pixBlendBoxaRandom ( PIX *pixs, BOXA *boxa, l_float32 fract ); -LEPT_DLL extern PIX * pixDrawBoxa ( PIX *pixs, BOXA *boxa, l_int32 width, l_uint32 val ); -LEPT_DLL extern PIX * pixDrawBoxaRandom ( PIX *pixs, BOXA *boxa, l_int32 width ); -LEPT_DLL extern PIX * boxaaDisplay ( BOXAA *baa, l_int32 linewba, l_int32 linewb, l_uint32 colorba, l_uint32 colorb, l_int32 w, l_int32 h ); -LEPT_DLL extern PIXA * pixaDisplayBoxaa ( PIXA *pixas, BOXAA *baa, l_int32 colorflag, l_int32 width ); -LEPT_DLL extern BOXA * pixSplitIntoBoxa ( PIX *pixs, l_int32 minsum, l_int32 skipdist, l_int32 delta, l_int32 maxbg, l_int32 maxcomps, l_int32 remainder ); -LEPT_DLL extern BOXA * pixSplitComponentIntoBoxa ( PIX *pix, BOX *box, l_int32 minsum, l_int32 skipdist, l_int32 delta, l_int32 maxbg, l_int32 maxcomps, l_int32 remainder ); -LEPT_DLL extern BOXA * makeMosaicStrips ( l_int32 w, l_int32 h, l_int32 direction, l_int32 size ); -LEPT_DLL extern l_int32 boxaCompareRegions ( BOXA *boxa1, BOXA *boxa2, l_int32 areathresh, l_int32 *pnsame, l_float32 *pdiffarea, l_float32 *pdiffxor, PIX **ppixdb ); -LEPT_DLL extern BOX * pixSelectLargeULComp ( PIX *pixs, l_float32 areaslop, l_int32 yslop, l_int32 connectivity ); -LEPT_DLL extern BOX * boxaSelectLargeULBox ( BOXA *boxas, l_float32 areaslop, l_int32 yslop ); -LEPT_DLL extern BOXA * boxaSelectRange ( BOXA *boxas, l_int32 first, l_int32 last, l_int32 copyflag ); -LEPT_DLL extern BOXAA * boxaaSelectRange ( BOXAA *baas, l_int32 first, l_int32 last, l_int32 copyflag ); -LEPT_DLL extern BOXA * boxaSelectBySize ( BOXA *boxas, l_int32 width, l_int32 height, l_int32 type, l_int32 relation, l_int32 *pchanged ); -LEPT_DLL extern NUMA * boxaMakeSizeIndicator ( BOXA *boxa, l_int32 width, l_int32 height, l_int32 type, l_int32 relation ); -LEPT_DLL extern BOXA * boxaSelectByArea ( BOXA *boxas, l_int32 area, l_int32 relation, l_int32 *pchanged ); -LEPT_DLL extern NUMA * boxaMakeAreaIndicator ( BOXA *boxa, l_int32 area, l_int32 relation ); -LEPT_DLL extern BOXA * boxaSelectWithIndicator ( BOXA *boxas, NUMA *na, l_int32 *pchanged ); -LEPT_DLL extern BOXA * boxaPermutePseudorandom ( BOXA *boxas ); -LEPT_DLL extern BOXA * boxaPermuteRandom ( BOXA *boxad, BOXA *boxas ); -LEPT_DLL extern l_int32 boxaSwapBoxes ( BOXA *boxa, l_int32 i, l_int32 j ); -LEPT_DLL extern PTA * boxaConvertToPta ( BOXA *boxa, l_int32 ncorners ); -LEPT_DLL extern BOXA * ptaConvertToBoxa ( PTA *pta, l_int32 ncorners ); -LEPT_DLL extern PTA * boxConvertToPta ( BOX *box, l_int32 ncorners ); -LEPT_DLL extern BOX * ptaConvertToBox ( PTA *pta ); -LEPT_DLL extern BOXA * boxaSmoothSequenceLS ( BOXA *boxas, l_float32 factor, l_int32 subflag, l_int32 maxdiff, l_int32 debug ); -LEPT_DLL extern BOXA * boxaSmoothSequenceMedian ( BOXA *boxas, l_int32 halfwin, l_int32 subflag, l_int32 maxdiff, l_int32 debug ); -LEPT_DLL extern BOXA * boxaLinearFit ( BOXA *boxas, l_float32 factor, l_int32 debug ); -LEPT_DLL extern BOXA * boxaWindowedMedian ( BOXA *boxas, l_int32 halfwin, l_int32 debug ); -LEPT_DLL extern BOXA * boxaModifyWithBoxa ( BOXA *boxas, BOXA *boxam, l_int32 subflag, l_int32 maxdiff ); -LEPT_DLL extern BOXA * boxaConstrainSize ( BOXA *boxas, l_int32 width, l_int32 widthflag, l_int32 height, l_int32 heightflag ); -LEPT_DLL extern BOXA * boxaReconcileEvenOddHeight ( BOXA *boxas, l_int32 sides, l_int32 delh, l_int32 op, l_float32 factor, l_int32 start ); -LEPT_DLL extern BOXA * boxaReconcilePairWidth ( BOXA *boxas, l_int32 delw, l_int32 op, l_float32 factor, NUMA *na ); -LEPT_DLL extern l_int32 boxaPlotSides ( BOXA *boxa, const char *plotname, NUMA **pnal, NUMA **pnat, NUMA **pnar, NUMA **pnab, PIX **ppixd ); -LEPT_DLL extern l_int32 boxaPlotSizes ( BOXA *boxa, const char *plotname, NUMA **pnaw, NUMA **pnah, PIX **ppixd ); -LEPT_DLL extern BOXA * boxaFillSequence ( BOXA *boxas, l_int32 useflag, l_int32 debug ); -LEPT_DLL extern l_int32 boxaGetExtent ( BOXA *boxa, l_int32 *pw, l_int32 *ph, BOX **pbox ); -LEPT_DLL extern l_int32 boxaGetCoverage ( BOXA *boxa, l_int32 wc, l_int32 hc, l_int32 exactflag, l_float32 *pfract ); -LEPT_DLL extern l_int32 boxaaSizeRange ( BOXAA *baa, l_int32 *pminw, l_int32 *pminh, l_int32 *pmaxw, l_int32 *pmaxh ); -LEPT_DLL extern l_int32 boxaSizeRange ( BOXA *boxa, l_int32 *pminw, l_int32 *pminh, l_int32 *pmaxw, l_int32 *pmaxh ); -LEPT_DLL extern l_int32 boxaLocationRange ( BOXA *boxa, l_int32 *pminx, l_int32 *pminy, l_int32 *pmaxx, l_int32 *pmaxy ); -LEPT_DLL extern l_int32 boxaGetSizes ( BOXA *boxa, NUMA **pnaw, NUMA **pnah ); -LEPT_DLL extern l_int32 boxaGetArea ( BOXA *boxa, l_int32 *parea ); -LEPT_DLL extern PIX * boxaDisplayTiled ( BOXA *boxas, PIXA *pixa, l_int32 maxwidth, l_int32 linewidth, l_float32 scalefactor, l_int32 background, l_int32 spacing, l_int32 border ); -LEPT_DLL extern L_BYTEA * l_byteaCreate ( size_t nbytes ); -LEPT_DLL extern L_BYTEA * l_byteaInitFromMem ( l_uint8 *data, size_t size ); -LEPT_DLL extern L_BYTEA * l_byteaInitFromFile ( const char *fname ); -LEPT_DLL extern L_BYTEA * l_byteaInitFromStream ( FILE *fp ); -LEPT_DLL extern L_BYTEA * l_byteaCopy ( L_BYTEA *bas, l_int32 copyflag ); -LEPT_DLL extern void l_byteaDestroy ( L_BYTEA **pba ); -LEPT_DLL extern size_t l_byteaGetSize ( L_BYTEA *ba ); -LEPT_DLL extern l_uint8 * l_byteaGetData ( L_BYTEA *ba, size_t *psize ); -LEPT_DLL extern l_uint8 * l_byteaCopyData ( L_BYTEA *ba, size_t *psize ); -LEPT_DLL extern l_int32 l_byteaAppendData ( L_BYTEA *ba, l_uint8 *newdata, size_t newbytes ); -LEPT_DLL extern l_int32 l_byteaAppendString ( L_BYTEA *ba, char *str ); -LEPT_DLL extern l_int32 l_byteaJoin ( L_BYTEA *ba1, L_BYTEA **pba2 ); -LEPT_DLL extern l_int32 l_byteaSplit ( L_BYTEA *ba1, size_t splitloc, L_BYTEA **pba2 ); -LEPT_DLL extern l_int32 l_byteaFindEachSequence ( L_BYTEA *ba, l_uint8 *sequence, l_int32 seqlen, L_DNA **pda ); -LEPT_DLL extern l_int32 l_byteaWrite ( const char *fname, L_BYTEA *ba, size_t startloc, size_t endloc ); -LEPT_DLL extern l_int32 l_byteaWriteStream ( FILE *fp, L_BYTEA *ba, size_t startloc, size_t endloc ); -LEPT_DLL extern CCBORDA * ccbaCreate ( PIX *pixs, l_int32 n ); -LEPT_DLL extern void ccbaDestroy ( CCBORDA **pccba ); -LEPT_DLL extern CCBORD * ccbCreate ( PIX *pixs ); -LEPT_DLL extern void ccbDestroy ( CCBORD **pccb ); -LEPT_DLL extern l_int32 ccbaAddCcb ( CCBORDA *ccba, CCBORD *ccb ); -LEPT_DLL extern l_int32 ccbaGetCount ( CCBORDA *ccba ); -LEPT_DLL extern CCBORD * ccbaGetCcb ( CCBORDA *ccba, l_int32 index ); -LEPT_DLL extern CCBORDA * pixGetAllCCBorders ( PIX *pixs ); -LEPT_DLL extern CCBORD * pixGetCCBorders ( PIX *pixs, BOX *box ); -LEPT_DLL extern PTAA * pixGetOuterBordersPtaa ( PIX *pixs ); -LEPT_DLL extern PTA * pixGetOuterBorderPta ( PIX *pixs, BOX *box ); -LEPT_DLL extern l_int32 pixGetOuterBorder ( CCBORD *ccb, PIX *pixs, BOX *box ); -LEPT_DLL extern l_int32 pixGetHoleBorder ( CCBORD *ccb, PIX *pixs, BOX *box, l_int32 xs, l_int32 ys ); -LEPT_DLL extern l_int32 findNextBorderPixel ( l_int32 w, l_int32 h, l_uint32 *data, l_int32 wpl, l_int32 px, l_int32 py, l_int32 *pqpos, l_int32 *pnpx, l_int32 *pnpy ); -LEPT_DLL extern void locateOutsideSeedPixel ( l_int32 fpx, l_int32 fpy, l_int32 spx, l_int32 spy, l_int32 *pxs, l_int32 *pys ); -LEPT_DLL extern l_int32 ccbaGenerateGlobalLocs ( CCBORDA *ccba ); -LEPT_DLL extern l_int32 ccbaGenerateStepChains ( CCBORDA *ccba ); -LEPT_DLL extern l_int32 ccbaStepChainsToPixCoords ( CCBORDA *ccba, l_int32 coordtype ); -LEPT_DLL extern l_int32 ccbaGenerateSPGlobalLocs ( CCBORDA *ccba, l_int32 ptsflag ); -LEPT_DLL extern l_int32 ccbaGenerateSinglePath ( CCBORDA *ccba ); -LEPT_DLL extern PTA * getCutPathForHole ( PIX *pix, PTA *pta, BOX *boxinner, l_int32 *pdir, l_int32 *plen ); -LEPT_DLL extern PIX * ccbaDisplayBorder ( CCBORDA *ccba ); -LEPT_DLL extern PIX * ccbaDisplaySPBorder ( CCBORDA *ccba ); -LEPT_DLL extern PIX * ccbaDisplayImage1 ( CCBORDA *ccba ); -LEPT_DLL extern PIX * ccbaDisplayImage2 ( CCBORDA *ccba ); -LEPT_DLL extern l_int32 ccbaWrite ( const char *filename, CCBORDA *ccba ); -LEPT_DLL extern l_int32 ccbaWriteStream ( FILE *fp, CCBORDA *ccba ); -LEPT_DLL extern CCBORDA * ccbaRead ( const char *filename ); -LEPT_DLL extern CCBORDA * ccbaReadStream ( FILE *fp ); -LEPT_DLL extern l_int32 ccbaWriteSVG ( const char *filename, CCBORDA *ccba ); -LEPT_DLL extern char * ccbaWriteSVGString ( const char *filename, CCBORDA *ccba ); -LEPT_DLL extern PIX * pixThin ( PIX *pixs, l_int32 type, l_int32 connectivity, l_int32 maxiters ); -LEPT_DLL extern PIX * pixThinGeneral ( PIX *pixs, l_int32 type, SELA *sela, l_int32 maxiters ); -LEPT_DLL extern PIX * pixThinExamples ( PIX *pixs, l_int32 type, l_int32 index, l_int32 maxiters, const char *selfile ); -LEPT_DLL extern l_int32 jbCorrelation ( const char *dirin, l_float32 thresh, l_float32 weight, l_int32 components, const char *rootname, l_int32 firstpage, l_int32 npages, l_int32 renderflag ); -LEPT_DLL extern l_int32 jbRankHaus ( const char *dirin, l_int32 size, l_float32 rank, l_int32 components, const char *rootname, l_int32 firstpage, l_int32 npages, l_int32 renderflag ); -LEPT_DLL extern JBCLASSER * jbWordsInTextlines ( const char *dirin, l_int32 reduction, l_int32 maxwidth, l_int32 maxheight, l_float32 thresh, l_float32 weight, NUMA **pnatl, l_int32 firstpage, l_int32 npages ); -LEPT_DLL extern l_int32 pixGetWordsInTextlines ( PIX *pixs, l_int32 reduction, l_int32 minwidth, l_int32 minheight, l_int32 maxwidth, l_int32 maxheight, BOXA **pboxad, PIXA **ppixad, NUMA **pnai ); -LEPT_DLL extern l_int32 pixGetWordBoxesInTextlines ( PIX *pixs, l_int32 reduction, l_int32 minwidth, l_int32 minheight, l_int32 maxwidth, l_int32 maxheight, BOXA **pboxad, NUMA **pnai ); -LEPT_DLL extern NUMAA * boxaExtractSortedPattern ( BOXA *boxa, NUMA *na ); -LEPT_DLL extern l_int32 numaaCompareImagesByBoxes ( NUMAA *naa1, NUMAA *naa2, l_int32 nperline, l_int32 nreq, l_int32 maxshiftx, l_int32 maxshifty, l_int32 delx, l_int32 dely, l_int32 *psame, l_int32 debugflag ); -LEPT_DLL extern l_int32 pixColorContent ( PIX *pixs, l_int32 rwhite, l_int32 gwhite, l_int32 bwhite, l_int32 mingray, PIX **ppixr, PIX **ppixg, PIX **ppixb ); -LEPT_DLL extern PIX * pixColorMagnitude ( PIX *pixs, l_int32 rwhite, l_int32 gwhite, l_int32 bwhite, l_int32 type ); -LEPT_DLL extern PIX * pixMaskOverColorPixels ( PIX *pixs, l_int32 threshdiff, l_int32 mindist ); -LEPT_DLL extern PIX * pixMaskOverColorRange ( PIX *pixs, l_int32 rmin, l_int32 rmax, l_int32 gmin, l_int32 gmax, l_int32 bmin, l_int32 bmax ); -LEPT_DLL extern l_int32 pixColorFraction ( PIX *pixs, l_int32 darkthresh, l_int32 lightthresh, l_int32 diffthresh, l_int32 factor, l_float32 *ppixfract, l_float32 *pcolorfract ); -LEPT_DLL extern l_int32 pixNumSignificantGrayColors ( PIX *pixs, l_int32 darkthresh, l_int32 lightthresh, l_float32 minfract, l_int32 factor, l_int32 *pncolors ); -LEPT_DLL extern l_int32 pixColorsForQuantization ( PIX *pixs, l_int32 thresh, l_int32 *pncolors, l_int32 *piscolor, l_int32 debug ); -LEPT_DLL extern l_int32 pixNumColors ( PIX *pixs, l_int32 factor, l_int32 *pncolors ); -LEPT_DLL extern l_int32 pixGetMostPopulatedColors ( PIX *pixs, l_int32 sigbits, l_int32 factor, l_int32 ncolors, l_uint32 **parray, PIXCMAP **pcmap ); -LEPT_DLL extern PIX * pixSimpleColorQuantize ( PIX *pixs, l_int32 sigbits, l_int32 factor, l_int32 ncolors ); -LEPT_DLL extern NUMA * pixGetRGBHistogram ( PIX *pixs, l_int32 sigbits, l_int32 factor ); -LEPT_DLL extern l_int32 makeRGBIndexTables ( l_uint32 **prtab, l_uint32 **pgtab, l_uint32 **pbtab, l_int32 sigbits ); -LEPT_DLL extern l_int32 getRGBFromIndex ( l_uint32 index, l_int32 sigbits, l_int32 *prval, l_int32 *pgval, l_int32 *pbval ); -LEPT_DLL extern l_int32 pixHasHighlightRed ( PIX *pixs, l_int32 factor, l_float32 fract, l_float32 fthresh, l_int32 *phasred, l_float32 *pratio, PIX **ppixdb ); -LEPT_DLL extern PIX * pixColorGrayRegions ( PIX *pixs, BOXA *boxa, l_int32 type, l_int32 thresh, l_int32 rval, l_int32 gval, l_int32 bval ); -LEPT_DLL extern l_int32 pixColorGray ( PIX *pixs, BOX *box, l_int32 type, l_int32 thresh, l_int32 rval, l_int32 gval, l_int32 bval ); -LEPT_DLL extern PIX * pixColorGrayMasked ( PIX *pixs, PIX *pixm, l_int32 type, l_int32 thresh, l_int32 rval, l_int32 gval, l_int32 bval ); -LEPT_DLL extern PIX * pixSnapColor ( PIX *pixd, PIX *pixs, l_uint32 srcval, l_uint32 dstval, l_int32 diff ); -LEPT_DLL extern PIX * pixSnapColorCmap ( PIX *pixd, PIX *pixs, l_uint32 srcval, l_uint32 dstval, l_int32 diff ); -LEPT_DLL extern PIX * pixLinearMapToTargetColor ( PIX *pixd, PIX *pixs, l_uint32 srcval, l_uint32 dstval ); -LEPT_DLL extern l_int32 pixelLinearMapToTargetColor ( l_uint32 scolor, l_uint32 srcmap, l_uint32 dstmap, l_uint32 *pdcolor ); -LEPT_DLL extern PIX * pixShiftByComponent ( PIX *pixd, PIX *pixs, l_uint32 srcval, l_uint32 dstval ); -LEPT_DLL extern l_int32 pixelShiftByComponent ( l_int32 rval, l_int32 gval, l_int32 bval, l_uint32 srcval, l_uint32 dstval, l_uint32 *ppixel ); -LEPT_DLL extern l_int32 pixelFractionalShift ( l_int32 rval, l_int32 gval, l_int32 bval, l_float32 fraction, l_uint32 *ppixel ); -LEPT_DLL extern PIXCMAP * pixcmapCreate ( l_int32 depth ); -LEPT_DLL extern PIXCMAP * pixcmapCreateRandom ( l_int32 depth, l_int32 hasblack, l_int32 haswhite ); -LEPT_DLL extern PIXCMAP * pixcmapCreateLinear ( l_int32 d, l_int32 nlevels ); -LEPT_DLL extern PIXCMAP * pixcmapCopy ( PIXCMAP *cmaps ); -LEPT_DLL extern void pixcmapDestroy ( PIXCMAP **pcmap ); -LEPT_DLL extern l_int32 pixcmapAddColor ( PIXCMAP *cmap, l_int32 rval, l_int32 gval, l_int32 bval ); -LEPT_DLL extern l_int32 pixcmapAddRGBA ( PIXCMAP *cmap, l_int32 rval, l_int32 gval, l_int32 bval, l_int32 aval ); -LEPT_DLL extern l_int32 pixcmapAddNewColor ( PIXCMAP *cmap, l_int32 rval, l_int32 gval, l_int32 bval, l_int32 *pindex ); -LEPT_DLL extern l_int32 pixcmapAddNearestColor ( PIXCMAP *cmap, l_int32 rval, l_int32 gval, l_int32 bval, l_int32 *pindex ); -LEPT_DLL extern l_int32 pixcmapUsableColor ( PIXCMAP *cmap, l_int32 rval, l_int32 gval, l_int32 bval, l_int32 *pusable ); -LEPT_DLL extern l_int32 pixcmapAddBlackOrWhite ( PIXCMAP *cmap, l_int32 color, l_int32 *pindex ); -LEPT_DLL extern l_int32 pixcmapSetBlackAndWhite ( PIXCMAP *cmap, l_int32 setblack, l_int32 setwhite ); -LEPT_DLL extern l_int32 pixcmapGetCount ( PIXCMAP *cmap ); -LEPT_DLL extern l_int32 pixcmapGetFreeCount ( PIXCMAP *cmap ); -LEPT_DLL extern l_int32 pixcmapGetDepth ( PIXCMAP *cmap ); -LEPT_DLL extern l_int32 pixcmapGetMinDepth ( PIXCMAP *cmap, l_int32 *pmindepth ); -LEPT_DLL extern l_int32 pixcmapClear ( PIXCMAP *cmap ); -LEPT_DLL extern l_int32 pixcmapGetColor ( PIXCMAP *cmap, l_int32 index, l_int32 *prval, l_int32 *pgval, l_int32 *pbval ); -LEPT_DLL extern l_int32 pixcmapGetColor32 ( PIXCMAP *cmap, l_int32 index, l_uint32 *pval32 ); -LEPT_DLL extern l_int32 pixcmapGetRGBA ( PIXCMAP *cmap, l_int32 index, l_int32 *prval, l_int32 *pgval, l_int32 *pbval, l_int32 *paval ); -LEPT_DLL extern l_int32 pixcmapGetRGBA32 ( PIXCMAP *cmap, l_int32 index, l_uint32 *pval32 ); -LEPT_DLL extern l_int32 pixcmapResetColor ( PIXCMAP *cmap, l_int32 index, l_int32 rval, l_int32 gval, l_int32 bval ); -LEPT_DLL extern l_int32 pixcmapSetAlpha ( PIXCMAP *cmap, l_int32 index, l_int32 aval ); -LEPT_DLL extern l_int32 pixcmapGetIndex ( PIXCMAP *cmap, l_int32 rval, l_int32 gval, l_int32 bval, l_int32 *pindex ); -LEPT_DLL extern l_int32 pixcmapHasColor ( PIXCMAP *cmap, l_int32 *pcolor ); -LEPT_DLL extern l_int32 pixcmapIsOpaque ( PIXCMAP *cmap, l_int32 *popaque ); -LEPT_DLL extern l_int32 pixcmapIsBlackAndWhite ( PIXCMAP *cmap, l_int32 *pblackwhite ); -LEPT_DLL extern l_int32 pixcmapCountGrayColors ( PIXCMAP *cmap, l_int32 *pngray ); -LEPT_DLL extern l_int32 pixcmapGetRankIntensity ( PIXCMAP *cmap, l_float32 rankval, l_int32 *pindex ); -LEPT_DLL extern l_int32 pixcmapGetNearestIndex ( PIXCMAP *cmap, l_int32 rval, l_int32 gval, l_int32 bval, l_int32 *pindex ); -LEPT_DLL extern l_int32 pixcmapGetNearestGrayIndex ( PIXCMAP *cmap, l_int32 val, l_int32 *pindex ); -LEPT_DLL extern l_int32 pixcmapGetDistanceToColor ( PIXCMAP *cmap, l_int32 index, l_int32 rval, l_int32 gval, l_int32 bval, l_int32 *pdist ); -LEPT_DLL extern l_int32 pixcmapGetRangeValues ( PIXCMAP *cmap, l_int32 select, l_int32 *pminval, l_int32 *pmaxval, l_int32 *pminindex, l_int32 *pmaxindex ); -LEPT_DLL extern PIXCMAP * pixcmapGrayToColor ( l_uint32 color ); -LEPT_DLL extern PIXCMAP * pixcmapColorToGray ( PIXCMAP *cmaps, l_float32 rwt, l_float32 gwt, l_float32 bwt ); -LEPT_DLL extern PIXCMAP * pixcmapRead ( const char *filename ); -LEPT_DLL extern PIXCMAP * pixcmapReadStream ( FILE *fp ); -LEPT_DLL extern PIXCMAP * pixcmapReadMem ( const l_uint8 *data, size_t size ); -LEPT_DLL extern l_int32 pixcmapWrite ( const char *filename, PIXCMAP *cmap ); -LEPT_DLL extern l_int32 pixcmapWriteStream ( FILE *fp, PIXCMAP *cmap ); -LEPT_DLL extern l_int32 pixcmapWriteMem ( l_uint8 **pdata, size_t *psize, PIXCMAP *cmap ); -LEPT_DLL extern l_int32 pixcmapToArrays ( PIXCMAP *cmap, l_int32 **prmap, l_int32 **pgmap, l_int32 **pbmap, l_int32 **pamap ); -LEPT_DLL extern l_int32 pixcmapToRGBTable ( PIXCMAP *cmap, l_uint32 **ptab, l_int32 *pncolors ); -LEPT_DLL extern l_int32 pixcmapSerializeToMemory ( PIXCMAP *cmap, l_int32 cpc, l_int32 *pncolors, l_uint8 **pdata ); -LEPT_DLL extern PIXCMAP * pixcmapDeserializeFromMemory ( l_uint8 *data, l_int32 cpc, l_int32 ncolors ); -LEPT_DLL extern char * pixcmapConvertToHex ( l_uint8 *data, l_int32 ncolors ); -LEPT_DLL extern l_int32 pixcmapGammaTRC ( PIXCMAP *cmap, l_float32 gamma, l_int32 minval, l_int32 maxval ); -LEPT_DLL extern l_int32 pixcmapContrastTRC ( PIXCMAP *cmap, l_float32 factor ); -LEPT_DLL extern l_int32 pixcmapShiftIntensity ( PIXCMAP *cmap, l_float32 fraction ); -LEPT_DLL extern l_int32 pixcmapShiftByComponent ( PIXCMAP *cmap, l_uint32 srcval, l_uint32 dstval ); -LEPT_DLL extern PIX * pixColorMorph ( PIX *pixs, l_int32 type, l_int32 hsize, l_int32 vsize ); -LEPT_DLL extern PIX * pixOctreeColorQuant ( PIX *pixs, l_int32 colors, l_int32 ditherflag ); -LEPT_DLL extern PIX * pixOctreeColorQuantGeneral ( PIX *pixs, l_int32 colors, l_int32 ditherflag, l_float32 validthresh, l_float32 colorthresh ); -LEPT_DLL extern l_int32 makeRGBToIndexTables ( l_uint32 **prtab, l_uint32 **pgtab, l_uint32 **pbtab, l_int32 cqlevels ); -LEPT_DLL extern void getOctcubeIndexFromRGB ( l_int32 rval, l_int32 gval, l_int32 bval, l_uint32 *rtab, l_uint32 *gtab, l_uint32 *btab, l_uint32 *pindex ); -LEPT_DLL extern PIX * pixOctreeQuantByPopulation ( PIX *pixs, l_int32 level, l_int32 ditherflag ); -LEPT_DLL extern PIX * pixOctreeQuantNumColors ( PIX *pixs, l_int32 maxcolors, l_int32 subsample ); -LEPT_DLL extern PIX * pixOctcubeQuantMixedWithGray ( PIX *pixs, l_int32 depth, l_int32 graylevels, l_int32 delta ); -LEPT_DLL extern PIX * pixFixedOctcubeQuant256 ( PIX *pixs, l_int32 ditherflag ); -LEPT_DLL extern PIX * pixFewColorsOctcubeQuant1 ( PIX *pixs, l_int32 level ); -LEPT_DLL extern PIX * pixFewColorsOctcubeQuant2 ( PIX *pixs, l_int32 level, NUMA *na, l_int32 ncolors, l_int32 *pnerrors ); -LEPT_DLL extern PIX * pixFewColorsOctcubeQuantMixed ( PIX *pixs, l_int32 level, l_int32 darkthresh, l_int32 lightthresh, l_int32 diffthresh, l_float32 minfract, l_int32 maxspan ); -LEPT_DLL extern PIX * pixFixedOctcubeQuantGenRGB ( PIX *pixs, l_int32 level ); -LEPT_DLL extern PIX * pixQuantFromCmap ( PIX *pixs, PIXCMAP *cmap, l_int32 mindepth, l_int32 level, l_int32 metric ); -LEPT_DLL extern PIX * pixOctcubeQuantFromCmap ( PIX *pixs, PIXCMAP *cmap, l_int32 mindepth, l_int32 level, l_int32 metric ); -LEPT_DLL extern NUMA * pixOctcubeHistogram ( PIX *pixs, l_int32 level, l_int32 *pncolors ); -LEPT_DLL extern l_int32 * pixcmapToOctcubeLUT ( PIXCMAP *cmap, l_int32 level, l_int32 metric ); -LEPT_DLL extern l_int32 pixRemoveUnusedColors ( PIX *pixs ); -LEPT_DLL extern l_int32 pixNumberOccupiedOctcubes ( PIX *pix, l_int32 level, l_int32 mincount, l_float32 minfract, l_int32 *pncolors ); -LEPT_DLL extern PIX * pixMedianCutQuant ( PIX *pixs, l_int32 ditherflag ); -LEPT_DLL extern PIX * pixMedianCutQuantGeneral ( PIX *pixs, l_int32 ditherflag, l_int32 outdepth, l_int32 maxcolors, l_int32 sigbits, l_int32 maxsub, l_int32 checkbw ); -LEPT_DLL extern PIX * pixMedianCutQuantMixed ( PIX *pixs, l_int32 ncolor, l_int32 ngray, l_int32 darkthresh, l_int32 lightthresh, l_int32 diffthresh ); -LEPT_DLL extern PIX * pixFewColorsMedianCutQuantMixed ( PIX *pixs, l_int32 ncolor, l_int32 ngray, l_int32 maxncolors, l_int32 darkthresh, l_int32 lightthresh, l_int32 diffthresh ); -LEPT_DLL extern l_int32 * pixMedianCutHisto ( PIX *pixs, l_int32 sigbits, l_int32 subsample ); -LEPT_DLL extern PIX * pixColorSegment ( PIX *pixs, l_int32 maxdist, l_int32 maxcolors, l_int32 selsize, l_int32 finalcolors, l_int32 debugflag ); -LEPT_DLL extern PIX * pixColorSegmentCluster ( PIX *pixs, l_int32 maxdist, l_int32 maxcolors, l_int32 debugflag ); -LEPT_DLL extern l_int32 pixAssignToNearestColor ( PIX *pixd, PIX *pixs, PIX *pixm, l_int32 level, l_int32 *countarray ); -LEPT_DLL extern l_int32 pixColorSegmentClean ( PIX *pixs, l_int32 selsize, l_int32 *countarray ); -LEPT_DLL extern l_int32 pixColorSegmentRemoveColors ( PIX *pixd, PIX *pixs, l_int32 finalcolors ); -LEPT_DLL extern PIX * pixConvertRGBToHSV ( PIX *pixd, PIX *pixs ); -LEPT_DLL extern PIX * pixConvertHSVToRGB ( PIX *pixd, PIX *pixs ); -LEPT_DLL extern l_int32 convertRGBToHSV ( l_int32 rval, l_int32 gval, l_int32 bval, l_int32 *phval, l_int32 *psval, l_int32 *pvval ); -LEPT_DLL extern l_int32 convertHSVToRGB ( l_int32 hval, l_int32 sval, l_int32 vval, l_int32 *prval, l_int32 *pgval, l_int32 *pbval ); -LEPT_DLL extern l_int32 pixcmapConvertRGBToHSV ( PIXCMAP *cmap ); -LEPT_DLL extern l_int32 pixcmapConvertHSVToRGB ( PIXCMAP *cmap ); -LEPT_DLL extern PIX * pixConvertRGBToHue ( PIX *pixs ); -LEPT_DLL extern PIX * pixConvertRGBToSaturation ( PIX *pixs ); -LEPT_DLL extern PIX * pixConvertRGBToValue ( PIX *pixs ); -LEPT_DLL extern PIX * pixMakeRangeMaskHS ( PIX *pixs, l_int32 huecenter, l_int32 huehw, l_int32 satcenter, l_int32 sathw, l_int32 regionflag ); -LEPT_DLL extern PIX * pixMakeRangeMaskHV ( PIX *pixs, l_int32 huecenter, l_int32 huehw, l_int32 valcenter, l_int32 valhw, l_int32 regionflag ); -LEPT_DLL extern PIX * pixMakeRangeMaskSV ( PIX *pixs, l_int32 satcenter, l_int32 sathw, l_int32 valcenter, l_int32 valhw, l_int32 regionflag ); -LEPT_DLL extern PIX * pixMakeHistoHS ( PIX *pixs, l_int32 factor, NUMA **pnahue, NUMA **pnasat ); -LEPT_DLL extern PIX * pixMakeHistoHV ( PIX *pixs, l_int32 factor, NUMA **pnahue, NUMA **pnaval ); -LEPT_DLL extern PIX * pixMakeHistoSV ( PIX *pixs, l_int32 factor, NUMA **pnasat, NUMA **pnaval ); -LEPT_DLL extern l_int32 pixFindHistoPeaksHSV ( PIX *pixs, l_int32 type, l_int32 width, l_int32 height, l_int32 npeaks, l_float32 erasefactor, PTA **ppta, NUMA **pnatot, PIXA **ppixa ); -LEPT_DLL extern PIX * displayHSVColorRange ( l_int32 hval, l_int32 sval, l_int32 vval, l_int32 huehw, l_int32 sathw, l_int32 nsamp, l_int32 factor ); -LEPT_DLL extern PIX * pixConvertRGBToYUV ( PIX *pixd, PIX *pixs ); -LEPT_DLL extern PIX * pixConvertYUVToRGB ( PIX *pixd, PIX *pixs ); -LEPT_DLL extern l_int32 convertRGBToYUV ( l_int32 rval, l_int32 gval, l_int32 bval, l_int32 *pyval, l_int32 *puval, l_int32 *pvval ); -LEPT_DLL extern l_int32 convertYUVToRGB ( l_int32 yval, l_int32 uval, l_int32 vval, l_int32 *prval, l_int32 *pgval, l_int32 *pbval ); -LEPT_DLL extern l_int32 pixcmapConvertRGBToYUV ( PIXCMAP *cmap ); -LEPT_DLL extern l_int32 pixcmapConvertYUVToRGB ( PIXCMAP *cmap ); -LEPT_DLL extern FPIXA * pixConvertRGBToXYZ ( PIX *pixs ); -LEPT_DLL extern PIX * fpixaConvertXYZToRGB ( FPIXA *fpixa ); -LEPT_DLL extern l_int32 convertRGBToXYZ ( l_int32 rval, l_int32 gval, l_int32 bval, l_float32 *pfxval, l_float32 *pfyval, l_float32 *pfzval ); -LEPT_DLL extern l_int32 convertXYZToRGB ( l_float32 fxval, l_float32 fyval, l_float32 fzval, l_int32 blackout, l_int32 *prval, l_int32 *pgval, l_int32 *pbval ); -LEPT_DLL extern FPIXA * fpixaConvertXYZToLAB ( FPIXA *fpixas ); -LEPT_DLL extern FPIXA * fpixaConvertLABToXYZ ( FPIXA *fpixas ); -LEPT_DLL extern l_int32 convertXYZToLAB ( l_float32 xval, l_float32 yval, l_float32 zval, l_float32 *plval, l_float32 *paval, l_float32 *pbval ); -LEPT_DLL extern l_int32 convertLABToXYZ ( l_float32 lval, l_float32 aval, l_float32 bval, l_float32 *pxval, l_float32 *pyval, l_float32 *pzval ); -LEPT_DLL extern FPIXA * pixConvertRGBToLAB ( PIX *pixs ); -LEPT_DLL extern PIX * fpixaConvertLABToRGB ( FPIXA *fpixa ); -LEPT_DLL extern l_int32 convertRGBToLAB ( l_int32 rval, l_int32 gval, l_int32 bval, l_float32 *pflval, l_float32 *pfaval, l_float32 *pfbval ); -LEPT_DLL extern l_int32 convertLABToRGB ( l_float32 flval, l_float32 faval, l_float32 fbval, l_int32 *prval, l_int32 *pgval, l_int32 *pbval ); -LEPT_DLL extern l_int32 pixEqual ( PIX *pix1, PIX *pix2, l_int32 *psame ); -LEPT_DLL extern l_int32 pixEqualWithAlpha ( PIX *pix1, PIX *pix2, l_int32 use_alpha, l_int32 *psame ); -LEPT_DLL extern l_int32 pixEqualWithCmap ( PIX *pix1, PIX *pix2, l_int32 *psame ); -LEPT_DLL extern l_int32 pixUsesCmapColor ( PIX *pixs, l_int32 *pcolor ); -LEPT_DLL extern l_int32 pixCorrelationBinary ( PIX *pix1, PIX *pix2, l_float32 *pval ); -LEPT_DLL extern PIX * pixDisplayDiffBinary ( PIX *pix1, PIX *pix2 ); -LEPT_DLL extern l_int32 pixCompareBinary ( PIX *pix1, PIX *pix2, l_int32 comptype, l_float32 *pfract, PIX **ppixdiff ); -LEPT_DLL extern l_int32 pixCompareGrayOrRGB ( PIX *pix1, PIX *pix2, l_int32 comptype, l_int32 plottype, l_int32 *psame, l_float32 *pdiff, l_float32 *prmsdiff, PIX **ppixdiff ); -LEPT_DLL extern l_int32 pixCompareGray ( PIX *pix1, PIX *pix2, l_int32 comptype, l_int32 plottype, l_int32 *psame, l_float32 *pdiff, l_float32 *prmsdiff, PIX **ppixdiff ); -LEPT_DLL extern l_int32 pixCompareRGB ( PIX *pix1, PIX *pix2, l_int32 comptype, l_int32 plottype, l_int32 *psame, l_float32 *pdiff, l_float32 *prmsdiff, PIX **ppixdiff ); -LEPT_DLL extern l_int32 pixCompareTiled ( PIX *pix1, PIX *pix2, l_int32 sx, l_int32 sy, l_int32 type, PIX **ppixdiff ); -LEPT_DLL extern NUMA * pixCompareRankDifference ( PIX *pix1, PIX *pix2, l_int32 factor ); -LEPT_DLL extern l_int32 pixTestForSimilarity ( PIX *pix1, PIX *pix2, l_int32 factor, l_int32 mindiff, l_float32 maxfract, l_float32 maxave, l_int32 *psimilar, l_int32 printstats ); -LEPT_DLL extern l_int32 pixGetDifferenceStats ( PIX *pix1, PIX *pix2, l_int32 factor, l_int32 mindiff, l_float32 *pfractdiff, l_float32 *pavediff, l_int32 printstats ); -LEPT_DLL extern NUMA * pixGetDifferenceHistogram ( PIX *pix1, PIX *pix2, l_int32 factor ); -LEPT_DLL extern l_int32 pixGetPerceptualDiff ( PIX *pixs1, PIX *pixs2, l_int32 sampling, l_int32 dilation, l_int32 mindiff, l_float32 *pfract, PIX **ppixdiff1, PIX **ppixdiff2 ); -LEPT_DLL extern l_int32 pixGetPSNR ( PIX *pix1, PIX *pix2, l_int32 factor, l_float32 *ppsnr ); -LEPT_DLL extern l_int32 pixaComparePhotoRegionsByHisto ( PIXA *pixa, l_float32 minratio, l_float32 textthresh, l_int32 factor, l_int32 nx, l_int32 ny, l_float32 simthresh, NUMA **pnai, l_float32 **pscores, PIX **ppixd ); -LEPT_DLL extern l_int32 pixComparePhotoRegionsByHisto ( PIX *pix1, PIX *pix2, BOX *box1, BOX *box2, l_float32 minratio, l_int32 factor, l_int32 nx, l_int32 ny, l_float32 *pscore, l_int32 debugflag ); -LEPT_DLL extern l_int32 pixGenPhotoHistos ( PIX *pixs, BOX *box, l_int32 factor, l_float32 thresh, l_int32 nx, l_int32 ny, NUMAA **pnaa, l_int32 *pw, l_int32 *ph, l_int32 debugflag ); -LEPT_DLL extern PIX * pixPadToCenterCentroid ( PIX *pixs, l_int32 factor ); -LEPT_DLL extern l_int32 pixCentroid8 ( PIX *pixs, l_int32 factor, l_float32 *pcx, l_float32 *pcy ); -LEPT_DLL extern l_int32 pixDecideIfPhotoImage ( PIX *pix, l_int32 factor, l_int32 nx, l_int32 ny, l_float32 thresh, NUMAA **pnaa, PIXA *pixadebug ); -LEPT_DLL extern l_int32 compareTilesByHisto ( NUMAA *naa1, NUMAA *naa2, l_float32 minratio, l_int32 w1, l_int32 h1, l_int32 w2, l_int32 h2, l_float32 *pscore, PIXA *pixadebug ); -LEPT_DLL extern l_int32 pixCompareGrayByHisto ( PIX *pix1, PIX *pix2, BOX *box1, BOX *box2, l_float32 minratio, l_int32 maxgray, l_int32 factor, l_int32 nx, l_int32 ny, l_float32 *pscore, l_int32 debugflag ); -LEPT_DLL extern l_int32 pixCropAlignedToCentroid ( PIX *pix1, PIX *pix2, l_int32 factor, BOX **pbox1, BOX **pbox2 ); -LEPT_DLL extern l_uint8 * l_compressGrayHistograms ( NUMAA *naa, l_int32 w, l_int32 h, size_t *psize ); -LEPT_DLL extern NUMAA * l_uncompressGrayHistograms ( l_uint8 *bytea, size_t size, l_int32 *pw, l_int32 *ph ); -LEPT_DLL extern l_int32 pixCompareWithTranslation ( PIX *pix1, PIX *pix2, l_int32 thresh, l_int32 *pdelx, l_int32 *pdely, l_float32 *pscore, l_int32 debugflag ); -LEPT_DLL extern l_int32 pixBestCorrelation ( PIX *pix1, PIX *pix2, l_int32 area1, l_int32 area2, l_int32 etransx, l_int32 etransy, l_int32 maxshift, l_int32 *tab8, l_int32 *pdelx, l_int32 *pdely, l_float32 *pscore, l_int32 debugflag ); -LEPT_DLL extern BOXA * pixConnComp ( PIX *pixs, PIXA **ppixa, l_int32 connectivity ); -LEPT_DLL extern BOXA * pixConnCompPixa ( PIX *pixs, PIXA **ppixa, l_int32 connectivity ); -LEPT_DLL extern BOXA * pixConnCompBB ( PIX *pixs, l_int32 connectivity ); -LEPT_DLL extern l_int32 pixCountConnComp ( PIX *pixs, l_int32 connectivity, l_int32 *pcount ); -LEPT_DLL extern l_int32 nextOnPixelInRaster ( PIX *pixs, l_int32 xstart, l_int32 ystart, l_int32 *px, l_int32 *py ); -LEPT_DLL extern l_int32 nextOnPixelInRasterLow ( l_uint32 *data, l_int32 w, l_int32 h, l_int32 wpl, l_int32 xstart, l_int32 ystart, l_int32 *px, l_int32 *py ); -LEPT_DLL extern BOX * pixSeedfillBB ( PIX *pixs, L_STACK *stack, l_int32 x, l_int32 y, l_int32 connectivity ); -LEPT_DLL extern BOX * pixSeedfill4BB ( PIX *pixs, L_STACK *stack, l_int32 x, l_int32 y ); -LEPT_DLL extern BOX * pixSeedfill8BB ( PIX *pixs, L_STACK *stack, l_int32 x, l_int32 y ); -LEPT_DLL extern l_int32 pixSeedfill ( PIX *pixs, L_STACK *stack, l_int32 x, l_int32 y, l_int32 connectivity ); -LEPT_DLL extern l_int32 pixSeedfill4 ( PIX *pixs, L_STACK *stack, l_int32 x, l_int32 y ); -LEPT_DLL extern l_int32 pixSeedfill8 ( PIX *pixs, L_STACK *stack, l_int32 x, l_int32 y ); -LEPT_DLL extern l_int32 convertFilesTo1bpp ( const char *dirin, const char *substr, l_int32 upscaling, l_int32 thresh, l_int32 firstpage, l_int32 npages, const char *dirout, l_int32 outformat ); -LEPT_DLL extern PIX * pixBlockconv ( PIX *pix, l_int32 wc, l_int32 hc ); -LEPT_DLL extern PIX * pixBlockconvGray ( PIX *pixs, PIX *pixacc, l_int32 wc, l_int32 hc ); -LEPT_DLL extern PIX * pixBlockconvAccum ( PIX *pixs ); -LEPT_DLL extern PIX * pixBlockconvGrayUnnormalized ( PIX *pixs, l_int32 wc, l_int32 hc ); -LEPT_DLL extern PIX * pixBlockconvTiled ( PIX *pix, l_int32 wc, l_int32 hc, l_int32 nx, l_int32 ny ); -LEPT_DLL extern PIX * pixBlockconvGrayTile ( PIX *pixs, PIX *pixacc, l_int32 wc, l_int32 hc ); -LEPT_DLL extern l_int32 pixWindowedStats ( PIX *pixs, l_int32 wc, l_int32 hc, l_int32 hasborder, PIX **ppixm, PIX **ppixms, FPIX **pfpixv, FPIX **pfpixrv ); -LEPT_DLL extern PIX * pixWindowedMean ( PIX *pixs, l_int32 wc, l_int32 hc, l_int32 hasborder, l_int32 normflag ); -LEPT_DLL extern PIX * pixWindowedMeanSquare ( PIX *pixs, l_int32 wc, l_int32 hc, l_int32 hasborder ); -LEPT_DLL extern l_int32 pixWindowedVariance ( PIX *pixm, PIX *pixms, FPIX **pfpixv, FPIX **pfpixrv ); -LEPT_DLL extern DPIX * pixMeanSquareAccum ( PIX *pixs ); -LEPT_DLL extern PIX * pixBlockrank ( PIX *pixs, PIX *pixacc, l_int32 wc, l_int32 hc, l_float32 rank ); -LEPT_DLL extern PIX * pixBlocksum ( PIX *pixs, PIX *pixacc, l_int32 wc, l_int32 hc ); -LEPT_DLL extern PIX * pixCensusTransform ( PIX *pixs, l_int32 halfsize, PIX *pixacc ); -LEPT_DLL extern PIX * pixConvolve ( PIX *pixs, L_KERNEL *kel, l_int32 outdepth, l_int32 normflag ); -LEPT_DLL extern PIX * pixConvolveSep ( PIX *pixs, L_KERNEL *kelx, L_KERNEL *kely, l_int32 outdepth, l_int32 normflag ); -LEPT_DLL extern PIX * pixConvolveRGB ( PIX *pixs, L_KERNEL *kel ); -LEPT_DLL extern PIX * pixConvolveRGBSep ( PIX *pixs, L_KERNEL *kelx, L_KERNEL *kely ); -LEPT_DLL extern FPIX * fpixConvolve ( FPIX *fpixs, L_KERNEL *kel, l_int32 normflag ); -LEPT_DLL extern FPIX * fpixConvolveSep ( FPIX *fpixs, L_KERNEL *kelx, L_KERNEL *kely, l_int32 normflag ); -LEPT_DLL extern PIX * pixConvolveWithBias ( PIX *pixs, L_KERNEL *kel1, L_KERNEL *kel2, l_int32 force8, l_int32 *pbias ); -LEPT_DLL extern void l_setConvolveSampling ( l_int32 xfact, l_int32 yfact ); -LEPT_DLL extern PIX * pixAddGaussianNoise ( PIX *pixs, l_float32 stdev ); -LEPT_DLL extern l_float32 gaussDistribSampling ( ); -LEPT_DLL extern l_int32 pixCorrelationScore ( PIX *pix1, PIX *pix2, l_int32 area1, l_int32 area2, l_float32 delx, l_float32 dely, l_int32 maxdiffw, l_int32 maxdiffh, l_int32 *tab, l_float32 *pscore ); -LEPT_DLL extern l_int32 pixCorrelationScoreThresholded ( PIX *pix1, PIX *pix2, l_int32 area1, l_int32 area2, l_float32 delx, l_float32 dely, l_int32 maxdiffw, l_int32 maxdiffh, l_int32 *tab, l_int32 *downcount, l_float32 score_threshold ); -LEPT_DLL extern l_int32 pixCorrelationScoreSimple ( PIX *pix1, PIX *pix2, l_int32 area1, l_int32 area2, l_float32 delx, l_float32 dely, l_int32 maxdiffw, l_int32 maxdiffh, l_int32 *tab, l_float32 *pscore ); -LEPT_DLL extern l_int32 pixCorrelationScoreShifted ( PIX *pix1, PIX *pix2, l_int32 area1, l_int32 area2, l_int32 delx, l_int32 dely, l_int32 *tab, l_float32 *pscore ); -LEPT_DLL extern L_DEWARP * dewarpCreate ( PIX *pixs, l_int32 pageno ); -LEPT_DLL extern L_DEWARP * dewarpCreateRef ( l_int32 pageno, l_int32 refpage ); -LEPT_DLL extern void dewarpDestroy ( L_DEWARP **pdew ); -LEPT_DLL extern L_DEWARPA * dewarpaCreate ( l_int32 nptrs, l_int32 sampling, l_int32 redfactor, l_int32 minlines, l_int32 maxdist ); -LEPT_DLL extern L_DEWARPA * dewarpaCreateFromPixacomp ( PIXAC *pixac, l_int32 useboth, l_int32 sampling, l_int32 minlines, l_int32 maxdist ); -LEPT_DLL extern void dewarpaDestroy ( L_DEWARPA **pdewa ); -LEPT_DLL extern l_int32 dewarpaDestroyDewarp ( L_DEWARPA *dewa, l_int32 pageno ); -LEPT_DLL extern l_int32 dewarpaInsertDewarp ( L_DEWARPA *dewa, L_DEWARP *dew ); -LEPT_DLL extern L_DEWARP * dewarpaGetDewarp ( L_DEWARPA *dewa, l_int32 index ); -LEPT_DLL extern l_int32 dewarpaSetCurvatures ( L_DEWARPA *dewa, l_int32 max_linecurv, l_int32 min_diff_linecurv, l_int32 max_diff_linecurv, l_int32 max_edgecurv, l_int32 max_diff_edgecurv, l_int32 max_edgeslope ); -LEPT_DLL extern l_int32 dewarpaUseBothArrays ( L_DEWARPA *dewa, l_int32 useboth ); -LEPT_DLL extern l_int32 dewarpaSetCheckColumns ( L_DEWARPA *dewa, l_int32 check_columns ); -LEPT_DLL extern l_int32 dewarpaSetMaxDistance ( L_DEWARPA *dewa, l_int32 maxdist ); -LEPT_DLL extern L_DEWARP * dewarpRead ( const char *filename ); -LEPT_DLL extern L_DEWARP * dewarpReadStream ( FILE *fp ); -LEPT_DLL extern L_DEWARP * dewarpReadMem ( const l_uint8 *data, size_t size ); -LEPT_DLL extern l_int32 dewarpWrite ( const char *filename, L_DEWARP *dew ); -LEPT_DLL extern l_int32 dewarpWriteStream ( FILE *fp, L_DEWARP *dew ); -LEPT_DLL extern l_int32 dewarpWriteMem ( l_uint8 **pdata, size_t *psize, L_DEWARP *dew ); -LEPT_DLL extern L_DEWARPA * dewarpaRead ( const char *filename ); -LEPT_DLL extern L_DEWARPA * dewarpaReadStream ( FILE *fp ); -LEPT_DLL extern L_DEWARPA * dewarpaReadMem ( const l_uint8 *data, size_t size ); -LEPT_DLL extern l_int32 dewarpaWrite ( const char *filename, L_DEWARPA *dewa ); -LEPT_DLL extern l_int32 dewarpaWriteStream ( FILE *fp, L_DEWARPA *dewa ); -LEPT_DLL extern l_int32 dewarpaWriteMem ( l_uint8 **pdata, size_t *psize, L_DEWARPA *dewa ); -LEPT_DLL extern l_int32 dewarpBuildPageModel ( L_DEWARP *dew, const char *debugfile ); -LEPT_DLL extern l_int32 dewarpFindVertDisparity ( L_DEWARP *dew, PTAA *ptaa, l_int32 rotflag ); -LEPT_DLL extern l_int32 dewarpFindHorizDisparity ( L_DEWARP *dew, PTAA *ptaa ); -LEPT_DLL extern PTAA * dewarpGetTextlineCenters ( PIX *pixs, l_int32 debugflag ); -LEPT_DLL extern PTAA * dewarpRemoveShortLines ( PIX *pixs, PTAA *ptaas, l_float32 fract, l_int32 debugflag ); -LEPT_DLL extern l_int32 dewarpBuildLineModel ( L_DEWARP *dew, l_int32 opensize, const char *debugfile ); -LEPT_DLL extern l_int32 dewarpaModelStatus ( L_DEWARPA *dewa, l_int32 pageno, l_int32 *pvsuccess, l_int32 *phsuccess ); -LEPT_DLL extern l_int32 dewarpaApplyDisparity ( L_DEWARPA *dewa, l_int32 pageno, PIX *pixs, l_int32 grayin, l_int32 x, l_int32 y, PIX **ppixd, const char *debugfile ); -LEPT_DLL extern l_int32 dewarpaApplyDisparityBoxa ( L_DEWARPA *dewa, l_int32 pageno, PIX *pixs, BOXA *boxas, l_int32 mapdir, l_int32 x, l_int32 y, BOXA **pboxad, const char *debugfile ); -LEPT_DLL extern l_int32 dewarpMinimize ( L_DEWARP *dew ); -LEPT_DLL extern l_int32 dewarpPopulateFullRes ( L_DEWARP *dew, PIX *pix, l_int32 x, l_int32 y ); -LEPT_DLL extern l_int32 dewarpSinglePage ( PIX *pixs, l_int32 thresh, l_int32 adaptive, l_int32 useboth, l_int32 check_columns, PIX **ppixd, L_DEWARPA **pdewa, l_int32 debug ); -LEPT_DLL extern l_int32 dewarpSinglePageInit ( PIX *pixs, l_int32 thresh, l_int32 adaptive, l_int32 useboth, l_int32 check_columns, PIX **ppixb, L_DEWARPA **pdewa ); -LEPT_DLL extern l_int32 dewarpSinglePageRun ( PIX *pixs, PIX *pixb, L_DEWARPA *dewa, PIX **ppixd, l_int32 debug ); -LEPT_DLL extern l_int32 dewarpaListPages ( L_DEWARPA *dewa ); -LEPT_DLL extern l_int32 dewarpaSetValidModels ( L_DEWARPA *dewa, l_int32 notests, l_int32 debug ); -LEPT_DLL extern l_int32 dewarpaInsertRefModels ( L_DEWARPA *dewa, l_int32 notests, l_int32 debug ); -LEPT_DLL extern l_int32 dewarpaStripRefModels ( L_DEWARPA *dewa ); -LEPT_DLL extern l_int32 dewarpaRestoreModels ( L_DEWARPA *dewa ); -LEPT_DLL extern l_int32 dewarpaInfo ( FILE *fp, L_DEWARPA *dewa ); -LEPT_DLL extern l_int32 dewarpaModelStats ( L_DEWARPA *dewa, l_int32 *pnnone, l_int32 *pnvsuccess, l_int32 *pnvvalid, l_int32 *pnhsuccess, l_int32 *pnhvalid, l_int32 *pnref ); -LEPT_DLL extern l_int32 dewarpaShowArrays ( L_DEWARPA *dewa, l_float32 scalefact, l_int32 first, l_int32 last ); -LEPT_DLL extern l_int32 dewarpDebug ( L_DEWARP *dew, const char *subdirs, l_int32 index ); -LEPT_DLL extern l_int32 dewarpShowResults ( L_DEWARPA *dewa, SARRAY *sa, BOXA *boxa, l_int32 firstpage, l_int32 lastpage, const char *pdfout ); -LEPT_DLL extern L_DNA * l_dnaCreate ( l_int32 n ); -LEPT_DLL extern L_DNA * l_dnaCreateFromIArray ( l_int32 *iarray, l_int32 size ); -LEPT_DLL extern L_DNA * l_dnaCreateFromDArray ( l_float64 *darray, l_int32 size, l_int32 copyflag ); -LEPT_DLL extern L_DNA * l_dnaMakeSequence ( l_float64 startval, l_float64 increment, l_int32 size ); -LEPT_DLL extern void l_dnaDestroy ( L_DNA **pda ); -LEPT_DLL extern L_DNA * l_dnaCopy ( L_DNA *da ); -LEPT_DLL extern L_DNA * l_dnaClone ( L_DNA *da ); -LEPT_DLL extern l_int32 l_dnaEmpty ( L_DNA *da ); -LEPT_DLL extern l_int32 l_dnaAddNumber ( L_DNA *da, l_float64 val ); -LEPT_DLL extern l_int32 l_dnaInsertNumber ( L_DNA *da, l_int32 index, l_float64 val ); -LEPT_DLL extern l_int32 l_dnaRemoveNumber ( L_DNA *da, l_int32 index ); -LEPT_DLL extern l_int32 l_dnaReplaceNumber ( L_DNA *da, l_int32 index, l_float64 val ); -LEPT_DLL extern l_int32 l_dnaGetCount ( L_DNA *da ); -LEPT_DLL extern l_int32 l_dnaSetCount ( L_DNA *da, l_int32 newcount ); -LEPT_DLL extern l_int32 l_dnaGetDValue ( L_DNA *da, l_int32 index, l_float64 *pval ); -LEPT_DLL extern l_int32 l_dnaGetIValue ( L_DNA *da, l_int32 index, l_int32 *pival ); -LEPT_DLL extern l_int32 l_dnaSetValue ( L_DNA *da, l_int32 index, l_float64 val ); -LEPT_DLL extern l_int32 l_dnaShiftValue ( L_DNA *da, l_int32 index, l_float64 diff ); -LEPT_DLL extern l_int32 * l_dnaGetIArray ( L_DNA *da ); -LEPT_DLL extern l_float64 * l_dnaGetDArray ( L_DNA *da, l_int32 copyflag ); -LEPT_DLL extern l_int32 l_dnaGetRefcount ( L_DNA *da ); -LEPT_DLL extern l_int32 l_dnaChangeRefcount ( L_DNA *da, l_int32 delta ); -LEPT_DLL extern l_int32 l_dnaGetParameters ( L_DNA *da, l_float64 *pstartx, l_float64 *pdelx ); -LEPT_DLL extern l_int32 l_dnaSetParameters ( L_DNA *da, l_float64 startx, l_float64 delx ); -LEPT_DLL extern l_int32 l_dnaCopyParameters ( L_DNA *dad, L_DNA *das ); -LEPT_DLL extern L_DNA * l_dnaRead ( const char *filename ); -LEPT_DLL extern L_DNA * l_dnaReadStream ( FILE *fp ); -LEPT_DLL extern l_int32 l_dnaWrite ( const char *filename, L_DNA *da ); -LEPT_DLL extern l_int32 l_dnaWriteStream ( FILE *fp, L_DNA *da ); -LEPT_DLL extern L_DNAA * l_dnaaCreate ( l_int32 n ); -LEPT_DLL extern L_DNAA * l_dnaaCreateFull ( l_int32 nptr, l_int32 n ); -LEPT_DLL extern l_int32 l_dnaaTruncate ( L_DNAA *daa ); -LEPT_DLL extern void l_dnaaDestroy ( L_DNAA **pdaa ); -LEPT_DLL extern l_int32 l_dnaaAddDna ( L_DNAA *daa, L_DNA *da, l_int32 copyflag ); -LEPT_DLL extern l_int32 l_dnaaGetCount ( L_DNAA *daa ); -LEPT_DLL extern l_int32 l_dnaaGetDnaCount ( L_DNAA *daa, l_int32 index ); -LEPT_DLL extern l_int32 l_dnaaGetNumberCount ( L_DNAA *daa ); -LEPT_DLL extern L_DNA * l_dnaaGetDna ( L_DNAA *daa, l_int32 index, l_int32 accessflag ); -LEPT_DLL extern l_int32 l_dnaaReplaceDna ( L_DNAA *daa, l_int32 index, L_DNA *da ); -LEPT_DLL extern l_int32 l_dnaaGetValue ( L_DNAA *daa, l_int32 i, l_int32 j, l_float64 *pval ); -LEPT_DLL extern l_int32 l_dnaaAddNumber ( L_DNAA *daa, l_int32 index, l_float64 val ); -LEPT_DLL extern L_DNAA * l_dnaaRead ( const char *filename ); -LEPT_DLL extern L_DNAA * l_dnaaReadStream ( FILE *fp ); -LEPT_DLL extern l_int32 l_dnaaWrite ( const char *filename, L_DNAA *daa ); -LEPT_DLL extern l_int32 l_dnaaWriteStream ( FILE *fp, L_DNAA *daa ); -LEPT_DLL extern l_int32 l_dnaJoin ( L_DNA *dad, L_DNA *das, l_int32 istart, l_int32 iend ); -LEPT_DLL extern L_DNA * l_dnaaFlattenToDna ( L_DNAA *daa ); -LEPT_DLL extern NUMA * l_dnaConvertToNuma ( L_DNA *da ); -LEPT_DLL extern L_DNA * numaConvertToDna ( NUMA *na ); -LEPT_DLL extern L_DNA * l_dnaUnionByAset ( L_DNA *da1, L_DNA *da2 ); -LEPT_DLL extern L_DNA * l_dnaRemoveDupsByAset ( L_DNA *das ); -LEPT_DLL extern L_DNA * l_dnaIntersectionByAset ( L_DNA *da1, L_DNA *da2 ); -LEPT_DLL extern L_ASET * l_asetCreateFromDna ( L_DNA *da ); -LEPT_DLL extern L_DNA * l_dnaDiffAdjValues ( L_DNA *das ); -LEPT_DLL extern L_DNAHASH * l_dnaHashCreate ( l_int32 nbuckets, l_int32 initsize ); -LEPT_DLL extern void l_dnaHashDestroy ( L_DNAHASH **pdahash ); -LEPT_DLL extern l_int32 l_dnaHashGetCount ( L_DNAHASH *dahash ); -LEPT_DLL extern l_int32 l_dnaHashGetTotalCount ( L_DNAHASH *dahash ); -LEPT_DLL extern L_DNA * l_dnaHashGetDna ( L_DNAHASH *dahash, l_uint64 key, l_int32 copyflag ); -LEPT_DLL extern l_int32 l_dnaHashAdd ( L_DNAHASH *dahash, l_uint64 key, l_float64 value ); -LEPT_DLL extern L_DNAHASH * l_dnaHashCreateFromDna ( L_DNA *da ); -LEPT_DLL extern l_int32 l_dnaRemoveDupsByHash ( L_DNA *das, L_DNA **pdad, L_DNAHASH **pdahash ); -LEPT_DLL extern l_int32 l_dnaMakeHistoByHash ( L_DNA *das, L_DNAHASH **pdahash, L_DNA **pdav, L_DNA **pdac ); -LEPT_DLL extern L_DNA * l_dnaIntersectionByHash ( L_DNA *da1, L_DNA *da2 ); -LEPT_DLL extern l_int32 l_dnaFindValByHash ( L_DNA *da, L_DNAHASH *dahash, l_float64 val, l_int32 *pindex ); -LEPT_DLL extern PIX * pixMorphDwa_2 ( PIX *pixd, PIX *pixs, l_int32 operation, char *selname ); -LEPT_DLL extern PIX * pixFMorphopGen_2 ( PIX *pixd, PIX *pixs, l_int32 operation, char *selname ); -LEPT_DLL extern l_int32 fmorphopgen_low_2 ( l_uint32 *datad, l_int32 w, l_int32 h, l_int32 wpld, l_uint32 *datas, l_int32 wpls, l_int32 index ); -LEPT_DLL extern PIX * pixSobelEdgeFilter ( PIX *pixs, l_int32 orientflag ); -LEPT_DLL extern PIX * pixTwoSidedEdgeFilter ( PIX *pixs, l_int32 orientflag ); -LEPT_DLL extern l_int32 pixMeasureEdgeSmoothness ( PIX *pixs, l_int32 side, l_int32 minjump, l_int32 minreversal, l_float32 *pjpl, l_float32 *pjspl, l_float32 *prpl, const char *debugfile ); -LEPT_DLL extern NUMA * pixGetEdgeProfile ( PIX *pixs, l_int32 side, const char *debugfile ); -LEPT_DLL extern l_int32 pixGetLastOffPixelInRun ( PIX *pixs, l_int32 x, l_int32 y, l_int32 direction, l_int32 *ploc ); -LEPT_DLL extern l_int32 pixGetLastOnPixelInRun ( PIX *pixs, l_int32 x, l_int32 y, l_int32 direction, l_int32 *ploc ); -LEPT_DLL extern char * encodeBase64 ( l_uint8 *inarray, l_int32 insize, l_int32 *poutsize ); -LEPT_DLL extern l_uint8 * decodeBase64 ( const char *inarray, l_int32 insize, l_int32 *poutsize ); -LEPT_DLL extern char * encodeAscii85 ( l_uint8 *inarray, l_int32 insize, l_int32 *poutsize ); -LEPT_DLL extern l_uint8 * decodeAscii85 ( char *inarray, l_int32 insize, l_int32 *poutsize ); -LEPT_DLL extern char * reformatPacked64 ( char *inarray, l_int32 insize, l_int32 leadspace, l_int32 linechars, l_int32 addquotes, l_int32 *poutsize ); -LEPT_DLL extern PIX * pixGammaTRC ( PIX *pixd, PIX *pixs, l_float32 gamma, l_int32 minval, l_int32 maxval ); -LEPT_DLL extern PIX * pixGammaTRCMasked ( PIX *pixd, PIX *pixs, PIX *pixm, l_float32 gamma, l_int32 minval, l_int32 maxval ); -LEPT_DLL extern PIX * pixGammaTRCWithAlpha ( PIX *pixd, PIX *pixs, l_float32 gamma, l_int32 minval, l_int32 maxval ); -LEPT_DLL extern NUMA * numaGammaTRC ( l_float32 gamma, l_int32 minval, l_int32 maxval ); -LEPT_DLL extern PIX * pixContrastTRC ( PIX *pixd, PIX *pixs, l_float32 factor ); -LEPT_DLL extern PIX * pixContrastTRCMasked ( PIX *pixd, PIX *pixs, PIX *pixm, l_float32 factor ); -LEPT_DLL extern NUMA * numaContrastTRC ( l_float32 factor ); -LEPT_DLL extern PIX * pixEqualizeTRC ( PIX *pixd, PIX *pixs, l_float32 fract, l_int32 factor ); -LEPT_DLL extern NUMA * numaEqualizeTRC ( PIX *pix, l_float32 fract, l_int32 factor ); -LEPT_DLL extern l_int32 pixTRCMap ( PIX *pixs, PIX *pixm, NUMA *na ); -LEPT_DLL extern PIX * pixUnsharpMasking ( PIX *pixs, l_int32 halfwidth, l_float32 fract ); -LEPT_DLL extern PIX * pixUnsharpMaskingGray ( PIX *pixs, l_int32 halfwidth, l_float32 fract ); -LEPT_DLL extern PIX * pixUnsharpMaskingFast ( PIX *pixs, l_int32 halfwidth, l_float32 fract, l_int32 direction ); -LEPT_DLL extern PIX * pixUnsharpMaskingGrayFast ( PIX *pixs, l_int32 halfwidth, l_float32 fract, l_int32 direction ); -LEPT_DLL extern PIX * pixUnsharpMaskingGray1D ( PIX *pixs, l_int32 halfwidth, l_float32 fract, l_int32 direction ); -LEPT_DLL extern PIX * pixUnsharpMaskingGray2D ( PIX *pixs, l_int32 halfwidth, l_float32 fract ); -LEPT_DLL extern PIX * pixModifyHue ( PIX *pixd, PIX *pixs, l_float32 fract ); -LEPT_DLL extern PIX * pixModifySaturation ( PIX *pixd, PIX *pixs, l_float32 fract ); -LEPT_DLL extern l_int32 pixMeasureSaturation ( PIX *pixs, l_int32 factor, l_float32 *psat ); -LEPT_DLL extern PIX * pixModifyBrightness ( PIX *pixd, PIX *pixs, l_float32 fract ); -LEPT_DLL extern PIX * pixColorShiftRGB ( PIX *pixs, l_float32 rfract, l_float32 gfract, l_float32 bfract ); -LEPT_DLL extern PIX * pixMultConstantColor ( PIX *pixs, l_float32 rfact, l_float32 gfact, l_float32 bfact ); -LEPT_DLL extern PIX * pixMultMatrixColor ( PIX *pixs, L_KERNEL *kel ); -LEPT_DLL extern PIX * pixHalfEdgeByBandpass ( PIX *pixs, l_int32 sm1h, l_int32 sm1v, l_int32 sm2h, l_int32 sm2v ); -LEPT_DLL extern l_int32 fhmtautogen ( SELA *sela, l_int32 fileindex, const char *filename ); -LEPT_DLL extern l_int32 fhmtautogen1 ( SELA *sela, l_int32 fileindex, const char *filename ); -LEPT_DLL extern l_int32 fhmtautogen2 ( SELA *sela, l_int32 fileindex, const char *filename ); -LEPT_DLL extern PIX * pixHMTDwa_1 ( PIX *pixd, PIX *pixs, const char *selname ); -LEPT_DLL extern PIX * pixFHMTGen_1 ( PIX *pixd, PIX *pixs, const char *selname ); -LEPT_DLL extern l_int32 fhmtgen_low_1 ( l_uint32 *datad, l_int32 w, l_int32 h, l_int32 wpld, l_uint32 *datas, l_int32 wpls, l_int32 index ); -LEPT_DLL extern l_int32 pixItalicWords ( PIX *pixs, BOXA *boxaw, PIX *pixw, BOXA **pboxa, l_int32 debugflag ); -LEPT_DLL extern l_int32 pixOrientDetect ( PIX *pixs, l_float32 *pupconf, l_float32 *pleftconf, l_int32 mincount, l_int32 debug ); -LEPT_DLL extern l_int32 makeOrientDecision ( l_float32 upconf, l_float32 leftconf, l_float32 minupconf, l_float32 minratio, l_int32 *porient, l_int32 debug ); -LEPT_DLL extern l_int32 pixUpDownDetect ( PIX *pixs, l_float32 *pconf, l_int32 mincount, l_int32 debug ); -LEPT_DLL extern l_int32 pixUpDownDetectGeneral ( PIX *pixs, l_float32 *pconf, l_int32 mincount, l_int32 npixels, l_int32 debug ); -LEPT_DLL extern l_int32 pixOrientDetectDwa ( PIX *pixs, l_float32 *pupconf, l_float32 *pleftconf, l_int32 mincount, l_int32 debug ); -LEPT_DLL extern l_int32 pixUpDownDetectDwa ( PIX *pixs, l_float32 *pconf, l_int32 mincount, l_int32 debug ); -LEPT_DLL extern l_int32 pixUpDownDetectGeneralDwa ( PIX *pixs, l_float32 *pconf, l_int32 mincount, l_int32 npixels, l_int32 debug ); -LEPT_DLL extern l_int32 pixMirrorDetect ( PIX *pixs, l_float32 *pconf, l_int32 mincount, l_int32 debug ); -LEPT_DLL extern l_int32 pixMirrorDetectDwa ( PIX *pixs, l_float32 *pconf, l_int32 mincount, l_int32 debug ); -LEPT_DLL extern PIX * pixFlipFHMTGen ( PIX *pixd, PIX *pixs, char *selname ); -LEPT_DLL extern l_int32 fmorphautogen ( SELA *sela, l_int32 fileindex, const char *filename ); -LEPT_DLL extern l_int32 fmorphautogen1 ( SELA *sela, l_int32 fileindex, const char *filename ); -LEPT_DLL extern l_int32 fmorphautogen2 ( SELA *sela, l_int32 fileindex, const char *filename ); -LEPT_DLL extern PIX * pixMorphDwa_1 ( PIX *pixd, PIX *pixs, l_int32 operation, char *selname ); -LEPT_DLL extern PIX * pixFMorphopGen_1 ( PIX *pixd, PIX *pixs, l_int32 operation, char *selname ); -LEPT_DLL extern l_int32 fmorphopgen_low_1 ( l_uint32 *datad, l_int32 w, l_int32 h, l_int32 wpld, l_uint32 *datas, l_int32 wpls, l_int32 index ); -LEPT_DLL extern FPIX * fpixCreate ( l_int32 width, l_int32 height ); -LEPT_DLL extern FPIX * fpixCreateTemplate ( FPIX *fpixs ); -LEPT_DLL extern FPIX * fpixClone ( FPIX *fpix ); -LEPT_DLL extern FPIX * fpixCopy ( FPIX *fpixd, FPIX *fpixs ); -LEPT_DLL extern l_int32 fpixResizeImageData ( FPIX *fpixd, FPIX *fpixs ); -LEPT_DLL extern void fpixDestroy ( FPIX **pfpix ); -LEPT_DLL extern l_int32 fpixGetDimensions ( FPIX *fpix, l_int32 *pw, l_int32 *ph ); -LEPT_DLL extern l_int32 fpixSetDimensions ( FPIX *fpix, l_int32 w, l_int32 h ); -LEPT_DLL extern l_int32 fpixGetWpl ( FPIX *fpix ); -LEPT_DLL extern l_int32 fpixSetWpl ( FPIX *fpix, l_int32 wpl ); -LEPT_DLL extern l_int32 fpixGetRefcount ( FPIX *fpix ); -LEPT_DLL extern l_int32 fpixChangeRefcount ( FPIX *fpix, l_int32 delta ); -LEPT_DLL extern l_int32 fpixGetResolution ( FPIX *fpix, l_int32 *pxres, l_int32 *pyres ); -LEPT_DLL extern l_int32 fpixSetResolution ( FPIX *fpix, l_int32 xres, l_int32 yres ); -LEPT_DLL extern l_int32 fpixCopyResolution ( FPIX *fpixd, FPIX *fpixs ); -LEPT_DLL extern l_float32 * fpixGetData ( FPIX *fpix ); -LEPT_DLL extern l_int32 fpixSetData ( FPIX *fpix, l_float32 *data ); -LEPT_DLL extern l_int32 fpixGetPixel ( FPIX *fpix, l_int32 x, l_int32 y, l_float32 *pval ); -LEPT_DLL extern l_int32 fpixSetPixel ( FPIX *fpix, l_int32 x, l_int32 y, l_float32 val ); -LEPT_DLL extern FPIXA * fpixaCreate ( l_int32 n ); -LEPT_DLL extern FPIXA * fpixaCopy ( FPIXA *fpixa, l_int32 copyflag ); -LEPT_DLL extern void fpixaDestroy ( FPIXA **pfpixa ); -LEPT_DLL extern l_int32 fpixaAddFPix ( FPIXA *fpixa, FPIX *fpix, l_int32 copyflag ); -LEPT_DLL extern l_int32 fpixaGetCount ( FPIXA *fpixa ); -LEPT_DLL extern l_int32 fpixaChangeRefcount ( FPIXA *fpixa, l_int32 delta ); -LEPT_DLL extern FPIX * fpixaGetFPix ( FPIXA *fpixa, l_int32 index, l_int32 accesstype ); -LEPT_DLL extern l_int32 fpixaGetFPixDimensions ( FPIXA *fpixa, l_int32 index, l_int32 *pw, l_int32 *ph ); -LEPT_DLL extern l_float32 * fpixaGetData ( FPIXA *fpixa, l_int32 index ); -LEPT_DLL extern l_int32 fpixaGetPixel ( FPIXA *fpixa, l_int32 index, l_int32 x, l_int32 y, l_float32 *pval ); -LEPT_DLL extern l_int32 fpixaSetPixel ( FPIXA *fpixa, l_int32 index, l_int32 x, l_int32 y, l_float32 val ); -LEPT_DLL extern DPIX * dpixCreate ( l_int32 width, l_int32 height ); -LEPT_DLL extern DPIX * dpixCreateTemplate ( DPIX *dpixs ); -LEPT_DLL extern DPIX * dpixClone ( DPIX *dpix ); -LEPT_DLL extern DPIX * dpixCopy ( DPIX *dpixd, DPIX *dpixs ); -LEPT_DLL extern l_int32 dpixResizeImageData ( DPIX *dpixd, DPIX *dpixs ); -LEPT_DLL extern void dpixDestroy ( DPIX **pdpix ); -LEPT_DLL extern l_int32 dpixGetDimensions ( DPIX *dpix, l_int32 *pw, l_int32 *ph ); -LEPT_DLL extern l_int32 dpixSetDimensions ( DPIX *dpix, l_int32 w, l_int32 h ); -LEPT_DLL extern l_int32 dpixGetWpl ( DPIX *dpix ); -LEPT_DLL extern l_int32 dpixSetWpl ( DPIX *dpix, l_int32 wpl ); -LEPT_DLL extern l_int32 dpixGetRefcount ( DPIX *dpix ); -LEPT_DLL extern l_int32 dpixChangeRefcount ( DPIX *dpix, l_int32 delta ); -LEPT_DLL extern l_int32 dpixGetResolution ( DPIX *dpix, l_int32 *pxres, l_int32 *pyres ); -LEPT_DLL extern l_int32 dpixSetResolution ( DPIX *dpix, l_int32 xres, l_int32 yres ); -LEPT_DLL extern l_int32 dpixCopyResolution ( DPIX *dpixd, DPIX *dpixs ); -LEPT_DLL extern l_float64 * dpixGetData ( DPIX *dpix ); -LEPT_DLL extern l_int32 dpixSetData ( DPIX *dpix, l_float64 *data ); -LEPT_DLL extern l_int32 dpixGetPixel ( DPIX *dpix, l_int32 x, l_int32 y, l_float64 *pval ); -LEPT_DLL extern l_int32 dpixSetPixel ( DPIX *dpix, l_int32 x, l_int32 y, l_float64 val ); -LEPT_DLL extern FPIX * fpixRead ( const char *filename ); -LEPT_DLL extern FPIX * fpixReadStream ( FILE *fp ); -LEPT_DLL extern FPIX * fpixReadMem ( const l_uint8 *data, size_t size ); -LEPT_DLL extern l_int32 fpixWrite ( const char *filename, FPIX *fpix ); -LEPT_DLL extern l_int32 fpixWriteStream ( FILE *fp, FPIX *fpix ); -LEPT_DLL extern l_int32 fpixWriteMem ( l_uint8 **pdata, size_t *psize, FPIX *fpix ); -LEPT_DLL extern FPIX * fpixEndianByteSwap ( FPIX *fpixd, FPIX *fpixs ); -LEPT_DLL extern DPIX * dpixRead ( const char *filename ); -LEPT_DLL extern DPIX * dpixReadStream ( FILE *fp ); -LEPT_DLL extern DPIX * dpixReadMem ( const l_uint8 *data, size_t size ); -LEPT_DLL extern l_int32 dpixWrite ( const char *filename, DPIX *dpix ); -LEPT_DLL extern l_int32 dpixWriteStream ( FILE *fp, DPIX *dpix ); -LEPT_DLL extern l_int32 dpixWriteMem ( l_uint8 **pdata, size_t *psize, DPIX *dpix ); -LEPT_DLL extern DPIX * dpixEndianByteSwap ( DPIX *dpixd, DPIX *dpixs ); -LEPT_DLL extern l_int32 fpixPrintStream ( FILE *fp, FPIX *fpix, l_int32 factor ); -LEPT_DLL extern FPIX * pixConvertToFPix ( PIX *pixs, l_int32 ncomps ); -LEPT_DLL extern DPIX * pixConvertToDPix ( PIX *pixs, l_int32 ncomps ); -LEPT_DLL extern PIX * fpixConvertToPix ( FPIX *fpixs, l_int32 outdepth, l_int32 negvals, l_int32 errorflag ); -LEPT_DLL extern PIX * fpixDisplayMaxDynamicRange ( FPIX *fpixs ); -LEPT_DLL extern DPIX * fpixConvertToDPix ( FPIX *fpix ); -LEPT_DLL extern PIX * dpixConvertToPix ( DPIX *dpixs, l_int32 outdepth, l_int32 negvals, l_int32 errorflag ); -LEPT_DLL extern FPIX * dpixConvertToFPix ( DPIX *dpix ); -LEPT_DLL extern l_int32 fpixGetMin ( FPIX *fpix, l_float32 *pminval, l_int32 *pxminloc, l_int32 *pyminloc ); -LEPT_DLL extern l_int32 fpixGetMax ( FPIX *fpix, l_float32 *pmaxval, l_int32 *pxmaxloc, l_int32 *pymaxloc ); -LEPT_DLL extern l_int32 dpixGetMin ( DPIX *dpix, l_float64 *pminval, l_int32 *pxminloc, l_int32 *pyminloc ); -LEPT_DLL extern l_int32 dpixGetMax ( DPIX *dpix, l_float64 *pmaxval, l_int32 *pxmaxloc, l_int32 *pymaxloc ); -LEPT_DLL extern FPIX * fpixScaleByInteger ( FPIX *fpixs, l_int32 factor ); -LEPT_DLL extern DPIX * dpixScaleByInteger ( DPIX *dpixs, l_int32 factor ); -LEPT_DLL extern FPIX * fpixLinearCombination ( FPIX *fpixd, FPIX *fpixs1, FPIX *fpixs2, l_float32 a, l_float32 b ); -LEPT_DLL extern l_int32 fpixAddMultConstant ( FPIX *fpix, l_float32 addc, l_float32 multc ); -LEPT_DLL extern DPIX * dpixLinearCombination ( DPIX *dpixd, DPIX *dpixs1, DPIX *dpixs2, l_float32 a, l_float32 b ); -LEPT_DLL extern l_int32 dpixAddMultConstant ( DPIX *dpix, l_float64 addc, l_float64 multc ); -LEPT_DLL extern l_int32 fpixSetAllArbitrary ( FPIX *fpix, l_float32 inval ); -LEPT_DLL extern l_int32 dpixSetAllArbitrary ( DPIX *dpix, l_float64 inval ); -LEPT_DLL extern FPIX * fpixAddBorder ( FPIX *fpixs, l_int32 left, l_int32 right, l_int32 top, l_int32 bot ); -LEPT_DLL extern FPIX * fpixRemoveBorder ( FPIX *fpixs, l_int32 left, l_int32 right, l_int32 top, l_int32 bot ); -LEPT_DLL extern FPIX * fpixAddMirroredBorder ( FPIX *fpixs, l_int32 left, l_int32 right, l_int32 top, l_int32 bot ); -LEPT_DLL extern FPIX * fpixAddContinuedBorder ( FPIX *fpixs, l_int32 left, l_int32 right, l_int32 top, l_int32 bot ); -LEPT_DLL extern FPIX * fpixAddSlopeBorder ( FPIX *fpixs, l_int32 left, l_int32 right, l_int32 top, l_int32 bot ); -LEPT_DLL extern l_int32 fpixRasterop ( FPIX *fpixd, l_int32 dx, l_int32 dy, l_int32 dw, l_int32 dh, FPIX *fpixs, l_int32 sx, l_int32 sy ); -LEPT_DLL extern FPIX * fpixRotateOrth ( FPIX *fpixs, l_int32 quads ); -LEPT_DLL extern FPIX * fpixRotate180 ( FPIX *fpixd, FPIX *fpixs ); -LEPT_DLL extern FPIX * fpixRotate90 ( FPIX *fpixs, l_int32 direction ); -LEPT_DLL extern FPIX * fpixFlipLR ( FPIX *fpixd, FPIX *fpixs ); -LEPT_DLL extern FPIX * fpixFlipTB ( FPIX *fpixd, FPIX *fpixs ); -LEPT_DLL extern FPIX * fpixAffinePta ( FPIX *fpixs, PTA *ptad, PTA *ptas, l_int32 border, l_float32 inval ); -LEPT_DLL extern FPIX * fpixAffine ( FPIX *fpixs, l_float32 *vc, l_float32 inval ); -LEPT_DLL extern FPIX * fpixProjectivePta ( FPIX *fpixs, PTA *ptad, PTA *ptas, l_int32 border, l_float32 inval ); -LEPT_DLL extern FPIX * fpixProjective ( FPIX *fpixs, l_float32 *vc, l_float32 inval ); -LEPT_DLL extern l_int32 linearInterpolatePixelFloat ( l_float32 *datas, l_int32 w, l_int32 h, l_float32 x, l_float32 y, l_float32 inval, l_float32 *pval ); -LEPT_DLL extern PIX * fpixThresholdToPix ( FPIX *fpix, l_float32 thresh ); -LEPT_DLL extern FPIX * pixComponentFunction ( PIX *pix, l_float32 rnum, l_float32 gnum, l_float32 bnum, l_float32 rdenom, l_float32 gdenom, l_float32 bdenom ); -LEPT_DLL extern PIX * pixReadStreamGif ( FILE *fp ); -LEPT_DLL extern l_int32 pixWriteStreamGif ( FILE *fp, PIX *pix ); -LEPT_DLL extern PIX * pixReadMemGif ( const l_uint8 *cdata, size_t size ); -LEPT_DLL extern l_int32 pixWriteMemGif ( l_uint8 **pdata, size_t *psize, PIX *pix ); -LEPT_DLL extern GPLOT * gplotCreate ( const char *rootname, l_int32 outformat, const char *title, const char *xlabel, const char *ylabel ); -LEPT_DLL extern void gplotDestroy ( GPLOT **pgplot ); -LEPT_DLL extern l_int32 gplotAddPlot ( GPLOT *gplot, NUMA *nax, NUMA *nay, l_int32 plotstyle, const char *plottitle ); -LEPT_DLL extern l_int32 gplotSetScaling ( GPLOT *gplot, l_int32 scaling ); -LEPT_DLL extern l_int32 gplotMakeOutput ( GPLOT *gplot ); -LEPT_DLL extern l_int32 gplotGenCommandFile ( GPLOT *gplot ); -LEPT_DLL extern l_int32 gplotGenDataFiles ( GPLOT *gplot ); -LEPT_DLL extern l_int32 gplotSimple1 ( NUMA *na, l_int32 outformat, const char *outroot, const char *title ); -LEPT_DLL extern l_int32 gplotSimple2 ( NUMA *na1, NUMA *na2, l_int32 outformat, const char *outroot, const char *title ); -LEPT_DLL extern l_int32 gplotSimpleN ( NUMAA *naa, l_int32 outformat, const char *outroot, const char *title ); -LEPT_DLL extern l_int32 gplotSimpleXY1 ( NUMA *nax, NUMA *nay, l_int32 plotstyle, l_int32 outformat, const char *outroot, const char *title ); -LEPT_DLL extern l_int32 gplotSimpleXY2 ( NUMA *nax, NUMA *nay1, NUMA *nay2, l_int32 plotstyle, l_int32 outformat, const char *outroot, const char *title ); -LEPT_DLL extern l_int32 gplotSimpleXYN ( NUMA *nax, NUMAA *naay, l_int32 plotstyle, l_int32 outformat, const char *outroot, const char *title ); -LEPT_DLL extern GPLOT * gplotRead ( const char *filename ); -LEPT_DLL extern l_int32 gplotWrite ( const char *filename, GPLOT *gplot ); -LEPT_DLL extern PTA * generatePtaLine ( l_int32 x1, l_int32 y1, l_int32 x2, l_int32 y2 ); -LEPT_DLL extern PTA * generatePtaWideLine ( l_int32 x1, l_int32 y1, l_int32 x2, l_int32 y2, l_int32 width ); -LEPT_DLL extern PTA * generatePtaBox ( BOX *box, l_int32 width ); -LEPT_DLL extern PTA * generatePtaBoxa ( BOXA *boxa, l_int32 width, l_int32 removedups ); -LEPT_DLL extern PTA * generatePtaHashBox ( BOX *box, l_int32 spacing, l_int32 width, l_int32 orient, l_int32 outline ); -LEPT_DLL extern PTA * generatePtaHashBoxa ( BOXA *boxa, l_int32 spacing, l_int32 width, l_int32 orient, l_int32 outline, l_int32 removedups ); -LEPT_DLL extern PTAA * generatePtaaBoxa ( BOXA *boxa ); -LEPT_DLL extern PTAA * generatePtaaHashBoxa ( BOXA *boxa, l_int32 spacing, l_int32 width, l_int32 orient, l_int32 outline ); -LEPT_DLL extern PTA * generatePtaPolyline ( PTA *ptas, l_int32 width, l_int32 closeflag, l_int32 removedups ); -LEPT_DLL extern PTA * generatePtaGrid ( l_int32 w, l_int32 h, l_int32 nx, l_int32 ny, l_int32 width ); -LEPT_DLL extern PTA * convertPtaLineTo4cc ( PTA *ptas ); -LEPT_DLL extern PTA * generatePtaFilledCircle ( l_int32 radius ); -LEPT_DLL extern PTA * generatePtaFilledSquare ( l_int32 side ); -LEPT_DLL extern PTA * generatePtaLineFromPt ( l_int32 x, l_int32 y, l_float64 length, l_float64 radang ); -LEPT_DLL extern l_int32 locatePtRadially ( l_int32 xr, l_int32 yr, l_float64 dist, l_float64 radang, l_float64 *px, l_float64 *py ); -LEPT_DLL extern l_int32 pixRenderPlotFromNuma ( PIX **ppix, NUMA *na, l_int32 plotloc, l_int32 linewidth, l_int32 max, l_uint32 color ); -LEPT_DLL extern PTA * makePlotPtaFromNuma ( NUMA *na, l_int32 size, l_int32 plotloc, l_int32 linewidth, l_int32 max ); -LEPT_DLL extern l_int32 pixRenderPlotFromNumaGen ( PIX **ppix, NUMA *na, l_int32 orient, l_int32 linewidth, l_int32 refpos, l_int32 max, l_int32 drawref, l_uint32 color ); -LEPT_DLL extern PTA * makePlotPtaFromNumaGen ( NUMA *na, l_int32 orient, l_int32 linewidth, l_int32 refpos, l_int32 max, l_int32 drawref ); -LEPT_DLL extern l_int32 pixRenderPta ( PIX *pix, PTA *pta, l_int32 op ); -LEPT_DLL extern l_int32 pixRenderPtaArb ( PIX *pix, PTA *pta, l_uint8 rval, l_uint8 gval, l_uint8 bval ); -LEPT_DLL extern l_int32 pixRenderPtaBlend ( PIX *pix, PTA *pta, l_uint8 rval, l_uint8 gval, l_uint8 bval, l_float32 fract ); -LEPT_DLL extern l_int32 pixRenderLine ( PIX *pix, l_int32 x1, l_int32 y1, l_int32 x2, l_int32 y2, l_int32 width, l_int32 op ); -LEPT_DLL extern l_int32 pixRenderLineArb ( PIX *pix, l_int32 x1, l_int32 y1, l_int32 x2, l_int32 y2, l_int32 width, l_uint8 rval, l_uint8 gval, l_uint8 bval ); -LEPT_DLL extern l_int32 pixRenderLineBlend ( PIX *pix, l_int32 x1, l_int32 y1, l_int32 x2, l_int32 y2, l_int32 width, l_uint8 rval, l_uint8 gval, l_uint8 bval, l_float32 fract ); -LEPT_DLL extern l_int32 pixRenderBox ( PIX *pix, BOX *box, l_int32 width, l_int32 op ); -LEPT_DLL extern l_int32 pixRenderBoxArb ( PIX *pix, BOX *box, l_int32 width, l_uint8 rval, l_uint8 gval, l_uint8 bval ); -LEPT_DLL extern l_int32 pixRenderBoxBlend ( PIX *pix, BOX *box, l_int32 width, l_uint8 rval, l_uint8 gval, l_uint8 bval, l_float32 fract ); -LEPT_DLL extern l_int32 pixRenderBoxa ( PIX *pix, BOXA *boxa, l_int32 width, l_int32 op ); -LEPT_DLL extern l_int32 pixRenderBoxaArb ( PIX *pix, BOXA *boxa, l_int32 width, l_uint8 rval, l_uint8 gval, l_uint8 bval ); -LEPT_DLL extern l_int32 pixRenderBoxaBlend ( PIX *pix, BOXA *boxa, l_int32 width, l_uint8 rval, l_uint8 gval, l_uint8 bval, l_float32 fract, l_int32 removedups ); -LEPT_DLL extern l_int32 pixRenderHashBox ( PIX *pix, BOX *box, l_int32 spacing, l_int32 width, l_int32 orient, l_int32 outline, l_int32 op ); -LEPT_DLL extern l_int32 pixRenderHashBoxArb ( PIX *pix, BOX *box, l_int32 spacing, l_int32 width, l_int32 orient, l_int32 outline, l_int32 rval, l_int32 gval, l_int32 bval ); -LEPT_DLL extern l_int32 pixRenderHashBoxBlend ( PIX *pix, BOX *box, l_int32 spacing, l_int32 width, l_int32 orient, l_int32 outline, l_int32 rval, l_int32 gval, l_int32 bval, l_float32 fract ); -LEPT_DLL extern l_int32 pixRenderHashBoxa ( PIX *pix, BOXA *boxa, l_int32 spacing, l_int32 width, l_int32 orient, l_int32 outline, l_int32 op ); -LEPT_DLL extern l_int32 pixRenderHashBoxaArb ( PIX *pix, BOXA *boxa, l_int32 spacing, l_int32 width, l_int32 orient, l_int32 outline, l_int32 rval, l_int32 gval, l_int32 bval ); -LEPT_DLL extern l_int32 pixRenderHashBoxaBlend ( PIX *pix, BOXA *boxa, l_int32 spacing, l_int32 width, l_int32 orient, l_int32 outline, l_int32 rval, l_int32 gval, l_int32 bval, l_float32 fract ); -LEPT_DLL extern l_int32 pixRenderPolyline ( PIX *pix, PTA *ptas, l_int32 width, l_int32 op, l_int32 closeflag ); -LEPT_DLL extern l_int32 pixRenderPolylineArb ( PIX *pix, PTA *ptas, l_int32 width, l_uint8 rval, l_uint8 gval, l_uint8 bval, l_int32 closeflag ); -LEPT_DLL extern l_int32 pixRenderPolylineBlend ( PIX *pix, PTA *ptas, l_int32 width, l_uint8 rval, l_uint8 gval, l_uint8 bval, l_float32 fract, l_int32 closeflag, l_int32 removedups ); -LEPT_DLL extern l_int32 pixRenderGridArb ( PIX *pix, l_int32 nx, l_int32 ny, l_int32 width, l_uint8 rval, l_uint8 gval, l_uint8 bval ); -LEPT_DLL extern PIX * pixRenderRandomCmapPtaa ( PIX *pix, PTAA *ptaa, l_int32 polyflag, l_int32 width, l_int32 closeflag ); -LEPT_DLL extern PIX * pixRenderPolygon ( PTA *ptas, l_int32 width, l_int32 *pxmin, l_int32 *pymin ); -LEPT_DLL extern PIX * pixFillPolygon ( PIX *pixs, PTA *pta, l_int32 xmin, l_int32 ymin ); -LEPT_DLL extern PIX * pixRenderContours ( PIX *pixs, l_int32 startval, l_int32 incr, l_int32 outdepth ); -LEPT_DLL extern PIX * fpixAutoRenderContours ( FPIX *fpix, l_int32 ncontours ); -LEPT_DLL extern PIX * fpixRenderContours ( FPIX *fpixs, l_float32 incr, l_float32 proxim ); -LEPT_DLL extern PTA * pixGeneratePtaBoundary ( PIX *pixs, l_int32 width ); -LEPT_DLL extern PIX * pixErodeGray ( PIX *pixs, l_int32 hsize, l_int32 vsize ); -LEPT_DLL extern PIX * pixDilateGray ( PIX *pixs, l_int32 hsize, l_int32 vsize ); -LEPT_DLL extern PIX * pixOpenGray ( PIX *pixs, l_int32 hsize, l_int32 vsize ); -LEPT_DLL extern PIX * pixCloseGray ( PIX *pixs, l_int32 hsize, l_int32 vsize ); -LEPT_DLL extern PIX * pixErodeGray3 ( PIX *pixs, l_int32 hsize, l_int32 vsize ); -LEPT_DLL extern PIX * pixDilateGray3 ( PIX *pixs, l_int32 hsize, l_int32 vsize ); -LEPT_DLL extern PIX * pixOpenGray3 ( PIX *pixs, l_int32 hsize, l_int32 vsize ); -LEPT_DLL extern PIX * pixCloseGray3 ( PIX *pixs, l_int32 hsize, l_int32 vsize ); -LEPT_DLL extern PIX * pixDitherToBinary ( PIX *pixs ); -LEPT_DLL extern PIX * pixDitherToBinarySpec ( PIX *pixs, l_int32 lowerclip, l_int32 upperclip ); -LEPT_DLL extern PIX * pixThresholdToBinary ( PIX *pixs, l_int32 thresh ); -LEPT_DLL extern PIX * pixVarThresholdToBinary ( PIX *pixs, PIX *pixg ); -LEPT_DLL extern PIX * pixAdaptThresholdToBinary ( PIX *pixs, PIX *pixm, l_float32 gamma ); -LEPT_DLL extern PIX * pixAdaptThresholdToBinaryGen ( PIX *pixs, PIX *pixm, l_float32 gamma, l_int32 blackval, l_int32 whiteval, l_int32 thresh ); -LEPT_DLL extern PIX * pixGenerateMaskByValue ( PIX *pixs, l_int32 val, l_int32 usecmap ); -LEPT_DLL extern PIX * pixGenerateMaskByBand ( PIX *pixs, l_int32 lower, l_int32 upper, l_int32 inband, l_int32 usecmap ); -LEPT_DLL extern PIX * pixDitherTo2bpp ( PIX *pixs, l_int32 cmapflag ); -LEPT_DLL extern PIX * pixDitherTo2bppSpec ( PIX *pixs, l_int32 lowerclip, l_int32 upperclip, l_int32 cmapflag ); -LEPT_DLL extern PIX * pixThresholdTo2bpp ( PIX *pixs, l_int32 nlevels, l_int32 cmapflag ); -LEPT_DLL extern PIX * pixThresholdTo4bpp ( PIX *pixs, l_int32 nlevels, l_int32 cmapflag ); -LEPT_DLL extern PIX * pixThresholdOn8bpp ( PIX *pixs, l_int32 nlevels, l_int32 cmapflag ); -LEPT_DLL extern PIX * pixThresholdGrayArb ( PIX *pixs, const char *edgevals, l_int32 outdepth, l_int32 use_average, l_int32 setblack, l_int32 setwhite ); -LEPT_DLL extern l_int32 * makeGrayQuantIndexTable ( l_int32 nlevels ); -LEPT_DLL extern l_int32 * makeGrayQuantTargetTable ( l_int32 nlevels, l_int32 depth ); -LEPT_DLL extern l_int32 makeGrayQuantTableArb ( NUMA *na, l_int32 outdepth, l_int32 **ptab, PIXCMAP **pcmap ); -LEPT_DLL extern l_int32 makeGrayQuantColormapArb ( PIX *pixs, l_int32 *tab, l_int32 outdepth, PIXCMAP **pcmap ); -LEPT_DLL extern PIX * pixGenerateMaskByBand32 ( PIX *pixs, l_uint32 refval, l_int32 delm, l_int32 delp, l_float32 fractm, l_float32 fractp ); -LEPT_DLL extern PIX * pixGenerateMaskByDiscr32 ( PIX *pixs, l_uint32 refval1, l_uint32 refval2, l_int32 distflag ); -LEPT_DLL extern PIX * pixGrayQuantFromHisto ( PIX *pixd, PIX *pixs, PIX *pixm, l_float32 minfract, l_int32 maxsize ); -LEPT_DLL extern PIX * pixGrayQuantFromCmap ( PIX *pixs, PIXCMAP *cmap, l_int32 mindepth ); -LEPT_DLL extern void ditherToBinaryLow ( l_uint32 *datad, l_int32 w, l_int32 h, l_int32 wpld, l_uint32 *datas, l_int32 wpls, l_uint32 *bufs1, l_uint32 *bufs2, l_int32 lowerclip, l_int32 upperclip ); -LEPT_DLL extern void ditherToBinaryLineLow ( l_uint32 *lined, l_int32 w, l_uint32 *bufs1, l_uint32 *bufs2, l_int32 lowerclip, l_int32 upperclip, l_int32 lastlineflag ); -LEPT_DLL extern void thresholdToBinaryLow ( l_uint32 *datad, l_int32 w, l_int32 h, l_int32 wpld, l_uint32 *datas, l_int32 d, l_int32 wpls, l_int32 thresh ); -LEPT_DLL extern void thresholdToBinaryLineLow ( l_uint32 *lined, l_int32 w, l_uint32 *lines, l_int32 d, l_int32 thresh ); -LEPT_DLL extern void ditherTo2bppLow ( l_uint32 *datad, l_int32 w, l_int32 h, l_int32 wpld, l_uint32 *datas, l_int32 wpls, l_uint32 *bufs1, l_uint32 *bufs2, l_int32 *tabval, l_int32 *tab38, l_int32 *tab14 ); -LEPT_DLL extern void ditherTo2bppLineLow ( l_uint32 *lined, l_int32 w, l_uint32 *bufs1, l_uint32 *bufs2, l_int32 *tabval, l_int32 *tab38, l_int32 *tab14, l_int32 lastlineflag ); -LEPT_DLL extern l_int32 make8To2DitherTables ( l_int32 **ptabval, l_int32 **ptab38, l_int32 **ptab14, l_int32 cliptoblack, l_int32 cliptowhite ); -LEPT_DLL extern void thresholdTo2bppLow ( l_uint32 *datad, l_int32 h, l_int32 wpld, l_uint32 *datas, l_int32 wpls, l_int32 *tab ); -LEPT_DLL extern void thresholdTo4bppLow ( l_uint32 *datad, l_int32 h, l_int32 wpld, l_uint32 *datas, l_int32 wpls, l_int32 *tab ); -LEPT_DLL extern L_HEAP * lheapCreate ( l_int32 nalloc, l_int32 direction ); -LEPT_DLL extern void lheapDestroy ( L_HEAP **plh, l_int32 freeflag ); -LEPT_DLL extern l_int32 lheapAdd ( L_HEAP *lh, void *item ); -LEPT_DLL extern void * lheapRemove ( L_HEAP *lh ); -LEPT_DLL extern l_int32 lheapGetCount ( L_HEAP *lh ); -LEPT_DLL extern l_int32 lheapSwapUp ( L_HEAP *lh, l_int32 index ); -LEPT_DLL extern l_int32 lheapSwapDown ( L_HEAP *lh ); -LEPT_DLL extern l_int32 lheapSort ( L_HEAP *lh ); -LEPT_DLL extern l_int32 lheapSortStrictOrder ( L_HEAP *lh ); -LEPT_DLL extern l_int32 lheapPrint ( FILE *fp, L_HEAP *lh ); -LEPT_DLL extern JBCLASSER * jbRankHausInit ( l_int32 components, l_int32 maxwidth, l_int32 maxheight, l_int32 size, l_float32 rank ); -LEPT_DLL extern JBCLASSER * jbCorrelationInit ( l_int32 components, l_int32 maxwidth, l_int32 maxheight, l_float32 thresh, l_float32 weightfactor ); -LEPT_DLL extern JBCLASSER * jbCorrelationInitWithoutComponents ( l_int32 components, l_int32 maxwidth, l_int32 maxheight, l_float32 thresh, l_float32 weightfactor ); -LEPT_DLL extern l_int32 jbAddPages ( JBCLASSER *classer, SARRAY *safiles ); -LEPT_DLL extern l_int32 jbAddPage ( JBCLASSER *classer, PIX *pixs ); -LEPT_DLL extern l_int32 jbAddPageComponents ( JBCLASSER *classer, PIX *pixs, BOXA *boxas, PIXA *pixas ); -LEPT_DLL extern l_int32 jbClassifyRankHaus ( JBCLASSER *classer, BOXA *boxa, PIXA *pixas ); -LEPT_DLL extern l_int32 pixHaustest ( PIX *pix1, PIX *pix2, PIX *pix3, PIX *pix4, l_float32 delx, l_float32 dely, l_int32 maxdiffw, l_int32 maxdiffh ); -LEPT_DLL extern l_int32 pixRankHaustest ( PIX *pix1, PIX *pix2, PIX *pix3, PIX *pix4, l_float32 delx, l_float32 dely, l_int32 maxdiffw, l_int32 maxdiffh, l_int32 area1, l_int32 area3, l_float32 rank, l_int32 *tab8 ); -LEPT_DLL extern l_int32 jbClassifyCorrelation ( JBCLASSER *classer, BOXA *boxa, PIXA *pixas ); -LEPT_DLL extern l_int32 jbGetComponents ( PIX *pixs, l_int32 components, l_int32 maxwidth, l_int32 maxheight, BOXA **pboxad, PIXA **ppixad ); -LEPT_DLL extern l_int32 pixWordMaskByDilation ( PIX *pixs, l_int32 maxdil, PIX **ppixm, l_int32 *psize ); -LEPT_DLL extern l_int32 pixWordBoxesByDilation ( PIX *pixs, l_int32 maxdil, l_int32 minwidth, l_int32 minheight, l_int32 maxwidth, l_int32 maxheight, BOXA **pboxa, l_int32 *psize ); -LEPT_DLL extern PIXA * jbAccumulateComposites ( PIXAA *pixaa, NUMA **pna, PTA **pptat ); -LEPT_DLL extern PIXA * jbTemplatesFromComposites ( PIXA *pixac, NUMA *na ); -LEPT_DLL extern JBCLASSER * jbClasserCreate ( l_int32 method, l_int32 components ); -LEPT_DLL extern void jbClasserDestroy ( JBCLASSER **pclasser ); -LEPT_DLL extern JBDATA * jbDataSave ( JBCLASSER *classer ); -LEPT_DLL extern void jbDataDestroy ( JBDATA **pdata ); -LEPT_DLL extern l_int32 jbDataWrite ( const char *rootout, JBDATA *jbdata ); -LEPT_DLL extern JBDATA * jbDataRead ( const char *rootname ); -LEPT_DLL extern PIXA * jbDataRender ( JBDATA *data, l_int32 debugflag ); -LEPT_DLL extern l_int32 jbGetULCorners ( JBCLASSER *classer, PIX *pixs, BOXA *boxa ); -LEPT_DLL extern l_int32 jbGetLLCorners ( JBCLASSER *classer ); -LEPT_DLL extern l_int32 readHeaderJp2k ( const char *filename, l_int32 *pw, l_int32 *ph, l_int32 *pbps, l_int32 *pspp ); -LEPT_DLL extern l_int32 freadHeaderJp2k ( FILE *fp, l_int32 *pw, l_int32 *ph, l_int32 *pbps, l_int32 *pspp ); -LEPT_DLL extern l_int32 readHeaderMemJp2k ( const l_uint8 *data, size_t size, l_int32 *pw, l_int32 *ph, l_int32 *pbps, l_int32 *pspp ); -LEPT_DLL extern l_int32 fgetJp2kResolution ( FILE *fp, l_int32 *pxres, l_int32 *pyres ); -LEPT_DLL extern PIX * pixReadJp2k ( const char *filename, l_uint32 reduction, BOX *box, l_int32 hint, l_int32 debug ); -LEPT_DLL extern PIX * pixReadStreamJp2k ( FILE *fp, l_uint32 reduction, BOX *box, l_int32 hint, l_int32 debug ); -LEPT_DLL extern l_int32 pixWriteJp2k ( const char *filename, PIX *pix, l_int32 quality, l_int32 nlevels, l_int32 hint, l_int32 debug ); -LEPT_DLL extern l_int32 pixWriteStreamJp2k ( FILE *fp, PIX *pix, l_int32 quality, l_int32 nlevels, l_int32 hint, l_int32 debug ); -LEPT_DLL extern PIX * pixReadMemJp2k ( const l_uint8 *data, size_t size, l_uint32 reduction, BOX *box, l_int32 hint, l_int32 debug ); -LEPT_DLL extern l_int32 pixWriteMemJp2k ( l_uint8 **pdata, size_t *psize, PIX *pix, l_int32 quality, l_int32 nlevels, l_int32 hint, l_int32 debug ); -LEPT_DLL extern PIX * pixReadJpeg ( const char *filename, l_int32 cmapflag, l_int32 reduction, l_int32 *pnwarn, l_int32 hint ); -LEPT_DLL extern PIX * pixReadStreamJpeg ( FILE *fp, l_int32 cmapflag, l_int32 reduction, l_int32 *pnwarn, l_int32 hint ); -LEPT_DLL extern l_int32 readHeaderJpeg ( const char *filename, l_int32 *pw, l_int32 *ph, l_int32 *pspp, l_int32 *pycck, l_int32 *pcmyk ); -LEPT_DLL extern l_int32 freadHeaderJpeg ( FILE *fp, l_int32 *pw, l_int32 *ph, l_int32 *pspp, l_int32 *pycck, l_int32 *pcmyk ); -LEPT_DLL extern l_int32 fgetJpegResolution ( FILE *fp, l_int32 *pxres, l_int32 *pyres ); -LEPT_DLL extern l_int32 fgetJpegComment ( FILE *fp, l_uint8 **pcomment ); -LEPT_DLL extern l_int32 pixWriteJpeg ( const char *filename, PIX *pix, l_int32 quality, l_int32 progressive ); -LEPT_DLL extern l_int32 pixWriteStreamJpeg ( FILE *fp, PIX *pixs, l_int32 quality, l_int32 progressive ); -LEPT_DLL extern PIX * pixReadMemJpeg ( const l_uint8 *data, size_t size, l_int32 cmflag, l_int32 reduction, l_int32 *pnwarn, l_int32 hint ); -LEPT_DLL extern l_int32 readHeaderMemJpeg ( const l_uint8 *data, size_t size, l_int32 *pw, l_int32 *ph, l_int32 *pspp, l_int32 *pycck, l_int32 *pcmyk ); -LEPT_DLL extern l_int32 pixWriteMemJpeg ( l_uint8 **pdata, size_t *psize, PIX *pix, l_int32 quality, l_int32 progressive ); -LEPT_DLL extern l_int32 pixSetChromaSampling ( PIX *pix, l_int32 sampling ); -LEPT_DLL extern L_KERNEL * kernelCreate ( l_int32 height, l_int32 width ); -LEPT_DLL extern void kernelDestroy ( L_KERNEL **pkel ); -LEPT_DLL extern L_KERNEL * kernelCopy ( L_KERNEL *kels ); -LEPT_DLL extern l_int32 kernelGetElement ( L_KERNEL *kel, l_int32 row, l_int32 col, l_float32 *pval ); -LEPT_DLL extern l_int32 kernelSetElement ( L_KERNEL *kel, l_int32 row, l_int32 col, l_float32 val ); -LEPT_DLL extern l_int32 kernelGetParameters ( L_KERNEL *kel, l_int32 *psy, l_int32 *psx, l_int32 *pcy, l_int32 *pcx ); -LEPT_DLL extern l_int32 kernelSetOrigin ( L_KERNEL *kel, l_int32 cy, l_int32 cx ); -LEPT_DLL extern l_int32 kernelGetSum ( L_KERNEL *kel, l_float32 *psum ); -LEPT_DLL extern l_int32 kernelGetMinMax ( L_KERNEL *kel, l_float32 *pmin, l_float32 *pmax ); -LEPT_DLL extern L_KERNEL * kernelNormalize ( L_KERNEL *kels, l_float32 normsum ); -LEPT_DLL extern L_KERNEL * kernelInvert ( L_KERNEL *kels ); -LEPT_DLL extern l_float32 ** create2dFloatArray ( l_int32 sy, l_int32 sx ); -LEPT_DLL extern L_KERNEL * kernelRead ( const char *fname ); -LEPT_DLL extern L_KERNEL * kernelReadStream ( FILE *fp ); -LEPT_DLL extern l_int32 kernelWrite ( const char *fname, L_KERNEL *kel ); -LEPT_DLL extern l_int32 kernelWriteStream ( FILE *fp, L_KERNEL *kel ); -LEPT_DLL extern L_KERNEL * kernelCreateFromString ( l_int32 h, l_int32 w, l_int32 cy, l_int32 cx, const char *kdata ); -LEPT_DLL extern L_KERNEL * kernelCreateFromFile ( const char *filename ); -LEPT_DLL extern L_KERNEL * kernelCreateFromPix ( PIX *pix, l_int32 cy, l_int32 cx ); -LEPT_DLL extern PIX * kernelDisplayInPix ( L_KERNEL *kel, l_int32 size, l_int32 gthick ); -LEPT_DLL extern NUMA * parseStringForNumbers ( const char *str, const char *seps ); -LEPT_DLL extern L_KERNEL * makeFlatKernel ( l_int32 height, l_int32 width, l_int32 cy, l_int32 cx ); -LEPT_DLL extern L_KERNEL * makeGaussianKernel ( l_int32 halfheight, l_int32 halfwidth, l_float32 stdev, l_float32 max ); -LEPT_DLL extern l_int32 makeGaussianKernelSep ( l_int32 halfheight, l_int32 halfwidth, l_float32 stdev, l_float32 max, L_KERNEL **pkelx, L_KERNEL **pkely ); -LEPT_DLL extern L_KERNEL * makeDoGKernel ( l_int32 halfheight, l_int32 halfwidth, l_float32 stdev, l_float32 ratio ); -LEPT_DLL extern char * getImagelibVersions ( ); -LEPT_DLL extern void listDestroy ( DLLIST **phead ); -LEPT_DLL extern l_int32 listAddToHead ( DLLIST **phead, void *data ); -LEPT_DLL extern l_int32 listAddToTail ( DLLIST **phead, DLLIST **ptail, void *data ); -LEPT_DLL extern l_int32 listInsertBefore ( DLLIST **phead, DLLIST *elem, void *data ); -LEPT_DLL extern l_int32 listInsertAfter ( DLLIST **phead, DLLIST *elem, void *data ); -LEPT_DLL extern void * listRemoveElement ( DLLIST **phead, DLLIST *elem ); -LEPT_DLL extern void * listRemoveFromHead ( DLLIST **phead ); -LEPT_DLL extern void * listRemoveFromTail ( DLLIST **phead, DLLIST **ptail ); -LEPT_DLL extern DLLIST * listFindElement ( DLLIST *head, void *data ); -LEPT_DLL extern DLLIST * listFindTail ( DLLIST *head ); -LEPT_DLL extern l_int32 listGetCount ( DLLIST *head ); -LEPT_DLL extern l_int32 listReverse ( DLLIST **phead ); -LEPT_DLL extern l_int32 listJoin ( DLLIST **phead1, DLLIST **phead2 ); -LEPT_DLL extern L_AMAP * l_amapCreate ( l_int32 keytype ); -LEPT_DLL extern RB_TYPE * l_amapFind ( L_AMAP *m, RB_TYPE key ); -LEPT_DLL extern void l_amapInsert ( L_AMAP *m, RB_TYPE key, RB_TYPE value ); -LEPT_DLL extern void l_amapDelete ( L_AMAP *m, RB_TYPE key ); -LEPT_DLL extern void l_amapDestroy ( L_AMAP **pm ); -LEPT_DLL extern L_AMAP_NODE * l_amapGetFirst ( L_AMAP *m ); -LEPT_DLL extern L_AMAP_NODE * l_amapGetNext ( L_AMAP_NODE *n ); -LEPT_DLL extern L_AMAP_NODE * l_amapGetLast ( L_AMAP *m ); -LEPT_DLL extern L_AMAP_NODE * l_amapGetPrev ( L_AMAP_NODE *n ); -LEPT_DLL extern l_int32 l_amapSize ( L_AMAP *m ); -LEPT_DLL extern L_ASET * l_asetCreate ( l_int32 keytype ); -LEPT_DLL extern RB_TYPE * l_asetFind ( L_ASET *s, RB_TYPE key ); -LEPT_DLL extern void l_asetInsert ( L_ASET *s, RB_TYPE key ); -LEPT_DLL extern void l_asetDelete ( L_ASET *s, RB_TYPE key ); -LEPT_DLL extern void l_asetDestroy ( L_ASET **ps ); -LEPT_DLL extern L_ASET_NODE * l_asetGetFirst ( L_ASET *s ); -LEPT_DLL extern L_ASET_NODE * l_asetGetNext ( L_ASET_NODE *n ); -LEPT_DLL extern L_ASET_NODE * l_asetGetLast ( L_ASET *s ); -LEPT_DLL extern L_ASET_NODE * l_asetGetPrev ( L_ASET_NODE *n ); -LEPT_DLL extern l_int32 l_asetSize ( L_ASET *s ); -LEPT_DLL extern PIX * generateBinaryMaze ( l_int32 w, l_int32 h, l_int32 xi, l_int32 yi, l_float32 wallps, l_float32 ranis ); -LEPT_DLL extern PTA * pixSearchBinaryMaze ( PIX *pixs, l_int32 xi, l_int32 yi, l_int32 xf, l_int32 yf, PIX **ppixd ); -LEPT_DLL extern PTA * pixSearchGrayMaze ( PIX *pixs, l_int32 xi, l_int32 yi, l_int32 xf, l_int32 yf, PIX **ppixd ); -LEPT_DLL extern l_int32 pixFindLargestRectangle ( PIX *pixs, l_int32 polarity, BOX **pbox, const char *debugfile ); -LEPT_DLL extern PIX * pixDilate ( PIX *pixd, PIX *pixs, SEL *sel ); -LEPT_DLL extern PIX * pixErode ( PIX *pixd, PIX *pixs, SEL *sel ); -LEPT_DLL extern PIX * pixHMT ( PIX *pixd, PIX *pixs, SEL *sel ); -LEPT_DLL extern PIX * pixOpen ( PIX *pixd, PIX *pixs, SEL *sel ); -LEPT_DLL extern PIX * pixClose ( PIX *pixd, PIX *pixs, SEL *sel ); -LEPT_DLL extern PIX * pixCloseSafe ( PIX *pixd, PIX *pixs, SEL *sel ); -LEPT_DLL extern PIX * pixOpenGeneralized ( PIX *pixd, PIX *pixs, SEL *sel ); -LEPT_DLL extern PIX * pixCloseGeneralized ( PIX *pixd, PIX *pixs, SEL *sel ); -LEPT_DLL extern PIX * pixDilateBrick ( PIX *pixd, PIX *pixs, l_int32 hsize, l_int32 vsize ); -LEPT_DLL extern PIX * pixErodeBrick ( PIX *pixd, PIX *pixs, l_int32 hsize, l_int32 vsize ); -LEPT_DLL extern PIX * pixOpenBrick ( PIX *pixd, PIX *pixs, l_int32 hsize, l_int32 vsize ); -LEPT_DLL extern PIX * pixCloseBrick ( PIX *pixd, PIX *pixs, l_int32 hsize, l_int32 vsize ); -LEPT_DLL extern PIX * pixCloseSafeBrick ( PIX *pixd, PIX *pixs, l_int32 hsize, l_int32 vsize ); -LEPT_DLL extern l_int32 selectComposableSels ( l_int32 size, l_int32 direction, SEL **psel1, SEL **psel2 ); -LEPT_DLL extern l_int32 selectComposableSizes ( l_int32 size, l_int32 *pfactor1, l_int32 *pfactor2 ); -LEPT_DLL extern PIX * pixDilateCompBrick ( PIX *pixd, PIX *pixs, l_int32 hsize, l_int32 vsize ); -LEPT_DLL extern PIX * pixErodeCompBrick ( PIX *pixd, PIX *pixs, l_int32 hsize, l_int32 vsize ); -LEPT_DLL extern PIX * pixOpenCompBrick ( PIX *pixd, PIX *pixs, l_int32 hsize, l_int32 vsize ); -LEPT_DLL extern PIX * pixCloseCompBrick ( PIX *pixd, PIX *pixs, l_int32 hsize, l_int32 vsize ); -LEPT_DLL extern PIX * pixCloseSafeCompBrick ( PIX *pixd, PIX *pixs, l_int32 hsize, l_int32 vsize ); -LEPT_DLL extern void resetMorphBoundaryCondition ( l_int32 bc ); -LEPT_DLL extern l_uint32 getMorphBorderPixelColor ( l_int32 type, l_int32 depth ); -LEPT_DLL extern PIX * pixExtractBoundary ( PIX *pixs, l_int32 type ); -LEPT_DLL extern PIX * pixMorphSequenceMasked ( PIX *pixs, PIX *pixm, const char *sequence, l_int32 dispsep ); -LEPT_DLL extern PIX * pixMorphSequenceByComponent ( PIX *pixs, const char *sequence, l_int32 connectivity, l_int32 minw, l_int32 minh, BOXA **pboxa ); -LEPT_DLL extern PIXA * pixaMorphSequenceByComponent ( PIXA *pixas, const char *sequence, l_int32 minw, l_int32 minh ); -LEPT_DLL extern PIX * pixMorphSequenceByRegion ( PIX *pixs, PIX *pixm, const char *sequence, l_int32 connectivity, l_int32 minw, l_int32 minh, BOXA **pboxa ); -LEPT_DLL extern PIXA * pixaMorphSequenceByRegion ( PIX *pixs, PIXA *pixam, const char *sequence, l_int32 minw, l_int32 minh ); -LEPT_DLL extern PIX * pixUnionOfMorphOps ( PIX *pixs, SELA *sela, l_int32 type ); -LEPT_DLL extern PIX * pixIntersectionOfMorphOps ( PIX *pixs, SELA *sela, l_int32 type ); -LEPT_DLL extern PIX * pixSelectiveConnCompFill ( PIX *pixs, l_int32 connectivity, l_int32 minw, l_int32 minh ); -LEPT_DLL extern l_int32 pixRemoveMatchedPattern ( PIX *pixs, PIX *pixp, PIX *pixe, l_int32 x0, l_int32 y0, l_int32 dsize ); -LEPT_DLL extern PIX * pixDisplayMatchedPattern ( PIX *pixs, PIX *pixp, PIX *pixe, l_int32 x0, l_int32 y0, l_uint32 color, l_float32 scale, l_int32 nlevels ); -LEPT_DLL extern PIXA * pixaExtendIterative ( PIXA *pixas, l_int32 type, l_int32 niters, SEL *sel, l_int32 include ); -LEPT_DLL extern PIX * pixSeedfillMorph ( PIX *pixs, PIX *pixm, l_int32 maxiters, l_int32 connectivity ); -LEPT_DLL extern NUMA * pixRunHistogramMorph ( PIX *pixs, l_int32 runtype, l_int32 direction, l_int32 maxsize ); -LEPT_DLL extern PIX * pixTophat ( PIX *pixs, l_int32 hsize, l_int32 vsize, l_int32 type ); -LEPT_DLL extern PIX * pixHDome ( PIX *pixs, l_int32 height, l_int32 connectivity ); -LEPT_DLL extern PIX * pixFastTophat ( PIX *pixs, l_int32 xsize, l_int32 ysize, l_int32 type ); -LEPT_DLL extern PIX * pixMorphGradient ( PIX *pixs, l_int32 hsize, l_int32 vsize, l_int32 smoothing ); -LEPT_DLL extern PTA * pixaCentroids ( PIXA *pixa ); -LEPT_DLL extern l_int32 pixCentroid ( PIX *pix, l_int32 *centtab, l_int32 *sumtab, l_float32 *pxave, l_float32 *pyave ); -LEPT_DLL extern PIX * pixDilateBrickDwa ( PIX *pixd, PIX *pixs, l_int32 hsize, l_int32 vsize ); -LEPT_DLL extern PIX * pixErodeBrickDwa ( PIX *pixd, PIX *pixs, l_int32 hsize, l_int32 vsize ); -LEPT_DLL extern PIX * pixOpenBrickDwa ( PIX *pixd, PIX *pixs, l_int32 hsize, l_int32 vsize ); -LEPT_DLL extern PIX * pixCloseBrickDwa ( PIX *pixd, PIX *pixs, l_int32 hsize, l_int32 vsize ); -LEPT_DLL extern PIX * pixDilateCompBrickDwa ( PIX *pixd, PIX *pixs, l_int32 hsize, l_int32 vsize ); -LEPT_DLL extern PIX * pixErodeCompBrickDwa ( PIX *pixd, PIX *pixs, l_int32 hsize, l_int32 vsize ); -LEPT_DLL extern PIX * pixOpenCompBrickDwa ( PIX *pixd, PIX *pixs, l_int32 hsize, l_int32 vsize ); -LEPT_DLL extern PIX * pixCloseCompBrickDwa ( PIX *pixd, PIX *pixs, l_int32 hsize, l_int32 vsize ); -LEPT_DLL extern PIX * pixDilateCompBrickExtendDwa ( PIX *pixd, PIX *pixs, l_int32 hsize, l_int32 vsize ); -LEPT_DLL extern PIX * pixErodeCompBrickExtendDwa ( PIX *pixd, PIX *pixs, l_int32 hsize, l_int32 vsize ); -LEPT_DLL extern PIX * pixOpenCompBrickExtendDwa ( PIX *pixd, PIX *pixs, l_int32 hsize, l_int32 vsize ); -LEPT_DLL extern PIX * pixCloseCompBrickExtendDwa ( PIX *pixd, PIX *pixs, l_int32 hsize, l_int32 vsize ); -LEPT_DLL extern l_int32 getExtendedCompositeParameters ( l_int32 size, l_int32 *pn, l_int32 *pextra, l_int32 *pactualsize ); -LEPT_DLL extern PIX * pixMorphSequence ( PIX *pixs, const char *sequence, l_int32 dispsep ); -LEPT_DLL extern PIX * pixMorphCompSequence ( PIX *pixs, const char *sequence, l_int32 dispsep ); -LEPT_DLL extern PIX * pixMorphSequenceDwa ( PIX *pixs, const char *sequence, l_int32 dispsep ); -LEPT_DLL extern PIX * pixMorphCompSequenceDwa ( PIX *pixs, const char *sequence, l_int32 dispsep ); -LEPT_DLL extern l_int32 morphSequenceVerify ( SARRAY *sa ); -LEPT_DLL extern PIX * pixGrayMorphSequence ( PIX *pixs, const char *sequence, l_int32 dispsep, l_int32 dispy ); -LEPT_DLL extern PIX * pixColorMorphSequence ( PIX *pixs, const char *sequence, l_int32 dispsep, l_int32 dispy ); -LEPT_DLL extern NUMA * numaCreate ( l_int32 n ); -LEPT_DLL extern NUMA * numaCreateFromIArray ( l_int32 *iarray, l_int32 size ); -LEPT_DLL extern NUMA * numaCreateFromFArray ( l_float32 *farray, l_int32 size, l_int32 copyflag ); -LEPT_DLL extern NUMA * numaCreateFromString ( const char *str ); -LEPT_DLL extern void numaDestroy ( NUMA **pna ); -LEPT_DLL extern NUMA * numaCopy ( NUMA *na ); -LEPT_DLL extern NUMA * numaClone ( NUMA *na ); -LEPT_DLL extern l_int32 numaEmpty ( NUMA *na ); -LEPT_DLL extern l_int32 numaAddNumber ( NUMA *na, l_float32 val ); -LEPT_DLL extern l_int32 numaInsertNumber ( NUMA *na, l_int32 index, l_float32 val ); -LEPT_DLL extern l_int32 numaRemoveNumber ( NUMA *na, l_int32 index ); -LEPT_DLL extern l_int32 numaReplaceNumber ( NUMA *na, l_int32 index, l_float32 val ); -LEPT_DLL extern l_int32 numaGetCount ( NUMA *na ); -LEPT_DLL extern l_int32 numaSetCount ( NUMA *na, l_int32 newcount ); -LEPT_DLL extern l_int32 numaGetFValue ( NUMA *na, l_int32 index, l_float32 *pval ); -LEPT_DLL extern l_int32 numaGetIValue ( NUMA *na, l_int32 index, l_int32 *pival ); -LEPT_DLL extern l_int32 numaSetValue ( NUMA *na, l_int32 index, l_float32 val ); -LEPT_DLL extern l_int32 numaShiftValue ( NUMA *na, l_int32 index, l_float32 diff ); -LEPT_DLL extern l_int32 * numaGetIArray ( NUMA *na ); -LEPT_DLL extern l_float32 * numaGetFArray ( NUMA *na, l_int32 copyflag ); -LEPT_DLL extern l_int32 numaGetRefcount ( NUMA *na ); -LEPT_DLL extern l_int32 numaChangeRefcount ( NUMA *na, l_int32 delta ); -LEPT_DLL extern l_int32 numaGetParameters ( NUMA *na, l_float32 *pstartx, l_float32 *pdelx ); -LEPT_DLL extern l_int32 numaSetParameters ( NUMA *na, l_float32 startx, l_float32 delx ); -LEPT_DLL extern l_int32 numaCopyParameters ( NUMA *nad, NUMA *nas ); -LEPT_DLL extern SARRAY * numaConvertToSarray ( NUMA *na, l_int32 size1, l_int32 size2, l_int32 addzeros, l_int32 type ); -LEPT_DLL extern NUMA * numaRead ( const char *filename ); -LEPT_DLL extern NUMA * numaReadStream ( FILE *fp ); -LEPT_DLL extern NUMA * numaReadMem ( const l_uint8 *data, size_t size ); -LEPT_DLL extern l_int32 numaWrite ( const char *filename, NUMA *na ); -LEPT_DLL extern l_int32 numaWriteStream ( FILE *fp, NUMA *na ); -LEPT_DLL extern l_int32 numaWriteMem ( l_uint8 **pdata, size_t *psize, NUMA *na ); -LEPT_DLL extern NUMAA * numaaCreate ( l_int32 n ); -LEPT_DLL extern NUMAA * numaaCreateFull ( l_int32 nptr, l_int32 n ); -LEPT_DLL extern l_int32 numaaTruncate ( NUMAA *naa ); -LEPT_DLL extern void numaaDestroy ( NUMAA **pnaa ); -LEPT_DLL extern l_int32 numaaAddNuma ( NUMAA *naa, NUMA *na, l_int32 copyflag ); -LEPT_DLL extern l_int32 numaaGetCount ( NUMAA *naa ); -LEPT_DLL extern l_int32 numaaGetNumaCount ( NUMAA *naa, l_int32 index ); -LEPT_DLL extern l_int32 numaaGetNumberCount ( NUMAA *naa ); -LEPT_DLL extern NUMA ** numaaGetPtrArray ( NUMAA *naa ); -LEPT_DLL extern NUMA * numaaGetNuma ( NUMAA *naa, l_int32 index, l_int32 accessflag ); -LEPT_DLL extern l_int32 numaaReplaceNuma ( NUMAA *naa, l_int32 index, NUMA *na ); -LEPT_DLL extern l_int32 numaaGetValue ( NUMAA *naa, l_int32 i, l_int32 j, l_float32 *pfval, l_int32 *pival ); -LEPT_DLL extern l_int32 numaaAddNumber ( NUMAA *naa, l_int32 index, l_float32 val ); -LEPT_DLL extern NUMAA * numaaRead ( const char *filename ); -LEPT_DLL extern NUMAA * numaaReadStream ( FILE *fp ); -LEPT_DLL extern NUMAA * numaaReadMem ( const l_uint8 *data, size_t size ); -LEPT_DLL extern l_int32 numaaWrite ( const char *filename, NUMAA *naa ); -LEPT_DLL extern l_int32 numaaWriteStream ( FILE *fp, NUMAA *naa ); -LEPT_DLL extern l_int32 numaaWriteMem ( l_uint8 **pdata, size_t *psize, NUMAA *naa ); -LEPT_DLL extern NUMA * numaArithOp ( NUMA *nad, NUMA *na1, NUMA *na2, l_int32 op ); -LEPT_DLL extern NUMA * numaLogicalOp ( NUMA *nad, NUMA *na1, NUMA *na2, l_int32 op ); -LEPT_DLL extern NUMA * numaInvert ( NUMA *nad, NUMA *nas ); -LEPT_DLL extern l_int32 numaSimilar ( NUMA *na1, NUMA *na2, l_float32 maxdiff, l_int32 *psimilar ); -LEPT_DLL extern l_int32 numaAddToNumber ( NUMA *na, l_int32 index, l_float32 val ); -LEPT_DLL extern l_int32 numaGetMin ( NUMA *na, l_float32 *pminval, l_int32 *piminloc ); -LEPT_DLL extern l_int32 numaGetMax ( NUMA *na, l_float32 *pmaxval, l_int32 *pimaxloc ); -LEPT_DLL extern l_int32 numaGetSum ( NUMA *na, l_float32 *psum ); -LEPT_DLL extern NUMA * numaGetPartialSums ( NUMA *na ); -LEPT_DLL extern l_int32 numaGetSumOnInterval ( NUMA *na, l_int32 first, l_int32 last, l_float32 *psum ); -LEPT_DLL extern l_int32 numaHasOnlyIntegers ( NUMA *na, l_int32 maxsamples, l_int32 *pallints ); -LEPT_DLL extern NUMA * numaSubsample ( NUMA *nas, l_int32 subfactor ); -LEPT_DLL extern NUMA * numaMakeDelta ( NUMA *nas ); -LEPT_DLL extern NUMA * numaMakeSequence ( l_float32 startval, l_float32 increment, l_int32 size ); -LEPT_DLL extern NUMA * numaMakeConstant ( l_float32 val, l_int32 size ); -LEPT_DLL extern NUMA * numaMakeAbsValue ( NUMA *nad, NUMA *nas ); -LEPT_DLL extern NUMA * numaAddBorder ( NUMA *nas, l_int32 left, l_int32 right, l_float32 val ); -LEPT_DLL extern NUMA * numaAddSpecifiedBorder ( NUMA *nas, l_int32 left, l_int32 right, l_int32 type ); -LEPT_DLL extern NUMA * numaRemoveBorder ( NUMA *nas, l_int32 left, l_int32 right ); -LEPT_DLL extern l_int32 numaGetNonzeroRange ( NUMA *na, l_float32 eps, l_int32 *pfirst, l_int32 *plast ); -LEPT_DLL extern l_int32 numaGetCountRelativeToZero ( NUMA *na, l_int32 type, l_int32 *pcount ); -LEPT_DLL extern NUMA * numaClipToInterval ( NUMA *nas, l_int32 first, l_int32 last ); -LEPT_DLL extern NUMA * numaMakeThresholdIndicator ( NUMA *nas, l_float32 thresh, l_int32 type ); -LEPT_DLL extern NUMA * numaUniformSampling ( NUMA *nas, l_int32 nsamp ); -LEPT_DLL extern NUMA * numaReverse ( NUMA *nad, NUMA *nas ); -LEPT_DLL extern NUMA * numaLowPassIntervals ( NUMA *nas, l_float32 thresh, l_float32 maxn ); -LEPT_DLL extern NUMA * numaThresholdEdges ( NUMA *nas, l_float32 thresh1, l_float32 thresh2, l_float32 maxn ); -LEPT_DLL extern l_int32 numaGetSpanValues ( NUMA *na, l_int32 span, l_int32 *pstart, l_int32 *pend ); -LEPT_DLL extern l_int32 numaGetEdgeValues ( NUMA *na, l_int32 edge, l_int32 *pstart, l_int32 *pend, l_int32 *psign ); -LEPT_DLL extern l_int32 numaInterpolateEqxVal ( l_float32 startx, l_float32 deltax, NUMA *nay, l_int32 type, l_float32 xval, l_float32 *pyval ); -LEPT_DLL extern l_int32 numaInterpolateArbxVal ( NUMA *nax, NUMA *nay, l_int32 type, l_float32 xval, l_float32 *pyval ); -LEPT_DLL extern l_int32 numaInterpolateEqxInterval ( l_float32 startx, l_float32 deltax, NUMA *nasy, l_int32 type, l_float32 x0, l_float32 x1, l_int32 npts, NUMA **pnax, NUMA **pnay ); -LEPT_DLL extern l_int32 numaInterpolateArbxInterval ( NUMA *nax, NUMA *nay, l_int32 type, l_float32 x0, l_float32 x1, l_int32 npts, NUMA **pnadx, NUMA **pnady ); -LEPT_DLL extern l_int32 numaFitMax ( NUMA *na, l_float32 *pmaxval, NUMA *naloc, l_float32 *pmaxloc ); -LEPT_DLL extern l_int32 numaDifferentiateInterval ( NUMA *nax, NUMA *nay, l_float32 x0, l_float32 x1, l_int32 npts, NUMA **pnadx, NUMA **pnady ); -LEPT_DLL extern l_int32 numaIntegrateInterval ( NUMA *nax, NUMA *nay, l_float32 x0, l_float32 x1, l_int32 npts, l_float32 *psum ); -LEPT_DLL extern l_int32 numaSortGeneral ( NUMA *na, NUMA **pnasort, NUMA **pnaindex, NUMA **pnainvert, l_int32 sortorder, l_int32 sorttype ); -LEPT_DLL extern NUMA * numaSortAutoSelect ( NUMA *nas, l_int32 sortorder ); -LEPT_DLL extern NUMA * numaSortIndexAutoSelect ( NUMA *nas, l_int32 sortorder ); -LEPT_DLL extern l_int32 numaChooseSortType ( NUMA *nas ); -LEPT_DLL extern NUMA * numaSort ( NUMA *naout, NUMA *nain, l_int32 sortorder ); -LEPT_DLL extern NUMA * numaBinSort ( NUMA *nas, l_int32 sortorder ); -LEPT_DLL extern NUMA * numaGetSortIndex ( NUMA *na, l_int32 sortorder ); -LEPT_DLL extern NUMA * numaGetBinSortIndex ( NUMA *nas, l_int32 sortorder ); -LEPT_DLL extern NUMA * numaSortByIndex ( NUMA *nas, NUMA *naindex ); -LEPT_DLL extern l_int32 numaIsSorted ( NUMA *nas, l_int32 sortorder, l_int32 *psorted ); -LEPT_DLL extern l_int32 numaSortPair ( NUMA *nax, NUMA *nay, l_int32 sortorder, NUMA **pnasx, NUMA **pnasy ); -LEPT_DLL extern NUMA * numaInvertMap ( NUMA *nas ); -LEPT_DLL extern NUMA * numaPseudorandomSequence ( l_int32 size, l_int32 seed ); -LEPT_DLL extern NUMA * numaRandomPermutation ( NUMA *nas, l_int32 seed ); -LEPT_DLL extern l_int32 numaGetRankValue ( NUMA *na, l_float32 fract, NUMA *nasort, l_int32 usebins, l_float32 *pval ); -LEPT_DLL extern l_int32 numaGetMedian ( NUMA *na, l_float32 *pval ); -LEPT_DLL extern l_int32 numaGetBinnedMedian ( NUMA *na, l_int32 *pval ); -LEPT_DLL extern l_int32 numaGetMode ( NUMA *na, l_float32 *pval, l_int32 *pcount ); -LEPT_DLL extern l_int32 numaGetMedianVariation ( NUMA *na, l_float32 *pmedval, l_float32 *pmedvar ); -LEPT_DLL extern l_int32 numaJoin ( NUMA *nad, NUMA *nas, l_int32 istart, l_int32 iend ); -LEPT_DLL extern l_int32 numaaJoin ( NUMAA *naad, NUMAA *naas, l_int32 istart, l_int32 iend ); -LEPT_DLL extern NUMA * numaaFlattenToNuma ( NUMAA *naa ); -LEPT_DLL extern NUMA * numaErode ( NUMA *nas, l_int32 size ); -LEPT_DLL extern NUMA * numaDilate ( NUMA *nas, l_int32 size ); -LEPT_DLL extern NUMA * numaOpen ( NUMA *nas, l_int32 size ); -LEPT_DLL extern NUMA * numaClose ( NUMA *nas, l_int32 size ); -LEPT_DLL extern NUMA * numaTransform ( NUMA *nas, l_float32 shift, l_float32 scale ); -LEPT_DLL extern l_int32 numaSimpleStats ( NUMA *na, l_int32 first, l_int32 last, l_float32 *pmean, l_float32 *pvar, l_float32 *prvar ); -LEPT_DLL extern l_int32 numaWindowedStats ( NUMA *nas, l_int32 wc, NUMA **pnam, NUMA **pnams, NUMA **pnav, NUMA **pnarv ); -LEPT_DLL extern NUMA * numaWindowedMean ( NUMA *nas, l_int32 wc ); -LEPT_DLL extern NUMA * numaWindowedMeanSquare ( NUMA *nas, l_int32 wc ); -LEPT_DLL extern l_int32 numaWindowedVariance ( NUMA *nam, NUMA *nams, NUMA **pnav, NUMA **pnarv ); -LEPT_DLL extern NUMA * numaWindowedMedian ( NUMA *nas, l_int32 halfwin ); -LEPT_DLL extern NUMA * numaConvertToInt ( NUMA *nas ); -LEPT_DLL extern NUMA * numaMakeHistogram ( NUMA *na, l_int32 maxbins, l_int32 *pbinsize, l_int32 *pbinstart ); -LEPT_DLL extern NUMA * numaMakeHistogramAuto ( NUMA *na, l_int32 maxbins ); -LEPT_DLL extern NUMA * numaMakeHistogramClipped ( NUMA *na, l_float32 binsize, l_float32 maxsize ); -LEPT_DLL extern NUMA * numaRebinHistogram ( NUMA *nas, l_int32 newsize ); -LEPT_DLL extern NUMA * numaNormalizeHistogram ( NUMA *nas, l_float32 tsum ); -LEPT_DLL extern l_int32 numaGetStatsUsingHistogram ( NUMA *na, l_int32 maxbins, l_float32 *pmin, l_float32 *pmax, l_float32 *pmean, l_float32 *pvariance, l_float32 *pmedian, l_float32 rank, l_float32 *prval, NUMA **phisto ); -LEPT_DLL extern l_int32 numaGetHistogramStats ( NUMA *nahisto, l_float32 startx, l_float32 deltax, l_float32 *pxmean, l_float32 *pxmedian, l_float32 *pxmode, l_float32 *pxvariance ); -LEPT_DLL extern l_int32 numaGetHistogramStatsOnInterval ( NUMA *nahisto, l_float32 startx, l_float32 deltax, l_int32 ifirst, l_int32 ilast, l_float32 *pxmean, l_float32 *pxmedian, l_float32 *pxmode, l_float32 *pxvariance ); -LEPT_DLL extern l_int32 numaMakeRankFromHistogram ( l_float32 startx, l_float32 deltax, NUMA *nasy, l_int32 npts, NUMA **pnax, NUMA **pnay ); -LEPT_DLL extern l_int32 numaHistogramGetRankFromVal ( NUMA *na, l_float32 rval, l_float32 *prank ); -LEPT_DLL extern l_int32 numaHistogramGetValFromRank ( NUMA *na, l_float32 rank, l_float32 *prval ); -LEPT_DLL extern l_int32 numaDiscretizeRankAndIntensity ( NUMA *na, l_int32 nbins, NUMA **pnarbin, NUMA **pnam, NUMA **pnar, NUMA **pnabb ); -LEPT_DLL extern l_int32 numaGetRankBinValues ( NUMA *na, l_int32 nbins, NUMA **pnarbin, NUMA **pnam ); -LEPT_DLL extern l_int32 numaSplitDistribution ( NUMA *na, l_float32 scorefract, l_int32 *psplitindex, l_float32 *pave1, l_float32 *pave2, l_float32 *pnum1, l_float32 *pnum2, NUMA **pnascore ); -LEPT_DLL extern l_int32 grayHistogramsToEMD ( NUMAA *naa1, NUMAA *naa2, NUMA **pnad ); -LEPT_DLL extern l_int32 numaEarthMoverDistance ( NUMA *na1, NUMA *na2, l_float32 *pdist ); -LEPT_DLL extern l_int32 grayInterHistogramStats ( NUMAA *naa, l_int32 wc, NUMA **pnam, NUMA **pnams, NUMA **pnav, NUMA **pnarv ); -LEPT_DLL extern NUMA * numaFindPeaks ( NUMA *nas, l_int32 nmax, l_float32 fract1, l_float32 fract2 ); -LEPT_DLL extern NUMA * numaFindExtrema ( NUMA *nas, l_float32 delta, NUMA **pnav ); -LEPT_DLL extern l_int32 numaCountReversals ( NUMA *nas, l_float32 minreversal, l_int32 *pnr, l_float32 *pnrpl ); -LEPT_DLL extern l_int32 numaSelectCrossingThreshold ( NUMA *nax, NUMA *nay, l_float32 estthresh, l_float32 *pbestthresh ); -LEPT_DLL extern NUMA * numaCrossingsByThreshold ( NUMA *nax, NUMA *nay, l_float32 thresh ); -LEPT_DLL extern NUMA * numaCrossingsByPeaks ( NUMA *nax, NUMA *nay, l_float32 delta ); -LEPT_DLL extern l_int32 numaEvalBestHaarParameters ( NUMA *nas, l_float32 relweight, l_int32 nwidth, l_int32 nshift, l_float32 minwidth, l_float32 maxwidth, l_float32 *pbestwidth, l_float32 *pbestshift, l_float32 *pbestscore ); -LEPT_DLL extern l_int32 numaEvalHaarSum ( NUMA *nas, l_float32 width, l_float32 shift, l_float32 relweight, l_float32 *pscore ); -LEPT_DLL extern NUMA * genConstrainedNumaInRange ( l_int32 first, l_int32 last, l_int32 nmax, l_int32 use_pairs ); -LEPT_DLL extern l_int32 pixGetRegionsBinary ( PIX *pixs, PIX **ppixhm, PIX **ppixtm, PIX **ppixtb, l_int32 debug ); -LEPT_DLL extern PIX * pixGenHalftoneMask ( PIX *pixs, PIX **ppixtext, l_int32 *phtfound, l_int32 debug ); -LEPT_DLL extern PIX * pixGenTextlineMask ( PIX *pixs, PIX **ppixvws, l_int32 *ptlfound, l_int32 debug ); -LEPT_DLL extern PIX * pixGenTextblockMask ( PIX *pixs, PIX *pixvws, l_int32 debug ); -LEPT_DLL extern BOX * pixFindPageForeground ( PIX *pixs, l_int32 threshold, l_int32 mindist, l_int32 erasedist, l_int32 pagenum, l_int32 showmorph, l_int32 display, const char *pdfdir ); -LEPT_DLL extern l_int32 pixSplitIntoCharacters ( PIX *pixs, l_int32 minw, l_int32 minh, BOXA **pboxa, PIXA **ppixa, PIX **ppixdebug ); -LEPT_DLL extern BOXA * pixSplitComponentWithProfile ( PIX *pixs, l_int32 delta, l_int32 mindel, PIX **ppixdebug ); -LEPT_DLL extern PIXA * pixExtractTextlines ( PIX *pixs, l_int32 maxw, l_int32 maxh, l_int32 minw, l_int32 minh ); -LEPT_DLL extern l_int32 pixDecideIfText ( PIX *pixs, BOX *box, l_int32 *pistext, PIXA *pixadb ); -LEPT_DLL extern l_int32 pixFindThreshFgExtent ( PIX *pixs, l_int32 thresh, l_int32 *ptop, l_int32 *pbot ); -LEPT_DLL extern l_int32 pixCountTextColumns ( PIX *pixs, l_float32 deltafract, l_float32 peakfract, l_float32 clipfract, l_int32 *pncols, PIXA *pixadb ); -LEPT_DLL extern l_int32 pixEstimateBackground ( PIX *pixs, l_int32 darkthresh, l_float32 edgecrop, l_int32 *pbg ); -LEPT_DLL extern l_int32 pixSetSelectCmap ( PIX *pixs, BOX *box, l_int32 sindex, l_int32 rval, l_int32 gval, l_int32 bval ); -LEPT_DLL extern l_int32 pixColorGrayRegionsCmap ( PIX *pixs, BOXA *boxa, l_int32 type, l_int32 rval, l_int32 gval, l_int32 bval ); -LEPT_DLL extern l_int32 pixColorGrayCmap ( PIX *pixs, BOX *box, l_int32 type, l_int32 rval, l_int32 gval, l_int32 bval ); -LEPT_DLL extern l_int32 pixColorGrayMaskedCmap ( PIX *pixs, PIX *pixm, l_int32 type, l_int32 rval, l_int32 gval, l_int32 bval ); -LEPT_DLL extern l_int32 addColorizedGrayToCmap ( PIXCMAP *cmap, l_int32 type, l_int32 rval, l_int32 gval, l_int32 bval, NUMA **pna ); -LEPT_DLL extern l_int32 pixSetSelectMaskedCmap ( PIX *pixs, PIX *pixm, l_int32 x, l_int32 y, l_int32 sindex, l_int32 rval, l_int32 gval, l_int32 bval ); -LEPT_DLL extern l_int32 pixSetMaskedCmap ( PIX *pixs, PIX *pixm, l_int32 x, l_int32 y, l_int32 rval, l_int32 gval, l_int32 bval ); -LEPT_DLL extern char * parseForProtos ( const char *filein, const char *prestring ); -LEPT_DLL extern BOXA * boxaGetWhiteblocks ( BOXA *boxas, BOX *box, l_int32 sortflag, l_int32 maxboxes, l_float32 maxoverlap, l_int32 maxperim, l_float32 fract, l_int32 maxpops ); -LEPT_DLL extern BOXA * boxaPruneSortedOnOverlap ( BOXA *boxas, l_float32 maxoverlap ); -LEPT_DLL extern l_int32 convertFilesToPdf ( const char *dirname, const char *substr, l_int32 res, l_float32 scalefactor, l_int32 type, l_int32 quality, const char *title, const char *fileout ); -LEPT_DLL extern l_int32 saConvertFilesToPdf ( SARRAY *sa, l_int32 res, l_float32 scalefactor, l_int32 type, l_int32 quality, const char *title, const char *fileout ); -LEPT_DLL extern l_int32 saConvertFilesToPdfData ( SARRAY *sa, l_int32 res, l_float32 scalefactor, l_int32 type, l_int32 quality, const char *title, l_uint8 **pdata, size_t *pnbytes ); -LEPT_DLL extern l_int32 selectDefaultPdfEncoding ( PIX *pix, l_int32 *ptype ); -LEPT_DLL extern l_int32 convertUnscaledFilesToPdf ( const char *dirname, const char *substr, const char *title, const char *fileout ); -LEPT_DLL extern l_int32 saConvertUnscaledFilesToPdf ( SARRAY *sa, const char *title, const char *fileout ); -LEPT_DLL extern l_int32 saConvertUnscaledFilesToPdfData ( SARRAY *sa, const char *title, l_uint8 **pdata, size_t *pnbytes ); -LEPT_DLL extern l_int32 convertUnscaledToPdfData ( const char *fname, const char *title, l_uint8 **pdata, size_t *pnbytes ); -LEPT_DLL extern l_int32 pixaConvertToPdf ( PIXA *pixa, l_int32 res, l_float32 scalefactor, l_int32 type, l_int32 quality, const char *title, const char *fileout ); -LEPT_DLL extern l_int32 pixaConvertToPdfData ( PIXA *pixa, l_int32 res, l_float32 scalefactor, l_int32 type, l_int32 quality, const char *title, l_uint8 **pdata, size_t *pnbytes ); -LEPT_DLL extern l_int32 convertToPdf ( const char *filein, l_int32 type, l_int32 quality, const char *fileout, l_int32 x, l_int32 y, l_int32 res, const char *title, L_PDF_DATA **plpd, l_int32 position ); -LEPT_DLL extern l_int32 convertImageDataToPdf ( l_uint8 *imdata, size_t size, l_int32 type, l_int32 quality, const char *fileout, l_int32 x, l_int32 y, l_int32 res, const char *title, L_PDF_DATA **plpd, l_int32 position ); -LEPT_DLL extern l_int32 convertToPdfData ( const char *filein, l_int32 type, l_int32 quality, l_uint8 **pdata, size_t *pnbytes, l_int32 x, l_int32 y, l_int32 res, const char *title, L_PDF_DATA **plpd, l_int32 position ); -LEPT_DLL extern l_int32 convertImageDataToPdfData ( l_uint8 *imdata, size_t size, l_int32 type, l_int32 quality, l_uint8 **pdata, size_t *pnbytes, l_int32 x, l_int32 y, l_int32 res, const char *title, L_PDF_DATA **plpd, l_int32 position ); -LEPT_DLL extern l_int32 pixConvertToPdf ( PIX *pix, l_int32 type, l_int32 quality, const char *fileout, l_int32 x, l_int32 y, l_int32 res, const char *title, L_PDF_DATA **plpd, l_int32 position ); -LEPT_DLL extern l_int32 pixWriteStreamPdf ( FILE *fp, PIX *pix, l_int32 res, const char *title ); -LEPT_DLL extern l_int32 pixWriteMemPdf ( l_uint8 **pdata, size_t *pnbytes, PIX *pix, l_int32 res, const char *title ); -LEPT_DLL extern l_int32 convertSegmentedFilesToPdf ( const char *dirname, const char *substr, l_int32 res, l_int32 type, l_int32 thresh, BOXAA *baa, l_int32 quality, l_float32 scalefactor, const char *title, const char *fileout ); -LEPT_DLL extern BOXAA * convertNumberedMasksToBoxaa ( const char *dirname, const char *substr, l_int32 numpre, l_int32 numpost ); -LEPT_DLL extern l_int32 convertToPdfSegmented ( const char *filein, l_int32 res, l_int32 type, l_int32 thresh, BOXA *boxa, l_int32 quality, l_float32 scalefactor, const char *title, const char *fileout ); -LEPT_DLL extern l_int32 pixConvertToPdfSegmented ( PIX *pixs, l_int32 res, l_int32 type, l_int32 thresh, BOXA *boxa, l_int32 quality, l_float32 scalefactor, const char *title, const char *fileout ); -LEPT_DLL extern l_int32 convertToPdfDataSegmented ( const char *filein, l_int32 res, l_int32 type, l_int32 thresh, BOXA *boxa, l_int32 quality, l_float32 scalefactor, const char *title, l_uint8 **pdata, size_t *pnbytes ); -LEPT_DLL extern l_int32 pixConvertToPdfDataSegmented ( PIX *pixs, l_int32 res, l_int32 type, l_int32 thresh, BOXA *boxa, l_int32 quality, l_float32 scalefactor, const char *title, l_uint8 **pdata, size_t *pnbytes ); -LEPT_DLL extern l_int32 concatenatePdf ( const char *dirname, const char *substr, const char *fileout ); -LEPT_DLL extern l_int32 saConcatenatePdf ( SARRAY *sa, const char *fileout ); -LEPT_DLL extern l_int32 ptraConcatenatePdf ( L_PTRA *pa, const char *fileout ); -LEPT_DLL extern l_int32 concatenatePdfToData ( const char *dirname, const char *substr, l_uint8 **pdata, size_t *pnbytes ); -LEPT_DLL extern l_int32 saConcatenatePdfToData ( SARRAY *sa, l_uint8 **pdata, size_t *pnbytes ); -LEPT_DLL extern l_int32 pixConvertToPdfData ( PIX *pix, l_int32 type, l_int32 quality, l_uint8 **pdata, size_t *pnbytes, l_int32 x, l_int32 y, l_int32 res, const char *title, L_PDF_DATA **plpd, l_int32 position ); -LEPT_DLL extern l_int32 ptraConcatenatePdfToData ( L_PTRA *pa_data, SARRAY *sa, l_uint8 **pdata, size_t *pnbytes ); -LEPT_DLL extern l_int32 convertTiffMultipageToPdf ( const char *filein, const char *fileout ); -LEPT_DLL extern l_int32 l_generateCIDataForPdf ( const char *fname, PIX *pix, l_int32 quality, L_COMP_DATA **pcid ); -LEPT_DLL extern L_COMP_DATA * l_generateFlateDataPdf ( const char *fname, PIX *pixs ); -LEPT_DLL extern L_COMP_DATA * l_generateJpegData ( const char *fname, l_int32 ascii85flag ); -LEPT_DLL extern l_int32 l_generateCIData ( const char *fname, l_int32 type, l_int32 quality, l_int32 ascii85, L_COMP_DATA **pcid ); -LEPT_DLL extern l_int32 pixGenerateCIData ( PIX *pixs, l_int32 type, l_int32 quality, l_int32 ascii85, L_COMP_DATA **pcid ); -LEPT_DLL extern L_COMP_DATA * l_generateFlateData ( const char *fname, l_int32 ascii85flag ); -LEPT_DLL extern L_COMP_DATA * l_generateG4Data ( const char *fname, l_int32 ascii85flag ); -LEPT_DLL extern l_int32 cidConvertToPdfData ( L_COMP_DATA *cid, const char *title, l_uint8 **pdata, size_t *pnbytes ); -LEPT_DLL extern void l_CIDataDestroy ( L_COMP_DATA **pcid ); -LEPT_DLL extern void l_pdfSetG4ImageMask ( l_int32 flag ); -LEPT_DLL extern void l_pdfSetDateAndVersion ( l_int32 flag ); -LEPT_DLL extern void setPixMemoryManager ( alloc_fn allocator, dealloc_fn deallocator ); -LEPT_DLL extern PIX * pixCreate ( l_int32 width, l_int32 height, l_int32 depth ); -LEPT_DLL extern PIX * pixCreateNoInit ( l_int32 width, l_int32 height, l_int32 depth ); -LEPT_DLL extern PIX * pixCreateTemplate ( PIX *pixs ); -LEPT_DLL extern PIX * pixCreateTemplateNoInit ( PIX *pixs ); -LEPT_DLL extern PIX * pixCreateHeader ( l_int32 width, l_int32 height, l_int32 depth ); -LEPT_DLL extern PIX * pixClone ( PIX *pixs ); -LEPT_DLL extern void pixDestroy ( PIX **ppix ); -LEPT_DLL extern PIX * pixCopy ( PIX *pixd, PIX *pixs ); -LEPT_DLL extern l_int32 pixResizeImageData ( PIX *pixd, PIX *pixs ); -LEPT_DLL extern l_int32 pixCopyColormap ( PIX *pixd, PIX *pixs ); -LEPT_DLL extern l_int32 pixSizesEqual ( PIX *pix1, PIX *pix2 ); -LEPT_DLL extern l_int32 pixTransferAllData ( PIX *pixd, PIX **ppixs, l_int32 copytext, l_int32 copyformat ); -LEPT_DLL extern l_int32 pixSwapAndDestroy ( PIX **ppixd, PIX **ppixs ); -LEPT_DLL extern l_int32 pixGetWidth ( PIX *pix ); -LEPT_DLL extern l_int32 pixSetWidth ( PIX *pix, l_int32 width ); -LEPT_DLL extern l_int32 pixGetHeight ( PIX *pix ); -LEPT_DLL extern l_int32 pixSetHeight ( PIX *pix, l_int32 height ); -LEPT_DLL extern l_int32 pixGetDepth ( PIX *pix ); -LEPT_DLL extern l_int32 pixSetDepth ( PIX *pix, l_int32 depth ); -LEPT_DLL extern l_int32 pixGetDimensions ( PIX *pix, l_int32 *pw, l_int32 *ph, l_int32 *pd ); -LEPT_DLL extern l_int32 pixSetDimensions ( PIX *pix, l_int32 w, l_int32 h, l_int32 d ); -LEPT_DLL extern l_int32 pixCopyDimensions ( PIX *pixd, PIX *pixs ); -LEPT_DLL extern l_int32 pixGetSpp ( PIX *pix ); -LEPT_DLL extern l_int32 pixSetSpp ( PIX *pix, l_int32 spp ); -LEPT_DLL extern l_int32 pixCopySpp ( PIX *pixd, PIX *pixs ); -LEPT_DLL extern l_int32 pixGetWpl ( PIX *pix ); -LEPT_DLL extern l_int32 pixSetWpl ( PIX *pix, l_int32 wpl ); -LEPT_DLL extern l_int32 pixGetRefcount ( PIX *pix ); -LEPT_DLL extern l_int32 pixChangeRefcount ( PIX *pix, l_int32 delta ); -LEPT_DLL extern l_int32 pixGetXRes ( PIX *pix ); -LEPT_DLL extern l_int32 pixSetXRes ( PIX *pix, l_int32 res ); -LEPT_DLL extern l_int32 pixGetYRes ( PIX *pix ); -LEPT_DLL extern l_int32 pixSetYRes ( PIX *pix, l_int32 res ); -LEPT_DLL extern l_int32 pixGetResolution ( PIX *pix, l_int32 *pxres, l_int32 *pyres ); -LEPT_DLL extern l_int32 pixSetResolution ( PIX *pix, l_int32 xres, l_int32 yres ); -LEPT_DLL extern l_int32 pixCopyResolution ( PIX *pixd, PIX *pixs ); -LEPT_DLL extern l_int32 pixScaleResolution ( PIX *pix, l_float32 xscale, l_float32 yscale ); -LEPT_DLL extern l_int32 pixGetInputFormat ( PIX *pix ); -LEPT_DLL extern l_int32 pixSetInputFormat ( PIX *pix, l_int32 informat ); -LEPT_DLL extern l_int32 pixCopyInputFormat ( PIX *pixd, PIX *pixs ); -LEPT_DLL extern l_int32 pixSetSpecial ( PIX *pix, l_int32 special ); -LEPT_DLL extern char * pixGetText ( PIX *pix ); -LEPT_DLL extern l_int32 pixSetText ( PIX *pix, const char *textstring ); -LEPT_DLL extern l_int32 pixAddText ( PIX *pix, const char *textstring ); -LEPT_DLL extern l_int32 pixCopyText ( PIX *pixd, PIX *pixs ); -LEPT_DLL extern PIXCMAP * pixGetColormap ( PIX *pix ); -LEPT_DLL extern l_int32 pixSetColormap ( PIX *pix, PIXCMAP *colormap ); -LEPT_DLL extern l_int32 pixDestroyColormap ( PIX *pix ); -LEPT_DLL extern l_uint32 * pixGetData ( PIX *pix ); -LEPT_DLL extern l_int32 pixSetData ( PIX *pix, l_uint32 *data ); -LEPT_DLL extern l_uint32 * pixExtractData ( PIX *pixs ); -LEPT_DLL extern l_int32 pixFreeData ( PIX *pix ); -LEPT_DLL extern void ** pixGetLinePtrs ( PIX *pix, l_int32 *psize ); -LEPT_DLL extern l_int32 pixPrintStreamInfo ( FILE *fp, PIX *pix, const char *text ); -LEPT_DLL extern l_int32 pixGetPixel ( PIX *pix, l_int32 x, l_int32 y, l_uint32 *pval ); -LEPT_DLL extern l_int32 pixSetPixel ( PIX *pix, l_int32 x, l_int32 y, l_uint32 val ); -LEPT_DLL extern l_int32 pixGetRGBPixel ( PIX *pix, l_int32 x, l_int32 y, l_int32 *prval, l_int32 *pgval, l_int32 *pbval ); -LEPT_DLL extern l_int32 pixSetRGBPixel ( PIX *pix, l_int32 x, l_int32 y, l_int32 rval, l_int32 gval, l_int32 bval ); -LEPT_DLL extern l_int32 pixGetRandomPixel ( PIX *pix, l_uint32 *pval, l_int32 *px, l_int32 *py ); -LEPT_DLL extern l_int32 pixClearPixel ( PIX *pix, l_int32 x, l_int32 y ); -LEPT_DLL extern l_int32 pixFlipPixel ( PIX *pix, l_int32 x, l_int32 y ); -LEPT_DLL extern void setPixelLow ( l_uint32 *line, l_int32 x, l_int32 depth, l_uint32 val ); -LEPT_DLL extern l_int32 pixGetBlackOrWhiteVal ( PIX *pixs, l_int32 op, l_uint32 *pval ); -LEPT_DLL extern l_int32 pixClearAll ( PIX *pix ); -LEPT_DLL extern l_int32 pixSetAll ( PIX *pix ); -LEPT_DLL extern l_int32 pixSetAllGray ( PIX *pix, l_int32 grayval ); -LEPT_DLL extern l_int32 pixSetAllArbitrary ( PIX *pix, l_uint32 val ); -LEPT_DLL extern l_int32 pixSetBlackOrWhite ( PIX *pixs, l_int32 op ); -LEPT_DLL extern l_int32 pixSetComponentArbitrary ( PIX *pix, l_int32 comp, l_int32 val ); -LEPT_DLL extern l_int32 pixClearInRect ( PIX *pix, BOX *box ); -LEPT_DLL extern l_int32 pixSetInRect ( PIX *pix, BOX *box ); -LEPT_DLL extern l_int32 pixSetInRectArbitrary ( PIX *pix, BOX *box, l_uint32 val ); -LEPT_DLL extern l_int32 pixBlendInRect ( PIX *pixs, BOX *box, l_uint32 val, l_float32 fract ); -LEPT_DLL extern l_int32 pixSetPadBits ( PIX *pix, l_int32 val ); -LEPT_DLL extern l_int32 pixSetPadBitsBand ( PIX *pix, l_int32 by, l_int32 bh, l_int32 val ); -LEPT_DLL extern l_int32 pixSetOrClearBorder ( PIX *pixs, l_int32 left, l_int32 right, l_int32 top, l_int32 bot, l_int32 op ); -LEPT_DLL extern l_int32 pixSetBorderVal ( PIX *pixs, l_int32 left, l_int32 right, l_int32 top, l_int32 bot, l_uint32 val ); -LEPT_DLL extern l_int32 pixSetBorderRingVal ( PIX *pixs, l_int32 dist, l_uint32 val ); -LEPT_DLL extern l_int32 pixSetMirroredBorder ( PIX *pixs, l_int32 left, l_int32 right, l_int32 top, l_int32 bot ); -LEPT_DLL extern PIX * pixCopyBorder ( PIX *pixd, PIX *pixs, l_int32 left, l_int32 right, l_int32 top, l_int32 bot ); -LEPT_DLL extern PIX * pixAddBorder ( PIX *pixs, l_int32 npix, l_uint32 val ); -LEPT_DLL extern PIX * pixAddBlackOrWhiteBorder ( PIX *pixs, l_int32 left, l_int32 right, l_int32 top, l_int32 bot, l_int32 op ); -LEPT_DLL extern PIX * pixAddBorderGeneral ( PIX *pixs, l_int32 left, l_int32 right, l_int32 top, l_int32 bot, l_uint32 val ); -LEPT_DLL extern PIX * pixRemoveBorder ( PIX *pixs, l_int32 npix ); -LEPT_DLL extern PIX * pixRemoveBorderGeneral ( PIX *pixs, l_int32 left, l_int32 right, l_int32 top, l_int32 bot ); -LEPT_DLL extern PIX * pixRemoveBorderToSize ( PIX *pixs, l_int32 wd, l_int32 hd ); -LEPT_DLL extern PIX * pixAddMirroredBorder ( PIX *pixs, l_int32 left, l_int32 right, l_int32 top, l_int32 bot ); -LEPT_DLL extern PIX * pixAddRepeatedBorder ( PIX *pixs, l_int32 left, l_int32 right, l_int32 top, l_int32 bot ); -LEPT_DLL extern PIX * pixAddMixedBorder ( PIX *pixs, l_int32 left, l_int32 right, l_int32 top, l_int32 bot ); -LEPT_DLL extern PIX * pixAddContinuedBorder ( PIX *pixs, l_int32 left, l_int32 right, l_int32 top, l_int32 bot ); -LEPT_DLL extern l_int32 pixShiftAndTransferAlpha ( PIX *pixd, PIX *pixs, l_float32 shiftx, l_float32 shifty ); -LEPT_DLL extern PIX * pixDisplayLayersRGBA ( PIX *pixs, l_uint32 val, l_int32 maxw ); -LEPT_DLL extern PIX * pixCreateRGBImage ( PIX *pixr, PIX *pixg, PIX *pixb ); -LEPT_DLL extern PIX * pixGetRGBComponent ( PIX *pixs, l_int32 comp ); -LEPT_DLL extern l_int32 pixSetRGBComponent ( PIX *pixd, PIX *pixs, l_int32 comp ); -LEPT_DLL extern PIX * pixGetRGBComponentCmap ( PIX *pixs, l_int32 comp ); -LEPT_DLL extern l_int32 pixCopyRGBComponent ( PIX *pixd, PIX *pixs, l_int32 comp ); -LEPT_DLL extern l_int32 composeRGBPixel ( l_int32 rval, l_int32 gval, l_int32 bval, l_uint32 *ppixel ); -LEPT_DLL extern l_int32 composeRGBAPixel ( l_int32 rval, l_int32 gval, l_int32 bval, l_int32 aval, l_uint32 *ppixel ); -LEPT_DLL extern void extractRGBValues ( l_uint32 pixel, l_int32 *prval, l_int32 *pgval, l_int32 *pbval ); -LEPT_DLL extern void extractRGBAValues ( l_uint32 pixel, l_int32 *prval, l_int32 *pgval, l_int32 *pbval, l_int32 *paval ); -LEPT_DLL extern l_int32 extractMinMaxComponent ( l_uint32 pixel, l_int32 type ); -LEPT_DLL extern l_int32 pixGetRGBLine ( PIX *pixs, l_int32 row, l_uint8 *bufr, l_uint8 *bufg, l_uint8 *bufb ); -LEPT_DLL extern PIX * pixEndianByteSwapNew ( PIX *pixs ); -LEPT_DLL extern l_int32 pixEndianByteSwap ( PIX *pixs ); -LEPT_DLL extern l_int32 lineEndianByteSwap ( l_uint32 *datad, l_uint32 *datas, l_int32 wpl ); -LEPT_DLL extern PIX * pixEndianTwoByteSwapNew ( PIX *pixs ); -LEPT_DLL extern l_int32 pixEndianTwoByteSwap ( PIX *pixs ); -LEPT_DLL extern l_int32 pixGetRasterData ( PIX *pixs, l_uint8 **pdata, size_t *pnbytes ); -LEPT_DLL extern l_int32 pixAlphaIsOpaque ( PIX *pix, l_int32 *popaque ); -LEPT_DLL extern l_uint8 ** pixSetupByteProcessing ( PIX *pix, l_int32 *pw, l_int32 *ph ); -LEPT_DLL extern l_int32 pixCleanupByteProcessing ( PIX *pix, l_uint8 **lineptrs ); -LEPT_DLL extern void l_setAlphaMaskBorder ( l_float32 val1, l_float32 val2 ); -LEPT_DLL extern l_int32 pixSetMasked ( PIX *pixd, PIX *pixm, l_uint32 val ); -LEPT_DLL extern l_int32 pixSetMaskedGeneral ( PIX *pixd, PIX *pixm, l_uint32 val, l_int32 x, l_int32 y ); -LEPT_DLL extern l_int32 pixCombineMasked ( PIX *pixd, PIX *pixs, PIX *pixm ); -LEPT_DLL extern l_int32 pixCombineMaskedGeneral ( PIX *pixd, PIX *pixs, PIX *pixm, l_int32 x, l_int32 y ); -LEPT_DLL extern l_int32 pixPaintThroughMask ( PIX *pixd, PIX *pixm, l_int32 x, l_int32 y, l_uint32 val ); -LEPT_DLL extern l_int32 pixPaintSelfThroughMask ( PIX *pixd, PIX *pixm, l_int32 x, l_int32 y, l_int32 searchdir, l_int32 mindist, l_int32 tilesize, l_int32 ntiles, l_int32 distblend ); -LEPT_DLL extern PIX * pixMakeMaskFromLUT ( PIX *pixs, l_int32 *tab ); -LEPT_DLL extern PIX * pixSetUnderTransparency ( PIX *pixs, l_uint32 val, l_int32 debug ); -LEPT_DLL extern PIX * pixMakeAlphaFromMask ( PIX *pixs, l_int32 dist, BOX **pbox ); -LEPT_DLL extern l_int32 pixGetColorNearMaskBoundary ( PIX *pixs, PIX *pixm, BOX *box, l_int32 dist, l_uint32 *pval, l_int32 debug ); -LEPT_DLL extern PIX * pixInvert ( PIX *pixd, PIX *pixs ); -LEPT_DLL extern PIX * pixOr ( PIX *pixd, PIX *pixs1, PIX *pixs2 ); -LEPT_DLL extern PIX * pixAnd ( PIX *pixd, PIX *pixs1, PIX *pixs2 ); -LEPT_DLL extern PIX * pixXor ( PIX *pixd, PIX *pixs1, PIX *pixs2 ); -LEPT_DLL extern PIX * pixSubtract ( PIX *pixd, PIX *pixs1, PIX *pixs2 ); -LEPT_DLL extern l_int32 pixZero ( PIX *pix, l_int32 *pempty ); -LEPT_DLL extern l_int32 pixForegroundFraction ( PIX *pix, l_float32 *pfract ); -LEPT_DLL extern NUMA * pixaCountPixels ( PIXA *pixa ); -LEPT_DLL extern l_int32 pixCountPixels ( PIX *pix, l_int32 *pcount, l_int32 *tab8 ); -LEPT_DLL extern NUMA * pixCountByRow ( PIX *pix, BOX *box ); -LEPT_DLL extern NUMA * pixCountByColumn ( PIX *pix, BOX *box ); -LEPT_DLL extern NUMA * pixCountPixelsByRow ( PIX *pix, l_int32 *tab8 ); -LEPT_DLL extern NUMA * pixCountPixelsByColumn ( PIX *pix ); -LEPT_DLL extern l_int32 pixCountPixelsInRow ( PIX *pix, l_int32 row, l_int32 *pcount, l_int32 *tab8 ); -LEPT_DLL extern NUMA * pixGetMomentByColumn ( PIX *pix, l_int32 order ); -LEPT_DLL extern l_int32 pixThresholdPixelSum ( PIX *pix, l_int32 thresh, l_int32 *pabove, l_int32 *tab8 ); -LEPT_DLL extern l_int32 * makePixelSumTab8 ( void ); -LEPT_DLL extern l_int32 * makePixelCentroidTab8 ( void ); -LEPT_DLL extern NUMA * pixAverageByRow ( PIX *pix, BOX *box, l_int32 type ); -LEPT_DLL extern NUMA * pixAverageByColumn ( PIX *pix, BOX *box, l_int32 type ); -LEPT_DLL extern l_int32 pixAverageInRect ( PIX *pix, BOX *box, l_float32 *pave ); -LEPT_DLL extern NUMA * pixVarianceByRow ( PIX *pix, BOX *box ); -LEPT_DLL extern NUMA * pixVarianceByColumn ( PIX *pix, BOX *box ); -LEPT_DLL extern l_int32 pixVarianceInRect ( PIX *pix, BOX *box, l_float32 *prootvar ); -LEPT_DLL extern NUMA * pixAbsDiffByRow ( PIX *pix, BOX *box ); -LEPT_DLL extern NUMA * pixAbsDiffByColumn ( PIX *pix, BOX *box ); -LEPT_DLL extern l_int32 pixAbsDiffInRect ( PIX *pix, BOX *box, l_int32 dir, l_float32 *pabsdiff ); -LEPT_DLL extern l_int32 pixAbsDiffOnLine ( PIX *pix, l_int32 x1, l_int32 y1, l_int32 x2, l_int32 y2, l_float32 *pabsdiff ); -LEPT_DLL extern l_int32 pixCountArbInRect ( PIX *pixs, BOX *box, l_int32 val, l_int32 factor, l_int32 *pcount ); -LEPT_DLL extern PIX * pixMirroredTiling ( PIX *pixs, l_int32 w, l_int32 h ); -LEPT_DLL extern l_int32 pixFindRepCloseTile ( PIX *pixs, BOX *box, l_int32 searchdir, l_int32 mindist, l_int32 tsize, l_int32 ntiles, BOX **pboxtile, l_int32 debug ); -LEPT_DLL extern NUMA * pixGetGrayHistogram ( PIX *pixs, l_int32 factor ); -LEPT_DLL extern NUMA * pixGetGrayHistogramMasked ( PIX *pixs, PIX *pixm, l_int32 x, l_int32 y, l_int32 factor ); -LEPT_DLL extern NUMA * pixGetGrayHistogramInRect ( PIX *pixs, BOX *box, l_int32 factor ); -LEPT_DLL extern NUMAA * pixGetGrayHistogramTiled ( PIX *pixs, l_int32 factor, l_int32 nx, l_int32 ny ); -LEPT_DLL extern l_int32 pixGetColorHistogram ( PIX *pixs, l_int32 factor, NUMA **pnar, NUMA **pnag, NUMA **pnab ); -LEPT_DLL extern l_int32 pixGetColorHistogramMasked ( PIX *pixs, PIX *pixm, l_int32 x, l_int32 y, l_int32 factor, NUMA **pnar, NUMA **pnag, NUMA **pnab ); -LEPT_DLL extern NUMA * pixGetCmapHistogram ( PIX *pixs, l_int32 factor ); -LEPT_DLL extern NUMA * pixGetCmapHistogramMasked ( PIX *pixs, PIX *pixm, l_int32 x, l_int32 y, l_int32 factor ); -LEPT_DLL extern NUMA * pixGetCmapHistogramInRect ( PIX *pixs, BOX *box, l_int32 factor ); -LEPT_DLL extern l_int32 pixGetRankValue ( PIX *pixs, l_int32 factor, l_float32 rank, l_uint32 *pvalue ); -LEPT_DLL extern l_int32 pixGetRankValueMaskedRGB ( PIX *pixs, PIX *pixm, l_int32 x, l_int32 y, l_int32 factor, l_float32 rank, l_float32 *prval, l_float32 *pgval, l_float32 *pbval ); -LEPT_DLL extern l_int32 pixGetRankValueMasked ( PIX *pixs, PIX *pixm, l_int32 x, l_int32 y, l_int32 factor, l_float32 rank, l_float32 *pval, NUMA **pna ); -LEPT_DLL extern l_int32 pixGetAverageValue ( PIX *pixs, l_int32 factor, l_int32 type, l_uint32 *pvalue ); -LEPT_DLL extern l_int32 pixGetAverageMaskedRGB ( PIX *pixs, PIX *pixm, l_int32 x, l_int32 y, l_int32 factor, l_int32 type, l_float32 *prval, l_float32 *pgval, l_float32 *pbval ); -LEPT_DLL extern l_int32 pixGetAverageMasked ( PIX *pixs, PIX *pixm, l_int32 x, l_int32 y, l_int32 factor, l_int32 type, l_float32 *pval ); -LEPT_DLL extern l_int32 pixGetAverageTiledRGB ( PIX *pixs, l_int32 sx, l_int32 sy, l_int32 type, PIX **ppixr, PIX **ppixg, PIX **ppixb ); -LEPT_DLL extern PIX * pixGetAverageTiled ( PIX *pixs, l_int32 sx, l_int32 sy, l_int32 type ); -LEPT_DLL extern l_int32 pixRowStats ( PIX *pixs, BOX *box, NUMA **pnamean, NUMA **pnamedian, NUMA **pnamode, NUMA **pnamodecount, NUMA **pnavar, NUMA **pnarootvar ); -LEPT_DLL extern l_int32 pixColumnStats ( PIX *pixs, BOX *box, NUMA **pnamean, NUMA **pnamedian, NUMA **pnamode, NUMA **pnamodecount, NUMA **pnavar, NUMA **pnarootvar ); -LEPT_DLL extern l_int32 pixGetRangeValues ( PIX *pixs, l_int32 factor, l_int32 color, l_int32 *pminval, l_int32 *pmaxval ); -LEPT_DLL extern l_int32 pixGetExtremeValue ( PIX *pixs, l_int32 factor, l_int32 type, l_int32 *prval, l_int32 *pgval, l_int32 *pbval, l_int32 *pgrayval ); -LEPT_DLL extern l_int32 pixGetMaxValueInRect ( PIX *pixs, BOX *box, l_uint32 *pmaxval, l_int32 *pxmax, l_int32 *pymax ); -LEPT_DLL extern l_int32 pixGetBinnedComponentRange ( PIX *pixs, l_int32 nbins, l_int32 factor, l_int32 color, l_int32 *pminval, l_int32 *pmaxval, l_uint32 **pcarray, l_int32 fontsize ); -LEPT_DLL extern l_int32 pixGetRankColorArray ( PIX *pixs, l_int32 nbins, l_int32 type, l_int32 factor, l_uint32 **pcarray, l_int32 debugflag, l_int32 fontsize ); -LEPT_DLL extern l_int32 pixGetBinnedColor ( PIX *pixs, PIX *pixg, l_int32 factor, l_int32 nbins, NUMA *nalut, l_uint32 **pcarray, l_int32 debugflag ); -LEPT_DLL extern PIX * pixDisplayColorArray ( l_uint32 *carray, l_int32 ncolors, l_int32 side, l_int32 ncols, l_int32 fontsize ); -LEPT_DLL extern PIX * pixRankBinByStrip ( PIX *pixs, l_int32 direction, l_int32 size, l_int32 nbins, l_int32 type ); -LEPT_DLL extern PIX * pixaGetAlignedStats ( PIXA *pixa, l_int32 type, l_int32 nbins, l_int32 thresh ); -LEPT_DLL extern l_int32 pixaExtractColumnFromEachPix ( PIXA *pixa, l_int32 col, PIX *pixd ); -LEPT_DLL extern l_int32 pixGetRowStats ( PIX *pixs, l_int32 type, l_int32 nbins, l_int32 thresh, l_float32 *colvect ); -LEPT_DLL extern l_int32 pixGetColumnStats ( PIX *pixs, l_int32 type, l_int32 nbins, l_int32 thresh, l_float32 *rowvect ); -LEPT_DLL extern l_int32 pixSetPixelColumn ( PIX *pix, l_int32 col, l_float32 *colvect ); -LEPT_DLL extern l_int32 pixThresholdForFgBg ( PIX *pixs, l_int32 factor, l_int32 thresh, l_int32 *pfgval, l_int32 *pbgval ); -LEPT_DLL extern l_int32 pixSplitDistributionFgBg ( PIX *pixs, l_float32 scorefract, l_int32 factor, l_int32 *pthresh, l_int32 *pfgval, l_int32 *pbgval, PIX **ppixdb ); -LEPT_DLL extern l_int32 pixaFindDimensions ( PIXA *pixa, NUMA **pnaw, NUMA **pnah ); -LEPT_DLL extern l_int32 pixFindAreaPerimRatio ( PIX *pixs, l_int32 *tab, l_float32 *pfract ); -LEPT_DLL extern NUMA * pixaFindPerimToAreaRatio ( PIXA *pixa ); -LEPT_DLL extern l_int32 pixFindPerimToAreaRatio ( PIX *pixs, l_int32 *tab, l_float32 *pfract ); -LEPT_DLL extern NUMA * pixaFindPerimSizeRatio ( PIXA *pixa ); -LEPT_DLL extern l_int32 pixFindPerimSizeRatio ( PIX *pixs, l_int32 *tab, l_float32 *pratio ); -LEPT_DLL extern NUMA * pixaFindAreaFraction ( PIXA *pixa ); -LEPT_DLL extern l_int32 pixFindAreaFraction ( PIX *pixs, l_int32 *tab, l_float32 *pfract ); -LEPT_DLL extern NUMA * pixaFindAreaFractionMasked ( PIXA *pixa, PIX *pixm, l_int32 debug ); -LEPT_DLL extern l_int32 pixFindAreaFractionMasked ( PIX *pixs, BOX *box, PIX *pixm, l_int32 *tab, l_float32 *pfract ); -LEPT_DLL extern NUMA * pixaFindWidthHeightRatio ( PIXA *pixa ); -LEPT_DLL extern NUMA * pixaFindWidthHeightProduct ( PIXA *pixa ); -LEPT_DLL extern l_int32 pixFindOverlapFraction ( PIX *pixs1, PIX *pixs2, l_int32 x2, l_int32 y2, l_int32 *tab, l_float32 *pratio, l_int32 *pnoverlap ); -LEPT_DLL extern BOXA * pixFindRectangleComps ( PIX *pixs, l_int32 dist, l_int32 minw, l_int32 minh ); -LEPT_DLL extern l_int32 pixConformsToRectangle ( PIX *pixs, BOX *box, l_int32 dist, l_int32 *pconforms ); -LEPT_DLL extern PIXA * pixClipRectangles ( PIX *pixs, BOXA *boxa ); -LEPT_DLL extern PIX * pixClipRectangle ( PIX *pixs, BOX *box, BOX **pboxc ); -LEPT_DLL extern PIX * pixClipMasked ( PIX *pixs, PIX *pixm, l_int32 x, l_int32 y, l_uint32 outval ); -LEPT_DLL extern l_int32 pixCropToMatch ( PIX *pixs1, PIX *pixs2, PIX **ppixd1, PIX **ppixd2 ); -LEPT_DLL extern PIX * pixCropToSize ( PIX *pixs, l_int32 w, l_int32 h ); -LEPT_DLL extern PIX * pixResizeToMatch ( PIX *pixs, PIX *pixt, l_int32 w, l_int32 h ); -LEPT_DLL extern PIX * pixMakeFrameMask ( l_int32 w, l_int32 h, l_float32 hf1, l_float32 hf2, l_float32 vf1, l_float32 vf2 ); -LEPT_DLL extern l_int32 pixFractionFgInMask ( PIX *pix1, PIX *pix2, l_float32 *pfract ); -LEPT_DLL extern l_int32 pixClipToForeground ( PIX *pixs, PIX **ppixd, BOX **pbox ); -LEPT_DLL extern l_int32 pixTestClipToForeground ( PIX *pixs, l_int32 *pcanclip ); -LEPT_DLL extern l_int32 pixClipBoxToForeground ( PIX *pixs, BOX *boxs, PIX **ppixd, BOX **pboxd ); -LEPT_DLL extern l_int32 pixScanForForeground ( PIX *pixs, BOX *box, l_int32 scanflag, l_int32 *ploc ); -LEPT_DLL extern l_int32 pixClipBoxToEdges ( PIX *pixs, BOX *boxs, l_int32 lowthresh, l_int32 highthresh, l_int32 maxwidth, l_int32 factor, PIX **ppixd, BOX **pboxd ); -LEPT_DLL extern l_int32 pixScanForEdge ( PIX *pixs, BOX *box, l_int32 lowthresh, l_int32 highthresh, l_int32 maxwidth, l_int32 factor, l_int32 scanflag, l_int32 *ploc ); -LEPT_DLL extern NUMA * pixExtractOnLine ( PIX *pixs, l_int32 x1, l_int32 y1, l_int32 x2, l_int32 y2, l_int32 factor ); -LEPT_DLL extern l_float32 pixAverageOnLine ( PIX *pixs, l_int32 x1, l_int32 y1, l_int32 x2, l_int32 y2, l_int32 factor ); -LEPT_DLL extern NUMA * pixAverageIntensityProfile ( PIX *pixs, l_float32 fract, l_int32 dir, l_int32 first, l_int32 last, l_int32 factor1, l_int32 factor2 ); -LEPT_DLL extern NUMA * pixReversalProfile ( PIX *pixs, l_float32 fract, l_int32 dir, l_int32 first, l_int32 last, l_int32 minreversal, l_int32 factor1, l_int32 factor2 ); -LEPT_DLL extern l_int32 pixWindowedVarianceOnLine ( PIX *pixs, l_int32 dir, l_int32 loc, l_int32 c1, l_int32 c2, l_int32 size, NUMA **pnad ); -LEPT_DLL extern l_int32 pixMinMaxNearLine ( PIX *pixs, l_int32 x1, l_int32 y1, l_int32 x2, l_int32 y2, l_int32 dist, l_int32 direction, NUMA **pnamin, NUMA **pnamax, l_float32 *pminave, l_float32 *pmaxave ); -LEPT_DLL extern PIX * pixRankRowTransform ( PIX *pixs ); -LEPT_DLL extern PIX * pixRankColumnTransform ( PIX *pixs ); -LEPT_DLL extern PIXA * pixaCreate ( l_int32 n ); -LEPT_DLL extern PIXA * pixaCreateFromPix ( PIX *pixs, l_int32 n, l_int32 cellw, l_int32 cellh ); -LEPT_DLL extern PIXA * pixaCreateFromBoxa ( PIX *pixs, BOXA *boxa, l_int32 *pcropwarn ); -LEPT_DLL extern PIXA * pixaSplitPix ( PIX *pixs, l_int32 nx, l_int32 ny, l_int32 borderwidth, l_uint32 bordercolor ); -LEPT_DLL extern void pixaDestroy ( PIXA **ppixa ); -LEPT_DLL extern PIXA * pixaCopy ( PIXA *pixa, l_int32 copyflag ); -LEPT_DLL extern l_int32 pixaAddPix ( PIXA *pixa, PIX *pix, l_int32 copyflag ); -LEPT_DLL extern l_int32 pixaAddBox ( PIXA *pixa, BOX *box, l_int32 copyflag ); -LEPT_DLL extern l_int32 pixaExtendArrayToSize ( PIXA *pixa, l_int32 size ); -LEPT_DLL extern l_int32 pixaGetCount ( PIXA *pixa ); -LEPT_DLL extern l_int32 pixaChangeRefcount ( PIXA *pixa, l_int32 delta ); -LEPT_DLL extern PIX * pixaGetPix ( PIXA *pixa, l_int32 index, l_int32 accesstype ); -LEPT_DLL extern l_int32 pixaGetPixDimensions ( PIXA *pixa, l_int32 index, l_int32 *pw, l_int32 *ph, l_int32 *pd ); -LEPT_DLL extern BOXA * pixaGetBoxa ( PIXA *pixa, l_int32 accesstype ); -LEPT_DLL extern l_int32 pixaGetBoxaCount ( PIXA *pixa ); -LEPT_DLL extern BOX * pixaGetBox ( PIXA *pixa, l_int32 index, l_int32 accesstype ); -LEPT_DLL extern l_int32 pixaGetBoxGeometry ( PIXA *pixa, l_int32 index, l_int32 *px, l_int32 *py, l_int32 *pw, l_int32 *ph ); -LEPT_DLL extern l_int32 pixaSetBoxa ( PIXA *pixa, BOXA *boxa, l_int32 accesstype ); -LEPT_DLL extern PIX ** pixaGetPixArray ( PIXA *pixa ); -LEPT_DLL extern l_int32 pixaVerifyDepth ( PIXA *pixa, l_int32 *pmaxdepth ); -LEPT_DLL extern l_int32 pixaIsFull ( PIXA *pixa, l_int32 *pfullpa, l_int32 *pfullba ); -LEPT_DLL extern l_int32 pixaCountText ( PIXA *pixa, l_int32 *pntext ); -LEPT_DLL extern l_int32 pixaClearText ( PIXA *pixa ); -LEPT_DLL extern void *** pixaGetLinePtrs ( PIXA *pixa, l_int32 *psize ); -LEPT_DLL extern l_int32 pixaWriteStreamInfo ( FILE *fp, PIXA *pixa ); -LEPT_DLL extern l_int32 pixaReplacePix ( PIXA *pixa, l_int32 index, PIX *pix, BOX *box ); -LEPT_DLL extern l_int32 pixaInsertPix ( PIXA *pixa, l_int32 index, PIX *pixs, BOX *box ); -LEPT_DLL extern l_int32 pixaRemovePix ( PIXA *pixa, l_int32 index ); -LEPT_DLL extern l_int32 pixaRemovePixAndSave ( PIXA *pixa, l_int32 index, PIX **ppix, BOX **pbox ); -LEPT_DLL extern l_int32 pixaInitFull ( PIXA *pixa, PIX *pix, BOX *box ); -LEPT_DLL extern l_int32 pixaClear ( PIXA *pixa ); -LEPT_DLL extern l_int32 pixaJoin ( PIXA *pixad, PIXA *pixas, l_int32 istart, l_int32 iend ); -LEPT_DLL extern PIXA * pixaInterleave ( PIXA *pixa1, PIXA *pixa2, l_int32 copyflag ); -LEPT_DLL extern l_int32 pixaaJoin ( PIXAA *paad, PIXAA *paas, l_int32 istart, l_int32 iend ); -LEPT_DLL extern PIXAA * pixaaCreate ( l_int32 n ); -LEPT_DLL extern PIXAA * pixaaCreateFromPixa ( PIXA *pixa, l_int32 n, l_int32 type, l_int32 copyflag ); -LEPT_DLL extern void pixaaDestroy ( PIXAA **ppaa ); -LEPT_DLL extern l_int32 pixaaAddPixa ( PIXAA *paa, PIXA *pixa, l_int32 copyflag ); -LEPT_DLL extern l_int32 pixaaExtendArray ( PIXAA *paa ); -LEPT_DLL extern l_int32 pixaaAddPix ( PIXAA *paa, l_int32 index, PIX *pix, BOX *box, l_int32 copyflag ); -LEPT_DLL extern l_int32 pixaaAddBox ( PIXAA *paa, BOX *box, l_int32 copyflag ); -LEPT_DLL extern l_int32 pixaaGetCount ( PIXAA *paa, NUMA **pna ); -LEPT_DLL extern PIXA * pixaaGetPixa ( PIXAA *paa, l_int32 index, l_int32 accesstype ); -LEPT_DLL extern BOXA * pixaaGetBoxa ( PIXAA *paa, l_int32 accesstype ); -LEPT_DLL extern PIX * pixaaGetPix ( PIXAA *paa, l_int32 index, l_int32 ipix, l_int32 accessflag ); -LEPT_DLL extern l_int32 pixaaVerifyDepth ( PIXAA *paa, l_int32 *pmaxdepth ); -LEPT_DLL extern l_int32 pixaaIsFull ( PIXAA *paa, l_int32 *pfull ); -LEPT_DLL extern l_int32 pixaaInitFull ( PIXAA *paa, PIXA *pixa ); -LEPT_DLL extern l_int32 pixaaReplacePixa ( PIXAA *paa, l_int32 index, PIXA *pixa ); -LEPT_DLL extern l_int32 pixaaClear ( PIXAA *paa ); -LEPT_DLL extern l_int32 pixaaTruncate ( PIXAA *paa ); -LEPT_DLL extern PIXA * pixaRead ( const char *filename ); -LEPT_DLL extern PIXA * pixaReadStream ( FILE *fp ); -LEPT_DLL extern PIXA * pixaReadMem ( const l_uint8 *data, size_t size ); -LEPT_DLL extern l_int32 pixaWrite ( const char *filename, PIXA *pixa ); -LEPT_DLL extern l_int32 pixaWriteStream ( FILE *fp, PIXA *pixa ); -LEPT_DLL extern l_int32 pixaWriteMem ( l_uint8 **pdata, size_t *psize, PIXA *pixa ); -LEPT_DLL extern PIXA * pixaReadBoth ( const char *filename ); -LEPT_DLL extern PIXAA * pixaaReadFromFiles ( const char *dirname, const char *substr, l_int32 first, l_int32 nfiles ); -LEPT_DLL extern PIXAA * pixaaRead ( const char *filename ); -LEPT_DLL extern PIXAA * pixaaReadStream ( FILE *fp ); -LEPT_DLL extern PIXAA * pixaaReadMem ( const l_uint8 *data, size_t size ); -LEPT_DLL extern l_int32 pixaaWrite ( const char *filename, PIXAA *paa ); -LEPT_DLL extern l_int32 pixaaWriteStream ( FILE *fp, PIXAA *paa ); -LEPT_DLL extern l_int32 pixaaWriteMem ( l_uint8 **pdata, size_t *psize, PIXAA *paa ); -LEPT_DLL extern PIXACC * pixaccCreate ( l_int32 w, l_int32 h, l_int32 negflag ); -LEPT_DLL extern PIXACC * pixaccCreateFromPix ( PIX *pix, l_int32 negflag ); -LEPT_DLL extern void pixaccDestroy ( PIXACC **ppixacc ); -LEPT_DLL extern PIX * pixaccFinal ( PIXACC *pixacc, l_int32 outdepth ); -LEPT_DLL extern PIX * pixaccGetPix ( PIXACC *pixacc ); -LEPT_DLL extern l_int32 pixaccGetOffset ( PIXACC *pixacc ); -LEPT_DLL extern l_int32 pixaccAdd ( PIXACC *pixacc, PIX *pix ); -LEPT_DLL extern l_int32 pixaccSubtract ( PIXACC *pixacc, PIX *pix ); -LEPT_DLL extern l_int32 pixaccMultConst ( PIXACC *pixacc, l_float32 factor ); -LEPT_DLL extern l_int32 pixaccMultConstAccumulate ( PIXACC *pixacc, PIX *pix, l_float32 factor ); -LEPT_DLL extern PIX * pixSelectBySize ( PIX *pixs, l_int32 width, l_int32 height, l_int32 connectivity, l_int32 type, l_int32 relation, l_int32 *pchanged ); -LEPT_DLL extern PIXA * pixaSelectBySize ( PIXA *pixas, l_int32 width, l_int32 height, l_int32 type, l_int32 relation, l_int32 *pchanged ); -LEPT_DLL extern NUMA * pixaMakeSizeIndicator ( PIXA *pixa, l_int32 width, l_int32 height, l_int32 type, l_int32 relation ); -LEPT_DLL extern PIX * pixSelectByPerimToAreaRatio ( PIX *pixs, l_float32 thresh, l_int32 connectivity, l_int32 type, l_int32 *pchanged ); -LEPT_DLL extern PIXA * pixaSelectByPerimToAreaRatio ( PIXA *pixas, l_float32 thresh, l_int32 type, l_int32 *pchanged ); -LEPT_DLL extern PIX * pixSelectByPerimSizeRatio ( PIX *pixs, l_float32 thresh, l_int32 connectivity, l_int32 type, l_int32 *pchanged ); -LEPT_DLL extern PIXA * pixaSelectByPerimSizeRatio ( PIXA *pixas, l_float32 thresh, l_int32 type, l_int32 *pchanged ); -LEPT_DLL extern PIX * pixSelectByAreaFraction ( PIX *pixs, l_float32 thresh, l_int32 connectivity, l_int32 type, l_int32 *pchanged ); -LEPT_DLL extern PIXA * pixaSelectByAreaFraction ( PIXA *pixas, l_float32 thresh, l_int32 type, l_int32 *pchanged ); -LEPT_DLL extern PIX * pixSelectByWidthHeightRatio ( PIX *pixs, l_float32 thresh, l_int32 connectivity, l_int32 type, l_int32 *pchanged ); -LEPT_DLL extern PIXA * pixaSelectByWidthHeightRatio ( PIXA *pixas, l_float32 thresh, l_int32 type, l_int32 *pchanged ); -LEPT_DLL extern PIXA * pixaSelectWithIndicator ( PIXA *pixas, NUMA *na, l_int32 *pchanged ); -LEPT_DLL extern l_int32 pixRemoveWithIndicator ( PIX *pixs, PIXA *pixa, NUMA *na ); -LEPT_DLL extern l_int32 pixAddWithIndicator ( PIX *pixs, PIXA *pixa, NUMA *na ); -LEPT_DLL extern PIXA * pixaSelectWithString ( PIXA *pixas, const char *str, l_int32 *perror ); -LEPT_DLL extern PIX * pixaRenderComponent ( PIX *pixs, PIXA *pixa, l_int32 index ); -LEPT_DLL extern PIXA * pixaSort ( PIXA *pixas, l_int32 sorttype, l_int32 sortorder, NUMA **pnaindex, l_int32 copyflag ); -LEPT_DLL extern PIXA * pixaBinSort ( PIXA *pixas, l_int32 sorttype, l_int32 sortorder, NUMA **pnaindex, l_int32 copyflag ); -LEPT_DLL extern PIXA * pixaSortByIndex ( PIXA *pixas, NUMA *naindex, l_int32 copyflag ); -LEPT_DLL extern PIXAA * pixaSort2dByIndex ( PIXA *pixas, NUMAA *naa, l_int32 copyflag ); -LEPT_DLL extern PIXA * pixaSelectRange ( PIXA *pixas, l_int32 first, l_int32 last, l_int32 copyflag ); -LEPT_DLL extern PIXAA * pixaaSelectRange ( PIXAA *paas, l_int32 first, l_int32 last, l_int32 copyflag ); -LEPT_DLL extern PIXAA * pixaaScaleToSize ( PIXAA *paas, l_int32 wd, l_int32 hd ); -LEPT_DLL extern PIXAA * pixaaScaleToSizeVar ( PIXAA *paas, NUMA *nawd, NUMA *nahd ); -LEPT_DLL extern PIXA * pixaScaleToSize ( PIXA *pixas, l_int32 wd, l_int32 hd ); -LEPT_DLL extern PIXA * pixaScale ( PIXA *pixas, l_float32 scalex, l_float32 scaley ); -LEPT_DLL extern PIXA * pixaAddBorderGeneral ( PIXA *pixad, PIXA *pixas, l_int32 left, l_int32 right, l_int32 top, l_int32 bot, l_uint32 val ); -LEPT_DLL extern PIXA * pixaaFlattenToPixa ( PIXAA *paa, NUMA **pnaindex, l_int32 copyflag ); -LEPT_DLL extern l_int32 pixaaSizeRange ( PIXAA *paa, l_int32 *pminw, l_int32 *pminh, l_int32 *pmaxw, l_int32 *pmaxh ); -LEPT_DLL extern l_int32 pixaSizeRange ( PIXA *pixa, l_int32 *pminw, l_int32 *pminh, l_int32 *pmaxw, l_int32 *pmaxh ); -LEPT_DLL extern PIXA * pixaClipToPix ( PIXA *pixas, PIX *pixs ); -LEPT_DLL extern l_int32 pixaGetRenderingDepth ( PIXA *pixa, l_int32 *pdepth ); -LEPT_DLL extern l_int32 pixaHasColor ( PIXA *pixa, l_int32 *phascolor ); -LEPT_DLL extern l_int32 pixaAnyColormaps ( PIXA *pixa, l_int32 *phascmap ); -LEPT_DLL extern l_int32 pixaGetDepthInfo ( PIXA *pixa, l_int32 *pmaxdepth, l_int32 *psame ); -LEPT_DLL extern PIXA * pixaConvertToSameDepth ( PIXA *pixas ); -LEPT_DLL extern l_int32 pixaEqual ( PIXA *pixa1, PIXA *pixa2, l_int32 maxdist, NUMA **pnaindex, l_int32 *psame ); -LEPT_DLL extern PIXA * pixaRotateOrth ( PIXA *pixas, l_int32 rotation ); -LEPT_DLL extern PIX * pixaDisplay ( PIXA *pixa, l_int32 w, l_int32 h ); -LEPT_DLL extern PIX * pixaDisplayOnColor ( PIXA *pixa, l_int32 w, l_int32 h, l_uint32 bgcolor ); -LEPT_DLL extern PIX * pixaDisplayRandomCmap ( PIXA *pixa, l_int32 w, l_int32 h ); -LEPT_DLL extern PIX * pixaDisplayLinearly ( PIXA *pixas, l_int32 direction, l_float32 scalefactor, l_int32 background, l_int32 spacing, l_int32 border, BOXA **pboxa ); -LEPT_DLL extern PIX * pixaDisplayOnLattice ( PIXA *pixa, l_int32 cellw, l_int32 cellh, l_int32 *pncols, BOXA **pboxa ); -LEPT_DLL extern PIX * pixaDisplayUnsplit ( PIXA *pixa, l_int32 nx, l_int32 ny, l_int32 borderwidth, l_uint32 bordercolor ); -LEPT_DLL extern PIX * pixaDisplayTiled ( PIXA *pixa, l_int32 maxwidth, l_int32 background, l_int32 spacing ); -LEPT_DLL extern PIX * pixaDisplayTiledInRows ( PIXA *pixa, l_int32 outdepth, l_int32 maxwidth, l_float32 scalefactor, l_int32 background, l_int32 spacing, l_int32 border ); -LEPT_DLL extern PIX * pixaDisplayTiledInColumns ( PIXA *pixas, l_int32 nx, l_float32 scalefactor, l_int32 spacing, l_int32 border ); -LEPT_DLL extern PIX * pixaDisplayTiledAndScaled ( PIXA *pixa, l_int32 outdepth, l_int32 tilewidth, l_int32 ncols, l_int32 background, l_int32 spacing, l_int32 border ); -LEPT_DLL extern PIX * pixaDisplayTiledWithText ( PIXA *pixa, l_int32 maxwidth, l_float32 scalefactor, l_int32 spacing, l_int32 border, l_int32 fontsize, l_uint32 textcolor ); -LEPT_DLL extern PIX * pixaDisplayTiledByIndex ( PIXA *pixa, NUMA *na, l_int32 width, l_int32 spacing, l_int32 border, l_int32 fontsize, l_uint32 textcolor ); -LEPT_DLL extern PIX * pixaaDisplay ( PIXAA *paa, l_int32 w, l_int32 h ); -LEPT_DLL extern PIX * pixaaDisplayByPixa ( PIXAA *paa, l_int32 xspace, l_int32 yspace, l_int32 maxw ); -LEPT_DLL extern PIXA * pixaaDisplayTiledAndScaled ( PIXAA *paa, l_int32 outdepth, l_int32 tilewidth, l_int32 ncols, l_int32 background, l_int32 spacing, l_int32 border ); -LEPT_DLL extern PIXA * pixaConvertTo1 ( PIXA *pixas, l_int32 thresh ); -LEPT_DLL extern PIXA * pixaConvertTo8 ( PIXA *pixas, l_int32 cmapflag ); -LEPT_DLL extern PIXA * pixaConvertTo8Color ( PIXA *pixas, l_int32 dither ); -LEPT_DLL extern PIXA * pixaConvertTo32 ( PIXA *pixas ); -LEPT_DLL extern PIXA * pixaConstrainedSelect ( PIXA *pixas, l_int32 first, l_int32 last, l_int32 nmax, l_int32 use_pairs, l_int32 copyflag ); -LEPT_DLL extern PIXA * pixaDisplayMultiTiled ( PIXA *pixas, l_int32 nx, l_int32 ny, l_int32 maxw, l_int32 maxh, l_float32 scalefactor, l_int32 spacing, l_int32 border ); -LEPT_DLL extern l_int32 pixaSplitIntoFiles ( PIXA *pixas, l_int32 nsplit, l_float32 scale, l_int32 outwidth, l_int32 write_pixa, l_int32 write_pix, l_int32 write_pdf ); -LEPT_DLL extern l_int32 convertToNUpFiles ( const char *dir, const char *substr, l_int32 nx, l_int32 ny, l_int32 tw, l_int32 spacing, l_int32 border, l_int32 fontsize, const char *outdir ); -LEPT_DLL extern PIXA * convertToNUpPixa ( const char *dir, const char *substr, l_int32 nx, l_int32 ny, l_int32 tw, l_int32 spacing, l_int32 border, l_int32 fontsize ); -LEPT_DLL extern PIXA * pixaConvertToNUpPixa ( PIXA *pixas, SARRAY *sa, l_int32 nx, l_int32 ny, l_int32 tw, l_int32 spacing, l_int32 border, l_int32 fontsize ); -LEPT_DLL extern l_int32 pixaCompareInPdf ( PIXA *pixa1, PIXA *pixa2, l_int32 nx, l_int32 ny, l_int32 tw, l_int32 spacing, l_int32 border, l_int32 fontsize, const char *fileout ); -LEPT_DLL extern l_int32 pmsCreate ( size_t minsize, size_t smallest, NUMA *numalloc, const char *logfile ); -LEPT_DLL extern void pmsDestroy ( ); -LEPT_DLL extern void * pmsCustomAlloc ( size_t nbytes ); -LEPT_DLL extern void pmsCustomDealloc ( void *data ); -LEPT_DLL extern void * pmsGetAlloc ( size_t nbytes ); -LEPT_DLL extern l_int32 pmsGetLevelForAlloc ( size_t nbytes, l_int32 *plevel ); -LEPT_DLL extern l_int32 pmsGetLevelForDealloc ( void *data, l_int32 *plevel ); -LEPT_DLL extern void pmsLogInfo ( ); -LEPT_DLL extern l_int32 pixAddConstantGray ( PIX *pixs, l_int32 val ); -LEPT_DLL extern l_int32 pixMultConstantGray ( PIX *pixs, l_float32 val ); -LEPT_DLL extern PIX * pixAddGray ( PIX *pixd, PIX *pixs1, PIX *pixs2 ); -LEPT_DLL extern PIX * pixSubtractGray ( PIX *pixd, PIX *pixs1, PIX *pixs2 ); -LEPT_DLL extern PIX * pixThresholdToValue ( PIX *pixd, PIX *pixs, l_int32 threshval, l_int32 setval ); -LEPT_DLL extern PIX * pixInitAccumulate ( l_int32 w, l_int32 h, l_uint32 offset ); -LEPT_DLL extern PIX * pixFinalAccumulate ( PIX *pixs, l_uint32 offset, l_int32 depth ); -LEPT_DLL extern PIX * pixFinalAccumulateThreshold ( PIX *pixs, l_uint32 offset, l_uint32 threshold ); -LEPT_DLL extern l_int32 pixAccumulate ( PIX *pixd, PIX *pixs, l_int32 op ); -LEPT_DLL extern l_int32 pixMultConstAccumulate ( PIX *pixs, l_float32 factor, l_uint32 offset ); -LEPT_DLL extern PIX * pixAbsDifference ( PIX *pixs1, PIX *pixs2 ); -LEPT_DLL extern PIX * pixAddRGB ( PIX *pixs1, PIX *pixs2 ); -LEPT_DLL extern PIX * pixMinOrMax ( PIX *pixd, PIX *pixs1, PIX *pixs2, l_int32 type ); -LEPT_DLL extern PIX * pixMaxDynamicRange ( PIX *pixs, l_int32 type ); -LEPT_DLL extern PIX * pixMaxDynamicRangeRGB ( PIX *pixs, l_int32 type ); -LEPT_DLL extern l_uint32 linearScaleRGBVal ( l_uint32 sval, l_float32 factor ); -LEPT_DLL extern l_uint32 logScaleRGBVal ( l_uint32 sval, l_float32 *tab, l_float32 factor ); -LEPT_DLL extern l_float32 * makeLogBase2Tab ( void ); -LEPT_DLL extern l_float32 getLogBase2 ( l_int32 val, l_float32 *logtab ); -LEPT_DLL extern PIXC * pixcompCreateFromPix ( PIX *pix, l_int32 comptype ); -LEPT_DLL extern PIXC * pixcompCreateFromString ( l_uint8 *data, size_t size, l_int32 copyflag ); -LEPT_DLL extern PIXC * pixcompCreateFromFile ( const char *filename, l_int32 comptype ); -LEPT_DLL extern void pixcompDestroy ( PIXC **ppixc ); -LEPT_DLL extern PIXC * pixcompCopy ( PIXC *pixcs ); -LEPT_DLL extern l_int32 pixcompGetDimensions ( PIXC *pixc, l_int32 *pw, l_int32 *ph, l_int32 *pd ); -LEPT_DLL extern l_int32 pixcompDetermineFormat ( l_int32 comptype, l_int32 d, l_int32 cmapflag, l_int32 *pformat ); -LEPT_DLL extern PIX * pixCreateFromPixcomp ( PIXC *pixc ); -LEPT_DLL extern PIXAC * pixacompCreate ( l_int32 n ); -LEPT_DLL extern PIXAC * pixacompCreateWithInit ( l_int32 n, l_int32 offset, PIX *pix, l_int32 comptype ); -LEPT_DLL extern PIXAC * pixacompCreateFromPixa ( PIXA *pixa, l_int32 comptype, l_int32 accesstype ); -LEPT_DLL extern PIXAC * pixacompCreateFromFiles ( const char *dirname, const char *substr, l_int32 comptype ); -LEPT_DLL extern PIXAC * pixacompCreateFromSA ( SARRAY *sa, l_int32 comptype ); -LEPT_DLL extern void pixacompDestroy ( PIXAC **ppixac ); -LEPT_DLL extern l_int32 pixacompAddPix ( PIXAC *pixac, PIX *pix, l_int32 comptype ); -LEPT_DLL extern l_int32 pixacompAddPixcomp ( PIXAC *pixac, PIXC *pixc, l_int32 copyflag ); -LEPT_DLL extern l_int32 pixacompReplacePix ( PIXAC *pixac, l_int32 index, PIX *pix, l_int32 comptype ); -LEPT_DLL extern l_int32 pixacompReplacePixcomp ( PIXAC *pixac, l_int32 index, PIXC *pixc ); -LEPT_DLL extern l_int32 pixacompAddBox ( PIXAC *pixac, BOX *box, l_int32 copyflag ); -LEPT_DLL extern l_int32 pixacompGetCount ( PIXAC *pixac ); -LEPT_DLL extern PIXC * pixacompGetPixcomp ( PIXAC *pixac, l_int32 index, l_int32 copyflag ); -LEPT_DLL extern PIX * pixacompGetPix ( PIXAC *pixac, l_int32 index ); -LEPT_DLL extern l_int32 pixacompGetPixDimensions ( PIXAC *pixac, l_int32 index, l_int32 *pw, l_int32 *ph, l_int32 *pd ); -LEPT_DLL extern BOXA * pixacompGetBoxa ( PIXAC *pixac, l_int32 accesstype ); -LEPT_DLL extern l_int32 pixacompGetBoxaCount ( PIXAC *pixac ); -LEPT_DLL extern BOX * pixacompGetBox ( PIXAC *pixac, l_int32 index, l_int32 accesstype ); -LEPT_DLL extern l_int32 pixacompGetBoxGeometry ( PIXAC *pixac, l_int32 index, l_int32 *px, l_int32 *py, l_int32 *pw, l_int32 *ph ); -LEPT_DLL extern l_int32 pixacompGetOffset ( PIXAC *pixac ); -LEPT_DLL extern l_int32 pixacompSetOffset ( PIXAC *pixac, l_int32 offset ); -LEPT_DLL extern PIXA * pixaCreateFromPixacomp ( PIXAC *pixac, l_int32 accesstype ); -LEPT_DLL extern l_int32 pixacompJoin ( PIXAC *pixacd, PIXAC *pixacs, l_int32 istart, l_int32 iend ); -LEPT_DLL extern PIXAC * pixacompInterleave ( PIXAC *pixac1, PIXAC *pixac2 ); -LEPT_DLL extern PIXAC * pixacompRead ( const char *filename ); -LEPT_DLL extern PIXAC * pixacompReadStream ( FILE *fp ); -LEPT_DLL extern PIXAC * pixacompReadMem ( const l_uint8 *data, size_t size ); -LEPT_DLL extern l_int32 pixacompWrite ( const char *filename, PIXAC *pixac ); -LEPT_DLL extern l_int32 pixacompWriteStream ( FILE *fp, PIXAC *pixac ); -LEPT_DLL extern l_int32 pixacompWriteMem ( l_uint8 **pdata, size_t *psize, PIXAC *pixac ); -LEPT_DLL extern l_int32 pixacompConvertToPdf ( PIXAC *pixac, l_int32 res, l_float32 scalefactor, l_int32 type, l_int32 quality, const char *title, const char *fileout ); -LEPT_DLL extern l_int32 pixacompConvertToPdfData ( PIXAC *pixac, l_int32 res, l_float32 scalefactor, l_int32 type, l_int32 quality, const char *title, l_uint8 **pdata, size_t *pnbytes ); -LEPT_DLL extern l_int32 pixacompWriteStreamInfo ( FILE *fp, PIXAC *pixac, const char *text ); -LEPT_DLL extern l_int32 pixcompWriteStreamInfo ( FILE *fp, PIXC *pixc, const char *text ); -LEPT_DLL extern PIX * pixacompDisplayTiledAndScaled ( PIXAC *pixac, l_int32 outdepth, l_int32 tilewidth, l_int32 ncols, l_int32 background, l_int32 spacing, l_int32 border ); -LEPT_DLL extern PIX * pixThreshold8 ( PIX *pixs, l_int32 d, l_int32 nlevels, l_int32 cmapflag ); -LEPT_DLL extern PIX * pixRemoveColormapGeneral ( PIX *pixs, l_int32 type, l_int32 ifnocmap ); -LEPT_DLL extern PIX * pixRemoveColormap ( PIX *pixs, l_int32 type ); -LEPT_DLL extern l_int32 pixAddGrayColormap8 ( PIX *pixs ); -LEPT_DLL extern PIX * pixAddMinimalGrayColormap8 ( PIX *pixs ); -LEPT_DLL extern PIX * pixConvertRGBToLuminance ( PIX *pixs ); -LEPT_DLL extern PIX * pixConvertRGBToGray ( PIX *pixs, l_float32 rwt, l_float32 gwt, l_float32 bwt ); -LEPT_DLL extern PIX * pixConvertRGBToGrayFast ( PIX *pixs ); -LEPT_DLL extern PIX * pixConvertRGBToGrayMinMax ( PIX *pixs, l_int32 type ); -LEPT_DLL extern PIX * pixConvertRGBToGraySatBoost ( PIX *pixs, l_int32 refval ); -LEPT_DLL extern PIX * pixConvertRGBToGrayArb ( PIX *pixs, l_float32 rc, l_float32 gc, l_float32 bc ); -LEPT_DLL extern PIX * pixConvertGrayToColormap ( PIX *pixs ); -LEPT_DLL extern PIX * pixConvertGrayToColormap8 ( PIX *pixs, l_int32 mindepth ); -LEPT_DLL extern PIX * pixColorizeGray ( PIX *pixs, l_uint32 color, l_int32 cmapflag ); -LEPT_DLL extern PIX * pixConvertRGBToColormap ( PIX *pixs, l_int32 ditherflag ); -LEPT_DLL extern PIX * pixConvertCmapTo1 ( PIX *pixs ); -LEPT_DLL extern l_int32 pixQuantizeIfFewColors ( PIX *pixs, l_int32 maxcolors, l_int32 mingraycolors, l_int32 octlevel, PIX **ppixd ); -LEPT_DLL extern PIX * pixConvert16To8 ( PIX *pixs, l_int32 type ); -LEPT_DLL extern PIX * pixConvertGrayToFalseColor ( PIX *pixs, l_float32 gamma ); -LEPT_DLL extern PIX * pixUnpackBinary ( PIX *pixs, l_int32 depth, l_int32 invert ); -LEPT_DLL extern PIX * pixConvert1To16 ( PIX *pixd, PIX *pixs, l_uint16 val0, l_uint16 val1 ); -LEPT_DLL extern PIX * pixConvert1To32 ( PIX *pixd, PIX *pixs, l_uint32 val0, l_uint32 val1 ); -LEPT_DLL extern PIX * pixConvert1To2Cmap ( PIX *pixs ); -LEPT_DLL extern PIX * pixConvert1To2 ( PIX *pixd, PIX *pixs, l_int32 val0, l_int32 val1 ); -LEPT_DLL extern PIX * pixConvert1To4Cmap ( PIX *pixs ); -LEPT_DLL extern PIX * pixConvert1To4 ( PIX *pixd, PIX *pixs, l_int32 val0, l_int32 val1 ); -LEPT_DLL extern PIX * pixConvert1To8Cmap ( PIX *pixs ); -LEPT_DLL extern PIX * pixConvert1To8 ( PIX *pixd, PIX *pixs, l_uint8 val0, l_uint8 val1 ); -LEPT_DLL extern PIX * pixConvert2To8 ( PIX *pixs, l_uint8 val0, l_uint8 val1, l_uint8 val2, l_uint8 val3, l_int32 cmapflag ); -LEPT_DLL extern PIX * pixConvert4To8 ( PIX *pixs, l_int32 cmapflag ); -LEPT_DLL extern PIX * pixConvert8To16 ( PIX *pixs, l_int32 leftshift ); -LEPT_DLL extern PIX * pixConvertTo1 ( PIX *pixs, l_int32 threshold ); -LEPT_DLL extern PIX * pixConvertTo1BySampling ( PIX *pixs, l_int32 factor, l_int32 threshold ); -LEPT_DLL extern PIX * pixConvertTo8 ( PIX *pixs, l_int32 cmapflag ); -LEPT_DLL extern PIX * pixConvertTo8BySampling ( PIX *pixs, l_int32 factor, l_int32 cmapflag ); -LEPT_DLL extern PIX * pixConvertTo8Color ( PIX *pixs, l_int32 dither ); -LEPT_DLL extern PIX * pixConvertTo16 ( PIX *pixs ); -LEPT_DLL extern PIX * pixConvertTo32 ( PIX *pixs ); -LEPT_DLL extern PIX * pixConvertTo32BySampling ( PIX *pixs, l_int32 factor ); -LEPT_DLL extern PIX * pixConvert8To32 ( PIX *pixs ); -LEPT_DLL extern PIX * pixConvertTo8Or32 ( PIX *pixs, l_int32 copyflag, l_int32 warnflag ); -LEPT_DLL extern PIX * pixConvert24To32 ( PIX *pixs ); -LEPT_DLL extern PIX * pixConvert32To24 ( PIX *pixs ); -LEPT_DLL extern PIX * pixConvert32To16 ( PIX *pixs, l_int32 type ); -LEPT_DLL extern PIX * pixConvert32To8 ( PIX *pixs, l_int32 type16, l_int32 type8 ); -LEPT_DLL extern PIX * pixRemoveAlpha ( PIX *pixs ); -LEPT_DLL extern PIX * pixAddAlphaTo1bpp ( PIX *pixd, PIX *pixs ); -LEPT_DLL extern PIX * pixConvertLossless ( PIX *pixs, l_int32 d ); -LEPT_DLL extern PIX * pixConvertForPSWrap ( PIX *pixs ); -LEPT_DLL extern PIX * pixConvertToSubpixelRGB ( PIX *pixs, l_float32 scalex, l_float32 scaley, l_int32 order ); -LEPT_DLL extern PIX * pixConvertGrayToSubpixelRGB ( PIX *pixs, l_float32 scalex, l_float32 scaley, l_int32 order ); -LEPT_DLL extern PIX * pixConvertColorToSubpixelRGB ( PIX *pixs, l_float32 scalex, l_float32 scaley, l_int32 order ); -LEPT_DLL extern void l_setNeutralBoostVal ( l_int32 val ); -LEPT_DLL extern PIX * pixConnCompTransform ( PIX *pixs, l_int32 connect, l_int32 depth ); -LEPT_DLL extern PIX * pixConnCompAreaTransform ( PIX *pixs, l_int32 connect ); -LEPT_DLL extern l_int32 pixConnCompIncrInit ( PIX *pixs, l_int32 conn, PIX **ppixd, PTAA **pptaa, l_int32 *pncc ); -LEPT_DLL extern l_int32 pixConnCompIncrAdd ( PIX *pixs, PTAA *ptaa, l_int32 *pncc, l_float32 x, l_float32 y, l_int32 debug ); -LEPT_DLL extern l_int32 pixGetSortedNeighborValues ( PIX *pixs, l_int32 x, l_int32 y, l_int32 conn, l_int32 **pneigh, l_int32 *pnvals ); -LEPT_DLL extern PIX * pixLocToColorTransform ( PIX *pixs ); -LEPT_DLL extern PIXTILING * pixTilingCreate ( PIX *pixs, l_int32 nx, l_int32 ny, l_int32 w, l_int32 h, l_int32 xoverlap, l_int32 yoverlap ); -LEPT_DLL extern void pixTilingDestroy ( PIXTILING **ppt ); -LEPT_DLL extern l_int32 pixTilingGetCount ( PIXTILING *pt, l_int32 *pnx, l_int32 *pny ); -LEPT_DLL extern l_int32 pixTilingGetSize ( PIXTILING *pt, l_int32 *pw, l_int32 *ph ); -LEPT_DLL extern PIX * pixTilingGetTile ( PIXTILING *pt, l_int32 i, l_int32 j ); -LEPT_DLL extern l_int32 pixTilingNoStripOnPaint ( PIXTILING *pt ); -LEPT_DLL extern l_int32 pixTilingPaintTile ( PIX *pixd, l_int32 i, l_int32 j, PIX *pixs, PIXTILING *pt ); -LEPT_DLL extern PIX * pixReadStreamPng ( FILE *fp ); -LEPT_DLL extern l_int32 readHeaderPng ( const char *filename, l_int32 *pw, l_int32 *ph, l_int32 *pbps, l_int32 *pspp, l_int32 *piscmap ); -LEPT_DLL extern l_int32 freadHeaderPng ( FILE *fp, l_int32 *pw, l_int32 *ph, l_int32 *pbps, l_int32 *pspp, l_int32 *piscmap ); -LEPT_DLL extern l_int32 readHeaderMemPng ( const l_uint8 *data, size_t size, l_int32 *pw, l_int32 *ph, l_int32 *pbps, l_int32 *pspp, l_int32 *piscmap ); -LEPT_DLL extern l_int32 fgetPngResolution ( FILE *fp, l_int32 *pxres, l_int32 *pyres ); -LEPT_DLL extern l_int32 isPngInterlaced ( const char *filename, l_int32 *pinterlaced ); -LEPT_DLL extern l_int32 fgetPngColormapInfo ( FILE *fp, PIXCMAP **pcmap, l_int32 *ptransparency ); -LEPT_DLL extern l_int32 pixWritePng ( const char *filename, PIX *pix, l_float32 gamma ); -LEPT_DLL extern l_int32 pixWriteStreamPng ( FILE *fp, PIX *pix, l_float32 gamma ); -LEPT_DLL extern l_int32 pixSetZlibCompression ( PIX *pix, l_int32 compval ); -LEPT_DLL extern void l_pngSetReadStrip16To8 ( l_int32 flag ); -LEPT_DLL extern PIX * pixReadMemPng ( const l_uint8 *data, size_t size ); -LEPT_DLL extern l_int32 pixWriteMemPng ( l_uint8 **pdata, size_t *psize, PIX *pix, l_float32 gamma ); -LEPT_DLL extern PIX * pixReadStreamPnm ( FILE *fp ); -LEPT_DLL extern l_int32 readHeaderPnm ( const char *filename, l_int32 *pw, l_int32 *ph, l_int32 *pd, l_int32 *ptype, l_int32 *pbps, l_int32 *pspp ); -LEPT_DLL extern l_int32 freadHeaderPnm ( FILE *fp, l_int32 *pw, l_int32 *ph, l_int32 *pd, l_int32 *ptype, l_int32 *pbps, l_int32 *pspp ); -LEPT_DLL extern l_int32 pixWriteStreamPnm ( FILE *fp, PIX *pix ); -LEPT_DLL extern l_int32 pixWriteStreamAsciiPnm ( FILE *fp, PIX *pix ); -LEPT_DLL extern l_int32 pixWriteStreamPam ( FILE *fp, PIX *pix ); -LEPT_DLL extern PIX * pixReadMemPnm ( const l_uint8 *data, size_t size ); -LEPT_DLL extern l_int32 readHeaderMemPnm ( const l_uint8 *data, size_t size, l_int32 *pw, l_int32 *ph, l_int32 *pd, l_int32 *ptype, l_int32 *pbps, l_int32 *pspp ); -LEPT_DLL extern l_int32 pixWriteMemPnm ( l_uint8 **pdata, size_t *psize, PIX *pix ); -LEPT_DLL extern l_int32 pixWriteMemPam ( l_uint8 **pdata, size_t *psize, PIX *pix ); -LEPT_DLL extern PIX * pixProjectiveSampledPta ( PIX *pixs, PTA *ptad, PTA *ptas, l_int32 incolor ); -LEPT_DLL extern PIX * pixProjectiveSampled ( PIX *pixs, l_float32 *vc, l_int32 incolor ); -LEPT_DLL extern PIX * pixProjectivePta ( PIX *pixs, PTA *ptad, PTA *ptas, l_int32 incolor ); -LEPT_DLL extern PIX * pixProjective ( PIX *pixs, l_float32 *vc, l_int32 incolor ); -LEPT_DLL extern PIX * pixProjectivePtaColor ( PIX *pixs, PTA *ptad, PTA *ptas, l_uint32 colorval ); -LEPT_DLL extern PIX * pixProjectiveColor ( PIX *pixs, l_float32 *vc, l_uint32 colorval ); -LEPT_DLL extern PIX * pixProjectivePtaGray ( PIX *pixs, PTA *ptad, PTA *ptas, l_uint8 grayval ); -LEPT_DLL extern PIX * pixProjectiveGray ( PIX *pixs, l_float32 *vc, l_uint8 grayval ); -LEPT_DLL extern PIX * pixProjectivePtaWithAlpha ( PIX *pixs, PTA *ptad, PTA *ptas, PIX *pixg, l_float32 fract, l_int32 border ); -LEPT_DLL extern l_int32 getProjectiveXformCoeffs ( PTA *ptas, PTA *ptad, l_float32 **pvc ); -LEPT_DLL extern l_int32 projectiveXformSampledPt ( l_float32 *vc, l_int32 x, l_int32 y, l_int32 *pxp, l_int32 *pyp ); -LEPT_DLL extern l_int32 projectiveXformPt ( l_float32 *vc, l_int32 x, l_int32 y, l_float32 *pxp, l_float32 *pyp ); -LEPT_DLL extern l_int32 convertFilesToPS ( const char *dirin, const char *substr, l_int32 res, const char *fileout ); -LEPT_DLL extern l_int32 sarrayConvertFilesToPS ( SARRAY *sa, l_int32 res, const char *fileout ); -LEPT_DLL extern l_int32 convertFilesFittedToPS ( const char *dirin, const char *substr, l_float32 xpts, l_float32 ypts, const char *fileout ); -LEPT_DLL extern l_int32 sarrayConvertFilesFittedToPS ( SARRAY *sa, l_float32 xpts, l_float32 ypts, const char *fileout ); -LEPT_DLL extern l_int32 writeImageCompressedToPSFile ( const char *filein, const char *fileout, l_int32 res, l_int32 *pfirstfile, l_int32 *pindex ); -LEPT_DLL extern l_int32 convertSegmentedPagesToPS ( const char *pagedir, const char *pagestr, l_int32 page_numpre, const char *maskdir, const char *maskstr, l_int32 mask_numpre, l_int32 numpost, l_int32 maxnum, l_float32 textscale, l_float32 imagescale, l_int32 threshold, const char *fileout ); -LEPT_DLL extern l_int32 pixWriteSegmentedPageToPS ( PIX *pixs, PIX *pixm, l_float32 textscale, l_float32 imagescale, l_int32 threshold, l_int32 pageno, const char *fileout ); -LEPT_DLL extern l_int32 pixWriteMixedToPS ( PIX *pixb, PIX *pixc, l_float32 scale, l_int32 pageno, const char *fileout ); -LEPT_DLL extern l_int32 convertToPSEmbed ( const char *filein, const char *fileout, l_int32 level ); -LEPT_DLL extern l_int32 pixaWriteCompressedToPS ( PIXA *pixa, const char *fileout, l_int32 res, l_int32 level ); -LEPT_DLL extern l_int32 pixWritePSEmbed ( const char *filein, const char *fileout ); -LEPT_DLL extern l_int32 pixWriteStreamPS ( FILE *fp, PIX *pix, BOX *box, l_int32 res, l_float32 scale ); -LEPT_DLL extern char * pixWriteStringPS ( PIX *pixs, BOX *box, l_int32 res, l_float32 scale ); -LEPT_DLL extern char * generateUncompressedPS ( char *hexdata, l_int32 w, l_int32 h, l_int32 d, l_int32 psbpl, l_int32 bps, l_float32 xpt, l_float32 ypt, l_float32 wpt, l_float32 hpt, l_int32 boxflag ); -LEPT_DLL extern void getScaledParametersPS ( BOX *box, l_int32 wpix, l_int32 hpix, l_int32 res, l_float32 scale, l_float32 *pxpt, l_float32 *pypt, l_float32 *pwpt, l_float32 *phpt ); -LEPT_DLL extern void convertByteToHexAscii ( l_uint8 byteval, char *pnib1, char *pnib2 ); -LEPT_DLL extern l_int32 convertJpegToPSEmbed ( const char *filein, const char *fileout ); -LEPT_DLL extern l_int32 convertJpegToPS ( const char *filein, const char *fileout, const char *operation, l_int32 x, l_int32 y, l_int32 res, l_float32 scale, l_int32 pageno, l_int32 endpage ); -LEPT_DLL extern l_int32 convertJpegToPSString ( const char *filein, char **poutstr, l_int32 *pnbytes, l_int32 x, l_int32 y, l_int32 res, l_float32 scale, l_int32 pageno, l_int32 endpage ); -LEPT_DLL extern char * generateJpegPS ( const char *filein, L_COMP_DATA *cid, l_float32 xpt, l_float32 ypt, l_float32 wpt, l_float32 hpt, l_int32 pageno, l_int32 endpage ); -LEPT_DLL extern l_int32 convertG4ToPSEmbed ( const char *filein, const char *fileout ); -LEPT_DLL extern l_int32 convertG4ToPS ( const char *filein, const char *fileout, const char *operation, l_int32 x, l_int32 y, l_int32 res, l_float32 scale, l_int32 pageno, l_int32 maskflag, l_int32 endpage ); -LEPT_DLL extern l_int32 convertG4ToPSString ( const char *filein, char **poutstr, l_int32 *pnbytes, l_int32 x, l_int32 y, l_int32 res, l_float32 scale, l_int32 pageno, l_int32 maskflag, l_int32 endpage ); -LEPT_DLL extern char * generateG4PS ( const char *filein, L_COMP_DATA *cid, l_float32 xpt, l_float32 ypt, l_float32 wpt, l_float32 hpt, l_int32 maskflag, l_int32 pageno, l_int32 endpage ); -LEPT_DLL extern l_int32 convertTiffMultipageToPS ( const char *filein, const char *fileout, l_float32 fillfract ); -LEPT_DLL extern l_int32 convertFlateToPSEmbed ( const char *filein, const char *fileout ); -LEPT_DLL extern l_int32 convertFlateToPS ( const char *filein, const char *fileout, const char *operation, l_int32 x, l_int32 y, l_int32 res, l_float32 scale, l_int32 pageno, l_int32 endpage ); -LEPT_DLL extern l_int32 convertFlateToPSString ( const char *filein, char **poutstr, l_int32 *pnbytes, l_int32 x, l_int32 y, l_int32 res, l_float32 scale, l_int32 pageno, l_int32 endpage ); -LEPT_DLL extern char * generateFlatePS ( const char *filein, L_COMP_DATA *cid, l_float32 xpt, l_float32 ypt, l_float32 wpt, l_float32 hpt, l_int32 pageno, l_int32 endpage ); -LEPT_DLL extern l_int32 pixWriteMemPS ( l_uint8 **pdata, size_t *psize, PIX *pix, BOX *box, l_int32 res, l_float32 scale ); -LEPT_DLL extern l_int32 getResLetterPage ( l_int32 w, l_int32 h, l_float32 fillfract ); -LEPT_DLL extern l_int32 getResA4Page ( l_int32 w, l_int32 h, l_float32 fillfract ); -LEPT_DLL extern void l_psWriteBoundingBox ( l_int32 flag ); -LEPT_DLL extern PTA * ptaCreate ( l_int32 n ); -LEPT_DLL extern PTA * ptaCreateFromNuma ( NUMA *nax, NUMA *nay ); -LEPT_DLL extern void ptaDestroy ( PTA **ppta ); -LEPT_DLL extern PTA * ptaCopy ( PTA *pta ); -LEPT_DLL extern PTA * ptaCopyRange ( PTA *ptas, l_int32 istart, l_int32 iend ); -LEPT_DLL extern PTA * ptaClone ( PTA *pta ); -LEPT_DLL extern l_int32 ptaEmpty ( PTA *pta ); -LEPT_DLL extern l_int32 ptaAddPt ( PTA *pta, l_float32 x, l_float32 y ); -LEPT_DLL extern l_int32 ptaInsertPt ( PTA *pta, l_int32 index, l_int32 x, l_int32 y ); -LEPT_DLL extern l_int32 ptaRemovePt ( PTA *pta, l_int32 index ); -LEPT_DLL extern l_int32 ptaGetRefcount ( PTA *pta ); -LEPT_DLL extern l_int32 ptaChangeRefcount ( PTA *pta, l_int32 delta ); -LEPT_DLL extern l_int32 ptaGetCount ( PTA *pta ); -LEPT_DLL extern l_int32 ptaGetPt ( PTA *pta, l_int32 index, l_float32 *px, l_float32 *py ); -LEPT_DLL extern l_int32 ptaGetIPt ( PTA *pta, l_int32 index, l_int32 *px, l_int32 *py ); -LEPT_DLL extern l_int32 ptaSetPt ( PTA *pta, l_int32 index, l_float32 x, l_float32 y ); -LEPT_DLL extern l_int32 ptaGetArrays ( PTA *pta, NUMA **pnax, NUMA **pnay ); -LEPT_DLL extern PTA * ptaRead ( const char *filename ); -LEPT_DLL extern PTA * ptaReadStream ( FILE *fp ); -LEPT_DLL extern PTA * ptaReadMem ( const l_uint8 *data, size_t size ); -LEPT_DLL extern l_int32 ptaWrite ( const char *filename, PTA *pta, l_int32 type ); -LEPT_DLL extern l_int32 ptaWriteStream ( FILE *fp, PTA *pta, l_int32 type ); -LEPT_DLL extern l_int32 ptaWriteMem ( l_uint8 **pdata, size_t *psize, PTA *pta, l_int32 type ); -LEPT_DLL extern PTAA * ptaaCreate ( l_int32 n ); -LEPT_DLL extern void ptaaDestroy ( PTAA **pptaa ); -LEPT_DLL extern l_int32 ptaaAddPta ( PTAA *ptaa, PTA *pta, l_int32 copyflag ); -LEPT_DLL extern l_int32 ptaaGetCount ( PTAA *ptaa ); -LEPT_DLL extern PTA * ptaaGetPta ( PTAA *ptaa, l_int32 index, l_int32 accessflag ); -LEPT_DLL extern l_int32 ptaaGetPt ( PTAA *ptaa, l_int32 ipta, l_int32 jpt, l_float32 *px, l_float32 *py ); -LEPT_DLL extern l_int32 ptaaInitFull ( PTAA *ptaa, PTA *pta ); -LEPT_DLL extern l_int32 ptaaReplacePta ( PTAA *ptaa, l_int32 index, PTA *pta ); -LEPT_DLL extern l_int32 ptaaAddPt ( PTAA *ptaa, l_int32 ipta, l_float32 x, l_float32 y ); -LEPT_DLL extern l_int32 ptaaTruncate ( PTAA *ptaa ); -LEPT_DLL extern PTAA * ptaaRead ( const char *filename ); -LEPT_DLL extern PTAA * ptaaReadStream ( FILE *fp ); -LEPT_DLL extern PTAA * ptaaReadMem ( const l_uint8 *data, size_t size ); -LEPT_DLL extern l_int32 ptaaWrite ( const char *filename, PTAA *ptaa, l_int32 type ); -LEPT_DLL extern l_int32 ptaaWriteStream ( FILE *fp, PTAA *ptaa, l_int32 type ); -LEPT_DLL extern l_int32 ptaaWriteMem ( l_uint8 **pdata, size_t *psize, PTAA *ptaa, l_int32 type ); -LEPT_DLL extern PTA * ptaSubsample ( PTA *ptas, l_int32 subfactor ); -LEPT_DLL extern l_int32 ptaJoin ( PTA *ptad, PTA *ptas, l_int32 istart, l_int32 iend ); -LEPT_DLL extern l_int32 ptaaJoin ( PTAA *ptaad, PTAA *ptaas, l_int32 istart, l_int32 iend ); -LEPT_DLL extern PTA * ptaReverse ( PTA *ptas, l_int32 type ); -LEPT_DLL extern PTA * ptaTranspose ( PTA *ptas ); -LEPT_DLL extern PTA * ptaCyclicPerm ( PTA *ptas, l_int32 xs, l_int32 ys ); -LEPT_DLL extern BOX * ptaGetBoundingRegion ( PTA *pta ); -LEPT_DLL extern l_int32 ptaGetRange ( PTA *pta, l_float32 *pminx, l_float32 *pmaxx, l_float32 *pminy, l_float32 *pmaxy ); -LEPT_DLL extern PTA * ptaGetInsideBox ( PTA *ptas, BOX *box ); -LEPT_DLL extern PTA * pixFindCornerPixels ( PIX *pixs ); -LEPT_DLL extern l_int32 ptaContainsPt ( PTA *pta, l_int32 x, l_int32 y ); -LEPT_DLL extern l_int32 ptaTestIntersection ( PTA *pta1, PTA *pta2 ); -LEPT_DLL extern PTA * ptaTransform ( PTA *ptas, l_int32 shiftx, l_int32 shifty, l_float32 scalex, l_float32 scaley ); -LEPT_DLL extern l_int32 ptaPtInsidePolygon ( PTA *pta, l_float32 x, l_float32 y, l_int32 *pinside ); -LEPT_DLL extern l_float32 l_angleBetweenVectors ( l_float32 x1, l_float32 y1, l_float32 x2, l_float32 y2 ); -LEPT_DLL extern l_int32 ptaGetMinMax ( PTA *pta, l_float32 *pxmin, l_float32 *pymin, l_float32 *pxmax, l_float32 *pymax ); -LEPT_DLL extern PTA * ptaSelectByValue ( PTA *ptas, l_float32 xth, l_float32 yth, l_int32 type, l_int32 relation ); -LEPT_DLL extern l_int32 ptaGetLinearLSF ( PTA *pta, l_float32 *pa, l_float32 *pb, NUMA **pnafit ); -LEPT_DLL extern l_int32 ptaGetQuadraticLSF ( PTA *pta, l_float32 *pa, l_float32 *pb, l_float32 *pc, NUMA **pnafit ); -LEPT_DLL extern l_int32 ptaGetCubicLSF ( PTA *pta, l_float32 *pa, l_float32 *pb, l_float32 *pc, l_float32 *pd, NUMA **pnafit ); -LEPT_DLL extern l_int32 ptaGetQuarticLSF ( PTA *pta, l_float32 *pa, l_float32 *pb, l_float32 *pc, l_float32 *pd, l_float32 *pe, NUMA **pnafit ); -LEPT_DLL extern l_int32 ptaNoisyLinearLSF ( PTA *pta, l_float32 factor, PTA **pptad, l_float32 *pa, l_float32 *pb, l_float32 *pmederr, NUMA **pnafit ); -LEPT_DLL extern l_int32 ptaNoisyQuadraticLSF ( PTA *pta, l_float32 factor, PTA **pptad, l_float32 *pa, l_float32 *pb, l_float32 *pc, l_float32 *pmederr, NUMA **pnafit ); -LEPT_DLL extern l_int32 applyLinearFit ( l_float32 a, l_float32 b, l_float32 x, l_float32 *py ); -LEPT_DLL extern l_int32 applyQuadraticFit ( l_float32 a, l_float32 b, l_float32 c, l_float32 x, l_float32 *py ); -LEPT_DLL extern l_int32 applyCubicFit ( l_float32 a, l_float32 b, l_float32 c, l_float32 d, l_float32 x, l_float32 *py ); -LEPT_DLL extern l_int32 applyQuarticFit ( l_float32 a, l_float32 b, l_float32 c, l_float32 d, l_float32 e, l_float32 x, l_float32 *py ); -LEPT_DLL extern l_int32 pixPlotAlongPta ( PIX *pixs, PTA *pta, l_int32 outformat, const char *title ); -LEPT_DLL extern PTA * ptaGetPixelsFromPix ( PIX *pixs, BOX *box ); -LEPT_DLL extern PIX * pixGenerateFromPta ( PTA *pta, l_int32 w, l_int32 h ); -LEPT_DLL extern PTA * ptaGetBoundaryPixels ( PIX *pixs, l_int32 type ); -LEPT_DLL extern PTAA * ptaaGetBoundaryPixels ( PIX *pixs, l_int32 type, l_int32 connectivity, BOXA **pboxa, PIXA **ppixa ); -LEPT_DLL extern PTAA * ptaaIndexLabelledPixels ( PIX *pixs, l_int32 *pncc ); -LEPT_DLL extern PTA * ptaGetNeighborPixLocs ( PIX *pixs, l_int32 x, l_int32 y, l_int32 conn ); -LEPT_DLL extern PIX * pixDisplayPta ( PIX *pixd, PIX *pixs, PTA *pta ); -LEPT_DLL extern PIX * pixDisplayPtaaPattern ( PIX *pixd, PIX *pixs, PTAA *ptaa, PIX *pixp, l_int32 cx, l_int32 cy ); -LEPT_DLL extern PIX * pixDisplayPtaPattern ( PIX *pixd, PIX *pixs, PTA *pta, PIX *pixp, l_int32 cx, l_int32 cy, l_uint32 color ); -LEPT_DLL extern PTA * ptaReplicatePattern ( PTA *ptas, PIX *pixp, PTA *ptap, l_int32 cx, l_int32 cy, l_int32 w, l_int32 h ); -LEPT_DLL extern PIX * pixDisplayPtaa ( PIX *pixs, PTAA *ptaa ); -LEPT_DLL extern PTA * ptaSort ( PTA *ptas, l_int32 sorttype, l_int32 sortorder, NUMA **pnaindex ); -LEPT_DLL extern l_int32 ptaGetSortIndex ( PTA *ptas, l_int32 sorttype, l_int32 sortorder, NUMA **pnaindex ); -LEPT_DLL extern PTA * ptaSortByIndex ( PTA *ptas, NUMA *naindex ); -LEPT_DLL extern PTAA * ptaaSortByIndex ( PTAA *ptaas, NUMA *naindex ); -LEPT_DLL extern PTA * ptaUnionByAset ( PTA *pta1, PTA *pta2 ); -LEPT_DLL extern PTA * ptaRemoveDupsByAset ( PTA *ptas ); -LEPT_DLL extern PTA * ptaIntersectionByAset ( PTA *pta1, PTA *pta2 ); -LEPT_DLL extern L_ASET * l_asetCreateFromPta ( PTA *pta ); -LEPT_DLL extern PTA * ptaUnionByHash ( PTA *pta1, PTA *pta2 ); -LEPT_DLL extern l_int32 ptaRemoveDupsByHash ( PTA *ptas, PTA **pptad, L_DNAHASH **pdahash ); -LEPT_DLL extern PTA * ptaIntersectionByHash ( PTA *pta1, PTA *pta2 ); -LEPT_DLL extern l_int32 ptaFindPtByHash ( PTA *pta, L_DNAHASH *dahash, l_int32 x, l_int32 y, l_int32 *pindex ); -LEPT_DLL extern L_DNAHASH * l_dnaHashCreateFromPta ( PTA *pta ); -LEPT_DLL extern L_PTRA * ptraCreate ( l_int32 n ); -LEPT_DLL extern void ptraDestroy ( L_PTRA **ppa, l_int32 freeflag, l_int32 warnflag ); -LEPT_DLL extern l_int32 ptraAdd ( L_PTRA *pa, void *item ); -LEPT_DLL extern l_int32 ptraInsert ( L_PTRA *pa, l_int32 index, void *item, l_int32 shiftflag ); -LEPT_DLL extern void * ptraRemove ( L_PTRA *pa, l_int32 index, l_int32 flag ); -LEPT_DLL extern void * ptraRemoveLast ( L_PTRA *pa ); -LEPT_DLL extern void * ptraReplace ( L_PTRA *pa, l_int32 index, void *item, l_int32 freeflag ); -LEPT_DLL extern l_int32 ptraSwap ( L_PTRA *pa, l_int32 index1, l_int32 index2 ); -LEPT_DLL extern l_int32 ptraCompactArray ( L_PTRA *pa ); -LEPT_DLL extern l_int32 ptraReverse ( L_PTRA *pa ); -LEPT_DLL extern l_int32 ptraJoin ( L_PTRA *pa1, L_PTRA *pa2 ); -LEPT_DLL extern l_int32 ptraGetMaxIndex ( L_PTRA *pa, l_int32 *pmaxindex ); -LEPT_DLL extern l_int32 ptraGetActualCount ( L_PTRA *pa, l_int32 *pcount ); -LEPT_DLL extern void * ptraGetPtrToItem ( L_PTRA *pa, l_int32 index ); -LEPT_DLL extern L_PTRAA * ptraaCreate ( l_int32 n ); -LEPT_DLL extern void ptraaDestroy ( L_PTRAA **ppaa, l_int32 freeflag, l_int32 warnflag ); -LEPT_DLL extern l_int32 ptraaGetSize ( L_PTRAA *paa, l_int32 *psize ); -LEPT_DLL extern l_int32 ptraaInsertPtra ( L_PTRAA *paa, l_int32 index, L_PTRA *pa ); -LEPT_DLL extern L_PTRA * ptraaGetPtra ( L_PTRAA *paa, l_int32 index, l_int32 accessflag ); -LEPT_DLL extern L_PTRA * ptraaFlattenToPtra ( L_PTRAA *paa ); -LEPT_DLL extern l_int32 pixQuadtreeMean ( PIX *pixs, l_int32 nlevels, PIX *pix_ma, FPIXA **pfpixa ); -LEPT_DLL extern l_int32 pixQuadtreeVariance ( PIX *pixs, l_int32 nlevels, PIX *pix_ma, DPIX *dpix_msa, FPIXA **pfpixa_v, FPIXA **pfpixa_rv ); -LEPT_DLL extern l_int32 pixMeanInRectangle ( PIX *pixs, BOX *box, PIX *pixma, l_float32 *pval ); -LEPT_DLL extern l_int32 pixVarianceInRectangle ( PIX *pixs, BOX *box, PIX *pix_ma, DPIX *dpix_msa, l_float32 *pvar, l_float32 *prvar ); -LEPT_DLL extern BOXAA * boxaaQuadtreeRegions ( l_int32 w, l_int32 h, l_int32 nlevels ); -LEPT_DLL extern l_int32 quadtreeGetParent ( FPIXA *fpixa, l_int32 level, l_int32 x, l_int32 y, l_float32 *pval ); -LEPT_DLL extern l_int32 quadtreeGetChildren ( FPIXA *fpixa, l_int32 level, l_int32 x, l_int32 y, l_float32 *pval00, l_float32 *pval10, l_float32 *pval01, l_float32 *pval11 ); -LEPT_DLL extern l_int32 quadtreeMaxLevels ( l_int32 w, l_int32 h ); -LEPT_DLL extern PIX * fpixaDisplayQuadtree ( FPIXA *fpixa, l_int32 factor, l_int32 fontsize ); -LEPT_DLL extern L_QUEUE * lqueueCreate ( l_int32 nalloc ); -LEPT_DLL extern void lqueueDestroy ( L_QUEUE **plq, l_int32 freeflag ); -LEPT_DLL extern l_int32 lqueueAdd ( L_QUEUE *lq, void *item ); -LEPT_DLL extern void * lqueueRemove ( L_QUEUE *lq ); -LEPT_DLL extern l_int32 lqueueGetCount ( L_QUEUE *lq ); -LEPT_DLL extern l_int32 lqueuePrint ( FILE *fp, L_QUEUE *lq ); -LEPT_DLL extern PIX * pixRankFilter ( PIX *pixs, l_int32 wf, l_int32 hf, l_float32 rank ); -LEPT_DLL extern PIX * pixRankFilterRGB ( PIX *pixs, l_int32 wf, l_int32 hf, l_float32 rank ); -LEPT_DLL extern PIX * pixRankFilterGray ( PIX *pixs, l_int32 wf, l_int32 hf, l_float32 rank ); -LEPT_DLL extern PIX * pixMedianFilter ( PIX *pixs, l_int32 wf, l_int32 hf ); -LEPT_DLL extern PIX * pixRankFilterWithScaling ( PIX *pixs, l_int32 wf, l_int32 hf, l_float32 rank, l_float32 scalefactor ); -LEPT_DLL extern L_RBTREE * l_rbtreeCreate ( l_int32 keytype ); -LEPT_DLL extern RB_TYPE * l_rbtreeLookup ( L_RBTREE *t, RB_TYPE key ); -LEPT_DLL extern void l_rbtreeInsert ( L_RBTREE *t, RB_TYPE key, RB_TYPE value ); -LEPT_DLL extern void l_rbtreeDelete ( L_RBTREE *t, RB_TYPE key ); -LEPT_DLL extern void l_rbtreeDestroy ( L_RBTREE **pt ); -LEPT_DLL extern L_RBTREE_NODE * l_rbtreeGetFirst ( L_RBTREE *t ); -LEPT_DLL extern L_RBTREE_NODE * l_rbtreeGetNext ( L_RBTREE_NODE *n ); -LEPT_DLL extern L_RBTREE_NODE * l_rbtreeGetLast ( L_RBTREE *t ); -LEPT_DLL extern L_RBTREE_NODE * l_rbtreeGetPrev ( L_RBTREE_NODE *n ); -LEPT_DLL extern l_int32 l_rbtreeGetCount ( L_RBTREE *t ); -LEPT_DLL extern void l_rbtreePrint ( FILE *fp, L_RBTREE *t ); -LEPT_DLL extern l_int32 l_compareKeys ( l_int32 keytype, RB_TYPE left, RB_TYPE right ); -LEPT_DLL extern SARRAY * pixProcessBarcodes ( PIX *pixs, l_int32 format, l_int32 method, SARRAY **psaw, l_int32 debugflag ); -LEPT_DLL extern PIXA * pixExtractBarcodes ( PIX *pixs, l_int32 debugflag ); -LEPT_DLL extern SARRAY * pixReadBarcodes ( PIXA *pixa, l_int32 format, l_int32 method, SARRAY **psaw, l_int32 debugflag ); -LEPT_DLL extern NUMA * pixReadBarcodeWidths ( PIX *pixs, l_int32 method, l_int32 debugflag ); -LEPT_DLL extern BOXA * pixLocateBarcodes ( PIX *pixs, l_int32 thresh, PIX **ppixb, PIX **ppixm ); -LEPT_DLL extern PIX * pixDeskewBarcode ( PIX *pixs, PIX *pixb, BOX *box, l_int32 margin, l_int32 threshold, l_float32 *pangle, l_float32 *pconf ); -LEPT_DLL extern NUMA * pixExtractBarcodeWidths1 ( PIX *pixs, l_float32 thresh, l_float32 binfract, NUMA **pnaehist, NUMA **pnaohist, l_int32 debugflag ); -LEPT_DLL extern NUMA * pixExtractBarcodeWidths2 ( PIX *pixs, l_float32 thresh, l_float32 *pwidth, NUMA **pnac, l_int32 debugflag ); -LEPT_DLL extern NUMA * pixExtractBarcodeCrossings ( PIX *pixs, l_float32 thresh, l_int32 debugflag ); -LEPT_DLL extern NUMA * numaQuantizeCrossingsByWidth ( NUMA *nas, l_float32 binfract, NUMA **pnaehist, NUMA **pnaohist, l_int32 debugflag ); -LEPT_DLL extern NUMA * numaQuantizeCrossingsByWindow ( NUMA *nas, l_float32 ratio, l_float32 *pwidth, l_float32 *pfirstloc, NUMA **pnac, l_int32 debugflag ); -LEPT_DLL extern PIXA * pixaReadFiles ( const char *dirname, const char *substr ); -LEPT_DLL extern PIXA * pixaReadFilesSA ( SARRAY *sa ); -LEPT_DLL extern PIX * pixRead ( const char *filename ); -LEPT_DLL extern PIX * pixReadWithHint ( const char *filename, l_int32 hint ); -LEPT_DLL extern PIX * pixReadIndexed ( SARRAY *sa, l_int32 index ); -LEPT_DLL extern PIX * pixReadStream ( FILE *fp, l_int32 hint ); -LEPT_DLL extern l_int32 pixReadHeader ( const char *filename, l_int32 *pformat, l_int32 *pw, l_int32 *ph, l_int32 *pbps, l_int32 *pspp, l_int32 *piscmap ); -LEPT_DLL extern l_int32 findFileFormat ( const char *filename, l_int32 *pformat ); -LEPT_DLL extern l_int32 findFileFormatStream ( FILE *fp, l_int32 *pformat ); -LEPT_DLL extern l_int32 findFileFormatBuffer ( const l_uint8 *buf, l_int32 *pformat ); -LEPT_DLL extern l_int32 fileFormatIsTiff ( FILE *fp ); -LEPT_DLL extern PIX * pixReadMem ( const l_uint8 *data, size_t size ); -LEPT_DLL extern l_int32 pixReadHeaderMem ( const l_uint8 *data, size_t size, l_int32 *pformat, l_int32 *pw, l_int32 *ph, l_int32 *pbps, l_int32 *pspp, l_int32 *piscmap ); -LEPT_DLL extern l_int32 writeImageFileInfo ( const char *filename, FILE *fpout, l_int32 headeronly ); -LEPT_DLL extern l_int32 ioFormatTest ( const char *filename ); -LEPT_DLL extern L_RECOGA * recogaCreateFromRecog ( L_RECOG *recog ); -LEPT_DLL extern L_RECOGA * recogaCreateFromPixaa ( PIXAA *paa, l_int32 scalew, l_int32 scaleh, l_int32 templ_type, l_int32 threshold, l_int32 maxyshift ); -LEPT_DLL extern L_RECOGA * recogaCreate ( l_int32 n ); -LEPT_DLL extern void recogaDestroy ( L_RECOGA **precoga ); -LEPT_DLL extern l_int32 recogaAddRecog ( L_RECOGA *recoga, L_RECOG *recog ); -LEPT_DLL extern l_int32 recogReplaceInRecoga ( L_RECOG **precog1, L_RECOG *recog2 ); -LEPT_DLL extern L_RECOG * recogaGetRecog ( L_RECOGA *recoga, l_int32 index ); -LEPT_DLL extern l_int32 recogaGetCount ( L_RECOGA *recoga ); -LEPT_DLL extern l_int32 recogGetCount ( L_RECOG *recog ); -LEPT_DLL extern l_int32 recogGetIndex ( L_RECOG *recog, l_int32 *pindex ); -LEPT_DLL extern L_RECOGA * recogGetParent ( L_RECOG *recog ); -LEPT_DLL extern l_int32 recogSetBootflag ( L_RECOG *recog ); -LEPT_DLL extern L_RECOG * recogCreateFromRecog ( L_RECOG *recs, l_int32 scalew, l_int32 scaleh, l_int32 templ_type, l_int32 threshold, l_int32 maxyshift ); -LEPT_DLL extern L_RECOG * recogCreateFromPixa ( PIXA *pixa, l_int32 scalew, l_int32 scaleh, l_int32 templ_type, l_int32 threshold, l_int32 maxyshift ); -LEPT_DLL extern L_RECOG * recogCreate ( l_int32 scalew, l_int32 scaleh, l_int32 templ_type, l_int32 threshold, l_int32 maxyshift ); -LEPT_DLL extern void recogDestroy ( L_RECOG **precog ); -LEPT_DLL extern l_int32 recogAppend ( L_RECOG *recog1, L_RECOG *recog2 ); -LEPT_DLL extern l_int32 recogGetClassIndex ( L_RECOG *recog, l_int32 val, char *text, l_int32 *pindex ); -LEPT_DLL extern l_int32 recogStringToIndex ( L_RECOG *recog, char *text, l_int32 *pindex ); -LEPT_DLL extern l_int32 recogGetClassString ( L_RECOG *recog, l_int32 index, char **pcharstr ); -LEPT_DLL extern l_int32 l_convertCharstrToInt ( const char *str, l_int32 *pval ); -LEPT_DLL extern L_RECOGA * recogaRead ( const char *filename ); -LEPT_DLL extern L_RECOGA * recogaReadStream ( FILE *fp ); -LEPT_DLL extern L_RECOGA * recogaReadMem ( const l_uint8 *data, size_t size ); -LEPT_DLL extern l_int32 recogaWrite ( const char *filename, L_RECOGA *recoga ); -LEPT_DLL extern l_int32 recogaWriteStream ( FILE *fp, L_RECOGA *recoga ); -LEPT_DLL extern l_int32 recogaWriteMem ( l_uint8 **pdata, size_t *psize, L_RECOGA *recoga ); -LEPT_DLL extern l_int32 recogaWritePixaa ( const char *filename, L_RECOGA *recoga ); -LEPT_DLL extern L_RECOG * recogRead ( const char *filename ); -LEPT_DLL extern L_RECOG * recogReadStream ( FILE *fp ); -LEPT_DLL extern L_RECOG * recogReadMem ( const l_uint8 *data, size_t size ); -LEPT_DLL extern l_int32 recogWrite ( const char *filename, L_RECOG *recog ); -LEPT_DLL extern l_int32 recogWriteStream ( FILE *fp, L_RECOG *recog ); -LEPT_DLL extern l_int32 recogWriteMem ( l_uint8 **pdata, size_t *psize, L_RECOG *recog ); -LEPT_DLL extern PIXA * recogExtractPixa ( L_RECOG *recog ); -LEPT_DLL extern l_int32 recogDecode ( L_RECOG *recog, PIX *pixs, l_int32 nlevels, PIX **ppixdb ); -LEPT_DLL extern l_int32 recogMakeDecodingArrays ( L_RECOG *recog, PIX *pixs, l_int32 debug ); -LEPT_DLL extern l_int32 recogRunViterbi ( L_RECOG *recog, PIX **ppixdb ); -LEPT_DLL extern l_int32 recogCreateDid ( L_RECOG *recog, PIX *pixs ); -LEPT_DLL extern l_int32 recogDestroyDid ( L_RECOG *recog ); -LEPT_DLL extern l_int32 recogDidExists ( L_RECOG *recog ); -LEPT_DLL extern L_RDID * recogGetDid ( L_RECOG *recog ); -LEPT_DLL extern l_int32 recogSetChannelParams ( L_RECOG *recog, l_int32 nlevels ); -LEPT_DLL extern l_int32 recogaIdentifyMultiple ( L_RECOGA *recoga, PIX *pixs, l_int32 nitems, l_int32 minw, l_int32 minh, l_int32 skipsplit, BOXA **pboxa, PIXA **ppixa, PIX **ppixdb, l_int32 debugsplit ); -LEPT_DLL extern l_int32 recogSplitIntoCharacters ( L_RECOG *recog, PIX *pixs, l_int32 minw, l_int32 minh, l_int32 skipsplit, BOXA **pboxa, PIXA **ppixa, NUMA **pnaid, l_int32 debug ); -LEPT_DLL extern l_int32 recogCorrelationBestRow ( L_RECOG *recog, PIX *pixs, BOXA **pboxa, NUMA **pnascore, NUMA **pnaindex, SARRAY **psachar, l_int32 debug ); -LEPT_DLL extern l_int32 recogCorrelationBestChar ( L_RECOG *recog, PIX *pixs, BOX **pbox, l_float32 *pscore, l_int32 *pindex, char **pcharstr, PIX **ppixdb ); -LEPT_DLL extern l_int32 recogaIdentifyPixa ( L_RECOGA *recoga, PIXA *pixa, NUMA *naid, PIX **ppixdb ); -LEPT_DLL extern l_int32 recogIdentifyPixa ( L_RECOG *recog, PIXA *pixa, NUMA *naid, PIX **ppixdb ); -LEPT_DLL extern l_int32 recogIdentifyPix ( L_RECOG *recog, PIX *pixs, PIX **ppixdb ); -LEPT_DLL extern l_int32 recogSkipIdentify ( L_RECOG *recog ); -LEPT_DLL extern void rchaDestroy ( L_RCHA **prcha ); -LEPT_DLL extern void rchDestroy ( L_RCH **prch ); -LEPT_DLL extern l_int32 rchaExtract ( L_RCHA *rcha, NUMA **pnaindex, NUMA **pnascore, SARRAY **psatext, NUMA **pnasample, NUMA **pnaxloc, NUMA **pnayloc, NUMA **pnawidth ); -LEPT_DLL extern l_int32 rchExtract ( L_RCH *rch, l_int32 *pindex, l_float32 *pscore, char **ptext, l_int32 *psample, l_int32 *pxloc, l_int32 *pyloc, l_int32 *pwidth ); -LEPT_DLL extern PIX * recogProcessToIdentify ( L_RECOG *recog, PIX *pixs, l_int32 pad ); -LEPT_DLL extern PIX * recogPreSplittingFilter ( L_RECOG *recog, PIX *pixs, l_float32 maxasp, l_float32 minaf, l_int32 debug ); -LEPT_DLL extern l_int32 recogSplittingFilter ( L_RECOG *recog, PIX *pixs, l_float32 maxasp, l_float32 minaf, l_int32 *premove, l_int32 debug ); -LEPT_DLL extern SARRAY * recogaExtractNumbers ( L_RECOGA *recoga, BOXA *boxas, l_float32 scorethresh, l_int32 spacethresh, BOXAA **pbaa, NUMAA **pnaa ); -LEPT_DLL extern l_int32 recogSetTemplateType ( L_RECOG *recog, l_int32 templ_type ); -LEPT_DLL extern l_int32 recogSetScaling ( L_RECOG *recog, l_int32 scalew, l_int32 scaleh, l_int32 templ_type ); -LEPT_DLL extern l_int32 recogTrainLabelled ( L_RECOG *recog, PIX *pixs, BOX *box, char *text, l_int32 multflag, l_int32 debug ); -LEPT_DLL extern l_int32 recogProcessMultLabelled ( L_RECOG *recog, PIX *pixs, BOX *box, char *text, PIXA **ppixa, l_int32 debug ); -LEPT_DLL extern l_int32 recogProcessSingleLabelled ( L_RECOG *recog, PIX *pixs, BOX *box, char *text, PIXA **ppixa ); -LEPT_DLL extern l_int32 recogAddSamples ( L_RECOG *recog, PIXA *pixa, l_int32 classindex, l_int32 debug ); -LEPT_DLL extern PIX * recogScaleCharacter ( L_RECOG *recog, PIX *pixs ); -LEPT_DLL extern l_int32 recogAverageSamples ( L_RECOG *recog, l_int32 debug ); -LEPT_DLL extern l_int32 pixaAccumulateSamples ( PIXA *pixa, PTA *pta, PIX **ppixd, l_float32 *px, l_float32 *py ); -LEPT_DLL extern l_int32 recogTrainingFinished ( L_RECOG *recog, l_int32 debug ); -LEPT_DLL extern l_int32 recogRemoveOutliers ( L_RECOG *recog, l_float32 targetscore, l_float32 minfract, l_int32 debug ); -LEPT_DLL extern l_int32 recogaTrainingDone ( L_RECOGA *recoga, l_int32 *pdone ); -LEPT_DLL extern l_int32 recogaFinishAveraging ( L_RECOGA *recoga ); -LEPT_DLL extern L_RECOG * recogTrainFromBoot ( PIXA *pixa, L_RECOG *recogboot, l_float32 minscore, l_int32 threshold, l_int32 scalew, l_int32 scaleh, l_int32 templ_type, l_int32 debug ); -LEPT_DLL extern l_int32 recogTrainUnlabelled ( L_RECOG *recog, L_RECOG *recogboot, PIX *pixs, BOX *box, l_float32 minscore, l_int32 debug ); -LEPT_DLL extern l_int32 recogPadTrainingSet ( L_RECOG **precog, l_int32 debug ); -LEPT_DLL extern l_int32 recogBestCorrelForPadding ( L_RECOG *recog, L_RECOGA *recoga, NUMA **pnaset, NUMA **pnaindex, NUMA **pnascore, NUMA **pnasum, PIXA *pixadb ); -LEPT_DLL extern l_int32 recogCorrelAverages ( L_RECOG *recog1, L_RECOG *recog2, NUMA **pnaindex, NUMA **pnascore, PIXA *pixadb ); -LEPT_DLL extern l_int32 recogSetPadParams ( L_RECOG *recog, const char *bootdir, const char *bootpattern, const char *bootpath, l_int32 boot_iters, l_int32 type, l_int32 min_nopad, l_int32 max_afterpad, l_int32 min_samples ); -LEPT_DLL extern L_RECOG * recogMakeBootDigitRecog ( l_int32 templ_type, l_int32 maxyshift, l_int32 display ); -LEPT_DLL extern l_int32 recogaShowContent ( FILE *fp, L_RECOGA *recoga, l_int32 display ); -LEPT_DLL extern l_int32 recogShowContent ( FILE *fp, L_RECOG *recog, l_int32 display ); -LEPT_DLL extern l_int32 recogDebugAverages ( L_RECOG *recog, l_int32 debug ); -LEPT_DLL extern l_int32 recogShowAverageTemplates ( L_RECOG *recog ); -LEPT_DLL extern l_int32 recogShowMatchesInRange ( L_RECOG *recog, PIXA *pixa, l_float32 minscore, l_float32 maxscore, l_int32 display ); -LEPT_DLL extern PIX * recogShowMatch ( L_RECOG *recog, PIX *pix1, PIX *pix2, BOX *box, l_int32 index, l_float32 score ); -LEPT_DLL extern l_int32 recogResetBmf ( L_RECOG *recog, l_int32 size ); -LEPT_DLL extern l_int32 regTestSetup ( l_int32 argc, char **argv, L_REGPARAMS **prp ); -LEPT_DLL extern l_int32 regTestCleanup ( L_REGPARAMS *rp ); -LEPT_DLL extern l_int32 regTestCompareValues ( L_REGPARAMS *rp, l_float32 val1, l_float32 val2, l_float32 delta ); -LEPT_DLL extern l_int32 regTestCompareStrings ( L_REGPARAMS *rp, l_uint8 *string1, size_t bytes1, l_uint8 *string2, size_t bytes2 ); -LEPT_DLL extern l_int32 regTestComparePix ( L_REGPARAMS *rp, PIX *pix1, PIX *pix2 ); -LEPT_DLL extern l_int32 regTestCompareSimilarPix ( L_REGPARAMS *rp, PIX *pix1, PIX *pix2, l_int32 mindiff, l_float32 maxfract, l_int32 printstats ); -LEPT_DLL extern l_int32 regTestCheckFile ( L_REGPARAMS *rp, const char *localname ); -LEPT_DLL extern l_int32 regTestCompareFiles ( L_REGPARAMS *rp, l_int32 index1, l_int32 index2 ); -LEPT_DLL extern l_int32 regTestWritePixAndCheck ( L_REGPARAMS *rp, PIX *pix, l_int32 format ); -LEPT_DLL extern l_int32 pixRasterop ( PIX *pixd, l_int32 dx, l_int32 dy, l_int32 dw, l_int32 dh, l_int32 op, PIX *pixs, l_int32 sx, l_int32 sy ); -LEPT_DLL extern l_int32 pixRasteropVip ( PIX *pixd, l_int32 bx, l_int32 bw, l_int32 vshift, l_int32 incolor ); -LEPT_DLL extern l_int32 pixRasteropHip ( PIX *pixd, l_int32 by, l_int32 bh, l_int32 hshift, l_int32 incolor ); -LEPT_DLL extern PIX * pixTranslate ( PIX *pixd, PIX *pixs, l_int32 hshift, l_int32 vshift, l_int32 incolor ); -LEPT_DLL extern l_int32 pixRasteropIP ( PIX *pixd, l_int32 hshift, l_int32 vshift, l_int32 incolor ); -LEPT_DLL extern l_int32 pixRasteropFullImage ( PIX *pixd, PIX *pixs, l_int32 op ); -LEPT_DLL extern void rasteropVipLow ( l_uint32 *data, l_int32 pixw, l_int32 pixh, l_int32 depth, l_int32 wpl, l_int32 x, l_int32 w, l_int32 shift ); -LEPT_DLL extern void rasteropHipLow ( l_uint32 *data, l_int32 pixh, l_int32 depth, l_int32 wpl, l_int32 y, l_int32 h, l_int32 shift ); -LEPT_DLL extern void shiftDataHorizontalLow ( l_uint32 *datad, l_int32 wpld, l_uint32 *datas, l_int32 wpls, l_int32 shift ); -LEPT_DLL extern void rasteropUniLow ( l_uint32 *datad, l_int32 dpixw, l_int32 dpixh, l_int32 depth, l_int32 dwpl, l_int32 dx, l_int32 dy, l_int32 dw, l_int32 dh, l_int32 op ); -LEPT_DLL extern void rasteropLow ( l_uint32 *datad, l_int32 dpixw, l_int32 dpixh, l_int32 depth, l_int32 dwpl, l_int32 dx, l_int32 dy, l_int32 dw, l_int32 dh, l_int32 op, l_uint32 *datas, l_int32 spixw, l_int32 spixh, l_int32 swpl, l_int32 sx, l_int32 sy ); -LEPT_DLL extern PIX * pixRotate ( PIX *pixs, l_float32 angle, l_int32 type, l_int32 incolor, l_int32 width, l_int32 height ); -LEPT_DLL extern PIX * pixEmbedForRotation ( PIX *pixs, l_float32 angle, l_int32 incolor, l_int32 width, l_int32 height ); -LEPT_DLL extern PIX * pixRotateBySampling ( PIX *pixs, l_int32 xcen, l_int32 ycen, l_float32 angle, l_int32 incolor ); -LEPT_DLL extern PIX * pixRotateBinaryNice ( PIX *pixs, l_float32 angle, l_int32 incolor ); -LEPT_DLL extern PIX * pixRotateWithAlpha ( PIX *pixs, l_float32 angle, PIX *pixg, l_float32 fract ); -LEPT_DLL extern PIX * pixRotateAM ( PIX *pixs, l_float32 angle, l_int32 incolor ); -LEPT_DLL extern PIX * pixRotateAMColor ( PIX *pixs, l_float32 angle, l_uint32 colorval ); -LEPT_DLL extern PIX * pixRotateAMGray ( PIX *pixs, l_float32 angle, l_uint8 grayval ); -LEPT_DLL extern PIX * pixRotateAMCorner ( PIX *pixs, l_float32 angle, l_int32 incolor ); -LEPT_DLL extern PIX * pixRotateAMColorCorner ( PIX *pixs, l_float32 angle, l_uint32 fillval ); -LEPT_DLL extern PIX * pixRotateAMGrayCorner ( PIX *pixs, l_float32 angle, l_uint8 grayval ); -LEPT_DLL extern PIX * pixRotateAMColorFast ( PIX *pixs, l_float32 angle, l_uint32 colorval ); -LEPT_DLL extern void rotateAMColorLow ( l_uint32 *datad, l_int32 w, l_int32 h, l_int32 wpld, l_uint32 *datas, l_int32 wpls, l_float32 angle, l_uint32 colorval ); -LEPT_DLL extern void rotateAMGrayLow ( l_uint32 *datad, l_int32 w, l_int32 h, l_int32 wpld, l_uint32 *datas, l_int32 wpls, l_float32 angle, l_uint8 grayval ); -LEPT_DLL extern void rotateAMColorCornerLow ( l_uint32 *datad, l_int32 w, l_int32 h, l_int32 wpld, l_uint32 *datas, l_int32 wpls, l_float32 angle, l_uint32 colorval ); -LEPT_DLL extern void rotateAMGrayCornerLow ( l_uint32 *datad, l_int32 w, l_int32 h, l_int32 wpld, l_uint32 *datas, l_int32 wpls, l_float32 angle, l_uint8 grayval ); -LEPT_DLL extern void rotateAMColorFastLow ( l_uint32 *datad, l_int32 w, l_int32 h, l_int32 wpld, l_uint32 *datas, l_int32 wpls, l_float32 angle, l_uint32 colorval ); -LEPT_DLL extern PIX * pixRotateOrth ( PIX *pixs, l_int32 quads ); -LEPT_DLL extern PIX * pixRotate180 ( PIX *pixd, PIX *pixs ); -LEPT_DLL extern PIX * pixRotate90 ( PIX *pixs, l_int32 direction ); -LEPT_DLL extern PIX * pixFlipLR ( PIX *pixd, PIX *pixs ); -LEPT_DLL extern PIX * pixFlipTB ( PIX *pixd, PIX *pixs ); -LEPT_DLL extern PIX * pixRotateShear ( PIX *pixs, l_int32 xcen, l_int32 ycen, l_float32 angle, l_int32 incolor ); -LEPT_DLL extern PIX * pixRotate2Shear ( PIX *pixs, l_int32 xcen, l_int32 ycen, l_float32 angle, l_int32 incolor ); -LEPT_DLL extern PIX * pixRotate3Shear ( PIX *pixs, l_int32 xcen, l_int32 ycen, l_float32 angle, l_int32 incolor ); -LEPT_DLL extern l_int32 pixRotateShearIP ( PIX *pixs, l_int32 xcen, l_int32 ycen, l_float32 angle, l_int32 incolor ); -LEPT_DLL extern PIX * pixRotateShearCenter ( PIX *pixs, l_float32 angle, l_int32 incolor ); -LEPT_DLL extern l_int32 pixRotateShearCenterIP ( PIX *pixs, l_float32 angle, l_int32 incolor ); -LEPT_DLL extern PIX * pixStrokeWidthTransform ( PIX *pixs, l_int32 color, l_int32 depth, l_int32 nangles ); -LEPT_DLL extern PIX * pixRunlengthTransform ( PIX *pixs, l_int32 color, l_int32 direction, l_int32 depth ); -LEPT_DLL extern l_int32 pixFindHorizontalRuns ( PIX *pix, l_int32 y, l_int32 *xstart, l_int32 *xend, l_int32 *pn ); -LEPT_DLL extern l_int32 pixFindVerticalRuns ( PIX *pix, l_int32 x, l_int32 *ystart, l_int32 *yend, l_int32 *pn ); -LEPT_DLL extern NUMA * pixFindMaxRuns ( PIX *pix, l_int32 direction, NUMA **pnastart ); -LEPT_DLL extern l_int32 pixFindMaxHorizontalRunOnLine ( PIX *pix, l_int32 y, l_int32 *pxstart, l_int32 *psize ); -LEPT_DLL extern l_int32 pixFindMaxVerticalRunOnLine ( PIX *pix, l_int32 x, l_int32 *pystart, l_int32 *psize ); -LEPT_DLL extern l_int32 runlengthMembershipOnLine ( l_int32 *buffer, l_int32 size, l_int32 depth, l_int32 *start, l_int32 *end, l_int32 n ); -LEPT_DLL extern l_int32 * makeMSBitLocTab ( l_int32 bitval ); -LEPT_DLL extern SARRAY * sarrayCreate ( l_int32 n ); -LEPT_DLL extern SARRAY * sarrayCreateInitialized ( l_int32 n, char *initstr ); -LEPT_DLL extern SARRAY * sarrayCreateWordsFromString ( const char *string ); -LEPT_DLL extern SARRAY * sarrayCreateLinesFromString ( const char *string, l_int32 blankflag ); -LEPT_DLL extern void sarrayDestroy ( SARRAY **psa ); -LEPT_DLL extern SARRAY * sarrayCopy ( SARRAY *sa ); -LEPT_DLL extern SARRAY * sarrayClone ( SARRAY *sa ); -LEPT_DLL extern l_int32 sarrayAddString ( SARRAY *sa, char *string, l_int32 copyflag ); -LEPT_DLL extern char * sarrayRemoveString ( SARRAY *sa, l_int32 index ); -LEPT_DLL extern l_int32 sarrayReplaceString ( SARRAY *sa, l_int32 index, char *newstr, l_int32 copyflag ); -LEPT_DLL extern l_int32 sarrayClear ( SARRAY *sa ); -LEPT_DLL extern l_int32 sarrayGetCount ( SARRAY *sa ); -LEPT_DLL extern char ** sarrayGetArray ( SARRAY *sa, l_int32 *pnalloc, l_int32 *pn ); -LEPT_DLL extern char * sarrayGetString ( SARRAY *sa, l_int32 index, l_int32 copyflag ); -LEPT_DLL extern l_int32 sarrayGetRefcount ( SARRAY *sa ); -LEPT_DLL extern l_int32 sarrayChangeRefcount ( SARRAY *sa, l_int32 delta ); -LEPT_DLL extern char * sarrayToString ( SARRAY *sa, l_int32 addnlflag ); -LEPT_DLL extern char * sarrayToStringRange ( SARRAY *sa, l_int32 first, l_int32 nstrings, l_int32 addnlflag ); -LEPT_DLL extern l_int32 sarrayJoin ( SARRAY *sa1, SARRAY *sa2 ); -LEPT_DLL extern l_int32 sarrayAppendRange ( SARRAY *sa1, SARRAY *sa2, l_int32 start, l_int32 end ); -LEPT_DLL extern l_int32 sarrayPadToSameSize ( SARRAY *sa1, SARRAY *sa2, char *padstring ); -LEPT_DLL extern SARRAY * sarrayConvertWordsToLines ( SARRAY *sa, l_int32 linesize ); -LEPT_DLL extern l_int32 sarraySplitString ( SARRAY *sa, const char *str, const char *separators ); -LEPT_DLL extern SARRAY * sarraySelectBySubstring ( SARRAY *sain, const char *substr ); -LEPT_DLL extern SARRAY * sarraySelectByRange ( SARRAY *sain, l_int32 first, l_int32 last ); -LEPT_DLL extern l_int32 sarrayParseRange ( SARRAY *sa, l_int32 start, l_int32 *pactualstart, l_int32 *pend, l_int32 *pnewstart, const char *substr, l_int32 loc ); -LEPT_DLL extern SARRAY * sarrayRead ( const char *filename ); -LEPT_DLL extern SARRAY * sarrayReadStream ( FILE *fp ); -LEPT_DLL extern SARRAY * sarrayReadMem ( const l_uint8 *data, size_t size ); -LEPT_DLL extern l_int32 sarrayWrite ( const char *filename, SARRAY *sa ); -LEPT_DLL extern l_int32 sarrayWriteStream ( FILE *fp, SARRAY *sa ); -LEPT_DLL extern l_int32 sarrayWriteMem ( l_uint8 **pdata, size_t *psize, SARRAY *sa ); -LEPT_DLL extern l_int32 sarrayAppend ( const char *filename, SARRAY *sa ); -LEPT_DLL extern SARRAY * getNumberedPathnamesInDirectory ( const char *dirname, const char *substr, l_int32 numpre, l_int32 numpost, l_int32 maxnum ); -LEPT_DLL extern SARRAY * getSortedPathnamesInDirectory ( const char *dirname, const char *substr, l_int32 first, l_int32 nfiles ); -LEPT_DLL extern SARRAY * convertSortedToNumberedPathnames ( SARRAY *sa, l_int32 numpre, l_int32 numpost, l_int32 maxnum ); -LEPT_DLL extern SARRAY * getFilenamesInDirectory ( const char *dirname ); -LEPT_DLL extern SARRAY * sarraySort ( SARRAY *saout, SARRAY *sain, l_int32 sortorder ); -LEPT_DLL extern SARRAY * sarraySortByIndex ( SARRAY *sain, NUMA *naindex ); -LEPT_DLL extern l_int32 stringCompareLexical ( const char *str1, const char *str2 ); -LEPT_DLL extern SARRAY * sarrayUnionByAset ( SARRAY *sa1, SARRAY *sa2 ); -LEPT_DLL extern SARRAY * sarrayRemoveDupsByAset ( SARRAY *sas ); -LEPT_DLL extern SARRAY * sarrayIntersectionByAset ( SARRAY *sa1, SARRAY *sa2 ); -LEPT_DLL extern L_ASET * l_asetCreateFromSarray ( SARRAY *sa ); -LEPT_DLL extern l_int32 sarrayRemoveDupsByHash ( SARRAY *sas, SARRAY **psad, L_DNAHASH **pdahash ); -LEPT_DLL extern SARRAY * sarrayIntersectionByHash ( SARRAY *sa1, SARRAY *sa2 ); -LEPT_DLL extern l_int32 sarrayFindStringByHash ( SARRAY *sa, L_DNAHASH *dahash, const char *str, l_int32 *pindex ); -LEPT_DLL extern L_DNAHASH * l_dnaHashCreateFromSarray ( SARRAY *sa ); -LEPT_DLL extern SARRAY * sarrayGenerateIntegers ( l_int32 n ); -LEPT_DLL extern PIX * pixScale ( PIX *pixs, l_float32 scalex, l_float32 scaley ); -LEPT_DLL extern PIX * pixScaleToSize ( PIX *pixs, l_int32 wd, l_int32 hd ); -LEPT_DLL extern PIX * pixScaleGeneral ( PIX *pixs, l_float32 scalex, l_float32 scaley, l_float32 sharpfract, l_int32 sharpwidth ); -LEPT_DLL extern PIX * pixScaleLI ( PIX *pixs, l_float32 scalex, l_float32 scaley ); -LEPT_DLL extern PIX * pixScaleColorLI ( PIX *pixs, l_float32 scalex, l_float32 scaley ); -LEPT_DLL extern PIX * pixScaleColor2xLI ( PIX *pixs ); -LEPT_DLL extern PIX * pixScaleColor4xLI ( PIX *pixs ); -LEPT_DLL extern PIX * pixScaleGrayLI ( PIX *pixs, l_float32 scalex, l_float32 scaley ); -LEPT_DLL extern PIX * pixScaleGray2xLI ( PIX *pixs ); -LEPT_DLL extern PIX * pixScaleGray4xLI ( PIX *pixs ); -LEPT_DLL extern PIX * pixScaleBySampling ( PIX *pixs, l_float32 scalex, l_float32 scaley ); -LEPT_DLL extern PIX * pixScaleBySamplingToSize ( PIX *pixs, l_int32 wd, l_int32 hd ); -LEPT_DLL extern PIX * pixScaleByIntSampling ( PIX *pixs, l_int32 factor ); -LEPT_DLL extern PIX * pixScaleRGBToGrayFast ( PIX *pixs, l_int32 factor, l_int32 color ); -LEPT_DLL extern PIX * pixScaleRGBToBinaryFast ( PIX *pixs, l_int32 factor, l_int32 thresh ); -LEPT_DLL extern PIX * pixScaleGrayToBinaryFast ( PIX *pixs, l_int32 factor, l_int32 thresh ); -LEPT_DLL extern PIX * pixScaleSmooth ( PIX *pix, l_float32 scalex, l_float32 scaley ); -LEPT_DLL extern PIX * pixScaleRGBToGray2 ( PIX *pixs, l_float32 rwt, l_float32 gwt, l_float32 bwt ); -LEPT_DLL extern PIX * pixScaleAreaMap ( PIX *pix, l_float32 scalex, l_float32 scaley ); -LEPT_DLL extern PIX * pixScaleAreaMap2 ( PIX *pix ); -LEPT_DLL extern PIX * pixScaleBinary ( PIX *pixs, l_float32 scalex, l_float32 scaley ); -LEPT_DLL extern PIX * pixScaleToGray ( PIX *pixs, l_float32 scalefactor ); -LEPT_DLL extern PIX * pixScaleToGrayFast ( PIX *pixs, l_float32 scalefactor ); -LEPT_DLL extern PIX * pixScaleToGray2 ( PIX *pixs ); -LEPT_DLL extern PIX * pixScaleToGray3 ( PIX *pixs ); -LEPT_DLL extern PIX * pixScaleToGray4 ( PIX *pixs ); -LEPT_DLL extern PIX * pixScaleToGray6 ( PIX *pixs ); -LEPT_DLL extern PIX * pixScaleToGray8 ( PIX *pixs ); -LEPT_DLL extern PIX * pixScaleToGray16 ( PIX *pixs ); -LEPT_DLL extern PIX * pixScaleToGrayMipmap ( PIX *pixs, l_float32 scalefactor ); -LEPT_DLL extern PIX * pixScaleMipmap ( PIX *pixs1, PIX *pixs2, l_float32 scale ); -LEPT_DLL extern PIX * pixExpandReplicate ( PIX *pixs, l_int32 factor ); -LEPT_DLL extern PIX * pixScaleGray2xLIThresh ( PIX *pixs, l_int32 thresh ); -LEPT_DLL extern PIX * pixScaleGray2xLIDither ( PIX *pixs ); -LEPT_DLL extern PIX * pixScaleGray4xLIThresh ( PIX *pixs, l_int32 thresh ); -LEPT_DLL extern PIX * pixScaleGray4xLIDither ( PIX *pixs ); -LEPT_DLL extern PIX * pixScaleGrayMinMax ( PIX *pixs, l_int32 xfact, l_int32 yfact, l_int32 type ); -LEPT_DLL extern PIX * pixScaleGrayMinMax2 ( PIX *pixs, l_int32 type ); -LEPT_DLL extern PIX * pixScaleGrayRankCascade ( PIX *pixs, l_int32 level1, l_int32 level2, l_int32 level3, l_int32 level4 ); -LEPT_DLL extern PIX * pixScaleGrayRank2 ( PIX *pixs, l_int32 rank ); -LEPT_DLL extern l_int32 pixScaleAndTransferAlpha ( PIX *pixd, PIX *pixs, l_float32 scalex, l_float32 scaley ); -LEPT_DLL extern PIX * pixScaleWithAlpha ( PIX *pixs, l_float32 scalex, l_float32 scaley, PIX *pixg, l_float32 fract ); -LEPT_DLL extern void scaleColorLILow ( l_uint32 *datad, l_int32 wd, l_int32 hd, l_int32 wpld, l_uint32 *datas, l_int32 ws, l_int32 hs, l_int32 wpls ); -LEPT_DLL extern void scaleGrayLILow ( l_uint32 *datad, l_int32 wd, l_int32 hd, l_int32 wpld, l_uint32 *datas, l_int32 ws, l_int32 hs, l_int32 wpls ); -LEPT_DLL extern void scaleColor2xLILow ( l_uint32 *datad, l_int32 wpld, l_uint32 *datas, l_int32 ws, l_int32 hs, l_int32 wpls ); -LEPT_DLL extern void scaleColor2xLILineLow ( l_uint32 *lined, l_int32 wpld, l_uint32 *lines, l_int32 ws, l_int32 wpls, l_int32 lastlineflag ); -LEPT_DLL extern void scaleGray2xLILow ( l_uint32 *datad, l_int32 wpld, l_uint32 *datas, l_int32 ws, l_int32 hs, l_int32 wpls ); -LEPT_DLL extern void scaleGray2xLILineLow ( l_uint32 *lined, l_int32 wpld, l_uint32 *lines, l_int32 ws, l_int32 wpls, l_int32 lastlineflag ); -LEPT_DLL extern void scaleGray4xLILow ( l_uint32 *datad, l_int32 wpld, l_uint32 *datas, l_int32 ws, l_int32 hs, l_int32 wpls ); -LEPT_DLL extern void scaleGray4xLILineLow ( l_uint32 *lined, l_int32 wpld, l_uint32 *lines, l_int32 ws, l_int32 wpls, l_int32 lastlineflag ); -LEPT_DLL extern l_int32 scaleBySamplingLow ( l_uint32 *datad, l_int32 wd, l_int32 hd, l_int32 wpld, l_uint32 *datas, l_int32 ws, l_int32 hs, l_int32 d, l_int32 wpls ); -LEPT_DLL extern l_int32 scaleSmoothLow ( l_uint32 *datad, l_int32 wd, l_int32 hd, l_int32 wpld, l_uint32 *datas, l_int32 ws, l_int32 hs, l_int32 d, l_int32 wpls, l_int32 size ); -LEPT_DLL extern void scaleRGBToGray2Low ( l_uint32 *datad, l_int32 wd, l_int32 hd, l_int32 wpld, l_uint32 *datas, l_int32 wpls, l_float32 rwt, l_float32 gwt, l_float32 bwt ); -LEPT_DLL extern void scaleColorAreaMapLow ( l_uint32 *datad, l_int32 wd, l_int32 hd, l_int32 wpld, l_uint32 *datas, l_int32 ws, l_int32 hs, l_int32 wpls ); -LEPT_DLL extern void scaleGrayAreaMapLow ( l_uint32 *datad, l_int32 wd, l_int32 hd, l_int32 wpld, l_uint32 *datas, l_int32 ws, l_int32 hs, l_int32 wpls ); -LEPT_DLL extern void scaleAreaMapLow2 ( l_uint32 *datad, l_int32 wd, l_int32 hd, l_int32 wpld, l_uint32 *datas, l_int32 d, l_int32 wpls ); -LEPT_DLL extern l_int32 scaleBinaryLow ( l_uint32 *datad, l_int32 wd, l_int32 hd, l_int32 wpld, l_uint32 *datas, l_int32 ws, l_int32 hs, l_int32 wpls ); -LEPT_DLL extern void scaleToGray2Low ( l_uint32 *datad, l_int32 wd, l_int32 hd, l_int32 wpld, l_uint32 *datas, l_int32 wpls, l_uint32 *sumtab, l_uint8 *valtab ); -LEPT_DLL extern l_uint32 * makeSumTabSG2 ( void ); -LEPT_DLL extern l_uint8 * makeValTabSG2 ( void ); -LEPT_DLL extern void scaleToGray3Low ( l_uint32 *datad, l_int32 wd, l_int32 hd, l_int32 wpld, l_uint32 *datas, l_int32 wpls, l_uint32 *sumtab, l_uint8 *valtab ); -LEPT_DLL extern l_uint32 * makeSumTabSG3 ( void ); -LEPT_DLL extern l_uint8 * makeValTabSG3 ( void ); -LEPT_DLL extern void scaleToGray4Low ( l_uint32 *datad, l_int32 wd, l_int32 hd, l_int32 wpld, l_uint32 *datas, l_int32 wpls, l_uint32 *sumtab, l_uint8 *valtab ); -LEPT_DLL extern l_uint32 * makeSumTabSG4 ( void ); -LEPT_DLL extern l_uint8 * makeValTabSG4 ( void ); -LEPT_DLL extern void scaleToGray6Low ( l_uint32 *datad, l_int32 wd, l_int32 hd, l_int32 wpld, l_uint32 *datas, l_int32 wpls, l_int32 *tab8, l_uint8 *valtab ); -LEPT_DLL extern l_uint8 * makeValTabSG6 ( void ); -LEPT_DLL extern void scaleToGray8Low ( l_uint32 *datad, l_int32 wd, l_int32 hd, l_int32 wpld, l_uint32 *datas, l_int32 wpls, l_int32 *tab8, l_uint8 *valtab ); -LEPT_DLL extern l_uint8 * makeValTabSG8 ( void ); -LEPT_DLL extern void scaleToGray16Low ( l_uint32 *datad, l_int32 wd, l_int32 hd, l_int32 wpld, l_uint32 *datas, l_int32 wpls, l_int32 *tab8 ); -LEPT_DLL extern l_int32 scaleMipmapLow ( l_uint32 *datad, l_int32 wd, l_int32 hd, l_int32 wpld, l_uint32 *datas1, l_int32 wpls1, l_uint32 *datas2, l_int32 wpls2, l_float32 red ); -LEPT_DLL extern PIX * pixSeedfillBinary ( PIX *pixd, PIX *pixs, PIX *pixm, l_int32 connectivity ); -LEPT_DLL extern PIX * pixSeedfillBinaryRestricted ( PIX *pixd, PIX *pixs, PIX *pixm, l_int32 connectivity, l_int32 xmax, l_int32 ymax ); -LEPT_DLL extern PIX * pixHolesByFilling ( PIX *pixs, l_int32 connectivity ); -LEPT_DLL extern PIX * pixFillClosedBorders ( PIX *pixs, l_int32 connectivity ); -LEPT_DLL extern PIX * pixExtractBorderConnComps ( PIX *pixs, l_int32 connectivity ); -LEPT_DLL extern PIX * pixRemoveBorderConnComps ( PIX *pixs, l_int32 connectivity ); -LEPT_DLL extern PIX * pixFillBgFromBorder ( PIX *pixs, l_int32 connectivity ); -LEPT_DLL extern PIX * pixFillHolesToBoundingRect ( PIX *pixs, l_int32 minsize, l_float32 maxhfract, l_float32 minfgfract ); -LEPT_DLL extern l_int32 pixSeedfillGray ( PIX *pixs, PIX *pixm, l_int32 connectivity ); -LEPT_DLL extern l_int32 pixSeedfillGrayInv ( PIX *pixs, PIX *pixm, l_int32 connectivity ); -LEPT_DLL extern l_int32 pixSeedfillGraySimple ( PIX *pixs, PIX *pixm, l_int32 connectivity ); -LEPT_DLL extern l_int32 pixSeedfillGrayInvSimple ( PIX *pixs, PIX *pixm, l_int32 connectivity ); -LEPT_DLL extern PIX * pixSeedfillGrayBasin ( PIX *pixb, PIX *pixm, l_int32 delta, l_int32 connectivity ); -LEPT_DLL extern PIX * pixDistanceFunction ( PIX *pixs, l_int32 connectivity, l_int32 outdepth, l_int32 boundcond ); -LEPT_DLL extern PIX * pixSeedspread ( PIX *pixs, l_int32 connectivity ); -LEPT_DLL extern l_int32 pixLocalExtrema ( PIX *pixs, l_int32 maxmin, l_int32 minmax, PIX **ppixmin, PIX **ppixmax ); -LEPT_DLL extern l_int32 pixSelectedLocalExtrema ( PIX *pixs, l_int32 mindist, PIX **ppixmin, PIX **ppixmax ); -LEPT_DLL extern PIX * pixFindEqualValues ( PIX *pixs1, PIX *pixs2 ); -LEPT_DLL extern l_int32 pixSelectMinInConnComp ( PIX *pixs, PIX *pixm, PTA **ppta, NUMA **pnav ); -LEPT_DLL extern PIX * pixRemoveSeededComponents ( PIX *pixd, PIX *pixs, PIX *pixm, l_int32 connectivity, l_int32 bordersize ); -LEPT_DLL extern void seedfillBinaryLow ( l_uint32 *datas, l_int32 hs, l_int32 wpls, l_uint32 *datam, l_int32 hm, l_int32 wplm, l_int32 connectivity ); -LEPT_DLL extern void seedfillGrayLow ( l_uint32 *datas, l_int32 w, l_int32 h, l_int32 wpls, l_uint32 *datam, l_int32 wplm, l_int32 connectivity ); -LEPT_DLL extern void seedfillGrayInvLow ( l_uint32 *datas, l_int32 w, l_int32 h, l_int32 wpls, l_uint32 *datam, l_int32 wplm, l_int32 connectivity ); -LEPT_DLL extern void seedfillGrayLowSimple ( l_uint32 *datas, l_int32 w, l_int32 h, l_int32 wpls, l_uint32 *datam, l_int32 wplm, l_int32 connectivity ); -LEPT_DLL extern void seedfillGrayInvLowSimple ( l_uint32 *datas, l_int32 w, l_int32 h, l_int32 wpls, l_uint32 *datam, l_int32 wplm, l_int32 connectivity ); -LEPT_DLL extern void distanceFunctionLow ( l_uint32 *datad, l_int32 w, l_int32 h, l_int32 d, l_int32 wpld, l_int32 connectivity ); -LEPT_DLL extern void seedspreadLow ( l_uint32 *datad, l_int32 w, l_int32 h, l_int32 wpld, l_uint32 *datat, l_int32 wplt, l_int32 connectivity ); -LEPT_DLL extern SELA * selaCreate ( l_int32 n ); -LEPT_DLL extern void selaDestroy ( SELA **psela ); -LEPT_DLL extern SEL * selCreate ( l_int32 height, l_int32 width, const char *name ); -LEPT_DLL extern void selDestroy ( SEL **psel ); -LEPT_DLL extern SEL * selCopy ( SEL *sel ); -LEPT_DLL extern SEL * selCreateBrick ( l_int32 h, l_int32 w, l_int32 cy, l_int32 cx, l_int32 type ); -LEPT_DLL extern SEL * selCreateComb ( l_int32 factor1, l_int32 factor2, l_int32 direction ); -LEPT_DLL extern l_int32 ** create2dIntArray ( l_int32 sy, l_int32 sx ); -LEPT_DLL extern l_int32 selaAddSel ( SELA *sela, SEL *sel, const char *selname, l_int32 copyflag ); -LEPT_DLL extern l_int32 selaGetCount ( SELA *sela ); -LEPT_DLL extern SEL * selaGetSel ( SELA *sela, l_int32 i ); -LEPT_DLL extern char * selGetName ( SEL *sel ); -LEPT_DLL extern l_int32 selSetName ( SEL *sel, const char *name ); -LEPT_DLL extern l_int32 selaFindSelByName ( SELA *sela, const char *name, l_int32 *pindex, SEL **psel ); -LEPT_DLL extern l_int32 selGetElement ( SEL *sel, l_int32 row, l_int32 col, l_int32 *ptype ); -LEPT_DLL extern l_int32 selSetElement ( SEL *sel, l_int32 row, l_int32 col, l_int32 type ); -LEPT_DLL extern l_int32 selGetParameters ( SEL *sel, l_int32 *psy, l_int32 *psx, l_int32 *pcy, l_int32 *pcx ); -LEPT_DLL extern l_int32 selSetOrigin ( SEL *sel, l_int32 cy, l_int32 cx ); -LEPT_DLL extern l_int32 selGetTypeAtOrigin ( SEL *sel, l_int32 *ptype ); -LEPT_DLL extern char * selaGetBrickName ( SELA *sela, l_int32 hsize, l_int32 vsize ); -LEPT_DLL extern char * selaGetCombName ( SELA *sela, l_int32 size, l_int32 direction ); -LEPT_DLL extern l_int32 getCompositeParameters ( l_int32 size, l_int32 *psize1, l_int32 *psize2, char **pnameh1, char **pnameh2, char **pnamev1, char **pnamev2 ); -LEPT_DLL extern SARRAY * selaGetSelnames ( SELA *sela ); -LEPT_DLL extern l_int32 selFindMaxTranslations ( SEL *sel, l_int32 *pxp, l_int32 *pyp, l_int32 *pxn, l_int32 *pyn ); -LEPT_DLL extern SEL * selRotateOrth ( SEL *sel, l_int32 quads ); -LEPT_DLL extern SELA * selaRead ( const char *fname ); -LEPT_DLL extern SELA * selaReadStream ( FILE *fp ); -LEPT_DLL extern SEL * selRead ( const char *fname ); -LEPT_DLL extern SEL * selReadStream ( FILE *fp ); -LEPT_DLL extern l_int32 selaWrite ( const char *fname, SELA *sela ); -LEPT_DLL extern l_int32 selaWriteStream ( FILE *fp, SELA *sela ); -LEPT_DLL extern l_int32 selWrite ( const char *fname, SEL *sel ); -LEPT_DLL extern l_int32 selWriteStream ( FILE *fp, SEL *sel ); -LEPT_DLL extern SEL * selCreateFromString ( const char *text, l_int32 h, l_int32 w, const char *name ); -LEPT_DLL extern char * selPrintToString ( SEL *sel ); -LEPT_DLL extern SELA * selaCreateFromFile ( const char *filename ); -LEPT_DLL extern SEL * selCreateFromPta ( PTA *pta, l_int32 cy, l_int32 cx, const char *name ); -LEPT_DLL extern SEL * selCreateFromPix ( PIX *pix, l_int32 cy, l_int32 cx, const char *name ); -LEPT_DLL extern SEL * selReadFromColorImage ( const char *pathname ); -LEPT_DLL extern SEL * selCreateFromColorPix ( PIX *pixs, char *selname ); -LEPT_DLL extern PIX * selDisplayInPix ( SEL *sel, l_int32 size, l_int32 gthick ); -LEPT_DLL extern PIX * selaDisplayInPix ( SELA *sela, l_int32 size, l_int32 gthick, l_int32 spacing, l_int32 ncols ); -LEPT_DLL extern SELA * selaAddBasic ( SELA *sela ); -LEPT_DLL extern SELA * selaAddHitMiss ( SELA *sela ); -LEPT_DLL extern SELA * selaAddDwaLinear ( SELA *sela ); -LEPT_DLL extern SELA * selaAddDwaCombs ( SELA *sela ); -LEPT_DLL extern SELA * selaAddCrossJunctions ( SELA *sela, l_float32 hlsize, l_float32 mdist, l_int32 norient, l_int32 debugflag ); -LEPT_DLL extern SELA * selaAddTJunctions ( SELA *sela, l_float32 hlsize, l_float32 mdist, l_int32 norient, l_int32 debugflag ); -LEPT_DLL extern SEL * pixGenerateSelWithRuns ( PIX *pixs, l_int32 nhlines, l_int32 nvlines, l_int32 distance, l_int32 minlength, l_int32 toppix, l_int32 botpix, l_int32 leftpix, l_int32 rightpix, PIX **ppixe ); -LEPT_DLL extern SEL * pixGenerateSelRandom ( PIX *pixs, l_float32 hitfract, l_float32 missfract, l_int32 distance, l_int32 toppix, l_int32 botpix, l_int32 leftpix, l_int32 rightpix, PIX **ppixe ); -LEPT_DLL extern SEL * pixGenerateSelBoundary ( PIX *pixs, l_int32 hitdist, l_int32 missdist, l_int32 hitskip, l_int32 missskip, l_int32 topflag, l_int32 botflag, l_int32 leftflag, l_int32 rightflag, PIX **ppixe ); -LEPT_DLL extern NUMA * pixGetRunCentersOnLine ( PIX *pixs, l_int32 x, l_int32 y, l_int32 minlength ); -LEPT_DLL extern NUMA * pixGetRunsOnLine ( PIX *pixs, l_int32 x1, l_int32 y1, l_int32 x2, l_int32 y2 ); -LEPT_DLL extern PTA * pixSubsampleBoundaryPixels ( PIX *pixs, l_int32 skip ); -LEPT_DLL extern l_int32 adjacentOnPixelInRaster ( PIX *pixs, l_int32 x, l_int32 y, l_int32 *pxa, l_int32 *pya ); -LEPT_DLL extern PIX * pixDisplayHitMissSel ( PIX *pixs, SEL *sel, l_int32 scalefactor, l_uint32 hitcolor, l_uint32 misscolor ); -LEPT_DLL extern PIX * pixHShear ( PIX *pixd, PIX *pixs, l_int32 yloc, l_float32 radang, l_int32 incolor ); -LEPT_DLL extern PIX * pixVShear ( PIX *pixd, PIX *pixs, l_int32 xloc, l_float32 radang, l_int32 incolor ); -LEPT_DLL extern PIX * pixHShearCorner ( PIX *pixd, PIX *pixs, l_float32 radang, l_int32 incolor ); -LEPT_DLL extern PIX * pixVShearCorner ( PIX *pixd, PIX *pixs, l_float32 radang, l_int32 incolor ); -LEPT_DLL extern PIX * pixHShearCenter ( PIX *pixd, PIX *pixs, l_float32 radang, l_int32 incolor ); -LEPT_DLL extern PIX * pixVShearCenter ( PIX *pixd, PIX *pixs, l_float32 radang, l_int32 incolor ); -LEPT_DLL extern l_int32 pixHShearIP ( PIX *pixs, l_int32 yloc, l_float32 radang, l_int32 incolor ); -LEPT_DLL extern l_int32 pixVShearIP ( PIX *pixs, l_int32 xloc, l_float32 radang, l_int32 incolor ); -LEPT_DLL extern PIX * pixHShearLI ( PIX *pixs, l_int32 yloc, l_float32 radang, l_int32 incolor ); -LEPT_DLL extern PIX * pixVShearLI ( PIX *pixs, l_int32 xloc, l_float32 radang, l_int32 incolor ); -LEPT_DLL extern PIX * pixDeskew ( PIX *pixs, l_int32 redsearch ); -LEPT_DLL extern PIX * pixFindSkewAndDeskew ( PIX *pixs, l_int32 redsearch, l_float32 *pangle, l_float32 *pconf ); -LEPT_DLL extern PIX * pixDeskewGeneral ( PIX *pixs, l_int32 redsweep, l_float32 sweeprange, l_float32 sweepdelta, l_int32 redsearch, l_int32 thresh, l_float32 *pangle, l_float32 *pconf ); -LEPT_DLL extern l_int32 pixFindSkew ( PIX *pixs, l_float32 *pangle, l_float32 *pconf ); -LEPT_DLL extern l_int32 pixFindSkewSweep ( PIX *pixs, l_float32 *pangle, l_int32 reduction, l_float32 sweeprange, l_float32 sweepdelta ); -LEPT_DLL extern l_int32 pixFindSkewSweepAndSearch ( PIX *pixs, l_float32 *pangle, l_float32 *pconf, l_int32 redsweep, l_int32 redsearch, l_float32 sweeprange, l_float32 sweepdelta, l_float32 minbsdelta ); -LEPT_DLL extern l_int32 pixFindSkewSweepAndSearchScore ( PIX *pixs, l_float32 *pangle, l_float32 *pconf, l_float32 *pendscore, l_int32 redsweep, l_int32 redsearch, l_float32 sweepcenter, l_float32 sweeprange, l_float32 sweepdelta, l_float32 minbsdelta ); -LEPT_DLL extern l_int32 pixFindSkewSweepAndSearchScorePivot ( PIX *pixs, l_float32 *pangle, l_float32 *pconf, l_float32 *pendscore, l_int32 redsweep, l_int32 redsearch, l_float32 sweepcenter, l_float32 sweeprange, l_float32 sweepdelta, l_float32 minbsdelta, l_int32 pivot ); -LEPT_DLL extern l_int32 pixFindSkewOrthogonalRange ( PIX *pixs, l_float32 *pangle, l_float32 *pconf, l_int32 redsweep, l_int32 redsearch, l_float32 sweeprange, l_float32 sweepdelta, l_float32 minbsdelta, l_float32 confprior ); -LEPT_DLL extern l_int32 pixFindDifferentialSquareSum ( PIX *pixs, l_float32 *psum ); -LEPT_DLL extern l_int32 pixFindNormalizedSquareSum ( PIX *pixs, l_float32 *phratio, l_float32 *pvratio, l_float32 *pfract ); -LEPT_DLL extern PIX * pixReadStreamSpix ( FILE *fp ); -LEPT_DLL extern l_int32 readHeaderSpix ( const char *filename, l_int32 *pwidth, l_int32 *pheight, l_int32 *pbps, l_int32 *pspp, l_int32 *piscmap ); -LEPT_DLL extern l_int32 freadHeaderSpix ( FILE *fp, l_int32 *pwidth, l_int32 *pheight, l_int32 *pbps, l_int32 *pspp, l_int32 *piscmap ); -LEPT_DLL extern l_int32 sreadHeaderSpix ( const l_uint32 *data, l_int32 *pwidth, l_int32 *pheight, l_int32 *pbps, l_int32 *pspp, l_int32 *piscmap ); -LEPT_DLL extern l_int32 pixWriteStreamSpix ( FILE *fp, PIX *pix ); -LEPT_DLL extern PIX * pixReadMemSpix ( const l_uint8 *data, size_t size ); -LEPT_DLL extern l_int32 pixWriteMemSpix ( l_uint8 **pdata, size_t *psize, PIX *pix ); -LEPT_DLL extern l_int32 pixSerializeToMemory ( PIX *pixs, l_uint32 **pdata, size_t *pnbytes ); -LEPT_DLL extern PIX * pixDeserializeFromMemory ( const l_uint32 *data, size_t nbytes ); -LEPT_DLL extern L_STACK * lstackCreate ( l_int32 nalloc ); -LEPT_DLL extern void lstackDestroy ( L_STACK **plstack, l_int32 freeflag ); -LEPT_DLL extern l_int32 lstackAdd ( L_STACK *lstack, void *item ); -LEPT_DLL extern void * lstackRemove ( L_STACK *lstack ); -LEPT_DLL extern l_int32 lstackGetCount ( L_STACK *lstack ); -LEPT_DLL extern l_int32 lstackPrint ( FILE *fp, L_STACK *lstack ); -LEPT_DLL extern L_STRCODE * strcodeCreate ( l_int32 fileno ); -LEPT_DLL extern l_int32 strcodeCreateFromFile ( const char *filein, l_int32 fileno, const char *outdir ); -LEPT_DLL extern l_int32 strcodeGenerate ( L_STRCODE *strcode, const char *filein, const char *type ); -LEPT_DLL extern l_int32 strcodeFinalize ( L_STRCODE **pstrcode, const char *outdir ); -LEPT_DLL extern l_int32 l_getStructStrFromFile ( const char *filename, l_int32 field, char **pstr ); -LEPT_DLL extern l_int32 * sudokuReadFile ( const char *filename ); -LEPT_DLL extern l_int32 * sudokuReadString ( const char *str ); -LEPT_DLL extern L_SUDOKU * sudokuCreate ( l_int32 *array ); -LEPT_DLL extern void sudokuDestroy ( L_SUDOKU **psud ); -LEPT_DLL extern l_int32 sudokuSolve ( L_SUDOKU *sud ); -LEPT_DLL extern l_int32 sudokuTestUniqueness ( l_int32 *array, l_int32 *punique ); -LEPT_DLL extern L_SUDOKU * sudokuGenerate ( l_int32 *array, l_int32 seed, l_int32 minelems, l_int32 maxtries ); -LEPT_DLL extern l_int32 sudokuOutput ( L_SUDOKU *sud, l_int32 arraytype ); -LEPT_DLL extern PIX * pixAddSingleTextblock ( PIX *pixs, L_BMF *bmf, const char *textstr, l_uint32 val, l_int32 location, l_int32 *poverflow ); -LEPT_DLL extern PIX * pixAddTextlines ( PIX *pixs, L_BMF *bmf, const char *textstr, l_uint32 val, l_int32 location ); -LEPT_DLL extern l_int32 pixSetTextblock ( PIX *pixs, L_BMF *bmf, const char *textstr, l_uint32 val, l_int32 x0, l_int32 y0, l_int32 wtext, l_int32 firstindent, l_int32 *poverflow ); -LEPT_DLL extern l_int32 pixSetTextline ( PIX *pixs, L_BMF *bmf, const char *textstr, l_uint32 val, l_int32 x0, l_int32 y0, l_int32 *pwidth, l_int32 *poverflow ); -LEPT_DLL extern PIXA * pixaAddTextNumber ( PIXA *pixas, L_BMF *bmf, NUMA *na, l_uint32 val, l_int32 location ); -LEPT_DLL extern PIXA * pixaAddTextlines ( PIXA *pixas, L_BMF *bmf, SARRAY *sa, l_uint32 val, l_int32 location ); -LEPT_DLL extern l_int32 pixaAddPixWithText ( PIXA *pixa, PIX *pixs, l_int32 reduction, L_BMF *bmf, const char *textstr, l_uint32 val, l_int32 location ); -LEPT_DLL extern SARRAY * bmfGetLineStrings ( L_BMF *bmf, const char *textstr, l_int32 maxw, l_int32 firstindent, l_int32 *ph ); -LEPT_DLL extern NUMA * bmfGetWordWidths ( L_BMF *bmf, const char *textstr, SARRAY *sa ); -LEPT_DLL extern l_int32 bmfGetStringWidth ( L_BMF *bmf, const char *textstr, l_int32 *pw ); -LEPT_DLL extern SARRAY * splitStringToParagraphs ( char *textstr, l_int32 splitflag ); -LEPT_DLL extern PIX * pixReadTiff ( const char *filename, l_int32 n ); -LEPT_DLL extern PIX * pixReadStreamTiff ( FILE *fp, l_int32 n ); -LEPT_DLL extern l_int32 pixWriteTiff ( const char *filename, PIX *pix, l_int32 comptype, const char *modestring ); -LEPT_DLL extern l_int32 pixWriteTiffCustom ( const char *filename, PIX *pix, l_int32 comptype, const char *modestring, NUMA *natags, SARRAY *savals, SARRAY *satypes, NUMA *nasizes ); -LEPT_DLL extern l_int32 pixWriteStreamTiff ( FILE *fp, PIX *pix, l_int32 comptype ); -LEPT_DLL extern PIX * pixReadFromMultipageTiff ( const char *fname, size_t *poffset ); -LEPT_DLL extern PIXA * pixaReadMultipageTiff ( const char *filename ); -LEPT_DLL extern l_int32 writeMultipageTiff ( const char *dirin, const char *substr, const char *fileout ); -LEPT_DLL extern l_int32 writeMultipageTiffSA ( SARRAY *sa, const char *fileout ); -LEPT_DLL extern l_int32 fprintTiffInfo ( FILE *fpout, const char *tiffile ); -LEPT_DLL extern l_int32 tiffGetCount ( FILE *fp, l_int32 *pn ); -LEPT_DLL extern l_int32 getTiffResolution ( FILE *fp, l_int32 *pxres, l_int32 *pyres ); -LEPT_DLL extern l_int32 readHeaderTiff ( const char *filename, l_int32 n, l_int32 *pwidth, l_int32 *pheight, l_int32 *pbps, l_int32 *pspp, l_int32 *pres, l_int32 *pcmap, l_int32 *pformat ); -LEPT_DLL extern l_int32 freadHeaderTiff ( FILE *fp, l_int32 n, l_int32 *pwidth, l_int32 *pheight, l_int32 *pbps, l_int32 *pspp, l_int32 *pres, l_int32 *pcmap, l_int32 *pformat ); -LEPT_DLL extern l_int32 readHeaderMemTiff ( const l_uint8 *cdata, size_t size, l_int32 n, l_int32 *pwidth, l_int32 *pheight, l_int32 *pbps, l_int32 *pspp, l_int32 *pres, l_int32 *pcmap, l_int32 *pformat ); -LEPT_DLL extern l_int32 findTiffCompression ( FILE *fp, l_int32 *pcomptype ); -LEPT_DLL extern l_int32 extractG4DataFromFile ( const char *filein, l_uint8 **pdata, size_t *pnbytes, l_int32 *pw, l_int32 *ph, l_int32 *pminisblack ); -LEPT_DLL extern PIX * pixReadMemTiff ( const l_uint8 *cdata, size_t size, l_int32 n ); -LEPT_DLL extern PIX * pixReadMemFromMultipageTiff ( const l_uint8 *cdata, size_t size, size_t *poffset ); -LEPT_DLL extern l_int32 pixWriteMemTiff ( l_uint8 **pdata, size_t *psize, PIX *pix, l_int32 comptype ); -LEPT_DLL extern l_int32 pixWriteMemTiffCustom ( l_uint8 **pdata, size_t *psize, PIX *pix, l_int32 comptype, NUMA *natags, SARRAY *savals, SARRAY *satypes, NUMA *nasizes ); -LEPT_DLL extern l_int32 setMsgSeverity ( l_int32 newsev ); -LEPT_DLL extern l_int32 returnErrorInt ( const char *msg, const char *procname, l_int32 ival ); -LEPT_DLL extern l_float32 returnErrorFloat ( const char *msg, const char *procname, l_float32 fval ); -LEPT_DLL extern void * returnErrorPtr ( const char *msg, const char *procname, void *pval ); -LEPT_DLL extern char * stringNew ( const char *src ); -LEPT_DLL extern l_int32 stringCopy ( char *dest, const char *src, l_int32 n ); -LEPT_DLL extern l_int32 stringReplace ( char **pdest, const char *src ); -LEPT_DLL extern l_int32 stringLength ( const char *src, size_t size ); -LEPT_DLL extern l_int32 stringCat ( char *dest, size_t size, const char *src ); -LEPT_DLL extern char * stringConcatNew ( const char *first, ... ); -LEPT_DLL extern char * stringJoin ( const char *src1, const char *src2 ); -LEPT_DLL extern l_int32 stringJoinIP ( char **psrc1, const char *src2 ); -LEPT_DLL extern char * stringReverse ( const char *src ); -LEPT_DLL extern char * strtokSafe ( char *cstr, const char *seps, char **psaveptr ); -LEPT_DLL extern l_int32 stringSplitOnToken ( char *cstr, const char *seps, char **phead, char **ptail ); -LEPT_DLL extern char * stringRemoveChars ( const char *src, const char *remchars ); -LEPT_DLL extern l_int32 stringFindSubstr ( const char *src, const char *sub, l_int32 *ploc ); -LEPT_DLL extern char * stringReplaceSubstr ( const char *src, const char *sub1, const char *sub2, l_int32 *pfound, l_int32 *ploc ); -LEPT_DLL extern char * stringReplaceEachSubstr ( const char *src, const char *sub1, const char *sub2, l_int32 *pcount ); -LEPT_DLL extern L_DNA * arrayFindEachSequence ( const l_uint8 *data, size_t datalen, const l_uint8 *sequence, size_t seqlen ); -LEPT_DLL extern l_int32 arrayFindSequence ( const l_uint8 *data, size_t datalen, const l_uint8 *sequence, size_t seqlen, l_int32 *poffset, l_int32 *pfound ); -LEPT_DLL extern void * reallocNew ( void **pindata, l_int32 oldsize, l_int32 newsize ); -LEPT_DLL extern l_uint8 * l_binaryRead ( const char *filename, size_t *pnbytes ); -LEPT_DLL extern l_uint8 * l_binaryReadStream ( FILE *fp, size_t *pnbytes ); -LEPT_DLL extern l_uint8 * l_binaryReadSelect ( const char *filename, size_t start, size_t nbytes, size_t *pnread ); -LEPT_DLL extern l_uint8 * l_binaryReadSelectStream ( FILE *fp, size_t start, size_t nbytes, size_t *pnread ); -LEPT_DLL extern l_int32 l_binaryWrite ( const char *filename, const char *operation, void *data, size_t nbytes ); -LEPT_DLL extern size_t nbytesInFile ( const char *filename ); -LEPT_DLL extern size_t fnbytesInFile ( FILE *fp ); -LEPT_DLL extern l_uint8 * l_binaryCopy ( l_uint8 *datas, size_t size ); -LEPT_DLL extern l_int32 fileCopy ( const char *srcfile, const char *newfile ); -LEPT_DLL extern l_int32 fileConcatenate ( const char *srcfile, const char *destfile ); -LEPT_DLL extern l_int32 fileAppendString ( const char *filename, const char *str ); -LEPT_DLL extern l_int32 filesAreIdentical ( const char *fname1, const char *fname2, l_int32 *psame ); -LEPT_DLL extern l_uint16 convertOnLittleEnd16 ( l_uint16 shortin ); -LEPT_DLL extern l_uint16 convertOnBigEnd16 ( l_uint16 shortin ); -LEPT_DLL extern l_uint32 convertOnLittleEnd32 ( l_uint32 wordin ); -LEPT_DLL extern l_uint32 convertOnBigEnd32 ( l_uint32 wordin ); -LEPT_DLL extern FILE * fopenReadStream ( const char *filename ); -LEPT_DLL extern FILE * fopenWriteStream ( const char *filename, const char *modestring ); -LEPT_DLL extern FILE * fopenReadFromMemory ( const l_uint8 *data, size_t size ); -LEPT_DLL extern FILE * fopenWriteWinTempfile ( ); -LEPT_DLL extern FILE * lept_fopen ( const char *filename, const char *mode ); -LEPT_DLL extern l_int32 lept_fclose ( FILE *fp ); -LEPT_DLL extern void * lept_calloc ( size_t nmemb, size_t size ); -LEPT_DLL extern void lept_free ( void *ptr ); -LEPT_DLL extern l_int32 lept_mkdir ( const char *subdir ); -LEPT_DLL extern l_int32 lept_rmdir ( const char *subdir ); -LEPT_DLL extern void lept_direxists ( const char *dir, l_int32 *pexists ); -LEPT_DLL extern l_int32 lept_rm_match ( const char *subdir, const char *substr ); -LEPT_DLL extern l_int32 lept_rm ( const char *subdir, const char *tail ); -LEPT_DLL extern l_int32 lept_rmfile ( const char *filepath ); -LEPT_DLL extern l_int32 lept_mv ( const char *srcfile, const char *newdir, const char *newtail, char **pnewpath ); -LEPT_DLL extern l_int32 lept_cp ( const char *srcfile, const char *newdir, const char *newtail, char **pnewpath ); -LEPT_DLL extern l_int32 splitPathAtDirectory ( const char *pathname, char **pdir, char **ptail ); -LEPT_DLL extern l_int32 splitPathAtExtension ( const char *pathname, char **pbasename, char **pextension ); -LEPT_DLL extern char * pathJoin ( const char *dir, const char *fname ); -LEPT_DLL extern char * appendSubdirs ( const char *basedir, const char *subdirs ); -LEPT_DLL extern l_int32 convertSepCharsInPath ( char *path, l_int32 type ); -LEPT_DLL extern char * genPathname ( const char *dir, const char *fname ); -LEPT_DLL extern l_int32 makeTempDirname ( char *result, size_t nbytes, const char *subdir ); -LEPT_DLL extern l_int32 modifyTrailingSlash ( char *path, size_t nbytes, l_int32 flag ); -LEPT_DLL extern char * l_makeTempFilename ( const char *subdir ); -LEPT_DLL extern l_int32 extractNumberFromFilename ( const char *fname, l_int32 numpre, l_int32 numpost ); -LEPT_DLL extern l_int32 fileCorruptByDeletion ( const char *filein, l_float32 loc, l_float32 size, const char *fileout ); -LEPT_DLL extern l_int32 fileCorruptByMutation ( const char *filein, l_float32 loc, l_float32 size, const char *fileout ); -LEPT_DLL extern l_int32 genRandomIntegerInRange ( l_int32 range, l_int32 seed, l_int32 *pval ); -LEPT_DLL extern l_int32 lept_roundftoi ( l_float32 fval ); -LEPT_DLL extern l_int32 l_hashStringToUint64 ( const char *str, l_uint64 *phash ); -LEPT_DLL extern l_int32 l_hashPtToUint64 ( l_int32 x, l_int32 y, l_uint64 *phash ); -LEPT_DLL extern l_int32 l_hashFloat64ToUint64 ( l_int32 nbuckets, l_float64 val, l_uint64 *phash ); -LEPT_DLL extern l_int32 findNextLargerPrime ( l_int32 start, l_uint32 *pprime ); -LEPT_DLL extern l_int32 lept_isPrime ( l_uint64 n, l_int32 *pis_prime, l_uint32 *pfactor ); -LEPT_DLL extern l_uint32 convertBinaryToGrayCode ( l_uint32 val ); -LEPT_DLL extern l_uint32 convertGrayCodeToBinary ( l_uint32 val ); -LEPT_DLL extern char * getLeptonicaVersion ( ); -LEPT_DLL extern void startTimer ( void ); -LEPT_DLL extern l_float32 stopTimer ( void ); -LEPT_DLL extern L_TIMER startTimerNested ( void ); -LEPT_DLL extern l_float32 stopTimerNested ( L_TIMER rusage_start ); -LEPT_DLL extern void l_getCurrentTime ( l_int32 *sec, l_int32 *usec ); -LEPT_DLL extern L_WALLTIMER * startWallTimer ( void ); -LEPT_DLL extern l_float32 stopWallTimer ( L_WALLTIMER **ptimer ); -LEPT_DLL extern char * l_getFormattedDate ( ); -LEPT_DLL extern l_int32 pixHtmlViewer ( const char *dirin, const char *dirout, const char *rootname, l_int32 thumbwidth, l_int32 viewwidth, l_int32 copyorig ); -LEPT_DLL extern PIX * pixSimpleCaptcha ( PIX *pixs, l_int32 border, l_int32 nterms, l_uint32 seed, l_uint32 color, l_int32 cmapflag ); -LEPT_DLL extern PIX * pixRandomHarmonicWarp ( PIX *pixs, l_float32 xmag, l_float32 ymag, l_float32 xfreq, l_float32 yfreq, l_int32 nx, l_int32 ny, l_uint32 seed, l_int32 grayval ); -LEPT_DLL extern PIX * pixWarpStereoscopic ( PIX *pixs, l_int32 zbend, l_int32 zshiftt, l_int32 zshiftb, l_int32 ybendt, l_int32 ybendb, l_int32 redleft ); -LEPT_DLL extern PIX * pixStretchHorizontal ( PIX *pixs, l_int32 dir, l_int32 type, l_int32 hmax, l_int32 operation, l_int32 incolor ); -LEPT_DLL extern PIX * pixStretchHorizontalSampled ( PIX *pixs, l_int32 dir, l_int32 type, l_int32 hmax, l_int32 incolor ); -LEPT_DLL extern PIX * pixStretchHorizontalLI ( PIX *pixs, l_int32 dir, l_int32 type, l_int32 hmax, l_int32 incolor ); -LEPT_DLL extern PIX * pixQuadraticVShear ( PIX *pixs, l_int32 dir, l_int32 vmaxt, l_int32 vmaxb, l_int32 operation, l_int32 incolor ); -LEPT_DLL extern PIX * pixQuadraticVShearSampled ( PIX *pixs, l_int32 dir, l_int32 vmaxt, l_int32 vmaxb, l_int32 incolor ); -LEPT_DLL extern PIX * pixQuadraticVShearLI ( PIX *pixs, l_int32 dir, l_int32 vmaxt, l_int32 vmaxb, l_int32 incolor ); -LEPT_DLL extern PIX * pixStereoFromPair ( PIX *pix1, PIX *pix2, l_float32 rwt, l_float32 gwt, l_float32 bwt ); -LEPT_DLL extern L_WSHED * wshedCreate ( PIX *pixs, PIX *pixm, l_int32 mindepth, l_int32 debugflag ); -LEPT_DLL extern void wshedDestroy ( L_WSHED **pwshed ); -LEPT_DLL extern l_int32 wshedApply ( L_WSHED *wshed ); -LEPT_DLL extern l_int32 wshedBasins ( L_WSHED *wshed, PIXA **ppixa, NUMA **pnalevels ); -LEPT_DLL extern PIX * wshedRenderFill ( L_WSHED *wshed ); -LEPT_DLL extern PIX * wshedRenderColors ( L_WSHED *wshed ); -LEPT_DLL extern PIX * pixReadStreamWebP ( FILE *fp ); -LEPT_DLL extern PIX * pixReadMemWebP ( const l_uint8 *filedata, size_t filesize ); -LEPT_DLL extern l_int32 readHeaderWebP ( const char *filename, l_int32 *pw, l_int32 *ph, l_int32 *pspp ); -LEPT_DLL extern l_int32 readHeaderMemWebP ( const l_uint8 *data, size_t size, l_int32 *pw, l_int32 *ph, l_int32 *pspp ); -LEPT_DLL extern l_int32 pixWriteWebP ( const char *filename, PIX *pixs, l_int32 quality, l_int32 lossless ); -LEPT_DLL extern l_int32 pixWriteStreamWebP ( FILE *fp, PIX *pixs, l_int32 quality, l_int32 lossless ); -LEPT_DLL extern l_int32 pixWriteMemWebP ( l_uint8 **pencdata, size_t *pencsize, PIX *pixs, l_int32 quality, l_int32 lossless ); -LEPT_DLL extern l_int32 pixaWriteFiles ( const char *rootname, PIXA *pixa, l_int32 format ); -LEPT_DLL extern l_int32 pixWrite ( const char *filename, PIX *pix, l_int32 format ); -LEPT_DLL extern l_int32 pixWriteAutoFormat ( const char *filename, PIX *pix ); -LEPT_DLL extern l_int32 pixWriteStream ( FILE *fp, PIX *pix, l_int32 format ); -LEPT_DLL extern l_int32 pixWriteImpliedFormat ( const char *filename, PIX *pix, l_int32 quality, l_int32 progressive ); -LEPT_DLL extern l_int32 pixChooseOutputFormat ( PIX *pix ); -LEPT_DLL extern l_int32 getImpliedFileFormat ( const char *filename ); -LEPT_DLL extern l_int32 pixGetAutoFormat ( PIX *pix, l_int32 *pformat ); -LEPT_DLL extern const char * getFormatExtension ( l_int32 format ); -LEPT_DLL extern l_int32 pixWriteMem ( l_uint8 **pdata, size_t *psize, PIX *pix, l_int32 format ); -LEPT_DLL extern l_int32 l_fileDisplay ( const char *fname, l_int32 x, l_int32 y ); -LEPT_DLL extern l_int32 pixDisplay ( PIX *pixs, l_int32 x, l_int32 y ); -LEPT_DLL extern l_int32 pixDisplayWithTitle ( PIX *pixs, l_int32 x, l_int32 y, const char *title, l_int32 dispflag ); -LEPT_DLL extern l_int32 pixDisplayWrite ( PIX *pixs, l_int32 reduction ); -LEPT_DLL extern l_int32 pixDisplayWriteFormat ( PIX *pixs, l_int32 reduction, l_int32 format ); -LEPT_DLL extern l_int32 pixDisplayMultiple ( l_int32 res, l_float32 scalefactor, const char *fileout ); -LEPT_DLL extern l_int32 pixSaveTiled ( PIX *pixs, PIXA *pixa, l_float32 scalefactor, l_int32 newrow, l_int32 space, l_int32 dp ); -LEPT_DLL extern l_int32 pixSaveTiledOutline ( PIX *pixs, PIXA *pixa, l_float32 scalefactor, l_int32 newrow, l_int32 space, l_int32 linewidth, l_int32 dp ); -LEPT_DLL extern l_int32 pixSaveTiledWithText ( PIX *pixs, PIXA *pixa, l_int32 outwidth, l_int32 newrow, l_int32 space, l_int32 linewidth, L_BMF *bmf, const char *textstr, l_uint32 val, l_int32 location ); -LEPT_DLL extern void l_chooseDisplayProg ( l_int32 selection ); -LEPT_DLL extern l_uint8 * zlibCompress ( l_uint8 *datain, size_t nin, size_t *pnout ); -LEPT_DLL extern l_uint8 * zlibUncompress ( l_uint8 *datain, size_t nin, size_t *pnout ); - -#ifdef __cplusplus -} -#endif /* __cplusplus */ -#endif /* NO_PROTOS */ - - -#endif /* LEPTONICA_ALLHEADERS_H */ - diff --git a/WebRtc.NET/include/leptonica/alltypes.h b/WebRtc.NET/include/leptonica/alltypes.h deleted file mode 100644 index a84c0bfa..00000000 --- a/WebRtc.NET/include/leptonica/alltypes.h +++ /dev/null @@ -1,66 +0,0 @@ -/*====================================================================* - - Copyright (C) 2001 Leptonica. All rights reserved. - - - - Redistribution and use in source and binary forms, with or without - - modification, are permitted provided that the following conditions - - are met: - - 1. Redistributions of source code must retain the above copyright - - notice, this list of conditions and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above - - copyright notice, this list of conditions and the following - - disclaimer in the documentation and/or other materials - - provided with the distribution. - - - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - - ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - - LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - - A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL ANY - - CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - - EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - - PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - - PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY - - OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - - NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - - SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - *====================================================================*/ - -#ifndef LEPTONICA_ALLTYPES_H -#define LEPTONICA_ALLTYPES_H - - /* Standard */ -#include -#include -#include - - /* General and configuration defs */ -#include "endianness.h" -#include "environ.h" - - /* Generic and non-image-specific containers */ -#include "array.h" -#include "bbuffer.h" -#include "heap.h" -#include "list.h" -#include "ptra.h" -#include "queue.h" -#include "rbtree.h" -#include "stack.h" - - /* Imaging */ -#include "arrayaccess.h" -#include "bmf.h" -#include "ccbord.h" -#include "dewarp.h" -#include "gplot.h" -#include "imageio.h" -#include "jbclass.h" -#include "morph.h" -#include "pix.h" -#include "recog.h" -#include "regutils.h" -#include "stringcode.h" -#include "sudoku.h" -#include "watershed.h" - - -#endif /* LEPTONICA_ALLTYPES_H */ diff --git a/WebRtc.NET/include/leptonica/array.h b/WebRtc.NET/include/leptonica/array.h deleted file mode 100644 index fa5074fd..00000000 --- a/WebRtc.NET/include/leptonica/array.h +++ /dev/null @@ -1,159 +0,0 @@ -/*====================================================================* - - Copyright (C) 2001 Leptonica. All rights reserved. - - - - Redistribution and use in source and binary forms, with or without - - modification, are permitted provided that the following conditions - - are met: - - 1. Redistributions of source code must retain the above copyright - - notice, this list of conditions and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above - - copyright notice, this list of conditions and the following - - disclaimer in the documentation and/or other materials - - provided with the distribution. - - - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - - ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - - LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - - A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL ANY - - CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - - EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - - PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - - PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY - - OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - - NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - - SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - *====================================================================*/ - -#ifndef LEPTONICA_ARRAY_H -#define LEPTONICA_ARRAY_H - -/*! - * \file array.h - * - *
- *  Contains the following structs:
- *      struct Numa
- *      struct Numaa
- *      struct L_Dna
- *      struct L_Dnaa
- *      struct L_DnaHash
- *      struct Sarray
- *      struct L_Bytea
- *
- *  Contains definitions for:
- *      Numa interpolation flags
- *      Numa and FPix border flags
- *      Numa data type conversion to string
- * 
- */ - - -/*------------------------------------------------------------------------* - * Array Structs * - *------------------------------------------------------------------------*/ - -/*! Numa version for serialization */ -#define NUMA_VERSION_NUMBER 1 - - /*! Number array: an array of floats */ -struct Numa -{ - l_int32 nalloc; /*!< size of allocated number array */ - l_int32 n; /*!< number of numbers saved */ - l_int32 refcount; /*!< reference count (1 if no clones) */ - l_float32 startx; /*!< x value assigned to array[0] */ - l_float32 delx; /*!< change in x value as i --> i + 1 */ - l_float32 *array; /*!< number array */ -}; -typedef struct Numa NUMA; - - /*! Array of number arrays */ -struct Numaa -{ - l_int32 nalloc; /*!< size of allocated ptr array */ - l_int32 n; /*!< number of Numa saved */ - struct Numa **numa; /*!< array of Numa */ -}; -typedef struct Numaa NUMAA; - -/*! Dna version for serialization */ -#define DNA_VERSION_NUMBER 1 - - /*! Double number array: an array of doubles */ -struct L_Dna -{ - l_int32 nalloc; /*!< size of allocated number array */ - l_int32 n; /*!< number of numbers saved */ - l_int32 refcount; /*!< reference count (1 if no clones) */ - l_float64 startx; /*!< x value assigned to array[0] */ - l_float64 delx; /*!< change in x value as i --> i + 1 */ - l_float64 *array; /*!< number array */ -}; -typedef struct L_Dna L_DNA; - - /*! Array of double number arrays */ -struct L_Dnaa -{ - l_int32 nalloc; /*!< size of allocated ptr array */ - l_int32 n; /*!< number of L_Dna saved */ - struct L_Dna **dna; /*!< array of L_Dna */ -}; -typedef struct L_Dnaa L_DNAA; - - /*! A hash table of Dnas */ -struct L_DnaHash -{ - l_int32 nbuckets; - l_int32 initsize; /*!< initial size of each dna that is made */ - struct L_Dna **dna; /*!< array of L_Dna */ -}; -typedef struct L_DnaHash L_DNAHASH; - -/*! Sarray version for serialization */ -#define SARRAY_VERSION_NUMBER 1 - - /*! String array: an array of C strings */ -struct Sarray -{ - l_int32 nalloc; /*!< size of allocated ptr array */ - l_int32 n; /*!< number of strings allocated */ - l_int32 refcount; /*!< reference count (1 if no clones) */ - char **array; /*!< string array */ -}; -typedef struct Sarray SARRAY; - - /*! Byte array (analogous to C++ "string") */ -struct L_Bytea -{ - size_t nalloc; /*!< number of bytes allocated in data array */ - size_t size; /*!< number of bytes presently used */ - l_int32 refcount; /*!< reference count (1 if no clones) */ - l_uint8 *data; /*!< data array */ -}; -typedef struct L_Bytea L_BYTEA; - - -/*------------------------------------------------------------------------* - * Array flags * - *------------------------------------------------------------------------*/ - /*! Flags for interpolation in Numa */ -enum { - L_LINEAR_INTERP = 1, /*!< linear */ - L_QUADRATIC_INTERP = 2 /*!< quadratic */ -}; - - /*! Flags for added borders in Numa and Fpix */ -enum { - L_CONTINUED_BORDER = 1, /*!< extended with same value */ - L_SLOPE_BORDER = 2, /*!< extended with constant normal derivative */ - L_MIRRORED_BORDER = 3 /*!< mirrored */ -}; - - /*! Flags for data type converted from Numa */ -enum { - L_INTEGER_VALUE = 1, /*!< convert to integer */ - L_FLOAT_VALUE = 2 /*!< convert to float */ -}; - - -#endif /* LEPTONICA_ARRAY_H */ diff --git a/WebRtc.NET/include/leptonica/arrayaccess.h b/WebRtc.NET/include/leptonica/arrayaccess.h deleted file mode 100644 index 87861264..00000000 --- a/WebRtc.NET/include/leptonica/arrayaccess.h +++ /dev/null @@ -1,264 +0,0 @@ -/*====================================================================* - - Copyright (C) 2001 Leptonica. All rights reserved. - - - - Redistribution and use in source and binary forms, with or without - - modification, are permitted provided that the following conditions - - are met: - - 1. Redistributions of source code must retain the above copyright - - notice, this list of conditions and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above - - copyright notice, this list of conditions and the following - - disclaimer in the documentation and/or other materials - - provided with the distribution. - - - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - - ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - - LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - - A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL ANY - - CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - - EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - - PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - - PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY - - OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - - NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - - SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - *====================================================================*/ - -#ifndef LEPTONICA_ARRAY_ACCESS_H -#define LEPTONICA_ARRAY_ACCESS_H - -/*! - * \file arrayaccess.h - * - *
- *  1, 2, 4, 8, 16 and 32 bit data access within an array of 32-bit words
- *
- *  This is used primarily to access 1, 2, 4, 8, 16 and 32 bit pixels
- *  in a line of image data, represented as an array of 32-bit words.
- *
- *     pdata:  pointer to first 32-bit word in the array
- *     n:      index of the pixel in the array
- *
- *  Function calls for these accessors are defined in arrayaccess.c.
- *
- *  However, for efficiency we use the inline macros for all accesses.
- *  Even though the 2 and 4 bit set* accessors are more complicated,
- *  they are about 10% faster than the function calls.
- *
- *  The 32 bit access is just a cast and ptr arithmetic.  We include
- *  it so that the input ptr can be void*.
- *
- *  At the end of this file is code for invoking the function calls
- *  instead of inlining.
- *
- *  The macro SET_DATA_BIT_VAL(pdata, n, val) is a bit slower than
- *      if (val == 0)
- *          CLEAR_DATA_BIT(pdata, n);
- *      else
- *          SET_DATA_BIT(pdata, n);
- *
- *  Some compilers complain when the SET macros are surrounded by
- *  parentheses, because parens require an evaluation and it is not
- *  defined for SET macros.  If SET_DATA_QBIT were defined as a
- *  compound macro, in analogy to l_setDataQbit(), it requires
- *  surrounding bracces:
- *     #define  SET_DATA_QBIT(pdata, n, val) \
- *        {l_uint32 *_TEMP_WORD_PTR_; \
- *         _TEMP_WORD_PTR_ = (l_uint32 *)(pdata) + ((n) >> 3); \
- *         *_TEMP_WORD_PTR_ &= ~(0xf0000000 >> (4 * ((n) & 7))); \
- *         *_TEMP_WORD_PTR_ |= (((val) & 15) << (28 - 4 * ((n) & 7)));}
- *  but if used in an if/else
- *      if (x)
- *         SET_DATA_QBIT(...);
- *      else
- *         ...
- *  the compiler sees
- *      if (x)
- *         {......};
- *      else
- *         ...
- *  The semicolon comes after the brace and will not compile.
- *  This can be fixed in the call by either omitting the semicolon
- *  or requiring another set of braces around SET_DATA_QBIT(), but
- *  both these options break compatibility with current code, and
- *  require special attention by anyone using the macros.
- *
- *  There are (at least) two ways to fix this in the macro definitions,
- *  suggested by Dave Bryan.
- *  (1) Surround the braces in the macro above with
- *         do {....} while(0)
- *      Then the semicolon just terminates the expression.
- *  (2) Reduce the blocks to a single expression; e.g,
- *         *((l_uint32 *)(pdata) + ((n) >> 3)) = \
- *           *((l_uint32 *)(pdata) + ((n) >> 3)) \
- *           & ~(0xf0000000 >> (4 * ((n) & 7))) \
- *           | (((val) & 15) << (28 - 4 * ((n) & 7)))
- *      This appears to cause redundant computation, but the compiler
- *      should evaluate the common subexpression only once.
- *  All these methods have the same performance, giving about 300M
- *  SET_DATA_QBIT operations per second on a fast 64 bit system.
- *  Using the function calls instead of the macros results in about 250M
- *  SET_DATA_QBIT operations per second, a performance hit of nearly 20%.
- * 
- */ - -#define USE_INLINE_ACCESSORS 1 - -#if USE_INLINE_ACCESSORS - - /*=============================================================*/ - /* Faster: use in line accessors */ - /*=============================================================*/ - - /*--------------------------------------------------* - * 1 bit access * - *--------------------------------------------------*/ -/*! 1 bit access - get */ -#define GET_DATA_BIT(pdata, n) \ - ((*((l_uint32 *)(pdata) + ((n) >> 5)) >> (31 - ((n) & 31))) & 1) - -/*! 1 bit access - set */ -#define SET_DATA_BIT(pdata, n) \ - *((l_uint32 *)(pdata) + ((n) >> 5)) |= (0x80000000 >> ((n) & 31)) - -/*! 1 bit access - clear */ -#define CLEAR_DATA_BIT(pdata, n) \ - *((l_uint32 *)(pdata) + ((n) >> 5)) &= ~(0x80000000 >> ((n) & 31)) - -/*! 1 bit access - set value (0 or 1) */ -#define SET_DATA_BIT_VAL(pdata, n, val) \ - *((l_uint32 *)(pdata) + ((n) >> 5)) = \ - ((*((l_uint32 *)(pdata) + ((n) >> 5)) \ - & (~(0x80000000 >> ((n) & 31)))) \ - | ((val) << (31 - ((n) & 31)))) - - /*--------------------------------------------------* - * 2 bit access * - *--------------------------------------------------*/ -/*! 2 bit access - get */ -#define GET_DATA_DIBIT(pdata, n) \ - ((*((l_uint32 *)(pdata) + ((n) >> 4)) >> (2 * (15 - ((n) & 15)))) & 3) - -/*! 2 bit access - set value (0 ... 3) */ -#define SET_DATA_DIBIT(pdata, n, val) \ - *((l_uint32 *)(pdata) + ((n) >> 4)) = \ - ((*((l_uint32 *)(pdata) + ((n) >> 4)) \ - & (~(0xc0000000 >> (2 * ((n) & 15))))) \ - | (((val) & 3) << (30 - 2 * ((n) & 15)))) - -/*! 2 bit access - clear */ -#define CLEAR_DATA_DIBIT(pdata, n) \ - *((l_uint32 *)(pdata) + ((n) >> 4)) &= ~(0xc0000000 >> (2 * ((n) & 15))) - - - /*--------------------------------------------------* - * 4 bit access * - *--------------------------------------------------*/ -/*! 4 bit access - get */ -#define GET_DATA_QBIT(pdata, n) \ - ((*((l_uint32 *)(pdata) + ((n) >> 3)) >> (4 * (7 - ((n) & 7)))) & 0xf) - -/*! 4 bit access - set value (0 ... 15) */ -#define SET_DATA_QBIT(pdata, n, val) \ - *((l_uint32 *)(pdata) + ((n) >> 3)) = \ - ((*((l_uint32 *)(pdata) + ((n) >> 3)) \ - & (~(0xf0000000 >> (4 * ((n) & 7))))) \ - | (((val) & 15) << (28 - 4 * ((n) & 7)))) - -/*! 4 bit access - clear */ -#define CLEAR_DATA_QBIT(pdata, n) \ - *((l_uint32 *)(pdata) + ((n) >> 3)) &= ~(0xf0000000 >> (4 * ((n) & 7))) - - - /*--------------------------------------------------* - * 8 bit access * - *--------------------------------------------------*/ -#ifdef L_BIG_ENDIAN -/*! 8 bit access - get */ -#define GET_DATA_BYTE(pdata, n) \ - (*((l_uint8 *)(pdata) + (n))) -#else /* L_LITTLE_ENDIAN */ -/*! 8 bit access - get */ -#define GET_DATA_BYTE(pdata, n) \ - (*(l_uint8 *)((l_uintptr_t)((l_uint8 *)(pdata) + (n)) ^ 3)) -#endif /* L_BIG_ENDIAN */ - -#ifdef L_BIG_ENDIAN -/*! 8 bit access - set value (0 ... 255) */ -#define SET_DATA_BYTE(pdata, n, val) \ - *((l_uint8 *)(pdata) + (n)) = (val) -#else /* L_LITTLE_ENDIAN */ -/*! 8 bit access - set value (0 ... 255) */ -#define SET_DATA_BYTE(pdata, n, val) \ - *(l_uint8 *)((l_uintptr_t)((l_uint8 *)(pdata) + (n)) ^ 3) = (val) -#endif /* L_BIG_ENDIAN */ - - - /*--------------------------------------------------* - * 16 bit access * - *--------------------------------------------------*/ -#ifdef L_BIG_ENDIAN -/*! 16 bit access - get */ -#define GET_DATA_TWO_BYTES(pdata, n) \ - (*((l_uint16 *)(pdata) + (n))) -#else /* L_LITTLE_ENDIAN */ -/*! 16 bit access - get */ -#define GET_DATA_TWO_BYTES(pdata, n) \ - (*(l_uint16 *)((l_uintptr_t)((l_uint16 *)(pdata) + (n)) ^ 2)) -#endif /* L_BIG_ENDIAN */ - -#ifdef L_BIG_ENDIAN -/*! 16 bit access - set value (0 ... 65535) */ -#define SET_DATA_TWO_BYTES(pdata, n, val) \ - *((l_uint16 *)(pdata) + (n)) = (val) -#else /* L_LITTLE_ENDIAN */ -/*! 16 bit access - set value (0 ... 65535) */ -#define SET_DATA_TWO_BYTES(pdata, n, val) \ - *(l_uint16 *)((l_uintptr_t)((l_uint16 *)(pdata) + (n)) ^ 2) = (val) -#endif /* L_BIG_ENDIAN */ - - - /*--------------------------------------------------* - * 32 bit access * - *--------------------------------------------------*/ -/*! 32 bit access - get */ -#define GET_DATA_FOUR_BYTES(pdata, n) \ - (*((l_uint32 *)(pdata) + (n))) - -/*! 32 bit access - set (0 ... 4294967295) */ -#define SET_DATA_FOUR_BYTES(pdata, n, val) \ - *((l_uint32 *)(pdata) + (n)) = (val) - - -#else - - /*=============================================================*/ - /* Slower: use function calls for all accessors */ - /*=============================================================*/ - -#define GET_DATA_BIT(pdata, n) l_getDataBit(pdata, n) -#define SET_DATA_BIT(pdata, n) l_setDataBit(pdata, n) -#define CLEAR_DATA_BIT(pdata, n) l_clearDataBit(pdata, n) -#define SET_DATA_BIT_VAL(pdata, n, val) l_setDataBitVal(pdata, n, val) - -#define GET_DATA_DIBIT(pdata, n) l_getDataDibit(pdata, n) -#define SET_DATA_DIBIT(pdata, n, val) l_setDataDibit(pdata, n, val) -#define CLEAR_DATA_DIBIT(pdata, n) l_clearDataDibit(pdata, n) - -#define GET_DATA_QBIT(pdata, n) l_getDataQbit(pdata, n) -#define SET_DATA_QBIT(pdata, n, val) l_setDataQbit(pdata, n, val) -#define CLEAR_DATA_QBIT(pdata, n) l_clearDataQbit(pdata, n) - -#define GET_DATA_BYTE(pdata, n) l_getDataByte(pdata, n) -#define SET_DATA_BYTE(pdata, n, val) l_setDataByte(pdata, n, val) - -#define GET_DATA_TWO_BYTES(pdata, n) l_getDataTwoBytes(pdata, n) -#define SET_DATA_TWO_BYTES(pdata, n, val) l_setDataTwoBytes(pdata, n, val) - -#define GET_DATA_FOUR_BYTES(pdata, n) l_getDataFourBytes(pdata, n) -#define SET_DATA_FOUR_BYTES(pdata, n, val) l_setDataFourBytes(pdata, n, val) - -#endif /* USE_INLINE_ACCESSORS */ - - -#endif /* LEPTONICA_ARRAY_ACCESS_H */ diff --git a/WebRtc.NET/include/leptonica/bbuffer.h b/WebRtc.NET/include/leptonica/bbuffer.h deleted file mode 100644 index 945cbb0f..00000000 --- a/WebRtc.NET/include/leptonica/bbuffer.h +++ /dev/null @@ -1,60 +0,0 @@ -/*====================================================================* - - Copyright (C) 2001 Leptonica. All rights reserved. - - - - Redistribution and use in source and binary forms, with or without - - modification, are permitted provided that the following conditions - - are met: - - 1. Redistributions of source code must retain the above copyright - - notice, this list of conditions and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above - - copyright notice, this list of conditions and the following - - disclaimer in the documentation and/or other materials - - provided with the distribution. - - - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - - ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - - LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - - A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL ANY - - CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - - EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - - PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - - PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY - - OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - - NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - - SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - *====================================================================*/ - -#ifndef LEPTONICA_BBUFFER_H -#define LEPTONICA_BBUFFER_H - -/*! - * \file bbuffer.h - * - *
- *      Expandable byte buffer for reading data in from memory and
- *      writing data out to other memory.
- *
- *      This implements a queue of bytes, so data read in is put
- *      on the "back" of the queue (i.e., the end of the byte array)
- *      and data written out is taken from the "front" of the queue
- *      (i.e., from an index marker "nwritten" that is initially set at
- *      the beginning of the array.)  As usual with expandable
- *      arrays, we keep the size of the allocated array and the
- *      number of bytes that have been read into the array.
- *
- *      For implementation details, see bbuffer.c.
- * 
- */ - -/*! Expandable byte buffer for memory read/write operations */ -struct L_ByteBuffer -{ - l_int32 nalloc; /*!< size of allocated byte array */ - l_int32 n; /*!< number of bytes read into to the array */ - l_int32 nwritten; /*!< number of bytes written from the array */ - l_uint8 *array; /*!< byte array */ -}; -typedef struct L_ByteBuffer L_BBUFFER; - - -#endif /* LEPTONICA_BBUFFER_H */ diff --git a/WebRtc.NET/include/leptonica/bilateral.h b/WebRtc.NET/include/leptonica/bilateral.h deleted file mode 100644 index e5b5bbdd..00000000 --- a/WebRtc.NET/include/leptonica/bilateral.h +++ /dev/null @@ -1,136 +0,0 @@ -/*====================================================================* - - Copyright (C) 2001 Leptonica. All rights reserved. - - - - Redistribution and use in source and binary forms, with or without - - modification, are permitted provided that the following conditions - - are met: - - 1. Redistributions of source code must retain the above copyright - - notice, this list of conditions and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above - - copyright notice, this list of conditions and the following - - disclaimer in the documentation and/or other materials - - provided with the distribution. - - - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - - ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - - LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - - A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL ANY - - CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - - EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - - PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - - PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY - - OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - - NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - - SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - *====================================================================*/ - -#ifndef LEPTONICA_BILATERAL_H -#define LEPTONICA_BILATERAL_H - -/*! - * \file bilateral.h - * - *
- *  Contains the following struct
- *      struct L_Bilateral
- *
- *
- *  For a tutorial introduction to bilateral filters, which apply a
- *  gaussian blur to smooth parts of the image while preserving edges, see
- *    http://people.csail.mit.edu/sparis/bf_course/slides/03_definition_bf.pdf
- *
- *  We give an implementation of a bilateral filtering algorithm given in:
- *    "Real-Time O(1) Bilateral Filtering," by Yang, Tan and Ahuja, CVPR 2009
- *  which is at:
- *    http://vision.ai.uiuc.edu/~qyang6/publications/cvpr-09-qingxiong-yang.pdf
- *  This is based on an earlier algorithm by Sylvain Paris and Frédo Durand:
- *    http://people.csail.mit.edu/sparis/publi/2006/eccv/
- *               Paris_06_Fast_Approximation.pdf
- *
- *  The kernel of the filter is a product of a spatial gaussian and a
- *  monotonically decreasing function of the difference in intensity
- *  between the source pixel and the neighboring pixel.  The intensity
- *  part of the filter gives higher influence for pixels with intensities
- *  that are near to the source pixel, and the spatial part of the
- *  filter gives higher weight to pixels that are near the source pixel.
- *  This combination smooths in relatively uniform regions, while
- *  maintaining edges.
- *
- *  The advantage of the appoach of Yang et al is that it is separable,
- *  so the computation time is linear in the gaussian filter size.
- *  Furthermore, it is possible to do much of the computation as a reduced
- *  scale, which gives a good approximation to the full resolution version
- *  but greatly speeds it up.
- *
- *  The bilateral filtered value at x is:
- *
- *            sum[y in N(x)]: spatial(|y - x|) * range(|I(x) - I(y)|) * I(y)
- *    I'(x) = --------------------------------------------------------------
- *            sum[y in N(x)]: spatial(|y - x|) * range(|I(x) - I(y)|)
- *
- *  where I() is the input image, I'() is the filtered image, N(x) is the
- *  set of pixels around x in the filter support, and spatial() and range()
- *  are gaussian functions:
- *          spatial(x) = exp(-x^2 / (2 * s_s^2))
- *          range(x) = exp(-x^2 / (2 * s_r^2))
- *  and s_s and s_r and the standard deviations of the two gaussians.
- *
- *  Yang et al use a separable approximation to this, by defining a set
- *  of related but separable functions J(k,x), that we call Principal
- *  Bilateral Components (PBC):
- *
- *             sum[y in N(x)]: spatial(|y - x|) * range(|k - I(y)|) * I(y)
- *    J(k,x) = -----------------------------------------------------------
- *             sum[y in N(x)]: spatial(|y - x|) * range(|k - I(y)|)
- *
- *  which are computed quickly for a set of n values k[p], p = 0 ... n-1.
- *  Then each output pixel is found using a linear interpolation:
- *
- *    I'(x) = (1 - q) * J(k[p],x) + q * J(k[p+1],x)
- *
- *  where J(k[p],x) and J(k[p+1],x) are PBC for which
- *    k[p] <= I(x) and k[p+1] >= I(x), and
- *    q = (I(x) - k[p]) / (k[p+1] - k[p]).
- *
- *  We can also subsample I(x), create subsampled versions of J(k,x),
- *  which are then interpolated between for I'(x).
- *
- *  We generate 'pixsc', by optionally downscaling the input image
- *  (using area mapping by the factor 'reduction'), and then adding
- *  a mirrored border to avoid boundary cases.  This is then used
- *  to compute 'ncomps' PBCs.
- *
- *  The 'spatial_stdev' is also downscaled by 'reduction'.  The size
- *  of the 'spatial' array is 4 * (reduced 'spatial_stdev') + 1.
- *  The size of the 'range' array is 256.
- * 
- */ - - -/*------------------------------------------------------------------------* - * Bilateral filter * - *------------------------------------------------------------------------*/ - -/*! Bilateral filter */ -struct L_Bilateral -{ - struct Pix *pixs; /*!< clone of source pix */ - struct Pix *pixsc; /*!< downscaled pix with mirrored border */ - l_int32 reduction; /*!< 1, 2 or 4x for intermediates */ - l_float32 spatial_stdev; /*!< stdev of spatial gaussian */ - l_float32 range_stdev; /*!< stdev of range gaussian */ - l_float32 *spatial; /*!< 1D gaussian spatial kernel */ - l_float32 *range; /*!< one-sided gaussian range kernel */ - l_int32 minval; /*!< min value in 8 bpp pix */ - l_int32 maxval; /*!< max value in 8 bpp pix */ - l_int32 ncomps; /*!< number of intermediate results */ - l_int32 *nc; /*!< set of k values (size ncomps) */ - l_int32 *kindex; /*!< mapping from intensity to lower k */ - l_float32 *kfract; /*!< mapping from intensity to fract k */ - struct Pixa *pixac; /*!< intermediate result images (PBC) */ - l_uint32 ***lineset; /*!< lineptrs for pixac */ -}; -typedef struct L_Bilateral L_BILATERAL; - - -#endif /* LEPTONICA_BILATERAL_H */ diff --git a/WebRtc.NET/include/leptonica/bmf.h b/WebRtc.NET/include/leptonica/bmf.h deleted file mode 100644 index 0fdd300f..00000000 --- a/WebRtc.NET/include/leptonica/bmf.h +++ /dev/null @@ -1,63 +0,0 @@ -/*====================================================================* - - Copyright (C) 2001 Leptonica. All rights reserved. - - - - Redistribution and use in source and binary forms, with or without - - modification, are permitted provided that the following conditions - - are met: - - 1. Redistributions of source code must retain the above copyright - - notice, this list of conditions and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above - - copyright notice, this list of conditions and the following - - disclaimer in the documentation and/or other materials - - provided with the distribution. - - - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - - ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - - LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - - A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL ANY - - CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - - EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - - PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - - PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY - - OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - - NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - - SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - *====================================================================*/ - -#ifndef LEPTONICA_BMF_H -#define LEPTONICA_BMF_H - -/*! - * \file bmf.h - * - * Simple data structure to hold bitmap fonts and related data - */ - - /*! Constants for deciding when text block is divided into paragraphs */ -enum { - SPLIT_ON_LEADING_WHITE = 1, /*!< tab or space at beginning of line */ - SPLIT_ON_BLANK_LINE = 2, /*!< newline with optional white space */ - SPLIT_ON_BOTH = 3 /*!< leading white space or newline */ -}; - - -/*! Data structure to hold bitmap fonts and related data */ -struct L_Bmf -{ - struct Pixa *pixa; /*!< pixa of bitmaps for 93 characters */ - l_int32 size; /*!< font size (in points at 300 ppi) */ - char *directory; /*!< directory containing font bitmaps */ - l_int32 baseline1; /*!< baseline offset for ascii 33 - 57 */ - l_int32 baseline2; /*!< baseline offset for ascii 58 - 91 */ - l_int32 baseline3; /*!< baseline offset for ascii 93 - 126 */ - l_int32 lineheight; /*!< max height of line of chars */ - l_int32 kernwidth; /*!< pixel dist between char bitmaps */ - l_int32 spacewidth; /*!< pixel dist between word bitmaps */ - l_int32 vertlinesep; /*!< extra vertical space between text lines */ - l_int32 *fonttab; /*!< table mapping ascii --> font index */ - l_int32 *baselinetab; /*!< table mapping ascii --> baseline offset */ - l_int32 *widthtab; /*!< table mapping ascii --> char width */ -}; -typedef struct L_Bmf L_BMF; - -#endif /* LEPTONICA_BMF_H */ diff --git a/WebRtc.NET/include/leptonica/bmfdata.h b/WebRtc.NET/include/leptonica/bmfdata.h deleted file mode 100644 index ed2dffd3..00000000 --- a/WebRtc.NET/include/leptonica/bmfdata.h +++ /dev/null @@ -1,636 +0,0 @@ -/*====================================================================* - - Copyright (C) 2001 Leptonica. All rights reserved. - - - - Redistribution and use in source and binary forms, with or without - - modification, are permitted provided that the following conditions - - are met: - - 1. Redistributions of source code must retain the above copyright - - notice, this list of conditions and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above - - copyright notice, this list of conditions and the following - - disclaimer in the documentation and/or other materials - - provided with the distribution. - - - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - - ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - - LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - - A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL ANY - - CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - - EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - - PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - - PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY - - OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - - NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - - SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - *====================================================================*/ - -/*! - * \file bmfdata.h - * - *
- *  This file contains data for constructing the bitmap fonts.
- *
- *  The fontdata string holds all 9 sets of bitmap fonts in a base64
- *  encoding of a pixacomp representation of the tiff compressed images.
- *  It was generated by prog/genfonts and pasted in.  This allows
- *  the use of the bitmap fonts for iamge labelling without accessing
- *  stored versions of either the tiff images for each set, or the pixa
- *  of the 95 printable character images that was derived from the tiff image.
- *
- *  In use, to get the bmf for a specific font size, from the encoded
- *  string in this file, call
- *      bmfCreate(NULL, fontsize);
- * 
- */ - -#ifndef LEPTONICA_BMFDATA_H -#define LEPTONICA_BMFDATA_H - -#define NUM_FONTS 9 -static const char *inputfonts[] = {"chars-4.tif", "chars-6.tif", - "chars-8.tif", "chars-10.tif", - "chars-12.tif", "chars-14.tif", - "chars-16.tif", "chars-18.tif", - "chars-20.tif"}; -static const char *outputfonts[] = {"chars-4.pa", "chars-6.pa", - "chars-8.pa", "chars-10.pa", - "chars-12.pa", "chars-14.pa", - "chars-16.pa", "chars-18.pa", - "chars-20.pa"}; -static const l_int32 baselines[NUM_FONTS][3] = {{11, 12, 12}, {18, 18, 18}, - {24, 24, 24}, {30, 30, 30}, - {36, 36, 36}, {42, 42, 42}, - {48, 48, 48}, {54, 54, 54}, - {60, 60, 60}}; - -static const char fontdata_4[] = - "SUkqACYFAAAmoHICP///////////////////////kFcchgc45Bgc45AgcgxBY5DY5DY5Agcg" - "jkM45A8GocgxBA8M45BfCGgchhzOQxZBiNe/CDQRT6RQ+k4QV6BHcgvBBjCC+KoSjQI7wjj/" - "16I+EUPTpV0rI4LilVtAjjyPuR58jg3CRd6dJkcDMCj+v//qlVsMgQPVY6vugih9Lr/8RCF+" - "OqUUK6C/fHFV9RStf8MulG10fKcN6X+lXOBg+GexX71wxSPCf4/+kE0uR5zE0rtfCFg3oIp0" - "R+GF5DSmQaMS/oG1xen0X2wyh8WXwoI46VPt/kNYcf9J4h/pUHB///2H+t+lkCByDj/r9ZBX" - "H1BAtUr7u/IEOQanrS0eByO16tpVaSWtaEVsNiG66WrBgg05wM4bCYNWDCWIiDCER6HGhERE" - "RER3ZHBfXjaSQ7iOP/////////////////////////////////////////////////////+Q" - "JgK95DIDRZAjCDccgRMhn4g5yC9CD0IL+QxhuIfCCYQTC4IJhBiyLBB7J4QX4gvQgxxBehBi" - "yGDkPhdkEw1kPZY5cEHck5BIJOQc9aI+wjE7DL7RdsMu2GXoZehGDYaDCDQaDSCDQdIOGEEX" - "bDLzCLthl5ojzkeL0NMJhNNbVoJ6kclXuggyOGfugnw3vugv/0u+9IN7pBvdJ//brT3VtdLy" - "B4NxyGsOPRnv9R7xx3/9L+EU/3/f4jj/t+3TdDvkFZyC7hYdKkCCKHQI76SW/pD/6XCKdAin" - "29L9L6/9eEUOrD0kv8IIMNKkq/j/zD5h+P4r//99LfBKcDR9utK62NLxEIIhnmGGlpek3Lz/" - "jj5cv/ul7f+EvimH///0l6CENpfrHt/y9l7kr/4RT/f7f+PwRTkG7/tpav26XtrxoVI5/vSx" - "xsP/7ful7fdd1tv/7FRoj//DLgQZgQCFhlYlfv1kx9//28mPx/7ruu3/t9K3pEh/IKzkF3DL" - "g2BENDtBr9Jh4S12H/+3+17GwwltpbZBx0u0unr0v9IMjhrBYYpO0KZmDikMJsYTCDCeE2Gh" - "p6DTdiEE2KCdo8GcNj3pJsJofjiIiIiIiIiI4iIiIiIhhCIiIiIiIr1SMwyQbOkEiGQCvd4i" - "I//////////////////////////////////////////////////////+QVo7IEDkGwchpOQV" - "nIa0ENKCGhyC7kHchocgZschnHIMPtKk7oIP7ulv6f9Yj5DIDaH/3gjjr///+rI4aiIEXngg" - "RZBfCBEWQXsofKggu5DD5Y+Qw5UHghiCoIEYQw5VkCMIO5TkF7shhzOQxZ4IJZxy3IO5nIJZ" - "4IP//1iiPOGd0R+iPQgR3TQIIXZ3/S7BBnezui87MOiPbKHRHqftNNXvTTUjy/9JkcFjTpOk" - "9NsKmFTu+Etppw06VtMjhhO0OLCd3S+rSdIUvyDD+Iha8fQ//+K//3/+D/vbQRT7d9LsjhgI" - "7nH8Ivf/lw0bS/4RT////7f//pfq+lhr6/v/Yf/t//3/+D/sO2NNhpfiP66Xat8L/2//3S0r" - "XIMD/rvUEd9Isf/4Mp5wCDgYBlOzgO0fB3aem2mmnYTtipwCAZQ6DnAXDgynapwk20h/+IiI" - "iIy9ERxEREREZHDLiIiIiIjjj6kNWdP//qP/pMjhq8bSXwojsGkEwmliIiP/////////////" - "/////////////////////////wAQAQ4AAAEDAAEAAACSAwAAAQEDAAEAAAA2AgAAAgEDAAEA" - "AAABAAAAAwEDAAEAAAAEAAAABgEDAAEAAAABAAAAEQEEAAEAAAAIAAAAEgEDAAEAAAABAAAA" - "FQEDAAEAAAABAAAAFgEDAAEAAAA2AgAAFwEEAAEAAAAeBQAAGgEFAAEAAADUBQAAGwEFAAEA" - "AADcBQAAHAEDAAEAAAABAAAAKAEDAAEAAAACAAAAAAAAAAAAwBIAAAQAAADAEgAABAA="; - -static const char fontdata_6[] = - "SUkqAMoGAAAmoHVf///////////////////////////////IZAUfsgeBdyGdyDjkMgI+QPKC" - "GIO5AhzOgyGiCMcgYtUrIKHohowhschs4hnwgXcgRQhsgguQQXwhov6/QYQI7qgRUUk2QIfV" - "F5hQmmugqCMTCBHj/9F8j9JuknWm7rSbCBFPLtou2sjhlBSOKkE3Qf3+kv9fpcMQaXY9PTwR" - "T6WvpX/0v19aVbeQ0D6X7+v/X//QIQfj6xSS4QLS3xx69IVtL/EQy8CvbSqhq4I7//pJeVnT" - "Dr/+Niloufj9fpJLxalYrDtdr2DGk/etf6CDrkduzQkw21/w2prRfYZcNbj1+kQMQuL03hF5" - "sQRT+CEMMj7pAjuk/5DVDINfr+k9b06Stj+GXgW6pN9/kNsdL/XQg/+nSx/0v20vxSv0v/S3" - "/yDA/19sV/6WkQ0D5DY/6+lkDyf/SX9h65BRBDTdJ/StLILuk2lWkl399U2kw0Thpa0r7S0U" - "A7S20rSVtJL/iGrFMSPJv+qYoEaA+KBA4pikmKCWIiDVCINaQ0KiIiIiIoFhoRfSodbS1xbp" - "Id0hx8f///////////////////////////////////////////////////IHMFnMgTA0hyGQ" - "G45DLcg0jkQfyGQDNxBv5DLcg3QQ2EEHDIEaEHDIaDkMTJzIeZBJkEmTwh5kNmEPhB7ITCGi" - "ZDOghsmQ0IIbJhHUEMzPAh8jYOeIuRsEZFHCZEHBDhdoww1DLm0bOGXGwZccGXHCMDgwQMED" - "BAwQMEi4ZwQdAg2GEEbYYZc2EbYYZcwwjB5dmDgwQMIMJoNbQNqHuRxF6I7YQIN+6BBrDf+E" - "E//pf3oEG9tAg3vC9//126bQWlXh0gyODd+l7fXwv/0u1gio0m90m916x9uu60nXXyB4G7kN" - "tx6JwU9oEU/4944qP/pcEU8EU+37f7f4j/q6q2tpDXhYaShBBDer1XfJD5IdL/0vtf9L9L//" - "ergin9JukvIHk5BiAggw+kn1fSr///9L3r2/fS30of9r1exWqXp4QQYaWl9XH/a2vH+l9/t/" - "6X58mgN//r07dJe04QRDYGGGgvpVeXb/jj5gT8X7r7f+CX6CDD/bp6bXY/xEIIQw16Xq8N/y" - "5ZcvT/Lp/de3/j+2QMd/r/p0l6CDdf0h73//ZF7/w37r99/fuD/vVq9SP3S9hpd+lLj/6444" - "a/9v7r39L0tt/7Xq9b0vDDIbAwQQu2ElKHq/fr3f/2/dfb39/b/V6jjSb1Io/hhiEFbEECFK" - "r/euRR+//28ivxXt913XZBcf/jaevr8geTkCHDDCCIF3bEk9XpN6X7f/7f7+xtpbaW+l2l9K" - "3pfpqGGEErBhJfCTBk4wl+wf/7f9fsMJba7cMJbDSa9JvSX2sPCwxCQYQaFBikIQQwQMMYIG" - "CBggeCBsNCgg3CBhBuGKBA2KBA24hAgbFdOlYIGh+NCIiIiIiIiI4iIiIhxEGCERERERER9L" - "GHfVBF0Tgtg0dSBoDTYk+h40PiP/////////////////////////////////////////////" - "//////5A887IHkOQbLIE8EFaCGvBBmsgosgaDcg3HIbHwaIbIvVVIZTkGHVUtv9IOHRHBU+D" - "g5DJBx//QRTr69fr/+3X+I+v/pa//v/9N0Q2XnshsshsjIaMyGjMhlOQIHycZAhyDUOQy+IZ" - "xzWQUWUOQYc7kGMyGdyTkH41kH4scnZB4JwQxhrIYp/64hF56DCLzBF4aLzQNF8+DyuCguuF" - "Kw/ApXIvMFTCI7FhU0XmgYUL/ap0tow3/6TdN2XCTpB0rVJqJHmHD6BYbNhoDEjzSbDDLhJo" - "NnHSdQ4cMJoMJQ0DpBphVC//x9v/ScMEkwqf9Lpp6dJum18cQwX3V9XXWv/pN9OkKX/9f6X1" - "1/TpdX+6umrDdRSS2yBGFv4iQZu/9D//4r//f/58CP3XI/p7pL9F9peEYv/zAF8NL/hFP///" - "/t/utrrutN6SQYr0F//7Ff+3////g3/11dJ+l+I/+ld7ey4KP+3//fpX5DOOD/3sb8j+6X/9" - "en1+v/b//dLr//Vuo0rY0ib//aphKGYdtAinbLfROC//Yf/8NKGEmwvaUOwvtK3SX/7DPcUG" - "NjhsUEHhBwwg8JuEGEGEHDCDhhiopiCKcIOKeJHTd8JNuh/+IiIiIsubERxEREREZcNKIiIi" - "IiNDj+En/X/IbQdf/+Cj/9Npd6SXq3WLDSrwSEdigkEGCDrEREf/////////////////////" - "///////4AIAIAA4AAAEDAAEAAABBBAAAAQEDAAEAAAA6AgAAAgEDAAEAAAABAAAAAwEDAAEA" - "AAAEAAAABgEDAAEAAAABAAAAEQEEAAEAAAAIAAAAEgEDAAEAAAABAAAAFQEDAAEAAAABAAAA" - "FgEDAAEAAAA6AgAAFwEEAAEAAADBBgAAGgEFAAEAAAB4BwAAGwEFAAEAAACABwAAHAEDAAEA" - "AAABAAAAKAEDAAEAAAACAAAAAAAAAAAAwBIAAAQAAADAEgAABAA="; - -static const char fontdata_8[] = - "SUkqALIIAAAmoHcGf/////////////////////////////////kMgMsfUgeDaOQLjkHHIZAN" - "T5A8K5AiDQQ0OW7kMqCEHIZthNJkcMwuGQG8g34gYcgo8go4hmwQIDIGIIL1EGOIKO1/wRmG" - "cvBqEX3S3dBGJhUwmlQSpGINF2/9cIxkfa9U+k2Q2OlpNgqaNzWwgWk2k33Veluk2q6STadJ" - "U2jHlzcJtZcGlS4RJOt9f9f9L62GMw+vC0np5HXS/0n/6Vf9dapwxpdj7rr6Wl/f//v9dJLa" - "kG76X/XXpf//v/j62kl4I2i4ZVd8caX8UrS/xEgvV7aVMUP19f615+S7/6BmGXBh70tK21ev" - "60lxefkmGla/8WxVZM9Y31/RDYOEl5uappMV/1sGKhNfYX/1EOuEHiR57DbXfUMOieIxwZgN" - "vjpfrI7a9XQdJF9sSOv+QL+qLzSt//9IW6x6tUg21+Q2qpHnS3Tf5BtTkNSi/06710rYpeDM" - "MuBi6pNq3+QZX6/S0J8DHdUn8f+v3S/Fb9L/63r8hnH9f26/rS0sgXj9fXpV+vuP9X9Igofy" - "DD1el6WQPCR/pL+w7XIZUEGx660nS3V0vSrv/qm0m2UBr61T7S0dAd13XSTdBL+r0l6YYX+t" - "JtK1hhK7CTDCSthJLpeIpIMUGJHaf9rYohsQsQiBhDEIMQtiECCxESCjKESKPdDQqIiIiIig" - "sGhF1Wh16pfbSSrFtKh3odkcHWI/////////////////////////////////////////////" - "////5A7AyfkDqG265DJBRxDKmQanIZWpDKDIOnIaBhB05BQGQwgkcgiCCIIIglxBEEG/kGPI" - "J5DzIN6EG+pDKoQ2akDFCGBBBDkdCCUI5kE8iuRfIPxCwCZBHIYGMFhMI2w8M42COFBnCDIN" - "7JWQz2SsEcKQzwDBENEENkENkQRDRANwQNgwQRthhnDYRthgzZhhGG5cjZQYIGXDOCBhNYYW" - "k2rMBNcu2ECBhptBtAgdoGHQPQdFwTv+l6T4QIGG0Gwi4UOg2gg0777dNXg2gg9Qq+m0g37p" - "eG/8Jf/pd96Cb7Sb9f//1pvbS0vV0rT9L3/0v/0vWCKjV91fdJ//dK/0n1Xx6eXX0vvHGv/0" - "uXTkde9Jv0m//6+/T20rSevIZCggrxpErPFpX+O36j/6C/X2//7/Ecf95dUnSdIUvCsNLCCC" - "I6vvpL+RR8ij//pe3++lfpev+2l1ffdJeQPCOQ0OEEw9Un6+q3/0v/S/S9v/S/q//tfYp1S9" - "NMIIMNKkq1uwS////0vb/b9+t9KZg0fdL3Wm0v/CCDBpdfvF/wwsMLx/pfpff+Evz+ygMr9+" - "ldPdJe00EEQbpww0tV0rmDf8cfNhfxD9/2/8/foEw//f/Y0vEQQQgw6+l3wb/mB5gfoP8wn9" - "pe/+P4bBv90vfvS9Ag2l10lff++//7fv+3/3+Qau/vtK0kXTaX6bq9ePe9L/shZ/+39pfff/" - "th/3S9/+vhhL/SkcJ//HHBr/2/f9v0vS23/vdL0m9LwwwgmRwb20R1SW/f/d//b+0vff2/b/" - "3r70m9LwwyDdOEENsHpHH3+9LIUfv/9vIUff9vuvryGcf9dY2KX1IUfwYMQgnFik0r1b0v2/" - "/2++K+9tLbXbuu+Oum9L8geEchogMMEEQzXbFBb9N6Wvf/7f7+xvX1t6+k0+k/X6ahhhAk2G" - "kt6TZDj4S/b//b0v92GEttLb0tgwvTS3pL/QbQWGDBL7CQYMFTCVhbDBrffbaYW2r3YYSthh" - "K7gwguKr0m9Jfaw8JoMQgQYIMIQgxCQhAhkHQGIRBhBI5BEZBhAYaGCB4IGQSmGIRBugMQiG" - "hDDiiCg4YT+EoZDOhD8aERERERERERxERERDiIMIRERERERH1xb+qQfpJBF2UAZhn9EDUFTK" - "B7xoQYSB7Qjj/////////////////////////////////////////////////kDxf7IHgQOQ" - "VbIH1kCSyCrZA8cEMyCBqHcgYcgYfIHh7IF4TChVCkM1yGhwoVe+loHBwi8gdNMOHS2/tL6H" - "/yGSCkP/6BFOvrtNeE//Sv9cR+v/p1////W6////p1zZkNnZAv2bCDcchsHyLGQ2DmwnZAuO" - "bCBfiBcc3EGochoHNBAjsg3HIQcguOSHLHLHIJMm5LiC7kMocmOWOWOQXciv/62JDZPQZBv5" - "DYhF5z4Zy8yr0yDGEGM1yDGJoMgxyYRiDIEYmQboIYxNF2HPg8lkaH6hMjhDjQ//p0Xb0XmE" - "YmEYcJNhNJj0Xn+gtUXqL3ReaQbVF5ou1qk4TVQwgYQYWDCDoIMIMKXH/9bSbig6CDoIOlyO" - "jAbFVthw+gsG4qwbbSsGKDYQQcMSPJRSBwd6dPbSfpL/6f6tdXqx1YVf6XTCevem168GYDR9" - "fSutLS/9WxeuqrV/9/wl/7pXXXQ/91p7pXjSW5DRhFH+sLuor///6C//33X4P91bl1pjdJKt" - "hovBr4iQPKn/x/X/F////7NAz/v0tavW9aYaXhG3/+YDM2l/zCf///+3+9e3TvSTeglDFegv" - "//bS/9v//+vw3/q3Wt6pf0PpfV3+xX/t//3635DNv9utb0R9t1X4/+vreyOGZ/2//+uvyGx3" - "/16elvVIjH//Xp3/X/2//3X3//WKjjSeNb/+10rtWyMfX/2//7q0rX6u1d2kraSr/3RdYaTD" - "LdsIv2GvJAZ/+w//2GErCCbCLr2EoNiR161b0l/9g0HI6FBimKg2KCB2CBwwQPBA2wQMEDBA" - "4MEDhhiFFBisETgwITTCg2vCTDaQ//ERERERZg2IjiIiIiIzAa8REREREccfwgg/9f6X+v+Q" - "ZK///0x/+m0sF0q9W0sW6XyGSGkOkI7YSr4rYhAkEGCDrFhCI4//////////////////////" - "///////////8AEAEDgAAAQMAAQAAAP8EAAABAQMAAQAAAFUCAAACAQMAAQAAAAEAAAADAQMA" - "AQAAAAQAAAAGAQMAAQAAAAEAAAARAQQAAQAAAAgAAAASAQMAAQAAAAEAAAAVAQMAAQAAAAEA" - "AAAWAQMAAQAAAFUCAAAXAQQAAQAAAKoIAAAaAQUAAQAAAGAJAAAbAQUAAQAAAGgJAAAcAQMA" - "AQAAAAEAAAAoAQMAAQAAAAIAAAAAAAAAAADAEgAABAAAAMASAAAEAA=="; - -static const char fontdata_10[] = - "SUkqAGwKAAAmoFQGz///////////////////////////5DIBocgZg0PkDwy3JvkFdyB4Qchl" - "DkGB7yB5OnZBQ5J8hmckQ0rBNUyDSOkQWnIZXkMqZBrghs0INDkM/kdkDfsLqqhGYKDEHp0k" - "G0HkFEwoQaaqCcWQzzCMMPXfwg0m0gi89KyCgekkYmCpppYQKgjc0m//0Yy8/16VtP0EGwqN" - "to22ugtBBtJv2vpLdJtJJ1SbTpJKwjnoOgg2swGmFLgiStb3+lXf/69v1bYLpuuR1pLVX//X" - "r/S60mwYorKXH/dfS69J/2vX/9UvYyGU699PXXpa/3//4+l1S2EcXqvXHX1qr/8RIMCP17SS" - "pwggnqvj1XpClpf1+3SWlS2l/v6S+btbr/IKbknv62KH2Fel/VJeEGlTDS/1W9tJKiGL8f/1" - "Sri83qxVr/sQ2K1JBpXel/RAuOFXm29On//YMUk/dhf+qEOuEHQtWG2v+w9GEwZuXj1/Uuw1" - "6bnzaSDtF1/wbSI+Sdx/X9IQ6WPCb0YbYr38MvvCMTVv8gqlyGsR/pX/ukkHaS8gqiMOkk2l" - "f/pfpOlvXSTYa/9/b2/yBO9f9cTQMzuu4/RBSgnHpJe2l+KX6Wv6ST1j//7f/2lpdf/pfkM8" - "el+xVr0/pEMofIZV16+v//9tda/pdZAh1vS+sge4/0kv3fyGbBBVeutK126dLtJLuq+ttJuH" - "+FTV/SOR19dJPSWqr6SX2gyx+ur7S0LbS20n/oJf8PS20mwjeNtf0noINYMJBBwwk2kk2kEF" - "texFJBiExCYXXTWwwkCBrEIEDimGEErDCQILERBgsQwgafFRSDEIRDCEMIMUIYhQWQyAaHER" - "bSrERER/0q90tfukqxbWh3odtLbSxH//////////////////////////////////////////" - "////yBTDMpkFsFhyB4YOQyAboILYFByB4hyB4vkMgCIK4iOQsFWQ07IZxyBEeQyQ1PINNLIZ" - "icEDIMeWcgoBkFy4IGQIIIoZByCDhkHIInkMEEDFCGyhBJkFzggyDcYCDINxgQMgwoIIGRDk" - "EIIp0O0MhjrIPyZDCj0GCD4aOEHEN3CPDDaDTQaapp6bwjxByc2EeIOTmGEcbw1TTT7ppJ1U" - "4B46aPGGmQabJeECIJZDPZEmDNhIM2JQIHBggwQMEDBAwSBAwQNo4DdkCHQIGyCiw2gQNkFF" - "htBB5cZwWGCIMOGCBhBglBggdBA6U2Ca5c2EbDvwbSayCZh8Ogg+/6C329JvbSb3SD777/q3" - "TdQq9INoIN/oL2/9J//S7W9IN9pBvv//tJ720m0tL/SbT3X2/9L/9L+XXSvdK90v//1p0nrS" - "+npuXX0vb66X/9Ll0176b/b///eu++1/yGQxyBwOOk63+++ONV/6X8uu3r+l/iOP2t6uk9Cl" - "4WHqR8e7r6SH/Uf/S+19v3/f/96dGF7q0kvCw0qCBAn6vpff//pe9e39/3pX/a9XTaTql5A9" - "wQ2QEmHWgmKer6X8iPkR1/9L7X30vSS///991bpL1TCCDBpKv76Vb/9f+l719+/W+lD/erXW" - "K0v7wggw0qS9K4YIL////QX3+3/pfpMoBq/a9XTTapfWCCIFy4MNL694g/44+P9fdL2/8Jfn" - "mzoGZ96dX+6S92ggsMNLS9bmyD///i/v9v/P/6BMP+/r22KS8RCBCGGl+teDf84POD82DH79" - "1//5HDL+Gw3+6/a/XhBBhpddK+/9PT//N7/r2/8b9yGpT/q1ek2l9BBuvS6vu9f+yDuRj/+3" - "9r7ff/2D/2r16MLpfT9+kh7/X/xf/t+9e39fW2/71q2qV6XsML+qV//jjkCM/9h/a+36+u2/" - "/9dU3peGDCCbdtalw/2/93/9v3r/f2/b/20r71frwwyGWXBBVbaL8JK/+l9//t/a+33X1//7" - "G+levhh4QIXYqKNFX7fWQR9v/9vIO+9e3uu2ltkND/rHUaTekQw/hhiEE2IpK+l6///7elx+" - "33X+313TXX6X5A9uQUQGGEEQa4tKr9vS/b//b/a9jbS20tvX16dJvS/TChgwgk2Gkr6TDILj" - "4S/Yf/7f/+2ltpfdbaX6Tfr90GwgtsJd4JNhcEtLb//b/r3YaWw0tu0uDBJp9fSX/B4WGeNB" - "NNCEGZkghCCGEGGZlCDCDCDwg2GhhN0GE3YYJBBsMEEEGw4YJBBsV00kw0Gh+1QeE0xCCDBB" - "hBMQkCChBsQggwQYQeEG2FBA8IGCBuGIQQYYoINuIQINr8JWCBr4qIiDCERBhCIgygDw1IiI" - "tCLhghBghEGEIMJrxER+hEaERDiIiPpaB/0g/SIGwCcdJFzOgGgr6jEGvGgamgH2EL4j////" - "//////////////////////////////////////////+QP6EDob+QPBoHIElkDw9kCyyBJBA8" - "F7INVkDYDEZDLjyGVCZBXmCqQZPIaUENEAoKlt5A8sTSfV00/S2/6BwdF3D+Dg//pr6Q/+QW" - "wbj//MKvrtNeC/9JN1/iP//+vr//+k3////9r///+k9ZeECzPy+IZY5BuP5AuOXhHhDKHL4g" - "tOXxBowscg3HLjIGByHHIG9CMci+Qzv/+3BEMyeEGQMUCGQLzyBimgwUgRmRewVNBgqDIZXg" - "qYQsFTIEUyGzAUgucuippgmRLIOcuhDFX/pYhPTChGHCNzROBBuKAXpgoLoLBU0wVMIwwwVN" - "Fzgqow2icEgoYIGCDBYMK0EGEDClxP/7YRtvl20YOgg6CDYVBNaMXfQXovNGK6MUIJt0XbCT" - "WqCDhX336B6apJL/0ug3bpB0nSsGbDZZsNghBsHB9BYNhiE2GIQbSbBsNoJwYkergzYN4P1p" - "9pXXX/q3vTaWrr6V1/pf9at02vTX/t7fTaT+l/9Y/rr0370/6XTT0/fr44/6WnuukKpdkFFk" - "K/pN+9DWv//6C//S/rq/7+XVJum9Kt0DXxEF9V///9f/991+ZgY+6Tf8VrQSww0YwaXkDwOE" - "f/H3X/H////sH/+k2k1dJN6SQYrwjj//Ng1dL/m0////9h/t1/tvpN6SQa9Av//ev/b////w" - "3/rpN6ekrelQ+v//sMJf+3///X4N/3t+lt6X4+l6V33hiF/7f/9+t+D/ulr6L70q////+XBp" - "/7f//XX5BQO/9/TdJNvpER//16d1fS/9v/919//1emONK71r//0rtb1/9h//3Wla/XrHWrxS" - "S//YRdbpsijtourZFfT/9v/9+0E2vrZ3hourW0k26X/7aWgwgmGFYaVsMJJzWBDtPTYaaYTt" - "O20oaTYRhUGnUUxV76V0kF/9ioOXQpigxUNiggbYQOGEDwg3CBggwg4MIHDYaCimIWEHDCCa" - "ah9OrDeP/2ENBoNMIQwhbERxkcMgYqbQTCxDEJpoX8RocfxEREUYE4jiOIiIj/2En/r/IG5d" - "J/1/////H69JtLIH9NJf3S6uq9ISh0CxdL8gt46iO2kl6FbYSCQIMIHWGISCTCbWIiI/////" - "/////////////////////////wAQAQ4AAAEDAAEAAACoBQAAAQEDAAEAAABCAgAAAgEDAAEA" - "AAABAAAAAwEDAAEAAAAEAAAABgEDAAEAAAABAAAAEQEEAAEAAAAIAAAAEgEDAAEAAAABAAAA" - "FQEDAAEAAAABAAAAFgEDAAEAAABCAgAAFwEEAAEAAABkCgAAGgEFAAEAAAAaCwAAGwEFAAEA" - "AAAiCwAAHAEDAAEAAAABAAAAKAEDAAEAAAACAAAAAAAAAAAAwBIAAAQAAADAEgAABAA="; - -static const char fontdata_12[] = - "SUkqAFAMAAAmoFsNP/////////////////////////////////kMgNpyBoLGQPBocjfIEkED" - "wU3ILjrkDxwmnkGmKIa+ENfFshpj0Qy5kNIcg0UIHhxyCjCLhDSHIa9kG8yGZPCqpAvBK4YR" - "oCU0km4PTChBkMqgJxhMhnCBBhB6u/QIoBubbpPSb0gjbYKmEH4S0bNo43/rhBpNqjHpKyBh" - "/SDYVNNLCBUkG0EG//0Yi7fdJOqt3S02CzjaPNroLSdJv6qtLDS2qT1TaaVLo5UEDwQb5gGx" - "TAYXdf/ql9PS+t3rVwurp0XXS6SdW+v9f9fpJwxRcUrj7/9JUv/7v1X/Wkl2DGv9aTpel16X" - "v66/6/pbkMyK79/S+tf2///H6tJLbBHv6/4/66Vpf4iQYUfqulXhAioHSrx6S9If//9uq0kk" - "tL/f0v9K0v/v62KHbq9f60vNNdhpX+QJ4JXe6pV7X1+qSXhB0kw0tf6Ye2l0RNFxb1/oEF8W" - "pf0xC/14gwxCSTXv6/yBiiXON4Qattr/sGOmtcL/0oNeEDappMO1+thpIxyIRuOl+kjDdcJ4" - "lzemwwjC/4byL6TbNgp//6ENpY3CDpBG5sV/qQaCEgjc0rfyDKTIbWiX6T+9WqCDbVbkGRRL" - "t6Tav/1/pWl9PShsNL14dJK6b/1X9LXLHf1Scf//bVv8gtRVfpPEX71vXRAnslG6SX2l+K39" - "a/qlrjX/+3/1paX/pb1+Qbj+l+2la/+lkM26/9L1T/+26/Sf1IZg9f6X//0l+xT1/6VrkNDp" - "N0vSWQPOOvX+2/yGlBBkdetLr/WrVLTX+km0m2H+Cp1a6RB3b+0n1eku/9L+0DLHtLpNXrQu" - "0t6tKrUJfXD0knpgwQt/+rSTW0EnYSbpW0kF/weEtsJMTcF/Tqw0iBepYYSIZurDCTDCSsMJ" - "BLa1DEQkgxCYQa0taoMV8QriExVMQiCjsREGFiGEGm8aHaEQYQsIMIQwoWQyA2nER6pIRERH" - "3Vf26pf0kq9v1xbSSHdKFtpDt11WI///////////////////////////////////////////" - "/kC0GD5AzAxBA8DCCGQCoQQMw0yCB4EEEDwYoQyA1YNxDuQ8Hwg2YQ24vIZILHkNQ+QaS4IG" - "QzqyGWkILkwQMhs1ITUg+pB9SD6kJQhjUhmHIGDkMUIZyAgyBgGEGQMBAgZDPQhaEEqIQggm" - "hCoQ1QyBFqQX5MgwGQl1hBgg7hhHyBw/CPkD///vCPEHDCPEHDRxhx/r+CeE6i5wDwxTCPkG" - "pDSmT9GwSQ0TIzkMuZF8homR+EcB2Q2eQI8g38g38g3+cBQfDUaPgoZDZYQIGGQMTJTCBAwy" - "BiZKaBA+QI4hnsGfAgEDBWQe00CbWvRttGwR7CDYQQdhEE9hA0wgaQQdpppppBNPTtIINsIN" - "oINsINpPLhDgmmnaaVyGzkgepgCPwg2EEGHe2k+GHvuk//pdrek3uk3uk//6/t02lSX7aTa+" - "l4f/Sf/0v70m9tJvbX/967SbV60vS0nvdL2/9Kv/S9b0n9J//3+9td0m0tL90m5dfX2/9L/9" - "Ll0+XT9vfb3Sr/3S/ur9J8erX9L7xxX/9L+XXb1/X/f6/+6dJ0q/IZAdyBY+pCQ9X+O/0P/o" - "L7X36v6v8Rx+/RhVbW0hS8LD6BBny1fpL/X/0vevb1f1f/90r/un0vCw0lRyddXr9//+l9r9" - "/f96V/3ule6TaSXkDzggogJMHVIJjdX6/yFfIV//0vf9vS9JL//dL3Suuv00wggw1Vf7wku/" - "+l/6X2l7f//pQ//691bVL1sEEGGlpVpeEFX///6Xv+/vpb6TB/36t7FaSX+EEDDqkv3iv//h" - "hf0vtL2/9L8IKdQ0/uk39U3SXvhBEMomGGgv+rg/44+P9ff+/8JfnOynBp/f1q+qXtMIIFhh" - "paXq84Qf//8X9pe3/nP/BBv961b7Yr8RCCww0vSXvITv58efH5wNH79/2/9hfuG/9ev3S8II" - "QwaX9Je3/CDwg//zif2l7/4/tkNQP9vbXpPS8IINpdfvvf///7fv+339/kNqf+l7a20l8IN1" - "fpJX36/9kGCP/Df6Xt//7Yf+/r0Y//v+lx7/X/3/7f3/fpeltv+9at0lel8MEt/ST9/33chs" - "//2/evb39/b/9f1pvS8MMIJvbRHWpgMfv8cbD/+39r79/f7/t02l6vpeGGQaSYQT3YXX/9L/" - "/9v3r2/r62//X29K9Lww8IIXYrCR4Sv2/9v/9h5Bgftfb3XbXbINx/1/rpX8gw/hg8IKwwmI" - "S76V6WQXf//29divvuvrbuu9uo46vS/DDEIJsWkkr9vS12//2//29tLbrtV+o3dJvS/IHnBA" - "vYMMEEQ04bFLfpvS62//2/39jettLfrdWqpX0v0woYYQSbaS3pNkM4+l+3/+3/Xu2l2lt69p" - "fpXr+tBhhArbCVPhJhhcJft//t67+7DS20tu62GvT030v+G0FsMJLagkygWmRaYLsNdf21BV" - "q12GEsMMJd2EtgwSafX0gv9B4WGfMIEUAgNCgxSEIhlkyC+oZoOQY0IXQhjXIZ9GDQyGEOCI" - "YYKAIsGCRAvoydogX0YcGEiGXoxX0CTBkC+iH7Sh4TQYhJqgQYSBLhiCu/t1vTtwxCsMQrbY" - "hWwunSbv8aERDCERBghEQZIA8GWIiNCLhghBghEGCEGF+IiP0IjQiJA8C+CIiK64QP6pB+kk" - "gf+i4zUBoDN0iBKb0INfCigak4HhI0QMw1IvYQjj////////////////////////////////" - "////////////kD9BA6hrjkM2CGYP5DIDUggeBiyB9hBYsgeGVBDVggbQ2ZiVHkGiCB4rkDfy" - "B4bJqQN5kNdyCiCBEyDVNBbeQPHyqqqqaf/e6aRBYsgeBfEXcgUYnZDRZDUtLb/90hf//9NL" - "1/8gtgsP/8xtfS2mvBf/X/8R//6ptfX+v/Xr///+m1////V////9K0iGb/kMz8g0fkD4fyB4" - "ZxyG3MhmjkDwUp5DMHIYHIHgTj//uwQTycyDTMhl0wnhPLmQy4BcheyBeC5kfgpcwQYKXMg1" - "0M5DZBPAg8FBSBBBM5DCCK5EoQx5C4QcgmcguI/9KxT0wQYQ0bmiQGgwyGBFMhsmQInpZDPN" - "NBkNk00cYZAiaDCGQXmFRttEgHkWbuune7//7hGDeEGEbOEbOEEGwqQfT10C9NNU0EG1QYRs" - "uqQcL4YIGCBgkyFsG0CDBAwUwFX/pXQfRt0EGggg6V6TWjDZBRZDZmlkFFow2jDkFGIw2k5D" - "RiMG0EGiGy1p1Bwd6fp0n6S/+n24hBtXSDpNgzYF84CgQg3voLiEGIQbYhBtJtiEDaTxLuuQ" - "0W76991paX/rdPCdLp/0un/S6rp+6dLhP//WtNq36//TY+366X71/pdNPWr02vjtft72rpdV" - "SXZAxhBx/X66f9v/f8Jf+9X/1Y/62i602lqKXug0/pv9RS1///QX/6/pfD/br3WKbpJBbaDS" - "8RIHgYPv/DC//+v//7/ygDH/dbprVIJYbRuBhLwRmv/x9pf8X//v/7B/6V17vShh4QVBj8I8" - "f/4L6/5tP////Yf7fq2vfTeqQa9Av/5wNS2l/7f///+G/9J66vVK9KgYXpf/+w0v/b///r8G" - "/2+9+26Sf8fX6u/2K/9v/+/W/Iav/6WlaSL71S/H69f7wwv/b//66/D///pb0v//16vouGp/" - "2//3X/yGU7+rdOrGrd9EKP/+vttr6/+3//daTf/36xVJNukkv/66Xe3pf+3///Wv16sfpXGl" - "//aLraTbYRhYZCPp/+3/+2laTYX1u0XWmnV9L/+wl3CbIjsMJbDCXIwG//Yf/7aVoKGEbXus" - "zthLfqm2kl/9iFMwXBhJhhJiFMwzjIMEWQYRBkMEZBghhkEIIYIMRMwwDg2GlDCTELIMaQwS" - "ioqZgY7glB6H/7XL4pimlYVtp3fbV3dp2xCimF6EJ2uq92v/2hoMIMINCGEIbERxDBCIiIhh" - "TeEGsQwmgwhd6EccfsREREIwE4jiOIiIjX+Egf//1f9f8gVq6/6////S1H0vSb8gfo0v90vu" - "v0m4WLrXkFsGsdRHtJL7S2GCCr4rDFEDwUYQyQ0yCCqGlhgqXaxERH//////////////////" - "/////////////////////4AIAIAOAAABAwABAAAAYwYAAAEBAwABAAAAeAIAAAIBAwABAAAA" - "AQAAAAMBAwABAAAABAAAAAYBAwABAAAAAQAAABEBBAABAAAACAAAABIBAwABAAAAAQAAABUB" - "AwABAAAAAQAAABYBAwABAAAAeAIAABcBBAABAAAASAwAABoBBQABAAAA/gwAABsBBQABAAAA" - "Bg0AABwBAwABAAAAAQAAACgBAwABAAAAAgAAAAAAAAAAAMASAAAEAAAAwBIAAAQA"; - -static const char fontdata_14[] = - "SUkqAKINAAAmoCAz/////////////////////////yGQBw/kMgGYcgw5DJBpvIHg1wR3kCuC" - "B4NFhbrIHiwnZAxZFjIafUQ2+BJJshrRkGnyGtBBqmQ05kNqyBcQQ1YINyZBRMhpfhf1CMwz" - "S5hqg9W4aggwoIGCDCWC4QYIPXrwR1BQm6Wkm6pGzYKmn2EFQRsgwjhB/9UjeXg0m1RifVkM" - "t1VBNhUGE1pAtBBtBN//hBYdboJOkk2nVJNgj3R4s8b8JUk6TftfpYfdafV09VbQXCDcEHWX" - "BWCmAIraTf/9eldL0ld1VcLp6bRddKkqff91Vf9fXbDeqtwum0v9L11v/+v+uqSwxR+rx/3S" - "9LS+vfqtf9da7DHr+/pel/79f1/9dKr5Boha9Lr/9L1/a/8fXSqsI/ev/HS9Kkrrv/IZ0n9V" - "aSXYIEU467ePX6j2v+I/tqulSulfX+qX0ldf/e9U6Q9wr1X6pfJ+u2l/kFqyO/tJYr2vr/qv" - "BA9JhpX/XeG0qqtq9f1SS9NIl3DS1/pg8MQlyJWuP/9JfF4QaTFN//EMaVd36/SIZrhNLnCe" - "EGob1/2U4bUJ/cLX/iDXQQb06Ydr0uw6RvZCaePX6V106EwdK2GF38NqQnJOzgE/1/SkcbS2" - "nhBtQjc2JfX6kGrSgjDDW3/r+hDfi3CekEG2v62XmoQTdN/kDgCIKtS/pOl+2qQba/IHCTD0" - "rat//X6Ta/XSuGEl/htaur/0v9et91SbH/+l1evIH0a/pOhJAaf0t/ogtWRY3Wm9v/GutLX/" - "S0sdfpfbS/X9L/0t/r9L9v/pv63r19L8gXH//tL9ddKiDVn9fX19JfbFPXXWkQan+npekv//" - "99df0tLIbHW+vXIHjj11S6bf8hrWQJHp/Sb/rVfS01/rddu/BUH2lpaW2k9JNpJa63pJX3D6" - "6TX9IoZddrf+gvrvS3psIMk7/9N1odpbpOkraQS/70km0mGEcxWvWrpJqwwknDCCbSStJL+o" - "PCW2EmKDXWtUwwkQy06xCINQyKYaWGGEECC2vDEQkgxBMINN/TSsV9bCYhJMUCBYiJBppiGC" - "DC0hxoMIRBghYIMIQwULIZAHDiIvpKIiIj91X7qtfdUvuklXtrS4t0o+lC20h263SxH/////" - "////////////////////////////////////yBlyPyBmCy5A8NUMhkrQgaA6CB4NKCB4ZhyG" - "QBxZCDkHcg8EUcg3cgr35BbB5kGw6kNRQQ1QZAgwQaBogwBkGgGQ0VkPWQxWQxWQxWQShBes" - "g0oINBBDCCDcMhmJyGWrIaichmKwQMhoEyD1kEDIPUQQiPjIMTIaOIL0IKMIEDc8B4WCBggd" - "sMIMMgYZkOCDDQYQaDCDShoNwg7QQMMGEDYYQeGE0GEGg0mGk1uutMIPBnthGYRAzwIGQaMO" - "nIKMPWEZhiQL8DBEMrgYIhldOBlngbcEDZDKgIzEYM8EYRmIyGbhCURwJwZ4C5gFAIGEGCwY" - "QNoEHSr7CMxA03ISYQIgxjkGJ5BiMgvCBB6apqkqtK9AgYbg2gQMPBsIINTAU8FT70/T0G1m" - "A2L5gbRwF34dBB8N/4QT/+gv70E3toJveuv/XT20m6pfSDhBBhp7aT4b/pBV/6Xa3oIN7oIN" - "7aT/+3X7aTpaX02k/ul7f+k//pf+k/aT+v1/+qT1daX/TaML6Xt/6X/6XMJowswnre63vX/7" - "ave2rpaXi6Tffpff///hL/9vSb9Jv1//6/0m168hkA3H0np/r3xxS//S9tL2/f9/xHH/tGF2" - "6ehXwpA/foh7bW/Ue/Uf/S//b0r9K//20vtK0rSS8LDpIEzZ19Vv9f+l9pf+/7//+9e6vpeF" - "hrhHmR/at6r/r/6Xv+3r9L9X+2lq3t1aSXkDyggYgJMHSSCjf+vvIO+Qd//0v0vb6/q9f/79" - "LSbSr00wggw10mtJ9Kt/+v/QXt/t/ev6V//pPtpevqmEEGGlr/eEl//X/0v0vb1fpX6Yf7aT" - "98baSX3ggQYaSSXpPhAv///9L2/2/9L8JSQCr/+vadJL/CCDDS6r7j//+P9L9L//S/CTNYa/" - "3S1dJq+vpoIIg0AQYaWv1yXDZ+OP/0/b/b/wl+ZDIgNP999+6S+00EFhh116vOCB///xf6Xt" - "/5Z/4Jh//pe3el4iEFhhpaql3g3//OAX/ft/t/8L9wb/bSferYpLwghBg0F9aT7f84D5wH//" - "Ob/S9v/H9shr1f/1arpeEEGGvX97f1///t+3///7kFU/7pWr6MJtV4QINpeqST7////7f6Xt" - "9/f2Df9//7r8IPX1xfd6/9kNGn/t+3+39fW2//ulaSTel9+36Xu//7//t/17e/v7b/tpe+k3" - "pfDBf1pf+scchld/7ftr7fr2u7//1ev14MMIJvdUpgGH96/b/+3//919d/71a9U3peGGEE7d" - "yOqSX79e//7ftpe3v/7f/avuqV6+GDINYEEEO2EnCW39/9//t//t91t1t/09aV6vpeGHhArY" - "qKLtL6fSyGd9//28hoftL2/X12yDd69bX/Sb0iGx/DDwQTYaYSW3rel/f/7f7/t7dbdf/f8b" - "1V9fhhiEE2IpL9N6/t//hv+K9vbXtdv/V6qNX0vyB5QQy7DDCCINsWtPq3pft//sPXf/tLet" - "vS26jd0r1/TBIGGEEm2l3pN6X7f/7f9extpbaW3a9r1Svpfrhgwgk20l9JhkNj4S12H/+3+/" - "u2lsNL+uwk19N6S/dBhhBbDCVN4JMMJYIL9h//t6XXuw0ttLbhhLYYS/Svpf8PBYYMIJO0KY" - "MFQhIUmwYVNNPTbQ03TTdhhBJsMJJtwwkmxVNOraaH9JB4TTFEFAZDGqCDEIIIg0AZBisMUQ" - "z1kPWQxXkNlbBhSC+mQlRDGmGKIZVYZQwiGVWwcQiDTW0/QJQZDKrX2sPCaBgvRTg2BIhA0u" - "GS4KP+/te4YLDEL2Fhr+n/xoREGCERIKgYiJBVDERxERxEODBCDBCIMEIMF04iI+oiNCIkDw" - "1bEREfrCB/WEH60gf0qMMH6VIIGU4GoKfSIEsGKCDV9UQNA9IeNA1JAHnhD4j///////////" - "//////////////////////////////+QPkEDMFW+yGQBPBA8NSAmQZ4IHhqQQ2oIEoDFkGuC" - "GlHkDwN4ILMyB4NM1ILMyB4NMyGrNLYeQPF4g14kFC4UgqQQLwFCpbe9pEGbiB4NfIu5As5N" - "Mg34hr9X+qu6Qd1t3Xb+0vUf//9G1/S+vIGYZj//tr67TXhf/S6/xH1//bX///9L/X///bX/" - "//9Lr///9Jtf/////8l/kNTiHwg2f/+k3LhpGgZclMhqeQaJ5Bp/INU9BkGiCBeMgnZDLgIM" - "IMhmwgyDXMg1QSmQ1KE3IF4JYQUHyGbBBdyBGhJBDXchrcQfCC4ZGggwE//xCDwgwQMIYIPJ" - "OCD0wUF1yCj00wVMEDBUGEMFCgg8gY8h+8hjRSEQE1//9JsJ6YUKEcMMIYRsjqBFMhsOC6BY" - "KmmQ0HTRsgwUINSDB1RgcI6BiCgz4OCBnwSDBBtAgz4OCmARf/thGxvTCOFCODoINhJJrRg3" - "+gvRt0YN6MGwgg3phGxVqkGgvvvbh6dqkv/S6D6MDaCDoIHS9J9BByBjCDfNLIGJhtJyBfEE" - "HSbIKMRgVoIHIKMVJ1IaMIJnTrTaTpaX/7e8Qm0mknSbIN8VnAMCn/S6YpuKem4hB0uJdpcg" - "oz3+9tb//9Lq6DpaTr9XV/hBdV1avTaXQff+61S66pL/9t3r/6b1en/S6aenW/Xof/dW/bSd" - "dL8gpD+lj7aTrr//+l//T02vVj/1ownTaV0KSW2QzMv6b/xr///0F//39ff9r1r060luEDXx" - "ELuq///+l/+vv/B/vTa3TFeqWw0DS8hkBoI/+Gv1/xf/+/r7JAZn7+n2m6Sr0bMMJeQyAXmb" - "P/j7X/v////Z1Av90v19UmHhBJBj8I8P/8iAMXr/nE////9h/3tpN03dJN/QYXoL/+cBs2l/" - "7f///+G/3S/W3XfSSBr0vr/2GEv/b///r8H//W6+kr9ofS//9iF/7f///+Q16f39Poum3pfj" - "6X93+GC/9v/+61vwf90m10lb1S//9L+9mA1v+3///X7/39N6T3SX//07r6X/t//v+/kMt3/d" - "LX0rdVId//11u9vS/9v/+0tK//19jikm+q//16bbX1/9v/9/rX69YqnVtvS//tdL0XWyDj6/" - "+3//aVpNr39our/XFJf/6L+GgmGQo7aW2vf/t//t1DSsIwvpWW8NL6pJt0l/9sJcMJMMKwwl" - "sMLyXAv/2H/+2lDCCYaX2lFMVbTurdKl/7EKDiExTFScNAogRrDIMazQMHUGJAjVsg+pDGpt" - "JOCHUQ0DQGEopiFkCKoYSdqThlfBKD0P/60Y07WGFt/+wuv9iFCDXxCaa3pqnf/8MIWgYQME" - "DCEMEIcRHFghEREQwU5BBhYhhNBhDT4jQ4/iIiIhGw7xHEcRERH/0g/9f4Sf//yB+Bf+l/6X" - "/9f/+ra+PVfXWCf/q2uC6r9NoLpuq9RHHS/IGeOltpV9rtpJehWwwSIHg08EDCDrDEKECDIM" - "tVYYIfaxER/////////////////////////////+ACACAA4AAAEDAAEAAAATBwAAAQEDAAEA" - "AABKAgAAAgEDAAEAAAABAAAAAwEDAAEAAAAEAAAABgEDAAEAAAABAAAAEQEEAAEAAAAIAAAA" - "EgEDAAEAAAABAAAAFQEDAAEAAAABAAAAFgEDAAEAAABKAgAAFwEEAAEAAACZDQAAGgEFAAEA" - "AABQDgAAGwEFAAEAAABYDgAAHAEDAAEAAAABAAAAKAEDAAEAAAACAAAAAAAAAAAAwBIAAAQA" - "AADAEgAABAA="; - -static const char fontdata_16[] = - "SUkqAHAPAAAmoCQP/////////////////////////////////IZJx0QyQzjkM45DJA3vIHhr" - "2RbyB9BA8Gy00/IHg8XZDMsiXkGzqIK/Akk2Q2nSINUyG25DVoQ1aEGSCGUoINjkFEyGPIZU" - "yGrPBVXqwQahNUm4PCBhQQYQMFwQcYIGED131IZoaNsOk6SbVII4bBQgwmlhAtHDDCOEH79Y" - "QNINqnrZBoHrQQbCpp+EFSCDYQQb/1wjkXbSekbfSbT9JsFTR82uEFpOk3/+gsOtqk6STadJ" - "LYR9Z4bhBv0FSTdX9fpYf6SeltP6cILhBtBOswCkpsNFdX666S+m1/p7pJbgtJ6bRddBVVNp" - "X++v69LpK2G164XT1/pa/v79a/69dWGKJ2krY+3ul6XS6V/69f9a0uGP/rX/Wkv//9f9fSps" - "Ol/vWl6Wv7/X//1pa6kGu9f/0vS69f+v8fW6S8Izf6/xr/1uu99yGga/qtaSbBH1HS28fS9I" - "atf8R/dVdJLwlf/6S+q9f/fdVpD9PpL9VXkvqmGl//uqxCW2r//18EDVbSv8gerIl3tpVW7C" - "vS/VKvQekw0tevb7SVrx//pBJcXRH9MNBf/yhQxCrIUZXf/0kvahA1Ypv/qIMMJQmv+l+pBp" - "cIOueG8J0w9f1ZLgyJNVuC/9JCDXhB9NWG2v1sNQjnIWvx0v6uug3EwTSu19cMNIh/SsGcF/" - "/6UuNpdaBB8I5hsMI2lv4N4QaTeP6X6iG1xbptJBBtiF/5DU1SCON07//9But61SDtfkFgal" - "29INrf5BZEyDInS/S1/bpINtJf4dJK1b/0v9JuvrVXBhf+303Tf//6Wu+9U2P/ukv3X6pdaT" - "oSGDZ9JXrogerIl79Orf5A8S6/0v/Wtev9Jb3S/FJ/S1/pXrH//2//v0t69fX/0v20v0tdKi" - "Gl36/X0Qyn/+20nr+tIhpj/v16XS/SX8f6X9L5BQ9dL0lr//7Vr7+k2l6V9euQPDx/pJdNv+" - "Q2o7rS62/VdUsJ//trbD/BSBPiWulf6T0k3SXfrpJdWw3rVPetIhiel3V/0gv+9LdWwgyKP/" - "qlfobaW2k6STapa9XpJXTDCH/XulrDSuwk3S6QS3pYelthJibabS10m0kGsMIJOwk2ltpBBd" - "LyjggkgxCaDX9PtpEMwGsUQ0xDEJsJJMNBBBbXgxFYYTCYT/tbFfC4TELDFEMueIiQa0JCGC" - "Bq6FIUgwhEGCEMIMIQwUFkMk3ERdaxEREf60vbVL/qkvbSX9+ku7SS8W0qHekttIdtLbS3ax" - "H//////////////////////////////////////8gMBZD1yBoDQ5A8GXQhkg31IGgFAZA8G0" - "MgeGsQQyQ2oIG45AkvyC2GvMgqoTIa6QhtBCGgbINQqQYFCDWoIbBBBBBDAghgQQwIIOgguI" - "INYZDTIIYIIGKgREA0EwDYRANBMBqgyGgoIYGEMVEHrIY0IYqyC+hAiZBvMhg5DL4gQLMzA8" - "PBAyGsn4MIHIqGZoED//9bwQcGCDgwgf/64J9pcLCYQOyG0kBGgeQboIQgg1AZBQYCMweQLz" - "IGJkMuZDLmQy5o+GWZgqOZgYZDNxHwoZBpORaI+FDINJyKdHhNENlCBjAZoBgEDNAzyGzNHA" - "zuv7CNBA1Z8I0CB2CIMHZ4GEzwLwgQO00001CadJtoIIGHBA2EEDDYIG0EDzYc+HtNNU1dEC" - "9EgdJmwUL5smEfBh24NhIO4N4fDoIP/6Xe+gg27aCDe2k01u+364eg3wkvQQbQQYfugnww9/" - "Sa/9L1vSb20m90n//p/tJ0v+nQTa7aTW3/pP/6Xfek3uk3tpfX7/dNq3Wl+2kG79L2/9L/9L" - "1vSb7Sb///tK1V6tJUvS0nRhd0vf/S//CXcwswnpPuk+6X///tpOlpfugm+/r2/9L/9LmFX3" - "6b+m/3/9unutJv68dbS/X28cV//S+69vW/W/X//XRhdv0tfIZAaQ5A8Ufp9/r/6//QXuv30/" - "q/4jj7/2raTdCl4WHpEH5tb6Ue/Uf/S+69vX+v/+6tf0nVLwsOlBM3dP9b/X/pe6+39/3//q" - "9PTdWkl4WDWkeb/vSX/X/0vuvb1fpX0r/br79XqvIHhYIZdhWHWEE6TaT//kF3yC7//pe6+/" - "XrX//rpatpWkvhNMIIMNUko/vS9v/r/0vuvv7670r/er3punVL7UEEGHXvpegq////S9/2//" - "/ph/3ut+k3SX9hAgw0tKvfCS//r/6X2l7er6SvpQ/9enVjtKvXCCDDSSS9bhggX///+l7/t/" - "6X4SZ1BW+3X/T6++EEQaBMMNL/p4h/668f6C+0vf/S/CTIgGz+ut01aSX00EFhg0tV+4P+OP" - "/0/f+/8JfmIYP96un23SS9poILDDS6rSeeCB///xf6Xt/5ZH8Ew/73XXvS8RCCwYaX6XeDf/" - "88GX+H7f7f+wX7hh/69XVsVXgghDDrX0vb/ngfPA//57f6+3/j+2Q2hH717+6+EEGGl0l77f" - "++//7ft17f/+2QV9f7W19PS8IEGHX6S3v9b7//t/r//9bkFNH709NqjabSXwg2v/T93///+3" - "7de33Xf2G/7/6S9L4Qer1SQvf1/7IN6v/b/X2//9sP+66V9N9fa79V+/X+9/+37de3v7+2//" - "Xvrevwwv6pX/+OOQzJ/+3+vt+l6W//e2ukk+l4YMIJ7fVGwz/vX7D/+37df9/f2/7pdXpN6X" - "hhhArfRdUqf36///b/X29//b/7/f768MMhqiYIJrbS0Et/f+//7ft17fpb1t/7paWqT6+GHh" - "BC22lpU/vpff/7f6+339r/6X33SV6RBRHhh4QVsUxCJ2t9XrkG77f/7eQUPt17e9b1tkC8V/" - "exv76VeDB4QThhMJa9W+v//9vX/77S7S2/73Sr0m9L8MMQgmxGlf70tdv/9v+K99v39vS3X9" - "ikr6/IHhYINEBhhBEFS7S70m9L9v/9v9/b3S20v/umKrV9fwmChhggSbaVP03hLrv/9v+vY7" - "S7S29L136b0v7UMMILYYSW9WGQLvpft//sPS3/bS20tu67S90r0l/oMMIJNtL8JMMJYS1ww/" - "/2//3YaW2lt2lthWqpX0v1w2gsMMElbwSYMElIOfW2Gt3fbarbXuGwgrYaCu7CVsGEv0r6C+" - "6QPC2DCSpoQgxoQkNWDCqq6txrppuwYSUMMElbgwknFe6tpof1h4TQYhEDGpBisIIMIIIg1C" - "hBgQGIRDQIIIIIYEZBuIDBhSC9TRDjCD1OxCIZohiEQzRDBxCINYwNNNUCTBkMsQvtUHhNBh" - "eiXBVClWGrwZCAX/7r/4YWGFuGFhhf1/44iIMEIiDOoZIaDUGQEQiIuIhwYISCmGIgwQhgvx" - "ER9IRHERIHgrwIiI11hGgGwCzroO+qCB+loP9JGCNQGwGXpECYGYPSCBkuBsBt9Q0qBr0ooS" - "GciHjQMJHQDx6IGobv8IRx///////////////////////////////////////yB49PIZIsED" - "wZIIHgxxA8rIHgqWQVrIEsM2yGnZDUvyGQoIM8yB4KnhSB/MgeDZMhtTCWw8geCTIamBIFIH" - "g2IUgzEEFeCGXAKC1t7rXrpp+v9WpA+4geCryMHIHvk0yBfiCp1b7ql6Q/+vf2vr///o4tel" - "015AzBmj/6tf9prwv/q/64j4X/0rS//r/vf9f//0rX///+m////9df///6b////1dL///+rg" - "iGpTIvkG2ZDS/IaX5DUpkpkNOCGXGQf8hmOR+QTyGnBKZDXoQ04I5kNqhJyGVBLiBc+QanIZ" - "4IZ4ISCOCOCDa5BUwgvxBeCJBFciuQz8Qxf/q4gg8EDBAwgeCB4IPCBgoLrkC/BBhBgoQMED" - "BQgYIGFBQoI1gokMzgWOMg9VkKGQwdY44//qwnphQhhHDDR1BQbJnnpkFCCGdGlkM6EGgyDc" - "hMI4QZBuhNDIEIVGx0ageQqAZoGAQMEoMJuCDBBhL/6unphHChGxwgg2FCCY9P9AvCp6aCDe" - "gwjg1qEg0F9pphbCB0mg1MBhf/Vo2K9GyYQQcIIHScKrWjZMgY8go/QWQUejhsI4bIGPRsmk" - "2QL+jZNAg5BR/ThSBHkMe9PbtpPX/+r0H0EG0g6TpXLx4MtPEJ3fS2IJiE7EJ0m3QINhIO6p" - "Pu/6039aX/pXvEJtLSDpNj8+GWn/S6aenVuKDpcS5pXIF+9tJu1dJ1pL/6em6etf9J6b/QXT" - "TdNpPTa9P//61aXWl/63/q6Wl/1/pdV19/XQ//dft039Vv9Nj03/7evv+l7vuk9Nr9j+6ujC" - "aTpaQqvZBp4gQ/q/6Qpa///hL///S6v/q/7SvSrcINP6t9////9Bf/97/3+2vTdN06SSWw0D" - "S8RIHgrU9f///0v/1//ZQDX/3XVj9IILDDQa+QyAatP15OJ+v+L//39fmoMz91dfTdbegpsg" - "0vIZAZlDd/8ff/3////sH+66tpPqkw8JJBivCPj//KgDF0v+eT////2/+nr3fSb0kga8IF//" - "PBt7S/9v//+vwb/bW1bq7SSfqg16X1/7df+3////hv/r9b9K/wwvS//9hhL/2////8g2Eft+" - "l0rdfq0P/93+GIX/t//39X5BUn/pN7ejG9Uvx9L0v/Bgv/b//61/D/39apNvSX//7v3y4bf/" - "b//f6/IZkP+6Wr0t2qX//1d74S/9v//X2//19+1Sf0iGH//XX1vS/9v/+60v//bWK6Stuv//" - "+m219f/b//f1tfrtetjpvVJf/sLpdq3r/7f/9pXTa/+sbWk2xSX/9owtoJttGFhkHfT/9v/9" - "urQTa9pWSHbRftbS+lX/thBcNJhkOOwwlsMJcqwyv+w//20rCUMI2v9pwwl9aTbS//xXDCCb" - "CsQrY1hra6sGtrrbaUNBMQtbSYpit/VvSBf/ak4ZzCFMbUkBsRDPU2QYrlAOawzyBFbkHrIP" - "WauUA5rCFAbGlEINZAhPDCCpqUBmp2gSg9D/9hdNNBrDC2//YXX+xCnkmF8U01vXTtf/hoaB" - "hAwQaEMEIOIjiyOGQCwCwwgYWIMEGgwh/EccfoREREI2CPEcRxEREa/wgg///hJ/6/0n/X/I" - "HiiX///pdfT+n/+tpePX9fhfX1bSyB49NKvptL7/1IHg1wEYA1CxdKvSEdtJLyBmDU/2l/YS" - "2wkl8eGGEEQPDXcJBBhBpYYhMQgQMgUVwsGaAeCsF7WIiI//////////////////////////" - "////////wAQAQA4AAAEDAAEAAADOBwAAAQEDAAEAAAB3AgAAAgEDAAEAAAABAAAAAwEDAAEA" - "AAAEAAAABgEDAAEAAAABAAAAEQEEAAEAAAAIAAAAEgEDAAEAAAABAAAAFQEDAAEAAAABAAAA" - "FgEDAAEAAAB3AgAAFwEEAAEAAABoDwAAGgEFAAEAAAAeEAAAGwEFAAEAAAAmEAAAHAEDAAEA" - "AAABAAAAKAEDAAEAAAACAAAAAAAAAAAAwBIAAAQAAADAEgAABAA="; - -static const char fontdata_18[] = - "SUkqAEARAAAmoCq/////////////////////////////////+QyXe5DJDVchncgthMyB4NFk" - "TMgeJBA8FKE06yB9ad5DbxIgScCpNkFYdSGnQgrOQbKENqhA3ghmWQz2QVRyBxZDMoQbJ4XU" - "g0YQl4IHhBhUm4OggwoIGCBhYwQZBuJggYIHhf1CJwazjaSdJNpqEGFQaYWgSwmg9d6yGanQ" - "Qb10m+gjxMKEGEGlhAtHhhhHyf/4QaVpIw3rZBpelQQbCpp+EFSCDaCDe/XSOMwbSfSDpJN3" - "1TYKqMyraC0nQTfT/pYaW0gv06dKk4Iz8+K4Qb9BUk2k/+ugt9+npbTXVtBcINwnWYAnTNg3" - "77f1+v1aS+k3dVXC6em0YXSqkrSv99UvX/S8N6q3C6dJ/0tLff/r9/S6pJsN0RB6rH2/S9JL" - "XX/r0v//WwxRfqt6XvXpaX1fv9f+lqlThjrf+tfS//////6pbdf910vrS9X+tdf9LSWsKQ1L" - "pfr/9fuv/f/H+1rcIzH+v8aS9LS17/yGwU96S0klsEf2OvePpfj3X+I/2v0l4Svr/S/SStf3" - "/9JwkwqevXf9L+m6/rvdLihW6vpfpL8jmktpf5A8WyEu+6She16/rSXggekwwgr/XvbXr2E3" - "1/SSXgmpHPYaWv+3tpJNEGt/H1/0viHhBpMU3/SyGoYhaZCg/v/0gSS7oINWtf9ifDVCSC6T" - "/X+Qa9Pnx1Tph3/0yEAkpr3Ba/pQaXBBvTUMNtf9hpI4mD+PX9JpdBvRwnV2F/2HhBOQxhFj" - "9f1mBh/TxBB0gjiDYYRxL1wbSIP6Tdj/X9QgbSxdJtQgg2xX/kNVPhA6t/1/SF/unpINwvel" - "DMbSCOG1b/IM4vX6TaW9OqQOGvogzCmD6TaT/5BSEL+k6X7aSTbSX+G0km+/9f+r/r0nDBf+" - "/TpN/9V1paWRjv6VNj/+kt7deQPBe9f0nQj99XS8geWEJe/6t/61fpf+lv8Kv0qb7S/FX9LX" - "9a6x1/X2/+v0v/pXX/0v20v110t69fr6IZcf/vv9daVENXt+vX/9L7bS6/9SGo//S9Ja/1/s" - "Va6t+ldZAu6V6X1/+l9tf11069//pZA9RX6/T/5BWhddK63p0krSSwnr9JOtsP8hteQLMpv0" - "tLtL1fS7/177Yb1qmvWk3X7aXaSWv/SXTcHr0nTa6IGBDXbSvSeku+r0ttJhhFIBO/XXS1tL" - "tJ0u1CXroPSSdWwj3f/ptJNbQSbaTaSTaQQXXw8JbDCCiE1117DSIZsBBlusMJENSAg4YQTD" - "CSsMIIILetkNQgkmKDQYVr00rFRGrEKJrDOKYqmKCC2FqDEVgwmEGnodqmvhbCYShhAgsREh" - "phpCDBBr0hUMIRBhCGCDCEMKCyGScCItpdCIiI/6S+9VX2uvvSX9qlXvWuraSVYtpUO9Jdqw" - "ttIdtLbS2mFiP///////////////////////////////////+QEwate8gaApwQPArqIZINtZ" - "A1DU1IHgpaEDwZCCC3wQPA4jyC2DJMgpIyG0BkFdQQUCZDUKSBAuQ1CZAuDIYBkFwZDAMguD" - "IYDIMAyGpqQ19CGNCGYnINYMg1DRBUBkGsbBEYDchgQQwwQYLlOGCIBc1A5GAxIEVENnkMqZ" - "BihBp4hoK5OB4KJBbBU1IbYxODBEaDORcGpYIH//63hA4MIHBhBxX/+QXDUJrwsIMIPDYRoC" - "MMGHDhGgOGGCDBBggYQYLDBBuEHDCCMw4YYYRmHYYaPBA3DBBhMEGEwSYYV9112EGpBXoQiA" - "gQNEDFCD6EGs5B6EDByCUCBA5AxQhmUIZtCGbQhmUR8Gg0BSonDMZBrwIEDZBqOQiAgQMMg1" - "nIQgIINZBvQg0YDNAzQgYLIKMdHAb0p8C69MIoCB3QdBB6IaEMIhsthEM9oIGmmmmmqaurpB" - "NsIG0E2wgbSDzAOZg9qnp9yGUdIN1BV84NozBh7hsJB3BvfdBP/6W6tukGHhtIMPDaT/7v6a" - "Qbw2lST8INhAgbT3QT7f+En/9LvvSb2wk3vXX/dfuk/pekHSb+0vDf+k//pevpP9P6T9P/uv" - "aVpf/aCDae6Xt/6X/4QX96Te2k3t//7pd09OlpfTpN/r7f/X/6XazCek36Tfpf/3+rat1per" - "03ML9Vv/r/+lzCza7et7re//+62vaTrpeOk636X3/pf/pfaXt9P9P///dPe9XX/pXT+vt44/" - "/6Xv/et+t+uOP/zCpNpNpCl5DIBocgeDj9Ot/Q/6Q/+l917+/7/j+6Wt+rpJeFh6RDH3T9Lt" - "+v/pe6+3pfpf/9/vt1el4WDrCDNzrev/1/6X3Xt/f99f7q2l1pOlXhYapBH2//qv//9L3X2/" - "fpX1v+6+1bStJfCw60E6t0/r+QIfIEOv/oL7r719f6//6fb30vIM9kM2wQQYaSQSf1vS9v//" - "/S919vr+vW/3S1/SbSS9BoMIIMNLqK6fSr/+v/S+/3++u+r/vvum0ukvVMIEGGuvreEF////" - "pe6Xt++kr6TD/enp16bX+8IIMOtL6fBBL+uq/+l9/t6+v6UH/a6+x2kl/hBBg0kl9eIL////" - "S/S+/9L8JMpwZf/03tPSX1hBEGsXDDS6r7lQGX/XXj/S9v9v/S/BBSoDb+6WvVWqXu0EFgw0" - "Fr6Twf8cf/p/pe/+EvzaMH/e36tulX1ggsMNLr+58IH///F+3+3/k9P4IMP966b9ul9oMIIL" - "DDS+kqfIPT/+fBo/f6Xt/8L9oN/669NxpeIhBCGGlqut7f8+GM+GP/z6fv/f+wX7YN/39Wqb" - "SXhAgw6/6fb/w+H//b+69v/H9sgyDP3SbV/0vCCDBpdaS+39f//7fuvt//7kDjT+//Ta/CCD" - "aXpfe////+w/uvfuu67B/3rq6Rvel8IP/0k/d6773/4b919v//bDf+urql6Xwgem/WL3f/9y" - "BhP/7f3X3v7+2/7f1+3pfDC/qkv/X/3/7fuvt+v+7/9Nq3SX18ML71V/f445Bqp/7f3Xt/Xp" - "dv/a/6Tevhhggm71WbBv/1+w//t+6+/f37f+9daq3peGGEFvouqSX79e//7f3+3v7+2/+urf" - "XpeGGEE3bfpd/f///t/pff19bf+3TddJN6XgwZDXFwghd0nCST++l9//t+3+32va/+l+uq3/" - "hh4QVthKIRPO+r/3//byBiPS9vet62yGU9f2vt6T6RDKjww8IJtimkkn1b0sgXjv/9v9v9vt" - "Lutv+9666pvS/DDwQLDCYKv/0v2//2/4r32/ddv911Y2Nb0vwwxCCbEV76b0utv/9v9/vdLt" - "L7S7pivSfr8gz2Qa4DDCCIMsNpJPq3r///t6XXt91t1t/69aV6/pkMzwwYQSDYaXfTelrt//" - "t/v7G2ltpbeltpe1vpV9qDDCCVsJK+kwyGaPpft//t/17tpbaW312rVaTekvrQYYIJNhpVeE" - "mwuEF+w//2/3920ttL7S20t9K9L+8MNBbDCS+kwYSUJa7f/7D16/bS20tu0uDBfaV9Jf0g8F" - "sGEltQSYYLZB0KFTDDVNNPTbUFTdNN2GEk2GEk24YSTYpqtK01C/WHhYYhINNCEGKCEJDTDB" - "gqaaem2hp6abhhhBJsGEEmw0GEk2v1YacfvQeE0GEQzKyGcQEEGEECIahQQIBhiCINwZDAMg" - "uDyCgGwYUgwnaIOIIYTuxCINQMMUQagcOIRDUBhhbuCTBkMwGvsLDwg0GF8hAZQUgQNnDJMM" - "r9b1/uGFhgtwwthNVVf+KQiIMEIiDBCIgynDIBRERGhFwYISBPqIkNGogwX4iI/QiOIiQPBZ" - "cRER9cIzA2gb+qCB/WEH60g/rQNdJJGxlOMjgbQaOpAmg2D1CBj+oaQg1egoogahpaXjQMKa" - "gPBjRA1Dbv4Q1sIcf////////////////////////////////////IFmpA0AkvUhkhlQQPAr" - "gIMgeFsgeBxBAkggTA0rIa9kNe/IZAJBA8vIHgT+FIHjmQPBS8gyeEth5A9HIa2BIgfkEDwU" - "iFIHxBA8FUghtkJbeHtL/IElkMu/S291UgeL5A8Cf0YOQPHNNMhleQZP/+6d0g4dNN3rfpV9" - "If/Xv00vX/yBoGoP/84n+l7+v/q6/7VeC//V167CDXhf/V1/xH//6tf/3/9J69f//9tf///0" - "v////2////9LX////br///9LQIg2UyE8gqTIa08hqzyDZTIsyGu5BofyDU5F8hiZDVgizIbZ" - "yGs5EmQVqEVyGa5F4hlnyGlBDZBA8G1yDJhA8NQC/9W2CBB4IGCBhA8EDwQPCBgpDK7ILzwU" - "IGEGChAwQMFCBhA1BQoI1hlQUFIaE5F0IOnUgmpBc5BjyDFZE0//rEIPCYQYQwnNQGHpkMs5" - "BufXIFzhNMhlnTCDIGDhMIZDYdQuSsgwcg5/77///VtPQYUI2OEeGwoR4iIDRTChdAsKmmFT" - "CPjYVBhHBYVUcFhDBQUgXoQI4hsopBjg2jYFzQCDwNzYLr/6sI4L0wjwsIIHQQbBUEGsJ/oL" - "008JoIMPTQQa1QQcF9qmug6TtV/+k9BvRwdBBoJB0m9J9HBshl+QMfoLIZfo4VHCZDL9HBtB" - "NkC/o4NhBByBj1UOkQ2eQY+6bvbV/S//bp9Ag2gg6TpWQL8k1EJ3fS2IQYhOxCdJ3QIG0ndG" - "3rmI8DTd/Wm60qS/9Lp4p10nSfVngzQg/6XCYTwg6txTpcQnVx/6e90m66//b7ptL3W+rq/0" - "F003V03Ta9Nf+2utWlrpf+l709Ol/77/hL/3Xp66f/+r1bS61//bHq1/SfXr/S6p69utfHH9" - "906em8UktshpYQ2P6X7+v/+/6Xv7pe2vV/2lzH7S1S/CBw/2/0hr7//9Bf/7/X3/9+k2r1SW" - "2g0vS//1///CX//e/8H+2lpXvVqkltoNLxEgeBORvr/9f+v/6//shhp/991iulBAsGDRww18" - "hkArV+vx9//F//7+vynBo+3WldNN6QMPBAkgwYS8ETv/9el/3////sP/W999JJh6SQYrwjMX" - "/8pAy7f/zyf///+w//dLSt+m9Kg16Bf/z4K+0v/b////w3+3X3vapfpA16X1/7aX/t///1+D" - "f+tq9JvSvpYYXpf/+wwgv/b////wb/bp6tbvSv2h9L+7/Yr/2//7/vyCuR/r/oxvSS/H/1/8" - "ML/2//+tL8H/erSel36/9L6/vBgv/b//f/8P/a/apN2kl//+22r6MArf9v//+n8g1O//TpPS" - "Tb6//+l/4S/9v/+0tb//Vtb7VK70iC8f/r1drel/7f//9f/69R/vpJf//q2+3pf+3/+3Wtr9" - "er7T0k231//YXS7X1/9v//StJtf+1j40rikq//RhbQTDbRhWyBA+n/7f/7faCte0rtG1qnSb" - "df/20uGk3YS4YXv/2//20oaTYRtf7Juwwgt3pXpJf/sILgwgmGQsMMILYYXlIGZ/2H/+2lDB" - "BMMJfDSjiuvSt0l/9irMPFMUxVsUnDTtPTYaaYTtO2GEopiFoM0WEmqTenVukP/6jmEnakgC" - "6IaE7DIMDJIDBThokNCdyC6cgunLGSGCEYHJANxChMLIaBEQqakMGn0CTB6/+wtIMINBrYLf" - "/2F/+wp5INegmmFtNPW//4NDQMIMEDQgwhBsRHEMjhkhAsGEDCxBhBoGEP4jQ4/iIiIhHATi" - "OI4iIiP/hBA3/X+Eg///pf9f6T/r/ZA8OLf//+l16T1///a6/S+k9aj//a5Arq0q9JtL//wY" - "YQLdtKvSEcdV8gaIddtKvTS20kvj2GEkvrYYIIgeCsOEggyB6sIOtiFFEFsGRPE6AZgsLDCY" - "XsFkDYDScREcf////////////////////////////////////4AIAIAADgAAAQMAAQAAAIEI" - "AAABAQMAAQAAAIsCAAACAQMAAQAAAAEAAAADAQMAAQAAAAQAAAAGAQMAAQAAAAEAAAARAQQA" - "AQAAAAgAAAASAQMAAQAAAAEAAAAVAQMAAQAAAAEAAAAWAQMAAQAAAIsCAAAXAQQAAQAAADcR" - "AAAaAQUAAQAAAO4RAAAbAQUAAQAAAPYRAAAcAQMAAQAAAAEAAAAoAQMAAQAAAAIAAAAAAAAA" - "AADAEgAABAAAAMASAAAEAA=="; - -static const char fontdata_20[] = - "SUkqABATAAAmoDgf////////////////////////////+QyQy7IGwGXPIZILLkNA/kDwVrIW" - "3IHgvBA8FqE00sgeC9pp5BWhIFSvIHhpOQPDToQK3ILYb01TTINOELmCJwypBY8FVsgy2kQ1" - "6BSCocEDBSDQBEFfCBcWINJwQeF/qDCDSCD0m4eCBhSDZWEGFwTwQMIPC1VKQa6keMPTpJu8" - "IMKEGmuECwg0fIP3dcIGgg2kE9JukkeGwqDQaWECwj42EEG//wiRhpN6ON0lZDSetBBsFTXw" - "gqQQNoJv/9HnJetpIJ1201SSbCpo0JroLQTdP/+EFh6b1ekm060mwRp5mNwQb8JUrat//1uu" - "kk+laeklhBaBA6QdZsCsKcAwqdK/qukv3/pXuvbgum4TaMLpUq3T7u9KltVaS61bfpcLp6/p" - "Kqp1vr1/1/qlcNpJK2wvfdL0tf3//X/S+qsGMjvrHpuuvS6XS//6//SVWw0c6X/q6+lr/f//" - "/pfXhj1b/9L0uv3+mvX/9JJLyGtiX9PX+uvr+/VePpf7YR9f/XGkvqquv/1X+u0klwUi3pL/" - "/66Wvf+Qbi/uqWklVhGaY/Xj6XpD3X+I/37pVuCT/36SX6Vpf1/0lpQl6vS/qv0lbr/720u0" - "h7hX+/6XkWfVpfv+6pRVbXpL+kvggaqw0r/IHgmELd7aWwldq//SSrwg6qGEtfpW9hoJKu2v" - "S/0kvCakWisNL/Xg8MV5DNp43/9IL4h4QaTEJv/4wwSSkEUf6X6gklrhB0+v+yXBmprW//0Q" - "06l5mK0k1DDv/5JgUIJrvBf+lB1wgbwnTDbX/Yejyh1sdL/tLhPo8TW9fqgw0kmyC/Eu//0k" - "cGH9NxBA2kEGwwjaX6hvIYmleP6X6UEG0tp0n0cbYYS+lyGqESCDSd//+hbXF4TaQSBuK/8h" - "tJ8I8w0m/9L9J673VINsL3+YbSQQbSv8gflZA4Cf6TaW9dJBsNJeQPyjD6Te3//+k/+2lTtf" - "+G0ltW/+kv0rS+vScGC/9+nr/1+utcijv6STY1/6S3t1/SX6vEfuu6/7/q3+QPDZi7fpa/0r" - "/RA8PhC56VN7a/il+lr+tdY/+vt1//pf+krr/6X9/6WulvX/1//+2k9f1pUQ1/30vS6ohmv6" - "X22tr/6RBsH//9dV+v9uv0m/SC110vVf/pfsV/9aTrkDELel6X//9tfpfpXX06/pZA8Hj/SS" - "6d+sgy3uul+39JWklhB//utsN/BSB4b4lddNpeler6X1rpJX3DtcKn/pdbaTpVpJaa1f/TcP" - "+k0m0tItXaX16t0l+vpJOkw0GQg71r7+h2l2k2lVqEv+Hpba2EeRrn/S9patpJthJulbSQX/" - "D0km0mdWmKtfdJtJNYYSuGEmwkraQS/4eEttBMQg09de2kQaUiygwiGuTk5ptKmGEEEFtexE" - "JJimgwv+kmDBLWK2ITBgkrBgkCC2qwYWDBBhBp0hSDWGIXwuExCoMQgQLERIauiQhggwr8Ug" - "whEGCEMEGEIYUFkMkMyMgeC/EMu+qwZwMgMo4B4axwDg8B4axwG0LxEW1SxEREfetL9Uv26p" - "L9JfVvpL20kv+qSxbSUd1S26YW2kO2ltpb1tNYj/////////////////////////////////" - "5AWBqr/IGoNMEMgk5DJBaGEDYGKyB4FlZA8CjQgtgYghkJ/IGYMUIHCLIKgkCKsC5QCHQNcl" - "oaCWBqlIGYVAMFWGCoBcqwXKgCDoDBUBrmoFQ1Bg6g1EQGmVYaREwZCrDSIoCqDIGKEDGhDC" - "ghnGEMAyBCchgvZDRWQUYQzaENEyGlMhsBfBAyCuMWRYFYjYaBKcNPQIiYF//9reEHIuG0HB" - "hA4r//IMEZBcOuaAeGnCDBA+wg4Pwgf//94QcMIOGEH/+uE1tetMIOyDIKBFAPIKCwhpi5DK" - "FQigGEQzCCGaQQzCCGaQQzCEaBmkgFNokBlshpzCJwcMhpaEQgInBwyGloRA0fD8g3IINPkD" - "CCDTMgoRkDE7R8NDqvTCJAQNQzMEYQIhsoGZgQ2aBns0BiEaAXtNNNNIJp6baQIG2aAu0CBt" - "mgLsIIPtNO01YaIGEUQMISnwy9do0Ah3g6CD5BQG5BRbkG9oIO00000gmm0naCCDDcNhBBhu" - "G6DzYYNAxap91oNpN1BV84Kwggw120EHwb38JB//S/vSb20m90nrf+vVtJtKkvQQbQQbvcJN" - "Yb/0E//pdrekG9tIN7aT7/v970/pfToIN+2gvb/pL/9L+9Jv0m/S//tLWm1bS/90m19L2/9J" - "//S770n3Sb2+v/fb/SetL0m0E97r7f+l/+l6za9X3X6//3Xat02lpf6TaNr9e3/1/+lzac2u" - "3pN7pN71//rrTaT1pfT0336Xv/r/+l+v3q/q///71362vXjq6T+vt44pf/pe3Xt9X9X6v/9q" - "2u3Tpa/pX39ff//6C/X29X9X/Ecff5tV0m6FLyGQCm5A8ND9Pv0kO/pD/6XvXv9/3//1902l" - "apeFg9SGKE/tL////0vtfb0n9J//7XSfb3pLwsOqCe+3qvfr/6XvXt/fXfX+9P/pWlXhYapB" - "GZv0vqt/r/0vtfv//1v+1vbSbSdV8Fh1oJtb76X///S969vV9Vfr/f0v6bpLyB4eyDVYSDDS" - "0unSfS/yGeMhnhf/S+19+vqvW/+v9tdJL0GEwggw9JJ//S+///9L3r2/v++r/tdJtXSbWvWw" - "gQYaWsfTelW//X/pfa+3/pfpMP96b+rrpL7TCCDBpaXr4QS////oL+vvV/V9KH/f/sU2kv+E" - "EGGlpV7eCC//1/9L2/2/9L9JmoFn7paTf6pf4QQYaSX6XEwGn//4/0v0vf/S/CCkICn//0mm" - "6S/wQRDTKwYaWl/cgQZn8Lhf/X2/2/8JfkKdlICt+1dJvabSr6aCCww6+tJ4P+OP/0/0vb/y" - "xwQX5tWD/er/v196CCww0tf+Zh3///F+3/f+1/BMP+//bbSS9hBoILDDS6VJJvBh//zMGv9/" - "pe3/wX7Qb/dLSbS40vEQgWGDS//w3///37f7/8F+2Df/v/bVeEEIYaWte3hv6mYEZmBH/5nv" - "9fb/x/bIKYT9tbX09Lwggw0v0kvf/ff/9v3r2//9yCwn/66bSV18EEDDrpf+////9v7X77ru" - "tsgtB///zadJfCDaX9JN73r/3/7fvXt//9h/20tL0ndL4Qer0lj7fr/yGZZBI/9v7X3//22/" - "/fb1vr4Qff6T3//3i//b969vf39sP+2trpJN6XwwX/X/////2/tfb9L0t//rp+vX4YX3SSv7" - "6xxshpI/9h+9e339/b//96t6XhhhBPeqSNgY++v4f/2/v+//9v/bSdLpJvrwwYQVu3LrX/fX" - "u//t+6XvvW9bb//e2qXpeGGEE3elqrf+v3/+39/t9r37/7df+3peGGQ2ysIJp20sIKv2+v//" - "2/0vb+vS7/9dL0vXww8ECG2wk4SW+vX2//w37f7e37+3Xpe+2kk3peGHhBOGKiieU/t9ZDLj" - "//28hmR6X36XaW2Qy4+9tLS9W+iDRHhg8IKwwmEq3revW3/+3+3+3t+3W///G/Xpfgw8IJsW" - "Cqn6b0tdv/9vXivfdL/vrdW640m9fwwxCCbFL9X0v7//b639vuttLb17qOqW9L8geHshp2GG" - "CCIG92q31D0v2//2/69vbS20tvr13dJ9L9MFDDCCCbaVPq3pft//t/v8baXpbeu3tV031+mE" - "gwwgVtpLek3hL9v/9v/920tuvtLtL6W9JfvDBhBK2Et9JhkM2NLXb//b12ve0thpbd1tha3S" - "fX/wwwgrYYSSvCTDCWCX7D//b//dhpbYS27CXaTtaV6S/pA6Cwwwl+CQYMElIEB6Ww17/bVd" - "rtw2Ethpd2lsMJf7ekF/w8LYMIJO0ITIwXEJDTDBqmqemw409Ndgwgkwwwgk24MJJs1DTW0k" - "2mh/0HhUGQyQIGCDoMUEECkNCgM1iyGxQQYVkMKMgXUMMJAgbQIiAzg3ZqJEGpQwYJEGpQw5" - "0JENRWxXWCwyDWo/aw8JoMQgQMhsBggQYSBAuGJIAxrrYYUgQIwUhgQ4YhYYhbDQhbX4SYev" - "sJIPBNBgvkmBwCkaBU4ZAgzf+/v7hgsMLcGFhhU71/40IiDCERILIgREgsCBEcREaEQ4MEJA" - "sTiIMEIME9UIiP5BbBq8hkhnmQWy/EgeDIOQUuIZAuEDwZuIHgz0ER9IRHEWZgSgVf0ED9LQ" - "f1QQP0tB/pI5g/SpBEQuSe+iByA3HqEDH6UMKINfUUQNgJXfCoGFNYHhlxhAwvogbAzB/hCO" - "P/////////////////////////////////+QPFrIGoF8IHYG3PIZIbdkMg4CZA8CIIZAb2QJ" - "7IE0NbMg255DIAw5A8PMhkLwpA8H8geBZMgpzCCww/CkDy0IHgVhqQPFDIHgcaEFXRLbyB4L" - "0INvL/kFiyDRnpbe6aXrhNP17+0iB4PMhkL0bKQPB/tMhlTIKc//XfSD67vW/2l6Q/+vfqvr" - "///zyf6W7XkDUo/9LS/6/C//Ta+uGgwvBf+lev8R//+rX/+v/V/1///q1////V////9K0v//" - "/9v////S/////bX///9LnA2ycNKQkyDLMg2/kG2eQ26ZEoQ2oINT+Q0nIkyDEyDa5EoQVzkN" - "qCEmQZTkRyDTBF4hmoyGq5Aw5A8FNyBxf/03BAg8EDIbWoIHggeQ19cIGFBcgwfBQgYQMFCB" - "ggYKCBhA1ChMEU4ZkFBSGwQRKiC4yyD1EGEENHkFxhEqIaBv/1cQg8JhBhDCDwg9Mg1UIGKa" - "4KmmQaKJhAwVBhDIGKKE8g0UIEU9V7X//6sJ6DChQjw2ERAFzxEGGygyBjQho00CyCgMJpkD" - "AaDCPjZAvog1IaNFR4WiMB5BNCBhBDP5BQjIEUtHAUEgGAX/6ujYr0wjwsI8LCCDYSQQfX9B" - "emE9UEG9MI8L1QQcL7TTSYaIGDpMINTYEL/6sJA+jg2gg4QQOk2FSawjxP9BejxtHieEeJpB" - "h6ODaBA16QcF96fp96SS/9XpvhB0EHQQdJvSfQINkM2ZDKnoLIZvoEHQTZDLmgQbSchlzQIN" - "hIOQy5qr5DRMhnn/e2ldVX/1e+kG0nSdLIZXqzMGgU7vpcUxCdinSbdIOk7o2eshl+7uk602" - "k/pf+r08QnWldW9XhP+lwmnhOtxCbS4hPv/ff9aWv/pX9Wk6T19XTf6XTTdN03TpdOv/06aT" - "aT+l/+33ul1rf//oL/9fbX6/9tf20rS6/9LF61169Xr/S6rr2666HH/rTp0nxSS2yGpxAu/7" - "ft/6v/v+l7vul7a/f77c2q33SX4Qafpf9Cl///4QX/+//V/2vXulqqW6DX6b/X///9L///S+" - "H/1q2k2k9JJbaBpeIgu///X/pf/97/sH+2rdfFWtILDDQa+QyQ31/XX//9P/9f/5qDU/1rdN" - "PpJbaPEQzXkMgCsR6/H3/8f/+/r7IgGn7/Tq1dJBh4QVBivBFB///S/7////2H/aVr16qw8J" - "JBrwjQT/8gYZt6/59P////Yf7703tvST6SQNegX/8zBT2l/7f//9fhv+6/Sbtav6DXhBfX/t" - "pf+3////hv/XSvTekn6UGF6X//tpf+3////g3+9N7/6V6tD//d/sMJf+3///35Bk0/tddJNt" - "V/H0v//Yhf+3//daX5AkR+/03o3vpL//0v28ML/2////8H/tK10km7Wv/S/d/wzCBf+3/+/1" - "+/771elvSX//1d/pD/7f//WrfkGuP+0tX1b9IgRH//r63hL/2//7Xr/f1+/SpttJf/9em730" - "v/b//f1v/7V6er0r9L//XSttb1/9v//rptfr+1jY0ntUq/+197X1/9v/+0rS1/9XqqVtiqX/" - "9bQVtowrZDYPr/7D//b7SYa9pW2jCxu6V6//thG/aTdhLbC9/+3/+6VoK1/yKPYS3rSbaS//" - "hhLhhJhkMOwwlw15AgaP+3//aVpMMEc/aVhOGEuulfS//iFoMIJhhWKthhJYd2urBra922lB" - "ggmK1tJimK/eraSBf/asqIpgwVqGwYJBA2GCDhhA8IG2EDBAwQODBBw2GlFMLCKcDDCVVBu1" - "hJh6H/7Cjm0ExQanQMoUQ2F7IEF50DBLhokNghyGC5DBcEDnQHIgEOgFwYIKE1kNgOUGE0wo" - "OtoKw9f/a6DQaDC2Cw//sF/+xCn0gwvimg1vXW0//hhDQMIMEDQgwhDYiOLLhkhlBYMEDCxD" - "BBoMEO+I44/iIkCThILGBHgTiQyQaOxHIHh+EREa/xFBEM58fH/sIJ/6/wk///pP+l/kDwIK" - "////X/3r+uvStf///8ev0nrC+v9pZA8WvSr0g2l//7aXtpfqJTgi4GwGeP16QjtpJeQNAanX" - "tL+0tsJJehWwwgklX2GEgkmg6wxCBIgZiCCB+DrDChfCyBtDOdkcDMMcMLEREf//////////" - "////////////////////4AIAIAAOAAABAwABAAAATAkAAAEBAwABAAAAcwIAAAIBAwABAAAA" - "AQAAAAMBAwABAAAABAAAAAYBAwABAAAAAQAAABEBBAABAAAACAAAABIBAwABAAAAAQAAABUB" - "AwABAAAAAQAAABYBAwABAAAAcwIAABcBBAABAAAABxMAABoBBQABAAAAvhMAABsBBQABAAAA" - "xhMAABwBAwABAAAAAQAAACgBAwABAAAAAgAAAAAAAAAAAMASAAAEAAAAwBIAAAQA"; - -#endif /* LEPTONICA_BMFDATA_H */ - - diff --git a/WebRtc.NET/include/leptonica/bmp.h b/WebRtc.NET/include/leptonica/bmp.h deleted file mode 100644 index c0ce8fbe..00000000 --- a/WebRtc.NET/include/leptonica/bmp.h +++ /dev/null @@ -1,95 +0,0 @@ -/*====================================================================* - - Copyright (C) 2001 Leptonica. All rights reserved. - - - - Redistribution and use in source and binary forms, with or without - - modification, are permitted provided that the following conditions - - are met: - - 1. Redistributions of source code must retain the above copyright - - notice, this list of conditions and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above - - copyright notice, this list of conditions and the following - - disclaimer in the documentation and/or other materials - - provided with the distribution. - - - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - - ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - - LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - - A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL ANY - - CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - - EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - - PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - - PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY - - OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - - NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - - SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - *====================================================================*/ - -#ifndef LEPTONICA_BMP_H -#define LEPTONICA_BMP_H - -/*! - * \file bmp.h - * - *
- * This file is here to describe the fields in the header of
- * the BMP file.  These fields are not used directly in Leptonica.
- * The only thing we use are the sizes of these two headers.
- * Furthermore, because of potential namespace conflicts with
- * the typedefs and defined sizes, we have changed the names
- * to protect anyone who may also need to use the original definitions.
- * Thanks to J. D. Bryan for pointing out the potential problems when
- * developing on Win32 compatible systems.
- * 
- */ - -/*-------------------------------------------------------------* - * BMP file header * - *-------------------------------------------------------------*/ - -/*! BMP file header */ -struct BMP_FileHeader -{ - l_int16 bfType; /*!< file type; must be "BM" */ - l_int16 bfSize; /*!< length of the file; - sizeof(BMP_FileHeader) + - sizeof(BMP_InfoHeader) + - size of color table + - size of DIB bits */ - l_int16 bfFill1; /*!< remainder of the bfSize field */ - l_int16 bfReserved1; /*!< don't care (set to 0) */ - l_int16 bfReserved2; /*!< don't care (set to 0) */ - l_int16 bfOffBits; /*!< offset from beginning of file */ - l_int16 bfFill2; /*!< remainder of the bfOffBits field */ -}; -typedef struct BMP_FileHeader BMP_FH; - -/*! Number of bytes in a BMP file header */ -#define BMP_FHBYTES sizeof(BMP_FH) - - -/*-------------------------------------------------------------* - * BMP info header * - *-------------------------------------------------------------*/ - -/*! BMP info header */ -struct BMP_InfoHeader -{ - l_int32 biSize; /*!< size of the BMP_InfoHeader struct */ - l_int32 biWidth; /*!< bitmap width in pixels */ - l_int32 biHeight; /*!< bitmap height in pixels */ - l_int16 biPlanes; /*!< number of bitmap planes */ - l_int16 biBitCount; /*!< number of bits per pixel */ - l_int32 biCompression; /*!< compress format (0 == uncompressed) */ - l_int32 biSizeImage; /*!< size of image in bytes */ - l_int32 biXPelsPerMeter; /*!< pixels per meter in x direction */ - l_int32 biYPelsPerMeter; /*!< pixels per meter in y direction */ - l_int32 biClrUsed; /*!< number of colors used */ - l_int32 biClrImportant; /*!< number of important colors used */ -}; -typedef struct BMP_InfoHeader BMP_IH; - -/*! Number of bytes in a BMP info header */ -#define BMP_IHBYTES sizeof(BMP_IH) - - -#endif /* LEPTONICA_BMP_H */ diff --git a/WebRtc.NET/include/leptonica/ccbord.h b/WebRtc.NET/include/leptonica/ccbord.h deleted file mode 100644 index dcd37817..00000000 --- a/WebRtc.NET/include/leptonica/ccbord.h +++ /dev/null @@ -1,119 +0,0 @@ -/*====================================================================* - - Copyright (C) 2001 Leptonica. All rights reserved. - - - - Redistribution and use in source and binary forms, with or without - - modification, are permitted provided that the following conditions - - are met: - - 1. Redistributions of source code must retain the above copyright - - notice, this list of conditions and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above - - copyright notice, this list of conditions and the following - - disclaimer in the documentation and/or other materials - - provided with the distribution. - - - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - - ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - - LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - - A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL ANY - - CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - - EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - - PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - - PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY - - OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - - NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - - SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - *====================================================================*/ - -#ifndef LEPTONICA_CCBORD_H -#define LEPTONICA_CCBORD_H - -/*! - * \file ccbord.h - * - *
- *           CCBord:   represents a single connected component
- *           CCBorda:  an array of CCBord
- * 
- */ - - /*! Use in ccbaStepChainsToPixCoords() */ -enum { - CCB_LOCAL_COORDS = 1, - CCB_GLOBAL_COORDS = 2 -}; - - /*! Use in ccbaGenerateSPGlobalLocs() */ -enum { - CCB_SAVE_ALL_PTS = 1, - CCB_SAVE_TURNING_PTS = 2 -}; - - - /*! - *
-     * CCBord contains:
-     *
-     *    (1) a minimally-clipped bitmap of the component (pix),
-     *    (2) a boxa consisting of:
-     *          for the primary component:
-     *                (xul, yul) pixel location in global coords
-     *                (w, h) of the bitmap
-     *          for the hole components:
-     *                (x, y) in relative coordinates in primary component
-     *                (w, h) of the hole border (which is 2 pixels
-     *                       larger in each direction than the hole itself)
-     *    (3) a pta ('start') of the initial border pixel location for each
-     *        closed curve, all in relative coordinates of the primary
-     *        component.  This is given for the primary component,
-     *        followed by the hole components, if any.
-     *    (4) a refcount of the ccbord; used internally when a ccbord
-     *        is accessed from a ccborda (array of ccbord)
-     *    (5) a ptaa for the chain code for the border in relative
-     *        coordinates, where the first pta is the exterior border
-     *        and all other pta are for interior borders (holes)
-     *    (6) a ptaa for the global pixel loc rendition of the border,
-     *        where the first pta is the exterior border and all other
-     *        pta are for interior borders (holes).
-     *        This is derived from the local or step chain code.
-     *    (7) a numaa for the chain code for the border as orientation
-     *        directions between successive border pixels, where
-     *        the first numa is the exterior border and all other
-     *        numa are for interior borders (holes).  This is derived
-     *        from the local chain code.  The 8 directions are 0 - 7.
-     *    (8) a pta for a single chain for each c.c., comprised of outer
-     *        and hole borders, plus cut paths between them, all in
-     *        local coords.
-     *    (9) a pta for a single chain for each c.c., comprised of outer
-     *        and hole borders, plus cut paths between them, all in
-     *        global coords.
-     * 
- */ -struct CCBord -{ - struct Pix *pix; /*!< component bitmap (min size) */ - struct Boxa *boxa; /*!< regions of each closed curve */ - struct Pta *start; /*!< initial border pixel locations */ - l_int32 refcount; /*!< number of handles; start at 1 */ - struct Ptaa *local; /*!< ptaa of chain pixels (local) */ - struct Ptaa *global; /*!< ptaa of chain pixels (global) */ - struct Numaa *step; /*!< numaa of chain code (step dir) */ - struct Pta *splocal; /*!< pta of single chain (local) */ - struct Pta *spglobal; /*!< pta of single chain (global) */ -}; -typedef struct CCBord CCBORD; - -/*! Array of CCBord */ -struct CCBorda -{ - struct Pix *pix; /*!< input pix (may be null) */ - l_int32 w; /*!< width of pix */ - l_int32 h; /*!< height of pix */ - l_int32 n; /*!< number of ccbord in ptr array */ - l_int32 nalloc; /*!< number of ccbord ptrs allocated */ - struct CCBord **ccb; /*!< ccb ptr array */ -}; -typedef struct CCBorda CCBORDA; - - -#endif /* LEPTONICA_CCBORD_H */ - diff --git a/WebRtc.NET/include/leptonica/dewarp.h b/WebRtc.NET/include/leptonica/dewarp.h deleted file mode 100644 index 9ce71513..00000000 --- a/WebRtc.NET/include/leptonica/dewarp.h +++ /dev/null @@ -1,188 +0,0 @@ -/*====================================================================* - - Copyright (C) 2001 Leptonica. All rights reserved. - - - - Redistribution and use in source and binary forms, with or without - - modification, are permitted provided that the following conditions - - are met: - - 1. Redistributions of source code must retain the above copyright - - notice, this list of conditions and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above - - copyright notice, this list of conditions and the following - - disclaimer in the documentation and/or other materials - - provided with the distribution. - - - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - - ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - - LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - - A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL ANY - - CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - - EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - - PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - - PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY - - OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - - NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - - SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - *====================================================================*/ - -#ifndef LEPTONICA_DEWARP_H -#define LEPTONICA_DEWARP_H - -/*! - * \file dewarp.h - * - *
- *     Data structure to hold arrays and results for generating
- *     horizontal and vertical disparity arrays based on textlines.
- *     Each disparity array is two-dimensional.  The vertical disparity
- *     array gives a vertical displacement, relative to the lowest point
- *     in the textlines.  The horizontal disparty array gives a horizontal
- *     displacement, relative to the minimum values (for even pages)
- *     or maximum values (for odd pages) of the left and right ends of
- *     full textlines.  Horizontal alignment always involves translations
- *     away from the book gutter.
- *
- *     We have intentionally separated the process of building models
- *     from the rendering process that uses the models.  For any page,
- *     the building operation either creates an actual model (that is,
- *     a model with at least the vertical disparity being computed, and
- *     for which the 'success' flag is set) or fails to create a model.
- *     However, at rendering time, a page can have one of two different
- *     types of models.
- *     (1) A valid model is an actual model that meets the rendering
- *         constraints, which are limits on model curvature parameters.
- *         See dewarpaTestForValidModel() for details.
- *         Valid models are identified by dewarpaInsertRefModels(),
- *         which sets the 'vvalid' and 'hvalid' fields.  Only valid
- *         models are used for rendering.
- *     (2) A reference model is used by a page that doesn't have
- *         a valid model, but has a nearby valid model of the same
- *         parity (even/odd page) that it can use.  The range in pages
- *         to search for a valid model is given by the 'maxdist' field.
- *
- *     At the rendering stage, vertical and horizontal disparities are
- *     treated differently.  It is somewhat more robust to generate
- *     vertical disparity models (VDM) than horizontal disparity
- *     models (HDM). A valid VDM is required for any correction to
- *     be made; if a valid VDM is not available, just use the input
- *     image.  Otherwise, assuming it is available, the use of the
- *     HDM is controlled by two fields: 'useboth' and 'check_columns'.
- *       (a) With useboth == 0, we use only the VDM.
- *       (b) With useboth == 1, we require using the VDM and, if a valid
- *           horizontal disparity model (HDM) is available, we also use it.
- *       (c) With check_columns == 1, check for multiple columns and if
- *           true, only use the VDM, even if a valid HDM is available.
- *           Note that 'check_columns' takes precedence over 'useboth'
- *           when there is more than 1 column of text.  By default,
- *           check_columns == 0.
- *
- *     The 'maxdist' parameter is input when the dewarpa is created.
- *     The other rendering parameters have default values given in dewarp1.c.
- *     All parameters used by rendering can be set (or reset) using accessors.
- *
- *     After dewarping, use of the VDM will cause all points on each
- *     altered curve to have a y-value equal to the minimum.  Use of
- *     the HDA will cause the left and right edges of the textlines
- *     to be vertically aligned if they had been typeset flush-left
- *     and flush-right, respectively.
- *
- *     The sampled disparity arrays are expanded to full resolution,
- *     using linear interpolation, and this is further expanded
- *     by slope continuation to the right and below if the image
- *     is larger than the full resolution disparity arrays.  Then
- *     the disparity correction can be applied to the input image.
- *     If the input pix are 2x reduced, the expansion from sampled
- *     to full res uses the product of (sampling) * (redfactor).
- *
- *     The most accurate results are produced at full resolution, and
- *     this is generally recommended.
- * 
- */ - - /*! Dewarp version for serialization - *
-     * Note on versioning of the serialization of this data structure:
-     * The dewarping utility and the stored data can be expected to change.
-     * In most situations, the serialized version is ephemeral -- it is
-     * not needed after being used.  No functions will be provided to
-     * convert between different versions.
-     * 
- */ -#define DEWARP_VERSION_NUMBER 4 - -/*! Data structure to hold a number of Dewarp */ -struct L_Dewarpa -{ - l_int32 nalloc; /*!< size of dewarp ptr array */ - l_int32 maxpage; /*!< maximum page number in array */ - struct L_Dewarp **dewarp; /*!< array of ptrs to page dewarp */ - struct L_Dewarp **dewarpcache; /*!< array of ptrs to cached dewarps */ - struct Numa *namodels; /*!< list of page numbers for pages */ - /*!< with page models */ - struct Numa *napages; /*!< list of page numbers with either */ - /*!< page models or ref page models */ - l_int32 redfactor; /*!< reduction factor of input: 1 or 2 */ - l_int32 sampling; /*!< disparity arrays sampling factor */ - l_int32 minlines; /*!< min number of long lines required */ - l_int32 maxdist; /*!< max distance for getting ref page */ - l_int32 max_linecurv; /*!< maximum abs line curvature, */ - /*!< in micro-units */ - l_int32 min_diff_linecurv; /*!< minimum abs diff line */ - /*!< curvature in micro-units */ - l_int32 max_diff_linecurv; /*!< maximum abs diff line */ - /*!< curvature in micro-units */ - l_int32 max_edgeslope; /*!< maximum abs left or right edge */ - /*!< slope, in milli-units */ - l_int32 max_edgecurv; /*!< maximum abs left or right edge */ - /*!< curvature, in micro-units */ - l_int32 max_diff_edgecurv; /*!< maximum abs diff left-right */ - /*!< edge curvature, in micro-units */ - l_int32 useboth; /*!< use both disparity arrays if */ - /*!< available; only vertical otherwise */ - l_int32 check_columns; /*!< if there are multiple columns, */ - /*!< only use the vertical disparity */ - /*!< array */ - l_int32 modelsready; /*!< invalid models have been removed */ - /*!< and refs built against valid set */ -}; -typedef struct L_Dewarpa L_DEWARPA; - - -/*! Data structure for a single dewarp */ -struct L_Dewarp -{ - struct L_Dewarpa *dewa; /*!< ptr to parent (not owned) */ - struct Pix *pixs; /*!< source pix, 1 bpp */ - struct FPix *sampvdispar; /*!< sampled vert disparity array */ - struct FPix *samphdispar; /*!< sampled horiz disparity array */ - struct FPix *fullvdispar; /*!< full vert disparity array */ - struct FPix *fullhdispar; /*!< full horiz disparity array */ - struct Numa *namidys; /*!< sorted y val of midpoint each line */ - struct Numa *nacurves; /*!< sorted curvature of each line */ - l_int32 w; /*!< width of source image */ - l_int32 h; /*!< height of source image */ - l_int32 pageno; /*!< page number; important for reuse */ - l_int32 sampling; /*!< sampling factor of disparity arrays */ - l_int32 redfactor; /*!< reduction factor of pixs: 1 or 2 */ - l_int32 minlines; /*!< min number of long lines required */ - l_int32 nlines; /*!< number of long lines found */ - l_int32 mincurv; /*!< min line curvature in micro-units */ - l_int32 maxcurv; /*!< max line curvature in micro-units */ - l_int32 leftslope; /*!< left edge slope in milli-units */ - l_int32 rightslope; /*!< right edge slope in milli-units */ - l_int32 leftcurv; /*!< left edge curvature in micro-units */ - l_int32 rightcurv; /*!< right edge curvature in micro-units*/ - l_int32 nx; /*!< number of sampling pts in x-dir */ - l_int32 ny; /*!< number of sampling pts in y-dir */ - l_int32 hasref; /*!< 0 if normal; 1 if has a refpage */ - l_int32 refpage; /*!< page with disparity model to use */ - l_int32 vsuccess; /*!< sets to 1 if vert disparity builds */ - l_int32 hsuccess; /*!< sets to 1 if horiz disparity builds */ - l_int32 vvalid; /*!< sets to 1 if valid vert disparity */ - l_int32 hvalid; /*!< sets to 1 if valid horiz disparity */ - l_int32 skip_horiz; /*!< if 1, skip horiz disparity */ - /*!< correction */ - l_int32 debug; /*!< set to 1 if debug output requested */ -}; -typedef struct L_Dewarp L_DEWARP; - -#endif /* LEPTONICA_DEWARP_H */ diff --git a/WebRtc.NET/include/leptonica/endianness.h b/WebRtc.NET/include/leptonica/endianness.h deleted file mode 100644 index e6b1d454..00000000 --- a/WebRtc.NET/include/leptonica/endianness.h +++ /dev/null @@ -1,11 +0,0 @@ -#if !defined (L_BIG_ENDIAN) && !defined (L_LITTLE_ENDIAN) -# if @APPLE_UNIVERSAL_BUILD@ -# ifdef __BIG_ENDIAN__ -# define L_BIG_ENDIAN -# else -# define L_LITTLE_ENDIAN -# endif -# else -# define @ENDIANNESS@ -# endif -#endif diff --git a/WebRtc.NET/include/leptonica/environ.h b/WebRtc.NET/include/leptonica/environ.h deleted file mode 100644 index ae912203..00000000 --- a/WebRtc.NET/include/leptonica/environ.h +++ /dev/null @@ -1,497 +0,0 @@ -/*====================================================================* - - Copyright (C) 2001 Leptonica. All rights reserved. - - - - Redistribution and use in source and binary forms, with or without - - modification, are permitted provided that the following conditions - - are met: - - 1. Redistributions of source code must retain the above copyright - - notice, this list of conditions and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above - - copyright notice, this list of conditions and the following - - disclaimer in the documentation and/or other materials - - provided with the distribution. - - - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - - ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - - LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - - A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL ANY - - CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - - EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - - PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - - PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY - - OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - - NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - - SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - *====================================================================*/ - -#ifndef LEPTONICA_ENVIRON_H -#define LEPTONICA_ENVIRON_H - -/*------------------------------------------------------------------------* - * Defines and includes differ for Unix and Windows. Also for Windows, * - * differentiate between conditionals based on platform and compiler. * - * For platforms: * - * _WIN32 => Windows, 32- or 64-bit * - * _WIN64 => Windows, 64-bit only * - * __CYGWIN__ => Cygwin * - * For compilers: * - * __GNUC__ => gcc * - * _MSC_VER => msvc * - *------------------------------------------------------------------------*/ - -/* MS VC++ does not provide stdint.h, so define the missing types here */ - - -#ifndef _MSC_VER -#include - -#else -/* Note that _WIN32 is defined for both 32 and 64 bit applications, - whereas _WIN64 is defined only for the latter */ - -#ifdef _WIN64 -typedef __int64 intptr_t; -typedef unsigned __int64 uintptr_t; -#else -typedef int intptr_t; -typedef unsigned int uintptr_t; -#endif - -/* VC++6 doesn't seem to have powf, expf. */ -#if (_MSC_VER < 1400) -#define powf(x, y) (float)pow((double)(x), (double)(y)) -#define expf(x) (float)exp((double)(x)) -#endif - -#endif /* _MSC_VER */ - -/* Windows specifics */ -#ifdef _WIN32 - /* DLL EXPORTS and IMPORTS */ - #if defined(LIBLEPT_EXPORTS) - #define LEPT_DLL __declspec(dllexport) - #elif defined(LIBLEPT_IMPORTS) - #define LEPT_DLL __declspec(dllimport) - #else - #define LEPT_DLL - #endif -#else /* non-Windows specifics */ - #include - #define LEPT_DLL -#endif /* _WIN32 */ - -typedef intptr_t l_intptr_t; -typedef uintptr_t l_uintptr_t; - - -/*--------------------------------------------------------------------* - * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!* - * USER CONFIGURABLE * - * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!* - * Environment variables with I/O libraries * - * Manual Configuration Only: NOT AUTO_CONF * - *--------------------------------------------------------------------*/ -/* - * Leptonica provides interfaces to link to several external image - * I/O libraries, plus zlib. Setting any of these to 0 here causes - * non-functioning stubs to be linked. - */ -#if !defined(HAVE_CONFIG_H) && !defined(ANDROID_BUILD) && !defined(OS_IOS) -#define HAVE_LIBJPEG 0 -#define HAVE_LIBTIFF 0 -#define HAVE_LIBPNG 0 -#define HAVE_LIBZ 0 -#define HAVE_LIBGIF 0 -#define HAVE_LIBUNGIF 0 -#define HAVE_LIBWEBP 0 -#define HAVE_LIBJP2K 0 - - /* Leptonica supports both OpenJPEG 2.0 and 2.1. If you have a - * version of openjpeg (HAVE_LIBJP2K) that is not 2.1, set the - * path to the openjpeg.h header in angle brackets here. */ -#define LIBJP2K_HEADER -#endif /* ! HAVE_CONFIG_H etc. */ - -/* - * On linux systems, you can do I/O between Pix and memory. Specifically, - * you can compress (write compressed data to memory from a Pix) and - * uncompress (read from compressed data in memory to a Pix). - * For jpeg, png, jp2k, gif, pnm and bmp, these use the non-posix GNU - * functions fmemopen() and open_memstream(). These functions are not - * available on other systems. - * To use these functions in linux, you must define HAVE_FMEMOPEN to 1. - * To use them on MacOS, which does not support these functions, set it to 0. - */ -#if !defined(HAVE_CONFIG_H) && !defined(ANDROID_BUILD) && !defined(OS_IOS) && \ - !defined(_WIN32) -#define HAVE_FMEMOPEN 1 -#endif /* ! HAVE_CONFIG_H etc. */ - - -/*--------------------------------------------------------------------* - * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!* - * USER CONFIGURABLE * - * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!* - * Environ variables for image I/O without external libraries * - *--------------------------------------------------------------------*/ -/* - * Leptonica supplies I/O support without using external libraries for: - * * image read/write for bmp, pnm - * * header read for jp2k - * * image wrapping write for pdf and ps. - * Setting any of these to 0 causes non-functioning stubs to be linked. - */ -#define USE_BMPIO 1 -#define USE_PNMIO 1 -#define USE_JP2KHEADER 1 -#define USE_PDFIO 1 -#define USE_PSIO 1 - - -/*--------------------------------------------------------------------* - * It is desirable on Windows to have all temp files written to the same - * subdirectory of the Windows directory, because files under - * persist after reboot, and the regression tests write a lot of files. - * We write all test files to /tmp/lept or subdirectories of /tmp/lept. - * Windows temp files are specified as in unix, but have the translation - * /tmp/lept/xxx --> /lept/xxx - *--------------------------------------------------------------------*/ - - -/*--------------------------------------------------------------------* - * Built-in types * - *--------------------------------------------------------------------*/ -typedef signed char l_int8; /*!< signed 8-bit value */ -typedef unsigned char l_uint8; /*!< unsigned 8-bit value */ -typedef short l_int16; /*!< signed 16-bit value */ -typedef unsigned short l_uint16; /*!< unsigned 16-bit value */ -typedef int l_int32; /*!< signed 32-bit value */ -typedef unsigned int l_uint32; /*!< unsigned 32-bit value */ -typedef float l_float32; /*!< 32-bit floating point value */ -typedef double l_float64; /*!< 64-bit floating point value */ -#ifdef COMPILER_MSVC -typedef __int64 l_int64; /*!< signed 64-bit value */ -typedef unsigned __int64 l_uint64; /*!< unsigned 64-bit value */ -#else -typedef long long l_int64; /*!< signed 64-bit value */ -typedef unsigned long long l_uint64; /*!< unsigned 64-bit value */ -#endif /* COMPILER_MSVC */ - - -/*------------------------------------------------------------------------* - * Standard macros * - *------------------------------------------------------------------------*/ -#ifndef L_MIN -/*! Minimum of %x and %y */ -#define L_MIN(x,y) (((x) < (y)) ? (x) : (y)) -#endif - -#ifndef L_MAX -/*! Maximum of %x and %y */ -#define L_MAX(x,y) (((x) > (y)) ? (x) : (y)) -#endif - -#ifndef L_ABS -/*! Absoulute value of %x */ -#define L_ABS(x) (((x) < 0) ? (-1 * (x)) : (x)) -#endif - -#ifndef L_SIGN -/*! Sign of %x */ -#define L_SIGN(x) (((x) < 0) ? -1 : 1) -#endif - -#ifndef UNDEF -/*! Undefined value */ -#define UNDEF -1 -#endif - -#ifndef NULL -/*! NULL value */ -#define NULL 0 -#endif - -#ifndef TRUE -/*! True value */ -#define TRUE 1 -#endif - -#ifndef FALSE -/*! False value */ -#define FALSE 0 -#endif - - -/*--------------------------------------------------------------------* - * Environment variables for endian dependence * - *--------------------------------------------------------------------*/ -/* - * To control conditional compilation, one of two variables - * - * L_LITTLE_ENDIAN (e.g., for Intel X86) - * L_BIG_ENDIAN (e.g., for Sun SPARC, Mac Power PC) - * - * is defined when the GCC compiler is invoked. - * All code should compile properly for both hardware architectures. - */ - - -/*------------------------------------------------------------------------* - * Simple search state variables * - *------------------------------------------------------------------------*/ - -/*! Simple search state variables */ -enum { - L_NOT_FOUND = 0, - L_FOUND = 1 -}; - - -/*------------------------------------------------------------------------* - * Path separator conversion * - *------------------------------------------------------------------------*/ - -/*! Path separator conversion */ -enum { - UNIX_PATH_SEPCHAR = 0, - WIN_PATH_SEPCHAR = 1 -}; - - -/*------------------------------------------------------------------------* - * Timing structs * - *------------------------------------------------------------------------*/ -typedef void *L_TIMER; - -/*! Timing struct */ -struct L_WallTimer { - l_int32 start_sec; - l_int32 start_usec; - l_int32 stop_sec; - l_int32 stop_usec; -}; -typedef struct L_WallTimer L_WALLTIMER; - - -/*------------------------------------------------------------------------* - * Standard memory allocation * - * * - * These specify the memory management functions that are used * - * on all heap data except for Pix. Memory management for Pix * - * also defaults to malloc and free. See pix1.c for details. * - *------------------------------------------------------------------------*/ -#define LEPT_MALLOC(blocksize) malloc(blocksize) -#define LEPT_CALLOC(numelem, elemsize) calloc(numelem, elemsize) -#define LEPT_REALLOC(ptr, blocksize) realloc(ptr, blocksize) -#define LEPT_FREE(ptr) free(ptr) - - -/*------------------------------------------------------------------------* - * Control printing of error, warning, and info messages * - * * - * To omit all messages to stderr, simply define NO_CONSOLE_IO on the * - * command line. For finer grained control, we have a mechanism * - * based on the message severity level. The following assumes that * - * NO_CONSOLE_IO is not defined. * - * * - * Messages are printed if the message severity is greater than or equal * - * to the current severity threshold. The current severity threshold * - * is the greater of the compile-time severity, which is the minimum * - * severity that can be reported, and the run-time severity, which is * - * the severity threshold at the moment. * - * * - * The compile-time threshold determines which messages are compiled * - * into the library for potential printing. Messages below the * - * compile-time threshold are omitted and can never be printed. The * - * default compile-time threshold is L_SEVERITY_INFO, but this may be * - * overridden by defining MINIMUM_SEVERITY to the desired enumeration * - * identifier on the compiler command line. Defining NO_CONSOLE_IO on * - * the command line is the same as setting MINIMUM_SEVERITY to * - * L_SEVERITY_NONE. * - * * - * The run-time threshold determines which messages are printed during * - * library execution. It defaults to the compile-time threshold but * - * may be changed either statically by defining DEFAULT_SEVERITY to * - * the desired enumeration identifier on the compiler command line, or * - * dynamically by calling setMsgSeverity() to specify a new threshold. * - * The run-time threshold may also be set from the value of the * - * environment variable LEPT_MSG_SEVERITY by calling setMsgSeverity() * - * and specifying L_SEVERITY_EXTERNAL. * - * * - * In effect, the compile-time threshold setting says, "Generate code * - * to permit messages of equal or greater severity than this to be * - * printed, if desired," whereas the run-time threshold setting says, * - * "Print messages that have an equal or greater severity than this." * - *------------------------------------------------------------------------*/ - -/*! Control printing of error, warning and info messages */ -enum { - L_SEVERITY_EXTERNAL = 0, /* Get the severity from the environment */ - L_SEVERITY_ALL = 1, /* Lowest severity: print all messages */ - L_SEVERITY_DEBUG = 2, /* Print debugging and higher messages */ - L_SEVERITY_INFO = 3, /* Print informational and higher messages */ - L_SEVERITY_WARNING = 4, /* Print warning and higher messages */ - L_SEVERITY_ERROR = 5, /* Print error and higher messages */ - L_SEVERITY_NONE = 6 /* Highest severity: print no messages */ -}; - -/* No message less than the compile-time threshold will ever be - * reported, regardless of the current run-time threshold. This allows - * selection of the set of messages to include in the library. For - * example, setting the threshold to L_SEVERITY_WARNING eliminates all - * informational messages from the library. With that setting, both - * warning and error messages would be printed unless setMsgSeverity() - * was called, or DEFAULT_SEVERITY was redefined, to set the run-time - * severity to L_SEVERITY_ERROR. In that case, only error messages - * would be printed. - * - * This mechanism makes the library smaller and faster, by eliminating - * undesired message reporting and the associated run-time overhead for - * message threshold checking, because code for messages whose severity - * is lower than MINIMUM_SEVERITY won't be generated. - * - * A production library might typically permit WARNING and higher - * messages to be generated, and a development library might permit - * DEBUG and higher. The actual messages printed (as opposed to - * generated) would depend on the current run-time severity threshold. - */ - -#ifdef NO_CONSOLE_IO - #undef MINIMUM_SEVERITY - #undef DEFAULT_SEVERITY - - #define MINIMUM_SEVERITY L_SEVERITY_NONE /*!< Compile-time default */ - #define DEFAULT_SEVERITY L_SEVERITY_NONE /*!< Run-time default */ - -#else - #ifndef MINIMUM_SEVERITY - #define MINIMUM_SEVERITY L_SEVERITY_INFO /*!< Compile-time default */ - #endif - - #ifndef DEFAULT_SEVERITY - #define DEFAULT_SEVERITY MINIMUM_SEVERITY /*!< Run-time default */ - #endif -#endif - - -/*! The run-time message severity threshold is defined in utils.c. */ -LEPT_DLL extern l_int32 LeptMsgSeverity; - -/* - *
- *  Usage
- *  =====
- *  Messages are of two types.
- *
- *  (1) The messages
- *      ERROR_INT(a,b,c)       : returns l_int32
- *      ERROR_FLOAT(a,b,c)     : returns l_float32
- *      ERROR_PTR(a,b,c)       : returns void*
- *  are used to return from functions and take a fixed set of parameters:
- *      a : 
- *      b : procName
- *      c : 
- *  where procName is the name of the local variable naming the function.
- *
- *  (2) The purely informational L_* messages
- *      L_ERROR(a,...)
- *      L_WARNING(a,...)
- *      L_INFO(a,...)
- *  do not take a return value, but they take at least two parameters:
- *      a  :   with optional format conversions
- *      v1 : procName    (this must be included as the first vararg)
- *      v2, ... :  optional varargs to match format converters in the message
- *
- *  To return an error from a function that returns void, use:
- *      L_ERROR(, procName, [...])
- *      return;
- *
- *  Implementation details
- *  ======================
- *  Messages are defined with the IF_SEV macro.  The first parameter is
- *  the message severity, the second is the function to call if the
- *  message is to be printed, and the third is the return value if the
- *  message is to be suppressed.  For example, we might have an
- *  informational message defined as:
- *
- *    IF_SEV(L_SEVERITY_INFO, fprintf(.......), 0)
- *
- *  The macro expands into a conditional.  Because the first comparison
- *  is between two constants, an optimizing compiler will remove either
- *  the comparison (if it's true) or the entire macro expansion (if it
- *  is false).  This means that there is no run-time overhead for
- *  messages whose severity falls below the minimum specified at compile
- *  time, and for others the overhead is one (not two) comparisons.
- *
- *  The L_nnn() macros below do not return a value, but because the
- *  conditional operator requires one for the false condition, we
- *  specify a void expression.
- * 
- */ - -#ifdef NO_CONSOLE_IO - - #define PROCNAME(name) - #define ERROR_INT(a,b,c) ((l_int32)(c)) - #define ERROR_FLOAT(a,b,c) ((l_float32)(c)) - #define ERROR_PTR(a,b,c) ((void *)(c)) - #define L_ERROR(a,...) - #define L_WARNING(a,...) - #define L_INFO(a,...) - -#else - - #define PROCNAME(name) static const char procName[] = name - #define IF_SEV(l,t,f) \ - ((l) >= MINIMUM_SEVERITY && (l) >= LeptMsgSeverity ? (t) : (f)) - - #define ERROR_INT(a,b,c) \ - IF_SEV(L_SEVERITY_ERROR, returnErrorInt((a),(b),(c)), (l_int32)(c)) - #define ERROR_FLOAT(a,b,c) \ - IF_SEV(L_SEVERITY_ERROR, returnErrorFloat((a),(b),(c)), (l_float32)(c)) - #define ERROR_PTR(a,b,c) \ - IF_SEV(L_SEVERITY_ERROR, returnErrorPtr((a),(b),(c)), (void *)(c)) - - #define L_ERROR(a,...) \ - IF_SEV(L_SEVERITY_ERROR, \ - (void)fprintf(stderr, "Error in %s: " a, __VA_ARGS__), \ - (void)0) - #define L_WARNING(a,...) \ - IF_SEV(L_SEVERITY_WARNING, \ - (void)fprintf(stderr, "Warning in %s: " a, __VA_ARGS__), \ - (void)0) - #define L_INFO(a,...) \ - IF_SEV(L_SEVERITY_INFO, \ - (void)fprintf(stderr, "Info in %s: " a, __VA_ARGS__), \ - (void)0) - -#if 0 /* Alternative method for controlling L_* message output */ - #define L_ERROR(a,...) \ - { if (L_SEVERITY_ERROR >= MINIMUM_SEVERITY && \ - L_SEVERITY_ERROR >= LeptMsgSeverity) \ - fprintf(stderr, "Error in %s: " a, __VA_ARGS__) \ - } - #define L_WARNING(a,...) \ - { if (L_SEVERITY_WARNING >= MINIMUM_SEVERITY && \ - L_SEVERITY_WARNING >= LeptMsgSeverity) \ - fprintf(stderr, "Warning in %s: " a, __VA_ARGS__) \ - } - #define L_INFO(a,...) \ - { if (L_SEVERITY_INFO >= MINIMUM_SEVERITY && \ - L_SEVERITY_INFO >= LeptMsgSeverity) \ - fprintf(stderr, "Info in %s: " a, __VA_ARGS__) \ - } -#endif - -#endif /* NO_CONSOLE_IO */ - - -/*------------------------------------------------------------------------* - * snprintf() renamed in MSVC (pre-VS2015) * - *------------------------------------------------------------------------*/ -#if defined _MSC_VER && _MSC_VER < 1900 -#define snprintf(buf, size, ...) _snprintf_s(buf, size, _TRUNCATE, __VA_ARGS__) -#endif - - -#endif /* LEPTONICA_ENVIRON_H */ diff --git a/WebRtc.NET/include/leptonica/gplot.h b/WebRtc.NET/include/leptonica/gplot.h deleted file mode 100644 index 9d74eafb..00000000 --- a/WebRtc.NET/include/leptonica/gplot.h +++ /dev/null @@ -1,96 +0,0 @@ -/*====================================================================* - - Copyright (C) 2001 Leptonica. All rights reserved. - - - - Redistribution and use in source and binary forms, with or without - - modification, are permitted provided that the following conditions - - are met: - - 1. Redistributions of source code must retain the above copyright - - notice, this list of conditions and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above - - copyright notice, this list of conditions and the following - - disclaimer in the documentation and/or other materials - - provided with the distribution. - - - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - - ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - - LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - - A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL ANY - - CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - - EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - - PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - - PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY - - OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - - NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - - SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - *====================================================================*/ - -#ifndef LEPTONICA_GPLOT_H -#define LEPTONICA_GPLOT_H - -/*! - * \file gplot.h - * - *
- *   Data structures and parameters for generating gnuplot files
- *
- *   We used to support X11 output, but recent versions of gnuplot do not
- *   support the X11 terminal.  To get display to your screen, use
- *   GPLOT_PNG output; e.g.,
- *       gplotSimple1(na, GPLOT_PNG, "/tmp/someroot", ...);
- *       l_fileDisplay("/tmp/someroot.png", ...);
- * 
- */ - -#define GPLOT_VERSION_NUMBER 1 - -#define NUM_GPLOT_STYLES 5 -enum GPLOT_STYLE { - GPLOT_LINES = 0, - GPLOT_POINTS = 1, - GPLOT_IMPULSES = 2, - GPLOT_LINESPOINTS = 3, - GPLOT_DOTS = 4 -}; - -#define NUM_GPLOT_OUTPUTS 6 -enum GPLOT_OUTPUT { - GPLOT_NONE = 0, - GPLOT_PNG = 1, - GPLOT_PS = 2, - GPLOT_EPS = 3, - GPLOT_LATEX = 4 -}; - -enum GPLOT_SCALING { - GPLOT_LINEAR_SCALE = 0, /*!< default */ - GPLOT_LOG_SCALE_X = 1, - GPLOT_LOG_SCALE_Y = 2, - GPLOT_LOG_SCALE_X_Y = 3 -}; - -extern const char *gplotstylenames[]; /*!< used in gnuplot cmd file */ -extern const char *gplotfilestyles[]; /*!< used in simple file input */ -extern const char *gplotfileoutputs[]; /*!< used in simple file input */ - -/*! Data structure for generating gnuplot files */ -struct GPlot -{ - char *rootname; /*!< for cmd, data, output */ - char *cmdname; /*!< command file name */ - struct Sarray *cmddata; /*!< command file contents */ - struct Sarray *datanames; /*!< data file names */ - struct Sarray *plotdata; /*!< plot data (1 string/file) */ - struct Sarray *plottitles; /*!< title for each individual plot */ - struct Numa *plotstyles; /*!< plot style for individual plots */ - l_int32 nplots; /*!< current number of plots */ - char *outname; /*!< output file name */ - l_int32 outformat; /*!< GPLOT_OUTPUT values */ - l_int32 scaling; /*!< GPLOT_SCALING values */ - char *title; /*!< optional */ - char *xlabel; /*!< optional x axis label */ - char *ylabel; /*!< optional y axis label */ -}; -typedef struct GPlot GPLOT; - - -#endif /* LEPTONICA_GPLOT_H */ diff --git a/WebRtc.NET/include/leptonica/heap.h b/WebRtc.NET/include/leptonica/heap.h deleted file mode 100644 index d39b06b9..00000000 --- a/WebRtc.NET/include/leptonica/heap.h +++ /dev/null @@ -1,87 +0,0 @@ -/*====================================================================* - - Copyright (C) 2001 Leptonica. All rights reserved. - - - - Redistribution and use in source and binary forms, with or without - - modification, are permitted provided that the following conditions - - are met: - - 1. Redistributions of source code must retain the above copyright - - notice, this list of conditions and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above - - copyright notice, this list of conditions and the following - - disclaimer in the documentation and/or other materials - - provided with the distribution. - - - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - - ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - - LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - - A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL ANY - - CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - - EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - - PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - - PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY - - OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - - NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - - SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - *====================================================================*/ - -#ifndef LEPTONICA_HEAP_H -#define LEPTONICA_HEAP_H - -/*! - * \file heap.h - * - *
- *      Expandable priority queue configured as a heap for arbitrary void* data
- *
- *      The L_Heap is used to implement a priority queue.  The elements
- *      in the heap are ordered in either increasing or decreasing key value.
- *      The key is a float field 'keyval' that is required to be
- *      contained in the elements of the queue.
- *
- *      The heap is a simple binary tree with the following constraints:
- *         - the key of each node is >= the keys of the two children
- *         - the tree is complete, meaning that each level (1, 2, 4, ...)
- *           is filled and the last level is filled from left to right
- *
- *      The tree structure is implicit in the queue array, with the
- *      array elements numbered as a breadth-first search of the tree
- *      from left to right.  It is thus guaranteed that the largest
- *      (or smallest) key belongs to the first element in the array.
- *
- *      Heap sort is used to sort the array.  Once an array has been
- *      sorted as a heap, it is convenient to use it as a priority queue,
- *      because the min (or max) elements are always at the root of
- *      the tree (element 0), and once removed, the heap can be
- *      resorted in not more than log[n] steps, where n is the number
- *      of elements on the heap.  Likewise, if an arbitrary element is
- *      added to the end of the array A, the sorted heap can be restored
- *      in not more than log[n] steps.
- *
- *      A L_Heap differs from a L_Queue in that the elements in the former
- *      are sorted by a key.  Internally, the array is maintained
- *      as a queue, with a pointer to the end of the array.  The
- *      head of the array always remains at array[0].  The array is
- *      maintained (sorted) as a heap.  When an item is removed from
- *      the head, the last item takes its place (thus reducing the
- *      array length by 1), and this is followed by array element
- *      swaps to restore the heap property.   When an item is added,
- *      it goes at the end of the array, and is swapped up to restore
- *      the heap.  If the ptr array is full, adding another item causes
- *      the ptr array size to double.
- *
- *      For further implementation details, see heap.c.
- * 
- */ - -/*! Heap of arbitrary void* data */ -struct L_Heap -{ - l_int32 nalloc; /*!< size of allocated ptr array */ - l_int32 n; /*!< number of elements stored in the heap */ - void **array; /*!< ptr array */ - l_int32 direction; /*!< L_SORT_INCREASING or L_SORT_DECREASING */ -}; -typedef struct L_Heap L_HEAP; - - -#endif /* LEPTONICA_HEAP_H */ diff --git a/WebRtc.NET/include/leptonica/imageio.h b/WebRtc.NET/include/leptonica/imageio.h deleted file mode 100644 index fb7456d4..00000000 --- a/WebRtc.NET/include/leptonica/imageio.h +++ /dev/null @@ -1,237 +0,0 @@ -/*====================================================================* - - Copyright (C) 2001 Leptonica. All rights reserved. - - - - Redistribution and use in source and binary forms, with or without - - modification, are permitted provided that the following conditions - - are met: - - 1. Redistributions of source code must retain the above copyright - - notice, this list of conditions and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above - - copyright notice, this list of conditions and the following - - disclaimer in the documentation and/or other materials - - provided with the distribution. - - - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - - ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - - LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - - A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL ANY - - CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - - EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - - PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - - PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY - - OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - - NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - - SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - *====================================================================*/ - -/*! - * \file imageio.h - * - *
- *  General features of image I/O in leptonica
- *
- *  At present, there are 9 file formats for images that can be read
- *  and written:
- *      png (requires libpng, libz)
- *      jpeg (requires libjpeg)
- *      tiff (requires libtiff, libz)
- *      gif (requires libgif)
- *      webp (requires libwebp)
- *      jp2 (requires libopenjp2)
- *      bmp (no library required)
- *      pnm (no library required)
- *      spix (no library required)
- *  Additionally, there are two file formats for writing (only) images:
- *      PostScript (requires libpng, libz, libjpeg, libtiff)
- *      pdf (requires libpng, libz, libjpeg, libtiff)
- *
- *  For all 9 read/write formats, leptonica provides interconversion
- *  between pix (with raster data) and formatted image data:
- *      Conversion from pix (typically compression):
- *          pixWrite():        pix --> file
- *          pixWriteStream():  pix --> filestream (aka FILE*)
- *          pixWriteMem():     pix --> memory buffer
- *      Conversion to pix (typically decompression):
- *          pixRead():         file --> pix
- *          pixReadStream():   filestream --> pix
- *          pixReadMem():      memory buffer --> pix
- *
- *  Conversions for which the image data is not compressed are:
- *     * uncompressed tiff   (IFF_TIFF)
- *     * bmp
- *     * pnm
- *     * spix (fast serialization that copies the pix raster data)
- *
- *  The image header (metadata) information can be read from either
- *  the compressed file or a memory buffer, for all 9 formats.
- * 
- */ - -#ifndef LEPTONICA_IMAGEIO_H -#define LEPTONICA_IMAGEIO_H - -/* --------------------------------------------------------------- * - * Image file format types * - * --------------------------------------------------------------- */ -/* - * The IFF_DEFAULT flag is used to write the file out in the - * same (input) file format that the pix was read from. If the pix - * was not read from file, the input format field will be - * IFF_UNKNOWN and the output file format will be chosen to - * be compressed and lossless; namely, IFF_TIFF_G4 for d = 1 - * and IFF_PNG for everything else. - * - * In the future, new format types that have defined extensions - * will be added before IFF_DEFAULT, and will be kept in sync with - * the file format extensions in writefile.c. The positions of - * file formats before IFF_DEFAULT will remain invariant. - */ - -/*! Image file format types */ -enum { - IFF_UNKNOWN = 0, - IFF_BMP = 1, - IFF_JFIF_JPEG = 2, - IFF_PNG = 3, - IFF_TIFF = 4, - IFF_TIFF_PACKBITS = 5, - IFF_TIFF_RLE = 6, - IFF_TIFF_G3 = 7, - IFF_TIFF_G4 = 8, - IFF_TIFF_LZW = 9, - IFF_TIFF_ZIP = 10, - IFF_PNM = 11, - IFF_PS = 12, - IFF_GIF = 13, - IFF_JP2 = 14, - IFF_WEBP = 15, - IFF_LPDF = 16, - IFF_DEFAULT = 17, - IFF_SPIX = 18 -}; - - -/* --------------------------------------------------------------- * - * Format header ids * - * --------------------------------------------------------------- */ - -/*! Format header ids */ -enum { - BMP_ID = 0x4d42, /*!< BM - for bitmaps */ - TIFF_BIGEND_ID = 0x4d4d, /*!< MM - for 'motorola' */ - TIFF_LITTLEEND_ID = 0x4949 /*!< II - for 'intel' */ -}; - - -/* --------------------------------------------------------------- * - * Hinting bit flags in jpeg reader * - * --------------------------------------------------------------- */ - -/*! Hinting bit flags in jpeg reader */ -enum { - L_JPEG_READ_LUMINANCE = 1, /*!< only want luminance data; no chroma */ - L_JPEG_FAIL_ON_BAD_DATA = 2 /*!< don't return possibly damaged pix */ -}; - - -/* --------------------------------------------------------------- * - * Pdf formatted encoding types * - * --------------------------------------------------------------- */ - -/*! Pdf formatted encoding types */ -enum { - L_DEFAULT_ENCODE = 0, /*!< use default encoding based on image */ - L_JPEG_ENCODE = 1, /*!< use dct encoding: 8 and 32 bpp, no cmap */ - L_G4_ENCODE = 2, /*!< use ccitt g4 fax encoding: 1 bpp */ - L_FLATE_ENCODE = 3, /*!< use flate encoding: any depth, cmap ok */ - L_JP2K_ENCODE = 4 /*!< use jp2k encoding: 8 and 32 bpp, no cmap */ -}; - - -/* --------------------------------------------------------------- * - * Compressed image data * - * --------------------------------------------------------------- */ -/* - * In use, either datacomp or data85 will be produced, depending - * on whether the data needs to be ascii85 encoded. PostScript - * requires ascii85 encoding; pdf does not. - * - * For the colormap (flate compression only), PostScript uses ascii85 - * encoding and pdf uses a bracketed array of space-separated - * hex-encoded rgb triples. Only tiff g4 (type == L_G4_ENCODE) uses - * the minisblack field. - */ - -/*! Compressed image data */ -struct L_Compressed_Data -{ - l_int32 type; /*!< encoding type: L_JPEG_ENCODE, etc */ - l_uint8 *datacomp; /*!< gzipped raster data */ - size_t nbytescomp; /*!< number of compressed bytes */ - char *data85; /*!< ascii85-encoded gzipped raster data */ - size_t nbytes85; /*!< number of ascii85 encoded bytes */ - char *cmapdata85; /*!< ascii85-encoded uncompressed cmap */ - char *cmapdatahex; /*!< hex pdf array for the cmap */ - l_int32 ncolors; /*!< number of colors in cmap */ - l_int32 w; /*!< image width */ - l_int32 h; /*!< image height */ - l_int32 bps; /*!< bits/sample; typ. 1, 2, 4 or 8 */ - l_int32 spp; /*!< samples/pixel; typ. 1 or 3 */ - l_int32 minisblack; /*!< tiff g4 photometry */ - l_int32 predictor; /*!< flate data has PNG predictors */ - size_t nbytes; /*!< number of uncompressed raster bytes */ - l_int32 res; /*!< resolution (ppi) */ -}; -typedef struct L_Compressed_Data L_COMP_DATA; - - -/* ------------------------------------------------------------------------- * - * Pdf multi image flags * - * ------------------------------------------------------------------------- */ - -/*! Pdf multi image flags */ -enum { - L_FIRST_IMAGE = 1, /*!< first image to be used */ - L_NEXT_IMAGE = 2, /*!< intermediate image; not first or last */ - L_LAST_IMAGE = 3 /*!< last image to be used */ -}; - - -/* ------------------------------------------------------------------------- * - * Intermediate pdf generation data * - * ------------------------------------------------------------------------- */ -/* - * This accumulates data for generating a pdf of a single page consisting - * of an arbitrary number of images. - * - * None of the strings have a trailing newline. - */ - -/*! Intermediate pdf generation data */ -struct L_Pdf_Data -{ - char *title; /*!< optional title for pdf */ - l_int32 n; /*!< number of images */ - l_int32 ncmap; /*!< number of colormaps */ - struct L_Ptra *cida; /*!< array of compressed image data */ - char *id; /*!< %PDF-1.2 id string */ - char *obj1; /*!< catalog string */ - char *obj2; /*!< metadata string */ - char *obj3; /*!< pages string */ - char *obj4; /*!< page string (variable data) */ - char *obj5; /*!< content string (variable data) */ - char *poststream; /*!< post-binary-stream string */ - char *trailer; /*!< trailer string (variable data) */ - struct Pta *xy; /*!< store (xpt, ypt) array */ - struct Pta *wh; /*!< store (wpt, hpt) array */ - struct Box *mediabox; /*!< bounding region for all images */ - struct Sarray *saprex; /*!< pre-binary-stream xobject strings */ - struct Sarray *sacmap; /*!< colormap pdf object strings */ - struct L_Dna *objsize; /*!< sizes of each pdf string object */ - struct L_Dna *objloc; /*!< location of each pdf string object */ - l_int32 xrefloc; /*!< location of xref */ -}; -typedef struct L_Pdf_Data L_PDF_DATA; - - -#endif /* LEPTONICA_IMAGEIO_H */ diff --git a/WebRtc.NET/include/leptonica/jbclass.h b/WebRtc.NET/include/leptonica/jbclass.h deleted file mode 100644 index 84a48a93..00000000 --- a/WebRtc.NET/include/leptonica/jbclass.h +++ /dev/null @@ -1,141 +0,0 @@ -/*====================================================================* - - Copyright (C) 2001 Leptonica. All rights reserved. - - - - Redistribution and use in source and binary forms, with or without - - modification, are permitted provided that the following conditions - - are met: - - 1. Redistributions of source code must retain the above copyright - - notice, this list of conditions and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above - - copyright notice, this list of conditions and the following - - disclaimer in the documentation and/or other materials - - provided with the distribution. - - - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - - ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - - LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - - A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL ANY - - CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - - EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - - PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - - PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY - - OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - - NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - - SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - *====================================================================*/ - -#ifndef LEPTONICA_JBCLASS_H -#define LEPTONICA_JBCLASS_H - -/*! - * \file jbclass.h - * - * JbClasser - * JbData - */ - - - /*! - *
-     * The JbClasser struct holds all the data accumulated during the
-     * classification process that can be used for a compressed
-     * jbig2-type representation of a set of images.  This is created
-     * in an initialization process and added to as the selected components
-     * on each successive page are analyzed.
-     * 
- */ -struct JbClasser -{ - struct Sarray *safiles; /*!< input page image file names */ - l_int32 method; /*!< JB_RANKHAUS, JB_CORRELATION */ - l_int32 components; /*!< JB_CONN_COMPS, JB_CHARACTERS or */ - /*!< JB_WORDS */ - l_int32 maxwidth; /*!< max component width allowed */ - l_int32 maxheight; /*!< max component height allowed */ - l_int32 npages; /*!< number of pages already processed */ - l_int32 baseindex; /*!< number components already processed */ - /*!< on fully processed pages */ - struct Numa *nacomps; /*!< number of components on each page */ - l_int32 sizehaus; /*!< size of square struct elem for haus */ - l_float32 rankhaus; /*!< rank val of haus match, each way */ - l_float32 thresh; /*!< thresh value for correlation score */ - l_float32 weightfactor; /*!< corrects thresh value for heaver */ - /*!< components; use 0 for no correction */ - struct Numa *naarea; /*!< w * h of each template, without */ - /*!< extra border pixels */ - l_int32 w; /*!< max width of original src images */ - l_int32 h; /*!< max height of original src images */ - l_int32 nclass; /*!< current number of classes */ - l_int32 keep_pixaa; /*!< If zero, pixaa isn't filled */ - struct Pixaa *pixaa; /*!< instances for each class; unbordered */ - struct Pixa *pixat; /*!< templates for each class; bordered */ - /*!< and not dilated */ - struct Pixa *pixatd; /*!< templates for each class; bordered */ - /*!< and dilated */ - struct L_DnaHash *dahash; /*!< Hash table to find templates by size */ - struct Numa *nafgt; /*!< fg areas of undilated templates; */ - /*!< only used for rank < 1.0 */ - struct Pta *ptac; /*!< centroids of all bordered cc */ - struct Pta *ptact; /*!< centroids of all bordered template cc */ - struct Numa *naclass; /*!< array of class ids for each component */ - struct Numa *napage; /*!< array of page nums for each component */ - struct Pta *ptaul; /*!< array of UL corners at which the */ - /*!< template is to be placed for each */ - /*!< component */ - struct Pta *ptall; /*!< similar to ptaul, but for LL corners */ -}; -typedef struct JbClasser JBCLASSER; - - - /*! - *
-     * The JbData struct holds all the data required for
-     * the compressed jbig-type representation of a set of images.
-     * The data can be written to file, read back, and used
-     * to regenerate an approximate version of the original,
-     * which differs in two ways from the original:
-     *   (1) It uses a template image for each c.c. instead of the
-     *       original instance, for each occurrence on each page.
-     *   (2) It discards components with either a height or width larger
-     *       than the maximuma, given here by the lattice dimensions
-     *       used for storing the templates.
-     * 
- */ -struct JbData -{ - struct Pix *pix; /*!< template composite for all classes */ - l_int32 npages; /*!< number of pages */ - l_int32 w; /*!< max width of original page images */ - l_int32 h; /*!< max height of original page images */ - l_int32 nclass; /*!< number of classes */ - l_int32 latticew; /*!< lattice width for template composite */ - l_int32 latticeh; /*!< lattice height for template composite */ - struct Numa *naclass; /*!< array of class ids for each component */ - struct Numa *napage; /*!< array of page nums for each component */ - struct Pta *ptaul; /*!< array of UL corners at which the */ - /*!< template is to be placed for each */ - /*!< component */ -}; -typedef struct JbData JBDATA; - - - /*! Classifier methods */ -enum { - JB_RANKHAUS = 0, - JB_CORRELATION = 1 -}; - - /*! For jbGetComponents(): type of component to extract from images */ -enum { - JB_CONN_COMPS = 0, - JB_CHARACTERS = 1, - JB_WORDS = 2 -}; - - /*! These parameters are used for naming the two files - * in which the jbig2-like compressed data is stored. */ -#define JB_TEMPLATE_EXT ".templates.png" -#define JB_DATA_EXT ".data" - - -#endif /* LEPTONICA_JBCLASS_H */ diff --git a/WebRtc.NET/include/leptonica/leptwin.h b/WebRtc.NET/include/leptonica/leptwin.h deleted file mode 100644 index 451da6b6..00000000 --- a/WebRtc.NET/include/leptonica/leptwin.h +++ /dev/null @@ -1,45 +0,0 @@ -/*====================================================================* - - Copyright (C) 2001 Leptonica. All rights reserved. - - - - Redistribution and use in source and binary forms, with or without - - modification, are permitted provided that the following conditions - - are met: - - 1. Redistributions of source code must retain the above copyright - - notice, this list of conditions and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above - - copyright notice, this list of conditions and the following - - disclaimer in the documentation and/or other materials - - provided with the distribution. - - - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - - ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - - LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - - A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL ANY - - CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - - EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - - PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - - PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY - - OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - - NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - - SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - *====================================================================*/ - -#ifdef _WIN32 -#ifndef LEPTONICA_LEPTWIN_H -#define LEPTONICA_LEPTWIN_H - -#include "allheaders.h" -#include - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -LEPT_DLL extern HBITMAP pixGetWindowsHBITMAP( PIX *pixs ); - -#ifdef __cplusplus -} -#endif /* __cplusplus */ - -#endif /* LEPTONICA_LEPTWIN_H */ -#endif /* _WIN32 */ diff --git a/WebRtc.NET/include/leptonica/list.h b/WebRtc.NET/include/leptonica/list.h deleted file mode 100644 index d207e79f..00000000 --- a/WebRtc.NET/include/leptonica/list.h +++ /dev/null @@ -1,90 +0,0 @@ -/*====================================================================* - - Copyright (C) 2001 Leptonica. All rights reserved. - - - - Redistribution and use in source and binary forms, with or without - - modification, are permitted provided that the following conditions - - are met: - - 1. Redistributions of source code must retain the above copyright - - notice, this list of conditions and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above - - copyright notice, this list of conditions and the following - - disclaimer in the documentation and/or other materials - - provided with the distribution. - - - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - - ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - - LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - - A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL ANY - - CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - - EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - - PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - - PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY - - OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - - NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - - SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - *====================================================================*/ - - -#ifndef LEPTONICA_LIST_H -#define LEPTONICA_LIST_H - -/*! - * \file list.h - * - *
- *       Cell for double-linked lists
- *
- *       This allows composition of a list of cells with
- *           prev, next and data pointers.  Generic data
- *           structures hang on the list cell data pointers.
- *
- *       The list is not circular because that would add much
- *           complexity in traversing the list under general
- *           conditions where list cells can be added and removed.
- *           The only disadvantage of not having the head point to
- *           the last cell is that the list must be traversed to
- *           find its tail.  However, this traversal is fast, and
- *           the listRemoveFromTail() function updates the tail
- *           so there is no searching overhead with repeated use.
- *
- *       The list macros are used to run through a list, and their
- *       use is encouraged.  They are invoked, e.g., as
- *
- *             DLLIST  *head, *elem;
- *             ...
- *             L_BEGIN_LIST_FORWARD(head, elem)
- *                 data >
- *             L_END_LIST
- * 
- */ - -struct DoubleLinkedList -{ - struct DoubleLinkedList *prev; - struct DoubleLinkedList *next; - void *data; -}; -typedef struct DoubleLinkedList DLLIST; - - - /*! Simple list traverse macro - forward */ -#define L_BEGIN_LIST_FORWARD(head, element) \ - { \ - DLLIST *_leptvar_nextelem_; \ - for ((element) = (head); (element); (element) = _leptvar_nextelem_) { \ - _leptvar_nextelem_ = (element)->next; - - - /*! Simple list traverse macro - reverse */ -#define L_BEGIN_LIST_REVERSE(tail, element) \ - { \ - DLLIST *_leptvar_prevelem_; \ - for ((element) = (tail); (element); (element) = _leptvar_prevelem_) { \ - _leptvar_prevelem_ = (element)->prev; - - - /*! Simple list traverse macro - end of a list traverse */ -#define L_END_LIST }} - - -#endif /* LEPTONICA_LIST_H */ diff --git a/WebRtc.NET/include/leptonica/morph.h b/WebRtc.NET/include/leptonica/morph.h deleted file mode 100644 index c0cd7987..00000000 --- a/WebRtc.NET/include/leptonica/morph.h +++ /dev/null @@ -1,248 +0,0 @@ -/*====================================================================* - - Copyright (C) 2001 Leptonica. All rights reserved. - - - - Redistribution and use in source and binary forms, with or without - - modification, are permitted provided that the following conditions - - are met: - - 1. Redistributions of source code must retain the above copyright - - notice, this list of conditions and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above - - copyright notice, this list of conditions and the following - - disclaimer in the documentation and/or other materials - - provided with the distribution. - - - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - - ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - - LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - - A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL ANY - - CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - - EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - - PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - - PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY - - OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - - NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - - SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - *====================================================================*/ - -#ifndef LEPTONICA_MORPH_H -#define LEPTONICA_MORPH_H - -/*! - * \file morph.h - * - *
- *  Contains the following structs:
- *      struct Sel
- *      struct Sela
- *      struct Kernel
- *
- *  Contains definitions for:
- *      morphological b.c. flags
- *      structuring element types
- *      runlength flags for granulometry
- *      direction flags for grayscale morphology
- *      morphological operation flags
- *      standard border size
- *      grayscale intensity scaling flags
- *      morphological tophat flags
- *      arithmetic and logical operator flags
- *      grayscale morphology selection flags
- *      distance function b.c. flags
- *      image comparison flags
- *      color content flags
- * 
- */ - -/*-------------------------------------------------------------------------* - * Sel and Sel array * - *-------------------------------------------------------------------------*/ -#define SEL_VERSION_NUMBER 1 - -/*! Selection */ -struct Sel -{ - l_int32 sy; /*!< sel height */ - l_int32 sx; /*!< sel width */ - l_int32 cy; /*!< y location of sel origin */ - l_int32 cx; /*!< x location of sel origin */ - l_int32 **data; /*!< {0,1,2}; data[i][j] in [row][col] order */ - char *name; /*!< used to find sel by name */ -}; -typedef struct Sel SEL; - -/*! Array of Sel */ -struct Sela -{ - l_int32 n; /*!< number of sel actually stored */ - l_int32 nalloc; /*!< size of allocated ptr array */ - struct Sel **sel; /*!< sel ptr array */ -}; -typedef struct Sela SELA; - - -/*-------------------------------------------------------------------------* - * Kernel * - *-------------------------------------------------------------------------*/ -#define KERNEL_VERSION_NUMBER 2 - -/*! Kernel */ -struct L_Kernel -{ - l_int32 sy; /*!< kernel height */ - l_int32 sx; /*!< kernel width */ - l_int32 cy; /*!< y location of kernel origin */ - l_int32 cx; /*!< x location of kernel origin */ - l_float32 **data; /*!< data[i][j] in [row][col] order */ -}; -typedef struct L_Kernel L_KERNEL; - - -/*-------------------------------------------------------------------------* - * Morphological boundary condition flags * - * * - * Two types of boundary condition for erosion. * - * The global variable MORPH_BC takes on one of these two values. * - * See notes in morph.c for usage. * - *-------------------------------------------------------------------------*/ - -/*! Morphological boundary condition flags */ -enum { - SYMMETRIC_MORPH_BC = 0, - ASYMMETRIC_MORPH_BC = 1 -}; - -/*-------------------------------------------------------------------------* - * Structuring element types * - *-------------------------------------------------------------------------*/ - -/*! Structuring element types */ -enum { - SEL_DONT_CARE = 0, - SEL_HIT = 1, - SEL_MISS = 2 -}; - -/*-------------------------------------------------------------------------* - * Runlength flags for granulometry * - *-------------------------------------------------------------------------*/ - -/*! Runlength flags for granulometry */ -enum { - L_RUN_OFF = 0, - L_RUN_ON = 1 -}; - -/*-------------------------------------------------------------------------* - * Direction flags for grayscale morphology, granulometry, * - * composable Sels, convolution, etc. * - *-------------------------------------------------------------------------*/ - -/*! Direction flags */ -enum { - L_HORIZ = 1, - L_VERT = 2, - L_BOTH_DIRECTIONS = 3 -}; - -/*-------------------------------------------------------------------------* - * Morphological operation flags * - *-------------------------------------------------------------------------*/ - -/*! Morphological operation flags */ -enum { - L_MORPH_DILATE = 1, - L_MORPH_ERODE = 2, - L_MORPH_OPEN = 3, - L_MORPH_CLOSE = 4, - L_MORPH_HMT = 5 -}; - -/*-------------------------------------------------------------------------* - * Grayscale intensity scaling flags * - *-------------------------------------------------------------------------*/ - -/*! Grayscale intensity scaling flags */ -enum { - L_LINEAR_SCALE = 1, - L_LOG_SCALE = 2 -}; - -/*-------------------------------------------------------------------------* - * Morphological tophat flags * - *-------------------------------------------------------------------------*/ - -/*! Morphological tophat flags */ -enum { - L_TOPHAT_WHITE = 0, - L_TOPHAT_BLACK = 1 -}; - -/*-------------------------------------------------------------------------* - * Arithmetic and logical operator flags * - * (use on grayscale images and Numas) * - *-------------------------------------------------------------------------*/ - -/*! Arithmetic and logical operator flags */ -enum { - L_ARITH_ADD = 1, - L_ARITH_SUBTRACT = 2, - L_ARITH_MULTIPLY = 3, /* on numas only */ - L_ARITH_DIVIDE = 4, /* on numas only */ - L_UNION = 5, /* on numas only */ - L_INTERSECTION = 6, /* on numas only */ - L_SUBTRACTION = 7, /* on numas only */ - L_EXCLUSIVE_OR = 8 /* on numas only */ -}; - -/*-------------------------------------------------------------------------* - * Min/max selection flags * - *-------------------------------------------------------------------------*/ - -/*! Min/max selection flags */ -enum { - L_CHOOSE_MIN = 1, /* useful in a downscaling "erosion" */ - L_CHOOSE_MAX = 2, /* useful in a downscaling "dilation" */ - L_CHOOSE_MAXDIFF = 3, /* useful in a downscaling contrast */ - L_CHOOSE_MIN_BOOST = 4, /* use a modification of the min value */ - L_CHOOSE_MAX_BOOST = 5 /* use a modification of the max value */ -}; - -/*-------------------------------------------------------------------------* - * Distance function b.c. flags * - *-------------------------------------------------------------------------*/ - -/*! Distance function b.c. flags */ -enum { - L_BOUNDARY_BG = 1, /* assume bg outside image */ - L_BOUNDARY_FG = 2 /* assume fg outside image */ -}; - -/*-------------------------------------------------------------------------* - * Image comparison flags * - *-------------------------------------------------------------------------*/ - -/*! Image comparison flags */ -enum { - L_COMPARE_XOR = 1, - L_COMPARE_SUBTRACT = 2, - L_COMPARE_ABS_DIFF = 3 -}; - -/*-------------------------------------------------------------------------* - * Color content flags * - *-------------------------------------------------------------------------*/ - -/*! Color content flags */ -enum { - L_MAX_DIFF_FROM_AVERAGE_2 = 1, - L_MAX_MIN_DIFF_FROM_2 = 2, - L_MAX_DIFF = 3 -}; - -/*-------------------------------------------------------------------------* - * Standard size of border added around images for special processing * - *-------------------------------------------------------------------------*/ -static const l_int32 ADDED_BORDER = 32; /*!< pixels, not bits */ - - -#endif /* LEPTONICA_MORPH_H */ diff --git a/WebRtc.NET/include/leptonica/pix.h b/WebRtc.NET/include/leptonica/pix.h deleted file mode 100644 index 466243f3..00000000 --- a/WebRtc.NET/include/leptonica/pix.h +++ /dev/null @@ -1,1281 +0,0 @@ -/*====================================================================* - - Copyright (C) 2001 Leptonica. All rights reserved. - - - - Redistribution and use in source and binary forms, with or without - - modification, are permitted provided that the following conditions - - are met: - - 1. Redistributions of source code must retain the above copyright - - notice, this list of conditions and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above - - copyright notice, this list of conditions and the following - - disclaimer in the documentation and/or other materials - - provided with the distribution. - - - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - - ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - - LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - - A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL ANY - - CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - - EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - - PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - - PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY - - OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - - NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - - SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - *====================================================================*/ - -#ifndef LEPTONICA_PIX_H -#define LEPTONICA_PIX_H - -/*! - * \file pix.h - * - *
- *   Valid image types in leptonica:
- *       Pix: 1 bpp, with and without colormap
- *       Pix: 2 bpp, with and without colormap
- *       Pix: 4 bpp, with and without colormap
- *       Pix: 8 bpp, with and without colormap
- *       Pix: 16 bpp (1 spp)
- *       Pix: 32 bpp (rgb, 3 spp)
- *       Pix: 32 bpp (rgba, 4 spp)
- *       FPix: 32 bpp float
- *       DPix: 64 bpp double
- *       Notes:
- *          (1) The only valid Pix image type with alpha is rgba.
- *              In particular, the alpha component is not used in
- *              cmapped images.
- *          (2) PixComp can hold any Pix with IFF_PNG encoding.
- *
- *   Contents:
- *
- *   (1) This file defines most of the image-related structs used in leptonica:
- *         struct Pix
- *         struct PixColormap
- *         struct RGBA_Quad
- *         struct Pixa
- *         struct Pixaa
- *         struct Box
- *         struct Boxa
- *         struct Boxaa
- *         struct Pta
- *         struct Ptaa
- *         struct Pixacc
- *         struct PixTiling
- *         struct FPix
- *         struct FPixa
- *         struct DPix
- *         struct PixComp
- *         struct PixaComp
- *
- *   (2) This file has definitions for:
- *         Colors for RGB
- *         Colors for drawing boxes
- *         Perceptual color weights
- *         Colormap conversion flags
- *         Rasterop bit flags
- *         Structure access flags (for insert, copy, clone, copy-clone)
- *         Sorting flags (by type and direction)
- *         Blending flags
- *         Graphics pixel setting flags
- *         Size filtering flags
- *         Color component selection flags
- *         16-bit conversion flags
- *         Rotation and shear flags
- *         Affine transform order flags
- *         Grayscale filling flags
- *         Flags for setting to white or black
- *         Flags for getting white or black pixel value
- *         Flags for 8 and 16 bit pixel sums
- *         Dithering flags
- *         Distance flags
- *         Statistical measures
- *         Set selection flags
- *         Text orientation flags
- *         Edge orientation flags
- *         Line orientation flags
- *         Scan direction flags
- *         Box size adjustment flags
- *         Flags for selecting box boundaries from two choices
- *         Handling overlapping bounding boxes in boxa
- *         Flags for replacing invalid boxes
- *         Horizontal warp
- *         Pixel selection for resampling
- *         Thinning flags
- *         Runlength flags
- *         Edge filter flags
- *         Subpixel color component ordering in LCD display
- *         HSV histogram flags
- *         Region flags (inclusion, exclusion)
- *         Flags for adding text to a pix
- *         Flags for plotting on a pix
- *         Flags for selecting display program
- *         Flags in the 'special' pix field for non-default operations
- *         Handling negative values in conversion to unsigned int
- *         Relative to zero flags
- *         Flags for adding or removing traling slash from string
- *
- *   (3) This file has typedefs for the pix allocator and deallocator functions
- *         alloc_fn()
- *         dealloc_fn().
- * 
- */ - - -/*-------------------------------------------------------------------------* - * Basic Pix * - *-------------------------------------------------------------------------*/ - /* The 'special' field is by default 0, but it can hold integers - * that direct non-default actions, e.g., in png and jpeg I/O. */ - -/*! Basic Pix */ -struct Pix -{ - l_uint32 w; /*!< width in pixels */ - l_uint32 h; /*!< height in pixels */ - l_uint32 d; /*!< depth in bits (bpp) */ - l_uint32 spp; /*!< number of samples per pixel */ - l_uint32 wpl; /*!< 32-bit words/line */ - l_uint32 refcount; /*!< reference count (1 if no clones) */ - l_int32 xres; /*!< image res (ppi) in x direction */ - /*!< (use 0 if unknown) */ - l_int32 yres; /*!< image res (ppi) in y direction */ - /*!< (use 0 if unknown) */ - l_int32 informat; /*!< input file format, IFF_* */ - l_int32 special; /*!< special instructions for I/O, etc */ - char *text; /*!< text string associated with pix */ - struct PixColormap *colormap; /*!< colormap (may be null) */ - l_uint32 *data; /*!< the image data */ -}; -typedef struct Pix PIX; - -/*! Colormap of a Pix */ -struct PixColormap -{ - void *array; /*!< colormap table (array of RGBA_QUAD) */ - l_int32 depth; /*!< of pix (1, 2, 4 or 8 bpp) */ - l_int32 nalloc; /*!< number of color entries allocated */ - l_int32 n; /*!< number of color entries used */ -}; -typedef struct PixColormap PIXCMAP; - - - /*! Colormap table entry (after the BMP version). - * Note that the BMP format stores the colormap table exactly - * as it appears here, with color samples being stored sequentially, - * in the order (b,g,r,a). */ -struct RGBA_Quad -{ - l_uint8 blue; /*!< blue value */ - l_uint8 green; /*!< green value */ - l_uint8 red; /*!< red value */ - l_uint8 alpha; /*!< alpha value */ -}; -typedef struct RGBA_Quad RGBA_QUAD; - - - -/*-------------------------------------------------------------------------* - * Colors for 32 bpp * - *-------------------------------------------------------------------------*/ -/*
- *  Notes:
- *      (1) These are the byte indices for colors in 32 bpp images.
- *          They are used through the GET/SET_DATA_BYTE accessors.
- *          The 4th byte, typically known as the "alpha channel" and used
- *          for blending, is used to a small extent in leptonica.
- *      (2) Do not change these values!  If you redefine them, functions
- *          that have the shifts hardcoded for efficiency and conciseness
- *          (instead of using the constants below) will break.  These
- *          functions are labelled with "***"  next to their names at
- *          the top of the files in which they are defined.
- *      (3) The shifts to extract the red, green, blue and alpha components
- *          from a 32 bit pixel are defined here.
- * 
- */ - -/*! Colors for 32 bpp */ -enum { - COLOR_RED = 0, /*!< red color index in RGBA_QUAD */ - COLOR_GREEN = 1, /*!< green color index in RGBA_QUAD */ - COLOR_BLUE = 2, /*!< blue color index in RGBA_QUAD */ - L_ALPHA_CHANNEL = 3 /*!< alpha value index in RGBA_QUAD */ -}; - -static const l_int32 L_RED_SHIFT = - 8 * (sizeof(l_uint32) - 1 - COLOR_RED); /* 24 */ -static const l_int32 L_GREEN_SHIFT = - 8 * (sizeof(l_uint32) - 1 - COLOR_GREEN); /* 16 */ -static const l_int32 L_BLUE_SHIFT = - 8 * (sizeof(l_uint32) - 1 - COLOR_BLUE); /* 8 */ -static const l_int32 L_ALPHA_SHIFT = - 8 * (sizeof(l_uint32) - 1 - L_ALPHA_CHANNEL); /* 0 */ - - -/*-------------------------------------------------------------------------* - * Colors for drawing boxes * - *-------------------------------------------------------------------------*/ -/*! Colors for drawing boxes */ -enum { - L_DRAW_RED = 0, /*!< draw in red */ - L_DRAW_GREEN = 1, /*!< draw in green */ - L_DRAW_BLUE = 2, /*!< draw in blue */ - L_DRAW_SPECIFIED = 3, /*!< draw specified color */ - L_DRAW_RGB = 4, /*!< draw as sequence of r,g,b */ - L_DRAW_RANDOM = 5 /*!< draw randomly chosen colors */ -}; - - -/*-------------------------------------------------------------------------* - * Perceptual color weights * - *-------------------------------------------------------------------------*/ -/*
- *  Notes:
- *      (1) These perceptual weighting factors are ad-hoc, but they do
- *          add up to 1.  Unlike, for example, the weighting factors for
- *          converting RGB to luminance, or more specifically to Y in the
- *          YUV colorspace.  Those numbers come from the
- *          International Telecommunications Union, via ITU-R.
- * 
- */ -static const l_float32 L_RED_WEIGHT = 0.3; /*!< Percept. weight for red */ -static const l_float32 L_GREEN_WEIGHT = 0.5; /*!< Percept. weight for green */ -static const l_float32 L_BLUE_WEIGHT = 0.2; /*!< Percept. weight for blue */ - - -/*-------------------------------------------------------------------------* - * Flags for colormap conversion * - *-------------------------------------------------------------------------*/ -/*! Flags for colormap conversion */ -enum { - REMOVE_CMAP_TO_BINARY = 0, /*!< remove colormap for conv to 1 bpp */ - REMOVE_CMAP_TO_GRAYSCALE = 1, /*!< remove colormap for conv to 8 bpp */ - REMOVE_CMAP_TO_FULL_COLOR = 2, /*!< remove colormap for conv to 32 bpp */ - REMOVE_CMAP_WITH_ALPHA = 3, /*!< remove colormap and alpha */ - REMOVE_CMAP_BASED_ON_SRC = 4 /*!< remove depending on src format */ -}; - - -/*------------------------------------------------------------------------* - *! - *
- * The following operation bit flags have been modified from
- * Sun's pixrect.h.
- *
- * The 'op' in 'rasterop' is represented by an integer
- * composed with Boolean functions using the set of five integers
- * given below.  The integers, and the op codes resulting from
- * boolean expressions on them, need only be in the range from 0 to 15.
- * The function is applied on a per-pixel basis.
- *
- * Examples: the op code representing ORing the src and dest
- * is computed using the bit OR, as PIX_SRC | PIX_DST;  the op
- * code representing XORing src and dest is found from
- * PIX_SRC ^ PIX_DST;  the op code representing ANDing src and dest
- * is found from PIX_SRC & PIX_DST.  Note that
- * PIX_NOT(PIX_CLR) = PIX_SET, and v.v., as they must be.
- *
- * We use the following set of definitions:
- *
- *      #define   PIX_SRC      0xc
- *      #define   PIX_DST      0xa
- *      #define   PIX_NOT(op)  (op) ^ 0xf
- *      #define   PIX_CLR      0x0
- *      #define   PIX_SET      0xf
- *
- * These definitions differ from Sun's, in that Sun left-shifted
- * each value by 1 pixel, and used the least significant bit as a
- * flag for the "pseudo-operation" of clipping.  We don't need
- * this bit, because it is both efficient and safe ALWAYS to clip
- * the rectangles to the src and dest images, which is what we do.
- * See the notes in rop.h on the general choice of these bit flags.
- *
- * [If for some reason you need compatibility with Sun's xview package,
- * you can adopt the original Sun definitions to avoid redefinition conflicts:
- *
- *      #define   PIX_SRC      (0xc << 1)
- *      #define   PIX_DST      (0xa << 1)
- *      #define   PIX_NOT(op)  ((op) ^ 0x1e)
- *      #define   PIX_CLR      (0x0 << 1)
- *      #define   PIX_SET      (0xf << 1)
- * ]
- *
- * We have, for reference, the following 16 unique op flags:
- *
- *      PIX_CLR                           0000             0x0
- *      PIX_SET                           1111             0xf
- *      PIX_SRC                           1100             0xc
- *      PIX_DST                           1010             0xa
- *      PIX_NOT(PIX_SRC)                  0011             0x3
- *      PIX_NOT(PIX_DST)                  0101             0x5
- *      PIX_SRC | PIX_DST                 1110             0xe
- *      PIX_SRC & PIX_DST                 1000             0x8
- *      PIX_SRC ^ PIX_DST                 0110             0x6
- *      PIX_NOT(PIX_SRC) | PIX_DST        1011             0xb
- *      PIX_NOT(PIX_SRC) & PIX_DST        0010             0x2
- *      PIX_SRC | PIX_NOT(PIX_DST)        1101             0xd
- *      PIX_SRC & PIX_NOT(PIX_DST)        0100             0x4
- *      PIX_NOT(PIX_SRC | PIX_DST)        0001             0x1
- *      PIX_NOT(PIX_SRC & PIX_DST)        0111             0x7
- *      PIX_NOT(PIX_SRC ^ PIX_DST)        1001             0x9
- *
- * 
- *-------------------------------------------------------------------------*/ - -#define PIX_SRC (0xc) /*!< use source pixels */ -#define PIX_DST (0xa) /*!< use destination pixels */ -#define PIX_NOT(op) ((op) ^ 0x0f) /*!< invert operation %op */ -#define PIX_CLR (0x0) /*!< clear pixels */ -#define PIX_SET (0xf) /*!< set pixels */ - -#define PIX_PAINT (PIX_SRC | PIX_DST) /*!< paint = src | dst */ -#define PIX_MASK (PIX_SRC & PIX_DST) /*!< mask = src & dst */ -#define PIX_SUBTRACT (PIX_DST & PIX_NOT(PIX_SRC)) /*!< subtract = */ - /*!< src & !dst */ -#define PIX_XOR (PIX_SRC ^ PIX_DST) /*!< xor = src ^ dst */ - - -/*-------------------------------------------------------------------------* - *
- *   Important Notes:
- *
- *       (1) The image data is stored in a single contiguous
- *           array of l_uint32, into which the pixels are packed.
- *           By "packed" we mean that there are no unused bits
- *           between pixels, except for end-of-line padding to
- *           satisfy item (2) below.
- *
- *       (2) Every image raster line begins on a 32-bit word
- *           boundary within this array.
- *
- *       (3) Pix image data is stored in 32-bit units, with the
- *           pixels ordered from left to right in the image being
- *           stored in order from the MSB to LSB within the word,
- *           for both big-endian and little-endian machines.
- *           This is the natural ordering for big-endian machines,
- *           as successive bytes are stored and fetched progressively
- *           to the right.  However, for little-endians, when storing
- *           we re-order the bytes from this byte stream order, and
- *           reshuffle again for byte access on 32-bit entities.
- *           So if the bytes come in sequence from left to right, we
- *           store them on little-endians in byte order:
- *                3 2 1 0 7 6 5 4 ...
- *           This MSB to LSB ordering allows left and right shift
- *           operations on 32 bit words to move the pixels properly.
- *
- *       (4) We use 32 bit pixels for both RGB and RGBA color images.
- *           The A (alpha) byte is ignored in most leptonica functions
- *           operating on color images.  Within each 4 byte pixel, the
- *           colors are ordered from MSB to LSB, as follows:
- *
- *                |  MSB  |  2nd MSB  |  3rd MSB  |  LSB  |
- *                   red      green       blue      alpha
- *                    0         1           2         3   (big-endian)
- *                    3         2           1         0   (little-endian)
- *
- *           Because we use MSB to LSB ordering within the 32-bit word,
- *           the individual 8-bit samples can be accessed with
- *           GET_DATA_BYTE and SET_DATA_BYTE macros, using the
- *           (implicitly big-ending) ordering
- *                 red:    byte 0  (MSB)
- *                 green:  byte 1  (2nd MSB)
- *                 blue:   byte 2  (3rd MSB)
- *                 alpha:  byte 3  (LSB)
- *
- *           The specific color assignment is made in this file,
- *           through the definitions of COLOR_RED, etc.  Then the R, G
- *           B and A sample values can be retrieved using
- *                 redval = GET_DATA_BYTE(&pixel, COLOR_RED);
- *                 greenval = GET_DATA_BYTE(&pixel, COLOR_GREEN);
- *                 blueval = GET_DATA_BYTE(&pixel, COLOR_BLUE);
- *                 alphaval = GET_DATA_BYTE(&pixel, L_ALPHA_CHANNEL);
- *           and they can be set with
- *                 SET_DATA_BYTE(&pixel, COLOR_RED, redval);
- *                 SET_DATA_BYTE(&pixel, COLOR_GREEN, greenval);
- *                 SET_DATA_BYTE(&pixel, COLOR_BLUE, blueval);
- *                 SET_DATA_BYTE(&pixel, L_ALPHA_CHANNEL, alphaval);
- *
- *           For extra speed we extract these components directly
- *           by shifting and masking, explicitly using the values in
- *           L_RED_SHIFT, etc.:
- *                 (pixel32 >> L_RED_SHIFT) & 0xff;         (red)
- *                 (pixel32 >> L_GREEN_SHIFT) & 0xff;       (green)
- *                 (pixel32 >> L_BLUE_SHIFT) & 0xff;        (blue)
- *                 (pixel32 >> L_ALPHA_SHIFT) & 0xff;       (alpha)
- *           All these operations work properly on both big- and little-endians.
- *
- *           For a few situations, these color shift values are hard-coded.
- *           Changing the RGB color component ordering through the assignments
- *           in this file will cause functions marked with "***" to fail.
- *
- *       (5) A reference count is held within each pix, giving the
- *           number of ptrs to the pix.  When a pixClone() call
- *           is made, the ref count is increased by 1, and
- *           when a pixDestroy() call is made, the reference count
- *           of the pix is decremented.  The pix is only destroyed
- *           when the reference count goes to zero.
- *
- *       (6) The version numbers (below) are used in the serialization
- *           of these data structures.  They are placed in the files,
- *           and rarely (if ever) change.  Provision is currently made for
- *           backward compatibility in reading from boxaa version 2.
- *
- *       (7) The serialization dependencies are as follows:
- *               pixaa  :  pixa  :  boxa
- *               boxaa  :  boxa
- *           So, for example, pixaa and boxaa can be changed without
- *           forcing a change in pixa or boxa.  However, if pixa is
- *           changed, it forces a change in pixaa, and if boxa is
- *           changed, if forces a change in the other three.
- *           We define four version numbers:
- *               PIXAA_VERSION_NUMBER
- *               PIXA_VERSION_NUMBER
- *               BOXAA_VERSION_NUMBER
- *               BOXA_VERSION_NUMBER
- * 
- *-------------------------------------------------------------------------*/ - - - -/*-------------------------------------------------------------------------* - * Array of pix * - *-------------------------------------------------------------------------*/ - - /* Serialization for primary data structures */ -#define PIXAA_VERSION_NUMBER 2 /*!< Version for Pixaa serialization */ -#define PIXA_VERSION_NUMBER 2 /*!< Version for Pixa serialization */ -#define BOXA_VERSION_NUMBER 2 /*!< Version for Boxa serialization */ -#define BOXAA_VERSION_NUMBER 3 /*!< Version for Boxaa serialization */ - -/*! Array of pix */ -struct Pixa -{ - l_int32 n; /*!< number of Pix in ptr array */ - l_int32 nalloc; /*!< number of Pix ptrs allocated */ - l_uint32 refcount; /*!< reference count (1 if no clones) */ - struct Pix **pix; /*!< the array of ptrs to pix */ - struct Boxa *boxa; /*!< array of boxes */ -}; -typedef struct Pixa PIXA; - -/*! Array of arrays of pix */ -struct Pixaa -{ - l_int32 n; /*!< number of Pixa in ptr array */ - l_int32 nalloc; /*!< number of Pixa ptrs allocated */ - struct Pixa **pixa; /*!< array of ptrs to pixa */ - struct Boxa *boxa; /*!< array of boxes */ -}; -typedef struct Pixaa PIXAA; - - -/*-------------------------------------------------------------------------* - * Basic rectangle and rectangle arrays * - *-------------------------------------------------------------------------*/ - -/*! Basic rectangle */ -struct Box -{ - l_int32 x; /*!< left coordinate */ - l_int32 y; /*!< top coordinate */ - l_int32 w; /*!< box width */ - l_int32 h; /*!< box height */ - l_uint32 refcount; /*!< reference count (1 if no clones) */ - -}; -typedef struct Box BOX; - -/*! Array of Box */ -struct Boxa -{ - l_int32 n; /*!< number of box in ptr array */ - l_int32 nalloc; /*!< number of box ptrs allocated */ - l_uint32 refcount; /*!< reference count (1 if no clones) */ - struct Box **box; /*!< box ptr array */ -}; -typedef struct Boxa BOXA; - -/*! Array of Boxa */ -struct Boxaa -{ - l_int32 n; /*!< number of boxa in ptr array */ - l_int32 nalloc; /*!< number of boxa ptrs allocated */ - struct Boxa **boxa; /*!< boxa ptr array */ -}; -typedef struct Boxaa BOXAA; - - -/*-------------------------------------------------------------------------* - * Array of points * - *-------------------------------------------------------------------------*/ -#define PTA_VERSION_NUMBER 1 /*!< Version for Pta serialization */ - -/*! Array of points */ -struct Pta -{ - l_int32 n; /*!< actual number of pts */ - l_int32 nalloc; /*!< size of allocated arrays */ - l_uint32 refcount; /*!< reference count (1 if no clones) */ - l_float32 *x, *y; /*!< arrays of floats */ -}; -typedef struct Pta PTA; - - -/*-------------------------------------------------------------------------* - * Array of Pta * - *-------------------------------------------------------------------------*/ - -/*! Array of Pta */ -struct Ptaa -{ - l_int32 n; /*!< number of pta in ptr array */ - l_int32 nalloc; /*!< number of pta ptrs allocated */ - struct Pta **pta; /*!< pta ptr array */ -}; -typedef struct Ptaa PTAA; - - -/*-------------------------------------------------------------------------* - * Pix accumulator container * - *-------------------------------------------------------------------------*/ - -/*! Pix accumulator container */ -struct Pixacc -{ - l_int32 w; /*!< array width */ - l_int32 h; /*!< array height */ - l_int32 offset; /*!< used to allow negative */ - /*!< intermediate results */ - struct Pix *pix; /*!< the 32 bit accumulator pix */ -}; -typedef struct Pixacc PIXACC; - - -/*-------------------------------------------------------------------------* - * Pix tiling * - *-------------------------------------------------------------------------*/ - -/*! Pix tiling */ -struct PixTiling -{ - struct Pix *pix; /*!< input pix (a clone) */ - l_int32 nx; /*!< number of tiles horizontally */ - l_int32 ny; /*!< number of tiles vertically */ - l_int32 w; /*!< tile width */ - l_int32 h; /*!< tile height */ - l_int32 xoverlap; /*!< overlap on left and right */ - l_int32 yoverlap; /*!< overlap on top and bottom */ - l_int32 strip; /*!< strip for paint; default is TRUE */ -}; -typedef struct PixTiling PIXTILING; - - -/*-------------------------------------------------------------------------* - * FPix: pix with float array * - *-------------------------------------------------------------------------*/ -#define FPIX_VERSION_NUMBER 2 /*!< Version for FPix serialization */ - -/*! Pix with float array */ -struct FPix -{ - l_int32 w; /*!< width in pixels */ - l_int32 h; /*!< height in pixels */ - l_int32 wpl; /*!< 32-bit words/line */ - l_uint32 refcount; /*!< reference count (1 if no clones) */ - l_int32 xres; /*!< image res (ppi) in x direction */ - /*!< (use 0 if unknown) */ - l_int32 yres; /*!< image res (ppi) in y direction */ - /*!< (use 0 if unknown) */ - l_float32 *data; /*!< the float image data */ -}; -typedef struct FPix FPIX; - -/*! Array of FPix */ -struct FPixa -{ - l_int32 n; /*!< number of fpix in ptr array */ - l_int32 nalloc; /*!< number of fpix ptrs allocated */ - l_uint32 refcount; /*!< reference count (1 if no clones) */ - struct FPix **fpix; /*!< the array of ptrs to fpix */ -}; -typedef struct FPixa FPIXA; - - -/*-------------------------------------------------------------------------* - * DPix: pix with double array * - *-------------------------------------------------------------------------*/ -#define DPIX_VERSION_NUMBER 2 /*!< Version for DPix serialization */ - -/*! Pix with double array */ -struct DPix -{ - l_int32 w; /*!< width in pixels */ - l_int32 h; /*!< height in pixels */ - l_int32 wpl; /*!< 32-bit words/line */ - l_uint32 refcount; /*!< reference count (1 if no clones) */ - l_int32 xres; /*!< image res (ppi) in x direction */ - /*!< (use 0 if unknown) */ - l_int32 yres; /*!< image res (ppi) in y direction */ - /*!< (use 0 if unknown) */ - l_float64 *data; /*!< the double image data */ -}; -typedef struct DPix DPIX; - - -/*-------------------------------------------------------------------------* - * PixComp: compressed pix * - *-------------------------------------------------------------------------*/ - -/*! Compressed Pix */ -struct PixComp -{ - l_int32 w; /*!< width in pixels */ - l_int32 h; /*!< height in pixels */ - l_int32 d; /*!< depth in bits */ - l_int32 xres; /*!< image res (ppi) in x direction */ - /*!< (use 0 if unknown) */ - l_int32 yres; /*!< image res (ppi) in y direction */ - /*!< (use 0 if unknown) */ - l_int32 comptype; /*!< compressed format (IFF_TIFF_G4, */ - /*!< IFF_PNG, IFF_JFIF_JPEG) */ - char *text; /*!< text string associated with pix */ - l_int32 cmapflag; /*!< flag (1 for cmap, 0 otherwise) */ - l_uint8 *data; /*!< the compressed image data */ - size_t size; /*!< size of the data array */ -}; -typedef struct PixComp PIXC; - - -/*-------------------------------------------------------------------------* - * PixaComp: array of compressed pix * - *-------------------------------------------------------------------------*/ -#define PIXACOMP_VERSION_NUMBER 2 /*!< Version for PixaComp serialization */ - -/*! Array of compressed pix */ -struct PixaComp -{ - l_int32 n; /*!< number of PixComp in ptr array */ - l_int32 nalloc; /*!< number of PixComp ptrs allocated */ - l_int32 offset; /*!< indexing offset into ptr array */ - struct PixComp **pixc; /*!< the array of ptrs to PixComp */ - struct Boxa *boxa; /*!< array of boxes */ -}; -typedef struct PixaComp PIXAC; - - -/*-------------------------------------------------------------------------* - * Access and storage flags * - *-------------------------------------------------------------------------*/ -/* - *
- *  For Pix, Box, Pta and Numa, there are 3 standard methods for handling
- *  the retrieval or insertion of a struct:
- *     (1) direct insertion (Don't do this if there is another handle
- *                           somewhere to this same struct!)
- *     (2) copy (Always safe, sets up a refcount of 1 on the new object.
- *               Can be undesirable if very large, such as an image or
- *               an array of images.)
- *     (3) clone (Makes another handle to the same struct, and bumps the
- *                refcount up by 1.  Safe to do unless you're changing
- *                data through one of the handles but don't want those
- *                changes to be seen by the other handle.)
- *
- *  For Pixa and Boxa, which are structs that hold an array of clonable
- *  structs, there is an additional method:
- *     (4) copy-clone (Makes a new higher-level struct with a refcount
- *                     of 1, but clones all the structs in the array.)
- *
- *  Unlike the other structs, when retrieving a string from an Sarray,
- *  you are allowed to get a handle without a copy or clone (i.e., that
- *  you don't own!).  You must not free or insert such a string!
- *  Specifically, for an Sarray, the copyflag for retrieval is either:
- *         L_COPY or L_NOCOPY
- *  and for insertion, the copyflag is either:
- *         L_COPY or one of {L_INSERT , L_NOCOPY} (the latter are equivalent
- *                                                 for insertion))
- * 
- */ - -/*! Access and storage flags */ -enum { - L_NOCOPY = 0, /*!< do not copy the object; do not delete the ptr */ - L_COPY = 1, /*!< make/use a copy of the object */ - L_CLONE = 2, /*!< make/use clone (ref count) of the object */ - L_COPY_CLONE = 3 /*!< make a new object and fill each object in the */ - /*!< array(s) with clones */ -}; -static const l_int32 L_INSERT = 0; /*!< stuff it in; no copy or clone */ - - -/*----------------------------------------------------------------------------* - * Sort flags * - *----------------------------------------------------------------------------*/ - -/*! Sort mode flags */ -enum { - L_SHELL_SORT = 1, /*!< use shell sort */ - L_BIN_SORT = 2 /*!< use bin sort */ -}; - -/*! Sort order flags */ -enum { - L_SORT_INCREASING = 1, /*!< sort in increasing order */ - L_SORT_DECREASING = 2 /*!< sort in decreasing order */ -}; - -/*! Sort type flags */ -enum { - L_SORT_BY_X = 1, /*!< sort box or c.c. by left edge location */ - L_SORT_BY_Y = 2, /*!< sort box or c.c. by top edge location */ - L_SORT_BY_RIGHT = 3, /*!< sort box or c.c. by right edge location */ - L_SORT_BY_BOT = 4, /*!< sort box or c.c. by bot edge location */ - L_SORT_BY_WIDTH = 5, /*!< sort box or c.c. by width */ - L_SORT_BY_HEIGHT = 6, /*!< sort box or c.c. by height */ - L_SORT_BY_MIN_DIMENSION = 7, /*!< sort box or c.c. by min dimension */ - L_SORT_BY_MAX_DIMENSION = 8, /*!< sort box or c.c. by max dimension */ - L_SORT_BY_PERIMETER = 9, /*!< sort box or c.c. by perimeter */ - L_SORT_BY_AREA = 10, /*!< sort box or c.c. by area */ - L_SORT_BY_ASPECT_RATIO = 11 /*!< sort box or c.c. by width/height ratio */ -}; - - -/*---------------------------------------------------------------------------* - * Blend flags * - *---------------------------------------------------------------------------*/ - -/*! Blend flags */ -enum { - L_BLEND_WITH_INVERSE = 1, /*!< add some of src inverse to itself */ - L_BLEND_TO_WHITE = 2, /*!< shift src colors towards white */ - L_BLEND_TO_BLACK = 3, /*!< shift src colors towards black */ - L_BLEND_GRAY = 4, /*!< blend src directly with blender */ - L_BLEND_GRAY_WITH_INVERSE = 5 /*!< add amount of src inverse to itself, */ - /*!< based on blender pix value */ -}; - -enum { - L_PAINT_LIGHT = 1, /*!< colorize non-black pixels */ - L_PAINT_DARK = 2 /*!< colorize non-white pixels */ -}; - - -/*-------------------------------------------------------------------------* - * Graphics pixel setting * - *-------------------------------------------------------------------------*/ - -/*! Graphics pixel setting */ -enum { - L_SET_PIXELS = 1, /*!< set all bits in each pixel to 1 */ - L_CLEAR_PIXELS = 2, /*!< set all bits in each pixel to 0 */ - L_FLIP_PIXELS = 3 /*!< flip all bits in each pixel */ -}; - - -/*-------------------------------------------------------------------------* - * Size and location filter flags * - *-------------------------------------------------------------------------*/ - -/*! Location filter flags */ -enum { - L_SELECT_WIDTH = 1, /*!< width must satisfy constraint */ - L_SELECT_HEIGHT = 2, /*!< height must satisfy constraint */ - L_SELECT_XVAL = 3, /*!< x value satisfy constraint */ - L_SELECT_YVAL = 4, /*!< y value must satisfy constraint */ - L_SELECT_IF_EITHER = 5, /*!< either width or height (or xval */ - /*!< or yval) can satisfy */ - L_SELECT_IF_BOTH = 6 /*!< both width and height (or xval */ - /*!< and yval must satisfy */ -}; - -/*! Size filter flags */ -enum { - L_SELECT_IF_LT = 1, /*!< save if value is less than threshold */ - L_SELECT_IF_GT = 2, /*!< save if value is more than threshold */ - L_SELECT_IF_LTE = 3, /*!< save if value is <= to the threshold */ - L_SELECT_IF_GTE = 4 /*!< save if value is >= to the threshold */ -}; - - -/*-------------------------------------------------------------------------* - * Color component selection flags * - *-------------------------------------------------------------------------*/ - -/*! Color component selection flags */ -enum { - L_SELECT_RED = 1, /*!< use red component */ - L_SELECT_GREEN = 2, /*!< use green component */ - L_SELECT_BLUE = 3, /*!< use blue component */ - L_SELECT_MIN = 4, /*!< use min color component */ - L_SELECT_MAX = 5, /*!< use max color component */ - L_SELECT_AVERAGE = 6 /*!< use average of color components */ -}; - - -/*-------------------------------------------------------------------------* - * 16-bit conversion flags * - *-------------------------------------------------------------------------*/ - -/*! 16-bit conversion flags */ -enum { - L_LS_BYTE = 1, /*!< use LSB */ - L_MS_BYTE = 2, /*!< use MSB */ - L_CLIP_TO_FF = 3, /*!< use max(val, 255) */ - L_LS_TWO_BYTES = 4, /*!< use two LSB */ - L_MS_TWO_BYTES = 5, /*!< use two MSB */ - L_CLIP_TO_FFFF = 6 /*!< use max(val, 65535) */ -}; - - -/*-------------------------------------------------------------------------* - * Rotate and shear flags * - *-------------------------------------------------------------------------*/ - -/*! Rotate flags */ -enum { - L_ROTATE_AREA_MAP = 1, /*!< use area map rotation, if possible */ - L_ROTATE_SHEAR = 2, /*!< use shear rotation */ - L_ROTATE_SAMPLING = 3 /*!< use sampling */ -}; - -/*! Background flags */ -enum { - L_BRING_IN_WHITE = 1, /*!< bring in white pixels from the outside */ - L_BRING_IN_BLACK = 2 /*!< bring in black pixels from the outside */ -}; - -/*! Shear flags */ -enum { - L_SHEAR_ABOUT_CORNER = 1, /*!< shear image about UL corner */ - L_SHEAR_ABOUT_CENTER = 2 /*!< shear image about center */ -}; - - -/*-------------------------------------------------------------------------* - * Affine transform order flags * - *-------------------------------------------------------------------------*/ - -/*! Affine transform order flags */ -enum { - L_TR_SC_RO = 1, /*!< translate, scale, rotate */ - L_SC_RO_TR = 2, /*!< scale, rotate, translate */ - L_RO_TR_SC = 3, /*!< rotate, translate, scale */ - L_TR_RO_SC = 4, /*!< translate, rotate, scale */ - L_RO_SC_TR = 5, /*!< rotate, scale, translate */ - L_SC_TR_RO = 6 /*!< scale, translate, rotate */ -}; - - -/*-------------------------------------------------------------------------* - * Grayscale filling flags * - *-------------------------------------------------------------------------*/ - -/*! Grayscale filling flags */ -enum { - L_FILL_WHITE = 1, /*!< fill white pixels (e.g, in fg map) */ - L_FILL_BLACK = 2 /*!< fill black pixels (e.g., in bg map) */ -}; - - -/*-------------------------------------------------------------------------* - * Flags for setting to white or black * - *-------------------------------------------------------------------------*/ - -/*! Flags for setting to white or black */ -enum { - L_SET_WHITE = 1, /*!< set pixels to white */ - L_SET_BLACK = 2 /*!< set pixels to black */ -}; - - -/*-------------------------------------------------------------------------* - * Flags for getting white or black value * - *-------------------------------------------------------------------------*/ - -/*! Flags for getting white or black value */ -enum { - L_GET_WHITE_VAL = 1, /*!< get white pixel value */ - L_GET_BLACK_VAL = 2 /*!< get black pixel value */ -}; - - -/*-------------------------------------------------------------------------* - * Flags for 8 bit and 16 bit pixel sums * - *-------------------------------------------------------------------------*/ - -/*! Flags for 8 bit and 16 bit pixel sums */ -enum { - L_WHITE_IS_MAX = 1, /*!< white pixels are 0xff or 0xffff; black are 0 */ - L_BLACK_IS_MAX = 2 /*!< black pixels are 0xff or 0xffff; white are 0 */ -}; - - -/*-------------------------------------------------------------------------* - * Dither parameters * - * If within this grayscale distance from black or white, * - * do not propagate excess or deficit to neighboring pixels. * - *-------------------------------------------------------------------------*/ - -/*! Dither parameters */ -enum { - DEFAULT_CLIP_LOWER_1 = 10, /*!< dist to black with no prop; 1 bpp */ - DEFAULT_CLIP_UPPER_1 = 10, /*!< dist to black with no prop; 1 bpp */ - DEFAULT_CLIP_LOWER_2 = 5, /*!< dist to black with no prop; 2 bpp */ - DEFAULT_CLIP_UPPER_2 = 5 /*!< dist to black with no prop; 2 bpp */ -}; - - -/*-------------------------------------------------------------------------* - * Distance flags * - *-------------------------------------------------------------------------*/ - -/*! Distance flags */ -enum { - L_MANHATTAN_DISTANCE = 1, /*!< L1 distance (e.g., in color space) */ - L_EUCLIDEAN_DISTANCE = 2 /*!< L2 distance */ -}; - - -/*-------------------------------------------------------------------------* - * Statistical measures * - *-------------------------------------------------------------------------*/ - -/*! Statistical measures */ -enum { - L_MEAN_ABSVAL = 1, /*!< average of abs values */ - L_MEDIAN_VAL = 2, /*!< median value of set */ - L_MODE_VAL = 3, /*!< mode value of set */ - L_MODE_COUNT = 4, /*!< mode count of set */ - L_ROOT_MEAN_SQUARE = 5, /*!< rms of values */ - L_STANDARD_DEVIATION = 6, /*!< standard deviation from mean */ - L_VARIANCE = 7 /*!< variance of values */ -}; - - -/*-------------------------------------------------------------------------* - * Set selection flags * - *-------------------------------------------------------------------------*/ - -/*! Set selection flags */ -enum { - L_CHOOSE_CONSECUTIVE = 1, /*!< select 'n' consecutive */ - L_CHOOSE_SKIP_BY = 2 /*!< select at intervals of 'n' */ -}; - - -/*-------------------------------------------------------------------------* - * Text orientation flags * - *-------------------------------------------------------------------------*/ - -/*! Text orientation flags */ -enum { - L_TEXT_ORIENT_UNKNOWN = 0, /*!< low confidence on text orientation */ - L_TEXT_ORIENT_UP = 1, /*!< portrait, text rightside-up */ - L_TEXT_ORIENT_LEFT = 2, /*!< landscape, text up to left */ - L_TEXT_ORIENT_DOWN = 3, /*!< portrait, text upside-down */ - L_TEXT_ORIENT_RIGHT = 4 /*!< landscape, text up to right */ -}; - - -/*-------------------------------------------------------------------------* - * Edge orientation flags * - *-------------------------------------------------------------------------*/ - -/*! Edge orientation flags */ -enum { - L_HORIZONTAL_EDGES = 0, /*!< filters for horizontal edges */ - L_VERTICAL_EDGES = 1, /*!< filters for vertical edges */ - L_ALL_EDGES = 2 /*!< filters for all edges */ -}; - - -/*-------------------------------------------------------------------------* - * Line orientation flags * - *-------------------------------------------------------------------------*/ - -/*! Line orientation flags */ -enum { - L_HORIZONTAL_LINE = 0, /*!< horizontal line */ - L_POS_SLOPE_LINE = 1, /*!< 45 degree line with positive slope */ - L_VERTICAL_LINE = 2, /*!< vertical line */ - L_NEG_SLOPE_LINE = 3, /*!< 45 degree line with negative slope */ - L_OBLIQUE_LINE = 4 /*!< neither horizontal nor vertical */ -}; - - -/*-------------------------------------------------------------------------* - * Scan direction flags * - *-------------------------------------------------------------------------*/ - -/*! Scan direction flags */ -enum { - L_FROM_LEFT = 0, /*!< scan from left */ - L_FROM_RIGHT = 1, /*!< scan from right */ - L_FROM_TOP = 2, /*!< scan from top */ - L_FROM_BOT = 3, /*!< scan from bottom */ - L_SCAN_NEGATIVE = 4, /*!< scan in negative direction */ - L_SCAN_POSITIVE = 5, /*!< scan in positive direction */ - L_SCAN_BOTH = 6, /*!< scan in both directions */ - L_SCAN_HORIZONTAL = 7, /*!< horizontal scan (direction unimportant) */ - L_SCAN_VERTICAL = 8 /*!< vertical scan (direction unimportant) */ -}; - - -/*-------------------------------------------------------------------------* - * Box size adjustment and location flags * - *-------------------------------------------------------------------------*/ - -/*! Box size adjustment and location flags */ -enum { - L_ADJUST_SKIP = 0, /*!< do not adjust */ - L_ADJUST_LEFT = 1, /*!< adjust left edge */ - L_ADJUST_RIGHT = 2, /*!< adjust right edge */ - L_ADJUST_LEFT_AND_RIGHT = 3, /*!< adjust both left and right edges */ - L_ADJUST_TOP = 4, /*!< adjust top edge */ - L_ADJUST_BOT = 5, /*!< adjust bottom edge */ - L_ADJUST_TOP_AND_BOT = 6, /*!< adjust both top and bottom edges */ - L_ADJUST_CHOOSE_MIN = 7, /*!< choose the min median value */ - L_ADJUST_CHOOSE_MAX = 8, /*!< choose the max median value */ - L_SET_LEFT = 9, /*!< set left side to a given value */ - L_SET_RIGHT = 10, /*!< set right side to a given value */ - L_SET_TOP = 11, /*!< set top side to a given value */ - L_SET_BOT = 12, /*!< set bottom side to a given value */ - L_GET_LEFT = 13, /*!< get left side location */ - L_GET_RIGHT = 14, /*!< get right side location */ - L_GET_TOP = 15, /*!< get top side location */ - L_GET_BOT = 16 /*!< get bottom side location */ -}; - - -/*-------------------------------------------------------------------------* - * Flags for selecting box boundaries from two choices * - *-------------------------------------------------------------------------*/ - -/*! Flags for selecting box boundaries from two choices */ -enum { - L_USE_MINSIZE = 1, /*!< use boundaries giving min size */ - L_USE_MAXSIZE = 2, /*!< use boundaries giving max size */ - L_SUB_ON_BIG_DIFF = 3, /*!< substitute boundary if big abs diff */ - L_USE_CAPPED_MIN = 4, /*!< substitute boundary with capped min */ - L_USE_CAPPED_MAX = 5 /*!< substitute boundary with capped max */ -}; - -/*-------------------------------------------------------------------------* - * Handling overlapping bounding boxes in boxa * - *-------------------------------------------------------------------------*/ - -/*! Handling overlapping bounding boxes in Boxa */ -enum { - L_COMBINE = 1, /*!< resize to bounding region; remove smaller */ - L_REMOVE_SMALL = 2 /*!< only remove smaller */ -}; - -/*-------------------------------------------------------------------------* - * Flags for replacing invalid boxes * - *-------------------------------------------------------------------------*/ - -/*! Flags for replacing invalid boxes */ -enum { - L_USE_ALL_BOXES = 1, /*!< consider all boxes in the sequence */ - L_USE_SAME_PARITY_BOXES = 2 /*!< consider boxes with the same parity */ -}; - -/*-------------------------------------------------------------------------* - * Horizontal warp * - *-------------------------------------------------------------------------*/ - -/*! Horizonal warp direction */ -enum { - L_WARP_TO_LEFT = 1, /*!< increasing stretch or contraction to left */ - L_WARP_TO_RIGHT = 2 /*!< increasing stretch or contraction to right */ -}; - -/*! Horizonal warp stretch mode */ -enum { - L_LINEAR_WARP = 1, /*!< stretch or contraction grows linearly */ - L_QUADRATIC_WARP = 2 /*!< stretch or contraction grows quadratically */ -}; - - -/*-------------------------------------------------------------------------* - * Pixel selection for resampling * - *-------------------------------------------------------------------------*/ - -/*! Pixel selection for resampling */ -enum { - L_INTERPOLATED = 1, /*!< linear interpolation from src pixels */ - L_SAMPLED = 2 /*!< nearest src pixel sampling only */ -}; - - -/*-------------------------------------------------------------------------* - * Thinning flags * - *-------------------------------------------------------------------------*/ - -/*! Thinning flags */ -enum { - L_THIN_FG = 1, /*!< thin foreground of 1 bpp image */ - L_THIN_BG = 2 /*!< thin background of 1 bpp image */ -}; - - -/*-------------------------------------------------------------------------* - * Runlength flags * - *-------------------------------------------------------------------------*/ - -/*! Runlength flags */ -enum { - L_HORIZONTAL_RUNS = 0, /*!< determine runlengths of horizontal runs */ - L_VERTICAL_RUNS = 1 /*!< determine runlengths of vertical runs */ -}; - - -/*-------------------------------------------------------------------------* - * Edge filter flags * - *-------------------------------------------------------------------------*/ - -/*! Edge filter flags */ -enum { - L_SOBEL_EDGE = 1, /*!< Sobel edge filter */ - L_TWO_SIDED_EDGE = 2 /*!< Two-sided edge filter */ -}; - - -/*-------------------------------------------------------------------------* - * Subpixel color component ordering in LCD display * - *-------------------------------------------------------------------------*/ - -/*! Subpixel color component ordering in LC display */ -enum { - L_SUBPIXEL_ORDER_RGB = 1, /*!< sensor order left-to-right RGB */ - L_SUBPIXEL_ORDER_BGR = 2, /*!< sensor order left-to-right BGR */ - L_SUBPIXEL_ORDER_VRGB = 3, /*!< sensor order top-to-bottom RGB */ - L_SUBPIXEL_ORDER_VBGR = 4 /*!< sensor order top-to-bottom BGR */ -}; - - -/*-------------------------------------------------------------------------* - * HSV histogram flags * - *-------------------------------------------------------------------------*/ - -/*! HSV histogram flags */ -enum { - L_HS_HISTO = 1, /*!< Use hue-saturation histogram */ - L_HV_HISTO = 2, /*!< Use hue-value histogram */ - L_SV_HISTO = 3 /*!< Use saturation-value histogram */ -}; - - -/*-------------------------------------------------------------------------* - * Region flags (inclusion, exclusion) * - *-------------------------------------------------------------------------*/ - -/*! Region flags (inclusion, exclusion) */ -enum { - L_INCLUDE_REGION = 1, /*!< Use hue-saturation histogram */ - L_EXCLUDE_REGION = 2 /*!< Use hue-value histogram */ -}; - - -/*-------------------------------------------------------------------------* - * Flags for adding text to a pix * - *-------------------------------------------------------------------------*/ - -/*! Flags for adding text to a Pix */ -enum { - L_ADD_ABOVE = 1, /*!< Add text above the image */ - L_ADD_BELOW = 2, /*!< Add text below the image */ - L_ADD_LEFT = 3, /*!< Add text to the left of the image */ - L_ADD_RIGHT = 4, /*!< Add text to the right of the image */ - L_ADD_AT_TOP = 5, /*!< Add text over the top of the image */ - L_ADD_AT_BOT = 6, /*!< Add text over the bottom of the image */ - L_ADD_AT_LEFT = 7, /*!< Add text over left side of the image */ - L_ADD_AT_RIGHT = 8 /*!< Add text over right side of the image */ -}; - - -/*-------------------------------------------------------------------------* - * Flags for plotting on a pix * - *-------------------------------------------------------------------------*/ - -/*! Flags for plotting on a Pix */ -enum { - L_PLOT_AT_TOP = 1, /*!< Plot horizontally at top */ - L_PLOT_AT_MID_HORIZ = 2, /*!< Plot horizontally at middle */ - L_PLOT_AT_BOT = 3, /*!< Plot horizontally at bottom */ - L_PLOT_AT_LEFT = 4, /*!< Plot vertically at left */ - L_PLOT_AT_MID_VERT = 5, /*!< Plot vertically at middle */ - L_PLOT_AT_RIGHT = 6 /*!< Plot vertically at right */ -}; - - -/*-------------------------------------------------------------------------* - * Flags for selecting display program * - *-------------------------------------------------------------------------*/ - -/*! Flags for selecting display program */ -enum { - L_DISPLAY_WITH_XZGV = 1, /*!< Use xzgv with pixDisplay() */ - L_DISPLAY_WITH_XLI = 2, /*!< Use xli with pixDisplay() */ - L_DISPLAY_WITH_XV = 3, /*!< Use xv with pixDisplay() */ - L_DISPLAY_WITH_IV = 4, /*!< Use irfvanview (win) with pixDisplay() */ - L_DISPLAY_WITH_OPEN = 5 /*!< Use open (apple) with pixDisplay() */ -}; - -/*-------------------------------------------------------------------------* - * Flag(s) used in the 'special' pix field for non-default operations * - * - 0 is default for chroma sampling in jpeg * - * - 10-19 are used for zlib compression in png write * - * - 4 and 8 are used for specifying connectivity in labelling * - *-------------------------------------------------------------------------*/ - -/*! Flags used in Pix::special */ -enum { - L_NO_CHROMA_SAMPLING_JPEG = 1 /*!< Write full resolution chroma */ -}; - - -/*-------------------------------------------------------------------------* - * Handling negative values in conversion to unsigned int * - *-------------------------------------------------------------------------*/ - -/*! Handling negative values in conversion to unsigned int */ -enum { - L_CLIP_TO_ZERO = 1, /*!< Clip negative values to 0 */ - L_TAKE_ABSVAL = 2 /*!< Convert to positive using L_ABS() */ -}; - - -/*-------------------------------------------------------------------------* - * Relative to zero flags * - *-------------------------------------------------------------------------*/ - -/*! Relative to zero flags */ -enum { - L_LESS_THAN_ZERO = 1, /*!< Choose values less than zero */ - L_EQUAL_TO_ZERO = 2, /*!< Choose values equal to zero */ - L_GREATER_THAN_ZERO = 3 /*!< Choose values greater than zero */ -}; - - -/*-------------------------------------------------------------------------* - * Flags for adding or removing traling slash from string * - *-------------------------------------------------------------------------*/ - -/*! Flags for adding or removing traling slash from string */ -enum { - L_ADD_TRAIL_SLASH = 1, /*!< Add trailing slash to string */ - L_REMOVE_TRAIL_SLASH = 2 /*!< Remove trailing slash from string */ -}; - - -/*-------------------------------------------------------------------------* - * Pix allocator and deallocator function types * - *-------------------------------------------------------------------------*/ -/*! Allocator function type */ -typedef void *(*alloc_fn)(size_t); - -/*! Deallocator function type */ -typedef void (*dealloc_fn)(void *); - - -#endif /* LEPTONICA_PIX_H */ diff --git a/WebRtc.NET/include/leptonica/ptra.h b/WebRtc.NET/include/leptonica/ptra.h deleted file mode 100644 index 2de841cc..00000000 --- a/WebRtc.NET/include/leptonica/ptra.h +++ /dev/null @@ -1,95 +0,0 @@ -/*====================================================================* - - Copyright (C) 2001 Leptonica. All rights reserved. - - - - Redistribution and use in source and binary forms, with or without - - modification, are permitted provided that the following conditions - - are met: - - 1. Redistributions of source code must retain the above copyright - - notice, this list of conditions and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above - - copyright notice, this list of conditions and the following - - disclaimer in the documentation and/or other materials - - provided with the distribution. - - - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - - ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - - LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - - A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL ANY - - CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - - EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - - PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - - PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY - - OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - - NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - - SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - *====================================================================*/ - -#ifndef LEPTONICA_PTRA_H -#define LEPTONICA_PTRA_H - -/*! - * \file ptra.h - * - *
- *  Contains the following structs:
- *      struct L_Ptra
- *      struct L_Ptraa
- *
- *  Contains definitions for:
- *      L_Ptra compaction flags for removal
- *      L_Ptra shifting flags for insert
- *      L_Ptraa accessor flags
- * 
- */ - - -/*------------------------------------------------------------------------* - * Generic Ptr Array Structs * - *------------------------------------------------------------------------*/ - - /*! Generic pointer array */ -struct L_Ptra -{ - l_int32 nalloc; /*!< size of allocated ptr array */ - l_int32 imax; /*!< greatest valid index */ - l_int32 nactual; /*!< actual number of stored elements */ - void **array; /*!< ptr array */ -}; -typedef struct L_Ptra L_PTRA; - - - /*! Array of generic pointer arrays */ -struct L_Ptraa -{ - l_int32 nalloc; /*!< size of allocated ptr array */ - struct L_Ptra **ptra; /*!< array of ptra */ -}; -typedef struct L_Ptraa L_PTRAA; - - - -/*------------------------------------------------------------------------* - * Array flags * - *------------------------------------------------------------------------*/ - - /*! Flags for removal from L_Ptra */ -enum { - L_NO_COMPACTION = 1, /*!< null the pointer only */ - L_COMPACTION = 2 /*!< compact the array */ -}; - - /*! Flags for insertion into L_Ptra */ -enum { - L_AUTO_DOWNSHIFT = 0, /*!< choose based on number of holes */ - L_MIN_DOWNSHIFT = 1, /*!< downshifts min # of ptrs below insert */ - L_FULL_DOWNSHIFT = 2 /*!< downshifts all ptrs below insert */ -}; - - /*! Accessor flags for L_Ptraa */ -enum { - L_HANDLE_ONLY = 0, /*!< ptr to L_Ptra; caller can inspect only */ - L_REMOVE = 1 /*!< caller owns; destroy or save in L_Ptraa */ -}; - - -#endif /* LEPTONICA_PTRA_H */ diff --git a/WebRtc.NET/include/leptonica/queue.h b/WebRtc.NET/include/leptonica/queue.h deleted file mode 100644 index fd380e83..00000000 --- a/WebRtc.NET/include/leptonica/queue.h +++ /dev/null @@ -1,77 +0,0 @@ -/*====================================================================* - - Copyright (C) 2001 Leptonica. All rights reserved. - - - - Redistribution and use in source and binary forms, with or without - - modification, are permitted provided that the following conditions - - are met: - - 1. Redistributions of source code must retain the above copyright - - notice, this list of conditions and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above - - copyright notice, this list of conditions and the following - - disclaimer in the documentation and/or other materials - - provided with the distribution. - - - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - - ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - - LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - - A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL ANY - - CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - - EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - - PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - - PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY - - OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - - NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - - SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - *====================================================================*/ - -#ifndef LEPTONICA_QUEUE_H -#define LEPTONICA_QUEUE_H - -/*! - * \file queue.h - * - *
- *      Expandable pointer queue for arbitrary void* data.
- *
- *      The L_Queue is a fifo that implements a queue of void* pointers.
- *      It can be used to hold a queue of any type of struct.
- *
- *      Internally, it maintains two counters:
- *          nhead:  location of head (in ptrs) from the beginning
- *                  of the array.
- *          nelem:  number of ptr elements stored in the queue.
- *
- *      The element at the head of the queue, which is the next to
- *      be removed, is array[nhead].  The location at the tail of the
- *      queue to which the next element will be added is
- *      array[nhead + nelem].
- *
- *      As items are added to the queue, nelem increases.
- *      As items are removed, nhead increases and nelem decreases.
- *      Any time the tail reaches the end of the allocated array,
- *      all the pointers are shifted to the left, so that the head
- *      is at the beginning of the array.
- *      If the array becomes more than 3/4 full, it doubles in size.
- *
- *      The auxiliary stack can be used in a wrapper for re-using
- *      items popped from the queue.  It is not made by default.
- *
- *      For further implementation details, see queue.c.
- * 
- */ - -/*! Expandable pointer queue for arbitrary void* data */ -struct L_Queue -{ - l_int32 nalloc; /*!< size of allocated ptr array */ - l_int32 nhead; /*!< location of head (in ptrs) from the */ - /*!< beginning of the array */ - l_int32 nelem; /*!< number of elements stored in the queue */ - void **array; /*!< ptr array */ - struct L_Stack *stack; /*!< auxiliary stack */ - -}; -typedef struct L_Queue L_QUEUE; - - -#endif /* LEPTONICA_QUEUE_H */ diff --git a/WebRtc.NET/include/leptonica/rbtree.h b/WebRtc.NET/include/leptonica/rbtree.h deleted file mode 100644 index a7fbffef..00000000 --- a/WebRtc.NET/include/leptonica/rbtree.h +++ /dev/null @@ -1,90 +0,0 @@ -/*====================================================================* - - Copyright (C) 2001 Leptonica. All rights reserved. - - - - Redistribution and use in source and binary forms, with or without - - modification, are permitted provided that the following conditions - - are met: - - 1. Redistributions of source code must retain the above copyright - - notice, this list of conditions and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above - - copyright notice, this list of conditions and the following - - disclaimer in the documentation and/or other materials - - provided with the distribution. - - - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - - ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - - LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - - A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL ANY - - CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - - EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - - PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - - PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY - - OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - - NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - - SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - *====================================================================*/ - -/* - * Modified from the excellent code here: - * http://en.literateprograms.org/Red-black_tree_(C)?oldid=19567 - * which has been placed in the public domain under the Creative Commons - * CC0 1.0 waiver (http://creativecommons.org/publicdomain/zero/1.0/). - * - * When the key is generated from a hash (e.g., string --> uint64), - * there is always the possibility of having collisions, but to make - * the collision probability very low requires using a large hash. - * For that reason, the key types are 64 bit quantities, which will result - * in a negligible probabililty of collisions for millions of hashed values. - * Using 8 byte keys instead of 4 byte keys requires a little more - * storage, but the simplification in being able to ignore collisions - * with the red-black trees for most applications is worth it. - */ - -#ifndef LEPTONICA_RBTREE_H -#define LEPTONICA_RBTREE_H - - /*! The three valid key types for red-black trees, maps and sets. */ -enum { - L_INT_TYPE = 1, - L_UINT_TYPE = 2, - L_FLOAT_TYPE = 3 -}; - - /*! - * Storage for keys and values for red-black trees, maps and sets. - *
-     * Note:
-     *   (1) Keys and values of the valid key types are all 64-bit
-     *   (2) (void *) can be used for values but not for keys.
-     * 
- */ -union Rb_Type { - l_int64 itype; - l_uint64 utype; - l_float64 ftype; - void *ptype; -}; -typedef union Rb_Type RB_TYPE; - -struct L_Rbtree { - struct L_Rbtree_Node *root; - l_int32 keytype; -}; -typedef struct L_Rbtree L_RBTREE; -typedef struct L_Rbtree L_AMAP; /* hide underlying implementation for map */ -typedef struct L_Rbtree L_ASET; /* hide underlying implementation for set */ - -struct L_Rbtree_Node { - union Rb_Type key; - union Rb_Type value; - struct L_Rbtree_Node *left; - struct L_Rbtree_Node *right; - struct L_Rbtree_Node *parent; - l_int32 color; -}; -typedef struct L_Rbtree_Node L_RBTREE_NODE; -typedef struct L_Rbtree_Node L_AMAP_NODE; /* hide tree implementation */ -typedef struct L_Rbtree_Node L_ASET_NODE; /* hide tree implementation */ - - -#endif /* LEPTONICA_RBTREE_H */ diff --git a/WebRtc.NET/include/leptonica/readbarcode.h b/WebRtc.NET/include/leptonica/readbarcode.h deleted file mode 100644 index 7452f236..00000000 --- a/WebRtc.NET/include/leptonica/readbarcode.h +++ /dev/null @@ -1,239 +0,0 @@ -/*====================================================================* - - Copyright (C) 2001 Leptonica. All rights reserved. - - - - Redistribution and use in source and binary forms, with or without - - modification, are permitted provided that the following conditions - - are met: - - 1. Redistributions of source code must retain the above copyright - - notice, this list of conditions and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above - - copyright notice, this list of conditions and the following - - disclaimer in the documentation and/or other materials - - provided with the distribution. - - - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - - ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - - LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - - A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL ANY - - CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - - EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - - PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - - PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY - - OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - - NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - - SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - *====================================================================*/ - -#ifndef LEPTONICA_READBARCODE_H -#define LEPTONICA_READBARCODE_H - - /* ----------------------------------------------------------------- * - * Flags for method of extracting barcode widths * - * ----------------------------------------------------------------- */ - -/*! Flags for method of extracting barcode widths */ -enum { - L_USE_WIDTHS = 1, /*!< use histogram of barcode widths */ - L_USE_WINDOWS = 2 /*!< find best window for decoding transitions */ -}; - - /* ----------------------------------------------------------------- * - * Flags for barcode formats * - * These are used both to identify a barcode format and to identify * - * the decoding method to use on a barcode. * - * ----------------------------------------------------------------- */ - -/*! Flags for barcode formats */ -enum { - L_BF_UNKNOWN = 0, /*!< unknown format */ - L_BF_ANY = 1, /*!< try decoding with all known formats */ - L_BF_CODE128 = 2, /*!< decode with Code128 format */ - L_BF_EAN8 = 3, /*!< decode with EAN8 format */ - L_BF_EAN13 = 4, /*!< decode with EAN13 format */ - L_BF_CODE2OF5 = 5, /*!< decode with Code 2 of 5 format */ - L_BF_CODEI2OF5 = 6, /*!< decode with Interleaved 2 of 5 format */ - L_BF_CODE39 = 7, /*!< decode with Code39 format */ - L_BF_CODE93 = 8, /*!< decode with Code93 format */ - L_BF_CODABAR = 9, /*!< decode with Code93 format */ - L_BF_UPCA = 10 /*!< decode with UPC A format */ -}; - - /* ----------------------------------------------------------------- * - * Currently supported formats * - * Update these arrays as new formats are added. * - * ----------------------------------------------------------------- */ - -/*! Currently supported formats */ -static const l_int32 SupportedBarcodeFormat[] = { - L_BF_CODE2OF5, - L_BF_CODEI2OF5, - L_BF_CODE93, - L_BF_CODE39, - L_BF_CODABAR, - L_BF_UPCA, - L_BF_EAN13 -}; - -/*! Currently supported format names */ -static const char *SupportedBarcodeFormatName[] = { - "Code2of5", - "CodeI2of5", - "Code93", - "Code39", - "Codabar", - "Upca", - "Ean13" -}; -static const l_int32 NumSupportedBarcodeFormats = 7; /*!< Number of formats */ - - - /* ----------------------------------------------------------------- * - * Code 2 of 5 symbology * - * ----------------------------------------------------------------- */ -static const char *Code2of5[] = { - "111121211", "211111112", "112111112", "212111111", /* 0 - 3 */ - "111121112", "211121111", "112121111", "111111212", /* 4 - 7 */ - "211111211", "112111211", /* 8 - 9 */ - "21211", "21112" /* Start, Stop */ -}; - -static const l_int32 C25_START = 10; -static const l_int32 C25_STOP = 11; - - - /* ----------------------------------------------------------------- * - * Code Interleaved 2 of 5 symbology * - * ----------------------------------------------------------------- */ -static const char *CodeI2of5[] = { - "11221", "21112", "12112", "22111", "11212", /* 0 - 4 */ - "21211", "12211", "11122", "21121", "12121", /* 5 - 9 */ - "1111", "211" /* start, stop */ -}; - -static const l_int32 CI25_START = 10; -static const l_int32 CI25_STOP = 11; - - - /* ----------------------------------------------------------------- * - * Code 93 symbology * - * ----------------------------------------------------------------- */ -static const char *Code93[] = { - "131112", "111213", "111312", "111411", "121113", /* 0: 0 - 4 */ - "121212", "121311", "111114", "131211", "141111", /* 5: 5 - 9 */ - "211113", "211212", "211311", "221112", "221211", /* 10: A - E */ - "231111", "112113", "112212", "112311", "122112", /* 15: F - J */ - "132111", "111123", "111222", "111321", "121122", /* 20: K - O */ - "131121", "212112", "212211", "211122", "211221", /* 25: P - T */ - "221121", "222111", "112122", "112221", "122121", /* 30: U - Y */ - "123111", "121131", "311112", "311211", "321111", /* 35: Z,-,.,SP,$ */ - "112131", "113121", "211131", "131221", "312111", /* 40: /,+,%,($),(%) */ - "311121", "122211", "111141" /* 45: (/),(+), Start */ -}; - - /* Use "[]{}#" to represent special codes 43-47 */ -static const char Code93Val[] = - "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ-. $/+%[]{}#"; - -static const l_int32 C93_START = 47; -static const l_int32 C93_STOP = 47; - - - /* ----------------------------------------------------------------- * - * Code 39 symbology * - * ----------------------------------------------------------------- */ -static const char *Code39[] = { - "111221211", "211211112", "112211112", "212211111", /* 0: 0 - 3 */ - "111221112", "211221111", "112221111", "111211212", /* 4: 4 - 7 */ - "211211211", "112211211", "211112112", "112112112", /* 8: 8 - B */ - "212112111", "111122112", "211122111", "112122111", /* 12: C - F */ - "111112212", "211112211", "112112211", "111122211", /* 16: G - J */ - "211111122", "112111122", "212111121", "111121122", /* 20: K - N */ - "211121121", "112121121", "111111222", "211111221", /* 24: O - R */ - "112111221", "111121221", "221111112", "122111112", /* 28: S - V */ - "222111111", "121121112", "221121111", "122121111", /* 32: W - Z */ - "121111212", "221111211", "122111211", "121212111", /* 36: -,.,SP,$ */ - "121211121", "121112121", "111212121", "121121211" /* 40: /,+,%,* */ -}; - - /* Use "*" to represent the Start and Stop codes (43) */ -static const char Code39Val[] = - "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ-. $/+%*"; - -static const l_int32 C39_START = 43; -static const l_int32 C39_STOP = 43; - - - /* ----------------------------------------------------------------- * - * Codabar symbology * - * ----------------------------------------------------------------- */ -static const char *Codabar[] = { - "1111122", "1111221", "1112112", "2211111", "1121121", /* 0: 0 - 4 */ - "2111121", "1211112", "1211211", "1221111", "2112111", /* 5: 5 - 9 */ - "1112211", "1122111", "2111212", "2121112", "2121211", /* 10: -,$,:,/,. */ - "1121212", "1122121", "1212112", "1112122", "1112221" /* 15: +,A,B,C,D */ -}; - - /* Ascii representations for codes 16-19: (A or T), (B or N), (C or *), - * (D or E). These are used in pairs for the Start and Stop codes. */ -static const char CodabarVal[] = "0123456789-$:/.+ABCD"; - - - /* ----------------------------------------------------------------- * - * UPC-A symbology * - * ----------------------------------------------------------------- */ -static const char *Upca[] = { - "3211", "2221", "2122", "1411", "1132", /* 0: 0 - 4 */ - "1231", "1114", "1312", "1213", "3112", /* 5: 5 - 9 */ - "111", "111", "11111" /* 10: Start, Stop, Mid */ -}; - -static const l_int32 UPCA_START = 10; -static const l_int32 UPCA_STOP = 11; -static const l_int32 UPCA_MID = 12; - - - /* ----------------------------------------------------------------- * - * Code128 symbology * - * ----------------------------------------------------------------- */ -static const char *Code128[] = { - "212222", "222122", "222221", "121223", "121322", /* 0 - 4 */ - "131222", "122213", "122312", "132212", "221213", /* 5 - 9 */ - "221312", "231212", "112232", "122132", "122231", /* 10 - 14 */ - "113222", "123122", "123221", "223211", "221132", /* 15 - 19 */ - "221231", "213212", "223112", "312131", "311222", /* 20 - 24 */ - "321122", "321221", "312212", "322112", "322211", /* 25 - 29 */ - "212123", "212321", "232121", "111323", "131123", /* 30 - 34 */ - "131321", "112313", "132113", "132311", "211313", /* 35 - 39 */ - "231113", "231311", "112133", "112331", "132131", /* 40 - 44 */ - "113123", "113321", "133121", "313121", "211331", /* 45 - 49 */ - "231131", "213113", "213311", "213131", "311123", /* 50 - 54 */ - "311321", "331121", "312113", "312311", "332111", /* 55 - 59 */ - "314111", "221411", "431111", "111224", "111422", /* 60 - 64 */ - "121124", "121421", "141122", "141221", "112214", /* 65 - 69 */ - "112412", "122114", "122411", "142112", "142211", /* 70 - 74 */ - "241211", "221114", "413111", "241112", "134111", /* 75 - 79 */ - "111242", "121142", "121241", "114212", "124112", /* 80 - 84 */ - "124211", "411212", "421112", "421211", "212141", /* 85 - 89 */ - "214121", "412121", "111143", "111341", "131141", /* 90 - 94 */ - "114113", "114311", "411113", "411311", "113141", /* 95 - 99 */ - "114131", "311141", "411131", "211412", "211214", /* 100 - 104 */ - "211232", "2331112" /* 105 - 106 */ -}; - -static const l_int32 C128_FUN_3 = 96; /* in A or B only; in C it is 96 */ -static const l_int32 C128_FUNC_2 = 97; /* in A or B only; in C it is 97 */ -static const l_int32 C128_SHIFT = 98; /* in A or B only; in C it is 98 */ -static const l_int32 C128_GOTO_C = 99; /* in A or B only; in C it is 99 */ -static const l_int32 C128_GOTO_B = 100; -static const l_int32 C128_GOTO_A = 101; -static const l_int32 C128_FUNC_1 = 102; -static const l_int32 C128_START_A = 103; -static const l_int32 C128_START_B = 104; -static const l_int32 C128_START_C = 105; -static const l_int32 C128_STOP = 106; - /* code 128 symbols are 11 units */ -static const l_int32 C128_SYMBOL_WIDTH = 11; - - - -#endif /* LEPTONICA_READBARCODE_H */ diff --git a/WebRtc.NET/include/leptonica/recog.h b/WebRtc.NET/include/leptonica/recog.h deleted file mode 100644 index 9bebefc4..00000000 --- a/WebRtc.NET/include/leptonica/recog.h +++ /dev/null @@ -1,266 +0,0 @@ -/*====================================================================* - - Copyright (C) 2001 Leptonica. All rights reserved. - - - - Redistribution and use in source and binary forms, with or without - - modification, are permitted provided that the following conditions - - are met: - - 1. Redistributions of source code must retain the above copyright - - notice, this list of conditions and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above - - copyright notice, this list of conditions and the following - - disclaimer in the documentation and/or other materials - - provided with the distribution. - - - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - - ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - - LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - - A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL ANY - - CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - - EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - - PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - - PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY - - OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - - NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - - SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - *====================================================================*/ - -#ifndef LEPTONICA_RECOG_H -#define LEPTONICA_RECOG_H - -/*! - * \file recog.h - * - *
- *     A simple utility for training and recognizing individual
- *     machine-printed text characters.  In an application, one can
- *     envision using a number of these, one for each trained set.
- *
- *     In training mode, a set of labelled bitmaps is presented, either
- *     one at a time, or in a directory, or in a pixa.  If in a directory,
- *     or a pixa, the labelling text string must be embedded in the
- *     text field of the image file.
- *
- *     Any number of recognizers (L_Recog) can be trained and then used
- *     together in an array (L_Recoga).  All these trained structures
- *     can be serialized to file and read back.  The serialized version
- *     holds all the bitmaps used for training, plus, for arbitrary
- *     character sets, the UTF8 representation and the lookup table
- *     mapping from the character representation to index.
- *
- *     There are three levels of "sets" here:
- *
- *       (1) Example set: the examples representing a character that
- *           were printed in the same way, so that they can be combined
- *           without scaling to form an "average" template for the character.
- *           In the recognition phase, we use either this aligned average,
- *           or the individual bitmaps.  All examples in the set are given
- *           the same character label.   Example: the letter 'a' in the
- *           predominant font in a book.
- *
- *       (2) Character set (represented by L_Recog, a single recognizer):
- *           The set of different characters, each of which is described
- *           by (1).  Each element of the set has a different character
- *           label.  Example: the digits '0' through '9' that are used for
- *           page numbering in a book.
- *
- *       (3) Recognizer set (represented by L_Recoga, an array of recogs):
- *           A set of recognizers, each of which is described by (2).
- *           In general, we do not want to combine the character sets
- *           with the same labels within different recognizer sets,
- *           because the bitmaps can differ in font type, style or size.
- *           Example 1: the letter 'a' can be printed in two very different
- *           ways (either with a large loop or with a smaller loop in
- *           the lower half); both share the same label but need to be
- *           distinguished so that they are not mixed when averaging.
- *           Example 2: a recognizer trained for a book may be missing
- *           some characters, so we need to supplement it with another
- *           "generic" or "bootstrap" recognizer that has the additional
- *           characters from a variety of sources.  Bootstrap recognizers
- *           must be run in a mode where all characters are scaled.
- *
- *     In the recognition process, for each component in an input image,
- *     each recognizer (L_Recog) records the best match (highest
- *     correlation score).  If there is more than one recognizer, these
- *     results are aggregated to find the best match for each character
- *     for all the recognizers, and this is stored in L_Recoga.
- * 
- */ - -#define RECOG_VERSION_NUMBER 1 - -struct L_Recoga { - l_int32 n; /*!< number of recogs */ - l_int32 nalloc; /*!< number of recog ptrs allocated */ - struct L_Recog **recog; /*!< recog ptr array */ - struct L_Rcha *rcha; /*!< stores the array of best chars */ -}; -typedef struct L_Recoga L_RECOGA; - - -struct L_Recog { - l_int32 scalew; /*!< scale all examples to this width; */ - /*!< use 0 prevent horizontal scaling */ - l_int32 scaleh; /*!< scale all examples to this height; */ - /*!< use 0 prevent vertical scaling */ - l_int32 templ_type; /*!< template type: either an average of */ - /*!< examples (L_USE_AVERAGE) or the set */ - /*!< of all examples (L_USE_ALL) */ - l_int32 maxarraysize; /*!< initialize container arrays to this */ - l_int32 setsize; /*!< size of character set */ - l_int32 threshold; /*!< for binarizing if depth > 1 */ - l_int32 maxyshift; /*!< vertical jiggle on nominal centroid */ - /*!< alignment; typically 0 or 1 */ - l_float32 asperity_fr; /*!< +- allowed fractional asperity ratio */ - l_int32 charset_type; /*!< one of L_ARABIC_NUMERALS, etc. */ - l_int32 charset_size; /*!< expected number of classes in charse */ - char *bootdir; /*!< dir with bootstrap pixa charsets */ - char *bootpattern; /*!< file pattern: bootstrap pixa charsets */ - char *bootpath; /*!< path for single bootstrap pixa charset */ - l_int32 boot_iters; /*!< num of 2x2 erosion iters on boot pixa */ - l_int32 min_nopad; /*!< min number of samples without padding */ - l_int32 max_afterpad; /*!< max number of samples after padding */ - l_int32 min_samples; /*!< min num of total samples; else use boot */ - l_int32 num_samples; /*!< number of training samples */ - l_int32 minwidth_u; /*!< min width averaged unscaled templates */ - l_int32 maxwidth_u; /*!< max width averaged unscaled templates */ - l_int32 minheight_u; /*!< min height averaged unscaled templates */ - l_int32 maxheight_u; /*!< max height averaged unscaled templates */ - l_int32 minwidth; /*!< min width averaged scaled templates */ - l_int32 maxwidth; /*!< max width averaged scaled templates */ - l_int32 ave_done; /*!< set to 1 when averaged bitmaps are made */ - l_int32 train_done; /*!< set to 1 when training is complete or */ - /*!< identification has started */ - l_int32 min_splitw; /*!< min component width kept in splitting */ - l_int32 min_splith; /*!< min component height kept in splitting */ - l_int32 max_splith; /*!< max component height kept in splitting */ - struct Sarray *sa_text; /*!< text array for arbitrary char set */ - struct L_Dna *dna_tochar; /*!< index-to-char lut for arbitrary charset */ - l_int32 *centtab; /*!< table for finding centroids */ - l_int32 *sumtab; /*!< table for finding pixel sums */ - struct Pixaa *pixaa_u; /*!< all unscaled bitmaps for each class */ - struct Pixa *pixa_u; /*!< averaged unscaled bitmaps per class */ - struct Ptaa *ptaa_u; /*!< centroids of all unscaled bitmaps */ - struct Pta *pta_u; /*!< centroids of unscaled averaged bitmaps */ - struct Numaa *naasum_u; /*!< area of all unscaled bitmap examples */ - struct Numa *nasum_u; /*!< area of unscaled averaged bitmaps */ - struct Pixaa *pixaa; /*!< all bitmap examples for each class */ - struct Pixa *pixa; /*!< averaged bitmaps for each class */ - struct Ptaa *ptaa; /*!< centroids of all bitmap examples */ - struct Pta *pta; /*!< centroids of averaged bitmaps */ - struct Numaa *naasum; /*!< area of all bitmap examples */ - struct Numa *nasum; /*!< area of averaged bitmaps */ - struct Pixa *pixa_tr; /*!< input training images */ - struct Pixa *pixadb_ave; /*!< unscaled and scaled averaged bitmaps */ - struct Pixa *pixa_id; /*!< input images for identifying */ - struct Pix *pixdb_ave; /*!< debug: best match of input against ave. */ - struct Pix *pixdb_range; /*!< debug: best matches within range */ - struct Pixa *pixadb_boot; /*!< debug: bootstrap training results */ - struct Pixa *pixadb_split; /*!< debug: splitting results */ - struct L_Bmf *bmf; /*!< bmf fonts */ - l_int32 bmf_size; /*!< font size of bmf; default is 6 pt */ - struct L_Rdid *did; /*!< temp data used for image decoding */ - struct L_Rch *rch; /*!< temp data used for holding best char */ - struct L_Rcha *rcha; /*!< temp data used for array of best chars */ - l_int32 bootrecog; /*!< 1 if using bootstrap samples; else 0 */ - l_int32 index; /*!< recog index in recoga; -1 if no parent */ - struct L_Recoga *parent; /*!< ptr to parent array; can be null */ - -}; -typedef struct L_Recog L_RECOG; - -/*! - * Data returned from correlation matching on a single character - */ -struct L_Rch { - l_int32 index; /*!< index of best template */ - l_float32 score; /*!< correlation score of best template */ - char *text; /*!< character string of best template */ - l_int32 sample; /*!< index of best sample (within the best */ - /*!< template class, if all samples are used) */ - l_int32 xloc; /*!< x-location of template (delx + shiftx) */ - l_int32 yloc; /*!< y-location of template (dely + shifty) */ - l_int32 width; /*!< width of best template */ -}; -typedef struct L_Rch L_RCH; - -/*! - * Data returned from correlation matching on an array of characters - */ -struct L_Rcha { - struct Numa *naindex; /*!< indices of best templates */ - struct Numa *nascore; /*!< correlation scores of best templates */ - struct Sarray *satext; /*!< character strings of best templates */ - struct Numa *nasample; /*!< indices of best samples */ - struct Numa *naxloc; /*!< x-locations of templates (delx + shiftx) */ - struct Numa *nayloc; /*!< y-locations of templates (dely + shifty) */ - struct Numa *nawidth; /*!< widths of best templates */ -}; -typedef struct L_Rcha L_RCHA; - -/*! - * Data used for decoding a line of characters. - */ -struct L_Rdid { - struct Pix *pixs; /*!< clone of pix to be decoded */ - l_int32 **counta; /*!< count array for each averaged template */ - l_int32 **delya; /*!< best y-shift array per average template */ - l_int32 narray; /*!< number of averaged templates */ - l_int32 size; /*!< size of count array (width of pixs) */ - l_int32 *setwidth; /*!< setwidths for each template */ - struct Numa *nasum; /*!< pixel count in pixs by column */ - struct Numa *namoment; /*!< first moment of pixels in pixs by cols */ - l_int32 fullarrays; /*!< 1 if full arrays are made; 0 otherwise */ - l_float32 *beta; /*!< channel coeffs for template fg term */ - l_float32 *gamma; /*!< channel coeffs for bit-and term */ - l_float32 *trellisscore; /*!< score on trellis */ - l_int32 *trellistempl; /*!< template on trellis (for backtrack) */ - struct Numa *natempl; /*!< indices of best path templates */ - struct Numa *naxloc; /*!< x locations of best path templates */ - struct Numa *nadely; /*!< y locations of best path templates */ - struct Numa *nawidth; /*!< widths of best path templates */ - struct Numa *nascore; /*!< correlation scores: best path templates */ - struct Numa *natempl_r; /*!< indices of best rescored templates */ - struct Numa *naxloc_r; /*!< x locations of best rescoredtemplates */ - struct Numa *nadely_r; /*!< y locations of best rescoredtemplates */ - struct Numa *nawidth_r; /*!< widths of best rescoredtemplates */ - struct Numa *nascore_r; /*!< correlation scores: rescored templates */ -}; -typedef struct L_Rdid L_RDID; - - -/*-------------------------------------------------------------------------* - * Flags for selecting processing * - *-------------------------------------------------------------------------*/ - -/*! Flags for selecting processing */ -enum { - L_SELECT_UNSCALED = 0, /*!< select the unscaled bitmaps */ - L_SELECT_SCALED = 1, /*!< select the scaled bitmaps */ - L_SELECT_BOTH = 2 /*!< select both unscaled and scaled */ -}; - -/*-------------------------------------------------------------------------* - * Flags for determining what to test against * - *-------------------------------------------------------------------------*/ - -/*! Flags for determining what to test against */ -enum { - L_USE_AVERAGE = 0, /*!< form template from class average */ - L_USE_ALL = 1 /*!< match against all elements of each class */ -}; - -/*-------------------------------------------------------------------------* - * Flags for describing limited character sets * - *-------------------------------------------------------------------------*/ - -/*! Flags for describing limited character sets */ -enum { - L_UNKNOWN = 0, /*!< character set type is not specified */ - L_ARABIC_NUMERALS = 1, /*!< 10 digits */ - L_LC_ROMAN_NUMERALS = 2, /*!< 7 lower-case letters (i,v,x,l,c,d,m) */ - L_UC_ROMAN_NUMERALS = 3, /*!< 7 upper-case letters (I,V,X,L,C,D,M) */ - L_LC_ALPHA = 4, /*!< 26 lower-case letters */ - L_UC_ALPHA = 5 /*!< 26 upper-case letters */ -}; - -#endif /* LEPTONICA_RECOG_H */ diff --git a/WebRtc.NET/include/leptonica/regutils.h b/WebRtc.NET/include/leptonica/regutils.h deleted file mode 100644 index f3506a31..00000000 --- a/WebRtc.NET/include/leptonica/regutils.h +++ /dev/null @@ -1,140 +0,0 @@ -/*====================================================================* - - Copyright (C) 2001 Leptonica. All rights reserved. - - - - Redistribution and use in source and binary forms, with or without - - modification, are permitted provided that the following conditions - - are met: - - 1. Redistributions of source code must retain the above copyright - - notice, this list of conditions and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above - - copyright notice, this list of conditions and the following - - disclaimer in the documentation and/or other materials - - provided with the distribution. - - - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - - ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - - LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - - A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL ANY - - CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - - EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - - PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - - PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY - - OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - - NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - - SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - *====================================================================*/ - -#ifndef LEPTONICA_REGUTILS_H -#define LEPTONICA_REGUTILS_H - -/*! - * \file regutils.h - * - *
- *   Contains this regression test parameter packaging struct
- *       struct L_RegParams
- *
- *   The regression test utility allows you to write regression tests
- *   that compare results with existing "golden files" and with
- *   compiled in data.
- *
- *   Regression tests can be called in three ways.
- *   For example, for distance_reg:
- *
- *       Case 1: distance_reg [compare]
- *           This runs the test against the set of golden files.  It
- *           appends to 'outfile.txt' either "SUCCESS" or "FAILURE",
- *           as well as the details of any parts of the test that failed.
- *           It writes to a temporary file stream (fp).
- *           Using 'compare' on the command line is optional.
- *
- *       Case 2: distance_reg generate
- *           This generates golden files in /tmp for the reg test.
- *
- *       Case 3: distance_reg display
- *           This runs the test but makes no comparison of the output
- *           against the set of golden files.  In addition, this displays
- *           images and plots that are specified in the test under
- *           control of the display variable.  Display is enabled only
- *           for this case.
- *
- *   Regression tests follow the pattern given below.  Tests are
- *   automatically numbered sequentially, and it is convenient to
- *   comment each with a number to keep track (for comparison tests
- *   and for debugging).  In an actual case, comparisons of pix and
- *   of files can occur in any order.  We give a specific order here
- *   for clarity.
- *
- *       L_REGPARAMS  *rp;  // holds data required by the test functions
- *
- *       // Setup variables; optionally open stream
- *       if (regTestSetup(argc, argv, &rp))
- *           return 1;
- *
- *       // Test pairs of generated pix for identity.  This compares
- *       // two pix; no golden file is generated.
- *       regTestComparePix(rp, pix1, pix2);  // 0
- *
- *       // Test pairs of generated pix for similarity.  This compares
- *       // two pix; no golden file is generated.  The last arg determines
- *       // if stats are to be written to stderr.
- *       regTestCompareSimilarPix(rp, pix1, pix2, 15, 0.001, 0);  // 1
- *
- *       // Generation of  outputs and testing for identity
- *       // These files can be anything, of course.
- *       regTestCheckFile(rp, );  // 2
- *       regTestCheckFile(rp, );  // 3
- *
- *       // Test pairs of output golden files for identity.  Here we
- *       // are comparing golden files 2 and 3.
- *       regTestCompareFiles(rp, 2, 3);  // 4
- *
- *       // "Write and check".  This writes a pix using a canonical
- *       // formulation for the local filename and either:
- *       //     case 1: generates a golden file
- *       //     case 2: compares the local file with a golden file
- *       //     case 3: generates local files and displays
- *       // Here we write the pix compressed with png and jpeg, respectively;
- *       // Then check against the golden file.  The internal %index
- *       // is incremented; it is embedded in the local filename and,
- *       // if generating, in the golden file as well.
- *       regTestWritePixAndCheck(rp, pix1, IFF_PNG);  // 5
- *       regTestWritePixAndCheck(rp, pix2, IFF_JFIF_JPEG);  // 6
- *
- *       // Display if reg test was called in 'display' mode
- *       pixDisplayWithTitle(pix1, 100, 100, NULL, rp->display);
- *
- *       // Clean up and output result
- *       regTestCleanup(rp);
- * 
- */ - -/*----------------------------------------------------------------------------* - * Regression test parameter packer * - *----------------------------------------------------------------------------*/ - -/*! Regression test parameter packer */ -struct L_RegParams -{ - FILE *fp; /*!< stream to temporary output file for compare mode */ - char *testname; /*!< name of test, without '_reg' */ - char *tempfile; /*!< name of temp file for compare mode output */ - l_int32 mode; /*!< generate, compare or display */ - l_int32 index; /*!< index into saved files for this test; 0-based */ - l_int32 success; /*!< overall result of the test */ - l_int32 display; /*!< 1 if in display mode; 0 otherwise */ - L_TIMER tstart; /*!< marks beginning of the reg test */ -}; -typedef struct L_RegParams L_REGPARAMS; - - - /*! Running modes for the test */ -enum { - L_REG_GENERATE = 0, - L_REG_COMPARE = 1, - L_REG_DISPLAY = 2 -}; - - -#endif /* LEPTONICA_REGUTILS_H */ - diff --git a/WebRtc.NET/include/leptonica/stack.h b/WebRtc.NET/include/leptonica/stack.h deleted file mode 100644 index 4fa61141..00000000 --- a/WebRtc.NET/include/leptonica/stack.h +++ /dev/null @@ -1,70 +0,0 @@ -/*====================================================================* - - Copyright (C) 2001 Leptonica. All rights reserved. - - - - Redistribution and use in source and binary forms, with or without - - modification, are permitted provided that the following conditions - - are met: - - 1. Redistributions of source code must retain the above copyright - - notice, this list of conditions and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above - - copyright notice, this list of conditions and the following - - disclaimer in the documentation and/or other materials - - provided with the distribution. - - - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - - ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - - LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - - A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL ANY - - CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - - EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - - PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - - PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY - - OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - - NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - - SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - *====================================================================*/ - -#ifndef LEPTONICA_STACK_H -#define LEPTONICA_STACK_H - -/*! - * \file stack.h - * - *
- *       Expandable pointer stack for arbitrary void* data.
- *
- *       The L_Stack is an array of void * ptrs, onto which arbitrary
- *       objects can be stored.  At any time, the number of
- *       stored objects is stack->n.  The object at the bottom
- *       of the stack is at array[0]; the object at the top of
- *       the stack is at array[n-1].  New objects are added
- *       to the top of the stack, at the first available location,
- *       which is array[n].  Objects are removed from the top of the
- *       stack.  When an attempt is made to remove an object from an
- *       empty stack, the result is null.   When the stack becomes
- *       filled, so that n = nalloc, the size is doubled.
- *
- *       The auxiliary stack can be used to store and remove
- *       objects for re-use.  It must be created by a separate
- *       call to pstackCreate().  [Just imagine the chaos if
- *       pstackCreate() created the auxiliary stack!]
- *       pstackDestroy() checks for the auxiliary stack and removes it.
- * 
- */ - - - /*! Expandable pointer stack for arbitrary void* data. - * Note that array[n] is the first null ptr in the array - */ -struct L_Stack -{ - l_int32 nalloc; /*!< size of ptr array */ - l_int32 n; /*!< number of stored elements */ - void **array; /*!< ptr array */ - struct L_Stack *auxstack; /*!< auxiliary stack */ -}; -typedef struct L_Stack L_STACK; - - -#endif /* LEPTONICA_STACK_H */ - diff --git a/WebRtc.NET/include/leptonica/stringcode.h b/WebRtc.NET/include/leptonica/stringcode.h deleted file mode 100644 index db0faa20..00000000 --- a/WebRtc.NET/include/leptonica/stringcode.h +++ /dev/null @@ -1,60 +0,0 @@ -/*====================================================================* - - Copyright (C) 2001 Leptonica. All rights reserved. - - - - Redistribution and use in source and binary forms, with or without - - modification, are permitted provided that the following conditions - - are met: - - 1. Redistributions of source code must retain the above copyright - - notice, this list of conditions and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above - - copyright notice, this list of conditions and the following - - disclaimer in the documentation and/or other materials - - provided with the distribution. - - - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - - ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - - LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - - A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL ANY - - CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - - EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - - PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - - PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY - - OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - - NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - - SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - *====================================================================*/ - -#ifndef LEPTONICA_STRINGCODE_H -#define LEPTONICA_STRINGCODE_H - -/*! - * \file stringcode.h - * - * Data structure to hold accumulating generated code for storing - * and extracing serializable leptonica objects (e.g., pixa, recog). - * - * Also a flag for selecting a string from the L_GenAssoc struct - * in stringcode. - */ - -struct L_StrCode -{ - l_int32 fileno; /*!< index for function and output file names */ - l_int32 ifunc; /*!< index into struct currently being stored */ - SARRAY *function; /*!< store case code for extraction */ - SARRAY *data; /*!< store base64 encoded data as strings */ - SARRAY *descr; /*!< store line in description table */ - l_int32 n; /*!< number of data strings */ -}; -typedef struct L_StrCode L_STRCODE; - - -/*! Select string in stringcode for a specific serializable data type */ -enum { - L_STR_TYPE = 0, /*!< typedef for the data type */ - L_STR_NAME = 1, /*!< name of the data type */ - L_STR_READER = 2, /*!< reader to get the data type from file */ - L_STR_MEMREADER = 3 /*!< reader to get the compressed string in memory */ -}; - -#endif /* LEPTONICA_STRINGCODE_H */ diff --git a/WebRtc.NET/include/leptonica/sudoku.h b/WebRtc.NET/include/leptonica/sudoku.h deleted file mode 100644 index ba4b21e9..00000000 --- a/WebRtc.NET/include/leptonica/sudoku.h +++ /dev/null @@ -1,76 +0,0 @@ -/*====================================================================* - - Copyright (C) 2001 Leptonica. All rights reserved. - - - - Redistribution and use in source and binary forms, with or without - - modification, are permitted provided that the following conditions - - are met: - - 1. Redistributions of source code must retain the above copyright - - notice, this list of conditions and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above - - copyright notice, this list of conditions and the following - - disclaimer in the documentation and/or other materials - - provided with the distribution. - - - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - - ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - - LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - - A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL ANY - - CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - - EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - - PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - - PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY - - OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - - NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - - SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - *====================================================================*/ - -#ifndef SUDOKU_H_INCLUDED -#define SUDOKU_H_INCLUDED - -/*! - * \file sudoku.h - * - *
- *    The L_Sudoku holds all the information of the current state.
- *
- *    The input to sudokuCreate() is a file with any number of lines
- *    starting with '#', followed by 9 lines consisting of 9 numbers
- *    in each line.  These have the known values and use 0 for the unknowns.
- *    Blank lines are ignored.
- *
- *    The %locs array holds the indices of the unknowns, numbered
- *    left-to-right and top-to-bottom from 0 to 80.  The array size
- *    is initialized to %num.  %current is the index into the %locs
- *    array of the current guess: locs[current].
- *
- *    The %state array is used to determine the validity of each guess.
- *    It is of size 81, and is initialized by setting the unknowns to 0
- *    and the knowns to their input values.
- * 
- */ - -struct L_Sudoku -{ - l_int32 num; /*!< number of unknowns */ - l_int32 *locs; /*!< location of unknowns */ - l_int32 current; /*!< index into %locs of current location */ - l_int32 *init; /*!< initial state, with 0 representing */ - /*!< the unknowns */ - l_int32 *state; /*!< present state, including inits and */ - /*!< guesses of unknowns up to %current */ - l_int32 nguess; /*!< shows current number of guesses */ - l_int32 finished; /*!< set to 1 when solved */ - l_int32 failure; /*!< set to 1 if no solution is possible */ -}; -typedef struct L_Sudoku L_SUDOKU; - - - /*! For printing out array data */ -enum { - L_SUDOKU_INIT = 0, - L_SUDOKU_STATE = 1 -}; - -#endif /* SUDOKU_H_INCLUDED */ - - diff --git a/WebRtc.NET/include/leptonica/watershed.h b/WebRtc.NET/include/leptonica/watershed.h deleted file mode 100644 index d6b20775..00000000 --- a/WebRtc.NET/include/leptonica/watershed.h +++ /dev/null @@ -1,64 +0,0 @@ -/*====================================================================* - - Copyright (C) 2001 Leptonica. All rights reserved. - - - - Redistribution and use in source and binary forms, with or without - - modification, are permitted provided that the following conditions - - are met: - - 1. Redistributions of source code must retain the above copyright - - notice, this list of conditions and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above - - copyright notice, this list of conditions and the following - - disclaimer in the documentation and/or other materials - - provided with the distribution. - - - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - - ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - - LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - - A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL ANY - - CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - - EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - - PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - - PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY - - OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - - NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - - SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - *====================================================================*/ - -#ifndef LEPTONICA_WATERSHED_H -#define LEPTONICA_WATERSHED_H - -/*! - * \file watershed.h - * - * Simple data structure to hold watershed data. - * All data here is owned by the L_WShed and must be freed. - */ - -/*! Simple data structure to hold watershed data. */ -struct L_WShed -{ - struct Pix *pixs; /*!< clone of input 8 bpp pixs */ - struct Pix *pixm; /*!< clone of input 1 bpp seed (marker) pixm */ - l_int32 mindepth; /*!< minimum depth allowed for a watershed */ - struct Pix *pixlab; /*!< 16 bpp label pix */ - struct Pix *pixt; /*!< scratch pix for computing wshed regions */ - void **lines8; /*!< line ptrs for pixs */ - void **linem1; /*!< line ptrs for pixm */ - void **linelab32; /*!< line ptrs for pixlab */ - void **linet1; /*!< line ptrs for pixt */ - struct Pixa *pixad; /*!< result: 1 bpp pixa of watersheds */ - struct Pta *ptas; /*!< pta of initial seed pixels */ - struct Numa *nasi; /*!< numa of seed indicators; 0 if completed */ - struct Numa *nash; /*!< numa of initial seed heights */ - struct Numa *namh; /*!< numa of initial minima heights */ - struct Numa *nalevels; /*!< result: numa of watershed levels */ - l_int32 nseeds; /*!< number of seeds (markers) */ - l_int32 nother; /*!< number of minima different from seeds */ - l_int32 *lut; /*!< lut for pixel indices */ - struct Numa **links; /*!< back-links into lut, for updates */ - l_int32 arraysize; /*!< size of links array */ - l_int32 debug; /*!< set to 1 for debug output */ -}; -typedef struct L_WShed L_WSHED; - -#endif /* LEPTONICA_WATERSHED_H */ diff --git a/WebRtc.NET/include/third_party/jsoncpp/overrides/include/json/value.h b/WebRtc.NET/include/third_party/jsoncpp/overrides/include/json/value.h deleted file mode 100644 index 57072602..00000000 --- a/WebRtc.NET/include/third_party/jsoncpp/overrides/include/json/value.h +++ /dev/null @@ -1,1111 +0,0 @@ -// Copyright 2007-2010 Baptiste Lepilleur -// Distributed under MIT license, or public domain if desired and -// recognized in your jurisdiction. -// See file LICENSE for detail or copy at http://jsoncpp.sourceforge.net/LICENSE - -#ifndef CPPTL_JSON_H_INCLUDED -# define CPPTL_JSON_H_INCLUDED - -#if !defined(JSON_IS_AMALGAMATION) -# include "third_party/jsoncpp/source/include/json/forwards.h" -#endif // if !defined(JSON_IS_AMALGAMATION) -# include -# include - -# ifndef JSON_USE_CPPTL_SMALLMAP -# include -# else -# include -# endif -# ifdef JSON_USE_CPPTL -# include -# endif - -/** \brief JSON (JavaScript Object Notation). - */ -namespace Json { - - /** \brief Type of the value held by a Value object. - */ - enum ValueType - { - nullValue = 0, ///< 'null' value - intValue, ///< signed integer value - uintValue, ///< unsigned integer value - realValue, ///< double value - stringValue, ///< UTF-8 string value - booleanValue, ///< bool value - arrayValue, ///< array value (ordered list) - objectValue ///< object value (collection of name/value pairs). - }; - - enum CommentPlacement - { - commentBefore = 0, ///< a comment placed on the line before a value - commentAfterOnSameLine, ///< a comment just after a value on the same line - commentAfter, ///< a comment on the line after a value (only make sense for root value) - numberOfCommentPlacement - }; - -//# ifdef JSON_USE_CPPTL -// typedef CppTL::AnyEnumerator EnumMemberNames; -// typedef CppTL::AnyEnumerator EnumValues; -//# endif - - /** \brief Lightweight wrapper to tag static string. - * - * Value constructor and objectValue member assignement takes advantage of the - * StaticString and avoid the cost of string duplication when storing the - * string or the member name. - * - * Example of usage: - * \code - * Json::Value aValue( StaticString("some text") ); - * Json::Value object; - * static const StaticString code("code"); - * object[code] = 1234; - * \endcode - */ - class JSON_API StaticString - { - public: - explicit StaticString( const char *czstring ) - : str_( czstring ) - { - } - - operator const char *() const - { - return str_; - } - - const char *c_str() const - { - return str_; - } - - private: - const char *str_; - }; - - /** \brief Represents a JSON value. - * - * This class is a discriminated union wrapper that can represents a: - * - signed integer [range: Value::minInt - Value::maxInt] - * - unsigned integer (range: 0 - Value::maxUInt) - * - double - * - UTF-8 string - * - boolean - * - 'null' - * - an ordered list of Value - * - collection of name/value pairs (javascript object) - * - * The type of the held value is represented by a #ValueType and - * can be obtained using type(). - * - * values of an #objectValue or #arrayValue can be accessed using operator[]() methods. - * Non const methods will automatically create the a #nullValue element - * if it does not exist. - * The sequence of an #arrayValue will be automatically resize and initialized - * with #nullValue. resize() can be used to enlarge or truncate an #arrayValue. - * - * The get() methods can be used to obtanis default value in the case the required element - * does not exist. - * - * It is possible to iterate over the list of a #objectValue values using - * the getMemberNames() method. - */ - class JSON_API Value - { - friend class ValueIteratorBase; -# ifdef JSON_VALUE_USE_INTERNAL_MAP - friend class ValueInternalLink; - friend class ValueInternalMap; -# endif - public: - typedef std::vector Members; - typedef ValueIterator iterator; - typedef ValueConstIterator const_iterator; - typedef Json::UInt UInt; - typedef Json::Int Int; -# if defined(JSON_HAS_INT64) - typedef Json::UInt64 UInt64; - typedef Json::Int64 Int64; -#endif // defined(JSON_HAS_INT64) - typedef Json::LargestInt LargestInt; - typedef Json::LargestUInt LargestUInt; - typedef Json::ArrayIndex ArrayIndex; - - static const Value& null; - /// Minimum signed integer value that can be stored in a Json::Value. - static const LargestInt minLargestInt; - /// Maximum signed integer value that can be stored in a Json::Value. - static const LargestInt maxLargestInt; - /// Maximum unsigned integer value that can be stored in a Json::Value. - static const LargestUInt maxLargestUInt; - - /// Minimum signed int value that can be stored in a Json::Value. - static const Int minInt; - /// Maximum signed int value that can be stored in a Json::Value. - static const Int maxInt; - /// Maximum unsigned int value that can be stored in a Json::Value. - static const UInt maxUInt; - -# if defined(JSON_HAS_INT64) - /// Minimum signed 64 bits int value that can be stored in a Json::Value. - static const Int64 minInt64; - /// Maximum signed 64 bits int value that can be stored in a Json::Value. - static const Int64 maxInt64; - /// Maximum unsigned 64 bits int value that can be stored in a Json::Value. - static const UInt64 maxUInt64; -#endif // defined(JSON_HAS_INT64) - - private: -#ifndef JSONCPP_DOC_EXCLUDE_IMPLEMENTATION -# ifndef JSON_VALUE_USE_INTERNAL_MAP - class CZString - { - public: - enum DuplicationPolicy - { - noDuplication = 0, - duplicate, - duplicateOnCopy - }; - CZString( ArrayIndex index ); - CZString( const char *cstr, DuplicationPolicy allocate ); - CZString( const CZString &other ); - ~CZString(); - CZString &operator =( const CZString &other ); - bool operator<( const CZString &other ) const; - bool operator==( const CZString &other ) const; - ArrayIndex index() const; - const char *c_str() const; - bool isStaticString() const; - private: - void swap( CZString &other ); - const char *cstr_; - ArrayIndex index_; - }; - - public: -# ifndef JSON_USE_CPPTL_SMALLMAP - typedef std::map ObjectValues; -# else - typedef CppTL::SmallMap ObjectValues; -# endif // ifndef JSON_USE_CPPTL_SMALLMAP -# endif // ifndef JSON_VALUE_USE_INTERNAL_MAP -#endif // ifndef JSONCPP_DOC_EXCLUDE_IMPLEMENTATION - - public: - /** \brief Create a default Value of the given type. - - This is a very useful constructor. - To create an empty array, pass arrayValue. - To create an empty object, pass objectValue. - Another Value can then be set to this one by assignment. - This is useful since clear() and resize() will not alter types. - - Examples: - \code - Json::Value null_value; // null - Json::Value arr_value(Json::arrayValue); // [] - Json::Value obj_value(Json::objectValue); // {} - \endcode - */ - Value( ValueType type = nullValue ); - Value( Int value ); - Value( UInt value ); -#if defined(JSON_HAS_INT64) - Value( Int64 value ); - Value( UInt64 value ); -#endif // if defined(JSON_HAS_INT64) - Value( double value ); - Value( const char *value ); - Value( const char *beginValue, const char *endValue ); - /** \brief Constructs a value from a static string. - - * Like other value string constructor but do not duplicate the string for - * internal storage. The given string must remain alive after the call to this - * constructor. - * Example of usage: - * \code - * Json::Value aValue( StaticString("some text") ); - * \endcode - */ - Value( const StaticString &value ); - Value( const std::string &value ); -# ifdef JSON_USE_CPPTL - Value( const CppTL::ConstString &value ); -# endif - Value( bool value ); - Value( const Value &other ); - ~Value(); - - Value &operator=( const Value &other ); - /// Swap values. - /// \note Currently, comments are intentionally not swapped, for - /// both logic and efficiency. - void swap( Value &other ); - - ValueType type() const; - - bool operator <( const Value &other ) const; - bool operator <=( const Value &other ) const; - bool operator >=( const Value &other ) const; - bool operator >( const Value &other ) const; - - bool operator ==( const Value &other ) const; - bool operator !=( const Value &other ) const; - - int compare( const Value &other ) const; - - const char *asCString() const; - std::string asString() const; -# ifdef JSON_USE_CPPTL - CppTL::ConstString asConstString() const; -# endif - Int asInt() const; - UInt asUInt() const; -#if defined(JSON_HAS_INT64) - Int64 asInt64() const; - UInt64 asUInt64() const; -#endif // if defined(JSON_HAS_INT64) - LargestInt asLargestInt() const; - LargestUInt asLargestUInt() const; - float asFloat() const; - double asDouble() const; - bool asBool() const; - - bool isNull() const; - bool isBool() const; - bool isInt() const; - bool isInt64() const; - bool isUInt() const; - bool isUInt64() const; - bool isIntegral() const; - bool isDouble() const; - bool isNumeric() const; - bool isString() const; - bool isArray() const; - bool isObject() const; - - bool isConvertibleTo( ValueType other ) const; - - /// Number of values in array or object - ArrayIndex size() const; - - /// \brief Return true if empty array, empty object, or null; - /// otherwise, false. - bool empty() const; - - /// Return isNull() - bool operator!() const; - - /// Remove all object members and array elements. - /// \pre type() is arrayValue, objectValue, or nullValue - /// \post type() is unchanged - void clear(); - - /// Resize the array to size elements. - /// New elements are initialized to null. - /// May only be called on nullValue or arrayValue. - /// \pre type() is arrayValue or nullValue - /// \post type() is arrayValue - void resize( ArrayIndex size ); - - /// Access an array element (zero based index ). - /// If the array contains less than index element, then null value are inserted - /// in the array so that its size is index+1. - /// (You may need to say 'value[0u]' to get your compiler to distinguish - /// this from the operator[] which takes a string.) - Value &operator[]( ArrayIndex index ); - - /// Access an array element (zero based index ). - /// If the array contains less than index element, then null value are inserted - /// in the array so that its size is index+1. - /// (You may need to say 'value[0u]' to get your compiler to distinguish - /// this from the operator[] which takes a string.) - Value &operator[]( int index ); - - /// Access an array element (zero based index ) - /// (You may need to say 'value[0u]' to get your compiler to distinguish - /// this from the operator[] which takes a string.) - const Value &operator[]( ArrayIndex index ) const; - - /// Access an array element (zero based index ) - /// (You may need to say 'value[0u]' to get your compiler to distinguish - /// this from the operator[] which takes a string.) - const Value &operator[]( int index ) const; - - /// If the array contains at least index+1 elements, returns the element value, - /// otherwise returns defaultValue. - Value get( ArrayIndex index, - const Value &defaultValue ) const; - /// Return true if index < size(). - bool isValidIndex( ArrayIndex index ) const; - /// \brief Append value to array at the end. - /// - /// Equivalent to jsonvalue[jsonvalue.size()] = value; - Value &append( const Value &value ); - - /// Access an object value by name, create a null member if it does not exist. - Value &operator[]( const char *key ); - /// Access an object value by name, returns null if there is no member with that name. - const Value &operator[]( const char *key ) const; - /// Access an object value by name, create a null member if it does not exist. - Value &operator[]( const std::string &key ); - /// Access an object value by name, returns null if there is no member with that name. - const Value &operator[]( const std::string &key ) const; - /** \brief Access an object value by name, create a null member if it does not exist. - - * If the object as no entry for that name, then the member name used to store - * the new entry is not duplicated. - * Example of use: - * \code - * Json::Value object; - * static const StaticString code("code"); - * object[code] = 1234; - * \endcode - */ - Value &operator[]( const StaticString &key ); -# ifdef JSON_USE_CPPTL - /// Access an object value by name, create a null member if it does not exist. - Value &operator[]( const CppTL::ConstString &key ); - /// Access an object value by name, returns null if there is no member with that name. - const Value &operator[]( const CppTL::ConstString &key ) const; -# endif - /// Return the member named key if it exist, defaultValue otherwise. - Value get( const char *key, - const Value &defaultValue ) const; - /// Return the member named key if it exist, defaultValue otherwise. - Value get( const std::string &key, - const Value &defaultValue ) const; -# ifdef JSON_USE_CPPTL - /// Return the member named key if it exist, defaultValue otherwise. - Value get( const CppTL::ConstString &key, - const Value &defaultValue ) const; -# endif - /// \brief Remove and return the named member. - /// - /// Do nothing if it did not exist. - /// \return the removed Value, or null. - /// \pre type() is objectValue or nullValue - /// \post type() is unchanged - Value removeMember( const char* key ); - /// Same as removeMember(const char*) - Value removeMember( const std::string &key ); - - /// Return true if the object has a member named key. - bool isMember( const char *key ) const; - /// Return true if the object has a member named key. - bool isMember( const std::string &key ) const; -# ifdef JSON_USE_CPPTL - /// Return true if the object has a member named key. - bool isMember( const CppTL::ConstString &key ) const; -# endif - - /// \brief Return a list of the member names. - /// - /// If null, return an empty list. - /// \pre type() is objectValue or nullValue - /// \post if type() was nullValue, it remains nullValue - Members getMemberNames() const; - -//# ifdef JSON_USE_CPPTL -// EnumMemberNames enumMemberNames() const; -// EnumValues enumValues() const; -//# endif - - /// Comments must be //... or /* ... */ - void setComment( const char *comment, - CommentPlacement placement ); - /// Comments must be //... or /* ... */ - void setComment( const std::string &comment, - CommentPlacement placement ); - bool hasComment( CommentPlacement placement ) const; - /// Include delimiters and embedded newlines. - std::string getComment( CommentPlacement placement ) const; - - std::string toStyledString() const; - - const_iterator begin() const; - const_iterator end() const; - - iterator begin(); - iterator end(); - - private: - Value &resolveReference( const char *key, - bool isStatic ); - -# ifdef JSON_VALUE_USE_INTERNAL_MAP - inline bool isItemAvailable() const - { - return itemIsUsed_ == 0; - } - - inline void setItemUsed( bool isUsed = true ) - { - itemIsUsed_ = isUsed ? 1 : 0; - } - - inline bool isMemberNameStatic() const - { - return memberNameIsStatic_ == 0; - } - - inline void setMemberNameIsStatic( bool isStatic ) - { - memberNameIsStatic_ = isStatic ? 1 : 0; - } -# endif // # ifdef JSON_VALUE_USE_INTERNAL_MAP - - private: - struct CommentInfo - { - CommentInfo(); - ~CommentInfo(); - - void setComment( const char *text ); - - char *comment_; - }; - - //struct MemberNamesTransform - //{ - // typedef const char *result_type; - // const char *operator()( const CZString &name ) const - // { - // return name.c_str(); - // } - //}; - - union ValueHolder - { - LargestInt int_; - LargestUInt uint_; - double real_; - bool bool_; - char *string_; -# ifdef JSON_VALUE_USE_INTERNAL_MAP - ValueInternalArray *array_; - ValueInternalMap *map_; -#else - ObjectValues *map_; -# endif - } value_; - ValueType type_ : 8; - // One-bit bitfields must be unsigned to allow storing 1. - // They must be 32-bits to share storage with ValueHolder. - unsigned int allocated_ : 1; -# ifdef JSON_VALUE_USE_INTERNAL_MAP - unsigned int itemIsUsed_ : 1; // used by the ValueInternalMap container. - unsigned int memberNameIsStatic_ : 1; // used by the ValueInternalMap container. -# endif - CommentInfo *comments_; - }; - - - /** \brief Experimental and untested: represents an element of the "path" to access a node. - */ - class PathArgument - { - public: - friend class Path; - - PathArgument(); - PathArgument( ArrayIndex index ); - PathArgument( const char *key ); - PathArgument( const std::string &key ); - - private: - enum Kind - { - kindNone = 0, - kindIndex, - kindKey - }; - std::string key_; - ArrayIndex index_; - Kind kind_; - }; - - /** \brief Experimental and untested: represents a "path" to access a node. - * - * Syntax: - * - "." => root node - * - ".[n]" => elements at index 'n' of root node (an array value) - * - ".name" => member named 'name' of root node (an object value) - * - ".name1.name2.name3" - * - ".[0][1][2].name1[3]" - * - ".%" => member name is provided as parameter - * - ".[%]" => index is provied as parameter - */ - class Path - { - public: - Path( const std::string &path, - const PathArgument &a1 = PathArgument(), - const PathArgument &a2 = PathArgument(), - const PathArgument &a3 = PathArgument(), - const PathArgument &a4 = PathArgument(), - const PathArgument &a5 = PathArgument() ); - - const Value &resolve( const Value &root ) const; - Value resolve( const Value &root, - const Value &defaultValue ) const; - /// Creates the "path" to access the specified node and returns a reference on the node. - Value &make( Value &root ) const; - - private: - typedef std::vector InArgs; - typedef std::vector Args; - - void makePath( const std::string &path, - const InArgs &in ); - void addPathInArg( const std::string &path, - const InArgs &in, - InArgs::const_iterator &itInArg, - PathArgument::Kind kind ); - void invalidPath( const std::string &path, - int location ); - - Args args_; - }; - - - -#ifdef JSON_VALUE_USE_INTERNAL_MAP - /** \brief Allocator to customize Value internal map. - * Below is an example of a simple implementation (default implementation actually - * use memory pool for speed). - * \code - class DefaultValueMapAllocator : public ValueMapAllocator - { - public: // overridden from ValueMapAllocator - virtual ValueInternalMap *newMap() - { - return new ValueInternalMap(); - } - - virtual ValueInternalMap *newMapCopy( const ValueInternalMap &other ) - { - return new ValueInternalMap( other ); - } - - virtual void destructMap( ValueInternalMap *map ) - { - delete map; - } - - virtual ValueInternalLink *allocateMapBuckets( unsigned int size ) - { - return new ValueInternalLink[size]; - } - - virtual void releaseMapBuckets( ValueInternalLink *links ) - { - delete [] links; - } - - virtual ValueInternalLink *allocateMapLink() - { - return new ValueInternalLink(); - } - - virtual void releaseMapLink( ValueInternalLink *link ) - { - delete link; - } - }; - * \endcode - */ - class JSON_API ValueMapAllocator - { - public: - virtual ~ValueMapAllocator(); - virtual ValueInternalMap *newMap() = 0; - virtual ValueInternalMap *newMapCopy( const ValueInternalMap &other ) = 0; - virtual void destructMap( ValueInternalMap *map ) = 0; - virtual ValueInternalLink *allocateMapBuckets( unsigned int size ) = 0; - virtual void releaseMapBuckets( ValueInternalLink *links ) = 0; - virtual ValueInternalLink *allocateMapLink() = 0; - virtual void releaseMapLink( ValueInternalLink *link ) = 0; - }; - - /** \brief ValueInternalMap hash-map bucket chain link (for internal use only). - * \internal previous_ & next_ allows for bidirectional traversal. - */ - class JSON_API ValueInternalLink - { - public: - enum { itemPerLink = 6 }; // sizeof(ValueInternalLink) = 128 on 32 bits architecture. - enum InternalFlags { - flagAvailable = 0, - flagUsed = 1 - }; - - ValueInternalLink(); - - ~ValueInternalLink(); - - Value items_[itemPerLink]; - char *keys_[itemPerLink]; - ValueInternalLink *previous_; - ValueInternalLink *next_; - }; - - - /** \brief A linked page based hash-table implementation used internally by Value. - * \internal ValueInternalMap is a tradional bucket based hash-table, with a linked - * list in each bucket to handle collision. There is an addional twist in that - * each node of the collision linked list is a page containing a fixed amount of - * value. This provides a better compromise between memory usage and speed. - * - * Each bucket is made up of a chained list of ValueInternalLink. The last - * link of a given bucket can be found in the 'previous_' field of the following bucket. - * The last link of the last bucket is stored in tailLink_ as it has no following bucket. - * Only the last link of a bucket may contains 'available' item. The last link always - * contains at least one element unless is it the bucket one very first link. - */ - class JSON_API ValueInternalMap - { - friend class ValueIteratorBase; - friend class Value; - public: - typedef unsigned int HashKey; - typedef unsigned int BucketIndex; - -# ifndef JSONCPP_DOC_EXCLUDE_IMPLEMENTATION - struct IteratorState - { - IteratorState() - : map_(0) - , link_(0) - , itemIndex_(0) - , bucketIndex_(0) - { - } - ValueInternalMap *map_; - ValueInternalLink *link_; - BucketIndex itemIndex_; - BucketIndex bucketIndex_; - }; -# endif // ifndef JSONCPP_DOC_EXCLUDE_IMPLEMENTATION - - ValueInternalMap(); - ValueInternalMap( const ValueInternalMap &other ); - ValueInternalMap &operator =( const ValueInternalMap &other ); - ~ValueInternalMap(); - - void swap( ValueInternalMap &other ); - - BucketIndex size() const; - - void clear(); - - bool reserveDelta( BucketIndex growth ); - - bool reserve( BucketIndex newItemCount ); - - const Value *find( const char *key ) const; - - Value *find( const char *key ); - - Value &resolveReference( const char *key, - bool isStatic ); - - void remove( const char *key ); - - void doActualRemove( ValueInternalLink *link, - BucketIndex index, - BucketIndex bucketIndex ); - - ValueInternalLink *&getLastLinkInBucket( BucketIndex bucketIndex ); - - Value &setNewItem( const char *key, - bool isStatic, - ValueInternalLink *link, - BucketIndex index ); - - Value &unsafeAdd( const char *key, - bool isStatic, - HashKey hashedKey ); - - HashKey hash( const char *key ) const; - - int compare( const ValueInternalMap &other ) const; - - private: - void makeBeginIterator( IteratorState &it ) const; - void makeEndIterator( IteratorState &it ) const; - static bool equals( const IteratorState &x, const IteratorState &other ); - static void increment( IteratorState &iterator ); - static void incrementBucket( IteratorState &iterator ); - static void decrement( IteratorState &iterator ); - static const char *key( const IteratorState &iterator ); - static const char *key( const IteratorState &iterator, bool &isStatic ); - static Value &value( const IteratorState &iterator ); - static int distance( const IteratorState &x, const IteratorState &y ); - - private: - ValueInternalLink *buckets_; - ValueInternalLink *tailLink_; - BucketIndex bucketsSize_; - BucketIndex itemCount_; - }; - - /** \brief A simplified deque implementation used internally by Value. - * \internal - * It is based on a list of fixed "page", each page contains a fixed number of items. - * Instead of using a linked-list, a array of pointer is used for fast item look-up. - * Look-up for an element is as follow: - * - compute page index: pageIndex = itemIndex / itemsPerPage - * - look-up item in page: pages_[pageIndex][itemIndex % itemsPerPage] - * - * Insertion is amortized constant time (only the array containing the index of pointers - * need to be reallocated when items are appended). - */ - class JSON_API ValueInternalArray - { - friend class Value; - friend class ValueIteratorBase; - public: - enum { itemsPerPage = 8 }; // should be a power of 2 for fast divide and modulo. - typedef Value::ArrayIndex ArrayIndex; - typedef unsigned int PageIndex; - -# ifndef JSONCPP_DOC_EXCLUDE_IMPLEMENTATION - struct IteratorState // Must be a POD - { - IteratorState() - : array_(0) - , currentPageIndex_(0) - , currentItemIndex_(0) - { - } - ValueInternalArray *array_; - Value **currentPageIndex_; - unsigned int currentItemIndex_; - }; -# endif // ifndef JSONCPP_DOC_EXCLUDE_IMPLEMENTATION - - ValueInternalArray(); - ValueInternalArray( const ValueInternalArray &other ); - ValueInternalArray &operator =( const ValueInternalArray &other ); - ~ValueInternalArray(); - void swap( ValueInternalArray &other ); - - void clear(); - void resize( ArrayIndex newSize ); - - Value &resolveReference( ArrayIndex index ); - - Value *find( ArrayIndex index ) const; - - ArrayIndex size() const; - - int compare( const ValueInternalArray &other ) const; - - private: - static bool equals( const IteratorState &x, const IteratorState &other ); - static void increment( IteratorState &iterator ); - static void decrement( IteratorState &iterator ); - static Value &dereference( const IteratorState &iterator ); - static Value &unsafeDereference( const IteratorState &iterator ); - static int distance( const IteratorState &x, const IteratorState &y ); - static ArrayIndex indexOf( const IteratorState &iterator ); - void makeBeginIterator( IteratorState &it ) const; - void makeEndIterator( IteratorState &it ) const; - void makeIterator( IteratorState &it, ArrayIndex index ) const; - - void makeIndexValid( ArrayIndex index ); - - Value **pages_; - ArrayIndex size_; - PageIndex pageCount_; - }; - - /** \brief Experimental: do not use. Allocator to customize Value internal array. - * Below is an example of a simple implementation (actual implementation use - * memory pool). - \code -class DefaultValueArrayAllocator : public ValueArrayAllocator -{ -public: // overridden from ValueArrayAllocator - virtual ~DefaultValueArrayAllocator() - { - } - - virtual ValueInternalArray *newArray() - { - return new ValueInternalArray(); - } - - virtual ValueInternalArray *newArrayCopy( const ValueInternalArray &other ) - { - return new ValueInternalArray( other ); - } - - virtual void destruct( ValueInternalArray *array ) - { - delete array; - } - - virtual void reallocateArrayPageIndex( Value **&indexes, - ValueInternalArray::PageIndex &indexCount, - ValueInternalArray::PageIndex minNewIndexCount ) - { - ValueInternalArray::PageIndex newIndexCount = (indexCount*3)/2 + 1; - if ( minNewIndexCount > newIndexCount ) - newIndexCount = minNewIndexCount; - void *newIndexes = realloc( indexes, sizeof(Value*) * newIndexCount ); - if ( !newIndexes ) - throw std::bad_alloc(); - indexCount = newIndexCount; - indexes = static_cast( newIndexes ); - } - virtual void releaseArrayPageIndex( Value **indexes, - ValueInternalArray::PageIndex indexCount ) - { - if ( indexes ) - free( indexes ); - } - - virtual Value *allocateArrayPage() - { - return static_cast( malloc( sizeof(Value) * ValueInternalArray::itemsPerPage ) ); - } - - virtual void releaseArrayPage( Value *value ) - { - if ( value ) - free( value ); - } -}; - \endcode - */ - class JSON_API ValueArrayAllocator - { - public: - virtual ~ValueArrayAllocator(); - virtual ValueInternalArray *newArray() = 0; - virtual ValueInternalArray *newArrayCopy( const ValueInternalArray &other ) = 0; - virtual void destructArray( ValueInternalArray *array ) = 0; - /** \brief Reallocate array page index. - * Reallocates an array of pointer on each page. - * \param indexes [input] pointer on the current index. May be \c NULL. - * [output] pointer on the new index of at least - * \a minNewIndexCount pages. - * \param indexCount [input] current number of pages in the index. - * [output] number of page the reallocated index can handle. - * \b MUST be >= \a minNewIndexCount. - * \param minNewIndexCount Minimum number of page the new index must be able to - * handle. - */ - virtual void reallocateArrayPageIndex( Value **&indexes, - ValueInternalArray::PageIndex &indexCount, - ValueInternalArray::PageIndex minNewIndexCount ) = 0; - virtual void releaseArrayPageIndex( Value **indexes, - ValueInternalArray::PageIndex indexCount ) = 0; - virtual Value *allocateArrayPage() = 0; - virtual void releaseArrayPage( Value *value ) = 0; - }; -#endif // #ifdef JSON_VALUE_USE_INTERNAL_MAP - - - /** \brief base class for Value iterators. - * - */ - class ValueIteratorBase - { - public: - typedef unsigned int size_t; - typedef int difference_type; - typedef ValueIteratorBase SelfType; - - ValueIteratorBase(); -#ifndef JSON_VALUE_USE_INTERNAL_MAP - explicit ValueIteratorBase( const Value::ObjectValues::iterator ¤t ); -#else - ValueIteratorBase( const ValueInternalArray::IteratorState &state ); - ValueIteratorBase( const ValueInternalMap::IteratorState &state ); -#endif - - bool operator ==( const SelfType &other ) const - { - return isEqual( other ); - } - - bool operator !=( const SelfType &other ) const - { - return !isEqual( other ); - } - - difference_type operator -( const SelfType &other ) const - { - return computeDistance( other ); - } - - /// Return either the index or the member name of the referenced value as a Value. - Value key() const; - - /// Return the index of the referenced Value. -1 if it is not an arrayValue. - UInt index() const; - - /// Return the member name of the referenced Value. "" if it is not an objectValue. - const char *memberName() const; - - protected: - Value &deref() const; - - void increment(); - - void decrement(); - - difference_type computeDistance( const SelfType &other ) const; - - bool isEqual( const SelfType &other ) const; - - void copy( const SelfType &other ); - - private: -#ifndef JSON_VALUE_USE_INTERNAL_MAP - Value::ObjectValues::iterator current_; - // Indicates that iterator is for a null value. - bool isNull_; -#else - union - { - ValueInternalArray::IteratorState array_; - ValueInternalMap::IteratorState map_; - } iterator_; - bool isArray_; -#endif - }; - - /** \brief const iterator for object and array value. - * - */ - class ValueConstIterator : public ValueIteratorBase - { - friend class Value; - public: - typedef unsigned int size_t; - typedef int difference_type; - typedef const Value &reference; - typedef const Value *pointer; - typedef ValueConstIterator SelfType; - - ValueConstIterator(); - private: - /*! \internal Use by Value to create an iterator. - */ -#ifndef JSON_VALUE_USE_INTERNAL_MAP - explicit ValueConstIterator( const Value::ObjectValues::iterator ¤t ); -#else - ValueConstIterator( const ValueInternalArray::IteratorState &state ); - ValueConstIterator( const ValueInternalMap::IteratorState &state ); -#endif - public: - SelfType &operator =( const ValueIteratorBase &other ); - - SelfType operator++( int ) - { - SelfType temp( *this ); - ++*this; - return temp; - } - - SelfType operator--( int ) - { - SelfType temp( *this ); - --*this; - return temp; - } - - SelfType &operator--() - { - decrement(); - return *this; - } - - SelfType &operator++() - { - increment(); - return *this; - } - - reference operator *() const - { - return deref(); - } - }; - - - /** \brief Iterator for object and array value. - */ - class ValueIterator : public ValueIteratorBase - { - friend class Value; - public: - typedef unsigned int size_t; - typedef int difference_type; - typedef Value &reference; - typedef Value *pointer; - typedef ValueIterator SelfType; - - ValueIterator(); - ValueIterator( const ValueConstIterator &other ); - ValueIterator( const ValueIterator &other ); - private: - /*! \internal Use by Value to create an iterator. - */ -#ifndef JSON_VALUE_USE_INTERNAL_MAP - explicit ValueIterator( const Value::ObjectValues::iterator ¤t ); -#else - ValueIterator( const ValueInternalArray::IteratorState &state ); - ValueIterator( const ValueInternalMap::IteratorState &state ); -#endif - public: - - SelfType &operator =( const SelfType &other ); - - SelfType operator++( int ) - { - SelfType temp( *this ); - ++*this; - return temp; - } - - SelfType operator--( int ) - { - SelfType temp( *this ); - --*this; - return temp; - } - - SelfType &operator--() - { - decrement(); - return *this; - } - - SelfType &operator++() - { - increment(); - return *this; - } - - reference operator *() const - { - return deref(); - } - }; - - -} // namespace Json - - -#endif // CPPTL_JSON_H_INCLUDED diff --git a/WebRtc.NET/include/third_party/jsoncpp/source/include/json/assertions.h b/WebRtc.NET/include/third_party/jsoncpp/source/include/json/assertions.h deleted file mode 100644 index a480585a..00000000 --- a/WebRtc.NET/include/third_party/jsoncpp/source/include/json/assertions.h +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright 2007-2010 Baptiste Lepilleur -// Distributed under MIT license, or public domain if desired and -// recognized in your jurisdiction. -// See file LICENSE for detail or copy at http://jsoncpp.sourceforge.net/LICENSE - -#ifndef CPPTL_JSON_ASSERTIONS_H_INCLUDED -# define CPPTL_JSON_ASSERTIONS_H_INCLUDED - -#include - -#if !defined(JSON_IS_AMALGAMATION) -# include -#endif // if !defined(JSON_IS_AMALGAMATION) - -#if JSON_USE_EXCEPTION -#define JSON_ASSERT( condition ) assert( condition ); // @todo <= change this into an exception throw -#define JSON_FAIL_MESSAGE( message ) throw std::runtime_error( message ); -#else // JSON_USE_EXCEPTION -#define JSON_ASSERT( condition ) assert( condition ); - -// The call to assert() will show the failure message in debug builds. In -// release bugs we write to invalid memory in order to crash hard, so that a -// debugger or crash reporter gets the chance to take over. We still call exit() -// afterward in order to tell the compiler that this macro doesn't return. -#define JSON_FAIL_MESSAGE( message ) { assert(false && message); strcpy(reinterpret_cast(666), message); exit(123); } - -#endif - -#define JSON_ASSERT_MESSAGE( condition, message ) if (!( condition )) { JSON_FAIL_MESSAGE( message ) } - -#endif // CPPTL_JSON_ASSERTIONS_H_INCLUDED diff --git a/WebRtc.NET/include/third_party/jsoncpp/source/include/json/autolink.h b/WebRtc.NET/include/third_party/jsoncpp/source/include/json/autolink.h deleted file mode 100644 index 02328d1f..00000000 --- a/WebRtc.NET/include/third_party/jsoncpp/source/include/json/autolink.h +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright 2007-2010 Baptiste Lepilleur -// Distributed under MIT license, or public domain if desired and -// recognized in your jurisdiction. -// See file LICENSE for detail or copy at http://jsoncpp.sourceforge.net/LICENSE - -#ifndef JSON_AUTOLINK_H_INCLUDED -# define JSON_AUTOLINK_H_INCLUDED - -# include "config.h" - -# ifdef JSON_IN_CPPTL -# include -# endif - -# if !defined(JSON_NO_AUTOLINK) && !defined(JSON_DLL_BUILD) && !defined(JSON_IN_CPPTL) -# define CPPTL_AUTOLINK_NAME "json" -# undef CPPTL_AUTOLINK_DLL -# ifdef JSON_DLL -# define CPPTL_AUTOLINK_DLL -# endif -# include "autolink.h" -# endif - -#endif // JSON_AUTOLINK_H_INCLUDED diff --git a/WebRtc.NET/include/third_party/jsoncpp/source/include/json/config.h b/WebRtc.NET/include/third_party/jsoncpp/source/include/json/config.h deleted file mode 100644 index 72437c4b..00000000 --- a/WebRtc.NET/include/third_party/jsoncpp/source/include/json/config.h +++ /dev/null @@ -1,98 +0,0 @@ -// Copyright 2007-2010 Baptiste Lepilleur -// Distributed under MIT license, or public domain if desired and -// recognized in your jurisdiction. -// See file LICENSE for detail or copy at http://jsoncpp.sourceforge.net/LICENSE - -#ifndef JSON_CONFIG_H_INCLUDED -# define JSON_CONFIG_H_INCLUDED - -/// If defined, indicates that json library is embedded in CppTL library. -//# define JSON_IN_CPPTL 1 - -/// If defined, indicates that json may leverage CppTL library -//# define JSON_USE_CPPTL 1 -/// If defined, indicates that cpptl vector based map should be used instead of std::map -/// as Value container. -//# define JSON_USE_CPPTL_SMALLMAP 1 -/// If defined, indicates that Json specific container should be used -/// (hash table & simple deque container with customizable allocator). -/// THIS FEATURE IS STILL EXPERIMENTAL! There is know bugs: See #3177332 -//# define JSON_VALUE_USE_INTERNAL_MAP 1 -/// Force usage of standard new/malloc based allocator instead of memory pool based allocator. -/// The memory pools allocator used optimization (initializing Value and ValueInternalLink -/// as if it was a POD) that may cause some validation tool to report errors. -/// Only has effects if JSON_VALUE_USE_INTERNAL_MAP is defined. -//# define JSON_USE_SIMPLE_INTERNAL_ALLOCATOR 1 - -// If non-zero, the library uses exceptions to report bad input instead of C -// assertion macros. The default is to use exceptions. -# ifndef JSON_USE_EXCEPTION -# define JSON_USE_EXCEPTION 1 -# endif - -/// If defined, indicates that the source file is amalgated -/// to prevent private header inclusion. -/// Remarks: it is automatically defined in the generated amalgated header. -// #define JSON_IS_AMALGAMATION - - -# ifdef JSON_IN_CPPTL -# include -# ifndef JSON_USE_CPPTL -# define JSON_USE_CPPTL 1 -# endif -# endif - -# ifdef JSON_IN_CPPTL -# define JSON_API CPPTL_API -# elif defined(JSON_DLL_BUILD) -# define JSON_API __declspec(dllexport) -# elif defined(JSON_DLL) -# define JSON_API __declspec(dllimport) -# else -# define JSON_API -# endif - -// If JSON_NO_INT64 is defined, then Json only support C++ "int" type for integer -// Storages, and 64 bits integer support is disabled. -// #define JSON_NO_INT64 1 - -#if defined(_MSC_VER) && _MSC_VER <= 1200 // MSVC 6 -// Microsoft Visual Studio 6 only support conversion from __int64 to double -// (no conversion from unsigned __int64). -#define JSON_USE_INT64_DOUBLE_CONVERSION 1 -#endif // if defined(_MSC_VER) && _MSC_VER < 1200 // MSVC 6 - -#if defined(_MSC_VER) && _MSC_VER >= 1500 // MSVC 2008 -/// Indicates that the following function is deprecated. -# define JSONCPP_DEPRECATED(message) __declspec(deprecated(message)) -#endif - -#if !defined(JSONCPP_DEPRECATED) -# define JSONCPP_DEPRECATED(message) -#endif // if !defined(JSONCPP_DEPRECATED) - -namespace Json { - typedef int Int; - typedef unsigned int UInt; -# if defined(JSON_NO_INT64) - typedef int LargestInt; - typedef unsigned int LargestUInt; -# undef JSON_HAS_INT64 -# else // if defined(JSON_NO_INT64) - // For Microsoft Visual use specific types as long long is not supported -# if defined(_MSC_VER) // Microsoft Visual Studio - typedef __int64 Int64; - typedef unsigned __int64 UInt64; -# else // if defined(_MSC_VER) // Other platforms, use long long - typedef long long int Int64; - typedef unsigned long long int UInt64; -# endif // if defined(_MSC_VER) - typedef Int64 LargestInt; - typedef UInt64 LargestUInt; -# define JSON_HAS_INT64 -# endif // if defined(JSON_NO_INT64) -} // end namespace Json - - -#endif // JSON_CONFIG_H_INCLUDED diff --git a/WebRtc.NET/include/third_party/jsoncpp/source/include/json/features.h b/WebRtc.NET/include/third_party/jsoncpp/source/include/json/features.h deleted file mode 100644 index 43532784..00000000 --- a/WebRtc.NET/include/third_party/jsoncpp/source/include/json/features.h +++ /dev/null @@ -1,49 +0,0 @@ -// Copyright 2007-2010 Baptiste Lepilleur -// Distributed under MIT license, or public domain if desired and -// recognized in your jurisdiction. -// See file LICENSE for detail or copy at http://jsoncpp.sourceforge.net/LICENSE - -#ifndef CPPTL_JSON_FEATURES_H_INCLUDED -# define CPPTL_JSON_FEATURES_H_INCLUDED - -#if !defined(JSON_IS_AMALGAMATION) -# include "forwards.h" -#endif // if !defined(JSON_IS_AMALGAMATION) - -namespace Json { - - /** \brief Configuration passed to reader and writer. - * This configuration object can be used to force the Reader or Writer - * to behave in a standard conforming way. - */ - class JSON_API Features - { - public: - /** \brief A configuration that allows all features and assumes all strings are UTF-8. - * - C & C++ comments are allowed - * - Root object can be any JSON value - * - Assumes Value strings are encoded in UTF-8 - */ - static Features all(); - - /** \brief A configuration that is strictly compatible with the JSON specification. - * - Comments are forbidden. - * - Root object must be either an array or an object value. - * - Assumes Value strings are encoded in UTF-8 - */ - static Features strictMode(); - - /** \brief Initialize the configuration like JsonConfig::allFeatures; - */ - Features(); - - /// \c true if comments are allowed. Default: \c true. - bool allowComments_; - - /// \c true if root must be either an array or an object value. Default: \c false. - bool strictRoot_; - }; - -} // namespace Json - -#endif // CPPTL_JSON_FEATURES_H_INCLUDED diff --git a/WebRtc.NET/include/third_party/jsoncpp/source/include/json/forwards.h b/WebRtc.NET/include/third_party/jsoncpp/source/include/json/forwards.h deleted file mode 100644 index ab863da8..00000000 --- a/WebRtc.NET/include/third_party/jsoncpp/source/include/json/forwards.h +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright 2007-2010 Baptiste Lepilleur -// Distributed under MIT license, or public domain if desired and -// recognized in your jurisdiction. -// See file LICENSE for detail or copy at http://jsoncpp.sourceforge.net/LICENSE - -#ifndef JSON_FORWARDS_H_INCLUDED -# define JSON_FORWARDS_H_INCLUDED - -#if !defined(JSON_IS_AMALGAMATION) -# include "config.h" -#endif // if !defined(JSON_IS_AMALGAMATION) - -namespace Json { - - // writer.h - class FastWriter; - class StyledWriter; - - // reader.h - class Reader; - - // features.h - class Features; - - // value.h - typedef unsigned int ArrayIndex; - class StaticString; - class Path; - class PathArgument; - class Value; - class ValueIteratorBase; - class ValueIterator; - class ValueConstIterator; -#ifdef JSON_VALUE_USE_INTERNAL_MAP - class ValueMapAllocator; - class ValueInternalLink; - class ValueInternalArray; - class ValueInternalMap; -#endif // #ifdef JSON_VALUE_USE_INTERNAL_MAP - -} // namespace Json - - -#endif // JSON_FORWARDS_H_INCLUDED diff --git a/WebRtc.NET/include/third_party/jsoncpp/source/include/json/json.h b/WebRtc.NET/include/third_party/jsoncpp/source/include/json/json.h deleted file mode 100644 index da5fc967..00000000 --- a/WebRtc.NET/include/third_party/jsoncpp/source/include/json/json.h +++ /dev/null @@ -1,15 +0,0 @@ -// Copyright 2007-2010 Baptiste Lepilleur -// Distributed under MIT license, or public domain if desired and -// recognized in your jurisdiction. -// See file LICENSE for detail or copy at http://jsoncpp.sourceforge.net/LICENSE - -#ifndef JSON_JSON_H_INCLUDED -# define JSON_JSON_H_INCLUDED - -# include "autolink.h" -# include "value.h" -# include "reader.h" -# include "writer.h" -# include "features.h" - -#endif // JSON_JSON_H_INCLUDED diff --git a/WebRtc.NET/include/third_party/jsoncpp/source/include/json/reader.h b/WebRtc.NET/include/third_party/jsoncpp/source/include/json/reader.h deleted file mode 100644 index a3023b31..00000000 --- a/WebRtc.NET/include/third_party/jsoncpp/source/include/json/reader.h +++ /dev/null @@ -1,213 +0,0 @@ -// Copyright 2007-2010 Baptiste Lepilleur -// Distributed under MIT license, or public domain if desired and -// recognized in your jurisdiction. -// See file LICENSE for detail or copy at http://jsoncpp.sourceforge.net/LICENSE - -#ifndef CPPTL_JSON_READER_H_INCLUDED -# define CPPTL_JSON_READER_H_INCLUDED - -#if !defined(JSON_IS_AMALGAMATION) -# include "features.h" -# include "value.h" -#endif // if !defined(JSON_IS_AMALGAMATION) -# include -# include -# include - -namespace Json { - - /** \brief Unserialize a JSON document into a Value. - * - */ - class JSON_API Reader - { - public: - typedef char Char; - typedef const Char *Location; - - /** \brief Constructs a Reader allowing all features - * for parsing. - */ - Reader(); - - /** \brief Constructs a Reader allowing the specified feature set - * for parsing. - */ - Reader( const Features &features ); - - /** \brief Read a Value from a JSON document. - * \param document UTF-8 encoded string containing the document to read. - * \param root [out] Contains the root value of the document if it was - * successfully parsed. - * \param collectComments \c true to collect comment and allow writing them back during - * serialization, \c false to discard comments. - * This parameter is ignored if Features::allowComments_ - * is \c false. - * \return \c true if the document was successfully parsed, \c false if an error occurred. - */ - bool parse( const std::string &document, - Value &root, - bool collectComments = true ); - - /** \brief Read a Value from a JSON document. - * \param beginDoc Pointer on the beginning of the UTF-8 encoded string of the document to read. - * \param endDoc Pointer on the end of the UTF-8 encoded string of the document to read. - \ Must be >= beginDoc. - * \param root [out] Contains the root value of the document if it was - * successfully parsed. - * \param collectComments \c true to collect comment and allow writing them back during - * serialization, \c false to discard comments. - * This parameter is ignored if Features::allowComments_ - * is \c false. - * \return \c true if the document was successfully parsed, \c false if an error occurred. - */ - bool parse( const char *beginDoc, const char *endDoc, - Value &root, - bool collectComments = true ); - - /// \brief Parse from input stream. - /// \see Json::operator>>(std::istream&, Json::Value&). - bool parse( std::istream &is, - Value &root, - bool collectComments = true ); - - /** \brief Returns a user friendly string that list errors in the parsed document. - * \return Formatted error message with the list of errors with their location in - * the parsed document. An empty string is returned if no error occurred - * during parsing. - * \deprecated Use getFormattedErrorMessages() instead (typo fix). - */ - JSONCPP_DEPRECATED("Use getFormattedErrorMessages instead") - std::string getFormatedErrorMessages() const; - - /** \brief Returns a user friendly string that list errors in the parsed document. - * \return Formatted error message with the list of errors with their location in - * the parsed document. An empty string is returned if no error occurred - * during parsing. - */ - std::string getFormattedErrorMessages() const; - - private: - enum TokenType - { - tokenEndOfStream = 0, - tokenObjectBegin, - tokenObjectEnd, - tokenArrayBegin, - tokenArrayEnd, - tokenString, - tokenNumber, - tokenTrue, - tokenFalse, - tokenNull, - tokenArraySeparator, - tokenMemberSeparator, - tokenComment, - tokenError - }; - - class Token - { - public: - TokenType type_; - Location start_; - Location end_; - }; - - class ErrorInfo - { - public: - Token token_; - std::string message_; - Location extra_; - }; - - typedef std::deque Errors; - - bool expectToken( TokenType type, Token &token, const char *message ); - bool readToken( Token &token ); - void skipSpaces(); - bool match( Location pattern, - int patternLength ); - bool readComment(); - bool readCStyleComment(); - bool readCppStyleComment(); - bool readString(); - void readNumber(); - bool readValue(); - bool readObject( Token &token ); - bool readArray( Token &token ); - bool decodeNumber( Token &token ); - bool decodeString( Token &token ); - bool decodeString( Token &token, std::string &decoded ); - bool decodeDouble( Token &token ); - bool decodeUnicodeCodePoint( Token &token, - Location ¤t, - Location end, - unsigned int &unicode ); - bool decodeUnicodeEscapeSequence( Token &token, - Location ¤t, - Location end, - unsigned int &unicode ); - bool addError( const std::string &message, - Token &token, - Location extra = 0 ); - bool recoverFromError( TokenType skipUntilToken ); - bool addErrorAndRecover( const std::string &message, - Token &token, - TokenType skipUntilToken ); - void skipUntilSpace(); - Value ¤tValue(); - Char getNextChar(); - void getLocationLineAndColumn( Location location, - int &line, - int &column ) const; - std::string getLocationLineAndColumn( Location location ) const; - void addComment( Location begin, - Location end, - CommentPlacement placement ); - void skipCommentTokens( Token &token ); - - typedef std::stack Nodes; - Nodes nodes_; - Errors errors_; - std::string document_; - Location begin_; - Location end_; - Location current_; - Location lastValueEnd_; - Value *lastValue_; - std::string commentsBefore_; - Features features_; - bool collectComments_; - }; - - /** \brief Read from 'sin' into 'root'. - - Always keep comments from the input JSON. - - This can be used to read a file into a particular sub-object. - For example: - \code - Json::Value root; - cin >> root["dir"]["file"]; - cout << root; - \endcode - Result: - \verbatim - { - "dir": { - "file": { - // The input stream JSON would be nested here. - } - } - } - \endverbatim - \throw std::exception on parse error. - \see Json::operator<<() - */ - std::istream& operator>>( std::istream&, Value& ); - -} // namespace Json - -#endif // CPPTL_JSON_READER_H_INCLUDED diff --git a/WebRtc.NET/include/third_party/jsoncpp/source/include/json/value.h b/WebRtc.NET/include/third_party/jsoncpp/source/include/json/value.h deleted file mode 100644 index b013c9b8..00000000 --- a/WebRtc.NET/include/third_party/jsoncpp/source/include/json/value.h +++ /dev/null @@ -1,1109 +0,0 @@ -// Copyright 2007-2010 Baptiste Lepilleur -// Distributed under MIT license, or public domain if desired and -// recognized in your jurisdiction. -// See file LICENSE for detail or copy at http://jsoncpp.sourceforge.net/LICENSE - -#ifndef CPPTL_JSON_H_INCLUDED -# define CPPTL_JSON_H_INCLUDED - -#if !defined(JSON_IS_AMALGAMATION) -# include "forwards.h" -#endif // if !defined(JSON_IS_AMALGAMATION) -# include -# include - -# ifndef JSON_USE_CPPTL_SMALLMAP -# include -# else -# include -# endif -# ifdef JSON_USE_CPPTL -# include -# endif - -/** \brief JSON (JavaScript Object Notation). - */ -namespace Json { - - /** \brief Type of the value held by a Value object. - */ - enum ValueType - { - nullValue = 0, ///< 'null' value - intValue, ///< signed integer value - uintValue, ///< unsigned integer value - realValue, ///< double value - stringValue, ///< UTF-8 string value - booleanValue, ///< bool value - arrayValue, ///< array value (ordered list) - objectValue ///< object value (collection of name/value pairs). - }; - - enum CommentPlacement - { - commentBefore = 0, ///< a comment placed on the line before a value - commentAfterOnSameLine, ///< a comment just after a value on the same line - commentAfter, ///< a comment on the line after a value (only make sense for root value) - numberOfCommentPlacement - }; - -//# ifdef JSON_USE_CPPTL -// typedef CppTL::AnyEnumerator EnumMemberNames; -// typedef CppTL::AnyEnumerator EnumValues; -//# endif - - /** \brief Lightweight wrapper to tag static string. - * - * Value constructor and objectValue member assignement takes advantage of the - * StaticString and avoid the cost of string duplication when storing the - * string or the member name. - * - * Example of usage: - * \code - * Json::Value aValue( StaticString("some text") ); - * Json::Value object; - * static const StaticString code("code"); - * object[code] = 1234; - * \endcode - */ - class JSON_API StaticString - { - public: - explicit StaticString( const char *czstring ) - : str_( czstring ) - { - } - - operator const char *() const - { - return str_; - } - - const char *c_str() const - { - return str_; - } - - private: - const char *str_; - }; - - /** \brief Represents a JSON value. - * - * This class is a discriminated union wrapper that can represents a: - * - signed integer [range: Value::minInt - Value::maxInt] - * - unsigned integer (range: 0 - Value::maxUInt) - * - double - * - UTF-8 string - * - boolean - * - 'null' - * - an ordered list of Value - * - collection of name/value pairs (javascript object) - * - * The type of the held value is represented by a #ValueType and - * can be obtained using type(). - * - * values of an #objectValue or #arrayValue can be accessed using operator[]() methods. - * Non const methods will automatically create the a #nullValue element - * if it does not exist. - * The sequence of an #arrayValue will be automatically resize and initialized - * with #nullValue. resize() can be used to enlarge or truncate an #arrayValue. - * - * The get() methods can be used to obtanis default value in the case the required element - * does not exist. - * - * It is possible to iterate over the list of a #objectValue values using - * the getMemberNames() method. - */ - class JSON_API Value - { - friend class ValueIteratorBase; -# ifdef JSON_VALUE_USE_INTERNAL_MAP - friend class ValueInternalLink; - friend class ValueInternalMap; -# endif - public: - typedef std::vector Members; - typedef ValueIterator iterator; - typedef ValueConstIterator const_iterator; - typedef Json::UInt UInt; - typedef Json::Int Int; -# if defined(JSON_HAS_INT64) - typedef Json::UInt64 UInt64; - typedef Json::Int64 Int64; -#endif // defined(JSON_HAS_INT64) - typedef Json::LargestInt LargestInt; - typedef Json::LargestUInt LargestUInt; - typedef Json::ArrayIndex ArrayIndex; - - static const Value null; - /// Minimum signed integer value that can be stored in a Json::Value. - static const LargestInt minLargestInt; - /// Maximum signed integer value that can be stored in a Json::Value. - static const LargestInt maxLargestInt; - /// Maximum unsigned integer value that can be stored in a Json::Value. - static const LargestUInt maxLargestUInt; - - /// Minimum signed int value that can be stored in a Json::Value. - static const Int minInt; - /// Maximum signed int value that can be stored in a Json::Value. - static const Int maxInt; - /// Maximum unsigned int value that can be stored in a Json::Value. - static const UInt maxUInt; - -# if defined(JSON_HAS_INT64) - /// Minimum signed 64 bits int value that can be stored in a Json::Value. - static const Int64 minInt64; - /// Maximum signed 64 bits int value that can be stored in a Json::Value. - static const Int64 maxInt64; - /// Maximum unsigned 64 bits int value that can be stored in a Json::Value. - static const UInt64 maxUInt64; -#endif // defined(JSON_HAS_INT64) - - private: -#ifndef JSONCPP_DOC_EXCLUDE_IMPLEMENTATION -# ifndef JSON_VALUE_USE_INTERNAL_MAP - class CZString - { - public: - enum DuplicationPolicy - { - noDuplication = 0, - duplicate, - duplicateOnCopy - }; - CZString( ArrayIndex index ); - CZString( const char *cstr, DuplicationPolicy allocate ); - CZString( const CZString &other ); - ~CZString(); - CZString &operator =( const CZString &other ); - bool operator<( const CZString &other ) const; - bool operator==( const CZString &other ) const; - ArrayIndex index() const; - const char *c_str() const; - bool isStaticString() const; - private: - void swap( CZString &other ); - const char *cstr_; - ArrayIndex index_; - }; - - public: -# ifndef JSON_USE_CPPTL_SMALLMAP - typedef std::map ObjectValues; -# else - typedef CppTL::SmallMap ObjectValues; -# endif // ifndef JSON_USE_CPPTL_SMALLMAP -# endif // ifndef JSON_VALUE_USE_INTERNAL_MAP -#endif // ifndef JSONCPP_DOC_EXCLUDE_IMPLEMENTATION - - public: - /** \brief Create a default Value of the given type. - - This is a very useful constructor. - To create an empty array, pass arrayValue. - To create an empty object, pass objectValue. - Another Value can then be set to this one by assignment. - This is useful since clear() and resize() will not alter types. - - Examples: - \code - Json::Value null_value; // null - Json::Value arr_value(Json::arrayValue); // [] - Json::Value obj_value(Json::objectValue); // {} - \endcode - */ - Value( ValueType type = nullValue ); - Value( Int value ); - Value( UInt value ); -#if defined(JSON_HAS_INT64) - Value( Int64 value ); - Value( UInt64 value ); -#endif // if defined(JSON_HAS_INT64) - Value( double value ); - Value( const char *value ); - Value( const char *beginValue, const char *endValue ); - /** \brief Constructs a value from a static string. - - * Like other value string constructor but do not duplicate the string for - * internal storage. The given string must remain alive after the call to this - * constructor. - * Example of usage: - * \code - * Json::Value aValue( StaticString("some text") ); - * \endcode - */ - Value( const StaticString &value ); - Value( const std::string &value ); -# ifdef JSON_USE_CPPTL - Value( const CppTL::ConstString &value ); -# endif - Value( bool value ); - Value( const Value &other ); - ~Value(); - - Value &operator=( const Value &other ); - /// Swap values. - /// \note Currently, comments are intentionally not swapped, for - /// both logic and efficiency. - void swap( Value &other ); - - ValueType type() const; - - bool operator <( const Value &other ) const; - bool operator <=( const Value &other ) const; - bool operator >=( const Value &other ) const; - bool operator >( const Value &other ) const; - - bool operator ==( const Value &other ) const; - bool operator !=( const Value &other ) const; - - int compare( const Value &other ) const; - - const char *asCString() const; - std::string asString() const; -# ifdef JSON_USE_CPPTL - CppTL::ConstString asConstString() const; -# endif - Int asInt() const; - UInt asUInt() const; -#if defined(JSON_HAS_INT64) - Int64 asInt64() const; - UInt64 asUInt64() const; -#endif // if defined(JSON_HAS_INT64) - LargestInt asLargestInt() const; - LargestUInt asLargestUInt() const; - float asFloat() const; - double asDouble() const; - bool asBool() const; - - bool isNull() const; - bool isBool() const; - bool isInt() const; - bool isInt64() const; - bool isUInt() const; - bool isUInt64() const; - bool isIntegral() const; - bool isDouble() const; - bool isNumeric() const; - bool isString() const; - bool isArray() const; - bool isObject() const; - - bool isConvertibleTo( ValueType other ) const; - - /// Number of values in array or object - ArrayIndex size() const; - - /// \brief Return true if empty array, empty object, or null; - /// otherwise, false. - bool empty() const; - - /// Return isNull() - bool operator!() const; - - /// Remove all object members and array elements. - /// \pre type() is arrayValue, objectValue, or nullValue - /// \post type() is unchanged - void clear(); - - /// Resize the array to size elements. - /// New elements are initialized to null. - /// May only be called on nullValue or arrayValue. - /// \pre type() is arrayValue or nullValue - /// \post type() is arrayValue - void resize( ArrayIndex size ); - - /// Access an array element (zero based index ). - /// If the array contains less than index element, then null value are inserted - /// in the array so that its size is index+1. - /// (You may need to say 'value[0u]' to get your compiler to distinguish - /// this from the operator[] which takes a string.) - Value &operator[]( ArrayIndex index ); - - /// Access an array element (zero based index ). - /// If the array contains less than index element, then null value are inserted - /// in the array so that its size is index+1. - /// (You may need to say 'value[0u]' to get your compiler to distinguish - /// this from the operator[] which takes a string.) - Value &operator[]( int index ); - - /// Access an array element (zero based index ) - /// (You may need to say 'value[0u]' to get your compiler to distinguish - /// this from the operator[] which takes a string.) - const Value &operator[]( ArrayIndex index ) const; - - /// Access an array element (zero based index ) - /// (You may need to say 'value[0u]' to get your compiler to distinguish - /// this from the operator[] which takes a string.) - const Value &operator[]( int index ) const; - - /// If the array contains at least index+1 elements, returns the element value, - /// otherwise returns defaultValue. - Value get( ArrayIndex index, - const Value &defaultValue ) const; - /// Return true if index < size(). - bool isValidIndex( ArrayIndex index ) const; - /// \brief Append value to array at the end. - /// - /// Equivalent to jsonvalue[jsonvalue.size()] = value; - Value &append( const Value &value ); - - /// Access an object value by name, create a null member if it does not exist. - Value &operator[]( const char *key ); - /// Access an object value by name, returns null if there is no member with that name. - const Value &operator[]( const char *key ) const; - /// Access an object value by name, create a null member if it does not exist. - Value &operator[]( const std::string &key ); - /// Access an object value by name, returns null if there is no member with that name. - const Value &operator[]( const std::string &key ) const; - /** \brief Access an object value by name, create a null member if it does not exist. - - * If the object as no entry for that name, then the member name used to store - * the new entry is not duplicated. - * Example of use: - * \code - * Json::Value object; - * static const StaticString code("code"); - * object[code] = 1234; - * \endcode - */ - Value &operator[]( const StaticString &key ); -# ifdef JSON_USE_CPPTL - /// Access an object value by name, create a null member if it does not exist. - Value &operator[]( const CppTL::ConstString &key ); - /// Access an object value by name, returns null if there is no member with that name. - const Value &operator[]( const CppTL::ConstString &key ) const; -# endif - /// Return the member named key if it exist, defaultValue otherwise. - Value get( const char *key, - const Value &defaultValue ) const; - /// Return the member named key if it exist, defaultValue otherwise. - Value get( const std::string &key, - const Value &defaultValue ) const; -# ifdef JSON_USE_CPPTL - /// Return the member named key if it exist, defaultValue otherwise. - Value get( const CppTL::ConstString &key, - const Value &defaultValue ) const; -# endif - /// \brief Remove and return the named member. - /// - /// Do nothing if it did not exist. - /// \return the removed Value, or null. - /// \pre type() is objectValue or nullValue - /// \post type() is unchanged - Value removeMember( const char* key ); - /// Same as removeMember(const char*) - Value removeMember( const std::string &key ); - - /// Return true if the object has a member named key. - bool isMember( const char *key ) const; - /// Return true if the object has a member named key. - bool isMember( const std::string &key ) const; -# ifdef JSON_USE_CPPTL - /// Return true if the object has a member named key. - bool isMember( const CppTL::ConstString &key ) const; -# endif - - /// \brief Return a list of the member names. - /// - /// If null, return an empty list. - /// \pre type() is objectValue or nullValue - /// \post if type() was nullValue, it remains nullValue - Members getMemberNames() const; - -//# ifdef JSON_USE_CPPTL -// EnumMemberNames enumMemberNames() const; -// EnumValues enumValues() const; -//# endif - - /// Comments must be //... or /* ... */ - void setComment( const char *comment, - CommentPlacement placement ); - /// Comments must be //... or /* ... */ - void setComment( const std::string &comment, - CommentPlacement placement ); - bool hasComment( CommentPlacement placement ) const; - /// Include delimiters and embedded newlines. - std::string getComment( CommentPlacement placement ) const; - - std::string toStyledString() const; - - const_iterator begin() const; - const_iterator end() const; - - iterator begin(); - iterator end(); - - private: - Value &resolveReference( const char *key, - bool isStatic ); - -# ifdef JSON_VALUE_USE_INTERNAL_MAP - inline bool isItemAvailable() const - { - return itemIsUsed_ == 0; - } - - inline void setItemUsed( bool isUsed = true ) - { - itemIsUsed_ = isUsed ? 1 : 0; - } - - inline bool isMemberNameStatic() const - { - return memberNameIsStatic_ == 0; - } - - inline void setMemberNameIsStatic( bool isStatic ) - { - memberNameIsStatic_ = isStatic ? 1 : 0; - } -# endif // # ifdef JSON_VALUE_USE_INTERNAL_MAP - - private: - struct CommentInfo - { - CommentInfo(); - ~CommentInfo(); - - void setComment( const char *text ); - - char *comment_; - }; - - //struct MemberNamesTransform - //{ - // typedef const char *result_type; - // const char *operator()( const CZString &name ) const - // { - // return name.c_str(); - // } - //}; - - union ValueHolder - { - LargestInt int_; - LargestUInt uint_; - double real_; - bool bool_; - char *string_; -# ifdef JSON_VALUE_USE_INTERNAL_MAP - ValueInternalArray *array_; - ValueInternalMap *map_; -#else - ObjectValues *map_; -# endif - } value_; - ValueType type_ : 8; - int allocated_ : 1; // Notes: if declared as bool, bitfield is useless. -# ifdef JSON_VALUE_USE_INTERNAL_MAP - unsigned int itemIsUsed_ : 1; // used by the ValueInternalMap container. - int memberNameIsStatic_ : 1; // used by the ValueInternalMap container. -# endif - CommentInfo *comments_; - }; - - - /** \brief Experimental and untested: represents an element of the "path" to access a node. - */ - class PathArgument - { - public: - friend class Path; - - PathArgument(); - PathArgument( ArrayIndex index ); - PathArgument( const char *key ); - PathArgument( const std::string &key ); - - private: - enum Kind - { - kindNone = 0, - kindIndex, - kindKey - }; - std::string key_; - ArrayIndex index_; - Kind kind_; - }; - - /** \brief Experimental and untested: represents a "path" to access a node. - * - * Syntax: - * - "." => root node - * - ".[n]" => elements at index 'n' of root node (an array value) - * - ".name" => member named 'name' of root node (an object value) - * - ".name1.name2.name3" - * - ".[0][1][2].name1[3]" - * - ".%" => member name is provided as parameter - * - ".[%]" => index is provied as parameter - */ - class Path - { - public: - Path( const std::string &path, - const PathArgument &a1 = PathArgument(), - const PathArgument &a2 = PathArgument(), - const PathArgument &a3 = PathArgument(), - const PathArgument &a4 = PathArgument(), - const PathArgument &a5 = PathArgument() ); - - const Value &resolve( const Value &root ) const; - Value resolve( const Value &root, - const Value &defaultValue ) const; - /// Creates the "path" to access the specified node and returns a reference on the node. - Value &make( Value &root ) const; - - private: - typedef std::vector InArgs; - typedef std::vector Args; - - void makePath( const std::string &path, - const InArgs &in ); - void addPathInArg( const std::string &path, - const InArgs &in, - InArgs::const_iterator &itInArg, - PathArgument::Kind kind ); - void invalidPath( const std::string &path, - int location ); - - Args args_; - }; - - - -#ifdef JSON_VALUE_USE_INTERNAL_MAP - /** \brief Allocator to customize Value internal map. - * Below is an example of a simple implementation (default implementation actually - * use memory pool for speed). - * \code - class DefaultValueMapAllocator : public ValueMapAllocator - { - public: // overridden from ValueMapAllocator - virtual ValueInternalMap *newMap() - { - return new ValueInternalMap(); - } - - virtual ValueInternalMap *newMapCopy( const ValueInternalMap &other ) - { - return new ValueInternalMap( other ); - } - - virtual void destructMap( ValueInternalMap *map ) - { - delete map; - } - - virtual ValueInternalLink *allocateMapBuckets( unsigned int size ) - { - return new ValueInternalLink[size]; - } - - virtual void releaseMapBuckets( ValueInternalLink *links ) - { - delete [] links; - } - - virtual ValueInternalLink *allocateMapLink() - { - return new ValueInternalLink(); - } - - virtual void releaseMapLink( ValueInternalLink *link ) - { - delete link; - } - }; - * \endcode - */ - class JSON_API ValueMapAllocator - { - public: - virtual ~ValueMapAllocator(); - virtual ValueInternalMap *newMap() = 0; - virtual ValueInternalMap *newMapCopy( const ValueInternalMap &other ) = 0; - virtual void destructMap( ValueInternalMap *map ) = 0; - virtual ValueInternalLink *allocateMapBuckets( unsigned int size ) = 0; - virtual void releaseMapBuckets( ValueInternalLink *links ) = 0; - virtual ValueInternalLink *allocateMapLink() = 0; - virtual void releaseMapLink( ValueInternalLink *link ) = 0; - }; - - /** \brief ValueInternalMap hash-map bucket chain link (for internal use only). - * \internal previous_ & next_ allows for bidirectional traversal. - */ - class JSON_API ValueInternalLink - { - public: - enum { itemPerLink = 6 }; // sizeof(ValueInternalLink) = 128 on 32 bits architecture. - enum InternalFlags { - flagAvailable = 0, - flagUsed = 1 - }; - - ValueInternalLink(); - - ~ValueInternalLink(); - - Value items_[itemPerLink]; - char *keys_[itemPerLink]; - ValueInternalLink *previous_; - ValueInternalLink *next_; - }; - - - /** \brief A linked page based hash-table implementation used internally by Value. - * \internal ValueInternalMap is a tradional bucket based hash-table, with a linked - * list in each bucket to handle collision. There is an addional twist in that - * each node of the collision linked list is a page containing a fixed amount of - * value. This provides a better compromise between memory usage and speed. - * - * Each bucket is made up of a chained list of ValueInternalLink. The last - * link of a given bucket can be found in the 'previous_' field of the following bucket. - * The last link of the last bucket is stored in tailLink_ as it has no following bucket. - * Only the last link of a bucket may contains 'available' item. The last link always - * contains at least one element unless is it the bucket one very first link. - */ - class JSON_API ValueInternalMap - { - friend class ValueIteratorBase; - friend class Value; - public: - typedef unsigned int HashKey; - typedef unsigned int BucketIndex; - -# ifndef JSONCPP_DOC_EXCLUDE_IMPLEMENTATION - struct IteratorState - { - IteratorState() - : map_(0) - , link_(0) - , itemIndex_(0) - , bucketIndex_(0) - { - } - ValueInternalMap *map_; - ValueInternalLink *link_; - BucketIndex itemIndex_; - BucketIndex bucketIndex_; - }; -# endif // ifndef JSONCPP_DOC_EXCLUDE_IMPLEMENTATION - - ValueInternalMap(); - ValueInternalMap( const ValueInternalMap &other ); - ValueInternalMap &operator =( const ValueInternalMap &other ); - ~ValueInternalMap(); - - void swap( ValueInternalMap &other ); - - BucketIndex size() const; - - void clear(); - - bool reserveDelta( BucketIndex growth ); - - bool reserve( BucketIndex newItemCount ); - - const Value *find( const char *key ) const; - - Value *find( const char *key ); - - Value &resolveReference( const char *key, - bool isStatic ); - - void remove( const char *key ); - - void doActualRemove( ValueInternalLink *link, - BucketIndex index, - BucketIndex bucketIndex ); - - ValueInternalLink *&getLastLinkInBucket( BucketIndex bucketIndex ); - - Value &setNewItem( const char *key, - bool isStatic, - ValueInternalLink *link, - BucketIndex index ); - - Value &unsafeAdd( const char *key, - bool isStatic, - HashKey hashedKey ); - - HashKey hash( const char *key ) const; - - int compare( const ValueInternalMap &other ) const; - - private: - void makeBeginIterator( IteratorState &it ) const; - void makeEndIterator( IteratorState &it ) const; - static bool equals( const IteratorState &x, const IteratorState &other ); - static void increment( IteratorState &iterator ); - static void incrementBucket( IteratorState &iterator ); - static void decrement( IteratorState &iterator ); - static const char *key( const IteratorState &iterator ); - static const char *key( const IteratorState &iterator, bool &isStatic ); - static Value &value( const IteratorState &iterator ); - static int distance( const IteratorState &x, const IteratorState &y ); - - private: - ValueInternalLink *buckets_; - ValueInternalLink *tailLink_; - BucketIndex bucketsSize_; - BucketIndex itemCount_; - }; - - /** \brief A simplified deque implementation used internally by Value. - * \internal - * It is based on a list of fixed "page", each page contains a fixed number of items. - * Instead of using a linked-list, a array of pointer is used for fast item look-up. - * Look-up for an element is as follow: - * - compute page index: pageIndex = itemIndex / itemsPerPage - * - look-up item in page: pages_[pageIndex][itemIndex % itemsPerPage] - * - * Insertion is amortized constant time (only the array containing the index of pointers - * need to be reallocated when items are appended). - */ - class JSON_API ValueInternalArray - { - friend class Value; - friend class ValueIteratorBase; - public: - enum { itemsPerPage = 8 }; // should be a power of 2 for fast divide and modulo. - typedef Value::ArrayIndex ArrayIndex; - typedef unsigned int PageIndex; - -# ifndef JSONCPP_DOC_EXCLUDE_IMPLEMENTATION - struct IteratorState // Must be a POD - { - IteratorState() - : array_(0) - , currentPageIndex_(0) - , currentItemIndex_(0) - { - } - ValueInternalArray *array_; - Value **currentPageIndex_; - unsigned int currentItemIndex_; - }; -# endif // ifndef JSONCPP_DOC_EXCLUDE_IMPLEMENTATION - - ValueInternalArray(); - ValueInternalArray( const ValueInternalArray &other ); - ValueInternalArray &operator =( const ValueInternalArray &other ); - ~ValueInternalArray(); - void swap( ValueInternalArray &other ); - - void clear(); - void resize( ArrayIndex newSize ); - - Value &resolveReference( ArrayIndex index ); - - Value *find( ArrayIndex index ) const; - - ArrayIndex size() const; - - int compare( const ValueInternalArray &other ) const; - - private: - static bool equals( const IteratorState &x, const IteratorState &other ); - static void increment( IteratorState &iterator ); - static void decrement( IteratorState &iterator ); - static Value &dereference( const IteratorState &iterator ); - static Value &unsafeDereference( const IteratorState &iterator ); - static int distance( const IteratorState &x, const IteratorState &y ); - static ArrayIndex indexOf( const IteratorState &iterator ); - void makeBeginIterator( IteratorState &it ) const; - void makeEndIterator( IteratorState &it ) const; - void makeIterator( IteratorState &it, ArrayIndex index ) const; - - void makeIndexValid( ArrayIndex index ); - - Value **pages_; - ArrayIndex size_; - PageIndex pageCount_; - }; - - /** \brief Experimental: do not use. Allocator to customize Value internal array. - * Below is an example of a simple implementation (actual implementation use - * memory pool). - \code -class DefaultValueArrayAllocator : public ValueArrayAllocator -{ -public: // overridden from ValueArrayAllocator - virtual ~DefaultValueArrayAllocator() - { - } - - virtual ValueInternalArray *newArray() - { - return new ValueInternalArray(); - } - - virtual ValueInternalArray *newArrayCopy( const ValueInternalArray &other ) - { - return new ValueInternalArray( other ); - } - - virtual void destruct( ValueInternalArray *array ) - { - delete array; - } - - virtual void reallocateArrayPageIndex( Value **&indexes, - ValueInternalArray::PageIndex &indexCount, - ValueInternalArray::PageIndex minNewIndexCount ) - { - ValueInternalArray::PageIndex newIndexCount = (indexCount*3)/2 + 1; - if ( minNewIndexCount > newIndexCount ) - newIndexCount = minNewIndexCount; - void *newIndexes = realloc( indexes, sizeof(Value*) * newIndexCount ); - if ( !newIndexes ) - throw std::bad_alloc(); - indexCount = newIndexCount; - indexes = static_cast( newIndexes ); - } - virtual void releaseArrayPageIndex( Value **indexes, - ValueInternalArray::PageIndex indexCount ) - { - if ( indexes ) - free( indexes ); - } - - virtual Value *allocateArrayPage() - { - return static_cast( malloc( sizeof(Value) * ValueInternalArray::itemsPerPage ) ); - } - - virtual void releaseArrayPage( Value *value ) - { - if ( value ) - free( value ); - } -}; - \endcode - */ - class JSON_API ValueArrayAllocator - { - public: - virtual ~ValueArrayAllocator(); - virtual ValueInternalArray *newArray() = 0; - virtual ValueInternalArray *newArrayCopy( const ValueInternalArray &other ) = 0; - virtual void destructArray( ValueInternalArray *array ) = 0; - /** \brief Reallocate array page index. - * Reallocates an array of pointer on each page. - * \param indexes [input] pointer on the current index. May be \c NULL. - * [output] pointer on the new index of at least - * \a minNewIndexCount pages. - * \param indexCount [input] current number of pages in the index. - * [output] number of page the reallocated index can handle. - * \b MUST be >= \a minNewIndexCount. - * \param minNewIndexCount Minimum number of page the new index must be able to - * handle. - */ - virtual void reallocateArrayPageIndex( Value **&indexes, - ValueInternalArray::PageIndex &indexCount, - ValueInternalArray::PageIndex minNewIndexCount ) = 0; - virtual void releaseArrayPageIndex( Value **indexes, - ValueInternalArray::PageIndex indexCount ) = 0; - virtual Value *allocateArrayPage() = 0; - virtual void releaseArrayPage( Value *value ) = 0; - }; -#endif // #ifdef JSON_VALUE_USE_INTERNAL_MAP - - - /** \brief base class for Value iterators. - * - */ - class ValueIteratorBase - { - public: - typedef unsigned int size_t; - typedef int difference_type; - typedef ValueIteratorBase SelfType; - - ValueIteratorBase(); -#ifndef JSON_VALUE_USE_INTERNAL_MAP - explicit ValueIteratorBase( const Value::ObjectValues::iterator ¤t ); -#else - ValueIteratorBase( const ValueInternalArray::IteratorState &state ); - ValueIteratorBase( const ValueInternalMap::IteratorState &state ); -#endif - - bool operator ==( const SelfType &other ) const - { - return isEqual( other ); - } - - bool operator !=( const SelfType &other ) const - { - return !isEqual( other ); - } - - difference_type operator -( const SelfType &other ) const - { - return computeDistance( other ); - } - - /// Return either the index or the member name of the referenced value as a Value. - Value key() const; - - /// Return the index of the referenced Value. -1 if it is not an arrayValue. - UInt index() const; - - /// Return the member name of the referenced Value. "" if it is not an objectValue. - const char *memberName() const; - - protected: - Value &deref() const; - - void increment(); - - void decrement(); - - difference_type computeDistance( const SelfType &other ) const; - - bool isEqual( const SelfType &other ) const; - - void copy( const SelfType &other ); - - private: -#ifndef JSON_VALUE_USE_INTERNAL_MAP - Value::ObjectValues::iterator current_; - // Indicates that iterator is for a null value. - bool isNull_; -#else - union - { - ValueInternalArray::IteratorState array_; - ValueInternalMap::IteratorState map_; - } iterator_; - bool isArray_; -#endif - }; - - /** \brief const iterator for object and array value. - * - */ - class ValueConstIterator : public ValueIteratorBase - { - friend class Value; - public: - typedef unsigned int size_t; - typedef int difference_type; - typedef const Value &reference; - typedef const Value *pointer; - typedef ValueConstIterator SelfType; - - ValueConstIterator(); - private: - /*! \internal Use by Value to create an iterator. - */ -#ifndef JSON_VALUE_USE_INTERNAL_MAP - explicit ValueConstIterator( const Value::ObjectValues::iterator ¤t ); -#else - ValueConstIterator( const ValueInternalArray::IteratorState &state ); - ValueConstIterator( const ValueInternalMap::IteratorState &state ); -#endif - public: - SelfType &operator =( const ValueIteratorBase &other ); - - SelfType operator++( int ) - { - SelfType temp( *this ); - ++*this; - return temp; - } - - SelfType operator--( int ) - { - SelfType temp( *this ); - --*this; - return temp; - } - - SelfType &operator--() - { - decrement(); - return *this; - } - - SelfType &operator++() - { - increment(); - return *this; - } - - reference operator *() const - { - return deref(); - } - }; - - - /** \brief Iterator for object and array value. - */ - class ValueIterator : public ValueIteratorBase - { - friend class Value; - public: - typedef unsigned int size_t; - typedef int difference_type; - typedef Value &reference; - typedef Value *pointer; - typedef ValueIterator SelfType; - - ValueIterator(); - ValueIterator( const ValueConstIterator &other ); - ValueIterator( const ValueIterator &other ); - private: - /*! \internal Use by Value to create an iterator. - */ -#ifndef JSON_VALUE_USE_INTERNAL_MAP - explicit ValueIterator( const Value::ObjectValues::iterator ¤t ); -#else - ValueIterator( const ValueInternalArray::IteratorState &state ); - ValueIterator( const ValueInternalMap::IteratorState &state ); -#endif - public: - - SelfType &operator =( const SelfType &other ); - - SelfType operator++( int ) - { - SelfType temp( *this ); - ++*this; - return temp; - } - - SelfType operator--( int ) - { - SelfType temp( *this ); - --*this; - return temp; - } - - SelfType &operator--() - { - decrement(); - return *this; - } - - SelfType &operator++() - { - increment(); - return *this; - } - - reference operator *() const - { - return deref(); - } - }; - - -} // namespace Json - - -#endif // CPPTL_JSON_H_INCLUDED diff --git a/WebRtc.NET/include/third_party/jsoncpp/source/include/json/writer.h b/WebRtc.NET/include/third_party/jsoncpp/source/include/json/writer.h deleted file mode 100644 index 38d41e1e..00000000 --- a/WebRtc.NET/include/third_party/jsoncpp/source/include/json/writer.h +++ /dev/null @@ -1,184 +0,0 @@ -// Copyright 2007-2010 Baptiste Lepilleur -// Distributed under MIT license, or public domain if desired and -// recognized in your jurisdiction. -// See file LICENSE for detail or copy at http://jsoncpp.sourceforge.net/LICENSE - -#ifndef JSON_WRITER_H_INCLUDED -# define JSON_WRITER_H_INCLUDED - -#if !defined(JSON_IS_AMALGAMATION) -# include "value.h" -#endif // if !defined(JSON_IS_AMALGAMATION) -# include -# include - -namespace Json { - - class Value; - - /** \brief Abstract class for writers. - */ - class JSON_API Writer - { - public: - virtual ~Writer(); - - virtual std::string write( const Value &root ) = 0; - }; - - /** \brief Outputs a Value in JSON format without formatting (not human friendly). - * - * The JSON document is written in a single line. It is not intended for 'human' consumption, - * but may be usefull to support feature such as RPC where bandwith is limited. - * \sa Reader, Value - */ - class JSON_API FastWriter : public Writer - { - public: - FastWriter(); - virtual ~FastWriter(){} - - void enableYAMLCompatibility(); - - public: // overridden from Writer - virtual std::string write( const Value &root ); - - private: - void writeValue( const Value &value ); - - std::string document_; - bool yamlCompatiblityEnabled_; - }; - - /** \brief Writes a Value in JSON format in a human friendly way. - * - * The rules for line break and indent are as follow: - * - Object value: - * - if empty then print {} without indent and line break - * - if not empty the print '{', line break & indent, print one value per line - * and then unindent and line break and print '}'. - * - Array value: - * - if empty then print [] without indent and line break - * - if the array contains no object value, empty array or some other value types, - * and all the values fit on one lines, then print the array on a single line. - * - otherwise, it the values do not fit on one line, or the array contains - * object or non empty array, then print one value per line. - * - * If the Value have comments then they are outputed according to their #CommentPlacement. - * - * \sa Reader, Value, Value::setComment() - */ - class JSON_API StyledWriter: public Writer - { - public: - StyledWriter(); - virtual ~StyledWriter(){} - - public: // overridden from Writer - /** \brief Serialize a Value in JSON format. - * \param root Value to serialize. - * \return String containing the JSON document that represents the root value. - */ - virtual std::string write( const Value &root ); - - private: - void writeValue( const Value &value ); - void writeArrayValue( const Value &value ); - bool isMultineArray( const Value &value ); - void pushValue( const std::string &value ); - void writeIndent(); - void writeWithIndent( const std::string &value ); - void indent(); - void unindent(); - void writeCommentBeforeValue( const Value &root ); - void writeCommentAfterValueOnSameLine( const Value &root ); - bool hasCommentForValue( const Value &value ); - static std::string normalizeEOL( const std::string &text ); - - typedef std::vector ChildValues; - - ChildValues childValues_; - std::string document_; - std::string indentString_; - int rightMargin_; - int indentSize_; - bool addChildValues_; - }; - - /** \brief Writes a Value in JSON format in a human friendly way, - to a stream rather than to a string. - * - * The rules for line break and indent are as follow: - * - Object value: - * - if empty then print {} without indent and line break - * - if not empty the print '{', line break & indent, print one value per line - * and then unindent and line break and print '}'. - * - Array value: - * - if empty then print [] without indent and line break - * - if the array contains no object value, empty array or some other value types, - * and all the values fit on one lines, then print the array on a single line. - * - otherwise, it the values do not fit on one line, or the array contains - * object or non empty array, then print one value per line. - * - * If the Value have comments then they are outputed according to their #CommentPlacement. - * - * \param indentation Each level will be indented by this amount extra. - * \sa Reader, Value, Value::setComment() - */ - class JSON_API StyledStreamWriter - { - public: - StyledStreamWriter( std::string indentation="\t" ); - ~StyledStreamWriter(){} - - public: - /** \brief Serialize a Value in JSON format. - * \param out Stream to write to. (Can be ostringstream, e.g.) - * \param root Value to serialize. - * \note There is no point in deriving from Writer, since write() should not return a value. - */ - void write( std::ostream &out, const Value &root ); - - private: - void writeValue( const Value &value ); - void writeArrayValue( const Value &value ); - bool isMultineArray( const Value &value ); - void pushValue( const std::string &value ); - void writeIndent(); - void writeWithIndent( const std::string &value ); - void indent(); - void unindent(); - void writeCommentBeforeValue( const Value &root ); - void writeCommentAfterValueOnSameLine( const Value &root ); - bool hasCommentForValue( const Value &value ); - static std::string normalizeEOL( const std::string &text ); - - typedef std::vector ChildValues; - - ChildValues childValues_; - std::ostream* document_; - std::string indentString_; - int rightMargin_; - std::string indentation_; - bool addChildValues_; - }; - -# if defined(JSON_HAS_INT64) - std::string JSON_API valueToString( Int value ); - std::string JSON_API valueToString( UInt value ); -# endif // if defined(JSON_HAS_INT64) - std::string JSON_API valueToString( LargestInt value ); - std::string JSON_API valueToString( LargestUInt value ); - std::string JSON_API valueToString( double value ); - std::string JSON_API valueToString( bool value ); - std::string JSON_API valueToQuotedString( const char *value ); - - /// \brief Output using the StyledStreamWriter. - /// \see Json::operator>>() - std::ostream& operator<<( std::ostream&, const Value &root ); - -} // namespace Json - - - -#endif // JSON_WRITER_H_INCLUDED diff --git a/WebRtc.NET/include/third_party/jsoncpp/source/src/lib_json/json_batchallocator.h b/WebRtc.NET/include/third_party/jsoncpp/source/src/lib_json/json_batchallocator.h deleted file mode 100644 index 2a7c0241..00000000 --- a/WebRtc.NET/include/third_party/jsoncpp/source/src/lib_json/json_batchallocator.h +++ /dev/null @@ -1,127 +0,0 @@ -// Copyright 2007-2010 Baptiste Lepilleur -// Distributed under MIT license, or public domain if desired and -// recognized in your jurisdiction. -// See file LICENSE for detail or copy at http://jsoncpp.sourceforge.net/LICENSE - -#ifndef JSONCPP_BATCHALLOCATOR_H_INCLUDED -# define JSONCPP_BATCHALLOCATOR_H_INCLUDED - -# include -# include - -# ifndef JSONCPP_DOC_EXCLUDE_IMPLEMENTATION - -namespace Json { - -/* Fast memory allocator. - * - * This memory allocator allocates memory for a batch of object (specified by - * the page size, the number of object in each page). - * - * It does not allow the destruction of a single object. All the allocated objects - * can be destroyed at once. The memory can be either released or reused for future - * allocation. - * - * The in-place new operator must be used to construct the object using the pointer - * returned by allocate. - */ -template -class BatchAllocator -{ -public: - BatchAllocator( unsigned int objectsPerPage = 255 ) - : freeHead_( 0 ) - , objectsPerPage_( objectsPerPage ) - { -// printf( "Size: %d => %s\n", sizeof(AllocatedType), typeid(AllocatedType).name() ); - assert( sizeof(AllocatedType) * objectPerAllocation >= sizeof(AllocatedType *) ); // We must be able to store a slist in the object free space. - assert( objectsPerPage >= 16 ); - batches_ = allocateBatch( 0 ); // allocated a dummy page - currentBatch_ = batches_; - } - - ~BatchAllocator() - { - for ( BatchInfo *batch = batches_; batch; ) - { - BatchInfo *nextBatch = batch->next_; - free( batch ); - batch = nextBatch; - } - } - - /// allocate space for an array of objectPerAllocation object. - /// @warning it is the responsability of the caller to call objects constructors. - AllocatedType *allocate() - { - if ( freeHead_ ) // returns node from free list. - { - AllocatedType *object = freeHead_; - freeHead_ = *(AllocatedType **)object; - return object; - } - if ( currentBatch_->used_ == currentBatch_->end_ ) - { - currentBatch_ = currentBatch_->next_; - while ( currentBatch_ && currentBatch_->used_ == currentBatch_->end_ ) - currentBatch_ = currentBatch_->next_; - - if ( !currentBatch_ ) // no free batch found, allocate a new one - { - currentBatch_ = allocateBatch( objectsPerPage_ ); - currentBatch_->next_ = batches_; // insert at the head of the list - batches_ = currentBatch_; - } - } - AllocatedType *allocated = currentBatch_->used_; - currentBatch_->used_ += objectPerAllocation; - return allocated; - } - - /// Release the object. - /// @warning it is the responsability of the caller to actually destruct the object. - void release( AllocatedType *object ) - { - assert( object != 0 ); - *(AllocatedType **)object = freeHead_; - freeHead_ = object; - } - -private: - struct BatchInfo - { - BatchInfo *next_; - AllocatedType *used_; - AllocatedType *end_; - AllocatedType buffer_[objectPerAllocation]; - }; - - // disabled copy constructor and assignement operator. - BatchAllocator( const BatchAllocator & ); - void operator =( const BatchAllocator &); - - static BatchInfo *allocateBatch( unsigned int objectsPerPage ) - { - const unsigned int mallocSize = sizeof(BatchInfo) - sizeof(AllocatedType)* objectPerAllocation - + sizeof(AllocatedType) * objectPerAllocation * objectsPerPage; - BatchInfo *batch = static_cast( malloc( mallocSize ) ); - batch->next_ = 0; - batch->used_ = batch->buffer_; - batch->end_ = batch->buffer_ + objectsPerPage; - return batch; - } - - BatchInfo *batches_; - BatchInfo *currentBatch_; - /// Head of a single linked list within the allocated space of freeed object - AllocatedType *freeHead_; - unsigned int objectsPerPage_; -}; - - -} // namespace Json - -# endif // ifndef JSONCPP_DOC_INCLUDE_IMPLEMENTATION - -#endif // JSONCPP_BATCHALLOCATOR_H_INCLUDED diff --git a/WebRtc.NET/include/third_party/jsoncpp/source/src/lib_json/json_tool.h b/WebRtc.NET/include/third_party/jsoncpp/source/src/lib_json/json_tool.h deleted file mode 100644 index 658031bb..00000000 --- a/WebRtc.NET/include/third_party/jsoncpp/source/src/lib_json/json_tool.h +++ /dev/null @@ -1,93 +0,0 @@ -// Copyright 2007-2010 Baptiste Lepilleur -// Distributed under MIT license, or public domain if desired and -// recognized in your jurisdiction. -// See file LICENSE for detail or copy at http://jsoncpp.sourceforge.net/LICENSE - -#ifndef LIB_JSONCPP_JSON_TOOL_H_INCLUDED -# define LIB_JSONCPP_JSON_TOOL_H_INCLUDED - -/* This header provides common string manipulation support, such as UTF-8, - * portable conversion from/to string... - * - * It is an internal header that must not be exposed. - */ - -namespace Json { - -/// Converts a unicode code-point to UTF-8. -static inline std::string -codePointToUTF8(unsigned int cp) -{ - std::string result; - - // based on description from http://en.wikipedia.org/wiki/UTF-8 - - if (cp <= 0x7f) - { - result.resize(1); - result[0] = static_cast(cp); - } - else if (cp <= 0x7FF) - { - result.resize(2); - result[1] = static_cast(0x80 | (0x3f & cp)); - result[0] = static_cast(0xC0 | (0x1f & (cp >> 6))); - } - else if (cp <= 0xFFFF) - { - result.resize(3); - result[2] = static_cast(0x80 | (0x3f & cp)); - result[1] = 0x80 | static_cast((0x3f & (cp >> 6))); - result[0] = 0xE0 | static_cast((0xf & (cp >> 12))); - } - else if (cp <= 0x10FFFF) - { - result.resize(4); - result[3] = static_cast(0x80 | (0x3f & cp)); - result[2] = static_cast(0x80 | (0x3f & (cp >> 6))); - result[1] = static_cast(0x80 | (0x3f & (cp >> 12))); - result[0] = static_cast(0xF0 | (0x7 & (cp >> 18))); - } - - return result; -} - - -/// Returns true if ch is a control character (in range [0,32[). -static inline bool -isControlCharacter(char ch) -{ - return ch > 0 && ch <= 0x1F; -} - - -enum { - /// Constant that specify the size of the buffer that must be passed to uintToString. - uintToStringBufferSize = 3*sizeof(LargestUInt)+1 -}; - -// Defines a char buffer for use with uintToString(). -typedef char UIntToStringBuffer[uintToStringBufferSize]; - - -/** Converts an unsigned integer to string. - * @param value Unsigned interger to convert to string - * @param current Input/Output string buffer. - * Must have at least uintToStringBufferSize chars free. - */ -static inline void -uintToString( LargestUInt value, - char *¤t ) -{ - *--current = 0; - do - { - *--current = char(value % 10) + '0'; - value /= 10; - } - while ( value != 0 ); -} - -} // namespace Json { - -#endif // LIB_JSONCPP_JSON_TOOL_H_INCLUDED diff --git a/WebRtc.NET/include/third_party/jsoncpp/source/src/test_lib_json/jsontest.h b/WebRtc.NET/include/third_party/jsoncpp/source/src/test_lib_json/jsontest.h deleted file mode 100644 index 207692bc..00000000 --- a/WebRtc.NET/include/third_party/jsoncpp/source/src/test_lib_json/jsontest.h +++ /dev/null @@ -1,273 +0,0 @@ -// Copyright 2007-2010 Baptiste Lepilleur -// Distributed under MIT license, or public domain if desired and -// recognized in your jurisdiction. -// See file LICENSE for detail or copy at http://jsoncpp.sourceforge.net/LICENSE - -#ifndef JSONTEST_H_INCLUDED -# define JSONTEST_H_INCLUDED - -# include -# include -# include -# include -# include -# include -# include - -// ////////////////////////////////////////////////////////////////// -// ////////////////////////////////////////////////////////////////// -// Mini Unit Testing framework -// ////////////////////////////////////////////////////////////////// -// ////////////////////////////////////////////////////////////////// - - - -/** \brief Unit testing framework. - * \warning: all assertions are non-aborting, test case execution will continue - * even if an assertion namespace. - * This constraint is for portability: the framework needs to compile - * on Visual Studio 6 and must not require exception usage. - */ -namespace JsonTest { - - - class Failure - { - public: - const char *file_; - unsigned int line_; - std::string expr_; - std::string message_; - unsigned int nestingLevel_; - }; - - - /// Context used to create the assertion callstack on failure. - /// Must be a POD to allow inline initialisation without stepping - /// into the debugger. - struct PredicateContext - { - typedef unsigned int Id; - Id id_; - const char *file_; - unsigned int line_; - const char *expr_; - PredicateContext *next_; - /// Related Failure, set when the PredicateContext is converted - /// into a Failure. - Failure *failure_; - }; - - class TestResult - { - public: - TestResult(); - - /// \internal Implementation detail for assertion macros - /// Not encapsulated to prevent step into when debugging failed assertions - /// Incremented by one on assertion predicate entry, decreased by one - /// by addPredicateContext(). - PredicateContext::Id predicateId_; - - /// \internal Implementation detail for predicate macros - PredicateContext *predicateStackTail_; - - void setTestName( const std::string &name ); - - /// Adds an assertion failure. - TestResult &addFailure( const char *file, unsigned int line, - const char *expr = 0 ); - - /// Removes the last PredicateContext added to the predicate stack - /// chained list. - /// Next messages will be targed at the PredicateContext that was removed. - TestResult &popPredicateContext(); - - bool failed() const; - - void printFailure( bool printTestName ) const; - - // Generic operator that will work with anything ostream can deal with. - template - TestResult &operator << ( const T& value ) { - std::ostringstream oss; - oss.precision( 16 ); - oss.setf( std::ios_base::floatfield ); - oss << value; - return addToLastFailure(oss.str()); - } - - // Specialized versions. - TestResult &operator << ( bool value ); - // std:ostream does not support 64bits integers on all STL implementation - TestResult &operator << ( Json::Int64 value ); - TestResult &operator << ( Json::UInt64 value ); - - private: - TestResult &addToLastFailure( const std::string &message ); - unsigned int getAssertionNestingLevel() const; - /// Adds a failure or a predicate context - void addFailureInfo( const char *file, unsigned int line, - const char *expr, unsigned int nestingLevel ); - static std::string indentText( const std::string &text, - const std::string &indent ); - - typedef std::deque Failures; - Failures failures_; - std::string name_; - PredicateContext rootPredicateNode_; - PredicateContext::Id lastUsedPredicateId_; - /// Failure which is the target of the messages added using operator << - Failure *messageTarget_; - }; - - - class TestCase - { - public: - TestCase(); - - virtual ~TestCase(); - - void run( TestResult &result ); - - virtual const char *testName() const = 0; - - protected: - TestResult *result_; - - private: - virtual void runTestCase() = 0; - }; - - /// Function pointer type for TestCase factory - typedef TestCase *(*TestCaseFactory)(); - - class Runner - { - public: - Runner(); - - /// Adds a test to the suite - Runner &add( TestCaseFactory factory ); - - /// Runs test as specified on the command-line - /// If no command-line arguments are provided, run all tests. - /// If --list-tests is provided, then print the list of all test cases - /// If --test is provided, then run test testname. - int runCommandLine( int argc, const char *argv[] ) const; - - /// Runs all the test cases - bool runAllTest( bool printSummary ) const; - - /// Returns the number of test case in the suite - unsigned int testCount() const; - - /// Returns the name of the test case at the specified index - std::string testNameAt( unsigned int index ) const; - - /// Runs the test case at the specified index using the specified TestResult - void runTestAt( unsigned int index, TestResult &result ) const; - - static void printUsage( const char *appName ); - - private: // prevents copy construction and assignment - Runner( const Runner &other ); - Runner &operator =( const Runner &other ); - - private: - void listTests() const; - bool testIndex( const std::string &testName, unsigned int &index ) const; - static void preventDialogOnCrash(); - - private: - typedef std::deque Factories; - Factories tests_; - }; - - template - TestResult & - checkEqual( TestResult &result, const T &expected, const U &actual, - const char *file, unsigned int line, const char *expr ) - { - if ( expected != actual ) - { - result.addFailure( file, line, expr ); - result << "Expected: " << expected << "\n"; - result << "Actual : " << actual; - } - return result; - } - - - TestResult & - checkStringEqual( TestResult &result, - const std::string &expected, const std::string &actual, - const char *file, unsigned int line, const char *expr ); - -} // namespace JsonTest - - -/// \brief Asserts that the given expression is true. -/// JSONTEST_ASSERT( x == y ) << "x=" << x << ", y=" << y; -/// JSONTEST_ASSERT( x == y ); -#define JSONTEST_ASSERT( expr ) \ - if ( expr ) \ - { \ - } \ - else \ - result_->addFailure( __FILE__, __LINE__, #expr ) - -/// \brief Asserts that the given predicate is true. -/// The predicate may do other assertions and be a member function of the fixture. -#define JSONTEST_ASSERT_PRED( expr ) \ - { \ - JsonTest::PredicateContext _minitest_Context = { \ - result_->predicateId_, __FILE__, __LINE__, #expr }; \ - result_->predicateStackTail_->next_ = &_minitest_Context; \ - result_->predicateId_ += 1; \ - result_->predicateStackTail_ = &_minitest_Context; \ - (expr); \ - result_->popPredicateContext(); \ - } \ - *result_ - -/// \brief Asserts that two values are equals. -#define JSONTEST_ASSERT_EQUAL( expected, actual ) \ - JsonTest::checkEqual( *result_, expected, actual, \ - __FILE__, __LINE__, \ - #expected " == " #actual ) - -/// \brief Asserts that two values are equals. -#define JSONTEST_ASSERT_STRING_EQUAL( expected, actual ) \ - JsonTest::checkStringEqual( *result_, \ - std::string(expected), std::string(actual), \ - __FILE__, __LINE__, \ - #expected " == " #actual ) - -/// \brief Begin a fixture test case. -#define JSONTEST_FIXTURE( FixtureType, name ) \ - class Test##FixtureType##name : public FixtureType \ - { \ - public: \ - static JsonTest::TestCase *factory() \ - { \ - return new Test##FixtureType##name(); \ - } \ - public: /* overidden from TestCase */ \ - virtual const char *testName() const \ - { \ - return #FixtureType "/" #name; \ - } \ - virtual void runTestCase(); \ - }; \ - \ - void Test##FixtureType##name::runTestCase() - -#define JSONTEST_FIXTURE_FACTORY( FixtureType, name ) \ - &Test##FixtureType##name::factory - -#define JSONTEST_REGISTER_FIXTURE( runner, FixtureType, name ) \ - (runner).add( JSONTEST_FIXTURE_FACTORY( FixtureType, name ) ) - -#endif // ifndef JSONTEST_H_INCLUDED diff --git a/WebRtc.NET/include/third_party/libjpeg_turbo/jpeglibmangler.h b/WebRtc.NET/include/third_party/libjpeg_turbo/jpeglibmangler.h deleted file mode 100644 index 75dc57af..00000000 --- a/WebRtc.NET/include/third_party/libjpeg_turbo/jpeglibmangler.h +++ /dev/null @@ -1,191 +0,0 @@ -// Copyright (c) 2009 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#ifndef THIRD_PARTY_LIBJPEG_TURBO_JPEGLIBMANGLER_H_ -#define THIRD_PARTY_LIBJPEG_TURBO_JPEGLIBMANGLER_H_ - -// Mangle all externally visible function names so we can build our own libjpeg -// without system libraries trying to use it. - -#define jsimd_can_huff_encode_one_block chromium_jsimd_can_huff_encode_one_block -#define jsimd_huff_encode_one_block chromium_jsimd_huff_encode_one_block -#define jsimd_can_rgb_ycc chromium_jsimd_can_rgb_ycc -#define jsimd_can_rgb_gray chromium_jsimd_can_rgb_gray -#define jsimd_can_ycc_rgb chromium_jsimd_can_ycc_rgb -#define jsimd_can_ycc_rgb565 chromium_jsimd_can_ycc_rgb565 -#define jsimd_rgb_ycc_convert chromium_jsimd_rgb_ycc_convert -#define jsimd_rgb_gray_convert chromium_jsimd_rgb_gray_convert -#define jsimd_ycc_rgb_convert chromium_jsimd_ycc_rgb_convert -#define jsimd_ycc_rgb565_convert chromium_jsimd_ycc_rgb565_convert -#define jsimd_can_h2v2_downsample chromium_jsimd_can_h2v2_downsample -#define jsimd_can_h2v1_downsample chromium_jsimd_can_h2v1_downsample -#define jsimd_h2v2_downsample chromium_jsimd_h2v2_downsample -#define jsimd_h2v1_downsample chromium_jsimd_h2v1_downsample -#define jsimd_can_h2v2_upsample chromium_jsimd_can_h2v2_upsample -#define jsimd_can_h2v1_upsample chromium_jsimd_can_h2v1_upsample -#define jsimd_h2v2_upsample chromium_jsimd_h2v2_upsample -#define jsimd_h2v1_upsample chromium_jsimd_h2v1_upsample -#define jsimd_can_h2v2_fancy_upsample chromium_jsimd_can_h2v2_fancy_upsample -#define jsimd_can_h2v1_fancy_upsample chromium_jsimd_can_h2v1_fancy_upsample -#define jsimd_h2v2_fancy_upsample chromium_jsimd_h2v2_fancy_upsample -#define jsimd_h2v1_fancy_upsample chromium_jsimd_h2v1_fancy_upsample -#define jsimd_can_h2v2_merged_upsample chromium_jsimd_can_h2v2_merged_upsample -#define jsimd_can_h2v1_merged_upsample chromium_jsimd_can_h2v1_merged_upsample -#define jsimd_h2v2_merged_upsample chromium_jsimd_h2v2_merged_upsample -#define jsimd_h2v1_merged_upsample chromium_jsimd_h2v1_merged_upsample -#define jsimd_can_convsamp chromium_jsimd_can_convsamp -#define jsimd_can_convsamp_float chromium_jsimd_can_convsamp_float -#define jsimd_convsamp chromium_jsimd_convsamp -#define jsimd_convsamp_float chromium_jsimd_convsamp_float -#define jsimd_can_fdct_islow chromium_jsimd_can_fdct_islow -#define jsimd_can_fdct_ifast chromium_jsimd_can_fdct_ifast -#define jsimd_can_fdct_float chromium_jsimd_can_fdct_float -#define jsimd_can_quantize chromium_jsimd_can_quantize -#define jsimd_can_quantize_float chromium_jsimd_can_quantize_float -#define jsimd_quantize chromium_jsimd_quantize -#define jsimd_quantize_float chromium_jsimd_quantize_float -#define jsimd_can_idct_2x2 chromium_jsimd_can_idct_2x2 -#define jsimd_can_idct_4x4 chromium_jsimd_can_idct_4x4 -#define jsimd_idct_2x2 chromium_jsimd_idct_2x2 -#define jsimd_idct_4x4 chromium_jsimd_idct_4x4 -#define jsimd_can_idct_islow chromium_jsimd_can_idct_islow -#define jsimd_can_idct_ifast chromium_jsimd_can_idct_ifast -#define jsimd_can_idct_float chromium_jsimd_can_idct_float - -#define jsimd_idct_float chromium_jsimd_idct_float -#define jsimd_idct_ifast chromium_jsimd_idct_ifast -#define jsimd_idct_islow chromium_jsimd_idct_islow - -#define jsimd_fdct_float chromium_jsimd_fdct_float -#define jsimd_fdct_ifast chromium_jsimd_fdct_ifast -#define jsimd_fdct_islow chromium_jsimd_fdct_islow - -#define jpeg_fdct_islow chromium_jpeg_fdct_islow -#define jpeg_fdct_ifast chromium_jpeg_fdct_ifast -#define jpeg_fdct_float chromium_jpeg_fdct_float - -#define jpeg_idct_islow chromium_jpeg_idct_islow -#define jpeg_idct_ifast chromium_jpeg_idct_ifast -#define jpeg_idct_float chromium_jpeg_idct_float - -#define jpeg_idct_7x7 chromium_jpeg_idct_7x7 -#define jpeg_idct_6x6 chromium_jpeg_idct_6x6 -#define jpeg_idct_5x5 chromium_jpeg_idct_5x5 -#define jpeg_idct_4x4 chromium_jpeg_idct_4x4 -#define jpeg_idct_3x3 chromium_jpeg_idct_3x3 -#define jpeg_idct_2x2 chromium_jpeg_idct_2x2 -#define jpeg_idct_1x1 chromium_jpeg_idct_1x1 -#define jpeg_idct_9x9 chromium_jpeg_idct_9x9 -#define jpeg_idct_10x10 chromium_jpeg_idct_10x10 -#define jpeg_idct_11x11 chromium_jpeg_idct_11x11 -#define jpeg_idct_12x12 chromium_jpeg_idct_12x12 -#define jpeg_idct_13x13 chromium_jpeg_idct_13x13 -#define jpeg_idct_14x14 chromium_jpeg_idct_14x14 -#define jpeg_idct_15x15 chromium_jpeg_idct_15x15 -#define jpeg_idct_16x16 chromium_jpeg_idct_16x16 - -#define jpeg_make_c_derived_tbl chromium_jpeg_make_c_derived_tbl -#define jpeg_gen_optimal_table chromium_jpeg_gen_optimal_table -#define jpeg_make_d_derived_tbl chromium_jpeg_make_d_derived_tbl -#define jpeg_fill_bit_buffer chromium_jpeg_fill_bit_buffer -#define jpeg_huff_decode chromium_jpeg_huff_decode -#define jpeg_fdct_islow chromium_jpeg_fdct_islow -#define jpeg_fdct_ifast chromium_jpeg_fdct_ifast -#define jpeg_fdct_float chromium_jpeg_fdct_float -#define jpeg_idct_islow chromium_jpeg_idct_islow -#define jpeg_idct_ifast chromium_jpeg_idct_ifast -#define jpeg_idct_float chromium_jpeg_idct_float -#define jinit_compress_master chromium_jinit_compress_master -#define jinit_c_master_control chromium_jinit_c_master_control -#define jinit_c_main_controller chromium_jinit_c_main_controller -#define jinit_c_prep_controller chromium_jinit_c_prep_controller -#define jinit_c_coef_controller chromium_jinit_c_coef_controller -#define jinit_color_converter chromium_jinit_color_converter -#define jinit_downsampler chromium_jinit_downsampler -#define jinit_forward_dct chromium_jinit_forward_dct -#define jinit_huff_encoder chromium_jinit_huff_encoder -#define jinit_phuff_encoder chromium_jinit_phuff_encoder -#define jinit_marker_writer chromium_jinit_marker_writer -#define jinit_master_decompress chromium_jinit_master_decompress -#define jinit_d_main_controller chromium_jinit_d_main_controller -#define jinit_d_coef_controller chromium_jinit_d_coef_controller -#define jinit_d_post_controller chromium_jinit_d_post_controller -#define jinit_input_controller chromium_jinit_input_controller -#define jinit_marker_reader chromium_jinit_marker_reader -#define jinit_huff_decoder chromium_jinit_huff_decoder -#define jinit_phuff_decoder chromium_jinit_phuff_decoder -#define jinit_inverse_dct chromium_jinit_inverse_dct -#define jinit_upsampler chromium_jinit_upsampler -#define jinit_color_deconverter chromium_jinit_color_deconverter -#define jinit_1pass_quantizer chromium_jinit_1pass_quantizer -#define jinit_2pass_quantizer chromium_jinit_2pass_quantizer -#define jinit_merged_upsampler chromium_jinit_merged_upsampler -#define jinit_memory_mgr chromium_jinit_memory_mgr -#define jdiv_round_up chromium_jdiv_round_up -#define jround_up chromium_jround_up -#define jcopy_sample_rows chromium_jcopy_sample_rows -#define jcopy_block_row chromium_jcopy_block_row -#define jzero_far chromium_jzero_far -#define jpeg_std_error chromium_jpeg_std_error -#define jpeg_CreateCompress chromium_jpeg_CreateCompress -#define jpeg_CreateDecompress chromium_jpeg_CreateDecompress -#define jpeg_destroy_compress chromium_jpeg_destroy_compress -#define jpeg_destroy_decompress chromium_jpeg_destroy_decompress -#define jpeg_stdio_dest chromium_jpeg_stdio_dest -#define jpeg_stdio_src chromium_jpeg_stdio_src -#define jpeg_set_defaults chromium_jpeg_set_defaults -#define jpeg_set_colorspace chromium_jpeg_set_colorspace -#define jpeg_default_colorspace chromium_jpeg_default_colorspace -#define jpeg_set_quality chromium_jpeg_set_quality -#define jpeg_set_linear_quality chromium_jpeg_set_linear_quality -#define jpeg_add_quant_table chromium_jpeg_add_quant_table -#define jpeg_quality_scaling chromium_jpeg_quality_scaling -#define jpeg_simple_progression chromium_jpeg_simple_progression -#define jpeg_suppress_tables chromium_jpeg_suppress_tables -#define jpeg_alloc_quant_table chromium_jpeg_alloc_quant_table -#define jpeg_alloc_huff_table chromium_jpeg_alloc_huff_table -#define jpeg_start_compress chromium_jpeg_start_compress -#define jpeg_write_scanlines chromium_jpeg_write_scanlines -#define jpeg_finish_compress chromium_jpeg_finish_compress -#define jpeg_write_raw_data chromium_jpeg_write_raw_data -#define jpeg_write_marker chromium_jpeg_write_marker -#define jpeg_write_m_header chromium_jpeg_write_m_header -#define jpeg_write_m_byte chromium_jpeg_write_m_byte -#define jpeg_write_tables chromium_jpeg_write_tables -#define jpeg_read_header chromium_jpeg_read_header -#define jpeg_start_decompress chromium_jpeg_start_decompress -#define jpeg_read_scanlines chromium_jpeg_read_scanlines -#define jpeg_skip_scanlines chromium_jpeg_skip_scanlines -#define jpeg_crop_scanline chromium_jpeg_crop_scanline -#define jpeg_finish_decompress chromium_jpeg_finish_decompress -#define jpeg_read_raw_data chromium_jpeg_read_raw_data -#define jpeg_has_multiple_scans chromium_jpeg_has_multiple_scans -#define jpeg_start_output chromium_jpeg_start_output -#define jpeg_finish_output chromium_jpeg_finish_output -#define jpeg_input_complete chromium_jpeg_input_complete -#define jpeg_new_colormap chromium_jpeg_new_colormap -#define jpeg_consume_input chromium_jpeg_consume_input -#define jpeg_calc_output_dimensions chromium_jpeg_calc_output_dimensions -#define jpeg_save_markers chromium_jpeg_save_markers -#define jpeg_set_marker_processor chromium_jpeg_set_marker_processor -#define jpeg_read_coefficients chromium_jpeg_read_coefficients -#define jpeg_write_coefficients chromium_jpeg_write_coefficients -#define jpeg_copy_critical_parameters chromium_jpeg_copy_critical_parameters -#define jpeg_abort_compress chromium_jpeg_abort_compress -#define jpeg_abort_decompress chromium_jpeg_abort_decompress -#define jpeg_abort chromium_jpeg_abort -#define jpeg_destroy chromium_jpeg_destroy -#define jpeg_resync_to_restart chromium_jpeg_resync_to_restart -#define jpeg_get_small chromium_jpeg_get_small -#define jpeg_free_small chromium_jpeg_free_small -#define jpeg_get_large chromium_jpeg_get_large -#define jpeg_free_large chromium_jpeg_free_large -#define jpeg_mem_available chromium_jpeg_mem_available -#define jpeg_open_backing_store chromium_jpeg_open_backing_store -#define jpeg_mem_init chromium_jpeg_mem_init -#define jpeg_mem_term chromium_jpeg_mem_term -#define jpeg_std_message_table chromium_jpeg_std_message_table -#define jpeg_natural_order chromium_jpeg_natural_order - -#endif // THIRD_PARTY_LIBJPEG_TURBO_JPEGLIBMANGLER_H_ diff --git a/WebRtc.NET/include/third_party/libvpx/source/config/ios/arm-neon/vp8_rtcd.h b/WebRtc.NET/include/third_party/libvpx/source/config/ios/arm-neon/vp8_rtcd.h deleted file mode 100644 index 6a7f92ca..00000000 --- a/WebRtc.NET/include/third_party/libvpx/source/config/ios/arm-neon/vp8_rtcd.h +++ /dev/null @@ -1,218 +0,0 @@ -#ifndef VP8_RTCD_H_ -#define VP8_RTCD_H_ - -#ifdef RTCD_C -#define RTCD_EXTERN -#else -#define RTCD_EXTERN extern -#endif - -/* - * VP8 - */ - -struct blockd; -struct macroblockd; -struct loop_filter_info; - -/* Encoder forward decls */ -struct block; -struct macroblock; -struct variance_vtable; -union int_mv; -struct yv12_buffer_config; - -#ifdef __cplusplus -extern "C" { -#endif - -void vp8_bilinear_predict16x16_c(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch); -void vp8_bilinear_predict16x16_neon(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch); -#define vp8_bilinear_predict16x16 vp8_bilinear_predict16x16_neon - -void vp8_bilinear_predict4x4_c(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch); -void vp8_bilinear_predict4x4_neon(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch); -#define vp8_bilinear_predict4x4 vp8_bilinear_predict4x4_neon - -void vp8_bilinear_predict8x4_c(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch); -void vp8_bilinear_predict8x4_neon(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch); -#define vp8_bilinear_predict8x4 vp8_bilinear_predict8x4_neon - -void vp8_bilinear_predict8x8_c(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch); -void vp8_bilinear_predict8x8_neon(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch); -#define vp8_bilinear_predict8x8 vp8_bilinear_predict8x8_neon - -void vp8_blend_b_c(unsigned char *y, unsigned char *u, unsigned char *v, int y1, int u1, int v1, int alpha, int stride); -#define vp8_blend_b vp8_blend_b_c - -void vp8_blend_mb_inner_c(unsigned char *y, unsigned char *u, unsigned char *v, int y1, int u1, int v1, int alpha, int stride); -#define vp8_blend_mb_inner vp8_blend_mb_inner_c - -void vp8_blend_mb_outer_c(unsigned char *y, unsigned char *u, unsigned char *v, int y1, int u1, int v1, int alpha, int stride); -#define vp8_blend_mb_outer vp8_blend_mb_outer_c - -int vp8_block_error_c(short *coeff, short *dqcoeff); -#define vp8_block_error vp8_block_error_c - -void vp8_copy_mem16x16_c(unsigned char *src, int src_pitch, unsigned char *dst, int dst_pitch); -void vp8_copy_mem16x16_neon(unsigned char *src, int src_pitch, unsigned char *dst, int dst_pitch); -#define vp8_copy_mem16x16 vp8_copy_mem16x16_neon - -void vp8_copy_mem8x4_c(unsigned char *src, int src_pitch, unsigned char *dst, int dst_pitch); -void vp8_copy_mem8x4_neon(unsigned char *src, int src_pitch, unsigned char *dst, int dst_pitch); -#define vp8_copy_mem8x4 vp8_copy_mem8x4_neon - -void vp8_copy_mem8x8_c(unsigned char *src, int src_pitch, unsigned char *dst, int dst_pitch); -void vp8_copy_mem8x8_neon(unsigned char *src, int src_pitch, unsigned char *dst, int dst_pitch); -#define vp8_copy_mem8x8 vp8_copy_mem8x8_neon - -void vp8_dc_only_idct_add_c(short input, unsigned char *pred, int pred_stride, unsigned char *dst, int dst_stride); -void vp8_dc_only_idct_add_neon(short input, unsigned char *pred, int pred_stride, unsigned char *dst, int dst_stride); -#define vp8_dc_only_idct_add vp8_dc_only_idct_add_neon - -int vp8_denoiser_filter_c(unsigned char *mc_running_avg_y, int mc_avg_y_stride, unsigned char *running_avg_y, int avg_y_stride, unsigned char *sig, int sig_stride, unsigned int motion_magnitude, int increase_denoising); -int vp8_denoiser_filter_neon(unsigned char *mc_running_avg_y, int mc_avg_y_stride, unsigned char *running_avg_y, int avg_y_stride, unsigned char *sig, int sig_stride, unsigned int motion_magnitude, int increase_denoising); -#define vp8_denoiser_filter vp8_denoiser_filter_neon - -int vp8_denoiser_filter_uv_c(unsigned char *mc_running_avg, int mc_avg_stride, unsigned char *running_avg, int avg_stride, unsigned char *sig, int sig_stride, unsigned int motion_magnitude, int increase_denoising); -int vp8_denoiser_filter_uv_neon(unsigned char *mc_running_avg, int mc_avg_stride, unsigned char *running_avg, int avg_stride, unsigned char *sig, int sig_stride, unsigned int motion_magnitude, int increase_denoising); -#define vp8_denoiser_filter_uv vp8_denoiser_filter_uv_neon - -void vp8_dequant_idct_add_c(short *input, short *dq, unsigned char *output, int stride); -void vp8_dequant_idct_add_neon(short *input, short *dq, unsigned char *output, int stride); -#define vp8_dequant_idct_add vp8_dequant_idct_add_neon - -void vp8_dequant_idct_add_uv_block_c(short *q, short *dq, unsigned char *dst_u, unsigned char *dst_v, int stride, char *eobs); -void vp8_dequant_idct_add_uv_block_neon(short *q, short *dq, unsigned char *dst_u, unsigned char *dst_v, int stride, char *eobs); -#define vp8_dequant_idct_add_uv_block vp8_dequant_idct_add_uv_block_neon - -void vp8_dequant_idct_add_y_block_c(short *q, short *dq, unsigned char *dst, int stride, char *eobs); -void vp8_dequant_idct_add_y_block_neon(short *q, short *dq, unsigned char *dst, int stride, char *eobs); -#define vp8_dequant_idct_add_y_block vp8_dequant_idct_add_y_block_neon - -void vp8_dequantize_b_c(struct blockd*, short *dqc); -void vp8_dequantize_b_neon(struct blockd*, short *dqc); -#define vp8_dequantize_b vp8_dequantize_b_neon - -int vp8_diamond_search_sad_c(struct macroblock *x, struct block *b, struct blockd *d, union int_mv *ref_mv, union int_mv *best_mv, int search_param, int sad_per_bit, int *num00, struct variance_vtable *fn_ptr, int *mvcost[2], union int_mv *center_mv); -#define vp8_diamond_search_sad vp8_diamond_search_sad_c - -void vp8_fast_quantize_b_c(struct block *, struct blockd *); -void vp8_fast_quantize_b_neon(struct block *, struct blockd *); -#define vp8_fast_quantize_b vp8_fast_quantize_b_neon - -void vp8_filter_by_weight16x16_c(unsigned char *src, int src_stride, unsigned char *dst, int dst_stride, int src_weight); -#define vp8_filter_by_weight16x16 vp8_filter_by_weight16x16_c - -void vp8_filter_by_weight4x4_c(unsigned char *src, int src_stride, unsigned char *dst, int dst_stride, int src_weight); -#define vp8_filter_by_weight4x4 vp8_filter_by_weight4x4_c - -void vp8_filter_by_weight8x8_c(unsigned char *src, int src_stride, unsigned char *dst, int dst_stride, int src_weight); -#define vp8_filter_by_weight8x8 vp8_filter_by_weight8x8_c - -int vp8_full_search_sad_c(struct macroblock *x, struct block *b, struct blockd *d, union int_mv *ref_mv, int sad_per_bit, int distance, struct variance_vtable *fn_ptr, int *mvcost[2], union int_mv *center_mv); -#define vp8_full_search_sad vp8_full_search_sad_c - -void vp8_loop_filter_bh_c(unsigned char *y, unsigned char *u, unsigned char *v, int ystride, int uv_stride, struct loop_filter_info *lfi); -void vp8_loop_filter_bh_neon(unsigned char *y, unsigned char *u, unsigned char *v, int ystride, int uv_stride, struct loop_filter_info *lfi); -#define vp8_loop_filter_bh vp8_loop_filter_bh_neon - -void vp8_loop_filter_bv_c(unsigned char *y, unsigned char *u, unsigned char *v, int ystride, int uv_stride, struct loop_filter_info *lfi); -void vp8_loop_filter_bv_neon(unsigned char *y, unsigned char *u, unsigned char *v, int ystride, int uv_stride, struct loop_filter_info *lfi); -#define vp8_loop_filter_bv vp8_loop_filter_bv_neon - -void vp8_loop_filter_mbh_c(unsigned char *y, unsigned char *u, unsigned char *v, int ystride, int uv_stride, struct loop_filter_info *lfi); -void vp8_loop_filter_mbh_neon(unsigned char *y, unsigned char *u, unsigned char *v, int ystride, int uv_stride, struct loop_filter_info *lfi); -#define vp8_loop_filter_mbh vp8_loop_filter_mbh_neon - -void vp8_loop_filter_mbv_c(unsigned char *y, unsigned char *u, unsigned char *v, int ystride, int uv_stride, struct loop_filter_info *lfi); -void vp8_loop_filter_mbv_neon(unsigned char *y, unsigned char *u, unsigned char *v, int ystride, int uv_stride, struct loop_filter_info *lfi); -#define vp8_loop_filter_mbv vp8_loop_filter_mbv_neon - -void vp8_loop_filter_bhs_c(unsigned char *y, int ystride, const unsigned char *blimit); -void vp8_loop_filter_bhs_neon(unsigned char *y, int ystride, const unsigned char *blimit); -#define vp8_loop_filter_simple_bh vp8_loop_filter_bhs_neon - -void vp8_loop_filter_bvs_c(unsigned char *y, int ystride, const unsigned char *blimit); -void vp8_loop_filter_bvs_neon(unsigned char *y, int ystride, const unsigned char *blimit); -#define vp8_loop_filter_simple_bv vp8_loop_filter_bvs_neon - -void vp8_loop_filter_simple_horizontal_edge_c(unsigned char *y, int ystride, const unsigned char *blimit); -void vp8_loop_filter_mbhs_neon(unsigned char *y, int ystride, const unsigned char *blimit); -#define vp8_loop_filter_simple_mbh vp8_loop_filter_mbhs_neon - -void vp8_loop_filter_simple_vertical_edge_c(unsigned char *y, int ystride, const unsigned char *blimit); -void vp8_loop_filter_mbvs_neon(unsigned char *y, int ystride, const unsigned char *blimit); -#define vp8_loop_filter_simple_mbv vp8_loop_filter_mbvs_neon - -int vp8_mbblock_error_c(struct macroblock *mb, int dc); -#define vp8_mbblock_error vp8_mbblock_error_c - -int vp8_mbuverror_c(struct macroblock *mb); -#define vp8_mbuverror vp8_mbuverror_c - -int vp8_refining_search_sad_c(struct macroblock *x, struct block *b, struct blockd *d, union int_mv *ref_mv, int sad_per_bit, int distance, struct variance_vtable *fn_ptr, int *mvcost[2], union int_mv *center_mv); -#define vp8_refining_search_sad vp8_refining_search_sad_c - -void vp8_regular_quantize_b_c(struct block *, struct blockd *); -#define vp8_regular_quantize_b vp8_regular_quantize_b_c - -void vp8_short_fdct4x4_c(short *input, short *output, int pitch); -void vp8_short_fdct4x4_neon(short *input, short *output, int pitch); -#define vp8_short_fdct4x4 vp8_short_fdct4x4_neon - -void vp8_short_fdct8x4_c(short *input, short *output, int pitch); -void vp8_short_fdct8x4_neon(short *input, short *output, int pitch); -#define vp8_short_fdct8x4 vp8_short_fdct8x4_neon - -void vp8_short_idct4x4llm_c(short *input, unsigned char *pred, int pitch, unsigned char *dst, int dst_stride); -void vp8_short_idct4x4llm_neon(short *input, unsigned char *pred, int pitch, unsigned char *dst, int dst_stride); -#define vp8_short_idct4x4llm vp8_short_idct4x4llm_neon - -void vp8_short_inv_walsh4x4_c(short *input, short *output); -void vp8_short_inv_walsh4x4_neon(short *input, short *output); -#define vp8_short_inv_walsh4x4 vp8_short_inv_walsh4x4_neon - -void vp8_short_inv_walsh4x4_1_c(short *input, short *output); -#define vp8_short_inv_walsh4x4_1 vp8_short_inv_walsh4x4_1_c - -void vp8_short_walsh4x4_c(short *input, short *output, int pitch); -void vp8_short_walsh4x4_neon(short *input, short *output, int pitch); -#define vp8_short_walsh4x4 vp8_short_walsh4x4_neon - -void vp8_sixtap_predict16x16_c(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch); -void vp8_sixtap_predict16x16_neon(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch); -#define vp8_sixtap_predict16x16 vp8_sixtap_predict16x16_neon - -void vp8_sixtap_predict4x4_c(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch); -void vp8_sixtap_predict4x4_neon(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch); -#define vp8_sixtap_predict4x4 vp8_sixtap_predict4x4_neon - -void vp8_sixtap_predict8x4_c(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch); -void vp8_sixtap_predict8x4_neon(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch); -#define vp8_sixtap_predict8x4 vp8_sixtap_predict8x4_neon - -void vp8_sixtap_predict8x8_c(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch); -void vp8_sixtap_predict8x8_neon(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch); -#define vp8_sixtap_predict8x8 vp8_sixtap_predict8x8_neon - -void vp8_rtcd(void); - -#include "vpx_config.h" - -#ifdef RTCD_C -#include "vpx_ports/arm.h" -static void setup_rtcd_internal(void) -{ - int flags = arm_cpu_caps(); - - (void)flags; - -} -#endif - -#ifdef __cplusplus -} // extern "C" -#endif - -#endif diff --git a/WebRtc.NET/include/third_party/libvpx/source/config/ios/arm-neon/vp9_rtcd.h b/WebRtc.NET/include/third_party/libvpx/source/config/ios/arm-neon/vp9_rtcd.h deleted file mode 100644 index d07bcaa3..00000000 --- a/WebRtc.NET/include/third_party/libvpx/source/config/ios/arm-neon/vp9_rtcd.h +++ /dev/null @@ -1,113 +0,0 @@ -#ifndef VP9_RTCD_H_ -#define VP9_RTCD_H_ - -#ifdef RTCD_C -#define RTCD_EXTERN -#else -#define RTCD_EXTERN extern -#endif - -/* - * VP9 - */ - -#include "vpx/vpx_integer.h" -#include "vp9/common/vp9_common.h" -#include "vp9/common/vp9_enums.h" - -struct macroblockd; - -/* Encoder forward decls */ -struct macroblock; -struct vp9_variance_vtable; -struct search_site_config; -struct mv; -union int_mv; -struct yv12_buffer_config; - -#ifdef __cplusplus -extern "C" { -#endif - -int64_t vp9_block_error_c(const tran_low_t *coeff, const tran_low_t *dqcoeff, intptr_t block_size, int64_t *ssz); -#define vp9_block_error vp9_block_error_c - -int64_t vp9_block_error_fp_c(const int16_t *coeff, const int16_t *dqcoeff, int block_size); -int64_t vp9_block_error_fp_neon(const int16_t *coeff, const int16_t *dqcoeff, int block_size); -#define vp9_block_error_fp vp9_block_error_fp_neon - -int vp9_denoiser_filter_c(const uint8_t *sig, int sig_stride, const uint8_t *mc_avg, int mc_avg_stride, uint8_t *avg, int avg_stride, int increase_denoising, BLOCK_SIZE bs, int motion_magnitude); -#define vp9_denoiser_filter vp9_denoiser_filter_c - -int vp9_diamond_search_sad_c(const struct macroblock *x, const struct search_site_config *cfg, struct mv *ref_mv, struct mv *best_mv, int search_param, int sad_per_bit, int *num00, const struct vp9_variance_vtable *fn_ptr, const struct mv *center_mv); -#define vp9_diamond_search_sad vp9_diamond_search_sad_c - -void vp9_fdct8x8_quant_c(const int16_t *input, int stride, tran_low_t *coeff_ptr, intptr_t n_coeffs, int skip_block, const int16_t *zbin_ptr, const int16_t *round_ptr, const int16_t *quant_ptr, const int16_t *quant_shift_ptr, tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr, const int16_t *dequant_ptr, uint16_t *eob_ptr, const int16_t *scan, const int16_t *iscan); -void vp9_fdct8x8_quant_neon(const int16_t *input, int stride, tran_low_t *coeff_ptr, intptr_t n_coeffs, int skip_block, const int16_t *zbin_ptr, const int16_t *round_ptr, const int16_t *quant_ptr, const int16_t *quant_shift_ptr, tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr, const int16_t *dequant_ptr, uint16_t *eob_ptr, const int16_t *scan, const int16_t *iscan); -#define vp9_fdct8x8_quant vp9_fdct8x8_quant_neon - -void vp9_fht16x16_c(const int16_t *input, tran_low_t *output, int stride, int tx_type); -#define vp9_fht16x16 vp9_fht16x16_c - -void vp9_fht4x4_c(const int16_t *input, tran_low_t *output, int stride, int tx_type); -#define vp9_fht4x4 vp9_fht4x4_c - -void vp9_fht8x8_c(const int16_t *input, tran_low_t *output, int stride, int tx_type); -#define vp9_fht8x8 vp9_fht8x8_c - -void vp9_filter_by_weight16x16_c(const uint8_t *src, int src_stride, uint8_t *dst, int dst_stride, int src_weight); -#define vp9_filter_by_weight16x16 vp9_filter_by_weight16x16_c - -void vp9_filter_by_weight8x8_c(const uint8_t *src, int src_stride, uint8_t *dst, int dst_stride, int src_weight); -#define vp9_filter_by_weight8x8 vp9_filter_by_weight8x8_c - -int vp9_full_search_sad_c(const struct macroblock *x, const struct mv *ref_mv, int sad_per_bit, int distance, const struct vp9_variance_vtable *fn_ptr, const struct mv *center_mv, struct mv *best_mv); -#define vp9_full_search_sad vp9_full_search_sad_c - -void vp9_fwht4x4_c(const int16_t *input, tran_low_t *output, int stride); -#define vp9_fwht4x4 vp9_fwht4x4_c - -void vp9_iht16x16_256_add_c(const tran_low_t *input, uint8_t *output, int pitch, int tx_type); -#define vp9_iht16x16_256_add vp9_iht16x16_256_add_c - -void vp9_iht4x4_16_add_c(const tran_low_t *input, uint8_t *dest, int stride, int tx_type); -void vp9_iht4x4_16_add_neon(const tran_low_t *input, uint8_t *dest, int stride, int tx_type); -#define vp9_iht4x4_16_add vp9_iht4x4_16_add_neon - -void vp9_iht8x8_64_add_c(const tran_low_t *input, uint8_t *dest, int stride, int tx_type); -void vp9_iht8x8_64_add_neon(const tran_low_t *input, uint8_t *dest, int stride, int tx_type); -#define vp9_iht8x8_64_add vp9_iht8x8_64_add_neon - -void vp9_quantize_fp_c(const tran_low_t *coeff_ptr, intptr_t n_coeffs, int skip_block, const int16_t *zbin_ptr, const int16_t *round_ptr, const int16_t *quant_ptr, const int16_t *quant_shift_ptr, tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr, const int16_t *dequant_ptr, uint16_t *eob_ptr, const int16_t *scan, const int16_t *iscan); -void vp9_quantize_fp_neon(const tran_low_t *coeff_ptr, intptr_t n_coeffs, int skip_block, const int16_t *zbin_ptr, const int16_t *round_ptr, const int16_t *quant_ptr, const int16_t *quant_shift_ptr, tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr, const int16_t *dequant_ptr, uint16_t *eob_ptr, const int16_t *scan, const int16_t *iscan); -#define vp9_quantize_fp vp9_quantize_fp_neon - -void vp9_quantize_fp_32x32_c(const tran_low_t *coeff_ptr, intptr_t n_coeffs, int skip_block, const int16_t *zbin_ptr, const int16_t *round_ptr, const int16_t *quant_ptr, const int16_t *quant_shift_ptr, tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr, const int16_t *dequant_ptr, uint16_t *eob_ptr, const int16_t *scan, const int16_t *iscan); -#define vp9_quantize_fp_32x32 vp9_quantize_fp_32x32_c - -void vp9_scale_and_extend_frame_c(const struct yv12_buffer_config *src, struct yv12_buffer_config *dst); -#define vp9_scale_and_extend_frame vp9_scale_and_extend_frame_c - -void vp9_temporal_filter_apply_c(uint8_t *frame1, unsigned int stride, uint8_t *frame2, unsigned int block_width, unsigned int block_height, int strength, int filter_weight, unsigned int *accumulator, uint16_t *count); -#define vp9_temporal_filter_apply vp9_temporal_filter_apply_c - -void vp9_rtcd(void); - -#include "vpx_config.h" - -#ifdef RTCD_C -#include "vpx_ports/arm.h" -static void setup_rtcd_internal(void) -{ - int flags = arm_cpu_caps(); - - (void)flags; - -} -#endif - -#ifdef __cplusplus -} // extern "C" -#endif - -#endif diff --git a/WebRtc.NET/include/third_party/libvpx/source/config/ios/arm-neon/vpx_config.h b/WebRtc.NET/include/third_party/libvpx/source/config/ios/arm-neon/vpx_config.h deleted file mode 100644 index 2d9a3ced..00000000 --- a/WebRtc.NET/include/third_party/libvpx/source/config/ios/arm-neon/vpx_config.h +++ /dev/null @@ -1,94 +0,0 @@ -/* Copyright (c) 2011 The WebM project authors. All Rights Reserved. */ -/* */ -/* Use of this source code is governed by a BSD-style license */ -/* that can be found in the LICENSE file in the root of the source */ -/* tree. An additional intellectual property rights grant can be found */ -/* in the file PATENTS. All contributing project authors may */ -/* be found in the AUTHORS file in the root of the source tree. */ -/* This file automatically generated by configure. Do not edit! */ -#ifndef VPX_CONFIG_H -#define VPX_CONFIG_H -#define RESTRICT -#define INLINE inline -#define ARCH_ARM 1 -#define ARCH_MIPS 0 -#define ARCH_X86 0 -#define ARCH_X86_64 0 -#define HAVE_NEON 1 -#define HAVE_NEON_ASM 1 -#define HAVE_MIPS32 0 -#define HAVE_DSPR2 0 -#define HAVE_MSA 0 -#define HAVE_MIPS64 0 -#define HAVE_MMX 0 -#define HAVE_SSE 0 -#define HAVE_SSE2 0 -#define HAVE_SSE3 0 -#define HAVE_SSSE3 0 -#define HAVE_SSE4_1 0 -#define HAVE_AVX 0 -#define HAVE_AVX2 0 -#define HAVE_VPX_PORTS 1 -#define HAVE_PTHREAD_H 1 -#define HAVE_UNISTD_H 0 -#define CONFIG_DEPENDENCY_TRACKING 1 -#define CONFIG_EXTERNAL_BUILD 1 -#define CONFIG_INSTALL_DOCS 0 -#define CONFIG_INSTALL_BINS 1 -#define CONFIG_INSTALL_LIBS 1 -#define CONFIG_INSTALL_SRCS 0 -#define CONFIG_DEBUG 0 -#define CONFIG_GPROF 0 -#define CONFIG_GCOV 0 -#define CONFIG_RVCT 0 -#define CONFIG_GCC 1 -#define CONFIG_MSVS 0 -#define CONFIG_PIC 0 -#define CONFIG_BIG_ENDIAN 0 -#define CONFIG_CODEC_SRCS 0 -#define CONFIG_DEBUG_LIBS 0 -#define CONFIG_DEQUANT_TOKENS 0 -#define CONFIG_DC_RECON 0 -#define CONFIG_RUNTIME_CPU_DETECT 0 -#define CONFIG_POSTPROC 1 -#define CONFIG_VP9_POSTPROC 1 -#define CONFIG_MULTITHREAD 1 -#define CONFIG_INTERNAL_STATS 0 -#define CONFIG_VP8_ENCODER 1 -#define CONFIG_VP8_DECODER 1 -#define CONFIG_VP9_ENCODER 1 -#define CONFIG_VP9_DECODER 1 -#define CONFIG_VP8 1 -#define CONFIG_VP9 1 -#define CONFIG_ENCODERS 1 -#define CONFIG_DECODERS 1 -#define CONFIG_STATIC_MSVCRT 0 -#define CONFIG_SPATIAL_RESAMPLING 1 -#define CONFIG_REALTIME_ONLY 1 -#define CONFIG_ONTHEFLY_BITPACKING 0 -#define CONFIG_ERROR_CONCEALMENT 0 -#define CONFIG_SHARED 0 -#define CONFIG_STATIC 1 -#define CONFIG_SMALL 0 -#define CONFIG_POSTPROC_VISUALIZER 0 -#define CONFIG_OS_SUPPORT 1 -#define CONFIG_UNIT_TESTS 1 -#define CONFIG_WEBM_IO 1 -#define CONFIG_LIBYUV 1 -#define CONFIG_DECODE_PERF_TESTS 0 -#define CONFIG_ENCODE_PERF_TESTS 0 -#define CONFIG_MULTI_RES_ENCODING 1 -#define CONFIG_TEMPORAL_DENOISING 1 -#define CONFIG_VP9_TEMPORAL_DENOISING 1 -#define CONFIG_COEFFICIENT_RANGE_CHECKING 0 -#define CONFIG_VP9_HIGHBITDEPTH 0 -#define CONFIG_BETTER_HW_COMPATIBILITY 0 -#define CONFIG_EXPERIMENTAL 0 -#define CONFIG_SIZE_LIMIT 1 -#define CONFIG_SPATIAL_SVC 0 -#define CONFIG_FP_MB_STATS 0 -#define CONFIG_EMULATE_HARDWARE 0 -#define CONFIG_MISC_FIXES 0 -#define DECODE_WIDTH_LIMIT 16384 -#define DECODE_HEIGHT_LIMIT 16384 -#endif /* VPX_CONFIG_H */ diff --git a/WebRtc.NET/include/third_party/libvpx/source/config/ios/arm-neon/vpx_dsp_rtcd.h b/WebRtc.NET/include/third_party/libvpx/source/config/ios/arm-neon/vpx_dsp_rtcd.h deleted file mode 100644 index c9d867d0..00000000 --- a/WebRtc.NET/include/third_party/libvpx/source/config/ios/arm-neon/vpx_dsp_rtcd.h +++ /dev/null @@ -1,858 +0,0 @@ -#ifndef VPX_DSP_RTCD_H_ -#define VPX_DSP_RTCD_H_ - -#ifdef RTCD_C -#define RTCD_EXTERN -#else -#define RTCD_EXTERN extern -#endif - -/* - * DSP - */ - -#include "vpx/vpx_integer.h" -#include "vpx_dsp/vpx_dsp_common.h" - - -#ifdef __cplusplus -extern "C" { -#endif - -unsigned int vpx_avg_4x4_c(const uint8_t *, int p); -unsigned int vpx_avg_4x4_neon(const uint8_t *, int p); -#define vpx_avg_4x4 vpx_avg_4x4_neon - -unsigned int vpx_avg_8x8_c(const uint8_t *, int p); -unsigned int vpx_avg_8x8_neon(const uint8_t *, int p); -#define vpx_avg_8x8 vpx_avg_8x8_neon - -void vpx_comp_avg_pred_c(uint8_t *comp_pred, const uint8_t *pred, int width, int height, const uint8_t *ref, int ref_stride); -#define vpx_comp_avg_pred vpx_comp_avg_pred_c - -void vpx_convolve8_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -void vpx_convolve8_neon(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -#define vpx_convolve8 vpx_convolve8_neon - -void vpx_convolve8_avg_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -void vpx_convolve8_avg_neon(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -#define vpx_convolve8_avg vpx_convolve8_avg_neon - -void vpx_convolve8_avg_horiz_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -void vpx_convolve8_avg_horiz_neon(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -#define vpx_convolve8_avg_horiz vpx_convolve8_avg_horiz_neon - -void vpx_convolve8_avg_vert_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -void vpx_convolve8_avg_vert_neon(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -#define vpx_convolve8_avg_vert vpx_convolve8_avg_vert_neon - -void vpx_convolve8_horiz_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -void vpx_convolve8_horiz_neon(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -#define vpx_convolve8_horiz vpx_convolve8_horiz_neon - -void vpx_convolve8_vert_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -void vpx_convolve8_vert_neon(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -#define vpx_convolve8_vert vpx_convolve8_vert_neon - -void vpx_convolve_avg_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -void vpx_convolve_avg_neon(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -#define vpx_convolve_avg vpx_convolve_avg_neon - -void vpx_convolve_copy_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -void vpx_convolve_copy_neon(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -#define vpx_convolve_copy vpx_convolve_copy_neon - -void vpx_d117_predictor_16x16_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d117_predictor_16x16 vpx_d117_predictor_16x16_c - -void vpx_d117_predictor_32x32_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d117_predictor_32x32 vpx_d117_predictor_32x32_c - -void vpx_d117_predictor_4x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d117_predictor_4x4 vpx_d117_predictor_4x4_c - -void vpx_d117_predictor_8x8_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d117_predictor_8x8 vpx_d117_predictor_8x8_c - -void vpx_d135_predictor_16x16_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_d135_predictor_16x16_neon(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d135_predictor_16x16 vpx_d135_predictor_16x16_neon - -void vpx_d135_predictor_32x32_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_d135_predictor_32x32_neon(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d135_predictor_32x32 vpx_d135_predictor_32x32_neon - -void vpx_d135_predictor_4x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_d135_predictor_4x4_neon(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d135_predictor_4x4 vpx_d135_predictor_4x4_neon - -void vpx_d135_predictor_8x8_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_d135_predictor_8x8_neon(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d135_predictor_8x8 vpx_d135_predictor_8x8_neon - -void vpx_d153_predictor_16x16_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d153_predictor_16x16 vpx_d153_predictor_16x16_c - -void vpx_d153_predictor_32x32_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d153_predictor_32x32 vpx_d153_predictor_32x32_c - -void vpx_d153_predictor_4x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d153_predictor_4x4 vpx_d153_predictor_4x4_c - -void vpx_d153_predictor_8x8_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d153_predictor_8x8 vpx_d153_predictor_8x8_c - -void vpx_d207_predictor_16x16_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d207_predictor_16x16 vpx_d207_predictor_16x16_c - -void vpx_d207_predictor_32x32_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d207_predictor_32x32 vpx_d207_predictor_32x32_c - -void vpx_d207_predictor_4x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d207_predictor_4x4 vpx_d207_predictor_4x4_c - -void vpx_d207_predictor_8x8_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d207_predictor_8x8 vpx_d207_predictor_8x8_c - -void vpx_d207e_predictor_16x16_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d207e_predictor_16x16 vpx_d207e_predictor_16x16_c - -void vpx_d207e_predictor_32x32_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d207e_predictor_32x32 vpx_d207e_predictor_32x32_c - -void vpx_d207e_predictor_4x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d207e_predictor_4x4 vpx_d207e_predictor_4x4_c - -void vpx_d207e_predictor_8x8_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d207e_predictor_8x8 vpx_d207e_predictor_8x8_c - -void vpx_d45_predictor_16x16_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_d45_predictor_16x16_neon(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d45_predictor_16x16 vpx_d45_predictor_16x16_neon - -void vpx_d45_predictor_32x32_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_d45_predictor_32x32_neon(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d45_predictor_32x32 vpx_d45_predictor_32x32_neon - -void vpx_d45_predictor_4x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_d45_predictor_4x4_neon(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d45_predictor_4x4 vpx_d45_predictor_4x4_neon - -void vpx_d45_predictor_8x8_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_d45_predictor_8x8_neon(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d45_predictor_8x8 vpx_d45_predictor_8x8_neon - -void vpx_d45e_predictor_16x16_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d45e_predictor_16x16 vpx_d45e_predictor_16x16_c - -void vpx_d45e_predictor_32x32_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d45e_predictor_32x32 vpx_d45e_predictor_32x32_c - -void vpx_d45e_predictor_4x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d45e_predictor_4x4 vpx_d45e_predictor_4x4_c - -void vpx_d45e_predictor_8x8_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d45e_predictor_8x8 vpx_d45e_predictor_8x8_c - -void vpx_d63_predictor_16x16_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d63_predictor_16x16 vpx_d63_predictor_16x16_c - -void vpx_d63_predictor_32x32_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d63_predictor_32x32 vpx_d63_predictor_32x32_c - -void vpx_d63_predictor_4x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d63_predictor_4x4 vpx_d63_predictor_4x4_c - -void vpx_d63_predictor_8x8_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d63_predictor_8x8 vpx_d63_predictor_8x8_c - -void vpx_d63e_predictor_16x16_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d63e_predictor_16x16 vpx_d63e_predictor_16x16_c - -void vpx_d63e_predictor_32x32_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d63e_predictor_32x32 vpx_d63e_predictor_32x32_c - -void vpx_d63e_predictor_4x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d63e_predictor_4x4 vpx_d63e_predictor_4x4_c - -void vpx_d63e_predictor_8x8_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d63e_predictor_8x8 vpx_d63e_predictor_8x8_c - -void vpx_d63f_predictor_4x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d63f_predictor_4x4 vpx_d63f_predictor_4x4_c - -void vpx_dc_128_predictor_16x16_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_dc_128_predictor_16x16_neon(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_dc_128_predictor_16x16 vpx_dc_128_predictor_16x16_neon - -void vpx_dc_128_predictor_32x32_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_dc_128_predictor_32x32_neon(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_dc_128_predictor_32x32 vpx_dc_128_predictor_32x32_neon - -void vpx_dc_128_predictor_4x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_dc_128_predictor_4x4_neon(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_dc_128_predictor_4x4 vpx_dc_128_predictor_4x4_neon - -void vpx_dc_128_predictor_8x8_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_dc_128_predictor_8x8_neon(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_dc_128_predictor_8x8 vpx_dc_128_predictor_8x8_neon - -void vpx_dc_left_predictor_16x16_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_dc_left_predictor_16x16_neon(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_dc_left_predictor_16x16 vpx_dc_left_predictor_16x16_neon - -void vpx_dc_left_predictor_32x32_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_dc_left_predictor_32x32_neon(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_dc_left_predictor_32x32 vpx_dc_left_predictor_32x32_neon - -void vpx_dc_left_predictor_4x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_dc_left_predictor_4x4_neon(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_dc_left_predictor_4x4 vpx_dc_left_predictor_4x4_neon - -void vpx_dc_left_predictor_8x8_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_dc_left_predictor_8x8_neon(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_dc_left_predictor_8x8 vpx_dc_left_predictor_8x8_neon - -void vpx_dc_predictor_16x16_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_dc_predictor_16x16_neon(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_dc_predictor_16x16 vpx_dc_predictor_16x16_neon - -void vpx_dc_predictor_32x32_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_dc_predictor_32x32_neon(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_dc_predictor_32x32 vpx_dc_predictor_32x32_neon - -void vpx_dc_predictor_4x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_dc_predictor_4x4_neon(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_dc_predictor_4x4 vpx_dc_predictor_4x4_neon - -void vpx_dc_predictor_8x8_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_dc_predictor_8x8_neon(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_dc_predictor_8x8 vpx_dc_predictor_8x8_neon - -void vpx_dc_top_predictor_16x16_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_dc_top_predictor_16x16_neon(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_dc_top_predictor_16x16 vpx_dc_top_predictor_16x16_neon - -void vpx_dc_top_predictor_32x32_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_dc_top_predictor_32x32_neon(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_dc_top_predictor_32x32 vpx_dc_top_predictor_32x32_neon - -void vpx_dc_top_predictor_4x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_dc_top_predictor_4x4_neon(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_dc_top_predictor_4x4 vpx_dc_top_predictor_4x4_neon - -void vpx_dc_top_predictor_8x8_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_dc_top_predictor_8x8_neon(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_dc_top_predictor_8x8 vpx_dc_top_predictor_8x8_neon - -void vpx_fdct16x16_c(const int16_t *input, tran_low_t *output, int stride); -#define vpx_fdct16x16 vpx_fdct16x16_c - -void vpx_fdct16x16_1_c(const int16_t *input, tran_low_t *output, int stride); -#define vpx_fdct16x16_1 vpx_fdct16x16_1_c - -void vpx_fdct32x32_c(const int16_t *input, tran_low_t *output, int stride); -#define vpx_fdct32x32 vpx_fdct32x32_c - -void vpx_fdct32x32_1_c(const int16_t *input, tran_low_t *output, int stride); -#define vpx_fdct32x32_1 vpx_fdct32x32_1_c - -void vpx_fdct32x32_rd_c(const int16_t *input, tran_low_t *output, int stride); -#define vpx_fdct32x32_rd vpx_fdct32x32_rd_c - -void vpx_fdct4x4_c(const int16_t *input, tran_low_t *output, int stride); -#define vpx_fdct4x4 vpx_fdct4x4_c - -void vpx_fdct4x4_1_c(const int16_t *input, tran_low_t *output, int stride); -#define vpx_fdct4x4_1 vpx_fdct4x4_1_c - -void vpx_fdct8x8_c(const int16_t *input, tran_low_t *output, int stride); -void vpx_fdct8x8_neon(const int16_t *input, tran_low_t *output, int stride); -#define vpx_fdct8x8 vpx_fdct8x8_neon - -void vpx_fdct8x8_1_c(const int16_t *input, tran_low_t *output, int stride); -void vpx_fdct8x8_1_neon(const int16_t *input, tran_low_t *output, int stride); -#define vpx_fdct8x8_1 vpx_fdct8x8_1_neon - -void vpx_get16x16var_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse, int *sum); -void vpx_get16x16var_neon(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse, int *sum); -#define vpx_get16x16var vpx_get16x16var_neon - -unsigned int vpx_get4x4sse_cs_c(const unsigned char *src_ptr, int source_stride, const unsigned char *ref_ptr, int ref_stride); -unsigned int vpx_get4x4sse_cs_neon(const unsigned char *src_ptr, int source_stride, const unsigned char *ref_ptr, int ref_stride); -#define vpx_get4x4sse_cs vpx_get4x4sse_cs_neon - -void vpx_get8x8var_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse, int *sum); -void vpx_get8x8var_neon(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse, int *sum); -#define vpx_get8x8var vpx_get8x8var_neon - -unsigned int vpx_get_mb_ss_c(const int16_t *); -#define vpx_get_mb_ss vpx_get_mb_ss_c - -void vpx_h_predictor_16x16_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_h_predictor_16x16_neon(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_h_predictor_16x16 vpx_h_predictor_16x16_neon - -void vpx_h_predictor_32x32_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_h_predictor_32x32_neon(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_h_predictor_32x32 vpx_h_predictor_32x32_neon - -void vpx_h_predictor_4x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_h_predictor_4x4_neon(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_h_predictor_4x4 vpx_h_predictor_4x4_neon - -void vpx_h_predictor_8x8_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_h_predictor_8x8_neon(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_h_predictor_8x8 vpx_h_predictor_8x8_neon - -void vpx_hadamard_16x16_c(const int16_t *src_diff, int src_stride, int16_t *coeff); -void vpx_hadamard_16x16_neon(const int16_t *src_diff, int src_stride, int16_t *coeff); -#define vpx_hadamard_16x16 vpx_hadamard_16x16_neon - -void vpx_hadamard_8x8_c(const int16_t *src_diff, int src_stride, int16_t *coeff); -void vpx_hadamard_8x8_neon(const int16_t *src_diff, int src_stride, int16_t *coeff); -#define vpx_hadamard_8x8 vpx_hadamard_8x8_neon - -void vpx_he_predictor_4x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_he_predictor_4x4 vpx_he_predictor_4x4_c - -void vpx_idct16x16_10_add_c(const tran_low_t *input, uint8_t *dest, int stride); -void vpx_idct16x16_10_add_neon(const tran_low_t *input, uint8_t *dest, int stride); -#define vpx_idct16x16_10_add vpx_idct16x16_10_add_neon - -void vpx_idct16x16_1_add_c(const tran_low_t *input, uint8_t *dest, int stride); -void vpx_idct16x16_1_add_neon(const tran_low_t *input, uint8_t *dest, int stride); -#define vpx_idct16x16_1_add vpx_idct16x16_1_add_neon - -void vpx_idct16x16_256_add_c(const tran_low_t *input, uint8_t *dest, int stride); -void vpx_idct16x16_256_add_neon(const tran_low_t *input, uint8_t *dest, int stride); -#define vpx_idct16x16_256_add vpx_idct16x16_256_add_neon - -void vpx_idct32x32_1024_add_c(const tran_low_t *input, uint8_t *dest, int stride); -void vpx_idct32x32_1024_add_neon(const tran_low_t *input, uint8_t *dest, int stride); -#define vpx_idct32x32_1024_add vpx_idct32x32_1024_add_neon - -void vpx_idct32x32_135_add_c(const tran_low_t *input, uint8_t *dest, int stride); -void vpx_idct32x32_135_add_neon(const tran_low_t *input, uint8_t *dest, int stride); -#define vpx_idct32x32_135_add vpx_idct32x32_135_add_neon - -void vpx_idct32x32_1_add_c(const tran_low_t *input, uint8_t *dest, int stride); -void vpx_idct32x32_1_add_neon(const tran_low_t *input, uint8_t *dest, int stride); -#define vpx_idct32x32_1_add vpx_idct32x32_1_add_neon - -void vpx_idct32x32_34_add_c(const tran_low_t *input, uint8_t *dest, int stride); -void vpx_idct32x32_34_add_neon(const tran_low_t *input, uint8_t *dest, int stride); -#define vpx_idct32x32_34_add vpx_idct32x32_34_add_neon - -void vpx_idct4x4_16_add_c(const tran_low_t *input, uint8_t *dest, int stride); -void vpx_idct4x4_16_add_neon(const tran_low_t *input, uint8_t *dest, int stride); -#define vpx_idct4x4_16_add vpx_idct4x4_16_add_neon - -void vpx_idct4x4_1_add_c(const tran_low_t *input, uint8_t *dest, int stride); -void vpx_idct4x4_1_add_neon(const tran_low_t *input, uint8_t *dest, int stride); -#define vpx_idct4x4_1_add vpx_idct4x4_1_add_neon - -void vpx_idct8x8_12_add_c(const tran_low_t *input, uint8_t *dest, int stride); -void vpx_idct8x8_12_add_neon(const tran_low_t *input, uint8_t *dest, int stride); -#define vpx_idct8x8_12_add vpx_idct8x8_12_add_neon - -void vpx_idct8x8_1_add_c(const tran_low_t *input, uint8_t *dest, int stride); -void vpx_idct8x8_1_add_neon(const tran_low_t *input, uint8_t *dest, int stride); -#define vpx_idct8x8_1_add vpx_idct8x8_1_add_neon - -void vpx_idct8x8_64_add_c(const tran_low_t *input, uint8_t *dest, int stride); -void vpx_idct8x8_64_add_neon(const tran_low_t *input, uint8_t *dest, int stride); -#define vpx_idct8x8_64_add vpx_idct8x8_64_add_neon - -int16_t vpx_int_pro_col_c(const uint8_t *ref, const int width); -int16_t vpx_int_pro_col_neon(const uint8_t *ref, const int width); -#define vpx_int_pro_col vpx_int_pro_col_neon - -void vpx_int_pro_row_c(int16_t *hbuf, const uint8_t *ref, const int ref_stride, const int height); -void vpx_int_pro_row_neon(int16_t *hbuf, const uint8_t *ref, const int ref_stride, const int height); -#define vpx_int_pro_row vpx_int_pro_row_neon - -void vpx_iwht4x4_16_add_c(const tran_low_t *input, uint8_t *dest, int stride); -#define vpx_iwht4x4_16_add vpx_iwht4x4_16_add_c - -void vpx_iwht4x4_1_add_c(const tran_low_t *input, uint8_t *dest, int stride); -#define vpx_iwht4x4_1_add vpx_iwht4x4_1_add_c - -void vpx_lpf_horizontal_16_c(uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh); -void vpx_lpf_horizontal_16_neon(uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh); -#define vpx_lpf_horizontal_16 vpx_lpf_horizontal_16_neon - -void vpx_lpf_horizontal_16_dual_c(uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh); -void vpx_lpf_horizontal_16_dual_neon(uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh); -#define vpx_lpf_horizontal_16_dual vpx_lpf_horizontal_16_dual_neon - -void vpx_lpf_horizontal_4_c(uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh); -void vpx_lpf_horizontal_4_neon(uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh); -#define vpx_lpf_horizontal_4 vpx_lpf_horizontal_4_neon - -void vpx_lpf_horizontal_4_dual_c(uint8_t *s, int pitch, const uint8_t *blimit0, const uint8_t *limit0, const uint8_t *thresh0, const uint8_t *blimit1, const uint8_t *limit1, const uint8_t *thresh1); -void vpx_lpf_horizontal_4_dual_neon(uint8_t *s, int pitch, const uint8_t *blimit0, const uint8_t *limit0, const uint8_t *thresh0, const uint8_t *blimit1, const uint8_t *limit1, const uint8_t *thresh1); -#define vpx_lpf_horizontal_4_dual vpx_lpf_horizontal_4_dual_neon - -void vpx_lpf_horizontal_8_c(uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh); -void vpx_lpf_horizontal_8_neon(uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh); -#define vpx_lpf_horizontal_8 vpx_lpf_horizontal_8_neon - -void vpx_lpf_horizontal_8_dual_c(uint8_t *s, int pitch, const uint8_t *blimit0, const uint8_t *limit0, const uint8_t *thresh0, const uint8_t *blimit1, const uint8_t *limit1, const uint8_t *thresh1); -void vpx_lpf_horizontal_8_dual_neon(uint8_t *s, int pitch, const uint8_t *blimit0, const uint8_t *limit0, const uint8_t *thresh0, const uint8_t *blimit1, const uint8_t *limit1, const uint8_t *thresh1); -#define vpx_lpf_horizontal_8_dual vpx_lpf_horizontal_8_dual_neon - -void vpx_lpf_vertical_16_c(uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh); -void vpx_lpf_vertical_16_neon(uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh); -#define vpx_lpf_vertical_16 vpx_lpf_vertical_16_neon - -void vpx_lpf_vertical_16_dual_c(uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh); -void vpx_lpf_vertical_16_dual_neon(uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh); -#define vpx_lpf_vertical_16_dual vpx_lpf_vertical_16_dual_neon - -void vpx_lpf_vertical_4_c(uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh); -void vpx_lpf_vertical_4_neon(uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh); -#define vpx_lpf_vertical_4 vpx_lpf_vertical_4_neon - -void vpx_lpf_vertical_4_dual_c(uint8_t *s, int pitch, const uint8_t *blimit0, const uint8_t *limit0, const uint8_t *thresh0, const uint8_t *blimit1, const uint8_t *limit1, const uint8_t *thresh1); -void vpx_lpf_vertical_4_dual_neon(uint8_t *s, int pitch, const uint8_t *blimit0, const uint8_t *limit0, const uint8_t *thresh0, const uint8_t *blimit1, const uint8_t *limit1, const uint8_t *thresh1); -#define vpx_lpf_vertical_4_dual vpx_lpf_vertical_4_dual_neon - -void vpx_lpf_vertical_8_c(uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh); -void vpx_lpf_vertical_8_neon(uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh); -#define vpx_lpf_vertical_8 vpx_lpf_vertical_8_neon - -void vpx_lpf_vertical_8_dual_c(uint8_t *s, int pitch, const uint8_t *blimit0, const uint8_t *limit0, const uint8_t *thresh0, const uint8_t *blimit1, const uint8_t *limit1, const uint8_t *thresh1); -void vpx_lpf_vertical_8_dual_neon(uint8_t *s, int pitch, const uint8_t *blimit0, const uint8_t *limit0, const uint8_t *thresh0, const uint8_t *blimit1, const uint8_t *limit1, const uint8_t *thresh1); -#define vpx_lpf_vertical_8_dual vpx_lpf_vertical_8_dual_neon - -void vpx_mbpost_proc_across_ip_c(unsigned char *dst, int pitch, int rows, int cols,int flimit); -void vpx_mbpost_proc_across_ip_neon(unsigned char *dst, int pitch, int rows, int cols,int flimit); -#define vpx_mbpost_proc_across_ip vpx_mbpost_proc_across_ip_neon - -void vpx_mbpost_proc_down_c(unsigned char *dst, int pitch, int rows, int cols,int flimit); -void vpx_mbpost_proc_down_neon(unsigned char *dst, int pitch, int rows, int cols,int flimit); -#define vpx_mbpost_proc_down vpx_mbpost_proc_down_neon - -void vpx_minmax_8x8_c(const uint8_t *s, int p, const uint8_t *d, int dp, int *min, int *max); -void vpx_minmax_8x8_neon(const uint8_t *s, int p, const uint8_t *d, int dp, int *min, int *max); -#define vpx_minmax_8x8 vpx_minmax_8x8_neon - -unsigned int vpx_mse16x16_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int recon_stride, unsigned int *sse); -unsigned int vpx_mse16x16_neon(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int recon_stride, unsigned int *sse); -#define vpx_mse16x16 vpx_mse16x16_neon - -unsigned int vpx_mse16x8_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int recon_stride, unsigned int *sse); -#define vpx_mse16x8 vpx_mse16x8_c - -unsigned int vpx_mse8x16_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int recon_stride, unsigned int *sse); -#define vpx_mse8x16 vpx_mse8x16_c - -unsigned int vpx_mse8x8_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int recon_stride, unsigned int *sse); -#define vpx_mse8x8 vpx_mse8x8_c - -void vpx_plane_add_noise_c(uint8_t *start, const int8_t *noise, int blackclamp, int whiteclamp, int width, int height, int pitch); -#define vpx_plane_add_noise vpx_plane_add_noise_c - -void vpx_post_proc_down_and_across_mb_row_c(unsigned char *src, unsigned char *dst, int src_pitch, int dst_pitch, int cols, unsigned char *flimits, int size); -void vpx_post_proc_down_and_across_mb_row_neon(unsigned char *src, unsigned char *dst, int src_pitch, int dst_pitch, int cols, unsigned char *flimits, int size); -#define vpx_post_proc_down_and_across_mb_row vpx_post_proc_down_and_across_mb_row_neon - -void vpx_quantize_b_c(const tran_low_t *coeff_ptr, intptr_t n_coeffs, int skip_block, const int16_t *zbin_ptr, const int16_t *round_ptr, const int16_t *quant_ptr, const int16_t *quant_shift_ptr, tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr, const int16_t *dequant_ptr, uint16_t *eob_ptr, const int16_t *scan, const int16_t *iscan); -#define vpx_quantize_b vpx_quantize_b_c - -void vpx_quantize_b_32x32_c(const tran_low_t *coeff_ptr, intptr_t n_coeffs, int skip_block, const int16_t *zbin_ptr, const int16_t *round_ptr, const int16_t *quant_ptr, const int16_t *quant_shift_ptr, tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr, const int16_t *dequant_ptr, uint16_t *eob_ptr, const int16_t *scan, const int16_t *iscan); -#define vpx_quantize_b_32x32 vpx_quantize_b_32x32_c - -unsigned int vpx_sad16x16_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -unsigned int vpx_sad16x16_neon(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -#define vpx_sad16x16 vpx_sad16x16_neon - -unsigned int vpx_sad16x16_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -#define vpx_sad16x16_avg vpx_sad16x16_avg_c - -void vpx_sad16x16x3_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -#define vpx_sad16x16x3 vpx_sad16x16x3_c - -void vpx_sad16x16x4d_c(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); -void vpx_sad16x16x4d_neon(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); -#define vpx_sad16x16x4d vpx_sad16x16x4d_neon - -void vpx_sad16x16x8_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -#define vpx_sad16x16x8 vpx_sad16x16x8_c - -unsigned int vpx_sad16x32_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -#define vpx_sad16x32 vpx_sad16x32_c - -unsigned int vpx_sad16x32_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -#define vpx_sad16x32_avg vpx_sad16x32_avg_c - -void vpx_sad16x32x4d_c(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); -#define vpx_sad16x32x4d vpx_sad16x32x4d_c - -unsigned int vpx_sad16x8_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -unsigned int vpx_sad16x8_neon(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -#define vpx_sad16x8 vpx_sad16x8_neon - -unsigned int vpx_sad16x8_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -#define vpx_sad16x8_avg vpx_sad16x8_avg_c - -void vpx_sad16x8x3_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -#define vpx_sad16x8x3 vpx_sad16x8x3_c - -void vpx_sad16x8x4d_c(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); -#define vpx_sad16x8x4d vpx_sad16x8x4d_c - -void vpx_sad16x8x8_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -#define vpx_sad16x8x8 vpx_sad16x8x8_c - -unsigned int vpx_sad32x16_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -#define vpx_sad32x16 vpx_sad32x16_c - -unsigned int vpx_sad32x16_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -#define vpx_sad32x16_avg vpx_sad32x16_avg_c - -void vpx_sad32x16x4d_c(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); -#define vpx_sad32x16x4d vpx_sad32x16x4d_c - -unsigned int vpx_sad32x32_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -unsigned int vpx_sad32x32_neon(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -#define vpx_sad32x32 vpx_sad32x32_neon - -unsigned int vpx_sad32x32_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -#define vpx_sad32x32_avg vpx_sad32x32_avg_c - -void vpx_sad32x32x3_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -#define vpx_sad32x32x3 vpx_sad32x32x3_c - -void vpx_sad32x32x4d_c(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); -void vpx_sad32x32x4d_neon(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); -#define vpx_sad32x32x4d vpx_sad32x32x4d_neon - -void vpx_sad32x32x8_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -#define vpx_sad32x32x8 vpx_sad32x32x8_c - -unsigned int vpx_sad32x64_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -#define vpx_sad32x64 vpx_sad32x64_c - -unsigned int vpx_sad32x64_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -#define vpx_sad32x64_avg vpx_sad32x64_avg_c - -void vpx_sad32x64x4d_c(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); -#define vpx_sad32x64x4d vpx_sad32x64x4d_c - -unsigned int vpx_sad4x4_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -unsigned int vpx_sad4x4_neon(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -#define vpx_sad4x4 vpx_sad4x4_neon - -unsigned int vpx_sad4x4_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -#define vpx_sad4x4_avg vpx_sad4x4_avg_c - -void vpx_sad4x4x3_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -#define vpx_sad4x4x3 vpx_sad4x4x3_c - -void vpx_sad4x4x4d_c(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); -#define vpx_sad4x4x4d vpx_sad4x4x4d_c - -void vpx_sad4x4x8_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -#define vpx_sad4x4x8 vpx_sad4x4x8_c - -unsigned int vpx_sad4x8_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -#define vpx_sad4x8 vpx_sad4x8_c - -unsigned int vpx_sad4x8_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -#define vpx_sad4x8_avg vpx_sad4x8_avg_c - -void vpx_sad4x8x4d_c(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); -#define vpx_sad4x8x4d vpx_sad4x8x4d_c - -void vpx_sad4x8x8_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -#define vpx_sad4x8x8 vpx_sad4x8x8_c - -unsigned int vpx_sad64x32_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -#define vpx_sad64x32 vpx_sad64x32_c - -unsigned int vpx_sad64x32_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -#define vpx_sad64x32_avg vpx_sad64x32_avg_c - -void vpx_sad64x32x4d_c(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); -#define vpx_sad64x32x4d vpx_sad64x32x4d_c - -unsigned int vpx_sad64x64_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -unsigned int vpx_sad64x64_neon(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -#define vpx_sad64x64 vpx_sad64x64_neon - -unsigned int vpx_sad64x64_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -#define vpx_sad64x64_avg vpx_sad64x64_avg_c - -void vpx_sad64x64x3_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -#define vpx_sad64x64x3 vpx_sad64x64x3_c - -void vpx_sad64x64x4d_c(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); -void vpx_sad64x64x4d_neon(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); -#define vpx_sad64x64x4d vpx_sad64x64x4d_neon - -void vpx_sad64x64x8_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -#define vpx_sad64x64x8 vpx_sad64x64x8_c - -unsigned int vpx_sad8x16_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -unsigned int vpx_sad8x16_neon(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -#define vpx_sad8x16 vpx_sad8x16_neon - -unsigned int vpx_sad8x16_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -#define vpx_sad8x16_avg vpx_sad8x16_avg_c - -void vpx_sad8x16x3_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -#define vpx_sad8x16x3 vpx_sad8x16x3_c - -void vpx_sad8x16x4d_c(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); -#define vpx_sad8x16x4d vpx_sad8x16x4d_c - -void vpx_sad8x16x8_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -#define vpx_sad8x16x8 vpx_sad8x16x8_c - -unsigned int vpx_sad8x4_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -#define vpx_sad8x4 vpx_sad8x4_c - -unsigned int vpx_sad8x4_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -#define vpx_sad8x4_avg vpx_sad8x4_avg_c - -void vpx_sad8x4x4d_c(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); -#define vpx_sad8x4x4d vpx_sad8x4x4d_c - -void vpx_sad8x4x8_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -#define vpx_sad8x4x8 vpx_sad8x4x8_c - -unsigned int vpx_sad8x8_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -unsigned int vpx_sad8x8_neon(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -#define vpx_sad8x8 vpx_sad8x8_neon - -unsigned int vpx_sad8x8_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -#define vpx_sad8x8_avg vpx_sad8x8_avg_c - -void vpx_sad8x8x3_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -#define vpx_sad8x8x3 vpx_sad8x8x3_c - -void vpx_sad8x8x4d_c(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); -#define vpx_sad8x8x4d vpx_sad8x8x4d_c - -void vpx_sad8x8x8_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -#define vpx_sad8x8x8 vpx_sad8x8x8_c - -int vpx_satd_c(const int16_t *coeff, int length); -int vpx_satd_neon(const int16_t *coeff, int length); -#define vpx_satd vpx_satd_neon - -void vpx_scaled_2d_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -#define vpx_scaled_2d vpx_scaled_2d_c - -void vpx_scaled_avg_2d_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -#define vpx_scaled_avg_2d vpx_scaled_avg_2d_c - -void vpx_scaled_avg_horiz_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -#define vpx_scaled_avg_horiz vpx_scaled_avg_horiz_c - -void vpx_scaled_avg_vert_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -#define vpx_scaled_avg_vert vpx_scaled_avg_vert_c - -void vpx_scaled_horiz_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -#define vpx_scaled_horiz vpx_scaled_horiz_c - -void vpx_scaled_vert_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -#define vpx_scaled_vert vpx_scaled_vert_c - -uint32_t vpx_sub_pixel_avg_variance16x16_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_sub_pixel_avg_variance16x16 vpx_sub_pixel_avg_variance16x16_c - -uint32_t vpx_sub_pixel_avg_variance16x32_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_sub_pixel_avg_variance16x32 vpx_sub_pixel_avg_variance16x32_c - -uint32_t vpx_sub_pixel_avg_variance16x8_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_sub_pixel_avg_variance16x8 vpx_sub_pixel_avg_variance16x8_c - -uint32_t vpx_sub_pixel_avg_variance32x16_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_sub_pixel_avg_variance32x16 vpx_sub_pixel_avg_variance32x16_c - -uint32_t vpx_sub_pixel_avg_variance32x32_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_sub_pixel_avg_variance32x32 vpx_sub_pixel_avg_variance32x32_c - -uint32_t vpx_sub_pixel_avg_variance32x64_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_sub_pixel_avg_variance32x64 vpx_sub_pixel_avg_variance32x64_c - -uint32_t vpx_sub_pixel_avg_variance4x4_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_sub_pixel_avg_variance4x4 vpx_sub_pixel_avg_variance4x4_c - -uint32_t vpx_sub_pixel_avg_variance4x8_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_sub_pixel_avg_variance4x8 vpx_sub_pixel_avg_variance4x8_c - -uint32_t vpx_sub_pixel_avg_variance64x32_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_sub_pixel_avg_variance64x32 vpx_sub_pixel_avg_variance64x32_c - -uint32_t vpx_sub_pixel_avg_variance64x64_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_sub_pixel_avg_variance64x64 vpx_sub_pixel_avg_variance64x64_c - -uint32_t vpx_sub_pixel_avg_variance8x16_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_sub_pixel_avg_variance8x16 vpx_sub_pixel_avg_variance8x16_c - -uint32_t vpx_sub_pixel_avg_variance8x4_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_sub_pixel_avg_variance8x4 vpx_sub_pixel_avg_variance8x4_c - -uint32_t vpx_sub_pixel_avg_variance8x8_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_sub_pixel_avg_variance8x8 vpx_sub_pixel_avg_variance8x8_c - -uint32_t vpx_sub_pixel_variance16x16_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_sub_pixel_variance16x16_neon(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -#define vpx_sub_pixel_variance16x16 vpx_sub_pixel_variance16x16_neon - -uint32_t vpx_sub_pixel_variance16x32_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -#define vpx_sub_pixel_variance16x32 vpx_sub_pixel_variance16x32_c - -uint32_t vpx_sub_pixel_variance16x8_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -#define vpx_sub_pixel_variance16x8 vpx_sub_pixel_variance16x8_c - -uint32_t vpx_sub_pixel_variance32x16_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -#define vpx_sub_pixel_variance32x16 vpx_sub_pixel_variance32x16_c - -uint32_t vpx_sub_pixel_variance32x32_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_sub_pixel_variance32x32_neon(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -#define vpx_sub_pixel_variance32x32 vpx_sub_pixel_variance32x32_neon - -uint32_t vpx_sub_pixel_variance32x64_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -#define vpx_sub_pixel_variance32x64 vpx_sub_pixel_variance32x64_c - -uint32_t vpx_sub_pixel_variance4x4_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -#define vpx_sub_pixel_variance4x4 vpx_sub_pixel_variance4x4_c - -uint32_t vpx_sub_pixel_variance4x8_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -#define vpx_sub_pixel_variance4x8 vpx_sub_pixel_variance4x8_c - -uint32_t vpx_sub_pixel_variance64x32_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -#define vpx_sub_pixel_variance64x32 vpx_sub_pixel_variance64x32_c - -uint32_t vpx_sub_pixel_variance64x64_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_sub_pixel_variance64x64_neon(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -#define vpx_sub_pixel_variance64x64 vpx_sub_pixel_variance64x64_neon - -uint32_t vpx_sub_pixel_variance8x16_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -#define vpx_sub_pixel_variance8x16 vpx_sub_pixel_variance8x16_c - -uint32_t vpx_sub_pixel_variance8x4_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -#define vpx_sub_pixel_variance8x4 vpx_sub_pixel_variance8x4_c - -uint32_t vpx_sub_pixel_variance8x8_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_sub_pixel_variance8x8_neon(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -#define vpx_sub_pixel_variance8x8 vpx_sub_pixel_variance8x8_neon - -void vpx_subtract_block_c(int rows, int cols, int16_t *diff_ptr, ptrdiff_t diff_stride, const uint8_t *src_ptr, ptrdiff_t src_stride, const uint8_t *pred_ptr, ptrdiff_t pred_stride); -void vpx_subtract_block_neon(int rows, int cols, int16_t *diff_ptr, ptrdiff_t diff_stride, const uint8_t *src_ptr, ptrdiff_t src_stride, const uint8_t *pred_ptr, ptrdiff_t pred_stride); -#define vpx_subtract_block vpx_subtract_block_neon - -uint64_t vpx_sum_squares_2d_i16_c(const int16_t *src, int stride, int size); -#define vpx_sum_squares_2d_i16 vpx_sum_squares_2d_i16_c - -void vpx_tm_predictor_16x16_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_tm_predictor_16x16_neon(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_tm_predictor_16x16 vpx_tm_predictor_16x16_neon - -void vpx_tm_predictor_32x32_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_tm_predictor_32x32_neon(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_tm_predictor_32x32 vpx_tm_predictor_32x32_neon - -void vpx_tm_predictor_4x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_tm_predictor_4x4_neon(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_tm_predictor_4x4 vpx_tm_predictor_4x4_neon - -void vpx_tm_predictor_8x8_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_tm_predictor_8x8_neon(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_tm_predictor_8x8 vpx_tm_predictor_8x8_neon - -void vpx_v_predictor_16x16_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_v_predictor_16x16_neon(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_v_predictor_16x16 vpx_v_predictor_16x16_neon - -void vpx_v_predictor_32x32_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_v_predictor_32x32_neon(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_v_predictor_32x32 vpx_v_predictor_32x32_neon - -void vpx_v_predictor_4x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_v_predictor_4x4_neon(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_v_predictor_4x4 vpx_v_predictor_4x4_neon - -void vpx_v_predictor_8x8_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_v_predictor_8x8_neon(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_v_predictor_8x8 vpx_v_predictor_8x8_neon - -unsigned int vpx_variance16x16_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -unsigned int vpx_variance16x16_neon(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_variance16x16 vpx_variance16x16_neon - -unsigned int vpx_variance16x32_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_variance16x32 vpx_variance16x32_c - -unsigned int vpx_variance16x8_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -unsigned int vpx_variance16x8_neon(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_variance16x8 vpx_variance16x8_neon - -unsigned int vpx_variance32x16_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_variance32x16 vpx_variance32x16_c - -unsigned int vpx_variance32x32_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -unsigned int vpx_variance32x32_neon(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_variance32x32 vpx_variance32x32_neon - -unsigned int vpx_variance32x64_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -unsigned int vpx_variance32x64_neon(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_variance32x64 vpx_variance32x64_neon - -unsigned int vpx_variance4x4_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_variance4x4 vpx_variance4x4_c - -unsigned int vpx_variance4x8_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_variance4x8 vpx_variance4x8_c - -unsigned int vpx_variance64x32_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -unsigned int vpx_variance64x32_neon(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_variance64x32 vpx_variance64x32_neon - -unsigned int vpx_variance64x64_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -unsigned int vpx_variance64x64_neon(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_variance64x64 vpx_variance64x64_neon - -unsigned int vpx_variance8x16_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -unsigned int vpx_variance8x16_neon(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_variance8x16 vpx_variance8x16_neon - -unsigned int vpx_variance8x4_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_variance8x4 vpx_variance8x4_c - -unsigned int vpx_variance8x8_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -unsigned int vpx_variance8x8_neon(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_variance8x8 vpx_variance8x8_neon - -void vpx_ve_predictor_4x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_ve_predictor_4x4 vpx_ve_predictor_4x4_c - -int vpx_vector_var_c(const int16_t *ref, const int16_t *src, const int bwl); -int vpx_vector_var_neon(const int16_t *ref, const int16_t *src, const int bwl); -#define vpx_vector_var vpx_vector_var_neon - -void vpx_dsp_rtcd(void); - -#include "vpx_config.h" - -#ifdef RTCD_C -#include "vpx_ports/arm.h" -static void setup_rtcd_internal(void) -{ - int flags = arm_cpu_caps(); - - (void)flags; - -} -#endif - -#ifdef __cplusplus -} // extern "C" -#endif - -#endif diff --git a/WebRtc.NET/include/third_party/libvpx/source/config/ios/arm-neon/vpx_scale_rtcd.h b/WebRtc.NET/include/third_party/libvpx/source/config/ios/arm-neon/vpx_scale_rtcd.h deleted file mode 100644 index a1564b7a..00000000 --- a/WebRtc.NET/include/third_party/libvpx/source/config/ios/arm-neon/vpx_scale_rtcd.h +++ /dev/null @@ -1,71 +0,0 @@ -#ifndef VPX_SCALE_RTCD_H_ -#define VPX_SCALE_RTCD_H_ - -#ifdef RTCD_C -#define RTCD_EXTERN -#else -#define RTCD_EXTERN extern -#endif - -struct yv12_buffer_config; - -#ifdef __cplusplus -extern "C" { -#endif - -void vp8_horizontal_line_2_1_scale_c(const unsigned char *source, unsigned int source_width, unsigned char *dest, unsigned int dest_width); -#define vp8_horizontal_line_2_1_scale vp8_horizontal_line_2_1_scale_c - -void vp8_horizontal_line_5_3_scale_c(const unsigned char *source, unsigned int source_width, unsigned char *dest, unsigned int dest_width); -#define vp8_horizontal_line_5_3_scale vp8_horizontal_line_5_3_scale_c - -void vp8_horizontal_line_5_4_scale_c(const unsigned char *source, unsigned int source_width, unsigned char *dest, unsigned int dest_width); -#define vp8_horizontal_line_5_4_scale vp8_horizontal_line_5_4_scale_c - -void vp8_vertical_band_2_1_scale_c(unsigned char *source, unsigned int src_pitch, unsigned char *dest, unsigned int dest_pitch, unsigned int dest_width); -#define vp8_vertical_band_2_1_scale vp8_vertical_band_2_1_scale_c - -void vp8_vertical_band_2_1_scale_i_c(unsigned char *source, unsigned int src_pitch, unsigned char *dest, unsigned int dest_pitch, unsigned int dest_width); -#define vp8_vertical_band_2_1_scale_i vp8_vertical_band_2_1_scale_i_c - -void vp8_vertical_band_5_3_scale_c(unsigned char *source, unsigned int src_pitch, unsigned char *dest, unsigned int dest_pitch, unsigned int dest_width); -#define vp8_vertical_band_5_3_scale vp8_vertical_band_5_3_scale_c - -void vp8_vertical_band_5_4_scale_c(unsigned char *source, unsigned int src_pitch, unsigned char *dest, unsigned int dest_pitch, unsigned int dest_width); -#define vp8_vertical_band_5_4_scale vp8_vertical_band_5_4_scale_c - -void vp8_yv12_copy_frame_c(const struct yv12_buffer_config *src_ybc, struct yv12_buffer_config *dst_ybc); -#define vp8_yv12_copy_frame vp8_yv12_copy_frame_c - -void vp8_yv12_extend_frame_borders_c(struct yv12_buffer_config *ybf); -#define vp8_yv12_extend_frame_borders vp8_yv12_extend_frame_borders_c - -void vpx_extend_frame_borders_c(struct yv12_buffer_config *ybf); -#define vpx_extend_frame_borders vpx_extend_frame_borders_c - -void vpx_extend_frame_inner_borders_c(struct yv12_buffer_config *ybf); -#define vpx_extend_frame_inner_borders vpx_extend_frame_inner_borders_c - -void vpx_yv12_copy_y_c(const struct yv12_buffer_config *src_ybc, struct yv12_buffer_config *dst_ybc); -#define vpx_yv12_copy_y vpx_yv12_copy_y_c - -void vpx_scale_rtcd(void); - -#include "vpx_config.h" - -#ifdef RTCD_C -#include "vpx_ports/arm.h" -static void setup_rtcd_internal(void) -{ - int flags = arm_cpu_caps(); - - (void)flags; - -} -#endif - -#ifdef __cplusplus -} // extern "C" -#endif - -#endif diff --git a/WebRtc.NET/include/third_party/libvpx/source/config/ios/arm64/vp8_rtcd.h b/WebRtc.NET/include/third_party/libvpx/source/config/ios/arm64/vp8_rtcd.h deleted file mode 100644 index 6a7f92ca..00000000 --- a/WebRtc.NET/include/third_party/libvpx/source/config/ios/arm64/vp8_rtcd.h +++ /dev/null @@ -1,218 +0,0 @@ -#ifndef VP8_RTCD_H_ -#define VP8_RTCD_H_ - -#ifdef RTCD_C -#define RTCD_EXTERN -#else -#define RTCD_EXTERN extern -#endif - -/* - * VP8 - */ - -struct blockd; -struct macroblockd; -struct loop_filter_info; - -/* Encoder forward decls */ -struct block; -struct macroblock; -struct variance_vtable; -union int_mv; -struct yv12_buffer_config; - -#ifdef __cplusplus -extern "C" { -#endif - -void vp8_bilinear_predict16x16_c(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch); -void vp8_bilinear_predict16x16_neon(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch); -#define vp8_bilinear_predict16x16 vp8_bilinear_predict16x16_neon - -void vp8_bilinear_predict4x4_c(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch); -void vp8_bilinear_predict4x4_neon(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch); -#define vp8_bilinear_predict4x4 vp8_bilinear_predict4x4_neon - -void vp8_bilinear_predict8x4_c(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch); -void vp8_bilinear_predict8x4_neon(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch); -#define vp8_bilinear_predict8x4 vp8_bilinear_predict8x4_neon - -void vp8_bilinear_predict8x8_c(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch); -void vp8_bilinear_predict8x8_neon(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch); -#define vp8_bilinear_predict8x8 vp8_bilinear_predict8x8_neon - -void vp8_blend_b_c(unsigned char *y, unsigned char *u, unsigned char *v, int y1, int u1, int v1, int alpha, int stride); -#define vp8_blend_b vp8_blend_b_c - -void vp8_blend_mb_inner_c(unsigned char *y, unsigned char *u, unsigned char *v, int y1, int u1, int v1, int alpha, int stride); -#define vp8_blend_mb_inner vp8_blend_mb_inner_c - -void vp8_blend_mb_outer_c(unsigned char *y, unsigned char *u, unsigned char *v, int y1, int u1, int v1, int alpha, int stride); -#define vp8_blend_mb_outer vp8_blend_mb_outer_c - -int vp8_block_error_c(short *coeff, short *dqcoeff); -#define vp8_block_error vp8_block_error_c - -void vp8_copy_mem16x16_c(unsigned char *src, int src_pitch, unsigned char *dst, int dst_pitch); -void vp8_copy_mem16x16_neon(unsigned char *src, int src_pitch, unsigned char *dst, int dst_pitch); -#define vp8_copy_mem16x16 vp8_copy_mem16x16_neon - -void vp8_copy_mem8x4_c(unsigned char *src, int src_pitch, unsigned char *dst, int dst_pitch); -void vp8_copy_mem8x4_neon(unsigned char *src, int src_pitch, unsigned char *dst, int dst_pitch); -#define vp8_copy_mem8x4 vp8_copy_mem8x4_neon - -void vp8_copy_mem8x8_c(unsigned char *src, int src_pitch, unsigned char *dst, int dst_pitch); -void vp8_copy_mem8x8_neon(unsigned char *src, int src_pitch, unsigned char *dst, int dst_pitch); -#define vp8_copy_mem8x8 vp8_copy_mem8x8_neon - -void vp8_dc_only_idct_add_c(short input, unsigned char *pred, int pred_stride, unsigned char *dst, int dst_stride); -void vp8_dc_only_idct_add_neon(short input, unsigned char *pred, int pred_stride, unsigned char *dst, int dst_stride); -#define vp8_dc_only_idct_add vp8_dc_only_idct_add_neon - -int vp8_denoiser_filter_c(unsigned char *mc_running_avg_y, int mc_avg_y_stride, unsigned char *running_avg_y, int avg_y_stride, unsigned char *sig, int sig_stride, unsigned int motion_magnitude, int increase_denoising); -int vp8_denoiser_filter_neon(unsigned char *mc_running_avg_y, int mc_avg_y_stride, unsigned char *running_avg_y, int avg_y_stride, unsigned char *sig, int sig_stride, unsigned int motion_magnitude, int increase_denoising); -#define vp8_denoiser_filter vp8_denoiser_filter_neon - -int vp8_denoiser_filter_uv_c(unsigned char *mc_running_avg, int mc_avg_stride, unsigned char *running_avg, int avg_stride, unsigned char *sig, int sig_stride, unsigned int motion_magnitude, int increase_denoising); -int vp8_denoiser_filter_uv_neon(unsigned char *mc_running_avg, int mc_avg_stride, unsigned char *running_avg, int avg_stride, unsigned char *sig, int sig_stride, unsigned int motion_magnitude, int increase_denoising); -#define vp8_denoiser_filter_uv vp8_denoiser_filter_uv_neon - -void vp8_dequant_idct_add_c(short *input, short *dq, unsigned char *output, int stride); -void vp8_dequant_idct_add_neon(short *input, short *dq, unsigned char *output, int stride); -#define vp8_dequant_idct_add vp8_dequant_idct_add_neon - -void vp8_dequant_idct_add_uv_block_c(short *q, short *dq, unsigned char *dst_u, unsigned char *dst_v, int stride, char *eobs); -void vp8_dequant_idct_add_uv_block_neon(short *q, short *dq, unsigned char *dst_u, unsigned char *dst_v, int stride, char *eobs); -#define vp8_dequant_idct_add_uv_block vp8_dequant_idct_add_uv_block_neon - -void vp8_dequant_idct_add_y_block_c(short *q, short *dq, unsigned char *dst, int stride, char *eobs); -void vp8_dequant_idct_add_y_block_neon(short *q, short *dq, unsigned char *dst, int stride, char *eobs); -#define vp8_dequant_idct_add_y_block vp8_dequant_idct_add_y_block_neon - -void vp8_dequantize_b_c(struct blockd*, short *dqc); -void vp8_dequantize_b_neon(struct blockd*, short *dqc); -#define vp8_dequantize_b vp8_dequantize_b_neon - -int vp8_diamond_search_sad_c(struct macroblock *x, struct block *b, struct blockd *d, union int_mv *ref_mv, union int_mv *best_mv, int search_param, int sad_per_bit, int *num00, struct variance_vtable *fn_ptr, int *mvcost[2], union int_mv *center_mv); -#define vp8_diamond_search_sad vp8_diamond_search_sad_c - -void vp8_fast_quantize_b_c(struct block *, struct blockd *); -void vp8_fast_quantize_b_neon(struct block *, struct blockd *); -#define vp8_fast_quantize_b vp8_fast_quantize_b_neon - -void vp8_filter_by_weight16x16_c(unsigned char *src, int src_stride, unsigned char *dst, int dst_stride, int src_weight); -#define vp8_filter_by_weight16x16 vp8_filter_by_weight16x16_c - -void vp8_filter_by_weight4x4_c(unsigned char *src, int src_stride, unsigned char *dst, int dst_stride, int src_weight); -#define vp8_filter_by_weight4x4 vp8_filter_by_weight4x4_c - -void vp8_filter_by_weight8x8_c(unsigned char *src, int src_stride, unsigned char *dst, int dst_stride, int src_weight); -#define vp8_filter_by_weight8x8 vp8_filter_by_weight8x8_c - -int vp8_full_search_sad_c(struct macroblock *x, struct block *b, struct blockd *d, union int_mv *ref_mv, int sad_per_bit, int distance, struct variance_vtable *fn_ptr, int *mvcost[2], union int_mv *center_mv); -#define vp8_full_search_sad vp8_full_search_sad_c - -void vp8_loop_filter_bh_c(unsigned char *y, unsigned char *u, unsigned char *v, int ystride, int uv_stride, struct loop_filter_info *lfi); -void vp8_loop_filter_bh_neon(unsigned char *y, unsigned char *u, unsigned char *v, int ystride, int uv_stride, struct loop_filter_info *lfi); -#define vp8_loop_filter_bh vp8_loop_filter_bh_neon - -void vp8_loop_filter_bv_c(unsigned char *y, unsigned char *u, unsigned char *v, int ystride, int uv_stride, struct loop_filter_info *lfi); -void vp8_loop_filter_bv_neon(unsigned char *y, unsigned char *u, unsigned char *v, int ystride, int uv_stride, struct loop_filter_info *lfi); -#define vp8_loop_filter_bv vp8_loop_filter_bv_neon - -void vp8_loop_filter_mbh_c(unsigned char *y, unsigned char *u, unsigned char *v, int ystride, int uv_stride, struct loop_filter_info *lfi); -void vp8_loop_filter_mbh_neon(unsigned char *y, unsigned char *u, unsigned char *v, int ystride, int uv_stride, struct loop_filter_info *lfi); -#define vp8_loop_filter_mbh vp8_loop_filter_mbh_neon - -void vp8_loop_filter_mbv_c(unsigned char *y, unsigned char *u, unsigned char *v, int ystride, int uv_stride, struct loop_filter_info *lfi); -void vp8_loop_filter_mbv_neon(unsigned char *y, unsigned char *u, unsigned char *v, int ystride, int uv_stride, struct loop_filter_info *lfi); -#define vp8_loop_filter_mbv vp8_loop_filter_mbv_neon - -void vp8_loop_filter_bhs_c(unsigned char *y, int ystride, const unsigned char *blimit); -void vp8_loop_filter_bhs_neon(unsigned char *y, int ystride, const unsigned char *blimit); -#define vp8_loop_filter_simple_bh vp8_loop_filter_bhs_neon - -void vp8_loop_filter_bvs_c(unsigned char *y, int ystride, const unsigned char *blimit); -void vp8_loop_filter_bvs_neon(unsigned char *y, int ystride, const unsigned char *blimit); -#define vp8_loop_filter_simple_bv vp8_loop_filter_bvs_neon - -void vp8_loop_filter_simple_horizontal_edge_c(unsigned char *y, int ystride, const unsigned char *blimit); -void vp8_loop_filter_mbhs_neon(unsigned char *y, int ystride, const unsigned char *blimit); -#define vp8_loop_filter_simple_mbh vp8_loop_filter_mbhs_neon - -void vp8_loop_filter_simple_vertical_edge_c(unsigned char *y, int ystride, const unsigned char *blimit); -void vp8_loop_filter_mbvs_neon(unsigned char *y, int ystride, const unsigned char *blimit); -#define vp8_loop_filter_simple_mbv vp8_loop_filter_mbvs_neon - -int vp8_mbblock_error_c(struct macroblock *mb, int dc); -#define vp8_mbblock_error vp8_mbblock_error_c - -int vp8_mbuverror_c(struct macroblock *mb); -#define vp8_mbuverror vp8_mbuverror_c - -int vp8_refining_search_sad_c(struct macroblock *x, struct block *b, struct blockd *d, union int_mv *ref_mv, int sad_per_bit, int distance, struct variance_vtable *fn_ptr, int *mvcost[2], union int_mv *center_mv); -#define vp8_refining_search_sad vp8_refining_search_sad_c - -void vp8_regular_quantize_b_c(struct block *, struct blockd *); -#define vp8_regular_quantize_b vp8_regular_quantize_b_c - -void vp8_short_fdct4x4_c(short *input, short *output, int pitch); -void vp8_short_fdct4x4_neon(short *input, short *output, int pitch); -#define vp8_short_fdct4x4 vp8_short_fdct4x4_neon - -void vp8_short_fdct8x4_c(short *input, short *output, int pitch); -void vp8_short_fdct8x4_neon(short *input, short *output, int pitch); -#define vp8_short_fdct8x4 vp8_short_fdct8x4_neon - -void vp8_short_idct4x4llm_c(short *input, unsigned char *pred, int pitch, unsigned char *dst, int dst_stride); -void vp8_short_idct4x4llm_neon(short *input, unsigned char *pred, int pitch, unsigned char *dst, int dst_stride); -#define vp8_short_idct4x4llm vp8_short_idct4x4llm_neon - -void vp8_short_inv_walsh4x4_c(short *input, short *output); -void vp8_short_inv_walsh4x4_neon(short *input, short *output); -#define vp8_short_inv_walsh4x4 vp8_short_inv_walsh4x4_neon - -void vp8_short_inv_walsh4x4_1_c(short *input, short *output); -#define vp8_short_inv_walsh4x4_1 vp8_short_inv_walsh4x4_1_c - -void vp8_short_walsh4x4_c(short *input, short *output, int pitch); -void vp8_short_walsh4x4_neon(short *input, short *output, int pitch); -#define vp8_short_walsh4x4 vp8_short_walsh4x4_neon - -void vp8_sixtap_predict16x16_c(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch); -void vp8_sixtap_predict16x16_neon(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch); -#define vp8_sixtap_predict16x16 vp8_sixtap_predict16x16_neon - -void vp8_sixtap_predict4x4_c(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch); -void vp8_sixtap_predict4x4_neon(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch); -#define vp8_sixtap_predict4x4 vp8_sixtap_predict4x4_neon - -void vp8_sixtap_predict8x4_c(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch); -void vp8_sixtap_predict8x4_neon(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch); -#define vp8_sixtap_predict8x4 vp8_sixtap_predict8x4_neon - -void vp8_sixtap_predict8x8_c(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch); -void vp8_sixtap_predict8x8_neon(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch); -#define vp8_sixtap_predict8x8 vp8_sixtap_predict8x8_neon - -void vp8_rtcd(void); - -#include "vpx_config.h" - -#ifdef RTCD_C -#include "vpx_ports/arm.h" -static void setup_rtcd_internal(void) -{ - int flags = arm_cpu_caps(); - - (void)flags; - -} -#endif - -#ifdef __cplusplus -} // extern "C" -#endif - -#endif diff --git a/WebRtc.NET/include/third_party/libvpx/source/config/ios/arm64/vp9_rtcd.h b/WebRtc.NET/include/third_party/libvpx/source/config/ios/arm64/vp9_rtcd.h deleted file mode 100644 index d07bcaa3..00000000 --- a/WebRtc.NET/include/third_party/libvpx/source/config/ios/arm64/vp9_rtcd.h +++ /dev/null @@ -1,113 +0,0 @@ -#ifndef VP9_RTCD_H_ -#define VP9_RTCD_H_ - -#ifdef RTCD_C -#define RTCD_EXTERN -#else -#define RTCD_EXTERN extern -#endif - -/* - * VP9 - */ - -#include "vpx/vpx_integer.h" -#include "vp9/common/vp9_common.h" -#include "vp9/common/vp9_enums.h" - -struct macroblockd; - -/* Encoder forward decls */ -struct macroblock; -struct vp9_variance_vtable; -struct search_site_config; -struct mv; -union int_mv; -struct yv12_buffer_config; - -#ifdef __cplusplus -extern "C" { -#endif - -int64_t vp9_block_error_c(const tran_low_t *coeff, const tran_low_t *dqcoeff, intptr_t block_size, int64_t *ssz); -#define vp9_block_error vp9_block_error_c - -int64_t vp9_block_error_fp_c(const int16_t *coeff, const int16_t *dqcoeff, int block_size); -int64_t vp9_block_error_fp_neon(const int16_t *coeff, const int16_t *dqcoeff, int block_size); -#define vp9_block_error_fp vp9_block_error_fp_neon - -int vp9_denoiser_filter_c(const uint8_t *sig, int sig_stride, const uint8_t *mc_avg, int mc_avg_stride, uint8_t *avg, int avg_stride, int increase_denoising, BLOCK_SIZE bs, int motion_magnitude); -#define vp9_denoiser_filter vp9_denoiser_filter_c - -int vp9_diamond_search_sad_c(const struct macroblock *x, const struct search_site_config *cfg, struct mv *ref_mv, struct mv *best_mv, int search_param, int sad_per_bit, int *num00, const struct vp9_variance_vtable *fn_ptr, const struct mv *center_mv); -#define vp9_diamond_search_sad vp9_diamond_search_sad_c - -void vp9_fdct8x8_quant_c(const int16_t *input, int stride, tran_low_t *coeff_ptr, intptr_t n_coeffs, int skip_block, const int16_t *zbin_ptr, const int16_t *round_ptr, const int16_t *quant_ptr, const int16_t *quant_shift_ptr, tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr, const int16_t *dequant_ptr, uint16_t *eob_ptr, const int16_t *scan, const int16_t *iscan); -void vp9_fdct8x8_quant_neon(const int16_t *input, int stride, tran_low_t *coeff_ptr, intptr_t n_coeffs, int skip_block, const int16_t *zbin_ptr, const int16_t *round_ptr, const int16_t *quant_ptr, const int16_t *quant_shift_ptr, tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr, const int16_t *dequant_ptr, uint16_t *eob_ptr, const int16_t *scan, const int16_t *iscan); -#define vp9_fdct8x8_quant vp9_fdct8x8_quant_neon - -void vp9_fht16x16_c(const int16_t *input, tran_low_t *output, int stride, int tx_type); -#define vp9_fht16x16 vp9_fht16x16_c - -void vp9_fht4x4_c(const int16_t *input, tran_low_t *output, int stride, int tx_type); -#define vp9_fht4x4 vp9_fht4x4_c - -void vp9_fht8x8_c(const int16_t *input, tran_low_t *output, int stride, int tx_type); -#define vp9_fht8x8 vp9_fht8x8_c - -void vp9_filter_by_weight16x16_c(const uint8_t *src, int src_stride, uint8_t *dst, int dst_stride, int src_weight); -#define vp9_filter_by_weight16x16 vp9_filter_by_weight16x16_c - -void vp9_filter_by_weight8x8_c(const uint8_t *src, int src_stride, uint8_t *dst, int dst_stride, int src_weight); -#define vp9_filter_by_weight8x8 vp9_filter_by_weight8x8_c - -int vp9_full_search_sad_c(const struct macroblock *x, const struct mv *ref_mv, int sad_per_bit, int distance, const struct vp9_variance_vtable *fn_ptr, const struct mv *center_mv, struct mv *best_mv); -#define vp9_full_search_sad vp9_full_search_sad_c - -void vp9_fwht4x4_c(const int16_t *input, tran_low_t *output, int stride); -#define vp9_fwht4x4 vp9_fwht4x4_c - -void vp9_iht16x16_256_add_c(const tran_low_t *input, uint8_t *output, int pitch, int tx_type); -#define vp9_iht16x16_256_add vp9_iht16x16_256_add_c - -void vp9_iht4x4_16_add_c(const tran_low_t *input, uint8_t *dest, int stride, int tx_type); -void vp9_iht4x4_16_add_neon(const tran_low_t *input, uint8_t *dest, int stride, int tx_type); -#define vp9_iht4x4_16_add vp9_iht4x4_16_add_neon - -void vp9_iht8x8_64_add_c(const tran_low_t *input, uint8_t *dest, int stride, int tx_type); -void vp9_iht8x8_64_add_neon(const tran_low_t *input, uint8_t *dest, int stride, int tx_type); -#define vp9_iht8x8_64_add vp9_iht8x8_64_add_neon - -void vp9_quantize_fp_c(const tran_low_t *coeff_ptr, intptr_t n_coeffs, int skip_block, const int16_t *zbin_ptr, const int16_t *round_ptr, const int16_t *quant_ptr, const int16_t *quant_shift_ptr, tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr, const int16_t *dequant_ptr, uint16_t *eob_ptr, const int16_t *scan, const int16_t *iscan); -void vp9_quantize_fp_neon(const tran_low_t *coeff_ptr, intptr_t n_coeffs, int skip_block, const int16_t *zbin_ptr, const int16_t *round_ptr, const int16_t *quant_ptr, const int16_t *quant_shift_ptr, tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr, const int16_t *dequant_ptr, uint16_t *eob_ptr, const int16_t *scan, const int16_t *iscan); -#define vp9_quantize_fp vp9_quantize_fp_neon - -void vp9_quantize_fp_32x32_c(const tran_low_t *coeff_ptr, intptr_t n_coeffs, int skip_block, const int16_t *zbin_ptr, const int16_t *round_ptr, const int16_t *quant_ptr, const int16_t *quant_shift_ptr, tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr, const int16_t *dequant_ptr, uint16_t *eob_ptr, const int16_t *scan, const int16_t *iscan); -#define vp9_quantize_fp_32x32 vp9_quantize_fp_32x32_c - -void vp9_scale_and_extend_frame_c(const struct yv12_buffer_config *src, struct yv12_buffer_config *dst); -#define vp9_scale_and_extend_frame vp9_scale_and_extend_frame_c - -void vp9_temporal_filter_apply_c(uint8_t *frame1, unsigned int stride, uint8_t *frame2, unsigned int block_width, unsigned int block_height, int strength, int filter_weight, unsigned int *accumulator, uint16_t *count); -#define vp9_temporal_filter_apply vp9_temporal_filter_apply_c - -void vp9_rtcd(void); - -#include "vpx_config.h" - -#ifdef RTCD_C -#include "vpx_ports/arm.h" -static void setup_rtcd_internal(void) -{ - int flags = arm_cpu_caps(); - - (void)flags; - -} -#endif - -#ifdef __cplusplus -} // extern "C" -#endif - -#endif diff --git a/WebRtc.NET/include/third_party/libvpx/source/config/ios/arm64/vpx_config.h b/WebRtc.NET/include/third_party/libvpx/source/config/ios/arm64/vpx_config.h deleted file mode 100644 index 9a9ecb4d..00000000 --- a/WebRtc.NET/include/third_party/libvpx/source/config/ios/arm64/vpx_config.h +++ /dev/null @@ -1,94 +0,0 @@ -/* Copyright (c) 2011 The WebM project authors. All Rights Reserved. */ -/* */ -/* Use of this source code is governed by a BSD-style license */ -/* that can be found in the LICENSE file in the root of the source */ -/* tree. An additional intellectual property rights grant can be found */ -/* in the file PATENTS. All contributing project authors may */ -/* be found in the AUTHORS file in the root of the source tree. */ -/* This file automatically generated by configure. Do not edit! */ -#ifndef VPX_CONFIG_H -#define VPX_CONFIG_H -#define RESTRICT -#define INLINE inline -#define ARCH_ARM 1 -#define ARCH_MIPS 0 -#define ARCH_X86 0 -#define ARCH_X86_64 0 -#define HAVE_NEON 1 -#define HAVE_NEON_ASM 0 -#define HAVE_MIPS32 0 -#define HAVE_DSPR2 0 -#define HAVE_MSA 0 -#define HAVE_MIPS64 0 -#define HAVE_MMX 0 -#define HAVE_SSE 0 -#define HAVE_SSE2 0 -#define HAVE_SSE3 0 -#define HAVE_SSSE3 0 -#define HAVE_SSE4_1 0 -#define HAVE_AVX 0 -#define HAVE_AVX2 0 -#define HAVE_VPX_PORTS 1 -#define HAVE_PTHREAD_H 1 -#define HAVE_UNISTD_H 0 -#define CONFIG_DEPENDENCY_TRACKING 1 -#define CONFIG_EXTERNAL_BUILD 1 -#define CONFIG_INSTALL_DOCS 0 -#define CONFIG_INSTALL_BINS 1 -#define CONFIG_INSTALL_LIBS 1 -#define CONFIG_INSTALL_SRCS 0 -#define CONFIG_DEBUG 0 -#define CONFIG_GPROF 0 -#define CONFIG_GCOV 0 -#define CONFIG_RVCT 0 -#define CONFIG_GCC 1 -#define CONFIG_MSVS 0 -#define CONFIG_PIC 0 -#define CONFIG_BIG_ENDIAN 0 -#define CONFIG_CODEC_SRCS 0 -#define CONFIG_DEBUG_LIBS 0 -#define CONFIG_DEQUANT_TOKENS 0 -#define CONFIG_DC_RECON 0 -#define CONFIG_RUNTIME_CPU_DETECT 0 -#define CONFIG_POSTPROC 1 -#define CONFIG_VP9_POSTPROC 1 -#define CONFIG_MULTITHREAD 1 -#define CONFIG_INTERNAL_STATS 0 -#define CONFIG_VP8_ENCODER 1 -#define CONFIG_VP8_DECODER 1 -#define CONFIG_VP9_ENCODER 1 -#define CONFIG_VP9_DECODER 1 -#define CONFIG_VP8 1 -#define CONFIG_VP9 1 -#define CONFIG_ENCODERS 1 -#define CONFIG_DECODERS 1 -#define CONFIG_STATIC_MSVCRT 0 -#define CONFIG_SPATIAL_RESAMPLING 1 -#define CONFIG_REALTIME_ONLY 1 -#define CONFIG_ONTHEFLY_BITPACKING 0 -#define CONFIG_ERROR_CONCEALMENT 0 -#define CONFIG_SHARED 0 -#define CONFIG_STATIC 1 -#define CONFIG_SMALL 0 -#define CONFIG_POSTPROC_VISUALIZER 0 -#define CONFIG_OS_SUPPORT 1 -#define CONFIG_UNIT_TESTS 1 -#define CONFIG_WEBM_IO 1 -#define CONFIG_LIBYUV 1 -#define CONFIG_DECODE_PERF_TESTS 0 -#define CONFIG_ENCODE_PERF_TESTS 0 -#define CONFIG_MULTI_RES_ENCODING 1 -#define CONFIG_TEMPORAL_DENOISING 1 -#define CONFIG_VP9_TEMPORAL_DENOISING 1 -#define CONFIG_COEFFICIENT_RANGE_CHECKING 0 -#define CONFIG_VP9_HIGHBITDEPTH 0 -#define CONFIG_BETTER_HW_COMPATIBILITY 0 -#define CONFIG_EXPERIMENTAL 0 -#define CONFIG_SIZE_LIMIT 1 -#define CONFIG_SPATIAL_SVC 0 -#define CONFIG_FP_MB_STATS 0 -#define CONFIG_EMULATE_HARDWARE 0 -#define CONFIG_MISC_FIXES 0 -#define DECODE_WIDTH_LIMIT 16384 -#define DECODE_HEIGHT_LIMIT 16384 -#endif /* VPX_CONFIG_H */ diff --git a/WebRtc.NET/include/third_party/libvpx/source/config/ios/arm64/vpx_dsp_rtcd.h b/WebRtc.NET/include/third_party/libvpx/source/config/ios/arm64/vpx_dsp_rtcd.h deleted file mode 100644 index c9d867d0..00000000 --- a/WebRtc.NET/include/third_party/libvpx/source/config/ios/arm64/vpx_dsp_rtcd.h +++ /dev/null @@ -1,858 +0,0 @@ -#ifndef VPX_DSP_RTCD_H_ -#define VPX_DSP_RTCD_H_ - -#ifdef RTCD_C -#define RTCD_EXTERN -#else -#define RTCD_EXTERN extern -#endif - -/* - * DSP - */ - -#include "vpx/vpx_integer.h" -#include "vpx_dsp/vpx_dsp_common.h" - - -#ifdef __cplusplus -extern "C" { -#endif - -unsigned int vpx_avg_4x4_c(const uint8_t *, int p); -unsigned int vpx_avg_4x4_neon(const uint8_t *, int p); -#define vpx_avg_4x4 vpx_avg_4x4_neon - -unsigned int vpx_avg_8x8_c(const uint8_t *, int p); -unsigned int vpx_avg_8x8_neon(const uint8_t *, int p); -#define vpx_avg_8x8 vpx_avg_8x8_neon - -void vpx_comp_avg_pred_c(uint8_t *comp_pred, const uint8_t *pred, int width, int height, const uint8_t *ref, int ref_stride); -#define vpx_comp_avg_pred vpx_comp_avg_pred_c - -void vpx_convolve8_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -void vpx_convolve8_neon(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -#define vpx_convolve8 vpx_convolve8_neon - -void vpx_convolve8_avg_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -void vpx_convolve8_avg_neon(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -#define vpx_convolve8_avg vpx_convolve8_avg_neon - -void vpx_convolve8_avg_horiz_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -void vpx_convolve8_avg_horiz_neon(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -#define vpx_convolve8_avg_horiz vpx_convolve8_avg_horiz_neon - -void vpx_convolve8_avg_vert_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -void vpx_convolve8_avg_vert_neon(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -#define vpx_convolve8_avg_vert vpx_convolve8_avg_vert_neon - -void vpx_convolve8_horiz_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -void vpx_convolve8_horiz_neon(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -#define vpx_convolve8_horiz vpx_convolve8_horiz_neon - -void vpx_convolve8_vert_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -void vpx_convolve8_vert_neon(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -#define vpx_convolve8_vert vpx_convolve8_vert_neon - -void vpx_convolve_avg_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -void vpx_convolve_avg_neon(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -#define vpx_convolve_avg vpx_convolve_avg_neon - -void vpx_convolve_copy_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -void vpx_convolve_copy_neon(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -#define vpx_convolve_copy vpx_convolve_copy_neon - -void vpx_d117_predictor_16x16_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d117_predictor_16x16 vpx_d117_predictor_16x16_c - -void vpx_d117_predictor_32x32_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d117_predictor_32x32 vpx_d117_predictor_32x32_c - -void vpx_d117_predictor_4x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d117_predictor_4x4 vpx_d117_predictor_4x4_c - -void vpx_d117_predictor_8x8_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d117_predictor_8x8 vpx_d117_predictor_8x8_c - -void vpx_d135_predictor_16x16_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_d135_predictor_16x16_neon(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d135_predictor_16x16 vpx_d135_predictor_16x16_neon - -void vpx_d135_predictor_32x32_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_d135_predictor_32x32_neon(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d135_predictor_32x32 vpx_d135_predictor_32x32_neon - -void vpx_d135_predictor_4x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_d135_predictor_4x4_neon(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d135_predictor_4x4 vpx_d135_predictor_4x4_neon - -void vpx_d135_predictor_8x8_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_d135_predictor_8x8_neon(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d135_predictor_8x8 vpx_d135_predictor_8x8_neon - -void vpx_d153_predictor_16x16_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d153_predictor_16x16 vpx_d153_predictor_16x16_c - -void vpx_d153_predictor_32x32_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d153_predictor_32x32 vpx_d153_predictor_32x32_c - -void vpx_d153_predictor_4x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d153_predictor_4x4 vpx_d153_predictor_4x4_c - -void vpx_d153_predictor_8x8_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d153_predictor_8x8 vpx_d153_predictor_8x8_c - -void vpx_d207_predictor_16x16_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d207_predictor_16x16 vpx_d207_predictor_16x16_c - -void vpx_d207_predictor_32x32_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d207_predictor_32x32 vpx_d207_predictor_32x32_c - -void vpx_d207_predictor_4x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d207_predictor_4x4 vpx_d207_predictor_4x4_c - -void vpx_d207_predictor_8x8_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d207_predictor_8x8 vpx_d207_predictor_8x8_c - -void vpx_d207e_predictor_16x16_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d207e_predictor_16x16 vpx_d207e_predictor_16x16_c - -void vpx_d207e_predictor_32x32_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d207e_predictor_32x32 vpx_d207e_predictor_32x32_c - -void vpx_d207e_predictor_4x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d207e_predictor_4x4 vpx_d207e_predictor_4x4_c - -void vpx_d207e_predictor_8x8_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d207e_predictor_8x8 vpx_d207e_predictor_8x8_c - -void vpx_d45_predictor_16x16_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_d45_predictor_16x16_neon(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d45_predictor_16x16 vpx_d45_predictor_16x16_neon - -void vpx_d45_predictor_32x32_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_d45_predictor_32x32_neon(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d45_predictor_32x32 vpx_d45_predictor_32x32_neon - -void vpx_d45_predictor_4x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_d45_predictor_4x4_neon(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d45_predictor_4x4 vpx_d45_predictor_4x4_neon - -void vpx_d45_predictor_8x8_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_d45_predictor_8x8_neon(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d45_predictor_8x8 vpx_d45_predictor_8x8_neon - -void vpx_d45e_predictor_16x16_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d45e_predictor_16x16 vpx_d45e_predictor_16x16_c - -void vpx_d45e_predictor_32x32_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d45e_predictor_32x32 vpx_d45e_predictor_32x32_c - -void vpx_d45e_predictor_4x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d45e_predictor_4x4 vpx_d45e_predictor_4x4_c - -void vpx_d45e_predictor_8x8_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d45e_predictor_8x8 vpx_d45e_predictor_8x8_c - -void vpx_d63_predictor_16x16_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d63_predictor_16x16 vpx_d63_predictor_16x16_c - -void vpx_d63_predictor_32x32_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d63_predictor_32x32 vpx_d63_predictor_32x32_c - -void vpx_d63_predictor_4x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d63_predictor_4x4 vpx_d63_predictor_4x4_c - -void vpx_d63_predictor_8x8_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d63_predictor_8x8 vpx_d63_predictor_8x8_c - -void vpx_d63e_predictor_16x16_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d63e_predictor_16x16 vpx_d63e_predictor_16x16_c - -void vpx_d63e_predictor_32x32_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d63e_predictor_32x32 vpx_d63e_predictor_32x32_c - -void vpx_d63e_predictor_4x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d63e_predictor_4x4 vpx_d63e_predictor_4x4_c - -void vpx_d63e_predictor_8x8_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d63e_predictor_8x8 vpx_d63e_predictor_8x8_c - -void vpx_d63f_predictor_4x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d63f_predictor_4x4 vpx_d63f_predictor_4x4_c - -void vpx_dc_128_predictor_16x16_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_dc_128_predictor_16x16_neon(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_dc_128_predictor_16x16 vpx_dc_128_predictor_16x16_neon - -void vpx_dc_128_predictor_32x32_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_dc_128_predictor_32x32_neon(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_dc_128_predictor_32x32 vpx_dc_128_predictor_32x32_neon - -void vpx_dc_128_predictor_4x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_dc_128_predictor_4x4_neon(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_dc_128_predictor_4x4 vpx_dc_128_predictor_4x4_neon - -void vpx_dc_128_predictor_8x8_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_dc_128_predictor_8x8_neon(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_dc_128_predictor_8x8 vpx_dc_128_predictor_8x8_neon - -void vpx_dc_left_predictor_16x16_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_dc_left_predictor_16x16_neon(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_dc_left_predictor_16x16 vpx_dc_left_predictor_16x16_neon - -void vpx_dc_left_predictor_32x32_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_dc_left_predictor_32x32_neon(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_dc_left_predictor_32x32 vpx_dc_left_predictor_32x32_neon - -void vpx_dc_left_predictor_4x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_dc_left_predictor_4x4_neon(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_dc_left_predictor_4x4 vpx_dc_left_predictor_4x4_neon - -void vpx_dc_left_predictor_8x8_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_dc_left_predictor_8x8_neon(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_dc_left_predictor_8x8 vpx_dc_left_predictor_8x8_neon - -void vpx_dc_predictor_16x16_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_dc_predictor_16x16_neon(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_dc_predictor_16x16 vpx_dc_predictor_16x16_neon - -void vpx_dc_predictor_32x32_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_dc_predictor_32x32_neon(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_dc_predictor_32x32 vpx_dc_predictor_32x32_neon - -void vpx_dc_predictor_4x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_dc_predictor_4x4_neon(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_dc_predictor_4x4 vpx_dc_predictor_4x4_neon - -void vpx_dc_predictor_8x8_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_dc_predictor_8x8_neon(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_dc_predictor_8x8 vpx_dc_predictor_8x8_neon - -void vpx_dc_top_predictor_16x16_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_dc_top_predictor_16x16_neon(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_dc_top_predictor_16x16 vpx_dc_top_predictor_16x16_neon - -void vpx_dc_top_predictor_32x32_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_dc_top_predictor_32x32_neon(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_dc_top_predictor_32x32 vpx_dc_top_predictor_32x32_neon - -void vpx_dc_top_predictor_4x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_dc_top_predictor_4x4_neon(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_dc_top_predictor_4x4 vpx_dc_top_predictor_4x4_neon - -void vpx_dc_top_predictor_8x8_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_dc_top_predictor_8x8_neon(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_dc_top_predictor_8x8 vpx_dc_top_predictor_8x8_neon - -void vpx_fdct16x16_c(const int16_t *input, tran_low_t *output, int stride); -#define vpx_fdct16x16 vpx_fdct16x16_c - -void vpx_fdct16x16_1_c(const int16_t *input, tran_low_t *output, int stride); -#define vpx_fdct16x16_1 vpx_fdct16x16_1_c - -void vpx_fdct32x32_c(const int16_t *input, tran_low_t *output, int stride); -#define vpx_fdct32x32 vpx_fdct32x32_c - -void vpx_fdct32x32_1_c(const int16_t *input, tran_low_t *output, int stride); -#define vpx_fdct32x32_1 vpx_fdct32x32_1_c - -void vpx_fdct32x32_rd_c(const int16_t *input, tran_low_t *output, int stride); -#define vpx_fdct32x32_rd vpx_fdct32x32_rd_c - -void vpx_fdct4x4_c(const int16_t *input, tran_low_t *output, int stride); -#define vpx_fdct4x4 vpx_fdct4x4_c - -void vpx_fdct4x4_1_c(const int16_t *input, tran_low_t *output, int stride); -#define vpx_fdct4x4_1 vpx_fdct4x4_1_c - -void vpx_fdct8x8_c(const int16_t *input, tran_low_t *output, int stride); -void vpx_fdct8x8_neon(const int16_t *input, tran_low_t *output, int stride); -#define vpx_fdct8x8 vpx_fdct8x8_neon - -void vpx_fdct8x8_1_c(const int16_t *input, tran_low_t *output, int stride); -void vpx_fdct8x8_1_neon(const int16_t *input, tran_low_t *output, int stride); -#define vpx_fdct8x8_1 vpx_fdct8x8_1_neon - -void vpx_get16x16var_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse, int *sum); -void vpx_get16x16var_neon(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse, int *sum); -#define vpx_get16x16var vpx_get16x16var_neon - -unsigned int vpx_get4x4sse_cs_c(const unsigned char *src_ptr, int source_stride, const unsigned char *ref_ptr, int ref_stride); -unsigned int vpx_get4x4sse_cs_neon(const unsigned char *src_ptr, int source_stride, const unsigned char *ref_ptr, int ref_stride); -#define vpx_get4x4sse_cs vpx_get4x4sse_cs_neon - -void vpx_get8x8var_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse, int *sum); -void vpx_get8x8var_neon(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse, int *sum); -#define vpx_get8x8var vpx_get8x8var_neon - -unsigned int vpx_get_mb_ss_c(const int16_t *); -#define vpx_get_mb_ss vpx_get_mb_ss_c - -void vpx_h_predictor_16x16_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_h_predictor_16x16_neon(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_h_predictor_16x16 vpx_h_predictor_16x16_neon - -void vpx_h_predictor_32x32_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_h_predictor_32x32_neon(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_h_predictor_32x32 vpx_h_predictor_32x32_neon - -void vpx_h_predictor_4x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_h_predictor_4x4_neon(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_h_predictor_4x4 vpx_h_predictor_4x4_neon - -void vpx_h_predictor_8x8_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_h_predictor_8x8_neon(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_h_predictor_8x8 vpx_h_predictor_8x8_neon - -void vpx_hadamard_16x16_c(const int16_t *src_diff, int src_stride, int16_t *coeff); -void vpx_hadamard_16x16_neon(const int16_t *src_diff, int src_stride, int16_t *coeff); -#define vpx_hadamard_16x16 vpx_hadamard_16x16_neon - -void vpx_hadamard_8x8_c(const int16_t *src_diff, int src_stride, int16_t *coeff); -void vpx_hadamard_8x8_neon(const int16_t *src_diff, int src_stride, int16_t *coeff); -#define vpx_hadamard_8x8 vpx_hadamard_8x8_neon - -void vpx_he_predictor_4x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_he_predictor_4x4 vpx_he_predictor_4x4_c - -void vpx_idct16x16_10_add_c(const tran_low_t *input, uint8_t *dest, int stride); -void vpx_idct16x16_10_add_neon(const tran_low_t *input, uint8_t *dest, int stride); -#define vpx_idct16x16_10_add vpx_idct16x16_10_add_neon - -void vpx_idct16x16_1_add_c(const tran_low_t *input, uint8_t *dest, int stride); -void vpx_idct16x16_1_add_neon(const tran_low_t *input, uint8_t *dest, int stride); -#define vpx_idct16x16_1_add vpx_idct16x16_1_add_neon - -void vpx_idct16x16_256_add_c(const tran_low_t *input, uint8_t *dest, int stride); -void vpx_idct16x16_256_add_neon(const tran_low_t *input, uint8_t *dest, int stride); -#define vpx_idct16x16_256_add vpx_idct16x16_256_add_neon - -void vpx_idct32x32_1024_add_c(const tran_low_t *input, uint8_t *dest, int stride); -void vpx_idct32x32_1024_add_neon(const tran_low_t *input, uint8_t *dest, int stride); -#define vpx_idct32x32_1024_add vpx_idct32x32_1024_add_neon - -void vpx_idct32x32_135_add_c(const tran_low_t *input, uint8_t *dest, int stride); -void vpx_idct32x32_135_add_neon(const tran_low_t *input, uint8_t *dest, int stride); -#define vpx_idct32x32_135_add vpx_idct32x32_135_add_neon - -void vpx_idct32x32_1_add_c(const tran_low_t *input, uint8_t *dest, int stride); -void vpx_idct32x32_1_add_neon(const tran_low_t *input, uint8_t *dest, int stride); -#define vpx_idct32x32_1_add vpx_idct32x32_1_add_neon - -void vpx_idct32x32_34_add_c(const tran_low_t *input, uint8_t *dest, int stride); -void vpx_idct32x32_34_add_neon(const tran_low_t *input, uint8_t *dest, int stride); -#define vpx_idct32x32_34_add vpx_idct32x32_34_add_neon - -void vpx_idct4x4_16_add_c(const tran_low_t *input, uint8_t *dest, int stride); -void vpx_idct4x4_16_add_neon(const tran_low_t *input, uint8_t *dest, int stride); -#define vpx_idct4x4_16_add vpx_idct4x4_16_add_neon - -void vpx_idct4x4_1_add_c(const tran_low_t *input, uint8_t *dest, int stride); -void vpx_idct4x4_1_add_neon(const tran_low_t *input, uint8_t *dest, int stride); -#define vpx_idct4x4_1_add vpx_idct4x4_1_add_neon - -void vpx_idct8x8_12_add_c(const tran_low_t *input, uint8_t *dest, int stride); -void vpx_idct8x8_12_add_neon(const tran_low_t *input, uint8_t *dest, int stride); -#define vpx_idct8x8_12_add vpx_idct8x8_12_add_neon - -void vpx_idct8x8_1_add_c(const tran_low_t *input, uint8_t *dest, int stride); -void vpx_idct8x8_1_add_neon(const tran_low_t *input, uint8_t *dest, int stride); -#define vpx_idct8x8_1_add vpx_idct8x8_1_add_neon - -void vpx_idct8x8_64_add_c(const tran_low_t *input, uint8_t *dest, int stride); -void vpx_idct8x8_64_add_neon(const tran_low_t *input, uint8_t *dest, int stride); -#define vpx_idct8x8_64_add vpx_idct8x8_64_add_neon - -int16_t vpx_int_pro_col_c(const uint8_t *ref, const int width); -int16_t vpx_int_pro_col_neon(const uint8_t *ref, const int width); -#define vpx_int_pro_col vpx_int_pro_col_neon - -void vpx_int_pro_row_c(int16_t *hbuf, const uint8_t *ref, const int ref_stride, const int height); -void vpx_int_pro_row_neon(int16_t *hbuf, const uint8_t *ref, const int ref_stride, const int height); -#define vpx_int_pro_row vpx_int_pro_row_neon - -void vpx_iwht4x4_16_add_c(const tran_low_t *input, uint8_t *dest, int stride); -#define vpx_iwht4x4_16_add vpx_iwht4x4_16_add_c - -void vpx_iwht4x4_1_add_c(const tran_low_t *input, uint8_t *dest, int stride); -#define vpx_iwht4x4_1_add vpx_iwht4x4_1_add_c - -void vpx_lpf_horizontal_16_c(uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh); -void vpx_lpf_horizontal_16_neon(uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh); -#define vpx_lpf_horizontal_16 vpx_lpf_horizontal_16_neon - -void vpx_lpf_horizontal_16_dual_c(uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh); -void vpx_lpf_horizontal_16_dual_neon(uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh); -#define vpx_lpf_horizontal_16_dual vpx_lpf_horizontal_16_dual_neon - -void vpx_lpf_horizontal_4_c(uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh); -void vpx_lpf_horizontal_4_neon(uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh); -#define vpx_lpf_horizontal_4 vpx_lpf_horizontal_4_neon - -void vpx_lpf_horizontal_4_dual_c(uint8_t *s, int pitch, const uint8_t *blimit0, const uint8_t *limit0, const uint8_t *thresh0, const uint8_t *blimit1, const uint8_t *limit1, const uint8_t *thresh1); -void vpx_lpf_horizontal_4_dual_neon(uint8_t *s, int pitch, const uint8_t *blimit0, const uint8_t *limit0, const uint8_t *thresh0, const uint8_t *blimit1, const uint8_t *limit1, const uint8_t *thresh1); -#define vpx_lpf_horizontal_4_dual vpx_lpf_horizontal_4_dual_neon - -void vpx_lpf_horizontal_8_c(uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh); -void vpx_lpf_horizontal_8_neon(uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh); -#define vpx_lpf_horizontal_8 vpx_lpf_horizontal_8_neon - -void vpx_lpf_horizontal_8_dual_c(uint8_t *s, int pitch, const uint8_t *blimit0, const uint8_t *limit0, const uint8_t *thresh0, const uint8_t *blimit1, const uint8_t *limit1, const uint8_t *thresh1); -void vpx_lpf_horizontal_8_dual_neon(uint8_t *s, int pitch, const uint8_t *blimit0, const uint8_t *limit0, const uint8_t *thresh0, const uint8_t *blimit1, const uint8_t *limit1, const uint8_t *thresh1); -#define vpx_lpf_horizontal_8_dual vpx_lpf_horizontal_8_dual_neon - -void vpx_lpf_vertical_16_c(uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh); -void vpx_lpf_vertical_16_neon(uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh); -#define vpx_lpf_vertical_16 vpx_lpf_vertical_16_neon - -void vpx_lpf_vertical_16_dual_c(uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh); -void vpx_lpf_vertical_16_dual_neon(uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh); -#define vpx_lpf_vertical_16_dual vpx_lpf_vertical_16_dual_neon - -void vpx_lpf_vertical_4_c(uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh); -void vpx_lpf_vertical_4_neon(uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh); -#define vpx_lpf_vertical_4 vpx_lpf_vertical_4_neon - -void vpx_lpf_vertical_4_dual_c(uint8_t *s, int pitch, const uint8_t *blimit0, const uint8_t *limit0, const uint8_t *thresh0, const uint8_t *blimit1, const uint8_t *limit1, const uint8_t *thresh1); -void vpx_lpf_vertical_4_dual_neon(uint8_t *s, int pitch, const uint8_t *blimit0, const uint8_t *limit0, const uint8_t *thresh0, const uint8_t *blimit1, const uint8_t *limit1, const uint8_t *thresh1); -#define vpx_lpf_vertical_4_dual vpx_lpf_vertical_4_dual_neon - -void vpx_lpf_vertical_8_c(uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh); -void vpx_lpf_vertical_8_neon(uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh); -#define vpx_lpf_vertical_8 vpx_lpf_vertical_8_neon - -void vpx_lpf_vertical_8_dual_c(uint8_t *s, int pitch, const uint8_t *blimit0, const uint8_t *limit0, const uint8_t *thresh0, const uint8_t *blimit1, const uint8_t *limit1, const uint8_t *thresh1); -void vpx_lpf_vertical_8_dual_neon(uint8_t *s, int pitch, const uint8_t *blimit0, const uint8_t *limit0, const uint8_t *thresh0, const uint8_t *blimit1, const uint8_t *limit1, const uint8_t *thresh1); -#define vpx_lpf_vertical_8_dual vpx_lpf_vertical_8_dual_neon - -void vpx_mbpost_proc_across_ip_c(unsigned char *dst, int pitch, int rows, int cols,int flimit); -void vpx_mbpost_proc_across_ip_neon(unsigned char *dst, int pitch, int rows, int cols,int flimit); -#define vpx_mbpost_proc_across_ip vpx_mbpost_proc_across_ip_neon - -void vpx_mbpost_proc_down_c(unsigned char *dst, int pitch, int rows, int cols,int flimit); -void vpx_mbpost_proc_down_neon(unsigned char *dst, int pitch, int rows, int cols,int flimit); -#define vpx_mbpost_proc_down vpx_mbpost_proc_down_neon - -void vpx_minmax_8x8_c(const uint8_t *s, int p, const uint8_t *d, int dp, int *min, int *max); -void vpx_minmax_8x8_neon(const uint8_t *s, int p, const uint8_t *d, int dp, int *min, int *max); -#define vpx_minmax_8x8 vpx_minmax_8x8_neon - -unsigned int vpx_mse16x16_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int recon_stride, unsigned int *sse); -unsigned int vpx_mse16x16_neon(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int recon_stride, unsigned int *sse); -#define vpx_mse16x16 vpx_mse16x16_neon - -unsigned int vpx_mse16x8_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int recon_stride, unsigned int *sse); -#define vpx_mse16x8 vpx_mse16x8_c - -unsigned int vpx_mse8x16_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int recon_stride, unsigned int *sse); -#define vpx_mse8x16 vpx_mse8x16_c - -unsigned int vpx_mse8x8_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int recon_stride, unsigned int *sse); -#define vpx_mse8x8 vpx_mse8x8_c - -void vpx_plane_add_noise_c(uint8_t *start, const int8_t *noise, int blackclamp, int whiteclamp, int width, int height, int pitch); -#define vpx_plane_add_noise vpx_plane_add_noise_c - -void vpx_post_proc_down_and_across_mb_row_c(unsigned char *src, unsigned char *dst, int src_pitch, int dst_pitch, int cols, unsigned char *flimits, int size); -void vpx_post_proc_down_and_across_mb_row_neon(unsigned char *src, unsigned char *dst, int src_pitch, int dst_pitch, int cols, unsigned char *flimits, int size); -#define vpx_post_proc_down_and_across_mb_row vpx_post_proc_down_and_across_mb_row_neon - -void vpx_quantize_b_c(const tran_low_t *coeff_ptr, intptr_t n_coeffs, int skip_block, const int16_t *zbin_ptr, const int16_t *round_ptr, const int16_t *quant_ptr, const int16_t *quant_shift_ptr, tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr, const int16_t *dequant_ptr, uint16_t *eob_ptr, const int16_t *scan, const int16_t *iscan); -#define vpx_quantize_b vpx_quantize_b_c - -void vpx_quantize_b_32x32_c(const tran_low_t *coeff_ptr, intptr_t n_coeffs, int skip_block, const int16_t *zbin_ptr, const int16_t *round_ptr, const int16_t *quant_ptr, const int16_t *quant_shift_ptr, tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr, const int16_t *dequant_ptr, uint16_t *eob_ptr, const int16_t *scan, const int16_t *iscan); -#define vpx_quantize_b_32x32 vpx_quantize_b_32x32_c - -unsigned int vpx_sad16x16_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -unsigned int vpx_sad16x16_neon(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -#define vpx_sad16x16 vpx_sad16x16_neon - -unsigned int vpx_sad16x16_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -#define vpx_sad16x16_avg vpx_sad16x16_avg_c - -void vpx_sad16x16x3_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -#define vpx_sad16x16x3 vpx_sad16x16x3_c - -void vpx_sad16x16x4d_c(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); -void vpx_sad16x16x4d_neon(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); -#define vpx_sad16x16x4d vpx_sad16x16x4d_neon - -void vpx_sad16x16x8_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -#define vpx_sad16x16x8 vpx_sad16x16x8_c - -unsigned int vpx_sad16x32_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -#define vpx_sad16x32 vpx_sad16x32_c - -unsigned int vpx_sad16x32_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -#define vpx_sad16x32_avg vpx_sad16x32_avg_c - -void vpx_sad16x32x4d_c(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); -#define vpx_sad16x32x4d vpx_sad16x32x4d_c - -unsigned int vpx_sad16x8_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -unsigned int vpx_sad16x8_neon(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -#define vpx_sad16x8 vpx_sad16x8_neon - -unsigned int vpx_sad16x8_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -#define vpx_sad16x8_avg vpx_sad16x8_avg_c - -void vpx_sad16x8x3_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -#define vpx_sad16x8x3 vpx_sad16x8x3_c - -void vpx_sad16x8x4d_c(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); -#define vpx_sad16x8x4d vpx_sad16x8x4d_c - -void vpx_sad16x8x8_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -#define vpx_sad16x8x8 vpx_sad16x8x8_c - -unsigned int vpx_sad32x16_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -#define vpx_sad32x16 vpx_sad32x16_c - -unsigned int vpx_sad32x16_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -#define vpx_sad32x16_avg vpx_sad32x16_avg_c - -void vpx_sad32x16x4d_c(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); -#define vpx_sad32x16x4d vpx_sad32x16x4d_c - -unsigned int vpx_sad32x32_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -unsigned int vpx_sad32x32_neon(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -#define vpx_sad32x32 vpx_sad32x32_neon - -unsigned int vpx_sad32x32_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -#define vpx_sad32x32_avg vpx_sad32x32_avg_c - -void vpx_sad32x32x3_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -#define vpx_sad32x32x3 vpx_sad32x32x3_c - -void vpx_sad32x32x4d_c(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); -void vpx_sad32x32x4d_neon(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); -#define vpx_sad32x32x4d vpx_sad32x32x4d_neon - -void vpx_sad32x32x8_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -#define vpx_sad32x32x8 vpx_sad32x32x8_c - -unsigned int vpx_sad32x64_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -#define vpx_sad32x64 vpx_sad32x64_c - -unsigned int vpx_sad32x64_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -#define vpx_sad32x64_avg vpx_sad32x64_avg_c - -void vpx_sad32x64x4d_c(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); -#define vpx_sad32x64x4d vpx_sad32x64x4d_c - -unsigned int vpx_sad4x4_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -unsigned int vpx_sad4x4_neon(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -#define vpx_sad4x4 vpx_sad4x4_neon - -unsigned int vpx_sad4x4_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -#define vpx_sad4x4_avg vpx_sad4x4_avg_c - -void vpx_sad4x4x3_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -#define vpx_sad4x4x3 vpx_sad4x4x3_c - -void vpx_sad4x4x4d_c(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); -#define vpx_sad4x4x4d vpx_sad4x4x4d_c - -void vpx_sad4x4x8_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -#define vpx_sad4x4x8 vpx_sad4x4x8_c - -unsigned int vpx_sad4x8_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -#define vpx_sad4x8 vpx_sad4x8_c - -unsigned int vpx_sad4x8_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -#define vpx_sad4x8_avg vpx_sad4x8_avg_c - -void vpx_sad4x8x4d_c(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); -#define vpx_sad4x8x4d vpx_sad4x8x4d_c - -void vpx_sad4x8x8_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -#define vpx_sad4x8x8 vpx_sad4x8x8_c - -unsigned int vpx_sad64x32_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -#define vpx_sad64x32 vpx_sad64x32_c - -unsigned int vpx_sad64x32_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -#define vpx_sad64x32_avg vpx_sad64x32_avg_c - -void vpx_sad64x32x4d_c(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); -#define vpx_sad64x32x4d vpx_sad64x32x4d_c - -unsigned int vpx_sad64x64_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -unsigned int vpx_sad64x64_neon(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -#define vpx_sad64x64 vpx_sad64x64_neon - -unsigned int vpx_sad64x64_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -#define vpx_sad64x64_avg vpx_sad64x64_avg_c - -void vpx_sad64x64x3_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -#define vpx_sad64x64x3 vpx_sad64x64x3_c - -void vpx_sad64x64x4d_c(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); -void vpx_sad64x64x4d_neon(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); -#define vpx_sad64x64x4d vpx_sad64x64x4d_neon - -void vpx_sad64x64x8_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -#define vpx_sad64x64x8 vpx_sad64x64x8_c - -unsigned int vpx_sad8x16_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -unsigned int vpx_sad8x16_neon(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -#define vpx_sad8x16 vpx_sad8x16_neon - -unsigned int vpx_sad8x16_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -#define vpx_sad8x16_avg vpx_sad8x16_avg_c - -void vpx_sad8x16x3_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -#define vpx_sad8x16x3 vpx_sad8x16x3_c - -void vpx_sad8x16x4d_c(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); -#define vpx_sad8x16x4d vpx_sad8x16x4d_c - -void vpx_sad8x16x8_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -#define vpx_sad8x16x8 vpx_sad8x16x8_c - -unsigned int vpx_sad8x4_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -#define vpx_sad8x4 vpx_sad8x4_c - -unsigned int vpx_sad8x4_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -#define vpx_sad8x4_avg vpx_sad8x4_avg_c - -void vpx_sad8x4x4d_c(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); -#define vpx_sad8x4x4d vpx_sad8x4x4d_c - -void vpx_sad8x4x8_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -#define vpx_sad8x4x8 vpx_sad8x4x8_c - -unsigned int vpx_sad8x8_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -unsigned int vpx_sad8x8_neon(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -#define vpx_sad8x8 vpx_sad8x8_neon - -unsigned int vpx_sad8x8_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -#define vpx_sad8x8_avg vpx_sad8x8_avg_c - -void vpx_sad8x8x3_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -#define vpx_sad8x8x3 vpx_sad8x8x3_c - -void vpx_sad8x8x4d_c(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); -#define vpx_sad8x8x4d vpx_sad8x8x4d_c - -void vpx_sad8x8x8_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -#define vpx_sad8x8x8 vpx_sad8x8x8_c - -int vpx_satd_c(const int16_t *coeff, int length); -int vpx_satd_neon(const int16_t *coeff, int length); -#define vpx_satd vpx_satd_neon - -void vpx_scaled_2d_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -#define vpx_scaled_2d vpx_scaled_2d_c - -void vpx_scaled_avg_2d_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -#define vpx_scaled_avg_2d vpx_scaled_avg_2d_c - -void vpx_scaled_avg_horiz_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -#define vpx_scaled_avg_horiz vpx_scaled_avg_horiz_c - -void vpx_scaled_avg_vert_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -#define vpx_scaled_avg_vert vpx_scaled_avg_vert_c - -void vpx_scaled_horiz_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -#define vpx_scaled_horiz vpx_scaled_horiz_c - -void vpx_scaled_vert_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -#define vpx_scaled_vert vpx_scaled_vert_c - -uint32_t vpx_sub_pixel_avg_variance16x16_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_sub_pixel_avg_variance16x16 vpx_sub_pixel_avg_variance16x16_c - -uint32_t vpx_sub_pixel_avg_variance16x32_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_sub_pixel_avg_variance16x32 vpx_sub_pixel_avg_variance16x32_c - -uint32_t vpx_sub_pixel_avg_variance16x8_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_sub_pixel_avg_variance16x8 vpx_sub_pixel_avg_variance16x8_c - -uint32_t vpx_sub_pixel_avg_variance32x16_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_sub_pixel_avg_variance32x16 vpx_sub_pixel_avg_variance32x16_c - -uint32_t vpx_sub_pixel_avg_variance32x32_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_sub_pixel_avg_variance32x32 vpx_sub_pixel_avg_variance32x32_c - -uint32_t vpx_sub_pixel_avg_variance32x64_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_sub_pixel_avg_variance32x64 vpx_sub_pixel_avg_variance32x64_c - -uint32_t vpx_sub_pixel_avg_variance4x4_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_sub_pixel_avg_variance4x4 vpx_sub_pixel_avg_variance4x4_c - -uint32_t vpx_sub_pixel_avg_variance4x8_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_sub_pixel_avg_variance4x8 vpx_sub_pixel_avg_variance4x8_c - -uint32_t vpx_sub_pixel_avg_variance64x32_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_sub_pixel_avg_variance64x32 vpx_sub_pixel_avg_variance64x32_c - -uint32_t vpx_sub_pixel_avg_variance64x64_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_sub_pixel_avg_variance64x64 vpx_sub_pixel_avg_variance64x64_c - -uint32_t vpx_sub_pixel_avg_variance8x16_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_sub_pixel_avg_variance8x16 vpx_sub_pixel_avg_variance8x16_c - -uint32_t vpx_sub_pixel_avg_variance8x4_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_sub_pixel_avg_variance8x4 vpx_sub_pixel_avg_variance8x4_c - -uint32_t vpx_sub_pixel_avg_variance8x8_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_sub_pixel_avg_variance8x8 vpx_sub_pixel_avg_variance8x8_c - -uint32_t vpx_sub_pixel_variance16x16_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_sub_pixel_variance16x16_neon(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -#define vpx_sub_pixel_variance16x16 vpx_sub_pixel_variance16x16_neon - -uint32_t vpx_sub_pixel_variance16x32_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -#define vpx_sub_pixel_variance16x32 vpx_sub_pixel_variance16x32_c - -uint32_t vpx_sub_pixel_variance16x8_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -#define vpx_sub_pixel_variance16x8 vpx_sub_pixel_variance16x8_c - -uint32_t vpx_sub_pixel_variance32x16_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -#define vpx_sub_pixel_variance32x16 vpx_sub_pixel_variance32x16_c - -uint32_t vpx_sub_pixel_variance32x32_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_sub_pixel_variance32x32_neon(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -#define vpx_sub_pixel_variance32x32 vpx_sub_pixel_variance32x32_neon - -uint32_t vpx_sub_pixel_variance32x64_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -#define vpx_sub_pixel_variance32x64 vpx_sub_pixel_variance32x64_c - -uint32_t vpx_sub_pixel_variance4x4_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -#define vpx_sub_pixel_variance4x4 vpx_sub_pixel_variance4x4_c - -uint32_t vpx_sub_pixel_variance4x8_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -#define vpx_sub_pixel_variance4x8 vpx_sub_pixel_variance4x8_c - -uint32_t vpx_sub_pixel_variance64x32_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -#define vpx_sub_pixel_variance64x32 vpx_sub_pixel_variance64x32_c - -uint32_t vpx_sub_pixel_variance64x64_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_sub_pixel_variance64x64_neon(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -#define vpx_sub_pixel_variance64x64 vpx_sub_pixel_variance64x64_neon - -uint32_t vpx_sub_pixel_variance8x16_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -#define vpx_sub_pixel_variance8x16 vpx_sub_pixel_variance8x16_c - -uint32_t vpx_sub_pixel_variance8x4_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -#define vpx_sub_pixel_variance8x4 vpx_sub_pixel_variance8x4_c - -uint32_t vpx_sub_pixel_variance8x8_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_sub_pixel_variance8x8_neon(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -#define vpx_sub_pixel_variance8x8 vpx_sub_pixel_variance8x8_neon - -void vpx_subtract_block_c(int rows, int cols, int16_t *diff_ptr, ptrdiff_t diff_stride, const uint8_t *src_ptr, ptrdiff_t src_stride, const uint8_t *pred_ptr, ptrdiff_t pred_stride); -void vpx_subtract_block_neon(int rows, int cols, int16_t *diff_ptr, ptrdiff_t diff_stride, const uint8_t *src_ptr, ptrdiff_t src_stride, const uint8_t *pred_ptr, ptrdiff_t pred_stride); -#define vpx_subtract_block vpx_subtract_block_neon - -uint64_t vpx_sum_squares_2d_i16_c(const int16_t *src, int stride, int size); -#define vpx_sum_squares_2d_i16 vpx_sum_squares_2d_i16_c - -void vpx_tm_predictor_16x16_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_tm_predictor_16x16_neon(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_tm_predictor_16x16 vpx_tm_predictor_16x16_neon - -void vpx_tm_predictor_32x32_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_tm_predictor_32x32_neon(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_tm_predictor_32x32 vpx_tm_predictor_32x32_neon - -void vpx_tm_predictor_4x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_tm_predictor_4x4_neon(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_tm_predictor_4x4 vpx_tm_predictor_4x4_neon - -void vpx_tm_predictor_8x8_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_tm_predictor_8x8_neon(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_tm_predictor_8x8 vpx_tm_predictor_8x8_neon - -void vpx_v_predictor_16x16_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_v_predictor_16x16_neon(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_v_predictor_16x16 vpx_v_predictor_16x16_neon - -void vpx_v_predictor_32x32_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_v_predictor_32x32_neon(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_v_predictor_32x32 vpx_v_predictor_32x32_neon - -void vpx_v_predictor_4x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_v_predictor_4x4_neon(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_v_predictor_4x4 vpx_v_predictor_4x4_neon - -void vpx_v_predictor_8x8_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_v_predictor_8x8_neon(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_v_predictor_8x8 vpx_v_predictor_8x8_neon - -unsigned int vpx_variance16x16_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -unsigned int vpx_variance16x16_neon(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_variance16x16 vpx_variance16x16_neon - -unsigned int vpx_variance16x32_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_variance16x32 vpx_variance16x32_c - -unsigned int vpx_variance16x8_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -unsigned int vpx_variance16x8_neon(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_variance16x8 vpx_variance16x8_neon - -unsigned int vpx_variance32x16_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_variance32x16 vpx_variance32x16_c - -unsigned int vpx_variance32x32_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -unsigned int vpx_variance32x32_neon(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_variance32x32 vpx_variance32x32_neon - -unsigned int vpx_variance32x64_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -unsigned int vpx_variance32x64_neon(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_variance32x64 vpx_variance32x64_neon - -unsigned int vpx_variance4x4_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_variance4x4 vpx_variance4x4_c - -unsigned int vpx_variance4x8_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_variance4x8 vpx_variance4x8_c - -unsigned int vpx_variance64x32_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -unsigned int vpx_variance64x32_neon(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_variance64x32 vpx_variance64x32_neon - -unsigned int vpx_variance64x64_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -unsigned int vpx_variance64x64_neon(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_variance64x64 vpx_variance64x64_neon - -unsigned int vpx_variance8x16_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -unsigned int vpx_variance8x16_neon(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_variance8x16 vpx_variance8x16_neon - -unsigned int vpx_variance8x4_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_variance8x4 vpx_variance8x4_c - -unsigned int vpx_variance8x8_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -unsigned int vpx_variance8x8_neon(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_variance8x8 vpx_variance8x8_neon - -void vpx_ve_predictor_4x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_ve_predictor_4x4 vpx_ve_predictor_4x4_c - -int vpx_vector_var_c(const int16_t *ref, const int16_t *src, const int bwl); -int vpx_vector_var_neon(const int16_t *ref, const int16_t *src, const int bwl); -#define vpx_vector_var vpx_vector_var_neon - -void vpx_dsp_rtcd(void); - -#include "vpx_config.h" - -#ifdef RTCD_C -#include "vpx_ports/arm.h" -static void setup_rtcd_internal(void) -{ - int flags = arm_cpu_caps(); - - (void)flags; - -} -#endif - -#ifdef __cplusplus -} // extern "C" -#endif - -#endif diff --git a/WebRtc.NET/include/third_party/libvpx/source/config/ios/arm64/vpx_scale_rtcd.h b/WebRtc.NET/include/third_party/libvpx/source/config/ios/arm64/vpx_scale_rtcd.h deleted file mode 100644 index a1564b7a..00000000 --- a/WebRtc.NET/include/third_party/libvpx/source/config/ios/arm64/vpx_scale_rtcd.h +++ /dev/null @@ -1,71 +0,0 @@ -#ifndef VPX_SCALE_RTCD_H_ -#define VPX_SCALE_RTCD_H_ - -#ifdef RTCD_C -#define RTCD_EXTERN -#else -#define RTCD_EXTERN extern -#endif - -struct yv12_buffer_config; - -#ifdef __cplusplus -extern "C" { -#endif - -void vp8_horizontal_line_2_1_scale_c(const unsigned char *source, unsigned int source_width, unsigned char *dest, unsigned int dest_width); -#define vp8_horizontal_line_2_1_scale vp8_horizontal_line_2_1_scale_c - -void vp8_horizontal_line_5_3_scale_c(const unsigned char *source, unsigned int source_width, unsigned char *dest, unsigned int dest_width); -#define vp8_horizontal_line_5_3_scale vp8_horizontal_line_5_3_scale_c - -void vp8_horizontal_line_5_4_scale_c(const unsigned char *source, unsigned int source_width, unsigned char *dest, unsigned int dest_width); -#define vp8_horizontal_line_5_4_scale vp8_horizontal_line_5_4_scale_c - -void vp8_vertical_band_2_1_scale_c(unsigned char *source, unsigned int src_pitch, unsigned char *dest, unsigned int dest_pitch, unsigned int dest_width); -#define vp8_vertical_band_2_1_scale vp8_vertical_band_2_1_scale_c - -void vp8_vertical_band_2_1_scale_i_c(unsigned char *source, unsigned int src_pitch, unsigned char *dest, unsigned int dest_pitch, unsigned int dest_width); -#define vp8_vertical_band_2_1_scale_i vp8_vertical_band_2_1_scale_i_c - -void vp8_vertical_band_5_3_scale_c(unsigned char *source, unsigned int src_pitch, unsigned char *dest, unsigned int dest_pitch, unsigned int dest_width); -#define vp8_vertical_band_5_3_scale vp8_vertical_band_5_3_scale_c - -void vp8_vertical_band_5_4_scale_c(unsigned char *source, unsigned int src_pitch, unsigned char *dest, unsigned int dest_pitch, unsigned int dest_width); -#define vp8_vertical_band_5_4_scale vp8_vertical_band_5_4_scale_c - -void vp8_yv12_copy_frame_c(const struct yv12_buffer_config *src_ybc, struct yv12_buffer_config *dst_ybc); -#define vp8_yv12_copy_frame vp8_yv12_copy_frame_c - -void vp8_yv12_extend_frame_borders_c(struct yv12_buffer_config *ybf); -#define vp8_yv12_extend_frame_borders vp8_yv12_extend_frame_borders_c - -void vpx_extend_frame_borders_c(struct yv12_buffer_config *ybf); -#define vpx_extend_frame_borders vpx_extend_frame_borders_c - -void vpx_extend_frame_inner_borders_c(struct yv12_buffer_config *ybf); -#define vpx_extend_frame_inner_borders vpx_extend_frame_inner_borders_c - -void vpx_yv12_copy_y_c(const struct yv12_buffer_config *src_ybc, struct yv12_buffer_config *dst_ybc); -#define vpx_yv12_copy_y vpx_yv12_copy_y_c - -void vpx_scale_rtcd(void); - -#include "vpx_config.h" - -#ifdef RTCD_C -#include "vpx_ports/arm.h" -static void setup_rtcd_internal(void) -{ - int flags = arm_cpu_caps(); - - (void)flags; - -} -#endif - -#ifdef __cplusplus -} // extern "C" -#endif - -#endif diff --git a/WebRtc.NET/include/third_party/libvpx/source/config/linux/arm-neon-cpu-detect/vp8_rtcd.h b/WebRtc.NET/include/third_party/libvpx/source/config/linux/arm-neon-cpu-detect/vp8_rtcd.h deleted file mode 100644 index 9acdcc0a..00000000 --- a/WebRtc.NET/include/third_party/libvpx/source/config/linux/arm-neon-cpu-detect/vp8_rtcd.h +++ /dev/null @@ -1,282 +0,0 @@ -#ifndef VP8_RTCD_H_ -#define VP8_RTCD_H_ - -#ifdef RTCD_C -#define RTCD_EXTERN -#else -#define RTCD_EXTERN extern -#endif - -/* - * VP8 - */ - -struct blockd; -struct macroblockd; -struct loop_filter_info; - -/* Encoder forward decls */ -struct block; -struct macroblock; -struct variance_vtable; -union int_mv; -struct yv12_buffer_config; - -#ifdef __cplusplus -extern "C" { -#endif - -void vp8_bilinear_predict16x16_c(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch); -void vp8_bilinear_predict16x16_neon(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch); -RTCD_EXTERN void (*vp8_bilinear_predict16x16)(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch); - -void vp8_bilinear_predict4x4_c(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch); -void vp8_bilinear_predict4x4_neon(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch); -RTCD_EXTERN void (*vp8_bilinear_predict4x4)(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch); - -void vp8_bilinear_predict8x4_c(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch); -void vp8_bilinear_predict8x4_neon(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch); -RTCD_EXTERN void (*vp8_bilinear_predict8x4)(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch); - -void vp8_bilinear_predict8x8_c(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch); -void vp8_bilinear_predict8x8_neon(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch); -RTCD_EXTERN void (*vp8_bilinear_predict8x8)(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch); - -void vp8_blend_b_c(unsigned char *y, unsigned char *u, unsigned char *v, int y1, int u1, int v1, int alpha, int stride); -#define vp8_blend_b vp8_blend_b_c - -void vp8_blend_mb_inner_c(unsigned char *y, unsigned char *u, unsigned char *v, int y1, int u1, int v1, int alpha, int stride); -#define vp8_blend_mb_inner vp8_blend_mb_inner_c - -void vp8_blend_mb_outer_c(unsigned char *y, unsigned char *u, unsigned char *v, int y1, int u1, int v1, int alpha, int stride); -#define vp8_blend_mb_outer vp8_blend_mb_outer_c - -int vp8_block_error_c(short *coeff, short *dqcoeff); -#define vp8_block_error vp8_block_error_c - -void vp8_copy_mem16x16_c(unsigned char *src, int src_pitch, unsigned char *dst, int dst_pitch); -void vp8_copy_mem16x16_neon(unsigned char *src, int src_pitch, unsigned char *dst, int dst_pitch); -RTCD_EXTERN void (*vp8_copy_mem16x16)(unsigned char *src, int src_pitch, unsigned char *dst, int dst_pitch); - -void vp8_copy_mem8x4_c(unsigned char *src, int src_pitch, unsigned char *dst, int dst_pitch); -void vp8_copy_mem8x4_neon(unsigned char *src, int src_pitch, unsigned char *dst, int dst_pitch); -RTCD_EXTERN void (*vp8_copy_mem8x4)(unsigned char *src, int src_pitch, unsigned char *dst, int dst_pitch); - -void vp8_copy_mem8x8_c(unsigned char *src, int src_pitch, unsigned char *dst, int dst_pitch); -void vp8_copy_mem8x8_neon(unsigned char *src, int src_pitch, unsigned char *dst, int dst_pitch); -RTCD_EXTERN void (*vp8_copy_mem8x8)(unsigned char *src, int src_pitch, unsigned char *dst, int dst_pitch); - -void vp8_dc_only_idct_add_c(short input, unsigned char *pred, int pred_stride, unsigned char *dst, int dst_stride); -void vp8_dc_only_idct_add_neon(short input, unsigned char *pred, int pred_stride, unsigned char *dst, int dst_stride); -RTCD_EXTERN void (*vp8_dc_only_idct_add)(short input, unsigned char *pred, int pred_stride, unsigned char *dst, int dst_stride); - -int vp8_denoiser_filter_c(unsigned char *mc_running_avg_y, int mc_avg_y_stride, unsigned char *running_avg_y, int avg_y_stride, unsigned char *sig, int sig_stride, unsigned int motion_magnitude, int increase_denoising); -int vp8_denoiser_filter_neon(unsigned char *mc_running_avg_y, int mc_avg_y_stride, unsigned char *running_avg_y, int avg_y_stride, unsigned char *sig, int sig_stride, unsigned int motion_magnitude, int increase_denoising); -RTCD_EXTERN int (*vp8_denoiser_filter)(unsigned char *mc_running_avg_y, int mc_avg_y_stride, unsigned char *running_avg_y, int avg_y_stride, unsigned char *sig, int sig_stride, unsigned int motion_magnitude, int increase_denoising); - -int vp8_denoiser_filter_uv_c(unsigned char *mc_running_avg, int mc_avg_stride, unsigned char *running_avg, int avg_stride, unsigned char *sig, int sig_stride, unsigned int motion_magnitude, int increase_denoising); -int vp8_denoiser_filter_uv_neon(unsigned char *mc_running_avg, int mc_avg_stride, unsigned char *running_avg, int avg_stride, unsigned char *sig, int sig_stride, unsigned int motion_magnitude, int increase_denoising); -RTCD_EXTERN int (*vp8_denoiser_filter_uv)(unsigned char *mc_running_avg, int mc_avg_stride, unsigned char *running_avg, int avg_stride, unsigned char *sig, int sig_stride, unsigned int motion_magnitude, int increase_denoising); - -void vp8_dequant_idct_add_c(short *input, short *dq, unsigned char *output, int stride); -void vp8_dequant_idct_add_neon(short *input, short *dq, unsigned char *output, int stride); -RTCD_EXTERN void (*vp8_dequant_idct_add)(short *input, short *dq, unsigned char *output, int stride); - -void vp8_dequant_idct_add_uv_block_c(short *q, short *dq, unsigned char *dst_u, unsigned char *dst_v, int stride, char *eobs); -void vp8_dequant_idct_add_uv_block_neon(short *q, short *dq, unsigned char *dst_u, unsigned char *dst_v, int stride, char *eobs); -RTCD_EXTERN void (*vp8_dequant_idct_add_uv_block)(short *q, short *dq, unsigned char *dst_u, unsigned char *dst_v, int stride, char *eobs); - -void vp8_dequant_idct_add_y_block_c(short *q, short *dq, unsigned char *dst, int stride, char *eobs); -void vp8_dequant_idct_add_y_block_neon(short *q, short *dq, unsigned char *dst, int stride, char *eobs); -RTCD_EXTERN void (*vp8_dequant_idct_add_y_block)(short *q, short *dq, unsigned char *dst, int stride, char *eobs); - -void vp8_dequantize_b_c(struct blockd*, short *dqc); -void vp8_dequantize_b_neon(struct blockd*, short *dqc); -RTCD_EXTERN void (*vp8_dequantize_b)(struct blockd*, short *dqc); - -int vp8_diamond_search_sad_c(struct macroblock *x, struct block *b, struct blockd *d, union int_mv *ref_mv, union int_mv *best_mv, int search_param, int sad_per_bit, int *num00, struct variance_vtable *fn_ptr, int *mvcost[2], union int_mv *center_mv); -#define vp8_diamond_search_sad vp8_diamond_search_sad_c - -void vp8_fast_quantize_b_c(struct block *, struct blockd *); -void vp8_fast_quantize_b_neon(struct block *, struct blockd *); -RTCD_EXTERN void (*vp8_fast_quantize_b)(struct block *, struct blockd *); - -void vp8_filter_by_weight16x16_c(unsigned char *src, int src_stride, unsigned char *dst, int dst_stride, int src_weight); -#define vp8_filter_by_weight16x16 vp8_filter_by_weight16x16_c - -void vp8_filter_by_weight4x4_c(unsigned char *src, int src_stride, unsigned char *dst, int dst_stride, int src_weight); -#define vp8_filter_by_weight4x4 vp8_filter_by_weight4x4_c - -void vp8_filter_by_weight8x8_c(unsigned char *src, int src_stride, unsigned char *dst, int dst_stride, int src_weight); -#define vp8_filter_by_weight8x8 vp8_filter_by_weight8x8_c - -int vp8_full_search_sad_c(struct macroblock *x, struct block *b, struct blockd *d, union int_mv *ref_mv, int sad_per_bit, int distance, struct variance_vtable *fn_ptr, int *mvcost[2], union int_mv *center_mv); -#define vp8_full_search_sad vp8_full_search_sad_c - -void vp8_loop_filter_bh_c(unsigned char *y, unsigned char *u, unsigned char *v, int ystride, int uv_stride, struct loop_filter_info *lfi); -void vp8_loop_filter_bh_neon(unsigned char *y, unsigned char *u, unsigned char *v, int ystride, int uv_stride, struct loop_filter_info *lfi); -RTCD_EXTERN void (*vp8_loop_filter_bh)(unsigned char *y, unsigned char *u, unsigned char *v, int ystride, int uv_stride, struct loop_filter_info *lfi); - -void vp8_loop_filter_bv_c(unsigned char *y, unsigned char *u, unsigned char *v, int ystride, int uv_stride, struct loop_filter_info *lfi); -void vp8_loop_filter_bv_neon(unsigned char *y, unsigned char *u, unsigned char *v, int ystride, int uv_stride, struct loop_filter_info *lfi); -RTCD_EXTERN void (*vp8_loop_filter_bv)(unsigned char *y, unsigned char *u, unsigned char *v, int ystride, int uv_stride, struct loop_filter_info *lfi); - -void vp8_loop_filter_mbh_c(unsigned char *y, unsigned char *u, unsigned char *v, int ystride, int uv_stride, struct loop_filter_info *lfi); -void vp8_loop_filter_mbh_neon(unsigned char *y, unsigned char *u, unsigned char *v, int ystride, int uv_stride, struct loop_filter_info *lfi); -RTCD_EXTERN void (*vp8_loop_filter_mbh)(unsigned char *y, unsigned char *u, unsigned char *v, int ystride, int uv_stride, struct loop_filter_info *lfi); - -void vp8_loop_filter_mbv_c(unsigned char *y, unsigned char *u, unsigned char *v, int ystride, int uv_stride, struct loop_filter_info *lfi); -void vp8_loop_filter_mbv_neon(unsigned char *y, unsigned char *u, unsigned char *v, int ystride, int uv_stride, struct loop_filter_info *lfi); -RTCD_EXTERN void (*vp8_loop_filter_mbv)(unsigned char *y, unsigned char *u, unsigned char *v, int ystride, int uv_stride, struct loop_filter_info *lfi); - -void vp8_loop_filter_bhs_c(unsigned char *y, int ystride, const unsigned char *blimit); -void vp8_loop_filter_bhs_neon(unsigned char *y, int ystride, const unsigned char *blimit); -RTCD_EXTERN void (*vp8_loop_filter_simple_bh)(unsigned char *y, int ystride, const unsigned char *blimit); - -void vp8_loop_filter_bvs_c(unsigned char *y, int ystride, const unsigned char *blimit); -void vp8_loop_filter_bvs_neon(unsigned char *y, int ystride, const unsigned char *blimit); -RTCD_EXTERN void (*vp8_loop_filter_simple_bv)(unsigned char *y, int ystride, const unsigned char *blimit); - -void vp8_loop_filter_simple_horizontal_edge_c(unsigned char *y, int ystride, const unsigned char *blimit); -void vp8_loop_filter_mbhs_neon(unsigned char *y, int ystride, const unsigned char *blimit); -RTCD_EXTERN void (*vp8_loop_filter_simple_mbh)(unsigned char *y, int ystride, const unsigned char *blimit); - -void vp8_loop_filter_simple_vertical_edge_c(unsigned char *y, int ystride, const unsigned char *blimit); -void vp8_loop_filter_mbvs_neon(unsigned char *y, int ystride, const unsigned char *blimit); -RTCD_EXTERN void (*vp8_loop_filter_simple_mbv)(unsigned char *y, int ystride, const unsigned char *blimit); - -int vp8_mbblock_error_c(struct macroblock *mb, int dc); -#define vp8_mbblock_error vp8_mbblock_error_c - -int vp8_mbuverror_c(struct macroblock *mb); -#define vp8_mbuverror vp8_mbuverror_c - -int vp8_refining_search_sad_c(struct macroblock *x, struct block *b, struct blockd *d, union int_mv *ref_mv, int sad_per_bit, int distance, struct variance_vtable *fn_ptr, int *mvcost[2], union int_mv *center_mv); -#define vp8_refining_search_sad vp8_refining_search_sad_c - -void vp8_regular_quantize_b_c(struct block *, struct blockd *); -#define vp8_regular_quantize_b vp8_regular_quantize_b_c - -void vp8_short_fdct4x4_c(short *input, short *output, int pitch); -void vp8_short_fdct4x4_neon(short *input, short *output, int pitch); -RTCD_EXTERN void (*vp8_short_fdct4x4)(short *input, short *output, int pitch); - -void vp8_short_fdct8x4_c(short *input, short *output, int pitch); -void vp8_short_fdct8x4_neon(short *input, short *output, int pitch); -RTCD_EXTERN void (*vp8_short_fdct8x4)(short *input, short *output, int pitch); - -void vp8_short_idct4x4llm_c(short *input, unsigned char *pred, int pitch, unsigned char *dst, int dst_stride); -void vp8_short_idct4x4llm_neon(short *input, unsigned char *pred, int pitch, unsigned char *dst, int dst_stride); -RTCD_EXTERN void (*vp8_short_idct4x4llm)(short *input, unsigned char *pred, int pitch, unsigned char *dst, int dst_stride); - -void vp8_short_inv_walsh4x4_c(short *input, short *output); -void vp8_short_inv_walsh4x4_neon(short *input, short *output); -RTCD_EXTERN void (*vp8_short_inv_walsh4x4)(short *input, short *output); - -void vp8_short_inv_walsh4x4_1_c(short *input, short *output); -#define vp8_short_inv_walsh4x4_1 vp8_short_inv_walsh4x4_1_c - -void vp8_short_walsh4x4_c(short *input, short *output, int pitch); -void vp8_short_walsh4x4_neon(short *input, short *output, int pitch); -RTCD_EXTERN void (*vp8_short_walsh4x4)(short *input, short *output, int pitch); - -void vp8_sixtap_predict16x16_c(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch); -void vp8_sixtap_predict16x16_neon(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch); -RTCD_EXTERN void (*vp8_sixtap_predict16x16)(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch); - -void vp8_sixtap_predict4x4_c(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch); -void vp8_sixtap_predict4x4_neon(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch); -RTCD_EXTERN void (*vp8_sixtap_predict4x4)(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch); - -void vp8_sixtap_predict8x4_c(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch); -void vp8_sixtap_predict8x4_neon(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch); -RTCD_EXTERN void (*vp8_sixtap_predict8x4)(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch); - -void vp8_sixtap_predict8x8_c(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch); -void vp8_sixtap_predict8x8_neon(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch); -RTCD_EXTERN void (*vp8_sixtap_predict8x8)(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch); - -void vp8_rtcd(void); - -#include "vpx_config.h" - -#ifdef RTCD_C -#include "vpx_ports/arm.h" -static void setup_rtcd_internal(void) -{ - int flags = arm_cpu_caps(); - - (void)flags; - - vp8_bilinear_predict16x16 = vp8_bilinear_predict16x16_c; - if (flags & HAS_NEON) vp8_bilinear_predict16x16 = vp8_bilinear_predict16x16_neon; - vp8_bilinear_predict4x4 = vp8_bilinear_predict4x4_c; - if (flags & HAS_NEON) vp8_bilinear_predict4x4 = vp8_bilinear_predict4x4_neon; - vp8_bilinear_predict8x4 = vp8_bilinear_predict8x4_c; - if (flags & HAS_NEON) vp8_bilinear_predict8x4 = vp8_bilinear_predict8x4_neon; - vp8_bilinear_predict8x8 = vp8_bilinear_predict8x8_c; - if (flags & HAS_NEON) vp8_bilinear_predict8x8 = vp8_bilinear_predict8x8_neon; - vp8_copy_mem16x16 = vp8_copy_mem16x16_c; - if (flags & HAS_NEON) vp8_copy_mem16x16 = vp8_copy_mem16x16_neon; - vp8_copy_mem8x4 = vp8_copy_mem8x4_c; - if (flags & HAS_NEON) vp8_copy_mem8x4 = vp8_copy_mem8x4_neon; - vp8_copy_mem8x8 = vp8_copy_mem8x8_c; - if (flags & HAS_NEON) vp8_copy_mem8x8 = vp8_copy_mem8x8_neon; - vp8_dc_only_idct_add = vp8_dc_only_idct_add_c; - if (flags & HAS_NEON) vp8_dc_only_idct_add = vp8_dc_only_idct_add_neon; - vp8_denoiser_filter = vp8_denoiser_filter_c; - if (flags & HAS_NEON) vp8_denoiser_filter = vp8_denoiser_filter_neon; - vp8_denoiser_filter_uv = vp8_denoiser_filter_uv_c; - if (flags & HAS_NEON) vp8_denoiser_filter_uv = vp8_denoiser_filter_uv_neon; - vp8_dequant_idct_add = vp8_dequant_idct_add_c; - if (flags & HAS_NEON) vp8_dequant_idct_add = vp8_dequant_idct_add_neon; - vp8_dequant_idct_add_uv_block = vp8_dequant_idct_add_uv_block_c; - if (flags & HAS_NEON) vp8_dequant_idct_add_uv_block = vp8_dequant_idct_add_uv_block_neon; - vp8_dequant_idct_add_y_block = vp8_dequant_idct_add_y_block_c; - if (flags & HAS_NEON) vp8_dequant_idct_add_y_block = vp8_dequant_idct_add_y_block_neon; - vp8_dequantize_b = vp8_dequantize_b_c; - if (flags & HAS_NEON) vp8_dequantize_b = vp8_dequantize_b_neon; - vp8_fast_quantize_b = vp8_fast_quantize_b_c; - if (flags & HAS_NEON) vp8_fast_quantize_b = vp8_fast_quantize_b_neon; - vp8_loop_filter_bh = vp8_loop_filter_bh_c; - if (flags & HAS_NEON) vp8_loop_filter_bh = vp8_loop_filter_bh_neon; - vp8_loop_filter_bv = vp8_loop_filter_bv_c; - if (flags & HAS_NEON) vp8_loop_filter_bv = vp8_loop_filter_bv_neon; - vp8_loop_filter_mbh = vp8_loop_filter_mbh_c; - if (flags & HAS_NEON) vp8_loop_filter_mbh = vp8_loop_filter_mbh_neon; - vp8_loop_filter_mbv = vp8_loop_filter_mbv_c; - if (flags & HAS_NEON) vp8_loop_filter_mbv = vp8_loop_filter_mbv_neon; - vp8_loop_filter_simple_bh = vp8_loop_filter_bhs_c; - if (flags & HAS_NEON) vp8_loop_filter_simple_bh = vp8_loop_filter_bhs_neon; - vp8_loop_filter_simple_bv = vp8_loop_filter_bvs_c; - if (flags & HAS_NEON) vp8_loop_filter_simple_bv = vp8_loop_filter_bvs_neon; - vp8_loop_filter_simple_mbh = vp8_loop_filter_simple_horizontal_edge_c; - if (flags & HAS_NEON) vp8_loop_filter_simple_mbh = vp8_loop_filter_mbhs_neon; - vp8_loop_filter_simple_mbv = vp8_loop_filter_simple_vertical_edge_c; - if (flags & HAS_NEON) vp8_loop_filter_simple_mbv = vp8_loop_filter_mbvs_neon; - vp8_short_fdct4x4 = vp8_short_fdct4x4_c; - if (flags & HAS_NEON) vp8_short_fdct4x4 = vp8_short_fdct4x4_neon; - vp8_short_fdct8x4 = vp8_short_fdct8x4_c; - if (flags & HAS_NEON) vp8_short_fdct8x4 = vp8_short_fdct8x4_neon; - vp8_short_idct4x4llm = vp8_short_idct4x4llm_c; - if (flags & HAS_NEON) vp8_short_idct4x4llm = vp8_short_idct4x4llm_neon; - vp8_short_inv_walsh4x4 = vp8_short_inv_walsh4x4_c; - if (flags & HAS_NEON) vp8_short_inv_walsh4x4 = vp8_short_inv_walsh4x4_neon; - vp8_short_walsh4x4 = vp8_short_walsh4x4_c; - if (flags & HAS_NEON) vp8_short_walsh4x4 = vp8_short_walsh4x4_neon; - vp8_sixtap_predict16x16 = vp8_sixtap_predict16x16_c; - if (flags & HAS_NEON) vp8_sixtap_predict16x16 = vp8_sixtap_predict16x16_neon; - vp8_sixtap_predict4x4 = vp8_sixtap_predict4x4_c; - if (flags & HAS_NEON) vp8_sixtap_predict4x4 = vp8_sixtap_predict4x4_neon; - vp8_sixtap_predict8x4 = vp8_sixtap_predict8x4_c; - if (flags & HAS_NEON) vp8_sixtap_predict8x4 = vp8_sixtap_predict8x4_neon; - vp8_sixtap_predict8x8 = vp8_sixtap_predict8x8_c; - if (flags & HAS_NEON) vp8_sixtap_predict8x8 = vp8_sixtap_predict8x8_neon; -} -#endif - -#ifdef __cplusplus -} // extern "C" -#endif - -#endif diff --git a/WebRtc.NET/include/third_party/libvpx/source/config/linux/arm-neon-cpu-detect/vp9_rtcd.h b/WebRtc.NET/include/third_party/libvpx/source/config/linux/arm-neon-cpu-detect/vp9_rtcd.h deleted file mode 100644 index 789724ff..00000000 --- a/WebRtc.NET/include/third_party/libvpx/source/config/linux/arm-neon-cpu-detect/vp9_rtcd.h +++ /dev/null @@ -1,123 +0,0 @@ -#ifndef VP9_RTCD_H_ -#define VP9_RTCD_H_ - -#ifdef RTCD_C -#define RTCD_EXTERN -#else -#define RTCD_EXTERN extern -#endif - -/* - * VP9 - */ - -#include "vpx/vpx_integer.h" -#include "vp9/common/vp9_common.h" -#include "vp9/common/vp9_enums.h" - -struct macroblockd; - -/* Encoder forward decls */ -struct macroblock; -struct vp9_variance_vtable; -struct search_site_config; -struct mv; -union int_mv; -struct yv12_buffer_config; - -#ifdef __cplusplus -extern "C" { -#endif - -int64_t vp9_block_error_c(const tran_low_t *coeff, const tran_low_t *dqcoeff, intptr_t block_size, int64_t *ssz); -#define vp9_block_error vp9_block_error_c - -int64_t vp9_block_error_fp_c(const int16_t *coeff, const int16_t *dqcoeff, int block_size); -int64_t vp9_block_error_fp_neon(const int16_t *coeff, const int16_t *dqcoeff, int block_size); -RTCD_EXTERN int64_t (*vp9_block_error_fp)(const int16_t *coeff, const int16_t *dqcoeff, int block_size); - -int vp9_denoiser_filter_c(const uint8_t *sig, int sig_stride, const uint8_t *mc_avg, int mc_avg_stride, uint8_t *avg, int avg_stride, int increase_denoising, BLOCK_SIZE bs, int motion_magnitude); -#define vp9_denoiser_filter vp9_denoiser_filter_c - -int vp9_diamond_search_sad_c(const struct macroblock *x, const struct search_site_config *cfg, struct mv *ref_mv, struct mv *best_mv, int search_param, int sad_per_bit, int *num00, const struct vp9_variance_vtable *fn_ptr, const struct mv *center_mv); -#define vp9_diamond_search_sad vp9_diamond_search_sad_c - -void vp9_fdct8x8_quant_c(const int16_t *input, int stride, tran_low_t *coeff_ptr, intptr_t n_coeffs, int skip_block, const int16_t *zbin_ptr, const int16_t *round_ptr, const int16_t *quant_ptr, const int16_t *quant_shift_ptr, tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr, const int16_t *dequant_ptr, uint16_t *eob_ptr, const int16_t *scan, const int16_t *iscan); -void vp9_fdct8x8_quant_neon(const int16_t *input, int stride, tran_low_t *coeff_ptr, intptr_t n_coeffs, int skip_block, const int16_t *zbin_ptr, const int16_t *round_ptr, const int16_t *quant_ptr, const int16_t *quant_shift_ptr, tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr, const int16_t *dequant_ptr, uint16_t *eob_ptr, const int16_t *scan, const int16_t *iscan); -RTCD_EXTERN void (*vp9_fdct8x8_quant)(const int16_t *input, int stride, tran_low_t *coeff_ptr, intptr_t n_coeffs, int skip_block, const int16_t *zbin_ptr, const int16_t *round_ptr, const int16_t *quant_ptr, const int16_t *quant_shift_ptr, tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr, const int16_t *dequant_ptr, uint16_t *eob_ptr, const int16_t *scan, const int16_t *iscan); - -void vp9_fht16x16_c(const int16_t *input, tran_low_t *output, int stride, int tx_type); -#define vp9_fht16x16 vp9_fht16x16_c - -void vp9_fht4x4_c(const int16_t *input, tran_low_t *output, int stride, int tx_type); -#define vp9_fht4x4 vp9_fht4x4_c - -void vp9_fht8x8_c(const int16_t *input, tran_low_t *output, int stride, int tx_type); -#define vp9_fht8x8 vp9_fht8x8_c - -void vp9_filter_by_weight16x16_c(const uint8_t *src, int src_stride, uint8_t *dst, int dst_stride, int src_weight); -#define vp9_filter_by_weight16x16 vp9_filter_by_weight16x16_c - -void vp9_filter_by_weight8x8_c(const uint8_t *src, int src_stride, uint8_t *dst, int dst_stride, int src_weight); -#define vp9_filter_by_weight8x8 vp9_filter_by_weight8x8_c - -int vp9_full_search_sad_c(const struct macroblock *x, const struct mv *ref_mv, int sad_per_bit, int distance, const struct vp9_variance_vtable *fn_ptr, const struct mv *center_mv, struct mv *best_mv); -#define vp9_full_search_sad vp9_full_search_sad_c - -void vp9_fwht4x4_c(const int16_t *input, tran_low_t *output, int stride); -#define vp9_fwht4x4 vp9_fwht4x4_c - -void vp9_iht16x16_256_add_c(const tran_low_t *input, uint8_t *output, int pitch, int tx_type); -#define vp9_iht16x16_256_add vp9_iht16x16_256_add_c - -void vp9_iht4x4_16_add_c(const tran_low_t *input, uint8_t *dest, int stride, int tx_type); -void vp9_iht4x4_16_add_neon(const tran_low_t *input, uint8_t *dest, int stride, int tx_type); -RTCD_EXTERN void (*vp9_iht4x4_16_add)(const tran_low_t *input, uint8_t *dest, int stride, int tx_type); - -void vp9_iht8x8_64_add_c(const tran_low_t *input, uint8_t *dest, int stride, int tx_type); -void vp9_iht8x8_64_add_neon(const tran_low_t *input, uint8_t *dest, int stride, int tx_type); -RTCD_EXTERN void (*vp9_iht8x8_64_add)(const tran_low_t *input, uint8_t *dest, int stride, int tx_type); - -void vp9_quantize_fp_c(const tran_low_t *coeff_ptr, intptr_t n_coeffs, int skip_block, const int16_t *zbin_ptr, const int16_t *round_ptr, const int16_t *quant_ptr, const int16_t *quant_shift_ptr, tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr, const int16_t *dequant_ptr, uint16_t *eob_ptr, const int16_t *scan, const int16_t *iscan); -void vp9_quantize_fp_neon(const tran_low_t *coeff_ptr, intptr_t n_coeffs, int skip_block, const int16_t *zbin_ptr, const int16_t *round_ptr, const int16_t *quant_ptr, const int16_t *quant_shift_ptr, tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr, const int16_t *dequant_ptr, uint16_t *eob_ptr, const int16_t *scan, const int16_t *iscan); -RTCD_EXTERN void (*vp9_quantize_fp)(const tran_low_t *coeff_ptr, intptr_t n_coeffs, int skip_block, const int16_t *zbin_ptr, const int16_t *round_ptr, const int16_t *quant_ptr, const int16_t *quant_shift_ptr, tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr, const int16_t *dequant_ptr, uint16_t *eob_ptr, const int16_t *scan, const int16_t *iscan); - -void vp9_quantize_fp_32x32_c(const tran_low_t *coeff_ptr, intptr_t n_coeffs, int skip_block, const int16_t *zbin_ptr, const int16_t *round_ptr, const int16_t *quant_ptr, const int16_t *quant_shift_ptr, tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr, const int16_t *dequant_ptr, uint16_t *eob_ptr, const int16_t *scan, const int16_t *iscan); -#define vp9_quantize_fp_32x32 vp9_quantize_fp_32x32_c - -void vp9_scale_and_extend_frame_c(const struct yv12_buffer_config *src, struct yv12_buffer_config *dst); -#define vp9_scale_and_extend_frame vp9_scale_and_extend_frame_c - -void vp9_temporal_filter_apply_c(uint8_t *frame1, unsigned int stride, uint8_t *frame2, unsigned int block_width, unsigned int block_height, int strength, int filter_weight, unsigned int *accumulator, uint16_t *count); -#define vp9_temporal_filter_apply vp9_temporal_filter_apply_c - -void vp9_rtcd(void); - -#include "vpx_config.h" - -#ifdef RTCD_C -#include "vpx_ports/arm.h" -static void setup_rtcd_internal(void) -{ - int flags = arm_cpu_caps(); - - (void)flags; - - vp9_block_error_fp = vp9_block_error_fp_c; - if (flags & HAS_NEON) vp9_block_error_fp = vp9_block_error_fp_neon; - vp9_fdct8x8_quant = vp9_fdct8x8_quant_c; - if (flags & HAS_NEON) vp9_fdct8x8_quant = vp9_fdct8x8_quant_neon; - vp9_iht4x4_16_add = vp9_iht4x4_16_add_c; - if (flags & HAS_NEON) vp9_iht4x4_16_add = vp9_iht4x4_16_add_neon; - vp9_iht8x8_64_add = vp9_iht8x8_64_add_c; - if (flags & HAS_NEON) vp9_iht8x8_64_add = vp9_iht8x8_64_add_neon; - vp9_quantize_fp = vp9_quantize_fp_c; - if (flags & HAS_NEON) vp9_quantize_fp = vp9_quantize_fp_neon; -} -#endif - -#ifdef __cplusplus -} // extern "C" -#endif - -#endif diff --git a/WebRtc.NET/include/third_party/libvpx/source/config/linux/arm-neon-cpu-detect/vpx_config.h b/WebRtc.NET/include/third_party/libvpx/source/config/linux/arm-neon-cpu-detect/vpx_config.h deleted file mode 100644 index e7972cfe..00000000 --- a/WebRtc.NET/include/third_party/libvpx/source/config/linux/arm-neon-cpu-detect/vpx_config.h +++ /dev/null @@ -1,94 +0,0 @@ -/* Copyright (c) 2011 The WebM project authors. All Rights Reserved. */ -/* */ -/* Use of this source code is governed by a BSD-style license */ -/* that can be found in the LICENSE file in the root of the source */ -/* tree. An additional intellectual property rights grant can be found */ -/* in the file PATENTS. All contributing project authors may */ -/* be found in the AUTHORS file in the root of the source tree. */ -/* This file automatically generated by configure. Do not edit! */ -#ifndef VPX_CONFIG_H -#define VPX_CONFIG_H -#define RESTRICT -#define INLINE inline -#define ARCH_ARM 1 -#define ARCH_MIPS 0 -#define ARCH_X86 0 -#define ARCH_X86_64 0 -#define HAVE_NEON 1 -#define HAVE_NEON_ASM 1 -#define HAVE_MIPS32 0 -#define HAVE_DSPR2 0 -#define HAVE_MSA 0 -#define HAVE_MIPS64 0 -#define HAVE_MMX 0 -#define HAVE_SSE 0 -#define HAVE_SSE2 0 -#define HAVE_SSE3 0 -#define HAVE_SSSE3 0 -#define HAVE_SSE4_1 0 -#define HAVE_AVX 0 -#define HAVE_AVX2 0 -#define HAVE_VPX_PORTS 1 -#define HAVE_PTHREAD_H 1 -#define HAVE_UNISTD_H 0 -#define CONFIG_DEPENDENCY_TRACKING 1 -#define CONFIG_EXTERNAL_BUILD 1 -#define CONFIG_INSTALL_DOCS 0 -#define CONFIG_INSTALL_BINS 1 -#define CONFIG_INSTALL_LIBS 1 -#define CONFIG_INSTALL_SRCS 0 -#define CONFIG_DEBUG 0 -#define CONFIG_GPROF 0 -#define CONFIG_GCOV 0 -#define CONFIG_RVCT 0 -#define CONFIG_GCC 1 -#define CONFIG_MSVS 0 -#define CONFIG_PIC 0 -#define CONFIG_BIG_ENDIAN 0 -#define CONFIG_CODEC_SRCS 0 -#define CONFIG_DEBUG_LIBS 0 -#define CONFIG_DEQUANT_TOKENS 0 -#define CONFIG_DC_RECON 0 -#define CONFIG_RUNTIME_CPU_DETECT 1 -#define CONFIG_POSTPROC 1 -#define CONFIG_VP9_POSTPROC 1 -#define CONFIG_MULTITHREAD 1 -#define CONFIG_INTERNAL_STATS 0 -#define CONFIG_VP8_ENCODER 1 -#define CONFIG_VP8_DECODER 1 -#define CONFIG_VP9_ENCODER 1 -#define CONFIG_VP9_DECODER 1 -#define CONFIG_VP8 1 -#define CONFIG_VP9 1 -#define CONFIG_ENCODERS 1 -#define CONFIG_DECODERS 1 -#define CONFIG_STATIC_MSVCRT 0 -#define CONFIG_SPATIAL_RESAMPLING 1 -#define CONFIG_REALTIME_ONLY 1 -#define CONFIG_ONTHEFLY_BITPACKING 0 -#define CONFIG_ERROR_CONCEALMENT 0 -#define CONFIG_SHARED 0 -#define CONFIG_STATIC 1 -#define CONFIG_SMALL 0 -#define CONFIG_POSTPROC_VISUALIZER 0 -#define CONFIG_OS_SUPPORT 1 -#define CONFIG_UNIT_TESTS 1 -#define CONFIG_WEBM_IO 1 -#define CONFIG_LIBYUV 1 -#define CONFIG_DECODE_PERF_TESTS 0 -#define CONFIG_ENCODE_PERF_TESTS 0 -#define CONFIG_MULTI_RES_ENCODING 1 -#define CONFIG_TEMPORAL_DENOISING 1 -#define CONFIG_VP9_TEMPORAL_DENOISING 1 -#define CONFIG_COEFFICIENT_RANGE_CHECKING 0 -#define CONFIG_VP9_HIGHBITDEPTH 0 -#define CONFIG_BETTER_HW_COMPATIBILITY 0 -#define CONFIG_EXPERIMENTAL 0 -#define CONFIG_SIZE_LIMIT 1 -#define CONFIG_SPATIAL_SVC 0 -#define CONFIG_FP_MB_STATS 0 -#define CONFIG_EMULATE_HARDWARE 0 -#define CONFIG_MISC_FIXES 0 -#define DECODE_WIDTH_LIMIT 16384 -#define DECODE_HEIGHT_LIMIT 16384 -#endif /* VPX_CONFIG_H */ diff --git a/WebRtc.NET/include/third_party/libvpx/source/config/linux/arm-neon-cpu-detect/vpx_dsp_rtcd.h b/WebRtc.NET/include/third_party/libvpx/source/config/linux/arm-neon-cpu-detect/vpx_dsp_rtcd.h deleted file mode 100644 index 2712530f..00000000 --- a/WebRtc.NET/include/third_party/libvpx/source/config/linux/arm-neon-cpu-detect/vpx_dsp_rtcd.h +++ /dev/null @@ -1,1076 +0,0 @@ -#ifndef VPX_DSP_RTCD_H_ -#define VPX_DSP_RTCD_H_ - -#ifdef RTCD_C -#define RTCD_EXTERN -#else -#define RTCD_EXTERN extern -#endif - -/* - * DSP - */ - -#include "vpx/vpx_integer.h" -#include "vpx_dsp/vpx_dsp_common.h" - - -#ifdef __cplusplus -extern "C" { -#endif - -unsigned int vpx_avg_4x4_c(const uint8_t *, int p); -unsigned int vpx_avg_4x4_neon(const uint8_t *, int p); -RTCD_EXTERN unsigned int (*vpx_avg_4x4)(const uint8_t *, int p); - -unsigned int vpx_avg_8x8_c(const uint8_t *, int p); -unsigned int vpx_avg_8x8_neon(const uint8_t *, int p); -RTCD_EXTERN unsigned int (*vpx_avg_8x8)(const uint8_t *, int p); - -void vpx_comp_avg_pred_c(uint8_t *comp_pred, const uint8_t *pred, int width, int height, const uint8_t *ref, int ref_stride); -#define vpx_comp_avg_pred vpx_comp_avg_pred_c - -void vpx_convolve8_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -void vpx_convolve8_neon(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -RTCD_EXTERN void (*vpx_convolve8)(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); - -void vpx_convolve8_avg_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -void vpx_convolve8_avg_neon(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -RTCD_EXTERN void (*vpx_convolve8_avg)(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); - -void vpx_convolve8_avg_horiz_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -void vpx_convolve8_avg_horiz_neon(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -RTCD_EXTERN void (*vpx_convolve8_avg_horiz)(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); - -void vpx_convolve8_avg_vert_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -void vpx_convolve8_avg_vert_neon(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -RTCD_EXTERN void (*vpx_convolve8_avg_vert)(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); - -void vpx_convolve8_horiz_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -void vpx_convolve8_horiz_neon(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -RTCD_EXTERN void (*vpx_convolve8_horiz)(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); - -void vpx_convolve8_vert_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -void vpx_convolve8_vert_neon(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -RTCD_EXTERN void (*vpx_convolve8_vert)(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); - -void vpx_convolve_avg_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -void vpx_convolve_avg_neon(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -RTCD_EXTERN void (*vpx_convolve_avg)(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); - -void vpx_convolve_copy_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -void vpx_convolve_copy_neon(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -RTCD_EXTERN void (*vpx_convolve_copy)(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); - -void vpx_d117_predictor_16x16_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d117_predictor_16x16 vpx_d117_predictor_16x16_c - -void vpx_d117_predictor_32x32_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d117_predictor_32x32 vpx_d117_predictor_32x32_c - -void vpx_d117_predictor_4x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d117_predictor_4x4 vpx_d117_predictor_4x4_c - -void vpx_d117_predictor_8x8_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d117_predictor_8x8 vpx_d117_predictor_8x8_c - -void vpx_d135_predictor_16x16_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_d135_predictor_16x16_neon(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -RTCD_EXTERN void (*vpx_d135_predictor_16x16)(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); - -void vpx_d135_predictor_32x32_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_d135_predictor_32x32_neon(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -RTCD_EXTERN void (*vpx_d135_predictor_32x32)(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); - -void vpx_d135_predictor_4x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_d135_predictor_4x4_neon(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -RTCD_EXTERN void (*vpx_d135_predictor_4x4)(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); - -void vpx_d135_predictor_8x8_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_d135_predictor_8x8_neon(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -RTCD_EXTERN void (*vpx_d135_predictor_8x8)(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); - -void vpx_d153_predictor_16x16_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d153_predictor_16x16 vpx_d153_predictor_16x16_c - -void vpx_d153_predictor_32x32_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d153_predictor_32x32 vpx_d153_predictor_32x32_c - -void vpx_d153_predictor_4x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d153_predictor_4x4 vpx_d153_predictor_4x4_c - -void vpx_d153_predictor_8x8_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d153_predictor_8x8 vpx_d153_predictor_8x8_c - -void vpx_d207_predictor_16x16_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d207_predictor_16x16 vpx_d207_predictor_16x16_c - -void vpx_d207_predictor_32x32_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d207_predictor_32x32 vpx_d207_predictor_32x32_c - -void vpx_d207_predictor_4x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d207_predictor_4x4 vpx_d207_predictor_4x4_c - -void vpx_d207_predictor_8x8_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d207_predictor_8x8 vpx_d207_predictor_8x8_c - -void vpx_d207e_predictor_16x16_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d207e_predictor_16x16 vpx_d207e_predictor_16x16_c - -void vpx_d207e_predictor_32x32_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d207e_predictor_32x32 vpx_d207e_predictor_32x32_c - -void vpx_d207e_predictor_4x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d207e_predictor_4x4 vpx_d207e_predictor_4x4_c - -void vpx_d207e_predictor_8x8_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d207e_predictor_8x8 vpx_d207e_predictor_8x8_c - -void vpx_d45_predictor_16x16_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_d45_predictor_16x16_neon(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -RTCD_EXTERN void (*vpx_d45_predictor_16x16)(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); - -void vpx_d45_predictor_32x32_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_d45_predictor_32x32_neon(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -RTCD_EXTERN void (*vpx_d45_predictor_32x32)(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); - -void vpx_d45_predictor_4x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_d45_predictor_4x4_neon(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -RTCD_EXTERN void (*vpx_d45_predictor_4x4)(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); - -void vpx_d45_predictor_8x8_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_d45_predictor_8x8_neon(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -RTCD_EXTERN void (*vpx_d45_predictor_8x8)(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); - -void vpx_d45e_predictor_16x16_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d45e_predictor_16x16 vpx_d45e_predictor_16x16_c - -void vpx_d45e_predictor_32x32_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d45e_predictor_32x32 vpx_d45e_predictor_32x32_c - -void vpx_d45e_predictor_4x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d45e_predictor_4x4 vpx_d45e_predictor_4x4_c - -void vpx_d45e_predictor_8x8_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d45e_predictor_8x8 vpx_d45e_predictor_8x8_c - -void vpx_d63_predictor_16x16_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d63_predictor_16x16 vpx_d63_predictor_16x16_c - -void vpx_d63_predictor_32x32_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d63_predictor_32x32 vpx_d63_predictor_32x32_c - -void vpx_d63_predictor_4x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d63_predictor_4x4 vpx_d63_predictor_4x4_c - -void vpx_d63_predictor_8x8_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d63_predictor_8x8 vpx_d63_predictor_8x8_c - -void vpx_d63e_predictor_16x16_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d63e_predictor_16x16 vpx_d63e_predictor_16x16_c - -void vpx_d63e_predictor_32x32_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d63e_predictor_32x32 vpx_d63e_predictor_32x32_c - -void vpx_d63e_predictor_4x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d63e_predictor_4x4 vpx_d63e_predictor_4x4_c - -void vpx_d63e_predictor_8x8_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d63e_predictor_8x8 vpx_d63e_predictor_8x8_c - -void vpx_d63f_predictor_4x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d63f_predictor_4x4 vpx_d63f_predictor_4x4_c - -void vpx_dc_128_predictor_16x16_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_dc_128_predictor_16x16_neon(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -RTCD_EXTERN void (*vpx_dc_128_predictor_16x16)(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); - -void vpx_dc_128_predictor_32x32_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_dc_128_predictor_32x32_neon(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -RTCD_EXTERN void (*vpx_dc_128_predictor_32x32)(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); - -void vpx_dc_128_predictor_4x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_dc_128_predictor_4x4_neon(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -RTCD_EXTERN void (*vpx_dc_128_predictor_4x4)(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); - -void vpx_dc_128_predictor_8x8_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_dc_128_predictor_8x8_neon(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -RTCD_EXTERN void (*vpx_dc_128_predictor_8x8)(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); - -void vpx_dc_left_predictor_16x16_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_dc_left_predictor_16x16_neon(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -RTCD_EXTERN void (*vpx_dc_left_predictor_16x16)(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); - -void vpx_dc_left_predictor_32x32_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_dc_left_predictor_32x32_neon(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -RTCD_EXTERN void (*vpx_dc_left_predictor_32x32)(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); - -void vpx_dc_left_predictor_4x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_dc_left_predictor_4x4_neon(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -RTCD_EXTERN void (*vpx_dc_left_predictor_4x4)(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); - -void vpx_dc_left_predictor_8x8_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_dc_left_predictor_8x8_neon(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -RTCD_EXTERN void (*vpx_dc_left_predictor_8x8)(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); - -void vpx_dc_predictor_16x16_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_dc_predictor_16x16_neon(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -RTCD_EXTERN void (*vpx_dc_predictor_16x16)(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); - -void vpx_dc_predictor_32x32_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_dc_predictor_32x32_neon(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -RTCD_EXTERN void (*vpx_dc_predictor_32x32)(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); - -void vpx_dc_predictor_4x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_dc_predictor_4x4_neon(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -RTCD_EXTERN void (*vpx_dc_predictor_4x4)(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); - -void vpx_dc_predictor_8x8_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_dc_predictor_8x8_neon(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -RTCD_EXTERN void (*vpx_dc_predictor_8x8)(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); - -void vpx_dc_top_predictor_16x16_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_dc_top_predictor_16x16_neon(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -RTCD_EXTERN void (*vpx_dc_top_predictor_16x16)(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); - -void vpx_dc_top_predictor_32x32_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_dc_top_predictor_32x32_neon(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -RTCD_EXTERN void (*vpx_dc_top_predictor_32x32)(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); - -void vpx_dc_top_predictor_4x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_dc_top_predictor_4x4_neon(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -RTCD_EXTERN void (*vpx_dc_top_predictor_4x4)(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); - -void vpx_dc_top_predictor_8x8_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_dc_top_predictor_8x8_neon(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -RTCD_EXTERN void (*vpx_dc_top_predictor_8x8)(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); - -void vpx_fdct16x16_c(const int16_t *input, tran_low_t *output, int stride); -#define vpx_fdct16x16 vpx_fdct16x16_c - -void vpx_fdct16x16_1_c(const int16_t *input, tran_low_t *output, int stride); -#define vpx_fdct16x16_1 vpx_fdct16x16_1_c - -void vpx_fdct32x32_c(const int16_t *input, tran_low_t *output, int stride); -#define vpx_fdct32x32 vpx_fdct32x32_c - -void vpx_fdct32x32_1_c(const int16_t *input, tran_low_t *output, int stride); -#define vpx_fdct32x32_1 vpx_fdct32x32_1_c - -void vpx_fdct32x32_rd_c(const int16_t *input, tran_low_t *output, int stride); -#define vpx_fdct32x32_rd vpx_fdct32x32_rd_c - -void vpx_fdct4x4_c(const int16_t *input, tran_low_t *output, int stride); -#define vpx_fdct4x4 vpx_fdct4x4_c - -void vpx_fdct4x4_1_c(const int16_t *input, tran_low_t *output, int stride); -#define vpx_fdct4x4_1 vpx_fdct4x4_1_c - -void vpx_fdct8x8_c(const int16_t *input, tran_low_t *output, int stride); -void vpx_fdct8x8_neon(const int16_t *input, tran_low_t *output, int stride); -RTCD_EXTERN void (*vpx_fdct8x8)(const int16_t *input, tran_low_t *output, int stride); - -void vpx_fdct8x8_1_c(const int16_t *input, tran_low_t *output, int stride); -void vpx_fdct8x8_1_neon(const int16_t *input, tran_low_t *output, int stride); -RTCD_EXTERN void (*vpx_fdct8x8_1)(const int16_t *input, tran_low_t *output, int stride); - -void vpx_get16x16var_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse, int *sum); -void vpx_get16x16var_neon(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse, int *sum); -RTCD_EXTERN void (*vpx_get16x16var)(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse, int *sum); - -unsigned int vpx_get4x4sse_cs_c(const unsigned char *src_ptr, int source_stride, const unsigned char *ref_ptr, int ref_stride); -unsigned int vpx_get4x4sse_cs_neon(const unsigned char *src_ptr, int source_stride, const unsigned char *ref_ptr, int ref_stride); -RTCD_EXTERN unsigned int (*vpx_get4x4sse_cs)(const unsigned char *src_ptr, int source_stride, const unsigned char *ref_ptr, int ref_stride); - -void vpx_get8x8var_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse, int *sum); -void vpx_get8x8var_neon(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse, int *sum); -RTCD_EXTERN void (*vpx_get8x8var)(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse, int *sum); - -unsigned int vpx_get_mb_ss_c(const int16_t *); -#define vpx_get_mb_ss vpx_get_mb_ss_c - -void vpx_h_predictor_16x16_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_h_predictor_16x16_neon(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -RTCD_EXTERN void (*vpx_h_predictor_16x16)(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); - -void vpx_h_predictor_32x32_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_h_predictor_32x32_neon(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -RTCD_EXTERN void (*vpx_h_predictor_32x32)(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); - -void vpx_h_predictor_4x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_h_predictor_4x4_neon(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -RTCD_EXTERN void (*vpx_h_predictor_4x4)(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); - -void vpx_h_predictor_8x8_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_h_predictor_8x8_neon(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -RTCD_EXTERN void (*vpx_h_predictor_8x8)(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); - -void vpx_hadamard_16x16_c(const int16_t *src_diff, int src_stride, int16_t *coeff); -void vpx_hadamard_16x16_neon(const int16_t *src_diff, int src_stride, int16_t *coeff); -RTCD_EXTERN void (*vpx_hadamard_16x16)(const int16_t *src_diff, int src_stride, int16_t *coeff); - -void vpx_hadamard_8x8_c(const int16_t *src_diff, int src_stride, int16_t *coeff); -void vpx_hadamard_8x8_neon(const int16_t *src_diff, int src_stride, int16_t *coeff); -RTCD_EXTERN void (*vpx_hadamard_8x8)(const int16_t *src_diff, int src_stride, int16_t *coeff); - -void vpx_he_predictor_4x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_he_predictor_4x4 vpx_he_predictor_4x4_c - -void vpx_idct16x16_10_add_c(const tran_low_t *input, uint8_t *dest, int stride); -void vpx_idct16x16_10_add_neon(const tran_low_t *input, uint8_t *dest, int stride); -RTCD_EXTERN void (*vpx_idct16x16_10_add)(const tran_low_t *input, uint8_t *dest, int stride); - -void vpx_idct16x16_1_add_c(const tran_low_t *input, uint8_t *dest, int stride); -void vpx_idct16x16_1_add_neon(const tran_low_t *input, uint8_t *dest, int stride); -RTCD_EXTERN void (*vpx_idct16x16_1_add)(const tran_low_t *input, uint8_t *dest, int stride); - -void vpx_idct16x16_256_add_c(const tran_low_t *input, uint8_t *dest, int stride); -void vpx_idct16x16_256_add_neon(const tran_low_t *input, uint8_t *dest, int stride); -RTCD_EXTERN void (*vpx_idct16x16_256_add)(const tran_low_t *input, uint8_t *dest, int stride); - -void vpx_idct32x32_1024_add_c(const tran_low_t *input, uint8_t *dest, int stride); -void vpx_idct32x32_1024_add_neon(const tran_low_t *input, uint8_t *dest, int stride); -RTCD_EXTERN void (*vpx_idct32x32_1024_add)(const tran_low_t *input, uint8_t *dest, int stride); - -void vpx_idct32x32_135_add_c(const tran_low_t *input, uint8_t *dest, int stride); -void vpx_idct32x32_135_add_neon(const tran_low_t *input, uint8_t *dest, int stride); -RTCD_EXTERN void (*vpx_idct32x32_135_add)(const tran_low_t *input, uint8_t *dest, int stride); - -void vpx_idct32x32_1_add_c(const tran_low_t *input, uint8_t *dest, int stride); -void vpx_idct32x32_1_add_neon(const tran_low_t *input, uint8_t *dest, int stride); -RTCD_EXTERN void (*vpx_idct32x32_1_add)(const tran_low_t *input, uint8_t *dest, int stride); - -void vpx_idct32x32_34_add_c(const tran_low_t *input, uint8_t *dest, int stride); -void vpx_idct32x32_34_add_neon(const tran_low_t *input, uint8_t *dest, int stride); -RTCD_EXTERN void (*vpx_idct32x32_34_add)(const tran_low_t *input, uint8_t *dest, int stride); - -void vpx_idct4x4_16_add_c(const tran_low_t *input, uint8_t *dest, int stride); -void vpx_idct4x4_16_add_neon(const tran_low_t *input, uint8_t *dest, int stride); -RTCD_EXTERN void (*vpx_idct4x4_16_add)(const tran_low_t *input, uint8_t *dest, int stride); - -void vpx_idct4x4_1_add_c(const tran_low_t *input, uint8_t *dest, int stride); -void vpx_idct4x4_1_add_neon(const tran_low_t *input, uint8_t *dest, int stride); -RTCD_EXTERN void (*vpx_idct4x4_1_add)(const tran_low_t *input, uint8_t *dest, int stride); - -void vpx_idct8x8_12_add_c(const tran_low_t *input, uint8_t *dest, int stride); -void vpx_idct8x8_12_add_neon(const tran_low_t *input, uint8_t *dest, int stride); -RTCD_EXTERN void (*vpx_idct8x8_12_add)(const tran_low_t *input, uint8_t *dest, int stride); - -void vpx_idct8x8_1_add_c(const tran_low_t *input, uint8_t *dest, int stride); -void vpx_idct8x8_1_add_neon(const tran_low_t *input, uint8_t *dest, int stride); -RTCD_EXTERN void (*vpx_idct8x8_1_add)(const tran_low_t *input, uint8_t *dest, int stride); - -void vpx_idct8x8_64_add_c(const tran_low_t *input, uint8_t *dest, int stride); -void vpx_idct8x8_64_add_neon(const tran_low_t *input, uint8_t *dest, int stride); -RTCD_EXTERN void (*vpx_idct8x8_64_add)(const tran_low_t *input, uint8_t *dest, int stride); - -int16_t vpx_int_pro_col_c(const uint8_t *ref, const int width); -int16_t vpx_int_pro_col_neon(const uint8_t *ref, const int width); -RTCD_EXTERN int16_t (*vpx_int_pro_col)(const uint8_t *ref, const int width); - -void vpx_int_pro_row_c(int16_t *hbuf, const uint8_t *ref, const int ref_stride, const int height); -void vpx_int_pro_row_neon(int16_t *hbuf, const uint8_t *ref, const int ref_stride, const int height); -RTCD_EXTERN void (*vpx_int_pro_row)(int16_t *hbuf, const uint8_t *ref, const int ref_stride, const int height); - -void vpx_iwht4x4_16_add_c(const tran_low_t *input, uint8_t *dest, int stride); -#define vpx_iwht4x4_16_add vpx_iwht4x4_16_add_c - -void vpx_iwht4x4_1_add_c(const tran_low_t *input, uint8_t *dest, int stride); -#define vpx_iwht4x4_1_add vpx_iwht4x4_1_add_c - -void vpx_lpf_horizontal_16_c(uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh); -void vpx_lpf_horizontal_16_neon(uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh); -RTCD_EXTERN void (*vpx_lpf_horizontal_16)(uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh); - -void vpx_lpf_horizontal_16_dual_c(uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh); -void vpx_lpf_horizontal_16_dual_neon(uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh); -RTCD_EXTERN void (*vpx_lpf_horizontal_16_dual)(uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh); - -void vpx_lpf_horizontal_4_c(uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh); -void vpx_lpf_horizontal_4_neon(uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh); -RTCD_EXTERN void (*vpx_lpf_horizontal_4)(uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh); - -void vpx_lpf_horizontal_4_dual_c(uint8_t *s, int pitch, const uint8_t *blimit0, const uint8_t *limit0, const uint8_t *thresh0, const uint8_t *blimit1, const uint8_t *limit1, const uint8_t *thresh1); -void vpx_lpf_horizontal_4_dual_neon(uint8_t *s, int pitch, const uint8_t *blimit0, const uint8_t *limit0, const uint8_t *thresh0, const uint8_t *blimit1, const uint8_t *limit1, const uint8_t *thresh1); -RTCD_EXTERN void (*vpx_lpf_horizontal_4_dual)(uint8_t *s, int pitch, const uint8_t *blimit0, const uint8_t *limit0, const uint8_t *thresh0, const uint8_t *blimit1, const uint8_t *limit1, const uint8_t *thresh1); - -void vpx_lpf_horizontal_8_c(uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh); -void vpx_lpf_horizontal_8_neon(uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh); -RTCD_EXTERN void (*vpx_lpf_horizontal_8)(uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh); - -void vpx_lpf_horizontal_8_dual_c(uint8_t *s, int pitch, const uint8_t *blimit0, const uint8_t *limit0, const uint8_t *thresh0, const uint8_t *blimit1, const uint8_t *limit1, const uint8_t *thresh1); -void vpx_lpf_horizontal_8_dual_neon(uint8_t *s, int pitch, const uint8_t *blimit0, const uint8_t *limit0, const uint8_t *thresh0, const uint8_t *blimit1, const uint8_t *limit1, const uint8_t *thresh1); -RTCD_EXTERN void (*vpx_lpf_horizontal_8_dual)(uint8_t *s, int pitch, const uint8_t *blimit0, const uint8_t *limit0, const uint8_t *thresh0, const uint8_t *blimit1, const uint8_t *limit1, const uint8_t *thresh1); - -void vpx_lpf_vertical_16_c(uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh); -void vpx_lpf_vertical_16_neon(uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh); -RTCD_EXTERN void (*vpx_lpf_vertical_16)(uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh); - -void vpx_lpf_vertical_16_dual_c(uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh); -void vpx_lpf_vertical_16_dual_neon(uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh); -RTCD_EXTERN void (*vpx_lpf_vertical_16_dual)(uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh); - -void vpx_lpf_vertical_4_c(uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh); -void vpx_lpf_vertical_4_neon(uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh); -RTCD_EXTERN void (*vpx_lpf_vertical_4)(uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh); - -void vpx_lpf_vertical_4_dual_c(uint8_t *s, int pitch, const uint8_t *blimit0, const uint8_t *limit0, const uint8_t *thresh0, const uint8_t *blimit1, const uint8_t *limit1, const uint8_t *thresh1); -void vpx_lpf_vertical_4_dual_neon(uint8_t *s, int pitch, const uint8_t *blimit0, const uint8_t *limit0, const uint8_t *thresh0, const uint8_t *blimit1, const uint8_t *limit1, const uint8_t *thresh1); -RTCD_EXTERN void (*vpx_lpf_vertical_4_dual)(uint8_t *s, int pitch, const uint8_t *blimit0, const uint8_t *limit0, const uint8_t *thresh0, const uint8_t *blimit1, const uint8_t *limit1, const uint8_t *thresh1); - -void vpx_lpf_vertical_8_c(uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh); -void vpx_lpf_vertical_8_neon(uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh); -RTCD_EXTERN void (*vpx_lpf_vertical_8)(uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh); - -void vpx_lpf_vertical_8_dual_c(uint8_t *s, int pitch, const uint8_t *blimit0, const uint8_t *limit0, const uint8_t *thresh0, const uint8_t *blimit1, const uint8_t *limit1, const uint8_t *thresh1); -void vpx_lpf_vertical_8_dual_neon(uint8_t *s, int pitch, const uint8_t *blimit0, const uint8_t *limit0, const uint8_t *thresh0, const uint8_t *blimit1, const uint8_t *limit1, const uint8_t *thresh1); -RTCD_EXTERN void (*vpx_lpf_vertical_8_dual)(uint8_t *s, int pitch, const uint8_t *blimit0, const uint8_t *limit0, const uint8_t *thresh0, const uint8_t *blimit1, const uint8_t *limit1, const uint8_t *thresh1); - -void vpx_mbpost_proc_across_ip_c(unsigned char *dst, int pitch, int rows, int cols,int flimit); -void vpx_mbpost_proc_across_ip_neon(unsigned char *dst, int pitch, int rows, int cols,int flimit); -RTCD_EXTERN void (*vpx_mbpost_proc_across_ip)(unsigned char *dst, int pitch, int rows, int cols,int flimit); - -void vpx_mbpost_proc_down_c(unsigned char *dst, int pitch, int rows, int cols,int flimit); -void vpx_mbpost_proc_down_neon(unsigned char *dst, int pitch, int rows, int cols,int flimit); -RTCD_EXTERN void (*vpx_mbpost_proc_down)(unsigned char *dst, int pitch, int rows, int cols,int flimit); - -void vpx_minmax_8x8_c(const uint8_t *s, int p, const uint8_t *d, int dp, int *min, int *max); -void vpx_minmax_8x8_neon(const uint8_t *s, int p, const uint8_t *d, int dp, int *min, int *max); -RTCD_EXTERN void (*vpx_minmax_8x8)(const uint8_t *s, int p, const uint8_t *d, int dp, int *min, int *max); - -unsigned int vpx_mse16x16_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int recon_stride, unsigned int *sse); -unsigned int vpx_mse16x16_neon(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int recon_stride, unsigned int *sse); -RTCD_EXTERN unsigned int (*vpx_mse16x16)(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int recon_stride, unsigned int *sse); - -unsigned int vpx_mse16x8_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int recon_stride, unsigned int *sse); -#define vpx_mse16x8 vpx_mse16x8_c - -unsigned int vpx_mse8x16_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int recon_stride, unsigned int *sse); -#define vpx_mse8x16 vpx_mse8x16_c - -unsigned int vpx_mse8x8_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int recon_stride, unsigned int *sse); -#define vpx_mse8x8 vpx_mse8x8_c - -void vpx_plane_add_noise_c(uint8_t *start, const int8_t *noise, int blackclamp, int whiteclamp, int width, int height, int pitch); -#define vpx_plane_add_noise vpx_plane_add_noise_c - -void vpx_post_proc_down_and_across_mb_row_c(unsigned char *src, unsigned char *dst, int src_pitch, int dst_pitch, int cols, unsigned char *flimits, int size); -void vpx_post_proc_down_and_across_mb_row_neon(unsigned char *src, unsigned char *dst, int src_pitch, int dst_pitch, int cols, unsigned char *flimits, int size); -RTCD_EXTERN void (*vpx_post_proc_down_and_across_mb_row)(unsigned char *src, unsigned char *dst, int src_pitch, int dst_pitch, int cols, unsigned char *flimits, int size); - -void vpx_quantize_b_c(const tran_low_t *coeff_ptr, intptr_t n_coeffs, int skip_block, const int16_t *zbin_ptr, const int16_t *round_ptr, const int16_t *quant_ptr, const int16_t *quant_shift_ptr, tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr, const int16_t *dequant_ptr, uint16_t *eob_ptr, const int16_t *scan, const int16_t *iscan); -#define vpx_quantize_b vpx_quantize_b_c - -void vpx_quantize_b_32x32_c(const tran_low_t *coeff_ptr, intptr_t n_coeffs, int skip_block, const int16_t *zbin_ptr, const int16_t *round_ptr, const int16_t *quant_ptr, const int16_t *quant_shift_ptr, tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr, const int16_t *dequant_ptr, uint16_t *eob_ptr, const int16_t *scan, const int16_t *iscan); -#define vpx_quantize_b_32x32 vpx_quantize_b_32x32_c - -unsigned int vpx_sad16x16_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -unsigned int vpx_sad16x16_neon(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -RTCD_EXTERN unsigned int (*vpx_sad16x16)(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); - -unsigned int vpx_sad16x16_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -#define vpx_sad16x16_avg vpx_sad16x16_avg_c - -void vpx_sad16x16x3_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -#define vpx_sad16x16x3 vpx_sad16x16x3_c - -void vpx_sad16x16x4d_c(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); -void vpx_sad16x16x4d_neon(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); -RTCD_EXTERN void (*vpx_sad16x16x4d)(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); - -void vpx_sad16x16x8_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -#define vpx_sad16x16x8 vpx_sad16x16x8_c - -unsigned int vpx_sad16x32_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -#define vpx_sad16x32 vpx_sad16x32_c - -unsigned int vpx_sad16x32_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -#define vpx_sad16x32_avg vpx_sad16x32_avg_c - -void vpx_sad16x32x4d_c(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); -#define vpx_sad16x32x4d vpx_sad16x32x4d_c - -unsigned int vpx_sad16x8_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -unsigned int vpx_sad16x8_neon(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -RTCD_EXTERN unsigned int (*vpx_sad16x8)(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); - -unsigned int vpx_sad16x8_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -#define vpx_sad16x8_avg vpx_sad16x8_avg_c - -void vpx_sad16x8x3_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -#define vpx_sad16x8x3 vpx_sad16x8x3_c - -void vpx_sad16x8x4d_c(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); -#define vpx_sad16x8x4d vpx_sad16x8x4d_c - -void vpx_sad16x8x8_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -#define vpx_sad16x8x8 vpx_sad16x8x8_c - -unsigned int vpx_sad32x16_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -#define vpx_sad32x16 vpx_sad32x16_c - -unsigned int vpx_sad32x16_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -#define vpx_sad32x16_avg vpx_sad32x16_avg_c - -void vpx_sad32x16x4d_c(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); -#define vpx_sad32x16x4d vpx_sad32x16x4d_c - -unsigned int vpx_sad32x32_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -unsigned int vpx_sad32x32_neon(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -RTCD_EXTERN unsigned int (*vpx_sad32x32)(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); - -unsigned int vpx_sad32x32_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -#define vpx_sad32x32_avg vpx_sad32x32_avg_c - -void vpx_sad32x32x3_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -#define vpx_sad32x32x3 vpx_sad32x32x3_c - -void vpx_sad32x32x4d_c(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); -void vpx_sad32x32x4d_neon(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); -RTCD_EXTERN void (*vpx_sad32x32x4d)(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); - -void vpx_sad32x32x8_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -#define vpx_sad32x32x8 vpx_sad32x32x8_c - -unsigned int vpx_sad32x64_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -#define vpx_sad32x64 vpx_sad32x64_c - -unsigned int vpx_sad32x64_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -#define vpx_sad32x64_avg vpx_sad32x64_avg_c - -void vpx_sad32x64x4d_c(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); -#define vpx_sad32x64x4d vpx_sad32x64x4d_c - -unsigned int vpx_sad4x4_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -unsigned int vpx_sad4x4_neon(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -RTCD_EXTERN unsigned int (*vpx_sad4x4)(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); - -unsigned int vpx_sad4x4_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -#define vpx_sad4x4_avg vpx_sad4x4_avg_c - -void vpx_sad4x4x3_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -#define vpx_sad4x4x3 vpx_sad4x4x3_c - -void vpx_sad4x4x4d_c(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); -#define vpx_sad4x4x4d vpx_sad4x4x4d_c - -void vpx_sad4x4x8_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -#define vpx_sad4x4x8 vpx_sad4x4x8_c - -unsigned int vpx_sad4x8_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -#define vpx_sad4x8 vpx_sad4x8_c - -unsigned int vpx_sad4x8_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -#define vpx_sad4x8_avg vpx_sad4x8_avg_c - -void vpx_sad4x8x4d_c(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); -#define vpx_sad4x8x4d vpx_sad4x8x4d_c - -void vpx_sad4x8x8_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -#define vpx_sad4x8x8 vpx_sad4x8x8_c - -unsigned int vpx_sad64x32_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -#define vpx_sad64x32 vpx_sad64x32_c - -unsigned int vpx_sad64x32_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -#define vpx_sad64x32_avg vpx_sad64x32_avg_c - -void vpx_sad64x32x4d_c(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); -#define vpx_sad64x32x4d vpx_sad64x32x4d_c - -unsigned int vpx_sad64x64_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -unsigned int vpx_sad64x64_neon(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -RTCD_EXTERN unsigned int (*vpx_sad64x64)(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); - -unsigned int vpx_sad64x64_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -#define vpx_sad64x64_avg vpx_sad64x64_avg_c - -void vpx_sad64x64x3_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -#define vpx_sad64x64x3 vpx_sad64x64x3_c - -void vpx_sad64x64x4d_c(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); -void vpx_sad64x64x4d_neon(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); -RTCD_EXTERN void (*vpx_sad64x64x4d)(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); - -void vpx_sad64x64x8_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -#define vpx_sad64x64x8 vpx_sad64x64x8_c - -unsigned int vpx_sad8x16_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -unsigned int vpx_sad8x16_neon(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -RTCD_EXTERN unsigned int (*vpx_sad8x16)(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); - -unsigned int vpx_sad8x16_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -#define vpx_sad8x16_avg vpx_sad8x16_avg_c - -void vpx_sad8x16x3_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -#define vpx_sad8x16x3 vpx_sad8x16x3_c - -void vpx_sad8x16x4d_c(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); -#define vpx_sad8x16x4d vpx_sad8x16x4d_c - -void vpx_sad8x16x8_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -#define vpx_sad8x16x8 vpx_sad8x16x8_c - -unsigned int vpx_sad8x4_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -#define vpx_sad8x4 vpx_sad8x4_c - -unsigned int vpx_sad8x4_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -#define vpx_sad8x4_avg vpx_sad8x4_avg_c - -void vpx_sad8x4x4d_c(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); -#define vpx_sad8x4x4d vpx_sad8x4x4d_c - -void vpx_sad8x4x8_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -#define vpx_sad8x4x8 vpx_sad8x4x8_c - -unsigned int vpx_sad8x8_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -unsigned int vpx_sad8x8_neon(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -RTCD_EXTERN unsigned int (*vpx_sad8x8)(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); - -unsigned int vpx_sad8x8_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -#define vpx_sad8x8_avg vpx_sad8x8_avg_c - -void vpx_sad8x8x3_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -#define vpx_sad8x8x3 vpx_sad8x8x3_c - -void vpx_sad8x8x4d_c(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); -#define vpx_sad8x8x4d vpx_sad8x8x4d_c - -void vpx_sad8x8x8_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -#define vpx_sad8x8x8 vpx_sad8x8x8_c - -int vpx_satd_c(const int16_t *coeff, int length); -int vpx_satd_neon(const int16_t *coeff, int length); -RTCD_EXTERN int (*vpx_satd)(const int16_t *coeff, int length); - -void vpx_scaled_2d_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -#define vpx_scaled_2d vpx_scaled_2d_c - -void vpx_scaled_avg_2d_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -#define vpx_scaled_avg_2d vpx_scaled_avg_2d_c - -void vpx_scaled_avg_horiz_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -#define vpx_scaled_avg_horiz vpx_scaled_avg_horiz_c - -void vpx_scaled_avg_vert_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -#define vpx_scaled_avg_vert vpx_scaled_avg_vert_c - -void vpx_scaled_horiz_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -#define vpx_scaled_horiz vpx_scaled_horiz_c - -void vpx_scaled_vert_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -#define vpx_scaled_vert vpx_scaled_vert_c - -uint32_t vpx_sub_pixel_avg_variance16x16_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_sub_pixel_avg_variance16x16 vpx_sub_pixel_avg_variance16x16_c - -uint32_t vpx_sub_pixel_avg_variance16x32_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_sub_pixel_avg_variance16x32 vpx_sub_pixel_avg_variance16x32_c - -uint32_t vpx_sub_pixel_avg_variance16x8_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_sub_pixel_avg_variance16x8 vpx_sub_pixel_avg_variance16x8_c - -uint32_t vpx_sub_pixel_avg_variance32x16_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_sub_pixel_avg_variance32x16 vpx_sub_pixel_avg_variance32x16_c - -uint32_t vpx_sub_pixel_avg_variance32x32_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_sub_pixel_avg_variance32x32 vpx_sub_pixel_avg_variance32x32_c - -uint32_t vpx_sub_pixel_avg_variance32x64_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_sub_pixel_avg_variance32x64 vpx_sub_pixel_avg_variance32x64_c - -uint32_t vpx_sub_pixel_avg_variance4x4_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_sub_pixel_avg_variance4x4 vpx_sub_pixel_avg_variance4x4_c - -uint32_t vpx_sub_pixel_avg_variance4x8_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_sub_pixel_avg_variance4x8 vpx_sub_pixel_avg_variance4x8_c - -uint32_t vpx_sub_pixel_avg_variance64x32_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_sub_pixel_avg_variance64x32 vpx_sub_pixel_avg_variance64x32_c - -uint32_t vpx_sub_pixel_avg_variance64x64_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_sub_pixel_avg_variance64x64 vpx_sub_pixel_avg_variance64x64_c - -uint32_t vpx_sub_pixel_avg_variance8x16_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_sub_pixel_avg_variance8x16 vpx_sub_pixel_avg_variance8x16_c - -uint32_t vpx_sub_pixel_avg_variance8x4_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_sub_pixel_avg_variance8x4 vpx_sub_pixel_avg_variance8x4_c - -uint32_t vpx_sub_pixel_avg_variance8x8_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_sub_pixel_avg_variance8x8 vpx_sub_pixel_avg_variance8x8_c - -uint32_t vpx_sub_pixel_variance16x16_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_sub_pixel_variance16x16_neon(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -RTCD_EXTERN uint32_t (*vpx_sub_pixel_variance16x16)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); - -uint32_t vpx_sub_pixel_variance16x32_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -#define vpx_sub_pixel_variance16x32 vpx_sub_pixel_variance16x32_c - -uint32_t vpx_sub_pixel_variance16x8_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -#define vpx_sub_pixel_variance16x8 vpx_sub_pixel_variance16x8_c - -uint32_t vpx_sub_pixel_variance32x16_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -#define vpx_sub_pixel_variance32x16 vpx_sub_pixel_variance32x16_c - -uint32_t vpx_sub_pixel_variance32x32_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_sub_pixel_variance32x32_neon(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -RTCD_EXTERN uint32_t (*vpx_sub_pixel_variance32x32)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); - -uint32_t vpx_sub_pixel_variance32x64_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -#define vpx_sub_pixel_variance32x64 vpx_sub_pixel_variance32x64_c - -uint32_t vpx_sub_pixel_variance4x4_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -#define vpx_sub_pixel_variance4x4 vpx_sub_pixel_variance4x4_c - -uint32_t vpx_sub_pixel_variance4x8_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -#define vpx_sub_pixel_variance4x8 vpx_sub_pixel_variance4x8_c - -uint32_t vpx_sub_pixel_variance64x32_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -#define vpx_sub_pixel_variance64x32 vpx_sub_pixel_variance64x32_c - -uint32_t vpx_sub_pixel_variance64x64_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_sub_pixel_variance64x64_neon(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -RTCD_EXTERN uint32_t (*vpx_sub_pixel_variance64x64)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); - -uint32_t vpx_sub_pixel_variance8x16_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -#define vpx_sub_pixel_variance8x16 vpx_sub_pixel_variance8x16_c - -uint32_t vpx_sub_pixel_variance8x4_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -#define vpx_sub_pixel_variance8x4 vpx_sub_pixel_variance8x4_c - -uint32_t vpx_sub_pixel_variance8x8_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_sub_pixel_variance8x8_neon(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -RTCD_EXTERN uint32_t (*vpx_sub_pixel_variance8x8)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); - -void vpx_subtract_block_c(int rows, int cols, int16_t *diff_ptr, ptrdiff_t diff_stride, const uint8_t *src_ptr, ptrdiff_t src_stride, const uint8_t *pred_ptr, ptrdiff_t pred_stride); -void vpx_subtract_block_neon(int rows, int cols, int16_t *diff_ptr, ptrdiff_t diff_stride, const uint8_t *src_ptr, ptrdiff_t src_stride, const uint8_t *pred_ptr, ptrdiff_t pred_stride); -RTCD_EXTERN void (*vpx_subtract_block)(int rows, int cols, int16_t *diff_ptr, ptrdiff_t diff_stride, const uint8_t *src_ptr, ptrdiff_t src_stride, const uint8_t *pred_ptr, ptrdiff_t pred_stride); - -uint64_t vpx_sum_squares_2d_i16_c(const int16_t *src, int stride, int size); -#define vpx_sum_squares_2d_i16 vpx_sum_squares_2d_i16_c - -void vpx_tm_predictor_16x16_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_tm_predictor_16x16_neon(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -RTCD_EXTERN void (*vpx_tm_predictor_16x16)(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); - -void vpx_tm_predictor_32x32_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_tm_predictor_32x32_neon(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -RTCD_EXTERN void (*vpx_tm_predictor_32x32)(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); - -void vpx_tm_predictor_4x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_tm_predictor_4x4_neon(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -RTCD_EXTERN void (*vpx_tm_predictor_4x4)(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); - -void vpx_tm_predictor_8x8_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_tm_predictor_8x8_neon(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -RTCD_EXTERN void (*vpx_tm_predictor_8x8)(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); - -void vpx_v_predictor_16x16_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_v_predictor_16x16_neon(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -RTCD_EXTERN void (*vpx_v_predictor_16x16)(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); - -void vpx_v_predictor_32x32_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_v_predictor_32x32_neon(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -RTCD_EXTERN void (*vpx_v_predictor_32x32)(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); - -void vpx_v_predictor_4x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_v_predictor_4x4_neon(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -RTCD_EXTERN void (*vpx_v_predictor_4x4)(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); - -void vpx_v_predictor_8x8_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_v_predictor_8x8_neon(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -RTCD_EXTERN void (*vpx_v_predictor_8x8)(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); - -unsigned int vpx_variance16x16_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -unsigned int vpx_variance16x16_neon(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -RTCD_EXTERN unsigned int (*vpx_variance16x16)(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); - -unsigned int vpx_variance16x32_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_variance16x32 vpx_variance16x32_c - -unsigned int vpx_variance16x8_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -unsigned int vpx_variance16x8_neon(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -RTCD_EXTERN unsigned int (*vpx_variance16x8)(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); - -unsigned int vpx_variance32x16_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_variance32x16 vpx_variance32x16_c - -unsigned int vpx_variance32x32_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -unsigned int vpx_variance32x32_neon(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -RTCD_EXTERN unsigned int (*vpx_variance32x32)(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); - -unsigned int vpx_variance32x64_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -unsigned int vpx_variance32x64_neon(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -RTCD_EXTERN unsigned int (*vpx_variance32x64)(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); - -unsigned int vpx_variance4x4_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_variance4x4 vpx_variance4x4_c - -unsigned int vpx_variance4x8_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_variance4x8 vpx_variance4x8_c - -unsigned int vpx_variance64x32_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -unsigned int vpx_variance64x32_neon(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -RTCD_EXTERN unsigned int (*vpx_variance64x32)(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); - -unsigned int vpx_variance64x64_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -unsigned int vpx_variance64x64_neon(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -RTCD_EXTERN unsigned int (*vpx_variance64x64)(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); - -unsigned int vpx_variance8x16_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -unsigned int vpx_variance8x16_neon(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -RTCD_EXTERN unsigned int (*vpx_variance8x16)(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); - -unsigned int vpx_variance8x4_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_variance8x4 vpx_variance8x4_c - -unsigned int vpx_variance8x8_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -unsigned int vpx_variance8x8_neon(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -RTCD_EXTERN unsigned int (*vpx_variance8x8)(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); - -void vpx_ve_predictor_4x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_ve_predictor_4x4 vpx_ve_predictor_4x4_c - -int vpx_vector_var_c(const int16_t *ref, const int16_t *src, const int bwl); -int vpx_vector_var_neon(const int16_t *ref, const int16_t *src, const int bwl); -RTCD_EXTERN int (*vpx_vector_var)(const int16_t *ref, const int16_t *src, const int bwl); - -void vpx_dsp_rtcd(void); - -#include "vpx_config.h" - -#ifdef RTCD_C -#include "vpx_ports/arm.h" -static void setup_rtcd_internal(void) -{ - int flags = arm_cpu_caps(); - - (void)flags; - - vpx_avg_4x4 = vpx_avg_4x4_c; - if (flags & HAS_NEON) vpx_avg_4x4 = vpx_avg_4x4_neon; - vpx_avg_8x8 = vpx_avg_8x8_c; - if (flags & HAS_NEON) vpx_avg_8x8 = vpx_avg_8x8_neon; - vpx_convolve8 = vpx_convolve8_c; - if (flags & HAS_NEON) vpx_convolve8 = vpx_convolve8_neon; - vpx_convolve8_avg = vpx_convolve8_avg_c; - if (flags & HAS_NEON) vpx_convolve8_avg = vpx_convolve8_avg_neon; - vpx_convolve8_avg_horiz = vpx_convolve8_avg_horiz_c; - if (flags & HAS_NEON) vpx_convolve8_avg_horiz = vpx_convolve8_avg_horiz_neon; - vpx_convolve8_avg_vert = vpx_convolve8_avg_vert_c; - if (flags & HAS_NEON) vpx_convolve8_avg_vert = vpx_convolve8_avg_vert_neon; - vpx_convolve8_horiz = vpx_convolve8_horiz_c; - if (flags & HAS_NEON) vpx_convolve8_horiz = vpx_convolve8_horiz_neon; - vpx_convolve8_vert = vpx_convolve8_vert_c; - if (flags & HAS_NEON) vpx_convolve8_vert = vpx_convolve8_vert_neon; - vpx_convolve_avg = vpx_convolve_avg_c; - if (flags & HAS_NEON) vpx_convolve_avg = vpx_convolve_avg_neon; - vpx_convolve_copy = vpx_convolve_copy_c; - if (flags & HAS_NEON) vpx_convolve_copy = vpx_convolve_copy_neon; - vpx_d135_predictor_16x16 = vpx_d135_predictor_16x16_c; - if (flags & HAS_NEON) vpx_d135_predictor_16x16 = vpx_d135_predictor_16x16_neon; - vpx_d135_predictor_32x32 = vpx_d135_predictor_32x32_c; - if (flags & HAS_NEON) vpx_d135_predictor_32x32 = vpx_d135_predictor_32x32_neon; - vpx_d135_predictor_4x4 = vpx_d135_predictor_4x4_c; - if (flags & HAS_NEON) vpx_d135_predictor_4x4 = vpx_d135_predictor_4x4_neon; - vpx_d135_predictor_8x8 = vpx_d135_predictor_8x8_c; - if (flags & HAS_NEON) vpx_d135_predictor_8x8 = vpx_d135_predictor_8x8_neon; - vpx_d45_predictor_16x16 = vpx_d45_predictor_16x16_c; - if (flags & HAS_NEON) vpx_d45_predictor_16x16 = vpx_d45_predictor_16x16_neon; - vpx_d45_predictor_32x32 = vpx_d45_predictor_32x32_c; - if (flags & HAS_NEON) vpx_d45_predictor_32x32 = vpx_d45_predictor_32x32_neon; - vpx_d45_predictor_4x4 = vpx_d45_predictor_4x4_c; - if (flags & HAS_NEON) vpx_d45_predictor_4x4 = vpx_d45_predictor_4x4_neon; - vpx_d45_predictor_8x8 = vpx_d45_predictor_8x8_c; - if (flags & HAS_NEON) vpx_d45_predictor_8x8 = vpx_d45_predictor_8x8_neon; - vpx_dc_128_predictor_16x16 = vpx_dc_128_predictor_16x16_c; - if (flags & HAS_NEON) vpx_dc_128_predictor_16x16 = vpx_dc_128_predictor_16x16_neon; - vpx_dc_128_predictor_32x32 = vpx_dc_128_predictor_32x32_c; - if (flags & HAS_NEON) vpx_dc_128_predictor_32x32 = vpx_dc_128_predictor_32x32_neon; - vpx_dc_128_predictor_4x4 = vpx_dc_128_predictor_4x4_c; - if (flags & HAS_NEON) vpx_dc_128_predictor_4x4 = vpx_dc_128_predictor_4x4_neon; - vpx_dc_128_predictor_8x8 = vpx_dc_128_predictor_8x8_c; - if (flags & HAS_NEON) vpx_dc_128_predictor_8x8 = vpx_dc_128_predictor_8x8_neon; - vpx_dc_left_predictor_16x16 = vpx_dc_left_predictor_16x16_c; - if (flags & HAS_NEON) vpx_dc_left_predictor_16x16 = vpx_dc_left_predictor_16x16_neon; - vpx_dc_left_predictor_32x32 = vpx_dc_left_predictor_32x32_c; - if (flags & HAS_NEON) vpx_dc_left_predictor_32x32 = vpx_dc_left_predictor_32x32_neon; - vpx_dc_left_predictor_4x4 = vpx_dc_left_predictor_4x4_c; - if (flags & HAS_NEON) vpx_dc_left_predictor_4x4 = vpx_dc_left_predictor_4x4_neon; - vpx_dc_left_predictor_8x8 = vpx_dc_left_predictor_8x8_c; - if (flags & HAS_NEON) vpx_dc_left_predictor_8x8 = vpx_dc_left_predictor_8x8_neon; - vpx_dc_predictor_16x16 = vpx_dc_predictor_16x16_c; - if (flags & HAS_NEON) vpx_dc_predictor_16x16 = vpx_dc_predictor_16x16_neon; - vpx_dc_predictor_32x32 = vpx_dc_predictor_32x32_c; - if (flags & HAS_NEON) vpx_dc_predictor_32x32 = vpx_dc_predictor_32x32_neon; - vpx_dc_predictor_4x4 = vpx_dc_predictor_4x4_c; - if (flags & HAS_NEON) vpx_dc_predictor_4x4 = vpx_dc_predictor_4x4_neon; - vpx_dc_predictor_8x8 = vpx_dc_predictor_8x8_c; - if (flags & HAS_NEON) vpx_dc_predictor_8x8 = vpx_dc_predictor_8x8_neon; - vpx_dc_top_predictor_16x16 = vpx_dc_top_predictor_16x16_c; - if (flags & HAS_NEON) vpx_dc_top_predictor_16x16 = vpx_dc_top_predictor_16x16_neon; - vpx_dc_top_predictor_32x32 = vpx_dc_top_predictor_32x32_c; - if (flags & HAS_NEON) vpx_dc_top_predictor_32x32 = vpx_dc_top_predictor_32x32_neon; - vpx_dc_top_predictor_4x4 = vpx_dc_top_predictor_4x4_c; - if (flags & HAS_NEON) vpx_dc_top_predictor_4x4 = vpx_dc_top_predictor_4x4_neon; - vpx_dc_top_predictor_8x8 = vpx_dc_top_predictor_8x8_c; - if (flags & HAS_NEON) vpx_dc_top_predictor_8x8 = vpx_dc_top_predictor_8x8_neon; - vpx_fdct8x8 = vpx_fdct8x8_c; - if (flags & HAS_NEON) vpx_fdct8x8 = vpx_fdct8x8_neon; - vpx_fdct8x8_1 = vpx_fdct8x8_1_c; - if (flags & HAS_NEON) vpx_fdct8x8_1 = vpx_fdct8x8_1_neon; - vpx_get16x16var = vpx_get16x16var_c; - if (flags & HAS_NEON) vpx_get16x16var = vpx_get16x16var_neon; - vpx_get4x4sse_cs = vpx_get4x4sse_cs_c; - if (flags & HAS_NEON) vpx_get4x4sse_cs = vpx_get4x4sse_cs_neon; - vpx_get8x8var = vpx_get8x8var_c; - if (flags & HAS_NEON) vpx_get8x8var = vpx_get8x8var_neon; - vpx_h_predictor_16x16 = vpx_h_predictor_16x16_c; - if (flags & HAS_NEON) vpx_h_predictor_16x16 = vpx_h_predictor_16x16_neon; - vpx_h_predictor_32x32 = vpx_h_predictor_32x32_c; - if (flags & HAS_NEON) vpx_h_predictor_32x32 = vpx_h_predictor_32x32_neon; - vpx_h_predictor_4x4 = vpx_h_predictor_4x4_c; - if (flags & HAS_NEON) vpx_h_predictor_4x4 = vpx_h_predictor_4x4_neon; - vpx_h_predictor_8x8 = vpx_h_predictor_8x8_c; - if (flags & HAS_NEON) vpx_h_predictor_8x8 = vpx_h_predictor_8x8_neon; - vpx_hadamard_16x16 = vpx_hadamard_16x16_c; - if (flags & HAS_NEON) vpx_hadamard_16x16 = vpx_hadamard_16x16_neon; - vpx_hadamard_8x8 = vpx_hadamard_8x8_c; - if (flags & HAS_NEON) vpx_hadamard_8x8 = vpx_hadamard_8x8_neon; - vpx_idct16x16_10_add = vpx_idct16x16_10_add_c; - if (flags & HAS_NEON) vpx_idct16x16_10_add = vpx_idct16x16_10_add_neon; - vpx_idct16x16_1_add = vpx_idct16x16_1_add_c; - if (flags & HAS_NEON) vpx_idct16x16_1_add = vpx_idct16x16_1_add_neon; - vpx_idct16x16_256_add = vpx_idct16x16_256_add_c; - if (flags & HAS_NEON) vpx_idct16x16_256_add = vpx_idct16x16_256_add_neon; - vpx_idct32x32_1024_add = vpx_idct32x32_1024_add_c; - if (flags & HAS_NEON) vpx_idct32x32_1024_add = vpx_idct32x32_1024_add_neon; - vpx_idct32x32_135_add = vpx_idct32x32_135_add_c; - if (flags & HAS_NEON) vpx_idct32x32_135_add = vpx_idct32x32_135_add_neon; - vpx_idct32x32_1_add = vpx_idct32x32_1_add_c; - if (flags & HAS_NEON) vpx_idct32x32_1_add = vpx_idct32x32_1_add_neon; - vpx_idct32x32_34_add = vpx_idct32x32_34_add_c; - if (flags & HAS_NEON) vpx_idct32x32_34_add = vpx_idct32x32_34_add_neon; - vpx_idct4x4_16_add = vpx_idct4x4_16_add_c; - if (flags & HAS_NEON) vpx_idct4x4_16_add = vpx_idct4x4_16_add_neon; - vpx_idct4x4_1_add = vpx_idct4x4_1_add_c; - if (flags & HAS_NEON) vpx_idct4x4_1_add = vpx_idct4x4_1_add_neon; - vpx_idct8x8_12_add = vpx_idct8x8_12_add_c; - if (flags & HAS_NEON) vpx_idct8x8_12_add = vpx_idct8x8_12_add_neon; - vpx_idct8x8_1_add = vpx_idct8x8_1_add_c; - if (flags & HAS_NEON) vpx_idct8x8_1_add = vpx_idct8x8_1_add_neon; - vpx_idct8x8_64_add = vpx_idct8x8_64_add_c; - if (flags & HAS_NEON) vpx_idct8x8_64_add = vpx_idct8x8_64_add_neon; - vpx_int_pro_col = vpx_int_pro_col_c; - if (flags & HAS_NEON) vpx_int_pro_col = vpx_int_pro_col_neon; - vpx_int_pro_row = vpx_int_pro_row_c; - if (flags & HAS_NEON) vpx_int_pro_row = vpx_int_pro_row_neon; - vpx_lpf_horizontal_16 = vpx_lpf_horizontal_16_c; - if (flags & HAS_NEON) vpx_lpf_horizontal_16 = vpx_lpf_horizontal_16_neon; - vpx_lpf_horizontal_16_dual = vpx_lpf_horizontal_16_dual_c; - if (flags & HAS_NEON) vpx_lpf_horizontal_16_dual = vpx_lpf_horizontal_16_dual_neon; - vpx_lpf_horizontal_4 = vpx_lpf_horizontal_4_c; - if (flags & HAS_NEON) vpx_lpf_horizontal_4 = vpx_lpf_horizontal_4_neon; - vpx_lpf_horizontal_4_dual = vpx_lpf_horizontal_4_dual_c; - if (flags & HAS_NEON) vpx_lpf_horizontal_4_dual = vpx_lpf_horizontal_4_dual_neon; - vpx_lpf_horizontal_8 = vpx_lpf_horizontal_8_c; - if (flags & HAS_NEON) vpx_lpf_horizontal_8 = vpx_lpf_horizontal_8_neon; - vpx_lpf_horizontal_8_dual = vpx_lpf_horizontal_8_dual_c; - if (flags & HAS_NEON) vpx_lpf_horizontal_8_dual = vpx_lpf_horizontal_8_dual_neon; - vpx_lpf_vertical_16 = vpx_lpf_vertical_16_c; - if (flags & HAS_NEON) vpx_lpf_vertical_16 = vpx_lpf_vertical_16_neon; - vpx_lpf_vertical_16_dual = vpx_lpf_vertical_16_dual_c; - if (flags & HAS_NEON) vpx_lpf_vertical_16_dual = vpx_lpf_vertical_16_dual_neon; - vpx_lpf_vertical_4 = vpx_lpf_vertical_4_c; - if (flags & HAS_NEON) vpx_lpf_vertical_4 = vpx_lpf_vertical_4_neon; - vpx_lpf_vertical_4_dual = vpx_lpf_vertical_4_dual_c; - if (flags & HAS_NEON) vpx_lpf_vertical_4_dual = vpx_lpf_vertical_4_dual_neon; - vpx_lpf_vertical_8 = vpx_lpf_vertical_8_c; - if (flags & HAS_NEON) vpx_lpf_vertical_8 = vpx_lpf_vertical_8_neon; - vpx_lpf_vertical_8_dual = vpx_lpf_vertical_8_dual_c; - if (flags & HAS_NEON) vpx_lpf_vertical_8_dual = vpx_lpf_vertical_8_dual_neon; - vpx_mbpost_proc_across_ip = vpx_mbpost_proc_across_ip_c; - if (flags & HAS_NEON) vpx_mbpost_proc_across_ip = vpx_mbpost_proc_across_ip_neon; - vpx_mbpost_proc_down = vpx_mbpost_proc_down_c; - if (flags & HAS_NEON) vpx_mbpost_proc_down = vpx_mbpost_proc_down_neon; - vpx_minmax_8x8 = vpx_minmax_8x8_c; - if (flags & HAS_NEON) vpx_minmax_8x8 = vpx_minmax_8x8_neon; - vpx_mse16x16 = vpx_mse16x16_c; - if (flags & HAS_NEON) vpx_mse16x16 = vpx_mse16x16_neon; - vpx_post_proc_down_and_across_mb_row = vpx_post_proc_down_and_across_mb_row_c; - if (flags & HAS_NEON) vpx_post_proc_down_and_across_mb_row = vpx_post_proc_down_and_across_mb_row_neon; - vpx_sad16x16 = vpx_sad16x16_c; - if (flags & HAS_NEON) vpx_sad16x16 = vpx_sad16x16_neon; - vpx_sad16x16x4d = vpx_sad16x16x4d_c; - if (flags & HAS_NEON) vpx_sad16x16x4d = vpx_sad16x16x4d_neon; - vpx_sad16x8 = vpx_sad16x8_c; - if (flags & HAS_NEON) vpx_sad16x8 = vpx_sad16x8_neon; - vpx_sad32x32 = vpx_sad32x32_c; - if (flags & HAS_NEON) vpx_sad32x32 = vpx_sad32x32_neon; - vpx_sad32x32x4d = vpx_sad32x32x4d_c; - if (flags & HAS_NEON) vpx_sad32x32x4d = vpx_sad32x32x4d_neon; - vpx_sad4x4 = vpx_sad4x4_c; - if (flags & HAS_NEON) vpx_sad4x4 = vpx_sad4x4_neon; - vpx_sad64x64 = vpx_sad64x64_c; - if (flags & HAS_NEON) vpx_sad64x64 = vpx_sad64x64_neon; - vpx_sad64x64x4d = vpx_sad64x64x4d_c; - if (flags & HAS_NEON) vpx_sad64x64x4d = vpx_sad64x64x4d_neon; - vpx_sad8x16 = vpx_sad8x16_c; - if (flags & HAS_NEON) vpx_sad8x16 = vpx_sad8x16_neon; - vpx_sad8x8 = vpx_sad8x8_c; - if (flags & HAS_NEON) vpx_sad8x8 = vpx_sad8x8_neon; - vpx_satd = vpx_satd_c; - if (flags & HAS_NEON) vpx_satd = vpx_satd_neon; - vpx_sub_pixel_variance16x16 = vpx_sub_pixel_variance16x16_c; - if (flags & HAS_NEON) vpx_sub_pixel_variance16x16 = vpx_sub_pixel_variance16x16_neon; - vpx_sub_pixel_variance32x32 = vpx_sub_pixel_variance32x32_c; - if (flags & HAS_NEON) vpx_sub_pixel_variance32x32 = vpx_sub_pixel_variance32x32_neon; - vpx_sub_pixel_variance64x64 = vpx_sub_pixel_variance64x64_c; - if (flags & HAS_NEON) vpx_sub_pixel_variance64x64 = vpx_sub_pixel_variance64x64_neon; - vpx_sub_pixel_variance8x8 = vpx_sub_pixel_variance8x8_c; - if (flags & HAS_NEON) vpx_sub_pixel_variance8x8 = vpx_sub_pixel_variance8x8_neon; - vpx_subtract_block = vpx_subtract_block_c; - if (flags & HAS_NEON) vpx_subtract_block = vpx_subtract_block_neon; - vpx_tm_predictor_16x16 = vpx_tm_predictor_16x16_c; - if (flags & HAS_NEON) vpx_tm_predictor_16x16 = vpx_tm_predictor_16x16_neon; - vpx_tm_predictor_32x32 = vpx_tm_predictor_32x32_c; - if (flags & HAS_NEON) vpx_tm_predictor_32x32 = vpx_tm_predictor_32x32_neon; - vpx_tm_predictor_4x4 = vpx_tm_predictor_4x4_c; - if (flags & HAS_NEON) vpx_tm_predictor_4x4 = vpx_tm_predictor_4x4_neon; - vpx_tm_predictor_8x8 = vpx_tm_predictor_8x8_c; - if (flags & HAS_NEON) vpx_tm_predictor_8x8 = vpx_tm_predictor_8x8_neon; - vpx_v_predictor_16x16 = vpx_v_predictor_16x16_c; - if (flags & HAS_NEON) vpx_v_predictor_16x16 = vpx_v_predictor_16x16_neon; - vpx_v_predictor_32x32 = vpx_v_predictor_32x32_c; - if (flags & HAS_NEON) vpx_v_predictor_32x32 = vpx_v_predictor_32x32_neon; - vpx_v_predictor_4x4 = vpx_v_predictor_4x4_c; - if (flags & HAS_NEON) vpx_v_predictor_4x4 = vpx_v_predictor_4x4_neon; - vpx_v_predictor_8x8 = vpx_v_predictor_8x8_c; - if (flags & HAS_NEON) vpx_v_predictor_8x8 = vpx_v_predictor_8x8_neon; - vpx_variance16x16 = vpx_variance16x16_c; - if (flags & HAS_NEON) vpx_variance16x16 = vpx_variance16x16_neon; - vpx_variance16x8 = vpx_variance16x8_c; - if (flags & HAS_NEON) vpx_variance16x8 = vpx_variance16x8_neon; - vpx_variance32x32 = vpx_variance32x32_c; - if (flags & HAS_NEON) vpx_variance32x32 = vpx_variance32x32_neon; - vpx_variance32x64 = vpx_variance32x64_c; - if (flags & HAS_NEON) vpx_variance32x64 = vpx_variance32x64_neon; - vpx_variance64x32 = vpx_variance64x32_c; - if (flags & HAS_NEON) vpx_variance64x32 = vpx_variance64x32_neon; - vpx_variance64x64 = vpx_variance64x64_c; - if (flags & HAS_NEON) vpx_variance64x64 = vpx_variance64x64_neon; - vpx_variance8x16 = vpx_variance8x16_c; - if (flags & HAS_NEON) vpx_variance8x16 = vpx_variance8x16_neon; - vpx_variance8x8 = vpx_variance8x8_c; - if (flags & HAS_NEON) vpx_variance8x8 = vpx_variance8x8_neon; - vpx_vector_var = vpx_vector_var_c; - if (flags & HAS_NEON) vpx_vector_var = vpx_vector_var_neon; -} -#endif - -#ifdef __cplusplus -} // extern "C" -#endif - -#endif diff --git a/WebRtc.NET/include/third_party/libvpx/source/config/linux/arm-neon-cpu-detect/vpx_scale_rtcd.h b/WebRtc.NET/include/third_party/libvpx/source/config/linux/arm-neon-cpu-detect/vpx_scale_rtcd.h deleted file mode 100644 index a1564b7a..00000000 --- a/WebRtc.NET/include/third_party/libvpx/source/config/linux/arm-neon-cpu-detect/vpx_scale_rtcd.h +++ /dev/null @@ -1,71 +0,0 @@ -#ifndef VPX_SCALE_RTCD_H_ -#define VPX_SCALE_RTCD_H_ - -#ifdef RTCD_C -#define RTCD_EXTERN -#else -#define RTCD_EXTERN extern -#endif - -struct yv12_buffer_config; - -#ifdef __cplusplus -extern "C" { -#endif - -void vp8_horizontal_line_2_1_scale_c(const unsigned char *source, unsigned int source_width, unsigned char *dest, unsigned int dest_width); -#define vp8_horizontal_line_2_1_scale vp8_horizontal_line_2_1_scale_c - -void vp8_horizontal_line_5_3_scale_c(const unsigned char *source, unsigned int source_width, unsigned char *dest, unsigned int dest_width); -#define vp8_horizontal_line_5_3_scale vp8_horizontal_line_5_3_scale_c - -void vp8_horizontal_line_5_4_scale_c(const unsigned char *source, unsigned int source_width, unsigned char *dest, unsigned int dest_width); -#define vp8_horizontal_line_5_4_scale vp8_horizontal_line_5_4_scale_c - -void vp8_vertical_band_2_1_scale_c(unsigned char *source, unsigned int src_pitch, unsigned char *dest, unsigned int dest_pitch, unsigned int dest_width); -#define vp8_vertical_band_2_1_scale vp8_vertical_band_2_1_scale_c - -void vp8_vertical_band_2_1_scale_i_c(unsigned char *source, unsigned int src_pitch, unsigned char *dest, unsigned int dest_pitch, unsigned int dest_width); -#define vp8_vertical_band_2_1_scale_i vp8_vertical_band_2_1_scale_i_c - -void vp8_vertical_band_5_3_scale_c(unsigned char *source, unsigned int src_pitch, unsigned char *dest, unsigned int dest_pitch, unsigned int dest_width); -#define vp8_vertical_band_5_3_scale vp8_vertical_band_5_3_scale_c - -void vp8_vertical_band_5_4_scale_c(unsigned char *source, unsigned int src_pitch, unsigned char *dest, unsigned int dest_pitch, unsigned int dest_width); -#define vp8_vertical_band_5_4_scale vp8_vertical_band_5_4_scale_c - -void vp8_yv12_copy_frame_c(const struct yv12_buffer_config *src_ybc, struct yv12_buffer_config *dst_ybc); -#define vp8_yv12_copy_frame vp8_yv12_copy_frame_c - -void vp8_yv12_extend_frame_borders_c(struct yv12_buffer_config *ybf); -#define vp8_yv12_extend_frame_borders vp8_yv12_extend_frame_borders_c - -void vpx_extend_frame_borders_c(struct yv12_buffer_config *ybf); -#define vpx_extend_frame_borders vpx_extend_frame_borders_c - -void vpx_extend_frame_inner_borders_c(struct yv12_buffer_config *ybf); -#define vpx_extend_frame_inner_borders vpx_extend_frame_inner_borders_c - -void vpx_yv12_copy_y_c(const struct yv12_buffer_config *src_ybc, struct yv12_buffer_config *dst_ybc); -#define vpx_yv12_copy_y vpx_yv12_copy_y_c - -void vpx_scale_rtcd(void); - -#include "vpx_config.h" - -#ifdef RTCD_C -#include "vpx_ports/arm.h" -static void setup_rtcd_internal(void) -{ - int flags = arm_cpu_caps(); - - (void)flags; - -} -#endif - -#ifdef __cplusplus -} // extern "C" -#endif - -#endif diff --git a/WebRtc.NET/include/third_party/libvpx/source/config/linux/arm-neon/vp8_rtcd.h b/WebRtc.NET/include/third_party/libvpx/source/config/linux/arm-neon/vp8_rtcd.h deleted file mode 100644 index 6a7f92ca..00000000 --- a/WebRtc.NET/include/third_party/libvpx/source/config/linux/arm-neon/vp8_rtcd.h +++ /dev/null @@ -1,218 +0,0 @@ -#ifndef VP8_RTCD_H_ -#define VP8_RTCD_H_ - -#ifdef RTCD_C -#define RTCD_EXTERN -#else -#define RTCD_EXTERN extern -#endif - -/* - * VP8 - */ - -struct blockd; -struct macroblockd; -struct loop_filter_info; - -/* Encoder forward decls */ -struct block; -struct macroblock; -struct variance_vtable; -union int_mv; -struct yv12_buffer_config; - -#ifdef __cplusplus -extern "C" { -#endif - -void vp8_bilinear_predict16x16_c(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch); -void vp8_bilinear_predict16x16_neon(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch); -#define vp8_bilinear_predict16x16 vp8_bilinear_predict16x16_neon - -void vp8_bilinear_predict4x4_c(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch); -void vp8_bilinear_predict4x4_neon(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch); -#define vp8_bilinear_predict4x4 vp8_bilinear_predict4x4_neon - -void vp8_bilinear_predict8x4_c(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch); -void vp8_bilinear_predict8x4_neon(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch); -#define vp8_bilinear_predict8x4 vp8_bilinear_predict8x4_neon - -void vp8_bilinear_predict8x8_c(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch); -void vp8_bilinear_predict8x8_neon(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch); -#define vp8_bilinear_predict8x8 vp8_bilinear_predict8x8_neon - -void vp8_blend_b_c(unsigned char *y, unsigned char *u, unsigned char *v, int y1, int u1, int v1, int alpha, int stride); -#define vp8_blend_b vp8_blend_b_c - -void vp8_blend_mb_inner_c(unsigned char *y, unsigned char *u, unsigned char *v, int y1, int u1, int v1, int alpha, int stride); -#define vp8_blend_mb_inner vp8_blend_mb_inner_c - -void vp8_blend_mb_outer_c(unsigned char *y, unsigned char *u, unsigned char *v, int y1, int u1, int v1, int alpha, int stride); -#define vp8_blend_mb_outer vp8_blend_mb_outer_c - -int vp8_block_error_c(short *coeff, short *dqcoeff); -#define vp8_block_error vp8_block_error_c - -void vp8_copy_mem16x16_c(unsigned char *src, int src_pitch, unsigned char *dst, int dst_pitch); -void vp8_copy_mem16x16_neon(unsigned char *src, int src_pitch, unsigned char *dst, int dst_pitch); -#define vp8_copy_mem16x16 vp8_copy_mem16x16_neon - -void vp8_copy_mem8x4_c(unsigned char *src, int src_pitch, unsigned char *dst, int dst_pitch); -void vp8_copy_mem8x4_neon(unsigned char *src, int src_pitch, unsigned char *dst, int dst_pitch); -#define vp8_copy_mem8x4 vp8_copy_mem8x4_neon - -void vp8_copy_mem8x8_c(unsigned char *src, int src_pitch, unsigned char *dst, int dst_pitch); -void vp8_copy_mem8x8_neon(unsigned char *src, int src_pitch, unsigned char *dst, int dst_pitch); -#define vp8_copy_mem8x8 vp8_copy_mem8x8_neon - -void vp8_dc_only_idct_add_c(short input, unsigned char *pred, int pred_stride, unsigned char *dst, int dst_stride); -void vp8_dc_only_idct_add_neon(short input, unsigned char *pred, int pred_stride, unsigned char *dst, int dst_stride); -#define vp8_dc_only_idct_add vp8_dc_only_idct_add_neon - -int vp8_denoiser_filter_c(unsigned char *mc_running_avg_y, int mc_avg_y_stride, unsigned char *running_avg_y, int avg_y_stride, unsigned char *sig, int sig_stride, unsigned int motion_magnitude, int increase_denoising); -int vp8_denoiser_filter_neon(unsigned char *mc_running_avg_y, int mc_avg_y_stride, unsigned char *running_avg_y, int avg_y_stride, unsigned char *sig, int sig_stride, unsigned int motion_magnitude, int increase_denoising); -#define vp8_denoiser_filter vp8_denoiser_filter_neon - -int vp8_denoiser_filter_uv_c(unsigned char *mc_running_avg, int mc_avg_stride, unsigned char *running_avg, int avg_stride, unsigned char *sig, int sig_stride, unsigned int motion_magnitude, int increase_denoising); -int vp8_denoiser_filter_uv_neon(unsigned char *mc_running_avg, int mc_avg_stride, unsigned char *running_avg, int avg_stride, unsigned char *sig, int sig_stride, unsigned int motion_magnitude, int increase_denoising); -#define vp8_denoiser_filter_uv vp8_denoiser_filter_uv_neon - -void vp8_dequant_idct_add_c(short *input, short *dq, unsigned char *output, int stride); -void vp8_dequant_idct_add_neon(short *input, short *dq, unsigned char *output, int stride); -#define vp8_dequant_idct_add vp8_dequant_idct_add_neon - -void vp8_dequant_idct_add_uv_block_c(short *q, short *dq, unsigned char *dst_u, unsigned char *dst_v, int stride, char *eobs); -void vp8_dequant_idct_add_uv_block_neon(short *q, short *dq, unsigned char *dst_u, unsigned char *dst_v, int stride, char *eobs); -#define vp8_dequant_idct_add_uv_block vp8_dequant_idct_add_uv_block_neon - -void vp8_dequant_idct_add_y_block_c(short *q, short *dq, unsigned char *dst, int stride, char *eobs); -void vp8_dequant_idct_add_y_block_neon(short *q, short *dq, unsigned char *dst, int stride, char *eobs); -#define vp8_dequant_idct_add_y_block vp8_dequant_idct_add_y_block_neon - -void vp8_dequantize_b_c(struct blockd*, short *dqc); -void vp8_dequantize_b_neon(struct blockd*, short *dqc); -#define vp8_dequantize_b vp8_dequantize_b_neon - -int vp8_diamond_search_sad_c(struct macroblock *x, struct block *b, struct blockd *d, union int_mv *ref_mv, union int_mv *best_mv, int search_param, int sad_per_bit, int *num00, struct variance_vtable *fn_ptr, int *mvcost[2], union int_mv *center_mv); -#define vp8_diamond_search_sad vp8_diamond_search_sad_c - -void vp8_fast_quantize_b_c(struct block *, struct blockd *); -void vp8_fast_quantize_b_neon(struct block *, struct blockd *); -#define vp8_fast_quantize_b vp8_fast_quantize_b_neon - -void vp8_filter_by_weight16x16_c(unsigned char *src, int src_stride, unsigned char *dst, int dst_stride, int src_weight); -#define vp8_filter_by_weight16x16 vp8_filter_by_weight16x16_c - -void vp8_filter_by_weight4x4_c(unsigned char *src, int src_stride, unsigned char *dst, int dst_stride, int src_weight); -#define vp8_filter_by_weight4x4 vp8_filter_by_weight4x4_c - -void vp8_filter_by_weight8x8_c(unsigned char *src, int src_stride, unsigned char *dst, int dst_stride, int src_weight); -#define vp8_filter_by_weight8x8 vp8_filter_by_weight8x8_c - -int vp8_full_search_sad_c(struct macroblock *x, struct block *b, struct blockd *d, union int_mv *ref_mv, int sad_per_bit, int distance, struct variance_vtable *fn_ptr, int *mvcost[2], union int_mv *center_mv); -#define vp8_full_search_sad vp8_full_search_sad_c - -void vp8_loop_filter_bh_c(unsigned char *y, unsigned char *u, unsigned char *v, int ystride, int uv_stride, struct loop_filter_info *lfi); -void vp8_loop_filter_bh_neon(unsigned char *y, unsigned char *u, unsigned char *v, int ystride, int uv_stride, struct loop_filter_info *lfi); -#define vp8_loop_filter_bh vp8_loop_filter_bh_neon - -void vp8_loop_filter_bv_c(unsigned char *y, unsigned char *u, unsigned char *v, int ystride, int uv_stride, struct loop_filter_info *lfi); -void vp8_loop_filter_bv_neon(unsigned char *y, unsigned char *u, unsigned char *v, int ystride, int uv_stride, struct loop_filter_info *lfi); -#define vp8_loop_filter_bv vp8_loop_filter_bv_neon - -void vp8_loop_filter_mbh_c(unsigned char *y, unsigned char *u, unsigned char *v, int ystride, int uv_stride, struct loop_filter_info *lfi); -void vp8_loop_filter_mbh_neon(unsigned char *y, unsigned char *u, unsigned char *v, int ystride, int uv_stride, struct loop_filter_info *lfi); -#define vp8_loop_filter_mbh vp8_loop_filter_mbh_neon - -void vp8_loop_filter_mbv_c(unsigned char *y, unsigned char *u, unsigned char *v, int ystride, int uv_stride, struct loop_filter_info *lfi); -void vp8_loop_filter_mbv_neon(unsigned char *y, unsigned char *u, unsigned char *v, int ystride, int uv_stride, struct loop_filter_info *lfi); -#define vp8_loop_filter_mbv vp8_loop_filter_mbv_neon - -void vp8_loop_filter_bhs_c(unsigned char *y, int ystride, const unsigned char *blimit); -void vp8_loop_filter_bhs_neon(unsigned char *y, int ystride, const unsigned char *blimit); -#define vp8_loop_filter_simple_bh vp8_loop_filter_bhs_neon - -void vp8_loop_filter_bvs_c(unsigned char *y, int ystride, const unsigned char *blimit); -void vp8_loop_filter_bvs_neon(unsigned char *y, int ystride, const unsigned char *blimit); -#define vp8_loop_filter_simple_bv vp8_loop_filter_bvs_neon - -void vp8_loop_filter_simple_horizontal_edge_c(unsigned char *y, int ystride, const unsigned char *blimit); -void vp8_loop_filter_mbhs_neon(unsigned char *y, int ystride, const unsigned char *blimit); -#define vp8_loop_filter_simple_mbh vp8_loop_filter_mbhs_neon - -void vp8_loop_filter_simple_vertical_edge_c(unsigned char *y, int ystride, const unsigned char *blimit); -void vp8_loop_filter_mbvs_neon(unsigned char *y, int ystride, const unsigned char *blimit); -#define vp8_loop_filter_simple_mbv vp8_loop_filter_mbvs_neon - -int vp8_mbblock_error_c(struct macroblock *mb, int dc); -#define vp8_mbblock_error vp8_mbblock_error_c - -int vp8_mbuverror_c(struct macroblock *mb); -#define vp8_mbuverror vp8_mbuverror_c - -int vp8_refining_search_sad_c(struct macroblock *x, struct block *b, struct blockd *d, union int_mv *ref_mv, int sad_per_bit, int distance, struct variance_vtable *fn_ptr, int *mvcost[2], union int_mv *center_mv); -#define vp8_refining_search_sad vp8_refining_search_sad_c - -void vp8_regular_quantize_b_c(struct block *, struct blockd *); -#define vp8_regular_quantize_b vp8_regular_quantize_b_c - -void vp8_short_fdct4x4_c(short *input, short *output, int pitch); -void vp8_short_fdct4x4_neon(short *input, short *output, int pitch); -#define vp8_short_fdct4x4 vp8_short_fdct4x4_neon - -void vp8_short_fdct8x4_c(short *input, short *output, int pitch); -void vp8_short_fdct8x4_neon(short *input, short *output, int pitch); -#define vp8_short_fdct8x4 vp8_short_fdct8x4_neon - -void vp8_short_idct4x4llm_c(short *input, unsigned char *pred, int pitch, unsigned char *dst, int dst_stride); -void vp8_short_idct4x4llm_neon(short *input, unsigned char *pred, int pitch, unsigned char *dst, int dst_stride); -#define vp8_short_idct4x4llm vp8_short_idct4x4llm_neon - -void vp8_short_inv_walsh4x4_c(short *input, short *output); -void vp8_short_inv_walsh4x4_neon(short *input, short *output); -#define vp8_short_inv_walsh4x4 vp8_short_inv_walsh4x4_neon - -void vp8_short_inv_walsh4x4_1_c(short *input, short *output); -#define vp8_short_inv_walsh4x4_1 vp8_short_inv_walsh4x4_1_c - -void vp8_short_walsh4x4_c(short *input, short *output, int pitch); -void vp8_short_walsh4x4_neon(short *input, short *output, int pitch); -#define vp8_short_walsh4x4 vp8_short_walsh4x4_neon - -void vp8_sixtap_predict16x16_c(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch); -void vp8_sixtap_predict16x16_neon(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch); -#define vp8_sixtap_predict16x16 vp8_sixtap_predict16x16_neon - -void vp8_sixtap_predict4x4_c(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch); -void vp8_sixtap_predict4x4_neon(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch); -#define vp8_sixtap_predict4x4 vp8_sixtap_predict4x4_neon - -void vp8_sixtap_predict8x4_c(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch); -void vp8_sixtap_predict8x4_neon(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch); -#define vp8_sixtap_predict8x4 vp8_sixtap_predict8x4_neon - -void vp8_sixtap_predict8x8_c(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch); -void vp8_sixtap_predict8x8_neon(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch); -#define vp8_sixtap_predict8x8 vp8_sixtap_predict8x8_neon - -void vp8_rtcd(void); - -#include "vpx_config.h" - -#ifdef RTCD_C -#include "vpx_ports/arm.h" -static void setup_rtcd_internal(void) -{ - int flags = arm_cpu_caps(); - - (void)flags; - -} -#endif - -#ifdef __cplusplus -} // extern "C" -#endif - -#endif diff --git a/WebRtc.NET/include/third_party/libvpx/source/config/linux/arm-neon/vp9_rtcd.h b/WebRtc.NET/include/third_party/libvpx/source/config/linux/arm-neon/vp9_rtcd.h deleted file mode 100644 index d07bcaa3..00000000 --- a/WebRtc.NET/include/third_party/libvpx/source/config/linux/arm-neon/vp9_rtcd.h +++ /dev/null @@ -1,113 +0,0 @@ -#ifndef VP9_RTCD_H_ -#define VP9_RTCD_H_ - -#ifdef RTCD_C -#define RTCD_EXTERN -#else -#define RTCD_EXTERN extern -#endif - -/* - * VP9 - */ - -#include "vpx/vpx_integer.h" -#include "vp9/common/vp9_common.h" -#include "vp9/common/vp9_enums.h" - -struct macroblockd; - -/* Encoder forward decls */ -struct macroblock; -struct vp9_variance_vtable; -struct search_site_config; -struct mv; -union int_mv; -struct yv12_buffer_config; - -#ifdef __cplusplus -extern "C" { -#endif - -int64_t vp9_block_error_c(const tran_low_t *coeff, const tran_low_t *dqcoeff, intptr_t block_size, int64_t *ssz); -#define vp9_block_error vp9_block_error_c - -int64_t vp9_block_error_fp_c(const int16_t *coeff, const int16_t *dqcoeff, int block_size); -int64_t vp9_block_error_fp_neon(const int16_t *coeff, const int16_t *dqcoeff, int block_size); -#define vp9_block_error_fp vp9_block_error_fp_neon - -int vp9_denoiser_filter_c(const uint8_t *sig, int sig_stride, const uint8_t *mc_avg, int mc_avg_stride, uint8_t *avg, int avg_stride, int increase_denoising, BLOCK_SIZE bs, int motion_magnitude); -#define vp9_denoiser_filter vp9_denoiser_filter_c - -int vp9_diamond_search_sad_c(const struct macroblock *x, const struct search_site_config *cfg, struct mv *ref_mv, struct mv *best_mv, int search_param, int sad_per_bit, int *num00, const struct vp9_variance_vtable *fn_ptr, const struct mv *center_mv); -#define vp9_diamond_search_sad vp9_diamond_search_sad_c - -void vp9_fdct8x8_quant_c(const int16_t *input, int stride, tran_low_t *coeff_ptr, intptr_t n_coeffs, int skip_block, const int16_t *zbin_ptr, const int16_t *round_ptr, const int16_t *quant_ptr, const int16_t *quant_shift_ptr, tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr, const int16_t *dequant_ptr, uint16_t *eob_ptr, const int16_t *scan, const int16_t *iscan); -void vp9_fdct8x8_quant_neon(const int16_t *input, int stride, tran_low_t *coeff_ptr, intptr_t n_coeffs, int skip_block, const int16_t *zbin_ptr, const int16_t *round_ptr, const int16_t *quant_ptr, const int16_t *quant_shift_ptr, tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr, const int16_t *dequant_ptr, uint16_t *eob_ptr, const int16_t *scan, const int16_t *iscan); -#define vp9_fdct8x8_quant vp9_fdct8x8_quant_neon - -void vp9_fht16x16_c(const int16_t *input, tran_low_t *output, int stride, int tx_type); -#define vp9_fht16x16 vp9_fht16x16_c - -void vp9_fht4x4_c(const int16_t *input, tran_low_t *output, int stride, int tx_type); -#define vp9_fht4x4 vp9_fht4x4_c - -void vp9_fht8x8_c(const int16_t *input, tran_low_t *output, int stride, int tx_type); -#define vp9_fht8x8 vp9_fht8x8_c - -void vp9_filter_by_weight16x16_c(const uint8_t *src, int src_stride, uint8_t *dst, int dst_stride, int src_weight); -#define vp9_filter_by_weight16x16 vp9_filter_by_weight16x16_c - -void vp9_filter_by_weight8x8_c(const uint8_t *src, int src_stride, uint8_t *dst, int dst_stride, int src_weight); -#define vp9_filter_by_weight8x8 vp9_filter_by_weight8x8_c - -int vp9_full_search_sad_c(const struct macroblock *x, const struct mv *ref_mv, int sad_per_bit, int distance, const struct vp9_variance_vtable *fn_ptr, const struct mv *center_mv, struct mv *best_mv); -#define vp9_full_search_sad vp9_full_search_sad_c - -void vp9_fwht4x4_c(const int16_t *input, tran_low_t *output, int stride); -#define vp9_fwht4x4 vp9_fwht4x4_c - -void vp9_iht16x16_256_add_c(const tran_low_t *input, uint8_t *output, int pitch, int tx_type); -#define vp9_iht16x16_256_add vp9_iht16x16_256_add_c - -void vp9_iht4x4_16_add_c(const tran_low_t *input, uint8_t *dest, int stride, int tx_type); -void vp9_iht4x4_16_add_neon(const tran_low_t *input, uint8_t *dest, int stride, int tx_type); -#define vp9_iht4x4_16_add vp9_iht4x4_16_add_neon - -void vp9_iht8x8_64_add_c(const tran_low_t *input, uint8_t *dest, int stride, int tx_type); -void vp9_iht8x8_64_add_neon(const tran_low_t *input, uint8_t *dest, int stride, int tx_type); -#define vp9_iht8x8_64_add vp9_iht8x8_64_add_neon - -void vp9_quantize_fp_c(const tran_low_t *coeff_ptr, intptr_t n_coeffs, int skip_block, const int16_t *zbin_ptr, const int16_t *round_ptr, const int16_t *quant_ptr, const int16_t *quant_shift_ptr, tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr, const int16_t *dequant_ptr, uint16_t *eob_ptr, const int16_t *scan, const int16_t *iscan); -void vp9_quantize_fp_neon(const tran_low_t *coeff_ptr, intptr_t n_coeffs, int skip_block, const int16_t *zbin_ptr, const int16_t *round_ptr, const int16_t *quant_ptr, const int16_t *quant_shift_ptr, tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr, const int16_t *dequant_ptr, uint16_t *eob_ptr, const int16_t *scan, const int16_t *iscan); -#define vp9_quantize_fp vp9_quantize_fp_neon - -void vp9_quantize_fp_32x32_c(const tran_low_t *coeff_ptr, intptr_t n_coeffs, int skip_block, const int16_t *zbin_ptr, const int16_t *round_ptr, const int16_t *quant_ptr, const int16_t *quant_shift_ptr, tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr, const int16_t *dequant_ptr, uint16_t *eob_ptr, const int16_t *scan, const int16_t *iscan); -#define vp9_quantize_fp_32x32 vp9_quantize_fp_32x32_c - -void vp9_scale_and_extend_frame_c(const struct yv12_buffer_config *src, struct yv12_buffer_config *dst); -#define vp9_scale_and_extend_frame vp9_scale_and_extend_frame_c - -void vp9_temporal_filter_apply_c(uint8_t *frame1, unsigned int stride, uint8_t *frame2, unsigned int block_width, unsigned int block_height, int strength, int filter_weight, unsigned int *accumulator, uint16_t *count); -#define vp9_temporal_filter_apply vp9_temporal_filter_apply_c - -void vp9_rtcd(void); - -#include "vpx_config.h" - -#ifdef RTCD_C -#include "vpx_ports/arm.h" -static void setup_rtcd_internal(void) -{ - int flags = arm_cpu_caps(); - - (void)flags; - -} -#endif - -#ifdef __cplusplus -} // extern "C" -#endif - -#endif diff --git a/WebRtc.NET/include/third_party/libvpx/source/config/linux/arm-neon/vpx_config.h b/WebRtc.NET/include/third_party/libvpx/source/config/linux/arm-neon/vpx_config.h deleted file mode 100644 index 2d9a3ced..00000000 --- a/WebRtc.NET/include/third_party/libvpx/source/config/linux/arm-neon/vpx_config.h +++ /dev/null @@ -1,94 +0,0 @@ -/* Copyright (c) 2011 The WebM project authors. All Rights Reserved. */ -/* */ -/* Use of this source code is governed by a BSD-style license */ -/* that can be found in the LICENSE file in the root of the source */ -/* tree. An additional intellectual property rights grant can be found */ -/* in the file PATENTS. All contributing project authors may */ -/* be found in the AUTHORS file in the root of the source tree. */ -/* This file automatically generated by configure. Do not edit! */ -#ifndef VPX_CONFIG_H -#define VPX_CONFIG_H -#define RESTRICT -#define INLINE inline -#define ARCH_ARM 1 -#define ARCH_MIPS 0 -#define ARCH_X86 0 -#define ARCH_X86_64 0 -#define HAVE_NEON 1 -#define HAVE_NEON_ASM 1 -#define HAVE_MIPS32 0 -#define HAVE_DSPR2 0 -#define HAVE_MSA 0 -#define HAVE_MIPS64 0 -#define HAVE_MMX 0 -#define HAVE_SSE 0 -#define HAVE_SSE2 0 -#define HAVE_SSE3 0 -#define HAVE_SSSE3 0 -#define HAVE_SSE4_1 0 -#define HAVE_AVX 0 -#define HAVE_AVX2 0 -#define HAVE_VPX_PORTS 1 -#define HAVE_PTHREAD_H 1 -#define HAVE_UNISTD_H 0 -#define CONFIG_DEPENDENCY_TRACKING 1 -#define CONFIG_EXTERNAL_BUILD 1 -#define CONFIG_INSTALL_DOCS 0 -#define CONFIG_INSTALL_BINS 1 -#define CONFIG_INSTALL_LIBS 1 -#define CONFIG_INSTALL_SRCS 0 -#define CONFIG_DEBUG 0 -#define CONFIG_GPROF 0 -#define CONFIG_GCOV 0 -#define CONFIG_RVCT 0 -#define CONFIG_GCC 1 -#define CONFIG_MSVS 0 -#define CONFIG_PIC 0 -#define CONFIG_BIG_ENDIAN 0 -#define CONFIG_CODEC_SRCS 0 -#define CONFIG_DEBUG_LIBS 0 -#define CONFIG_DEQUANT_TOKENS 0 -#define CONFIG_DC_RECON 0 -#define CONFIG_RUNTIME_CPU_DETECT 0 -#define CONFIG_POSTPROC 1 -#define CONFIG_VP9_POSTPROC 1 -#define CONFIG_MULTITHREAD 1 -#define CONFIG_INTERNAL_STATS 0 -#define CONFIG_VP8_ENCODER 1 -#define CONFIG_VP8_DECODER 1 -#define CONFIG_VP9_ENCODER 1 -#define CONFIG_VP9_DECODER 1 -#define CONFIG_VP8 1 -#define CONFIG_VP9 1 -#define CONFIG_ENCODERS 1 -#define CONFIG_DECODERS 1 -#define CONFIG_STATIC_MSVCRT 0 -#define CONFIG_SPATIAL_RESAMPLING 1 -#define CONFIG_REALTIME_ONLY 1 -#define CONFIG_ONTHEFLY_BITPACKING 0 -#define CONFIG_ERROR_CONCEALMENT 0 -#define CONFIG_SHARED 0 -#define CONFIG_STATIC 1 -#define CONFIG_SMALL 0 -#define CONFIG_POSTPROC_VISUALIZER 0 -#define CONFIG_OS_SUPPORT 1 -#define CONFIG_UNIT_TESTS 1 -#define CONFIG_WEBM_IO 1 -#define CONFIG_LIBYUV 1 -#define CONFIG_DECODE_PERF_TESTS 0 -#define CONFIG_ENCODE_PERF_TESTS 0 -#define CONFIG_MULTI_RES_ENCODING 1 -#define CONFIG_TEMPORAL_DENOISING 1 -#define CONFIG_VP9_TEMPORAL_DENOISING 1 -#define CONFIG_COEFFICIENT_RANGE_CHECKING 0 -#define CONFIG_VP9_HIGHBITDEPTH 0 -#define CONFIG_BETTER_HW_COMPATIBILITY 0 -#define CONFIG_EXPERIMENTAL 0 -#define CONFIG_SIZE_LIMIT 1 -#define CONFIG_SPATIAL_SVC 0 -#define CONFIG_FP_MB_STATS 0 -#define CONFIG_EMULATE_HARDWARE 0 -#define CONFIG_MISC_FIXES 0 -#define DECODE_WIDTH_LIMIT 16384 -#define DECODE_HEIGHT_LIMIT 16384 -#endif /* VPX_CONFIG_H */ diff --git a/WebRtc.NET/include/third_party/libvpx/source/config/linux/arm-neon/vpx_dsp_rtcd.h b/WebRtc.NET/include/third_party/libvpx/source/config/linux/arm-neon/vpx_dsp_rtcd.h deleted file mode 100644 index c9d867d0..00000000 --- a/WebRtc.NET/include/third_party/libvpx/source/config/linux/arm-neon/vpx_dsp_rtcd.h +++ /dev/null @@ -1,858 +0,0 @@ -#ifndef VPX_DSP_RTCD_H_ -#define VPX_DSP_RTCD_H_ - -#ifdef RTCD_C -#define RTCD_EXTERN -#else -#define RTCD_EXTERN extern -#endif - -/* - * DSP - */ - -#include "vpx/vpx_integer.h" -#include "vpx_dsp/vpx_dsp_common.h" - - -#ifdef __cplusplus -extern "C" { -#endif - -unsigned int vpx_avg_4x4_c(const uint8_t *, int p); -unsigned int vpx_avg_4x4_neon(const uint8_t *, int p); -#define vpx_avg_4x4 vpx_avg_4x4_neon - -unsigned int vpx_avg_8x8_c(const uint8_t *, int p); -unsigned int vpx_avg_8x8_neon(const uint8_t *, int p); -#define vpx_avg_8x8 vpx_avg_8x8_neon - -void vpx_comp_avg_pred_c(uint8_t *comp_pred, const uint8_t *pred, int width, int height, const uint8_t *ref, int ref_stride); -#define vpx_comp_avg_pred vpx_comp_avg_pred_c - -void vpx_convolve8_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -void vpx_convolve8_neon(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -#define vpx_convolve8 vpx_convolve8_neon - -void vpx_convolve8_avg_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -void vpx_convolve8_avg_neon(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -#define vpx_convolve8_avg vpx_convolve8_avg_neon - -void vpx_convolve8_avg_horiz_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -void vpx_convolve8_avg_horiz_neon(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -#define vpx_convolve8_avg_horiz vpx_convolve8_avg_horiz_neon - -void vpx_convolve8_avg_vert_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -void vpx_convolve8_avg_vert_neon(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -#define vpx_convolve8_avg_vert vpx_convolve8_avg_vert_neon - -void vpx_convolve8_horiz_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -void vpx_convolve8_horiz_neon(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -#define vpx_convolve8_horiz vpx_convolve8_horiz_neon - -void vpx_convolve8_vert_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -void vpx_convolve8_vert_neon(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -#define vpx_convolve8_vert vpx_convolve8_vert_neon - -void vpx_convolve_avg_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -void vpx_convolve_avg_neon(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -#define vpx_convolve_avg vpx_convolve_avg_neon - -void vpx_convolve_copy_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -void vpx_convolve_copy_neon(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -#define vpx_convolve_copy vpx_convolve_copy_neon - -void vpx_d117_predictor_16x16_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d117_predictor_16x16 vpx_d117_predictor_16x16_c - -void vpx_d117_predictor_32x32_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d117_predictor_32x32 vpx_d117_predictor_32x32_c - -void vpx_d117_predictor_4x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d117_predictor_4x4 vpx_d117_predictor_4x4_c - -void vpx_d117_predictor_8x8_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d117_predictor_8x8 vpx_d117_predictor_8x8_c - -void vpx_d135_predictor_16x16_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_d135_predictor_16x16_neon(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d135_predictor_16x16 vpx_d135_predictor_16x16_neon - -void vpx_d135_predictor_32x32_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_d135_predictor_32x32_neon(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d135_predictor_32x32 vpx_d135_predictor_32x32_neon - -void vpx_d135_predictor_4x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_d135_predictor_4x4_neon(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d135_predictor_4x4 vpx_d135_predictor_4x4_neon - -void vpx_d135_predictor_8x8_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_d135_predictor_8x8_neon(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d135_predictor_8x8 vpx_d135_predictor_8x8_neon - -void vpx_d153_predictor_16x16_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d153_predictor_16x16 vpx_d153_predictor_16x16_c - -void vpx_d153_predictor_32x32_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d153_predictor_32x32 vpx_d153_predictor_32x32_c - -void vpx_d153_predictor_4x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d153_predictor_4x4 vpx_d153_predictor_4x4_c - -void vpx_d153_predictor_8x8_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d153_predictor_8x8 vpx_d153_predictor_8x8_c - -void vpx_d207_predictor_16x16_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d207_predictor_16x16 vpx_d207_predictor_16x16_c - -void vpx_d207_predictor_32x32_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d207_predictor_32x32 vpx_d207_predictor_32x32_c - -void vpx_d207_predictor_4x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d207_predictor_4x4 vpx_d207_predictor_4x4_c - -void vpx_d207_predictor_8x8_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d207_predictor_8x8 vpx_d207_predictor_8x8_c - -void vpx_d207e_predictor_16x16_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d207e_predictor_16x16 vpx_d207e_predictor_16x16_c - -void vpx_d207e_predictor_32x32_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d207e_predictor_32x32 vpx_d207e_predictor_32x32_c - -void vpx_d207e_predictor_4x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d207e_predictor_4x4 vpx_d207e_predictor_4x4_c - -void vpx_d207e_predictor_8x8_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d207e_predictor_8x8 vpx_d207e_predictor_8x8_c - -void vpx_d45_predictor_16x16_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_d45_predictor_16x16_neon(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d45_predictor_16x16 vpx_d45_predictor_16x16_neon - -void vpx_d45_predictor_32x32_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_d45_predictor_32x32_neon(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d45_predictor_32x32 vpx_d45_predictor_32x32_neon - -void vpx_d45_predictor_4x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_d45_predictor_4x4_neon(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d45_predictor_4x4 vpx_d45_predictor_4x4_neon - -void vpx_d45_predictor_8x8_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_d45_predictor_8x8_neon(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d45_predictor_8x8 vpx_d45_predictor_8x8_neon - -void vpx_d45e_predictor_16x16_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d45e_predictor_16x16 vpx_d45e_predictor_16x16_c - -void vpx_d45e_predictor_32x32_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d45e_predictor_32x32 vpx_d45e_predictor_32x32_c - -void vpx_d45e_predictor_4x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d45e_predictor_4x4 vpx_d45e_predictor_4x4_c - -void vpx_d45e_predictor_8x8_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d45e_predictor_8x8 vpx_d45e_predictor_8x8_c - -void vpx_d63_predictor_16x16_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d63_predictor_16x16 vpx_d63_predictor_16x16_c - -void vpx_d63_predictor_32x32_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d63_predictor_32x32 vpx_d63_predictor_32x32_c - -void vpx_d63_predictor_4x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d63_predictor_4x4 vpx_d63_predictor_4x4_c - -void vpx_d63_predictor_8x8_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d63_predictor_8x8 vpx_d63_predictor_8x8_c - -void vpx_d63e_predictor_16x16_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d63e_predictor_16x16 vpx_d63e_predictor_16x16_c - -void vpx_d63e_predictor_32x32_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d63e_predictor_32x32 vpx_d63e_predictor_32x32_c - -void vpx_d63e_predictor_4x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d63e_predictor_4x4 vpx_d63e_predictor_4x4_c - -void vpx_d63e_predictor_8x8_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d63e_predictor_8x8 vpx_d63e_predictor_8x8_c - -void vpx_d63f_predictor_4x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d63f_predictor_4x4 vpx_d63f_predictor_4x4_c - -void vpx_dc_128_predictor_16x16_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_dc_128_predictor_16x16_neon(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_dc_128_predictor_16x16 vpx_dc_128_predictor_16x16_neon - -void vpx_dc_128_predictor_32x32_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_dc_128_predictor_32x32_neon(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_dc_128_predictor_32x32 vpx_dc_128_predictor_32x32_neon - -void vpx_dc_128_predictor_4x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_dc_128_predictor_4x4_neon(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_dc_128_predictor_4x4 vpx_dc_128_predictor_4x4_neon - -void vpx_dc_128_predictor_8x8_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_dc_128_predictor_8x8_neon(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_dc_128_predictor_8x8 vpx_dc_128_predictor_8x8_neon - -void vpx_dc_left_predictor_16x16_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_dc_left_predictor_16x16_neon(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_dc_left_predictor_16x16 vpx_dc_left_predictor_16x16_neon - -void vpx_dc_left_predictor_32x32_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_dc_left_predictor_32x32_neon(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_dc_left_predictor_32x32 vpx_dc_left_predictor_32x32_neon - -void vpx_dc_left_predictor_4x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_dc_left_predictor_4x4_neon(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_dc_left_predictor_4x4 vpx_dc_left_predictor_4x4_neon - -void vpx_dc_left_predictor_8x8_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_dc_left_predictor_8x8_neon(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_dc_left_predictor_8x8 vpx_dc_left_predictor_8x8_neon - -void vpx_dc_predictor_16x16_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_dc_predictor_16x16_neon(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_dc_predictor_16x16 vpx_dc_predictor_16x16_neon - -void vpx_dc_predictor_32x32_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_dc_predictor_32x32_neon(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_dc_predictor_32x32 vpx_dc_predictor_32x32_neon - -void vpx_dc_predictor_4x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_dc_predictor_4x4_neon(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_dc_predictor_4x4 vpx_dc_predictor_4x4_neon - -void vpx_dc_predictor_8x8_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_dc_predictor_8x8_neon(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_dc_predictor_8x8 vpx_dc_predictor_8x8_neon - -void vpx_dc_top_predictor_16x16_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_dc_top_predictor_16x16_neon(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_dc_top_predictor_16x16 vpx_dc_top_predictor_16x16_neon - -void vpx_dc_top_predictor_32x32_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_dc_top_predictor_32x32_neon(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_dc_top_predictor_32x32 vpx_dc_top_predictor_32x32_neon - -void vpx_dc_top_predictor_4x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_dc_top_predictor_4x4_neon(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_dc_top_predictor_4x4 vpx_dc_top_predictor_4x4_neon - -void vpx_dc_top_predictor_8x8_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_dc_top_predictor_8x8_neon(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_dc_top_predictor_8x8 vpx_dc_top_predictor_8x8_neon - -void vpx_fdct16x16_c(const int16_t *input, tran_low_t *output, int stride); -#define vpx_fdct16x16 vpx_fdct16x16_c - -void vpx_fdct16x16_1_c(const int16_t *input, tran_low_t *output, int stride); -#define vpx_fdct16x16_1 vpx_fdct16x16_1_c - -void vpx_fdct32x32_c(const int16_t *input, tran_low_t *output, int stride); -#define vpx_fdct32x32 vpx_fdct32x32_c - -void vpx_fdct32x32_1_c(const int16_t *input, tran_low_t *output, int stride); -#define vpx_fdct32x32_1 vpx_fdct32x32_1_c - -void vpx_fdct32x32_rd_c(const int16_t *input, tran_low_t *output, int stride); -#define vpx_fdct32x32_rd vpx_fdct32x32_rd_c - -void vpx_fdct4x4_c(const int16_t *input, tran_low_t *output, int stride); -#define vpx_fdct4x4 vpx_fdct4x4_c - -void vpx_fdct4x4_1_c(const int16_t *input, tran_low_t *output, int stride); -#define vpx_fdct4x4_1 vpx_fdct4x4_1_c - -void vpx_fdct8x8_c(const int16_t *input, tran_low_t *output, int stride); -void vpx_fdct8x8_neon(const int16_t *input, tran_low_t *output, int stride); -#define vpx_fdct8x8 vpx_fdct8x8_neon - -void vpx_fdct8x8_1_c(const int16_t *input, tran_low_t *output, int stride); -void vpx_fdct8x8_1_neon(const int16_t *input, tran_low_t *output, int stride); -#define vpx_fdct8x8_1 vpx_fdct8x8_1_neon - -void vpx_get16x16var_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse, int *sum); -void vpx_get16x16var_neon(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse, int *sum); -#define vpx_get16x16var vpx_get16x16var_neon - -unsigned int vpx_get4x4sse_cs_c(const unsigned char *src_ptr, int source_stride, const unsigned char *ref_ptr, int ref_stride); -unsigned int vpx_get4x4sse_cs_neon(const unsigned char *src_ptr, int source_stride, const unsigned char *ref_ptr, int ref_stride); -#define vpx_get4x4sse_cs vpx_get4x4sse_cs_neon - -void vpx_get8x8var_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse, int *sum); -void vpx_get8x8var_neon(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse, int *sum); -#define vpx_get8x8var vpx_get8x8var_neon - -unsigned int vpx_get_mb_ss_c(const int16_t *); -#define vpx_get_mb_ss vpx_get_mb_ss_c - -void vpx_h_predictor_16x16_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_h_predictor_16x16_neon(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_h_predictor_16x16 vpx_h_predictor_16x16_neon - -void vpx_h_predictor_32x32_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_h_predictor_32x32_neon(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_h_predictor_32x32 vpx_h_predictor_32x32_neon - -void vpx_h_predictor_4x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_h_predictor_4x4_neon(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_h_predictor_4x4 vpx_h_predictor_4x4_neon - -void vpx_h_predictor_8x8_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_h_predictor_8x8_neon(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_h_predictor_8x8 vpx_h_predictor_8x8_neon - -void vpx_hadamard_16x16_c(const int16_t *src_diff, int src_stride, int16_t *coeff); -void vpx_hadamard_16x16_neon(const int16_t *src_diff, int src_stride, int16_t *coeff); -#define vpx_hadamard_16x16 vpx_hadamard_16x16_neon - -void vpx_hadamard_8x8_c(const int16_t *src_diff, int src_stride, int16_t *coeff); -void vpx_hadamard_8x8_neon(const int16_t *src_diff, int src_stride, int16_t *coeff); -#define vpx_hadamard_8x8 vpx_hadamard_8x8_neon - -void vpx_he_predictor_4x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_he_predictor_4x4 vpx_he_predictor_4x4_c - -void vpx_idct16x16_10_add_c(const tran_low_t *input, uint8_t *dest, int stride); -void vpx_idct16x16_10_add_neon(const tran_low_t *input, uint8_t *dest, int stride); -#define vpx_idct16x16_10_add vpx_idct16x16_10_add_neon - -void vpx_idct16x16_1_add_c(const tran_low_t *input, uint8_t *dest, int stride); -void vpx_idct16x16_1_add_neon(const tran_low_t *input, uint8_t *dest, int stride); -#define vpx_idct16x16_1_add vpx_idct16x16_1_add_neon - -void vpx_idct16x16_256_add_c(const tran_low_t *input, uint8_t *dest, int stride); -void vpx_idct16x16_256_add_neon(const tran_low_t *input, uint8_t *dest, int stride); -#define vpx_idct16x16_256_add vpx_idct16x16_256_add_neon - -void vpx_idct32x32_1024_add_c(const tran_low_t *input, uint8_t *dest, int stride); -void vpx_idct32x32_1024_add_neon(const tran_low_t *input, uint8_t *dest, int stride); -#define vpx_idct32x32_1024_add vpx_idct32x32_1024_add_neon - -void vpx_idct32x32_135_add_c(const tran_low_t *input, uint8_t *dest, int stride); -void vpx_idct32x32_135_add_neon(const tran_low_t *input, uint8_t *dest, int stride); -#define vpx_idct32x32_135_add vpx_idct32x32_135_add_neon - -void vpx_idct32x32_1_add_c(const tran_low_t *input, uint8_t *dest, int stride); -void vpx_idct32x32_1_add_neon(const tran_low_t *input, uint8_t *dest, int stride); -#define vpx_idct32x32_1_add vpx_idct32x32_1_add_neon - -void vpx_idct32x32_34_add_c(const tran_low_t *input, uint8_t *dest, int stride); -void vpx_idct32x32_34_add_neon(const tran_low_t *input, uint8_t *dest, int stride); -#define vpx_idct32x32_34_add vpx_idct32x32_34_add_neon - -void vpx_idct4x4_16_add_c(const tran_low_t *input, uint8_t *dest, int stride); -void vpx_idct4x4_16_add_neon(const tran_low_t *input, uint8_t *dest, int stride); -#define vpx_idct4x4_16_add vpx_idct4x4_16_add_neon - -void vpx_idct4x4_1_add_c(const tran_low_t *input, uint8_t *dest, int stride); -void vpx_idct4x4_1_add_neon(const tran_low_t *input, uint8_t *dest, int stride); -#define vpx_idct4x4_1_add vpx_idct4x4_1_add_neon - -void vpx_idct8x8_12_add_c(const tran_low_t *input, uint8_t *dest, int stride); -void vpx_idct8x8_12_add_neon(const tran_low_t *input, uint8_t *dest, int stride); -#define vpx_idct8x8_12_add vpx_idct8x8_12_add_neon - -void vpx_idct8x8_1_add_c(const tran_low_t *input, uint8_t *dest, int stride); -void vpx_idct8x8_1_add_neon(const tran_low_t *input, uint8_t *dest, int stride); -#define vpx_idct8x8_1_add vpx_idct8x8_1_add_neon - -void vpx_idct8x8_64_add_c(const tran_low_t *input, uint8_t *dest, int stride); -void vpx_idct8x8_64_add_neon(const tran_low_t *input, uint8_t *dest, int stride); -#define vpx_idct8x8_64_add vpx_idct8x8_64_add_neon - -int16_t vpx_int_pro_col_c(const uint8_t *ref, const int width); -int16_t vpx_int_pro_col_neon(const uint8_t *ref, const int width); -#define vpx_int_pro_col vpx_int_pro_col_neon - -void vpx_int_pro_row_c(int16_t *hbuf, const uint8_t *ref, const int ref_stride, const int height); -void vpx_int_pro_row_neon(int16_t *hbuf, const uint8_t *ref, const int ref_stride, const int height); -#define vpx_int_pro_row vpx_int_pro_row_neon - -void vpx_iwht4x4_16_add_c(const tran_low_t *input, uint8_t *dest, int stride); -#define vpx_iwht4x4_16_add vpx_iwht4x4_16_add_c - -void vpx_iwht4x4_1_add_c(const tran_low_t *input, uint8_t *dest, int stride); -#define vpx_iwht4x4_1_add vpx_iwht4x4_1_add_c - -void vpx_lpf_horizontal_16_c(uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh); -void vpx_lpf_horizontal_16_neon(uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh); -#define vpx_lpf_horizontal_16 vpx_lpf_horizontal_16_neon - -void vpx_lpf_horizontal_16_dual_c(uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh); -void vpx_lpf_horizontal_16_dual_neon(uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh); -#define vpx_lpf_horizontal_16_dual vpx_lpf_horizontal_16_dual_neon - -void vpx_lpf_horizontal_4_c(uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh); -void vpx_lpf_horizontal_4_neon(uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh); -#define vpx_lpf_horizontal_4 vpx_lpf_horizontal_4_neon - -void vpx_lpf_horizontal_4_dual_c(uint8_t *s, int pitch, const uint8_t *blimit0, const uint8_t *limit0, const uint8_t *thresh0, const uint8_t *blimit1, const uint8_t *limit1, const uint8_t *thresh1); -void vpx_lpf_horizontal_4_dual_neon(uint8_t *s, int pitch, const uint8_t *blimit0, const uint8_t *limit0, const uint8_t *thresh0, const uint8_t *blimit1, const uint8_t *limit1, const uint8_t *thresh1); -#define vpx_lpf_horizontal_4_dual vpx_lpf_horizontal_4_dual_neon - -void vpx_lpf_horizontal_8_c(uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh); -void vpx_lpf_horizontal_8_neon(uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh); -#define vpx_lpf_horizontal_8 vpx_lpf_horizontal_8_neon - -void vpx_lpf_horizontal_8_dual_c(uint8_t *s, int pitch, const uint8_t *blimit0, const uint8_t *limit0, const uint8_t *thresh0, const uint8_t *blimit1, const uint8_t *limit1, const uint8_t *thresh1); -void vpx_lpf_horizontal_8_dual_neon(uint8_t *s, int pitch, const uint8_t *blimit0, const uint8_t *limit0, const uint8_t *thresh0, const uint8_t *blimit1, const uint8_t *limit1, const uint8_t *thresh1); -#define vpx_lpf_horizontal_8_dual vpx_lpf_horizontal_8_dual_neon - -void vpx_lpf_vertical_16_c(uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh); -void vpx_lpf_vertical_16_neon(uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh); -#define vpx_lpf_vertical_16 vpx_lpf_vertical_16_neon - -void vpx_lpf_vertical_16_dual_c(uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh); -void vpx_lpf_vertical_16_dual_neon(uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh); -#define vpx_lpf_vertical_16_dual vpx_lpf_vertical_16_dual_neon - -void vpx_lpf_vertical_4_c(uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh); -void vpx_lpf_vertical_4_neon(uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh); -#define vpx_lpf_vertical_4 vpx_lpf_vertical_4_neon - -void vpx_lpf_vertical_4_dual_c(uint8_t *s, int pitch, const uint8_t *blimit0, const uint8_t *limit0, const uint8_t *thresh0, const uint8_t *blimit1, const uint8_t *limit1, const uint8_t *thresh1); -void vpx_lpf_vertical_4_dual_neon(uint8_t *s, int pitch, const uint8_t *blimit0, const uint8_t *limit0, const uint8_t *thresh0, const uint8_t *blimit1, const uint8_t *limit1, const uint8_t *thresh1); -#define vpx_lpf_vertical_4_dual vpx_lpf_vertical_4_dual_neon - -void vpx_lpf_vertical_8_c(uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh); -void vpx_lpf_vertical_8_neon(uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh); -#define vpx_lpf_vertical_8 vpx_lpf_vertical_8_neon - -void vpx_lpf_vertical_8_dual_c(uint8_t *s, int pitch, const uint8_t *blimit0, const uint8_t *limit0, const uint8_t *thresh0, const uint8_t *blimit1, const uint8_t *limit1, const uint8_t *thresh1); -void vpx_lpf_vertical_8_dual_neon(uint8_t *s, int pitch, const uint8_t *blimit0, const uint8_t *limit0, const uint8_t *thresh0, const uint8_t *blimit1, const uint8_t *limit1, const uint8_t *thresh1); -#define vpx_lpf_vertical_8_dual vpx_lpf_vertical_8_dual_neon - -void vpx_mbpost_proc_across_ip_c(unsigned char *dst, int pitch, int rows, int cols,int flimit); -void vpx_mbpost_proc_across_ip_neon(unsigned char *dst, int pitch, int rows, int cols,int flimit); -#define vpx_mbpost_proc_across_ip vpx_mbpost_proc_across_ip_neon - -void vpx_mbpost_proc_down_c(unsigned char *dst, int pitch, int rows, int cols,int flimit); -void vpx_mbpost_proc_down_neon(unsigned char *dst, int pitch, int rows, int cols,int flimit); -#define vpx_mbpost_proc_down vpx_mbpost_proc_down_neon - -void vpx_minmax_8x8_c(const uint8_t *s, int p, const uint8_t *d, int dp, int *min, int *max); -void vpx_minmax_8x8_neon(const uint8_t *s, int p, const uint8_t *d, int dp, int *min, int *max); -#define vpx_minmax_8x8 vpx_minmax_8x8_neon - -unsigned int vpx_mse16x16_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int recon_stride, unsigned int *sse); -unsigned int vpx_mse16x16_neon(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int recon_stride, unsigned int *sse); -#define vpx_mse16x16 vpx_mse16x16_neon - -unsigned int vpx_mse16x8_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int recon_stride, unsigned int *sse); -#define vpx_mse16x8 vpx_mse16x8_c - -unsigned int vpx_mse8x16_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int recon_stride, unsigned int *sse); -#define vpx_mse8x16 vpx_mse8x16_c - -unsigned int vpx_mse8x8_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int recon_stride, unsigned int *sse); -#define vpx_mse8x8 vpx_mse8x8_c - -void vpx_plane_add_noise_c(uint8_t *start, const int8_t *noise, int blackclamp, int whiteclamp, int width, int height, int pitch); -#define vpx_plane_add_noise vpx_plane_add_noise_c - -void vpx_post_proc_down_and_across_mb_row_c(unsigned char *src, unsigned char *dst, int src_pitch, int dst_pitch, int cols, unsigned char *flimits, int size); -void vpx_post_proc_down_and_across_mb_row_neon(unsigned char *src, unsigned char *dst, int src_pitch, int dst_pitch, int cols, unsigned char *flimits, int size); -#define vpx_post_proc_down_and_across_mb_row vpx_post_proc_down_and_across_mb_row_neon - -void vpx_quantize_b_c(const tran_low_t *coeff_ptr, intptr_t n_coeffs, int skip_block, const int16_t *zbin_ptr, const int16_t *round_ptr, const int16_t *quant_ptr, const int16_t *quant_shift_ptr, tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr, const int16_t *dequant_ptr, uint16_t *eob_ptr, const int16_t *scan, const int16_t *iscan); -#define vpx_quantize_b vpx_quantize_b_c - -void vpx_quantize_b_32x32_c(const tran_low_t *coeff_ptr, intptr_t n_coeffs, int skip_block, const int16_t *zbin_ptr, const int16_t *round_ptr, const int16_t *quant_ptr, const int16_t *quant_shift_ptr, tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr, const int16_t *dequant_ptr, uint16_t *eob_ptr, const int16_t *scan, const int16_t *iscan); -#define vpx_quantize_b_32x32 vpx_quantize_b_32x32_c - -unsigned int vpx_sad16x16_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -unsigned int vpx_sad16x16_neon(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -#define vpx_sad16x16 vpx_sad16x16_neon - -unsigned int vpx_sad16x16_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -#define vpx_sad16x16_avg vpx_sad16x16_avg_c - -void vpx_sad16x16x3_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -#define vpx_sad16x16x3 vpx_sad16x16x3_c - -void vpx_sad16x16x4d_c(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); -void vpx_sad16x16x4d_neon(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); -#define vpx_sad16x16x4d vpx_sad16x16x4d_neon - -void vpx_sad16x16x8_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -#define vpx_sad16x16x8 vpx_sad16x16x8_c - -unsigned int vpx_sad16x32_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -#define vpx_sad16x32 vpx_sad16x32_c - -unsigned int vpx_sad16x32_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -#define vpx_sad16x32_avg vpx_sad16x32_avg_c - -void vpx_sad16x32x4d_c(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); -#define vpx_sad16x32x4d vpx_sad16x32x4d_c - -unsigned int vpx_sad16x8_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -unsigned int vpx_sad16x8_neon(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -#define vpx_sad16x8 vpx_sad16x8_neon - -unsigned int vpx_sad16x8_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -#define vpx_sad16x8_avg vpx_sad16x8_avg_c - -void vpx_sad16x8x3_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -#define vpx_sad16x8x3 vpx_sad16x8x3_c - -void vpx_sad16x8x4d_c(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); -#define vpx_sad16x8x4d vpx_sad16x8x4d_c - -void vpx_sad16x8x8_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -#define vpx_sad16x8x8 vpx_sad16x8x8_c - -unsigned int vpx_sad32x16_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -#define vpx_sad32x16 vpx_sad32x16_c - -unsigned int vpx_sad32x16_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -#define vpx_sad32x16_avg vpx_sad32x16_avg_c - -void vpx_sad32x16x4d_c(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); -#define vpx_sad32x16x4d vpx_sad32x16x4d_c - -unsigned int vpx_sad32x32_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -unsigned int vpx_sad32x32_neon(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -#define vpx_sad32x32 vpx_sad32x32_neon - -unsigned int vpx_sad32x32_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -#define vpx_sad32x32_avg vpx_sad32x32_avg_c - -void vpx_sad32x32x3_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -#define vpx_sad32x32x3 vpx_sad32x32x3_c - -void vpx_sad32x32x4d_c(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); -void vpx_sad32x32x4d_neon(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); -#define vpx_sad32x32x4d vpx_sad32x32x4d_neon - -void vpx_sad32x32x8_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -#define vpx_sad32x32x8 vpx_sad32x32x8_c - -unsigned int vpx_sad32x64_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -#define vpx_sad32x64 vpx_sad32x64_c - -unsigned int vpx_sad32x64_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -#define vpx_sad32x64_avg vpx_sad32x64_avg_c - -void vpx_sad32x64x4d_c(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); -#define vpx_sad32x64x4d vpx_sad32x64x4d_c - -unsigned int vpx_sad4x4_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -unsigned int vpx_sad4x4_neon(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -#define vpx_sad4x4 vpx_sad4x4_neon - -unsigned int vpx_sad4x4_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -#define vpx_sad4x4_avg vpx_sad4x4_avg_c - -void vpx_sad4x4x3_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -#define vpx_sad4x4x3 vpx_sad4x4x3_c - -void vpx_sad4x4x4d_c(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); -#define vpx_sad4x4x4d vpx_sad4x4x4d_c - -void vpx_sad4x4x8_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -#define vpx_sad4x4x8 vpx_sad4x4x8_c - -unsigned int vpx_sad4x8_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -#define vpx_sad4x8 vpx_sad4x8_c - -unsigned int vpx_sad4x8_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -#define vpx_sad4x8_avg vpx_sad4x8_avg_c - -void vpx_sad4x8x4d_c(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); -#define vpx_sad4x8x4d vpx_sad4x8x4d_c - -void vpx_sad4x8x8_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -#define vpx_sad4x8x8 vpx_sad4x8x8_c - -unsigned int vpx_sad64x32_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -#define vpx_sad64x32 vpx_sad64x32_c - -unsigned int vpx_sad64x32_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -#define vpx_sad64x32_avg vpx_sad64x32_avg_c - -void vpx_sad64x32x4d_c(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); -#define vpx_sad64x32x4d vpx_sad64x32x4d_c - -unsigned int vpx_sad64x64_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -unsigned int vpx_sad64x64_neon(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -#define vpx_sad64x64 vpx_sad64x64_neon - -unsigned int vpx_sad64x64_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -#define vpx_sad64x64_avg vpx_sad64x64_avg_c - -void vpx_sad64x64x3_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -#define vpx_sad64x64x3 vpx_sad64x64x3_c - -void vpx_sad64x64x4d_c(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); -void vpx_sad64x64x4d_neon(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); -#define vpx_sad64x64x4d vpx_sad64x64x4d_neon - -void vpx_sad64x64x8_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -#define vpx_sad64x64x8 vpx_sad64x64x8_c - -unsigned int vpx_sad8x16_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -unsigned int vpx_sad8x16_neon(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -#define vpx_sad8x16 vpx_sad8x16_neon - -unsigned int vpx_sad8x16_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -#define vpx_sad8x16_avg vpx_sad8x16_avg_c - -void vpx_sad8x16x3_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -#define vpx_sad8x16x3 vpx_sad8x16x3_c - -void vpx_sad8x16x4d_c(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); -#define vpx_sad8x16x4d vpx_sad8x16x4d_c - -void vpx_sad8x16x8_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -#define vpx_sad8x16x8 vpx_sad8x16x8_c - -unsigned int vpx_sad8x4_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -#define vpx_sad8x4 vpx_sad8x4_c - -unsigned int vpx_sad8x4_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -#define vpx_sad8x4_avg vpx_sad8x4_avg_c - -void vpx_sad8x4x4d_c(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); -#define vpx_sad8x4x4d vpx_sad8x4x4d_c - -void vpx_sad8x4x8_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -#define vpx_sad8x4x8 vpx_sad8x4x8_c - -unsigned int vpx_sad8x8_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -unsigned int vpx_sad8x8_neon(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -#define vpx_sad8x8 vpx_sad8x8_neon - -unsigned int vpx_sad8x8_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -#define vpx_sad8x8_avg vpx_sad8x8_avg_c - -void vpx_sad8x8x3_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -#define vpx_sad8x8x3 vpx_sad8x8x3_c - -void vpx_sad8x8x4d_c(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); -#define vpx_sad8x8x4d vpx_sad8x8x4d_c - -void vpx_sad8x8x8_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -#define vpx_sad8x8x8 vpx_sad8x8x8_c - -int vpx_satd_c(const int16_t *coeff, int length); -int vpx_satd_neon(const int16_t *coeff, int length); -#define vpx_satd vpx_satd_neon - -void vpx_scaled_2d_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -#define vpx_scaled_2d vpx_scaled_2d_c - -void vpx_scaled_avg_2d_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -#define vpx_scaled_avg_2d vpx_scaled_avg_2d_c - -void vpx_scaled_avg_horiz_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -#define vpx_scaled_avg_horiz vpx_scaled_avg_horiz_c - -void vpx_scaled_avg_vert_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -#define vpx_scaled_avg_vert vpx_scaled_avg_vert_c - -void vpx_scaled_horiz_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -#define vpx_scaled_horiz vpx_scaled_horiz_c - -void vpx_scaled_vert_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -#define vpx_scaled_vert vpx_scaled_vert_c - -uint32_t vpx_sub_pixel_avg_variance16x16_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_sub_pixel_avg_variance16x16 vpx_sub_pixel_avg_variance16x16_c - -uint32_t vpx_sub_pixel_avg_variance16x32_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_sub_pixel_avg_variance16x32 vpx_sub_pixel_avg_variance16x32_c - -uint32_t vpx_sub_pixel_avg_variance16x8_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_sub_pixel_avg_variance16x8 vpx_sub_pixel_avg_variance16x8_c - -uint32_t vpx_sub_pixel_avg_variance32x16_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_sub_pixel_avg_variance32x16 vpx_sub_pixel_avg_variance32x16_c - -uint32_t vpx_sub_pixel_avg_variance32x32_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_sub_pixel_avg_variance32x32 vpx_sub_pixel_avg_variance32x32_c - -uint32_t vpx_sub_pixel_avg_variance32x64_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_sub_pixel_avg_variance32x64 vpx_sub_pixel_avg_variance32x64_c - -uint32_t vpx_sub_pixel_avg_variance4x4_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_sub_pixel_avg_variance4x4 vpx_sub_pixel_avg_variance4x4_c - -uint32_t vpx_sub_pixel_avg_variance4x8_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_sub_pixel_avg_variance4x8 vpx_sub_pixel_avg_variance4x8_c - -uint32_t vpx_sub_pixel_avg_variance64x32_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_sub_pixel_avg_variance64x32 vpx_sub_pixel_avg_variance64x32_c - -uint32_t vpx_sub_pixel_avg_variance64x64_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_sub_pixel_avg_variance64x64 vpx_sub_pixel_avg_variance64x64_c - -uint32_t vpx_sub_pixel_avg_variance8x16_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_sub_pixel_avg_variance8x16 vpx_sub_pixel_avg_variance8x16_c - -uint32_t vpx_sub_pixel_avg_variance8x4_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_sub_pixel_avg_variance8x4 vpx_sub_pixel_avg_variance8x4_c - -uint32_t vpx_sub_pixel_avg_variance8x8_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_sub_pixel_avg_variance8x8 vpx_sub_pixel_avg_variance8x8_c - -uint32_t vpx_sub_pixel_variance16x16_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_sub_pixel_variance16x16_neon(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -#define vpx_sub_pixel_variance16x16 vpx_sub_pixel_variance16x16_neon - -uint32_t vpx_sub_pixel_variance16x32_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -#define vpx_sub_pixel_variance16x32 vpx_sub_pixel_variance16x32_c - -uint32_t vpx_sub_pixel_variance16x8_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -#define vpx_sub_pixel_variance16x8 vpx_sub_pixel_variance16x8_c - -uint32_t vpx_sub_pixel_variance32x16_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -#define vpx_sub_pixel_variance32x16 vpx_sub_pixel_variance32x16_c - -uint32_t vpx_sub_pixel_variance32x32_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_sub_pixel_variance32x32_neon(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -#define vpx_sub_pixel_variance32x32 vpx_sub_pixel_variance32x32_neon - -uint32_t vpx_sub_pixel_variance32x64_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -#define vpx_sub_pixel_variance32x64 vpx_sub_pixel_variance32x64_c - -uint32_t vpx_sub_pixel_variance4x4_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -#define vpx_sub_pixel_variance4x4 vpx_sub_pixel_variance4x4_c - -uint32_t vpx_sub_pixel_variance4x8_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -#define vpx_sub_pixel_variance4x8 vpx_sub_pixel_variance4x8_c - -uint32_t vpx_sub_pixel_variance64x32_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -#define vpx_sub_pixel_variance64x32 vpx_sub_pixel_variance64x32_c - -uint32_t vpx_sub_pixel_variance64x64_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_sub_pixel_variance64x64_neon(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -#define vpx_sub_pixel_variance64x64 vpx_sub_pixel_variance64x64_neon - -uint32_t vpx_sub_pixel_variance8x16_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -#define vpx_sub_pixel_variance8x16 vpx_sub_pixel_variance8x16_c - -uint32_t vpx_sub_pixel_variance8x4_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -#define vpx_sub_pixel_variance8x4 vpx_sub_pixel_variance8x4_c - -uint32_t vpx_sub_pixel_variance8x8_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_sub_pixel_variance8x8_neon(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -#define vpx_sub_pixel_variance8x8 vpx_sub_pixel_variance8x8_neon - -void vpx_subtract_block_c(int rows, int cols, int16_t *diff_ptr, ptrdiff_t diff_stride, const uint8_t *src_ptr, ptrdiff_t src_stride, const uint8_t *pred_ptr, ptrdiff_t pred_stride); -void vpx_subtract_block_neon(int rows, int cols, int16_t *diff_ptr, ptrdiff_t diff_stride, const uint8_t *src_ptr, ptrdiff_t src_stride, const uint8_t *pred_ptr, ptrdiff_t pred_stride); -#define vpx_subtract_block vpx_subtract_block_neon - -uint64_t vpx_sum_squares_2d_i16_c(const int16_t *src, int stride, int size); -#define vpx_sum_squares_2d_i16 vpx_sum_squares_2d_i16_c - -void vpx_tm_predictor_16x16_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_tm_predictor_16x16_neon(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_tm_predictor_16x16 vpx_tm_predictor_16x16_neon - -void vpx_tm_predictor_32x32_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_tm_predictor_32x32_neon(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_tm_predictor_32x32 vpx_tm_predictor_32x32_neon - -void vpx_tm_predictor_4x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_tm_predictor_4x4_neon(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_tm_predictor_4x4 vpx_tm_predictor_4x4_neon - -void vpx_tm_predictor_8x8_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_tm_predictor_8x8_neon(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_tm_predictor_8x8 vpx_tm_predictor_8x8_neon - -void vpx_v_predictor_16x16_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_v_predictor_16x16_neon(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_v_predictor_16x16 vpx_v_predictor_16x16_neon - -void vpx_v_predictor_32x32_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_v_predictor_32x32_neon(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_v_predictor_32x32 vpx_v_predictor_32x32_neon - -void vpx_v_predictor_4x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_v_predictor_4x4_neon(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_v_predictor_4x4 vpx_v_predictor_4x4_neon - -void vpx_v_predictor_8x8_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_v_predictor_8x8_neon(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_v_predictor_8x8 vpx_v_predictor_8x8_neon - -unsigned int vpx_variance16x16_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -unsigned int vpx_variance16x16_neon(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_variance16x16 vpx_variance16x16_neon - -unsigned int vpx_variance16x32_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_variance16x32 vpx_variance16x32_c - -unsigned int vpx_variance16x8_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -unsigned int vpx_variance16x8_neon(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_variance16x8 vpx_variance16x8_neon - -unsigned int vpx_variance32x16_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_variance32x16 vpx_variance32x16_c - -unsigned int vpx_variance32x32_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -unsigned int vpx_variance32x32_neon(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_variance32x32 vpx_variance32x32_neon - -unsigned int vpx_variance32x64_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -unsigned int vpx_variance32x64_neon(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_variance32x64 vpx_variance32x64_neon - -unsigned int vpx_variance4x4_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_variance4x4 vpx_variance4x4_c - -unsigned int vpx_variance4x8_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_variance4x8 vpx_variance4x8_c - -unsigned int vpx_variance64x32_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -unsigned int vpx_variance64x32_neon(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_variance64x32 vpx_variance64x32_neon - -unsigned int vpx_variance64x64_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -unsigned int vpx_variance64x64_neon(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_variance64x64 vpx_variance64x64_neon - -unsigned int vpx_variance8x16_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -unsigned int vpx_variance8x16_neon(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_variance8x16 vpx_variance8x16_neon - -unsigned int vpx_variance8x4_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_variance8x4 vpx_variance8x4_c - -unsigned int vpx_variance8x8_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -unsigned int vpx_variance8x8_neon(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_variance8x8 vpx_variance8x8_neon - -void vpx_ve_predictor_4x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_ve_predictor_4x4 vpx_ve_predictor_4x4_c - -int vpx_vector_var_c(const int16_t *ref, const int16_t *src, const int bwl); -int vpx_vector_var_neon(const int16_t *ref, const int16_t *src, const int bwl); -#define vpx_vector_var vpx_vector_var_neon - -void vpx_dsp_rtcd(void); - -#include "vpx_config.h" - -#ifdef RTCD_C -#include "vpx_ports/arm.h" -static void setup_rtcd_internal(void) -{ - int flags = arm_cpu_caps(); - - (void)flags; - -} -#endif - -#ifdef __cplusplus -} // extern "C" -#endif - -#endif diff --git a/WebRtc.NET/include/third_party/libvpx/source/config/linux/arm-neon/vpx_scale_rtcd.h b/WebRtc.NET/include/third_party/libvpx/source/config/linux/arm-neon/vpx_scale_rtcd.h deleted file mode 100644 index a1564b7a..00000000 --- a/WebRtc.NET/include/third_party/libvpx/source/config/linux/arm-neon/vpx_scale_rtcd.h +++ /dev/null @@ -1,71 +0,0 @@ -#ifndef VPX_SCALE_RTCD_H_ -#define VPX_SCALE_RTCD_H_ - -#ifdef RTCD_C -#define RTCD_EXTERN -#else -#define RTCD_EXTERN extern -#endif - -struct yv12_buffer_config; - -#ifdef __cplusplus -extern "C" { -#endif - -void vp8_horizontal_line_2_1_scale_c(const unsigned char *source, unsigned int source_width, unsigned char *dest, unsigned int dest_width); -#define vp8_horizontal_line_2_1_scale vp8_horizontal_line_2_1_scale_c - -void vp8_horizontal_line_5_3_scale_c(const unsigned char *source, unsigned int source_width, unsigned char *dest, unsigned int dest_width); -#define vp8_horizontal_line_5_3_scale vp8_horizontal_line_5_3_scale_c - -void vp8_horizontal_line_5_4_scale_c(const unsigned char *source, unsigned int source_width, unsigned char *dest, unsigned int dest_width); -#define vp8_horizontal_line_5_4_scale vp8_horizontal_line_5_4_scale_c - -void vp8_vertical_band_2_1_scale_c(unsigned char *source, unsigned int src_pitch, unsigned char *dest, unsigned int dest_pitch, unsigned int dest_width); -#define vp8_vertical_band_2_1_scale vp8_vertical_band_2_1_scale_c - -void vp8_vertical_band_2_1_scale_i_c(unsigned char *source, unsigned int src_pitch, unsigned char *dest, unsigned int dest_pitch, unsigned int dest_width); -#define vp8_vertical_band_2_1_scale_i vp8_vertical_band_2_1_scale_i_c - -void vp8_vertical_band_5_3_scale_c(unsigned char *source, unsigned int src_pitch, unsigned char *dest, unsigned int dest_pitch, unsigned int dest_width); -#define vp8_vertical_band_5_3_scale vp8_vertical_band_5_3_scale_c - -void vp8_vertical_band_5_4_scale_c(unsigned char *source, unsigned int src_pitch, unsigned char *dest, unsigned int dest_pitch, unsigned int dest_width); -#define vp8_vertical_band_5_4_scale vp8_vertical_band_5_4_scale_c - -void vp8_yv12_copy_frame_c(const struct yv12_buffer_config *src_ybc, struct yv12_buffer_config *dst_ybc); -#define vp8_yv12_copy_frame vp8_yv12_copy_frame_c - -void vp8_yv12_extend_frame_borders_c(struct yv12_buffer_config *ybf); -#define vp8_yv12_extend_frame_borders vp8_yv12_extend_frame_borders_c - -void vpx_extend_frame_borders_c(struct yv12_buffer_config *ybf); -#define vpx_extend_frame_borders vpx_extend_frame_borders_c - -void vpx_extend_frame_inner_borders_c(struct yv12_buffer_config *ybf); -#define vpx_extend_frame_inner_borders vpx_extend_frame_inner_borders_c - -void vpx_yv12_copy_y_c(const struct yv12_buffer_config *src_ybc, struct yv12_buffer_config *dst_ybc); -#define vpx_yv12_copy_y vpx_yv12_copy_y_c - -void vpx_scale_rtcd(void); - -#include "vpx_config.h" - -#ifdef RTCD_C -#include "vpx_ports/arm.h" -static void setup_rtcd_internal(void) -{ - int flags = arm_cpu_caps(); - - (void)flags; - -} -#endif - -#ifdef __cplusplus -} // extern "C" -#endif - -#endif diff --git a/WebRtc.NET/include/third_party/libvpx/source/config/linux/arm/vp8_rtcd.h b/WebRtc.NET/include/third_party/libvpx/source/config/linux/arm/vp8_rtcd.h deleted file mode 100644 index 3541d2e9..00000000 --- a/WebRtc.NET/include/third_party/libvpx/source/config/linux/arm/vp8_rtcd.h +++ /dev/null @@ -1,186 +0,0 @@ -#ifndef VP8_RTCD_H_ -#define VP8_RTCD_H_ - -#ifdef RTCD_C -#define RTCD_EXTERN -#else -#define RTCD_EXTERN extern -#endif - -/* - * VP8 - */ - -struct blockd; -struct macroblockd; -struct loop_filter_info; - -/* Encoder forward decls */ -struct block; -struct macroblock; -struct variance_vtable; -union int_mv; -struct yv12_buffer_config; - -#ifdef __cplusplus -extern "C" { -#endif - -void vp8_bilinear_predict16x16_c(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch); -#define vp8_bilinear_predict16x16 vp8_bilinear_predict16x16_c - -void vp8_bilinear_predict4x4_c(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch); -#define vp8_bilinear_predict4x4 vp8_bilinear_predict4x4_c - -void vp8_bilinear_predict8x4_c(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch); -#define vp8_bilinear_predict8x4 vp8_bilinear_predict8x4_c - -void vp8_bilinear_predict8x8_c(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch); -#define vp8_bilinear_predict8x8 vp8_bilinear_predict8x8_c - -void vp8_blend_b_c(unsigned char *y, unsigned char *u, unsigned char *v, int y1, int u1, int v1, int alpha, int stride); -#define vp8_blend_b vp8_blend_b_c - -void vp8_blend_mb_inner_c(unsigned char *y, unsigned char *u, unsigned char *v, int y1, int u1, int v1, int alpha, int stride); -#define vp8_blend_mb_inner vp8_blend_mb_inner_c - -void vp8_blend_mb_outer_c(unsigned char *y, unsigned char *u, unsigned char *v, int y1, int u1, int v1, int alpha, int stride); -#define vp8_blend_mb_outer vp8_blend_mb_outer_c - -int vp8_block_error_c(short *coeff, short *dqcoeff); -#define vp8_block_error vp8_block_error_c - -void vp8_copy_mem16x16_c(unsigned char *src, int src_pitch, unsigned char *dst, int dst_pitch); -#define vp8_copy_mem16x16 vp8_copy_mem16x16_c - -void vp8_copy_mem8x4_c(unsigned char *src, int src_pitch, unsigned char *dst, int dst_pitch); -#define vp8_copy_mem8x4 vp8_copy_mem8x4_c - -void vp8_copy_mem8x8_c(unsigned char *src, int src_pitch, unsigned char *dst, int dst_pitch); -#define vp8_copy_mem8x8 vp8_copy_mem8x8_c - -void vp8_dc_only_idct_add_c(short input, unsigned char *pred, int pred_stride, unsigned char *dst, int dst_stride); -#define vp8_dc_only_idct_add vp8_dc_only_idct_add_c - -int vp8_denoiser_filter_c(unsigned char *mc_running_avg_y, int mc_avg_y_stride, unsigned char *running_avg_y, int avg_y_stride, unsigned char *sig, int sig_stride, unsigned int motion_magnitude, int increase_denoising); -#define vp8_denoiser_filter vp8_denoiser_filter_c - -int vp8_denoiser_filter_uv_c(unsigned char *mc_running_avg, int mc_avg_stride, unsigned char *running_avg, int avg_stride, unsigned char *sig, int sig_stride, unsigned int motion_magnitude, int increase_denoising); -#define vp8_denoiser_filter_uv vp8_denoiser_filter_uv_c - -void vp8_dequant_idct_add_c(short *input, short *dq, unsigned char *output, int stride); -#define vp8_dequant_idct_add vp8_dequant_idct_add_c - -void vp8_dequant_idct_add_uv_block_c(short *q, short *dq, unsigned char *dst_u, unsigned char *dst_v, int stride, char *eobs); -#define vp8_dequant_idct_add_uv_block vp8_dequant_idct_add_uv_block_c - -void vp8_dequant_idct_add_y_block_c(short *q, short *dq, unsigned char *dst, int stride, char *eobs); -#define vp8_dequant_idct_add_y_block vp8_dequant_idct_add_y_block_c - -void vp8_dequantize_b_c(struct blockd*, short *dqc); -#define vp8_dequantize_b vp8_dequantize_b_c - -int vp8_diamond_search_sad_c(struct macroblock *x, struct block *b, struct blockd *d, union int_mv *ref_mv, union int_mv *best_mv, int search_param, int sad_per_bit, int *num00, struct variance_vtable *fn_ptr, int *mvcost[2], union int_mv *center_mv); -#define vp8_diamond_search_sad vp8_diamond_search_sad_c - -void vp8_fast_quantize_b_c(struct block *, struct blockd *); -#define vp8_fast_quantize_b vp8_fast_quantize_b_c - -void vp8_filter_by_weight16x16_c(unsigned char *src, int src_stride, unsigned char *dst, int dst_stride, int src_weight); -#define vp8_filter_by_weight16x16 vp8_filter_by_weight16x16_c - -void vp8_filter_by_weight4x4_c(unsigned char *src, int src_stride, unsigned char *dst, int dst_stride, int src_weight); -#define vp8_filter_by_weight4x4 vp8_filter_by_weight4x4_c - -void vp8_filter_by_weight8x8_c(unsigned char *src, int src_stride, unsigned char *dst, int dst_stride, int src_weight); -#define vp8_filter_by_weight8x8 vp8_filter_by_weight8x8_c - -int vp8_full_search_sad_c(struct macroblock *x, struct block *b, struct blockd *d, union int_mv *ref_mv, int sad_per_bit, int distance, struct variance_vtable *fn_ptr, int *mvcost[2], union int_mv *center_mv); -#define vp8_full_search_sad vp8_full_search_sad_c - -void vp8_loop_filter_bh_c(unsigned char *y, unsigned char *u, unsigned char *v, int ystride, int uv_stride, struct loop_filter_info *lfi); -#define vp8_loop_filter_bh vp8_loop_filter_bh_c - -void vp8_loop_filter_bv_c(unsigned char *y, unsigned char *u, unsigned char *v, int ystride, int uv_stride, struct loop_filter_info *lfi); -#define vp8_loop_filter_bv vp8_loop_filter_bv_c - -void vp8_loop_filter_mbh_c(unsigned char *y, unsigned char *u, unsigned char *v, int ystride, int uv_stride, struct loop_filter_info *lfi); -#define vp8_loop_filter_mbh vp8_loop_filter_mbh_c - -void vp8_loop_filter_mbv_c(unsigned char *y, unsigned char *u, unsigned char *v, int ystride, int uv_stride, struct loop_filter_info *lfi); -#define vp8_loop_filter_mbv vp8_loop_filter_mbv_c - -void vp8_loop_filter_bhs_c(unsigned char *y, int ystride, const unsigned char *blimit); -#define vp8_loop_filter_simple_bh vp8_loop_filter_bhs_c - -void vp8_loop_filter_bvs_c(unsigned char *y, int ystride, const unsigned char *blimit); -#define vp8_loop_filter_simple_bv vp8_loop_filter_bvs_c - -void vp8_loop_filter_simple_horizontal_edge_c(unsigned char *y, int ystride, const unsigned char *blimit); -#define vp8_loop_filter_simple_mbh vp8_loop_filter_simple_horizontal_edge_c - -void vp8_loop_filter_simple_vertical_edge_c(unsigned char *y, int ystride, const unsigned char *blimit); -#define vp8_loop_filter_simple_mbv vp8_loop_filter_simple_vertical_edge_c - -int vp8_mbblock_error_c(struct macroblock *mb, int dc); -#define vp8_mbblock_error vp8_mbblock_error_c - -int vp8_mbuverror_c(struct macroblock *mb); -#define vp8_mbuverror vp8_mbuverror_c - -int vp8_refining_search_sad_c(struct macroblock *x, struct block *b, struct blockd *d, union int_mv *ref_mv, int sad_per_bit, int distance, struct variance_vtable *fn_ptr, int *mvcost[2], union int_mv *center_mv); -#define vp8_refining_search_sad vp8_refining_search_sad_c - -void vp8_regular_quantize_b_c(struct block *, struct blockd *); -#define vp8_regular_quantize_b vp8_regular_quantize_b_c - -void vp8_short_fdct4x4_c(short *input, short *output, int pitch); -#define vp8_short_fdct4x4 vp8_short_fdct4x4_c - -void vp8_short_fdct8x4_c(short *input, short *output, int pitch); -#define vp8_short_fdct8x4 vp8_short_fdct8x4_c - -void vp8_short_idct4x4llm_c(short *input, unsigned char *pred, int pitch, unsigned char *dst, int dst_stride); -#define vp8_short_idct4x4llm vp8_short_idct4x4llm_c - -void vp8_short_inv_walsh4x4_c(short *input, short *output); -#define vp8_short_inv_walsh4x4 vp8_short_inv_walsh4x4_c - -void vp8_short_inv_walsh4x4_1_c(short *input, short *output); -#define vp8_short_inv_walsh4x4_1 vp8_short_inv_walsh4x4_1_c - -void vp8_short_walsh4x4_c(short *input, short *output, int pitch); -#define vp8_short_walsh4x4 vp8_short_walsh4x4_c - -void vp8_sixtap_predict16x16_c(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch); -#define vp8_sixtap_predict16x16 vp8_sixtap_predict16x16_c - -void vp8_sixtap_predict4x4_c(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch); -#define vp8_sixtap_predict4x4 vp8_sixtap_predict4x4_c - -void vp8_sixtap_predict8x4_c(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch); -#define vp8_sixtap_predict8x4 vp8_sixtap_predict8x4_c - -void vp8_sixtap_predict8x8_c(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch); -#define vp8_sixtap_predict8x8 vp8_sixtap_predict8x8_c - -void vp8_rtcd(void); - -#include "vpx_config.h" - -#ifdef RTCD_C -#include "vpx_ports/arm.h" -static void setup_rtcd_internal(void) -{ - int flags = arm_cpu_caps(); - - (void)flags; - -} -#endif - -#ifdef __cplusplus -} // extern "C" -#endif - -#endif diff --git a/WebRtc.NET/include/third_party/libvpx/source/config/linux/arm/vp9_rtcd.h b/WebRtc.NET/include/third_party/libvpx/source/config/linux/arm/vp9_rtcd.h deleted file mode 100644 index cd5726c2..00000000 --- a/WebRtc.NET/include/third_party/libvpx/source/config/linux/arm/vp9_rtcd.h +++ /dev/null @@ -1,108 +0,0 @@ -#ifndef VP9_RTCD_H_ -#define VP9_RTCD_H_ - -#ifdef RTCD_C -#define RTCD_EXTERN -#else -#define RTCD_EXTERN extern -#endif - -/* - * VP9 - */ - -#include "vpx/vpx_integer.h" -#include "vp9/common/vp9_common.h" -#include "vp9/common/vp9_enums.h" - -struct macroblockd; - -/* Encoder forward decls */ -struct macroblock; -struct vp9_variance_vtable; -struct search_site_config; -struct mv; -union int_mv; -struct yv12_buffer_config; - -#ifdef __cplusplus -extern "C" { -#endif - -int64_t vp9_block_error_c(const tran_low_t *coeff, const tran_low_t *dqcoeff, intptr_t block_size, int64_t *ssz); -#define vp9_block_error vp9_block_error_c - -int64_t vp9_block_error_fp_c(const int16_t *coeff, const int16_t *dqcoeff, int block_size); -#define vp9_block_error_fp vp9_block_error_fp_c - -int vp9_denoiser_filter_c(const uint8_t *sig, int sig_stride, const uint8_t *mc_avg, int mc_avg_stride, uint8_t *avg, int avg_stride, int increase_denoising, BLOCK_SIZE bs, int motion_magnitude); -#define vp9_denoiser_filter vp9_denoiser_filter_c - -int vp9_diamond_search_sad_c(const struct macroblock *x, const struct search_site_config *cfg, struct mv *ref_mv, struct mv *best_mv, int search_param, int sad_per_bit, int *num00, const struct vp9_variance_vtable *fn_ptr, const struct mv *center_mv); -#define vp9_diamond_search_sad vp9_diamond_search_sad_c - -void vp9_fdct8x8_quant_c(const int16_t *input, int stride, tran_low_t *coeff_ptr, intptr_t n_coeffs, int skip_block, const int16_t *zbin_ptr, const int16_t *round_ptr, const int16_t *quant_ptr, const int16_t *quant_shift_ptr, tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr, const int16_t *dequant_ptr, uint16_t *eob_ptr, const int16_t *scan, const int16_t *iscan); -#define vp9_fdct8x8_quant vp9_fdct8x8_quant_c - -void vp9_fht16x16_c(const int16_t *input, tran_low_t *output, int stride, int tx_type); -#define vp9_fht16x16 vp9_fht16x16_c - -void vp9_fht4x4_c(const int16_t *input, tran_low_t *output, int stride, int tx_type); -#define vp9_fht4x4 vp9_fht4x4_c - -void vp9_fht8x8_c(const int16_t *input, tran_low_t *output, int stride, int tx_type); -#define vp9_fht8x8 vp9_fht8x8_c - -void vp9_filter_by_weight16x16_c(const uint8_t *src, int src_stride, uint8_t *dst, int dst_stride, int src_weight); -#define vp9_filter_by_weight16x16 vp9_filter_by_weight16x16_c - -void vp9_filter_by_weight8x8_c(const uint8_t *src, int src_stride, uint8_t *dst, int dst_stride, int src_weight); -#define vp9_filter_by_weight8x8 vp9_filter_by_weight8x8_c - -int vp9_full_search_sad_c(const struct macroblock *x, const struct mv *ref_mv, int sad_per_bit, int distance, const struct vp9_variance_vtable *fn_ptr, const struct mv *center_mv, struct mv *best_mv); -#define vp9_full_search_sad vp9_full_search_sad_c - -void vp9_fwht4x4_c(const int16_t *input, tran_low_t *output, int stride); -#define vp9_fwht4x4 vp9_fwht4x4_c - -void vp9_iht16x16_256_add_c(const tran_low_t *input, uint8_t *output, int pitch, int tx_type); -#define vp9_iht16x16_256_add vp9_iht16x16_256_add_c - -void vp9_iht4x4_16_add_c(const tran_low_t *input, uint8_t *dest, int stride, int tx_type); -#define vp9_iht4x4_16_add vp9_iht4x4_16_add_c - -void vp9_iht8x8_64_add_c(const tran_low_t *input, uint8_t *dest, int stride, int tx_type); -#define vp9_iht8x8_64_add vp9_iht8x8_64_add_c - -void vp9_quantize_fp_c(const tran_low_t *coeff_ptr, intptr_t n_coeffs, int skip_block, const int16_t *zbin_ptr, const int16_t *round_ptr, const int16_t *quant_ptr, const int16_t *quant_shift_ptr, tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr, const int16_t *dequant_ptr, uint16_t *eob_ptr, const int16_t *scan, const int16_t *iscan); -#define vp9_quantize_fp vp9_quantize_fp_c - -void vp9_quantize_fp_32x32_c(const tran_low_t *coeff_ptr, intptr_t n_coeffs, int skip_block, const int16_t *zbin_ptr, const int16_t *round_ptr, const int16_t *quant_ptr, const int16_t *quant_shift_ptr, tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr, const int16_t *dequant_ptr, uint16_t *eob_ptr, const int16_t *scan, const int16_t *iscan); -#define vp9_quantize_fp_32x32 vp9_quantize_fp_32x32_c - -void vp9_scale_and_extend_frame_c(const struct yv12_buffer_config *src, struct yv12_buffer_config *dst); -#define vp9_scale_and_extend_frame vp9_scale_and_extend_frame_c - -void vp9_temporal_filter_apply_c(uint8_t *frame1, unsigned int stride, uint8_t *frame2, unsigned int block_width, unsigned int block_height, int strength, int filter_weight, unsigned int *accumulator, uint16_t *count); -#define vp9_temporal_filter_apply vp9_temporal_filter_apply_c - -void vp9_rtcd(void); - -#include "vpx_config.h" - -#ifdef RTCD_C -#include "vpx_ports/arm.h" -static void setup_rtcd_internal(void) -{ - int flags = arm_cpu_caps(); - - (void)flags; - -} -#endif - -#ifdef __cplusplus -} // extern "C" -#endif - -#endif diff --git a/WebRtc.NET/include/third_party/libvpx/source/config/linux/arm/vpx_config.h b/WebRtc.NET/include/third_party/libvpx/source/config/linux/arm/vpx_config.h deleted file mode 100644 index 1f3fe534..00000000 --- a/WebRtc.NET/include/third_party/libvpx/source/config/linux/arm/vpx_config.h +++ /dev/null @@ -1,94 +0,0 @@ -/* Copyright (c) 2011 The WebM project authors. All Rights Reserved. */ -/* */ -/* Use of this source code is governed by a BSD-style license */ -/* that can be found in the LICENSE file in the root of the source */ -/* tree. An additional intellectual property rights grant can be found */ -/* in the file PATENTS. All contributing project authors may */ -/* be found in the AUTHORS file in the root of the source tree. */ -/* This file automatically generated by configure. Do not edit! */ -#ifndef VPX_CONFIG_H -#define VPX_CONFIG_H -#define RESTRICT -#define INLINE inline -#define ARCH_ARM 1 -#define ARCH_MIPS 0 -#define ARCH_X86 0 -#define ARCH_X86_64 0 -#define HAVE_NEON 0 -#define HAVE_NEON_ASM 0 -#define HAVE_MIPS32 0 -#define HAVE_DSPR2 0 -#define HAVE_MSA 0 -#define HAVE_MIPS64 0 -#define HAVE_MMX 0 -#define HAVE_SSE 0 -#define HAVE_SSE2 0 -#define HAVE_SSE3 0 -#define HAVE_SSSE3 0 -#define HAVE_SSE4_1 0 -#define HAVE_AVX 0 -#define HAVE_AVX2 0 -#define HAVE_VPX_PORTS 1 -#define HAVE_PTHREAD_H 1 -#define HAVE_UNISTD_H 0 -#define CONFIG_DEPENDENCY_TRACKING 1 -#define CONFIG_EXTERNAL_BUILD 1 -#define CONFIG_INSTALL_DOCS 0 -#define CONFIG_INSTALL_BINS 1 -#define CONFIG_INSTALL_LIBS 1 -#define CONFIG_INSTALL_SRCS 0 -#define CONFIG_DEBUG 0 -#define CONFIG_GPROF 0 -#define CONFIG_GCOV 0 -#define CONFIG_RVCT 0 -#define CONFIG_GCC 1 -#define CONFIG_MSVS 0 -#define CONFIG_PIC 0 -#define CONFIG_BIG_ENDIAN 0 -#define CONFIG_CODEC_SRCS 0 -#define CONFIG_DEBUG_LIBS 0 -#define CONFIG_DEQUANT_TOKENS 0 -#define CONFIG_DC_RECON 0 -#define CONFIG_RUNTIME_CPU_DETECT 0 -#define CONFIG_POSTPROC 1 -#define CONFIG_VP9_POSTPROC 1 -#define CONFIG_MULTITHREAD 1 -#define CONFIG_INTERNAL_STATS 0 -#define CONFIG_VP8_ENCODER 1 -#define CONFIG_VP8_DECODER 1 -#define CONFIG_VP9_ENCODER 1 -#define CONFIG_VP9_DECODER 1 -#define CONFIG_VP8 1 -#define CONFIG_VP9 1 -#define CONFIG_ENCODERS 1 -#define CONFIG_DECODERS 1 -#define CONFIG_STATIC_MSVCRT 0 -#define CONFIG_SPATIAL_RESAMPLING 1 -#define CONFIG_REALTIME_ONLY 1 -#define CONFIG_ONTHEFLY_BITPACKING 0 -#define CONFIG_ERROR_CONCEALMENT 0 -#define CONFIG_SHARED 0 -#define CONFIG_STATIC 1 -#define CONFIG_SMALL 0 -#define CONFIG_POSTPROC_VISUALIZER 0 -#define CONFIG_OS_SUPPORT 1 -#define CONFIG_UNIT_TESTS 1 -#define CONFIG_WEBM_IO 1 -#define CONFIG_LIBYUV 1 -#define CONFIG_DECODE_PERF_TESTS 0 -#define CONFIG_ENCODE_PERF_TESTS 0 -#define CONFIG_MULTI_RES_ENCODING 1 -#define CONFIG_TEMPORAL_DENOISING 1 -#define CONFIG_VP9_TEMPORAL_DENOISING 1 -#define CONFIG_COEFFICIENT_RANGE_CHECKING 0 -#define CONFIG_VP9_HIGHBITDEPTH 0 -#define CONFIG_BETTER_HW_COMPATIBILITY 0 -#define CONFIG_EXPERIMENTAL 0 -#define CONFIG_SIZE_LIMIT 1 -#define CONFIG_SPATIAL_SVC 0 -#define CONFIG_FP_MB_STATS 0 -#define CONFIG_EMULATE_HARDWARE 0 -#define CONFIG_MISC_FIXES 0 -#define DECODE_WIDTH_LIMIT 16384 -#define DECODE_HEIGHT_LIMIT 16384 -#endif /* VPX_CONFIG_H */ diff --git a/WebRtc.NET/include/third_party/libvpx/source/config/linux/arm/vpx_dsp_rtcd.h b/WebRtc.NET/include/third_party/libvpx/source/config/linux/arm/vpx_dsp_rtcd.h deleted file mode 100644 index 89b44dc9..00000000 --- a/WebRtc.NET/include/third_party/libvpx/source/config/linux/arm/vpx_dsp_rtcd.h +++ /dev/null @@ -1,749 +0,0 @@ -#ifndef VPX_DSP_RTCD_H_ -#define VPX_DSP_RTCD_H_ - -#ifdef RTCD_C -#define RTCD_EXTERN -#else -#define RTCD_EXTERN extern -#endif - -/* - * DSP - */ - -#include "vpx/vpx_integer.h" -#include "vpx_dsp/vpx_dsp_common.h" - - -#ifdef __cplusplus -extern "C" { -#endif - -unsigned int vpx_avg_4x4_c(const uint8_t *, int p); -#define vpx_avg_4x4 vpx_avg_4x4_c - -unsigned int vpx_avg_8x8_c(const uint8_t *, int p); -#define vpx_avg_8x8 vpx_avg_8x8_c - -void vpx_comp_avg_pred_c(uint8_t *comp_pred, const uint8_t *pred, int width, int height, const uint8_t *ref, int ref_stride); -#define vpx_comp_avg_pred vpx_comp_avg_pred_c - -void vpx_convolve8_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -#define vpx_convolve8 vpx_convolve8_c - -void vpx_convolve8_avg_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -#define vpx_convolve8_avg vpx_convolve8_avg_c - -void vpx_convolve8_avg_horiz_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -#define vpx_convolve8_avg_horiz vpx_convolve8_avg_horiz_c - -void vpx_convolve8_avg_vert_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -#define vpx_convolve8_avg_vert vpx_convolve8_avg_vert_c - -void vpx_convolve8_horiz_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -#define vpx_convolve8_horiz vpx_convolve8_horiz_c - -void vpx_convolve8_vert_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -#define vpx_convolve8_vert vpx_convolve8_vert_c - -void vpx_convolve_avg_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -#define vpx_convolve_avg vpx_convolve_avg_c - -void vpx_convolve_copy_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -#define vpx_convolve_copy vpx_convolve_copy_c - -void vpx_d117_predictor_16x16_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d117_predictor_16x16 vpx_d117_predictor_16x16_c - -void vpx_d117_predictor_32x32_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d117_predictor_32x32 vpx_d117_predictor_32x32_c - -void vpx_d117_predictor_4x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d117_predictor_4x4 vpx_d117_predictor_4x4_c - -void vpx_d117_predictor_8x8_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d117_predictor_8x8 vpx_d117_predictor_8x8_c - -void vpx_d135_predictor_16x16_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d135_predictor_16x16 vpx_d135_predictor_16x16_c - -void vpx_d135_predictor_32x32_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d135_predictor_32x32 vpx_d135_predictor_32x32_c - -void vpx_d135_predictor_4x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d135_predictor_4x4 vpx_d135_predictor_4x4_c - -void vpx_d135_predictor_8x8_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d135_predictor_8x8 vpx_d135_predictor_8x8_c - -void vpx_d153_predictor_16x16_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d153_predictor_16x16 vpx_d153_predictor_16x16_c - -void vpx_d153_predictor_32x32_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d153_predictor_32x32 vpx_d153_predictor_32x32_c - -void vpx_d153_predictor_4x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d153_predictor_4x4 vpx_d153_predictor_4x4_c - -void vpx_d153_predictor_8x8_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d153_predictor_8x8 vpx_d153_predictor_8x8_c - -void vpx_d207_predictor_16x16_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d207_predictor_16x16 vpx_d207_predictor_16x16_c - -void vpx_d207_predictor_32x32_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d207_predictor_32x32 vpx_d207_predictor_32x32_c - -void vpx_d207_predictor_4x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d207_predictor_4x4 vpx_d207_predictor_4x4_c - -void vpx_d207_predictor_8x8_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d207_predictor_8x8 vpx_d207_predictor_8x8_c - -void vpx_d207e_predictor_16x16_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d207e_predictor_16x16 vpx_d207e_predictor_16x16_c - -void vpx_d207e_predictor_32x32_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d207e_predictor_32x32 vpx_d207e_predictor_32x32_c - -void vpx_d207e_predictor_4x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d207e_predictor_4x4 vpx_d207e_predictor_4x4_c - -void vpx_d207e_predictor_8x8_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d207e_predictor_8x8 vpx_d207e_predictor_8x8_c - -void vpx_d45_predictor_16x16_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d45_predictor_16x16 vpx_d45_predictor_16x16_c - -void vpx_d45_predictor_32x32_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d45_predictor_32x32 vpx_d45_predictor_32x32_c - -void vpx_d45_predictor_4x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d45_predictor_4x4 vpx_d45_predictor_4x4_c - -void vpx_d45_predictor_8x8_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d45_predictor_8x8 vpx_d45_predictor_8x8_c - -void vpx_d45e_predictor_16x16_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d45e_predictor_16x16 vpx_d45e_predictor_16x16_c - -void vpx_d45e_predictor_32x32_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d45e_predictor_32x32 vpx_d45e_predictor_32x32_c - -void vpx_d45e_predictor_4x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d45e_predictor_4x4 vpx_d45e_predictor_4x4_c - -void vpx_d45e_predictor_8x8_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d45e_predictor_8x8 vpx_d45e_predictor_8x8_c - -void vpx_d63_predictor_16x16_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d63_predictor_16x16 vpx_d63_predictor_16x16_c - -void vpx_d63_predictor_32x32_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d63_predictor_32x32 vpx_d63_predictor_32x32_c - -void vpx_d63_predictor_4x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d63_predictor_4x4 vpx_d63_predictor_4x4_c - -void vpx_d63_predictor_8x8_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d63_predictor_8x8 vpx_d63_predictor_8x8_c - -void vpx_d63e_predictor_16x16_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d63e_predictor_16x16 vpx_d63e_predictor_16x16_c - -void vpx_d63e_predictor_32x32_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d63e_predictor_32x32 vpx_d63e_predictor_32x32_c - -void vpx_d63e_predictor_4x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d63e_predictor_4x4 vpx_d63e_predictor_4x4_c - -void vpx_d63e_predictor_8x8_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d63e_predictor_8x8 vpx_d63e_predictor_8x8_c - -void vpx_d63f_predictor_4x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d63f_predictor_4x4 vpx_d63f_predictor_4x4_c - -void vpx_dc_128_predictor_16x16_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_dc_128_predictor_16x16 vpx_dc_128_predictor_16x16_c - -void vpx_dc_128_predictor_32x32_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_dc_128_predictor_32x32 vpx_dc_128_predictor_32x32_c - -void vpx_dc_128_predictor_4x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_dc_128_predictor_4x4 vpx_dc_128_predictor_4x4_c - -void vpx_dc_128_predictor_8x8_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_dc_128_predictor_8x8 vpx_dc_128_predictor_8x8_c - -void vpx_dc_left_predictor_16x16_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_dc_left_predictor_16x16 vpx_dc_left_predictor_16x16_c - -void vpx_dc_left_predictor_32x32_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_dc_left_predictor_32x32 vpx_dc_left_predictor_32x32_c - -void vpx_dc_left_predictor_4x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_dc_left_predictor_4x4 vpx_dc_left_predictor_4x4_c - -void vpx_dc_left_predictor_8x8_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_dc_left_predictor_8x8 vpx_dc_left_predictor_8x8_c - -void vpx_dc_predictor_16x16_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_dc_predictor_16x16 vpx_dc_predictor_16x16_c - -void vpx_dc_predictor_32x32_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_dc_predictor_32x32 vpx_dc_predictor_32x32_c - -void vpx_dc_predictor_4x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_dc_predictor_4x4 vpx_dc_predictor_4x4_c - -void vpx_dc_predictor_8x8_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_dc_predictor_8x8 vpx_dc_predictor_8x8_c - -void vpx_dc_top_predictor_16x16_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_dc_top_predictor_16x16 vpx_dc_top_predictor_16x16_c - -void vpx_dc_top_predictor_32x32_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_dc_top_predictor_32x32 vpx_dc_top_predictor_32x32_c - -void vpx_dc_top_predictor_4x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_dc_top_predictor_4x4 vpx_dc_top_predictor_4x4_c - -void vpx_dc_top_predictor_8x8_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_dc_top_predictor_8x8 vpx_dc_top_predictor_8x8_c - -void vpx_fdct16x16_c(const int16_t *input, tran_low_t *output, int stride); -#define vpx_fdct16x16 vpx_fdct16x16_c - -void vpx_fdct16x16_1_c(const int16_t *input, tran_low_t *output, int stride); -#define vpx_fdct16x16_1 vpx_fdct16x16_1_c - -void vpx_fdct32x32_c(const int16_t *input, tran_low_t *output, int stride); -#define vpx_fdct32x32 vpx_fdct32x32_c - -void vpx_fdct32x32_1_c(const int16_t *input, tran_low_t *output, int stride); -#define vpx_fdct32x32_1 vpx_fdct32x32_1_c - -void vpx_fdct32x32_rd_c(const int16_t *input, tran_low_t *output, int stride); -#define vpx_fdct32x32_rd vpx_fdct32x32_rd_c - -void vpx_fdct4x4_c(const int16_t *input, tran_low_t *output, int stride); -#define vpx_fdct4x4 vpx_fdct4x4_c - -void vpx_fdct4x4_1_c(const int16_t *input, tran_low_t *output, int stride); -#define vpx_fdct4x4_1 vpx_fdct4x4_1_c - -void vpx_fdct8x8_c(const int16_t *input, tran_low_t *output, int stride); -#define vpx_fdct8x8 vpx_fdct8x8_c - -void vpx_fdct8x8_1_c(const int16_t *input, tran_low_t *output, int stride); -#define vpx_fdct8x8_1 vpx_fdct8x8_1_c - -void vpx_get16x16var_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse, int *sum); -#define vpx_get16x16var vpx_get16x16var_c - -unsigned int vpx_get4x4sse_cs_c(const unsigned char *src_ptr, int source_stride, const unsigned char *ref_ptr, int ref_stride); -#define vpx_get4x4sse_cs vpx_get4x4sse_cs_c - -void vpx_get8x8var_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse, int *sum); -#define vpx_get8x8var vpx_get8x8var_c - -unsigned int vpx_get_mb_ss_c(const int16_t *); -#define vpx_get_mb_ss vpx_get_mb_ss_c - -void vpx_h_predictor_16x16_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_h_predictor_16x16 vpx_h_predictor_16x16_c - -void vpx_h_predictor_32x32_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_h_predictor_32x32 vpx_h_predictor_32x32_c - -void vpx_h_predictor_4x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_h_predictor_4x4 vpx_h_predictor_4x4_c - -void vpx_h_predictor_8x8_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_h_predictor_8x8 vpx_h_predictor_8x8_c - -void vpx_hadamard_16x16_c(const int16_t *src_diff, int src_stride, int16_t *coeff); -#define vpx_hadamard_16x16 vpx_hadamard_16x16_c - -void vpx_hadamard_8x8_c(const int16_t *src_diff, int src_stride, int16_t *coeff); -#define vpx_hadamard_8x8 vpx_hadamard_8x8_c - -void vpx_he_predictor_4x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_he_predictor_4x4 vpx_he_predictor_4x4_c - -void vpx_idct16x16_10_add_c(const tran_low_t *input, uint8_t *dest, int stride); -#define vpx_idct16x16_10_add vpx_idct16x16_10_add_c - -void vpx_idct16x16_1_add_c(const tran_low_t *input, uint8_t *dest, int stride); -#define vpx_idct16x16_1_add vpx_idct16x16_1_add_c - -void vpx_idct16x16_256_add_c(const tran_low_t *input, uint8_t *dest, int stride); -#define vpx_idct16x16_256_add vpx_idct16x16_256_add_c - -void vpx_idct32x32_1024_add_c(const tran_low_t *input, uint8_t *dest, int stride); -#define vpx_idct32x32_1024_add vpx_idct32x32_1024_add_c - -void vpx_idct32x32_135_add_c(const tran_low_t *input, uint8_t *dest, int stride); -#define vpx_idct32x32_135_add vpx_idct32x32_135_add_c - -void vpx_idct32x32_1_add_c(const tran_low_t *input, uint8_t *dest, int stride); -#define vpx_idct32x32_1_add vpx_idct32x32_1_add_c - -void vpx_idct32x32_34_add_c(const tran_low_t *input, uint8_t *dest, int stride); -#define vpx_idct32x32_34_add vpx_idct32x32_34_add_c - -void vpx_idct4x4_16_add_c(const tran_low_t *input, uint8_t *dest, int stride); -#define vpx_idct4x4_16_add vpx_idct4x4_16_add_c - -void vpx_idct4x4_1_add_c(const tran_low_t *input, uint8_t *dest, int stride); -#define vpx_idct4x4_1_add vpx_idct4x4_1_add_c - -void vpx_idct8x8_12_add_c(const tran_low_t *input, uint8_t *dest, int stride); -#define vpx_idct8x8_12_add vpx_idct8x8_12_add_c - -void vpx_idct8x8_1_add_c(const tran_low_t *input, uint8_t *dest, int stride); -#define vpx_idct8x8_1_add vpx_idct8x8_1_add_c - -void vpx_idct8x8_64_add_c(const tran_low_t *input, uint8_t *dest, int stride); -#define vpx_idct8x8_64_add vpx_idct8x8_64_add_c - -int16_t vpx_int_pro_col_c(const uint8_t *ref, const int width); -#define vpx_int_pro_col vpx_int_pro_col_c - -void vpx_int_pro_row_c(int16_t *hbuf, const uint8_t *ref, const int ref_stride, const int height); -#define vpx_int_pro_row vpx_int_pro_row_c - -void vpx_iwht4x4_16_add_c(const tran_low_t *input, uint8_t *dest, int stride); -#define vpx_iwht4x4_16_add vpx_iwht4x4_16_add_c - -void vpx_iwht4x4_1_add_c(const tran_low_t *input, uint8_t *dest, int stride); -#define vpx_iwht4x4_1_add vpx_iwht4x4_1_add_c - -void vpx_lpf_horizontal_16_c(uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh); -#define vpx_lpf_horizontal_16 vpx_lpf_horizontal_16_c - -void vpx_lpf_horizontal_16_dual_c(uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh); -#define vpx_lpf_horizontal_16_dual vpx_lpf_horizontal_16_dual_c - -void vpx_lpf_horizontal_4_c(uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh); -#define vpx_lpf_horizontal_4 vpx_lpf_horizontal_4_c - -void vpx_lpf_horizontal_4_dual_c(uint8_t *s, int pitch, const uint8_t *blimit0, const uint8_t *limit0, const uint8_t *thresh0, const uint8_t *blimit1, const uint8_t *limit1, const uint8_t *thresh1); -#define vpx_lpf_horizontal_4_dual vpx_lpf_horizontal_4_dual_c - -void vpx_lpf_horizontal_8_c(uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh); -#define vpx_lpf_horizontal_8 vpx_lpf_horizontal_8_c - -void vpx_lpf_horizontal_8_dual_c(uint8_t *s, int pitch, const uint8_t *blimit0, const uint8_t *limit0, const uint8_t *thresh0, const uint8_t *blimit1, const uint8_t *limit1, const uint8_t *thresh1); -#define vpx_lpf_horizontal_8_dual vpx_lpf_horizontal_8_dual_c - -void vpx_lpf_vertical_16_c(uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh); -#define vpx_lpf_vertical_16 vpx_lpf_vertical_16_c - -void vpx_lpf_vertical_16_dual_c(uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh); -#define vpx_lpf_vertical_16_dual vpx_lpf_vertical_16_dual_c - -void vpx_lpf_vertical_4_c(uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh); -#define vpx_lpf_vertical_4 vpx_lpf_vertical_4_c - -void vpx_lpf_vertical_4_dual_c(uint8_t *s, int pitch, const uint8_t *blimit0, const uint8_t *limit0, const uint8_t *thresh0, const uint8_t *blimit1, const uint8_t *limit1, const uint8_t *thresh1); -#define vpx_lpf_vertical_4_dual vpx_lpf_vertical_4_dual_c - -void vpx_lpf_vertical_8_c(uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh); -#define vpx_lpf_vertical_8 vpx_lpf_vertical_8_c - -void vpx_lpf_vertical_8_dual_c(uint8_t *s, int pitch, const uint8_t *blimit0, const uint8_t *limit0, const uint8_t *thresh0, const uint8_t *blimit1, const uint8_t *limit1, const uint8_t *thresh1); -#define vpx_lpf_vertical_8_dual vpx_lpf_vertical_8_dual_c - -void vpx_mbpost_proc_across_ip_c(unsigned char *dst, int pitch, int rows, int cols,int flimit); -#define vpx_mbpost_proc_across_ip vpx_mbpost_proc_across_ip_c - -void vpx_mbpost_proc_down_c(unsigned char *dst, int pitch, int rows, int cols,int flimit); -#define vpx_mbpost_proc_down vpx_mbpost_proc_down_c - -void vpx_minmax_8x8_c(const uint8_t *s, int p, const uint8_t *d, int dp, int *min, int *max); -#define vpx_minmax_8x8 vpx_minmax_8x8_c - -unsigned int vpx_mse16x16_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int recon_stride, unsigned int *sse); -#define vpx_mse16x16 vpx_mse16x16_c - -unsigned int vpx_mse16x8_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int recon_stride, unsigned int *sse); -#define vpx_mse16x8 vpx_mse16x8_c - -unsigned int vpx_mse8x16_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int recon_stride, unsigned int *sse); -#define vpx_mse8x16 vpx_mse8x16_c - -unsigned int vpx_mse8x8_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int recon_stride, unsigned int *sse); -#define vpx_mse8x8 vpx_mse8x8_c - -void vpx_plane_add_noise_c(uint8_t *start, const int8_t *noise, int blackclamp, int whiteclamp, int width, int height, int pitch); -#define vpx_plane_add_noise vpx_plane_add_noise_c - -void vpx_post_proc_down_and_across_mb_row_c(unsigned char *src, unsigned char *dst, int src_pitch, int dst_pitch, int cols, unsigned char *flimits, int size); -#define vpx_post_proc_down_and_across_mb_row vpx_post_proc_down_and_across_mb_row_c - -void vpx_quantize_b_c(const tran_low_t *coeff_ptr, intptr_t n_coeffs, int skip_block, const int16_t *zbin_ptr, const int16_t *round_ptr, const int16_t *quant_ptr, const int16_t *quant_shift_ptr, tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr, const int16_t *dequant_ptr, uint16_t *eob_ptr, const int16_t *scan, const int16_t *iscan); -#define vpx_quantize_b vpx_quantize_b_c - -void vpx_quantize_b_32x32_c(const tran_low_t *coeff_ptr, intptr_t n_coeffs, int skip_block, const int16_t *zbin_ptr, const int16_t *round_ptr, const int16_t *quant_ptr, const int16_t *quant_shift_ptr, tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr, const int16_t *dequant_ptr, uint16_t *eob_ptr, const int16_t *scan, const int16_t *iscan); -#define vpx_quantize_b_32x32 vpx_quantize_b_32x32_c - -unsigned int vpx_sad16x16_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -#define vpx_sad16x16 vpx_sad16x16_c - -unsigned int vpx_sad16x16_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -#define vpx_sad16x16_avg vpx_sad16x16_avg_c - -void vpx_sad16x16x3_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -#define vpx_sad16x16x3 vpx_sad16x16x3_c - -void vpx_sad16x16x4d_c(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); -#define vpx_sad16x16x4d vpx_sad16x16x4d_c - -void vpx_sad16x16x8_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -#define vpx_sad16x16x8 vpx_sad16x16x8_c - -unsigned int vpx_sad16x32_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -#define vpx_sad16x32 vpx_sad16x32_c - -unsigned int vpx_sad16x32_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -#define vpx_sad16x32_avg vpx_sad16x32_avg_c - -void vpx_sad16x32x4d_c(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); -#define vpx_sad16x32x4d vpx_sad16x32x4d_c - -unsigned int vpx_sad16x8_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -#define vpx_sad16x8 vpx_sad16x8_c - -unsigned int vpx_sad16x8_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -#define vpx_sad16x8_avg vpx_sad16x8_avg_c - -void vpx_sad16x8x3_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -#define vpx_sad16x8x3 vpx_sad16x8x3_c - -void vpx_sad16x8x4d_c(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); -#define vpx_sad16x8x4d vpx_sad16x8x4d_c - -void vpx_sad16x8x8_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -#define vpx_sad16x8x8 vpx_sad16x8x8_c - -unsigned int vpx_sad32x16_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -#define vpx_sad32x16 vpx_sad32x16_c - -unsigned int vpx_sad32x16_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -#define vpx_sad32x16_avg vpx_sad32x16_avg_c - -void vpx_sad32x16x4d_c(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); -#define vpx_sad32x16x4d vpx_sad32x16x4d_c - -unsigned int vpx_sad32x32_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -#define vpx_sad32x32 vpx_sad32x32_c - -unsigned int vpx_sad32x32_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -#define vpx_sad32x32_avg vpx_sad32x32_avg_c - -void vpx_sad32x32x3_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -#define vpx_sad32x32x3 vpx_sad32x32x3_c - -void vpx_sad32x32x4d_c(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); -#define vpx_sad32x32x4d vpx_sad32x32x4d_c - -void vpx_sad32x32x8_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -#define vpx_sad32x32x8 vpx_sad32x32x8_c - -unsigned int vpx_sad32x64_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -#define vpx_sad32x64 vpx_sad32x64_c - -unsigned int vpx_sad32x64_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -#define vpx_sad32x64_avg vpx_sad32x64_avg_c - -void vpx_sad32x64x4d_c(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); -#define vpx_sad32x64x4d vpx_sad32x64x4d_c - -unsigned int vpx_sad4x4_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -#define vpx_sad4x4 vpx_sad4x4_c - -unsigned int vpx_sad4x4_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -#define vpx_sad4x4_avg vpx_sad4x4_avg_c - -void vpx_sad4x4x3_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -#define vpx_sad4x4x3 vpx_sad4x4x3_c - -void vpx_sad4x4x4d_c(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); -#define vpx_sad4x4x4d vpx_sad4x4x4d_c - -void vpx_sad4x4x8_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -#define vpx_sad4x4x8 vpx_sad4x4x8_c - -unsigned int vpx_sad4x8_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -#define vpx_sad4x8 vpx_sad4x8_c - -unsigned int vpx_sad4x8_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -#define vpx_sad4x8_avg vpx_sad4x8_avg_c - -void vpx_sad4x8x4d_c(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); -#define vpx_sad4x8x4d vpx_sad4x8x4d_c - -void vpx_sad4x8x8_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -#define vpx_sad4x8x8 vpx_sad4x8x8_c - -unsigned int vpx_sad64x32_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -#define vpx_sad64x32 vpx_sad64x32_c - -unsigned int vpx_sad64x32_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -#define vpx_sad64x32_avg vpx_sad64x32_avg_c - -void vpx_sad64x32x4d_c(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); -#define vpx_sad64x32x4d vpx_sad64x32x4d_c - -unsigned int vpx_sad64x64_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -#define vpx_sad64x64 vpx_sad64x64_c - -unsigned int vpx_sad64x64_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -#define vpx_sad64x64_avg vpx_sad64x64_avg_c - -void vpx_sad64x64x3_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -#define vpx_sad64x64x3 vpx_sad64x64x3_c - -void vpx_sad64x64x4d_c(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); -#define vpx_sad64x64x4d vpx_sad64x64x4d_c - -void vpx_sad64x64x8_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -#define vpx_sad64x64x8 vpx_sad64x64x8_c - -unsigned int vpx_sad8x16_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -#define vpx_sad8x16 vpx_sad8x16_c - -unsigned int vpx_sad8x16_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -#define vpx_sad8x16_avg vpx_sad8x16_avg_c - -void vpx_sad8x16x3_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -#define vpx_sad8x16x3 vpx_sad8x16x3_c - -void vpx_sad8x16x4d_c(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); -#define vpx_sad8x16x4d vpx_sad8x16x4d_c - -void vpx_sad8x16x8_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -#define vpx_sad8x16x8 vpx_sad8x16x8_c - -unsigned int vpx_sad8x4_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -#define vpx_sad8x4 vpx_sad8x4_c - -unsigned int vpx_sad8x4_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -#define vpx_sad8x4_avg vpx_sad8x4_avg_c - -void vpx_sad8x4x4d_c(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); -#define vpx_sad8x4x4d vpx_sad8x4x4d_c - -void vpx_sad8x4x8_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -#define vpx_sad8x4x8 vpx_sad8x4x8_c - -unsigned int vpx_sad8x8_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -#define vpx_sad8x8 vpx_sad8x8_c - -unsigned int vpx_sad8x8_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -#define vpx_sad8x8_avg vpx_sad8x8_avg_c - -void vpx_sad8x8x3_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -#define vpx_sad8x8x3 vpx_sad8x8x3_c - -void vpx_sad8x8x4d_c(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); -#define vpx_sad8x8x4d vpx_sad8x8x4d_c - -void vpx_sad8x8x8_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -#define vpx_sad8x8x8 vpx_sad8x8x8_c - -int vpx_satd_c(const int16_t *coeff, int length); -#define vpx_satd vpx_satd_c - -void vpx_scaled_2d_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -#define vpx_scaled_2d vpx_scaled_2d_c - -void vpx_scaled_avg_2d_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -#define vpx_scaled_avg_2d vpx_scaled_avg_2d_c - -void vpx_scaled_avg_horiz_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -#define vpx_scaled_avg_horiz vpx_scaled_avg_horiz_c - -void vpx_scaled_avg_vert_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -#define vpx_scaled_avg_vert vpx_scaled_avg_vert_c - -void vpx_scaled_horiz_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -#define vpx_scaled_horiz vpx_scaled_horiz_c - -void vpx_scaled_vert_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -#define vpx_scaled_vert vpx_scaled_vert_c - -uint32_t vpx_sub_pixel_avg_variance16x16_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_sub_pixel_avg_variance16x16 vpx_sub_pixel_avg_variance16x16_c - -uint32_t vpx_sub_pixel_avg_variance16x32_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_sub_pixel_avg_variance16x32 vpx_sub_pixel_avg_variance16x32_c - -uint32_t vpx_sub_pixel_avg_variance16x8_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_sub_pixel_avg_variance16x8 vpx_sub_pixel_avg_variance16x8_c - -uint32_t vpx_sub_pixel_avg_variance32x16_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_sub_pixel_avg_variance32x16 vpx_sub_pixel_avg_variance32x16_c - -uint32_t vpx_sub_pixel_avg_variance32x32_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_sub_pixel_avg_variance32x32 vpx_sub_pixel_avg_variance32x32_c - -uint32_t vpx_sub_pixel_avg_variance32x64_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_sub_pixel_avg_variance32x64 vpx_sub_pixel_avg_variance32x64_c - -uint32_t vpx_sub_pixel_avg_variance4x4_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_sub_pixel_avg_variance4x4 vpx_sub_pixel_avg_variance4x4_c - -uint32_t vpx_sub_pixel_avg_variance4x8_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_sub_pixel_avg_variance4x8 vpx_sub_pixel_avg_variance4x8_c - -uint32_t vpx_sub_pixel_avg_variance64x32_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_sub_pixel_avg_variance64x32 vpx_sub_pixel_avg_variance64x32_c - -uint32_t vpx_sub_pixel_avg_variance64x64_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_sub_pixel_avg_variance64x64 vpx_sub_pixel_avg_variance64x64_c - -uint32_t vpx_sub_pixel_avg_variance8x16_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_sub_pixel_avg_variance8x16 vpx_sub_pixel_avg_variance8x16_c - -uint32_t vpx_sub_pixel_avg_variance8x4_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_sub_pixel_avg_variance8x4 vpx_sub_pixel_avg_variance8x4_c - -uint32_t vpx_sub_pixel_avg_variance8x8_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_sub_pixel_avg_variance8x8 vpx_sub_pixel_avg_variance8x8_c - -uint32_t vpx_sub_pixel_variance16x16_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -#define vpx_sub_pixel_variance16x16 vpx_sub_pixel_variance16x16_c - -uint32_t vpx_sub_pixel_variance16x32_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -#define vpx_sub_pixel_variance16x32 vpx_sub_pixel_variance16x32_c - -uint32_t vpx_sub_pixel_variance16x8_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -#define vpx_sub_pixel_variance16x8 vpx_sub_pixel_variance16x8_c - -uint32_t vpx_sub_pixel_variance32x16_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -#define vpx_sub_pixel_variance32x16 vpx_sub_pixel_variance32x16_c - -uint32_t vpx_sub_pixel_variance32x32_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -#define vpx_sub_pixel_variance32x32 vpx_sub_pixel_variance32x32_c - -uint32_t vpx_sub_pixel_variance32x64_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -#define vpx_sub_pixel_variance32x64 vpx_sub_pixel_variance32x64_c - -uint32_t vpx_sub_pixel_variance4x4_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -#define vpx_sub_pixel_variance4x4 vpx_sub_pixel_variance4x4_c - -uint32_t vpx_sub_pixel_variance4x8_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -#define vpx_sub_pixel_variance4x8 vpx_sub_pixel_variance4x8_c - -uint32_t vpx_sub_pixel_variance64x32_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -#define vpx_sub_pixel_variance64x32 vpx_sub_pixel_variance64x32_c - -uint32_t vpx_sub_pixel_variance64x64_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -#define vpx_sub_pixel_variance64x64 vpx_sub_pixel_variance64x64_c - -uint32_t vpx_sub_pixel_variance8x16_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -#define vpx_sub_pixel_variance8x16 vpx_sub_pixel_variance8x16_c - -uint32_t vpx_sub_pixel_variance8x4_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -#define vpx_sub_pixel_variance8x4 vpx_sub_pixel_variance8x4_c - -uint32_t vpx_sub_pixel_variance8x8_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -#define vpx_sub_pixel_variance8x8 vpx_sub_pixel_variance8x8_c - -void vpx_subtract_block_c(int rows, int cols, int16_t *diff_ptr, ptrdiff_t diff_stride, const uint8_t *src_ptr, ptrdiff_t src_stride, const uint8_t *pred_ptr, ptrdiff_t pred_stride); -#define vpx_subtract_block vpx_subtract_block_c - -uint64_t vpx_sum_squares_2d_i16_c(const int16_t *src, int stride, int size); -#define vpx_sum_squares_2d_i16 vpx_sum_squares_2d_i16_c - -void vpx_tm_predictor_16x16_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_tm_predictor_16x16 vpx_tm_predictor_16x16_c - -void vpx_tm_predictor_32x32_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_tm_predictor_32x32 vpx_tm_predictor_32x32_c - -void vpx_tm_predictor_4x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_tm_predictor_4x4 vpx_tm_predictor_4x4_c - -void vpx_tm_predictor_8x8_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_tm_predictor_8x8 vpx_tm_predictor_8x8_c - -void vpx_v_predictor_16x16_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_v_predictor_16x16 vpx_v_predictor_16x16_c - -void vpx_v_predictor_32x32_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_v_predictor_32x32 vpx_v_predictor_32x32_c - -void vpx_v_predictor_4x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_v_predictor_4x4 vpx_v_predictor_4x4_c - -void vpx_v_predictor_8x8_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_v_predictor_8x8 vpx_v_predictor_8x8_c - -unsigned int vpx_variance16x16_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_variance16x16 vpx_variance16x16_c - -unsigned int vpx_variance16x32_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_variance16x32 vpx_variance16x32_c - -unsigned int vpx_variance16x8_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_variance16x8 vpx_variance16x8_c - -unsigned int vpx_variance32x16_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_variance32x16 vpx_variance32x16_c - -unsigned int vpx_variance32x32_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_variance32x32 vpx_variance32x32_c - -unsigned int vpx_variance32x64_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_variance32x64 vpx_variance32x64_c - -unsigned int vpx_variance4x4_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_variance4x4 vpx_variance4x4_c - -unsigned int vpx_variance4x8_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_variance4x8 vpx_variance4x8_c - -unsigned int vpx_variance64x32_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_variance64x32 vpx_variance64x32_c - -unsigned int vpx_variance64x64_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_variance64x64 vpx_variance64x64_c - -unsigned int vpx_variance8x16_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_variance8x16 vpx_variance8x16_c - -unsigned int vpx_variance8x4_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_variance8x4 vpx_variance8x4_c - -unsigned int vpx_variance8x8_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_variance8x8 vpx_variance8x8_c - -void vpx_ve_predictor_4x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_ve_predictor_4x4 vpx_ve_predictor_4x4_c - -int vpx_vector_var_c(const int16_t *ref, const int16_t *src, const int bwl); -#define vpx_vector_var vpx_vector_var_c - -void vpx_dsp_rtcd(void); - -#include "vpx_config.h" - -#ifdef RTCD_C -#include "vpx_ports/arm.h" -static void setup_rtcd_internal(void) -{ - int flags = arm_cpu_caps(); - - (void)flags; - -} -#endif - -#ifdef __cplusplus -} // extern "C" -#endif - -#endif diff --git a/WebRtc.NET/include/third_party/libvpx/source/config/linux/arm/vpx_scale_rtcd.h b/WebRtc.NET/include/third_party/libvpx/source/config/linux/arm/vpx_scale_rtcd.h deleted file mode 100644 index a1564b7a..00000000 --- a/WebRtc.NET/include/third_party/libvpx/source/config/linux/arm/vpx_scale_rtcd.h +++ /dev/null @@ -1,71 +0,0 @@ -#ifndef VPX_SCALE_RTCD_H_ -#define VPX_SCALE_RTCD_H_ - -#ifdef RTCD_C -#define RTCD_EXTERN -#else -#define RTCD_EXTERN extern -#endif - -struct yv12_buffer_config; - -#ifdef __cplusplus -extern "C" { -#endif - -void vp8_horizontal_line_2_1_scale_c(const unsigned char *source, unsigned int source_width, unsigned char *dest, unsigned int dest_width); -#define vp8_horizontal_line_2_1_scale vp8_horizontal_line_2_1_scale_c - -void vp8_horizontal_line_5_3_scale_c(const unsigned char *source, unsigned int source_width, unsigned char *dest, unsigned int dest_width); -#define vp8_horizontal_line_5_3_scale vp8_horizontal_line_5_3_scale_c - -void vp8_horizontal_line_5_4_scale_c(const unsigned char *source, unsigned int source_width, unsigned char *dest, unsigned int dest_width); -#define vp8_horizontal_line_5_4_scale vp8_horizontal_line_5_4_scale_c - -void vp8_vertical_band_2_1_scale_c(unsigned char *source, unsigned int src_pitch, unsigned char *dest, unsigned int dest_pitch, unsigned int dest_width); -#define vp8_vertical_band_2_1_scale vp8_vertical_band_2_1_scale_c - -void vp8_vertical_band_2_1_scale_i_c(unsigned char *source, unsigned int src_pitch, unsigned char *dest, unsigned int dest_pitch, unsigned int dest_width); -#define vp8_vertical_band_2_1_scale_i vp8_vertical_band_2_1_scale_i_c - -void vp8_vertical_band_5_3_scale_c(unsigned char *source, unsigned int src_pitch, unsigned char *dest, unsigned int dest_pitch, unsigned int dest_width); -#define vp8_vertical_band_5_3_scale vp8_vertical_band_5_3_scale_c - -void vp8_vertical_band_5_4_scale_c(unsigned char *source, unsigned int src_pitch, unsigned char *dest, unsigned int dest_pitch, unsigned int dest_width); -#define vp8_vertical_band_5_4_scale vp8_vertical_band_5_4_scale_c - -void vp8_yv12_copy_frame_c(const struct yv12_buffer_config *src_ybc, struct yv12_buffer_config *dst_ybc); -#define vp8_yv12_copy_frame vp8_yv12_copy_frame_c - -void vp8_yv12_extend_frame_borders_c(struct yv12_buffer_config *ybf); -#define vp8_yv12_extend_frame_borders vp8_yv12_extend_frame_borders_c - -void vpx_extend_frame_borders_c(struct yv12_buffer_config *ybf); -#define vpx_extend_frame_borders vpx_extend_frame_borders_c - -void vpx_extend_frame_inner_borders_c(struct yv12_buffer_config *ybf); -#define vpx_extend_frame_inner_borders vpx_extend_frame_inner_borders_c - -void vpx_yv12_copy_y_c(const struct yv12_buffer_config *src_ybc, struct yv12_buffer_config *dst_ybc); -#define vpx_yv12_copy_y vpx_yv12_copy_y_c - -void vpx_scale_rtcd(void); - -#include "vpx_config.h" - -#ifdef RTCD_C -#include "vpx_ports/arm.h" -static void setup_rtcd_internal(void) -{ - int flags = arm_cpu_caps(); - - (void)flags; - -} -#endif - -#ifdef __cplusplus -} // extern "C" -#endif - -#endif diff --git a/WebRtc.NET/include/third_party/libvpx/source/config/linux/arm64/vp8_rtcd.h b/WebRtc.NET/include/third_party/libvpx/source/config/linux/arm64/vp8_rtcd.h deleted file mode 100644 index 6a7f92ca..00000000 --- a/WebRtc.NET/include/third_party/libvpx/source/config/linux/arm64/vp8_rtcd.h +++ /dev/null @@ -1,218 +0,0 @@ -#ifndef VP8_RTCD_H_ -#define VP8_RTCD_H_ - -#ifdef RTCD_C -#define RTCD_EXTERN -#else -#define RTCD_EXTERN extern -#endif - -/* - * VP8 - */ - -struct blockd; -struct macroblockd; -struct loop_filter_info; - -/* Encoder forward decls */ -struct block; -struct macroblock; -struct variance_vtable; -union int_mv; -struct yv12_buffer_config; - -#ifdef __cplusplus -extern "C" { -#endif - -void vp8_bilinear_predict16x16_c(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch); -void vp8_bilinear_predict16x16_neon(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch); -#define vp8_bilinear_predict16x16 vp8_bilinear_predict16x16_neon - -void vp8_bilinear_predict4x4_c(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch); -void vp8_bilinear_predict4x4_neon(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch); -#define vp8_bilinear_predict4x4 vp8_bilinear_predict4x4_neon - -void vp8_bilinear_predict8x4_c(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch); -void vp8_bilinear_predict8x4_neon(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch); -#define vp8_bilinear_predict8x4 vp8_bilinear_predict8x4_neon - -void vp8_bilinear_predict8x8_c(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch); -void vp8_bilinear_predict8x8_neon(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch); -#define vp8_bilinear_predict8x8 vp8_bilinear_predict8x8_neon - -void vp8_blend_b_c(unsigned char *y, unsigned char *u, unsigned char *v, int y1, int u1, int v1, int alpha, int stride); -#define vp8_blend_b vp8_blend_b_c - -void vp8_blend_mb_inner_c(unsigned char *y, unsigned char *u, unsigned char *v, int y1, int u1, int v1, int alpha, int stride); -#define vp8_blend_mb_inner vp8_blend_mb_inner_c - -void vp8_blend_mb_outer_c(unsigned char *y, unsigned char *u, unsigned char *v, int y1, int u1, int v1, int alpha, int stride); -#define vp8_blend_mb_outer vp8_blend_mb_outer_c - -int vp8_block_error_c(short *coeff, short *dqcoeff); -#define vp8_block_error vp8_block_error_c - -void vp8_copy_mem16x16_c(unsigned char *src, int src_pitch, unsigned char *dst, int dst_pitch); -void vp8_copy_mem16x16_neon(unsigned char *src, int src_pitch, unsigned char *dst, int dst_pitch); -#define vp8_copy_mem16x16 vp8_copy_mem16x16_neon - -void vp8_copy_mem8x4_c(unsigned char *src, int src_pitch, unsigned char *dst, int dst_pitch); -void vp8_copy_mem8x4_neon(unsigned char *src, int src_pitch, unsigned char *dst, int dst_pitch); -#define vp8_copy_mem8x4 vp8_copy_mem8x4_neon - -void vp8_copy_mem8x8_c(unsigned char *src, int src_pitch, unsigned char *dst, int dst_pitch); -void vp8_copy_mem8x8_neon(unsigned char *src, int src_pitch, unsigned char *dst, int dst_pitch); -#define vp8_copy_mem8x8 vp8_copy_mem8x8_neon - -void vp8_dc_only_idct_add_c(short input, unsigned char *pred, int pred_stride, unsigned char *dst, int dst_stride); -void vp8_dc_only_idct_add_neon(short input, unsigned char *pred, int pred_stride, unsigned char *dst, int dst_stride); -#define vp8_dc_only_idct_add vp8_dc_only_idct_add_neon - -int vp8_denoiser_filter_c(unsigned char *mc_running_avg_y, int mc_avg_y_stride, unsigned char *running_avg_y, int avg_y_stride, unsigned char *sig, int sig_stride, unsigned int motion_magnitude, int increase_denoising); -int vp8_denoiser_filter_neon(unsigned char *mc_running_avg_y, int mc_avg_y_stride, unsigned char *running_avg_y, int avg_y_stride, unsigned char *sig, int sig_stride, unsigned int motion_magnitude, int increase_denoising); -#define vp8_denoiser_filter vp8_denoiser_filter_neon - -int vp8_denoiser_filter_uv_c(unsigned char *mc_running_avg, int mc_avg_stride, unsigned char *running_avg, int avg_stride, unsigned char *sig, int sig_stride, unsigned int motion_magnitude, int increase_denoising); -int vp8_denoiser_filter_uv_neon(unsigned char *mc_running_avg, int mc_avg_stride, unsigned char *running_avg, int avg_stride, unsigned char *sig, int sig_stride, unsigned int motion_magnitude, int increase_denoising); -#define vp8_denoiser_filter_uv vp8_denoiser_filter_uv_neon - -void vp8_dequant_idct_add_c(short *input, short *dq, unsigned char *output, int stride); -void vp8_dequant_idct_add_neon(short *input, short *dq, unsigned char *output, int stride); -#define vp8_dequant_idct_add vp8_dequant_idct_add_neon - -void vp8_dequant_idct_add_uv_block_c(short *q, short *dq, unsigned char *dst_u, unsigned char *dst_v, int stride, char *eobs); -void vp8_dequant_idct_add_uv_block_neon(short *q, short *dq, unsigned char *dst_u, unsigned char *dst_v, int stride, char *eobs); -#define vp8_dequant_idct_add_uv_block vp8_dequant_idct_add_uv_block_neon - -void vp8_dequant_idct_add_y_block_c(short *q, short *dq, unsigned char *dst, int stride, char *eobs); -void vp8_dequant_idct_add_y_block_neon(short *q, short *dq, unsigned char *dst, int stride, char *eobs); -#define vp8_dequant_idct_add_y_block vp8_dequant_idct_add_y_block_neon - -void vp8_dequantize_b_c(struct blockd*, short *dqc); -void vp8_dequantize_b_neon(struct blockd*, short *dqc); -#define vp8_dequantize_b vp8_dequantize_b_neon - -int vp8_diamond_search_sad_c(struct macroblock *x, struct block *b, struct blockd *d, union int_mv *ref_mv, union int_mv *best_mv, int search_param, int sad_per_bit, int *num00, struct variance_vtable *fn_ptr, int *mvcost[2], union int_mv *center_mv); -#define vp8_diamond_search_sad vp8_diamond_search_sad_c - -void vp8_fast_quantize_b_c(struct block *, struct blockd *); -void vp8_fast_quantize_b_neon(struct block *, struct blockd *); -#define vp8_fast_quantize_b vp8_fast_quantize_b_neon - -void vp8_filter_by_weight16x16_c(unsigned char *src, int src_stride, unsigned char *dst, int dst_stride, int src_weight); -#define vp8_filter_by_weight16x16 vp8_filter_by_weight16x16_c - -void vp8_filter_by_weight4x4_c(unsigned char *src, int src_stride, unsigned char *dst, int dst_stride, int src_weight); -#define vp8_filter_by_weight4x4 vp8_filter_by_weight4x4_c - -void vp8_filter_by_weight8x8_c(unsigned char *src, int src_stride, unsigned char *dst, int dst_stride, int src_weight); -#define vp8_filter_by_weight8x8 vp8_filter_by_weight8x8_c - -int vp8_full_search_sad_c(struct macroblock *x, struct block *b, struct blockd *d, union int_mv *ref_mv, int sad_per_bit, int distance, struct variance_vtable *fn_ptr, int *mvcost[2], union int_mv *center_mv); -#define vp8_full_search_sad vp8_full_search_sad_c - -void vp8_loop_filter_bh_c(unsigned char *y, unsigned char *u, unsigned char *v, int ystride, int uv_stride, struct loop_filter_info *lfi); -void vp8_loop_filter_bh_neon(unsigned char *y, unsigned char *u, unsigned char *v, int ystride, int uv_stride, struct loop_filter_info *lfi); -#define vp8_loop_filter_bh vp8_loop_filter_bh_neon - -void vp8_loop_filter_bv_c(unsigned char *y, unsigned char *u, unsigned char *v, int ystride, int uv_stride, struct loop_filter_info *lfi); -void vp8_loop_filter_bv_neon(unsigned char *y, unsigned char *u, unsigned char *v, int ystride, int uv_stride, struct loop_filter_info *lfi); -#define vp8_loop_filter_bv vp8_loop_filter_bv_neon - -void vp8_loop_filter_mbh_c(unsigned char *y, unsigned char *u, unsigned char *v, int ystride, int uv_stride, struct loop_filter_info *lfi); -void vp8_loop_filter_mbh_neon(unsigned char *y, unsigned char *u, unsigned char *v, int ystride, int uv_stride, struct loop_filter_info *lfi); -#define vp8_loop_filter_mbh vp8_loop_filter_mbh_neon - -void vp8_loop_filter_mbv_c(unsigned char *y, unsigned char *u, unsigned char *v, int ystride, int uv_stride, struct loop_filter_info *lfi); -void vp8_loop_filter_mbv_neon(unsigned char *y, unsigned char *u, unsigned char *v, int ystride, int uv_stride, struct loop_filter_info *lfi); -#define vp8_loop_filter_mbv vp8_loop_filter_mbv_neon - -void vp8_loop_filter_bhs_c(unsigned char *y, int ystride, const unsigned char *blimit); -void vp8_loop_filter_bhs_neon(unsigned char *y, int ystride, const unsigned char *blimit); -#define vp8_loop_filter_simple_bh vp8_loop_filter_bhs_neon - -void vp8_loop_filter_bvs_c(unsigned char *y, int ystride, const unsigned char *blimit); -void vp8_loop_filter_bvs_neon(unsigned char *y, int ystride, const unsigned char *blimit); -#define vp8_loop_filter_simple_bv vp8_loop_filter_bvs_neon - -void vp8_loop_filter_simple_horizontal_edge_c(unsigned char *y, int ystride, const unsigned char *blimit); -void vp8_loop_filter_mbhs_neon(unsigned char *y, int ystride, const unsigned char *blimit); -#define vp8_loop_filter_simple_mbh vp8_loop_filter_mbhs_neon - -void vp8_loop_filter_simple_vertical_edge_c(unsigned char *y, int ystride, const unsigned char *blimit); -void vp8_loop_filter_mbvs_neon(unsigned char *y, int ystride, const unsigned char *blimit); -#define vp8_loop_filter_simple_mbv vp8_loop_filter_mbvs_neon - -int vp8_mbblock_error_c(struct macroblock *mb, int dc); -#define vp8_mbblock_error vp8_mbblock_error_c - -int vp8_mbuverror_c(struct macroblock *mb); -#define vp8_mbuverror vp8_mbuverror_c - -int vp8_refining_search_sad_c(struct macroblock *x, struct block *b, struct blockd *d, union int_mv *ref_mv, int sad_per_bit, int distance, struct variance_vtable *fn_ptr, int *mvcost[2], union int_mv *center_mv); -#define vp8_refining_search_sad vp8_refining_search_sad_c - -void vp8_regular_quantize_b_c(struct block *, struct blockd *); -#define vp8_regular_quantize_b vp8_regular_quantize_b_c - -void vp8_short_fdct4x4_c(short *input, short *output, int pitch); -void vp8_short_fdct4x4_neon(short *input, short *output, int pitch); -#define vp8_short_fdct4x4 vp8_short_fdct4x4_neon - -void vp8_short_fdct8x4_c(short *input, short *output, int pitch); -void vp8_short_fdct8x4_neon(short *input, short *output, int pitch); -#define vp8_short_fdct8x4 vp8_short_fdct8x4_neon - -void vp8_short_idct4x4llm_c(short *input, unsigned char *pred, int pitch, unsigned char *dst, int dst_stride); -void vp8_short_idct4x4llm_neon(short *input, unsigned char *pred, int pitch, unsigned char *dst, int dst_stride); -#define vp8_short_idct4x4llm vp8_short_idct4x4llm_neon - -void vp8_short_inv_walsh4x4_c(short *input, short *output); -void vp8_short_inv_walsh4x4_neon(short *input, short *output); -#define vp8_short_inv_walsh4x4 vp8_short_inv_walsh4x4_neon - -void vp8_short_inv_walsh4x4_1_c(short *input, short *output); -#define vp8_short_inv_walsh4x4_1 vp8_short_inv_walsh4x4_1_c - -void vp8_short_walsh4x4_c(short *input, short *output, int pitch); -void vp8_short_walsh4x4_neon(short *input, short *output, int pitch); -#define vp8_short_walsh4x4 vp8_short_walsh4x4_neon - -void vp8_sixtap_predict16x16_c(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch); -void vp8_sixtap_predict16x16_neon(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch); -#define vp8_sixtap_predict16x16 vp8_sixtap_predict16x16_neon - -void vp8_sixtap_predict4x4_c(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch); -void vp8_sixtap_predict4x4_neon(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch); -#define vp8_sixtap_predict4x4 vp8_sixtap_predict4x4_neon - -void vp8_sixtap_predict8x4_c(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch); -void vp8_sixtap_predict8x4_neon(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch); -#define vp8_sixtap_predict8x4 vp8_sixtap_predict8x4_neon - -void vp8_sixtap_predict8x8_c(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch); -void vp8_sixtap_predict8x8_neon(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch); -#define vp8_sixtap_predict8x8 vp8_sixtap_predict8x8_neon - -void vp8_rtcd(void); - -#include "vpx_config.h" - -#ifdef RTCD_C -#include "vpx_ports/arm.h" -static void setup_rtcd_internal(void) -{ - int flags = arm_cpu_caps(); - - (void)flags; - -} -#endif - -#ifdef __cplusplus -} // extern "C" -#endif - -#endif diff --git a/WebRtc.NET/include/third_party/libvpx/source/config/linux/arm64/vp9_rtcd.h b/WebRtc.NET/include/third_party/libvpx/source/config/linux/arm64/vp9_rtcd.h deleted file mode 100644 index d07bcaa3..00000000 --- a/WebRtc.NET/include/third_party/libvpx/source/config/linux/arm64/vp9_rtcd.h +++ /dev/null @@ -1,113 +0,0 @@ -#ifndef VP9_RTCD_H_ -#define VP9_RTCD_H_ - -#ifdef RTCD_C -#define RTCD_EXTERN -#else -#define RTCD_EXTERN extern -#endif - -/* - * VP9 - */ - -#include "vpx/vpx_integer.h" -#include "vp9/common/vp9_common.h" -#include "vp9/common/vp9_enums.h" - -struct macroblockd; - -/* Encoder forward decls */ -struct macroblock; -struct vp9_variance_vtable; -struct search_site_config; -struct mv; -union int_mv; -struct yv12_buffer_config; - -#ifdef __cplusplus -extern "C" { -#endif - -int64_t vp9_block_error_c(const tran_low_t *coeff, const tran_low_t *dqcoeff, intptr_t block_size, int64_t *ssz); -#define vp9_block_error vp9_block_error_c - -int64_t vp9_block_error_fp_c(const int16_t *coeff, const int16_t *dqcoeff, int block_size); -int64_t vp9_block_error_fp_neon(const int16_t *coeff, const int16_t *dqcoeff, int block_size); -#define vp9_block_error_fp vp9_block_error_fp_neon - -int vp9_denoiser_filter_c(const uint8_t *sig, int sig_stride, const uint8_t *mc_avg, int mc_avg_stride, uint8_t *avg, int avg_stride, int increase_denoising, BLOCK_SIZE bs, int motion_magnitude); -#define vp9_denoiser_filter vp9_denoiser_filter_c - -int vp9_diamond_search_sad_c(const struct macroblock *x, const struct search_site_config *cfg, struct mv *ref_mv, struct mv *best_mv, int search_param, int sad_per_bit, int *num00, const struct vp9_variance_vtable *fn_ptr, const struct mv *center_mv); -#define vp9_diamond_search_sad vp9_diamond_search_sad_c - -void vp9_fdct8x8_quant_c(const int16_t *input, int stride, tran_low_t *coeff_ptr, intptr_t n_coeffs, int skip_block, const int16_t *zbin_ptr, const int16_t *round_ptr, const int16_t *quant_ptr, const int16_t *quant_shift_ptr, tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr, const int16_t *dequant_ptr, uint16_t *eob_ptr, const int16_t *scan, const int16_t *iscan); -void vp9_fdct8x8_quant_neon(const int16_t *input, int stride, tran_low_t *coeff_ptr, intptr_t n_coeffs, int skip_block, const int16_t *zbin_ptr, const int16_t *round_ptr, const int16_t *quant_ptr, const int16_t *quant_shift_ptr, tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr, const int16_t *dequant_ptr, uint16_t *eob_ptr, const int16_t *scan, const int16_t *iscan); -#define vp9_fdct8x8_quant vp9_fdct8x8_quant_neon - -void vp9_fht16x16_c(const int16_t *input, tran_low_t *output, int stride, int tx_type); -#define vp9_fht16x16 vp9_fht16x16_c - -void vp9_fht4x4_c(const int16_t *input, tran_low_t *output, int stride, int tx_type); -#define vp9_fht4x4 vp9_fht4x4_c - -void vp9_fht8x8_c(const int16_t *input, tran_low_t *output, int stride, int tx_type); -#define vp9_fht8x8 vp9_fht8x8_c - -void vp9_filter_by_weight16x16_c(const uint8_t *src, int src_stride, uint8_t *dst, int dst_stride, int src_weight); -#define vp9_filter_by_weight16x16 vp9_filter_by_weight16x16_c - -void vp9_filter_by_weight8x8_c(const uint8_t *src, int src_stride, uint8_t *dst, int dst_stride, int src_weight); -#define vp9_filter_by_weight8x8 vp9_filter_by_weight8x8_c - -int vp9_full_search_sad_c(const struct macroblock *x, const struct mv *ref_mv, int sad_per_bit, int distance, const struct vp9_variance_vtable *fn_ptr, const struct mv *center_mv, struct mv *best_mv); -#define vp9_full_search_sad vp9_full_search_sad_c - -void vp9_fwht4x4_c(const int16_t *input, tran_low_t *output, int stride); -#define vp9_fwht4x4 vp9_fwht4x4_c - -void vp9_iht16x16_256_add_c(const tran_low_t *input, uint8_t *output, int pitch, int tx_type); -#define vp9_iht16x16_256_add vp9_iht16x16_256_add_c - -void vp9_iht4x4_16_add_c(const tran_low_t *input, uint8_t *dest, int stride, int tx_type); -void vp9_iht4x4_16_add_neon(const tran_low_t *input, uint8_t *dest, int stride, int tx_type); -#define vp9_iht4x4_16_add vp9_iht4x4_16_add_neon - -void vp9_iht8x8_64_add_c(const tran_low_t *input, uint8_t *dest, int stride, int tx_type); -void vp9_iht8x8_64_add_neon(const tran_low_t *input, uint8_t *dest, int stride, int tx_type); -#define vp9_iht8x8_64_add vp9_iht8x8_64_add_neon - -void vp9_quantize_fp_c(const tran_low_t *coeff_ptr, intptr_t n_coeffs, int skip_block, const int16_t *zbin_ptr, const int16_t *round_ptr, const int16_t *quant_ptr, const int16_t *quant_shift_ptr, tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr, const int16_t *dequant_ptr, uint16_t *eob_ptr, const int16_t *scan, const int16_t *iscan); -void vp9_quantize_fp_neon(const tran_low_t *coeff_ptr, intptr_t n_coeffs, int skip_block, const int16_t *zbin_ptr, const int16_t *round_ptr, const int16_t *quant_ptr, const int16_t *quant_shift_ptr, tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr, const int16_t *dequant_ptr, uint16_t *eob_ptr, const int16_t *scan, const int16_t *iscan); -#define vp9_quantize_fp vp9_quantize_fp_neon - -void vp9_quantize_fp_32x32_c(const tran_low_t *coeff_ptr, intptr_t n_coeffs, int skip_block, const int16_t *zbin_ptr, const int16_t *round_ptr, const int16_t *quant_ptr, const int16_t *quant_shift_ptr, tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr, const int16_t *dequant_ptr, uint16_t *eob_ptr, const int16_t *scan, const int16_t *iscan); -#define vp9_quantize_fp_32x32 vp9_quantize_fp_32x32_c - -void vp9_scale_and_extend_frame_c(const struct yv12_buffer_config *src, struct yv12_buffer_config *dst); -#define vp9_scale_and_extend_frame vp9_scale_and_extend_frame_c - -void vp9_temporal_filter_apply_c(uint8_t *frame1, unsigned int stride, uint8_t *frame2, unsigned int block_width, unsigned int block_height, int strength, int filter_weight, unsigned int *accumulator, uint16_t *count); -#define vp9_temporal_filter_apply vp9_temporal_filter_apply_c - -void vp9_rtcd(void); - -#include "vpx_config.h" - -#ifdef RTCD_C -#include "vpx_ports/arm.h" -static void setup_rtcd_internal(void) -{ - int flags = arm_cpu_caps(); - - (void)flags; - -} -#endif - -#ifdef __cplusplus -} // extern "C" -#endif - -#endif diff --git a/WebRtc.NET/include/third_party/libvpx/source/config/linux/arm64/vpx_config.h b/WebRtc.NET/include/third_party/libvpx/source/config/linux/arm64/vpx_config.h deleted file mode 100644 index 9a9ecb4d..00000000 --- a/WebRtc.NET/include/third_party/libvpx/source/config/linux/arm64/vpx_config.h +++ /dev/null @@ -1,94 +0,0 @@ -/* Copyright (c) 2011 The WebM project authors. All Rights Reserved. */ -/* */ -/* Use of this source code is governed by a BSD-style license */ -/* that can be found in the LICENSE file in the root of the source */ -/* tree. An additional intellectual property rights grant can be found */ -/* in the file PATENTS. All contributing project authors may */ -/* be found in the AUTHORS file in the root of the source tree. */ -/* This file automatically generated by configure. Do not edit! */ -#ifndef VPX_CONFIG_H -#define VPX_CONFIG_H -#define RESTRICT -#define INLINE inline -#define ARCH_ARM 1 -#define ARCH_MIPS 0 -#define ARCH_X86 0 -#define ARCH_X86_64 0 -#define HAVE_NEON 1 -#define HAVE_NEON_ASM 0 -#define HAVE_MIPS32 0 -#define HAVE_DSPR2 0 -#define HAVE_MSA 0 -#define HAVE_MIPS64 0 -#define HAVE_MMX 0 -#define HAVE_SSE 0 -#define HAVE_SSE2 0 -#define HAVE_SSE3 0 -#define HAVE_SSSE3 0 -#define HAVE_SSE4_1 0 -#define HAVE_AVX 0 -#define HAVE_AVX2 0 -#define HAVE_VPX_PORTS 1 -#define HAVE_PTHREAD_H 1 -#define HAVE_UNISTD_H 0 -#define CONFIG_DEPENDENCY_TRACKING 1 -#define CONFIG_EXTERNAL_BUILD 1 -#define CONFIG_INSTALL_DOCS 0 -#define CONFIG_INSTALL_BINS 1 -#define CONFIG_INSTALL_LIBS 1 -#define CONFIG_INSTALL_SRCS 0 -#define CONFIG_DEBUG 0 -#define CONFIG_GPROF 0 -#define CONFIG_GCOV 0 -#define CONFIG_RVCT 0 -#define CONFIG_GCC 1 -#define CONFIG_MSVS 0 -#define CONFIG_PIC 0 -#define CONFIG_BIG_ENDIAN 0 -#define CONFIG_CODEC_SRCS 0 -#define CONFIG_DEBUG_LIBS 0 -#define CONFIG_DEQUANT_TOKENS 0 -#define CONFIG_DC_RECON 0 -#define CONFIG_RUNTIME_CPU_DETECT 0 -#define CONFIG_POSTPROC 1 -#define CONFIG_VP9_POSTPROC 1 -#define CONFIG_MULTITHREAD 1 -#define CONFIG_INTERNAL_STATS 0 -#define CONFIG_VP8_ENCODER 1 -#define CONFIG_VP8_DECODER 1 -#define CONFIG_VP9_ENCODER 1 -#define CONFIG_VP9_DECODER 1 -#define CONFIG_VP8 1 -#define CONFIG_VP9 1 -#define CONFIG_ENCODERS 1 -#define CONFIG_DECODERS 1 -#define CONFIG_STATIC_MSVCRT 0 -#define CONFIG_SPATIAL_RESAMPLING 1 -#define CONFIG_REALTIME_ONLY 1 -#define CONFIG_ONTHEFLY_BITPACKING 0 -#define CONFIG_ERROR_CONCEALMENT 0 -#define CONFIG_SHARED 0 -#define CONFIG_STATIC 1 -#define CONFIG_SMALL 0 -#define CONFIG_POSTPROC_VISUALIZER 0 -#define CONFIG_OS_SUPPORT 1 -#define CONFIG_UNIT_TESTS 1 -#define CONFIG_WEBM_IO 1 -#define CONFIG_LIBYUV 1 -#define CONFIG_DECODE_PERF_TESTS 0 -#define CONFIG_ENCODE_PERF_TESTS 0 -#define CONFIG_MULTI_RES_ENCODING 1 -#define CONFIG_TEMPORAL_DENOISING 1 -#define CONFIG_VP9_TEMPORAL_DENOISING 1 -#define CONFIG_COEFFICIENT_RANGE_CHECKING 0 -#define CONFIG_VP9_HIGHBITDEPTH 0 -#define CONFIG_BETTER_HW_COMPATIBILITY 0 -#define CONFIG_EXPERIMENTAL 0 -#define CONFIG_SIZE_LIMIT 1 -#define CONFIG_SPATIAL_SVC 0 -#define CONFIG_FP_MB_STATS 0 -#define CONFIG_EMULATE_HARDWARE 0 -#define CONFIG_MISC_FIXES 0 -#define DECODE_WIDTH_LIMIT 16384 -#define DECODE_HEIGHT_LIMIT 16384 -#endif /* VPX_CONFIG_H */ diff --git a/WebRtc.NET/include/third_party/libvpx/source/config/linux/arm64/vpx_dsp_rtcd.h b/WebRtc.NET/include/third_party/libvpx/source/config/linux/arm64/vpx_dsp_rtcd.h deleted file mode 100644 index c9d867d0..00000000 --- a/WebRtc.NET/include/third_party/libvpx/source/config/linux/arm64/vpx_dsp_rtcd.h +++ /dev/null @@ -1,858 +0,0 @@ -#ifndef VPX_DSP_RTCD_H_ -#define VPX_DSP_RTCD_H_ - -#ifdef RTCD_C -#define RTCD_EXTERN -#else -#define RTCD_EXTERN extern -#endif - -/* - * DSP - */ - -#include "vpx/vpx_integer.h" -#include "vpx_dsp/vpx_dsp_common.h" - - -#ifdef __cplusplus -extern "C" { -#endif - -unsigned int vpx_avg_4x4_c(const uint8_t *, int p); -unsigned int vpx_avg_4x4_neon(const uint8_t *, int p); -#define vpx_avg_4x4 vpx_avg_4x4_neon - -unsigned int vpx_avg_8x8_c(const uint8_t *, int p); -unsigned int vpx_avg_8x8_neon(const uint8_t *, int p); -#define vpx_avg_8x8 vpx_avg_8x8_neon - -void vpx_comp_avg_pred_c(uint8_t *comp_pred, const uint8_t *pred, int width, int height, const uint8_t *ref, int ref_stride); -#define vpx_comp_avg_pred vpx_comp_avg_pred_c - -void vpx_convolve8_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -void vpx_convolve8_neon(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -#define vpx_convolve8 vpx_convolve8_neon - -void vpx_convolve8_avg_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -void vpx_convolve8_avg_neon(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -#define vpx_convolve8_avg vpx_convolve8_avg_neon - -void vpx_convolve8_avg_horiz_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -void vpx_convolve8_avg_horiz_neon(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -#define vpx_convolve8_avg_horiz vpx_convolve8_avg_horiz_neon - -void vpx_convolve8_avg_vert_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -void vpx_convolve8_avg_vert_neon(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -#define vpx_convolve8_avg_vert vpx_convolve8_avg_vert_neon - -void vpx_convolve8_horiz_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -void vpx_convolve8_horiz_neon(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -#define vpx_convolve8_horiz vpx_convolve8_horiz_neon - -void vpx_convolve8_vert_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -void vpx_convolve8_vert_neon(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -#define vpx_convolve8_vert vpx_convolve8_vert_neon - -void vpx_convolve_avg_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -void vpx_convolve_avg_neon(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -#define vpx_convolve_avg vpx_convolve_avg_neon - -void vpx_convolve_copy_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -void vpx_convolve_copy_neon(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -#define vpx_convolve_copy vpx_convolve_copy_neon - -void vpx_d117_predictor_16x16_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d117_predictor_16x16 vpx_d117_predictor_16x16_c - -void vpx_d117_predictor_32x32_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d117_predictor_32x32 vpx_d117_predictor_32x32_c - -void vpx_d117_predictor_4x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d117_predictor_4x4 vpx_d117_predictor_4x4_c - -void vpx_d117_predictor_8x8_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d117_predictor_8x8 vpx_d117_predictor_8x8_c - -void vpx_d135_predictor_16x16_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_d135_predictor_16x16_neon(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d135_predictor_16x16 vpx_d135_predictor_16x16_neon - -void vpx_d135_predictor_32x32_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_d135_predictor_32x32_neon(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d135_predictor_32x32 vpx_d135_predictor_32x32_neon - -void vpx_d135_predictor_4x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_d135_predictor_4x4_neon(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d135_predictor_4x4 vpx_d135_predictor_4x4_neon - -void vpx_d135_predictor_8x8_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_d135_predictor_8x8_neon(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d135_predictor_8x8 vpx_d135_predictor_8x8_neon - -void vpx_d153_predictor_16x16_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d153_predictor_16x16 vpx_d153_predictor_16x16_c - -void vpx_d153_predictor_32x32_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d153_predictor_32x32 vpx_d153_predictor_32x32_c - -void vpx_d153_predictor_4x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d153_predictor_4x4 vpx_d153_predictor_4x4_c - -void vpx_d153_predictor_8x8_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d153_predictor_8x8 vpx_d153_predictor_8x8_c - -void vpx_d207_predictor_16x16_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d207_predictor_16x16 vpx_d207_predictor_16x16_c - -void vpx_d207_predictor_32x32_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d207_predictor_32x32 vpx_d207_predictor_32x32_c - -void vpx_d207_predictor_4x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d207_predictor_4x4 vpx_d207_predictor_4x4_c - -void vpx_d207_predictor_8x8_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d207_predictor_8x8 vpx_d207_predictor_8x8_c - -void vpx_d207e_predictor_16x16_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d207e_predictor_16x16 vpx_d207e_predictor_16x16_c - -void vpx_d207e_predictor_32x32_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d207e_predictor_32x32 vpx_d207e_predictor_32x32_c - -void vpx_d207e_predictor_4x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d207e_predictor_4x4 vpx_d207e_predictor_4x4_c - -void vpx_d207e_predictor_8x8_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d207e_predictor_8x8 vpx_d207e_predictor_8x8_c - -void vpx_d45_predictor_16x16_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_d45_predictor_16x16_neon(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d45_predictor_16x16 vpx_d45_predictor_16x16_neon - -void vpx_d45_predictor_32x32_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_d45_predictor_32x32_neon(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d45_predictor_32x32 vpx_d45_predictor_32x32_neon - -void vpx_d45_predictor_4x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_d45_predictor_4x4_neon(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d45_predictor_4x4 vpx_d45_predictor_4x4_neon - -void vpx_d45_predictor_8x8_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_d45_predictor_8x8_neon(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d45_predictor_8x8 vpx_d45_predictor_8x8_neon - -void vpx_d45e_predictor_16x16_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d45e_predictor_16x16 vpx_d45e_predictor_16x16_c - -void vpx_d45e_predictor_32x32_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d45e_predictor_32x32 vpx_d45e_predictor_32x32_c - -void vpx_d45e_predictor_4x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d45e_predictor_4x4 vpx_d45e_predictor_4x4_c - -void vpx_d45e_predictor_8x8_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d45e_predictor_8x8 vpx_d45e_predictor_8x8_c - -void vpx_d63_predictor_16x16_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d63_predictor_16x16 vpx_d63_predictor_16x16_c - -void vpx_d63_predictor_32x32_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d63_predictor_32x32 vpx_d63_predictor_32x32_c - -void vpx_d63_predictor_4x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d63_predictor_4x4 vpx_d63_predictor_4x4_c - -void vpx_d63_predictor_8x8_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d63_predictor_8x8 vpx_d63_predictor_8x8_c - -void vpx_d63e_predictor_16x16_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d63e_predictor_16x16 vpx_d63e_predictor_16x16_c - -void vpx_d63e_predictor_32x32_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d63e_predictor_32x32 vpx_d63e_predictor_32x32_c - -void vpx_d63e_predictor_4x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d63e_predictor_4x4 vpx_d63e_predictor_4x4_c - -void vpx_d63e_predictor_8x8_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d63e_predictor_8x8 vpx_d63e_predictor_8x8_c - -void vpx_d63f_predictor_4x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d63f_predictor_4x4 vpx_d63f_predictor_4x4_c - -void vpx_dc_128_predictor_16x16_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_dc_128_predictor_16x16_neon(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_dc_128_predictor_16x16 vpx_dc_128_predictor_16x16_neon - -void vpx_dc_128_predictor_32x32_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_dc_128_predictor_32x32_neon(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_dc_128_predictor_32x32 vpx_dc_128_predictor_32x32_neon - -void vpx_dc_128_predictor_4x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_dc_128_predictor_4x4_neon(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_dc_128_predictor_4x4 vpx_dc_128_predictor_4x4_neon - -void vpx_dc_128_predictor_8x8_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_dc_128_predictor_8x8_neon(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_dc_128_predictor_8x8 vpx_dc_128_predictor_8x8_neon - -void vpx_dc_left_predictor_16x16_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_dc_left_predictor_16x16_neon(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_dc_left_predictor_16x16 vpx_dc_left_predictor_16x16_neon - -void vpx_dc_left_predictor_32x32_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_dc_left_predictor_32x32_neon(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_dc_left_predictor_32x32 vpx_dc_left_predictor_32x32_neon - -void vpx_dc_left_predictor_4x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_dc_left_predictor_4x4_neon(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_dc_left_predictor_4x4 vpx_dc_left_predictor_4x4_neon - -void vpx_dc_left_predictor_8x8_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_dc_left_predictor_8x8_neon(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_dc_left_predictor_8x8 vpx_dc_left_predictor_8x8_neon - -void vpx_dc_predictor_16x16_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_dc_predictor_16x16_neon(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_dc_predictor_16x16 vpx_dc_predictor_16x16_neon - -void vpx_dc_predictor_32x32_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_dc_predictor_32x32_neon(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_dc_predictor_32x32 vpx_dc_predictor_32x32_neon - -void vpx_dc_predictor_4x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_dc_predictor_4x4_neon(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_dc_predictor_4x4 vpx_dc_predictor_4x4_neon - -void vpx_dc_predictor_8x8_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_dc_predictor_8x8_neon(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_dc_predictor_8x8 vpx_dc_predictor_8x8_neon - -void vpx_dc_top_predictor_16x16_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_dc_top_predictor_16x16_neon(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_dc_top_predictor_16x16 vpx_dc_top_predictor_16x16_neon - -void vpx_dc_top_predictor_32x32_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_dc_top_predictor_32x32_neon(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_dc_top_predictor_32x32 vpx_dc_top_predictor_32x32_neon - -void vpx_dc_top_predictor_4x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_dc_top_predictor_4x4_neon(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_dc_top_predictor_4x4 vpx_dc_top_predictor_4x4_neon - -void vpx_dc_top_predictor_8x8_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_dc_top_predictor_8x8_neon(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_dc_top_predictor_8x8 vpx_dc_top_predictor_8x8_neon - -void vpx_fdct16x16_c(const int16_t *input, tran_low_t *output, int stride); -#define vpx_fdct16x16 vpx_fdct16x16_c - -void vpx_fdct16x16_1_c(const int16_t *input, tran_low_t *output, int stride); -#define vpx_fdct16x16_1 vpx_fdct16x16_1_c - -void vpx_fdct32x32_c(const int16_t *input, tran_low_t *output, int stride); -#define vpx_fdct32x32 vpx_fdct32x32_c - -void vpx_fdct32x32_1_c(const int16_t *input, tran_low_t *output, int stride); -#define vpx_fdct32x32_1 vpx_fdct32x32_1_c - -void vpx_fdct32x32_rd_c(const int16_t *input, tran_low_t *output, int stride); -#define vpx_fdct32x32_rd vpx_fdct32x32_rd_c - -void vpx_fdct4x4_c(const int16_t *input, tran_low_t *output, int stride); -#define vpx_fdct4x4 vpx_fdct4x4_c - -void vpx_fdct4x4_1_c(const int16_t *input, tran_low_t *output, int stride); -#define vpx_fdct4x4_1 vpx_fdct4x4_1_c - -void vpx_fdct8x8_c(const int16_t *input, tran_low_t *output, int stride); -void vpx_fdct8x8_neon(const int16_t *input, tran_low_t *output, int stride); -#define vpx_fdct8x8 vpx_fdct8x8_neon - -void vpx_fdct8x8_1_c(const int16_t *input, tran_low_t *output, int stride); -void vpx_fdct8x8_1_neon(const int16_t *input, tran_low_t *output, int stride); -#define vpx_fdct8x8_1 vpx_fdct8x8_1_neon - -void vpx_get16x16var_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse, int *sum); -void vpx_get16x16var_neon(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse, int *sum); -#define vpx_get16x16var vpx_get16x16var_neon - -unsigned int vpx_get4x4sse_cs_c(const unsigned char *src_ptr, int source_stride, const unsigned char *ref_ptr, int ref_stride); -unsigned int vpx_get4x4sse_cs_neon(const unsigned char *src_ptr, int source_stride, const unsigned char *ref_ptr, int ref_stride); -#define vpx_get4x4sse_cs vpx_get4x4sse_cs_neon - -void vpx_get8x8var_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse, int *sum); -void vpx_get8x8var_neon(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse, int *sum); -#define vpx_get8x8var vpx_get8x8var_neon - -unsigned int vpx_get_mb_ss_c(const int16_t *); -#define vpx_get_mb_ss vpx_get_mb_ss_c - -void vpx_h_predictor_16x16_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_h_predictor_16x16_neon(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_h_predictor_16x16 vpx_h_predictor_16x16_neon - -void vpx_h_predictor_32x32_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_h_predictor_32x32_neon(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_h_predictor_32x32 vpx_h_predictor_32x32_neon - -void vpx_h_predictor_4x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_h_predictor_4x4_neon(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_h_predictor_4x4 vpx_h_predictor_4x4_neon - -void vpx_h_predictor_8x8_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_h_predictor_8x8_neon(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_h_predictor_8x8 vpx_h_predictor_8x8_neon - -void vpx_hadamard_16x16_c(const int16_t *src_diff, int src_stride, int16_t *coeff); -void vpx_hadamard_16x16_neon(const int16_t *src_diff, int src_stride, int16_t *coeff); -#define vpx_hadamard_16x16 vpx_hadamard_16x16_neon - -void vpx_hadamard_8x8_c(const int16_t *src_diff, int src_stride, int16_t *coeff); -void vpx_hadamard_8x8_neon(const int16_t *src_diff, int src_stride, int16_t *coeff); -#define vpx_hadamard_8x8 vpx_hadamard_8x8_neon - -void vpx_he_predictor_4x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_he_predictor_4x4 vpx_he_predictor_4x4_c - -void vpx_idct16x16_10_add_c(const tran_low_t *input, uint8_t *dest, int stride); -void vpx_idct16x16_10_add_neon(const tran_low_t *input, uint8_t *dest, int stride); -#define vpx_idct16x16_10_add vpx_idct16x16_10_add_neon - -void vpx_idct16x16_1_add_c(const tran_low_t *input, uint8_t *dest, int stride); -void vpx_idct16x16_1_add_neon(const tran_low_t *input, uint8_t *dest, int stride); -#define vpx_idct16x16_1_add vpx_idct16x16_1_add_neon - -void vpx_idct16x16_256_add_c(const tran_low_t *input, uint8_t *dest, int stride); -void vpx_idct16x16_256_add_neon(const tran_low_t *input, uint8_t *dest, int stride); -#define vpx_idct16x16_256_add vpx_idct16x16_256_add_neon - -void vpx_idct32x32_1024_add_c(const tran_low_t *input, uint8_t *dest, int stride); -void vpx_idct32x32_1024_add_neon(const tran_low_t *input, uint8_t *dest, int stride); -#define vpx_idct32x32_1024_add vpx_idct32x32_1024_add_neon - -void vpx_idct32x32_135_add_c(const tran_low_t *input, uint8_t *dest, int stride); -void vpx_idct32x32_135_add_neon(const tran_low_t *input, uint8_t *dest, int stride); -#define vpx_idct32x32_135_add vpx_idct32x32_135_add_neon - -void vpx_idct32x32_1_add_c(const tran_low_t *input, uint8_t *dest, int stride); -void vpx_idct32x32_1_add_neon(const tran_low_t *input, uint8_t *dest, int stride); -#define vpx_idct32x32_1_add vpx_idct32x32_1_add_neon - -void vpx_idct32x32_34_add_c(const tran_low_t *input, uint8_t *dest, int stride); -void vpx_idct32x32_34_add_neon(const tran_low_t *input, uint8_t *dest, int stride); -#define vpx_idct32x32_34_add vpx_idct32x32_34_add_neon - -void vpx_idct4x4_16_add_c(const tran_low_t *input, uint8_t *dest, int stride); -void vpx_idct4x4_16_add_neon(const tran_low_t *input, uint8_t *dest, int stride); -#define vpx_idct4x4_16_add vpx_idct4x4_16_add_neon - -void vpx_idct4x4_1_add_c(const tran_low_t *input, uint8_t *dest, int stride); -void vpx_idct4x4_1_add_neon(const tran_low_t *input, uint8_t *dest, int stride); -#define vpx_idct4x4_1_add vpx_idct4x4_1_add_neon - -void vpx_idct8x8_12_add_c(const tran_low_t *input, uint8_t *dest, int stride); -void vpx_idct8x8_12_add_neon(const tran_low_t *input, uint8_t *dest, int stride); -#define vpx_idct8x8_12_add vpx_idct8x8_12_add_neon - -void vpx_idct8x8_1_add_c(const tran_low_t *input, uint8_t *dest, int stride); -void vpx_idct8x8_1_add_neon(const tran_low_t *input, uint8_t *dest, int stride); -#define vpx_idct8x8_1_add vpx_idct8x8_1_add_neon - -void vpx_idct8x8_64_add_c(const tran_low_t *input, uint8_t *dest, int stride); -void vpx_idct8x8_64_add_neon(const tran_low_t *input, uint8_t *dest, int stride); -#define vpx_idct8x8_64_add vpx_idct8x8_64_add_neon - -int16_t vpx_int_pro_col_c(const uint8_t *ref, const int width); -int16_t vpx_int_pro_col_neon(const uint8_t *ref, const int width); -#define vpx_int_pro_col vpx_int_pro_col_neon - -void vpx_int_pro_row_c(int16_t *hbuf, const uint8_t *ref, const int ref_stride, const int height); -void vpx_int_pro_row_neon(int16_t *hbuf, const uint8_t *ref, const int ref_stride, const int height); -#define vpx_int_pro_row vpx_int_pro_row_neon - -void vpx_iwht4x4_16_add_c(const tran_low_t *input, uint8_t *dest, int stride); -#define vpx_iwht4x4_16_add vpx_iwht4x4_16_add_c - -void vpx_iwht4x4_1_add_c(const tran_low_t *input, uint8_t *dest, int stride); -#define vpx_iwht4x4_1_add vpx_iwht4x4_1_add_c - -void vpx_lpf_horizontal_16_c(uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh); -void vpx_lpf_horizontal_16_neon(uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh); -#define vpx_lpf_horizontal_16 vpx_lpf_horizontal_16_neon - -void vpx_lpf_horizontal_16_dual_c(uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh); -void vpx_lpf_horizontal_16_dual_neon(uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh); -#define vpx_lpf_horizontal_16_dual vpx_lpf_horizontal_16_dual_neon - -void vpx_lpf_horizontal_4_c(uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh); -void vpx_lpf_horizontal_4_neon(uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh); -#define vpx_lpf_horizontal_4 vpx_lpf_horizontal_4_neon - -void vpx_lpf_horizontal_4_dual_c(uint8_t *s, int pitch, const uint8_t *blimit0, const uint8_t *limit0, const uint8_t *thresh0, const uint8_t *blimit1, const uint8_t *limit1, const uint8_t *thresh1); -void vpx_lpf_horizontal_4_dual_neon(uint8_t *s, int pitch, const uint8_t *blimit0, const uint8_t *limit0, const uint8_t *thresh0, const uint8_t *blimit1, const uint8_t *limit1, const uint8_t *thresh1); -#define vpx_lpf_horizontal_4_dual vpx_lpf_horizontal_4_dual_neon - -void vpx_lpf_horizontal_8_c(uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh); -void vpx_lpf_horizontal_8_neon(uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh); -#define vpx_lpf_horizontal_8 vpx_lpf_horizontal_8_neon - -void vpx_lpf_horizontal_8_dual_c(uint8_t *s, int pitch, const uint8_t *blimit0, const uint8_t *limit0, const uint8_t *thresh0, const uint8_t *blimit1, const uint8_t *limit1, const uint8_t *thresh1); -void vpx_lpf_horizontal_8_dual_neon(uint8_t *s, int pitch, const uint8_t *blimit0, const uint8_t *limit0, const uint8_t *thresh0, const uint8_t *blimit1, const uint8_t *limit1, const uint8_t *thresh1); -#define vpx_lpf_horizontal_8_dual vpx_lpf_horizontal_8_dual_neon - -void vpx_lpf_vertical_16_c(uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh); -void vpx_lpf_vertical_16_neon(uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh); -#define vpx_lpf_vertical_16 vpx_lpf_vertical_16_neon - -void vpx_lpf_vertical_16_dual_c(uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh); -void vpx_lpf_vertical_16_dual_neon(uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh); -#define vpx_lpf_vertical_16_dual vpx_lpf_vertical_16_dual_neon - -void vpx_lpf_vertical_4_c(uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh); -void vpx_lpf_vertical_4_neon(uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh); -#define vpx_lpf_vertical_4 vpx_lpf_vertical_4_neon - -void vpx_lpf_vertical_4_dual_c(uint8_t *s, int pitch, const uint8_t *blimit0, const uint8_t *limit0, const uint8_t *thresh0, const uint8_t *blimit1, const uint8_t *limit1, const uint8_t *thresh1); -void vpx_lpf_vertical_4_dual_neon(uint8_t *s, int pitch, const uint8_t *blimit0, const uint8_t *limit0, const uint8_t *thresh0, const uint8_t *blimit1, const uint8_t *limit1, const uint8_t *thresh1); -#define vpx_lpf_vertical_4_dual vpx_lpf_vertical_4_dual_neon - -void vpx_lpf_vertical_8_c(uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh); -void vpx_lpf_vertical_8_neon(uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh); -#define vpx_lpf_vertical_8 vpx_lpf_vertical_8_neon - -void vpx_lpf_vertical_8_dual_c(uint8_t *s, int pitch, const uint8_t *blimit0, const uint8_t *limit0, const uint8_t *thresh0, const uint8_t *blimit1, const uint8_t *limit1, const uint8_t *thresh1); -void vpx_lpf_vertical_8_dual_neon(uint8_t *s, int pitch, const uint8_t *blimit0, const uint8_t *limit0, const uint8_t *thresh0, const uint8_t *blimit1, const uint8_t *limit1, const uint8_t *thresh1); -#define vpx_lpf_vertical_8_dual vpx_lpf_vertical_8_dual_neon - -void vpx_mbpost_proc_across_ip_c(unsigned char *dst, int pitch, int rows, int cols,int flimit); -void vpx_mbpost_proc_across_ip_neon(unsigned char *dst, int pitch, int rows, int cols,int flimit); -#define vpx_mbpost_proc_across_ip vpx_mbpost_proc_across_ip_neon - -void vpx_mbpost_proc_down_c(unsigned char *dst, int pitch, int rows, int cols,int flimit); -void vpx_mbpost_proc_down_neon(unsigned char *dst, int pitch, int rows, int cols,int flimit); -#define vpx_mbpost_proc_down vpx_mbpost_proc_down_neon - -void vpx_minmax_8x8_c(const uint8_t *s, int p, const uint8_t *d, int dp, int *min, int *max); -void vpx_minmax_8x8_neon(const uint8_t *s, int p, const uint8_t *d, int dp, int *min, int *max); -#define vpx_minmax_8x8 vpx_minmax_8x8_neon - -unsigned int vpx_mse16x16_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int recon_stride, unsigned int *sse); -unsigned int vpx_mse16x16_neon(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int recon_stride, unsigned int *sse); -#define vpx_mse16x16 vpx_mse16x16_neon - -unsigned int vpx_mse16x8_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int recon_stride, unsigned int *sse); -#define vpx_mse16x8 vpx_mse16x8_c - -unsigned int vpx_mse8x16_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int recon_stride, unsigned int *sse); -#define vpx_mse8x16 vpx_mse8x16_c - -unsigned int vpx_mse8x8_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int recon_stride, unsigned int *sse); -#define vpx_mse8x8 vpx_mse8x8_c - -void vpx_plane_add_noise_c(uint8_t *start, const int8_t *noise, int blackclamp, int whiteclamp, int width, int height, int pitch); -#define vpx_plane_add_noise vpx_plane_add_noise_c - -void vpx_post_proc_down_and_across_mb_row_c(unsigned char *src, unsigned char *dst, int src_pitch, int dst_pitch, int cols, unsigned char *flimits, int size); -void vpx_post_proc_down_and_across_mb_row_neon(unsigned char *src, unsigned char *dst, int src_pitch, int dst_pitch, int cols, unsigned char *flimits, int size); -#define vpx_post_proc_down_and_across_mb_row vpx_post_proc_down_and_across_mb_row_neon - -void vpx_quantize_b_c(const tran_low_t *coeff_ptr, intptr_t n_coeffs, int skip_block, const int16_t *zbin_ptr, const int16_t *round_ptr, const int16_t *quant_ptr, const int16_t *quant_shift_ptr, tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr, const int16_t *dequant_ptr, uint16_t *eob_ptr, const int16_t *scan, const int16_t *iscan); -#define vpx_quantize_b vpx_quantize_b_c - -void vpx_quantize_b_32x32_c(const tran_low_t *coeff_ptr, intptr_t n_coeffs, int skip_block, const int16_t *zbin_ptr, const int16_t *round_ptr, const int16_t *quant_ptr, const int16_t *quant_shift_ptr, tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr, const int16_t *dequant_ptr, uint16_t *eob_ptr, const int16_t *scan, const int16_t *iscan); -#define vpx_quantize_b_32x32 vpx_quantize_b_32x32_c - -unsigned int vpx_sad16x16_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -unsigned int vpx_sad16x16_neon(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -#define vpx_sad16x16 vpx_sad16x16_neon - -unsigned int vpx_sad16x16_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -#define vpx_sad16x16_avg vpx_sad16x16_avg_c - -void vpx_sad16x16x3_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -#define vpx_sad16x16x3 vpx_sad16x16x3_c - -void vpx_sad16x16x4d_c(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); -void vpx_sad16x16x4d_neon(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); -#define vpx_sad16x16x4d vpx_sad16x16x4d_neon - -void vpx_sad16x16x8_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -#define vpx_sad16x16x8 vpx_sad16x16x8_c - -unsigned int vpx_sad16x32_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -#define vpx_sad16x32 vpx_sad16x32_c - -unsigned int vpx_sad16x32_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -#define vpx_sad16x32_avg vpx_sad16x32_avg_c - -void vpx_sad16x32x4d_c(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); -#define vpx_sad16x32x4d vpx_sad16x32x4d_c - -unsigned int vpx_sad16x8_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -unsigned int vpx_sad16x8_neon(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -#define vpx_sad16x8 vpx_sad16x8_neon - -unsigned int vpx_sad16x8_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -#define vpx_sad16x8_avg vpx_sad16x8_avg_c - -void vpx_sad16x8x3_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -#define vpx_sad16x8x3 vpx_sad16x8x3_c - -void vpx_sad16x8x4d_c(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); -#define vpx_sad16x8x4d vpx_sad16x8x4d_c - -void vpx_sad16x8x8_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -#define vpx_sad16x8x8 vpx_sad16x8x8_c - -unsigned int vpx_sad32x16_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -#define vpx_sad32x16 vpx_sad32x16_c - -unsigned int vpx_sad32x16_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -#define vpx_sad32x16_avg vpx_sad32x16_avg_c - -void vpx_sad32x16x4d_c(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); -#define vpx_sad32x16x4d vpx_sad32x16x4d_c - -unsigned int vpx_sad32x32_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -unsigned int vpx_sad32x32_neon(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -#define vpx_sad32x32 vpx_sad32x32_neon - -unsigned int vpx_sad32x32_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -#define vpx_sad32x32_avg vpx_sad32x32_avg_c - -void vpx_sad32x32x3_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -#define vpx_sad32x32x3 vpx_sad32x32x3_c - -void vpx_sad32x32x4d_c(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); -void vpx_sad32x32x4d_neon(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); -#define vpx_sad32x32x4d vpx_sad32x32x4d_neon - -void vpx_sad32x32x8_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -#define vpx_sad32x32x8 vpx_sad32x32x8_c - -unsigned int vpx_sad32x64_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -#define vpx_sad32x64 vpx_sad32x64_c - -unsigned int vpx_sad32x64_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -#define vpx_sad32x64_avg vpx_sad32x64_avg_c - -void vpx_sad32x64x4d_c(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); -#define vpx_sad32x64x4d vpx_sad32x64x4d_c - -unsigned int vpx_sad4x4_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -unsigned int vpx_sad4x4_neon(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -#define vpx_sad4x4 vpx_sad4x4_neon - -unsigned int vpx_sad4x4_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -#define vpx_sad4x4_avg vpx_sad4x4_avg_c - -void vpx_sad4x4x3_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -#define vpx_sad4x4x3 vpx_sad4x4x3_c - -void vpx_sad4x4x4d_c(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); -#define vpx_sad4x4x4d vpx_sad4x4x4d_c - -void vpx_sad4x4x8_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -#define vpx_sad4x4x8 vpx_sad4x4x8_c - -unsigned int vpx_sad4x8_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -#define vpx_sad4x8 vpx_sad4x8_c - -unsigned int vpx_sad4x8_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -#define vpx_sad4x8_avg vpx_sad4x8_avg_c - -void vpx_sad4x8x4d_c(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); -#define vpx_sad4x8x4d vpx_sad4x8x4d_c - -void vpx_sad4x8x8_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -#define vpx_sad4x8x8 vpx_sad4x8x8_c - -unsigned int vpx_sad64x32_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -#define vpx_sad64x32 vpx_sad64x32_c - -unsigned int vpx_sad64x32_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -#define vpx_sad64x32_avg vpx_sad64x32_avg_c - -void vpx_sad64x32x4d_c(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); -#define vpx_sad64x32x4d vpx_sad64x32x4d_c - -unsigned int vpx_sad64x64_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -unsigned int vpx_sad64x64_neon(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -#define vpx_sad64x64 vpx_sad64x64_neon - -unsigned int vpx_sad64x64_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -#define vpx_sad64x64_avg vpx_sad64x64_avg_c - -void vpx_sad64x64x3_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -#define vpx_sad64x64x3 vpx_sad64x64x3_c - -void vpx_sad64x64x4d_c(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); -void vpx_sad64x64x4d_neon(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); -#define vpx_sad64x64x4d vpx_sad64x64x4d_neon - -void vpx_sad64x64x8_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -#define vpx_sad64x64x8 vpx_sad64x64x8_c - -unsigned int vpx_sad8x16_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -unsigned int vpx_sad8x16_neon(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -#define vpx_sad8x16 vpx_sad8x16_neon - -unsigned int vpx_sad8x16_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -#define vpx_sad8x16_avg vpx_sad8x16_avg_c - -void vpx_sad8x16x3_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -#define vpx_sad8x16x3 vpx_sad8x16x3_c - -void vpx_sad8x16x4d_c(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); -#define vpx_sad8x16x4d vpx_sad8x16x4d_c - -void vpx_sad8x16x8_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -#define vpx_sad8x16x8 vpx_sad8x16x8_c - -unsigned int vpx_sad8x4_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -#define vpx_sad8x4 vpx_sad8x4_c - -unsigned int vpx_sad8x4_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -#define vpx_sad8x4_avg vpx_sad8x4_avg_c - -void vpx_sad8x4x4d_c(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); -#define vpx_sad8x4x4d vpx_sad8x4x4d_c - -void vpx_sad8x4x8_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -#define vpx_sad8x4x8 vpx_sad8x4x8_c - -unsigned int vpx_sad8x8_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -unsigned int vpx_sad8x8_neon(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -#define vpx_sad8x8 vpx_sad8x8_neon - -unsigned int vpx_sad8x8_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -#define vpx_sad8x8_avg vpx_sad8x8_avg_c - -void vpx_sad8x8x3_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -#define vpx_sad8x8x3 vpx_sad8x8x3_c - -void vpx_sad8x8x4d_c(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); -#define vpx_sad8x8x4d vpx_sad8x8x4d_c - -void vpx_sad8x8x8_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -#define vpx_sad8x8x8 vpx_sad8x8x8_c - -int vpx_satd_c(const int16_t *coeff, int length); -int vpx_satd_neon(const int16_t *coeff, int length); -#define vpx_satd vpx_satd_neon - -void vpx_scaled_2d_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -#define vpx_scaled_2d vpx_scaled_2d_c - -void vpx_scaled_avg_2d_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -#define vpx_scaled_avg_2d vpx_scaled_avg_2d_c - -void vpx_scaled_avg_horiz_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -#define vpx_scaled_avg_horiz vpx_scaled_avg_horiz_c - -void vpx_scaled_avg_vert_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -#define vpx_scaled_avg_vert vpx_scaled_avg_vert_c - -void vpx_scaled_horiz_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -#define vpx_scaled_horiz vpx_scaled_horiz_c - -void vpx_scaled_vert_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -#define vpx_scaled_vert vpx_scaled_vert_c - -uint32_t vpx_sub_pixel_avg_variance16x16_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_sub_pixel_avg_variance16x16 vpx_sub_pixel_avg_variance16x16_c - -uint32_t vpx_sub_pixel_avg_variance16x32_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_sub_pixel_avg_variance16x32 vpx_sub_pixel_avg_variance16x32_c - -uint32_t vpx_sub_pixel_avg_variance16x8_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_sub_pixel_avg_variance16x8 vpx_sub_pixel_avg_variance16x8_c - -uint32_t vpx_sub_pixel_avg_variance32x16_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_sub_pixel_avg_variance32x16 vpx_sub_pixel_avg_variance32x16_c - -uint32_t vpx_sub_pixel_avg_variance32x32_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_sub_pixel_avg_variance32x32 vpx_sub_pixel_avg_variance32x32_c - -uint32_t vpx_sub_pixel_avg_variance32x64_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_sub_pixel_avg_variance32x64 vpx_sub_pixel_avg_variance32x64_c - -uint32_t vpx_sub_pixel_avg_variance4x4_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_sub_pixel_avg_variance4x4 vpx_sub_pixel_avg_variance4x4_c - -uint32_t vpx_sub_pixel_avg_variance4x8_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_sub_pixel_avg_variance4x8 vpx_sub_pixel_avg_variance4x8_c - -uint32_t vpx_sub_pixel_avg_variance64x32_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_sub_pixel_avg_variance64x32 vpx_sub_pixel_avg_variance64x32_c - -uint32_t vpx_sub_pixel_avg_variance64x64_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_sub_pixel_avg_variance64x64 vpx_sub_pixel_avg_variance64x64_c - -uint32_t vpx_sub_pixel_avg_variance8x16_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_sub_pixel_avg_variance8x16 vpx_sub_pixel_avg_variance8x16_c - -uint32_t vpx_sub_pixel_avg_variance8x4_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_sub_pixel_avg_variance8x4 vpx_sub_pixel_avg_variance8x4_c - -uint32_t vpx_sub_pixel_avg_variance8x8_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_sub_pixel_avg_variance8x8 vpx_sub_pixel_avg_variance8x8_c - -uint32_t vpx_sub_pixel_variance16x16_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_sub_pixel_variance16x16_neon(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -#define vpx_sub_pixel_variance16x16 vpx_sub_pixel_variance16x16_neon - -uint32_t vpx_sub_pixel_variance16x32_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -#define vpx_sub_pixel_variance16x32 vpx_sub_pixel_variance16x32_c - -uint32_t vpx_sub_pixel_variance16x8_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -#define vpx_sub_pixel_variance16x8 vpx_sub_pixel_variance16x8_c - -uint32_t vpx_sub_pixel_variance32x16_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -#define vpx_sub_pixel_variance32x16 vpx_sub_pixel_variance32x16_c - -uint32_t vpx_sub_pixel_variance32x32_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_sub_pixel_variance32x32_neon(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -#define vpx_sub_pixel_variance32x32 vpx_sub_pixel_variance32x32_neon - -uint32_t vpx_sub_pixel_variance32x64_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -#define vpx_sub_pixel_variance32x64 vpx_sub_pixel_variance32x64_c - -uint32_t vpx_sub_pixel_variance4x4_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -#define vpx_sub_pixel_variance4x4 vpx_sub_pixel_variance4x4_c - -uint32_t vpx_sub_pixel_variance4x8_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -#define vpx_sub_pixel_variance4x8 vpx_sub_pixel_variance4x8_c - -uint32_t vpx_sub_pixel_variance64x32_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -#define vpx_sub_pixel_variance64x32 vpx_sub_pixel_variance64x32_c - -uint32_t vpx_sub_pixel_variance64x64_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_sub_pixel_variance64x64_neon(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -#define vpx_sub_pixel_variance64x64 vpx_sub_pixel_variance64x64_neon - -uint32_t vpx_sub_pixel_variance8x16_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -#define vpx_sub_pixel_variance8x16 vpx_sub_pixel_variance8x16_c - -uint32_t vpx_sub_pixel_variance8x4_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -#define vpx_sub_pixel_variance8x4 vpx_sub_pixel_variance8x4_c - -uint32_t vpx_sub_pixel_variance8x8_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_sub_pixel_variance8x8_neon(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -#define vpx_sub_pixel_variance8x8 vpx_sub_pixel_variance8x8_neon - -void vpx_subtract_block_c(int rows, int cols, int16_t *diff_ptr, ptrdiff_t diff_stride, const uint8_t *src_ptr, ptrdiff_t src_stride, const uint8_t *pred_ptr, ptrdiff_t pred_stride); -void vpx_subtract_block_neon(int rows, int cols, int16_t *diff_ptr, ptrdiff_t diff_stride, const uint8_t *src_ptr, ptrdiff_t src_stride, const uint8_t *pred_ptr, ptrdiff_t pred_stride); -#define vpx_subtract_block vpx_subtract_block_neon - -uint64_t vpx_sum_squares_2d_i16_c(const int16_t *src, int stride, int size); -#define vpx_sum_squares_2d_i16 vpx_sum_squares_2d_i16_c - -void vpx_tm_predictor_16x16_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_tm_predictor_16x16_neon(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_tm_predictor_16x16 vpx_tm_predictor_16x16_neon - -void vpx_tm_predictor_32x32_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_tm_predictor_32x32_neon(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_tm_predictor_32x32 vpx_tm_predictor_32x32_neon - -void vpx_tm_predictor_4x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_tm_predictor_4x4_neon(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_tm_predictor_4x4 vpx_tm_predictor_4x4_neon - -void vpx_tm_predictor_8x8_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_tm_predictor_8x8_neon(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_tm_predictor_8x8 vpx_tm_predictor_8x8_neon - -void vpx_v_predictor_16x16_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_v_predictor_16x16_neon(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_v_predictor_16x16 vpx_v_predictor_16x16_neon - -void vpx_v_predictor_32x32_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_v_predictor_32x32_neon(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_v_predictor_32x32 vpx_v_predictor_32x32_neon - -void vpx_v_predictor_4x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_v_predictor_4x4_neon(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_v_predictor_4x4 vpx_v_predictor_4x4_neon - -void vpx_v_predictor_8x8_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_v_predictor_8x8_neon(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_v_predictor_8x8 vpx_v_predictor_8x8_neon - -unsigned int vpx_variance16x16_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -unsigned int vpx_variance16x16_neon(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_variance16x16 vpx_variance16x16_neon - -unsigned int vpx_variance16x32_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_variance16x32 vpx_variance16x32_c - -unsigned int vpx_variance16x8_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -unsigned int vpx_variance16x8_neon(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_variance16x8 vpx_variance16x8_neon - -unsigned int vpx_variance32x16_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_variance32x16 vpx_variance32x16_c - -unsigned int vpx_variance32x32_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -unsigned int vpx_variance32x32_neon(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_variance32x32 vpx_variance32x32_neon - -unsigned int vpx_variance32x64_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -unsigned int vpx_variance32x64_neon(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_variance32x64 vpx_variance32x64_neon - -unsigned int vpx_variance4x4_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_variance4x4 vpx_variance4x4_c - -unsigned int vpx_variance4x8_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_variance4x8 vpx_variance4x8_c - -unsigned int vpx_variance64x32_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -unsigned int vpx_variance64x32_neon(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_variance64x32 vpx_variance64x32_neon - -unsigned int vpx_variance64x64_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -unsigned int vpx_variance64x64_neon(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_variance64x64 vpx_variance64x64_neon - -unsigned int vpx_variance8x16_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -unsigned int vpx_variance8x16_neon(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_variance8x16 vpx_variance8x16_neon - -unsigned int vpx_variance8x4_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_variance8x4 vpx_variance8x4_c - -unsigned int vpx_variance8x8_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -unsigned int vpx_variance8x8_neon(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_variance8x8 vpx_variance8x8_neon - -void vpx_ve_predictor_4x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_ve_predictor_4x4 vpx_ve_predictor_4x4_c - -int vpx_vector_var_c(const int16_t *ref, const int16_t *src, const int bwl); -int vpx_vector_var_neon(const int16_t *ref, const int16_t *src, const int bwl); -#define vpx_vector_var vpx_vector_var_neon - -void vpx_dsp_rtcd(void); - -#include "vpx_config.h" - -#ifdef RTCD_C -#include "vpx_ports/arm.h" -static void setup_rtcd_internal(void) -{ - int flags = arm_cpu_caps(); - - (void)flags; - -} -#endif - -#ifdef __cplusplus -} // extern "C" -#endif - -#endif diff --git a/WebRtc.NET/include/third_party/libvpx/source/config/linux/arm64/vpx_scale_rtcd.h b/WebRtc.NET/include/third_party/libvpx/source/config/linux/arm64/vpx_scale_rtcd.h deleted file mode 100644 index a1564b7a..00000000 --- a/WebRtc.NET/include/third_party/libvpx/source/config/linux/arm64/vpx_scale_rtcd.h +++ /dev/null @@ -1,71 +0,0 @@ -#ifndef VPX_SCALE_RTCD_H_ -#define VPX_SCALE_RTCD_H_ - -#ifdef RTCD_C -#define RTCD_EXTERN -#else -#define RTCD_EXTERN extern -#endif - -struct yv12_buffer_config; - -#ifdef __cplusplus -extern "C" { -#endif - -void vp8_horizontal_line_2_1_scale_c(const unsigned char *source, unsigned int source_width, unsigned char *dest, unsigned int dest_width); -#define vp8_horizontal_line_2_1_scale vp8_horizontal_line_2_1_scale_c - -void vp8_horizontal_line_5_3_scale_c(const unsigned char *source, unsigned int source_width, unsigned char *dest, unsigned int dest_width); -#define vp8_horizontal_line_5_3_scale vp8_horizontal_line_5_3_scale_c - -void vp8_horizontal_line_5_4_scale_c(const unsigned char *source, unsigned int source_width, unsigned char *dest, unsigned int dest_width); -#define vp8_horizontal_line_5_4_scale vp8_horizontal_line_5_4_scale_c - -void vp8_vertical_band_2_1_scale_c(unsigned char *source, unsigned int src_pitch, unsigned char *dest, unsigned int dest_pitch, unsigned int dest_width); -#define vp8_vertical_band_2_1_scale vp8_vertical_band_2_1_scale_c - -void vp8_vertical_band_2_1_scale_i_c(unsigned char *source, unsigned int src_pitch, unsigned char *dest, unsigned int dest_pitch, unsigned int dest_width); -#define vp8_vertical_band_2_1_scale_i vp8_vertical_band_2_1_scale_i_c - -void vp8_vertical_band_5_3_scale_c(unsigned char *source, unsigned int src_pitch, unsigned char *dest, unsigned int dest_pitch, unsigned int dest_width); -#define vp8_vertical_band_5_3_scale vp8_vertical_band_5_3_scale_c - -void vp8_vertical_band_5_4_scale_c(unsigned char *source, unsigned int src_pitch, unsigned char *dest, unsigned int dest_pitch, unsigned int dest_width); -#define vp8_vertical_band_5_4_scale vp8_vertical_band_5_4_scale_c - -void vp8_yv12_copy_frame_c(const struct yv12_buffer_config *src_ybc, struct yv12_buffer_config *dst_ybc); -#define vp8_yv12_copy_frame vp8_yv12_copy_frame_c - -void vp8_yv12_extend_frame_borders_c(struct yv12_buffer_config *ybf); -#define vp8_yv12_extend_frame_borders vp8_yv12_extend_frame_borders_c - -void vpx_extend_frame_borders_c(struct yv12_buffer_config *ybf); -#define vpx_extend_frame_borders vpx_extend_frame_borders_c - -void vpx_extend_frame_inner_borders_c(struct yv12_buffer_config *ybf); -#define vpx_extend_frame_inner_borders vpx_extend_frame_inner_borders_c - -void vpx_yv12_copy_y_c(const struct yv12_buffer_config *src_ybc, struct yv12_buffer_config *dst_ybc); -#define vpx_yv12_copy_y vpx_yv12_copy_y_c - -void vpx_scale_rtcd(void); - -#include "vpx_config.h" - -#ifdef RTCD_C -#include "vpx_ports/arm.h" -static void setup_rtcd_internal(void) -{ - int flags = arm_cpu_caps(); - - (void)flags; - -} -#endif - -#ifdef __cplusplus -} // extern "C" -#endif - -#endif diff --git a/WebRtc.NET/include/third_party/libvpx/source/config/linux/generic/vp8_rtcd.h b/WebRtc.NET/include/third_party/libvpx/source/config/linux/generic/vp8_rtcd.h deleted file mode 100644 index 650bd323..00000000 --- a/WebRtc.NET/include/third_party/libvpx/source/config/linux/generic/vp8_rtcd.h +++ /dev/null @@ -1,181 +0,0 @@ -#ifndef VP8_RTCD_H_ -#define VP8_RTCD_H_ - -#ifdef RTCD_C -#define RTCD_EXTERN -#else -#define RTCD_EXTERN extern -#endif - -/* - * VP8 - */ - -struct blockd; -struct macroblockd; -struct loop_filter_info; - -/* Encoder forward decls */ -struct block; -struct macroblock; -struct variance_vtable; -union int_mv; -struct yv12_buffer_config; - -#ifdef __cplusplus -extern "C" { -#endif - -void vp8_bilinear_predict16x16_c(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch); -#define vp8_bilinear_predict16x16 vp8_bilinear_predict16x16_c - -void vp8_bilinear_predict4x4_c(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch); -#define vp8_bilinear_predict4x4 vp8_bilinear_predict4x4_c - -void vp8_bilinear_predict8x4_c(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch); -#define vp8_bilinear_predict8x4 vp8_bilinear_predict8x4_c - -void vp8_bilinear_predict8x8_c(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch); -#define vp8_bilinear_predict8x8 vp8_bilinear_predict8x8_c - -void vp8_blend_b_c(unsigned char *y, unsigned char *u, unsigned char *v, int y1, int u1, int v1, int alpha, int stride); -#define vp8_blend_b vp8_blend_b_c - -void vp8_blend_mb_inner_c(unsigned char *y, unsigned char *u, unsigned char *v, int y1, int u1, int v1, int alpha, int stride); -#define vp8_blend_mb_inner vp8_blend_mb_inner_c - -void vp8_blend_mb_outer_c(unsigned char *y, unsigned char *u, unsigned char *v, int y1, int u1, int v1, int alpha, int stride); -#define vp8_blend_mb_outer vp8_blend_mb_outer_c - -int vp8_block_error_c(short *coeff, short *dqcoeff); -#define vp8_block_error vp8_block_error_c - -void vp8_copy_mem16x16_c(unsigned char *src, int src_pitch, unsigned char *dst, int dst_pitch); -#define vp8_copy_mem16x16 vp8_copy_mem16x16_c - -void vp8_copy_mem8x4_c(unsigned char *src, int src_pitch, unsigned char *dst, int dst_pitch); -#define vp8_copy_mem8x4 vp8_copy_mem8x4_c - -void vp8_copy_mem8x8_c(unsigned char *src, int src_pitch, unsigned char *dst, int dst_pitch); -#define vp8_copy_mem8x8 vp8_copy_mem8x8_c - -void vp8_dc_only_idct_add_c(short input, unsigned char *pred, int pred_stride, unsigned char *dst, int dst_stride); -#define vp8_dc_only_idct_add vp8_dc_only_idct_add_c - -int vp8_denoiser_filter_c(unsigned char *mc_running_avg_y, int mc_avg_y_stride, unsigned char *running_avg_y, int avg_y_stride, unsigned char *sig, int sig_stride, unsigned int motion_magnitude, int increase_denoising); -#define vp8_denoiser_filter vp8_denoiser_filter_c - -int vp8_denoiser_filter_uv_c(unsigned char *mc_running_avg, int mc_avg_stride, unsigned char *running_avg, int avg_stride, unsigned char *sig, int sig_stride, unsigned int motion_magnitude, int increase_denoising); -#define vp8_denoiser_filter_uv vp8_denoiser_filter_uv_c - -void vp8_dequant_idct_add_c(short *input, short *dq, unsigned char *output, int stride); -#define vp8_dequant_idct_add vp8_dequant_idct_add_c - -void vp8_dequant_idct_add_uv_block_c(short *q, short *dq, unsigned char *dst_u, unsigned char *dst_v, int stride, char *eobs); -#define vp8_dequant_idct_add_uv_block vp8_dequant_idct_add_uv_block_c - -void vp8_dequant_idct_add_y_block_c(short *q, short *dq, unsigned char *dst, int stride, char *eobs); -#define vp8_dequant_idct_add_y_block vp8_dequant_idct_add_y_block_c - -void vp8_dequantize_b_c(struct blockd*, short *dqc); -#define vp8_dequantize_b vp8_dequantize_b_c - -int vp8_diamond_search_sad_c(struct macroblock *x, struct block *b, struct blockd *d, union int_mv *ref_mv, union int_mv *best_mv, int search_param, int sad_per_bit, int *num00, struct variance_vtable *fn_ptr, int *mvcost[2], union int_mv *center_mv); -#define vp8_diamond_search_sad vp8_diamond_search_sad_c - -void vp8_fast_quantize_b_c(struct block *, struct blockd *); -#define vp8_fast_quantize_b vp8_fast_quantize_b_c - -void vp8_filter_by_weight16x16_c(unsigned char *src, int src_stride, unsigned char *dst, int dst_stride, int src_weight); -#define vp8_filter_by_weight16x16 vp8_filter_by_weight16x16_c - -void vp8_filter_by_weight4x4_c(unsigned char *src, int src_stride, unsigned char *dst, int dst_stride, int src_weight); -#define vp8_filter_by_weight4x4 vp8_filter_by_weight4x4_c - -void vp8_filter_by_weight8x8_c(unsigned char *src, int src_stride, unsigned char *dst, int dst_stride, int src_weight); -#define vp8_filter_by_weight8x8 vp8_filter_by_weight8x8_c - -int vp8_full_search_sad_c(struct macroblock *x, struct block *b, struct blockd *d, union int_mv *ref_mv, int sad_per_bit, int distance, struct variance_vtable *fn_ptr, int *mvcost[2], union int_mv *center_mv); -#define vp8_full_search_sad vp8_full_search_sad_c - -void vp8_loop_filter_bh_c(unsigned char *y, unsigned char *u, unsigned char *v, int ystride, int uv_stride, struct loop_filter_info *lfi); -#define vp8_loop_filter_bh vp8_loop_filter_bh_c - -void vp8_loop_filter_bv_c(unsigned char *y, unsigned char *u, unsigned char *v, int ystride, int uv_stride, struct loop_filter_info *lfi); -#define vp8_loop_filter_bv vp8_loop_filter_bv_c - -void vp8_loop_filter_mbh_c(unsigned char *y, unsigned char *u, unsigned char *v, int ystride, int uv_stride, struct loop_filter_info *lfi); -#define vp8_loop_filter_mbh vp8_loop_filter_mbh_c - -void vp8_loop_filter_mbv_c(unsigned char *y, unsigned char *u, unsigned char *v, int ystride, int uv_stride, struct loop_filter_info *lfi); -#define vp8_loop_filter_mbv vp8_loop_filter_mbv_c - -void vp8_loop_filter_bhs_c(unsigned char *y, int ystride, const unsigned char *blimit); -#define vp8_loop_filter_simple_bh vp8_loop_filter_bhs_c - -void vp8_loop_filter_bvs_c(unsigned char *y, int ystride, const unsigned char *blimit); -#define vp8_loop_filter_simple_bv vp8_loop_filter_bvs_c - -void vp8_loop_filter_simple_horizontal_edge_c(unsigned char *y, int ystride, const unsigned char *blimit); -#define vp8_loop_filter_simple_mbh vp8_loop_filter_simple_horizontal_edge_c - -void vp8_loop_filter_simple_vertical_edge_c(unsigned char *y, int ystride, const unsigned char *blimit); -#define vp8_loop_filter_simple_mbv vp8_loop_filter_simple_vertical_edge_c - -int vp8_mbblock_error_c(struct macroblock *mb, int dc); -#define vp8_mbblock_error vp8_mbblock_error_c - -int vp8_mbuverror_c(struct macroblock *mb); -#define vp8_mbuverror vp8_mbuverror_c - -int vp8_refining_search_sad_c(struct macroblock *x, struct block *b, struct blockd *d, union int_mv *ref_mv, int sad_per_bit, int distance, struct variance_vtable *fn_ptr, int *mvcost[2], union int_mv *center_mv); -#define vp8_refining_search_sad vp8_refining_search_sad_c - -void vp8_regular_quantize_b_c(struct block *, struct blockd *); -#define vp8_regular_quantize_b vp8_regular_quantize_b_c - -void vp8_short_fdct4x4_c(short *input, short *output, int pitch); -#define vp8_short_fdct4x4 vp8_short_fdct4x4_c - -void vp8_short_fdct8x4_c(short *input, short *output, int pitch); -#define vp8_short_fdct8x4 vp8_short_fdct8x4_c - -void vp8_short_idct4x4llm_c(short *input, unsigned char *pred, int pitch, unsigned char *dst, int dst_stride); -#define vp8_short_idct4x4llm vp8_short_idct4x4llm_c - -void vp8_short_inv_walsh4x4_c(short *input, short *output); -#define vp8_short_inv_walsh4x4 vp8_short_inv_walsh4x4_c - -void vp8_short_inv_walsh4x4_1_c(short *input, short *output); -#define vp8_short_inv_walsh4x4_1 vp8_short_inv_walsh4x4_1_c - -void vp8_short_walsh4x4_c(short *input, short *output, int pitch); -#define vp8_short_walsh4x4 vp8_short_walsh4x4_c - -void vp8_sixtap_predict16x16_c(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch); -#define vp8_sixtap_predict16x16 vp8_sixtap_predict16x16_c - -void vp8_sixtap_predict4x4_c(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch); -#define vp8_sixtap_predict4x4 vp8_sixtap_predict4x4_c - -void vp8_sixtap_predict8x4_c(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch); -#define vp8_sixtap_predict8x4 vp8_sixtap_predict8x4_c - -void vp8_sixtap_predict8x8_c(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch); -#define vp8_sixtap_predict8x8 vp8_sixtap_predict8x8_c - -void vp8_rtcd(void); - -#include "vpx_config.h" - -#ifdef RTCD_C -static void setup_rtcd_internal(void) -{ -} -#endif - -#ifdef __cplusplus -} // extern "C" -#endif - -#endif diff --git a/WebRtc.NET/include/third_party/libvpx/source/config/linux/generic/vp9_rtcd.h b/WebRtc.NET/include/third_party/libvpx/source/config/linux/generic/vp9_rtcd.h deleted file mode 100644 index 8251c1b5..00000000 --- a/WebRtc.NET/include/third_party/libvpx/source/config/linux/generic/vp9_rtcd.h +++ /dev/null @@ -1,142 +0,0 @@ -#ifndef VP9_RTCD_H_ -#define VP9_RTCD_H_ - -#ifdef RTCD_C -#define RTCD_EXTERN -#else -#define RTCD_EXTERN extern -#endif - -/* - * VP9 - */ - -#include "vpx/vpx_integer.h" -#include "vp9/common/vp9_common.h" -#include "vp9/common/vp9_enums.h" - -struct macroblockd; - -/* Encoder forward decls */ -struct macroblock; -struct vp9_variance_vtable; -struct search_site_config; -struct mv; -union int_mv; -struct yv12_buffer_config; - -#ifdef __cplusplus -extern "C" { -#endif - -int64_t vp9_block_error_c(const tran_low_t *coeff, const tran_low_t *dqcoeff, intptr_t block_size, int64_t *ssz); -#define vp9_block_error vp9_block_error_c - -int vp9_denoiser_filter_c(const uint8_t *sig, int sig_stride, const uint8_t *mc_avg, int mc_avg_stride, uint8_t *avg, int avg_stride, int increase_denoising, BLOCK_SIZE bs, int motion_magnitude); -#define vp9_denoiser_filter vp9_denoiser_filter_c - -int vp9_diamond_search_sad_c(const struct macroblock *x, const struct search_site_config *cfg, struct mv *ref_mv, struct mv *best_mv, int search_param, int sad_per_bit, int *num00, const struct vp9_variance_vtable *fn_ptr, const struct mv *center_mv); -#define vp9_diamond_search_sad vp9_diamond_search_sad_c - -void vp9_fdct8x8_quant_c(const int16_t *input, int stride, tran_low_t *coeff_ptr, intptr_t n_coeffs, int skip_block, const int16_t *zbin_ptr, const int16_t *round_ptr, const int16_t *quant_ptr, const int16_t *quant_shift_ptr, tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr, const int16_t *dequant_ptr, uint16_t *eob_ptr, const int16_t *scan, const int16_t *iscan); -#define vp9_fdct8x8_quant vp9_fdct8x8_quant_c - -void vp9_fht16x16_c(const int16_t *input, tran_low_t *output, int stride, int tx_type); -#define vp9_fht16x16 vp9_fht16x16_c - -void vp9_fht4x4_c(const int16_t *input, tran_low_t *output, int stride, int tx_type); -#define vp9_fht4x4 vp9_fht4x4_c - -void vp9_fht8x8_c(const int16_t *input, tran_low_t *output, int stride, int tx_type); -#define vp9_fht8x8 vp9_fht8x8_c - -void vp9_filter_by_weight16x16_c(const uint8_t *src, int src_stride, uint8_t *dst, int dst_stride, int src_weight); -#define vp9_filter_by_weight16x16 vp9_filter_by_weight16x16_c - -void vp9_filter_by_weight8x8_c(const uint8_t *src, int src_stride, uint8_t *dst, int dst_stride, int src_weight); -#define vp9_filter_by_weight8x8 vp9_filter_by_weight8x8_c - -int vp9_full_search_sad_c(const struct macroblock *x, const struct mv *ref_mv, int sad_per_bit, int distance, const struct vp9_variance_vtable *fn_ptr, const struct mv *center_mv, struct mv *best_mv); -#define vp9_full_search_sad vp9_full_search_sad_c - -void vp9_fwht4x4_c(const int16_t *input, tran_low_t *output, int stride); -#define vp9_fwht4x4 vp9_fwht4x4_c - -int64_t vp9_highbd_block_error_c(const tran_low_t *coeff, const tran_low_t *dqcoeff, intptr_t block_size, int64_t *ssz, int bd); -#define vp9_highbd_block_error vp9_highbd_block_error_c - -int64_t vp9_highbd_block_error_8bit_c(const tran_low_t *coeff, const tran_low_t *dqcoeff, intptr_t block_size, int64_t *ssz); -#define vp9_highbd_block_error_8bit vp9_highbd_block_error_8bit_c - -void vp9_highbd_fht16x16_c(const int16_t *input, tran_low_t *output, int stride, int tx_type); -#define vp9_highbd_fht16x16 vp9_highbd_fht16x16_c - -void vp9_highbd_fht4x4_c(const int16_t *input, tran_low_t *output, int stride, int tx_type); -#define vp9_highbd_fht4x4 vp9_highbd_fht4x4_c - -void vp9_highbd_fht8x8_c(const int16_t *input, tran_low_t *output, int stride, int tx_type); -#define vp9_highbd_fht8x8 vp9_highbd_fht8x8_c - -void vp9_highbd_fwht4x4_c(const int16_t *input, tran_low_t *output, int stride); -#define vp9_highbd_fwht4x4 vp9_highbd_fwht4x4_c - -void vp9_highbd_iht16x16_256_add_c(const tran_low_t *input, uint8_t *output, int pitch, int tx_type, int bd); -#define vp9_highbd_iht16x16_256_add vp9_highbd_iht16x16_256_add_c - -void vp9_highbd_iht4x4_16_add_c(const tran_low_t *input, uint8_t *dest, int stride, int tx_type, int bd); -#define vp9_highbd_iht4x4_16_add vp9_highbd_iht4x4_16_add_c - -void vp9_highbd_iht8x8_64_add_c(const tran_low_t *input, uint8_t *dest, int stride, int tx_type, int bd); -#define vp9_highbd_iht8x8_64_add vp9_highbd_iht8x8_64_add_c - -void vp9_highbd_mbpost_proc_across_ip_c(uint16_t *src, int pitch, int rows, int cols, int flimit); -#define vp9_highbd_mbpost_proc_across_ip vp9_highbd_mbpost_proc_across_ip_c - -void vp9_highbd_mbpost_proc_down_c(uint16_t *dst, int pitch, int rows, int cols, int flimit); -#define vp9_highbd_mbpost_proc_down vp9_highbd_mbpost_proc_down_c - -void vp9_highbd_post_proc_down_and_across_c(const uint16_t *src_ptr, uint16_t *dst_ptr, int src_pixels_per_line, int dst_pixels_per_line, int rows, int cols, int flimit); -#define vp9_highbd_post_proc_down_and_across vp9_highbd_post_proc_down_and_across_c - -void vp9_highbd_quantize_fp_c(const tran_low_t *coeff_ptr, intptr_t n_coeffs, int skip_block, const int16_t *zbin_ptr, const int16_t *round_ptr, const int16_t *quant_ptr, const int16_t *quant_shift_ptr, tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr, const int16_t *dequant_ptr, uint16_t *eob_ptr, const int16_t *scan, const int16_t *iscan); -#define vp9_highbd_quantize_fp vp9_highbd_quantize_fp_c - -void vp9_highbd_quantize_fp_32x32_c(const tran_low_t *coeff_ptr, intptr_t n_coeffs, int skip_block, const int16_t *zbin_ptr, const int16_t *round_ptr, const int16_t *quant_ptr, const int16_t *quant_shift_ptr, tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr, const int16_t *dequant_ptr, uint16_t *eob_ptr, const int16_t *scan, const int16_t *iscan); -#define vp9_highbd_quantize_fp_32x32 vp9_highbd_quantize_fp_32x32_c - -void vp9_highbd_temporal_filter_apply_c(uint8_t *frame1, unsigned int stride, uint8_t *frame2, unsigned int block_width, unsigned int block_height, int strength, int filter_weight, unsigned int *accumulator, uint16_t *count); -#define vp9_highbd_temporal_filter_apply vp9_highbd_temporal_filter_apply_c - -void vp9_iht16x16_256_add_c(const tran_low_t *input, uint8_t *output, int pitch, int tx_type); -#define vp9_iht16x16_256_add vp9_iht16x16_256_add_c - -void vp9_iht4x4_16_add_c(const tran_low_t *input, uint8_t *dest, int stride, int tx_type); -#define vp9_iht4x4_16_add vp9_iht4x4_16_add_c - -void vp9_iht8x8_64_add_c(const tran_low_t *input, uint8_t *dest, int stride, int tx_type); -#define vp9_iht8x8_64_add vp9_iht8x8_64_add_c - -void vp9_quantize_fp_c(const tran_low_t *coeff_ptr, intptr_t n_coeffs, int skip_block, const int16_t *zbin_ptr, const int16_t *round_ptr, const int16_t *quant_ptr, const int16_t *quant_shift_ptr, tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr, const int16_t *dequant_ptr, uint16_t *eob_ptr, const int16_t *scan, const int16_t *iscan); -#define vp9_quantize_fp vp9_quantize_fp_c - -void vp9_quantize_fp_32x32_c(const tran_low_t *coeff_ptr, intptr_t n_coeffs, int skip_block, const int16_t *zbin_ptr, const int16_t *round_ptr, const int16_t *quant_ptr, const int16_t *quant_shift_ptr, tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr, const int16_t *dequant_ptr, uint16_t *eob_ptr, const int16_t *scan, const int16_t *iscan); -#define vp9_quantize_fp_32x32 vp9_quantize_fp_32x32_c - -void vp9_temporal_filter_apply_c(uint8_t *frame1, unsigned int stride, uint8_t *frame2, unsigned int block_width, unsigned int block_height, int strength, int filter_weight, unsigned int *accumulator, uint16_t *count); -#define vp9_temporal_filter_apply vp9_temporal_filter_apply_c - -void vp9_rtcd(void); - -#include "vpx_config.h" - -#ifdef RTCD_C -static void setup_rtcd_internal(void) -{ -} -#endif - -#ifdef __cplusplus -} // extern "C" -#endif - -#endif diff --git a/WebRtc.NET/include/third_party/libvpx/source/config/linux/generic/vpx_config.h b/WebRtc.NET/include/third_party/libvpx/source/config/linux/generic/vpx_config.h deleted file mode 100644 index 9d832817..00000000 --- a/WebRtc.NET/include/third_party/libvpx/source/config/linux/generic/vpx_config.h +++ /dev/null @@ -1,94 +0,0 @@ -/* Copyright (c) 2011 The WebM project authors. All Rights Reserved. */ -/* */ -/* Use of this source code is governed by a BSD-style license */ -/* that can be found in the LICENSE file in the root of the source */ -/* tree. An additional intellectual property rights grant can be found */ -/* in the file PATENTS. All contributing project authors may */ -/* be found in the AUTHORS file in the root of the source tree. */ -/* This file automatically generated by configure. Do not edit! */ -#ifndef VPX_CONFIG_H -#define VPX_CONFIG_H -#define RESTRICT -#define INLINE inline -#define ARCH_ARM 0 -#define ARCH_MIPS 0 -#define ARCH_X86 0 -#define ARCH_X86_64 0 -#define HAVE_NEON 0 -#define HAVE_NEON_ASM 0 -#define HAVE_MIPS32 0 -#define HAVE_DSPR2 0 -#define HAVE_MSA 0 -#define HAVE_MIPS64 0 -#define HAVE_MMX 0 -#define HAVE_SSE 0 -#define HAVE_SSE2 0 -#define HAVE_SSE3 0 -#define HAVE_SSSE3 0 -#define HAVE_SSE4_1 0 -#define HAVE_AVX 0 -#define HAVE_AVX2 0 -#define HAVE_VPX_PORTS 1 -#define HAVE_PTHREAD_H 1 -#define HAVE_UNISTD_H 0 -#define CONFIG_DEPENDENCY_TRACKING 1 -#define CONFIG_EXTERNAL_BUILD 1 -#define CONFIG_INSTALL_DOCS 0 -#define CONFIG_INSTALL_BINS 1 -#define CONFIG_INSTALL_LIBS 1 -#define CONFIG_INSTALL_SRCS 0 -#define CONFIG_DEBUG 0 -#define CONFIG_GPROF 0 -#define CONFIG_GCOV 0 -#define CONFIG_RVCT 0 -#define CONFIG_GCC 1 -#define CONFIG_MSVS 0 -#define CONFIG_PIC 0 -#define CONFIG_BIG_ENDIAN 0 -#define CONFIG_CODEC_SRCS 0 -#define CONFIG_DEBUG_LIBS 0 -#define CONFIG_DEQUANT_TOKENS 0 -#define CONFIG_DC_RECON 0 -#define CONFIG_RUNTIME_CPU_DETECT 0 -#define CONFIG_POSTPROC 1 -#define CONFIG_VP9_POSTPROC 1 -#define CONFIG_MULTITHREAD 1 -#define CONFIG_INTERNAL_STATS 0 -#define CONFIG_VP8_ENCODER 1 -#define CONFIG_VP8_DECODER 1 -#define CONFIG_VP9_ENCODER 1 -#define CONFIG_VP9_DECODER 1 -#define CONFIG_VP8 1 -#define CONFIG_VP9 1 -#define CONFIG_ENCODERS 1 -#define CONFIG_DECODERS 1 -#define CONFIG_STATIC_MSVCRT 0 -#define CONFIG_SPATIAL_RESAMPLING 1 -#define CONFIG_REALTIME_ONLY 1 -#define CONFIG_ONTHEFLY_BITPACKING 0 -#define CONFIG_ERROR_CONCEALMENT 0 -#define CONFIG_SHARED 0 -#define CONFIG_STATIC 1 -#define CONFIG_SMALL 0 -#define CONFIG_POSTPROC_VISUALIZER 0 -#define CONFIG_OS_SUPPORT 1 -#define CONFIG_UNIT_TESTS 1 -#define CONFIG_WEBM_IO 1 -#define CONFIG_LIBYUV 1 -#define CONFIG_DECODE_PERF_TESTS 0 -#define CONFIG_ENCODE_PERF_TESTS 0 -#define CONFIG_MULTI_RES_ENCODING 1 -#define CONFIG_TEMPORAL_DENOISING 1 -#define CONFIG_VP9_TEMPORAL_DENOISING 1 -#define CONFIG_COEFFICIENT_RANGE_CHECKING 0 -#define CONFIG_VP9_HIGHBITDEPTH 1 -#define CONFIG_BETTER_HW_COMPATIBILITY 0 -#define CONFIG_EXPERIMENTAL 0 -#define CONFIG_SIZE_LIMIT 1 -#define CONFIG_SPATIAL_SVC 0 -#define CONFIG_FP_MB_STATS 0 -#define CONFIG_EMULATE_HARDWARE 0 -#define CONFIG_MISC_FIXES 0 -#define DECODE_WIDTH_LIMIT 16384 -#define DECODE_HEIGHT_LIMIT 16384 -#endif /* VPX_CONFIG_H */ diff --git a/WebRtc.NET/include/third_party/libvpx/source/config/linux/generic/vpx_dsp_rtcd.h b/WebRtc.NET/include/third_party/libvpx/source/config/linux/generic/vpx_dsp_rtcd.h deleted file mode 100644 index f537568d..00000000 --- a/WebRtc.NET/include/third_party/libvpx/source/config/linux/generic/vpx_dsp_rtcd.h +++ /dev/null @@ -1,1650 +0,0 @@ -#ifndef VPX_DSP_RTCD_H_ -#define VPX_DSP_RTCD_H_ - -#ifdef RTCD_C -#define RTCD_EXTERN -#else -#define RTCD_EXTERN extern -#endif - -/* - * DSP - */ - -#include "vpx/vpx_integer.h" -#include "vpx_dsp/vpx_dsp_common.h" - - -#ifdef __cplusplus -extern "C" { -#endif - -unsigned int vpx_avg_4x4_c(const uint8_t *, int p); -#define vpx_avg_4x4 vpx_avg_4x4_c - -unsigned int vpx_avg_8x8_c(const uint8_t *, int p); -#define vpx_avg_8x8 vpx_avg_8x8_c - -void vpx_comp_avg_pred_c(uint8_t *comp_pred, const uint8_t *pred, int width, int height, const uint8_t *ref, int ref_stride); -#define vpx_comp_avg_pred vpx_comp_avg_pred_c - -void vpx_convolve8_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -#define vpx_convolve8 vpx_convolve8_c - -void vpx_convolve8_avg_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -#define vpx_convolve8_avg vpx_convolve8_avg_c - -void vpx_convolve8_avg_horiz_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -#define vpx_convolve8_avg_horiz vpx_convolve8_avg_horiz_c - -void vpx_convolve8_avg_vert_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -#define vpx_convolve8_avg_vert vpx_convolve8_avg_vert_c - -void vpx_convolve8_horiz_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -#define vpx_convolve8_horiz vpx_convolve8_horiz_c - -void vpx_convolve8_vert_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -#define vpx_convolve8_vert vpx_convolve8_vert_c - -void vpx_convolve_avg_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -#define vpx_convolve_avg vpx_convolve_avg_c - -void vpx_convolve_copy_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -#define vpx_convolve_copy vpx_convolve_copy_c - -void vpx_d117_predictor_16x16_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d117_predictor_16x16 vpx_d117_predictor_16x16_c - -void vpx_d117_predictor_32x32_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d117_predictor_32x32 vpx_d117_predictor_32x32_c - -void vpx_d117_predictor_4x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d117_predictor_4x4 vpx_d117_predictor_4x4_c - -void vpx_d117_predictor_8x8_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d117_predictor_8x8 vpx_d117_predictor_8x8_c - -void vpx_d135_predictor_16x16_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d135_predictor_16x16 vpx_d135_predictor_16x16_c - -void vpx_d135_predictor_32x32_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d135_predictor_32x32 vpx_d135_predictor_32x32_c - -void vpx_d135_predictor_4x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d135_predictor_4x4 vpx_d135_predictor_4x4_c - -void vpx_d135_predictor_8x8_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d135_predictor_8x8 vpx_d135_predictor_8x8_c - -void vpx_d153_predictor_16x16_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d153_predictor_16x16 vpx_d153_predictor_16x16_c - -void vpx_d153_predictor_32x32_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d153_predictor_32x32 vpx_d153_predictor_32x32_c - -void vpx_d153_predictor_4x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d153_predictor_4x4 vpx_d153_predictor_4x4_c - -void vpx_d153_predictor_8x8_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d153_predictor_8x8 vpx_d153_predictor_8x8_c - -void vpx_d207_predictor_16x16_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d207_predictor_16x16 vpx_d207_predictor_16x16_c - -void vpx_d207_predictor_32x32_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d207_predictor_32x32 vpx_d207_predictor_32x32_c - -void vpx_d207_predictor_4x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d207_predictor_4x4 vpx_d207_predictor_4x4_c - -void vpx_d207_predictor_8x8_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d207_predictor_8x8 vpx_d207_predictor_8x8_c - -void vpx_d207e_predictor_16x16_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d207e_predictor_16x16 vpx_d207e_predictor_16x16_c - -void vpx_d207e_predictor_32x32_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d207e_predictor_32x32 vpx_d207e_predictor_32x32_c - -void vpx_d207e_predictor_4x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d207e_predictor_4x4 vpx_d207e_predictor_4x4_c - -void vpx_d207e_predictor_8x8_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d207e_predictor_8x8 vpx_d207e_predictor_8x8_c - -void vpx_d45_predictor_16x16_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d45_predictor_16x16 vpx_d45_predictor_16x16_c - -void vpx_d45_predictor_32x32_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d45_predictor_32x32 vpx_d45_predictor_32x32_c - -void vpx_d45_predictor_4x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d45_predictor_4x4 vpx_d45_predictor_4x4_c - -void vpx_d45_predictor_8x8_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d45_predictor_8x8 vpx_d45_predictor_8x8_c - -void vpx_d45e_predictor_16x16_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d45e_predictor_16x16 vpx_d45e_predictor_16x16_c - -void vpx_d45e_predictor_32x32_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d45e_predictor_32x32 vpx_d45e_predictor_32x32_c - -void vpx_d45e_predictor_4x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d45e_predictor_4x4 vpx_d45e_predictor_4x4_c - -void vpx_d45e_predictor_8x8_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d45e_predictor_8x8 vpx_d45e_predictor_8x8_c - -void vpx_d63_predictor_16x16_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d63_predictor_16x16 vpx_d63_predictor_16x16_c - -void vpx_d63_predictor_32x32_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d63_predictor_32x32 vpx_d63_predictor_32x32_c - -void vpx_d63_predictor_4x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d63_predictor_4x4 vpx_d63_predictor_4x4_c - -void vpx_d63_predictor_8x8_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d63_predictor_8x8 vpx_d63_predictor_8x8_c - -void vpx_d63e_predictor_16x16_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d63e_predictor_16x16 vpx_d63e_predictor_16x16_c - -void vpx_d63e_predictor_32x32_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d63e_predictor_32x32 vpx_d63e_predictor_32x32_c - -void vpx_d63e_predictor_4x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d63e_predictor_4x4 vpx_d63e_predictor_4x4_c - -void vpx_d63e_predictor_8x8_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d63e_predictor_8x8 vpx_d63e_predictor_8x8_c - -void vpx_d63f_predictor_4x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d63f_predictor_4x4 vpx_d63f_predictor_4x4_c - -void vpx_dc_128_predictor_16x16_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_dc_128_predictor_16x16 vpx_dc_128_predictor_16x16_c - -void vpx_dc_128_predictor_32x32_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_dc_128_predictor_32x32 vpx_dc_128_predictor_32x32_c - -void vpx_dc_128_predictor_4x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_dc_128_predictor_4x4 vpx_dc_128_predictor_4x4_c - -void vpx_dc_128_predictor_8x8_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_dc_128_predictor_8x8 vpx_dc_128_predictor_8x8_c - -void vpx_dc_left_predictor_16x16_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_dc_left_predictor_16x16 vpx_dc_left_predictor_16x16_c - -void vpx_dc_left_predictor_32x32_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_dc_left_predictor_32x32 vpx_dc_left_predictor_32x32_c - -void vpx_dc_left_predictor_4x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_dc_left_predictor_4x4 vpx_dc_left_predictor_4x4_c - -void vpx_dc_left_predictor_8x8_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_dc_left_predictor_8x8 vpx_dc_left_predictor_8x8_c - -void vpx_dc_predictor_16x16_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_dc_predictor_16x16 vpx_dc_predictor_16x16_c - -void vpx_dc_predictor_32x32_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_dc_predictor_32x32 vpx_dc_predictor_32x32_c - -void vpx_dc_predictor_4x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_dc_predictor_4x4 vpx_dc_predictor_4x4_c - -void vpx_dc_predictor_8x8_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_dc_predictor_8x8 vpx_dc_predictor_8x8_c - -void vpx_dc_top_predictor_16x16_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_dc_top_predictor_16x16 vpx_dc_top_predictor_16x16_c - -void vpx_dc_top_predictor_32x32_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_dc_top_predictor_32x32 vpx_dc_top_predictor_32x32_c - -void vpx_dc_top_predictor_4x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_dc_top_predictor_4x4 vpx_dc_top_predictor_4x4_c - -void vpx_dc_top_predictor_8x8_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_dc_top_predictor_8x8 vpx_dc_top_predictor_8x8_c - -void vpx_fdct16x16_c(const int16_t *input, tran_low_t *output, int stride); -#define vpx_fdct16x16 vpx_fdct16x16_c - -void vpx_fdct16x16_1_c(const int16_t *input, tran_low_t *output, int stride); -#define vpx_fdct16x16_1 vpx_fdct16x16_1_c - -void vpx_fdct32x32_c(const int16_t *input, tran_low_t *output, int stride); -#define vpx_fdct32x32 vpx_fdct32x32_c - -void vpx_fdct32x32_1_c(const int16_t *input, tran_low_t *output, int stride); -#define vpx_fdct32x32_1 vpx_fdct32x32_1_c - -void vpx_fdct32x32_rd_c(const int16_t *input, tran_low_t *output, int stride); -#define vpx_fdct32x32_rd vpx_fdct32x32_rd_c - -void vpx_fdct4x4_c(const int16_t *input, tran_low_t *output, int stride); -#define vpx_fdct4x4 vpx_fdct4x4_c - -void vpx_fdct4x4_1_c(const int16_t *input, tran_low_t *output, int stride); -#define vpx_fdct4x4_1 vpx_fdct4x4_1_c - -void vpx_fdct8x8_c(const int16_t *input, tran_low_t *output, int stride); -#define vpx_fdct8x8 vpx_fdct8x8_c - -void vpx_fdct8x8_1_c(const int16_t *input, tran_low_t *output, int stride); -#define vpx_fdct8x8_1 vpx_fdct8x8_1_c - -void vpx_get16x16var_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse, int *sum); -#define vpx_get16x16var vpx_get16x16var_c - -unsigned int vpx_get4x4sse_cs_c(const unsigned char *src_ptr, int source_stride, const unsigned char *ref_ptr, int ref_stride); -#define vpx_get4x4sse_cs vpx_get4x4sse_cs_c - -void vpx_get8x8var_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse, int *sum); -#define vpx_get8x8var vpx_get8x8var_c - -unsigned int vpx_get_mb_ss_c(const int16_t *); -#define vpx_get_mb_ss vpx_get_mb_ss_c - -void vpx_h_predictor_16x16_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_h_predictor_16x16 vpx_h_predictor_16x16_c - -void vpx_h_predictor_32x32_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_h_predictor_32x32 vpx_h_predictor_32x32_c - -void vpx_h_predictor_4x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_h_predictor_4x4 vpx_h_predictor_4x4_c - -void vpx_h_predictor_8x8_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_h_predictor_8x8 vpx_h_predictor_8x8_c - -void vpx_hadamard_16x16_c(const int16_t *src_diff, int src_stride, int16_t *coeff); -#define vpx_hadamard_16x16 vpx_hadamard_16x16_c - -void vpx_hadamard_8x8_c(const int16_t *src_diff, int src_stride, int16_t *coeff); -#define vpx_hadamard_8x8 vpx_hadamard_8x8_c - -void vpx_he_predictor_4x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_he_predictor_4x4 vpx_he_predictor_4x4_c - -void vpx_highbd_10_get16x16var_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse, int *sum); -#define vpx_highbd_10_get16x16var vpx_highbd_10_get16x16var_c - -void vpx_highbd_10_get8x8var_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse, int *sum); -#define vpx_highbd_10_get8x8var vpx_highbd_10_get8x8var_c - -unsigned int vpx_highbd_10_mse16x16_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int recon_stride, unsigned int *sse); -#define vpx_highbd_10_mse16x16 vpx_highbd_10_mse16x16_c - -unsigned int vpx_highbd_10_mse16x8_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int recon_stride, unsigned int *sse); -#define vpx_highbd_10_mse16x8 vpx_highbd_10_mse16x8_c - -unsigned int vpx_highbd_10_mse8x16_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int recon_stride, unsigned int *sse); -#define vpx_highbd_10_mse8x16 vpx_highbd_10_mse8x16_c - -unsigned int vpx_highbd_10_mse8x8_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int recon_stride, unsigned int *sse); -#define vpx_highbd_10_mse8x8 vpx_highbd_10_mse8x8_c - -uint32_t vpx_highbd_10_sub_pixel_avg_variance16x16_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_highbd_10_sub_pixel_avg_variance16x16 vpx_highbd_10_sub_pixel_avg_variance16x16_c - -uint32_t vpx_highbd_10_sub_pixel_avg_variance16x32_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_highbd_10_sub_pixel_avg_variance16x32 vpx_highbd_10_sub_pixel_avg_variance16x32_c - -uint32_t vpx_highbd_10_sub_pixel_avg_variance16x8_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_highbd_10_sub_pixel_avg_variance16x8 vpx_highbd_10_sub_pixel_avg_variance16x8_c - -uint32_t vpx_highbd_10_sub_pixel_avg_variance32x16_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_highbd_10_sub_pixel_avg_variance32x16 vpx_highbd_10_sub_pixel_avg_variance32x16_c - -uint32_t vpx_highbd_10_sub_pixel_avg_variance32x32_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_highbd_10_sub_pixel_avg_variance32x32 vpx_highbd_10_sub_pixel_avg_variance32x32_c - -uint32_t vpx_highbd_10_sub_pixel_avg_variance32x64_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_highbd_10_sub_pixel_avg_variance32x64 vpx_highbd_10_sub_pixel_avg_variance32x64_c - -uint32_t vpx_highbd_10_sub_pixel_avg_variance4x4_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_highbd_10_sub_pixel_avg_variance4x4 vpx_highbd_10_sub_pixel_avg_variance4x4_c - -uint32_t vpx_highbd_10_sub_pixel_avg_variance4x8_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_highbd_10_sub_pixel_avg_variance4x8 vpx_highbd_10_sub_pixel_avg_variance4x8_c - -uint32_t vpx_highbd_10_sub_pixel_avg_variance64x32_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_highbd_10_sub_pixel_avg_variance64x32 vpx_highbd_10_sub_pixel_avg_variance64x32_c - -uint32_t vpx_highbd_10_sub_pixel_avg_variance64x64_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_highbd_10_sub_pixel_avg_variance64x64 vpx_highbd_10_sub_pixel_avg_variance64x64_c - -uint32_t vpx_highbd_10_sub_pixel_avg_variance8x16_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_highbd_10_sub_pixel_avg_variance8x16 vpx_highbd_10_sub_pixel_avg_variance8x16_c - -uint32_t vpx_highbd_10_sub_pixel_avg_variance8x4_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_highbd_10_sub_pixel_avg_variance8x4 vpx_highbd_10_sub_pixel_avg_variance8x4_c - -uint32_t vpx_highbd_10_sub_pixel_avg_variance8x8_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_highbd_10_sub_pixel_avg_variance8x8 vpx_highbd_10_sub_pixel_avg_variance8x8_c - -uint32_t vpx_highbd_10_sub_pixel_variance16x16_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -#define vpx_highbd_10_sub_pixel_variance16x16 vpx_highbd_10_sub_pixel_variance16x16_c - -uint32_t vpx_highbd_10_sub_pixel_variance16x32_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -#define vpx_highbd_10_sub_pixel_variance16x32 vpx_highbd_10_sub_pixel_variance16x32_c - -uint32_t vpx_highbd_10_sub_pixel_variance16x8_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -#define vpx_highbd_10_sub_pixel_variance16x8 vpx_highbd_10_sub_pixel_variance16x8_c - -uint32_t vpx_highbd_10_sub_pixel_variance32x16_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -#define vpx_highbd_10_sub_pixel_variance32x16 vpx_highbd_10_sub_pixel_variance32x16_c - -uint32_t vpx_highbd_10_sub_pixel_variance32x32_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -#define vpx_highbd_10_sub_pixel_variance32x32 vpx_highbd_10_sub_pixel_variance32x32_c - -uint32_t vpx_highbd_10_sub_pixel_variance32x64_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -#define vpx_highbd_10_sub_pixel_variance32x64 vpx_highbd_10_sub_pixel_variance32x64_c - -uint32_t vpx_highbd_10_sub_pixel_variance4x4_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -#define vpx_highbd_10_sub_pixel_variance4x4 vpx_highbd_10_sub_pixel_variance4x4_c - -uint32_t vpx_highbd_10_sub_pixel_variance4x8_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -#define vpx_highbd_10_sub_pixel_variance4x8 vpx_highbd_10_sub_pixel_variance4x8_c - -uint32_t vpx_highbd_10_sub_pixel_variance64x32_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -#define vpx_highbd_10_sub_pixel_variance64x32 vpx_highbd_10_sub_pixel_variance64x32_c - -uint32_t vpx_highbd_10_sub_pixel_variance64x64_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -#define vpx_highbd_10_sub_pixel_variance64x64 vpx_highbd_10_sub_pixel_variance64x64_c - -uint32_t vpx_highbd_10_sub_pixel_variance8x16_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -#define vpx_highbd_10_sub_pixel_variance8x16 vpx_highbd_10_sub_pixel_variance8x16_c - -uint32_t vpx_highbd_10_sub_pixel_variance8x4_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -#define vpx_highbd_10_sub_pixel_variance8x4 vpx_highbd_10_sub_pixel_variance8x4_c - -uint32_t vpx_highbd_10_sub_pixel_variance8x8_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -#define vpx_highbd_10_sub_pixel_variance8x8 vpx_highbd_10_sub_pixel_variance8x8_c - -unsigned int vpx_highbd_10_variance16x16_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_highbd_10_variance16x16 vpx_highbd_10_variance16x16_c - -unsigned int vpx_highbd_10_variance16x32_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_highbd_10_variance16x32 vpx_highbd_10_variance16x32_c - -unsigned int vpx_highbd_10_variance16x8_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_highbd_10_variance16x8 vpx_highbd_10_variance16x8_c - -unsigned int vpx_highbd_10_variance32x16_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_highbd_10_variance32x16 vpx_highbd_10_variance32x16_c - -unsigned int vpx_highbd_10_variance32x32_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_highbd_10_variance32x32 vpx_highbd_10_variance32x32_c - -unsigned int vpx_highbd_10_variance32x64_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_highbd_10_variance32x64 vpx_highbd_10_variance32x64_c - -unsigned int vpx_highbd_10_variance4x4_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_highbd_10_variance4x4 vpx_highbd_10_variance4x4_c - -unsigned int vpx_highbd_10_variance4x8_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_highbd_10_variance4x8 vpx_highbd_10_variance4x8_c - -unsigned int vpx_highbd_10_variance64x32_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_highbd_10_variance64x32 vpx_highbd_10_variance64x32_c - -unsigned int vpx_highbd_10_variance64x64_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_highbd_10_variance64x64 vpx_highbd_10_variance64x64_c - -unsigned int vpx_highbd_10_variance8x16_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_highbd_10_variance8x16 vpx_highbd_10_variance8x16_c - -unsigned int vpx_highbd_10_variance8x4_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_highbd_10_variance8x4 vpx_highbd_10_variance8x4_c - -unsigned int vpx_highbd_10_variance8x8_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_highbd_10_variance8x8 vpx_highbd_10_variance8x8_c - -void vpx_highbd_12_get16x16var_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse, int *sum); -#define vpx_highbd_12_get16x16var vpx_highbd_12_get16x16var_c - -void vpx_highbd_12_get8x8var_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse, int *sum); -#define vpx_highbd_12_get8x8var vpx_highbd_12_get8x8var_c - -unsigned int vpx_highbd_12_mse16x16_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int recon_stride, unsigned int *sse); -#define vpx_highbd_12_mse16x16 vpx_highbd_12_mse16x16_c - -unsigned int vpx_highbd_12_mse16x8_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int recon_stride, unsigned int *sse); -#define vpx_highbd_12_mse16x8 vpx_highbd_12_mse16x8_c - -unsigned int vpx_highbd_12_mse8x16_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int recon_stride, unsigned int *sse); -#define vpx_highbd_12_mse8x16 vpx_highbd_12_mse8x16_c - -unsigned int vpx_highbd_12_mse8x8_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int recon_stride, unsigned int *sse); -#define vpx_highbd_12_mse8x8 vpx_highbd_12_mse8x8_c - -uint32_t vpx_highbd_12_sub_pixel_avg_variance16x16_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_highbd_12_sub_pixel_avg_variance16x16 vpx_highbd_12_sub_pixel_avg_variance16x16_c - -uint32_t vpx_highbd_12_sub_pixel_avg_variance16x32_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_highbd_12_sub_pixel_avg_variance16x32 vpx_highbd_12_sub_pixel_avg_variance16x32_c - -uint32_t vpx_highbd_12_sub_pixel_avg_variance16x8_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_highbd_12_sub_pixel_avg_variance16x8 vpx_highbd_12_sub_pixel_avg_variance16x8_c - -uint32_t vpx_highbd_12_sub_pixel_avg_variance32x16_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_highbd_12_sub_pixel_avg_variance32x16 vpx_highbd_12_sub_pixel_avg_variance32x16_c - -uint32_t vpx_highbd_12_sub_pixel_avg_variance32x32_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_highbd_12_sub_pixel_avg_variance32x32 vpx_highbd_12_sub_pixel_avg_variance32x32_c - -uint32_t vpx_highbd_12_sub_pixel_avg_variance32x64_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_highbd_12_sub_pixel_avg_variance32x64 vpx_highbd_12_sub_pixel_avg_variance32x64_c - -uint32_t vpx_highbd_12_sub_pixel_avg_variance4x4_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_highbd_12_sub_pixel_avg_variance4x4 vpx_highbd_12_sub_pixel_avg_variance4x4_c - -uint32_t vpx_highbd_12_sub_pixel_avg_variance4x8_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_highbd_12_sub_pixel_avg_variance4x8 vpx_highbd_12_sub_pixel_avg_variance4x8_c - -uint32_t vpx_highbd_12_sub_pixel_avg_variance64x32_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_highbd_12_sub_pixel_avg_variance64x32 vpx_highbd_12_sub_pixel_avg_variance64x32_c - -uint32_t vpx_highbd_12_sub_pixel_avg_variance64x64_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_highbd_12_sub_pixel_avg_variance64x64 vpx_highbd_12_sub_pixel_avg_variance64x64_c - -uint32_t vpx_highbd_12_sub_pixel_avg_variance8x16_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_highbd_12_sub_pixel_avg_variance8x16 vpx_highbd_12_sub_pixel_avg_variance8x16_c - -uint32_t vpx_highbd_12_sub_pixel_avg_variance8x4_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_highbd_12_sub_pixel_avg_variance8x4 vpx_highbd_12_sub_pixel_avg_variance8x4_c - -uint32_t vpx_highbd_12_sub_pixel_avg_variance8x8_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_highbd_12_sub_pixel_avg_variance8x8 vpx_highbd_12_sub_pixel_avg_variance8x8_c - -uint32_t vpx_highbd_12_sub_pixel_variance16x16_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -#define vpx_highbd_12_sub_pixel_variance16x16 vpx_highbd_12_sub_pixel_variance16x16_c - -uint32_t vpx_highbd_12_sub_pixel_variance16x32_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -#define vpx_highbd_12_sub_pixel_variance16x32 vpx_highbd_12_sub_pixel_variance16x32_c - -uint32_t vpx_highbd_12_sub_pixel_variance16x8_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -#define vpx_highbd_12_sub_pixel_variance16x8 vpx_highbd_12_sub_pixel_variance16x8_c - -uint32_t vpx_highbd_12_sub_pixel_variance32x16_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -#define vpx_highbd_12_sub_pixel_variance32x16 vpx_highbd_12_sub_pixel_variance32x16_c - -uint32_t vpx_highbd_12_sub_pixel_variance32x32_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -#define vpx_highbd_12_sub_pixel_variance32x32 vpx_highbd_12_sub_pixel_variance32x32_c - -uint32_t vpx_highbd_12_sub_pixel_variance32x64_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -#define vpx_highbd_12_sub_pixel_variance32x64 vpx_highbd_12_sub_pixel_variance32x64_c - -uint32_t vpx_highbd_12_sub_pixel_variance4x4_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -#define vpx_highbd_12_sub_pixel_variance4x4 vpx_highbd_12_sub_pixel_variance4x4_c - -uint32_t vpx_highbd_12_sub_pixel_variance4x8_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -#define vpx_highbd_12_sub_pixel_variance4x8 vpx_highbd_12_sub_pixel_variance4x8_c - -uint32_t vpx_highbd_12_sub_pixel_variance64x32_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -#define vpx_highbd_12_sub_pixel_variance64x32 vpx_highbd_12_sub_pixel_variance64x32_c - -uint32_t vpx_highbd_12_sub_pixel_variance64x64_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -#define vpx_highbd_12_sub_pixel_variance64x64 vpx_highbd_12_sub_pixel_variance64x64_c - -uint32_t vpx_highbd_12_sub_pixel_variance8x16_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -#define vpx_highbd_12_sub_pixel_variance8x16 vpx_highbd_12_sub_pixel_variance8x16_c - -uint32_t vpx_highbd_12_sub_pixel_variance8x4_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -#define vpx_highbd_12_sub_pixel_variance8x4 vpx_highbd_12_sub_pixel_variance8x4_c - -uint32_t vpx_highbd_12_sub_pixel_variance8x8_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -#define vpx_highbd_12_sub_pixel_variance8x8 vpx_highbd_12_sub_pixel_variance8x8_c - -unsigned int vpx_highbd_12_variance16x16_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_highbd_12_variance16x16 vpx_highbd_12_variance16x16_c - -unsigned int vpx_highbd_12_variance16x32_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_highbd_12_variance16x32 vpx_highbd_12_variance16x32_c - -unsigned int vpx_highbd_12_variance16x8_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_highbd_12_variance16x8 vpx_highbd_12_variance16x8_c - -unsigned int vpx_highbd_12_variance32x16_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_highbd_12_variance32x16 vpx_highbd_12_variance32x16_c - -unsigned int vpx_highbd_12_variance32x32_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_highbd_12_variance32x32 vpx_highbd_12_variance32x32_c - -unsigned int vpx_highbd_12_variance32x64_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_highbd_12_variance32x64 vpx_highbd_12_variance32x64_c - -unsigned int vpx_highbd_12_variance4x4_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_highbd_12_variance4x4 vpx_highbd_12_variance4x4_c - -unsigned int vpx_highbd_12_variance4x8_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_highbd_12_variance4x8 vpx_highbd_12_variance4x8_c - -unsigned int vpx_highbd_12_variance64x32_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_highbd_12_variance64x32 vpx_highbd_12_variance64x32_c - -unsigned int vpx_highbd_12_variance64x64_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_highbd_12_variance64x64 vpx_highbd_12_variance64x64_c - -unsigned int vpx_highbd_12_variance8x16_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_highbd_12_variance8x16 vpx_highbd_12_variance8x16_c - -unsigned int vpx_highbd_12_variance8x4_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_highbd_12_variance8x4 vpx_highbd_12_variance8x4_c - -unsigned int vpx_highbd_12_variance8x8_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_highbd_12_variance8x8 vpx_highbd_12_variance8x8_c - -void vpx_highbd_8_get16x16var_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse, int *sum); -#define vpx_highbd_8_get16x16var vpx_highbd_8_get16x16var_c - -void vpx_highbd_8_get8x8var_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse, int *sum); -#define vpx_highbd_8_get8x8var vpx_highbd_8_get8x8var_c - -unsigned int vpx_highbd_8_mse16x16_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int recon_stride, unsigned int *sse); -#define vpx_highbd_8_mse16x16 vpx_highbd_8_mse16x16_c - -unsigned int vpx_highbd_8_mse16x8_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int recon_stride, unsigned int *sse); -#define vpx_highbd_8_mse16x8 vpx_highbd_8_mse16x8_c - -unsigned int vpx_highbd_8_mse8x16_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int recon_stride, unsigned int *sse); -#define vpx_highbd_8_mse8x16 vpx_highbd_8_mse8x16_c - -unsigned int vpx_highbd_8_mse8x8_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int recon_stride, unsigned int *sse); -#define vpx_highbd_8_mse8x8 vpx_highbd_8_mse8x8_c - -uint32_t vpx_highbd_8_sub_pixel_avg_variance16x16_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_highbd_8_sub_pixel_avg_variance16x16 vpx_highbd_8_sub_pixel_avg_variance16x16_c - -uint32_t vpx_highbd_8_sub_pixel_avg_variance16x32_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_highbd_8_sub_pixel_avg_variance16x32 vpx_highbd_8_sub_pixel_avg_variance16x32_c - -uint32_t vpx_highbd_8_sub_pixel_avg_variance16x8_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_highbd_8_sub_pixel_avg_variance16x8 vpx_highbd_8_sub_pixel_avg_variance16x8_c - -uint32_t vpx_highbd_8_sub_pixel_avg_variance32x16_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_highbd_8_sub_pixel_avg_variance32x16 vpx_highbd_8_sub_pixel_avg_variance32x16_c - -uint32_t vpx_highbd_8_sub_pixel_avg_variance32x32_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_highbd_8_sub_pixel_avg_variance32x32 vpx_highbd_8_sub_pixel_avg_variance32x32_c - -uint32_t vpx_highbd_8_sub_pixel_avg_variance32x64_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_highbd_8_sub_pixel_avg_variance32x64 vpx_highbd_8_sub_pixel_avg_variance32x64_c - -uint32_t vpx_highbd_8_sub_pixel_avg_variance4x4_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_highbd_8_sub_pixel_avg_variance4x4 vpx_highbd_8_sub_pixel_avg_variance4x4_c - -uint32_t vpx_highbd_8_sub_pixel_avg_variance4x8_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_highbd_8_sub_pixel_avg_variance4x8 vpx_highbd_8_sub_pixel_avg_variance4x8_c - -uint32_t vpx_highbd_8_sub_pixel_avg_variance64x32_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_highbd_8_sub_pixel_avg_variance64x32 vpx_highbd_8_sub_pixel_avg_variance64x32_c - -uint32_t vpx_highbd_8_sub_pixel_avg_variance64x64_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_highbd_8_sub_pixel_avg_variance64x64 vpx_highbd_8_sub_pixel_avg_variance64x64_c - -uint32_t vpx_highbd_8_sub_pixel_avg_variance8x16_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_highbd_8_sub_pixel_avg_variance8x16 vpx_highbd_8_sub_pixel_avg_variance8x16_c - -uint32_t vpx_highbd_8_sub_pixel_avg_variance8x4_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_highbd_8_sub_pixel_avg_variance8x4 vpx_highbd_8_sub_pixel_avg_variance8x4_c - -uint32_t vpx_highbd_8_sub_pixel_avg_variance8x8_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_highbd_8_sub_pixel_avg_variance8x8 vpx_highbd_8_sub_pixel_avg_variance8x8_c - -uint32_t vpx_highbd_8_sub_pixel_variance16x16_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -#define vpx_highbd_8_sub_pixel_variance16x16 vpx_highbd_8_sub_pixel_variance16x16_c - -uint32_t vpx_highbd_8_sub_pixel_variance16x32_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -#define vpx_highbd_8_sub_pixel_variance16x32 vpx_highbd_8_sub_pixel_variance16x32_c - -uint32_t vpx_highbd_8_sub_pixel_variance16x8_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -#define vpx_highbd_8_sub_pixel_variance16x8 vpx_highbd_8_sub_pixel_variance16x8_c - -uint32_t vpx_highbd_8_sub_pixel_variance32x16_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -#define vpx_highbd_8_sub_pixel_variance32x16 vpx_highbd_8_sub_pixel_variance32x16_c - -uint32_t vpx_highbd_8_sub_pixel_variance32x32_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -#define vpx_highbd_8_sub_pixel_variance32x32 vpx_highbd_8_sub_pixel_variance32x32_c - -uint32_t vpx_highbd_8_sub_pixel_variance32x64_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -#define vpx_highbd_8_sub_pixel_variance32x64 vpx_highbd_8_sub_pixel_variance32x64_c - -uint32_t vpx_highbd_8_sub_pixel_variance4x4_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -#define vpx_highbd_8_sub_pixel_variance4x4 vpx_highbd_8_sub_pixel_variance4x4_c - -uint32_t vpx_highbd_8_sub_pixel_variance4x8_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -#define vpx_highbd_8_sub_pixel_variance4x8 vpx_highbd_8_sub_pixel_variance4x8_c - -uint32_t vpx_highbd_8_sub_pixel_variance64x32_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -#define vpx_highbd_8_sub_pixel_variance64x32 vpx_highbd_8_sub_pixel_variance64x32_c - -uint32_t vpx_highbd_8_sub_pixel_variance64x64_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -#define vpx_highbd_8_sub_pixel_variance64x64 vpx_highbd_8_sub_pixel_variance64x64_c - -uint32_t vpx_highbd_8_sub_pixel_variance8x16_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -#define vpx_highbd_8_sub_pixel_variance8x16 vpx_highbd_8_sub_pixel_variance8x16_c - -uint32_t vpx_highbd_8_sub_pixel_variance8x4_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -#define vpx_highbd_8_sub_pixel_variance8x4 vpx_highbd_8_sub_pixel_variance8x4_c - -uint32_t vpx_highbd_8_sub_pixel_variance8x8_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -#define vpx_highbd_8_sub_pixel_variance8x8 vpx_highbd_8_sub_pixel_variance8x8_c - -unsigned int vpx_highbd_8_variance16x16_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_highbd_8_variance16x16 vpx_highbd_8_variance16x16_c - -unsigned int vpx_highbd_8_variance16x32_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_highbd_8_variance16x32 vpx_highbd_8_variance16x32_c - -unsigned int vpx_highbd_8_variance16x8_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_highbd_8_variance16x8 vpx_highbd_8_variance16x8_c - -unsigned int vpx_highbd_8_variance32x16_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_highbd_8_variance32x16 vpx_highbd_8_variance32x16_c - -unsigned int vpx_highbd_8_variance32x32_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_highbd_8_variance32x32 vpx_highbd_8_variance32x32_c - -unsigned int vpx_highbd_8_variance32x64_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_highbd_8_variance32x64 vpx_highbd_8_variance32x64_c - -unsigned int vpx_highbd_8_variance4x4_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_highbd_8_variance4x4 vpx_highbd_8_variance4x4_c - -unsigned int vpx_highbd_8_variance4x8_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_highbd_8_variance4x8 vpx_highbd_8_variance4x8_c - -unsigned int vpx_highbd_8_variance64x32_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_highbd_8_variance64x32 vpx_highbd_8_variance64x32_c - -unsigned int vpx_highbd_8_variance64x64_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_highbd_8_variance64x64 vpx_highbd_8_variance64x64_c - -unsigned int vpx_highbd_8_variance8x16_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_highbd_8_variance8x16 vpx_highbd_8_variance8x16_c - -unsigned int vpx_highbd_8_variance8x4_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_highbd_8_variance8x4 vpx_highbd_8_variance8x4_c - -unsigned int vpx_highbd_8_variance8x8_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_highbd_8_variance8x8 vpx_highbd_8_variance8x8_c - -unsigned int vpx_highbd_avg_4x4_c(const uint8_t *, int p); -#define vpx_highbd_avg_4x4 vpx_highbd_avg_4x4_c - -unsigned int vpx_highbd_avg_8x8_c(const uint8_t *, int p); -#define vpx_highbd_avg_8x8 vpx_highbd_avg_8x8_c - -void vpx_highbd_comp_avg_pred_c(uint16_t *comp_pred, const uint8_t *pred8, int width, int height, const uint8_t *ref8, int ref_stride); -#define vpx_highbd_comp_avg_pred vpx_highbd_comp_avg_pred_c - -void vpx_highbd_convolve8_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h, int bps); -#define vpx_highbd_convolve8 vpx_highbd_convolve8_c - -void vpx_highbd_convolve8_avg_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h, int bps); -#define vpx_highbd_convolve8_avg vpx_highbd_convolve8_avg_c - -void vpx_highbd_convolve8_avg_horiz_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h, int bps); -#define vpx_highbd_convolve8_avg_horiz vpx_highbd_convolve8_avg_horiz_c - -void vpx_highbd_convolve8_avg_vert_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h, int bps); -#define vpx_highbd_convolve8_avg_vert vpx_highbd_convolve8_avg_vert_c - -void vpx_highbd_convolve8_horiz_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h, int bps); -#define vpx_highbd_convolve8_horiz vpx_highbd_convolve8_horiz_c - -void vpx_highbd_convolve8_vert_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h, int bps); -#define vpx_highbd_convolve8_vert vpx_highbd_convolve8_vert_c - -void vpx_highbd_convolve_avg_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h, int bps); -#define vpx_highbd_convolve_avg vpx_highbd_convolve_avg_c - -void vpx_highbd_convolve_copy_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h, int bps); -#define vpx_highbd_convolve_copy vpx_highbd_convolve_copy_c - -void vpx_highbd_d117_predictor_16x16_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_d117_predictor_16x16 vpx_highbd_d117_predictor_16x16_c - -void vpx_highbd_d117_predictor_32x32_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_d117_predictor_32x32 vpx_highbd_d117_predictor_32x32_c - -void vpx_highbd_d117_predictor_4x4_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_d117_predictor_4x4 vpx_highbd_d117_predictor_4x4_c - -void vpx_highbd_d117_predictor_8x8_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_d117_predictor_8x8 vpx_highbd_d117_predictor_8x8_c - -void vpx_highbd_d135_predictor_16x16_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_d135_predictor_16x16 vpx_highbd_d135_predictor_16x16_c - -void vpx_highbd_d135_predictor_32x32_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_d135_predictor_32x32 vpx_highbd_d135_predictor_32x32_c - -void vpx_highbd_d135_predictor_4x4_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_d135_predictor_4x4 vpx_highbd_d135_predictor_4x4_c - -void vpx_highbd_d135_predictor_8x8_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_d135_predictor_8x8 vpx_highbd_d135_predictor_8x8_c - -void vpx_highbd_d153_predictor_16x16_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_d153_predictor_16x16 vpx_highbd_d153_predictor_16x16_c - -void vpx_highbd_d153_predictor_32x32_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_d153_predictor_32x32 vpx_highbd_d153_predictor_32x32_c - -void vpx_highbd_d153_predictor_4x4_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_d153_predictor_4x4 vpx_highbd_d153_predictor_4x4_c - -void vpx_highbd_d153_predictor_8x8_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_d153_predictor_8x8 vpx_highbd_d153_predictor_8x8_c - -void vpx_highbd_d207_predictor_16x16_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_d207_predictor_16x16 vpx_highbd_d207_predictor_16x16_c - -void vpx_highbd_d207_predictor_32x32_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_d207_predictor_32x32 vpx_highbd_d207_predictor_32x32_c - -void vpx_highbd_d207_predictor_4x4_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_d207_predictor_4x4 vpx_highbd_d207_predictor_4x4_c - -void vpx_highbd_d207_predictor_8x8_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_d207_predictor_8x8 vpx_highbd_d207_predictor_8x8_c - -void vpx_highbd_d207e_predictor_16x16_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_d207e_predictor_16x16 vpx_highbd_d207e_predictor_16x16_c - -void vpx_highbd_d207e_predictor_32x32_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_d207e_predictor_32x32 vpx_highbd_d207e_predictor_32x32_c - -void vpx_highbd_d207e_predictor_4x4_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_d207e_predictor_4x4 vpx_highbd_d207e_predictor_4x4_c - -void vpx_highbd_d207e_predictor_8x8_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_d207e_predictor_8x8 vpx_highbd_d207e_predictor_8x8_c - -void vpx_highbd_d45_predictor_16x16_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_d45_predictor_16x16 vpx_highbd_d45_predictor_16x16_c - -void vpx_highbd_d45_predictor_32x32_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_d45_predictor_32x32 vpx_highbd_d45_predictor_32x32_c - -void vpx_highbd_d45_predictor_4x4_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_d45_predictor_4x4 vpx_highbd_d45_predictor_4x4_c - -void vpx_highbd_d45_predictor_8x8_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_d45_predictor_8x8 vpx_highbd_d45_predictor_8x8_c - -void vpx_highbd_d45e_predictor_16x16_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_d45e_predictor_16x16 vpx_highbd_d45e_predictor_16x16_c - -void vpx_highbd_d45e_predictor_32x32_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_d45e_predictor_32x32 vpx_highbd_d45e_predictor_32x32_c - -void vpx_highbd_d45e_predictor_4x4_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_d45e_predictor_4x4 vpx_highbd_d45e_predictor_4x4_c - -void vpx_highbd_d45e_predictor_8x8_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_d45e_predictor_8x8 vpx_highbd_d45e_predictor_8x8_c - -void vpx_highbd_d63_predictor_16x16_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_d63_predictor_16x16 vpx_highbd_d63_predictor_16x16_c - -void vpx_highbd_d63_predictor_32x32_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_d63_predictor_32x32 vpx_highbd_d63_predictor_32x32_c - -void vpx_highbd_d63_predictor_4x4_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_d63_predictor_4x4 vpx_highbd_d63_predictor_4x4_c - -void vpx_highbd_d63_predictor_8x8_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_d63_predictor_8x8 vpx_highbd_d63_predictor_8x8_c - -void vpx_highbd_d63e_predictor_16x16_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_d63e_predictor_16x16 vpx_highbd_d63e_predictor_16x16_c - -void vpx_highbd_d63e_predictor_32x32_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_d63e_predictor_32x32 vpx_highbd_d63e_predictor_32x32_c - -void vpx_highbd_d63e_predictor_4x4_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_d63e_predictor_4x4 vpx_highbd_d63e_predictor_4x4_c - -void vpx_highbd_d63e_predictor_8x8_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_d63e_predictor_8x8 vpx_highbd_d63e_predictor_8x8_c - -void vpx_highbd_dc_128_predictor_16x16_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_dc_128_predictor_16x16 vpx_highbd_dc_128_predictor_16x16_c - -void vpx_highbd_dc_128_predictor_32x32_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_dc_128_predictor_32x32 vpx_highbd_dc_128_predictor_32x32_c - -void vpx_highbd_dc_128_predictor_4x4_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_dc_128_predictor_4x4 vpx_highbd_dc_128_predictor_4x4_c - -void vpx_highbd_dc_128_predictor_8x8_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_dc_128_predictor_8x8 vpx_highbd_dc_128_predictor_8x8_c - -void vpx_highbd_dc_left_predictor_16x16_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_dc_left_predictor_16x16 vpx_highbd_dc_left_predictor_16x16_c - -void vpx_highbd_dc_left_predictor_32x32_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_dc_left_predictor_32x32 vpx_highbd_dc_left_predictor_32x32_c - -void vpx_highbd_dc_left_predictor_4x4_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_dc_left_predictor_4x4 vpx_highbd_dc_left_predictor_4x4_c - -void vpx_highbd_dc_left_predictor_8x8_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_dc_left_predictor_8x8 vpx_highbd_dc_left_predictor_8x8_c - -void vpx_highbd_dc_predictor_16x16_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_dc_predictor_16x16 vpx_highbd_dc_predictor_16x16_c - -void vpx_highbd_dc_predictor_32x32_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_dc_predictor_32x32 vpx_highbd_dc_predictor_32x32_c - -void vpx_highbd_dc_predictor_4x4_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_dc_predictor_4x4 vpx_highbd_dc_predictor_4x4_c - -void vpx_highbd_dc_predictor_8x8_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_dc_predictor_8x8 vpx_highbd_dc_predictor_8x8_c - -void vpx_highbd_dc_top_predictor_16x16_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_dc_top_predictor_16x16 vpx_highbd_dc_top_predictor_16x16_c - -void vpx_highbd_dc_top_predictor_32x32_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_dc_top_predictor_32x32 vpx_highbd_dc_top_predictor_32x32_c - -void vpx_highbd_dc_top_predictor_4x4_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_dc_top_predictor_4x4 vpx_highbd_dc_top_predictor_4x4_c - -void vpx_highbd_dc_top_predictor_8x8_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_dc_top_predictor_8x8 vpx_highbd_dc_top_predictor_8x8_c - -void vpx_highbd_fdct16x16_c(const int16_t *input, tran_low_t *output, int stride); -#define vpx_highbd_fdct16x16 vpx_highbd_fdct16x16_c - -void vpx_highbd_fdct16x16_1_c(const int16_t *input, tran_low_t *output, int stride); -#define vpx_highbd_fdct16x16_1 vpx_highbd_fdct16x16_1_c - -void vpx_highbd_fdct32x32_c(const int16_t *input, tran_low_t *output, int stride); -#define vpx_highbd_fdct32x32 vpx_highbd_fdct32x32_c - -void vpx_highbd_fdct32x32_1_c(const int16_t *input, tran_low_t *output, int stride); -#define vpx_highbd_fdct32x32_1 vpx_highbd_fdct32x32_1_c - -void vpx_highbd_fdct32x32_rd_c(const int16_t *input, tran_low_t *output, int stride); -#define vpx_highbd_fdct32x32_rd vpx_highbd_fdct32x32_rd_c - -void vpx_highbd_fdct4x4_c(const int16_t *input, tran_low_t *output, int stride); -#define vpx_highbd_fdct4x4 vpx_highbd_fdct4x4_c - -void vpx_highbd_fdct8x8_c(const int16_t *input, tran_low_t *output, int stride); -#define vpx_highbd_fdct8x8 vpx_highbd_fdct8x8_c - -void vpx_highbd_fdct8x8_1_c(const int16_t *input, tran_low_t *output, int stride); -#define vpx_highbd_fdct8x8_1 vpx_highbd_fdct8x8_1_c - -void vpx_highbd_h_predictor_16x16_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_h_predictor_16x16 vpx_highbd_h_predictor_16x16_c - -void vpx_highbd_h_predictor_32x32_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_h_predictor_32x32 vpx_highbd_h_predictor_32x32_c - -void vpx_highbd_h_predictor_4x4_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_h_predictor_4x4 vpx_highbd_h_predictor_4x4_c - -void vpx_highbd_h_predictor_8x8_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_h_predictor_8x8 vpx_highbd_h_predictor_8x8_c - -void vpx_highbd_idct16x16_10_add_c(const tran_low_t *input, uint8_t *dest, int stride, int bd); -#define vpx_highbd_idct16x16_10_add vpx_highbd_idct16x16_10_add_c - -void vpx_highbd_idct16x16_1_add_c(const tran_low_t *input, uint8_t *dest, int stride, int bd); -#define vpx_highbd_idct16x16_1_add vpx_highbd_idct16x16_1_add_c - -void vpx_highbd_idct16x16_256_add_c(const tran_low_t *input, uint8_t *dest, int stride, int bd); -#define vpx_highbd_idct16x16_256_add vpx_highbd_idct16x16_256_add_c - -void vpx_highbd_idct32x32_1024_add_c(const tran_low_t *input, uint8_t *dest, int stride, int bd); -#define vpx_highbd_idct32x32_1024_add vpx_highbd_idct32x32_1024_add_c - -void vpx_highbd_idct32x32_1_add_c(const tran_low_t *input, uint8_t *dest, int stride, int bd); -#define vpx_highbd_idct32x32_1_add vpx_highbd_idct32x32_1_add_c - -void vpx_highbd_idct32x32_34_add_c(const tran_low_t *input, uint8_t *dest, int stride, int bd); -#define vpx_highbd_idct32x32_34_add vpx_highbd_idct32x32_34_add_c - -void vpx_highbd_idct4x4_16_add_c(const tran_low_t *input, uint8_t *dest, int stride, int bd); -#define vpx_highbd_idct4x4_16_add vpx_highbd_idct4x4_16_add_c - -void vpx_highbd_idct4x4_1_add_c(const tran_low_t *input, uint8_t *dest, int stride, int bd); -#define vpx_highbd_idct4x4_1_add vpx_highbd_idct4x4_1_add_c - -void vpx_highbd_idct8x8_12_add_c(const tran_low_t *input, uint8_t *dest, int stride, int bd); -#define vpx_highbd_idct8x8_12_add vpx_highbd_idct8x8_12_add_c - -void vpx_highbd_idct8x8_1_add_c(const tran_low_t *input, uint8_t *dest, int stride, int bd); -#define vpx_highbd_idct8x8_1_add vpx_highbd_idct8x8_1_add_c - -void vpx_highbd_idct8x8_64_add_c(const tran_low_t *input, uint8_t *dest, int stride, int bd); -#define vpx_highbd_idct8x8_64_add vpx_highbd_idct8x8_64_add_c - -void vpx_highbd_iwht4x4_16_add_c(const tran_low_t *input, uint8_t *dest, int stride, int bd); -#define vpx_highbd_iwht4x4_16_add vpx_highbd_iwht4x4_16_add_c - -void vpx_highbd_iwht4x4_1_add_c(const tran_low_t *input, uint8_t *dest, int stride, int bd); -#define vpx_highbd_iwht4x4_1_add vpx_highbd_iwht4x4_1_add_c - -void vpx_highbd_lpf_horizontal_16_c(uint16_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh, int bd); -#define vpx_highbd_lpf_horizontal_16 vpx_highbd_lpf_horizontal_16_c - -void vpx_highbd_lpf_horizontal_16_dual_c(uint16_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh, int bd); -#define vpx_highbd_lpf_horizontal_16_dual vpx_highbd_lpf_horizontal_16_dual_c - -void vpx_highbd_lpf_horizontal_4_c(uint16_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh, int bd); -#define vpx_highbd_lpf_horizontal_4 vpx_highbd_lpf_horizontal_4_c - -void vpx_highbd_lpf_horizontal_4_dual_c(uint16_t *s, int pitch, const uint8_t *blimit0, const uint8_t *limit0, const uint8_t *thresh0, const uint8_t *blimit1, const uint8_t *limit1, const uint8_t *thresh1, int bd); -#define vpx_highbd_lpf_horizontal_4_dual vpx_highbd_lpf_horizontal_4_dual_c - -void vpx_highbd_lpf_horizontal_8_c(uint16_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh, int bd); -#define vpx_highbd_lpf_horizontal_8 vpx_highbd_lpf_horizontal_8_c - -void vpx_highbd_lpf_horizontal_8_dual_c(uint16_t *s, int pitch, const uint8_t *blimit0, const uint8_t *limit0, const uint8_t *thresh0, const uint8_t *blimit1, const uint8_t *limit1, const uint8_t *thresh1, int bd); -#define vpx_highbd_lpf_horizontal_8_dual vpx_highbd_lpf_horizontal_8_dual_c - -void vpx_highbd_lpf_vertical_16_c(uint16_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh, int bd); -#define vpx_highbd_lpf_vertical_16 vpx_highbd_lpf_vertical_16_c - -void vpx_highbd_lpf_vertical_16_dual_c(uint16_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh, int bd); -#define vpx_highbd_lpf_vertical_16_dual vpx_highbd_lpf_vertical_16_dual_c - -void vpx_highbd_lpf_vertical_4_c(uint16_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh, int bd); -#define vpx_highbd_lpf_vertical_4 vpx_highbd_lpf_vertical_4_c - -void vpx_highbd_lpf_vertical_4_dual_c(uint16_t *s, int pitch, const uint8_t *blimit0, const uint8_t *limit0, const uint8_t *thresh0, const uint8_t *blimit1, const uint8_t *limit1, const uint8_t *thresh1, int bd); -#define vpx_highbd_lpf_vertical_4_dual vpx_highbd_lpf_vertical_4_dual_c - -void vpx_highbd_lpf_vertical_8_c(uint16_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh, int bd); -#define vpx_highbd_lpf_vertical_8 vpx_highbd_lpf_vertical_8_c - -void vpx_highbd_lpf_vertical_8_dual_c(uint16_t *s, int pitch, const uint8_t *blimit0, const uint8_t *limit0, const uint8_t *thresh0, const uint8_t *blimit1, const uint8_t *limit1, const uint8_t *thresh1, int bd); -#define vpx_highbd_lpf_vertical_8_dual vpx_highbd_lpf_vertical_8_dual_c - -void vpx_highbd_minmax_8x8_c(const uint8_t *s, int p, const uint8_t *d, int dp, int *min, int *max); -#define vpx_highbd_minmax_8x8 vpx_highbd_minmax_8x8_c - -void vpx_highbd_quantize_b_c(const tran_low_t *coeff_ptr, intptr_t n_coeffs, int skip_block, const int16_t *zbin_ptr, const int16_t *round_ptr, const int16_t *quant_ptr, const int16_t *quant_shift_ptr, tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr, const int16_t *dequant_ptr, uint16_t *eob_ptr, const int16_t *scan, const int16_t *iscan); -#define vpx_highbd_quantize_b vpx_highbd_quantize_b_c - -void vpx_highbd_quantize_b_32x32_c(const tran_low_t *coeff_ptr, intptr_t n_coeffs, int skip_block, const int16_t *zbin_ptr, const int16_t *round_ptr, const int16_t *quant_ptr, const int16_t *quant_shift_ptr, tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr, const int16_t *dequant_ptr, uint16_t *eob_ptr, const int16_t *scan, const int16_t *iscan); -#define vpx_highbd_quantize_b_32x32 vpx_highbd_quantize_b_32x32_c - -unsigned int vpx_highbd_sad16x16_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -#define vpx_highbd_sad16x16 vpx_highbd_sad16x16_c - -unsigned int vpx_highbd_sad16x16_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -#define vpx_highbd_sad16x16_avg vpx_highbd_sad16x16_avg_c - -void vpx_highbd_sad16x16x3_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -#define vpx_highbd_sad16x16x3 vpx_highbd_sad16x16x3_c - -void vpx_highbd_sad16x16x4d_c(const uint8_t *src_ptr, int src_stride, const uint8_t* const ref_ptr[], int ref_stride, uint32_t *sad_array); -#define vpx_highbd_sad16x16x4d vpx_highbd_sad16x16x4d_c - -void vpx_highbd_sad16x16x8_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -#define vpx_highbd_sad16x16x8 vpx_highbd_sad16x16x8_c - -unsigned int vpx_highbd_sad16x32_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -#define vpx_highbd_sad16x32 vpx_highbd_sad16x32_c - -unsigned int vpx_highbd_sad16x32_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -#define vpx_highbd_sad16x32_avg vpx_highbd_sad16x32_avg_c - -void vpx_highbd_sad16x32x4d_c(const uint8_t *src_ptr, int src_stride, const uint8_t* const ref_ptr[], int ref_stride, uint32_t *sad_array); -#define vpx_highbd_sad16x32x4d vpx_highbd_sad16x32x4d_c - -unsigned int vpx_highbd_sad16x8_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -#define vpx_highbd_sad16x8 vpx_highbd_sad16x8_c - -unsigned int vpx_highbd_sad16x8_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -#define vpx_highbd_sad16x8_avg vpx_highbd_sad16x8_avg_c - -void vpx_highbd_sad16x8x3_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -#define vpx_highbd_sad16x8x3 vpx_highbd_sad16x8x3_c - -void vpx_highbd_sad16x8x4d_c(const uint8_t *src_ptr, int src_stride, const uint8_t* const ref_ptr[], int ref_stride, uint32_t *sad_array); -#define vpx_highbd_sad16x8x4d vpx_highbd_sad16x8x4d_c - -void vpx_highbd_sad16x8x8_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -#define vpx_highbd_sad16x8x8 vpx_highbd_sad16x8x8_c - -unsigned int vpx_highbd_sad32x16_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -#define vpx_highbd_sad32x16 vpx_highbd_sad32x16_c - -unsigned int vpx_highbd_sad32x16_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -#define vpx_highbd_sad32x16_avg vpx_highbd_sad32x16_avg_c - -void vpx_highbd_sad32x16x4d_c(const uint8_t *src_ptr, int src_stride, const uint8_t* const ref_ptr[], int ref_stride, uint32_t *sad_array); -#define vpx_highbd_sad32x16x4d vpx_highbd_sad32x16x4d_c - -unsigned int vpx_highbd_sad32x32_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -#define vpx_highbd_sad32x32 vpx_highbd_sad32x32_c - -unsigned int vpx_highbd_sad32x32_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -#define vpx_highbd_sad32x32_avg vpx_highbd_sad32x32_avg_c - -void vpx_highbd_sad32x32x3_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -#define vpx_highbd_sad32x32x3 vpx_highbd_sad32x32x3_c - -void vpx_highbd_sad32x32x4d_c(const uint8_t *src_ptr, int src_stride, const uint8_t* const ref_ptr[], int ref_stride, uint32_t *sad_array); -#define vpx_highbd_sad32x32x4d vpx_highbd_sad32x32x4d_c - -void vpx_highbd_sad32x32x8_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -#define vpx_highbd_sad32x32x8 vpx_highbd_sad32x32x8_c - -unsigned int vpx_highbd_sad32x64_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -#define vpx_highbd_sad32x64 vpx_highbd_sad32x64_c - -unsigned int vpx_highbd_sad32x64_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -#define vpx_highbd_sad32x64_avg vpx_highbd_sad32x64_avg_c - -void vpx_highbd_sad32x64x4d_c(const uint8_t *src_ptr, int src_stride, const uint8_t* const ref_ptr[], int ref_stride, uint32_t *sad_array); -#define vpx_highbd_sad32x64x4d vpx_highbd_sad32x64x4d_c - -unsigned int vpx_highbd_sad4x4_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -#define vpx_highbd_sad4x4 vpx_highbd_sad4x4_c - -unsigned int vpx_highbd_sad4x4_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -#define vpx_highbd_sad4x4_avg vpx_highbd_sad4x4_avg_c - -void vpx_highbd_sad4x4x3_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -#define vpx_highbd_sad4x4x3 vpx_highbd_sad4x4x3_c - -void vpx_highbd_sad4x4x4d_c(const uint8_t *src_ptr, int src_stride, const uint8_t* const ref_ptr[], int ref_stride, uint32_t *sad_array); -#define vpx_highbd_sad4x4x4d vpx_highbd_sad4x4x4d_c - -void vpx_highbd_sad4x4x8_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -#define vpx_highbd_sad4x4x8 vpx_highbd_sad4x4x8_c - -unsigned int vpx_highbd_sad4x8_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -#define vpx_highbd_sad4x8 vpx_highbd_sad4x8_c - -unsigned int vpx_highbd_sad4x8_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -#define vpx_highbd_sad4x8_avg vpx_highbd_sad4x8_avg_c - -void vpx_highbd_sad4x8x4d_c(const uint8_t *src_ptr, int src_stride, const uint8_t* const ref_ptr[], int ref_stride, uint32_t *sad_array); -#define vpx_highbd_sad4x8x4d vpx_highbd_sad4x8x4d_c - -void vpx_highbd_sad4x8x8_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -#define vpx_highbd_sad4x8x8 vpx_highbd_sad4x8x8_c - -unsigned int vpx_highbd_sad64x32_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -#define vpx_highbd_sad64x32 vpx_highbd_sad64x32_c - -unsigned int vpx_highbd_sad64x32_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -#define vpx_highbd_sad64x32_avg vpx_highbd_sad64x32_avg_c - -void vpx_highbd_sad64x32x4d_c(const uint8_t *src_ptr, int src_stride, const uint8_t* const ref_ptr[], int ref_stride, uint32_t *sad_array); -#define vpx_highbd_sad64x32x4d vpx_highbd_sad64x32x4d_c - -unsigned int vpx_highbd_sad64x64_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -#define vpx_highbd_sad64x64 vpx_highbd_sad64x64_c - -unsigned int vpx_highbd_sad64x64_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -#define vpx_highbd_sad64x64_avg vpx_highbd_sad64x64_avg_c - -void vpx_highbd_sad64x64x3_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -#define vpx_highbd_sad64x64x3 vpx_highbd_sad64x64x3_c - -void vpx_highbd_sad64x64x4d_c(const uint8_t *src_ptr, int src_stride, const uint8_t* const ref_ptr[], int ref_stride, uint32_t *sad_array); -#define vpx_highbd_sad64x64x4d vpx_highbd_sad64x64x4d_c - -void vpx_highbd_sad64x64x8_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -#define vpx_highbd_sad64x64x8 vpx_highbd_sad64x64x8_c - -unsigned int vpx_highbd_sad8x16_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -#define vpx_highbd_sad8x16 vpx_highbd_sad8x16_c - -unsigned int vpx_highbd_sad8x16_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -#define vpx_highbd_sad8x16_avg vpx_highbd_sad8x16_avg_c - -void vpx_highbd_sad8x16x3_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -#define vpx_highbd_sad8x16x3 vpx_highbd_sad8x16x3_c - -void vpx_highbd_sad8x16x4d_c(const uint8_t *src_ptr, int src_stride, const uint8_t* const ref_ptr[], int ref_stride, uint32_t *sad_array); -#define vpx_highbd_sad8x16x4d vpx_highbd_sad8x16x4d_c - -void vpx_highbd_sad8x16x8_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -#define vpx_highbd_sad8x16x8 vpx_highbd_sad8x16x8_c - -unsigned int vpx_highbd_sad8x4_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -#define vpx_highbd_sad8x4 vpx_highbd_sad8x4_c - -unsigned int vpx_highbd_sad8x4_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -#define vpx_highbd_sad8x4_avg vpx_highbd_sad8x4_avg_c - -void vpx_highbd_sad8x4x4d_c(const uint8_t *src_ptr, int src_stride, const uint8_t* const ref_ptr[], int ref_stride, uint32_t *sad_array); -#define vpx_highbd_sad8x4x4d vpx_highbd_sad8x4x4d_c - -void vpx_highbd_sad8x4x8_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -#define vpx_highbd_sad8x4x8 vpx_highbd_sad8x4x8_c - -unsigned int vpx_highbd_sad8x8_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -#define vpx_highbd_sad8x8 vpx_highbd_sad8x8_c - -unsigned int vpx_highbd_sad8x8_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -#define vpx_highbd_sad8x8_avg vpx_highbd_sad8x8_avg_c - -void vpx_highbd_sad8x8x3_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -#define vpx_highbd_sad8x8x3 vpx_highbd_sad8x8x3_c - -void vpx_highbd_sad8x8x4d_c(const uint8_t *src_ptr, int src_stride, const uint8_t* const ref_ptr[], int ref_stride, uint32_t *sad_array); -#define vpx_highbd_sad8x8x4d vpx_highbd_sad8x8x4d_c - -void vpx_highbd_sad8x8x8_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -#define vpx_highbd_sad8x8x8 vpx_highbd_sad8x8x8_c - -void vpx_highbd_subtract_block_c(int rows, int cols, int16_t *diff_ptr, ptrdiff_t diff_stride, const uint8_t *src_ptr, ptrdiff_t src_stride, const uint8_t *pred_ptr, ptrdiff_t pred_stride, int bd); -#define vpx_highbd_subtract_block vpx_highbd_subtract_block_c - -void vpx_highbd_tm_predictor_16x16_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_tm_predictor_16x16 vpx_highbd_tm_predictor_16x16_c - -void vpx_highbd_tm_predictor_32x32_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_tm_predictor_32x32 vpx_highbd_tm_predictor_32x32_c - -void vpx_highbd_tm_predictor_4x4_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_tm_predictor_4x4 vpx_highbd_tm_predictor_4x4_c - -void vpx_highbd_tm_predictor_8x8_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_tm_predictor_8x8 vpx_highbd_tm_predictor_8x8_c - -void vpx_highbd_v_predictor_16x16_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_v_predictor_16x16 vpx_highbd_v_predictor_16x16_c - -void vpx_highbd_v_predictor_32x32_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_v_predictor_32x32 vpx_highbd_v_predictor_32x32_c - -void vpx_highbd_v_predictor_4x4_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_v_predictor_4x4 vpx_highbd_v_predictor_4x4_c - -void vpx_highbd_v_predictor_8x8_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_v_predictor_8x8 vpx_highbd_v_predictor_8x8_c - -void vpx_idct16x16_10_add_c(const tran_low_t *input, uint8_t *dest, int stride); -#define vpx_idct16x16_10_add vpx_idct16x16_10_add_c - -void vpx_idct16x16_1_add_c(const tran_low_t *input, uint8_t *dest, int stride); -#define vpx_idct16x16_1_add vpx_idct16x16_1_add_c - -void vpx_idct16x16_256_add_c(const tran_low_t *input, uint8_t *dest, int stride); -#define vpx_idct16x16_256_add vpx_idct16x16_256_add_c - -void vpx_idct32x32_1024_add_c(const tran_low_t *input, uint8_t *dest, int stride); -#define vpx_idct32x32_1024_add vpx_idct32x32_1024_add_c - -void vpx_idct32x32_135_add_c(const tran_low_t *input, uint8_t *dest, int stride); -#define vpx_idct32x32_135_add vpx_idct32x32_135_add_c - -void vpx_idct32x32_1_add_c(const tran_low_t *input, uint8_t *dest, int stride); -#define vpx_idct32x32_1_add vpx_idct32x32_1_add_c - -void vpx_idct32x32_34_add_c(const tran_low_t *input, uint8_t *dest, int stride); -#define vpx_idct32x32_34_add vpx_idct32x32_34_add_c - -void vpx_idct4x4_16_add_c(const tran_low_t *input, uint8_t *dest, int stride); -#define vpx_idct4x4_16_add vpx_idct4x4_16_add_c - -void vpx_idct4x4_1_add_c(const tran_low_t *input, uint8_t *dest, int stride); -#define vpx_idct4x4_1_add vpx_idct4x4_1_add_c - -void vpx_idct8x8_12_add_c(const tran_low_t *input, uint8_t *dest, int stride); -#define vpx_idct8x8_12_add vpx_idct8x8_12_add_c - -void vpx_idct8x8_1_add_c(const tran_low_t *input, uint8_t *dest, int stride); -#define vpx_idct8x8_1_add vpx_idct8x8_1_add_c - -void vpx_idct8x8_64_add_c(const tran_low_t *input, uint8_t *dest, int stride); -#define vpx_idct8x8_64_add vpx_idct8x8_64_add_c - -int16_t vpx_int_pro_col_c(const uint8_t *ref, const int width); -#define vpx_int_pro_col vpx_int_pro_col_c - -void vpx_int_pro_row_c(int16_t *hbuf, const uint8_t *ref, const int ref_stride, const int height); -#define vpx_int_pro_row vpx_int_pro_row_c - -void vpx_iwht4x4_16_add_c(const tran_low_t *input, uint8_t *dest, int stride); -#define vpx_iwht4x4_16_add vpx_iwht4x4_16_add_c - -void vpx_iwht4x4_1_add_c(const tran_low_t *input, uint8_t *dest, int stride); -#define vpx_iwht4x4_1_add vpx_iwht4x4_1_add_c - -void vpx_lpf_horizontal_16_c(uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh); -#define vpx_lpf_horizontal_16 vpx_lpf_horizontal_16_c - -void vpx_lpf_horizontal_16_dual_c(uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh); -#define vpx_lpf_horizontal_16_dual vpx_lpf_horizontal_16_dual_c - -void vpx_lpf_horizontal_4_c(uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh); -#define vpx_lpf_horizontal_4 vpx_lpf_horizontal_4_c - -void vpx_lpf_horizontal_4_dual_c(uint8_t *s, int pitch, const uint8_t *blimit0, const uint8_t *limit0, const uint8_t *thresh0, const uint8_t *blimit1, const uint8_t *limit1, const uint8_t *thresh1); -#define vpx_lpf_horizontal_4_dual vpx_lpf_horizontal_4_dual_c - -void vpx_lpf_horizontal_8_c(uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh); -#define vpx_lpf_horizontal_8 vpx_lpf_horizontal_8_c - -void vpx_lpf_horizontal_8_dual_c(uint8_t *s, int pitch, const uint8_t *blimit0, const uint8_t *limit0, const uint8_t *thresh0, const uint8_t *blimit1, const uint8_t *limit1, const uint8_t *thresh1); -#define vpx_lpf_horizontal_8_dual vpx_lpf_horizontal_8_dual_c - -void vpx_lpf_vertical_16_c(uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh); -#define vpx_lpf_vertical_16 vpx_lpf_vertical_16_c - -void vpx_lpf_vertical_16_dual_c(uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh); -#define vpx_lpf_vertical_16_dual vpx_lpf_vertical_16_dual_c - -void vpx_lpf_vertical_4_c(uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh); -#define vpx_lpf_vertical_4 vpx_lpf_vertical_4_c - -void vpx_lpf_vertical_4_dual_c(uint8_t *s, int pitch, const uint8_t *blimit0, const uint8_t *limit0, const uint8_t *thresh0, const uint8_t *blimit1, const uint8_t *limit1, const uint8_t *thresh1); -#define vpx_lpf_vertical_4_dual vpx_lpf_vertical_4_dual_c - -void vpx_lpf_vertical_8_c(uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh); -#define vpx_lpf_vertical_8 vpx_lpf_vertical_8_c - -void vpx_lpf_vertical_8_dual_c(uint8_t *s, int pitch, const uint8_t *blimit0, const uint8_t *limit0, const uint8_t *thresh0, const uint8_t *blimit1, const uint8_t *limit1, const uint8_t *thresh1); -#define vpx_lpf_vertical_8_dual vpx_lpf_vertical_8_dual_c - -void vpx_mbpost_proc_across_ip_c(unsigned char *dst, int pitch, int rows, int cols,int flimit); -#define vpx_mbpost_proc_across_ip vpx_mbpost_proc_across_ip_c - -void vpx_mbpost_proc_down_c(unsigned char *dst, int pitch, int rows, int cols,int flimit); -#define vpx_mbpost_proc_down vpx_mbpost_proc_down_c - -void vpx_minmax_8x8_c(const uint8_t *s, int p, const uint8_t *d, int dp, int *min, int *max); -#define vpx_minmax_8x8 vpx_minmax_8x8_c - -unsigned int vpx_mse16x16_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int recon_stride, unsigned int *sse); -#define vpx_mse16x16 vpx_mse16x16_c - -unsigned int vpx_mse16x8_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int recon_stride, unsigned int *sse); -#define vpx_mse16x8 vpx_mse16x8_c - -unsigned int vpx_mse8x16_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int recon_stride, unsigned int *sse); -#define vpx_mse8x16 vpx_mse8x16_c - -unsigned int vpx_mse8x8_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int recon_stride, unsigned int *sse); -#define vpx_mse8x8 vpx_mse8x8_c - -void vpx_plane_add_noise_c(uint8_t *start, const int8_t *noise, int blackclamp, int whiteclamp, int width, int height, int pitch); -#define vpx_plane_add_noise vpx_plane_add_noise_c - -void vpx_post_proc_down_and_across_mb_row_c(unsigned char *src, unsigned char *dst, int src_pitch, int dst_pitch, int cols, unsigned char *flimits, int size); -#define vpx_post_proc_down_and_across_mb_row vpx_post_proc_down_and_across_mb_row_c - -void vpx_quantize_b_c(const tran_low_t *coeff_ptr, intptr_t n_coeffs, int skip_block, const int16_t *zbin_ptr, const int16_t *round_ptr, const int16_t *quant_ptr, const int16_t *quant_shift_ptr, tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr, const int16_t *dequant_ptr, uint16_t *eob_ptr, const int16_t *scan, const int16_t *iscan); -#define vpx_quantize_b vpx_quantize_b_c - -void vpx_quantize_b_32x32_c(const tran_low_t *coeff_ptr, intptr_t n_coeffs, int skip_block, const int16_t *zbin_ptr, const int16_t *round_ptr, const int16_t *quant_ptr, const int16_t *quant_shift_ptr, tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr, const int16_t *dequant_ptr, uint16_t *eob_ptr, const int16_t *scan, const int16_t *iscan); -#define vpx_quantize_b_32x32 vpx_quantize_b_32x32_c - -unsigned int vpx_sad16x16_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -#define vpx_sad16x16 vpx_sad16x16_c - -unsigned int vpx_sad16x16_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -#define vpx_sad16x16_avg vpx_sad16x16_avg_c - -void vpx_sad16x16x3_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -#define vpx_sad16x16x3 vpx_sad16x16x3_c - -void vpx_sad16x16x4d_c(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); -#define vpx_sad16x16x4d vpx_sad16x16x4d_c - -void vpx_sad16x16x8_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -#define vpx_sad16x16x8 vpx_sad16x16x8_c - -unsigned int vpx_sad16x32_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -#define vpx_sad16x32 vpx_sad16x32_c - -unsigned int vpx_sad16x32_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -#define vpx_sad16x32_avg vpx_sad16x32_avg_c - -void vpx_sad16x32x4d_c(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); -#define vpx_sad16x32x4d vpx_sad16x32x4d_c - -unsigned int vpx_sad16x8_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -#define vpx_sad16x8 vpx_sad16x8_c - -unsigned int vpx_sad16x8_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -#define vpx_sad16x8_avg vpx_sad16x8_avg_c - -void vpx_sad16x8x3_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -#define vpx_sad16x8x3 vpx_sad16x8x3_c - -void vpx_sad16x8x4d_c(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); -#define vpx_sad16x8x4d vpx_sad16x8x4d_c - -void vpx_sad16x8x8_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -#define vpx_sad16x8x8 vpx_sad16x8x8_c - -unsigned int vpx_sad32x16_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -#define vpx_sad32x16 vpx_sad32x16_c - -unsigned int vpx_sad32x16_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -#define vpx_sad32x16_avg vpx_sad32x16_avg_c - -void vpx_sad32x16x4d_c(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); -#define vpx_sad32x16x4d vpx_sad32x16x4d_c - -unsigned int vpx_sad32x32_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -#define vpx_sad32x32 vpx_sad32x32_c - -unsigned int vpx_sad32x32_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -#define vpx_sad32x32_avg vpx_sad32x32_avg_c - -void vpx_sad32x32x3_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -#define vpx_sad32x32x3 vpx_sad32x32x3_c - -void vpx_sad32x32x4d_c(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); -#define vpx_sad32x32x4d vpx_sad32x32x4d_c - -void vpx_sad32x32x8_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -#define vpx_sad32x32x8 vpx_sad32x32x8_c - -unsigned int vpx_sad32x64_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -#define vpx_sad32x64 vpx_sad32x64_c - -unsigned int vpx_sad32x64_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -#define vpx_sad32x64_avg vpx_sad32x64_avg_c - -void vpx_sad32x64x4d_c(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); -#define vpx_sad32x64x4d vpx_sad32x64x4d_c - -unsigned int vpx_sad4x4_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -#define vpx_sad4x4 vpx_sad4x4_c - -unsigned int vpx_sad4x4_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -#define vpx_sad4x4_avg vpx_sad4x4_avg_c - -void vpx_sad4x4x3_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -#define vpx_sad4x4x3 vpx_sad4x4x3_c - -void vpx_sad4x4x4d_c(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); -#define vpx_sad4x4x4d vpx_sad4x4x4d_c - -void vpx_sad4x4x8_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -#define vpx_sad4x4x8 vpx_sad4x4x8_c - -unsigned int vpx_sad4x8_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -#define vpx_sad4x8 vpx_sad4x8_c - -unsigned int vpx_sad4x8_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -#define vpx_sad4x8_avg vpx_sad4x8_avg_c - -void vpx_sad4x8x4d_c(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); -#define vpx_sad4x8x4d vpx_sad4x8x4d_c - -void vpx_sad4x8x8_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -#define vpx_sad4x8x8 vpx_sad4x8x8_c - -unsigned int vpx_sad64x32_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -#define vpx_sad64x32 vpx_sad64x32_c - -unsigned int vpx_sad64x32_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -#define vpx_sad64x32_avg vpx_sad64x32_avg_c - -void vpx_sad64x32x4d_c(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); -#define vpx_sad64x32x4d vpx_sad64x32x4d_c - -unsigned int vpx_sad64x64_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -#define vpx_sad64x64 vpx_sad64x64_c - -unsigned int vpx_sad64x64_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -#define vpx_sad64x64_avg vpx_sad64x64_avg_c - -void vpx_sad64x64x3_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -#define vpx_sad64x64x3 vpx_sad64x64x3_c - -void vpx_sad64x64x4d_c(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); -#define vpx_sad64x64x4d vpx_sad64x64x4d_c - -void vpx_sad64x64x8_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -#define vpx_sad64x64x8 vpx_sad64x64x8_c - -unsigned int vpx_sad8x16_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -#define vpx_sad8x16 vpx_sad8x16_c - -unsigned int vpx_sad8x16_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -#define vpx_sad8x16_avg vpx_sad8x16_avg_c - -void vpx_sad8x16x3_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -#define vpx_sad8x16x3 vpx_sad8x16x3_c - -void vpx_sad8x16x4d_c(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); -#define vpx_sad8x16x4d vpx_sad8x16x4d_c - -void vpx_sad8x16x8_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -#define vpx_sad8x16x8 vpx_sad8x16x8_c - -unsigned int vpx_sad8x4_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -#define vpx_sad8x4 vpx_sad8x4_c - -unsigned int vpx_sad8x4_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -#define vpx_sad8x4_avg vpx_sad8x4_avg_c - -void vpx_sad8x4x4d_c(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); -#define vpx_sad8x4x4d vpx_sad8x4x4d_c - -void vpx_sad8x4x8_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -#define vpx_sad8x4x8 vpx_sad8x4x8_c - -unsigned int vpx_sad8x8_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -#define vpx_sad8x8 vpx_sad8x8_c - -unsigned int vpx_sad8x8_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -#define vpx_sad8x8_avg vpx_sad8x8_avg_c - -void vpx_sad8x8x3_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -#define vpx_sad8x8x3 vpx_sad8x8x3_c - -void vpx_sad8x8x4d_c(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); -#define vpx_sad8x8x4d vpx_sad8x8x4d_c - -void vpx_sad8x8x8_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -#define vpx_sad8x8x8 vpx_sad8x8x8_c - -int vpx_satd_c(const int16_t *coeff, int length); -#define vpx_satd vpx_satd_c - -void vpx_scaled_2d_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -#define vpx_scaled_2d vpx_scaled_2d_c - -void vpx_scaled_avg_2d_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -#define vpx_scaled_avg_2d vpx_scaled_avg_2d_c - -void vpx_scaled_avg_horiz_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -#define vpx_scaled_avg_horiz vpx_scaled_avg_horiz_c - -void vpx_scaled_avg_vert_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -#define vpx_scaled_avg_vert vpx_scaled_avg_vert_c - -void vpx_scaled_horiz_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -#define vpx_scaled_horiz vpx_scaled_horiz_c - -void vpx_scaled_vert_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -#define vpx_scaled_vert vpx_scaled_vert_c - -uint32_t vpx_sub_pixel_avg_variance16x16_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_sub_pixel_avg_variance16x16 vpx_sub_pixel_avg_variance16x16_c - -uint32_t vpx_sub_pixel_avg_variance16x32_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_sub_pixel_avg_variance16x32 vpx_sub_pixel_avg_variance16x32_c - -uint32_t vpx_sub_pixel_avg_variance16x8_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_sub_pixel_avg_variance16x8 vpx_sub_pixel_avg_variance16x8_c - -uint32_t vpx_sub_pixel_avg_variance32x16_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_sub_pixel_avg_variance32x16 vpx_sub_pixel_avg_variance32x16_c - -uint32_t vpx_sub_pixel_avg_variance32x32_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_sub_pixel_avg_variance32x32 vpx_sub_pixel_avg_variance32x32_c - -uint32_t vpx_sub_pixel_avg_variance32x64_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_sub_pixel_avg_variance32x64 vpx_sub_pixel_avg_variance32x64_c - -uint32_t vpx_sub_pixel_avg_variance4x4_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_sub_pixel_avg_variance4x4 vpx_sub_pixel_avg_variance4x4_c - -uint32_t vpx_sub_pixel_avg_variance4x8_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_sub_pixel_avg_variance4x8 vpx_sub_pixel_avg_variance4x8_c - -uint32_t vpx_sub_pixel_avg_variance64x32_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_sub_pixel_avg_variance64x32 vpx_sub_pixel_avg_variance64x32_c - -uint32_t vpx_sub_pixel_avg_variance64x64_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_sub_pixel_avg_variance64x64 vpx_sub_pixel_avg_variance64x64_c - -uint32_t vpx_sub_pixel_avg_variance8x16_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_sub_pixel_avg_variance8x16 vpx_sub_pixel_avg_variance8x16_c - -uint32_t vpx_sub_pixel_avg_variance8x4_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_sub_pixel_avg_variance8x4 vpx_sub_pixel_avg_variance8x4_c - -uint32_t vpx_sub_pixel_avg_variance8x8_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_sub_pixel_avg_variance8x8 vpx_sub_pixel_avg_variance8x8_c - -uint32_t vpx_sub_pixel_variance16x16_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -#define vpx_sub_pixel_variance16x16 vpx_sub_pixel_variance16x16_c - -uint32_t vpx_sub_pixel_variance16x32_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -#define vpx_sub_pixel_variance16x32 vpx_sub_pixel_variance16x32_c - -uint32_t vpx_sub_pixel_variance16x8_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -#define vpx_sub_pixel_variance16x8 vpx_sub_pixel_variance16x8_c - -uint32_t vpx_sub_pixel_variance32x16_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -#define vpx_sub_pixel_variance32x16 vpx_sub_pixel_variance32x16_c - -uint32_t vpx_sub_pixel_variance32x32_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -#define vpx_sub_pixel_variance32x32 vpx_sub_pixel_variance32x32_c - -uint32_t vpx_sub_pixel_variance32x64_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -#define vpx_sub_pixel_variance32x64 vpx_sub_pixel_variance32x64_c - -uint32_t vpx_sub_pixel_variance4x4_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -#define vpx_sub_pixel_variance4x4 vpx_sub_pixel_variance4x4_c - -uint32_t vpx_sub_pixel_variance4x8_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -#define vpx_sub_pixel_variance4x8 vpx_sub_pixel_variance4x8_c - -uint32_t vpx_sub_pixel_variance64x32_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -#define vpx_sub_pixel_variance64x32 vpx_sub_pixel_variance64x32_c - -uint32_t vpx_sub_pixel_variance64x64_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -#define vpx_sub_pixel_variance64x64 vpx_sub_pixel_variance64x64_c - -uint32_t vpx_sub_pixel_variance8x16_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -#define vpx_sub_pixel_variance8x16 vpx_sub_pixel_variance8x16_c - -uint32_t vpx_sub_pixel_variance8x4_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -#define vpx_sub_pixel_variance8x4 vpx_sub_pixel_variance8x4_c - -uint32_t vpx_sub_pixel_variance8x8_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -#define vpx_sub_pixel_variance8x8 vpx_sub_pixel_variance8x8_c - -void vpx_subtract_block_c(int rows, int cols, int16_t *diff_ptr, ptrdiff_t diff_stride, const uint8_t *src_ptr, ptrdiff_t src_stride, const uint8_t *pred_ptr, ptrdiff_t pred_stride); -#define vpx_subtract_block vpx_subtract_block_c - -uint64_t vpx_sum_squares_2d_i16_c(const int16_t *src, int stride, int size); -#define vpx_sum_squares_2d_i16 vpx_sum_squares_2d_i16_c - -void vpx_tm_predictor_16x16_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_tm_predictor_16x16 vpx_tm_predictor_16x16_c - -void vpx_tm_predictor_32x32_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_tm_predictor_32x32 vpx_tm_predictor_32x32_c - -void vpx_tm_predictor_4x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_tm_predictor_4x4 vpx_tm_predictor_4x4_c - -void vpx_tm_predictor_8x8_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_tm_predictor_8x8 vpx_tm_predictor_8x8_c - -void vpx_v_predictor_16x16_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_v_predictor_16x16 vpx_v_predictor_16x16_c - -void vpx_v_predictor_32x32_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_v_predictor_32x32 vpx_v_predictor_32x32_c - -void vpx_v_predictor_4x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_v_predictor_4x4 vpx_v_predictor_4x4_c - -void vpx_v_predictor_8x8_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_v_predictor_8x8 vpx_v_predictor_8x8_c - -unsigned int vpx_variance16x16_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_variance16x16 vpx_variance16x16_c - -unsigned int vpx_variance16x32_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_variance16x32 vpx_variance16x32_c - -unsigned int vpx_variance16x8_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_variance16x8 vpx_variance16x8_c - -unsigned int vpx_variance32x16_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_variance32x16 vpx_variance32x16_c - -unsigned int vpx_variance32x32_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_variance32x32 vpx_variance32x32_c - -unsigned int vpx_variance32x64_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_variance32x64 vpx_variance32x64_c - -unsigned int vpx_variance4x4_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_variance4x4 vpx_variance4x4_c - -unsigned int vpx_variance4x8_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_variance4x8 vpx_variance4x8_c - -unsigned int vpx_variance64x32_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_variance64x32 vpx_variance64x32_c - -unsigned int vpx_variance64x64_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_variance64x64 vpx_variance64x64_c - -unsigned int vpx_variance8x16_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_variance8x16 vpx_variance8x16_c - -unsigned int vpx_variance8x4_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_variance8x4 vpx_variance8x4_c - -unsigned int vpx_variance8x8_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_variance8x8 vpx_variance8x8_c - -void vpx_ve_predictor_4x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_ve_predictor_4x4 vpx_ve_predictor_4x4_c - -int vpx_vector_var_c(const int16_t *ref, const int16_t *src, const int bwl); -#define vpx_vector_var vpx_vector_var_c - -void vpx_dsp_rtcd(void); - -#include "vpx_config.h" - -#ifdef RTCD_C -static void setup_rtcd_internal(void) -{ -} -#endif - -#ifdef __cplusplus -} // extern "C" -#endif - -#endif diff --git a/WebRtc.NET/include/third_party/libvpx/source/config/linux/generic/vpx_scale_rtcd.h b/WebRtc.NET/include/third_party/libvpx/source/config/linux/generic/vpx_scale_rtcd.h deleted file mode 100644 index f419cc7a..00000000 --- a/WebRtc.NET/include/third_party/libvpx/source/config/linux/generic/vpx_scale_rtcd.h +++ /dev/null @@ -1,66 +0,0 @@ -#ifndef VPX_SCALE_RTCD_H_ -#define VPX_SCALE_RTCD_H_ - -#ifdef RTCD_C -#define RTCD_EXTERN -#else -#define RTCD_EXTERN extern -#endif - -struct yv12_buffer_config; - -#ifdef __cplusplus -extern "C" { -#endif - -void vp8_horizontal_line_2_1_scale_c(const unsigned char *source, unsigned int source_width, unsigned char *dest, unsigned int dest_width); -#define vp8_horizontal_line_2_1_scale vp8_horizontal_line_2_1_scale_c - -void vp8_horizontal_line_5_3_scale_c(const unsigned char *source, unsigned int source_width, unsigned char *dest, unsigned int dest_width); -#define vp8_horizontal_line_5_3_scale vp8_horizontal_line_5_3_scale_c - -void vp8_horizontal_line_5_4_scale_c(const unsigned char *source, unsigned int source_width, unsigned char *dest, unsigned int dest_width); -#define vp8_horizontal_line_5_4_scale vp8_horizontal_line_5_4_scale_c - -void vp8_vertical_band_2_1_scale_c(unsigned char *source, unsigned int src_pitch, unsigned char *dest, unsigned int dest_pitch, unsigned int dest_width); -#define vp8_vertical_band_2_1_scale vp8_vertical_band_2_1_scale_c - -void vp8_vertical_band_2_1_scale_i_c(unsigned char *source, unsigned int src_pitch, unsigned char *dest, unsigned int dest_pitch, unsigned int dest_width); -#define vp8_vertical_band_2_1_scale_i vp8_vertical_band_2_1_scale_i_c - -void vp8_vertical_band_5_3_scale_c(unsigned char *source, unsigned int src_pitch, unsigned char *dest, unsigned int dest_pitch, unsigned int dest_width); -#define vp8_vertical_band_5_3_scale vp8_vertical_band_5_3_scale_c - -void vp8_vertical_band_5_4_scale_c(unsigned char *source, unsigned int src_pitch, unsigned char *dest, unsigned int dest_pitch, unsigned int dest_width); -#define vp8_vertical_band_5_4_scale vp8_vertical_band_5_4_scale_c - -void vp8_yv12_copy_frame_c(const struct yv12_buffer_config *src_ybc, struct yv12_buffer_config *dst_ybc); -#define vp8_yv12_copy_frame vp8_yv12_copy_frame_c - -void vp8_yv12_extend_frame_borders_c(struct yv12_buffer_config *ybf); -#define vp8_yv12_extend_frame_borders vp8_yv12_extend_frame_borders_c - -void vpx_extend_frame_borders_c(struct yv12_buffer_config *ybf); -#define vpx_extend_frame_borders vpx_extend_frame_borders_c - -void vpx_extend_frame_inner_borders_c(struct yv12_buffer_config *ybf); -#define vpx_extend_frame_inner_borders vpx_extend_frame_inner_borders_c - -void vpx_yv12_copy_y_c(const struct yv12_buffer_config *src_ybc, struct yv12_buffer_config *dst_ybc); -#define vpx_yv12_copy_y vpx_yv12_copy_y_c - -void vpx_scale_rtcd(void); - -#include "vpx_config.h" - -#ifdef RTCD_C -static void setup_rtcd_internal(void) -{ -} -#endif - -#ifdef __cplusplus -} // extern "C" -#endif - -#endif diff --git a/WebRtc.NET/include/third_party/libvpx/source/config/linux/ia32/vp8_rtcd.h b/WebRtc.NET/include/third_party/libvpx/source/config/linux/ia32/vp8_rtcd.h deleted file mode 100644 index 3addf417..00000000 --- a/WebRtc.NET/include/third_party/libvpx/source/config/linux/ia32/vp8_rtcd.h +++ /dev/null @@ -1,333 +0,0 @@ -#ifndef VP8_RTCD_H_ -#define VP8_RTCD_H_ - -#ifdef RTCD_C -#define RTCD_EXTERN -#else -#define RTCD_EXTERN extern -#endif - -/* - * VP8 - */ - -struct blockd; -struct macroblockd; -struct loop_filter_info; - -/* Encoder forward decls */ -struct block; -struct macroblock; -struct variance_vtable; -union int_mv; -struct yv12_buffer_config; - -#ifdef __cplusplus -extern "C" { -#endif - -void vp8_bilinear_predict16x16_c(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch); -void vp8_bilinear_predict16x16_sse2(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch); -void vp8_bilinear_predict16x16_ssse3(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch); -RTCD_EXTERN void (*vp8_bilinear_predict16x16)(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch); - -void vp8_bilinear_predict4x4_c(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch); -void vp8_bilinear_predict4x4_mmx(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch); -RTCD_EXTERN void (*vp8_bilinear_predict4x4)(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch); - -void vp8_bilinear_predict8x4_c(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch); -void vp8_bilinear_predict8x4_mmx(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch); -RTCD_EXTERN void (*vp8_bilinear_predict8x4)(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch); - -void vp8_bilinear_predict8x8_c(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch); -void vp8_bilinear_predict8x8_sse2(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch); -void vp8_bilinear_predict8x8_ssse3(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch); -RTCD_EXTERN void (*vp8_bilinear_predict8x8)(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch); - -void vp8_blend_b_c(unsigned char *y, unsigned char *u, unsigned char *v, int y1, int u1, int v1, int alpha, int stride); -#define vp8_blend_b vp8_blend_b_c - -void vp8_blend_mb_inner_c(unsigned char *y, unsigned char *u, unsigned char *v, int y1, int u1, int v1, int alpha, int stride); -#define vp8_blend_mb_inner vp8_blend_mb_inner_c - -void vp8_blend_mb_outer_c(unsigned char *y, unsigned char *u, unsigned char *v, int y1, int u1, int v1, int alpha, int stride); -#define vp8_blend_mb_outer vp8_blend_mb_outer_c - -int vp8_block_error_c(short *coeff, short *dqcoeff); -int vp8_block_error_sse2(short *coeff, short *dqcoeff); -RTCD_EXTERN int (*vp8_block_error)(short *coeff, short *dqcoeff); - -void vp8_copy32xn_c(const unsigned char *src_ptr, int source_stride, unsigned char *dst_ptr, int dst_stride, int n); -void vp8_copy32xn_sse2(const unsigned char *src_ptr, int source_stride, unsigned char *dst_ptr, int dst_stride, int n); -void vp8_copy32xn_sse3(const unsigned char *src_ptr, int source_stride, unsigned char *dst_ptr, int dst_stride, int n); -RTCD_EXTERN void (*vp8_copy32xn)(const unsigned char *src_ptr, int source_stride, unsigned char *dst_ptr, int dst_stride, int n); - -void vp8_copy_mem16x16_c(unsigned char *src, int src_pitch, unsigned char *dst, int dst_pitch); -void vp8_copy_mem16x16_sse2(unsigned char *src, int src_pitch, unsigned char *dst, int dst_pitch); -RTCD_EXTERN void (*vp8_copy_mem16x16)(unsigned char *src, int src_pitch, unsigned char *dst, int dst_pitch); - -void vp8_copy_mem8x4_c(unsigned char *src, int src_pitch, unsigned char *dst, int dst_pitch); -void vp8_copy_mem8x4_mmx(unsigned char *src, int src_pitch, unsigned char *dst, int dst_pitch); -RTCD_EXTERN void (*vp8_copy_mem8x4)(unsigned char *src, int src_pitch, unsigned char *dst, int dst_pitch); - -void vp8_copy_mem8x8_c(unsigned char *src, int src_pitch, unsigned char *dst, int dst_pitch); -void vp8_copy_mem8x8_mmx(unsigned char *src, int src_pitch, unsigned char *dst, int dst_pitch); -RTCD_EXTERN void (*vp8_copy_mem8x8)(unsigned char *src, int src_pitch, unsigned char *dst, int dst_pitch); - -void vp8_dc_only_idct_add_c(short input, unsigned char *pred, int pred_stride, unsigned char *dst, int dst_stride); -void vp8_dc_only_idct_add_mmx(short input, unsigned char *pred, int pred_stride, unsigned char *dst, int dst_stride); -RTCD_EXTERN void (*vp8_dc_only_idct_add)(short input, unsigned char *pred, int pred_stride, unsigned char *dst, int dst_stride); - -int vp8_denoiser_filter_c(unsigned char *mc_running_avg_y, int mc_avg_y_stride, unsigned char *running_avg_y, int avg_y_stride, unsigned char *sig, int sig_stride, unsigned int motion_magnitude, int increase_denoising); -int vp8_denoiser_filter_sse2(unsigned char *mc_running_avg_y, int mc_avg_y_stride, unsigned char *running_avg_y, int avg_y_stride, unsigned char *sig, int sig_stride, unsigned int motion_magnitude, int increase_denoising); -RTCD_EXTERN int (*vp8_denoiser_filter)(unsigned char *mc_running_avg_y, int mc_avg_y_stride, unsigned char *running_avg_y, int avg_y_stride, unsigned char *sig, int sig_stride, unsigned int motion_magnitude, int increase_denoising); - -int vp8_denoiser_filter_uv_c(unsigned char *mc_running_avg, int mc_avg_stride, unsigned char *running_avg, int avg_stride, unsigned char *sig, int sig_stride, unsigned int motion_magnitude, int increase_denoising); -int vp8_denoiser_filter_uv_sse2(unsigned char *mc_running_avg, int mc_avg_stride, unsigned char *running_avg, int avg_stride, unsigned char *sig, int sig_stride, unsigned int motion_magnitude, int increase_denoising); -RTCD_EXTERN int (*vp8_denoiser_filter_uv)(unsigned char *mc_running_avg, int mc_avg_stride, unsigned char *running_avg, int avg_stride, unsigned char *sig, int sig_stride, unsigned int motion_magnitude, int increase_denoising); - -void vp8_dequant_idct_add_c(short *input, short *dq, unsigned char *output, int stride); -void vp8_dequant_idct_add_mmx(short *input, short *dq, unsigned char *output, int stride); -RTCD_EXTERN void (*vp8_dequant_idct_add)(short *input, short *dq, unsigned char *output, int stride); - -void vp8_dequant_idct_add_uv_block_c(short *q, short *dq, unsigned char *dst_u, unsigned char *dst_v, int stride, char *eobs); -void vp8_dequant_idct_add_uv_block_sse2(short *q, short *dq, unsigned char *dst_u, unsigned char *dst_v, int stride, char *eobs); -RTCD_EXTERN void (*vp8_dequant_idct_add_uv_block)(short *q, short *dq, unsigned char *dst_u, unsigned char *dst_v, int stride, char *eobs); - -void vp8_dequant_idct_add_y_block_c(short *q, short *dq, unsigned char *dst, int stride, char *eobs); -void vp8_dequant_idct_add_y_block_sse2(short *q, short *dq, unsigned char *dst, int stride, char *eobs); -RTCD_EXTERN void (*vp8_dequant_idct_add_y_block)(short *q, short *dq, unsigned char *dst, int stride, char *eobs); - -void vp8_dequantize_b_c(struct blockd*, short *dqc); -void vp8_dequantize_b_mmx(struct blockd*, short *dqc); -RTCD_EXTERN void (*vp8_dequantize_b)(struct blockd*, short *dqc); - -int vp8_diamond_search_sad_c(struct macroblock *x, struct block *b, struct blockd *d, union int_mv *ref_mv, union int_mv *best_mv, int search_param, int sad_per_bit, int *num00, struct variance_vtable *fn_ptr, int *mvcost[2], union int_mv *center_mv); -int vp8_diamond_search_sadx4(struct macroblock *x, struct block *b, struct blockd *d, union int_mv *ref_mv, union int_mv *best_mv, int search_param, int sad_per_bit, int *num00, struct variance_vtable *fn_ptr, int *mvcost[2], union int_mv *center_mv); -RTCD_EXTERN int (*vp8_diamond_search_sad)(struct macroblock *x, struct block *b, struct blockd *d, union int_mv *ref_mv, union int_mv *best_mv, int search_param, int sad_per_bit, int *num00, struct variance_vtable *fn_ptr, int *mvcost[2], union int_mv *center_mv); - -void vp8_fast_quantize_b_c(struct block *, struct blockd *); -void vp8_fast_quantize_b_sse2(struct block *, struct blockd *); -void vp8_fast_quantize_b_ssse3(struct block *, struct blockd *); -RTCD_EXTERN void (*vp8_fast_quantize_b)(struct block *, struct blockd *); - -void vp8_filter_by_weight16x16_c(unsigned char *src, int src_stride, unsigned char *dst, int dst_stride, int src_weight); -void vp8_filter_by_weight16x16_sse2(unsigned char *src, int src_stride, unsigned char *dst, int dst_stride, int src_weight); -RTCD_EXTERN void (*vp8_filter_by_weight16x16)(unsigned char *src, int src_stride, unsigned char *dst, int dst_stride, int src_weight); - -void vp8_filter_by_weight4x4_c(unsigned char *src, int src_stride, unsigned char *dst, int dst_stride, int src_weight); -#define vp8_filter_by_weight4x4 vp8_filter_by_weight4x4_c - -void vp8_filter_by_weight8x8_c(unsigned char *src, int src_stride, unsigned char *dst, int dst_stride, int src_weight); -void vp8_filter_by_weight8x8_sse2(unsigned char *src, int src_stride, unsigned char *dst, int dst_stride, int src_weight); -RTCD_EXTERN void (*vp8_filter_by_weight8x8)(unsigned char *src, int src_stride, unsigned char *dst, int dst_stride, int src_weight); - -int vp8_full_search_sad_c(struct macroblock *x, struct block *b, struct blockd *d, union int_mv *ref_mv, int sad_per_bit, int distance, struct variance_vtable *fn_ptr, int *mvcost[2], union int_mv *center_mv); -int vp8_full_search_sadx3(struct macroblock *x, struct block *b, struct blockd *d, union int_mv *ref_mv, int sad_per_bit, int distance, struct variance_vtable *fn_ptr, int *mvcost[2], union int_mv *center_mv); -int vp8_full_search_sadx8(struct macroblock *x, struct block *b, struct blockd *d, union int_mv *ref_mv, int sad_per_bit, int distance, struct variance_vtable *fn_ptr, int *mvcost[2], union int_mv *center_mv); -RTCD_EXTERN int (*vp8_full_search_sad)(struct macroblock *x, struct block *b, struct blockd *d, union int_mv *ref_mv, int sad_per_bit, int distance, struct variance_vtable *fn_ptr, int *mvcost[2], union int_mv *center_mv); - -void vp8_loop_filter_bh_c(unsigned char *y, unsigned char *u, unsigned char *v, int ystride, int uv_stride, struct loop_filter_info *lfi); -void vp8_loop_filter_bh_sse2(unsigned char *y, unsigned char *u, unsigned char *v, int ystride, int uv_stride, struct loop_filter_info *lfi); -RTCD_EXTERN void (*vp8_loop_filter_bh)(unsigned char *y, unsigned char *u, unsigned char *v, int ystride, int uv_stride, struct loop_filter_info *lfi); - -void vp8_loop_filter_bv_c(unsigned char *y, unsigned char *u, unsigned char *v, int ystride, int uv_stride, struct loop_filter_info *lfi); -void vp8_loop_filter_bv_sse2(unsigned char *y, unsigned char *u, unsigned char *v, int ystride, int uv_stride, struct loop_filter_info *lfi); -RTCD_EXTERN void (*vp8_loop_filter_bv)(unsigned char *y, unsigned char *u, unsigned char *v, int ystride, int uv_stride, struct loop_filter_info *lfi); - -void vp8_loop_filter_mbh_c(unsigned char *y, unsigned char *u, unsigned char *v, int ystride, int uv_stride, struct loop_filter_info *lfi); -void vp8_loop_filter_mbh_sse2(unsigned char *y, unsigned char *u, unsigned char *v, int ystride, int uv_stride, struct loop_filter_info *lfi); -RTCD_EXTERN void (*vp8_loop_filter_mbh)(unsigned char *y, unsigned char *u, unsigned char *v, int ystride, int uv_stride, struct loop_filter_info *lfi); - -void vp8_loop_filter_mbv_c(unsigned char *y, unsigned char *u, unsigned char *v, int ystride, int uv_stride, struct loop_filter_info *lfi); -void vp8_loop_filter_mbv_sse2(unsigned char *y, unsigned char *u, unsigned char *v, int ystride, int uv_stride, struct loop_filter_info *lfi); -RTCD_EXTERN void (*vp8_loop_filter_mbv)(unsigned char *y, unsigned char *u, unsigned char *v, int ystride, int uv_stride, struct loop_filter_info *lfi); - -void vp8_loop_filter_bhs_c(unsigned char *y, int ystride, const unsigned char *blimit); -void vp8_loop_filter_bhs_sse2(unsigned char *y, int ystride, const unsigned char *blimit); -RTCD_EXTERN void (*vp8_loop_filter_simple_bh)(unsigned char *y, int ystride, const unsigned char *blimit); - -void vp8_loop_filter_bvs_c(unsigned char *y, int ystride, const unsigned char *blimit); -void vp8_loop_filter_bvs_sse2(unsigned char *y, int ystride, const unsigned char *blimit); -RTCD_EXTERN void (*vp8_loop_filter_simple_bv)(unsigned char *y, int ystride, const unsigned char *blimit); - -void vp8_loop_filter_simple_horizontal_edge_c(unsigned char *y, int ystride, const unsigned char *blimit); -void vp8_loop_filter_simple_horizontal_edge_sse2(unsigned char *y, int ystride, const unsigned char *blimit); -RTCD_EXTERN void (*vp8_loop_filter_simple_mbh)(unsigned char *y, int ystride, const unsigned char *blimit); - -void vp8_loop_filter_simple_vertical_edge_c(unsigned char *y, int ystride, const unsigned char *blimit); -void vp8_loop_filter_simple_vertical_edge_sse2(unsigned char *y, int ystride, const unsigned char *blimit); -RTCD_EXTERN void (*vp8_loop_filter_simple_mbv)(unsigned char *y, int ystride, const unsigned char *blimit); - -int vp8_mbblock_error_c(struct macroblock *mb, int dc); -int vp8_mbblock_error_sse2(struct macroblock *mb, int dc); -RTCD_EXTERN int (*vp8_mbblock_error)(struct macroblock *mb, int dc); - -int vp8_mbuverror_c(struct macroblock *mb); -int vp8_mbuverror_sse2(struct macroblock *mb); -RTCD_EXTERN int (*vp8_mbuverror)(struct macroblock *mb); - -int vp8_refining_search_sad_c(struct macroblock *x, struct block *b, struct blockd *d, union int_mv *ref_mv, int sad_per_bit, int distance, struct variance_vtable *fn_ptr, int *mvcost[2], union int_mv *center_mv); -int vp8_refining_search_sadx4(struct macroblock *x, struct block *b, struct blockd *d, union int_mv *ref_mv, int sad_per_bit, int distance, struct variance_vtable *fn_ptr, int *mvcost[2], union int_mv *center_mv); -RTCD_EXTERN int (*vp8_refining_search_sad)(struct macroblock *x, struct block *b, struct blockd *d, union int_mv *ref_mv, int sad_per_bit, int distance, struct variance_vtable *fn_ptr, int *mvcost[2], union int_mv *center_mv); - -void vp8_regular_quantize_b_c(struct block *, struct blockd *); -void vp8_regular_quantize_b_sse2(struct block *, struct blockd *); -void vp8_regular_quantize_b_sse4_1(struct block *, struct blockd *); -RTCD_EXTERN void (*vp8_regular_quantize_b)(struct block *, struct blockd *); - -void vp8_short_fdct4x4_c(short *input, short *output, int pitch); -void vp8_short_fdct4x4_sse2(short *input, short *output, int pitch); -RTCD_EXTERN void (*vp8_short_fdct4x4)(short *input, short *output, int pitch); - -void vp8_short_fdct8x4_c(short *input, short *output, int pitch); -void vp8_short_fdct8x4_sse2(short *input, short *output, int pitch); -RTCD_EXTERN void (*vp8_short_fdct8x4)(short *input, short *output, int pitch); - -void vp8_short_idct4x4llm_c(short *input, unsigned char *pred, int pitch, unsigned char *dst, int dst_stride); -void vp8_short_idct4x4llm_mmx(short *input, unsigned char *pred, int pitch, unsigned char *dst, int dst_stride); -RTCD_EXTERN void (*vp8_short_idct4x4llm)(short *input, unsigned char *pred, int pitch, unsigned char *dst, int dst_stride); - -void vp8_short_inv_walsh4x4_c(short *input, short *output); -void vp8_short_inv_walsh4x4_sse2(short *input, short *output); -RTCD_EXTERN void (*vp8_short_inv_walsh4x4)(short *input, short *output); - -void vp8_short_inv_walsh4x4_1_c(short *input, short *output); -#define vp8_short_inv_walsh4x4_1 vp8_short_inv_walsh4x4_1_c - -void vp8_short_walsh4x4_c(short *input, short *output, int pitch); -void vp8_short_walsh4x4_sse2(short *input, short *output, int pitch); -RTCD_EXTERN void (*vp8_short_walsh4x4)(short *input, short *output, int pitch); - -void vp8_sixtap_predict16x16_c(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch); -void vp8_sixtap_predict16x16_sse2(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch); -void vp8_sixtap_predict16x16_ssse3(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch); -RTCD_EXTERN void (*vp8_sixtap_predict16x16)(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch); - -void vp8_sixtap_predict4x4_c(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch); -void vp8_sixtap_predict4x4_mmx(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch); -void vp8_sixtap_predict4x4_ssse3(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch); -RTCD_EXTERN void (*vp8_sixtap_predict4x4)(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch); - -void vp8_sixtap_predict8x4_c(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch); -void vp8_sixtap_predict8x4_sse2(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch); -void vp8_sixtap_predict8x4_ssse3(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch); -RTCD_EXTERN void (*vp8_sixtap_predict8x4)(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch); - -void vp8_sixtap_predict8x8_c(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch); -void vp8_sixtap_predict8x8_sse2(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch); -void vp8_sixtap_predict8x8_ssse3(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch); -RTCD_EXTERN void (*vp8_sixtap_predict8x8)(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch); - -void vp8_rtcd(void); - -#ifdef RTCD_C -#include "vpx_ports/x86.h" -static void setup_rtcd_internal(void) -{ - int flags = x86_simd_caps(); - - (void)flags; - - vp8_bilinear_predict16x16 = vp8_bilinear_predict16x16_c; - if (flags & HAS_SSE2) vp8_bilinear_predict16x16 = vp8_bilinear_predict16x16_sse2; - if (flags & HAS_SSSE3) vp8_bilinear_predict16x16 = vp8_bilinear_predict16x16_ssse3; - vp8_bilinear_predict4x4 = vp8_bilinear_predict4x4_c; - if (flags & HAS_MMX) vp8_bilinear_predict4x4 = vp8_bilinear_predict4x4_mmx; - vp8_bilinear_predict8x4 = vp8_bilinear_predict8x4_c; - if (flags & HAS_MMX) vp8_bilinear_predict8x4 = vp8_bilinear_predict8x4_mmx; - vp8_bilinear_predict8x8 = vp8_bilinear_predict8x8_c; - if (flags & HAS_SSE2) vp8_bilinear_predict8x8 = vp8_bilinear_predict8x8_sse2; - if (flags & HAS_SSSE3) vp8_bilinear_predict8x8 = vp8_bilinear_predict8x8_ssse3; - vp8_block_error = vp8_block_error_c; - if (flags & HAS_SSE2) vp8_block_error = vp8_block_error_sse2; - vp8_copy32xn = vp8_copy32xn_c; - if (flags & HAS_SSE2) vp8_copy32xn = vp8_copy32xn_sse2; - if (flags & HAS_SSE3) vp8_copy32xn = vp8_copy32xn_sse3; - vp8_copy_mem16x16 = vp8_copy_mem16x16_c; - if (flags & HAS_SSE2) vp8_copy_mem16x16 = vp8_copy_mem16x16_sse2; - vp8_copy_mem8x4 = vp8_copy_mem8x4_c; - if (flags & HAS_MMX) vp8_copy_mem8x4 = vp8_copy_mem8x4_mmx; - vp8_copy_mem8x8 = vp8_copy_mem8x8_c; - if (flags & HAS_MMX) vp8_copy_mem8x8 = vp8_copy_mem8x8_mmx; - vp8_dc_only_idct_add = vp8_dc_only_idct_add_c; - if (flags & HAS_MMX) vp8_dc_only_idct_add = vp8_dc_only_idct_add_mmx; - vp8_denoiser_filter = vp8_denoiser_filter_c; - if (flags & HAS_SSE2) vp8_denoiser_filter = vp8_denoiser_filter_sse2; - vp8_denoiser_filter_uv = vp8_denoiser_filter_uv_c; - if (flags & HAS_SSE2) vp8_denoiser_filter_uv = vp8_denoiser_filter_uv_sse2; - vp8_dequant_idct_add = vp8_dequant_idct_add_c; - if (flags & HAS_MMX) vp8_dequant_idct_add = vp8_dequant_idct_add_mmx; - vp8_dequant_idct_add_uv_block = vp8_dequant_idct_add_uv_block_c; - if (flags & HAS_SSE2) vp8_dequant_idct_add_uv_block = vp8_dequant_idct_add_uv_block_sse2; - vp8_dequant_idct_add_y_block = vp8_dequant_idct_add_y_block_c; - if (flags & HAS_SSE2) vp8_dequant_idct_add_y_block = vp8_dequant_idct_add_y_block_sse2; - vp8_dequantize_b = vp8_dequantize_b_c; - if (flags & HAS_MMX) vp8_dequantize_b = vp8_dequantize_b_mmx; - vp8_diamond_search_sad = vp8_diamond_search_sad_c; - if (flags & HAS_SSE2) vp8_diamond_search_sad = vp8_diamond_search_sadx4; - vp8_fast_quantize_b = vp8_fast_quantize_b_c; - if (flags & HAS_SSE2) vp8_fast_quantize_b = vp8_fast_quantize_b_sse2; - if (flags & HAS_SSSE3) vp8_fast_quantize_b = vp8_fast_quantize_b_ssse3; - vp8_filter_by_weight16x16 = vp8_filter_by_weight16x16_c; - if (flags & HAS_SSE2) vp8_filter_by_weight16x16 = vp8_filter_by_weight16x16_sse2; - vp8_filter_by_weight8x8 = vp8_filter_by_weight8x8_c; - if (flags & HAS_SSE2) vp8_filter_by_weight8x8 = vp8_filter_by_weight8x8_sse2; - vp8_full_search_sad = vp8_full_search_sad_c; - if (flags & HAS_SSE3) vp8_full_search_sad = vp8_full_search_sadx3; - if (flags & HAS_SSE4_1) vp8_full_search_sad = vp8_full_search_sadx8; - vp8_loop_filter_bh = vp8_loop_filter_bh_c; - if (flags & HAS_SSE2) vp8_loop_filter_bh = vp8_loop_filter_bh_sse2; - vp8_loop_filter_bv = vp8_loop_filter_bv_c; - if (flags & HAS_SSE2) vp8_loop_filter_bv = vp8_loop_filter_bv_sse2; - vp8_loop_filter_mbh = vp8_loop_filter_mbh_c; - if (flags & HAS_SSE2) vp8_loop_filter_mbh = vp8_loop_filter_mbh_sse2; - vp8_loop_filter_mbv = vp8_loop_filter_mbv_c; - if (flags & HAS_SSE2) vp8_loop_filter_mbv = vp8_loop_filter_mbv_sse2; - vp8_loop_filter_simple_bh = vp8_loop_filter_bhs_c; - if (flags & HAS_SSE2) vp8_loop_filter_simple_bh = vp8_loop_filter_bhs_sse2; - vp8_loop_filter_simple_bv = vp8_loop_filter_bvs_c; - if (flags & HAS_SSE2) vp8_loop_filter_simple_bv = vp8_loop_filter_bvs_sse2; - vp8_loop_filter_simple_mbh = vp8_loop_filter_simple_horizontal_edge_c; - if (flags & HAS_SSE2) vp8_loop_filter_simple_mbh = vp8_loop_filter_simple_horizontal_edge_sse2; - vp8_loop_filter_simple_mbv = vp8_loop_filter_simple_vertical_edge_c; - if (flags & HAS_SSE2) vp8_loop_filter_simple_mbv = vp8_loop_filter_simple_vertical_edge_sse2; - vp8_mbblock_error = vp8_mbblock_error_c; - if (flags & HAS_SSE2) vp8_mbblock_error = vp8_mbblock_error_sse2; - vp8_mbuverror = vp8_mbuverror_c; - if (flags & HAS_SSE2) vp8_mbuverror = vp8_mbuverror_sse2; - vp8_refining_search_sad = vp8_refining_search_sad_c; - if (flags & HAS_SSE2) vp8_refining_search_sad = vp8_refining_search_sadx4; - vp8_regular_quantize_b = vp8_regular_quantize_b_c; - if (flags & HAS_SSE2) vp8_regular_quantize_b = vp8_regular_quantize_b_sse2; - if (flags & HAS_SSE4_1) vp8_regular_quantize_b = vp8_regular_quantize_b_sse4_1; - vp8_short_fdct4x4 = vp8_short_fdct4x4_c; - if (flags & HAS_SSE2) vp8_short_fdct4x4 = vp8_short_fdct4x4_sse2; - vp8_short_fdct8x4 = vp8_short_fdct8x4_c; - if (flags & HAS_SSE2) vp8_short_fdct8x4 = vp8_short_fdct8x4_sse2; - vp8_short_idct4x4llm = vp8_short_idct4x4llm_c; - if (flags & HAS_MMX) vp8_short_idct4x4llm = vp8_short_idct4x4llm_mmx; - vp8_short_inv_walsh4x4 = vp8_short_inv_walsh4x4_c; - if (flags & HAS_SSE2) vp8_short_inv_walsh4x4 = vp8_short_inv_walsh4x4_sse2; - vp8_short_walsh4x4 = vp8_short_walsh4x4_c; - if (flags & HAS_SSE2) vp8_short_walsh4x4 = vp8_short_walsh4x4_sse2; - vp8_sixtap_predict16x16 = vp8_sixtap_predict16x16_c; - if (flags & HAS_SSE2) vp8_sixtap_predict16x16 = vp8_sixtap_predict16x16_sse2; - if (flags & HAS_SSSE3) vp8_sixtap_predict16x16 = vp8_sixtap_predict16x16_ssse3; - vp8_sixtap_predict4x4 = vp8_sixtap_predict4x4_c; - if (flags & HAS_MMX) vp8_sixtap_predict4x4 = vp8_sixtap_predict4x4_mmx; - if (flags & HAS_SSSE3) vp8_sixtap_predict4x4 = vp8_sixtap_predict4x4_ssse3; - vp8_sixtap_predict8x4 = vp8_sixtap_predict8x4_c; - if (flags & HAS_SSE2) vp8_sixtap_predict8x4 = vp8_sixtap_predict8x4_sse2; - if (flags & HAS_SSSE3) vp8_sixtap_predict8x4 = vp8_sixtap_predict8x4_ssse3; - vp8_sixtap_predict8x8 = vp8_sixtap_predict8x8_c; - if (flags & HAS_SSE2) vp8_sixtap_predict8x8 = vp8_sixtap_predict8x8_sse2; - if (flags & HAS_SSSE3) vp8_sixtap_predict8x8 = vp8_sixtap_predict8x8_ssse3; -} -#endif - -#ifdef __cplusplus -} // extern "C" -#endif - -#endif diff --git a/WebRtc.NET/include/third_party/libvpx/source/config/linux/ia32/vp9_rtcd.h b/WebRtc.NET/include/third_party/libvpx/source/config/linux/ia32/vp9_rtcd.h deleted file mode 100644 index 28b5da86..00000000 --- a/WebRtc.NET/include/third_party/libvpx/source/config/linux/ia32/vp9_rtcd.h +++ /dev/null @@ -1,197 +0,0 @@ -#ifndef VP9_RTCD_H_ -#define VP9_RTCD_H_ - -#ifdef RTCD_C -#define RTCD_EXTERN -#else -#define RTCD_EXTERN extern -#endif - -/* - * VP9 - */ - -#include "vpx/vpx_integer.h" -#include "vp9/common/vp9_common.h" -#include "vp9/common/vp9_enums.h" - -struct macroblockd; - -/* Encoder forward decls */ -struct macroblock; -struct vp9_variance_vtable; -struct search_site_config; -struct mv; -union int_mv; -struct yv12_buffer_config; - -#ifdef __cplusplus -extern "C" { -#endif - -int64_t vp9_block_error_c(const tran_low_t *coeff, const tran_low_t *dqcoeff, intptr_t block_size, int64_t *ssz); -#define vp9_block_error vp9_block_error_c - -int vp9_denoiser_filter_c(const uint8_t *sig, int sig_stride, const uint8_t *mc_avg, int mc_avg_stride, uint8_t *avg, int avg_stride, int increase_denoising, BLOCK_SIZE bs, int motion_magnitude); -int vp9_denoiser_filter_sse2(const uint8_t *sig, int sig_stride, const uint8_t *mc_avg, int mc_avg_stride, uint8_t *avg, int avg_stride, int increase_denoising, BLOCK_SIZE bs, int motion_magnitude); -RTCD_EXTERN int (*vp9_denoiser_filter)(const uint8_t *sig, int sig_stride, const uint8_t *mc_avg, int mc_avg_stride, uint8_t *avg, int avg_stride, int increase_denoising, BLOCK_SIZE bs, int motion_magnitude); - -int vp9_diamond_search_sad_c(const struct macroblock *x, const struct search_site_config *cfg, struct mv *ref_mv, struct mv *best_mv, int search_param, int sad_per_bit, int *num00, const struct vp9_variance_vtable *fn_ptr, const struct mv *center_mv); -int vp9_diamond_search_sad_avx(const struct macroblock *x, const struct search_site_config *cfg, struct mv *ref_mv, struct mv *best_mv, int search_param, int sad_per_bit, int *num00, const struct vp9_variance_vtable *fn_ptr, const struct mv *center_mv); -RTCD_EXTERN int (*vp9_diamond_search_sad)(const struct macroblock *x, const struct search_site_config *cfg, struct mv *ref_mv, struct mv *best_mv, int search_param, int sad_per_bit, int *num00, const struct vp9_variance_vtable *fn_ptr, const struct mv *center_mv); - -void vp9_fdct8x8_quant_c(const int16_t *input, int stride, tran_low_t *coeff_ptr, intptr_t n_coeffs, int skip_block, const int16_t *zbin_ptr, const int16_t *round_ptr, const int16_t *quant_ptr, const int16_t *quant_shift_ptr, tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr, const int16_t *dequant_ptr, uint16_t *eob_ptr, const int16_t *scan, const int16_t *iscan); -void vp9_fdct8x8_quant_ssse3(const int16_t *input, int stride, tran_low_t *coeff_ptr, intptr_t n_coeffs, int skip_block, const int16_t *zbin_ptr, const int16_t *round_ptr, const int16_t *quant_ptr, const int16_t *quant_shift_ptr, tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr, const int16_t *dequant_ptr, uint16_t *eob_ptr, const int16_t *scan, const int16_t *iscan); -RTCD_EXTERN void (*vp9_fdct8x8_quant)(const int16_t *input, int stride, tran_low_t *coeff_ptr, intptr_t n_coeffs, int skip_block, const int16_t *zbin_ptr, const int16_t *round_ptr, const int16_t *quant_ptr, const int16_t *quant_shift_ptr, tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr, const int16_t *dequant_ptr, uint16_t *eob_ptr, const int16_t *scan, const int16_t *iscan); - -void vp9_fht16x16_c(const int16_t *input, tran_low_t *output, int stride, int tx_type); -void vp9_fht16x16_sse2(const int16_t *input, tran_low_t *output, int stride, int tx_type); -RTCD_EXTERN void (*vp9_fht16x16)(const int16_t *input, tran_low_t *output, int stride, int tx_type); - -void vp9_fht4x4_c(const int16_t *input, tran_low_t *output, int stride, int tx_type); -void vp9_fht4x4_sse2(const int16_t *input, tran_low_t *output, int stride, int tx_type); -RTCD_EXTERN void (*vp9_fht4x4)(const int16_t *input, tran_low_t *output, int stride, int tx_type); - -void vp9_fht8x8_c(const int16_t *input, tran_low_t *output, int stride, int tx_type); -void vp9_fht8x8_sse2(const int16_t *input, tran_low_t *output, int stride, int tx_type); -RTCD_EXTERN void (*vp9_fht8x8)(const int16_t *input, tran_low_t *output, int stride, int tx_type); - -void vp9_filter_by_weight16x16_c(const uint8_t *src, int src_stride, uint8_t *dst, int dst_stride, int src_weight); -void vp9_filter_by_weight16x16_sse2(const uint8_t *src, int src_stride, uint8_t *dst, int dst_stride, int src_weight); -RTCD_EXTERN void (*vp9_filter_by_weight16x16)(const uint8_t *src, int src_stride, uint8_t *dst, int dst_stride, int src_weight); - -void vp9_filter_by_weight8x8_c(const uint8_t *src, int src_stride, uint8_t *dst, int dst_stride, int src_weight); -void vp9_filter_by_weight8x8_sse2(const uint8_t *src, int src_stride, uint8_t *dst, int dst_stride, int src_weight); -RTCD_EXTERN void (*vp9_filter_by_weight8x8)(const uint8_t *src, int src_stride, uint8_t *dst, int dst_stride, int src_weight); - -int vp9_full_search_sad_c(const struct macroblock *x, const struct mv *ref_mv, int sad_per_bit, int distance, const struct vp9_variance_vtable *fn_ptr, const struct mv *center_mv, struct mv *best_mv); -int vp9_full_search_sadx3(const struct macroblock *x, const struct mv *ref_mv, int sad_per_bit, int distance, const struct vp9_variance_vtable *fn_ptr, const struct mv *center_mv, struct mv *best_mv); -int vp9_full_search_sadx8(const struct macroblock *x, const struct mv *ref_mv, int sad_per_bit, int distance, const struct vp9_variance_vtable *fn_ptr, const struct mv *center_mv, struct mv *best_mv); -RTCD_EXTERN int (*vp9_full_search_sad)(const struct macroblock *x, const struct mv *ref_mv, int sad_per_bit, int distance, const struct vp9_variance_vtable *fn_ptr, const struct mv *center_mv, struct mv *best_mv); - -void vp9_fwht4x4_c(const int16_t *input, tran_low_t *output, int stride); -void vp9_fwht4x4_sse2(const int16_t *input, tran_low_t *output, int stride); -RTCD_EXTERN void (*vp9_fwht4x4)(const int16_t *input, tran_low_t *output, int stride); - -int64_t vp9_highbd_block_error_c(const tran_low_t *coeff, const tran_low_t *dqcoeff, intptr_t block_size, int64_t *ssz, int bd); -int64_t vp9_highbd_block_error_sse2(const tran_low_t *coeff, const tran_low_t *dqcoeff, intptr_t block_size, int64_t *ssz, int bd); -RTCD_EXTERN int64_t (*vp9_highbd_block_error)(const tran_low_t *coeff, const tran_low_t *dqcoeff, intptr_t block_size, int64_t *ssz, int bd); - -int64_t vp9_highbd_block_error_8bit_c(const tran_low_t *coeff, const tran_low_t *dqcoeff, intptr_t block_size, int64_t *ssz); -int64_t vp9_highbd_block_error_8bit_sse2(const tran_low_t *coeff, const tran_low_t *dqcoeff, intptr_t block_size, int64_t *ssz); -int64_t vp9_highbd_block_error_8bit_avx(const tran_low_t *coeff, const tran_low_t *dqcoeff, intptr_t block_size, int64_t *ssz); -RTCD_EXTERN int64_t (*vp9_highbd_block_error_8bit)(const tran_low_t *coeff, const tran_low_t *dqcoeff, intptr_t block_size, int64_t *ssz); - -void vp9_highbd_fht16x16_c(const int16_t *input, tran_low_t *output, int stride, int tx_type); -#define vp9_highbd_fht16x16 vp9_highbd_fht16x16_c - -void vp9_highbd_fht4x4_c(const int16_t *input, tran_low_t *output, int stride, int tx_type); -#define vp9_highbd_fht4x4 vp9_highbd_fht4x4_c - -void vp9_highbd_fht8x8_c(const int16_t *input, tran_low_t *output, int stride, int tx_type); -#define vp9_highbd_fht8x8 vp9_highbd_fht8x8_c - -void vp9_highbd_fwht4x4_c(const int16_t *input, tran_low_t *output, int stride); -#define vp9_highbd_fwht4x4 vp9_highbd_fwht4x4_c - -void vp9_highbd_iht16x16_256_add_c(const tran_low_t *input, uint8_t *output, int pitch, int tx_type, int bd); -#define vp9_highbd_iht16x16_256_add vp9_highbd_iht16x16_256_add_c - -void vp9_highbd_iht4x4_16_add_c(const tran_low_t *input, uint8_t *dest, int stride, int tx_type, int bd); -#define vp9_highbd_iht4x4_16_add vp9_highbd_iht4x4_16_add_c - -void vp9_highbd_iht8x8_64_add_c(const tran_low_t *input, uint8_t *dest, int stride, int tx_type, int bd); -#define vp9_highbd_iht8x8_64_add vp9_highbd_iht8x8_64_add_c - -void vp9_highbd_mbpost_proc_across_ip_c(uint16_t *src, int pitch, int rows, int cols, int flimit); -#define vp9_highbd_mbpost_proc_across_ip vp9_highbd_mbpost_proc_across_ip_c - -void vp9_highbd_mbpost_proc_down_c(uint16_t *dst, int pitch, int rows, int cols, int flimit); -#define vp9_highbd_mbpost_proc_down vp9_highbd_mbpost_proc_down_c - -void vp9_highbd_post_proc_down_and_across_c(const uint16_t *src_ptr, uint16_t *dst_ptr, int src_pixels_per_line, int dst_pixels_per_line, int rows, int cols, int flimit); -#define vp9_highbd_post_proc_down_and_across vp9_highbd_post_proc_down_and_across_c - -void vp9_highbd_quantize_fp_c(const tran_low_t *coeff_ptr, intptr_t n_coeffs, int skip_block, const int16_t *zbin_ptr, const int16_t *round_ptr, const int16_t *quant_ptr, const int16_t *quant_shift_ptr, tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr, const int16_t *dequant_ptr, uint16_t *eob_ptr, const int16_t *scan, const int16_t *iscan); -#define vp9_highbd_quantize_fp vp9_highbd_quantize_fp_c - -void vp9_highbd_quantize_fp_32x32_c(const tran_low_t *coeff_ptr, intptr_t n_coeffs, int skip_block, const int16_t *zbin_ptr, const int16_t *round_ptr, const int16_t *quant_ptr, const int16_t *quant_shift_ptr, tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr, const int16_t *dequant_ptr, uint16_t *eob_ptr, const int16_t *scan, const int16_t *iscan); -#define vp9_highbd_quantize_fp_32x32 vp9_highbd_quantize_fp_32x32_c - -void vp9_highbd_temporal_filter_apply_c(uint8_t *frame1, unsigned int stride, uint8_t *frame2, unsigned int block_width, unsigned int block_height, int strength, int filter_weight, unsigned int *accumulator, uint16_t *count); -#define vp9_highbd_temporal_filter_apply vp9_highbd_temporal_filter_apply_c - -void vp9_iht16x16_256_add_c(const tran_low_t *input, uint8_t *output, int pitch, int tx_type); -void vp9_iht16x16_256_add_sse2(const tran_low_t *input, uint8_t *output, int pitch, int tx_type); -RTCD_EXTERN void (*vp9_iht16x16_256_add)(const tran_low_t *input, uint8_t *output, int pitch, int tx_type); - -void vp9_iht4x4_16_add_c(const tran_low_t *input, uint8_t *dest, int stride, int tx_type); -void vp9_iht4x4_16_add_sse2(const tran_low_t *input, uint8_t *dest, int stride, int tx_type); -RTCD_EXTERN void (*vp9_iht4x4_16_add)(const tran_low_t *input, uint8_t *dest, int stride, int tx_type); - -void vp9_iht8x8_64_add_c(const tran_low_t *input, uint8_t *dest, int stride, int tx_type); -void vp9_iht8x8_64_add_sse2(const tran_low_t *input, uint8_t *dest, int stride, int tx_type); -RTCD_EXTERN void (*vp9_iht8x8_64_add)(const tran_low_t *input, uint8_t *dest, int stride, int tx_type); - -void vp9_quantize_fp_c(const tran_low_t *coeff_ptr, intptr_t n_coeffs, int skip_block, const int16_t *zbin_ptr, const int16_t *round_ptr, const int16_t *quant_ptr, const int16_t *quant_shift_ptr, tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr, const int16_t *dequant_ptr, uint16_t *eob_ptr, const int16_t *scan, const int16_t *iscan); -#define vp9_quantize_fp vp9_quantize_fp_c - -void vp9_quantize_fp_32x32_c(const tran_low_t *coeff_ptr, intptr_t n_coeffs, int skip_block, const int16_t *zbin_ptr, const int16_t *round_ptr, const int16_t *quant_ptr, const int16_t *quant_shift_ptr, tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr, const int16_t *dequant_ptr, uint16_t *eob_ptr, const int16_t *scan, const int16_t *iscan); -#define vp9_quantize_fp_32x32 vp9_quantize_fp_32x32_c - -void vp9_temporal_filter_apply_c(uint8_t *frame1, unsigned int stride, uint8_t *frame2, unsigned int block_width, unsigned int block_height, int strength, int filter_weight, unsigned int *accumulator, uint16_t *count); -void vp9_temporal_filter_apply_sse2(uint8_t *frame1, unsigned int stride, uint8_t *frame2, unsigned int block_width, unsigned int block_height, int strength, int filter_weight, unsigned int *accumulator, uint16_t *count); -RTCD_EXTERN void (*vp9_temporal_filter_apply)(uint8_t *frame1, unsigned int stride, uint8_t *frame2, unsigned int block_width, unsigned int block_height, int strength, int filter_weight, unsigned int *accumulator, uint16_t *count); - -void vp9_rtcd(void); - -#ifdef RTCD_C -#include "vpx_ports/x86.h" -static void setup_rtcd_internal(void) -{ - int flags = x86_simd_caps(); - - (void)flags; - - vp9_denoiser_filter = vp9_denoiser_filter_c; - if (flags & HAS_SSE2) vp9_denoiser_filter = vp9_denoiser_filter_sse2; - vp9_diamond_search_sad = vp9_diamond_search_sad_c; - if (flags & HAS_AVX) vp9_diamond_search_sad = vp9_diamond_search_sad_avx; - vp9_fdct8x8_quant = vp9_fdct8x8_quant_c; - if (flags & HAS_SSSE3) vp9_fdct8x8_quant = vp9_fdct8x8_quant_ssse3; - vp9_fht16x16 = vp9_fht16x16_c; - if (flags & HAS_SSE2) vp9_fht16x16 = vp9_fht16x16_sse2; - vp9_fht4x4 = vp9_fht4x4_c; - if (flags & HAS_SSE2) vp9_fht4x4 = vp9_fht4x4_sse2; - vp9_fht8x8 = vp9_fht8x8_c; - if (flags & HAS_SSE2) vp9_fht8x8 = vp9_fht8x8_sse2; - vp9_filter_by_weight16x16 = vp9_filter_by_weight16x16_c; - if (flags & HAS_SSE2) vp9_filter_by_weight16x16 = vp9_filter_by_weight16x16_sse2; - vp9_filter_by_weight8x8 = vp9_filter_by_weight8x8_c; - if (flags & HAS_SSE2) vp9_filter_by_weight8x8 = vp9_filter_by_weight8x8_sse2; - vp9_full_search_sad = vp9_full_search_sad_c; - if (flags & HAS_SSE3) vp9_full_search_sad = vp9_full_search_sadx3; - if (flags & HAS_SSE4_1) vp9_full_search_sad = vp9_full_search_sadx8; - vp9_fwht4x4 = vp9_fwht4x4_c; - if (flags & HAS_SSE2) vp9_fwht4x4 = vp9_fwht4x4_sse2; - vp9_highbd_block_error = vp9_highbd_block_error_c; - if (flags & HAS_SSE2) vp9_highbd_block_error = vp9_highbd_block_error_sse2; - vp9_highbd_block_error_8bit = vp9_highbd_block_error_8bit_c; - if (flags & HAS_SSE2) vp9_highbd_block_error_8bit = vp9_highbd_block_error_8bit_sse2; - if (flags & HAS_AVX) vp9_highbd_block_error_8bit = vp9_highbd_block_error_8bit_avx; - vp9_iht16x16_256_add = vp9_iht16x16_256_add_c; - if (flags & HAS_SSE2) vp9_iht16x16_256_add = vp9_iht16x16_256_add_sse2; - vp9_iht4x4_16_add = vp9_iht4x4_16_add_c; - if (flags & HAS_SSE2) vp9_iht4x4_16_add = vp9_iht4x4_16_add_sse2; - vp9_iht8x8_64_add = vp9_iht8x8_64_add_c; - if (flags & HAS_SSE2) vp9_iht8x8_64_add = vp9_iht8x8_64_add_sse2; - vp9_temporal_filter_apply = vp9_temporal_filter_apply_c; - if (flags & HAS_SSE2) vp9_temporal_filter_apply = vp9_temporal_filter_apply_sse2; -} -#endif - -#ifdef __cplusplus -} // extern "C" -#endif - -#endif diff --git a/WebRtc.NET/include/third_party/libvpx/source/config/linux/ia32/vpx_config.h b/WebRtc.NET/include/third_party/libvpx/source/config/linux/ia32/vpx_config.h deleted file mode 100644 index 949b8bcf..00000000 --- a/WebRtc.NET/include/third_party/libvpx/source/config/linux/ia32/vpx_config.h +++ /dev/null @@ -1,94 +0,0 @@ -/* Copyright (c) 2011 The WebM project authors. All Rights Reserved. */ -/* */ -/* Use of this source code is governed by a BSD-style license */ -/* that can be found in the LICENSE file in the root of the source */ -/* tree. An additional intellectual property rights grant can be found */ -/* in the file PATENTS. All contributing project authors may */ -/* be found in the AUTHORS file in the root of the source tree. */ -/* This file automatically generated by configure. Do not edit! */ -#ifndef VPX_CONFIG_H -#define VPX_CONFIG_H -#define RESTRICT -#define INLINE inline -#define ARCH_ARM 0 -#define ARCH_MIPS 0 -#define ARCH_X86 1 -#define ARCH_X86_64 0 -#define HAVE_NEON 0 -#define HAVE_NEON_ASM 0 -#define HAVE_MIPS32 0 -#define HAVE_DSPR2 0 -#define HAVE_MSA 0 -#define HAVE_MIPS64 0 -#define HAVE_MMX 1 -#define HAVE_SSE 1 -#define HAVE_SSE2 1 -#define HAVE_SSE3 1 -#define HAVE_SSSE3 1 -#define HAVE_SSE4_1 1 -#define HAVE_AVX 1 -#define HAVE_AVX2 1 -#define HAVE_VPX_PORTS 1 -#define HAVE_PTHREAD_H 1 -#define HAVE_UNISTD_H 0 -#define CONFIG_DEPENDENCY_TRACKING 1 -#define CONFIG_EXTERNAL_BUILD 1 -#define CONFIG_INSTALL_DOCS 0 -#define CONFIG_INSTALL_BINS 1 -#define CONFIG_INSTALL_LIBS 1 -#define CONFIG_INSTALL_SRCS 0 -#define CONFIG_DEBUG 0 -#define CONFIG_GPROF 0 -#define CONFIG_GCOV 0 -#define CONFIG_RVCT 0 -#define CONFIG_GCC 1 -#define CONFIG_MSVS 0 -#define CONFIG_PIC 1 -#define CONFIG_BIG_ENDIAN 0 -#define CONFIG_CODEC_SRCS 0 -#define CONFIG_DEBUG_LIBS 0 -#define CONFIG_DEQUANT_TOKENS 0 -#define CONFIG_DC_RECON 0 -#define CONFIG_RUNTIME_CPU_DETECT 1 -#define CONFIG_POSTPROC 1 -#define CONFIG_VP9_POSTPROC 1 -#define CONFIG_MULTITHREAD 1 -#define CONFIG_INTERNAL_STATS 0 -#define CONFIG_VP8_ENCODER 1 -#define CONFIG_VP8_DECODER 1 -#define CONFIG_VP9_ENCODER 1 -#define CONFIG_VP9_DECODER 1 -#define CONFIG_VP8 1 -#define CONFIG_VP9 1 -#define CONFIG_ENCODERS 1 -#define CONFIG_DECODERS 1 -#define CONFIG_STATIC_MSVCRT 0 -#define CONFIG_SPATIAL_RESAMPLING 1 -#define CONFIG_REALTIME_ONLY 1 -#define CONFIG_ONTHEFLY_BITPACKING 0 -#define CONFIG_ERROR_CONCEALMENT 0 -#define CONFIG_SHARED 0 -#define CONFIG_STATIC 1 -#define CONFIG_SMALL 0 -#define CONFIG_POSTPROC_VISUALIZER 0 -#define CONFIG_OS_SUPPORT 1 -#define CONFIG_UNIT_TESTS 1 -#define CONFIG_WEBM_IO 1 -#define CONFIG_LIBYUV 1 -#define CONFIG_DECODE_PERF_TESTS 0 -#define CONFIG_ENCODE_PERF_TESTS 0 -#define CONFIG_MULTI_RES_ENCODING 1 -#define CONFIG_TEMPORAL_DENOISING 1 -#define CONFIG_VP9_TEMPORAL_DENOISING 1 -#define CONFIG_COEFFICIENT_RANGE_CHECKING 0 -#define CONFIG_VP9_HIGHBITDEPTH 1 -#define CONFIG_BETTER_HW_COMPATIBILITY 0 -#define CONFIG_EXPERIMENTAL 0 -#define CONFIG_SIZE_LIMIT 1 -#define CONFIG_SPATIAL_SVC 0 -#define CONFIG_FP_MB_STATS 0 -#define CONFIG_EMULATE_HARDWARE 0 -#define CONFIG_MISC_FIXES 0 -#define DECODE_WIDTH_LIMIT 16384 -#define DECODE_HEIGHT_LIMIT 16384 -#endif /* VPX_CONFIG_H */ diff --git a/WebRtc.NET/include/third_party/libvpx/source/config/linux/ia32/vpx_dsp_rtcd.h b/WebRtc.NET/include/third_party/libvpx/source/config/linux/ia32/vpx_dsp_rtcd.h deleted file mode 100644 index 58079fa4..00000000 --- a/WebRtc.NET/include/third_party/libvpx/source/config/linux/ia32/vpx_dsp_rtcd.h +++ /dev/null @@ -1,2899 +0,0 @@ -#ifndef VPX_DSP_RTCD_H_ -#define VPX_DSP_RTCD_H_ - -#ifdef RTCD_C -#define RTCD_EXTERN -#else -#define RTCD_EXTERN extern -#endif - -/* - * DSP - */ - -#include "vpx/vpx_integer.h" -#include "vpx_dsp/vpx_dsp_common.h" - - -#ifdef __cplusplus -extern "C" { -#endif - -unsigned int vpx_avg_4x4_c(const uint8_t *, int p); -unsigned int vpx_avg_4x4_sse2(const uint8_t *, int p); -RTCD_EXTERN unsigned int (*vpx_avg_4x4)(const uint8_t *, int p); - -unsigned int vpx_avg_8x8_c(const uint8_t *, int p); -unsigned int vpx_avg_8x8_sse2(const uint8_t *, int p); -RTCD_EXTERN unsigned int (*vpx_avg_8x8)(const uint8_t *, int p); - -void vpx_comp_avg_pred_c(uint8_t *comp_pred, const uint8_t *pred, int width, int height, const uint8_t *ref, int ref_stride); -#define vpx_comp_avg_pred vpx_comp_avg_pred_c - -void vpx_convolve8_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -void vpx_convolve8_sse2(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -void vpx_convolve8_ssse3(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -void vpx_convolve8_avx2(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -RTCD_EXTERN void (*vpx_convolve8)(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); - -void vpx_convolve8_avg_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -void vpx_convolve8_avg_sse2(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -void vpx_convolve8_avg_ssse3(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -RTCD_EXTERN void (*vpx_convolve8_avg)(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); - -void vpx_convolve8_avg_horiz_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -void vpx_convolve8_avg_horiz_sse2(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -void vpx_convolve8_avg_horiz_ssse3(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -RTCD_EXTERN void (*vpx_convolve8_avg_horiz)(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); - -void vpx_convolve8_avg_vert_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -void vpx_convolve8_avg_vert_sse2(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -void vpx_convolve8_avg_vert_ssse3(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -RTCD_EXTERN void (*vpx_convolve8_avg_vert)(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); - -void vpx_convolve8_horiz_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -void vpx_convolve8_horiz_sse2(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -void vpx_convolve8_horiz_ssse3(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -void vpx_convolve8_horiz_avx2(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -RTCD_EXTERN void (*vpx_convolve8_horiz)(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); - -void vpx_convolve8_vert_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -void vpx_convolve8_vert_sse2(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -void vpx_convolve8_vert_ssse3(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -void vpx_convolve8_vert_avx2(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -RTCD_EXTERN void (*vpx_convolve8_vert)(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); - -void vpx_convolve_avg_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -void vpx_convolve_avg_sse2(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -RTCD_EXTERN void (*vpx_convolve_avg)(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); - -void vpx_convolve_copy_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -void vpx_convolve_copy_sse2(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -RTCD_EXTERN void (*vpx_convolve_copy)(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); - -void vpx_d117_predictor_16x16_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d117_predictor_16x16 vpx_d117_predictor_16x16_c - -void vpx_d117_predictor_32x32_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d117_predictor_32x32 vpx_d117_predictor_32x32_c - -void vpx_d117_predictor_4x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d117_predictor_4x4 vpx_d117_predictor_4x4_c - -void vpx_d117_predictor_8x8_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d117_predictor_8x8 vpx_d117_predictor_8x8_c - -void vpx_d135_predictor_16x16_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d135_predictor_16x16 vpx_d135_predictor_16x16_c - -void vpx_d135_predictor_32x32_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d135_predictor_32x32 vpx_d135_predictor_32x32_c - -void vpx_d135_predictor_4x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d135_predictor_4x4 vpx_d135_predictor_4x4_c - -void vpx_d135_predictor_8x8_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d135_predictor_8x8 vpx_d135_predictor_8x8_c - -void vpx_d153_predictor_16x16_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_d153_predictor_16x16_ssse3(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -RTCD_EXTERN void (*vpx_d153_predictor_16x16)(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); - -void vpx_d153_predictor_32x32_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_d153_predictor_32x32_ssse3(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -RTCD_EXTERN void (*vpx_d153_predictor_32x32)(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); - -void vpx_d153_predictor_4x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_d153_predictor_4x4_ssse3(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -RTCD_EXTERN void (*vpx_d153_predictor_4x4)(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); - -void vpx_d153_predictor_8x8_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_d153_predictor_8x8_ssse3(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -RTCD_EXTERN void (*vpx_d153_predictor_8x8)(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); - -void vpx_d207_predictor_16x16_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_d207_predictor_16x16_ssse3(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -RTCD_EXTERN void (*vpx_d207_predictor_16x16)(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); - -void vpx_d207_predictor_32x32_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_d207_predictor_32x32_ssse3(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -RTCD_EXTERN void (*vpx_d207_predictor_32x32)(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); - -void vpx_d207_predictor_4x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_d207_predictor_4x4_sse2(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -RTCD_EXTERN void (*vpx_d207_predictor_4x4)(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); - -void vpx_d207_predictor_8x8_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_d207_predictor_8x8_ssse3(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -RTCD_EXTERN void (*vpx_d207_predictor_8x8)(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); - -void vpx_d207e_predictor_16x16_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d207e_predictor_16x16 vpx_d207e_predictor_16x16_c - -void vpx_d207e_predictor_32x32_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d207e_predictor_32x32 vpx_d207e_predictor_32x32_c - -void vpx_d207e_predictor_4x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d207e_predictor_4x4 vpx_d207e_predictor_4x4_c - -void vpx_d207e_predictor_8x8_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d207e_predictor_8x8 vpx_d207e_predictor_8x8_c - -void vpx_d45_predictor_16x16_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_d45_predictor_16x16_ssse3(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -RTCD_EXTERN void (*vpx_d45_predictor_16x16)(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); - -void vpx_d45_predictor_32x32_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_d45_predictor_32x32_ssse3(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -RTCD_EXTERN void (*vpx_d45_predictor_32x32)(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); - -void vpx_d45_predictor_4x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_d45_predictor_4x4_sse2(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -RTCD_EXTERN void (*vpx_d45_predictor_4x4)(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); - -void vpx_d45_predictor_8x8_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_d45_predictor_8x8_sse2(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -RTCD_EXTERN void (*vpx_d45_predictor_8x8)(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); - -void vpx_d45e_predictor_16x16_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d45e_predictor_16x16 vpx_d45e_predictor_16x16_c - -void vpx_d45e_predictor_32x32_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d45e_predictor_32x32 vpx_d45e_predictor_32x32_c - -void vpx_d45e_predictor_4x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d45e_predictor_4x4 vpx_d45e_predictor_4x4_c - -void vpx_d45e_predictor_8x8_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d45e_predictor_8x8 vpx_d45e_predictor_8x8_c - -void vpx_d63_predictor_16x16_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_d63_predictor_16x16_ssse3(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -RTCD_EXTERN void (*vpx_d63_predictor_16x16)(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); - -void vpx_d63_predictor_32x32_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_d63_predictor_32x32_ssse3(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -RTCD_EXTERN void (*vpx_d63_predictor_32x32)(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); - -void vpx_d63_predictor_4x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_d63_predictor_4x4_ssse3(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -RTCD_EXTERN void (*vpx_d63_predictor_4x4)(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); - -void vpx_d63_predictor_8x8_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_d63_predictor_8x8_ssse3(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -RTCD_EXTERN void (*vpx_d63_predictor_8x8)(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); - -void vpx_d63e_predictor_16x16_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d63e_predictor_16x16 vpx_d63e_predictor_16x16_c - -void vpx_d63e_predictor_32x32_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d63e_predictor_32x32 vpx_d63e_predictor_32x32_c - -void vpx_d63e_predictor_4x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d63e_predictor_4x4 vpx_d63e_predictor_4x4_c - -void vpx_d63e_predictor_8x8_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d63e_predictor_8x8 vpx_d63e_predictor_8x8_c - -void vpx_d63f_predictor_4x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d63f_predictor_4x4 vpx_d63f_predictor_4x4_c - -void vpx_dc_128_predictor_16x16_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_dc_128_predictor_16x16_sse2(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -RTCD_EXTERN void (*vpx_dc_128_predictor_16x16)(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); - -void vpx_dc_128_predictor_32x32_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_dc_128_predictor_32x32_sse2(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -RTCD_EXTERN void (*vpx_dc_128_predictor_32x32)(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); - -void vpx_dc_128_predictor_4x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_dc_128_predictor_4x4_sse2(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -RTCD_EXTERN void (*vpx_dc_128_predictor_4x4)(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); - -void vpx_dc_128_predictor_8x8_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_dc_128_predictor_8x8_sse2(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -RTCD_EXTERN void (*vpx_dc_128_predictor_8x8)(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); - -void vpx_dc_left_predictor_16x16_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_dc_left_predictor_16x16_sse2(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -RTCD_EXTERN void (*vpx_dc_left_predictor_16x16)(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); - -void vpx_dc_left_predictor_32x32_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_dc_left_predictor_32x32_sse2(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -RTCD_EXTERN void (*vpx_dc_left_predictor_32x32)(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); - -void vpx_dc_left_predictor_4x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_dc_left_predictor_4x4_sse2(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -RTCD_EXTERN void (*vpx_dc_left_predictor_4x4)(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); - -void vpx_dc_left_predictor_8x8_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_dc_left_predictor_8x8_sse2(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -RTCD_EXTERN void (*vpx_dc_left_predictor_8x8)(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); - -void vpx_dc_predictor_16x16_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_dc_predictor_16x16_sse2(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -RTCD_EXTERN void (*vpx_dc_predictor_16x16)(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); - -void vpx_dc_predictor_32x32_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_dc_predictor_32x32_sse2(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -RTCD_EXTERN void (*vpx_dc_predictor_32x32)(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); - -void vpx_dc_predictor_4x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_dc_predictor_4x4_sse2(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -RTCD_EXTERN void (*vpx_dc_predictor_4x4)(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); - -void vpx_dc_predictor_8x8_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_dc_predictor_8x8_sse2(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -RTCD_EXTERN void (*vpx_dc_predictor_8x8)(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); - -void vpx_dc_top_predictor_16x16_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_dc_top_predictor_16x16_sse2(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -RTCD_EXTERN void (*vpx_dc_top_predictor_16x16)(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); - -void vpx_dc_top_predictor_32x32_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_dc_top_predictor_32x32_sse2(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -RTCD_EXTERN void (*vpx_dc_top_predictor_32x32)(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); - -void vpx_dc_top_predictor_4x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_dc_top_predictor_4x4_sse2(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -RTCD_EXTERN void (*vpx_dc_top_predictor_4x4)(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); - -void vpx_dc_top_predictor_8x8_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_dc_top_predictor_8x8_sse2(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -RTCD_EXTERN void (*vpx_dc_top_predictor_8x8)(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); - -void vpx_fdct16x16_c(const int16_t *input, tran_low_t *output, int stride); -void vpx_fdct16x16_sse2(const int16_t *input, tran_low_t *output, int stride); -RTCD_EXTERN void (*vpx_fdct16x16)(const int16_t *input, tran_low_t *output, int stride); - -void vpx_fdct16x16_1_c(const int16_t *input, tran_low_t *output, int stride); -void vpx_fdct16x16_1_sse2(const int16_t *input, tran_low_t *output, int stride); -RTCD_EXTERN void (*vpx_fdct16x16_1)(const int16_t *input, tran_low_t *output, int stride); - -void vpx_fdct32x32_c(const int16_t *input, tran_low_t *output, int stride); -void vpx_fdct32x32_sse2(const int16_t *input, tran_low_t *output, int stride); -RTCD_EXTERN void (*vpx_fdct32x32)(const int16_t *input, tran_low_t *output, int stride); - -void vpx_fdct32x32_1_c(const int16_t *input, tran_low_t *output, int stride); -void vpx_fdct32x32_1_sse2(const int16_t *input, tran_low_t *output, int stride); -RTCD_EXTERN void (*vpx_fdct32x32_1)(const int16_t *input, tran_low_t *output, int stride); - -void vpx_fdct32x32_rd_c(const int16_t *input, tran_low_t *output, int stride); -void vpx_fdct32x32_rd_sse2(const int16_t *input, tran_low_t *output, int stride); -RTCD_EXTERN void (*vpx_fdct32x32_rd)(const int16_t *input, tran_low_t *output, int stride); - -void vpx_fdct4x4_c(const int16_t *input, tran_low_t *output, int stride); -void vpx_fdct4x4_sse2(const int16_t *input, tran_low_t *output, int stride); -RTCD_EXTERN void (*vpx_fdct4x4)(const int16_t *input, tran_low_t *output, int stride); - -void vpx_fdct4x4_1_c(const int16_t *input, tran_low_t *output, int stride); -void vpx_fdct4x4_1_sse2(const int16_t *input, tran_low_t *output, int stride); -RTCD_EXTERN void (*vpx_fdct4x4_1)(const int16_t *input, tran_low_t *output, int stride); - -void vpx_fdct8x8_c(const int16_t *input, tran_low_t *output, int stride); -void vpx_fdct8x8_sse2(const int16_t *input, tran_low_t *output, int stride); -RTCD_EXTERN void (*vpx_fdct8x8)(const int16_t *input, tran_low_t *output, int stride); - -void vpx_fdct8x8_1_c(const int16_t *input, tran_low_t *output, int stride); -void vpx_fdct8x8_1_sse2(const int16_t *input, tran_low_t *output, int stride); -RTCD_EXTERN void (*vpx_fdct8x8_1)(const int16_t *input, tran_low_t *output, int stride); - -void vpx_get16x16var_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse, int *sum); -void vpx_get16x16var_sse2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse, int *sum); -void vpx_get16x16var_avx2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse, int *sum); -RTCD_EXTERN void (*vpx_get16x16var)(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse, int *sum); - -unsigned int vpx_get4x4sse_cs_c(const unsigned char *src_ptr, int source_stride, const unsigned char *ref_ptr, int ref_stride); -#define vpx_get4x4sse_cs vpx_get4x4sse_cs_c - -void vpx_get8x8var_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse, int *sum); -void vpx_get8x8var_sse2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse, int *sum); -RTCD_EXTERN void (*vpx_get8x8var)(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse, int *sum); - -unsigned int vpx_get_mb_ss_c(const int16_t *); -unsigned int vpx_get_mb_ss_sse2(const int16_t *); -RTCD_EXTERN unsigned int (*vpx_get_mb_ss)(const int16_t *); - -void vpx_h_predictor_16x16_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_h_predictor_16x16_sse2(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -RTCD_EXTERN void (*vpx_h_predictor_16x16)(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); - -void vpx_h_predictor_32x32_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_h_predictor_32x32_sse2(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -RTCD_EXTERN void (*vpx_h_predictor_32x32)(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); - -void vpx_h_predictor_4x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_h_predictor_4x4_sse2(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -RTCD_EXTERN void (*vpx_h_predictor_4x4)(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); - -void vpx_h_predictor_8x8_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_h_predictor_8x8_sse2(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -RTCD_EXTERN void (*vpx_h_predictor_8x8)(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); - -void vpx_hadamard_16x16_c(const int16_t *src_diff, int src_stride, int16_t *coeff); -void vpx_hadamard_16x16_sse2(const int16_t *src_diff, int src_stride, int16_t *coeff); -RTCD_EXTERN void (*vpx_hadamard_16x16)(const int16_t *src_diff, int src_stride, int16_t *coeff); - -void vpx_hadamard_8x8_c(const int16_t *src_diff, int src_stride, int16_t *coeff); -void vpx_hadamard_8x8_sse2(const int16_t *src_diff, int src_stride, int16_t *coeff); -RTCD_EXTERN void (*vpx_hadamard_8x8)(const int16_t *src_diff, int src_stride, int16_t *coeff); - -void vpx_he_predictor_4x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_he_predictor_4x4 vpx_he_predictor_4x4_c - -void vpx_highbd_10_get16x16var_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse, int *sum); -#define vpx_highbd_10_get16x16var vpx_highbd_10_get16x16var_c - -void vpx_highbd_10_get8x8var_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse, int *sum); -#define vpx_highbd_10_get8x8var vpx_highbd_10_get8x8var_c - -unsigned int vpx_highbd_10_mse16x16_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int recon_stride, unsigned int *sse); -unsigned int vpx_highbd_10_mse16x16_sse2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int recon_stride, unsigned int *sse); -RTCD_EXTERN unsigned int (*vpx_highbd_10_mse16x16)(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int recon_stride, unsigned int *sse); - -unsigned int vpx_highbd_10_mse16x8_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int recon_stride, unsigned int *sse); -#define vpx_highbd_10_mse16x8 vpx_highbd_10_mse16x8_c - -unsigned int vpx_highbd_10_mse8x16_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int recon_stride, unsigned int *sse); -#define vpx_highbd_10_mse8x16 vpx_highbd_10_mse8x16_c - -unsigned int vpx_highbd_10_mse8x8_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int recon_stride, unsigned int *sse); -unsigned int vpx_highbd_10_mse8x8_sse2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int recon_stride, unsigned int *sse); -RTCD_EXTERN unsigned int (*vpx_highbd_10_mse8x8)(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int recon_stride, unsigned int *sse); - -uint32_t vpx_highbd_10_sub_pixel_avg_variance16x16_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_highbd_10_sub_pixel_avg_variance16x16_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -RTCD_EXTERN uint32_t (*vpx_highbd_10_sub_pixel_avg_variance16x16)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); - -uint32_t vpx_highbd_10_sub_pixel_avg_variance16x32_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_highbd_10_sub_pixel_avg_variance16x32_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -RTCD_EXTERN uint32_t (*vpx_highbd_10_sub_pixel_avg_variance16x32)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); - -uint32_t vpx_highbd_10_sub_pixel_avg_variance16x8_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_highbd_10_sub_pixel_avg_variance16x8_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -RTCD_EXTERN uint32_t (*vpx_highbd_10_sub_pixel_avg_variance16x8)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); - -uint32_t vpx_highbd_10_sub_pixel_avg_variance32x16_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_highbd_10_sub_pixel_avg_variance32x16_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -RTCD_EXTERN uint32_t (*vpx_highbd_10_sub_pixel_avg_variance32x16)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); - -uint32_t vpx_highbd_10_sub_pixel_avg_variance32x32_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_highbd_10_sub_pixel_avg_variance32x32_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -RTCD_EXTERN uint32_t (*vpx_highbd_10_sub_pixel_avg_variance32x32)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); - -uint32_t vpx_highbd_10_sub_pixel_avg_variance32x64_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_highbd_10_sub_pixel_avg_variance32x64_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -RTCD_EXTERN uint32_t (*vpx_highbd_10_sub_pixel_avg_variance32x64)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); - -uint32_t vpx_highbd_10_sub_pixel_avg_variance4x4_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_highbd_10_sub_pixel_avg_variance4x4 vpx_highbd_10_sub_pixel_avg_variance4x4_c - -uint32_t vpx_highbd_10_sub_pixel_avg_variance4x8_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_highbd_10_sub_pixel_avg_variance4x8 vpx_highbd_10_sub_pixel_avg_variance4x8_c - -uint32_t vpx_highbd_10_sub_pixel_avg_variance64x32_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_highbd_10_sub_pixel_avg_variance64x32_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -RTCD_EXTERN uint32_t (*vpx_highbd_10_sub_pixel_avg_variance64x32)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); - -uint32_t vpx_highbd_10_sub_pixel_avg_variance64x64_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_highbd_10_sub_pixel_avg_variance64x64_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -RTCD_EXTERN uint32_t (*vpx_highbd_10_sub_pixel_avg_variance64x64)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); - -uint32_t vpx_highbd_10_sub_pixel_avg_variance8x16_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_highbd_10_sub_pixel_avg_variance8x16_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -RTCD_EXTERN uint32_t (*vpx_highbd_10_sub_pixel_avg_variance8x16)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); - -uint32_t vpx_highbd_10_sub_pixel_avg_variance8x4_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_highbd_10_sub_pixel_avg_variance8x4_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -RTCD_EXTERN uint32_t (*vpx_highbd_10_sub_pixel_avg_variance8x4)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); - -uint32_t vpx_highbd_10_sub_pixel_avg_variance8x8_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_highbd_10_sub_pixel_avg_variance8x8_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -RTCD_EXTERN uint32_t (*vpx_highbd_10_sub_pixel_avg_variance8x8)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); - -uint32_t vpx_highbd_10_sub_pixel_variance16x16_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_highbd_10_sub_pixel_variance16x16_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -RTCD_EXTERN uint32_t (*vpx_highbd_10_sub_pixel_variance16x16)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); - -uint32_t vpx_highbd_10_sub_pixel_variance16x32_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_highbd_10_sub_pixel_variance16x32_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -RTCD_EXTERN uint32_t (*vpx_highbd_10_sub_pixel_variance16x32)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); - -uint32_t vpx_highbd_10_sub_pixel_variance16x8_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_highbd_10_sub_pixel_variance16x8_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -RTCD_EXTERN uint32_t (*vpx_highbd_10_sub_pixel_variance16x8)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); - -uint32_t vpx_highbd_10_sub_pixel_variance32x16_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_highbd_10_sub_pixel_variance32x16_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -RTCD_EXTERN uint32_t (*vpx_highbd_10_sub_pixel_variance32x16)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); - -uint32_t vpx_highbd_10_sub_pixel_variance32x32_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_highbd_10_sub_pixel_variance32x32_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -RTCD_EXTERN uint32_t (*vpx_highbd_10_sub_pixel_variance32x32)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); - -uint32_t vpx_highbd_10_sub_pixel_variance32x64_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_highbd_10_sub_pixel_variance32x64_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -RTCD_EXTERN uint32_t (*vpx_highbd_10_sub_pixel_variance32x64)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); - -uint32_t vpx_highbd_10_sub_pixel_variance4x4_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -#define vpx_highbd_10_sub_pixel_variance4x4 vpx_highbd_10_sub_pixel_variance4x4_c - -uint32_t vpx_highbd_10_sub_pixel_variance4x8_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -#define vpx_highbd_10_sub_pixel_variance4x8 vpx_highbd_10_sub_pixel_variance4x8_c - -uint32_t vpx_highbd_10_sub_pixel_variance64x32_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_highbd_10_sub_pixel_variance64x32_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -RTCD_EXTERN uint32_t (*vpx_highbd_10_sub_pixel_variance64x32)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); - -uint32_t vpx_highbd_10_sub_pixel_variance64x64_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_highbd_10_sub_pixel_variance64x64_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -RTCD_EXTERN uint32_t (*vpx_highbd_10_sub_pixel_variance64x64)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); - -uint32_t vpx_highbd_10_sub_pixel_variance8x16_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_highbd_10_sub_pixel_variance8x16_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -RTCD_EXTERN uint32_t (*vpx_highbd_10_sub_pixel_variance8x16)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); - -uint32_t vpx_highbd_10_sub_pixel_variance8x4_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_highbd_10_sub_pixel_variance8x4_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -RTCD_EXTERN uint32_t (*vpx_highbd_10_sub_pixel_variance8x4)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); - -uint32_t vpx_highbd_10_sub_pixel_variance8x8_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_highbd_10_sub_pixel_variance8x8_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -RTCD_EXTERN uint32_t (*vpx_highbd_10_sub_pixel_variance8x8)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); - -unsigned int vpx_highbd_10_variance16x16_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -unsigned int vpx_highbd_10_variance16x16_sse2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -RTCD_EXTERN unsigned int (*vpx_highbd_10_variance16x16)(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); - -unsigned int vpx_highbd_10_variance16x32_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -unsigned int vpx_highbd_10_variance16x32_sse2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -RTCD_EXTERN unsigned int (*vpx_highbd_10_variance16x32)(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); - -unsigned int vpx_highbd_10_variance16x8_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -unsigned int vpx_highbd_10_variance16x8_sse2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -RTCD_EXTERN unsigned int (*vpx_highbd_10_variance16x8)(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); - -unsigned int vpx_highbd_10_variance32x16_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -unsigned int vpx_highbd_10_variance32x16_sse2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -RTCD_EXTERN unsigned int (*vpx_highbd_10_variance32x16)(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); - -unsigned int vpx_highbd_10_variance32x32_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -unsigned int vpx_highbd_10_variance32x32_sse2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -RTCD_EXTERN unsigned int (*vpx_highbd_10_variance32x32)(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); - -unsigned int vpx_highbd_10_variance32x64_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -unsigned int vpx_highbd_10_variance32x64_sse2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -RTCD_EXTERN unsigned int (*vpx_highbd_10_variance32x64)(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); - -unsigned int vpx_highbd_10_variance4x4_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_highbd_10_variance4x4 vpx_highbd_10_variance4x4_c - -unsigned int vpx_highbd_10_variance4x8_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_highbd_10_variance4x8 vpx_highbd_10_variance4x8_c - -unsigned int vpx_highbd_10_variance64x32_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -unsigned int vpx_highbd_10_variance64x32_sse2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -RTCD_EXTERN unsigned int (*vpx_highbd_10_variance64x32)(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); - -unsigned int vpx_highbd_10_variance64x64_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -unsigned int vpx_highbd_10_variance64x64_sse2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -RTCD_EXTERN unsigned int (*vpx_highbd_10_variance64x64)(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); - -unsigned int vpx_highbd_10_variance8x16_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -unsigned int vpx_highbd_10_variance8x16_sse2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -RTCD_EXTERN unsigned int (*vpx_highbd_10_variance8x16)(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); - -unsigned int vpx_highbd_10_variance8x4_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_highbd_10_variance8x4 vpx_highbd_10_variance8x4_c - -unsigned int vpx_highbd_10_variance8x8_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -unsigned int vpx_highbd_10_variance8x8_sse2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -RTCD_EXTERN unsigned int (*vpx_highbd_10_variance8x8)(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); - -void vpx_highbd_12_get16x16var_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse, int *sum); -#define vpx_highbd_12_get16x16var vpx_highbd_12_get16x16var_c - -void vpx_highbd_12_get8x8var_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse, int *sum); -#define vpx_highbd_12_get8x8var vpx_highbd_12_get8x8var_c - -unsigned int vpx_highbd_12_mse16x16_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int recon_stride, unsigned int *sse); -unsigned int vpx_highbd_12_mse16x16_sse2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int recon_stride, unsigned int *sse); -RTCD_EXTERN unsigned int (*vpx_highbd_12_mse16x16)(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int recon_stride, unsigned int *sse); - -unsigned int vpx_highbd_12_mse16x8_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int recon_stride, unsigned int *sse); -#define vpx_highbd_12_mse16x8 vpx_highbd_12_mse16x8_c - -unsigned int vpx_highbd_12_mse8x16_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int recon_stride, unsigned int *sse); -#define vpx_highbd_12_mse8x16 vpx_highbd_12_mse8x16_c - -unsigned int vpx_highbd_12_mse8x8_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int recon_stride, unsigned int *sse); -unsigned int vpx_highbd_12_mse8x8_sse2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int recon_stride, unsigned int *sse); -RTCD_EXTERN unsigned int (*vpx_highbd_12_mse8x8)(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int recon_stride, unsigned int *sse); - -uint32_t vpx_highbd_12_sub_pixel_avg_variance16x16_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_highbd_12_sub_pixel_avg_variance16x16_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -RTCD_EXTERN uint32_t (*vpx_highbd_12_sub_pixel_avg_variance16x16)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); - -uint32_t vpx_highbd_12_sub_pixel_avg_variance16x32_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_highbd_12_sub_pixel_avg_variance16x32_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -RTCD_EXTERN uint32_t (*vpx_highbd_12_sub_pixel_avg_variance16x32)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); - -uint32_t vpx_highbd_12_sub_pixel_avg_variance16x8_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_highbd_12_sub_pixel_avg_variance16x8_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -RTCD_EXTERN uint32_t (*vpx_highbd_12_sub_pixel_avg_variance16x8)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); - -uint32_t vpx_highbd_12_sub_pixel_avg_variance32x16_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_highbd_12_sub_pixel_avg_variance32x16_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -RTCD_EXTERN uint32_t (*vpx_highbd_12_sub_pixel_avg_variance32x16)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); - -uint32_t vpx_highbd_12_sub_pixel_avg_variance32x32_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_highbd_12_sub_pixel_avg_variance32x32_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -RTCD_EXTERN uint32_t (*vpx_highbd_12_sub_pixel_avg_variance32x32)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); - -uint32_t vpx_highbd_12_sub_pixel_avg_variance32x64_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_highbd_12_sub_pixel_avg_variance32x64_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -RTCD_EXTERN uint32_t (*vpx_highbd_12_sub_pixel_avg_variance32x64)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); - -uint32_t vpx_highbd_12_sub_pixel_avg_variance4x4_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_highbd_12_sub_pixel_avg_variance4x4 vpx_highbd_12_sub_pixel_avg_variance4x4_c - -uint32_t vpx_highbd_12_sub_pixel_avg_variance4x8_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_highbd_12_sub_pixel_avg_variance4x8 vpx_highbd_12_sub_pixel_avg_variance4x8_c - -uint32_t vpx_highbd_12_sub_pixel_avg_variance64x32_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_highbd_12_sub_pixel_avg_variance64x32_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -RTCD_EXTERN uint32_t (*vpx_highbd_12_sub_pixel_avg_variance64x32)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); - -uint32_t vpx_highbd_12_sub_pixel_avg_variance64x64_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_highbd_12_sub_pixel_avg_variance64x64_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -RTCD_EXTERN uint32_t (*vpx_highbd_12_sub_pixel_avg_variance64x64)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); - -uint32_t vpx_highbd_12_sub_pixel_avg_variance8x16_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_highbd_12_sub_pixel_avg_variance8x16_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -RTCD_EXTERN uint32_t (*vpx_highbd_12_sub_pixel_avg_variance8x16)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); - -uint32_t vpx_highbd_12_sub_pixel_avg_variance8x4_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_highbd_12_sub_pixel_avg_variance8x4_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -RTCD_EXTERN uint32_t (*vpx_highbd_12_sub_pixel_avg_variance8x4)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); - -uint32_t vpx_highbd_12_sub_pixel_avg_variance8x8_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_highbd_12_sub_pixel_avg_variance8x8_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -RTCD_EXTERN uint32_t (*vpx_highbd_12_sub_pixel_avg_variance8x8)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); - -uint32_t vpx_highbd_12_sub_pixel_variance16x16_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_highbd_12_sub_pixel_variance16x16_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -RTCD_EXTERN uint32_t (*vpx_highbd_12_sub_pixel_variance16x16)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); - -uint32_t vpx_highbd_12_sub_pixel_variance16x32_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_highbd_12_sub_pixel_variance16x32_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -RTCD_EXTERN uint32_t (*vpx_highbd_12_sub_pixel_variance16x32)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); - -uint32_t vpx_highbd_12_sub_pixel_variance16x8_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_highbd_12_sub_pixel_variance16x8_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -RTCD_EXTERN uint32_t (*vpx_highbd_12_sub_pixel_variance16x8)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); - -uint32_t vpx_highbd_12_sub_pixel_variance32x16_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_highbd_12_sub_pixel_variance32x16_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -RTCD_EXTERN uint32_t (*vpx_highbd_12_sub_pixel_variance32x16)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); - -uint32_t vpx_highbd_12_sub_pixel_variance32x32_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_highbd_12_sub_pixel_variance32x32_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -RTCD_EXTERN uint32_t (*vpx_highbd_12_sub_pixel_variance32x32)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); - -uint32_t vpx_highbd_12_sub_pixel_variance32x64_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_highbd_12_sub_pixel_variance32x64_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -RTCD_EXTERN uint32_t (*vpx_highbd_12_sub_pixel_variance32x64)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); - -uint32_t vpx_highbd_12_sub_pixel_variance4x4_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -#define vpx_highbd_12_sub_pixel_variance4x4 vpx_highbd_12_sub_pixel_variance4x4_c - -uint32_t vpx_highbd_12_sub_pixel_variance4x8_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -#define vpx_highbd_12_sub_pixel_variance4x8 vpx_highbd_12_sub_pixel_variance4x8_c - -uint32_t vpx_highbd_12_sub_pixel_variance64x32_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_highbd_12_sub_pixel_variance64x32_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -RTCD_EXTERN uint32_t (*vpx_highbd_12_sub_pixel_variance64x32)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); - -uint32_t vpx_highbd_12_sub_pixel_variance64x64_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_highbd_12_sub_pixel_variance64x64_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -RTCD_EXTERN uint32_t (*vpx_highbd_12_sub_pixel_variance64x64)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); - -uint32_t vpx_highbd_12_sub_pixel_variance8x16_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_highbd_12_sub_pixel_variance8x16_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -RTCD_EXTERN uint32_t (*vpx_highbd_12_sub_pixel_variance8x16)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); - -uint32_t vpx_highbd_12_sub_pixel_variance8x4_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_highbd_12_sub_pixel_variance8x4_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -RTCD_EXTERN uint32_t (*vpx_highbd_12_sub_pixel_variance8x4)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); - -uint32_t vpx_highbd_12_sub_pixel_variance8x8_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_highbd_12_sub_pixel_variance8x8_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -RTCD_EXTERN uint32_t (*vpx_highbd_12_sub_pixel_variance8x8)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); - -unsigned int vpx_highbd_12_variance16x16_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -unsigned int vpx_highbd_12_variance16x16_sse2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -RTCD_EXTERN unsigned int (*vpx_highbd_12_variance16x16)(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); - -unsigned int vpx_highbd_12_variance16x32_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -unsigned int vpx_highbd_12_variance16x32_sse2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -RTCD_EXTERN unsigned int (*vpx_highbd_12_variance16x32)(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); - -unsigned int vpx_highbd_12_variance16x8_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -unsigned int vpx_highbd_12_variance16x8_sse2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -RTCD_EXTERN unsigned int (*vpx_highbd_12_variance16x8)(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); - -unsigned int vpx_highbd_12_variance32x16_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -unsigned int vpx_highbd_12_variance32x16_sse2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -RTCD_EXTERN unsigned int (*vpx_highbd_12_variance32x16)(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); - -unsigned int vpx_highbd_12_variance32x32_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -unsigned int vpx_highbd_12_variance32x32_sse2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -RTCD_EXTERN unsigned int (*vpx_highbd_12_variance32x32)(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); - -unsigned int vpx_highbd_12_variance32x64_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -unsigned int vpx_highbd_12_variance32x64_sse2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -RTCD_EXTERN unsigned int (*vpx_highbd_12_variance32x64)(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); - -unsigned int vpx_highbd_12_variance4x4_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_highbd_12_variance4x4 vpx_highbd_12_variance4x4_c - -unsigned int vpx_highbd_12_variance4x8_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_highbd_12_variance4x8 vpx_highbd_12_variance4x8_c - -unsigned int vpx_highbd_12_variance64x32_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -unsigned int vpx_highbd_12_variance64x32_sse2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -RTCD_EXTERN unsigned int (*vpx_highbd_12_variance64x32)(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); - -unsigned int vpx_highbd_12_variance64x64_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -unsigned int vpx_highbd_12_variance64x64_sse2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -RTCD_EXTERN unsigned int (*vpx_highbd_12_variance64x64)(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); - -unsigned int vpx_highbd_12_variance8x16_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -unsigned int vpx_highbd_12_variance8x16_sse2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -RTCD_EXTERN unsigned int (*vpx_highbd_12_variance8x16)(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); - -unsigned int vpx_highbd_12_variance8x4_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_highbd_12_variance8x4 vpx_highbd_12_variance8x4_c - -unsigned int vpx_highbd_12_variance8x8_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -unsigned int vpx_highbd_12_variance8x8_sse2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -RTCD_EXTERN unsigned int (*vpx_highbd_12_variance8x8)(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); - -void vpx_highbd_8_get16x16var_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse, int *sum); -#define vpx_highbd_8_get16x16var vpx_highbd_8_get16x16var_c - -void vpx_highbd_8_get8x8var_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse, int *sum); -#define vpx_highbd_8_get8x8var vpx_highbd_8_get8x8var_c - -unsigned int vpx_highbd_8_mse16x16_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int recon_stride, unsigned int *sse); -unsigned int vpx_highbd_8_mse16x16_sse2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int recon_stride, unsigned int *sse); -RTCD_EXTERN unsigned int (*vpx_highbd_8_mse16x16)(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int recon_stride, unsigned int *sse); - -unsigned int vpx_highbd_8_mse16x8_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int recon_stride, unsigned int *sse); -#define vpx_highbd_8_mse16x8 vpx_highbd_8_mse16x8_c - -unsigned int vpx_highbd_8_mse8x16_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int recon_stride, unsigned int *sse); -#define vpx_highbd_8_mse8x16 vpx_highbd_8_mse8x16_c - -unsigned int vpx_highbd_8_mse8x8_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int recon_stride, unsigned int *sse); -unsigned int vpx_highbd_8_mse8x8_sse2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int recon_stride, unsigned int *sse); -RTCD_EXTERN unsigned int (*vpx_highbd_8_mse8x8)(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int recon_stride, unsigned int *sse); - -uint32_t vpx_highbd_8_sub_pixel_avg_variance16x16_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_highbd_8_sub_pixel_avg_variance16x16_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -RTCD_EXTERN uint32_t (*vpx_highbd_8_sub_pixel_avg_variance16x16)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); - -uint32_t vpx_highbd_8_sub_pixel_avg_variance16x32_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_highbd_8_sub_pixel_avg_variance16x32_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -RTCD_EXTERN uint32_t (*vpx_highbd_8_sub_pixel_avg_variance16x32)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); - -uint32_t vpx_highbd_8_sub_pixel_avg_variance16x8_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_highbd_8_sub_pixel_avg_variance16x8_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -RTCD_EXTERN uint32_t (*vpx_highbd_8_sub_pixel_avg_variance16x8)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); - -uint32_t vpx_highbd_8_sub_pixel_avg_variance32x16_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_highbd_8_sub_pixel_avg_variance32x16_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -RTCD_EXTERN uint32_t (*vpx_highbd_8_sub_pixel_avg_variance32x16)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); - -uint32_t vpx_highbd_8_sub_pixel_avg_variance32x32_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_highbd_8_sub_pixel_avg_variance32x32_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -RTCD_EXTERN uint32_t (*vpx_highbd_8_sub_pixel_avg_variance32x32)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); - -uint32_t vpx_highbd_8_sub_pixel_avg_variance32x64_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_highbd_8_sub_pixel_avg_variance32x64_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -RTCD_EXTERN uint32_t (*vpx_highbd_8_sub_pixel_avg_variance32x64)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); - -uint32_t vpx_highbd_8_sub_pixel_avg_variance4x4_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_highbd_8_sub_pixel_avg_variance4x4 vpx_highbd_8_sub_pixel_avg_variance4x4_c - -uint32_t vpx_highbd_8_sub_pixel_avg_variance4x8_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_highbd_8_sub_pixel_avg_variance4x8 vpx_highbd_8_sub_pixel_avg_variance4x8_c - -uint32_t vpx_highbd_8_sub_pixel_avg_variance64x32_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_highbd_8_sub_pixel_avg_variance64x32_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -RTCD_EXTERN uint32_t (*vpx_highbd_8_sub_pixel_avg_variance64x32)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); - -uint32_t vpx_highbd_8_sub_pixel_avg_variance64x64_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_highbd_8_sub_pixel_avg_variance64x64_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -RTCD_EXTERN uint32_t (*vpx_highbd_8_sub_pixel_avg_variance64x64)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); - -uint32_t vpx_highbd_8_sub_pixel_avg_variance8x16_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_highbd_8_sub_pixel_avg_variance8x16_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -RTCD_EXTERN uint32_t (*vpx_highbd_8_sub_pixel_avg_variance8x16)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); - -uint32_t vpx_highbd_8_sub_pixel_avg_variance8x4_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_highbd_8_sub_pixel_avg_variance8x4_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -RTCD_EXTERN uint32_t (*vpx_highbd_8_sub_pixel_avg_variance8x4)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); - -uint32_t vpx_highbd_8_sub_pixel_avg_variance8x8_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_highbd_8_sub_pixel_avg_variance8x8_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -RTCD_EXTERN uint32_t (*vpx_highbd_8_sub_pixel_avg_variance8x8)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); - -uint32_t vpx_highbd_8_sub_pixel_variance16x16_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_highbd_8_sub_pixel_variance16x16_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -RTCD_EXTERN uint32_t (*vpx_highbd_8_sub_pixel_variance16x16)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); - -uint32_t vpx_highbd_8_sub_pixel_variance16x32_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_highbd_8_sub_pixel_variance16x32_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -RTCD_EXTERN uint32_t (*vpx_highbd_8_sub_pixel_variance16x32)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); - -uint32_t vpx_highbd_8_sub_pixel_variance16x8_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_highbd_8_sub_pixel_variance16x8_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -RTCD_EXTERN uint32_t (*vpx_highbd_8_sub_pixel_variance16x8)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); - -uint32_t vpx_highbd_8_sub_pixel_variance32x16_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_highbd_8_sub_pixel_variance32x16_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -RTCD_EXTERN uint32_t (*vpx_highbd_8_sub_pixel_variance32x16)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); - -uint32_t vpx_highbd_8_sub_pixel_variance32x32_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_highbd_8_sub_pixel_variance32x32_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -RTCD_EXTERN uint32_t (*vpx_highbd_8_sub_pixel_variance32x32)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); - -uint32_t vpx_highbd_8_sub_pixel_variance32x64_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_highbd_8_sub_pixel_variance32x64_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -RTCD_EXTERN uint32_t (*vpx_highbd_8_sub_pixel_variance32x64)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); - -uint32_t vpx_highbd_8_sub_pixel_variance4x4_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -#define vpx_highbd_8_sub_pixel_variance4x4 vpx_highbd_8_sub_pixel_variance4x4_c - -uint32_t vpx_highbd_8_sub_pixel_variance4x8_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -#define vpx_highbd_8_sub_pixel_variance4x8 vpx_highbd_8_sub_pixel_variance4x8_c - -uint32_t vpx_highbd_8_sub_pixel_variance64x32_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_highbd_8_sub_pixel_variance64x32_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -RTCD_EXTERN uint32_t (*vpx_highbd_8_sub_pixel_variance64x32)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); - -uint32_t vpx_highbd_8_sub_pixel_variance64x64_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_highbd_8_sub_pixel_variance64x64_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -RTCD_EXTERN uint32_t (*vpx_highbd_8_sub_pixel_variance64x64)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); - -uint32_t vpx_highbd_8_sub_pixel_variance8x16_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_highbd_8_sub_pixel_variance8x16_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -RTCD_EXTERN uint32_t (*vpx_highbd_8_sub_pixel_variance8x16)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); - -uint32_t vpx_highbd_8_sub_pixel_variance8x4_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_highbd_8_sub_pixel_variance8x4_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -RTCD_EXTERN uint32_t (*vpx_highbd_8_sub_pixel_variance8x4)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); - -uint32_t vpx_highbd_8_sub_pixel_variance8x8_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_highbd_8_sub_pixel_variance8x8_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -RTCD_EXTERN uint32_t (*vpx_highbd_8_sub_pixel_variance8x8)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); - -unsigned int vpx_highbd_8_variance16x16_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -unsigned int vpx_highbd_8_variance16x16_sse2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -RTCD_EXTERN unsigned int (*vpx_highbd_8_variance16x16)(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); - -unsigned int vpx_highbd_8_variance16x32_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -unsigned int vpx_highbd_8_variance16x32_sse2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -RTCD_EXTERN unsigned int (*vpx_highbd_8_variance16x32)(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); - -unsigned int vpx_highbd_8_variance16x8_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -unsigned int vpx_highbd_8_variance16x8_sse2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -RTCD_EXTERN unsigned int (*vpx_highbd_8_variance16x8)(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); - -unsigned int vpx_highbd_8_variance32x16_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -unsigned int vpx_highbd_8_variance32x16_sse2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -RTCD_EXTERN unsigned int (*vpx_highbd_8_variance32x16)(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); - -unsigned int vpx_highbd_8_variance32x32_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -unsigned int vpx_highbd_8_variance32x32_sse2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -RTCD_EXTERN unsigned int (*vpx_highbd_8_variance32x32)(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); - -unsigned int vpx_highbd_8_variance32x64_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -unsigned int vpx_highbd_8_variance32x64_sse2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -RTCD_EXTERN unsigned int (*vpx_highbd_8_variance32x64)(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); - -unsigned int vpx_highbd_8_variance4x4_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_highbd_8_variance4x4 vpx_highbd_8_variance4x4_c - -unsigned int vpx_highbd_8_variance4x8_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_highbd_8_variance4x8 vpx_highbd_8_variance4x8_c - -unsigned int vpx_highbd_8_variance64x32_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -unsigned int vpx_highbd_8_variance64x32_sse2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -RTCD_EXTERN unsigned int (*vpx_highbd_8_variance64x32)(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); - -unsigned int vpx_highbd_8_variance64x64_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -unsigned int vpx_highbd_8_variance64x64_sse2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -RTCD_EXTERN unsigned int (*vpx_highbd_8_variance64x64)(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); - -unsigned int vpx_highbd_8_variance8x16_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -unsigned int vpx_highbd_8_variance8x16_sse2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -RTCD_EXTERN unsigned int (*vpx_highbd_8_variance8x16)(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); - -unsigned int vpx_highbd_8_variance8x4_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_highbd_8_variance8x4 vpx_highbd_8_variance8x4_c - -unsigned int vpx_highbd_8_variance8x8_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -unsigned int vpx_highbd_8_variance8x8_sse2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -RTCD_EXTERN unsigned int (*vpx_highbd_8_variance8x8)(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); - -unsigned int vpx_highbd_avg_4x4_c(const uint8_t *, int p); -#define vpx_highbd_avg_4x4 vpx_highbd_avg_4x4_c - -unsigned int vpx_highbd_avg_8x8_c(const uint8_t *, int p); -#define vpx_highbd_avg_8x8 vpx_highbd_avg_8x8_c - -void vpx_highbd_comp_avg_pred_c(uint16_t *comp_pred, const uint8_t *pred8, int width, int height, const uint8_t *ref8, int ref_stride); -#define vpx_highbd_comp_avg_pred vpx_highbd_comp_avg_pred_c - -void vpx_highbd_convolve8_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h, int bps); -#define vpx_highbd_convolve8 vpx_highbd_convolve8_c - -void vpx_highbd_convolve8_avg_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h, int bps); -#define vpx_highbd_convolve8_avg vpx_highbd_convolve8_avg_c - -void vpx_highbd_convolve8_avg_horiz_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h, int bps); -#define vpx_highbd_convolve8_avg_horiz vpx_highbd_convolve8_avg_horiz_c - -void vpx_highbd_convolve8_avg_vert_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h, int bps); -#define vpx_highbd_convolve8_avg_vert vpx_highbd_convolve8_avg_vert_c - -void vpx_highbd_convolve8_horiz_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h, int bps); -#define vpx_highbd_convolve8_horiz vpx_highbd_convolve8_horiz_c - -void vpx_highbd_convolve8_vert_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h, int bps); -#define vpx_highbd_convolve8_vert vpx_highbd_convolve8_vert_c - -void vpx_highbd_convolve_avg_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h, int bps); -void vpx_highbd_convolve_avg_sse2(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h, int bps); -RTCD_EXTERN void (*vpx_highbd_convolve_avg)(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h, int bps); - -void vpx_highbd_convolve_copy_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h, int bps); -void vpx_highbd_convolve_copy_sse2(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h, int bps); -RTCD_EXTERN void (*vpx_highbd_convolve_copy)(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h, int bps); - -void vpx_highbd_d117_predictor_16x16_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_d117_predictor_16x16 vpx_highbd_d117_predictor_16x16_c - -void vpx_highbd_d117_predictor_32x32_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_d117_predictor_32x32 vpx_highbd_d117_predictor_32x32_c - -void vpx_highbd_d117_predictor_4x4_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_d117_predictor_4x4 vpx_highbd_d117_predictor_4x4_c - -void vpx_highbd_d117_predictor_8x8_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_d117_predictor_8x8 vpx_highbd_d117_predictor_8x8_c - -void vpx_highbd_d135_predictor_16x16_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_d135_predictor_16x16 vpx_highbd_d135_predictor_16x16_c - -void vpx_highbd_d135_predictor_32x32_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_d135_predictor_32x32 vpx_highbd_d135_predictor_32x32_c - -void vpx_highbd_d135_predictor_4x4_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_d135_predictor_4x4 vpx_highbd_d135_predictor_4x4_c - -void vpx_highbd_d135_predictor_8x8_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_d135_predictor_8x8 vpx_highbd_d135_predictor_8x8_c - -void vpx_highbd_d153_predictor_16x16_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_d153_predictor_16x16 vpx_highbd_d153_predictor_16x16_c - -void vpx_highbd_d153_predictor_32x32_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_d153_predictor_32x32 vpx_highbd_d153_predictor_32x32_c - -void vpx_highbd_d153_predictor_4x4_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_d153_predictor_4x4 vpx_highbd_d153_predictor_4x4_c - -void vpx_highbd_d153_predictor_8x8_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_d153_predictor_8x8 vpx_highbd_d153_predictor_8x8_c - -void vpx_highbd_d207_predictor_16x16_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_d207_predictor_16x16 vpx_highbd_d207_predictor_16x16_c - -void vpx_highbd_d207_predictor_32x32_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_d207_predictor_32x32 vpx_highbd_d207_predictor_32x32_c - -void vpx_highbd_d207_predictor_4x4_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_d207_predictor_4x4 vpx_highbd_d207_predictor_4x4_c - -void vpx_highbd_d207_predictor_8x8_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_d207_predictor_8x8 vpx_highbd_d207_predictor_8x8_c - -void vpx_highbd_d207e_predictor_16x16_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_d207e_predictor_16x16 vpx_highbd_d207e_predictor_16x16_c - -void vpx_highbd_d207e_predictor_32x32_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_d207e_predictor_32x32 vpx_highbd_d207e_predictor_32x32_c - -void vpx_highbd_d207e_predictor_4x4_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_d207e_predictor_4x4 vpx_highbd_d207e_predictor_4x4_c - -void vpx_highbd_d207e_predictor_8x8_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_d207e_predictor_8x8 vpx_highbd_d207e_predictor_8x8_c - -void vpx_highbd_d45_predictor_16x16_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_d45_predictor_16x16 vpx_highbd_d45_predictor_16x16_c - -void vpx_highbd_d45_predictor_32x32_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_d45_predictor_32x32 vpx_highbd_d45_predictor_32x32_c - -void vpx_highbd_d45_predictor_4x4_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_d45_predictor_4x4 vpx_highbd_d45_predictor_4x4_c - -void vpx_highbd_d45_predictor_8x8_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_d45_predictor_8x8 vpx_highbd_d45_predictor_8x8_c - -void vpx_highbd_d45e_predictor_16x16_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_d45e_predictor_16x16 vpx_highbd_d45e_predictor_16x16_c - -void vpx_highbd_d45e_predictor_32x32_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_d45e_predictor_32x32 vpx_highbd_d45e_predictor_32x32_c - -void vpx_highbd_d45e_predictor_4x4_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_d45e_predictor_4x4 vpx_highbd_d45e_predictor_4x4_c - -void vpx_highbd_d45e_predictor_8x8_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_d45e_predictor_8x8 vpx_highbd_d45e_predictor_8x8_c - -void vpx_highbd_d63_predictor_16x16_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_d63_predictor_16x16 vpx_highbd_d63_predictor_16x16_c - -void vpx_highbd_d63_predictor_32x32_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_d63_predictor_32x32 vpx_highbd_d63_predictor_32x32_c - -void vpx_highbd_d63_predictor_4x4_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_d63_predictor_4x4 vpx_highbd_d63_predictor_4x4_c - -void vpx_highbd_d63_predictor_8x8_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_d63_predictor_8x8 vpx_highbd_d63_predictor_8x8_c - -void vpx_highbd_d63e_predictor_16x16_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_d63e_predictor_16x16 vpx_highbd_d63e_predictor_16x16_c - -void vpx_highbd_d63e_predictor_32x32_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_d63e_predictor_32x32 vpx_highbd_d63e_predictor_32x32_c - -void vpx_highbd_d63e_predictor_4x4_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_d63e_predictor_4x4 vpx_highbd_d63e_predictor_4x4_c - -void vpx_highbd_d63e_predictor_8x8_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_d63e_predictor_8x8 vpx_highbd_d63e_predictor_8x8_c - -void vpx_highbd_dc_128_predictor_16x16_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_dc_128_predictor_16x16 vpx_highbd_dc_128_predictor_16x16_c - -void vpx_highbd_dc_128_predictor_32x32_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_dc_128_predictor_32x32 vpx_highbd_dc_128_predictor_32x32_c - -void vpx_highbd_dc_128_predictor_4x4_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_dc_128_predictor_4x4 vpx_highbd_dc_128_predictor_4x4_c - -void vpx_highbd_dc_128_predictor_8x8_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_dc_128_predictor_8x8 vpx_highbd_dc_128_predictor_8x8_c - -void vpx_highbd_dc_left_predictor_16x16_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_dc_left_predictor_16x16 vpx_highbd_dc_left_predictor_16x16_c - -void vpx_highbd_dc_left_predictor_32x32_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_dc_left_predictor_32x32 vpx_highbd_dc_left_predictor_32x32_c - -void vpx_highbd_dc_left_predictor_4x4_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_dc_left_predictor_4x4 vpx_highbd_dc_left_predictor_4x4_c - -void vpx_highbd_dc_left_predictor_8x8_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_dc_left_predictor_8x8 vpx_highbd_dc_left_predictor_8x8_c - -void vpx_highbd_dc_predictor_16x16_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -void vpx_highbd_dc_predictor_16x16_sse2(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -RTCD_EXTERN void (*vpx_highbd_dc_predictor_16x16)(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); - -void vpx_highbd_dc_predictor_32x32_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -void vpx_highbd_dc_predictor_32x32_sse2(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -RTCD_EXTERN void (*vpx_highbd_dc_predictor_32x32)(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); - -void vpx_highbd_dc_predictor_4x4_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -void vpx_highbd_dc_predictor_4x4_sse2(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -RTCD_EXTERN void (*vpx_highbd_dc_predictor_4x4)(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); - -void vpx_highbd_dc_predictor_8x8_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -void vpx_highbd_dc_predictor_8x8_sse2(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -RTCD_EXTERN void (*vpx_highbd_dc_predictor_8x8)(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); - -void vpx_highbd_dc_top_predictor_16x16_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_dc_top_predictor_16x16 vpx_highbd_dc_top_predictor_16x16_c - -void vpx_highbd_dc_top_predictor_32x32_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_dc_top_predictor_32x32 vpx_highbd_dc_top_predictor_32x32_c - -void vpx_highbd_dc_top_predictor_4x4_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_dc_top_predictor_4x4 vpx_highbd_dc_top_predictor_4x4_c - -void vpx_highbd_dc_top_predictor_8x8_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_dc_top_predictor_8x8 vpx_highbd_dc_top_predictor_8x8_c - -void vpx_highbd_fdct16x16_c(const int16_t *input, tran_low_t *output, int stride); -void vpx_highbd_fdct16x16_sse2(const int16_t *input, tran_low_t *output, int stride); -RTCD_EXTERN void (*vpx_highbd_fdct16x16)(const int16_t *input, tran_low_t *output, int stride); - -void vpx_highbd_fdct16x16_1_c(const int16_t *input, tran_low_t *output, int stride); -#define vpx_highbd_fdct16x16_1 vpx_highbd_fdct16x16_1_c - -void vpx_highbd_fdct32x32_c(const int16_t *input, tran_low_t *output, int stride); -void vpx_highbd_fdct32x32_sse2(const int16_t *input, tran_low_t *output, int stride); -RTCD_EXTERN void (*vpx_highbd_fdct32x32)(const int16_t *input, tran_low_t *output, int stride); - -void vpx_highbd_fdct32x32_1_c(const int16_t *input, tran_low_t *output, int stride); -#define vpx_highbd_fdct32x32_1 vpx_highbd_fdct32x32_1_c - -void vpx_highbd_fdct32x32_rd_c(const int16_t *input, tran_low_t *output, int stride); -void vpx_highbd_fdct32x32_rd_sse2(const int16_t *input, tran_low_t *output, int stride); -RTCD_EXTERN void (*vpx_highbd_fdct32x32_rd)(const int16_t *input, tran_low_t *output, int stride); - -void vpx_highbd_fdct4x4_c(const int16_t *input, tran_low_t *output, int stride); -void vpx_highbd_fdct4x4_sse2(const int16_t *input, tran_low_t *output, int stride); -RTCD_EXTERN void (*vpx_highbd_fdct4x4)(const int16_t *input, tran_low_t *output, int stride); - -void vpx_highbd_fdct8x8_c(const int16_t *input, tran_low_t *output, int stride); -void vpx_highbd_fdct8x8_sse2(const int16_t *input, tran_low_t *output, int stride); -RTCD_EXTERN void (*vpx_highbd_fdct8x8)(const int16_t *input, tran_low_t *output, int stride); - -void vpx_highbd_fdct8x8_1_c(const int16_t *input, tran_low_t *output, int stride); -#define vpx_highbd_fdct8x8_1 vpx_highbd_fdct8x8_1_c - -void vpx_highbd_h_predictor_16x16_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_h_predictor_16x16 vpx_highbd_h_predictor_16x16_c - -void vpx_highbd_h_predictor_32x32_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_h_predictor_32x32 vpx_highbd_h_predictor_32x32_c - -void vpx_highbd_h_predictor_4x4_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_h_predictor_4x4 vpx_highbd_h_predictor_4x4_c - -void vpx_highbd_h_predictor_8x8_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_h_predictor_8x8 vpx_highbd_h_predictor_8x8_c - -void vpx_highbd_idct16x16_10_add_c(const tran_low_t *input, uint8_t *dest, int stride, int bd); -void vpx_highbd_idct16x16_10_add_sse2(const tran_low_t *input, uint8_t *dest, int stride, int bd); -RTCD_EXTERN void (*vpx_highbd_idct16x16_10_add)(const tran_low_t *input, uint8_t *dest, int stride, int bd); - -void vpx_highbd_idct16x16_1_add_c(const tran_low_t *input, uint8_t *dest, int stride, int bd); -#define vpx_highbd_idct16x16_1_add vpx_highbd_idct16x16_1_add_c - -void vpx_highbd_idct16x16_256_add_c(const tran_low_t *input, uint8_t *dest, int stride, int bd); -void vpx_highbd_idct16x16_256_add_sse2(const tran_low_t *input, uint8_t *dest, int stride, int bd); -RTCD_EXTERN void (*vpx_highbd_idct16x16_256_add)(const tran_low_t *input, uint8_t *dest, int stride, int bd); - -void vpx_highbd_idct32x32_1024_add_c(const tran_low_t *input, uint8_t *dest, int stride, int bd); -#define vpx_highbd_idct32x32_1024_add vpx_highbd_idct32x32_1024_add_c - -void vpx_highbd_idct32x32_1_add_c(const tran_low_t *input, uint8_t *dest, int stride, int bd); -void vpx_highbd_idct32x32_1_add_sse2(const tran_low_t *input, uint8_t *dest, int stride, int bd); -RTCD_EXTERN void (*vpx_highbd_idct32x32_1_add)(const tran_low_t *input, uint8_t *dest, int stride, int bd); - -void vpx_highbd_idct32x32_34_add_c(const tran_low_t *input, uint8_t *dest, int stride, int bd); -#define vpx_highbd_idct32x32_34_add vpx_highbd_idct32x32_34_add_c - -void vpx_highbd_idct4x4_16_add_c(const tran_low_t *input, uint8_t *dest, int stride, int bd); -void vpx_highbd_idct4x4_16_add_sse2(const tran_low_t *input, uint8_t *dest, int stride, int bd); -RTCD_EXTERN void (*vpx_highbd_idct4x4_16_add)(const tran_low_t *input, uint8_t *dest, int stride, int bd); - -void vpx_highbd_idct4x4_1_add_c(const tran_low_t *input, uint8_t *dest, int stride, int bd); -#define vpx_highbd_idct4x4_1_add vpx_highbd_idct4x4_1_add_c - -void vpx_highbd_idct8x8_12_add_c(const tran_low_t *input, uint8_t *dest, int stride, int bd); -void vpx_highbd_idct8x8_12_add_sse2(const tran_low_t *input, uint8_t *dest, int stride, int bd); -RTCD_EXTERN void (*vpx_highbd_idct8x8_12_add)(const tran_low_t *input, uint8_t *dest, int stride, int bd); - -void vpx_highbd_idct8x8_1_add_c(const tran_low_t *input, uint8_t *dest, int stride, int bd); -#define vpx_highbd_idct8x8_1_add vpx_highbd_idct8x8_1_add_c - -void vpx_highbd_idct8x8_64_add_c(const tran_low_t *input, uint8_t *dest, int stride, int bd); -void vpx_highbd_idct8x8_64_add_sse2(const tran_low_t *input, uint8_t *dest, int stride, int bd); -RTCD_EXTERN void (*vpx_highbd_idct8x8_64_add)(const tran_low_t *input, uint8_t *dest, int stride, int bd); - -void vpx_highbd_iwht4x4_16_add_c(const tran_low_t *input, uint8_t *dest, int stride, int bd); -#define vpx_highbd_iwht4x4_16_add vpx_highbd_iwht4x4_16_add_c - -void vpx_highbd_iwht4x4_1_add_c(const tran_low_t *input, uint8_t *dest, int stride, int bd); -#define vpx_highbd_iwht4x4_1_add vpx_highbd_iwht4x4_1_add_c - -void vpx_highbd_lpf_horizontal_16_c(uint16_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh, int bd); -void vpx_highbd_lpf_horizontal_16_sse2(uint16_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh, int bd); -RTCD_EXTERN void (*vpx_highbd_lpf_horizontal_16)(uint16_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh, int bd); - -void vpx_highbd_lpf_horizontal_16_dual_c(uint16_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh, int bd); -void vpx_highbd_lpf_horizontal_16_dual_sse2(uint16_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh, int bd); -RTCD_EXTERN void (*vpx_highbd_lpf_horizontal_16_dual)(uint16_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh, int bd); - -void vpx_highbd_lpf_horizontal_4_c(uint16_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh, int bd); -void vpx_highbd_lpf_horizontal_4_sse2(uint16_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh, int bd); -RTCD_EXTERN void (*vpx_highbd_lpf_horizontal_4)(uint16_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh, int bd); - -void vpx_highbd_lpf_horizontal_4_dual_c(uint16_t *s, int pitch, const uint8_t *blimit0, const uint8_t *limit0, const uint8_t *thresh0, const uint8_t *blimit1, const uint8_t *limit1, const uint8_t *thresh1, int bd); -void vpx_highbd_lpf_horizontal_4_dual_sse2(uint16_t *s, int pitch, const uint8_t *blimit0, const uint8_t *limit0, const uint8_t *thresh0, const uint8_t *blimit1, const uint8_t *limit1, const uint8_t *thresh1, int bd); -RTCD_EXTERN void (*vpx_highbd_lpf_horizontal_4_dual)(uint16_t *s, int pitch, const uint8_t *blimit0, const uint8_t *limit0, const uint8_t *thresh0, const uint8_t *blimit1, const uint8_t *limit1, const uint8_t *thresh1, int bd); - -void vpx_highbd_lpf_horizontal_8_c(uint16_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh, int bd); -void vpx_highbd_lpf_horizontal_8_sse2(uint16_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh, int bd); -RTCD_EXTERN void (*vpx_highbd_lpf_horizontal_8)(uint16_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh, int bd); - -void vpx_highbd_lpf_horizontal_8_dual_c(uint16_t *s, int pitch, const uint8_t *blimit0, const uint8_t *limit0, const uint8_t *thresh0, const uint8_t *blimit1, const uint8_t *limit1, const uint8_t *thresh1, int bd); -void vpx_highbd_lpf_horizontal_8_dual_sse2(uint16_t *s, int pitch, const uint8_t *blimit0, const uint8_t *limit0, const uint8_t *thresh0, const uint8_t *blimit1, const uint8_t *limit1, const uint8_t *thresh1, int bd); -RTCD_EXTERN void (*vpx_highbd_lpf_horizontal_8_dual)(uint16_t *s, int pitch, const uint8_t *blimit0, const uint8_t *limit0, const uint8_t *thresh0, const uint8_t *blimit1, const uint8_t *limit1, const uint8_t *thresh1, int bd); - -void vpx_highbd_lpf_vertical_16_c(uint16_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh, int bd); -void vpx_highbd_lpf_vertical_16_sse2(uint16_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh, int bd); -RTCD_EXTERN void (*vpx_highbd_lpf_vertical_16)(uint16_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh, int bd); - -void vpx_highbd_lpf_vertical_16_dual_c(uint16_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh, int bd); -void vpx_highbd_lpf_vertical_16_dual_sse2(uint16_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh, int bd); -RTCD_EXTERN void (*vpx_highbd_lpf_vertical_16_dual)(uint16_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh, int bd); - -void vpx_highbd_lpf_vertical_4_c(uint16_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh, int bd); -void vpx_highbd_lpf_vertical_4_sse2(uint16_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh, int bd); -RTCD_EXTERN void (*vpx_highbd_lpf_vertical_4)(uint16_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh, int bd); - -void vpx_highbd_lpf_vertical_4_dual_c(uint16_t *s, int pitch, const uint8_t *blimit0, const uint8_t *limit0, const uint8_t *thresh0, const uint8_t *blimit1, const uint8_t *limit1, const uint8_t *thresh1, int bd); -void vpx_highbd_lpf_vertical_4_dual_sse2(uint16_t *s, int pitch, const uint8_t *blimit0, const uint8_t *limit0, const uint8_t *thresh0, const uint8_t *blimit1, const uint8_t *limit1, const uint8_t *thresh1, int bd); -RTCD_EXTERN void (*vpx_highbd_lpf_vertical_4_dual)(uint16_t *s, int pitch, const uint8_t *blimit0, const uint8_t *limit0, const uint8_t *thresh0, const uint8_t *blimit1, const uint8_t *limit1, const uint8_t *thresh1, int bd); - -void vpx_highbd_lpf_vertical_8_c(uint16_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh, int bd); -void vpx_highbd_lpf_vertical_8_sse2(uint16_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh, int bd); -RTCD_EXTERN void (*vpx_highbd_lpf_vertical_8)(uint16_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh, int bd); - -void vpx_highbd_lpf_vertical_8_dual_c(uint16_t *s, int pitch, const uint8_t *blimit0, const uint8_t *limit0, const uint8_t *thresh0, const uint8_t *blimit1, const uint8_t *limit1, const uint8_t *thresh1, int bd); -void vpx_highbd_lpf_vertical_8_dual_sse2(uint16_t *s, int pitch, const uint8_t *blimit0, const uint8_t *limit0, const uint8_t *thresh0, const uint8_t *blimit1, const uint8_t *limit1, const uint8_t *thresh1, int bd); -RTCD_EXTERN void (*vpx_highbd_lpf_vertical_8_dual)(uint16_t *s, int pitch, const uint8_t *blimit0, const uint8_t *limit0, const uint8_t *thresh0, const uint8_t *blimit1, const uint8_t *limit1, const uint8_t *thresh1, int bd); - -void vpx_highbd_minmax_8x8_c(const uint8_t *s, int p, const uint8_t *d, int dp, int *min, int *max); -#define vpx_highbd_minmax_8x8 vpx_highbd_minmax_8x8_c - -void vpx_highbd_quantize_b_c(const tran_low_t *coeff_ptr, intptr_t n_coeffs, int skip_block, const int16_t *zbin_ptr, const int16_t *round_ptr, const int16_t *quant_ptr, const int16_t *quant_shift_ptr, tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr, const int16_t *dequant_ptr, uint16_t *eob_ptr, const int16_t *scan, const int16_t *iscan); -void vpx_highbd_quantize_b_sse2(const tran_low_t *coeff_ptr, intptr_t n_coeffs, int skip_block, const int16_t *zbin_ptr, const int16_t *round_ptr, const int16_t *quant_ptr, const int16_t *quant_shift_ptr, tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr, const int16_t *dequant_ptr, uint16_t *eob_ptr, const int16_t *scan, const int16_t *iscan); -RTCD_EXTERN void (*vpx_highbd_quantize_b)(const tran_low_t *coeff_ptr, intptr_t n_coeffs, int skip_block, const int16_t *zbin_ptr, const int16_t *round_ptr, const int16_t *quant_ptr, const int16_t *quant_shift_ptr, tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr, const int16_t *dequant_ptr, uint16_t *eob_ptr, const int16_t *scan, const int16_t *iscan); - -void vpx_highbd_quantize_b_32x32_c(const tran_low_t *coeff_ptr, intptr_t n_coeffs, int skip_block, const int16_t *zbin_ptr, const int16_t *round_ptr, const int16_t *quant_ptr, const int16_t *quant_shift_ptr, tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr, const int16_t *dequant_ptr, uint16_t *eob_ptr, const int16_t *scan, const int16_t *iscan); -void vpx_highbd_quantize_b_32x32_sse2(const tran_low_t *coeff_ptr, intptr_t n_coeffs, int skip_block, const int16_t *zbin_ptr, const int16_t *round_ptr, const int16_t *quant_ptr, const int16_t *quant_shift_ptr, tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr, const int16_t *dequant_ptr, uint16_t *eob_ptr, const int16_t *scan, const int16_t *iscan); -RTCD_EXTERN void (*vpx_highbd_quantize_b_32x32)(const tran_low_t *coeff_ptr, intptr_t n_coeffs, int skip_block, const int16_t *zbin_ptr, const int16_t *round_ptr, const int16_t *quant_ptr, const int16_t *quant_shift_ptr, tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr, const int16_t *dequant_ptr, uint16_t *eob_ptr, const int16_t *scan, const int16_t *iscan); - -unsigned int vpx_highbd_sad16x16_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -unsigned int vpx_highbd_sad16x16_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -RTCD_EXTERN unsigned int (*vpx_highbd_sad16x16)(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); - -unsigned int vpx_highbd_sad16x16_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -unsigned int vpx_highbd_sad16x16_avg_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -RTCD_EXTERN unsigned int (*vpx_highbd_sad16x16_avg)(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); - -void vpx_highbd_sad16x16x3_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -#define vpx_highbd_sad16x16x3 vpx_highbd_sad16x16x3_c - -void vpx_highbd_sad16x16x4d_c(const uint8_t *src_ptr, int src_stride, const uint8_t* const ref_ptr[], int ref_stride, uint32_t *sad_array); -void vpx_highbd_sad16x16x4d_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t* const ref_ptr[], int ref_stride, uint32_t *sad_array); -RTCD_EXTERN void (*vpx_highbd_sad16x16x4d)(const uint8_t *src_ptr, int src_stride, const uint8_t* const ref_ptr[], int ref_stride, uint32_t *sad_array); - -void vpx_highbd_sad16x16x8_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -#define vpx_highbd_sad16x16x8 vpx_highbd_sad16x16x8_c - -unsigned int vpx_highbd_sad16x32_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -unsigned int vpx_highbd_sad16x32_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -RTCD_EXTERN unsigned int (*vpx_highbd_sad16x32)(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); - -unsigned int vpx_highbd_sad16x32_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -unsigned int vpx_highbd_sad16x32_avg_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -RTCD_EXTERN unsigned int (*vpx_highbd_sad16x32_avg)(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); - -void vpx_highbd_sad16x32x4d_c(const uint8_t *src_ptr, int src_stride, const uint8_t* const ref_ptr[], int ref_stride, uint32_t *sad_array); -void vpx_highbd_sad16x32x4d_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t* const ref_ptr[], int ref_stride, uint32_t *sad_array); -RTCD_EXTERN void (*vpx_highbd_sad16x32x4d)(const uint8_t *src_ptr, int src_stride, const uint8_t* const ref_ptr[], int ref_stride, uint32_t *sad_array); - -unsigned int vpx_highbd_sad16x8_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -unsigned int vpx_highbd_sad16x8_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -RTCD_EXTERN unsigned int (*vpx_highbd_sad16x8)(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); - -unsigned int vpx_highbd_sad16x8_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -unsigned int vpx_highbd_sad16x8_avg_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -RTCD_EXTERN unsigned int (*vpx_highbd_sad16x8_avg)(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); - -void vpx_highbd_sad16x8x3_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -#define vpx_highbd_sad16x8x3 vpx_highbd_sad16x8x3_c - -void vpx_highbd_sad16x8x4d_c(const uint8_t *src_ptr, int src_stride, const uint8_t* const ref_ptr[], int ref_stride, uint32_t *sad_array); -void vpx_highbd_sad16x8x4d_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t* const ref_ptr[], int ref_stride, uint32_t *sad_array); -RTCD_EXTERN void (*vpx_highbd_sad16x8x4d)(const uint8_t *src_ptr, int src_stride, const uint8_t* const ref_ptr[], int ref_stride, uint32_t *sad_array); - -void vpx_highbd_sad16x8x8_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -#define vpx_highbd_sad16x8x8 vpx_highbd_sad16x8x8_c - -unsigned int vpx_highbd_sad32x16_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -unsigned int vpx_highbd_sad32x16_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -RTCD_EXTERN unsigned int (*vpx_highbd_sad32x16)(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); - -unsigned int vpx_highbd_sad32x16_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -unsigned int vpx_highbd_sad32x16_avg_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -RTCD_EXTERN unsigned int (*vpx_highbd_sad32x16_avg)(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); - -void vpx_highbd_sad32x16x4d_c(const uint8_t *src_ptr, int src_stride, const uint8_t* const ref_ptr[], int ref_stride, uint32_t *sad_array); -void vpx_highbd_sad32x16x4d_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t* const ref_ptr[], int ref_stride, uint32_t *sad_array); -RTCD_EXTERN void (*vpx_highbd_sad32x16x4d)(const uint8_t *src_ptr, int src_stride, const uint8_t* const ref_ptr[], int ref_stride, uint32_t *sad_array); - -unsigned int vpx_highbd_sad32x32_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -unsigned int vpx_highbd_sad32x32_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -RTCD_EXTERN unsigned int (*vpx_highbd_sad32x32)(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); - -unsigned int vpx_highbd_sad32x32_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -unsigned int vpx_highbd_sad32x32_avg_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -RTCD_EXTERN unsigned int (*vpx_highbd_sad32x32_avg)(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); - -void vpx_highbd_sad32x32x3_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -#define vpx_highbd_sad32x32x3 vpx_highbd_sad32x32x3_c - -void vpx_highbd_sad32x32x4d_c(const uint8_t *src_ptr, int src_stride, const uint8_t* const ref_ptr[], int ref_stride, uint32_t *sad_array); -void vpx_highbd_sad32x32x4d_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t* const ref_ptr[], int ref_stride, uint32_t *sad_array); -RTCD_EXTERN void (*vpx_highbd_sad32x32x4d)(const uint8_t *src_ptr, int src_stride, const uint8_t* const ref_ptr[], int ref_stride, uint32_t *sad_array); - -void vpx_highbd_sad32x32x8_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -#define vpx_highbd_sad32x32x8 vpx_highbd_sad32x32x8_c - -unsigned int vpx_highbd_sad32x64_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -unsigned int vpx_highbd_sad32x64_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -RTCD_EXTERN unsigned int (*vpx_highbd_sad32x64)(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); - -unsigned int vpx_highbd_sad32x64_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -unsigned int vpx_highbd_sad32x64_avg_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -RTCD_EXTERN unsigned int (*vpx_highbd_sad32x64_avg)(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); - -void vpx_highbd_sad32x64x4d_c(const uint8_t *src_ptr, int src_stride, const uint8_t* const ref_ptr[], int ref_stride, uint32_t *sad_array); -void vpx_highbd_sad32x64x4d_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t* const ref_ptr[], int ref_stride, uint32_t *sad_array); -RTCD_EXTERN void (*vpx_highbd_sad32x64x4d)(const uint8_t *src_ptr, int src_stride, const uint8_t* const ref_ptr[], int ref_stride, uint32_t *sad_array); - -unsigned int vpx_highbd_sad4x4_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -#define vpx_highbd_sad4x4 vpx_highbd_sad4x4_c - -unsigned int vpx_highbd_sad4x4_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -#define vpx_highbd_sad4x4_avg vpx_highbd_sad4x4_avg_c - -void vpx_highbd_sad4x4x3_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -#define vpx_highbd_sad4x4x3 vpx_highbd_sad4x4x3_c - -void vpx_highbd_sad4x4x4d_c(const uint8_t *src_ptr, int src_stride, const uint8_t* const ref_ptr[], int ref_stride, uint32_t *sad_array); -void vpx_highbd_sad4x4x4d_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t* const ref_ptr[], int ref_stride, uint32_t *sad_array); -RTCD_EXTERN void (*vpx_highbd_sad4x4x4d)(const uint8_t *src_ptr, int src_stride, const uint8_t* const ref_ptr[], int ref_stride, uint32_t *sad_array); - -void vpx_highbd_sad4x4x8_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -#define vpx_highbd_sad4x4x8 vpx_highbd_sad4x4x8_c - -unsigned int vpx_highbd_sad4x8_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -#define vpx_highbd_sad4x8 vpx_highbd_sad4x8_c - -unsigned int vpx_highbd_sad4x8_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -#define vpx_highbd_sad4x8_avg vpx_highbd_sad4x8_avg_c - -void vpx_highbd_sad4x8x4d_c(const uint8_t *src_ptr, int src_stride, const uint8_t* const ref_ptr[], int ref_stride, uint32_t *sad_array); -void vpx_highbd_sad4x8x4d_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t* const ref_ptr[], int ref_stride, uint32_t *sad_array); -RTCD_EXTERN void (*vpx_highbd_sad4x8x4d)(const uint8_t *src_ptr, int src_stride, const uint8_t* const ref_ptr[], int ref_stride, uint32_t *sad_array); - -void vpx_highbd_sad4x8x8_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -#define vpx_highbd_sad4x8x8 vpx_highbd_sad4x8x8_c - -unsigned int vpx_highbd_sad64x32_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -unsigned int vpx_highbd_sad64x32_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -RTCD_EXTERN unsigned int (*vpx_highbd_sad64x32)(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); - -unsigned int vpx_highbd_sad64x32_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -unsigned int vpx_highbd_sad64x32_avg_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -RTCD_EXTERN unsigned int (*vpx_highbd_sad64x32_avg)(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); - -void vpx_highbd_sad64x32x4d_c(const uint8_t *src_ptr, int src_stride, const uint8_t* const ref_ptr[], int ref_stride, uint32_t *sad_array); -void vpx_highbd_sad64x32x4d_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t* const ref_ptr[], int ref_stride, uint32_t *sad_array); -RTCD_EXTERN void (*vpx_highbd_sad64x32x4d)(const uint8_t *src_ptr, int src_stride, const uint8_t* const ref_ptr[], int ref_stride, uint32_t *sad_array); - -unsigned int vpx_highbd_sad64x64_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -unsigned int vpx_highbd_sad64x64_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -RTCD_EXTERN unsigned int (*vpx_highbd_sad64x64)(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); - -unsigned int vpx_highbd_sad64x64_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -unsigned int vpx_highbd_sad64x64_avg_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -RTCD_EXTERN unsigned int (*vpx_highbd_sad64x64_avg)(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); - -void vpx_highbd_sad64x64x3_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -#define vpx_highbd_sad64x64x3 vpx_highbd_sad64x64x3_c - -void vpx_highbd_sad64x64x4d_c(const uint8_t *src_ptr, int src_stride, const uint8_t* const ref_ptr[], int ref_stride, uint32_t *sad_array); -void vpx_highbd_sad64x64x4d_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t* const ref_ptr[], int ref_stride, uint32_t *sad_array); -RTCD_EXTERN void (*vpx_highbd_sad64x64x4d)(const uint8_t *src_ptr, int src_stride, const uint8_t* const ref_ptr[], int ref_stride, uint32_t *sad_array); - -void vpx_highbd_sad64x64x8_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -#define vpx_highbd_sad64x64x8 vpx_highbd_sad64x64x8_c - -unsigned int vpx_highbd_sad8x16_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -unsigned int vpx_highbd_sad8x16_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -RTCD_EXTERN unsigned int (*vpx_highbd_sad8x16)(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); - -unsigned int vpx_highbd_sad8x16_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -unsigned int vpx_highbd_sad8x16_avg_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -RTCD_EXTERN unsigned int (*vpx_highbd_sad8x16_avg)(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); - -void vpx_highbd_sad8x16x3_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -#define vpx_highbd_sad8x16x3 vpx_highbd_sad8x16x3_c - -void vpx_highbd_sad8x16x4d_c(const uint8_t *src_ptr, int src_stride, const uint8_t* const ref_ptr[], int ref_stride, uint32_t *sad_array); -void vpx_highbd_sad8x16x4d_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t* const ref_ptr[], int ref_stride, uint32_t *sad_array); -RTCD_EXTERN void (*vpx_highbd_sad8x16x4d)(const uint8_t *src_ptr, int src_stride, const uint8_t* const ref_ptr[], int ref_stride, uint32_t *sad_array); - -void vpx_highbd_sad8x16x8_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -#define vpx_highbd_sad8x16x8 vpx_highbd_sad8x16x8_c - -unsigned int vpx_highbd_sad8x4_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -unsigned int vpx_highbd_sad8x4_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -RTCD_EXTERN unsigned int (*vpx_highbd_sad8x4)(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); - -unsigned int vpx_highbd_sad8x4_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -unsigned int vpx_highbd_sad8x4_avg_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -RTCD_EXTERN unsigned int (*vpx_highbd_sad8x4_avg)(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); - -void vpx_highbd_sad8x4x4d_c(const uint8_t *src_ptr, int src_stride, const uint8_t* const ref_ptr[], int ref_stride, uint32_t *sad_array); -void vpx_highbd_sad8x4x4d_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t* const ref_ptr[], int ref_stride, uint32_t *sad_array); -RTCD_EXTERN void (*vpx_highbd_sad8x4x4d)(const uint8_t *src_ptr, int src_stride, const uint8_t* const ref_ptr[], int ref_stride, uint32_t *sad_array); - -void vpx_highbd_sad8x4x8_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -#define vpx_highbd_sad8x4x8 vpx_highbd_sad8x4x8_c - -unsigned int vpx_highbd_sad8x8_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -unsigned int vpx_highbd_sad8x8_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -RTCD_EXTERN unsigned int (*vpx_highbd_sad8x8)(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); - -unsigned int vpx_highbd_sad8x8_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -unsigned int vpx_highbd_sad8x8_avg_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -RTCD_EXTERN unsigned int (*vpx_highbd_sad8x8_avg)(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); - -void vpx_highbd_sad8x8x3_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -#define vpx_highbd_sad8x8x3 vpx_highbd_sad8x8x3_c - -void vpx_highbd_sad8x8x4d_c(const uint8_t *src_ptr, int src_stride, const uint8_t* const ref_ptr[], int ref_stride, uint32_t *sad_array); -void vpx_highbd_sad8x8x4d_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t* const ref_ptr[], int ref_stride, uint32_t *sad_array); -RTCD_EXTERN void (*vpx_highbd_sad8x8x4d)(const uint8_t *src_ptr, int src_stride, const uint8_t* const ref_ptr[], int ref_stride, uint32_t *sad_array); - -void vpx_highbd_sad8x8x8_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -#define vpx_highbd_sad8x8x8 vpx_highbd_sad8x8x8_c - -void vpx_highbd_subtract_block_c(int rows, int cols, int16_t *diff_ptr, ptrdiff_t diff_stride, const uint8_t *src_ptr, ptrdiff_t src_stride, const uint8_t *pred_ptr, ptrdiff_t pred_stride, int bd); -#define vpx_highbd_subtract_block vpx_highbd_subtract_block_c - -void vpx_highbd_tm_predictor_16x16_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -void vpx_highbd_tm_predictor_16x16_sse2(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -RTCD_EXTERN void (*vpx_highbd_tm_predictor_16x16)(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); - -void vpx_highbd_tm_predictor_32x32_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -void vpx_highbd_tm_predictor_32x32_sse2(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -RTCD_EXTERN void (*vpx_highbd_tm_predictor_32x32)(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); - -void vpx_highbd_tm_predictor_4x4_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -void vpx_highbd_tm_predictor_4x4_sse2(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -RTCD_EXTERN void (*vpx_highbd_tm_predictor_4x4)(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); - -void vpx_highbd_tm_predictor_8x8_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -void vpx_highbd_tm_predictor_8x8_sse2(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -RTCD_EXTERN void (*vpx_highbd_tm_predictor_8x8)(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); - -void vpx_highbd_v_predictor_16x16_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -void vpx_highbd_v_predictor_16x16_sse2(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -RTCD_EXTERN void (*vpx_highbd_v_predictor_16x16)(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); - -void vpx_highbd_v_predictor_32x32_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -void vpx_highbd_v_predictor_32x32_sse2(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -RTCD_EXTERN void (*vpx_highbd_v_predictor_32x32)(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); - -void vpx_highbd_v_predictor_4x4_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -void vpx_highbd_v_predictor_4x4_sse2(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -RTCD_EXTERN void (*vpx_highbd_v_predictor_4x4)(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); - -void vpx_highbd_v_predictor_8x8_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -void vpx_highbd_v_predictor_8x8_sse2(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -RTCD_EXTERN void (*vpx_highbd_v_predictor_8x8)(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); - -void vpx_idct16x16_10_add_c(const tran_low_t *input, uint8_t *dest, int stride); -void vpx_idct16x16_10_add_sse2(const tran_low_t *input, uint8_t *dest, int stride); -RTCD_EXTERN void (*vpx_idct16x16_10_add)(const tran_low_t *input, uint8_t *dest, int stride); - -void vpx_idct16x16_1_add_c(const tran_low_t *input, uint8_t *dest, int stride); -void vpx_idct16x16_1_add_sse2(const tran_low_t *input, uint8_t *dest, int stride); -RTCD_EXTERN void (*vpx_idct16x16_1_add)(const tran_low_t *input, uint8_t *dest, int stride); - -void vpx_idct16x16_256_add_c(const tran_low_t *input, uint8_t *dest, int stride); -void vpx_idct16x16_256_add_sse2(const tran_low_t *input, uint8_t *dest, int stride); -RTCD_EXTERN void (*vpx_idct16x16_256_add)(const tran_low_t *input, uint8_t *dest, int stride); - -void vpx_idct32x32_1024_add_c(const tran_low_t *input, uint8_t *dest, int stride); -void vpx_idct32x32_1024_add_sse2(const tran_low_t *input, uint8_t *dest, int stride); -RTCD_EXTERN void (*vpx_idct32x32_1024_add)(const tran_low_t *input, uint8_t *dest, int stride); - -void vpx_idct32x32_135_add_c(const tran_low_t *input, uint8_t *dest, int stride); -void vpx_idct32x32_1024_add_sse2(const tran_low_t *input, uint8_t *dest, int stride); -RTCD_EXTERN void (*vpx_idct32x32_135_add)(const tran_low_t *input, uint8_t *dest, int stride); - -void vpx_idct32x32_1_add_c(const tran_low_t *input, uint8_t *dest, int stride); -void vpx_idct32x32_1_add_sse2(const tran_low_t *input, uint8_t *dest, int stride); -RTCD_EXTERN void (*vpx_idct32x32_1_add)(const tran_low_t *input, uint8_t *dest, int stride); - -void vpx_idct32x32_34_add_c(const tran_low_t *input, uint8_t *dest, int stride); -void vpx_idct32x32_34_add_sse2(const tran_low_t *input, uint8_t *dest, int stride); -RTCD_EXTERN void (*vpx_idct32x32_34_add)(const tran_low_t *input, uint8_t *dest, int stride); - -void vpx_idct4x4_16_add_c(const tran_low_t *input, uint8_t *dest, int stride); -void vpx_idct4x4_16_add_sse2(const tran_low_t *input, uint8_t *dest, int stride); -RTCD_EXTERN void (*vpx_idct4x4_16_add)(const tran_low_t *input, uint8_t *dest, int stride); - -void vpx_idct4x4_1_add_c(const tran_low_t *input, uint8_t *dest, int stride); -void vpx_idct4x4_1_add_sse2(const tran_low_t *input, uint8_t *dest, int stride); -RTCD_EXTERN void (*vpx_idct4x4_1_add)(const tran_low_t *input, uint8_t *dest, int stride); - -void vpx_idct8x8_12_add_c(const tran_low_t *input, uint8_t *dest, int stride); -void vpx_idct8x8_12_add_sse2(const tran_low_t *input, uint8_t *dest, int stride); -RTCD_EXTERN void (*vpx_idct8x8_12_add)(const tran_low_t *input, uint8_t *dest, int stride); - -void vpx_idct8x8_1_add_c(const tran_low_t *input, uint8_t *dest, int stride); -void vpx_idct8x8_1_add_sse2(const tran_low_t *input, uint8_t *dest, int stride); -RTCD_EXTERN void (*vpx_idct8x8_1_add)(const tran_low_t *input, uint8_t *dest, int stride); - -void vpx_idct8x8_64_add_c(const tran_low_t *input, uint8_t *dest, int stride); -void vpx_idct8x8_64_add_sse2(const tran_low_t *input, uint8_t *dest, int stride); -RTCD_EXTERN void (*vpx_idct8x8_64_add)(const tran_low_t *input, uint8_t *dest, int stride); - -int16_t vpx_int_pro_col_c(const uint8_t *ref, const int width); -int16_t vpx_int_pro_col_sse2(const uint8_t *ref, const int width); -RTCD_EXTERN int16_t (*vpx_int_pro_col)(const uint8_t *ref, const int width); - -void vpx_int_pro_row_c(int16_t *hbuf, const uint8_t *ref, const int ref_stride, const int height); -void vpx_int_pro_row_sse2(int16_t *hbuf, const uint8_t *ref, const int ref_stride, const int height); -RTCD_EXTERN void (*vpx_int_pro_row)(int16_t *hbuf, const uint8_t *ref, const int ref_stride, const int height); - -void vpx_iwht4x4_16_add_c(const tran_low_t *input, uint8_t *dest, int stride); -void vpx_iwht4x4_16_add_sse2(const tran_low_t *input, uint8_t *dest, int stride); -RTCD_EXTERN void (*vpx_iwht4x4_16_add)(const tran_low_t *input, uint8_t *dest, int stride); - -void vpx_iwht4x4_1_add_c(const tran_low_t *input, uint8_t *dest, int stride); -#define vpx_iwht4x4_1_add vpx_iwht4x4_1_add_c - -void vpx_lpf_horizontal_16_c(uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh); -void vpx_lpf_horizontal_16_sse2(uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh); -void vpx_lpf_horizontal_16_avx2(uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh); -RTCD_EXTERN void (*vpx_lpf_horizontal_16)(uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh); - -void vpx_lpf_horizontal_16_dual_c(uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh); -void vpx_lpf_horizontal_16_dual_sse2(uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh); -void vpx_lpf_horizontal_16_dual_avx2(uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh); -RTCD_EXTERN void (*vpx_lpf_horizontal_16_dual)(uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh); - -void vpx_lpf_horizontal_4_c(uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh); -void vpx_lpf_horizontal_4_sse2(uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh); -RTCD_EXTERN void (*vpx_lpf_horizontal_4)(uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh); - -void vpx_lpf_horizontal_4_dual_c(uint8_t *s, int pitch, const uint8_t *blimit0, const uint8_t *limit0, const uint8_t *thresh0, const uint8_t *blimit1, const uint8_t *limit1, const uint8_t *thresh1); -void vpx_lpf_horizontal_4_dual_sse2(uint8_t *s, int pitch, const uint8_t *blimit0, const uint8_t *limit0, const uint8_t *thresh0, const uint8_t *blimit1, const uint8_t *limit1, const uint8_t *thresh1); -RTCD_EXTERN void (*vpx_lpf_horizontal_4_dual)(uint8_t *s, int pitch, const uint8_t *blimit0, const uint8_t *limit0, const uint8_t *thresh0, const uint8_t *blimit1, const uint8_t *limit1, const uint8_t *thresh1); - -void vpx_lpf_horizontal_8_c(uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh); -void vpx_lpf_horizontal_8_sse2(uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh); -RTCD_EXTERN void (*vpx_lpf_horizontal_8)(uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh); - -void vpx_lpf_horizontal_8_dual_c(uint8_t *s, int pitch, const uint8_t *blimit0, const uint8_t *limit0, const uint8_t *thresh0, const uint8_t *blimit1, const uint8_t *limit1, const uint8_t *thresh1); -void vpx_lpf_horizontal_8_dual_sse2(uint8_t *s, int pitch, const uint8_t *blimit0, const uint8_t *limit0, const uint8_t *thresh0, const uint8_t *blimit1, const uint8_t *limit1, const uint8_t *thresh1); -RTCD_EXTERN void (*vpx_lpf_horizontal_8_dual)(uint8_t *s, int pitch, const uint8_t *blimit0, const uint8_t *limit0, const uint8_t *thresh0, const uint8_t *blimit1, const uint8_t *limit1, const uint8_t *thresh1); - -void vpx_lpf_vertical_16_c(uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh); -void vpx_lpf_vertical_16_sse2(uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh); -RTCD_EXTERN void (*vpx_lpf_vertical_16)(uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh); - -void vpx_lpf_vertical_16_dual_c(uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh); -void vpx_lpf_vertical_16_dual_sse2(uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh); -RTCD_EXTERN void (*vpx_lpf_vertical_16_dual)(uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh); - -void vpx_lpf_vertical_4_c(uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh); -void vpx_lpf_vertical_4_sse2(uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh); -RTCD_EXTERN void (*vpx_lpf_vertical_4)(uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh); - -void vpx_lpf_vertical_4_dual_c(uint8_t *s, int pitch, const uint8_t *blimit0, const uint8_t *limit0, const uint8_t *thresh0, const uint8_t *blimit1, const uint8_t *limit1, const uint8_t *thresh1); -void vpx_lpf_vertical_4_dual_sse2(uint8_t *s, int pitch, const uint8_t *blimit0, const uint8_t *limit0, const uint8_t *thresh0, const uint8_t *blimit1, const uint8_t *limit1, const uint8_t *thresh1); -RTCD_EXTERN void (*vpx_lpf_vertical_4_dual)(uint8_t *s, int pitch, const uint8_t *blimit0, const uint8_t *limit0, const uint8_t *thresh0, const uint8_t *blimit1, const uint8_t *limit1, const uint8_t *thresh1); - -void vpx_lpf_vertical_8_c(uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh); -void vpx_lpf_vertical_8_sse2(uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh); -RTCD_EXTERN void (*vpx_lpf_vertical_8)(uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh); - -void vpx_lpf_vertical_8_dual_c(uint8_t *s, int pitch, const uint8_t *blimit0, const uint8_t *limit0, const uint8_t *thresh0, const uint8_t *blimit1, const uint8_t *limit1, const uint8_t *thresh1); -void vpx_lpf_vertical_8_dual_sse2(uint8_t *s, int pitch, const uint8_t *blimit0, const uint8_t *limit0, const uint8_t *thresh0, const uint8_t *blimit1, const uint8_t *limit1, const uint8_t *thresh1); -RTCD_EXTERN void (*vpx_lpf_vertical_8_dual)(uint8_t *s, int pitch, const uint8_t *blimit0, const uint8_t *limit0, const uint8_t *thresh0, const uint8_t *blimit1, const uint8_t *limit1, const uint8_t *thresh1); - -void vpx_mbpost_proc_across_ip_c(unsigned char *dst, int pitch, int rows, int cols,int flimit); -void vpx_mbpost_proc_across_ip_sse2(unsigned char *dst, int pitch, int rows, int cols,int flimit); -RTCD_EXTERN void (*vpx_mbpost_proc_across_ip)(unsigned char *dst, int pitch, int rows, int cols,int flimit); - -void vpx_mbpost_proc_down_c(unsigned char *dst, int pitch, int rows, int cols,int flimit); -void vpx_mbpost_proc_down_sse2(unsigned char *dst, int pitch, int rows, int cols,int flimit); -RTCD_EXTERN void (*vpx_mbpost_proc_down)(unsigned char *dst, int pitch, int rows, int cols,int flimit); - -void vpx_minmax_8x8_c(const uint8_t *s, int p, const uint8_t *d, int dp, int *min, int *max); -void vpx_minmax_8x8_sse2(const uint8_t *s, int p, const uint8_t *d, int dp, int *min, int *max); -RTCD_EXTERN void (*vpx_minmax_8x8)(const uint8_t *s, int p, const uint8_t *d, int dp, int *min, int *max); - -unsigned int vpx_mse16x16_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int recon_stride, unsigned int *sse); -unsigned int vpx_mse16x16_sse2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int recon_stride, unsigned int *sse); -unsigned int vpx_mse16x16_avx2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int recon_stride, unsigned int *sse); -RTCD_EXTERN unsigned int (*vpx_mse16x16)(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int recon_stride, unsigned int *sse); - -unsigned int vpx_mse16x8_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int recon_stride, unsigned int *sse); -unsigned int vpx_mse16x8_sse2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int recon_stride, unsigned int *sse); -RTCD_EXTERN unsigned int (*vpx_mse16x8)(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int recon_stride, unsigned int *sse); - -unsigned int vpx_mse8x16_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int recon_stride, unsigned int *sse); -unsigned int vpx_mse8x16_sse2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int recon_stride, unsigned int *sse); -RTCD_EXTERN unsigned int (*vpx_mse8x16)(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int recon_stride, unsigned int *sse); - -unsigned int vpx_mse8x8_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int recon_stride, unsigned int *sse); -unsigned int vpx_mse8x8_sse2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int recon_stride, unsigned int *sse); -RTCD_EXTERN unsigned int (*vpx_mse8x8)(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int recon_stride, unsigned int *sse); - -void vpx_plane_add_noise_c(uint8_t *start, const int8_t *noise, int blackclamp, int whiteclamp, int width, int height, int pitch); -void vpx_plane_add_noise_sse2(uint8_t *start, const int8_t *noise, int blackclamp, int whiteclamp, int width, int height, int pitch); -RTCD_EXTERN void (*vpx_plane_add_noise)(uint8_t *start, const int8_t *noise, int blackclamp, int whiteclamp, int width, int height, int pitch); - -void vpx_post_proc_down_and_across_mb_row_c(unsigned char *src, unsigned char *dst, int src_pitch, int dst_pitch, int cols, unsigned char *flimits, int size); -void vpx_post_proc_down_and_across_mb_row_sse2(unsigned char *src, unsigned char *dst, int src_pitch, int dst_pitch, int cols, unsigned char *flimits, int size); -RTCD_EXTERN void (*vpx_post_proc_down_and_across_mb_row)(unsigned char *src, unsigned char *dst, int src_pitch, int dst_pitch, int cols, unsigned char *flimits, int size); - -void vpx_quantize_b_c(const tran_low_t *coeff_ptr, intptr_t n_coeffs, int skip_block, const int16_t *zbin_ptr, const int16_t *round_ptr, const int16_t *quant_ptr, const int16_t *quant_shift_ptr, tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr, const int16_t *dequant_ptr, uint16_t *eob_ptr, const int16_t *scan, const int16_t *iscan); -void vpx_quantize_b_sse2(const tran_low_t *coeff_ptr, intptr_t n_coeffs, int skip_block, const int16_t *zbin_ptr, const int16_t *round_ptr, const int16_t *quant_ptr, const int16_t *quant_shift_ptr, tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr, const int16_t *dequant_ptr, uint16_t *eob_ptr, const int16_t *scan, const int16_t *iscan); -RTCD_EXTERN void (*vpx_quantize_b)(const tran_low_t *coeff_ptr, intptr_t n_coeffs, int skip_block, const int16_t *zbin_ptr, const int16_t *round_ptr, const int16_t *quant_ptr, const int16_t *quant_shift_ptr, tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr, const int16_t *dequant_ptr, uint16_t *eob_ptr, const int16_t *scan, const int16_t *iscan); - -void vpx_quantize_b_32x32_c(const tran_low_t *coeff_ptr, intptr_t n_coeffs, int skip_block, const int16_t *zbin_ptr, const int16_t *round_ptr, const int16_t *quant_ptr, const int16_t *quant_shift_ptr, tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr, const int16_t *dequant_ptr, uint16_t *eob_ptr, const int16_t *scan, const int16_t *iscan); -#define vpx_quantize_b_32x32 vpx_quantize_b_32x32_c - -unsigned int vpx_sad16x16_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -unsigned int vpx_sad16x16_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -RTCD_EXTERN unsigned int (*vpx_sad16x16)(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); - -unsigned int vpx_sad16x16_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -unsigned int vpx_sad16x16_avg_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -RTCD_EXTERN unsigned int (*vpx_sad16x16_avg)(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); - -void vpx_sad16x16x3_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -void vpx_sad16x16x3_sse3(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -void vpx_sad16x16x3_ssse3(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -RTCD_EXTERN void (*vpx_sad16x16x3)(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); - -void vpx_sad16x16x4d_c(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); -void vpx_sad16x16x4d_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); -RTCD_EXTERN void (*vpx_sad16x16x4d)(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); - -void vpx_sad16x16x8_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -void vpx_sad16x16x8_sse4_1(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -RTCD_EXTERN void (*vpx_sad16x16x8)(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); - -unsigned int vpx_sad16x32_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -unsigned int vpx_sad16x32_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -RTCD_EXTERN unsigned int (*vpx_sad16x32)(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); - -unsigned int vpx_sad16x32_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -unsigned int vpx_sad16x32_avg_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -RTCD_EXTERN unsigned int (*vpx_sad16x32_avg)(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); - -void vpx_sad16x32x4d_c(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); -void vpx_sad16x32x4d_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); -RTCD_EXTERN void (*vpx_sad16x32x4d)(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); - -unsigned int vpx_sad16x8_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -unsigned int vpx_sad16x8_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -RTCD_EXTERN unsigned int (*vpx_sad16x8)(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); - -unsigned int vpx_sad16x8_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -unsigned int vpx_sad16x8_avg_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -RTCD_EXTERN unsigned int (*vpx_sad16x8_avg)(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); - -void vpx_sad16x8x3_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -void vpx_sad16x8x3_sse3(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -void vpx_sad16x8x3_ssse3(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -RTCD_EXTERN void (*vpx_sad16x8x3)(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); - -void vpx_sad16x8x4d_c(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); -void vpx_sad16x8x4d_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); -RTCD_EXTERN void (*vpx_sad16x8x4d)(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); - -void vpx_sad16x8x8_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -void vpx_sad16x8x8_sse4_1(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -RTCD_EXTERN void (*vpx_sad16x8x8)(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); - -unsigned int vpx_sad32x16_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -unsigned int vpx_sad32x16_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -unsigned int vpx_sad32x16_avx2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -RTCD_EXTERN unsigned int (*vpx_sad32x16)(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); - -unsigned int vpx_sad32x16_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -unsigned int vpx_sad32x16_avg_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -unsigned int vpx_sad32x16_avg_avx2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -RTCD_EXTERN unsigned int (*vpx_sad32x16_avg)(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); - -void vpx_sad32x16x4d_c(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); -void vpx_sad32x16x4d_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); -RTCD_EXTERN void (*vpx_sad32x16x4d)(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); - -unsigned int vpx_sad32x32_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -unsigned int vpx_sad32x32_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -unsigned int vpx_sad32x32_avx2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -RTCD_EXTERN unsigned int (*vpx_sad32x32)(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); - -unsigned int vpx_sad32x32_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -unsigned int vpx_sad32x32_avg_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -unsigned int vpx_sad32x32_avg_avx2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -RTCD_EXTERN unsigned int (*vpx_sad32x32_avg)(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); - -void vpx_sad32x32x3_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -#define vpx_sad32x32x3 vpx_sad32x32x3_c - -void vpx_sad32x32x4d_c(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); -void vpx_sad32x32x4d_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); -void vpx_sad32x32x4d_avx2(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); -RTCD_EXTERN void (*vpx_sad32x32x4d)(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); - -void vpx_sad32x32x8_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -#define vpx_sad32x32x8 vpx_sad32x32x8_c - -unsigned int vpx_sad32x64_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -unsigned int vpx_sad32x64_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -unsigned int vpx_sad32x64_avx2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -RTCD_EXTERN unsigned int (*vpx_sad32x64)(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); - -unsigned int vpx_sad32x64_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -unsigned int vpx_sad32x64_avg_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -unsigned int vpx_sad32x64_avg_avx2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -RTCD_EXTERN unsigned int (*vpx_sad32x64_avg)(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); - -void vpx_sad32x64x4d_c(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); -void vpx_sad32x64x4d_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); -RTCD_EXTERN void (*vpx_sad32x64x4d)(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); - -unsigned int vpx_sad4x4_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -unsigned int vpx_sad4x4_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -RTCD_EXTERN unsigned int (*vpx_sad4x4)(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); - -unsigned int vpx_sad4x4_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -unsigned int vpx_sad4x4_avg_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -RTCD_EXTERN unsigned int (*vpx_sad4x4_avg)(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); - -void vpx_sad4x4x3_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -void vpx_sad4x4x3_sse3(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -RTCD_EXTERN void (*vpx_sad4x4x3)(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); - -void vpx_sad4x4x4d_c(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); -void vpx_sad4x4x4d_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); -RTCD_EXTERN void (*vpx_sad4x4x4d)(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); - -void vpx_sad4x4x8_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -void vpx_sad4x4x8_sse4_1(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -RTCD_EXTERN void (*vpx_sad4x4x8)(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); - -unsigned int vpx_sad4x8_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -unsigned int vpx_sad4x8_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -RTCD_EXTERN unsigned int (*vpx_sad4x8)(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); - -unsigned int vpx_sad4x8_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -unsigned int vpx_sad4x8_avg_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -RTCD_EXTERN unsigned int (*vpx_sad4x8_avg)(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); - -void vpx_sad4x8x4d_c(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); -void vpx_sad4x8x4d_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); -RTCD_EXTERN void (*vpx_sad4x8x4d)(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); - -void vpx_sad4x8x8_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -#define vpx_sad4x8x8 vpx_sad4x8x8_c - -unsigned int vpx_sad64x32_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -unsigned int vpx_sad64x32_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -unsigned int vpx_sad64x32_avx2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -RTCD_EXTERN unsigned int (*vpx_sad64x32)(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); - -unsigned int vpx_sad64x32_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -unsigned int vpx_sad64x32_avg_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -unsigned int vpx_sad64x32_avg_avx2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -RTCD_EXTERN unsigned int (*vpx_sad64x32_avg)(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); - -void vpx_sad64x32x4d_c(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); -void vpx_sad64x32x4d_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); -RTCD_EXTERN void (*vpx_sad64x32x4d)(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); - -unsigned int vpx_sad64x64_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -unsigned int vpx_sad64x64_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -unsigned int vpx_sad64x64_avx2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -RTCD_EXTERN unsigned int (*vpx_sad64x64)(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); - -unsigned int vpx_sad64x64_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -unsigned int vpx_sad64x64_avg_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -unsigned int vpx_sad64x64_avg_avx2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -RTCD_EXTERN unsigned int (*vpx_sad64x64_avg)(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); - -void vpx_sad64x64x3_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -#define vpx_sad64x64x3 vpx_sad64x64x3_c - -void vpx_sad64x64x4d_c(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); -void vpx_sad64x64x4d_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); -void vpx_sad64x64x4d_avx2(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); -RTCD_EXTERN void (*vpx_sad64x64x4d)(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); - -void vpx_sad64x64x8_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -#define vpx_sad64x64x8 vpx_sad64x64x8_c - -unsigned int vpx_sad8x16_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -unsigned int vpx_sad8x16_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -RTCD_EXTERN unsigned int (*vpx_sad8x16)(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); - -unsigned int vpx_sad8x16_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -unsigned int vpx_sad8x16_avg_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -RTCD_EXTERN unsigned int (*vpx_sad8x16_avg)(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); - -void vpx_sad8x16x3_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -void vpx_sad8x16x3_sse3(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -RTCD_EXTERN void (*vpx_sad8x16x3)(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); - -void vpx_sad8x16x4d_c(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); -void vpx_sad8x16x4d_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); -RTCD_EXTERN void (*vpx_sad8x16x4d)(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); - -void vpx_sad8x16x8_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -void vpx_sad8x16x8_sse4_1(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -RTCD_EXTERN void (*vpx_sad8x16x8)(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); - -unsigned int vpx_sad8x4_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -unsigned int vpx_sad8x4_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -RTCD_EXTERN unsigned int (*vpx_sad8x4)(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); - -unsigned int vpx_sad8x4_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -unsigned int vpx_sad8x4_avg_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -RTCD_EXTERN unsigned int (*vpx_sad8x4_avg)(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); - -void vpx_sad8x4x4d_c(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); -void vpx_sad8x4x4d_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); -RTCD_EXTERN void (*vpx_sad8x4x4d)(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); - -void vpx_sad8x4x8_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -#define vpx_sad8x4x8 vpx_sad8x4x8_c - -unsigned int vpx_sad8x8_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -unsigned int vpx_sad8x8_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -RTCD_EXTERN unsigned int (*vpx_sad8x8)(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); - -unsigned int vpx_sad8x8_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -unsigned int vpx_sad8x8_avg_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -RTCD_EXTERN unsigned int (*vpx_sad8x8_avg)(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); - -void vpx_sad8x8x3_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -void vpx_sad8x8x3_sse3(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -RTCD_EXTERN void (*vpx_sad8x8x3)(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); - -void vpx_sad8x8x4d_c(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); -void vpx_sad8x8x4d_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); -RTCD_EXTERN void (*vpx_sad8x8x4d)(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); - -void vpx_sad8x8x8_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -void vpx_sad8x8x8_sse4_1(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -RTCD_EXTERN void (*vpx_sad8x8x8)(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); - -int vpx_satd_c(const int16_t *coeff, int length); -int vpx_satd_sse2(const int16_t *coeff, int length); -RTCD_EXTERN int (*vpx_satd)(const int16_t *coeff, int length); - -void vpx_scaled_2d_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -void vpx_scaled_2d_ssse3(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -RTCD_EXTERN void (*vpx_scaled_2d)(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); - -void vpx_scaled_avg_2d_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -#define vpx_scaled_avg_2d vpx_scaled_avg_2d_c - -void vpx_scaled_avg_horiz_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -#define vpx_scaled_avg_horiz vpx_scaled_avg_horiz_c - -void vpx_scaled_avg_vert_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -#define vpx_scaled_avg_vert vpx_scaled_avg_vert_c - -void vpx_scaled_horiz_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -#define vpx_scaled_horiz vpx_scaled_horiz_c - -void vpx_scaled_vert_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -#define vpx_scaled_vert vpx_scaled_vert_c - -uint32_t vpx_sub_pixel_avg_variance16x16_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_sub_pixel_avg_variance16x16_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_sub_pixel_avg_variance16x16_ssse3(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -RTCD_EXTERN uint32_t (*vpx_sub_pixel_avg_variance16x16)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); - -uint32_t vpx_sub_pixel_avg_variance16x32_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_sub_pixel_avg_variance16x32_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_sub_pixel_avg_variance16x32_ssse3(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -RTCD_EXTERN uint32_t (*vpx_sub_pixel_avg_variance16x32)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); - -uint32_t vpx_sub_pixel_avg_variance16x8_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_sub_pixel_avg_variance16x8_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_sub_pixel_avg_variance16x8_ssse3(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -RTCD_EXTERN uint32_t (*vpx_sub_pixel_avg_variance16x8)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); - -uint32_t vpx_sub_pixel_avg_variance32x16_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_sub_pixel_avg_variance32x16_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_sub_pixel_avg_variance32x16_ssse3(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -RTCD_EXTERN uint32_t (*vpx_sub_pixel_avg_variance32x16)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); - -uint32_t vpx_sub_pixel_avg_variance32x32_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_sub_pixel_avg_variance32x32_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_sub_pixel_avg_variance32x32_ssse3(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_sub_pixel_avg_variance32x32_avx2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -RTCD_EXTERN uint32_t (*vpx_sub_pixel_avg_variance32x32)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); - -uint32_t vpx_sub_pixel_avg_variance32x64_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_sub_pixel_avg_variance32x64_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_sub_pixel_avg_variance32x64_ssse3(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -RTCD_EXTERN uint32_t (*vpx_sub_pixel_avg_variance32x64)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); - -uint32_t vpx_sub_pixel_avg_variance4x4_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_sub_pixel_avg_variance4x4_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_sub_pixel_avg_variance4x4_ssse3(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -RTCD_EXTERN uint32_t (*vpx_sub_pixel_avg_variance4x4)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); - -uint32_t vpx_sub_pixel_avg_variance4x8_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_sub_pixel_avg_variance4x8_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_sub_pixel_avg_variance4x8_ssse3(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -RTCD_EXTERN uint32_t (*vpx_sub_pixel_avg_variance4x8)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); - -uint32_t vpx_sub_pixel_avg_variance64x32_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_sub_pixel_avg_variance64x32_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_sub_pixel_avg_variance64x32_ssse3(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -RTCD_EXTERN uint32_t (*vpx_sub_pixel_avg_variance64x32)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); - -uint32_t vpx_sub_pixel_avg_variance64x64_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_sub_pixel_avg_variance64x64_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_sub_pixel_avg_variance64x64_ssse3(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_sub_pixel_avg_variance64x64_avx2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -RTCD_EXTERN uint32_t (*vpx_sub_pixel_avg_variance64x64)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); - -uint32_t vpx_sub_pixel_avg_variance8x16_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_sub_pixel_avg_variance8x16_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_sub_pixel_avg_variance8x16_ssse3(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -RTCD_EXTERN uint32_t (*vpx_sub_pixel_avg_variance8x16)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); - -uint32_t vpx_sub_pixel_avg_variance8x4_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_sub_pixel_avg_variance8x4_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_sub_pixel_avg_variance8x4_ssse3(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -RTCD_EXTERN uint32_t (*vpx_sub_pixel_avg_variance8x4)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); - -uint32_t vpx_sub_pixel_avg_variance8x8_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_sub_pixel_avg_variance8x8_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_sub_pixel_avg_variance8x8_ssse3(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -RTCD_EXTERN uint32_t (*vpx_sub_pixel_avg_variance8x8)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); - -uint32_t vpx_sub_pixel_variance16x16_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_sub_pixel_variance16x16_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_sub_pixel_variance16x16_ssse3(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -RTCD_EXTERN uint32_t (*vpx_sub_pixel_variance16x16)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); - -uint32_t vpx_sub_pixel_variance16x32_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_sub_pixel_variance16x32_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_sub_pixel_variance16x32_ssse3(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -RTCD_EXTERN uint32_t (*vpx_sub_pixel_variance16x32)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); - -uint32_t vpx_sub_pixel_variance16x8_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_sub_pixel_variance16x8_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_sub_pixel_variance16x8_ssse3(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -RTCD_EXTERN uint32_t (*vpx_sub_pixel_variance16x8)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); - -uint32_t vpx_sub_pixel_variance32x16_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_sub_pixel_variance32x16_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_sub_pixel_variance32x16_ssse3(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -RTCD_EXTERN uint32_t (*vpx_sub_pixel_variance32x16)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); - -uint32_t vpx_sub_pixel_variance32x32_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_sub_pixel_variance32x32_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_sub_pixel_variance32x32_ssse3(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_sub_pixel_variance32x32_avx2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -RTCD_EXTERN uint32_t (*vpx_sub_pixel_variance32x32)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); - -uint32_t vpx_sub_pixel_variance32x64_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_sub_pixel_variance32x64_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_sub_pixel_variance32x64_ssse3(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -RTCD_EXTERN uint32_t (*vpx_sub_pixel_variance32x64)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); - -uint32_t vpx_sub_pixel_variance4x4_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_sub_pixel_variance4x4_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_sub_pixel_variance4x4_ssse3(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -RTCD_EXTERN uint32_t (*vpx_sub_pixel_variance4x4)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); - -uint32_t vpx_sub_pixel_variance4x8_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_sub_pixel_variance4x8_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_sub_pixel_variance4x8_ssse3(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -RTCD_EXTERN uint32_t (*vpx_sub_pixel_variance4x8)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); - -uint32_t vpx_sub_pixel_variance64x32_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_sub_pixel_variance64x32_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_sub_pixel_variance64x32_ssse3(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -RTCD_EXTERN uint32_t (*vpx_sub_pixel_variance64x32)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); - -uint32_t vpx_sub_pixel_variance64x64_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_sub_pixel_variance64x64_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_sub_pixel_variance64x64_ssse3(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_sub_pixel_variance64x64_avx2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -RTCD_EXTERN uint32_t (*vpx_sub_pixel_variance64x64)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); - -uint32_t vpx_sub_pixel_variance8x16_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_sub_pixel_variance8x16_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_sub_pixel_variance8x16_ssse3(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -RTCD_EXTERN uint32_t (*vpx_sub_pixel_variance8x16)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); - -uint32_t vpx_sub_pixel_variance8x4_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_sub_pixel_variance8x4_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_sub_pixel_variance8x4_ssse3(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -RTCD_EXTERN uint32_t (*vpx_sub_pixel_variance8x4)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); - -uint32_t vpx_sub_pixel_variance8x8_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_sub_pixel_variance8x8_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_sub_pixel_variance8x8_ssse3(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -RTCD_EXTERN uint32_t (*vpx_sub_pixel_variance8x8)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); - -void vpx_subtract_block_c(int rows, int cols, int16_t *diff_ptr, ptrdiff_t diff_stride, const uint8_t *src_ptr, ptrdiff_t src_stride, const uint8_t *pred_ptr, ptrdiff_t pred_stride); -void vpx_subtract_block_sse2(int rows, int cols, int16_t *diff_ptr, ptrdiff_t diff_stride, const uint8_t *src_ptr, ptrdiff_t src_stride, const uint8_t *pred_ptr, ptrdiff_t pred_stride); -RTCD_EXTERN void (*vpx_subtract_block)(int rows, int cols, int16_t *diff_ptr, ptrdiff_t diff_stride, const uint8_t *src_ptr, ptrdiff_t src_stride, const uint8_t *pred_ptr, ptrdiff_t pred_stride); - -uint64_t vpx_sum_squares_2d_i16_c(const int16_t *src, int stride, int size); -uint64_t vpx_sum_squares_2d_i16_sse2(const int16_t *src, int stride, int size); -RTCD_EXTERN uint64_t (*vpx_sum_squares_2d_i16)(const int16_t *src, int stride, int size); - -void vpx_tm_predictor_16x16_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_tm_predictor_16x16_sse2(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -RTCD_EXTERN void (*vpx_tm_predictor_16x16)(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); - -void vpx_tm_predictor_32x32_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_tm_predictor_32x32_sse2(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -RTCD_EXTERN void (*vpx_tm_predictor_32x32)(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); - -void vpx_tm_predictor_4x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_tm_predictor_4x4_sse2(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -RTCD_EXTERN void (*vpx_tm_predictor_4x4)(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); - -void vpx_tm_predictor_8x8_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_tm_predictor_8x8_sse2(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -RTCD_EXTERN void (*vpx_tm_predictor_8x8)(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); - -void vpx_v_predictor_16x16_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_v_predictor_16x16_sse2(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -RTCD_EXTERN void (*vpx_v_predictor_16x16)(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); - -void vpx_v_predictor_32x32_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_v_predictor_32x32_sse2(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -RTCD_EXTERN void (*vpx_v_predictor_32x32)(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); - -void vpx_v_predictor_4x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_v_predictor_4x4_sse2(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -RTCD_EXTERN void (*vpx_v_predictor_4x4)(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); - -void vpx_v_predictor_8x8_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_v_predictor_8x8_sse2(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -RTCD_EXTERN void (*vpx_v_predictor_8x8)(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); - -unsigned int vpx_variance16x16_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -unsigned int vpx_variance16x16_sse2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -unsigned int vpx_variance16x16_avx2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -RTCD_EXTERN unsigned int (*vpx_variance16x16)(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); - -unsigned int vpx_variance16x32_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -unsigned int vpx_variance16x32_sse2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -RTCD_EXTERN unsigned int (*vpx_variance16x32)(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); - -unsigned int vpx_variance16x8_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -unsigned int vpx_variance16x8_sse2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -RTCD_EXTERN unsigned int (*vpx_variance16x8)(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); - -unsigned int vpx_variance32x16_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -unsigned int vpx_variance32x16_sse2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -unsigned int vpx_variance32x16_avx2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -RTCD_EXTERN unsigned int (*vpx_variance32x16)(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); - -unsigned int vpx_variance32x32_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -unsigned int vpx_variance32x32_sse2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -unsigned int vpx_variance32x32_avx2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -RTCD_EXTERN unsigned int (*vpx_variance32x32)(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); - -unsigned int vpx_variance32x64_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -unsigned int vpx_variance32x64_sse2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -RTCD_EXTERN unsigned int (*vpx_variance32x64)(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); - -unsigned int vpx_variance4x4_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -unsigned int vpx_variance4x4_sse2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -RTCD_EXTERN unsigned int (*vpx_variance4x4)(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); - -unsigned int vpx_variance4x8_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -unsigned int vpx_variance4x8_sse2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -RTCD_EXTERN unsigned int (*vpx_variance4x8)(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); - -unsigned int vpx_variance64x32_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -unsigned int vpx_variance64x32_sse2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -unsigned int vpx_variance64x32_avx2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -RTCD_EXTERN unsigned int (*vpx_variance64x32)(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); - -unsigned int vpx_variance64x64_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -unsigned int vpx_variance64x64_sse2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -unsigned int vpx_variance64x64_avx2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -RTCD_EXTERN unsigned int (*vpx_variance64x64)(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); - -unsigned int vpx_variance8x16_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -unsigned int vpx_variance8x16_sse2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -RTCD_EXTERN unsigned int (*vpx_variance8x16)(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); - -unsigned int vpx_variance8x4_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -unsigned int vpx_variance8x4_sse2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -RTCD_EXTERN unsigned int (*vpx_variance8x4)(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); - -unsigned int vpx_variance8x8_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -unsigned int vpx_variance8x8_sse2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -RTCD_EXTERN unsigned int (*vpx_variance8x8)(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); - -void vpx_ve_predictor_4x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_ve_predictor_4x4 vpx_ve_predictor_4x4_c - -int vpx_vector_var_c(const int16_t *ref, const int16_t *src, const int bwl); -int vpx_vector_var_sse2(const int16_t *ref, const int16_t *src, const int bwl); -RTCD_EXTERN int (*vpx_vector_var)(const int16_t *ref, const int16_t *src, const int bwl); - -void vpx_dsp_rtcd(void); - -#ifdef RTCD_C -#include "vpx_ports/x86.h" -static void setup_rtcd_internal(void) -{ - int flags = x86_simd_caps(); - - (void)flags; - - vpx_avg_4x4 = vpx_avg_4x4_c; - if (flags & HAS_SSE2) vpx_avg_4x4 = vpx_avg_4x4_sse2; - vpx_avg_8x8 = vpx_avg_8x8_c; - if (flags & HAS_SSE2) vpx_avg_8x8 = vpx_avg_8x8_sse2; - vpx_convolve8 = vpx_convolve8_c; - if (flags & HAS_SSE2) vpx_convolve8 = vpx_convolve8_sse2; - if (flags & HAS_SSSE3) vpx_convolve8 = vpx_convolve8_ssse3; - if (flags & HAS_AVX2) vpx_convolve8 = vpx_convolve8_avx2; - vpx_convolve8_avg = vpx_convolve8_avg_c; - if (flags & HAS_SSE2) vpx_convolve8_avg = vpx_convolve8_avg_sse2; - if (flags & HAS_SSSE3) vpx_convolve8_avg = vpx_convolve8_avg_ssse3; - vpx_convolve8_avg_horiz = vpx_convolve8_avg_horiz_c; - if (flags & HAS_SSE2) vpx_convolve8_avg_horiz = vpx_convolve8_avg_horiz_sse2; - if (flags & HAS_SSSE3) vpx_convolve8_avg_horiz = vpx_convolve8_avg_horiz_ssse3; - vpx_convolve8_avg_vert = vpx_convolve8_avg_vert_c; - if (flags & HAS_SSE2) vpx_convolve8_avg_vert = vpx_convolve8_avg_vert_sse2; - if (flags & HAS_SSSE3) vpx_convolve8_avg_vert = vpx_convolve8_avg_vert_ssse3; - vpx_convolve8_horiz = vpx_convolve8_horiz_c; - if (flags & HAS_SSE2) vpx_convolve8_horiz = vpx_convolve8_horiz_sse2; - if (flags & HAS_SSSE3) vpx_convolve8_horiz = vpx_convolve8_horiz_ssse3; - if (flags & HAS_AVX2) vpx_convolve8_horiz = vpx_convolve8_horiz_avx2; - vpx_convolve8_vert = vpx_convolve8_vert_c; - if (flags & HAS_SSE2) vpx_convolve8_vert = vpx_convolve8_vert_sse2; - if (flags & HAS_SSSE3) vpx_convolve8_vert = vpx_convolve8_vert_ssse3; - if (flags & HAS_AVX2) vpx_convolve8_vert = vpx_convolve8_vert_avx2; - vpx_convolve_avg = vpx_convolve_avg_c; - if (flags & HAS_SSE2) vpx_convolve_avg = vpx_convolve_avg_sse2; - vpx_convolve_copy = vpx_convolve_copy_c; - if (flags & HAS_SSE2) vpx_convolve_copy = vpx_convolve_copy_sse2; - vpx_d153_predictor_16x16 = vpx_d153_predictor_16x16_c; - if (flags & HAS_SSSE3) vpx_d153_predictor_16x16 = vpx_d153_predictor_16x16_ssse3; - vpx_d153_predictor_32x32 = vpx_d153_predictor_32x32_c; - if (flags & HAS_SSSE3) vpx_d153_predictor_32x32 = vpx_d153_predictor_32x32_ssse3; - vpx_d153_predictor_4x4 = vpx_d153_predictor_4x4_c; - if (flags & HAS_SSSE3) vpx_d153_predictor_4x4 = vpx_d153_predictor_4x4_ssse3; - vpx_d153_predictor_8x8 = vpx_d153_predictor_8x8_c; - if (flags & HAS_SSSE3) vpx_d153_predictor_8x8 = vpx_d153_predictor_8x8_ssse3; - vpx_d207_predictor_16x16 = vpx_d207_predictor_16x16_c; - if (flags & HAS_SSSE3) vpx_d207_predictor_16x16 = vpx_d207_predictor_16x16_ssse3; - vpx_d207_predictor_32x32 = vpx_d207_predictor_32x32_c; - if (flags & HAS_SSSE3) vpx_d207_predictor_32x32 = vpx_d207_predictor_32x32_ssse3; - vpx_d207_predictor_4x4 = vpx_d207_predictor_4x4_c; - if (flags & HAS_SSE2) vpx_d207_predictor_4x4 = vpx_d207_predictor_4x4_sse2; - vpx_d207_predictor_8x8 = vpx_d207_predictor_8x8_c; - if (flags & HAS_SSSE3) vpx_d207_predictor_8x8 = vpx_d207_predictor_8x8_ssse3; - vpx_d45_predictor_16x16 = vpx_d45_predictor_16x16_c; - if (flags & HAS_SSSE3) vpx_d45_predictor_16x16 = vpx_d45_predictor_16x16_ssse3; - vpx_d45_predictor_32x32 = vpx_d45_predictor_32x32_c; - if (flags & HAS_SSSE3) vpx_d45_predictor_32x32 = vpx_d45_predictor_32x32_ssse3; - vpx_d45_predictor_4x4 = vpx_d45_predictor_4x4_c; - if (flags & HAS_SSE2) vpx_d45_predictor_4x4 = vpx_d45_predictor_4x4_sse2; - vpx_d45_predictor_8x8 = vpx_d45_predictor_8x8_c; - if (flags & HAS_SSE2) vpx_d45_predictor_8x8 = vpx_d45_predictor_8x8_sse2; - vpx_d63_predictor_16x16 = vpx_d63_predictor_16x16_c; - if (flags & HAS_SSSE3) vpx_d63_predictor_16x16 = vpx_d63_predictor_16x16_ssse3; - vpx_d63_predictor_32x32 = vpx_d63_predictor_32x32_c; - if (flags & HAS_SSSE3) vpx_d63_predictor_32x32 = vpx_d63_predictor_32x32_ssse3; - vpx_d63_predictor_4x4 = vpx_d63_predictor_4x4_c; - if (flags & HAS_SSSE3) vpx_d63_predictor_4x4 = vpx_d63_predictor_4x4_ssse3; - vpx_d63_predictor_8x8 = vpx_d63_predictor_8x8_c; - if (flags & HAS_SSSE3) vpx_d63_predictor_8x8 = vpx_d63_predictor_8x8_ssse3; - vpx_dc_128_predictor_16x16 = vpx_dc_128_predictor_16x16_c; - if (flags & HAS_SSE2) vpx_dc_128_predictor_16x16 = vpx_dc_128_predictor_16x16_sse2; - vpx_dc_128_predictor_32x32 = vpx_dc_128_predictor_32x32_c; - if (flags & HAS_SSE2) vpx_dc_128_predictor_32x32 = vpx_dc_128_predictor_32x32_sse2; - vpx_dc_128_predictor_4x4 = vpx_dc_128_predictor_4x4_c; - if (flags & HAS_SSE2) vpx_dc_128_predictor_4x4 = vpx_dc_128_predictor_4x4_sse2; - vpx_dc_128_predictor_8x8 = vpx_dc_128_predictor_8x8_c; - if (flags & HAS_SSE2) vpx_dc_128_predictor_8x8 = vpx_dc_128_predictor_8x8_sse2; - vpx_dc_left_predictor_16x16 = vpx_dc_left_predictor_16x16_c; - if (flags & HAS_SSE2) vpx_dc_left_predictor_16x16 = vpx_dc_left_predictor_16x16_sse2; - vpx_dc_left_predictor_32x32 = vpx_dc_left_predictor_32x32_c; - if (flags & HAS_SSE2) vpx_dc_left_predictor_32x32 = vpx_dc_left_predictor_32x32_sse2; - vpx_dc_left_predictor_4x4 = vpx_dc_left_predictor_4x4_c; - if (flags & HAS_SSE2) vpx_dc_left_predictor_4x4 = vpx_dc_left_predictor_4x4_sse2; - vpx_dc_left_predictor_8x8 = vpx_dc_left_predictor_8x8_c; - if (flags & HAS_SSE2) vpx_dc_left_predictor_8x8 = vpx_dc_left_predictor_8x8_sse2; - vpx_dc_predictor_16x16 = vpx_dc_predictor_16x16_c; - if (flags & HAS_SSE2) vpx_dc_predictor_16x16 = vpx_dc_predictor_16x16_sse2; - vpx_dc_predictor_32x32 = vpx_dc_predictor_32x32_c; - if (flags & HAS_SSE2) vpx_dc_predictor_32x32 = vpx_dc_predictor_32x32_sse2; - vpx_dc_predictor_4x4 = vpx_dc_predictor_4x4_c; - if (flags & HAS_SSE2) vpx_dc_predictor_4x4 = vpx_dc_predictor_4x4_sse2; - vpx_dc_predictor_8x8 = vpx_dc_predictor_8x8_c; - if (flags & HAS_SSE2) vpx_dc_predictor_8x8 = vpx_dc_predictor_8x8_sse2; - vpx_dc_top_predictor_16x16 = vpx_dc_top_predictor_16x16_c; - if (flags & HAS_SSE2) vpx_dc_top_predictor_16x16 = vpx_dc_top_predictor_16x16_sse2; - vpx_dc_top_predictor_32x32 = vpx_dc_top_predictor_32x32_c; - if (flags & HAS_SSE2) vpx_dc_top_predictor_32x32 = vpx_dc_top_predictor_32x32_sse2; - vpx_dc_top_predictor_4x4 = vpx_dc_top_predictor_4x4_c; - if (flags & HAS_SSE2) vpx_dc_top_predictor_4x4 = vpx_dc_top_predictor_4x4_sse2; - vpx_dc_top_predictor_8x8 = vpx_dc_top_predictor_8x8_c; - if (flags & HAS_SSE2) vpx_dc_top_predictor_8x8 = vpx_dc_top_predictor_8x8_sse2; - vpx_fdct16x16 = vpx_fdct16x16_c; - if (flags & HAS_SSE2) vpx_fdct16x16 = vpx_fdct16x16_sse2; - vpx_fdct16x16_1 = vpx_fdct16x16_1_c; - if (flags & HAS_SSE2) vpx_fdct16x16_1 = vpx_fdct16x16_1_sse2; - vpx_fdct32x32 = vpx_fdct32x32_c; - if (flags & HAS_SSE2) vpx_fdct32x32 = vpx_fdct32x32_sse2; - vpx_fdct32x32_1 = vpx_fdct32x32_1_c; - if (flags & HAS_SSE2) vpx_fdct32x32_1 = vpx_fdct32x32_1_sse2; - vpx_fdct32x32_rd = vpx_fdct32x32_rd_c; - if (flags & HAS_SSE2) vpx_fdct32x32_rd = vpx_fdct32x32_rd_sse2; - vpx_fdct4x4 = vpx_fdct4x4_c; - if (flags & HAS_SSE2) vpx_fdct4x4 = vpx_fdct4x4_sse2; - vpx_fdct4x4_1 = vpx_fdct4x4_1_c; - if (flags & HAS_SSE2) vpx_fdct4x4_1 = vpx_fdct4x4_1_sse2; - vpx_fdct8x8 = vpx_fdct8x8_c; - if (flags & HAS_SSE2) vpx_fdct8x8 = vpx_fdct8x8_sse2; - vpx_fdct8x8_1 = vpx_fdct8x8_1_c; - if (flags & HAS_SSE2) vpx_fdct8x8_1 = vpx_fdct8x8_1_sse2; - vpx_get16x16var = vpx_get16x16var_c; - if (flags & HAS_SSE2) vpx_get16x16var = vpx_get16x16var_sse2; - if (flags & HAS_AVX2) vpx_get16x16var = vpx_get16x16var_avx2; - vpx_get8x8var = vpx_get8x8var_c; - if (flags & HAS_SSE2) vpx_get8x8var = vpx_get8x8var_sse2; - vpx_get_mb_ss = vpx_get_mb_ss_c; - if (flags & HAS_SSE2) vpx_get_mb_ss = vpx_get_mb_ss_sse2; - vpx_h_predictor_16x16 = vpx_h_predictor_16x16_c; - if (flags & HAS_SSE2) vpx_h_predictor_16x16 = vpx_h_predictor_16x16_sse2; - vpx_h_predictor_32x32 = vpx_h_predictor_32x32_c; - if (flags & HAS_SSE2) vpx_h_predictor_32x32 = vpx_h_predictor_32x32_sse2; - vpx_h_predictor_4x4 = vpx_h_predictor_4x4_c; - if (flags & HAS_SSE2) vpx_h_predictor_4x4 = vpx_h_predictor_4x4_sse2; - vpx_h_predictor_8x8 = vpx_h_predictor_8x8_c; - if (flags & HAS_SSE2) vpx_h_predictor_8x8 = vpx_h_predictor_8x8_sse2; - vpx_hadamard_16x16 = vpx_hadamard_16x16_c; - if (flags & HAS_SSE2) vpx_hadamard_16x16 = vpx_hadamard_16x16_sse2; - vpx_hadamard_8x8 = vpx_hadamard_8x8_c; - if (flags & HAS_SSE2) vpx_hadamard_8x8 = vpx_hadamard_8x8_sse2; - vpx_highbd_10_mse16x16 = vpx_highbd_10_mse16x16_c; - if (flags & HAS_SSE2) vpx_highbd_10_mse16x16 = vpx_highbd_10_mse16x16_sse2; - vpx_highbd_10_mse8x8 = vpx_highbd_10_mse8x8_c; - if (flags & HAS_SSE2) vpx_highbd_10_mse8x8 = vpx_highbd_10_mse8x8_sse2; - vpx_highbd_10_sub_pixel_avg_variance16x16 = vpx_highbd_10_sub_pixel_avg_variance16x16_c; - if (flags & HAS_SSE2) vpx_highbd_10_sub_pixel_avg_variance16x16 = vpx_highbd_10_sub_pixel_avg_variance16x16_sse2; - vpx_highbd_10_sub_pixel_avg_variance16x32 = vpx_highbd_10_sub_pixel_avg_variance16x32_c; - if (flags & HAS_SSE2) vpx_highbd_10_sub_pixel_avg_variance16x32 = vpx_highbd_10_sub_pixel_avg_variance16x32_sse2; - vpx_highbd_10_sub_pixel_avg_variance16x8 = vpx_highbd_10_sub_pixel_avg_variance16x8_c; - if (flags & HAS_SSE2) vpx_highbd_10_sub_pixel_avg_variance16x8 = vpx_highbd_10_sub_pixel_avg_variance16x8_sse2; - vpx_highbd_10_sub_pixel_avg_variance32x16 = vpx_highbd_10_sub_pixel_avg_variance32x16_c; - if (flags & HAS_SSE2) vpx_highbd_10_sub_pixel_avg_variance32x16 = vpx_highbd_10_sub_pixel_avg_variance32x16_sse2; - vpx_highbd_10_sub_pixel_avg_variance32x32 = vpx_highbd_10_sub_pixel_avg_variance32x32_c; - if (flags & HAS_SSE2) vpx_highbd_10_sub_pixel_avg_variance32x32 = vpx_highbd_10_sub_pixel_avg_variance32x32_sse2; - vpx_highbd_10_sub_pixel_avg_variance32x64 = vpx_highbd_10_sub_pixel_avg_variance32x64_c; - if (flags & HAS_SSE2) vpx_highbd_10_sub_pixel_avg_variance32x64 = vpx_highbd_10_sub_pixel_avg_variance32x64_sse2; - vpx_highbd_10_sub_pixel_avg_variance64x32 = vpx_highbd_10_sub_pixel_avg_variance64x32_c; - if (flags & HAS_SSE2) vpx_highbd_10_sub_pixel_avg_variance64x32 = vpx_highbd_10_sub_pixel_avg_variance64x32_sse2; - vpx_highbd_10_sub_pixel_avg_variance64x64 = vpx_highbd_10_sub_pixel_avg_variance64x64_c; - if (flags & HAS_SSE2) vpx_highbd_10_sub_pixel_avg_variance64x64 = vpx_highbd_10_sub_pixel_avg_variance64x64_sse2; - vpx_highbd_10_sub_pixel_avg_variance8x16 = vpx_highbd_10_sub_pixel_avg_variance8x16_c; - if (flags & HAS_SSE2) vpx_highbd_10_sub_pixel_avg_variance8x16 = vpx_highbd_10_sub_pixel_avg_variance8x16_sse2; - vpx_highbd_10_sub_pixel_avg_variance8x4 = vpx_highbd_10_sub_pixel_avg_variance8x4_c; - if (flags & HAS_SSE2) vpx_highbd_10_sub_pixel_avg_variance8x4 = vpx_highbd_10_sub_pixel_avg_variance8x4_sse2; - vpx_highbd_10_sub_pixel_avg_variance8x8 = vpx_highbd_10_sub_pixel_avg_variance8x8_c; - if (flags & HAS_SSE2) vpx_highbd_10_sub_pixel_avg_variance8x8 = vpx_highbd_10_sub_pixel_avg_variance8x8_sse2; - vpx_highbd_10_sub_pixel_variance16x16 = vpx_highbd_10_sub_pixel_variance16x16_c; - if (flags & HAS_SSE2) vpx_highbd_10_sub_pixel_variance16x16 = vpx_highbd_10_sub_pixel_variance16x16_sse2; - vpx_highbd_10_sub_pixel_variance16x32 = vpx_highbd_10_sub_pixel_variance16x32_c; - if (flags & HAS_SSE2) vpx_highbd_10_sub_pixel_variance16x32 = vpx_highbd_10_sub_pixel_variance16x32_sse2; - vpx_highbd_10_sub_pixel_variance16x8 = vpx_highbd_10_sub_pixel_variance16x8_c; - if (flags & HAS_SSE2) vpx_highbd_10_sub_pixel_variance16x8 = vpx_highbd_10_sub_pixel_variance16x8_sse2; - vpx_highbd_10_sub_pixel_variance32x16 = vpx_highbd_10_sub_pixel_variance32x16_c; - if (flags & HAS_SSE2) vpx_highbd_10_sub_pixel_variance32x16 = vpx_highbd_10_sub_pixel_variance32x16_sse2; - vpx_highbd_10_sub_pixel_variance32x32 = vpx_highbd_10_sub_pixel_variance32x32_c; - if (flags & HAS_SSE2) vpx_highbd_10_sub_pixel_variance32x32 = vpx_highbd_10_sub_pixel_variance32x32_sse2; - vpx_highbd_10_sub_pixel_variance32x64 = vpx_highbd_10_sub_pixel_variance32x64_c; - if (flags & HAS_SSE2) vpx_highbd_10_sub_pixel_variance32x64 = vpx_highbd_10_sub_pixel_variance32x64_sse2; - vpx_highbd_10_sub_pixel_variance64x32 = vpx_highbd_10_sub_pixel_variance64x32_c; - if (flags & HAS_SSE2) vpx_highbd_10_sub_pixel_variance64x32 = vpx_highbd_10_sub_pixel_variance64x32_sse2; - vpx_highbd_10_sub_pixel_variance64x64 = vpx_highbd_10_sub_pixel_variance64x64_c; - if (flags & HAS_SSE2) vpx_highbd_10_sub_pixel_variance64x64 = vpx_highbd_10_sub_pixel_variance64x64_sse2; - vpx_highbd_10_sub_pixel_variance8x16 = vpx_highbd_10_sub_pixel_variance8x16_c; - if (flags & HAS_SSE2) vpx_highbd_10_sub_pixel_variance8x16 = vpx_highbd_10_sub_pixel_variance8x16_sse2; - vpx_highbd_10_sub_pixel_variance8x4 = vpx_highbd_10_sub_pixel_variance8x4_c; - if (flags & HAS_SSE2) vpx_highbd_10_sub_pixel_variance8x4 = vpx_highbd_10_sub_pixel_variance8x4_sse2; - vpx_highbd_10_sub_pixel_variance8x8 = vpx_highbd_10_sub_pixel_variance8x8_c; - if (flags & HAS_SSE2) vpx_highbd_10_sub_pixel_variance8x8 = vpx_highbd_10_sub_pixel_variance8x8_sse2; - vpx_highbd_10_variance16x16 = vpx_highbd_10_variance16x16_c; - if (flags & HAS_SSE2) vpx_highbd_10_variance16x16 = vpx_highbd_10_variance16x16_sse2; - vpx_highbd_10_variance16x32 = vpx_highbd_10_variance16x32_c; - if (flags & HAS_SSE2) vpx_highbd_10_variance16x32 = vpx_highbd_10_variance16x32_sse2; - vpx_highbd_10_variance16x8 = vpx_highbd_10_variance16x8_c; - if (flags & HAS_SSE2) vpx_highbd_10_variance16x8 = vpx_highbd_10_variance16x8_sse2; - vpx_highbd_10_variance32x16 = vpx_highbd_10_variance32x16_c; - if (flags & HAS_SSE2) vpx_highbd_10_variance32x16 = vpx_highbd_10_variance32x16_sse2; - vpx_highbd_10_variance32x32 = vpx_highbd_10_variance32x32_c; - if (flags & HAS_SSE2) vpx_highbd_10_variance32x32 = vpx_highbd_10_variance32x32_sse2; - vpx_highbd_10_variance32x64 = vpx_highbd_10_variance32x64_c; - if (flags & HAS_SSE2) vpx_highbd_10_variance32x64 = vpx_highbd_10_variance32x64_sse2; - vpx_highbd_10_variance64x32 = vpx_highbd_10_variance64x32_c; - if (flags & HAS_SSE2) vpx_highbd_10_variance64x32 = vpx_highbd_10_variance64x32_sse2; - vpx_highbd_10_variance64x64 = vpx_highbd_10_variance64x64_c; - if (flags & HAS_SSE2) vpx_highbd_10_variance64x64 = vpx_highbd_10_variance64x64_sse2; - vpx_highbd_10_variance8x16 = vpx_highbd_10_variance8x16_c; - if (flags & HAS_SSE2) vpx_highbd_10_variance8x16 = vpx_highbd_10_variance8x16_sse2; - vpx_highbd_10_variance8x8 = vpx_highbd_10_variance8x8_c; - if (flags & HAS_SSE2) vpx_highbd_10_variance8x8 = vpx_highbd_10_variance8x8_sse2; - vpx_highbd_12_mse16x16 = vpx_highbd_12_mse16x16_c; - if (flags & HAS_SSE2) vpx_highbd_12_mse16x16 = vpx_highbd_12_mse16x16_sse2; - vpx_highbd_12_mse8x8 = vpx_highbd_12_mse8x8_c; - if (flags & HAS_SSE2) vpx_highbd_12_mse8x8 = vpx_highbd_12_mse8x8_sse2; - vpx_highbd_12_sub_pixel_avg_variance16x16 = vpx_highbd_12_sub_pixel_avg_variance16x16_c; - if (flags & HAS_SSE2) vpx_highbd_12_sub_pixel_avg_variance16x16 = vpx_highbd_12_sub_pixel_avg_variance16x16_sse2; - vpx_highbd_12_sub_pixel_avg_variance16x32 = vpx_highbd_12_sub_pixel_avg_variance16x32_c; - if (flags & HAS_SSE2) vpx_highbd_12_sub_pixel_avg_variance16x32 = vpx_highbd_12_sub_pixel_avg_variance16x32_sse2; - vpx_highbd_12_sub_pixel_avg_variance16x8 = vpx_highbd_12_sub_pixel_avg_variance16x8_c; - if (flags & HAS_SSE2) vpx_highbd_12_sub_pixel_avg_variance16x8 = vpx_highbd_12_sub_pixel_avg_variance16x8_sse2; - vpx_highbd_12_sub_pixel_avg_variance32x16 = vpx_highbd_12_sub_pixel_avg_variance32x16_c; - if (flags & HAS_SSE2) vpx_highbd_12_sub_pixel_avg_variance32x16 = vpx_highbd_12_sub_pixel_avg_variance32x16_sse2; - vpx_highbd_12_sub_pixel_avg_variance32x32 = vpx_highbd_12_sub_pixel_avg_variance32x32_c; - if (flags & HAS_SSE2) vpx_highbd_12_sub_pixel_avg_variance32x32 = vpx_highbd_12_sub_pixel_avg_variance32x32_sse2; - vpx_highbd_12_sub_pixel_avg_variance32x64 = vpx_highbd_12_sub_pixel_avg_variance32x64_c; - if (flags & HAS_SSE2) vpx_highbd_12_sub_pixel_avg_variance32x64 = vpx_highbd_12_sub_pixel_avg_variance32x64_sse2; - vpx_highbd_12_sub_pixel_avg_variance64x32 = vpx_highbd_12_sub_pixel_avg_variance64x32_c; - if (flags & HAS_SSE2) vpx_highbd_12_sub_pixel_avg_variance64x32 = vpx_highbd_12_sub_pixel_avg_variance64x32_sse2; - vpx_highbd_12_sub_pixel_avg_variance64x64 = vpx_highbd_12_sub_pixel_avg_variance64x64_c; - if (flags & HAS_SSE2) vpx_highbd_12_sub_pixel_avg_variance64x64 = vpx_highbd_12_sub_pixel_avg_variance64x64_sse2; - vpx_highbd_12_sub_pixel_avg_variance8x16 = vpx_highbd_12_sub_pixel_avg_variance8x16_c; - if (flags & HAS_SSE2) vpx_highbd_12_sub_pixel_avg_variance8x16 = vpx_highbd_12_sub_pixel_avg_variance8x16_sse2; - vpx_highbd_12_sub_pixel_avg_variance8x4 = vpx_highbd_12_sub_pixel_avg_variance8x4_c; - if (flags & HAS_SSE2) vpx_highbd_12_sub_pixel_avg_variance8x4 = vpx_highbd_12_sub_pixel_avg_variance8x4_sse2; - vpx_highbd_12_sub_pixel_avg_variance8x8 = vpx_highbd_12_sub_pixel_avg_variance8x8_c; - if (flags & HAS_SSE2) vpx_highbd_12_sub_pixel_avg_variance8x8 = vpx_highbd_12_sub_pixel_avg_variance8x8_sse2; - vpx_highbd_12_sub_pixel_variance16x16 = vpx_highbd_12_sub_pixel_variance16x16_c; - if (flags & HAS_SSE2) vpx_highbd_12_sub_pixel_variance16x16 = vpx_highbd_12_sub_pixel_variance16x16_sse2; - vpx_highbd_12_sub_pixel_variance16x32 = vpx_highbd_12_sub_pixel_variance16x32_c; - if (flags & HAS_SSE2) vpx_highbd_12_sub_pixel_variance16x32 = vpx_highbd_12_sub_pixel_variance16x32_sse2; - vpx_highbd_12_sub_pixel_variance16x8 = vpx_highbd_12_sub_pixel_variance16x8_c; - if (flags & HAS_SSE2) vpx_highbd_12_sub_pixel_variance16x8 = vpx_highbd_12_sub_pixel_variance16x8_sse2; - vpx_highbd_12_sub_pixel_variance32x16 = vpx_highbd_12_sub_pixel_variance32x16_c; - if (flags & HAS_SSE2) vpx_highbd_12_sub_pixel_variance32x16 = vpx_highbd_12_sub_pixel_variance32x16_sse2; - vpx_highbd_12_sub_pixel_variance32x32 = vpx_highbd_12_sub_pixel_variance32x32_c; - if (flags & HAS_SSE2) vpx_highbd_12_sub_pixel_variance32x32 = vpx_highbd_12_sub_pixel_variance32x32_sse2; - vpx_highbd_12_sub_pixel_variance32x64 = vpx_highbd_12_sub_pixel_variance32x64_c; - if (flags & HAS_SSE2) vpx_highbd_12_sub_pixel_variance32x64 = vpx_highbd_12_sub_pixel_variance32x64_sse2; - vpx_highbd_12_sub_pixel_variance64x32 = vpx_highbd_12_sub_pixel_variance64x32_c; - if (flags & HAS_SSE2) vpx_highbd_12_sub_pixel_variance64x32 = vpx_highbd_12_sub_pixel_variance64x32_sse2; - vpx_highbd_12_sub_pixel_variance64x64 = vpx_highbd_12_sub_pixel_variance64x64_c; - if (flags & HAS_SSE2) vpx_highbd_12_sub_pixel_variance64x64 = vpx_highbd_12_sub_pixel_variance64x64_sse2; - vpx_highbd_12_sub_pixel_variance8x16 = vpx_highbd_12_sub_pixel_variance8x16_c; - if (flags & HAS_SSE2) vpx_highbd_12_sub_pixel_variance8x16 = vpx_highbd_12_sub_pixel_variance8x16_sse2; - vpx_highbd_12_sub_pixel_variance8x4 = vpx_highbd_12_sub_pixel_variance8x4_c; - if (flags & HAS_SSE2) vpx_highbd_12_sub_pixel_variance8x4 = vpx_highbd_12_sub_pixel_variance8x4_sse2; - vpx_highbd_12_sub_pixel_variance8x8 = vpx_highbd_12_sub_pixel_variance8x8_c; - if (flags & HAS_SSE2) vpx_highbd_12_sub_pixel_variance8x8 = vpx_highbd_12_sub_pixel_variance8x8_sse2; - vpx_highbd_12_variance16x16 = vpx_highbd_12_variance16x16_c; - if (flags & HAS_SSE2) vpx_highbd_12_variance16x16 = vpx_highbd_12_variance16x16_sse2; - vpx_highbd_12_variance16x32 = vpx_highbd_12_variance16x32_c; - if (flags & HAS_SSE2) vpx_highbd_12_variance16x32 = vpx_highbd_12_variance16x32_sse2; - vpx_highbd_12_variance16x8 = vpx_highbd_12_variance16x8_c; - if (flags & HAS_SSE2) vpx_highbd_12_variance16x8 = vpx_highbd_12_variance16x8_sse2; - vpx_highbd_12_variance32x16 = vpx_highbd_12_variance32x16_c; - if (flags & HAS_SSE2) vpx_highbd_12_variance32x16 = vpx_highbd_12_variance32x16_sse2; - vpx_highbd_12_variance32x32 = vpx_highbd_12_variance32x32_c; - if (flags & HAS_SSE2) vpx_highbd_12_variance32x32 = vpx_highbd_12_variance32x32_sse2; - vpx_highbd_12_variance32x64 = vpx_highbd_12_variance32x64_c; - if (flags & HAS_SSE2) vpx_highbd_12_variance32x64 = vpx_highbd_12_variance32x64_sse2; - vpx_highbd_12_variance64x32 = vpx_highbd_12_variance64x32_c; - if (flags & HAS_SSE2) vpx_highbd_12_variance64x32 = vpx_highbd_12_variance64x32_sse2; - vpx_highbd_12_variance64x64 = vpx_highbd_12_variance64x64_c; - if (flags & HAS_SSE2) vpx_highbd_12_variance64x64 = vpx_highbd_12_variance64x64_sse2; - vpx_highbd_12_variance8x16 = vpx_highbd_12_variance8x16_c; - if (flags & HAS_SSE2) vpx_highbd_12_variance8x16 = vpx_highbd_12_variance8x16_sse2; - vpx_highbd_12_variance8x8 = vpx_highbd_12_variance8x8_c; - if (flags & HAS_SSE2) vpx_highbd_12_variance8x8 = vpx_highbd_12_variance8x8_sse2; - vpx_highbd_8_mse16x16 = vpx_highbd_8_mse16x16_c; - if (flags & HAS_SSE2) vpx_highbd_8_mse16x16 = vpx_highbd_8_mse16x16_sse2; - vpx_highbd_8_mse8x8 = vpx_highbd_8_mse8x8_c; - if (flags & HAS_SSE2) vpx_highbd_8_mse8x8 = vpx_highbd_8_mse8x8_sse2; - vpx_highbd_8_sub_pixel_avg_variance16x16 = vpx_highbd_8_sub_pixel_avg_variance16x16_c; - if (flags & HAS_SSE2) vpx_highbd_8_sub_pixel_avg_variance16x16 = vpx_highbd_8_sub_pixel_avg_variance16x16_sse2; - vpx_highbd_8_sub_pixel_avg_variance16x32 = vpx_highbd_8_sub_pixel_avg_variance16x32_c; - if (flags & HAS_SSE2) vpx_highbd_8_sub_pixel_avg_variance16x32 = vpx_highbd_8_sub_pixel_avg_variance16x32_sse2; - vpx_highbd_8_sub_pixel_avg_variance16x8 = vpx_highbd_8_sub_pixel_avg_variance16x8_c; - if (flags & HAS_SSE2) vpx_highbd_8_sub_pixel_avg_variance16x8 = vpx_highbd_8_sub_pixel_avg_variance16x8_sse2; - vpx_highbd_8_sub_pixel_avg_variance32x16 = vpx_highbd_8_sub_pixel_avg_variance32x16_c; - if (flags & HAS_SSE2) vpx_highbd_8_sub_pixel_avg_variance32x16 = vpx_highbd_8_sub_pixel_avg_variance32x16_sse2; - vpx_highbd_8_sub_pixel_avg_variance32x32 = vpx_highbd_8_sub_pixel_avg_variance32x32_c; - if (flags & HAS_SSE2) vpx_highbd_8_sub_pixel_avg_variance32x32 = vpx_highbd_8_sub_pixel_avg_variance32x32_sse2; - vpx_highbd_8_sub_pixel_avg_variance32x64 = vpx_highbd_8_sub_pixel_avg_variance32x64_c; - if (flags & HAS_SSE2) vpx_highbd_8_sub_pixel_avg_variance32x64 = vpx_highbd_8_sub_pixel_avg_variance32x64_sse2; - vpx_highbd_8_sub_pixel_avg_variance64x32 = vpx_highbd_8_sub_pixel_avg_variance64x32_c; - if (flags & HAS_SSE2) vpx_highbd_8_sub_pixel_avg_variance64x32 = vpx_highbd_8_sub_pixel_avg_variance64x32_sse2; - vpx_highbd_8_sub_pixel_avg_variance64x64 = vpx_highbd_8_sub_pixel_avg_variance64x64_c; - if (flags & HAS_SSE2) vpx_highbd_8_sub_pixel_avg_variance64x64 = vpx_highbd_8_sub_pixel_avg_variance64x64_sse2; - vpx_highbd_8_sub_pixel_avg_variance8x16 = vpx_highbd_8_sub_pixel_avg_variance8x16_c; - if (flags & HAS_SSE2) vpx_highbd_8_sub_pixel_avg_variance8x16 = vpx_highbd_8_sub_pixel_avg_variance8x16_sse2; - vpx_highbd_8_sub_pixel_avg_variance8x4 = vpx_highbd_8_sub_pixel_avg_variance8x4_c; - if (flags & HAS_SSE2) vpx_highbd_8_sub_pixel_avg_variance8x4 = vpx_highbd_8_sub_pixel_avg_variance8x4_sse2; - vpx_highbd_8_sub_pixel_avg_variance8x8 = vpx_highbd_8_sub_pixel_avg_variance8x8_c; - if (flags & HAS_SSE2) vpx_highbd_8_sub_pixel_avg_variance8x8 = vpx_highbd_8_sub_pixel_avg_variance8x8_sse2; - vpx_highbd_8_sub_pixel_variance16x16 = vpx_highbd_8_sub_pixel_variance16x16_c; - if (flags & HAS_SSE2) vpx_highbd_8_sub_pixel_variance16x16 = vpx_highbd_8_sub_pixel_variance16x16_sse2; - vpx_highbd_8_sub_pixel_variance16x32 = vpx_highbd_8_sub_pixel_variance16x32_c; - if (flags & HAS_SSE2) vpx_highbd_8_sub_pixel_variance16x32 = vpx_highbd_8_sub_pixel_variance16x32_sse2; - vpx_highbd_8_sub_pixel_variance16x8 = vpx_highbd_8_sub_pixel_variance16x8_c; - if (flags & HAS_SSE2) vpx_highbd_8_sub_pixel_variance16x8 = vpx_highbd_8_sub_pixel_variance16x8_sse2; - vpx_highbd_8_sub_pixel_variance32x16 = vpx_highbd_8_sub_pixel_variance32x16_c; - if (flags & HAS_SSE2) vpx_highbd_8_sub_pixel_variance32x16 = vpx_highbd_8_sub_pixel_variance32x16_sse2; - vpx_highbd_8_sub_pixel_variance32x32 = vpx_highbd_8_sub_pixel_variance32x32_c; - if (flags & HAS_SSE2) vpx_highbd_8_sub_pixel_variance32x32 = vpx_highbd_8_sub_pixel_variance32x32_sse2; - vpx_highbd_8_sub_pixel_variance32x64 = vpx_highbd_8_sub_pixel_variance32x64_c; - if (flags & HAS_SSE2) vpx_highbd_8_sub_pixel_variance32x64 = vpx_highbd_8_sub_pixel_variance32x64_sse2; - vpx_highbd_8_sub_pixel_variance64x32 = vpx_highbd_8_sub_pixel_variance64x32_c; - if (flags & HAS_SSE2) vpx_highbd_8_sub_pixel_variance64x32 = vpx_highbd_8_sub_pixel_variance64x32_sse2; - vpx_highbd_8_sub_pixel_variance64x64 = vpx_highbd_8_sub_pixel_variance64x64_c; - if (flags & HAS_SSE2) vpx_highbd_8_sub_pixel_variance64x64 = vpx_highbd_8_sub_pixel_variance64x64_sse2; - vpx_highbd_8_sub_pixel_variance8x16 = vpx_highbd_8_sub_pixel_variance8x16_c; - if (flags & HAS_SSE2) vpx_highbd_8_sub_pixel_variance8x16 = vpx_highbd_8_sub_pixel_variance8x16_sse2; - vpx_highbd_8_sub_pixel_variance8x4 = vpx_highbd_8_sub_pixel_variance8x4_c; - if (flags & HAS_SSE2) vpx_highbd_8_sub_pixel_variance8x4 = vpx_highbd_8_sub_pixel_variance8x4_sse2; - vpx_highbd_8_sub_pixel_variance8x8 = vpx_highbd_8_sub_pixel_variance8x8_c; - if (flags & HAS_SSE2) vpx_highbd_8_sub_pixel_variance8x8 = vpx_highbd_8_sub_pixel_variance8x8_sse2; - vpx_highbd_8_variance16x16 = vpx_highbd_8_variance16x16_c; - if (flags & HAS_SSE2) vpx_highbd_8_variance16x16 = vpx_highbd_8_variance16x16_sse2; - vpx_highbd_8_variance16x32 = vpx_highbd_8_variance16x32_c; - if (flags & HAS_SSE2) vpx_highbd_8_variance16x32 = vpx_highbd_8_variance16x32_sse2; - vpx_highbd_8_variance16x8 = vpx_highbd_8_variance16x8_c; - if (flags & HAS_SSE2) vpx_highbd_8_variance16x8 = vpx_highbd_8_variance16x8_sse2; - vpx_highbd_8_variance32x16 = vpx_highbd_8_variance32x16_c; - if (flags & HAS_SSE2) vpx_highbd_8_variance32x16 = vpx_highbd_8_variance32x16_sse2; - vpx_highbd_8_variance32x32 = vpx_highbd_8_variance32x32_c; - if (flags & HAS_SSE2) vpx_highbd_8_variance32x32 = vpx_highbd_8_variance32x32_sse2; - vpx_highbd_8_variance32x64 = vpx_highbd_8_variance32x64_c; - if (flags & HAS_SSE2) vpx_highbd_8_variance32x64 = vpx_highbd_8_variance32x64_sse2; - vpx_highbd_8_variance64x32 = vpx_highbd_8_variance64x32_c; - if (flags & HAS_SSE2) vpx_highbd_8_variance64x32 = vpx_highbd_8_variance64x32_sse2; - vpx_highbd_8_variance64x64 = vpx_highbd_8_variance64x64_c; - if (flags & HAS_SSE2) vpx_highbd_8_variance64x64 = vpx_highbd_8_variance64x64_sse2; - vpx_highbd_8_variance8x16 = vpx_highbd_8_variance8x16_c; - if (flags & HAS_SSE2) vpx_highbd_8_variance8x16 = vpx_highbd_8_variance8x16_sse2; - vpx_highbd_8_variance8x8 = vpx_highbd_8_variance8x8_c; - if (flags & HAS_SSE2) vpx_highbd_8_variance8x8 = vpx_highbd_8_variance8x8_sse2; - vpx_highbd_convolve_avg = vpx_highbd_convolve_avg_c; - if (flags & HAS_SSE2) vpx_highbd_convolve_avg = vpx_highbd_convolve_avg_sse2; - vpx_highbd_convolve_copy = vpx_highbd_convolve_copy_c; - if (flags & HAS_SSE2) vpx_highbd_convolve_copy = vpx_highbd_convolve_copy_sse2; - vpx_highbd_dc_predictor_16x16 = vpx_highbd_dc_predictor_16x16_c; - if (flags & HAS_SSE2) vpx_highbd_dc_predictor_16x16 = vpx_highbd_dc_predictor_16x16_sse2; - vpx_highbd_dc_predictor_32x32 = vpx_highbd_dc_predictor_32x32_c; - if (flags & HAS_SSE2) vpx_highbd_dc_predictor_32x32 = vpx_highbd_dc_predictor_32x32_sse2; - vpx_highbd_dc_predictor_4x4 = vpx_highbd_dc_predictor_4x4_c; - if (flags & HAS_SSE2) vpx_highbd_dc_predictor_4x4 = vpx_highbd_dc_predictor_4x4_sse2; - vpx_highbd_dc_predictor_8x8 = vpx_highbd_dc_predictor_8x8_c; - if (flags & HAS_SSE2) vpx_highbd_dc_predictor_8x8 = vpx_highbd_dc_predictor_8x8_sse2; - vpx_highbd_fdct16x16 = vpx_highbd_fdct16x16_c; - if (flags & HAS_SSE2) vpx_highbd_fdct16x16 = vpx_highbd_fdct16x16_sse2; - vpx_highbd_fdct32x32 = vpx_highbd_fdct32x32_c; - if (flags & HAS_SSE2) vpx_highbd_fdct32x32 = vpx_highbd_fdct32x32_sse2; - vpx_highbd_fdct32x32_rd = vpx_highbd_fdct32x32_rd_c; - if (flags & HAS_SSE2) vpx_highbd_fdct32x32_rd = vpx_highbd_fdct32x32_rd_sse2; - vpx_highbd_fdct4x4 = vpx_highbd_fdct4x4_c; - if (flags & HAS_SSE2) vpx_highbd_fdct4x4 = vpx_highbd_fdct4x4_sse2; - vpx_highbd_fdct8x8 = vpx_highbd_fdct8x8_c; - if (flags & HAS_SSE2) vpx_highbd_fdct8x8 = vpx_highbd_fdct8x8_sse2; - vpx_highbd_idct16x16_10_add = vpx_highbd_idct16x16_10_add_c; - if (flags & HAS_SSE2) vpx_highbd_idct16x16_10_add = vpx_highbd_idct16x16_10_add_sse2; - vpx_highbd_idct16x16_256_add = vpx_highbd_idct16x16_256_add_c; - if (flags & HAS_SSE2) vpx_highbd_idct16x16_256_add = vpx_highbd_idct16x16_256_add_sse2; - vpx_highbd_idct32x32_1_add = vpx_highbd_idct32x32_1_add_c; - if (flags & HAS_SSE2) vpx_highbd_idct32x32_1_add = vpx_highbd_idct32x32_1_add_sse2; - vpx_highbd_idct4x4_16_add = vpx_highbd_idct4x4_16_add_c; - if (flags & HAS_SSE2) vpx_highbd_idct4x4_16_add = vpx_highbd_idct4x4_16_add_sse2; - vpx_highbd_idct8x8_12_add = vpx_highbd_idct8x8_12_add_c; - if (flags & HAS_SSE2) vpx_highbd_idct8x8_12_add = vpx_highbd_idct8x8_12_add_sse2; - vpx_highbd_idct8x8_64_add = vpx_highbd_idct8x8_64_add_c; - if (flags & HAS_SSE2) vpx_highbd_idct8x8_64_add = vpx_highbd_idct8x8_64_add_sse2; - vpx_highbd_lpf_horizontal_16 = vpx_highbd_lpf_horizontal_16_c; - if (flags & HAS_SSE2) vpx_highbd_lpf_horizontal_16 = vpx_highbd_lpf_horizontal_16_sse2; - vpx_highbd_lpf_horizontal_16_dual = vpx_highbd_lpf_horizontal_16_dual_c; - if (flags & HAS_SSE2) vpx_highbd_lpf_horizontal_16_dual = vpx_highbd_lpf_horizontal_16_dual_sse2; - vpx_highbd_lpf_horizontal_4 = vpx_highbd_lpf_horizontal_4_c; - if (flags & HAS_SSE2) vpx_highbd_lpf_horizontal_4 = vpx_highbd_lpf_horizontal_4_sse2; - vpx_highbd_lpf_horizontal_4_dual = vpx_highbd_lpf_horizontal_4_dual_c; - if (flags & HAS_SSE2) vpx_highbd_lpf_horizontal_4_dual = vpx_highbd_lpf_horizontal_4_dual_sse2; - vpx_highbd_lpf_horizontal_8 = vpx_highbd_lpf_horizontal_8_c; - if (flags & HAS_SSE2) vpx_highbd_lpf_horizontal_8 = vpx_highbd_lpf_horizontal_8_sse2; - vpx_highbd_lpf_horizontal_8_dual = vpx_highbd_lpf_horizontal_8_dual_c; - if (flags & HAS_SSE2) vpx_highbd_lpf_horizontal_8_dual = vpx_highbd_lpf_horizontal_8_dual_sse2; - vpx_highbd_lpf_vertical_16 = vpx_highbd_lpf_vertical_16_c; - if (flags & HAS_SSE2) vpx_highbd_lpf_vertical_16 = vpx_highbd_lpf_vertical_16_sse2; - vpx_highbd_lpf_vertical_16_dual = vpx_highbd_lpf_vertical_16_dual_c; - if (flags & HAS_SSE2) vpx_highbd_lpf_vertical_16_dual = vpx_highbd_lpf_vertical_16_dual_sse2; - vpx_highbd_lpf_vertical_4 = vpx_highbd_lpf_vertical_4_c; - if (flags & HAS_SSE2) vpx_highbd_lpf_vertical_4 = vpx_highbd_lpf_vertical_4_sse2; - vpx_highbd_lpf_vertical_4_dual = vpx_highbd_lpf_vertical_4_dual_c; - if (flags & HAS_SSE2) vpx_highbd_lpf_vertical_4_dual = vpx_highbd_lpf_vertical_4_dual_sse2; - vpx_highbd_lpf_vertical_8 = vpx_highbd_lpf_vertical_8_c; - if (flags & HAS_SSE2) vpx_highbd_lpf_vertical_8 = vpx_highbd_lpf_vertical_8_sse2; - vpx_highbd_lpf_vertical_8_dual = vpx_highbd_lpf_vertical_8_dual_c; - if (flags & HAS_SSE2) vpx_highbd_lpf_vertical_8_dual = vpx_highbd_lpf_vertical_8_dual_sse2; - vpx_highbd_quantize_b = vpx_highbd_quantize_b_c; - if (flags & HAS_SSE2) vpx_highbd_quantize_b = vpx_highbd_quantize_b_sse2; - vpx_highbd_quantize_b_32x32 = vpx_highbd_quantize_b_32x32_c; - if (flags & HAS_SSE2) vpx_highbd_quantize_b_32x32 = vpx_highbd_quantize_b_32x32_sse2; - vpx_highbd_sad16x16 = vpx_highbd_sad16x16_c; - if (flags & HAS_SSE2) vpx_highbd_sad16x16 = vpx_highbd_sad16x16_sse2; - vpx_highbd_sad16x16_avg = vpx_highbd_sad16x16_avg_c; - if (flags & HAS_SSE2) vpx_highbd_sad16x16_avg = vpx_highbd_sad16x16_avg_sse2; - vpx_highbd_sad16x16x4d = vpx_highbd_sad16x16x4d_c; - if (flags & HAS_SSE2) vpx_highbd_sad16x16x4d = vpx_highbd_sad16x16x4d_sse2; - vpx_highbd_sad16x32 = vpx_highbd_sad16x32_c; - if (flags & HAS_SSE2) vpx_highbd_sad16x32 = vpx_highbd_sad16x32_sse2; - vpx_highbd_sad16x32_avg = vpx_highbd_sad16x32_avg_c; - if (flags & HAS_SSE2) vpx_highbd_sad16x32_avg = vpx_highbd_sad16x32_avg_sse2; - vpx_highbd_sad16x32x4d = vpx_highbd_sad16x32x4d_c; - if (flags & HAS_SSE2) vpx_highbd_sad16x32x4d = vpx_highbd_sad16x32x4d_sse2; - vpx_highbd_sad16x8 = vpx_highbd_sad16x8_c; - if (flags & HAS_SSE2) vpx_highbd_sad16x8 = vpx_highbd_sad16x8_sse2; - vpx_highbd_sad16x8_avg = vpx_highbd_sad16x8_avg_c; - if (flags & HAS_SSE2) vpx_highbd_sad16x8_avg = vpx_highbd_sad16x8_avg_sse2; - vpx_highbd_sad16x8x4d = vpx_highbd_sad16x8x4d_c; - if (flags & HAS_SSE2) vpx_highbd_sad16x8x4d = vpx_highbd_sad16x8x4d_sse2; - vpx_highbd_sad32x16 = vpx_highbd_sad32x16_c; - if (flags & HAS_SSE2) vpx_highbd_sad32x16 = vpx_highbd_sad32x16_sse2; - vpx_highbd_sad32x16_avg = vpx_highbd_sad32x16_avg_c; - if (flags & HAS_SSE2) vpx_highbd_sad32x16_avg = vpx_highbd_sad32x16_avg_sse2; - vpx_highbd_sad32x16x4d = vpx_highbd_sad32x16x4d_c; - if (flags & HAS_SSE2) vpx_highbd_sad32x16x4d = vpx_highbd_sad32x16x4d_sse2; - vpx_highbd_sad32x32 = vpx_highbd_sad32x32_c; - if (flags & HAS_SSE2) vpx_highbd_sad32x32 = vpx_highbd_sad32x32_sse2; - vpx_highbd_sad32x32_avg = vpx_highbd_sad32x32_avg_c; - if (flags & HAS_SSE2) vpx_highbd_sad32x32_avg = vpx_highbd_sad32x32_avg_sse2; - vpx_highbd_sad32x32x4d = vpx_highbd_sad32x32x4d_c; - if (flags & HAS_SSE2) vpx_highbd_sad32x32x4d = vpx_highbd_sad32x32x4d_sse2; - vpx_highbd_sad32x64 = vpx_highbd_sad32x64_c; - if (flags & HAS_SSE2) vpx_highbd_sad32x64 = vpx_highbd_sad32x64_sse2; - vpx_highbd_sad32x64_avg = vpx_highbd_sad32x64_avg_c; - if (flags & HAS_SSE2) vpx_highbd_sad32x64_avg = vpx_highbd_sad32x64_avg_sse2; - vpx_highbd_sad32x64x4d = vpx_highbd_sad32x64x4d_c; - if (flags & HAS_SSE2) vpx_highbd_sad32x64x4d = vpx_highbd_sad32x64x4d_sse2; - vpx_highbd_sad4x4x4d = vpx_highbd_sad4x4x4d_c; - if (flags & HAS_SSE2) vpx_highbd_sad4x4x4d = vpx_highbd_sad4x4x4d_sse2; - vpx_highbd_sad4x8x4d = vpx_highbd_sad4x8x4d_c; - if (flags & HAS_SSE2) vpx_highbd_sad4x8x4d = vpx_highbd_sad4x8x4d_sse2; - vpx_highbd_sad64x32 = vpx_highbd_sad64x32_c; - if (flags & HAS_SSE2) vpx_highbd_sad64x32 = vpx_highbd_sad64x32_sse2; - vpx_highbd_sad64x32_avg = vpx_highbd_sad64x32_avg_c; - if (flags & HAS_SSE2) vpx_highbd_sad64x32_avg = vpx_highbd_sad64x32_avg_sse2; - vpx_highbd_sad64x32x4d = vpx_highbd_sad64x32x4d_c; - if (flags & HAS_SSE2) vpx_highbd_sad64x32x4d = vpx_highbd_sad64x32x4d_sse2; - vpx_highbd_sad64x64 = vpx_highbd_sad64x64_c; - if (flags & HAS_SSE2) vpx_highbd_sad64x64 = vpx_highbd_sad64x64_sse2; - vpx_highbd_sad64x64_avg = vpx_highbd_sad64x64_avg_c; - if (flags & HAS_SSE2) vpx_highbd_sad64x64_avg = vpx_highbd_sad64x64_avg_sse2; - vpx_highbd_sad64x64x4d = vpx_highbd_sad64x64x4d_c; - if (flags & HAS_SSE2) vpx_highbd_sad64x64x4d = vpx_highbd_sad64x64x4d_sse2; - vpx_highbd_sad8x16 = vpx_highbd_sad8x16_c; - if (flags & HAS_SSE2) vpx_highbd_sad8x16 = vpx_highbd_sad8x16_sse2; - vpx_highbd_sad8x16_avg = vpx_highbd_sad8x16_avg_c; - if (flags & HAS_SSE2) vpx_highbd_sad8x16_avg = vpx_highbd_sad8x16_avg_sse2; - vpx_highbd_sad8x16x4d = vpx_highbd_sad8x16x4d_c; - if (flags & HAS_SSE2) vpx_highbd_sad8x16x4d = vpx_highbd_sad8x16x4d_sse2; - vpx_highbd_sad8x4 = vpx_highbd_sad8x4_c; - if (flags & HAS_SSE2) vpx_highbd_sad8x4 = vpx_highbd_sad8x4_sse2; - vpx_highbd_sad8x4_avg = vpx_highbd_sad8x4_avg_c; - if (flags & HAS_SSE2) vpx_highbd_sad8x4_avg = vpx_highbd_sad8x4_avg_sse2; - vpx_highbd_sad8x4x4d = vpx_highbd_sad8x4x4d_c; - if (flags & HAS_SSE2) vpx_highbd_sad8x4x4d = vpx_highbd_sad8x4x4d_sse2; - vpx_highbd_sad8x8 = vpx_highbd_sad8x8_c; - if (flags & HAS_SSE2) vpx_highbd_sad8x8 = vpx_highbd_sad8x8_sse2; - vpx_highbd_sad8x8_avg = vpx_highbd_sad8x8_avg_c; - if (flags & HAS_SSE2) vpx_highbd_sad8x8_avg = vpx_highbd_sad8x8_avg_sse2; - vpx_highbd_sad8x8x4d = vpx_highbd_sad8x8x4d_c; - if (flags & HAS_SSE2) vpx_highbd_sad8x8x4d = vpx_highbd_sad8x8x4d_sse2; - vpx_highbd_tm_predictor_16x16 = vpx_highbd_tm_predictor_16x16_c; - if (flags & HAS_SSE2) vpx_highbd_tm_predictor_16x16 = vpx_highbd_tm_predictor_16x16_sse2; - vpx_highbd_tm_predictor_32x32 = vpx_highbd_tm_predictor_32x32_c; - if (flags & HAS_SSE2) vpx_highbd_tm_predictor_32x32 = vpx_highbd_tm_predictor_32x32_sse2; - vpx_highbd_tm_predictor_4x4 = vpx_highbd_tm_predictor_4x4_c; - if (flags & HAS_SSE2) vpx_highbd_tm_predictor_4x4 = vpx_highbd_tm_predictor_4x4_sse2; - vpx_highbd_tm_predictor_8x8 = vpx_highbd_tm_predictor_8x8_c; - if (flags & HAS_SSE2) vpx_highbd_tm_predictor_8x8 = vpx_highbd_tm_predictor_8x8_sse2; - vpx_highbd_v_predictor_16x16 = vpx_highbd_v_predictor_16x16_c; - if (flags & HAS_SSE2) vpx_highbd_v_predictor_16x16 = vpx_highbd_v_predictor_16x16_sse2; - vpx_highbd_v_predictor_32x32 = vpx_highbd_v_predictor_32x32_c; - if (flags & HAS_SSE2) vpx_highbd_v_predictor_32x32 = vpx_highbd_v_predictor_32x32_sse2; - vpx_highbd_v_predictor_4x4 = vpx_highbd_v_predictor_4x4_c; - if (flags & HAS_SSE2) vpx_highbd_v_predictor_4x4 = vpx_highbd_v_predictor_4x4_sse2; - vpx_highbd_v_predictor_8x8 = vpx_highbd_v_predictor_8x8_c; - if (flags & HAS_SSE2) vpx_highbd_v_predictor_8x8 = vpx_highbd_v_predictor_8x8_sse2; - vpx_idct16x16_10_add = vpx_idct16x16_10_add_c; - if (flags & HAS_SSE2) vpx_idct16x16_10_add = vpx_idct16x16_10_add_sse2; - vpx_idct16x16_1_add = vpx_idct16x16_1_add_c; - if (flags & HAS_SSE2) vpx_idct16x16_1_add = vpx_idct16x16_1_add_sse2; - vpx_idct16x16_256_add = vpx_idct16x16_256_add_c; - if (flags & HAS_SSE2) vpx_idct16x16_256_add = vpx_idct16x16_256_add_sse2; - vpx_idct32x32_1024_add = vpx_idct32x32_1024_add_c; - if (flags & HAS_SSE2) vpx_idct32x32_1024_add = vpx_idct32x32_1024_add_sse2; - vpx_idct32x32_135_add = vpx_idct32x32_135_add_c; - if (flags & HAS_SSE2) vpx_idct32x32_135_add = vpx_idct32x32_1024_add_sse2; - vpx_idct32x32_1_add = vpx_idct32x32_1_add_c; - if (flags & HAS_SSE2) vpx_idct32x32_1_add = vpx_idct32x32_1_add_sse2; - vpx_idct32x32_34_add = vpx_idct32x32_34_add_c; - if (flags & HAS_SSE2) vpx_idct32x32_34_add = vpx_idct32x32_34_add_sse2; - vpx_idct4x4_16_add = vpx_idct4x4_16_add_c; - if (flags & HAS_SSE2) vpx_idct4x4_16_add = vpx_idct4x4_16_add_sse2; - vpx_idct4x4_1_add = vpx_idct4x4_1_add_c; - if (flags & HAS_SSE2) vpx_idct4x4_1_add = vpx_idct4x4_1_add_sse2; - vpx_idct8x8_12_add = vpx_idct8x8_12_add_c; - if (flags & HAS_SSE2) vpx_idct8x8_12_add = vpx_idct8x8_12_add_sse2; - vpx_idct8x8_1_add = vpx_idct8x8_1_add_c; - if (flags & HAS_SSE2) vpx_idct8x8_1_add = vpx_idct8x8_1_add_sse2; - vpx_idct8x8_64_add = vpx_idct8x8_64_add_c; - if (flags & HAS_SSE2) vpx_idct8x8_64_add = vpx_idct8x8_64_add_sse2; - vpx_int_pro_col = vpx_int_pro_col_c; - if (flags & HAS_SSE2) vpx_int_pro_col = vpx_int_pro_col_sse2; - vpx_int_pro_row = vpx_int_pro_row_c; - if (flags & HAS_SSE2) vpx_int_pro_row = vpx_int_pro_row_sse2; - vpx_iwht4x4_16_add = vpx_iwht4x4_16_add_c; - if (flags & HAS_SSE2) vpx_iwht4x4_16_add = vpx_iwht4x4_16_add_sse2; - vpx_lpf_horizontal_16 = vpx_lpf_horizontal_16_c; - if (flags & HAS_SSE2) vpx_lpf_horizontal_16 = vpx_lpf_horizontal_16_sse2; - if (flags & HAS_AVX2) vpx_lpf_horizontal_16 = vpx_lpf_horizontal_16_avx2; - vpx_lpf_horizontal_16_dual = vpx_lpf_horizontal_16_dual_c; - if (flags & HAS_SSE2) vpx_lpf_horizontal_16_dual = vpx_lpf_horizontal_16_dual_sse2; - if (flags & HAS_AVX2) vpx_lpf_horizontal_16_dual = vpx_lpf_horizontal_16_dual_avx2; - vpx_lpf_horizontal_4 = vpx_lpf_horizontal_4_c; - if (flags & HAS_SSE2) vpx_lpf_horizontal_4 = vpx_lpf_horizontal_4_sse2; - vpx_lpf_horizontal_4_dual = vpx_lpf_horizontal_4_dual_c; - if (flags & HAS_SSE2) vpx_lpf_horizontal_4_dual = vpx_lpf_horizontal_4_dual_sse2; - vpx_lpf_horizontal_8 = vpx_lpf_horizontal_8_c; - if (flags & HAS_SSE2) vpx_lpf_horizontal_8 = vpx_lpf_horizontal_8_sse2; - vpx_lpf_horizontal_8_dual = vpx_lpf_horizontal_8_dual_c; - if (flags & HAS_SSE2) vpx_lpf_horizontal_8_dual = vpx_lpf_horizontal_8_dual_sse2; - vpx_lpf_vertical_16 = vpx_lpf_vertical_16_c; - if (flags & HAS_SSE2) vpx_lpf_vertical_16 = vpx_lpf_vertical_16_sse2; - vpx_lpf_vertical_16_dual = vpx_lpf_vertical_16_dual_c; - if (flags & HAS_SSE2) vpx_lpf_vertical_16_dual = vpx_lpf_vertical_16_dual_sse2; - vpx_lpf_vertical_4 = vpx_lpf_vertical_4_c; - if (flags & HAS_SSE2) vpx_lpf_vertical_4 = vpx_lpf_vertical_4_sse2; - vpx_lpf_vertical_4_dual = vpx_lpf_vertical_4_dual_c; - if (flags & HAS_SSE2) vpx_lpf_vertical_4_dual = vpx_lpf_vertical_4_dual_sse2; - vpx_lpf_vertical_8 = vpx_lpf_vertical_8_c; - if (flags & HAS_SSE2) vpx_lpf_vertical_8 = vpx_lpf_vertical_8_sse2; - vpx_lpf_vertical_8_dual = vpx_lpf_vertical_8_dual_c; - if (flags & HAS_SSE2) vpx_lpf_vertical_8_dual = vpx_lpf_vertical_8_dual_sse2; - vpx_mbpost_proc_across_ip = vpx_mbpost_proc_across_ip_c; - if (flags & HAS_SSE2) vpx_mbpost_proc_across_ip = vpx_mbpost_proc_across_ip_sse2; - vpx_mbpost_proc_down = vpx_mbpost_proc_down_c; - if (flags & HAS_SSE2) vpx_mbpost_proc_down = vpx_mbpost_proc_down_sse2; - vpx_minmax_8x8 = vpx_minmax_8x8_c; - if (flags & HAS_SSE2) vpx_minmax_8x8 = vpx_minmax_8x8_sse2; - vpx_mse16x16 = vpx_mse16x16_c; - if (flags & HAS_SSE2) vpx_mse16x16 = vpx_mse16x16_sse2; - if (flags & HAS_AVX2) vpx_mse16x16 = vpx_mse16x16_avx2; - vpx_mse16x8 = vpx_mse16x8_c; - if (flags & HAS_SSE2) vpx_mse16x8 = vpx_mse16x8_sse2; - vpx_mse8x16 = vpx_mse8x16_c; - if (flags & HAS_SSE2) vpx_mse8x16 = vpx_mse8x16_sse2; - vpx_mse8x8 = vpx_mse8x8_c; - if (flags & HAS_SSE2) vpx_mse8x8 = vpx_mse8x8_sse2; - vpx_plane_add_noise = vpx_plane_add_noise_c; - if (flags & HAS_SSE2) vpx_plane_add_noise = vpx_plane_add_noise_sse2; - vpx_post_proc_down_and_across_mb_row = vpx_post_proc_down_and_across_mb_row_c; - if (flags & HAS_SSE2) vpx_post_proc_down_and_across_mb_row = vpx_post_proc_down_and_across_mb_row_sse2; - vpx_quantize_b = vpx_quantize_b_c; - if (flags & HAS_SSE2) vpx_quantize_b = vpx_quantize_b_sse2; - vpx_sad16x16 = vpx_sad16x16_c; - if (flags & HAS_SSE2) vpx_sad16x16 = vpx_sad16x16_sse2; - vpx_sad16x16_avg = vpx_sad16x16_avg_c; - if (flags & HAS_SSE2) vpx_sad16x16_avg = vpx_sad16x16_avg_sse2; - vpx_sad16x16x3 = vpx_sad16x16x3_c; - if (flags & HAS_SSE3) vpx_sad16x16x3 = vpx_sad16x16x3_sse3; - if (flags & HAS_SSSE3) vpx_sad16x16x3 = vpx_sad16x16x3_ssse3; - vpx_sad16x16x4d = vpx_sad16x16x4d_c; - if (flags & HAS_SSE2) vpx_sad16x16x4d = vpx_sad16x16x4d_sse2; - vpx_sad16x16x8 = vpx_sad16x16x8_c; - if (flags & HAS_SSE4_1) vpx_sad16x16x8 = vpx_sad16x16x8_sse4_1; - vpx_sad16x32 = vpx_sad16x32_c; - if (flags & HAS_SSE2) vpx_sad16x32 = vpx_sad16x32_sse2; - vpx_sad16x32_avg = vpx_sad16x32_avg_c; - if (flags & HAS_SSE2) vpx_sad16x32_avg = vpx_sad16x32_avg_sse2; - vpx_sad16x32x4d = vpx_sad16x32x4d_c; - if (flags & HAS_SSE2) vpx_sad16x32x4d = vpx_sad16x32x4d_sse2; - vpx_sad16x8 = vpx_sad16x8_c; - if (flags & HAS_SSE2) vpx_sad16x8 = vpx_sad16x8_sse2; - vpx_sad16x8_avg = vpx_sad16x8_avg_c; - if (flags & HAS_SSE2) vpx_sad16x8_avg = vpx_sad16x8_avg_sse2; - vpx_sad16x8x3 = vpx_sad16x8x3_c; - if (flags & HAS_SSE3) vpx_sad16x8x3 = vpx_sad16x8x3_sse3; - if (flags & HAS_SSSE3) vpx_sad16x8x3 = vpx_sad16x8x3_ssse3; - vpx_sad16x8x4d = vpx_sad16x8x4d_c; - if (flags & HAS_SSE2) vpx_sad16x8x4d = vpx_sad16x8x4d_sse2; - vpx_sad16x8x8 = vpx_sad16x8x8_c; - if (flags & HAS_SSE4_1) vpx_sad16x8x8 = vpx_sad16x8x8_sse4_1; - vpx_sad32x16 = vpx_sad32x16_c; - if (flags & HAS_SSE2) vpx_sad32x16 = vpx_sad32x16_sse2; - if (flags & HAS_AVX2) vpx_sad32x16 = vpx_sad32x16_avx2; - vpx_sad32x16_avg = vpx_sad32x16_avg_c; - if (flags & HAS_SSE2) vpx_sad32x16_avg = vpx_sad32x16_avg_sse2; - if (flags & HAS_AVX2) vpx_sad32x16_avg = vpx_sad32x16_avg_avx2; - vpx_sad32x16x4d = vpx_sad32x16x4d_c; - if (flags & HAS_SSE2) vpx_sad32x16x4d = vpx_sad32x16x4d_sse2; - vpx_sad32x32 = vpx_sad32x32_c; - if (flags & HAS_SSE2) vpx_sad32x32 = vpx_sad32x32_sse2; - if (flags & HAS_AVX2) vpx_sad32x32 = vpx_sad32x32_avx2; - vpx_sad32x32_avg = vpx_sad32x32_avg_c; - if (flags & HAS_SSE2) vpx_sad32x32_avg = vpx_sad32x32_avg_sse2; - if (flags & HAS_AVX2) vpx_sad32x32_avg = vpx_sad32x32_avg_avx2; - vpx_sad32x32x4d = vpx_sad32x32x4d_c; - if (flags & HAS_SSE2) vpx_sad32x32x4d = vpx_sad32x32x4d_sse2; - if (flags & HAS_AVX2) vpx_sad32x32x4d = vpx_sad32x32x4d_avx2; - vpx_sad32x64 = vpx_sad32x64_c; - if (flags & HAS_SSE2) vpx_sad32x64 = vpx_sad32x64_sse2; - if (flags & HAS_AVX2) vpx_sad32x64 = vpx_sad32x64_avx2; - vpx_sad32x64_avg = vpx_sad32x64_avg_c; - if (flags & HAS_SSE2) vpx_sad32x64_avg = vpx_sad32x64_avg_sse2; - if (flags & HAS_AVX2) vpx_sad32x64_avg = vpx_sad32x64_avg_avx2; - vpx_sad32x64x4d = vpx_sad32x64x4d_c; - if (flags & HAS_SSE2) vpx_sad32x64x4d = vpx_sad32x64x4d_sse2; - vpx_sad4x4 = vpx_sad4x4_c; - if (flags & HAS_SSE2) vpx_sad4x4 = vpx_sad4x4_sse2; - vpx_sad4x4_avg = vpx_sad4x4_avg_c; - if (flags & HAS_SSE2) vpx_sad4x4_avg = vpx_sad4x4_avg_sse2; - vpx_sad4x4x3 = vpx_sad4x4x3_c; - if (flags & HAS_SSE3) vpx_sad4x4x3 = vpx_sad4x4x3_sse3; - vpx_sad4x4x4d = vpx_sad4x4x4d_c; - if (flags & HAS_SSE2) vpx_sad4x4x4d = vpx_sad4x4x4d_sse2; - vpx_sad4x4x8 = vpx_sad4x4x8_c; - if (flags & HAS_SSE4_1) vpx_sad4x4x8 = vpx_sad4x4x8_sse4_1; - vpx_sad4x8 = vpx_sad4x8_c; - if (flags & HAS_SSE2) vpx_sad4x8 = vpx_sad4x8_sse2; - vpx_sad4x8_avg = vpx_sad4x8_avg_c; - if (flags & HAS_SSE2) vpx_sad4x8_avg = vpx_sad4x8_avg_sse2; - vpx_sad4x8x4d = vpx_sad4x8x4d_c; - if (flags & HAS_SSE2) vpx_sad4x8x4d = vpx_sad4x8x4d_sse2; - vpx_sad64x32 = vpx_sad64x32_c; - if (flags & HAS_SSE2) vpx_sad64x32 = vpx_sad64x32_sse2; - if (flags & HAS_AVX2) vpx_sad64x32 = vpx_sad64x32_avx2; - vpx_sad64x32_avg = vpx_sad64x32_avg_c; - if (flags & HAS_SSE2) vpx_sad64x32_avg = vpx_sad64x32_avg_sse2; - if (flags & HAS_AVX2) vpx_sad64x32_avg = vpx_sad64x32_avg_avx2; - vpx_sad64x32x4d = vpx_sad64x32x4d_c; - if (flags & HAS_SSE2) vpx_sad64x32x4d = vpx_sad64x32x4d_sse2; - vpx_sad64x64 = vpx_sad64x64_c; - if (flags & HAS_SSE2) vpx_sad64x64 = vpx_sad64x64_sse2; - if (flags & HAS_AVX2) vpx_sad64x64 = vpx_sad64x64_avx2; - vpx_sad64x64_avg = vpx_sad64x64_avg_c; - if (flags & HAS_SSE2) vpx_sad64x64_avg = vpx_sad64x64_avg_sse2; - if (flags & HAS_AVX2) vpx_sad64x64_avg = vpx_sad64x64_avg_avx2; - vpx_sad64x64x4d = vpx_sad64x64x4d_c; - if (flags & HAS_SSE2) vpx_sad64x64x4d = vpx_sad64x64x4d_sse2; - if (flags & HAS_AVX2) vpx_sad64x64x4d = vpx_sad64x64x4d_avx2; - vpx_sad8x16 = vpx_sad8x16_c; - if (flags & HAS_SSE2) vpx_sad8x16 = vpx_sad8x16_sse2; - vpx_sad8x16_avg = vpx_sad8x16_avg_c; - if (flags & HAS_SSE2) vpx_sad8x16_avg = vpx_sad8x16_avg_sse2; - vpx_sad8x16x3 = vpx_sad8x16x3_c; - if (flags & HAS_SSE3) vpx_sad8x16x3 = vpx_sad8x16x3_sse3; - vpx_sad8x16x4d = vpx_sad8x16x4d_c; - if (flags & HAS_SSE2) vpx_sad8x16x4d = vpx_sad8x16x4d_sse2; - vpx_sad8x16x8 = vpx_sad8x16x8_c; - if (flags & HAS_SSE4_1) vpx_sad8x16x8 = vpx_sad8x16x8_sse4_1; - vpx_sad8x4 = vpx_sad8x4_c; - if (flags & HAS_SSE2) vpx_sad8x4 = vpx_sad8x4_sse2; - vpx_sad8x4_avg = vpx_sad8x4_avg_c; - if (flags & HAS_SSE2) vpx_sad8x4_avg = vpx_sad8x4_avg_sse2; - vpx_sad8x4x4d = vpx_sad8x4x4d_c; - if (flags & HAS_SSE2) vpx_sad8x4x4d = vpx_sad8x4x4d_sse2; - vpx_sad8x8 = vpx_sad8x8_c; - if (flags & HAS_SSE2) vpx_sad8x8 = vpx_sad8x8_sse2; - vpx_sad8x8_avg = vpx_sad8x8_avg_c; - if (flags & HAS_SSE2) vpx_sad8x8_avg = vpx_sad8x8_avg_sse2; - vpx_sad8x8x3 = vpx_sad8x8x3_c; - if (flags & HAS_SSE3) vpx_sad8x8x3 = vpx_sad8x8x3_sse3; - vpx_sad8x8x4d = vpx_sad8x8x4d_c; - if (flags & HAS_SSE2) vpx_sad8x8x4d = vpx_sad8x8x4d_sse2; - vpx_sad8x8x8 = vpx_sad8x8x8_c; - if (flags & HAS_SSE4_1) vpx_sad8x8x8 = vpx_sad8x8x8_sse4_1; - vpx_satd = vpx_satd_c; - if (flags & HAS_SSE2) vpx_satd = vpx_satd_sse2; - vpx_scaled_2d = vpx_scaled_2d_c; - if (flags & HAS_SSSE3) vpx_scaled_2d = vpx_scaled_2d_ssse3; - vpx_sub_pixel_avg_variance16x16 = vpx_sub_pixel_avg_variance16x16_c; - if (flags & HAS_SSE2) vpx_sub_pixel_avg_variance16x16 = vpx_sub_pixel_avg_variance16x16_sse2; - if (flags & HAS_SSSE3) vpx_sub_pixel_avg_variance16x16 = vpx_sub_pixel_avg_variance16x16_ssse3; - vpx_sub_pixel_avg_variance16x32 = vpx_sub_pixel_avg_variance16x32_c; - if (flags & HAS_SSE2) vpx_sub_pixel_avg_variance16x32 = vpx_sub_pixel_avg_variance16x32_sse2; - if (flags & HAS_SSSE3) vpx_sub_pixel_avg_variance16x32 = vpx_sub_pixel_avg_variance16x32_ssse3; - vpx_sub_pixel_avg_variance16x8 = vpx_sub_pixel_avg_variance16x8_c; - if (flags & HAS_SSE2) vpx_sub_pixel_avg_variance16x8 = vpx_sub_pixel_avg_variance16x8_sse2; - if (flags & HAS_SSSE3) vpx_sub_pixel_avg_variance16x8 = vpx_sub_pixel_avg_variance16x8_ssse3; - vpx_sub_pixel_avg_variance32x16 = vpx_sub_pixel_avg_variance32x16_c; - if (flags & HAS_SSE2) vpx_sub_pixel_avg_variance32x16 = vpx_sub_pixel_avg_variance32x16_sse2; - if (flags & HAS_SSSE3) vpx_sub_pixel_avg_variance32x16 = vpx_sub_pixel_avg_variance32x16_ssse3; - vpx_sub_pixel_avg_variance32x32 = vpx_sub_pixel_avg_variance32x32_c; - if (flags & HAS_SSE2) vpx_sub_pixel_avg_variance32x32 = vpx_sub_pixel_avg_variance32x32_sse2; - if (flags & HAS_SSSE3) vpx_sub_pixel_avg_variance32x32 = vpx_sub_pixel_avg_variance32x32_ssse3; - if (flags & HAS_AVX2) vpx_sub_pixel_avg_variance32x32 = vpx_sub_pixel_avg_variance32x32_avx2; - vpx_sub_pixel_avg_variance32x64 = vpx_sub_pixel_avg_variance32x64_c; - if (flags & HAS_SSE2) vpx_sub_pixel_avg_variance32x64 = vpx_sub_pixel_avg_variance32x64_sse2; - if (flags & HAS_SSSE3) vpx_sub_pixel_avg_variance32x64 = vpx_sub_pixel_avg_variance32x64_ssse3; - vpx_sub_pixel_avg_variance4x4 = vpx_sub_pixel_avg_variance4x4_c; - if (flags & HAS_SSE2) vpx_sub_pixel_avg_variance4x4 = vpx_sub_pixel_avg_variance4x4_sse2; - if (flags & HAS_SSSE3) vpx_sub_pixel_avg_variance4x4 = vpx_sub_pixel_avg_variance4x4_ssse3; - vpx_sub_pixel_avg_variance4x8 = vpx_sub_pixel_avg_variance4x8_c; - if (flags & HAS_SSE2) vpx_sub_pixel_avg_variance4x8 = vpx_sub_pixel_avg_variance4x8_sse2; - if (flags & HAS_SSSE3) vpx_sub_pixel_avg_variance4x8 = vpx_sub_pixel_avg_variance4x8_ssse3; - vpx_sub_pixel_avg_variance64x32 = vpx_sub_pixel_avg_variance64x32_c; - if (flags & HAS_SSE2) vpx_sub_pixel_avg_variance64x32 = vpx_sub_pixel_avg_variance64x32_sse2; - if (flags & HAS_SSSE3) vpx_sub_pixel_avg_variance64x32 = vpx_sub_pixel_avg_variance64x32_ssse3; - vpx_sub_pixel_avg_variance64x64 = vpx_sub_pixel_avg_variance64x64_c; - if (flags & HAS_SSE2) vpx_sub_pixel_avg_variance64x64 = vpx_sub_pixel_avg_variance64x64_sse2; - if (flags & HAS_SSSE3) vpx_sub_pixel_avg_variance64x64 = vpx_sub_pixel_avg_variance64x64_ssse3; - if (flags & HAS_AVX2) vpx_sub_pixel_avg_variance64x64 = vpx_sub_pixel_avg_variance64x64_avx2; - vpx_sub_pixel_avg_variance8x16 = vpx_sub_pixel_avg_variance8x16_c; - if (flags & HAS_SSE2) vpx_sub_pixel_avg_variance8x16 = vpx_sub_pixel_avg_variance8x16_sse2; - if (flags & HAS_SSSE3) vpx_sub_pixel_avg_variance8x16 = vpx_sub_pixel_avg_variance8x16_ssse3; - vpx_sub_pixel_avg_variance8x4 = vpx_sub_pixel_avg_variance8x4_c; - if (flags & HAS_SSE2) vpx_sub_pixel_avg_variance8x4 = vpx_sub_pixel_avg_variance8x4_sse2; - if (flags & HAS_SSSE3) vpx_sub_pixel_avg_variance8x4 = vpx_sub_pixel_avg_variance8x4_ssse3; - vpx_sub_pixel_avg_variance8x8 = vpx_sub_pixel_avg_variance8x8_c; - if (flags & HAS_SSE2) vpx_sub_pixel_avg_variance8x8 = vpx_sub_pixel_avg_variance8x8_sse2; - if (flags & HAS_SSSE3) vpx_sub_pixel_avg_variance8x8 = vpx_sub_pixel_avg_variance8x8_ssse3; - vpx_sub_pixel_variance16x16 = vpx_sub_pixel_variance16x16_c; - if (flags & HAS_SSE2) vpx_sub_pixel_variance16x16 = vpx_sub_pixel_variance16x16_sse2; - if (flags & HAS_SSSE3) vpx_sub_pixel_variance16x16 = vpx_sub_pixel_variance16x16_ssse3; - vpx_sub_pixel_variance16x32 = vpx_sub_pixel_variance16x32_c; - if (flags & HAS_SSE2) vpx_sub_pixel_variance16x32 = vpx_sub_pixel_variance16x32_sse2; - if (flags & HAS_SSSE3) vpx_sub_pixel_variance16x32 = vpx_sub_pixel_variance16x32_ssse3; - vpx_sub_pixel_variance16x8 = vpx_sub_pixel_variance16x8_c; - if (flags & HAS_SSE2) vpx_sub_pixel_variance16x8 = vpx_sub_pixel_variance16x8_sse2; - if (flags & HAS_SSSE3) vpx_sub_pixel_variance16x8 = vpx_sub_pixel_variance16x8_ssse3; - vpx_sub_pixel_variance32x16 = vpx_sub_pixel_variance32x16_c; - if (flags & HAS_SSE2) vpx_sub_pixel_variance32x16 = vpx_sub_pixel_variance32x16_sse2; - if (flags & HAS_SSSE3) vpx_sub_pixel_variance32x16 = vpx_sub_pixel_variance32x16_ssse3; - vpx_sub_pixel_variance32x32 = vpx_sub_pixel_variance32x32_c; - if (flags & HAS_SSE2) vpx_sub_pixel_variance32x32 = vpx_sub_pixel_variance32x32_sse2; - if (flags & HAS_SSSE3) vpx_sub_pixel_variance32x32 = vpx_sub_pixel_variance32x32_ssse3; - if (flags & HAS_AVX2) vpx_sub_pixel_variance32x32 = vpx_sub_pixel_variance32x32_avx2; - vpx_sub_pixel_variance32x64 = vpx_sub_pixel_variance32x64_c; - if (flags & HAS_SSE2) vpx_sub_pixel_variance32x64 = vpx_sub_pixel_variance32x64_sse2; - if (flags & HAS_SSSE3) vpx_sub_pixel_variance32x64 = vpx_sub_pixel_variance32x64_ssse3; - vpx_sub_pixel_variance4x4 = vpx_sub_pixel_variance4x4_c; - if (flags & HAS_SSE2) vpx_sub_pixel_variance4x4 = vpx_sub_pixel_variance4x4_sse2; - if (flags & HAS_SSSE3) vpx_sub_pixel_variance4x4 = vpx_sub_pixel_variance4x4_ssse3; - vpx_sub_pixel_variance4x8 = vpx_sub_pixel_variance4x8_c; - if (flags & HAS_SSE2) vpx_sub_pixel_variance4x8 = vpx_sub_pixel_variance4x8_sse2; - if (flags & HAS_SSSE3) vpx_sub_pixel_variance4x8 = vpx_sub_pixel_variance4x8_ssse3; - vpx_sub_pixel_variance64x32 = vpx_sub_pixel_variance64x32_c; - if (flags & HAS_SSE2) vpx_sub_pixel_variance64x32 = vpx_sub_pixel_variance64x32_sse2; - if (flags & HAS_SSSE3) vpx_sub_pixel_variance64x32 = vpx_sub_pixel_variance64x32_ssse3; - vpx_sub_pixel_variance64x64 = vpx_sub_pixel_variance64x64_c; - if (flags & HAS_SSE2) vpx_sub_pixel_variance64x64 = vpx_sub_pixel_variance64x64_sse2; - if (flags & HAS_SSSE3) vpx_sub_pixel_variance64x64 = vpx_sub_pixel_variance64x64_ssse3; - if (flags & HAS_AVX2) vpx_sub_pixel_variance64x64 = vpx_sub_pixel_variance64x64_avx2; - vpx_sub_pixel_variance8x16 = vpx_sub_pixel_variance8x16_c; - if (flags & HAS_SSE2) vpx_sub_pixel_variance8x16 = vpx_sub_pixel_variance8x16_sse2; - if (flags & HAS_SSSE3) vpx_sub_pixel_variance8x16 = vpx_sub_pixel_variance8x16_ssse3; - vpx_sub_pixel_variance8x4 = vpx_sub_pixel_variance8x4_c; - if (flags & HAS_SSE2) vpx_sub_pixel_variance8x4 = vpx_sub_pixel_variance8x4_sse2; - if (flags & HAS_SSSE3) vpx_sub_pixel_variance8x4 = vpx_sub_pixel_variance8x4_ssse3; - vpx_sub_pixel_variance8x8 = vpx_sub_pixel_variance8x8_c; - if (flags & HAS_SSE2) vpx_sub_pixel_variance8x8 = vpx_sub_pixel_variance8x8_sse2; - if (flags & HAS_SSSE3) vpx_sub_pixel_variance8x8 = vpx_sub_pixel_variance8x8_ssse3; - vpx_subtract_block = vpx_subtract_block_c; - if (flags & HAS_SSE2) vpx_subtract_block = vpx_subtract_block_sse2; - vpx_sum_squares_2d_i16 = vpx_sum_squares_2d_i16_c; - if (flags & HAS_SSE2) vpx_sum_squares_2d_i16 = vpx_sum_squares_2d_i16_sse2; - vpx_tm_predictor_16x16 = vpx_tm_predictor_16x16_c; - if (flags & HAS_SSE2) vpx_tm_predictor_16x16 = vpx_tm_predictor_16x16_sse2; - vpx_tm_predictor_32x32 = vpx_tm_predictor_32x32_c; - if (flags & HAS_SSE2) vpx_tm_predictor_32x32 = vpx_tm_predictor_32x32_sse2; - vpx_tm_predictor_4x4 = vpx_tm_predictor_4x4_c; - if (flags & HAS_SSE2) vpx_tm_predictor_4x4 = vpx_tm_predictor_4x4_sse2; - vpx_tm_predictor_8x8 = vpx_tm_predictor_8x8_c; - if (flags & HAS_SSE2) vpx_tm_predictor_8x8 = vpx_tm_predictor_8x8_sse2; - vpx_v_predictor_16x16 = vpx_v_predictor_16x16_c; - if (flags & HAS_SSE2) vpx_v_predictor_16x16 = vpx_v_predictor_16x16_sse2; - vpx_v_predictor_32x32 = vpx_v_predictor_32x32_c; - if (flags & HAS_SSE2) vpx_v_predictor_32x32 = vpx_v_predictor_32x32_sse2; - vpx_v_predictor_4x4 = vpx_v_predictor_4x4_c; - if (flags & HAS_SSE2) vpx_v_predictor_4x4 = vpx_v_predictor_4x4_sse2; - vpx_v_predictor_8x8 = vpx_v_predictor_8x8_c; - if (flags & HAS_SSE2) vpx_v_predictor_8x8 = vpx_v_predictor_8x8_sse2; - vpx_variance16x16 = vpx_variance16x16_c; - if (flags & HAS_SSE2) vpx_variance16x16 = vpx_variance16x16_sse2; - if (flags & HAS_AVX2) vpx_variance16x16 = vpx_variance16x16_avx2; - vpx_variance16x32 = vpx_variance16x32_c; - if (flags & HAS_SSE2) vpx_variance16x32 = vpx_variance16x32_sse2; - vpx_variance16x8 = vpx_variance16x8_c; - if (flags & HAS_SSE2) vpx_variance16x8 = vpx_variance16x8_sse2; - vpx_variance32x16 = vpx_variance32x16_c; - if (flags & HAS_SSE2) vpx_variance32x16 = vpx_variance32x16_sse2; - if (flags & HAS_AVX2) vpx_variance32x16 = vpx_variance32x16_avx2; - vpx_variance32x32 = vpx_variance32x32_c; - if (flags & HAS_SSE2) vpx_variance32x32 = vpx_variance32x32_sse2; - if (flags & HAS_AVX2) vpx_variance32x32 = vpx_variance32x32_avx2; - vpx_variance32x64 = vpx_variance32x64_c; - if (flags & HAS_SSE2) vpx_variance32x64 = vpx_variance32x64_sse2; - vpx_variance4x4 = vpx_variance4x4_c; - if (flags & HAS_SSE2) vpx_variance4x4 = vpx_variance4x4_sse2; - vpx_variance4x8 = vpx_variance4x8_c; - if (flags & HAS_SSE2) vpx_variance4x8 = vpx_variance4x8_sse2; - vpx_variance64x32 = vpx_variance64x32_c; - if (flags & HAS_SSE2) vpx_variance64x32 = vpx_variance64x32_sse2; - if (flags & HAS_AVX2) vpx_variance64x32 = vpx_variance64x32_avx2; - vpx_variance64x64 = vpx_variance64x64_c; - if (flags & HAS_SSE2) vpx_variance64x64 = vpx_variance64x64_sse2; - if (flags & HAS_AVX2) vpx_variance64x64 = vpx_variance64x64_avx2; - vpx_variance8x16 = vpx_variance8x16_c; - if (flags & HAS_SSE2) vpx_variance8x16 = vpx_variance8x16_sse2; - vpx_variance8x4 = vpx_variance8x4_c; - if (flags & HAS_SSE2) vpx_variance8x4 = vpx_variance8x4_sse2; - vpx_variance8x8 = vpx_variance8x8_c; - if (flags & HAS_SSE2) vpx_variance8x8 = vpx_variance8x8_sse2; - vpx_vector_var = vpx_vector_var_c; - if (flags & HAS_SSE2) vpx_vector_var = vpx_vector_var_sse2; -} -#endif - -#ifdef __cplusplus -} // extern "C" -#endif - -#endif diff --git a/WebRtc.NET/include/third_party/libvpx/source/config/linux/ia32/vpx_scale_rtcd.h b/WebRtc.NET/include/third_party/libvpx/source/config/linux/ia32/vpx_scale_rtcd.h deleted file mode 100644 index ddf7d01c..00000000 --- a/WebRtc.NET/include/third_party/libvpx/source/config/linux/ia32/vpx_scale_rtcd.h +++ /dev/null @@ -1,69 +0,0 @@ -#ifndef VPX_SCALE_RTCD_H_ -#define VPX_SCALE_RTCD_H_ - -#ifdef RTCD_C -#define RTCD_EXTERN -#else -#define RTCD_EXTERN extern -#endif - -struct yv12_buffer_config; - -#ifdef __cplusplus -extern "C" { -#endif - -void vp8_horizontal_line_2_1_scale_c(const unsigned char *source, unsigned int source_width, unsigned char *dest, unsigned int dest_width); -#define vp8_horizontal_line_2_1_scale vp8_horizontal_line_2_1_scale_c - -void vp8_horizontal_line_5_3_scale_c(const unsigned char *source, unsigned int source_width, unsigned char *dest, unsigned int dest_width); -#define vp8_horizontal_line_5_3_scale vp8_horizontal_line_5_3_scale_c - -void vp8_horizontal_line_5_4_scale_c(const unsigned char *source, unsigned int source_width, unsigned char *dest, unsigned int dest_width); -#define vp8_horizontal_line_5_4_scale vp8_horizontal_line_5_4_scale_c - -void vp8_vertical_band_2_1_scale_c(unsigned char *source, unsigned int src_pitch, unsigned char *dest, unsigned int dest_pitch, unsigned int dest_width); -#define vp8_vertical_band_2_1_scale vp8_vertical_band_2_1_scale_c - -void vp8_vertical_band_2_1_scale_i_c(unsigned char *source, unsigned int src_pitch, unsigned char *dest, unsigned int dest_pitch, unsigned int dest_width); -#define vp8_vertical_band_2_1_scale_i vp8_vertical_band_2_1_scale_i_c - -void vp8_vertical_band_5_3_scale_c(unsigned char *source, unsigned int src_pitch, unsigned char *dest, unsigned int dest_pitch, unsigned int dest_width); -#define vp8_vertical_band_5_3_scale vp8_vertical_band_5_3_scale_c - -void vp8_vertical_band_5_4_scale_c(unsigned char *source, unsigned int src_pitch, unsigned char *dest, unsigned int dest_pitch, unsigned int dest_width); -#define vp8_vertical_band_5_4_scale vp8_vertical_band_5_4_scale_c - -void vp8_yv12_copy_frame_c(const struct yv12_buffer_config *src_ybc, struct yv12_buffer_config *dst_ybc); -#define vp8_yv12_copy_frame vp8_yv12_copy_frame_c - -void vp8_yv12_extend_frame_borders_c(struct yv12_buffer_config *ybf); -#define vp8_yv12_extend_frame_borders vp8_yv12_extend_frame_borders_c - -void vpx_extend_frame_borders_c(struct yv12_buffer_config *ybf); -#define vpx_extend_frame_borders vpx_extend_frame_borders_c - -void vpx_extend_frame_inner_borders_c(struct yv12_buffer_config *ybf); -#define vpx_extend_frame_inner_borders vpx_extend_frame_inner_borders_c - -void vpx_yv12_copy_y_c(const struct yv12_buffer_config *src_ybc, struct yv12_buffer_config *dst_ybc); -#define vpx_yv12_copy_y vpx_yv12_copy_y_c - -void vpx_scale_rtcd(void); - -#ifdef RTCD_C -#include "vpx_ports/x86.h" -static void setup_rtcd_internal(void) -{ - int flags = x86_simd_caps(); - - (void)flags; - -} -#endif - -#ifdef __cplusplus -} // extern "C" -#endif - -#endif diff --git a/WebRtc.NET/include/third_party/libvpx/source/config/linux/mips64el/vp8_rtcd.h b/WebRtc.NET/include/third_party/libvpx/source/config/linux/mips64el/vp8_rtcd.h deleted file mode 100644 index 650bd323..00000000 --- a/WebRtc.NET/include/third_party/libvpx/source/config/linux/mips64el/vp8_rtcd.h +++ /dev/null @@ -1,181 +0,0 @@ -#ifndef VP8_RTCD_H_ -#define VP8_RTCD_H_ - -#ifdef RTCD_C -#define RTCD_EXTERN -#else -#define RTCD_EXTERN extern -#endif - -/* - * VP8 - */ - -struct blockd; -struct macroblockd; -struct loop_filter_info; - -/* Encoder forward decls */ -struct block; -struct macroblock; -struct variance_vtable; -union int_mv; -struct yv12_buffer_config; - -#ifdef __cplusplus -extern "C" { -#endif - -void vp8_bilinear_predict16x16_c(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch); -#define vp8_bilinear_predict16x16 vp8_bilinear_predict16x16_c - -void vp8_bilinear_predict4x4_c(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch); -#define vp8_bilinear_predict4x4 vp8_bilinear_predict4x4_c - -void vp8_bilinear_predict8x4_c(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch); -#define vp8_bilinear_predict8x4 vp8_bilinear_predict8x4_c - -void vp8_bilinear_predict8x8_c(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch); -#define vp8_bilinear_predict8x8 vp8_bilinear_predict8x8_c - -void vp8_blend_b_c(unsigned char *y, unsigned char *u, unsigned char *v, int y1, int u1, int v1, int alpha, int stride); -#define vp8_blend_b vp8_blend_b_c - -void vp8_blend_mb_inner_c(unsigned char *y, unsigned char *u, unsigned char *v, int y1, int u1, int v1, int alpha, int stride); -#define vp8_blend_mb_inner vp8_blend_mb_inner_c - -void vp8_blend_mb_outer_c(unsigned char *y, unsigned char *u, unsigned char *v, int y1, int u1, int v1, int alpha, int stride); -#define vp8_blend_mb_outer vp8_blend_mb_outer_c - -int vp8_block_error_c(short *coeff, short *dqcoeff); -#define vp8_block_error vp8_block_error_c - -void vp8_copy_mem16x16_c(unsigned char *src, int src_pitch, unsigned char *dst, int dst_pitch); -#define vp8_copy_mem16x16 vp8_copy_mem16x16_c - -void vp8_copy_mem8x4_c(unsigned char *src, int src_pitch, unsigned char *dst, int dst_pitch); -#define vp8_copy_mem8x4 vp8_copy_mem8x4_c - -void vp8_copy_mem8x8_c(unsigned char *src, int src_pitch, unsigned char *dst, int dst_pitch); -#define vp8_copy_mem8x8 vp8_copy_mem8x8_c - -void vp8_dc_only_idct_add_c(short input, unsigned char *pred, int pred_stride, unsigned char *dst, int dst_stride); -#define vp8_dc_only_idct_add vp8_dc_only_idct_add_c - -int vp8_denoiser_filter_c(unsigned char *mc_running_avg_y, int mc_avg_y_stride, unsigned char *running_avg_y, int avg_y_stride, unsigned char *sig, int sig_stride, unsigned int motion_magnitude, int increase_denoising); -#define vp8_denoiser_filter vp8_denoiser_filter_c - -int vp8_denoiser_filter_uv_c(unsigned char *mc_running_avg, int mc_avg_stride, unsigned char *running_avg, int avg_stride, unsigned char *sig, int sig_stride, unsigned int motion_magnitude, int increase_denoising); -#define vp8_denoiser_filter_uv vp8_denoiser_filter_uv_c - -void vp8_dequant_idct_add_c(short *input, short *dq, unsigned char *output, int stride); -#define vp8_dequant_idct_add vp8_dequant_idct_add_c - -void vp8_dequant_idct_add_uv_block_c(short *q, short *dq, unsigned char *dst_u, unsigned char *dst_v, int stride, char *eobs); -#define vp8_dequant_idct_add_uv_block vp8_dequant_idct_add_uv_block_c - -void vp8_dequant_idct_add_y_block_c(short *q, short *dq, unsigned char *dst, int stride, char *eobs); -#define vp8_dequant_idct_add_y_block vp8_dequant_idct_add_y_block_c - -void vp8_dequantize_b_c(struct blockd*, short *dqc); -#define vp8_dequantize_b vp8_dequantize_b_c - -int vp8_diamond_search_sad_c(struct macroblock *x, struct block *b, struct blockd *d, union int_mv *ref_mv, union int_mv *best_mv, int search_param, int sad_per_bit, int *num00, struct variance_vtable *fn_ptr, int *mvcost[2], union int_mv *center_mv); -#define vp8_diamond_search_sad vp8_diamond_search_sad_c - -void vp8_fast_quantize_b_c(struct block *, struct blockd *); -#define vp8_fast_quantize_b vp8_fast_quantize_b_c - -void vp8_filter_by_weight16x16_c(unsigned char *src, int src_stride, unsigned char *dst, int dst_stride, int src_weight); -#define vp8_filter_by_weight16x16 vp8_filter_by_weight16x16_c - -void vp8_filter_by_weight4x4_c(unsigned char *src, int src_stride, unsigned char *dst, int dst_stride, int src_weight); -#define vp8_filter_by_weight4x4 vp8_filter_by_weight4x4_c - -void vp8_filter_by_weight8x8_c(unsigned char *src, int src_stride, unsigned char *dst, int dst_stride, int src_weight); -#define vp8_filter_by_weight8x8 vp8_filter_by_weight8x8_c - -int vp8_full_search_sad_c(struct macroblock *x, struct block *b, struct blockd *d, union int_mv *ref_mv, int sad_per_bit, int distance, struct variance_vtable *fn_ptr, int *mvcost[2], union int_mv *center_mv); -#define vp8_full_search_sad vp8_full_search_sad_c - -void vp8_loop_filter_bh_c(unsigned char *y, unsigned char *u, unsigned char *v, int ystride, int uv_stride, struct loop_filter_info *lfi); -#define vp8_loop_filter_bh vp8_loop_filter_bh_c - -void vp8_loop_filter_bv_c(unsigned char *y, unsigned char *u, unsigned char *v, int ystride, int uv_stride, struct loop_filter_info *lfi); -#define vp8_loop_filter_bv vp8_loop_filter_bv_c - -void vp8_loop_filter_mbh_c(unsigned char *y, unsigned char *u, unsigned char *v, int ystride, int uv_stride, struct loop_filter_info *lfi); -#define vp8_loop_filter_mbh vp8_loop_filter_mbh_c - -void vp8_loop_filter_mbv_c(unsigned char *y, unsigned char *u, unsigned char *v, int ystride, int uv_stride, struct loop_filter_info *lfi); -#define vp8_loop_filter_mbv vp8_loop_filter_mbv_c - -void vp8_loop_filter_bhs_c(unsigned char *y, int ystride, const unsigned char *blimit); -#define vp8_loop_filter_simple_bh vp8_loop_filter_bhs_c - -void vp8_loop_filter_bvs_c(unsigned char *y, int ystride, const unsigned char *blimit); -#define vp8_loop_filter_simple_bv vp8_loop_filter_bvs_c - -void vp8_loop_filter_simple_horizontal_edge_c(unsigned char *y, int ystride, const unsigned char *blimit); -#define vp8_loop_filter_simple_mbh vp8_loop_filter_simple_horizontal_edge_c - -void vp8_loop_filter_simple_vertical_edge_c(unsigned char *y, int ystride, const unsigned char *blimit); -#define vp8_loop_filter_simple_mbv vp8_loop_filter_simple_vertical_edge_c - -int vp8_mbblock_error_c(struct macroblock *mb, int dc); -#define vp8_mbblock_error vp8_mbblock_error_c - -int vp8_mbuverror_c(struct macroblock *mb); -#define vp8_mbuverror vp8_mbuverror_c - -int vp8_refining_search_sad_c(struct macroblock *x, struct block *b, struct blockd *d, union int_mv *ref_mv, int sad_per_bit, int distance, struct variance_vtable *fn_ptr, int *mvcost[2], union int_mv *center_mv); -#define vp8_refining_search_sad vp8_refining_search_sad_c - -void vp8_regular_quantize_b_c(struct block *, struct blockd *); -#define vp8_regular_quantize_b vp8_regular_quantize_b_c - -void vp8_short_fdct4x4_c(short *input, short *output, int pitch); -#define vp8_short_fdct4x4 vp8_short_fdct4x4_c - -void vp8_short_fdct8x4_c(short *input, short *output, int pitch); -#define vp8_short_fdct8x4 vp8_short_fdct8x4_c - -void vp8_short_idct4x4llm_c(short *input, unsigned char *pred, int pitch, unsigned char *dst, int dst_stride); -#define vp8_short_idct4x4llm vp8_short_idct4x4llm_c - -void vp8_short_inv_walsh4x4_c(short *input, short *output); -#define vp8_short_inv_walsh4x4 vp8_short_inv_walsh4x4_c - -void vp8_short_inv_walsh4x4_1_c(short *input, short *output); -#define vp8_short_inv_walsh4x4_1 vp8_short_inv_walsh4x4_1_c - -void vp8_short_walsh4x4_c(short *input, short *output, int pitch); -#define vp8_short_walsh4x4 vp8_short_walsh4x4_c - -void vp8_sixtap_predict16x16_c(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch); -#define vp8_sixtap_predict16x16 vp8_sixtap_predict16x16_c - -void vp8_sixtap_predict4x4_c(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch); -#define vp8_sixtap_predict4x4 vp8_sixtap_predict4x4_c - -void vp8_sixtap_predict8x4_c(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch); -#define vp8_sixtap_predict8x4 vp8_sixtap_predict8x4_c - -void vp8_sixtap_predict8x8_c(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch); -#define vp8_sixtap_predict8x8 vp8_sixtap_predict8x8_c - -void vp8_rtcd(void); - -#include "vpx_config.h" - -#ifdef RTCD_C -static void setup_rtcd_internal(void) -{ -} -#endif - -#ifdef __cplusplus -} // extern "C" -#endif - -#endif diff --git a/WebRtc.NET/include/third_party/libvpx/source/config/linux/mips64el/vp9_rtcd.h b/WebRtc.NET/include/third_party/libvpx/source/config/linux/mips64el/vp9_rtcd.h deleted file mode 100644 index 403db512..00000000 --- a/WebRtc.NET/include/third_party/libvpx/source/config/linux/mips64el/vp9_rtcd.h +++ /dev/null @@ -1,103 +0,0 @@ -#ifndef VP9_RTCD_H_ -#define VP9_RTCD_H_ - -#ifdef RTCD_C -#define RTCD_EXTERN -#else -#define RTCD_EXTERN extern -#endif - -/* - * VP9 - */ - -#include "vpx/vpx_integer.h" -#include "vp9/common/vp9_common.h" -#include "vp9/common/vp9_enums.h" - -struct macroblockd; - -/* Encoder forward decls */ -struct macroblock; -struct vp9_variance_vtable; -struct search_site_config; -struct mv; -union int_mv; -struct yv12_buffer_config; - -#ifdef __cplusplus -extern "C" { -#endif - -int64_t vp9_block_error_c(const tran_low_t *coeff, const tran_low_t *dqcoeff, intptr_t block_size, int64_t *ssz); -#define vp9_block_error vp9_block_error_c - -int64_t vp9_block_error_fp_c(const int16_t *coeff, const int16_t *dqcoeff, int block_size); -#define vp9_block_error_fp vp9_block_error_fp_c - -int vp9_denoiser_filter_c(const uint8_t *sig, int sig_stride, const uint8_t *mc_avg, int mc_avg_stride, uint8_t *avg, int avg_stride, int increase_denoising, BLOCK_SIZE bs, int motion_magnitude); -#define vp9_denoiser_filter vp9_denoiser_filter_c - -int vp9_diamond_search_sad_c(const struct macroblock *x, const struct search_site_config *cfg, struct mv *ref_mv, struct mv *best_mv, int search_param, int sad_per_bit, int *num00, const struct vp9_variance_vtable *fn_ptr, const struct mv *center_mv); -#define vp9_diamond_search_sad vp9_diamond_search_sad_c - -void vp9_fdct8x8_quant_c(const int16_t *input, int stride, tran_low_t *coeff_ptr, intptr_t n_coeffs, int skip_block, const int16_t *zbin_ptr, const int16_t *round_ptr, const int16_t *quant_ptr, const int16_t *quant_shift_ptr, tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr, const int16_t *dequant_ptr, uint16_t *eob_ptr, const int16_t *scan, const int16_t *iscan); -#define vp9_fdct8x8_quant vp9_fdct8x8_quant_c - -void vp9_fht16x16_c(const int16_t *input, tran_low_t *output, int stride, int tx_type); -#define vp9_fht16x16 vp9_fht16x16_c - -void vp9_fht4x4_c(const int16_t *input, tran_low_t *output, int stride, int tx_type); -#define vp9_fht4x4 vp9_fht4x4_c - -void vp9_fht8x8_c(const int16_t *input, tran_low_t *output, int stride, int tx_type); -#define vp9_fht8x8 vp9_fht8x8_c - -void vp9_filter_by_weight16x16_c(const uint8_t *src, int src_stride, uint8_t *dst, int dst_stride, int src_weight); -#define vp9_filter_by_weight16x16 vp9_filter_by_weight16x16_c - -void vp9_filter_by_weight8x8_c(const uint8_t *src, int src_stride, uint8_t *dst, int dst_stride, int src_weight); -#define vp9_filter_by_weight8x8 vp9_filter_by_weight8x8_c - -int vp9_full_search_sad_c(const struct macroblock *x, const struct mv *ref_mv, int sad_per_bit, int distance, const struct vp9_variance_vtable *fn_ptr, const struct mv *center_mv, struct mv *best_mv); -#define vp9_full_search_sad vp9_full_search_sad_c - -void vp9_fwht4x4_c(const int16_t *input, tran_low_t *output, int stride); -#define vp9_fwht4x4 vp9_fwht4x4_c - -void vp9_iht16x16_256_add_c(const tran_low_t *input, uint8_t *output, int pitch, int tx_type); -#define vp9_iht16x16_256_add vp9_iht16x16_256_add_c - -void vp9_iht4x4_16_add_c(const tran_low_t *input, uint8_t *dest, int stride, int tx_type); -#define vp9_iht4x4_16_add vp9_iht4x4_16_add_c - -void vp9_iht8x8_64_add_c(const tran_low_t *input, uint8_t *dest, int stride, int tx_type); -#define vp9_iht8x8_64_add vp9_iht8x8_64_add_c - -void vp9_quantize_fp_c(const tran_low_t *coeff_ptr, intptr_t n_coeffs, int skip_block, const int16_t *zbin_ptr, const int16_t *round_ptr, const int16_t *quant_ptr, const int16_t *quant_shift_ptr, tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr, const int16_t *dequant_ptr, uint16_t *eob_ptr, const int16_t *scan, const int16_t *iscan); -#define vp9_quantize_fp vp9_quantize_fp_c - -void vp9_quantize_fp_32x32_c(const tran_low_t *coeff_ptr, intptr_t n_coeffs, int skip_block, const int16_t *zbin_ptr, const int16_t *round_ptr, const int16_t *quant_ptr, const int16_t *quant_shift_ptr, tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr, const int16_t *dequant_ptr, uint16_t *eob_ptr, const int16_t *scan, const int16_t *iscan); -#define vp9_quantize_fp_32x32 vp9_quantize_fp_32x32_c - -void vp9_scale_and_extend_frame_c(const struct yv12_buffer_config *src, struct yv12_buffer_config *dst); -#define vp9_scale_and_extend_frame vp9_scale_and_extend_frame_c - -void vp9_temporal_filter_apply_c(uint8_t *frame1, unsigned int stride, uint8_t *frame2, unsigned int block_width, unsigned int block_height, int strength, int filter_weight, unsigned int *accumulator, uint16_t *count); -#define vp9_temporal_filter_apply vp9_temporal_filter_apply_c - -void vp9_rtcd(void); - -#include "vpx_config.h" - -#ifdef RTCD_C -static void setup_rtcd_internal(void) -{ -} -#endif - -#ifdef __cplusplus -} // extern "C" -#endif - -#endif diff --git a/WebRtc.NET/include/third_party/libvpx/source/config/linux/mips64el/vpx_config.h b/WebRtc.NET/include/third_party/libvpx/source/config/linux/mips64el/vpx_config.h deleted file mode 100644 index f9071f94..00000000 --- a/WebRtc.NET/include/third_party/libvpx/source/config/linux/mips64el/vpx_config.h +++ /dev/null @@ -1,94 +0,0 @@ -/* Copyright (c) 2011 The WebM project authors. All Rights Reserved. */ -/* */ -/* Use of this source code is governed by a BSD-style license */ -/* that can be found in the LICENSE file in the root of the source */ -/* tree. An additional intellectual property rights grant can be found */ -/* in the file PATENTS. All contributing project authors may */ -/* be found in the AUTHORS file in the root of the source tree. */ -/* This file automatically generated by configure. Do not edit! */ -#ifndef VPX_CONFIG_H -#define VPX_CONFIG_H -#define RESTRICT -#define INLINE inline -#define ARCH_ARM 0 -#define ARCH_MIPS 1 -#define ARCH_X86 0 -#define ARCH_X86_64 0 -#define HAVE_NEON 0 -#define HAVE_NEON_ASM 0 -#define HAVE_MIPS32 0 -#define HAVE_DSPR2 0 -#define HAVE_MSA 0 -#define HAVE_MIPS64 1 -#define HAVE_MMX 0 -#define HAVE_SSE 0 -#define HAVE_SSE2 0 -#define HAVE_SSE3 0 -#define HAVE_SSSE3 0 -#define HAVE_SSE4_1 0 -#define HAVE_AVX 0 -#define HAVE_AVX2 0 -#define HAVE_VPX_PORTS 1 -#define HAVE_PTHREAD_H 1 -#define HAVE_UNISTD_H 0 -#define CONFIG_DEPENDENCY_TRACKING 1 -#define CONFIG_EXTERNAL_BUILD 1 -#define CONFIG_INSTALL_DOCS 0 -#define CONFIG_INSTALL_BINS 1 -#define CONFIG_INSTALL_LIBS 1 -#define CONFIG_INSTALL_SRCS 0 -#define CONFIG_DEBUG 0 -#define CONFIG_GPROF 0 -#define CONFIG_GCOV 0 -#define CONFIG_RVCT 0 -#define CONFIG_GCC 1 -#define CONFIG_MSVS 0 -#define CONFIG_PIC 0 -#define CONFIG_BIG_ENDIAN 0 -#define CONFIG_CODEC_SRCS 0 -#define CONFIG_DEBUG_LIBS 0 -#define CONFIG_DEQUANT_TOKENS 1 -#define CONFIG_DC_RECON 1 -#define CONFIG_RUNTIME_CPU_DETECT 0 -#define CONFIG_POSTPROC 1 -#define CONFIG_VP9_POSTPROC 1 -#define CONFIG_MULTITHREAD 1 -#define CONFIG_INTERNAL_STATS 0 -#define CONFIG_VP8_ENCODER 1 -#define CONFIG_VP8_DECODER 1 -#define CONFIG_VP9_ENCODER 1 -#define CONFIG_VP9_DECODER 1 -#define CONFIG_VP8 1 -#define CONFIG_VP9 1 -#define CONFIG_ENCODERS 1 -#define CONFIG_DECODERS 1 -#define CONFIG_STATIC_MSVCRT 0 -#define CONFIG_SPATIAL_RESAMPLING 1 -#define CONFIG_REALTIME_ONLY 1 -#define CONFIG_ONTHEFLY_BITPACKING 0 -#define CONFIG_ERROR_CONCEALMENT 0 -#define CONFIG_SHARED 0 -#define CONFIG_STATIC 1 -#define CONFIG_SMALL 0 -#define CONFIG_POSTPROC_VISUALIZER 0 -#define CONFIG_OS_SUPPORT 1 -#define CONFIG_UNIT_TESTS 1 -#define CONFIG_WEBM_IO 1 -#define CONFIG_LIBYUV 1 -#define CONFIG_DECODE_PERF_TESTS 0 -#define CONFIG_ENCODE_PERF_TESTS 0 -#define CONFIG_MULTI_RES_ENCODING 1 -#define CONFIG_TEMPORAL_DENOISING 1 -#define CONFIG_VP9_TEMPORAL_DENOISING 1 -#define CONFIG_COEFFICIENT_RANGE_CHECKING 0 -#define CONFIG_VP9_HIGHBITDEPTH 0 -#define CONFIG_BETTER_HW_COMPATIBILITY 0 -#define CONFIG_EXPERIMENTAL 0 -#define CONFIG_SIZE_LIMIT 1 -#define CONFIG_SPATIAL_SVC 0 -#define CONFIG_FP_MB_STATS 0 -#define CONFIG_EMULATE_HARDWARE 0 -#define CONFIG_MISC_FIXES 0 -#define DECODE_WIDTH_LIMIT 16384 -#define DECODE_HEIGHT_LIMIT 16384 -#endif /* VPX_CONFIG_H */ diff --git a/WebRtc.NET/include/third_party/libvpx/source/config/linux/mips64el/vpx_dsp_rtcd.h b/WebRtc.NET/include/third_party/libvpx/source/config/linux/mips64el/vpx_dsp_rtcd.h deleted file mode 100644 index 8a27f964..00000000 --- a/WebRtc.NET/include/third_party/libvpx/source/config/linux/mips64el/vpx_dsp_rtcd.h +++ /dev/null @@ -1,744 +0,0 @@ -#ifndef VPX_DSP_RTCD_H_ -#define VPX_DSP_RTCD_H_ - -#ifdef RTCD_C -#define RTCD_EXTERN -#else -#define RTCD_EXTERN extern -#endif - -/* - * DSP - */ - -#include "vpx/vpx_integer.h" -#include "vpx_dsp/vpx_dsp_common.h" - - -#ifdef __cplusplus -extern "C" { -#endif - -unsigned int vpx_avg_4x4_c(const uint8_t *, int p); -#define vpx_avg_4x4 vpx_avg_4x4_c - -unsigned int vpx_avg_8x8_c(const uint8_t *, int p); -#define vpx_avg_8x8 vpx_avg_8x8_c - -void vpx_comp_avg_pred_c(uint8_t *comp_pred, const uint8_t *pred, int width, int height, const uint8_t *ref, int ref_stride); -#define vpx_comp_avg_pred vpx_comp_avg_pred_c - -void vpx_convolve8_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -#define vpx_convolve8 vpx_convolve8_c - -void vpx_convolve8_avg_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -#define vpx_convolve8_avg vpx_convolve8_avg_c - -void vpx_convolve8_avg_horiz_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -#define vpx_convolve8_avg_horiz vpx_convolve8_avg_horiz_c - -void vpx_convolve8_avg_vert_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -#define vpx_convolve8_avg_vert vpx_convolve8_avg_vert_c - -void vpx_convolve8_horiz_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -#define vpx_convolve8_horiz vpx_convolve8_horiz_c - -void vpx_convolve8_vert_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -#define vpx_convolve8_vert vpx_convolve8_vert_c - -void vpx_convolve_avg_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -#define vpx_convolve_avg vpx_convolve_avg_c - -void vpx_convolve_copy_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -#define vpx_convolve_copy vpx_convolve_copy_c - -void vpx_d117_predictor_16x16_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d117_predictor_16x16 vpx_d117_predictor_16x16_c - -void vpx_d117_predictor_32x32_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d117_predictor_32x32 vpx_d117_predictor_32x32_c - -void vpx_d117_predictor_4x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d117_predictor_4x4 vpx_d117_predictor_4x4_c - -void vpx_d117_predictor_8x8_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d117_predictor_8x8 vpx_d117_predictor_8x8_c - -void vpx_d135_predictor_16x16_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d135_predictor_16x16 vpx_d135_predictor_16x16_c - -void vpx_d135_predictor_32x32_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d135_predictor_32x32 vpx_d135_predictor_32x32_c - -void vpx_d135_predictor_4x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d135_predictor_4x4 vpx_d135_predictor_4x4_c - -void vpx_d135_predictor_8x8_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d135_predictor_8x8 vpx_d135_predictor_8x8_c - -void vpx_d153_predictor_16x16_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d153_predictor_16x16 vpx_d153_predictor_16x16_c - -void vpx_d153_predictor_32x32_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d153_predictor_32x32 vpx_d153_predictor_32x32_c - -void vpx_d153_predictor_4x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d153_predictor_4x4 vpx_d153_predictor_4x4_c - -void vpx_d153_predictor_8x8_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d153_predictor_8x8 vpx_d153_predictor_8x8_c - -void vpx_d207_predictor_16x16_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d207_predictor_16x16 vpx_d207_predictor_16x16_c - -void vpx_d207_predictor_32x32_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d207_predictor_32x32 vpx_d207_predictor_32x32_c - -void vpx_d207_predictor_4x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d207_predictor_4x4 vpx_d207_predictor_4x4_c - -void vpx_d207_predictor_8x8_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d207_predictor_8x8 vpx_d207_predictor_8x8_c - -void vpx_d207e_predictor_16x16_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d207e_predictor_16x16 vpx_d207e_predictor_16x16_c - -void vpx_d207e_predictor_32x32_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d207e_predictor_32x32 vpx_d207e_predictor_32x32_c - -void vpx_d207e_predictor_4x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d207e_predictor_4x4 vpx_d207e_predictor_4x4_c - -void vpx_d207e_predictor_8x8_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d207e_predictor_8x8 vpx_d207e_predictor_8x8_c - -void vpx_d45_predictor_16x16_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d45_predictor_16x16 vpx_d45_predictor_16x16_c - -void vpx_d45_predictor_32x32_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d45_predictor_32x32 vpx_d45_predictor_32x32_c - -void vpx_d45_predictor_4x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d45_predictor_4x4 vpx_d45_predictor_4x4_c - -void vpx_d45_predictor_8x8_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d45_predictor_8x8 vpx_d45_predictor_8x8_c - -void vpx_d45e_predictor_16x16_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d45e_predictor_16x16 vpx_d45e_predictor_16x16_c - -void vpx_d45e_predictor_32x32_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d45e_predictor_32x32 vpx_d45e_predictor_32x32_c - -void vpx_d45e_predictor_4x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d45e_predictor_4x4 vpx_d45e_predictor_4x4_c - -void vpx_d45e_predictor_8x8_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d45e_predictor_8x8 vpx_d45e_predictor_8x8_c - -void vpx_d63_predictor_16x16_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d63_predictor_16x16 vpx_d63_predictor_16x16_c - -void vpx_d63_predictor_32x32_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d63_predictor_32x32 vpx_d63_predictor_32x32_c - -void vpx_d63_predictor_4x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d63_predictor_4x4 vpx_d63_predictor_4x4_c - -void vpx_d63_predictor_8x8_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d63_predictor_8x8 vpx_d63_predictor_8x8_c - -void vpx_d63e_predictor_16x16_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d63e_predictor_16x16 vpx_d63e_predictor_16x16_c - -void vpx_d63e_predictor_32x32_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d63e_predictor_32x32 vpx_d63e_predictor_32x32_c - -void vpx_d63e_predictor_4x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d63e_predictor_4x4 vpx_d63e_predictor_4x4_c - -void vpx_d63e_predictor_8x8_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d63e_predictor_8x8 vpx_d63e_predictor_8x8_c - -void vpx_d63f_predictor_4x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d63f_predictor_4x4 vpx_d63f_predictor_4x4_c - -void vpx_dc_128_predictor_16x16_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_dc_128_predictor_16x16 vpx_dc_128_predictor_16x16_c - -void vpx_dc_128_predictor_32x32_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_dc_128_predictor_32x32 vpx_dc_128_predictor_32x32_c - -void vpx_dc_128_predictor_4x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_dc_128_predictor_4x4 vpx_dc_128_predictor_4x4_c - -void vpx_dc_128_predictor_8x8_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_dc_128_predictor_8x8 vpx_dc_128_predictor_8x8_c - -void vpx_dc_left_predictor_16x16_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_dc_left_predictor_16x16 vpx_dc_left_predictor_16x16_c - -void vpx_dc_left_predictor_32x32_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_dc_left_predictor_32x32 vpx_dc_left_predictor_32x32_c - -void vpx_dc_left_predictor_4x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_dc_left_predictor_4x4 vpx_dc_left_predictor_4x4_c - -void vpx_dc_left_predictor_8x8_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_dc_left_predictor_8x8 vpx_dc_left_predictor_8x8_c - -void vpx_dc_predictor_16x16_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_dc_predictor_16x16 vpx_dc_predictor_16x16_c - -void vpx_dc_predictor_32x32_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_dc_predictor_32x32 vpx_dc_predictor_32x32_c - -void vpx_dc_predictor_4x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_dc_predictor_4x4 vpx_dc_predictor_4x4_c - -void vpx_dc_predictor_8x8_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_dc_predictor_8x8 vpx_dc_predictor_8x8_c - -void vpx_dc_top_predictor_16x16_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_dc_top_predictor_16x16 vpx_dc_top_predictor_16x16_c - -void vpx_dc_top_predictor_32x32_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_dc_top_predictor_32x32 vpx_dc_top_predictor_32x32_c - -void vpx_dc_top_predictor_4x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_dc_top_predictor_4x4 vpx_dc_top_predictor_4x4_c - -void vpx_dc_top_predictor_8x8_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_dc_top_predictor_8x8 vpx_dc_top_predictor_8x8_c - -void vpx_fdct16x16_c(const int16_t *input, tran_low_t *output, int stride); -#define vpx_fdct16x16 vpx_fdct16x16_c - -void vpx_fdct16x16_1_c(const int16_t *input, tran_low_t *output, int stride); -#define vpx_fdct16x16_1 vpx_fdct16x16_1_c - -void vpx_fdct32x32_c(const int16_t *input, tran_low_t *output, int stride); -#define vpx_fdct32x32 vpx_fdct32x32_c - -void vpx_fdct32x32_1_c(const int16_t *input, tran_low_t *output, int stride); -#define vpx_fdct32x32_1 vpx_fdct32x32_1_c - -void vpx_fdct32x32_rd_c(const int16_t *input, tran_low_t *output, int stride); -#define vpx_fdct32x32_rd vpx_fdct32x32_rd_c - -void vpx_fdct4x4_c(const int16_t *input, tran_low_t *output, int stride); -#define vpx_fdct4x4 vpx_fdct4x4_c - -void vpx_fdct4x4_1_c(const int16_t *input, tran_low_t *output, int stride); -#define vpx_fdct4x4_1 vpx_fdct4x4_1_c - -void vpx_fdct8x8_c(const int16_t *input, tran_low_t *output, int stride); -#define vpx_fdct8x8 vpx_fdct8x8_c - -void vpx_fdct8x8_1_c(const int16_t *input, tran_low_t *output, int stride); -#define vpx_fdct8x8_1 vpx_fdct8x8_1_c - -void vpx_get16x16var_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse, int *sum); -#define vpx_get16x16var vpx_get16x16var_c - -unsigned int vpx_get4x4sse_cs_c(const unsigned char *src_ptr, int source_stride, const unsigned char *ref_ptr, int ref_stride); -#define vpx_get4x4sse_cs vpx_get4x4sse_cs_c - -void vpx_get8x8var_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse, int *sum); -#define vpx_get8x8var vpx_get8x8var_c - -unsigned int vpx_get_mb_ss_c(const int16_t *); -#define vpx_get_mb_ss vpx_get_mb_ss_c - -void vpx_h_predictor_16x16_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_h_predictor_16x16 vpx_h_predictor_16x16_c - -void vpx_h_predictor_32x32_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_h_predictor_32x32 vpx_h_predictor_32x32_c - -void vpx_h_predictor_4x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_h_predictor_4x4 vpx_h_predictor_4x4_c - -void vpx_h_predictor_8x8_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_h_predictor_8x8 vpx_h_predictor_8x8_c - -void vpx_hadamard_16x16_c(const int16_t *src_diff, int src_stride, int16_t *coeff); -#define vpx_hadamard_16x16 vpx_hadamard_16x16_c - -void vpx_hadamard_8x8_c(const int16_t *src_diff, int src_stride, int16_t *coeff); -#define vpx_hadamard_8x8 vpx_hadamard_8x8_c - -void vpx_he_predictor_4x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_he_predictor_4x4 vpx_he_predictor_4x4_c - -void vpx_idct16x16_10_add_c(const tran_low_t *input, uint8_t *dest, int stride); -#define vpx_idct16x16_10_add vpx_idct16x16_10_add_c - -void vpx_idct16x16_1_add_c(const tran_low_t *input, uint8_t *dest, int stride); -#define vpx_idct16x16_1_add vpx_idct16x16_1_add_c - -void vpx_idct16x16_256_add_c(const tran_low_t *input, uint8_t *dest, int stride); -#define vpx_idct16x16_256_add vpx_idct16x16_256_add_c - -void vpx_idct32x32_1024_add_c(const tran_low_t *input, uint8_t *dest, int stride); -#define vpx_idct32x32_1024_add vpx_idct32x32_1024_add_c - -void vpx_idct32x32_135_add_c(const tran_low_t *input, uint8_t *dest, int stride); -#define vpx_idct32x32_135_add vpx_idct32x32_135_add_c - -void vpx_idct32x32_1_add_c(const tran_low_t *input, uint8_t *dest, int stride); -#define vpx_idct32x32_1_add vpx_idct32x32_1_add_c - -void vpx_idct32x32_34_add_c(const tran_low_t *input, uint8_t *dest, int stride); -#define vpx_idct32x32_34_add vpx_idct32x32_34_add_c - -void vpx_idct4x4_16_add_c(const tran_low_t *input, uint8_t *dest, int stride); -#define vpx_idct4x4_16_add vpx_idct4x4_16_add_c - -void vpx_idct4x4_1_add_c(const tran_low_t *input, uint8_t *dest, int stride); -#define vpx_idct4x4_1_add vpx_idct4x4_1_add_c - -void vpx_idct8x8_12_add_c(const tran_low_t *input, uint8_t *dest, int stride); -#define vpx_idct8x8_12_add vpx_idct8x8_12_add_c - -void vpx_idct8x8_1_add_c(const tran_low_t *input, uint8_t *dest, int stride); -#define vpx_idct8x8_1_add vpx_idct8x8_1_add_c - -void vpx_idct8x8_64_add_c(const tran_low_t *input, uint8_t *dest, int stride); -#define vpx_idct8x8_64_add vpx_idct8x8_64_add_c - -int16_t vpx_int_pro_col_c(const uint8_t *ref, const int width); -#define vpx_int_pro_col vpx_int_pro_col_c - -void vpx_int_pro_row_c(int16_t *hbuf, const uint8_t *ref, const int ref_stride, const int height); -#define vpx_int_pro_row vpx_int_pro_row_c - -void vpx_iwht4x4_16_add_c(const tran_low_t *input, uint8_t *dest, int stride); -#define vpx_iwht4x4_16_add vpx_iwht4x4_16_add_c - -void vpx_iwht4x4_1_add_c(const tran_low_t *input, uint8_t *dest, int stride); -#define vpx_iwht4x4_1_add vpx_iwht4x4_1_add_c - -void vpx_lpf_horizontal_16_c(uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh); -#define vpx_lpf_horizontal_16 vpx_lpf_horizontal_16_c - -void vpx_lpf_horizontal_16_dual_c(uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh); -#define vpx_lpf_horizontal_16_dual vpx_lpf_horizontal_16_dual_c - -void vpx_lpf_horizontal_4_c(uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh); -#define vpx_lpf_horizontal_4 vpx_lpf_horizontal_4_c - -void vpx_lpf_horizontal_4_dual_c(uint8_t *s, int pitch, const uint8_t *blimit0, const uint8_t *limit0, const uint8_t *thresh0, const uint8_t *blimit1, const uint8_t *limit1, const uint8_t *thresh1); -#define vpx_lpf_horizontal_4_dual vpx_lpf_horizontal_4_dual_c - -void vpx_lpf_horizontal_8_c(uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh); -#define vpx_lpf_horizontal_8 vpx_lpf_horizontal_8_c - -void vpx_lpf_horizontal_8_dual_c(uint8_t *s, int pitch, const uint8_t *blimit0, const uint8_t *limit0, const uint8_t *thresh0, const uint8_t *blimit1, const uint8_t *limit1, const uint8_t *thresh1); -#define vpx_lpf_horizontal_8_dual vpx_lpf_horizontal_8_dual_c - -void vpx_lpf_vertical_16_c(uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh); -#define vpx_lpf_vertical_16 vpx_lpf_vertical_16_c - -void vpx_lpf_vertical_16_dual_c(uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh); -#define vpx_lpf_vertical_16_dual vpx_lpf_vertical_16_dual_c - -void vpx_lpf_vertical_4_c(uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh); -#define vpx_lpf_vertical_4 vpx_lpf_vertical_4_c - -void vpx_lpf_vertical_4_dual_c(uint8_t *s, int pitch, const uint8_t *blimit0, const uint8_t *limit0, const uint8_t *thresh0, const uint8_t *blimit1, const uint8_t *limit1, const uint8_t *thresh1); -#define vpx_lpf_vertical_4_dual vpx_lpf_vertical_4_dual_c - -void vpx_lpf_vertical_8_c(uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh); -#define vpx_lpf_vertical_8 vpx_lpf_vertical_8_c - -void vpx_lpf_vertical_8_dual_c(uint8_t *s, int pitch, const uint8_t *blimit0, const uint8_t *limit0, const uint8_t *thresh0, const uint8_t *blimit1, const uint8_t *limit1, const uint8_t *thresh1); -#define vpx_lpf_vertical_8_dual vpx_lpf_vertical_8_dual_c - -void vpx_mbpost_proc_across_ip_c(unsigned char *dst, int pitch, int rows, int cols,int flimit); -#define vpx_mbpost_proc_across_ip vpx_mbpost_proc_across_ip_c - -void vpx_mbpost_proc_down_c(unsigned char *dst, int pitch, int rows, int cols,int flimit); -#define vpx_mbpost_proc_down vpx_mbpost_proc_down_c - -void vpx_minmax_8x8_c(const uint8_t *s, int p, const uint8_t *d, int dp, int *min, int *max); -#define vpx_minmax_8x8 vpx_minmax_8x8_c - -unsigned int vpx_mse16x16_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int recon_stride, unsigned int *sse); -#define vpx_mse16x16 vpx_mse16x16_c - -unsigned int vpx_mse16x8_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int recon_stride, unsigned int *sse); -#define vpx_mse16x8 vpx_mse16x8_c - -unsigned int vpx_mse8x16_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int recon_stride, unsigned int *sse); -#define vpx_mse8x16 vpx_mse8x16_c - -unsigned int vpx_mse8x8_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int recon_stride, unsigned int *sse); -#define vpx_mse8x8 vpx_mse8x8_c - -void vpx_plane_add_noise_c(uint8_t *start, const int8_t *noise, int blackclamp, int whiteclamp, int width, int height, int pitch); -#define vpx_plane_add_noise vpx_plane_add_noise_c - -void vpx_post_proc_down_and_across_mb_row_c(unsigned char *src, unsigned char *dst, int src_pitch, int dst_pitch, int cols, unsigned char *flimits, int size); -#define vpx_post_proc_down_and_across_mb_row vpx_post_proc_down_and_across_mb_row_c - -void vpx_quantize_b_c(const tran_low_t *coeff_ptr, intptr_t n_coeffs, int skip_block, const int16_t *zbin_ptr, const int16_t *round_ptr, const int16_t *quant_ptr, const int16_t *quant_shift_ptr, tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr, const int16_t *dequant_ptr, uint16_t *eob_ptr, const int16_t *scan, const int16_t *iscan); -#define vpx_quantize_b vpx_quantize_b_c - -void vpx_quantize_b_32x32_c(const tran_low_t *coeff_ptr, intptr_t n_coeffs, int skip_block, const int16_t *zbin_ptr, const int16_t *round_ptr, const int16_t *quant_ptr, const int16_t *quant_shift_ptr, tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr, const int16_t *dequant_ptr, uint16_t *eob_ptr, const int16_t *scan, const int16_t *iscan); -#define vpx_quantize_b_32x32 vpx_quantize_b_32x32_c - -unsigned int vpx_sad16x16_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -#define vpx_sad16x16 vpx_sad16x16_c - -unsigned int vpx_sad16x16_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -#define vpx_sad16x16_avg vpx_sad16x16_avg_c - -void vpx_sad16x16x3_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -#define vpx_sad16x16x3 vpx_sad16x16x3_c - -void vpx_sad16x16x4d_c(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); -#define vpx_sad16x16x4d vpx_sad16x16x4d_c - -void vpx_sad16x16x8_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -#define vpx_sad16x16x8 vpx_sad16x16x8_c - -unsigned int vpx_sad16x32_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -#define vpx_sad16x32 vpx_sad16x32_c - -unsigned int vpx_sad16x32_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -#define vpx_sad16x32_avg vpx_sad16x32_avg_c - -void vpx_sad16x32x4d_c(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); -#define vpx_sad16x32x4d vpx_sad16x32x4d_c - -unsigned int vpx_sad16x8_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -#define vpx_sad16x8 vpx_sad16x8_c - -unsigned int vpx_sad16x8_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -#define vpx_sad16x8_avg vpx_sad16x8_avg_c - -void vpx_sad16x8x3_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -#define vpx_sad16x8x3 vpx_sad16x8x3_c - -void vpx_sad16x8x4d_c(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); -#define vpx_sad16x8x4d vpx_sad16x8x4d_c - -void vpx_sad16x8x8_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -#define vpx_sad16x8x8 vpx_sad16x8x8_c - -unsigned int vpx_sad32x16_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -#define vpx_sad32x16 vpx_sad32x16_c - -unsigned int vpx_sad32x16_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -#define vpx_sad32x16_avg vpx_sad32x16_avg_c - -void vpx_sad32x16x4d_c(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); -#define vpx_sad32x16x4d vpx_sad32x16x4d_c - -unsigned int vpx_sad32x32_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -#define vpx_sad32x32 vpx_sad32x32_c - -unsigned int vpx_sad32x32_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -#define vpx_sad32x32_avg vpx_sad32x32_avg_c - -void vpx_sad32x32x3_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -#define vpx_sad32x32x3 vpx_sad32x32x3_c - -void vpx_sad32x32x4d_c(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); -#define vpx_sad32x32x4d vpx_sad32x32x4d_c - -void vpx_sad32x32x8_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -#define vpx_sad32x32x8 vpx_sad32x32x8_c - -unsigned int vpx_sad32x64_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -#define vpx_sad32x64 vpx_sad32x64_c - -unsigned int vpx_sad32x64_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -#define vpx_sad32x64_avg vpx_sad32x64_avg_c - -void vpx_sad32x64x4d_c(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); -#define vpx_sad32x64x4d vpx_sad32x64x4d_c - -unsigned int vpx_sad4x4_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -#define vpx_sad4x4 vpx_sad4x4_c - -unsigned int vpx_sad4x4_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -#define vpx_sad4x4_avg vpx_sad4x4_avg_c - -void vpx_sad4x4x3_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -#define vpx_sad4x4x3 vpx_sad4x4x3_c - -void vpx_sad4x4x4d_c(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); -#define vpx_sad4x4x4d vpx_sad4x4x4d_c - -void vpx_sad4x4x8_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -#define vpx_sad4x4x8 vpx_sad4x4x8_c - -unsigned int vpx_sad4x8_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -#define vpx_sad4x8 vpx_sad4x8_c - -unsigned int vpx_sad4x8_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -#define vpx_sad4x8_avg vpx_sad4x8_avg_c - -void vpx_sad4x8x4d_c(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); -#define vpx_sad4x8x4d vpx_sad4x8x4d_c - -void vpx_sad4x8x8_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -#define vpx_sad4x8x8 vpx_sad4x8x8_c - -unsigned int vpx_sad64x32_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -#define vpx_sad64x32 vpx_sad64x32_c - -unsigned int vpx_sad64x32_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -#define vpx_sad64x32_avg vpx_sad64x32_avg_c - -void vpx_sad64x32x4d_c(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); -#define vpx_sad64x32x4d vpx_sad64x32x4d_c - -unsigned int vpx_sad64x64_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -#define vpx_sad64x64 vpx_sad64x64_c - -unsigned int vpx_sad64x64_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -#define vpx_sad64x64_avg vpx_sad64x64_avg_c - -void vpx_sad64x64x3_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -#define vpx_sad64x64x3 vpx_sad64x64x3_c - -void vpx_sad64x64x4d_c(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); -#define vpx_sad64x64x4d vpx_sad64x64x4d_c - -void vpx_sad64x64x8_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -#define vpx_sad64x64x8 vpx_sad64x64x8_c - -unsigned int vpx_sad8x16_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -#define vpx_sad8x16 vpx_sad8x16_c - -unsigned int vpx_sad8x16_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -#define vpx_sad8x16_avg vpx_sad8x16_avg_c - -void vpx_sad8x16x3_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -#define vpx_sad8x16x3 vpx_sad8x16x3_c - -void vpx_sad8x16x4d_c(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); -#define vpx_sad8x16x4d vpx_sad8x16x4d_c - -void vpx_sad8x16x8_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -#define vpx_sad8x16x8 vpx_sad8x16x8_c - -unsigned int vpx_sad8x4_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -#define vpx_sad8x4 vpx_sad8x4_c - -unsigned int vpx_sad8x4_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -#define vpx_sad8x4_avg vpx_sad8x4_avg_c - -void vpx_sad8x4x4d_c(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); -#define vpx_sad8x4x4d vpx_sad8x4x4d_c - -void vpx_sad8x4x8_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -#define vpx_sad8x4x8 vpx_sad8x4x8_c - -unsigned int vpx_sad8x8_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -#define vpx_sad8x8 vpx_sad8x8_c - -unsigned int vpx_sad8x8_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -#define vpx_sad8x8_avg vpx_sad8x8_avg_c - -void vpx_sad8x8x3_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -#define vpx_sad8x8x3 vpx_sad8x8x3_c - -void vpx_sad8x8x4d_c(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); -#define vpx_sad8x8x4d vpx_sad8x8x4d_c - -void vpx_sad8x8x8_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -#define vpx_sad8x8x8 vpx_sad8x8x8_c - -int vpx_satd_c(const int16_t *coeff, int length); -#define vpx_satd vpx_satd_c - -void vpx_scaled_2d_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -#define vpx_scaled_2d vpx_scaled_2d_c - -void vpx_scaled_avg_2d_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -#define vpx_scaled_avg_2d vpx_scaled_avg_2d_c - -void vpx_scaled_avg_horiz_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -#define vpx_scaled_avg_horiz vpx_scaled_avg_horiz_c - -void vpx_scaled_avg_vert_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -#define vpx_scaled_avg_vert vpx_scaled_avg_vert_c - -void vpx_scaled_horiz_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -#define vpx_scaled_horiz vpx_scaled_horiz_c - -void vpx_scaled_vert_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -#define vpx_scaled_vert vpx_scaled_vert_c - -uint32_t vpx_sub_pixel_avg_variance16x16_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_sub_pixel_avg_variance16x16 vpx_sub_pixel_avg_variance16x16_c - -uint32_t vpx_sub_pixel_avg_variance16x32_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_sub_pixel_avg_variance16x32 vpx_sub_pixel_avg_variance16x32_c - -uint32_t vpx_sub_pixel_avg_variance16x8_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_sub_pixel_avg_variance16x8 vpx_sub_pixel_avg_variance16x8_c - -uint32_t vpx_sub_pixel_avg_variance32x16_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_sub_pixel_avg_variance32x16 vpx_sub_pixel_avg_variance32x16_c - -uint32_t vpx_sub_pixel_avg_variance32x32_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_sub_pixel_avg_variance32x32 vpx_sub_pixel_avg_variance32x32_c - -uint32_t vpx_sub_pixel_avg_variance32x64_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_sub_pixel_avg_variance32x64 vpx_sub_pixel_avg_variance32x64_c - -uint32_t vpx_sub_pixel_avg_variance4x4_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_sub_pixel_avg_variance4x4 vpx_sub_pixel_avg_variance4x4_c - -uint32_t vpx_sub_pixel_avg_variance4x8_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_sub_pixel_avg_variance4x8 vpx_sub_pixel_avg_variance4x8_c - -uint32_t vpx_sub_pixel_avg_variance64x32_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_sub_pixel_avg_variance64x32 vpx_sub_pixel_avg_variance64x32_c - -uint32_t vpx_sub_pixel_avg_variance64x64_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_sub_pixel_avg_variance64x64 vpx_sub_pixel_avg_variance64x64_c - -uint32_t vpx_sub_pixel_avg_variance8x16_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_sub_pixel_avg_variance8x16 vpx_sub_pixel_avg_variance8x16_c - -uint32_t vpx_sub_pixel_avg_variance8x4_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_sub_pixel_avg_variance8x4 vpx_sub_pixel_avg_variance8x4_c - -uint32_t vpx_sub_pixel_avg_variance8x8_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_sub_pixel_avg_variance8x8 vpx_sub_pixel_avg_variance8x8_c - -uint32_t vpx_sub_pixel_variance16x16_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -#define vpx_sub_pixel_variance16x16 vpx_sub_pixel_variance16x16_c - -uint32_t vpx_sub_pixel_variance16x32_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -#define vpx_sub_pixel_variance16x32 vpx_sub_pixel_variance16x32_c - -uint32_t vpx_sub_pixel_variance16x8_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -#define vpx_sub_pixel_variance16x8 vpx_sub_pixel_variance16x8_c - -uint32_t vpx_sub_pixel_variance32x16_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -#define vpx_sub_pixel_variance32x16 vpx_sub_pixel_variance32x16_c - -uint32_t vpx_sub_pixel_variance32x32_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -#define vpx_sub_pixel_variance32x32 vpx_sub_pixel_variance32x32_c - -uint32_t vpx_sub_pixel_variance32x64_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -#define vpx_sub_pixel_variance32x64 vpx_sub_pixel_variance32x64_c - -uint32_t vpx_sub_pixel_variance4x4_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -#define vpx_sub_pixel_variance4x4 vpx_sub_pixel_variance4x4_c - -uint32_t vpx_sub_pixel_variance4x8_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -#define vpx_sub_pixel_variance4x8 vpx_sub_pixel_variance4x8_c - -uint32_t vpx_sub_pixel_variance64x32_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -#define vpx_sub_pixel_variance64x32 vpx_sub_pixel_variance64x32_c - -uint32_t vpx_sub_pixel_variance64x64_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -#define vpx_sub_pixel_variance64x64 vpx_sub_pixel_variance64x64_c - -uint32_t vpx_sub_pixel_variance8x16_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -#define vpx_sub_pixel_variance8x16 vpx_sub_pixel_variance8x16_c - -uint32_t vpx_sub_pixel_variance8x4_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -#define vpx_sub_pixel_variance8x4 vpx_sub_pixel_variance8x4_c - -uint32_t vpx_sub_pixel_variance8x8_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -#define vpx_sub_pixel_variance8x8 vpx_sub_pixel_variance8x8_c - -void vpx_subtract_block_c(int rows, int cols, int16_t *diff_ptr, ptrdiff_t diff_stride, const uint8_t *src_ptr, ptrdiff_t src_stride, const uint8_t *pred_ptr, ptrdiff_t pred_stride); -#define vpx_subtract_block vpx_subtract_block_c - -uint64_t vpx_sum_squares_2d_i16_c(const int16_t *src, int stride, int size); -#define vpx_sum_squares_2d_i16 vpx_sum_squares_2d_i16_c - -void vpx_tm_predictor_16x16_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_tm_predictor_16x16 vpx_tm_predictor_16x16_c - -void vpx_tm_predictor_32x32_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_tm_predictor_32x32 vpx_tm_predictor_32x32_c - -void vpx_tm_predictor_4x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_tm_predictor_4x4 vpx_tm_predictor_4x4_c - -void vpx_tm_predictor_8x8_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_tm_predictor_8x8 vpx_tm_predictor_8x8_c - -void vpx_v_predictor_16x16_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_v_predictor_16x16 vpx_v_predictor_16x16_c - -void vpx_v_predictor_32x32_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_v_predictor_32x32 vpx_v_predictor_32x32_c - -void vpx_v_predictor_4x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_v_predictor_4x4 vpx_v_predictor_4x4_c - -void vpx_v_predictor_8x8_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_v_predictor_8x8 vpx_v_predictor_8x8_c - -unsigned int vpx_variance16x16_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_variance16x16 vpx_variance16x16_c - -unsigned int vpx_variance16x32_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_variance16x32 vpx_variance16x32_c - -unsigned int vpx_variance16x8_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_variance16x8 vpx_variance16x8_c - -unsigned int vpx_variance32x16_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_variance32x16 vpx_variance32x16_c - -unsigned int vpx_variance32x32_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_variance32x32 vpx_variance32x32_c - -unsigned int vpx_variance32x64_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_variance32x64 vpx_variance32x64_c - -unsigned int vpx_variance4x4_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_variance4x4 vpx_variance4x4_c - -unsigned int vpx_variance4x8_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_variance4x8 vpx_variance4x8_c - -unsigned int vpx_variance64x32_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_variance64x32 vpx_variance64x32_c - -unsigned int vpx_variance64x64_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_variance64x64 vpx_variance64x64_c - -unsigned int vpx_variance8x16_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_variance8x16 vpx_variance8x16_c - -unsigned int vpx_variance8x4_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_variance8x4 vpx_variance8x4_c - -unsigned int vpx_variance8x8_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_variance8x8 vpx_variance8x8_c - -void vpx_ve_predictor_4x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_ve_predictor_4x4 vpx_ve_predictor_4x4_c - -int vpx_vector_var_c(const int16_t *ref, const int16_t *src, const int bwl); -#define vpx_vector_var vpx_vector_var_c - -void vpx_dsp_rtcd(void); - -#include "vpx_config.h" - -#ifdef RTCD_C -static void setup_rtcd_internal(void) -{ -} -#endif - -#ifdef __cplusplus -} // extern "C" -#endif - -#endif diff --git a/WebRtc.NET/include/third_party/libvpx/source/config/linux/mips64el/vpx_scale_rtcd.h b/WebRtc.NET/include/third_party/libvpx/source/config/linux/mips64el/vpx_scale_rtcd.h deleted file mode 100644 index f419cc7a..00000000 --- a/WebRtc.NET/include/third_party/libvpx/source/config/linux/mips64el/vpx_scale_rtcd.h +++ /dev/null @@ -1,66 +0,0 @@ -#ifndef VPX_SCALE_RTCD_H_ -#define VPX_SCALE_RTCD_H_ - -#ifdef RTCD_C -#define RTCD_EXTERN -#else -#define RTCD_EXTERN extern -#endif - -struct yv12_buffer_config; - -#ifdef __cplusplus -extern "C" { -#endif - -void vp8_horizontal_line_2_1_scale_c(const unsigned char *source, unsigned int source_width, unsigned char *dest, unsigned int dest_width); -#define vp8_horizontal_line_2_1_scale vp8_horizontal_line_2_1_scale_c - -void vp8_horizontal_line_5_3_scale_c(const unsigned char *source, unsigned int source_width, unsigned char *dest, unsigned int dest_width); -#define vp8_horizontal_line_5_3_scale vp8_horizontal_line_5_3_scale_c - -void vp8_horizontal_line_5_4_scale_c(const unsigned char *source, unsigned int source_width, unsigned char *dest, unsigned int dest_width); -#define vp8_horizontal_line_5_4_scale vp8_horizontal_line_5_4_scale_c - -void vp8_vertical_band_2_1_scale_c(unsigned char *source, unsigned int src_pitch, unsigned char *dest, unsigned int dest_pitch, unsigned int dest_width); -#define vp8_vertical_band_2_1_scale vp8_vertical_band_2_1_scale_c - -void vp8_vertical_band_2_1_scale_i_c(unsigned char *source, unsigned int src_pitch, unsigned char *dest, unsigned int dest_pitch, unsigned int dest_width); -#define vp8_vertical_band_2_1_scale_i vp8_vertical_band_2_1_scale_i_c - -void vp8_vertical_band_5_3_scale_c(unsigned char *source, unsigned int src_pitch, unsigned char *dest, unsigned int dest_pitch, unsigned int dest_width); -#define vp8_vertical_band_5_3_scale vp8_vertical_band_5_3_scale_c - -void vp8_vertical_band_5_4_scale_c(unsigned char *source, unsigned int src_pitch, unsigned char *dest, unsigned int dest_pitch, unsigned int dest_width); -#define vp8_vertical_band_5_4_scale vp8_vertical_band_5_4_scale_c - -void vp8_yv12_copy_frame_c(const struct yv12_buffer_config *src_ybc, struct yv12_buffer_config *dst_ybc); -#define vp8_yv12_copy_frame vp8_yv12_copy_frame_c - -void vp8_yv12_extend_frame_borders_c(struct yv12_buffer_config *ybf); -#define vp8_yv12_extend_frame_borders vp8_yv12_extend_frame_borders_c - -void vpx_extend_frame_borders_c(struct yv12_buffer_config *ybf); -#define vpx_extend_frame_borders vpx_extend_frame_borders_c - -void vpx_extend_frame_inner_borders_c(struct yv12_buffer_config *ybf); -#define vpx_extend_frame_inner_borders vpx_extend_frame_inner_borders_c - -void vpx_yv12_copy_y_c(const struct yv12_buffer_config *src_ybc, struct yv12_buffer_config *dst_ybc); -#define vpx_yv12_copy_y vpx_yv12_copy_y_c - -void vpx_scale_rtcd(void); - -#include "vpx_config.h" - -#ifdef RTCD_C -static void setup_rtcd_internal(void) -{ -} -#endif - -#ifdef __cplusplus -} // extern "C" -#endif - -#endif diff --git a/WebRtc.NET/include/third_party/libvpx/source/config/linux/mipsel/vp8_rtcd.h b/WebRtc.NET/include/third_party/libvpx/source/config/linux/mipsel/vp8_rtcd.h deleted file mode 100644 index 650bd323..00000000 --- a/WebRtc.NET/include/third_party/libvpx/source/config/linux/mipsel/vp8_rtcd.h +++ /dev/null @@ -1,181 +0,0 @@ -#ifndef VP8_RTCD_H_ -#define VP8_RTCD_H_ - -#ifdef RTCD_C -#define RTCD_EXTERN -#else -#define RTCD_EXTERN extern -#endif - -/* - * VP8 - */ - -struct blockd; -struct macroblockd; -struct loop_filter_info; - -/* Encoder forward decls */ -struct block; -struct macroblock; -struct variance_vtable; -union int_mv; -struct yv12_buffer_config; - -#ifdef __cplusplus -extern "C" { -#endif - -void vp8_bilinear_predict16x16_c(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch); -#define vp8_bilinear_predict16x16 vp8_bilinear_predict16x16_c - -void vp8_bilinear_predict4x4_c(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch); -#define vp8_bilinear_predict4x4 vp8_bilinear_predict4x4_c - -void vp8_bilinear_predict8x4_c(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch); -#define vp8_bilinear_predict8x4 vp8_bilinear_predict8x4_c - -void vp8_bilinear_predict8x8_c(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch); -#define vp8_bilinear_predict8x8 vp8_bilinear_predict8x8_c - -void vp8_blend_b_c(unsigned char *y, unsigned char *u, unsigned char *v, int y1, int u1, int v1, int alpha, int stride); -#define vp8_blend_b vp8_blend_b_c - -void vp8_blend_mb_inner_c(unsigned char *y, unsigned char *u, unsigned char *v, int y1, int u1, int v1, int alpha, int stride); -#define vp8_blend_mb_inner vp8_blend_mb_inner_c - -void vp8_blend_mb_outer_c(unsigned char *y, unsigned char *u, unsigned char *v, int y1, int u1, int v1, int alpha, int stride); -#define vp8_blend_mb_outer vp8_blend_mb_outer_c - -int vp8_block_error_c(short *coeff, short *dqcoeff); -#define vp8_block_error vp8_block_error_c - -void vp8_copy_mem16x16_c(unsigned char *src, int src_pitch, unsigned char *dst, int dst_pitch); -#define vp8_copy_mem16x16 vp8_copy_mem16x16_c - -void vp8_copy_mem8x4_c(unsigned char *src, int src_pitch, unsigned char *dst, int dst_pitch); -#define vp8_copy_mem8x4 vp8_copy_mem8x4_c - -void vp8_copy_mem8x8_c(unsigned char *src, int src_pitch, unsigned char *dst, int dst_pitch); -#define vp8_copy_mem8x8 vp8_copy_mem8x8_c - -void vp8_dc_only_idct_add_c(short input, unsigned char *pred, int pred_stride, unsigned char *dst, int dst_stride); -#define vp8_dc_only_idct_add vp8_dc_only_idct_add_c - -int vp8_denoiser_filter_c(unsigned char *mc_running_avg_y, int mc_avg_y_stride, unsigned char *running_avg_y, int avg_y_stride, unsigned char *sig, int sig_stride, unsigned int motion_magnitude, int increase_denoising); -#define vp8_denoiser_filter vp8_denoiser_filter_c - -int vp8_denoiser_filter_uv_c(unsigned char *mc_running_avg, int mc_avg_stride, unsigned char *running_avg, int avg_stride, unsigned char *sig, int sig_stride, unsigned int motion_magnitude, int increase_denoising); -#define vp8_denoiser_filter_uv vp8_denoiser_filter_uv_c - -void vp8_dequant_idct_add_c(short *input, short *dq, unsigned char *output, int stride); -#define vp8_dequant_idct_add vp8_dequant_idct_add_c - -void vp8_dequant_idct_add_uv_block_c(short *q, short *dq, unsigned char *dst_u, unsigned char *dst_v, int stride, char *eobs); -#define vp8_dequant_idct_add_uv_block vp8_dequant_idct_add_uv_block_c - -void vp8_dequant_idct_add_y_block_c(short *q, short *dq, unsigned char *dst, int stride, char *eobs); -#define vp8_dequant_idct_add_y_block vp8_dequant_idct_add_y_block_c - -void vp8_dequantize_b_c(struct blockd*, short *dqc); -#define vp8_dequantize_b vp8_dequantize_b_c - -int vp8_diamond_search_sad_c(struct macroblock *x, struct block *b, struct blockd *d, union int_mv *ref_mv, union int_mv *best_mv, int search_param, int sad_per_bit, int *num00, struct variance_vtable *fn_ptr, int *mvcost[2], union int_mv *center_mv); -#define vp8_diamond_search_sad vp8_diamond_search_sad_c - -void vp8_fast_quantize_b_c(struct block *, struct blockd *); -#define vp8_fast_quantize_b vp8_fast_quantize_b_c - -void vp8_filter_by_weight16x16_c(unsigned char *src, int src_stride, unsigned char *dst, int dst_stride, int src_weight); -#define vp8_filter_by_weight16x16 vp8_filter_by_weight16x16_c - -void vp8_filter_by_weight4x4_c(unsigned char *src, int src_stride, unsigned char *dst, int dst_stride, int src_weight); -#define vp8_filter_by_weight4x4 vp8_filter_by_weight4x4_c - -void vp8_filter_by_weight8x8_c(unsigned char *src, int src_stride, unsigned char *dst, int dst_stride, int src_weight); -#define vp8_filter_by_weight8x8 vp8_filter_by_weight8x8_c - -int vp8_full_search_sad_c(struct macroblock *x, struct block *b, struct blockd *d, union int_mv *ref_mv, int sad_per_bit, int distance, struct variance_vtable *fn_ptr, int *mvcost[2], union int_mv *center_mv); -#define vp8_full_search_sad vp8_full_search_sad_c - -void vp8_loop_filter_bh_c(unsigned char *y, unsigned char *u, unsigned char *v, int ystride, int uv_stride, struct loop_filter_info *lfi); -#define vp8_loop_filter_bh vp8_loop_filter_bh_c - -void vp8_loop_filter_bv_c(unsigned char *y, unsigned char *u, unsigned char *v, int ystride, int uv_stride, struct loop_filter_info *lfi); -#define vp8_loop_filter_bv vp8_loop_filter_bv_c - -void vp8_loop_filter_mbh_c(unsigned char *y, unsigned char *u, unsigned char *v, int ystride, int uv_stride, struct loop_filter_info *lfi); -#define vp8_loop_filter_mbh vp8_loop_filter_mbh_c - -void vp8_loop_filter_mbv_c(unsigned char *y, unsigned char *u, unsigned char *v, int ystride, int uv_stride, struct loop_filter_info *lfi); -#define vp8_loop_filter_mbv vp8_loop_filter_mbv_c - -void vp8_loop_filter_bhs_c(unsigned char *y, int ystride, const unsigned char *blimit); -#define vp8_loop_filter_simple_bh vp8_loop_filter_bhs_c - -void vp8_loop_filter_bvs_c(unsigned char *y, int ystride, const unsigned char *blimit); -#define vp8_loop_filter_simple_bv vp8_loop_filter_bvs_c - -void vp8_loop_filter_simple_horizontal_edge_c(unsigned char *y, int ystride, const unsigned char *blimit); -#define vp8_loop_filter_simple_mbh vp8_loop_filter_simple_horizontal_edge_c - -void vp8_loop_filter_simple_vertical_edge_c(unsigned char *y, int ystride, const unsigned char *blimit); -#define vp8_loop_filter_simple_mbv vp8_loop_filter_simple_vertical_edge_c - -int vp8_mbblock_error_c(struct macroblock *mb, int dc); -#define vp8_mbblock_error vp8_mbblock_error_c - -int vp8_mbuverror_c(struct macroblock *mb); -#define vp8_mbuverror vp8_mbuverror_c - -int vp8_refining_search_sad_c(struct macroblock *x, struct block *b, struct blockd *d, union int_mv *ref_mv, int sad_per_bit, int distance, struct variance_vtable *fn_ptr, int *mvcost[2], union int_mv *center_mv); -#define vp8_refining_search_sad vp8_refining_search_sad_c - -void vp8_regular_quantize_b_c(struct block *, struct blockd *); -#define vp8_regular_quantize_b vp8_regular_quantize_b_c - -void vp8_short_fdct4x4_c(short *input, short *output, int pitch); -#define vp8_short_fdct4x4 vp8_short_fdct4x4_c - -void vp8_short_fdct8x4_c(short *input, short *output, int pitch); -#define vp8_short_fdct8x4 vp8_short_fdct8x4_c - -void vp8_short_idct4x4llm_c(short *input, unsigned char *pred, int pitch, unsigned char *dst, int dst_stride); -#define vp8_short_idct4x4llm vp8_short_idct4x4llm_c - -void vp8_short_inv_walsh4x4_c(short *input, short *output); -#define vp8_short_inv_walsh4x4 vp8_short_inv_walsh4x4_c - -void vp8_short_inv_walsh4x4_1_c(short *input, short *output); -#define vp8_short_inv_walsh4x4_1 vp8_short_inv_walsh4x4_1_c - -void vp8_short_walsh4x4_c(short *input, short *output, int pitch); -#define vp8_short_walsh4x4 vp8_short_walsh4x4_c - -void vp8_sixtap_predict16x16_c(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch); -#define vp8_sixtap_predict16x16 vp8_sixtap_predict16x16_c - -void vp8_sixtap_predict4x4_c(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch); -#define vp8_sixtap_predict4x4 vp8_sixtap_predict4x4_c - -void vp8_sixtap_predict8x4_c(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch); -#define vp8_sixtap_predict8x4 vp8_sixtap_predict8x4_c - -void vp8_sixtap_predict8x8_c(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch); -#define vp8_sixtap_predict8x8 vp8_sixtap_predict8x8_c - -void vp8_rtcd(void); - -#include "vpx_config.h" - -#ifdef RTCD_C -static void setup_rtcd_internal(void) -{ -} -#endif - -#ifdef __cplusplus -} // extern "C" -#endif - -#endif diff --git a/WebRtc.NET/include/third_party/libvpx/source/config/linux/mipsel/vp9_rtcd.h b/WebRtc.NET/include/third_party/libvpx/source/config/linux/mipsel/vp9_rtcd.h deleted file mode 100644 index 403db512..00000000 --- a/WebRtc.NET/include/third_party/libvpx/source/config/linux/mipsel/vp9_rtcd.h +++ /dev/null @@ -1,103 +0,0 @@ -#ifndef VP9_RTCD_H_ -#define VP9_RTCD_H_ - -#ifdef RTCD_C -#define RTCD_EXTERN -#else -#define RTCD_EXTERN extern -#endif - -/* - * VP9 - */ - -#include "vpx/vpx_integer.h" -#include "vp9/common/vp9_common.h" -#include "vp9/common/vp9_enums.h" - -struct macroblockd; - -/* Encoder forward decls */ -struct macroblock; -struct vp9_variance_vtable; -struct search_site_config; -struct mv; -union int_mv; -struct yv12_buffer_config; - -#ifdef __cplusplus -extern "C" { -#endif - -int64_t vp9_block_error_c(const tran_low_t *coeff, const tran_low_t *dqcoeff, intptr_t block_size, int64_t *ssz); -#define vp9_block_error vp9_block_error_c - -int64_t vp9_block_error_fp_c(const int16_t *coeff, const int16_t *dqcoeff, int block_size); -#define vp9_block_error_fp vp9_block_error_fp_c - -int vp9_denoiser_filter_c(const uint8_t *sig, int sig_stride, const uint8_t *mc_avg, int mc_avg_stride, uint8_t *avg, int avg_stride, int increase_denoising, BLOCK_SIZE bs, int motion_magnitude); -#define vp9_denoiser_filter vp9_denoiser_filter_c - -int vp9_diamond_search_sad_c(const struct macroblock *x, const struct search_site_config *cfg, struct mv *ref_mv, struct mv *best_mv, int search_param, int sad_per_bit, int *num00, const struct vp9_variance_vtable *fn_ptr, const struct mv *center_mv); -#define vp9_diamond_search_sad vp9_diamond_search_sad_c - -void vp9_fdct8x8_quant_c(const int16_t *input, int stride, tran_low_t *coeff_ptr, intptr_t n_coeffs, int skip_block, const int16_t *zbin_ptr, const int16_t *round_ptr, const int16_t *quant_ptr, const int16_t *quant_shift_ptr, tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr, const int16_t *dequant_ptr, uint16_t *eob_ptr, const int16_t *scan, const int16_t *iscan); -#define vp9_fdct8x8_quant vp9_fdct8x8_quant_c - -void vp9_fht16x16_c(const int16_t *input, tran_low_t *output, int stride, int tx_type); -#define vp9_fht16x16 vp9_fht16x16_c - -void vp9_fht4x4_c(const int16_t *input, tran_low_t *output, int stride, int tx_type); -#define vp9_fht4x4 vp9_fht4x4_c - -void vp9_fht8x8_c(const int16_t *input, tran_low_t *output, int stride, int tx_type); -#define vp9_fht8x8 vp9_fht8x8_c - -void vp9_filter_by_weight16x16_c(const uint8_t *src, int src_stride, uint8_t *dst, int dst_stride, int src_weight); -#define vp9_filter_by_weight16x16 vp9_filter_by_weight16x16_c - -void vp9_filter_by_weight8x8_c(const uint8_t *src, int src_stride, uint8_t *dst, int dst_stride, int src_weight); -#define vp9_filter_by_weight8x8 vp9_filter_by_weight8x8_c - -int vp9_full_search_sad_c(const struct macroblock *x, const struct mv *ref_mv, int sad_per_bit, int distance, const struct vp9_variance_vtable *fn_ptr, const struct mv *center_mv, struct mv *best_mv); -#define vp9_full_search_sad vp9_full_search_sad_c - -void vp9_fwht4x4_c(const int16_t *input, tran_low_t *output, int stride); -#define vp9_fwht4x4 vp9_fwht4x4_c - -void vp9_iht16x16_256_add_c(const tran_low_t *input, uint8_t *output, int pitch, int tx_type); -#define vp9_iht16x16_256_add vp9_iht16x16_256_add_c - -void vp9_iht4x4_16_add_c(const tran_low_t *input, uint8_t *dest, int stride, int tx_type); -#define vp9_iht4x4_16_add vp9_iht4x4_16_add_c - -void vp9_iht8x8_64_add_c(const tran_low_t *input, uint8_t *dest, int stride, int tx_type); -#define vp9_iht8x8_64_add vp9_iht8x8_64_add_c - -void vp9_quantize_fp_c(const tran_low_t *coeff_ptr, intptr_t n_coeffs, int skip_block, const int16_t *zbin_ptr, const int16_t *round_ptr, const int16_t *quant_ptr, const int16_t *quant_shift_ptr, tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr, const int16_t *dequant_ptr, uint16_t *eob_ptr, const int16_t *scan, const int16_t *iscan); -#define vp9_quantize_fp vp9_quantize_fp_c - -void vp9_quantize_fp_32x32_c(const tran_low_t *coeff_ptr, intptr_t n_coeffs, int skip_block, const int16_t *zbin_ptr, const int16_t *round_ptr, const int16_t *quant_ptr, const int16_t *quant_shift_ptr, tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr, const int16_t *dequant_ptr, uint16_t *eob_ptr, const int16_t *scan, const int16_t *iscan); -#define vp9_quantize_fp_32x32 vp9_quantize_fp_32x32_c - -void vp9_scale_and_extend_frame_c(const struct yv12_buffer_config *src, struct yv12_buffer_config *dst); -#define vp9_scale_and_extend_frame vp9_scale_and_extend_frame_c - -void vp9_temporal_filter_apply_c(uint8_t *frame1, unsigned int stride, uint8_t *frame2, unsigned int block_width, unsigned int block_height, int strength, int filter_weight, unsigned int *accumulator, uint16_t *count); -#define vp9_temporal_filter_apply vp9_temporal_filter_apply_c - -void vp9_rtcd(void); - -#include "vpx_config.h" - -#ifdef RTCD_C -static void setup_rtcd_internal(void) -{ -} -#endif - -#ifdef __cplusplus -} // extern "C" -#endif - -#endif diff --git a/WebRtc.NET/include/third_party/libvpx/source/config/linux/mipsel/vpx_config.h b/WebRtc.NET/include/third_party/libvpx/source/config/linux/mipsel/vpx_config.h deleted file mode 100644 index b9eafb6e..00000000 --- a/WebRtc.NET/include/third_party/libvpx/source/config/linux/mipsel/vpx_config.h +++ /dev/null @@ -1,94 +0,0 @@ -/* Copyright (c) 2011 The WebM project authors. All Rights Reserved. */ -/* */ -/* Use of this source code is governed by a BSD-style license */ -/* that can be found in the LICENSE file in the root of the source */ -/* tree. An additional intellectual property rights grant can be found */ -/* in the file PATENTS. All contributing project authors may */ -/* be found in the AUTHORS file in the root of the source tree. */ -/* This file automatically generated by configure. Do not edit! */ -#ifndef VPX_CONFIG_H -#define VPX_CONFIG_H -#define RESTRICT -#define INLINE inline -#define ARCH_ARM 0 -#define ARCH_MIPS 1 -#define ARCH_X86 0 -#define ARCH_X86_64 0 -#define HAVE_NEON 0 -#define HAVE_NEON_ASM 0 -#define HAVE_MIPS32 1 -#define HAVE_DSPR2 0 -#define HAVE_MSA 0 -#define HAVE_MIPS64 0 -#define HAVE_MMX 0 -#define HAVE_SSE 0 -#define HAVE_SSE2 0 -#define HAVE_SSE3 0 -#define HAVE_SSSE3 0 -#define HAVE_SSE4_1 0 -#define HAVE_AVX 0 -#define HAVE_AVX2 0 -#define HAVE_VPX_PORTS 1 -#define HAVE_PTHREAD_H 1 -#define HAVE_UNISTD_H 0 -#define CONFIG_DEPENDENCY_TRACKING 1 -#define CONFIG_EXTERNAL_BUILD 1 -#define CONFIG_INSTALL_DOCS 0 -#define CONFIG_INSTALL_BINS 1 -#define CONFIG_INSTALL_LIBS 1 -#define CONFIG_INSTALL_SRCS 0 -#define CONFIG_DEBUG 0 -#define CONFIG_GPROF 0 -#define CONFIG_GCOV 0 -#define CONFIG_RVCT 0 -#define CONFIG_GCC 1 -#define CONFIG_MSVS 0 -#define CONFIG_PIC 0 -#define CONFIG_BIG_ENDIAN 0 -#define CONFIG_CODEC_SRCS 0 -#define CONFIG_DEBUG_LIBS 0 -#define CONFIG_DEQUANT_TOKENS 1 -#define CONFIG_DC_RECON 1 -#define CONFIG_RUNTIME_CPU_DETECT 0 -#define CONFIG_POSTPROC 1 -#define CONFIG_VP9_POSTPROC 1 -#define CONFIG_MULTITHREAD 1 -#define CONFIG_INTERNAL_STATS 0 -#define CONFIG_VP8_ENCODER 1 -#define CONFIG_VP8_DECODER 1 -#define CONFIG_VP9_ENCODER 1 -#define CONFIG_VP9_DECODER 1 -#define CONFIG_VP8 1 -#define CONFIG_VP9 1 -#define CONFIG_ENCODERS 1 -#define CONFIG_DECODERS 1 -#define CONFIG_STATIC_MSVCRT 0 -#define CONFIG_SPATIAL_RESAMPLING 1 -#define CONFIG_REALTIME_ONLY 1 -#define CONFIG_ONTHEFLY_BITPACKING 0 -#define CONFIG_ERROR_CONCEALMENT 0 -#define CONFIG_SHARED 0 -#define CONFIG_STATIC 1 -#define CONFIG_SMALL 0 -#define CONFIG_POSTPROC_VISUALIZER 0 -#define CONFIG_OS_SUPPORT 1 -#define CONFIG_UNIT_TESTS 1 -#define CONFIG_WEBM_IO 1 -#define CONFIG_LIBYUV 1 -#define CONFIG_DECODE_PERF_TESTS 0 -#define CONFIG_ENCODE_PERF_TESTS 0 -#define CONFIG_MULTI_RES_ENCODING 1 -#define CONFIG_TEMPORAL_DENOISING 1 -#define CONFIG_VP9_TEMPORAL_DENOISING 1 -#define CONFIG_COEFFICIENT_RANGE_CHECKING 0 -#define CONFIG_VP9_HIGHBITDEPTH 0 -#define CONFIG_BETTER_HW_COMPATIBILITY 0 -#define CONFIG_EXPERIMENTAL 0 -#define CONFIG_SIZE_LIMIT 1 -#define CONFIG_SPATIAL_SVC 0 -#define CONFIG_FP_MB_STATS 0 -#define CONFIG_EMULATE_HARDWARE 0 -#define CONFIG_MISC_FIXES 0 -#define DECODE_WIDTH_LIMIT 16384 -#define DECODE_HEIGHT_LIMIT 16384 -#endif /* VPX_CONFIG_H */ diff --git a/WebRtc.NET/include/third_party/libvpx/source/config/linux/mipsel/vpx_dsp_rtcd.h b/WebRtc.NET/include/third_party/libvpx/source/config/linux/mipsel/vpx_dsp_rtcd.h deleted file mode 100644 index 8a27f964..00000000 --- a/WebRtc.NET/include/third_party/libvpx/source/config/linux/mipsel/vpx_dsp_rtcd.h +++ /dev/null @@ -1,744 +0,0 @@ -#ifndef VPX_DSP_RTCD_H_ -#define VPX_DSP_RTCD_H_ - -#ifdef RTCD_C -#define RTCD_EXTERN -#else -#define RTCD_EXTERN extern -#endif - -/* - * DSP - */ - -#include "vpx/vpx_integer.h" -#include "vpx_dsp/vpx_dsp_common.h" - - -#ifdef __cplusplus -extern "C" { -#endif - -unsigned int vpx_avg_4x4_c(const uint8_t *, int p); -#define vpx_avg_4x4 vpx_avg_4x4_c - -unsigned int vpx_avg_8x8_c(const uint8_t *, int p); -#define vpx_avg_8x8 vpx_avg_8x8_c - -void vpx_comp_avg_pred_c(uint8_t *comp_pred, const uint8_t *pred, int width, int height, const uint8_t *ref, int ref_stride); -#define vpx_comp_avg_pred vpx_comp_avg_pred_c - -void vpx_convolve8_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -#define vpx_convolve8 vpx_convolve8_c - -void vpx_convolve8_avg_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -#define vpx_convolve8_avg vpx_convolve8_avg_c - -void vpx_convolve8_avg_horiz_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -#define vpx_convolve8_avg_horiz vpx_convolve8_avg_horiz_c - -void vpx_convolve8_avg_vert_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -#define vpx_convolve8_avg_vert vpx_convolve8_avg_vert_c - -void vpx_convolve8_horiz_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -#define vpx_convolve8_horiz vpx_convolve8_horiz_c - -void vpx_convolve8_vert_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -#define vpx_convolve8_vert vpx_convolve8_vert_c - -void vpx_convolve_avg_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -#define vpx_convolve_avg vpx_convolve_avg_c - -void vpx_convolve_copy_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -#define vpx_convolve_copy vpx_convolve_copy_c - -void vpx_d117_predictor_16x16_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d117_predictor_16x16 vpx_d117_predictor_16x16_c - -void vpx_d117_predictor_32x32_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d117_predictor_32x32 vpx_d117_predictor_32x32_c - -void vpx_d117_predictor_4x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d117_predictor_4x4 vpx_d117_predictor_4x4_c - -void vpx_d117_predictor_8x8_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d117_predictor_8x8 vpx_d117_predictor_8x8_c - -void vpx_d135_predictor_16x16_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d135_predictor_16x16 vpx_d135_predictor_16x16_c - -void vpx_d135_predictor_32x32_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d135_predictor_32x32 vpx_d135_predictor_32x32_c - -void vpx_d135_predictor_4x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d135_predictor_4x4 vpx_d135_predictor_4x4_c - -void vpx_d135_predictor_8x8_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d135_predictor_8x8 vpx_d135_predictor_8x8_c - -void vpx_d153_predictor_16x16_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d153_predictor_16x16 vpx_d153_predictor_16x16_c - -void vpx_d153_predictor_32x32_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d153_predictor_32x32 vpx_d153_predictor_32x32_c - -void vpx_d153_predictor_4x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d153_predictor_4x4 vpx_d153_predictor_4x4_c - -void vpx_d153_predictor_8x8_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d153_predictor_8x8 vpx_d153_predictor_8x8_c - -void vpx_d207_predictor_16x16_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d207_predictor_16x16 vpx_d207_predictor_16x16_c - -void vpx_d207_predictor_32x32_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d207_predictor_32x32 vpx_d207_predictor_32x32_c - -void vpx_d207_predictor_4x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d207_predictor_4x4 vpx_d207_predictor_4x4_c - -void vpx_d207_predictor_8x8_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d207_predictor_8x8 vpx_d207_predictor_8x8_c - -void vpx_d207e_predictor_16x16_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d207e_predictor_16x16 vpx_d207e_predictor_16x16_c - -void vpx_d207e_predictor_32x32_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d207e_predictor_32x32 vpx_d207e_predictor_32x32_c - -void vpx_d207e_predictor_4x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d207e_predictor_4x4 vpx_d207e_predictor_4x4_c - -void vpx_d207e_predictor_8x8_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d207e_predictor_8x8 vpx_d207e_predictor_8x8_c - -void vpx_d45_predictor_16x16_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d45_predictor_16x16 vpx_d45_predictor_16x16_c - -void vpx_d45_predictor_32x32_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d45_predictor_32x32 vpx_d45_predictor_32x32_c - -void vpx_d45_predictor_4x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d45_predictor_4x4 vpx_d45_predictor_4x4_c - -void vpx_d45_predictor_8x8_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d45_predictor_8x8 vpx_d45_predictor_8x8_c - -void vpx_d45e_predictor_16x16_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d45e_predictor_16x16 vpx_d45e_predictor_16x16_c - -void vpx_d45e_predictor_32x32_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d45e_predictor_32x32 vpx_d45e_predictor_32x32_c - -void vpx_d45e_predictor_4x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d45e_predictor_4x4 vpx_d45e_predictor_4x4_c - -void vpx_d45e_predictor_8x8_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d45e_predictor_8x8 vpx_d45e_predictor_8x8_c - -void vpx_d63_predictor_16x16_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d63_predictor_16x16 vpx_d63_predictor_16x16_c - -void vpx_d63_predictor_32x32_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d63_predictor_32x32 vpx_d63_predictor_32x32_c - -void vpx_d63_predictor_4x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d63_predictor_4x4 vpx_d63_predictor_4x4_c - -void vpx_d63_predictor_8x8_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d63_predictor_8x8 vpx_d63_predictor_8x8_c - -void vpx_d63e_predictor_16x16_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d63e_predictor_16x16 vpx_d63e_predictor_16x16_c - -void vpx_d63e_predictor_32x32_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d63e_predictor_32x32 vpx_d63e_predictor_32x32_c - -void vpx_d63e_predictor_4x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d63e_predictor_4x4 vpx_d63e_predictor_4x4_c - -void vpx_d63e_predictor_8x8_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d63e_predictor_8x8 vpx_d63e_predictor_8x8_c - -void vpx_d63f_predictor_4x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d63f_predictor_4x4 vpx_d63f_predictor_4x4_c - -void vpx_dc_128_predictor_16x16_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_dc_128_predictor_16x16 vpx_dc_128_predictor_16x16_c - -void vpx_dc_128_predictor_32x32_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_dc_128_predictor_32x32 vpx_dc_128_predictor_32x32_c - -void vpx_dc_128_predictor_4x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_dc_128_predictor_4x4 vpx_dc_128_predictor_4x4_c - -void vpx_dc_128_predictor_8x8_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_dc_128_predictor_8x8 vpx_dc_128_predictor_8x8_c - -void vpx_dc_left_predictor_16x16_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_dc_left_predictor_16x16 vpx_dc_left_predictor_16x16_c - -void vpx_dc_left_predictor_32x32_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_dc_left_predictor_32x32 vpx_dc_left_predictor_32x32_c - -void vpx_dc_left_predictor_4x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_dc_left_predictor_4x4 vpx_dc_left_predictor_4x4_c - -void vpx_dc_left_predictor_8x8_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_dc_left_predictor_8x8 vpx_dc_left_predictor_8x8_c - -void vpx_dc_predictor_16x16_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_dc_predictor_16x16 vpx_dc_predictor_16x16_c - -void vpx_dc_predictor_32x32_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_dc_predictor_32x32 vpx_dc_predictor_32x32_c - -void vpx_dc_predictor_4x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_dc_predictor_4x4 vpx_dc_predictor_4x4_c - -void vpx_dc_predictor_8x8_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_dc_predictor_8x8 vpx_dc_predictor_8x8_c - -void vpx_dc_top_predictor_16x16_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_dc_top_predictor_16x16 vpx_dc_top_predictor_16x16_c - -void vpx_dc_top_predictor_32x32_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_dc_top_predictor_32x32 vpx_dc_top_predictor_32x32_c - -void vpx_dc_top_predictor_4x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_dc_top_predictor_4x4 vpx_dc_top_predictor_4x4_c - -void vpx_dc_top_predictor_8x8_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_dc_top_predictor_8x8 vpx_dc_top_predictor_8x8_c - -void vpx_fdct16x16_c(const int16_t *input, tran_low_t *output, int stride); -#define vpx_fdct16x16 vpx_fdct16x16_c - -void vpx_fdct16x16_1_c(const int16_t *input, tran_low_t *output, int stride); -#define vpx_fdct16x16_1 vpx_fdct16x16_1_c - -void vpx_fdct32x32_c(const int16_t *input, tran_low_t *output, int stride); -#define vpx_fdct32x32 vpx_fdct32x32_c - -void vpx_fdct32x32_1_c(const int16_t *input, tran_low_t *output, int stride); -#define vpx_fdct32x32_1 vpx_fdct32x32_1_c - -void vpx_fdct32x32_rd_c(const int16_t *input, tran_low_t *output, int stride); -#define vpx_fdct32x32_rd vpx_fdct32x32_rd_c - -void vpx_fdct4x4_c(const int16_t *input, tran_low_t *output, int stride); -#define vpx_fdct4x4 vpx_fdct4x4_c - -void vpx_fdct4x4_1_c(const int16_t *input, tran_low_t *output, int stride); -#define vpx_fdct4x4_1 vpx_fdct4x4_1_c - -void vpx_fdct8x8_c(const int16_t *input, tran_low_t *output, int stride); -#define vpx_fdct8x8 vpx_fdct8x8_c - -void vpx_fdct8x8_1_c(const int16_t *input, tran_low_t *output, int stride); -#define vpx_fdct8x8_1 vpx_fdct8x8_1_c - -void vpx_get16x16var_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse, int *sum); -#define vpx_get16x16var vpx_get16x16var_c - -unsigned int vpx_get4x4sse_cs_c(const unsigned char *src_ptr, int source_stride, const unsigned char *ref_ptr, int ref_stride); -#define vpx_get4x4sse_cs vpx_get4x4sse_cs_c - -void vpx_get8x8var_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse, int *sum); -#define vpx_get8x8var vpx_get8x8var_c - -unsigned int vpx_get_mb_ss_c(const int16_t *); -#define vpx_get_mb_ss vpx_get_mb_ss_c - -void vpx_h_predictor_16x16_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_h_predictor_16x16 vpx_h_predictor_16x16_c - -void vpx_h_predictor_32x32_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_h_predictor_32x32 vpx_h_predictor_32x32_c - -void vpx_h_predictor_4x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_h_predictor_4x4 vpx_h_predictor_4x4_c - -void vpx_h_predictor_8x8_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_h_predictor_8x8 vpx_h_predictor_8x8_c - -void vpx_hadamard_16x16_c(const int16_t *src_diff, int src_stride, int16_t *coeff); -#define vpx_hadamard_16x16 vpx_hadamard_16x16_c - -void vpx_hadamard_8x8_c(const int16_t *src_diff, int src_stride, int16_t *coeff); -#define vpx_hadamard_8x8 vpx_hadamard_8x8_c - -void vpx_he_predictor_4x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_he_predictor_4x4 vpx_he_predictor_4x4_c - -void vpx_idct16x16_10_add_c(const tran_low_t *input, uint8_t *dest, int stride); -#define vpx_idct16x16_10_add vpx_idct16x16_10_add_c - -void vpx_idct16x16_1_add_c(const tran_low_t *input, uint8_t *dest, int stride); -#define vpx_idct16x16_1_add vpx_idct16x16_1_add_c - -void vpx_idct16x16_256_add_c(const tran_low_t *input, uint8_t *dest, int stride); -#define vpx_idct16x16_256_add vpx_idct16x16_256_add_c - -void vpx_idct32x32_1024_add_c(const tran_low_t *input, uint8_t *dest, int stride); -#define vpx_idct32x32_1024_add vpx_idct32x32_1024_add_c - -void vpx_idct32x32_135_add_c(const tran_low_t *input, uint8_t *dest, int stride); -#define vpx_idct32x32_135_add vpx_idct32x32_135_add_c - -void vpx_idct32x32_1_add_c(const tran_low_t *input, uint8_t *dest, int stride); -#define vpx_idct32x32_1_add vpx_idct32x32_1_add_c - -void vpx_idct32x32_34_add_c(const tran_low_t *input, uint8_t *dest, int stride); -#define vpx_idct32x32_34_add vpx_idct32x32_34_add_c - -void vpx_idct4x4_16_add_c(const tran_low_t *input, uint8_t *dest, int stride); -#define vpx_idct4x4_16_add vpx_idct4x4_16_add_c - -void vpx_idct4x4_1_add_c(const tran_low_t *input, uint8_t *dest, int stride); -#define vpx_idct4x4_1_add vpx_idct4x4_1_add_c - -void vpx_idct8x8_12_add_c(const tran_low_t *input, uint8_t *dest, int stride); -#define vpx_idct8x8_12_add vpx_idct8x8_12_add_c - -void vpx_idct8x8_1_add_c(const tran_low_t *input, uint8_t *dest, int stride); -#define vpx_idct8x8_1_add vpx_idct8x8_1_add_c - -void vpx_idct8x8_64_add_c(const tran_low_t *input, uint8_t *dest, int stride); -#define vpx_idct8x8_64_add vpx_idct8x8_64_add_c - -int16_t vpx_int_pro_col_c(const uint8_t *ref, const int width); -#define vpx_int_pro_col vpx_int_pro_col_c - -void vpx_int_pro_row_c(int16_t *hbuf, const uint8_t *ref, const int ref_stride, const int height); -#define vpx_int_pro_row vpx_int_pro_row_c - -void vpx_iwht4x4_16_add_c(const tran_low_t *input, uint8_t *dest, int stride); -#define vpx_iwht4x4_16_add vpx_iwht4x4_16_add_c - -void vpx_iwht4x4_1_add_c(const tran_low_t *input, uint8_t *dest, int stride); -#define vpx_iwht4x4_1_add vpx_iwht4x4_1_add_c - -void vpx_lpf_horizontal_16_c(uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh); -#define vpx_lpf_horizontal_16 vpx_lpf_horizontal_16_c - -void vpx_lpf_horizontal_16_dual_c(uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh); -#define vpx_lpf_horizontal_16_dual vpx_lpf_horizontal_16_dual_c - -void vpx_lpf_horizontal_4_c(uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh); -#define vpx_lpf_horizontal_4 vpx_lpf_horizontal_4_c - -void vpx_lpf_horizontal_4_dual_c(uint8_t *s, int pitch, const uint8_t *blimit0, const uint8_t *limit0, const uint8_t *thresh0, const uint8_t *blimit1, const uint8_t *limit1, const uint8_t *thresh1); -#define vpx_lpf_horizontal_4_dual vpx_lpf_horizontal_4_dual_c - -void vpx_lpf_horizontal_8_c(uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh); -#define vpx_lpf_horizontal_8 vpx_lpf_horizontal_8_c - -void vpx_lpf_horizontal_8_dual_c(uint8_t *s, int pitch, const uint8_t *blimit0, const uint8_t *limit0, const uint8_t *thresh0, const uint8_t *blimit1, const uint8_t *limit1, const uint8_t *thresh1); -#define vpx_lpf_horizontal_8_dual vpx_lpf_horizontal_8_dual_c - -void vpx_lpf_vertical_16_c(uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh); -#define vpx_lpf_vertical_16 vpx_lpf_vertical_16_c - -void vpx_lpf_vertical_16_dual_c(uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh); -#define vpx_lpf_vertical_16_dual vpx_lpf_vertical_16_dual_c - -void vpx_lpf_vertical_4_c(uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh); -#define vpx_lpf_vertical_4 vpx_lpf_vertical_4_c - -void vpx_lpf_vertical_4_dual_c(uint8_t *s, int pitch, const uint8_t *blimit0, const uint8_t *limit0, const uint8_t *thresh0, const uint8_t *blimit1, const uint8_t *limit1, const uint8_t *thresh1); -#define vpx_lpf_vertical_4_dual vpx_lpf_vertical_4_dual_c - -void vpx_lpf_vertical_8_c(uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh); -#define vpx_lpf_vertical_8 vpx_lpf_vertical_8_c - -void vpx_lpf_vertical_8_dual_c(uint8_t *s, int pitch, const uint8_t *blimit0, const uint8_t *limit0, const uint8_t *thresh0, const uint8_t *blimit1, const uint8_t *limit1, const uint8_t *thresh1); -#define vpx_lpf_vertical_8_dual vpx_lpf_vertical_8_dual_c - -void vpx_mbpost_proc_across_ip_c(unsigned char *dst, int pitch, int rows, int cols,int flimit); -#define vpx_mbpost_proc_across_ip vpx_mbpost_proc_across_ip_c - -void vpx_mbpost_proc_down_c(unsigned char *dst, int pitch, int rows, int cols,int flimit); -#define vpx_mbpost_proc_down vpx_mbpost_proc_down_c - -void vpx_minmax_8x8_c(const uint8_t *s, int p, const uint8_t *d, int dp, int *min, int *max); -#define vpx_minmax_8x8 vpx_minmax_8x8_c - -unsigned int vpx_mse16x16_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int recon_stride, unsigned int *sse); -#define vpx_mse16x16 vpx_mse16x16_c - -unsigned int vpx_mse16x8_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int recon_stride, unsigned int *sse); -#define vpx_mse16x8 vpx_mse16x8_c - -unsigned int vpx_mse8x16_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int recon_stride, unsigned int *sse); -#define vpx_mse8x16 vpx_mse8x16_c - -unsigned int vpx_mse8x8_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int recon_stride, unsigned int *sse); -#define vpx_mse8x8 vpx_mse8x8_c - -void vpx_plane_add_noise_c(uint8_t *start, const int8_t *noise, int blackclamp, int whiteclamp, int width, int height, int pitch); -#define vpx_plane_add_noise vpx_plane_add_noise_c - -void vpx_post_proc_down_and_across_mb_row_c(unsigned char *src, unsigned char *dst, int src_pitch, int dst_pitch, int cols, unsigned char *flimits, int size); -#define vpx_post_proc_down_and_across_mb_row vpx_post_proc_down_and_across_mb_row_c - -void vpx_quantize_b_c(const tran_low_t *coeff_ptr, intptr_t n_coeffs, int skip_block, const int16_t *zbin_ptr, const int16_t *round_ptr, const int16_t *quant_ptr, const int16_t *quant_shift_ptr, tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr, const int16_t *dequant_ptr, uint16_t *eob_ptr, const int16_t *scan, const int16_t *iscan); -#define vpx_quantize_b vpx_quantize_b_c - -void vpx_quantize_b_32x32_c(const tran_low_t *coeff_ptr, intptr_t n_coeffs, int skip_block, const int16_t *zbin_ptr, const int16_t *round_ptr, const int16_t *quant_ptr, const int16_t *quant_shift_ptr, tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr, const int16_t *dequant_ptr, uint16_t *eob_ptr, const int16_t *scan, const int16_t *iscan); -#define vpx_quantize_b_32x32 vpx_quantize_b_32x32_c - -unsigned int vpx_sad16x16_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -#define vpx_sad16x16 vpx_sad16x16_c - -unsigned int vpx_sad16x16_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -#define vpx_sad16x16_avg vpx_sad16x16_avg_c - -void vpx_sad16x16x3_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -#define vpx_sad16x16x3 vpx_sad16x16x3_c - -void vpx_sad16x16x4d_c(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); -#define vpx_sad16x16x4d vpx_sad16x16x4d_c - -void vpx_sad16x16x8_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -#define vpx_sad16x16x8 vpx_sad16x16x8_c - -unsigned int vpx_sad16x32_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -#define vpx_sad16x32 vpx_sad16x32_c - -unsigned int vpx_sad16x32_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -#define vpx_sad16x32_avg vpx_sad16x32_avg_c - -void vpx_sad16x32x4d_c(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); -#define vpx_sad16x32x4d vpx_sad16x32x4d_c - -unsigned int vpx_sad16x8_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -#define vpx_sad16x8 vpx_sad16x8_c - -unsigned int vpx_sad16x8_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -#define vpx_sad16x8_avg vpx_sad16x8_avg_c - -void vpx_sad16x8x3_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -#define vpx_sad16x8x3 vpx_sad16x8x3_c - -void vpx_sad16x8x4d_c(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); -#define vpx_sad16x8x4d vpx_sad16x8x4d_c - -void vpx_sad16x8x8_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -#define vpx_sad16x8x8 vpx_sad16x8x8_c - -unsigned int vpx_sad32x16_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -#define vpx_sad32x16 vpx_sad32x16_c - -unsigned int vpx_sad32x16_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -#define vpx_sad32x16_avg vpx_sad32x16_avg_c - -void vpx_sad32x16x4d_c(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); -#define vpx_sad32x16x4d vpx_sad32x16x4d_c - -unsigned int vpx_sad32x32_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -#define vpx_sad32x32 vpx_sad32x32_c - -unsigned int vpx_sad32x32_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -#define vpx_sad32x32_avg vpx_sad32x32_avg_c - -void vpx_sad32x32x3_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -#define vpx_sad32x32x3 vpx_sad32x32x3_c - -void vpx_sad32x32x4d_c(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); -#define vpx_sad32x32x4d vpx_sad32x32x4d_c - -void vpx_sad32x32x8_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -#define vpx_sad32x32x8 vpx_sad32x32x8_c - -unsigned int vpx_sad32x64_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -#define vpx_sad32x64 vpx_sad32x64_c - -unsigned int vpx_sad32x64_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -#define vpx_sad32x64_avg vpx_sad32x64_avg_c - -void vpx_sad32x64x4d_c(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); -#define vpx_sad32x64x4d vpx_sad32x64x4d_c - -unsigned int vpx_sad4x4_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -#define vpx_sad4x4 vpx_sad4x4_c - -unsigned int vpx_sad4x4_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -#define vpx_sad4x4_avg vpx_sad4x4_avg_c - -void vpx_sad4x4x3_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -#define vpx_sad4x4x3 vpx_sad4x4x3_c - -void vpx_sad4x4x4d_c(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); -#define vpx_sad4x4x4d vpx_sad4x4x4d_c - -void vpx_sad4x4x8_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -#define vpx_sad4x4x8 vpx_sad4x4x8_c - -unsigned int vpx_sad4x8_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -#define vpx_sad4x8 vpx_sad4x8_c - -unsigned int vpx_sad4x8_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -#define vpx_sad4x8_avg vpx_sad4x8_avg_c - -void vpx_sad4x8x4d_c(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); -#define vpx_sad4x8x4d vpx_sad4x8x4d_c - -void vpx_sad4x8x8_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -#define vpx_sad4x8x8 vpx_sad4x8x8_c - -unsigned int vpx_sad64x32_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -#define vpx_sad64x32 vpx_sad64x32_c - -unsigned int vpx_sad64x32_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -#define vpx_sad64x32_avg vpx_sad64x32_avg_c - -void vpx_sad64x32x4d_c(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); -#define vpx_sad64x32x4d vpx_sad64x32x4d_c - -unsigned int vpx_sad64x64_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -#define vpx_sad64x64 vpx_sad64x64_c - -unsigned int vpx_sad64x64_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -#define vpx_sad64x64_avg vpx_sad64x64_avg_c - -void vpx_sad64x64x3_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -#define vpx_sad64x64x3 vpx_sad64x64x3_c - -void vpx_sad64x64x4d_c(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); -#define vpx_sad64x64x4d vpx_sad64x64x4d_c - -void vpx_sad64x64x8_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -#define vpx_sad64x64x8 vpx_sad64x64x8_c - -unsigned int vpx_sad8x16_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -#define vpx_sad8x16 vpx_sad8x16_c - -unsigned int vpx_sad8x16_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -#define vpx_sad8x16_avg vpx_sad8x16_avg_c - -void vpx_sad8x16x3_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -#define vpx_sad8x16x3 vpx_sad8x16x3_c - -void vpx_sad8x16x4d_c(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); -#define vpx_sad8x16x4d vpx_sad8x16x4d_c - -void vpx_sad8x16x8_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -#define vpx_sad8x16x8 vpx_sad8x16x8_c - -unsigned int vpx_sad8x4_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -#define vpx_sad8x4 vpx_sad8x4_c - -unsigned int vpx_sad8x4_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -#define vpx_sad8x4_avg vpx_sad8x4_avg_c - -void vpx_sad8x4x4d_c(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); -#define vpx_sad8x4x4d vpx_sad8x4x4d_c - -void vpx_sad8x4x8_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -#define vpx_sad8x4x8 vpx_sad8x4x8_c - -unsigned int vpx_sad8x8_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -#define vpx_sad8x8 vpx_sad8x8_c - -unsigned int vpx_sad8x8_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -#define vpx_sad8x8_avg vpx_sad8x8_avg_c - -void vpx_sad8x8x3_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -#define vpx_sad8x8x3 vpx_sad8x8x3_c - -void vpx_sad8x8x4d_c(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); -#define vpx_sad8x8x4d vpx_sad8x8x4d_c - -void vpx_sad8x8x8_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -#define vpx_sad8x8x8 vpx_sad8x8x8_c - -int vpx_satd_c(const int16_t *coeff, int length); -#define vpx_satd vpx_satd_c - -void vpx_scaled_2d_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -#define vpx_scaled_2d vpx_scaled_2d_c - -void vpx_scaled_avg_2d_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -#define vpx_scaled_avg_2d vpx_scaled_avg_2d_c - -void vpx_scaled_avg_horiz_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -#define vpx_scaled_avg_horiz vpx_scaled_avg_horiz_c - -void vpx_scaled_avg_vert_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -#define vpx_scaled_avg_vert vpx_scaled_avg_vert_c - -void vpx_scaled_horiz_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -#define vpx_scaled_horiz vpx_scaled_horiz_c - -void vpx_scaled_vert_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -#define vpx_scaled_vert vpx_scaled_vert_c - -uint32_t vpx_sub_pixel_avg_variance16x16_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_sub_pixel_avg_variance16x16 vpx_sub_pixel_avg_variance16x16_c - -uint32_t vpx_sub_pixel_avg_variance16x32_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_sub_pixel_avg_variance16x32 vpx_sub_pixel_avg_variance16x32_c - -uint32_t vpx_sub_pixel_avg_variance16x8_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_sub_pixel_avg_variance16x8 vpx_sub_pixel_avg_variance16x8_c - -uint32_t vpx_sub_pixel_avg_variance32x16_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_sub_pixel_avg_variance32x16 vpx_sub_pixel_avg_variance32x16_c - -uint32_t vpx_sub_pixel_avg_variance32x32_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_sub_pixel_avg_variance32x32 vpx_sub_pixel_avg_variance32x32_c - -uint32_t vpx_sub_pixel_avg_variance32x64_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_sub_pixel_avg_variance32x64 vpx_sub_pixel_avg_variance32x64_c - -uint32_t vpx_sub_pixel_avg_variance4x4_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_sub_pixel_avg_variance4x4 vpx_sub_pixel_avg_variance4x4_c - -uint32_t vpx_sub_pixel_avg_variance4x8_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_sub_pixel_avg_variance4x8 vpx_sub_pixel_avg_variance4x8_c - -uint32_t vpx_sub_pixel_avg_variance64x32_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_sub_pixel_avg_variance64x32 vpx_sub_pixel_avg_variance64x32_c - -uint32_t vpx_sub_pixel_avg_variance64x64_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_sub_pixel_avg_variance64x64 vpx_sub_pixel_avg_variance64x64_c - -uint32_t vpx_sub_pixel_avg_variance8x16_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_sub_pixel_avg_variance8x16 vpx_sub_pixel_avg_variance8x16_c - -uint32_t vpx_sub_pixel_avg_variance8x4_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_sub_pixel_avg_variance8x4 vpx_sub_pixel_avg_variance8x4_c - -uint32_t vpx_sub_pixel_avg_variance8x8_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_sub_pixel_avg_variance8x8 vpx_sub_pixel_avg_variance8x8_c - -uint32_t vpx_sub_pixel_variance16x16_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -#define vpx_sub_pixel_variance16x16 vpx_sub_pixel_variance16x16_c - -uint32_t vpx_sub_pixel_variance16x32_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -#define vpx_sub_pixel_variance16x32 vpx_sub_pixel_variance16x32_c - -uint32_t vpx_sub_pixel_variance16x8_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -#define vpx_sub_pixel_variance16x8 vpx_sub_pixel_variance16x8_c - -uint32_t vpx_sub_pixel_variance32x16_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -#define vpx_sub_pixel_variance32x16 vpx_sub_pixel_variance32x16_c - -uint32_t vpx_sub_pixel_variance32x32_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -#define vpx_sub_pixel_variance32x32 vpx_sub_pixel_variance32x32_c - -uint32_t vpx_sub_pixel_variance32x64_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -#define vpx_sub_pixel_variance32x64 vpx_sub_pixel_variance32x64_c - -uint32_t vpx_sub_pixel_variance4x4_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -#define vpx_sub_pixel_variance4x4 vpx_sub_pixel_variance4x4_c - -uint32_t vpx_sub_pixel_variance4x8_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -#define vpx_sub_pixel_variance4x8 vpx_sub_pixel_variance4x8_c - -uint32_t vpx_sub_pixel_variance64x32_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -#define vpx_sub_pixel_variance64x32 vpx_sub_pixel_variance64x32_c - -uint32_t vpx_sub_pixel_variance64x64_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -#define vpx_sub_pixel_variance64x64 vpx_sub_pixel_variance64x64_c - -uint32_t vpx_sub_pixel_variance8x16_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -#define vpx_sub_pixel_variance8x16 vpx_sub_pixel_variance8x16_c - -uint32_t vpx_sub_pixel_variance8x4_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -#define vpx_sub_pixel_variance8x4 vpx_sub_pixel_variance8x4_c - -uint32_t vpx_sub_pixel_variance8x8_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -#define vpx_sub_pixel_variance8x8 vpx_sub_pixel_variance8x8_c - -void vpx_subtract_block_c(int rows, int cols, int16_t *diff_ptr, ptrdiff_t diff_stride, const uint8_t *src_ptr, ptrdiff_t src_stride, const uint8_t *pred_ptr, ptrdiff_t pred_stride); -#define vpx_subtract_block vpx_subtract_block_c - -uint64_t vpx_sum_squares_2d_i16_c(const int16_t *src, int stride, int size); -#define vpx_sum_squares_2d_i16 vpx_sum_squares_2d_i16_c - -void vpx_tm_predictor_16x16_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_tm_predictor_16x16 vpx_tm_predictor_16x16_c - -void vpx_tm_predictor_32x32_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_tm_predictor_32x32 vpx_tm_predictor_32x32_c - -void vpx_tm_predictor_4x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_tm_predictor_4x4 vpx_tm_predictor_4x4_c - -void vpx_tm_predictor_8x8_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_tm_predictor_8x8 vpx_tm_predictor_8x8_c - -void vpx_v_predictor_16x16_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_v_predictor_16x16 vpx_v_predictor_16x16_c - -void vpx_v_predictor_32x32_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_v_predictor_32x32 vpx_v_predictor_32x32_c - -void vpx_v_predictor_4x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_v_predictor_4x4 vpx_v_predictor_4x4_c - -void vpx_v_predictor_8x8_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_v_predictor_8x8 vpx_v_predictor_8x8_c - -unsigned int vpx_variance16x16_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_variance16x16 vpx_variance16x16_c - -unsigned int vpx_variance16x32_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_variance16x32 vpx_variance16x32_c - -unsigned int vpx_variance16x8_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_variance16x8 vpx_variance16x8_c - -unsigned int vpx_variance32x16_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_variance32x16 vpx_variance32x16_c - -unsigned int vpx_variance32x32_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_variance32x32 vpx_variance32x32_c - -unsigned int vpx_variance32x64_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_variance32x64 vpx_variance32x64_c - -unsigned int vpx_variance4x4_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_variance4x4 vpx_variance4x4_c - -unsigned int vpx_variance4x8_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_variance4x8 vpx_variance4x8_c - -unsigned int vpx_variance64x32_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_variance64x32 vpx_variance64x32_c - -unsigned int vpx_variance64x64_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_variance64x64 vpx_variance64x64_c - -unsigned int vpx_variance8x16_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_variance8x16 vpx_variance8x16_c - -unsigned int vpx_variance8x4_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_variance8x4 vpx_variance8x4_c - -unsigned int vpx_variance8x8_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_variance8x8 vpx_variance8x8_c - -void vpx_ve_predictor_4x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_ve_predictor_4x4 vpx_ve_predictor_4x4_c - -int vpx_vector_var_c(const int16_t *ref, const int16_t *src, const int bwl); -#define vpx_vector_var vpx_vector_var_c - -void vpx_dsp_rtcd(void); - -#include "vpx_config.h" - -#ifdef RTCD_C -static void setup_rtcd_internal(void) -{ -} -#endif - -#ifdef __cplusplus -} // extern "C" -#endif - -#endif diff --git a/WebRtc.NET/include/third_party/libvpx/source/config/linux/mipsel/vpx_scale_rtcd.h b/WebRtc.NET/include/third_party/libvpx/source/config/linux/mipsel/vpx_scale_rtcd.h deleted file mode 100644 index f419cc7a..00000000 --- a/WebRtc.NET/include/third_party/libvpx/source/config/linux/mipsel/vpx_scale_rtcd.h +++ /dev/null @@ -1,66 +0,0 @@ -#ifndef VPX_SCALE_RTCD_H_ -#define VPX_SCALE_RTCD_H_ - -#ifdef RTCD_C -#define RTCD_EXTERN -#else -#define RTCD_EXTERN extern -#endif - -struct yv12_buffer_config; - -#ifdef __cplusplus -extern "C" { -#endif - -void vp8_horizontal_line_2_1_scale_c(const unsigned char *source, unsigned int source_width, unsigned char *dest, unsigned int dest_width); -#define vp8_horizontal_line_2_1_scale vp8_horizontal_line_2_1_scale_c - -void vp8_horizontal_line_5_3_scale_c(const unsigned char *source, unsigned int source_width, unsigned char *dest, unsigned int dest_width); -#define vp8_horizontal_line_5_3_scale vp8_horizontal_line_5_3_scale_c - -void vp8_horizontal_line_5_4_scale_c(const unsigned char *source, unsigned int source_width, unsigned char *dest, unsigned int dest_width); -#define vp8_horizontal_line_5_4_scale vp8_horizontal_line_5_4_scale_c - -void vp8_vertical_band_2_1_scale_c(unsigned char *source, unsigned int src_pitch, unsigned char *dest, unsigned int dest_pitch, unsigned int dest_width); -#define vp8_vertical_band_2_1_scale vp8_vertical_band_2_1_scale_c - -void vp8_vertical_band_2_1_scale_i_c(unsigned char *source, unsigned int src_pitch, unsigned char *dest, unsigned int dest_pitch, unsigned int dest_width); -#define vp8_vertical_band_2_1_scale_i vp8_vertical_band_2_1_scale_i_c - -void vp8_vertical_band_5_3_scale_c(unsigned char *source, unsigned int src_pitch, unsigned char *dest, unsigned int dest_pitch, unsigned int dest_width); -#define vp8_vertical_band_5_3_scale vp8_vertical_band_5_3_scale_c - -void vp8_vertical_band_5_4_scale_c(unsigned char *source, unsigned int src_pitch, unsigned char *dest, unsigned int dest_pitch, unsigned int dest_width); -#define vp8_vertical_band_5_4_scale vp8_vertical_band_5_4_scale_c - -void vp8_yv12_copy_frame_c(const struct yv12_buffer_config *src_ybc, struct yv12_buffer_config *dst_ybc); -#define vp8_yv12_copy_frame vp8_yv12_copy_frame_c - -void vp8_yv12_extend_frame_borders_c(struct yv12_buffer_config *ybf); -#define vp8_yv12_extend_frame_borders vp8_yv12_extend_frame_borders_c - -void vpx_extend_frame_borders_c(struct yv12_buffer_config *ybf); -#define vpx_extend_frame_borders vpx_extend_frame_borders_c - -void vpx_extend_frame_inner_borders_c(struct yv12_buffer_config *ybf); -#define vpx_extend_frame_inner_borders vpx_extend_frame_inner_borders_c - -void vpx_yv12_copy_y_c(const struct yv12_buffer_config *src_ybc, struct yv12_buffer_config *dst_ybc); -#define vpx_yv12_copy_y vpx_yv12_copy_y_c - -void vpx_scale_rtcd(void); - -#include "vpx_config.h" - -#ifdef RTCD_C -static void setup_rtcd_internal(void) -{ -} -#endif - -#ifdef __cplusplus -} // extern "C" -#endif - -#endif diff --git a/WebRtc.NET/include/third_party/libvpx/source/config/linux/x64/vp8_rtcd.h b/WebRtc.NET/include/third_party/libvpx/source/config/linux/x64/vp8_rtcd.h deleted file mode 100644 index 8dcc9eb2..00000000 --- a/WebRtc.NET/include/third_party/libvpx/source/config/linux/x64/vp8_rtcd.h +++ /dev/null @@ -1,260 +0,0 @@ -#ifndef VP8_RTCD_H_ -#define VP8_RTCD_H_ - -#ifdef RTCD_C -#define RTCD_EXTERN -#else -#define RTCD_EXTERN extern -#endif - -/* - * VP8 - */ - -struct blockd; -struct macroblockd; -struct loop_filter_info; - -/* Encoder forward decls */ -struct block; -struct macroblock; -struct variance_vtable; -union int_mv; -struct yv12_buffer_config; - -#ifdef __cplusplus -extern "C" { -#endif - -void vp8_bilinear_predict16x16_c(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch); -void vp8_bilinear_predict16x16_sse2(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch); -void vp8_bilinear_predict16x16_ssse3(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch); -RTCD_EXTERN void (*vp8_bilinear_predict16x16)(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch); - -void vp8_bilinear_predict4x4_c(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch); -void vp8_bilinear_predict4x4_mmx(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch); -#define vp8_bilinear_predict4x4 vp8_bilinear_predict4x4_mmx - -void vp8_bilinear_predict8x4_c(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch); -void vp8_bilinear_predict8x4_mmx(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch); -#define vp8_bilinear_predict8x4 vp8_bilinear_predict8x4_mmx - -void vp8_bilinear_predict8x8_c(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch); -void vp8_bilinear_predict8x8_sse2(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch); -void vp8_bilinear_predict8x8_ssse3(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch); -RTCD_EXTERN void (*vp8_bilinear_predict8x8)(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch); - -void vp8_blend_b_c(unsigned char *y, unsigned char *u, unsigned char *v, int y1, int u1, int v1, int alpha, int stride); -#define vp8_blend_b vp8_blend_b_c - -void vp8_blend_mb_inner_c(unsigned char *y, unsigned char *u, unsigned char *v, int y1, int u1, int v1, int alpha, int stride); -#define vp8_blend_mb_inner vp8_blend_mb_inner_c - -void vp8_blend_mb_outer_c(unsigned char *y, unsigned char *u, unsigned char *v, int y1, int u1, int v1, int alpha, int stride); -#define vp8_blend_mb_outer vp8_blend_mb_outer_c - -int vp8_block_error_c(short *coeff, short *dqcoeff); -int vp8_block_error_sse2(short *coeff, short *dqcoeff); -#define vp8_block_error vp8_block_error_sse2 - -void vp8_copy32xn_c(const unsigned char *src_ptr, int source_stride, unsigned char *dst_ptr, int dst_stride, int n); -void vp8_copy32xn_sse2(const unsigned char *src_ptr, int source_stride, unsigned char *dst_ptr, int dst_stride, int n); -void vp8_copy32xn_sse3(const unsigned char *src_ptr, int source_stride, unsigned char *dst_ptr, int dst_stride, int n); -RTCD_EXTERN void (*vp8_copy32xn)(const unsigned char *src_ptr, int source_stride, unsigned char *dst_ptr, int dst_stride, int n); - -void vp8_copy_mem16x16_c(unsigned char *src, int src_pitch, unsigned char *dst, int dst_pitch); -void vp8_copy_mem16x16_sse2(unsigned char *src, int src_pitch, unsigned char *dst, int dst_pitch); -#define vp8_copy_mem16x16 vp8_copy_mem16x16_sse2 - -void vp8_copy_mem8x4_c(unsigned char *src, int src_pitch, unsigned char *dst, int dst_pitch); -void vp8_copy_mem8x4_mmx(unsigned char *src, int src_pitch, unsigned char *dst, int dst_pitch); -#define vp8_copy_mem8x4 vp8_copy_mem8x4_mmx - -void vp8_copy_mem8x8_c(unsigned char *src, int src_pitch, unsigned char *dst, int dst_pitch); -void vp8_copy_mem8x8_mmx(unsigned char *src, int src_pitch, unsigned char *dst, int dst_pitch); -#define vp8_copy_mem8x8 vp8_copy_mem8x8_mmx - -void vp8_dc_only_idct_add_c(short input, unsigned char *pred, int pred_stride, unsigned char *dst, int dst_stride); -void vp8_dc_only_idct_add_mmx(short input, unsigned char *pred, int pred_stride, unsigned char *dst, int dst_stride); -#define vp8_dc_only_idct_add vp8_dc_only_idct_add_mmx - -int vp8_denoiser_filter_c(unsigned char *mc_running_avg_y, int mc_avg_y_stride, unsigned char *running_avg_y, int avg_y_stride, unsigned char *sig, int sig_stride, unsigned int motion_magnitude, int increase_denoising); -int vp8_denoiser_filter_sse2(unsigned char *mc_running_avg_y, int mc_avg_y_stride, unsigned char *running_avg_y, int avg_y_stride, unsigned char *sig, int sig_stride, unsigned int motion_magnitude, int increase_denoising); -#define vp8_denoiser_filter vp8_denoiser_filter_sse2 - -int vp8_denoiser_filter_uv_c(unsigned char *mc_running_avg, int mc_avg_stride, unsigned char *running_avg, int avg_stride, unsigned char *sig, int sig_stride, unsigned int motion_magnitude, int increase_denoising); -int vp8_denoiser_filter_uv_sse2(unsigned char *mc_running_avg, int mc_avg_stride, unsigned char *running_avg, int avg_stride, unsigned char *sig, int sig_stride, unsigned int motion_magnitude, int increase_denoising); -#define vp8_denoiser_filter_uv vp8_denoiser_filter_uv_sse2 - -void vp8_dequant_idct_add_c(short *input, short *dq, unsigned char *output, int stride); -void vp8_dequant_idct_add_mmx(short *input, short *dq, unsigned char *output, int stride); -#define vp8_dequant_idct_add vp8_dequant_idct_add_mmx - -void vp8_dequant_idct_add_uv_block_c(short *q, short *dq, unsigned char *dst_u, unsigned char *dst_v, int stride, char *eobs); -void vp8_dequant_idct_add_uv_block_sse2(short *q, short *dq, unsigned char *dst_u, unsigned char *dst_v, int stride, char *eobs); -#define vp8_dequant_idct_add_uv_block vp8_dequant_idct_add_uv_block_sse2 - -void vp8_dequant_idct_add_y_block_c(short *q, short *dq, unsigned char *dst, int stride, char *eobs); -void vp8_dequant_idct_add_y_block_sse2(short *q, short *dq, unsigned char *dst, int stride, char *eobs); -#define vp8_dequant_idct_add_y_block vp8_dequant_idct_add_y_block_sse2 - -void vp8_dequantize_b_c(struct blockd*, short *dqc); -void vp8_dequantize_b_mmx(struct blockd*, short *dqc); -#define vp8_dequantize_b vp8_dequantize_b_mmx - -int vp8_diamond_search_sad_c(struct macroblock *x, struct block *b, struct blockd *d, union int_mv *ref_mv, union int_mv *best_mv, int search_param, int sad_per_bit, int *num00, struct variance_vtable *fn_ptr, int *mvcost[2], union int_mv *center_mv); -int vp8_diamond_search_sadx4(struct macroblock *x, struct block *b, struct blockd *d, union int_mv *ref_mv, union int_mv *best_mv, int search_param, int sad_per_bit, int *num00, struct variance_vtable *fn_ptr, int *mvcost[2], union int_mv *center_mv); -#define vp8_diamond_search_sad vp8_diamond_search_sadx4 - -void vp8_fast_quantize_b_c(struct block *, struct blockd *); -void vp8_fast_quantize_b_sse2(struct block *, struct blockd *); -void vp8_fast_quantize_b_ssse3(struct block *, struct blockd *); -RTCD_EXTERN void (*vp8_fast_quantize_b)(struct block *, struct blockd *); - -void vp8_filter_by_weight16x16_c(unsigned char *src, int src_stride, unsigned char *dst, int dst_stride, int src_weight); -void vp8_filter_by_weight16x16_sse2(unsigned char *src, int src_stride, unsigned char *dst, int dst_stride, int src_weight); -#define vp8_filter_by_weight16x16 vp8_filter_by_weight16x16_sse2 - -void vp8_filter_by_weight4x4_c(unsigned char *src, int src_stride, unsigned char *dst, int dst_stride, int src_weight); -#define vp8_filter_by_weight4x4 vp8_filter_by_weight4x4_c - -void vp8_filter_by_weight8x8_c(unsigned char *src, int src_stride, unsigned char *dst, int dst_stride, int src_weight); -void vp8_filter_by_weight8x8_sse2(unsigned char *src, int src_stride, unsigned char *dst, int dst_stride, int src_weight); -#define vp8_filter_by_weight8x8 vp8_filter_by_weight8x8_sse2 - -int vp8_full_search_sad_c(struct macroblock *x, struct block *b, struct blockd *d, union int_mv *ref_mv, int sad_per_bit, int distance, struct variance_vtable *fn_ptr, int *mvcost[2], union int_mv *center_mv); -int vp8_full_search_sadx3(struct macroblock *x, struct block *b, struct blockd *d, union int_mv *ref_mv, int sad_per_bit, int distance, struct variance_vtable *fn_ptr, int *mvcost[2], union int_mv *center_mv); -int vp8_full_search_sadx8(struct macroblock *x, struct block *b, struct blockd *d, union int_mv *ref_mv, int sad_per_bit, int distance, struct variance_vtable *fn_ptr, int *mvcost[2], union int_mv *center_mv); -RTCD_EXTERN int (*vp8_full_search_sad)(struct macroblock *x, struct block *b, struct blockd *d, union int_mv *ref_mv, int sad_per_bit, int distance, struct variance_vtable *fn_ptr, int *mvcost[2], union int_mv *center_mv); - -void vp8_loop_filter_bh_c(unsigned char *y, unsigned char *u, unsigned char *v, int ystride, int uv_stride, struct loop_filter_info *lfi); -void vp8_loop_filter_bh_sse2(unsigned char *y, unsigned char *u, unsigned char *v, int ystride, int uv_stride, struct loop_filter_info *lfi); -#define vp8_loop_filter_bh vp8_loop_filter_bh_sse2 - -void vp8_loop_filter_bv_c(unsigned char *y, unsigned char *u, unsigned char *v, int ystride, int uv_stride, struct loop_filter_info *lfi); -void vp8_loop_filter_bv_sse2(unsigned char *y, unsigned char *u, unsigned char *v, int ystride, int uv_stride, struct loop_filter_info *lfi); -#define vp8_loop_filter_bv vp8_loop_filter_bv_sse2 - -void vp8_loop_filter_mbh_c(unsigned char *y, unsigned char *u, unsigned char *v, int ystride, int uv_stride, struct loop_filter_info *lfi); -void vp8_loop_filter_mbh_sse2(unsigned char *y, unsigned char *u, unsigned char *v, int ystride, int uv_stride, struct loop_filter_info *lfi); -#define vp8_loop_filter_mbh vp8_loop_filter_mbh_sse2 - -void vp8_loop_filter_mbv_c(unsigned char *y, unsigned char *u, unsigned char *v, int ystride, int uv_stride, struct loop_filter_info *lfi); -void vp8_loop_filter_mbv_sse2(unsigned char *y, unsigned char *u, unsigned char *v, int ystride, int uv_stride, struct loop_filter_info *lfi); -#define vp8_loop_filter_mbv vp8_loop_filter_mbv_sse2 - -void vp8_loop_filter_bhs_c(unsigned char *y, int ystride, const unsigned char *blimit); -void vp8_loop_filter_bhs_sse2(unsigned char *y, int ystride, const unsigned char *blimit); -#define vp8_loop_filter_simple_bh vp8_loop_filter_bhs_sse2 - -void vp8_loop_filter_bvs_c(unsigned char *y, int ystride, const unsigned char *blimit); -void vp8_loop_filter_bvs_sse2(unsigned char *y, int ystride, const unsigned char *blimit); -#define vp8_loop_filter_simple_bv vp8_loop_filter_bvs_sse2 - -void vp8_loop_filter_simple_horizontal_edge_c(unsigned char *y, int ystride, const unsigned char *blimit); -void vp8_loop_filter_simple_horizontal_edge_sse2(unsigned char *y, int ystride, const unsigned char *blimit); -#define vp8_loop_filter_simple_mbh vp8_loop_filter_simple_horizontal_edge_sse2 - -void vp8_loop_filter_simple_vertical_edge_c(unsigned char *y, int ystride, const unsigned char *blimit); -void vp8_loop_filter_simple_vertical_edge_sse2(unsigned char *y, int ystride, const unsigned char *blimit); -#define vp8_loop_filter_simple_mbv vp8_loop_filter_simple_vertical_edge_sse2 - -int vp8_mbblock_error_c(struct macroblock *mb, int dc); -int vp8_mbblock_error_sse2(struct macroblock *mb, int dc); -#define vp8_mbblock_error vp8_mbblock_error_sse2 - -int vp8_mbuverror_c(struct macroblock *mb); -int vp8_mbuverror_sse2(struct macroblock *mb); -#define vp8_mbuverror vp8_mbuverror_sse2 - -int vp8_refining_search_sad_c(struct macroblock *x, struct block *b, struct blockd *d, union int_mv *ref_mv, int sad_per_bit, int distance, struct variance_vtable *fn_ptr, int *mvcost[2], union int_mv *center_mv); -int vp8_refining_search_sadx4(struct macroblock *x, struct block *b, struct blockd *d, union int_mv *ref_mv, int sad_per_bit, int distance, struct variance_vtable *fn_ptr, int *mvcost[2], union int_mv *center_mv); -#define vp8_refining_search_sad vp8_refining_search_sadx4 - -void vp8_regular_quantize_b_c(struct block *, struct blockd *); -void vp8_regular_quantize_b_sse2(struct block *, struct blockd *); -void vp8_regular_quantize_b_sse4_1(struct block *, struct blockd *); -RTCD_EXTERN void (*vp8_regular_quantize_b)(struct block *, struct blockd *); - -void vp8_short_fdct4x4_c(short *input, short *output, int pitch); -void vp8_short_fdct4x4_sse2(short *input, short *output, int pitch); -#define vp8_short_fdct4x4 vp8_short_fdct4x4_sse2 - -void vp8_short_fdct8x4_c(short *input, short *output, int pitch); -void vp8_short_fdct8x4_sse2(short *input, short *output, int pitch); -#define vp8_short_fdct8x4 vp8_short_fdct8x4_sse2 - -void vp8_short_idct4x4llm_c(short *input, unsigned char *pred, int pitch, unsigned char *dst, int dst_stride); -void vp8_short_idct4x4llm_mmx(short *input, unsigned char *pred, int pitch, unsigned char *dst, int dst_stride); -#define vp8_short_idct4x4llm vp8_short_idct4x4llm_mmx - -void vp8_short_inv_walsh4x4_c(short *input, short *output); -void vp8_short_inv_walsh4x4_sse2(short *input, short *output); -#define vp8_short_inv_walsh4x4 vp8_short_inv_walsh4x4_sse2 - -void vp8_short_inv_walsh4x4_1_c(short *input, short *output); -#define vp8_short_inv_walsh4x4_1 vp8_short_inv_walsh4x4_1_c - -void vp8_short_walsh4x4_c(short *input, short *output, int pitch); -void vp8_short_walsh4x4_sse2(short *input, short *output, int pitch); -#define vp8_short_walsh4x4 vp8_short_walsh4x4_sse2 - -void vp8_sixtap_predict16x16_c(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch); -void vp8_sixtap_predict16x16_sse2(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch); -void vp8_sixtap_predict16x16_ssse3(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch); -RTCD_EXTERN void (*vp8_sixtap_predict16x16)(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch); - -void vp8_sixtap_predict4x4_c(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch); -void vp8_sixtap_predict4x4_mmx(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch); -void vp8_sixtap_predict4x4_ssse3(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch); -RTCD_EXTERN void (*vp8_sixtap_predict4x4)(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch); - -void vp8_sixtap_predict8x4_c(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch); -void vp8_sixtap_predict8x4_sse2(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch); -void vp8_sixtap_predict8x4_ssse3(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch); -RTCD_EXTERN void (*vp8_sixtap_predict8x4)(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch); - -void vp8_sixtap_predict8x8_c(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch); -void vp8_sixtap_predict8x8_sse2(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch); -void vp8_sixtap_predict8x8_ssse3(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch); -RTCD_EXTERN void (*vp8_sixtap_predict8x8)(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch); - -void vp8_rtcd(void); - -#ifdef RTCD_C -#include "vpx_ports/x86.h" -static void setup_rtcd_internal(void) -{ - int flags = x86_simd_caps(); - - (void)flags; - - vp8_bilinear_predict16x16 = vp8_bilinear_predict16x16_sse2; - if (flags & HAS_SSSE3) vp8_bilinear_predict16x16 = vp8_bilinear_predict16x16_ssse3; - vp8_bilinear_predict8x8 = vp8_bilinear_predict8x8_sse2; - if (flags & HAS_SSSE3) vp8_bilinear_predict8x8 = vp8_bilinear_predict8x8_ssse3; - vp8_copy32xn = vp8_copy32xn_sse2; - if (flags & HAS_SSE3) vp8_copy32xn = vp8_copy32xn_sse3; - vp8_fast_quantize_b = vp8_fast_quantize_b_sse2; - if (flags & HAS_SSSE3) vp8_fast_quantize_b = vp8_fast_quantize_b_ssse3; - vp8_full_search_sad = vp8_full_search_sad_c; - if (flags & HAS_SSE3) vp8_full_search_sad = vp8_full_search_sadx3; - if (flags & HAS_SSE4_1) vp8_full_search_sad = vp8_full_search_sadx8; - vp8_regular_quantize_b = vp8_regular_quantize_b_sse2; - if (flags & HAS_SSE4_1) vp8_regular_quantize_b = vp8_regular_quantize_b_sse4_1; - vp8_sixtap_predict16x16 = vp8_sixtap_predict16x16_sse2; - if (flags & HAS_SSSE3) vp8_sixtap_predict16x16 = vp8_sixtap_predict16x16_ssse3; - vp8_sixtap_predict4x4 = vp8_sixtap_predict4x4_mmx; - if (flags & HAS_SSSE3) vp8_sixtap_predict4x4 = vp8_sixtap_predict4x4_ssse3; - vp8_sixtap_predict8x4 = vp8_sixtap_predict8x4_sse2; - if (flags & HAS_SSSE3) vp8_sixtap_predict8x4 = vp8_sixtap_predict8x4_ssse3; - vp8_sixtap_predict8x8 = vp8_sixtap_predict8x8_sse2; - if (flags & HAS_SSSE3) vp8_sixtap_predict8x8 = vp8_sixtap_predict8x8_ssse3; -} -#endif - -#ifdef __cplusplus -} // extern "C" -#endif - -#endif diff --git a/WebRtc.NET/include/third_party/libvpx/source/config/linux/x64/vp9_rtcd.h b/WebRtc.NET/include/third_party/libvpx/source/config/linux/x64/vp9_rtcd.h deleted file mode 100644 index 072f858e..00000000 --- a/WebRtc.NET/include/third_party/libvpx/source/config/linux/x64/vp9_rtcd.h +++ /dev/null @@ -1,172 +0,0 @@ -#ifndef VP9_RTCD_H_ -#define VP9_RTCD_H_ - -#ifdef RTCD_C -#define RTCD_EXTERN -#else -#define RTCD_EXTERN extern -#endif - -/* - * VP9 - */ - -#include "vpx/vpx_integer.h" -#include "vp9/common/vp9_common.h" -#include "vp9/common/vp9_enums.h" - -struct macroblockd; - -/* Encoder forward decls */ -struct macroblock; -struct vp9_variance_vtable; -struct search_site_config; -struct mv; -union int_mv; -struct yv12_buffer_config; - -#ifdef __cplusplus -extern "C" { -#endif - -int64_t vp9_block_error_c(const tran_low_t *coeff, const tran_low_t *dqcoeff, intptr_t block_size, int64_t *ssz); -#define vp9_block_error vp9_block_error_c - -int vp9_denoiser_filter_c(const uint8_t *sig, int sig_stride, const uint8_t *mc_avg, int mc_avg_stride, uint8_t *avg, int avg_stride, int increase_denoising, BLOCK_SIZE bs, int motion_magnitude); -int vp9_denoiser_filter_sse2(const uint8_t *sig, int sig_stride, const uint8_t *mc_avg, int mc_avg_stride, uint8_t *avg, int avg_stride, int increase_denoising, BLOCK_SIZE bs, int motion_magnitude); -#define vp9_denoiser_filter vp9_denoiser_filter_sse2 - -int vp9_diamond_search_sad_c(const struct macroblock *x, const struct search_site_config *cfg, struct mv *ref_mv, struct mv *best_mv, int search_param, int sad_per_bit, int *num00, const struct vp9_variance_vtable *fn_ptr, const struct mv *center_mv); -int vp9_diamond_search_sad_avx(const struct macroblock *x, const struct search_site_config *cfg, struct mv *ref_mv, struct mv *best_mv, int search_param, int sad_per_bit, int *num00, const struct vp9_variance_vtable *fn_ptr, const struct mv *center_mv); -RTCD_EXTERN int (*vp9_diamond_search_sad)(const struct macroblock *x, const struct search_site_config *cfg, struct mv *ref_mv, struct mv *best_mv, int search_param, int sad_per_bit, int *num00, const struct vp9_variance_vtable *fn_ptr, const struct mv *center_mv); - -void vp9_fdct8x8_quant_c(const int16_t *input, int stride, tran_low_t *coeff_ptr, intptr_t n_coeffs, int skip_block, const int16_t *zbin_ptr, const int16_t *round_ptr, const int16_t *quant_ptr, const int16_t *quant_shift_ptr, tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr, const int16_t *dequant_ptr, uint16_t *eob_ptr, const int16_t *scan, const int16_t *iscan); -void vp9_fdct8x8_quant_ssse3(const int16_t *input, int stride, tran_low_t *coeff_ptr, intptr_t n_coeffs, int skip_block, const int16_t *zbin_ptr, const int16_t *round_ptr, const int16_t *quant_ptr, const int16_t *quant_shift_ptr, tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr, const int16_t *dequant_ptr, uint16_t *eob_ptr, const int16_t *scan, const int16_t *iscan); -RTCD_EXTERN void (*vp9_fdct8x8_quant)(const int16_t *input, int stride, tran_low_t *coeff_ptr, intptr_t n_coeffs, int skip_block, const int16_t *zbin_ptr, const int16_t *round_ptr, const int16_t *quant_ptr, const int16_t *quant_shift_ptr, tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr, const int16_t *dequant_ptr, uint16_t *eob_ptr, const int16_t *scan, const int16_t *iscan); - -void vp9_fht16x16_c(const int16_t *input, tran_low_t *output, int stride, int tx_type); -void vp9_fht16x16_sse2(const int16_t *input, tran_low_t *output, int stride, int tx_type); -#define vp9_fht16x16 vp9_fht16x16_sse2 - -void vp9_fht4x4_c(const int16_t *input, tran_low_t *output, int stride, int tx_type); -void vp9_fht4x4_sse2(const int16_t *input, tran_low_t *output, int stride, int tx_type); -#define vp9_fht4x4 vp9_fht4x4_sse2 - -void vp9_fht8x8_c(const int16_t *input, tran_low_t *output, int stride, int tx_type); -void vp9_fht8x8_sse2(const int16_t *input, tran_low_t *output, int stride, int tx_type); -#define vp9_fht8x8 vp9_fht8x8_sse2 - -void vp9_filter_by_weight16x16_c(const uint8_t *src, int src_stride, uint8_t *dst, int dst_stride, int src_weight); -void vp9_filter_by_weight16x16_sse2(const uint8_t *src, int src_stride, uint8_t *dst, int dst_stride, int src_weight); -#define vp9_filter_by_weight16x16 vp9_filter_by_weight16x16_sse2 - -void vp9_filter_by_weight8x8_c(const uint8_t *src, int src_stride, uint8_t *dst, int dst_stride, int src_weight); -void vp9_filter_by_weight8x8_sse2(const uint8_t *src, int src_stride, uint8_t *dst, int dst_stride, int src_weight); -#define vp9_filter_by_weight8x8 vp9_filter_by_weight8x8_sse2 - -int vp9_full_search_sad_c(const struct macroblock *x, const struct mv *ref_mv, int sad_per_bit, int distance, const struct vp9_variance_vtable *fn_ptr, const struct mv *center_mv, struct mv *best_mv); -int vp9_full_search_sadx3(const struct macroblock *x, const struct mv *ref_mv, int sad_per_bit, int distance, const struct vp9_variance_vtable *fn_ptr, const struct mv *center_mv, struct mv *best_mv); -int vp9_full_search_sadx8(const struct macroblock *x, const struct mv *ref_mv, int sad_per_bit, int distance, const struct vp9_variance_vtable *fn_ptr, const struct mv *center_mv, struct mv *best_mv); -RTCD_EXTERN int (*vp9_full_search_sad)(const struct macroblock *x, const struct mv *ref_mv, int sad_per_bit, int distance, const struct vp9_variance_vtable *fn_ptr, const struct mv *center_mv, struct mv *best_mv); - -void vp9_fwht4x4_c(const int16_t *input, tran_low_t *output, int stride); -void vp9_fwht4x4_sse2(const int16_t *input, tran_low_t *output, int stride); -#define vp9_fwht4x4 vp9_fwht4x4_sse2 - -int64_t vp9_highbd_block_error_c(const tran_low_t *coeff, const tran_low_t *dqcoeff, intptr_t block_size, int64_t *ssz, int bd); -int64_t vp9_highbd_block_error_sse2(const tran_low_t *coeff, const tran_low_t *dqcoeff, intptr_t block_size, int64_t *ssz, int bd); -#define vp9_highbd_block_error vp9_highbd_block_error_sse2 - -int64_t vp9_highbd_block_error_8bit_c(const tran_low_t *coeff, const tran_low_t *dqcoeff, intptr_t block_size, int64_t *ssz); -int64_t vp9_highbd_block_error_8bit_sse2(const tran_low_t *coeff, const tran_low_t *dqcoeff, intptr_t block_size, int64_t *ssz); -int64_t vp9_highbd_block_error_8bit_avx(const tran_low_t *coeff, const tran_low_t *dqcoeff, intptr_t block_size, int64_t *ssz); -RTCD_EXTERN int64_t (*vp9_highbd_block_error_8bit)(const tran_low_t *coeff, const tran_low_t *dqcoeff, intptr_t block_size, int64_t *ssz); - -void vp9_highbd_fht16x16_c(const int16_t *input, tran_low_t *output, int stride, int tx_type); -#define vp9_highbd_fht16x16 vp9_highbd_fht16x16_c - -void vp9_highbd_fht4x4_c(const int16_t *input, tran_low_t *output, int stride, int tx_type); -#define vp9_highbd_fht4x4 vp9_highbd_fht4x4_c - -void vp9_highbd_fht8x8_c(const int16_t *input, tran_low_t *output, int stride, int tx_type); -#define vp9_highbd_fht8x8 vp9_highbd_fht8x8_c - -void vp9_highbd_fwht4x4_c(const int16_t *input, tran_low_t *output, int stride); -#define vp9_highbd_fwht4x4 vp9_highbd_fwht4x4_c - -void vp9_highbd_iht16x16_256_add_c(const tran_low_t *input, uint8_t *output, int pitch, int tx_type, int bd); -#define vp9_highbd_iht16x16_256_add vp9_highbd_iht16x16_256_add_c - -void vp9_highbd_iht4x4_16_add_c(const tran_low_t *input, uint8_t *dest, int stride, int tx_type, int bd); -#define vp9_highbd_iht4x4_16_add vp9_highbd_iht4x4_16_add_c - -void vp9_highbd_iht8x8_64_add_c(const tran_low_t *input, uint8_t *dest, int stride, int tx_type, int bd); -#define vp9_highbd_iht8x8_64_add vp9_highbd_iht8x8_64_add_c - -void vp9_highbd_mbpost_proc_across_ip_c(uint16_t *src, int pitch, int rows, int cols, int flimit); -#define vp9_highbd_mbpost_proc_across_ip vp9_highbd_mbpost_proc_across_ip_c - -void vp9_highbd_mbpost_proc_down_c(uint16_t *dst, int pitch, int rows, int cols, int flimit); -#define vp9_highbd_mbpost_proc_down vp9_highbd_mbpost_proc_down_c - -void vp9_highbd_post_proc_down_and_across_c(const uint16_t *src_ptr, uint16_t *dst_ptr, int src_pixels_per_line, int dst_pixels_per_line, int rows, int cols, int flimit); -#define vp9_highbd_post_proc_down_and_across vp9_highbd_post_proc_down_and_across_c - -void vp9_highbd_quantize_fp_c(const tran_low_t *coeff_ptr, intptr_t n_coeffs, int skip_block, const int16_t *zbin_ptr, const int16_t *round_ptr, const int16_t *quant_ptr, const int16_t *quant_shift_ptr, tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr, const int16_t *dequant_ptr, uint16_t *eob_ptr, const int16_t *scan, const int16_t *iscan); -#define vp9_highbd_quantize_fp vp9_highbd_quantize_fp_c - -void vp9_highbd_quantize_fp_32x32_c(const tran_low_t *coeff_ptr, intptr_t n_coeffs, int skip_block, const int16_t *zbin_ptr, const int16_t *round_ptr, const int16_t *quant_ptr, const int16_t *quant_shift_ptr, tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr, const int16_t *dequant_ptr, uint16_t *eob_ptr, const int16_t *scan, const int16_t *iscan); -#define vp9_highbd_quantize_fp_32x32 vp9_highbd_quantize_fp_32x32_c - -void vp9_highbd_temporal_filter_apply_c(uint8_t *frame1, unsigned int stride, uint8_t *frame2, unsigned int block_width, unsigned int block_height, int strength, int filter_weight, unsigned int *accumulator, uint16_t *count); -#define vp9_highbd_temporal_filter_apply vp9_highbd_temporal_filter_apply_c - -void vp9_iht16x16_256_add_c(const tran_low_t *input, uint8_t *output, int pitch, int tx_type); -void vp9_iht16x16_256_add_sse2(const tran_low_t *input, uint8_t *output, int pitch, int tx_type); -#define vp9_iht16x16_256_add vp9_iht16x16_256_add_sse2 - -void vp9_iht4x4_16_add_c(const tran_low_t *input, uint8_t *dest, int stride, int tx_type); -void vp9_iht4x4_16_add_sse2(const tran_low_t *input, uint8_t *dest, int stride, int tx_type); -#define vp9_iht4x4_16_add vp9_iht4x4_16_add_sse2 - -void vp9_iht8x8_64_add_c(const tran_low_t *input, uint8_t *dest, int stride, int tx_type); -void vp9_iht8x8_64_add_sse2(const tran_low_t *input, uint8_t *dest, int stride, int tx_type); -#define vp9_iht8x8_64_add vp9_iht8x8_64_add_sse2 - -void vp9_quantize_fp_c(const tran_low_t *coeff_ptr, intptr_t n_coeffs, int skip_block, const int16_t *zbin_ptr, const int16_t *round_ptr, const int16_t *quant_ptr, const int16_t *quant_shift_ptr, tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr, const int16_t *dequant_ptr, uint16_t *eob_ptr, const int16_t *scan, const int16_t *iscan); -#define vp9_quantize_fp vp9_quantize_fp_c - -void vp9_quantize_fp_32x32_c(const tran_low_t *coeff_ptr, intptr_t n_coeffs, int skip_block, const int16_t *zbin_ptr, const int16_t *round_ptr, const int16_t *quant_ptr, const int16_t *quant_shift_ptr, tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr, const int16_t *dequant_ptr, uint16_t *eob_ptr, const int16_t *scan, const int16_t *iscan); -#define vp9_quantize_fp_32x32 vp9_quantize_fp_32x32_c - -void vp9_temporal_filter_apply_c(uint8_t *frame1, unsigned int stride, uint8_t *frame2, unsigned int block_width, unsigned int block_height, int strength, int filter_weight, unsigned int *accumulator, uint16_t *count); -void vp9_temporal_filter_apply_sse2(uint8_t *frame1, unsigned int stride, uint8_t *frame2, unsigned int block_width, unsigned int block_height, int strength, int filter_weight, unsigned int *accumulator, uint16_t *count); -#define vp9_temporal_filter_apply vp9_temporal_filter_apply_sse2 - -void vp9_rtcd(void); - -#ifdef RTCD_C -#include "vpx_ports/x86.h" -static void setup_rtcd_internal(void) -{ - int flags = x86_simd_caps(); - - (void)flags; - - vp9_diamond_search_sad = vp9_diamond_search_sad_c; - if (flags & HAS_AVX) vp9_diamond_search_sad = vp9_diamond_search_sad_avx; - vp9_fdct8x8_quant = vp9_fdct8x8_quant_c; - if (flags & HAS_SSSE3) vp9_fdct8x8_quant = vp9_fdct8x8_quant_ssse3; - vp9_full_search_sad = vp9_full_search_sad_c; - if (flags & HAS_SSE3) vp9_full_search_sad = vp9_full_search_sadx3; - if (flags & HAS_SSE4_1) vp9_full_search_sad = vp9_full_search_sadx8; - vp9_highbd_block_error_8bit = vp9_highbd_block_error_8bit_sse2; - if (flags & HAS_AVX) vp9_highbd_block_error_8bit = vp9_highbd_block_error_8bit_avx; -} -#endif - -#ifdef __cplusplus -} // extern "C" -#endif - -#endif diff --git a/WebRtc.NET/include/third_party/libvpx/source/config/linux/x64/vpx_config.h b/WebRtc.NET/include/third_party/libvpx/source/config/linux/x64/vpx_config.h deleted file mode 100644 index f57a7da9..00000000 --- a/WebRtc.NET/include/third_party/libvpx/source/config/linux/x64/vpx_config.h +++ /dev/null @@ -1,94 +0,0 @@ -/* Copyright (c) 2011 The WebM project authors. All Rights Reserved. */ -/* */ -/* Use of this source code is governed by a BSD-style license */ -/* that can be found in the LICENSE file in the root of the source */ -/* tree. An additional intellectual property rights grant can be found */ -/* in the file PATENTS. All contributing project authors may */ -/* be found in the AUTHORS file in the root of the source tree. */ -/* This file automatically generated by configure. Do not edit! */ -#ifndef VPX_CONFIG_H -#define VPX_CONFIG_H -#define RESTRICT -#define INLINE inline -#define ARCH_ARM 0 -#define ARCH_MIPS 0 -#define ARCH_X86 0 -#define ARCH_X86_64 1 -#define HAVE_NEON 0 -#define HAVE_NEON_ASM 0 -#define HAVE_MIPS32 0 -#define HAVE_DSPR2 0 -#define HAVE_MSA 0 -#define HAVE_MIPS64 0 -#define HAVE_MMX 1 -#define HAVE_SSE 1 -#define HAVE_SSE2 1 -#define HAVE_SSE3 1 -#define HAVE_SSSE3 1 -#define HAVE_SSE4_1 1 -#define HAVE_AVX 1 -#define HAVE_AVX2 1 -#define HAVE_VPX_PORTS 1 -#define HAVE_PTHREAD_H 1 -#define HAVE_UNISTD_H 0 -#define CONFIG_DEPENDENCY_TRACKING 1 -#define CONFIG_EXTERNAL_BUILD 1 -#define CONFIG_INSTALL_DOCS 0 -#define CONFIG_INSTALL_BINS 1 -#define CONFIG_INSTALL_LIBS 1 -#define CONFIG_INSTALL_SRCS 0 -#define CONFIG_DEBUG 0 -#define CONFIG_GPROF 0 -#define CONFIG_GCOV 0 -#define CONFIG_RVCT 0 -#define CONFIG_GCC 1 -#define CONFIG_MSVS 0 -#define CONFIG_PIC 1 -#define CONFIG_BIG_ENDIAN 0 -#define CONFIG_CODEC_SRCS 0 -#define CONFIG_DEBUG_LIBS 0 -#define CONFIG_DEQUANT_TOKENS 0 -#define CONFIG_DC_RECON 0 -#define CONFIG_RUNTIME_CPU_DETECT 1 -#define CONFIG_POSTPROC 1 -#define CONFIG_VP9_POSTPROC 1 -#define CONFIG_MULTITHREAD 1 -#define CONFIG_INTERNAL_STATS 0 -#define CONFIG_VP8_ENCODER 1 -#define CONFIG_VP8_DECODER 1 -#define CONFIG_VP9_ENCODER 1 -#define CONFIG_VP9_DECODER 1 -#define CONFIG_VP8 1 -#define CONFIG_VP9 1 -#define CONFIG_ENCODERS 1 -#define CONFIG_DECODERS 1 -#define CONFIG_STATIC_MSVCRT 0 -#define CONFIG_SPATIAL_RESAMPLING 1 -#define CONFIG_REALTIME_ONLY 1 -#define CONFIG_ONTHEFLY_BITPACKING 0 -#define CONFIG_ERROR_CONCEALMENT 0 -#define CONFIG_SHARED 0 -#define CONFIG_STATIC 1 -#define CONFIG_SMALL 0 -#define CONFIG_POSTPROC_VISUALIZER 0 -#define CONFIG_OS_SUPPORT 1 -#define CONFIG_UNIT_TESTS 1 -#define CONFIG_WEBM_IO 1 -#define CONFIG_LIBYUV 1 -#define CONFIG_DECODE_PERF_TESTS 0 -#define CONFIG_ENCODE_PERF_TESTS 0 -#define CONFIG_MULTI_RES_ENCODING 1 -#define CONFIG_TEMPORAL_DENOISING 1 -#define CONFIG_VP9_TEMPORAL_DENOISING 1 -#define CONFIG_COEFFICIENT_RANGE_CHECKING 0 -#define CONFIG_VP9_HIGHBITDEPTH 1 -#define CONFIG_BETTER_HW_COMPATIBILITY 0 -#define CONFIG_EXPERIMENTAL 0 -#define CONFIG_SIZE_LIMIT 1 -#define CONFIG_SPATIAL_SVC 0 -#define CONFIG_FP_MB_STATS 0 -#define CONFIG_EMULATE_HARDWARE 0 -#define CONFIG_MISC_FIXES 0 -#define DECODE_WIDTH_LIMIT 16384 -#define DECODE_HEIGHT_LIMIT 16384 -#endif /* VPX_CONFIG_H */ diff --git a/WebRtc.NET/include/third_party/libvpx/source/config/linux/x64/vpx_dsp_rtcd.h b/WebRtc.NET/include/third_party/libvpx/source/config/linux/x64/vpx_dsp_rtcd.h deleted file mode 100644 index bcb567d8..00000000 --- a/WebRtc.NET/include/third_party/libvpx/source/config/linux/x64/vpx_dsp_rtcd.h +++ /dev/null @@ -1,2286 +0,0 @@ -#ifndef VPX_DSP_RTCD_H_ -#define VPX_DSP_RTCD_H_ - -#ifdef RTCD_C -#define RTCD_EXTERN -#else -#define RTCD_EXTERN extern -#endif - -/* - * DSP - */ - -#include "vpx/vpx_integer.h" -#include "vpx_dsp/vpx_dsp_common.h" - - -#ifdef __cplusplus -extern "C" { -#endif - -unsigned int vpx_avg_4x4_c(const uint8_t *, int p); -unsigned int vpx_avg_4x4_sse2(const uint8_t *, int p); -#define vpx_avg_4x4 vpx_avg_4x4_sse2 - -unsigned int vpx_avg_8x8_c(const uint8_t *, int p); -unsigned int vpx_avg_8x8_sse2(const uint8_t *, int p); -#define vpx_avg_8x8 vpx_avg_8x8_sse2 - -void vpx_comp_avg_pred_c(uint8_t *comp_pred, const uint8_t *pred, int width, int height, const uint8_t *ref, int ref_stride); -#define vpx_comp_avg_pred vpx_comp_avg_pred_c - -void vpx_convolve8_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -void vpx_convolve8_sse2(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -void vpx_convolve8_ssse3(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -void vpx_convolve8_avx2(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -RTCD_EXTERN void (*vpx_convolve8)(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); - -void vpx_convolve8_avg_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -void vpx_convolve8_avg_sse2(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -void vpx_convolve8_avg_ssse3(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -RTCD_EXTERN void (*vpx_convolve8_avg)(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); - -void vpx_convolve8_avg_horiz_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -void vpx_convolve8_avg_horiz_sse2(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -void vpx_convolve8_avg_horiz_ssse3(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -RTCD_EXTERN void (*vpx_convolve8_avg_horiz)(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); - -void vpx_convolve8_avg_vert_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -void vpx_convolve8_avg_vert_sse2(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -void vpx_convolve8_avg_vert_ssse3(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -RTCD_EXTERN void (*vpx_convolve8_avg_vert)(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); - -void vpx_convolve8_horiz_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -void vpx_convolve8_horiz_sse2(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -void vpx_convolve8_horiz_ssse3(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -void vpx_convolve8_horiz_avx2(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -RTCD_EXTERN void (*vpx_convolve8_horiz)(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); - -void vpx_convolve8_vert_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -void vpx_convolve8_vert_sse2(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -void vpx_convolve8_vert_ssse3(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -void vpx_convolve8_vert_avx2(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -RTCD_EXTERN void (*vpx_convolve8_vert)(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); - -void vpx_convolve_avg_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -void vpx_convolve_avg_sse2(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -#define vpx_convolve_avg vpx_convolve_avg_sse2 - -void vpx_convolve_copy_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -void vpx_convolve_copy_sse2(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -#define vpx_convolve_copy vpx_convolve_copy_sse2 - -void vpx_d117_predictor_16x16_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d117_predictor_16x16 vpx_d117_predictor_16x16_c - -void vpx_d117_predictor_32x32_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d117_predictor_32x32 vpx_d117_predictor_32x32_c - -void vpx_d117_predictor_4x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d117_predictor_4x4 vpx_d117_predictor_4x4_c - -void vpx_d117_predictor_8x8_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d117_predictor_8x8 vpx_d117_predictor_8x8_c - -void vpx_d135_predictor_16x16_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d135_predictor_16x16 vpx_d135_predictor_16x16_c - -void vpx_d135_predictor_32x32_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d135_predictor_32x32 vpx_d135_predictor_32x32_c - -void vpx_d135_predictor_4x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d135_predictor_4x4 vpx_d135_predictor_4x4_c - -void vpx_d135_predictor_8x8_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d135_predictor_8x8 vpx_d135_predictor_8x8_c - -void vpx_d153_predictor_16x16_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_d153_predictor_16x16_ssse3(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -RTCD_EXTERN void (*vpx_d153_predictor_16x16)(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); - -void vpx_d153_predictor_32x32_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_d153_predictor_32x32_ssse3(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -RTCD_EXTERN void (*vpx_d153_predictor_32x32)(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); - -void vpx_d153_predictor_4x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_d153_predictor_4x4_ssse3(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -RTCD_EXTERN void (*vpx_d153_predictor_4x4)(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); - -void vpx_d153_predictor_8x8_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_d153_predictor_8x8_ssse3(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -RTCD_EXTERN void (*vpx_d153_predictor_8x8)(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); - -void vpx_d207_predictor_16x16_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_d207_predictor_16x16_ssse3(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -RTCD_EXTERN void (*vpx_d207_predictor_16x16)(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); - -void vpx_d207_predictor_32x32_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_d207_predictor_32x32_ssse3(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -RTCD_EXTERN void (*vpx_d207_predictor_32x32)(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); - -void vpx_d207_predictor_4x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_d207_predictor_4x4_sse2(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d207_predictor_4x4 vpx_d207_predictor_4x4_sse2 - -void vpx_d207_predictor_8x8_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_d207_predictor_8x8_ssse3(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -RTCD_EXTERN void (*vpx_d207_predictor_8x8)(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); - -void vpx_d207e_predictor_16x16_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d207e_predictor_16x16 vpx_d207e_predictor_16x16_c - -void vpx_d207e_predictor_32x32_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d207e_predictor_32x32 vpx_d207e_predictor_32x32_c - -void vpx_d207e_predictor_4x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d207e_predictor_4x4 vpx_d207e_predictor_4x4_c - -void vpx_d207e_predictor_8x8_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d207e_predictor_8x8 vpx_d207e_predictor_8x8_c - -void vpx_d45_predictor_16x16_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_d45_predictor_16x16_ssse3(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -RTCD_EXTERN void (*vpx_d45_predictor_16x16)(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); - -void vpx_d45_predictor_32x32_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_d45_predictor_32x32_ssse3(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -RTCD_EXTERN void (*vpx_d45_predictor_32x32)(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); - -void vpx_d45_predictor_4x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_d45_predictor_4x4_sse2(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d45_predictor_4x4 vpx_d45_predictor_4x4_sse2 - -void vpx_d45_predictor_8x8_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_d45_predictor_8x8_sse2(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d45_predictor_8x8 vpx_d45_predictor_8x8_sse2 - -void vpx_d45e_predictor_16x16_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d45e_predictor_16x16 vpx_d45e_predictor_16x16_c - -void vpx_d45e_predictor_32x32_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d45e_predictor_32x32 vpx_d45e_predictor_32x32_c - -void vpx_d45e_predictor_4x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d45e_predictor_4x4 vpx_d45e_predictor_4x4_c - -void vpx_d45e_predictor_8x8_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d45e_predictor_8x8 vpx_d45e_predictor_8x8_c - -void vpx_d63_predictor_16x16_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_d63_predictor_16x16_ssse3(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -RTCD_EXTERN void (*vpx_d63_predictor_16x16)(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); - -void vpx_d63_predictor_32x32_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_d63_predictor_32x32_ssse3(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -RTCD_EXTERN void (*vpx_d63_predictor_32x32)(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); - -void vpx_d63_predictor_4x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_d63_predictor_4x4_ssse3(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -RTCD_EXTERN void (*vpx_d63_predictor_4x4)(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); - -void vpx_d63_predictor_8x8_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_d63_predictor_8x8_ssse3(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -RTCD_EXTERN void (*vpx_d63_predictor_8x8)(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); - -void vpx_d63e_predictor_16x16_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d63e_predictor_16x16 vpx_d63e_predictor_16x16_c - -void vpx_d63e_predictor_32x32_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d63e_predictor_32x32 vpx_d63e_predictor_32x32_c - -void vpx_d63e_predictor_4x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d63e_predictor_4x4 vpx_d63e_predictor_4x4_c - -void vpx_d63e_predictor_8x8_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d63e_predictor_8x8 vpx_d63e_predictor_8x8_c - -void vpx_d63f_predictor_4x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d63f_predictor_4x4 vpx_d63f_predictor_4x4_c - -void vpx_dc_128_predictor_16x16_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_dc_128_predictor_16x16_sse2(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_dc_128_predictor_16x16 vpx_dc_128_predictor_16x16_sse2 - -void vpx_dc_128_predictor_32x32_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_dc_128_predictor_32x32_sse2(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_dc_128_predictor_32x32 vpx_dc_128_predictor_32x32_sse2 - -void vpx_dc_128_predictor_4x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_dc_128_predictor_4x4_sse2(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_dc_128_predictor_4x4 vpx_dc_128_predictor_4x4_sse2 - -void vpx_dc_128_predictor_8x8_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_dc_128_predictor_8x8_sse2(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_dc_128_predictor_8x8 vpx_dc_128_predictor_8x8_sse2 - -void vpx_dc_left_predictor_16x16_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_dc_left_predictor_16x16_sse2(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_dc_left_predictor_16x16 vpx_dc_left_predictor_16x16_sse2 - -void vpx_dc_left_predictor_32x32_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_dc_left_predictor_32x32_sse2(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_dc_left_predictor_32x32 vpx_dc_left_predictor_32x32_sse2 - -void vpx_dc_left_predictor_4x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_dc_left_predictor_4x4_sse2(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_dc_left_predictor_4x4 vpx_dc_left_predictor_4x4_sse2 - -void vpx_dc_left_predictor_8x8_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_dc_left_predictor_8x8_sse2(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_dc_left_predictor_8x8 vpx_dc_left_predictor_8x8_sse2 - -void vpx_dc_predictor_16x16_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_dc_predictor_16x16_sse2(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_dc_predictor_16x16 vpx_dc_predictor_16x16_sse2 - -void vpx_dc_predictor_32x32_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_dc_predictor_32x32_sse2(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_dc_predictor_32x32 vpx_dc_predictor_32x32_sse2 - -void vpx_dc_predictor_4x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_dc_predictor_4x4_sse2(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_dc_predictor_4x4 vpx_dc_predictor_4x4_sse2 - -void vpx_dc_predictor_8x8_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_dc_predictor_8x8_sse2(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_dc_predictor_8x8 vpx_dc_predictor_8x8_sse2 - -void vpx_dc_top_predictor_16x16_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_dc_top_predictor_16x16_sse2(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_dc_top_predictor_16x16 vpx_dc_top_predictor_16x16_sse2 - -void vpx_dc_top_predictor_32x32_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_dc_top_predictor_32x32_sse2(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_dc_top_predictor_32x32 vpx_dc_top_predictor_32x32_sse2 - -void vpx_dc_top_predictor_4x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_dc_top_predictor_4x4_sse2(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_dc_top_predictor_4x4 vpx_dc_top_predictor_4x4_sse2 - -void vpx_dc_top_predictor_8x8_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_dc_top_predictor_8x8_sse2(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_dc_top_predictor_8x8 vpx_dc_top_predictor_8x8_sse2 - -void vpx_fdct16x16_c(const int16_t *input, tran_low_t *output, int stride); -void vpx_fdct16x16_sse2(const int16_t *input, tran_low_t *output, int stride); -#define vpx_fdct16x16 vpx_fdct16x16_sse2 - -void vpx_fdct16x16_1_c(const int16_t *input, tran_low_t *output, int stride); -void vpx_fdct16x16_1_sse2(const int16_t *input, tran_low_t *output, int stride); -#define vpx_fdct16x16_1 vpx_fdct16x16_1_sse2 - -void vpx_fdct32x32_c(const int16_t *input, tran_low_t *output, int stride); -void vpx_fdct32x32_sse2(const int16_t *input, tran_low_t *output, int stride); -#define vpx_fdct32x32 vpx_fdct32x32_sse2 - -void vpx_fdct32x32_1_c(const int16_t *input, tran_low_t *output, int stride); -void vpx_fdct32x32_1_sse2(const int16_t *input, tran_low_t *output, int stride); -#define vpx_fdct32x32_1 vpx_fdct32x32_1_sse2 - -void vpx_fdct32x32_rd_c(const int16_t *input, tran_low_t *output, int stride); -void vpx_fdct32x32_rd_sse2(const int16_t *input, tran_low_t *output, int stride); -#define vpx_fdct32x32_rd vpx_fdct32x32_rd_sse2 - -void vpx_fdct4x4_c(const int16_t *input, tran_low_t *output, int stride); -void vpx_fdct4x4_sse2(const int16_t *input, tran_low_t *output, int stride); -#define vpx_fdct4x4 vpx_fdct4x4_sse2 - -void vpx_fdct4x4_1_c(const int16_t *input, tran_low_t *output, int stride); -void vpx_fdct4x4_1_sse2(const int16_t *input, tran_low_t *output, int stride); -#define vpx_fdct4x4_1 vpx_fdct4x4_1_sse2 - -void vpx_fdct8x8_c(const int16_t *input, tran_low_t *output, int stride); -void vpx_fdct8x8_sse2(const int16_t *input, tran_low_t *output, int stride); -#define vpx_fdct8x8 vpx_fdct8x8_sse2 - -void vpx_fdct8x8_1_c(const int16_t *input, tran_low_t *output, int stride); -void vpx_fdct8x8_1_sse2(const int16_t *input, tran_low_t *output, int stride); -#define vpx_fdct8x8_1 vpx_fdct8x8_1_sse2 - -void vpx_get16x16var_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse, int *sum); -void vpx_get16x16var_sse2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse, int *sum); -void vpx_get16x16var_avx2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse, int *sum); -RTCD_EXTERN void (*vpx_get16x16var)(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse, int *sum); - -unsigned int vpx_get4x4sse_cs_c(const unsigned char *src_ptr, int source_stride, const unsigned char *ref_ptr, int ref_stride); -#define vpx_get4x4sse_cs vpx_get4x4sse_cs_c - -void vpx_get8x8var_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse, int *sum); -void vpx_get8x8var_sse2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse, int *sum); -#define vpx_get8x8var vpx_get8x8var_sse2 - -unsigned int vpx_get_mb_ss_c(const int16_t *); -unsigned int vpx_get_mb_ss_sse2(const int16_t *); -#define vpx_get_mb_ss vpx_get_mb_ss_sse2 - -void vpx_h_predictor_16x16_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_h_predictor_16x16_sse2(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_h_predictor_16x16 vpx_h_predictor_16x16_sse2 - -void vpx_h_predictor_32x32_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_h_predictor_32x32_sse2(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_h_predictor_32x32 vpx_h_predictor_32x32_sse2 - -void vpx_h_predictor_4x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_h_predictor_4x4_sse2(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_h_predictor_4x4 vpx_h_predictor_4x4_sse2 - -void vpx_h_predictor_8x8_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_h_predictor_8x8_sse2(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_h_predictor_8x8 vpx_h_predictor_8x8_sse2 - -void vpx_hadamard_16x16_c(const int16_t *src_diff, int src_stride, int16_t *coeff); -void vpx_hadamard_16x16_sse2(const int16_t *src_diff, int src_stride, int16_t *coeff); -#define vpx_hadamard_16x16 vpx_hadamard_16x16_sse2 - -void vpx_hadamard_8x8_c(const int16_t *src_diff, int src_stride, int16_t *coeff); -void vpx_hadamard_8x8_sse2(const int16_t *src_diff, int src_stride, int16_t *coeff); -void vpx_hadamard_8x8_ssse3(const int16_t *src_diff, int src_stride, int16_t *coeff); -RTCD_EXTERN void (*vpx_hadamard_8x8)(const int16_t *src_diff, int src_stride, int16_t *coeff); - -void vpx_he_predictor_4x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_he_predictor_4x4 vpx_he_predictor_4x4_c - -void vpx_highbd_10_get16x16var_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse, int *sum); -#define vpx_highbd_10_get16x16var vpx_highbd_10_get16x16var_c - -void vpx_highbd_10_get8x8var_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse, int *sum); -#define vpx_highbd_10_get8x8var vpx_highbd_10_get8x8var_c - -unsigned int vpx_highbd_10_mse16x16_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int recon_stride, unsigned int *sse); -unsigned int vpx_highbd_10_mse16x16_sse2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int recon_stride, unsigned int *sse); -#define vpx_highbd_10_mse16x16 vpx_highbd_10_mse16x16_sse2 - -unsigned int vpx_highbd_10_mse16x8_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int recon_stride, unsigned int *sse); -#define vpx_highbd_10_mse16x8 vpx_highbd_10_mse16x8_c - -unsigned int vpx_highbd_10_mse8x16_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int recon_stride, unsigned int *sse); -#define vpx_highbd_10_mse8x16 vpx_highbd_10_mse8x16_c - -unsigned int vpx_highbd_10_mse8x8_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int recon_stride, unsigned int *sse); -unsigned int vpx_highbd_10_mse8x8_sse2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int recon_stride, unsigned int *sse); -#define vpx_highbd_10_mse8x8 vpx_highbd_10_mse8x8_sse2 - -uint32_t vpx_highbd_10_sub_pixel_avg_variance16x16_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_highbd_10_sub_pixel_avg_variance16x16_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_highbd_10_sub_pixel_avg_variance16x16 vpx_highbd_10_sub_pixel_avg_variance16x16_sse2 - -uint32_t vpx_highbd_10_sub_pixel_avg_variance16x32_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_highbd_10_sub_pixel_avg_variance16x32_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_highbd_10_sub_pixel_avg_variance16x32 vpx_highbd_10_sub_pixel_avg_variance16x32_sse2 - -uint32_t vpx_highbd_10_sub_pixel_avg_variance16x8_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_highbd_10_sub_pixel_avg_variance16x8_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_highbd_10_sub_pixel_avg_variance16x8 vpx_highbd_10_sub_pixel_avg_variance16x8_sse2 - -uint32_t vpx_highbd_10_sub_pixel_avg_variance32x16_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_highbd_10_sub_pixel_avg_variance32x16_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_highbd_10_sub_pixel_avg_variance32x16 vpx_highbd_10_sub_pixel_avg_variance32x16_sse2 - -uint32_t vpx_highbd_10_sub_pixel_avg_variance32x32_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_highbd_10_sub_pixel_avg_variance32x32_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_highbd_10_sub_pixel_avg_variance32x32 vpx_highbd_10_sub_pixel_avg_variance32x32_sse2 - -uint32_t vpx_highbd_10_sub_pixel_avg_variance32x64_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_highbd_10_sub_pixel_avg_variance32x64_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_highbd_10_sub_pixel_avg_variance32x64 vpx_highbd_10_sub_pixel_avg_variance32x64_sse2 - -uint32_t vpx_highbd_10_sub_pixel_avg_variance4x4_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_highbd_10_sub_pixel_avg_variance4x4 vpx_highbd_10_sub_pixel_avg_variance4x4_c - -uint32_t vpx_highbd_10_sub_pixel_avg_variance4x8_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_highbd_10_sub_pixel_avg_variance4x8 vpx_highbd_10_sub_pixel_avg_variance4x8_c - -uint32_t vpx_highbd_10_sub_pixel_avg_variance64x32_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_highbd_10_sub_pixel_avg_variance64x32_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_highbd_10_sub_pixel_avg_variance64x32 vpx_highbd_10_sub_pixel_avg_variance64x32_sse2 - -uint32_t vpx_highbd_10_sub_pixel_avg_variance64x64_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_highbd_10_sub_pixel_avg_variance64x64_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_highbd_10_sub_pixel_avg_variance64x64 vpx_highbd_10_sub_pixel_avg_variance64x64_sse2 - -uint32_t vpx_highbd_10_sub_pixel_avg_variance8x16_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_highbd_10_sub_pixel_avg_variance8x16_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_highbd_10_sub_pixel_avg_variance8x16 vpx_highbd_10_sub_pixel_avg_variance8x16_sse2 - -uint32_t vpx_highbd_10_sub_pixel_avg_variance8x4_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_highbd_10_sub_pixel_avg_variance8x4_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_highbd_10_sub_pixel_avg_variance8x4 vpx_highbd_10_sub_pixel_avg_variance8x4_sse2 - -uint32_t vpx_highbd_10_sub_pixel_avg_variance8x8_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_highbd_10_sub_pixel_avg_variance8x8_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_highbd_10_sub_pixel_avg_variance8x8 vpx_highbd_10_sub_pixel_avg_variance8x8_sse2 - -uint32_t vpx_highbd_10_sub_pixel_variance16x16_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_highbd_10_sub_pixel_variance16x16_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -#define vpx_highbd_10_sub_pixel_variance16x16 vpx_highbd_10_sub_pixel_variance16x16_sse2 - -uint32_t vpx_highbd_10_sub_pixel_variance16x32_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_highbd_10_sub_pixel_variance16x32_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -#define vpx_highbd_10_sub_pixel_variance16x32 vpx_highbd_10_sub_pixel_variance16x32_sse2 - -uint32_t vpx_highbd_10_sub_pixel_variance16x8_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_highbd_10_sub_pixel_variance16x8_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -#define vpx_highbd_10_sub_pixel_variance16x8 vpx_highbd_10_sub_pixel_variance16x8_sse2 - -uint32_t vpx_highbd_10_sub_pixel_variance32x16_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_highbd_10_sub_pixel_variance32x16_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -#define vpx_highbd_10_sub_pixel_variance32x16 vpx_highbd_10_sub_pixel_variance32x16_sse2 - -uint32_t vpx_highbd_10_sub_pixel_variance32x32_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_highbd_10_sub_pixel_variance32x32_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -#define vpx_highbd_10_sub_pixel_variance32x32 vpx_highbd_10_sub_pixel_variance32x32_sse2 - -uint32_t vpx_highbd_10_sub_pixel_variance32x64_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_highbd_10_sub_pixel_variance32x64_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -#define vpx_highbd_10_sub_pixel_variance32x64 vpx_highbd_10_sub_pixel_variance32x64_sse2 - -uint32_t vpx_highbd_10_sub_pixel_variance4x4_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -#define vpx_highbd_10_sub_pixel_variance4x4 vpx_highbd_10_sub_pixel_variance4x4_c - -uint32_t vpx_highbd_10_sub_pixel_variance4x8_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -#define vpx_highbd_10_sub_pixel_variance4x8 vpx_highbd_10_sub_pixel_variance4x8_c - -uint32_t vpx_highbd_10_sub_pixel_variance64x32_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_highbd_10_sub_pixel_variance64x32_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -#define vpx_highbd_10_sub_pixel_variance64x32 vpx_highbd_10_sub_pixel_variance64x32_sse2 - -uint32_t vpx_highbd_10_sub_pixel_variance64x64_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_highbd_10_sub_pixel_variance64x64_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -#define vpx_highbd_10_sub_pixel_variance64x64 vpx_highbd_10_sub_pixel_variance64x64_sse2 - -uint32_t vpx_highbd_10_sub_pixel_variance8x16_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_highbd_10_sub_pixel_variance8x16_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -#define vpx_highbd_10_sub_pixel_variance8x16 vpx_highbd_10_sub_pixel_variance8x16_sse2 - -uint32_t vpx_highbd_10_sub_pixel_variance8x4_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_highbd_10_sub_pixel_variance8x4_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -#define vpx_highbd_10_sub_pixel_variance8x4 vpx_highbd_10_sub_pixel_variance8x4_sse2 - -uint32_t vpx_highbd_10_sub_pixel_variance8x8_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_highbd_10_sub_pixel_variance8x8_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -#define vpx_highbd_10_sub_pixel_variance8x8 vpx_highbd_10_sub_pixel_variance8x8_sse2 - -unsigned int vpx_highbd_10_variance16x16_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -unsigned int vpx_highbd_10_variance16x16_sse2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_highbd_10_variance16x16 vpx_highbd_10_variance16x16_sse2 - -unsigned int vpx_highbd_10_variance16x32_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -unsigned int vpx_highbd_10_variance16x32_sse2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_highbd_10_variance16x32 vpx_highbd_10_variance16x32_sse2 - -unsigned int vpx_highbd_10_variance16x8_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -unsigned int vpx_highbd_10_variance16x8_sse2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_highbd_10_variance16x8 vpx_highbd_10_variance16x8_sse2 - -unsigned int vpx_highbd_10_variance32x16_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -unsigned int vpx_highbd_10_variance32x16_sse2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_highbd_10_variance32x16 vpx_highbd_10_variance32x16_sse2 - -unsigned int vpx_highbd_10_variance32x32_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -unsigned int vpx_highbd_10_variance32x32_sse2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_highbd_10_variance32x32 vpx_highbd_10_variance32x32_sse2 - -unsigned int vpx_highbd_10_variance32x64_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -unsigned int vpx_highbd_10_variance32x64_sse2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_highbd_10_variance32x64 vpx_highbd_10_variance32x64_sse2 - -unsigned int vpx_highbd_10_variance4x4_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_highbd_10_variance4x4 vpx_highbd_10_variance4x4_c - -unsigned int vpx_highbd_10_variance4x8_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_highbd_10_variance4x8 vpx_highbd_10_variance4x8_c - -unsigned int vpx_highbd_10_variance64x32_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -unsigned int vpx_highbd_10_variance64x32_sse2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_highbd_10_variance64x32 vpx_highbd_10_variance64x32_sse2 - -unsigned int vpx_highbd_10_variance64x64_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -unsigned int vpx_highbd_10_variance64x64_sse2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_highbd_10_variance64x64 vpx_highbd_10_variance64x64_sse2 - -unsigned int vpx_highbd_10_variance8x16_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -unsigned int vpx_highbd_10_variance8x16_sse2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_highbd_10_variance8x16 vpx_highbd_10_variance8x16_sse2 - -unsigned int vpx_highbd_10_variance8x4_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_highbd_10_variance8x4 vpx_highbd_10_variance8x4_c - -unsigned int vpx_highbd_10_variance8x8_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -unsigned int vpx_highbd_10_variance8x8_sse2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_highbd_10_variance8x8 vpx_highbd_10_variance8x8_sse2 - -void vpx_highbd_12_get16x16var_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse, int *sum); -#define vpx_highbd_12_get16x16var vpx_highbd_12_get16x16var_c - -void vpx_highbd_12_get8x8var_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse, int *sum); -#define vpx_highbd_12_get8x8var vpx_highbd_12_get8x8var_c - -unsigned int vpx_highbd_12_mse16x16_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int recon_stride, unsigned int *sse); -unsigned int vpx_highbd_12_mse16x16_sse2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int recon_stride, unsigned int *sse); -#define vpx_highbd_12_mse16x16 vpx_highbd_12_mse16x16_sse2 - -unsigned int vpx_highbd_12_mse16x8_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int recon_stride, unsigned int *sse); -#define vpx_highbd_12_mse16x8 vpx_highbd_12_mse16x8_c - -unsigned int vpx_highbd_12_mse8x16_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int recon_stride, unsigned int *sse); -#define vpx_highbd_12_mse8x16 vpx_highbd_12_mse8x16_c - -unsigned int vpx_highbd_12_mse8x8_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int recon_stride, unsigned int *sse); -unsigned int vpx_highbd_12_mse8x8_sse2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int recon_stride, unsigned int *sse); -#define vpx_highbd_12_mse8x8 vpx_highbd_12_mse8x8_sse2 - -uint32_t vpx_highbd_12_sub_pixel_avg_variance16x16_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_highbd_12_sub_pixel_avg_variance16x16_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_highbd_12_sub_pixel_avg_variance16x16 vpx_highbd_12_sub_pixel_avg_variance16x16_sse2 - -uint32_t vpx_highbd_12_sub_pixel_avg_variance16x32_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_highbd_12_sub_pixel_avg_variance16x32_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_highbd_12_sub_pixel_avg_variance16x32 vpx_highbd_12_sub_pixel_avg_variance16x32_sse2 - -uint32_t vpx_highbd_12_sub_pixel_avg_variance16x8_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_highbd_12_sub_pixel_avg_variance16x8_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_highbd_12_sub_pixel_avg_variance16x8 vpx_highbd_12_sub_pixel_avg_variance16x8_sse2 - -uint32_t vpx_highbd_12_sub_pixel_avg_variance32x16_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_highbd_12_sub_pixel_avg_variance32x16_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_highbd_12_sub_pixel_avg_variance32x16 vpx_highbd_12_sub_pixel_avg_variance32x16_sse2 - -uint32_t vpx_highbd_12_sub_pixel_avg_variance32x32_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_highbd_12_sub_pixel_avg_variance32x32_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_highbd_12_sub_pixel_avg_variance32x32 vpx_highbd_12_sub_pixel_avg_variance32x32_sse2 - -uint32_t vpx_highbd_12_sub_pixel_avg_variance32x64_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_highbd_12_sub_pixel_avg_variance32x64_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_highbd_12_sub_pixel_avg_variance32x64 vpx_highbd_12_sub_pixel_avg_variance32x64_sse2 - -uint32_t vpx_highbd_12_sub_pixel_avg_variance4x4_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_highbd_12_sub_pixel_avg_variance4x4 vpx_highbd_12_sub_pixel_avg_variance4x4_c - -uint32_t vpx_highbd_12_sub_pixel_avg_variance4x8_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_highbd_12_sub_pixel_avg_variance4x8 vpx_highbd_12_sub_pixel_avg_variance4x8_c - -uint32_t vpx_highbd_12_sub_pixel_avg_variance64x32_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_highbd_12_sub_pixel_avg_variance64x32_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_highbd_12_sub_pixel_avg_variance64x32 vpx_highbd_12_sub_pixel_avg_variance64x32_sse2 - -uint32_t vpx_highbd_12_sub_pixel_avg_variance64x64_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_highbd_12_sub_pixel_avg_variance64x64_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_highbd_12_sub_pixel_avg_variance64x64 vpx_highbd_12_sub_pixel_avg_variance64x64_sse2 - -uint32_t vpx_highbd_12_sub_pixel_avg_variance8x16_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_highbd_12_sub_pixel_avg_variance8x16_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_highbd_12_sub_pixel_avg_variance8x16 vpx_highbd_12_sub_pixel_avg_variance8x16_sse2 - -uint32_t vpx_highbd_12_sub_pixel_avg_variance8x4_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_highbd_12_sub_pixel_avg_variance8x4_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_highbd_12_sub_pixel_avg_variance8x4 vpx_highbd_12_sub_pixel_avg_variance8x4_sse2 - -uint32_t vpx_highbd_12_sub_pixel_avg_variance8x8_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_highbd_12_sub_pixel_avg_variance8x8_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_highbd_12_sub_pixel_avg_variance8x8 vpx_highbd_12_sub_pixel_avg_variance8x8_sse2 - -uint32_t vpx_highbd_12_sub_pixel_variance16x16_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_highbd_12_sub_pixel_variance16x16_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -#define vpx_highbd_12_sub_pixel_variance16x16 vpx_highbd_12_sub_pixel_variance16x16_sse2 - -uint32_t vpx_highbd_12_sub_pixel_variance16x32_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_highbd_12_sub_pixel_variance16x32_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -#define vpx_highbd_12_sub_pixel_variance16x32 vpx_highbd_12_sub_pixel_variance16x32_sse2 - -uint32_t vpx_highbd_12_sub_pixel_variance16x8_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_highbd_12_sub_pixel_variance16x8_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -#define vpx_highbd_12_sub_pixel_variance16x8 vpx_highbd_12_sub_pixel_variance16x8_sse2 - -uint32_t vpx_highbd_12_sub_pixel_variance32x16_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_highbd_12_sub_pixel_variance32x16_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -#define vpx_highbd_12_sub_pixel_variance32x16 vpx_highbd_12_sub_pixel_variance32x16_sse2 - -uint32_t vpx_highbd_12_sub_pixel_variance32x32_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_highbd_12_sub_pixel_variance32x32_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -#define vpx_highbd_12_sub_pixel_variance32x32 vpx_highbd_12_sub_pixel_variance32x32_sse2 - -uint32_t vpx_highbd_12_sub_pixel_variance32x64_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_highbd_12_sub_pixel_variance32x64_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -#define vpx_highbd_12_sub_pixel_variance32x64 vpx_highbd_12_sub_pixel_variance32x64_sse2 - -uint32_t vpx_highbd_12_sub_pixel_variance4x4_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -#define vpx_highbd_12_sub_pixel_variance4x4 vpx_highbd_12_sub_pixel_variance4x4_c - -uint32_t vpx_highbd_12_sub_pixel_variance4x8_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -#define vpx_highbd_12_sub_pixel_variance4x8 vpx_highbd_12_sub_pixel_variance4x8_c - -uint32_t vpx_highbd_12_sub_pixel_variance64x32_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_highbd_12_sub_pixel_variance64x32_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -#define vpx_highbd_12_sub_pixel_variance64x32 vpx_highbd_12_sub_pixel_variance64x32_sse2 - -uint32_t vpx_highbd_12_sub_pixel_variance64x64_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_highbd_12_sub_pixel_variance64x64_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -#define vpx_highbd_12_sub_pixel_variance64x64 vpx_highbd_12_sub_pixel_variance64x64_sse2 - -uint32_t vpx_highbd_12_sub_pixel_variance8x16_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_highbd_12_sub_pixel_variance8x16_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -#define vpx_highbd_12_sub_pixel_variance8x16 vpx_highbd_12_sub_pixel_variance8x16_sse2 - -uint32_t vpx_highbd_12_sub_pixel_variance8x4_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_highbd_12_sub_pixel_variance8x4_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -#define vpx_highbd_12_sub_pixel_variance8x4 vpx_highbd_12_sub_pixel_variance8x4_sse2 - -uint32_t vpx_highbd_12_sub_pixel_variance8x8_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_highbd_12_sub_pixel_variance8x8_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -#define vpx_highbd_12_sub_pixel_variance8x8 vpx_highbd_12_sub_pixel_variance8x8_sse2 - -unsigned int vpx_highbd_12_variance16x16_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -unsigned int vpx_highbd_12_variance16x16_sse2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_highbd_12_variance16x16 vpx_highbd_12_variance16x16_sse2 - -unsigned int vpx_highbd_12_variance16x32_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -unsigned int vpx_highbd_12_variance16x32_sse2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_highbd_12_variance16x32 vpx_highbd_12_variance16x32_sse2 - -unsigned int vpx_highbd_12_variance16x8_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -unsigned int vpx_highbd_12_variance16x8_sse2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_highbd_12_variance16x8 vpx_highbd_12_variance16x8_sse2 - -unsigned int vpx_highbd_12_variance32x16_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -unsigned int vpx_highbd_12_variance32x16_sse2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_highbd_12_variance32x16 vpx_highbd_12_variance32x16_sse2 - -unsigned int vpx_highbd_12_variance32x32_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -unsigned int vpx_highbd_12_variance32x32_sse2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_highbd_12_variance32x32 vpx_highbd_12_variance32x32_sse2 - -unsigned int vpx_highbd_12_variance32x64_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -unsigned int vpx_highbd_12_variance32x64_sse2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_highbd_12_variance32x64 vpx_highbd_12_variance32x64_sse2 - -unsigned int vpx_highbd_12_variance4x4_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_highbd_12_variance4x4 vpx_highbd_12_variance4x4_c - -unsigned int vpx_highbd_12_variance4x8_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_highbd_12_variance4x8 vpx_highbd_12_variance4x8_c - -unsigned int vpx_highbd_12_variance64x32_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -unsigned int vpx_highbd_12_variance64x32_sse2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_highbd_12_variance64x32 vpx_highbd_12_variance64x32_sse2 - -unsigned int vpx_highbd_12_variance64x64_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -unsigned int vpx_highbd_12_variance64x64_sse2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_highbd_12_variance64x64 vpx_highbd_12_variance64x64_sse2 - -unsigned int vpx_highbd_12_variance8x16_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -unsigned int vpx_highbd_12_variance8x16_sse2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_highbd_12_variance8x16 vpx_highbd_12_variance8x16_sse2 - -unsigned int vpx_highbd_12_variance8x4_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_highbd_12_variance8x4 vpx_highbd_12_variance8x4_c - -unsigned int vpx_highbd_12_variance8x8_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -unsigned int vpx_highbd_12_variance8x8_sse2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_highbd_12_variance8x8 vpx_highbd_12_variance8x8_sse2 - -void vpx_highbd_8_get16x16var_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse, int *sum); -#define vpx_highbd_8_get16x16var vpx_highbd_8_get16x16var_c - -void vpx_highbd_8_get8x8var_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse, int *sum); -#define vpx_highbd_8_get8x8var vpx_highbd_8_get8x8var_c - -unsigned int vpx_highbd_8_mse16x16_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int recon_stride, unsigned int *sse); -unsigned int vpx_highbd_8_mse16x16_sse2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int recon_stride, unsigned int *sse); -#define vpx_highbd_8_mse16x16 vpx_highbd_8_mse16x16_sse2 - -unsigned int vpx_highbd_8_mse16x8_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int recon_stride, unsigned int *sse); -#define vpx_highbd_8_mse16x8 vpx_highbd_8_mse16x8_c - -unsigned int vpx_highbd_8_mse8x16_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int recon_stride, unsigned int *sse); -#define vpx_highbd_8_mse8x16 vpx_highbd_8_mse8x16_c - -unsigned int vpx_highbd_8_mse8x8_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int recon_stride, unsigned int *sse); -unsigned int vpx_highbd_8_mse8x8_sse2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int recon_stride, unsigned int *sse); -#define vpx_highbd_8_mse8x8 vpx_highbd_8_mse8x8_sse2 - -uint32_t vpx_highbd_8_sub_pixel_avg_variance16x16_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_highbd_8_sub_pixel_avg_variance16x16_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_highbd_8_sub_pixel_avg_variance16x16 vpx_highbd_8_sub_pixel_avg_variance16x16_sse2 - -uint32_t vpx_highbd_8_sub_pixel_avg_variance16x32_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_highbd_8_sub_pixel_avg_variance16x32_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_highbd_8_sub_pixel_avg_variance16x32 vpx_highbd_8_sub_pixel_avg_variance16x32_sse2 - -uint32_t vpx_highbd_8_sub_pixel_avg_variance16x8_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_highbd_8_sub_pixel_avg_variance16x8_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_highbd_8_sub_pixel_avg_variance16x8 vpx_highbd_8_sub_pixel_avg_variance16x8_sse2 - -uint32_t vpx_highbd_8_sub_pixel_avg_variance32x16_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_highbd_8_sub_pixel_avg_variance32x16_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_highbd_8_sub_pixel_avg_variance32x16 vpx_highbd_8_sub_pixel_avg_variance32x16_sse2 - -uint32_t vpx_highbd_8_sub_pixel_avg_variance32x32_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_highbd_8_sub_pixel_avg_variance32x32_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_highbd_8_sub_pixel_avg_variance32x32 vpx_highbd_8_sub_pixel_avg_variance32x32_sse2 - -uint32_t vpx_highbd_8_sub_pixel_avg_variance32x64_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_highbd_8_sub_pixel_avg_variance32x64_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_highbd_8_sub_pixel_avg_variance32x64 vpx_highbd_8_sub_pixel_avg_variance32x64_sse2 - -uint32_t vpx_highbd_8_sub_pixel_avg_variance4x4_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_highbd_8_sub_pixel_avg_variance4x4 vpx_highbd_8_sub_pixel_avg_variance4x4_c - -uint32_t vpx_highbd_8_sub_pixel_avg_variance4x8_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_highbd_8_sub_pixel_avg_variance4x8 vpx_highbd_8_sub_pixel_avg_variance4x8_c - -uint32_t vpx_highbd_8_sub_pixel_avg_variance64x32_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_highbd_8_sub_pixel_avg_variance64x32_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_highbd_8_sub_pixel_avg_variance64x32 vpx_highbd_8_sub_pixel_avg_variance64x32_sse2 - -uint32_t vpx_highbd_8_sub_pixel_avg_variance64x64_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_highbd_8_sub_pixel_avg_variance64x64_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_highbd_8_sub_pixel_avg_variance64x64 vpx_highbd_8_sub_pixel_avg_variance64x64_sse2 - -uint32_t vpx_highbd_8_sub_pixel_avg_variance8x16_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_highbd_8_sub_pixel_avg_variance8x16_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_highbd_8_sub_pixel_avg_variance8x16 vpx_highbd_8_sub_pixel_avg_variance8x16_sse2 - -uint32_t vpx_highbd_8_sub_pixel_avg_variance8x4_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_highbd_8_sub_pixel_avg_variance8x4_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_highbd_8_sub_pixel_avg_variance8x4 vpx_highbd_8_sub_pixel_avg_variance8x4_sse2 - -uint32_t vpx_highbd_8_sub_pixel_avg_variance8x8_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_highbd_8_sub_pixel_avg_variance8x8_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_highbd_8_sub_pixel_avg_variance8x8 vpx_highbd_8_sub_pixel_avg_variance8x8_sse2 - -uint32_t vpx_highbd_8_sub_pixel_variance16x16_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_highbd_8_sub_pixel_variance16x16_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -#define vpx_highbd_8_sub_pixel_variance16x16 vpx_highbd_8_sub_pixel_variance16x16_sse2 - -uint32_t vpx_highbd_8_sub_pixel_variance16x32_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_highbd_8_sub_pixel_variance16x32_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -#define vpx_highbd_8_sub_pixel_variance16x32 vpx_highbd_8_sub_pixel_variance16x32_sse2 - -uint32_t vpx_highbd_8_sub_pixel_variance16x8_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_highbd_8_sub_pixel_variance16x8_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -#define vpx_highbd_8_sub_pixel_variance16x8 vpx_highbd_8_sub_pixel_variance16x8_sse2 - -uint32_t vpx_highbd_8_sub_pixel_variance32x16_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_highbd_8_sub_pixel_variance32x16_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -#define vpx_highbd_8_sub_pixel_variance32x16 vpx_highbd_8_sub_pixel_variance32x16_sse2 - -uint32_t vpx_highbd_8_sub_pixel_variance32x32_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_highbd_8_sub_pixel_variance32x32_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -#define vpx_highbd_8_sub_pixel_variance32x32 vpx_highbd_8_sub_pixel_variance32x32_sse2 - -uint32_t vpx_highbd_8_sub_pixel_variance32x64_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_highbd_8_sub_pixel_variance32x64_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -#define vpx_highbd_8_sub_pixel_variance32x64 vpx_highbd_8_sub_pixel_variance32x64_sse2 - -uint32_t vpx_highbd_8_sub_pixel_variance4x4_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -#define vpx_highbd_8_sub_pixel_variance4x4 vpx_highbd_8_sub_pixel_variance4x4_c - -uint32_t vpx_highbd_8_sub_pixel_variance4x8_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -#define vpx_highbd_8_sub_pixel_variance4x8 vpx_highbd_8_sub_pixel_variance4x8_c - -uint32_t vpx_highbd_8_sub_pixel_variance64x32_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_highbd_8_sub_pixel_variance64x32_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -#define vpx_highbd_8_sub_pixel_variance64x32 vpx_highbd_8_sub_pixel_variance64x32_sse2 - -uint32_t vpx_highbd_8_sub_pixel_variance64x64_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_highbd_8_sub_pixel_variance64x64_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -#define vpx_highbd_8_sub_pixel_variance64x64 vpx_highbd_8_sub_pixel_variance64x64_sse2 - -uint32_t vpx_highbd_8_sub_pixel_variance8x16_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_highbd_8_sub_pixel_variance8x16_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -#define vpx_highbd_8_sub_pixel_variance8x16 vpx_highbd_8_sub_pixel_variance8x16_sse2 - -uint32_t vpx_highbd_8_sub_pixel_variance8x4_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_highbd_8_sub_pixel_variance8x4_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -#define vpx_highbd_8_sub_pixel_variance8x4 vpx_highbd_8_sub_pixel_variance8x4_sse2 - -uint32_t vpx_highbd_8_sub_pixel_variance8x8_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_highbd_8_sub_pixel_variance8x8_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -#define vpx_highbd_8_sub_pixel_variance8x8 vpx_highbd_8_sub_pixel_variance8x8_sse2 - -unsigned int vpx_highbd_8_variance16x16_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -unsigned int vpx_highbd_8_variance16x16_sse2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_highbd_8_variance16x16 vpx_highbd_8_variance16x16_sse2 - -unsigned int vpx_highbd_8_variance16x32_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -unsigned int vpx_highbd_8_variance16x32_sse2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_highbd_8_variance16x32 vpx_highbd_8_variance16x32_sse2 - -unsigned int vpx_highbd_8_variance16x8_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -unsigned int vpx_highbd_8_variance16x8_sse2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_highbd_8_variance16x8 vpx_highbd_8_variance16x8_sse2 - -unsigned int vpx_highbd_8_variance32x16_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -unsigned int vpx_highbd_8_variance32x16_sse2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_highbd_8_variance32x16 vpx_highbd_8_variance32x16_sse2 - -unsigned int vpx_highbd_8_variance32x32_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -unsigned int vpx_highbd_8_variance32x32_sse2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_highbd_8_variance32x32 vpx_highbd_8_variance32x32_sse2 - -unsigned int vpx_highbd_8_variance32x64_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -unsigned int vpx_highbd_8_variance32x64_sse2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_highbd_8_variance32x64 vpx_highbd_8_variance32x64_sse2 - -unsigned int vpx_highbd_8_variance4x4_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_highbd_8_variance4x4 vpx_highbd_8_variance4x4_c - -unsigned int vpx_highbd_8_variance4x8_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_highbd_8_variance4x8 vpx_highbd_8_variance4x8_c - -unsigned int vpx_highbd_8_variance64x32_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -unsigned int vpx_highbd_8_variance64x32_sse2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_highbd_8_variance64x32 vpx_highbd_8_variance64x32_sse2 - -unsigned int vpx_highbd_8_variance64x64_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -unsigned int vpx_highbd_8_variance64x64_sse2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_highbd_8_variance64x64 vpx_highbd_8_variance64x64_sse2 - -unsigned int vpx_highbd_8_variance8x16_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -unsigned int vpx_highbd_8_variance8x16_sse2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_highbd_8_variance8x16 vpx_highbd_8_variance8x16_sse2 - -unsigned int vpx_highbd_8_variance8x4_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_highbd_8_variance8x4 vpx_highbd_8_variance8x4_c - -unsigned int vpx_highbd_8_variance8x8_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -unsigned int vpx_highbd_8_variance8x8_sse2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_highbd_8_variance8x8 vpx_highbd_8_variance8x8_sse2 - -unsigned int vpx_highbd_avg_4x4_c(const uint8_t *, int p); -#define vpx_highbd_avg_4x4 vpx_highbd_avg_4x4_c - -unsigned int vpx_highbd_avg_8x8_c(const uint8_t *, int p); -#define vpx_highbd_avg_8x8 vpx_highbd_avg_8x8_c - -void vpx_highbd_comp_avg_pred_c(uint16_t *comp_pred, const uint8_t *pred8, int width, int height, const uint8_t *ref8, int ref_stride); -#define vpx_highbd_comp_avg_pred vpx_highbd_comp_avg_pred_c - -void vpx_highbd_convolve8_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h, int bps); -void vpx_highbd_convolve8_sse2(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h, int bps); -#define vpx_highbd_convolve8 vpx_highbd_convolve8_sse2 - -void vpx_highbd_convolve8_avg_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h, int bps); -void vpx_highbd_convolve8_avg_sse2(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h, int bps); -#define vpx_highbd_convolve8_avg vpx_highbd_convolve8_avg_sse2 - -void vpx_highbd_convolve8_avg_horiz_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h, int bps); -void vpx_highbd_convolve8_avg_horiz_sse2(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h, int bps); -#define vpx_highbd_convolve8_avg_horiz vpx_highbd_convolve8_avg_horiz_sse2 - -void vpx_highbd_convolve8_avg_vert_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h, int bps); -void vpx_highbd_convolve8_avg_vert_sse2(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h, int bps); -#define vpx_highbd_convolve8_avg_vert vpx_highbd_convolve8_avg_vert_sse2 - -void vpx_highbd_convolve8_horiz_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h, int bps); -void vpx_highbd_convolve8_horiz_sse2(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h, int bps); -#define vpx_highbd_convolve8_horiz vpx_highbd_convolve8_horiz_sse2 - -void vpx_highbd_convolve8_vert_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h, int bps); -void vpx_highbd_convolve8_vert_sse2(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h, int bps); -#define vpx_highbd_convolve8_vert vpx_highbd_convolve8_vert_sse2 - -void vpx_highbd_convolve_avg_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h, int bps); -void vpx_highbd_convolve_avg_sse2(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h, int bps); -#define vpx_highbd_convolve_avg vpx_highbd_convolve_avg_sse2 - -void vpx_highbd_convolve_copy_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h, int bps); -void vpx_highbd_convolve_copy_sse2(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h, int bps); -#define vpx_highbd_convolve_copy vpx_highbd_convolve_copy_sse2 - -void vpx_highbd_d117_predictor_16x16_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_d117_predictor_16x16 vpx_highbd_d117_predictor_16x16_c - -void vpx_highbd_d117_predictor_32x32_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_d117_predictor_32x32 vpx_highbd_d117_predictor_32x32_c - -void vpx_highbd_d117_predictor_4x4_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_d117_predictor_4x4 vpx_highbd_d117_predictor_4x4_c - -void vpx_highbd_d117_predictor_8x8_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_d117_predictor_8x8 vpx_highbd_d117_predictor_8x8_c - -void vpx_highbd_d135_predictor_16x16_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_d135_predictor_16x16 vpx_highbd_d135_predictor_16x16_c - -void vpx_highbd_d135_predictor_32x32_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_d135_predictor_32x32 vpx_highbd_d135_predictor_32x32_c - -void vpx_highbd_d135_predictor_4x4_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_d135_predictor_4x4 vpx_highbd_d135_predictor_4x4_c - -void vpx_highbd_d135_predictor_8x8_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_d135_predictor_8x8 vpx_highbd_d135_predictor_8x8_c - -void vpx_highbd_d153_predictor_16x16_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_d153_predictor_16x16 vpx_highbd_d153_predictor_16x16_c - -void vpx_highbd_d153_predictor_32x32_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_d153_predictor_32x32 vpx_highbd_d153_predictor_32x32_c - -void vpx_highbd_d153_predictor_4x4_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_d153_predictor_4x4 vpx_highbd_d153_predictor_4x4_c - -void vpx_highbd_d153_predictor_8x8_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_d153_predictor_8x8 vpx_highbd_d153_predictor_8x8_c - -void vpx_highbd_d207_predictor_16x16_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_d207_predictor_16x16 vpx_highbd_d207_predictor_16x16_c - -void vpx_highbd_d207_predictor_32x32_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_d207_predictor_32x32 vpx_highbd_d207_predictor_32x32_c - -void vpx_highbd_d207_predictor_4x4_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_d207_predictor_4x4 vpx_highbd_d207_predictor_4x4_c - -void vpx_highbd_d207_predictor_8x8_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_d207_predictor_8x8 vpx_highbd_d207_predictor_8x8_c - -void vpx_highbd_d207e_predictor_16x16_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_d207e_predictor_16x16 vpx_highbd_d207e_predictor_16x16_c - -void vpx_highbd_d207e_predictor_32x32_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_d207e_predictor_32x32 vpx_highbd_d207e_predictor_32x32_c - -void vpx_highbd_d207e_predictor_4x4_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_d207e_predictor_4x4 vpx_highbd_d207e_predictor_4x4_c - -void vpx_highbd_d207e_predictor_8x8_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_d207e_predictor_8x8 vpx_highbd_d207e_predictor_8x8_c - -void vpx_highbd_d45_predictor_16x16_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_d45_predictor_16x16 vpx_highbd_d45_predictor_16x16_c - -void vpx_highbd_d45_predictor_32x32_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_d45_predictor_32x32 vpx_highbd_d45_predictor_32x32_c - -void vpx_highbd_d45_predictor_4x4_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_d45_predictor_4x4 vpx_highbd_d45_predictor_4x4_c - -void vpx_highbd_d45_predictor_8x8_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_d45_predictor_8x8 vpx_highbd_d45_predictor_8x8_c - -void vpx_highbd_d45e_predictor_16x16_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_d45e_predictor_16x16 vpx_highbd_d45e_predictor_16x16_c - -void vpx_highbd_d45e_predictor_32x32_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_d45e_predictor_32x32 vpx_highbd_d45e_predictor_32x32_c - -void vpx_highbd_d45e_predictor_4x4_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_d45e_predictor_4x4 vpx_highbd_d45e_predictor_4x4_c - -void vpx_highbd_d45e_predictor_8x8_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_d45e_predictor_8x8 vpx_highbd_d45e_predictor_8x8_c - -void vpx_highbd_d63_predictor_16x16_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_d63_predictor_16x16 vpx_highbd_d63_predictor_16x16_c - -void vpx_highbd_d63_predictor_32x32_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_d63_predictor_32x32 vpx_highbd_d63_predictor_32x32_c - -void vpx_highbd_d63_predictor_4x4_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_d63_predictor_4x4 vpx_highbd_d63_predictor_4x4_c - -void vpx_highbd_d63_predictor_8x8_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_d63_predictor_8x8 vpx_highbd_d63_predictor_8x8_c - -void vpx_highbd_d63e_predictor_16x16_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_d63e_predictor_16x16 vpx_highbd_d63e_predictor_16x16_c - -void vpx_highbd_d63e_predictor_32x32_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_d63e_predictor_32x32 vpx_highbd_d63e_predictor_32x32_c - -void vpx_highbd_d63e_predictor_4x4_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_d63e_predictor_4x4 vpx_highbd_d63e_predictor_4x4_c - -void vpx_highbd_d63e_predictor_8x8_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_d63e_predictor_8x8 vpx_highbd_d63e_predictor_8x8_c - -void vpx_highbd_dc_128_predictor_16x16_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_dc_128_predictor_16x16 vpx_highbd_dc_128_predictor_16x16_c - -void vpx_highbd_dc_128_predictor_32x32_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_dc_128_predictor_32x32 vpx_highbd_dc_128_predictor_32x32_c - -void vpx_highbd_dc_128_predictor_4x4_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_dc_128_predictor_4x4 vpx_highbd_dc_128_predictor_4x4_c - -void vpx_highbd_dc_128_predictor_8x8_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_dc_128_predictor_8x8 vpx_highbd_dc_128_predictor_8x8_c - -void vpx_highbd_dc_left_predictor_16x16_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_dc_left_predictor_16x16 vpx_highbd_dc_left_predictor_16x16_c - -void vpx_highbd_dc_left_predictor_32x32_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_dc_left_predictor_32x32 vpx_highbd_dc_left_predictor_32x32_c - -void vpx_highbd_dc_left_predictor_4x4_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_dc_left_predictor_4x4 vpx_highbd_dc_left_predictor_4x4_c - -void vpx_highbd_dc_left_predictor_8x8_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_dc_left_predictor_8x8 vpx_highbd_dc_left_predictor_8x8_c - -void vpx_highbd_dc_predictor_16x16_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -void vpx_highbd_dc_predictor_16x16_sse2(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_dc_predictor_16x16 vpx_highbd_dc_predictor_16x16_sse2 - -void vpx_highbd_dc_predictor_32x32_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -void vpx_highbd_dc_predictor_32x32_sse2(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_dc_predictor_32x32 vpx_highbd_dc_predictor_32x32_sse2 - -void vpx_highbd_dc_predictor_4x4_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -void vpx_highbd_dc_predictor_4x4_sse2(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_dc_predictor_4x4 vpx_highbd_dc_predictor_4x4_sse2 - -void vpx_highbd_dc_predictor_8x8_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -void vpx_highbd_dc_predictor_8x8_sse2(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_dc_predictor_8x8 vpx_highbd_dc_predictor_8x8_sse2 - -void vpx_highbd_dc_top_predictor_16x16_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_dc_top_predictor_16x16 vpx_highbd_dc_top_predictor_16x16_c - -void vpx_highbd_dc_top_predictor_32x32_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_dc_top_predictor_32x32 vpx_highbd_dc_top_predictor_32x32_c - -void vpx_highbd_dc_top_predictor_4x4_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_dc_top_predictor_4x4 vpx_highbd_dc_top_predictor_4x4_c - -void vpx_highbd_dc_top_predictor_8x8_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_dc_top_predictor_8x8 vpx_highbd_dc_top_predictor_8x8_c - -void vpx_highbd_fdct16x16_c(const int16_t *input, tran_low_t *output, int stride); -void vpx_highbd_fdct16x16_sse2(const int16_t *input, tran_low_t *output, int stride); -#define vpx_highbd_fdct16x16 vpx_highbd_fdct16x16_sse2 - -void vpx_highbd_fdct16x16_1_c(const int16_t *input, tran_low_t *output, int stride); -#define vpx_highbd_fdct16x16_1 vpx_highbd_fdct16x16_1_c - -void vpx_highbd_fdct32x32_c(const int16_t *input, tran_low_t *output, int stride); -void vpx_highbd_fdct32x32_sse2(const int16_t *input, tran_low_t *output, int stride); -#define vpx_highbd_fdct32x32 vpx_highbd_fdct32x32_sse2 - -void vpx_highbd_fdct32x32_1_c(const int16_t *input, tran_low_t *output, int stride); -#define vpx_highbd_fdct32x32_1 vpx_highbd_fdct32x32_1_c - -void vpx_highbd_fdct32x32_rd_c(const int16_t *input, tran_low_t *output, int stride); -void vpx_highbd_fdct32x32_rd_sse2(const int16_t *input, tran_low_t *output, int stride); -#define vpx_highbd_fdct32x32_rd vpx_highbd_fdct32x32_rd_sse2 - -void vpx_highbd_fdct4x4_c(const int16_t *input, tran_low_t *output, int stride); -void vpx_highbd_fdct4x4_sse2(const int16_t *input, tran_low_t *output, int stride); -#define vpx_highbd_fdct4x4 vpx_highbd_fdct4x4_sse2 - -void vpx_highbd_fdct8x8_c(const int16_t *input, tran_low_t *output, int stride); -void vpx_highbd_fdct8x8_sse2(const int16_t *input, tran_low_t *output, int stride); -#define vpx_highbd_fdct8x8 vpx_highbd_fdct8x8_sse2 - -void vpx_highbd_fdct8x8_1_c(const int16_t *input, tran_low_t *output, int stride); -#define vpx_highbd_fdct8x8_1 vpx_highbd_fdct8x8_1_c - -void vpx_highbd_h_predictor_16x16_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_h_predictor_16x16 vpx_highbd_h_predictor_16x16_c - -void vpx_highbd_h_predictor_32x32_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_h_predictor_32x32 vpx_highbd_h_predictor_32x32_c - -void vpx_highbd_h_predictor_4x4_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_h_predictor_4x4 vpx_highbd_h_predictor_4x4_c - -void vpx_highbd_h_predictor_8x8_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_h_predictor_8x8 vpx_highbd_h_predictor_8x8_c - -void vpx_highbd_idct16x16_10_add_c(const tran_low_t *input, uint8_t *dest, int stride, int bd); -void vpx_highbd_idct16x16_10_add_sse2(const tran_low_t *input, uint8_t *dest, int stride, int bd); -#define vpx_highbd_idct16x16_10_add vpx_highbd_idct16x16_10_add_sse2 - -void vpx_highbd_idct16x16_1_add_c(const tran_low_t *input, uint8_t *dest, int stride, int bd); -#define vpx_highbd_idct16x16_1_add vpx_highbd_idct16x16_1_add_c - -void vpx_highbd_idct16x16_256_add_c(const tran_low_t *input, uint8_t *dest, int stride, int bd); -void vpx_highbd_idct16x16_256_add_sse2(const tran_low_t *input, uint8_t *dest, int stride, int bd); -#define vpx_highbd_idct16x16_256_add vpx_highbd_idct16x16_256_add_sse2 - -void vpx_highbd_idct32x32_1024_add_c(const tran_low_t *input, uint8_t *dest, int stride, int bd); -#define vpx_highbd_idct32x32_1024_add vpx_highbd_idct32x32_1024_add_c - -void vpx_highbd_idct32x32_1_add_c(const tran_low_t *input, uint8_t *dest, int stride, int bd); -void vpx_highbd_idct32x32_1_add_sse2(const tran_low_t *input, uint8_t *dest, int stride, int bd); -#define vpx_highbd_idct32x32_1_add vpx_highbd_idct32x32_1_add_sse2 - -void vpx_highbd_idct32x32_34_add_c(const tran_low_t *input, uint8_t *dest, int stride, int bd); -#define vpx_highbd_idct32x32_34_add vpx_highbd_idct32x32_34_add_c - -void vpx_highbd_idct4x4_16_add_c(const tran_low_t *input, uint8_t *dest, int stride, int bd); -void vpx_highbd_idct4x4_16_add_sse2(const tran_low_t *input, uint8_t *dest, int stride, int bd); -#define vpx_highbd_idct4x4_16_add vpx_highbd_idct4x4_16_add_sse2 - -void vpx_highbd_idct4x4_1_add_c(const tran_low_t *input, uint8_t *dest, int stride, int bd); -#define vpx_highbd_idct4x4_1_add vpx_highbd_idct4x4_1_add_c - -void vpx_highbd_idct8x8_12_add_c(const tran_low_t *input, uint8_t *dest, int stride, int bd); -void vpx_highbd_idct8x8_12_add_sse2(const tran_low_t *input, uint8_t *dest, int stride, int bd); -#define vpx_highbd_idct8x8_12_add vpx_highbd_idct8x8_12_add_sse2 - -void vpx_highbd_idct8x8_1_add_c(const tran_low_t *input, uint8_t *dest, int stride, int bd); -#define vpx_highbd_idct8x8_1_add vpx_highbd_idct8x8_1_add_c - -void vpx_highbd_idct8x8_64_add_c(const tran_low_t *input, uint8_t *dest, int stride, int bd); -void vpx_highbd_idct8x8_64_add_sse2(const tran_low_t *input, uint8_t *dest, int stride, int bd); -#define vpx_highbd_idct8x8_64_add vpx_highbd_idct8x8_64_add_sse2 - -void vpx_highbd_iwht4x4_16_add_c(const tran_low_t *input, uint8_t *dest, int stride, int bd); -#define vpx_highbd_iwht4x4_16_add vpx_highbd_iwht4x4_16_add_c - -void vpx_highbd_iwht4x4_1_add_c(const tran_low_t *input, uint8_t *dest, int stride, int bd); -#define vpx_highbd_iwht4x4_1_add vpx_highbd_iwht4x4_1_add_c - -void vpx_highbd_lpf_horizontal_16_c(uint16_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh, int bd); -void vpx_highbd_lpf_horizontal_16_sse2(uint16_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh, int bd); -#define vpx_highbd_lpf_horizontal_16 vpx_highbd_lpf_horizontal_16_sse2 - -void vpx_highbd_lpf_horizontal_16_dual_c(uint16_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh, int bd); -void vpx_highbd_lpf_horizontal_16_dual_sse2(uint16_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh, int bd); -#define vpx_highbd_lpf_horizontal_16_dual vpx_highbd_lpf_horizontal_16_dual_sse2 - -void vpx_highbd_lpf_horizontal_4_c(uint16_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh, int bd); -void vpx_highbd_lpf_horizontal_4_sse2(uint16_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh, int bd); -#define vpx_highbd_lpf_horizontal_4 vpx_highbd_lpf_horizontal_4_sse2 - -void vpx_highbd_lpf_horizontal_4_dual_c(uint16_t *s, int pitch, const uint8_t *blimit0, const uint8_t *limit0, const uint8_t *thresh0, const uint8_t *blimit1, const uint8_t *limit1, const uint8_t *thresh1, int bd); -void vpx_highbd_lpf_horizontal_4_dual_sse2(uint16_t *s, int pitch, const uint8_t *blimit0, const uint8_t *limit0, const uint8_t *thresh0, const uint8_t *blimit1, const uint8_t *limit1, const uint8_t *thresh1, int bd); -#define vpx_highbd_lpf_horizontal_4_dual vpx_highbd_lpf_horizontal_4_dual_sse2 - -void vpx_highbd_lpf_horizontal_8_c(uint16_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh, int bd); -void vpx_highbd_lpf_horizontal_8_sse2(uint16_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh, int bd); -#define vpx_highbd_lpf_horizontal_8 vpx_highbd_lpf_horizontal_8_sse2 - -void vpx_highbd_lpf_horizontal_8_dual_c(uint16_t *s, int pitch, const uint8_t *blimit0, const uint8_t *limit0, const uint8_t *thresh0, const uint8_t *blimit1, const uint8_t *limit1, const uint8_t *thresh1, int bd); -void vpx_highbd_lpf_horizontal_8_dual_sse2(uint16_t *s, int pitch, const uint8_t *blimit0, const uint8_t *limit0, const uint8_t *thresh0, const uint8_t *blimit1, const uint8_t *limit1, const uint8_t *thresh1, int bd); -#define vpx_highbd_lpf_horizontal_8_dual vpx_highbd_lpf_horizontal_8_dual_sse2 - -void vpx_highbd_lpf_vertical_16_c(uint16_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh, int bd); -void vpx_highbd_lpf_vertical_16_sse2(uint16_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh, int bd); -#define vpx_highbd_lpf_vertical_16 vpx_highbd_lpf_vertical_16_sse2 - -void vpx_highbd_lpf_vertical_16_dual_c(uint16_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh, int bd); -void vpx_highbd_lpf_vertical_16_dual_sse2(uint16_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh, int bd); -#define vpx_highbd_lpf_vertical_16_dual vpx_highbd_lpf_vertical_16_dual_sse2 - -void vpx_highbd_lpf_vertical_4_c(uint16_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh, int bd); -void vpx_highbd_lpf_vertical_4_sse2(uint16_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh, int bd); -#define vpx_highbd_lpf_vertical_4 vpx_highbd_lpf_vertical_4_sse2 - -void vpx_highbd_lpf_vertical_4_dual_c(uint16_t *s, int pitch, const uint8_t *blimit0, const uint8_t *limit0, const uint8_t *thresh0, const uint8_t *blimit1, const uint8_t *limit1, const uint8_t *thresh1, int bd); -void vpx_highbd_lpf_vertical_4_dual_sse2(uint16_t *s, int pitch, const uint8_t *blimit0, const uint8_t *limit0, const uint8_t *thresh0, const uint8_t *blimit1, const uint8_t *limit1, const uint8_t *thresh1, int bd); -#define vpx_highbd_lpf_vertical_4_dual vpx_highbd_lpf_vertical_4_dual_sse2 - -void vpx_highbd_lpf_vertical_8_c(uint16_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh, int bd); -void vpx_highbd_lpf_vertical_8_sse2(uint16_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh, int bd); -#define vpx_highbd_lpf_vertical_8 vpx_highbd_lpf_vertical_8_sse2 - -void vpx_highbd_lpf_vertical_8_dual_c(uint16_t *s, int pitch, const uint8_t *blimit0, const uint8_t *limit0, const uint8_t *thresh0, const uint8_t *blimit1, const uint8_t *limit1, const uint8_t *thresh1, int bd); -void vpx_highbd_lpf_vertical_8_dual_sse2(uint16_t *s, int pitch, const uint8_t *blimit0, const uint8_t *limit0, const uint8_t *thresh0, const uint8_t *blimit1, const uint8_t *limit1, const uint8_t *thresh1, int bd); -#define vpx_highbd_lpf_vertical_8_dual vpx_highbd_lpf_vertical_8_dual_sse2 - -void vpx_highbd_minmax_8x8_c(const uint8_t *s, int p, const uint8_t *d, int dp, int *min, int *max); -#define vpx_highbd_minmax_8x8 vpx_highbd_minmax_8x8_c - -void vpx_highbd_quantize_b_c(const tran_low_t *coeff_ptr, intptr_t n_coeffs, int skip_block, const int16_t *zbin_ptr, const int16_t *round_ptr, const int16_t *quant_ptr, const int16_t *quant_shift_ptr, tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr, const int16_t *dequant_ptr, uint16_t *eob_ptr, const int16_t *scan, const int16_t *iscan); -void vpx_highbd_quantize_b_sse2(const tran_low_t *coeff_ptr, intptr_t n_coeffs, int skip_block, const int16_t *zbin_ptr, const int16_t *round_ptr, const int16_t *quant_ptr, const int16_t *quant_shift_ptr, tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr, const int16_t *dequant_ptr, uint16_t *eob_ptr, const int16_t *scan, const int16_t *iscan); -#define vpx_highbd_quantize_b vpx_highbd_quantize_b_sse2 - -void vpx_highbd_quantize_b_32x32_c(const tran_low_t *coeff_ptr, intptr_t n_coeffs, int skip_block, const int16_t *zbin_ptr, const int16_t *round_ptr, const int16_t *quant_ptr, const int16_t *quant_shift_ptr, tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr, const int16_t *dequant_ptr, uint16_t *eob_ptr, const int16_t *scan, const int16_t *iscan); -void vpx_highbd_quantize_b_32x32_sse2(const tran_low_t *coeff_ptr, intptr_t n_coeffs, int skip_block, const int16_t *zbin_ptr, const int16_t *round_ptr, const int16_t *quant_ptr, const int16_t *quant_shift_ptr, tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr, const int16_t *dequant_ptr, uint16_t *eob_ptr, const int16_t *scan, const int16_t *iscan); -#define vpx_highbd_quantize_b_32x32 vpx_highbd_quantize_b_32x32_sse2 - -unsigned int vpx_highbd_sad16x16_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -unsigned int vpx_highbd_sad16x16_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -#define vpx_highbd_sad16x16 vpx_highbd_sad16x16_sse2 - -unsigned int vpx_highbd_sad16x16_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -unsigned int vpx_highbd_sad16x16_avg_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -#define vpx_highbd_sad16x16_avg vpx_highbd_sad16x16_avg_sse2 - -void vpx_highbd_sad16x16x3_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -#define vpx_highbd_sad16x16x3 vpx_highbd_sad16x16x3_c - -void vpx_highbd_sad16x16x4d_c(const uint8_t *src_ptr, int src_stride, const uint8_t* const ref_ptr[], int ref_stride, uint32_t *sad_array); -void vpx_highbd_sad16x16x4d_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t* const ref_ptr[], int ref_stride, uint32_t *sad_array); -#define vpx_highbd_sad16x16x4d vpx_highbd_sad16x16x4d_sse2 - -void vpx_highbd_sad16x16x8_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -#define vpx_highbd_sad16x16x8 vpx_highbd_sad16x16x8_c - -unsigned int vpx_highbd_sad16x32_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -unsigned int vpx_highbd_sad16x32_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -#define vpx_highbd_sad16x32 vpx_highbd_sad16x32_sse2 - -unsigned int vpx_highbd_sad16x32_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -unsigned int vpx_highbd_sad16x32_avg_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -#define vpx_highbd_sad16x32_avg vpx_highbd_sad16x32_avg_sse2 - -void vpx_highbd_sad16x32x4d_c(const uint8_t *src_ptr, int src_stride, const uint8_t* const ref_ptr[], int ref_stride, uint32_t *sad_array); -void vpx_highbd_sad16x32x4d_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t* const ref_ptr[], int ref_stride, uint32_t *sad_array); -#define vpx_highbd_sad16x32x4d vpx_highbd_sad16x32x4d_sse2 - -unsigned int vpx_highbd_sad16x8_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -unsigned int vpx_highbd_sad16x8_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -#define vpx_highbd_sad16x8 vpx_highbd_sad16x8_sse2 - -unsigned int vpx_highbd_sad16x8_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -unsigned int vpx_highbd_sad16x8_avg_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -#define vpx_highbd_sad16x8_avg vpx_highbd_sad16x8_avg_sse2 - -void vpx_highbd_sad16x8x3_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -#define vpx_highbd_sad16x8x3 vpx_highbd_sad16x8x3_c - -void vpx_highbd_sad16x8x4d_c(const uint8_t *src_ptr, int src_stride, const uint8_t* const ref_ptr[], int ref_stride, uint32_t *sad_array); -void vpx_highbd_sad16x8x4d_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t* const ref_ptr[], int ref_stride, uint32_t *sad_array); -#define vpx_highbd_sad16x8x4d vpx_highbd_sad16x8x4d_sse2 - -void vpx_highbd_sad16x8x8_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -#define vpx_highbd_sad16x8x8 vpx_highbd_sad16x8x8_c - -unsigned int vpx_highbd_sad32x16_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -unsigned int vpx_highbd_sad32x16_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -#define vpx_highbd_sad32x16 vpx_highbd_sad32x16_sse2 - -unsigned int vpx_highbd_sad32x16_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -unsigned int vpx_highbd_sad32x16_avg_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -#define vpx_highbd_sad32x16_avg vpx_highbd_sad32x16_avg_sse2 - -void vpx_highbd_sad32x16x4d_c(const uint8_t *src_ptr, int src_stride, const uint8_t* const ref_ptr[], int ref_stride, uint32_t *sad_array); -void vpx_highbd_sad32x16x4d_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t* const ref_ptr[], int ref_stride, uint32_t *sad_array); -#define vpx_highbd_sad32x16x4d vpx_highbd_sad32x16x4d_sse2 - -unsigned int vpx_highbd_sad32x32_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -unsigned int vpx_highbd_sad32x32_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -#define vpx_highbd_sad32x32 vpx_highbd_sad32x32_sse2 - -unsigned int vpx_highbd_sad32x32_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -unsigned int vpx_highbd_sad32x32_avg_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -#define vpx_highbd_sad32x32_avg vpx_highbd_sad32x32_avg_sse2 - -void vpx_highbd_sad32x32x3_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -#define vpx_highbd_sad32x32x3 vpx_highbd_sad32x32x3_c - -void vpx_highbd_sad32x32x4d_c(const uint8_t *src_ptr, int src_stride, const uint8_t* const ref_ptr[], int ref_stride, uint32_t *sad_array); -void vpx_highbd_sad32x32x4d_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t* const ref_ptr[], int ref_stride, uint32_t *sad_array); -#define vpx_highbd_sad32x32x4d vpx_highbd_sad32x32x4d_sse2 - -void vpx_highbd_sad32x32x8_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -#define vpx_highbd_sad32x32x8 vpx_highbd_sad32x32x8_c - -unsigned int vpx_highbd_sad32x64_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -unsigned int vpx_highbd_sad32x64_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -#define vpx_highbd_sad32x64 vpx_highbd_sad32x64_sse2 - -unsigned int vpx_highbd_sad32x64_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -unsigned int vpx_highbd_sad32x64_avg_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -#define vpx_highbd_sad32x64_avg vpx_highbd_sad32x64_avg_sse2 - -void vpx_highbd_sad32x64x4d_c(const uint8_t *src_ptr, int src_stride, const uint8_t* const ref_ptr[], int ref_stride, uint32_t *sad_array); -void vpx_highbd_sad32x64x4d_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t* const ref_ptr[], int ref_stride, uint32_t *sad_array); -#define vpx_highbd_sad32x64x4d vpx_highbd_sad32x64x4d_sse2 - -unsigned int vpx_highbd_sad4x4_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -#define vpx_highbd_sad4x4 vpx_highbd_sad4x4_c - -unsigned int vpx_highbd_sad4x4_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -#define vpx_highbd_sad4x4_avg vpx_highbd_sad4x4_avg_c - -void vpx_highbd_sad4x4x3_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -#define vpx_highbd_sad4x4x3 vpx_highbd_sad4x4x3_c - -void vpx_highbd_sad4x4x4d_c(const uint8_t *src_ptr, int src_stride, const uint8_t* const ref_ptr[], int ref_stride, uint32_t *sad_array); -void vpx_highbd_sad4x4x4d_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t* const ref_ptr[], int ref_stride, uint32_t *sad_array); -#define vpx_highbd_sad4x4x4d vpx_highbd_sad4x4x4d_sse2 - -void vpx_highbd_sad4x4x8_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -#define vpx_highbd_sad4x4x8 vpx_highbd_sad4x4x8_c - -unsigned int vpx_highbd_sad4x8_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -#define vpx_highbd_sad4x8 vpx_highbd_sad4x8_c - -unsigned int vpx_highbd_sad4x8_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -#define vpx_highbd_sad4x8_avg vpx_highbd_sad4x8_avg_c - -void vpx_highbd_sad4x8x4d_c(const uint8_t *src_ptr, int src_stride, const uint8_t* const ref_ptr[], int ref_stride, uint32_t *sad_array); -void vpx_highbd_sad4x8x4d_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t* const ref_ptr[], int ref_stride, uint32_t *sad_array); -#define vpx_highbd_sad4x8x4d vpx_highbd_sad4x8x4d_sse2 - -void vpx_highbd_sad4x8x8_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -#define vpx_highbd_sad4x8x8 vpx_highbd_sad4x8x8_c - -unsigned int vpx_highbd_sad64x32_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -unsigned int vpx_highbd_sad64x32_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -#define vpx_highbd_sad64x32 vpx_highbd_sad64x32_sse2 - -unsigned int vpx_highbd_sad64x32_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -unsigned int vpx_highbd_sad64x32_avg_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -#define vpx_highbd_sad64x32_avg vpx_highbd_sad64x32_avg_sse2 - -void vpx_highbd_sad64x32x4d_c(const uint8_t *src_ptr, int src_stride, const uint8_t* const ref_ptr[], int ref_stride, uint32_t *sad_array); -void vpx_highbd_sad64x32x4d_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t* const ref_ptr[], int ref_stride, uint32_t *sad_array); -#define vpx_highbd_sad64x32x4d vpx_highbd_sad64x32x4d_sse2 - -unsigned int vpx_highbd_sad64x64_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -unsigned int vpx_highbd_sad64x64_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -#define vpx_highbd_sad64x64 vpx_highbd_sad64x64_sse2 - -unsigned int vpx_highbd_sad64x64_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -unsigned int vpx_highbd_sad64x64_avg_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -#define vpx_highbd_sad64x64_avg vpx_highbd_sad64x64_avg_sse2 - -void vpx_highbd_sad64x64x3_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -#define vpx_highbd_sad64x64x3 vpx_highbd_sad64x64x3_c - -void vpx_highbd_sad64x64x4d_c(const uint8_t *src_ptr, int src_stride, const uint8_t* const ref_ptr[], int ref_stride, uint32_t *sad_array); -void vpx_highbd_sad64x64x4d_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t* const ref_ptr[], int ref_stride, uint32_t *sad_array); -#define vpx_highbd_sad64x64x4d vpx_highbd_sad64x64x4d_sse2 - -void vpx_highbd_sad64x64x8_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -#define vpx_highbd_sad64x64x8 vpx_highbd_sad64x64x8_c - -unsigned int vpx_highbd_sad8x16_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -unsigned int vpx_highbd_sad8x16_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -#define vpx_highbd_sad8x16 vpx_highbd_sad8x16_sse2 - -unsigned int vpx_highbd_sad8x16_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -unsigned int vpx_highbd_sad8x16_avg_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -#define vpx_highbd_sad8x16_avg vpx_highbd_sad8x16_avg_sse2 - -void vpx_highbd_sad8x16x3_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -#define vpx_highbd_sad8x16x3 vpx_highbd_sad8x16x3_c - -void vpx_highbd_sad8x16x4d_c(const uint8_t *src_ptr, int src_stride, const uint8_t* const ref_ptr[], int ref_stride, uint32_t *sad_array); -void vpx_highbd_sad8x16x4d_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t* const ref_ptr[], int ref_stride, uint32_t *sad_array); -#define vpx_highbd_sad8x16x4d vpx_highbd_sad8x16x4d_sse2 - -void vpx_highbd_sad8x16x8_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -#define vpx_highbd_sad8x16x8 vpx_highbd_sad8x16x8_c - -unsigned int vpx_highbd_sad8x4_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -unsigned int vpx_highbd_sad8x4_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -#define vpx_highbd_sad8x4 vpx_highbd_sad8x4_sse2 - -unsigned int vpx_highbd_sad8x4_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -unsigned int vpx_highbd_sad8x4_avg_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -#define vpx_highbd_sad8x4_avg vpx_highbd_sad8x4_avg_sse2 - -void vpx_highbd_sad8x4x4d_c(const uint8_t *src_ptr, int src_stride, const uint8_t* const ref_ptr[], int ref_stride, uint32_t *sad_array); -void vpx_highbd_sad8x4x4d_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t* const ref_ptr[], int ref_stride, uint32_t *sad_array); -#define vpx_highbd_sad8x4x4d vpx_highbd_sad8x4x4d_sse2 - -void vpx_highbd_sad8x4x8_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -#define vpx_highbd_sad8x4x8 vpx_highbd_sad8x4x8_c - -unsigned int vpx_highbd_sad8x8_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -unsigned int vpx_highbd_sad8x8_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -#define vpx_highbd_sad8x8 vpx_highbd_sad8x8_sse2 - -unsigned int vpx_highbd_sad8x8_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -unsigned int vpx_highbd_sad8x8_avg_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -#define vpx_highbd_sad8x8_avg vpx_highbd_sad8x8_avg_sse2 - -void vpx_highbd_sad8x8x3_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -#define vpx_highbd_sad8x8x3 vpx_highbd_sad8x8x3_c - -void vpx_highbd_sad8x8x4d_c(const uint8_t *src_ptr, int src_stride, const uint8_t* const ref_ptr[], int ref_stride, uint32_t *sad_array); -void vpx_highbd_sad8x8x4d_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t* const ref_ptr[], int ref_stride, uint32_t *sad_array); -#define vpx_highbd_sad8x8x4d vpx_highbd_sad8x8x4d_sse2 - -void vpx_highbd_sad8x8x8_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -#define vpx_highbd_sad8x8x8 vpx_highbd_sad8x8x8_c - -void vpx_highbd_subtract_block_c(int rows, int cols, int16_t *diff_ptr, ptrdiff_t diff_stride, const uint8_t *src_ptr, ptrdiff_t src_stride, const uint8_t *pred_ptr, ptrdiff_t pred_stride, int bd); -#define vpx_highbd_subtract_block vpx_highbd_subtract_block_c - -void vpx_highbd_tm_predictor_16x16_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -void vpx_highbd_tm_predictor_16x16_sse2(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_tm_predictor_16x16 vpx_highbd_tm_predictor_16x16_sse2 - -void vpx_highbd_tm_predictor_32x32_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -void vpx_highbd_tm_predictor_32x32_sse2(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_tm_predictor_32x32 vpx_highbd_tm_predictor_32x32_sse2 - -void vpx_highbd_tm_predictor_4x4_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -void vpx_highbd_tm_predictor_4x4_sse2(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_tm_predictor_4x4 vpx_highbd_tm_predictor_4x4_sse2 - -void vpx_highbd_tm_predictor_8x8_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -void vpx_highbd_tm_predictor_8x8_sse2(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_tm_predictor_8x8 vpx_highbd_tm_predictor_8x8_sse2 - -void vpx_highbd_v_predictor_16x16_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -void vpx_highbd_v_predictor_16x16_sse2(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_v_predictor_16x16 vpx_highbd_v_predictor_16x16_sse2 - -void vpx_highbd_v_predictor_32x32_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -void vpx_highbd_v_predictor_32x32_sse2(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_v_predictor_32x32 vpx_highbd_v_predictor_32x32_sse2 - -void vpx_highbd_v_predictor_4x4_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -void vpx_highbd_v_predictor_4x4_sse2(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_v_predictor_4x4 vpx_highbd_v_predictor_4x4_sse2 - -void vpx_highbd_v_predictor_8x8_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -void vpx_highbd_v_predictor_8x8_sse2(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_v_predictor_8x8 vpx_highbd_v_predictor_8x8_sse2 - -void vpx_idct16x16_10_add_c(const tran_low_t *input, uint8_t *dest, int stride); -void vpx_idct16x16_10_add_sse2(const tran_low_t *input, uint8_t *dest, int stride); -#define vpx_idct16x16_10_add vpx_idct16x16_10_add_sse2 - -void vpx_idct16x16_1_add_c(const tran_low_t *input, uint8_t *dest, int stride); -void vpx_idct16x16_1_add_sse2(const tran_low_t *input, uint8_t *dest, int stride); -#define vpx_idct16x16_1_add vpx_idct16x16_1_add_sse2 - -void vpx_idct16x16_256_add_c(const tran_low_t *input, uint8_t *dest, int stride); -void vpx_idct16x16_256_add_sse2(const tran_low_t *input, uint8_t *dest, int stride); -#define vpx_idct16x16_256_add vpx_idct16x16_256_add_sse2 - -void vpx_idct32x32_1024_add_c(const tran_low_t *input, uint8_t *dest, int stride); -void vpx_idct32x32_1024_add_sse2(const tran_low_t *input, uint8_t *dest, int stride); -void vpx_idct32x32_1024_add_ssse3(const tran_low_t *input, uint8_t *dest, int stride); -RTCD_EXTERN void (*vpx_idct32x32_1024_add)(const tran_low_t *input, uint8_t *dest, int stride); - -void vpx_idct32x32_135_add_c(const tran_low_t *input, uint8_t *dest, int stride); -void vpx_idct32x32_1024_add_sse2(const tran_low_t *input, uint8_t *dest, int stride); -void vpx_idct32x32_135_add_ssse3(const tran_low_t *input, uint8_t *dest, int stride); -RTCD_EXTERN void (*vpx_idct32x32_135_add)(const tran_low_t *input, uint8_t *dest, int stride); - -void vpx_idct32x32_1_add_c(const tran_low_t *input, uint8_t *dest, int stride); -void vpx_idct32x32_1_add_sse2(const tran_low_t *input, uint8_t *dest, int stride); -#define vpx_idct32x32_1_add vpx_idct32x32_1_add_sse2 - -void vpx_idct32x32_34_add_c(const tran_low_t *input, uint8_t *dest, int stride); -void vpx_idct32x32_34_add_sse2(const tran_low_t *input, uint8_t *dest, int stride); -void vpx_idct32x32_34_add_ssse3(const tran_low_t *input, uint8_t *dest, int stride); -RTCD_EXTERN void (*vpx_idct32x32_34_add)(const tran_low_t *input, uint8_t *dest, int stride); - -void vpx_idct4x4_16_add_c(const tran_low_t *input, uint8_t *dest, int stride); -void vpx_idct4x4_16_add_sse2(const tran_low_t *input, uint8_t *dest, int stride); -#define vpx_idct4x4_16_add vpx_idct4x4_16_add_sse2 - -void vpx_idct4x4_1_add_c(const tran_low_t *input, uint8_t *dest, int stride); -void vpx_idct4x4_1_add_sse2(const tran_low_t *input, uint8_t *dest, int stride); -#define vpx_idct4x4_1_add vpx_idct4x4_1_add_sse2 - -void vpx_idct8x8_12_add_c(const tran_low_t *input, uint8_t *dest, int stride); -void vpx_idct8x8_12_add_sse2(const tran_low_t *input, uint8_t *dest, int stride); -void vpx_idct8x8_12_add_ssse3(const tran_low_t *input, uint8_t *dest, int stride); -RTCD_EXTERN void (*vpx_idct8x8_12_add)(const tran_low_t *input, uint8_t *dest, int stride); - -void vpx_idct8x8_1_add_c(const tran_low_t *input, uint8_t *dest, int stride); -void vpx_idct8x8_1_add_sse2(const tran_low_t *input, uint8_t *dest, int stride); -#define vpx_idct8x8_1_add vpx_idct8x8_1_add_sse2 - -void vpx_idct8x8_64_add_c(const tran_low_t *input, uint8_t *dest, int stride); -void vpx_idct8x8_64_add_sse2(const tran_low_t *input, uint8_t *dest, int stride); -void vpx_idct8x8_64_add_ssse3(const tran_low_t *input, uint8_t *dest, int stride); -RTCD_EXTERN void (*vpx_idct8x8_64_add)(const tran_low_t *input, uint8_t *dest, int stride); - -int16_t vpx_int_pro_col_c(const uint8_t *ref, const int width); -int16_t vpx_int_pro_col_sse2(const uint8_t *ref, const int width); -#define vpx_int_pro_col vpx_int_pro_col_sse2 - -void vpx_int_pro_row_c(int16_t *hbuf, const uint8_t *ref, const int ref_stride, const int height); -void vpx_int_pro_row_sse2(int16_t *hbuf, const uint8_t *ref, const int ref_stride, const int height); -#define vpx_int_pro_row vpx_int_pro_row_sse2 - -void vpx_iwht4x4_16_add_c(const tran_low_t *input, uint8_t *dest, int stride); -void vpx_iwht4x4_16_add_sse2(const tran_low_t *input, uint8_t *dest, int stride); -#define vpx_iwht4x4_16_add vpx_iwht4x4_16_add_sse2 - -void vpx_iwht4x4_1_add_c(const tran_low_t *input, uint8_t *dest, int stride); -#define vpx_iwht4x4_1_add vpx_iwht4x4_1_add_c - -void vpx_lpf_horizontal_16_c(uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh); -void vpx_lpf_horizontal_16_sse2(uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh); -void vpx_lpf_horizontal_16_avx2(uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh); -RTCD_EXTERN void (*vpx_lpf_horizontal_16)(uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh); - -void vpx_lpf_horizontal_16_dual_c(uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh); -void vpx_lpf_horizontal_16_dual_sse2(uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh); -void vpx_lpf_horizontal_16_dual_avx2(uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh); -RTCD_EXTERN void (*vpx_lpf_horizontal_16_dual)(uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh); - -void vpx_lpf_horizontal_4_c(uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh); -void vpx_lpf_horizontal_4_sse2(uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh); -#define vpx_lpf_horizontal_4 vpx_lpf_horizontal_4_sse2 - -void vpx_lpf_horizontal_4_dual_c(uint8_t *s, int pitch, const uint8_t *blimit0, const uint8_t *limit0, const uint8_t *thresh0, const uint8_t *blimit1, const uint8_t *limit1, const uint8_t *thresh1); -void vpx_lpf_horizontal_4_dual_sse2(uint8_t *s, int pitch, const uint8_t *blimit0, const uint8_t *limit0, const uint8_t *thresh0, const uint8_t *blimit1, const uint8_t *limit1, const uint8_t *thresh1); -#define vpx_lpf_horizontal_4_dual vpx_lpf_horizontal_4_dual_sse2 - -void vpx_lpf_horizontal_8_c(uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh); -void vpx_lpf_horizontal_8_sse2(uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh); -#define vpx_lpf_horizontal_8 vpx_lpf_horizontal_8_sse2 - -void vpx_lpf_horizontal_8_dual_c(uint8_t *s, int pitch, const uint8_t *blimit0, const uint8_t *limit0, const uint8_t *thresh0, const uint8_t *blimit1, const uint8_t *limit1, const uint8_t *thresh1); -void vpx_lpf_horizontal_8_dual_sse2(uint8_t *s, int pitch, const uint8_t *blimit0, const uint8_t *limit0, const uint8_t *thresh0, const uint8_t *blimit1, const uint8_t *limit1, const uint8_t *thresh1); -#define vpx_lpf_horizontal_8_dual vpx_lpf_horizontal_8_dual_sse2 - -void vpx_lpf_vertical_16_c(uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh); -void vpx_lpf_vertical_16_sse2(uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh); -#define vpx_lpf_vertical_16 vpx_lpf_vertical_16_sse2 - -void vpx_lpf_vertical_16_dual_c(uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh); -void vpx_lpf_vertical_16_dual_sse2(uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh); -#define vpx_lpf_vertical_16_dual vpx_lpf_vertical_16_dual_sse2 - -void vpx_lpf_vertical_4_c(uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh); -void vpx_lpf_vertical_4_sse2(uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh); -#define vpx_lpf_vertical_4 vpx_lpf_vertical_4_sse2 - -void vpx_lpf_vertical_4_dual_c(uint8_t *s, int pitch, const uint8_t *blimit0, const uint8_t *limit0, const uint8_t *thresh0, const uint8_t *blimit1, const uint8_t *limit1, const uint8_t *thresh1); -void vpx_lpf_vertical_4_dual_sse2(uint8_t *s, int pitch, const uint8_t *blimit0, const uint8_t *limit0, const uint8_t *thresh0, const uint8_t *blimit1, const uint8_t *limit1, const uint8_t *thresh1); -#define vpx_lpf_vertical_4_dual vpx_lpf_vertical_4_dual_sse2 - -void vpx_lpf_vertical_8_c(uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh); -void vpx_lpf_vertical_8_sse2(uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh); -#define vpx_lpf_vertical_8 vpx_lpf_vertical_8_sse2 - -void vpx_lpf_vertical_8_dual_c(uint8_t *s, int pitch, const uint8_t *blimit0, const uint8_t *limit0, const uint8_t *thresh0, const uint8_t *blimit1, const uint8_t *limit1, const uint8_t *thresh1); -void vpx_lpf_vertical_8_dual_sse2(uint8_t *s, int pitch, const uint8_t *blimit0, const uint8_t *limit0, const uint8_t *thresh0, const uint8_t *blimit1, const uint8_t *limit1, const uint8_t *thresh1); -#define vpx_lpf_vertical_8_dual vpx_lpf_vertical_8_dual_sse2 - -void vpx_mbpost_proc_across_ip_c(unsigned char *dst, int pitch, int rows, int cols,int flimit); -void vpx_mbpost_proc_across_ip_sse2(unsigned char *dst, int pitch, int rows, int cols,int flimit); -#define vpx_mbpost_proc_across_ip vpx_mbpost_proc_across_ip_sse2 - -void vpx_mbpost_proc_down_c(unsigned char *dst, int pitch, int rows, int cols,int flimit); -void vpx_mbpost_proc_down_sse2(unsigned char *dst, int pitch, int rows, int cols,int flimit); -#define vpx_mbpost_proc_down vpx_mbpost_proc_down_sse2 - -void vpx_minmax_8x8_c(const uint8_t *s, int p, const uint8_t *d, int dp, int *min, int *max); -void vpx_minmax_8x8_sse2(const uint8_t *s, int p, const uint8_t *d, int dp, int *min, int *max); -#define vpx_minmax_8x8 vpx_minmax_8x8_sse2 - -unsigned int vpx_mse16x16_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int recon_stride, unsigned int *sse); -unsigned int vpx_mse16x16_sse2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int recon_stride, unsigned int *sse); -unsigned int vpx_mse16x16_avx2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int recon_stride, unsigned int *sse); -RTCD_EXTERN unsigned int (*vpx_mse16x16)(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int recon_stride, unsigned int *sse); - -unsigned int vpx_mse16x8_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int recon_stride, unsigned int *sse); -unsigned int vpx_mse16x8_sse2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int recon_stride, unsigned int *sse); -#define vpx_mse16x8 vpx_mse16x8_sse2 - -unsigned int vpx_mse8x16_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int recon_stride, unsigned int *sse); -unsigned int vpx_mse8x16_sse2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int recon_stride, unsigned int *sse); -#define vpx_mse8x16 vpx_mse8x16_sse2 - -unsigned int vpx_mse8x8_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int recon_stride, unsigned int *sse); -unsigned int vpx_mse8x8_sse2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int recon_stride, unsigned int *sse); -#define vpx_mse8x8 vpx_mse8x8_sse2 - -void vpx_plane_add_noise_c(uint8_t *start, const int8_t *noise, int blackclamp, int whiteclamp, int width, int height, int pitch); -void vpx_plane_add_noise_sse2(uint8_t *start, const int8_t *noise, int blackclamp, int whiteclamp, int width, int height, int pitch); -#define vpx_plane_add_noise vpx_plane_add_noise_sse2 - -void vpx_post_proc_down_and_across_mb_row_c(unsigned char *src, unsigned char *dst, int src_pitch, int dst_pitch, int cols, unsigned char *flimits, int size); -void vpx_post_proc_down_and_across_mb_row_sse2(unsigned char *src, unsigned char *dst, int src_pitch, int dst_pitch, int cols, unsigned char *flimits, int size); -#define vpx_post_proc_down_and_across_mb_row vpx_post_proc_down_and_across_mb_row_sse2 - -void vpx_quantize_b_c(const tran_low_t *coeff_ptr, intptr_t n_coeffs, int skip_block, const int16_t *zbin_ptr, const int16_t *round_ptr, const int16_t *quant_ptr, const int16_t *quant_shift_ptr, tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr, const int16_t *dequant_ptr, uint16_t *eob_ptr, const int16_t *scan, const int16_t *iscan); -void vpx_quantize_b_sse2(const tran_low_t *coeff_ptr, intptr_t n_coeffs, int skip_block, const int16_t *zbin_ptr, const int16_t *round_ptr, const int16_t *quant_ptr, const int16_t *quant_shift_ptr, tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr, const int16_t *dequant_ptr, uint16_t *eob_ptr, const int16_t *scan, const int16_t *iscan); -void vpx_quantize_b_ssse3(const tran_low_t *coeff_ptr, intptr_t n_coeffs, int skip_block, const int16_t *zbin_ptr, const int16_t *round_ptr, const int16_t *quant_ptr, const int16_t *quant_shift_ptr, tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr, const int16_t *dequant_ptr, uint16_t *eob_ptr, const int16_t *scan, const int16_t *iscan); -void vpx_quantize_b_avx(const tran_low_t *coeff_ptr, intptr_t n_coeffs, int skip_block, const int16_t *zbin_ptr, const int16_t *round_ptr, const int16_t *quant_ptr, const int16_t *quant_shift_ptr, tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr, const int16_t *dequant_ptr, uint16_t *eob_ptr, const int16_t *scan, const int16_t *iscan); -RTCD_EXTERN void (*vpx_quantize_b)(const tran_low_t *coeff_ptr, intptr_t n_coeffs, int skip_block, const int16_t *zbin_ptr, const int16_t *round_ptr, const int16_t *quant_ptr, const int16_t *quant_shift_ptr, tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr, const int16_t *dequant_ptr, uint16_t *eob_ptr, const int16_t *scan, const int16_t *iscan); - -void vpx_quantize_b_32x32_c(const tran_low_t *coeff_ptr, intptr_t n_coeffs, int skip_block, const int16_t *zbin_ptr, const int16_t *round_ptr, const int16_t *quant_ptr, const int16_t *quant_shift_ptr, tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr, const int16_t *dequant_ptr, uint16_t *eob_ptr, const int16_t *scan, const int16_t *iscan); -void vpx_quantize_b_32x32_ssse3(const tran_low_t *coeff_ptr, intptr_t n_coeffs, int skip_block, const int16_t *zbin_ptr, const int16_t *round_ptr, const int16_t *quant_ptr, const int16_t *quant_shift_ptr, tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr, const int16_t *dequant_ptr, uint16_t *eob_ptr, const int16_t *scan, const int16_t *iscan); -void vpx_quantize_b_32x32_avx(const tran_low_t *coeff_ptr, intptr_t n_coeffs, int skip_block, const int16_t *zbin_ptr, const int16_t *round_ptr, const int16_t *quant_ptr, const int16_t *quant_shift_ptr, tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr, const int16_t *dequant_ptr, uint16_t *eob_ptr, const int16_t *scan, const int16_t *iscan); -RTCD_EXTERN void (*vpx_quantize_b_32x32)(const tran_low_t *coeff_ptr, intptr_t n_coeffs, int skip_block, const int16_t *zbin_ptr, const int16_t *round_ptr, const int16_t *quant_ptr, const int16_t *quant_shift_ptr, tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr, const int16_t *dequant_ptr, uint16_t *eob_ptr, const int16_t *scan, const int16_t *iscan); - -unsigned int vpx_sad16x16_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -unsigned int vpx_sad16x16_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -#define vpx_sad16x16 vpx_sad16x16_sse2 - -unsigned int vpx_sad16x16_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -unsigned int vpx_sad16x16_avg_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -#define vpx_sad16x16_avg vpx_sad16x16_avg_sse2 - -void vpx_sad16x16x3_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -void vpx_sad16x16x3_sse3(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -void vpx_sad16x16x3_ssse3(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -RTCD_EXTERN void (*vpx_sad16x16x3)(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); - -void vpx_sad16x16x4d_c(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); -void vpx_sad16x16x4d_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); -#define vpx_sad16x16x4d vpx_sad16x16x4d_sse2 - -void vpx_sad16x16x8_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -void vpx_sad16x16x8_sse4_1(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -RTCD_EXTERN void (*vpx_sad16x16x8)(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); - -unsigned int vpx_sad16x32_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -unsigned int vpx_sad16x32_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -#define vpx_sad16x32 vpx_sad16x32_sse2 - -unsigned int vpx_sad16x32_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -unsigned int vpx_sad16x32_avg_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -#define vpx_sad16x32_avg vpx_sad16x32_avg_sse2 - -void vpx_sad16x32x4d_c(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); -void vpx_sad16x32x4d_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); -#define vpx_sad16x32x4d vpx_sad16x32x4d_sse2 - -unsigned int vpx_sad16x8_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -unsigned int vpx_sad16x8_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -#define vpx_sad16x8 vpx_sad16x8_sse2 - -unsigned int vpx_sad16x8_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -unsigned int vpx_sad16x8_avg_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -#define vpx_sad16x8_avg vpx_sad16x8_avg_sse2 - -void vpx_sad16x8x3_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -void vpx_sad16x8x3_sse3(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -void vpx_sad16x8x3_ssse3(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -RTCD_EXTERN void (*vpx_sad16x8x3)(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); - -void vpx_sad16x8x4d_c(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); -void vpx_sad16x8x4d_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); -#define vpx_sad16x8x4d vpx_sad16x8x4d_sse2 - -void vpx_sad16x8x8_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -void vpx_sad16x8x8_sse4_1(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -RTCD_EXTERN void (*vpx_sad16x8x8)(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); - -unsigned int vpx_sad32x16_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -unsigned int vpx_sad32x16_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -unsigned int vpx_sad32x16_avx2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -RTCD_EXTERN unsigned int (*vpx_sad32x16)(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); - -unsigned int vpx_sad32x16_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -unsigned int vpx_sad32x16_avg_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -unsigned int vpx_sad32x16_avg_avx2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -RTCD_EXTERN unsigned int (*vpx_sad32x16_avg)(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); - -void vpx_sad32x16x4d_c(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); -void vpx_sad32x16x4d_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); -#define vpx_sad32x16x4d vpx_sad32x16x4d_sse2 - -unsigned int vpx_sad32x32_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -unsigned int vpx_sad32x32_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -unsigned int vpx_sad32x32_avx2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -RTCD_EXTERN unsigned int (*vpx_sad32x32)(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); - -unsigned int vpx_sad32x32_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -unsigned int vpx_sad32x32_avg_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -unsigned int vpx_sad32x32_avg_avx2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -RTCD_EXTERN unsigned int (*vpx_sad32x32_avg)(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); - -void vpx_sad32x32x3_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -#define vpx_sad32x32x3 vpx_sad32x32x3_c - -void vpx_sad32x32x4d_c(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); -void vpx_sad32x32x4d_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); -void vpx_sad32x32x4d_avx2(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); -RTCD_EXTERN void (*vpx_sad32x32x4d)(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); - -void vpx_sad32x32x8_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -#define vpx_sad32x32x8 vpx_sad32x32x8_c - -unsigned int vpx_sad32x64_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -unsigned int vpx_sad32x64_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -unsigned int vpx_sad32x64_avx2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -RTCD_EXTERN unsigned int (*vpx_sad32x64)(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); - -unsigned int vpx_sad32x64_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -unsigned int vpx_sad32x64_avg_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -unsigned int vpx_sad32x64_avg_avx2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -RTCD_EXTERN unsigned int (*vpx_sad32x64_avg)(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); - -void vpx_sad32x64x4d_c(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); -void vpx_sad32x64x4d_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); -#define vpx_sad32x64x4d vpx_sad32x64x4d_sse2 - -unsigned int vpx_sad4x4_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -unsigned int vpx_sad4x4_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -#define vpx_sad4x4 vpx_sad4x4_sse2 - -unsigned int vpx_sad4x4_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -unsigned int vpx_sad4x4_avg_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -#define vpx_sad4x4_avg vpx_sad4x4_avg_sse2 - -void vpx_sad4x4x3_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -void vpx_sad4x4x3_sse3(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -RTCD_EXTERN void (*vpx_sad4x4x3)(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); - -void vpx_sad4x4x4d_c(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); -void vpx_sad4x4x4d_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); -#define vpx_sad4x4x4d vpx_sad4x4x4d_sse2 - -void vpx_sad4x4x8_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -void vpx_sad4x4x8_sse4_1(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -RTCD_EXTERN void (*vpx_sad4x4x8)(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); - -unsigned int vpx_sad4x8_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -unsigned int vpx_sad4x8_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -#define vpx_sad4x8 vpx_sad4x8_sse2 - -unsigned int vpx_sad4x8_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -unsigned int vpx_sad4x8_avg_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -#define vpx_sad4x8_avg vpx_sad4x8_avg_sse2 - -void vpx_sad4x8x4d_c(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); -void vpx_sad4x8x4d_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); -#define vpx_sad4x8x4d vpx_sad4x8x4d_sse2 - -void vpx_sad4x8x8_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -#define vpx_sad4x8x8 vpx_sad4x8x8_c - -unsigned int vpx_sad64x32_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -unsigned int vpx_sad64x32_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -unsigned int vpx_sad64x32_avx2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -RTCD_EXTERN unsigned int (*vpx_sad64x32)(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); - -unsigned int vpx_sad64x32_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -unsigned int vpx_sad64x32_avg_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -unsigned int vpx_sad64x32_avg_avx2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -RTCD_EXTERN unsigned int (*vpx_sad64x32_avg)(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); - -void vpx_sad64x32x4d_c(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); -void vpx_sad64x32x4d_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); -#define vpx_sad64x32x4d vpx_sad64x32x4d_sse2 - -unsigned int vpx_sad64x64_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -unsigned int vpx_sad64x64_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -unsigned int vpx_sad64x64_avx2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -RTCD_EXTERN unsigned int (*vpx_sad64x64)(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); - -unsigned int vpx_sad64x64_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -unsigned int vpx_sad64x64_avg_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -unsigned int vpx_sad64x64_avg_avx2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -RTCD_EXTERN unsigned int (*vpx_sad64x64_avg)(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); - -void vpx_sad64x64x3_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -#define vpx_sad64x64x3 vpx_sad64x64x3_c - -void vpx_sad64x64x4d_c(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); -void vpx_sad64x64x4d_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); -void vpx_sad64x64x4d_avx2(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); -RTCD_EXTERN void (*vpx_sad64x64x4d)(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); - -void vpx_sad64x64x8_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -#define vpx_sad64x64x8 vpx_sad64x64x8_c - -unsigned int vpx_sad8x16_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -unsigned int vpx_sad8x16_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -#define vpx_sad8x16 vpx_sad8x16_sse2 - -unsigned int vpx_sad8x16_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -unsigned int vpx_sad8x16_avg_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -#define vpx_sad8x16_avg vpx_sad8x16_avg_sse2 - -void vpx_sad8x16x3_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -void vpx_sad8x16x3_sse3(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -RTCD_EXTERN void (*vpx_sad8x16x3)(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); - -void vpx_sad8x16x4d_c(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); -void vpx_sad8x16x4d_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); -#define vpx_sad8x16x4d vpx_sad8x16x4d_sse2 - -void vpx_sad8x16x8_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -void vpx_sad8x16x8_sse4_1(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -RTCD_EXTERN void (*vpx_sad8x16x8)(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); - -unsigned int vpx_sad8x4_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -unsigned int vpx_sad8x4_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -#define vpx_sad8x4 vpx_sad8x4_sse2 - -unsigned int vpx_sad8x4_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -unsigned int vpx_sad8x4_avg_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -#define vpx_sad8x4_avg vpx_sad8x4_avg_sse2 - -void vpx_sad8x4x4d_c(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); -void vpx_sad8x4x4d_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); -#define vpx_sad8x4x4d vpx_sad8x4x4d_sse2 - -void vpx_sad8x4x8_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -#define vpx_sad8x4x8 vpx_sad8x4x8_c - -unsigned int vpx_sad8x8_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -unsigned int vpx_sad8x8_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -#define vpx_sad8x8 vpx_sad8x8_sse2 - -unsigned int vpx_sad8x8_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -unsigned int vpx_sad8x8_avg_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -#define vpx_sad8x8_avg vpx_sad8x8_avg_sse2 - -void vpx_sad8x8x3_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -void vpx_sad8x8x3_sse3(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -RTCD_EXTERN void (*vpx_sad8x8x3)(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); - -void vpx_sad8x8x4d_c(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); -void vpx_sad8x8x4d_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); -#define vpx_sad8x8x4d vpx_sad8x8x4d_sse2 - -void vpx_sad8x8x8_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -void vpx_sad8x8x8_sse4_1(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -RTCD_EXTERN void (*vpx_sad8x8x8)(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); - -int vpx_satd_c(const int16_t *coeff, int length); -int vpx_satd_sse2(const int16_t *coeff, int length); -#define vpx_satd vpx_satd_sse2 - -void vpx_scaled_2d_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -void vpx_scaled_2d_ssse3(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -RTCD_EXTERN void (*vpx_scaled_2d)(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); - -void vpx_scaled_avg_2d_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -#define vpx_scaled_avg_2d vpx_scaled_avg_2d_c - -void vpx_scaled_avg_horiz_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -#define vpx_scaled_avg_horiz vpx_scaled_avg_horiz_c - -void vpx_scaled_avg_vert_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -#define vpx_scaled_avg_vert vpx_scaled_avg_vert_c - -void vpx_scaled_horiz_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -#define vpx_scaled_horiz vpx_scaled_horiz_c - -void vpx_scaled_vert_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -#define vpx_scaled_vert vpx_scaled_vert_c - -uint32_t vpx_sub_pixel_avg_variance16x16_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_sub_pixel_avg_variance16x16_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_sub_pixel_avg_variance16x16_ssse3(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -RTCD_EXTERN uint32_t (*vpx_sub_pixel_avg_variance16x16)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); - -uint32_t vpx_sub_pixel_avg_variance16x32_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_sub_pixel_avg_variance16x32_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_sub_pixel_avg_variance16x32_ssse3(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -RTCD_EXTERN uint32_t (*vpx_sub_pixel_avg_variance16x32)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); - -uint32_t vpx_sub_pixel_avg_variance16x8_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_sub_pixel_avg_variance16x8_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_sub_pixel_avg_variance16x8_ssse3(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -RTCD_EXTERN uint32_t (*vpx_sub_pixel_avg_variance16x8)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); - -uint32_t vpx_sub_pixel_avg_variance32x16_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_sub_pixel_avg_variance32x16_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_sub_pixel_avg_variance32x16_ssse3(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -RTCD_EXTERN uint32_t (*vpx_sub_pixel_avg_variance32x16)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); - -uint32_t vpx_sub_pixel_avg_variance32x32_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_sub_pixel_avg_variance32x32_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_sub_pixel_avg_variance32x32_ssse3(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_sub_pixel_avg_variance32x32_avx2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -RTCD_EXTERN uint32_t (*vpx_sub_pixel_avg_variance32x32)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); - -uint32_t vpx_sub_pixel_avg_variance32x64_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_sub_pixel_avg_variance32x64_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_sub_pixel_avg_variance32x64_ssse3(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -RTCD_EXTERN uint32_t (*vpx_sub_pixel_avg_variance32x64)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); - -uint32_t vpx_sub_pixel_avg_variance4x4_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_sub_pixel_avg_variance4x4_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_sub_pixel_avg_variance4x4_ssse3(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -RTCD_EXTERN uint32_t (*vpx_sub_pixel_avg_variance4x4)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); - -uint32_t vpx_sub_pixel_avg_variance4x8_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_sub_pixel_avg_variance4x8_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_sub_pixel_avg_variance4x8_ssse3(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -RTCD_EXTERN uint32_t (*vpx_sub_pixel_avg_variance4x8)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); - -uint32_t vpx_sub_pixel_avg_variance64x32_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_sub_pixel_avg_variance64x32_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_sub_pixel_avg_variance64x32_ssse3(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -RTCD_EXTERN uint32_t (*vpx_sub_pixel_avg_variance64x32)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); - -uint32_t vpx_sub_pixel_avg_variance64x64_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_sub_pixel_avg_variance64x64_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_sub_pixel_avg_variance64x64_ssse3(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_sub_pixel_avg_variance64x64_avx2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -RTCD_EXTERN uint32_t (*vpx_sub_pixel_avg_variance64x64)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); - -uint32_t vpx_sub_pixel_avg_variance8x16_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_sub_pixel_avg_variance8x16_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_sub_pixel_avg_variance8x16_ssse3(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -RTCD_EXTERN uint32_t (*vpx_sub_pixel_avg_variance8x16)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); - -uint32_t vpx_sub_pixel_avg_variance8x4_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_sub_pixel_avg_variance8x4_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_sub_pixel_avg_variance8x4_ssse3(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -RTCD_EXTERN uint32_t (*vpx_sub_pixel_avg_variance8x4)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); - -uint32_t vpx_sub_pixel_avg_variance8x8_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_sub_pixel_avg_variance8x8_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_sub_pixel_avg_variance8x8_ssse3(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -RTCD_EXTERN uint32_t (*vpx_sub_pixel_avg_variance8x8)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); - -uint32_t vpx_sub_pixel_variance16x16_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_sub_pixel_variance16x16_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_sub_pixel_variance16x16_ssse3(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -RTCD_EXTERN uint32_t (*vpx_sub_pixel_variance16x16)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); - -uint32_t vpx_sub_pixel_variance16x32_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_sub_pixel_variance16x32_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_sub_pixel_variance16x32_ssse3(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -RTCD_EXTERN uint32_t (*vpx_sub_pixel_variance16x32)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); - -uint32_t vpx_sub_pixel_variance16x8_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_sub_pixel_variance16x8_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_sub_pixel_variance16x8_ssse3(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -RTCD_EXTERN uint32_t (*vpx_sub_pixel_variance16x8)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); - -uint32_t vpx_sub_pixel_variance32x16_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_sub_pixel_variance32x16_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_sub_pixel_variance32x16_ssse3(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -RTCD_EXTERN uint32_t (*vpx_sub_pixel_variance32x16)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); - -uint32_t vpx_sub_pixel_variance32x32_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_sub_pixel_variance32x32_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_sub_pixel_variance32x32_ssse3(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_sub_pixel_variance32x32_avx2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -RTCD_EXTERN uint32_t (*vpx_sub_pixel_variance32x32)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); - -uint32_t vpx_sub_pixel_variance32x64_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_sub_pixel_variance32x64_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_sub_pixel_variance32x64_ssse3(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -RTCD_EXTERN uint32_t (*vpx_sub_pixel_variance32x64)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); - -uint32_t vpx_sub_pixel_variance4x4_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_sub_pixel_variance4x4_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_sub_pixel_variance4x4_ssse3(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -RTCD_EXTERN uint32_t (*vpx_sub_pixel_variance4x4)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); - -uint32_t vpx_sub_pixel_variance4x8_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_sub_pixel_variance4x8_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_sub_pixel_variance4x8_ssse3(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -RTCD_EXTERN uint32_t (*vpx_sub_pixel_variance4x8)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); - -uint32_t vpx_sub_pixel_variance64x32_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_sub_pixel_variance64x32_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_sub_pixel_variance64x32_ssse3(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -RTCD_EXTERN uint32_t (*vpx_sub_pixel_variance64x32)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); - -uint32_t vpx_sub_pixel_variance64x64_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_sub_pixel_variance64x64_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_sub_pixel_variance64x64_ssse3(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_sub_pixel_variance64x64_avx2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -RTCD_EXTERN uint32_t (*vpx_sub_pixel_variance64x64)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); - -uint32_t vpx_sub_pixel_variance8x16_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_sub_pixel_variance8x16_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_sub_pixel_variance8x16_ssse3(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -RTCD_EXTERN uint32_t (*vpx_sub_pixel_variance8x16)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); - -uint32_t vpx_sub_pixel_variance8x4_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_sub_pixel_variance8x4_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_sub_pixel_variance8x4_ssse3(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -RTCD_EXTERN uint32_t (*vpx_sub_pixel_variance8x4)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); - -uint32_t vpx_sub_pixel_variance8x8_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_sub_pixel_variance8x8_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_sub_pixel_variance8x8_ssse3(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -RTCD_EXTERN uint32_t (*vpx_sub_pixel_variance8x8)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); - -void vpx_subtract_block_c(int rows, int cols, int16_t *diff_ptr, ptrdiff_t diff_stride, const uint8_t *src_ptr, ptrdiff_t src_stride, const uint8_t *pred_ptr, ptrdiff_t pred_stride); -void vpx_subtract_block_sse2(int rows, int cols, int16_t *diff_ptr, ptrdiff_t diff_stride, const uint8_t *src_ptr, ptrdiff_t src_stride, const uint8_t *pred_ptr, ptrdiff_t pred_stride); -#define vpx_subtract_block vpx_subtract_block_sse2 - -uint64_t vpx_sum_squares_2d_i16_c(const int16_t *src, int stride, int size); -uint64_t vpx_sum_squares_2d_i16_sse2(const int16_t *src, int stride, int size); -#define vpx_sum_squares_2d_i16 vpx_sum_squares_2d_i16_sse2 - -void vpx_tm_predictor_16x16_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_tm_predictor_16x16_sse2(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_tm_predictor_16x16 vpx_tm_predictor_16x16_sse2 - -void vpx_tm_predictor_32x32_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_tm_predictor_32x32_sse2(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_tm_predictor_32x32 vpx_tm_predictor_32x32_sse2 - -void vpx_tm_predictor_4x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_tm_predictor_4x4_sse2(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_tm_predictor_4x4 vpx_tm_predictor_4x4_sse2 - -void vpx_tm_predictor_8x8_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_tm_predictor_8x8_sse2(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_tm_predictor_8x8 vpx_tm_predictor_8x8_sse2 - -void vpx_v_predictor_16x16_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_v_predictor_16x16_sse2(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_v_predictor_16x16 vpx_v_predictor_16x16_sse2 - -void vpx_v_predictor_32x32_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_v_predictor_32x32_sse2(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_v_predictor_32x32 vpx_v_predictor_32x32_sse2 - -void vpx_v_predictor_4x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_v_predictor_4x4_sse2(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_v_predictor_4x4 vpx_v_predictor_4x4_sse2 - -void vpx_v_predictor_8x8_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_v_predictor_8x8_sse2(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_v_predictor_8x8 vpx_v_predictor_8x8_sse2 - -unsigned int vpx_variance16x16_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -unsigned int vpx_variance16x16_sse2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -unsigned int vpx_variance16x16_avx2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -RTCD_EXTERN unsigned int (*vpx_variance16x16)(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); - -unsigned int vpx_variance16x32_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -unsigned int vpx_variance16x32_sse2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_variance16x32 vpx_variance16x32_sse2 - -unsigned int vpx_variance16x8_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -unsigned int vpx_variance16x8_sse2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_variance16x8 vpx_variance16x8_sse2 - -unsigned int vpx_variance32x16_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -unsigned int vpx_variance32x16_sse2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -unsigned int vpx_variance32x16_avx2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -RTCD_EXTERN unsigned int (*vpx_variance32x16)(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); - -unsigned int vpx_variance32x32_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -unsigned int vpx_variance32x32_sse2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -unsigned int vpx_variance32x32_avx2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -RTCD_EXTERN unsigned int (*vpx_variance32x32)(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); - -unsigned int vpx_variance32x64_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -unsigned int vpx_variance32x64_sse2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_variance32x64 vpx_variance32x64_sse2 - -unsigned int vpx_variance4x4_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -unsigned int vpx_variance4x4_sse2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_variance4x4 vpx_variance4x4_sse2 - -unsigned int vpx_variance4x8_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -unsigned int vpx_variance4x8_sse2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_variance4x8 vpx_variance4x8_sse2 - -unsigned int vpx_variance64x32_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -unsigned int vpx_variance64x32_sse2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -unsigned int vpx_variance64x32_avx2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -RTCD_EXTERN unsigned int (*vpx_variance64x32)(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); - -unsigned int vpx_variance64x64_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -unsigned int vpx_variance64x64_sse2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -unsigned int vpx_variance64x64_avx2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -RTCD_EXTERN unsigned int (*vpx_variance64x64)(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); - -unsigned int vpx_variance8x16_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -unsigned int vpx_variance8x16_sse2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_variance8x16 vpx_variance8x16_sse2 - -unsigned int vpx_variance8x4_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -unsigned int vpx_variance8x4_sse2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_variance8x4 vpx_variance8x4_sse2 - -unsigned int vpx_variance8x8_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -unsigned int vpx_variance8x8_sse2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_variance8x8 vpx_variance8x8_sse2 - -void vpx_ve_predictor_4x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_ve_predictor_4x4 vpx_ve_predictor_4x4_c - -int vpx_vector_var_c(const int16_t *ref, const int16_t *src, const int bwl); -int vpx_vector_var_sse2(const int16_t *ref, const int16_t *src, const int bwl); -#define vpx_vector_var vpx_vector_var_sse2 - -void vpx_dsp_rtcd(void); - -#ifdef RTCD_C -#include "vpx_ports/x86.h" -static void setup_rtcd_internal(void) -{ - int flags = x86_simd_caps(); - - (void)flags; - - vpx_convolve8 = vpx_convolve8_sse2; - if (flags & HAS_SSSE3) vpx_convolve8 = vpx_convolve8_ssse3; - if (flags & HAS_AVX2) vpx_convolve8 = vpx_convolve8_avx2; - vpx_convolve8_avg = vpx_convolve8_avg_sse2; - if (flags & HAS_SSSE3) vpx_convolve8_avg = vpx_convolve8_avg_ssse3; - vpx_convolve8_avg_horiz = vpx_convolve8_avg_horiz_sse2; - if (flags & HAS_SSSE3) vpx_convolve8_avg_horiz = vpx_convolve8_avg_horiz_ssse3; - vpx_convolve8_avg_vert = vpx_convolve8_avg_vert_sse2; - if (flags & HAS_SSSE3) vpx_convolve8_avg_vert = vpx_convolve8_avg_vert_ssse3; - vpx_convolve8_horiz = vpx_convolve8_horiz_sse2; - if (flags & HAS_SSSE3) vpx_convolve8_horiz = vpx_convolve8_horiz_ssse3; - if (flags & HAS_AVX2) vpx_convolve8_horiz = vpx_convolve8_horiz_avx2; - vpx_convolve8_vert = vpx_convolve8_vert_sse2; - if (flags & HAS_SSSE3) vpx_convolve8_vert = vpx_convolve8_vert_ssse3; - if (flags & HAS_AVX2) vpx_convolve8_vert = vpx_convolve8_vert_avx2; - vpx_d153_predictor_16x16 = vpx_d153_predictor_16x16_c; - if (flags & HAS_SSSE3) vpx_d153_predictor_16x16 = vpx_d153_predictor_16x16_ssse3; - vpx_d153_predictor_32x32 = vpx_d153_predictor_32x32_c; - if (flags & HAS_SSSE3) vpx_d153_predictor_32x32 = vpx_d153_predictor_32x32_ssse3; - vpx_d153_predictor_4x4 = vpx_d153_predictor_4x4_c; - if (flags & HAS_SSSE3) vpx_d153_predictor_4x4 = vpx_d153_predictor_4x4_ssse3; - vpx_d153_predictor_8x8 = vpx_d153_predictor_8x8_c; - if (flags & HAS_SSSE3) vpx_d153_predictor_8x8 = vpx_d153_predictor_8x8_ssse3; - vpx_d207_predictor_16x16 = vpx_d207_predictor_16x16_c; - if (flags & HAS_SSSE3) vpx_d207_predictor_16x16 = vpx_d207_predictor_16x16_ssse3; - vpx_d207_predictor_32x32 = vpx_d207_predictor_32x32_c; - if (flags & HAS_SSSE3) vpx_d207_predictor_32x32 = vpx_d207_predictor_32x32_ssse3; - vpx_d207_predictor_8x8 = vpx_d207_predictor_8x8_c; - if (flags & HAS_SSSE3) vpx_d207_predictor_8x8 = vpx_d207_predictor_8x8_ssse3; - vpx_d45_predictor_16x16 = vpx_d45_predictor_16x16_c; - if (flags & HAS_SSSE3) vpx_d45_predictor_16x16 = vpx_d45_predictor_16x16_ssse3; - vpx_d45_predictor_32x32 = vpx_d45_predictor_32x32_c; - if (flags & HAS_SSSE3) vpx_d45_predictor_32x32 = vpx_d45_predictor_32x32_ssse3; - vpx_d63_predictor_16x16 = vpx_d63_predictor_16x16_c; - if (flags & HAS_SSSE3) vpx_d63_predictor_16x16 = vpx_d63_predictor_16x16_ssse3; - vpx_d63_predictor_32x32 = vpx_d63_predictor_32x32_c; - if (flags & HAS_SSSE3) vpx_d63_predictor_32x32 = vpx_d63_predictor_32x32_ssse3; - vpx_d63_predictor_4x4 = vpx_d63_predictor_4x4_c; - if (flags & HAS_SSSE3) vpx_d63_predictor_4x4 = vpx_d63_predictor_4x4_ssse3; - vpx_d63_predictor_8x8 = vpx_d63_predictor_8x8_c; - if (flags & HAS_SSSE3) vpx_d63_predictor_8x8 = vpx_d63_predictor_8x8_ssse3; - vpx_get16x16var = vpx_get16x16var_sse2; - if (flags & HAS_AVX2) vpx_get16x16var = vpx_get16x16var_avx2; - vpx_hadamard_8x8 = vpx_hadamard_8x8_sse2; - if (flags & HAS_SSSE3) vpx_hadamard_8x8 = vpx_hadamard_8x8_ssse3; - vpx_idct32x32_1024_add = vpx_idct32x32_1024_add_sse2; - if (flags & HAS_SSSE3) vpx_idct32x32_1024_add = vpx_idct32x32_1024_add_ssse3; - vpx_idct32x32_135_add = vpx_idct32x32_1024_add_sse2; - if (flags & HAS_SSSE3) vpx_idct32x32_135_add = vpx_idct32x32_135_add_ssse3; - vpx_idct32x32_34_add = vpx_idct32x32_34_add_sse2; - if (flags & HAS_SSSE3) vpx_idct32x32_34_add = vpx_idct32x32_34_add_ssse3; - vpx_idct8x8_12_add = vpx_idct8x8_12_add_sse2; - if (flags & HAS_SSSE3) vpx_idct8x8_12_add = vpx_idct8x8_12_add_ssse3; - vpx_idct8x8_64_add = vpx_idct8x8_64_add_sse2; - if (flags & HAS_SSSE3) vpx_idct8x8_64_add = vpx_idct8x8_64_add_ssse3; - vpx_lpf_horizontal_16 = vpx_lpf_horizontal_16_sse2; - if (flags & HAS_AVX2) vpx_lpf_horizontal_16 = vpx_lpf_horizontal_16_avx2; - vpx_lpf_horizontal_16_dual = vpx_lpf_horizontal_16_dual_sse2; - if (flags & HAS_AVX2) vpx_lpf_horizontal_16_dual = vpx_lpf_horizontal_16_dual_avx2; - vpx_mse16x16 = vpx_mse16x16_sse2; - if (flags & HAS_AVX2) vpx_mse16x16 = vpx_mse16x16_avx2; - vpx_quantize_b = vpx_quantize_b_sse2; - if (flags & HAS_SSSE3) vpx_quantize_b = vpx_quantize_b_ssse3; - if (flags & HAS_AVX) vpx_quantize_b = vpx_quantize_b_avx; - vpx_quantize_b_32x32 = vpx_quantize_b_32x32_c; - if (flags & HAS_SSSE3) vpx_quantize_b_32x32 = vpx_quantize_b_32x32_ssse3; - if (flags & HAS_AVX) vpx_quantize_b_32x32 = vpx_quantize_b_32x32_avx; - vpx_sad16x16x3 = vpx_sad16x16x3_c; - if (flags & HAS_SSE3) vpx_sad16x16x3 = vpx_sad16x16x3_sse3; - if (flags & HAS_SSSE3) vpx_sad16x16x3 = vpx_sad16x16x3_ssse3; - vpx_sad16x16x8 = vpx_sad16x16x8_c; - if (flags & HAS_SSE4_1) vpx_sad16x16x8 = vpx_sad16x16x8_sse4_1; - vpx_sad16x8x3 = vpx_sad16x8x3_c; - if (flags & HAS_SSE3) vpx_sad16x8x3 = vpx_sad16x8x3_sse3; - if (flags & HAS_SSSE3) vpx_sad16x8x3 = vpx_sad16x8x3_ssse3; - vpx_sad16x8x8 = vpx_sad16x8x8_c; - if (flags & HAS_SSE4_1) vpx_sad16x8x8 = vpx_sad16x8x8_sse4_1; - vpx_sad32x16 = vpx_sad32x16_sse2; - if (flags & HAS_AVX2) vpx_sad32x16 = vpx_sad32x16_avx2; - vpx_sad32x16_avg = vpx_sad32x16_avg_sse2; - if (flags & HAS_AVX2) vpx_sad32x16_avg = vpx_sad32x16_avg_avx2; - vpx_sad32x32 = vpx_sad32x32_sse2; - if (flags & HAS_AVX2) vpx_sad32x32 = vpx_sad32x32_avx2; - vpx_sad32x32_avg = vpx_sad32x32_avg_sse2; - if (flags & HAS_AVX2) vpx_sad32x32_avg = vpx_sad32x32_avg_avx2; - vpx_sad32x32x4d = vpx_sad32x32x4d_sse2; - if (flags & HAS_AVX2) vpx_sad32x32x4d = vpx_sad32x32x4d_avx2; - vpx_sad32x64 = vpx_sad32x64_sse2; - if (flags & HAS_AVX2) vpx_sad32x64 = vpx_sad32x64_avx2; - vpx_sad32x64_avg = vpx_sad32x64_avg_sse2; - if (flags & HAS_AVX2) vpx_sad32x64_avg = vpx_sad32x64_avg_avx2; - vpx_sad4x4x3 = vpx_sad4x4x3_c; - if (flags & HAS_SSE3) vpx_sad4x4x3 = vpx_sad4x4x3_sse3; - vpx_sad4x4x8 = vpx_sad4x4x8_c; - if (flags & HAS_SSE4_1) vpx_sad4x4x8 = vpx_sad4x4x8_sse4_1; - vpx_sad64x32 = vpx_sad64x32_sse2; - if (flags & HAS_AVX2) vpx_sad64x32 = vpx_sad64x32_avx2; - vpx_sad64x32_avg = vpx_sad64x32_avg_sse2; - if (flags & HAS_AVX2) vpx_sad64x32_avg = vpx_sad64x32_avg_avx2; - vpx_sad64x64 = vpx_sad64x64_sse2; - if (flags & HAS_AVX2) vpx_sad64x64 = vpx_sad64x64_avx2; - vpx_sad64x64_avg = vpx_sad64x64_avg_sse2; - if (flags & HAS_AVX2) vpx_sad64x64_avg = vpx_sad64x64_avg_avx2; - vpx_sad64x64x4d = vpx_sad64x64x4d_sse2; - if (flags & HAS_AVX2) vpx_sad64x64x4d = vpx_sad64x64x4d_avx2; - vpx_sad8x16x3 = vpx_sad8x16x3_c; - if (flags & HAS_SSE3) vpx_sad8x16x3 = vpx_sad8x16x3_sse3; - vpx_sad8x16x8 = vpx_sad8x16x8_c; - if (flags & HAS_SSE4_1) vpx_sad8x16x8 = vpx_sad8x16x8_sse4_1; - vpx_sad8x8x3 = vpx_sad8x8x3_c; - if (flags & HAS_SSE3) vpx_sad8x8x3 = vpx_sad8x8x3_sse3; - vpx_sad8x8x8 = vpx_sad8x8x8_c; - if (flags & HAS_SSE4_1) vpx_sad8x8x8 = vpx_sad8x8x8_sse4_1; - vpx_scaled_2d = vpx_scaled_2d_c; - if (flags & HAS_SSSE3) vpx_scaled_2d = vpx_scaled_2d_ssse3; - vpx_sub_pixel_avg_variance16x16 = vpx_sub_pixel_avg_variance16x16_sse2; - if (flags & HAS_SSSE3) vpx_sub_pixel_avg_variance16x16 = vpx_sub_pixel_avg_variance16x16_ssse3; - vpx_sub_pixel_avg_variance16x32 = vpx_sub_pixel_avg_variance16x32_sse2; - if (flags & HAS_SSSE3) vpx_sub_pixel_avg_variance16x32 = vpx_sub_pixel_avg_variance16x32_ssse3; - vpx_sub_pixel_avg_variance16x8 = vpx_sub_pixel_avg_variance16x8_sse2; - if (flags & HAS_SSSE3) vpx_sub_pixel_avg_variance16x8 = vpx_sub_pixel_avg_variance16x8_ssse3; - vpx_sub_pixel_avg_variance32x16 = vpx_sub_pixel_avg_variance32x16_sse2; - if (flags & HAS_SSSE3) vpx_sub_pixel_avg_variance32x16 = vpx_sub_pixel_avg_variance32x16_ssse3; - vpx_sub_pixel_avg_variance32x32 = vpx_sub_pixel_avg_variance32x32_sse2; - if (flags & HAS_SSSE3) vpx_sub_pixel_avg_variance32x32 = vpx_sub_pixel_avg_variance32x32_ssse3; - if (flags & HAS_AVX2) vpx_sub_pixel_avg_variance32x32 = vpx_sub_pixel_avg_variance32x32_avx2; - vpx_sub_pixel_avg_variance32x64 = vpx_sub_pixel_avg_variance32x64_sse2; - if (flags & HAS_SSSE3) vpx_sub_pixel_avg_variance32x64 = vpx_sub_pixel_avg_variance32x64_ssse3; - vpx_sub_pixel_avg_variance4x4 = vpx_sub_pixel_avg_variance4x4_sse2; - if (flags & HAS_SSSE3) vpx_sub_pixel_avg_variance4x4 = vpx_sub_pixel_avg_variance4x4_ssse3; - vpx_sub_pixel_avg_variance4x8 = vpx_sub_pixel_avg_variance4x8_sse2; - if (flags & HAS_SSSE3) vpx_sub_pixel_avg_variance4x8 = vpx_sub_pixel_avg_variance4x8_ssse3; - vpx_sub_pixel_avg_variance64x32 = vpx_sub_pixel_avg_variance64x32_sse2; - if (flags & HAS_SSSE3) vpx_sub_pixel_avg_variance64x32 = vpx_sub_pixel_avg_variance64x32_ssse3; - vpx_sub_pixel_avg_variance64x64 = vpx_sub_pixel_avg_variance64x64_sse2; - if (flags & HAS_SSSE3) vpx_sub_pixel_avg_variance64x64 = vpx_sub_pixel_avg_variance64x64_ssse3; - if (flags & HAS_AVX2) vpx_sub_pixel_avg_variance64x64 = vpx_sub_pixel_avg_variance64x64_avx2; - vpx_sub_pixel_avg_variance8x16 = vpx_sub_pixel_avg_variance8x16_sse2; - if (flags & HAS_SSSE3) vpx_sub_pixel_avg_variance8x16 = vpx_sub_pixel_avg_variance8x16_ssse3; - vpx_sub_pixel_avg_variance8x4 = vpx_sub_pixel_avg_variance8x4_sse2; - if (flags & HAS_SSSE3) vpx_sub_pixel_avg_variance8x4 = vpx_sub_pixel_avg_variance8x4_ssse3; - vpx_sub_pixel_avg_variance8x8 = vpx_sub_pixel_avg_variance8x8_sse2; - if (flags & HAS_SSSE3) vpx_sub_pixel_avg_variance8x8 = vpx_sub_pixel_avg_variance8x8_ssse3; - vpx_sub_pixel_variance16x16 = vpx_sub_pixel_variance16x16_sse2; - if (flags & HAS_SSSE3) vpx_sub_pixel_variance16x16 = vpx_sub_pixel_variance16x16_ssse3; - vpx_sub_pixel_variance16x32 = vpx_sub_pixel_variance16x32_sse2; - if (flags & HAS_SSSE3) vpx_sub_pixel_variance16x32 = vpx_sub_pixel_variance16x32_ssse3; - vpx_sub_pixel_variance16x8 = vpx_sub_pixel_variance16x8_sse2; - if (flags & HAS_SSSE3) vpx_sub_pixel_variance16x8 = vpx_sub_pixel_variance16x8_ssse3; - vpx_sub_pixel_variance32x16 = vpx_sub_pixel_variance32x16_sse2; - if (flags & HAS_SSSE3) vpx_sub_pixel_variance32x16 = vpx_sub_pixel_variance32x16_ssse3; - vpx_sub_pixel_variance32x32 = vpx_sub_pixel_variance32x32_sse2; - if (flags & HAS_SSSE3) vpx_sub_pixel_variance32x32 = vpx_sub_pixel_variance32x32_ssse3; - if (flags & HAS_AVX2) vpx_sub_pixel_variance32x32 = vpx_sub_pixel_variance32x32_avx2; - vpx_sub_pixel_variance32x64 = vpx_sub_pixel_variance32x64_sse2; - if (flags & HAS_SSSE3) vpx_sub_pixel_variance32x64 = vpx_sub_pixel_variance32x64_ssse3; - vpx_sub_pixel_variance4x4 = vpx_sub_pixel_variance4x4_sse2; - if (flags & HAS_SSSE3) vpx_sub_pixel_variance4x4 = vpx_sub_pixel_variance4x4_ssse3; - vpx_sub_pixel_variance4x8 = vpx_sub_pixel_variance4x8_sse2; - if (flags & HAS_SSSE3) vpx_sub_pixel_variance4x8 = vpx_sub_pixel_variance4x8_ssse3; - vpx_sub_pixel_variance64x32 = vpx_sub_pixel_variance64x32_sse2; - if (flags & HAS_SSSE3) vpx_sub_pixel_variance64x32 = vpx_sub_pixel_variance64x32_ssse3; - vpx_sub_pixel_variance64x64 = vpx_sub_pixel_variance64x64_sse2; - if (flags & HAS_SSSE3) vpx_sub_pixel_variance64x64 = vpx_sub_pixel_variance64x64_ssse3; - if (flags & HAS_AVX2) vpx_sub_pixel_variance64x64 = vpx_sub_pixel_variance64x64_avx2; - vpx_sub_pixel_variance8x16 = vpx_sub_pixel_variance8x16_sse2; - if (flags & HAS_SSSE3) vpx_sub_pixel_variance8x16 = vpx_sub_pixel_variance8x16_ssse3; - vpx_sub_pixel_variance8x4 = vpx_sub_pixel_variance8x4_sse2; - if (flags & HAS_SSSE3) vpx_sub_pixel_variance8x4 = vpx_sub_pixel_variance8x4_ssse3; - vpx_sub_pixel_variance8x8 = vpx_sub_pixel_variance8x8_sse2; - if (flags & HAS_SSSE3) vpx_sub_pixel_variance8x8 = vpx_sub_pixel_variance8x8_ssse3; - vpx_variance16x16 = vpx_variance16x16_sse2; - if (flags & HAS_AVX2) vpx_variance16x16 = vpx_variance16x16_avx2; - vpx_variance32x16 = vpx_variance32x16_sse2; - if (flags & HAS_AVX2) vpx_variance32x16 = vpx_variance32x16_avx2; - vpx_variance32x32 = vpx_variance32x32_sse2; - if (flags & HAS_AVX2) vpx_variance32x32 = vpx_variance32x32_avx2; - vpx_variance64x32 = vpx_variance64x32_sse2; - if (flags & HAS_AVX2) vpx_variance64x32 = vpx_variance64x32_avx2; - vpx_variance64x64 = vpx_variance64x64_sse2; - if (flags & HAS_AVX2) vpx_variance64x64 = vpx_variance64x64_avx2; -} -#endif - -#ifdef __cplusplus -} // extern "C" -#endif - -#endif diff --git a/WebRtc.NET/include/third_party/libvpx/source/config/linux/x64/vpx_scale_rtcd.h b/WebRtc.NET/include/third_party/libvpx/source/config/linux/x64/vpx_scale_rtcd.h deleted file mode 100644 index ddf7d01c..00000000 --- a/WebRtc.NET/include/third_party/libvpx/source/config/linux/x64/vpx_scale_rtcd.h +++ /dev/null @@ -1,69 +0,0 @@ -#ifndef VPX_SCALE_RTCD_H_ -#define VPX_SCALE_RTCD_H_ - -#ifdef RTCD_C -#define RTCD_EXTERN -#else -#define RTCD_EXTERN extern -#endif - -struct yv12_buffer_config; - -#ifdef __cplusplus -extern "C" { -#endif - -void vp8_horizontal_line_2_1_scale_c(const unsigned char *source, unsigned int source_width, unsigned char *dest, unsigned int dest_width); -#define vp8_horizontal_line_2_1_scale vp8_horizontal_line_2_1_scale_c - -void vp8_horizontal_line_5_3_scale_c(const unsigned char *source, unsigned int source_width, unsigned char *dest, unsigned int dest_width); -#define vp8_horizontal_line_5_3_scale vp8_horizontal_line_5_3_scale_c - -void vp8_horizontal_line_5_4_scale_c(const unsigned char *source, unsigned int source_width, unsigned char *dest, unsigned int dest_width); -#define vp8_horizontal_line_5_4_scale vp8_horizontal_line_5_4_scale_c - -void vp8_vertical_band_2_1_scale_c(unsigned char *source, unsigned int src_pitch, unsigned char *dest, unsigned int dest_pitch, unsigned int dest_width); -#define vp8_vertical_band_2_1_scale vp8_vertical_band_2_1_scale_c - -void vp8_vertical_band_2_1_scale_i_c(unsigned char *source, unsigned int src_pitch, unsigned char *dest, unsigned int dest_pitch, unsigned int dest_width); -#define vp8_vertical_band_2_1_scale_i vp8_vertical_band_2_1_scale_i_c - -void vp8_vertical_band_5_3_scale_c(unsigned char *source, unsigned int src_pitch, unsigned char *dest, unsigned int dest_pitch, unsigned int dest_width); -#define vp8_vertical_band_5_3_scale vp8_vertical_band_5_3_scale_c - -void vp8_vertical_band_5_4_scale_c(unsigned char *source, unsigned int src_pitch, unsigned char *dest, unsigned int dest_pitch, unsigned int dest_width); -#define vp8_vertical_band_5_4_scale vp8_vertical_band_5_4_scale_c - -void vp8_yv12_copy_frame_c(const struct yv12_buffer_config *src_ybc, struct yv12_buffer_config *dst_ybc); -#define vp8_yv12_copy_frame vp8_yv12_copy_frame_c - -void vp8_yv12_extend_frame_borders_c(struct yv12_buffer_config *ybf); -#define vp8_yv12_extend_frame_borders vp8_yv12_extend_frame_borders_c - -void vpx_extend_frame_borders_c(struct yv12_buffer_config *ybf); -#define vpx_extend_frame_borders vpx_extend_frame_borders_c - -void vpx_extend_frame_inner_borders_c(struct yv12_buffer_config *ybf); -#define vpx_extend_frame_inner_borders vpx_extend_frame_inner_borders_c - -void vpx_yv12_copy_y_c(const struct yv12_buffer_config *src_ybc, struct yv12_buffer_config *dst_ybc); -#define vpx_yv12_copy_y vpx_yv12_copy_y_c - -void vpx_scale_rtcd(void); - -#ifdef RTCD_C -#include "vpx_ports/x86.h" -static void setup_rtcd_internal(void) -{ - int flags = x86_simd_caps(); - - (void)flags; - -} -#endif - -#ifdef __cplusplus -} // extern "C" -#endif - -#endif diff --git a/WebRtc.NET/include/third_party/libvpx/source/config/mac/ia32/vp8_rtcd.h b/WebRtc.NET/include/third_party/libvpx/source/config/mac/ia32/vp8_rtcd.h deleted file mode 100644 index 3addf417..00000000 --- a/WebRtc.NET/include/third_party/libvpx/source/config/mac/ia32/vp8_rtcd.h +++ /dev/null @@ -1,333 +0,0 @@ -#ifndef VP8_RTCD_H_ -#define VP8_RTCD_H_ - -#ifdef RTCD_C -#define RTCD_EXTERN -#else -#define RTCD_EXTERN extern -#endif - -/* - * VP8 - */ - -struct blockd; -struct macroblockd; -struct loop_filter_info; - -/* Encoder forward decls */ -struct block; -struct macroblock; -struct variance_vtable; -union int_mv; -struct yv12_buffer_config; - -#ifdef __cplusplus -extern "C" { -#endif - -void vp8_bilinear_predict16x16_c(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch); -void vp8_bilinear_predict16x16_sse2(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch); -void vp8_bilinear_predict16x16_ssse3(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch); -RTCD_EXTERN void (*vp8_bilinear_predict16x16)(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch); - -void vp8_bilinear_predict4x4_c(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch); -void vp8_bilinear_predict4x4_mmx(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch); -RTCD_EXTERN void (*vp8_bilinear_predict4x4)(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch); - -void vp8_bilinear_predict8x4_c(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch); -void vp8_bilinear_predict8x4_mmx(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch); -RTCD_EXTERN void (*vp8_bilinear_predict8x4)(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch); - -void vp8_bilinear_predict8x8_c(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch); -void vp8_bilinear_predict8x8_sse2(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch); -void vp8_bilinear_predict8x8_ssse3(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch); -RTCD_EXTERN void (*vp8_bilinear_predict8x8)(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch); - -void vp8_blend_b_c(unsigned char *y, unsigned char *u, unsigned char *v, int y1, int u1, int v1, int alpha, int stride); -#define vp8_blend_b vp8_blend_b_c - -void vp8_blend_mb_inner_c(unsigned char *y, unsigned char *u, unsigned char *v, int y1, int u1, int v1, int alpha, int stride); -#define vp8_blend_mb_inner vp8_blend_mb_inner_c - -void vp8_blend_mb_outer_c(unsigned char *y, unsigned char *u, unsigned char *v, int y1, int u1, int v1, int alpha, int stride); -#define vp8_blend_mb_outer vp8_blend_mb_outer_c - -int vp8_block_error_c(short *coeff, short *dqcoeff); -int vp8_block_error_sse2(short *coeff, short *dqcoeff); -RTCD_EXTERN int (*vp8_block_error)(short *coeff, short *dqcoeff); - -void vp8_copy32xn_c(const unsigned char *src_ptr, int source_stride, unsigned char *dst_ptr, int dst_stride, int n); -void vp8_copy32xn_sse2(const unsigned char *src_ptr, int source_stride, unsigned char *dst_ptr, int dst_stride, int n); -void vp8_copy32xn_sse3(const unsigned char *src_ptr, int source_stride, unsigned char *dst_ptr, int dst_stride, int n); -RTCD_EXTERN void (*vp8_copy32xn)(const unsigned char *src_ptr, int source_stride, unsigned char *dst_ptr, int dst_stride, int n); - -void vp8_copy_mem16x16_c(unsigned char *src, int src_pitch, unsigned char *dst, int dst_pitch); -void vp8_copy_mem16x16_sse2(unsigned char *src, int src_pitch, unsigned char *dst, int dst_pitch); -RTCD_EXTERN void (*vp8_copy_mem16x16)(unsigned char *src, int src_pitch, unsigned char *dst, int dst_pitch); - -void vp8_copy_mem8x4_c(unsigned char *src, int src_pitch, unsigned char *dst, int dst_pitch); -void vp8_copy_mem8x4_mmx(unsigned char *src, int src_pitch, unsigned char *dst, int dst_pitch); -RTCD_EXTERN void (*vp8_copy_mem8x4)(unsigned char *src, int src_pitch, unsigned char *dst, int dst_pitch); - -void vp8_copy_mem8x8_c(unsigned char *src, int src_pitch, unsigned char *dst, int dst_pitch); -void vp8_copy_mem8x8_mmx(unsigned char *src, int src_pitch, unsigned char *dst, int dst_pitch); -RTCD_EXTERN void (*vp8_copy_mem8x8)(unsigned char *src, int src_pitch, unsigned char *dst, int dst_pitch); - -void vp8_dc_only_idct_add_c(short input, unsigned char *pred, int pred_stride, unsigned char *dst, int dst_stride); -void vp8_dc_only_idct_add_mmx(short input, unsigned char *pred, int pred_stride, unsigned char *dst, int dst_stride); -RTCD_EXTERN void (*vp8_dc_only_idct_add)(short input, unsigned char *pred, int pred_stride, unsigned char *dst, int dst_stride); - -int vp8_denoiser_filter_c(unsigned char *mc_running_avg_y, int mc_avg_y_stride, unsigned char *running_avg_y, int avg_y_stride, unsigned char *sig, int sig_stride, unsigned int motion_magnitude, int increase_denoising); -int vp8_denoiser_filter_sse2(unsigned char *mc_running_avg_y, int mc_avg_y_stride, unsigned char *running_avg_y, int avg_y_stride, unsigned char *sig, int sig_stride, unsigned int motion_magnitude, int increase_denoising); -RTCD_EXTERN int (*vp8_denoiser_filter)(unsigned char *mc_running_avg_y, int mc_avg_y_stride, unsigned char *running_avg_y, int avg_y_stride, unsigned char *sig, int sig_stride, unsigned int motion_magnitude, int increase_denoising); - -int vp8_denoiser_filter_uv_c(unsigned char *mc_running_avg, int mc_avg_stride, unsigned char *running_avg, int avg_stride, unsigned char *sig, int sig_stride, unsigned int motion_magnitude, int increase_denoising); -int vp8_denoiser_filter_uv_sse2(unsigned char *mc_running_avg, int mc_avg_stride, unsigned char *running_avg, int avg_stride, unsigned char *sig, int sig_stride, unsigned int motion_magnitude, int increase_denoising); -RTCD_EXTERN int (*vp8_denoiser_filter_uv)(unsigned char *mc_running_avg, int mc_avg_stride, unsigned char *running_avg, int avg_stride, unsigned char *sig, int sig_stride, unsigned int motion_magnitude, int increase_denoising); - -void vp8_dequant_idct_add_c(short *input, short *dq, unsigned char *output, int stride); -void vp8_dequant_idct_add_mmx(short *input, short *dq, unsigned char *output, int stride); -RTCD_EXTERN void (*vp8_dequant_idct_add)(short *input, short *dq, unsigned char *output, int stride); - -void vp8_dequant_idct_add_uv_block_c(short *q, short *dq, unsigned char *dst_u, unsigned char *dst_v, int stride, char *eobs); -void vp8_dequant_idct_add_uv_block_sse2(short *q, short *dq, unsigned char *dst_u, unsigned char *dst_v, int stride, char *eobs); -RTCD_EXTERN void (*vp8_dequant_idct_add_uv_block)(short *q, short *dq, unsigned char *dst_u, unsigned char *dst_v, int stride, char *eobs); - -void vp8_dequant_idct_add_y_block_c(short *q, short *dq, unsigned char *dst, int stride, char *eobs); -void vp8_dequant_idct_add_y_block_sse2(short *q, short *dq, unsigned char *dst, int stride, char *eobs); -RTCD_EXTERN void (*vp8_dequant_idct_add_y_block)(short *q, short *dq, unsigned char *dst, int stride, char *eobs); - -void vp8_dequantize_b_c(struct blockd*, short *dqc); -void vp8_dequantize_b_mmx(struct blockd*, short *dqc); -RTCD_EXTERN void (*vp8_dequantize_b)(struct blockd*, short *dqc); - -int vp8_diamond_search_sad_c(struct macroblock *x, struct block *b, struct blockd *d, union int_mv *ref_mv, union int_mv *best_mv, int search_param, int sad_per_bit, int *num00, struct variance_vtable *fn_ptr, int *mvcost[2], union int_mv *center_mv); -int vp8_diamond_search_sadx4(struct macroblock *x, struct block *b, struct blockd *d, union int_mv *ref_mv, union int_mv *best_mv, int search_param, int sad_per_bit, int *num00, struct variance_vtable *fn_ptr, int *mvcost[2], union int_mv *center_mv); -RTCD_EXTERN int (*vp8_diamond_search_sad)(struct macroblock *x, struct block *b, struct blockd *d, union int_mv *ref_mv, union int_mv *best_mv, int search_param, int sad_per_bit, int *num00, struct variance_vtable *fn_ptr, int *mvcost[2], union int_mv *center_mv); - -void vp8_fast_quantize_b_c(struct block *, struct blockd *); -void vp8_fast_quantize_b_sse2(struct block *, struct blockd *); -void vp8_fast_quantize_b_ssse3(struct block *, struct blockd *); -RTCD_EXTERN void (*vp8_fast_quantize_b)(struct block *, struct blockd *); - -void vp8_filter_by_weight16x16_c(unsigned char *src, int src_stride, unsigned char *dst, int dst_stride, int src_weight); -void vp8_filter_by_weight16x16_sse2(unsigned char *src, int src_stride, unsigned char *dst, int dst_stride, int src_weight); -RTCD_EXTERN void (*vp8_filter_by_weight16x16)(unsigned char *src, int src_stride, unsigned char *dst, int dst_stride, int src_weight); - -void vp8_filter_by_weight4x4_c(unsigned char *src, int src_stride, unsigned char *dst, int dst_stride, int src_weight); -#define vp8_filter_by_weight4x4 vp8_filter_by_weight4x4_c - -void vp8_filter_by_weight8x8_c(unsigned char *src, int src_stride, unsigned char *dst, int dst_stride, int src_weight); -void vp8_filter_by_weight8x8_sse2(unsigned char *src, int src_stride, unsigned char *dst, int dst_stride, int src_weight); -RTCD_EXTERN void (*vp8_filter_by_weight8x8)(unsigned char *src, int src_stride, unsigned char *dst, int dst_stride, int src_weight); - -int vp8_full_search_sad_c(struct macroblock *x, struct block *b, struct blockd *d, union int_mv *ref_mv, int sad_per_bit, int distance, struct variance_vtable *fn_ptr, int *mvcost[2], union int_mv *center_mv); -int vp8_full_search_sadx3(struct macroblock *x, struct block *b, struct blockd *d, union int_mv *ref_mv, int sad_per_bit, int distance, struct variance_vtable *fn_ptr, int *mvcost[2], union int_mv *center_mv); -int vp8_full_search_sadx8(struct macroblock *x, struct block *b, struct blockd *d, union int_mv *ref_mv, int sad_per_bit, int distance, struct variance_vtable *fn_ptr, int *mvcost[2], union int_mv *center_mv); -RTCD_EXTERN int (*vp8_full_search_sad)(struct macroblock *x, struct block *b, struct blockd *d, union int_mv *ref_mv, int sad_per_bit, int distance, struct variance_vtable *fn_ptr, int *mvcost[2], union int_mv *center_mv); - -void vp8_loop_filter_bh_c(unsigned char *y, unsigned char *u, unsigned char *v, int ystride, int uv_stride, struct loop_filter_info *lfi); -void vp8_loop_filter_bh_sse2(unsigned char *y, unsigned char *u, unsigned char *v, int ystride, int uv_stride, struct loop_filter_info *lfi); -RTCD_EXTERN void (*vp8_loop_filter_bh)(unsigned char *y, unsigned char *u, unsigned char *v, int ystride, int uv_stride, struct loop_filter_info *lfi); - -void vp8_loop_filter_bv_c(unsigned char *y, unsigned char *u, unsigned char *v, int ystride, int uv_stride, struct loop_filter_info *lfi); -void vp8_loop_filter_bv_sse2(unsigned char *y, unsigned char *u, unsigned char *v, int ystride, int uv_stride, struct loop_filter_info *lfi); -RTCD_EXTERN void (*vp8_loop_filter_bv)(unsigned char *y, unsigned char *u, unsigned char *v, int ystride, int uv_stride, struct loop_filter_info *lfi); - -void vp8_loop_filter_mbh_c(unsigned char *y, unsigned char *u, unsigned char *v, int ystride, int uv_stride, struct loop_filter_info *lfi); -void vp8_loop_filter_mbh_sse2(unsigned char *y, unsigned char *u, unsigned char *v, int ystride, int uv_stride, struct loop_filter_info *lfi); -RTCD_EXTERN void (*vp8_loop_filter_mbh)(unsigned char *y, unsigned char *u, unsigned char *v, int ystride, int uv_stride, struct loop_filter_info *lfi); - -void vp8_loop_filter_mbv_c(unsigned char *y, unsigned char *u, unsigned char *v, int ystride, int uv_stride, struct loop_filter_info *lfi); -void vp8_loop_filter_mbv_sse2(unsigned char *y, unsigned char *u, unsigned char *v, int ystride, int uv_stride, struct loop_filter_info *lfi); -RTCD_EXTERN void (*vp8_loop_filter_mbv)(unsigned char *y, unsigned char *u, unsigned char *v, int ystride, int uv_stride, struct loop_filter_info *lfi); - -void vp8_loop_filter_bhs_c(unsigned char *y, int ystride, const unsigned char *blimit); -void vp8_loop_filter_bhs_sse2(unsigned char *y, int ystride, const unsigned char *blimit); -RTCD_EXTERN void (*vp8_loop_filter_simple_bh)(unsigned char *y, int ystride, const unsigned char *blimit); - -void vp8_loop_filter_bvs_c(unsigned char *y, int ystride, const unsigned char *blimit); -void vp8_loop_filter_bvs_sse2(unsigned char *y, int ystride, const unsigned char *blimit); -RTCD_EXTERN void (*vp8_loop_filter_simple_bv)(unsigned char *y, int ystride, const unsigned char *blimit); - -void vp8_loop_filter_simple_horizontal_edge_c(unsigned char *y, int ystride, const unsigned char *blimit); -void vp8_loop_filter_simple_horizontal_edge_sse2(unsigned char *y, int ystride, const unsigned char *blimit); -RTCD_EXTERN void (*vp8_loop_filter_simple_mbh)(unsigned char *y, int ystride, const unsigned char *blimit); - -void vp8_loop_filter_simple_vertical_edge_c(unsigned char *y, int ystride, const unsigned char *blimit); -void vp8_loop_filter_simple_vertical_edge_sse2(unsigned char *y, int ystride, const unsigned char *blimit); -RTCD_EXTERN void (*vp8_loop_filter_simple_mbv)(unsigned char *y, int ystride, const unsigned char *blimit); - -int vp8_mbblock_error_c(struct macroblock *mb, int dc); -int vp8_mbblock_error_sse2(struct macroblock *mb, int dc); -RTCD_EXTERN int (*vp8_mbblock_error)(struct macroblock *mb, int dc); - -int vp8_mbuverror_c(struct macroblock *mb); -int vp8_mbuverror_sse2(struct macroblock *mb); -RTCD_EXTERN int (*vp8_mbuverror)(struct macroblock *mb); - -int vp8_refining_search_sad_c(struct macroblock *x, struct block *b, struct blockd *d, union int_mv *ref_mv, int sad_per_bit, int distance, struct variance_vtable *fn_ptr, int *mvcost[2], union int_mv *center_mv); -int vp8_refining_search_sadx4(struct macroblock *x, struct block *b, struct blockd *d, union int_mv *ref_mv, int sad_per_bit, int distance, struct variance_vtable *fn_ptr, int *mvcost[2], union int_mv *center_mv); -RTCD_EXTERN int (*vp8_refining_search_sad)(struct macroblock *x, struct block *b, struct blockd *d, union int_mv *ref_mv, int sad_per_bit, int distance, struct variance_vtable *fn_ptr, int *mvcost[2], union int_mv *center_mv); - -void vp8_regular_quantize_b_c(struct block *, struct blockd *); -void vp8_regular_quantize_b_sse2(struct block *, struct blockd *); -void vp8_regular_quantize_b_sse4_1(struct block *, struct blockd *); -RTCD_EXTERN void (*vp8_regular_quantize_b)(struct block *, struct blockd *); - -void vp8_short_fdct4x4_c(short *input, short *output, int pitch); -void vp8_short_fdct4x4_sse2(short *input, short *output, int pitch); -RTCD_EXTERN void (*vp8_short_fdct4x4)(short *input, short *output, int pitch); - -void vp8_short_fdct8x4_c(short *input, short *output, int pitch); -void vp8_short_fdct8x4_sse2(short *input, short *output, int pitch); -RTCD_EXTERN void (*vp8_short_fdct8x4)(short *input, short *output, int pitch); - -void vp8_short_idct4x4llm_c(short *input, unsigned char *pred, int pitch, unsigned char *dst, int dst_stride); -void vp8_short_idct4x4llm_mmx(short *input, unsigned char *pred, int pitch, unsigned char *dst, int dst_stride); -RTCD_EXTERN void (*vp8_short_idct4x4llm)(short *input, unsigned char *pred, int pitch, unsigned char *dst, int dst_stride); - -void vp8_short_inv_walsh4x4_c(short *input, short *output); -void vp8_short_inv_walsh4x4_sse2(short *input, short *output); -RTCD_EXTERN void (*vp8_short_inv_walsh4x4)(short *input, short *output); - -void vp8_short_inv_walsh4x4_1_c(short *input, short *output); -#define vp8_short_inv_walsh4x4_1 vp8_short_inv_walsh4x4_1_c - -void vp8_short_walsh4x4_c(short *input, short *output, int pitch); -void vp8_short_walsh4x4_sse2(short *input, short *output, int pitch); -RTCD_EXTERN void (*vp8_short_walsh4x4)(short *input, short *output, int pitch); - -void vp8_sixtap_predict16x16_c(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch); -void vp8_sixtap_predict16x16_sse2(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch); -void vp8_sixtap_predict16x16_ssse3(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch); -RTCD_EXTERN void (*vp8_sixtap_predict16x16)(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch); - -void vp8_sixtap_predict4x4_c(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch); -void vp8_sixtap_predict4x4_mmx(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch); -void vp8_sixtap_predict4x4_ssse3(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch); -RTCD_EXTERN void (*vp8_sixtap_predict4x4)(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch); - -void vp8_sixtap_predict8x4_c(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch); -void vp8_sixtap_predict8x4_sse2(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch); -void vp8_sixtap_predict8x4_ssse3(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch); -RTCD_EXTERN void (*vp8_sixtap_predict8x4)(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch); - -void vp8_sixtap_predict8x8_c(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch); -void vp8_sixtap_predict8x8_sse2(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch); -void vp8_sixtap_predict8x8_ssse3(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch); -RTCD_EXTERN void (*vp8_sixtap_predict8x8)(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch); - -void vp8_rtcd(void); - -#ifdef RTCD_C -#include "vpx_ports/x86.h" -static void setup_rtcd_internal(void) -{ - int flags = x86_simd_caps(); - - (void)flags; - - vp8_bilinear_predict16x16 = vp8_bilinear_predict16x16_c; - if (flags & HAS_SSE2) vp8_bilinear_predict16x16 = vp8_bilinear_predict16x16_sse2; - if (flags & HAS_SSSE3) vp8_bilinear_predict16x16 = vp8_bilinear_predict16x16_ssse3; - vp8_bilinear_predict4x4 = vp8_bilinear_predict4x4_c; - if (flags & HAS_MMX) vp8_bilinear_predict4x4 = vp8_bilinear_predict4x4_mmx; - vp8_bilinear_predict8x4 = vp8_bilinear_predict8x4_c; - if (flags & HAS_MMX) vp8_bilinear_predict8x4 = vp8_bilinear_predict8x4_mmx; - vp8_bilinear_predict8x8 = vp8_bilinear_predict8x8_c; - if (flags & HAS_SSE2) vp8_bilinear_predict8x8 = vp8_bilinear_predict8x8_sse2; - if (flags & HAS_SSSE3) vp8_bilinear_predict8x8 = vp8_bilinear_predict8x8_ssse3; - vp8_block_error = vp8_block_error_c; - if (flags & HAS_SSE2) vp8_block_error = vp8_block_error_sse2; - vp8_copy32xn = vp8_copy32xn_c; - if (flags & HAS_SSE2) vp8_copy32xn = vp8_copy32xn_sse2; - if (flags & HAS_SSE3) vp8_copy32xn = vp8_copy32xn_sse3; - vp8_copy_mem16x16 = vp8_copy_mem16x16_c; - if (flags & HAS_SSE2) vp8_copy_mem16x16 = vp8_copy_mem16x16_sse2; - vp8_copy_mem8x4 = vp8_copy_mem8x4_c; - if (flags & HAS_MMX) vp8_copy_mem8x4 = vp8_copy_mem8x4_mmx; - vp8_copy_mem8x8 = vp8_copy_mem8x8_c; - if (flags & HAS_MMX) vp8_copy_mem8x8 = vp8_copy_mem8x8_mmx; - vp8_dc_only_idct_add = vp8_dc_only_idct_add_c; - if (flags & HAS_MMX) vp8_dc_only_idct_add = vp8_dc_only_idct_add_mmx; - vp8_denoiser_filter = vp8_denoiser_filter_c; - if (flags & HAS_SSE2) vp8_denoiser_filter = vp8_denoiser_filter_sse2; - vp8_denoiser_filter_uv = vp8_denoiser_filter_uv_c; - if (flags & HAS_SSE2) vp8_denoiser_filter_uv = vp8_denoiser_filter_uv_sse2; - vp8_dequant_idct_add = vp8_dequant_idct_add_c; - if (flags & HAS_MMX) vp8_dequant_idct_add = vp8_dequant_idct_add_mmx; - vp8_dequant_idct_add_uv_block = vp8_dequant_idct_add_uv_block_c; - if (flags & HAS_SSE2) vp8_dequant_idct_add_uv_block = vp8_dequant_idct_add_uv_block_sse2; - vp8_dequant_idct_add_y_block = vp8_dequant_idct_add_y_block_c; - if (flags & HAS_SSE2) vp8_dequant_idct_add_y_block = vp8_dequant_idct_add_y_block_sse2; - vp8_dequantize_b = vp8_dequantize_b_c; - if (flags & HAS_MMX) vp8_dequantize_b = vp8_dequantize_b_mmx; - vp8_diamond_search_sad = vp8_diamond_search_sad_c; - if (flags & HAS_SSE2) vp8_diamond_search_sad = vp8_diamond_search_sadx4; - vp8_fast_quantize_b = vp8_fast_quantize_b_c; - if (flags & HAS_SSE2) vp8_fast_quantize_b = vp8_fast_quantize_b_sse2; - if (flags & HAS_SSSE3) vp8_fast_quantize_b = vp8_fast_quantize_b_ssse3; - vp8_filter_by_weight16x16 = vp8_filter_by_weight16x16_c; - if (flags & HAS_SSE2) vp8_filter_by_weight16x16 = vp8_filter_by_weight16x16_sse2; - vp8_filter_by_weight8x8 = vp8_filter_by_weight8x8_c; - if (flags & HAS_SSE2) vp8_filter_by_weight8x8 = vp8_filter_by_weight8x8_sse2; - vp8_full_search_sad = vp8_full_search_sad_c; - if (flags & HAS_SSE3) vp8_full_search_sad = vp8_full_search_sadx3; - if (flags & HAS_SSE4_1) vp8_full_search_sad = vp8_full_search_sadx8; - vp8_loop_filter_bh = vp8_loop_filter_bh_c; - if (flags & HAS_SSE2) vp8_loop_filter_bh = vp8_loop_filter_bh_sse2; - vp8_loop_filter_bv = vp8_loop_filter_bv_c; - if (flags & HAS_SSE2) vp8_loop_filter_bv = vp8_loop_filter_bv_sse2; - vp8_loop_filter_mbh = vp8_loop_filter_mbh_c; - if (flags & HAS_SSE2) vp8_loop_filter_mbh = vp8_loop_filter_mbh_sse2; - vp8_loop_filter_mbv = vp8_loop_filter_mbv_c; - if (flags & HAS_SSE2) vp8_loop_filter_mbv = vp8_loop_filter_mbv_sse2; - vp8_loop_filter_simple_bh = vp8_loop_filter_bhs_c; - if (flags & HAS_SSE2) vp8_loop_filter_simple_bh = vp8_loop_filter_bhs_sse2; - vp8_loop_filter_simple_bv = vp8_loop_filter_bvs_c; - if (flags & HAS_SSE2) vp8_loop_filter_simple_bv = vp8_loop_filter_bvs_sse2; - vp8_loop_filter_simple_mbh = vp8_loop_filter_simple_horizontal_edge_c; - if (flags & HAS_SSE2) vp8_loop_filter_simple_mbh = vp8_loop_filter_simple_horizontal_edge_sse2; - vp8_loop_filter_simple_mbv = vp8_loop_filter_simple_vertical_edge_c; - if (flags & HAS_SSE2) vp8_loop_filter_simple_mbv = vp8_loop_filter_simple_vertical_edge_sse2; - vp8_mbblock_error = vp8_mbblock_error_c; - if (flags & HAS_SSE2) vp8_mbblock_error = vp8_mbblock_error_sse2; - vp8_mbuverror = vp8_mbuverror_c; - if (flags & HAS_SSE2) vp8_mbuverror = vp8_mbuverror_sse2; - vp8_refining_search_sad = vp8_refining_search_sad_c; - if (flags & HAS_SSE2) vp8_refining_search_sad = vp8_refining_search_sadx4; - vp8_regular_quantize_b = vp8_regular_quantize_b_c; - if (flags & HAS_SSE2) vp8_regular_quantize_b = vp8_regular_quantize_b_sse2; - if (flags & HAS_SSE4_1) vp8_regular_quantize_b = vp8_regular_quantize_b_sse4_1; - vp8_short_fdct4x4 = vp8_short_fdct4x4_c; - if (flags & HAS_SSE2) vp8_short_fdct4x4 = vp8_short_fdct4x4_sse2; - vp8_short_fdct8x4 = vp8_short_fdct8x4_c; - if (flags & HAS_SSE2) vp8_short_fdct8x4 = vp8_short_fdct8x4_sse2; - vp8_short_idct4x4llm = vp8_short_idct4x4llm_c; - if (flags & HAS_MMX) vp8_short_idct4x4llm = vp8_short_idct4x4llm_mmx; - vp8_short_inv_walsh4x4 = vp8_short_inv_walsh4x4_c; - if (flags & HAS_SSE2) vp8_short_inv_walsh4x4 = vp8_short_inv_walsh4x4_sse2; - vp8_short_walsh4x4 = vp8_short_walsh4x4_c; - if (flags & HAS_SSE2) vp8_short_walsh4x4 = vp8_short_walsh4x4_sse2; - vp8_sixtap_predict16x16 = vp8_sixtap_predict16x16_c; - if (flags & HAS_SSE2) vp8_sixtap_predict16x16 = vp8_sixtap_predict16x16_sse2; - if (flags & HAS_SSSE3) vp8_sixtap_predict16x16 = vp8_sixtap_predict16x16_ssse3; - vp8_sixtap_predict4x4 = vp8_sixtap_predict4x4_c; - if (flags & HAS_MMX) vp8_sixtap_predict4x4 = vp8_sixtap_predict4x4_mmx; - if (flags & HAS_SSSE3) vp8_sixtap_predict4x4 = vp8_sixtap_predict4x4_ssse3; - vp8_sixtap_predict8x4 = vp8_sixtap_predict8x4_c; - if (flags & HAS_SSE2) vp8_sixtap_predict8x4 = vp8_sixtap_predict8x4_sse2; - if (flags & HAS_SSSE3) vp8_sixtap_predict8x4 = vp8_sixtap_predict8x4_ssse3; - vp8_sixtap_predict8x8 = vp8_sixtap_predict8x8_c; - if (flags & HAS_SSE2) vp8_sixtap_predict8x8 = vp8_sixtap_predict8x8_sse2; - if (flags & HAS_SSSE3) vp8_sixtap_predict8x8 = vp8_sixtap_predict8x8_ssse3; -} -#endif - -#ifdef __cplusplus -} // extern "C" -#endif - -#endif diff --git a/WebRtc.NET/include/third_party/libvpx/source/config/mac/ia32/vp9_rtcd.h b/WebRtc.NET/include/third_party/libvpx/source/config/mac/ia32/vp9_rtcd.h deleted file mode 100644 index 28b5da86..00000000 --- a/WebRtc.NET/include/third_party/libvpx/source/config/mac/ia32/vp9_rtcd.h +++ /dev/null @@ -1,197 +0,0 @@ -#ifndef VP9_RTCD_H_ -#define VP9_RTCD_H_ - -#ifdef RTCD_C -#define RTCD_EXTERN -#else -#define RTCD_EXTERN extern -#endif - -/* - * VP9 - */ - -#include "vpx/vpx_integer.h" -#include "vp9/common/vp9_common.h" -#include "vp9/common/vp9_enums.h" - -struct macroblockd; - -/* Encoder forward decls */ -struct macroblock; -struct vp9_variance_vtable; -struct search_site_config; -struct mv; -union int_mv; -struct yv12_buffer_config; - -#ifdef __cplusplus -extern "C" { -#endif - -int64_t vp9_block_error_c(const tran_low_t *coeff, const tran_low_t *dqcoeff, intptr_t block_size, int64_t *ssz); -#define vp9_block_error vp9_block_error_c - -int vp9_denoiser_filter_c(const uint8_t *sig, int sig_stride, const uint8_t *mc_avg, int mc_avg_stride, uint8_t *avg, int avg_stride, int increase_denoising, BLOCK_SIZE bs, int motion_magnitude); -int vp9_denoiser_filter_sse2(const uint8_t *sig, int sig_stride, const uint8_t *mc_avg, int mc_avg_stride, uint8_t *avg, int avg_stride, int increase_denoising, BLOCK_SIZE bs, int motion_magnitude); -RTCD_EXTERN int (*vp9_denoiser_filter)(const uint8_t *sig, int sig_stride, const uint8_t *mc_avg, int mc_avg_stride, uint8_t *avg, int avg_stride, int increase_denoising, BLOCK_SIZE bs, int motion_magnitude); - -int vp9_diamond_search_sad_c(const struct macroblock *x, const struct search_site_config *cfg, struct mv *ref_mv, struct mv *best_mv, int search_param, int sad_per_bit, int *num00, const struct vp9_variance_vtable *fn_ptr, const struct mv *center_mv); -int vp9_diamond_search_sad_avx(const struct macroblock *x, const struct search_site_config *cfg, struct mv *ref_mv, struct mv *best_mv, int search_param, int sad_per_bit, int *num00, const struct vp9_variance_vtable *fn_ptr, const struct mv *center_mv); -RTCD_EXTERN int (*vp9_diamond_search_sad)(const struct macroblock *x, const struct search_site_config *cfg, struct mv *ref_mv, struct mv *best_mv, int search_param, int sad_per_bit, int *num00, const struct vp9_variance_vtable *fn_ptr, const struct mv *center_mv); - -void vp9_fdct8x8_quant_c(const int16_t *input, int stride, tran_low_t *coeff_ptr, intptr_t n_coeffs, int skip_block, const int16_t *zbin_ptr, const int16_t *round_ptr, const int16_t *quant_ptr, const int16_t *quant_shift_ptr, tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr, const int16_t *dequant_ptr, uint16_t *eob_ptr, const int16_t *scan, const int16_t *iscan); -void vp9_fdct8x8_quant_ssse3(const int16_t *input, int stride, tran_low_t *coeff_ptr, intptr_t n_coeffs, int skip_block, const int16_t *zbin_ptr, const int16_t *round_ptr, const int16_t *quant_ptr, const int16_t *quant_shift_ptr, tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr, const int16_t *dequant_ptr, uint16_t *eob_ptr, const int16_t *scan, const int16_t *iscan); -RTCD_EXTERN void (*vp9_fdct8x8_quant)(const int16_t *input, int stride, tran_low_t *coeff_ptr, intptr_t n_coeffs, int skip_block, const int16_t *zbin_ptr, const int16_t *round_ptr, const int16_t *quant_ptr, const int16_t *quant_shift_ptr, tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr, const int16_t *dequant_ptr, uint16_t *eob_ptr, const int16_t *scan, const int16_t *iscan); - -void vp9_fht16x16_c(const int16_t *input, tran_low_t *output, int stride, int tx_type); -void vp9_fht16x16_sse2(const int16_t *input, tran_low_t *output, int stride, int tx_type); -RTCD_EXTERN void (*vp9_fht16x16)(const int16_t *input, tran_low_t *output, int stride, int tx_type); - -void vp9_fht4x4_c(const int16_t *input, tran_low_t *output, int stride, int tx_type); -void vp9_fht4x4_sse2(const int16_t *input, tran_low_t *output, int stride, int tx_type); -RTCD_EXTERN void (*vp9_fht4x4)(const int16_t *input, tran_low_t *output, int stride, int tx_type); - -void vp9_fht8x8_c(const int16_t *input, tran_low_t *output, int stride, int tx_type); -void vp9_fht8x8_sse2(const int16_t *input, tran_low_t *output, int stride, int tx_type); -RTCD_EXTERN void (*vp9_fht8x8)(const int16_t *input, tran_low_t *output, int stride, int tx_type); - -void vp9_filter_by_weight16x16_c(const uint8_t *src, int src_stride, uint8_t *dst, int dst_stride, int src_weight); -void vp9_filter_by_weight16x16_sse2(const uint8_t *src, int src_stride, uint8_t *dst, int dst_stride, int src_weight); -RTCD_EXTERN void (*vp9_filter_by_weight16x16)(const uint8_t *src, int src_stride, uint8_t *dst, int dst_stride, int src_weight); - -void vp9_filter_by_weight8x8_c(const uint8_t *src, int src_stride, uint8_t *dst, int dst_stride, int src_weight); -void vp9_filter_by_weight8x8_sse2(const uint8_t *src, int src_stride, uint8_t *dst, int dst_stride, int src_weight); -RTCD_EXTERN void (*vp9_filter_by_weight8x8)(const uint8_t *src, int src_stride, uint8_t *dst, int dst_stride, int src_weight); - -int vp9_full_search_sad_c(const struct macroblock *x, const struct mv *ref_mv, int sad_per_bit, int distance, const struct vp9_variance_vtable *fn_ptr, const struct mv *center_mv, struct mv *best_mv); -int vp9_full_search_sadx3(const struct macroblock *x, const struct mv *ref_mv, int sad_per_bit, int distance, const struct vp9_variance_vtable *fn_ptr, const struct mv *center_mv, struct mv *best_mv); -int vp9_full_search_sadx8(const struct macroblock *x, const struct mv *ref_mv, int sad_per_bit, int distance, const struct vp9_variance_vtable *fn_ptr, const struct mv *center_mv, struct mv *best_mv); -RTCD_EXTERN int (*vp9_full_search_sad)(const struct macroblock *x, const struct mv *ref_mv, int sad_per_bit, int distance, const struct vp9_variance_vtable *fn_ptr, const struct mv *center_mv, struct mv *best_mv); - -void vp9_fwht4x4_c(const int16_t *input, tran_low_t *output, int stride); -void vp9_fwht4x4_sse2(const int16_t *input, tran_low_t *output, int stride); -RTCD_EXTERN void (*vp9_fwht4x4)(const int16_t *input, tran_low_t *output, int stride); - -int64_t vp9_highbd_block_error_c(const tran_low_t *coeff, const tran_low_t *dqcoeff, intptr_t block_size, int64_t *ssz, int bd); -int64_t vp9_highbd_block_error_sse2(const tran_low_t *coeff, const tran_low_t *dqcoeff, intptr_t block_size, int64_t *ssz, int bd); -RTCD_EXTERN int64_t (*vp9_highbd_block_error)(const tran_low_t *coeff, const tran_low_t *dqcoeff, intptr_t block_size, int64_t *ssz, int bd); - -int64_t vp9_highbd_block_error_8bit_c(const tran_low_t *coeff, const tran_low_t *dqcoeff, intptr_t block_size, int64_t *ssz); -int64_t vp9_highbd_block_error_8bit_sse2(const tran_low_t *coeff, const tran_low_t *dqcoeff, intptr_t block_size, int64_t *ssz); -int64_t vp9_highbd_block_error_8bit_avx(const tran_low_t *coeff, const tran_low_t *dqcoeff, intptr_t block_size, int64_t *ssz); -RTCD_EXTERN int64_t (*vp9_highbd_block_error_8bit)(const tran_low_t *coeff, const tran_low_t *dqcoeff, intptr_t block_size, int64_t *ssz); - -void vp9_highbd_fht16x16_c(const int16_t *input, tran_low_t *output, int stride, int tx_type); -#define vp9_highbd_fht16x16 vp9_highbd_fht16x16_c - -void vp9_highbd_fht4x4_c(const int16_t *input, tran_low_t *output, int stride, int tx_type); -#define vp9_highbd_fht4x4 vp9_highbd_fht4x4_c - -void vp9_highbd_fht8x8_c(const int16_t *input, tran_low_t *output, int stride, int tx_type); -#define vp9_highbd_fht8x8 vp9_highbd_fht8x8_c - -void vp9_highbd_fwht4x4_c(const int16_t *input, tran_low_t *output, int stride); -#define vp9_highbd_fwht4x4 vp9_highbd_fwht4x4_c - -void vp9_highbd_iht16x16_256_add_c(const tran_low_t *input, uint8_t *output, int pitch, int tx_type, int bd); -#define vp9_highbd_iht16x16_256_add vp9_highbd_iht16x16_256_add_c - -void vp9_highbd_iht4x4_16_add_c(const tran_low_t *input, uint8_t *dest, int stride, int tx_type, int bd); -#define vp9_highbd_iht4x4_16_add vp9_highbd_iht4x4_16_add_c - -void vp9_highbd_iht8x8_64_add_c(const tran_low_t *input, uint8_t *dest, int stride, int tx_type, int bd); -#define vp9_highbd_iht8x8_64_add vp9_highbd_iht8x8_64_add_c - -void vp9_highbd_mbpost_proc_across_ip_c(uint16_t *src, int pitch, int rows, int cols, int flimit); -#define vp9_highbd_mbpost_proc_across_ip vp9_highbd_mbpost_proc_across_ip_c - -void vp9_highbd_mbpost_proc_down_c(uint16_t *dst, int pitch, int rows, int cols, int flimit); -#define vp9_highbd_mbpost_proc_down vp9_highbd_mbpost_proc_down_c - -void vp9_highbd_post_proc_down_and_across_c(const uint16_t *src_ptr, uint16_t *dst_ptr, int src_pixels_per_line, int dst_pixels_per_line, int rows, int cols, int flimit); -#define vp9_highbd_post_proc_down_and_across vp9_highbd_post_proc_down_and_across_c - -void vp9_highbd_quantize_fp_c(const tran_low_t *coeff_ptr, intptr_t n_coeffs, int skip_block, const int16_t *zbin_ptr, const int16_t *round_ptr, const int16_t *quant_ptr, const int16_t *quant_shift_ptr, tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr, const int16_t *dequant_ptr, uint16_t *eob_ptr, const int16_t *scan, const int16_t *iscan); -#define vp9_highbd_quantize_fp vp9_highbd_quantize_fp_c - -void vp9_highbd_quantize_fp_32x32_c(const tran_low_t *coeff_ptr, intptr_t n_coeffs, int skip_block, const int16_t *zbin_ptr, const int16_t *round_ptr, const int16_t *quant_ptr, const int16_t *quant_shift_ptr, tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr, const int16_t *dequant_ptr, uint16_t *eob_ptr, const int16_t *scan, const int16_t *iscan); -#define vp9_highbd_quantize_fp_32x32 vp9_highbd_quantize_fp_32x32_c - -void vp9_highbd_temporal_filter_apply_c(uint8_t *frame1, unsigned int stride, uint8_t *frame2, unsigned int block_width, unsigned int block_height, int strength, int filter_weight, unsigned int *accumulator, uint16_t *count); -#define vp9_highbd_temporal_filter_apply vp9_highbd_temporal_filter_apply_c - -void vp9_iht16x16_256_add_c(const tran_low_t *input, uint8_t *output, int pitch, int tx_type); -void vp9_iht16x16_256_add_sse2(const tran_low_t *input, uint8_t *output, int pitch, int tx_type); -RTCD_EXTERN void (*vp9_iht16x16_256_add)(const tran_low_t *input, uint8_t *output, int pitch, int tx_type); - -void vp9_iht4x4_16_add_c(const tran_low_t *input, uint8_t *dest, int stride, int tx_type); -void vp9_iht4x4_16_add_sse2(const tran_low_t *input, uint8_t *dest, int stride, int tx_type); -RTCD_EXTERN void (*vp9_iht4x4_16_add)(const tran_low_t *input, uint8_t *dest, int stride, int tx_type); - -void vp9_iht8x8_64_add_c(const tran_low_t *input, uint8_t *dest, int stride, int tx_type); -void vp9_iht8x8_64_add_sse2(const tran_low_t *input, uint8_t *dest, int stride, int tx_type); -RTCD_EXTERN void (*vp9_iht8x8_64_add)(const tran_low_t *input, uint8_t *dest, int stride, int tx_type); - -void vp9_quantize_fp_c(const tran_low_t *coeff_ptr, intptr_t n_coeffs, int skip_block, const int16_t *zbin_ptr, const int16_t *round_ptr, const int16_t *quant_ptr, const int16_t *quant_shift_ptr, tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr, const int16_t *dequant_ptr, uint16_t *eob_ptr, const int16_t *scan, const int16_t *iscan); -#define vp9_quantize_fp vp9_quantize_fp_c - -void vp9_quantize_fp_32x32_c(const tran_low_t *coeff_ptr, intptr_t n_coeffs, int skip_block, const int16_t *zbin_ptr, const int16_t *round_ptr, const int16_t *quant_ptr, const int16_t *quant_shift_ptr, tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr, const int16_t *dequant_ptr, uint16_t *eob_ptr, const int16_t *scan, const int16_t *iscan); -#define vp9_quantize_fp_32x32 vp9_quantize_fp_32x32_c - -void vp9_temporal_filter_apply_c(uint8_t *frame1, unsigned int stride, uint8_t *frame2, unsigned int block_width, unsigned int block_height, int strength, int filter_weight, unsigned int *accumulator, uint16_t *count); -void vp9_temporal_filter_apply_sse2(uint8_t *frame1, unsigned int stride, uint8_t *frame2, unsigned int block_width, unsigned int block_height, int strength, int filter_weight, unsigned int *accumulator, uint16_t *count); -RTCD_EXTERN void (*vp9_temporal_filter_apply)(uint8_t *frame1, unsigned int stride, uint8_t *frame2, unsigned int block_width, unsigned int block_height, int strength, int filter_weight, unsigned int *accumulator, uint16_t *count); - -void vp9_rtcd(void); - -#ifdef RTCD_C -#include "vpx_ports/x86.h" -static void setup_rtcd_internal(void) -{ - int flags = x86_simd_caps(); - - (void)flags; - - vp9_denoiser_filter = vp9_denoiser_filter_c; - if (flags & HAS_SSE2) vp9_denoiser_filter = vp9_denoiser_filter_sse2; - vp9_diamond_search_sad = vp9_diamond_search_sad_c; - if (flags & HAS_AVX) vp9_diamond_search_sad = vp9_diamond_search_sad_avx; - vp9_fdct8x8_quant = vp9_fdct8x8_quant_c; - if (flags & HAS_SSSE3) vp9_fdct8x8_quant = vp9_fdct8x8_quant_ssse3; - vp9_fht16x16 = vp9_fht16x16_c; - if (flags & HAS_SSE2) vp9_fht16x16 = vp9_fht16x16_sse2; - vp9_fht4x4 = vp9_fht4x4_c; - if (flags & HAS_SSE2) vp9_fht4x4 = vp9_fht4x4_sse2; - vp9_fht8x8 = vp9_fht8x8_c; - if (flags & HAS_SSE2) vp9_fht8x8 = vp9_fht8x8_sse2; - vp9_filter_by_weight16x16 = vp9_filter_by_weight16x16_c; - if (flags & HAS_SSE2) vp9_filter_by_weight16x16 = vp9_filter_by_weight16x16_sse2; - vp9_filter_by_weight8x8 = vp9_filter_by_weight8x8_c; - if (flags & HAS_SSE2) vp9_filter_by_weight8x8 = vp9_filter_by_weight8x8_sse2; - vp9_full_search_sad = vp9_full_search_sad_c; - if (flags & HAS_SSE3) vp9_full_search_sad = vp9_full_search_sadx3; - if (flags & HAS_SSE4_1) vp9_full_search_sad = vp9_full_search_sadx8; - vp9_fwht4x4 = vp9_fwht4x4_c; - if (flags & HAS_SSE2) vp9_fwht4x4 = vp9_fwht4x4_sse2; - vp9_highbd_block_error = vp9_highbd_block_error_c; - if (flags & HAS_SSE2) vp9_highbd_block_error = vp9_highbd_block_error_sse2; - vp9_highbd_block_error_8bit = vp9_highbd_block_error_8bit_c; - if (flags & HAS_SSE2) vp9_highbd_block_error_8bit = vp9_highbd_block_error_8bit_sse2; - if (flags & HAS_AVX) vp9_highbd_block_error_8bit = vp9_highbd_block_error_8bit_avx; - vp9_iht16x16_256_add = vp9_iht16x16_256_add_c; - if (flags & HAS_SSE2) vp9_iht16x16_256_add = vp9_iht16x16_256_add_sse2; - vp9_iht4x4_16_add = vp9_iht4x4_16_add_c; - if (flags & HAS_SSE2) vp9_iht4x4_16_add = vp9_iht4x4_16_add_sse2; - vp9_iht8x8_64_add = vp9_iht8x8_64_add_c; - if (flags & HAS_SSE2) vp9_iht8x8_64_add = vp9_iht8x8_64_add_sse2; - vp9_temporal_filter_apply = vp9_temporal_filter_apply_c; - if (flags & HAS_SSE2) vp9_temporal_filter_apply = vp9_temporal_filter_apply_sse2; -} -#endif - -#ifdef __cplusplus -} // extern "C" -#endif - -#endif diff --git a/WebRtc.NET/include/third_party/libvpx/source/config/mac/ia32/vpx_config.h b/WebRtc.NET/include/third_party/libvpx/source/config/mac/ia32/vpx_config.h deleted file mode 100644 index 949b8bcf..00000000 --- a/WebRtc.NET/include/third_party/libvpx/source/config/mac/ia32/vpx_config.h +++ /dev/null @@ -1,94 +0,0 @@ -/* Copyright (c) 2011 The WebM project authors. All Rights Reserved. */ -/* */ -/* Use of this source code is governed by a BSD-style license */ -/* that can be found in the LICENSE file in the root of the source */ -/* tree. An additional intellectual property rights grant can be found */ -/* in the file PATENTS. All contributing project authors may */ -/* be found in the AUTHORS file in the root of the source tree. */ -/* This file automatically generated by configure. Do not edit! */ -#ifndef VPX_CONFIG_H -#define VPX_CONFIG_H -#define RESTRICT -#define INLINE inline -#define ARCH_ARM 0 -#define ARCH_MIPS 0 -#define ARCH_X86 1 -#define ARCH_X86_64 0 -#define HAVE_NEON 0 -#define HAVE_NEON_ASM 0 -#define HAVE_MIPS32 0 -#define HAVE_DSPR2 0 -#define HAVE_MSA 0 -#define HAVE_MIPS64 0 -#define HAVE_MMX 1 -#define HAVE_SSE 1 -#define HAVE_SSE2 1 -#define HAVE_SSE3 1 -#define HAVE_SSSE3 1 -#define HAVE_SSE4_1 1 -#define HAVE_AVX 1 -#define HAVE_AVX2 1 -#define HAVE_VPX_PORTS 1 -#define HAVE_PTHREAD_H 1 -#define HAVE_UNISTD_H 0 -#define CONFIG_DEPENDENCY_TRACKING 1 -#define CONFIG_EXTERNAL_BUILD 1 -#define CONFIG_INSTALL_DOCS 0 -#define CONFIG_INSTALL_BINS 1 -#define CONFIG_INSTALL_LIBS 1 -#define CONFIG_INSTALL_SRCS 0 -#define CONFIG_DEBUG 0 -#define CONFIG_GPROF 0 -#define CONFIG_GCOV 0 -#define CONFIG_RVCT 0 -#define CONFIG_GCC 1 -#define CONFIG_MSVS 0 -#define CONFIG_PIC 1 -#define CONFIG_BIG_ENDIAN 0 -#define CONFIG_CODEC_SRCS 0 -#define CONFIG_DEBUG_LIBS 0 -#define CONFIG_DEQUANT_TOKENS 0 -#define CONFIG_DC_RECON 0 -#define CONFIG_RUNTIME_CPU_DETECT 1 -#define CONFIG_POSTPROC 1 -#define CONFIG_VP9_POSTPROC 1 -#define CONFIG_MULTITHREAD 1 -#define CONFIG_INTERNAL_STATS 0 -#define CONFIG_VP8_ENCODER 1 -#define CONFIG_VP8_DECODER 1 -#define CONFIG_VP9_ENCODER 1 -#define CONFIG_VP9_DECODER 1 -#define CONFIG_VP8 1 -#define CONFIG_VP9 1 -#define CONFIG_ENCODERS 1 -#define CONFIG_DECODERS 1 -#define CONFIG_STATIC_MSVCRT 0 -#define CONFIG_SPATIAL_RESAMPLING 1 -#define CONFIG_REALTIME_ONLY 1 -#define CONFIG_ONTHEFLY_BITPACKING 0 -#define CONFIG_ERROR_CONCEALMENT 0 -#define CONFIG_SHARED 0 -#define CONFIG_STATIC 1 -#define CONFIG_SMALL 0 -#define CONFIG_POSTPROC_VISUALIZER 0 -#define CONFIG_OS_SUPPORT 1 -#define CONFIG_UNIT_TESTS 1 -#define CONFIG_WEBM_IO 1 -#define CONFIG_LIBYUV 1 -#define CONFIG_DECODE_PERF_TESTS 0 -#define CONFIG_ENCODE_PERF_TESTS 0 -#define CONFIG_MULTI_RES_ENCODING 1 -#define CONFIG_TEMPORAL_DENOISING 1 -#define CONFIG_VP9_TEMPORAL_DENOISING 1 -#define CONFIG_COEFFICIENT_RANGE_CHECKING 0 -#define CONFIG_VP9_HIGHBITDEPTH 1 -#define CONFIG_BETTER_HW_COMPATIBILITY 0 -#define CONFIG_EXPERIMENTAL 0 -#define CONFIG_SIZE_LIMIT 1 -#define CONFIG_SPATIAL_SVC 0 -#define CONFIG_FP_MB_STATS 0 -#define CONFIG_EMULATE_HARDWARE 0 -#define CONFIG_MISC_FIXES 0 -#define DECODE_WIDTH_LIMIT 16384 -#define DECODE_HEIGHT_LIMIT 16384 -#endif /* VPX_CONFIG_H */ diff --git a/WebRtc.NET/include/third_party/libvpx/source/config/mac/ia32/vpx_dsp_rtcd.h b/WebRtc.NET/include/third_party/libvpx/source/config/mac/ia32/vpx_dsp_rtcd.h deleted file mode 100644 index 58079fa4..00000000 --- a/WebRtc.NET/include/third_party/libvpx/source/config/mac/ia32/vpx_dsp_rtcd.h +++ /dev/null @@ -1,2899 +0,0 @@ -#ifndef VPX_DSP_RTCD_H_ -#define VPX_DSP_RTCD_H_ - -#ifdef RTCD_C -#define RTCD_EXTERN -#else -#define RTCD_EXTERN extern -#endif - -/* - * DSP - */ - -#include "vpx/vpx_integer.h" -#include "vpx_dsp/vpx_dsp_common.h" - - -#ifdef __cplusplus -extern "C" { -#endif - -unsigned int vpx_avg_4x4_c(const uint8_t *, int p); -unsigned int vpx_avg_4x4_sse2(const uint8_t *, int p); -RTCD_EXTERN unsigned int (*vpx_avg_4x4)(const uint8_t *, int p); - -unsigned int vpx_avg_8x8_c(const uint8_t *, int p); -unsigned int vpx_avg_8x8_sse2(const uint8_t *, int p); -RTCD_EXTERN unsigned int (*vpx_avg_8x8)(const uint8_t *, int p); - -void vpx_comp_avg_pred_c(uint8_t *comp_pred, const uint8_t *pred, int width, int height, const uint8_t *ref, int ref_stride); -#define vpx_comp_avg_pred vpx_comp_avg_pred_c - -void vpx_convolve8_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -void vpx_convolve8_sse2(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -void vpx_convolve8_ssse3(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -void vpx_convolve8_avx2(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -RTCD_EXTERN void (*vpx_convolve8)(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); - -void vpx_convolve8_avg_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -void vpx_convolve8_avg_sse2(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -void vpx_convolve8_avg_ssse3(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -RTCD_EXTERN void (*vpx_convolve8_avg)(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); - -void vpx_convolve8_avg_horiz_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -void vpx_convolve8_avg_horiz_sse2(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -void vpx_convolve8_avg_horiz_ssse3(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -RTCD_EXTERN void (*vpx_convolve8_avg_horiz)(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); - -void vpx_convolve8_avg_vert_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -void vpx_convolve8_avg_vert_sse2(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -void vpx_convolve8_avg_vert_ssse3(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -RTCD_EXTERN void (*vpx_convolve8_avg_vert)(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); - -void vpx_convolve8_horiz_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -void vpx_convolve8_horiz_sse2(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -void vpx_convolve8_horiz_ssse3(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -void vpx_convolve8_horiz_avx2(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -RTCD_EXTERN void (*vpx_convolve8_horiz)(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); - -void vpx_convolve8_vert_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -void vpx_convolve8_vert_sse2(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -void vpx_convolve8_vert_ssse3(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -void vpx_convolve8_vert_avx2(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -RTCD_EXTERN void (*vpx_convolve8_vert)(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); - -void vpx_convolve_avg_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -void vpx_convolve_avg_sse2(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -RTCD_EXTERN void (*vpx_convolve_avg)(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); - -void vpx_convolve_copy_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -void vpx_convolve_copy_sse2(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -RTCD_EXTERN void (*vpx_convolve_copy)(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); - -void vpx_d117_predictor_16x16_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d117_predictor_16x16 vpx_d117_predictor_16x16_c - -void vpx_d117_predictor_32x32_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d117_predictor_32x32 vpx_d117_predictor_32x32_c - -void vpx_d117_predictor_4x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d117_predictor_4x4 vpx_d117_predictor_4x4_c - -void vpx_d117_predictor_8x8_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d117_predictor_8x8 vpx_d117_predictor_8x8_c - -void vpx_d135_predictor_16x16_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d135_predictor_16x16 vpx_d135_predictor_16x16_c - -void vpx_d135_predictor_32x32_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d135_predictor_32x32 vpx_d135_predictor_32x32_c - -void vpx_d135_predictor_4x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d135_predictor_4x4 vpx_d135_predictor_4x4_c - -void vpx_d135_predictor_8x8_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d135_predictor_8x8 vpx_d135_predictor_8x8_c - -void vpx_d153_predictor_16x16_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_d153_predictor_16x16_ssse3(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -RTCD_EXTERN void (*vpx_d153_predictor_16x16)(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); - -void vpx_d153_predictor_32x32_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_d153_predictor_32x32_ssse3(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -RTCD_EXTERN void (*vpx_d153_predictor_32x32)(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); - -void vpx_d153_predictor_4x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_d153_predictor_4x4_ssse3(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -RTCD_EXTERN void (*vpx_d153_predictor_4x4)(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); - -void vpx_d153_predictor_8x8_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_d153_predictor_8x8_ssse3(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -RTCD_EXTERN void (*vpx_d153_predictor_8x8)(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); - -void vpx_d207_predictor_16x16_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_d207_predictor_16x16_ssse3(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -RTCD_EXTERN void (*vpx_d207_predictor_16x16)(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); - -void vpx_d207_predictor_32x32_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_d207_predictor_32x32_ssse3(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -RTCD_EXTERN void (*vpx_d207_predictor_32x32)(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); - -void vpx_d207_predictor_4x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_d207_predictor_4x4_sse2(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -RTCD_EXTERN void (*vpx_d207_predictor_4x4)(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); - -void vpx_d207_predictor_8x8_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_d207_predictor_8x8_ssse3(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -RTCD_EXTERN void (*vpx_d207_predictor_8x8)(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); - -void vpx_d207e_predictor_16x16_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d207e_predictor_16x16 vpx_d207e_predictor_16x16_c - -void vpx_d207e_predictor_32x32_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d207e_predictor_32x32 vpx_d207e_predictor_32x32_c - -void vpx_d207e_predictor_4x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d207e_predictor_4x4 vpx_d207e_predictor_4x4_c - -void vpx_d207e_predictor_8x8_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d207e_predictor_8x8 vpx_d207e_predictor_8x8_c - -void vpx_d45_predictor_16x16_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_d45_predictor_16x16_ssse3(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -RTCD_EXTERN void (*vpx_d45_predictor_16x16)(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); - -void vpx_d45_predictor_32x32_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_d45_predictor_32x32_ssse3(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -RTCD_EXTERN void (*vpx_d45_predictor_32x32)(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); - -void vpx_d45_predictor_4x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_d45_predictor_4x4_sse2(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -RTCD_EXTERN void (*vpx_d45_predictor_4x4)(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); - -void vpx_d45_predictor_8x8_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_d45_predictor_8x8_sse2(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -RTCD_EXTERN void (*vpx_d45_predictor_8x8)(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); - -void vpx_d45e_predictor_16x16_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d45e_predictor_16x16 vpx_d45e_predictor_16x16_c - -void vpx_d45e_predictor_32x32_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d45e_predictor_32x32 vpx_d45e_predictor_32x32_c - -void vpx_d45e_predictor_4x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d45e_predictor_4x4 vpx_d45e_predictor_4x4_c - -void vpx_d45e_predictor_8x8_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d45e_predictor_8x8 vpx_d45e_predictor_8x8_c - -void vpx_d63_predictor_16x16_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_d63_predictor_16x16_ssse3(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -RTCD_EXTERN void (*vpx_d63_predictor_16x16)(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); - -void vpx_d63_predictor_32x32_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_d63_predictor_32x32_ssse3(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -RTCD_EXTERN void (*vpx_d63_predictor_32x32)(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); - -void vpx_d63_predictor_4x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_d63_predictor_4x4_ssse3(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -RTCD_EXTERN void (*vpx_d63_predictor_4x4)(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); - -void vpx_d63_predictor_8x8_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_d63_predictor_8x8_ssse3(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -RTCD_EXTERN void (*vpx_d63_predictor_8x8)(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); - -void vpx_d63e_predictor_16x16_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d63e_predictor_16x16 vpx_d63e_predictor_16x16_c - -void vpx_d63e_predictor_32x32_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d63e_predictor_32x32 vpx_d63e_predictor_32x32_c - -void vpx_d63e_predictor_4x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d63e_predictor_4x4 vpx_d63e_predictor_4x4_c - -void vpx_d63e_predictor_8x8_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d63e_predictor_8x8 vpx_d63e_predictor_8x8_c - -void vpx_d63f_predictor_4x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d63f_predictor_4x4 vpx_d63f_predictor_4x4_c - -void vpx_dc_128_predictor_16x16_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_dc_128_predictor_16x16_sse2(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -RTCD_EXTERN void (*vpx_dc_128_predictor_16x16)(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); - -void vpx_dc_128_predictor_32x32_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_dc_128_predictor_32x32_sse2(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -RTCD_EXTERN void (*vpx_dc_128_predictor_32x32)(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); - -void vpx_dc_128_predictor_4x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_dc_128_predictor_4x4_sse2(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -RTCD_EXTERN void (*vpx_dc_128_predictor_4x4)(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); - -void vpx_dc_128_predictor_8x8_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_dc_128_predictor_8x8_sse2(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -RTCD_EXTERN void (*vpx_dc_128_predictor_8x8)(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); - -void vpx_dc_left_predictor_16x16_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_dc_left_predictor_16x16_sse2(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -RTCD_EXTERN void (*vpx_dc_left_predictor_16x16)(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); - -void vpx_dc_left_predictor_32x32_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_dc_left_predictor_32x32_sse2(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -RTCD_EXTERN void (*vpx_dc_left_predictor_32x32)(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); - -void vpx_dc_left_predictor_4x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_dc_left_predictor_4x4_sse2(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -RTCD_EXTERN void (*vpx_dc_left_predictor_4x4)(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); - -void vpx_dc_left_predictor_8x8_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_dc_left_predictor_8x8_sse2(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -RTCD_EXTERN void (*vpx_dc_left_predictor_8x8)(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); - -void vpx_dc_predictor_16x16_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_dc_predictor_16x16_sse2(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -RTCD_EXTERN void (*vpx_dc_predictor_16x16)(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); - -void vpx_dc_predictor_32x32_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_dc_predictor_32x32_sse2(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -RTCD_EXTERN void (*vpx_dc_predictor_32x32)(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); - -void vpx_dc_predictor_4x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_dc_predictor_4x4_sse2(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -RTCD_EXTERN void (*vpx_dc_predictor_4x4)(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); - -void vpx_dc_predictor_8x8_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_dc_predictor_8x8_sse2(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -RTCD_EXTERN void (*vpx_dc_predictor_8x8)(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); - -void vpx_dc_top_predictor_16x16_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_dc_top_predictor_16x16_sse2(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -RTCD_EXTERN void (*vpx_dc_top_predictor_16x16)(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); - -void vpx_dc_top_predictor_32x32_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_dc_top_predictor_32x32_sse2(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -RTCD_EXTERN void (*vpx_dc_top_predictor_32x32)(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); - -void vpx_dc_top_predictor_4x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_dc_top_predictor_4x4_sse2(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -RTCD_EXTERN void (*vpx_dc_top_predictor_4x4)(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); - -void vpx_dc_top_predictor_8x8_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_dc_top_predictor_8x8_sse2(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -RTCD_EXTERN void (*vpx_dc_top_predictor_8x8)(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); - -void vpx_fdct16x16_c(const int16_t *input, tran_low_t *output, int stride); -void vpx_fdct16x16_sse2(const int16_t *input, tran_low_t *output, int stride); -RTCD_EXTERN void (*vpx_fdct16x16)(const int16_t *input, tran_low_t *output, int stride); - -void vpx_fdct16x16_1_c(const int16_t *input, tran_low_t *output, int stride); -void vpx_fdct16x16_1_sse2(const int16_t *input, tran_low_t *output, int stride); -RTCD_EXTERN void (*vpx_fdct16x16_1)(const int16_t *input, tran_low_t *output, int stride); - -void vpx_fdct32x32_c(const int16_t *input, tran_low_t *output, int stride); -void vpx_fdct32x32_sse2(const int16_t *input, tran_low_t *output, int stride); -RTCD_EXTERN void (*vpx_fdct32x32)(const int16_t *input, tran_low_t *output, int stride); - -void vpx_fdct32x32_1_c(const int16_t *input, tran_low_t *output, int stride); -void vpx_fdct32x32_1_sse2(const int16_t *input, tran_low_t *output, int stride); -RTCD_EXTERN void (*vpx_fdct32x32_1)(const int16_t *input, tran_low_t *output, int stride); - -void vpx_fdct32x32_rd_c(const int16_t *input, tran_low_t *output, int stride); -void vpx_fdct32x32_rd_sse2(const int16_t *input, tran_low_t *output, int stride); -RTCD_EXTERN void (*vpx_fdct32x32_rd)(const int16_t *input, tran_low_t *output, int stride); - -void vpx_fdct4x4_c(const int16_t *input, tran_low_t *output, int stride); -void vpx_fdct4x4_sse2(const int16_t *input, tran_low_t *output, int stride); -RTCD_EXTERN void (*vpx_fdct4x4)(const int16_t *input, tran_low_t *output, int stride); - -void vpx_fdct4x4_1_c(const int16_t *input, tran_low_t *output, int stride); -void vpx_fdct4x4_1_sse2(const int16_t *input, tran_low_t *output, int stride); -RTCD_EXTERN void (*vpx_fdct4x4_1)(const int16_t *input, tran_low_t *output, int stride); - -void vpx_fdct8x8_c(const int16_t *input, tran_low_t *output, int stride); -void vpx_fdct8x8_sse2(const int16_t *input, tran_low_t *output, int stride); -RTCD_EXTERN void (*vpx_fdct8x8)(const int16_t *input, tran_low_t *output, int stride); - -void vpx_fdct8x8_1_c(const int16_t *input, tran_low_t *output, int stride); -void vpx_fdct8x8_1_sse2(const int16_t *input, tran_low_t *output, int stride); -RTCD_EXTERN void (*vpx_fdct8x8_1)(const int16_t *input, tran_low_t *output, int stride); - -void vpx_get16x16var_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse, int *sum); -void vpx_get16x16var_sse2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse, int *sum); -void vpx_get16x16var_avx2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse, int *sum); -RTCD_EXTERN void (*vpx_get16x16var)(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse, int *sum); - -unsigned int vpx_get4x4sse_cs_c(const unsigned char *src_ptr, int source_stride, const unsigned char *ref_ptr, int ref_stride); -#define vpx_get4x4sse_cs vpx_get4x4sse_cs_c - -void vpx_get8x8var_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse, int *sum); -void vpx_get8x8var_sse2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse, int *sum); -RTCD_EXTERN void (*vpx_get8x8var)(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse, int *sum); - -unsigned int vpx_get_mb_ss_c(const int16_t *); -unsigned int vpx_get_mb_ss_sse2(const int16_t *); -RTCD_EXTERN unsigned int (*vpx_get_mb_ss)(const int16_t *); - -void vpx_h_predictor_16x16_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_h_predictor_16x16_sse2(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -RTCD_EXTERN void (*vpx_h_predictor_16x16)(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); - -void vpx_h_predictor_32x32_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_h_predictor_32x32_sse2(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -RTCD_EXTERN void (*vpx_h_predictor_32x32)(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); - -void vpx_h_predictor_4x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_h_predictor_4x4_sse2(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -RTCD_EXTERN void (*vpx_h_predictor_4x4)(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); - -void vpx_h_predictor_8x8_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_h_predictor_8x8_sse2(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -RTCD_EXTERN void (*vpx_h_predictor_8x8)(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); - -void vpx_hadamard_16x16_c(const int16_t *src_diff, int src_stride, int16_t *coeff); -void vpx_hadamard_16x16_sse2(const int16_t *src_diff, int src_stride, int16_t *coeff); -RTCD_EXTERN void (*vpx_hadamard_16x16)(const int16_t *src_diff, int src_stride, int16_t *coeff); - -void vpx_hadamard_8x8_c(const int16_t *src_diff, int src_stride, int16_t *coeff); -void vpx_hadamard_8x8_sse2(const int16_t *src_diff, int src_stride, int16_t *coeff); -RTCD_EXTERN void (*vpx_hadamard_8x8)(const int16_t *src_diff, int src_stride, int16_t *coeff); - -void vpx_he_predictor_4x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_he_predictor_4x4 vpx_he_predictor_4x4_c - -void vpx_highbd_10_get16x16var_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse, int *sum); -#define vpx_highbd_10_get16x16var vpx_highbd_10_get16x16var_c - -void vpx_highbd_10_get8x8var_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse, int *sum); -#define vpx_highbd_10_get8x8var vpx_highbd_10_get8x8var_c - -unsigned int vpx_highbd_10_mse16x16_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int recon_stride, unsigned int *sse); -unsigned int vpx_highbd_10_mse16x16_sse2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int recon_stride, unsigned int *sse); -RTCD_EXTERN unsigned int (*vpx_highbd_10_mse16x16)(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int recon_stride, unsigned int *sse); - -unsigned int vpx_highbd_10_mse16x8_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int recon_stride, unsigned int *sse); -#define vpx_highbd_10_mse16x8 vpx_highbd_10_mse16x8_c - -unsigned int vpx_highbd_10_mse8x16_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int recon_stride, unsigned int *sse); -#define vpx_highbd_10_mse8x16 vpx_highbd_10_mse8x16_c - -unsigned int vpx_highbd_10_mse8x8_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int recon_stride, unsigned int *sse); -unsigned int vpx_highbd_10_mse8x8_sse2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int recon_stride, unsigned int *sse); -RTCD_EXTERN unsigned int (*vpx_highbd_10_mse8x8)(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int recon_stride, unsigned int *sse); - -uint32_t vpx_highbd_10_sub_pixel_avg_variance16x16_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_highbd_10_sub_pixel_avg_variance16x16_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -RTCD_EXTERN uint32_t (*vpx_highbd_10_sub_pixel_avg_variance16x16)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); - -uint32_t vpx_highbd_10_sub_pixel_avg_variance16x32_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_highbd_10_sub_pixel_avg_variance16x32_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -RTCD_EXTERN uint32_t (*vpx_highbd_10_sub_pixel_avg_variance16x32)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); - -uint32_t vpx_highbd_10_sub_pixel_avg_variance16x8_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_highbd_10_sub_pixel_avg_variance16x8_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -RTCD_EXTERN uint32_t (*vpx_highbd_10_sub_pixel_avg_variance16x8)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); - -uint32_t vpx_highbd_10_sub_pixel_avg_variance32x16_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_highbd_10_sub_pixel_avg_variance32x16_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -RTCD_EXTERN uint32_t (*vpx_highbd_10_sub_pixel_avg_variance32x16)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); - -uint32_t vpx_highbd_10_sub_pixel_avg_variance32x32_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_highbd_10_sub_pixel_avg_variance32x32_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -RTCD_EXTERN uint32_t (*vpx_highbd_10_sub_pixel_avg_variance32x32)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); - -uint32_t vpx_highbd_10_sub_pixel_avg_variance32x64_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_highbd_10_sub_pixel_avg_variance32x64_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -RTCD_EXTERN uint32_t (*vpx_highbd_10_sub_pixel_avg_variance32x64)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); - -uint32_t vpx_highbd_10_sub_pixel_avg_variance4x4_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_highbd_10_sub_pixel_avg_variance4x4 vpx_highbd_10_sub_pixel_avg_variance4x4_c - -uint32_t vpx_highbd_10_sub_pixel_avg_variance4x8_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_highbd_10_sub_pixel_avg_variance4x8 vpx_highbd_10_sub_pixel_avg_variance4x8_c - -uint32_t vpx_highbd_10_sub_pixel_avg_variance64x32_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_highbd_10_sub_pixel_avg_variance64x32_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -RTCD_EXTERN uint32_t (*vpx_highbd_10_sub_pixel_avg_variance64x32)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); - -uint32_t vpx_highbd_10_sub_pixel_avg_variance64x64_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_highbd_10_sub_pixel_avg_variance64x64_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -RTCD_EXTERN uint32_t (*vpx_highbd_10_sub_pixel_avg_variance64x64)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); - -uint32_t vpx_highbd_10_sub_pixel_avg_variance8x16_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_highbd_10_sub_pixel_avg_variance8x16_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -RTCD_EXTERN uint32_t (*vpx_highbd_10_sub_pixel_avg_variance8x16)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); - -uint32_t vpx_highbd_10_sub_pixel_avg_variance8x4_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_highbd_10_sub_pixel_avg_variance8x4_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -RTCD_EXTERN uint32_t (*vpx_highbd_10_sub_pixel_avg_variance8x4)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); - -uint32_t vpx_highbd_10_sub_pixel_avg_variance8x8_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_highbd_10_sub_pixel_avg_variance8x8_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -RTCD_EXTERN uint32_t (*vpx_highbd_10_sub_pixel_avg_variance8x8)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); - -uint32_t vpx_highbd_10_sub_pixel_variance16x16_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_highbd_10_sub_pixel_variance16x16_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -RTCD_EXTERN uint32_t (*vpx_highbd_10_sub_pixel_variance16x16)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); - -uint32_t vpx_highbd_10_sub_pixel_variance16x32_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_highbd_10_sub_pixel_variance16x32_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -RTCD_EXTERN uint32_t (*vpx_highbd_10_sub_pixel_variance16x32)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); - -uint32_t vpx_highbd_10_sub_pixel_variance16x8_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_highbd_10_sub_pixel_variance16x8_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -RTCD_EXTERN uint32_t (*vpx_highbd_10_sub_pixel_variance16x8)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); - -uint32_t vpx_highbd_10_sub_pixel_variance32x16_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_highbd_10_sub_pixel_variance32x16_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -RTCD_EXTERN uint32_t (*vpx_highbd_10_sub_pixel_variance32x16)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); - -uint32_t vpx_highbd_10_sub_pixel_variance32x32_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_highbd_10_sub_pixel_variance32x32_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -RTCD_EXTERN uint32_t (*vpx_highbd_10_sub_pixel_variance32x32)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); - -uint32_t vpx_highbd_10_sub_pixel_variance32x64_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_highbd_10_sub_pixel_variance32x64_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -RTCD_EXTERN uint32_t (*vpx_highbd_10_sub_pixel_variance32x64)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); - -uint32_t vpx_highbd_10_sub_pixel_variance4x4_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -#define vpx_highbd_10_sub_pixel_variance4x4 vpx_highbd_10_sub_pixel_variance4x4_c - -uint32_t vpx_highbd_10_sub_pixel_variance4x8_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -#define vpx_highbd_10_sub_pixel_variance4x8 vpx_highbd_10_sub_pixel_variance4x8_c - -uint32_t vpx_highbd_10_sub_pixel_variance64x32_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_highbd_10_sub_pixel_variance64x32_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -RTCD_EXTERN uint32_t (*vpx_highbd_10_sub_pixel_variance64x32)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); - -uint32_t vpx_highbd_10_sub_pixel_variance64x64_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_highbd_10_sub_pixel_variance64x64_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -RTCD_EXTERN uint32_t (*vpx_highbd_10_sub_pixel_variance64x64)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); - -uint32_t vpx_highbd_10_sub_pixel_variance8x16_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_highbd_10_sub_pixel_variance8x16_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -RTCD_EXTERN uint32_t (*vpx_highbd_10_sub_pixel_variance8x16)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); - -uint32_t vpx_highbd_10_sub_pixel_variance8x4_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_highbd_10_sub_pixel_variance8x4_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -RTCD_EXTERN uint32_t (*vpx_highbd_10_sub_pixel_variance8x4)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); - -uint32_t vpx_highbd_10_sub_pixel_variance8x8_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_highbd_10_sub_pixel_variance8x8_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -RTCD_EXTERN uint32_t (*vpx_highbd_10_sub_pixel_variance8x8)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); - -unsigned int vpx_highbd_10_variance16x16_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -unsigned int vpx_highbd_10_variance16x16_sse2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -RTCD_EXTERN unsigned int (*vpx_highbd_10_variance16x16)(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); - -unsigned int vpx_highbd_10_variance16x32_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -unsigned int vpx_highbd_10_variance16x32_sse2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -RTCD_EXTERN unsigned int (*vpx_highbd_10_variance16x32)(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); - -unsigned int vpx_highbd_10_variance16x8_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -unsigned int vpx_highbd_10_variance16x8_sse2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -RTCD_EXTERN unsigned int (*vpx_highbd_10_variance16x8)(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); - -unsigned int vpx_highbd_10_variance32x16_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -unsigned int vpx_highbd_10_variance32x16_sse2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -RTCD_EXTERN unsigned int (*vpx_highbd_10_variance32x16)(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); - -unsigned int vpx_highbd_10_variance32x32_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -unsigned int vpx_highbd_10_variance32x32_sse2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -RTCD_EXTERN unsigned int (*vpx_highbd_10_variance32x32)(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); - -unsigned int vpx_highbd_10_variance32x64_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -unsigned int vpx_highbd_10_variance32x64_sse2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -RTCD_EXTERN unsigned int (*vpx_highbd_10_variance32x64)(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); - -unsigned int vpx_highbd_10_variance4x4_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_highbd_10_variance4x4 vpx_highbd_10_variance4x4_c - -unsigned int vpx_highbd_10_variance4x8_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_highbd_10_variance4x8 vpx_highbd_10_variance4x8_c - -unsigned int vpx_highbd_10_variance64x32_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -unsigned int vpx_highbd_10_variance64x32_sse2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -RTCD_EXTERN unsigned int (*vpx_highbd_10_variance64x32)(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); - -unsigned int vpx_highbd_10_variance64x64_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -unsigned int vpx_highbd_10_variance64x64_sse2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -RTCD_EXTERN unsigned int (*vpx_highbd_10_variance64x64)(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); - -unsigned int vpx_highbd_10_variance8x16_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -unsigned int vpx_highbd_10_variance8x16_sse2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -RTCD_EXTERN unsigned int (*vpx_highbd_10_variance8x16)(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); - -unsigned int vpx_highbd_10_variance8x4_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_highbd_10_variance8x4 vpx_highbd_10_variance8x4_c - -unsigned int vpx_highbd_10_variance8x8_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -unsigned int vpx_highbd_10_variance8x8_sse2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -RTCD_EXTERN unsigned int (*vpx_highbd_10_variance8x8)(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); - -void vpx_highbd_12_get16x16var_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse, int *sum); -#define vpx_highbd_12_get16x16var vpx_highbd_12_get16x16var_c - -void vpx_highbd_12_get8x8var_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse, int *sum); -#define vpx_highbd_12_get8x8var vpx_highbd_12_get8x8var_c - -unsigned int vpx_highbd_12_mse16x16_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int recon_stride, unsigned int *sse); -unsigned int vpx_highbd_12_mse16x16_sse2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int recon_stride, unsigned int *sse); -RTCD_EXTERN unsigned int (*vpx_highbd_12_mse16x16)(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int recon_stride, unsigned int *sse); - -unsigned int vpx_highbd_12_mse16x8_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int recon_stride, unsigned int *sse); -#define vpx_highbd_12_mse16x8 vpx_highbd_12_mse16x8_c - -unsigned int vpx_highbd_12_mse8x16_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int recon_stride, unsigned int *sse); -#define vpx_highbd_12_mse8x16 vpx_highbd_12_mse8x16_c - -unsigned int vpx_highbd_12_mse8x8_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int recon_stride, unsigned int *sse); -unsigned int vpx_highbd_12_mse8x8_sse2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int recon_stride, unsigned int *sse); -RTCD_EXTERN unsigned int (*vpx_highbd_12_mse8x8)(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int recon_stride, unsigned int *sse); - -uint32_t vpx_highbd_12_sub_pixel_avg_variance16x16_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_highbd_12_sub_pixel_avg_variance16x16_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -RTCD_EXTERN uint32_t (*vpx_highbd_12_sub_pixel_avg_variance16x16)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); - -uint32_t vpx_highbd_12_sub_pixel_avg_variance16x32_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_highbd_12_sub_pixel_avg_variance16x32_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -RTCD_EXTERN uint32_t (*vpx_highbd_12_sub_pixel_avg_variance16x32)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); - -uint32_t vpx_highbd_12_sub_pixel_avg_variance16x8_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_highbd_12_sub_pixel_avg_variance16x8_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -RTCD_EXTERN uint32_t (*vpx_highbd_12_sub_pixel_avg_variance16x8)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); - -uint32_t vpx_highbd_12_sub_pixel_avg_variance32x16_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_highbd_12_sub_pixel_avg_variance32x16_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -RTCD_EXTERN uint32_t (*vpx_highbd_12_sub_pixel_avg_variance32x16)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); - -uint32_t vpx_highbd_12_sub_pixel_avg_variance32x32_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_highbd_12_sub_pixel_avg_variance32x32_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -RTCD_EXTERN uint32_t (*vpx_highbd_12_sub_pixel_avg_variance32x32)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); - -uint32_t vpx_highbd_12_sub_pixel_avg_variance32x64_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_highbd_12_sub_pixel_avg_variance32x64_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -RTCD_EXTERN uint32_t (*vpx_highbd_12_sub_pixel_avg_variance32x64)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); - -uint32_t vpx_highbd_12_sub_pixel_avg_variance4x4_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_highbd_12_sub_pixel_avg_variance4x4 vpx_highbd_12_sub_pixel_avg_variance4x4_c - -uint32_t vpx_highbd_12_sub_pixel_avg_variance4x8_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_highbd_12_sub_pixel_avg_variance4x8 vpx_highbd_12_sub_pixel_avg_variance4x8_c - -uint32_t vpx_highbd_12_sub_pixel_avg_variance64x32_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_highbd_12_sub_pixel_avg_variance64x32_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -RTCD_EXTERN uint32_t (*vpx_highbd_12_sub_pixel_avg_variance64x32)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); - -uint32_t vpx_highbd_12_sub_pixel_avg_variance64x64_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_highbd_12_sub_pixel_avg_variance64x64_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -RTCD_EXTERN uint32_t (*vpx_highbd_12_sub_pixel_avg_variance64x64)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); - -uint32_t vpx_highbd_12_sub_pixel_avg_variance8x16_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_highbd_12_sub_pixel_avg_variance8x16_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -RTCD_EXTERN uint32_t (*vpx_highbd_12_sub_pixel_avg_variance8x16)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); - -uint32_t vpx_highbd_12_sub_pixel_avg_variance8x4_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_highbd_12_sub_pixel_avg_variance8x4_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -RTCD_EXTERN uint32_t (*vpx_highbd_12_sub_pixel_avg_variance8x4)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); - -uint32_t vpx_highbd_12_sub_pixel_avg_variance8x8_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_highbd_12_sub_pixel_avg_variance8x8_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -RTCD_EXTERN uint32_t (*vpx_highbd_12_sub_pixel_avg_variance8x8)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); - -uint32_t vpx_highbd_12_sub_pixel_variance16x16_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_highbd_12_sub_pixel_variance16x16_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -RTCD_EXTERN uint32_t (*vpx_highbd_12_sub_pixel_variance16x16)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); - -uint32_t vpx_highbd_12_sub_pixel_variance16x32_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_highbd_12_sub_pixel_variance16x32_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -RTCD_EXTERN uint32_t (*vpx_highbd_12_sub_pixel_variance16x32)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); - -uint32_t vpx_highbd_12_sub_pixel_variance16x8_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_highbd_12_sub_pixel_variance16x8_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -RTCD_EXTERN uint32_t (*vpx_highbd_12_sub_pixel_variance16x8)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); - -uint32_t vpx_highbd_12_sub_pixel_variance32x16_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_highbd_12_sub_pixel_variance32x16_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -RTCD_EXTERN uint32_t (*vpx_highbd_12_sub_pixel_variance32x16)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); - -uint32_t vpx_highbd_12_sub_pixel_variance32x32_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_highbd_12_sub_pixel_variance32x32_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -RTCD_EXTERN uint32_t (*vpx_highbd_12_sub_pixel_variance32x32)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); - -uint32_t vpx_highbd_12_sub_pixel_variance32x64_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_highbd_12_sub_pixel_variance32x64_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -RTCD_EXTERN uint32_t (*vpx_highbd_12_sub_pixel_variance32x64)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); - -uint32_t vpx_highbd_12_sub_pixel_variance4x4_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -#define vpx_highbd_12_sub_pixel_variance4x4 vpx_highbd_12_sub_pixel_variance4x4_c - -uint32_t vpx_highbd_12_sub_pixel_variance4x8_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -#define vpx_highbd_12_sub_pixel_variance4x8 vpx_highbd_12_sub_pixel_variance4x8_c - -uint32_t vpx_highbd_12_sub_pixel_variance64x32_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_highbd_12_sub_pixel_variance64x32_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -RTCD_EXTERN uint32_t (*vpx_highbd_12_sub_pixel_variance64x32)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); - -uint32_t vpx_highbd_12_sub_pixel_variance64x64_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_highbd_12_sub_pixel_variance64x64_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -RTCD_EXTERN uint32_t (*vpx_highbd_12_sub_pixel_variance64x64)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); - -uint32_t vpx_highbd_12_sub_pixel_variance8x16_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_highbd_12_sub_pixel_variance8x16_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -RTCD_EXTERN uint32_t (*vpx_highbd_12_sub_pixel_variance8x16)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); - -uint32_t vpx_highbd_12_sub_pixel_variance8x4_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_highbd_12_sub_pixel_variance8x4_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -RTCD_EXTERN uint32_t (*vpx_highbd_12_sub_pixel_variance8x4)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); - -uint32_t vpx_highbd_12_sub_pixel_variance8x8_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_highbd_12_sub_pixel_variance8x8_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -RTCD_EXTERN uint32_t (*vpx_highbd_12_sub_pixel_variance8x8)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); - -unsigned int vpx_highbd_12_variance16x16_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -unsigned int vpx_highbd_12_variance16x16_sse2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -RTCD_EXTERN unsigned int (*vpx_highbd_12_variance16x16)(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); - -unsigned int vpx_highbd_12_variance16x32_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -unsigned int vpx_highbd_12_variance16x32_sse2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -RTCD_EXTERN unsigned int (*vpx_highbd_12_variance16x32)(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); - -unsigned int vpx_highbd_12_variance16x8_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -unsigned int vpx_highbd_12_variance16x8_sse2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -RTCD_EXTERN unsigned int (*vpx_highbd_12_variance16x8)(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); - -unsigned int vpx_highbd_12_variance32x16_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -unsigned int vpx_highbd_12_variance32x16_sse2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -RTCD_EXTERN unsigned int (*vpx_highbd_12_variance32x16)(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); - -unsigned int vpx_highbd_12_variance32x32_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -unsigned int vpx_highbd_12_variance32x32_sse2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -RTCD_EXTERN unsigned int (*vpx_highbd_12_variance32x32)(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); - -unsigned int vpx_highbd_12_variance32x64_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -unsigned int vpx_highbd_12_variance32x64_sse2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -RTCD_EXTERN unsigned int (*vpx_highbd_12_variance32x64)(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); - -unsigned int vpx_highbd_12_variance4x4_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_highbd_12_variance4x4 vpx_highbd_12_variance4x4_c - -unsigned int vpx_highbd_12_variance4x8_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_highbd_12_variance4x8 vpx_highbd_12_variance4x8_c - -unsigned int vpx_highbd_12_variance64x32_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -unsigned int vpx_highbd_12_variance64x32_sse2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -RTCD_EXTERN unsigned int (*vpx_highbd_12_variance64x32)(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); - -unsigned int vpx_highbd_12_variance64x64_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -unsigned int vpx_highbd_12_variance64x64_sse2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -RTCD_EXTERN unsigned int (*vpx_highbd_12_variance64x64)(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); - -unsigned int vpx_highbd_12_variance8x16_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -unsigned int vpx_highbd_12_variance8x16_sse2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -RTCD_EXTERN unsigned int (*vpx_highbd_12_variance8x16)(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); - -unsigned int vpx_highbd_12_variance8x4_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_highbd_12_variance8x4 vpx_highbd_12_variance8x4_c - -unsigned int vpx_highbd_12_variance8x8_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -unsigned int vpx_highbd_12_variance8x8_sse2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -RTCD_EXTERN unsigned int (*vpx_highbd_12_variance8x8)(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); - -void vpx_highbd_8_get16x16var_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse, int *sum); -#define vpx_highbd_8_get16x16var vpx_highbd_8_get16x16var_c - -void vpx_highbd_8_get8x8var_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse, int *sum); -#define vpx_highbd_8_get8x8var vpx_highbd_8_get8x8var_c - -unsigned int vpx_highbd_8_mse16x16_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int recon_stride, unsigned int *sse); -unsigned int vpx_highbd_8_mse16x16_sse2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int recon_stride, unsigned int *sse); -RTCD_EXTERN unsigned int (*vpx_highbd_8_mse16x16)(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int recon_stride, unsigned int *sse); - -unsigned int vpx_highbd_8_mse16x8_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int recon_stride, unsigned int *sse); -#define vpx_highbd_8_mse16x8 vpx_highbd_8_mse16x8_c - -unsigned int vpx_highbd_8_mse8x16_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int recon_stride, unsigned int *sse); -#define vpx_highbd_8_mse8x16 vpx_highbd_8_mse8x16_c - -unsigned int vpx_highbd_8_mse8x8_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int recon_stride, unsigned int *sse); -unsigned int vpx_highbd_8_mse8x8_sse2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int recon_stride, unsigned int *sse); -RTCD_EXTERN unsigned int (*vpx_highbd_8_mse8x8)(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int recon_stride, unsigned int *sse); - -uint32_t vpx_highbd_8_sub_pixel_avg_variance16x16_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_highbd_8_sub_pixel_avg_variance16x16_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -RTCD_EXTERN uint32_t (*vpx_highbd_8_sub_pixel_avg_variance16x16)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); - -uint32_t vpx_highbd_8_sub_pixel_avg_variance16x32_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_highbd_8_sub_pixel_avg_variance16x32_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -RTCD_EXTERN uint32_t (*vpx_highbd_8_sub_pixel_avg_variance16x32)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); - -uint32_t vpx_highbd_8_sub_pixel_avg_variance16x8_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_highbd_8_sub_pixel_avg_variance16x8_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -RTCD_EXTERN uint32_t (*vpx_highbd_8_sub_pixel_avg_variance16x8)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); - -uint32_t vpx_highbd_8_sub_pixel_avg_variance32x16_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_highbd_8_sub_pixel_avg_variance32x16_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -RTCD_EXTERN uint32_t (*vpx_highbd_8_sub_pixel_avg_variance32x16)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); - -uint32_t vpx_highbd_8_sub_pixel_avg_variance32x32_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_highbd_8_sub_pixel_avg_variance32x32_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -RTCD_EXTERN uint32_t (*vpx_highbd_8_sub_pixel_avg_variance32x32)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); - -uint32_t vpx_highbd_8_sub_pixel_avg_variance32x64_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_highbd_8_sub_pixel_avg_variance32x64_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -RTCD_EXTERN uint32_t (*vpx_highbd_8_sub_pixel_avg_variance32x64)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); - -uint32_t vpx_highbd_8_sub_pixel_avg_variance4x4_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_highbd_8_sub_pixel_avg_variance4x4 vpx_highbd_8_sub_pixel_avg_variance4x4_c - -uint32_t vpx_highbd_8_sub_pixel_avg_variance4x8_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_highbd_8_sub_pixel_avg_variance4x8 vpx_highbd_8_sub_pixel_avg_variance4x8_c - -uint32_t vpx_highbd_8_sub_pixel_avg_variance64x32_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_highbd_8_sub_pixel_avg_variance64x32_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -RTCD_EXTERN uint32_t (*vpx_highbd_8_sub_pixel_avg_variance64x32)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); - -uint32_t vpx_highbd_8_sub_pixel_avg_variance64x64_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_highbd_8_sub_pixel_avg_variance64x64_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -RTCD_EXTERN uint32_t (*vpx_highbd_8_sub_pixel_avg_variance64x64)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); - -uint32_t vpx_highbd_8_sub_pixel_avg_variance8x16_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_highbd_8_sub_pixel_avg_variance8x16_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -RTCD_EXTERN uint32_t (*vpx_highbd_8_sub_pixel_avg_variance8x16)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); - -uint32_t vpx_highbd_8_sub_pixel_avg_variance8x4_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_highbd_8_sub_pixel_avg_variance8x4_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -RTCD_EXTERN uint32_t (*vpx_highbd_8_sub_pixel_avg_variance8x4)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); - -uint32_t vpx_highbd_8_sub_pixel_avg_variance8x8_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_highbd_8_sub_pixel_avg_variance8x8_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -RTCD_EXTERN uint32_t (*vpx_highbd_8_sub_pixel_avg_variance8x8)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); - -uint32_t vpx_highbd_8_sub_pixel_variance16x16_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_highbd_8_sub_pixel_variance16x16_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -RTCD_EXTERN uint32_t (*vpx_highbd_8_sub_pixel_variance16x16)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); - -uint32_t vpx_highbd_8_sub_pixel_variance16x32_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_highbd_8_sub_pixel_variance16x32_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -RTCD_EXTERN uint32_t (*vpx_highbd_8_sub_pixel_variance16x32)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); - -uint32_t vpx_highbd_8_sub_pixel_variance16x8_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_highbd_8_sub_pixel_variance16x8_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -RTCD_EXTERN uint32_t (*vpx_highbd_8_sub_pixel_variance16x8)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); - -uint32_t vpx_highbd_8_sub_pixel_variance32x16_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_highbd_8_sub_pixel_variance32x16_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -RTCD_EXTERN uint32_t (*vpx_highbd_8_sub_pixel_variance32x16)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); - -uint32_t vpx_highbd_8_sub_pixel_variance32x32_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_highbd_8_sub_pixel_variance32x32_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -RTCD_EXTERN uint32_t (*vpx_highbd_8_sub_pixel_variance32x32)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); - -uint32_t vpx_highbd_8_sub_pixel_variance32x64_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_highbd_8_sub_pixel_variance32x64_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -RTCD_EXTERN uint32_t (*vpx_highbd_8_sub_pixel_variance32x64)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); - -uint32_t vpx_highbd_8_sub_pixel_variance4x4_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -#define vpx_highbd_8_sub_pixel_variance4x4 vpx_highbd_8_sub_pixel_variance4x4_c - -uint32_t vpx_highbd_8_sub_pixel_variance4x8_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -#define vpx_highbd_8_sub_pixel_variance4x8 vpx_highbd_8_sub_pixel_variance4x8_c - -uint32_t vpx_highbd_8_sub_pixel_variance64x32_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_highbd_8_sub_pixel_variance64x32_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -RTCD_EXTERN uint32_t (*vpx_highbd_8_sub_pixel_variance64x32)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); - -uint32_t vpx_highbd_8_sub_pixel_variance64x64_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_highbd_8_sub_pixel_variance64x64_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -RTCD_EXTERN uint32_t (*vpx_highbd_8_sub_pixel_variance64x64)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); - -uint32_t vpx_highbd_8_sub_pixel_variance8x16_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_highbd_8_sub_pixel_variance8x16_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -RTCD_EXTERN uint32_t (*vpx_highbd_8_sub_pixel_variance8x16)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); - -uint32_t vpx_highbd_8_sub_pixel_variance8x4_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_highbd_8_sub_pixel_variance8x4_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -RTCD_EXTERN uint32_t (*vpx_highbd_8_sub_pixel_variance8x4)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); - -uint32_t vpx_highbd_8_sub_pixel_variance8x8_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_highbd_8_sub_pixel_variance8x8_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -RTCD_EXTERN uint32_t (*vpx_highbd_8_sub_pixel_variance8x8)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); - -unsigned int vpx_highbd_8_variance16x16_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -unsigned int vpx_highbd_8_variance16x16_sse2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -RTCD_EXTERN unsigned int (*vpx_highbd_8_variance16x16)(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); - -unsigned int vpx_highbd_8_variance16x32_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -unsigned int vpx_highbd_8_variance16x32_sse2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -RTCD_EXTERN unsigned int (*vpx_highbd_8_variance16x32)(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); - -unsigned int vpx_highbd_8_variance16x8_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -unsigned int vpx_highbd_8_variance16x8_sse2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -RTCD_EXTERN unsigned int (*vpx_highbd_8_variance16x8)(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); - -unsigned int vpx_highbd_8_variance32x16_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -unsigned int vpx_highbd_8_variance32x16_sse2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -RTCD_EXTERN unsigned int (*vpx_highbd_8_variance32x16)(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); - -unsigned int vpx_highbd_8_variance32x32_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -unsigned int vpx_highbd_8_variance32x32_sse2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -RTCD_EXTERN unsigned int (*vpx_highbd_8_variance32x32)(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); - -unsigned int vpx_highbd_8_variance32x64_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -unsigned int vpx_highbd_8_variance32x64_sse2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -RTCD_EXTERN unsigned int (*vpx_highbd_8_variance32x64)(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); - -unsigned int vpx_highbd_8_variance4x4_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_highbd_8_variance4x4 vpx_highbd_8_variance4x4_c - -unsigned int vpx_highbd_8_variance4x8_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_highbd_8_variance4x8 vpx_highbd_8_variance4x8_c - -unsigned int vpx_highbd_8_variance64x32_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -unsigned int vpx_highbd_8_variance64x32_sse2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -RTCD_EXTERN unsigned int (*vpx_highbd_8_variance64x32)(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); - -unsigned int vpx_highbd_8_variance64x64_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -unsigned int vpx_highbd_8_variance64x64_sse2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -RTCD_EXTERN unsigned int (*vpx_highbd_8_variance64x64)(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); - -unsigned int vpx_highbd_8_variance8x16_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -unsigned int vpx_highbd_8_variance8x16_sse2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -RTCD_EXTERN unsigned int (*vpx_highbd_8_variance8x16)(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); - -unsigned int vpx_highbd_8_variance8x4_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_highbd_8_variance8x4 vpx_highbd_8_variance8x4_c - -unsigned int vpx_highbd_8_variance8x8_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -unsigned int vpx_highbd_8_variance8x8_sse2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -RTCD_EXTERN unsigned int (*vpx_highbd_8_variance8x8)(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); - -unsigned int vpx_highbd_avg_4x4_c(const uint8_t *, int p); -#define vpx_highbd_avg_4x4 vpx_highbd_avg_4x4_c - -unsigned int vpx_highbd_avg_8x8_c(const uint8_t *, int p); -#define vpx_highbd_avg_8x8 vpx_highbd_avg_8x8_c - -void vpx_highbd_comp_avg_pred_c(uint16_t *comp_pred, const uint8_t *pred8, int width, int height, const uint8_t *ref8, int ref_stride); -#define vpx_highbd_comp_avg_pred vpx_highbd_comp_avg_pred_c - -void vpx_highbd_convolve8_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h, int bps); -#define vpx_highbd_convolve8 vpx_highbd_convolve8_c - -void vpx_highbd_convolve8_avg_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h, int bps); -#define vpx_highbd_convolve8_avg vpx_highbd_convolve8_avg_c - -void vpx_highbd_convolve8_avg_horiz_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h, int bps); -#define vpx_highbd_convolve8_avg_horiz vpx_highbd_convolve8_avg_horiz_c - -void vpx_highbd_convolve8_avg_vert_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h, int bps); -#define vpx_highbd_convolve8_avg_vert vpx_highbd_convolve8_avg_vert_c - -void vpx_highbd_convolve8_horiz_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h, int bps); -#define vpx_highbd_convolve8_horiz vpx_highbd_convolve8_horiz_c - -void vpx_highbd_convolve8_vert_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h, int bps); -#define vpx_highbd_convolve8_vert vpx_highbd_convolve8_vert_c - -void vpx_highbd_convolve_avg_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h, int bps); -void vpx_highbd_convolve_avg_sse2(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h, int bps); -RTCD_EXTERN void (*vpx_highbd_convolve_avg)(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h, int bps); - -void vpx_highbd_convolve_copy_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h, int bps); -void vpx_highbd_convolve_copy_sse2(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h, int bps); -RTCD_EXTERN void (*vpx_highbd_convolve_copy)(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h, int bps); - -void vpx_highbd_d117_predictor_16x16_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_d117_predictor_16x16 vpx_highbd_d117_predictor_16x16_c - -void vpx_highbd_d117_predictor_32x32_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_d117_predictor_32x32 vpx_highbd_d117_predictor_32x32_c - -void vpx_highbd_d117_predictor_4x4_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_d117_predictor_4x4 vpx_highbd_d117_predictor_4x4_c - -void vpx_highbd_d117_predictor_8x8_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_d117_predictor_8x8 vpx_highbd_d117_predictor_8x8_c - -void vpx_highbd_d135_predictor_16x16_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_d135_predictor_16x16 vpx_highbd_d135_predictor_16x16_c - -void vpx_highbd_d135_predictor_32x32_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_d135_predictor_32x32 vpx_highbd_d135_predictor_32x32_c - -void vpx_highbd_d135_predictor_4x4_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_d135_predictor_4x4 vpx_highbd_d135_predictor_4x4_c - -void vpx_highbd_d135_predictor_8x8_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_d135_predictor_8x8 vpx_highbd_d135_predictor_8x8_c - -void vpx_highbd_d153_predictor_16x16_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_d153_predictor_16x16 vpx_highbd_d153_predictor_16x16_c - -void vpx_highbd_d153_predictor_32x32_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_d153_predictor_32x32 vpx_highbd_d153_predictor_32x32_c - -void vpx_highbd_d153_predictor_4x4_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_d153_predictor_4x4 vpx_highbd_d153_predictor_4x4_c - -void vpx_highbd_d153_predictor_8x8_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_d153_predictor_8x8 vpx_highbd_d153_predictor_8x8_c - -void vpx_highbd_d207_predictor_16x16_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_d207_predictor_16x16 vpx_highbd_d207_predictor_16x16_c - -void vpx_highbd_d207_predictor_32x32_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_d207_predictor_32x32 vpx_highbd_d207_predictor_32x32_c - -void vpx_highbd_d207_predictor_4x4_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_d207_predictor_4x4 vpx_highbd_d207_predictor_4x4_c - -void vpx_highbd_d207_predictor_8x8_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_d207_predictor_8x8 vpx_highbd_d207_predictor_8x8_c - -void vpx_highbd_d207e_predictor_16x16_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_d207e_predictor_16x16 vpx_highbd_d207e_predictor_16x16_c - -void vpx_highbd_d207e_predictor_32x32_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_d207e_predictor_32x32 vpx_highbd_d207e_predictor_32x32_c - -void vpx_highbd_d207e_predictor_4x4_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_d207e_predictor_4x4 vpx_highbd_d207e_predictor_4x4_c - -void vpx_highbd_d207e_predictor_8x8_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_d207e_predictor_8x8 vpx_highbd_d207e_predictor_8x8_c - -void vpx_highbd_d45_predictor_16x16_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_d45_predictor_16x16 vpx_highbd_d45_predictor_16x16_c - -void vpx_highbd_d45_predictor_32x32_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_d45_predictor_32x32 vpx_highbd_d45_predictor_32x32_c - -void vpx_highbd_d45_predictor_4x4_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_d45_predictor_4x4 vpx_highbd_d45_predictor_4x4_c - -void vpx_highbd_d45_predictor_8x8_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_d45_predictor_8x8 vpx_highbd_d45_predictor_8x8_c - -void vpx_highbd_d45e_predictor_16x16_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_d45e_predictor_16x16 vpx_highbd_d45e_predictor_16x16_c - -void vpx_highbd_d45e_predictor_32x32_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_d45e_predictor_32x32 vpx_highbd_d45e_predictor_32x32_c - -void vpx_highbd_d45e_predictor_4x4_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_d45e_predictor_4x4 vpx_highbd_d45e_predictor_4x4_c - -void vpx_highbd_d45e_predictor_8x8_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_d45e_predictor_8x8 vpx_highbd_d45e_predictor_8x8_c - -void vpx_highbd_d63_predictor_16x16_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_d63_predictor_16x16 vpx_highbd_d63_predictor_16x16_c - -void vpx_highbd_d63_predictor_32x32_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_d63_predictor_32x32 vpx_highbd_d63_predictor_32x32_c - -void vpx_highbd_d63_predictor_4x4_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_d63_predictor_4x4 vpx_highbd_d63_predictor_4x4_c - -void vpx_highbd_d63_predictor_8x8_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_d63_predictor_8x8 vpx_highbd_d63_predictor_8x8_c - -void vpx_highbd_d63e_predictor_16x16_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_d63e_predictor_16x16 vpx_highbd_d63e_predictor_16x16_c - -void vpx_highbd_d63e_predictor_32x32_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_d63e_predictor_32x32 vpx_highbd_d63e_predictor_32x32_c - -void vpx_highbd_d63e_predictor_4x4_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_d63e_predictor_4x4 vpx_highbd_d63e_predictor_4x4_c - -void vpx_highbd_d63e_predictor_8x8_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_d63e_predictor_8x8 vpx_highbd_d63e_predictor_8x8_c - -void vpx_highbd_dc_128_predictor_16x16_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_dc_128_predictor_16x16 vpx_highbd_dc_128_predictor_16x16_c - -void vpx_highbd_dc_128_predictor_32x32_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_dc_128_predictor_32x32 vpx_highbd_dc_128_predictor_32x32_c - -void vpx_highbd_dc_128_predictor_4x4_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_dc_128_predictor_4x4 vpx_highbd_dc_128_predictor_4x4_c - -void vpx_highbd_dc_128_predictor_8x8_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_dc_128_predictor_8x8 vpx_highbd_dc_128_predictor_8x8_c - -void vpx_highbd_dc_left_predictor_16x16_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_dc_left_predictor_16x16 vpx_highbd_dc_left_predictor_16x16_c - -void vpx_highbd_dc_left_predictor_32x32_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_dc_left_predictor_32x32 vpx_highbd_dc_left_predictor_32x32_c - -void vpx_highbd_dc_left_predictor_4x4_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_dc_left_predictor_4x4 vpx_highbd_dc_left_predictor_4x4_c - -void vpx_highbd_dc_left_predictor_8x8_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_dc_left_predictor_8x8 vpx_highbd_dc_left_predictor_8x8_c - -void vpx_highbd_dc_predictor_16x16_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -void vpx_highbd_dc_predictor_16x16_sse2(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -RTCD_EXTERN void (*vpx_highbd_dc_predictor_16x16)(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); - -void vpx_highbd_dc_predictor_32x32_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -void vpx_highbd_dc_predictor_32x32_sse2(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -RTCD_EXTERN void (*vpx_highbd_dc_predictor_32x32)(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); - -void vpx_highbd_dc_predictor_4x4_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -void vpx_highbd_dc_predictor_4x4_sse2(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -RTCD_EXTERN void (*vpx_highbd_dc_predictor_4x4)(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); - -void vpx_highbd_dc_predictor_8x8_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -void vpx_highbd_dc_predictor_8x8_sse2(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -RTCD_EXTERN void (*vpx_highbd_dc_predictor_8x8)(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); - -void vpx_highbd_dc_top_predictor_16x16_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_dc_top_predictor_16x16 vpx_highbd_dc_top_predictor_16x16_c - -void vpx_highbd_dc_top_predictor_32x32_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_dc_top_predictor_32x32 vpx_highbd_dc_top_predictor_32x32_c - -void vpx_highbd_dc_top_predictor_4x4_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_dc_top_predictor_4x4 vpx_highbd_dc_top_predictor_4x4_c - -void vpx_highbd_dc_top_predictor_8x8_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_dc_top_predictor_8x8 vpx_highbd_dc_top_predictor_8x8_c - -void vpx_highbd_fdct16x16_c(const int16_t *input, tran_low_t *output, int stride); -void vpx_highbd_fdct16x16_sse2(const int16_t *input, tran_low_t *output, int stride); -RTCD_EXTERN void (*vpx_highbd_fdct16x16)(const int16_t *input, tran_low_t *output, int stride); - -void vpx_highbd_fdct16x16_1_c(const int16_t *input, tran_low_t *output, int stride); -#define vpx_highbd_fdct16x16_1 vpx_highbd_fdct16x16_1_c - -void vpx_highbd_fdct32x32_c(const int16_t *input, tran_low_t *output, int stride); -void vpx_highbd_fdct32x32_sse2(const int16_t *input, tran_low_t *output, int stride); -RTCD_EXTERN void (*vpx_highbd_fdct32x32)(const int16_t *input, tran_low_t *output, int stride); - -void vpx_highbd_fdct32x32_1_c(const int16_t *input, tran_low_t *output, int stride); -#define vpx_highbd_fdct32x32_1 vpx_highbd_fdct32x32_1_c - -void vpx_highbd_fdct32x32_rd_c(const int16_t *input, tran_low_t *output, int stride); -void vpx_highbd_fdct32x32_rd_sse2(const int16_t *input, tran_low_t *output, int stride); -RTCD_EXTERN void (*vpx_highbd_fdct32x32_rd)(const int16_t *input, tran_low_t *output, int stride); - -void vpx_highbd_fdct4x4_c(const int16_t *input, tran_low_t *output, int stride); -void vpx_highbd_fdct4x4_sse2(const int16_t *input, tran_low_t *output, int stride); -RTCD_EXTERN void (*vpx_highbd_fdct4x4)(const int16_t *input, tran_low_t *output, int stride); - -void vpx_highbd_fdct8x8_c(const int16_t *input, tran_low_t *output, int stride); -void vpx_highbd_fdct8x8_sse2(const int16_t *input, tran_low_t *output, int stride); -RTCD_EXTERN void (*vpx_highbd_fdct8x8)(const int16_t *input, tran_low_t *output, int stride); - -void vpx_highbd_fdct8x8_1_c(const int16_t *input, tran_low_t *output, int stride); -#define vpx_highbd_fdct8x8_1 vpx_highbd_fdct8x8_1_c - -void vpx_highbd_h_predictor_16x16_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_h_predictor_16x16 vpx_highbd_h_predictor_16x16_c - -void vpx_highbd_h_predictor_32x32_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_h_predictor_32x32 vpx_highbd_h_predictor_32x32_c - -void vpx_highbd_h_predictor_4x4_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_h_predictor_4x4 vpx_highbd_h_predictor_4x4_c - -void vpx_highbd_h_predictor_8x8_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_h_predictor_8x8 vpx_highbd_h_predictor_8x8_c - -void vpx_highbd_idct16x16_10_add_c(const tran_low_t *input, uint8_t *dest, int stride, int bd); -void vpx_highbd_idct16x16_10_add_sse2(const tran_low_t *input, uint8_t *dest, int stride, int bd); -RTCD_EXTERN void (*vpx_highbd_idct16x16_10_add)(const tran_low_t *input, uint8_t *dest, int stride, int bd); - -void vpx_highbd_idct16x16_1_add_c(const tran_low_t *input, uint8_t *dest, int stride, int bd); -#define vpx_highbd_idct16x16_1_add vpx_highbd_idct16x16_1_add_c - -void vpx_highbd_idct16x16_256_add_c(const tran_low_t *input, uint8_t *dest, int stride, int bd); -void vpx_highbd_idct16x16_256_add_sse2(const tran_low_t *input, uint8_t *dest, int stride, int bd); -RTCD_EXTERN void (*vpx_highbd_idct16x16_256_add)(const tran_low_t *input, uint8_t *dest, int stride, int bd); - -void vpx_highbd_idct32x32_1024_add_c(const tran_low_t *input, uint8_t *dest, int stride, int bd); -#define vpx_highbd_idct32x32_1024_add vpx_highbd_idct32x32_1024_add_c - -void vpx_highbd_idct32x32_1_add_c(const tran_low_t *input, uint8_t *dest, int stride, int bd); -void vpx_highbd_idct32x32_1_add_sse2(const tran_low_t *input, uint8_t *dest, int stride, int bd); -RTCD_EXTERN void (*vpx_highbd_idct32x32_1_add)(const tran_low_t *input, uint8_t *dest, int stride, int bd); - -void vpx_highbd_idct32x32_34_add_c(const tran_low_t *input, uint8_t *dest, int stride, int bd); -#define vpx_highbd_idct32x32_34_add vpx_highbd_idct32x32_34_add_c - -void vpx_highbd_idct4x4_16_add_c(const tran_low_t *input, uint8_t *dest, int stride, int bd); -void vpx_highbd_idct4x4_16_add_sse2(const tran_low_t *input, uint8_t *dest, int stride, int bd); -RTCD_EXTERN void (*vpx_highbd_idct4x4_16_add)(const tran_low_t *input, uint8_t *dest, int stride, int bd); - -void vpx_highbd_idct4x4_1_add_c(const tran_low_t *input, uint8_t *dest, int stride, int bd); -#define vpx_highbd_idct4x4_1_add vpx_highbd_idct4x4_1_add_c - -void vpx_highbd_idct8x8_12_add_c(const tran_low_t *input, uint8_t *dest, int stride, int bd); -void vpx_highbd_idct8x8_12_add_sse2(const tran_low_t *input, uint8_t *dest, int stride, int bd); -RTCD_EXTERN void (*vpx_highbd_idct8x8_12_add)(const tran_low_t *input, uint8_t *dest, int stride, int bd); - -void vpx_highbd_idct8x8_1_add_c(const tran_low_t *input, uint8_t *dest, int stride, int bd); -#define vpx_highbd_idct8x8_1_add vpx_highbd_idct8x8_1_add_c - -void vpx_highbd_idct8x8_64_add_c(const tran_low_t *input, uint8_t *dest, int stride, int bd); -void vpx_highbd_idct8x8_64_add_sse2(const tran_low_t *input, uint8_t *dest, int stride, int bd); -RTCD_EXTERN void (*vpx_highbd_idct8x8_64_add)(const tran_low_t *input, uint8_t *dest, int stride, int bd); - -void vpx_highbd_iwht4x4_16_add_c(const tran_low_t *input, uint8_t *dest, int stride, int bd); -#define vpx_highbd_iwht4x4_16_add vpx_highbd_iwht4x4_16_add_c - -void vpx_highbd_iwht4x4_1_add_c(const tran_low_t *input, uint8_t *dest, int stride, int bd); -#define vpx_highbd_iwht4x4_1_add vpx_highbd_iwht4x4_1_add_c - -void vpx_highbd_lpf_horizontal_16_c(uint16_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh, int bd); -void vpx_highbd_lpf_horizontal_16_sse2(uint16_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh, int bd); -RTCD_EXTERN void (*vpx_highbd_lpf_horizontal_16)(uint16_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh, int bd); - -void vpx_highbd_lpf_horizontal_16_dual_c(uint16_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh, int bd); -void vpx_highbd_lpf_horizontal_16_dual_sse2(uint16_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh, int bd); -RTCD_EXTERN void (*vpx_highbd_lpf_horizontal_16_dual)(uint16_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh, int bd); - -void vpx_highbd_lpf_horizontal_4_c(uint16_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh, int bd); -void vpx_highbd_lpf_horizontal_4_sse2(uint16_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh, int bd); -RTCD_EXTERN void (*vpx_highbd_lpf_horizontal_4)(uint16_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh, int bd); - -void vpx_highbd_lpf_horizontal_4_dual_c(uint16_t *s, int pitch, const uint8_t *blimit0, const uint8_t *limit0, const uint8_t *thresh0, const uint8_t *blimit1, const uint8_t *limit1, const uint8_t *thresh1, int bd); -void vpx_highbd_lpf_horizontal_4_dual_sse2(uint16_t *s, int pitch, const uint8_t *blimit0, const uint8_t *limit0, const uint8_t *thresh0, const uint8_t *blimit1, const uint8_t *limit1, const uint8_t *thresh1, int bd); -RTCD_EXTERN void (*vpx_highbd_lpf_horizontal_4_dual)(uint16_t *s, int pitch, const uint8_t *blimit0, const uint8_t *limit0, const uint8_t *thresh0, const uint8_t *blimit1, const uint8_t *limit1, const uint8_t *thresh1, int bd); - -void vpx_highbd_lpf_horizontal_8_c(uint16_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh, int bd); -void vpx_highbd_lpf_horizontal_8_sse2(uint16_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh, int bd); -RTCD_EXTERN void (*vpx_highbd_lpf_horizontal_8)(uint16_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh, int bd); - -void vpx_highbd_lpf_horizontal_8_dual_c(uint16_t *s, int pitch, const uint8_t *blimit0, const uint8_t *limit0, const uint8_t *thresh0, const uint8_t *blimit1, const uint8_t *limit1, const uint8_t *thresh1, int bd); -void vpx_highbd_lpf_horizontal_8_dual_sse2(uint16_t *s, int pitch, const uint8_t *blimit0, const uint8_t *limit0, const uint8_t *thresh0, const uint8_t *blimit1, const uint8_t *limit1, const uint8_t *thresh1, int bd); -RTCD_EXTERN void (*vpx_highbd_lpf_horizontal_8_dual)(uint16_t *s, int pitch, const uint8_t *blimit0, const uint8_t *limit0, const uint8_t *thresh0, const uint8_t *blimit1, const uint8_t *limit1, const uint8_t *thresh1, int bd); - -void vpx_highbd_lpf_vertical_16_c(uint16_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh, int bd); -void vpx_highbd_lpf_vertical_16_sse2(uint16_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh, int bd); -RTCD_EXTERN void (*vpx_highbd_lpf_vertical_16)(uint16_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh, int bd); - -void vpx_highbd_lpf_vertical_16_dual_c(uint16_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh, int bd); -void vpx_highbd_lpf_vertical_16_dual_sse2(uint16_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh, int bd); -RTCD_EXTERN void (*vpx_highbd_lpf_vertical_16_dual)(uint16_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh, int bd); - -void vpx_highbd_lpf_vertical_4_c(uint16_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh, int bd); -void vpx_highbd_lpf_vertical_4_sse2(uint16_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh, int bd); -RTCD_EXTERN void (*vpx_highbd_lpf_vertical_4)(uint16_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh, int bd); - -void vpx_highbd_lpf_vertical_4_dual_c(uint16_t *s, int pitch, const uint8_t *blimit0, const uint8_t *limit0, const uint8_t *thresh0, const uint8_t *blimit1, const uint8_t *limit1, const uint8_t *thresh1, int bd); -void vpx_highbd_lpf_vertical_4_dual_sse2(uint16_t *s, int pitch, const uint8_t *blimit0, const uint8_t *limit0, const uint8_t *thresh0, const uint8_t *blimit1, const uint8_t *limit1, const uint8_t *thresh1, int bd); -RTCD_EXTERN void (*vpx_highbd_lpf_vertical_4_dual)(uint16_t *s, int pitch, const uint8_t *blimit0, const uint8_t *limit0, const uint8_t *thresh0, const uint8_t *blimit1, const uint8_t *limit1, const uint8_t *thresh1, int bd); - -void vpx_highbd_lpf_vertical_8_c(uint16_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh, int bd); -void vpx_highbd_lpf_vertical_8_sse2(uint16_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh, int bd); -RTCD_EXTERN void (*vpx_highbd_lpf_vertical_8)(uint16_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh, int bd); - -void vpx_highbd_lpf_vertical_8_dual_c(uint16_t *s, int pitch, const uint8_t *blimit0, const uint8_t *limit0, const uint8_t *thresh0, const uint8_t *blimit1, const uint8_t *limit1, const uint8_t *thresh1, int bd); -void vpx_highbd_lpf_vertical_8_dual_sse2(uint16_t *s, int pitch, const uint8_t *blimit0, const uint8_t *limit0, const uint8_t *thresh0, const uint8_t *blimit1, const uint8_t *limit1, const uint8_t *thresh1, int bd); -RTCD_EXTERN void (*vpx_highbd_lpf_vertical_8_dual)(uint16_t *s, int pitch, const uint8_t *blimit0, const uint8_t *limit0, const uint8_t *thresh0, const uint8_t *blimit1, const uint8_t *limit1, const uint8_t *thresh1, int bd); - -void vpx_highbd_minmax_8x8_c(const uint8_t *s, int p, const uint8_t *d, int dp, int *min, int *max); -#define vpx_highbd_minmax_8x8 vpx_highbd_minmax_8x8_c - -void vpx_highbd_quantize_b_c(const tran_low_t *coeff_ptr, intptr_t n_coeffs, int skip_block, const int16_t *zbin_ptr, const int16_t *round_ptr, const int16_t *quant_ptr, const int16_t *quant_shift_ptr, tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr, const int16_t *dequant_ptr, uint16_t *eob_ptr, const int16_t *scan, const int16_t *iscan); -void vpx_highbd_quantize_b_sse2(const tran_low_t *coeff_ptr, intptr_t n_coeffs, int skip_block, const int16_t *zbin_ptr, const int16_t *round_ptr, const int16_t *quant_ptr, const int16_t *quant_shift_ptr, tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr, const int16_t *dequant_ptr, uint16_t *eob_ptr, const int16_t *scan, const int16_t *iscan); -RTCD_EXTERN void (*vpx_highbd_quantize_b)(const tran_low_t *coeff_ptr, intptr_t n_coeffs, int skip_block, const int16_t *zbin_ptr, const int16_t *round_ptr, const int16_t *quant_ptr, const int16_t *quant_shift_ptr, tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr, const int16_t *dequant_ptr, uint16_t *eob_ptr, const int16_t *scan, const int16_t *iscan); - -void vpx_highbd_quantize_b_32x32_c(const tran_low_t *coeff_ptr, intptr_t n_coeffs, int skip_block, const int16_t *zbin_ptr, const int16_t *round_ptr, const int16_t *quant_ptr, const int16_t *quant_shift_ptr, tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr, const int16_t *dequant_ptr, uint16_t *eob_ptr, const int16_t *scan, const int16_t *iscan); -void vpx_highbd_quantize_b_32x32_sse2(const tran_low_t *coeff_ptr, intptr_t n_coeffs, int skip_block, const int16_t *zbin_ptr, const int16_t *round_ptr, const int16_t *quant_ptr, const int16_t *quant_shift_ptr, tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr, const int16_t *dequant_ptr, uint16_t *eob_ptr, const int16_t *scan, const int16_t *iscan); -RTCD_EXTERN void (*vpx_highbd_quantize_b_32x32)(const tran_low_t *coeff_ptr, intptr_t n_coeffs, int skip_block, const int16_t *zbin_ptr, const int16_t *round_ptr, const int16_t *quant_ptr, const int16_t *quant_shift_ptr, tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr, const int16_t *dequant_ptr, uint16_t *eob_ptr, const int16_t *scan, const int16_t *iscan); - -unsigned int vpx_highbd_sad16x16_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -unsigned int vpx_highbd_sad16x16_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -RTCD_EXTERN unsigned int (*vpx_highbd_sad16x16)(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); - -unsigned int vpx_highbd_sad16x16_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -unsigned int vpx_highbd_sad16x16_avg_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -RTCD_EXTERN unsigned int (*vpx_highbd_sad16x16_avg)(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); - -void vpx_highbd_sad16x16x3_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -#define vpx_highbd_sad16x16x3 vpx_highbd_sad16x16x3_c - -void vpx_highbd_sad16x16x4d_c(const uint8_t *src_ptr, int src_stride, const uint8_t* const ref_ptr[], int ref_stride, uint32_t *sad_array); -void vpx_highbd_sad16x16x4d_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t* const ref_ptr[], int ref_stride, uint32_t *sad_array); -RTCD_EXTERN void (*vpx_highbd_sad16x16x4d)(const uint8_t *src_ptr, int src_stride, const uint8_t* const ref_ptr[], int ref_stride, uint32_t *sad_array); - -void vpx_highbd_sad16x16x8_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -#define vpx_highbd_sad16x16x8 vpx_highbd_sad16x16x8_c - -unsigned int vpx_highbd_sad16x32_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -unsigned int vpx_highbd_sad16x32_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -RTCD_EXTERN unsigned int (*vpx_highbd_sad16x32)(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); - -unsigned int vpx_highbd_sad16x32_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -unsigned int vpx_highbd_sad16x32_avg_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -RTCD_EXTERN unsigned int (*vpx_highbd_sad16x32_avg)(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); - -void vpx_highbd_sad16x32x4d_c(const uint8_t *src_ptr, int src_stride, const uint8_t* const ref_ptr[], int ref_stride, uint32_t *sad_array); -void vpx_highbd_sad16x32x4d_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t* const ref_ptr[], int ref_stride, uint32_t *sad_array); -RTCD_EXTERN void (*vpx_highbd_sad16x32x4d)(const uint8_t *src_ptr, int src_stride, const uint8_t* const ref_ptr[], int ref_stride, uint32_t *sad_array); - -unsigned int vpx_highbd_sad16x8_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -unsigned int vpx_highbd_sad16x8_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -RTCD_EXTERN unsigned int (*vpx_highbd_sad16x8)(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); - -unsigned int vpx_highbd_sad16x8_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -unsigned int vpx_highbd_sad16x8_avg_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -RTCD_EXTERN unsigned int (*vpx_highbd_sad16x8_avg)(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); - -void vpx_highbd_sad16x8x3_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -#define vpx_highbd_sad16x8x3 vpx_highbd_sad16x8x3_c - -void vpx_highbd_sad16x8x4d_c(const uint8_t *src_ptr, int src_stride, const uint8_t* const ref_ptr[], int ref_stride, uint32_t *sad_array); -void vpx_highbd_sad16x8x4d_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t* const ref_ptr[], int ref_stride, uint32_t *sad_array); -RTCD_EXTERN void (*vpx_highbd_sad16x8x4d)(const uint8_t *src_ptr, int src_stride, const uint8_t* const ref_ptr[], int ref_stride, uint32_t *sad_array); - -void vpx_highbd_sad16x8x8_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -#define vpx_highbd_sad16x8x8 vpx_highbd_sad16x8x8_c - -unsigned int vpx_highbd_sad32x16_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -unsigned int vpx_highbd_sad32x16_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -RTCD_EXTERN unsigned int (*vpx_highbd_sad32x16)(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); - -unsigned int vpx_highbd_sad32x16_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -unsigned int vpx_highbd_sad32x16_avg_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -RTCD_EXTERN unsigned int (*vpx_highbd_sad32x16_avg)(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); - -void vpx_highbd_sad32x16x4d_c(const uint8_t *src_ptr, int src_stride, const uint8_t* const ref_ptr[], int ref_stride, uint32_t *sad_array); -void vpx_highbd_sad32x16x4d_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t* const ref_ptr[], int ref_stride, uint32_t *sad_array); -RTCD_EXTERN void (*vpx_highbd_sad32x16x4d)(const uint8_t *src_ptr, int src_stride, const uint8_t* const ref_ptr[], int ref_stride, uint32_t *sad_array); - -unsigned int vpx_highbd_sad32x32_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -unsigned int vpx_highbd_sad32x32_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -RTCD_EXTERN unsigned int (*vpx_highbd_sad32x32)(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); - -unsigned int vpx_highbd_sad32x32_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -unsigned int vpx_highbd_sad32x32_avg_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -RTCD_EXTERN unsigned int (*vpx_highbd_sad32x32_avg)(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); - -void vpx_highbd_sad32x32x3_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -#define vpx_highbd_sad32x32x3 vpx_highbd_sad32x32x3_c - -void vpx_highbd_sad32x32x4d_c(const uint8_t *src_ptr, int src_stride, const uint8_t* const ref_ptr[], int ref_stride, uint32_t *sad_array); -void vpx_highbd_sad32x32x4d_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t* const ref_ptr[], int ref_stride, uint32_t *sad_array); -RTCD_EXTERN void (*vpx_highbd_sad32x32x4d)(const uint8_t *src_ptr, int src_stride, const uint8_t* const ref_ptr[], int ref_stride, uint32_t *sad_array); - -void vpx_highbd_sad32x32x8_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -#define vpx_highbd_sad32x32x8 vpx_highbd_sad32x32x8_c - -unsigned int vpx_highbd_sad32x64_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -unsigned int vpx_highbd_sad32x64_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -RTCD_EXTERN unsigned int (*vpx_highbd_sad32x64)(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); - -unsigned int vpx_highbd_sad32x64_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -unsigned int vpx_highbd_sad32x64_avg_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -RTCD_EXTERN unsigned int (*vpx_highbd_sad32x64_avg)(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); - -void vpx_highbd_sad32x64x4d_c(const uint8_t *src_ptr, int src_stride, const uint8_t* const ref_ptr[], int ref_stride, uint32_t *sad_array); -void vpx_highbd_sad32x64x4d_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t* const ref_ptr[], int ref_stride, uint32_t *sad_array); -RTCD_EXTERN void (*vpx_highbd_sad32x64x4d)(const uint8_t *src_ptr, int src_stride, const uint8_t* const ref_ptr[], int ref_stride, uint32_t *sad_array); - -unsigned int vpx_highbd_sad4x4_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -#define vpx_highbd_sad4x4 vpx_highbd_sad4x4_c - -unsigned int vpx_highbd_sad4x4_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -#define vpx_highbd_sad4x4_avg vpx_highbd_sad4x4_avg_c - -void vpx_highbd_sad4x4x3_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -#define vpx_highbd_sad4x4x3 vpx_highbd_sad4x4x3_c - -void vpx_highbd_sad4x4x4d_c(const uint8_t *src_ptr, int src_stride, const uint8_t* const ref_ptr[], int ref_stride, uint32_t *sad_array); -void vpx_highbd_sad4x4x4d_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t* const ref_ptr[], int ref_stride, uint32_t *sad_array); -RTCD_EXTERN void (*vpx_highbd_sad4x4x4d)(const uint8_t *src_ptr, int src_stride, const uint8_t* const ref_ptr[], int ref_stride, uint32_t *sad_array); - -void vpx_highbd_sad4x4x8_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -#define vpx_highbd_sad4x4x8 vpx_highbd_sad4x4x8_c - -unsigned int vpx_highbd_sad4x8_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -#define vpx_highbd_sad4x8 vpx_highbd_sad4x8_c - -unsigned int vpx_highbd_sad4x8_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -#define vpx_highbd_sad4x8_avg vpx_highbd_sad4x8_avg_c - -void vpx_highbd_sad4x8x4d_c(const uint8_t *src_ptr, int src_stride, const uint8_t* const ref_ptr[], int ref_stride, uint32_t *sad_array); -void vpx_highbd_sad4x8x4d_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t* const ref_ptr[], int ref_stride, uint32_t *sad_array); -RTCD_EXTERN void (*vpx_highbd_sad4x8x4d)(const uint8_t *src_ptr, int src_stride, const uint8_t* const ref_ptr[], int ref_stride, uint32_t *sad_array); - -void vpx_highbd_sad4x8x8_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -#define vpx_highbd_sad4x8x8 vpx_highbd_sad4x8x8_c - -unsigned int vpx_highbd_sad64x32_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -unsigned int vpx_highbd_sad64x32_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -RTCD_EXTERN unsigned int (*vpx_highbd_sad64x32)(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); - -unsigned int vpx_highbd_sad64x32_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -unsigned int vpx_highbd_sad64x32_avg_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -RTCD_EXTERN unsigned int (*vpx_highbd_sad64x32_avg)(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); - -void vpx_highbd_sad64x32x4d_c(const uint8_t *src_ptr, int src_stride, const uint8_t* const ref_ptr[], int ref_stride, uint32_t *sad_array); -void vpx_highbd_sad64x32x4d_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t* const ref_ptr[], int ref_stride, uint32_t *sad_array); -RTCD_EXTERN void (*vpx_highbd_sad64x32x4d)(const uint8_t *src_ptr, int src_stride, const uint8_t* const ref_ptr[], int ref_stride, uint32_t *sad_array); - -unsigned int vpx_highbd_sad64x64_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -unsigned int vpx_highbd_sad64x64_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -RTCD_EXTERN unsigned int (*vpx_highbd_sad64x64)(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); - -unsigned int vpx_highbd_sad64x64_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -unsigned int vpx_highbd_sad64x64_avg_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -RTCD_EXTERN unsigned int (*vpx_highbd_sad64x64_avg)(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); - -void vpx_highbd_sad64x64x3_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -#define vpx_highbd_sad64x64x3 vpx_highbd_sad64x64x3_c - -void vpx_highbd_sad64x64x4d_c(const uint8_t *src_ptr, int src_stride, const uint8_t* const ref_ptr[], int ref_stride, uint32_t *sad_array); -void vpx_highbd_sad64x64x4d_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t* const ref_ptr[], int ref_stride, uint32_t *sad_array); -RTCD_EXTERN void (*vpx_highbd_sad64x64x4d)(const uint8_t *src_ptr, int src_stride, const uint8_t* const ref_ptr[], int ref_stride, uint32_t *sad_array); - -void vpx_highbd_sad64x64x8_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -#define vpx_highbd_sad64x64x8 vpx_highbd_sad64x64x8_c - -unsigned int vpx_highbd_sad8x16_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -unsigned int vpx_highbd_sad8x16_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -RTCD_EXTERN unsigned int (*vpx_highbd_sad8x16)(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); - -unsigned int vpx_highbd_sad8x16_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -unsigned int vpx_highbd_sad8x16_avg_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -RTCD_EXTERN unsigned int (*vpx_highbd_sad8x16_avg)(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); - -void vpx_highbd_sad8x16x3_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -#define vpx_highbd_sad8x16x3 vpx_highbd_sad8x16x3_c - -void vpx_highbd_sad8x16x4d_c(const uint8_t *src_ptr, int src_stride, const uint8_t* const ref_ptr[], int ref_stride, uint32_t *sad_array); -void vpx_highbd_sad8x16x4d_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t* const ref_ptr[], int ref_stride, uint32_t *sad_array); -RTCD_EXTERN void (*vpx_highbd_sad8x16x4d)(const uint8_t *src_ptr, int src_stride, const uint8_t* const ref_ptr[], int ref_stride, uint32_t *sad_array); - -void vpx_highbd_sad8x16x8_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -#define vpx_highbd_sad8x16x8 vpx_highbd_sad8x16x8_c - -unsigned int vpx_highbd_sad8x4_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -unsigned int vpx_highbd_sad8x4_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -RTCD_EXTERN unsigned int (*vpx_highbd_sad8x4)(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); - -unsigned int vpx_highbd_sad8x4_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -unsigned int vpx_highbd_sad8x4_avg_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -RTCD_EXTERN unsigned int (*vpx_highbd_sad8x4_avg)(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); - -void vpx_highbd_sad8x4x4d_c(const uint8_t *src_ptr, int src_stride, const uint8_t* const ref_ptr[], int ref_stride, uint32_t *sad_array); -void vpx_highbd_sad8x4x4d_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t* const ref_ptr[], int ref_stride, uint32_t *sad_array); -RTCD_EXTERN void (*vpx_highbd_sad8x4x4d)(const uint8_t *src_ptr, int src_stride, const uint8_t* const ref_ptr[], int ref_stride, uint32_t *sad_array); - -void vpx_highbd_sad8x4x8_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -#define vpx_highbd_sad8x4x8 vpx_highbd_sad8x4x8_c - -unsigned int vpx_highbd_sad8x8_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -unsigned int vpx_highbd_sad8x8_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -RTCD_EXTERN unsigned int (*vpx_highbd_sad8x8)(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); - -unsigned int vpx_highbd_sad8x8_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -unsigned int vpx_highbd_sad8x8_avg_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -RTCD_EXTERN unsigned int (*vpx_highbd_sad8x8_avg)(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); - -void vpx_highbd_sad8x8x3_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -#define vpx_highbd_sad8x8x3 vpx_highbd_sad8x8x3_c - -void vpx_highbd_sad8x8x4d_c(const uint8_t *src_ptr, int src_stride, const uint8_t* const ref_ptr[], int ref_stride, uint32_t *sad_array); -void vpx_highbd_sad8x8x4d_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t* const ref_ptr[], int ref_stride, uint32_t *sad_array); -RTCD_EXTERN void (*vpx_highbd_sad8x8x4d)(const uint8_t *src_ptr, int src_stride, const uint8_t* const ref_ptr[], int ref_stride, uint32_t *sad_array); - -void vpx_highbd_sad8x8x8_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -#define vpx_highbd_sad8x8x8 vpx_highbd_sad8x8x8_c - -void vpx_highbd_subtract_block_c(int rows, int cols, int16_t *diff_ptr, ptrdiff_t diff_stride, const uint8_t *src_ptr, ptrdiff_t src_stride, const uint8_t *pred_ptr, ptrdiff_t pred_stride, int bd); -#define vpx_highbd_subtract_block vpx_highbd_subtract_block_c - -void vpx_highbd_tm_predictor_16x16_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -void vpx_highbd_tm_predictor_16x16_sse2(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -RTCD_EXTERN void (*vpx_highbd_tm_predictor_16x16)(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); - -void vpx_highbd_tm_predictor_32x32_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -void vpx_highbd_tm_predictor_32x32_sse2(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -RTCD_EXTERN void (*vpx_highbd_tm_predictor_32x32)(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); - -void vpx_highbd_tm_predictor_4x4_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -void vpx_highbd_tm_predictor_4x4_sse2(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -RTCD_EXTERN void (*vpx_highbd_tm_predictor_4x4)(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); - -void vpx_highbd_tm_predictor_8x8_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -void vpx_highbd_tm_predictor_8x8_sse2(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -RTCD_EXTERN void (*vpx_highbd_tm_predictor_8x8)(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); - -void vpx_highbd_v_predictor_16x16_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -void vpx_highbd_v_predictor_16x16_sse2(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -RTCD_EXTERN void (*vpx_highbd_v_predictor_16x16)(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); - -void vpx_highbd_v_predictor_32x32_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -void vpx_highbd_v_predictor_32x32_sse2(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -RTCD_EXTERN void (*vpx_highbd_v_predictor_32x32)(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); - -void vpx_highbd_v_predictor_4x4_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -void vpx_highbd_v_predictor_4x4_sse2(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -RTCD_EXTERN void (*vpx_highbd_v_predictor_4x4)(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); - -void vpx_highbd_v_predictor_8x8_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -void vpx_highbd_v_predictor_8x8_sse2(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -RTCD_EXTERN void (*vpx_highbd_v_predictor_8x8)(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); - -void vpx_idct16x16_10_add_c(const tran_low_t *input, uint8_t *dest, int stride); -void vpx_idct16x16_10_add_sse2(const tran_low_t *input, uint8_t *dest, int stride); -RTCD_EXTERN void (*vpx_idct16x16_10_add)(const tran_low_t *input, uint8_t *dest, int stride); - -void vpx_idct16x16_1_add_c(const tran_low_t *input, uint8_t *dest, int stride); -void vpx_idct16x16_1_add_sse2(const tran_low_t *input, uint8_t *dest, int stride); -RTCD_EXTERN void (*vpx_idct16x16_1_add)(const tran_low_t *input, uint8_t *dest, int stride); - -void vpx_idct16x16_256_add_c(const tran_low_t *input, uint8_t *dest, int stride); -void vpx_idct16x16_256_add_sse2(const tran_low_t *input, uint8_t *dest, int stride); -RTCD_EXTERN void (*vpx_idct16x16_256_add)(const tran_low_t *input, uint8_t *dest, int stride); - -void vpx_idct32x32_1024_add_c(const tran_low_t *input, uint8_t *dest, int stride); -void vpx_idct32x32_1024_add_sse2(const tran_low_t *input, uint8_t *dest, int stride); -RTCD_EXTERN void (*vpx_idct32x32_1024_add)(const tran_low_t *input, uint8_t *dest, int stride); - -void vpx_idct32x32_135_add_c(const tran_low_t *input, uint8_t *dest, int stride); -void vpx_idct32x32_1024_add_sse2(const tran_low_t *input, uint8_t *dest, int stride); -RTCD_EXTERN void (*vpx_idct32x32_135_add)(const tran_low_t *input, uint8_t *dest, int stride); - -void vpx_idct32x32_1_add_c(const tran_low_t *input, uint8_t *dest, int stride); -void vpx_idct32x32_1_add_sse2(const tran_low_t *input, uint8_t *dest, int stride); -RTCD_EXTERN void (*vpx_idct32x32_1_add)(const tran_low_t *input, uint8_t *dest, int stride); - -void vpx_idct32x32_34_add_c(const tran_low_t *input, uint8_t *dest, int stride); -void vpx_idct32x32_34_add_sse2(const tran_low_t *input, uint8_t *dest, int stride); -RTCD_EXTERN void (*vpx_idct32x32_34_add)(const tran_low_t *input, uint8_t *dest, int stride); - -void vpx_idct4x4_16_add_c(const tran_low_t *input, uint8_t *dest, int stride); -void vpx_idct4x4_16_add_sse2(const tran_low_t *input, uint8_t *dest, int stride); -RTCD_EXTERN void (*vpx_idct4x4_16_add)(const tran_low_t *input, uint8_t *dest, int stride); - -void vpx_idct4x4_1_add_c(const tran_low_t *input, uint8_t *dest, int stride); -void vpx_idct4x4_1_add_sse2(const tran_low_t *input, uint8_t *dest, int stride); -RTCD_EXTERN void (*vpx_idct4x4_1_add)(const tran_low_t *input, uint8_t *dest, int stride); - -void vpx_idct8x8_12_add_c(const tran_low_t *input, uint8_t *dest, int stride); -void vpx_idct8x8_12_add_sse2(const tran_low_t *input, uint8_t *dest, int stride); -RTCD_EXTERN void (*vpx_idct8x8_12_add)(const tran_low_t *input, uint8_t *dest, int stride); - -void vpx_idct8x8_1_add_c(const tran_low_t *input, uint8_t *dest, int stride); -void vpx_idct8x8_1_add_sse2(const tran_low_t *input, uint8_t *dest, int stride); -RTCD_EXTERN void (*vpx_idct8x8_1_add)(const tran_low_t *input, uint8_t *dest, int stride); - -void vpx_idct8x8_64_add_c(const tran_low_t *input, uint8_t *dest, int stride); -void vpx_idct8x8_64_add_sse2(const tran_low_t *input, uint8_t *dest, int stride); -RTCD_EXTERN void (*vpx_idct8x8_64_add)(const tran_low_t *input, uint8_t *dest, int stride); - -int16_t vpx_int_pro_col_c(const uint8_t *ref, const int width); -int16_t vpx_int_pro_col_sse2(const uint8_t *ref, const int width); -RTCD_EXTERN int16_t (*vpx_int_pro_col)(const uint8_t *ref, const int width); - -void vpx_int_pro_row_c(int16_t *hbuf, const uint8_t *ref, const int ref_stride, const int height); -void vpx_int_pro_row_sse2(int16_t *hbuf, const uint8_t *ref, const int ref_stride, const int height); -RTCD_EXTERN void (*vpx_int_pro_row)(int16_t *hbuf, const uint8_t *ref, const int ref_stride, const int height); - -void vpx_iwht4x4_16_add_c(const tran_low_t *input, uint8_t *dest, int stride); -void vpx_iwht4x4_16_add_sse2(const tran_low_t *input, uint8_t *dest, int stride); -RTCD_EXTERN void (*vpx_iwht4x4_16_add)(const tran_low_t *input, uint8_t *dest, int stride); - -void vpx_iwht4x4_1_add_c(const tran_low_t *input, uint8_t *dest, int stride); -#define vpx_iwht4x4_1_add vpx_iwht4x4_1_add_c - -void vpx_lpf_horizontal_16_c(uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh); -void vpx_lpf_horizontal_16_sse2(uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh); -void vpx_lpf_horizontal_16_avx2(uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh); -RTCD_EXTERN void (*vpx_lpf_horizontal_16)(uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh); - -void vpx_lpf_horizontal_16_dual_c(uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh); -void vpx_lpf_horizontal_16_dual_sse2(uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh); -void vpx_lpf_horizontal_16_dual_avx2(uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh); -RTCD_EXTERN void (*vpx_lpf_horizontal_16_dual)(uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh); - -void vpx_lpf_horizontal_4_c(uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh); -void vpx_lpf_horizontal_4_sse2(uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh); -RTCD_EXTERN void (*vpx_lpf_horizontal_4)(uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh); - -void vpx_lpf_horizontal_4_dual_c(uint8_t *s, int pitch, const uint8_t *blimit0, const uint8_t *limit0, const uint8_t *thresh0, const uint8_t *blimit1, const uint8_t *limit1, const uint8_t *thresh1); -void vpx_lpf_horizontal_4_dual_sse2(uint8_t *s, int pitch, const uint8_t *blimit0, const uint8_t *limit0, const uint8_t *thresh0, const uint8_t *blimit1, const uint8_t *limit1, const uint8_t *thresh1); -RTCD_EXTERN void (*vpx_lpf_horizontal_4_dual)(uint8_t *s, int pitch, const uint8_t *blimit0, const uint8_t *limit0, const uint8_t *thresh0, const uint8_t *blimit1, const uint8_t *limit1, const uint8_t *thresh1); - -void vpx_lpf_horizontal_8_c(uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh); -void vpx_lpf_horizontal_8_sse2(uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh); -RTCD_EXTERN void (*vpx_lpf_horizontal_8)(uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh); - -void vpx_lpf_horizontal_8_dual_c(uint8_t *s, int pitch, const uint8_t *blimit0, const uint8_t *limit0, const uint8_t *thresh0, const uint8_t *blimit1, const uint8_t *limit1, const uint8_t *thresh1); -void vpx_lpf_horizontal_8_dual_sse2(uint8_t *s, int pitch, const uint8_t *blimit0, const uint8_t *limit0, const uint8_t *thresh0, const uint8_t *blimit1, const uint8_t *limit1, const uint8_t *thresh1); -RTCD_EXTERN void (*vpx_lpf_horizontal_8_dual)(uint8_t *s, int pitch, const uint8_t *blimit0, const uint8_t *limit0, const uint8_t *thresh0, const uint8_t *blimit1, const uint8_t *limit1, const uint8_t *thresh1); - -void vpx_lpf_vertical_16_c(uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh); -void vpx_lpf_vertical_16_sse2(uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh); -RTCD_EXTERN void (*vpx_lpf_vertical_16)(uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh); - -void vpx_lpf_vertical_16_dual_c(uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh); -void vpx_lpf_vertical_16_dual_sse2(uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh); -RTCD_EXTERN void (*vpx_lpf_vertical_16_dual)(uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh); - -void vpx_lpf_vertical_4_c(uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh); -void vpx_lpf_vertical_4_sse2(uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh); -RTCD_EXTERN void (*vpx_lpf_vertical_4)(uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh); - -void vpx_lpf_vertical_4_dual_c(uint8_t *s, int pitch, const uint8_t *blimit0, const uint8_t *limit0, const uint8_t *thresh0, const uint8_t *blimit1, const uint8_t *limit1, const uint8_t *thresh1); -void vpx_lpf_vertical_4_dual_sse2(uint8_t *s, int pitch, const uint8_t *blimit0, const uint8_t *limit0, const uint8_t *thresh0, const uint8_t *blimit1, const uint8_t *limit1, const uint8_t *thresh1); -RTCD_EXTERN void (*vpx_lpf_vertical_4_dual)(uint8_t *s, int pitch, const uint8_t *blimit0, const uint8_t *limit0, const uint8_t *thresh0, const uint8_t *blimit1, const uint8_t *limit1, const uint8_t *thresh1); - -void vpx_lpf_vertical_8_c(uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh); -void vpx_lpf_vertical_8_sse2(uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh); -RTCD_EXTERN void (*vpx_lpf_vertical_8)(uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh); - -void vpx_lpf_vertical_8_dual_c(uint8_t *s, int pitch, const uint8_t *blimit0, const uint8_t *limit0, const uint8_t *thresh0, const uint8_t *blimit1, const uint8_t *limit1, const uint8_t *thresh1); -void vpx_lpf_vertical_8_dual_sse2(uint8_t *s, int pitch, const uint8_t *blimit0, const uint8_t *limit0, const uint8_t *thresh0, const uint8_t *blimit1, const uint8_t *limit1, const uint8_t *thresh1); -RTCD_EXTERN void (*vpx_lpf_vertical_8_dual)(uint8_t *s, int pitch, const uint8_t *blimit0, const uint8_t *limit0, const uint8_t *thresh0, const uint8_t *blimit1, const uint8_t *limit1, const uint8_t *thresh1); - -void vpx_mbpost_proc_across_ip_c(unsigned char *dst, int pitch, int rows, int cols,int flimit); -void vpx_mbpost_proc_across_ip_sse2(unsigned char *dst, int pitch, int rows, int cols,int flimit); -RTCD_EXTERN void (*vpx_mbpost_proc_across_ip)(unsigned char *dst, int pitch, int rows, int cols,int flimit); - -void vpx_mbpost_proc_down_c(unsigned char *dst, int pitch, int rows, int cols,int flimit); -void vpx_mbpost_proc_down_sse2(unsigned char *dst, int pitch, int rows, int cols,int flimit); -RTCD_EXTERN void (*vpx_mbpost_proc_down)(unsigned char *dst, int pitch, int rows, int cols,int flimit); - -void vpx_minmax_8x8_c(const uint8_t *s, int p, const uint8_t *d, int dp, int *min, int *max); -void vpx_minmax_8x8_sse2(const uint8_t *s, int p, const uint8_t *d, int dp, int *min, int *max); -RTCD_EXTERN void (*vpx_minmax_8x8)(const uint8_t *s, int p, const uint8_t *d, int dp, int *min, int *max); - -unsigned int vpx_mse16x16_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int recon_stride, unsigned int *sse); -unsigned int vpx_mse16x16_sse2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int recon_stride, unsigned int *sse); -unsigned int vpx_mse16x16_avx2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int recon_stride, unsigned int *sse); -RTCD_EXTERN unsigned int (*vpx_mse16x16)(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int recon_stride, unsigned int *sse); - -unsigned int vpx_mse16x8_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int recon_stride, unsigned int *sse); -unsigned int vpx_mse16x8_sse2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int recon_stride, unsigned int *sse); -RTCD_EXTERN unsigned int (*vpx_mse16x8)(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int recon_stride, unsigned int *sse); - -unsigned int vpx_mse8x16_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int recon_stride, unsigned int *sse); -unsigned int vpx_mse8x16_sse2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int recon_stride, unsigned int *sse); -RTCD_EXTERN unsigned int (*vpx_mse8x16)(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int recon_stride, unsigned int *sse); - -unsigned int vpx_mse8x8_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int recon_stride, unsigned int *sse); -unsigned int vpx_mse8x8_sse2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int recon_stride, unsigned int *sse); -RTCD_EXTERN unsigned int (*vpx_mse8x8)(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int recon_stride, unsigned int *sse); - -void vpx_plane_add_noise_c(uint8_t *start, const int8_t *noise, int blackclamp, int whiteclamp, int width, int height, int pitch); -void vpx_plane_add_noise_sse2(uint8_t *start, const int8_t *noise, int blackclamp, int whiteclamp, int width, int height, int pitch); -RTCD_EXTERN void (*vpx_plane_add_noise)(uint8_t *start, const int8_t *noise, int blackclamp, int whiteclamp, int width, int height, int pitch); - -void vpx_post_proc_down_and_across_mb_row_c(unsigned char *src, unsigned char *dst, int src_pitch, int dst_pitch, int cols, unsigned char *flimits, int size); -void vpx_post_proc_down_and_across_mb_row_sse2(unsigned char *src, unsigned char *dst, int src_pitch, int dst_pitch, int cols, unsigned char *flimits, int size); -RTCD_EXTERN void (*vpx_post_proc_down_and_across_mb_row)(unsigned char *src, unsigned char *dst, int src_pitch, int dst_pitch, int cols, unsigned char *flimits, int size); - -void vpx_quantize_b_c(const tran_low_t *coeff_ptr, intptr_t n_coeffs, int skip_block, const int16_t *zbin_ptr, const int16_t *round_ptr, const int16_t *quant_ptr, const int16_t *quant_shift_ptr, tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr, const int16_t *dequant_ptr, uint16_t *eob_ptr, const int16_t *scan, const int16_t *iscan); -void vpx_quantize_b_sse2(const tran_low_t *coeff_ptr, intptr_t n_coeffs, int skip_block, const int16_t *zbin_ptr, const int16_t *round_ptr, const int16_t *quant_ptr, const int16_t *quant_shift_ptr, tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr, const int16_t *dequant_ptr, uint16_t *eob_ptr, const int16_t *scan, const int16_t *iscan); -RTCD_EXTERN void (*vpx_quantize_b)(const tran_low_t *coeff_ptr, intptr_t n_coeffs, int skip_block, const int16_t *zbin_ptr, const int16_t *round_ptr, const int16_t *quant_ptr, const int16_t *quant_shift_ptr, tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr, const int16_t *dequant_ptr, uint16_t *eob_ptr, const int16_t *scan, const int16_t *iscan); - -void vpx_quantize_b_32x32_c(const tran_low_t *coeff_ptr, intptr_t n_coeffs, int skip_block, const int16_t *zbin_ptr, const int16_t *round_ptr, const int16_t *quant_ptr, const int16_t *quant_shift_ptr, tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr, const int16_t *dequant_ptr, uint16_t *eob_ptr, const int16_t *scan, const int16_t *iscan); -#define vpx_quantize_b_32x32 vpx_quantize_b_32x32_c - -unsigned int vpx_sad16x16_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -unsigned int vpx_sad16x16_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -RTCD_EXTERN unsigned int (*vpx_sad16x16)(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); - -unsigned int vpx_sad16x16_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -unsigned int vpx_sad16x16_avg_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -RTCD_EXTERN unsigned int (*vpx_sad16x16_avg)(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); - -void vpx_sad16x16x3_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -void vpx_sad16x16x3_sse3(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -void vpx_sad16x16x3_ssse3(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -RTCD_EXTERN void (*vpx_sad16x16x3)(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); - -void vpx_sad16x16x4d_c(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); -void vpx_sad16x16x4d_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); -RTCD_EXTERN void (*vpx_sad16x16x4d)(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); - -void vpx_sad16x16x8_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -void vpx_sad16x16x8_sse4_1(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -RTCD_EXTERN void (*vpx_sad16x16x8)(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); - -unsigned int vpx_sad16x32_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -unsigned int vpx_sad16x32_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -RTCD_EXTERN unsigned int (*vpx_sad16x32)(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); - -unsigned int vpx_sad16x32_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -unsigned int vpx_sad16x32_avg_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -RTCD_EXTERN unsigned int (*vpx_sad16x32_avg)(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); - -void vpx_sad16x32x4d_c(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); -void vpx_sad16x32x4d_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); -RTCD_EXTERN void (*vpx_sad16x32x4d)(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); - -unsigned int vpx_sad16x8_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -unsigned int vpx_sad16x8_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -RTCD_EXTERN unsigned int (*vpx_sad16x8)(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); - -unsigned int vpx_sad16x8_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -unsigned int vpx_sad16x8_avg_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -RTCD_EXTERN unsigned int (*vpx_sad16x8_avg)(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); - -void vpx_sad16x8x3_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -void vpx_sad16x8x3_sse3(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -void vpx_sad16x8x3_ssse3(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -RTCD_EXTERN void (*vpx_sad16x8x3)(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); - -void vpx_sad16x8x4d_c(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); -void vpx_sad16x8x4d_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); -RTCD_EXTERN void (*vpx_sad16x8x4d)(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); - -void vpx_sad16x8x8_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -void vpx_sad16x8x8_sse4_1(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -RTCD_EXTERN void (*vpx_sad16x8x8)(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); - -unsigned int vpx_sad32x16_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -unsigned int vpx_sad32x16_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -unsigned int vpx_sad32x16_avx2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -RTCD_EXTERN unsigned int (*vpx_sad32x16)(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); - -unsigned int vpx_sad32x16_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -unsigned int vpx_sad32x16_avg_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -unsigned int vpx_sad32x16_avg_avx2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -RTCD_EXTERN unsigned int (*vpx_sad32x16_avg)(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); - -void vpx_sad32x16x4d_c(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); -void vpx_sad32x16x4d_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); -RTCD_EXTERN void (*vpx_sad32x16x4d)(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); - -unsigned int vpx_sad32x32_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -unsigned int vpx_sad32x32_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -unsigned int vpx_sad32x32_avx2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -RTCD_EXTERN unsigned int (*vpx_sad32x32)(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); - -unsigned int vpx_sad32x32_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -unsigned int vpx_sad32x32_avg_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -unsigned int vpx_sad32x32_avg_avx2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -RTCD_EXTERN unsigned int (*vpx_sad32x32_avg)(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); - -void vpx_sad32x32x3_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -#define vpx_sad32x32x3 vpx_sad32x32x3_c - -void vpx_sad32x32x4d_c(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); -void vpx_sad32x32x4d_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); -void vpx_sad32x32x4d_avx2(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); -RTCD_EXTERN void (*vpx_sad32x32x4d)(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); - -void vpx_sad32x32x8_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -#define vpx_sad32x32x8 vpx_sad32x32x8_c - -unsigned int vpx_sad32x64_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -unsigned int vpx_sad32x64_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -unsigned int vpx_sad32x64_avx2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -RTCD_EXTERN unsigned int (*vpx_sad32x64)(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); - -unsigned int vpx_sad32x64_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -unsigned int vpx_sad32x64_avg_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -unsigned int vpx_sad32x64_avg_avx2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -RTCD_EXTERN unsigned int (*vpx_sad32x64_avg)(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); - -void vpx_sad32x64x4d_c(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); -void vpx_sad32x64x4d_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); -RTCD_EXTERN void (*vpx_sad32x64x4d)(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); - -unsigned int vpx_sad4x4_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -unsigned int vpx_sad4x4_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -RTCD_EXTERN unsigned int (*vpx_sad4x4)(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); - -unsigned int vpx_sad4x4_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -unsigned int vpx_sad4x4_avg_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -RTCD_EXTERN unsigned int (*vpx_sad4x4_avg)(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); - -void vpx_sad4x4x3_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -void vpx_sad4x4x3_sse3(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -RTCD_EXTERN void (*vpx_sad4x4x3)(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); - -void vpx_sad4x4x4d_c(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); -void vpx_sad4x4x4d_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); -RTCD_EXTERN void (*vpx_sad4x4x4d)(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); - -void vpx_sad4x4x8_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -void vpx_sad4x4x8_sse4_1(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -RTCD_EXTERN void (*vpx_sad4x4x8)(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); - -unsigned int vpx_sad4x8_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -unsigned int vpx_sad4x8_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -RTCD_EXTERN unsigned int (*vpx_sad4x8)(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); - -unsigned int vpx_sad4x8_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -unsigned int vpx_sad4x8_avg_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -RTCD_EXTERN unsigned int (*vpx_sad4x8_avg)(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); - -void vpx_sad4x8x4d_c(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); -void vpx_sad4x8x4d_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); -RTCD_EXTERN void (*vpx_sad4x8x4d)(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); - -void vpx_sad4x8x8_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -#define vpx_sad4x8x8 vpx_sad4x8x8_c - -unsigned int vpx_sad64x32_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -unsigned int vpx_sad64x32_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -unsigned int vpx_sad64x32_avx2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -RTCD_EXTERN unsigned int (*vpx_sad64x32)(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); - -unsigned int vpx_sad64x32_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -unsigned int vpx_sad64x32_avg_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -unsigned int vpx_sad64x32_avg_avx2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -RTCD_EXTERN unsigned int (*vpx_sad64x32_avg)(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); - -void vpx_sad64x32x4d_c(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); -void vpx_sad64x32x4d_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); -RTCD_EXTERN void (*vpx_sad64x32x4d)(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); - -unsigned int vpx_sad64x64_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -unsigned int vpx_sad64x64_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -unsigned int vpx_sad64x64_avx2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -RTCD_EXTERN unsigned int (*vpx_sad64x64)(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); - -unsigned int vpx_sad64x64_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -unsigned int vpx_sad64x64_avg_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -unsigned int vpx_sad64x64_avg_avx2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -RTCD_EXTERN unsigned int (*vpx_sad64x64_avg)(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); - -void vpx_sad64x64x3_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -#define vpx_sad64x64x3 vpx_sad64x64x3_c - -void vpx_sad64x64x4d_c(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); -void vpx_sad64x64x4d_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); -void vpx_sad64x64x4d_avx2(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); -RTCD_EXTERN void (*vpx_sad64x64x4d)(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); - -void vpx_sad64x64x8_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -#define vpx_sad64x64x8 vpx_sad64x64x8_c - -unsigned int vpx_sad8x16_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -unsigned int vpx_sad8x16_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -RTCD_EXTERN unsigned int (*vpx_sad8x16)(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); - -unsigned int vpx_sad8x16_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -unsigned int vpx_sad8x16_avg_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -RTCD_EXTERN unsigned int (*vpx_sad8x16_avg)(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); - -void vpx_sad8x16x3_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -void vpx_sad8x16x3_sse3(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -RTCD_EXTERN void (*vpx_sad8x16x3)(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); - -void vpx_sad8x16x4d_c(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); -void vpx_sad8x16x4d_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); -RTCD_EXTERN void (*vpx_sad8x16x4d)(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); - -void vpx_sad8x16x8_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -void vpx_sad8x16x8_sse4_1(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -RTCD_EXTERN void (*vpx_sad8x16x8)(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); - -unsigned int vpx_sad8x4_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -unsigned int vpx_sad8x4_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -RTCD_EXTERN unsigned int (*vpx_sad8x4)(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); - -unsigned int vpx_sad8x4_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -unsigned int vpx_sad8x4_avg_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -RTCD_EXTERN unsigned int (*vpx_sad8x4_avg)(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); - -void vpx_sad8x4x4d_c(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); -void vpx_sad8x4x4d_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); -RTCD_EXTERN void (*vpx_sad8x4x4d)(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); - -void vpx_sad8x4x8_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -#define vpx_sad8x4x8 vpx_sad8x4x8_c - -unsigned int vpx_sad8x8_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -unsigned int vpx_sad8x8_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -RTCD_EXTERN unsigned int (*vpx_sad8x8)(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); - -unsigned int vpx_sad8x8_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -unsigned int vpx_sad8x8_avg_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -RTCD_EXTERN unsigned int (*vpx_sad8x8_avg)(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); - -void vpx_sad8x8x3_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -void vpx_sad8x8x3_sse3(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -RTCD_EXTERN void (*vpx_sad8x8x3)(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); - -void vpx_sad8x8x4d_c(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); -void vpx_sad8x8x4d_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); -RTCD_EXTERN void (*vpx_sad8x8x4d)(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); - -void vpx_sad8x8x8_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -void vpx_sad8x8x8_sse4_1(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -RTCD_EXTERN void (*vpx_sad8x8x8)(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); - -int vpx_satd_c(const int16_t *coeff, int length); -int vpx_satd_sse2(const int16_t *coeff, int length); -RTCD_EXTERN int (*vpx_satd)(const int16_t *coeff, int length); - -void vpx_scaled_2d_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -void vpx_scaled_2d_ssse3(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -RTCD_EXTERN void (*vpx_scaled_2d)(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); - -void vpx_scaled_avg_2d_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -#define vpx_scaled_avg_2d vpx_scaled_avg_2d_c - -void vpx_scaled_avg_horiz_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -#define vpx_scaled_avg_horiz vpx_scaled_avg_horiz_c - -void vpx_scaled_avg_vert_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -#define vpx_scaled_avg_vert vpx_scaled_avg_vert_c - -void vpx_scaled_horiz_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -#define vpx_scaled_horiz vpx_scaled_horiz_c - -void vpx_scaled_vert_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -#define vpx_scaled_vert vpx_scaled_vert_c - -uint32_t vpx_sub_pixel_avg_variance16x16_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_sub_pixel_avg_variance16x16_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_sub_pixel_avg_variance16x16_ssse3(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -RTCD_EXTERN uint32_t (*vpx_sub_pixel_avg_variance16x16)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); - -uint32_t vpx_sub_pixel_avg_variance16x32_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_sub_pixel_avg_variance16x32_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_sub_pixel_avg_variance16x32_ssse3(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -RTCD_EXTERN uint32_t (*vpx_sub_pixel_avg_variance16x32)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); - -uint32_t vpx_sub_pixel_avg_variance16x8_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_sub_pixel_avg_variance16x8_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_sub_pixel_avg_variance16x8_ssse3(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -RTCD_EXTERN uint32_t (*vpx_sub_pixel_avg_variance16x8)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); - -uint32_t vpx_sub_pixel_avg_variance32x16_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_sub_pixel_avg_variance32x16_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_sub_pixel_avg_variance32x16_ssse3(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -RTCD_EXTERN uint32_t (*vpx_sub_pixel_avg_variance32x16)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); - -uint32_t vpx_sub_pixel_avg_variance32x32_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_sub_pixel_avg_variance32x32_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_sub_pixel_avg_variance32x32_ssse3(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_sub_pixel_avg_variance32x32_avx2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -RTCD_EXTERN uint32_t (*vpx_sub_pixel_avg_variance32x32)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); - -uint32_t vpx_sub_pixel_avg_variance32x64_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_sub_pixel_avg_variance32x64_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_sub_pixel_avg_variance32x64_ssse3(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -RTCD_EXTERN uint32_t (*vpx_sub_pixel_avg_variance32x64)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); - -uint32_t vpx_sub_pixel_avg_variance4x4_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_sub_pixel_avg_variance4x4_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_sub_pixel_avg_variance4x4_ssse3(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -RTCD_EXTERN uint32_t (*vpx_sub_pixel_avg_variance4x4)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); - -uint32_t vpx_sub_pixel_avg_variance4x8_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_sub_pixel_avg_variance4x8_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_sub_pixel_avg_variance4x8_ssse3(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -RTCD_EXTERN uint32_t (*vpx_sub_pixel_avg_variance4x8)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); - -uint32_t vpx_sub_pixel_avg_variance64x32_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_sub_pixel_avg_variance64x32_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_sub_pixel_avg_variance64x32_ssse3(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -RTCD_EXTERN uint32_t (*vpx_sub_pixel_avg_variance64x32)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); - -uint32_t vpx_sub_pixel_avg_variance64x64_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_sub_pixel_avg_variance64x64_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_sub_pixel_avg_variance64x64_ssse3(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_sub_pixel_avg_variance64x64_avx2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -RTCD_EXTERN uint32_t (*vpx_sub_pixel_avg_variance64x64)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); - -uint32_t vpx_sub_pixel_avg_variance8x16_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_sub_pixel_avg_variance8x16_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_sub_pixel_avg_variance8x16_ssse3(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -RTCD_EXTERN uint32_t (*vpx_sub_pixel_avg_variance8x16)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); - -uint32_t vpx_sub_pixel_avg_variance8x4_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_sub_pixel_avg_variance8x4_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_sub_pixel_avg_variance8x4_ssse3(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -RTCD_EXTERN uint32_t (*vpx_sub_pixel_avg_variance8x4)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); - -uint32_t vpx_sub_pixel_avg_variance8x8_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_sub_pixel_avg_variance8x8_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_sub_pixel_avg_variance8x8_ssse3(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -RTCD_EXTERN uint32_t (*vpx_sub_pixel_avg_variance8x8)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); - -uint32_t vpx_sub_pixel_variance16x16_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_sub_pixel_variance16x16_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_sub_pixel_variance16x16_ssse3(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -RTCD_EXTERN uint32_t (*vpx_sub_pixel_variance16x16)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); - -uint32_t vpx_sub_pixel_variance16x32_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_sub_pixel_variance16x32_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_sub_pixel_variance16x32_ssse3(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -RTCD_EXTERN uint32_t (*vpx_sub_pixel_variance16x32)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); - -uint32_t vpx_sub_pixel_variance16x8_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_sub_pixel_variance16x8_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_sub_pixel_variance16x8_ssse3(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -RTCD_EXTERN uint32_t (*vpx_sub_pixel_variance16x8)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); - -uint32_t vpx_sub_pixel_variance32x16_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_sub_pixel_variance32x16_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_sub_pixel_variance32x16_ssse3(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -RTCD_EXTERN uint32_t (*vpx_sub_pixel_variance32x16)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); - -uint32_t vpx_sub_pixel_variance32x32_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_sub_pixel_variance32x32_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_sub_pixel_variance32x32_ssse3(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_sub_pixel_variance32x32_avx2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -RTCD_EXTERN uint32_t (*vpx_sub_pixel_variance32x32)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); - -uint32_t vpx_sub_pixel_variance32x64_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_sub_pixel_variance32x64_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_sub_pixel_variance32x64_ssse3(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -RTCD_EXTERN uint32_t (*vpx_sub_pixel_variance32x64)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); - -uint32_t vpx_sub_pixel_variance4x4_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_sub_pixel_variance4x4_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_sub_pixel_variance4x4_ssse3(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -RTCD_EXTERN uint32_t (*vpx_sub_pixel_variance4x4)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); - -uint32_t vpx_sub_pixel_variance4x8_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_sub_pixel_variance4x8_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_sub_pixel_variance4x8_ssse3(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -RTCD_EXTERN uint32_t (*vpx_sub_pixel_variance4x8)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); - -uint32_t vpx_sub_pixel_variance64x32_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_sub_pixel_variance64x32_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_sub_pixel_variance64x32_ssse3(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -RTCD_EXTERN uint32_t (*vpx_sub_pixel_variance64x32)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); - -uint32_t vpx_sub_pixel_variance64x64_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_sub_pixel_variance64x64_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_sub_pixel_variance64x64_ssse3(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_sub_pixel_variance64x64_avx2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -RTCD_EXTERN uint32_t (*vpx_sub_pixel_variance64x64)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); - -uint32_t vpx_sub_pixel_variance8x16_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_sub_pixel_variance8x16_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_sub_pixel_variance8x16_ssse3(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -RTCD_EXTERN uint32_t (*vpx_sub_pixel_variance8x16)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); - -uint32_t vpx_sub_pixel_variance8x4_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_sub_pixel_variance8x4_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_sub_pixel_variance8x4_ssse3(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -RTCD_EXTERN uint32_t (*vpx_sub_pixel_variance8x4)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); - -uint32_t vpx_sub_pixel_variance8x8_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_sub_pixel_variance8x8_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_sub_pixel_variance8x8_ssse3(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -RTCD_EXTERN uint32_t (*vpx_sub_pixel_variance8x8)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); - -void vpx_subtract_block_c(int rows, int cols, int16_t *diff_ptr, ptrdiff_t diff_stride, const uint8_t *src_ptr, ptrdiff_t src_stride, const uint8_t *pred_ptr, ptrdiff_t pred_stride); -void vpx_subtract_block_sse2(int rows, int cols, int16_t *diff_ptr, ptrdiff_t diff_stride, const uint8_t *src_ptr, ptrdiff_t src_stride, const uint8_t *pred_ptr, ptrdiff_t pred_stride); -RTCD_EXTERN void (*vpx_subtract_block)(int rows, int cols, int16_t *diff_ptr, ptrdiff_t diff_stride, const uint8_t *src_ptr, ptrdiff_t src_stride, const uint8_t *pred_ptr, ptrdiff_t pred_stride); - -uint64_t vpx_sum_squares_2d_i16_c(const int16_t *src, int stride, int size); -uint64_t vpx_sum_squares_2d_i16_sse2(const int16_t *src, int stride, int size); -RTCD_EXTERN uint64_t (*vpx_sum_squares_2d_i16)(const int16_t *src, int stride, int size); - -void vpx_tm_predictor_16x16_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_tm_predictor_16x16_sse2(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -RTCD_EXTERN void (*vpx_tm_predictor_16x16)(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); - -void vpx_tm_predictor_32x32_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_tm_predictor_32x32_sse2(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -RTCD_EXTERN void (*vpx_tm_predictor_32x32)(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); - -void vpx_tm_predictor_4x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_tm_predictor_4x4_sse2(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -RTCD_EXTERN void (*vpx_tm_predictor_4x4)(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); - -void vpx_tm_predictor_8x8_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_tm_predictor_8x8_sse2(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -RTCD_EXTERN void (*vpx_tm_predictor_8x8)(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); - -void vpx_v_predictor_16x16_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_v_predictor_16x16_sse2(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -RTCD_EXTERN void (*vpx_v_predictor_16x16)(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); - -void vpx_v_predictor_32x32_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_v_predictor_32x32_sse2(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -RTCD_EXTERN void (*vpx_v_predictor_32x32)(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); - -void vpx_v_predictor_4x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_v_predictor_4x4_sse2(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -RTCD_EXTERN void (*vpx_v_predictor_4x4)(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); - -void vpx_v_predictor_8x8_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_v_predictor_8x8_sse2(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -RTCD_EXTERN void (*vpx_v_predictor_8x8)(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); - -unsigned int vpx_variance16x16_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -unsigned int vpx_variance16x16_sse2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -unsigned int vpx_variance16x16_avx2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -RTCD_EXTERN unsigned int (*vpx_variance16x16)(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); - -unsigned int vpx_variance16x32_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -unsigned int vpx_variance16x32_sse2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -RTCD_EXTERN unsigned int (*vpx_variance16x32)(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); - -unsigned int vpx_variance16x8_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -unsigned int vpx_variance16x8_sse2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -RTCD_EXTERN unsigned int (*vpx_variance16x8)(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); - -unsigned int vpx_variance32x16_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -unsigned int vpx_variance32x16_sse2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -unsigned int vpx_variance32x16_avx2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -RTCD_EXTERN unsigned int (*vpx_variance32x16)(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); - -unsigned int vpx_variance32x32_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -unsigned int vpx_variance32x32_sse2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -unsigned int vpx_variance32x32_avx2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -RTCD_EXTERN unsigned int (*vpx_variance32x32)(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); - -unsigned int vpx_variance32x64_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -unsigned int vpx_variance32x64_sse2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -RTCD_EXTERN unsigned int (*vpx_variance32x64)(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); - -unsigned int vpx_variance4x4_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -unsigned int vpx_variance4x4_sse2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -RTCD_EXTERN unsigned int (*vpx_variance4x4)(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); - -unsigned int vpx_variance4x8_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -unsigned int vpx_variance4x8_sse2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -RTCD_EXTERN unsigned int (*vpx_variance4x8)(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); - -unsigned int vpx_variance64x32_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -unsigned int vpx_variance64x32_sse2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -unsigned int vpx_variance64x32_avx2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -RTCD_EXTERN unsigned int (*vpx_variance64x32)(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); - -unsigned int vpx_variance64x64_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -unsigned int vpx_variance64x64_sse2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -unsigned int vpx_variance64x64_avx2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -RTCD_EXTERN unsigned int (*vpx_variance64x64)(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); - -unsigned int vpx_variance8x16_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -unsigned int vpx_variance8x16_sse2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -RTCD_EXTERN unsigned int (*vpx_variance8x16)(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); - -unsigned int vpx_variance8x4_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -unsigned int vpx_variance8x4_sse2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -RTCD_EXTERN unsigned int (*vpx_variance8x4)(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); - -unsigned int vpx_variance8x8_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -unsigned int vpx_variance8x8_sse2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -RTCD_EXTERN unsigned int (*vpx_variance8x8)(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); - -void vpx_ve_predictor_4x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_ve_predictor_4x4 vpx_ve_predictor_4x4_c - -int vpx_vector_var_c(const int16_t *ref, const int16_t *src, const int bwl); -int vpx_vector_var_sse2(const int16_t *ref, const int16_t *src, const int bwl); -RTCD_EXTERN int (*vpx_vector_var)(const int16_t *ref, const int16_t *src, const int bwl); - -void vpx_dsp_rtcd(void); - -#ifdef RTCD_C -#include "vpx_ports/x86.h" -static void setup_rtcd_internal(void) -{ - int flags = x86_simd_caps(); - - (void)flags; - - vpx_avg_4x4 = vpx_avg_4x4_c; - if (flags & HAS_SSE2) vpx_avg_4x4 = vpx_avg_4x4_sse2; - vpx_avg_8x8 = vpx_avg_8x8_c; - if (flags & HAS_SSE2) vpx_avg_8x8 = vpx_avg_8x8_sse2; - vpx_convolve8 = vpx_convolve8_c; - if (flags & HAS_SSE2) vpx_convolve8 = vpx_convolve8_sse2; - if (flags & HAS_SSSE3) vpx_convolve8 = vpx_convolve8_ssse3; - if (flags & HAS_AVX2) vpx_convolve8 = vpx_convolve8_avx2; - vpx_convolve8_avg = vpx_convolve8_avg_c; - if (flags & HAS_SSE2) vpx_convolve8_avg = vpx_convolve8_avg_sse2; - if (flags & HAS_SSSE3) vpx_convolve8_avg = vpx_convolve8_avg_ssse3; - vpx_convolve8_avg_horiz = vpx_convolve8_avg_horiz_c; - if (flags & HAS_SSE2) vpx_convolve8_avg_horiz = vpx_convolve8_avg_horiz_sse2; - if (flags & HAS_SSSE3) vpx_convolve8_avg_horiz = vpx_convolve8_avg_horiz_ssse3; - vpx_convolve8_avg_vert = vpx_convolve8_avg_vert_c; - if (flags & HAS_SSE2) vpx_convolve8_avg_vert = vpx_convolve8_avg_vert_sse2; - if (flags & HAS_SSSE3) vpx_convolve8_avg_vert = vpx_convolve8_avg_vert_ssse3; - vpx_convolve8_horiz = vpx_convolve8_horiz_c; - if (flags & HAS_SSE2) vpx_convolve8_horiz = vpx_convolve8_horiz_sse2; - if (flags & HAS_SSSE3) vpx_convolve8_horiz = vpx_convolve8_horiz_ssse3; - if (flags & HAS_AVX2) vpx_convolve8_horiz = vpx_convolve8_horiz_avx2; - vpx_convolve8_vert = vpx_convolve8_vert_c; - if (flags & HAS_SSE2) vpx_convolve8_vert = vpx_convolve8_vert_sse2; - if (flags & HAS_SSSE3) vpx_convolve8_vert = vpx_convolve8_vert_ssse3; - if (flags & HAS_AVX2) vpx_convolve8_vert = vpx_convolve8_vert_avx2; - vpx_convolve_avg = vpx_convolve_avg_c; - if (flags & HAS_SSE2) vpx_convolve_avg = vpx_convolve_avg_sse2; - vpx_convolve_copy = vpx_convolve_copy_c; - if (flags & HAS_SSE2) vpx_convolve_copy = vpx_convolve_copy_sse2; - vpx_d153_predictor_16x16 = vpx_d153_predictor_16x16_c; - if (flags & HAS_SSSE3) vpx_d153_predictor_16x16 = vpx_d153_predictor_16x16_ssse3; - vpx_d153_predictor_32x32 = vpx_d153_predictor_32x32_c; - if (flags & HAS_SSSE3) vpx_d153_predictor_32x32 = vpx_d153_predictor_32x32_ssse3; - vpx_d153_predictor_4x4 = vpx_d153_predictor_4x4_c; - if (flags & HAS_SSSE3) vpx_d153_predictor_4x4 = vpx_d153_predictor_4x4_ssse3; - vpx_d153_predictor_8x8 = vpx_d153_predictor_8x8_c; - if (flags & HAS_SSSE3) vpx_d153_predictor_8x8 = vpx_d153_predictor_8x8_ssse3; - vpx_d207_predictor_16x16 = vpx_d207_predictor_16x16_c; - if (flags & HAS_SSSE3) vpx_d207_predictor_16x16 = vpx_d207_predictor_16x16_ssse3; - vpx_d207_predictor_32x32 = vpx_d207_predictor_32x32_c; - if (flags & HAS_SSSE3) vpx_d207_predictor_32x32 = vpx_d207_predictor_32x32_ssse3; - vpx_d207_predictor_4x4 = vpx_d207_predictor_4x4_c; - if (flags & HAS_SSE2) vpx_d207_predictor_4x4 = vpx_d207_predictor_4x4_sse2; - vpx_d207_predictor_8x8 = vpx_d207_predictor_8x8_c; - if (flags & HAS_SSSE3) vpx_d207_predictor_8x8 = vpx_d207_predictor_8x8_ssse3; - vpx_d45_predictor_16x16 = vpx_d45_predictor_16x16_c; - if (flags & HAS_SSSE3) vpx_d45_predictor_16x16 = vpx_d45_predictor_16x16_ssse3; - vpx_d45_predictor_32x32 = vpx_d45_predictor_32x32_c; - if (flags & HAS_SSSE3) vpx_d45_predictor_32x32 = vpx_d45_predictor_32x32_ssse3; - vpx_d45_predictor_4x4 = vpx_d45_predictor_4x4_c; - if (flags & HAS_SSE2) vpx_d45_predictor_4x4 = vpx_d45_predictor_4x4_sse2; - vpx_d45_predictor_8x8 = vpx_d45_predictor_8x8_c; - if (flags & HAS_SSE2) vpx_d45_predictor_8x8 = vpx_d45_predictor_8x8_sse2; - vpx_d63_predictor_16x16 = vpx_d63_predictor_16x16_c; - if (flags & HAS_SSSE3) vpx_d63_predictor_16x16 = vpx_d63_predictor_16x16_ssse3; - vpx_d63_predictor_32x32 = vpx_d63_predictor_32x32_c; - if (flags & HAS_SSSE3) vpx_d63_predictor_32x32 = vpx_d63_predictor_32x32_ssse3; - vpx_d63_predictor_4x4 = vpx_d63_predictor_4x4_c; - if (flags & HAS_SSSE3) vpx_d63_predictor_4x4 = vpx_d63_predictor_4x4_ssse3; - vpx_d63_predictor_8x8 = vpx_d63_predictor_8x8_c; - if (flags & HAS_SSSE3) vpx_d63_predictor_8x8 = vpx_d63_predictor_8x8_ssse3; - vpx_dc_128_predictor_16x16 = vpx_dc_128_predictor_16x16_c; - if (flags & HAS_SSE2) vpx_dc_128_predictor_16x16 = vpx_dc_128_predictor_16x16_sse2; - vpx_dc_128_predictor_32x32 = vpx_dc_128_predictor_32x32_c; - if (flags & HAS_SSE2) vpx_dc_128_predictor_32x32 = vpx_dc_128_predictor_32x32_sse2; - vpx_dc_128_predictor_4x4 = vpx_dc_128_predictor_4x4_c; - if (flags & HAS_SSE2) vpx_dc_128_predictor_4x4 = vpx_dc_128_predictor_4x4_sse2; - vpx_dc_128_predictor_8x8 = vpx_dc_128_predictor_8x8_c; - if (flags & HAS_SSE2) vpx_dc_128_predictor_8x8 = vpx_dc_128_predictor_8x8_sse2; - vpx_dc_left_predictor_16x16 = vpx_dc_left_predictor_16x16_c; - if (flags & HAS_SSE2) vpx_dc_left_predictor_16x16 = vpx_dc_left_predictor_16x16_sse2; - vpx_dc_left_predictor_32x32 = vpx_dc_left_predictor_32x32_c; - if (flags & HAS_SSE2) vpx_dc_left_predictor_32x32 = vpx_dc_left_predictor_32x32_sse2; - vpx_dc_left_predictor_4x4 = vpx_dc_left_predictor_4x4_c; - if (flags & HAS_SSE2) vpx_dc_left_predictor_4x4 = vpx_dc_left_predictor_4x4_sse2; - vpx_dc_left_predictor_8x8 = vpx_dc_left_predictor_8x8_c; - if (flags & HAS_SSE2) vpx_dc_left_predictor_8x8 = vpx_dc_left_predictor_8x8_sse2; - vpx_dc_predictor_16x16 = vpx_dc_predictor_16x16_c; - if (flags & HAS_SSE2) vpx_dc_predictor_16x16 = vpx_dc_predictor_16x16_sse2; - vpx_dc_predictor_32x32 = vpx_dc_predictor_32x32_c; - if (flags & HAS_SSE2) vpx_dc_predictor_32x32 = vpx_dc_predictor_32x32_sse2; - vpx_dc_predictor_4x4 = vpx_dc_predictor_4x4_c; - if (flags & HAS_SSE2) vpx_dc_predictor_4x4 = vpx_dc_predictor_4x4_sse2; - vpx_dc_predictor_8x8 = vpx_dc_predictor_8x8_c; - if (flags & HAS_SSE2) vpx_dc_predictor_8x8 = vpx_dc_predictor_8x8_sse2; - vpx_dc_top_predictor_16x16 = vpx_dc_top_predictor_16x16_c; - if (flags & HAS_SSE2) vpx_dc_top_predictor_16x16 = vpx_dc_top_predictor_16x16_sse2; - vpx_dc_top_predictor_32x32 = vpx_dc_top_predictor_32x32_c; - if (flags & HAS_SSE2) vpx_dc_top_predictor_32x32 = vpx_dc_top_predictor_32x32_sse2; - vpx_dc_top_predictor_4x4 = vpx_dc_top_predictor_4x4_c; - if (flags & HAS_SSE2) vpx_dc_top_predictor_4x4 = vpx_dc_top_predictor_4x4_sse2; - vpx_dc_top_predictor_8x8 = vpx_dc_top_predictor_8x8_c; - if (flags & HAS_SSE2) vpx_dc_top_predictor_8x8 = vpx_dc_top_predictor_8x8_sse2; - vpx_fdct16x16 = vpx_fdct16x16_c; - if (flags & HAS_SSE2) vpx_fdct16x16 = vpx_fdct16x16_sse2; - vpx_fdct16x16_1 = vpx_fdct16x16_1_c; - if (flags & HAS_SSE2) vpx_fdct16x16_1 = vpx_fdct16x16_1_sse2; - vpx_fdct32x32 = vpx_fdct32x32_c; - if (flags & HAS_SSE2) vpx_fdct32x32 = vpx_fdct32x32_sse2; - vpx_fdct32x32_1 = vpx_fdct32x32_1_c; - if (flags & HAS_SSE2) vpx_fdct32x32_1 = vpx_fdct32x32_1_sse2; - vpx_fdct32x32_rd = vpx_fdct32x32_rd_c; - if (flags & HAS_SSE2) vpx_fdct32x32_rd = vpx_fdct32x32_rd_sse2; - vpx_fdct4x4 = vpx_fdct4x4_c; - if (flags & HAS_SSE2) vpx_fdct4x4 = vpx_fdct4x4_sse2; - vpx_fdct4x4_1 = vpx_fdct4x4_1_c; - if (flags & HAS_SSE2) vpx_fdct4x4_1 = vpx_fdct4x4_1_sse2; - vpx_fdct8x8 = vpx_fdct8x8_c; - if (flags & HAS_SSE2) vpx_fdct8x8 = vpx_fdct8x8_sse2; - vpx_fdct8x8_1 = vpx_fdct8x8_1_c; - if (flags & HAS_SSE2) vpx_fdct8x8_1 = vpx_fdct8x8_1_sse2; - vpx_get16x16var = vpx_get16x16var_c; - if (flags & HAS_SSE2) vpx_get16x16var = vpx_get16x16var_sse2; - if (flags & HAS_AVX2) vpx_get16x16var = vpx_get16x16var_avx2; - vpx_get8x8var = vpx_get8x8var_c; - if (flags & HAS_SSE2) vpx_get8x8var = vpx_get8x8var_sse2; - vpx_get_mb_ss = vpx_get_mb_ss_c; - if (flags & HAS_SSE2) vpx_get_mb_ss = vpx_get_mb_ss_sse2; - vpx_h_predictor_16x16 = vpx_h_predictor_16x16_c; - if (flags & HAS_SSE2) vpx_h_predictor_16x16 = vpx_h_predictor_16x16_sse2; - vpx_h_predictor_32x32 = vpx_h_predictor_32x32_c; - if (flags & HAS_SSE2) vpx_h_predictor_32x32 = vpx_h_predictor_32x32_sse2; - vpx_h_predictor_4x4 = vpx_h_predictor_4x4_c; - if (flags & HAS_SSE2) vpx_h_predictor_4x4 = vpx_h_predictor_4x4_sse2; - vpx_h_predictor_8x8 = vpx_h_predictor_8x8_c; - if (flags & HAS_SSE2) vpx_h_predictor_8x8 = vpx_h_predictor_8x8_sse2; - vpx_hadamard_16x16 = vpx_hadamard_16x16_c; - if (flags & HAS_SSE2) vpx_hadamard_16x16 = vpx_hadamard_16x16_sse2; - vpx_hadamard_8x8 = vpx_hadamard_8x8_c; - if (flags & HAS_SSE2) vpx_hadamard_8x8 = vpx_hadamard_8x8_sse2; - vpx_highbd_10_mse16x16 = vpx_highbd_10_mse16x16_c; - if (flags & HAS_SSE2) vpx_highbd_10_mse16x16 = vpx_highbd_10_mse16x16_sse2; - vpx_highbd_10_mse8x8 = vpx_highbd_10_mse8x8_c; - if (flags & HAS_SSE2) vpx_highbd_10_mse8x8 = vpx_highbd_10_mse8x8_sse2; - vpx_highbd_10_sub_pixel_avg_variance16x16 = vpx_highbd_10_sub_pixel_avg_variance16x16_c; - if (flags & HAS_SSE2) vpx_highbd_10_sub_pixel_avg_variance16x16 = vpx_highbd_10_sub_pixel_avg_variance16x16_sse2; - vpx_highbd_10_sub_pixel_avg_variance16x32 = vpx_highbd_10_sub_pixel_avg_variance16x32_c; - if (flags & HAS_SSE2) vpx_highbd_10_sub_pixel_avg_variance16x32 = vpx_highbd_10_sub_pixel_avg_variance16x32_sse2; - vpx_highbd_10_sub_pixel_avg_variance16x8 = vpx_highbd_10_sub_pixel_avg_variance16x8_c; - if (flags & HAS_SSE2) vpx_highbd_10_sub_pixel_avg_variance16x8 = vpx_highbd_10_sub_pixel_avg_variance16x8_sse2; - vpx_highbd_10_sub_pixel_avg_variance32x16 = vpx_highbd_10_sub_pixel_avg_variance32x16_c; - if (flags & HAS_SSE2) vpx_highbd_10_sub_pixel_avg_variance32x16 = vpx_highbd_10_sub_pixel_avg_variance32x16_sse2; - vpx_highbd_10_sub_pixel_avg_variance32x32 = vpx_highbd_10_sub_pixel_avg_variance32x32_c; - if (flags & HAS_SSE2) vpx_highbd_10_sub_pixel_avg_variance32x32 = vpx_highbd_10_sub_pixel_avg_variance32x32_sse2; - vpx_highbd_10_sub_pixel_avg_variance32x64 = vpx_highbd_10_sub_pixel_avg_variance32x64_c; - if (flags & HAS_SSE2) vpx_highbd_10_sub_pixel_avg_variance32x64 = vpx_highbd_10_sub_pixel_avg_variance32x64_sse2; - vpx_highbd_10_sub_pixel_avg_variance64x32 = vpx_highbd_10_sub_pixel_avg_variance64x32_c; - if (flags & HAS_SSE2) vpx_highbd_10_sub_pixel_avg_variance64x32 = vpx_highbd_10_sub_pixel_avg_variance64x32_sse2; - vpx_highbd_10_sub_pixel_avg_variance64x64 = vpx_highbd_10_sub_pixel_avg_variance64x64_c; - if (flags & HAS_SSE2) vpx_highbd_10_sub_pixel_avg_variance64x64 = vpx_highbd_10_sub_pixel_avg_variance64x64_sse2; - vpx_highbd_10_sub_pixel_avg_variance8x16 = vpx_highbd_10_sub_pixel_avg_variance8x16_c; - if (flags & HAS_SSE2) vpx_highbd_10_sub_pixel_avg_variance8x16 = vpx_highbd_10_sub_pixel_avg_variance8x16_sse2; - vpx_highbd_10_sub_pixel_avg_variance8x4 = vpx_highbd_10_sub_pixel_avg_variance8x4_c; - if (flags & HAS_SSE2) vpx_highbd_10_sub_pixel_avg_variance8x4 = vpx_highbd_10_sub_pixel_avg_variance8x4_sse2; - vpx_highbd_10_sub_pixel_avg_variance8x8 = vpx_highbd_10_sub_pixel_avg_variance8x8_c; - if (flags & HAS_SSE2) vpx_highbd_10_sub_pixel_avg_variance8x8 = vpx_highbd_10_sub_pixel_avg_variance8x8_sse2; - vpx_highbd_10_sub_pixel_variance16x16 = vpx_highbd_10_sub_pixel_variance16x16_c; - if (flags & HAS_SSE2) vpx_highbd_10_sub_pixel_variance16x16 = vpx_highbd_10_sub_pixel_variance16x16_sse2; - vpx_highbd_10_sub_pixel_variance16x32 = vpx_highbd_10_sub_pixel_variance16x32_c; - if (flags & HAS_SSE2) vpx_highbd_10_sub_pixel_variance16x32 = vpx_highbd_10_sub_pixel_variance16x32_sse2; - vpx_highbd_10_sub_pixel_variance16x8 = vpx_highbd_10_sub_pixel_variance16x8_c; - if (flags & HAS_SSE2) vpx_highbd_10_sub_pixel_variance16x8 = vpx_highbd_10_sub_pixel_variance16x8_sse2; - vpx_highbd_10_sub_pixel_variance32x16 = vpx_highbd_10_sub_pixel_variance32x16_c; - if (flags & HAS_SSE2) vpx_highbd_10_sub_pixel_variance32x16 = vpx_highbd_10_sub_pixel_variance32x16_sse2; - vpx_highbd_10_sub_pixel_variance32x32 = vpx_highbd_10_sub_pixel_variance32x32_c; - if (flags & HAS_SSE2) vpx_highbd_10_sub_pixel_variance32x32 = vpx_highbd_10_sub_pixel_variance32x32_sse2; - vpx_highbd_10_sub_pixel_variance32x64 = vpx_highbd_10_sub_pixel_variance32x64_c; - if (flags & HAS_SSE2) vpx_highbd_10_sub_pixel_variance32x64 = vpx_highbd_10_sub_pixel_variance32x64_sse2; - vpx_highbd_10_sub_pixel_variance64x32 = vpx_highbd_10_sub_pixel_variance64x32_c; - if (flags & HAS_SSE2) vpx_highbd_10_sub_pixel_variance64x32 = vpx_highbd_10_sub_pixel_variance64x32_sse2; - vpx_highbd_10_sub_pixel_variance64x64 = vpx_highbd_10_sub_pixel_variance64x64_c; - if (flags & HAS_SSE2) vpx_highbd_10_sub_pixel_variance64x64 = vpx_highbd_10_sub_pixel_variance64x64_sse2; - vpx_highbd_10_sub_pixel_variance8x16 = vpx_highbd_10_sub_pixel_variance8x16_c; - if (flags & HAS_SSE2) vpx_highbd_10_sub_pixel_variance8x16 = vpx_highbd_10_sub_pixel_variance8x16_sse2; - vpx_highbd_10_sub_pixel_variance8x4 = vpx_highbd_10_sub_pixel_variance8x4_c; - if (flags & HAS_SSE2) vpx_highbd_10_sub_pixel_variance8x4 = vpx_highbd_10_sub_pixel_variance8x4_sse2; - vpx_highbd_10_sub_pixel_variance8x8 = vpx_highbd_10_sub_pixel_variance8x8_c; - if (flags & HAS_SSE2) vpx_highbd_10_sub_pixel_variance8x8 = vpx_highbd_10_sub_pixel_variance8x8_sse2; - vpx_highbd_10_variance16x16 = vpx_highbd_10_variance16x16_c; - if (flags & HAS_SSE2) vpx_highbd_10_variance16x16 = vpx_highbd_10_variance16x16_sse2; - vpx_highbd_10_variance16x32 = vpx_highbd_10_variance16x32_c; - if (flags & HAS_SSE2) vpx_highbd_10_variance16x32 = vpx_highbd_10_variance16x32_sse2; - vpx_highbd_10_variance16x8 = vpx_highbd_10_variance16x8_c; - if (flags & HAS_SSE2) vpx_highbd_10_variance16x8 = vpx_highbd_10_variance16x8_sse2; - vpx_highbd_10_variance32x16 = vpx_highbd_10_variance32x16_c; - if (flags & HAS_SSE2) vpx_highbd_10_variance32x16 = vpx_highbd_10_variance32x16_sse2; - vpx_highbd_10_variance32x32 = vpx_highbd_10_variance32x32_c; - if (flags & HAS_SSE2) vpx_highbd_10_variance32x32 = vpx_highbd_10_variance32x32_sse2; - vpx_highbd_10_variance32x64 = vpx_highbd_10_variance32x64_c; - if (flags & HAS_SSE2) vpx_highbd_10_variance32x64 = vpx_highbd_10_variance32x64_sse2; - vpx_highbd_10_variance64x32 = vpx_highbd_10_variance64x32_c; - if (flags & HAS_SSE2) vpx_highbd_10_variance64x32 = vpx_highbd_10_variance64x32_sse2; - vpx_highbd_10_variance64x64 = vpx_highbd_10_variance64x64_c; - if (flags & HAS_SSE2) vpx_highbd_10_variance64x64 = vpx_highbd_10_variance64x64_sse2; - vpx_highbd_10_variance8x16 = vpx_highbd_10_variance8x16_c; - if (flags & HAS_SSE2) vpx_highbd_10_variance8x16 = vpx_highbd_10_variance8x16_sse2; - vpx_highbd_10_variance8x8 = vpx_highbd_10_variance8x8_c; - if (flags & HAS_SSE2) vpx_highbd_10_variance8x8 = vpx_highbd_10_variance8x8_sse2; - vpx_highbd_12_mse16x16 = vpx_highbd_12_mse16x16_c; - if (flags & HAS_SSE2) vpx_highbd_12_mse16x16 = vpx_highbd_12_mse16x16_sse2; - vpx_highbd_12_mse8x8 = vpx_highbd_12_mse8x8_c; - if (flags & HAS_SSE2) vpx_highbd_12_mse8x8 = vpx_highbd_12_mse8x8_sse2; - vpx_highbd_12_sub_pixel_avg_variance16x16 = vpx_highbd_12_sub_pixel_avg_variance16x16_c; - if (flags & HAS_SSE2) vpx_highbd_12_sub_pixel_avg_variance16x16 = vpx_highbd_12_sub_pixel_avg_variance16x16_sse2; - vpx_highbd_12_sub_pixel_avg_variance16x32 = vpx_highbd_12_sub_pixel_avg_variance16x32_c; - if (flags & HAS_SSE2) vpx_highbd_12_sub_pixel_avg_variance16x32 = vpx_highbd_12_sub_pixel_avg_variance16x32_sse2; - vpx_highbd_12_sub_pixel_avg_variance16x8 = vpx_highbd_12_sub_pixel_avg_variance16x8_c; - if (flags & HAS_SSE2) vpx_highbd_12_sub_pixel_avg_variance16x8 = vpx_highbd_12_sub_pixel_avg_variance16x8_sse2; - vpx_highbd_12_sub_pixel_avg_variance32x16 = vpx_highbd_12_sub_pixel_avg_variance32x16_c; - if (flags & HAS_SSE2) vpx_highbd_12_sub_pixel_avg_variance32x16 = vpx_highbd_12_sub_pixel_avg_variance32x16_sse2; - vpx_highbd_12_sub_pixel_avg_variance32x32 = vpx_highbd_12_sub_pixel_avg_variance32x32_c; - if (flags & HAS_SSE2) vpx_highbd_12_sub_pixel_avg_variance32x32 = vpx_highbd_12_sub_pixel_avg_variance32x32_sse2; - vpx_highbd_12_sub_pixel_avg_variance32x64 = vpx_highbd_12_sub_pixel_avg_variance32x64_c; - if (flags & HAS_SSE2) vpx_highbd_12_sub_pixel_avg_variance32x64 = vpx_highbd_12_sub_pixel_avg_variance32x64_sse2; - vpx_highbd_12_sub_pixel_avg_variance64x32 = vpx_highbd_12_sub_pixel_avg_variance64x32_c; - if (flags & HAS_SSE2) vpx_highbd_12_sub_pixel_avg_variance64x32 = vpx_highbd_12_sub_pixel_avg_variance64x32_sse2; - vpx_highbd_12_sub_pixel_avg_variance64x64 = vpx_highbd_12_sub_pixel_avg_variance64x64_c; - if (flags & HAS_SSE2) vpx_highbd_12_sub_pixel_avg_variance64x64 = vpx_highbd_12_sub_pixel_avg_variance64x64_sse2; - vpx_highbd_12_sub_pixel_avg_variance8x16 = vpx_highbd_12_sub_pixel_avg_variance8x16_c; - if (flags & HAS_SSE2) vpx_highbd_12_sub_pixel_avg_variance8x16 = vpx_highbd_12_sub_pixel_avg_variance8x16_sse2; - vpx_highbd_12_sub_pixel_avg_variance8x4 = vpx_highbd_12_sub_pixel_avg_variance8x4_c; - if (flags & HAS_SSE2) vpx_highbd_12_sub_pixel_avg_variance8x4 = vpx_highbd_12_sub_pixel_avg_variance8x4_sse2; - vpx_highbd_12_sub_pixel_avg_variance8x8 = vpx_highbd_12_sub_pixel_avg_variance8x8_c; - if (flags & HAS_SSE2) vpx_highbd_12_sub_pixel_avg_variance8x8 = vpx_highbd_12_sub_pixel_avg_variance8x8_sse2; - vpx_highbd_12_sub_pixel_variance16x16 = vpx_highbd_12_sub_pixel_variance16x16_c; - if (flags & HAS_SSE2) vpx_highbd_12_sub_pixel_variance16x16 = vpx_highbd_12_sub_pixel_variance16x16_sse2; - vpx_highbd_12_sub_pixel_variance16x32 = vpx_highbd_12_sub_pixel_variance16x32_c; - if (flags & HAS_SSE2) vpx_highbd_12_sub_pixel_variance16x32 = vpx_highbd_12_sub_pixel_variance16x32_sse2; - vpx_highbd_12_sub_pixel_variance16x8 = vpx_highbd_12_sub_pixel_variance16x8_c; - if (flags & HAS_SSE2) vpx_highbd_12_sub_pixel_variance16x8 = vpx_highbd_12_sub_pixel_variance16x8_sse2; - vpx_highbd_12_sub_pixel_variance32x16 = vpx_highbd_12_sub_pixel_variance32x16_c; - if (flags & HAS_SSE2) vpx_highbd_12_sub_pixel_variance32x16 = vpx_highbd_12_sub_pixel_variance32x16_sse2; - vpx_highbd_12_sub_pixel_variance32x32 = vpx_highbd_12_sub_pixel_variance32x32_c; - if (flags & HAS_SSE2) vpx_highbd_12_sub_pixel_variance32x32 = vpx_highbd_12_sub_pixel_variance32x32_sse2; - vpx_highbd_12_sub_pixel_variance32x64 = vpx_highbd_12_sub_pixel_variance32x64_c; - if (flags & HAS_SSE2) vpx_highbd_12_sub_pixel_variance32x64 = vpx_highbd_12_sub_pixel_variance32x64_sse2; - vpx_highbd_12_sub_pixel_variance64x32 = vpx_highbd_12_sub_pixel_variance64x32_c; - if (flags & HAS_SSE2) vpx_highbd_12_sub_pixel_variance64x32 = vpx_highbd_12_sub_pixel_variance64x32_sse2; - vpx_highbd_12_sub_pixel_variance64x64 = vpx_highbd_12_sub_pixel_variance64x64_c; - if (flags & HAS_SSE2) vpx_highbd_12_sub_pixel_variance64x64 = vpx_highbd_12_sub_pixel_variance64x64_sse2; - vpx_highbd_12_sub_pixel_variance8x16 = vpx_highbd_12_sub_pixel_variance8x16_c; - if (flags & HAS_SSE2) vpx_highbd_12_sub_pixel_variance8x16 = vpx_highbd_12_sub_pixel_variance8x16_sse2; - vpx_highbd_12_sub_pixel_variance8x4 = vpx_highbd_12_sub_pixel_variance8x4_c; - if (flags & HAS_SSE2) vpx_highbd_12_sub_pixel_variance8x4 = vpx_highbd_12_sub_pixel_variance8x4_sse2; - vpx_highbd_12_sub_pixel_variance8x8 = vpx_highbd_12_sub_pixel_variance8x8_c; - if (flags & HAS_SSE2) vpx_highbd_12_sub_pixel_variance8x8 = vpx_highbd_12_sub_pixel_variance8x8_sse2; - vpx_highbd_12_variance16x16 = vpx_highbd_12_variance16x16_c; - if (flags & HAS_SSE2) vpx_highbd_12_variance16x16 = vpx_highbd_12_variance16x16_sse2; - vpx_highbd_12_variance16x32 = vpx_highbd_12_variance16x32_c; - if (flags & HAS_SSE2) vpx_highbd_12_variance16x32 = vpx_highbd_12_variance16x32_sse2; - vpx_highbd_12_variance16x8 = vpx_highbd_12_variance16x8_c; - if (flags & HAS_SSE2) vpx_highbd_12_variance16x8 = vpx_highbd_12_variance16x8_sse2; - vpx_highbd_12_variance32x16 = vpx_highbd_12_variance32x16_c; - if (flags & HAS_SSE2) vpx_highbd_12_variance32x16 = vpx_highbd_12_variance32x16_sse2; - vpx_highbd_12_variance32x32 = vpx_highbd_12_variance32x32_c; - if (flags & HAS_SSE2) vpx_highbd_12_variance32x32 = vpx_highbd_12_variance32x32_sse2; - vpx_highbd_12_variance32x64 = vpx_highbd_12_variance32x64_c; - if (flags & HAS_SSE2) vpx_highbd_12_variance32x64 = vpx_highbd_12_variance32x64_sse2; - vpx_highbd_12_variance64x32 = vpx_highbd_12_variance64x32_c; - if (flags & HAS_SSE2) vpx_highbd_12_variance64x32 = vpx_highbd_12_variance64x32_sse2; - vpx_highbd_12_variance64x64 = vpx_highbd_12_variance64x64_c; - if (flags & HAS_SSE2) vpx_highbd_12_variance64x64 = vpx_highbd_12_variance64x64_sse2; - vpx_highbd_12_variance8x16 = vpx_highbd_12_variance8x16_c; - if (flags & HAS_SSE2) vpx_highbd_12_variance8x16 = vpx_highbd_12_variance8x16_sse2; - vpx_highbd_12_variance8x8 = vpx_highbd_12_variance8x8_c; - if (flags & HAS_SSE2) vpx_highbd_12_variance8x8 = vpx_highbd_12_variance8x8_sse2; - vpx_highbd_8_mse16x16 = vpx_highbd_8_mse16x16_c; - if (flags & HAS_SSE2) vpx_highbd_8_mse16x16 = vpx_highbd_8_mse16x16_sse2; - vpx_highbd_8_mse8x8 = vpx_highbd_8_mse8x8_c; - if (flags & HAS_SSE2) vpx_highbd_8_mse8x8 = vpx_highbd_8_mse8x8_sse2; - vpx_highbd_8_sub_pixel_avg_variance16x16 = vpx_highbd_8_sub_pixel_avg_variance16x16_c; - if (flags & HAS_SSE2) vpx_highbd_8_sub_pixel_avg_variance16x16 = vpx_highbd_8_sub_pixel_avg_variance16x16_sse2; - vpx_highbd_8_sub_pixel_avg_variance16x32 = vpx_highbd_8_sub_pixel_avg_variance16x32_c; - if (flags & HAS_SSE2) vpx_highbd_8_sub_pixel_avg_variance16x32 = vpx_highbd_8_sub_pixel_avg_variance16x32_sse2; - vpx_highbd_8_sub_pixel_avg_variance16x8 = vpx_highbd_8_sub_pixel_avg_variance16x8_c; - if (flags & HAS_SSE2) vpx_highbd_8_sub_pixel_avg_variance16x8 = vpx_highbd_8_sub_pixel_avg_variance16x8_sse2; - vpx_highbd_8_sub_pixel_avg_variance32x16 = vpx_highbd_8_sub_pixel_avg_variance32x16_c; - if (flags & HAS_SSE2) vpx_highbd_8_sub_pixel_avg_variance32x16 = vpx_highbd_8_sub_pixel_avg_variance32x16_sse2; - vpx_highbd_8_sub_pixel_avg_variance32x32 = vpx_highbd_8_sub_pixel_avg_variance32x32_c; - if (flags & HAS_SSE2) vpx_highbd_8_sub_pixel_avg_variance32x32 = vpx_highbd_8_sub_pixel_avg_variance32x32_sse2; - vpx_highbd_8_sub_pixel_avg_variance32x64 = vpx_highbd_8_sub_pixel_avg_variance32x64_c; - if (flags & HAS_SSE2) vpx_highbd_8_sub_pixel_avg_variance32x64 = vpx_highbd_8_sub_pixel_avg_variance32x64_sse2; - vpx_highbd_8_sub_pixel_avg_variance64x32 = vpx_highbd_8_sub_pixel_avg_variance64x32_c; - if (flags & HAS_SSE2) vpx_highbd_8_sub_pixel_avg_variance64x32 = vpx_highbd_8_sub_pixel_avg_variance64x32_sse2; - vpx_highbd_8_sub_pixel_avg_variance64x64 = vpx_highbd_8_sub_pixel_avg_variance64x64_c; - if (flags & HAS_SSE2) vpx_highbd_8_sub_pixel_avg_variance64x64 = vpx_highbd_8_sub_pixel_avg_variance64x64_sse2; - vpx_highbd_8_sub_pixel_avg_variance8x16 = vpx_highbd_8_sub_pixel_avg_variance8x16_c; - if (flags & HAS_SSE2) vpx_highbd_8_sub_pixel_avg_variance8x16 = vpx_highbd_8_sub_pixel_avg_variance8x16_sse2; - vpx_highbd_8_sub_pixel_avg_variance8x4 = vpx_highbd_8_sub_pixel_avg_variance8x4_c; - if (flags & HAS_SSE2) vpx_highbd_8_sub_pixel_avg_variance8x4 = vpx_highbd_8_sub_pixel_avg_variance8x4_sse2; - vpx_highbd_8_sub_pixel_avg_variance8x8 = vpx_highbd_8_sub_pixel_avg_variance8x8_c; - if (flags & HAS_SSE2) vpx_highbd_8_sub_pixel_avg_variance8x8 = vpx_highbd_8_sub_pixel_avg_variance8x8_sse2; - vpx_highbd_8_sub_pixel_variance16x16 = vpx_highbd_8_sub_pixel_variance16x16_c; - if (flags & HAS_SSE2) vpx_highbd_8_sub_pixel_variance16x16 = vpx_highbd_8_sub_pixel_variance16x16_sse2; - vpx_highbd_8_sub_pixel_variance16x32 = vpx_highbd_8_sub_pixel_variance16x32_c; - if (flags & HAS_SSE2) vpx_highbd_8_sub_pixel_variance16x32 = vpx_highbd_8_sub_pixel_variance16x32_sse2; - vpx_highbd_8_sub_pixel_variance16x8 = vpx_highbd_8_sub_pixel_variance16x8_c; - if (flags & HAS_SSE2) vpx_highbd_8_sub_pixel_variance16x8 = vpx_highbd_8_sub_pixel_variance16x8_sse2; - vpx_highbd_8_sub_pixel_variance32x16 = vpx_highbd_8_sub_pixel_variance32x16_c; - if (flags & HAS_SSE2) vpx_highbd_8_sub_pixel_variance32x16 = vpx_highbd_8_sub_pixel_variance32x16_sse2; - vpx_highbd_8_sub_pixel_variance32x32 = vpx_highbd_8_sub_pixel_variance32x32_c; - if (flags & HAS_SSE2) vpx_highbd_8_sub_pixel_variance32x32 = vpx_highbd_8_sub_pixel_variance32x32_sse2; - vpx_highbd_8_sub_pixel_variance32x64 = vpx_highbd_8_sub_pixel_variance32x64_c; - if (flags & HAS_SSE2) vpx_highbd_8_sub_pixel_variance32x64 = vpx_highbd_8_sub_pixel_variance32x64_sse2; - vpx_highbd_8_sub_pixel_variance64x32 = vpx_highbd_8_sub_pixel_variance64x32_c; - if (flags & HAS_SSE2) vpx_highbd_8_sub_pixel_variance64x32 = vpx_highbd_8_sub_pixel_variance64x32_sse2; - vpx_highbd_8_sub_pixel_variance64x64 = vpx_highbd_8_sub_pixel_variance64x64_c; - if (flags & HAS_SSE2) vpx_highbd_8_sub_pixel_variance64x64 = vpx_highbd_8_sub_pixel_variance64x64_sse2; - vpx_highbd_8_sub_pixel_variance8x16 = vpx_highbd_8_sub_pixel_variance8x16_c; - if (flags & HAS_SSE2) vpx_highbd_8_sub_pixel_variance8x16 = vpx_highbd_8_sub_pixel_variance8x16_sse2; - vpx_highbd_8_sub_pixel_variance8x4 = vpx_highbd_8_sub_pixel_variance8x4_c; - if (flags & HAS_SSE2) vpx_highbd_8_sub_pixel_variance8x4 = vpx_highbd_8_sub_pixel_variance8x4_sse2; - vpx_highbd_8_sub_pixel_variance8x8 = vpx_highbd_8_sub_pixel_variance8x8_c; - if (flags & HAS_SSE2) vpx_highbd_8_sub_pixel_variance8x8 = vpx_highbd_8_sub_pixel_variance8x8_sse2; - vpx_highbd_8_variance16x16 = vpx_highbd_8_variance16x16_c; - if (flags & HAS_SSE2) vpx_highbd_8_variance16x16 = vpx_highbd_8_variance16x16_sse2; - vpx_highbd_8_variance16x32 = vpx_highbd_8_variance16x32_c; - if (flags & HAS_SSE2) vpx_highbd_8_variance16x32 = vpx_highbd_8_variance16x32_sse2; - vpx_highbd_8_variance16x8 = vpx_highbd_8_variance16x8_c; - if (flags & HAS_SSE2) vpx_highbd_8_variance16x8 = vpx_highbd_8_variance16x8_sse2; - vpx_highbd_8_variance32x16 = vpx_highbd_8_variance32x16_c; - if (flags & HAS_SSE2) vpx_highbd_8_variance32x16 = vpx_highbd_8_variance32x16_sse2; - vpx_highbd_8_variance32x32 = vpx_highbd_8_variance32x32_c; - if (flags & HAS_SSE2) vpx_highbd_8_variance32x32 = vpx_highbd_8_variance32x32_sse2; - vpx_highbd_8_variance32x64 = vpx_highbd_8_variance32x64_c; - if (flags & HAS_SSE2) vpx_highbd_8_variance32x64 = vpx_highbd_8_variance32x64_sse2; - vpx_highbd_8_variance64x32 = vpx_highbd_8_variance64x32_c; - if (flags & HAS_SSE2) vpx_highbd_8_variance64x32 = vpx_highbd_8_variance64x32_sse2; - vpx_highbd_8_variance64x64 = vpx_highbd_8_variance64x64_c; - if (flags & HAS_SSE2) vpx_highbd_8_variance64x64 = vpx_highbd_8_variance64x64_sse2; - vpx_highbd_8_variance8x16 = vpx_highbd_8_variance8x16_c; - if (flags & HAS_SSE2) vpx_highbd_8_variance8x16 = vpx_highbd_8_variance8x16_sse2; - vpx_highbd_8_variance8x8 = vpx_highbd_8_variance8x8_c; - if (flags & HAS_SSE2) vpx_highbd_8_variance8x8 = vpx_highbd_8_variance8x8_sse2; - vpx_highbd_convolve_avg = vpx_highbd_convolve_avg_c; - if (flags & HAS_SSE2) vpx_highbd_convolve_avg = vpx_highbd_convolve_avg_sse2; - vpx_highbd_convolve_copy = vpx_highbd_convolve_copy_c; - if (flags & HAS_SSE2) vpx_highbd_convolve_copy = vpx_highbd_convolve_copy_sse2; - vpx_highbd_dc_predictor_16x16 = vpx_highbd_dc_predictor_16x16_c; - if (flags & HAS_SSE2) vpx_highbd_dc_predictor_16x16 = vpx_highbd_dc_predictor_16x16_sse2; - vpx_highbd_dc_predictor_32x32 = vpx_highbd_dc_predictor_32x32_c; - if (flags & HAS_SSE2) vpx_highbd_dc_predictor_32x32 = vpx_highbd_dc_predictor_32x32_sse2; - vpx_highbd_dc_predictor_4x4 = vpx_highbd_dc_predictor_4x4_c; - if (flags & HAS_SSE2) vpx_highbd_dc_predictor_4x4 = vpx_highbd_dc_predictor_4x4_sse2; - vpx_highbd_dc_predictor_8x8 = vpx_highbd_dc_predictor_8x8_c; - if (flags & HAS_SSE2) vpx_highbd_dc_predictor_8x8 = vpx_highbd_dc_predictor_8x8_sse2; - vpx_highbd_fdct16x16 = vpx_highbd_fdct16x16_c; - if (flags & HAS_SSE2) vpx_highbd_fdct16x16 = vpx_highbd_fdct16x16_sse2; - vpx_highbd_fdct32x32 = vpx_highbd_fdct32x32_c; - if (flags & HAS_SSE2) vpx_highbd_fdct32x32 = vpx_highbd_fdct32x32_sse2; - vpx_highbd_fdct32x32_rd = vpx_highbd_fdct32x32_rd_c; - if (flags & HAS_SSE2) vpx_highbd_fdct32x32_rd = vpx_highbd_fdct32x32_rd_sse2; - vpx_highbd_fdct4x4 = vpx_highbd_fdct4x4_c; - if (flags & HAS_SSE2) vpx_highbd_fdct4x4 = vpx_highbd_fdct4x4_sse2; - vpx_highbd_fdct8x8 = vpx_highbd_fdct8x8_c; - if (flags & HAS_SSE2) vpx_highbd_fdct8x8 = vpx_highbd_fdct8x8_sse2; - vpx_highbd_idct16x16_10_add = vpx_highbd_idct16x16_10_add_c; - if (flags & HAS_SSE2) vpx_highbd_idct16x16_10_add = vpx_highbd_idct16x16_10_add_sse2; - vpx_highbd_idct16x16_256_add = vpx_highbd_idct16x16_256_add_c; - if (flags & HAS_SSE2) vpx_highbd_idct16x16_256_add = vpx_highbd_idct16x16_256_add_sse2; - vpx_highbd_idct32x32_1_add = vpx_highbd_idct32x32_1_add_c; - if (flags & HAS_SSE2) vpx_highbd_idct32x32_1_add = vpx_highbd_idct32x32_1_add_sse2; - vpx_highbd_idct4x4_16_add = vpx_highbd_idct4x4_16_add_c; - if (flags & HAS_SSE2) vpx_highbd_idct4x4_16_add = vpx_highbd_idct4x4_16_add_sse2; - vpx_highbd_idct8x8_12_add = vpx_highbd_idct8x8_12_add_c; - if (flags & HAS_SSE2) vpx_highbd_idct8x8_12_add = vpx_highbd_idct8x8_12_add_sse2; - vpx_highbd_idct8x8_64_add = vpx_highbd_idct8x8_64_add_c; - if (flags & HAS_SSE2) vpx_highbd_idct8x8_64_add = vpx_highbd_idct8x8_64_add_sse2; - vpx_highbd_lpf_horizontal_16 = vpx_highbd_lpf_horizontal_16_c; - if (flags & HAS_SSE2) vpx_highbd_lpf_horizontal_16 = vpx_highbd_lpf_horizontal_16_sse2; - vpx_highbd_lpf_horizontal_16_dual = vpx_highbd_lpf_horizontal_16_dual_c; - if (flags & HAS_SSE2) vpx_highbd_lpf_horizontal_16_dual = vpx_highbd_lpf_horizontal_16_dual_sse2; - vpx_highbd_lpf_horizontal_4 = vpx_highbd_lpf_horizontal_4_c; - if (flags & HAS_SSE2) vpx_highbd_lpf_horizontal_4 = vpx_highbd_lpf_horizontal_4_sse2; - vpx_highbd_lpf_horizontal_4_dual = vpx_highbd_lpf_horizontal_4_dual_c; - if (flags & HAS_SSE2) vpx_highbd_lpf_horizontal_4_dual = vpx_highbd_lpf_horizontal_4_dual_sse2; - vpx_highbd_lpf_horizontal_8 = vpx_highbd_lpf_horizontal_8_c; - if (flags & HAS_SSE2) vpx_highbd_lpf_horizontal_8 = vpx_highbd_lpf_horizontal_8_sse2; - vpx_highbd_lpf_horizontal_8_dual = vpx_highbd_lpf_horizontal_8_dual_c; - if (flags & HAS_SSE2) vpx_highbd_lpf_horizontal_8_dual = vpx_highbd_lpf_horizontal_8_dual_sse2; - vpx_highbd_lpf_vertical_16 = vpx_highbd_lpf_vertical_16_c; - if (flags & HAS_SSE2) vpx_highbd_lpf_vertical_16 = vpx_highbd_lpf_vertical_16_sse2; - vpx_highbd_lpf_vertical_16_dual = vpx_highbd_lpf_vertical_16_dual_c; - if (flags & HAS_SSE2) vpx_highbd_lpf_vertical_16_dual = vpx_highbd_lpf_vertical_16_dual_sse2; - vpx_highbd_lpf_vertical_4 = vpx_highbd_lpf_vertical_4_c; - if (flags & HAS_SSE2) vpx_highbd_lpf_vertical_4 = vpx_highbd_lpf_vertical_4_sse2; - vpx_highbd_lpf_vertical_4_dual = vpx_highbd_lpf_vertical_4_dual_c; - if (flags & HAS_SSE2) vpx_highbd_lpf_vertical_4_dual = vpx_highbd_lpf_vertical_4_dual_sse2; - vpx_highbd_lpf_vertical_8 = vpx_highbd_lpf_vertical_8_c; - if (flags & HAS_SSE2) vpx_highbd_lpf_vertical_8 = vpx_highbd_lpf_vertical_8_sse2; - vpx_highbd_lpf_vertical_8_dual = vpx_highbd_lpf_vertical_8_dual_c; - if (flags & HAS_SSE2) vpx_highbd_lpf_vertical_8_dual = vpx_highbd_lpf_vertical_8_dual_sse2; - vpx_highbd_quantize_b = vpx_highbd_quantize_b_c; - if (flags & HAS_SSE2) vpx_highbd_quantize_b = vpx_highbd_quantize_b_sse2; - vpx_highbd_quantize_b_32x32 = vpx_highbd_quantize_b_32x32_c; - if (flags & HAS_SSE2) vpx_highbd_quantize_b_32x32 = vpx_highbd_quantize_b_32x32_sse2; - vpx_highbd_sad16x16 = vpx_highbd_sad16x16_c; - if (flags & HAS_SSE2) vpx_highbd_sad16x16 = vpx_highbd_sad16x16_sse2; - vpx_highbd_sad16x16_avg = vpx_highbd_sad16x16_avg_c; - if (flags & HAS_SSE2) vpx_highbd_sad16x16_avg = vpx_highbd_sad16x16_avg_sse2; - vpx_highbd_sad16x16x4d = vpx_highbd_sad16x16x4d_c; - if (flags & HAS_SSE2) vpx_highbd_sad16x16x4d = vpx_highbd_sad16x16x4d_sse2; - vpx_highbd_sad16x32 = vpx_highbd_sad16x32_c; - if (flags & HAS_SSE2) vpx_highbd_sad16x32 = vpx_highbd_sad16x32_sse2; - vpx_highbd_sad16x32_avg = vpx_highbd_sad16x32_avg_c; - if (flags & HAS_SSE2) vpx_highbd_sad16x32_avg = vpx_highbd_sad16x32_avg_sse2; - vpx_highbd_sad16x32x4d = vpx_highbd_sad16x32x4d_c; - if (flags & HAS_SSE2) vpx_highbd_sad16x32x4d = vpx_highbd_sad16x32x4d_sse2; - vpx_highbd_sad16x8 = vpx_highbd_sad16x8_c; - if (flags & HAS_SSE2) vpx_highbd_sad16x8 = vpx_highbd_sad16x8_sse2; - vpx_highbd_sad16x8_avg = vpx_highbd_sad16x8_avg_c; - if (flags & HAS_SSE2) vpx_highbd_sad16x8_avg = vpx_highbd_sad16x8_avg_sse2; - vpx_highbd_sad16x8x4d = vpx_highbd_sad16x8x4d_c; - if (flags & HAS_SSE2) vpx_highbd_sad16x8x4d = vpx_highbd_sad16x8x4d_sse2; - vpx_highbd_sad32x16 = vpx_highbd_sad32x16_c; - if (flags & HAS_SSE2) vpx_highbd_sad32x16 = vpx_highbd_sad32x16_sse2; - vpx_highbd_sad32x16_avg = vpx_highbd_sad32x16_avg_c; - if (flags & HAS_SSE2) vpx_highbd_sad32x16_avg = vpx_highbd_sad32x16_avg_sse2; - vpx_highbd_sad32x16x4d = vpx_highbd_sad32x16x4d_c; - if (flags & HAS_SSE2) vpx_highbd_sad32x16x4d = vpx_highbd_sad32x16x4d_sse2; - vpx_highbd_sad32x32 = vpx_highbd_sad32x32_c; - if (flags & HAS_SSE2) vpx_highbd_sad32x32 = vpx_highbd_sad32x32_sse2; - vpx_highbd_sad32x32_avg = vpx_highbd_sad32x32_avg_c; - if (flags & HAS_SSE2) vpx_highbd_sad32x32_avg = vpx_highbd_sad32x32_avg_sse2; - vpx_highbd_sad32x32x4d = vpx_highbd_sad32x32x4d_c; - if (flags & HAS_SSE2) vpx_highbd_sad32x32x4d = vpx_highbd_sad32x32x4d_sse2; - vpx_highbd_sad32x64 = vpx_highbd_sad32x64_c; - if (flags & HAS_SSE2) vpx_highbd_sad32x64 = vpx_highbd_sad32x64_sse2; - vpx_highbd_sad32x64_avg = vpx_highbd_sad32x64_avg_c; - if (flags & HAS_SSE2) vpx_highbd_sad32x64_avg = vpx_highbd_sad32x64_avg_sse2; - vpx_highbd_sad32x64x4d = vpx_highbd_sad32x64x4d_c; - if (flags & HAS_SSE2) vpx_highbd_sad32x64x4d = vpx_highbd_sad32x64x4d_sse2; - vpx_highbd_sad4x4x4d = vpx_highbd_sad4x4x4d_c; - if (flags & HAS_SSE2) vpx_highbd_sad4x4x4d = vpx_highbd_sad4x4x4d_sse2; - vpx_highbd_sad4x8x4d = vpx_highbd_sad4x8x4d_c; - if (flags & HAS_SSE2) vpx_highbd_sad4x8x4d = vpx_highbd_sad4x8x4d_sse2; - vpx_highbd_sad64x32 = vpx_highbd_sad64x32_c; - if (flags & HAS_SSE2) vpx_highbd_sad64x32 = vpx_highbd_sad64x32_sse2; - vpx_highbd_sad64x32_avg = vpx_highbd_sad64x32_avg_c; - if (flags & HAS_SSE2) vpx_highbd_sad64x32_avg = vpx_highbd_sad64x32_avg_sse2; - vpx_highbd_sad64x32x4d = vpx_highbd_sad64x32x4d_c; - if (flags & HAS_SSE2) vpx_highbd_sad64x32x4d = vpx_highbd_sad64x32x4d_sse2; - vpx_highbd_sad64x64 = vpx_highbd_sad64x64_c; - if (flags & HAS_SSE2) vpx_highbd_sad64x64 = vpx_highbd_sad64x64_sse2; - vpx_highbd_sad64x64_avg = vpx_highbd_sad64x64_avg_c; - if (flags & HAS_SSE2) vpx_highbd_sad64x64_avg = vpx_highbd_sad64x64_avg_sse2; - vpx_highbd_sad64x64x4d = vpx_highbd_sad64x64x4d_c; - if (flags & HAS_SSE2) vpx_highbd_sad64x64x4d = vpx_highbd_sad64x64x4d_sse2; - vpx_highbd_sad8x16 = vpx_highbd_sad8x16_c; - if (flags & HAS_SSE2) vpx_highbd_sad8x16 = vpx_highbd_sad8x16_sse2; - vpx_highbd_sad8x16_avg = vpx_highbd_sad8x16_avg_c; - if (flags & HAS_SSE2) vpx_highbd_sad8x16_avg = vpx_highbd_sad8x16_avg_sse2; - vpx_highbd_sad8x16x4d = vpx_highbd_sad8x16x4d_c; - if (flags & HAS_SSE2) vpx_highbd_sad8x16x4d = vpx_highbd_sad8x16x4d_sse2; - vpx_highbd_sad8x4 = vpx_highbd_sad8x4_c; - if (flags & HAS_SSE2) vpx_highbd_sad8x4 = vpx_highbd_sad8x4_sse2; - vpx_highbd_sad8x4_avg = vpx_highbd_sad8x4_avg_c; - if (flags & HAS_SSE2) vpx_highbd_sad8x4_avg = vpx_highbd_sad8x4_avg_sse2; - vpx_highbd_sad8x4x4d = vpx_highbd_sad8x4x4d_c; - if (flags & HAS_SSE2) vpx_highbd_sad8x4x4d = vpx_highbd_sad8x4x4d_sse2; - vpx_highbd_sad8x8 = vpx_highbd_sad8x8_c; - if (flags & HAS_SSE2) vpx_highbd_sad8x8 = vpx_highbd_sad8x8_sse2; - vpx_highbd_sad8x8_avg = vpx_highbd_sad8x8_avg_c; - if (flags & HAS_SSE2) vpx_highbd_sad8x8_avg = vpx_highbd_sad8x8_avg_sse2; - vpx_highbd_sad8x8x4d = vpx_highbd_sad8x8x4d_c; - if (flags & HAS_SSE2) vpx_highbd_sad8x8x4d = vpx_highbd_sad8x8x4d_sse2; - vpx_highbd_tm_predictor_16x16 = vpx_highbd_tm_predictor_16x16_c; - if (flags & HAS_SSE2) vpx_highbd_tm_predictor_16x16 = vpx_highbd_tm_predictor_16x16_sse2; - vpx_highbd_tm_predictor_32x32 = vpx_highbd_tm_predictor_32x32_c; - if (flags & HAS_SSE2) vpx_highbd_tm_predictor_32x32 = vpx_highbd_tm_predictor_32x32_sse2; - vpx_highbd_tm_predictor_4x4 = vpx_highbd_tm_predictor_4x4_c; - if (flags & HAS_SSE2) vpx_highbd_tm_predictor_4x4 = vpx_highbd_tm_predictor_4x4_sse2; - vpx_highbd_tm_predictor_8x8 = vpx_highbd_tm_predictor_8x8_c; - if (flags & HAS_SSE2) vpx_highbd_tm_predictor_8x8 = vpx_highbd_tm_predictor_8x8_sse2; - vpx_highbd_v_predictor_16x16 = vpx_highbd_v_predictor_16x16_c; - if (flags & HAS_SSE2) vpx_highbd_v_predictor_16x16 = vpx_highbd_v_predictor_16x16_sse2; - vpx_highbd_v_predictor_32x32 = vpx_highbd_v_predictor_32x32_c; - if (flags & HAS_SSE2) vpx_highbd_v_predictor_32x32 = vpx_highbd_v_predictor_32x32_sse2; - vpx_highbd_v_predictor_4x4 = vpx_highbd_v_predictor_4x4_c; - if (flags & HAS_SSE2) vpx_highbd_v_predictor_4x4 = vpx_highbd_v_predictor_4x4_sse2; - vpx_highbd_v_predictor_8x8 = vpx_highbd_v_predictor_8x8_c; - if (flags & HAS_SSE2) vpx_highbd_v_predictor_8x8 = vpx_highbd_v_predictor_8x8_sse2; - vpx_idct16x16_10_add = vpx_idct16x16_10_add_c; - if (flags & HAS_SSE2) vpx_idct16x16_10_add = vpx_idct16x16_10_add_sse2; - vpx_idct16x16_1_add = vpx_idct16x16_1_add_c; - if (flags & HAS_SSE2) vpx_idct16x16_1_add = vpx_idct16x16_1_add_sse2; - vpx_idct16x16_256_add = vpx_idct16x16_256_add_c; - if (flags & HAS_SSE2) vpx_idct16x16_256_add = vpx_idct16x16_256_add_sse2; - vpx_idct32x32_1024_add = vpx_idct32x32_1024_add_c; - if (flags & HAS_SSE2) vpx_idct32x32_1024_add = vpx_idct32x32_1024_add_sse2; - vpx_idct32x32_135_add = vpx_idct32x32_135_add_c; - if (flags & HAS_SSE2) vpx_idct32x32_135_add = vpx_idct32x32_1024_add_sse2; - vpx_idct32x32_1_add = vpx_idct32x32_1_add_c; - if (flags & HAS_SSE2) vpx_idct32x32_1_add = vpx_idct32x32_1_add_sse2; - vpx_idct32x32_34_add = vpx_idct32x32_34_add_c; - if (flags & HAS_SSE2) vpx_idct32x32_34_add = vpx_idct32x32_34_add_sse2; - vpx_idct4x4_16_add = vpx_idct4x4_16_add_c; - if (flags & HAS_SSE2) vpx_idct4x4_16_add = vpx_idct4x4_16_add_sse2; - vpx_idct4x4_1_add = vpx_idct4x4_1_add_c; - if (flags & HAS_SSE2) vpx_idct4x4_1_add = vpx_idct4x4_1_add_sse2; - vpx_idct8x8_12_add = vpx_idct8x8_12_add_c; - if (flags & HAS_SSE2) vpx_idct8x8_12_add = vpx_idct8x8_12_add_sse2; - vpx_idct8x8_1_add = vpx_idct8x8_1_add_c; - if (flags & HAS_SSE2) vpx_idct8x8_1_add = vpx_idct8x8_1_add_sse2; - vpx_idct8x8_64_add = vpx_idct8x8_64_add_c; - if (flags & HAS_SSE2) vpx_idct8x8_64_add = vpx_idct8x8_64_add_sse2; - vpx_int_pro_col = vpx_int_pro_col_c; - if (flags & HAS_SSE2) vpx_int_pro_col = vpx_int_pro_col_sse2; - vpx_int_pro_row = vpx_int_pro_row_c; - if (flags & HAS_SSE2) vpx_int_pro_row = vpx_int_pro_row_sse2; - vpx_iwht4x4_16_add = vpx_iwht4x4_16_add_c; - if (flags & HAS_SSE2) vpx_iwht4x4_16_add = vpx_iwht4x4_16_add_sse2; - vpx_lpf_horizontal_16 = vpx_lpf_horizontal_16_c; - if (flags & HAS_SSE2) vpx_lpf_horizontal_16 = vpx_lpf_horizontal_16_sse2; - if (flags & HAS_AVX2) vpx_lpf_horizontal_16 = vpx_lpf_horizontal_16_avx2; - vpx_lpf_horizontal_16_dual = vpx_lpf_horizontal_16_dual_c; - if (flags & HAS_SSE2) vpx_lpf_horizontal_16_dual = vpx_lpf_horizontal_16_dual_sse2; - if (flags & HAS_AVX2) vpx_lpf_horizontal_16_dual = vpx_lpf_horizontal_16_dual_avx2; - vpx_lpf_horizontal_4 = vpx_lpf_horizontal_4_c; - if (flags & HAS_SSE2) vpx_lpf_horizontal_4 = vpx_lpf_horizontal_4_sse2; - vpx_lpf_horizontal_4_dual = vpx_lpf_horizontal_4_dual_c; - if (flags & HAS_SSE2) vpx_lpf_horizontal_4_dual = vpx_lpf_horizontal_4_dual_sse2; - vpx_lpf_horizontal_8 = vpx_lpf_horizontal_8_c; - if (flags & HAS_SSE2) vpx_lpf_horizontal_8 = vpx_lpf_horizontal_8_sse2; - vpx_lpf_horizontal_8_dual = vpx_lpf_horizontal_8_dual_c; - if (flags & HAS_SSE2) vpx_lpf_horizontal_8_dual = vpx_lpf_horizontal_8_dual_sse2; - vpx_lpf_vertical_16 = vpx_lpf_vertical_16_c; - if (flags & HAS_SSE2) vpx_lpf_vertical_16 = vpx_lpf_vertical_16_sse2; - vpx_lpf_vertical_16_dual = vpx_lpf_vertical_16_dual_c; - if (flags & HAS_SSE2) vpx_lpf_vertical_16_dual = vpx_lpf_vertical_16_dual_sse2; - vpx_lpf_vertical_4 = vpx_lpf_vertical_4_c; - if (flags & HAS_SSE2) vpx_lpf_vertical_4 = vpx_lpf_vertical_4_sse2; - vpx_lpf_vertical_4_dual = vpx_lpf_vertical_4_dual_c; - if (flags & HAS_SSE2) vpx_lpf_vertical_4_dual = vpx_lpf_vertical_4_dual_sse2; - vpx_lpf_vertical_8 = vpx_lpf_vertical_8_c; - if (flags & HAS_SSE2) vpx_lpf_vertical_8 = vpx_lpf_vertical_8_sse2; - vpx_lpf_vertical_8_dual = vpx_lpf_vertical_8_dual_c; - if (flags & HAS_SSE2) vpx_lpf_vertical_8_dual = vpx_lpf_vertical_8_dual_sse2; - vpx_mbpost_proc_across_ip = vpx_mbpost_proc_across_ip_c; - if (flags & HAS_SSE2) vpx_mbpost_proc_across_ip = vpx_mbpost_proc_across_ip_sse2; - vpx_mbpost_proc_down = vpx_mbpost_proc_down_c; - if (flags & HAS_SSE2) vpx_mbpost_proc_down = vpx_mbpost_proc_down_sse2; - vpx_minmax_8x8 = vpx_minmax_8x8_c; - if (flags & HAS_SSE2) vpx_minmax_8x8 = vpx_minmax_8x8_sse2; - vpx_mse16x16 = vpx_mse16x16_c; - if (flags & HAS_SSE2) vpx_mse16x16 = vpx_mse16x16_sse2; - if (flags & HAS_AVX2) vpx_mse16x16 = vpx_mse16x16_avx2; - vpx_mse16x8 = vpx_mse16x8_c; - if (flags & HAS_SSE2) vpx_mse16x8 = vpx_mse16x8_sse2; - vpx_mse8x16 = vpx_mse8x16_c; - if (flags & HAS_SSE2) vpx_mse8x16 = vpx_mse8x16_sse2; - vpx_mse8x8 = vpx_mse8x8_c; - if (flags & HAS_SSE2) vpx_mse8x8 = vpx_mse8x8_sse2; - vpx_plane_add_noise = vpx_plane_add_noise_c; - if (flags & HAS_SSE2) vpx_plane_add_noise = vpx_plane_add_noise_sse2; - vpx_post_proc_down_and_across_mb_row = vpx_post_proc_down_and_across_mb_row_c; - if (flags & HAS_SSE2) vpx_post_proc_down_and_across_mb_row = vpx_post_proc_down_and_across_mb_row_sse2; - vpx_quantize_b = vpx_quantize_b_c; - if (flags & HAS_SSE2) vpx_quantize_b = vpx_quantize_b_sse2; - vpx_sad16x16 = vpx_sad16x16_c; - if (flags & HAS_SSE2) vpx_sad16x16 = vpx_sad16x16_sse2; - vpx_sad16x16_avg = vpx_sad16x16_avg_c; - if (flags & HAS_SSE2) vpx_sad16x16_avg = vpx_sad16x16_avg_sse2; - vpx_sad16x16x3 = vpx_sad16x16x3_c; - if (flags & HAS_SSE3) vpx_sad16x16x3 = vpx_sad16x16x3_sse3; - if (flags & HAS_SSSE3) vpx_sad16x16x3 = vpx_sad16x16x3_ssse3; - vpx_sad16x16x4d = vpx_sad16x16x4d_c; - if (flags & HAS_SSE2) vpx_sad16x16x4d = vpx_sad16x16x4d_sse2; - vpx_sad16x16x8 = vpx_sad16x16x8_c; - if (flags & HAS_SSE4_1) vpx_sad16x16x8 = vpx_sad16x16x8_sse4_1; - vpx_sad16x32 = vpx_sad16x32_c; - if (flags & HAS_SSE2) vpx_sad16x32 = vpx_sad16x32_sse2; - vpx_sad16x32_avg = vpx_sad16x32_avg_c; - if (flags & HAS_SSE2) vpx_sad16x32_avg = vpx_sad16x32_avg_sse2; - vpx_sad16x32x4d = vpx_sad16x32x4d_c; - if (flags & HAS_SSE2) vpx_sad16x32x4d = vpx_sad16x32x4d_sse2; - vpx_sad16x8 = vpx_sad16x8_c; - if (flags & HAS_SSE2) vpx_sad16x8 = vpx_sad16x8_sse2; - vpx_sad16x8_avg = vpx_sad16x8_avg_c; - if (flags & HAS_SSE2) vpx_sad16x8_avg = vpx_sad16x8_avg_sse2; - vpx_sad16x8x3 = vpx_sad16x8x3_c; - if (flags & HAS_SSE3) vpx_sad16x8x3 = vpx_sad16x8x3_sse3; - if (flags & HAS_SSSE3) vpx_sad16x8x3 = vpx_sad16x8x3_ssse3; - vpx_sad16x8x4d = vpx_sad16x8x4d_c; - if (flags & HAS_SSE2) vpx_sad16x8x4d = vpx_sad16x8x4d_sse2; - vpx_sad16x8x8 = vpx_sad16x8x8_c; - if (flags & HAS_SSE4_1) vpx_sad16x8x8 = vpx_sad16x8x8_sse4_1; - vpx_sad32x16 = vpx_sad32x16_c; - if (flags & HAS_SSE2) vpx_sad32x16 = vpx_sad32x16_sse2; - if (flags & HAS_AVX2) vpx_sad32x16 = vpx_sad32x16_avx2; - vpx_sad32x16_avg = vpx_sad32x16_avg_c; - if (flags & HAS_SSE2) vpx_sad32x16_avg = vpx_sad32x16_avg_sse2; - if (flags & HAS_AVX2) vpx_sad32x16_avg = vpx_sad32x16_avg_avx2; - vpx_sad32x16x4d = vpx_sad32x16x4d_c; - if (flags & HAS_SSE2) vpx_sad32x16x4d = vpx_sad32x16x4d_sse2; - vpx_sad32x32 = vpx_sad32x32_c; - if (flags & HAS_SSE2) vpx_sad32x32 = vpx_sad32x32_sse2; - if (flags & HAS_AVX2) vpx_sad32x32 = vpx_sad32x32_avx2; - vpx_sad32x32_avg = vpx_sad32x32_avg_c; - if (flags & HAS_SSE2) vpx_sad32x32_avg = vpx_sad32x32_avg_sse2; - if (flags & HAS_AVX2) vpx_sad32x32_avg = vpx_sad32x32_avg_avx2; - vpx_sad32x32x4d = vpx_sad32x32x4d_c; - if (flags & HAS_SSE2) vpx_sad32x32x4d = vpx_sad32x32x4d_sse2; - if (flags & HAS_AVX2) vpx_sad32x32x4d = vpx_sad32x32x4d_avx2; - vpx_sad32x64 = vpx_sad32x64_c; - if (flags & HAS_SSE2) vpx_sad32x64 = vpx_sad32x64_sse2; - if (flags & HAS_AVX2) vpx_sad32x64 = vpx_sad32x64_avx2; - vpx_sad32x64_avg = vpx_sad32x64_avg_c; - if (flags & HAS_SSE2) vpx_sad32x64_avg = vpx_sad32x64_avg_sse2; - if (flags & HAS_AVX2) vpx_sad32x64_avg = vpx_sad32x64_avg_avx2; - vpx_sad32x64x4d = vpx_sad32x64x4d_c; - if (flags & HAS_SSE2) vpx_sad32x64x4d = vpx_sad32x64x4d_sse2; - vpx_sad4x4 = vpx_sad4x4_c; - if (flags & HAS_SSE2) vpx_sad4x4 = vpx_sad4x4_sse2; - vpx_sad4x4_avg = vpx_sad4x4_avg_c; - if (flags & HAS_SSE2) vpx_sad4x4_avg = vpx_sad4x4_avg_sse2; - vpx_sad4x4x3 = vpx_sad4x4x3_c; - if (flags & HAS_SSE3) vpx_sad4x4x3 = vpx_sad4x4x3_sse3; - vpx_sad4x4x4d = vpx_sad4x4x4d_c; - if (flags & HAS_SSE2) vpx_sad4x4x4d = vpx_sad4x4x4d_sse2; - vpx_sad4x4x8 = vpx_sad4x4x8_c; - if (flags & HAS_SSE4_1) vpx_sad4x4x8 = vpx_sad4x4x8_sse4_1; - vpx_sad4x8 = vpx_sad4x8_c; - if (flags & HAS_SSE2) vpx_sad4x8 = vpx_sad4x8_sse2; - vpx_sad4x8_avg = vpx_sad4x8_avg_c; - if (flags & HAS_SSE2) vpx_sad4x8_avg = vpx_sad4x8_avg_sse2; - vpx_sad4x8x4d = vpx_sad4x8x4d_c; - if (flags & HAS_SSE2) vpx_sad4x8x4d = vpx_sad4x8x4d_sse2; - vpx_sad64x32 = vpx_sad64x32_c; - if (flags & HAS_SSE2) vpx_sad64x32 = vpx_sad64x32_sse2; - if (flags & HAS_AVX2) vpx_sad64x32 = vpx_sad64x32_avx2; - vpx_sad64x32_avg = vpx_sad64x32_avg_c; - if (flags & HAS_SSE2) vpx_sad64x32_avg = vpx_sad64x32_avg_sse2; - if (flags & HAS_AVX2) vpx_sad64x32_avg = vpx_sad64x32_avg_avx2; - vpx_sad64x32x4d = vpx_sad64x32x4d_c; - if (flags & HAS_SSE2) vpx_sad64x32x4d = vpx_sad64x32x4d_sse2; - vpx_sad64x64 = vpx_sad64x64_c; - if (flags & HAS_SSE2) vpx_sad64x64 = vpx_sad64x64_sse2; - if (flags & HAS_AVX2) vpx_sad64x64 = vpx_sad64x64_avx2; - vpx_sad64x64_avg = vpx_sad64x64_avg_c; - if (flags & HAS_SSE2) vpx_sad64x64_avg = vpx_sad64x64_avg_sse2; - if (flags & HAS_AVX2) vpx_sad64x64_avg = vpx_sad64x64_avg_avx2; - vpx_sad64x64x4d = vpx_sad64x64x4d_c; - if (flags & HAS_SSE2) vpx_sad64x64x4d = vpx_sad64x64x4d_sse2; - if (flags & HAS_AVX2) vpx_sad64x64x4d = vpx_sad64x64x4d_avx2; - vpx_sad8x16 = vpx_sad8x16_c; - if (flags & HAS_SSE2) vpx_sad8x16 = vpx_sad8x16_sse2; - vpx_sad8x16_avg = vpx_sad8x16_avg_c; - if (flags & HAS_SSE2) vpx_sad8x16_avg = vpx_sad8x16_avg_sse2; - vpx_sad8x16x3 = vpx_sad8x16x3_c; - if (flags & HAS_SSE3) vpx_sad8x16x3 = vpx_sad8x16x3_sse3; - vpx_sad8x16x4d = vpx_sad8x16x4d_c; - if (flags & HAS_SSE2) vpx_sad8x16x4d = vpx_sad8x16x4d_sse2; - vpx_sad8x16x8 = vpx_sad8x16x8_c; - if (flags & HAS_SSE4_1) vpx_sad8x16x8 = vpx_sad8x16x8_sse4_1; - vpx_sad8x4 = vpx_sad8x4_c; - if (flags & HAS_SSE2) vpx_sad8x4 = vpx_sad8x4_sse2; - vpx_sad8x4_avg = vpx_sad8x4_avg_c; - if (flags & HAS_SSE2) vpx_sad8x4_avg = vpx_sad8x4_avg_sse2; - vpx_sad8x4x4d = vpx_sad8x4x4d_c; - if (flags & HAS_SSE2) vpx_sad8x4x4d = vpx_sad8x4x4d_sse2; - vpx_sad8x8 = vpx_sad8x8_c; - if (flags & HAS_SSE2) vpx_sad8x8 = vpx_sad8x8_sse2; - vpx_sad8x8_avg = vpx_sad8x8_avg_c; - if (flags & HAS_SSE2) vpx_sad8x8_avg = vpx_sad8x8_avg_sse2; - vpx_sad8x8x3 = vpx_sad8x8x3_c; - if (flags & HAS_SSE3) vpx_sad8x8x3 = vpx_sad8x8x3_sse3; - vpx_sad8x8x4d = vpx_sad8x8x4d_c; - if (flags & HAS_SSE2) vpx_sad8x8x4d = vpx_sad8x8x4d_sse2; - vpx_sad8x8x8 = vpx_sad8x8x8_c; - if (flags & HAS_SSE4_1) vpx_sad8x8x8 = vpx_sad8x8x8_sse4_1; - vpx_satd = vpx_satd_c; - if (flags & HAS_SSE2) vpx_satd = vpx_satd_sse2; - vpx_scaled_2d = vpx_scaled_2d_c; - if (flags & HAS_SSSE3) vpx_scaled_2d = vpx_scaled_2d_ssse3; - vpx_sub_pixel_avg_variance16x16 = vpx_sub_pixel_avg_variance16x16_c; - if (flags & HAS_SSE2) vpx_sub_pixel_avg_variance16x16 = vpx_sub_pixel_avg_variance16x16_sse2; - if (flags & HAS_SSSE3) vpx_sub_pixel_avg_variance16x16 = vpx_sub_pixel_avg_variance16x16_ssse3; - vpx_sub_pixel_avg_variance16x32 = vpx_sub_pixel_avg_variance16x32_c; - if (flags & HAS_SSE2) vpx_sub_pixel_avg_variance16x32 = vpx_sub_pixel_avg_variance16x32_sse2; - if (flags & HAS_SSSE3) vpx_sub_pixel_avg_variance16x32 = vpx_sub_pixel_avg_variance16x32_ssse3; - vpx_sub_pixel_avg_variance16x8 = vpx_sub_pixel_avg_variance16x8_c; - if (flags & HAS_SSE2) vpx_sub_pixel_avg_variance16x8 = vpx_sub_pixel_avg_variance16x8_sse2; - if (flags & HAS_SSSE3) vpx_sub_pixel_avg_variance16x8 = vpx_sub_pixel_avg_variance16x8_ssse3; - vpx_sub_pixel_avg_variance32x16 = vpx_sub_pixel_avg_variance32x16_c; - if (flags & HAS_SSE2) vpx_sub_pixel_avg_variance32x16 = vpx_sub_pixel_avg_variance32x16_sse2; - if (flags & HAS_SSSE3) vpx_sub_pixel_avg_variance32x16 = vpx_sub_pixel_avg_variance32x16_ssse3; - vpx_sub_pixel_avg_variance32x32 = vpx_sub_pixel_avg_variance32x32_c; - if (flags & HAS_SSE2) vpx_sub_pixel_avg_variance32x32 = vpx_sub_pixel_avg_variance32x32_sse2; - if (flags & HAS_SSSE3) vpx_sub_pixel_avg_variance32x32 = vpx_sub_pixel_avg_variance32x32_ssse3; - if (flags & HAS_AVX2) vpx_sub_pixel_avg_variance32x32 = vpx_sub_pixel_avg_variance32x32_avx2; - vpx_sub_pixel_avg_variance32x64 = vpx_sub_pixel_avg_variance32x64_c; - if (flags & HAS_SSE2) vpx_sub_pixel_avg_variance32x64 = vpx_sub_pixel_avg_variance32x64_sse2; - if (flags & HAS_SSSE3) vpx_sub_pixel_avg_variance32x64 = vpx_sub_pixel_avg_variance32x64_ssse3; - vpx_sub_pixel_avg_variance4x4 = vpx_sub_pixel_avg_variance4x4_c; - if (flags & HAS_SSE2) vpx_sub_pixel_avg_variance4x4 = vpx_sub_pixel_avg_variance4x4_sse2; - if (flags & HAS_SSSE3) vpx_sub_pixel_avg_variance4x4 = vpx_sub_pixel_avg_variance4x4_ssse3; - vpx_sub_pixel_avg_variance4x8 = vpx_sub_pixel_avg_variance4x8_c; - if (flags & HAS_SSE2) vpx_sub_pixel_avg_variance4x8 = vpx_sub_pixel_avg_variance4x8_sse2; - if (flags & HAS_SSSE3) vpx_sub_pixel_avg_variance4x8 = vpx_sub_pixel_avg_variance4x8_ssse3; - vpx_sub_pixel_avg_variance64x32 = vpx_sub_pixel_avg_variance64x32_c; - if (flags & HAS_SSE2) vpx_sub_pixel_avg_variance64x32 = vpx_sub_pixel_avg_variance64x32_sse2; - if (flags & HAS_SSSE3) vpx_sub_pixel_avg_variance64x32 = vpx_sub_pixel_avg_variance64x32_ssse3; - vpx_sub_pixel_avg_variance64x64 = vpx_sub_pixel_avg_variance64x64_c; - if (flags & HAS_SSE2) vpx_sub_pixel_avg_variance64x64 = vpx_sub_pixel_avg_variance64x64_sse2; - if (flags & HAS_SSSE3) vpx_sub_pixel_avg_variance64x64 = vpx_sub_pixel_avg_variance64x64_ssse3; - if (flags & HAS_AVX2) vpx_sub_pixel_avg_variance64x64 = vpx_sub_pixel_avg_variance64x64_avx2; - vpx_sub_pixel_avg_variance8x16 = vpx_sub_pixel_avg_variance8x16_c; - if (flags & HAS_SSE2) vpx_sub_pixel_avg_variance8x16 = vpx_sub_pixel_avg_variance8x16_sse2; - if (flags & HAS_SSSE3) vpx_sub_pixel_avg_variance8x16 = vpx_sub_pixel_avg_variance8x16_ssse3; - vpx_sub_pixel_avg_variance8x4 = vpx_sub_pixel_avg_variance8x4_c; - if (flags & HAS_SSE2) vpx_sub_pixel_avg_variance8x4 = vpx_sub_pixel_avg_variance8x4_sse2; - if (flags & HAS_SSSE3) vpx_sub_pixel_avg_variance8x4 = vpx_sub_pixel_avg_variance8x4_ssse3; - vpx_sub_pixel_avg_variance8x8 = vpx_sub_pixel_avg_variance8x8_c; - if (flags & HAS_SSE2) vpx_sub_pixel_avg_variance8x8 = vpx_sub_pixel_avg_variance8x8_sse2; - if (flags & HAS_SSSE3) vpx_sub_pixel_avg_variance8x8 = vpx_sub_pixel_avg_variance8x8_ssse3; - vpx_sub_pixel_variance16x16 = vpx_sub_pixel_variance16x16_c; - if (flags & HAS_SSE2) vpx_sub_pixel_variance16x16 = vpx_sub_pixel_variance16x16_sse2; - if (flags & HAS_SSSE3) vpx_sub_pixel_variance16x16 = vpx_sub_pixel_variance16x16_ssse3; - vpx_sub_pixel_variance16x32 = vpx_sub_pixel_variance16x32_c; - if (flags & HAS_SSE2) vpx_sub_pixel_variance16x32 = vpx_sub_pixel_variance16x32_sse2; - if (flags & HAS_SSSE3) vpx_sub_pixel_variance16x32 = vpx_sub_pixel_variance16x32_ssse3; - vpx_sub_pixel_variance16x8 = vpx_sub_pixel_variance16x8_c; - if (flags & HAS_SSE2) vpx_sub_pixel_variance16x8 = vpx_sub_pixel_variance16x8_sse2; - if (flags & HAS_SSSE3) vpx_sub_pixel_variance16x8 = vpx_sub_pixel_variance16x8_ssse3; - vpx_sub_pixel_variance32x16 = vpx_sub_pixel_variance32x16_c; - if (flags & HAS_SSE2) vpx_sub_pixel_variance32x16 = vpx_sub_pixel_variance32x16_sse2; - if (flags & HAS_SSSE3) vpx_sub_pixel_variance32x16 = vpx_sub_pixel_variance32x16_ssse3; - vpx_sub_pixel_variance32x32 = vpx_sub_pixel_variance32x32_c; - if (flags & HAS_SSE2) vpx_sub_pixel_variance32x32 = vpx_sub_pixel_variance32x32_sse2; - if (flags & HAS_SSSE3) vpx_sub_pixel_variance32x32 = vpx_sub_pixel_variance32x32_ssse3; - if (flags & HAS_AVX2) vpx_sub_pixel_variance32x32 = vpx_sub_pixel_variance32x32_avx2; - vpx_sub_pixel_variance32x64 = vpx_sub_pixel_variance32x64_c; - if (flags & HAS_SSE2) vpx_sub_pixel_variance32x64 = vpx_sub_pixel_variance32x64_sse2; - if (flags & HAS_SSSE3) vpx_sub_pixel_variance32x64 = vpx_sub_pixel_variance32x64_ssse3; - vpx_sub_pixel_variance4x4 = vpx_sub_pixel_variance4x4_c; - if (flags & HAS_SSE2) vpx_sub_pixel_variance4x4 = vpx_sub_pixel_variance4x4_sse2; - if (flags & HAS_SSSE3) vpx_sub_pixel_variance4x4 = vpx_sub_pixel_variance4x4_ssse3; - vpx_sub_pixel_variance4x8 = vpx_sub_pixel_variance4x8_c; - if (flags & HAS_SSE2) vpx_sub_pixel_variance4x8 = vpx_sub_pixel_variance4x8_sse2; - if (flags & HAS_SSSE3) vpx_sub_pixel_variance4x8 = vpx_sub_pixel_variance4x8_ssse3; - vpx_sub_pixel_variance64x32 = vpx_sub_pixel_variance64x32_c; - if (flags & HAS_SSE2) vpx_sub_pixel_variance64x32 = vpx_sub_pixel_variance64x32_sse2; - if (flags & HAS_SSSE3) vpx_sub_pixel_variance64x32 = vpx_sub_pixel_variance64x32_ssse3; - vpx_sub_pixel_variance64x64 = vpx_sub_pixel_variance64x64_c; - if (flags & HAS_SSE2) vpx_sub_pixel_variance64x64 = vpx_sub_pixel_variance64x64_sse2; - if (flags & HAS_SSSE3) vpx_sub_pixel_variance64x64 = vpx_sub_pixel_variance64x64_ssse3; - if (flags & HAS_AVX2) vpx_sub_pixel_variance64x64 = vpx_sub_pixel_variance64x64_avx2; - vpx_sub_pixel_variance8x16 = vpx_sub_pixel_variance8x16_c; - if (flags & HAS_SSE2) vpx_sub_pixel_variance8x16 = vpx_sub_pixel_variance8x16_sse2; - if (flags & HAS_SSSE3) vpx_sub_pixel_variance8x16 = vpx_sub_pixel_variance8x16_ssse3; - vpx_sub_pixel_variance8x4 = vpx_sub_pixel_variance8x4_c; - if (flags & HAS_SSE2) vpx_sub_pixel_variance8x4 = vpx_sub_pixel_variance8x4_sse2; - if (flags & HAS_SSSE3) vpx_sub_pixel_variance8x4 = vpx_sub_pixel_variance8x4_ssse3; - vpx_sub_pixel_variance8x8 = vpx_sub_pixel_variance8x8_c; - if (flags & HAS_SSE2) vpx_sub_pixel_variance8x8 = vpx_sub_pixel_variance8x8_sse2; - if (flags & HAS_SSSE3) vpx_sub_pixel_variance8x8 = vpx_sub_pixel_variance8x8_ssse3; - vpx_subtract_block = vpx_subtract_block_c; - if (flags & HAS_SSE2) vpx_subtract_block = vpx_subtract_block_sse2; - vpx_sum_squares_2d_i16 = vpx_sum_squares_2d_i16_c; - if (flags & HAS_SSE2) vpx_sum_squares_2d_i16 = vpx_sum_squares_2d_i16_sse2; - vpx_tm_predictor_16x16 = vpx_tm_predictor_16x16_c; - if (flags & HAS_SSE2) vpx_tm_predictor_16x16 = vpx_tm_predictor_16x16_sse2; - vpx_tm_predictor_32x32 = vpx_tm_predictor_32x32_c; - if (flags & HAS_SSE2) vpx_tm_predictor_32x32 = vpx_tm_predictor_32x32_sse2; - vpx_tm_predictor_4x4 = vpx_tm_predictor_4x4_c; - if (flags & HAS_SSE2) vpx_tm_predictor_4x4 = vpx_tm_predictor_4x4_sse2; - vpx_tm_predictor_8x8 = vpx_tm_predictor_8x8_c; - if (flags & HAS_SSE2) vpx_tm_predictor_8x8 = vpx_tm_predictor_8x8_sse2; - vpx_v_predictor_16x16 = vpx_v_predictor_16x16_c; - if (flags & HAS_SSE2) vpx_v_predictor_16x16 = vpx_v_predictor_16x16_sse2; - vpx_v_predictor_32x32 = vpx_v_predictor_32x32_c; - if (flags & HAS_SSE2) vpx_v_predictor_32x32 = vpx_v_predictor_32x32_sse2; - vpx_v_predictor_4x4 = vpx_v_predictor_4x4_c; - if (flags & HAS_SSE2) vpx_v_predictor_4x4 = vpx_v_predictor_4x4_sse2; - vpx_v_predictor_8x8 = vpx_v_predictor_8x8_c; - if (flags & HAS_SSE2) vpx_v_predictor_8x8 = vpx_v_predictor_8x8_sse2; - vpx_variance16x16 = vpx_variance16x16_c; - if (flags & HAS_SSE2) vpx_variance16x16 = vpx_variance16x16_sse2; - if (flags & HAS_AVX2) vpx_variance16x16 = vpx_variance16x16_avx2; - vpx_variance16x32 = vpx_variance16x32_c; - if (flags & HAS_SSE2) vpx_variance16x32 = vpx_variance16x32_sse2; - vpx_variance16x8 = vpx_variance16x8_c; - if (flags & HAS_SSE2) vpx_variance16x8 = vpx_variance16x8_sse2; - vpx_variance32x16 = vpx_variance32x16_c; - if (flags & HAS_SSE2) vpx_variance32x16 = vpx_variance32x16_sse2; - if (flags & HAS_AVX2) vpx_variance32x16 = vpx_variance32x16_avx2; - vpx_variance32x32 = vpx_variance32x32_c; - if (flags & HAS_SSE2) vpx_variance32x32 = vpx_variance32x32_sse2; - if (flags & HAS_AVX2) vpx_variance32x32 = vpx_variance32x32_avx2; - vpx_variance32x64 = vpx_variance32x64_c; - if (flags & HAS_SSE2) vpx_variance32x64 = vpx_variance32x64_sse2; - vpx_variance4x4 = vpx_variance4x4_c; - if (flags & HAS_SSE2) vpx_variance4x4 = vpx_variance4x4_sse2; - vpx_variance4x8 = vpx_variance4x8_c; - if (flags & HAS_SSE2) vpx_variance4x8 = vpx_variance4x8_sse2; - vpx_variance64x32 = vpx_variance64x32_c; - if (flags & HAS_SSE2) vpx_variance64x32 = vpx_variance64x32_sse2; - if (flags & HAS_AVX2) vpx_variance64x32 = vpx_variance64x32_avx2; - vpx_variance64x64 = vpx_variance64x64_c; - if (flags & HAS_SSE2) vpx_variance64x64 = vpx_variance64x64_sse2; - if (flags & HAS_AVX2) vpx_variance64x64 = vpx_variance64x64_avx2; - vpx_variance8x16 = vpx_variance8x16_c; - if (flags & HAS_SSE2) vpx_variance8x16 = vpx_variance8x16_sse2; - vpx_variance8x4 = vpx_variance8x4_c; - if (flags & HAS_SSE2) vpx_variance8x4 = vpx_variance8x4_sse2; - vpx_variance8x8 = vpx_variance8x8_c; - if (flags & HAS_SSE2) vpx_variance8x8 = vpx_variance8x8_sse2; - vpx_vector_var = vpx_vector_var_c; - if (flags & HAS_SSE2) vpx_vector_var = vpx_vector_var_sse2; -} -#endif - -#ifdef __cplusplus -} // extern "C" -#endif - -#endif diff --git a/WebRtc.NET/include/third_party/libvpx/source/config/mac/ia32/vpx_scale_rtcd.h b/WebRtc.NET/include/third_party/libvpx/source/config/mac/ia32/vpx_scale_rtcd.h deleted file mode 100644 index ddf7d01c..00000000 --- a/WebRtc.NET/include/third_party/libvpx/source/config/mac/ia32/vpx_scale_rtcd.h +++ /dev/null @@ -1,69 +0,0 @@ -#ifndef VPX_SCALE_RTCD_H_ -#define VPX_SCALE_RTCD_H_ - -#ifdef RTCD_C -#define RTCD_EXTERN -#else -#define RTCD_EXTERN extern -#endif - -struct yv12_buffer_config; - -#ifdef __cplusplus -extern "C" { -#endif - -void vp8_horizontal_line_2_1_scale_c(const unsigned char *source, unsigned int source_width, unsigned char *dest, unsigned int dest_width); -#define vp8_horizontal_line_2_1_scale vp8_horizontal_line_2_1_scale_c - -void vp8_horizontal_line_5_3_scale_c(const unsigned char *source, unsigned int source_width, unsigned char *dest, unsigned int dest_width); -#define vp8_horizontal_line_5_3_scale vp8_horizontal_line_5_3_scale_c - -void vp8_horizontal_line_5_4_scale_c(const unsigned char *source, unsigned int source_width, unsigned char *dest, unsigned int dest_width); -#define vp8_horizontal_line_5_4_scale vp8_horizontal_line_5_4_scale_c - -void vp8_vertical_band_2_1_scale_c(unsigned char *source, unsigned int src_pitch, unsigned char *dest, unsigned int dest_pitch, unsigned int dest_width); -#define vp8_vertical_band_2_1_scale vp8_vertical_band_2_1_scale_c - -void vp8_vertical_band_2_1_scale_i_c(unsigned char *source, unsigned int src_pitch, unsigned char *dest, unsigned int dest_pitch, unsigned int dest_width); -#define vp8_vertical_band_2_1_scale_i vp8_vertical_band_2_1_scale_i_c - -void vp8_vertical_band_5_3_scale_c(unsigned char *source, unsigned int src_pitch, unsigned char *dest, unsigned int dest_pitch, unsigned int dest_width); -#define vp8_vertical_band_5_3_scale vp8_vertical_band_5_3_scale_c - -void vp8_vertical_band_5_4_scale_c(unsigned char *source, unsigned int src_pitch, unsigned char *dest, unsigned int dest_pitch, unsigned int dest_width); -#define vp8_vertical_band_5_4_scale vp8_vertical_band_5_4_scale_c - -void vp8_yv12_copy_frame_c(const struct yv12_buffer_config *src_ybc, struct yv12_buffer_config *dst_ybc); -#define vp8_yv12_copy_frame vp8_yv12_copy_frame_c - -void vp8_yv12_extend_frame_borders_c(struct yv12_buffer_config *ybf); -#define vp8_yv12_extend_frame_borders vp8_yv12_extend_frame_borders_c - -void vpx_extend_frame_borders_c(struct yv12_buffer_config *ybf); -#define vpx_extend_frame_borders vpx_extend_frame_borders_c - -void vpx_extend_frame_inner_borders_c(struct yv12_buffer_config *ybf); -#define vpx_extend_frame_inner_borders vpx_extend_frame_inner_borders_c - -void vpx_yv12_copy_y_c(const struct yv12_buffer_config *src_ybc, struct yv12_buffer_config *dst_ybc); -#define vpx_yv12_copy_y vpx_yv12_copy_y_c - -void vpx_scale_rtcd(void); - -#ifdef RTCD_C -#include "vpx_ports/x86.h" -static void setup_rtcd_internal(void) -{ - int flags = x86_simd_caps(); - - (void)flags; - -} -#endif - -#ifdef __cplusplus -} // extern "C" -#endif - -#endif diff --git a/WebRtc.NET/include/third_party/libvpx/source/config/mac/x64/vp8_rtcd.h b/WebRtc.NET/include/third_party/libvpx/source/config/mac/x64/vp8_rtcd.h deleted file mode 100644 index 8dcc9eb2..00000000 --- a/WebRtc.NET/include/third_party/libvpx/source/config/mac/x64/vp8_rtcd.h +++ /dev/null @@ -1,260 +0,0 @@ -#ifndef VP8_RTCD_H_ -#define VP8_RTCD_H_ - -#ifdef RTCD_C -#define RTCD_EXTERN -#else -#define RTCD_EXTERN extern -#endif - -/* - * VP8 - */ - -struct blockd; -struct macroblockd; -struct loop_filter_info; - -/* Encoder forward decls */ -struct block; -struct macroblock; -struct variance_vtable; -union int_mv; -struct yv12_buffer_config; - -#ifdef __cplusplus -extern "C" { -#endif - -void vp8_bilinear_predict16x16_c(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch); -void vp8_bilinear_predict16x16_sse2(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch); -void vp8_bilinear_predict16x16_ssse3(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch); -RTCD_EXTERN void (*vp8_bilinear_predict16x16)(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch); - -void vp8_bilinear_predict4x4_c(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch); -void vp8_bilinear_predict4x4_mmx(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch); -#define vp8_bilinear_predict4x4 vp8_bilinear_predict4x4_mmx - -void vp8_bilinear_predict8x4_c(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch); -void vp8_bilinear_predict8x4_mmx(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch); -#define vp8_bilinear_predict8x4 vp8_bilinear_predict8x4_mmx - -void vp8_bilinear_predict8x8_c(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch); -void vp8_bilinear_predict8x8_sse2(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch); -void vp8_bilinear_predict8x8_ssse3(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch); -RTCD_EXTERN void (*vp8_bilinear_predict8x8)(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch); - -void vp8_blend_b_c(unsigned char *y, unsigned char *u, unsigned char *v, int y1, int u1, int v1, int alpha, int stride); -#define vp8_blend_b vp8_blend_b_c - -void vp8_blend_mb_inner_c(unsigned char *y, unsigned char *u, unsigned char *v, int y1, int u1, int v1, int alpha, int stride); -#define vp8_blend_mb_inner vp8_blend_mb_inner_c - -void vp8_blend_mb_outer_c(unsigned char *y, unsigned char *u, unsigned char *v, int y1, int u1, int v1, int alpha, int stride); -#define vp8_blend_mb_outer vp8_blend_mb_outer_c - -int vp8_block_error_c(short *coeff, short *dqcoeff); -int vp8_block_error_sse2(short *coeff, short *dqcoeff); -#define vp8_block_error vp8_block_error_sse2 - -void vp8_copy32xn_c(const unsigned char *src_ptr, int source_stride, unsigned char *dst_ptr, int dst_stride, int n); -void vp8_copy32xn_sse2(const unsigned char *src_ptr, int source_stride, unsigned char *dst_ptr, int dst_stride, int n); -void vp8_copy32xn_sse3(const unsigned char *src_ptr, int source_stride, unsigned char *dst_ptr, int dst_stride, int n); -RTCD_EXTERN void (*vp8_copy32xn)(const unsigned char *src_ptr, int source_stride, unsigned char *dst_ptr, int dst_stride, int n); - -void vp8_copy_mem16x16_c(unsigned char *src, int src_pitch, unsigned char *dst, int dst_pitch); -void vp8_copy_mem16x16_sse2(unsigned char *src, int src_pitch, unsigned char *dst, int dst_pitch); -#define vp8_copy_mem16x16 vp8_copy_mem16x16_sse2 - -void vp8_copy_mem8x4_c(unsigned char *src, int src_pitch, unsigned char *dst, int dst_pitch); -void vp8_copy_mem8x4_mmx(unsigned char *src, int src_pitch, unsigned char *dst, int dst_pitch); -#define vp8_copy_mem8x4 vp8_copy_mem8x4_mmx - -void vp8_copy_mem8x8_c(unsigned char *src, int src_pitch, unsigned char *dst, int dst_pitch); -void vp8_copy_mem8x8_mmx(unsigned char *src, int src_pitch, unsigned char *dst, int dst_pitch); -#define vp8_copy_mem8x8 vp8_copy_mem8x8_mmx - -void vp8_dc_only_idct_add_c(short input, unsigned char *pred, int pred_stride, unsigned char *dst, int dst_stride); -void vp8_dc_only_idct_add_mmx(short input, unsigned char *pred, int pred_stride, unsigned char *dst, int dst_stride); -#define vp8_dc_only_idct_add vp8_dc_only_idct_add_mmx - -int vp8_denoiser_filter_c(unsigned char *mc_running_avg_y, int mc_avg_y_stride, unsigned char *running_avg_y, int avg_y_stride, unsigned char *sig, int sig_stride, unsigned int motion_magnitude, int increase_denoising); -int vp8_denoiser_filter_sse2(unsigned char *mc_running_avg_y, int mc_avg_y_stride, unsigned char *running_avg_y, int avg_y_stride, unsigned char *sig, int sig_stride, unsigned int motion_magnitude, int increase_denoising); -#define vp8_denoiser_filter vp8_denoiser_filter_sse2 - -int vp8_denoiser_filter_uv_c(unsigned char *mc_running_avg, int mc_avg_stride, unsigned char *running_avg, int avg_stride, unsigned char *sig, int sig_stride, unsigned int motion_magnitude, int increase_denoising); -int vp8_denoiser_filter_uv_sse2(unsigned char *mc_running_avg, int mc_avg_stride, unsigned char *running_avg, int avg_stride, unsigned char *sig, int sig_stride, unsigned int motion_magnitude, int increase_denoising); -#define vp8_denoiser_filter_uv vp8_denoiser_filter_uv_sse2 - -void vp8_dequant_idct_add_c(short *input, short *dq, unsigned char *output, int stride); -void vp8_dequant_idct_add_mmx(short *input, short *dq, unsigned char *output, int stride); -#define vp8_dequant_idct_add vp8_dequant_idct_add_mmx - -void vp8_dequant_idct_add_uv_block_c(short *q, short *dq, unsigned char *dst_u, unsigned char *dst_v, int stride, char *eobs); -void vp8_dequant_idct_add_uv_block_sse2(short *q, short *dq, unsigned char *dst_u, unsigned char *dst_v, int stride, char *eobs); -#define vp8_dequant_idct_add_uv_block vp8_dequant_idct_add_uv_block_sse2 - -void vp8_dequant_idct_add_y_block_c(short *q, short *dq, unsigned char *dst, int stride, char *eobs); -void vp8_dequant_idct_add_y_block_sse2(short *q, short *dq, unsigned char *dst, int stride, char *eobs); -#define vp8_dequant_idct_add_y_block vp8_dequant_idct_add_y_block_sse2 - -void vp8_dequantize_b_c(struct blockd*, short *dqc); -void vp8_dequantize_b_mmx(struct blockd*, short *dqc); -#define vp8_dequantize_b vp8_dequantize_b_mmx - -int vp8_diamond_search_sad_c(struct macroblock *x, struct block *b, struct blockd *d, union int_mv *ref_mv, union int_mv *best_mv, int search_param, int sad_per_bit, int *num00, struct variance_vtable *fn_ptr, int *mvcost[2], union int_mv *center_mv); -int vp8_diamond_search_sadx4(struct macroblock *x, struct block *b, struct blockd *d, union int_mv *ref_mv, union int_mv *best_mv, int search_param, int sad_per_bit, int *num00, struct variance_vtable *fn_ptr, int *mvcost[2], union int_mv *center_mv); -#define vp8_diamond_search_sad vp8_diamond_search_sadx4 - -void vp8_fast_quantize_b_c(struct block *, struct blockd *); -void vp8_fast_quantize_b_sse2(struct block *, struct blockd *); -void vp8_fast_quantize_b_ssse3(struct block *, struct blockd *); -RTCD_EXTERN void (*vp8_fast_quantize_b)(struct block *, struct blockd *); - -void vp8_filter_by_weight16x16_c(unsigned char *src, int src_stride, unsigned char *dst, int dst_stride, int src_weight); -void vp8_filter_by_weight16x16_sse2(unsigned char *src, int src_stride, unsigned char *dst, int dst_stride, int src_weight); -#define vp8_filter_by_weight16x16 vp8_filter_by_weight16x16_sse2 - -void vp8_filter_by_weight4x4_c(unsigned char *src, int src_stride, unsigned char *dst, int dst_stride, int src_weight); -#define vp8_filter_by_weight4x4 vp8_filter_by_weight4x4_c - -void vp8_filter_by_weight8x8_c(unsigned char *src, int src_stride, unsigned char *dst, int dst_stride, int src_weight); -void vp8_filter_by_weight8x8_sse2(unsigned char *src, int src_stride, unsigned char *dst, int dst_stride, int src_weight); -#define vp8_filter_by_weight8x8 vp8_filter_by_weight8x8_sse2 - -int vp8_full_search_sad_c(struct macroblock *x, struct block *b, struct blockd *d, union int_mv *ref_mv, int sad_per_bit, int distance, struct variance_vtable *fn_ptr, int *mvcost[2], union int_mv *center_mv); -int vp8_full_search_sadx3(struct macroblock *x, struct block *b, struct blockd *d, union int_mv *ref_mv, int sad_per_bit, int distance, struct variance_vtable *fn_ptr, int *mvcost[2], union int_mv *center_mv); -int vp8_full_search_sadx8(struct macroblock *x, struct block *b, struct blockd *d, union int_mv *ref_mv, int sad_per_bit, int distance, struct variance_vtable *fn_ptr, int *mvcost[2], union int_mv *center_mv); -RTCD_EXTERN int (*vp8_full_search_sad)(struct macroblock *x, struct block *b, struct blockd *d, union int_mv *ref_mv, int sad_per_bit, int distance, struct variance_vtable *fn_ptr, int *mvcost[2], union int_mv *center_mv); - -void vp8_loop_filter_bh_c(unsigned char *y, unsigned char *u, unsigned char *v, int ystride, int uv_stride, struct loop_filter_info *lfi); -void vp8_loop_filter_bh_sse2(unsigned char *y, unsigned char *u, unsigned char *v, int ystride, int uv_stride, struct loop_filter_info *lfi); -#define vp8_loop_filter_bh vp8_loop_filter_bh_sse2 - -void vp8_loop_filter_bv_c(unsigned char *y, unsigned char *u, unsigned char *v, int ystride, int uv_stride, struct loop_filter_info *lfi); -void vp8_loop_filter_bv_sse2(unsigned char *y, unsigned char *u, unsigned char *v, int ystride, int uv_stride, struct loop_filter_info *lfi); -#define vp8_loop_filter_bv vp8_loop_filter_bv_sse2 - -void vp8_loop_filter_mbh_c(unsigned char *y, unsigned char *u, unsigned char *v, int ystride, int uv_stride, struct loop_filter_info *lfi); -void vp8_loop_filter_mbh_sse2(unsigned char *y, unsigned char *u, unsigned char *v, int ystride, int uv_stride, struct loop_filter_info *lfi); -#define vp8_loop_filter_mbh vp8_loop_filter_mbh_sse2 - -void vp8_loop_filter_mbv_c(unsigned char *y, unsigned char *u, unsigned char *v, int ystride, int uv_stride, struct loop_filter_info *lfi); -void vp8_loop_filter_mbv_sse2(unsigned char *y, unsigned char *u, unsigned char *v, int ystride, int uv_stride, struct loop_filter_info *lfi); -#define vp8_loop_filter_mbv vp8_loop_filter_mbv_sse2 - -void vp8_loop_filter_bhs_c(unsigned char *y, int ystride, const unsigned char *blimit); -void vp8_loop_filter_bhs_sse2(unsigned char *y, int ystride, const unsigned char *blimit); -#define vp8_loop_filter_simple_bh vp8_loop_filter_bhs_sse2 - -void vp8_loop_filter_bvs_c(unsigned char *y, int ystride, const unsigned char *blimit); -void vp8_loop_filter_bvs_sse2(unsigned char *y, int ystride, const unsigned char *blimit); -#define vp8_loop_filter_simple_bv vp8_loop_filter_bvs_sse2 - -void vp8_loop_filter_simple_horizontal_edge_c(unsigned char *y, int ystride, const unsigned char *blimit); -void vp8_loop_filter_simple_horizontal_edge_sse2(unsigned char *y, int ystride, const unsigned char *blimit); -#define vp8_loop_filter_simple_mbh vp8_loop_filter_simple_horizontal_edge_sse2 - -void vp8_loop_filter_simple_vertical_edge_c(unsigned char *y, int ystride, const unsigned char *blimit); -void vp8_loop_filter_simple_vertical_edge_sse2(unsigned char *y, int ystride, const unsigned char *blimit); -#define vp8_loop_filter_simple_mbv vp8_loop_filter_simple_vertical_edge_sse2 - -int vp8_mbblock_error_c(struct macroblock *mb, int dc); -int vp8_mbblock_error_sse2(struct macroblock *mb, int dc); -#define vp8_mbblock_error vp8_mbblock_error_sse2 - -int vp8_mbuverror_c(struct macroblock *mb); -int vp8_mbuverror_sse2(struct macroblock *mb); -#define vp8_mbuverror vp8_mbuverror_sse2 - -int vp8_refining_search_sad_c(struct macroblock *x, struct block *b, struct blockd *d, union int_mv *ref_mv, int sad_per_bit, int distance, struct variance_vtable *fn_ptr, int *mvcost[2], union int_mv *center_mv); -int vp8_refining_search_sadx4(struct macroblock *x, struct block *b, struct blockd *d, union int_mv *ref_mv, int sad_per_bit, int distance, struct variance_vtable *fn_ptr, int *mvcost[2], union int_mv *center_mv); -#define vp8_refining_search_sad vp8_refining_search_sadx4 - -void vp8_regular_quantize_b_c(struct block *, struct blockd *); -void vp8_regular_quantize_b_sse2(struct block *, struct blockd *); -void vp8_regular_quantize_b_sse4_1(struct block *, struct blockd *); -RTCD_EXTERN void (*vp8_regular_quantize_b)(struct block *, struct blockd *); - -void vp8_short_fdct4x4_c(short *input, short *output, int pitch); -void vp8_short_fdct4x4_sse2(short *input, short *output, int pitch); -#define vp8_short_fdct4x4 vp8_short_fdct4x4_sse2 - -void vp8_short_fdct8x4_c(short *input, short *output, int pitch); -void vp8_short_fdct8x4_sse2(short *input, short *output, int pitch); -#define vp8_short_fdct8x4 vp8_short_fdct8x4_sse2 - -void vp8_short_idct4x4llm_c(short *input, unsigned char *pred, int pitch, unsigned char *dst, int dst_stride); -void vp8_short_idct4x4llm_mmx(short *input, unsigned char *pred, int pitch, unsigned char *dst, int dst_stride); -#define vp8_short_idct4x4llm vp8_short_idct4x4llm_mmx - -void vp8_short_inv_walsh4x4_c(short *input, short *output); -void vp8_short_inv_walsh4x4_sse2(short *input, short *output); -#define vp8_short_inv_walsh4x4 vp8_short_inv_walsh4x4_sse2 - -void vp8_short_inv_walsh4x4_1_c(short *input, short *output); -#define vp8_short_inv_walsh4x4_1 vp8_short_inv_walsh4x4_1_c - -void vp8_short_walsh4x4_c(short *input, short *output, int pitch); -void vp8_short_walsh4x4_sse2(short *input, short *output, int pitch); -#define vp8_short_walsh4x4 vp8_short_walsh4x4_sse2 - -void vp8_sixtap_predict16x16_c(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch); -void vp8_sixtap_predict16x16_sse2(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch); -void vp8_sixtap_predict16x16_ssse3(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch); -RTCD_EXTERN void (*vp8_sixtap_predict16x16)(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch); - -void vp8_sixtap_predict4x4_c(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch); -void vp8_sixtap_predict4x4_mmx(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch); -void vp8_sixtap_predict4x4_ssse3(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch); -RTCD_EXTERN void (*vp8_sixtap_predict4x4)(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch); - -void vp8_sixtap_predict8x4_c(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch); -void vp8_sixtap_predict8x4_sse2(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch); -void vp8_sixtap_predict8x4_ssse3(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch); -RTCD_EXTERN void (*vp8_sixtap_predict8x4)(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch); - -void vp8_sixtap_predict8x8_c(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch); -void vp8_sixtap_predict8x8_sse2(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch); -void vp8_sixtap_predict8x8_ssse3(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch); -RTCD_EXTERN void (*vp8_sixtap_predict8x8)(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch); - -void vp8_rtcd(void); - -#ifdef RTCD_C -#include "vpx_ports/x86.h" -static void setup_rtcd_internal(void) -{ - int flags = x86_simd_caps(); - - (void)flags; - - vp8_bilinear_predict16x16 = vp8_bilinear_predict16x16_sse2; - if (flags & HAS_SSSE3) vp8_bilinear_predict16x16 = vp8_bilinear_predict16x16_ssse3; - vp8_bilinear_predict8x8 = vp8_bilinear_predict8x8_sse2; - if (flags & HAS_SSSE3) vp8_bilinear_predict8x8 = vp8_bilinear_predict8x8_ssse3; - vp8_copy32xn = vp8_copy32xn_sse2; - if (flags & HAS_SSE3) vp8_copy32xn = vp8_copy32xn_sse3; - vp8_fast_quantize_b = vp8_fast_quantize_b_sse2; - if (flags & HAS_SSSE3) vp8_fast_quantize_b = vp8_fast_quantize_b_ssse3; - vp8_full_search_sad = vp8_full_search_sad_c; - if (flags & HAS_SSE3) vp8_full_search_sad = vp8_full_search_sadx3; - if (flags & HAS_SSE4_1) vp8_full_search_sad = vp8_full_search_sadx8; - vp8_regular_quantize_b = vp8_regular_quantize_b_sse2; - if (flags & HAS_SSE4_1) vp8_regular_quantize_b = vp8_regular_quantize_b_sse4_1; - vp8_sixtap_predict16x16 = vp8_sixtap_predict16x16_sse2; - if (flags & HAS_SSSE3) vp8_sixtap_predict16x16 = vp8_sixtap_predict16x16_ssse3; - vp8_sixtap_predict4x4 = vp8_sixtap_predict4x4_mmx; - if (flags & HAS_SSSE3) vp8_sixtap_predict4x4 = vp8_sixtap_predict4x4_ssse3; - vp8_sixtap_predict8x4 = vp8_sixtap_predict8x4_sse2; - if (flags & HAS_SSSE3) vp8_sixtap_predict8x4 = vp8_sixtap_predict8x4_ssse3; - vp8_sixtap_predict8x8 = vp8_sixtap_predict8x8_sse2; - if (flags & HAS_SSSE3) vp8_sixtap_predict8x8 = vp8_sixtap_predict8x8_ssse3; -} -#endif - -#ifdef __cplusplus -} // extern "C" -#endif - -#endif diff --git a/WebRtc.NET/include/third_party/libvpx/source/config/mac/x64/vp9_rtcd.h b/WebRtc.NET/include/third_party/libvpx/source/config/mac/x64/vp9_rtcd.h deleted file mode 100644 index 072f858e..00000000 --- a/WebRtc.NET/include/third_party/libvpx/source/config/mac/x64/vp9_rtcd.h +++ /dev/null @@ -1,172 +0,0 @@ -#ifndef VP9_RTCD_H_ -#define VP9_RTCD_H_ - -#ifdef RTCD_C -#define RTCD_EXTERN -#else -#define RTCD_EXTERN extern -#endif - -/* - * VP9 - */ - -#include "vpx/vpx_integer.h" -#include "vp9/common/vp9_common.h" -#include "vp9/common/vp9_enums.h" - -struct macroblockd; - -/* Encoder forward decls */ -struct macroblock; -struct vp9_variance_vtable; -struct search_site_config; -struct mv; -union int_mv; -struct yv12_buffer_config; - -#ifdef __cplusplus -extern "C" { -#endif - -int64_t vp9_block_error_c(const tran_low_t *coeff, const tran_low_t *dqcoeff, intptr_t block_size, int64_t *ssz); -#define vp9_block_error vp9_block_error_c - -int vp9_denoiser_filter_c(const uint8_t *sig, int sig_stride, const uint8_t *mc_avg, int mc_avg_stride, uint8_t *avg, int avg_stride, int increase_denoising, BLOCK_SIZE bs, int motion_magnitude); -int vp9_denoiser_filter_sse2(const uint8_t *sig, int sig_stride, const uint8_t *mc_avg, int mc_avg_stride, uint8_t *avg, int avg_stride, int increase_denoising, BLOCK_SIZE bs, int motion_magnitude); -#define vp9_denoiser_filter vp9_denoiser_filter_sse2 - -int vp9_diamond_search_sad_c(const struct macroblock *x, const struct search_site_config *cfg, struct mv *ref_mv, struct mv *best_mv, int search_param, int sad_per_bit, int *num00, const struct vp9_variance_vtable *fn_ptr, const struct mv *center_mv); -int vp9_diamond_search_sad_avx(const struct macroblock *x, const struct search_site_config *cfg, struct mv *ref_mv, struct mv *best_mv, int search_param, int sad_per_bit, int *num00, const struct vp9_variance_vtable *fn_ptr, const struct mv *center_mv); -RTCD_EXTERN int (*vp9_diamond_search_sad)(const struct macroblock *x, const struct search_site_config *cfg, struct mv *ref_mv, struct mv *best_mv, int search_param, int sad_per_bit, int *num00, const struct vp9_variance_vtable *fn_ptr, const struct mv *center_mv); - -void vp9_fdct8x8_quant_c(const int16_t *input, int stride, tran_low_t *coeff_ptr, intptr_t n_coeffs, int skip_block, const int16_t *zbin_ptr, const int16_t *round_ptr, const int16_t *quant_ptr, const int16_t *quant_shift_ptr, tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr, const int16_t *dequant_ptr, uint16_t *eob_ptr, const int16_t *scan, const int16_t *iscan); -void vp9_fdct8x8_quant_ssse3(const int16_t *input, int stride, tran_low_t *coeff_ptr, intptr_t n_coeffs, int skip_block, const int16_t *zbin_ptr, const int16_t *round_ptr, const int16_t *quant_ptr, const int16_t *quant_shift_ptr, tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr, const int16_t *dequant_ptr, uint16_t *eob_ptr, const int16_t *scan, const int16_t *iscan); -RTCD_EXTERN void (*vp9_fdct8x8_quant)(const int16_t *input, int stride, tran_low_t *coeff_ptr, intptr_t n_coeffs, int skip_block, const int16_t *zbin_ptr, const int16_t *round_ptr, const int16_t *quant_ptr, const int16_t *quant_shift_ptr, tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr, const int16_t *dequant_ptr, uint16_t *eob_ptr, const int16_t *scan, const int16_t *iscan); - -void vp9_fht16x16_c(const int16_t *input, tran_low_t *output, int stride, int tx_type); -void vp9_fht16x16_sse2(const int16_t *input, tran_low_t *output, int stride, int tx_type); -#define vp9_fht16x16 vp9_fht16x16_sse2 - -void vp9_fht4x4_c(const int16_t *input, tran_low_t *output, int stride, int tx_type); -void vp9_fht4x4_sse2(const int16_t *input, tran_low_t *output, int stride, int tx_type); -#define vp9_fht4x4 vp9_fht4x4_sse2 - -void vp9_fht8x8_c(const int16_t *input, tran_low_t *output, int stride, int tx_type); -void vp9_fht8x8_sse2(const int16_t *input, tran_low_t *output, int stride, int tx_type); -#define vp9_fht8x8 vp9_fht8x8_sse2 - -void vp9_filter_by_weight16x16_c(const uint8_t *src, int src_stride, uint8_t *dst, int dst_stride, int src_weight); -void vp9_filter_by_weight16x16_sse2(const uint8_t *src, int src_stride, uint8_t *dst, int dst_stride, int src_weight); -#define vp9_filter_by_weight16x16 vp9_filter_by_weight16x16_sse2 - -void vp9_filter_by_weight8x8_c(const uint8_t *src, int src_stride, uint8_t *dst, int dst_stride, int src_weight); -void vp9_filter_by_weight8x8_sse2(const uint8_t *src, int src_stride, uint8_t *dst, int dst_stride, int src_weight); -#define vp9_filter_by_weight8x8 vp9_filter_by_weight8x8_sse2 - -int vp9_full_search_sad_c(const struct macroblock *x, const struct mv *ref_mv, int sad_per_bit, int distance, const struct vp9_variance_vtable *fn_ptr, const struct mv *center_mv, struct mv *best_mv); -int vp9_full_search_sadx3(const struct macroblock *x, const struct mv *ref_mv, int sad_per_bit, int distance, const struct vp9_variance_vtable *fn_ptr, const struct mv *center_mv, struct mv *best_mv); -int vp9_full_search_sadx8(const struct macroblock *x, const struct mv *ref_mv, int sad_per_bit, int distance, const struct vp9_variance_vtable *fn_ptr, const struct mv *center_mv, struct mv *best_mv); -RTCD_EXTERN int (*vp9_full_search_sad)(const struct macroblock *x, const struct mv *ref_mv, int sad_per_bit, int distance, const struct vp9_variance_vtable *fn_ptr, const struct mv *center_mv, struct mv *best_mv); - -void vp9_fwht4x4_c(const int16_t *input, tran_low_t *output, int stride); -void vp9_fwht4x4_sse2(const int16_t *input, tran_low_t *output, int stride); -#define vp9_fwht4x4 vp9_fwht4x4_sse2 - -int64_t vp9_highbd_block_error_c(const tran_low_t *coeff, const tran_low_t *dqcoeff, intptr_t block_size, int64_t *ssz, int bd); -int64_t vp9_highbd_block_error_sse2(const tran_low_t *coeff, const tran_low_t *dqcoeff, intptr_t block_size, int64_t *ssz, int bd); -#define vp9_highbd_block_error vp9_highbd_block_error_sse2 - -int64_t vp9_highbd_block_error_8bit_c(const tran_low_t *coeff, const tran_low_t *dqcoeff, intptr_t block_size, int64_t *ssz); -int64_t vp9_highbd_block_error_8bit_sse2(const tran_low_t *coeff, const tran_low_t *dqcoeff, intptr_t block_size, int64_t *ssz); -int64_t vp9_highbd_block_error_8bit_avx(const tran_low_t *coeff, const tran_low_t *dqcoeff, intptr_t block_size, int64_t *ssz); -RTCD_EXTERN int64_t (*vp9_highbd_block_error_8bit)(const tran_low_t *coeff, const tran_low_t *dqcoeff, intptr_t block_size, int64_t *ssz); - -void vp9_highbd_fht16x16_c(const int16_t *input, tran_low_t *output, int stride, int tx_type); -#define vp9_highbd_fht16x16 vp9_highbd_fht16x16_c - -void vp9_highbd_fht4x4_c(const int16_t *input, tran_low_t *output, int stride, int tx_type); -#define vp9_highbd_fht4x4 vp9_highbd_fht4x4_c - -void vp9_highbd_fht8x8_c(const int16_t *input, tran_low_t *output, int stride, int tx_type); -#define vp9_highbd_fht8x8 vp9_highbd_fht8x8_c - -void vp9_highbd_fwht4x4_c(const int16_t *input, tran_low_t *output, int stride); -#define vp9_highbd_fwht4x4 vp9_highbd_fwht4x4_c - -void vp9_highbd_iht16x16_256_add_c(const tran_low_t *input, uint8_t *output, int pitch, int tx_type, int bd); -#define vp9_highbd_iht16x16_256_add vp9_highbd_iht16x16_256_add_c - -void vp9_highbd_iht4x4_16_add_c(const tran_low_t *input, uint8_t *dest, int stride, int tx_type, int bd); -#define vp9_highbd_iht4x4_16_add vp9_highbd_iht4x4_16_add_c - -void vp9_highbd_iht8x8_64_add_c(const tran_low_t *input, uint8_t *dest, int stride, int tx_type, int bd); -#define vp9_highbd_iht8x8_64_add vp9_highbd_iht8x8_64_add_c - -void vp9_highbd_mbpost_proc_across_ip_c(uint16_t *src, int pitch, int rows, int cols, int flimit); -#define vp9_highbd_mbpost_proc_across_ip vp9_highbd_mbpost_proc_across_ip_c - -void vp9_highbd_mbpost_proc_down_c(uint16_t *dst, int pitch, int rows, int cols, int flimit); -#define vp9_highbd_mbpost_proc_down vp9_highbd_mbpost_proc_down_c - -void vp9_highbd_post_proc_down_and_across_c(const uint16_t *src_ptr, uint16_t *dst_ptr, int src_pixels_per_line, int dst_pixels_per_line, int rows, int cols, int flimit); -#define vp9_highbd_post_proc_down_and_across vp9_highbd_post_proc_down_and_across_c - -void vp9_highbd_quantize_fp_c(const tran_low_t *coeff_ptr, intptr_t n_coeffs, int skip_block, const int16_t *zbin_ptr, const int16_t *round_ptr, const int16_t *quant_ptr, const int16_t *quant_shift_ptr, tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr, const int16_t *dequant_ptr, uint16_t *eob_ptr, const int16_t *scan, const int16_t *iscan); -#define vp9_highbd_quantize_fp vp9_highbd_quantize_fp_c - -void vp9_highbd_quantize_fp_32x32_c(const tran_low_t *coeff_ptr, intptr_t n_coeffs, int skip_block, const int16_t *zbin_ptr, const int16_t *round_ptr, const int16_t *quant_ptr, const int16_t *quant_shift_ptr, tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr, const int16_t *dequant_ptr, uint16_t *eob_ptr, const int16_t *scan, const int16_t *iscan); -#define vp9_highbd_quantize_fp_32x32 vp9_highbd_quantize_fp_32x32_c - -void vp9_highbd_temporal_filter_apply_c(uint8_t *frame1, unsigned int stride, uint8_t *frame2, unsigned int block_width, unsigned int block_height, int strength, int filter_weight, unsigned int *accumulator, uint16_t *count); -#define vp9_highbd_temporal_filter_apply vp9_highbd_temporal_filter_apply_c - -void vp9_iht16x16_256_add_c(const tran_low_t *input, uint8_t *output, int pitch, int tx_type); -void vp9_iht16x16_256_add_sse2(const tran_low_t *input, uint8_t *output, int pitch, int tx_type); -#define vp9_iht16x16_256_add vp9_iht16x16_256_add_sse2 - -void vp9_iht4x4_16_add_c(const tran_low_t *input, uint8_t *dest, int stride, int tx_type); -void vp9_iht4x4_16_add_sse2(const tran_low_t *input, uint8_t *dest, int stride, int tx_type); -#define vp9_iht4x4_16_add vp9_iht4x4_16_add_sse2 - -void vp9_iht8x8_64_add_c(const tran_low_t *input, uint8_t *dest, int stride, int tx_type); -void vp9_iht8x8_64_add_sse2(const tran_low_t *input, uint8_t *dest, int stride, int tx_type); -#define vp9_iht8x8_64_add vp9_iht8x8_64_add_sse2 - -void vp9_quantize_fp_c(const tran_low_t *coeff_ptr, intptr_t n_coeffs, int skip_block, const int16_t *zbin_ptr, const int16_t *round_ptr, const int16_t *quant_ptr, const int16_t *quant_shift_ptr, tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr, const int16_t *dequant_ptr, uint16_t *eob_ptr, const int16_t *scan, const int16_t *iscan); -#define vp9_quantize_fp vp9_quantize_fp_c - -void vp9_quantize_fp_32x32_c(const tran_low_t *coeff_ptr, intptr_t n_coeffs, int skip_block, const int16_t *zbin_ptr, const int16_t *round_ptr, const int16_t *quant_ptr, const int16_t *quant_shift_ptr, tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr, const int16_t *dequant_ptr, uint16_t *eob_ptr, const int16_t *scan, const int16_t *iscan); -#define vp9_quantize_fp_32x32 vp9_quantize_fp_32x32_c - -void vp9_temporal_filter_apply_c(uint8_t *frame1, unsigned int stride, uint8_t *frame2, unsigned int block_width, unsigned int block_height, int strength, int filter_weight, unsigned int *accumulator, uint16_t *count); -void vp9_temporal_filter_apply_sse2(uint8_t *frame1, unsigned int stride, uint8_t *frame2, unsigned int block_width, unsigned int block_height, int strength, int filter_weight, unsigned int *accumulator, uint16_t *count); -#define vp9_temporal_filter_apply vp9_temporal_filter_apply_sse2 - -void vp9_rtcd(void); - -#ifdef RTCD_C -#include "vpx_ports/x86.h" -static void setup_rtcd_internal(void) -{ - int flags = x86_simd_caps(); - - (void)flags; - - vp9_diamond_search_sad = vp9_diamond_search_sad_c; - if (flags & HAS_AVX) vp9_diamond_search_sad = vp9_diamond_search_sad_avx; - vp9_fdct8x8_quant = vp9_fdct8x8_quant_c; - if (flags & HAS_SSSE3) vp9_fdct8x8_quant = vp9_fdct8x8_quant_ssse3; - vp9_full_search_sad = vp9_full_search_sad_c; - if (flags & HAS_SSE3) vp9_full_search_sad = vp9_full_search_sadx3; - if (flags & HAS_SSE4_1) vp9_full_search_sad = vp9_full_search_sadx8; - vp9_highbd_block_error_8bit = vp9_highbd_block_error_8bit_sse2; - if (flags & HAS_AVX) vp9_highbd_block_error_8bit = vp9_highbd_block_error_8bit_avx; -} -#endif - -#ifdef __cplusplus -} // extern "C" -#endif - -#endif diff --git a/WebRtc.NET/include/third_party/libvpx/source/config/mac/x64/vpx_config.h b/WebRtc.NET/include/third_party/libvpx/source/config/mac/x64/vpx_config.h deleted file mode 100644 index f57a7da9..00000000 --- a/WebRtc.NET/include/third_party/libvpx/source/config/mac/x64/vpx_config.h +++ /dev/null @@ -1,94 +0,0 @@ -/* Copyright (c) 2011 The WebM project authors. All Rights Reserved. */ -/* */ -/* Use of this source code is governed by a BSD-style license */ -/* that can be found in the LICENSE file in the root of the source */ -/* tree. An additional intellectual property rights grant can be found */ -/* in the file PATENTS. All contributing project authors may */ -/* be found in the AUTHORS file in the root of the source tree. */ -/* This file automatically generated by configure. Do not edit! */ -#ifndef VPX_CONFIG_H -#define VPX_CONFIG_H -#define RESTRICT -#define INLINE inline -#define ARCH_ARM 0 -#define ARCH_MIPS 0 -#define ARCH_X86 0 -#define ARCH_X86_64 1 -#define HAVE_NEON 0 -#define HAVE_NEON_ASM 0 -#define HAVE_MIPS32 0 -#define HAVE_DSPR2 0 -#define HAVE_MSA 0 -#define HAVE_MIPS64 0 -#define HAVE_MMX 1 -#define HAVE_SSE 1 -#define HAVE_SSE2 1 -#define HAVE_SSE3 1 -#define HAVE_SSSE3 1 -#define HAVE_SSE4_1 1 -#define HAVE_AVX 1 -#define HAVE_AVX2 1 -#define HAVE_VPX_PORTS 1 -#define HAVE_PTHREAD_H 1 -#define HAVE_UNISTD_H 0 -#define CONFIG_DEPENDENCY_TRACKING 1 -#define CONFIG_EXTERNAL_BUILD 1 -#define CONFIG_INSTALL_DOCS 0 -#define CONFIG_INSTALL_BINS 1 -#define CONFIG_INSTALL_LIBS 1 -#define CONFIG_INSTALL_SRCS 0 -#define CONFIG_DEBUG 0 -#define CONFIG_GPROF 0 -#define CONFIG_GCOV 0 -#define CONFIG_RVCT 0 -#define CONFIG_GCC 1 -#define CONFIG_MSVS 0 -#define CONFIG_PIC 1 -#define CONFIG_BIG_ENDIAN 0 -#define CONFIG_CODEC_SRCS 0 -#define CONFIG_DEBUG_LIBS 0 -#define CONFIG_DEQUANT_TOKENS 0 -#define CONFIG_DC_RECON 0 -#define CONFIG_RUNTIME_CPU_DETECT 1 -#define CONFIG_POSTPROC 1 -#define CONFIG_VP9_POSTPROC 1 -#define CONFIG_MULTITHREAD 1 -#define CONFIG_INTERNAL_STATS 0 -#define CONFIG_VP8_ENCODER 1 -#define CONFIG_VP8_DECODER 1 -#define CONFIG_VP9_ENCODER 1 -#define CONFIG_VP9_DECODER 1 -#define CONFIG_VP8 1 -#define CONFIG_VP9 1 -#define CONFIG_ENCODERS 1 -#define CONFIG_DECODERS 1 -#define CONFIG_STATIC_MSVCRT 0 -#define CONFIG_SPATIAL_RESAMPLING 1 -#define CONFIG_REALTIME_ONLY 1 -#define CONFIG_ONTHEFLY_BITPACKING 0 -#define CONFIG_ERROR_CONCEALMENT 0 -#define CONFIG_SHARED 0 -#define CONFIG_STATIC 1 -#define CONFIG_SMALL 0 -#define CONFIG_POSTPROC_VISUALIZER 0 -#define CONFIG_OS_SUPPORT 1 -#define CONFIG_UNIT_TESTS 1 -#define CONFIG_WEBM_IO 1 -#define CONFIG_LIBYUV 1 -#define CONFIG_DECODE_PERF_TESTS 0 -#define CONFIG_ENCODE_PERF_TESTS 0 -#define CONFIG_MULTI_RES_ENCODING 1 -#define CONFIG_TEMPORAL_DENOISING 1 -#define CONFIG_VP9_TEMPORAL_DENOISING 1 -#define CONFIG_COEFFICIENT_RANGE_CHECKING 0 -#define CONFIG_VP9_HIGHBITDEPTH 1 -#define CONFIG_BETTER_HW_COMPATIBILITY 0 -#define CONFIG_EXPERIMENTAL 0 -#define CONFIG_SIZE_LIMIT 1 -#define CONFIG_SPATIAL_SVC 0 -#define CONFIG_FP_MB_STATS 0 -#define CONFIG_EMULATE_HARDWARE 0 -#define CONFIG_MISC_FIXES 0 -#define DECODE_WIDTH_LIMIT 16384 -#define DECODE_HEIGHT_LIMIT 16384 -#endif /* VPX_CONFIG_H */ diff --git a/WebRtc.NET/include/third_party/libvpx/source/config/mac/x64/vpx_dsp_rtcd.h b/WebRtc.NET/include/third_party/libvpx/source/config/mac/x64/vpx_dsp_rtcd.h deleted file mode 100644 index bcb567d8..00000000 --- a/WebRtc.NET/include/third_party/libvpx/source/config/mac/x64/vpx_dsp_rtcd.h +++ /dev/null @@ -1,2286 +0,0 @@ -#ifndef VPX_DSP_RTCD_H_ -#define VPX_DSP_RTCD_H_ - -#ifdef RTCD_C -#define RTCD_EXTERN -#else -#define RTCD_EXTERN extern -#endif - -/* - * DSP - */ - -#include "vpx/vpx_integer.h" -#include "vpx_dsp/vpx_dsp_common.h" - - -#ifdef __cplusplus -extern "C" { -#endif - -unsigned int vpx_avg_4x4_c(const uint8_t *, int p); -unsigned int vpx_avg_4x4_sse2(const uint8_t *, int p); -#define vpx_avg_4x4 vpx_avg_4x4_sse2 - -unsigned int vpx_avg_8x8_c(const uint8_t *, int p); -unsigned int vpx_avg_8x8_sse2(const uint8_t *, int p); -#define vpx_avg_8x8 vpx_avg_8x8_sse2 - -void vpx_comp_avg_pred_c(uint8_t *comp_pred, const uint8_t *pred, int width, int height, const uint8_t *ref, int ref_stride); -#define vpx_comp_avg_pred vpx_comp_avg_pred_c - -void vpx_convolve8_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -void vpx_convolve8_sse2(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -void vpx_convolve8_ssse3(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -void vpx_convolve8_avx2(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -RTCD_EXTERN void (*vpx_convolve8)(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); - -void vpx_convolve8_avg_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -void vpx_convolve8_avg_sse2(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -void vpx_convolve8_avg_ssse3(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -RTCD_EXTERN void (*vpx_convolve8_avg)(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); - -void vpx_convolve8_avg_horiz_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -void vpx_convolve8_avg_horiz_sse2(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -void vpx_convolve8_avg_horiz_ssse3(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -RTCD_EXTERN void (*vpx_convolve8_avg_horiz)(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); - -void vpx_convolve8_avg_vert_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -void vpx_convolve8_avg_vert_sse2(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -void vpx_convolve8_avg_vert_ssse3(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -RTCD_EXTERN void (*vpx_convolve8_avg_vert)(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); - -void vpx_convolve8_horiz_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -void vpx_convolve8_horiz_sse2(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -void vpx_convolve8_horiz_ssse3(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -void vpx_convolve8_horiz_avx2(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -RTCD_EXTERN void (*vpx_convolve8_horiz)(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); - -void vpx_convolve8_vert_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -void vpx_convolve8_vert_sse2(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -void vpx_convolve8_vert_ssse3(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -void vpx_convolve8_vert_avx2(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -RTCD_EXTERN void (*vpx_convolve8_vert)(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); - -void vpx_convolve_avg_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -void vpx_convolve_avg_sse2(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -#define vpx_convolve_avg vpx_convolve_avg_sse2 - -void vpx_convolve_copy_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -void vpx_convolve_copy_sse2(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -#define vpx_convolve_copy vpx_convolve_copy_sse2 - -void vpx_d117_predictor_16x16_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d117_predictor_16x16 vpx_d117_predictor_16x16_c - -void vpx_d117_predictor_32x32_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d117_predictor_32x32 vpx_d117_predictor_32x32_c - -void vpx_d117_predictor_4x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d117_predictor_4x4 vpx_d117_predictor_4x4_c - -void vpx_d117_predictor_8x8_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d117_predictor_8x8 vpx_d117_predictor_8x8_c - -void vpx_d135_predictor_16x16_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d135_predictor_16x16 vpx_d135_predictor_16x16_c - -void vpx_d135_predictor_32x32_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d135_predictor_32x32 vpx_d135_predictor_32x32_c - -void vpx_d135_predictor_4x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d135_predictor_4x4 vpx_d135_predictor_4x4_c - -void vpx_d135_predictor_8x8_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d135_predictor_8x8 vpx_d135_predictor_8x8_c - -void vpx_d153_predictor_16x16_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_d153_predictor_16x16_ssse3(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -RTCD_EXTERN void (*vpx_d153_predictor_16x16)(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); - -void vpx_d153_predictor_32x32_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_d153_predictor_32x32_ssse3(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -RTCD_EXTERN void (*vpx_d153_predictor_32x32)(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); - -void vpx_d153_predictor_4x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_d153_predictor_4x4_ssse3(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -RTCD_EXTERN void (*vpx_d153_predictor_4x4)(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); - -void vpx_d153_predictor_8x8_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_d153_predictor_8x8_ssse3(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -RTCD_EXTERN void (*vpx_d153_predictor_8x8)(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); - -void vpx_d207_predictor_16x16_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_d207_predictor_16x16_ssse3(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -RTCD_EXTERN void (*vpx_d207_predictor_16x16)(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); - -void vpx_d207_predictor_32x32_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_d207_predictor_32x32_ssse3(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -RTCD_EXTERN void (*vpx_d207_predictor_32x32)(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); - -void vpx_d207_predictor_4x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_d207_predictor_4x4_sse2(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d207_predictor_4x4 vpx_d207_predictor_4x4_sse2 - -void vpx_d207_predictor_8x8_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_d207_predictor_8x8_ssse3(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -RTCD_EXTERN void (*vpx_d207_predictor_8x8)(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); - -void vpx_d207e_predictor_16x16_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d207e_predictor_16x16 vpx_d207e_predictor_16x16_c - -void vpx_d207e_predictor_32x32_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d207e_predictor_32x32 vpx_d207e_predictor_32x32_c - -void vpx_d207e_predictor_4x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d207e_predictor_4x4 vpx_d207e_predictor_4x4_c - -void vpx_d207e_predictor_8x8_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d207e_predictor_8x8 vpx_d207e_predictor_8x8_c - -void vpx_d45_predictor_16x16_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_d45_predictor_16x16_ssse3(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -RTCD_EXTERN void (*vpx_d45_predictor_16x16)(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); - -void vpx_d45_predictor_32x32_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_d45_predictor_32x32_ssse3(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -RTCD_EXTERN void (*vpx_d45_predictor_32x32)(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); - -void vpx_d45_predictor_4x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_d45_predictor_4x4_sse2(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d45_predictor_4x4 vpx_d45_predictor_4x4_sse2 - -void vpx_d45_predictor_8x8_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_d45_predictor_8x8_sse2(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d45_predictor_8x8 vpx_d45_predictor_8x8_sse2 - -void vpx_d45e_predictor_16x16_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d45e_predictor_16x16 vpx_d45e_predictor_16x16_c - -void vpx_d45e_predictor_32x32_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d45e_predictor_32x32 vpx_d45e_predictor_32x32_c - -void vpx_d45e_predictor_4x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d45e_predictor_4x4 vpx_d45e_predictor_4x4_c - -void vpx_d45e_predictor_8x8_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d45e_predictor_8x8 vpx_d45e_predictor_8x8_c - -void vpx_d63_predictor_16x16_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_d63_predictor_16x16_ssse3(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -RTCD_EXTERN void (*vpx_d63_predictor_16x16)(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); - -void vpx_d63_predictor_32x32_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_d63_predictor_32x32_ssse3(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -RTCD_EXTERN void (*vpx_d63_predictor_32x32)(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); - -void vpx_d63_predictor_4x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_d63_predictor_4x4_ssse3(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -RTCD_EXTERN void (*vpx_d63_predictor_4x4)(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); - -void vpx_d63_predictor_8x8_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_d63_predictor_8x8_ssse3(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -RTCD_EXTERN void (*vpx_d63_predictor_8x8)(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); - -void vpx_d63e_predictor_16x16_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d63e_predictor_16x16 vpx_d63e_predictor_16x16_c - -void vpx_d63e_predictor_32x32_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d63e_predictor_32x32 vpx_d63e_predictor_32x32_c - -void vpx_d63e_predictor_4x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d63e_predictor_4x4 vpx_d63e_predictor_4x4_c - -void vpx_d63e_predictor_8x8_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d63e_predictor_8x8 vpx_d63e_predictor_8x8_c - -void vpx_d63f_predictor_4x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d63f_predictor_4x4 vpx_d63f_predictor_4x4_c - -void vpx_dc_128_predictor_16x16_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_dc_128_predictor_16x16_sse2(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_dc_128_predictor_16x16 vpx_dc_128_predictor_16x16_sse2 - -void vpx_dc_128_predictor_32x32_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_dc_128_predictor_32x32_sse2(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_dc_128_predictor_32x32 vpx_dc_128_predictor_32x32_sse2 - -void vpx_dc_128_predictor_4x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_dc_128_predictor_4x4_sse2(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_dc_128_predictor_4x4 vpx_dc_128_predictor_4x4_sse2 - -void vpx_dc_128_predictor_8x8_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_dc_128_predictor_8x8_sse2(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_dc_128_predictor_8x8 vpx_dc_128_predictor_8x8_sse2 - -void vpx_dc_left_predictor_16x16_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_dc_left_predictor_16x16_sse2(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_dc_left_predictor_16x16 vpx_dc_left_predictor_16x16_sse2 - -void vpx_dc_left_predictor_32x32_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_dc_left_predictor_32x32_sse2(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_dc_left_predictor_32x32 vpx_dc_left_predictor_32x32_sse2 - -void vpx_dc_left_predictor_4x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_dc_left_predictor_4x4_sse2(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_dc_left_predictor_4x4 vpx_dc_left_predictor_4x4_sse2 - -void vpx_dc_left_predictor_8x8_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_dc_left_predictor_8x8_sse2(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_dc_left_predictor_8x8 vpx_dc_left_predictor_8x8_sse2 - -void vpx_dc_predictor_16x16_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_dc_predictor_16x16_sse2(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_dc_predictor_16x16 vpx_dc_predictor_16x16_sse2 - -void vpx_dc_predictor_32x32_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_dc_predictor_32x32_sse2(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_dc_predictor_32x32 vpx_dc_predictor_32x32_sse2 - -void vpx_dc_predictor_4x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_dc_predictor_4x4_sse2(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_dc_predictor_4x4 vpx_dc_predictor_4x4_sse2 - -void vpx_dc_predictor_8x8_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_dc_predictor_8x8_sse2(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_dc_predictor_8x8 vpx_dc_predictor_8x8_sse2 - -void vpx_dc_top_predictor_16x16_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_dc_top_predictor_16x16_sse2(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_dc_top_predictor_16x16 vpx_dc_top_predictor_16x16_sse2 - -void vpx_dc_top_predictor_32x32_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_dc_top_predictor_32x32_sse2(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_dc_top_predictor_32x32 vpx_dc_top_predictor_32x32_sse2 - -void vpx_dc_top_predictor_4x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_dc_top_predictor_4x4_sse2(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_dc_top_predictor_4x4 vpx_dc_top_predictor_4x4_sse2 - -void vpx_dc_top_predictor_8x8_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_dc_top_predictor_8x8_sse2(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_dc_top_predictor_8x8 vpx_dc_top_predictor_8x8_sse2 - -void vpx_fdct16x16_c(const int16_t *input, tran_low_t *output, int stride); -void vpx_fdct16x16_sse2(const int16_t *input, tran_low_t *output, int stride); -#define vpx_fdct16x16 vpx_fdct16x16_sse2 - -void vpx_fdct16x16_1_c(const int16_t *input, tran_low_t *output, int stride); -void vpx_fdct16x16_1_sse2(const int16_t *input, tran_low_t *output, int stride); -#define vpx_fdct16x16_1 vpx_fdct16x16_1_sse2 - -void vpx_fdct32x32_c(const int16_t *input, tran_low_t *output, int stride); -void vpx_fdct32x32_sse2(const int16_t *input, tran_low_t *output, int stride); -#define vpx_fdct32x32 vpx_fdct32x32_sse2 - -void vpx_fdct32x32_1_c(const int16_t *input, tran_low_t *output, int stride); -void vpx_fdct32x32_1_sse2(const int16_t *input, tran_low_t *output, int stride); -#define vpx_fdct32x32_1 vpx_fdct32x32_1_sse2 - -void vpx_fdct32x32_rd_c(const int16_t *input, tran_low_t *output, int stride); -void vpx_fdct32x32_rd_sse2(const int16_t *input, tran_low_t *output, int stride); -#define vpx_fdct32x32_rd vpx_fdct32x32_rd_sse2 - -void vpx_fdct4x4_c(const int16_t *input, tran_low_t *output, int stride); -void vpx_fdct4x4_sse2(const int16_t *input, tran_low_t *output, int stride); -#define vpx_fdct4x4 vpx_fdct4x4_sse2 - -void vpx_fdct4x4_1_c(const int16_t *input, tran_low_t *output, int stride); -void vpx_fdct4x4_1_sse2(const int16_t *input, tran_low_t *output, int stride); -#define vpx_fdct4x4_1 vpx_fdct4x4_1_sse2 - -void vpx_fdct8x8_c(const int16_t *input, tran_low_t *output, int stride); -void vpx_fdct8x8_sse2(const int16_t *input, tran_low_t *output, int stride); -#define vpx_fdct8x8 vpx_fdct8x8_sse2 - -void vpx_fdct8x8_1_c(const int16_t *input, tran_low_t *output, int stride); -void vpx_fdct8x8_1_sse2(const int16_t *input, tran_low_t *output, int stride); -#define vpx_fdct8x8_1 vpx_fdct8x8_1_sse2 - -void vpx_get16x16var_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse, int *sum); -void vpx_get16x16var_sse2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse, int *sum); -void vpx_get16x16var_avx2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse, int *sum); -RTCD_EXTERN void (*vpx_get16x16var)(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse, int *sum); - -unsigned int vpx_get4x4sse_cs_c(const unsigned char *src_ptr, int source_stride, const unsigned char *ref_ptr, int ref_stride); -#define vpx_get4x4sse_cs vpx_get4x4sse_cs_c - -void vpx_get8x8var_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse, int *sum); -void vpx_get8x8var_sse2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse, int *sum); -#define vpx_get8x8var vpx_get8x8var_sse2 - -unsigned int vpx_get_mb_ss_c(const int16_t *); -unsigned int vpx_get_mb_ss_sse2(const int16_t *); -#define vpx_get_mb_ss vpx_get_mb_ss_sse2 - -void vpx_h_predictor_16x16_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_h_predictor_16x16_sse2(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_h_predictor_16x16 vpx_h_predictor_16x16_sse2 - -void vpx_h_predictor_32x32_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_h_predictor_32x32_sse2(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_h_predictor_32x32 vpx_h_predictor_32x32_sse2 - -void vpx_h_predictor_4x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_h_predictor_4x4_sse2(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_h_predictor_4x4 vpx_h_predictor_4x4_sse2 - -void vpx_h_predictor_8x8_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_h_predictor_8x8_sse2(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_h_predictor_8x8 vpx_h_predictor_8x8_sse2 - -void vpx_hadamard_16x16_c(const int16_t *src_diff, int src_stride, int16_t *coeff); -void vpx_hadamard_16x16_sse2(const int16_t *src_diff, int src_stride, int16_t *coeff); -#define vpx_hadamard_16x16 vpx_hadamard_16x16_sse2 - -void vpx_hadamard_8x8_c(const int16_t *src_diff, int src_stride, int16_t *coeff); -void vpx_hadamard_8x8_sse2(const int16_t *src_diff, int src_stride, int16_t *coeff); -void vpx_hadamard_8x8_ssse3(const int16_t *src_diff, int src_stride, int16_t *coeff); -RTCD_EXTERN void (*vpx_hadamard_8x8)(const int16_t *src_diff, int src_stride, int16_t *coeff); - -void vpx_he_predictor_4x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_he_predictor_4x4 vpx_he_predictor_4x4_c - -void vpx_highbd_10_get16x16var_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse, int *sum); -#define vpx_highbd_10_get16x16var vpx_highbd_10_get16x16var_c - -void vpx_highbd_10_get8x8var_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse, int *sum); -#define vpx_highbd_10_get8x8var vpx_highbd_10_get8x8var_c - -unsigned int vpx_highbd_10_mse16x16_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int recon_stride, unsigned int *sse); -unsigned int vpx_highbd_10_mse16x16_sse2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int recon_stride, unsigned int *sse); -#define vpx_highbd_10_mse16x16 vpx_highbd_10_mse16x16_sse2 - -unsigned int vpx_highbd_10_mse16x8_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int recon_stride, unsigned int *sse); -#define vpx_highbd_10_mse16x8 vpx_highbd_10_mse16x8_c - -unsigned int vpx_highbd_10_mse8x16_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int recon_stride, unsigned int *sse); -#define vpx_highbd_10_mse8x16 vpx_highbd_10_mse8x16_c - -unsigned int vpx_highbd_10_mse8x8_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int recon_stride, unsigned int *sse); -unsigned int vpx_highbd_10_mse8x8_sse2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int recon_stride, unsigned int *sse); -#define vpx_highbd_10_mse8x8 vpx_highbd_10_mse8x8_sse2 - -uint32_t vpx_highbd_10_sub_pixel_avg_variance16x16_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_highbd_10_sub_pixel_avg_variance16x16_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_highbd_10_sub_pixel_avg_variance16x16 vpx_highbd_10_sub_pixel_avg_variance16x16_sse2 - -uint32_t vpx_highbd_10_sub_pixel_avg_variance16x32_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_highbd_10_sub_pixel_avg_variance16x32_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_highbd_10_sub_pixel_avg_variance16x32 vpx_highbd_10_sub_pixel_avg_variance16x32_sse2 - -uint32_t vpx_highbd_10_sub_pixel_avg_variance16x8_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_highbd_10_sub_pixel_avg_variance16x8_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_highbd_10_sub_pixel_avg_variance16x8 vpx_highbd_10_sub_pixel_avg_variance16x8_sse2 - -uint32_t vpx_highbd_10_sub_pixel_avg_variance32x16_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_highbd_10_sub_pixel_avg_variance32x16_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_highbd_10_sub_pixel_avg_variance32x16 vpx_highbd_10_sub_pixel_avg_variance32x16_sse2 - -uint32_t vpx_highbd_10_sub_pixel_avg_variance32x32_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_highbd_10_sub_pixel_avg_variance32x32_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_highbd_10_sub_pixel_avg_variance32x32 vpx_highbd_10_sub_pixel_avg_variance32x32_sse2 - -uint32_t vpx_highbd_10_sub_pixel_avg_variance32x64_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_highbd_10_sub_pixel_avg_variance32x64_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_highbd_10_sub_pixel_avg_variance32x64 vpx_highbd_10_sub_pixel_avg_variance32x64_sse2 - -uint32_t vpx_highbd_10_sub_pixel_avg_variance4x4_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_highbd_10_sub_pixel_avg_variance4x4 vpx_highbd_10_sub_pixel_avg_variance4x4_c - -uint32_t vpx_highbd_10_sub_pixel_avg_variance4x8_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_highbd_10_sub_pixel_avg_variance4x8 vpx_highbd_10_sub_pixel_avg_variance4x8_c - -uint32_t vpx_highbd_10_sub_pixel_avg_variance64x32_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_highbd_10_sub_pixel_avg_variance64x32_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_highbd_10_sub_pixel_avg_variance64x32 vpx_highbd_10_sub_pixel_avg_variance64x32_sse2 - -uint32_t vpx_highbd_10_sub_pixel_avg_variance64x64_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_highbd_10_sub_pixel_avg_variance64x64_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_highbd_10_sub_pixel_avg_variance64x64 vpx_highbd_10_sub_pixel_avg_variance64x64_sse2 - -uint32_t vpx_highbd_10_sub_pixel_avg_variance8x16_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_highbd_10_sub_pixel_avg_variance8x16_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_highbd_10_sub_pixel_avg_variance8x16 vpx_highbd_10_sub_pixel_avg_variance8x16_sse2 - -uint32_t vpx_highbd_10_sub_pixel_avg_variance8x4_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_highbd_10_sub_pixel_avg_variance8x4_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_highbd_10_sub_pixel_avg_variance8x4 vpx_highbd_10_sub_pixel_avg_variance8x4_sse2 - -uint32_t vpx_highbd_10_sub_pixel_avg_variance8x8_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_highbd_10_sub_pixel_avg_variance8x8_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_highbd_10_sub_pixel_avg_variance8x8 vpx_highbd_10_sub_pixel_avg_variance8x8_sse2 - -uint32_t vpx_highbd_10_sub_pixel_variance16x16_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_highbd_10_sub_pixel_variance16x16_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -#define vpx_highbd_10_sub_pixel_variance16x16 vpx_highbd_10_sub_pixel_variance16x16_sse2 - -uint32_t vpx_highbd_10_sub_pixel_variance16x32_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_highbd_10_sub_pixel_variance16x32_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -#define vpx_highbd_10_sub_pixel_variance16x32 vpx_highbd_10_sub_pixel_variance16x32_sse2 - -uint32_t vpx_highbd_10_sub_pixel_variance16x8_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_highbd_10_sub_pixel_variance16x8_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -#define vpx_highbd_10_sub_pixel_variance16x8 vpx_highbd_10_sub_pixel_variance16x8_sse2 - -uint32_t vpx_highbd_10_sub_pixel_variance32x16_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_highbd_10_sub_pixel_variance32x16_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -#define vpx_highbd_10_sub_pixel_variance32x16 vpx_highbd_10_sub_pixel_variance32x16_sse2 - -uint32_t vpx_highbd_10_sub_pixel_variance32x32_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_highbd_10_sub_pixel_variance32x32_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -#define vpx_highbd_10_sub_pixel_variance32x32 vpx_highbd_10_sub_pixel_variance32x32_sse2 - -uint32_t vpx_highbd_10_sub_pixel_variance32x64_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_highbd_10_sub_pixel_variance32x64_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -#define vpx_highbd_10_sub_pixel_variance32x64 vpx_highbd_10_sub_pixel_variance32x64_sse2 - -uint32_t vpx_highbd_10_sub_pixel_variance4x4_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -#define vpx_highbd_10_sub_pixel_variance4x4 vpx_highbd_10_sub_pixel_variance4x4_c - -uint32_t vpx_highbd_10_sub_pixel_variance4x8_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -#define vpx_highbd_10_sub_pixel_variance4x8 vpx_highbd_10_sub_pixel_variance4x8_c - -uint32_t vpx_highbd_10_sub_pixel_variance64x32_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_highbd_10_sub_pixel_variance64x32_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -#define vpx_highbd_10_sub_pixel_variance64x32 vpx_highbd_10_sub_pixel_variance64x32_sse2 - -uint32_t vpx_highbd_10_sub_pixel_variance64x64_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_highbd_10_sub_pixel_variance64x64_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -#define vpx_highbd_10_sub_pixel_variance64x64 vpx_highbd_10_sub_pixel_variance64x64_sse2 - -uint32_t vpx_highbd_10_sub_pixel_variance8x16_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_highbd_10_sub_pixel_variance8x16_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -#define vpx_highbd_10_sub_pixel_variance8x16 vpx_highbd_10_sub_pixel_variance8x16_sse2 - -uint32_t vpx_highbd_10_sub_pixel_variance8x4_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_highbd_10_sub_pixel_variance8x4_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -#define vpx_highbd_10_sub_pixel_variance8x4 vpx_highbd_10_sub_pixel_variance8x4_sse2 - -uint32_t vpx_highbd_10_sub_pixel_variance8x8_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_highbd_10_sub_pixel_variance8x8_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -#define vpx_highbd_10_sub_pixel_variance8x8 vpx_highbd_10_sub_pixel_variance8x8_sse2 - -unsigned int vpx_highbd_10_variance16x16_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -unsigned int vpx_highbd_10_variance16x16_sse2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_highbd_10_variance16x16 vpx_highbd_10_variance16x16_sse2 - -unsigned int vpx_highbd_10_variance16x32_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -unsigned int vpx_highbd_10_variance16x32_sse2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_highbd_10_variance16x32 vpx_highbd_10_variance16x32_sse2 - -unsigned int vpx_highbd_10_variance16x8_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -unsigned int vpx_highbd_10_variance16x8_sse2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_highbd_10_variance16x8 vpx_highbd_10_variance16x8_sse2 - -unsigned int vpx_highbd_10_variance32x16_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -unsigned int vpx_highbd_10_variance32x16_sse2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_highbd_10_variance32x16 vpx_highbd_10_variance32x16_sse2 - -unsigned int vpx_highbd_10_variance32x32_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -unsigned int vpx_highbd_10_variance32x32_sse2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_highbd_10_variance32x32 vpx_highbd_10_variance32x32_sse2 - -unsigned int vpx_highbd_10_variance32x64_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -unsigned int vpx_highbd_10_variance32x64_sse2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_highbd_10_variance32x64 vpx_highbd_10_variance32x64_sse2 - -unsigned int vpx_highbd_10_variance4x4_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_highbd_10_variance4x4 vpx_highbd_10_variance4x4_c - -unsigned int vpx_highbd_10_variance4x8_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_highbd_10_variance4x8 vpx_highbd_10_variance4x8_c - -unsigned int vpx_highbd_10_variance64x32_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -unsigned int vpx_highbd_10_variance64x32_sse2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_highbd_10_variance64x32 vpx_highbd_10_variance64x32_sse2 - -unsigned int vpx_highbd_10_variance64x64_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -unsigned int vpx_highbd_10_variance64x64_sse2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_highbd_10_variance64x64 vpx_highbd_10_variance64x64_sse2 - -unsigned int vpx_highbd_10_variance8x16_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -unsigned int vpx_highbd_10_variance8x16_sse2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_highbd_10_variance8x16 vpx_highbd_10_variance8x16_sse2 - -unsigned int vpx_highbd_10_variance8x4_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_highbd_10_variance8x4 vpx_highbd_10_variance8x4_c - -unsigned int vpx_highbd_10_variance8x8_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -unsigned int vpx_highbd_10_variance8x8_sse2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_highbd_10_variance8x8 vpx_highbd_10_variance8x8_sse2 - -void vpx_highbd_12_get16x16var_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse, int *sum); -#define vpx_highbd_12_get16x16var vpx_highbd_12_get16x16var_c - -void vpx_highbd_12_get8x8var_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse, int *sum); -#define vpx_highbd_12_get8x8var vpx_highbd_12_get8x8var_c - -unsigned int vpx_highbd_12_mse16x16_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int recon_stride, unsigned int *sse); -unsigned int vpx_highbd_12_mse16x16_sse2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int recon_stride, unsigned int *sse); -#define vpx_highbd_12_mse16x16 vpx_highbd_12_mse16x16_sse2 - -unsigned int vpx_highbd_12_mse16x8_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int recon_stride, unsigned int *sse); -#define vpx_highbd_12_mse16x8 vpx_highbd_12_mse16x8_c - -unsigned int vpx_highbd_12_mse8x16_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int recon_stride, unsigned int *sse); -#define vpx_highbd_12_mse8x16 vpx_highbd_12_mse8x16_c - -unsigned int vpx_highbd_12_mse8x8_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int recon_stride, unsigned int *sse); -unsigned int vpx_highbd_12_mse8x8_sse2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int recon_stride, unsigned int *sse); -#define vpx_highbd_12_mse8x8 vpx_highbd_12_mse8x8_sse2 - -uint32_t vpx_highbd_12_sub_pixel_avg_variance16x16_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_highbd_12_sub_pixel_avg_variance16x16_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_highbd_12_sub_pixel_avg_variance16x16 vpx_highbd_12_sub_pixel_avg_variance16x16_sse2 - -uint32_t vpx_highbd_12_sub_pixel_avg_variance16x32_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_highbd_12_sub_pixel_avg_variance16x32_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_highbd_12_sub_pixel_avg_variance16x32 vpx_highbd_12_sub_pixel_avg_variance16x32_sse2 - -uint32_t vpx_highbd_12_sub_pixel_avg_variance16x8_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_highbd_12_sub_pixel_avg_variance16x8_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_highbd_12_sub_pixel_avg_variance16x8 vpx_highbd_12_sub_pixel_avg_variance16x8_sse2 - -uint32_t vpx_highbd_12_sub_pixel_avg_variance32x16_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_highbd_12_sub_pixel_avg_variance32x16_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_highbd_12_sub_pixel_avg_variance32x16 vpx_highbd_12_sub_pixel_avg_variance32x16_sse2 - -uint32_t vpx_highbd_12_sub_pixel_avg_variance32x32_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_highbd_12_sub_pixel_avg_variance32x32_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_highbd_12_sub_pixel_avg_variance32x32 vpx_highbd_12_sub_pixel_avg_variance32x32_sse2 - -uint32_t vpx_highbd_12_sub_pixel_avg_variance32x64_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_highbd_12_sub_pixel_avg_variance32x64_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_highbd_12_sub_pixel_avg_variance32x64 vpx_highbd_12_sub_pixel_avg_variance32x64_sse2 - -uint32_t vpx_highbd_12_sub_pixel_avg_variance4x4_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_highbd_12_sub_pixel_avg_variance4x4 vpx_highbd_12_sub_pixel_avg_variance4x4_c - -uint32_t vpx_highbd_12_sub_pixel_avg_variance4x8_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_highbd_12_sub_pixel_avg_variance4x8 vpx_highbd_12_sub_pixel_avg_variance4x8_c - -uint32_t vpx_highbd_12_sub_pixel_avg_variance64x32_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_highbd_12_sub_pixel_avg_variance64x32_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_highbd_12_sub_pixel_avg_variance64x32 vpx_highbd_12_sub_pixel_avg_variance64x32_sse2 - -uint32_t vpx_highbd_12_sub_pixel_avg_variance64x64_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_highbd_12_sub_pixel_avg_variance64x64_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_highbd_12_sub_pixel_avg_variance64x64 vpx_highbd_12_sub_pixel_avg_variance64x64_sse2 - -uint32_t vpx_highbd_12_sub_pixel_avg_variance8x16_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_highbd_12_sub_pixel_avg_variance8x16_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_highbd_12_sub_pixel_avg_variance8x16 vpx_highbd_12_sub_pixel_avg_variance8x16_sse2 - -uint32_t vpx_highbd_12_sub_pixel_avg_variance8x4_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_highbd_12_sub_pixel_avg_variance8x4_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_highbd_12_sub_pixel_avg_variance8x4 vpx_highbd_12_sub_pixel_avg_variance8x4_sse2 - -uint32_t vpx_highbd_12_sub_pixel_avg_variance8x8_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_highbd_12_sub_pixel_avg_variance8x8_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_highbd_12_sub_pixel_avg_variance8x8 vpx_highbd_12_sub_pixel_avg_variance8x8_sse2 - -uint32_t vpx_highbd_12_sub_pixel_variance16x16_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_highbd_12_sub_pixel_variance16x16_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -#define vpx_highbd_12_sub_pixel_variance16x16 vpx_highbd_12_sub_pixel_variance16x16_sse2 - -uint32_t vpx_highbd_12_sub_pixel_variance16x32_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_highbd_12_sub_pixel_variance16x32_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -#define vpx_highbd_12_sub_pixel_variance16x32 vpx_highbd_12_sub_pixel_variance16x32_sse2 - -uint32_t vpx_highbd_12_sub_pixel_variance16x8_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_highbd_12_sub_pixel_variance16x8_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -#define vpx_highbd_12_sub_pixel_variance16x8 vpx_highbd_12_sub_pixel_variance16x8_sse2 - -uint32_t vpx_highbd_12_sub_pixel_variance32x16_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_highbd_12_sub_pixel_variance32x16_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -#define vpx_highbd_12_sub_pixel_variance32x16 vpx_highbd_12_sub_pixel_variance32x16_sse2 - -uint32_t vpx_highbd_12_sub_pixel_variance32x32_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_highbd_12_sub_pixel_variance32x32_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -#define vpx_highbd_12_sub_pixel_variance32x32 vpx_highbd_12_sub_pixel_variance32x32_sse2 - -uint32_t vpx_highbd_12_sub_pixel_variance32x64_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_highbd_12_sub_pixel_variance32x64_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -#define vpx_highbd_12_sub_pixel_variance32x64 vpx_highbd_12_sub_pixel_variance32x64_sse2 - -uint32_t vpx_highbd_12_sub_pixel_variance4x4_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -#define vpx_highbd_12_sub_pixel_variance4x4 vpx_highbd_12_sub_pixel_variance4x4_c - -uint32_t vpx_highbd_12_sub_pixel_variance4x8_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -#define vpx_highbd_12_sub_pixel_variance4x8 vpx_highbd_12_sub_pixel_variance4x8_c - -uint32_t vpx_highbd_12_sub_pixel_variance64x32_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_highbd_12_sub_pixel_variance64x32_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -#define vpx_highbd_12_sub_pixel_variance64x32 vpx_highbd_12_sub_pixel_variance64x32_sse2 - -uint32_t vpx_highbd_12_sub_pixel_variance64x64_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_highbd_12_sub_pixel_variance64x64_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -#define vpx_highbd_12_sub_pixel_variance64x64 vpx_highbd_12_sub_pixel_variance64x64_sse2 - -uint32_t vpx_highbd_12_sub_pixel_variance8x16_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_highbd_12_sub_pixel_variance8x16_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -#define vpx_highbd_12_sub_pixel_variance8x16 vpx_highbd_12_sub_pixel_variance8x16_sse2 - -uint32_t vpx_highbd_12_sub_pixel_variance8x4_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_highbd_12_sub_pixel_variance8x4_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -#define vpx_highbd_12_sub_pixel_variance8x4 vpx_highbd_12_sub_pixel_variance8x4_sse2 - -uint32_t vpx_highbd_12_sub_pixel_variance8x8_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_highbd_12_sub_pixel_variance8x8_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -#define vpx_highbd_12_sub_pixel_variance8x8 vpx_highbd_12_sub_pixel_variance8x8_sse2 - -unsigned int vpx_highbd_12_variance16x16_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -unsigned int vpx_highbd_12_variance16x16_sse2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_highbd_12_variance16x16 vpx_highbd_12_variance16x16_sse2 - -unsigned int vpx_highbd_12_variance16x32_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -unsigned int vpx_highbd_12_variance16x32_sse2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_highbd_12_variance16x32 vpx_highbd_12_variance16x32_sse2 - -unsigned int vpx_highbd_12_variance16x8_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -unsigned int vpx_highbd_12_variance16x8_sse2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_highbd_12_variance16x8 vpx_highbd_12_variance16x8_sse2 - -unsigned int vpx_highbd_12_variance32x16_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -unsigned int vpx_highbd_12_variance32x16_sse2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_highbd_12_variance32x16 vpx_highbd_12_variance32x16_sse2 - -unsigned int vpx_highbd_12_variance32x32_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -unsigned int vpx_highbd_12_variance32x32_sse2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_highbd_12_variance32x32 vpx_highbd_12_variance32x32_sse2 - -unsigned int vpx_highbd_12_variance32x64_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -unsigned int vpx_highbd_12_variance32x64_sse2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_highbd_12_variance32x64 vpx_highbd_12_variance32x64_sse2 - -unsigned int vpx_highbd_12_variance4x4_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_highbd_12_variance4x4 vpx_highbd_12_variance4x4_c - -unsigned int vpx_highbd_12_variance4x8_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_highbd_12_variance4x8 vpx_highbd_12_variance4x8_c - -unsigned int vpx_highbd_12_variance64x32_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -unsigned int vpx_highbd_12_variance64x32_sse2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_highbd_12_variance64x32 vpx_highbd_12_variance64x32_sse2 - -unsigned int vpx_highbd_12_variance64x64_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -unsigned int vpx_highbd_12_variance64x64_sse2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_highbd_12_variance64x64 vpx_highbd_12_variance64x64_sse2 - -unsigned int vpx_highbd_12_variance8x16_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -unsigned int vpx_highbd_12_variance8x16_sse2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_highbd_12_variance8x16 vpx_highbd_12_variance8x16_sse2 - -unsigned int vpx_highbd_12_variance8x4_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_highbd_12_variance8x4 vpx_highbd_12_variance8x4_c - -unsigned int vpx_highbd_12_variance8x8_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -unsigned int vpx_highbd_12_variance8x8_sse2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_highbd_12_variance8x8 vpx_highbd_12_variance8x8_sse2 - -void vpx_highbd_8_get16x16var_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse, int *sum); -#define vpx_highbd_8_get16x16var vpx_highbd_8_get16x16var_c - -void vpx_highbd_8_get8x8var_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse, int *sum); -#define vpx_highbd_8_get8x8var vpx_highbd_8_get8x8var_c - -unsigned int vpx_highbd_8_mse16x16_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int recon_stride, unsigned int *sse); -unsigned int vpx_highbd_8_mse16x16_sse2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int recon_stride, unsigned int *sse); -#define vpx_highbd_8_mse16x16 vpx_highbd_8_mse16x16_sse2 - -unsigned int vpx_highbd_8_mse16x8_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int recon_stride, unsigned int *sse); -#define vpx_highbd_8_mse16x8 vpx_highbd_8_mse16x8_c - -unsigned int vpx_highbd_8_mse8x16_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int recon_stride, unsigned int *sse); -#define vpx_highbd_8_mse8x16 vpx_highbd_8_mse8x16_c - -unsigned int vpx_highbd_8_mse8x8_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int recon_stride, unsigned int *sse); -unsigned int vpx_highbd_8_mse8x8_sse2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int recon_stride, unsigned int *sse); -#define vpx_highbd_8_mse8x8 vpx_highbd_8_mse8x8_sse2 - -uint32_t vpx_highbd_8_sub_pixel_avg_variance16x16_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_highbd_8_sub_pixel_avg_variance16x16_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_highbd_8_sub_pixel_avg_variance16x16 vpx_highbd_8_sub_pixel_avg_variance16x16_sse2 - -uint32_t vpx_highbd_8_sub_pixel_avg_variance16x32_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_highbd_8_sub_pixel_avg_variance16x32_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_highbd_8_sub_pixel_avg_variance16x32 vpx_highbd_8_sub_pixel_avg_variance16x32_sse2 - -uint32_t vpx_highbd_8_sub_pixel_avg_variance16x8_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_highbd_8_sub_pixel_avg_variance16x8_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_highbd_8_sub_pixel_avg_variance16x8 vpx_highbd_8_sub_pixel_avg_variance16x8_sse2 - -uint32_t vpx_highbd_8_sub_pixel_avg_variance32x16_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_highbd_8_sub_pixel_avg_variance32x16_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_highbd_8_sub_pixel_avg_variance32x16 vpx_highbd_8_sub_pixel_avg_variance32x16_sse2 - -uint32_t vpx_highbd_8_sub_pixel_avg_variance32x32_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_highbd_8_sub_pixel_avg_variance32x32_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_highbd_8_sub_pixel_avg_variance32x32 vpx_highbd_8_sub_pixel_avg_variance32x32_sse2 - -uint32_t vpx_highbd_8_sub_pixel_avg_variance32x64_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_highbd_8_sub_pixel_avg_variance32x64_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_highbd_8_sub_pixel_avg_variance32x64 vpx_highbd_8_sub_pixel_avg_variance32x64_sse2 - -uint32_t vpx_highbd_8_sub_pixel_avg_variance4x4_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_highbd_8_sub_pixel_avg_variance4x4 vpx_highbd_8_sub_pixel_avg_variance4x4_c - -uint32_t vpx_highbd_8_sub_pixel_avg_variance4x8_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_highbd_8_sub_pixel_avg_variance4x8 vpx_highbd_8_sub_pixel_avg_variance4x8_c - -uint32_t vpx_highbd_8_sub_pixel_avg_variance64x32_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_highbd_8_sub_pixel_avg_variance64x32_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_highbd_8_sub_pixel_avg_variance64x32 vpx_highbd_8_sub_pixel_avg_variance64x32_sse2 - -uint32_t vpx_highbd_8_sub_pixel_avg_variance64x64_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_highbd_8_sub_pixel_avg_variance64x64_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_highbd_8_sub_pixel_avg_variance64x64 vpx_highbd_8_sub_pixel_avg_variance64x64_sse2 - -uint32_t vpx_highbd_8_sub_pixel_avg_variance8x16_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_highbd_8_sub_pixel_avg_variance8x16_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_highbd_8_sub_pixel_avg_variance8x16 vpx_highbd_8_sub_pixel_avg_variance8x16_sse2 - -uint32_t vpx_highbd_8_sub_pixel_avg_variance8x4_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_highbd_8_sub_pixel_avg_variance8x4_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_highbd_8_sub_pixel_avg_variance8x4 vpx_highbd_8_sub_pixel_avg_variance8x4_sse2 - -uint32_t vpx_highbd_8_sub_pixel_avg_variance8x8_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_highbd_8_sub_pixel_avg_variance8x8_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_highbd_8_sub_pixel_avg_variance8x8 vpx_highbd_8_sub_pixel_avg_variance8x8_sse2 - -uint32_t vpx_highbd_8_sub_pixel_variance16x16_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_highbd_8_sub_pixel_variance16x16_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -#define vpx_highbd_8_sub_pixel_variance16x16 vpx_highbd_8_sub_pixel_variance16x16_sse2 - -uint32_t vpx_highbd_8_sub_pixel_variance16x32_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_highbd_8_sub_pixel_variance16x32_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -#define vpx_highbd_8_sub_pixel_variance16x32 vpx_highbd_8_sub_pixel_variance16x32_sse2 - -uint32_t vpx_highbd_8_sub_pixel_variance16x8_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_highbd_8_sub_pixel_variance16x8_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -#define vpx_highbd_8_sub_pixel_variance16x8 vpx_highbd_8_sub_pixel_variance16x8_sse2 - -uint32_t vpx_highbd_8_sub_pixel_variance32x16_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_highbd_8_sub_pixel_variance32x16_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -#define vpx_highbd_8_sub_pixel_variance32x16 vpx_highbd_8_sub_pixel_variance32x16_sse2 - -uint32_t vpx_highbd_8_sub_pixel_variance32x32_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_highbd_8_sub_pixel_variance32x32_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -#define vpx_highbd_8_sub_pixel_variance32x32 vpx_highbd_8_sub_pixel_variance32x32_sse2 - -uint32_t vpx_highbd_8_sub_pixel_variance32x64_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_highbd_8_sub_pixel_variance32x64_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -#define vpx_highbd_8_sub_pixel_variance32x64 vpx_highbd_8_sub_pixel_variance32x64_sse2 - -uint32_t vpx_highbd_8_sub_pixel_variance4x4_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -#define vpx_highbd_8_sub_pixel_variance4x4 vpx_highbd_8_sub_pixel_variance4x4_c - -uint32_t vpx_highbd_8_sub_pixel_variance4x8_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -#define vpx_highbd_8_sub_pixel_variance4x8 vpx_highbd_8_sub_pixel_variance4x8_c - -uint32_t vpx_highbd_8_sub_pixel_variance64x32_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_highbd_8_sub_pixel_variance64x32_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -#define vpx_highbd_8_sub_pixel_variance64x32 vpx_highbd_8_sub_pixel_variance64x32_sse2 - -uint32_t vpx_highbd_8_sub_pixel_variance64x64_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_highbd_8_sub_pixel_variance64x64_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -#define vpx_highbd_8_sub_pixel_variance64x64 vpx_highbd_8_sub_pixel_variance64x64_sse2 - -uint32_t vpx_highbd_8_sub_pixel_variance8x16_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_highbd_8_sub_pixel_variance8x16_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -#define vpx_highbd_8_sub_pixel_variance8x16 vpx_highbd_8_sub_pixel_variance8x16_sse2 - -uint32_t vpx_highbd_8_sub_pixel_variance8x4_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_highbd_8_sub_pixel_variance8x4_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -#define vpx_highbd_8_sub_pixel_variance8x4 vpx_highbd_8_sub_pixel_variance8x4_sse2 - -uint32_t vpx_highbd_8_sub_pixel_variance8x8_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_highbd_8_sub_pixel_variance8x8_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -#define vpx_highbd_8_sub_pixel_variance8x8 vpx_highbd_8_sub_pixel_variance8x8_sse2 - -unsigned int vpx_highbd_8_variance16x16_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -unsigned int vpx_highbd_8_variance16x16_sse2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_highbd_8_variance16x16 vpx_highbd_8_variance16x16_sse2 - -unsigned int vpx_highbd_8_variance16x32_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -unsigned int vpx_highbd_8_variance16x32_sse2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_highbd_8_variance16x32 vpx_highbd_8_variance16x32_sse2 - -unsigned int vpx_highbd_8_variance16x8_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -unsigned int vpx_highbd_8_variance16x8_sse2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_highbd_8_variance16x8 vpx_highbd_8_variance16x8_sse2 - -unsigned int vpx_highbd_8_variance32x16_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -unsigned int vpx_highbd_8_variance32x16_sse2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_highbd_8_variance32x16 vpx_highbd_8_variance32x16_sse2 - -unsigned int vpx_highbd_8_variance32x32_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -unsigned int vpx_highbd_8_variance32x32_sse2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_highbd_8_variance32x32 vpx_highbd_8_variance32x32_sse2 - -unsigned int vpx_highbd_8_variance32x64_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -unsigned int vpx_highbd_8_variance32x64_sse2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_highbd_8_variance32x64 vpx_highbd_8_variance32x64_sse2 - -unsigned int vpx_highbd_8_variance4x4_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_highbd_8_variance4x4 vpx_highbd_8_variance4x4_c - -unsigned int vpx_highbd_8_variance4x8_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_highbd_8_variance4x8 vpx_highbd_8_variance4x8_c - -unsigned int vpx_highbd_8_variance64x32_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -unsigned int vpx_highbd_8_variance64x32_sse2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_highbd_8_variance64x32 vpx_highbd_8_variance64x32_sse2 - -unsigned int vpx_highbd_8_variance64x64_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -unsigned int vpx_highbd_8_variance64x64_sse2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_highbd_8_variance64x64 vpx_highbd_8_variance64x64_sse2 - -unsigned int vpx_highbd_8_variance8x16_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -unsigned int vpx_highbd_8_variance8x16_sse2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_highbd_8_variance8x16 vpx_highbd_8_variance8x16_sse2 - -unsigned int vpx_highbd_8_variance8x4_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_highbd_8_variance8x4 vpx_highbd_8_variance8x4_c - -unsigned int vpx_highbd_8_variance8x8_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -unsigned int vpx_highbd_8_variance8x8_sse2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_highbd_8_variance8x8 vpx_highbd_8_variance8x8_sse2 - -unsigned int vpx_highbd_avg_4x4_c(const uint8_t *, int p); -#define vpx_highbd_avg_4x4 vpx_highbd_avg_4x4_c - -unsigned int vpx_highbd_avg_8x8_c(const uint8_t *, int p); -#define vpx_highbd_avg_8x8 vpx_highbd_avg_8x8_c - -void vpx_highbd_comp_avg_pred_c(uint16_t *comp_pred, const uint8_t *pred8, int width, int height, const uint8_t *ref8, int ref_stride); -#define vpx_highbd_comp_avg_pred vpx_highbd_comp_avg_pred_c - -void vpx_highbd_convolve8_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h, int bps); -void vpx_highbd_convolve8_sse2(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h, int bps); -#define vpx_highbd_convolve8 vpx_highbd_convolve8_sse2 - -void vpx_highbd_convolve8_avg_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h, int bps); -void vpx_highbd_convolve8_avg_sse2(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h, int bps); -#define vpx_highbd_convolve8_avg vpx_highbd_convolve8_avg_sse2 - -void vpx_highbd_convolve8_avg_horiz_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h, int bps); -void vpx_highbd_convolve8_avg_horiz_sse2(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h, int bps); -#define vpx_highbd_convolve8_avg_horiz vpx_highbd_convolve8_avg_horiz_sse2 - -void vpx_highbd_convolve8_avg_vert_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h, int bps); -void vpx_highbd_convolve8_avg_vert_sse2(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h, int bps); -#define vpx_highbd_convolve8_avg_vert vpx_highbd_convolve8_avg_vert_sse2 - -void vpx_highbd_convolve8_horiz_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h, int bps); -void vpx_highbd_convolve8_horiz_sse2(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h, int bps); -#define vpx_highbd_convolve8_horiz vpx_highbd_convolve8_horiz_sse2 - -void vpx_highbd_convolve8_vert_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h, int bps); -void vpx_highbd_convolve8_vert_sse2(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h, int bps); -#define vpx_highbd_convolve8_vert vpx_highbd_convolve8_vert_sse2 - -void vpx_highbd_convolve_avg_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h, int bps); -void vpx_highbd_convolve_avg_sse2(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h, int bps); -#define vpx_highbd_convolve_avg vpx_highbd_convolve_avg_sse2 - -void vpx_highbd_convolve_copy_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h, int bps); -void vpx_highbd_convolve_copy_sse2(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h, int bps); -#define vpx_highbd_convolve_copy vpx_highbd_convolve_copy_sse2 - -void vpx_highbd_d117_predictor_16x16_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_d117_predictor_16x16 vpx_highbd_d117_predictor_16x16_c - -void vpx_highbd_d117_predictor_32x32_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_d117_predictor_32x32 vpx_highbd_d117_predictor_32x32_c - -void vpx_highbd_d117_predictor_4x4_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_d117_predictor_4x4 vpx_highbd_d117_predictor_4x4_c - -void vpx_highbd_d117_predictor_8x8_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_d117_predictor_8x8 vpx_highbd_d117_predictor_8x8_c - -void vpx_highbd_d135_predictor_16x16_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_d135_predictor_16x16 vpx_highbd_d135_predictor_16x16_c - -void vpx_highbd_d135_predictor_32x32_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_d135_predictor_32x32 vpx_highbd_d135_predictor_32x32_c - -void vpx_highbd_d135_predictor_4x4_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_d135_predictor_4x4 vpx_highbd_d135_predictor_4x4_c - -void vpx_highbd_d135_predictor_8x8_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_d135_predictor_8x8 vpx_highbd_d135_predictor_8x8_c - -void vpx_highbd_d153_predictor_16x16_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_d153_predictor_16x16 vpx_highbd_d153_predictor_16x16_c - -void vpx_highbd_d153_predictor_32x32_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_d153_predictor_32x32 vpx_highbd_d153_predictor_32x32_c - -void vpx_highbd_d153_predictor_4x4_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_d153_predictor_4x4 vpx_highbd_d153_predictor_4x4_c - -void vpx_highbd_d153_predictor_8x8_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_d153_predictor_8x8 vpx_highbd_d153_predictor_8x8_c - -void vpx_highbd_d207_predictor_16x16_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_d207_predictor_16x16 vpx_highbd_d207_predictor_16x16_c - -void vpx_highbd_d207_predictor_32x32_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_d207_predictor_32x32 vpx_highbd_d207_predictor_32x32_c - -void vpx_highbd_d207_predictor_4x4_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_d207_predictor_4x4 vpx_highbd_d207_predictor_4x4_c - -void vpx_highbd_d207_predictor_8x8_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_d207_predictor_8x8 vpx_highbd_d207_predictor_8x8_c - -void vpx_highbd_d207e_predictor_16x16_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_d207e_predictor_16x16 vpx_highbd_d207e_predictor_16x16_c - -void vpx_highbd_d207e_predictor_32x32_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_d207e_predictor_32x32 vpx_highbd_d207e_predictor_32x32_c - -void vpx_highbd_d207e_predictor_4x4_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_d207e_predictor_4x4 vpx_highbd_d207e_predictor_4x4_c - -void vpx_highbd_d207e_predictor_8x8_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_d207e_predictor_8x8 vpx_highbd_d207e_predictor_8x8_c - -void vpx_highbd_d45_predictor_16x16_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_d45_predictor_16x16 vpx_highbd_d45_predictor_16x16_c - -void vpx_highbd_d45_predictor_32x32_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_d45_predictor_32x32 vpx_highbd_d45_predictor_32x32_c - -void vpx_highbd_d45_predictor_4x4_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_d45_predictor_4x4 vpx_highbd_d45_predictor_4x4_c - -void vpx_highbd_d45_predictor_8x8_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_d45_predictor_8x8 vpx_highbd_d45_predictor_8x8_c - -void vpx_highbd_d45e_predictor_16x16_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_d45e_predictor_16x16 vpx_highbd_d45e_predictor_16x16_c - -void vpx_highbd_d45e_predictor_32x32_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_d45e_predictor_32x32 vpx_highbd_d45e_predictor_32x32_c - -void vpx_highbd_d45e_predictor_4x4_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_d45e_predictor_4x4 vpx_highbd_d45e_predictor_4x4_c - -void vpx_highbd_d45e_predictor_8x8_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_d45e_predictor_8x8 vpx_highbd_d45e_predictor_8x8_c - -void vpx_highbd_d63_predictor_16x16_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_d63_predictor_16x16 vpx_highbd_d63_predictor_16x16_c - -void vpx_highbd_d63_predictor_32x32_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_d63_predictor_32x32 vpx_highbd_d63_predictor_32x32_c - -void vpx_highbd_d63_predictor_4x4_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_d63_predictor_4x4 vpx_highbd_d63_predictor_4x4_c - -void vpx_highbd_d63_predictor_8x8_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_d63_predictor_8x8 vpx_highbd_d63_predictor_8x8_c - -void vpx_highbd_d63e_predictor_16x16_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_d63e_predictor_16x16 vpx_highbd_d63e_predictor_16x16_c - -void vpx_highbd_d63e_predictor_32x32_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_d63e_predictor_32x32 vpx_highbd_d63e_predictor_32x32_c - -void vpx_highbd_d63e_predictor_4x4_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_d63e_predictor_4x4 vpx_highbd_d63e_predictor_4x4_c - -void vpx_highbd_d63e_predictor_8x8_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_d63e_predictor_8x8 vpx_highbd_d63e_predictor_8x8_c - -void vpx_highbd_dc_128_predictor_16x16_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_dc_128_predictor_16x16 vpx_highbd_dc_128_predictor_16x16_c - -void vpx_highbd_dc_128_predictor_32x32_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_dc_128_predictor_32x32 vpx_highbd_dc_128_predictor_32x32_c - -void vpx_highbd_dc_128_predictor_4x4_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_dc_128_predictor_4x4 vpx_highbd_dc_128_predictor_4x4_c - -void vpx_highbd_dc_128_predictor_8x8_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_dc_128_predictor_8x8 vpx_highbd_dc_128_predictor_8x8_c - -void vpx_highbd_dc_left_predictor_16x16_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_dc_left_predictor_16x16 vpx_highbd_dc_left_predictor_16x16_c - -void vpx_highbd_dc_left_predictor_32x32_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_dc_left_predictor_32x32 vpx_highbd_dc_left_predictor_32x32_c - -void vpx_highbd_dc_left_predictor_4x4_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_dc_left_predictor_4x4 vpx_highbd_dc_left_predictor_4x4_c - -void vpx_highbd_dc_left_predictor_8x8_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_dc_left_predictor_8x8 vpx_highbd_dc_left_predictor_8x8_c - -void vpx_highbd_dc_predictor_16x16_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -void vpx_highbd_dc_predictor_16x16_sse2(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_dc_predictor_16x16 vpx_highbd_dc_predictor_16x16_sse2 - -void vpx_highbd_dc_predictor_32x32_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -void vpx_highbd_dc_predictor_32x32_sse2(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_dc_predictor_32x32 vpx_highbd_dc_predictor_32x32_sse2 - -void vpx_highbd_dc_predictor_4x4_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -void vpx_highbd_dc_predictor_4x4_sse2(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_dc_predictor_4x4 vpx_highbd_dc_predictor_4x4_sse2 - -void vpx_highbd_dc_predictor_8x8_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -void vpx_highbd_dc_predictor_8x8_sse2(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_dc_predictor_8x8 vpx_highbd_dc_predictor_8x8_sse2 - -void vpx_highbd_dc_top_predictor_16x16_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_dc_top_predictor_16x16 vpx_highbd_dc_top_predictor_16x16_c - -void vpx_highbd_dc_top_predictor_32x32_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_dc_top_predictor_32x32 vpx_highbd_dc_top_predictor_32x32_c - -void vpx_highbd_dc_top_predictor_4x4_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_dc_top_predictor_4x4 vpx_highbd_dc_top_predictor_4x4_c - -void vpx_highbd_dc_top_predictor_8x8_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_dc_top_predictor_8x8 vpx_highbd_dc_top_predictor_8x8_c - -void vpx_highbd_fdct16x16_c(const int16_t *input, tran_low_t *output, int stride); -void vpx_highbd_fdct16x16_sse2(const int16_t *input, tran_low_t *output, int stride); -#define vpx_highbd_fdct16x16 vpx_highbd_fdct16x16_sse2 - -void vpx_highbd_fdct16x16_1_c(const int16_t *input, tran_low_t *output, int stride); -#define vpx_highbd_fdct16x16_1 vpx_highbd_fdct16x16_1_c - -void vpx_highbd_fdct32x32_c(const int16_t *input, tran_low_t *output, int stride); -void vpx_highbd_fdct32x32_sse2(const int16_t *input, tran_low_t *output, int stride); -#define vpx_highbd_fdct32x32 vpx_highbd_fdct32x32_sse2 - -void vpx_highbd_fdct32x32_1_c(const int16_t *input, tran_low_t *output, int stride); -#define vpx_highbd_fdct32x32_1 vpx_highbd_fdct32x32_1_c - -void vpx_highbd_fdct32x32_rd_c(const int16_t *input, tran_low_t *output, int stride); -void vpx_highbd_fdct32x32_rd_sse2(const int16_t *input, tran_low_t *output, int stride); -#define vpx_highbd_fdct32x32_rd vpx_highbd_fdct32x32_rd_sse2 - -void vpx_highbd_fdct4x4_c(const int16_t *input, tran_low_t *output, int stride); -void vpx_highbd_fdct4x4_sse2(const int16_t *input, tran_low_t *output, int stride); -#define vpx_highbd_fdct4x4 vpx_highbd_fdct4x4_sse2 - -void vpx_highbd_fdct8x8_c(const int16_t *input, tran_low_t *output, int stride); -void vpx_highbd_fdct8x8_sse2(const int16_t *input, tran_low_t *output, int stride); -#define vpx_highbd_fdct8x8 vpx_highbd_fdct8x8_sse2 - -void vpx_highbd_fdct8x8_1_c(const int16_t *input, tran_low_t *output, int stride); -#define vpx_highbd_fdct8x8_1 vpx_highbd_fdct8x8_1_c - -void vpx_highbd_h_predictor_16x16_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_h_predictor_16x16 vpx_highbd_h_predictor_16x16_c - -void vpx_highbd_h_predictor_32x32_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_h_predictor_32x32 vpx_highbd_h_predictor_32x32_c - -void vpx_highbd_h_predictor_4x4_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_h_predictor_4x4 vpx_highbd_h_predictor_4x4_c - -void vpx_highbd_h_predictor_8x8_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_h_predictor_8x8 vpx_highbd_h_predictor_8x8_c - -void vpx_highbd_idct16x16_10_add_c(const tran_low_t *input, uint8_t *dest, int stride, int bd); -void vpx_highbd_idct16x16_10_add_sse2(const tran_low_t *input, uint8_t *dest, int stride, int bd); -#define vpx_highbd_idct16x16_10_add vpx_highbd_idct16x16_10_add_sse2 - -void vpx_highbd_idct16x16_1_add_c(const tran_low_t *input, uint8_t *dest, int stride, int bd); -#define vpx_highbd_idct16x16_1_add vpx_highbd_idct16x16_1_add_c - -void vpx_highbd_idct16x16_256_add_c(const tran_low_t *input, uint8_t *dest, int stride, int bd); -void vpx_highbd_idct16x16_256_add_sse2(const tran_low_t *input, uint8_t *dest, int stride, int bd); -#define vpx_highbd_idct16x16_256_add vpx_highbd_idct16x16_256_add_sse2 - -void vpx_highbd_idct32x32_1024_add_c(const tran_low_t *input, uint8_t *dest, int stride, int bd); -#define vpx_highbd_idct32x32_1024_add vpx_highbd_idct32x32_1024_add_c - -void vpx_highbd_idct32x32_1_add_c(const tran_low_t *input, uint8_t *dest, int stride, int bd); -void vpx_highbd_idct32x32_1_add_sse2(const tran_low_t *input, uint8_t *dest, int stride, int bd); -#define vpx_highbd_idct32x32_1_add vpx_highbd_idct32x32_1_add_sse2 - -void vpx_highbd_idct32x32_34_add_c(const tran_low_t *input, uint8_t *dest, int stride, int bd); -#define vpx_highbd_idct32x32_34_add vpx_highbd_idct32x32_34_add_c - -void vpx_highbd_idct4x4_16_add_c(const tran_low_t *input, uint8_t *dest, int stride, int bd); -void vpx_highbd_idct4x4_16_add_sse2(const tran_low_t *input, uint8_t *dest, int stride, int bd); -#define vpx_highbd_idct4x4_16_add vpx_highbd_idct4x4_16_add_sse2 - -void vpx_highbd_idct4x4_1_add_c(const tran_low_t *input, uint8_t *dest, int stride, int bd); -#define vpx_highbd_idct4x4_1_add vpx_highbd_idct4x4_1_add_c - -void vpx_highbd_idct8x8_12_add_c(const tran_low_t *input, uint8_t *dest, int stride, int bd); -void vpx_highbd_idct8x8_12_add_sse2(const tran_low_t *input, uint8_t *dest, int stride, int bd); -#define vpx_highbd_idct8x8_12_add vpx_highbd_idct8x8_12_add_sse2 - -void vpx_highbd_idct8x8_1_add_c(const tran_low_t *input, uint8_t *dest, int stride, int bd); -#define vpx_highbd_idct8x8_1_add vpx_highbd_idct8x8_1_add_c - -void vpx_highbd_idct8x8_64_add_c(const tran_low_t *input, uint8_t *dest, int stride, int bd); -void vpx_highbd_idct8x8_64_add_sse2(const tran_low_t *input, uint8_t *dest, int stride, int bd); -#define vpx_highbd_idct8x8_64_add vpx_highbd_idct8x8_64_add_sse2 - -void vpx_highbd_iwht4x4_16_add_c(const tran_low_t *input, uint8_t *dest, int stride, int bd); -#define vpx_highbd_iwht4x4_16_add vpx_highbd_iwht4x4_16_add_c - -void vpx_highbd_iwht4x4_1_add_c(const tran_low_t *input, uint8_t *dest, int stride, int bd); -#define vpx_highbd_iwht4x4_1_add vpx_highbd_iwht4x4_1_add_c - -void vpx_highbd_lpf_horizontal_16_c(uint16_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh, int bd); -void vpx_highbd_lpf_horizontal_16_sse2(uint16_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh, int bd); -#define vpx_highbd_lpf_horizontal_16 vpx_highbd_lpf_horizontal_16_sse2 - -void vpx_highbd_lpf_horizontal_16_dual_c(uint16_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh, int bd); -void vpx_highbd_lpf_horizontal_16_dual_sse2(uint16_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh, int bd); -#define vpx_highbd_lpf_horizontal_16_dual vpx_highbd_lpf_horizontal_16_dual_sse2 - -void vpx_highbd_lpf_horizontal_4_c(uint16_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh, int bd); -void vpx_highbd_lpf_horizontal_4_sse2(uint16_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh, int bd); -#define vpx_highbd_lpf_horizontal_4 vpx_highbd_lpf_horizontal_4_sse2 - -void vpx_highbd_lpf_horizontal_4_dual_c(uint16_t *s, int pitch, const uint8_t *blimit0, const uint8_t *limit0, const uint8_t *thresh0, const uint8_t *blimit1, const uint8_t *limit1, const uint8_t *thresh1, int bd); -void vpx_highbd_lpf_horizontal_4_dual_sse2(uint16_t *s, int pitch, const uint8_t *blimit0, const uint8_t *limit0, const uint8_t *thresh0, const uint8_t *blimit1, const uint8_t *limit1, const uint8_t *thresh1, int bd); -#define vpx_highbd_lpf_horizontal_4_dual vpx_highbd_lpf_horizontal_4_dual_sse2 - -void vpx_highbd_lpf_horizontal_8_c(uint16_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh, int bd); -void vpx_highbd_lpf_horizontal_8_sse2(uint16_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh, int bd); -#define vpx_highbd_lpf_horizontal_8 vpx_highbd_lpf_horizontal_8_sse2 - -void vpx_highbd_lpf_horizontal_8_dual_c(uint16_t *s, int pitch, const uint8_t *blimit0, const uint8_t *limit0, const uint8_t *thresh0, const uint8_t *blimit1, const uint8_t *limit1, const uint8_t *thresh1, int bd); -void vpx_highbd_lpf_horizontal_8_dual_sse2(uint16_t *s, int pitch, const uint8_t *blimit0, const uint8_t *limit0, const uint8_t *thresh0, const uint8_t *blimit1, const uint8_t *limit1, const uint8_t *thresh1, int bd); -#define vpx_highbd_lpf_horizontal_8_dual vpx_highbd_lpf_horizontal_8_dual_sse2 - -void vpx_highbd_lpf_vertical_16_c(uint16_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh, int bd); -void vpx_highbd_lpf_vertical_16_sse2(uint16_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh, int bd); -#define vpx_highbd_lpf_vertical_16 vpx_highbd_lpf_vertical_16_sse2 - -void vpx_highbd_lpf_vertical_16_dual_c(uint16_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh, int bd); -void vpx_highbd_lpf_vertical_16_dual_sse2(uint16_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh, int bd); -#define vpx_highbd_lpf_vertical_16_dual vpx_highbd_lpf_vertical_16_dual_sse2 - -void vpx_highbd_lpf_vertical_4_c(uint16_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh, int bd); -void vpx_highbd_lpf_vertical_4_sse2(uint16_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh, int bd); -#define vpx_highbd_lpf_vertical_4 vpx_highbd_lpf_vertical_4_sse2 - -void vpx_highbd_lpf_vertical_4_dual_c(uint16_t *s, int pitch, const uint8_t *blimit0, const uint8_t *limit0, const uint8_t *thresh0, const uint8_t *blimit1, const uint8_t *limit1, const uint8_t *thresh1, int bd); -void vpx_highbd_lpf_vertical_4_dual_sse2(uint16_t *s, int pitch, const uint8_t *blimit0, const uint8_t *limit0, const uint8_t *thresh0, const uint8_t *blimit1, const uint8_t *limit1, const uint8_t *thresh1, int bd); -#define vpx_highbd_lpf_vertical_4_dual vpx_highbd_lpf_vertical_4_dual_sse2 - -void vpx_highbd_lpf_vertical_8_c(uint16_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh, int bd); -void vpx_highbd_lpf_vertical_8_sse2(uint16_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh, int bd); -#define vpx_highbd_lpf_vertical_8 vpx_highbd_lpf_vertical_8_sse2 - -void vpx_highbd_lpf_vertical_8_dual_c(uint16_t *s, int pitch, const uint8_t *blimit0, const uint8_t *limit0, const uint8_t *thresh0, const uint8_t *blimit1, const uint8_t *limit1, const uint8_t *thresh1, int bd); -void vpx_highbd_lpf_vertical_8_dual_sse2(uint16_t *s, int pitch, const uint8_t *blimit0, const uint8_t *limit0, const uint8_t *thresh0, const uint8_t *blimit1, const uint8_t *limit1, const uint8_t *thresh1, int bd); -#define vpx_highbd_lpf_vertical_8_dual vpx_highbd_lpf_vertical_8_dual_sse2 - -void vpx_highbd_minmax_8x8_c(const uint8_t *s, int p, const uint8_t *d, int dp, int *min, int *max); -#define vpx_highbd_minmax_8x8 vpx_highbd_minmax_8x8_c - -void vpx_highbd_quantize_b_c(const tran_low_t *coeff_ptr, intptr_t n_coeffs, int skip_block, const int16_t *zbin_ptr, const int16_t *round_ptr, const int16_t *quant_ptr, const int16_t *quant_shift_ptr, tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr, const int16_t *dequant_ptr, uint16_t *eob_ptr, const int16_t *scan, const int16_t *iscan); -void vpx_highbd_quantize_b_sse2(const tran_low_t *coeff_ptr, intptr_t n_coeffs, int skip_block, const int16_t *zbin_ptr, const int16_t *round_ptr, const int16_t *quant_ptr, const int16_t *quant_shift_ptr, tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr, const int16_t *dequant_ptr, uint16_t *eob_ptr, const int16_t *scan, const int16_t *iscan); -#define vpx_highbd_quantize_b vpx_highbd_quantize_b_sse2 - -void vpx_highbd_quantize_b_32x32_c(const tran_low_t *coeff_ptr, intptr_t n_coeffs, int skip_block, const int16_t *zbin_ptr, const int16_t *round_ptr, const int16_t *quant_ptr, const int16_t *quant_shift_ptr, tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr, const int16_t *dequant_ptr, uint16_t *eob_ptr, const int16_t *scan, const int16_t *iscan); -void vpx_highbd_quantize_b_32x32_sse2(const tran_low_t *coeff_ptr, intptr_t n_coeffs, int skip_block, const int16_t *zbin_ptr, const int16_t *round_ptr, const int16_t *quant_ptr, const int16_t *quant_shift_ptr, tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr, const int16_t *dequant_ptr, uint16_t *eob_ptr, const int16_t *scan, const int16_t *iscan); -#define vpx_highbd_quantize_b_32x32 vpx_highbd_quantize_b_32x32_sse2 - -unsigned int vpx_highbd_sad16x16_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -unsigned int vpx_highbd_sad16x16_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -#define vpx_highbd_sad16x16 vpx_highbd_sad16x16_sse2 - -unsigned int vpx_highbd_sad16x16_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -unsigned int vpx_highbd_sad16x16_avg_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -#define vpx_highbd_sad16x16_avg vpx_highbd_sad16x16_avg_sse2 - -void vpx_highbd_sad16x16x3_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -#define vpx_highbd_sad16x16x3 vpx_highbd_sad16x16x3_c - -void vpx_highbd_sad16x16x4d_c(const uint8_t *src_ptr, int src_stride, const uint8_t* const ref_ptr[], int ref_stride, uint32_t *sad_array); -void vpx_highbd_sad16x16x4d_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t* const ref_ptr[], int ref_stride, uint32_t *sad_array); -#define vpx_highbd_sad16x16x4d vpx_highbd_sad16x16x4d_sse2 - -void vpx_highbd_sad16x16x8_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -#define vpx_highbd_sad16x16x8 vpx_highbd_sad16x16x8_c - -unsigned int vpx_highbd_sad16x32_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -unsigned int vpx_highbd_sad16x32_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -#define vpx_highbd_sad16x32 vpx_highbd_sad16x32_sse2 - -unsigned int vpx_highbd_sad16x32_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -unsigned int vpx_highbd_sad16x32_avg_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -#define vpx_highbd_sad16x32_avg vpx_highbd_sad16x32_avg_sse2 - -void vpx_highbd_sad16x32x4d_c(const uint8_t *src_ptr, int src_stride, const uint8_t* const ref_ptr[], int ref_stride, uint32_t *sad_array); -void vpx_highbd_sad16x32x4d_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t* const ref_ptr[], int ref_stride, uint32_t *sad_array); -#define vpx_highbd_sad16x32x4d vpx_highbd_sad16x32x4d_sse2 - -unsigned int vpx_highbd_sad16x8_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -unsigned int vpx_highbd_sad16x8_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -#define vpx_highbd_sad16x8 vpx_highbd_sad16x8_sse2 - -unsigned int vpx_highbd_sad16x8_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -unsigned int vpx_highbd_sad16x8_avg_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -#define vpx_highbd_sad16x8_avg vpx_highbd_sad16x8_avg_sse2 - -void vpx_highbd_sad16x8x3_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -#define vpx_highbd_sad16x8x3 vpx_highbd_sad16x8x3_c - -void vpx_highbd_sad16x8x4d_c(const uint8_t *src_ptr, int src_stride, const uint8_t* const ref_ptr[], int ref_stride, uint32_t *sad_array); -void vpx_highbd_sad16x8x4d_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t* const ref_ptr[], int ref_stride, uint32_t *sad_array); -#define vpx_highbd_sad16x8x4d vpx_highbd_sad16x8x4d_sse2 - -void vpx_highbd_sad16x8x8_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -#define vpx_highbd_sad16x8x8 vpx_highbd_sad16x8x8_c - -unsigned int vpx_highbd_sad32x16_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -unsigned int vpx_highbd_sad32x16_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -#define vpx_highbd_sad32x16 vpx_highbd_sad32x16_sse2 - -unsigned int vpx_highbd_sad32x16_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -unsigned int vpx_highbd_sad32x16_avg_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -#define vpx_highbd_sad32x16_avg vpx_highbd_sad32x16_avg_sse2 - -void vpx_highbd_sad32x16x4d_c(const uint8_t *src_ptr, int src_stride, const uint8_t* const ref_ptr[], int ref_stride, uint32_t *sad_array); -void vpx_highbd_sad32x16x4d_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t* const ref_ptr[], int ref_stride, uint32_t *sad_array); -#define vpx_highbd_sad32x16x4d vpx_highbd_sad32x16x4d_sse2 - -unsigned int vpx_highbd_sad32x32_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -unsigned int vpx_highbd_sad32x32_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -#define vpx_highbd_sad32x32 vpx_highbd_sad32x32_sse2 - -unsigned int vpx_highbd_sad32x32_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -unsigned int vpx_highbd_sad32x32_avg_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -#define vpx_highbd_sad32x32_avg vpx_highbd_sad32x32_avg_sse2 - -void vpx_highbd_sad32x32x3_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -#define vpx_highbd_sad32x32x3 vpx_highbd_sad32x32x3_c - -void vpx_highbd_sad32x32x4d_c(const uint8_t *src_ptr, int src_stride, const uint8_t* const ref_ptr[], int ref_stride, uint32_t *sad_array); -void vpx_highbd_sad32x32x4d_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t* const ref_ptr[], int ref_stride, uint32_t *sad_array); -#define vpx_highbd_sad32x32x4d vpx_highbd_sad32x32x4d_sse2 - -void vpx_highbd_sad32x32x8_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -#define vpx_highbd_sad32x32x8 vpx_highbd_sad32x32x8_c - -unsigned int vpx_highbd_sad32x64_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -unsigned int vpx_highbd_sad32x64_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -#define vpx_highbd_sad32x64 vpx_highbd_sad32x64_sse2 - -unsigned int vpx_highbd_sad32x64_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -unsigned int vpx_highbd_sad32x64_avg_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -#define vpx_highbd_sad32x64_avg vpx_highbd_sad32x64_avg_sse2 - -void vpx_highbd_sad32x64x4d_c(const uint8_t *src_ptr, int src_stride, const uint8_t* const ref_ptr[], int ref_stride, uint32_t *sad_array); -void vpx_highbd_sad32x64x4d_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t* const ref_ptr[], int ref_stride, uint32_t *sad_array); -#define vpx_highbd_sad32x64x4d vpx_highbd_sad32x64x4d_sse2 - -unsigned int vpx_highbd_sad4x4_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -#define vpx_highbd_sad4x4 vpx_highbd_sad4x4_c - -unsigned int vpx_highbd_sad4x4_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -#define vpx_highbd_sad4x4_avg vpx_highbd_sad4x4_avg_c - -void vpx_highbd_sad4x4x3_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -#define vpx_highbd_sad4x4x3 vpx_highbd_sad4x4x3_c - -void vpx_highbd_sad4x4x4d_c(const uint8_t *src_ptr, int src_stride, const uint8_t* const ref_ptr[], int ref_stride, uint32_t *sad_array); -void vpx_highbd_sad4x4x4d_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t* const ref_ptr[], int ref_stride, uint32_t *sad_array); -#define vpx_highbd_sad4x4x4d vpx_highbd_sad4x4x4d_sse2 - -void vpx_highbd_sad4x4x8_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -#define vpx_highbd_sad4x4x8 vpx_highbd_sad4x4x8_c - -unsigned int vpx_highbd_sad4x8_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -#define vpx_highbd_sad4x8 vpx_highbd_sad4x8_c - -unsigned int vpx_highbd_sad4x8_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -#define vpx_highbd_sad4x8_avg vpx_highbd_sad4x8_avg_c - -void vpx_highbd_sad4x8x4d_c(const uint8_t *src_ptr, int src_stride, const uint8_t* const ref_ptr[], int ref_stride, uint32_t *sad_array); -void vpx_highbd_sad4x8x4d_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t* const ref_ptr[], int ref_stride, uint32_t *sad_array); -#define vpx_highbd_sad4x8x4d vpx_highbd_sad4x8x4d_sse2 - -void vpx_highbd_sad4x8x8_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -#define vpx_highbd_sad4x8x8 vpx_highbd_sad4x8x8_c - -unsigned int vpx_highbd_sad64x32_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -unsigned int vpx_highbd_sad64x32_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -#define vpx_highbd_sad64x32 vpx_highbd_sad64x32_sse2 - -unsigned int vpx_highbd_sad64x32_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -unsigned int vpx_highbd_sad64x32_avg_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -#define vpx_highbd_sad64x32_avg vpx_highbd_sad64x32_avg_sse2 - -void vpx_highbd_sad64x32x4d_c(const uint8_t *src_ptr, int src_stride, const uint8_t* const ref_ptr[], int ref_stride, uint32_t *sad_array); -void vpx_highbd_sad64x32x4d_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t* const ref_ptr[], int ref_stride, uint32_t *sad_array); -#define vpx_highbd_sad64x32x4d vpx_highbd_sad64x32x4d_sse2 - -unsigned int vpx_highbd_sad64x64_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -unsigned int vpx_highbd_sad64x64_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -#define vpx_highbd_sad64x64 vpx_highbd_sad64x64_sse2 - -unsigned int vpx_highbd_sad64x64_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -unsigned int vpx_highbd_sad64x64_avg_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -#define vpx_highbd_sad64x64_avg vpx_highbd_sad64x64_avg_sse2 - -void vpx_highbd_sad64x64x3_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -#define vpx_highbd_sad64x64x3 vpx_highbd_sad64x64x3_c - -void vpx_highbd_sad64x64x4d_c(const uint8_t *src_ptr, int src_stride, const uint8_t* const ref_ptr[], int ref_stride, uint32_t *sad_array); -void vpx_highbd_sad64x64x4d_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t* const ref_ptr[], int ref_stride, uint32_t *sad_array); -#define vpx_highbd_sad64x64x4d vpx_highbd_sad64x64x4d_sse2 - -void vpx_highbd_sad64x64x8_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -#define vpx_highbd_sad64x64x8 vpx_highbd_sad64x64x8_c - -unsigned int vpx_highbd_sad8x16_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -unsigned int vpx_highbd_sad8x16_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -#define vpx_highbd_sad8x16 vpx_highbd_sad8x16_sse2 - -unsigned int vpx_highbd_sad8x16_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -unsigned int vpx_highbd_sad8x16_avg_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -#define vpx_highbd_sad8x16_avg vpx_highbd_sad8x16_avg_sse2 - -void vpx_highbd_sad8x16x3_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -#define vpx_highbd_sad8x16x3 vpx_highbd_sad8x16x3_c - -void vpx_highbd_sad8x16x4d_c(const uint8_t *src_ptr, int src_stride, const uint8_t* const ref_ptr[], int ref_stride, uint32_t *sad_array); -void vpx_highbd_sad8x16x4d_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t* const ref_ptr[], int ref_stride, uint32_t *sad_array); -#define vpx_highbd_sad8x16x4d vpx_highbd_sad8x16x4d_sse2 - -void vpx_highbd_sad8x16x8_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -#define vpx_highbd_sad8x16x8 vpx_highbd_sad8x16x8_c - -unsigned int vpx_highbd_sad8x4_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -unsigned int vpx_highbd_sad8x4_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -#define vpx_highbd_sad8x4 vpx_highbd_sad8x4_sse2 - -unsigned int vpx_highbd_sad8x4_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -unsigned int vpx_highbd_sad8x4_avg_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -#define vpx_highbd_sad8x4_avg vpx_highbd_sad8x4_avg_sse2 - -void vpx_highbd_sad8x4x4d_c(const uint8_t *src_ptr, int src_stride, const uint8_t* const ref_ptr[], int ref_stride, uint32_t *sad_array); -void vpx_highbd_sad8x4x4d_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t* const ref_ptr[], int ref_stride, uint32_t *sad_array); -#define vpx_highbd_sad8x4x4d vpx_highbd_sad8x4x4d_sse2 - -void vpx_highbd_sad8x4x8_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -#define vpx_highbd_sad8x4x8 vpx_highbd_sad8x4x8_c - -unsigned int vpx_highbd_sad8x8_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -unsigned int vpx_highbd_sad8x8_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -#define vpx_highbd_sad8x8 vpx_highbd_sad8x8_sse2 - -unsigned int vpx_highbd_sad8x8_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -unsigned int vpx_highbd_sad8x8_avg_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -#define vpx_highbd_sad8x8_avg vpx_highbd_sad8x8_avg_sse2 - -void vpx_highbd_sad8x8x3_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -#define vpx_highbd_sad8x8x3 vpx_highbd_sad8x8x3_c - -void vpx_highbd_sad8x8x4d_c(const uint8_t *src_ptr, int src_stride, const uint8_t* const ref_ptr[], int ref_stride, uint32_t *sad_array); -void vpx_highbd_sad8x8x4d_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t* const ref_ptr[], int ref_stride, uint32_t *sad_array); -#define vpx_highbd_sad8x8x4d vpx_highbd_sad8x8x4d_sse2 - -void vpx_highbd_sad8x8x8_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -#define vpx_highbd_sad8x8x8 vpx_highbd_sad8x8x8_c - -void vpx_highbd_subtract_block_c(int rows, int cols, int16_t *diff_ptr, ptrdiff_t diff_stride, const uint8_t *src_ptr, ptrdiff_t src_stride, const uint8_t *pred_ptr, ptrdiff_t pred_stride, int bd); -#define vpx_highbd_subtract_block vpx_highbd_subtract_block_c - -void vpx_highbd_tm_predictor_16x16_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -void vpx_highbd_tm_predictor_16x16_sse2(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_tm_predictor_16x16 vpx_highbd_tm_predictor_16x16_sse2 - -void vpx_highbd_tm_predictor_32x32_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -void vpx_highbd_tm_predictor_32x32_sse2(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_tm_predictor_32x32 vpx_highbd_tm_predictor_32x32_sse2 - -void vpx_highbd_tm_predictor_4x4_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -void vpx_highbd_tm_predictor_4x4_sse2(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_tm_predictor_4x4 vpx_highbd_tm_predictor_4x4_sse2 - -void vpx_highbd_tm_predictor_8x8_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -void vpx_highbd_tm_predictor_8x8_sse2(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_tm_predictor_8x8 vpx_highbd_tm_predictor_8x8_sse2 - -void vpx_highbd_v_predictor_16x16_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -void vpx_highbd_v_predictor_16x16_sse2(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_v_predictor_16x16 vpx_highbd_v_predictor_16x16_sse2 - -void vpx_highbd_v_predictor_32x32_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -void vpx_highbd_v_predictor_32x32_sse2(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_v_predictor_32x32 vpx_highbd_v_predictor_32x32_sse2 - -void vpx_highbd_v_predictor_4x4_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -void vpx_highbd_v_predictor_4x4_sse2(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_v_predictor_4x4 vpx_highbd_v_predictor_4x4_sse2 - -void vpx_highbd_v_predictor_8x8_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -void vpx_highbd_v_predictor_8x8_sse2(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_v_predictor_8x8 vpx_highbd_v_predictor_8x8_sse2 - -void vpx_idct16x16_10_add_c(const tran_low_t *input, uint8_t *dest, int stride); -void vpx_idct16x16_10_add_sse2(const tran_low_t *input, uint8_t *dest, int stride); -#define vpx_idct16x16_10_add vpx_idct16x16_10_add_sse2 - -void vpx_idct16x16_1_add_c(const tran_low_t *input, uint8_t *dest, int stride); -void vpx_idct16x16_1_add_sse2(const tran_low_t *input, uint8_t *dest, int stride); -#define vpx_idct16x16_1_add vpx_idct16x16_1_add_sse2 - -void vpx_idct16x16_256_add_c(const tran_low_t *input, uint8_t *dest, int stride); -void vpx_idct16x16_256_add_sse2(const tran_low_t *input, uint8_t *dest, int stride); -#define vpx_idct16x16_256_add vpx_idct16x16_256_add_sse2 - -void vpx_idct32x32_1024_add_c(const tran_low_t *input, uint8_t *dest, int stride); -void vpx_idct32x32_1024_add_sse2(const tran_low_t *input, uint8_t *dest, int stride); -void vpx_idct32x32_1024_add_ssse3(const tran_low_t *input, uint8_t *dest, int stride); -RTCD_EXTERN void (*vpx_idct32x32_1024_add)(const tran_low_t *input, uint8_t *dest, int stride); - -void vpx_idct32x32_135_add_c(const tran_low_t *input, uint8_t *dest, int stride); -void vpx_idct32x32_1024_add_sse2(const tran_low_t *input, uint8_t *dest, int stride); -void vpx_idct32x32_135_add_ssse3(const tran_low_t *input, uint8_t *dest, int stride); -RTCD_EXTERN void (*vpx_idct32x32_135_add)(const tran_low_t *input, uint8_t *dest, int stride); - -void vpx_idct32x32_1_add_c(const tran_low_t *input, uint8_t *dest, int stride); -void vpx_idct32x32_1_add_sse2(const tran_low_t *input, uint8_t *dest, int stride); -#define vpx_idct32x32_1_add vpx_idct32x32_1_add_sse2 - -void vpx_idct32x32_34_add_c(const tran_low_t *input, uint8_t *dest, int stride); -void vpx_idct32x32_34_add_sse2(const tran_low_t *input, uint8_t *dest, int stride); -void vpx_idct32x32_34_add_ssse3(const tran_low_t *input, uint8_t *dest, int stride); -RTCD_EXTERN void (*vpx_idct32x32_34_add)(const tran_low_t *input, uint8_t *dest, int stride); - -void vpx_idct4x4_16_add_c(const tran_low_t *input, uint8_t *dest, int stride); -void vpx_idct4x4_16_add_sse2(const tran_low_t *input, uint8_t *dest, int stride); -#define vpx_idct4x4_16_add vpx_idct4x4_16_add_sse2 - -void vpx_idct4x4_1_add_c(const tran_low_t *input, uint8_t *dest, int stride); -void vpx_idct4x4_1_add_sse2(const tran_low_t *input, uint8_t *dest, int stride); -#define vpx_idct4x4_1_add vpx_idct4x4_1_add_sse2 - -void vpx_idct8x8_12_add_c(const tran_low_t *input, uint8_t *dest, int stride); -void vpx_idct8x8_12_add_sse2(const tran_low_t *input, uint8_t *dest, int stride); -void vpx_idct8x8_12_add_ssse3(const tran_low_t *input, uint8_t *dest, int stride); -RTCD_EXTERN void (*vpx_idct8x8_12_add)(const tran_low_t *input, uint8_t *dest, int stride); - -void vpx_idct8x8_1_add_c(const tran_low_t *input, uint8_t *dest, int stride); -void vpx_idct8x8_1_add_sse2(const tran_low_t *input, uint8_t *dest, int stride); -#define vpx_idct8x8_1_add vpx_idct8x8_1_add_sse2 - -void vpx_idct8x8_64_add_c(const tran_low_t *input, uint8_t *dest, int stride); -void vpx_idct8x8_64_add_sse2(const tran_low_t *input, uint8_t *dest, int stride); -void vpx_idct8x8_64_add_ssse3(const tran_low_t *input, uint8_t *dest, int stride); -RTCD_EXTERN void (*vpx_idct8x8_64_add)(const tran_low_t *input, uint8_t *dest, int stride); - -int16_t vpx_int_pro_col_c(const uint8_t *ref, const int width); -int16_t vpx_int_pro_col_sse2(const uint8_t *ref, const int width); -#define vpx_int_pro_col vpx_int_pro_col_sse2 - -void vpx_int_pro_row_c(int16_t *hbuf, const uint8_t *ref, const int ref_stride, const int height); -void vpx_int_pro_row_sse2(int16_t *hbuf, const uint8_t *ref, const int ref_stride, const int height); -#define vpx_int_pro_row vpx_int_pro_row_sse2 - -void vpx_iwht4x4_16_add_c(const tran_low_t *input, uint8_t *dest, int stride); -void vpx_iwht4x4_16_add_sse2(const tran_low_t *input, uint8_t *dest, int stride); -#define vpx_iwht4x4_16_add vpx_iwht4x4_16_add_sse2 - -void vpx_iwht4x4_1_add_c(const tran_low_t *input, uint8_t *dest, int stride); -#define vpx_iwht4x4_1_add vpx_iwht4x4_1_add_c - -void vpx_lpf_horizontal_16_c(uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh); -void vpx_lpf_horizontal_16_sse2(uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh); -void vpx_lpf_horizontal_16_avx2(uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh); -RTCD_EXTERN void (*vpx_lpf_horizontal_16)(uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh); - -void vpx_lpf_horizontal_16_dual_c(uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh); -void vpx_lpf_horizontal_16_dual_sse2(uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh); -void vpx_lpf_horizontal_16_dual_avx2(uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh); -RTCD_EXTERN void (*vpx_lpf_horizontal_16_dual)(uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh); - -void vpx_lpf_horizontal_4_c(uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh); -void vpx_lpf_horizontal_4_sse2(uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh); -#define vpx_lpf_horizontal_4 vpx_lpf_horizontal_4_sse2 - -void vpx_lpf_horizontal_4_dual_c(uint8_t *s, int pitch, const uint8_t *blimit0, const uint8_t *limit0, const uint8_t *thresh0, const uint8_t *blimit1, const uint8_t *limit1, const uint8_t *thresh1); -void vpx_lpf_horizontal_4_dual_sse2(uint8_t *s, int pitch, const uint8_t *blimit0, const uint8_t *limit0, const uint8_t *thresh0, const uint8_t *blimit1, const uint8_t *limit1, const uint8_t *thresh1); -#define vpx_lpf_horizontal_4_dual vpx_lpf_horizontal_4_dual_sse2 - -void vpx_lpf_horizontal_8_c(uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh); -void vpx_lpf_horizontal_8_sse2(uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh); -#define vpx_lpf_horizontal_8 vpx_lpf_horizontal_8_sse2 - -void vpx_lpf_horizontal_8_dual_c(uint8_t *s, int pitch, const uint8_t *blimit0, const uint8_t *limit0, const uint8_t *thresh0, const uint8_t *blimit1, const uint8_t *limit1, const uint8_t *thresh1); -void vpx_lpf_horizontal_8_dual_sse2(uint8_t *s, int pitch, const uint8_t *blimit0, const uint8_t *limit0, const uint8_t *thresh0, const uint8_t *blimit1, const uint8_t *limit1, const uint8_t *thresh1); -#define vpx_lpf_horizontal_8_dual vpx_lpf_horizontal_8_dual_sse2 - -void vpx_lpf_vertical_16_c(uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh); -void vpx_lpf_vertical_16_sse2(uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh); -#define vpx_lpf_vertical_16 vpx_lpf_vertical_16_sse2 - -void vpx_lpf_vertical_16_dual_c(uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh); -void vpx_lpf_vertical_16_dual_sse2(uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh); -#define vpx_lpf_vertical_16_dual vpx_lpf_vertical_16_dual_sse2 - -void vpx_lpf_vertical_4_c(uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh); -void vpx_lpf_vertical_4_sse2(uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh); -#define vpx_lpf_vertical_4 vpx_lpf_vertical_4_sse2 - -void vpx_lpf_vertical_4_dual_c(uint8_t *s, int pitch, const uint8_t *blimit0, const uint8_t *limit0, const uint8_t *thresh0, const uint8_t *blimit1, const uint8_t *limit1, const uint8_t *thresh1); -void vpx_lpf_vertical_4_dual_sse2(uint8_t *s, int pitch, const uint8_t *blimit0, const uint8_t *limit0, const uint8_t *thresh0, const uint8_t *blimit1, const uint8_t *limit1, const uint8_t *thresh1); -#define vpx_lpf_vertical_4_dual vpx_lpf_vertical_4_dual_sse2 - -void vpx_lpf_vertical_8_c(uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh); -void vpx_lpf_vertical_8_sse2(uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh); -#define vpx_lpf_vertical_8 vpx_lpf_vertical_8_sse2 - -void vpx_lpf_vertical_8_dual_c(uint8_t *s, int pitch, const uint8_t *blimit0, const uint8_t *limit0, const uint8_t *thresh0, const uint8_t *blimit1, const uint8_t *limit1, const uint8_t *thresh1); -void vpx_lpf_vertical_8_dual_sse2(uint8_t *s, int pitch, const uint8_t *blimit0, const uint8_t *limit0, const uint8_t *thresh0, const uint8_t *blimit1, const uint8_t *limit1, const uint8_t *thresh1); -#define vpx_lpf_vertical_8_dual vpx_lpf_vertical_8_dual_sse2 - -void vpx_mbpost_proc_across_ip_c(unsigned char *dst, int pitch, int rows, int cols,int flimit); -void vpx_mbpost_proc_across_ip_sse2(unsigned char *dst, int pitch, int rows, int cols,int flimit); -#define vpx_mbpost_proc_across_ip vpx_mbpost_proc_across_ip_sse2 - -void vpx_mbpost_proc_down_c(unsigned char *dst, int pitch, int rows, int cols,int flimit); -void vpx_mbpost_proc_down_sse2(unsigned char *dst, int pitch, int rows, int cols,int flimit); -#define vpx_mbpost_proc_down vpx_mbpost_proc_down_sse2 - -void vpx_minmax_8x8_c(const uint8_t *s, int p, const uint8_t *d, int dp, int *min, int *max); -void vpx_minmax_8x8_sse2(const uint8_t *s, int p, const uint8_t *d, int dp, int *min, int *max); -#define vpx_minmax_8x8 vpx_minmax_8x8_sse2 - -unsigned int vpx_mse16x16_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int recon_stride, unsigned int *sse); -unsigned int vpx_mse16x16_sse2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int recon_stride, unsigned int *sse); -unsigned int vpx_mse16x16_avx2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int recon_stride, unsigned int *sse); -RTCD_EXTERN unsigned int (*vpx_mse16x16)(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int recon_stride, unsigned int *sse); - -unsigned int vpx_mse16x8_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int recon_stride, unsigned int *sse); -unsigned int vpx_mse16x8_sse2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int recon_stride, unsigned int *sse); -#define vpx_mse16x8 vpx_mse16x8_sse2 - -unsigned int vpx_mse8x16_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int recon_stride, unsigned int *sse); -unsigned int vpx_mse8x16_sse2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int recon_stride, unsigned int *sse); -#define vpx_mse8x16 vpx_mse8x16_sse2 - -unsigned int vpx_mse8x8_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int recon_stride, unsigned int *sse); -unsigned int vpx_mse8x8_sse2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int recon_stride, unsigned int *sse); -#define vpx_mse8x8 vpx_mse8x8_sse2 - -void vpx_plane_add_noise_c(uint8_t *start, const int8_t *noise, int blackclamp, int whiteclamp, int width, int height, int pitch); -void vpx_plane_add_noise_sse2(uint8_t *start, const int8_t *noise, int blackclamp, int whiteclamp, int width, int height, int pitch); -#define vpx_plane_add_noise vpx_plane_add_noise_sse2 - -void vpx_post_proc_down_and_across_mb_row_c(unsigned char *src, unsigned char *dst, int src_pitch, int dst_pitch, int cols, unsigned char *flimits, int size); -void vpx_post_proc_down_and_across_mb_row_sse2(unsigned char *src, unsigned char *dst, int src_pitch, int dst_pitch, int cols, unsigned char *flimits, int size); -#define vpx_post_proc_down_and_across_mb_row vpx_post_proc_down_and_across_mb_row_sse2 - -void vpx_quantize_b_c(const tran_low_t *coeff_ptr, intptr_t n_coeffs, int skip_block, const int16_t *zbin_ptr, const int16_t *round_ptr, const int16_t *quant_ptr, const int16_t *quant_shift_ptr, tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr, const int16_t *dequant_ptr, uint16_t *eob_ptr, const int16_t *scan, const int16_t *iscan); -void vpx_quantize_b_sse2(const tran_low_t *coeff_ptr, intptr_t n_coeffs, int skip_block, const int16_t *zbin_ptr, const int16_t *round_ptr, const int16_t *quant_ptr, const int16_t *quant_shift_ptr, tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr, const int16_t *dequant_ptr, uint16_t *eob_ptr, const int16_t *scan, const int16_t *iscan); -void vpx_quantize_b_ssse3(const tran_low_t *coeff_ptr, intptr_t n_coeffs, int skip_block, const int16_t *zbin_ptr, const int16_t *round_ptr, const int16_t *quant_ptr, const int16_t *quant_shift_ptr, tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr, const int16_t *dequant_ptr, uint16_t *eob_ptr, const int16_t *scan, const int16_t *iscan); -void vpx_quantize_b_avx(const tran_low_t *coeff_ptr, intptr_t n_coeffs, int skip_block, const int16_t *zbin_ptr, const int16_t *round_ptr, const int16_t *quant_ptr, const int16_t *quant_shift_ptr, tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr, const int16_t *dequant_ptr, uint16_t *eob_ptr, const int16_t *scan, const int16_t *iscan); -RTCD_EXTERN void (*vpx_quantize_b)(const tran_low_t *coeff_ptr, intptr_t n_coeffs, int skip_block, const int16_t *zbin_ptr, const int16_t *round_ptr, const int16_t *quant_ptr, const int16_t *quant_shift_ptr, tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr, const int16_t *dequant_ptr, uint16_t *eob_ptr, const int16_t *scan, const int16_t *iscan); - -void vpx_quantize_b_32x32_c(const tran_low_t *coeff_ptr, intptr_t n_coeffs, int skip_block, const int16_t *zbin_ptr, const int16_t *round_ptr, const int16_t *quant_ptr, const int16_t *quant_shift_ptr, tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr, const int16_t *dequant_ptr, uint16_t *eob_ptr, const int16_t *scan, const int16_t *iscan); -void vpx_quantize_b_32x32_ssse3(const tran_low_t *coeff_ptr, intptr_t n_coeffs, int skip_block, const int16_t *zbin_ptr, const int16_t *round_ptr, const int16_t *quant_ptr, const int16_t *quant_shift_ptr, tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr, const int16_t *dequant_ptr, uint16_t *eob_ptr, const int16_t *scan, const int16_t *iscan); -void vpx_quantize_b_32x32_avx(const tran_low_t *coeff_ptr, intptr_t n_coeffs, int skip_block, const int16_t *zbin_ptr, const int16_t *round_ptr, const int16_t *quant_ptr, const int16_t *quant_shift_ptr, tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr, const int16_t *dequant_ptr, uint16_t *eob_ptr, const int16_t *scan, const int16_t *iscan); -RTCD_EXTERN void (*vpx_quantize_b_32x32)(const tran_low_t *coeff_ptr, intptr_t n_coeffs, int skip_block, const int16_t *zbin_ptr, const int16_t *round_ptr, const int16_t *quant_ptr, const int16_t *quant_shift_ptr, tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr, const int16_t *dequant_ptr, uint16_t *eob_ptr, const int16_t *scan, const int16_t *iscan); - -unsigned int vpx_sad16x16_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -unsigned int vpx_sad16x16_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -#define vpx_sad16x16 vpx_sad16x16_sse2 - -unsigned int vpx_sad16x16_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -unsigned int vpx_sad16x16_avg_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -#define vpx_sad16x16_avg vpx_sad16x16_avg_sse2 - -void vpx_sad16x16x3_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -void vpx_sad16x16x3_sse3(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -void vpx_sad16x16x3_ssse3(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -RTCD_EXTERN void (*vpx_sad16x16x3)(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); - -void vpx_sad16x16x4d_c(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); -void vpx_sad16x16x4d_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); -#define vpx_sad16x16x4d vpx_sad16x16x4d_sse2 - -void vpx_sad16x16x8_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -void vpx_sad16x16x8_sse4_1(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -RTCD_EXTERN void (*vpx_sad16x16x8)(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); - -unsigned int vpx_sad16x32_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -unsigned int vpx_sad16x32_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -#define vpx_sad16x32 vpx_sad16x32_sse2 - -unsigned int vpx_sad16x32_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -unsigned int vpx_sad16x32_avg_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -#define vpx_sad16x32_avg vpx_sad16x32_avg_sse2 - -void vpx_sad16x32x4d_c(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); -void vpx_sad16x32x4d_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); -#define vpx_sad16x32x4d vpx_sad16x32x4d_sse2 - -unsigned int vpx_sad16x8_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -unsigned int vpx_sad16x8_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -#define vpx_sad16x8 vpx_sad16x8_sse2 - -unsigned int vpx_sad16x8_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -unsigned int vpx_sad16x8_avg_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -#define vpx_sad16x8_avg vpx_sad16x8_avg_sse2 - -void vpx_sad16x8x3_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -void vpx_sad16x8x3_sse3(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -void vpx_sad16x8x3_ssse3(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -RTCD_EXTERN void (*vpx_sad16x8x3)(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); - -void vpx_sad16x8x4d_c(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); -void vpx_sad16x8x4d_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); -#define vpx_sad16x8x4d vpx_sad16x8x4d_sse2 - -void vpx_sad16x8x8_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -void vpx_sad16x8x8_sse4_1(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -RTCD_EXTERN void (*vpx_sad16x8x8)(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); - -unsigned int vpx_sad32x16_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -unsigned int vpx_sad32x16_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -unsigned int vpx_sad32x16_avx2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -RTCD_EXTERN unsigned int (*vpx_sad32x16)(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); - -unsigned int vpx_sad32x16_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -unsigned int vpx_sad32x16_avg_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -unsigned int vpx_sad32x16_avg_avx2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -RTCD_EXTERN unsigned int (*vpx_sad32x16_avg)(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); - -void vpx_sad32x16x4d_c(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); -void vpx_sad32x16x4d_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); -#define vpx_sad32x16x4d vpx_sad32x16x4d_sse2 - -unsigned int vpx_sad32x32_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -unsigned int vpx_sad32x32_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -unsigned int vpx_sad32x32_avx2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -RTCD_EXTERN unsigned int (*vpx_sad32x32)(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); - -unsigned int vpx_sad32x32_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -unsigned int vpx_sad32x32_avg_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -unsigned int vpx_sad32x32_avg_avx2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -RTCD_EXTERN unsigned int (*vpx_sad32x32_avg)(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); - -void vpx_sad32x32x3_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -#define vpx_sad32x32x3 vpx_sad32x32x3_c - -void vpx_sad32x32x4d_c(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); -void vpx_sad32x32x4d_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); -void vpx_sad32x32x4d_avx2(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); -RTCD_EXTERN void (*vpx_sad32x32x4d)(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); - -void vpx_sad32x32x8_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -#define vpx_sad32x32x8 vpx_sad32x32x8_c - -unsigned int vpx_sad32x64_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -unsigned int vpx_sad32x64_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -unsigned int vpx_sad32x64_avx2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -RTCD_EXTERN unsigned int (*vpx_sad32x64)(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); - -unsigned int vpx_sad32x64_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -unsigned int vpx_sad32x64_avg_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -unsigned int vpx_sad32x64_avg_avx2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -RTCD_EXTERN unsigned int (*vpx_sad32x64_avg)(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); - -void vpx_sad32x64x4d_c(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); -void vpx_sad32x64x4d_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); -#define vpx_sad32x64x4d vpx_sad32x64x4d_sse2 - -unsigned int vpx_sad4x4_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -unsigned int vpx_sad4x4_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -#define vpx_sad4x4 vpx_sad4x4_sse2 - -unsigned int vpx_sad4x4_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -unsigned int vpx_sad4x4_avg_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -#define vpx_sad4x4_avg vpx_sad4x4_avg_sse2 - -void vpx_sad4x4x3_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -void vpx_sad4x4x3_sse3(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -RTCD_EXTERN void (*vpx_sad4x4x3)(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); - -void vpx_sad4x4x4d_c(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); -void vpx_sad4x4x4d_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); -#define vpx_sad4x4x4d vpx_sad4x4x4d_sse2 - -void vpx_sad4x4x8_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -void vpx_sad4x4x8_sse4_1(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -RTCD_EXTERN void (*vpx_sad4x4x8)(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); - -unsigned int vpx_sad4x8_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -unsigned int vpx_sad4x8_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -#define vpx_sad4x8 vpx_sad4x8_sse2 - -unsigned int vpx_sad4x8_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -unsigned int vpx_sad4x8_avg_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -#define vpx_sad4x8_avg vpx_sad4x8_avg_sse2 - -void vpx_sad4x8x4d_c(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); -void vpx_sad4x8x4d_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); -#define vpx_sad4x8x4d vpx_sad4x8x4d_sse2 - -void vpx_sad4x8x8_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -#define vpx_sad4x8x8 vpx_sad4x8x8_c - -unsigned int vpx_sad64x32_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -unsigned int vpx_sad64x32_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -unsigned int vpx_sad64x32_avx2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -RTCD_EXTERN unsigned int (*vpx_sad64x32)(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); - -unsigned int vpx_sad64x32_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -unsigned int vpx_sad64x32_avg_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -unsigned int vpx_sad64x32_avg_avx2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -RTCD_EXTERN unsigned int (*vpx_sad64x32_avg)(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); - -void vpx_sad64x32x4d_c(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); -void vpx_sad64x32x4d_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); -#define vpx_sad64x32x4d vpx_sad64x32x4d_sse2 - -unsigned int vpx_sad64x64_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -unsigned int vpx_sad64x64_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -unsigned int vpx_sad64x64_avx2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -RTCD_EXTERN unsigned int (*vpx_sad64x64)(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); - -unsigned int vpx_sad64x64_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -unsigned int vpx_sad64x64_avg_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -unsigned int vpx_sad64x64_avg_avx2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -RTCD_EXTERN unsigned int (*vpx_sad64x64_avg)(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); - -void vpx_sad64x64x3_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -#define vpx_sad64x64x3 vpx_sad64x64x3_c - -void vpx_sad64x64x4d_c(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); -void vpx_sad64x64x4d_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); -void vpx_sad64x64x4d_avx2(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); -RTCD_EXTERN void (*vpx_sad64x64x4d)(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); - -void vpx_sad64x64x8_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -#define vpx_sad64x64x8 vpx_sad64x64x8_c - -unsigned int vpx_sad8x16_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -unsigned int vpx_sad8x16_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -#define vpx_sad8x16 vpx_sad8x16_sse2 - -unsigned int vpx_sad8x16_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -unsigned int vpx_sad8x16_avg_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -#define vpx_sad8x16_avg vpx_sad8x16_avg_sse2 - -void vpx_sad8x16x3_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -void vpx_sad8x16x3_sse3(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -RTCD_EXTERN void (*vpx_sad8x16x3)(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); - -void vpx_sad8x16x4d_c(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); -void vpx_sad8x16x4d_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); -#define vpx_sad8x16x4d vpx_sad8x16x4d_sse2 - -void vpx_sad8x16x8_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -void vpx_sad8x16x8_sse4_1(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -RTCD_EXTERN void (*vpx_sad8x16x8)(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); - -unsigned int vpx_sad8x4_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -unsigned int vpx_sad8x4_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -#define vpx_sad8x4 vpx_sad8x4_sse2 - -unsigned int vpx_sad8x4_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -unsigned int vpx_sad8x4_avg_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -#define vpx_sad8x4_avg vpx_sad8x4_avg_sse2 - -void vpx_sad8x4x4d_c(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); -void vpx_sad8x4x4d_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); -#define vpx_sad8x4x4d vpx_sad8x4x4d_sse2 - -void vpx_sad8x4x8_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -#define vpx_sad8x4x8 vpx_sad8x4x8_c - -unsigned int vpx_sad8x8_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -unsigned int vpx_sad8x8_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -#define vpx_sad8x8 vpx_sad8x8_sse2 - -unsigned int vpx_sad8x8_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -unsigned int vpx_sad8x8_avg_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -#define vpx_sad8x8_avg vpx_sad8x8_avg_sse2 - -void vpx_sad8x8x3_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -void vpx_sad8x8x3_sse3(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -RTCD_EXTERN void (*vpx_sad8x8x3)(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); - -void vpx_sad8x8x4d_c(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); -void vpx_sad8x8x4d_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); -#define vpx_sad8x8x4d vpx_sad8x8x4d_sse2 - -void vpx_sad8x8x8_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -void vpx_sad8x8x8_sse4_1(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -RTCD_EXTERN void (*vpx_sad8x8x8)(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); - -int vpx_satd_c(const int16_t *coeff, int length); -int vpx_satd_sse2(const int16_t *coeff, int length); -#define vpx_satd vpx_satd_sse2 - -void vpx_scaled_2d_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -void vpx_scaled_2d_ssse3(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -RTCD_EXTERN void (*vpx_scaled_2d)(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); - -void vpx_scaled_avg_2d_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -#define vpx_scaled_avg_2d vpx_scaled_avg_2d_c - -void vpx_scaled_avg_horiz_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -#define vpx_scaled_avg_horiz vpx_scaled_avg_horiz_c - -void vpx_scaled_avg_vert_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -#define vpx_scaled_avg_vert vpx_scaled_avg_vert_c - -void vpx_scaled_horiz_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -#define vpx_scaled_horiz vpx_scaled_horiz_c - -void vpx_scaled_vert_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -#define vpx_scaled_vert vpx_scaled_vert_c - -uint32_t vpx_sub_pixel_avg_variance16x16_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_sub_pixel_avg_variance16x16_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_sub_pixel_avg_variance16x16_ssse3(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -RTCD_EXTERN uint32_t (*vpx_sub_pixel_avg_variance16x16)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); - -uint32_t vpx_sub_pixel_avg_variance16x32_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_sub_pixel_avg_variance16x32_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_sub_pixel_avg_variance16x32_ssse3(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -RTCD_EXTERN uint32_t (*vpx_sub_pixel_avg_variance16x32)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); - -uint32_t vpx_sub_pixel_avg_variance16x8_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_sub_pixel_avg_variance16x8_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_sub_pixel_avg_variance16x8_ssse3(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -RTCD_EXTERN uint32_t (*vpx_sub_pixel_avg_variance16x8)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); - -uint32_t vpx_sub_pixel_avg_variance32x16_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_sub_pixel_avg_variance32x16_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_sub_pixel_avg_variance32x16_ssse3(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -RTCD_EXTERN uint32_t (*vpx_sub_pixel_avg_variance32x16)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); - -uint32_t vpx_sub_pixel_avg_variance32x32_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_sub_pixel_avg_variance32x32_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_sub_pixel_avg_variance32x32_ssse3(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_sub_pixel_avg_variance32x32_avx2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -RTCD_EXTERN uint32_t (*vpx_sub_pixel_avg_variance32x32)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); - -uint32_t vpx_sub_pixel_avg_variance32x64_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_sub_pixel_avg_variance32x64_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_sub_pixel_avg_variance32x64_ssse3(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -RTCD_EXTERN uint32_t (*vpx_sub_pixel_avg_variance32x64)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); - -uint32_t vpx_sub_pixel_avg_variance4x4_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_sub_pixel_avg_variance4x4_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_sub_pixel_avg_variance4x4_ssse3(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -RTCD_EXTERN uint32_t (*vpx_sub_pixel_avg_variance4x4)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); - -uint32_t vpx_sub_pixel_avg_variance4x8_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_sub_pixel_avg_variance4x8_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_sub_pixel_avg_variance4x8_ssse3(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -RTCD_EXTERN uint32_t (*vpx_sub_pixel_avg_variance4x8)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); - -uint32_t vpx_sub_pixel_avg_variance64x32_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_sub_pixel_avg_variance64x32_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_sub_pixel_avg_variance64x32_ssse3(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -RTCD_EXTERN uint32_t (*vpx_sub_pixel_avg_variance64x32)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); - -uint32_t vpx_sub_pixel_avg_variance64x64_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_sub_pixel_avg_variance64x64_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_sub_pixel_avg_variance64x64_ssse3(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_sub_pixel_avg_variance64x64_avx2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -RTCD_EXTERN uint32_t (*vpx_sub_pixel_avg_variance64x64)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); - -uint32_t vpx_sub_pixel_avg_variance8x16_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_sub_pixel_avg_variance8x16_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_sub_pixel_avg_variance8x16_ssse3(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -RTCD_EXTERN uint32_t (*vpx_sub_pixel_avg_variance8x16)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); - -uint32_t vpx_sub_pixel_avg_variance8x4_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_sub_pixel_avg_variance8x4_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_sub_pixel_avg_variance8x4_ssse3(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -RTCD_EXTERN uint32_t (*vpx_sub_pixel_avg_variance8x4)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); - -uint32_t vpx_sub_pixel_avg_variance8x8_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_sub_pixel_avg_variance8x8_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_sub_pixel_avg_variance8x8_ssse3(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -RTCD_EXTERN uint32_t (*vpx_sub_pixel_avg_variance8x8)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); - -uint32_t vpx_sub_pixel_variance16x16_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_sub_pixel_variance16x16_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_sub_pixel_variance16x16_ssse3(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -RTCD_EXTERN uint32_t (*vpx_sub_pixel_variance16x16)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); - -uint32_t vpx_sub_pixel_variance16x32_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_sub_pixel_variance16x32_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_sub_pixel_variance16x32_ssse3(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -RTCD_EXTERN uint32_t (*vpx_sub_pixel_variance16x32)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); - -uint32_t vpx_sub_pixel_variance16x8_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_sub_pixel_variance16x8_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_sub_pixel_variance16x8_ssse3(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -RTCD_EXTERN uint32_t (*vpx_sub_pixel_variance16x8)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); - -uint32_t vpx_sub_pixel_variance32x16_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_sub_pixel_variance32x16_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_sub_pixel_variance32x16_ssse3(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -RTCD_EXTERN uint32_t (*vpx_sub_pixel_variance32x16)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); - -uint32_t vpx_sub_pixel_variance32x32_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_sub_pixel_variance32x32_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_sub_pixel_variance32x32_ssse3(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_sub_pixel_variance32x32_avx2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -RTCD_EXTERN uint32_t (*vpx_sub_pixel_variance32x32)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); - -uint32_t vpx_sub_pixel_variance32x64_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_sub_pixel_variance32x64_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_sub_pixel_variance32x64_ssse3(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -RTCD_EXTERN uint32_t (*vpx_sub_pixel_variance32x64)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); - -uint32_t vpx_sub_pixel_variance4x4_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_sub_pixel_variance4x4_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_sub_pixel_variance4x4_ssse3(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -RTCD_EXTERN uint32_t (*vpx_sub_pixel_variance4x4)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); - -uint32_t vpx_sub_pixel_variance4x8_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_sub_pixel_variance4x8_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_sub_pixel_variance4x8_ssse3(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -RTCD_EXTERN uint32_t (*vpx_sub_pixel_variance4x8)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); - -uint32_t vpx_sub_pixel_variance64x32_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_sub_pixel_variance64x32_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_sub_pixel_variance64x32_ssse3(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -RTCD_EXTERN uint32_t (*vpx_sub_pixel_variance64x32)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); - -uint32_t vpx_sub_pixel_variance64x64_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_sub_pixel_variance64x64_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_sub_pixel_variance64x64_ssse3(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_sub_pixel_variance64x64_avx2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -RTCD_EXTERN uint32_t (*vpx_sub_pixel_variance64x64)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); - -uint32_t vpx_sub_pixel_variance8x16_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_sub_pixel_variance8x16_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_sub_pixel_variance8x16_ssse3(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -RTCD_EXTERN uint32_t (*vpx_sub_pixel_variance8x16)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); - -uint32_t vpx_sub_pixel_variance8x4_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_sub_pixel_variance8x4_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_sub_pixel_variance8x4_ssse3(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -RTCD_EXTERN uint32_t (*vpx_sub_pixel_variance8x4)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); - -uint32_t vpx_sub_pixel_variance8x8_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_sub_pixel_variance8x8_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_sub_pixel_variance8x8_ssse3(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -RTCD_EXTERN uint32_t (*vpx_sub_pixel_variance8x8)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); - -void vpx_subtract_block_c(int rows, int cols, int16_t *diff_ptr, ptrdiff_t diff_stride, const uint8_t *src_ptr, ptrdiff_t src_stride, const uint8_t *pred_ptr, ptrdiff_t pred_stride); -void vpx_subtract_block_sse2(int rows, int cols, int16_t *diff_ptr, ptrdiff_t diff_stride, const uint8_t *src_ptr, ptrdiff_t src_stride, const uint8_t *pred_ptr, ptrdiff_t pred_stride); -#define vpx_subtract_block vpx_subtract_block_sse2 - -uint64_t vpx_sum_squares_2d_i16_c(const int16_t *src, int stride, int size); -uint64_t vpx_sum_squares_2d_i16_sse2(const int16_t *src, int stride, int size); -#define vpx_sum_squares_2d_i16 vpx_sum_squares_2d_i16_sse2 - -void vpx_tm_predictor_16x16_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_tm_predictor_16x16_sse2(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_tm_predictor_16x16 vpx_tm_predictor_16x16_sse2 - -void vpx_tm_predictor_32x32_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_tm_predictor_32x32_sse2(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_tm_predictor_32x32 vpx_tm_predictor_32x32_sse2 - -void vpx_tm_predictor_4x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_tm_predictor_4x4_sse2(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_tm_predictor_4x4 vpx_tm_predictor_4x4_sse2 - -void vpx_tm_predictor_8x8_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_tm_predictor_8x8_sse2(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_tm_predictor_8x8 vpx_tm_predictor_8x8_sse2 - -void vpx_v_predictor_16x16_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_v_predictor_16x16_sse2(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_v_predictor_16x16 vpx_v_predictor_16x16_sse2 - -void vpx_v_predictor_32x32_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_v_predictor_32x32_sse2(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_v_predictor_32x32 vpx_v_predictor_32x32_sse2 - -void vpx_v_predictor_4x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_v_predictor_4x4_sse2(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_v_predictor_4x4 vpx_v_predictor_4x4_sse2 - -void vpx_v_predictor_8x8_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_v_predictor_8x8_sse2(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_v_predictor_8x8 vpx_v_predictor_8x8_sse2 - -unsigned int vpx_variance16x16_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -unsigned int vpx_variance16x16_sse2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -unsigned int vpx_variance16x16_avx2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -RTCD_EXTERN unsigned int (*vpx_variance16x16)(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); - -unsigned int vpx_variance16x32_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -unsigned int vpx_variance16x32_sse2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_variance16x32 vpx_variance16x32_sse2 - -unsigned int vpx_variance16x8_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -unsigned int vpx_variance16x8_sse2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_variance16x8 vpx_variance16x8_sse2 - -unsigned int vpx_variance32x16_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -unsigned int vpx_variance32x16_sse2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -unsigned int vpx_variance32x16_avx2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -RTCD_EXTERN unsigned int (*vpx_variance32x16)(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); - -unsigned int vpx_variance32x32_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -unsigned int vpx_variance32x32_sse2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -unsigned int vpx_variance32x32_avx2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -RTCD_EXTERN unsigned int (*vpx_variance32x32)(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); - -unsigned int vpx_variance32x64_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -unsigned int vpx_variance32x64_sse2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_variance32x64 vpx_variance32x64_sse2 - -unsigned int vpx_variance4x4_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -unsigned int vpx_variance4x4_sse2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_variance4x4 vpx_variance4x4_sse2 - -unsigned int vpx_variance4x8_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -unsigned int vpx_variance4x8_sse2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_variance4x8 vpx_variance4x8_sse2 - -unsigned int vpx_variance64x32_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -unsigned int vpx_variance64x32_sse2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -unsigned int vpx_variance64x32_avx2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -RTCD_EXTERN unsigned int (*vpx_variance64x32)(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); - -unsigned int vpx_variance64x64_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -unsigned int vpx_variance64x64_sse2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -unsigned int vpx_variance64x64_avx2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -RTCD_EXTERN unsigned int (*vpx_variance64x64)(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); - -unsigned int vpx_variance8x16_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -unsigned int vpx_variance8x16_sse2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_variance8x16 vpx_variance8x16_sse2 - -unsigned int vpx_variance8x4_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -unsigned int vpx_variance8x4_sse2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_variance8x4 vpx_variance8x4_sse2 - -unsigned int vpx_variance8x8_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -unsigned int vpx_variance8x8_sse2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_variance8x8 vpx_variance8x8_sse2 - -void vpx_ve_predictor_4x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_ve_predictor_4x4 vpx_ve_predictor_4x4_c - -int vpx_vector_var_c(const int16_t *ref, const int16_t *src, const int bwl); -int vpx_vector_var_sse2(const int16_t *ref, const int16_t *src, const int bwl); -#define vpx_vector_var vpx_vector_var_sse2 - -void vpx_dsp_rtcd(void); - -#ifdef RTCD_C -#include "vpx_ports/x86.h" -static void setup_rtcd_internal(void) -{ - int flags = x86_simd_caps(); - - (void)flags; - - vpx_convolve8 = vpx_convolve8_sse2; - if (flags & HAS_SSSE3) vpx_convolve8 = vpx_convolve8_ssse3; - if (flags & HAS_AVX2) vpx_convolve8 = vpx_convolve8_avx2; - vpx_convolve8_avg = vpx_convolve8_avg_sse2; - if (flags & HAS_SSSE3) vpx_convolve8_avg = vpx_convolve8_avg_ssse3; - vpx_convolve8_avg_horiz = vpx_convolve8_avg_horiz_sse2; - if (flags & HAS_SSSE3) vpx_convolve8_avg_horiz = vpx_convolve8_avg_horiz_ssse3; - vpx_convolve8_avg_vert = vpx_convolve8_avg_vert_sse2; - if (flags & HAS_SSSE3) vpx_convolve8_avg_vert = vpx_convolve8_avg_vert_ssse3; - vpx_convolve8_horiz = vpx_convolve8_horiz_sse2; - if (flags & HAS_SSSE3) vpx_convolve8_horiz = vpx_convolve8_horiz_ssse3; - if (flags & HAS_AVX2) vpx_convolve8_horiz = vpx_convolve8_horiz_avx2; - vpx_convolve8_vert = vpx_convolve8_vert_sse2; - if (flags & HAS_SSSE3) vpx_convolve8_vert = vpx_convolve8_vert_ssse3; - if (flags & HAS_AVX2) vpx_convolve8_vert = vpx_convolve8_vert_avx2; - vpx_d153_predictor_16x16 = vpx_d153_predictor_16x16_c; - if (flags & HAS_SSSE3) vpx_d153_predictor_16x16 = vpx_d153_predictor_16x16_ssse3; - vpx_d153_predictor_32x32 = vpx_d153_predictor_32x32_c; - if (flags & HAS_SSSE3) vpx_d153_predictor_32x32 = vpx_d153_predictor_32x32_ssse3; - vpx_d153_predictor_4x4 = vpx_d153_predictor_4x4_c; - if (flags & HAS_SSSE3) vpx_d153_predictor_4x4 = vpx_d153_predictor_4x4_ssse3; - vpx_d153_predictor_8x8 = vpx_d153_predictor_8x8_c; - if (flags & HAS_SSSE3) vpx_d153_predictor_8x8 = vpx_d153_predictor_8x8_ssse3; - vpx_d207_predictor_16x16 = vpx_d207_predictor_16x16_c; - if (flags & HAS_SSSE3) vpx_d207_predictor_16x16 = vpx_d207_predictor_16x16_ssse3; - vpx_d207_predictor_32x32 = vpx_d207_predictor_32x32_c; - if (flags & HAS_SSSE3) vpx_d207_predictor_32x32 = vpx_d207_predictor_32x32_ssse3; - vpx_d207_predictor_8x8 = vpx_d207_predictor_8x8_c; - if (flags & HAS_SSSE3) vpx_d207_predictor_8x8 = vpx_d207_predictor_8x8_ssse3; - vpx_d45_predictor_16x16 = vpx_d45_predictor_16x16_c; - if (flags & HAS_SSSE3) vpx_d45_predictor_16x16 = vpx_d45_predictor_16x16_ssse3; - vpx_d45_predictor_32x32 = vpx_d45_predictor_32x32_c; - if (flags & HAS_SSSE3) vpx_d45_predictor_32x32 = vpx_d45_predictor_32x32_ssse3; - vpx_d63_predictor_16x16 = vpx_d63_predictor_16x16_c; - if (flags & HAS_SSSE3) vpx_d63_predictor_16x16 = vpx_d63_predictor_16x16_ssse3; - vpx_d63_predictor_32x32 = vpx_d63_predictor_32x32_c; - if (flags & HAS_SSSE3) vpx_d63_predictor_32x32 = vpx_d63_predictor_32x32_ssse3; - vpx_d63_predictor_4x4 = vpx_d63_predictor_4x4_c; - if (flags & HAS_SSSE3) vpx_d63_predictor_4x4 = vpx_d63_predictor_4x4_ssse3; - vpx_d63_predictor_8x8 = vpx_d63_predictor_8x8_c; - if (flags & HAS_SSSE3) vpx_d63_predictor_8x8 = vpx_d63_predictor_8x8_ssse3; - vpx_get16x16var = vpx_get16x16var_sse2; - if (flags & HAS_AVX2) vpx_get16x16var = vpx_get16x16var_avx2; - vpx_hadamard_8x8 = vpx_hadamard_8x8_sse2; - if (flags & HAS_SSSE3) vpx_hadamard_8x8 = vpx_hadamard_8x8_ssse3; - vpx_idct32x32_1024_add = vpx_idct32x32_1024_add_sse2; - if (flags & HAS_SSSE3) vpx_idct32x32_1024_add = vpx_idct32x32_1024_add_ssse3; - vpx_idct32x32_135_add = vpx_idct32x32_1024_add_sse2; - if (flags & HAS_SSSE3) vpx_idct32x32_135_add = vpx_idct32x32_135_add_ssse3; - vpx_idct32x32_34_add = vpx_idct32x32_34_add_sse2; - if (flags & HAS_SSSE3) vpx_idct32x32_34_add = vpx_idct32x32_34_add_ssse3; - vpx_idct8x8_12_add = vpx_idct8x8_12_add_sse2; - if (flags & HAS_SSSE3) vpx_idct8x8_12_add = vpx_idct8x8_12_add_ssse3; - vpx_idct8x8_64_add = vpx_idct8x8_64_add_sse2; - if (flags & HAS_SSSE3) vpx_idct8x8_64_add = vpx_idct8x8_64_add_ssse3; - vpx_lpf_horizontal_16 = vpx_lpf_horizontal_16_sse2; - if (flags & HAS_AVX2) vpx_lpf_horizontal_16 = vpx_lpf_horizontal_16_avx2; - vpx_lpf_horizontal_16_dual = vpx_lpf_horizontal_16_dual_sse2; - if (flags & HAS_AVX2) vpx_lpf_horizontal_16_dual = vpx_lpf_horizontal_16_dual_avx2; - vpx_mse16x16 = vpx_mse16x16_sse2; - if (flags & HAS_AVX2) vpx_mse16x16 = vpx_mse16x16_avx2; - vpx_quantize_b = vpx_quantize_b_sse2; - if (flags & HAS_SSSE3) vpx_quantize_b = vpx_quantize_b_ssse3; - if (flags & HAS_AVX) vpx_quantize_b = vpx_quantize_b_avx; - vpx_quantize_b_32x32 = vpx_quantize_b_32x32_c; - if (flags & HAS_SSSE3) vpx_quantize_b_32x32 = vpx_quantize_b_32x32_ssse3; - if (flags & HAS_AVX) vpx_quantize_b_32x32 = vpx_quantize_b_32x32_avx; - vpx_sad16x16x3 = vpx_sad16x16x3_c; - if (flags & HAS_SSE3) vpx_sad16x16x3 = vpx_sad16x16x3_sse3; - if (flags & HAS_SSSE3) vpx_sad16x16x3 = vpx_sad16x16x3_ssse3; - vpx_sad16x16x8 = vpx_sad16x16x8_c; - if (flags & HAS_SSE4_1) vpx_sad16x16x8 = vpx_sad16x16x8_sse4_1; - vpx_sad16x8x3 = vpx_sad16x8x3_c; - if (flags & HAS_SSE3) vpx_sad16x8x3 = vpx_sad16x8x3_sse3; - if (flags & HAS_SSSE3) vpx_sad16x8x3 = vpx_sad16x8x3_ssse3; - vpx_sad16x8x8 = vpx_sad16x8x8_c; - if (flags & HAS_SSE4_1) vpx_sad16x8x8 = vpx_sad16x8x8_sse4_1; - vpx_sad32x16 = vpx_sad32x16_sse2; - if (flags & HAS_AVX2) vpx_sad32x16 = vpx_sad32x16_avx2; - vpx_sad32x16_avg = vpx_sad32x16_avg_sse2; - if (flags & HAS_AVX2) vpx_sad32x16_avg = vpx_sad32x16_avg_avx2; - vpx_sad32x32 = vpx_sad32x32_sse2; - if (flags & HAS_AVX2) vpx_sad32x32 = vpx_sad32x32_avx2; - vpx_sad32x32_avg = vpx_sad32x32_avg_sse2; - if (flags & HAS_AVX2) vpx_sad32x32_avg = vpx_sad32x32_avg_avx2; - vpx_sad32x32x4d = vpx_sad32x32x4d_sse2; - if (flags & HAS_AVX2) vpx_sad32x32x4d = vpx_sad32x32x4d_avx2; - vpx_sad32x64 = vpx_sad32x64_sse2; - if (flags & HAS_AVX2) vpx_sad32x64 = vpx_sad32x64_avx2; - vpx_sad32x64_avg = vpx_sad32x64_avg_sse2; - if (flags & HAS_AVX2) vpx_sad32x64_avg = vpx_sad32x64_avg_avx2; - vpx_sad4x4x3 = vpx_sad4x4x3_c; - if (flags & HAS_SSE3) vpx_sad4x4x3 = vpx_sad4x4x3_sse3; - vpx_sad4x4x8 = vpx_sad4x4x8_c; - if (flags & HAS_SSE4_1) vpx_sad4x4x8 = vpx_sad4x4x8_sse4_1; - vpx_sad64x32 = vpx_sad64x32_sse2; - if (flags & HAS_AVX2) vpx_sad64x32 = vpx_sad64x32_avx2; - vpx_sad64x32_avg = vpx_sad64x32_avg_sse2; - if (flags & HAS_AVX2) vpx_sad64x32_avg = vpx_sad64x32_avg_avx2; - vpx_sad64x64 = vpx_sad64x64_sse2; - if (flags & HAS_AVX2) vpx_sad64x64 = vpx_sad64x64_avx2; - vpx_sad64x64_avg = vpx_sad64x64_avg_sse2; - if (flags & HAS_AVX2) vpx_sad64x64_avg = vpx_sad64x64_avg_avx2; - vpx_sad64x64x4d = vpx_sad64x64x4d_sse2; - if (flags & HAS_AVX2) vpx_sad64x64x4d = vpx_sad64x64x4d_avx2; - vpx_sad8x16x3 = vpx_sad8x16x3_c; - if (flags & HAS_SSE3) vpx_sad8x16x3 = vpx_sad8x16x3_sse3; - vpx_sad8x16x8 = vpx_sad8x16x8_c; - if (flags & HAS_SSE4_1) vpx_sad8x16x8 = vpx_sad8x16x8_sse4_1; - vpx_sad8x8x3 = vpx_sad8x8x3_c; - if (flags & HAS_SSE3) vpx_sad8x8x3 = vpx_sad8x8x3_sse3; - vpx_sad8x8x8 = vpx_sad8x8x8_c; - if (flags & HAS_SSE4_1) vpx_sad8x8x8 = vpx_sad8x8x8_sse4_1; - vpx_scaled_2d = vpx_scaled_2d_c; - if (flags & HAS_SSSE3) vpx_scaled_2d = vpx_scaled_2d_ssse3; - vpx_sub_pixel_avg_variance16x16 = vpx_sub_pixel_avg_variance16x16_sse2; - if (flags & HAS_SSSE3) vpx_sub_pixel_avg_variance16x16 = vpx_sub_pixel_avg_variance16x16_ssse3; - vpx_sub_pixel_avg_variance16x32 = vpx_sub_pixel_avg_variance16x32_sse2; - if (flags & HAS_SSSE3) vpx_sub_pixel_avg_variance16x32 = vpx_sub_pixel_avg_variance16x32_ssse3; - vpx_sub_pixel_avg_variance16x8 = vpx_sub_pixel_avg_variance16x8_sse2; - if (flags & HAS_SSSE3) vpx_sub_pixel_avg_variance16x8 = vpx_sub_pixel_avg_variance16x8_ssse3; - vpx_sub_pixel_avg_variance32x16 = vpx_sub_pixel_avg_variance32x16_sse2; - if (flags & HAS_SSSE3) vpx_sub_pixel_avg_variance32x16 = vpx_sub_pixel_avg_variance32x16_ssse3; - vpx_sub_pixel_avg_variance32x32 = vpx_sub_pixel_avg_variance32x32_sse2; - if (flags & HAS_SSSE3) vpx_sub_pixel_avg_variance32x32 = vpx_sub_pixel_avg_variance32x32_ssse3; - if (flags & HAS_AVX2) vpx_sub_pixel_avg_variance32x32 = vpx_sub_pixel_avg_variance32x32_avx2; - vpx_sub_pixel_avg_variance32x64 = vpx_sub_pixel_avg_variance32x64_sse2; - if (flags & HAS_SSSE3) vpx_sub_pixel_avg_variance32x64 = vpx_sub_pixel_avg_variance32x64_ssse3; - vpx_sub_pixel_avg_variance4x4 = vpx_sub_pixel_avg_variance4x4_sse2; - if (flags & HAS_SSSE3) vpx_sub_pixel_avg_variance4x4 = vpx_sub_pixel_avg_variance4x4_ssse3; - vpx_sub_pixel_avg_variance4x8 = vpx_sub_pixel_avg_variance4x8_sse2; - if (flags & HAS_SSSE3) vpx_sub_pixel_avg_variance4x8 = vpx_sub_pixel_avg_variance4x8_ssse3; - vpx_sub_pixel_avg_variance64x32 = vpx_sub_pixel_avg_variance64x32_sse2; - if (flags & HAS_SSSE3) vpx_sub_pixel_avg_variance64x32 = vpx_sub_pixel_avg_variance64x32_ssse3; - vpx_sub_pixel_avg_variance64x64 = vpx_sub_pixel_avg_variance64x64_sse2; - if (flags & HAS_SSSE3) vpx_sub_pixel_avg_variance64x64 = vpx_sub_pixel_avg_variance64x64_ssse3; - if (flags & HAS_AVX2) vpx_sub_pixel_avg_variance64x64 = vpx_sub_pixel_avg_variance64x64_avx2; - vpx_sub_pixel_avg_variance8x16 = vpx_sub_pixel_avg_variance8x16_sse2; - if (flags & HAS_SSSE3) vpx_sub_pixel_avg_variance8x16 = vpx_sub_pixel_avg_variance8x16_ssse3; - vpx_sub_pixel_avg_variance8x4 = vpx_sub_pixel_avg_variance8x4_sse2; - if (flags & HAS_SSSE3) vpx_sub_pixel_avg_variance8x4 = vpx_sub_pixel_avg_variance8x4_ssse3; - vpx_sub_pixel_avg_variance8x8 = vpx_sub_pixel_avg_variance8x8_sse2; - if (flags & HAS_SSSE3) vpx_sub_pixel_avg_variance8x8 = vpx_sub_pixel_avg_variance8x8_ssse3; - vpx_sub_pixel_variance16x16 = vpx_sub_pixel_variance16x16_sse2; - if (flags & HAS_SSSE3) vpx_sub_pixel_variance16x16 = vpx_sub_pixel_variance16x16_ssse3; - vpx_sub_pixel_variance16x32 = vpx_sub_pixel_variance16x32_sse2; - if (flags & HAS_SSSE3) vpx_sub_pixel_variance16x32 = vpx_sub_pixel_variance16x32_ssse3; - vpx_sub_pixel_variance16x8 = vpx_sub_pixel_variance16x8_sse2; - if (flags & HAS_SSSE3) vpx_sub_pixel_variance16x8 = vpx_sub_pixel_variance16x8_ssse3; - vpx_sub_pixel_variance32x16 = vpx_sub_pixel_variance32x16_sse2; - if (flags & HAS_SSSE3) vpx_sub_pixel_variance32x16 = vpx_sub_pixel_variance32x16_ssse3; - vpx_sub_pixel_variance32x32 = vpx_sub_pixel_variance32x32_sse2; - if (flags & HAS_SSSE3) vpx_sub_pixel_variance32x32 = vpx_sub_pixel_variance32x32_ssse3; - if (flags & HAS_AVX2) vpx_sub_pixel_variance32x32 = vpx_sub_pixel_variance32x32_avx2; - vpx_sub_pixel_variance32x64 = vpx_sub_pixel_variance32x64_sse2; - if (flags & HAS_SSSE3) vpx_sub_pixel_variance32x64 = vpx_sub_pixel_variance32x64_ssse3; - vpx_sub_pixel_variance4x4 = vpx_sub_pixel_variance4x4_sse2; - if (flags & HAS_SSSE3) vpx_sub_pixel_variance4x4 = vpx_sub_pixel_variance4x4_ssse3; - vpx_sub_pixel_variance4x8 = vpx_sub_pixel_variance4x8_sse2; - if (flags & HAS_SSSE3) vpx_sub_pixel_variance4x8 = vpx_sub_pixel_variance4x8_ssse3; - vpx_sub_pixel_variance64x32 = vpx_sub_pixel_variance64x32_sse2; - if (flags & HAS_SSSE3) vpx_sub_pixel_variance64x32 = vpx_sub_pixel_variance64x32_ssse3; - vpx_sub_pixel_variance64x64 = vpx_sub_pixel_variance64x64_sse2; - if (flags & HAS_SSSE3) vpx_sub_pixel_variance64x64 = vpx_sub_pixel_variance64x64_ssse3; - if (flags & HAS_AVX2) vpx_sub_pixel_variance64x64 = vpx_sub_pixel_variance64x64_avx2; - vpx_sub_pixel_variance8x16 = vpx_sub_pixel_variance8x16_sse2; - if (flags & HAS_SSSE3) vpx_sub_pixel_variance8x16 = vpx_sub_pixel_variance8x16_ssse3; - vpx_sub_pixel_variance8x4 = vpx_sub_pixel_variance8x4_sse2; - if (flags & HAS_SSSE3) vpx_sub_pixel_variance8x4 = vpx_sub_pixel_variance8x4_ssse3; - vpx_sub_pixel_variance8x8 = vpx_sub_pixel_variance8x8_sse2; - if (flags & HAS_SSSE3) vpx_sub_pixel_variance8x8 = vpx_sub_pixel_variance8x8_ssse3; - vpx_variance16x16 = vpx_variance16x16_sse2; - if (flags & HAS_AVX2) vpx_variance16x16 = vpx_variance16x16_avx2; - vpx_variance32x16 = vpx_variance32x16_sse2; - if (flags & HAS_AVX2) vpx_variance32x16 = vpx_variance32x16_avx2; - vpx_variance32x32 = vpx_variance32x32_sse2; - if (flags & HAS_AVX2) vpx_variance32x32 = vpx_variance32x32_avx2; - vpx_variance64x32 = vpx_variance64x32_sse2; - if (flags & HAS_AVX2) vpx_variance64x32 = vpx_variance64x32_avx2; - vpx_variance64x64 = vpx_variance64x64_sse2; - if (flags & HAS_AVX2) vpx_variance64x64 = vpx_variance64x64_avx2; -} -#endif - -#ifdef __cplusplus -} // extern "C" -#endif - -#endif diff --git a/WebRtc.NET/include/third_party/libvpx/source/config/mac/x64/vpx_scale_rtcd.h b/WebRtc.NET/include/third_party/libvpx/source/config/mac/x64/vpx_scale_rtcd.h deleted file mode 100644 index ddf7d01c..00000000 --- a/WebRtc.NET/include/third_party/libvpx/source/config/mac/x64/vpx_scale_rtcd.h +++ /dev/null @@ -1,69 +0,0 @@ -#ifndef VPX_SCALE_RTCD_H_ -#define VPX_SCALE_RTCD_H_ - -#ifdef RTCD_C -#define RTCD_EXTERN -#else -#define RTCD_EXTERN extern -#endif - -struct yv12_buffer_config; - -#ifdef __cplusplus -extern "C" { -#endif - -void vp8_horizontal_line_2_1_scale_c(const unsigned char *source, unsigned int source_width, unsigned char *dest, unsigned int dest_width); -#define vp8_horizontal_line_2_1_scale vp8_horizontal_line_2_1_scale_c - -void vp8_horizontal_line_5_3_scale_c(const unsigned char *source, unsigned int source_width, unsigned char *dest, unsigned int dest_width); -#define vp8_horizontal_line_5_3_scale vp8_horizontal_line_5_3_scale_c - -void vp8_horizontal_line_5_4_scale_c(const unsigned char *source, unsigned int source_width, unsigned char *dest, unsigned int dest_width); -#define vp8_horizontal_line_5_4_scale vp8_horizontal_line_5_4_scale_c - -void vp8_vertical_band_2_1_scale_c(unsigned char *source, unsigned int src_pitch, unsigned char *dest, unsigned int dest_pitch, unsigned int dest_width); -#define vp8_vertical_band_2_1_scale vp8_vertical_band_2_1_scale_c - -void vp8_vertical_band_2_1_scale_i_c(unsigned char *source, unsigned int src_pitch, unsigned char *dest, unsigned int dest_pitch, unsigned int dest_width); -#define vp8_vertical_band_2_1_scale_i vp8_vertical_band_2_1_scale_i_c - -void vp8_vertical_band_5_3_scale_c(unsigned char *source, unsigned int src_pitch, unsigned char *dest, unsigned int dest_pitch, unsigned int dest_width); -#define vp8_vertical_band_5_3_scale vp8_vertical_band_5_3_scale_c - -void vp8_vertical_band_5_4_scale_c(unsigned char *source, unsigned int src_pitch, unsigned char *dest, unsigned int dest_pitch, unsigned int dest_width); -#define vp8_vertical_band_5_4_scale vp8_vertical_band_5_4_scale_c - -void vp8_yv12_copy_frame_c(const struct yv12_buffer_config *src_ybc, struct yv12_buffer_config *dst_ybc); -#define vp8_yv12_copy_frame vp8_yv12_copy_frame_c - -void vp8_yv12_extend_frame_borders_c(struct yv12_buffer_config *ybf); -#define vp8_yv12_extend_frame_borders vp8_yv12_extend_frame_borders_c - -void vpx_extend_frame_borders_c(struct yv12_buffer_config *ybf); -#define vpx_extend_frame_borders vpx_extend_frame_borders_c - -void vpx_extend_frame_inner_borders_c(struct yv12_buffer_config *ybf); -#define vpx_extend_frame_inner_borders vpx_extend_frame_inner_borders_c - -void vpx_yv12_copy_y_c(const struct yv12_buffer_config *src_ybc, struct yv12_buffer_config *dst_ybc); -#define vpx_yv12_copy_y vpx_yv12_copy_y_c - -void vpx_scale_rtcd(void); - -#ifdef RTCD_C -#include "vpx_ports/x86.h" -static void setup_rtcd_internal(void) -{ - int flags = x86_simd_caps(); - - (void)flags; - -} -#endif - -#ifdef __cplusplus -} // extern "C" -#endif - -#endif diff --git a/WebRtc.NET/include/third_party/libvpx/source/config/nacl/vp8_rtcd.h b/WebRtc.NET/include/third_party/libvpx/source/config/nacl/vp8_rtcd.h deleted file mode 100644 index 650bd323..00000000 --- a/WebRtc.NET/include/third_party/libvpx/source/config/nacl/vp8_rtcd.h +++ /dev/null @@ -1,181 +0,0 @@ -#ifndef VP8_RTCD_H_ -#define VP8_RTCD_H_ - -#ifdef RTCD_C -#define RTCD_EXTERN -#else -#define RTCD_EXTERN extern -#endif - -/* - * VP8 - */ - -struct blockd; -struct macroblockd; -struct loop_filter_info; - -/* Encoder forward decls */ -struct block; -struct macroblock; -struct variance_vtable; -union int_mv; -struct yv12_buffer_config; - -#ifdef __cplusplus -extern "C" { -#endif - -void vp8_bilinear_predict16x16_c(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch); -#define vp8_bilinear_predict16x16 vp8_bilinear_predict16x16_c - -void vp8_bilinear_predict4x4_c(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch); -#define vp8_bilinear_predict4x4 vp8_bilinear_predict4x4_c - -void vp8_bilinear_predict8x4_c(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch); -#define vp8_bilinear_predict8x4 vp8_bilinear_predict8x4_c - -void vp8_bilinear_predict8x8_c(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch); -#define vp8_bilinear_predict8x8 vp8_bilinear_predict8x8_c - -void vp8_blend_b_c(unsigned char *y, unsigned char *u, unsigned char *v, int y1, int u1, int v1, int alpha, int stride); -#define vp8_blend_b vp8_blend_b_c - -void vp8_blend_mb_inner_c(unsigned char *y, unsigned char *u, unsigned char *v, int y1, int u1, int v1, int alpha, int stride); -#define vp8_blend_mb_inner vp8_blend_mb_inner_c - -void vp8_blend_mb_outer_c(unsigned char *y, unsigned char *u, unsigned char *v, int y1, int u1, int v1, int alpha, int stride); -#define vp8_blend_mb_outer vp8_blend_mb_outer_c - -int vp8_block_error_c(short *coeff, short *dqcoeff); -#define vp8_block_error vp8_block_error_c - -void vp8_copy_mem16x16_c(unsigned char *src, int src_pitch, unsigned char *dst, int dst_pitch); -#define vp8_copy_mem16x16 vp8_copy_mem16x16_c - -void vp8_copy_mem8x4_c(unsigned char *src, int src_pitch, unsigned char *dst, int dst_pitch); -#define vp8_copy_mem8x4 vp8_copy_mem8x4_c - -void vp8_copy_mem8x8_c(unsigned char *src, int src_pitch, unsigned char *dst, int dst_pitch); -#define vp8_copy_mem8x8 vp8_copy_mem8x8_c - -void vp8_dc_only_idct_add_c(short input, unsigned char *pred, int pred_stride, unsigned char *dst, int dst_stride); -#define vp8_dc_only_idct_add vp8_dc_only_idct_add_c - -int vp8_denoiser_filter_c(unsigned char *mc_running_avg_y, int mc_avg_y_stride, unsigned char *running_avg_y, int avg_y_stride, unsigned char *sig, int sig_stride, unsigned int motion_magnitude, int increase_denoising); -#define vp8_denoiser_filter vp8_denoiser_filter_c - -int vp8_denoiser_filter_uv_c(unsigned char *mc_running_avg, int mc_avg_stride, unsigned char *running_avg, int avg_stride, unsigned char *sig, int sig_stride, unsigned int motion_magnitude, int increase_denoising); -#define vp8_denoiser_filter_uv vp8_denoiser_filter_uv_c - -void vp8_dequant_idct_add_c(short *input, short *dq, unsigned char *output, int stride); -#define vp8_dequant_idct_add vp8_dequant_idct_add_c - -void vp8_dequant_idct_add_uv_block_c(short *q, short *dq, unsigned char *dst_u, unsigned char *dst_v, int stride, char *eobs); -#define vp8_dequant_idct_add_uv_block vp8_dequant_idct_add_uv_block_c - -void vp8_dequant_idct_add_y_block_c(short *q, short *dq, unsigned char *dst, int stride, char *eobs); -#define vp8_dequant_idct_add_y_block vp8_dequant_idct_add_y_block_c - -void vp8_dequantize_b_c(struct blockd*, short *dqc); -#define vp8_dequantize_b vp8_dequantize_b_c - -int vp8_diamond_search_sad_c(struct macroblock *x, struct block *b, struct blockd *d, union int_mv *ref_mv, union int_mv *best_mv, int search_param, int sad_per_bit, int *num00, struct variance_vtable *fn_ptr, int *mvcost[2], union int_mv *center_mv); -#define vp8_diamond_search_sad vp8_diamond_search_sad_c - -void vp8_fast_quantize_b_c(struct block *, struct blockd *); -#define vp8_fast_quantize_b vp8_fast_quantize_b_c - -void vp8_filter_by_weight16x16_c(unsigned char *src, int src_stride, unsigned char *dst, int dst_stride, int src_weight); -#define vp8_filter_by_weight16x16 vp8_filter_by_weight16x16_c - -void vp8_filter_by_weight4x4_c(unsigned char *src, int src_stride, unsigned char *dst, int dst_stride, int src_weight); -#define vp8_filter_by_weight4x4 vp8_filter_by_weight4x4_c - -void vp8_filter_by_weight8x8_c(unsigned char *src, int src_stride, unsigned char *dst, int dst_stride, int src_weight); -#define vp8_filter_by_weight8x8 vp8_filter_by_weight8x8_c - -int vp8_full_search_sad_c(struct macroblock *x, struct block *b, struct blockd *d, union int_mv *ref_mv, int sad_per_bit, int distance, struct variance_vtable *fn_ptr, int *mvcost[2], union int_mv *center_mv); -#define vp8_full_search_sad vp8_full_search_sad_c - -void vp8_loop_filter_bh_c(unsigned char *y, unsigned char *u, unsigned char *v, int ystride, int uv_stride, struct loop_filter_info *lfi); -#define vp8_loop_filter_bh vp8_loop_filter_bh_c - -void vp8_loop_filter_bv_c(unsigned char *y, unsigned char *u, unsigned char *v, int ystride, int uv_stride, struct loop_filter_info *lfi); -#define vp8_loop_filter_bv vp8_loop_filter_bv_c - -void vp8_loop_filter_mbh_c(unsigned char *y, unsigned char *u, unsigned char *v, int ystride, int uv_stride, struct loop_filter_info *lfi); -#define vp8_loop_filter_mbh vp8_loop_filter_mbh_c - -void vp8_loop_filter_mbv_c(unsigned char *y, unsigned char *u, unsigned char *v, int ystride, int uv_stride, struct loop_filter_info *lfi); -#define vp8_loop_filter_mbv vp8_loop_filter_mbv_c - -void vp8_loop_filter_bhs_c(unsigned char *y, int ystride, const unsigned char *blimit); -#define vp8_loop_filter_simple_bh vp8_loop_filter_bhs_c - -void vp8_loop_filter_bvs_c(unsigned char *y, int ystride, const unsigned char *blimit); -#define vp8_loop_filter_simple_bv vp8_loop_filter_bvs_c - -void vp8_loop_filter_simple_horizontal_edge_c(unsigned char *y, int ystride, const unsigned char *blimit); -#define vp8_loop_filter_simple_mbh vp8_loop_filter_simple_horizontal_edge_c - -void vp8_loop_filter_simple_vertical_edge_c(unsigned char *y, int ystride, const unsigned char *blimit); -#define vp8_loop_filter_simple_mbv vp8_loop_filter_simple_vertical_edge_c - -int vp8_mbblock_error_c(struct macroblock *mb, int dc); -#define vp8_mbblock_error vp8_mbblock_error_c - -int vp8_mbuverror_c(struct macroblock *mb); -#define vp8_mbuverror vp8_mbuverror_c - -int vp8_refining_search_sad_c(struct macroblock *x, struct block *b, struct blockd *d, union int_mv *ref_mv, int sad_per_bit, int distance, struct variance_vtable *fn_ptr, int *mvcost[2], union int_mv *center_mv); -#define vp8_refining_search_sad vp8_refining_search_sad_c - -void vp8_regular_quantize_b_c(struct block *, struct blockd *); -#define vp8_regular_quantize_b vp8_regular_quantize_b_c - -void vp8_short_fdct4x4_c(short *input, short *output, int pitch); -#define vp8_short_fdct4x4 vp8_short_fdct4x4_c - -void vp8_short_fdct8x4_c(short *input, short *output, int pitch); -#define vp8_short_fdct8x4 vp8_short_fdct8x4_c - -void vp8_short_idct4x4llm_c(short *input, unsigned char *pred, int pitch, unsigned char *dst, int dst_stride); -#define vp8_short_idct4x4llm vp8_short_idct4x4llm_c - -void vp8_short_inv_walsh4x4_c(short *input, short *output); -#define vp8_short_inv_walsh4x4 vp8_short_inv_walsh4x4_c - -void vp8_short_inv_walsh4x4_1_c(short *input, short *output); -#define vp8_short_inv_walsh4x4_1 vp8_short_inv_walsh4x4_1_c - -void vp8_short_walsh4x4_c(short *input, short *output, int pitch); -#define vp8_short_walsh4x4 vp8_short_walsh4x4_c - -void vp8_sixtap_predict16x16_c(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch); -#define vp8_sixtap_predict16x16 vp8_sixtap_predict16x16_c - -void vp8_sixtap_predict4x4_c(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch); -#define vp8_sixtap_predict4x4 vp8_sixtap_predict4x4_c - -void vp8_sixtap_predict8x4_c(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch); -#define vp8_sixtap_predict8x4 vp8_sixtap_predict8x4_c - -void vp8_sixtap_predict8x8_c(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch); -#define vp8_sixtap_predict8x8 vp8_sixtap_predict8x8_c - -void vp8_rtcd(void); - -#include "vpx_config.h" - -#ifdef RTCD_C -static void setup_rtcd_internal(void) -{ -} -#endif - -#ifdef __cplusplus -} // extern "C" -#endif - -#endif diff --git a/WebRtc.NET/include/third_party/libvpx/source/config/nacl/vp9_rtcd.h b/WebRtc.NET/include/third_party/libvpx/source/config/nacl/vp9_rtcd.h deleted file mode 100644 index 8251c1b5..00000000 --- a/WebRtc.NET/include/third_party/libvpx/source/config/nacl/vp9_rtcd.h +++ /dev/null @@ -1,142 +0,0 @@ -#ifndef VP9_RTCD_H_ -#define VP9_RTCD_H_ - -#ifdef RTCD_C -#define RTCD_EXTERN -#else -#define RTCD_EXTERN extern -#endif - -/* - * VP9 - */ - -#include "vpx/vpx_integer.h" -#include "vp9/common/vp9_common.h" -#include "vp9/common/vp9_enums.h" - -struct macroblockd; - -/* Encoder forward decls */ -struct macroblock; -struct vp9_variance_vtable; -struct search_site_config; -struct mv; -union int_mv; -struct yv12_buffer_config; - -#ifdef __cplusplus -extern "C" { -#endif - -int64_t vp9_block_error_c(const tran_low_t *coeff, const tran_low_t *dqcoeff, intptr_t block_size, int64_t *ssz); -#define vp9_block_error vp9_block_error_c - -int vp9_denoiser_filter_c(const uint8_t *sig, int sig_stride, const uint8_t *mc_avg, int mc_avg_stride, uint8_t *avg, int avg_stride, int increase_denoising, BLOCK_SIZE bs, int motion_magnitude); -#define vp9_denoiser_filter vp9_denoiser_filter_c - -int vp9_diamond_search_sad_c(const struct macroblock *x, const struct search_site_config *cfg, struct mv *ref_mv, struct mv *best_mv, int search_param, int sad_per_bit, int *num00, const struct vp9_variance_vtable *fn_ptr, const struct mv *center_mv); -#define vp9_diamond_search_sad vp9_diamond_search_sad_c - -void vp9_fdct8x8_quant_c(const int16_t *input, int stride, tran_low_t *coeff_ptr, intptr_t n_coeffs, int skip_block, const int16_t *zbin_ptr, const int16_t *round_ptr, const int16_t *quant_ptr, const int16_t *quant_shift_ptr, tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr, const int16_t *dequant_ptr, uint16_t *eob_ptr, const int16_t *scan, const int16_t *iscan); -#define vp9_fdct8x8_quant vp9_fdct8x8_quant_c - -void vp9_fht16x16_c(const int16_t *input, tran_low_t *output, int stride, int tx_type); -#define vp9_fht16x16 vp9_fht16x16_c - -void vp9_fht4x4_c(const int16_t *input, tran_low_t *output, int stride, int tx_type); -#define vp9_fht4x4 vp9_fht4x4_c - -void vp9_fht8x8_c(const int16_t *input, tran_low_t *output, int stride, int tx_type); -#define vp9_fht8x8 vp9_fht8x8_c - -void vp9_filter_by_weight16x16_c(const uint8_t *src, int src_stride, uint8_t *dst, int dst_stride, int src_weight); -#define vp9_filter_by_weight16x16 vp9_filter_by_weight16x16_c - -void vp9_filter_by_weight8x8_c(const uint8_t *src, int src_stride, uint8_t *dst, int dst_stride, int src_weight); -#define vp9_filter_by_weight8x8 vp9_filter_by_weight8x8_c - -int vp9_full_search_sad_c(const struct macroblock *x, const struct mv *ref_mv, int sad_per_bit, int distance, const struct vp9_variance_vtable *fn_ptr, const struct mv *center_mv, struct mv *best_mv); -#define vp9_full_search_sad vp9_full_search_sad_c - -void vp9_fwht4x4_c(const int16_t *input, tran_low_t *output, int stride); -#define vp9_fwht4x4 vp9_fwht4x4_c - -int64_t vp9_highbd_block_error_c(const tran_low_t *coeff, const tran_low_t *dqcoeff, intptr_t block_size, int64_t *ssz, int bd); -#define vp9_highbd_block_error vp9_highbd_block_error_c - -int64_t vp9_highbd_block_error_8bit_c(const tran_low_t *coeff, const tran_low_t *dqcoeff, intptr_t block_size, int64_t *ssz); -#define vp9_highbd_block_error_8bit vp9_highbd_block_error_8bit_c - -void vp9_highbd_fht16x16_c(const int16_t *input, tran_low_t *output, int stride, int tx_type); -#define vp9_highbd_fht16x16 vp9_highbd_fht16x16_c - -void vp9_highbd_fht4x4_c(const int16_t *input, tran_low_t *output, int stride, int tx_type); -#define vp9_highbd_fht4x4 vp9_highbd_fht4x4_c - -void vp9_highbd_fht8x8_c(const int16_t *input, tran_low_t *output, int stride, int tx_type); -#define vp9_highbd_fht8x8 vp9_highbd_fht8x8_c - -void vp9_highbd_fwht4x4_c(const int16_t *input, tran_low_t *output, int stride); -#define vp9_highbd_fwht4x4 vp9_highbd_fwht4x4_c - -void vp9_highbd_iht16x16_256_add_c(const tran_low_t *input, uint8_t *output, int pitch, int tx_type, int bd); -#define vp9_highbd_iht16x16_256_add vp9_highbd_iht16x16_256_add_c - -void vp9_highbd_iht4x4_16_add_c(const tran_low_t *input, uint8_t *dest, int stride, int tx_type, int bd); -#define vp9_highbd_iht4x4_16_add vp9_highbd_iht4x4_16_add_c - -void vp9_highbd_iht8x8_64_add_c(const tran_low_t *input, uint8_t *dest, int stride, int tx_type, int bd); -#define vp9_highbd_iht8x8_64_add vp9_highbd_iht8x8_64_add_c - -void vp9_highbd_mbpost_proc_across_ip_c(uint16_t *src, int pitch, int rows, int cols, int flimit); -#define vp9_highbd_mbpost_proc_across_ip vp9_highbd_mbpost_proc_across_ip_c - -void vp9_highbd_mbpost_proc_down_c(uint16_t *dst, int pitch, int rows, int cols, int flimit); -#define vp9_highbd_mbpost_proc_down vp9_highbd_mbpost_proc_down_c - -void vp9_highbd_post_proc_down_and_across_c(const uint16_t *src_ptr, uint16_t *dst_ptr, int src_pixels_per_line, int dst_pixels_per_line, int rows, int cols, int flimit); -#define vp9_highbd_post_proc_down_and_across vp9_highbd_post_proc_down_and_across_c - -void vp9_highbd_quantize_fp_c(const tran_low_t *coeff_ptr, intptr_t n_coeffs, int skip_block, const int16_t *zbin_ptr, const int16_t *round_ptr, const int16_t *quant_ptr, const int16_t *quant_shift_ptr, tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr, const int16_t *dequant_ptr, uint16_t *eob_ptr, const int16_t *scan, const int16_t *iscan); -#define vp9_highbd_quantize_fp vp9_highbd_quantize_fp_c - -void vp9_highbd_quantize_fp_32x32_c(const tran_low_t *coeff_ptr, intptr_t n_coeffs, int skip_block, const int16_t *zbin_ptr, const int16_t *round_ptr, const int16_t *quant_ptr, const int16_t *quant_shift_ptr, tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr, const int16_t *dequant_ptr, uint16_t *eob_ptr, const int16_t *scan, const int16_t *iscan); -#define vp9_highbd_quantize_fp_32x32 vp9_highbd_quantize_fp_32x32_c - -void vp9_highbd_temporal_filter_apply_c(uint8_t *frame1, unsigned int stride, uint8_t *frame2, unsigned int block_width, unsigned int block_height, int strength, int filter_weight, unsigned int *accumulator, uint16_t *count); -#define vp9_highbd_temporal_filter_apply vp9_highbd_temporal_filter_apply_c - -void vp9_iht16x16_256_add_c(const tran_low_t *input, uint8_t *output, int pitch, int tx_type); -#define vp9_iht16x16_256_add vp9_iht16x16_256_add_c - -void vp9_iht4x4_16_add_c(const tran_low_t *input, uint8_t *dest, int stride, int tx_type); -#define vp9_iht4x4_16_add vp9_iht4x4_16_add_c - -void vp9_iht8x8_64_add_c(const tran_low_t *input, uint8_t *dest, int stride, int tx_type); -#define vp9_iht8x8_64_add vp9_iht8x8_64_add_c - -void vp9_quantize_fp_c(const tran_low_t *coeff_ptr, intptr_t n_coeffs, int skip_block, const int16_t *zbin_ptr, const int16_t *round_ptr, const int16_t *quant_ptr, const int16_t *quant_shift_ptr, tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr, const int16_t *dequant_ptr, uint16_t *eob_ptr, const int16_t *scan, const int16_t *iscan); -#define vp9_quantize_fp vp9_quantize_fp_c - -void vp9_quantize_fp_32x32_c(const tran_low_t *coeff_ptr, intptr_t n_coeffs, int skip_block, const int16_t *zbin_ptr, const int16_t *round_ptr, const int16_t *quant_ptr, const int16_t *quant_shift_ptr, tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr, const int16_t *dequant_ptr, uint16_t *eob_ptr, const int16_t *scan, const int16_t *iscan); -#define vp9_quantize_fp_32x32 vp9_quantize_fp_32x32_c - -void vp9_temporal_filter_apply_c(uint8_t *frame1, unsigned int stride, uint8_t *frame2, unsigned int block_width, unsigned int block_height, int strength, int filter_weight, unsigned int *accumulator, uint16_t *count); -#define vp9_temporal_filter_apply vp9_temporal_filter_apply_c - -void vp9_rtcd(void); - -#include "vpx_config.h" - -#ifdef RTCD_C -static void setup_rtcd_internal(void) -{ -} -#endif - -#ifdef __cplusplus -} // extern "C" -#endif - -#endif diff --git a/WebRtc.NET/include/third_party/libvpx/source/config/nacl/vpx_config.h b/WebRtc.NET/include/third_party/libvpx/source/config/nacl/vpx_config.h deleted file mode 100644 index 9d832817..00000000 --- a/WebRtc.NET/include/third_party/libvpx/source/config/nacl/vpx_config.h +++ /dev/null @@ -1,94 +0,0 @@ -/* Copyright (c) 2011 The WebM project authors. All Rights Reserved. */ -/* */ -/* Use of this source code is governed by a BSD-style license */ -/* that can be found in the LICENSE file in the root of the source */ -/* tree. An additional intellectual property rights grant can be found */ -/* in the file PATENTS. All contributing project authors may */ -/* be found in the AUTHORS file in the root of the source tree. */ -/* This file automatically generated by configure. Do not edit! */ -#ifndef VPX_CONFIG_H -#define VPX_CONFIG_H -#define RESTRICT -#define INLINE inline -#define ARCH_ARM 0 -#define ARCH_MIPS 0 -#define ARCH_X86 0 -#define ARCH_X86_64 0 -#define HAVE_NEON 0 -#define HAVE_NEON_ASM 0 -#define HAVE_MIPS32 0 -#define HAVE_DSPR2 0 -#define HAVE_MSA 0 -#define HAVE_MIPS64 0 -#define HAVE_MMX 0 -#define HAVE_SSE 0 -#define HAVE_SSE2 0 -#define HAVE_SSE3 0 -#define HAVE_SSSE3 0 -#define HAVE_SSE4_1 0 -#define HAVE_AVX 0 -#define HAVE_AVX2 0 -#define HAVE_VPX_PORTS 1 -#define HAVE_PTHREAD_H 1 -#define HAVE_UNISTD_H 0 -#define CONFIG_DEPENDENCY_TRACKING 1 -#define CONFIG_EXTERNAL_BUILD 1 -#define CONFIG_INSTALL_DOCS 0 -#define CONFIG_INSTALL_BINS 1 -#define CONFIG_INSTALL_LIBS 1 -#define CONFIG_INSTALL_SRCS 0 -#define CONFIG_DEBUG 0 -#define CONFIG_GPROF 0 -#define CONFIG_GCOV 0 -#define CONFIG_RVCT 0 -#define CONFIG_GCC 1 -#define CONFIG_MSVS 0 -#define CONFIG_PIC 0 -#define CONFIG_BIG_ENDIAN 0 -#define CONFIG_CODEC_SRCS 0 -#define CONFIG_DEBUG_LIBS 0 -#define CONFIG_DEQUANT_TOKENS 0 -#define CONFIG_DC_RECON 0 -#define CONFIG_RUNTIME_CPU_DETECT 0 -#define CONFIG_POSTPROC 1 -#define CONFIG_VP9_POSTPROC 1 -#define CONFIG_MULTITHREAD 1 -#define CONFIG_INTERNAL_STATS 0 -#define CONFIG_VP8_ENCODER 1 -#define CONFIG_VP8_DECODER 1 -#define CONFIG_VP9_ENCODER 1 -#define CONFIG_VP9_DECODER 1 -#define CONFIG_VP8 1 -#define CONFIG_VP9 1 -#define CONFIG_ENCODERS 1 -#define CONFIG_DECODERS 1 -#define CONFIG_STATIC_MSVCRT 0 -#define CONFIG_SPATIAL_RESAMPLING 1 -#define CONFIG_REALTIME_ONLY 1 -#define CONFIG_ONTHEFLY_BITPACKING 0 -#define CONFIG_ERROR_CONCEALMENT 0 -#define CONFIG_SHARED 0 -#define CONFIG_STATIC 1 -#define CONFIG_SMALL 0 -#define CONFIG_POSTPROC_VISUALIZER 0 -#define CONFIG_OS_SUPPORT 1 -#define CONFIG_UNIT_TESTS 1 -#define CONFIG_WEBM_IO 1 -#define CONFIG_LIBYUV 1 -#define CONFIG_DECODE_PERF_TESTS 0 -#define CONFIG_ENCODE_PERF_TESTS 0 -#define CONFIG_MULTI_RES_ENCODING 1 -#define CONFIG_TEMPORAL_DENOISING 1 -#define CONFIG_VP9_TEMPORAL_DENOISING 1 -#define CONFIG_COEFFICIENT_RANGE_CHECKING 0 -#define CONFIG_VP9_HIGHBITDEPTH 1 -#define CONFIG_BETTER_HW_COMPATIBILITY 0 -#define CONFIG_EXPERIMENTAL 0 -#define CONFIG_SIZE_LIMIT 1 -#define CONFIG_SPATIAL_SVC 0 -#define CONFIG_FP_MB_STATS 0 -#define CONFIG_EMULATE_HARDWARE 0 -#define CONFIG_MISC_FIXES 0 -#define DECODE_WIDTH_LIMIT 16384 -#define DECODE_HEIGHT_LIMIT 16384 -#endif /* VPX_CONFIG_H */ diff --git a/WebRtc.NET/include/third_party/libvpx/source/config/nacl/vpx_dsp_rtcd.h b/WebRtc.NET/include/third_party/libvpx/source/config/nacl/vpx_dsp_rtcd.h deleted file mode 100644 index f537568d..00000000 --- a/WebRtc.NET/include/third_party/libvpx/source/config/nacl/vpx_dsp_rtcd.h +++ /dev/null @@ -1,1650 +0,0 @@ -#ifndef VPX_DSP_RTCD_H_ -#define VPX_DSP_RTCD_H_ - -#ifdef RTCD_C -#define RTCD_EXTERN -#else -#define RTCD_EXTERN extern -#endif - -/* - * DSP - */ - -#include "vpx/vpx_integer.h" -#include "vpx_dsp/vpx_dsp_common.h" - - -#ifdef __cplusplus -extern "C" { -#endif - -unsigned int vpx_avg_4x4_c(const uint8_t *, int p); -#define vpx_avg_4x4 vpx_avg_4x4_c - -unsigned int vpx_avg_8x8_c(const uint8_t *, int p); -#define vpx_avg_8x8 vpx_avg_8x8_c - -void vpx_comp_avg_pred_c(uint8_t *comp_pred, const uint8_t *pred, int width, int height, const uint8_t *ref, int ref_stride); -#define vpx_comp_avg_pred vpx_comp_avg_pred_c - -void vpx_convolve8_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -#define vpx_convolve8 vpx_convolve8_c - -void vpx_convolve8_avg_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -#define vpx_convolve8_avg vpx_convolve8_avg_c - -void vpx_convolve8_avg_horiz_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -#define vpx_convolve8_avg_horiz vpx_convolve8_avg_horiz_c - -void vpx_convolve8_avg_vert_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -#define vpx_convolve8_avg_vert vpx_convolve8_avg_vert_c - -void vpx_convolve8_horiz_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -#define vpx_convolve8_horiz vpx_convolve8_horiz_c - -void vpx_convolve8_vert_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -#define vpx_convolve8_vert vpx_convolve8_vert_c - -void vpx_convolve_avg_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -#define vpx_convolve_avg vpx_convolve_avg_c - -void vpx_convolve_copy_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -#define vpx_convolve_copy vpx_convolve_copy_c - -void vpx_d117_predictor_16x16_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d117_predictor_16x16 vpx_d117_predictor_16x16_c - -void vpx_d117_predictor_32x32_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d117_predictor_32x32 vpx_d117_predictor_32x32_c - -void vpx_d117_predictor_4x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d117_predictor_4x4 vpx_d117_predictor_4x4_c - -void vpx_d117_predictor_8x8_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d117_predictor_8x8 vpx_d117_predictor_8x8_c - -void vpx_d135_predictor_16x16_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d135_predictor_16x16 vpx_d135_predictor_16x16_c - -void vpx_d135_predictor_32x32_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d135_predictor_32x32 vpx_d135_predictor_32x32_c - -void vpx_d135_predictor_4x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d135_predictor_4x4 vpx_d135_predictor_4x4_c - -void vpx_d135_predictor_8x8_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d135_predictor_8x8 vpx_d135_predictor_8x8_c - -void vpx_d153_predictor_16x16_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d153_predictor_16x16 vpx_d153_predictor_16x16_c - -void vpx_d153_predictor_32x32_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d153_predictor_32x32 vpx_d153_predictor_32x32_c - -void vpx_d153_predictor_4x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d153_predictor_4x4 vpx_d153_predictor_4x4_c - -void vpx_d153_predictor_8x8_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d153_predictor_8x8 vpx_d153_predictor_8x8_c - -void vpx_d207_predictor_16x16_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d207_predictor_16x16 vpx_d207_predictor_16x16_c - -void vpx_d207_predictor_32x32_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d207_predictor_32x32 vpx_d207_predictor_32x32_c - -void vpx_d207_predictor_4x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d207_predictor_4x4 vpx_d207_predictor_4x4_c - -void vpx_d207_predictor_8x8_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d207_predictor_8x8 vpx_d207_predictor_8x8_c - -void vpx_d207e_predictor_16x16_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d207e_predictor_16x16 vpx_d207e_predictor_16x16_c - -void vpx_d207e_predictor_32x32_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d207e_predictor_32x32 vpx_d207e_predictor_32x32_c - -void vpx_d207e_predictor_4x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d207e_predictor_4x4 vpx_d207e_predictor_4x4_c - -void vpx_d207e_predictor_8x8_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d207e_predictor_8x8 vpx_d207e_predictor_8x8_c - -void vpx_d45_predictor_16x16_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d45_predictor_16x16 vpx_d45_predictor_16x16_c - -void vpx_d45_predictor_32x32_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d45_predictor_32x32 vpx_d45_predictor_32x32_c - -void vpx_d45_predictor_4x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d45_predictor_4x4 vpx_d45_predictor_4x4_c - -void vpx_d45_predictor_8x8_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d45_predictor_8x8 vpx_d45_predictor_8x8_c - -void vpx_d45e_predictor_16x16_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d45e_predictor_16x16 vpx_d45e_predictor_16x16_c - -void vpx_d45e_predictor_32x32_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d45e_predictor_32x32 vpx_d45e_predictor_32x32_c - -void vpx_d45e_predictor_4x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d45e_predictor_4x4 vpx_d45e_predictor_4x4_c - -void vpx_d45e_predictor_8x8_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d45e_predictor_8x8 vpx_d45e_predictor_8x8_c - -void vpx_d63_predictor_16x16_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d63_predictor_16x16 vpx_d63_predictor_16x16_c - -void vpx_d63_predictor_32x32_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d63_predictor_32x32 vpx_d63_predictor_32x32_c - -void vpx_d63_predictor_4x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d63_predictor_4x4 vpx_d63_predictor_4x4_c - -void vpx_d63_predictor_8x8_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d63_predictor_8x8 vpx_d63_predictor_8x8_c - -void vpx_d63e_predictor_16x16_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d63e_predictor_16x16 vpx_d63e_predictor_16x16_c - -void vpx_d63e_predictor_32x32_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d63e_predictor_32x32 vpx_d63e_predictor_32x32_c - -void vpx_d63e_predictor_4x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d63e_predictor_4x4 vpx_d63e_predictor_4x4_c - -void vpx_d63e_predictor_8x8_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d63e_predictor_8x8 vpx_d63e_predictor_8x8_c - -void vpx_d63f_predictor_4x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d63f_predictor_4x4 vpx_d63f_predictor_4x4_c - -void vpx_dc_128_predictor_16x16_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_dc_128_predictor_16x16 vpx_dc_128_predictor_16x16_c - -void vpx_dc_128_predictor_32x32_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_dc_128_predictor_32x32 vpx_dc_128_predictor_32x32_c - -void vpx_dc_128_predictor_4x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_dc_128_predictor_4x4 vpx_dc_128_predictor_4x4_c - -void vpx_dc_128_predictor_8x8_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_dc_128_predictor_8x8 vpx_dc_128_predictor_8x8_c - -void vpx_dc_left_predictor_16x16_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_dc_left_predictor_16x16 vpx_dc_left_predictor_16x16_c - -void vpx_dc_left_predictor_32x32_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_dc_left_predictor_32x32 vpx_dc_left_predictor_32x32_c - -void vpx_dc_left_predictor_4x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_dc_left_predictor_4x4 vpx_dc_left_predictor_4x4_c - -void vpx_dc_left_predictor_8x8_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_dc_left_predictor_8x8 vpx_dc_left_predictor_8x8_c - -void vpx_dc_predictor_16x16_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_dc_predictor_16x16 vpx_dc_predictor_16x16_c - -void vpx_dc_predictor_32x32_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_dc_predictor_32x32 vpx_dc_predictor_32x32_c - -void vpx_dc_predictor_4x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_dc_predictor_4x4 vpx_dc_predictor_4x4_c - -void vpx_dc_predictor_8x8_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_dc_predictor_8x8 vpx_dc_predictor_8x8_c - -void vpx_dc_top_predictor_16x16_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_dc_top_predictor_16x16 vpx_dc_top_predictor_16x16_c - -void vpx_dc_top_predictor_32x32_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_dc_top_predictor_32x32 vpx_dc_top_predictor_32x32_c - -void vpx_dc_top_predictor_4x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_dc_top_predictor_4x4 vpx_dc_top_predictor_4x4_c - -void vpx_dc_top_predictor_8x8_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_dc_top_predictor_8x8 vpx_dc_top_predictor_8x8_c - -void vpx_fdct16x16_c(const int16_t *input, tran_low_t *output, int stride); -#define vpx_fdct16x16 vpx_fdct16x16_c - -void vpx_fdct16x16_1_c(const int16_t *input, tran_low_t *output, int stride); -#define vpx_fdct16x16_1 vpx_fdct16x16_1_c - -void vpx_fdct32x32_c(const int16_t *input, tran_low_t *output, int stride); -#define vpx_fdct32x32 vpx_fdct32x32_c - -void vpx_fdct32x32_1_c(const int16_t *input, tran_low_t *output, int stride); -#define vpx_fdct32x32_1 vpx_fdct32x32_1_c - -void vpx_fdct32x32_rd_c(const int16_t *input, tran_low_t *output, int stride); -#define vpx_fdct32x32_rd vpx_fdct32x32_rd_c - -void vpx_fdct4x4_c(const int16_t *input, tran_low_t *output, int stride); -#define vpx_fdct4x4 vpx_fdct4x4_c - -void vpx_fdct4x4_1_c(const int16_t *input, tran_low_t *output, int stride); -#define vpx_fdct4x4_1 vpx_fdct4x4_1_c - -void vpx_fdct8x8_c(const int16_t *input, tran_low_t *output, int stride); -#define vpx_fdct8x8 vpx_fdct8x8_c - -void vpx_fdct8x8_1_c(const int16_t *input, tran_low_t *output, int stride); -#define vpx_fdct8x8_1 vpx_fdct8x8_1_c - -void vpx_get16x16var_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse, int *sum); -#define vpx_get16x16var vpx_get16x16var_c - -unsigned int vpx_get4x4sse_cs_c(const unsigned char *src_ptr, int source_stride, const unsigned char *ref_ptr, int ref_stride); -#define vpx_get4x4sse_cs vpx_get4x4sse_cs_c - -void vpx_get8x8var_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse, int *sum); -#define vpx_get8x8var vpx_get8x8var_c - -unsigned int vpx_get_mb_ss_c(const int16_t *); -#define vpx_get_mb_ss vpx_get_mb_ss_c - -void vpx_h_predictor_16x16_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_h_predictor_16x16 vpx_h_predictor_16x16_c - -void vpx_h_predictor_32x32_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_h_predictor_32x32 vpx_h_predictor_32x32_c - -void vpx_h_predictor_4x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_h_predictor_4x4 vpx_h_predictor_4x4_c - -void vpx_h_predictor_8x8_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_h_predictor_8x8 vpx_h_predictor_8x8_c - -void vpx_hadamard_16x16_c(const int16_t *src_diff, int src_stride, int16_t *coeff); -#define vpx_hadamard_16x16 vpx_hadamard_16x16_c - -void vpx_hadamard_8x8_c(const int16_t *src_diff, int src_stride, int16_t *coeff); -#define vpx_hadamard_8x8 vpx_hadamard_8x8_c - -void vpx_he_predictor_4x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_he_predictor_4x4 vpx_he_predictor_4x4_c - -void vpx_highbd_10_get16x16var_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse, int *sum); -#define vpx_highbd_10_get16x16var vpx_highbd_10_get16x16var_c - -void vpx_highbd_10_get8x8var_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse, int *sum); -#define vpx_highbd_10_get8x8var vpx_highbd_10_get8x8var_c - -unsigned int vpx_highbd_10_mse16x16_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int recon_stride, unsigned int *sse); -#define vpx_highbd_10_mse16x16 vpx_highbd_10_mse16x16_c - -unsigned int vpx_highbd_10_mse16x8_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int recon_stride, unsigned int *sse); -#define vpx_highbd_10_mse16x8 vpx_highbd_10_mse16x8_c - -unsigned int vpx_highbd_10_mse8x16_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int recon_stride, unsigned int *sse); -#define vpx_highbd_10_mse8x16 vpx_highbd_10_mse8x16_c - -unsigned int vpx_highbd_10_mse8x8_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int recon_stride, unsigned int *sse); -#define vpx_highbd_10_mse8x8 vpx_highbd_10_mse8x8_c - -uint32_t vpx_highbd_10_sub_pixel_avg_variance16x16_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_highbd_10_sub_pixel_avg_variance16x16 vpx_highbd_10_sub_pixel_avg_variance16x16_c - -uint32_t vpx_highbd_10_sub_pixel_avg_variance16x32_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_highbd_10_sub_pixel_avg_variance16x32 vpx_highbd_10_sub_pixel_avg_variance16x32_c - -uint32_t vpx_highbd_10_sub_pixel_avg_variance16x8_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_highbd_10_sub_pixel_avg_variance16x8 vpx_highbd_10_sub_pixel_avg_variance16x8_c - -uint32_t vpx_highbd_10_sub_pixel_avg_variance32x16_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_highbd_10_sub_pixel_avg_variance32x16 vpx_highbd_10_sub_pixel_avg_variance32x16_c - -uint32_t vpx_highbd_10_sub_pixel_avg_variance32x32_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_highbd_10_sub_pixel_avg_variance32x32 vpx_highbd_10_sub_pixel_avg_variance32x32_c - -uint32_t vpx_highbd_10_sub_pixel_avg_variance32x64_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_highbd_10_sub_pixel_avg_variance32x64 vpx_highbd_10_sub_pixel_avg_variance32x64_c - -uint32_t vpx_highbd_10_sub_pixel_avg_variance4x4_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_highbd_10_sub_pixel_avg_variance4x4 vpx_highbd_10_sub_pixel_avg_variance4x4_c - -uint32_t vpx_highbd_10_sub_pixel_avg_variance4x8_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_highbd_10_sub_pixel_avg_variance4x8 vpx_highbd_10_sub_pixel_avg_variance4x8_c - -uint32_t vpx_highbd_10_sub_pixel_avg_variance64x32_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_highbd_10_sub_pixel_avg_variance64x32 vpx_highbd_10_sub_pixel_avg_variance64x32_c - -uint32_t vpx_highbd_10_sub_pixel_avg_variance64x64_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_highbd_10_sub_pixel_avg_variance64x64 vpx_highbd_10_sub_pixel_avg_variance64x64_c - -uint32_t vpx_highbd_10_sub_pixel_avg_variance8x16_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_highbd_10_sub_pixel_avg_variance8x16 vpx_highbd_10_sub_pixel_avg_variance8x16_c - -uint32_t vpx_highbd_10_sub_pixel_avg_variance8x4_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_highbd_10_sub_pixel_avg_variance8x4 vpx_highbd_10_sub_pixel_avg_variance8x4_c - -uint32_t vpx_highbd_10_sub_pixel_avg_variance8x8_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_highbd_10_sub_pixel_avg_variance8x8 vpx_highbd_10_sub_pixel_avg_variance8x8_c - -uint32_t vpx_highbd_10_sub_pixel_variance16x16_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -#define vpx_highbd_10_sub_pixel_variance16x16 vpx_highbd_10_sub_pixel_variance16x16_c - -uint32_t vpx_highbd_10_sub_pixel_variance16x32_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -#define vpx_highbd_10_sub_pixel_variance16x32 vpx_highbd_10_sub_pixel_variance16x32_c - -uint32_t vpx_highbd_10_sub_pixel_variance16x8_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -#define vpx_highbd_10_sub_pixel_variance16x8 vpx_highbd_10_sub_pixel_variance16x8_c - -uint32_t vpx_highbd_10_sub_pixel_variance32x16_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -#define vpx_highbd_10_sub_pixel_variance32x16 vpx_highbd_10_sub_pixel_variance32x16_c - -uint32_t vpx_highbd_10_sub_pixel_variance32x32_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -#define vpx_highbd_10_sub_pixel_variance32x32 vpx_highbd_10_sub_pixel_variance32x32_c - -uint32_t vpx_highbd_10_sub_pixel_variance32x64_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -#define vpx_highbd_10_sub_pixel_variance32x64 vpx_highbd_10_sub_pixel_variance32x64_c - -uint32_t vpx_highbd_10_sub_pixel_variance4x4_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -#define vpx_highbd_10_sub_pixel_variance4x4 vpx_highbd_10_sub_pixel_variance4x4_c - -uint32_t vpx_highbd_10_sub_pixel_variance4x8_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -#define vpx_highbd_10_sub_pixel_variance4x8 vpx_highbd_10_sub_pixel_variance4x8_c - -uint32_t vpx_highbd_10_sub_pixel_variance64x32_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -#define vpx_highbd_10_sub_pixel_variance64x32 vpx_highbd_10_sub_pixel_variance64x32_c - -uint32_t vpx_highbd_10_sub_pixel_variance64x64_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -#define vpx_highbd_10_sub_pixel_variance64x64 vpx_highbd_10_sub_pixel_variance64x64_c - -uint32_t vpx_highbd_10_sub_pixel_variance8x16_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -#define vpx_highbd_10_sub_pixel_variance8x16 vpx_highbd_10_sub_pixel_variance8x16_c - -uint32_t vpx_highbd_10_sub_pixel_variance8x4_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -#define vpx_highbd_10_sub_pixel_variance8x4 vpx_highbd_10_sub_pixel_variance8x4_c - -uint32_t vpx_highbd_10_sub_pixel_variance8x8_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -#define vpx_highbd_10_sub_pixel_variance8x8 vpx_highbd_10_sub_pixel_variance8x8_c - -unsigned int vpx_highbd_10_variance16x16_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_highbd_10_variance16x16 vpx_highbd_10_variance16x16_c - -unsigned int vpx_highbd_10_variance16x32_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_highbd_10_variance16x32 vpx_highbd_10_variance16x32_c - -unsigned int vpx_highbd_10_variance16x8_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_highbd_10_variance16x8 vpx_highbd_10_variance16x8_c - -unsigned int vpx_highbd_10_variance32x16_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_highbd_10_variance32x16 vpx_highbd_10_variance32x16_c - -unsigned int vpx_highbd_10_variance32x32_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_highbd_10_variance32x32 vpx_highbd_10_variance32x32_c - -unsigned int vpx_highbd_10_variance32x64_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_highbd_10_variance32x64 vpx_highbd_10_variance32x64_c - -unsigned int vpx_highbd_10_variance4x4_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_highbd_10_variance4x4 vpx_highbd_10_variance4x4_c - -unsigned int vpx_highbd_10_variance4x8_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_highbd_10_variance4x8 vpx_highbd_10_variance4x8_c - -unsigned int vpx_highbd_10_variance64x32_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_highbd_10_variance64x32 vpx_highbd_10_variance64x32_c - -unsigned int vpx_highbd_10_variance64x64_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_highbd_10_variance64x64 vpx_highbd_10_variance64x64_c - -unsigned int vpx_highbd_10_variance8x16_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_highbd_10_variance8x16 vpx_highbd_10_variance8x16_c - -unsigned int vpx_highbd_10_variance8x4_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_highbd_10_variance8x4 vpx_highbd_10_variance8x4_c - -unsigned int vpx_highbd_10_variance8x8_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_highbd_10_variance8x8 vpx_highbd_10_variance8x8_c - -void vpx_highbd_12_get16x16var_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse, int *sum); -#define vpx_highbd_12_get16x16var vpx_highbd_12_get16x16var_c - -void vpx_highbd_12_get8x8var_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse, int *sum); -#define vpx_highbd_12_get8x8var vpx_highbd_12_get8x8var_c - -unsigned int vpx_highbd_12_mse16x16_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int recon_stride, unsigned int *sse); -#define vpx_highbd_12_mse16x16 vpx_highbd_12_mse16x16_c - -unsigned int vpx_highbd_12_mse16x8_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int recon_stride, unsigned int *sse); -#define vpx_highbd_12_mse16x8 vpx_highbd_12_mse16x8_c - -unsigned int vpx_highbd_12_mse8x16_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int recon_stride, unsigned int *sse); -#define vpx_highbd_12_mse8x16 vpx_highbd_12_mse8x16_c - -unsigned int vpx_highbd_12_mse8x8_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int recon_stride, unsigned int *sse); -#define vpx_highbd_12_mse8x8 vpx_highbd_12_mse8x8_c - -uint32_t vpx_highbd_12_sub_pixel_avg_variance16x16_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_highbd_12_sub_pixel_avg_variance16x16 vpx_highbd_12_sub_pixel_avg_variance16x16_c - -uint32_t vpx_highbd_12_sub_pixel_avg_variance16x32_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_highbd_12_sub_pixel_avg_variance16x32 vpx_highbd_12_sub_pixel_avg_variance16x32_c - -uint32_t vpx_highbd_12_sub_pixel_avg_variance16x8_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_highbd_12_sub_pixel_avg_variance16x8 vpx_highbd_12_sub_pixel_avg_variance16x8_c - -uint32_t vpx_highbd_12_sub_pixel_avg_variance32x16_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_highbd_12_sub_pixel_avg_variance32x16 vpx_highbd_12_sub_pixel_avg_variance32x16_c - -uint32_t vpx_highbd_12_sub_pixel_avg_variance32x32_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_highbd_12_sub_pixel_avg_variance32x32 vpx_highbd_12_sub_pixel_avg_variance32x32_c - -uint32_t vpx_highbd_12_sub_pixel_avg_variance32x64_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_highbd_12_sub_pixel_avg_variance32x64 vpx_highbd_12_sub_pixel_avg_variance32x64_c - -uint32_t vpx_highbd_12_sub_pixel_avg_variance4x4_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_highbd_12_sub_pixel_avg_variance4x4 vpx_highbd_12_sub_pixel_avg_variance4x4_c - -uint32_t vpx_highbd_12_sub_pixel_avg_variance4x8_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_highbd_12_sub_pixel_avg_variance4x8 vpx_highbd_12_sub_pixel_avg_variance4x8_c - -uint32_t vpx_highbd_12_sub_pixel_avg_variance64x32_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_highbd_12_sub_pixel_avg_variance64x32 vpx_highbd_12_sub_pixel_avg_variance64x32_c - -uint32_t vpx_highbd_12_sub_pixel_avg_variance64x64_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_highbd_12_sub_pixel_avg_variance64x64 vpx_highbd_12_sub_pixel_avg_variance64x64_c - -uint32_t vpx_highbd_12_sub_pixel_avg_variance8x16_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_highbd_12_sub_pixel_avg_variance8x16 vpx_highbd_12_sub_pixel_avg_variance8x16_c - -uint32_t vpx_highbd_12_sub_pixel_avg_variance8x4_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_highbd_12_sub_pixel_avg_variance8x4 vpx_highbd_12_sub_pixel_avg_variance8x4_c - -uint32_t vpx_highbd_12_sub_pixel_avg_variance8x8_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_highbd_12_sub_pixel_avg_variance8x8 vpx_highbd_12_sub_pixel_avg_variance8x8_c - -uint32_t vpx_highbd_12_sub_pixel_variance16x16_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -#define vpx_highbd_12_sub_pixel_variance16x16 vpx_highbd_12_sub_pixel_variance16x16_c - -uint32_t vpx_highbd_12_sub_pixel_variance16x32_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -#define vpx_highbd_12_sub_pixel_variance16x32 vpx_highbd_12_sub_pixel_variance16x32_c - -uint32_t vpx_highbd_12_sub_pixel_variance16x8_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -#define vpx_highbd_12_sub_pixel_variance16x8 vpx_highbd_12_sub_pixel_variance16x8_c - -uint32_t vpx_highbd_12_sub_pixel_variance32x16_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -#define vpx_highbd_12_sub_pixel_variance32x16 vpx_highbd_12_sub_pixel_variance32x16_c - -uint32_t vpx_highbd_12_sub_pixel_variance32x32_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -#define vpx_highbd_12_sub_pixel_variance32x32 vpx_highbd_12_sub_pixel_variance32x32_c - -uint32_t vpx_highbd_12_sub_pixel_variance32x64_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -#define vpx_highbd_12_sub_pixel_variance32x64 vpx_highbd_12_sub_pixel_variance32x64_c - -uint32_t vpx_highbd_12_sub_pixel_variance4x4_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -#define vpx_highbd_12_sub_pixel_variance4x4 vpx_highbd_12_sub_pixel_variance4x4_c - -uint32_t vpx_highbd_12_sub_pixel_variance4x8_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -#define vpx_highbd_12_sub_pixel_variance4x8 vpx_highbd_12_sub_pixel_variance4x8_c - -uint32_t vpx_highbd_12_sub_pixel_variance64x32_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -#define vpx_highbd_12_sub_pixel_variance64x32 vpx_highbd_12_sub_pixel_variance64x32_c - -uint32_t vpx_highbd_12_sub_pixel_variance64x64_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -#define vpx_highbd_12_sub_pixel_variance64x64 vpx_highbd_12_sub_pixel_variance64x64_c - -uint32_t vpx_highbd_12_sub_pixel_variance8x16_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -#define vpx_highbd_12_sub_pixel_variance8x16 vpx_highbd_12_sub_pixel_variance8x16_c - -uint32_t vpx_highbd_12_sub_pixel_variance8x4_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -#define vpx_highbd_12_sub_pixel_variance8x4 vpx_highbd_12_sub_pixel_variance8x4_c - -uint32_t vpx_highbd_12_sub_pixel_variance8x8_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -#define vpx_highbd_12_sub_pixel_variance8x8 vpx_highbd_12_sub_pixel_variance8x8_c - -unsigned int vpx_highbd_12_variance16x16_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_highbd_12_variance16x16 vpx_highbd_12_variance16x16_c - -unsigned int vpx_highbd_12_variance16x32_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_highbd_12_variance16x32 vpx_highbd_12_variance16x32_c - -unsigned int vpx_highbd_12_variance16x8_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_highbd_12_variance16x8 vpx_highbd_12_variance16x8_c - -unsigned int vpx_highbd_12_variance32x16_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_highbd_12_variance32x16 vpx_highbd_12_variance32x16_c - -unsigned int vpx_highbd_12_variance32x32_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_highbd_12_variance32x32 vpx_highbd_12_variance32x32_c - -unsigned int vpx_highbd_12_variance32x64_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_highbd_12_variance32x64 vpx_highbd_12_variance32x64_c - -unsigned int vpx_highbd_12_variance4x4_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_highbd_12_variance4x4 vpx_highbd_12_variance4x4_c - -unsigned int vpx_highbd_12_variance4x8_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_highbd_12_variance4x8 vpx_highbd_12_variance4x8_c - -unsigned int vpx_highbd_12_variance64x32_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_highbd_12_variance64x32 vpx_highbd_12_variance64x32_c - -unsigned int vpx_highbd_12_variance64x64_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_highbd_12_variance64x64 vpx_highbd_12_variance64x64_c - -unsigned int vpx_highbd_12_variance8x16_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_highbd_12_variance8x16 vpx_highbd_12_variance8x16_c - -unsigned int vpx_highbd_12_variance8x4_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_highbd_12_variance8x4 vpx_highbd_12_variance8x4_c - -unsigned int vpx_highbd_12_variance8x8_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_highbd_12_variance8x8 vpx_highbd_12_variance8x8_c - -void vpx_highbd_8_get16x16var_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse, int *sum); -#define vpx_highbd_8_get16x16var vpx_highbd_8_get16x16var_c - -void vpx_highbd_8_get8x8var_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse, int *sum); -#define vpx_highbd_8_get8x8var vpx_highbd_8_get8x8var_c - -unsigned int vpx_highbd_8_mse16x16_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int recon_stride, unsigned int *sse); -#define vpx_highbd_8_mse16x16 vpx_highbd_8_mse16x16_c - -unsigned int vpx_highbd_8_mse16x8_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int recon_stride, unsigned int *sse); -#define vpx_highbd_8_mse16x8 vpx_highbd_8_mse16x8_c - -unsigned int vpx_highbd_8_mse8x16_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int recon_stride, unsigned int *sse); -#define vpx_highbd_8_mse8x16 vpx_highbd_8_mse8x16_c - -unsigned int vpx_highbd_8_mse8x8_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int recon_stride, unsigned int *sse); -#define vpx_highbd_8_mse8x8 vpx_highbd_8_mse8x8_c - -uint32_t vpx_highbd_8_sub_pixel_avg_variance16x16_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_highbd_8_sub_pixel_avg_variance16x16 vpx_highbd_8_sub_pixel_avg_variance16x16_c - -uint32_t vpx_highbd_8_sub_pixel_avg_variance16x32_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_highbd_8_sub_pixel_avg_variance16x32 vpx_highbd_8_sub_pixel_avg_variance16x32_c - -uint32_t vpx_highbd_8_sub_pixel_avg_variance16x8_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_highbd_8_sub_pixel_avg_variance16x8 vpx_highbd_8_sub_pixel_avg_variance16x8_c - -uint32_t vpx_highbd_8_sub_pixel_avg_variance32x16_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_highbd_8_sub_pixel_avg_variance32x16 vpx_highbd_8_sub_pixel_avg_variance32x16_c - -uint32_t vpx_highbd_8_sub_pixel_avg_variance32x32_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_highbd_8_sub_pixel_avg_variance32x32 vpx_highbd_8_sub_pixel_avg_variance32x32_c - -uint32_t vpx_highbd_8_sub_pixel_avg_variance32x64_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_highbd_8_sub_pixel_avg_variance32x64 vpx_highbd_8_sub_pixel_avg_variance32x64_c - -uint32_t vpx_highbd_8_sub_pixel_avg_variance4x4_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_highbd_8_sub_pixel_avg_variance4x4 vpx_highbd_8_sub_pixel_avg_variance4x4_c - -uint32_t vpx_highbd_8_sub_pixel_avg_variance4x8_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_highbd_8_sub_pixel_avg_variance4x8 vpx_highbd_8_sub_pixel_avg_variance4x8_c - -uint32_t vpx_highbd_8_sub_pixel_avg_variance64x32_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_highbd_8_sub_pixel_avg_variance64x32 vpx_highbd_8_sub_pixel_avg_variance64x32_c - -uint32_t vpx_highbd_8_sub_pixel_avg_variance64x64_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_highbd_8_sub_pixel_avg_variance64x64 vpx_highbd_8_sub_pixel_avg_variance64x64_c - -uint32_t vpx_highbd_8_sub_pixel_avg_variance8x16_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_highbd_8_sub_pixel_avg_variance8x16 vpx_highbd_8_sub_pixel_avg_variance8x16_c - -uint32_t vpx_highbd_8_sub_pixel_avg_variance8x4_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_highbd_8_sub_pixel_avg_variance8x4 vpx_highbd_8_sub_pixel_avg_variance8x4_c - -uint32_t vpx_highbd_8_sub_pixel_avg_variance8x8_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_highbd_8_sub_pixel_avg_variance8x8 vpx_highbd_8_sub_pixel_avg_variance8x8_c - -uint32_t vpx_highbd_8_sub_pixel_variance16x16_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -#define vpx_highbd_8_sub_pixel_variance16x16 vpx_highbd_8_sub_pixel_variance16x16_c - -uint32_t vpx_highbd_8_sub_pixel_variance16x32_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -#define vpx_highbd_8_sub_pixel_variance16x32 vpx_highbd_8_sub_pixel_variance16x32_c - -uint32_t vpx_highbd_8_sub_pixel_variance16x8_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -#define vpx_highbd_8_sub_pixel_variance16x8 vpx_highbd_8_sub_pixel_variance16x8_c - -uint32_t vpx_highbd_8_sub_pixel_variance32x16_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -#define vpx_highbd_8_sub_pixel_variance32x16 vpx_highbd_8_sub_pixel_variance32x16_c - -uint32_t vpx_highbd_8_sub_pixel_variance32x32_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -#define vpx_highbd_8_sub_pixel_variance32x32 vpx_highbd_8_sub_pixel_variance32x32_c - -uint32_t vpx_highbd_8_sub_pixel_variance32x64_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -#define vpx_highbd_8_sub_pixel_variance32x64 vpx_highbd_8_sub_pixel_variance32x64_c - -uint32_t vpx_highbd_8_sub_pixel_variance4x4_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -#define vpx_highbd_8_sub_pixel_variance4x4 vpx_highbd_8_sub_pixel_variance4x4_c - -uint32_t vpx_highbd_8_sub_pixel_variance4x8_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -#define vpx_highbd_8_sub_pixel_variance4x8 vpx_highbd_8_sub_pixel_variance4x8_c - -uint32_t vpx_highbd_8_sub_pixel_variance64x32_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -#define vpx_highbd_8_sub_pixel_variance64x32 vpx_highbd_8_sub_pixel_variance64x32_c - -uint32_t vpx_highbd_8_sub_pixel_variance64x64_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -#define vpx_highbd_8_sub_pixel_variance64x64 vpx_highbd_8_sub_pixel_variance64x64_c - -uint32_t vpx_highbd_8_sub_pixel_variance8x16_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -#define vpx_highbd_8_sub_pixel_variance8x16 vpx_highbd_8_sub_pixel_variance8x16_c - -uint32_t vpx_highbd_8_sub_pixel_variance8x4_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -#define vpx_highbd_8_sub_pixel_variance8x4 vpx_highbd_8_sub_pixel_variance8x4_c - -uint32_t vpx_highbd_8_sub_pixel_variance8x8_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -#define vpx_highbd_8_sub_pixel_variance8x8 vpx_highbd_8_sub_pixel_variance8x8_c - -unsigned int vpx_highbd_8_variance16x16_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_highbd_8_variance16x16 vpx_highbd_8_variance16x16_c - -unsigned int vpx_highbd_8_variance16x32_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_highbd_8_variance16x32 vpx_highbd_8_variance16x32_c - -unsigned int vpx_highbd_8_variance16x8_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_highbd_8_variance16x8 vpx_highbd_8_variance16x8_c - -unsigned int vpx_highbd_8_variance32x16_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_highbd_8_variance32x16 vpx_highbd_8_variance32x16_c - -unsigned int vpx_highbd_8_variance32x32_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_highbd_8_variance32x32 vpx_highbd_8_variance32x32_c - -unsigned int vpx_highbd_8_variance32x64_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_highbd_8_variance32x64 vpx_highbd_8_variance32x64_c - -unsigned int vpx_highbd_8_variance4x4_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_highbd_8_variance4x4 vpx_highbd_8_variance4x4_c - -unsigned int vpx_highbd_8_variance4x8_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_highbd_8_variance4x8 vpx_highbd_8_variance4x8_c - -unsigned int vpx_highbd_8_variance64x32_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_highbd_8_variance64x32 vpx_highbd_8_variance64x32_c - -unsigned int vpx_highbd_8_variance64x64_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_highbd_8_variance64x64 vpx_highbd_8_variance64x64_c - -unsigned int vpx_highbd_8_variance8x16_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_highbd_8_variance8x16 vpx_highbd_8_variance8x16_c - -unsigned int vpx_highbd_8_variance8x4_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_highbd_8_variance8x4 vpx_highbd_8_variance8x4_c - -unsigned int vpx_highbd_8_variance8x8_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_highbd_8_variance8x8 vpx_highbd_8_variance8x8_c - -unsigned int vpx_highbd_avg_4x4_c(const uint8_t *, int p); -#define vpx_highbd_avg_4x4 vpx_highbd_avg_4x4_c - -unsigned int vpx_highbd_avg_8x8_c(const uint8_t *, int p); -#define vpx_highbd_avg_8x8 vpx_highbd_avg_8x8_c - -void vpx_highbd_comp_avg_pred_c(uint16_t *comp_pred, const uint8_t *pred8, int width, int height, const uint8_t *ref8, int ref_stride); -#define vpx_highbd_comp_avg_pred vpx_highbd_comp_avg_pred_c - -void vpx_highbd_convolve8_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h, int bps); -#define vpx_highbd_convolve8 vpx_highbd_convolve8_c - -void vpx_highbd_convolve8_avg_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h, int bps); -#define vpx_highbd_convolve8_avg vpx_highbd_convolve8_avg_c - -void vpx_highbd_convolve8_avg_horiz_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h, int bps); -#define vpx_highbd_convolve8_avg_horiz vpx_highbd_convolve8_avg_horiz_c - -void vpx_highbd_convolve8_avg_vert_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h, int bps); -#define vpx_highbd_convolve8_avg_vert vpx_highbd_convolve8_avg_vert_c - -void vpx_highbd_convolve8_horiz_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h, int bps); -#define vpx_highbd_convolve8_horiz vpx_highbd_convolve8_horiz_c - -void vpx_highbd_convolve8_vert_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h, int bps); -#define vpx_highbd_convolve8_vert vpx_highbd_convolve8_vert_c - -void vpx_highbd_convolve_avg_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h, int bps); -#define vpx_highbd_convolve_avg vpx_highbd_convolve_avg_c - -void vpx_highbd_convolve_copy_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h, int bps); -#define vpx_highbd_convolve_copy vpx_highbd_convolve_copy_c - -void vpx_highbd_d117_predictor_16x16_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_d117_predictor_16x16 vpx_highbd_d117_predictor_16x16_c - -void vpx_highbd_d117_predictor_32x32_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_d117_predictor_32x32 vpx_highbd_d117_predictor_32x32_c - -void vpx_highbd_d117_predictor_4x4_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_d117_predictor_4x4 vpx_highbd_d117_predictor_4x4_c - -void vpx_highbd_d117_predictor_8x8_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_d117_predictor_8x8 vpx_highbd_d117_predictor_8x8_c - -void vpx_highbd_d135_predictor_16x16_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_d135_predictor_16x16 vpx_highbd_d135_predictor_16x16_c - -void vpx_highbd_d135_predictor_32x32_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_d135_predictor_32x32 vpx_highbd_d135_predictor_32x32_c - -void vpx_highbd_d135_predictor_4x4_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_d135_predictor_4x4 vpx_highbd_d135_predictor_4x4_c - -void vpx_highbd_d135_predictor_8x8_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_d135_predictor_8x8 vpx_highbd_d135_predictor_8x8_c - -void vpx_highbd_d153_predictor_16x16_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_d153_predictor_16x16 vpx_highbd_d153_predictor_16x16_c - -void vpx_highbd_d153_predictor_32x32_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_d153_predictor_32x32 vpx_highbd_d153_predictor_32x32_c - -void vpx_highbd_d153_predictor_4x4_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_d153_predictor_4x4 vpx_highbd_d153_predictor_4x4_c - -void vpx_highbd_d153_predictor_8x8_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_d153_predictor_8x8 vpx_highbd_d153_predictor_8x8_c - -void vpx_highbd_d207_predictor_16x16_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_d207_predictor_16x16 vpx_highbd_d207_predictor_16x16_c - -void vpx_highbd_d207_predictor_32x32_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_d207_predictor_32x32 vpx_highbd_d207_predictor_32x32_c - -void vpx_highbd_d207_predictor_4x4_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_d207_predictor_4x4 vpx_highbd_d207_predictor_4x4_c - -void vpx_highbd_d207_predictor_8x8_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_d207_predictor_8x8 vpx_highbd_d207_predictor_8x8_c - -void vpx_highbd_d207e_predictor_16x16_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_d207e_predictor_16x16 vpx_highbd_d207e_predictor_16x16_c - -void vpx_highbd_d207e_predictor_32x32_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_d207e_predictor_32x32 vpx_highbd_d207e_predictor_32x32_c - -void vpx_highbd_d207e_predictor_4x4_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_d207e_predictor_4x4 vpx_highbd_d207e_predictor_4x4_c - -void vpx_highbd_d207e_predictor_8x8_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_d207e_predictor_8x8 vpx_highbd_d207e_predictor_8x8_c - -void vpx_highbd_d45_predictor_16x16_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_d45_predictor_16x16 vpx_highbd_d45_predictor_16x16_c - -void vpx_highbd_d45_predictor_32x32_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_d45_predictor_32x32 vpx_highbd_d45_predictor_32x32_c - -void vpx_highbd_d45_predictor_4x4_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_d45_predictor_4x4 vpx_highbd_d45_predictor_4x4_c - -void vpx_highbd_d45_predictor_8x8_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_d45_predictor_8x8 vpx_highbd_d45_predictor_8x8_c - -void vpx_highbd_d45e_predictor_16x16_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_d45e_predictor_16x16 vpx_highbd_d45e_predictor_16x16_c - -void vpx_highbd_d45e_predictor_32x32_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_d45e_predictor_32x32 vpx_highbd_d45e_predictor_32x32_c - -void vpx_highbd_d45e_predictor_4x4_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_d45e_predictor_4x4 vpx_highbd_d45e_predictor_4x4_c - -void vpx_highbd_d45e_predictor_8x8_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_d45e_predictor_8x8 vpx_highbd_d45e_predictor_8x8_c - -void vpx_highbd_d63_predictor_16x16_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_d63_predictor_16x16 vpx_highbd_d63_predictor_16x16_c - -void vpx_highbd_d63_predictor_32x32_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_d63_predictor_32x32 vpx_highbd_d63_predictor_32x32_c - -void vpx_highbd_d63_predictor_4x4_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_d63_predictor_4x4 vpx_highbd_d63_predictor_4x4_c - -void vpx_highbd_d63_predictor_8x8_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_d63_predictor_8x8 vpx_highbd_d63_predictor_8x8_c - -void vpx_highbd_d63e_predictor_16x16_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_d63e_predictor_16x16 vpx_highbd_d63e_predictor_16x16_c - -void vpx_highbd_d63e_predictor_32x32_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_d63e_predictor_32x32 vpx_highbd_d63e_predictor_32x32_c - -void vpx_highbd_d63e_predictor_4x4_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_d63e_predictor_4x4 vpx_highbd_d63e_predictor_4x4_c - -void vpx_highbd_d63e_predictor_8x8_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_d63e_predictor_8x8 vpx_highbd_d63e_predictor_8x8_c - -void vpx_highbd_dc_128_predictor_16x16_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_dc_128_predictor_16x16 vpx_highbd_dc_128_predictor_16x16_c - -void vpx_highbd_dc_128_predictor_32x32_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_dc_128_predictor_32x32 vpx_highbd_dc_128_predictor_32x32_c - -void vpx_highbd_dc_128_predictor_4x4_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_dc_128_predictor_4x4 vpx_highbd_dc_128_predictor_4x4_c - -void vpx_highbd_dc_128_predictor_8x8_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_dc_128_predictor_8x8 vpx_highbd_dc_128_predictor_8x8_c - -void vpx_highbd_dc_left_predictor_16x16_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_dc_left_predictor_16x16 vpx_highbd_dc_left_predictor_16x16_c - -void vpx_highbd_dc_left_predictor_32x32_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_dc_left_predictor_32x32 vpx_highbd_dc_left_predictor_32x32_c - -void vpx_highbd_dc_left_predictor_4x4_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_dc_left_predictor_4x4 vpx_highbd_dc_left_predictor_4x4_c - -void vpx_highbd_dc_left_predictor_8x8_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_dc_left_predictor_8x8 vpx_highbd_dc_left_predictor_8x8_c - -void vpx_highbd_dc_predictor_16x16_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_dc_predictor_16x16 vpx_highbd_dc_predictor_16x16_c - -void vpx_highbd_dc_predictor_32x32_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_dc_predictor_32x32 vpx_highbd_dc_predictor_32x32_c - -void vpx_highbd_dc_predictor_4x4_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_dc_predictor_4x4 vpx_highbd_dc_predictor_4x4_c - -void vpx_highbd_dc_predictor_8x8_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_dc_predictor_8x8 vpx_highbd_dc_predictor_8x8_c - -void vpx_highbd_dc_top_predictor_16x16_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_dc_top_predictor_16x16 vpx_highbd_dc_top_predictor_16x16_c - -void vpx_highbd_dc_top_predictor_32x32_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_dc_top_predictor_32x32 vpx_highbd_dc_top_predictor_32x32_c - -void vpx_highbd_dc_top_predictor_4x4_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_dc_top_predictor_4x4 vpx_highbd_dc_top_predictor_4x4_c - -void vpx_highbd_dc_top_predictor_8x8_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_dc_top_predictor_8x8 vpx_highbd_dc_top_predictor_8x8_c - -void vpx_highbd_fdct16x16_c(const int16_t *input, tran_low_t *output, int stride); -#define vpx_highbd_fdct16x16 vpx_highbd_fdct16x16_c - -void vpx_highbd_fdct16x16_1_c(const int16_t *input, tran_low_t *output, int stride); -#define vpx_highbd_fdct16x16_1 vpx_highbd_fdct16x16_1_c - -void vpx_highbd_fdct32x32_c(const int16_t *input, tran_low_t *output, int stride); -#define vpx_highbd_fdct32x32 vpx_highbd_fdct32x32_c - -void vpx_highbd_fdct32x32_1_c(const int16_t *input, tran_low_t *output, int stride); -#define vpx_highbd_fdct32x32_1 vpx_highbd_fdct32x32_1_c - -void vpx_highbd_fdct32x32_rd_c(const int16_t *input, tran_low_t *output, int stride); -#define vpx_highbd_fdct32x32_rd vpx_highbd_fdct32x32_rd_c - -void vpx_highbd_fdct4x4_c(const int16_t *input, tran_low_t *output, int stride); -#define vpx_highbd_fdct4x4 vpx_highbd_fdct4x4_c - -void vpx_highbd_fdct8x8_c(const int16_t *input, tran_low_t *output, int stride); -#define vpx_highbd_fdct8x8 vpx_highbd_fdct8x8_c - -void vpx_highbd_fdct8x8_1_c(const int16_t *input, tran_low_t *output, int stride); -#define vpx_highbd_fdct8x8_1 vpx_highbd_fdct8x8_1_c - -void vpx_highbd_h_predictor_16x16_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_h_predictor_16x16 vpx_highbd_h_predictor_16x16_c - -void vpx_highbd_h_predictor_32x32_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_h_predictor_32x32 vpx_highbd_h_predictor_32x32_c - -void vpx_highbd_h_predictor_4x4_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_h_predictor_4x4 vpx_highbd_h_predictor_4x4_c - -void vpx_highbd_h_predictor_8x8_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_h_predictor_8x8 vpx_highbd_h_predictor_8x8_c - -void vpx_highbd_idct16x16_10_add_c(const tran_low_t *input, uint8_t *dest, int stride, int bd); -#define vpx_highbd_idct16x16_10_add vpx_highbd_idct16x16_10_add_c - -void vpx_highbd_idct16x16_1_add_c(const tran_low_t *input, uint8_t *dest, int stride, int bd); -#define vpx_highbd_idct16x16_1_add vpx_highbd_idct16x16_1_add_c - -void vpx_highbd_idct16x16_256_add_c(const tran_low_t *input, uint8_t *dest, int stride, int bd); -#define vpx_highbd_idct16x16_256_add vpx_highbd_idct16x16_256_add_c - -void vpx_highbd_idct32x32_1024_add_c(const tran_low_t *input, uint8_t *dest, int stride, int bd); -#define vpx_highbd_idct32x32_1024_add vpx_highbd_idct32x32_1024_add_c - -void vpx_highbd_idct32x32_1_add_c(const tran_low_t *input, uint8_t *dest, int stride, int bd); -#define vpx_highbd_idct32x32_1_add vpx_highbd_idct32x32_1_add_c - -void vpx_highbd_idct32x32_34_add_c(const tran_low_t *input, uint8_t *dest, int stride, int bd); -#define vpx_highbd_idct32x32_34_add vpx_highbd_idct32x32_34_add_c - -void vpx_highbd_idct4x4_16_add_c(const tran_low_t *input, uint8_t *dest, int stride, int bd); -#define vpx_highbd_idct4x4_16_add vpx_highbd_idct4x4_16_add_c - -void vpx_highbd_idct4x4_1_add_c(const tran_low_t *input, uint8_t *dest, int stride, int bd); -#define vpx_highbd_idct4x4_1_add vpx_highbd_idct4x4_1_add_c - -void vpx_highbd_idct8x8_12_add_c(const tran_low_t *input, uint8_t *dest, int stride, int bd); -#define vpx_highbd_idct8x8_12_add vpx_highbd_idct8x8_12_add_c - -void vpx_highbd_idct8x8_1_add_c(const tran_low_t *input, uint8_t *dest, int stride, int bd); -#define vpx_highbd_idct8x8_1_add vpx_highbd_idct8x8_1_add_c - -void vpx_highbd_idct8x8_64_add_c(const tran_low_t *input, uint8_t *dest, int stride, int bd); -#define vpx_highbd_idct8x8_64_add vpx_highbd_idct8x8_64_add_c - -void vpx_highbd_iwht4x4_16_add_c(const tran_low_t *input, uint8_t *dest, int stride, int bd); -#define vpx_highbd_iwht4x4_16_add vpx_highbd_iwht4x4_16_add_c - -void vpx_highbd_iwht4x4_1_add_c(const tran_low_t *input, uint8_t *dest, int stride, int bd); -#define vpx_highbd_iwht4x4_1_add vpx_highbd_iwht4x4_1_add_c - -void vpx_highbd_lpf_horizontal_16_c(uint16_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh, int bd); -#define vpx_highbd_lpf_horizontal_16 vpx_highbd_lpf_horizontal_16_c - -void vpx_highbd_lpf_horizontal_16_dual_c(uint16_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh, int bd); -#define vpx_highbd_lpf_horizontal_16_dual vpx_highbd_lpf_horizontal_16_dual_c - -void vpx_highbd_lpf_horizontal_4_c(uint16_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh, int bd); -#define vpx_highbd_lpf_horizontal_4 vpx_highbd_lpf_horizontal_4_c - -void vpx_highbd_lpf_horizontal_4_dual_c(uint16_t *s, int pitch, const uint8_t *blimit0, const uint8_t *limit0, const uint8_t *thresh0, const uint8_t *blimit1, const uint8_t *limit1, const uint8_t *thresh1, int bd); -#define vpx_highbd_lpf_horizontal_4_dual vpx_highbd_lpf_horizontal_4_dual_c - -void vpx_highbd_lpf_horizontal_8_c(uint16_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh, int bd); -#define vpx_highbd_lpf_horizontal_8 vpx_highbd_lpf_horizontal_8_c - -void vpx_highbd_lpf_horizontal_8_dual_c(uint16_t *s, int pitch, const uint8_t *blimit0, const uint8_t *limit0, const uint8_t *thresh0, const uint8_t *blimit1, const uint8_t *limit1, const uint8_t *thresh1, int bd); -#define vpx_highbd_lpf_horizontal_8_dual vpx_highbd_lpf_horizontal_8_dual_c - -void vpx_highbd_lpf_vertical_16_c(uint16_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh, int bd); -#define vpx_highbd_lpf_vertical_16 vpx_highbd_lpf_vertical_16_c - -void vpx_highbd_lpf_vertical_16_dual_c(uint16_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh, int bd); -#define vpx_highbd_lpf_vertical_16_dual vpx_highbd_lpf_vertical_16_dual_c - -void vpx_highbd_lpf_vertical_4_c(uint16_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh, int bd); -#define vpx_highbd_lpf_vertical_4 vpx_highbd_lpf_vertical_4_c - -void vpx_highbd_lpf_vertical_4_dual_c(uint16_t *s, int pitch, const uint8_t *blimit0, const uint8_t *limit0, const uint8_t *thresh0, const uint8_t *blimit1, const uint8_t *limit1, const uint8_t *thresh1, int bd); -#define vpx_highbd_lpf_vertical_4_dual vpx_highbd_lpf_vertical_4_dual_c - -void vpx_highbd_lpf_vertical_8_c(uint16_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh, int bd); -#define vpx_highbd_lpf_vertical_8 vpx_highbd_lpf_vertical_8_c - -void vpx_highbd_lpf_vertical_8_dual_c(uint16_t *s, int pitch, const uint8_t *blimit0, const uint8_t *limit0, const uint8_t *thresh0, const uint8_t *blimit1, const uint8_t *limit1, const uint8_t *thresh1, int bd); -#define vpx_highbd_lpf_vertical_8_dual vpx_highbd_lpf_vertical_8_dual_c - -void vpx_highbd_minmax_8x8_c(const uint8_t *s, int p, const uint8_t *d, int dp, int *min, int *max); -#define vpx_highbd_minmax_8x8 vpx_highbd_minmax_8x8_c - -void vpx_highbd_quantize_b_c(const tran_low_t *coeff_ptr, intptr_t n_coeffs, int skip_block, const int16_t *zbin_ptr, const int16_t *round_ptr, const int16_t *quant_ptr, const int16_t *quant_shift_ptr, tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr, const int16_t *dequant_ptr, uint16_t *eob_ptr, const int16_t *scan, const int16_t *iscan); -#define vpx_highbd_quantize_b vpx_highbd_quantize_b_c - -void vpx_highbd_quantize_b_32x32_c(const tran_low_t *coeff_ptr, intptr_t n_coeffs, int skip_block, const int16_t *zbin_ptr, const int16_t *round_ptr, const int16_t *quant_ptr, const int16_t *quant_shift_ptr, tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr, const int16_t *dequant_ptr, uint16_t *eob_ptr, const int16_t *scan, const int16_t *iscan); -#define vpx_highbd_quantize_b_32x32 vpx_highbd_quantize_b_32x32_c - -unsigned int vpx_highbd_sad16x16_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -#define vpx_highbd_sad16x16 vpx_highbd_sad16x16_c - -unsigned int vpx_highbd_sad16x16_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -#define vpx_highbd_sad16x16_avg vpx_highbd_sad16x16_avg_c - -void vpx_highbd_sad16x16x3_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -#define vpx_highbd_sad16x16x3 vpx_highbd_sad16x16x3_c - -void vpx_highbd_sad16x16x4d_c(const uint8_t *src_ptr, int src_stride, const uint8_t* const ref_ptr[], int ref_stride, uint32_t *sad_array); -#define vpx_highbd_sad16x16x4d vpx_highbd_sad16x16x4d_c - -void vpx_highbd_sad16x16x8_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -#define vpx_highbd_sad16x16x8 vpx_highbd_sad16x16x8_c - -unsigned int vpx_highbd_sad16x32_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -#define vpx_highbd_sad16x32 vpx_highbd_sad16x32_c - -unsigned int vpx_highbd_sad16x32_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -#define vpx_highbd_sad16x32_avg vpx_highbd_sad16x32_avg_c - -void vpx_highbd_sad16x32x4d_c(const uint8_t *src_ptr, int src_stride, const uint8_t* const ref_ptr[], int ref_stride, uint32_t *sad_array); -#define vpx_highbd_sad16x32x4d vpx_highbd_sad16x32x4d_c - -unsigned int vpx_highbd_sad16x8_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -#define vpx_highbd_sad16x8 vpx_highbd_sad16x8_c - -unsigned int vpx_highbd_sad16x8_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -#define vpx_highbd_sad16x8_avg vpx_highbd_sad16x8_avg_c - -void vpx_highbd_sad16x8x3_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -#define vpx_highbd_sad16x8x3 vpx_highbd_sad16x8x3_c - -void vpx_highbd_sad16x8x4d_c(const uint8_t *src_ptr, int src_stride, const uint8_t* const ref_ptr[], int ref_stride, uint32_t *sad_array); -#define vpx_highbd_sad16x8x4d vpx_highbd_sad16x8x4d_c - -void vpx_highbd_sad16x8x8_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -#define vpx_highbd_sad16x8x8 vpx_highbd_sad16x8x8_c - -unsigned int vpx_highbd_sad32x16_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -#define vpx_highbd_sad32x16 vpx_highbd_sad32x16_c - -unsigned int vpx_highbd_sad32x16_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -#define vpx_highbd_sad32x16_avg vpx_highbd_sad32x16_avg_c - -void vpx_highbd_sad32x16x4d_c(const uint8_t *src_ptr, int src_stride, const uint8_t* const ref_ptr[], int ref_stride, uint32_t *sad_array); -#define vpx_highbd_sad32x16x4d vpx_highbd_sad32x16x4d_c - -unsigned int vpx_highbd_sad32x32_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -#define vpx_highbd_sad32x32 vpx_highbd_sad32x32_c - -unsigned int vpx_highbd_sad32x32_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -#define vpx_highbd_sad32x32_avg vpx_highbd_sad32x32_avg_c - -void vpx_highbd_sad32x32x3_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -#define vpx_highbd_sad32x32x3 vpx_highbd_sad32x32x3_c - -void vpx_highbd_sad32x32x4d_c(const uint8_t *src_ptr, int src_stride, const uint8_t* const ref_ptr[], int ref_stride, uint32_t *sad_array); -#define vpx_highbd_sad32x32x4d vpx_highbd_sad32x32x4d_c - -void vpx_highbd_sad32x32x8_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -#define vpx_highbd_sad32x32x8 vpx_highbd_sad32x32x8_c - -unsigned int vpx_highbd_sad32x64_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -#define vpx_highbd_sad32x64 vpx_highbd_sad32x64_c - -unsigned int vpx_highbd_sad32x64_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -#define vpx_highbd_sad32x64_avg vpx_highbd_sad32x64_avg_c - -void vpx_highbd_sad32x64x4d_c(const uint8_t *src_ptr, int src_stride, const uint8_t* const ref_ptr[], int ref_stride, uint32_t *sad_array); -#define vpx_highbd_sad32x64x4d vpx_highbd_sad32x64x4d_c - -unsigned int vpx_highbd_sad4x4_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -#define vpx_highbd_sad4x4 vpx_highbd_sad4x4_c - -unsigned int vpx_highbd_sad4x4_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -#define vpx_highbd_sad4x4_avg vpx_highbd_sad4x4_avg_c - -void vpx_highbd_sad4x4x3_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -#define vpx_highbd_sad4x4x3 vpx_highbd_sad4x4x3_c - -void vpx_highbd_sad4x4x4d_c(const uint8_t *src_ptr, int src_stride, const uint8_t* const ref_ptr[], int ref_stride, uint32_t *sad_array); -#define vpx_highbd_sad4x4x4d vpx_highbd_sad4x4x4d_c - -void vpx_highbd_sad4x4x8_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -#define vpx_highbd_sad4x4x8 vpx_highbd_sad4x4x8_c - -unsigned int vpx_highbd_sad4x8_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -#define vpx_highbd_sad4x8 vpx_highbd_sad4x8_c - -unsigned int vpx_highbd_sad4x8_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -#define vpx_highbd_sad4x8_avg vpx_highbd_sad4x8_avg_c - -void vpx_highbd_sad4x8x4d_c(const uint8_t *src_ptr, int src_stride, const uint8_t* const ref_ptr[], int ref_stride, uint32_t *sad_array); -#define vpx_highbd_sad4x8x4d vpx_highbd_sad4x8x4d_c - -void vpx_highbd_sad4x8x8_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -#define vpx_highbd_sad4x8x8 vpx_highbd_sad4x8x8_c - -unsigned int vpx_highbd_sad64x32_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -#define vpx_highbd_sad64x32 vpx_highbd_sad64x32_c - -unsigned int vpx_highbd_sad64x32_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -#define vpx_highbd_sad64x32_avg vpx_highbd_sad64x32_avg_c - -void vpx_highbd_sad64x32x4d_c(const uint8_t *src_ptr, int src_stride, const uint8_t* const ref_ptr[], int ref_stride, uint32_t *sad_array); -#define vpx_highbd_sad64x32x4d vpx_highbd_sad64x32x4d_c - -unsigned int vpx_highbd_sad64x64_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -#define vpx_highbd_sad64x64 vpx_highbd_sad64x64_c - -unsigned int vpx_highbd_sad64x64_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -#define vpx_highbd_sad64x64_avg vpx_highbd_sad64x64_avg_c - -void vpx_highbd_sad64x64x3_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -#define vpx_highbd_sad64x64x3 vpx_highbd_sad64x64x3_c - -void vpx_highbd_sad64x64x4d_c(const uint8_t *src_ptr, int src_stride, const uint8_t* const ref_ptr[], int ref_stride, uint32_t *sad_array); -#define vpx_highbd_sad64x64x4d vpx_highbd_sad64x64x4d_c - -void vpx_highbd_sad64x64x8_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -#define vpx_highbd_sad64x64x8 vpx_highbd_sad64x64x8_c - -unsigned int vpx_highbd_sad8x16_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -#define vpx_highbd_sad8x16 vpx_highbd_sad8x16_c - -unsigned int vpx_highbd_sad8x16_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -#define vpx_highbd_sad8x16_avg vpx_highbd_sad8x16_avg_c - -void vpx_highbd_sad8x16x3_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -#define vpx_highbd_sad8x16x3 vpx_highbd_sad8x16x3_c - -void vpx_highbd_sad8x16x4d_c(const uint8_t *src_ptr, int src_stride, const uint8_t* const ref_ptr[], int ref_stride, uint32_t *sad_array); -#define vpx_highbd_sad8x16x4d vpx_highbd_sad8x16x4d_c - -void vpx_highbd_sad8x16x8_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -#define vpx_highbd_sad8x16x8 vpx_highbd_sad8x16x8_c - -unsigned int vpx_highbd_sad8x4_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -#define vpx_highbd_sad8x4 vpx_highbd_sad8x4_c - -unsigned int vpx_highbd_sad8x4_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -#define vpx_highbd_sad8x4_avg vpx_highbd_sad8x4_avg_c - -void vpx_highbd_sad8x4x4d_c(const uint8_t *src_ptr, int src_stride, const uint8_t* const ref_ptr[], int ref_stride, uint32_t *sad_array); -#define vpx_highbd_sad8x4x4d vpx_highbd_sad8x4x4d_c - -void vpx_highbd_sad8x4x8_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -#define vpx_highbd_sad8x4x8 vpx_highbd_sad8x4x8_c - -unsigned int vpx_highbd_sad8x8_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -#define vpx_highbd_sad8x8 vpx_highbd_sad8x8_c - -unsigned int vpx_highbd_sad8x8_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -#define vpx_highbd_sad8x8_avg vpx_highbd_sad8x8_avg_c - -void vpx_highbd_sad8x8x3_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -#define vpx_highbd_sad8x8x3 vpx_highbd_sad8x8x3_c - -void vpx_highbd_sad8x8x4d_c(const uint8_t *src_ptr, int src_stride, const uint8_t* const ref_ptr[], int ref_stride, uint32_t *sad_array); -#define vpx_highbd_sad8x8x4d vpx_highbd_sad8x8x4d_c - -void vpx_highbd_sad8x8x8_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -#define vpx_highbd_sad8x8x8 vpx_highbd_sad8x8x8_c - -void vpx_highbd_subtract_block_c(int rows, int cols, int16_t *diff_ptr, ptrdiff_t diff_stride, const uint8_t *src_ptr, ptrdiff_t src_stride, const uint8_t *pred_ptr, ptrdiff_t pred_stride, int bd); -#define vpx_highbd_subtract_block vpx_highbd_subtract_block_c - -void vpx_highbd_tm_predictor_16x16_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_tm_predictor_16x16 vpx_highbd_tm_predictor_16x16_c - -void vpx_highbd_tm_predictor_32x32_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_tm_predictor_32x32 vpx_highbd_tm_predictor_32x32_c - -void vpx_highbd_tm_predictor_4x4_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_tm_predictor_4x4 vpx_highbd_tm_predictor_4x4_c - -void vpx_highbd_tm_predictor_8x8_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_tm_predictor_8x8 vpx_highbd_tm_predictor_8x8_c - -void vpx_highbd_v_predictor_16x16_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_v_predictor_16x16 vpx_highbd_v_predictor_16x16_c - -void vpx_highbd_v_predictor_32x32_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_v_predictor_32x32 vpx_highbd_v_predictor_32x32_c - -void vpx_highbd_v_predictor_4x4_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_v_predictor_4x4 vpx_highbd_v_predictor_4x4_c - -void vpx_highbd_v_predictor_8x8_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_v_predictor_8x8 vpx_highbd_v_predictor_8x8_c - -void vpx_idct16x16_10_add_c(const tran_low_t *input, uint8_t *dest, int stride); -#define vpx_idct16x16_10_add vpx_idct16x16_10_add_c - -void vpx_idct16x16_1_add_c(const tran_low_t *input, uint8_t *dest, int stride); -#define vpx_idct16x16_1_add vpx_idct16x16_1_add_c - -void vpx_idct16x16_256_add_c(const tran_low_t *input, uint8_t *dest, int stride); -#define vpx_idct16x16_256_add vpx_idct16x16_256_add_c - -void vpx_idct32x32_1024_add_c(const tran_low_t *input, uint8_t *dest, int stride); -#define vpx_idct32x32_1024_add vpx_idct32x32_1024_add_c - -void vpx_idct32x32_135_add_c(const tran_low_t *input, uint8_t *dest, int stride); -#define vpx_idct32x32_135_add vpx_idct32x32_135_add_c - -void vpx_idct32x32_1_add_c(const tran_low_t *input, uint8_t *dest, int stride); -#define vpx_idct32x32_1_add vpx_idct32x32_1_add_c - -void vpx_idct32x32_34_add_c(const tran_low_t *input, uint8_t *dest, int stride); -#define vpx_idct32x32_34_add vpx_idct32x32_34_add_c - -void vpx_idct4x4_16_add_c(const tran_low_t *input, uint8_t *dest, int stride); -#define vpx_idct4x4_16_add vpx_idct4x4_16_add_c - -void vpx_idct4x4_1_add_c(const tran_low_t *input, uint8_t *dest, int stride); -#define vpx_idct4x4_1_add vpx_idct4x4_1_add_c - -void vpx_idct8x8_12_add_c(const tran_low_t *input, uint8_t *dest, int stride); -#define vpx_idct8x8_12_add vpx_idct8x8_12_add_c - -void vpx_idct8x8_1_add_c(const tran_low_t *input, uint8_t *dest, int stride); -#define vpx_idct8x8_1_add vpx_idct8x8_1_add_c - -void vpx_idct8x8_64_add_c(const tran_low_t *input, uint8_t *dest, int stride); -#define vpx_idct8x8_64_add vpx_idct8x8_64_add_c - -int16_t vpx_int_pro_col_c(const uint8_t *ref, const int width); -#define vpx_int_pro_col vpx_int_pro_col_c - -void vpx_int_pro_row_c(int16_t *hbuf, const uint8_t *ref, const int ref_stride, const int height); -#define vpx_int_pro_row vpx_int_pro_row_c - -void vpx_iwht4x4_16_add_c(const tran_low_t *input, uint8_t *dest, int stride); -#define vpx_iwht4x4_16_add vpx_iwht4x4_16_add_c - -void vpx_iwht4x4_1_add_c(const tran_low_t *input, uint8_t *dest, int stride); -#define vpx_iwht4x4_1_add vpx_iwht4x4_1_add_c - -void vpx_lpf_horizontal_16_c(uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh); -#define vpx_lpf_horizontal_16 vpx_lpf_horizontal_16_c - -void vpx_lpf_horizontal_16_dual_c(uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh); -#define vpx_lpf_horizontal_16_dual vpx_lpf_horizontal_16_dual_c - -void vpx_lpf_horizontal_4_c(uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh); -#define vpx_lpf_horizontal_4 vpx_lpf_horizontal_4_c - -void vpx_lpf_horizontal_4_dual_c(uint8_t *s, int pitch, const uint8_t *blimit0, const uint8_t *limit0, const uint8_t *thresh0, const uint8_t *blimit1, const uint8_t *limit1, const uint8_t *thresh1); -#define vpx_lpf_horizontal_4_dual vpx_lpf_horizontal_4_dual_c - -void vpx_lpf_horizontal_8_c(uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh); -#define vpx_lpf_horizontal_8 vpx_lpf_horizontal_8_c - -void vpx_lpf_horizontal_8_dual_c(uint8_t *s, int pitch, const uint8_t *blimit0, const uint8_t *limit0, const uint8_t *thresh0, const uint8_t *blimit1, const uint8_t *limit1, const uint8_t *thresh1); -#define vpx_lpf_horizontal_8_dual vpx_lpf_horizontal_8_dual_c - -void vpx_lpf_vertical_16_c(uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh); -#define vpx_lpf_vertical_16 vpx_lpf_vertical_16_c - -void vpx_lpf_vertical_16_dual_c(uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh); -#define vpx_lpf_vertical_16_dual vpx_lpf_vertical_16_dual_c - -void vpx_lpf_vertical_4_c(uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh); -#define vpx_lpf_vertical_4 vpx_lpf_vertical_4_c - -void vpx_lpf_vertical_4_dual_c(uint8_t *s, int pitch, const uint8_t *blimit0, const uint8_t *limit0, const uint8_t *thresh0, const uint8_t *blimit1, const uint8_t *limit1, const uint8_t *thresh1); -#define vpx_lpf_vertical_4_dual vpx_lpf_vertical_4_dual_c - -void vpx_lpf_vertical_8_c(uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh); -#define vpx_lpf_vertical_8 vpx_lpf_vertical_8_c - -void vpx_lpf_vertical_8_dual_c(uint8_t *s, int pitch, const uint8_t *blimit0, const uint8_t *limit0, const uint8_t *thresh0, const uint8_t *blimit1, const uint8_t *limit1, const uint8_t *thresh1); -#define vpx_lpf_vertical_8_dual vpx_lpf_vertical_8_dual_c - -void vpx_mbpost_proc_across_ip_c(unsigned char *dst, int pitch, int rows, int cols,int flimit); -#define vpx_mbpost_proc_across_ip vpx_mbpost_proc_across_ip_c - -void vpx_mbpost_proc_down_c(unsigned char *dst, int pitch, int rows, int cols,int flimit); -#define vpx_mbpost_proc_down vpx_mbpost_proc_down_c - -void vpx_minmax_8x8_c(const uint8_t *s, int p, const uint8_t *d, int dp, int *min, int *max); -#define vpx_minmax_8x8 vpx_minmax_8x8_c - -unsigned int vpx_mse16x16_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int recon_stride, unsigned int *sse); -#define vpx_mse16x16 vpx_mse16x16_c - -unsigned int vpx_mse16x8_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int recon_stride, unsigned int *sse); -#define vpx_mse16x8 vpx_mse16x8_c - -unsigned int vpx_mse8x16_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int recon_stride, unsigned int *sse); -#define vpx_mse8x16 vpx_mse8x16_c - -unsigned int vpx_mse8x8_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int recon_stride, unsigned int *sse); -#define vpx_mse8x8 vpx_mse8x8_c - -void vpx_plane_add_noise_c(uint8_t *start, const int8_t *noise, int blackclamp, int whiteclamp, int width, int height, int pitch); -#define vpx_plane_add_noise vpx_plane_add_noise_c - -void vpx_post_proc_down_and_across_mb_row_c(unsigned char *src, unsigned char *dst, int src_pitch, int dst_pitch, int cols, unsigned char *flimits, int size); -#define vpx_post_proc_down_and_across_mb_row vpx_post_proc_down_and_across_mb_row_c - -void vpx_quantize_b_c(const tran_low_t *coeff_ptr, intptr_t n_coeffs, int skip_block, const int16_t *zbin_ptr, const int16_t *round_ptr, const int16_t *quant_ptr, const int16_t *quant_shift_ptr, tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr, const int16_t *dequant_ptr, uint16_t *eob_ptr, const int16_t *scan, const int16_t *iscan); -#define vpx_quantize_b vpx_quantize_b_c - -void vpx_quantize_b_32x32_c(const tran_low_t *coeff_ptr, intptr_t n_coeffs, int skip_block, const int16_t *zbin_ptr, const int16_t *round_ptr, const int16_t *quant_ptr, const int16_t *quant_shift_ptr, tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr, const int16_t *dequant_ptr, uint16_t *eob_ptr, const int16_t *scan, const int16_t *iscan); -#define vpx_quantize_b_32x32 vpx_quantize_b_32x32_c - -unsigned int vpx_sad16x16_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -#define vpx_sad16x16 vpx_sad16x16_c - -unsigned int vpx_sad16x16_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -#define vpx_sad16x16_avg vpx_sad16x16_avg_c - -void vpx_sad16x16x3_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -#define vpx_sad16x16x3 vpx_sad16x16x3_c - -void vpx_sad16x16x4d_c(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); -#define vpx_sad16x16x4d vpx_sad16x16x4d_c - -void vpx_sad16x16x8_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -#define vpx_sad16x16x8 vpx_sad16x16x8_c - -unsigned int vpx_sad16x32_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -#define vpx_sad16x32 vpx_sad16x32_c - -unsigned int vpx_sad16x32_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -#define vpx_sad16x32_avg vpx_sad16x32_avg_c - -void vpx_sad16x32x4d_c(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); -#define vpx_sad16x32x4d vpx_sad16x32x4d_c - -unsigned int vpx_sad16x8_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -#define vpx_sad16x8 vpx_sad16x8_c - -unsigned int vpx_sad16x8_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -#define vpx_sad16x8_avg vpx_sad16x8_avg_c - -void vpx_sad16x8x3_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -#define vpx_sad16x8x3 vpx_sad16x8x3_c - -void vpx_sad16x8x4d_c(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); -#define vpx_sad16x8x4d vpx_sad16x8x4d_c - -void vpx_sad16x8x8_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -#define vpx_sad16x8x8 vpx_sad16x8x8_c - -unsigned int vpx_sad32x16_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -#define vpx_sad32x16 vpx_sad32x16_c - -unsigned int vpx_sad32x16_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -#define vpx_sad32x16_avg vpx_sad32x16_avg_c - -void vpx_sad32x16x4d_c(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); -#define vpx_sad32x16x4d vpx_sad32x16x4d_c - -unsigned int vpx_sad32x32_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -#define vpx_sad32x32 vpx_sad32x32_c - -unsigned int vpx_sad32x32_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -#define vpx_sad32x32_avg vpx_sad32x32_avg_c - -void vpx_sad32x32x3_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -#define vpx_sad32x32x3 vpx_sad32x32x3_c - -void vpx_sad32x32x4d_c(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); -#define vpx_sad32x32x4d vpx_sad32x32x4d_c - -void vpx_sad32x32x8_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -#define vpx_sad32x32x8 vpx_sad32x32x8_c - -unsigned int vpx_sad32x64_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -#define vpx_sad32x64 vpx_sad32x64_c - -unsigned int vpx_sad32x64_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -#define vpx_sad32x64_avg vpx_sad32x64_avg_c - -void vpx_sad32x64x4d_c(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); -#define vpx_sad32x64x4d vpx_sad32x64x4d_c - -unsigned int vpx_sad4x4_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -#define vpx_sad4x4 vpx_sad4x4_c - -unsigned int vpx_sad4x4_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -#define vpx_sad4x4_avg vpx_sad4x4_avg_c - -void vpx_sad4x4x3_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -#define vpx_sad4x4x3 vpx_sad4x4x3_c - -void vpx_sad4x4x4d_c(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); -#define vpx_sad4x4x4d vpx_sad4x4x4d_c - -void vpx_sad4x4x8_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -#define vpx_sad4x4x8 vpx_sad4x4x8_c - -unsigned int vpx_sad4x8_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -#define vpx_sad4x8 vpx_sad4x8_c - -unsigned int vpx_sad4x8_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -#define vpx_sad4x8_avg vpx_sad4x8_avg_c - -void vpx_sad4x8x4d_c(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); -#define vpx_sad4x8x4d vpx_sad4x8x4d_c - -void vpx_sad4x8x8_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -#define vpx_sad4x8x8 vpx_sad4x8x8_c - -unsigned int vpx_sad64x32_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -#define vpx_sad64x32 vpx_sad64x32_c - -unsigned int vpx_sad64x32_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -#define vpx_sad64x32_avg vpx_sad64x32_avg_c - -void vpx_sad64x32x4d_c(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); -#define vpx_sad64x32x4d vpx_sad64x32x4d_c - -unsigned int vpx_sad64x64_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -#define vpx_sad64x64 vpx_sad64x64_c - -unsigned int vpx_sad64x64_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -#define vpx_sad64x64_avg vpx_sad64x64_avg_c - -void vpx_sad64x64x3_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -#define vpx_sad64x64x3 vpx_sad64x64x3_c - -void vpx_sad64x64x4d_c(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); -#define vpx_sad64x64x4d vpx_sad64x64x4d_c - -void vpx_sad64x64x8_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -#define vpx_sad64x64x8 vpx_sad64x64x8_c - -unsigned int vpx_sad8x16_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -#define vpx_sad8x16 vpx_sad8x16_c - -unsigned int vpx_sad8x16_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -#define vpx_sad8x16_avg vpx_sad8x16_avg_c - -void vpx_sad8x16x3_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -#define vpx_sad8x16x3 vpx_sad8x16x3_c - -void vpx_sad8x16x4d_c(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); -#define vpx_sad8x16x4d vpx_sad8x16x4d_c - -void vpx_sad8x16x8_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -#define vpx_sad8x16x8 vpx_sad8x16x8_c - -unsigned int vpx_sad8x4_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -#define vpx_sad8x4 vpx_sad8x4_c - -unsigned int vpx_sad8x4_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -#define vpx_sad8x4_avg vpx_sad8x4_avg_c - -void vpx_sad8x4x4d_c(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); -#define vpx_sad8x4x4d vpx_sad8x4x4d_c - -void vpx_sad8x4x8_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -#define vpx_sad8x4x8 vpx_sad8x4x8_c - -unsigned int vpx_sad8x8_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -#define vpx_sad8x8 vpx_sad8x8_c - -unsigned int vpx_sad8x8_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -#define vpx_sad8x8_avg vpx_sad8x8_avg_c - -void vpx_sad8x8x3_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -#define vpx_sad8x8x3 vpx_sad8x8x3_c - -void vpx_sad8x8x4d_c(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); -#define vpx_sad8x8x4d vpx_sad8x8x4d_c - -void vpx_sad8x8x8_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -#define vpx_sad8x8x8 vpx_sad8x8x8_c - -int vpx_satd_c(const int16_t *coeff, int length); -#define vpx_satd vpx_satd_c - -void vpx_scaled_2d_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -#define vpx_scaled_2d vpx_scaled_2d_c - -void vpx_scaled_avg_2d_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -#define vpx_scaled_avg_2d vpx_scaled_avg_2d_c - -void vpx_scaled_avg_horiz_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -#define vpx_scaled_avg_horiz vpx_scaled_avg_horiz_c - -void vpx_scaled_avg_vert_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -#define vpx_scaled_avg_vert vpx_scaled_avg_vert_c - -void vpx_scaled_horiz_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -#define vpx_scaled_horiz vpx_scaled_horiz_c - -void vpx_scaled_vert_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -#define vpx_scaled_vert vpx_scaled_vert_c - -uint32_t vpx_sub_pixel_avg_variance16x16_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_sub_pixel_avg_variance16x16 vpx_sub_pixel_avg_variance16x16_c - -uint32_t vpx_sub_pixel_avg_variance16x32_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_sub_pixel_avg_variance16x32 vpx_sub_pixel_avg_variance16x32_c - -uint32_t vpx_sub_pixel_avg_variance16x8_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_sub_pixel_avg_variance16x8 vpx_sub_pixel_avg_variance16x8_c - -uint32_t vpx_sub_pixel_avg_variance32x16_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_sub_pixel_avg_variance32x16 vpx_sub_pixel_avg_variance32x16_c - -uint32_t vpx_sub_pixel_avg_variance32x32_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_sub_pixel_avg_variance32x32 vpx_sub_pixel_avg_variance32x32_c - -uint32_t vpx_sub_pixel_avg_variance32x64_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_sub_pixel_avg_variance32x64 vpx_sub_pixel_avg_variance32x64_c - -uint32_t vpx_sub_pixel_avg_variance4x4_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_sub_pixel_avg_variance4x4 vpx_sub_pixel_avg_variance4x4_c - -uint32_t vpx_sub_pixel_avg_variance4x8_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_sub_pixel_avg_variance4x8 vpx_sub_pixel_avg_variance4x8_c - -uint32_t vpx_sub_pixel_avg_variance64x32_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_sub_pixel_avg_variance64x32 vpx_sub_pixel_avg_variance64x32_c - -uint32_t vpx_sub_pixel_avg_variance64x64_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_sub_pixel_avg_variance64x64 vpx_sub_pixel_avg_variance64x64_c - -uint32_t vpx_sub_pixel_avg_variance8x16_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_sub_pixel_avg_variance8x16 vpx_sub_pixel_avg_variance8x16_c - -uint32_t vpx_sub_pixel_avg_variance8x4_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_sub_pixel_avg_variance8x4 vpx_sub_pixel_avg_variance8x4_c - -uint32_t vpx_sub_pixel_avg_variance8x8_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_sub_pixel_avg_variance8x8 vpx_sub_pixel_avg_variance8x8_c - -uint32_t vpx_sub_pixel_variance16x16_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -#define vpx_sub_pixel_variance16x16 vpx_sub_pixel_variance16x16_c - -uint32_t vpx_sub_pixel_variance16x32_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -#define vpx_sub_pixel_variance16x32 vpx_sub_pixel_variance16x32_c - -uint32_t vpx_sub_pixel_variance16x8_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -#define vpx_sub_pixel_variance16x8 vpx_sub_pixel_variance16x8_c - -uint32_t vpx_sub_pixel_variance32x16_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -#define vpx_sub_pixel_variance32x16 vpx_sub_pixel_variance32x16_c - -uint32_t vpx_sub_pixel_variance32x32_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -#define vpx_sub_pixel_variance32x32 vpx_sub_pixel_variance32x32_c - -uint32_t vpx_sub_pixel_variance32x64_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -#define vpx_sub_pixel_variance32x64 vpx_sub_pixel_variance32x64_c - -uint32_t vpx_sub_pixel_variance4x4_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -#define vpx_sub_pixel_variance4x4 vpx_sub_pixel_variance4x4_c - -uint32_t vpx_sub_pixel_variance4x8_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -#define vpx_sub_pixel_variance4x8 vpx_sub_pixel_variance4x8_c - -uint32_t vpx_sub_pixel_variance64x32_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -#define vpx_sub_pixel_variance64x32 vpx_sub_pixel_variance64x32_c - -uint32_t vpx_sub_pixel_variance64x64_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -#define vpx_sub_pixel_variance64x64 vpx_sub_pixel_variance64x64_c - -uint32_t vpx_sub_pixel_variance8x16_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -#define vpx_sub_pixel_variance8x16 vpx_sub_pixel_variance8x16_c - -uint32_t vpx_sub_pixel_variance8x4_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -#define vpx_sub_pixel_variance8x4 vpx_sub_pixel_variance8x4_c - -uint32_t vpx_sub_pixel_variance8x8_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -#define vpx_sub_pixel_variance8x8 vpx_sub_pixel_variance8x8_c - -void vpx_subtract_block_c(int rows, int cols, int16_t *diff_ptr, ptrdiff_t diff_stride, const uint8_t *src_ptr, ptrdiff_t src_stride, const uint8_t *pred_ptr, ptrdiff_t pred_stride); -#define vpx_subtract_block vpx_subtract_block_c - -uint64_t vpx_sum_squares_2d_i16_c(const int16_t *src, int stride, int size); -#define vpx_sum_squares_2d_i16 vpx_sum_squares_2d_i16_c - -void vpx_tm_predictor_16x16_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_tm_predictor_16x16 vpx_tm_predictor_16x16_c - -void vpx_tm_predictor_32x32_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_tm_predictor_32x32 vpx_tm_predictor_32x32_c - -void vpx_tm_predictor_4x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_tm_predictor_4x4 vpx_tm_predictor_4x4_c - -void vpx_tm_predictor_8x8_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_tm_predictor_8x8 vpx_tm_predictor_8x8_c - -void vpx_v_predictor_16x16_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_v_predictor_16x16 vpx_v_predictor_16x16_c - -void vpx_v_predictor_32x32_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_v_predictor_32x32 vpx_v_predictor_32x32_c - -void vpx_v_predictor_4x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_v_predictor_4x4 vpx_v_predictor_4x4_c - -void vpx_v_predictor_8x8_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_v_predictor_8x8 vpx_v_predictor_8x8_c - -unsigned int vpx_variance16x16_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_variance16x16 vpx_variance16x16_c - -unsigned int vpx_variance16x32_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_variance16x32 vpx_variance16x32_c - -unsigned int vpx_variance16x8_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_variance16x8 vpx_variance16x8_c - -unsigned int vpx_variance32x16_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_variance32x16 vpx_variance32x16_c - -unsigned int vpx_variance32x32_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_variance32x32 vpx_variance32x32_c - -unsigned int vpx_variance32x64_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_variance32x64 vpx_variance32x64_c - -unsigned int vpx_variance4x4_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_variance4x4 vpx_variance4x4_c - -unsigned int vpx_variance4x8_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_variance4x8 vpx_variance4x8_c - -unsigned int vpx_variance64x32_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_variance64x32 vpx_variance64x32_c - -unsigned int vpx_variance64x64_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_variance64x64 vpx_variance64x64_c - -unsigned int vpx_variance8x16_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_variance8x16 vpx_variance8x16_c - -unsigned int vpx_variance8x4_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_variance8x4 vpx_variance8x4_c - -unsigned int vpx_variance8x8_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_variance8x8 vpx_variance8x8_c - -void vpx_ve_predictor_4x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_ve_predictor_4x4 vpx_ve_predictor_4x4_c - -int vpx_vector_var_c(const int16_t *ref, const int16_t *src, const int bwl); -#define vpx_vector_var vpx_vector_var_c - -void vpx_dsp_rtcd(void); - -#include "vpx_config.h" - -#ifdef RTCD_C -static void setup_rtcd_internal(void) -{ -} -#endif - -#ifdef __cplusplus -} // extern "C" -#endif - -#endif diff --git a/WebRtc.NET/include/third_party/libvpx/source/config/nacl/vpx_scale_rtcd.h b/WebRtc.NET/include/third_party/libvpx/source/config/nacl/vpx_scale_rtcd.h deleted file mode 100644 index f419cc7a..00000000 --- a/WebRtc.NET/include/third_party/libvpx/source/config/nacl/vpx_scale_rtcd.h +++ /dev/null @@ -1,66 +0,0 @@ -#ifndef VPX_SCALE_RTCD_H_ -#define VPX_SCALE_RTCD_H_ - -#ifdef RTCD_C -#define RTCD_EXTERN -#else -#define RTCD_EXTERN extern -#endif - -struct yv12_buffer_config; - -#ifdef __cplusplus -extern "C" { -#endif - -void vp8_horizontal_line_2_1_scale_c(const unsigned char *source, unsigned int source_width, unsigned char *dest, unsigned int dest_width); -#define vp8_horizontal_line_2_1_scale vp8_horizontal_line_2_1_scale_c - -void vp8_horizontal_line_5_3_scale_c(const unsigned char *source, unsigned int source_width, unsigned char *dest, unsigned int dest_width); -#define vp8_horizontal_line_5_3_scale vp8_horizontal_line_5_3_scale_c - -void vp8_horizontal_line_5_4_scale_c(const unsigned char *source, unsigned int source_width, unsigned char *dest, unsigned int dest_width); -#define vp8_horizontal_line_5_4_scale vp8_horizontal_line_5_4_scale_c - -void vp8_vertical_band_2_1_scale_c(unsigned char *source, unsigned int src_pitch, unsigned char *dest, unsigned int dest_pitch, unsigned int dest_width); -#define vp8_vertical_band_2_1_scale vp8_vertical_band_2_1_scale_c - -void vp8_vertical_band_2_1_scale_i_c(unsigned char *source, unsigned int src_pitch, unsigned char *dest, unsigned int dest_pitch, unsigned int dest_width); -#define vp8_vertical_band_2_1_scale_i vp8_vertical_band_2_1_scale_i_c - -void vp8_vertical_band_5_3_scale_c(unsigned char *source, unsigned int src_pitch, unsigned char *dest, unsigned int dest_pitch, unsigned int dest_width); -#define vp8_vertical_band_5_3_scale vp8_vertical_band_5_3_scale_c - -void vp8_vertical_band_5_4_scale_c(unsigned char *source, unsigned int src_pitch, unsigned char *dest, unsigned int dest_pitch, unsigned int dest_width); -#define vp8_vertical_band_5_4_scale vp8_vertical_band_5_4_scale_c - -void vp8_yv12_copy_frame_c(const struct yv12_buffer_config *src_ybc, struct yv12_buffer_config *dst_ybc); -#define vp8_yv12_copy_frame vp8_yv12_copy_frame_c - -void vp8_yv12_extend_frame_borders_c(struct yv12_buffer_config *ybf); -#define vp8_yv12_extend_frame_borders vp8_yv12_extend_frame_borders_c - -void vpx_extend_frame_borders_c(struct yv12_buffer_config *ybf); -#define vpx_extend_frame_borders vpx_extend_frame_borders_c - -void vpx_extend_frame_inner_borders_c(struct yv12_buffer_config *ybf); -#define vpx_extend_frame_inner_borders vpx_extend_frame_inner_borders_c - -void vpx_yv12_copy_y_c(const struct yv12_buffer_config *src_ybc, struct yv12_buffer_config *dst_ybc); -#define vpx_yv12_copy_y vpx_yv12_copy_y_c - -void vpx_scale_rtcd(void); - -#include "vpx_config.h" - -#ifdef RTCD_C -static void setup_rtcd_internal(void) -{ -} -#endif - -#ifdef __cplusplus -} // extern "C" -#endif - -#endif diff --git a/WebRtc.NET/include/third_party/libvpx/source/config/vpx_version.h b/WebRtc.NET/include/third_party/libvpx/source/config/vpx_version.h deleted file mode 100644 index 07f046ed..00000000 --- a/WebRtc.NET/include/third_party/libvpx/source/config/vpx_version.h +++ /dev/null @@ -1,7 +0,0 @@ -#define VERSION_MAJOR 1 -#define VERSION_MINOR 6 -#define VERSION_PATCH 0 -#define VERSION_EXTRA "903-g5b1a8ca5e" -#define VERSION_PACKED ((VERSION_MAJOR<<16)|(VERSION_MINOR<<8)|(VERSION_PATCH)) -#define VERSION_STRING_NOSP "v1.6.0-903-g5b1a8ca5e" -#define VERSION_STRING " v1.6.0-903-g5b1a8ca5e" diff --git a/WebRtc.NET/include/third_party/libvpx/source/config/win/ia32/vp8_rtcd.h b/WebRtc.NET/include/third_party/libvpx/source/config/win/ia32/vp8_rtcd.h deleted file mode 100644 index 3addf417..00000000 --- a/WebRtc.NET/include/third_party/libvpx/source/config/win/ia32/vp8_rtcd.h +++ /dev/null @@ -1,333 +0,0 @@ -#ifndef VP8_RTCD_H_ -#define VP8_RTCD_H_ - -#ifdef RTCD_C -#define RTCD_EXTERN -#else -#define RTCD_EXTERN extern -#endif - -/* - * VP8 - */ - -struct blockd; -struct macroblockd; -struct loop_filter_info; - -/* Encoder forward decls */ -struct block; -struct macroblock; -struct variance_vtable; -union int_mv; -struct yv12_buffer_config; - -#ifdef __cplusplus -extern "C" { -#endif - -void vp8_bilinear_predict16x16_c(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch); -void vp8_bilinear_predict16x16_sse2(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch); -void vp8_bilinear_predict16x16_ssse3(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch); -RTCD_EXTERN void (*vp8_bilinear_predict16x16)(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch); - -void vp8_bilinear_predict4x4_c(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch); -void vp8_bilinear_predict4x4_mmx(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch); -RTCD_EXTERN void (*vp8_bilinear_predict4x4)(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch); - -void vp8_bilinear_predict8x4_c(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch); -void vp8_bilinear_predict8x4_mmx(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch); -RTCD_EXTERN void (*vp8_bilinear_predict8x4)(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch); - -void vp8_bilinear_predict8x8_c(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch); -void vp8_bilinear_predict8x8_sse2(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch); -void vp8_bilinear_predict8x8_ssse3(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch); -RTCD_EXTERN void (*vp8_bilinear_predict8x8)(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch); - -void vp8_blend_b_c(unsigned char *y, unsigned char *u, unsigned char *v, int y1, int u1, int v1, int alpha, int stride); -#define vp8_blend_b vp8_blend_b_c - -void vp8_blend_mb_inner_c(unsigned char *y, unsigned char *u, unsigned char *v, int y1, int u1, int v1, int alpha, int stride); -#define vp8_blend_mb_inner vp8_blend_mb_inner_c - -void vp8_blend_mb_outer_c(unsigned char *y, unsigned char *u, unsigned char *v, int y1, int u1, int v1, int alpha, int stride); -#define vp8_blend_mb_outer vp8_blend_mb_outer_c - -int vp8_block_error_c(short *coeff, short *dqcoeff); -int vp8_block_error_sse2(short *coeff, short *dqcoeff); -RTCD_EXTERN int (*vp8_block_error)(short *coeff, short *dqcoeff); - -void vp8_copy32xn_c(const unsigned char *src_ptr, int source_stride, unsigned char *dst_ptr, int dst_stride, int n); -void vp8_copy32xn_sse2(const unsigned char *src_ptr, int source_stride, unsigned char *dst_ptr, int dst_stride, int n); -void vp8_copy32xn_sse3(const unsigned char *src_ptr, int source_stride, unsigned char *dst_ptr, int dst_stride, int n); -RTCD_EXTERN void (*vp8_copy32xn)(const unsigned char *src_ptr, int source_stride, unsigned char *dst_ptr, int dst_stride, int n); - -void vp8_copy_mem16x16_c(unsigned char *src, int src_pitch, unsigned char *dst, int dst_pitch); -void vp8_copy_mem16x16_sse2(unsigned char *src, int src_pitch, unsigned char *dst, int dst_pitch); -RTCD_EXTERN void (*vp8_copy_mem16x16)(unsigned char *src, int src_pitch, unsigned char *dst, int dst_pitch); - -void vp8_copy_mem8x4_c(unsigned char *src, int src_pitch, unsigned char *dst, int dst_pitch); -void vp8_copy_mem8x4_mmx(unsigned char *src, int src_pitch, unsigned char *dst, int dst_pitch); -RTCD_EXTERN void (*vp8_copy_mem8x4)(unsigned char *src, int src_pitch, unsigned char *dst, int dst_pitch); - -void vp8_copy_mem8x8_c(unsigned char *src, int src_pitch, unsigned char *dst, int dst_pitch); -void vp8_copy_mem8x8_mmx(unsigned char *src, int src_pitch, unsigned char *dst, int dst_pitch); -RTCD_EXTERN void (*vp8_copy_mem8x8)(unsigned char *src, int src_pitch, unsigned char *dst, int dst_pitch); - -void vp8_dc_only_idct_add_c(short input, unsigned char *pred, int pred_stride, unsigned char *dst, int dst_stride); -void vp8_dc_only_idct_add_mmx(short input, unsigned char *pred, int pred_stride, unsigned char *dst, int dst_stride); -RTCD_EXTERN void (*vp8_dc_only_idct_add)(short input, unsigned char *pred, int pred_stride, unsigned char *dst, int dst_stride); - -int vp8_denoiser_filter_c(unsigned char *mc_running_avg_y, int mc_avg_y_stride, unsigned char *running_avg_y, int avg_y_stride, unsigned char *sig, int sig_stride, unsigned int motion_magnitude, int increase_denoising); -int vp8_denoiser_filter_sse2(unsigned char *mc_running_avg_y, int mc_avg_y_stride, unsigned char *running_avg_y, int avg_y_stride, unsigned char *sig, int sig_stride, unsigned int motion_magnitude, int increase_denoising); -RTCD_EXTERN int (*vp8_denoiser_filter)(unsigned char *mc_running_avg_y, int mc_avg_y_stride, unsigned char *running_avg_y, int avg_y_stride, unsigned char *sig, int sig_stride, unsigned int motion_magnitude, int increase_denoising); - -int vp8_denoiser_filter_uv_c(unsigned char *mc_running_avg, int mc_avg_stride, unsigned char *running_avg, int avg_stride, unsigned char *sig, int sig_stride, unsigned int motion_magnitude, int increase_denoising); -int vp8_denoiser_filter_uv_sse2(unsigned char *mc_running_avg, int mc_avg_stride, unsigned char *running_avg, int avg_stride, unsigned char *sig, int sig_stride, unsigned int motion_magnitude, int increase_denoising); -RTCD_EXTERN int (*vp8_denoiser_filter_uv)(unsigned char *mc_running_avg, int mc_avg_stride, unsigned char *running_avg, int avg_stride, unsigned char *sig, int sig_stride, unsigned int motion_magnitude, int increase_denoising); - -void vp8_dequant_idct_add_c(short *input, short *dq, unsigned char *output, int stride); -void vp8_dequant_idct_add_mmx(short *input, short *dq, unsigned char *output, int stride); -RTCD_EXTERN void (*vp8_dequant_idct_add)(short *input, short *dq, unsigned char *output, int stride); - -void vp8_dequant_idct_add_uv_block_c(short *q, short *dq, unsigned char *dst_u, unsigned char *dst_v, int stride, char *eobs); -void vp8_dequant_idct_add_uv_block_sse2(short *q, short *dq, unsigned char *dst_u, unsigned char *dst_v, int stride, char *eobs); -RTCD_EXTERN void (*vp8_dequant_idct_add_uv_block)(short *q, short *dq, unsigned char *dst_u, unsigned char *dst_v, int stride, char *eobs); - -void vp8_dequant_idct_add_y_block_c(short *q, short *dq, unsigned char *dst, int stride, char *eobs); -void vp8_dequant_idct_add_y_block_sse2(short *q, short *dq, unsigned char *dst, int stride, char *eobs); -RTCD_EXTERN void (*vp8_dequant_idct_add_y_block)(short *q, short *dq, unsigned char *dst, int stride, char *eobs); - -void vp8_dequantize_b_c(struct blockd*, short *dqc); -void vp8_dequantize_b_mmx(struct blockd*, short *dqc); -RTCD_EXTERN void (*vp8_dequantize_b)(struct blockd*, short *dqc); - -int vp8_diamond_search_sad_c(struct macroblock *x, struct block *b, struct blockd *d, union int_mv *ref_mv, union int_mv *best_mv, int search_param, int sad_per_bit, int *num00, struct variance_vtable *fn_ptr, int *mvcost[2], union int_mv *center_mv); -int vp8_diamond_search_sadx4(struct macroblock *x, struct block *b, struct blockd *d, union int_mv *ref_mv, union int_mv *best_mv, int search_param, int sad_per_bit, int *num00, struct variance_vtable *fn_ptr, int *mvcost[2], union int_mv *center_mv); -RTCD_EXTERN int (*vp8_diamond_search_sad)(struct macroblock *x, struct block *b, struct blockd *d, union int_mv *ref_mv, union int_mv *best_mv, int search_param, int sad_per_bit, int *num00, struct variance_vtable *fn_ptr, int *mvcost[2], union int_mv *center_mv); - -void vp8_fast_quantize_b_c(struct block *, struct blockd *); -void vp8_fast_quantize_b_sse2(struct block *, struct blockd *); -void vp8_fast_quantize_b_ssse3(struct block *, struct blockd *); -RTCD_EXTERN void (*vp8_fast_quantize_b)(struct block *, struct blockd *); - -void vp8_filter_by_weight16x16_c(unsigned char *src, int src_stride, unsigned char *dst, int dst_stride, int src_weight); -void vp8_filter_by_weight16x16_sse2(unsigned char *src, int src_stride, unsigned char *dst, int dst_stride, int src_weight); -RTCD_EXTERN void (*vp8_filter_by_weight16x16)(unsigned char *src, int src_stride, unsigned char *dst, int dst_stride, int src_weight); - -void vp8_filter_by_weight4x4_c(unsigned char *src, int src_stride, unsigned char *dst, int dst_stride, int src_weight); -#define vp8_filter_by_weight4x4 vp8_filter_by_weight4x4_c - -void vp8_filter_by_weight8x8_c(unsigned char *src, int src_stride, unsigned char *dst, int dst_stride, int src_weight); -void vp8_filter_by_weight8x8_sse2(unsigned char *src, int src_stride, unsigned char *dst, int dst_stride, int src_weight); -RTCD_EXTERN void (*vp8_filter_by_weight8x8)(unsigned char *src, int src_stride, unsigned char *dst, int dst_stride, int src_weight); - -int vp8_full_search_sad_c(struct macroblock *x, struct block *b, struct blockd *d, union int_mv *ref_mv, int sad_per_bit, int distance, struct variance_vtable *fn_ptr, int *mvcost[2], union int_mv *center_mv); -int vp8_full_search_sadx3(struct macroblock *x, struct block *b, struct blockd *d, union int_mv *ref_mv, int sad_per_bit, int distance, struct variance_vtable *fn_ptr, int *mvcost[2], union int_mv *center_mv); -int vp8_full_search_sadx8(struct macroblock *x, struct block *b, struct blockd *d, union int_mv *ref_mv, int sad_per_bit, int distance, struct variance_vtable *fn_ptr, int *mvcost[2], union int_mv *center_mv); -RTCD_EXTERN int (*vp8_full_search_sad)(struct macroblock *x, struct block *b, struct blockd *d, union int_mv *ref_mv, int sad_per_bit, int distance, struct variance_vtable *fn_ptr, int *mvcost[2], union int_mv *center_mv); - -void vp8_loop_filter_bh_c(unsigned char *y, unsigned char *u, unsigned char *v, int ystride, int uv_stride, struct loop_filter_info *lfi); -void vp8_loop_filter_bh_sse2(unsigned char *y, unsigned char *u, unsigned char *v, int ystride, int uv_stride, struct loop_filter_info *lfi); -RTCD_EXTERN void (*vp8_loop_filter_bh)(unsigned char *y, unsigned char *u, unsigned char *v, int ystride, int uv_stride, struct loop_filter_info *lfi); - -void vp8_loop_filter_bv_c(unsigned char *y, unsigned char *u, unsigned char *v, int ystride, int uv_stride, struct loop_filter_info *lfi); -void vp8_loop_filter_bv_sse2(unsigned char *y, unsigned char *u, unsigned char *v, int ystride, int uv_stride, struct loop_filter_info *lfi); -RTCD_EXTERN void (*vp8_loop_filter_bv)(unsigned char *y, unsigned char *u, unsigned char *v, int ystride, int uv_stride, struct loop_filter_info *lfi); - -void vp8_loop_filter_mbh_c(unsigned char *y, unsigned char *u, unsigned char *v, int ystride, int uv_stride, struct loop_filter_info *lfi); -void vp8_loop_filter_mbh_sse2(unsigned char *y, unsigned char *u, unsigned char *v, int ystride, int uv_stride, struct loop_filter_info *lfi); -RTCD_EXTERN void (*vp8_loop_filter_mbh)(unsigned char *y, unsigned char *u, unsigned char *v, int ystride, int uv_stride, struct loop_filter_info *lfi); - -void vp8_loop_filter_mbv_c(unsigned char *y, unsigned char *u, unsigned char *v, int ystride, int uv_stride, struct loop_filter_info *lfi); -void vp8_loop_filter_mbv_sse2(unsigned char *y, unsigned char *u, unsigned char *v, int ystride, int uv_stride, struct loop_filter_info *lfi); -RTCD_EXTERN void (*vp8_loop_filter_mbv)(unsigned char *y, unsigned char *u, unsigned char *v, int ystride, int uv_stride, struct loop_filter_info *lfi); - -void vp8_loop_filter_bhs_c(unsigned char *y, int ystride, const unsigned char *blimit); -void vp8_loop_filter_bhs_sse2(unsigned char *y, int ystride, const unsigned char *blimit); -RTCD_EXTERN void (*vp8_loop_filter_simple_bh)(unsigned char *y, int ystride, const unsigned char *blimit); - -void vp8_loop_filter_bvs_c(unsigned char *y, int ystride, const unsigned char *blimit); -void vp8_loop_filter_bvs_sse2(unsigned char *y, int ystride, const unsigned char *blimit); -RTCD_EXTERN void (*vp8_loop_filter_simple_bv)(unsigned char *y, int ystride, const unsigned char *blimit); - -void vp8_loop_filter_simple_horizontal_edge_c(unsigned char *y, int ystride, const unsigned char *blimit); -void vp8_loop_filter_simple_horizontal_edge_sse2(unsigned char *y, int ystride, const unsigned char *blimit); -RTCD_EXTERN void (*vp8_loop_filter_simple_mbh)(unsigned char *y, int ystride, const unsigned char *blimit); - -void vp8_loop_filter_simple_vertical_edge_c(unsigned char *y, int ystride, const unsigned char *blimit); -void vp8_loop_filter_simple_vertical_edge_sse2(unsigned char *y, int ystride, const unsigned char *blimit); -RTCD_EXTERN void (*vp8_loop_filter_simple_mbv)(unsigned char *y, int ystride, const unsigned char *blimit); - -int vp8_mbblock_error_c(struct macroblock *mb, int dc); -int vp8_mbblock_error_sse2(struct macroblock *mb, int dc); -RTCD_EXTERN int (*vp8_mbblock_error)(struct macroblock *mb, int dc); - -int vp8_mbuverror_c(struct macroblock *mb); -int vp8_mbuverror_sse2(struct macroblock *mb); -RTCD_EXTERN int (*vp8_mbuverror)(struct macroblock *mb); - -int vp8_refining_search_sad_c(struct macroblock *x, struct block *b, struct blockd *d, union int_mv *ref_mv, int sad_per_bit, int distance, struct variance_vtable *fn_ptr, int *mvcost[2], union int_mv *center_mv); -int vp8_refining_search_sadx4(struct macroblock *x, struct block *b, struct blockd *d, union int_mv *ref_mv, int sad_per_bit, int distance, struct variance_vtable *fn_ptr, int *mvcost[2], union int_mv *center_mv); -RTCD_EXTERN int (*vp8_refining_search_sad)(struct macroblock *x, struct block *b, struct blockd *d, union int_mv *ref_mv, int sad_per_bit, int distance, struct variance_vtable *fn_ptr, int *mvcost[2], union int_mv *center_mv); - -void vp8_regular_quantize_b_c(struct block *, struct blockd *); -void vp8_regular_quantize_b_sse2(struct block *, struct blockd *); -void vp8_regular_quantize_b_sse4_1(struct block *, struct blockd *); -RTCD_EXTERN void (*vp8_regular_quantize_b)(struct block *, struct blockd *); - -void vp8_short_fdct4x4_c(short *input, short *output, int pitch); -void vp8_short_fdct4x4_sse2(short *input, short *output, int pitch); -RTCD_EXTERN void (*vp8_short_fdct4x4)(short *input, short *output, int pitch); - -void vp8_short_fdct8x4_c(short *input, short *output, int pitch); -void vp8_short_fdct8x4_sse2(short *input, short *output, int pitch); -RTCD_EXTERN void (*vp8_short_fdct8x4)(short *input, short *output, int pitch); - -void vp8_short_idct4x4llm_c(short *input, unsigned char *pred, int pitch, unsigned char *dst, int dst_stride); -void vp8_short_idct4x4llm_mmx(short *input, unsigned char *pred, int pitch, unsigned char *dst, int dst_stride); -RTCD_EXTERN void (*vp8_short_idct4x4llm)(short *input, unsigned char *pred, int pitch, unsigned char *dst, int dst_stride); - -void vp8_short_inv_walsh4x4_c(short *input, short *output); -void vp8_short_inv_walsh4x4_sse2(short *input, short *output); -RTCD_EXTERN void (*vp8_short_inv_walsh4x4)(short *input, short *output); - -void vp8_short_inv_walsh4x4_1_c(short *input, short *output); -#define vp8_short_inv_walsh4x4_1 vp8_short_inv_walsh4x4_1_c - -void vp8_short_walsh4x4_c(short *input, short *output, int pitch); -void vp8_short_walsh4x4_sse2(short *input, short *output, int pitch); -RTCD_EXTERN void (*vp8_short_walsh4x4)(short *input, short *output, int pitch); - -void vp8_sixtap_predict16x16_c(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch); -void vp8_sixtap_predict16x16_sse2(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch); -void vp8_sixtap_predict16x16_ssse3(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch); -RTCD_EXTERN void (*vp8_sixtap_predict16x16)(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch); - -void vp8_sixtap_predict4x4_c(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch); -void vp8_sixtap_predict4x4_mmx(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch); -void vp8_sixtap_predict4x4_ssse3(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch); -RTCD_EXTERN void (*vp8_sixtap_predict4x4)(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch); - -void vp8_sixtap_predict8x4_c(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch); -void vp8_sixtap_predict8x4_sse2(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch); -void vp8_sixtap_predict8x4_ssse3(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch); -RTCD_EXTERN void (*vp8_sixtap_predict8x4)(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch); - -void vp8_sixtap_predict8x8_c(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch); -void vp8_sixtap_predict8x8_sse2(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch); -void vp8_sixtap_predict8x8_ssse3(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch); -RTCD_EXTERN void (*vp8_sixtap_predict8x8)(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch); - -void vp8_rtcd(void); - -#ifdef RTCD_C -#include "vpx_ports/x86.h" -static void setup_rtcd_internal(void) -{ - int flags = x86_simd_caps(); - - (void)flags; - - vp8_bilinear_predict16x16 = vp8_bilinear_predict16x16_c; - if (flags & HAS_SSE2) vp8_bilinear_predict16x16 = vp8_bilinear_predict16x16_sse2; - if (flags & HAS_SSSE3) vp8_bilinear_predict16x16 = vp8_bilinear_predict16x16_ssse3; - vp8_bilinear_predict4x4 = vp8_bilinear_predict4x4_c; - if (flags & HAS_MMX) vp8_bilinear_predict4x4 = vp8_bilinear_predict4x4_mmx; - vp8_bilinear_predict8x4 = vp8_bilinear_predict8x4_c; - if (flags & HAS_MMX) vp8_bilinear_predict8x4 = vp8_bilinear_predict8x4_mmx; - vp8_bilinear_predict8x8 = vp8_bilinear_predict8x8_c; - if (flags & HAS_SSE2) vp8_bilinear_predict8x8 = vp8_bilinear_predict8x8_sse2; - if (flags & HAS_SSSE3) vp8_bilinear_predict8x8 = vp8_bilinear_predict8x8_ssse3; - vp8_block_error = vp8_block_error_c; - if (flags & HAS_SSE2) vp8_block_error = vp8_block_error_sse2; - vp8_copy32xn = vp8_copy32xn_c; - if (flags & HAS_SSE2) vp8_copy32xn = vp8_copy32xn_sse2; - if (flags & HAS_SSE3) vp8_copy32xn = vp8_copy32xn_sse3; - vp8_copy_mem16x16 = vp8_copy_mem16x16_c; - if (flags & HAS_SSE2) vp8_copy_mem16x16 = vp8_copy_mem16x16_sse2; - vp8_copy_mem8x4 = vp8_copy_mem8x4_c; - if (flags & HAS_MMX) vp8_copy_mem8x4 = vp8_copy_mem8x4_mmx; - vp8_copy_mem8x8 = vp8_copy_mem8x8_c; - if (flags & HAS_MMX) vp8_copy_mem8x8 = vp8_copy_mem8x8_mmx; - vp8_dc_only_idct_add = vp8_dc_only_idct_add_c; - if (flags & HAS_MMX) vp8_dc_only_idct_add = vp8_dc_only_idct_add_mmx; - vp8_denoiser_filter = vp8_denoiser_filter_c; - if (flags & HAS_SSE2) vp8_denoiser_filter = vp8_denoiser_filter_sse2; - vp8_denoiser_filter_uv = vp8_denoiser_filter_uv_c; - if (flags & HAS_SSE2) vp8_denoiser_filter_uv = vp8_denoiser_filter_uv_sse2; - vp8_dequant_idct_add = vp8_dequant_idct_add_c; - if (flags & HAS_MMX) vp8_dequant_idct_add = vp8_dequant_idct_add_mmx; - vp8_dequant_idct_add_uv_block = vp8_dequant_idct_add_uv_block_c; - if (flags & HAS_SSE2) vp8_dequant_idct_add_uv_block = vp8_dequant_idct_add_uv_block_sse2; - vp8_dequant_idct_add_y_block = vp8_dequant_idct_add_y_block_c; - if (flags & HAS_SSE2) vp8_dequant_idct_add_y_block = vp8_dequant_idct_add_y_block_sse2; - vp8_dequantize_b = vp8_dequantize_b_c; - if (flags & HAS_MMX) vp8_dequantize_b = vp8_dequantize_b_mmx; - vp8_diamond_search_sad = vp8_diamond_search_sad_c; - if (flags & HAS_SSE2) vp8_diamond_search_sad = vp8_diamond_search_sadx4; - vp8_fast_quantize_b = vp8_fast_quantize_b_c; - if (flags & HAS_SSE2) vp8_fast_quantize_b = vp8_fast_quantize_b_sse2; - if (flags & HAS_SSSE3) vp8_fast_quantize_b = vp8_fast_quantize_b_ssse3; - vp8_filter_by_weight16x16 = vp8_filter_by_weight16x16_c; - if (flags & HAS_SSE2) vp8_filter_by_weight16x16 = vp8_filter_by_weight16x16_sse2; - vp8_filter_by_weight8x8 = vp8_filter_by_weight8x8_c; - if (flags & HAS_SSE2) vp8_filter_by_weight8x8 = vp8_filter_by_weight8x8_sse2; - vp8_full_search_sad = vp8_full_search_sad_c; - if (flags & HAS_SSE3) vp8_full_search_sad = vp8_full_search_sadx3; - if (flags & HAS_SSE4_1) vp8_full_search_sad = vp8_full_search_sadx8; - vp8_loop_filter_bh = vp8_loop_filter_bh_c; - if (flags & HAS_SSE2) vp8_loop_filter_bh = vp8_loop_filter_bh_sse2; - vp8_loop_filter_bv = vp8_loop_filter_bv_c; - if (flags & HAS_SSE2) vp8_loop_filter_bv = vp8_loop_filter_bv_sse2; - vp8_loop_filter_mbh = vp8_loop_filter_mbh_c; - if (flags & HAS_SSE2) vp8_loop_filter_mbh = vp8_loop_filter_mbh_sse2; - vp8_loop_filter_mbv = vp8_loop_filter_mbv_c; - if (flags & HAS_SSE2) vp8_loop_filter_mbv = vp8_loop_filter_mbv_sse2; - vp8_loop_filter_simple_bh = vp8_loop_filter_bhs_c; - if (flags & HAS_SSE2) vp8_loop_filter_simple_bh = vp8_loop_filter_bhs_sse2; - vp8_loop_filter_simple_bv = vp8_loop_filter_bvs_c; - if (flags & HAS_SSE2) vp8_loop_filter_simple_bv = vp8_loop_filter_bvs_sse2; - vp8_loop_filter_simple_mbh = vp8_loop_filter_simple_horizontal_edge_c; - if (flags & HAS_SSE2) vp8_loop_filter_simple_mbh = vp8_loop_filter_simple_horizontal_edge_sse2; - vp8_loop_filter_simple_mbv = vp8_loop_filter_simple_vertical_edge_c; - if (flags & HAS_SSE2) vp8_loop_filter_simple_mbv = vp8_loop_filter_simple_vertical_edge_sse2; - vp8_mbblock_error = vp8_mbblock_error_c; - if (flags & HAS_SSE2) vp8_mbblock_error = vp8_mbblock_error_sse2; - vp8_mbuverror = vp8_mbuverror_c; - if (flags & HAS_SSE2) vp8_mbuverror = vp8_mbuverror_sse2; - vp8_refining_search_sad = vp8_refining_search_sad_c; - if (flags & HAS_SSE2) vp8_refining_search_sad = vp8_refining_search_sadx4; - vp8_regular_quantize_b = vp8_regular_quantize_b_c; - if (flags & HAS_SSE2) vp8_regular_quantize_b = vp8_regular_quantize_b_sse2; - if (flags & HAS_SSE4_1) vp8_regular_quantize_b = vp8_regular_quantize_b_sse4_1; - vp8_short_fdct4x4 = vp8_short_fdct4x4_c; - if (flags & HAS_SSE2) vp8_short_fdct4x4 = vp8_short_fdct4x4_sse2; - vp8_short_fdct8x4 = vp8_short_fdct8x4_c; - if (flags & HAS_SSE2) vp8_short_fdct8x4 = vp8_short_fdct8x4_sse2; - vp8_short_idct4x4llm = vp8_short_idct4x4llm_c; - if (flags & HAS_MMX) vp8_short_idct4x4llm = vp8_short_idct4x4llm_mmx; - vp8_short_inv_walsh4x4 = vp8_short_inv_walsh4x4_c; - if (flags & HAS_SSE2) vp8_short_inv_walsh4x4 = vp8_short_inv_walsh4x4_sse2; - vp8_short_walsh4x4 = vp8_short_walsh4x4_c; - if (flags & HAS_SSE2) vp8_short_walsh4x4 = vp8_short_walsh4x4_sse2; - vp8_sixtap_predict16x16 = vp8_sixtap_predict16x16_c; - if (flags & HAS_SSE2) vp8_sixtap_predict16x16 = vp8_sixtap_predict16x16_sse2; - if (flags & HAS_SSSE3) vp8_sixtap_predict16x16 = vp8_sixtap_predict16x16_ssse3; - vp8_sixtap_predict4x4 = vp8_sixtap_predict4x4_c; - if (flags & HAS_MMX) vp8_sixtap_predict4x4 = vp8_sixtap_predict4x4_mmx; - if (flags & HAS_SSSE3) vp8_sixtap_predict4x4 = vp8_sixtap_predict4x4_ssse3; - vp8_sixtap_predict8x4 = vp8_sixtap_predict8x4_c; - if (flags & HAS_SSE2) vp8_sixtap_predict8x4 = vp8_sixtap_predict8x4_sse2; - if (flags & HAS_SSSE3) vp8_sixtap_predict8x4 = vp8_sixtap_predict8x4_ssse3; - vp8_sixtap_predict8x8 = vp8_sixtap_predict8x8_c; - if (flags & HAS_SSE2) vp8_sixtap_predict8x8 = vp8_sixtap_predict8x8_sse2; - if (flags & HAS_SSSE3) vp8_sixtap_predict8x8 = vp8_sixtap_predict8x8_ssse3; -} -#endif - -#ifdef __cplusplus -} // extern "C" -#endif - -#endif diff --git a/WebRtc.NET/include/third_party/libvpx/source/config/win/ia32/vp9_rtcd.h b/WebRtc.NET/include/third_party/libvpx/source/config/win/ia32/vp9_rtcd.h deleted file mode 100644 index 28b5da86..00000000 --- a/WebRtc.NET/include/third_party/libvpx/source/config/win/ia32/vp9_rtcd.h +++ /dev/null @@ -1,197 +0,0 @@ -#ifndef VP9_RTCD_H_ -#define VP9_RTCD_H_ - -#ifdef RTCD_C -#define RTCD_EXTERN -#else -#define RTCD_EXTERN extern -#endif - -/* - * VP9 - */ - -#include "vpx/vpx_integer.h" -#include "vp9/common/vp9_common.h" -#include "vp9/common/vp9_enums.h" - -struct macroblockd; - -/* Encoder forward decls */ -struct macroblock; -struct vp9_variance_vtable; -struct search_site_config; -struct mv; -union int_mv; -struct yv12_buffer_config; - -#ifdef __cplusplus -extern "C" { -#endif - -int64_t vp9_block_error_c(const tran_low_t *coeff, const tran_low_t *dqcoeff, intptr_t block_size, int64_t *ssz); -#define vp9_block_error vp9_block_error_c - -int vp9_denoiser_filter_c(const uint8_t *sig, int sig_stride, const uint8_t *mc_avg, int mc_avg_stride, uint8_t *avg, int avg_stride, int increase_denoising, BLOCK_SIZE bs, int motion_magnitude); -int vp9_denoiser_filter_sse2(const uint8_t *sig, int sig_stride, const uint8_t *mc_avg, int mc_avg_stride, uint8_t *avg, int avg_stride, int increase_denoising, BLOCK_SIZE bs, int motion_magnitude); -RTCD_EXTERN int (*vp9_denoiser_filter)(const uint8_t *sig, int sig_stride, const uint8_t *mc_avg, int mc_avg_stride, uint8_t *avg, int avg_stride, int increase_denoising, BLOCK_SIZE bs, int motion_magnitude); - -int vp9_diamond_search_sad_c(const struct macroblock *x, const struct search_site_config *cfg, struct mv *ref_mv, struct mv *best_mv, int search_param, int sad_per_bit, int *num00, const struct vp9_variance_vtable *fn_ptr, const struct mv *center_mv); -int vp9_diamond_search_sad_avx(const struct macroblock *x, const struct search_site_config *cfg, struct mv *ref_mv, struct mv *best_mv, int search_param, int sad_per_bit, int *num00, const struct vp9_variance_vtable *fn_ptr, const struct mv *center_mv); -RTCD_EXTERN int (*vp9_diamond_search_sad)(const struct macroblock *x, const struct search_site_config *cfg, struct mv *ref_mv, struct mv *best_mv, int search_param, int sad_per_bit, int *num00, const struct vp9_variance_vtable *fn_ptr, const struct mv *center_mv); - -void vp9_fdct8x8_quant_c(const int16_t *input, int stride, tran_low_t *coeff_ptr, intptr_t n_coeffs, int skip_block, const int16_t *zbin_ptr, const int16_t *round_ptr, const int16_t *quant_ptr, const int16_t *quant_shift_ptr, tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr, const int16_t *dequant_ptr, uint16_t *eob_ptr, const int16_t *scan, const int16_t *iscan); -void vp9_fdct8x8_quant_ssse3(const int16_t *input, int stride, tran_low_t *coeff_ptr, intptr_t n_coeffs, int skip_block, const int16_t *zbin_ptr, const int16_t *round_ptr, const int16_t *quant_ptr, const int16_t *quant_shift_ptr, tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr, const int16_t *dequant_ptr, uint16_t *eob_ptr, const int16_t *scan, const int16_t *iscan); -RTCD_EXTERN void (*vp9_fdct8x8_quant)(const int16_t *input, int stride, tran_low_t *coeff_ptr, intptr_t n_coeffs, int skip_block, const int16_t *zbin_ptr, const int16_t *round_ptr, const int16_t *quant_ptr, const int16_t *quant_shift_ptr, tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr, const int16_t *dequant_ptr, uint16_t *eob_ptr, const int16_t *scan, const int16_t *iscan); - -void vp9_fht16x16_c(const int16_t *input, tran_low_t *output, int stride, int tx_type); -void vp9_fht16x16_sse2(const int16_t *input, tran_low_t *output, int stride, int tx_type); -RTCD_EXTERN void (*vp9_fht16x16)(const int16_t *input, tran_low_t *output, int stride, int tx_type); - -void vp9_fht4x4_c(const int16_t *input, tran_low_t *output, int stride, int tx_type); -void vp9_fht4x4_sse2(const int16_t *input, tran_low_t *output, int stride, int tx_type); -RTCD_EXTERN void (*vp9_fht4x4)(const int16_t *input, tran_low_t *output, int stride, int tx_type); - -void vp9_fht8x8_c(const int16_t *input, tran_low_t *output, int stride, int tx_type); -void vp9_fht8x8_sse2(const int16_t *input, tran_low_t *output, int stride, int tx_type); -RTCD_EXTERN void (*vp9_fht8x8)(const int16_t *input, tran_low_t *output, int stride, int tx_type); - -void vp9_filter_by_weight16x16_c(const uint8_t *src, int src_stride, uint8_t *dst, int dst_stride, int src_weight); -void vp9_filter_by_weight16x16_sse2(const uint8_t *src, int src_stride, uint8_t *dst, int dst_stride, int src_weight); -RTCD_EXTERN void (*vp9_filter_by_weight16x16)(const uint8_t *src, int src_stride, uint8_t *dst, int dst_stride, int src_weight); - -void vp9_filter_by_weight8x8_c(const uint8_t *src, int src_stride, uint8_t *dst, int dst_stride, int src_weight); -void vp9_filter_by_weight8x8_sse2(const uint8_t *src, int src_stride, uint8_t *dst, int dst_stride, int src_weight); -RTCD_EXTERN void (*vp9_filter_by_weight8x8)(const uint8_t *src, int src_stride, uint8_t *dst, int dst_stride, int src_weight); - -int vp9_full_search_sad_c(const struct macroblock *x, const struct mv *ref_mv, int sad_per_bit, int distance, const struct vp9_variance_vtable *fn_ptr, const struct mv *center_mv, struct mv *best_mv); -int vp9_full_search_sadx3(const struct macroblock *x, const struct mv *ref_mv, int sad_per_bit, int distance, const struct vp9_variance_vtable *fn_ptr, const struct mv *center_mv, struct mv *best_mv); -int vp9_full_search_sadx8(const struct macroblock *x, const struct mv *ref_mv, int sad_per_bit, int distance, const struct vp9_variance_vtable *fn_ptr, const struct mv *center_mv, struct mv *best_mv); -RTCD_EXTERN int (*vp9_full_search_sad)(const struct macroblock *x, const struct mv *ref_mv, int sad_per_bit, int distance, const struct vp9_variance_vtable *fn_ptr, const struct mv *center_mv, struct mv *best_mv); - -void vp9_fwht4x4_c(const int16_t *input, tran_low_t *output, int stride); -void vp9_fwht4x4_sse2(const int16_t *input, tran_low_t *output, int stride); -RTCD_EXTERN void (*vp9_fwht4x4)(const int16_t *input, tran_low_t *output, int stride); - -int64_t vp9_highbd_block_error_c(const tran_low_t *coeff, const tran_low_t *dqcoeff, intptr_t block_size, int64_t *ssz, int bd); -int64_t vp9_highbd_block_error_sse2(const tran_low_t *coeff, const tran_low_t *dqcoeff, intptr_t block_size, int64_t *ssz, int bd); -RTCD_EXTERN int64_t (*vp9_highbd_block_error)(const tran_low_t *coeff, const tran_low_t *dqcoeff, intptr_t block_size, int64_t *ssz, int bd); - -int64_t vp9_highbd_block_error_8bit_c(const tran_low_t *coeff, const tran_low_t *dqcoeff, intptr_t block_size, int64_t *ssz); -int64_t vp9_highbd_block_error_8bit_sse2(const tran_low_t *coeff, const tran_low_t *dqcoeff, intptr_t block_size, int64_t *ssz); -int64_t vp9_highbd_block_error_8bit_avx(const tran_low_t *coeff, const tran_low_t *dqcoeff, intptr_t block_size, int64_t *ssz); -RTCD_EXTERN int64_t (*vp9_highbd_block_error_8bit)(const tran_low_t *coeff, const tran_low_t *dqcoeff, intptr_t block_size, int64_t *ssz); - -void vp9_highbd_fht16x16_c(const int16_t *input, tran_low_t *output, int stride, int tx_type); -#define vp9_highbd_fht16x16 vp9_highbd_fht16x16_c - -void vp9_highbd_fht4x4_c(const int16_t *input, tran_low_t *output, int stride, int tx_type); -#define vp9_highbd_fht4x4 vp9_highbd_fht4x4_c - -void vp9_highbd_fht8x8_c(const int16_t *input, tran_low_t *output, int stride, int tx_type); -#define vp9_highbd_fht8x8 vp9_highbd_fht8x8_c - -void vp9_highbd_fwht4x4_c(const int16_t *input, tran_low_t *output, int stride); -#define vp9_highbd_fwht4x4 vp9_highbd_fwht4x4_c - -void vp9_highbd_iht16x16_256_add_c(const tran_low_t *input, uint8_t *output, int pitch, int tx_type, int bd); -#define vp9_highbd_iht16x16_256_add vp9_highbd_iht16x16_256_add_c - -void vp9_highbd_iht4x4_16_add_c(const tran_low_t *input, uint8_t *dest, int stride, int tx_type, int bd); -#define vp9_highbd_iht4x4_16_add vp9_highbd_iht4x4_16_add_c - -void vp9_highbd_iht8x8_64_add_c(const tran_low_t *input, uint8_t *dest, int stride, int tx_type, int bd); -#define vp9_highbd_iht8x8_64_add vp9_highbd_iht8x8_64_add_c - -void vp9_highbd_mbpost_proc_across_ip_c(uint16_t *src, int pitch, int rows, int cols, int flimit); -#define vp9_highbd_mbpost_proc_across_ip vp9_highbd_mbpost_proc_across_ip_c - -void vp9_highbd_mbpost_proc_down_c(uint16_t *dst, int pitch, int rows, int cols, int flimit); -#define vp9_highbd_mbpost_proc_down vp9_highbd_mbpost_proc_down_c - -void vp9_highbd_post_proc_down_and_across_c(const uint16_t *src_ptr, uint16_t *dst_ptr, int src_pixels_per_line, int dst_pixels_per_line, int rows, int cols, int flimit); -#define vp9_highbd_post_proc_down_and_across vp9_highbd_post_proc_down_and_across_c - -void vp9_highbd_quantize_fp_c(const tran_low_t *coeff_ptr, intptr_t n_coeffs, int skip_block, const int16_t *zbin_ptr, const int16_t *round_ptr, const int16_t *quant_ptr, const int16_t *quant_shift_ptr, tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr, const int16_t *dequant_ptr, uint16_t *eob_ptr, const int16_t *scan, const int16_t *iscan); -#define vp9_highbd_quantize_fp vp9_highbd_quantize_fp_c - -void vp9_highbd_quantize_fp_32x32_c(const tran_low_t *coeff_ptr, intptr_t n_coeffs, int skip_block, const int16_t *zbin_ptr, const int16_t *round_ptr, const int16_t *quant_ptr, const int16_t *quant_shift_ptr, tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr, const int16_t *dequant_ptr, uint16_t *eob_ptr, const int16_t *scan, const int16_t *iscan); -#define vp9_highbd_quantize_fp_32x32 vp9_highbd_quantize_fp_32x32_c - -void vp9_highbd_temporal_filter_apply_c(uint8_t *frame1, unsigned int stride, uint8_t *frame2, unsigned int block_width, unsigned int block_height, int strength, int filter_weight, unsigned int *accumulator, uint16_t *count); -#define vp9_highbd_temporal_filter_apply vp9_highbd_temporal_filter_apply_c - -void vp9_iht16x16_256_add_c(const tran_low_t *input, uint8_t *output, int pitch, int tx_type); -void vp9_iht16x16_256_add_sse2(const tran_low_t *input, uint8_t *output, int pitch, int tx_type); -RTCD_EXTERN void (*vp9_iht16x16_256_add)(const tran_low_t *input, uint8_t *output, int pitch, int tx_type); - -void vp9_iht4x4_16_add_c(const tran_low_t *input, uint8_t *dest, int stride, int tx_type); -void vp9_iht4x4_16_add_sse2(const tran_low_t *input, uint8_t *dest, int stride, int tx_type); -RTCD_EXTERN void (*vp9_iht4x4_16_add)(const tran_low_t *input, uint8_t *dest, int stride, int tx_type); - -void vp9_iht8x8_64_add_c(const tran_low_t *input, uint8_t *dest, int stride, int tx_type); -void vp9_iht8x8_64_add_sse2(const tran_low_t *input, uint8_t *dest, int stride, int tx_type); -RTCD_EXTERN void (*vp9_iht8x8_64_add)(const tran_low_t *input, uint8_t *dest, int stride, int tx_type); - -void vp9_quantize_fp_c(const tran_low_t *coeff_ptr, intptr_t n_coeffs, int skip_block, const int16_t *zbin_ptr, const int16_t *round_ptr, const int16_t *quant_ptr, const int16_t *quant_shift_ptr, tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr, const int16_t *dequant_ptr, uint16_t *eob_ptr, const int16_t *scan, const int16_t *iscan); -#define vp9_quantize_fp vp9_quantize_fp_c - -void vp9_quantize_fp_32x32_c(const tran_low_t *coeff_ptr, intptr_t n_coeffs, int skip_block, const int16_t *zbin_ptr, const int16_t *round_ptr, const int16_t *quant_ptr, const int16_t *quant_shift_ptr, tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr, const int16_t *dequant_ptr, uint16_t *eob_ptr, const int16_t *scan, const int16_t *iscan); -#define vp9_quantize_fp_32x32 vp9_quantize_fp_32x32_c - -void vp9_temporal_filter_apply_c(uint8_t *frame1, unsigned int stride, uint8_t *frame2, unsigned int block_width, unsigned int block_height, int strength, int filter_weight, unsigned int *accumulator, uint16_t *count); -void vp9_temporal_filter_apply_sse2(uint8_t *frame1, unsigned int stride, uint8_t *frame2, unsigned int block_width, unsigned int block_height, int strength, int filter_weight, unsigned int *accumulator, uint16_t *count); -RTCD_EXTERN void (*vp9_temporal_filter_apply)(uint8_t *frame1, unsigned int stride, uint8_t *frame2, unsigned int block_width, unsigned int block_height, int strength, int filter_weight, unsigned int *accumulator, uint16_t *count); - -void vp9_rtcd(void); - -#ifdef RTCD_C -#include "vpx_ports/x86.h" -static void setup_rtcd_internal(void) -{ - int flags = x86_simd_caps(); - - (void)flags; - - vp9_denoiser_filter = vp9_denoiser_filter_c; - if (flags & HAS_SSE2) vp9_denoiser_filter = vp9_denoiser_filter_sse2; - vp9_diamond_search_sad = vp9_diamond_search_sad_c; - if (flags & HAS_AVX) vp9_diamond_search_sad = vp9_diamond_search_sad_avx; - vp9_fdct8x8_quant = vp9_fdct8x8_quant_c; - if (flags & HAS_SSSE3) vp9_fdct8x8_quant = vp9_fdct8x8_quant_ssse3; - vp9_fht16x16 = vp9_fht16x16_c; - if (flags & HAS_SSE2) vp9_fht16x16 = vp9_fht16x16_sse2; - vp9_fht4x4 = vp9_fht4x4_c; - if (flags & HAS_SSE2) vp9_fht4x4 = vp9_fht4x4_sse2; - vp9_fht8x8 = vp9_fht8x8_c; - if (flags & HAS_SSE2) vp9_fht8x8 = vp9_fht8x8_sse2; - vp9_filter_by_weight16x16 = vp9_filter_by_weight16x16_c; - if (flags & HAS_SSE2) vp9_filter_by_weight16x16 = vp9_filter_by_weight16x16_sse2; - vp9_filter_by_weight8x8 = vp9_filter_by_weight8x8_c; - if (flags & HAS_SSE2) vp9_filter_by_weight8x8 = vp9_filter_by_weight8x8_sse2; - vp9_full_search_sad = vp9_full_search_sad_c; - if (flags & HAS_SSE3) vp9_full_search_sad = vp9_full_search_sadx3; - if (flags & HAS_SSE4_1) vp9_full_search_sad = vp9_full_search_sadx8; - vp9_fwht4x4 = vp9_fwht4x4_c; - if (flags & HAS_SSE2) vp9_fwht4x4 = vp9_fwht4x4_sse2; - vp9_highbd_block_error = vp9_highbd_block_error_c; - if (flags & HAS_SSE2) vp9_highbd_block_error = vp9_highbd_block_error_sse2; - vp9_highbd_block_error_8bit = vp9_highbd_block_error_8bit_c; - if (flags & HAS_SSE2) vp9_highbd_block_error_8bit = vp9_highbd_block_error_8bit_sse2; - if (flags & HAS_AVX) vp9_highbd_block_error_8bit = vp9_highbd_block_error_8bit_avx; - vp9_iht16x16_256_add = vp9_iht16x16_256_add_c; - if (flags & HAS_SSE2) vp9_iht16x16_256_add = vp9_iht16x16_256_add_sse2; - vp9_iht4x4_16_add = vp9_iht4x4_16_add_c; - if (flags & HAS_SSE2) vp9_iht4x4_16_add = vp9_iht4x4_16_add_sse2; - vp9_iht8x8_64_add = vp9_iht8x8_64_add_c; - if (flags & HAS_SSE2) vp9_iht8x8_64_add = vp9_iht8x8_64_add_sse2; - vp9_temporal_filter_apply = vp9_temporal_filter_apply_c; - if (flags & HAS_SSE2) vp9_temporal_filter_apply = vp9_temporal_filter_apply_sse2; -} -#endif - -#ifdef __cplusplus -} // extern "C" -#endif - -#endif diff --git a/WebRtc.NET/include/third_party/libvpx/source/config/win/ia32/vpx_config.h b/WebRtc.NET/include/third_party/libvpx/source/config/win/ia32/vpx_config.h deleted file mode 100644 index 3b93eeec..00000000 --- a/WebRtc.NET/include/third_party/libvpx/source/config/win/ia32/vpx_config.h +++ /dev/null @@ -1,94 +0,0 @@ -/* Copyright (c) 2011 The WebM project authors. All Rights Reserved. */ -/* */ -/* Use of this source code is governed by a BSD-style license */ -/* that can be found in the LICENSE file in the root of the source */ -/* tree. An additional intellectual property rights grant can be found */ -/* in the file PATENTS. All contributing project authors may */ -/* be found in the AUTHORS file in the root of the source tree. */ -/* This file automatically generated by configure. Do not edit! */ -#ifndef VPX_CONFIG_H -#define VPX_CONFIG_H -#define RESTRICT -#define INLINE __forceinline -#define ARCH_ARM 0 -#define ARCH_MIPS 0 -#define ARCH_X86 1 -#define ARCH_X86_64 0 -#define HAVE_NEON 0 -#define HAVE_NEON_ASM 0 -#define HAVE_MIPS32 0 -#define HAVE_DSPR2 0 -#define HAVE_MSA 0 -#define HAVE_MIPS64 0 -#define HAVE_MMX 1 -#define HAVE_SSE 1 -#define HAVE_SSE2 1 -#define HAVE_SSE3 1 -#define HAVE_SSSE3 1 -#define HAVE_SSE4_1 1 -#define HAVE_AVX 1 -#define HAVE_AVX2 1 -#define HAVE_VPX_PORTS 1 -#define HAVE_PTHREAD_H 0 -#define HAVE_UNISTD_H 0 -#define CONFIG_DEPENDENCY_TRACKING 1 -#define CONFIG_EXTERNAL_BUILD 1 -#define CONFIG_INSTALL_DOCS 0 -#define CONFIG_INSTALL_BINS 1 -#define CONFIG_INSTALL_LIBS 1 -#define CONFIG_INSTALL_SRCS 0 -#define CONFIG_DEBUG 0 -#define CONFIG_GPROF 0 -#define CONFIG_GCOV 0 -#define CONFIG_RVCT 0 -#define CONFIG_GCC 0 -#define CONFIG_MSVS 1 -#define CONFIG_PIC 1 -#define CONFIG_BIG_ENDIAN 0 -#define CONFIG_CODEC_SRCS 0 -#define CONFIG_DEBUG_LIBS 0 -#define CONFIG_DEQUANT_TOKENS 0 -#define CONFIG_DC_RECON 0 -#define CONFIG_RUNTIME_CPU_DETECT 1 -#define CONFIG_POSTPROC 1 -#define CONFIG_VP9_POSTPROC 1 -#define CONFIG_MULTITHREAD 1 -#define CONFIG_INTERNAL_STATS 0 -#define CONFIG_VP8_ENCODER 1 -#define CONFIG_VP8_DECODER 1 -#define CONFIG_VP9_ENCODER 1 -#define CONFIG_VP9_DECODER 1 -#define CONFIG_VP8 1 -#define CONFIG_VP9 1 -#define CONFIG_ENCODERS 1 -#define CONFIG_DECODERS 1 -#define CONFIG_STATIC_MSVCRT 0 -#define CONFIG_SPATIAL_RESAMPLING 1 -#define CONFIG_REALTIME_ONLY 1 -#define CONFIG_ONTHEFLY_BITPACKING 0 -#define CONFIG_ERROR_CONCEALMENT 0 -#define CONFIG_SHARED 0 -#define CONFIG_STATIC 1 -#define CONFIG_SMALL 0 -#define CONFIG_POSTPROC_VISUALIZER 0 -#define CONFIG_OS_SUPPORT 1 -#define CONFIG_UNIT_TESTS 1 -#define CONFIG_WEBM_IO 1 -#define CONFIG_LIBYUV 1 -#define CONFIG_DECODE_PERF_TESTS 0 -#define CONFIG_ENCODE_PERF_TESTS 0 -#define CONFIG_MULTI_RES_ENCODING 1 -#define CONFIG_TEMPORAL_DENOISING 1 -#define CONFIG_VP9_TEMPORAL_DENOISING 1 -#define CONFIG_COEFFICIENT_RANGE_CHECKING 0 -#define CONFIG_VP9_HIGHBITDEPTH 1 -#define CONFIG_BETTER_HW_COMPATIBILITY 0 -#define CONFIG_EXPERIMENTAL 0 -#define CONFIG_SIZE_LIMIT 1 -#define CONFIG_SPATIAL_SVC 0 -#define CONFIG_FP_MB_STATS 0 -#define CONFIG_EMULATE_HARDWARE 0 -#define CONFIG_MISC_FIXES 0 -#define DECODE_WIDTH_LIMIT 16384 -#define DECODE_HEIGHT_LIMIT 16384 -#endif /* VPX_CONFIG_H */ diff --git a/WebRtc.NET/include/third_party/libvpx/source/config/win/ia32/vpx_dsp_rtcd.h b/WebRtc.NET/include/third_party/libvpx/source/config/win/ia32/vpx_dsp_rtcd.h deleted file mode 100644 index 58079fa4..00000000 --- a/WebRtc.NET/include/third_party/libvpx/source/config/win/ia32/vpx_dsp_rtcd.h +++ /dev/null @@ -1,2899 +0,0 @@ -#ifndef VPX_DSP_RTCD_H_ -#define VPX_DSP_RTCD_H_ - -#ifdef RTCD_C -#define RTCD_EXTERN -#else -#define RTCD_EXTERN extern -#endif - -/* - * DSP - */ - -#include "vpx/vpx_integer.h" -#include "vpx_dsp/vpx_dsp_common.h" - - -#ifdef __cplusplus -extern "C" { -#endif - -unsigned int vpx_avg_4x4_c(const uint8_t *, int p); -unsigned int vpx_avg_4x4_sse2(const uint8_t *, int p); -RTCD_EXTERN unsigned int (*vpx_avg_4x4)(const uint8_t *, int p); - -unsigned int vpx_avg_8x8_c(const uint8_t *, int p); -unsigned int vpx_avg_8x8_sse2(const uint8_t *, int p); -RTCD_EXTERN unsigned int (*vpx_avg_8x8)(const uint8_t *, int p); - -void vpx_comp_avg_pred_c(uint8_t *comp_pred, const uint8_t *pred, int width, int height, const uint8_t *ref, int ref_stride); -#define vpx_comp_avg_pred vpx_comp_avg_pred_c - -void vpx_convolve8_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -void vpx_convolve8_sse2(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -void vpx_convolve8_ssse3(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -void vpx_convolve8_avx2(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -RTCD_EXTERN void (*vpx_convolve8)(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); - -void vpx_convolve8_avg_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -void vpx_convolve8_avg_sse2(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -void vpx_convolve8_avg_ssse3(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -RTCD_EXTERN void (*vpx_convolve8_avg)(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); - -void vpx_convolve8_avg_horiz_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -void vpx_convolve8_avg_horiz_sse2(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -void vpx_convolve8_avg_horiz_ssse3(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -RTCD_EXTERN void (*vpx_convolve8_avg_horiz)(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); - -void vpx_convolve8_avg_vert_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -void vpx_convolve8_avg_vert_sse2(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -void vpx_convolve8_avg_vert_ssse3(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -RTCD_EXTERN void (*vpx_convolve8_avg_vert)(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); - -void vpx_convolve8_horiz_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -void vpx_convolve8_horiz_sse2(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -void vpx_convolve8_horiz_ssse3(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -void vpx_convolve8_horiz_avx2(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -RTCD_EXTERN void (*vpx_convolve8_horiz)(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); - -void vpx_convolve8_vert_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -void vpx_convolve8_vert_sse2(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -void vpx_convolve8_vert_ssse3(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -void vpx_convolve8_vert_avx2(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -RTCD_EXTERN void (*vpx_convolve8_vert)(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); - -void vpx_convolve_avg_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -void vpx_convolve_avg_sse2(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -RTCD_EXTERN void (*vpx_convolve_avg)(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); - -void vpx_convolve_copy_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -void vpx_convolve_copy_sse2(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -RTCD_EXTERN void (*vpx_convolve_copy)(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); - -void vpx_d117_predictor_16x16_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d117_predictor_16x16 vpx_d117_predictor_16x16_c - -void vpx_d117_predictor_32x32_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d117_predictor_32x32 vpx_d117_predictor_32x32_c - -void vpx_d117_predictor_4x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d117_predictor_4x4 vpx_d117_predictor_4x4_c - -void vpx_d117_predictor_8x8_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d117_predictor_8x8 vpx_d117_predictor_8x8_c - -void vpx_d135_predictor_16x16_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d135_predictor_16x16 vpx_d135_predictor_16x16_c - -void vpx_d135_predictor_32x32_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d135_predictor_32x32 vpx_d135_predictor_32x32_c - -void vpx_d135_predictor_4x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d135_predictor_4x4 vpx_d135_predictor_4x4_c - -void vpx_d135_predictor_8x8_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d135_predictor_8x8 vpx_d135_predictor_8x8_c - -void vpx_d153_predictor_16x16_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_d153_predictor_16x16_ssse3(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -RTCD_EXTERN void (*vpx_d153_predictor_16x16)(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); - -void vpx_d153_predictor_32x32_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_d153_predictor_32x32_ssse3(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -RTCD_EXTERN void (*vpx_d153_predictor_32x32)(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); - -void vpx_d153_predictor_4x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_d153_predictor_4x4_ssse3(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -RTCD_EXTERN void (*vpx_d153_predictor_4x4)(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); - -void vpx_d153_predictor_8x8_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_d153_predictor_8x8_ssse3(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -RTCD_EXTERN void (*vpx_d153_predictor_8x8)(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); - -void vpx_d207_predictor_16x16_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_d207_predictor_16x16_ssse3(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -RTCD_EXTERN void (*vpx_d207_predictor_16x16)(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); - -void vpx_d207_predictor_32x32_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_d207_predictor_32x32_ssse3(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -RTCD_EXTERN void (*vpx_d207_predictor_32x32)(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); - -void vpx_d207_predictor_4x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_d207_predictor_4x4_sse2(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -RTCD_EXTERN void (*vpx_d207_predictor_4x4)(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); - -void vpx_d207_predictor_8x8_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_d207_predictor_8x8_ssse3(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -RTCD_EXTERN void (*vpx_d207_predictor_8x8)(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); - -void vpx_d207e_predictor_16x16_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d207e_predictor_16x16 vpx_d207e_predictor_16x16_c - -void vpx_d207e_predictor_32x32_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d207e_predictor_32x32 vpx_d207e_predictor_32x32_c - -void vpx_d207e_predictor_4x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d207e_predictor_4x4 vpx_d207e_predictor_4x4_c - -void vpx_d207e_predictor_8x8_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d207e_predictor_8x8 vpx_d207e_predictor_8x8_c - -void vpx_d45_predictor_16x16_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_d45_predictor_16x16_ssse3(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -RTCD_EXTERN void (*vpx_d45_predictor_16x16)(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); - -void vpx_d45_predictor_32x32_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_d45_predictor_32x32_ssse3(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -RTCD_EXTERN void (*vpx_d45_predictor_32x32)(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); - -void vpx_d45_predictor_4x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_d45_predictor_4x4_sse2(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -RTCD_EXTERN void (*vpx_d45_predictor_4x4)(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); - -void vpx_d45_predictor_8x8_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_d45_predictor_8x8_sse2(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -RTCD_EXTERN void (*vpx_d45_predictor_8x8)(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); - -void vpx_d45e_predictor_16x16_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d45e_predictor_16x16 vpx_d45e_predictor_16x16_c - -void vpx_d45e_predictor_32x32_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d45e_predictor_32x32 vpx_d45e_predictor_32x32_c - -void vpx_d45e_predictor_4x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d45e_predictor_4x4 vpx_d45e_predictor_4x4_c - -void vpx_d45e_predictor_8x8_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d45e_predictor_8x8 vpx_d45e_predictor_8x8_c - -void vpx_d63_predictor_16x16_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_d63_predictor_16x16_ssse3(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -RTCD_EXTERN void (*vpx_d63_predictor_16x16)(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); - -void vpx_d63_predictor_32x32_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_d63_predictor_32x32_ssse3(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -RTCD_EXTERN void (*vpx_d63_predictor_32x32)(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); - -void vpx_d63_predictor_4x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_d63_predictor_4x4_ssse3(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -RTCD_EXTERN void (*vpx_d63_predictor_4x4)(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); - -void vpx_d63_predictor_8x8_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_d63_predictor_8x8_ssse3(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -RTCD_EXTERN void (*vpx_d63_predictor_8x8)(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); - -void vpx_d63e_predictor_16x16_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d63e_predictor_16x16 vpx_d63e_predictor_16x16_c - -void vpx_d63e_predictor_32x32_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d63e_predictor_32x32 vpx_d63e_predictor_32x32_c - -void vpx_d63e_predictor_4x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d63e_predictor_4x4 vpx_d63e_predictor_4x4_c - -void vpx_d63e_predictor_8x8_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d63e_predictor_8x8 vpx_d63e_predictor_8x8_c - -void vpx_d63f_predictor_4x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d63f_predictor_4x4 vpx_d63f_predictor_4x4_c - -void vpx_dc_128_predictor_16x16_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_dc_128_predictor_16x16_sse2(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -RTCD_EXTERN void (*vpx_dc_128_predictor_16x16)(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); - -void vpx_dc_128_predictor_32x32_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_dc_128_predictor_32x32_sse2(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -RTCD_EXTERN void (*vpx_dc_128_predictor_32x32)(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); - -void vpx_dc_128_predictor_4x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_dc_128_predictor_4x4_sse2(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -RTCD_EXTERN void (*vpx_dc_128_predictor_4x4)(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); - -void vpx_dc_128_predictor_8x8_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_dc_128_predictor_8x8_sse2(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -RTCD_EXTERN void (*vpx_dc_128_predictor_8x8)(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); - -void vpx_dc_left_predictor_16x16_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_dc_left_predictor_16x16_sse2(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -RTCD_EXTERN void (*vpx_dc_left_predictor_16x16)(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); - -void vpx_dc_left_predictor_32x32_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_dc_left_predictor_32x32_sse2(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -RTCD_EXTERN void (*vpx_dc_left_predictor_32x32)(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); - -void vpx_dc_left_predictor_4x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_dc_left_predictor_4x4_sse2(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -RTCD_EXTERN void (*vpx_dc_left_predictor_4x4)(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); - -void vpx_dc_left_predictor_8x8_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_dc_left_predictor_8x8_sse2(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -RTCD_EXTERN void (*vpx_dc_left_predictor_8x8)(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); - -void vpx_dc_predictor_16x16_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_dc_predictor_16x16_sse2(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -RTCD_EXTERN void (*vpx_dc_predictor_16x16)(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); - -void vpx_dc_predictor_32x32_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_dc_predictor_32x32_sse2(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -RTCD_EXTERN void (*vpx_dc_predictor_32x32)(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); - -void vpx_dc_predictor_4x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_dc_predictor_4x4_sse2(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -RTCD_EXTERN void (*vpx_dc_predictor_4x4)(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); - -void vpx_dc_predictor_8x8_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_dc_predictor_8x8_sse2(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -RTCD_EXTERN void (*vpx_dc_predictor_8x8)(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); - -void vpx_dc_top_predictor_16x16_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_dc_top_predictor_16x16_sse2(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -RTCD_EXTERN void (*vpx_dc_top_predictor_16x16)(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); - -void vpx_dc_top_predictor_32x32_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_dc_top_predictor_32x32_sse2(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -RTCD_EXTERN void (*vpx_dc_top_predictor_32x32)(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); - -void vpx_dc_top_predictor_4x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_dc_top_predictor_4x4_sse2(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -RTCD_EXTERN void (*vpx_dc_top_predictor_4x4)(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); - -void vpx_dc_top_predictor_8x8_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_dc_top_predictor_8x8_sse2(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -RTCD_EXTERN void (*vpx_dc_top_predictor_8x8)(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); - -void vpx_fdct16x16_c(const int16_t *input, tran_low_t *output, int stride); -void vpx_fdct16x16_sse2(const int16_t *input, tran_low_t *output, int stride); -RTCD_EXTERN void (*vpx_fdct16x16)(const int16_t *input, tran_low_t *output, int stride); - -void vpx_fdct16x16_1_c(const int16_t *input, tran_low_t *output, int stride); -void vpx_fdct16x16_1_sse2(const int16_t *input, tran_low_t *output, int stride); -RTCD_EXTERN void (*vpx_fdct16x16_1)(const int16_t *input, tran_low_t *output, int stride); - -void vpx_fdct32x32_c(const int16_t *input, tran_low_t *output, int stride); -void vpx_fdct32x32_sse2(const int16_t *input, tran_low_t *output, int stride); -RTCD_EXTERN void (*vpx_fdct32x32)(const int16_t *input, tran_low_t *output, int stride); - -void vpx_fdct32x32_1_c(const int16_t *input, tran_low_t *output, int stride); -void vpx_fdct32x32_1_sse2(const int16_t *input, tran_low_t *output, int stride); -RTCD_EXTERN void (*vpx_fdct32x32_1)(const int16_t *input, tran_low_t *output, int stride); - -void vpx_fdct32x32_rd_c(const int16_t *input, tran_low_t *output, int stride); -void vpx_fdct32x32_rd_sse2(const int16_t *input, tran_low_t *output, int stride); -RTCD_EXTERN void (*vpx_fdct32x32_rd)(const int16_t *input, tran_low_t *output, int stride); - -void vpx_fdct4x4_c(const int16_t *input, tran_low_t *output, int stride); -void vpx_fdct4x4_sse2(const int16_t *input, tran_low_t *output, int stride); -RTCD_EXTERN void (*vpx_fdct4x4)(const int16_t *input, tran_low_t *output, int stride); - -void vpx_fdct4x4_1_c(const int16_t *input, tran_low_t *output, int stride); -void vpx_fdct4x4_1_sse2(const int16_t *input, tran_low_t *output, int stride); -RTCD_EXTERN void (*vpx_fdct4x4_1)(const int16_t *input, tran_low_t *output, int stride); - -void vpx_fdct8x8_c(const int16_t *input, tran_low_t *output, int stride); -void vpx_fdct8x8_sse2(const int16_t *input, tran_low_t *output, int stride); -RTCD_EXTERN void (*vpx_fdct8x8)(const int16_t *input, tran_low_t *output, int stride); - -void vpx_fdct8x8_1_c(const int16_t *input, tran_low_t *output, int stride); -void vpx_fdct8x8_1_sse2(const int16_t *input, tran_low_t *output, int stride); -RTCD_EXTERN void (*vpx_fdct8x8_1)(const int16_t *input, tran_low_t *output, int stride); - -void vpx_get16x16var_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse, int *sum); -void vpx_get16x16var_sse2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse, int *sum); -void vpx_get16x16var_avx2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse, int *sum); -RTCD_EXTERN void (*vpx_get16x16var)(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse, int *sum); - -unsigned int vpx_get4x4sse_cs_c(const unsigned char *src_ptr, int source_stride, const unsigned char *ref_ptr, int ref_stride); -#define vpx_get4x4sse_cs vpx_get4x4sse_cs_c - -void vpx_get8x8var_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse, int *sum); -void vpx_get8x8var_sse2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse, int *sum); -RTCD_EXTERN void (*vpx_get8x8var)(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse, int *sum); - -unsigned int vpx_get_mb_ss_c(const int16_t *); -unsigned int vpx_get_mb_ss_sse2(const int16_t *); -RTCD_EXTERN unsigned int (*vpx_get_mb_ss)(const int16_t *); - -void vpx_h_predictor_16x16_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_h_predictor_16x16_sse2(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -RTCD_EXTERN void (*vpx_h_predictor_16x16)(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); - -void vpx_h_predictor_32x32_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_h_predictor_32x32_sse2(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -RTCD_EXTERN void (*vpx_h_predictor_32x32)(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); - -void vpx_h_predictor_4x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_h_predictor_4x4_sse2(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -RTCD_EXTERN void (*vpx_h_predictor_4x4)(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); - -void vpx_h_predictor_8x8_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_h_predictor_8x8_sse2(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -RTCD_EXTERN void (*vpx_h_predictor_8x8)(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); - -void vpx_hadamard_16x16_c(const int16_t *src_diff, int src_stride, int16_t *coeff); -void vpx_hadamard_16x16_sse2(const int16_t *src_diff, int src_stride, int16_t *coeff); -RTCD_EXTERN void (*vpx_hadamard_16x16)(const int16_t *src_diff, int src_stride, int16_t *coeff); - -void vpx_hadamard_8x8_c(const int16_t *src_diff, int src_stride, int16_t *coeff); -void vpx_hadamard_8x8_sse2(const int16_t *src_diff, int src_stride, int16_t *coeff); -RTCD_EXTERN void (*vpx_hadamard_8x8)(const int16_t *src_diff, int src_stride, int16_t *coeff); - -void vpx_he_predictor_4x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_he_predictor_4x4 vpx_he_predictor_4x4_c - -void vpx_highbd_10_get16x16var_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse, int *sum); -#define vpx_highbd_10_get16x16var vpx_highbd_10_get16x16var_c - -void vpx_highbd_10_get8x8var_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse, int *sum); -#define vpx_highbd_10_get8x8var vpx_highbd_10_get8x8var_c - -unsigned int vpx_highbd_10_mse16x16_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int recon_stride, unsigned int *sse); -unsigned int vpx_highbd_10_mse16x16_sse2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int recon_stride, unsigned int *sse); -RTCD_EXTERN unsigned int (*vpx_highbd_10_mse16x16)(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int recon_stride, unsigned int *sse); - -unsigned int vpx_highbd_10_mse16x8_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int recon_stride, unsigned int *sse); -#define vpx_highbd_10_mse16x8 vpx_highbd_10_mse16x8_c - -unsigned int vpx_highbd_10_mse8x16_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int recon_stride, unsigned int *sse); -#define vpx_highbd_10_mse8x16 vpx_highbd_10_mse8x16_c - -unsigned int vpx_highbd_10_mse8x8_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int recon_stride, unsigned int *sse); -unsigned int vpx_highbd_10_mse8x8_sse2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int recon_stride, unsigned int *sse); -RTCD_EXTERN unsigned int (*vpx_highbd_10_mse8x8)(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int recon_stride, unsigned int *sse); - -uint32_t vpx_highbd_10_sub_pixel_avg_variance16x16_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_highbd_10_sub_pixel_avg_variance16x16_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -RTCD_EXTERN uint32_t (*vpx_highbd_10_sub_pixel_avg_variance16x16)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); - -uint32_t vpx_highbd_10_sub_pixel_avg_variance16x32_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_highbd_10_sub_pixel_avg_variance16x32_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -RTCD_EXTERN uint32_t (*vpx_highbd_10_sub_pixel_avg_variance16x32)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); - -uint32_t vpx_highbd_10_sub_pixel_avg_variance16x8_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_highbd_10_sub_pixel_avg_variance16x8_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -RTCD_EXTERN uint32_t (*vpx_highbd_10_sub_pixel_avg_variance16x8)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); - -uint32_t vpx_highbd_10_sub_pixel_avg_variance32x16_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_highbd_10_sub_pixel_avg_variance32x16_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -RTCD_EXTERN uint32_t (*vpx_highbd_10_sub_pixel_avg_variance32x16)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); - -uint32_t vpx_highbd_10_sub_pixel_avg_variance32x32_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_highbd_10_sub_pixel_avg_variance32x32_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -RTCD_EXTERN uint32_t (*vpx_highbd_10_sub_pixel_avg_variance32x32)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); - -uint32_t vpx_highbd_10_sub_pixel_avg_variance32x64_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_highbd_10_sub_pixel_avg_variance32x64_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -RTCD_EXTERN uint32_t (*vpx_highbd_10_sub_pixel_avg_variance32x64)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); - -uint32_t vpx_highbd_10_sub_pixel_avg_variance4x4_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_highbd_10_sub_pixel_avg_variance4x4 vpx_highbd_10_sub_pixel_avg_variance4x4_c - -uint32_t vpx_highbd_10_sub_pixel_avg_variance4x8_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_highbd_10_sub_pixel_avg_variance4x8 vpx_highbd_10_sub_pixel_avg_variance4x8_c - -uint32_t vpx_highbd_10_sub_pixel_avg_variance64x32_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_highbd_10_sub_pixel_avg_variance64x32_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -RTCD_EXTERN uint32_t (*vpx_highbd_10_sub_pixel_avg_variance64x32)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); - -uint32_t vpx_highbd_10_sub_pixel_avg_variance64x64_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_highbd_10_sub_pixel_avg_variance64x64_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -RTCD_EXTERN uint32_t (*vpx_highbd_10_sub_pixel_avg_variance64x64)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); - -uint32_t vpx_highbd_10_sub_pixel_avg_variance8x16_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_highbd_10_sub_pixel_avg_variance8x16_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -RTCD_EXTERN uint32_t (*vpx_highbd_10_sub_pixel_avg_variance8x16)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); - -uint32_t vpx_highbd_10_sub_pixel_avg_variance8x4_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_highbd_10_sub_pixel_avg_variance8x4_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -RTCD_EXTERN uint32_t (*vpx_highbd_10_sub_pixel_avg_variance8x4)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); - -uint32_t vpx_highbd_10_sub_pixel_avg_variance8x8_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_highbd_10_sub_pixel_avg_variance8x8_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -RTCD_EXTERN uint32_t (*vpx_highbd_10_sub_pixel_avg_variance8x8)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); - -uint32_t vpx_highbd_10_sub_pixel_variance16x16_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_highbd_10_sub_pixel_variance16x16_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -RTCD_EXTERN uint32_t (*vpx_highbd_10_sub_pixel_variance16x16)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); - -uint32_t vpx_highbd_10_sub_pixel_variance16x32_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_highbd_10_sub_pixel_variance16x32_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -RTCD_EXTERN uint32_t (*vpx_highbd_10_sub_pixel_variance16x32)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); - -uint32_t vpx_highbd_10_sub_pixel_variance16x8_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_highbd_10_sub_pixel_variance16x8_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -RTCD_EXTERN uint32_t (*vpx_highbd_10_sub_pixel_variance16x8)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); - -uint32_t vpx_highbd_10_sub_pixel_variance32x16_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_highbd_10_sub_pixel_variance32x16_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -RTCD_EXTERN uint32_t (*vpx_highbd_10_sub_pixel_variance32x16)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); - -uint32_t vpx_highbd_10_sub_pixel_variance32x32_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_highbd_10_sub_pixel_variance32x32_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -RTCD_EXTERN uint32_t (*vpx_highbd_10_sub_pixel_variance32x32)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); - -uint32_t vpx_highbd_10_sub_pixel_variance32x64_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_highbd_10_sub_pixel_variance32x64_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -RTCD_EXTERN uint32_t (*vpx_highbd_10_sub_pixel_variance32x64)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); - -uint32_t vpx_highbd_10_sub_pixel_variance4x4_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -#define vpx_highbd_10_sub_pixel_variance4x4 vpx_highbd_10_sub_pixel_variance4x4_c - -uint32_t vpx_highbd_10_sub_pixel_variance4x8_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -#define vpx_highbd_10_sub_pixel_variance4x8 vpx_highbd_10_sub_pixel_variance4x8_c - -uint32_t vpx_highbd_10_sub_pixel_variance64x32_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_highbd_10_sub_pixel_variance64x32_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -RTCD_EXTERN uint32_t (*vpx_highbd_10_sub_pixel_variance64x32)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); - -uint32_t vpx_highbd_10_sub_pixel_variance64x64_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_highbd_10_sub_pixel_variance64x64_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -RTCD_EXTERN uint32_t (*vpx_highbd_10_sub_pixel_variance64x64)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); - -uint32_t vpx_highbd_10_sub_pixel_variance8x16_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_highbd_10_sub_pixel_variance8x16_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -RTCD_EXTERN uint32_t (*vpx_highbd_10_sub_pixel_variance8x16)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); - -uint32_t vpx_highbd_10_sub_pixel_variance8x4_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_highbd_10_sub_pixel_variance8x4_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -RTCD_EXTERN uint32_t (*vpx_highbd_10_sub_pixel_variance8x4)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); - -uint32_t vpx_highbd_10_sub_pixel_variance8x8_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_highbd_10_sub_pixel_variance8x8_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -RTCD_EXTERN uint32_t (*vpx_highbd_10_sub_pixel_variance8x8)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); - -unsigned int vpx_highbd_10_variance16x16_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -unsigned int vpx_highbd_10_variance16x16_sse2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -RTCD_EXTERN unsigned int (*vpx_highbd_10_variance16x16)(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); - -unsigned int vpx_highbd_10_variance16x32_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -unsigned int vpx_highbd_10_variance16x32_sse2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -RTCD_EXTERN unsigned int (*vpx_highbd_10_variance16x32)(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); - -unsigned int vpx_highbd_10_variance16x8_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -unsigned int vpx_highbd_10_variance16x8_sse2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -RTCD_EXTERN unsigned int (*vpx_highbd_10_variance16x8)(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); - -unsigned int vpx_highbd_10_variance32x16_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -unsigned int vpx_highbd_10_variance32x16_sse2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -RTCD_EXTERN unsigned int (*vpx_highbd_10_variance32x16)(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); - -unsigned int vpx_highbd_10_variance32x32_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -unsigned int vpx_highbd_10_variance32x32_sse2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -RTCD_EXTERN unsigned int (*vpx_highbd_10_variance32x32)(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); - -unsigned int vpx_highbd_10_variance32x64_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -unsigned int vpx_highbd_10_variance32x64_sse2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -RTCD_EXTERN unsigned int (*vpx_highbd_10_variance32x64)(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); - -unsigned int vpx_highbd_10_variance4x4_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_highbd_10_variance4x4 vpx_highbd_10_variance4x4_c - -unsigned int vpx_highbd_10_variance4x8_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_highbd_10_variance4x8 vpx_highbd_10_variance4x8_c - -unsigned int vpx_highbd_10_variance64x32_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -unsigned int vpx_highbd_10_variance64x32_sse2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -RTCD_EXTERN unsigned int (*vpx_highbd_10_variance64x32)(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); - -unsigned int vpx_highbd_10_variance64x64_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -unsigned int vpx_highbd_10_variance64x64_sse2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -RTCD_EXTERN unsigned int (*vpx_highbd_10_variance64x64)(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); - -unsigned int vpx_highbd_10_variance8x16_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -unsigned int vpx_highbd_10_variance8x16_sse2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -RTCD_EXTERN unsigned int (*vpx_highbd_10_variance8x16)(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); - -unsigned int vpx_highbd_10_variance8x4_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_highbd_10_variance8x4 vpx_highbd_10_variance8x4_c - -unsigned int vpx_highbd_10_variance8x8_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -unsigned int vpx_highbd_10_variance8x8_sse2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -RTCD_EXTERN unsigned int (*vpx_highbd_10_variance8x8)(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); - -void vpx_highbd_12_get16x16var_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse, int *sum); -#define vpx_highbd_12_get16x16var vpx_highbd_12_get16x16var_c - -void vpx_highbd_12_get8x8var_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse, int *sum); -#define vpx_highbd_12_get8x8var vpx_highbd_12_get8x8var_c - -unsigned int vpx_highbd_12_mse16x16_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int recon_stride, unsigned int *sse); -unsigned int vpx_highbd_12_mse16x16_sse2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int recon_stride, unsigned int *sse); -RTCD_EXTERN unsigned int (*vpx_highbd_12_mse16x16)(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int recon_stride, unsigned int *sse); - -unsigned int vpx_highbd_12_mse16x8_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int recon_stride, unsigned int *sse); -#define vpx_highbd_12_mse16x8 vpx_highbd_12_mse16x8_c - -unsigned int vpx_highbd_12_mse8x16_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int recon_stride, unsigned int *sse); -#define vpx_highbd_12_mse8x16 vpx_highbd_12_mse8x16_c - -unsigned int vpx_highbd_12_mse8x8_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int recon_stride, unsigned int *sse); -unsigned int vpx_highbd_12_mse8x8_sse2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int recon_stride, unsigned int *sse); -RTCD_EXTERN unsigned int (*vpx_highbd_12_mse8x8)(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int recon_stride, unsigned int *sse); - -uint32_t vpx_highbd_12_sub_pixel_avg_variance16x16_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_highbd_12_sub_pixel_avg_variance16x16_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -RTCD_EXTERN uint32_t (*vpx_highbd_12_sub_pixel_avg_variance16x16)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); - -uint32_t vpx_highbd_12_sub_pixel_avg_variance16x32_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_highbd_12_sub_pixel_avg_variance16x32_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -RTCD_EXTERN uint32_t (*vpx_highbd_12_sub_pixel_avg_variance16x32)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); - -uint32_t vpx_highbd_12_sub_pixel_avg_variance16x8_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_highbd_12_sub_pixel_avg_variance16x8_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -RTCD_EXTERN uint32_t (*vpx_highbd_12_sub_pixel_avg_variance16x8)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); - -uint32_t vpx_highbd_12_sub_pixel_avg_variance32x16_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_highbd_12_sub_pixel_avg_variance32x16_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -RTCD_EXTERN uint32_t (*vpx_highbd_12_sub_pixel_avg_variance32x16)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); - -uint32_t vpx_highbd_12_sub_pixel_avg_variance32x32_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_highbd_12_sub_pixel_avg_variance32x32_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -RTCD_EXTERN uint32_t (*vpx_highbd_12_sub_pixel_avg_variance32x32)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); - -uint32_t vpx_highbd_12_sub_pixel_avg_variance32x64_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_highbd_12_sub_pixel_avg_variance32x64_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -RTCD_EXTERN uint32_t (*vpx_highbd_12_sub_pixel_avg_variance32x64)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); - -uint32_t vpx_highbd_12_sub_pixel_avg_variance4x4_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_highbd_12_sub_pixel_avg_variance4x4 vpx_highbd_12_sub_pixel_avg_variance4x4_c - -uint32_t vpx_highbd_12_sub_pixel_avg_variance4x8_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_highbd_12_sub_pixel_avg_variance4x8 vpx_highbd_12_sub_pixel_avg_variance4x8_c - -uint32_t vpx_highbd_12_sub_pixel_avg_variance64x32_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_highbd_12_sub_pixel_avg_variance64x32_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -RTCD_EXTERN uint32_t (*vpx_highbd_12_sub_pixel_avg_variance64x32)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); - -uint32_t vpx_highbd_12_sub_pixel_avg_variance64x64_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_highbd_12_sub_pixel_avg_variance64x64_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -RTCD_EXTERN uint32_t (*vpx_highbd_12_sub_pixel_avg_variance64x64)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); - -uint32_t vpx_highbd_12_sub_pixel_avg_variance8x16_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_highbd_12_sub_pixel_avg_variance8x16_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -RTCD_EXTERN uint32_t (*vpx_highbd_12_sub_pixel_avg_variance8x16)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); - -uint32_t vpx_highbd_12_sub_pixel_avg_variance8x4_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_highbd_12_sub_pixel_avg_variance8x4_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -RTCD_EXTERN uint32_t (*vpx_highbd_12_sub_pixel_avg_variance8x4)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); - -uint32_t vpx_highbd_12_sub_pixel_avg_variance8x8_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_highbd_12_sub_pixel_avg_variance8x8_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -RTCD_EXTERN uint32_t (*vpx_highbd_12_sub_pixel_avg_variance8x8)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); - -uint32_t vpx_highbd_12_sub_pixel_variance16x16_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_highbd_12_sub_pixel_variance16x16_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -RTCD_EXTERN uint32_t (*vpx_highbd_12_sub_pixel_variance16x16)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); - -uint32_t vpx_highbd_12_sub_pixel_variance16x32_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_highbd_12_sub_pixel_variance16x32_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -RTCD_EXTERN uint32_t (*vpx_highbd_12_sub_pixel_variance16x32)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); - -uint32_t vpx_highbd_12_sub_pixel_variance16x8_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_highbd_12_sub_pixel_variance16x8_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -RTCD_EXTERN uint32_t (*vpx_highbd_12_sub_pixel_variance16x8)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); - -uint32_t vpx_highbd_12_sub_pixel_variance32x16_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_highbd_12_sub_pixel_variance32x16_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -RTCD_EXTERN uint32_t (*vpx_highbd_12_sub_pixel_variance32x16)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); - -uint32_t vpx_highbd_12_sub_pixel_variance32x32_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_highbd_12_sub_pixel_variance32x32_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -RTCD_EXTERN uint32_t (*vpx_highbd_12_sub_pixel_variance32x32)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); - -uint32_t vpx_highbd_12_sub_pixel_variance32x64_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_highbd_12_sub_pixel_variance32x64_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -RTCD_EXTERN uint32_t (*vpx_highbd_12_sub_pixel_variance32x64)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); - -uint32_t vpx_highbd_12_sub_pixel_variance4x4_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -#define vpx_highbd_12_sub_pixel_variance4x4 vpx_highbd_12_sub_pixel_variance4x4_c - -uint32_t vpx_highbd_12_sub_pixel_variance4x8_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -#define vpx_highbd_12_sub_pixel_variance4x8 vpx_highbd_12_sub_pixel_variance4x8_c - -uint32_t vpx_highbd_12_sub_pixel_variance64x32_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_highbd_12_sub_pixel_variance64x32_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -RTCD_EXTERN uint32_t (*vpx_highbd_12_sub_pixel_variance64x32)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); - -uint32_t vpx_highbd_12_sub_pixel_variance64x64_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_highbd_12_sub_pixel_variance64x64_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -RTCD_EXTERN uint32_t (*vpx_highbd_12_sub_pixel_variance64x64)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); - -uint32_t vpx_highbd_12_sub_pixel_variance8x16_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_highbd_12_sub_pixel_variance8x16_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -RTCD_EXTERN uint32_t (*vpx_highbd_12_sub_pixel_variance8x16)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); - -uint32_t vpx_highbd_12_sub_pixel_variance8x4_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_highbd_12_sub_pixel_variance8x4_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -RTCD_EXTERN uint32_t (*vpx_highbd_12_sub_pixel_variance8x4)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); - -uint32_t vpx_highbd_12_sub_pixel_variance8x8_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_highbd_12_sub_pixel_variance8x8_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -RTCD_EXTERN uint32_t (*vpx_highbd_12_sub_pixel_variance8x8)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); - -unsigned int vpx_highbd_12_variance16x16_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -unsigned int vpx_highbd_12_variance16x16_sse2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -RTCD_EXTERN unsigned int (*vpx_highbd_12_variance16x16)(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); - -unsigned int vpx_highbd_12_variance16x32_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -unsigned int vpx_highbd_12_variance16x32_sse2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -RTCD_EXTERN unsigned int (*vpx_highbd_12_variance16x32)(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); - -unsigned int vpx_highbd_12_variance16x8_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -unsigned int vpx_highbd_12_variance16x8_sse2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -RTCD_EXTERN unsigned int (*vpx_highbd_12_variance16x8)(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); - -unsigned int vpx_highbd_12_variance32x16_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -unsigned int vpx_highbd_12_variance32x16_sse2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -RTCD_EXTERN unsigned int (*vpx_highbd_12_variance32x16)(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); - -unsigned int vpx_highbd_12_variance32x32_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -unsigned int vpx_highbd_12_variance32x32_sse2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -RTCD_EXTERN unsigned int (*vpx_highbd_12_variance32x32)(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); - -unsigned int vpx_highbd_12_variance32x64_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -unsigned int vpx_highbd_12_variance32x64_sse2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -RTCD_EXTERN unsigned int (*vpx_highbd_12_variance32x64)(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); - -unsigned int vpx_highbd_12_variance4x4_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_highbd_12_variance4x4 vpx_highbd_12_variance4x4_c - -unsigned int vpx_highbd_12_variance4x8_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_highbd_12_variance4x8 vpx_highbd_12_variance4x8_c - -unsigned int vpx_highbd_12_variance64x32_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -unsigned int vpx_highbd_12_variance64x32_sse2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -RTCD_EXTERN unsigned int (*vpx_highbd_12_variance64x32)(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); - -unsigned int vpx_highbd_12_variance64x64_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -unsigned int vpx_highbd_12_variance64x64_sse2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -RTCD_EXTERN unsigned int (*vpx_highbd_12_variance64x64)(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); - -unsigned int vpx_highbd_12_variance8x16_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -unsigned int vpx_highbd_12_variance8x16_sse2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -RTCD_EXTERN unsigned int (*vpx_highbd_12_variance8x16)(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); - -unsigned int vpx_highbd_12_variance8x4_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_highbd_12_variance8x4 vpx_highbd_12_variance8x4_c - -unsigned int vpx_highbd_12_variance8x8_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -unsigned int vpx_highbd_12_variance8x8_sse2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -RTCD_EXTERN unsigned int (*vpx_highbd_12_variance8x8)(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); - -void vpx_highbd_8_get16x16var_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse, int *sum); -#define vpx_highbd_8_get16x16var vpx_highbd_8_get16x16var_c - -void vpx_highbd_8_get8x8var_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse, int *sum); -#define vpx_highbd_8_get8x8var vpx_highbd_8_get8x8var_c - -unsigned int vpx_highbd_8_mse16x16_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int recon_stride, unsigned int *sse); -unsigned int vpx_highbd_8_mse16x16_sse2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int recon_stride, unsigned int *sse); -RTCD_EXTERN unsigned int (*vpx_highbd_8_mse16x16)(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int recon_stride, unsigned int *sse); - -unsigned int vpx_highbd_8_mse16x8_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int recon_stride, unsigned int *sse); -#define vpx_highbd_8_mse16x8 vpx_highbd_8_mse16x8_c - -unsigned int vpx_highbd_8_mse8x16_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int recon_stride, unsigned int *sse); -#define vpx_highbd_8_mse8x16 vpx_highbd_8_mse8x16_c - -unsigned int vpx_highbd_8_mse8x8_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int recon_stride, unsigned int *sse); -unsigned int vpx_highbd_8_mse8x8_sse2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int recon_stride, unsigned int *sse); -RTCD_EXTERN unsigned int (*vpx_highbd_8_mse8x8)(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int recon_stride, unsigned int *sse); - -uint32_t vpx_highbd_8_sub_pixel_avg_variance16x16_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_highbd_8_sub_pixel_avg_variance16x16_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -RTCD_EXTERN uint32_t (*vpx_highbd_8_sub_pixel_avg_variance16x16)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); - -uint32_t vpx_highbd_8_sub_pixel_avg_variance16x32_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_highbd_8_sub_pixel_avg_variance16x32_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -RTCD_EXTERN uint32_t (*vpx_highbd_8_sub_pixel_avg_variance16x32)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); - -uint32_t vpx_highbd_8_sub_pixel_avg_variance16x8_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_highbd_8_sub_pixel_avg_variance16x8_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -RTCD_EXTERN uint32_t (*vpx_highbd_8_sub_pixel_avg_variance16x8)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); - -uint32_t vpx_highbd_8_sub_pixel_avg_variance32x16_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_highbd_8_sub_pixel_avg_variance32x16_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -RTCD_EXTERN uint32_t (*vpx_highbd_8_sub_pixel_avg_variance32x16)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); - -uint32_t vpx_highbd_8_sub_pixel_avg_variance32x32_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_highbd_8_sub_pixel_avg_variance32x32_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -RTCD_EXTERN uint32_t (*vpx_highbd_8_sub_pixel_avg_variance32x32)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); - -uint32_t vpx_highbd_8_sub_pixel_avg_variance32x64_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_highbd_8_sub_pixel_avg_variance32x64_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -RTCD_EXTERN uint32_t (*vpx_highbd_8_sub_pixel_avg_variance32x64)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); - -uint32_t vpx_highbd_8_sub_pixel_avg_variance4x4_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_highbd_8_sub_pixel_avg_variance4x4 vpx_highbd_8_sub_pixel_avg_variance4x4_c - -uint32_t vpx_highbd_8_sub_pixel_avg_variance4x8_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_highbd_8_sub_pixel_avg_variance4x8 vpx_highbd_8_sub_pixel_avg_variance4x8_c - -uint32_t vpx_highbd_8_sub_pixel_avg_variance64x32_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_highbd_8_sub_pixel_avg_variance64x32_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -RTCD_EXTERN uint32_t (*vpx_highbd_8_sub_pixel_avg_variance64x32)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); - -uint32_t vpx_highbd_8_sub_pixel_avg_variance64x64_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_highbd_8_sub_pixel_avg_variance64x64_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -RTCD_EXTERN uint32_t (*vpx_highbd_8_sub_pixel_avg_variance64x64)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); - -uint32_t vpx_highbd_8_sub_pixel_avg_variance8x16_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_highbd_8_sub_pixel_avg_variance8x16_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -RTCD_EXTERN uint32_t (*vpx_highbd_8_sub_pixel_avg_variance8x16)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); - -uint32_t vpx_highbd_8_sub_pixel_avg_variance8x4_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_highbd_8_sub_pixel_avg_variance8x4_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -RTCD_EXTERN uint32_t (*vpx_highbd_8_sub_pixel_avg_variance8x4)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); - -uint32_t vpx_highbd_8_sub_pixel_avg_variance8x8_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_highbd_8_sub_pixel_avg_variance8x8_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -RTCD_EXTERN uint32_t (*vpx_highbd_8_sub_pixel_avg_variance8x8)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); - -uint32_t vpx_highbd_8_sub_pixel_variance16x16_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_highbd_8_sub_pixel_variance16x16_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -RTCD_EXTERN uint32_t (*vpx_highbd_8_sub_pixel_variance16x16)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); - -uint32_t vpx_highbd_8_sub_pixel_variance16x32_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_highbd_8_sub_pixel_variance16x32_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -RTCD_EXTERN uint32_t (*vpx_highbd_8_sub_pixel_variance16x32)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); - -uint32_t vpx_highbd_8_sub_pixel_variance16x8_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_highbd_8_sub_pixel_variance16x8_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -RTCD_EXTERN uint32_t (*vpx_highbd_8_sub_pixel_variance16x8)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); - -uint32_t vpx_highbd_8_sub_pixel_variance32x16_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_highbd_8_sub_pixel_variance32x16_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -RTCD_EXTERN uint32_t (*vpx_highbd_8_sub_pixel_variance32x16)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); - -uint32_t vpx_highbd_8_sub_pixel_variance32x32_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_highbd_8_sub_pixel_variance32x32_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -RTCD_EXTERN uint32_t (*vpx_highbd_8_sub_pixel_variance32x32)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); - -uint32_t vpx_highbd_8_sub_pixel_variance32x64_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_highbd_8_sub_pixel_variance32x64_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -RTCD_EXTERN uint32_t (*vpx_highbd_8_sub_pixel_variance32x64)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); - -uint32_t vpx_highbd_8_sub_pixel_variance4x4_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -#define vpx_highbd_8_sub_pixel_variance4x4 vpx_highbd_8_sub_pixel_variance4x4_c - -uint32_t vpx_highbd_8_sub_pixel_variance4x8_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -#define vpx_highbd_8_sub_pixel_variance4x8 vpx_highbd_8_sub_pixel_variance4x8_c - -uint32_t vpx_highbd_8_sub_pixel_variance64x32_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_highbd_8_sub_pixel_variance64x32_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -RTCD_EXTERN uint32_t (*vpx_highbd_8_sub_pixel_variance64x32)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); - -uint32_t vpx_highbd_8_sub_pixel_variance64x64_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_highbd_8_sub_pixel_variance64x64_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -RTCD_EXTERN uint32_t (*vpx_highbd_8_sub_pixel_variance64x64)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); - -uint32_t vpx_highbd_8_sub_pixel_variance8x16_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_highbd_8_sub_pixel_variance8x16_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -RTCD_EXTERN uint32_t (*vpx_highbd_8_sub_pixel_variance8x16)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); - -uint32_t vpx_highbd_8_sub_pixel_variance8x4_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_highbd_8_sub_pixel_variance8x4_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -RTCD_EXTERN uint32_t (*vpx_highbd_8_sub_pixel_variance8x4)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); - -uint32_t vpx_highbd_8_sub_pixel_variance8x8_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_highbd_8_sub_pixel_variance8x8_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -RTCD_EXTERN uint32_t (*vpx_highbd_8_sub_pixel_variance8x8)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); - -unsigned int vpx_highbd_8_variance16x16_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -unsigned int vpx_highbd_8_variance16x16_sse2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -RTCD_EXTERN unsigned int (*vpx_highbd_8_variance16x16)(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); - -unsigned int vpx_highbd_8_variance16x32_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -unsigned int vpx_highbd_8_variance16x32_sse2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -RTCD_EXTERN unsigned int (*vpx_highbd_8_variance16x32)(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); - -unsigned int vpx_highbd_8_variance16x8_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -unsigned int vpx_highbd_8_variance16x8_sse2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -RTCD_EXTERN unsigned int (*vpx_highbd_8_variance16x8)(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); - -unsigned int vpx_highbd_8_variance32x16_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -unsigned int vpx_highbd_8_variance32x16_sse2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -RTCD_EXTERN unsigned int (*vpx_highbd_8_variance32x16)(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); - -unsigned int vpx_highbd_8_variance32x32_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -unsigned int vpx_highbd_8_variance32x32_sse2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -RTCD_EXTERN unsigned int (*vpx_highbd_8_variance32x32)(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); - -unsigned int vpx_highbd_8_variance32x64_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -unsigned int vpx_highbd_8_variance32x64_sse2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -RTCD_EXTERN unsigned int (*vpx_highbd_8_variance32x64)(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); - -unsigned int vpx_highbd_8_variance4x4_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_highbd_8_variance4x4 vpx_highbd_8_variance4x4_c - -unsigned int vpx_highbd_8_variance4x8_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_highbd_8_variance4x8 vpx_highbd_8_variance4x8_c - -unsigned int vpx_highbd_8_variance64x32_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -unsigned int vpx_highbd_8_variance64x32_sse2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -RTCD_EXTERN unsigned int (*vpx_highbd_8_variance64x32)(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); - -unsigned int vpx_highbd_8_variance64x64_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -unsigned int vpx_highbd_8_variance64x64_sse2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -RTCD_EXTERN unsigned int (*vpx_highbd_8_variance64x64)(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); - -unsigned int vpx_highbd_8_variance8x16_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -unsigned int vpx_highbd_8_variance8x16_sse2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -RTCD_EXTERN unsigned int (*vpx_highbd_8_variance8x16)(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); - -unsigned int vpx_highbd_8_variance8x4_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_highbd_8_variance8x4 vpx_highbd_8_variance8x4_c - -unsigned int vpx_highbd_8_variance8x8_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -unsigned int vpx_highbd_8_variance8x8_sse2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -RTCD_EXTERN unsigned int (*vpx_highbd_8_variance8x8)(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); - -unsigned int vpx_highbd_avg_4x4_c(const uint8_t *, int p); -#define vpx_highbd_avg_4x4 vpx_highbd_avg_4x4_c - -unsigned int vpx_highbd_avg_8x8_c(const uint8_t *, int p); -#define vpx_highbd_avg_8x8 vpx_highbd_avg_8x8_c - -void vpx_highbd_comp_avg_pred_c(uint16_t *comp_pred, const uint8_t *pred8, int width, int height, const uint8_t *ref8, int ref_stride); -#define vpx_highbd_comp_avg_pred vpx_highbd_comp_avg_pred_c - -void vpx_highbd_convolve8_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h, int bps); -#define vpx_highbd_convolve8 vpx_highbd_convolve8_c - -void vpx_highbd_convolve8_avg_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h, int bps); -#define vpx_highbd_convolve8_avg vpx_highbd_convolve8_avg_c - -void vpx_highbd_convolve8_avg_horiz_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h, int bps); -#define vpx_highbd_convolve8_avg_horiz vpx_highbd_convolve8_avg_horiz_c - -void vpx_highbd_convolve8_avg_vert_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h, int bps); -#define vpx_highbd_convolve8_avg_vert vpx_highbd_convolve8_avg_vert_c - -void vpx_highbd_convolve8_horiz_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h, int bps); -#define vpx_highbd_convolve8_horiz vpx_highbd_convolve8_horiz_c - -void vpx_highbd_convolve8_vert_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h, int bps); -#define vpx_highbd_convolve8_vert vpx_highbd_convolve8_vert_c - -void vpx_highbd_convolve_avg_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h, int bps); -void vpx_highbd_convolve_avg_sse2(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h, int bps); -RTCD_EXTERN void (*vpx_highbd_convolve_avg)(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h, int bps); - -void vpx_highbd_convolve_copy_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h, int bps); -void vpx_highbd_convolve_copy_sse2(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h, int bps); -RTCD_EXTERN void (*vpx_highbd_convolve_copy)(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h, int bps); - -void vpx_highbd_d117_predictor_16x16_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_d117_predictor_16x16 vpx_highbd_d117_predictor_16x16_c - -void vpx_highbd_d117_predictor_32x32_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_d117_predictor_32x32 vpx_highbd_d117_predictor_32x32_c - -void vpx_highbd_d117_predictor_4x4_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_d117_predictor_4x4 vpx_highbd_d117_predictor_4x4_c - -void vpx_highbd_d117_predictor_8x8_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_d117_predictor_8x8 vpx_highbd_d117_predictor_8x8_c - -void vpx_highbd_d135_predictor_16x16_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_d135_predictor_16x16 vpx_highbd_d135_predictor_16x16_c - -void vpx_highbd_d135_predictor_32x32_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_d135_predictor_32x32 vpx_highbd_d135_predictor_32x32_c - -void vpx_highbd_d135_predictor_4x4_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_d135_predictor_4x4 vpx_highbd_d135_predictor_4x4_c - -void vpx_highbd_d135_predictor_8x8_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_d135_predictor_8x8 vpx_highbd_d135_predictor_8x8_c - -void vpx_highbd_d153_predictor_16x16_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_d153_predictor_16x16 vpx_highbd_d153_predictor_16x16_c - -void vpx_highbd_d153_predictor_32x32_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_d153_predictor_32x32 vpx_highbd_d153_predictor_32x32_c - -void vpx_highbd_d153_predictor_4x4_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_d153_predictor_4x4 vpx_highbd_d153_predictor_4x4_c - -void vpx_highbd_d153_predictor_8x8_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_d153_predictor_8x8 vpx_highbd_d153_predictor_8x8_c - -void vpx_highbd_d207_predictor_16x16_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_d207_predictor_16x16 vpx_highbd_d207_predictor_16x16_c - -void vpx_highbd_d207_predictor_32x32_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_d207_predictor_32x32 vpx_highbd_d207_predictor_32x32_c - -void vpx_highbd_d207_predictor_4x4_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_d207_predictor_4x4 vpx_highbd_d207_predictor_4x4_c - -void vpx_highbd_d207_predictor_8x8_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_d207_predictor_8x8 vpx_highbd_d207_predictor_8x8_c - -void vpx_highbd_d207e_predictor_16x16_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_d207e_predictor_16x16 vpx_highbd_d207e_predictor_16x16_c - -void vpx_highbd_d207e_predictor_32x32_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_d207e_predictor_32x32 vpx_highbd_d207e_predictor_32x32_c - -void vpx_highbd_d207e_predictor_4x4_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_d207e_predictor_4x4 vpx_highbd_d207e_predictor_4x4_c - -void vpx_highbd_d207e_predictor_8x8_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_d207e_predictor_8x8 vpx_highbd_d207e_predictor_8x8_c - -void vpx_highbd_d45_predictor_16x16_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_d45_predictor_16x16 vpx_highbd_d45_predictor_16x16_c - -void vpx_highbd_d45_predictor_32x32_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_d45_predictor_32x32 vpx_highbd_d45_predictor_32x32_c - -void vpx_highbd_d45_predictor_4x4_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_d45_predictor_4x4 vpx_highbd_d45_predictor_4x4_c - -void vpx_highbd_d45_predictor_8x8_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_d45_predictor_8x8 vpx_highbd_d45_predictor_8x8_c - -void vpx_highbd_d45e_predictor_16x16_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_d45e_predictor_16x16 vpx_highbd_d45e_predictor_16x16_c - -void vpx_highbd_d45e_predictor_32x32_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_d45e_predictor_32x32 vpx_highbd_d45e_predictor_32x32_c - -void vpx_highbd_d45e_predictor_4x4_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_d45e_predictor_4x4 vpx_highbd_d45e_predictor_4x4_c - -void vpx_highbd_d45e_predictor_8x8_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_d45e_predictor_8x8 vpx_highbd_d45e_predictor_8x8_c - -void vpx_highbd_d63_predictor_16x16_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_d63_predictor_16x16 vpx_highbd_d63_predictor_16x16_c - -void vpx_highbd_d63_predictor_32x32_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_d63_predictor_32x32 vpx_highbd_d63_predictor_32x32_c - -void vpx_highbd_d63_predictor_4x4_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_d63_predictor_4x4 vpx_highbd_d63_predictor_4x4_c - -void vpx_highbd_d63_predictor_8x8_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_d63_predictor_8x8 vpx_highbd_d63_predictor_8x8_c - -void vpx_highbd_d63e_predictor_16x16_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_d63e_predictor_16x16 vpx_highbd_d63e_predictor_16x16_c - -void vpx_highbd_d63e_predictor_32x32_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_d63e_predictor_32x32 vpx_highbd_d63e_predictor_32x32_c - -void vpx_highbd_d63e_predictor_4x4_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_d63e_predictor_4x4 vpx_highbd_d63e_predictor_4x4_c - -void vpx_highbd_d63e_predictor_8x8_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_d63e_predictor_8x8 vpx_highbd_d63e_predictor_8x8_c - -void vpx_highbd_dc_128_predictor_16x16_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_dc_128_predictor_16x16 vpx_highbd_dc_128_predictor_16x16_c - -void vpx_highbd_dc_128_predictor_32x32_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_dc_128_predictor_32x32 vpx_highbd_dc_128_predictor_32x32_c - -void vpx_highbd_dc_128_predictor_4x4_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_dc_128_predictor_4x4 vpx_highbd_dc_128_predictor_4x4_c - -void vpx_highbd_dc_128_predictor_8x8_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_dc_128_predictor_8x8 vpx_highbd_dc_128_predictor_8x8_c - -void vpx_highbd_dc_left_predictor_16x16_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_dc_left_predictor_16x16 vpx_highbd_dc_left_predictor_16x16_c - -void vpx_highbd_dc_left_predictor_32x32_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_dc_left_predictor_32x32 vpx_highbd_dc_left_predictor_32x32_c - -void vpx_highbd_dc_left_predictor_4x4_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_dc_left_predictor_4x4 vpx_highbd_dc_left_predictor_4x4_c - -void vpx_highbd_dc_left_predictor_8x8_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_dc_left_predictor_8x8 vpx_highbd_dc_left_predictor_8x8_c - -void vpx_highbd_dc_predictor_16x16_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -void vpx_highbd_dc_predictor_16x16_sse2(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -RTCD_EXTERN void (*vpx_highbd_dc_predictor_16x16)(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); - -void vpx_highbd_dc_predictor_32x32_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -void vpx_highbd_dc_predictor_32x32_sse2(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -RTCD_EXTERN void (*vpx_highbd_dc_predictor_32x32)(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); - -void vpx_highbd_dc_predictor_4x4_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -void vpx_highbd_dc_predictor_4x4_sse2(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -RTCD_EXTERN void (*vpx_highbd_dc_predictor_4x4)(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); - -void vpx_highbd_dc_predictor_8x8_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -void vpx_highbd_dc_predictor_8x8_sse2(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -RTCD_EXTERN void (*vpx_highbd_dc_predictor_8x8)(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); - -void vpx_highbd_dc_top_predictor_16x16_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_dc_top_predictor_16x16 vpx_highbd_dc_top_predictor_16x16_c - -void vpx_highbd_dc_top_predictor_32x32_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_dc_top_predictor_32x32 vpx_highbd_dc_top_predictor_32x32_c - -void vpx_highbd_dc_top_predictor_4x4_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_dc_top_predictor_4x4 vpx_highbd_dc_top_predictor_4x4_c - -void vpx_highbd_dc_top_predictor_8x8_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_dc_top_predictor_8x8 vpx_highbd_dc_top_predictor_8x8_c - -void vpx_highbd_fdct16x16_c(const int16_t *input, tran_low_t *output, int stride); -void vpx_highbd_fdct16x16_sse2(const int16_t *input, tran_low_t *output, int stride); -RTCD_EXTERN void (*vpx_highbd_fdct16x16)(const int16_t *input, tran_low_t *output, int stride); - -void vpx_highbd_fdct16x16_1_c(const int16_t *input, tran_low_t *output, int stride); -#define vpx_highbd_fdct16x16_1 vpx_highbd_fdct16x16_1_c - -void vpx_highbd_fdct32x32_c(const int16_t *input, tran_low_t *output, int stride); -void vpx_highbd_fdct32x32_sse2(const int16_t *input, tran_low_t *output, int stride); -RTCD_EXTERN void (*vpx_highbd_fdct32x32)(const int16_t *input, tran_low_t *output, int stride); - -void vpx_highbd_fdct32x32_1_c(const int16_t *input, tran_low_t *output, int stride); -#define vpx_highbd_fdct32x32_1 vpx_highbd_fdct32x32_1_c - -void vpx_highbd_fdct32x32_rd_c(const int16_t *input, tran_low_t *output, int stride); -void vpx_highbd_fdct32x32_rd_sse2(const int16_t *input, tran_low_t *output, int stride); -RTCD_EXTERN void (*vpx_highbd_fdct32x32_rd)(const int16_t *input, tran_low_t *output, int stride); - -void vpx_highbd_fdct4x4_c(const int16_t *input, tran_low_t *output, int stride); -void vpx_highbd_fdct4x4_sse2(const int16_t *input, tran_low_t *output, int stride); -RTCD_EXTERN void (*vpx_highbd_fdct4x4)(const int16_t *input, tran_low_t *output, int stride); - -void vpx_highbd_fdct8x8_c(const int16_t *input, tran_low_t *output, int stride); -void vpx_highbd_fdct8x8_sse2(const int16_t *input, tran_low_t *output, int stride); -RTCD_EXTERN void (*vpx_highbd_fdct8x8)(const int16_t *input, tran_low_t *output, int stride); - -void vpx_highbd_fdct8x8_1_c(const int16_t *input, tran_low_t *output, int stride); -#define vpx_highbd_fdct8x8_1 vpx_highbd_fdct8x8_1_c - -void vpx_highbd_h_predictor_16x16_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_h_predictor_16x16 vpx_highbd_h_predictor_16x16_c - -void vpx_highbd_h_predictor_32x32_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_h_predictor_32x32 vpx_highbd_h_predictor_32x32_c - -void vpx_highbd_h_predictor_4x4_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_h_predictor_4x4 vpx_highbd_h_predictor_4x4_c - -void vpx_highbd_h_predictor_8x8_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_h_predictor_8x8 vpx_highbd_h_predictor_8x8_c - -void vpx_highbd_idct16x16_10_add_c(const tran_low_t *input, uint8_t *dest, int stride, int bd); -void vpx_highbd_idct16x16_10_add_sse2(const tran_low_t *input, uint8_t *dest, int stride, int bd); -RTCD_EXTERN void (*vpx_highbd_idct16x16_10_add)(const tran_low_t *input, uint8_t *dest, int stride, int bd); - -void vpx_highbd_idct16x16_1_add_c(const tran_low_t *input, uint8_t *dest, int stride, int bd); -#define vpx_highbd_idct16x16_1_add vpx_highbd_idct16x16_1_add_c - -void vpx_highbd_idct16x16_256_add_c(const tran_low_t *input, uint8_t *dest, int stride, int bd); -void vpx_highbd_idct16x16_256_add_sse2(const tran_low_t *input, uint8_t *dest, int stride, int bd); -RTCD_EXTERN void (*vpx_highbd_idct16x16_256_add)(const tran_low_t *input, uint8_t *dest, int stride, int bd); - -void vpx_highbd_idct32x32_1024_add_c(const tran_low_t *input, uint8_t *dest, int stride, int bd); -#define vpx_highbd_idct32x32_1024_add vpx_highbd_idct32x32_1024_add_c - -void vpx_highbd_idct32x32_1_add_c(const tran_low_t *input, uint8_t *dest, int stride, int bd); -void vpx_highbd_idct32x32_1_add_sse2(const tran_low_t *input, uint8_t *dest, int stride, int bd); -RTCD_EXTERN void (*vpx_highbd_idct32x32_1_add)(const tran_low_t *input, uint8_t *dest, int stride, int bd); - -void vpx_highbd_idct32x32_34_add_c(const tran_low_t *input, uint8_t *dest, int stride, int bd); -#define vpx_highbd_idct32x32_34_add vpx_highbd_idct32x32_34_add_c - -void vpx_highbd_idct4x4_16_add_c(const tran_low_t *input, uint8_t *dest, int stride, int bd); -void vpx_highbd_idct4x4_16_add_sse2(const tran_low_t *input, uint8_t *dest, int stride, int bd); -RTCD_EXTERN void (*vpx_highbd_idct4x4_16_add)(const tran_low_t *input, uint8_t *dest, int stride, int bd); - -void vpx_highbd_idct4x4_1_add_c(const tran_low_t *input, uint8_t *dest, int stride, int bd); -#define vpx_highbd_idct4x4_1_add vpx_highbd_idct4x4_1_add_c - -void vpx_highbd_idct8x8_12_add_c(const tran_low_t *input, uint8_t *dest, int stride, int bd); -void vpx_highbd_idct8x8_12_add_sse2(const tran_low_t *input, uint8_t *dest, int stride, int bd); -RTCD_EXTERN void (*vpx_highbd_idct8x8_12_add)(const tran_low_t *input, uint8_t *dest, int stride, int bd); - -void vpx_highbd_idct8x8_1_add_c(const tran_low_t *input, uint8_t *dest, int stride, int bd); -#define vpx_highbd_idct8x8_1_add vpx_highbd_idct8x8_1_add_c - -void vpx_highbd_idct8x8_64_add_c(const tran_low_t *input, uint8_t *dest, int stride, int bd); -void vpx_highbd_idct8x8_64_add_sse2(const tran_low_t *input, uint8_t *dest, int stride, int bd); -RTCD_EXTERN void (*vpx_highbd_idct8x8_64_add)(const tran_low_t *input, uint8_t *dest, int stride, int bd); - -void vpx_highbd_iwht4x4_16_add_c(const tran_low_t *input, uint8_t *dest, int stride, int bd); -#define vpx_highbd_iwht4x4_16_add vpx_highbd_iwht4x4_16_add_c - -void vpx_highbd_iwht4x4_1_add_c(const tran_low_t *input, uint8_t *dest, int stride, int bd); -#define vpx_highbd_iwht4x4_1_add vpx_highbd_iwht4x4_1_add_c - -void vpx_highbd_lpf_horizontal_16_c(uint16_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh, int bd); -void vpx_highbd_lpf_horizontal_16_sse2(uint16_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh, int bd); -RTCD_EXTERN void (*vpx_highbd_lpf_horizontal_16)(uint16_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh, int bd); - -void vpx_highbd_lpf_horizontal_16_dual_c(uint16_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh, int bd); -void vpx_highbd_lpf_horizontal_16_dual_sse2(uint16_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh, int bd); -RTCD_EXTERN void (*vpx_highbd_lpf_horizontal_16_dual)(uint16_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh, int bd); - -void vpx_highbd_lpf_horizontal_4_c(uint16_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh, int bd); -void vpx_highbd_lpf_horizontal_4_sse2(uint16_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh, int bd); -RTCD_EXTERN void (*vpx_highbd_lpf_horizontal_4)(uint16_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh, int bd); - -void vpx_highbd_lpf_horizontal_4_dual_c(uint16_t *s, int pitch, const uint8_t *blimit0, const uint8_t *limit0, const uint8_t *thresh0, const uint8_t *blimit1, const uint8_t *limit1, const uint8_t *thresh1, int bd); -void vpx_highbd_lpf_horizontal_4_dual_sse2(uint16_t *s, int pitch, const uint8_t *blimit0, const uint8_t *limit0, const uint8_t *thresh0, const uint8_t *blimit1, const uint8_t *limit1, const uint8_t *thresh1, int bd); -RTCD_EXTERN void (*vpx_highbd_lpf_horizontal_4_dual)(uint16_t *s, int pitch, const uint8_t *blimit0, const uint8_t *limit0, const uint8_t *thresh0, const uint8_t *blimit1, const uint8_t *limit1, const uint8_t *thresh1, int bd); - -void vpx_highbd_lpf_horizontal_8_c(uint16_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh, int bd); -void vpx_highbd_lpf_horizontal_8_sse2(uint16_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh, int bd); -RTCD_EXTERN void (*vpx_highbd_lpf_horizontal_8)(uint16_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh, int bd); - -void vpx_highbd_lpf_horizontal_8_dual_c(uint16_t *s, int pitch, const uint8_t *blimit0, const uint8_t *limit0, const uint8_t *thresh0, const uint8_t *blimit1, const uint8_t *limit1, const uint8_t *thresh1, int bd); -void vpx_highbd_lpf_horizontal_8_dual_sse2(uint16_t *s, int pitch, const uint8_t *blimit0, const uint8_t *limit0, const uint8_t *thresh0, const uint8_t *blimit1, const uint8_t *limit1, const uint8_t *thresh1, int bd); -RTCD_EXTERN void (*vpx_highbd_lpf_horizontal_8_dual)(uint16_t *s, int pitch, const uint8_t *blimit0, const uint8_t *limit0, const uint8_t *thresh0, const uint8_t *blimit1, const uint8_t *limit1, const uint8_t *thresh1, int bd); - -void vpx_highbd_lpf_vertical_16_c(uint16_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh, int bd); -void vpx_highbd_lpf_vertical_16_sse2(uint16_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh, int bd); -RTCD_EXTERN void (*vpx_highbd_lpf_vertical_16)(uint16_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh, int bd); - -void vpx_highbd_lpf_vertical_16_dual_c(uint16_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh, int bd); -void vpx_highbd_lpf_vertical_16_dual_sse2(uint16_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh, int bd); -RTCD_EXTERN void (*vpx_highbd_lpf_vertical_16_dual)(uint16_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh, int bd); - -void vpx_highbd_lpf_vertical_4_c(uint16_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh, int bd); -void vpx_highbd_lpf_vertical_4_sse2(uint16_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh, int bd); -RTCD_EXTERN void (*vpx_highbd_lpf_vertical_4)(uint16_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh, int bd); - -void vpx_highbd_lpf_vertical_4_dual_c(uint16_t *s, int pitch, const uint8_t *blimit0, const uint8_t *limit0, const uint8_t *thresh0, const uint8_t *blimit1, const uint8_t *limit1, const uint8_t *thresh1, int bd); -void vpx_highbd_lpf_vertical_4_dual_sse2(uint16_t *s, int pitch, const uint8_t *blimit0, const uint8_t *limit0, const uint8_t *thresh0, const uint8_t *blimit1, const uint8_t *limit1, const uint8_t *thresh1, int bd); -RTCD_EXTERN void (*vpx_highbd_lpf_vertical_4_dual)(uint16_t *s, int pitch, const uint8_t *blimit0, const uint8_t *limit0, const uint8_t *thresh0, const uint8_t *blimit1, const uint8_t *limit1, const uint8_t *thresh1, int bd); - -void vpx_highbd_lpf_vertical_8_c(uint16_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh, int bd); -void vpx_highbd_lpf_vertical_8_sse2(uint16_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh, int bd); -RTCD_EXTERN void (*vpx_highbd_lpf_vertical_8)(uint16_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh, int bd); - -void vpx_highbd_lpf_vertical_8_dual_c(uint16_t *s, int pitch, const uint8_t *blimit0, const uint8_t *limit0, const uint8_t *thresh0, const uint8_t *blimit1, const uint8_t *limit1, const uint8_t *thresh1, int bd); -void vpx_highbd_lpf_vertical_8_dual_sse2(uint16_t *s, int pitch, const uint8_t *blimit0, const uint8_t *limit0, const uint8_t *thresh0, const uint8_t *blimit1, const uint8_t *limit1, const uint8_t *thresh1, int bd); -RTCD_EXTERN void (*vpx_highbd_lpf_vertical_8_dual)(uint16_t *s, int pitch, const uint8_t *blimit0, const uint8_t *limit0, const uint8_t *thresh0, const uint8_t *blimit1, const uint8_t *limit1, const uint8_t *thresh1, int bd); - -void vpx_highbd_minmax_8x8_c(const uint8_t *s, int p, const uint8_t *d, int dp, int *min, int *max); -#define vpx_highbd_minmax_8x8 vpx_highbd_minmax_8x8_c - -void vpx_highbd_quantize_b_c(const tran_low_t *coeff_ptr, intptr_t n_coeffs, int skip_block, const int16_t *zbin_ptr, const int16_t *round_ptr, const int16_t *quant_ptr, const int16_t *quant_shift_ptr, tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr, const int16_t *dequant_ptr, uint16_t *eob_ptr, const int16_t *scan, const int16_t *iscan); -void vpx_highbd_quantize_b_sse2(const tran_low_t *coeff_ptr, intptr_t n_coeffs, int skip_block, const int16_t *zbin_ptr, const int16_t *round_ptr, const int16_t *quant_ptr, const int16_t *quant_shift_ptr, tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr, const int16_t *dequant_ptr, uint16_t *eob_ptr, const int16_t *scan, const int16_t *iscan); -RTCD_EXTERN void (*vpx_highbd_quantize_b)(const tran_low_t *coeff_ptr, intptr_t n_coeffs, int skip_block, const int16_t *zbin_ptr, const int16_t *round_ptr, const int16_t *quant_ptr, const int16_t *quant_shift_ptr, tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr, const int16_t *dequant_ptr, uint16_t *eob_ptr, const int16_t *scan, const int16_t *iscan); - -void vpx_highbd_quantize_b_32x32_c(const tran_low_t *coeff_ptr, intptr_t n_coeffs, int skip_block, const int16_t *zbin_ptr, const int16_t *round_ptr, const int16_t *quant_ptr, const int16_t *quant_shift_ptr, tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr, const int16_t *dequant_ptr, uint16_t *eob_ptr, const int16_t *scan, const int16_t *iscan); -void vpx_highbd_quantize_b_32x32_sse2(const tran_low_t *coeff_ptr, intptr_t n_coeffs, int skip_block, const int16_t *zbin_ptr, const int16_t *round_ptr, const int16_t *quant_ptr, const int16_t *quant_shift_ptr, tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr, const int16_t *dequant_ptr, uint16_t *eob_ptr, const int16_t *scan, const int16_t *iscan); -RTCD_EXTERN void (*vpx_highbd_quantize_b_32x32)(const tran_low_t *coeff_ptr, intptr_t n_coeffs, int skip_block, const int16_t *zbin_ptr, const int16_t *round_ptr, const int16_t *quant_ptr, const int16_t *quant_shift_ptr, tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr, const int16_t *dequant_ptr, uint16_t *eob_ptr, const int16_t *scan, const int16_t *iscan); - -unsigned int vpx_highbd_sad16x16_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -unsigned int vpx_highbd_sad16x16_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -RTCD_EXTERN unsigned int (*vpx_highbd_sad16x16)(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); - -unsigned int vpx_highbd_sad16x16_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -unsigned int vpx_highbd_sad16x16_avg_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -RTCD_EXTERN unsigned int (*vpx_highbd_sad16x16_avg)(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); - -void vpx_highbd_sad16x16x3_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -#define vpx_highbd_sad16x16x3 vpx_highbd_sad16x16x3_c - -void vpx_highbd_sad16x16x4d_c(const uint8_t *src_ptr, int src_stride, const uint8_t* const ref_ptr[], int ref_stride, uint32_t *sad_array); -void vpx_highbd_sad16x16x4d_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t* const ref_ptr[], int ref_stride, uint32_t *sad_array); -RTCD_EXTERN void (*vpx_highbd_sad16x16x4d)(const uint8_t *src_ptr, int src_stride, const uint8_t* const ref_ptr[], int ref_stride, uint32_t *sad_array); - -void vpx_highbd_sad16x16x8_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -#define vpx_highbd_sad16x16x8 vpx_highbd_sad16x16x8_c - -unsigned int vpx_highbd_sad16x32_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -unsigned int vpx_highbd_sad16x32_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -RTCD_EXTERN unsigned int (*vpx_highbd_sad16x32)(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); - -unsigned int vpx_highbd_sad16x32_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -unsigned int vpx_highbd_sad16x32_avg_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -RTCD_EXTERN unsigned int (*vpx_highbd_sad16x32_avg)(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); - -void vpx_highbd_sad16x32x4d_c(const uint8_t *src_ptr, int src_stride, const uint8_t* const ref_ptr[], int ref_stride, uint32_t *sad_array); -void vpx_highbd_sad16x32x4d_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t* const ref_ptr[], int ref_stride, uint32_t *sad_array); -RTCD_EXTERN void (*vpx_highbd_sad16x32x4d)(const uint8_t *src_ptr, int src_stride, const uint8_t* const ref_ptr[], int ref_stride, uint32_t *sad_array); - -unsigned int vpx_highbd_sad16x8_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -unsigned int vpx_highbd_sad16x8_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -RTCD_EXTERN unsigned int (*vpx_highbd_sad16x8)(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); - -unsigned int vpx_highbd_sad16x8_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -unsigned int vpx_highbd_sad16x8_avg_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -RTCD_EXTERN unsigned int (*vpx_highbd_sad16x8_avg)(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); - -void vpx_highbd_sad16x8x3_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -#define vpx_highbd_sad16x8x3 vpx_highbd_sad16x8x3_c - -void vpx_highbd_sad16x8x4d_c(const uint8_t *src_ptr, int src_stride, const uint8_t* const ref_ptr[], int ref_stride, uint32_t *sad_array); -void vpx_highbd_sad16x8x4d_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t* const ref_ptr[], int ref_stride, uint32_t *sad_array); -RTCD_EXTERN void (*vpx_highbd_sad16x8x4d)(const uint8_t *src_ptr, int src_stride, const uint8_t* const ref_ptr[], int ref_stride, uint32_t *sad_array); - -void vpx_highbd_sad16x8x8_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -#define vpx_highbd_sad16x8x8 vpx_highbd_sad16x8x8_c - -unsigned int vpx_highbd_sad32x16_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -unsigned int vpx_highbd_sad32x16_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -RTCD_EXTERN unsigned int (*vpx_highbd_sad32x16)(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); - -unsigned int vpx_highbd_sad32x16_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -unsigned int vpx_highbd_sad32x16_avg_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -RTCD_EXTERN unsigned int (*vpx_highbd_sad32x16_avg)(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); - -void vpx_highbd_sad32x16x4d_c(const uint8_t *src_ptr, int src_stride, const uint8_t* const ref_ptr[], int ref_stride, uint32_t *sad_array); -void vpx_highbd_sad32x16x4d_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t* const ref_ptr[], int ref_stride, uint32_t *sad_array); -RTCD_EXTERN void (*vpx_highbd_sad32x16x4d)(const uint8_t *src_ptr, int src_stride, const uint8_t* const ref_ptr[], int ref_stride, uint32_t *sad_array); - -unsigned int vpx_highbd_sad32x32_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -unsigned int vpx_highbd_sad32x32_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -RTCD_EXTERN unsigned int (*vpx_highbd_sad32x32)(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); - -unsigned int vpx_highbd_sad32x32_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -unsigned int vpx_highbd_sad32x32_avg_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -RTCD_EXTERN unsigned int (*vpx_highbd_sad32x32_avg)(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); - -void vpx_highbd_sad32x32x3_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -#define vpx_highbd_sad32x32x3 vpx_highbd_sad32x32x3_c - -void vpx_highbd_sad32x32x4d_c(const uint8_t *src_ptr, int src_stride, const uint8_t* const ref_ptr[], int ref_stride, uint32_t *sad_array); -void vpx_highbd_sad32x32x4d_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t* const ref_ptr[], int ref_stride, uint32_t *sad_array); -RTCD_EXTERN void (*vpx_highbd_sad32x32x4d)(const uint8_t *src_ptr, int src_stride, const uint8_t* const ref_ptr[], int ref_stride, uint32_t *sad_array); - -void vpx_highbd_sad32x32x8_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -#define vpx_highbd_sad32x32x8 vpx_highbd_sad32x32x8_c - -unsigned int vpx_highbd_sad32x64_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -unsigned int vpx_highbd_sad32x64_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -RTCD_EXTERN unsigned int (*vpx_highbd_sad32x64)(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); - -unsigned int vpx_highbd_sad32x64_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -unsigned int vpx_highbd_sad32x64_avg_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -RTCD_EXTERN unsigned int (*vpx_highbd_sad32x64_avg)(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); - -void vpx_highbd_sad32x64x4d_c(const uint8_t *src_ptr, int src_stride, const uint8_t* const ref_ptr[], int ref_stride, uint32_t *sad_array); -void vpx_highbd_sad32x64x4d_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t* const ref_ptr[], int ref_stride, uint32_t *sad_array); -RTCD_EXTERN void (*vpx_highbd_sad32x64x4d)(const uint8_t *src_ptr, int src_stride, const uint8_t* const ref_ptr[], int ref_stride, uint32_t *sad_array); - -unsigned int vpx_highbd_sad4x4_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -#define vpx_highbd_sad4x4 vpx_highbd_sad4x4_c - -unsigned int vpx_highbd_sad4x4_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -#define vpx_highbd_sad4x4_avg vpx_highbd_sad4x4_avg_c - -void vpx_highbd_sad4x4x3_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -#define vpx_highbd_sad4x4x3 vpx_highbd_sad4x4x3_c - -void vpx_highbd_sad4x4x4d_c(const uint8_t *src_ptr, int src_stride, const uint8_t* const ref_ptr[], int ref_stride, uint32_t *sad_array); -void vpx_highbd_sad4x4x4d_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t* const ref_ptr[], int ref_stride, uint32_t *sad_array); -RTCD_EXTERN void (*vpx_highbd_sad4x4x4d)(const uint8_t *src_ptr, int src_stride, const uint8_t* const ref_ptr[], int ref_stride, uint32_t *sad_array); - -void vpx_highbd_sad4x4x8_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -#define vpx_highbd_sad4x4x8 vpx_highbd_sad4x4x8_c - -unsigned int vpx_highbd_sad4x8_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -#define vpx_highbd_sad4x8 vpx_highbd_sad4x8_c - -unsigned int vpx_highbd_sad4x8_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -#define vpx_highbd_sad4x8_avg vpx_highbd_sad4x8_avg_c - -void vpx_highbd_sad4x8x4d_c(const uint8_t *src_ptr, int src_stride, const uint8_t* const ref_ptr[], int ref_stride, uint32_t *sad_array); -void vpx_highbd_sad4x8x4d_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t* const ref_ptr[], int ref_stride, uint32_t *sad_array); -RTCD_EXTERN void (*vpx_highbd_sad4x8x4d)(const uint8_t *src_ptr, int src_stride, const uint8_t* const ref_ptr[], int ref_stride, uint32_t *sad_array); - -void vpx_highbd_sad4x8x8_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -#define vpx_highbd_sad4x8x8 vpx_highbd_sad4x8x8_c - -unsigned int vpx_highbd_sad64x32_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -unsigned int vpx_highbd_sad64x32_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -RTCD_EXTERN unsigned int (*vpx_highbd_sad64x32)(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); - -unsigned int vpx_highbd_sad64x32_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -unsigned int vpx_highbd_sad64x32_avg_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -RTCD_EXTERN unsigned int (*vpx_highbd_sad64x32_avg)(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); - -void vpx_highbd_sad64x32x4d_c(const uint8_t *src_ptr, int src_stride, const uint8_t* const ref_ptr[], int ref_stride, uint32_t *sad_array); -void vpx_highbd_sad64x32x4d_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t* const ref_ptr[], int ref_stride, uint32_t *sad_array); -RTCD_EXTERN void (*vpx_highbd_sad64x32x4d)(const uint8_t *src_ptr, int src_stride, const uint8_t* const ref_ptr[], int ref_stride, uint32_t *sad_array); - -unsigned int vpx_highbd_sad64x64_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -unsigned int vpx_highbd_sad64x64_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -RTCD_EXTERN unsigned int (*vpx_highbd_sad64x64)(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); - -unsigned int vpx_highbd_sad64x64_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -unsigned int vpx_highbd_sad64x64_avg_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -RTCD_EXTERN unsigned int (*vpx_highbd_sad64x64_avg)(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); - -void vpx_highbd_sad64x64x3_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -#define vpx_highbd_sad64x64x3 vpx_highbd_sad64x64x3_c - -void vpx_highbd_sad64x64x4d_c(const uint8_t *src_ptr, int src_stride, const uint8_t* const ref_ptr[], int ref_stride, uint32_t *sad_array); -void vpx_highbd_sad64x64x4d_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t* const ref_ptr[], int ref_stride, uint32_t *sad_array); -RTCD_EXTERN void (*vpx_highbd_sad64x64x4d)(const uint8_t *src_ptr, int src_stride, const uint8_t* const ref_ptr[], int ref_stride, uint32_t *sad_array); - -void vpx_highbd_sad64x64x8_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -#define vpx_highbd_sad64x64x8 vpx_highbd_sad64x64x8_c - -unsigned int vpx_highbd_sad8x16_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -unsigned int vpx_highbd_sad8x16_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -RTCD_EXTERN unsigned int (*vpx_highbd_sad8x16)(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); - -unsigned int vpx_highbd_sad8x16_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -unsigned int vpx_highbd_sad8x16_avg_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -RTCD_EXTERN unsigned int (*vpx_highbd_sad8x16_avg)(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); - -void vpx_highbd_sad8x16x3_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -#define vpx_highbd_sad8x16x3 vpx_highbd_sad8x16x3_c - -void vpx_highbd_sad8x16x4d_c(const uint8_t *src_ptr, int src_stride, const uint8_t* const ref_ptr[], int ref_stride, uint32_t *sad_array); -void vpx_highbd_sad8x16x4d_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t* const ref_ptr[], int ref_stride, uint32_t *sad_array); -RTCD_EXTERN void (*vpx_highbd_sad8x16x4d)(const uint8_t *src_ptr, int src_stride, const uint8_t* const ref_ptr[], int ref_stride, uint32_t *sad_array); - -void vpx_highbd_sad8x16x8_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -#define vpx_highbd_sad8x16x8 vpx_highbd_sad8x16x8_c - -unsigned int vpx_highbd_sad8x4_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -unsigned int vpx_highbd_sad8x4_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -RTCD_EXTERN unsigned int (*vpx_highbd_sad8x4)(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); - -unsigned int vpx_highbd_sad8x4_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -unsigned int vpx_highbd_sad8x4_avg_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -RTCD_EXTERN unsigned int (*vpx_highbd_sad8x4_avg)(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); - -void vpx_highbd_sad8x4x4d_c(const uint8_t *src_ptr, int src_stride, const uint8_t* const ref_ptr[], int ref_stride, uint32_t *sad_array); -void vpx_highbd_sad8x4x4d_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t* const ref_ptr[], int ref_stride, uint32_t *sad_array); -RTCD_EXTERN void (*vpx_highbd_sad8x4x4d)(const uint8_t *src_ptr, int src_stride, const uint8_t* const ref_ptr[], int ref_stride, uint32_t *sad_array); - -void vpx_highbd_sad8x4x8_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -#define vpx_highbd_sad8x4x8 vpx_highbd_sad8x4x8_c - -unsigned int vpx_highbd_sad8x8_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -unsigned int vpx_highbd_sad8x8_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -RTCD_EXTERN unsigned int (*vpx_highbd_sad8x8)(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); - -unsigned int vpx_highbd_sad8x8_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -unsigned int vpx_highbd_sad8x8_avg_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -RTCD_EXTERN unsigned int (*vpx_highbd_sad8x8_avg)(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); - -void vpx_highbd_sad8x8x3_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -#define vpx_highbd_sad8x8x3 vpx_highbd_sad8x8x3_c - -void vpx_highbd_sad8x8x4d_c(const uint8_t *src_ptr, int src_stride, const uint8_t* const ref_ptr[], int ref_stride, uint32_t *sad_array); -void vpx_highbd_sad8x8x4d_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t* const ref_ptr[], int ref_stride, uint32_t *sad_array); -RTCD_EXTERN void (*vpx_highbd_sad8x8x4d)(const uint8_t *src_ptr, int src_stride, const uint8_t* const ref_ptr[], int ref_stride, uint32_t *sad_array); - -void vpx_highbd_sad8x8x8_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -#define vpx_highbd_sad8x8x8 vpx_highbd_sad8x8x8_c - -void vpx_highbd_subtract_block_c(int rows, int cols, int16_t *diff_ptr, ptrdiff_t diff_stride, const uint8_t *src_ptr, ptrdiff_t src_stride, const uint8_t *pred_ptr, ptrdiff_t pred_stride, int bd); -#define vpx_highbd_subtract_block vpx_highbd_subtract_block_c - -void vpx_highbd_tm_predictor_16x16_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -void vpx_highbd_tm_predictor_16x16_sse2(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -RTCD_EXTERN void (*vpx_highbd_tm_predictor_16x16)(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); - -void vpx_highbd_tm_predictor_32x32_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -void vpx_highbd_tm_predictor_32x32_sse2(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -RTCD_EXTERN void (*vpx_highbd_tm_predictor_32x32)(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); - -void vpx_highbd_tm_predictor_4x4_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -void vpx_highbd_tm_predictor_4x4_sse2(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -RTCD_EXTERN void (*vpx_highbd_tm_predictor_4x4)(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); - -void vpx_highbd_tm_predictor_8x8_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -void vpx_highbd_tm_predictor_8x8_sse2(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -RTCD_EXTERN void (*vpx_highbd_tm_predictor_8x8)(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); - -void vpx_highbd_v_predictor_16x16_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -void vpx_highbd_v_predictor_16x16_sse2(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -RTCD_EXTERN void (*vpx_highbd_v_predictor_16x16)(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); - -void vpx_highbd_v_predictor_32x32_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -void vpx_highbd_v_predictor_32x32_sse2(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -RTCD_EXTERN void (*vpx_highbd_v_predictor_32x32)(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); - -void vpx_highbd_v_predictor_4x4_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -void vpx_highbd_v_predictor_4x4_sse2(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -RTCD_EXTERN void (*vpx_highbd_v_predictor_4x4)(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); - -void vpx_highbd_v_predictor_8x8_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -void vpx_highbd_v_predictor_8x8_sse2(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -RTCD_EXTERN void (*vpx_highbd_v_predictor_8x8)(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); - -void vpx_idct16x16_10_add_c(const tran_low_t *input, uint8_t *dest, int stride); -void vpx_idct16x16_10_add_sse2(const tran_low_t *input, uint8_t *dest, int stride); -RTCD_EXTERN void (*vpx_idct16x16_10_add)(const tran_low_t *input, uint8_t *dest, int stride); - -void vpx_idct16x16_1_add_c(const tran_low_t *input, uint8_t *dest, int stride); -void vpx_idct16x16_1_add_sse2(const tran_low_t *input, uint8_t *dest, int stride); -RTCD_EXTERN void (*vpx_idct16x16_1_add)(const tran_low_t *input, uint8_t *dest, int stride); - -void vpx_idct16x16_256_add_c(const tran_low_t *input, uint8_t *dest, int stride); -void vpx_idct16x16_256_add_sse2(const tran_low_t *input, uint8_t *dest, int stride); -RTCD_EXTERN void (*vpx_idct16x16_256_add)(const tran_low_t *input, uint8_t *dest, int stride); - -void vpx_idct32x32_1024_add_c(const tran_low_t *input, uint8_t *dest, int stride); -void vpx_idct32x32_1024_add_sse2(const tran_low_t *input, uint8_t *dest, int stride); -RTCD_EXTERN void (*vpx_idct32x32_1024_add)(const tran_low_t *input, uint8_t *dest, int stride); - -void vpx_idct32x32_135_add_c(const tran_low_t *input, uint8_t *dest, int stride); -void vpx_idct32x32_1024_add_sse2(const tran_low_t *input, uint8_t *dest, int stride); -RTCD_EXTERN void (*vpx_idct32x32_135_add)(const tran_low_t *input, uint8_t *dest, int stride); - -void vpx_idct32x32_1_add_c(const tran_low_t *input, uint8_t *dest, int stride); -void vpx_idct32x32_1_add_sse2(const tran_low_t *input, uint8_t *dest, int stride); -RTCD_EXTERN void (*vpx_idct32x32_1_add)(const tran_low_t *input, uint8_t *dest, int stride); - -void vpx_idct32x32_34_add_c(const tran_low_t *input, uint8_t *dest, int stride); -void vpx_idct32x32_34_add_sse2(const tran_low_t *input, uint8_t *dest, int stride); -RTCD_EXTERN void (*vpx_idct32x32_34_add)(const tran_low_t *input, uint8_t *dest, int stride); - -void vpx_idct4x4_16_add_c(const tran_low_t *input, uint8_t *dest, int stride); -void vpx_idct4x4_16_add_sse2(const tran_low_t *input, uint8_t *dest, int stride); -RTCD_EXTERN void (*vpx_idct4x4_16_add)(const tran_low_t *input, uint8_t *dest, int stride); - -void vpx_idct4x4_1_add_c(const tran_low_t *input, uint8_t *dest, int stride); -void vpx_idct4x4_1_add_sse2(const tran_low_t *input, uint8_t *dest, int stride); -RTCD_EXTERN void (*vpx_idct4x4_1_add)(const tran_low_t *input, uint8_t *dest, int stride); - -void vpx_idct8x8_12_add_c(const tran_low_t *input, uint8_t *dest, int stride); -void vpx_idct8x8_12_add_sse2(const tran_low_t *input, uint8_t *dest, int stride); -RTCD_EXTERN void (*vpx_idct8x8_12_add)(const tran_low_t *input, uint8_t *dest, int stride); - -void vpx_idct8x8_1_add_c(const tran_low_t *input, uint8_t *dest, int stride); -void vpx_idct8x8_1_add_sse2(const tran_low_t *input, uint8_t *dest, int stride); -RTCD_EXTERN void (*vpx_idct8x8_1_add)(const tran_low_t *input, uint8_t *dest, int stride); - -void vpx_idct8x8_64_add_c(const tran_low_t *input, uint8_t *dest, int stride); -void vpx_idct8x8_64_add_sse2(const tran_low_t *input, uint8_t *dest, int stride); -RTCD_EXTERN void (*vpx_idct8x8_64_add)(const tran_low_t *input, uint8_t *dest, int stride); - -int16_t vpx_int_pro_col_c(const uint8_t *ref, const int width); -int16_t vpx_int_pro_col_sse2(const uint8_t *ref, const int width); -RTCD_EXTERN int16_t (*vpx_int_pro_col)(const uint8_t *ref, const int width); - -void vpx_int_pro_row_c(int16_t *hbuf, const uint8_t *ref, const int ref_stride, const int height); -void vpx_int_pro_row_sse2(int16_t *hbuf, const uint8_t *ref, const int ref_stride, const int height); -RTCD_EXTERN void (*vpx_int_pro_row)(int16_t *hbuf, const uint8_t *ref, const int ref_stride, const int height); - -void vpx_iwht4x4_16_add_c(const tran_low_t *input, uint8_t *dest, int stride); -void vpx_iwht4x4_16_add_sse2(const tran_low_t *input, uint8_t *dest, int stride); -RTCD_EXTERN void (*vpx_iwht4x4_16_add)(const tran_low_t *input, uint8_t *dest, int stride); - -void vpx_iwht4x4_1_add_c(const tran_low_t *input, uint8_t *dest, int stride); -#define vpx_iwht4x4_1_add vpx_iwht4x4_1_add_c - -void vpx_lpf_horizontal_16_c(uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh); -void vpx_lpf_horizontal_16_sse2(uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh); -void vpx_lpf_horizontal_16_avx2(uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh); -RTCD_EXTERN void (*vpx_lpf_horizontal_16)(uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh); - -void vpx_lpf_horizontal_16_dual_c(uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh); -void vpx_lpf_horizontal_16_dual_sse2(uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh); -void vpx_lpf_horizontal_16_dual_avx2(uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh); -RTCD_EXTERN void (*vpx_lpf_horizontal_16_dual)(uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh); - -void vpx_lpf_horizontal_4_c(uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh); -void vpx_lpf_horizontal_4_sse2(uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh); -RTCD_EXTERN void (*vpx_lpf_horizontal_4)(uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh); - -void vpx_lpf_horizontal_4_dual_c(uint8_t *s, int pitch, const uint8_t *blimit0, const uint8_t *limit0, const uint8_t *thresh0, const uint8_t *blimit1, const uint8_t *limit1, const uint8_t *thresh1); -void vpx_lpf_horizontal_4_dual_sse2(uint8_t *s, int pitch, const uint8_t *blimit0, const uint8_t *limit0, const uint8_t *thresh0, const uint8_t *blimit1, const uint8_t *limit1, const uint8_t *thresh1); -RTCD_EXTERN void (*vpx_lpf_horizontal_4_dual)(uint8_t *s, int pitch, const uint8_t *blimit0, const uint8_t *limit0, const uint8_t *thresh0, const uint8_t *blimit1, const uint8_t *limit1, const uint8_t *thresh1); - -void vpx_lpf_horizontal_8_c(uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh); -void vpx_lpf_horizontal_8_sse2(uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh); -RTCD_EXTERN void (*vpx_lpf_horizontal_8)(uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh); - -void vpx_lpf_horizontal_8_dual_c(uint8_t *s, int pitch, const uint8_t *blimit0, const uint8_t *limit0, const uint8_t *thresh0, const uint8_t *blimit1, const uint8_t *limit1, const uint8_t *thresh1); -void vpx_lpf_horizontal_8_dual_sse2(uint8_t *s, int pitch, const uint8_t *blimit0, const uint8_t *limit0, const uint8_t *thresh0, const uint8_t *blimit1, const uint8_t *limit1, const uint8_t *thresh1); -RTCD_EXTERN void (*vpx_lpf_horizontal_8_dual)(uint8_t *s, int pitch, const uint8_t *blimit0, const uint8_t *limit0, const uint8_t *thresh0, const uint8_t *blimit1, const uint8_t *limit1, const uint8_t *thresh1); - -void vpx_lpf_vertical_16_c(uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh); -void vpx_lpf_vertical_16_sse2(uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh); -RTCD_EXTERN void (*vpx_lpf_vertical_16)(uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh); - -void vpx_lpf_vertical_16_dual_c(uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh); -void vpx_lpf_vertical_16_dual_sse2(uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh); -RTCD_EXTERN void (*vpx_lpf_vertical_16_dual)(uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh); - -void vpx_lpf_vertical_4_c(uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh); -void vpx_lpf_vertical_4_sse2(uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh); -RTCD_EXTERN void (*vpx_lpf_vertical_4)(uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh); - -void vpx_lpf_vertical_4_dual_c(uint8_t *s, int pitch, const uint8_t *blimit0, const uint8_t *limit0, const uint8_t *thresh0, const uint8_t *blimit1, const uint8_t *limit1, const uint8_t *thresh1); -void vpx_lpf_vertical_4_dual_sse2(uint8_t *s, int pitch, const uint8_t *blimit0, const uint8_t *limit0, const uint8_t *thresh0, const uint8_t *blimit1, const uint8_t *limit1, const uint8_t *thresh1); -RTCD_EXTERN void (*vpx_lpf_vertical_4_dual)(uint8_t *s, int pitch, const uint8_t *blimit0, const uint8_t *limit0, const uint8_t *thresh0, const uint8_t *blimit1, const uint8_t *limit1, const uint8_t *thresh1); - -void vpx_lpf_vertical_8_c(uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh); -void vpx_lpf_vertical_8_sse2(uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh); -RTCD_EXTERN void (*vpx_lpf_vertical_8)(uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh); - -void vpx_lpf_vertical_8_dual_c(uint8_t *s, int pitch, const uint8_t *blimit0, const uint8_t *limit0, const uint8_t *thresh0, const uint8_t *blimit1, const uint8_t *limit1, const uint8_t *thresh1); -void vpx_lpf_vertical_8_dual_sse2(uint8_t *s, int pitch, const uint8_t *blimit0, const uint8_t *limit0, const uint8_t *thresh0, const uint8_t *blimit1, const uint8_t *limit1, const uint8_t *thresh1); -RTCD_EXTERN void (*vpx_lpf_vertical_8_dual)(uint8_t *s, int pitch, const uint8_t *blimit0, const uint8_t *limit0, const uint8_t *thresh0, const uint8_t *blimit1, const uint8_t *limit1, const uint8_t *thresh1); - -void vpx_mbpost_proc_across_ip_c(unsigned char *dst, int pitch, int rows, int cols,int flimit); -void vpx_mbpost_proc_across_ip_sse2(unsigned char *dst, int pitch, int rows, int cols,int flimit); -RTCD_EXTERN void (*vpx_mbpost_proc_across_ip)(unsigned char *dst, int pitch, int rows, int cols,int flimit); - -void vpx_mbpost_proc_down_c(unsigned char *dst, int pitch, int rows, int cols,int flimit); -void vpx_mbpost_proc_down_sse2(unsigned char *dst, int pitch, int rows, int cols,int flimit); -RTCD_EXTERN void (*vpx_mbpost_proc_down)(unsigned char *dst, int pitch, int rows, int cols,int flimit); - -void vpx_minmax_8x8_c(const uint8_t *s, int p, const uint8_t *d, int dp, int *min, int *max); -void vpx_minmax_8x8_sse2(const uint8_t *s, int p, const uint8_t *d, int dp, int *min, int *max); -RTCD_EXTERN void (*vpx_minmax_8x8)(const uint8_t *s, int p, const uint8_t *d, int dp, int *min, int *max); - -unsigned int vpx_mse16x16_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int recon_stride, unsigned int *sse); -unsigned int vpx_mse16x16_sse2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int recon_stride, unsigned int *sse); -unsigned int vpx_mse16x16_avx2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int recon_stride, unsigned int *sse); -RTCD_EXTERN unsigned int (*vpx_mse16x16)(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int recon_stride, unsigned int *sse); - -unsigned int vpx_mse16x8_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int recon_stride, unsigned int *sse); -unsigned int vpx_mse16x8_sse2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int recon_stride, unsigned int *sse); -RTCD_EXTERN unsigned int (*vpx_mse16x8)(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int recon_stride, unsigned int *sse); - -unsigned int vpx_mse8x16_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int recon_stride, unsigned int *sse); -unsigned int vpx_mse8x16_sse2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int recon_stride, unsigned int *sse); -RTCD_EXTERN unsigned int (*vpx_mse8x16)(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int recon_stride, unsigned int *sse); - -unsigned int vpx_mse8x8_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int recon_stride, unsigned int *sse); -unsigned int vpx_mse8x8_sse2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int recon_stride, unsigned int *sse); -RTCD_EXTERN unsigned int (*vpx_mse8x8)(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int recon_stride, unsigned int *sse); - -void vpx_plane_add_noise_c(uint8_t *start, const int8_t *noise, int blackclamp, int whiteclamp, int width, int height, int pitch); -void vpx_plane_add_noise_sse2(uint8_t *start, const int8_t *noise, int blackclamp, int whiteclamp, int width, int height, int pitch); -RTCD_EXTERN void (*vpx_plane_add_noise)(uint8_t *start, const int8_t *noise, int blackclamp, int whiteclamp, int width, int height, int pitch); - -void vpx_post_proc_down_and_across_mb_row_c(unsigned char *src, unsigned char *dst, int src_pitch, int dst_pitch, int cols, unsigned char *flimits, int size); -void vpx_post_proc_down_and_across_mb_row_sse2(unsigned char *src, unsigned char *dst, int src_pitch, int dst_pitch, int cols, unsigned char *flimits, int size); -RTCD_EXTERN void (*vpx_post_proc_down_and_across_mb_row)(unsigned char *src, unsigned char *dst, int src_pitch, int dst_pitch, int cols, unsigned char *flimits, int size); - -void vpx_quantize_b_c(const tran_low_t *coeff_ptr, intptr_t n_coeffs, int skip_block, const int16_t *zbin_ptr, const int16_t *round_ptr, const int16_t *quant_ptr, const int16_t *quant_shift_ptr, tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr, const int16_t *dequant_ptr, uint16_t *eob_ptr, const int16_t *scan, const int16_t *iscan); -void vpx_quantize_b_sse2(const tran_low_t *coeff_ptr, intptr_t n_coeffs, int skip_block, const int16_t *zbin_ptr, const int16_t *round_ptr, const int16_t *quant_ptr, const int16_t *quant_shift_ptr, tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr, const int16_t *dequant_ptr, uint16_t *eob_ptr, const int16_t *scan, const int16_t *iscan); -RTCD_EXTERN void (*vpx_quantize_b)(const tran_low_t *coeff_ptr, intptr_t n_coeffs, int skip_block, const int16_t *zbin_ptr, const int16_t *round_ptr, const int16_t *quant_ptr, const int16_t *quant_shift_ptr, tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr, const int16_t *dequant_ptr, uint16_t *eob_ptr, const int16_t *scan, const int16_t *iscan); - -void vpx_quantize_b_32x32_c(const tran_low_t *coeff_ptr, intptr_t n_coeffs, int skip_block, const int16_t *zbin_ptr, const int16_t *round_ptr, const int16_t *quant_ptr, const int16_t *quant_shift_ptr, tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr, const int16_t *dequant_ptr, uint16_t *eob_ptr, const int16_t *scan, const int16_t *iscan); -#define vpx_quantize_b_32x32 vpx_quantize_b_32x32_c - -unsigned int vpx_sad16x16_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -unsigned int vpx_sad16x16_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -RTCD_EXTERN unsigned int (*vpx_sad16x16)(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); - -unsigned int vpx_sad16x16_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -unsigned int vpx_sad16x16_avg_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -RTCD_EXTERN unsigned int (*vpx_sad16x16_avg)(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); - -void vpx_sad16x16x3_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -void vpx_sad16x16x3_sse3(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -void vpx_sad16x16x3_ssse3(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -RTCD_EXTERN void (*vpx_sad16x16x3)(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); - -void vpx_sad16x16x4d_c(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); -void vpx_sad16x16x4d_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); -RTCD_EXTERN void (*vpx_sad16x16x4d)(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); - -void vpx_sad16x16x8_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -void vpx_sad16x16x8_sse4_1(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -RTCD_EXTERN void (*vpx_sad16x16x8)(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); - -unsigned int vpx_sad16x32_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -unsigned int vpx_sad16x32_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -RTCD_EXTERN unsigned int (*vpx_sad16x32)(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); - -unsigned int vpx_sad16x32_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -unsigned int vpx_sad16x32_avg_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -RTCD_EXTERN unsigned int (*vpx_sad16x32_avg)(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); - -void vpx_sad16x32x4d_c(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); -void vpx_sad16x32x4d_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); -RTCD_EXTERN void (*vpx_sad16x32x4d)(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); - -unsigned int vpx_sad16x8_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -unsigned int vpx_sad16x8_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -RTCD_EXTERN unsigned int (*vpx_sad16x8)(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); - -unsigned int vpx_sad16x8_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -unsigned int vpx_sad16x8_avg_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -RTCD_EXTERN unsigned int (*vpx_sad16x8_avg)(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); - -void vpx_sad16x8x3_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -void vpx_sad16x8x3_sse3(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -void vpx_sad16x8x3_ssse3(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -RTCD_EXTERN void (*vpx_sad16x8x3)(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); - -void vpx_sad16x8x4d_c(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); -void vpx_sad16x8x4d_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); -RTCD_EXTERN void (*vpx_sad16x8x4d)(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); - -void vpx_sad16x8x8_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -void vpx_sad16x8x8_sse4_1(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -RTCD_EXTERN void (*vpx_sad16x8x8)(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); - -unsigned int vpx_sad32x16_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -unsigned int vpx_sad32x16_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -unsigned int vpx_sad32x16_avx2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -RTCD_EXTERN unsigned int (*vpx_sad32x16)(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); - -unsigned int vpx_sad32x16_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -unsigned int vpx_sad32x16_avg_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -unsigned int vpx_sad32x16_avg_avx2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -RTCD_EXTERN unsigned int (*vpx_sad32x16_avg)(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); - -void vpx_sad32x16x4d_c(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); -void vpx_sad32x16x4d_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); -RTCD_EXTERN void (*vpx_sad32x16x4d)(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); - -unsigned int vpx_sad32x32_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -unsigned int vpx_sad32x32_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -unsigned int vpx_sad32x32_avx2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -RTCD_EXTERN unsigned int (*vpx_sad32x32)(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); - -unsigned int vpx_sad32x32_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -unsigned int vpx_sad32x32_avg_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -unsigned int vpx_sad32x32_avg_avx2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -RTCD_EXTERN unsigned int (*vpx_sad32x32_avg)(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); - -void vpx_sad32x32x3_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -#define vpx_sad32x32x3 vpx_sad32x32x3_c - -void vpx_sad32x32x4d_c(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); -void vpx_sad32x32x4d_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); -void vpx_sad32x32x4d_avx2(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); -RTCD_EXTERN void (*vpx_sad32x32x4d)(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); - -void vpx_sad32x32x8_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -#define vpx_sad32x32x8 vpx_sad32x32x8_c - -unsigned int vpx_sad32x64_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -unsigned int vpx_sad32x64_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -unsigned int vpx_sad32x64_avx2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -RTCD_EXTERN unsigned int (*vpx_sad32x64)(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); - -unsigned int vpx_sad32x64_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -unsigned int vpx_sad32x64_avg_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -unsigned int vpx_sad32x64_avg_avx2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -RTCD_EXTERN unsigned int (*vpx_sad32x64_avg)(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); - -void vpx_sad32x64x4d_c(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); -void vpx_sad32x64x4d_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); -RTCD_EXTERN void (*vpx_sad32x64x4d)(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); - -unsigned int vpx_sad4x4_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -unsigned int vpx_sad4x4_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -RTCD_EXTERN unsigned int (*vpx_sad4x4)(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); - -unsigned int vpx_sad4x4_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -unsigned int vpx_sad4x4_avg_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -RTCD_EXTERN unsigned int (*vpx_sad4x4_avg)(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); - -void vpx_sad4x4x3_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -void vpx_sad4x4x3_sse3(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -RTCD_EXTERN void (*vpx_sad4x4x3)(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); - -void vpx_sad4x4x4d_c(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); -void vpx_sad4x4x4d_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); -RTCD_EXTERN void (*vpx_sad4x4x4d)(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); - -void vpx_sad4x4x8_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -void vpx_sad4x4x8_sse4_1(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -RTCD_EXTERN void (*vpx_sad4x4x8)(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); - -unsigned int vpx_sad4x8_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -unsigned int vpx_sad4x8_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -RTCD_EXTERN unsigned int (*vpx_sad4x8)(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); - -unsigned int vpx_sad4x8_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -unsigned int vpx_sad4x8_avg_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -RTCD_EXTERN unsigned int (*vpx_sad4x8_avg)(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); - -void vpx_sad4x8x4d_c(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); -void vpx_sad4x8x4d_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); -RTCD_EXTERN void (*vpx_sad4x8x4d)(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); - -void vpx_sad4x8x8_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -#define vpx_sad4x8x8 vpx_sad4x8x8_c - -unsigned int vpx_sad64x32_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -unsigned int vpx_sad64x32_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -unsigned int vpx_sad64x32_avx2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -RTCD_EXTERN unsigned int (*vpx_sad64x32)(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); - -unsigned int vpx_sad64x32_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -unsigned int vpx_sad64x32_avg_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -unsigned int vpx_sad64x32_avg_avx2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -RTCD_EXTERN unsigned int (*vpx_sad64x32_avg)(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); - -void vpx_sad64x32x4d_c(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); -void vpx_sad64x32x4d_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); -RTCD_EXTERN void (*vpx_sad64x32x4d)(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); - -unsigned int vpx_sad64x64_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -unsigned int vpx_sad64x64_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -unsigned int vpx_sad64x64_avx2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -RTCD_EXTERN unsigned int (*vpx_sad64x64)(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); - -unsigned int vpx_sad64x64_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -unsigned int vpx_sad64x64_avg_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -unsigned int vpx_sad64x64_avg_avx2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -RTCD_EXTERN unsigned int (*vpx_sad64x64_avg)(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); - -void vpx_sad64x64x3_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -#define vpx_sad64x64x3 vpx_sad64x64x3_c - -void vpx_sad64x64x4d_c(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); -void vpx_sad64x64x4d_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); -void vpx_sad64x64x4d_avx2(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); -RTCD_EXTERN void (*vpx_sad64x64x4d)(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); - -void vpx_sad64x64x8_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -#define vpx_sad64x64x8 vpx_sad64x64x8_c - -unsigned int vpx_sad8x16_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -unsigned int vpx_sad8x16_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -RTCD_EXTERN unsigned int (*vpx_sad8x16)(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); - -unsigned int vpx_sad8x16_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -unsigned int vpx_sad8x16_avg_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -RTCD_EXTERN unsigned int (*vpx_sad8x16_avg)(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); - -void vpx_sad8x16x3_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -void vpx_sad8x16x3_sse3(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -RTCD_EXTERN void (*vpx_sad8x16x3)(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); - -void vpx_sad8x16x4d_c(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); -void vpx_sad8x16x4d_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); -RTCD_EXTERN void (*vpx_sad8x16x4d)(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); - -void vpx_sad8x16x8_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -void vpx_sad8x16x8_sse4_1(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -RTCD_EXTERN void (*vpx_sad8x16x8)(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); - -unsigned int vpx_sad8x4_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -unsigned int vpx_sad8x4_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -RTCD_EXTERN unsigned int (*vpx_sad8x4)(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); - -unsigned int vpx_sad8x4_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -unsigned int vpx_sad8x4_avg_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -RTCD_EXTERN unsigned int (*vpx_sad8x4_avg)(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); - -void vpx_sad8x4x4d_c(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); -void vpx_sad8x4x4d_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); -RTCD_EXTERN void (*vpx_sad8x4x4d)(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); - -void vpx_sad8x4x8_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -#define vpx_sad8x4x8 vpx_sad8x4x8_c - -unsigned int vpx_sad8x8_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -unsigned int vpx_sad8x8_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -RTCD_EXTERN unsigned int (*vpx_sad8x8)(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); - -unsigned int vpx_sad8x8_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -unsigned int vpx_sad8x8_avg_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -RTCD_EXTERN unsigned int (*vpx_sad8x8_avg)(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); - -void vpx_sad8x8x3_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -void vpx_sad8x8x3_sse3(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -RTCD_EXTERN void (*vpx_sad8x8x3)(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); - -void vpx_sad8x8x4d_c(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); -void vpx_sad8x8x4d_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); -RTCD_EXTERN void (*vpx_sad8x8x4d)(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); - -void vpx_sad8x8x8_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -void vpx_sad8x8x8_sse4_1(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -RTCD_EXTERN void (*vpx_sad8x8x8)(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); - -int vpx_satd_c(const int16_t *coeff, int length); -int vpx_satd_sse2(const int16_t *coeff, int length); -RTCD_EXTERN int (*vpx_satd)(const int16_t *coeff, int length); - -void vpx_scaled_2d_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -void vpx_scaled_2d_ssse3(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -RTCD_EXTERN void (*vpx_scaled_2d)(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); - -void vpx_scaled_avg_2d_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -#define vpx_scaled_avg_2d vpx_scaled_avg_2d_c - -void vpx_scaled_avg_horiz_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -#define vpx_scaled_avg_horiz vpx_scaled_avg_horiz_c - -void vpx_scaled_avg_vert_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -#define vpx_scaled_avg_vert vpx_scaled_avg_vert_c - -void vpx_scaled_horiz_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -#define vpx_scaled_horiz vpx_scaled_horiz_c - -void vpx_scaled_vert_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -#define vpx_scaled_vert vpx_scaled_vert_c - -uint32_t vpx_sub_pixel_avg_variance16x16_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_sub_pixel_avg_variance16x16_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_sub_pixel_avg_variance16x16_ssse3(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -RTCD_EXTERN uint32_t (*vpx_sub_pixel_avg_variance16x16)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); - -uint32_t vpx_sub_pixel_avg_variance16x32_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_sub_pixel_avg_variance16x32_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_sub_pixel_avg_variance16x32_ssse3(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -RTCD_EXTERN uint32_t (*vpx_sub_pixel_avg_variance16x32)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); - -uint32_t vpx_sub_pixel_avg_variance16x8_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_sub_pixel_avg_variance16x8_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_sub_pixel_avg_variance16x8_ssse3(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -RTCD_EXTERN uint32_t (*vpx_sub_pixel_avg_variance16x8)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); - -uint32_t vpx_sub_pixel_avg_variance32x16_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_sub_pixel_avg_variance32x16_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_sub_pixel_avg_variance32x16_ssse3(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -RTCD_EXTERN uint32_t (*vpx_sub_pixel_avg_variance32x16)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); - -uint32_t vpx_sub_pixel_avg_variance32x32_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_sub_pixel_avg_variance32x32_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_sub_pixel_avg_variance32x32_ssse3(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_sub_pixel_avg_variance32x32_avx2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -RTCD_EXTERN uint32_t (*vpx_sub_pixel_avg_variance32x32)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); - -uint32_t vpx_sub_pixel_avg_variance32x64_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_sub_pixel_avg_variance32x64_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_sub_pixel_avg_variance32x64_ssse3(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -RTCD_EXTERN uint32_t (*vpx_sub_pixel_avg_variance32x64)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); - -uint32_t vpx_sub_pixel_avg_variance4x4_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_sub_pixel_avg_variance4x4_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_sub_pixel_avg_variance4x4_ssse3(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -RTCD_EXTERN uint32_t (*vpx_sub_pixel_avg_variance4x4)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); - -uint32_t vpx_sub_pixel_avg_variance4x8_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_sub_pixel_avg_variance4x8_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_sub_pixel_avg_variance4x8_ssse3(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -RTCD_EXTERN uint32_t (*vpx_sub_pixel_avg_variance4x8)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); - -uint32_t vpx_sub_pixel_avg_variance64x32_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_sub_pixel_avg_variance64x32_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_sub_pixel_avg_variance64x32_ssse3(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -RTCD_EXTERN uint32_t (*vpx_sub_pixel_avg_variance64x32)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); - -uint32_t vpx_sub_pixel_avg_variance64x64_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_sub_pixel_avg_variance64x64_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_sub_pixel_avg_variance64x64_ssse3(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_sub_pixel_avg_variance64x64_avx2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -RTCD_EXTERN uint32_t (*vpx_sub_pixel_avg_variance64x64)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); - -uint32_t vpx_sub_pixel_avg_variance8x16_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_sub_pixel_avg_variance8x16_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_sub_pixel_avg_variance8x16_ssse3(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -RTCD_EXTERN uint32_t (*vpx_sub_pixel_avg_variance8x16)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); - -uint32_t vpx_sub_pixel_avg_variance8x4_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_sub_pixel_avg_variance8x4_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_sub_pixel_avg_variance8x4_ssse3(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -RTCD_EXTERN uint32_t (*vpx_sub_pixel_avg_variance8x4)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); - -uint32_t vpx_sub_pixel_avg_variance8x8_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_sub_pixel_avg_variance8x8_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_sub_pixel_avg_variance8x8_ssse3(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -RTCD_EXTERN uint32_t (*vpx_sub_pixel_avg_variance8x8)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); - -uint32_t vpx_sub_pixel_variance16x16_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_sub_pixel_variance16x16_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_sub_pixel_variance16x16_ssse3(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -RTCD_EXTERN uint32_t (*vpx_sub_pixel_variance16x16)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); - -uint32_t vpx_sub_pixel_variance16x32_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_sub_pixel_variance16x32_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_sub_pixel_variance16x32_ssse3(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -RTCD_EXTERN uint32_t (*vpx_sub_pixel_variance16x32)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); - -uint32_t vpx_sub_pixel_variance16x8_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_sub_pixel_variance16x8_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_sub_pixel_variance16x8_ssse3(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -RTCD_EXTERN uint32_t (*vpx_sub_pixel_variance16x8)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); - -uint32_t vpx_sub_pixel_variance32x16_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_sub_pixel_variance32x16_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_sub_pixel_variance32x16_ssse3(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -RTCD_EXTERN uint32_t (*vpx_sub_pixel_variance32x16)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); - -uint32_t vpx_sub_pixel_variance32x32_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_sub_pixel_variance32x32_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_sub_pixel_variance32x32_ssse3(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_sub_pixel_variance32x32_avx2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -RTCD_EXTERN uint32_t (*vpx_sub_pixel_variance32x32)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); - -uint32_t vpx_sub_pixel_variance32x64_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_sub_pixel_variance32x64_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_sub_pixel_variance32x64_ssse3(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -RTCD_EXTERN uint32_t (*vpx_sub_pixel_variance32x64)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); - -uint32_t vpx_sub_pixel_variance4x4_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_sub_pixel_variance4x4_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_sub_pixel_variance4x4_ssse3(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -RTCD_EXTERN uint32_t (*vpx_sub_pixel_variance4x4)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); - -uint32_t vpx_sub_pixel_variance4x8_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_sub_pixel_variance4x8_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_sub_pixel_variance4x8_ssse3(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -RTCD_EXTERN uint32_t (*vpx_sub_pixel_variance4x8)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); - -uint32_t vpx_sub_pixel_variance64x32_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_sub_pixel_variance64x32_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_sub_pixel_variance64x32_ssse3(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -RTCD_EXTERN uint32_t (*vpx_sub_pixel_variance64x32)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); - -uint32_t vpx_sub_pixel_variance64x64_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_sub_pixel_variance64x64_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_sub_pixel_variance64x64_ssse3(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_sub_pixel_variance64x64_avx2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -RTCD_EXTERN uint32_t (*vpx_sub_pixel_variance64x64)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); - -uint32_t vpx_sub_pixel_variance8x16_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_sub_pixel_variance8x16_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_sub_pixel_variance8x16_ssse3(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -RTCD_EXTERN uint32_t (*vpx_sub_pixel_variance8x16)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); - -uint32_t vpx_sub_pixel_variance8x4_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_sub_pixel_variance8x4_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_sub_pixel_variance8x4_ssse3(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -RTCD_EXTERN uint32_t (*vpx_sub_pixel_variance8x4)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); - -uint32_t vpx_sub_pixel_variance8x8_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_sub_pixel_variance8x8_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_sub_pixel_variance8x8_ssse3(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -RTCD_EXTERN uint32_t (*vpx_sub_pixel_variance8x8)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); - -void vpx_subtract_block_c(int rows, int cols, int16_t *diff_ptr, ptrdiff_t diff_stride, const uint8_t *src_ptr, ptrdiff_t src_stride, const uint8_t *pred_ptr, ptrdiff_t pred_stride); -void vpx_subtract_block_sse2(int rows, int cols, int16_t *diff_ptr, ptrdiff_t diff_stride, const uint8_t *src_ptr, ptrdiff_t src_stride, const uint8_t *pred_ptr, ptrdiff_t pred_stride); -RTCD_EXTERN void (*vpx_subtract_block)(int rows, int cols, int16_t *diff_ptr, ptrdiff_t diff_stride, const uint8_t *src_ptr, ptrdiff_t src_stride, const uint8_t *pred_ptr, ptrdiff_t pred_stride); - -uint64_t vpx_sum_squares_2d_i16_c(const int16_t *src, int stride, int size); -uint64_t vpx_sum_squares_2d_i16_sse2(const int16_t *src, int stride, int size); -RTCD_EXTERN uint64_t (*vpx_sum_squares_2d_i16)(const int16_t *src, int stride, int size); - -void vpx_tm_predictor_16x16_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_tm_predictor_16x16_sse2(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -RTCD_EXTERN void (*vpx_tm_predictor_16x16)(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); - -void vpx_tm_predictor_32x32_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_tm_predictor_32x32_sse2(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -RTCD_EXTERN void (*vpx_tm_predictor_32x32)(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); - -void vpx_tm_predictor_4x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_tm_predictor_4x4_sse2(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -RTCD_EXTERN void (*vpx_tm_predictor_4x4)(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); - -void vpx_tm_predictor_8x8_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_tm_predictor_8x8_sse2(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -RTCD_EXTERN void (*vpx_tm_predictor_8x8)(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); - -void vpx_v_predictor_16x16_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_v_predictor_16x16_sse2(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -RTCD_EXTERN void (*vpx_v_predictor_16x16)(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); - -void vpx_v_predictor_32x32_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_v_predictor_32x32_sse2(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -RTCD_EXTERN void (*vpx_v_predictor_32x32)(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); - -void vpx_v_predictor_4x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_v_predictor_4x4_sse2(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -RTCD_EXTERN void (*vpx_v_predictor_4x4)(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); - -void vpx_v_predictor_8x8_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_v_predictor_8x8_sse2(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -RTCD_EXTERN void (*vpx_v_predictor_8x8)(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); - -unsigned int vpx_variance16x16_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -unsigned int vpx_variance16x16_sse2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -unsigned int vpx_variance16x16_avx2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -RTCD_EXTERN unsigned int (*vpx_variance16x16)(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); - -unsigned int vpx_variance16x32_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -unsigned int vpx_variance16x32_sse2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -RTCD_EXTERN unsigned int (*vpx_variance16x32)(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); - -unsigned int vpx_variance16x8_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -unsigned int vpx_variance16x8_sse2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -RTCD_EXTERN unsigned int (*vpx_variance16x8)(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); - -unsigned int vpx_variance32x16_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -unsigned int vpx_variance32x16_sse2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -unsigned int vpx_variance32x16_avx2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -RTCD_EXTERN unsigned int (*vpx_variance32x16)(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); - -unsigned int vpx_variance32x32_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -unsigned int vpx_variance32x32_sse2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -unsigned int vpx_variance32x32_avx2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -RTCD_EXTERN unsigned int (*vpx_variance32x32)(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); - -unsigned int vpx_variance32x64_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -unsigned int vpx_variance32x64_sse2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -RTCD_EXTERN unsigned int (*vpx_variance32x64)(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); - -unsigned int vpx_variance4x4_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -unsigned int vpx_variance4x4_sse2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -RTCD_EXTERN unsigned int (*vpx_variance4x4)(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); - -unsigned int vpx_variance4x8_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -unsigned int vpx_variance4x8_sse2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -RTCD_EXTERN unsigned int (*vpx_variance4x8)(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); - -unsigned int vpx_variance64x32_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -unsigned int vpx_variance64x32_sse2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -unsigned int vpx_variance64x32_avx2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -RTCD_EXTERN unsigned int (*vpx_variance64x32)(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); - -unsigned int vpx_variance64x64_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -unsigned int vpx_variance64x64_sse2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -unsigned int vpx_variance64x64_avx2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -RTCD_EXTERN unsigned int (*vpx_variance64x64)(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); - -unsigned int vpx_variance8x16_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -unsigned int vpx_variance8x16_sse2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -RTCD_EXTERN unsigned int (*vpx_variance8x16)(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); - -unsigned int vpx_variance8x4_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -unsigned int vpx_variance8x4_sse2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -RTCD_EXTERN unsigned int (*vpx_variance8x4)(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); - -unsigned int vpx_variance8x8_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -unsigned int vpx_variance8x8_sse2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -RTCD_EXTERN unsigned int (*vpx_variance8x8)(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); - -void vpx_ve_predictor_4x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_ve_predictor_4x4 vpx_ve_predictor_4x4_c - -int vpx_vector_var_c(const int16_t *ref, const int16_t *src, const int bwl); -int vpx_vector_var_sse2(const int16_t *ref, const int16_t *src, const int bwl); -RTCD_EXTERN int (*vpx_vector_var)(const int16_t *ref, const int16_t *src, const int bwl); - -void vpx_dsp_rtcd(void); - -#ifdef RTCD_C -#include "vpx_ports/x86.h" -static void setup_rtcd_internal(void) -{ - int flags = x86_simd_caps(); - - (void)flags; - - vpx_avg_4x4 = vpx_avg_4x4_c; - if (flags & HAS_SSE2) vpx_avg_4x4 = vpx_avg_4x4_sse2; - vpx_avg_8x8 = vpx_avg_8x8_c; - if (flags & HAS_SSE2) vpx_avg_8x8 = vpx_avg_8x8_sse2; - vpx_convolve8 = vpx_convolve8_c; - if (flags & HAS_SSE2) vpx_convolve8 = vpx_convolve8_sse2; - if (flags & HAS_SSSE3) vpx_convolve8 = vpx_convolve8_ssse3; - if (flags & HAS_AVX2) vpx_convolve8 = vpx_convolve8_avx2; - vpx_convolve8_avg = vpx_convolve8_avg_c; - if (flags & HAS_SSE2) vpx_convolve8_avg = vpx_convolve8_avg_sse2; - if (flags & HAS_SSSE3) vpx_convolve8_avg = vpx_convolve8_avg_ssse3; - vpx_convolve8_avg_horiz = vpx_convolve8_avg_horiz_c; - if (flags & HAS_SSE2) vpx_convolve8_avg_horiz = vpx_convolve8_avg_horiz_sse2; - if (flags & HAS_SSSE3) vpx_convolve8_avg_horiz = vpx_convolve8_avg_horiz_ssse3; - vpx_convolve8_avg_vert = vpx_convolve8_avg_vert_c; - if (flags & HAS_SSE2) vpx_convolve8_avg_vert = vpx_convolve8_avg_vert_sse2; - if (flags & HAS_SSSE3) vpx_convolve8_avg_vert = vpx_convolve8_avg_vert_ssse3; - vpx_convolve8_horiz = vpx_convolve8_horiz_c; - if (flags & HAS_SSE2) vpx_convolve8_horiz = vpx_convolve8_horiz_sse2; - if (flags & HAS_SSSE3) vpx_convolve8_horiz = vpx_convolve8_horiz_ssse3; - if (flags & HAS_AVX2) vpx_convolve8_horiz = vpx_convolve8_horiz_avx2; - vpx_convolve8_vert = vpx_convolve8_vert_c; - if (flags & HAS_SSE2) vpx_convolve8_vert = vpx_convolve8_vert_sse2; - if (flags & HAS_SSSE3) vpx_convolve8_vert = vpx_convolve8_vert_ssse3; - if (flags & HAS_AVX2) vpx_convolve8_vert = vpx_convolve8_vert_avx2; - vpx_convolve_avg = vpx_convolve_avg_c; - if (flags & HAS_SSE2) vpx_convolve_avg = vpx_convolve_avg_sse2; - vpx_convolve_copy = vpx_convolve_copy_c; - if (flags & HAS_SSE2) vpx_convolve_copy = vpx_convolve_copy_sse2; - vpx_d153_predictor_16x16 = vpx_d153_predictor_16x16_c; - if (flags & HAS_SSSE3) vpx_d153_predictor_16x16 = vpx_d153_predictor_16x16_ssse3; - vpx_d153_predictor_32x32 = vpx_d153_predictor_32x32_c; - if (flags & HAS_SSSE3) vpx_d153_predictor_32x32 = vpx_d153_predictor_32x32_ssse3; - vpx_d153_predictor_4x4 = vpx_d153_predictor_4x4_c; - if (flags & HAS_SSSE3) vpx_d153_predictor_4x4 = vpx_d153_predictor_4x4_ssse3; - vpx_d153_predictor_8x8 = vpx_d153_predictor_8x8_c; - if (flags & HAS_SSSE3) vpx_d153_predictor_8x8 = vpx_d153_predictor_8x8_ssse3; - vpx_d207_predictor_16x16 = vpx_d207_predictor_16x16_c; - if (flags & HAS_SSSE3) vpx_d207_predictor_16x16 = vpx_d207_predictor_16x16_ssse3; - vpx_d207_predictor_32x32 = vpx_d207_predictor_32x32_c; - if (flags & HAS_SSSE3) vpx_d207_predictor_32x32 = vpx_d207_predictor_32x32_ssse3; - vpx_d207_predictor_4x4 = vpx_d207_predictor_4x4_c; - if (flags & HAS_SSE2) vpx_d207_predictor_4x4 = vpx_d207_predictor_4x4_sse2; - vpx_d207_predictor_8x8 = vpx_d207_predictor_8x8_c; - if (flags & HAS_SSSE3) vpx_d207_predictor_8x8 = vpx_d207_predictor_8x8_ssse3; - vpx_d45_predictor_16x16 = vpx_d45_predictor_16x16_c; - if (flags & HAS_SSSE3) vpx_d45_predictor_16x16 = vpx_d45_predictor_16x16_ssse3; - vpx_d45_predictor_32x32 = vpx_d45_predictor_32x32_c; - if (flags & HAS_SSSE3) vpx_d45_predictor_32x32 = vpx_d45_predictor_32x32_ssse3; - vpx_d45_predictor_4x4 = vpx_d45_predictor_4x4_c; - if (flags & HAS_SSE2) vpx_d45_predictor_4x4 = vpx_d45_predictor_4x4_sse2; - vpx_d45_predictor_8x8 = vpx_d45_predictor_8x8_c; - if (flags & HAS_SSE2) vpx_d45_predictor_8x8 = vpx_d45_predictor_8x8_sse2; - vpx_d63_predictor_16x16 = vpx_d63_predictor_16x16_c; - if (flags & HAS_SSSE3) vpx_d63_predictor_16x16 = vpx_d63_predictor_16x16_ssse3; - vpx_d63_predictor_32x32 = vpx_d63_predictor_32x32_c; - if (flags & HAS_SSSE3) vpx_d63_predictor_32x32 = vpx_d63_predictor_32x32_ssse3; - vpx_d63_predictor_4x4 = vpx_d63_predictor_4x4_c; - if (flags & HAS_SSSE3) vpx_d63_predictor_4x4 = vpx_d63_predictor_4x4_ssse3; - vpx_d63_predictor_8x8 = vpx_d63_predictor_8x8_c; - if (flags & HAS_SSSE3) vpx_d63_predictor_8x8 = vpx_d63_predictor_8x8_ssse3; - vpx_dc_128_predictor_16x16 = vpx_dc_128_predictor_16x16_c; - if (flags & HAS_SSE2) vpx_dc_128_predictor_16x16 = vpx_dc_128_predictor_16x16_sse2; - vpx_dc_128_predictor_32x32 = vpx_dc_128_predictor_32x32_c; - if (flags & HAS_SSE2) vpx_dc_128_predictor_32x32 = vpx_dc_128_predictor_32x32_sse2; - vpx_dc_128_predictor_4x4 = vpx_dc_128_predictor_4x4_c; - if (flags & HAS_SSE2) vpx_dc_128_predictor_4x4 = vpx_dc_128_predictor_4x4_sse2; - vpx_dc_128_predictor_8x8 = vpx_dc_128_predictor_8x8_c; - if (flags & HAS_SSE2) vpx_dc_128_predictor_8x8 = vpx_dc_128_predictor_8x8_sse2; - vpx_dc_left_predictor_16x16 = vpx_dc_left_predictor_16x16_c; - if (flags & HAS_SSE2) vpx_dc_left_predictor_16x16 = vpx_dc_left_predictor_16x16_sse2; - vpx_dc_left_predictor_32x32 = vpx_dc_left_predictor_32x32_c; - if (flags & HAS_SSE2) vpx_dc_left_predictor_32x32 = vpx_dc_left_predictor_32x32_sse2; - vpx_dc_left_predictor_4x4 = vpx_dc_left_predictor_4x4_c; - if (flags & HAS_SSE2) vpx_dc_left_predictor_4x4 = vpx_dc_left_predictor_4x4_sse2; - vpx_dc_left_predictor_8x8 = vpx_dc_left_predictor_8x8_c; - if (flags & HAS_SSE2) vpx_dc_left_predictor_8x8 = vpx_dc_left_predictor_8x8_sse2; - vpx_dc_predictor_16x16 = vpx_dc_predictor_16x16_c; - if (flags & HAS_SSE2) vpx_dc_predictor_16x16 = vpx_dc_predictor_16x16_sse2; - vpx_dc_predictor_32x32 = vpx_dc_predictor_32x32_c; - if (flags & HAS_SSE2) vpx_dc_predictor_32x32 = vpx_dc_predictor_32x32_sse2; - vpx_dc_predictor_4x4 = vpx_dc_predictor_4x4_c; - if (flags & HAS_SSE2) vpx_dc_predictor_4x4 = vpx_dc_predictor_4x4_sse2; - vpx_dc_predictor_8x8 = vpx_dc_predictor_8x8_c; - if (flags & HAS_SSE2) vpx_dc_predictor_8x8 = vpx_dc_predictor_8x8_sse2; - vpx_dc_top_predictor_16x16 = vpx_dc_top_predictor_16x16_c; - if (flags & HAS_SSE2) vpx_dc_top_predictor_16x16 = vpx_dc_top_predictor_16x16_sse2; - vpx_dc_top_predictor_32x32 = vpx_dc_top_predictor_32x32_c; - if (flags & HAS_SSE2) vpx_dc_top_predictor_32x32 = vpx_dc_top_predictor_32x32_sse2; - vpx_dc_top_predictor_4x4 = vpx_dc_top_predictor_4x4_c; - if (flags & HAS_SSE2) vpx_dc_top_predictor_4x4 = vpx_dc_top_predictor_4x4_sse2; - vpx_dc_top_predictor_8x8 = vpx_dc_top_predictor_8x8_c; - if (flags & HAS_SSE2) vpx_dc_top_predictor_8x8 = vpx_dc_top_predictor_8x8_sse2; - vpx_fdct16x16 = vpx_fdct16x16_c; - if (flags & HAS_SSE2) vpx_fdct16x16 = vpx_fdct16x16_sse2; - vpx_fdct16x16_1 = vpx_fdct16x16_1_c; - if (flags & HAS_SSE2) vpx_fdct16x16_1 = vpx_fdct16x16_1_sse2; - vpx_fdct32x32 = vpx_fdct32x32_c; - if (flags & HAS_SSE2) vpx_fdct32x32 = vpx_fdct32x32_sse2; - vpx_fdct32x32_1 = vpx_fdct32x32_1_c; - if (flags & HAS_SSE2) vpx_fdct32x32_1 = vpx_fdct32x32_1_sse2; - vpx_fdct32x32_rd = vpx_fdct32x32_rd_c; - if (flags & HAS_SSE2) vpx_fdct32x32_rd = vpx_fdct32x32_rd_sse2; - vpx_fdct4x4 = vpx_fdct4x4_c; - if (flags & HAS_SSE2) vpx_fdct4x4 = vpx_fdct4x4_sse2; - vpx_fdct4x4_1 = vpx_fdct4x4_1_c; - if (flags & HAS_SSE2) vpx_fdct4x4_1 = vpx_fdct4x4_1_sse2; - vpx_fdct8x8 = vpx_fdct8x8_c; - if (flags & HAS_SSE2) vpx_fdct8x8 = vpx_fdct8x8_sse2; - vpx_fdct8x8_1 = vpx_fdct8x8_1_c; - if (flags & HAS_SSE2) vpx_fdct8x8_1 = vpx_fdct8x8_1_sse2; - vpx_get16x16var = vpx_get16x16var_c; - if (flags & HAS_SSE2) vpx_get16x16var = vpx_get16x16var_sse2; - if (flags & HAS_AVX2) vpx_get16x16var = vpx_get16x16var_avx2; - vpx_get8x8var = vpx_get8x8var_c; - if (flags & HAS_SSE2) vpx_get8x8var = vpx_get8x8var_sse2; - vpx_get_mb_ss = vpx_get_mb_ss_c; - if (flags & HAS_SSE2) vpx_get_mb_ss = vpx_get_mb_ss_sse2; - vpx_h_predictor_16x16 = vpx_h_predictor_16x16_c; - if (flags & HAS_SSE2) vpx_h_predictor_16x16 = vpx_h_predictor_16x16_sse2; - vpx_h_predictor_32x32 = vpx_h_predictor_32x32_c; - if (flags & HAS_SSE2) vpx_h_predictor_32x32 = vpx_h_predictor_32x32_sse2; - vpx_h_predictor_4x4 = vpx_h_predictor_4x4_c; - if (flags & HAS_SSE2) vpx_h_predictor_4x4 = vpx_h_predictor_4x4_sse2; - vpx_h_predictor_8x8 = vpx_h_predictor_8x8_c; - if (flags & HAS_SSE2) vpx_h_predictor_8x8 = vpx_h_predictor_8x8_sse2; - vpx_hadamard_16x16 = vpx_hadamard_16x16_c; - if (flags & HAS_SSE2) vpx_hadamard_16x16 = vpx_hadamard_16x16_sse2; - vpx_hadamard_8x8 = vpx_hadamard_8x8_c; - if (flags & HAS_SSE2) vpx_hadamard_8x8 = vpx_hadamard_8x8_sse2; - vpx_highbd_10_mse16x16 = vpx_highbd_10_mse16x16_c; - if (flags & HAS_SSE2) vpx_highbd_10_mse16x16 = vpx_highbd_10_mse16x16_sse2; - vpx_highbd_10_mse8x8 = vpx_highbd_10_mse8x8_c; - if (flags & HAS_SSE2) vpx_highbd_10_mse8x8 = vpx_highbd_10_mse8x8_sse2; - vpx_highbd_10_sub_pixel_avg_variance16x16 = vpx_highbd_10_sub_pixel_avg_variance16x16_c; - if (flags & HAS_SSE2) vpx_highbd_10_sub_pixel_avg_variance16x16 = vpx_highbd_10_sub_pixel_avg_variance16x16_sse2; - vpx_highbd_10_sub_pixel_avg_variance16x32 = vpx_highbd_10_sub_pixel_avg_variance16x32_c; - if (flags & HAS_SSE2) vpx_highbd_10_sub_pixel_avg_variance16x32 = vpx_highbd_10_sub_pixel_avg_variance16x32_sse2; - vpx_highbd_10_sub_pixel_avg_variance16x8 = vpx_highbd_10_sub_pixel_avg_variance16x8_c; - if (flags & HAS_SSE2) vpx_highbd_10_sub_pixel_avg_variance16x8 = vpx_highbd_10_sub_pixel_avg_variance16x8_sse2; - vpx_highbd_10_sub_pixel_avg_variance32x16 = vpx_highbd_10_sub_pixel_avg_variance32x16_c; - if (flags & HAS_SSE2) vpx_highbd_10_sub_pixel_avg_variance32x16 = vpx_highbd_10_sub_pixel_avg_variance32x16_sse2; - vpx_highbd_10_sub_pixel_avg_variance32x32 = vpx_highbd_10_sub_pixel_avg_variance32x32_c; - if (flags & HAS_SSE2) vpx_highbd_10_sub_pixel_avg_variance32x32 = vpx_highbd_10_sub_pixel_avg_variance32x32_sse2; - vpx_highbd_10_sub_pixel_avg_variance32x64 = vpx_highbd_10_sub_pixel_avg_variance32x64_c; - if (flags & HAS_SSE2) vpx_highbd_10_sub_pixel_avg_variance32x64 = vpx_highbd_10_sub_pixel_avg_variance32x64_sse2; - vpx_highbd_10_sub_pixel_avg_variance64x32 = vpx_highbd_10_sub_pixel_avg_variance64x32_c; - if (flags & HAS_SSE2) vpx_highbd_10_sub_pixel_avg_variance64x32 = vpx_highbd_10_sub_pixel_avg_variance64x32_sse2; - vpx_highbd_10_sub_pixel_avg_variance64x64 = vpx_highbd_10_sub_pixel_avg_variance64x64_c; - if (flags & HAS_SSE2) vpx_highbd_10_sub_pixel_avg_variance64x64 = vpx_highbd_10_sub_pixel_avg_variance64x64_sse2; - vpx_highbd_10_sub_pixel_avg_variance8x16 = vpx_highbd_10_sub_pixel_avg_variance8x16_c; - if (flags & HAS_SSE2) vpx_highbd_10_sub_pixel_avg_variance8x16 = vpx_highbd_10_sub_pixel_avg_variance8x16_sse2; - vpx_highbd_10_sub_pixel_avg_variance8x4 = vpx_highbd_10_sub_pixel_avg_variance8x4_c; - if (flags & HAS_SSE2) vpx_highbd_10_sub_pixel_avg_variance8x4 = vpx_highbd_10_sub_pixel_avg_variance8x4_sse2; - vpx_highbd_10_sub_pixel_avg_variance8x8 = vpx_highbd_10_sub_pixel_avg_variance8x8_c; - if (flags & HAS_SSE2) vpx_highbd_10_sub_pixel_avg_variance8x8 = vpx_highbd_10_sub_pixel_avg_variance8x8_sse2; - vpx_highbd_10_sub_pixel_variance16x16 = vpx_highbd_10_sub_pixel_variance16x16_c; - if (flags & HAS_SSE2) vpx_highbd_10_sub_pixel_variance16x16 = vpx_highbd_10_sub_pixel_variance16x16_sse2; - vpx_highbd_10_sub_pixel_variance16x32 = vpx_highbd_10_sub_pixel_variance16x32_c; - if (flags & HAS_SSE2) vpx_highbd_10_sub_pixel_variance16x32 = vpx_highbd_10_sub_pixel_variance16x32_sse2; - vpx_highbd_10_sub_pixel_variance16x8 = vpx_highbd_10_sub_pixel_variance16x8_c; - if (flags & HAS_SSE2) vpx_highbd_10_sub_pixel_variance16x8 = vpx_highbd_10_sub_pixel_variance16x8_sse2; - vpx_highbd_10_sub_pixel_variance32x16 = vpx_highbd_10_sub_pixel_variance32x16_c; - if (flags & HAS_SSE2) vpx_highbd_10_sub_pixel_variance32x16 = vpx_highbd_10_sub_pixel_variance32x16_sse2; - vpx_highbd_10_sub_pixel_variance32x32 = vpx_highbd_10_sub_pixel_variance32x32_c; - if (flags & HAS_SSE2) vpx_highbd_10_sub_pixel_variance32x32 = vpx_highbd_10_sub_pixel_variance32x32_sse2; - vpx_highbd_10_sub_pixel_variance32x64 = vpx_highbd_10_sub_pixel_variance32x64_c; - if (flags & HAS_SSE2) vpx_highbd_10_sub_pixel_variance32x64 = vpx_highbd_10_sub_pixel_variance32x64_sse2; - vpx_highbd_10_sub_pixel_variance64x32 = vpx_highbd_10_sub_pixel_variance64x32_c; - if (flags & HAS_SSE2) vpx_highbd_10_sub_pixel_variance64x32 = vpx_highbd_10_sub_pixel_variance64x32_sse2; - vpx_highbd_10_sub_pixel_variance64x64 = vpx_highbd_10_sub_pixel_variance64x64_c; - if (flags & HAS_SSE2) vpx_highbd_10_sub_pixel_variance64x64 = vpx_highbd_10_sub_pixel_variance64x64_sse2; - vpx_highbd_10_sub_pixel_variance8x16 = vpx_highbd_10_sub_pixel_variance8x16_c; - if (flags & HAS_SSE2) vpx_highbd_10_sub_pixel_variance8x16 = vpx_highbd_10_sub_pixel_variance8x16_sse2; - vpx_highbd_10_sub_pixel_variance8x4 = vpx_highbd_10_sub_pixel_variance8x4_c; - if (flags & HAS_SSE2) vpx_highbd_10_sub_pixel_variance8x4 = vpx_highbd_10_sub_pixel_variance8x4_sse2; - vpx_highbd_10_sub_pixel_variance8x8 = vpx_highbd_10_sub_pixel_variance8x8_c; - if (flags & HAS_SSE2) vpx_highbd_10_sub_pixel_variance8x8 = vpx_highbd_10_sub_pixel_variance8x8_sse2; - vpx_highbd_10_variance16x16 = vpx_highbd_10_variance16x16_c; - if (flags & HAS_SSE2) vpx_highbd_10_variance16x16 = vpx_highbd_10_variance16x16_sse2; - vpx_highbd_10_variance16x32 = vpx_highbd_10_variance16x32_c; - if (flags & HAS_SSE2) vpx_highbd_10_variance16x32 = vpx_highbd_10_variance16x32_sse2; - vpx_highbd_10_variance16x8 = vpx_highbd_10_variance16x8_c; - if (flags & HAS_SSE2) vpx_highbd_10_variance16x8 = vpx_highbd_10_variance16x8_sse2; - vpx_highbd_10_variance32x16 = vpx_highbd_10_variance32x16_c; - if (flags & HAS_SSE2) vpx_highbd_10_variance32x16 = vpx_highbd_10_variance32x16_sse2; - vpx_highbd_10_variance32x32 = vpx_highbd_10_variance32x32_c; - if (flags & HAS_SSE2) vpx_highbd_10_variance32x32 = vpx_highbd_10_variance32x32_sse2; - vpx_highbd_10_variance32x64 = vpx_highbd_10_variance32x64_c; - if (flags & HAS_SSE2) vpx_highbd_10_variance32x64 = vpx_highbd_10_variance32x64_sse2; - vpx_highbd_10_variance64x32 = vpx_highbd_10_variance64x32_c; - if (flags & HAS_SSE2) vpx_highbd_10_variance64x32 = vpx_highbd_10_variance64x32_sse2; - vpx_highbd_10_variance64x64 = vpx_highbd_10_variance64x64_c; - if (flags & HAS_SSE2) vpx_highbd_10_variance64x64 = vpx_highbd_10_variance64x64_sse2; - vpx_highbd_10_variance8x16 = vpx_highbd_10_variance8x16_c; - if (flags & HAS_SSE2) vpx_highbd_10_variance8x16 = vpx_highbd_10_variance8x16_sse2; - vpx_highbd_10_variance8x8 = vpx_highbd_10_variance8x8_c; - if (flags & HAS_SSE2) vpx_highbd_10_variance8x8 = vpx_highbd_10_variance8x8_sse2; - vpx_highbd_12_mse16x16 = vpx_highbd_12_mse16x16_c; - if (flags & HAS_SSE2) vpx_highbd_12_mse16x16 = vpx_highbd_12_mse16x16_sse2; - vpx_highbd_12_mse8x8 = vpx_highbd_12_mse8x8_c; - if (flags & HAS_SSE2) vpx_highbd_12_mse8x8 = vpx_highbd_12_mse8x8_sse2; - vpx_highbd_12_sub_pixel_avg_variance16x16 = vpx_highbd_12_sub_pixel_avg_variance16x16_c; - if (flags & HAS_SSE2) vpx_highbd_12_sub_pixel_avg_variance16x16 = vpx_highbd_12_sub_pixel_avg_variance16x16_sse2; - vpx_highbd_12_sub_pixel_avg_variance16x32 = vpx_highbd_12_sub_pixel_avg_variance16x32_c; - if (flags & HAS_SSE2) vpx_highbd_12_sub_pixel_avg_variance16x32 = vpx_highbd_12_sub_pixel_avg_variance16x32_sse2; - vpx_highbd_12_sub_pixel_avg_variance16x8 = vpx_highbd_12_sub_pixel_avg_variance16x8_c; - if (flags & HAS_SSE2) vpx_highbd_12_sub_pixel_avg_variance16x8 = vpx_highbd_12_sub_pixel_avg_variance16x8_sse2; - vpx_highbd_12_sub_pixel_avg_variance32x16 = vpx_highbd_12_sub_pixel_avg_variance32x16_c; - if (flags & HAS_SSE2) vpx_highbd_12_sub_pixel_avg_variance32x16 = vpx_highbd_12_sub_pixel_avg_variance32x16_sse2; - vpx_highbd_12_sub_pixel_avg_variance32x32 = vpx_highbd_12_sub_pixel_avg_variance32x32_c; - if (flags & HAS_SSE2) vpx_highbd_12_sub_pixel_avg_variance32x32 = vpx_highbd_12_sub_pixel_avg_variance32x32_sse2; - vpx_highbd_12_sub_pixel_avg_variance32x64 = vpx_highbd_12_sub_pixel_avg_variance32x64_c; - if (flags & HAS_SSE2) vpx_highbd_12_sub_pixel_avg_variance32x64 = vpx_highbd_12_sub_pixel_avg_variance32x64_sse2; - vpx_highbd_12_sub_pixel_avg_variance64x32 = vpx_highbd_12_sub_pixel_avg_variance64x32_c; - if (flags & HAS_SSE2) vpx_highbd_12_sub_pixel_avg_variance64x32 = vpx_highbd_12_sub_pixel_avg_variance64x32_sse2; - vpx_highbd_12_sub_pixel_avg_variance64x64 = vpx_highbd_12_sub_pixel_avg_variance64x64_c; - if (flags & HAS_SSE2) vpx_highbd_12_sub_pixel_avg_variance64x64 = vpx_highbd_12_sub_pixel_avg_variance64x64_sse2; - vpx_highbd_12_sub_pixel_avg_variance8x16 = vpx_highbd_12_sub_pixel_avg_variance8x16_c; - if (flags & HAS_SSE2) vpx_highbd_12_sub_pixel_avg_variance8x16 = vpx_highbd_12_sub_pixel_avg_variance8x16_sse2; - vpx_highbd_12_sub_pixel_avg_variance8x4 = vpx_highbd_12_sub_pixel_avg_variance8x4_c; - if (flags & HAS_SSE2) vpx_highbd_12_sub_pixel_avg_variance8x4 = vpx_highbd_12_sub_pixel_avg_variance8x4_sse2; - vpx_highbd_12_sub_pixel_avg_variance8x8 = vpx_highbd_12_sub_pixel_avg_variance8x8_c; - if (flags & HAS_SSE2) vpx_highbd_12_sub_pixel_avg_variance8x8 = vpx_highbd_12_sub_pixel_avg_variance8x8_sse2; - vpx_highbd_12_sub_pixel_variance16x16 = vpx_highbd_12_sub_pixel_variance16x16_c; - if (flags & HAS_SSE2) vpx_highbd_12_sub_pixel_variance16x16 = vpx_highbd_12_sub_pixel_variance16x16_sse2; - vpx_highbd_12_sub_pixel_variance16x32 = vpx_highbd_12_sub_pixel_variance16x32_c; - if (flags & HAS_SSE2) vpx_highbd_12_sub_pixel_variance16x32 = vpx_highbd_12_sub_pixel_variance16x32_sse2; - vpx_highbd_12_sub_pixel_variance16x8 = vpx_highbd_12_sub_pixel_variance16x8_c; - if (flags & HAS_SSE2) vpx_highbd_12_sub_pixel_variance16x8 = vpx_highbd_12_sub_pixel_variance16x8_sse2; - vpx_highbd_12_sub_pixel_variance32x16 = vpx_highbd_12_sub_pixel_variance32x16_c; - if (flags & HAS_SSE2) vpx_highbd_12_sub_pixel_variance32x16 = vpx_highbd_12_sub_pixel_variance32x16_sse2; - vpx_highbd_12_sub_pixel_variance32x32 = vpx_highbd_12_sub_pixel_variance32x32_c; - if (flags & HAS_SSE2) vpx_highbd_12_sub_pixel_variance32x32 = vpx_highbd_12_sub_pixel_variance32x32_sse2; - vpx_highbd_12_sub_pixel_variance32x64 = vpx_highbd_12_sub_pixel_variance32x64_c; - if (flags & HAS_SSE2) vpx_highbd_12_sub_pixel_variance32x64 = vpx_highbd_12_sub_pixel_variance32x64_sse2; - vpx_highbd_12_sub_pixel_variance64x32 = vpx_highbd_12_sub_pixel_variance64x32_c; - if (flags & HAS_SSE2) vpx_highbd_12_sub_pixel_variance64x32 = vpx_highbd_12_sub_pixel_variance64x32_sse2; - vpx_highbd_12_sub_pixel_variance64x64 = vpx_highbd_12_sub_pixel_variance64x64_c; - if (flags & HAS_SSE2) vpx_highbd_12_sub_pixel_variance64x64 = vpx_highbd_12_sub_pixel_variance64x64_sse2; - vpx_highbd_12_sub_pixel_variance8x16 = vpx_highbd_12_sub_pixel_variance8x16_c; - if (flags & HAS_SSE2) vpx_highbd_12_sub_pixel_variance8x16 = vpx_highbd_12_sub_pixel_variance8x16_sse2; - vpx_highbd_12_sub_pixel_variance8x4 = vpx_highbd_12_sub_pixel_variance8x4_c; - if (flags & HAS_SSE2) vpx_highbd_12_sub_pixel_variance8x4 = vpx_highbd_12_sub_pixel_variance8x4_sse2; - vpx_highbd_12_sub_pixel_variance8x8 = vpx_highbd_12_sub_pixel_variance8x8_c; - if (flags & HAS_SSE2) vpx_highbd_12_sub_pixel_variance8x8 = vpx_highbd_12_sub_pixel_variance8x8_sse2; - vpx_highbd_12_variance16x16 = vpx_highbd_12_variance16x16_c; - if (flags & HAS_SSE2) vpx_highbd_12_variance16x16 = vpx_highbd_12_variance16x16_sse2; - vpx_highbd_12_variance16x32 = vpx_highbd_12_variance16x32_c; - if (flags & HAS_SSE2) vpx_highbd_12_variance16x32 = vpx_highbd_12_variance16x32_sse2; - vpx_highbd_12_variance16x8 = vpx_highbd_12_variance16x8_c; - if (flags & HAS_SSE2) vpx_highbd_12_variance16x8 = vpx_highbd_12_variance16x8_sse2; - vpx_highbd_12_variance32x16 = vpx_highbd_12_variance32x16_c; - if (flags & HAS_SSE2) vpx_highbd_12_variance32x16 = vpx_highbd_12_variance32x16_sse2; - vpx_highbd_12_variance32x32 = vpx_highbd_12_variance32x32_c; - if (flags & HAS_SSE2) vpx_highbd_12_variance32x32 = vpx_highbd_12_variance32x32_sse2; - vpx_highbd_12_variance32x64 = vpx_highbd_12_variance32x64_c; - if (flags & HAS_SSE2) vpx_highbd_12_variance32x64 = vpx_highbd_12_variance32x64_sse2; - vpx_highbd_12_variance64x32 = vpx_highbd_12_variance64x32_c; - if (flags & HAS_SSE2) vpx_highbd_12_variance64x32 = vpx_highbd_12_variance64x32_sse2; - vpx_highbd_12_variance64x64 = vpx_highbd_12_variance64x64_c; - if (flags & HAS_SSE2) vpx_highbd_12_variance64x64 = vpx_highbd_12_variance64x64_sse2; - vpx_highbd_12_variance8x16 = vpx_highbd_12_variance8x16_c; - if (flags & HAS_SSE2) vpx_highbd_12_variance8x16 = vpx_highbd_12_variance8x16_sse2; - vpx_highbd_12_variance8x8 = vpx_highbd_12_variance8x8_c; - if (flags & HAS_SSE2) vpx_highbd_12_variance8x8 = vpx_highbd_12_variance8x8_sse2; - vpx_highbd_8_mse16x16 = vpx_highbd_8_mse16x16_c; - if (flags & HAS_SSE2) vpx_highbd_8_mse16x16 = vpx_highbd_8_mse16x16_sse2; - vpx_highbd_8_mse8x8 = vpx_highbd_8_mse8x8_c; - if (flags & HAS_SSE2) vpx_highbd_8_mse8x8 = vpx_highbd_8_mse8x8_sse2; - vpx_highbd_8_sub_pixel_avg_variance16x16 = vpx_highbd_8_sub_pixel_avg_variance16x16_c; - if (flags & HAS_SSE2) vpx_highbd_8_sub_pixel_avg_variance16x16 = vpx_highbd_8_sub_pixel_avg_variance16x16_sse2; - vpx_highbd_8_sub_pixel_avg_variance16x32 = vpx_highbd_8_sub_pixel_avg_variance16x32_c; - if (flags & HAS_SSE2) vpx_highbd_8_sub_pixel_avg_variance16x32 = vpx_highbd_8_sub_pixel_avg_variance16x32_sse2; - vpx_highbd_8_sub_pixel_avg_variance16x8 = vpx_highbd_8_sub_pixel_avg_variance16x8_c; - if (flags & HAS_SSE2) vpx_highbd_8_sub_pixel_avg_variance16x8 = vpx_highbd_8_sub_pixel_avg_variance16x8_sse2; - vpx_highbd_8_sub_pixel_avg_variance32x16 = vpx_highbd_8_sub_pixel_avg_variance32x16_c; - if (flags & HAS_SSE2) vpx_highbd_8_sub_pixel_avg_variance32x16 = vpx_highbd_8_sub_pixel_avg_variance32x16_sse2; - vpx_highbd_8_sub_pixel_avg_variance32x32 = vpx_highbd_8_sub_pixel_avg_variance32x32_c; - if (flags & HAS_SSE2) vpx_highbd_8_sub_pixel_avg_variance32x32 = vpx_highbd_8_sub_pixel_avg_variance32x32_sse2; - vpx_highbd_8_sub_pixel_avg_variance32x64 = vpx_highbd_8_sub_pixel_avg_variance32x64_c; - if (flags & HAS_SSE2) vpx_highbd_8_sub_pixel_avg_variance32x64 = vpx_highbd_8_sub_pixel_avg_variance32x64_sse2; - vpx_highbd_8_sub_pixel_avg_variance64x32 = vpx_highbd_8_sub_pixel_avg_variance64x32_c; - if (flags & HAS_SSE2) vpx_highbd_8_sub_pixel_avg_variance64x32 = vpx_highbd_8_sub_pixel_avg_variance64x32_sse2; - vpx_highbd_8_sub_pixel_avg_variance64x64 = vpx_highbd_8_sub_pixel_avg_variance64x64_c; - if (flags & HAS_SSE2) vpx_highbd_8_sub_pixel_avg_variance64x64 = vpx_highbd_8_sub_pixel_avg_variance64x64_sse2; - vpx_highbd_8_sub_pixel_avg_variance8x16 = vpx_highbd_8_sub_pixel_avg_variance8x16_c; - if (flags & HAS_SSE2) vpx_highbd_8_sub_pixel_avg_variance8x16 = vpx_highbd_8_sub_pixel_avg_variance8x16_sse2; - vpx_highbd_8_sub_pixel_avg_variance8x4 = vpx_highbd_8_sub_pixel_avg_variance8x4_c; - if (flags & HAS_SSE2) vpx_highbd_8_sub_pixel_avg_variance8x4 = vpx_highbd_8_sub_pixel_avg_variance8x4_sse2; - vpx_highbd_8_sub_pixel_avg_variance8x8 = vpx_highbd_8_sub_pixel_avg_variance8x8_c; - if (flags & HAS_SSE2) vpx_highbd_8_sub_pixel_avg_variance8x8 = vpx_highbd_8_sub_pixel_avg_variance8x8_sse2; - vpx_highbd_8_sub_pixel_variance16x16 = vpx_highbd_8_sub_pixel_variance16x16_c; - if (flags & HAS_SSE2) vpx_highbd_8_sub_pixel_variance16x16 = vpx_highbd_8_sub_pixel_variance16x16_sse2; - vpx_highbd_8_sub_pixel_variance16x32 = vpx_highbd_8_sub_pixel_variance16x32_c; - if (flags & HAS_SSE2) vpx_highbd_8_sub_pixel_variance16x32 = vpx_highbd_8_sub_pixel_variance16x32_sse2; - vpx_highbd_8_sub_pixel_variance16x8 = vpx_highbd_8_sub_pixel_variance16x8_c; - if (flags & HAS_SSE2) vpx_highbd_8_sub_pixel_variance16x8 = vpx_highbd_8_sub_pixel_variance16x8_sse2; - vpx_highbd_8_sub_pixel_variance32x16 = vpx_highbd_8_sub_pixel_variance32x16_c; - if (flags & HAS_SSE2) vpx_highbd_8_sub_pixel_variance32x16 = vpx_highbd_8_sub_pixel_variance32x16_sse2; - vpx_highbd_8_sub_pixel_variance32x32 = vpx_highbd_8_sub_pixel_variance32x32_c; - if (flags & HAS_SSE2) vpx_highbd_8_sub_pixel_variance32x32 = vpx_highbd_8_sub_pixel_variance32x32_sse2; - vpx_highbd_8_sub_pixel_variance32x64 = vpx_highbd_8_sub_pixel_variance32x64_c; - if (flags & HAS_SSE2) vpx_highbd_8_sub_pixel_variance32x64 = vpx_highbd_8_sub_pixel_variance32x64_sse2; - vpx_highbd_8_sub_pixel_variance64x32 = vpx_highbd_8_sub_pixel_variance64x32_c; - if (flags & HAS_SSE2) vpx_highbd_8_sub_pixel_variance64x32 = vpx_highbd_8_sub_pixel_variance64x32_sse2; - vpx_highbd_8_sub_pixel_variance64x64 = vpx_highbd_8_sub_pixel_variance64x64_c; - if (flags & HAS_SSE2) vpx_highbd_8_sub_pixel_variance64x64 = vpx_highbd_8_sub_pixel_variance64x64_sse2; - vpx_highbd_8_sub_pixel_variance8x16 = vpx_highbd_8_sub_pixel_variance8x16_c; - if (flags & HAS_SSE2) vpx_highbd_8_sub_pixel_variance8x16 = vpx_highbd_8_sub_pixel_variance8x16_sse2; - vpx_highbd_8_sub_pixel_variance8x4 = vpx_highbd_8_sub_pixel_variance8x4_c; - if (flags & HAS_SSE2) vpx_highbd_8_sub_pixel_variance8x4 = vpx_highbd_8_sub_pixel_variance8x4_sse2; - vpx_highbd_8_sub_pixel_variance8x8 = vpx_highbd_8_sub_pixel_variance8x8_c; - if (flags & HAS_SSE2) vpx_highbd_8_sub_pixel_variance8x8 = vpx_highbd_8_sub_pixel_variance8x8_sse2; - vpx_highbd_8_variance16x16 = vpx_highbd_8_variance16x16_c; - if (flags & HAS_SSE2) vpx_highbd_8_variance16x16 = vpx_highbd_8_variance16x16_sse2; - vpx_highbd_8_variance16x32 = vpx_highbd_8_variance16x32_c; - if (flags & HAS_SSE2) vpx_highbd_8_variance16x32 = vpx_highbd_8_variance16x32_sse2; - vpx_highbd_8_variance16x8 = vpx_highbd_8_variance16x8_c; - if (flags & HAS_SSE2) vpx_highbd_8_variance16x8 = vpx_highbd_8_variance16x8_sse2; - vpx_highbd_8_variance32x16 = vpx_highbd_8_variance32x16_c; - if (flags & HAS_SSE2) vpx_highbd_8_variance32x16 = vpx_highbd_8_variance32x16_sse2; - vpx_highbd_8_variance32x32 = vpx_highbd_8_variance32x32_c; - if (flags & HAS_SSE2) vpx_highbd_8_variance32x32 = vpx_highbd_8_variance32x32_sse2; - vpx_highbd_8_variance32x64 = vpx_highbd_8_variance32x64_c; - if (flags & HAS_SSE2) vpx_highbd_8_variance32x64 = vpx_highbd_8_variance32x64_sse2; - vpx_highbd_8_variance64x32 = vpx_highbd_8_variance64x32_c; - if (flags & HAS_SSE2) vpx_highbd_8_variance64x32 = vpx_highbd_8_variance64x32_sse2; - vpx_highbd_8_variance64x64 = vpx_highbd_8_variance64x64_c; - if (flags & HAS_SSE2) vpx_highbd_8_variance64x64 = vpx_highbd_8_variance64x64_sse2; - vpx_highbd_8_variance8x16 = vpx_highbd_8_variance8x16_c; - if (flags & HAS_SSE2) vpx_highbd_8_variance8x16 = vpx_highbd_8_variance8x16_sse2; - vpx_highbd_8_variance8x8 = vpx_highbd_8_variance8x8_c; - if (flags & HAS_SSE2) vpx_highbd_8_variance8x8 = vpx_highbd_8_variance8x8_sse2; - vpx_highbd_convolve_avg = vpx_highbd_convolve_avg_c; - if (flags & HAS_SSE2) vpx_highbd_convolve_avg = vpx_highbd_convolve_avg_sse2; - vpx_highbd_convolve_copy = vpx_highbd_convolve_copy_c; - if (flags & HAS_SSE2) vpx_highbd_convolve_copy = vpx_highbd_convolve_copy_sse2; - vpx_highbd_dc_predictor_16x16 = vpx_highbd_dc_predictor_16x16_c; - if (flags & HAS_SSE2) vpx_highbd_dc_predictor_16x16 = vpx_highbd_dc_predictor_16x16_sse2; - vpx_highbd_dc_predictor_32x32 = vpx_highbd_dc_predictor_32x32_c; - if (flags & HAS_SSE2) vpx_highbd_dc_predictor_32x32 = vpx_highbd_dc_predictor_32x32_sse2; - vpx_highbd_dc_predictor_4x4 = vpx_highbd_dc_predictor_4x4_c; - if (flags & HAS_SSE2) vpx_highbd_dc_predictor_4x4 = vpx_highbd_dc_predictor_4x4_sse2; - vpx_highbd_dc_predictor_8x8 = vpx_highbd_dc_predictor_8x8_c; - if (flags & HAS_SSE2) vpx_highbd_dc_predictor_8x8 = vpx_highbd_dc_predictor_8x8_sse2; - vpx_highbd_fdct16x16 = vpx_highbd_fdct16x16_c; - if (flags & HAS_SSE2) vpx_highbd_fdct16x16 = vpx_highbd_fdct16x16_sse2; - vpx_highbd_fdct32x32 = vpx_highbd_fdct32x32_c; - if (flags & HAS_SSE2) vpx_highbd_fdct32x32 = vpx_highbd_fdct32x32_sse2; - vpx_highbd_fdct32x32_rd = vpx_highbd_fdct32x32_rd_c; - if (flags & HAS_SSE2) vpx_highbd_fdct32x32_rd = vpx_highbd_fdct32x32_rd_sse2; - vpx_highbd_fdct4x4 = vpx_highbd_fdct4x4_c; - if (flags & HAS_SSE2) vpx_highbd_fdct4x4 = vpx_highbd_fdct4x4_sse2; - vpx_highbd_fdct8x8 = vpx_highbd_fdct8x8_c; - if (flags & HAS_SSE2) vpx_highbd_fdct8x8 = vpx_highbd_fdct8x8_sse2; - vpx_highbd_idct16x16_10_add = vpx_highbd_idct16x16_10_add_c; - if (flags & HAS_SSE2) vpx_highbd_idct16x16_10_add = vpx_highbd_idct16x16_10_add_sse2; - vpx_highbd_idct16x16_256_add = vpx_highbd_idct16x16_256_add_c; - if (flags & HAS_SSE2) vpx_highbd_idct16x16_256_add = vpx_highbd_idct16x16_256_add_sse2; - vpx_highbd_idct32x32_1_add = vpx_highbd_idct32x32_1_add_c; - if (flags & HAS_SSE2) vpx_highbd_idct32x32_1_add = vpx_highbd_idct32x32_1_add_sse2; - vpx_highbd_idct4x4_16_add = vpx_highbd_idct4x4_16_add_c; - if (flags & HAS_SSE2) vpx_highbd_idct4x4_16_add = vpx_highbd_idct4x4_16_add_sse2; - vpx_highbd_idct8x8_12_add = vpx_highbd_idct8x8_12_add_c; - if (flags & HAS_SSE2) vpx_highbd_idct8x8_12_add = vpx_highbd_idct8x8_12_add_sse2; - vpx_highbd_idct8x8_64_add = vpx_highbd_idct8x8_64_add_c; - if (flags & HAS_SSE2) vpx_highbd_idct8x8_64_add = vpx_highbd_idct8x8_64_add_sse2; - vpx_highbd_lpf_horizontal_16 = vpx_highbd_lpf_horizontal_16_c; - if (flags & HAS_SSE2) vpx_highbd_lpf_horizontal_16 = vpx_highbd_lpf_horizontal_16_sse2; - vpx_highbd_lpf_horizontal_16_dual = vpx_highbd_lpf_horizontal_16_dual_c; - if (flags & HAS_SSE2) vpx_highbd_lpf_horizontal_16_dual = vpx_highbd_lpf_horizontal_16_dual_sse2; - vpx_highbd_lpf_horizontal_4 = vpx_highbd_lpf_horizontal_4_c; - if (flags & HAS_SSE2) vpx_highbd_lpf_horizontal_4 = vpx_highbd_lpf_horizontal_4_sse2; - vpx_highbd_lpf_horizontal_4_dual = vpx_highbd_lpf_horizontal_4_dual_c; - if (flags & HAS_SSE2) vpx_highbd_lpf_horizontal_4_dual = vpx_highbd_lpf_horizontal_4_dual_sse2; - vpx_highbd_lpf_horizontal_8 = vpx_highbd_lpf_horizontal_8_c; - if (flags & HAS_SSE2) vpx_highbd_lpf_horizontal_8 = vpx_highbd_lpf_horizontal_8_sse2; - vpx_highbd_lpf_horizontal_8_dual = vpx_highbd_lpf_horizontal_8_dual_c; - if (flags & HAS_SSE2) vpx_highbd_lpf_horizontal_8_dual = vpx_highbd_lpf_horizontal_8_dual_sse2; - vpx_highbd_lpf_vertical_16 = vpx_highbd_lpf_vertical_16_c; - if (flags & HAS_SSE2) vpx_highbd_lpf_vertical_16 = vpx_highbd_lpf_vertical_16_sse2; - vpx_highbd_lpf_vertical_16_dual = vpx_highbd_lpf_vertical_16_dual_c; - if (flags & HAS_SSE2) vpx_highbd_lpf_vertical_16_dual = vpx_highbd_lpf_vertical_16_dual_sse2; - vpx_highbd_lpf_vertical_4 = vpx_highbd_lpf_vertical_4_c; - if (flags & HAS_SSE2) vpx_highbd_lpf_vertical_4 = vpx_highbd_lpf_vertical_4_sse2; - vpx_highbd_lpf_vertical_4_dual = vpx_highbd_lpf_vertical_4_dual_c; - if (flags & HAS_SSE2) vpx_highbd_lpf_vertical_4_dual = vpx_highbd_lpf_vertical_4_dual_sse2; - vpx_highbd_lpf_vertical_8 = vpx_highbd_lpf_vertical_8_c; - if (flags & HAS_SSE2) vpx_highbd_lpf_vertical_8 = vpx_highbd_lpf_vertical_8_sse2; - vpx_highbd_lpf_vertical_8_dual = vpx_highbd_lpf_vertical_8_dual_c; - if (flags & HAS_SSE2) vpx_highbd_lpf_vertical_8_dual = vpx_highbd_lpf_vertical_8_dual_sse2; - vpx_highbd_quantize_b = vpx_highbd_quantize_b_c; - if (flags & HAS_SSE2) vpx_highbd_quantize_b = vpx_highbd_quantize_b_sse2; - vpx_highbd_quantize_b_32x32 = vpx_highbd_quantize_b_32x32_c; - if (flags & HAS_SSE2) vpx_highbd_quantize_b_32x32 = vpx_highbd_quantize_b_32x32_sse2; - vpx_highbd_sad16x16 = vpx_highbd_sad16x16_c; - if (flags & HAS_SSE2) vpx_highbd_sad16x16 = vpx_highbd_sad16x16_sse2; - vpx_highbd_sad16x16_avg = vpx_highbd_sad16x16_avg_c; - if (flags & HAS_SSE2) vpx_highbd_sad16x16_avg = vpx_highbd_sad16x16_avg_sse2; - vpx_highbd_sad16x16x4d = vpx_highbd_sad16x16x4d_c; - if (flags & HAS_SSE2) vpx_highbd_sad16x16x4d = vpx_highbd_sad16x16x4d_sse2; - vpx_highbd_sad16x32 = vpx_highbd_sad16x32_c; - if (flags & HAS_SSE2) vpx_highbd_sad16x32 = vpx_highbd_sad16x32_sse2; - vpx_highbd_sad16x32_avg = vpx_highbd_sad16x32_avg_c; - if (flags & HAS_SSE2) vpx_highbd_sad16x32_avg = vpx_highbd_sad16x32_avg_sse2; - vpx_highbd_sad16x32x4d = vpx_highbd_sad16x32x4d_c; - if (flags & HAS_SSE2) vpx_highbd_sad16x32x4d = vpx_highbd_sad16x32x4d_sse2; - vpx_highbd_sad16x8 = vpx_highbd_sad16x8_c; - if (flags & HAS_SSE2) vpx_highbd_sad16x8 = vpx_highbd_sad16x8_sse2; - vpx_highbd_sad16x8_avg = vpx_highbd_sad16x8_avg_c; - if (flags & HAS_SSE2) vpx_highbd_sad16x8_avg = vpx_highbd_sad16x8_avg_sse2; - vpx_highbd_sad16x8x4d = vpx_highbd_sad16x8x4d_c; - if (flags & HAS_SSE2) vpx_highbd_sad16x8x4d = vpx_highbd_sad16x8x4d_sse2; - vpx_highbd_sad32x16 = vpx_highbd_sad32x16_c; - if (flags & HAS_SSE2) vpx_highbd_sad32x16 = vpx_highbd_sad32x16_sse2; - vpx_highbd_sad32x16_avg = vpx_highbd_sad32x16_avg_c; - if (flags & HAS_SSE2) vpx_highbd_sad32x16_avg = vpx_highbd_sad32x16_avg_sse2; - vpx_highbd_sad32x16x4d = vpx_highbd_sad32x16x4d_c; - if (flags & HAS_SSE2) vpx_highbd_sad32x16x4d = vpx_highbd_sad32x16x4d_sse2; - vpx_highbd_sad32x32 = vpx_highbd_sad32x32_c; - if (flags & HAS_SSE2) vpx_highbd_sad32x32 = vpx_highbd_sad32x32_sse2; - vpx_highbd_sad32x32_avg = vpx_highbd_sad32x32_avg_c; - if (flags & HAS_SSE2) vpx_highbd_sad32x32_avg = vpx_highbd_sad32x32_avg_sse2; - vpx_highbd_sad32x32x4d = vpx_highbd_sad32x32x4d_c; - if (flags & HAS_SSE2) vpx_highbd_sad32x32x4d = vpx_highbd_sad32x32x4d_sse2; - vpx_highbd_sad32x64 = vpx_highbd_sad32x64_c; - if (flags & HAS_SSE2) vpx_highbd_sad32x64 = vpx_highbd_sad32x64_sse2; - vpx_highbd_sad32x64_avg = vpx_highbd_sad32x64_avg_c; - if (flags & HAS_SSE2) vpx_highbd_sad32x64_avg = vpx_highbd_sad32x64_avg_sse2; - vpx_highbd_sad32x64x4d = vpx_highbd_sad32x64x4d_c; - if (flags & HAS_SSE2) vpx_highbd_sad32x64x4d = vpx_highbd_sad32x64x4d_sse2; - vpx_highbd_sad4x4x4d = vpx_highbd_sad4x4x4d_c; - if (flags & HAS_SSE2) vpx_highbd_sad4x4x4d = vpx_highbd_sad4x4x4d_sse2; - vpx_highbd_sad4x8x4d = vpx_highbd_sad4x8x4d_c; - if (flags & HAS_SSE2) vpx_highbd_sad4x8x4d = vpx_highbd_sad4x8x4d_sse2; - vpx_highbd_sad64x32 = vpx_highbd_sad64x32_c; - if (flags & HAS_SSE2) vpx_highbd_sad64x32 = vpx_highbd_sad64x32_sse2; - vpx_highbd_sad64x32_avg = vpx_highbd_sad64x32_avg_c; - if (flags & HAS_SSE2) vpx_highbd_sad64x32_avg = vpx_highbd_sad64x32_avg_sse2; - vpx_highbd_sad64x32x4d = vpx_highbd_sad64x32x4d_c; - if (flags & HAS_SSE2) vpx_highbd_sad64x32x4d = vpx_highbd_sad64x32x4d_sse2; - vpx_highbd_sad64x64 = vpx_highbd_sad64x64_c; - if (flags & HAS_SSE2) vpx_highbd_sad64x64 = vpx_highbd_sad64x64_sse2; - vpx_highbd_sad64x64_avg = vpx_highbd_sad64x64_avg_c; - if (flags & HAS_SSE2) vpx_highbd_sad64x64_avg = vpx_highbd_sad64x64_avg_sse2; - vpx_highbd_sad64x64x4d = vpx_highbd_sad64x64x4d_c; - if (flags & HAS_SSE2) vpx_highbd_sad64x64x4d = vpx_highbd_sad64x64x4d_sse2; - vpx_highbd_sad8x16 = vpx_highbd_sad8x16_c; - if (flags & HAS_SSE2) vpx_highbd_sad8x16 = vpx_highbd_sad8x16_sse2; - vpx_highbd_sad8x16_avg = vpx_highbd_sad8x16_avg_c; - if (flags & HAS_SSE2) vpx_highbd_sad8x16_avg = vpx_highbd_sad8x16_avg_sse2; - vpx_highbd_sad8x16x4d = vpx_highbd_sad8x16x4d_c; - if (flags & HAS_SSE2) vpx_highbd_sad8x16x4d = vpx_highbd_sad8x16x4d_sse2; - vpx_highbd_sad8x4 = vpx_highbd_sad8x4_c; - if (flags & HAS_SSE2) vpx_highbd_sad8x4 = vpx_highbd_sad8x4_sse2; - vpx_highbd_sad8x4_avg = vpx_highbd_sad8x4_avg_c; - if (flags & HAS_SSE2) vpx_highbd_sad8x4_avg = vpx_highbd_sad8x4_avg_sse2; - vpx_highbd_sad8x4x4d = vpx_highbd_sad8x4x4d_c; - if (flags & HAS_SSE2) vpx_highbd_sad8x4x4d = vpx_highbd_sad8x4x4d_sse2; - vpx_highbd_sad8x8 = vpx_highbd_sad8x8_c; - if (flags & HAS_SSE2) vpx_highbd_sad8x8 = vpx_highbd_sad8x8_sse2; - vpx_highbd_sad8x8_avg = vpx_highbd_sad8x8_avg_c; - if (flags & HAS_SSE2) vpx_highbd_sad8x8_avg = vpx_highbd_sad8x8_avg_sse2; - vpx_highbd_sad8x8x4d = vpx_highbd_sad8x8x4d_c; - if (flags & HAS_SSE2) vpx_highbd_sad8x8x4d = vpx_highbd_sad8x8x4d_sse2; - vpx_highbd_tm_predictor_16x16 = vpx_highbd_tm_predictor_16x16_c; - if (flags & HAS_SSE2) vpx_highbd_tm_predictor_16x16 = vpx_highbd_tm_predictor_16x16_sse2; - vpx_highbd_tm_predictor_32x32 = vpx_highbd_tm_predictor_32x32_c; - if (flags & HAS_SSE2) vpx_highbd_tm_predictor_32x32 = vpx_highbd_tm_predictor_32x32_sse2; - vpx_highbd_tm_predictor_4x4 = vpx_highbd_tm_predictor_4x4_c; - if (flags & HAS_SSE2) vpx_highbd_tm_predictor_4x4 = vpx_highbd_tm_predictor_4x4_sse2; - vpx_highbd_tm_predictor_8x8 = vpx_highbd_tm_predictor_8x8_c; - if (flags & HAS_SSE2) vpx_highbd_tm_predictor_8x8 = vpx_highbd_tm_predictor_8x8_sse2; - vpx_highbd_v_predictor_16x16 = vpx_highbd_v_predictor_16x16_c; - if (flags & HAS_SSE2) vpx_highbd_v_predictor_16x16 = vpx_highbd_v_predictor_16x16_sse2; - vpx_highbd_v_predictor_32x32 = vpx_highbd_v_predictor_32x32_c; - if (flags & HAS_SSE2) vpx_highbd_v_predictor_32x32 = vpx_highbd_v_predictor_32x32_sse2; - vpx_highbd_v_predictor_4x4 = vpx_highbd_v_predictor_4x4_c; - if (flags & HAS_SSE2) vpx_highbd_v_predictor_4x4 = vpx_highbd_v_predictor_4x4_sse2; - vpx_highbd_v_predictor_8x8 = vpx_highbd_v_predictor_8x8_c; - if (flags & HAS_SSE2) vpx_highbd_v_predictor_8x8 = vpx_highbd_v_predictor_8x8_sse2; - vpx_idct16x16_10_add = vpx_idct16x16_10_add_c; - if (flags & HAS_SSE2) vpx_idct16x16_10_add = vpx_idct16x16_10_add_sse2; - vpx_idct16x16_1_add = vpx_idct16x16_1_add_c; - if (flags & HAS_SSE2) vpx_idct16x16_1_add = vpx_idct16x16_1_add_sse2; - vpx_idct16x16_256_add = vpx_idct16x16_256_add_c; - if (flags & HAS_SSE2) vpx_idct16x16_256_add = vpx_idct16x16_256_add_sse2; - vpx_idct32x32_1024_add = vpx_idct32x32_1024_add_c; - if (flags & HAS_SSE2) vpx_idct32x32_1024_add = vpx_idct32x32_1024_add_sse2; - vpx_idct32x32_135_add = vpx_idct32x32_135_add_c; - if (flags & HAS_SSE2) vpx_idct32x32_135_add = vpx_idct32x32_1024_add_sse2; - vpx_idct32x32_1_add = vpx_idct32x32_1_add_c; - if (flags & HAS_SSE2) vpx_idct32x32_1_add = vpx_idct32x32_1_add_sse2; - vpx_idct32x32_34_add = vpx_idct32x32_34_add_c; - if (flags & HAS_SSE2) vpx_idct32x32_34_add = vpx_idct32x32_34_add_sse2; - vpx_idct4x4_16_add = vpx_idct4x4_16_add_c; - if (flags & HAS_SSE2) vpx_idct4x4_16_add = vpx_idct4x4_16_add_sse2; - vpx_idct4x4_1_add = vpx_idct4x4_1_add_c; - if (flags & HAS_SSE2) vpx_idct4x4_1_add = vpx_idct4x4_1_add_sse2; - vpx_idct8x8_12_add = vpx_idct8x8_12_add_c; - if (flags & HAS_SSE2) vpx_idct8x8_12_add = vpx_idct8x8_12_add_sse2; - vpx_idct8x8_1_add = vpx_idct8x8_1_add_c; - if (flags & HAS_SSE2) vpx_idct8x8_1_add = vpx_idct8x8_1_add_sse2; - vpx_idct8x8_64_add = vpx_idct8x8_64_add_c; - if (flags & HAS_SSE2) vpx_idct8x8_64_add = vpx_idct8x8_64_add_sse2; - vpx_int_pro_col = vpx_int_pro_col_c; - if (flags & HAS_SSE2) vpx_int_pro_col = vpx_int_pro_col_sse2; - vpx_int_pro_row = vpx_int_pro_row_c; - if (flags & HAS_SSE2) vpx_int_pro_row = vpx_int_pro_row_sse2; - vpx_iwht4x4_16_add = vpx_iwht4x4_16_add_c; - if (flags & HAS_SSE2) vpx_iwht4x4_16_add = vpx_iwht4x4_16_add_sse2; - vpx_lpf_horizontal_16 = vpx_lpf_horizontal_16_c; - if (flags & HAS_SSE2) vpx_lpf_horizontal_16 = vpx_lpf_horizontal_16_sse2; - if (flags & HAS_AVX2) vpx_lpf_horizontal_16 = vpx_lpf_horizontal_16_avx2; - vpx_lpf_horizontal_16_dual = vpx_lpf_horizontal_16_dual_c; - if (flags & HAS_SSE2) vpx_lpf_horizontal_16_dual = vpx_lpf_horizontal_16_dual_sse2; - if (flags & HAS_AVX2) vpx_lpf_horizontal_16_dual = vpx_lpf_horizontal_16_dual_avx2; - vpx_lpf_horizontal_4 = vpx_lpf_horizontal_4_c; - if (flags & HAS_SSE2) vpx_lpf_horizontal_4 = vpx_lpf_horizontal_4_sse2; - vpx_lpf_horizontal_4_dual = vpx_lpf_horizontal_4_dual_c; - if (flags & HAS_SSE2) vpx_lpf_horizontal_4_dual = vpx_lpf_horizontal_4_dual_sse2; - vpx_lpf_horizontal_8 = vpx_lpf_horizontal_8_c; - if (flags & HAS_SSE2) vpx_lpf_horizontal_8 = vpx_lpf_horizontal_8_sse2; - vpx_lpf_horizontal_8_dual = vpx_lpf_horizontal_8_dual_c; - if (flags & HAS_SSE2) vpx_lpf_horizontal_8_dual = vpx_lpf_horizontal_8_dual_sse2; - vpx_lpf_vertical_16 = vpx_lpf_vertical_16_c; - if (flags & HAS_SSE2) vpx_lpf_vertical_16 = vpx_lpf_vertical_16_sse2; - vpx_lpf_vertical_16_dual = vpx_lpf_vertical_16_dual_c; - if (flags & HAS_SSE2) vpx_lpf_vertical_16_dual = vpx_lpf_vertical_16_dual_sse2; - vpx_lpf_vertical_4 = vpx_lpf_vertical_4_c; - if (flags & HAS_SSE2) vpx_lpf_vertical_4 = vpx_lpf_vertical_4_sse2; - vpx_lpf_vertical_4_dual = vpx_lpf_vertical_4_dual_c; - if (flags & HAS_SSE2) vpx_lpf_vertical_4_dual = vpx_lpf_vertical_4_dual_sse2; - vpx_lpf_vertical_8 = vpx_lpf_vertical_8_c; - if (flags & HAS_SSE2) vpx_lpf_vertical_8 = vpx_lpf_vertical_8_sse2; - vpx_lpf_vertical_8_dual = vpx_lpf_vertical_8_dual_c; - if (flags & HAS_SSE2) vpx_lpf_vertical_8_dual = vpx_lpf_vertical_8_dual_sse2; - vpx_mbpost_proc_across_ip = vpx_mbpost_proc_across_ip_c; - if (flags & HAS_SSE2) vpx_mbpost_proc_across_ip = vpx_mbpost_proc_across_ip_sse2; - vpx_mbpost_proc_down = vpx_mbpost_proc_down_c; - if (flags & HAS_SSE2) vpx_mbpost_proc_down = vpx_mbpost_proc_down_sse2; - vpx_minmax_8x8 = vpx_minmax_8x8_c; - if (flags & HAS_SSE2) vpx_minmax_8x8 = vpx_minmax_8x8_sse2; - vpx_mse16x16 = vpx_mse16x16_c; - if (flags & HAS_SSE2) vpx_mse16x16 = vpx_mse16x16_sse2; - if (flags & HAS_AVX2) vpx_mse16x16 = vpx_mse16x16_avx2; - vpx_mse16x8 = vpx_mse16x8_c; - if (flags & HAS_SSE2) vpx_mse16x8 = vpx_mse16x8_sse2; - vpx_mse8x16 = vpx_mse8x16_c; - if (flags & HAS_SSE2) vpx_mse8x16 = vpx_mse8x16_sse2; - vpx_mse8x8 = vpx_mse8x8_c; - if (flags & HAS_SSE2) vpx_mse8x8 = vpx_mse8x8_sse2; - vpx_plane_add_noise = vpx_plane_add_noise_c; - if (flags & HAS_SSE2) vpx_plane_add_noise = vpx_plane_add_noise_sse2; - vpx_post_proc_down_and_across_mb_row = vpx_post_proc_down_and_across_mb_row_c; - if (flags & HAS_SSE2) vpx_post_proc_down_and_across_mb_row = vpx_post_proc_down_and_across_mb_row_sse2; - vpx_quantize_b = vpx_quantize_b_c; - if (flags & HAS_SSE2) vpx_quantize_b = vpx_quantize_b_sse2; - vpx_sad16x16 = vpx_sad16x16_c; - if (flags & HAS_SSE2) vpx_sad16x16 = vpx_sad16x16_sse2; - vpx_sad16x16_avg = vpx_sad16x16_avg_c; - if (flags & HAS_SSE2) vpx_sad16x16_avg = vpx_sad16x16_avg_sse2; - vpx_sad16x16x3 = vpx_sad16x16x3_c; - if (flags & HAS_SSE3) vpx_sad16x16x3 = vpx_sad16x16x3_sse3; - if (flags & HAS_SSSE3) vpx_sad16x16x3 = vpx_sad16x16x3_ssse3; - vpx_sad16x16x4d = vpx_sad16x16x4d_c; - if (flags & HAS_SSE2) vpx_sad16x16x4d = vpx_sad16x16x4d_sse2; - vpx_sad16x16x8 = vpx_sad16x16x8_c; - if (flags & HAS_SSE4_1) vpx_sad16x16x8 = vpx_sad16x16x8_sse4_1; - vpx_sad16x32 = vpx_sad16x32_c; - if (flags & HAS_SSE2) vpx_sad16x32 = vpx_sad16x32_sse2; - vpx_sad16x32_avg = vpx_sad16x32_avg_c; - if (flags & HAS_SSE2) vpx_sad16x32_avg = vpx_sad16x32_avg_sse2; - vpx_sad16x32x4d = vpx_sad16x32x4d_c; - if (flags & HAS_SSE2) vpx_sad16x32x4d = vpx_sad16x32x4d_sse2; - vpx_sad16x8 = vpx_sad16x8_c; - if (flags & HAS_SSE2) vpx_sad16x8 = vpx_sad16x8_sse2; - vpx_sad16x8_avg = vpx_sad16x8_avg_c; - if (flags & HAS_SSE2) vpx_sad16x8_avg = vpx_sad16x8_avg_sse2; - vpx_sad16x8x3 = vpx_sad16x8x3_c; - if (flags & HAS_SSE3) vpx_sad16x8x3 = vpx_sad16x8x3_sse3; - if (flags & HAS_SSSE3) vpx_sad16x8x3 = vpx_sad16x8x3_ssse3; - vpx_sad16x8x4d = vpx_sad16x8x4d_c; - if (flags & HAS_SSE2) vpx_sad16x8x4d = vpx_sad16x8x4d_sse2; - vpx_sad16x8x8 = vpx_sad16x8x8_c; - if (flags & HAS_SSE4_1) vpx_sad16x8x8 = vpx_sad16x8x8_sse4_1; - vpx_sad32x16 = vpx_sad32x16_c; - if (flags & HAS_SSE2) vpx_sad32x16 = vpx_sad32x16_sse2; - if (flags & HAS_AVX2) vpx_sad32x16 = vpx_sad32x16_avx2; - vpx_sad32x16_avg = vpx_sad32x16_avg_c; - if (flags & HAS_SSE2) vpx_sad32x16_avg = vpx_sad32x16_avg_sse2; - if (flags & HAS_AVX2) vpx_sad32x16_avg = vpx_sad32x16_avg_avx2; - vpx_sad32x16x4d = vpx_sad32x16x4d_c; - if (flags & HAS_SSE2) vpx_sad32x16x4d = vpx_sad32x16x4d_sse2; - vpx_sad32x32 = vpx_sad32x32_c; - if (flags & HAS_SSE2) vpx_sad32x32 = vpx_sad32x32_sse2; - if (flags & HAS_AVX2) vpx_sad32x32 = vpx_sad32x32_avx2; - vpx_sad32x32_avg = vpx_sad32x32_avg_c; - if (flags & HAS_SSE2) vpx_sad32x32_avg = vpx_sad32x32_avg_sse2; - if (flags & HAS_AVX2) vpx_sad32x32_avg = vpx_sad32x32_avg_avx2; - vpx_sad32x32x4d = vpx_sad32x32x4d_c; - if (flags & HAS_SSE2) vpx_sad32x32x4d = vpx_sad32x32x4d_sse2; - if (flags & HAS_AVX2) vpx_sad32x32x4d = vpx_sad32x32x4d_avx2; - vpx_sad32x64 = vpx_sad32x64_c; - if (flags & HAS_SSE2) vpx_sad32x64 = vpx_sad32x64_sse2; - if (flags & HAS_AVX2) vpx_sad32x64 = vpx_sad32x64_avx2; - vpx_sad32x64_avg = vpx_sad32x64_avg_c; - if (flags & HAS_SSE2) vpx_sad32x64_avg = vpx_sad32x64_avg_sse2; - if (flags & HAS_AVX2) vpx_sad32x64_avg = vpx_sad32x64_avg_avx2; - vpx_sad32x64x4d = vpx_sad32x64x4d_c; - if (flags & HAS_SSE2) vpx_sad32x64x4d = vpx_sad32x64x4d_sse2; - vpx_sad4x4 = vpx_sad4x4_c; - if (flags & HAS_SSE2) vpx_sad4x4 = vpx_sad4x4_sse2; - vpx_sad4x4_avg = vpx_sad4x4_avg_c; - if (flags & HAS_SSE2) vpx_sad4x4_avg = vpx_sad4x4_avg_sse2; - vpx_sad4x4x3 = vpx_sad4x4x3_c; - if (flags & HAS_SSE3) vpx_sad4x4x3 = vpx_sad4x4x3_sse3; - vpx_sad4x4x4d = vpx_sad4x4x4d_c; - if (flags & HAS_SSE2) vpx_sad4x4x4d = vpx_sad4x4x4d_sse2; - vpx_sad4x4x8 = vpx_sad4x4x8_c; - if (flags & HAS_SSE4_1) vpx_sad4x4x8 = vpx_sad4x4x8_sse4_1; - vpx_sad4x8 = vpx_sad4x8_c; - if (flags & HAS_SSE2) vpx_sad4x8 = vpx_sad4x8_sse2; - vpx_sad4x8_avg = vpx_sad4x8_avg_c; - if (flags & HAS_SSE2) vpx_sad4x8_avg = vpx_sad4x8_avg_sse2; - vpx_sad4x8x4d = vpx_sad4x8x4d_c; - if (flags & HAS_SSE2) vpx_sad4x8x4d = vpx_sad4x8x4d_sse2; - vpx_sad64x32 = vpx_sad64x32_c; - if (flags & HAS_SSE2) vpx_sad64x32 = vpx_sad64x32_sse2; - if (flags & HAS_AVX2) vpx_sad64x32 = vpx_sad64x32_avx2; - vpx_sad64x32_avg = vpx_sad64x32_avg_c; - if (flags & HAS_SSE2) vpx_sad64x32_avg = vpx_sad64x32_avg_sse2; - if (flags & HAS_AVX2) vpx_sad64x32_avg = vpx_sad64x32_avg_avx2; - vpx_sad64x32x4d = vpx_sad64x32x4d_c; - if (flags & HAS_SSE2) vpx_sad64x32x4d = vpx_sad64x32x4d_sse2; - vpx_sad64x64 = vpx_sad64x64_c; - if (flags & HAS_SSE2) vpx_sad64x64 = vpx_sad64x64_sse2; - if (flags & HAS_AVX2) vpx_sad64x64 = vpx_sad64x64_avx2; - vpx_sad64x64_avg = vpx_sad64x64_avg_c; - if (flags & HAS_SSE2) vpx_sad64x64_avg = vpx_sad64x64_avg_sse2; - if (flags & HAS_AVX2) vpx_sad64x64_avg = vpx_sad64x64_avg_avx2; - vpx_sad64x64x4d = vpx_sad64x64x4d_c; - if (flags & HAS_SSE2) vpx_sad64x64x4d = vpx_sad64x64x4d_sse2; - if (flags & HAS_AVX2) vpx_sad64x64x4d = vpx_sad64x64x4d_avx2; - vpx_sad8x16 = vpx_sad8x16_c; - if (flags & HAS_SSE2) vpx_sad8x16 = vpx_sad8x16_sse2; - vpx_sad8x16_avg = vpx_sad8x16_avg_c; - if (flags & HAS_SSE2) vpx_sad8x16_avg = vpx_sad8x16_avg_sse2; - vpx_sad8x16x3 = vpx_sad8x16x3_c; - if (flags & HAS_SSE3) vpx_sad8x16x3 = vpx_sad8x16x3_sse3; - vpx_sad8x16x4d = vpx_sad8x16x4d_c; - if (flags & HAS_SSE2) vpx_sad8x16x4d = vpx_sad8x16x4d_sse2; - vpx_sad8x16x8 = vpx_sad8x16x8_c; - if (flags & HAS_SSE4_1) vpx_sad8x16x8 = vpx_sad8x16x8_sse4_1; - vpx_sad8x4 = vpx_sad8x4_c; - if (flags & HAS_SSE2) vpx_sad8x4 = vpx_sad8x4_sse2; - vpx_sad8x4_avg = vpx_sad8x4_avg_c; - if (flags & HAS_SSE2) vpx_sad8x4_avg = vpx_sad8x4_avg_sse2; - vpx_sad8x4x4d = vpx_sad8x4x4d_c; - if (flags & HAS_SSE2) vpx_sad8x4x4d = vpx_sad8x4x4d_sse2; - vpx_sad8x8 = vpx_sad8x8_c; - if (flags & HAS_SSE2) vpx_sad8x8 = vpx_sad8x8_sse2; - vpx_sad8x8_avg = vpx_sad8x8_avg_c; - if (flags & HAS_SSE2) vpx_sad8x8_avg = vpx_sad8x8_avg_sse2; - vpx_sad8x8x3 = vpx_sad8x8x3_c; - if (flags & HAS_SSE3) vpx_sad8x8x3 = vpx_sad8x8x3_sse3; - vpx_sad8x8x4d = vpx_sad8x8x4d_c; - if (flags & HAS_SSE2) vpx_sad8x8x4d = vpx_sad8x8x4d_sse2; - vpx_sad8x8x8 = vpx_sad8x8x8_c; - if (flags & HAS_SSE4_1) vpx_sad8x8x8 = vpx_sad8x8x8_sse4_1; - vpx_satd = vpx_satd_c; - if (flags & HAS_SSE2) vpx_satd = vpx_satd_sse2; - vpx_scaled_2d = vpx_scaled_2d_c; - if (flags & HAS_SSSE3) vpx_scaled_2d = vpx_scaled_2d_ssse3; - vpx_sub_pixel_avg_variance16x16 = vpx_sub_pixel_avg_variance16x16_c; - if (flags & HAS_SSE2) vpx_sub_pixel_avg_variance16x16 = vpx_sub_pixel_avg_variance16x16_sse2; - if (flags & HAS_SSSE3) vpx_sub_pixel_avg_variance16x16 = vpx_sub_pixel_avg_variance16x16_ssse3; - vpx_sub_pixel_avg_variance16x32 = vpx_sub_pixel_avg_variance16x32_c; - if (flags & HAS_SSE2) vpx_sub_pixel_avg_variance16x32 = vpx_sub_pixel_avg_variance16x32_sse2; - if (flags & HAS_SSSE3) vpx_sub_pixel_avg_variance16x32 = vpx_sub_pixel_avg_variance16x32_ssse3; - vpx_sub_pixel_avg_variance16x8 = vpx_sub_pixel_avg_variance16x8_c; - if (flags & HAS_SSE2) vpx_sub_pixel_avg_variance16x8 = vpx_sub_pixel_avg_variance16x8_sse2; - if (flags & HAS_SSSE3) vpx_sub_pixel_avg_variance16x8 = vpx_sub_pixel_avg_variance16x8_ssse3; - vpx_sub_pixel_avg_variance32x16 = vpx_sub_pixel_avg_variance32x16_c; - if (flags & HAS_SSE2) vpx_sub_pixel_avg_variance32x16 = vpx_sub_pixel_avg_variance32x16_sse2; - if (flags & HAS_SSSE3) vpx_sub_pixel_avg_variance32x16 = vpx_sub_pixel_avg_variance32x16_ssse3; - vpx_sub_pixel_avg_variance32x32 = vpx_sub_pixel_avg_variance32x32_c; - if (flags & HAS_SSE2) vpx_sub_pixel_avg_variance32x32 = vpx_sub_pixel_avg_variance32x32_sse2; - if (flags & HAS_SSSE3) vpx_sub_pixel_avg_variance32x32 = vpx_sub_pixel_avg_variance32x32_ssse3; - if (flags & HAS_AVX2) vpx_sub_pixel_avg_variance32x32 = vpx_sub_pixel_avg_variance32x32_avx2; - vpx_sub_pixel_avg_variance32x64 = vpx_sub_pixel_avg_variance32x64_c; - if (flags & HAS_SSE2) vpx_sub_pixel_avg_variance32x64 = vpx_sub_pixel_avg_variance32x64_sse2; - if (flags & HAS_SSSE3) vpx_sub_pixel_avg_variance32x64 = vpx_sub_pixel_avg_variance32x64_ssse3; - vpx_sub_pixel_avg_variance4x4 = vpx_sub_pixel_avg_variance4x4_c; - if (flags & HAS_SSE2) vpx_sub_pixel_avg_variance4x4 = vpx_sub_pixel_avg_variance4x4_sse2; - if (flags & HAS_SSSE3) vpx_sub_pixel_avg_variance4x4 = vpx_sub_pixel_avg_variance4x4_ssse3; - vpx_sub_pixel_avg_variance4x8 = vpx_sub_pixel_avg_variance4x8_c; - if (flags & HAS_SSE2) vpx_sub_pixel_avg_variance4x8 = vpx_sub_pixel_avg_variance4x8_sse2; - if (flags & HAS_SSSE3) vpx_sub_pixel_avg_variance4x8 = vpx_sub_pixel_avg_variance4x8_ssse3; - vpx_sub_pixel_avg_variance64x32 = vpx_sub_pixel_avg_variance64x32_c; - if (flags & HAS_SSE2) vpx_sub_pixel_avg_variance64x32 = vpx_sub_pixel_avg_variance64x32_sse2; - if (flags & HAS_SSSE3) vpx_sub_pixel_avg_variance64x32 = vpx_sub_pixel_avg_variance64x32_ssse3; - vpx_sub_pixel_avg_variance64x64 = vpx_sub_pixel_avg_variance64x64_c; - if (flags & HAS_SSE2) vpx_sub_pixel_avg_variance64x64 = vpx_sub_pixel_avg_variance64x64_sse2; - if (flags & HAS_SSSE3) vpx_sub_pixel_avg_variance64x64 = vpx_sub_pixel_avg_variance64x64_ssse3; - if (flags & HAS_AVX2) vpx_sub_pixel_avg_variance64x64 = vpx_sub_pixel_avg_variance64x64_avx2; - vpx_sub_pixel_avg_variance8x16 = vpx_sub_pixel_avg_variance8x16_c; - if (flags & HAS_SSE2) vpx_sub_pixel_avg_variance8x16 = vpx_sub_pixel_avg_variance8x16_sse2; - if (flags & HAS_SSSE3) vpx_sub_pixel_avg_variance8x16 = vpx_sub_pixel_avg_variance8x16_ssse3; - vpx_sub_pixel_avg_variance8x4 = vpx_sub_pixel_avg_variance8x4_c; - if (flags & HAS_SSE2) vpx_sub_pixel_avg_variance8x4 = vpx_sub_pixel_avg_variance8x4_sse2; - if (flags & HAS_SSSE3) vpx_sub_pixel_avg_variance8x4 = vpx_sub_pixel_avg_variance8x4_ssse3; - vpx_sub_pixel_avg_variance8x8 = vpx_sub_pixel_avg_variance8x8_c; - if (flags & HAS_SSE2) vpx_sub_pixel_avg_variance8x8 = vpx_sub_pixel_avg_variance8x8_sse2; - if (flags & HAS_SSSE3) vpx_sub_pixel_avg_variance8x8 = vpx_sub_pixel_avg_variance8x8_ssse3; - vpx_sub_pixel_variance16x16 = vpx_sub_pixel_variance16x16_c; - if (flags & HAS_SSE2) vpx_sub_pixel_variance16x16 = vpx_sub_pixel_variance16x16_sse2; - if (flags & HAS_SSSE3) vpx_sub_pixel_variance16x16 = vpx_sub_pixel_variance16x16_ssse3; - vpx_sub_pixel_variance16x32 = vpx_sub_pixel_variance16x32_c; - if (flags & HAS_SSE2) vpx_sub_pixel_variance16x32 = vpx_sub_pixel_variance16x32_sse2; - if (flags & HAS_SSSE3) vpx_sub_pixel_variance16x32 = vpx_sub_pixel_variance16x32_ssse3; - vpx_sub_pixel_variance16x8 = vpx_sub_pixel_variance16x8_c; - if (flags & HAS_SSE2) vpx_sub_pixel_variance16x8 = vpx_sub_pixel_variance16x8_sse2; - if (flags & HAS_SSSE3) vpx_sub_pixel_variance16x8 = vpx_sub_pixel_variance16x8_ssse3; - vpx_sub_pixel_variance32x16 = vpx_sub_pixel_variance32x16_c; - if (flags & HAS_SSE2) vpx_sub_pixel_variance32x16 = vpx_sub_pixel_variance32x16_sse2; - if (flags & HAS_SSSE3) vpx_sub_pixel_variance32x16 = vpx_sub_pixel_variance32x16_ssse3; - vpx_sub_pixel_variance32x32 = vpx_sub_pixel_variance32x32_c; - if (flags & HAS_SSE2) vpx_sub_pixel_variance32x32 = vpx_sub_pixel_variance32x32_sse2; - if (flags & HAS_SSSE3) vpx_sub_pixel_variance32x32 = vpx_sub_pixel_variance32x32_ssse3; - if (flags & HAS_AVX2) vpx_sub_pixel_variance32x32 = vpx_sub_pixel_variance32x32_avx2; - vpx_sub_pixel_variance32x64 = vpx_sub_pixel_variance32x64_c; - if (flags & HAS_SSE2) vpx_sub_pixel_variance32x64 = vpx_sub_pixel_variance32x64_sse2; - if (flags & HAS_SSSE3) vpx_sub_pixel_variance32x64 = vpx_sub_pixel_variance32x64_ssse3; - vpx_sub_pixel_variance4x4 = vpx_sub_pixel_variance4x4_c; - if (flags & HAS_SSE2) vpx_sub_pixel_variance4x4 = vpx_sub_pixel_variance4x4_sse2; - if (flags & HAS_SSSE3) vpx_sub_pixel_variance4x4 = vpx_sub_pixel_variance4x4_ssse3; - vpx_sub_pixel_variance4x8 = vpx_sub_pixel_variance4x8_c; - if (flags & HAS_SSE2) vpx_sub_pixel_variance4x8 = vpx_sub_pixel_variance4x8_sse2; - if (flags & HAS_SSSE3) vpx_sub_pixel_variance4x8 = vpx_sub_pixel_variance4x8_ssse3; - vpx_sub_pixel_variance64x32 = vpx_sub_pixel_variance64x32_c; - if (flags & HAS_SSE2) vpx_sub_pixel_variance64x32 = vpx_sub_pixel_variance64x32_sse2; - if (flags & HAS_SSSE3) vpx_sub_pixel_variance64x32 = vpx_sub_pixel_variance64x32_ssse3; - vpx_sub_pixel_variance64x64 = vpx_sub_pixel_variance64x64_c; - if (flags & HAS_SSE2) vpx_sub_pixel_variance64x64 = vpx_sub_pixel_variance64x64_sse2; - if (flags & HAS_SSSE3) vpx_sub_pixel_variance64x64 = vpx_sub_pixel_variance64x64_ssse3; - if (flags & HAS_AVX2) vpx_sub_pixel_variance64x64 = vpx_sub_pixel_variance64x64_avx2; - vpx_sub_pixel_variance8x16 = vpx_sub_pixel_variance8x16_c; - if (flags & HAS_SSE2) vpx_sub_pixel_variance8x16 = vpx_sub_pixel_variance8x16_sse2; - if (flags & HAS_SSSE3) vpx_sub_pixel_variance8x16 = vpx_sub_pixel_variance8x16_ssse3; - vpx_sub_pixel_variance8x4 = vpx_sub_pixel_variance8x4_c; - if (flags & HAS_SSE2) vpx_sub_pixel_variance8x4 = vpx_sub_pixel_variance8x4_sse2; - if (flags & HAS_SSSE3) vpx_sub_pixel_variance8x4 = vpx_sub_pixel_variance8x4_ssse3; - vpx_sub_pixel_variance8x8 = vpx_sub_pixel_variance8x8_c; - if (flags & HAS_SSE2) vpx_sub_pixel_variance8x8 = vpx_sub_pixel_variance8x8_sse2; - if (flags & HAS_SSSE3) vpx_sub_pixel_variance8x8 = vpx_sub_pixel_variance8x8_ssse3; - vpx_subtract_block = vpx_subtract_block_c; - if (flags & HAS_SSE2) vpx_subtract_block = vpx_subtract_block_sse2; - vpx_sum_squares_2d_i16 = vpx_sum_squares_2d_i16_c; - if (flags & HAS_SSE2) vpx_sum_squares_2d_i16 = vpx_sum_squares_2d_i16_sse2; - vpx_tm_predictor_16x16 = vpx_tm_predictor_16x16_c; - if (flags & HAS_SSE2) vpx_tm_predictor_16x16 = vpx_tm_predictor_16x16_sse2; - vpx_tm_predictor_32x32 = vpx_tm_predictor_32x32_c; - if (flags & HAS_SSE2) vpx_tm_predictor_32x32 = vpx_tm_predictor_32x32_sse2; - vpx_tm_predictor_4x4 = vpx_tm_predictor_4x4_c; - if (flags & HAS_SSE2) vpx_tm_predictor_4x4 = vpx_tm_predictor_4x4_sse2; - vpx_tm_predictor_8x8 = vpx_tm_predictor_8x8_c; - if (flags & HAS_SSE2) vpx_tm_predictor_8x8 = vpx_tm_predictor_8x8_sse2; - vpx_v_predictor_16x16 = vpx_v_predictor_16x16_c; - if (flags & HAS_SSE2) vpx_v_predictor_16x16 = vpx_v_predictor_16x16_sse2; - vpx_v_predictor_32x32 = vpx_v_predictor_32x32_c; - if (flags & HAS_SSE2) vpx_v_predictor_32x32 = vpx_v_predictor_32x32_sse2; - vpx_v_predictor_4x4 = vpx_v_predictor_4x4_c; - if (flags & HAS_SSE2) vpx_v_predictor_4x4 = vpx_v_predictor_4x4_sse2; - vpx_v_predictor_8x8 = vpx_v_predictor_8x8_c; - if (flags & HAS_SSE2) vpx_v_predictor_8x8 = vpx_v_predictor_8x8_sse2; - vpx_variance16x16 = vpx_variance16x16_c; - if (flags & HAS_SSE2) vpx_variance16x16 = vpx_variance16x16_sse2; - if (flags & HAS_AVX2) vpx_variance16x16 = vpx_variance16x16_avx2; - vpx_variance16x32 = vpx_variance16x32_c; - if (flags & HAS_SSE2) vpx_variance16x32 = vpx_variance16x32_sse2; - vpx_variance16x8 = vpx_variance16x8_c; - if (flags & HAS_SSE2) vpx_variance16x8 = vpx_variance16x8_sse2; - vpx_variance32x16 = vpx_variance32x16_c; - if (flags & HAS_SSE2) vpx_variance32x16 = vpx_variance32x16_sse2; - if (flags & HAS_AVX2) vpx_variance32x16 = vpx_variance32x16_avx2; - vpx_variance32x32 = vpx_variance32x32_c; - if (flags & HAS_SSE2) vpx_variance32x32 = vpx_variance32x32_sse2; - if (flags & HAS_AVX2) vpx_variance32x32 = vpx_variance32x32_avx2; - vpx_variance32x64 = vpx_variance32x64_c; - if (flags & HAS_SSE2) vpx_variance32x64 = vpx_variance32x64_sse2; - vpx_variance4x4 = vpx_variance4x4_c; - if (flags & HAS_SSE2) vpx_variance4x4 = vpx_variance4x4_sse2; - vpx_variance4x8 = vpx_variance4x8_c; - if (flags & HAS_SSE2) vpx_variance4x8 = vpx_variance4x8_sse2; - vpx_variance64x32 = vpx_variance64x32_c; - if (flags & HAS_SSE2) vpx_variance64x32 = vpx_variance64x32_sse2; - if (flags & HAS_AVX2) vpx_variance64x32 = vpx_variance64x32_avx2; - vpx_variance64x64 = vpx_variance64x64_c; - if (flags & HAS_SSE2) vpx_variance64x64 = vpx_variance64x64_sse2; - if (flags & HAS_AVX2) vpx_variance64x64 = vpx_variance64x64_avx2; - vpx_variance8x16 = vpx_variance8x16_c; - if (flags & HAS_SSE2) vpx_variance8x16 = vpx_variance8x16_sse2; - vpx_variance8x4 = vpx_variance8x4_c; - if (flags & HAS_SSE2) vpx_variance8x4 = vpx_variance8x4_sse2; - vpx_variance8x8 = vpx_variance8x8_c; - if (flags & HAS_SSE2) vpx_variance8x8 = vpx_variance8x8_sse2; - vpx_vector_var = vpx_vector_var_c; - if (flags & HAS_SSE2) vpx_vector_var = vpx_vector_var_sse2; -} -#endif - -#ifdef __cplusplus -} // extern "C" -#endif - -#endif diff --git a/WebRtc.NET/include/third_party/libvpx/source/config/win/ia32/vpx_scale_rtcd.h b/WebRtc.NET/include/third_party/libvpx/source/config/win/ia32/vpx_scale_rtcd.h deleted file mode 100644 index ddf7d01c..00000000 --- a/WebRtc.NET/include/third_party/libvpx/source/config/win/ia32/vpx_scale_rtcd.h +++ /dev/null @@ -1,69 +0,0 @@ -#ifndef VPX_SCALE_RTCD_H_ -#define VPX_SCALE_RTCD_H_ - -#ifdef RTCD_C -#define RTCD_EXTERN -#else -#define RTCD_EXTERN extern -#endif - -struct yv12_buffer_config; - -#ifdef __cplusplus -extern "C" { -#endif - -void vp8_horizontal_line_2_1_scale_c(const unsigned char *source, unsigned int source_width, unsigned char *dest, unsigned int dest_width); -#define vp8_horizontal_line_2_1_scale vp8_horizontal_line_2_1_scale_c - -void vp8_horizontal_line_5_3_scale_c(const unsigned char *source, unsigned int source_width, unsigned char *dest, unsigned int dest_width); -#define vp8_horizontal_line_5_3_scale vp8_horizontal_line_5_3_scale_c - -void vp8_horizontal_line_5_4_scale_c(const unsigned char *source, unsigned int source_width, unsigned char *dest, unsigned int dest_width); -#define vp8_horizontal_line_5_4_scale vp8_horizontal_line_5_4_scale_c - -void vp8_vertical_band_2_1_scale_c(unsigned char *source, unsigned int src_pitch, unsigned char *dest, unsigned int dest_pitch, unsigned int dest_width); -#define vp8_vertical_band_2_1_scale vp8_vertical_band_2_1_scale_c - -void vp8_vertical_band_2_1_scale_i_c(unsigned char *source, unsigned int src_pitch, unsigned char *dest, unsigned int dest_pitch, unsigned int dest_width); -#define vp8_vertical_band_2_1_scale_i vp8_vertical_band_2_1_scale_i_c - -void vp8_vertical_band_5_3_scale_c(unsigned char *source, unsigned int src_pitch, unsigned char *dest, unsigned int dest_pitch, unsigned int dest_width); -#define vp8_vertical_band_5_3_scale vp8_vertical_band_5_3_scale_c - -void vp8_vertical_band_5_4_scale_c(unsigned char *source, unsigned int src_pitch, unsigned char *dest, unsigned int dest_pitch, unsigned int dest_width); -#define vp8_vertical_band_5_4_scale vp8_vertical_band_5_4_scale_c - -void vp8_yv12_copy_frame_c(const struct yv12_buffer_config *src_ybc, struct yv12_buffer_config *dst_ybc); -#define vp8_yv12_copy_frame vp8_yv12_copy_frame_c - -void vp8_yv12_extend_frame_borders_c(struct yv12_buffer_config *ybf); -#define vp8_yv12_extend_frame_borders vp8_yv12_extend_frame_borders_c - -void vpx_extend_frame_borders_c(struct yv12_buffer_config *ybf); -#define vpx_extend_frame_borders vpx_extend_frame_borders_c - -void vpx_extend_frame_inner_borders_c(struct yv12_buffer_config *ybf); -#define vpx_extend_frame_inner_borders vpx_extend_frame_inner_borders_c - -void vpx_yv12_copy_y_c(const struct yv12_buffer_config *src_ybc, struct yv12_buffer_config *dst_ybc); -#define vpx_yv12_copy_y vpx_yv12_copy_y_c - -void vpx_scale_rtcd(void); - -#ifdef RTCD_C -#include "vpx_ports/x86.h" -static void setup_rtcd_internal(void) -{ - int flags = x86_simd_caps(); - - (void)flags; - -} -#endif - -#ifdef __cplusplus -} // extern "C" -#endif - -#endif diff --git a/WebRtc.NET/include/third_party/libvpx/source/config/win/x64/vp8_rtcd.h b/WebRtc.NET/include/third_party/libvpx/source/config/win/x64/vp8_rtcd.h deleted file mode 100644 index 8dcc9eb2..00000000 --- a/WebRtc.NET/include/third_party/libvpx/source/config/win/x64/vp8_rtcd.h +++ /dev/null @@ -1,260 +0,0 @@ -#ifndef VP8_RTCD_H_ -#define VP8_RTCD_H_ - -#ifdef RTCD_C -#define RTCD_EXTERN -#else -#define RTCD_EXTERN extern -#endif - -/* - * VP8 - */ - -struct blockd; -struct macroblockd; -struct loop_filter_info; - -/* Encoder forward decls */ -struct block; -struct macroblock; -struct variance_vtable; -union int_mv; -struct yv12_buffer_config; - -#ifdef __cplusplus -extern "C" { -#endif - -void vp8_bilinear_predict16x16_c(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch); -void vp8_bilinear_predict16x16_sse2(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch); -void vp8_bilinear_predict16x16_ssse3(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch); -RTCD_EXTERN void (*vp8_bilinear_predict16x16)(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch); - -void vp8_bilinear_predict4x4_c(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch); -void vp8_bilinear_predict4x4_mmx(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch); -#define vp8_bilinear_predict4x4 vp8_bilinear_predict4x4_mmx - -void vp8_bilinear_predict8x4_c(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch); -void vp8_bilinear_predict8x4_mmx(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch); -#define vp8_bilinear_predict8x4 vp8_bilinear_predict8x4_mmx - -void vp8_bilinear_predict8x8_c(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch); -void vp8_bilinear_predict8x8_sse2(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch); -void vp8_bilinear_predict8x8_ssse3(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch); -RTCD_EXTERN void (*vp8_bilinear_predict8x8)(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch); - -void vp8_blend_b_c(unsigned char *y, unsigned char *u, unsigned char *v, int y1, int u1, int v1, int alpha, int stride); -#define vp8_blend_b vp8_blend_b_c - -void vp8_blend_mb_inner_c(unsigned char *y, unsigned char *u, unsigned char *v, int y1, int u1, int v1, int alpha, int stride); -#define vp8_blend_mb_inner vp8_blend_mb_inner_c - -void vp8_blend_mb_outer_c(unsigned char *y, unsigned char *u, unsigned char *v, int y1, int u1, int v1, int alpha, int stride); -#define vp8_blend_mb_outer vp8_blend_mb_outer_c - -int vp8_block_error_c(short *coeff, short *dqcoeff); -int vp8_block_error_sse2(short *coeff, short *dqcoeff); -#define vp8_block_error vp8_block_error_sse2 - -void vp8_copy32xn_c(const unsigned char *src_ptr, int source_stride, unsigned char *dst_ptr, int dst_stride, int n); -void vp8_copy32xn_sse2(const unsigned char *src_ptr, int source_stride, unsigned char *dst_ptr, int dst_stride, int n); -void vp8_copy32xn_sse3(const unsigned char *src_ptr, int source_stride, unsigned char *dst_ptr, int dst_stride, int n); -RTCD_EXTERN void (*vp8_copy32xn)(const unsigned char *src_ptr, int source_stride, unsigned char *dst_ptr, int dst_stride, int n); - -void vp8_copy_mem16x16_c(unsigned char *src, int src_pitch, unsigned char *dst, int dst_pitch); -void vp8_copy_mem16x16_sse2(unsigned char *src, int src_pitch, unsigned char *dst, int dst_pitch); -#define vp8_copy_mem16x16 vp8_copy_mem16x16_sse2 - -void vp8_copy_mem8x4_c(unsigned char *src, int src_pitch, unsigned char *dst, int dst_pitch); -void vp8_copy_mem8x4_mmx(unsigned char *src, int src_pitch, unsigned char *dst, int dst_pitch); -#define vp8_copy_mem8x4 vp8_copy_mem8x4_mmx - -void vp8_copy_mem8x8_c(unsigned char *src, int src_pitch, unsigned char *dst, int dst_pitch); -void vp8_copy_mem8x8_mmx(unsigned char *src, int src_pitch, unsigned char *dst, int dst_pitch); -#define vp8_copy_mem8x8 vp8_copy_mem8x8_mmx - -void vp8_dc_only_idct_add_c(short input, unsigned char *pred, int pred_stride, unsigned char *dst, int dst_stride); -void vp8_dc_only_idct_add_mmx(short input, unsigned char *pred, int pred_stride, unsigned char *dst, int dst_stride); -#define vp8_dc_only_idct_add vp8_dc_only_idct_add_mmx - -int vp8_denoiser_filter_c(unsigned char *mc_running_avg_y, int mc_avg_y_stride, unsigned char *running_avg_y, int avg_y_stride, unsigned char *sig, int sig_stride, unsigned int motion_magnitude, int increase_denoising); -int vp8_denoiser_filter_sse2(unsigned char *mc_running_avg_y, int mc_avg_y_stride, unsigned char *running_avg_y, int avg_y_stride, unsigned char *sig, int sig_stride, unsigned int motion_magnitude, int increase_denoising); -#define vp8_denoiser_filter vp8_denoiser_filter_sse2 - -int vp8_denoiser_filter_uv_c(unsigned char *mc_running_avg, int mc_avg_stride, unsigned char *running_avg, int avg_stride, unsigned char *sig, int sig_stride, unsigned int motion_magnitude, int increase_denoising); -int vp8_denoiser_filter_uv_sse2(unsigned char *mc_running_avg, int mc_avg_stride, unsigned char *running_avg, int avg_stride, unsigned char *sig, int sig_stride, unsigned int motion_magnitude, int increase_denoising); -#define vp8_denoiser_filter_uv vp8_denoiser_filter_uv_sse2 - -void vp8_dequant_idct_add_c(short *input, short *dq, unsigned char *output, int stride); -void vp8_dequant_idct_add_mmx(short *input, short *dq, unsigned char *output, int stride); -#define vp8_dequant_idct_add vp8_dequant_idct_add_mmx - -void vp8_dequant_idct_add_uv_block_c(short *q, short *dq, unsigned char *dst_u, unsigned char *dst_v, int stride, char *eobs); -void vp8_dequant_idct_add_uv_block_sse2(short *q, short *dq, unsigned char *dst_u, unsigned char *dst_v, int stride, char *eobs); -#define vp8_dequant_idct_add_uv_block vp8_dequant_idct_add_uv_block_sse2 - -void vp8_dequant_idct_add_y_block_c(short *q, short *dq, unsigned char *dst, int stride, char *eobs); -void vp8_dequant_idct_add_y_block_sse2(short *q, short *dq, unsigned char *dst, int stride, char *eobs); -#define vp8_dequant_idct_add_y_block vp8_dequant_idct_add_y_block_sse2 - -void vp8_dequantize_b_c(struct blockd*, short *dqc); -void vp8_dequantize_b_mmx(struct blockd*, short *dqc); -#define vp8_dequantize_b vp8_dequantize_b_mmx - -int vp8_diamond_search_sad_c(struct macroblock *x, struct block *b, struct blockd *d, union int_mv *ref_mv, union int_mv *best_mv, int search_param, int sad_per_bit, int *num00, struct variance_vtable *fn_ptr, int *mvcost[2], union int_mv *center_mv); -int vp8_diamond_search_sadx4(struct macroblock *x, struct block *b, struct blockd *d, union int_mv *ref_mv, union int_mv *best_mv, int search_param, int sad_per_bit, int *num00, struct variance_vtable *fn_ptr, int *mvcost[2], union int_mv *center_mv); -#define vp8_diamond_search_sad vp8_diamond_search_sadx4 - -void vp8_fast_quantize_b_c(struct block *, struct blockd *); -void vp8_fast_quantize_b_sse2(struct block *, struct blockd *); -void vp8_fast_quantize_b_ssse3(struct block *, struct blockd *); -RTCD_EXTERN void (*vp8_fast_quantize_b)(struct block *, struct blockd *); - -void vp8_filter_by_weight16x16_c(unsigned char *src, int src_stride, unsigned char *dst, int dst_stride, int src_weight); -void vp8_filter_by_weight16x16_sse2(unsigned char *src, int src_stride, unsigned char *dst, int dst_stride, int src_weight); -#define vp8_filter_by_weight16x16 vp8_filter_by_weight16x16_sse2 - -void vp8_filter_by_weight4x4_c(unsigned char *src, int src_stride, unsigned char *dst, int dst_stride, int src_weight); -#define vp8_filter_by_weight4x4 vp8_filter_by_weight4x4_c - -void vp8_filter_by_weight8x8_c(unsigned char *src, int src_stride, unsigned char *dst, int dst_stride, int src_weight); -void vp8_filter_by_weight8x8_sse2(unsigned char *src, int src_stride, unsigned char *dst, int dst_stride, int src_weight); -#define vp8_filter_by_weight8x8 vp8_filter_by_weight8x8_sse2 - -int vp8_full_search_sad_c(struct macroblock *x, struct block *b, struct blockd *d, union int_mv *ref_mv, int sad_per_bit, int distance, struct variance_vtable *fn_ptr, int *mvcost[2], union int_mv *center_mv); -int vp8_full_search_sadx3(struct macroblock *x, struct block *b, struct blockd *d, union int_mv *ref_mv, int sad_per_bit, int distance, struct variance_vtable *fn_ptr, int *mvcost[2], union int_mv *center_mv); -int vp8_full_search_sadx8(struct macroblock *x, struct block *b, struct blockd *d, union int_mv *ref_mv, int sad_per_bit, int distance, struct variance_vtable *fn_ptr, int *mvcost[2], union int_mv *center_mv); -RTCD_EXTERN int (*vp8_full_search_sad)(struct macroblock *x, struct block *b, struct blockd *d, union int_mv *ref_mv, int sad_per_bit, int distance, struct variance_vtable *fn_ptr, int *mvcost[2], union int_mv *center_mv); - -void vp8_loop_filter_bh_c(unsigned char *y, unsigned char *u, unsigned char *v, int ystride, int uv_stride, struct loop_filter_info *lfi); -void vp8_loop_filter_bh_sse2(unsigned char *y, unsigned char *u, unsigned char *v, int ystride, int uv_stride, struct loop_filter_info *lfi); -#define vp8_loop_filter_bh vp8_loop_filter_bh_sse2 - -void vp8_loop_filter_bv_c(unsigned char *y, unsigned char *u, unsigned char *v, int ystride, int uv_stride, struct loop_filter_info *lfi); -void vp8_loop_filter_bv_sse2(unsigned char *y, unsigned char *u, unsigned char *v, int ystride, int uv_stride, struct loop_filter_info *lfi); -#define vp8_loop_filter_bv vp8_loop_filter_bv_sse2 - -void vp8_loop_filter_mbh_c(unsigned char *y, unsigned char *u, unsigned char *v, int ystride, int uv_stride, struct loop_filter_info *lfi); -void vp8_loop_filter_mbh_sse2(unsigned char *y, unsigned char *u, unsigned char *v, int ystride, int uv_stride, struct loop_filter_info *lfi); -#define vp8_loop_filter_mbh vp8_loop_filter_mbh_sse2 - -void vp8_loop_filter_mbv_c(unsigned char *y, unsigned char *u, unsigned char *v, int ystride, int uv_stride, struct loop_filter_info *lfi); -void vp8_loop_filter_mbv_sse2(unsigned char *y, unsigned char *u, unsigned char *v, int ystride, int uv_stride, struct loop_filter_info *lfi); -#define vp8_loop_filter_mbv vp8_loop_filter_mbv_sse2 - -void vp8_loop_filter_bhs_c(unsigned char *y, int ystride, const unsigned char *blimit); -void vp8_loop_filter_bhs_sse2(unsigned char *y, int ystride, const unsigned char *blimit); -#define vp8_loop_filter_simple_bh vp8_loop_filter_bhs_sse2 - -void vp8_loop_filter_bvs_c(unsigned char *y, int ystride, const unsigned char *blimit); -void vp8_loop_filter_bvs_sse2(unsigned char *y, int ystride, const unsigned char *blimit); -#define vp8_loop_filter_simple_bv vp8_loop_filter_bvs_sse2 - -void vp8_loop_filter_simple_horizontal_edge_c(unsigned char *y, int ystride, const unsigned char *blimit); -void vp8_loop_filter_simple_horizontal_edge_sse2(unsigned char *y, int ystride, const unsigned char *blimit); -#define vp8_loop_filter_simple_mbh vp8_loop_filter_simple_horizontal_edge_sse2 - -void vp8_loop_filter_simple_vertical_edge_c(unsigned char *y, int ystride, const unsigned char *blimit); -void vp8_loop_filter_simple_vertical_edge_sse2(unsigned char *y, int ystride, const unsigned char *blimit); -#define vp8_loop_filter_simple_mbv vp8_loop_filter_simple_vertical_edge_sse2 - -int vp8_mbblock_error_c(struct macroblock *mb, int dc); -int vp8_mbblock_error_sse2(struct macroblock *mb, int dc); -#define vp8_mbblock_error vp8_mbblock_error_sse2 - -int vp8_mbuverror_c(struct macroblock *mb); -int vp8_mbuverror_sse2(struct macroblock *mb); -#define vp8_mbuverror vp8_mbuverror_sse2 - -int vp8_refining_search_sad_c(struct macroblock *x, struct block *b, struct blockd *d, union int_mv *ref_mv, int sad_per_bit, int distance, struct variance_vtable *fn_ptr, int *mvcost[2], union int_mv *center_mv); -int vp8_refining_search_sadx4(struct macroblock *x, struct block *b, struct blockd *d, union int_mv *ref_mv, int sad_per_bit, int distance, struct variance_vtable *fn_ptr, int *mvcost[2], union int_mv *center_mv); -#define vp8_refining_search_sad vp8_refining_search_sadx4 - -void vp8_regular_quantize_b_c(struct block *, struct blockd *); -void vp8_regular_quantize_b_sse2(struct block *, struct blockd *); -void vp8_regular_quantize_b_sse4_1(struct block *, struct blockd *); -RTCD_EXTERN void (*vp8_regular_quantize_b)(struct block *, struct blockd *); - -void vp8_short_fdct4x4_c(short *input, short *output, int pitch); -void vp8_short_fdct4x4_sse2(short *input, short *output, int pitch); -#define vp8_short_fdct4x4 vp8_short_fdct4x4_sse2 - -void vp8_short_fdct8x4_c(short *input, short *output, int pitch); -void vp8_short_fdct8x4_sse2(short *input, short *output, int pitch); -#define vp8_short_fdct8x4 vp8_short_fdct8x4_sse2 - -void vp8_short_idct4x4llm_c(short *input, unsigned char *pred, int pitch, unsigned char *dst, int dst_stride); -void vp8_short_idct4x4llm_mmx(short *input, unsigned char *pred, int pitch, unsigned char *dst, int dst_stride); -#define vp8_short_idct4x4llm vp8_short_idct4x4llm_mmx - -void vp8_short_inv_walsh4x4_c(short *input, short *output); -void vp8_short_inv_walsh4x4_sse2(short *input, short *output); -#define vp8_short_inv_walsh4x4 vp8_short_inv_walsh4x4_sse2 - -void vp8_short_inv_walsh4x4_1_c(short *input, short *output); -#define vp8_short_inv_walsh4x4_1 vp8_short_inv_walsh4x4_1_c - -void vp8_short_walsh4x4_c(short *input, short *output, int pitch); -void vp8_short_walsh4x4_sse2(short *input, short *output, int pitch); -#define vp8_short_walsh4x4 vp8_short_walsh4x4_sse2 - -void vp8_sixtap_predict16x16_c(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch); -void vp8_sixtap_predict16x16_sse2(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch); -void vp8_sixtap_predict16x16_ssse3(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch); -RTCD_EXTERN void (*vp8_sixtap_predict16x16)(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch); - -void vp8_sixtap_predict4x4_c(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch); -void vp8_sixtap_predict4x4_mmx(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch); -void vp8_sixtap_predict4x4_ssse3(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch); -RTCD_EXTERN void (*vp8_sixtap_predict4x4)(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch); - -void vp8_sixtap_predict8x4_c(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch); -void vp8_sixtap_predict8x4_sse2(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch); -void vp8_sixtap_predict8x4_ssse3(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch); -RTCD_EXTERN void (*vp8_sixtap_predict8x4)(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch); - -void vp8_sixtap_predict8x8_c(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch); -void vp8_sixtap_predict8x8_sse2(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch); -void vp8_sixtap_predict8x8_ssse3(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch); -RTCD_EXTERN void (*vp8_sixtap_predict8x8)(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch); - -void vp8_rtcd(void); - -#ifdef RTCD_C -#include "vpx_ports/x86.h" -static void setup_rtcd_internal(void) -{ - int flags = x86_simd_caps(); - - (void)flags; - - vp8_bilinear_predict16x16 = vp8_bilinear_predict16x16_sse2; - if (flags & HAS_SSSE3) vp8_bilinear_predict16x16 = vp8_bilinear_predict16x16_ssse3; - vp8_bilinear_predict8x8 = vp8_bilinear_predict8x8_sse2; - if (flags & HAS_SSSE3) vp8_bilinear_predict8x8 = vp8_bilinear_predict8x8_ssse3; - vp8_copy32xn = vp8_copy32xn_sse2; - if (flags & HAS_SSE3) vp8_copy32xn = vp8_copy32xn_sse3; - vp8_fast_quantize_b = vp8_fast_quantize_b_sse2; - if (flags & HAS_SSSE3) vp8_fast_quantize_b = vp8_fast_quantize_b_ssse3; - vp8_full_search_sad = vp8_full_search_sad_c; - if (flags & HAS_SSE3) vp8_full_search_sad = vp8_full_search_sadx3; - if (flags & HAS_SSE4_1) vp8_full_search_sad = vp8_full_search_sadx8; - vp8_regular_quantize_b = vp8_regular_quantize_b_sse2; - if (flags & HAS_SSE4_1) vp8_regular_quantize_b = vp8_regular_quantize_b_sse4_1; - vp8_sixtap_predict16x16 = vp8_sixtap_predict16x16_sse2; - if (flags & HAS_SSSE3) vp8_sixtap_predict16x16 = vp8_sixtap_predict16x16_ssse3; - vp8_sixtap_predict4x4 = vp8_sixtap_predict4x4_mmx; - if (flags & HAS_SSSE3) vp8_sixtap_predict4x4 = vp8_sixtap_predict4x4_ssse3; - vp8_sixtap_predict8x4 = vp8_sixtap_predict8x4_sse2; - if (flags & HAS_SSSE3) vp8_sixtap_predict8x4 = vp8_sixtap_predict8x4_ssse3; - vp8_sixtap_predict8x8 = vp8_sixtap_predict8x8_sse2; - if (flags & HAS_SSSE3) vp8_sixtap_predict8x8 = vp8_sixtap_predict8x8_ssse3; -} -#endif - -#ifdef __cplusplus -} // extern "C" -#endif - -#endif diff --git a/WebRtc.NET/include/third_party/libvpx/source/config/win/x64/vp9_rtcd.h b/WebRtc.NET/include/third_party/libvpx/source/config/win/x64/vp9_rtcd.h deleted file mode 100644 index 072f858e..00000000 --- a/WebRtc.NET/include/third_party/libvpx/source/config/win/x64/vp9_rtcd.h +++ /dev/null @@ -1,172 +0,0 @@ -#ifndef VP9_RTCD_H_ -#define VP9_RTCD_H_ - -#ifdef RTCD_C -#define RTCD_EXTERN -#else -#define RTCD_EXTERN extern -#endif - -/* - * VP9 - */ - -#include "vpx/vpx_integer.h" -#include "vp9/common/vp9_common.h" -#include "vp9/common/vp9_enums.h" - -struct macroblockd; - -/* Encoder forward decls */ -struct macroblock; -struct vp9_variance_vtable; -struct search_site_config; -struct mv; -union int_mv; -struct yv12_buffer_config; - -#ifdef __cplusplus -extern "C" { -#endif - -int64_t vp9_block_error_c(const tran_low_t *coeff, const tran_low_t *dqcoeff, intptr_t block_size, int64_t *ssz); -#define vp9_block_error vp9_block_error_c - -int vp9_denoiser_filter_c(const uint8_t *sig, int sig_stride, const uint8_t *mc_avg, int mc_avg_stride, uint8_t *avg, int avg_stride, int increase_denoising, BLOCK_SIZE bs, int motion_magnitude); -int vp9_denoiser_filter_sse2(const uint8_t *sig, int sig_stride, const uint8_t *mc_avg, int mc_avg_stride, uint8_t *avg, int avg_stride, int increase_denoising, BLOCK_SIZE bs, int motion_magnitude); -#define vp9_denoiser_filter vp9_denoiser_filter_sse2 - -int vp9_diamond_search_sad_c(const struct macroblock *x, const struct search_site_config *cfg, struct mv *ref_mv, struct mv *best_mv, int search_param, int sad_per_bit, int *num00, const struct vp9_variance_vtable *fn_ptr, const struct mv *center_mv); -int vp9_diamond_search_sad_avx(const struct macroblock *x, const struct search_site_config *cfg, struct mv *ref_mv, struct mv *best_mv, int search_param, int sad_per_bit, int *num00, const struct vp9_variance_vtable *fn_ptr, const struct mv *center_mv); -RTCD_EXTERN int (*vp9_diamond_search_sad)(const struct macroblock *x, const struct search_site_config *cfg, struct mv *ref_mv, struct mv *best_mv, int search_param, int sad_per_bit, int *num00, const struct vp9_variance_vtable *fn_ptr, const struct mv *center_mv); - -void vp9_fdct8x8_quant_c(const int16_t *input, int stride, tran_low_t *coeff_ptr, intptr_t n_coeffs, int skip_block, const int16_t *zbin_ptr, const int16_t *round_ptr, const int16_t *quant_ptr, const int16_t *quant_shift_ptr, tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr, const int16_t *dequant_ptr, uint16_t *eob_ptr, const int16_t *scan, const int16_t *iscan); -void vp9_fdct8x8_quant_ssse3(const int16_t *input, int stride, tran_low_t *coeff_ptr, intptr_t n_coeffs, int skip_block, const int16_t *zbin_ptr, const int16_t *round_ptr, const int16_t *quant_ptr, const int16_t *quant_shift_ptr, tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr, const int16_t *dequant_ptr, uint16_t *eob_ptr, const int16_t *scan, const int16_t *iscan); -RTCD_EXTERN void (*vp9_fdct8x8_quant)(const int16_t *input, int stride, tran_low_t *coeff_ptr, intptr_t n_coeffs, int skip_block, const int16_t *zbin_ptr, const int16_t *round_ptr, const int16_t *quant_ptr, const int16_t *quant_shift_ptr, tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr, const int16_t *dequant_ptr, uint16_t *eob_ptr, const int16_t *scan, const int16_t *iscan); - -void vp9_fht16x16_c(const int16_t *input, tran_low_t *output, int stride, int tx_type); -void vp9_fht16x16_sse2(const int16_t *input, tran_low_t *output, int stride, int tx_type); -#define vp9_fht16x16 vp9_fht16x16_sse2 - -void vp9_fht4x4_c(const int16_t *input, tran_low_t *output, int stride, int tx_type); -void vp9_fht4x4_sse2(const int16_t *input, tran_low_t *output, int stride, int tx_type); -#define vp9_fht4x4 vp9_fht4x4_sse2 - -void vp9_fht8x8_c(const int16_t *input, tran_low_t *output, int stride, int tx_type); -void vp9_fht8x8_sse2(const int16_t *input, tran_low_t *output, int stride, int tx_type); -#define vp9_fht8x8 vp9_fht8x8_sse2 - -void vp9_filter_by_weight16x16_c(const uint8_t *src, int src_stride, uint8_t *dst, int dst_stride, int src_weight); -void vp9_filter_by_weight16x16_sse2(const uint8_t *src, int src_stride, uint8_t *dst, int dst_stride, int src_weight); -#define vp9_filter_by_weight16x16 vp9_filter_by_weight16x16_sse2 - -void vp9_filter_by_weight8x8_c(const uint8_t *src, int src_stride, uint8_t *dst, int dst_stride, int src_weight); -void vp9_filter_by_weight8x8_sse2(const uint8_t *src, int src_stride, uint8_t *dst, int dst_stride, int src_weight); -#define vp9_filter_by_weight8x8 vp9_filter_by_weight8x8_sse2 - -int vp9_full_search_sad_c(const struct macroblock *x, const struct mv *ref_mv, int sad_per_bit, int distance, const struct vp9_variance_vtable *fn_ptr, const struct mv *center_mv, struct mv *best_mv); -int vp9_full_search_sadx3(const struct macroblock *x, const struct mv *ref_mv, int sad_per_bit, int distance, const struct vp9_variance_vtable *fn_ptr, const struct mv *center_mv, struct mv *best_mv); -int vp9_full_search_sadx8(const struct macroblock *x, const struct mv *ref_mv, int sad_per_bit, int distance, const struct vp9_variance_vtable *fn_ptr, const struct mv *center_mv, struct mv *best_mv); -RTCD_EXTERN int (*vp9_full_search_sad)(const struct macroblock *x, const struct mv *ref_mv, int sad_per_bit, int distance, const struct vp9_variance_vtable *fn_ptr, const struct mv *center_mv, struct mv *best_mv); - -void vp9_fwht4x4_c(const int16_t *input, tran_low_t *output, int stride); -void vp9_fwht4x4_sse2(const int16_t *input, tran_low_t *output, int stride); -#define vp9_fwht4x4 vp9_fwht4x4_sse2 - -int64_t vp9_highbd_block_error_c(const tran_low_t *coeff, const tran_low_t *dqcoeff, intptr_t block_size, int64_t *ssz, int bd); -int64_t vp9_highbd_block_error_sse2(const tran_low_t *coeff, const tran_low_t *dqcoeff, intptr_t block_size, int64_t *ssz, int bd); -#define vp9_highbd_block_error vp9_highbd_block_error_sse2 - -int64_t vp9_highbd_block_error_8bit_c(const tran_low_t *coeff, const tran_low_t *dqcoeff, intptr_t block_size, int64_t *ssz); -int64_t vp9_highbd_block_error_8bit_sse2(const tran_low_t *coeff, const tran_low_t *dqcoeff, intptr_t block_size, int64_t *ssz); -int64_t vp9_highbd_block_error_8bit_avx(const tran_low_t *coeff, const tran_low_t *dqcoeff, intptr_t block_size, int64_t *ssz); -RTCD_EXTERN int64_t (*vp9_highbd_block_error_8bit)(const tran_low_t *coeff, const tran_low_t *dqcoeff, intptr_t block_size, int64_t *ssz); - -void vp9_highbd_fht16x16_c(const int16_t *input, tran_low_t *output, int stride, int tx_type); -#define vp9_highbd_fht16x16 vp9_highbd_fht16x16_c - -void vp9_highbd_fht4x4_c(const int16_t *input, tran_low_t *output, int stride, int tx_type); -#define vp9_highbd_fht4x4 vp9_highbd_fht4x4_c - -void vp9_highbd_fht8x8_c(const int16_t *input, tran_low_t *output, int stride, int tx_type); -#define vp9_highbd_fht8x8 vp9_highbd_fht8x8_c - -void vp9_highbd_fwht4x4_c(const int16_t *input, tran_low_t *output, int stride); -#define vp9_highbd_fwht4x4 vp9_highbd_fwht4x4_c - -void vp9_highbd_iht16x16_256_add_c(const tran_low_t *input, uint8_t *output, int pitch, int tx_type, int bd); -#define vp9_highbd_iht16x16_256_add vp9_highbd_iht16x16_256_add_c - -void vp9_highbd_iht4x4_16_add_c(const tran_low_t *input, uint8_t *dest, int stride, int tx_type, int bd); -#define vp9_highbd_iht4x4_16_add vp9_highbd_iht4x4_16_add_c - -void vp9_highbd_iht8x8_64_add_c(const tran_low_t *input, uint8_t *dest, int stride, int tx_type, int bd); -#define vp9_highbd_iht8x8_64_add vp9_highbd_iht8x8_64_add_c - -void vp9_highbd_mbpost_proc_across_ip_c(uint16_t *src, int pitch, int rows, int cols, int flimit); -#define vp9_highbd_mbpost_proc_across_ip vp9_highbd_mbpost_proc_across_ip_c - -void vp9_highbd_mbpost_proc_down_c(uint16_t *dst, int pitch, int rows, int cols, int flimit); -#define vp9_highbd_mbpost_proc_down vp9_highbd_mbpost_proc_down_c - -void vp9_highbd_post_proc_down_and_across_c(const uint16_t *src_ptr, uint16_t *dst_ptr, int src_pixels_per_line, int dst_pixels_per_line, int rows, int cols, int flimit); -#define vp9_highbd_post_proc_down_and_across vp9_highbd_post_proc_down_and_across_c - -void vp9_highbd_quantize_fp_c(const tran_low_t *coeff_ptr, intptr_t n_coeffs, int skip_block, const int16_t *zbin_ptr, const int16_t *round_ptr, const int16_t *quant_ptr, const int16_t *quant_shift_ptr, tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr, const int16_t *dequant_ptr, uint16_t *eob_ptr, const int16_t *scan, const int16_t *iscan); -#define vp9_highbd_quantize_fp vp9_highbd_quantize_fp_c - -void vp9_highbd_quantize_fp_32x32_c(const tran_low_t *coeff_ptr, intptr_t n_coeffs, int skip_block, const int16_t *zbin_ptr, const int16_t *round_ptr, const int16_t *quant_ptr, const int16_t *quant_shift_ptr, tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr, const int16_t *dequant_ptr, uint16_t *eob_ptr, const int16_t *scan, const int16_t *iscan); -#define vp9_highbd_quantize_fp_32x32 vp9_highbd_quantize_fp_32x32_c - -void vp9_highbd_temporal_filter_apply_c(uint8_t *frame1, unsigned int stride, uint8_t *frame2, unsigned int block_width, unsigned int block_height, int strength, int filter_weight, unsigned int *accumulator, uint16_t *count); -#define vp9_highbd_temporal_filter_apply vp9_highbd_temporal_filter_apply_c - -void vp9_iht16x16_256_add_c(const tran_low_t *input, uint8_t *output, int pitch, int tx_type); -void vp9_iht16x16_256_add_sse2(const tran_low_t *input, uint8_t *output, int pitch, int tx_type); -#define vp9_iht16x16_256_add vp9_iht16x16_256_add_sse2 - -void vp9_iht4x4_16_add_c(const tran_low_t *input, uint8_t *dest, int stride, int tx_type); -void vp9_iht4x4_16_add_sse2(const tran_low_t *input, uint8_t *dest, int stride, int tx_type); -#define vp9_iht4x4_16_add vp9_iht4x4_16_add_sse2 - -void vp9_iht8x8_64_add_c(const tran_low_t *input, uint8_t *dest, int stride, int tx_type); -void vp9_iht8x8_64_add_sse2(const tran_low_t *input, uint8_t *dest, int stride, int tx_type); -#define vp9_iht8x8_64_add vp9_iht8x8_64_add_sse2 - -void vp9_quantize_fp_c(const tran_low_t *coeff_ptr, intptr_t n_coeffs, int skip_block, const int16_t *zbin_ptr, const int16_t *round_ptr, const int16_t *quant_ptr, const int16_t *quant_shift_ptr, tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr, const int16_t *dequant_ptr, uint16_t *eob_ptr, const int16_t *scan, const int16_t *iscan); -#define vp9_quantize_fp vp9_quantize_fp_c - -void vp9_quantize_fp_32x32_c(const tran_low_t *coeff_ptr, intptr_t n_coeffs, int skip_block, const int16_t *zbin_ptr, const int16_t *round_ptr, const int16_t *quant_ptr, const int16_t *quant_shift_ptr, tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr, const int16_t *dequant_ptr, uint16_t *eob_ptr, const int16_t *scan, const int16_t *iscan); -#define vp9_quantize_fp_32x32 vp9_quantize_fp_32x32_c - -void vp9_temporal_filter_apply_c(uint8_t *frame1, unsigned int stride, uint8_t *frame2, unsigned int block_width, unsigned int block_height, int strength, int filter_weight, unsigned int *accumulator, uint16_t *count); -void vp9_temporal_filter_apply_sse2(uint8_t *frame1, unsigned int stride, uint8_t *frame2, unsigned int block_width, unsigned int block_height, int strength, int filter_weight, unsigned int *accumulator, uint16_t *count); -#define vp9_temporal_filter_apply vp9_temporal_filter_apply_sse2 - -void vp9_rtcd(void); - -#ifdef RTCD_C -#include "vpx_ports/x86.h" -static void setup_rtcd_internal(void) -{ - int flags = x86_simd_caps(); - - (void)flags; - - vp9_diamond_search_sad = vp9_diamond_search_sad_c; - if (flags & HAS_AVX) vp9_diamond_search_sad = vp9_diamond_search_sad_avx; - vp9_fdct8x8_quant = vp9_fdct8x8_quant_c; - if (flags & HAS_SSSE3) vp9_fdct8x8_quant = vp9_fdct8x8_quant_ssse3; - vp9_full_search_sad = vp9_full_search_sad_c; - if (flags & HAS_SSE3) vp9_full_search_sad = vp9_full_search_sadx3; - if (flags & HAS_SSE4_1) vp9_full_search_sad = vp9_full_search_sadx8; - vp9_highbd_block_error_8bit = vp9_highbd_block_error_8bit_sse2; - if (flags & HAS_AVX) vp9_highbd_block_error_8bit = vp9_highbd_block_error_8bit_avx; -} -#endif - -#ifdef __cplusplus -} // extern "C" -#endif - -#endif diff --git a/WebRtc.NET/include/third_party/libvpx/source/config/win/x64/vpx_config.h b/WebRtc.NET/include/third_party/libvpx/source/config/win/x64/vpx_config.h deleted file mode 100644 index c37c0123..00000000 --- a/WebRtc.NET/include/third_party/libvpx/source/config/win/x64/vpx_config.h +++ /dev/null @@ -1,94 +0,0 @@ -/* Copyright (c) 2011 The WebM project authors. All Rights Reserved. */ -/* */ -/* Use of this source code is governed by a BSD-style license */ -/* that can be found in the LICENSE file in the root of the source */ -/* tree. An additional intellectual property rights grant can be found */ -/* in the file PATENTS. All contributing project authors may */ -/* be found in the AUTHORS file in the root of the source tree. */ -/* This file automatically generated by configure. Do not edit! */ -#ifndef VPX_CONFIG_H -#define VPX_CONFIG_H -#define RESTRICT -#define INLINE __forceinline -#define ARCH_ARM 0 -#define ARCH_MIPS 0 -#define ARCH_X86 0 -#define ARCH_X86_64 1 -#define HAVE_NEON 0 -#define HAVE_NEON_ASM 0 -#define HAVE_MIPS32 0 -#define HAVE_DSPR2 0 -#define HAVE_MSA 0 -#define HAVE_MIPS64 0 -#define HAVE_MMX 1 -#define HAVE_SSE 1 -#define HAVE_SSE2 1 -#define HAVE_SSE3 1 -#define HAVE_SSSE3 1 -#define HAVE_SSE4_1 1 -#define HAVE_AVX 1 -#define HAVE_AVX2 1 -#define HAVE_VPX_PORTS 1 -#define HAVE_PTHREAD_H 0 -#define HAVE_UNISTD_H 0 -#define CONFIG_DEPENDENCY_TRACKING 1 -#define CONFIG_EXTERNAL_BUILD 1 -#define CONFIG_INSTALL_DOCS 0 -#define CONFIG_INSTALL_BINS 1 -#define CONFIG_INSTALL_LIBS 1 -#define CONFIG_INSTALL_SRCS 0 -#define CONFIG_DEBUG 0 -#define CONFIG_GPROF 0 -#define CONFIG_GCOV 0 -#define CONFIG_RVCT 0 -#define CONFIG_GCC 0 -#define CONFIG_MSVS 1 -#define CONFIG_PIC 1 -#define CONFIG_BIG_ENDIAN 0 -#define CONFIG_CODEC_SRCS 0 -#define CONFIG_DEBUG_LIBS 0 -#define CONFIG_DEQUANT_TOKENS 0 -#define CONFIG_DC_RECON 0 -#define CONFIG_RUNTIME_CPU_DETECT 1 -#define CONFIG_POSTPROC 1 -#define CONFIG_VP9_POSTPROC 1 -#define CONFIG_MULTITHREAD 1 -#define CONFIG_INTERNAL_STATS 0 -#define CONFIG_VP8_ENCODER 1 -#define CONFIG_VP8_DECODER 1 -#define CONFIG_VP9_ENCODER 1 -#define CONFIG_VP9_DECODER 1 -#define CONFIG_VP8 1 -#define CONFIG_VP9 1 -#define CONFIG_ENCODERS 1 -#define CONFIG_DECODERS 1 -#define CONFIG_STATIC_MSVCRT 0 -#define CONFIG_SPATIAL_RESAMPLING 1 -#define CONFIG_REALTIME_ONLY 1 -#define CONFIG_ONTHEFLY_BITPACKING 0 -#define CONFIG_ERROR_CONCEALMENT 0 -#define CONFIG_SHARED 0 -#define CONFIG_STATIC 1 -#define CONFIG_SMALL 0 -#define CONFIG_POSTPROC_VISUALIZER 0 -#define CONFIG_OS_SUPPORT 1 -#define CONFIG_UNIT_TESTS 1 -#define CONFIG_WEBM_IO 1 -#define CONFIG_LIBYUV 1 -#define CONFIG_DECODE_PERF_TESTS 0 -#define CONFIG_ENCODE_PERF_TESTS 0 -#define CONFIG_MULTI_RES_ENCODING 1 -#define CONFIG_TEMPORAL_DENOISING 1 -#define CONFIG_VP9_TEMPORAL_DENOISING 1 -#define CONFIG_COEFFICIENT_RANGE_CHECKING 0 -#define CONFIG_VP9_HIGHBITDEPTH 1 -#define CONFIG_BETTER_HW_COMPATIBILITY 0 -#define CONFIG_EXPERIMENTAL 0 -#define CONFIG_SIZE_LIMIT 1 -#define CONFIG_SPATIAL_SVC 0 -#define CONFIG_FP_MB_STATS 0 -#define CONFIG_EMULATE_HARDWARE 0 -#define CONFIG_MISC_FIXES 0 -#define DECODE_WIDTH_LIMIT 16384 -#define DECODE_HEIGHT_LIMIT 16384 -#endif /* VPX_CONFIG_H */ diff --git a/WebRtc.NET/include/third_party/libvpx/source/config/win/x64/vpx_dsp_rtcd.h b/WebRtc.NET/include/third_party/libvpx/source/config/win/x64/vpx_dsp_rtcd.h deleted file mode 100644 index bcb567d8..00000000 --- a/WebRtc.NET/include/third_party/libvpx/source/config/win/x64/vpx_dsp_rtcd.h +++ /dev/null @@ -1,2286 +0,0 @@ -#ifndef VPX_DSP_RTCD_H_ -#define VPX_DSP_RTCD_H_ - -#ifdef RTCD_C -#define RTCD_EXTERN -#else -#define RTCD_EXTERN extern -#endif - -/* - * DSP - */ - -#include "vpx/vpx_integer.h" -#include "vpx_dsp/vpx_dsp_common.h" - - -#ifdef __cplusplus -extern "C" { -#endif - -unsigned int vpx_avg_4x4_c(const uint8_t *, int p); -unsigned int vpx_avg_4x4_sse2(const uint8_t *, int p); -#define vpx_avg_4x4 vpx_avg_4x4_sse2 - -unsigned int vpx_avg_8x8_c(const uint8_t *, int p); -unsigned int vpx_avg_8x8_sse2(const uint8_t *, int p); -#define vpx_avg_8x8 vpx_avg_8x8_sse2 - -void vpx_comp_avg_pred_c(uint8_t *comp_pred, const uint8_t *pred, int width, int height, const uint8_t *ref, int ref_stride); -#define vpx_comp_avg_pred vpx_comp_avg_pred_c - -void vpx_convolve8_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -void vpx_convolve8_sse2(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -void vpx_convolve8_ssse3(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -void vpx_convolve8_avx2(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -RTCD_EXTERN void (*vpx_convolve8)(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); - -void vpx_convolve8_avg_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -void vpx_convolve8_avg_sse2(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -void vpx_convolve8_avg_ssse3(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -RTCD_EXTERN void (*vpx_convolve8_avg)(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); - -void vpx_convolve8_avg_horiz_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -void vpx_convolve8_avg_horiz_sse2(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -void vpx_convolve8_avg_horiz_ssse3(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -RTCD_EXTERN void (*vpx_convolve8_avg_horiz)(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); - -void vpx_convolve8_avg_vert_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -void vpx_convolve8_avg_vert_sse2(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -void vpx_convolve8_avg_vert_ssse3(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -RTCD_EXTERN void (*vpx_convolve8_avg_vert)(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); - -void vpx_convolve8_horiz_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -void vpx_convolve8_horiz_sse2(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -void vpx_convolve8_horiz_ssse3(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -void vpx_convolve8_horiz_avx2(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -RTCD_EXTERN void (*vpx_convolve8_horiz)(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); - -void vpx_convolve8_vert_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -void vpx_convolve8_vert_sse2(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -void vpx_convolve8_vert_ssse3(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -void vpx_convolve8_vert_avx2(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -RTCD_EXTERN void (*vpx_convolve8_vert)(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); - -void vpx_convolve_avg_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -void vpx_convolve_avg_sse2(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -#define vpx_convolve_avg vpx_convolve_avg_sse2 - -void vpx_convolve_copy_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -void vpx_convolve_copy_sse2(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -#define vpx_convolve_copy vpx_convolve_copy_sse2 - -void vpx_d117_predictor_16x16_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d117_predictor_16x16 vpx_d117_predictor_16x16_c - -void vpx_d117_predictor_32x32_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d117_predictor_32x32 vpx_d117_predictor_32x32_c - -void vpx_d117_predictor_4x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d117_predictor_4x4 vpx_d117_predictor_4x4_c - -void vpx_d117_predictor_8x8_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d117_predictor_8x8 vpx_d117_predictor_8x8_c - -void vpx_d135_predictor_16x16_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d135_predictor_16x16 vpx_d135_predictor_16x16_c - -void vpx_d135_predictor_32x32_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d135_predictor_32x32 vpx_d135_predictor_32x32_c - -void vpx_d135_predictor_4x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d135_predictor_4x4 vpx_d135_predictor_4x4_c - -void vpx_d135_predictor_8x8_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d135_predictor_8x8 vpx_d135_predictor_8x8_c - -void vpx_d153_predictor_16x16_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_d153_predictor_16x16_ssse3(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -RTCD_EXTERN void (*vpx_d153_predictor_16x16)(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); - -void vpx_d153_predictor_32x32_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_d153_predictor_32x32_ssse3(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -RTCD_EXTERN void (*vpx_d153_predictor_32x32)(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); - -void vpx_d153_predictor_4x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_d153_predictor_4x4_ssse3(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -RTCD_EXTERN void (*vpx_d153_predictor_4x4)(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); - -void vpx_d153_predictor_8x8_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_d153_predictor_8x8_ssse3(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -RTCD_EXTERN void (*vpx_d153_predictor_8x8)(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); - -void vpx_d207_predictor_16x16_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_d207_predictor_16x16_ssse3(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -RTCD_EXTERN void (*vpx_d207_predictor_16x16)(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); - -void vpx_d207_predictor_32x32_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_d207_predictor_32x32_ssse3(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -RTCD_EXTERN void (*vpx_d207_predictor_32x32)(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); - -void vpx_d207_predictor_4x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_d207_predictor_4x4_sse2(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d207_predictor_4x4 vpx_d207_predictor_4x4_sse2 - -void vpx_d207_predictor_8x8_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_d207_predictor_8x8_ssse3(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -RTCD_EXTERN void (*vpx_d207_predictor_8x8)(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); - -void vpx_d207e_predictor_16x16_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d207e_predictor_16x16 vpx_d207e_predictor_16x16_c - -void vpx_d207e_predictor_32x32_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d207e_predictor_32x32 vpx_d207e_predictor_32x32_c - -void vpx_d207e_predictor_4x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d207e_predictor_4x4 vpx_d207e_predictor_4x4_c - -void vpx_d207e_predictor_8x8_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d207e_predictor_8x8 vpx_d207e_predictor_8x8_c - -void vpx_d45_predictor_16x16_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_d45_predictor_16x16_ssse3(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -RTCD_EXTERN void (*vpx_d45_predictor_16x16)(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); - -void vpx_d45_predictor_32x32_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_d45_predictor_32x32_ssse3(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -RTCD_EXTERN void (*vpx_d45_predictor_32x32)(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); - -void vpx_d45_predictor_4x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_d45_predictor_4x4_sse2(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d45_predictor_4x4 vpx_d45_predictor_4x4_sse2 - -void vpx_d45_predictor_8x8_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_d45_predictor_8x8_sse2(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d45_predictor_8x8 vpx_d45_predictor_8x8_sse2 - -void vpx_d45e_predictor_16x16_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d45e_predictor_16x16 vpx_d45e_predictor_16x16_c - -void vpx_d45e_predictor_32x32_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d45e_predictor_32x32 vpx_d45e_predictor_32x32_c - -void vpx_d45e_predictor_4x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d45e_predictor_4x4 vpx_d45e_predictor_4x4_c - -void vpx_d45e_predictor_8x8_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d45e_predictor_8x8 vpx_d45e_predictor_8x8_c - -void vpx_d63_predictor_16x16_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_d63_predictor_16x16_ssse3(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -RTCD_EXTERN void (*vpx_d63_predictor_16x16)(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); - -void vpx_d63_predictor_32x32_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_d63_predictor_32x32_ssse3(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -RTCD_EXTERN void (*vpx_d63_predictor_32x32)(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); - -void vpx_d63_predictor_4x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_d63_predictor_4x4_ssse3(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -RTCD_EXTERN void (*vpx_d63_predictor_4x4)(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); - -void vpx_d63_predictor_8x8_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_d63_predictor_8x8_ssse3(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -RTCD_EXTERN void (*vpx_d63_predictor_8x8)(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); - -void vpx_d63e_predictor_16x16_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d63e_predictor_16x16 vpx_d63e_predictor_16x16_c - -void vpx_d63e_predictor_32x32_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d63e_predictor_32x32 vpx_d63e_predictor_32x32_c - -void vpx_d63e_predictor_4x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d63e_predictor_4x4 vpx_d63e_predictor_4x4_c - -void vpx_d63e_predictor_8x8_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d63e_predictor_8x8 vpx_d63e_predictor_8x8_c - -void vpx_d63f_predictor_4x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_d63f_predictor_4x4 vpx_d63f_predictor_4x4_c - -void vpx_dc_128_predictor_16x16_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_dc_128_predictor_16x16_sse2(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_dc_128_predictor_16x16 vpx_dc_128_predictor_16x16_sse2 - -void vpx_dc_128_predictor_32x32_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_dc_128_predictor_32x32_sse2(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_dc_128_predictor_32x32 vpx_dc_128_predictor_32x32_sse2 - -void vpx_dc_128_predictor_4x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_dc_128_predictor_4x4_sse2(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_dc_128_predictor_4x4 vpx_dc_128_predictor_4x4_sse2 - -void vpx_dc_128_predictor_8x8_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_dc_128_predictor_8x8_sse2(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_dc_128_predictor_8x8 vpx_dc_128_predictor_8x8_sse2 - -void vpx_dc_left_predictor_16x16_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_dc_left_predictor_16x16_sse2(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_dc_left_predictor_16x16 vpx_dc_left_predictor_16x16_sse2 - -void vpx_dc_left_predictor_32x32_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_dc_left_predictor_32x32_sse2(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_dc_left_predictor_32x32 vpx_dc_left_predictor_32x32_sse2 - -void vpx_dc_left_predictor_4x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_dc_left_predictor_4x4_sse2(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_dc_left_predictor_4x4 vpx_dc_left_predictor_4x4_sse2 - -void vpx_dc_left_predictor_8x8_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_dc_left_predictor_8x8_sse2(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_dc_left_predictor_8x8 vpx_dc_left_predictor_8x8_sse2 - -void vpx_dc_predictor_16x16_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_dc_predictor_16x16_sse2(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_dc_predictor_16x16 vpx_dc_predictor_16x16_sse2 - -void vpx_dc_predictor_32x32_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_dc_predictor_32x32_sse2(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_dc_predictor_32x32 vpx_dc_predictor_32x32_sse2 - -void vpx_dc_predictor_4x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_dc_predictor_4x4_sse2(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_dc_predictor_4x4 vpx_dc_predictor_4x4_sse2 - -void vpx_dc_predictor_8x8_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_dc_predictor_8x8_sse2(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_dc_predictor_8x8 vpx_dc_predictor_8x8_sse2 - -void vpx_dc_top_predictor_16x16_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_dc_top_predictor_16x16_sse2(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_dc_top_predictor_16x16 vpx_dc_top_predictor_16x16_sse2 - -void vpx_dc_top_predictor_32x32_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_dc_top_predictor_32x32_sse2(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_dc_top_predictor_32x32 vpx_dc_top_predictor_32x32_sse2 - -void vpx_dc_top_predictor_4x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_dc_top_predictor_4x4_sse2(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_dc_top_predictor_4x4 vpx_dc_top_predictor_4x4_sse2 - -void vpx_dc_top_predictor_8x8_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_dc_top_predictor_8x8_sse2(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_dc_top_predictor_8x8 vpx_dc_top_predictor_8x8_sse2 - -void vpx_fdct16x16_c(const int16_t *input, tran_low_t *output, int stride); -void vpx_fdct16x16_sse2(const int16_t *input, tran_low_t *output, int stride); -#define vpx_fdct16x16 vpx_fdct16x16_sse2 - -void vpx_fdct16x16_1_c(const int16_t *input, tran_low_t *output, int stride); -void vpx_fdct16x16_1_sse2(const int16_t *input, tran_low_t *output, int stride); -#define vpx_fdct16x16_1 vpx_fdct16x16_1_sse2 - -void vpx_fdct32x32_c(const int16_t *input, tran_low_t *output, int stride); -void vpx_fdct32x32_sse2(const int16_t *input, tran_low_t *output, int stride); -#define vpx_fdct32x32 vpx_fdct32x32_sse2 - -void vpx_fdct32x32_1_c(const int16_t *input, tran_low_t *output, int stride); -void vpx_fdct32x32_1_sse2(const int16_t *input, tran_low_t *output, int stride); -#define vpx_fdct32x32_1 vpx_fdct32x32_1_sse2 - -void vpx_fdct32x32_rd_c(const int16_t *input, tran_low_t *output, int stride); -void vpx_fdct32x32_rd_sse2(const int16_t *input, tran_low_t *output, int stride); -#define vpx_fdct32x32_rd vpx_fdct32x32_rd_sse2 - -void vpx_fdct4x4_c(const int16_t *input, tran_low_t *output, int stride); -void vpx_fdct4x4_sse2(const int16_t *input, tran_low_t *output, int stride); -#define vpx_fdct4x4 vpx_fdct4x4_sse2 - -void vpx_fdct4x4_1_c(const int16_t *input, tran_low_t *output, int stride); -void vpx_fdct4x4_1_sse2(const int16_t *input, tran_low_t *output, int stride); -#define vpx_fdct4x4_1 vpx_fdct4x4_1_sse2 - -void vpx_fdct8x8_c(const int16_t *input, tran_low_t *output, int stride); -void vpx_fdct8x8_sse2(const int16_t *input, tran_low_t *output, int stride); -#define vpx_fdct8x8 vpx_fdct8x8_sse2 - -void vpx_fdct8x8_1_c(const int16_t *input, tran_low_t *output, int stride); -void vpx_fdct8x8_1_sse2(const int16_t *input, tran_low_t *output, int stride); -#define vpx_fdct8x8_1 vpx_fdct8x8_1_sse2 - -void vpx_get16x16var_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse, int *sum); -void vpx_get16x16var_sse2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse, int *sum); -void vpx_get16x16var_avx2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse, int *sum); -RTCD_EXTERN void (*vpx_get16x16var)(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse, int *sum); - -unsigned int vpx_get4x4sse_cs_c(const unsigned char *src_ptr, int source_stride, const unsigned char *ref_ptr, int ref_stride); -#define vpx_get4x4sse_cs vpx_get4x4sse_cs_c - -void vpx_get8x8var_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse, int *sum); -void vpx_get8x8var_sse2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse, int *sum); -#define vpx_get8x8var vpx_get8x8var_sse2 - -unsigned int vpx_get_mb_ss_c(const int16_t *); -unsigned int vpx_get_mb_ss_sse2(const int16_t *); -#define vpx_get_mb_ss vpx_get_mb_ss_sse2 - -void vpx_h_predictor_16x16_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_h_predictor_16x16_sse2(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_h_predictor_16x16 vpx_h_predictor_16x16_sse2 - -void vpx_h_predictor_32x32_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_h_predictor_32x32_sse2(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_h_predictor_32x32 vpx_h_predictor_32x32_sse2 - -void vpx_h_predictor_4x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_h_predictor_4x4_sse2(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_h_predictor_4x4 vpx_h_predictor_4x4_sse2 - -void vpx_h_predictor_8x8_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_h_predictor_8x8_sse2(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_h_predictor_8x8 vpx_h_predictor_8x8_sse2 - -void vpx_hadamard_16x16_c(const int16_t *src_diff, int src_stride, int16_t *coeff); -void vpx_hadamard_16x16_sse2(const int16_t *src_diff, int src_stride, int16_t *coeff); -#define vpx_hadamard_16x16 vpx_hadamard_16x16_sse2 - -void vpx_hadamard_8x8_c(const int16_t *src_diff, int src_stride, int16_t *coeff); -void vpx_hadamard_8x8_sse2(const int16_t *src_diff, int src_stride, int16_t *coeff); -void vpx_hadamard_8x8_ssse3(const int16_t *src_diff, int src_stride, int16_t *coeff); -RTCD_EXTERN void (*vpx_hadamard_8x8)(const int16_t *src_diff, int src_stride, int16_t *coeff); - -void vpx_he_predictor_4x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_he_predictor_4x4 vpx_he_predictor_4x4_c - -void vpx_highbd_10_get16x16var_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse, int *sum); -#define vpx_highbd_10_get16x16var vpx_highbd_10_get16x16var_c - -void vpx_highbd_10_get8x8var_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse, int *sum); -#define vpx_highbd_10_get8x8var vpx_highbd_10_get8x8var_c - -unsigned int vpx_highbd_10_mse16x16_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int recon_stride, unsigned int *sse); -unsigned int vpx_highbd_10_mse16x16_sse2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int recon_stride, unsigned int *sse); -#define vpx_highbd_10_mse16x16 vpx_highbd_10_mse16x16_sse2 - -unsigned int vpx_highbd_10_mse16x8_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int recon_stride, unsigned int *sse); -#define vpx_highbd_10_mse16x8 vpx_highbd_10_mse16x8_c - -unsigned int vpx_highbd_10_mse8x16_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int recon_stride, unsigned int *sse); -#define vpx_highbd_10_mse8x16 vpx_highbd_10_mse8x16_c - -unsigned int vpx_highbd_10_mse8x8_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int recon_stride, unsigned int *sse); -unsigned int vpx_highbd_10_mse8x8_sse2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int recon_stride, unsigned int *sse); -#define vpx_highbd_10_mse8x8 vpx_highbd_10_mse8x8_sse2 - -uint32_t vpx_highbd_10_sub_pixel_avg_variance16x16_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_highbd_10_sub_pixel_avg_variance16x16_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_highbd_10_sub_pixel_avg_variance16x16 vpx_highbd_10_sub_pixel_avg_variance16x16_sse2 - -uint32_t vpx_highbd_10_sub_pixel_avg_variance16x32_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_highbd_10_sub_pixel_avg_variance16x32_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_highbd_10_sub_pixel_avg_variance16x32 vpx_highbd_10_sub_pixel_avg_variance16x32_sse2 - -uint32_t vpx_highbd_10_sub_pixel_avg_variance16x8_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_highbd_10_sub_pixel_avg_variance16x8_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_highbd_10_sub_pixel_avg_variance16x8 vpx_highbd_10_sub_pixel_avg_variance16x8_sse2 - -uint32_t vpx_highbd_10_sub_pixel_avg_variance32x16_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_highbd_10_sub_pixel_avg_variance32x16_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_highbd_10_sub_pixel_avg_variance32x16 vpx_highbd_10_sub_pixel_avg_variance32x16_sse2 - -uint32_t vpx_highbd_10_sub_pixel_avg_variance32x32_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_highbd_10_sub_pixel_avg_variance32x32_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_highbd_10_sub_pixel_avg_variance32x32 vpx_highbd_10_sub_pixel_avg_variance32x32_sse2 - -uint32_t vpx_highbd_10_sub_pixel_avg_variance32x64_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_highbd_10_sub_pixel_avg_variance32x64_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_highbd_10_sub_pixel_avg_variance32x64 vpx_highbd_10_sub_pixel_avg_variance32x64_sse2 - -uint32_t vpx_highbd_10_sub_pixel_avg_variance4x4_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_highbd_10_sub_pixel_avg_variance4x4 vpx_highbd_10_sub_pixel_avg_variance4x4_c - -uint32_t vpx_highbd_10_sub_pixel_avg_variance4x8_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_highbd_10_sub_pixel_avg_variance4x8 vpx_highbd_10_sub_pixel_avg_variance4x8_c - -uint32_t vpx_highbd_10_sub_pixel_avg_variance64x32_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_highbd_10_sub_pixel_avg_variance64x32_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_highbd_10_sub_pixel_avg_variance64x32 vpx_highbd_10_sub_pixel_avg_variance64x32_sse2 - -uint32_t vpx_highbd_10_sub_pixel_avg_variance64x64_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_highbd_10_sub_pixel_avg_variance64x64_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_highbd_10_sub_pixel_avg_variance64x64 vpx_highbd_10_sub_pixel_avg_variance64x64_sse2 - -uint32_t vpx_highbd_10_sub_pixel_avg_variance8x16_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_highbd_10_sub_pixel_avg_variance8x16_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_highbd_10_sub_pixel_avg_variance8x16 vpx_highbd_10_sub_pixel_avg_variance8x16_sse2 - -uint32_t vpx_highbd_10_sub_pixel_avg_variance8x4_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_highbd_10_sub_pixel_avg_variance8x4_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_highbd_10_sub_pixel_avg_variance8x4 vpx_highbd_10_sub_pixel_avg_variance8x4_sse2 - -uint32_t vpx_highbd_10_sub_pixel_avg_variance8x8_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_highbd_10_sub_pixel_avg_variance8x8_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_highbd_10_sub_pixel_avg_variance8x8 vpx_highbd_10_sub_pixel_avg_variance8x8_sse2 - -uint32_t vpx_highbd_10_sub_pixel_variance16x16_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_highbd_10_sub_pixel_variance16x16_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -#define vpx_highbd_10_sub_pixel_variance16x16 vpx_highbd_10_sub_pixel_variance16x16_sse2 - -uint32_t vpx_highbd_10_sub_pixel_variance16x32_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_highbd_10_sub_pixel_variance16x32_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -#define vpx_highbd_10_sub_pixel_variance16x32 vpx_highbd_10_sub_pixel_variance16x32_sse2 - -uint32_t vpx_highbd_10_sub_pixel_variance16x8_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_highbd_10_sub_pixel_variance16x8_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -#define vpx_highbd_10_sub_pixel_variance16x8 vpx_highbd_10_sub_pixel_variance16x8_sse2 - -uint32_t vpx_highbd_10_sub_pixel_variance32x16_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_highbd_10_sub_pixel_variance32x16_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -#define vpx_highbd_10_sub_pixel_variance32x16 vpx_highbd_10_sub_pixel_variance32x16_sse2 - -uint32_t vpx_highbd_10_sub_pixel_variance32x32_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_highbd_10_sub_pixel_variance32x32_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -#define vpx_highbd_10_sub_pixel_variance32x32 vpx_highbd_10_sub_pixel_variance32x32_sse2 - -uint32_t vpx_highbd_10_sub_pixel_variance32x64_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_highbd_10_sub_pixel_variance32x64_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -#define vpx_highbd_10_sub_pixel_variance32x64 vpx_highbd_10_sub_pixel_variance32x64_sse2 - -uint32_t vpx_highbd_10_sub_pixel_variance4x4_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -#define vpx_highbd_10_sub_pixel_variance4x4 vpx_highbd_10_sub_pixel_variance4x4_c - -uint32_t vpx_highbd_10_sub_pixel_variance4x8_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -#define vpx_highbd_10_sub_pixel_variance4x8 vpx_highbd_10_sub_pixel_variance4x8_c - -uint32_t vpx_highbd_10_sub_pixel_variance64x32_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_highbd_10_sub_pixel_variance64x32_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -#define vpx_highbd_10_sub_pixel_variance64x32 vpx_highbd_10_sub_pixel_variance64x32_sse2 - -uint32_t vpx_highbd_10_sub_pixel_variance64x64_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_highbd_10_sub_pixel_variance64x64_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -#define vpx_highbd_10_sub_pixel_variance64x64 vpx_highbd_10_sub_pixel_variance64x64_sse2 - -uint32_t vpx_highbd_10_sub_pixel_variance8x16_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_highbd_10_sub_pixel_variance8x16_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -#define vpx_highbd_10_sub_pixel_variance8x16 vpx_highbd_10_sub_pixel_variance8x16_sse2 - -uint32_t vpx_highbd_10_sub_pixel_variance8x4_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_highbd_10_sub_pixel_variance8x4_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -#define vpx_highbd_10_sub_pixel_variance8x4 vpx_highbd_10_sub_pixel_variance8x4_sse2 - -uint32_t vpx_highbd_10_sub_pixel_variance8x8_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_highbd_10_sub_pixel_variance8x8_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -#define vpx_highbd_10_sub_pixel_variance8x8 vpx_highbd_10_sub_pixel_variance8x8_sse2 - -unsigned int vpx_highbd_10_variance16x16_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -unsigned int vpx_highbd_10_variance16x16_sse2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_highbd_10_variance16x16 vpx_highbd_10_variance16x16_sse2 - -unsigned int vpx_highbd_10_variance16x32_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -unsigned int vpx_highbd_10_variance16x32_sse2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_highbd_10_variance16x32 vpx_highbd_10_variance16x32_sse2 - -unsigned int vpx_highbd_10_variance16x8_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -unsigned int vpx_highbd_10_variance16x8_sse2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_highbd_10_variance16x8 vpx_highbd_10_variance16x8_sse2 - -unsigned int vpx_highbd_10_variance32x16_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -unsigned int vpx_highbd_10_variance32x16_sse2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_highbd_10_variance32x16 vpx_highbd_10_variance32x16_sse2 - -unsigned int vpx_highbd_10_variance32x32_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -unsigned int vpx_highbd_10_variance32x32_sse2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_highbd_10_variance32x32 vpx_highbd_10_variance32x32_sse2 - -unsigned int vpx_highbd_10_variance32x64_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -unsigned int vpx_highbd_10_variance32x64_sse2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_highbd_10_variance32x64 vpx_highbd_10_variance32x64_sse2 - -unsigned int vpx_highbd_10_variance4x4_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_highbd_10_variance4x4 vpx_highbd_10_variance4x4_c - -unsigned int vpx_highbd_10_variance4x8_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_highbd_10_variance4x8 vpx_highbd_10_variance4x8_c - -unsigned int vpx_highbd_10_variance64x32_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -unsigned int vpx_highbd_10_variance64x32_sse2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_highbd_10_variance64x32 vpx_highbd_10_variance64x32_sse2 - -unsigned int vpx_highbd_10_variance64x64_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -unsigned int vpx_highbd_10_variance64x64_sse2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_highbd_10_variance64x64 vpx_highbd_10_variance64x64_sse2 - -unsigned int vpx_highbd_10_variance8x16_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -unsigned int vpx_highbd_10_variance8x16_sse2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_highbd_10_variance8x16 vpx_highbd_10_variance8x16_sse2 - -unsigned int vpx_highbd_10_variance8x4_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_highbd_10_variance8x4 vpx_highbd_10_variance8x4_c - -unsigned int vpx_highbd_10_variance8x8_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -unsigned int vpx_highbd_10_variance8x8_sse2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_highbd_10_variance8x8 vpx_highbd_10_variance8x8_sse2 - -void vpx_highbd_12_get16x16var_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse, int *sum); -#define vpx_highbd_12_get16x16var vpx_highbd_12_get16x16var_c - -void vpx_highbd_12_get8x8var_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse, int *sum); -#define vpx_highbd_12_get8x8var vpx_highbd_12_get8x8var_c - -unsigned int vpx_highbd_12_mse16x16_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int recon_stride, unsigned int *sse); -unsigned int vpx_highbd_12_mse16x16_sse2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int recon_stride, unsigned int *sse); -#define vpx_highbd_12_mse16x16 vpx_highbd_12_mse16x16_sse2 - -unsigned int vpx_highbd_12_mse16x8_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int recon_stride, unsigned int *sse); -#define vpx_highbd_12_mse16x8 vpx_highbd_12_mse16x8_c - -unsigned int vpx_highbd_12_mse8x16_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int recon_stride, unsigned int *sse); -#define vpx_highbd_12_mse8x16 vpx_highbd_12_mse8x16_c - -unsigned int vpx_highbd_12_mse8x8_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int recon_stride, unsigned int *sse); -unsigned int vpx_highbd_12_mse8x8_sse2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int recon_stride, unsigned int *sse); -#define vpx_highbd_12_mse8x8 vpx_highbd_12_mse8x8_sse2 - -uint32_t vpx_highbd_12_sub_pixel_avg_variance16x16_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_highbd_12_sub_pixel_avg_variance16x16_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_highbd_12_sub_pixel_avg_variance16x16 vpx_highbd_12_sub_pixel_avg_variance16x16_sse2 - -uint32_t vpx_highbd_12_sub_pixel_avg_variance16x32_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_highbd_12_sub_pixel_avg_variance16x32_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_highbd_12_sub_pixel_avg_variance16x32 vpx_highbd_12_sub_pixel_avg_variance16x32_sse2 - -uint32_t vpx_highbd_12_sub_pixel_avg_variance16x8_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_highbd_12_sub_pixel_avg_variance16x8_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_highbd_12_sub_pixel_avg_variance16x8 vpx_highbd_12_sub_pixel_avg_variance16x8_sse2 - -uint32_t vpx_highbd_12_sub_pixel_avg_variance32x16_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_highbd_12_sub_pixel_avg_variance32x16_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_highbd_12_sub_pixel_avg_variance32x16 vpx_highbd_12_sub_pixel_avg_variance32x16_sse2 - -uint32_t vpx_highbd_12_sub_pixel_avg_variance32x32_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_highbd_12_sub_pixel_avg_variance32x32_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_highbd_12_sub_pixel_avg_variance32x32 vpx_highbd_12_sub_pixel_avg_variance32x32_sse2 - -uint32_t vpx_highbd_12_sub_pixel_avg_variance32x64_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_highbd_12_sub_pixel_avg_variance32x64_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_highbd_12_sub_pixel_avg_variance32x64 vpx_highbd_12_sub_pixel_avg_variance32x64_sse2 - -uint32_t vpx_highbd_12_sub_pixel_avg_variance4x4_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_highbd_12_sub_pixel_avg_variance4x4 vpx_highbd_12_sub_pixel_avg_variance4x4_c - -uint32_t vpx_highbd_12_sub_pixel_avg_variance4x8_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_highbd_12_sub_pixel_avg_variance4x8 vpx_highbd_12_sub_pixel_avg_variance4x8_c - -uint32_t vpx_highbd_12_sub_pixel_avg_variance64x32_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_highbd_12_sub_pixel_avg_variance64x32_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_highbd_12_sub_pixel_avg_variance64x32 vpx_highbd_12_sub_pixel_avg_variance64x32_sse2 - -uint32_t vpx_highbd_12_sub_pixel_avg_variance64x64_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_highbd_12_sub_pixel_avg_variance64x64_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_highbd_12_sub_pixel_avg_variance64x64 vpx_highbd_12_sub_pixel_avg_variance64x64_sse2 - -uint32_t vpx_highbd_12_sub_pixel_avg_variance8x16_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_highbd_12_sub_pixel_avg_variance8x16_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_highbd_12_sub_pixel_avg_variance8x16 vpx_highbd_12_sub_pixel_avg_variance8x16_sse2 - -uint32_t vpx_highbd_12_sub_pixel_avg_variance8x4_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_highbd_12_sub_pixel_avg_variance8x4_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_highbd_12_sub_pixel_avg_variance8x4 vpx_highbd_12_sub_pixel_avg_variance8x4_sse2 - -uint32_t vpx_highbd_12_sub_pixel_avg_variance8x8_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_highbd_12_sub_pixel_avg_variance8x8_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_highbd_12_sub_pixel_avg_variance8x8 vpx_highbd_12_sub_pixel_avg_variance8x8_sse2 - -uint32_t vpx_highbd_12_sub_pixel_variance16x16_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_highbd_12_sub_pixel_variance16x16_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -#define vpx_highbd_12_sub_pixel_variance16x16 vpx_highbd_12_sub_pixel_variance16x16_sse2 - -uint32_t vpx_highbd_12_sub_pixel_variance16x32_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_highbd_12_sub_pixel_variance16x32_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -#define vpx_highbd_12_sub_pixel_variance16x32 vpx_highbd_12_sub_pixel_variance16x32_sse2 - -uint32_t vpx_highbd_12_sub_pixel_variance16x8_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_highbd_12_sub_pixel_variance16x8_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -#define vpx_highbd_12_sub_pixel_variance16x8 vpx_highbd_12_sub_pixel_variance16x8_sse2 - -uint32_t vpx_highbd_12_sub_pixel_variance32x16_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_highbd_12_sub_pixel_variance32x16_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -#define vpx_highbd_12_sub_pixel_variance32x16 vpx_highbd_12_sub_pixel_variance32x16_sse2 - -uint32_t vpx_highbd_12_sub_pixel_variance32x32_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_highbd_12_sub_pixel_variance32x32_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -#define vpx_highbd_12_sub_pixel_variance32x32 vpx_highbd_12_sub_pixel_variance32x32_sse2 - -uint32_t vpx_highbd_12_sub_pixel_variance32x64_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_highbd_12_sub_pixel_variance32x64_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -#define vpx_highbd_12_sub_pixel_variance32x64 vpx_highbd_12_sub_pixel_variance32x64_sse2 - -uint32_t vpx_highbd_12_sub_pixel_variance4x4_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -#define vpx_highbd_12_sub_pixel_variance4x4 vpx_highbd_12_sub_pixel_variance4x4_c - -uint32_t vpx_highbd_12_sub_pixel_variance4x8_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -#define vpx_highbd_12_sub_pixel_variance4x8 vpx_highbd_12_sub_pixel_variance4x8_c - -uint32_t vpx_highbd_12_sub_pixel_variance64x32_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_highbd_12_sub_pixel_variance64x32_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -#define vpx_highbd_12_sub_pixel_variance64x32 vpx_highbd_12_sub_pixel_variance64x32_sse2 - -uint32_t vpx_highbd_12_sub_pixel_variance64x64_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_highbd_12_sub_pixel_variance64x64_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -#define vpx_highbd_12_sub_pixel_variance64x64 vpx_highbd_12_sub_pixel_variance64x64_sse2 - -uint32_t vpx_highbd_12_sub_pixel_variance8x16_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_highbd_12_sub_pixel_variance8x16_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -#define vpx_highbd_12_sub_pixel_variance8x16 vpx_highbd_12_sub_pixel_variance8x16_sse2 - -uint32_t vpx_highbd_12_sub_pixel_variance8x4_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_highbd_12_sub_pixel_variance8x4_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -#define vpx_highbd_12_sub_pixel_variance8x4 vpx_highbd_12_sub_pixel_variance8x4_sse2 - -uint32_t vpx_highbd_12_sub_pixel_variance8x8_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_highbd_12_sub_pixel_variance8x8_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -#define vpx_highbd_12_sub_pixel_variance8x8 vpx_highbd_12_sub_pixel_variance8x8_sse2 - -unsigned int vpx_highbd_12_variance16x16_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -unsigned int vpx_highbd_12_variance16x16_sse2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_highbd_12_variance16x16 vpx_highbd_12_variance16x16_sse2 - -unsigned int vpx_highbd_12_variance16x32_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -unsigned int vpx_highbd_12_variance16x32_sse2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_highbd_12_variance16x32 vpx_highbd_12_variance16x32_sse2 - -unsigned int vpx_highbd_12_variance16x8_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -unsigned int vpx_highbd_12_variance16x8_sse2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_highbd_12_variance16x8 vpx_highbd_12_variance16x8_sse2 - -unsigned int vpx_highbd_12_variance32x16_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -unsigned int vpx_highbd_12_variance32x16_sse2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_highbd_12_variance32x16 vpx_highbd_12_variance32x16_sse2 - -unsigned int vpx_highbd_12_variance32x32_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -unsigned int vpx_highbd_12_variance32x32_sse2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_highbd_12_variance32x32 vpx_highbd_12_variance32x32_sse2 - -unsigned int vpx_highbd_12_variance32x64_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -unsigned int vpx_highbd_12_variance32x64_sse2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_highbd_12_variance32x64 vpx_highbd_12_variance32x64_sse2 - -unsigned int vpx_highbd_12_variance4x4_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_highbd_12_variance4x4 vpx_highbd_12_variance4x4_c - -unsigned int vpx_highbd_12_variance4x8_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_highbd_12_variance4x8 vpx_highbd_12_variance4x8_c - -unsigned int vpx_highbd_12_variance64x32_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -unsigned int vpx_highbd_12_variance64x32_sse2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_highbd_12_variance64x32 vpx_highbd_12_variance64x32_sse2 - -unsigned int vpx_highbd_12_variance64x64_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -unsigned int vpx_highbd_12_variance64x64_sse2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_highbd_12_variance64x64 vpx_highbd_12_variance64x64_sse2 - -unsigned int vpx_highbd_12_variance8x16_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -unsigned int vpx_highbd_12_variance8x16_sse2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_highbd_12_variance8x16 vpx_highbd_12_variance8x16_sse2 - -unsigned int vpx_highbd_12_variance8x4_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_highbd_12_variance8x4 vpx_highbd_12_variance8x4_c - -unsigned int vpx_highbd_12_variance8x8_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -unsigned int vpx_highbd_12_variance8x8_sse2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_highbd_12_variance8x8 vpx_highbd_12_variance8x8_sse2 - -void vpx_highbd_8_get16x16var_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse, int *sum); -#define vpx_highbd_8_get16x16var vpx_highbd_8_get16x16var_c - -void vpx_highbd_8_get8x8var_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse, int *sum); -#define vpx_highbd_8_get8x8var vpx_highbd_8_get8x8var_c - -unsigned int vpx_highbd_8_mse16x16_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int recon_stride, unsigned int *sse); -unsigned int vpx_highbd_8_mse16x16_sse2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int recon_stride, unsigned int *sse); -#define vpx_highbd_8_mse16x16 vpx_highbd_8_mse16x16_sse2 - -unsigned int vpx_highbd_8_mse16x8_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int recon_stride, unsigned int *sse); -#define vpx_highbd_8_mse16x8 vpx_highbd_8_mse16x8_c - -unsigned int vpx_highbd_8_mse8x16_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int recon_stride, unsigned int *sse); -#define vpx_highbd_8_mse8x16 vpx_highbd_8_mse8x16_c - -unsigned int vpx_highbd_8_mse8x8_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int recon_stride, unsigned int *sse); -unsigned int vpx_highbd_8_mse8x8_sse2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int recon_stride, unsigned int *sse); -#define vpx_highbd_8_mse8x8 vpx_highbd_8_mse8x8_sse2 - -uint32_t vpx_highbd_8_sub_pixel_avg_variance16x16_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_highbd_8_sub_pixel_avg_variance16x16_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_highbd_8_sub_pixel_avg_variance16x16 vpx_highbd_8_sub_pixel_avg_variance16x16_sse2 - -uint32_t vpx_highbd_8_sub_pixel_avg_variance16x32_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_highbd_8_sub_pixel_avg_variance16x32_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_highbd_8_sub_pixel_avg_variance16x32 vpx_highbd_8_sub_pixel_avg_variance16x32_sse2 - -uint32_t vpx_highbd_8_sub_pixel_avg_variance16x8_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_highbd_8_sub_pixel_avg_variance16x8_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_highbd_8_sub_pixel_avg_variance16x8 vpx_highbd_8_sub_pixel_avg_variance16x8_sse2 - -uint32_t vpx_highbd_8_sub_pixel_avg_variance32x16_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_highbd_8_sub_pixel_avg_variance32x16_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_highbd_8_sub_pixel_avg_variance32x16 vpx_highbd_8_sub_pixel_avg_variance32x16_sse2 - -uint32_t vpx_highbd_8_sub_pixel_avg_variance32x32_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_highbd_8_sub_pixel_avg_variance32x32_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_highbd_8_sub_pixel_avg_variance32x32 vpx_highbd_8_sub_pixel_avg_variance32x32_sse2 - -uint32_t vpx_highbd_8_sub_pixel_avg_variance32x64_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_highbd_8_sub_pixel_avg_variance32x64_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_highbd_8_sub_pixel_avg_variance32x64 vpx_highbd_8_sub_pixel_avg_variance32x64_sse2 - -uint32_t vpx_highbd_8_sub_pixel_avg_variance4x4_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_highbd_8_sub_pixel_avg_variance4x4 vpx_highbd_8_sub_pixel_avg_variance4x4_c - -uint32_t vpx_highbd_8_sub_pixel_avg_variance4x8_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_highbd_8_sub_pixel_avg_variance4x8 vpx_highbd_8_sub_pixel_avg_variance4x8_c - -uint32_t vpx_highbd_8_sub_pixel_avg_variance64x32_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_highbd_8_sub_pixel_avg_variance64x32_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_highbd_8_sub_pixel_avg_variance64x32 vpx_highbd_8_sub_pixel_avg_variance64x32_sse2 - -uint32_t vpx_highbd_8_sub_pixel_avg_variance64x64_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_highbd_8_sub_pixel_avg_variance64x64_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_highbd_8_sub_pixel_avg_variance64x64 vpx_highbd_8_sub_pixel_avg_variance64x64_sse2 - -uint32_t vpx_highbd_8_sub_pixel_avg_variance8x16_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_highbd_8_sub_pixel_avg_variance8x16_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_highbd_8_sub_pixel_avg_variance8x16 vpx_highbd_8_sub_pixel_avg_variance8x16_sse2 - -uint32_t vpx_highbd_8_sub_pixel_avg_variance8x4_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_highbd_8_sub_pixel_avg_variance8x4_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_highbd_8_sub_pixel_avg_variance8x4 vpx_highbd_8_sub_pixel_avg_variance8x4_sse2 - -uint32_t vpx_highbd_8_sub_pixel_avg_variance8x8_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_highbd_8_sub_pixel_avg_variance8x8_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -#define vpx_highbd_8_sub_pixel_avg_variance8x8 vpx_highbd_8_sub_pixel_avg_variance8x8_sse2 - -uint32_t vpx_highbd_8_sub_pixel_variance16x16_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_highbd_8_sub_pixel_variance16x16_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -#define vpx_highbd_8_sub_pixel_variance16x16 vpx_highbd_8_sub_pixel_variance16x16_sse2 - -uint32_t vpx_highbd_8_sub_pixel_variance16x32_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_highbd_8_sub_pixel_variance16x32_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -#define vpx_highbd_8_sub_pixel_variance16x32 vpx_highbd_8_sub_pixel_variance16x32_sse2 - -uint32_t vpx_highbd_8_sub_pixel_variance16x8_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_highbd_8_sub_pixel_variance16x8_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -#define vpx_highbd_8_sub_pixel_variance16x8 vpx_highbd_8_sub_pixel_variance16x8_sse2 - -uint32_t vpx_highbd_8_sub_pixel_variance32x16_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_highbd_8_sub_pixel_variance32x16_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -#define vpx_highbd_8_sub_pixel_variance32x16 vpx_highbd_8_sub_pixel_variance32x16_sse2 - -uint32_t vpx_highbd_8_sub_pixel_variance32x32_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_highbd_8_sub_pixel_variance32x32_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -#define vpx_highbd_8_sub_pixel_variance32x32 vpx_highbd_8_sub_pixel_variance32x32_sse2 - -uint32_t vpx_highbd_8_sub_pixel_variance32x64_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_highbd_8_sub_pixel_variance32x64_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -#define vpx_highbd_8_sub_pixel_variance32x64 vpx_highbd_8_sub_pixel_variance32x64_sse2 - -uint32_t vpx_highbd_8_sub_pixel_variance4x4_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -#define vpx_highbd_8_sub_pixel_variance4x4 vpx_highbd_8_sub_pixel_variance4x4_c - -uint32_t vpx_highbd_8_sub_pixel_variance4x8_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -#define vpx_highbd_8_sub_pixel_variance4x8 vpx_highbd_8_sub_pixel_variance4x8_c - -uint32_t vpx_highbd_8_sub_pixel_variance64x32_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_highbd_8_sub_pixel_variance64x32_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -#define vpx_highbd_8_sub_pixel_variance64x32 vpx_highbd_8_sub_pixel_variance64x32_sse2 - -uint32_t vpx_highbd_8_sub_pixel_variance64x64_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_highbd_8_sub_pixel_variance64x64_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -#define vpx_highbd_8_sub_pixel_variance64x64 vpx_highbd_8_sub_pixel_variance64x64_sse2 - -uint32_t vpx_highbd_8_sub_pixel_variance8x16_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_highbd_8_sub_pixel_variance8x16_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -#define vpx_highbd_8_sub_pixel_variance8x16 vpx_highbd_8_sub_pixel_variance8x16_sse2 - -uint32_t vpx_highbd_8_sub_pixel_variance8x4_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_highbd_8_sub_pixel_variance8x4_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -#define vpx_highbd_8_sub_pixel_variance8x4 vpx_highbd_8_sub_pixel_variance8x4_sse2 - -uint32_t vpx_highbd_8_sub_pixel_variance8x8_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_highbd_8_sub_pixel_variance8x8_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -#define vpx_highbd_8_sub_pixel_variance8x8 vpx_highbd_8_sub_pixel_variance8x8_sse2 - -unsigned int vpx_highbd_8_variance16x16_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -unsigned int vpx_highbd_8_variance16x16_sse2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_highbd_8_variance16x16 vpx_highbd_8_variance16x16_sse2 - -unsigned int vpx_highbd_8_variance16x32_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -unsigned int vpx_highbd_8_variance16x32_sse2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_highbd_8_variance16x32 vpx_highbd_8_variance16x32_sse2 - -unsigned int vpx_highbd_8_variance16x8_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -unsigned int vpx_highbd_8_variance16x8_sse2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_highbd_8_variance16x8 vpx_highbd_8_variance16x8_sse2 - -unsigned int vpx_highbd_8_variance32x16_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -unsigned int vpx_highbd_8_variance32x16_sse2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_highbd_8_variance32x16 vpx_highbd_8_variance32x16_sse2 - -unsigned int vpx_highbd_8_variance32x32_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -unsigned int vpx_highbd_8_variance32x32_sse2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_highbd_8_variance32x32 vpx_highbd_8_variance32x32_sse2 - -unsigned int vpx_highbd_8_variance32x64_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -unsigned int vpx_highbd_8_variance32x64_sse2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_highbd_8_variance32x64 vpx_highbd_8_variance32x64_sse2 - -unsigned int vpx_highbd_8_variance4x4_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_highbd_8_variance4x4 vpx_highbd_8_variance4x4_c - -unsigned int vpx_highbd_8_variance4x8_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_highbd_8_variance4x8 vpx_highbd_8_variance4x8_c - -unsigned int vpx_highbd_8_variance64x32_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -unsigned int vpx_highbd_8_variance64x32_sse2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_highbd_8_variance64x32 vpx_highbd_8_variance64x32_sse2 - -unsigned int vpx_highbd_8_variance64x64_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -unsigned int vpx_highbd_8_variance64x64_sse2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_highbd_8_variance64x64 vpx_highbd_8_variance64x64_sse2 - -unsigned int vpx_highbd_8_variance8x16_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -unsigned int vpx_highbd_8_variance8x16_sse2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_highbd_8_variance8x16 vpx_highbd_8_variance8x16_sse2 - -unsigned int vpx_highbd_8_variance8x4_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_highbd_8_variance8x4 vpx_highbd_8_variance8x4_c - -unsigned int vpx_highbd_8_variance8x8_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -unsigned int vpx_highbd_8_variance8x8_sse2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_highbd_8_variance8x8 vpx_highbd_8_variance8x8_sse2 - -unsigned int vpx_highbd_avg_4x4_c(const uint8_t *, int p); -#define vpx_highbd_avg_4x4 vpx_highbd_avg_4x4_c - -unsigned int vpx_highbd_avg_8x8_c(const uint8_t *, int p); -#define vpx_highbd_avg_8x8 vpx_highbd_avg_8x8_c - -void vpx_highbd_comp_avg_pred_c(uint16_t *comp_pred, const uint8_t *pred8, int width, int height, const uint8_t *ref8, int ref_stride); -#define vpx_highbd_comp_avg_pred vpx_highbd_comp_avg_pred_c - -void vpx_highbd_convolve8_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h, int bps); -void vpx_highbd_convolve8_sse2(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h, int bps); -#define vpx_highbd_convolve8 vpx_highbd_convolve8_sse2 - -void vpx_highbd_convolve8_avg_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h, int bps); -void vpx_highbd_convolve8_avg_sse2(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h, int bps); -#define vpx_highbd_convolve8_avg vpx_highbd_convolve8_avg_sse2 - -void vpx_highbd_convolve8_avg_horiz_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h, int bps); -void vpx_highbd_convolve8_avg_horiz_sse2(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h, int bps); -#define vpx_highbd_convolve8_avg_horiz vpx_highbd_convolve8_avg_horiz_sse2 - -void vpx_highbd_convolve8_avg_vert_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h, int bps); -void vpx_highbd_convolve8_avg_vert_sse2(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h, int bps); -#define vpx_highbd_convolve8_avg_vert vpx_highbd_convolve8_avg_vert_sse2 - -void vpx_highbd_convolve8_horiz_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h, int bps); -void vpx_highbd_convolve8_horiz_sse2(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h, int bps); -#define vpx_highbd_convolve8_horiz vpx_highbd_convolve8_horiz_sse2 - -void vpx_highbd_convolve8_vert_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h, int bps); -void vpx_highbd_convolve8_vert_sse2(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h, int bps); -#define vpx_highbd_convolve8_vert vpx_highbd_convolve8_vert_sse2 - -void vpx_highbd_convolve_avg_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h, int bps); -void vpx_highbd_convolve_avg_sse2(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h, int bps); -#define vpx_highbd_convolve_avg vpx_highbd_convolve_avg_sse2 - -void vpx_highbd_convolve_copy_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h, int bps); -void vpx_highbd_convolve_copy_sse2(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h, int bps); -#define vpx_highbd_convolve_copy vpx_highbd_convolve_copy_sse2 - -void vpx_highbd_d117_predictor_16x16_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_d117_predictor_16x16 vpx_highbd_d117_predictor_16x16_c - -void vpx_highbd_d117_predictor_32x32_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_d117_predictor_32x32 vpx_highbd_d117_predictor_32x32_c - -void vpx_highbd_d117_predictor_4x4_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_d117_predictor_4x4 vpx_highbd_d117_predictor_4x4_c - -void vpx_highbd_d117_predictor_8x8_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_d117_predictor_8x8 vpx_highbd_d117_predictor_8x8_c - -void vpx_highbd_d135_predictor_16x16_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_d135_predictor_16x16 vpx_highbd_d135_predictor_16x16_c - -void vpx_highbd_d135_predictor_32x32_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_d135_predictor_32x32 vpx_highbd_d135_predictor_32x32_c - -void vpx_highbd_d135_predictor_4x4_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_d135_predictor_4x4 vpx_highbd_d135_predictor_4x4_c - -void vpx_highbd_d135_predictor_8x8_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_d135_predictor_8x8 vpx_highbd_d135_predictor_8x8_c - -void vpx_highbd_d153_predictor_16x16_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_d153_predictor_16x16 vpx_highbd_d153_predictor_16x16_c - -void vpx_highbd_d153_predictor_32x32_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_d153_predictor_32x32 vpx_highbd_d153_predictor_32x32_c - -void vpx_highbd_d153_predictor_4x4_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_d153_predictor_4x4 vpx_highbd_d153_predictor_4x4_c - -void vpx_highbd_d153_predictor_8x8_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_d153_predictor_8x8 vpx_highbd_d153_predictor_8x8_c - -void vpx_highbd_d207_predictor_16x16_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_d207_predictor_16x16 vpx_highbd_d207_predictor_16x16_c - -void vpx_highbd_d207_predictor_32x32_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_d207_predictor_32x32 vpx_highbd_d207_predictor_32x32_c - -void vpx_highbd_d207_predictor_4x4_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_d207_predictor_4x4 vpx_highbd_d207_predictor_4x4_c - -void vpx_highbd_d207_predictor_8x8_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_d207_predictor_8x8 vpx_highbd_d207_predictor_8x8_c - -void vpx_highbd_d207e_predictor_16x16_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_d207e_predictor_16x16 vpx_highbd_d207e_predictor_16x16_c - -void vpx_highbd_d207e_predictor_32x32_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_d207e_predictor_32x32 vpx_highbd_d207e_predictor_32x32_c - -void vpx_highbd_d207e_predictor_4x4_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_d207e_predictor_4x4 vpx_highbd_d207e_predictor_4x4_c - -void vpx_highbd_d207e_predictor_8x8_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_d207e_predictor_8x8 vpx_highbd_d207e_predictor_8x8_c - -void vpx_highbd_d45_predictor_16x16_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_d45_predictor_16x16 vpx_highbd_d45_predictor_16x16_c - -void vpx_highbd_d45_predictor_32x32_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_d45_predictor_32x32 vpx_highbd_d45_predictor_32x32_c - -void vpx_highbd_d45_predictor_4x4_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_d45_predictor_4x4 vpx_highbd_d45_predictor_4x4_c - -void vpx_highbd_d45_predictor_8x8_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_d45_predictor_8x8 vpx_highbd_d45_predictor_8x8_c - -void vpx_highbd_d45e_predictor_16x16_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_d45e_predictor_16x16 vpx_highbd_d45e_predictor_16x16_c - -void vpx_highbd_d45e_predictor_32x32_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_d45e_predictor_32x32 vpx_highbd_d45e_predictor_32x32_c - -void vpx_highbd_d45e_predictor_4x4_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_d45e_predictor_4x4 vpx_highbd_d45e_predictor_4x4_c - -void vpx_highbd_d45e_predictor_8x8_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_d45e_predictor_8x8 vpx_highbd_d45e_predictor_8x8_c - -void vpx_highbd_d63_predictor_16x16_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_d63_predictor_16x16 vpx_highbd_d63_predictor_16x16_c - -void vpx_highbd_d63_predictor_32x32_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_d63_predictor_32x32 vpx_highbd_d63_predictor_32x32_c - -void vpx_highbd_d63_predictor_4x4_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_d63_predictor_4x4 vpx_highbd_d63_predictor_4x4_c - -void vpx_highbd_d63_predictor_8x8_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_d63_predictor_8x8 vpx_highbd_d63_predictor_8x8_c - -void vpx_highbd_d63e_predictor_16x16_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_d63e_predictor_16x16 vpx_highbd_d63e_predictor_16x16_c - -void vpx_highbd_d63e_predictor_32x32_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_d63e_predictor_32x32 vpx_highbd_d63e_predictor_32x32_c - -void vpx_highbd_d63e_predictor_4x4_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_d63e_predictor_4x4 vpx_highbd_d63e_predictor_4x4_c - -void vpx_highbd_d63e_predictor_8x8_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_d63e_predictor_8x8 vpx_highbd_d63e_predictor_8x8_c - -void vpx_highbd_dc_128_predictor_16x16_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_dc_128_predictor_16x16 vpx_highbd_dc_128_predictor_16x16_c - -void vpx_highbd_dc_128_predictor_32x32_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_dc_128_predictor_32x32 vpx_highbd_dc_128_predictor_32x32_c - -void vpx_highbd_dc_128_predictor_4x4_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_dc_128_predictor_4x4 vpx_highbd_dc_128_predictor_4x4_c - -void vpx_highbd_dc_128_predictor_8x8_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_dc_128_predictor_8x8 vpx_highbd_dc_128_predictor_8x8_c - -void vpx_highbd_dc_left_predictor_16x16_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_dc_left_predictor_16x16 vpx_highbd_dc_left_predictor_16x16_c - -void vpx_highbd_dc_left_predictor_32x32_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_dc_left_predictor_32x32 vpx_highbd_dc_left_predictor_32x32_c - -void vpx_highbd_dc_left_predictor_4x4_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_dc_left_predictor_4x4 vpx_highbd_dc_left_predictor_4x4_c - -void vpx_highbd_dc_left_predictor_8x8_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_dc_left_predictor_8x8 vpx_highbd_dc_left_predictor_8x8_c - -void vpx_highbd_dc_predictor_16x16_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -void vpx_highbd_dc_predictor_16x16_sse2(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_dc_predictor_16x16 vpx_highbd_dc_predictor_16x16_sse2 - -void vpx_highbd_dc_predictor_32x32_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -void vpx_highbd_dc_predictor_32x32_sse2(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_dc_predictor_32x32 vpx_highbd_dc_predictor_32x32_sse2 - -void vpx_highbd_dc_predictor_4x4_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -void vpx_highbd_dc_predictor_4x4_sse2(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_dc_predictor_4x4 vpx_highbd_dc_predictor_4x4_sse2 - -void vpx_highbd_dc_predictor_8x8_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -void vpx_highbd_dc_predictor_8x8_sse2(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_dc_predictor_8x8 vpx_highbd_dc_predictor_8x8_sse2 - -void vpx_highbd_dc_top_predictor_16x16_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_dc_top_predictor_16x16 vpx_highbd_dc_top_predictor_16x16_c - -void vpx_highbd_dc_top_predictor_32x32_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_dc_top_predictor_32x32 vpx_highbd_dc_top_predictor_32x32_c - -void vpx_highbd_dc_top_predictor_4x4_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_dc_top_predictor_4x4 vpx_highbd_dc_top_predictor_4x4_c - -void vpx_highbd_dc_top_predictor_8x8_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_dc_top_predictor_8x8 vpx_highbd_dc_top_predictor_8x8_c - -void vpx_highbd_fdct16x16_c(const int16_t *input, tran_low_t *output, int stride); -void vpx_highbd_fdct16x16_sse2(const int16_t *input, tran_low_t *output, int stride); -#define vpx_highbd_fdct16x16 vpx_highbd_fdct16x16_sse2 - -void vpx_highbd_fdct16x16_1_c(const int16_t *input, tran_low_t *output, int stride); -#define vpx_highbd_fdct16x16_1 vpx_highbd_fdct16x16_1_c - -void vpx_highbd_fdct32x32_c(const int16_t *input, tran_low_t *output, int stride); -void vpx_highbd_fdct32x32_sse2(const int16_t *input, tran_low_t *output, int stride); -#define vpx_highbd_fdct32x32 vpx_highbd_fdct32x32_sse2 - -void vpx_highbd_fdct32x32_1_c(const int16_t *input, tran_low_t *output, int stride); -#define vpx_highbd_fdct32x32_1 vpx_highbd_fdct32x32_1_c - -void vpx_highbd_fdct32x32_rd_c(const int16_t *input, tran_low_t *output, int stride); -void vpx_highbd_fdct32x32_rd_sse2(const int16_t *input, tran_low_t *output, int stride); -#define vpx_highbd_fdct32x32_rd vpx_highbd_fdct32x32_rd_sse2 - -void vpx_highbd_fdct4x4_c(const int16_t *input, tran_low_t *output, int stride); -void vpx_highbd_fdct4x4_sse2(const int16_t *input, tran_low_t *output, int stride); -#define vpx_highbd_fdct4x4 vpx_highbd_fdct4x4_sse2 - -void vpx_highbd_fdct8x8_c(const int16_t *input, tran_low_t *output, int stride); -void vpx_highbd_fdct8x8_sse2(const int16_t *input, tran_low_t *output, int stride); -#define vpx_highbd_fdct8x8 vpx_highbd_fdct8x8_sse2 - -void vpx_highbd_fdct8x8_1_c(const int16_t *input, tran_low_t *output, int stride); -#define vpx_highbd_fdct8x8_1 vpx_highbd_fdct8x8_1_c - -void vpx_highbd_h_predictor_16x16_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_h_predictor_16x16 vpx_highbd_h_predictor_16x16_c - -void vpx_highbd_h_predictor_32x32_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_h_predictor_32x32 vpx_highbd_h_predictor_32x32_c - -void vpx_highbd_h_predictor_4x4_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_h_predictor_4x4 vpx_highbd_h_predictor_4x4_c - -void vpx_highbd_h_predictor_8x8_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_h_predictor_8x8 vpx_highbd_h_predictor_8x8_c - -void vpx_highbd_idct16x16_10_add_c(const tran_low_t *input, uint8_t *dest, int stride, int bd); -void vpx_highbd_idct16x16_10_add_sse2(const tran_low_t *input, uint8_t *dest, int stride, int bd); -#define vpx_highbd_idct16x16_10_add vpx_highbd_idct16x16_10_add_sse2 - -void vpx_highbd_idct16x16_1_add_c(const tran_low_t *input, uint8_t *dest, int stride, int bd); -#define vpx_highbd_idct16x16_1_add vpx_highbd_idct16x16_1_add_c - -void vpx_highbd_idct16x16_256_add_c(const tran_low_t *input, uint8_t *dest, int stride, int bd); -void vpx_highbd_idct16x16_256_add_sse2(const tran_low_t *input, uint8_t *dest, int stride, int bd); -#define vpx_highbd_idct16x16_256_add vpx_highbd_idct16x16_256_add_sse2 - -void vpx_highbd_idct32x32_1024_add_c(const tran_low_t *input, uint8_t *dest, int stride, int bd); -#define vpx_highbd_idct32x32_1024_add vpx_highbd_idct32x32_1024_add_c - -void vpx_highbd_idct32x32_1_add_c(const tran_low_t *input, uint8_t *dest, int stride, int bd); -void vpx_highbd_idct32x32_1_add_sse2(const tran_low_t *input, uint8_t *dest, int stride, int bd); -#define vpx_highbd_idct32x32_1_add vpx_highbd_idct32x32_1_add_sse2 - -void vpx_highbd_idct32x32_34_add_c(const tran_low_t *input, uint8_t *dest, int stride, int bd); -#define vpx_highbd_idct32x32_34_add vpx_highbd_idct32x32_34_add_c - -void vpx_highbd_idct4x4_16_add_c(const tran_low_t *input, uint8_t *dest, int stride, int bd); -void vpx_highbd_idct4x4_16_add_sse2(const tran_low_t *input, uint8_t *dest, int stride, int bd); -#define vpx_highbd_idct4x4_16_add vpx_highbd_idct4x4_16_add_sse2 - -void vpx_highbd_idct4x4_1_add_c(const tran_low_t *input, uint8_t *dest, int stride, int bd); -#define vpx_highbd_idct4x4_1_add vpx_highbd_idct4x4_1_add_c - -void vpx_highbd_idct8x8_12_add_c(const tran_low_t *input, uint8_t *dest, int stride, int bd); -void vpx_highbd_idct8x8_12_add_sse2(const tran_low_t *input, uint8_t *dest, int stride, int bd); -#define vpx_highbd_idct8x8_12_add vpx_highbd_idct8x8_12_add_sse2 - -void vpx_highbd_idct8x8_1_add_c(const tran_low_t *input, uint8_t *dest, int stride, int bd); -#define vpx_highbd_idct8x8_1_add vpx_highbd_idct8x8_1_add_c - -void vpx_highbd_idct8x8_64_add_c(const tran_low_t *input, uint8_t *dest, int stride, int bd); -void vpx_highbd_idct8x8_64_add_sse2(const tran_low_t *input, uint8_t *dest, int stride, int bd); -#define vpx_highbd_idct8x8_64_add vpx_highbd_idct8x8_64_add_sse2 - -void vpx_highbd_iwht4x4_16_add_c(const tran_low_t *input, uint8_t *dest, int stride, int bd); -#define vpx_highbd_iwht4x4_16_add vpx_highbd_iwht4x4_16_add_c - -void vpx_highbd_iwht4x4_1_add_c(const tran_low_t *input, uint8_t *dest, int stride, int bd); -#define vpx_highbd_iwht4x4_1_add vpx_highbd_iwht4x4_1_add_c - -void vpx_highbd_lpf_horizontal_16_c(uint16_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh, int bd); -void vpx_highbd_lpf_horizontal_16_sse2(uint16_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh, int bd); -#define vpx_highbd_lpf_horizontal_16 vpx_highbd_lpf_horizontal_16_sse2 - -void vpx_highbd_lpf_horizontal_16_dual_c(uint16_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh, int bd); -void vpx_highbd_lpf_horizontal_16_dual_sse2(uint16_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh, int bd); -#define vpx_highbd_lpf_horizontal_16_dual vpx_highbd_lpf_horizontal_16_dual_sse2 - -void vpx_highbd_lpf_horizontal_4_c(uint16_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh, int bd); -void vpx_highbd_lpf_horizontal_4_sse2(uint16_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh, int bd); -#define vpx_highbd_lpf_horizontal_4 vpx_highbd_lpf_horizontal_4_sse2 - -void vpx_highbd_lpf_horizontal_4_dual_c(uint16_t *s, int pitch, const uint8_t *blimit0, const uint8_t *limit0, const uint8_t *thresh0, const uint8_t *blimit1, const uint8_t *limit1, const uint8_t *thresh1, int bd); -void vpx_highbd_lpf_horizontal_4_dual_sse2(uint16_t *s, int pitch, const uint8_t *blimit0, const uint8_t *limit0, const uint8_t *thresh0, const uint8_t *blimit1, const uint8_t *limit1, const uint8_t *thresh1, int bd); -#define vpx_highbd_lpf_horizontal_4_dual vpx_highbd_lpf_horizontal_4_dual_sse2 - -void vpx_highbd_lpf_horizontal_8_c(uint16_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh, int bd); -void vpx_highbd_lpf_horizontal_8_sse2(uint16_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh, int bd); -#define vpx_highbd_lpf_horizontal_8 vpx_highbd_lpf_horizontal_8_sse2 - -void vpx_highbd_lpf_horizontal_8_dual_c(uint16_t *s, int pitch, const uint8_t *blimit0, const uint8_t *limit0, const uint8_t *thresh0, const uint8_t *blimit1, const uint8_t *limit1, const uint8_t *thresh1, int bd); -void vpx_highbd_lpf_horizontal_8_dual_sse2(uint16_t *s, int pitch, const uint8_t *blimit0, const uint8_t *limit0, const uint8_t *thresh0, const uint8_t *blimit1, const uint8_t *limit1, const uint8_t *thresh1, int bd); -#define vpx_highbd_lpf_horizontal_8_dual vpx_highbd_lpf_horizontal_8_dual_sse2 - -void vpx_highbd_lpf_vertical_16_c(uint16_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh, int bd); -void vpx_highbd_lpf_vertical_16_sse2(uint16_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh, int bd); -#define vpx_highbd_lpf_vertical_16 vpx_highbd_lpf_vertical_16_sse2 - -void vpx_highbd_lpf_vertical_16_dual_c(uint16_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh, int bd); -void vpx_highbd_lpf_vertical_16_dual_sse2(uint16_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh, int bd); -#define vpx_highbd_lpf_vertical_16_dual vpx_highbd_lpf_vertical_16_dual_sse2 - -void vpx_highbd_lpf_vertical_4_c(uint16_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh, int bd); -void vpx_highbd_lpf_vertical_4_sse2(uint16_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh, int bd); -#define vpx_highbd_lpf_vertical_4 vpx_highbd_lpf_vertical_4_sse2 - -void vpx_highbd_lpf_vertical_4_dual_c(uint16_t *s, int pitch, const uint8_t *blimit0, const uint8_t *limit0, const uint8_t *thresh0, const uint8_t *blimit1, const uint8_t *limit1, const uint8_t *thresh1, int bd); -void vpx_highbd_lpf_vertical_4_dual_sse2(uint16_t *s, int pitch, const uint8_t *blimit0, const uint8_t *limit0, const uint8_t *thresh0, const uint8_t *blimit1, const uint8_t *limit1, const uint8_t *thresh1, int bd); -#define vpx_highbd_lpf_vertical_4_dual vpx_highbd_lpf_vertical_4_dual_sse2 - -void vpx_highbd_lpf_vertical_8_c(uint16_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh, int bd); -void vpx_highbd_lpf_vertical_8_sse2(uint16_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh, int bd); -#define vpx_highbd_lpf_vertical_8 vpx_highbd_lpf_vertical_8_sse2 - -void vpx_highbd_lpf_vertical_8_dual_c(uint16_t *s, int pitch, const uint8_t *blimit0, const uint8_t *limit0, const uint8_t *thresh0, const uint8_t *blimit1, const uint8_t *limit1, const uint8_t *thresh1, int bd); -void vpx_highbd_lpf_vertical_8_dual_sse2(uint16_t *s, int pitch, const uint8_t *blimit0, const uint8_t *limit0, const uint8_t *thresh0, const uint8_t *blimit1, const uint8_t *limit1, const uint8_t *thresh1, int bd); -#define vpx_highbd_lpf_vertical_8_dual vpx_highbd_lpf_vertical_8_dual_sse2 - -void vpx_highbd_minmax_8x8_c(const uint8_t *s, int p, const uint8_t *d, int dp, int *min, int *max); -#define vpx_highbd_minmax_8x8 vpx_highbd_minmax_8x8_c - -void vpx_highbd_quantize_b_c(const tran_low_t *coeff_ptr, intptr_t n_coeffs, int skip_block, const int16_t *zbin_ptr, const int16_t *round_ptr, const int16_t *quant_ptr, const int16_t *quant_shift_ptr, tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr, const int16_t *dequant_ptr, uint16_t *eob_ptr, const int16_t *scan, const int16_t *iscan); -void vpx_highbd_quantize_b_sse2(const tran_low_t *coeff_ptr, intptr_t n_coeffs, int skip_block, const int16_t *zbin_ptr, const int16_t *round_ptr, const int16_t *quant_ptr, const int16_t *quant_shift_ptr, tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr, const int16_t *dequant_ptr, uint16_t *eob_ptr, const int16_t *scan, const int16_t *iscan); -#define vpx_highbd_quantize_b vpx_highbd_quantize_b_sse2 - -void vpx_highbd_quantize_b_32x32_c(const tran_low_t *coeff_ptr, intptr_t n_coeffs, int skip_block, const int16_t *zbin_ptr, const int16_t *round_ptr, const int16_t *quant_ptr, const int16_t *quant_shift_ptr, tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr, const int16_t *dequant_ptr, uint16_t *eob_ptr, const int16_t *scan, const int16_t *iscan); -void vpx_highbd_quantize_b_32x32_sse2(const tran_low_t *coeff_ptr, intptr_t n_coeffs, int skip_block, const int16_t *zbin_ptr, const int16_t *round_ptr, const int16_t *quant_ptr, const int16_t *quant_shift_ptr, tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr, const int16_t *dequant_ptr, uint16_t *eob_ptr, const int16_t *scan, const int16_t *iscan); -#define vpx_highbd_quantize_b_32x32 vpx_highbd_quantize_b_32x32_sse2 - -unsigned int vpx_highbd_sad16x16_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -unsigned int vpx_highbd_sad16x16_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -#define vpx_highbd_sad16x16 vpx_highbd_sad16x16_sse2 - -unsigned int vpx_highbd_sad16x16_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -unsigned int vpx_highbd_sad16x16_avg_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -#define vpx_highbd_sad16x16_avg vpx_highbd_sad16x16_avg_sse2 - -void vpx_highbd_sad16x16x3_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -#define vpx_highbd_sad16x16x3 vpx_highbd_sad16x16x3_c - -void vpx_highbd_sad16x16x4d_c(const uint8_t *src_ptr, int src_stride, const uint8_t* const ref_ptr[], int ref_stride, uint32_t *sad_array); -void vpx_highbd_sad16x16x4d_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t* const ref_ptr[], int ref_stride, uint32_t *sad_array); -#define vpx_highbd_sad16x16x4d vpx_highbd_sad16x16x4d_sse2 - -void vpx_highbd_sad16x16x8_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -#define vpx_highbd_sad16x16x8 vpx_highbd_sad16x16x8_c - -unsigned int vpx_highbd_sad16x32_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -unsigned int vpx_highbd_sad16x32_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -#define vpx_highbd_sad16x32 vpx_highbd_sad16x32_sse2 - -unsigned int vpx_highbd_sad16x32_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -unsigned int vpx_highbd_sad16x32_avg_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -#define vpx_highbd_sad16x32_avg vpx_highbd_sad16x32_avg_sse2 - -void vpx_highbd_sad16x32x4d_c(const uint8_t *src_ptr, int src_stride, const uint8_t* const ref_ptr[], int ref_stride, uint32_t *sad_array); -void vpx_highbd_sad16x32x4d_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t* const ref_ptr[], int ref_stride, uint32_t *sad_array); -#define vpx_highbd_sad16x32x4d vpx_highbd_sad16x32x4d_sse2 - -unsigned int vpx_highbd_sad16x8_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -unsigned int vpx_highbd_sad16x8_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -#define vpx_highbd_sad16x8 vpx_highbd_sad16x8_sse2 - -unsigned int vpx_highbd_sad16x8_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -unsigned int vpx_highbd_sad16x8_avg_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -#define vpx_highbd_sad16x8_avg vpx_highbd_sad16x8_avg_sse2 - -void vpx_highbd_sad16x8x3_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -#define vpx_highbd_sad16x8x3 vpx_highbd_sad16x8x3_c - -void vpx_highbd_sad16x8x4d_c(const uint8_t *src_ptr, int src_stride, const uint8_t* const ref_ptr[], int ref_stride, uint32_t *sad_array); -void vpx_highbd_sad16x8x4d_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t* const ref_ptr[], int ref_stride, uint32_t *sad_array); -#define vpx_highbd_sad16x8x4d vpx_highbd_sad16x8x4d_sse2 - -void vpx_highbd_sad16x8x8_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -#define vpx_highbd_sad16x8x8 vpx_highbd_sad16x8x8_c - -unsigned int vpx_highbd_sad32x16_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -unsigned int vpx_highbd_sad32x16_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -#define vpx_highbd_sad32x16 vpx_highbd_sad32x16_sse2 - -unsigned int vpx_highbd_sad32x16_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -unsigned int vpx_highbd_sad32x16_avg_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -#define vpx_highbd_sad32x16_avg vpx_highbd_sad32x16_avg_sse2 - -void vpx_highbd_sad32x16x4d_c(const uint8_t *src_ptr, int src_stride, const uint8_t* const ref_ptr[], int ref_stride, uint32_t *sad_array); -void vpx_highbd_sad32x16x4d_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t* const ref_ptr[], int ref_stride, uint32_t *sad_array); -#define vpx_highbd_sad32x16x4d vpx_highbd_sad32x16x4d_sse2 - -unsigned int vpx_highbd_sad32x32_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -unsigned int vpx_highbd_sad32x32_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -#define vpx_highbd_sad32x32 vpx_highbd_sad32x32_sse2 - -unsigned int vpx_highbd_sad32x32_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -unsigned int vpx_highbd_sad32x32_avg_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -#define vpx_highbd_sad32x32_avg vpx_highbd_sad32x32_avg_sse2 - -void vpx_highbd_sad32x32x3_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -#define vpx_highbd_sad32x32x3 vpx_highbd_sad32x32x3_c - -void vpx_highbd_sad32x32x4d_c(const uint8_t *src_ptr, int src_stride, const uint8_t* const ref_ptr[], int ref_stride, uint32_t *sad_array); -void vpx_highbd_sad32x32x4d_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t* const ref_ptr[], int ref_stride, uint32_t *sad_array); -#define vpx_highbd_sad32x32x4d vpx_highbd_sad32x32x4d_sse2 - -void vpx_highbd_sad32x32x8_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -#define vpx_highbd_sad32x32x8 vpx_highbd_sad32x32x8_c - -unsigned int vpx_highbd_sad32x64_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -unsigned int vpx_highbd_sad32x64_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -#define vpx_highbd_sad32x64 vpx_highbd_sad32x64_sse2 - -unsigned int vpx_highbd_sad32x64_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -unsigned int vpx_highbd_sad32x64_avg_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -#define vpx_highbd_sad32x64_avg vpx_highbd_sad32x64_avg_sse2 - -void vpx_highbd_sad32x64x4d_c(const uint8_t *src_ptr, int src_stride, const uint8_t* const ref_ptr[], int ref_stride, uint32_t *sad_array); -void vpx_highbd_sad32x64x4d_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t* const ref_ptr[], int ref_stride, uint32_t *sad_array); -#define vpx_highbd_sad32x64x4d vpx_highbd_sad32x64x4d_sse2 - -unsigned int vpx_highbd_sad4x4_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -#define vpx_highbd_sad4x4 vpx_highbd_sad4x4_c - -unsigned int vpx_highbd_sad4x4_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -#define vpx_highbd_sad4x4_avg vpx_highbd_sad4x4_avg_c - -void vpx_highbd_sad4x4x3_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -#define vpx_highbd_sad4x4x3 vpx_highbd_sad4x4x3_c - -void vpx_highbd_sad4x4x4d_c(const uint8_t *src_ptr, int src_stride, const uint8_t* const ref_ptr[], int ref_stride, uint32_t *sad_array); -void vpx_highbd_sad4x4x4d_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t* const ref_ptr[], int ref_stride, uint32_t *sad_array); -#define vpx_highbd_sad4x4x4d vpx_highbd_sad4x4x4d_sse2 - -void vpx_highbd_sad4x4x8_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -#define vpx_highbd_sad4x4x8 vpx_highbd_sad4x4x8_c - -unsigned int vpx_highbd_sad4x8_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -#define vpx_highbd_sad4x8 vpx_highbd_sad4x8_c - -unsigned int vpx_highbd_sad4x8_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -#define vpx_highbd_sad4x8_avg vpx_highbd_sad4x8_avg_c - -void vpx_highbd_sad4x8x4d_c(const uint8_t *src_ptr, int src_stride, const uint8_t* const ref_ptr[], int ref_stride, uint32_t *sad_array); -void vpx_highbd_sad4x8x4d_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t* const ref_ptr[], int ref_stride, uint32_t *sad_array); -#define vpx_highbd_sad4x8x4d vpx_highbd_sad4x8x4d_sse2 - -void vpx_highbd_sad4x8x8_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -#define vpx_highbd_sad4x8x8 vpx_highbd_sad4x8x8_c - -unsigned int vpx_highbd_sad64x32_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -unsigned int vpx_highbd_sad64x32_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -#define vpx_highbd_sad64x32 vpx_highbd_sad64x32_sse2 - -unsigned int vpx_highbd_sad64x32_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -unsigned int vpx_highbd_sad64x32_avg_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -#define vpx_highbd_sad64x32_avg vpx_highbd_sad64x32_avg_sse2 - -void vpx_highbd_sad64x32x4d_c(const uint8_t *src_ptr, int src_stride, const uint8_t* const ref_ptr[], int ref_stride, uint32_t *sad_array); -void vpx_highbd_sad64x32x4d_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t* const ref_ptr[], int ref_stride, uint32_t *sad_array); -#define vpx_highbd_sad64x32x4d vpx_highbd_sad64x32x4d_sse2 - -unsigned int vpx_highbd_sad64x64_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -unsigned int vpx_highbd_sad64x64_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -#define vpx_highbd_sad64x64 vpx_highbd_sad64x64_sse2 - -unsigned int vpx_highbd_sad64x64_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -unsigned int vpx_highbd_sad64x64_avg_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -#define vpx_highbd_sad64x64_avg vpx_highbd_sad64x64_avg_sse2 - -void vpx_highbd_sad64x64x3_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -#define vpx_highbd_sad64x64x3 vpx_highbd_sad64x64x3_c - -void vpx_highbd_sad64x64x4d_c(const uint8_t *src_ptr, int src_stride, const uint8_t* const ref_ptr[], int ref_stride, uint32_t *sad_array); -void vpx_highbd_sad64x64x4d_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t* const ref_ptr[], int ref_stride, uint32_t *sad_array); -#define vpx_highbd_sad64x64x4d vpx_highbd_sad64x64x4d_sse2 - -void vpx_highbd_sad64x64x8_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -#define vpx_highbd_sad64x64x8 vpx_highbd_sad64x64x8_c - -unsigned int vpx_highbd_sad8x16_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -unsigned int vpx_highbd_sad8x16_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -#define vpx_highbd_sad8x16 vpx_highbd_sad8x16_sse2 - -unsigned int vpx_highbd_sad8x16_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -unsigned int vpx_highbd_sad8x16_avg_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -#define vpx_highbd_sad8x16_avg vpx_highbd_sad8x16_avg_sse2 - -void vpx_highbd_sad8x16x3_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -#define vpx_highbd_sad8x16x3 vpx_highbd_sad8x16x3_c - -void vpx_highbd_sad8x16x4d_c(const uint8_t *src_ptr, int src_stride, const uint8_t* const ref_ptr[], int ref_stride, uint32_t *sad_array); -void vpx_highbd_sad8x16x4d_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t* const ref_ptr[], int ref_stride, uint32_t *sad_array); -#define vpx_highbd_sad8x16x4d vpx_highbd_sad8x16x4d_sse2 - -void vpx_highbd_sad8x16x8_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -#define vpx_highbd_sad8x16x8 vpx_highbd_sad8x16x8_c - -unsigned int vpx_highbd_sad8x4_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -unsigned int vpx_highbd_sad8x4_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -#define vpx_highbd_sad8x4 vpx_highbd_sad8x4_sse2 - -unsigned int vpx_highbd_sad8x4_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -unsigned int vpx_highbd_sad8x4_avg_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -#define vpx_highbd_sad8x4_avg vpx_highbd_sad8x4_avg_sse2 - -void vpx_highbd_sad8x4x4d_c(const uint8_t *src_ptr, int src_stride, const uint8_t* const ref_ptr[], int ref_stride, uint32_t *sad_array); -void vpx_highbd_sad8x4x4d_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t* const ref_ptr[], int ref_stride, uint32_t *sad_array); -#define vpx_highbd_sad8x4x4d vpx_highbd_sad8x4x4d_sse2 - -void vpx_highbd_sad8x4x8_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -#define vpx_highbd_sad8x4x8 vpx_highbd_sad8x4x8_c - -unsigned int vpx_highbd_sad8x8_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -unsigned int vpx_highbd_sad8x8_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -#define vpx_highbd_sad8x8 vpx_highbd_sad8x8_sse2 - -unsigned int vpx_highbd_sad8x8_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -unsigned int vpx_highbd_sad8x8_avg_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -#define vpx_highbd_sad8x8_avg vpx_highbd_sad8x8_avg_sse2 - -void vpx_highbd_sad8x8x3_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -#define vpx_highbd_sad8x8x3 vpx_highbd_sad8x8x3_c - -void vpx_highbd_sad8x8x4d_c(const uint8_t *src_ptr, int src_stride, const uint8_t* const ref_ptr[], int ref_stride, uint32_t *sad_array); -void vpx_highbd_sad8x8x4d_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t* const ref_ptr[], int ref_stride, uint32_t *sad_array); -#define vpx_highbd_sad8x8x4d vpx_highbd_sad8x8x4d_sse2 - -void vpx_highbd_sad8x8x8_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -#define vpx_highbd_sad8x8x8 vpx_highbd_sad8x8x8_c - -void vpx_highbd_subtract_block_c(int rows, int cols, int16_t *diff_ptr, ptrdiff_t diff_stride, const uint8_t *src_ptr, ptrdiff_t src_stride, const uint8_t *pred_ptr, ptrdiff_t pred_stride, int bd); -#define vpx_highbd_subtract_block vpx_highbd_subtract_block_c - -void vpx_highbd_tm_predictor_16x16_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -void vpx_highbd_tm_predictor_16x16_sse2(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_tm_predictor_16x16 vpx_highbd_tm_predictor_16x16_sse2 - -void vpx_highbd_tm_predictor_32x32_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -void vpx_highbd_tm_predictor_32x32_sse2(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_tm_predictor_32x32 vpx_highbd_tm_predictor_32x32_sse2 - -void vpx_highbd_tm_predictor_4x4_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -void vpx_highbd_tm_predictor_4x4_sse2(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_tm_predictor_4x4 vpx_highbd_tm_predictor_4x4_sse2 - -void vpx_highbd_tm_predictor_8x8_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -void vpx_highbd_tm_predictor_8x8_sse2(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_tm_predictor_8x8 vpx_highbd_tm_predictor_8x8_sse2 - -void vpx_highbd_v_predictor_16x16_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -void vpx_highbd_v_predictor_16x16_sse2(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_v_predictor_16x16 vpx_highbd_v_predictor_16x16_sse2 - -void vpx_highbd_v_predictor_32x32_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -void vpx_highbd_v_predictor_32x32_sse2(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_v_predictor_32x32 vpx_highbd_v_predictor_32x32_sse2 - -void vpx_highbd_v_predictor_4x4_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -void vpx_highbd_v_predictor_4x4_sse2(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_v_predictor_4x4 vpx_highbd_v_predictor_4x4_sse2 - -void vpx_highbd_v_predictor_8x8_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -void vpx_highbd_v_predictor_8x8_sse2(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd); -#define vpx_highbd_v_predictor_8x8 vpx_highbd_v_predictor_8x8_sse2 - -void vpx_idct16x16_10_add_c(const tran_low_t *input, uint8_t *dest, int stride); -void vpx_idct16x16_10_add_sse2(const tran_low_t *input, uint8_t *dest, int stride); -#define vpx_idct16x16_10_add vpx_idct16x16_10_add_sse2 - -void vpx_idct16x16_1_add_c(const tran_low_t *input, uint8_t *dest, int stride); -void vpx_idct16x16_1_add_sse2(const tran_low_t *input, uint8_t *dest, int stride); -#define vpx_idct16x16_1_add vpx_idct16x16_1_add_sse2 - -void vpx_idct16x16_256_add_c(const tran_low_t *input, uint8_t *dest, int stride); -void vpx_idct16x16_256_add_sse2(const tran_low_t *input, uint8_t *dest, int stride); -#define vpx_idct16x16_256_add vpx_idct16x16_256_add_sse2 - -void vpx_idct32x32_1024_add_c(const tran_low_t *input, uint8_t *dest, int stride); -void vpx_idct32x32_1024_add_sse2(const tran_low_t *input, uint8_t *dest, int stride); -void vpx_idct32x32_1024_add_ssse3(const tran_low_t *input, uint8_t *dest, int stride); -RTCD_EXTERN void (*vpx_idct32x32_1024_add)(const tran_low_t *input, uint8_t *dest, int stride); - -void vpx_idct32x32_135_add_c(const tran_low_t *input, uint8_t *dest, int stride); -void vpx_idct32x32_1024_add_sse2(const tran_low_t *input, uint8_t *dest, int stride); -void vpx_idct32x32_135_add_ssse3(const tran_low_t *input, uint8_t *dest, int stride); -RTCD_EXTERN void (*vpx_idct32x32_135_add)(const tran_low_t *input, uint8_t *dest, int stride); - -void vpx_idct32x32_1_add_c(const tran_low_t *input, uint8_t *dest, int stride); -void vpx_idct32x32_1_add_sse2(const tran_low_t *input, uint8_t *dest, int stride); -#define vpx_idct32x32_1_add vpx_idct32x32_1_add_sse2 - -void vpx_idct32x32_34_add_c(const tran_low_t *input, uint8_t *dest, int stride); -void vpx_idct32x32_34_add_sse2(const tran_low_t *input, uint8_t *dest, int stride); -void vpx_idct32x32_34_add_ssse3(const tran_low_t *input, uint8_t *dest, int stride); -RTCD_EXTERN void (*vpx_idct32x32_34_add)(const tran_low_t *input, uint8_t *dest, int stride); - -void vpx_idct4x4_16_add_c(const tran_low_t *input, uint8_t *dest, int stride); -void vpx_idct4x4_16_add_sse2(const tran_low_t *input, uint8_t *dest, int stride); -#define vpx_idct4x4_16_add vpx_idct4x4_16_add_sse2 - -void vpx_idct4x4_1_add_c(const tran_low_t *input, uint8_t *dest, int stride); -void vpx_idct4x4_1_add_sse2(const tran_low_t *input, uint8_t *dest, int stride); -#define vpx_idct4x4_1_add vpx_idct4x4_1_add_sse2 - -void vpx_idct8x8_12_add_c(const tran_low_t *input, uint8_t *dest, int stride); -void vpx_idct8x8_12_add_sse2(const tran_low_t *input, uint8_t *dest, int stride); -void vpx_idct8x8_12_add_ssse3(const tran_low_t *input, uint8_t *dest, int stride); -RTCD_EXTERN void (*vpx_idct8x8_12_add)(const tran_low_t *input, uint8_t *dest, int stride); - -void vpx_idct8x8_1_add_c(const tran_low_t *input, uint8_t *dest, int stride); -void vpx_idct8x8_1_add_sse2(const tran_low_t *input, uint8_t *dest, int stride); -#define vpx_idct8x8_1_add vpx_idct8x8_1_add_sse2 - -void vpx_idct8x8_64_add_c(const tran_low_t *input, uint8_t *dest, int stride); -void vpx_idct8x8_64_add_sse2(const tran_low_t *input, uint8_t *dest, int stride); -void vpx_idct8x8_64_add_ssse3(const tran_low_t *input, uint8_t *dest, int stride); -RTCD_EXTERN void (*vpx_idct8x8_64_add)(const tran_low_t *input, uint8_t *dest, int stride); - -int16_t vpx_int_pro_col_c(const uint8_t *ref, const int width); -int16_t vpx_int_pro_col_sse2(const uint8_t *ref, const int width); -#define vpx_int_pro_col vpx_int_pro_col_sse2 - -void vpx_int_pro_row_c(int16_t *hbuf, const uint8_t *ref, const int ref_stride, const int height); -void vpx_int_pro_row_sse2(int16_t *hbuf, const uint8_t *ref, const int ref_stride, const int height); -#define vpx_int_pro_row vpx_int_pro_row_sse2 - -void vpx_iwht4x4_16_add_c(const tran_low_t *input, uint8_t *dest, int stride); -void vpx_iwht4x4_16_add_sse2(const tran_low_t *input, uint8_t *dest, int stride); -#define vpx_iwht4x4_16_add vpx_iwht4x4_16_add_sse2 - -void vpx_iwht4x4_1_add_c(const tran_low_t *input, uint8_t *dest, int stride); -#define vpx_iwht4x4_1_add vpx_iwht4x4_1_add_c - -void vpx_lpf_horizontal_16_c(uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh); -void vpx_lpf_horizontal_16_sse2(uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh); -void vpx_lpf_horizontal_16_avx2(uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh); -RTCD_EXTERN void (*vpx_lpf_horizontal_16)(uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh); - -void vpx_lpf_horizontal_16_dual_c(uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh); -void vpx_lpf_horizontal_16_dual_sse2(uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh); -void vpx_lpf_horizontal_16_dual_avx2(uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh); -RTCD_EXTERN void (*vpx_lpf_horizontal_16_dual)(uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh); - -void vpx_lpf_horizontal_4_c(uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh); -void vpx_lpf_horizontal_4_sse2(uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh); -#define vpx_lpf_horizontal_4 vpx_lpf_horizontal_4_sse2 - -void vpx_lpf_horizontal_4_dual_c(uint8_t *s, int pitch, const uint8_t *blimit0, const uint8_t *limit0, const uint8_t *thresh0, const uint8_t *blimit1, const uint8_t *limit1, const uint8_t *thresh1); -void vpx_lpf_horizontal_4_dual_sse2(uint8_t *s, int pitch, const uint8_t *blimit0, const uint8_t *limit0, const uint8_t *thresh0, const uint8_t *blimit1, const uint8_t *limit1, const uint8_t *thresh1); -#define vpx_lpf_horizontal_4_dual vpx_lpf_horizontal_4_dual_sse2 - -void vpx_lpf_horizontal_8_c(uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh); -void vpx_lpf_horizontal_8_sse2(uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh); -#define vpx_lpf_horizontal_8 vpx_lpf_horizontal_8_sse2 - -void vpx_lpf_horizontal_8_dual_c(uint8_t *s, int pitch, const uint8_t *blimit0, const uint8_t *limit0, const uint8_t *thresh0, const uint8_t *blimit1, const uint8_t *limit1, const uint8_t *thresh1); -void vpx_lpf_horizontal_8_dual_sse2(uint8_t *s, int pitch, const uint8_t *blimit0, const uint8_t *limit0, const uint8_t *thresh0, const uint8_t *blimit1, const uint8_t *limit1, const uint8_t *thresh1); -#define vpx_lpf_horizontal_8_dual vpx_lpf_horizontal_8_dual_sse2 - -void vpx_lpf_vertical_16_c(uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh); -void vpx_lpf_vertical_16_sse2(uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh); -#define vpx_lpf_vertical_16 vpx_lpf_vertical_16_sse2 - -void vpx_lpf_vertical_16_dual_c(uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh); -void vpx_lpf_vertical_16_dual_sse2(uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh); -#define vpx_lpf_vertical_16_dual vpx_lpf_vertical_16_dual_sse2 - -void vpx_lpf_vertical_4_c(uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh); -void vpx_lpf_vertical_4_sse2(uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh); -#define vpx_lpf_vertical_4 vpx_lpf_vertical_4_sse2 - -void vpx_lpf_vertical_4_dual_c(uint8_t *s, int pitch, const uint8_t *blimit0, const uint8_t *limit0, const uint8_t *thresh0, const uint8_t *blimit1, const uint8_t *limit1, const uint8_t *thresh1); -void vpx_lpf_vertical_4_dual_sse2(uint8_t *s, int pitch, const uint8_t *blimit0, const uint8_t *limit0, const uint8_t *thresh0, const uint8_t *blimit1, const uint8_t *limit1, const uint8_t *thresh1); -#define vpx_lpf_vertical_4_dual vpx_lpf_vertical_4_dual_sse2 - -void vpx_lpf_vertical_8_c(uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh); -void vpx_lpf_vertical_8_sse2(uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh); -#define vpx_lpf_vertical_8 vpx_lpf_vertical_8_sse2 - -void vpx_lpf_vertical_8_dual_c(uint8_t *s, int pitch, const uint8_t *blimit0, const uint8_t *limit0, const uint8_t *thresh0, const uint8_t *blimit1, const uint8_t *limit1, const uint8_t *thresh1); -void vpx_lpf_vertical_8_dual_sse2(uint8_t *s, int pitch, const uint8_t *blimit0, const uint8_t *limit0, const uint8_t *thresh0, const uint8_t *blimit1, const uint8_t *limit1, const uint8_t *thresh1); -#define vpx_lpf_vertical_8_dual vpx_lpf_vertical_8_dual_sse2 - -void vpx_mbpost_proc_across_ip_c(unsigned char *dst, int pitch, int rows, int cols,int flimit); -void vpx_mbpost_proc_across_ip_sse2(unsigned char *dst, int pitch, int rows, int cols,int flimit); -#define vpx_mbpost_proc_across_ip vpx_mbpost_proc_across_ip_sse2 - -void vpx_mbpost_proc_down_c(unsigned char *dst, int pitch, int rows, int cols,int flimit); -void vpx_mbpost_proc_down_sse2(unsigned char *dst, int pitch, int rows, int cols,int flimit); -#define vpx_mbpost_proc_down vpx_mbpost_proc_down_sse2 - -void vpx_minmax_8x8_c(const uint8_t *s, int p, const uint8_t *d, int dp, int *min, int *max); -void vpx_minmax_8x8_sse2(const uint8_t *s, int p, const uint8_t *d, int dp, int *min, int *max); -#define vpx_minmax_8x8 vpx_minmax_8x8_sse2 - -unsigned int vpx_mse16x16_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int recon_stride, unsigned int *sse); -unsigned int vpx_mse16x16_sse2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int recon_stride, unsigned int *sse); -unsigned int vpx_mse16x16_avx2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int recon_stride, unsigned int *sse); -RTCD_EXTERN unsigned int (*vpx_mse16x16)(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int recon_stride, unsigned int *sse); - -unsigned int vpx_mse16x8_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int recon_stride, unsigned int *sse); -unsigned int vpx_mse16x8_sse2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int recon_stride, unsigned int *sse); -#define vpx_mse16x8 vpx_mse16x8_sse2 - -unsigned int vpx_mse8x16_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int recon_stride, unsigned int *sse); -unsigned int vpx_mse8x16_sse2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int recon_stride, unsigned int *sse); -#define vpx_mse8x16 vpx_mse8x16_sse2 - -unsigned int vpx_mse8x8_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int recon_stride, unsigned int *sse); -unsigned int vpx_mse8x8_sse2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int recon_stride, unsigned int *sse); -#define vpx_mse8x8 vpx_mse8x8_sse2 - -void vpx_plane_add_noise_c(uint8_t *start, const int8_t *noise, int blackclamp, int whiteclamp, int width, int height, int pitch); -void vpx_plane_add_noise_sse2(uint8_t *start, const int8_t *noise, int blackclamp, int whiteclamp, int width, int height, int pitch); -#define vpx_plane_add_noise vpx_plane_add_noise_sse2 - -void vpx_post_proc_down_and_across_mb_row_c(unsigned char *src, unsigned char *dst, int src_pitch, int dst_pitch, int cols, unsigned char *flimits, int size); -void vpx_post_proc_down_and_across_mb_row_sse2(unsigned char *src, unsigned char *dst, int src_pitch, int dst_pitch, int cols, unsigned char *flimits, int size); -#define vpx_post_proc_down_and_across_mb_row vpx_post_proc_down_and_across_mb_row_sse2 - -void vpx_quantize_b_c(const tran_low_t *coeff_ptr, intptr_t n_coeffs, int skip_block, const int16_t *zbin_ptr, const int16_t *round_ptr, const int16_t *quant_ptr, const int16_t *quant_shift_ptr, tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr, const int16_t *dequant_ptr, uint16_t *eob_ptr, const int16_t *scan, const int16_t *iscan); -void vpx_quantize_b_sse2(const tran_low_t *coeff_ptr, intptr_t n_coeffs, int skip_block, const int16_t *zbin_ptr, const int16_t *round_ptr, const int16_t *quant_ptr, const int16_t *quant_shift_ptr, tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr, const int16_t *dequant_ptr, uint16_t *eob_ptr, const int16_t *scan, const int16_t *iscan); -void vpx_quantize_b_ssse3(const tran_low_t *coeff_ptr, intptr_t n_coeffs, int skip_block, const int16_t *zbin_ptr, const int16_t *round_ptr, const int16_t *quant_ptr, const int16_t *quant_shift_ptr, tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr, const int16_t *dequant_ptr, uint16_t *eob_ptr, const int16_t *scan, const int16_t *iscan); -void vpx_quantize_b_avx(const tran_low_t *coeff_ptr, intptr_t n_coeffs, int skip_block, const int16_t *zbin_ptr, const int16_t *round_ptr, const int16_t *quant_ptr, const int16_t *quant_shift_ptr, tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr, const int16_t *dequant_ptr, uint16_t *eob_ptr, const int16_t *scan, const int16_t *iscan); -RTCD_EXTERN void (*vpx_quantize_b)(const tran_low_t *coeff_ptr, intptr_t n_coeffs, int skip_block, const int16_t *zbin_ptr, const int16_t *round_ptr, const int16_t *quant_ptr, const int16_t *quant_shift_ptr, tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr, const int16_t *dequant_ptr, uint16_t *eob_ptr, const int16_t *scan, const int16_t *iscan); - -void vpx_quantize_b_32x32_c(const tran_low_t *coeff_ptr, intptr_t n_coeffs, int skip_block, const int16_t *zbin_ptr, const int16_t *round_ptr, const int16_t *quant_ptr, const int16_t *quant_shift_ptr, tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr, const int16_t *dequant_ptr, uint16_t *eob_ptr, const int16_t *scan, const int16_t *iscan); -void vpx_quantize_b_32x32_ssse3(const tran_low_t *coeff_ptr, intptr_t n_coeffs, int skip_block, const int16_t *zbin_ptr, const int16_t *round_ptr, const int16_t *quant_ptr, const int16_t *quant_shift_ptr, tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr, const int16_t *dequant_ptr, uint16_t *eob_ptr, const int16_t *scan, const int16_t *iscan); -void vpx_quantize_b_32x32_avx(const tran_low_t *coeff_ptr, intptr_t n_coeffs, int skip_block, const int16_t *zbin_ptr, const int16_t *round_ptr, const int16_t *quant_ptr, const int16_t *quant_shift_ptr, tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr, const int16_t *dequant_ptr, uint16_t *eob_ptr, const int16_t *scan, const int16_t *iscan); -RTCD_EXTERN void (*vpx_quantize_b_32x32)(const tran_low_t *coeff_ptr, intptr_t n_coeffs, int skip_block, const int16_t *zbin_ptr, const int16_t *round_ptr, const int16_t *quant_ptr, const int16_t *quant_shift_ptr, tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr, const int16_t *dequant_ptr, uint16_t *eob_ptr, const int16_t *scan, const int16_t *iscan); - -unsigned int vpx_sad16x16_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -unsigned int vpx_sad16x16_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -#define vpx_sad16x16 vpx_sad16x16_sse2 - -unsigned int vpx_sad16x16_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -unsigned int vpx_sad16x16_avg_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -#define vpx_sad16x16_avg vpx_sad16x16_avg_sse2 - -void vpx_sad16x16x3_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -void vpx_sad16x16x3_sse3(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -void vpx_sad16x16x3_ssse3(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -RTCD_EXTERN void (*vpx_sad16x16x3)(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); - -void vpx_sad16x16x4d_c(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); -void vpx_sad16x16x4d_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); -#define vpx_sad16x16x4d vpx_sad16x16x4d_sse2 - -void vpx_sad16x16x8_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -void vpx_sad16x16x8_sse4_1(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -RTCD_EXTERN void (*vpx_sad16x16x8)(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); - -unsigned int vpx_sad16x32_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -unsigned int vpx_sad16x32_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -#define vpx_sad16x32 vpx_sad16x32_sse2 - -unsigned int vpx_sad16x32_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -unsigned int vpx_sad16x32_avg_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -#define vpx_sad16x32_avg vpx_sad16x32_avg_sse2 - -void vpx_sad16x32x4d_c(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); -void vpx_sad16x32x4d_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); -#define vpx_sad16x32x4d vpx_sad16x32x4d_sse2 - -unsigned int vpx_sad16x8_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -unsigned int vpx_sad16x8_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -#define vpx_sad16x8 vpx_sad16x8_sse2 - -unsigned int vpx_sad16x8_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -unsigned int vpx_sad16x8_avg_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -#define vpx_sad16x8_avg vpx_sad16x8_avg_sse2 - -void vpx_sad16x8x3_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -void vpx_sad16x8x3_sse3(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -void vpx_sad16x8x3_ssse3(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -RTCD_EXTERN void (*vpx_sad16x8x3)(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); - -void vpx_sad16x8x4d_c(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); -void vpx_sad16x8x4d_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); -#define vpx_sad16x8x4d vpx_sad16x8x4d_sse2 - -void vpx_sad16x8x8_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -void vpx_sad16x8x8_sse4_1(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -RTCD_EXTERN void (*vpx_sad16x8x8)(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); - -unsigned int vpx_sad32x16_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -unsigned int vpx_sad32x16_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -unsigned int vpx_sad32x16_avx2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -RTCD_EXTERN unsigned int (*vpx_sad32x16)(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); - -unsigned int vpx_sad32x16_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -unsigned int vpx_sad32x16_avg_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -unsigned int vpx_sad32x16_avg_avx2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -RTCD_EXTERN unsigned int (*vpx_sad32x16_avg)(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); - -void vpx_sad32x16x4d_c(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); -void vpx_sad32x16x4d_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); -#define vpx_sad32x16x4d vpx_sad32x16x4d_sse2 - -unsigned int vpx_sad32x32_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -unsigned int vpx_sad32x32_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -unsigned int vpx_sad32x32_avx2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -RTCD_EXTERN unsigned int (*vpx_sad32x32)(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); - -unsigned int vpx_sad32x32_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -unsigned int vpx_sad32x32_avg_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -unsigned int vpx_sad32x32_avg_avx2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -RTCD_EXTERN unsigned int (*vpx_sad32x32_avg)(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); - -void vpx_sad32x32x3_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -#define vpx_sad32x32x3 vpx_sad32x32x3_c - -void vpx_sad32x32x4d_c(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); -void vpx_sad32x32x4d_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); -void vpx_sad32x32x4d_avx2(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); -RTCD_EXTERN void (*vpx_sad32x32x4d)(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); - -void vpx_sad32x32x8_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -#define vpx_sad32x32x8 vpx_sad32x32x8_c - -unsigned int vpx_sad32x64_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -unsigned int vpx_sad32x64_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -unsigned int vpx_sad32x64_avx2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -RTCD_EXTERN unsigned int (*vpx_sad32x64)(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); - -unsigned int vpx_sad32x64_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -unsigned int vpx_sad32x64_avg_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -unsigned int vpx_sad32x64_avg_avx2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -RTCD_EXTERN unsigned int (*vpx_sad32x64_avg)(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); - -void vpx_sad32x64x4d_c(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); -void vpx_sad32x64x4d_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); -#define vpx_sad32x64x4d vpx_sad32x64x4d_sse2 - -unsigned int vpx_sad4x4_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -unsigned int vpx_sad4x4_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -#define vpx_sad4x4 vpx_sad4x4_sse2 - -unsigned int vpx_sad4x4_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -unsigned int vpx_sad4x4_avg_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -#define vpx_sad4x4_avg vpx_sad4x4_avg_sse2 - -void vpx_sad4x4x3_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -void vpx_sad4x4x3_sse3(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -RTCD_EXTERN void (*vpx_sad4x4x3)(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); - -void vpx_sad4x4x4d_c(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); -void vpx_sad4x4x4d_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); -#define vpx_sad4x4x4d vpx_sad4x4x4d_sse2 - -void vpx_sad4x4x8_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -void vpx_sad4x4x8_sse4_1(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -RTCD_EXTERN void (*vpx_sad4x4x8)(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); - -unsigned int vpx_sad4x8_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -unsigned int vpx_sad4x8_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -#define vpx_sad4x8 vpx_sad4x8_sse2 - -unsigned int vpx_sad4x8_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -unsigned int vpx_sad4x8_avg_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -#define vpx_sad4x8_avg vpx_sad4x8_avg_sse2 - -void vpx_sad4x8x4d_c(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); -void vpx_sad4x8x4d_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); -#define vpx_sad4x8x4d vpx_sad4x8x4d_sse2 - -void vpx_sad4x8x8_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -#define vpx_sad4x8x8 vpx_sad4x8x8_c - -unsigned int vpx_sad64x32_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -unsigned int vpx_sad64x32_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -unsigned int vpx_sad64x32_avx2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -RTCD_EXTERN unsigned int (*vpx_sad64x32)(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); - -unsigned int vpx_sad64x32_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -unsigned int vpx_sad64x32_avg_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -unsigned int vpx_sad64x32_avg_avx2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -RTCD_EXTERN unsigned int (*vpx_sad64x32_avg)(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); - -void vpx_sad64x32x4d_c(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); -void vpx_sad64x32x4d_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); -#define vpx_sad64x32x4d vpx_sad64x32x4d_sse2 - -unsigned int vpx_sad64x64_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -unsigned int vpx_sad64x64_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -unsigned int vpx_sad64x64_avx2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -RTCD_EXTERN unsigned int (*vpx_sad64x64)(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); - -unsigned int vpx_sad64x64_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -unsigned int vpx_sad64x64_avg_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -unsigned int vpx_sad64x64_avg_avx2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -RTCD_EXTERN unsigned int (*vpx_sad64x64_avg)(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); - -void vpx_sad64x64x3_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -#define vpx_sad64x64x3 vpx_sad64x64x3_c - -void vpx_sad64x64x4d_c(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); -void vpx_sad64x64x4d_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); -void vpx_sad64x64x4d_avx2(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); -RTCD_EXTERN void (*vpx_sad64x64x4d)(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); - -void vpx_sad64x64x8_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -#define vpx_sad64x64x8 vpx_sad64x64x8_c - -unsigned int vpx_sad8x16_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -unsigned int vpx_sad8x16_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -#define vpx_sad8x16 vpx_sad8x16_sse2 - -unsigned int vpx_sad8x16_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -unsigned int vpx_sad8x16_avg_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -#define vpx_sad8x16_avg vpx_sad8x16_avg_sse2 - -void vpx_sad8x16x3_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -void vpx_sad8x16x3_sse3(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -RTCD_EXTERN void (*vpx_sad8x16x3)(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); - -void vpx_sad8x16x4d_c(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); -void vpx_sad8x16x4d_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); -#define vpx_sad8x16x4d vpx_sad8x16x4d_sse2 - -void vpx_sad8x16x8_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -void vpx_sad8x16x8_sse4_1(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -RTCD_EXTERN void (*vpx_sad8x16x8)(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); - -unsigned int vpx_sad8x4_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -unsigned int vpx_sad8x4_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -#define vpx_sad8x4 vpx_sad8x4_sse2 - -unsigned int vpx_sad8x4_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -unsigned int vpx_sad8x4_avg_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -#define vpx_sad8x4_avg vpx_sad8x4_avg_sse2 - -void vpx_sad8x4x4d_c(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); -void vpx_sad8x4x4d_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); -#define vpx_sad8x4x4d vpx_sad8x4x4d_sse2 - -void vpx_sad8x4x8_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -#define vpx_sad8x4x8 vpx_sad8x4x8_c - -unsigned int vpx_sad8x8_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -unsigned int vpx_sad8x8_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); -#define vpx_sad8x8 vpx_sad8x8_sse2 - -unsigned int vpx_sad8x8_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -unsigned int vpx_sad8x8_avg_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); -#define vpx_sad8x8_avg vpx_sad8x8_avg_sse2 - -void vpx_sad8x8x3_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -void vpx_sad8x8x3_sse3(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -RTCD_EXTERN void (*vpx_sad8x8x3)(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); - -void vpx_sad8x8x4d_c(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); -void vpx_sad8x8x4d_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array); -#define vpx_sad8x8x4d vpx_sad8x8x4d_sse2 - -void vpx_sad8x8x8_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -void vpx_sad8x8x8_sse4_1(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); -RTCD_EXTERN void (*vpx_sad8x8x8)(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array); - -int vpx_satd_c(const int16_t *coeff, int length); -int vpx_satd_sse2(const int16_t *coeff, int length); -#define vpx_satd vpx_satd_sse2 - -void vpx_scaled_2d_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -void vpx_scaled_2d_ssse3(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -RTCD_EXTERN void (*vpx_scaled_2d)(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); - -void vpx_scaled_avg_2d_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -#define vpx_scaled_avg_2d vpx_scaled_avg_2d_c - -void vpx_scaled_avg_horiz_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -#define vpx_scaled_avg_horiz vpx_scaled_avg_horiz_c - -void vpx_scaled_avg_vert_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -#define vpx_scaled_avg_vert vpx_scaled_avg_vert_c - -void vpx_scaled_horiz_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -#define vpx_scaled_horiz vpx_scaled_horiz_c - -void vpx_scaled_vert_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -#define vpx_scaled_vert vpx_scaled_vert_c - -uint32_t vpx_sub_pixel_avg_variance16x16_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_sub_pixel_avg_variance16x16_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_sub_pixel_avg_variance16x16_ssse3(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -RTCD_EXTERN uint32_t (*vpx_sub_pixel_avg_variance16x16)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); - -uint32_t vpx_sub_pixel_avg_variance16x32_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_sub_pixel_avg_variance16x32_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_sub_pixel_avg_variance16x32_ssse3(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -RTCD_EXTERN uint32_t (*vpx_sub_pixel_avg_variance16x32)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); - -uint32_t vpx_sub_pixel_avg_variance16x8_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_sub_pixel_avg_variance16x8_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_sub_pixel_avg_variance16x8_ssse3(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -RTCD_EXTERN uint32_t (*vpx_sub_pixel_avg_variance16x8)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); - -uint32_t vpx_sub_pixel_avg_variance32x16_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_sub_pixel_avg_variance32x16_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_sub_pixel_avg_variance32x16_ssse3(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -RTCD_EXTERN uint32_t (*vpx_sub_pixel_avg_variance32x16)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); - -uint32_t vpx_sub_pixel_avg_variance32x32_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_sub_pixel_avg_variance32x32_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_sub_pixel_avg_variance32x32_ssse3(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_sub_pixel_avg_variance32x32_avx2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -RTCD_EXTERN uint32_t (*vpx_sub_pixel_avg_variance32x32)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); - -uint32_t vpx_sub_pixel_avg_variance32x64_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_sub_pixel_avg_variance32x64_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_sub_pixel_avg_variance32x64_ssse3(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -RTCD_EXTERN uint32_t (*vpx_sub_pixel_avg_variance32x64)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); - -uint32_t vpx_sub_pixel_avg_variance4x4_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_sub_pixel_avg_variance4x4_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_sub_pixel_avg_variance4x4_ssse3(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -RTCD_EXTERN uint32_t (*vpx_sub_pixel_avg_variance4x4)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); - -uint32_t vpx_sub_pixel_avg_variance4x8_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_sub_pixel_avg_variance4x8_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_sub_pixel_avg_variance4x8_ssse3(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -RTCD_EXTERN uint32_t (*vpx_sub_pixel_avg_variance4x8)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); - -uint32_t vpx_sub_pixel_avg_variance64x32_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_sub_pixel_avg_variance64x32_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_sub_pixel_avg_variance64x32_ssse3(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -RTCD_EXTERN uint32_t (*vpx_sub_pixel_avg_variance64x32)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); - -uint32_t vpx_sub_pixel_avg_variance64x64_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_sub_pixel_avg_variance64x64_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_sub_pixel_avg_variance64x64_ssse3(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_sub_pixel_avg_variance64x64_avx2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -RTCD_EXTERN uint32_t (*vpx_sub_pixel_avg_variance64x64)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); - -uint32_t vpx_sub_pixel_avg_variance8x16_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_sub_pixel_avg_variance8x16_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_sub_pixel_avg_variance8x16_ssse3(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -RTCD_EXTERN uint32_t (*vpx_sub_pixel_avg_variance8x16)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); - -uint32_t vpx_sub_pixel_avg_variance8x4_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_sub_pixel_avg_variance8x4_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_sub_pixel_avg_variance8x4_ssse3(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -RTCD_EXTERN uint32_t (*vpx_sub_pixel_avg_variance8x4)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); - -uint32_t vpx_sub_pixel_avg_variance8x8_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_sub_pixel_avg_variance8x8_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -uint32_t vpx_sub_pixel_avg_variance8x8_ssse3(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); -RTCD_EXTERN uint32_t (*vpx_sub_pixel_avg_variance8x8)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred); - -uint32_t vpx_sub_pixel_variance16x16_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_sub_pixel_variance16x16_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_sub_pixel_variance16x16_ssse3(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -RTCD_EXTERN uint32_t (*vpx_sub_pixel_variance16x16)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); - -uint32_t vpx_sub_pixel_variance16x32_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_sub_pixel_variance16x32_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_sub_pixel_variance16x32_ssse3(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -RTCD_EXTERN uint32_t (*vpx_sub_pixel_variance16x32)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); - -uint32_t vpx_sub_pixel_variance16x8_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_sub_pixel_variance16x8_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_sub_pixel_variance16x8_ssse3(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -RTCD_EXTERN uint32_t (*vpx_sub_pixel_variance16x8)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); - -uint32_t vpx_sub_pixel_variance32x16_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_sub_pixel_variance32x16_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_sub_pixel_variance32x16_ssse3(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -RTCD_EXTERN uint32_t (*vpx_sub_pixel_variance32x16)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); - -uint32_t vpx_sub_pixel_variance32x32_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_sub_pixel_variance32x32_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_sub_pixel_variance32x32_ssse3(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_sub_pixel_variance32x32_avx2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -RTCD_EXTERN uint32_t (*vpx_sub_pixel_variance32x32)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); - -uint32_t vpx_sub_pixel_variance32x64_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_sub_pixel_variance32x64_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_sub_pixel_variance32x64_ssse3(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -RTCD_EXTERN uint32_t (*vpx_sub_pixel_variance32x64)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); - -uint32_t vpx_sub_pixel_variance4x4_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_sub_pixel_variance4x4_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_sub_pixel_variance4x4_ssse3(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -RTCD_EXTERN uint32_t (*vpx_sub_pixel_variance4x4)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); - -uint32_t vpx_sub_pixel_variance4x8_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_sub_pixel_variance4x8_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_sub_pixel_variance4x8_ssse3(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -RTCD_EXTERN uint32_t (*vpx_sub_pixel_variance4x8)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); - -uint32_t vpx_sub_pixel_variance64x32_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_sub_pixel_variance64x32_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_sub_pixel_variance64x32_ssse3(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -RTCD_EXTERN uint32_t (*vpx_sub_pixel_variance64x32)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); - -uint32_t vpx_sub_pixel_variance64x64_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_sub_pixel_variance64x64_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_sub_pixel_variance64x64_ssse3(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_sub_pixel_variance64x64_avx2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -RTCD_EXTERN uint32_t (*vpx_sub_pixel_variance64x64)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); - -uint32_t vpx_sub_pixel_variance8x16_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_sub_pixel_variance8x16_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_sub_pixel_variance8x16_ssse3(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -RTCD_EXTERN uint32_t (*vpx_sub_pixel_variance8x16)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); - -uint32_t vpx_sub_pixel_variance8x4_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_sub_pixel_variance8x4_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_sub_pixel_variance8x4_ssse3(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -RTCD_EXTERN uint32_t (*vpx_sub_pixel_variance8x4)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); - -uint32_t vpx_sub_pixel_variance8x8_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_sub_pixel_variance8x8_sse2(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -uint32_t vpx_sub_pixel_variance8x8_ssse3(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); -RTCD_EXTERN uint32_t (*vpx_sub_pixel_variance8x8)(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse); - -void vpx_subtract_block_c(int rows, int cols, int16_t *diff_ptr, ptrdiff_t diff_stride, const uint8_t *src_ptr, ptrdiff_t src_stride, const uint8_t *pred_ptr, ptrdiff_t pred_stride); -void vpx_subtract_block_sse2(int rows, int cols, int16_t *diff_ptr, ptrdiff_t diff_stride, const uint8_t *src_ptr, ptrdiff_t src_stride, const uint8_t *pred_ptr, ptrdiff_t pred_stride); -#define vpx_subtract_block vpx_subtract_block_sse2 - -uint64_t vpx_sum_squares_2d_i16_c(const int16_t *src, int stride, int size); -uint64_t vpx_sum_squares_2d_i16_sse2(const int16_t *src, int stride, int size); -#define vpx_sum_squares_2d_i16 vpx_sum_squares_2d_i16_sse2 - -void vpx_tm_predictor_16x16_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_tm_predictor_16x16_sse2(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_tm_predictor_16x16 vpx_tm_predictor_16x16_sse2 - -void vpx_tm_predictor_32x32_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_tm_predictor_32x32_sse2(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_tm_predictor_32x32 vpx_tm_predictor_32x32_sse2 - -void vpx_tm_predictor_4x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_tm_predictor_4x4_sse2(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_tm_predictor_4x4 vpx_tm_predictor_4x4_sse2 - -void vpx_tm_predictor_8x8_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_tm_predictor_8x8_sse2(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_tm_predictor_8x8 vpx_tm_predictor_8x8_sse2 - -void vpx_v_predictor_16x16_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_v_predictor_16x16_sse2(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_v_predictor_16x16 vpx_v_predictor_16x16_sse2 - -void vpx_v_predictor_32x32_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_v_predictor_32x32_sse2(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_v_predictor_32x32 vpx_v_predictor_32x32_sse2 - -void vpx_v_predictor_4x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_v_predictor_4x4_sse2(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_v_predictor_4x4 vpx_v_predictor_4x4_sse2 - -void vpx_v_predictor_8x8_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void vpx_v_predictor_8x8_sse2(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_v_predictor_8x8 vpx_v_predictor_8x8_sse2 - -unsigned int vpx_variance16x16_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -unsigned int vpx_variance16x16_sse2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -unsigned int vpx_variance16x16_avx2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -RTCD_EXTERN unsigned int (*vpx_variance16x16)(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); - -unsigned int vpx_variance16x32_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -unsigned int vpx_variance16x32_sse2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_variance16x32 vpx_variance16x32_sse2 - -unsigned int vpx_variance16x8_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -unsigned int vpx_variance16x8_sse2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_variance16x8 vpx_variance16x8_sse2 - -unsigned int vpx_variance32x16_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -unsigned int vpx_variance32x16_sse2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -unsigned int vpx_variance32x16_avx2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -RTCD_EXTERN unsigned int (*vpx_variance32x16)(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); - -unsigned int vpx_variance32x32_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -unsigned int vpx_variance32x32_sse2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -unsigned int vpx_variance32x32_avx2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -RTCD_EXTERN unsigned int (*vpx_variance32x32)(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); - -unsigned int vpx_variance32x64_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -unsigned int vpx_variance32x64_sse2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_variance32x64 vpx_variance32x64_sse2 - -unsigned int vpx_variance4x4_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -unsigned int vpx_variance4x4_sse2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_variance4x4 vpx_variance4x4_sse2 - -unsigned int vpx_variance4x8_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -unsigned int vpx_variance4x8_sse2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_variance4x8 vpx_variance4x8_sse2 - -unsigned int vpx_variance64x32_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -unsigned int vpx_variance64x32_sse2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -unsigned int vpx_variance64x32_avx2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -RTCD_EXTERN unsigned int (*vpx_variance64x32)(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); - -unsigned int vpx_variance64x64_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -unsigned int vpx_variance64x64_sse2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -unsigned int vpx_variance64x64_avx2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -RTCD_EXTERN unsigned int (*vpx_variance64x64)(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); - -unsigned int vpx_variance8x16_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -unsigned int vpx_variance8x16_sse2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_variance8x16 vpx_variance8x16_sse2 - -unsigned int vpx_variance8x4_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -unsigned int vpx_variance8x4_sse2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_variance8x4 vpx_variance8x4_sse2 - -unsigned int vpx_variance8x8_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -unsigned int vpx_variance8x8_sse2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse); -#define vpx_variance8x8 vpx_variance8x8_sse2 - -void vpx_ve_predictor_4x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define vpx_ve_predictor_4x4 vpx_ve_predictor_4x4_c - -int vpx_vector_var_c(const int16_t *ref, const int16_t *src, const int bwl); -int vpx_vector_var_sse2(const int16_t *ref, const int16_t *src, const int bwl); -#define vpx_vector_var vpx_vector_var_sse2 - -void vpx_dsp_rtcd(void); - -#ifdef RTCD_C -#include "vpx_ports/x86.h" -static void setup_rtcd_internal(void) -{ - int flags = x86_simd_caps(); - - (void)flags; - - vpx_convolve8 = vpx_convolve8_sse2; - if (flags & HAS_SSSE3) vpx_convolve8 = vpx_convolve8_ssse3; - if (flags & HAS_AVX2) vpx_convolve8 = vpx_convolve8_avx2; - vpx_convolve8_avg = vpx_convolve8_avg_sse2; - if (flags & HAS_SSSE3) vpx_convolve8_avg = vpx_convolve8_avg_ssse3; - vpx_convolve8_avg_horiz = vpx_convolve8_avg_horiz_sse2; - if (flags & HAS_SSSE3) vpx_convolve8_avg_horiz = vpx_convolve8_avg_horiz_ssse3; - vpx_convolve8_avg_vert = vpx_convolve8_avg_vert_sse2; - if (flags & HAS_SSSE3) vpx_convolve8_avg_vert = vpx_convolve8_avg_vert_ssse3; - vpx_convolve8_horiz = vpx_convolve8_horiz_sse2; - if (flags & HAS_SSSE3) vpx_convolve8_horiz = vpx_convolve8_horiz_ssse3; - if (flags & HAS_AVX2) vpx_convolve8_horiz = vpx_convolve8_horiz_avx2; - vpx_convolve8_vert = vpx_convolve8_vert_sse2; - if (flags & HAS_SSSE3) vpx_convolve8_vert = vpx_convolve8_vert_ssse3; - if (flags & HAS_AVX2) vpx_convolve8_vert = vpx_convolve8_vert_avx2; - vpx_d153_predictor_16x16 = vpx_d153_predictor_16x16_c; - if (flags & HAS_SSSE3) vpx_d153_predictor_16x16 = vpx_d153_predictor_16x16_ssse3; - vpx_d153_predictor_32x32 = vpx_d153_predictor_32x32_c; - if (flags & HAS_SSSE3) vpx_d153_predictor_32x32 = vpx_d153_predictor_32x32_ssse3; - vpx_d153_predictor_4x4 = vpx_d153_predictor_4x4_c; - if (flags & HAS_SSSE3) vpx_d153_predictor_4x4 = vpx_d153_predictor_4x4_ssse3; - vpx_d153_predictor_8x8 = vpx_d153_predictor_8x8_c; - if (flags & HAS_SSSE3) vpx_d153_predictor_8x8 = vpx_d153_predictor_8x8_ssse3; - vpx_d207_predictor_16x16 = vpx_d207_predictor_16x16_c; - if (flags & HAS_SSSE3) vpx_d207_predictor_16x16 = vpx_d207_predictor_16x16_ssse3; - vpx_d207_predictor_32x32 = vpx_d207_predictor_32x32_c; - if (flags & HAS_SSSE3) vpx_d207_predictor_32x32 = vpx_d207_predictor_32x32_ssse3; - vpx_d207_predictor_8x8 = vpx_d207_predictor_8x8_c; - if (flags & HAS_SSSE3) vpx_d207_predictor_8x8 = vpx_d207_predictor_8x8_ssse3; - vpx_d45_predictor_16x16 = vpx_d45_predictor_16x16_c; - if (flags & HAS_SSSE3) vpx_d45_predictor_16x16 = vpx_d45_predictor_16x16_ssse3; - vpx_d45_predictor_32x32 = vpx_d45_predictor_32x32_c; - if (flags & HAS_SSSE3) vpx_d45_predictor_32x32 = vpx_d45_predictor_32x32_ssse3; - vpx_d63_predictor_16x16 = vpx_d63_predictor_16x16_c; - if (flags & HAS_SSSE3) vpx_d63_predictor_16x16 = vpx_d63_predictor_16x16_ssse3; - vpx_d63_predictor_32x32 = vpx_d63_predictor_32x32_c; - if (flags & HAS_SSSE3) vpx_d63_predictor_32x32 = vpx_d63_predictor_32x32_ssse3; - vpx_d63_predictor_4x4 = vpx_d63_predictor_4x4_c; - if (flags & HAS_SSSE3) vpx_d63_predictor_4x4 = vpx_d63_predictor_4x4_ssse3; - vpx_d63_predictor_8x8 = vpx_d63_predictor_8x8_c; - if (flags & HAS_SSSE3) vpx_d63_predictor_8x8 = vpx_d63_predictor_8x8_ssse3; - vpx_get16x16var = vpx_get16x16var_sse2; - if (flags & HAS_AVX2) vpx_get16x16var = vpx_get16x16var_avx2; - vpx_hadamard_8x8 = vpx_hadamard_8x8_sse2; - if (flags & HAS_SSSE3) vpx_hadamard_8x8 = vpx_hadamard_8x8_ssse3; - vpx_idct32x32_1024_add = vpx_idct32x32_1024_add_sse2; - if (flags & HAS_SSSE3) vpx_idct32x32_1024_add = vpx_idct32x32_1024_add_ssse3; - vpx_idct32x32_135_add = vpx_idct32x32_1024_add_sse2; - if (flags & HAS_SSSE3) vpx_idct32x32_135_add = vpx_idct32x32_135_add_ssse3; - vpx_idct32x32_34_add = vpx_idct32x32_34_add_sse2; - if (flags & HAS_SSSE3) vpx_idct32x32_34_add = vpx_idct32x32_34_add_ssse3; - vpx_idct8x8_12_add = vpx_idct8x8_12_add_sse2; - if (flags & HAS_SSSE3) vpx_idct8x8_12_add = vpx_idct8x8_12_add_ssse3; - vpx_idct8x8_64_add = vpx_idct8x8_64_add_sse2; - if (flags & HAS_SSSE3) vpx_idct8x8_64_add = vpx_idct8x8_64_add_ssse3; - vpx_lpf_horizontal_16 = vpx_lpf_horizontal_16_sse2; - if (flags & HAS_AVX2) vpx_lpf_horizontal_16 = vpx_lpf_horizontal_16_avx2; - vpx_lpf_horizontal_16_dual = vpx_lpf_horizontal_16_dual_sse2; - if (flags & HAS_AVX2) vpx_lpf_horizontal_16_dual = vpx_lpf_horizontal_16_dual_avx2; - vpx_mse16x16 = vpx_mse16x16_sse2; - if (flags & HAS_AVX2) vpx_mse16x16 = vpx_mse16x16_avx2; - vpx_quantize_b = vpx_quantize_b_sse2; - if (flags & HAS_SSSE3) vpx_quantize_b = vpx_quantize_b_ssse3; - if (flags & HAS_AVX) vpx_quantize_b = vpx_quantize_b_avx; - vpx_quantize_b_32x32 = vpx_quantize_b_32x32_c; - if (flags & HAS_SSSE3) vpx_quantize_b_32x32 = vpx_quantize_b_32x32_ssse3; - if (flags & HAS_AVX) vpx_quantize_b_32x32 = vpx_quantize_b_32x32_avx; - vpx_sad16x16x3 = vpx_sad16x16x3_c; - if (flags & HAS_SSE3) vpx_sad16x16x3 = vpx_sad16x16x3_sse3; - if (flags & HAS_SSSE3) vpx_sad16x16x3 = vpx_sad16x16x3_ssse3; - vpx_sad16x16x8 = vpx_sad16x16x8_c; - if (flags & HAS_SSE4_1) vpx_sad16x16x8 = vpx_sad16x16x8_sse4_1; - vpx_sad16x8x3 = vpx_sad16x8x3_c; - if (flags & HAS_SSE3) vpx_sad16x8x3 = vpx_sad16x8x3_sse3; - if (flags & HAS_SSSE3) vpx_sad16x8x3 = vpx_sad16x8x3_ssse3; - vpx_sad16x8x8 = vpx_sad16x8x8_c; - if (flags & HAS_SSE4_1) vpx_sad16x8x8 = vpx_sad16x8x8_sse4_1; - vpx_sad32x16 = vpx_sad32x16_sse2; - if (flags & HAS_AVX2) vpx_sad32x16 = vpx_sad32x16_avx2; - vpx_sad32x16_avg = vpx_sad32x16_avg_sse2; - if (flags & HAS_AVX2) vpx_sad32x16_avg = vpx_sad32x16_avg_avx2; - vpx_sad32x32 = vpx_sad32x32_sse2; - if (flags & HAS_AVX2) vpx_sad32x32 = vpx_sad32x32_avx2; - vpx_sad32x32_avg = vpx_sad32x32_avg_sse2; - if (flags & HAS_AVX2) vpx_sad32x32_avg = vpx_sad32x32_avg_avx2; - vpx_sad32x32x4d = vpx_sad32x32x4d_sse2; - if (flags & HAS_AVX2) vpx_sad32x32x4d = vpx_sad32x32x4d_avx2; - vpx_sad32x64 = vpx_sad32x64_sse2; - if (flags & HAS_AVX2) vpx_sad32x64 = vpx_sad32x64_avx2; - vpx_sad32x64_avg = vpx_sad32x64_avg_sse2; - if (flags & HAS_AVX2) vpx_sad32x64_avg = vpx_sad32x64_avg_avx2; - vpx_sad4x4x3 = vpx_sad4x4x3_c; - if (flags & HAS_SSE3) vpx_sad4x4x3 = vpx_sad4x4x3_sse3; - vpx_sad4x4x8 = vpx_sad4x4x8_c; - if (flags & HAS_SSE4_1) vpx_sad4x4x8 = vpx_sad4x4x8_sse4_1; - vpx_sad64x32 = vpx_sad64x32_sse2; - if (flags & HAS_AVX2) vpx_sad64x32 = vpx_sad64x32_avx2; - vpx_sad64x32_avg = vpx_sad64x32_avg_sse2; - if (flags & HAS_AVX2) vpx_sad64x32_avg = vpx_sad64x32_avg_avx2; - vpx_sad64x64 = vpx_sad64x64_sse2; - if (flags & HAS_AVX2) vpx_sad64x64 = vpx_sad64x64_avx2; - vpx_sad64x64_avg = vpx_sad64x64_avg_sse2; - if (flags & HAS_AVX2) vpx_sad64x64_avg = vpx_sad64x64_avg_avx2; - vpx_sad64x64x4d = vpx_sad64x64x4d_sse2; - if (flags & HAS_AVX2) vpx_sad64x64x4d = vpx_sad64x64x4d_avx2; - vpx_sad8x16x3 = vpx_sad8x16x3_c; - if (flags & HAS_SSE3) vpx_sad8x16x3 = vpx_sad8x16x3_sse3; - vpx_sad8x16x8 = vpx_sad8x16x8_c; - if (flags & HAS_SSE4_1) vpx_sad8x16x8 = vpx_sad8x16x8_sse4_1; - vpx_sad8x8x3 = vpx_sad8x8x3_c; - if (flags & HAS_SSE3) vpx_sad8x8x3 = vpx_sad8x8x3_sse3; - vpx_sad8x8x8 = vpx_sad8x8x8_c; - if (flags & HAS_SSE4_1) vpx_sad8x8x8 = vpx_sad8x8x8_sse4_1; - vpx_scaled_2d = vpx_scaled_2d_c; - if (flags & HAS_SSSE3) vpx_scaled_2d = vpx_scaled_2d_ssse3; - vpx_sub_pixel_avg_variance16x16 = vpx_sub_pixel_avg_variance16x16_sse2; - if (flags & HAS_SSSE3) vpx_sub_pixel_avg_variance16x16 = vpx_sub_pixel_avg_variance16x16_ssse3; - vpx_sub_pixel_avg_variance16x32 = vpx_sub_pixel_avg_variance16x32_sse2; - if (flags & HAS_SSSE3) vpx_sub_pixel_avg_variance16x32 = vpx_sub_pixel_avg_variance16x32_ssse3; - vpx_sub_pixel_avg_variance16x8 = vpx_sub_pixel_avg_variance16x8_sse2; - if (flags & HAS_SSSE3) vpx_sub_pixel_avg_variance16x8 = vpx_sub_pixel_avg_variance16x8_ssse3; - vpx_sub_pixel_avg_variance32x16 = vpx_sub_pixel_avg_variance32x16_sse2; - if (flags & HAS_SSSE3) vpx_sub_pixel_avg_variance32x16 = vpx_sub_pixel_avg_variance32x16_ssse3; - vpx_sub_pixel_avg_variance32x32 = vpx_sub_pixel_avg_variance32x32_sse2; - if (flags & HAS_SSSE3) vpx_sub_pixel_avg_variance32x32 = vpx_sub_pixel_avg_variance32x32_ssse3; - if (flags & HAS_AVX2) vpx_sub_pixel_avg_variance32x32 = vpx_sub_pixel_avg_variance32x32_avx2; - vpx_sub_pixel_avg_variance32x64 = vpx_sub_pixel_avg_variance32x64_sse2; - if (flags & HAS_SSSE3) vpx_sub_pixel_avg_variance32x64 = vpx_sub_pixel_avg_variance32x64_ssse3; - vpx_sub_pixel_avg_variance4x4 = vpx_sub_pixel_avg_variance4x4_sse2; - if (flags & HAS_SSSE3) vpx_sub_pixel_avg_variance4x4 = vpx_sub_pixel_avg_variance4x4_ssse3; - vpx_sub_pixel_avg_variance4x8 = vpx_sub_pixel_avg_variance4x8_sse2; - if (flags & HAS_SSSE3) vpx_sub_pixel_avg_variance4x8 = vpx_sub_pixel_avg_variance4x8_ssse3; - vpx_sub_pixel_avg_variance64x32 = vpx_sub_pixel_avg_variance64x32_sse2; - if (flags & HAS_SSSE3) vpx_sub_pixel_avg_variance64x32 = vpx_sub_pixel_avg_variance64x32_ssse3; - vpx_sub_pixel_avg_variance64x64 = vpx_sub_pixel_avg_variance64x64_sse2; - if (flags & HAS_SSSE3) vpx_sub_pixel_avg_variance64x64 = vpx_sub_pixel_avg_variance64x64_ssse3; - if (flags & HAS_AVX2) vpx_sub_pixel_avg_variance64x64 = vpx_sub_pixel_avg_variance64x64_avx2; - vpx_sub_pixel_avg_variance8x16 = vpx_sub_pixel_avg_variance8x16_sse2; - if (flags & HAS_SSSE3) vpx_sub_pixel_avg_variance8x16 = vpx_sub_pixel_avg_variance8x16_ssse3; - vpx_sub_pixel_avg_variance8x4 = vpx_sub_pixel_avg_variance8x4_sse2; - if (flags & HAS_SSSE3) vpx_sub_pixel_avg_variance8x4 = vpx_sub_pixel_avg_variance8x4_ssse3; - vpx_sub_pixel_avg_variance8x8 = vpx_sub_pixel_avg_variance8x8_sse2; - if (flags & HAS_SSSE3) vpx_sub_pixel_avg_variance8x8 = vpx_sub_pixel_avg_variance8x8_ssse3; - vpx_sub_pixel_variance16x16 = vpx_sub_pixel_variance16x16_sse2; - if (flags & HAS_SSSE3) vpx_sub_pixel_variance16x16 = vpx_sub_pixel_variance16x16_ssse3; - vpx_sub_pixel_variance16x32 = vpx_sub_pixel_variance16x32_sse2; - if (flags & HAS_SSSE3) vpx_sub_pixel_variance16x32 = vpx_sub_pixel_variance16x32_ssse3; - vpx_sub_pixel_variance16x8 = vpx_sub_pixel_variance16x8_sse2; - if (flags & HAS_SSSE3) vpx_sub_pixel_variance16x8 = vpx_sub_pixel_variance16x8_ssse3; - vpx_sub_pixel_variance32x16 = vpx_sub_pixel_variance32x16_sse2; - if (flags & HAS_SSSE3) vpx_sub_pixel_variance32x16 = vpx_sub_pixel_variance32x16_ssse3; - vpx_sub_pixel_variance32x32 = vpx_sub_pixel_variance32x32_sse2; - if (flags & HAS_SSSE3) vpx_sub_pixel_variance32x32 = vpx_sub_pixel_variance32x32_ssse3; - if (flags & HAS_AVX2) vpx_sub_pixel_variance32x32 = vpx_sub_pixel_variance32x32_avx2; - vpx_sub_pixel_variance32x64 = vpx_sub_pixel_variance32x64_sse2; - if (flags & HAS_SSSE3) vpx_sub_pixel_variance32x64 = vpx_sub_pixel_variance32x64_ssse3; - vpx_sub_pixel_variance4x4 = vpx_sub_pixel_variance4x4_sse2; - if (flags & HAS_SSSE3) vpx_sub_pixel_variance4x4 = vpx_sub_pixel_variance4x4_ssse3; - vpx_sub_pixel_variance4x8 = vpx_sub_pixel_variance4x8_sse2; - if (flags & HAS_SSSE3) vpx_sub_pixel_variance4x8 = vpx_sub_pixel_variance4x8_ssse3; - vpx_sub_pixel_variance64x32 = vpx_sub_pixel_variance64x32_sse2; - if (flags & HAS_SSSE3) vpx_sub_pixel_variance64x32 = vpx_sub_pixel_variance64x32_ssse3; - vpx_sub_pixel_variance64x64 = vpx_sub_pixel_variance64x64_sse2; - if (flags & HAS_SSSE3) vpx_sub_pixel_variance64x64 = vpx_sub_pixel_variance64x64_ssse3; - if (flags & HAS_AVX2) vpx_sub_pixel_variance64x64 = vpx_sub_pixel_variance64x64_avx2; - vpx_sub_pixel_variance8x16 = vpx_sub_pixel_variance8x16_sse2; - if (flags & HAS_SSSE3) vpx_sub_pixel_variance8x16 = vpx_sub_pixel_variance8x16_ssse3; - vpx_sub_pixel_variance8x4 = vpx_sub_pixel_variance8x4_sse2; - if (flags & HAS_SSSE3) vpx_sub_pixel_variance8x4 = vpx_sub_pixel_variance8x4_ssse3; - vpx_sub_pixel_variance8x8 = vpx_sub_pixel_variance8x8_sse2; - if (flags & HAS_SSSE3) vpx_sub_pixel_variance8x8 = vpx_sub_pixel_variance8x8_ssse3; - vpx_variance16x16 = vpx_variance16x16_sse2; - if (flags & HAS_AVX2) vpx_variance16x16 = vpx_variance16x16_avx2; - vpx_variance32x16 = vpx_variance32x16_sse2; - if (flags & HAS_AVX2) vpx_variance32x16 = vpx_variance32x16_avx2; - vpx_variance32x32 = vpx_variance32x32_sse2; - if (flags & HAS_AVX2) vpx_variance32x32 = vpx_variance32x32_avx2; - vpx_variance64x32 = vpx_variance64x32_sse2; - if (flags & HAS_AVX2) vpx_variance64x32 = vpx_variance64x32_avx2; - vpx_variance64x64 = vpx_variance64x64_sse2; - if (flags & HAS_AVX2) vpx_variance64x64 = vpx_variance64x64_avx2; -} -#endif - -#ifdef __cplusplus -} // extern "C" -#endif - -#endif diff --git a/WebRtc.NET/include/third_party/libvpx/source/config/win/x64/vpx_scale_rtcd.h b/WebRtc.NET/include/third_party/libvpx/source/config/win/x64/vpx_scale_rtcd.h deleted file mode 100644 index ddf7d01c..00000000 --- a/WebRtc.NET/include/third_party/libvpx/source/config/win/x64/vpx_scale_rtcd.h +++ /dev/null @@ -1,69 +0,0 @@ -#ifndef VPX_SCALE_RTCD_H_ -#define VPX_SCALE_RTCD_H_ - -#ifdef RTCD_C -#define RTCD_EXTERN -#else -#define RTCD_EXTERN extern -#endif - -struct yv12_buffer_config; - -#ifdef __cplusplus -extern "C" { -#endif - -void vp8_horizontal_line_2_1_scale_c(const unsigned char *source, unsigned int source_width, unsigned char *dest, unsigned int dest_width); -#define vp8_horizontal_line_2_1_scale vp8_horizontal_line_2_1_scale_c - -void vp8_horizontal_line_5_3_scale_c(const unsigned char *source, unsigned int source_width, unsigned char *dest, unsigned int dest_width); -#define vp8_horizontal_line_5_3_scale vp8_horizontal_line_5_3_scale_c - -void vp8_horizontal_line_5_4_scale_c(const unsigned char *source, unsigned int source_width, unsigned char *dest, unsigned int dest_width); -#define vp8_horizontal_line_5_4_scale vp8_horizontal_line_5_4_scale_c - -void vp8_vertical_band_2_1_scale_c(unsigned char *source, unsigned int src_pitch, unsigned char *dest, unsigned int dest_pitch, unsigned int dest_width); -#define vp8_vertical_band_2_1_scale vp8_vertical_band_2_1_scale_c - -void vp8_vertical_band_2_1_scale_i_c(unsigned char *source, unsigned int src_pitch, unsigned char *dest, unsigned int dest_pitch, unsigned int dest_width); -#define vp8_vertical_band_2_1_scale_i vp8_vertical_band_2_1_scale_i_c - -void vp8_vertical_band_5_3_scale_c(unsigned char *source, unsigned int src_pitch, unsigned char *dest, unsigned int dest_pitch, unsigned int dest_width); -#define vp8_vertical_band_5_3_scale vp8_vertical_band_5_3_scale_c - -void vp8_vertical_band_5_4_scale_c(unsigned char *source, unsigned int src_pitch, unsigned char *dest, unsigned int dest_pitch, unsigned int dest_width); -#define vp8_vertical_band_5_4_scale vp8_vertical_band_5_4_scale_c - -void vp8_yv12_copy_frame_c(const struct yv12_buffer_config *src_ybc, struct yv12_buffer_config *dst_ybc); -#define vp8_yv12_copy_frame vp8_yv12_copy_frame_c - -void vp8_yv12_extend_frame_borders_c(struct yv12_buffer_config *ybf); -#define vp8_yv12_extend_frame_borders vp8_yv12_extend_frame_borders_c - -void vpx_extend_frame_borders_c(struct yv12_buffer_config *ybf); -#define vpx_extend_frame_borders vpx_extend_frame_borders_c - -void vpx_extend_frame_inner_borders_c(struct yv12_buffer_config *ybf); -#define vpx_extend_frame_inner_borders vpx_extend_frame_inner_borders_c - -void vpx_yv12_copy_y_c(const struct yv12_buffer_config *src_ybc, struct yv12_buffer_config *dst_ybc); -#define vpx_yv12_copy_y vpx_yv12_copy_y_c - -void vpx_scale_rtcd(void); - -#ifdef RTCD_C -#include "vpx_ports/x86.h" -static void setup_rtcd_internal(void) -{ - int flags = x86_simd_caps(); - - (void)flags; - -} -#endif - -#ifdef __cplusplus -} // extern "C" -#endif - -#endif diff --git a/WebRtc.NET/include/third_party/libvpx/source/libvpx/test/util.h b/WebRtc.NET/include/third_party/libvpx/source/libvpx/test/util.h deleted file mode 100644 index 1f2540ec..00000000 --- a/WebRtc.NET/include/third_party/libvpx/source/libvpx/test/util.h +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright (c) 2012 The WebM project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef TEST_UTIL_H_ -#define TEST_UTIL_H_ - -#include -#include -#include "third_party/googletest/src/include/gtest/gtest.h" -#include "vpx/vpx_image.h" - -// Macros -#define GET_PARAM(k) std::tr1::get(GetParam()) - -inline double compute_psnr(const vpx_image_t *img1, const vpx_image_t *img2) { - assert((img1->fmt == img2->fmt) && (img1->d_w == img2->d_w) && - (img1->d_h == img2->d_h)); - - const unsigned int width_y = img1->d_w; - const unsigned int height_y = img1->d_h; - unsigned int i, j; - - int64_t sqrerr = 0; - for (i = 0; i < height_y; ++i) { - for (j = 0; j < width_y; ++j) { - int64_t d = img1->planes[VPX_PLANE_Y][i * img1->stride[VPX_PLANE_Y] + j] - - img2->planes[VPX_PLANE_Y][i * img2->stride[VPX_PLANE_Y] + j]; - sqrerr += d * d; - } - } - double mse = static_cast(sqrerr) / (width_y * height_y); - double psnr = 100.0; - if (mse > 0.0) { - psnr = 10 * log10(255.0 * 255.0 / mse); - } - return psnr; -} - -#endif // TEST_UTIL_H_ diff --git a/WebRtc.NET/include/third_party/libvpx/source/libvpx/third_party/googletest/src/include/gtest/gtest.h b/WebRtc.NET/include/third_party/libvpx/source/libvpx/third_party/googletest/src/include/gtest/gtest.h deleted file mode 100644 index 581a44e9..00000000 --- a/WebRtc.NET/include/third_party/libvpx/source/libvpx/third_party/googletest/src/include/gtest/gtest.h +++ /dev/null @@ -1,20061 +0,0 @@ -// Copyright 2005, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: wan@google.com (Zhanyong Wan) -// -// The Google C++ Testing Framework (Google Test) -// -// This header file defines the public API for Google Test. It should be -// included by any test program that uses Google Test. -// -// IMPORTANT NOTE: Due to limitation of the C++ language, we have to -// leave some internal implementation details in this header file. -// They are clearly marked by comments like this: -// -// // INTERNAL IMPLEMENTATION - DO NOT USE IN A USER PROGRAM. -// -// Such code is NOT meant to be used by a user directly, and is subject -// to CHANGE WITHOUT NOTICE. Therefore DO NOT DEPEND ON IT in a user -// program! -// -// Acknowledgment: Google Test borrowed the idea of automatic test -// registration from Barthelemy Dagenais' (barthelemy@prologique.com) -// easyUnit framework. - -#ifndef GTEST_INCLUDE_GTEST_GTEST_H_ -#define GTEST_INCLUDE_GTEST_GTEST_H_ - -#include -#include -#include - -// Copyright 2005, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Authors: wan@google.com (Zhanyong Wan), eefacm@gmail.com (Sean Mcafee) -// -// The Google C++ Testing Framework (Google Test) -// -// This header file declares functions and macros used internally by -// Google Test. They are subject to change without notice. - -#ifndef GTEST_INCLUDE_GTEST_INTERNAL_GTEST_INTERNAL_H_ -#define GTEST_INCLUDE_GTEST_INTERNAL_GTEST_INTERNAL_H_ - -// Copyright 2005, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Authors: wan@google.com (Zhanyong Wan) -// -// Low-level types and utilities for porting Google Test to various -// platforms. They are subject to change without notice. DO NOT USE -// THEM IN USER CODE. -// -// This file is fundamental to Google Test. All other Google Test source -// files are expected to #include this. Therefore, it cannot #include -// any other Google Test header. - -#ifndef GTEST_INCLUDE_GTEST_INTERNAL_GTEST_PORT_H_ -#define GTEST_INCLUDE_GTEST_INTERNAL_GTEST_PORT_H_ - -// The user can define the following macros in the build script to -// control Google Test's behavior. If the user doesn't define a macro -// in this list, Google Test will define it. -// -// GTEST_HAS_CLONE - Define it to 1/0 to indicate that clone(2) -// is/isn't available. -// GTEST_HAS_EXCEPTIONS - Define it to 1/0 to indicate that exceptions -// are enabled. -// GTEST_HAS_GLOBAL_STRING - Define it to 1/0 to indicate that ::string -// is/isn't available (some systems define -// ::string, which is different to std::string). -// GTEST_HAS_GLOBAL_WSTRING - Define it to 1/0 to indicate that ::string -// is/isn't available (some systems define -// ::wstring, which is different to std::wstring). -// GTEST_HAS_POSIX_RE - Define it to 1/0 to indicate that POSIX regular -// expressions are/aren't available. -// GTEST_HAS_PTHREAD - Define it to 1/0 to indicate that -// is/isn't available. -// GTEST_HAS_RTTI - Define it to 1/0 to indicate that RTTI is/isn't -// enabled. -// GTEST_HAS_STD_WSTRING - Define it to 1/0 to indicate that -// std::wstring does/doesn't work (Google Test can -// be used where std::wstring is unavailable). -// GTEST_HAS_TR1_TUPLE - Define it to 1/0 to indicate tr1::tuple -// is/isn't available. -// GTEST_HAS_SEH - Define it to 1/0 to indicate whether the -// compiler supports Microsoft's "Structured -// Exception Handling". -// GTEST_HAS_STREAM_REDIRECTION -// - Define it to 1/0 to indicate whether the -// platform supports I/O stream redirection using -// dup() and dup2(). -// GTEST_USE_OWN_TR1_TUPLE - Define it to 1/0 to indicate whether Google -// Test's own tr1 tuple implementation should be -// used. Unused when the user sets -// GTEST_HAS_TR1_TUPLE to 0. -// GTEST_LANG_CXX11 - Define it to 1/0 to indicate that Google Test -// is building in C++11/C++98 mode. -// GTEST_LINKED_AS_SHARED_LIBRARY -// - Define to 1 when compiling tests that use -// Google Test as a shared library (known as -// DLL on Windows). -// GTEST_CREATE_SHARED_LIBRARY -// - Define to 1 when compiling Google Test itself -// as a shared library. - -// This header defines the following utilities: -// -// Macros indicating the current platform (defined to 1 if compiled on -// the given platform; otherwise undefined): -// GTEST_OS_AIX - IBM AIX -// GTEST_OS_CYGWIN - Cygwin -// GTEST_OS_HPUX - HP-UX -// GTEST_OS_LINUX - Linux -// GTEST_OS_LINUX_ANDROID - Google Android -// GTEST_OS_MAC - Mac OS X -// GTEST_OS_IOS - iOS -// GTEST_OS_IOS_SIMULATOR - iOS simulator -// GTEST_OS_NACL - Google Native Client (NaCl) -// GTEST_OS_OPENBSD - OpenBSD -// GTEST_OS_QNX - QNX -// GTEST_OS_SOLARIS - Sun Solaris -// GTEST_OS_SYMBIAN - Symbian -// GTEST_OS_WINDOWS - Windows (Desktop, MinGW, or Mobile) -// GTEST_OS_WINDOWS_DESKTOP - Windows Desktop -// GTEST_OS_WINDOWS_MINGW - MinGW -// GTEST_OS_WINDOWS_MOBILE - Windows Mobile -// GTEST_OS_ZOS - z/OS -// -// Among the platforms, Cygwin, Linux, Max OS X, and Windows have the -// most stable support. Since core members of the Google Test project -// don't have access to other platforms, support for them may be less -// stable. If you notice any problems on your platform, please notify -// googletestframework@googlegroups.com (patches for fixing them are -// even more welcome!). -// -// Note that it is possible that none of the GTEST_OS_* macros are defined. -// -// Macros indicating available Google Test features (defined to 1 if -// the corresponding feature is supported; otherwise undefined): -// GTEST_HAS_COMBINE - the Combine() function (for value-parameterized -// tests) -// GTEST_HAS_DEATH_TEST - death tests -// GTEST_HAS_PARAM_TEST - value-parameterized tests -// GTEST_HAS_TYPED_TEST - typed tests -// GTEST_HAS_TYPED_TEST_P - type-parameterized tests -// GTEST_USES_POSIX_RE - enhanced POSIX regex is used. Do not confuse with -// GTEST_HAS_POSIX_RE (see above) which users can -// define themselves. -// GTEST_USES_SIMPLE_RE - our own simple regex is used; -// the above two are mutually exclusive. -// GTEST_CAN_COMPARE_NULL - accepts untyped NULL in EXPECT_EQ(). -// -// Macros for basic C++ coding: -// GTEST_AMBIGUOUS_ELSE_BLOCKER_ - for disabling a gcc warning. -// GTEST_ATTRIBUTE_UNUSED_ - declares that a class' instances or a -// variable don't have to be used. -// GTEST_DISALLOW_ASSIGN_ - disables operator=. -// GTEST_DISALLOW_COPY_AND_ASSIGN_ - disables copy ctor and operator=. -// GTEST_MUST_USE_RESULT_ - declares that a function's result must be used. -// -// Synchronization: -// Mutex, MutexLock, ThreadLocal, GetThreadCount() -// - synchronization primitives. -// GTEST_IS_THREADSAFE - defined to 1 to indicate that the above -// synchronization primitives have real implementations -// and Google Test is thread-safe; or 0 otherwise. -// -// Template meta programming: -// is_pointer - as in TR1; needed on Symbian and IBM XL C/C++ only. -// IteratorTraits - partial implementation of std::iterator_traits, which -// is not available in libCstd when compiled with Sun C++. -// -// Smart pointers: -// scoped_ptr - as in TR2. -// -// Regular expressions: -// RE - a simple regular expression class using the POSIX -// Extended Regular Expression syntax on UNIX-like -// platforms, or a reduced regular exception syntax on -// other platforms, including Windows. -// -// Logging: -// GTEST_LOG_() - logs messages at the specified severity level. -// LogToStderr() - directs all log messages to stderr. -// FlushInfoLog() - flushes informational log messages. -// -// Stdout and stderr capturing: -// CaptureStdout() - starts capturing stdout. -// GetCapturedStdout() - stops capturing stdout and returns the captured -// string. -// CaptureStderr() - starts capturing stderr. -// GetCapturedStderr() - stops capturing stderr and returns the captured -// string. -// -// Integer types: -// TypeWithSize - maps an integer to a int type. -// Int32, UInt32, Int64, UInt64, TimeInMillis -// - integers of known sizes. -// BiggestInt - the biggest signed integer type. -// -// Command-line utilities: -// GTEST_FLAG() - references a flag. -// GTEST_DECLARE_*() - declares a flag. -// GTEST_DEFINE_*() - defines a flag. -// GetInjectableArgvs() - returns the command line as a vector of strings. -// -// Environment variable utilities: -// GetEnv() - gets the value of an environment variable. -// BoolFromGTestEnv() - parses a bool environment variable. -// Int32FromGTestEnv() - parses an Int32 environment variable. -// StringFromGTestEnv() - parses a string environment variable. - -#include // for isspace, etc -#include // for ptrdiff_t -#include -#include -#include -#ifndef _WIN32_WCE -# include -# include -#endif // !_WIN32_WCE - -#if defined __APPLE__ -# include -# include -#endif - -#include // NOLINT -#include // NOLINT -#include // NOLINT - -#define GTEST_DEV_EMAIL_ "googletestframework@@googlegroups.com" -#define GTEST_FLAG_PREFIX_ "gtest_" -#define GTEST_FLAG_PREFIX_DASH_ "gtest-" -#define GTEST_FLAG_PREFIX_UPPER_ "GTEST_" -#define GTEST_NAME_ "Google Test" -#define GTEST_PROJECT_URL_ "http://code.google.com/p/googletest/" - -// Determines the version of gcc that is used to compile this. -#ifdef __GNUC__ -// 40302 means version 4.3.2. -# define GTEST_GCC_VER_ \ - (__GNUC__*10000 + __GNUC_MINOR__*100 + __GNUC_PATCHLEVEL__) -#endif // __GNUC__ - -// Determines the platform on which Google Test is compiled. -#ifdef __CYGWIN__ -# define GTEST_OS_CYGWIN 1 -#elif defined __SYMBIAN32__ -# define GTEST_OS_SYMBIAN 1 -#elif defined _WIN32 -# define GTEST_OS_WINDOWS 1 -# ifdef _WIN32_WCE -# define GTEST_OS_WINDOWS_MOBILE 1 -# elif defined(__MINGW__) || defined(__MINGW32__) -# define GTEST_OS_WINDOWS_MINGW 1 -# else -# define GTEST_OS_WINDOWS_DESKTOP 1 -# endif // _WIN32_WCE -#elif defined __APPLE__ -# define GTEST_OS_MAC 1 -# if TARGET_OS_IPHONE -# define GTEST_OS_IOS 1 -# if TARGET_IPHONE_SIMULATOR -# define GTEST_OS_IOS_SIMULATOR 1 -# endif -# endif -#elif defined __linux__ -# define GTEST_OS_LINUX 1 -# if defined __ANDROID__ -# define GTEST_OS_LINUX_ANDROID 1 -# endif -#elif defined __MVS__ -# define GTEST_OS_ZOS 1 -#elif defined(__sun) && defined(__SVR4) -# define GTEST_OS_SOLARIS 1 -#elif defined(_AIX) -# define GTEST_OS_AIX 1 -#elif defined(__hpux) -# define GTEST_OS_HPUX 1 -#elif defined __native_client__ -# define GTEST_OS_NACL 1 -#elif defined __OpenBSD__ -# define GTEST_OS_OPENBSD 1 -#elif defined __QNX__ -# define GTEST_OS_QNX 1 -#endif // __CYGWIN__ - -#ifndef GTEST_LANG_CXX11 -// gcc and clang define __GXX_EXPERIMENTAL_CXX0X__ when -// -std={c,gnu}++{0x,11} is passed. The C++11 standard specifies a -// value for __cplusplus, and recent versions of clang, gcc, and -// probably other compilers set that too in C++11 mode. -# if __GXX_EXPERIMENTAL_CXX0X__ || __cplusplus >= 201103L -// Compiling in at least C++11 mode. -# define GTEST_LANG_CXX11 1 -# else -# define GTEST_LANG_CXX11 0 -# endif -#endif - -// Brings in definitions for functions used in the testing::internal::posix -// namespace (read, write, close, chdir, isatty, stat). We do not currently -// use them on Windows Mobile. -#if !GTEST_OS_WINDOWS -// This assumes that non-Windows OSes provide unistd.h. For OSes where this -// is not the case, we need to include headers that provide the functions -// mentioned above. -# include -# include -#elif !GTEST_OS_WINDOWS_MOBILE -# include -# include -#endif - -#if GTEST_OS_LINUX_ANDROID -// Used to define __ANDROID_API__ matching the target NDK API level. -# include // NOLINT -#endif - -// Defines this to true iff Google Test can use POSIX regular expressions. -#ifndef GTEST_HAS_POSIX_RE -# if GTEST_OS_LINUX_ANDROID -// On Android, is only available starting with Gingerbread. -# define GTEST_HAS_POSIX_RE (__ANDROID_API__ >= 9) -# else -# define GTEST_HAS_POSIX_RE (!GTEST_OS_WINDOWS) -# endif -#endif - -#if GTEST_HAS_POSIX_RE - -// On some platforms, needs someone to define size_t, and -// won't compile otherwise. We can #include it here as we already -// included , which is guaranteed to define size_t through -// . -# include // NOLINT - -# define GTEST_USES_POSIX_RE 1 - -#elif GTEST_OS_WINDOWS - -// is not available on Windows. Use our own simple regex -// implementation instead. -# define GTEST_USES_SIMPLE_RE 1 - -#else - -// may not be available on this platform. Use our own -// simple regex implementation instead. -# define GTEST_USES_SIMPLE_RE 1 - -#endif // GTEST_HAS_POSIX_RE - -#ifndef GTEST_HAS_EXCEPTIONS -// The user didn't tell us whether exceptions are enabled, so we need -// to figure it out. -# if defined(_MSC_VER) || defined(__BORLANDC__) -// MSVC's and C++Builder's implementations of the STL use the _HAS_EXCEPTIONS -// macro to enable exceptions, so we'll do the same. -// Assumes that exceptions are enabled by default. -# ifndef _HAS_EXCEPTIONS -# define _HAS_EXCEPTIONS 1 -# endif // _HAS_EXCEPTIONS -# define GTEST_HAS_EXCEPTIONS _HAS_EXCEPTIONS -# elif defined(__GNUC__) && __EXCEPTIONS -// gcc defines __EXCEPTIONS to 1 iff exceptions are enabled. -# define GTEST_HAS_EXCEPTIONS 1 -# elif defined(__SUNPRO_CC) -// Sun Pro CC supports exceptions. However, there is no compile-time way of -// detecting whether they are enabled or not. Therefore, we assume that -// they are enabled unless the user tells us otherwise. -# define GTEST_HAS_EXCEPTIONS 1 -# elif defined(__IBMCPP__) && __EXCEPTIONS -// xlC defines __EXCEPTIONS to 1 iff exceptions are enabled. -# define GTEST_HAS_EXCEPTIONS 1 -# elif defined(__HP_aCC) -// Exception handling is in effect by default in HP aCC compiler. It has to -// be turned of by +noeh compiler option if desired. -# define GTEST_HAS_EXCEPTIONS 1 -# else -// For other compilers, we assume exceptions are disabled to be -// conservative. -# define GTEST_HAS_EXCEPTIONS 0 -# endif // defined(_MSC_VER) || defined(__BORLANDC__) -#endif // GTEST_HAS_EXCEPTIONS - -#if !defined(GTEST_HAS_STD_STRING) -// Even though we don't use this macro any longer, we keep it in case -// some clients still depend on it. -# define GTEST_HAS_STD_STRING 1 -#elif !GTEST_HAS_STD_STRING -// The user told us that ::std::string isn't available. -# error "Google Test cannot be used where ::std::string isn't available." -#endif // !defined(GTEST_HAS_STD_STRING) - -#ifndef GTEST_HAS_GLOBAL_STRING -// The user didn't tell us whether ::string is available, so we need -// to figure it out. - -# define GTEST_HAS_GLOBAL_STRING 0 - -#endif // GTEST_HAS_GLOBAL_STRING - -#ifndef GTEST_HAS_STD_WSTRING -// The user didn't tell us whether ::std::wstring is available, so we need -// to figure it out. -// TODO(wan@google.com): uses autoconf to detect whether ::std::wstring -// is available. - -// Cygwin 1.7 and below doesn't support ::std::wstring. -// Solaris' libc++ doesn't support it either. Android has -// no support for it at least as recent as Froyo (2.2). -# define GTEST_HAS_STD_WSTRING \ - (!(GTEST_OS_LINUX_ANDROID || GTEST_OS_CYGWIN || GTEST_OS_SOLARIS)) - -#endif // GTEST_HAS_STD_WSTRING - -#ifndef GTEST_HAS_GLOBAL_WSTRING -// The user didn't tell us whether ::wstring is available, so we need -// to figure it out. -# define GTEST_HAS_GLOBAL_WSTRING \ - (GTEST_HAS_STD_WSTRING && GTEST_HAS_GLOBAL_STRING) -#endif // GTEST_HAS_GLOBAL_WSTRING - -// Determines whether RTTI is available. -#ifndef GTEST_HAS_RTTI -// The user didn't tell us whether RTTI is enabled, so we need to -// figure it out. - -# ifdef _MSC_VER - -# ifdef _CPPRTTI // MSVC defines this macro iff RTTI is enabled. -# define GTEST_HAS_RTTI 1 -# else -# define GTEST_HAS_RTTI 0 -# endif - -// Starting with version 4.3.2, gcc defines __GXX_RTTI iff RTTI is enabled. -# elif defined(__GNUC__) && (GTEST_GCC_VER_ >= 40302) - -# ifdef __GXX_RTTI -// When building against STLport with the Android NDK and with -// -frtti -fno-exceptions, the build fails at link time with undefined -// references to __cxa_bad_typeid. Note sure if STL or toolchain bug, -// so disable RTTI when detected. -# if GTEST_OS_LINUX_ANDROID && defined(_STLPORT_MAJOR) && \ - !defined(__EXCEPTIONS) -# define GTEST_HAS_RTTI 0 -# else -# define GTEST_HAS_RTTI 1 -# endif // GTEST_OS_LINUX_ANDROID && __STLPORT_MAJOR && !__EXCEPTIONS -# else -# define GTEST_HAS_RTTI 0 -# endif // __GXX_RTTI - -// Clang defines __GXX_RTTI starting with version 3.0, but its manual recommends -// using has_feature instead. has_feature(cxx_rtti) is supported since 2.7, the -// first version with C++ support. -# elif defined(__clang__) - -# define GTEST_HAS_RTTI __has_feature(cxx_rtti) - -// Starting with version 9.0 IBM Visual Age defines __RTTI_ALL__ to 1 if -// both the typeid and dynamic_cast features are present. -# elif defined(__IBMCPP__) && (__IBMCPP__ >= 900) - -# ifdef __RTTI_ALL__ -# define GTEST_HAS_RTTI 1 -# else -# define GTEST_HAS_RTTI 0 -# endif - -# else - -// For all other compilers, we assume RTTI is enabled. -# define GTEST_HAS_RTTI 1 - -# endif // _MSC_VER - -#endif // GTEST_HAS_RTTI - -// It's this header's responsibility to #include when RTTI -// is enabled. -#if GTEST_HAS_RTTI -# include -#endif - -// Determines whether Google Test can use the pthreads library. -#ifndef GTEST_HAS_PTHREAD -// The user didn't tell us explicitly, so we assume pthreads support is -// available on Linux and Mac. -// -// To disable threading support in Google Test, add -DGTEST_HAS_PTHREAD=0 -// to your compiler flags. -# define GTEST_HAS_PTHREAD (GTEST_OS_LINUX || GTEST_OS_MAC || GTEST_OS_HPUX \ - || GTEST_OS_QNX) -#endif // GTEST_HAS_PTHREAD - -#if GTEST_HAS_PTHREAD -// gtest-port.h guarantees to #include when GTEST_HAS_PTHREAD is -// true. -# include // NOLINT - -// For timespec and nanosleep, used below. -# include // NOLINT -#endif - -// Determines whether Google Test can use tr1/tuple. You can define -// this macro to 0 to prevent Google Test from using tuple (any -// feature depending on tuple with be disabled in this mode). -#ifndef GTEST_HAS_TR1_TUPLE -# if GTEST_OS_LINUX_ANDROID && defined(_STLPORT_MAJOR) -// STLport, provided with the Android NDK, has neither or . -# define GTEST_HAS_TR1_TUPLE 0 -# else -// The user didn't tell us not to do it, so we assume it's OK. -# define GTEST_HAS_TR1_TUPLE 1 -# endif -#endif // GTEST_HAS_TR1_TUPLE - -// Determines whether Google Test's own tr1 tuple implementation -// should be used. -#ifndef GTEST_USE_OWN_TR1_TUPLE -// The user didn't tell us, so we need to figure it out. - -// We use our own TR1 tuple if we aren't sure the user has an -// implementation of it already. At this time, libstdc++ 4.0.0+ and -// MSVC 2010 are the only mainstream standard libraries that come -// with a TR1 tuple implementation. NVIDIA's CUDA NVCC compiler -// pretends to be GCC by defining __GNUC__ and friends, but cannot -// compile GCC's tuple implementation. MSVC 2008 (9.0) provides TR1 -// tuple in a 323 MB Feature Pack download, which we cannot assume the -// user has. QNX's QCC compiler is a modified GCC but it doesn't -// support TR1 tuple. libc++ only provides std::tuple, in C++11 mode, -// and it can be used with some compilers that define __GNUC__. -# if (defined(__GNUC__) && !defined(__CUDACC__) && (GTEST_GCC_VER_ >= 40000) \ - && !GTEST_OS_QNX && !defined(_LIBCPP_VERSION)) || _MSC_VER >= 1600 -# define GTEST_ENV_HAS_TR1_TUPLE_ 1 -# endif - -// C++11 specifies that provides std::tuple. Use that if gtest is used -// in C++11 mode and libstdc++ isn't very old (binaries targeting OS X 10.6 -// can build with clang but need to use gcc4.2's libstdc++). -# if GTEST_LANG_CXX11 && (!defined(__GLIBCXX__) || __GLIBCXX__ > 20110325) -# define GTEST_ENV_HAS_STD_TUPLE_ 1 -# endif - -# if GTEST_ENV_HAS_TR1_TUPLE_ || GTEST_ENV_HAS_STD_TUPLE_ -# define GTEST_USE_OWN_TR1_TUPLE 0 -# else -# define GTEST_USE_OWN_TR1_TUPLE 1 -# endif - -#endif // GTEST_USE_OWN_TR1_TUPLE - -// To avoid conditional compilation everywhere, we make it -// gtest-port.h's responsibility to #include the header implementing -// tr1/tuple. -#if GTEST_HAS_TR1_TUPLE - -# if GTEST_USE_OWN_TR1_TUPLE -// This file was GENERATED by command: -// pump.py gtest-tuple.h.pump -// DO NOT EDIT BY HAND!!! - -// Copyright 2009 Google Inc. -// All Rights Reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: wan@google.com (Zhanyong Wan) - -// Implements a subset of TR1 tuple needed by Google Test and Google Mock. - -#ifndef GTEST_INCLUDE_GTEST_INTERNAL_GTEST_TUPLE_H_ -#define GTEST_INCLUDE_GTEST_INTERNAL_GTEST_TUPLE_H_ - -#include // For ::std::pair. - -// The compiler used in Symbian has a bug that prevents us from declaring the -// tuple template as a friend (it complains that tuple is redefined). This -// hack bypasses the bug by declaring the members that should otherwise be -// private as public. -// Sun Studio versions < 12 also have the above bug. -#if defined(__SYMBIAN32__) || (defined(__SUNPRO_CC) && __SUNPRO_CC < 0x590) -# define GTEST_DECLARE_TUPLE_AS_FRIEND_ public: -#else -# define GTEST_DECLARE_TUPLE_AS_FRIEND_ \ - template friend class tuple; \ - private: -#endif - -// GTEST_n_TUPLE_(T) is the type of an n-tuple. -#define GTEST_0_TUPLE_(T) tuple<> -#define GTEST_1_TUPLE_(T) tuple -#define GTEST_2_TUPLE_(T) tuple -#define GTEST_3_TUPLE_(T) tuple -#define GTEST_4_TUPLE_(T) tuple -#define GTEST_5_TUPLE_(T) tuple -#define GTEST_6_TUPLE_(T) tuple -#define GTEST_7_TUPLE_(T) tuple -#define GTEST_8_TUPLE_(T) tuple -#define GTEST_9_TUPLE_(T) tuple -#define GTEST_10_TUPLE_(T) tuple - -// GTEST_n_TYPENAMES_(T) declares a list of n typenames. -#define GTEST_0_TYPENAMES_(T) -#define GTEST_1_TYPENAMES_(T) typename T##0 -#define GTEST_2_TYPENAMES_(T) typename T##0, typename T##1 -#define GTEST_3_TYPENAMES_(T) typename T##0, typename T##1, typename T##2 -#define GTEST_4_TYPENAMES_(T) typename T##0, typename T##1, typename T##2, \ - typename T##3 -#define GTEST_5_TYPENAMES_(T) typename T##0, typename T##1, typename T##2, \ - typename T##3, typename T##4 -#define GTEST_6_TYPENAMES_(T) typename T##0, typename T##1, typename T##2, \ - typename T##3, typename T##4, typename T##5 -#define GTEST_7_TYPENAMES_(T) typename T##0, typename T##1, typename T##2, \ - typename T##3, typename T##4, typename T##5, typename T##6 -#define GTEST_8_TYPENAMES_(T) typename T##0, typename T##1, typename T##2, \ - typename T##3, typename T##4, typename T##5, typename T##6, typename T##7 -#define GTEST_9_TYPENAMES_(T) typename T##0, typename T##1, typename T##2, \ - typename T##3, typename T##4, typename T##5, typename T##6, \ - typename T##7, typename T##8 -#define GTEST_10_TYPENAMES_(T) typename T##0, typename T##1, typename T##2, \ - typename T##3, typename T##4, typename T##5, typename T##6, \ - typename T##7, typename T##8, typename T##9 - -// In theory, defining stuff in the ::std namespace is undefined -// behavior. We can do this as we are playing the role of a standard -// library vendor. -namespace std { -namespace tr1 { - -template -class tuple; - -// Anything in namespace gtest_internal is Google Test's INTERNAL -// IMPLEMENTATION DETAIL and MUST NOT BE USED DIRECTLY in user code. -namespace gtest_internal { - -// ByRef::type is T if T is a reference; otherwise it's const T&. -template -struct ByRef { typedef const T& type; }; // NOLINT -template -struct ByRef { typedef T& type; }; // NOLINT - -// A handy wrapper for ByRef. -#define GTEST_BY_REF_(T) typename ::std::tr1::gtest_internal::ByRef::type - -// AddRef::type is T if T is a reference; otherwise it's T&. This -// is the same as tr1::add_reference::type. -template -struct AddRef { typedef T& type; }; // NOLINT -template -struct AddRef { typedef T& type; }; // NOLINT - -// A handy wrapper for AddRef. -#define GTEST_ADD_REF_(T) typename ::std::tr1::gtest_internal::AddRef::type - -// A helper for implementing get(). -template class Get; - -// A helper for implementing tuple_element. kIndexValid is true -// iff k < the number of fields in tuple type T. -template -struct TupleElement; - -template -struct TupleElement { - typedef T0 type; -}; - -template -struct TupleElement { - typedef T1 type; -}; - -template -struct TupleElement { - typedef T2 type; -}; - -template -struct TupleElement { - typedef T3 type; -}; - -template -struct TupleElement { - typedef T4 type; -}; - -template -struct TupleElement { - typedef T5 type; -}; - -template -struct TupleElement { - typedef T6 type; -}; - -template -struct TupleElement { - typedef T7 type; -}; - -template -struct TupleElement { - typedef T8 type; -}; - -template -struct TupleElement { - typedef T9 type; -}; - -} // namespace gtest_internal - -template <> -class tuple<> { - public: - tuple() {} - tuple(const tuple& /* t */) {} - tuple& operator=(const tuple& /* t */) { return *this; } -}; - -template -class GTEST_1_TUPLE_(T) { - public: - template friend class gtest_internal::Get; - - tuple() : f0_() {} - - explicit tuple(GTEST_BY_REF_(T0) f0) : f0_(f0) {} - - tuple(const tuple& t) : f0_(t.f0_) {} - - template - tuple(const GTEST_1_TUPLE_(U)& t) : f0_(t.f0_) {} - - tuple& operator=(const tuple& t) { return CopyFrom(t); } - - template - tuple& operator=(const GTEST_1_TUPLE_(U)& t) { - return CopyFrom(t); - } - - GTEST_DECLARE_TUPLE_AS_FRIEND_ - - template - tuple& CopyFrom(const GTEST_1_TUPLE_(U)& t) { - f0_ = t.f0_; - return *this; - } - - T0 f0_; -}; - -template -class GTEST_2_TUPLE_(T) { - public: - template friend class gtest_internal::Get; - - tuple() : f0_(), f1_() {} - - explicit tuple(GTEST_BY_REF_(T0) f0, GTEST_BY_REF_(T1) f1) : f0_(f0), - f1_(f1) {} - - tuple(const tuple& t) : f0_(t.f0_), f1_(t.f1_) {} - - template - tuple(const GTEST_2_TUPLE_(U)& t) : f0_(t.f0_), f1_(t.f1_) {} - template - tuple(const ::std::pair& p) : f0_(p.first), f1_(p.second) {} - - tuple& operator=(const tuple& t) { return CopyFrom(t); } - - template - tuple& operator=(const GTEST_2_TUPLE_(U)& t) { - return CopyFrom(t); - } - template - tuple& operator=(const ::std::pair& p) { - f0_ = p.first; - f1_ = p.second; - return *this; - } - - GTEST_DECLARE_TUPLE_AS_FRIEND_ - - template - tuple& CopyFrom(const GTEST_2_TUPLE_(U)& t) { - f0_ = t.f0_; - f1_ = t.f1_; - return *this; - } - - T0 f0_; - T1 f1_; -}; - -template -class GTEST_3_TUPLE_(T) { - public: - template friend class gtest_internal::Get; - - tuple() : f0_(), f1_(), f2_() {} - - explicit tuple(GTEST_BY_REF_(T0) f0, GTEST_BY_REF_(T1) f1, - GTEST_BY_REF_(T2) f2) : f0_(f0), f1_(f1), f2_(f2) {} - - tuple(const tuple& t) : f0_(t.f0_), f1_(t.f1_), f2_(t.f2_) {} - - template - tuple(const GTEST_3_TUPLE_(U)& t) : f0_(t.f0_), f1_(t.f1_), f2_(t.f2_) {} - - tuple& operator=(const tuple& t) { return CopyFrom(t); } - - template - tuple& operator=(const GTEST_3_TUPLE_(U)& t) { - return CopyFrom(t); - } - - GTEST_DECLARE_TUPLE_AS_FRIEND_ - - template - tuple& CopyFrom(const GTEST_3_TUPLE_(U)& t) { - f0_ = t.f0_; - f1_ = t.f1_; - f2_ = t.f2_; - return *this; - } - - T0 f0_; - T1 f1_; - T2 f2_; -}; - -template -class GTEST_4_TUPLE_(T) { - public: - template friend class gtest_internal::Get; - - tuple() : f0_(), f1_(), f2_(), f3_() {} - - explicit tuple(GTEST_BY_REF_(T0) f0, GTEST_BY_REF_(T1) f1, - GTEST_BY_REF_(T2) f2, GTEST_BY_REF_(T3) f3) : f0_(f0), f1_(f1), f2_(f2), - f3_(f3) {} - - tuple(const tuple& t) : f0_(t.f0_), f1_(t.f1_), f2_(t.f2_), f3_(t.f3_) {} - - template - tuple(const GTEST_4_TUPLE_(U)& t) : f0_(t.f0_), f1_(t.f1_), f2_(t.f2_), - f3_(t.f3_) {} - - tuple& operator=(const tuple& t) { return CopyFrom(t); } - - template - tuple& operator=(const GTEST_4_TUPLE_(U)& t) { - return CopyFrom(t); - } - - GTEST_DECLARE_TUPLE_AS_FRIEND_ - - template - tuple& CopyFrom(const GTEST_4_TUPLE_(U)& t) { - f0_ = t.f0_; - f1_ = t.f1_; - f2_ = t.f2_; - f3_ = t.f3_; - return *this; - } - - T0 f0_; - T1 f1_; - T2 f2_; - T3 f3_; -}; - -template -class GTEST_5_TUPLE_(T) { - public: - template friend class gtest_internal::Get; - - tuple() : f0_(), f1_(), f2_(), f3_(), f4_() {} - - explicit tuple(GTEST_BY_REF_(T0) f0, GTEST_BY_REF_(T1) f1, - GTEST_BY_REF_(T2) f2, GTEST_BY_REF_(T3) f3, - GTEST_BY_REF_(T4) f4) : f0_(f0), f1_(f1), f2_(f2), f3_(f3), f4_(f4) {} - - tuple(const tuple& t) : f0_(t.f0_), f1_(t.f1_), f2_(t.f2_), f3_(t.f3_), - f4_(t.f4_) {} - - template - tuple(const GTEST_5_TUPLE_(U)& t) : f0_(t.f0_), f1_(t.f1_), f2_(t.f2_), - f3_(t.f3_), f4_(t.f4_) {} - - tuple& operator=(const tuple& t) { return CopyFrom(t); } - - template - tuple& operator=(const GTEST_5_TUPLE_(U)& t) { - return CopyFrom(t); - } - - GTEST_DECLARE_TUPLE_AS_FRIEND_ - - template - tuple& CopyFrom(const GTEST_5_TUPLE_(U)& t) { - f0_ = t.f0_; - f1_ = t.f1_; - f2_ = t.f2_; - f3_ = t.f3_; - f4_ = t.f4_; - return *this; - } - - T0 f0_; - T1 f1_; - T2 f2_; - T3 f3_; - T4 f4_; -}; - -template -class GTEST_6_TUPLE_(T) { - public: - template friend class gtest_internal::Get; - - tuple() : f0_(), f1_(), f2_(), f3_(), f4_(), f5_() {} - - explicit tuple(GTEST_BY_REF_(T0) f0, GTEST_BY_REF_(T1) f1, - GTEST_BY_REF_(T2) f2, GTEST_BY_REF_(T3) f3, GTEST_BY_REF_(T4) f4, - GTEST_BY_REF_(T5) f5) : f0_(f0), f1_(f1), f2_(f2), f3_(f3), f4_(f4), - f5_(f5) {} - - tuple(const tuple& t) : f0_(t.f0_), f1_(t.f1_), f2_(t.f2_), f3_(t.f3_), - f4_(t.f4_), f5_(t.f5_) {} - - template - tuple(const GTEST_6_TUPLE_(U)& t) : f0_(t.f0_), f1_(t.f1_), f2_(t.f2_), - f3_(t.f3_), f4_(t.f4_), f5_(t.f5_) {} - - tuple& operator=(const tuple& t) { return CopyFrom(t); } - - template - tuple& operator=(const GTEST_6_TUPLE_(U)& t) { - return CopyFrom(t); - } - - GTEST_DECLARE_TUPLE_AS_FRIEND_ - - template - tuple& CopyFrom(const GTEST_6_TUPLE_(U)& t) { - f0_ = t.f0_; - f1_ = t.f1_; - f2_ = t.f2_; - f3_ = t.f3_; - f4_ = t.f4_; - f5_ = t.f5_; - return *this; - } - - T0 f0_; - T1 f1_; - T2 f2_; - T3 f3_; - T4 f4_; - T5 f5_; -}; - -template -class GTEST_7_TUPLE_(T) { - public: - template friend class gtest_internal::Get; - - tuple() : f0_(), f1_(), f2_(), f3_(), f4_(), f5_(), f6_() {} - - explicit tuple(GTEST_BY_REF_(T0) f0, GTEST_BY_REF_(T1) f1, - GTEST_BY_REF_(T2) f2, GTEST_BY_REF_(T3) f3, GTEST_BY_REF_(T4) f4, - GTEST_BY_REF_(T5) f5, GTEST_BY_REF_(T6) f6) : f0_(f0), f1_(f1), f2_(f2), - f3_(f3), f4_(f4), f5_(f5), f6_(f6) {} - - tuple(const tuple& t) : f0_(t.f0_), f1_(t.f1_), f2_(t.f2_), f3_(t.f3_), - f4_(t.f4_), f5_(t.f5_), f6_(t.f6_) {} - - template - tuple(const GTEST_7_TUPLE_(U)& t) : f0_(t.f0_), f1_(t.f1_), f2_(t.f2_), - f3_(t.f3_), f4_(t.f4_), f5_(t.f5_), f6_(t.f6_) {} - - tuple& operator=(const tuple& t) { return CopyFrom(t); } - - template - tuple& operator=(const GTEST_7_TUPLE_(U)& t) { - return CopyFrom(t); - } - - GTEST_DECLARE_TUPLE_AS_FRIEND_ - - template - tuple& CopyFrom(const GTEST_7_TUPLE_(U)& t) { - f0_ = t.f0_; - f1_ = t.f1_; - f2_ = t.f2_; - f3_ = t.f3_; - f4_ = t.f4_; - f5_ = t.f5_; - f6_ = t.f6_; - return *this; - } - - T0 f0_; - T1 f1_; - T2 f2_; - T3 f3_; - T4 f4_; - T5 f5_; - T6 f6_; -}; - -template -class GTEST_8_TUPLE_(T) { - public: - template friend class gtest_internal::Get; - - tuple() : f0_(), f1_(), f2_(), f3_(), f4_(), f5_(), f6_(), f7_() {} - - explicit tuple(GTEST_BY_REF_(T0) f0, GTEST_BY_REF_(T1) f1, - GTEST_BY_REF_(T2) f2, GTEST_BY_REF_(T3) f3, GTEST_BY_REF_(T4) f4, - GTEST_BY_REF_(T5) f5, GTEST_BY_REF_(T6) f6, - GTEST_BY_REF_(T7) f7) : f0_(f0), f1_(f1), f2_(f2), f3_(f3), f4_(f4), - f5_(f5), f6_(f6), f7_(f7) {} - - tuple(const tuple& t) : f0_(t.f0_), f1_(t.f1_), f2_(t.f2_), f3_(t.f3_), - f4_(t.f4_), f5_(t.f5_), f6_(t.f6_), f7_(t.f7_) {} - - template - tuple(const GTEST_8_TUPLE_(U)& t) : f0_(t.f0_), f1_(t.f1_), f2_(t.f2_), - f3_(t.f3_), f4_(t.f4_), f5_(t.f5_), f6_(t.f6_), f7_(t.f7_) {} - - tuple& operator=(const tuple& t) { return CopyFrom(t); } - - template - tuple& operator=(const GTEST_8_TUPLE_(U)& t) { - return CopyFrom(t); - } - - GTEST_DECLARE_TUPLE_AS_FRIEND_ - - template - tuple& CopyFrom(const GTEST_8_TUPLE_(U)& t) { - f0_ = t.f0_; - f1_ = t.f1_; - f2_ = t.f2_; - f3_ = t.f3_; - f4_ = t.f4_; - f5_ = t.f5_; - f6_ = t.f6_; - f7_ = t.f7_; - return *this; - } - - T0 f0_; - T1 f1_; - T2 f2_; - T3 f3_; - T4 f4_; - T5 f5_; - T6 f6_; - T7 f7_; -}; - -template -class GTEST_9_TUPLE_(T) { - public: - template friend class gtest_internal::Get; - - tuple() : f0_(), f1_(), f2_(), f3_(), f4_(), f5_(), f6_(), f7_(), f8_() {} - - explicit tuple(GTEST_BY_REF_(T0) f0, GTEST_BY_REF_(T1) f1, - GTEST_BY_REF_(T2) f2, GTEST_BY_REF_(T3) f3, GTEST_BY_REF_(T4) f4, - GTEST_BY_REF_(T5) f5, GTEST_BY_REF_(T6) f6, GTEST_BY_REF_(T7) f7, - GTEST_BY_REF_(T8) f8) : f0_(f0), f1_(f1), f2_(f2), f3_(f3), f4_(f4), - f5_(f5), f6_(f6), f7_(f7), f8_(f8) {} - - tuple(const tuple& t) : f0_(t.f0_), f1_(t.f1_), f2_(t.f2_), f3_(t.f3_), - f4_(t.f4_), f5_(t.f5_), f6_(t.f6_), f7_(t.f7_), f8_(t.f8_) {} - - template - tuple(const GTEST_9_TUPLE_(U)& t) : f0_(t.f0_), f1_(t.f1_), f2_(t.f2_), - f3_(t.f3_), f4_(t.f4_), f5_(t.f5_), f6_(t.f6_), f7_(t.f7_), f8_(t.f8_) {} - - tuple& operator=(const tuple& t) { return CopyFrom(t); } - - template - tuple& operator=(const GTEST_9_TUPLE_(U)& t) { - return CopyFrom(t); - } - - GTEST_DECLARE_TUPLE_AS_FRIEND_ - - template - tuple& CopyFrom(const GTEST_9_TUPLE_(U)& t) { - f0_ = t.f0_; - f1_ = t.f1_; - f2_ = t.f2_; - f3_ = t.f3_; - f4_ = t.f4_; - f5_ = t.f5_; - f6_ = t.f6_; - f7_ = t.f7_; - f8_ = t.f8_; - return *this; - } - - T0 f0_; - T1 f1_; - T2 f2_; - T3 f3_; - T4 f4_; - T5 f5_; - T6 f6_; - T7 f7_; - T8 f8_; -}; - -template -class tuple { - public: - template friend class gtest_internal::Get; - - tuple() : f0_(), f1_(), f2_(), f3_(), f4_(), f5_(), f6_(), f7_(), f8_(), - f9_() {} - - explicit tuple(GTEST_BY_REF_(T0) f0, GTEST_BY_REF_(T1) f1, - GTEST_BY_REF_(T2) f2, GTEST_BY_REF_(T3) f3, GTEST_BY_REF_(T4) f4, - GTEST_BY_REF_(T5) f5, GTEST_BY_REF_(T6) f6, GTEST_BY_REF_(T7) f7, - GTEST_BY_REF_(T8) f8, GTEST_BY_REF_(T9) f9) : f0_(f0), f1_(f1), f2_(f2), - f3_(f3), f4_(f4), f5_(f5), f6_(f6), f7_(f7), f8_(f8), f9_(f9) {} - - tuple(const tuple& t) : f0_(t.f0_), f1_(t.f1_), f2_(t.f2_), f3_(t.f3_), - f4_(t.f4_), f5_(t.f5_), f6_(t.f6_), f7_(t.f7_), f8_(t.f8_), f9_(t.f9_) {} - - template - tuple(const GTEST_10_TUPLE_(U)& t) : f0_(t.f0_), f1_(t.f1_), f2_(t.f2_), - f3_(t.f3_), f4_(t.f4_), f5_(t.f5_), f6_(t.f6_), f7_(t.f7_), f8_(t.f8_), - f9_(t.f9_) {} - - tuple& operator=(const tuple& t) { return CopyFrom(t); } - - template - tuple& operator=(const GTEST_10_TUPLE_(U)& t) { - return CopyFrom(t); - } - - GTEST_DECLARE_TUPLE_AS_FRIEND_ - - template - tuple& CopyFrom(const GTEST_10_TUPLE_(U)& t) { - f0_ = t.f0_; - f1_ = t.f1_; - f2_ = t.f2_; - f3_ = t.f3_; - f4_ = t.f4_; - f5_ = t.f5_; - f6_ = t.f6_; - f7_ = t.f7_; - f8_ = t.f8_; - f9_ = t.f9_; - return *this; - } - - T0 f0_; - T1 f1_; - T2 f2_; - T3 f3_; - T4 f4_; - T5 f5_; - T6 f6_; - T7 f7_; - T8 f8_; - T9 f9_; -}; - -// 6.1.3.2 Tuple creation functions. - -// Known limitations: we don't support passing an -// std::tr1::reference_wrapper to make_tuple(). And we don't -// implement tie(). - -inline tuple<> make_tuple() { return tuple<>(); } - -template -inline GTEST_1_TUPLE_(T) make_tuple(const T0& f0) { - return GTEST_1_TUPLE_(T)(f0); -} - -template -inline GTEST_2_TUPLE_(T) make_tuple(const T0& f0, const T1& f1) { - return GTEST_2_TUPLE_(T)(f0, f1); -} - -template -inline GTEST_3_TUPLE_(T) make_tuple(const T0& f0, const T1& f1, const T2& f2) { - return GTEST_3_TUPLE_(T)(f0, f1, f2); -} - -template -inline GTEST_4_TUPLE_(T) make_tuple(const T0& f0, const T1& f1, const T2& f2, - const T3& f3) { - return GTEST_4_TUPLE_(T)(f0, f1, f2, f3); -} - -template -inline GTEST_5_TUPLE_(T) make_tuple(const T0& f0, const T1& f1, const T2& f2, - const T3& f3, const T4& f4) { - return GTEST_5_TUPLE_(T)(f0, f1, f2, f3, f4); -} - -template -inline GTEST_6_TUPLE_(T) make_tuple(const T0& f0, const T1& f1, const T2& f2, - const T3& f3, const T4& f4, const T5& f5) { - return GTEST_6_TUPLE_(T)(f0, f1, f2, f3, f4, f5); -} - -template -inline GTEST_7_TUPLE_(T) make_tuple(const T0& f0, const T1& f1, const T2& f2, - const T3& f3, const T4& f4, const T5& f5, const T6& f6) { - return GTEST_7_TUPLE_(T)(f0, f1, f2, f3, f4, f5, f6); -} - -template -inline GTEST_8_TUPLE_(T) make_tuple(const T0& f0, const T1& f1, const T2& f2, - const T3& f3, const T4& f4, const T5& f5, const T6& f6, const T7& f7) { - return GTEST_8_TUPLE_(T)(f0, f1, f2, f3, f4, f5, f6, f7); -} - -template -inline GTEST_9_TUPLE_(T) make_tuple(const T0& f0, const T1& f1, const T2& f2, - const T3& f3, const T4& f4, const T5& f5, const T6& f6, const T7& f7, - const T8& f8) { - return GTEST_9_TUPLE_(T)(f0, f1, f2, f3, f4, f5, f6, f7, f8); -} - -template -inline GTEST_10_TUPLE_(T) make_tuple(const T0& f0, const T1& f1, const T2& f2, - const T3& f3, const T4& f4, const T5& f5, const T6& f6, const T7& f7, - const T8& f8, const T9& f9) { - return GTEST_10_TUPLE_(T)(f0, f1, f2, f3, f4, f5, f6, f7, f8, f9); -} - -// 6.1.3.3 Tuple helper classes. - -template struct tuple_size; - -template -struct tuple_size { - static const int value = 0; -}; - -template -struct tuple_size { - static const int value = 1; -}; - -template -struct tuple_size { - static const int value = 2; -}; - -template -struct tuple_size { - static const int value = 3; -}; - -template -struct tuple_size { - static const int value = 4; -}; - -template -struct tuple_size { - static const int value = 5; -}; - -template -struct tuple_size { - static const int value = 6; -}; - -template -struct tuple_size { - static const int value = 7; -}; - -template -struct tuple_size { - static const int value = 8; -}; - -template -struct tuple_size { - static const int value = 9; -}; - -template -struct tuple_size { - static const int value = 10; -}; - -template -struct tuple_element { - typedef typename gtest_internal::TupleElement< - k < (tuple_size::value), k, Tuple>::type type; -}; - -#define GTEST_TUPLE_ELEMENT_(k, Tuple) typename tuple_element::type - -// 6.1.3.4 Element access. - -namespace gtest_internal { - -template <> -class Get<0> { - public: - template - static GTEST_ADD_REF_(GTEST_TUPLE_ELEMENT_(0, Tuple)) - Field(Tuple& t) { return t.f0_; } // NOLINT - - template - static GTEST_BY_REF_(GTEST_TUPLE_ELEMENT_(0, Tuple)) - ConstField(const Tuple& t) { return t.f0_; } -}; - -template <> -class Get<1> { - public: - template - static GTEST_ADD_REF_(GTEST_TUPLE_ELEMENT_(1, Tuple)) - Field(Tuple& t) { return t.f1_; } // NOLINT - - template - static GTEST_BY_REF_(GTEST_TUPLE_ELEMENT_(1, Tuple)) - ConstField(const Tuple& t) { return t.f1_; } -}; - -template <> -class Get<2> { - public: - template - static GTEST_ADD_REF_(GTEST_TUPLE_ELEMENT_(2, Tuple)) - Field(Tuple& t) { return t.f2_; } // NOLINT - - template - static GTEST_BY_REF_(GTEST_TUPLE_ELEMENT_(2, Tuple)) - ConstField(const Tuple& t) { return t.f2_; } -}; - -template <> -class Get<3> { - public: - template - static GTEST_ADD_REF_(GTEST_TUPLE_ELEMENT_(3, Tuple)) - Field(Tuple& t) { return t.f3_; } // NOLINT - - template - static GTEST_BY_REF_(GTEST_TUPLE_ELEMENT_(3, Tuple)) - ConstField(const Tuple& t) { return t.f3_; } -}; - -template <> -class Get<4> { - public: - template - static GTEST_ADD_REF_(GTEST_TUPLE_ELEMENT_(4, Tuple)) - Field(Tuple& t) { return t.f4_; } // NOLINT - - template - static GTEST_BY_REF_(GTEST_TUPLE_ELEMENT_(4, Tuple)) - ConstField(const Tuple& t) { return t.f4_; } -}; - -template <> -class Get<5> { - public: - template - static GTEST_ADD_REF_(GTEST_TUPLE_ELEMENT_(5, Tuple)) - Field(Tuple& t) { return t.f5_; } // NOLINT - - template - static GTEST_BY_REF_(GTEST_TUPLE_ELEMENT_(5, Tuple)) - ConstField(const Tuple& t) { return t.f5_; } -}; - -template <> -class Get<6> { - public: - template - static GTEST_ADD_REF_(GTEST_TUPLE_ELEMENT_(6, Tuple)) - Field(Tuple& t) { return t.f6_; } // NOLINT - - template - static GTEST_BY_REF_(GTEST_TUPLE_ELEMENT_(6, Tuple)) - ConstField(const Tuple& t) { return t.f6_; } -}; - -template <> -class Get<7> { - public: - template - static GTEST_ADD_REF_(GTEST_TUPLE_ELEMENT_(7, Tuple)) - Field(Tuple& t) { return t.f7_; } // NOLINT - - template - static GTEST_BY_REF_(GTEST_TUPLE_ELEMENT_(7, Tuple)) - ConstField(const Tuple& t) { return t.f7_; } -}; - -template <> -class Get<8> { - public: - template - static GTEST_ADD_REF_(GTEST_TUPLE_ELEMENT_(8, Tuple)) - Field(Tuple& t) { return t.f8_; } // NOLINT - - template - static GTEST_BY_REF_(GTEST_TUPLE_ELEMENT_(8, Tuple)) - ConstField(const Tuple& t) { return t.f8_; } -}; - -template <> -class Get<9> { - public: - template - static GTEST_ADD_REF_(GTEST_TUPLE_ELEMENT_(9, Tuple)) - Field(Tuple& t) { return t.f9_; } // NOLINT - - template - static GTEST_BY_REF_(GTEST_TUPLE_ELEMENT_(9, Tuple)) - ConstField(const Tuple& t) { return t.f9_; } -}; - -} // namespace gtest_internal - -template -GTEST_ADD_REF_(GTEST_TUPLE_ELEMENT_(k, GTEST_10_TUPLE_(T))) -get(GTEST_10_TUPLE_(T)& t) { - return gtest_internal::Get::Field(t); -} - -template -GTEST_BY_REF_(GTEST_TUPLE_ELEMENT_(k, GTEST_10_TUPLE_(T))) -get(const GTEST_10_TUPLE_(T)& t) { - return gtest_internal::Get::ConstField(t); -} - -// 6.1.3.5 Relational operators - -// We only implement == and !=, as we don't have a need for the rest yet. - -namespace gtest_internal { - -// SameSizeTuplePrefixComparator::Eq(t1, t2) returns true if the -// first k fields of t1 equals the first k fields of t2. -// SameSizeTuplePrefixComparator(k1, k2) would be a compiler error if -// k1 != k2. -template -struct SameSizeTuplePrefixComparator; - -template <> -struct SameSizeTuplePrefixComparator<0, 0> { - template - static bool Eq(const Tuple1& /* t1 */, const Tuple2& /* t2 */) { - return true; - } -}; - -template -struct SameSizeTuplePrefixComparator { - template - static bool Eq(const Tuple1& t1, const Tuple2& t2) { - return SameSizeTuplePrefixComparator::Eq(t1, t2) && - ::std::tr1::get(t1) == ::std::tr1::get(t2); - } -}; - -} // namespace gtest_internal - -template -inline bool operator==(const GTEST_10_TUPLE_(T)& t, - const GTEST_10_TUPLE_(U)& u) { - return gtest_internal::SameSizeTuplePrefixComparator< - tuple_size::value, - tuple_size::value>::Eq(t, u); -} - -template -inline bool operator!=(const GTEST_10_TUPLE_(T)& t, - const GTEST_10_TUPLE_(U)& u) { return !(t == u); } - -// 6.1.4 Pairs. -// Unimplemented. - -} // namespace tr1 -} // namespace std - -#undef GTEST_0_TUPLE_ -#undef GTEST_1_TUPLE_ -#undef GTEST_2_TUPLE_ -#undef GTEST_3_TUPLE_ -#undef GTEST_4_TUPLE_ -#undef GTEST_5_TUPLE_ -#undef GTEST_6_TUPLE_ -#undef GTEST_7_TUPLE_ -#undef GTEST_8_TUPLE_ -#undef GTEST_9_TUPLE_ -#undef GTEST_10_TUPLE_ - -#undef GTEST_0_TYPENAMES_ -#undef GTEST_1_TYPENAMES_ -#undef GTEST_2_TYPENAMES_ -#undef GTEST_3_TYPENAMES_ -#undef GTEST_4_TYPENAMES_ -#undef GTEST_5_TYPENAMES_ -#undef GTEST_6_TYPENAMES_ -#undef GTEST_7_TYPENAMES_ -#undef GTEST_8_TYPENAMES_ -#undef GTEST_9_TYPENAMES_ -#undef GTEST_10_TYPENAMES_ - -#undef GTEST_DECLARE_TUPLE_AS_FRIEND_ -#undef GTEST_BY_REF_ -#undef GTEST_ADD_REF_ -#undef GTEST_TUPLE_ELEMENT_ - -#endif // GTEST_INCLUDE_GTEST_INTERNAL_GTEST_TUPLE_H_ -# elif GTEST_ENV_HAS_STD_TUPLE_ -# include -// C++11 puts its tuple into the ::std namespace rather than -// ::std::tr1. gtest expects tuple to live in ::std::tr1, so put it there. -// This causes undefined behavior, but supported compilers react in -// the way we intend. -namespace std { -namespace tr1 { -using ::std::get; -using ::std::make_tuple; -using ::std::tuple; -using ::std::tuple_element; -using ::std::tuple_size; -} -} - -# elif GTEST_OS_SYMBIAN - -// On Symbian, BOOST_HAS_TR1_TUPLE causes Boost's TR1 tuple library to -// use STLport's tuple implementation, which unfortunately doesn't -// work as the copy of STLport distributed with Symbian is incomplete. -// By making sure BOOST_HAS_TR1_TUPLE is undefined, we force Boost to -// use its own tuple implementation. -# ifdef BOOST_HAS_TR1_TUPLE -# undef BOOST_HAS_TR1_TUPLE -# endif // BOOST_HAS_TR1_TUPLE - -// This prevents , which defines -// BOOST_HAS_TR1_TUPLE, from being #included by Boost's . -# define BOOST_TR1_DETAIL_CONFIG_HPP_INCLUDED -# include - -# elif defined(__GNUC__) && (GTEST_GCC_VER_ >= 40000) -// GCC 4.0+ implements tr1/tuple in the header. This does -// not conform to the TR1 spec, which requires the header to be . - -# if !GTEST_HAS_RTTI && GTEST_GCC_VER_ < 40302 -// Until version 4.3.2, gcc has a bug that causes , -// which is #included by , to not compile when RTTI is -// disabled. _TR1_FUNCTIONAL is the header guard for -// . Hence the following #define is a hack to prevent -// from being included. -# define _TR1_FUNCTIONAL 1 -# include -# undef _TR1_FUNCTIONAL // Allows the user to #include - // if he chooses to. -# else -# include // NOLINT -# endif // !GTEST_HAS_RTTI && GTEST_GCC_VER_ < 40302 - -# else -// If the compiler is not GCC 4.0+, we assume the user is using a -// spec-conforming TR1 implementation. -# include // NOLINT -# endif // GTEST_USE_OWN_TR1_TUPLE - -#endif // GTEST_HAS_TR1_TUPLE - -// Determines whether clone(2) is supported. -// Usually it will only be available on Linux, excluding -// Linux on the Itanium architecture. -// Also see http://linux.die.net/man/2/clone. -#ifndef GTEST_HAS_CLONE -// The user didn't tell us, so we need to figure it out. - -# if GTEST_OS_LINUX && !defined(__ia64__) -# if GTEST_OS_LINUX_ANDROID -// On Android, clone() is only available on ARM starting with Gingerbread. -# if defined(__arm__) && __ANDROID_API__ >= 9 -# define GTEST_HAS_CLONE 1 -# else -# define GTEST_HAS_CLONE 0 -# endif -# else -# define GTEST_HAS_CLONE 1 -# endif -# else -# define GTEST_HAS_CLONE 0 -# endif // GTEST_OS_LINUX && !defined(__ia64__) - -#endif // GTEST_HAS_CLONE - -// Determines whether to support stream redirection. This is used to test -// output correctness and to implement death tests. -#ifndef GTEST_HAS_STREAM_REDIRECTION -// By default, we assume that stream redirection is supported on all -// platforms except known mobile ones. -# if GTEST_OS_WINDOWS_MOBILE || GTEST_OS_SYMBIAN -# define GTEST_HAS_STREAM_REDIRECTION 0 -# else -# define GTEST_HAS_STREAM_REDIRECTION 1 -# endif // !GTEST_OS_WINDOWS_MOBILE && !GTEST_OS_SYMBIAN -#endif // GTEST_HAS_STREAM_REDIRECTION - -// Determines whether to support death tests. -// Google Test does not support death tests for VC 7.1 and earlier as -// abort() in a VC 7.1 application compiled as GUI in debug config -// pops up a dialog window that cannot be suppressed programmatically. -#if (GTEST_OS_LINUX || GTEST_OS_CYGWIN || GTEST_OS_SOLARIS || \ - (GTEST_OS_MAC && !GTEST_OS_IOS) || GTEST_OS_IOS_SIMULATOR || \ - (GTEST_OS_WINDOWS_DESKTOP && _MSC_VER >= 1400) || \ - GTEST_OS_WINDOWS_MINGW || GTEST_OS_AIX || GTEST_OS_HPUX || \ - GTEST_OS_OPENBSD || GTEST_OS_QNX) -# define GTEST_HAS_DEATH_TEST 1 -# include // NOLINT -#endif - -// We don't support MSVC 7.1 with exceptions disabled now. Therefore -// all the compilers we care about are adequate for supporting -// value-parameterized tests. -#define GTEST_HAS_PARAM_TEST 1 - -// Determines whether to support type-driven tests. - -// Typed tests need and variadic macros, which GCC, VC++ 8.0, -// Sun Pro CC, IBM Visual Age, and HP aCC support. -#if defined(__GNUC__) || (_MSC_VER >= 1400) || defined(__SUNPRO_CC) || \ - defined(__IBMCPP__) || defined(__HP_aCC) -# define GTEST_HAS_TYPED_TEST 1 -# define GTEST_HAS_TYPED_TEST_P 1 -#endif - -// Determines whether to support Combine(). This only makes sense when -// value-parameterized tests are enabled. The implementation doesn't -// work on Sun Studio since it doesn't understand templated conversion -// operators. -#if GTEST_HAS_PARAM_TEST && GTEST_HAS_TR1_TUPLE && !defined(__SUNPRO_CC) -# define GTEST_HAS_COMBINE 1 -#endif - -// Determines whether the system compiler uses UTF-16 for encoding wide strings. -#define GTEST_WIDE_STRING_USES_UTF16_ \ - (GTEST_OS_WINDOWS || GTEST_OS_CYGWIN || GTEST_OS_SYMBIAN || GTEST_OS_AIX) - -// Determines whether test results can be streamed to a socket. -#if GTEST_OS_LINUX -# define GTEST_CAN_STREAM_RESULTS_ 1 -#endif - -// Defines some utility macros. - -// The GNU compiler emits a warning if nested "if" statements are followed by -// an "else" statement and braces are not used to explicitly disambiguate the -// "else" binding. This leads to problems with code like: -// -// if (gate) -// ASSERT_*(condition) << "Some message"; -// -// The "switch (0) case 0:" idiom is used to suppress this. -#ifdef __INTEL_COMPILER -# define GTEST_AMBIGUOUS_ELSE_BLOCKER_ -#else -# define GTEST_AMBIGUOUS_ELSE_BLOCKER_ switch (0) case 0: default: // NOLINT -#endif - -// Use this annotation at the end of a struct/class definition to -// prevent the compiler from optimizing away instances that are never -// used. This is useful when all interesting logic happens inside the -// c'tor and / or d'tor. Example: -// -// struct Foo { -// Foo() { ... } -// } GTEST_ATTRIBUTE_UNUSED_; -// -// Also use it after a variable or parameter declaration to tell the -// compiler the variable/parameter does not have to be used. -#if defined(__GNUC__) && !defined(COMPILER_ICC) -# define GTEST_ATTRIBUTE_UNUSED_ __attribute__ ((unused)) -#else -# define GTEST_ATTRIBUTE_UNUSED_ -#endif - -// A macro to disallow operator= -// This should be used in the private: declarations for a class. -#define GTEST_DISALLOW_ASSIGN_(type)\ - void operator=(type const &) - -// A macro to disallow copy constructor and operator= -// This should be used in the private: declarations for a class. -#define GTEST_DISALLOW_COPY_AND_ASSIGN_(type)\ - type(type const &);\ - GTEST_DISALLOW_ASSIGN_(type) - -// Tell the compiler to warn about unused return values for functions declared -// with this macro. The macro should be used on function declarations -// following the argument list: -// -// Sprocket* AllocateSprocket() GTEST_MUST_USE_RESULT_; -#if defined(__GNUC__) && (GTEST_GCC_VER_ >= 30400) && !defined(COMPILER_ICC) -# define GTEST_MUST_USE_RESULT_ __attribute__ ((warn_unused_result)) -#else -# define GTEST_MUST_USE_RESULT_ -#endif // __GNUC__ && (GTEST_GCC_VER_ >= 30400) && !COMPILER_ICC - -// Determine whether the compiler supports Microsoft's Structured Exception -// Handling. This is supported by several Windows compilers but generally -// does not exist on any other system. -#ifndef GTEST_HAS_SEH -// The user didn't tell us, so we need to figure it out. - -# if defined(_MSC_VER) || defined(__BORLANDC__) -// These two compilers are known to support SEH. -# define GTEST_HAS_SEH 1 -# else -// Assume no SEH. -# define GTEST_HAS_SEH 0 -# endif - -#endif // GTEST_HAS_SEH - -#ifdef _MSC_VER - -# if GTEST_LINKED_AS_SHARED_LIBRARY -# define GTEST_API_ __declspec(dllimport) -# elif GTEST_CREATE_SHARED_LIBRARY -# define GTEST_API_ __declspec(dllexport) -# endif - -#endif // _MSC_VER - -#ifndef GTEST_API_ -# define GTEST_API_ -#endif - -#ifdef __GNUC__ -// Ask the compiler to never inline a given function. -# define GTEST_NO_INLINE_ __attribute__((noinline)) -#else -# define GTEST_NO_INLINE_ -#endif - -// _LIBCPP_VERSION is defined by the libc++ library from the LLVM project. -#if defined(__GLIBCXX__) || defined(_LIBCPP_VERSION) -# define GTEST_HAS_CXXABI_H_ 1 -#else -# define GTEST_HAS_CXXABI_H_ 0 -#endif - -namespace testing { - -class Message; - -namespace internal { - -// A secret type that Google Test users don't know about. It has no -// definition on purpose. Therefore it's impossible to create a -// Secret object, which is what we want. -class Secret; - -// The GTEST_COMPILE_ASSERT_ macro can be used to verify that a compile time -// expression is true. For example, you could use it to verify the -// size of a static array: -// -// GTEST_COMPILE_ASSERT_(ARRAYSIZE(content_type_names) == CONTENT_NUM_TYPES, -// content_type_names_incorrect_size); -// -// or to make sure a struct is smaller than a certain size: -// -// GTEST_COMPILE_ASSERT_(sizeof(foo) < 128, foo_too_large); -// -// The second argument to the macro is the name of the variable. If -// the expression is false, most compilers will issue a warning/error -// containing the name of the variable. - -template -struct CompileAssert { -}; - -#define GTEST_COMPILE_ASSERT_(expr, msg) \ - typedef ::testing::internal::CompileAssert<(static_cast(expr))> \ - msg[static_cast(expr) ? 1 : -1] GTEST_ATTRIBUTE_UNUSED_ - -// Implementation details of GTEST_COMPILE_ASSERT_: -// -// - GTEST_COMPILE_ASSERT_ works by defining an array type that has -1 -// elements (and thus is invalid) when the expression is false. -// -// - The simpler definition -// -// #define GTEST_COMPILE_ASSERT_(expr, msg) typedef char msg[(expr) ? 1 : -1] -// -// does not work, as gcc supports variable-length arrays whose sizes -// are determined at run-time (this is gcc's extension and not part -// of the C++ standard). As a result, gcc fails to reject the -// following code with the simple definition: -// -// int foo; -// GTEST_COMPILE_ASSERT_(foo, msg); // not supposed to compile as foo is -// // not a compile-time constant. -// -// - By using the type CompileAssert<(bool(expr))>, we ensures that -// expr is a compile-time constant. (Template arguments must be -// determined at compile-time.) -// -// - The outter parentheses in CompileAssert<(bool(expr))> are necessary -// to work around a bug in gcc 3.4.4 and 4.0.1. If we had written -// -// CompileAssert -// -// instead, these compilers will refuse to compile -// -// GTEST_COMPILE_ASSERT_(5 > 0, some_message); -// -// (They seem to think the ">" in "5 > 0" marks the end of the -// template argument list.) -// -// - The array size is (bool(expr) ? 1 : -1), instead of simply -// -// ((expr) ? 1 : -1). -// -// This is to avoid running into a bug in MS VC 7.1, which -// causes ((0.0) ? 1 : -1) to incorrectly evaluate to 1. - -// StaticAssertTypeEqHelper is used by StaticAssertTypeEq defined in gtest.h. -// -// This template is declared, but intentionally undefined. -template -struct StaticAssertTypeEqHelper; - -template -struct StaticAssertTypeEqHelper {}; - -#if GTEST_HAS_GLOBAL_STRING -typedef ::string string; -#else -typedef ::std::string string; -#endif // GTEST_HAS_GLOBAL_STRING - -#if GTEST_HAS_GLOBAL_WSTRING -typedef ::wstring wstring; -#elif GTEST_HAS_STD_WSTRING -typedef ::std::wstring wstring; -#endif // GTEST_HAS_GLOBAL_WSTRING - -// A helper for suppressing warnings on constant condition. It just -// returns 'condition'. -GTEST_API_ bool IsTrue(bool condition); - -// Defines scoped_ptr. - -// This implementation of scoped_ptr is PARTIAL - it only contains -// enough stuff to satisfy Google Test's need. -template -class scoped_ptr { - public: - typedef T element_type; - - explicit scoped_ptr(T* p = NULL) : ptr_(p) {} - ~scoped_ptr() { reset(); } - - T& operator*() const { return *ptr_; } - T* operator->() const { return ptr_; } - T* get() const { return ptr_; } - - T* release() { - T* const ptr = ptr_; - ptr_ = NULL; - return ptr; - } - - void reset(T* p = NULL) { - if (p != ptr_) { - if (IsTrue(sizeof(T) > 0)) { // Makes sure T is a complete type. - delete ptr_; - } - ptr_ = p; - } - } - - private: - T* ptr_; - - GTEST_DISALLOW_COPY_AND_ASSIGN_(scoped_ptr); -}; - -// Defines RE. - -// A simple C++ wrapper for . It uses the POSIX Extended -// Regular Expression syntax. -class GTEST_API_ RE { - public: - // A copy constructor is required by the Standard to initialize object - // references from r-values. - RE(const RE& other) { Init(other.pattern()); } - - // Constructs an RE from a string. - RE(const ::std::string& regex) { Init(regex.c_str()); } // NOLINT - -#if GTEST_HAS_GLOBAL_STRING - - RE(const ::string& regex) { Init(regex.c_str()); } // NOLINT - -#endif // GTEST_HAS_GLOBAL_STRING - - RE(const char* regex) { Init(regex); } // NOLINT - ~RE(); - - // Returns the string representation of the regex. - const char* pattern() const { return pattern_; } - - // FullMatch(str, re) returns true iff regular expression re matches - // the entire str. - // PartialMatch(str, re) returns true iff regular expression re - // matches a substring of str (including str itself). - // - // TODO(wan@google.com): make FullMatch() and PartialMatch() work - // when str contains NUL characters. - static bool FullMatch(const ::std::string& str, const RE& re) { - return FullMatch(str.c_str(), re); - } - static bool PartialMatch(const ::std::string& str, const RE& re) { - return PartialMatch(str.c_str(), re); - } - -#if GTEST_HAS_GLOBAL_STRING - - static bool FullMatch(const ::string& str, const RE& re) { - return FullMatch(str.c_str(), re); - } - static bool PartialMatch(const ::string& str, const RE& re) { - return PartialMatch(str.c_str(), re); - } - -#endif // GTEST_HAS_GLOBAL_STRING - - static bool FullMatch(const char* str, const RE& re); - static bool PartialMatch(const char* str, const RE& re); - - private: - void Init(const char* regex); - - // We use a const char* instead of an std::string, as Google Test used to be - // used where std::string is not available. TODO(wan@google.com): change to - // std::string. - const char* pattern_; - bool is_valid_; - -#if GTEST_USES_POSIX_RE - - regex_t full_regex_; // For FullMatch(). - regex_t partial_regex_; // For PartialMatch(). - -#else // GTEST_USES_SIMPLE_RE - - const char* full_pattern_; // For FullMatch(); - -#endif - - GTEST_DISALLOW_ASSIGN_(RE); -}; - -// Formats a source file path and a line number as they would appear -// in an error message from the compiler used to compile this code. -GTEST_API_ ::std::string FormatFileLocation(const char* file, int line); - -// Formats a file location for compiler-independent XML output. -// Although this function is not platform dependent, we put it next to -// FormatFileLocation in order to contrast the two functions. -GTEST_API_ ::std::string FormatCompilerIndependentFileLocation(const char* file, - int line); - -// Defines logging utilities: -// GTEST_LOG_(severity) - logs messages at the specified severity level. The -// message itself is streamed into the macro. -// LogToStderr() - directs all log messages to stderr. -// FlushInfoLog() - flushes informational log messages. - -enum GTestLogSeverity { - GTEST_INFO, - GTEST_WARNING, - GTEST_ERROR, - GTEST_FATAL -}; - -// Formats log entry severity, provides a stream object for streaming the -// log message, and terminates the message with a newline when going out of -// scope. -class GTEST_API_ GTestLog { - public: - GTestLog(GTestLogSeverity severity, const char* file, int line); - - // Flushes the buffers and, if severity is GTEST_FATAL, aborts the program. - ~GTestLog(); - - ::std::ostream& GetStream() { return ::std::cerr; } - - private: - const GTestLogSeverity severity_; - - GTEST_DISALLOW_COPY_AND_ASSIGN_(GTestLog); -}; - -#define GTEST_LOG_(severity) \ - ::testing::internal::GTestLog(::testing::internal::GTEST_##severity, \ - __FILE__, __LINE__).GetStream() - -inline void LogToStderr() {} -inline void FlushInfoLog() { fflush(NULL); } - -// INTERNAL IMPLEMENTATION - DO NOT USE. -// -// GTEST_CHECK_ is an all-mode assert. It aborts the program if the condition -// is not satisfied. -// Synopsys: -// GTEST_CHECK_(boolean_condition); -// or -// GTEST_CHECK_(boolean_condition) << "Additional message"; -// -// This checks the condition and if the condition is not satisfied -// it prints message about the condition violation, including the -// condition itself, plus additional message streamed into it, if any, -// and then it aborts the program. It aborts the program irrespective of -// whether it is built in the debug mode or not. -#define GTEST_CHECK_(condition) \ - GTEST_AMBIGUOUS_ELSE_BLOCKER_ \ - if (::testing::internal::IsTrue(condition)) \ - ; \ - else \ - GTEST_LOG_(FATAL) << "Condition " #condition " failed. " - -// An all-mode assert to verify that the given POSIX-style function -// call returns 0 (indicating success). Known limitation: this -// doesn't expand to a balanced 'if' statement, so enclose the macro -// in {} if you need to use it as the only statement in an 'if' -// branch. -#define GTEST_CHECK_POSIX_SUCCESS_(posix_call) \ - if (const int gtest_error = (posix_call)) \ - GTEST_LOG_(FATAL) << #posix_call << "failed with error " \ - << gtest_error - -// INTERNAL IMPLEMENTATION - DO NOT USE IN USER CODE. -// -// Use ImplicitCast_ as a safe version of static_cast for upcasting in -// the type hierarchy (e.g. casting a Foo* to a SuperclassOfFoo* or a -// const Foo*). When you use ImplicitCast_, the compiler checks that -// the cast is safe. Such explicit ImplicitCast_s are necessary in -// surprisingly many situations where C++ demands an exact type match -// instead of an argument type convertable to a target type. -// -// The syntax for using ImplicitCast_ is the same as for static_cast: -// -// ImplicitCast_(expr) -// -// ImplicitCast_ would have been part of the C++ standard library, -// but the proposal was submitted too late. It will probably make -// its way into the language in the future. -// -// This relatively ugly name is intentional. It prevents clashes with -// similar functions users may have (e.g., implicit_cast). The internal -// namespace alone is not enough because the function can be found by ADL. -template -inline To ImplicitCast_(To x) { return x; } - -// When you upcast (that is, cast a pointer from type Foo to type -// SuperclassOfFoo), it's fine to use ImplicitCast_<>, since upcasts -// always succeed. When you downcast (that is, cast a pointer from -// type Foo to type SubclassOfFoo), static_cast<> isn't safe, because -// how do you know the pointer is really of type SubclassOfFoo? It -// could be a bare Foo, or of type DifferentSubclassOfFoo. Thus, -// when you downcast, you should use this macro. In debug mode, we -// use dynamic_cast<> to double-check the downcast is legal (we die -// if it's not). In normal mode, we do the efficient static_cast<> -// instead. Thus, it's important to test in debug mode to make sure -// the cast is legal! -// This is the only place in the code we should use dynamic_cast<>. -// In particular, you SHOULDN'T be using dynamic_cast<> in order to -// do RTTI (eg code like this: -// if (dynamic_cast(foo)) HandleASubclass1Object(foo); -// if (dynamic_cast(foo)) HandleASubclass2Object(foo); -// You should design the code some other way not to need this. -// -// This relatively ugly name is intentional. It prevents clashes with -// similar functions users may have (e.g., down_cast). The internal -// namespace alone is not enough because the function can be found by ADL. -template // use like this: DownCast_(foo); -inline To DownCast_(From* f) { // so we only accept pointers - // Ensures that To is a sub-type of From *. This test is here only - // for compile-time type checking, and has no overhead in an - // optimized build at run-time, as it will be optimized away - // completely. - if (false) { - const To to = NULL; - ::testing::internal::ImplicitCast_(to); - } - -#if GTEST_HAS_RTTI - // RTTI: debug mode only! - GTEST_CHECK_(f == NULL || dynamic_cast(f) != NULL); -#endif - return static_cast(f); -} - -// Downcasts the pointer of type Base to Derived. -// Derived must be a subclass of Base. The parameter MUST -// point to a class of type Derived, not any subclass of it. -// When RTTI is available, the function performs a runtime -// check to enforce this. -template -Derived* CheckedDowncastToActualType(Base* base) { -#if GTEST_HAS_RTTI - GTEST_CHECK_(typeid(*base) == typeid(Derived)); - return dynamic_cast(base); // NOLINT -#else - return static_cast(base); // Poor man's downcast. -#endif -} - -#if GTEST_HAS_STREAM_REDIRECTION - -// Defines the stderr capturer: -// CaptureStdout - starts capturing stdout. -// GetCapturedStdout - stops capturing stdout and returns the captured string. -// CaptureStderr - starts capturing stderr. -// GetCapturedStderr - stops capturing stderr and returns the captured string. -// -GTEST_API_ void CaptureStdout(); -GTEST_API_ std::string GetCapturedStdout(); -GTEST_API_ void CaptureStderr(); -GTEST_API_ std::string GetCapturedStderr(); - -#endif // GTEST_HAS_STREAM_REDIRECTION - - -#if GTEST_HAS_DEATH_TEST - -const ::std::vector& GetInjectableArgvs(); -void SetInjectableArgvs(const ::std::vector* - new_argvs); - -// A copy of all command line arguments. Set by InitGoogleTest(). -extern ::std::vector g_argvs; - -#endif // GTEST_HAS_DEATH_TEST - -// Defines synchronization primitives. - -#if GTEST_HAS_PTHREAD - -// Sleeps for (roughly) n milli-seconds. This function is only for -// testing Google Test's own constructs. Don't use it in user tests, -// either directly or indirectly. -inline void SleepMilliseconds(int n) { - const timespec time = { - 0, // 0 seconds. - n * 1000L * 1000L, // And n ms. - }; - nanosleep(&time, NULL); -} - -// Allows a controller thread to pause execution of newly created -// threads until notified. Instances of this class must be created -// and destroyed in the controller thread. -// -// This class is only for testing Google Test's own constructs. Do not -// use it in user tests, either directly or indirectly. -class Notification { - public: - Notification() : notified_(false) { - GTEST_CHECK_POSIX_SUCCESS_(pthread_mutex_init(&mutex_, NULL)); - } - ~Notification() { - pthread_mutex_destroy(&mutex_); - } - - // Notifies all threads created with this notification to start. Must - // be called from the controller thread. - void Notify() { - pthread_mutex_lock(&mutex_); - notified_ = true; - pthread_mutex_unlock(&mutex_); - } - - // Blocks until the controller thread notifies. Must be called from a test - // thread. - void WaitForNotification() { - for (;;) { - pthread_mutex_lock(&mutex_); - const bool notified = notified_; - pthread_mutex_unlock(&mutex_); - if (notified) - break; - SleepMilliseconds(10); - } - } - - private: - pthread_mutex_t mutex_; - bool notified_; - - GTEST_DISALLOW_COPY_AND_ASSIGN_(Notification); -}; - -// As a C-function, ThreadFuncWithCLinkage cannot be templated itself. -// Consequently, it cannot select a correct instantiation of ThreadWithParam -// in order to call its Run(). Introducing ThreadWithParamBase as a -// non-templated base class for ThreadWithParam allows us to bypass this -// problem. -class ThreadWithParamBase { - public: - virtual ~ThreadWithParamBase() {} - virtual void Run() = 0; -}; - -// pthread_create() accepts a pointer to a function type with the C linkage. -// According to the Standard (7.5/1), function types with different linkages -// are different even if they are otherwise identical. Some compilers (for -// example, SunStudio) treat them as different types. Since class methods -// cannot be defined with C-linkage we need to define a free C-function to -// pass into pthread_create(). -extern "C" inline void* ThreadFuncWithCLinkage(void* thread) { - static_cast(thread)->Run(); - return NULL; -} - -// Helper class for testing Google Test's multi-threading constructs. -// To use it, write: -// -// void ThreadFunc(int param) { /* Do things with param */ } -// Notification thread_can_start; -// ... -// // The thread_can_start parameter is optional; you can supply NULL. -// ThreadWithParam thread(&ThreadFunc, 5, &thread_can_start); -// thread_can_start.Notify(); -// -// These classes are only for testing Google Test's own constructs. Do -// not use them in user tests, either directly or indirectly. -template -class ThreadWithParam : public ThreadWithParamBase { - public: - typedef void (*UserThreadFunc)(T); - - ThreadWithParam( - UserThreadFunc func, T param, Notification* thread_can_start) - : func_(func), - param_(param), - thread_can_start_(thread_can_start), - finished_(false) { - ThreadWithParamBase* const base = this; - // The thread can be created only after all fields except thread_ - // have been initialized. - GTEST_CHECK_POSIX_SUCCESS_( - pthread_create(&thread_, 0, &ThreadFuncWithCLinkage, base)); - } - ~ThreadWithParam() { Join(); } - - void Join() { - if (!finished_) { - GTEST_CHECK_POSIX_SUCCESS_(pthread_join(thread_, 0)); - finished_ = true; - } - } - - virtual void Run() { - if (thread_can_start_ != NULL) - thread_can_start_->WaitForNotification(); - func_(param_); - } - - private: - const UserThreadFunc func_; // User-supplied thread function. - const T param_; // User-supplied parameter to the thread function. - // When non-NULL, used to block execution until the controller thread - // notifies. - Notification* const thread_can_start_; - bool finished_; // true iff we know that the thread function has finished. - pthread_t thread_; // The native thread object. - - GTEST_DISALLOW_COPY_AND_ASSIGN_(ThreadWithParam); -}; - -// MutexBase and Mutex implement mutex on pthreads-based platforms. They -// are used in conjunction with class MutexLock: -// -// Mutex mutex; -// ... -// MutexLock lock(&mutex); // Acquires the mutex and releases it at the end -// // of the current scope. -// -// MutexBase implements behavior for both statically and dynamically -// allocated mutexes. Do not use MutexBase directly. Instead, write -// the following to define a static mutex: -// -// GTEST_DEFINE_STATIC_MUTEX_(g_some_mutex); -// -// You can forward declare a static mutex like this: -// -// GTEST_DECLARE_STATIC_MUTEX_(g_some_mutex); -// -// To create a dynamic mutex, just define an object of type Mutex. -class MutexBase { - public: - // Acquires this mutex. - void Lock() { - GTEST_CHECK_POSIX_SUCCESS_(pthread_mutex_lock(&mutex_)); - owner_ = pthread_self(); - has_owner_ = true; - } - - // Releases this mutex. - void Unlock() { - // Since the lock is being released the owner_ field should no longer be - // considered valid. We don't protect writing to has_owner_ here, as it's - // the caller's responsibility to ensure that the current thread holds the - // mutex when this is called. - has_owner_ = false; - GTEST_CHECK_POSIX_SUCCESS_(pthread_mutex_unlock(&mutex_)); - } - - // Does nothing if the current thread holds the mutex. Otherwise, crashes - // with high probability. - void AssertHeld() const { - GTEST_CHECK_(has_owner_ && pthread_equal(owner_, pthread_self())) - << "The current thread is not holding the mutex @" << this; - } - - // A static mutex may be used before main() is entered. It may even - // be used before the dynamic initialization stage. Therefore we - // must be able to initialize a static mutex object at link time. - // This means MutexBase has to be a POD and its member variables - // have to be public. - public: - pthread_mutex_t mutex_; // The underlying pthread mutex. - // has_owner_ indicates whether the owner_ field below contains a valid thread - // ID and is therefore safe to inspect (e.g., to use in pthread_equal()). All - // accesses to the owner_ field should be protected by a check of this field. - // An alternative might be to memset() owner_ to all zeros, but there's no - // guarantee that a zero'd pthread_t is necessarily invalid or even different - // from pthread_self(). - bool has_owner_; - pthread_t owner_; // The thread holding the mutex. -}; - -// Forward-declares a static mutex. -# define GTEST_DECLARE_STATIC_MUTEX_(mutex) \ - extern ::testing::internal::MutexBase mutex - -// Defines and statically (i.e. at link time) initializes a static mutex. -// The initialization list here does not explicitly initialize each field, -// instead relying on default initialization for the unspecified fields. In -// particular, the owner_ field (a pthread_t) is not explicitly initialized. -// This allows initialization to work whether pthread_t is a scalar or struct. -// The flag -Wmissing-field-initializers must not be specified for this to work. -# define GTEST_DEFINE_STATIC_MUTEX_(mutex) \ - ::testing::internal::MutexBase mutex = { PTHREAD_MUTEX_INITIALIZER, false } - -// The Mutex class can only be used for mutexes created at runtime. It -// shares its API with MutexBase otherwise. -class Mutex : public MutexBase { - public: - Mutex() { - GTEST_CHECK_POSIX_SUCCESS_(pthread_mutex_init(&mutex_, NULL)); - has_owner_ = false; - } - ~Mutex() { - GTEST_CHECK_POSIX_SUCCESS_(pthread_mutex_destroy(&mutex_)); - } - - private: - GTEST_DISALLOW_COPY_AND_ASSIGN_(Mutex); -}; - -// We cannot name this class MutexLock as the ctor declaration would -// conflict with a macro named MutexLock, which is defined on some -// platforms. Hence the typedef trick below. -class GTestMutexLock { - public: - explicit GTestMutexLock(MutexBase* mutex) - : mutex_(mutex) { mutex_->Lock(); } - - ~GTestMutexLock() { mutex_->Unlock(); } - - private: - MutexBase* const mutex_; - - GTEST_DISALLOW_COPY_AND_ASSIGN_(GTestMutexLock); -}; - -typedef GTestMutexLock MutexLock; - -// Helpers for ThreadLocal. - -// pthread_key_create() requires DeleteThreadLocalValue() to have -// C-linkage. Therefore it cannot be templatized to access -// ThreadLocal. Hence the need for class -// ThreadLocalValueHolderBase. -class ThreadLocalValueHolderBase { - public: - virtual ~ThreadLocalValueHolderBase() {} -}; - -// Called by pthread to delete thread-local data stored by -// pthread_setspecific(). -extern "C" inline void DeleteThreadLocalValue(void* value_holder) { - delete static_cast(value_holder); -} - -// Implements thread-local storage on pthreads-based systems. -// -// // Thread 1 -// ThreadLocal tl(100); // 100 is the default value for each thread. -// -// // Thread 2 -// tl.set(150); // Changes the value for thread 2 only. -// EXPECT_EQ(150, tl.get()); -// -// // Thread 1 -// EXPECT_EQ(100, tl.get()); // In thread 1, tl has the original value. -// tl.set(200); -// EXPECT_EQ(200, tl.get()); -// -// The template type argument T must have a public copy constructor. -// In addition, the default ThreadLocal constructor requires T to have -// a public default constructor. -// -// An object managed for a thread by a ThreadLocal instance is deleted -// when the thread exits. Or, if the ThreadLocal instance dies in -// that thread, when the ThreadLocal dies. It's the user's -// responsibility to ensure that all other threads using a ThreadLocal -// have exited when it dies, or the per-thread objects for those -// threads will not be deleted. -// -// Google Test only uses global ThreadLocal objects. That means they -// will die after main() has returned. Therefore, no per-thread -// object managed by Google Test will be leaked as long as all threads -// using Google Test have exited when main() returns. -template -class ThreadLocal { - public: - ThreadLocal() : key_(CreateKey()), - default_() {} - explicit ThreadLocal(const T& value) : key_(CreateKey()), - default_(value) {} - - ~ThreadLocal() { - // Destroys the managed object for the current thread, if any. - DeleteThreadLocalValue(pthread_getspecific(key_)); - - // Releases resources associated with the key. This will *not* - // delete managed objects for other threads. - GTEST_CHECK_POSIX_SUCCESS_(pthread_key_delete(key_)); - } - - T* pointer() { return GetOrCreateValue(); } - const T* pointer() const { return GetOrCreateValue(); } - const T& get() const { return *pointer(); } - void set(const T& value) { *pointer() = value; } - - private: - // Holds a value of type T. - class ValueHolder : public ThreadLocalValueHolderBase { - public: - explicit ValueHolder(const T& value) : value_(value) {} - - T* pointer() { return &value_; } - - private: - T value_; - GTEST_DISALLOW_COPY_AND_ASSIGN_(ValueHolder); - }; - - static pthread_key_t CreateKey() { - pthread_key_t key; - // When a thread exits, DeleteThreadLocalValue() will be called on - // the object managed for that thread. - GTEST_CHECK_POSIX_SUCCESS_( - pthread_key_create(&key, &DeleteThreadLocalValue)); - return key; - } - - T* GetOrCreateValue() const { - ThreadLocalValueHolderBase* const holder = - static_cast(pthread_getspecific(key_)); - if (holder != NULL) { - return CheckedDowncastToActualType(holder)->pointer(); - } - - ValueHolder* const new_holder = new ValueHolder(default_); - ThreadLocalValueHolderBase* const holder_base = new_holder; - GTEST_CHECK_POSIX_SUCCESS_(pthread_setspecific(key_, holder_base)); - return new_holder->pointer(); - } - - // A key pthreads uses for looking up per-thread values. - const pthread_key_t key_; - const T default_; // The default value for each thread. - - GTEST_DISALLOW_COPY_AND_ASSIGN_(ThreadLocal); -}; - -# define GTEST_IS_THREADSAFE 1 - -#else // GTEST_HAS_PTHREAD - -// A dummy implementation of synchronization primitives (mutex, lock, -// and thread-local variable). Necessary for compiling Google Test where -// mutex is not supported - using Google Test in multiple threads is not -// supported on such platforms. - -class Mutex { - public: - Mutex() {} - void Lock() {} - void Unlock() {} - void AssertHeld() const {} -}; - -# define GTEST_DECLARE_STATIC_MUTEX_(mutex) \ - extern ::testing::internal::Mutex mutex - -# define GTEST_DEFINE_STATIC_MUTEX_(mutex) ::testing::internal::Mutex mutex - -class GTestMutexLock { - public: - explicit GTestMutexLock(Mutex*) {} // NOLINT -}; - -typedef GTestMutexLock MutexLock; - -template -class ThreadLocal { - public: - ThreadLocal() : value_() {} - explicit ThreadLocal(const T& value) : value_(value) {} - T* pointer() { return &value_; } - const T* pointer() const { return &value_; } - const T& get() const { return value_; } - void set(const T& value) { value_ = value; } - private: - T value_; -}; - -// The above synchronization primitives have dummy implementations. -// Therefore Google Test is not thread-safe. -# define GTEST_IS_THREADSAFE 0 - -#endif // GTEST_HAS_PTHREAD - -// Returns the number of threads running in the process, or 0 to indicate that -// we cannot detect it. -GTEST_API_ size_t GetThreadCount(); - -// Passing non-POD classes through ellipsis (...) crashes the ARM -// compiler and generates a warning in Sun Studio. The Nokia Symbian -// and the IBM XL C/C++ compiler try to instantiate a copy constructor -// for objects passed through ellipsis (...), failing for uncopyable -// objects. We define this to ensure that only POD is passed through -// ellipsis on these systems. -#if defined(__SYMBIAN32__) || defined(__IBMCPP__) || defined(__SUNPRO_CC) -// We lose support for NULL detection where the compiler doesn't like -// passing non-POD classes through ellipsis (...). -# define GTEST_ELLIPSIS_NEEDS_POD_ 1 -#else -# define GTEST_CAN_COMPARE_NULL 1 -#endif - -// The Nokia Symbian and IBM XL C/C++ compilers cannot decide between -// const T& and const T* in a function template. These compilers -// _can_ decide between class template specializations for T and T*, -// so a tr1::type_traits-like is_pointer works. -#if defined(__SYMBIAN32__) || defined(__IBMCPP__) -# define GTEST_NEEDS_IS_POINTER_ 1 -#endif - -template -struct bool_constant { - typedef bool_constant type; - static const bool value = bool_value; -}; -template const bool bool_constant::value; - -typedef bool_constant false_type; -typedef bool_constant true_type; - -template -struct is_pointer : public false_type {}; - -template -struct is_pointer : public true_type {}; - -template -struct IteratorTraits { - typedef typename Iterator::value_type value_type; -}; - -template -struct IteratorTraits { - typedef T value_type; -}; - -template -struct IteratorTraits { - typedef T value_type; -}; - -#if GTEST_OS_WINDOWS -# define GTEST_PATH_SEP_ "\\" -# define GTEST_HAS_ALT_PATH_SEP_ 1 -// The biggest signed integer type the compiler supports. -typedef __int64 BiggestInt; -#else -# define GTEST_PATH_SEP_ "/" -# define GTEST_HAS_ALT_PATH_SEP_ 0 -typedef long long BiggestInt; // NOLINT -#endif // GTEST_OS_WINDOWS - -// Utilities for char. - -// isspace(int ch) and friends accept an unsigned char or EOF. char -// may be signed, depending on the compiler (or compiler flags). -// Therefore we need to cast a char to unsigned char before calling -// isspace(), etc. - -inline bool IsAlpha(char ch) { - return isalpha(static_cast(ch)) != 0; -} -inline bool IsAlNum(char ch) { - return isalnum(static_cast(ch)) != 0; -} -inline bool IsDigit(char ch) { - return isdigit(static_cast(ch)) != 0; -} -inline bool IsLower(char ch) { - return islower(static_cast(ch)) != 0; -} -inline bool IsSpace(char ch) { - return isspace(static_cast(ch)) != 0; -} -inline bool IsUpper(char ch) { - return isupper(static_cast(ch)) != 0; -} -inline bool IsXDigit(char ch) { - return isxdigit(static_cast(ch)) != 0; -} -inline bool IsXDigit(wchar_t ch) { - const unsigned char low_byte = static_cast(ch); - return ch == low_byte && isxdigit(low_byte) != 0; -} - -inline char ToLower(char ch) { - return static_cast(tolower(static_cast(ch))); -} -inline char ToUpper(char ch) { - return static_cast(toupper(static_cast(ch))); -} - -// The testing::internal::posix namespace holds wrappers for common -// POSIX functions. These wrappers hide the differences between -// Windows/MSVC and POSIX systems. Since some compilers define these -// standard functions as macros, the wrapper cannot have the same name -// as the wrapped function. - -namespace posix { - -// Functions with a different name on Windows. - -#if GTEST_OS_WINDOWS - -typedef struct _stat StatStruct; - -# ifdef __BORLANDC__ -inline int IsATTY(int fd) { return isatty(fd); } -inline int StrCaseCmp(const char* s1, const char* s2) { - return stricmp(s1, s2); -} -inline char* StrDup(const char* src) { return strdup(src); } -# else // !__BORLANDC__ -# if GTEST_OS_WINDOWS_MOBILE -inline int IsATTY(int /* fd */) { return 0; } -# else -inline int IsATTY(int fd) { return _isatty(fd); } -# endif // GTEST_OS_WINDOWS_MOBILE -inline int StrCaseCmp(const char* s1, const char* s2) { - return _stricmp(s1, s2); -} -inline char* StrDup(const char* src) { return _strdup(src); } -# endif // __BORLANDC__ - -# if GTEST_OS_WINDOWS_MOBILE -inline int FileNo(FILE* file) { return reinterpret_cast(_fileno(file)); } -// Stat(), RmDir(), and IsDir() are not needed on Windows CE at this -// time and thus not defined there. -# else -inline int FileNo(FILE* file) { return _fileno(file); } -inline int Stat(const char* path, StatStruct* buf) { return _stat(path, buf); } -inline int RmDir(const char* dir) { return _rmdir(dir); } -inline bool IsDir(const StatStruct& st) { - return (_S_IFDIR & st.st_mode) != 0; -} -# endif // GTEST_OS_WINDOWS_MOBILE - -#else - -typedef struct stat StatStruct; - -inline int FileNo(FILE* file) { return fileno(file); } -inline int IsATTY(int fd) { return isatty(fd); } -inline int Stat(const char* path, StatStruct* buf) { return stat(path, buf); } -inline int StrCaseCmp(const char* s1, const char* s2) { - return strcasecmp(s1, s2); -} -inline char* StrDup(const char* src) { return strdup(src); } -inline int RmDir(const char* dir) { return rmdir(dir); } -inline bool IsDir(const StatStruct& st) { return S_ISDIR(st.st_mode); } - -#endif // GTEST_OS_WINDOWS - -// Functions deprecated by MSVC 8.0. - -#ifdef _MSC_VER -// Temporarily disable warning 4996 (deprecated function). -# pragma warning(push) -# pragma warning(disable:4996) -#endif - -inline const char* StrNCpy(char* dest, const char* src, size_t n) { - return strncpy(dest, src, n); -} - -// ChDir(), FReopen(), FDOpen(), Read(), Write(), Close(), and -// StrError() aren't needed on Windows CE at this time and thus not -// defined there. - -#if !GTEST_OS_WINDOWS_MOBILE -inline int ChDir(const char* dir) { return chdir(dir); } -#endif -inline FILE* FOpen(const char* path, const char* mode) { - return fopen(path, mode); -} -#if !GTEST_OS_WINDOWS_MOBILE -inline FILE *FReopen(const char* path, const char* mode, FILE* stream) { - return freopen(path, mode, stream); -} -inline FILE* FDOpen(int fd, const char* mode) { return fdopen(fd, mode); } -#endif -inline int FClose(FILE* fp) { return fclose(fp); } -#if !GTEST_OS_WINDOWS_MOBILE -inline int Read(int fd, void* buf, unsigned int count) { - return static_cast(read(fd, buf, count)); -} -inline int Write(int fd, const void* buf, unsigned int count) { - return static_cast(write(fd, buf, count)); -} -inline int Close(int fd) { return close(fd); } -inline const char* StrError(int errnum) { return strerror(errnum); } -#endif -inline const char* GetEnv(const char* name) { -#if GTEST_OS_WINDOWS_MOBILE - // We are on Windows CE, which has no environment variables. - return NULL; -#elif defined(__BORLANDC__) || defined(__SunOS_5_8) || defined(__SunOS_5_9) - // Environment variables which we programmatically clear will be set to the - // empty string rather than unset (NULL). Handle that case. - const char* const env = getenv(name); - return (env != NULL && env[0] != '\0') ? env : NULL; -#else - return getenv(name); -#endif -} - -#ifdef _MSC_VER -# pragma warning(pop) // Restores the warning state. -#endif - -#if GTEST_OS_WINDOWS_MOBILE -// Windows CE has no C library. The abort() function is used in -// several places in Google Test. This implementation provides a reasonable -// imitation of standard behaviour. -void Abort(); -#else -inline void Abort() { abort(); } -#endif // GTEST_OS_WINDOWS_MOBILE - -} // namespace posix - -// MSVC "deprecates" snprintf and issues warnings wherever it is used. In -// order to avoid these warnings, we need to use _snprintf or _snprintf_s on -// MSVC-based platforms. We map the GTEST_SNPRINTF_ macro to the appropriate -// function in order to achieve that. We use macro definition here because -// snprintf is a variadic function. -#if _MSC_VER >= 1400 && !GTEST_OS_WINDOWS_MOBILE -// MSVC 2005 and above support variadic macros. -# define GTEST_SNPRINTF_(buffer, size, format, ...) \ - _snprintf_s(buffer, size, size, format, __VA_ARGS__) -#elif defined(_MSC_VER) -// Windows CE does not define _snprintf_s and MSVC prior to 2005 doesn't -// complain about _snprintf. -# define GTEST_SNPRINTF_ _snprintf -#else -# define GTEST_SNPRINTF_ snprintf -#endif - -// The maximum number a BiggestInt can represent. This definition -// works no matter BiggestInt is represented in one's complement or -// two's complement. -// -// We cannot rely on numeric_limits in STL, as __int64 and long long -// are not part of standard C++ and numeric_limits doesn't need to be -// defined for them. -const BiggestInt kMaxBiggestInt = - ~(static_cast(1) << (8*sizeof(BiggestInt) - 1)); - -// This template class serves as a compile-time function from size to -// type. It maps a size in bytes to a primitive type with that -// size. e.g. -// -// TypeWithSize<4>::UInt -// -// is typedef-ed to be unsigned int (unsigned integer made up of 4 -// bytes). -// -// Such functionality should belong to STL, but I cannot find it -// there. -// -// Google Test uses this class in the implementation of floating-point -// comparison. -// -// For now it only handles UInt (unsigned int) as that's all Google Test -// needs. Other types can be easily added in the future if need -// arises. -template -class TypeWithSize { - public: - // This prevents the user from using TypeWithSize with incorrect - // values of N. - typedef void UInt; -}; - -// The specialization for size 4. -template <> -class TypeWithSize<4> { - public: - // unsigned int has size 4 in both gcc and MSVC. - // - // As base/basictypes.h doesn't compile on Windows, we cannot use - // uint32, uint64, and etc here. - typedef int Int; - typedef unsigned int UInt; -}; - -// The specialization for size 8. -template <> -class TypeWithSize<8> { - public: -#if GTEST_OS_WINDOWS - typedef __int64 Int; - typedef unsigned __int64 UInt; -#else - typedef long long Int; // NOLINT - typedef unsigned long long UInt; // NOLINT -#endif // GTEST_OS_WINDOWS -}; - -// Integer types of known sizes. -typedef TypeWithSize<4>::Int Int32; -typedef TypeWithSize<4>::UInt UInt32; -typedef TypeWithSize<8>::Int Int64; -typedef TypeWithSize<8>::UInt UInt64; -typedef TypeWithSize<8>::Int TimeInMillis; // Represents time in milliseconds. - -// Utilities for command line flags and environment variables. - -// Macro for referencing flags. -#define GTEST_FLAG(name) FLAGS_gtest_##name - -// Macros for declaring flags. -#define GTEST_DECLARE_bool_(name) GTEST_API_ extern bool GTEST_FLAG(name) -#define GTEST_DECLARE_int32_(name) \ - GTEST_API_ extern ::testing::internal::Int32 GTEST_FLAG(name) -#define GTEST_DECLARE_string_(name) \ - GTEST_API_ extern ::std::string GTEST_FLAG(name) - -// Macros for defining flags. -#define GTEST_DEFINE_bool_(name, default_val, doc) \ - GTEST_API_ bool GTEST_FLAG(name) = (default_val) -#define GTEST_DEFINE_int32_(name, default_val, doc) \ - GTEST_API_ ::testing::internal::Int32 GTEST_FLAG(name) = (default_val) -#define GTEST_DEFINE_string_(name, default_val, doc) \ - GTEST_API_ ::std::string GTEST_FLAG(name) = (default_val) - -// Thread annotations -#define GTEST_EXCLUSIVE_LOCK_REQUIRED_(locks) -#define GTEST_LOCK_EXCLUDED_(locks) - -// Parses 'str' for a 32-bit signed integer. If successful, writes the result -// to *value and returns true; otherwise leaves *value unchanged and returns -// false. -// TODO(chandlerc): Find a better way to refactor flag and environment parsing -// out of both gtest-port.cc and gtest.cc to avoid exporting this utility -// function. -bool ParseInt32(const Message& src_text, const char* str, Int32* value); - -// Parses a bool/Int32/string from the environment variable -// corresponding to the given Google Test flag. -bool BoolFromGTestEnv(const char* flag, bool default_val); -GTEST_API_ Int32 Int32FromGTestEnv(const char* flag, Int32 default_val); -const char* StringFromGTestEnv(const char* flag, const char* default_val); - -} // namespace internal -} // namespace testing - -#endif // GTEST_INCLUDE_GTEST_INTERNAL_GTEST_PORT_H_ - -#if GTEST_OS_LINUX -# include -# include -# include -# include -#endif // GTEST_OS_LINUX - -#if GTEST_HAS_EXCEPTIONS -# include -#endif - -#include -#include -#include -#include -#include -#include - -// Copyright 2005, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: wan@google.com (Zhanyong Wan) -// -// The Google C++ Testing Framework (Google Test) -// -// This header file defines the Message class. -// -// IMPORTANT NOTE: Due to limitation of the C++ language, we have to -// leave some internal implementation details in this header file. -// They are clearly marked by comments like this: -// -// // INTERNAL IMPLEMENTATION - DO NOT USE IN A USER PROGRAM. -// -// Such code is NOT meant to be used by a user directly, and is subject -// to CHANGE WITHOUT NOTICE. Therefore DO NOT DEPEND ON IT in a user -// program! - -#ifndef GTEST_INCLUDE_GTEST_GTEST_MESSAGE_H_ -#define GTEST_INCLUDE_GTEST_GTEST_MESSAGE_H_ - -#include - - -// Ensures that there is at least one operator<< in the global namespace. -// See Message& operator<<(...) below for why. -void operator<<(const testing::internal::Secret&, int); - -namespace testing { - -// The Message class works like an ostream repeater. -// -// Typical usage: -// -// 1. You stream a bunch of values to a Message object. -// It will remember the text in a stringstream. -// 2. Then you stream the Message object to an ostream. -// This causes the text in the Message to be streamed -// to the ostream. -// -// For example; -// -// testing::Message foo; -// foo << 1 << " != " << 2; -// std::cout << foo; -// -// will print "1 != 2". -// -// Message is not intended to be inherited from. In particular, its -// destructor is not virtual. -// -// Note that stringstream behaves differently in gcc and in MSVC. You -// can stream a NULL char pointer to it in the former, but not in the -// latter (it causes an access violation if you do). The Message -// class hides this difference by treating a NULL char pointer as -// "(null)". -class GTEST_API_ Message { - private: - // The type of basic IO manipulators (endl, ends, and flush) for - // narrow streams. - typedef std::ostream& (*BasicNarrowIoManip)(std::ostream&); - - public: - // Constructs an empty Message. - Message(); - - // Copy constructor. - Message(const Message& msg) : ss_(new ::std::stringstream) { // NOLINT - *ss_ << msg.GetString(); - } - - // Constructs a Message from a C-string. - explicit Message(const char* str) : ss_(new ::std::stringstream) { - *ss_ << str; - } - -#if GTEST_OS_SYMBIAN - // Streams a value (either a pointer or not) to this object. - template - inline Message& operator <<(const T& value) { - StreamHelper(typename internal::is_pointer::type(), value); - return *this; - } -#else - // Streams a non-pointer value to this object. - template - inline Message& operator <<(const T& val) { - // Some libraries overload << for STL containers. These - // overloads are defined in the global namespace instead of ::std. - // - // C++'s symbol lookup rule (i.e. Koenig lookup) says that these - // overloads are visible in either the std namespace or the global - // namespace, but not other namespaces, including the testing - // namespace which Google Test's Message class is in. - // - // To allow STL containers (and other types that has a << operator - // defined in the global namespace) to be used in Google Test - // assertions, testing::Message must access the custom << operator - // from the global namespace. With this using declaration, - // overloads of << defined in the global namespace and those - // visible via Koenig lookup are both exposed in this function. - using ::operator <<; - *ss_ << val; - return *this; - } - - // Streams a pointer value to this object. - // - // This function is an overload of the previous one. When you - // stream a pointer to a Message, this definition will be used as it - // is more specialized. (The C++ Standard, section - // [temp.func.order].) If you stream a non-pointer, then the - // previous definition will be used. - // - // The reason for this overload is that streaming a NULL pointer to - // ostream is undefined behavior. Depending on the compiler, you - // may get "0", "(nil)", "(null)", or an access violation. To - // ensure consistent result across compilers, we always treat NULL - // as "(null)". - template - inline Message& operator <<(T* const& pointer) { // NOLINT - if (pointer == NULL) { - *ss_ << "(null)"; - } else { - *ss_ << pointer; - } - return *this; - } -#endif // GTEST_OS_SYMBIAN - - // Since the basic IO manipulators are overloaded for both narrow - // and wide streams, we have to provide this specialized definition - // of operator <<, even though its body is the same as the - // templatized version above. Without this definition, streaming - // endl or other basic IO manipulators to Message will confuse the - // compiler. - Message& operator <<(BasicNarrowIoManip val) { - *ss_ << val; - return *this; - } - - // Instead of 1/0, we want to see true/false for bool values. - Message& operator <<(bool b) { - return *this << (b ? "true" : "false"); - } - - // These two overloads allow streaming a wide C string to a Message - // using the UTF-8 encoding. - Message& operator <<(const wchar_t* wide_c_str); - Message& operator <<(wchar_t* wide_c_str); - -#if GTEST_HAS_STD_WSTRING - // Converts the given wide string to a narrow string using the UTF-8 - // encoding, and streams the result to this Message object. - Message& operator <<(const ::std::wstring& wstr); -#endif // GTEST_HAS_STD_WSTRING - -#if GTEST_HAS_GLOBAL_WSTRING - // Converts the given wide string to a narrow string using the UTF-8 - // encoding, and streams the result to this Message object. - Message& operator <<(const ::wstring& wstr); -#endif // GTEST_HAS_GLOBAL_WSTRING - - // Gets the text streamed to this object so far as an std::string. - // Each '\0' character in the buffer is replaced with "\\0". - // - // INTERNAL IMPLEMENTATION - DO NOT USE IN A USER PROGRAM. - std::string GetString() const; - - private: - -#if GTEST_OS_SYMBIAN - // These are needed as the Nokia Symbian Compiler cannot decide between - // const T& and const T* in a function template. The Nokia compiler _can_ - // decide between class template specializations for T and T*, so a - // tr1::type_traits-like is_pointer works, and we can overload on that. - template - inline void StreamHelper(internal::true_type /*is_pointer*/, T* pointer) { - if (pointer == NULL) { - *ss_ << "(null)"; - } else { - *ss_ << pointer; - } - } - template - inline void StreamHelper(internal::false_type /*is_pointer*/, - const T& value) { - // See the comments in Message& operator <<(const T&) above for why - // we need this using statement. - using ::operator <<; - *ss_ << value; - } -#endif // GTEST_OS_SYMBIAN - - // We'll hold the text streamed to this object here. - const internal::scoped_ptr< ::std::stringstream> ss_; - - // We declare (but don't implement) this to prevent the compiler - // from implementing the assignment operator. - void operator=(const Message&); -}; - -// Streams a Message to an ostream. -inline std::ostream& operator <<(std::ostream& os, const Message& sb) { - return os << sb.GetString(); -} - -namespace internal { - -// Converts a streamable value to an std::string. A NULL pointer is -// converted to "(null)". When the input value is a ::string, -// ::std::string, ::wstring, or ::std::wstring object, each NUL -// character in it is replaced with "\\0". -template -std::string StreamableToString(const T& streamable) { - return (Message() << streamable).GetString(); -} - -} // namespace internal -} // namespace testing - -#endif // GTEST_INCLUDE_GTEST_GTEST_MESSAGE_H_ -// Copyright 2005, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Authors: wan@google.com (Zhanyong Wan), eefacm@gmail.com (Sean Mcafee) -// -// The Google C++ Testing Framework (Google Test) -// -// This header file declares the String class and functions used internally by -// Google Test. They are subject to change without notice. They should not used -// by code external to Google Test. -// -// This header file is #included by . -// It should not be #included by other files. - -#ifndef GTEST_INCLUDE_GTEST_INTERNAL_GTEST_STRING_H_ -#define GTEST_INCLUDE_GTEST_INTERNAL_GTEST_STRING_H_ - -#ifdef __BORLANDC__ -// string.h is not guaranteed to provide strcpy on C++ Builder. -# include -#endif - -#include -#include - - -namespace testing { -namespace internal { - -// String - an abstract class holding static string utilities. -class GTEST_API_ String { - public: - // Static utility methods - - // Clones a 0-terminated C string, allocating memory using new. The - // caller is responsible for deleting the return value using - // delete[]. Returns the cloned string, or NULL if the input is - // NULL. - // - // This is different from strdup() in string.h, which allocates - // memory using malloc(). - static const char* CloneCString(const char* c_str); - -#if GTEST_OS_WINDOWS_MOBILE - // Windows CE does not have the 'ANSI' versions of Win32 APIs. To be - // able to pass strings to Win32 APIs on CE we need to convert them - // to 'Unicode', UTF-16. - - // Creates a UTF-16 wide string from the given ANSI string, allocating - // memory using new. The caller is responsible for deleting the return - // value using delete[]. Returns the wide string, or NULL if the - // input is NULL. - // - // The wide string is created using the ANSI codepage (CP_ACP) to - // match the behaviour of the ANSI versions of Win32 calls and the - // C runtime. - static LPCWSTR AnsiToUtf16(const char* c_str); - - // Creates an ANSI string from the given wide string, allocating - // memory using new. The caller is responsible for deleting the return - // value using delete[]. Returns the ANSI string, or NULL if the - // input is NULL. - // - // The returned string is created using the ANSI codepage (CP_ACP) to - // match the behaviour of the ANSI versions of Win32 calls and the - // C runtime. - static const char* Utf16ToAnsi(LPCWSTR utf16_str); -#endif - - // Compares two C strings. Returns true iff they have the same content. - // - // Unlike strcmp(), this function can handle NULL argument(s). A - // NULL C string is considered different to any non-NULL C string, - // including the empty string. - static bool CStringEquals(const char* lhs, const char* rhs); - - // Converts a wide C string to a String using the UTF-8 encoding. - // NULL will be converted to "(null)". If an error occurred during - // the conversion, "(failed to convert from wide string)" is - // returned. - static std::string ShowWideCString(const wchar_t* wide_c_str); - - // Compares two wide C strings. Returns true iff they have the same - // content. - // - // Unlike wcscmp(), this function can handle NULL argument(s). A - // NULL C string is considered different to any non-NULL C string, - // including the empty string. - static bool WideCStringEquals(const wchar_t* lhs, const wchar_t* rhs); - - // Compares two C strings, ignoring case. Returns true iff they - // have the same content. - // - // Unlike strcasecmp(), this function can handle NULL argument(s). - // A NULL C string is considered different to any non-NULL C string, - // including the empty string. - static bool CaseInsensitiveCStringEquals(const char* lhs, - const char* rhs); - - // Compares two wide C strings, ignoring case. Returns true iff they - // have the same content. - // - // Unlike wcscasecmp(), this function can handle NULL argument(s). - // A NULL C string is considered different to any non-NULL wide C string, - // including the empty string. - // NB: The implementations on different platforms slightly differ. - // On windows, this method uses _wcsicmp which compares according to LC_CTYPE - // environment variable. On GNU platform this method uses wcscasecmp - // which compares according to LC_CTYPE category of the current locale. - // On MacOS X, it uses towlower, which also uses LC_CTYPE category of the - // current locale. - static bool CaseInsensitiveWideCStringEquals(const wchar_t* lhs, - const wchar_t* rhs); - - // Returns true iff the given string ends with the given suffix, ignoring - // case. Any string is considered to end with an empty suffix. - static bool EndsWithCaseInsensitive( - const std::string& str, const std::string& suffix); - - // Formats an int value as "%02d". - static std::string FormatIntWidth2(int value); // "%02d" for width == 2 - - // Formats an int value as "%X". - static std::string FormatHexInt(int value); - - // Formats a byte as "%02X". - static std::string FormatByte(unsigned char value); - - private: - String(); // Not meant to be instantiated. -}; // class String - -// Gets the content of the stringstream's buffer as an std::string. Each '\0' -// character in the buffer is replaced with "\\0". -GTEST_API_ std::string StringStreamToString(::std::stringstream* stream); - -} // namespace internal -} // namespace testing - -#endif // GTEST_INCLUDE_GTEST_INTERNAL_GTEST_STRING_H_ -// Copyright 2008, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: keith.ray@gmail.com (Keith Ray) -// -// Google Test filepath utilities -// -// This header file declares classes and functions used internally by -// Google Test. They are subject to change without notice. -// -// This file is #included in . -// Do not include this header file separately! - -#ifndef GTEST_INCLUDE_GTEST_INTERNAL_GTEST_FILEPATH_H_ -#define GTEST_INCLUDE_GTEST_INTERNAL_GTEST_FILEPATH_H_ - - -namespace testing { -namespace internal { - -// FilePath - a class for file and directory pathname manipulation which -// handles platform-specific conventions (like the pathname separator). -// Used for helper functions for naming files in a directory for xml output. -// Except for Set methods, all methods are const or static, which provides an -// "immutable value object" -- useful for peace of mind. -// A FilePath with a value ending in a path separator ("like/this/") represents -// a directory, otherwise it is assumed to represent a file. In either case, -// it may or may not represent an actual file or directory in the file system. -// Names are NOT checked for syntax correctness -- no checking for illegal -// characters, malformed paths, etc. - -class GTEST_API_ FilePath { - public: - FilePath() : pathname_("") { } - FilePath(const FilePath& rhs) : pathname_(rhs.pathname_) { } - - explicit FilePath(const std::string& pathname) : pathname_(pathname) { - Normalize(); - } - - FilePath& operator=(const FilePath& rhs) { - Set(rhs); - return *this; - } - - void Set(const FilePath& rhs) { - pathname_ = rhs.pathname_; - } - - const std::string& string() const { return pathname_; } - const char* c_str() const { return pathname_.c_str(); } - - // Returns the current working directory, or "" if unsuccessful. - static FilePath GetCurrentDir(); - - // Given directory = "dir", base_name = "test", number = 0, - // extension = "xml", returns "dir/test.xml". If number is greater - // than zero (e.g., 12), returns "dir/test_12.xml". - // On Windows platform, uses \ as the separator rather than /. - static FilePath MakeFileName(const FilePath& directory, - const FilePath& base_name, - int number, - const char* extension); - - // Given directory = "dir", relative_path = "test.xml", - // returns "dir/test.xml". - // On Windows, uses \ as the separator rather than /. - static FilePath ConcatPaths(const FilePath& directory, - const FilePath& relative_path); - - // Returns a pathname for a file that does not currently exist. The pathname - // will be directory/base_name.extension or - // directory/base_name_.extension if directory/base_name.extension - // already exists. The number will be incremented until a pathname is found - // that does not already exist. - // Examples: 'dir/foo_test.xml' or 'dir/foo_test_1.xml'. - // There could be a race condition if two or more processes are calling this - // function at the same time -- they could both pick the same filename. - static FilePath GenerateUniqueFileName(const FilePath& directory, - const FilePath& base_name, - const char* extension); - - // Returns true iff the path is "". - bool IsEmpty() const { return pathname_.empty(); } - - // If input name has a trailing separator character, removes it and returns - // the name, otherwise return the name string unmodified. - // On Windows platform, uses \ as the separator, other platforms use /. - FilePath RemoveTrailingPathSeparator() const; - - // Returns a copy of the FilePath with the directory part removed. - // Example: FilePath("path/to/file").RemoveDirectoryName() returns - // FilePath("file"). If there is no directory part ("just_a_file"), it returns - // the FilePath unmodified. If there is no file part ("just_a_dir/") it - // returns an empty FilePath (""). - // On Windows platform, '\' is the path separator, otherwise it is '/'. - FilePath RemoveDirectoryName() const; - - // RemoveFileName returns the directory path with the filename removed. - // Example: FilePath("path/to/file").RemoveFileName() returns "path/to/". - // If the FilePath is "a_file" or "/a_file", RemoveFileName returns - // FilePath("./") or, on Windows, FilePath(".\\"). If the filepath does - // not have a file, like "just/a/dir/", it returns the FilePath unmodified. - // On Windows platform, '\' is the path separator, otherwise it is '/'. - FilePath RemoveFileName() const; - - // Returns a copy of the FilePath with the case-insensitive extension removed. - // Example: FilePath("dir/file.exe").RemoveExtension("EXE") returns - // FilePath("dir/file"). If a case-insensitive extension is not - // found, returns a copy of the original FilePath. - FilePath RemoveExtension(const char* extension) const; - - // Creates directories so that path exists. Returns true if successful or if - // the directories already exist; returns false if unable to create - // directories for any reason. Will also return false if the FilePath does - // not represent a directory (that is, it doesn't end with a path separator). - bool CreateDirectoriesRecursively() const; - - // Create the directory so that path exists. Returns true if successful or - // if the directory already exists; returns false if unable to create the - // directory for any reason, including if the parent directory does not - // exist. Not named "CreateDirectory" because that's a macro on Windows. - bool CreateFolder() const; - - // Returns true if FilePath describes something in the file-system, - // either a file, directory, or whatever, and that something exists. - bool FileOrDirectoryExists() const; - - // Returns true if pathname describes a directory in the file-system - // that exists. - bool DirectoryExists() const; - - // Returns true if FilePath ends with a path separator, which indicates that - // it is intended to represent a directory. Returns false otherwise. - // This does NOT check that a directory (or file) actually exists. - bool IsDirectory() const; - - // Returns true if pathname describes a root directory. (Windows has one - // root directory per disk drive.) - bool IsRootDirectory() const; - - // Returns true if pathname describes an absolute path. - bool IsAbsolutePath() const; - - private: - // Replaces multiple consecutive separators with a single separator. - // For example, "bar///foo" becomes "bar/foo". Does not eliminate other - // redundancies that might be in a pathname involving "." or "..". - // - // A pathname with multiple consecutive separators may occur either through - // user error or as a result of some scripts or APIs that generate a pathname - // with a trailing separator. On other platforms the same API or script - // may NOT generate a pathname with a trailing "/". Then elsewhere that - // pathname may have another "/" and pathname components added to it, - // without checking for the separator already being there. - // The script language and operating system may allow paths like "foo//bar" - // but some of the functions in FilePath will not handle that correctly. In - // particular, RemoveTrailingPathSeparator() only removes one separator, and - // it is called in CreateDirectoriesRecursively() assuming that it will change - // a pathname from directory syntax (trailing separator) to filename syntax. - // - // On Windows this method also replaces the alternate path separator '/' with - // the primary path separator '\\', so that for example "bar\\/\\foo" becomes - // "bar\\foo". - - void Normalize(); - - // Returns a pointer to the last occurence of a valid path separator in - // the FilePath. On Windows, for example, both '/' and '\' are valid path - // separators. Returns NULL if no path separator was found. - const char* FindLastPathSeparator() const; - - std::string pathname_; -}; // class FilePath - -} // namespace internal -} // namespace testing - -#endif // GTEST_INCLUDE_GTEST_INTERNAL_GTEST_FILEPATH_H_ -// This file was GENERATED by command: -// pump.py gtest-type-util.h.pump -// DO NOT EDIT BY HAND!!! - -// Copyright 2008 Google Inc. -// All Rights Reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: wan@google.com (Zhanyong Wan) - -// Type utilities needed for implementing typed and type-parameterized -// tests. This file is generated by a SCRIPT. DO NOT EDIT BY HAND! -// -// Currently we support at most 50 types in a list, and at most 50 -// type-parameterized tests in one type-parameterized test case. -// Please contact googletestframework@googlegroups.com if you need -// more. - -#ifndef GTEST_INCLUDE_GTEST_INTERNAL_GTEST_TYPE_UTIL_H_ -#define GTEST_INCLUDE_GTEST_INTERNAL_GTEST_TYPE_UTIL_H_ - - -// #ifdef __GNUC__ is too general here. It is possible to use gcc without using -// libstdc++ (which is where cxxabi.h comes from). -# if GTEST_HAS_CXXABI_H_ -# include -# elif defined(__HP_aCC) -# include -# endif // GTEST_HASH_CXXABI_H_ - -namespace testing { -namespace internal { - -// GetTypeName() returns a human-readable name of type T. -// NB: This function is also used in Google Mock, so don't move it inside of -// the typed-test-only section below. -template -std::string GetTypeName() { -# if GTEST_HAS_RTTI - - const char* const name = typeid(T).name(); -# if GTEST_HAS_CXXABI_H_ || defined(__HP_aCC) - int status = 0; - // gcc's implementation of typeid(T).name() mangles the type name, - // so we have to demangle it. -# if GTEST_HAS_CXXABI_H_ - using abi::__cxa_demangle; -# endif // GTEST_HAS_CXXABI_H_ - char* const readable_name = __cxa_demangle(name, 0, 0, &status); - const std::string name_str(status == 0 ? readable_name : name); - free(readable_name); - return name_str; -# else - return name; -# endif // GTEST_HAS_CXXABI_H_ || __HP_aCC - -# else - - return ""; - -# endif // GTEST_HAS_RTTI -} - -#if GTEST_HAS_TYPED_TEST || GTEST_HAS_TYPED_TEST_P - -// AssertyTypeEq::type is defined iff T1 and T2 are the same -// type. This can be used as a compile-time assertion to ensure that -// two types are equal. - -template -struct AssertTypeEq; - -template -struct AssertTypeEq { - typedef bool type; -}; - -// A unique type used as the default value for the arguments of class -// template Types. This allows us to simulate variadic templates -// (e.g. Types, Type, and etc), which C++ doesn't -// support directly. -struct None {}; - -// The following family of struct and struct templates are used to -// represent type lists. In particular, TypesN -// represents a type list with N types (T1, T2, ..., and TN) in it. -// Except for Types0, every struct in the family has two member types: -// Head for the first type in the list, and Tail for the rest of the -// list. - -// The empty type list. -struct Types0 {}; - -// Type lists of length 1, 2, 3, and so on. - -template -struct Types1 { - typedef T1 Head; - typedef Types0 Tail; -}; -template -struct Types2 { - typedef T1 Head; - typedef Types1 Tail; -}; - -template -struct Types3 { - typedef T1 Head; - typedef Types2 Tail; -}; - -template -struct Types4 { - typedef T1 Head; - typedef Types3 Tail; -}; - -template -struct Types5 { - typedef T1 Head; - typedef Types4 Tail; -}; - -template -struct Types6 { - typedef T1 Head; - typedef Types5 Tail; -}; - -template -struct Types7 { - typedef T1 Head; - typedef Types6 Tail; -}; - -template -struct Types8 { - typedef T1 Head; - typedef Types7 Tail; -}; - -template -struct Types9 { - typedef T1 Head; - typedef Types8 Tail; -}; - -template -struct Types10 { - typedef T1 Head; - typedef Types9 Tail; -}; - -template -struct Types11 { - typedef T1 Head; - typedef Types10 Tail; -}; - -template -struct Types12 { - typedef T1 Head; - typedef Types11 Tail; -}; - -template -struct Types13 { - typedef T1 Head; - typedef Types12 Tail; -}; - -template -struct Types14 { - typedef T1 Head; - typedef Types13 Tail; -}; - -template -struct Types15 { - typedef T1 Head; - typedef Types14 Tail; -}; - -template -struct Types16 { - typedef T1 Head; - typedef Types15 Tail; -}; - -template -struct Types17 { - typedef T1 Head; - typedef Types16 Tail; -}; - -template -struct Types18 { - typedef T1 Head; - typedef Types17 Tail; -}; - -template -struct Types19 { - typedef T1 Head; - typedef Types18 Tail; -}; - -template -struct Types20 { - typedef T1 Head; - typedef Types19 Tail; -}; - -template -struct Types21 { - typedef T1 Head; - typedef Types20 Tail; -}; - -template -struct Types22 { - typedef T1 Head; - typedef Types21 Tail; -}; - -template -struct Types23 { - typedef T1 Head; - typedef Types22 Tail; -}; - -template -struct Types24 { - typedef T1 Head; - typedef Types23 Tail; -}; - -template -struct Types25 { - typedef T1 Head; - typedef Types24 Tail; -}; - -template -struct Types26 { - typedef T1 Head; - typedef Types25 Tail; -}; - -template -struct Types27 { - typedef T1 Head; - typedef Types26 Tail; -}; - -template -struct Types28 { - typedef T1 Head; - typedef Types27 Tail; -}; - -template -struct Types29 { - typedef T1 Head; - typedef Types28 Tail; -}; - -template -struct Types30 { - typedef T1 Head; - typedef Types29 Tail; -}; - -template -struct Types31 { - typedef T1 Head; - typedef Types30 Tail; -}; - -template -struct Types32 { - typedef T1 Head; - typedef Types31 Tail; -}; - -template -struct Types33 { - typedef T1 Head; - typedef Types32 Tail; -}; - -template -struct Types34 { - typedef T1 Head; - typedef Types33 Tail; -}; - -template -struct Types35 { - typedef T1 Head; - typedef Types34 Tail; -}; - -template -struct Types36 { - typedef T1 Head; - typedef Types35 Tail; -}; - -template -struct Types37 { - typedef T1 Head; - typedef Types36 Tail; -}; - -template -struct Types38 { - typedef T1 Head; - typedef Types37 Tail; -}; - -template -struct Types39 { - typedef T1 Head; - typedef Types38 Tail; -}; - -template -struct Types40 { - typedef T1 Head; - typedef Types39 Tail; -}; - -template -struct Types41 { - typedef T1 Head; - typedef Types40 Tail; -}; - -template -struct Types42 { - typedef T1 Head; - typedef Types41 Tail; -}; - -template -struct Types43 { - typedef T1 Head; - typedef Types42 Tail; -}; - -template -struct Types44 { - typedef T1 Head; - typedef Types43 Tail; -}; - -template -struct Types45 { - typedef T1 Head; - typedef Types44 Tail; -}; - -template -struct Types46 { - typedef T1 Head; - typedef Types45 Tail; -}; - -template -struct Types47 { - typedef T1 Head; - typedef Types46 Tail; -}; - -template -struct Types48 { - typedef T1 Head; - typedef Types47 Tail; -}; - -template -struct Types49 { - typedef T1 Head; - typedef Types48 Tail; -}; - -template -struct Types50 { - typedef T1 Head; - typedef Types49 Tail; -}; - - -} // namespace internal - -// We don't want to require the users to write TypesN<...> directly, -// as that would require them to count the length. Types<...> is much -// easier to write, but generates horrible messages when there is a -// compiler error, as gcc insists on printing out each template -// argument, even if it has the default value (this means Types -// will appear as Types in the compiler -// errors). -// -// Our solution is to combine the best part of the two approaches: a -// user would write Types, and Google Test will translate -// that to TypesN internally to make error messages -// readable. The translation is done by the 'type' member of the -// Types template. -template -struct Types { - typedef internal::Types50 type; -}; - -template <> -struct Types { - typedef internal::Types0 type; -}; -template -struct Types { - typedef internal::Types1 type; -}; -template -struct Types { - typedef internal::Types2 type; -}; -template -struct Types { - typedef internal::Types3 type; -}; -template -struct Types { - typedef internal::Types4 type; -}; -template -struct Types { - typedef internal::Types5 type; -}; -template -struct Types { - typedef internal::Types6 type; -}; -template -struct Types { - typedef internal::Types7 type; -}; -template -struct Types { - typedef internal::Types8 type; -}; -template -struct Types { - typedef internal::Types9 type; -}; -template -struct Types { - typedef internal::Types10 type; -}; -template -struct Types { - typedef internal::Types11 type; -}; -template -struct Types { - typedef internal::Types12 type; -}; -template -struct Types { - typedef internal::Types13 type; -}; -template -struct Types { - typedef internal::Types14 type; -}; -template -struct Types { - typedef internal::Types15 type; -}; -template -struct Types { - typedef internal::Types16 type; -}; -template -struct Types { - typedef internal::Types17 type; -}; -template -struct Types { - typedef internal::Types18 type; -}; -template -struct Types { - typedef internal::Types19 type; -}; -template -struct Types { - typedef internal::Types20 type; -}; -template -struct Types { - typedef internal::Types21 type; -}; -template -struct Types { - typedef internal::Types22 type; -}; -template -struct Types { - typedef internal::Types23 type; -}; -template -struct Types { - typedef internal::Types24 type; -}; -template -struct Types { - typedef internal::Types25 type; -}; -template -struct Types { - typedef internal::Types26 type; -}; -template -struct Types { - typedef internal::Types27 type; -}; -template -struct Types { - typedef internal::Types28 type; -}; -template -struct Types { - typedef internal::Types29 type; -}; -template -struct Types { - typedef internal::Types30 type; -}; -template -struct Types { - typedef internal::Types31 type; -}; -template -struct Types { - typedef internal::Types32 type; -}; -template -struct Types { - typedef internal::Types33 type; -}; -template -struct Types { - typedef internal::Types34 type; -}; -template -struct Types { - typedef internal::Types35 type; -}; -template -struct Types { - typedef internal::Types36 type; -}; -template -struct Types { - typedef internal::Types37 type; -}; -template -struct Types { - typedef internal::Types38 type; -}; -template -struct Types { - typedef internal::Types39 type; -}; -template -struct Types { - typedef internal::Types40 type; -}; -template -struct Types { - typedef internal::Types41 type; -}; -template -struct Types { - typedef internal::Types42 type; -}; -template -struct Types { - typedef internal::Types43 type; -}; -template -struct Types { - typedef internal::Types44 type; -}; -template -struct Types { - typedef internal::Types45 type; -}; -template -struct Types { - typedef internal::Types46 type; -}; -template -struct Types { - typedef internal::Types47 type; -}; -template -struct Types { - typedef internal::Types48 type; -}; -template -struct Types { - typedef internal::Types49 type; -}; - -namespace internal { - -# define GTEST_TEMPLATE_ template class - -// The template "selector" struct TemplateSel is used to -// represent Tmpl, which must be a class template with one type -// parameter, as a type. TemplateSel::Bind::type is defined -// as the type Tmpl. This allows us to actually instantiate the -// template "selected" by TemplateSel. -// -// This trick is necessary for simulating typedef for class templates, -// which C++ doesn't support directly. -template -struct TemplateSel { - template - struct Bind { - typedef Tmpl type; - }; -}; - -# define GTEST_BIND_(TmplSel, T) \ - TmplSel::template Bind::type - -// A unique struct template used as the default value for the -// arguments of class template Templates. This allows us to simulate -// variadic templates (e.g. Templates, Templates, -// and etc), which C++ doesn't support directly. -template -struct NoneT {}; - -// The following family of struct and struct templates are used to -// represent template lists. In particular, TemplatesN represents a list of N templates (T1, T2, ..., and TN). Except -// for Templates0, every struct in the family has two member types: -// Head for the selector of the first template in the list, and Tail -// for the rest of the list. - -// The empty template list. -struct Templates0 {}; - -// Template lists of length 1, 2, 3, and so on. - -template -struct Templates1 { - typedef TemplateSel Head; - typedef Templates0 Tail; -}; -template -struct Templates2 { - typedef TemplateSel Head; - typedef Templates1 Tail; -}; - -template -struct Templates3 { - typedef TemplateSel Head; - typedef Templates2 Tail; -}; - -template -struct Templates4 { - typedef TemplateSel Head; - typedef Templates3 Tail; -}; - -template -struct Templates5 { - typedef TemplateSel Head; - typedef Templates4 Tail; -}; - -template -struct Templates6 { - typedef TemplateSel Head; - typedef Templates5 Tail; -}; - -template -struct Templates7 { - typedef TemplateSel Head; - typedef Templates6 Tail; -}; - -template -struct Templates8 { - typedef TemplateSel Head; - typedef Templates7 Tail; -}; - -template -struct Templates9 { - typedef TemplateSel Head; - typedef Templates8 Tail; -}; - -template -struct Templates10 { - typedef TemplateSel Head; - typedef Templates9 Tail; -}; - -template -struct Templates11 { - typedef TemplateSel Head; - typedef Templates10 Tail; -}; - -template -struct Templates12 { - typedef TemplateSel Head; - typedef Templates11 Tail; -}; - -template -struct Templates13 { - typedef TemplateSel Head; - typedef Templates12 Tail; -}; - -template -struct Templates14 { - typedef TemplateSel Head; - typedef Templates13 Tail; -}; - -template -struct Templates15 { - typedef TemplateSel Head; - typedef Templates14 Tail; -}; - -template -struct Templates16 { - typedef TemplateSel Head; - typedef Templates15 Tail; -}; - -template -struct Templates17 { - typedef TemplateSel Head; - typedef Templates16 Tail; -}; - -template -struct Templates18 { - typedef TemplateSel Head; - typedef Templates17 Tail; -}; - -template -struct Templates19 { - typedef TemplateSel Head; - typedef Templates18 Tail; -}; - -template -struct Templates20 { - typedef TemplateSel Head; - typedef Templates19 Tail; -}; - -template -struct Templates21 { - typedef TemplateSel Head; - typedef Templates20 Tail; -}; - -template -struct Templates22 { - typedef TemplateSel Head; - typedef Templates21 Tail; -}; - -template -struct Templates23 { - typedef TemplateSel Head; - typedef Templates22 Tail; -}; - -template -struct Templates24 { - typedef TemplateSel Head; - typedef Templates23 Tail; -}; - -template -struct Templates25 { - typedef TemplateSel Head; - typedef Templates24 Tail; -}; - -template -struct Templates26 { - typedef TemplateSel Head; - typedef Templates25 Tail; -}; - -template -struct Templates27 { - typedef TemplateSel Head; - typedef Templates26 Tail; -}; - -template -struct Templates28 { - typedef TemplateSel Head; - typedef Templates27 Tail; -}; - -template -struct Templates29 { - typedef TemplateSel Head; - typedef Templates28 Tail; -}; - -template -struct Templates30 { - typedef TemplateSel Head; - typedef Templates29 Tail; -}; - -template -struct Templates31 { - typedef TemplateSel Head; - typedef Templates30 Tail; -}; - -template -struct Templates32 { - typedef TemplateSel Head; - typedef Templates31 Tail; -}; - -template -struct Templates33 { - typedef TemplateSel Head; - typedef Templates32 Tail; -}; - -template -struct Templates34 { - typedef TemplateSel Head; - typedef Templates33 Tail; -}; - -template -struct Templates35 { - typedef TemplateSel Head; - typedef Templates34 Tail; -}; - -template -struct Templates36 { - typedef TemplateSel Head; - typedef Templates35 Tail; -}; - -template -struct Templates37 { - typedef TemplateSel Head; - typedef Templates36 Tail; -}; - -template -struct Templates38 { - typedef TemplateSel Head; - typedef Templates37 Tail; -}; - -template -struct Templates39 { - typedef TemplateSel Head; - typedef Templates38 Tail; -}; - -template -struct Templates40 { - typedef TemplateSel Head; - typedef Templates39 Tail; -}; - -template -struct Templates41 { - typedef TemplateSel Head; - typedef Templates40 Tail; -}; - -template -struct Templates42 { - typedef TemplateSel Head; - typedef Templates41 Tail; -}; - -template -struct Templates43 { - typedef TemplateSel Head; - typedef Templates42 Tail; -}; - -template -struct Templates44 { - typedef TemplateSel Head; - typedef Templates43 Tail; -}; - -template -struct Templates45 { - typedef TemplateSel Head; - typedef Templates44 Tail; -}; - -template -struct Templates46 { - typedef TemplateSel Head; - typedef Templates45 Tail; -}; - -template -struct Templates47 { - typedef TemplateSel Head; - typedef Templates46 Tail; -}; - -template -struct Templates48 { - typedef TemplateSel Head; - typedef Templates47 Tail; -}; - -template -struct Templates49 { - typedef TemplateSel Head; - typedef Templates48 Tail; -}; - -template -struct Templates50 { - typedef TemplateSel Head; - typedef Templates49 Tail; -}; - - -// We don't want to require the users to write TemplatesN<...> directly, -// as that would require them to count the length. Templates<...> is much -// easier to write, but generates horrible messages when there is a -// compiler error, as gcc insists on printing out each template -// argument, even if it has the default value (this means Templates -// will appear as Templates in the compiler -// errors). -// -// Our solution is to combine the best part of the two approaches: a -// user would write Templates, and Google Test will translate -// that to TemplatesN internally to make error messages -// readable. The translation is done by the 'type' member of the -// Templates template. -template -struct Templates { - typedef Templates50 type; -}; - -template <> -struct Templates { - typedef Templates0 type; -}; -template -struct Templates { - typedef Templates1 type; -}; -template -struct Templates { - typedef Templates2 type; -}; -template -struct Templates { - typedef Templates3 type; -}; -template -struct Templates { - typedef Templates4 type; -}; -template -struct Templates { - typedef Templates5 type; -}; -template -struct Templates { - typedef Templates6 type; -}; -template -struct Templates { - typedef Templates7 type; -}; -template -struct Templates { - typedef Templates8 type; -}; -template -struct Templates { - typedef Templates9 type; -}; -template -struct Templates { - typedef Templates10 type; -}; -template -struct Templates { - typedef Templates11 type; -}; -template -struct Templates { - typedef Templates12 type; -}; -template -struct Templates { - typedef Templates13 type; -}; -template -struct Templates { - typedef Templates14 type; -}; -template -struct Templates { - typedef Templates15 type; -}; -template -struct Templates { - typedef Templates16 type; -}; -template -struct Templates { - typedef Templates17 type; -}; -template -struct Templates { - typedef Templates18 type; -}; -template -struct Templates { - typedef Templates19 type; -}; -template -struct Templates { - typedef Templates20 type; -}; -template -struct Templates { - typedef Templates21 type; -}; -template -struct Templates { - typedef Templates22 type; -}; -template -struct Templates { - typedef Templates23 type; -}; -template -struct Templates { - typedef Templates24 type; -}; -template -struct Templates { - typedef Templates25 type; -}; -template -struct Templates { - typedef Templates26 type; -}; -template -struct Templates { - typedef Templates27 type; -}; -template -struct Templates { - typedef Templates28 type; -}; -template -struct Templates { - typedef Templates29 type; -}; -template -struct Templates { - typedef Templates30 type; -}; -template -struct Templates { - typedef Templates31 type; -}; -template -struct Templates { - typedef Templates32 type; -}; -template -struct Templates { - typedef Templates33 type; -}; -template -struct Templates { - typedef Templates34 type; -}; -template -struct Templates { - typedef Templates35 type; -}; -template -struct Templates { - typedef Templates36 type; -}; -template -struct Templates { - typedef Templates37 type; -}; -template -struct Templates { - typedef Templates38 type; -}; -template -struct Templates { - typedef Templates39 type; -}; -template -struct Templates { - typedef Templates40 type; -}; -template -struct Templates { - typedef Templates41 type; -}; -template -struct Templates { - typedef Templates42 type; -}; -template -struct Templates { - typedef Templates43 type; -}; -template -struct Templates { - typedef Templates44 type; -}; -template -struct Templates { - typedef Templates45 type; -}; -template -struct Templates { - typedef Templates46 type; -}; -template -struct Templates { - typedef Templates47 type; -}; -template -struct Templates { - typedef Templates48 type; -}; -template -struct Templates { - typedef Templates49 type; -}; - -// The TypeList template makes it possible to use either a single type -// or a Types<...> list in TYPED_TEST_CASE() and -// INSTANTIATE_TYPED_TEST_CASE_P(). - -template -struct TypeList { - typedef Types1 type; -}; - -template -struct TypeList > { - typedef typename Types::type type; -}; - -#endif // GTEST_HAS_TYPED_TEST || GTEST_HAS_TYPED_TEST_P - -} // namespace internal -} // namespace testing - -#endif // GTEST_INCLUDE_GTEST_INTERNAL_GTEST_TYPE_UTIL_H_ - -// Due to C++ preprocessor weirdness, we need double indirection to -// concatenate two tokens when one of them is __LINE__. Writing -// -// foo ## __LINE__ -// -// will result in the token foo__LINE__, instead of foo followed by -// the current line number. For more details, see -// http://www.parashift.com/c++-faq-lite/misc-technical-issues.html#faq-39.6 -#define GTEST_CONCAT_TOKEN_(foo, bar) GTEST_CONCAT_TOKEN_IMPL_(foo, bar) -#define GTEST_CONCAT_TOKEN_IMPL_(foo, bar) foo ## bar - -class ProtocolMessage; -namespace proto2 { class Message; } - -namespace testing { - -// Forward declarations. - -class AssertionResult; // Result of an assertion. -class Message; // Represents a failure message. -class Test; // Represents a test. -class TestInfo; // Information about a test. -class TestPartResult; // Result of a test part. -class UnitTest; // A collection of test cases. - -template -::std::string PrintToString(const T& value); - -namespace internal { - -struct TraceInfo; // Information about a trace point. -class ScopedTrace; // Implements scoped trace. -class TestInfoImpl; // Opaque implementation of TestInfo -class UnitTestImpl; // Opaque implementation of UnitTest - -// How many times InitGoogleTest() has been called. -GTEST_API_ extern int g_init_gtest_count; - -// The text used in failure messages to indicate the start of the -// stack trace. -GTEST_API_ extern const char kStackTraceMarker[]; - -// Two overloaded helpers for checking at compile time whether an -// expression is a null pointer literal (i.e. NULL or any 0-valued -// compile-time integral constant). Their return values have -// different sizes, so we can use sizeof() to test which version is -// picked by the compiler. These helpers have no implementations, as -// we only need their signatures. -// -// Given IsNullLiteralHelper(x), the compiler will pick the first -// version if x can be implicitly converted to Secret*, and pick the -// second version otherwise. Since Secret is a secret and incomplete -// type, the only expression a user can write that has type Secret* is -// a null pointer literal. Therefore, we know that x is a null -// pointer literal if and only if the first version is picked by the -// compiler. -char IsNullLiteralHelper(Secret* p); -char (&IsNullLiteralHelper(...))[2]; // NOLINT - -// A compile-time bool constant that is true if and only if x is a -// null pointer literal (i.e. NULL or any 0-valued compile-time -// integral constant). -#ifdef GTEST_ELLIPSIS_NEEDS_POD_ -// We lose support for NULL detection where the compiler doesn't like -// passing non-POD classes through ellipsis (...). -# define GTEST_IS_NULL_LITERAL_(x) false -#else -# define GTEST_IS_NULL_LITERAL_(x) \ - (sizeof(::testing::internal::IsNullLiteralHelper(x)) == 1) -#endif // GTEST_ELLIPSIS_NEEDS_POD_ - -// Appends the user-supplied message to the Google-Test-generated message. -GTEST_API_ std::string AppendUserMessage( - const std::string& gtest_msg, const Message& user_msg); - -#if GTEST_HAS_EXCEPTIONS - -// This exception is thrown by (and only by) a failed Google Test -// assertion when GTEST_FLAG(throw_on_failure) is true (if exceptions -// are enabled). We derive it from std::runtime_error, which is for -// errors presumably detectable only at run time. Since -// std::runtime_error inherits from std::exception, many testing -// frameworks know how to extract and print the message inside it. -class GTEST_API_ GoogleTestFailureException : public ::std::runtime_error { - public: - explicit GoogleTestFailureException(const TestPartResult& failure); -}; - -#endif // GTEST_HAS_EXCEPTIONS - -// A helper class for creating scoped traces in user programs. -class GTEST_API_ ScopedTrace { - public: - // The c'tor pushes the given source file location and message onto - // a trace stack maintained by Google Test. - ScopedTrace(const char* file, int line, const Message& message); - - // The d'tor pops the info pushed by the c'tor. - // - // Note that the d'tor is not virtual in order to be efficient. - // Don't inherit from ScopedTrace! - ~ScopedTrace(); - - private: - GTEST_DISALLOW_COPY_AND_ASSIGN_(ScopedTrace); -} GTEST_ATTRIBUTE_UNUSED_; // A ScopedTrace object does its job in its - // c'tor and d'tor. Therefore it doesn't - // need to be used otherwise. - -// Constructs and returns the message for an equality assertion -// (e.g. ASSERT_EQ, EXPECT_STREQ, etc) failure. -// -// The first four parameters are the expressions used in the assertion -// and their values, as strings. For example, for ASSERT_EQ(foo, bar) -// where foo is 5 and bar is 6, we have: -// -// expected_expression: "foo" -// actual_expression: "bar" -// expected_value: "5" -// actual_value: "6" -// -// The ignoring_case parameter is true iff the assertion is a -// *_STRCASEEQ*. When it's true, the string " (ignoring case)" will -// be inserted into the message. -GTEST_API_ AssertionResult EqFailure(const char* expected_expression, - const char* actual_expression, - const std::string& expected_value, - const std::string& actual_value, - bool ignoring_case); - -// Constructs a failure message for Boolean assertions such as EXPECT_TRUE. -GTEST_API_ std::string GetBoolAssertionFailureMessage( - const AssertionResult& assertion_result, - const char* expression_text, - const char* actual_predicate_value, - const char* expected_predicate_value); - -// This template class represents an IEEE floating-point number -// (either single-precision or double-precision, depending on the -// template parameters). -// -// The purpose of this class is to do more sophisticated number -// comparison. (Due to round-off error, etc, it's very unlikely that -// two floating-points will be equal exactly. Hence a naive -// comparison by the == operation often doesn't work.) -// -// Format of IEEE floating-point: -// -// The most-significant bit being the leftmost, an IEEE -// floating-point looks like -// -// sign_bit exponent_bits fraction_bits -// -// Here, sign_bit is a single bit that designates the sign of the -// number. -// -// For float, there are 8 exponent bits and 23 fraction bits. -// -// For double, there are 11 exponent bits and 52 fraction bits. -// -// More details can be found at -// http://en.wikipedia.org/wiki/IEEE_floating-point_standard. -// -// Template parameter: -// -// RawType: the raw floating-point type (either float or double) -template -class FloatingPoint { - public: - // Defines the unsigned integer type that has the same size as the - // floating point number. - typedef typename TypeWithSize::UInt Bits; - - // Constants. - - // # of bits in a number. - static const size_t kBitCount = 8*sizeof(RawType); - - // # of fraction bits in a number. - static const size_t kFractionBitCount = - std::numeric_limits::digits - 1; - - // # of exponent bits in a number. - static const size_t kExponentBitCount = kBitCount - 1 - kFractionBitCount; - - // The mask for the sign bit. - static const Bits kSignBitMask = static_cast(1) << (kBitCount - 1); - - // The mask for the fraction bits. - static const Bits kFractionBitMask = - ~static_cast(0) >> (kExponentBitCount + 1); - - // The mask for the exponent bits. - static const Bits kExponentBitMask = ~(kSignBitMask | kFractionBitMask); - - // How many ULP's (Units in the Last Place) we want to tolerate when - // comparing two numbers. The larger the value, the more error we - // allow. A 0 value means that two numbers must be exactly the same - // to be considered equal. - // - // The maximum error of a single floating-point operation is 0.5 - // units in the last place. On Intel CPU's, all floating-point - // calculations are done with 80-bit precision, while double has 64 - // bits. Therefore, 4 should be enough for ordinary use. - // - // See the following article for more details on ULP: - // http://randomascii.wordpress.com/2012/02/25/comparing-floating-point-numbers-2012-edition/ - static const size_t kMaxUlps = 4; - - // Constructs a FloatingPoint from a raw floating-point number. - // - // On an Intel CPU, passing a non-normalized NAN (Not a Number) - // around may change its bits, although the new value is guaranteed - // to be also a NAN. Therefore, don't expect this constructor to - // preserve the bits in x when x is a NAN. - explicit FloatingPoint(const RawType& x) { u_.value_ = x; } - - // Static methods - - // Reinterprets a bit pattern as a floating-point number. - // - // This function is needed to test the AlmostEquals() method. - static RawType ReinterpretBits(const Bits bits) { - FloatingPoint fp(0); - fp.u_.bits_ = bits; - return fp.u_.value_; - } - - // Returns the floating-point number that represent positive infinity. - static RawType Infinity() { - return ReinterpretBits(kExponentBitMask); - } - - // Returns the maximum representable finite floating-point number. - static RawType Max(); - - // Non-static methods - - // Returns the bits that represents this number. - const Bits &bits() const { return u_.bits_; } - - // Returns the exponent bits of this number. - Bits exponent_bits() const { return kExponentBitMask & u_.bits_; } - - // Returns the fraction bits of this number. - Bits fraction_bits() const { return kFractionBitMask & u_.bits_; } - - // Returns the sign bit of this number. - Bits sign_bit() const { return kSignBitMask & u_.bits_; } - - // Returns true iff this is NAN (not a number). - bool is_nan() const { - // It's a NAN if the exponent bits are all ones and the fraction - // bits are not entirely zeros. - return (exponent_bits() == kExponentBitMask) && (fraction_bits() != 0); - } - - // Returns true iff this number is at most kMaxUlps ULP's away from - // rhs. In particular, this function: - // - // - returns false if either number is (or both are) NAN. - // - treats really large numbers as almost equal to infinity. - // - thinks +0.0 and -0.0 are 0 DLP's apart. - bool AlmostEquals(const FloatingPoint& rhs) const { - // The IEEE standard says that any comparison operation involving - // a NAN must return false. - if (is_nan() || rhs.is_nan()) return false; - - return DistanceBetweenSignAndMagnitudeNumbers(u_.bits_, rhs.u_.bits_) - <= kMaxUlps; - } - - private: - // The data type used to store the actual floating-point number. - union FloatingPointUnion { - RawType value_; // The raw floating-point number. - Bits bits_; // The bits that represent the number. - }; - - // Converts an integer from the sign-and-magnitude representation to - // the biased representation. More precisely, let N be 2 to the - // power of (kBitCount - 1), an integer x is represented by the - // unsigned number x + N. - // - // For instance, - // - // -N + 1 (the most negative number representable using - // sign-and-magnitude) is represented by 1; - // 0 is represented by N; and - // N - 1 (the biggest number representable using - // sign-and-magnitude) is represented by 2N - 1. - // - // Read http://en.wikipedia.org/wiki/Signed_number_representations - // for more details on signed number representations. - static Bits SignAndMagnitudeToBiased(const Bits &sam) { - if (kSignBitMask & sam) { - // sam represents a negative number. - return ~sam + 1; - } else { - // sam represents a positive number. - return kSignBitMask | sam; - } - } - - // Given two numbers in the sign-and-magnitude representation, - // returns the distance between them as an unsigned number. - static Bits DistanceBetweenSignAndMagnitudeNumbers(const Bits &sam1, - const Bits &sam2) { - const Bits biased1 = SignAndMagnitudeToBiased(sam1); - const Bits biased2 = SignAndMagnitudeToBiased(sam2); - return (biased1 >= biased2) ? (biased1 - biased2) : (biased2 - biased1); - } - - FloatingPointUnion u_; -}; - -// We cannot use std::numeric_limits::max() as it clashes with the max() -// macro defined by . -template <> -inline float FloatingPoint::Max() { return FLT_MAX; } -template <> -inline double FloatingPoint::Max() { return DBL_MAX; } - -// Typedefs the instances of the FloatingPoint template class that we -// care to use. -typedef FloatingPoint Float; -typedef FloatingPoint Double; - -// In order to catch the mistake of putting tests that use different -// test fixture classes in the same test case, we need to assign -// unique IDs to fixture classes and compare them. The TypeId type is -// used to hold such IDs. The user should treat TypeId as an opaque -// type: the only operation allowed on TypeId values is to compare -// them for equality using the == operator. -typedef const void* TypeId; - -template -class TypeIdHelper { - public: - // dummy_ must not have a const type. Otherwise an overly eager - // compiler (e.g. MSVC 7.1 & 8.0) may try to merge - // TypeIdHelper::dummy_ for different Ts as an "optimization". - static bool dummy_; -}; - -template -bool TypeIdHelper::dummy_ = false; - -// GetTypeId() returns the ID of type T. Different values will be -// returned for different types. Calling the function twice with the -// same type argument is guaranteed to return the same ID. -template -TypeId GetTypeId() { - // The compiler is required to allocate a different - // TypeIdHelper::dummy_ variable for each T used to instantiate - // the template. Therefore, the address of dummy_ is guaranteed to - // be unique. - return &(TypeIdHelper::dummy_); -} - -// Returns the type ID of ::testing::Test. Always call this instead -// of GetTypeId< ::testing::Test>() to get the type ID of -// ::testing::Test, as the latter may give the wrong result due to a -// suspected linker bug when compiling Google Test as a Mac OS X -// framework. -GTEST_API_ TypeId GetTestTypeId(); - -// Defines the abstract factory interface that creates instances -// of a Test object. -class TestFactoryBase { - public: - virtual ~TestFactoryBase() {} - - // Creates a test instance to run. The instance is both created and destroyed - // within TestInfoImpl::Run() - virtual Test* CreateTest() = 0; - - protected: - TestFactoryBase() {} - - private: - GTEST_DISALLOW_COPY_AND_ASSIGN_(TestFactoryBase); -}; - -// This class provides implementation of TeastFactoryBase interface. -// It is used in TEST and TEST_F macros. -template -class TestFactoryImpl : public TestFactoryBase { - public: - virtual Test* CreateTest() { return new TestClass; } -}; - -#if GTEST_OS_WINDOWS - -// Predicate-formatters for implementing the HRESULT checking macros -// {ASSERT|EXPECT}_HRESULT_{SUCCEEDED|FAILED} -// We pass a long instead of HRESULT to avoid causing an -// include dependency for the HRESULT type. -GTEST_API_ AssertionResult IsHRESULTSuccess(const char* expr, - long hr); // NOLINT -GTEST_API_ AssertionResult IsHRESULTFailure(const char* expr, - long hr); // NOLINT - -#endif // GTEST_OS_WINDOWS - -// Types of SetUpTestCase() and TearDownTestCase() functions. -typedef void (*SetUpTestCaseFunc)(); -typedef void (*TearDownTestCaseFunc)(); - -// Creates a new TestInfo object and registers it with Google Test; -// returns the created object. -// -// Arguments: -// -// test_case_name: name of the test case -// name: name of the test -// type_param the name of the test's type parameter, or NULL if -// this is not a typed or a type-parameterized test. -// value_param text representation of the test's value parameter, -// or NULL if this is not a type-parameterized test. -// fixture_class_id: ID of the test fixture class -// set_up_tc: pointer to the function that sets up the test case -// tear_down_tc: pointer to the function that tears down the test case -// factory: pointer to the factory that creates a test object. -// The newly created TestInfo instance will assume -// ownership of the factory object. -GTEST_API_ TestInfo* MakeAndRegisterTestInfo( - const char* test_case_name, - const char* name, - const char* type_param, - const char* value_param, - TypeId fixture_class_id, - SetUpTestCaseFunc set_up_tc, - TearDownTestCaseFunc tear_down_tc, - TestFactoryBase* factory); - -// If *pstr starts with the given prefix, modifies *pstr to be right -// past the prefix and returns true; otherwise leaves *pstr unchanged -// and returns false. None of pstr, *pstr, and prefix can be NULL. -GTEST_API_ bool SkipPrefix(const char* prefix, const char** pstr); - -#if GTEST_HAS_TYPED_TEST || GTEST_HAS_TYPED_TEST_P - -// State of the definition of a type-parameterized test case. -class GTEST_API_ TypedTestCasePState { - public: - TypedTestCasePState() : registered_(false) {} - - // Adds the given test name to defined_test_names_ and return true - // if the test case hasn't been registered; otherwise aborts the - // program. - bool AddTestName(const char* file, int line, const char* case_name, - const char* test_name) { - if (registered_) { - fprintf(stderr, "%s Test %s must be defined before " - "REGISTER_TYPED_TEST_CASE_P(%s, ...).\n", - FormatFileLocation(file, line).c_str(), test_name, case_name); - fflush(stderr); - posix::Abort(); - } - defined_test_names_.insert(test_name); - return true; - } - - // Verifies that registered_tests match the test names in - // defined_test_names_; returns registered_tests if successful, or - // aborts the program otherwise. - const char* VerifyRegisteredTestNames( - const char* file, int line, const char* registered_tests); - - private: - bool registered_; - ::std::set defined_test_names_; -}; - -// Skips to the first non-space char after the first comma in 'str'; -// returns NULL if no comma is found in 'str'. -inline const char* SkipComma(const char* str) { - const char* comma = strchr(str, ','); - if (comma == NULL) { - return NULL; - } - while (IsSpace(*(++comma))) {} - return comma; -} - -// Returns the prefix of 'str' before the first comma in it; returns -// the entire string if it contains no comma. -inline std::string GetPrefixUntilComma(const char* str) { - const char* comma = strchr(str, ','); - return comma == NULL ? str : std::string(str, comma); -} - -// TypeParameterizedTest::Register() -// registers a list of type-parameterized tests with Google Test. The -// return value is insignificant - we just need to return something -// such that we can call this function in a namespace scope. -// -// Implementation note: The GTEST_TEMPLATE_ macro declares a template -// template parameter. It's defined in gtest-type-util.h. -template -class TypeParameterizedTest { - public: - // 'index' is the index of the test in the type list 'Types' - // specified in INSTANTIATE_TYPED_TEST_CASE_P(Prefix, TestCase, - // Types). Valid values for 'index' are [0, N - 1] where N is the - // length of Types. - static bool Register(const char* prefix, const char* case_name, - const char* test_names, int index) { - typedef typename Types::Head Type; - typedef Fixture FixtureClass; - typedef typename GTEST_BIND_(TestSel, Type) TestClass; - - // First, registers the first type-parameterized test in the type - // list. - MakeAndRegisterTestInfo( - (std::string(prefix) + (prefix[0] == '\0' ? "" : "/") + case_name + "/" - + StreamableToString(index)).c_str(), - GetPrefixUntilComma(test_names).c_str(), - GetTypeName().c_str(), - NULL, // No value parameter. - GetTypeId(), - TestClass::SetUpTestCase, - TestClass::TearDownTestCase, - new TestFactoryImpl); - - // Next, recurses (at compile time) with the tail of the type list. - return TypeParameterizedTest - ::Register(prefix, case_name, test_names, index + 1); - } -}; - -// The base case for the compile time recursion. -template -class TypeParameterizedTest { - public: - static bool Register(const char* /*prefix*/, const char* /*case_name*/, - const char* /*test_names*/, int /*index*/) { - return true; - } -}; - -// TypeParameterizedTestCase::Register() -// registers *all combinations* of 'Tests' and 'Types' with Google -// Test. The return value is insignificant - we just need to return -// something such that we can call this function in a namespace scope. -template -class TypeParameterizedTestCase { - public: - static bool Register(const char* prefix, const char* case_name, - const char* test_names) { - typedef typename Tests::Head Head; - - // First, register the first test in 'Test' for each type in 'Types'. - TypeParameterizedTest::Register( - prefix, case_name, test_names, 0); - - // Next, recurses (at compile time) with the tail of the test list. - return TypeParameterizedTestCase - ::Register(prefix, case_name, SkipComma(test_names)); - } -}; - -// The base case for the compile time recursion. -template -class TypeParameterizedTestCase { - public: - static bool Register(const char* /*prefix*/, const char* /*case_name*/, - const char* /*test_names*/) { - return true; - } -}; - -#endif // GTEST_HAS_TYPED_TEST || GTEST_HAS_TYPED_TEST_P - -// Returns the current OS stack trace as an std::string. -// -// The maximum number of stack frames to be included is specified by -// the gtest_stack_trace_depth flag. The skip_count parameter -// specifies the number of top frames to be skipped, which doesn't -// count against the number of frames to be included. -// -// For example, if Foo() calls Bar(), which in turn calls -// GetCurrentOsStackTraceExceptTop(..., 1), Foo() will be included in -// the trace but Bar() and GetCurrentOsStackTraceExceptTop() won't. -GTEST_API_ std::string GetCurrentOsStackTraceExceptTop( - UnitTest* unit_test, int skip_count); - -// Helpers for suppressing warnings on unreachable code or constant -// condition. - -// Always returns true. -GTEST_API_ bool AlwaysTrue(); - -// Always returns false. -inline bool AlwaysFalse() { return !AlwaysTrue(); } - -// Helper for suppressing false warning from Clang on a const char* -// variable declared in a conditional expression always being NULL in -// the else branch. -struct GTEST_API_ ConstCharPtr { - ConstCharPtr(const char* str) : value(str) {} - operator bool() const { return true; } - const char* value; -}; - -// A simple Linear Congruential Generator for generating random -// numbers with a uniform distribution. Unlike rand() and srand(), it -// doesn't use global state (and therefore can't interfere with user -// code). Unlike rand_r(), it's portable. An LCG isn't very random, -// but it's good enough for our purposes. -class GTEST_API_ Random { - public: - static const UInt32 kMaxRange = 1u << 31; - - explicit Random(UInt32 seed) : state_(seed) {} - - void Reseed(UInt32 seed) { state_ = seed; } - - // Generates a random number from [0, range). Crashes if 'range' is - // 0 or greater than kMaxRange. - UInt32 Generate(UInt32 range); - - private: - UInt32 state_; - GTEST_DISALLOW_COPY_AND_ASSIGN_(Random); -}; - -// Defining a variable of type CompileAssertTypesEqual will cause a -// compiler error iff T1 and T2 are different types. -template -struct CompileAssertTypesEqual; - -template -struct CompileAssertTypesEqual { -}; - -// Removes the reference from a type if it is a reference type, -// otherwise leaves it unchanged. This is the same as -// tr1::remove_reference, which is not widely available yet. -template -struct RemoveReference { typedef T type; }; // NOLINT -template -struct RemoveReference { typedef T type; }; // NOLINT - -// A handy wrapper around RemoveReference that works when the argument -// T depends on template parameters. -#define GTEST_REMOVE_REFERENCE_(T) \ - typename ::testing::internal::RemoveReference::type - -// Removes const from a type if it is a const type, otherwise leaves -// it unchanged. This is the same as tr1::remove_const, which is not -// widely available yet. -template -struct RemoveConst { typedef T type; }; // NOLINT -template -struct RemoveConst { typedef T type; }; // NOLINT - -// MSVC 8.0, Sun C++, and IBM XL C++ have a bug which causes the above -// definition to fail to remove the const in 'const int[3]' and 'const -// char[3][4]'. The following specialization works around the bug. -template -struct RemoveConst { - typedef typename RemoveConst::type type[N]; -}; - -#if defined(_MSC_VER) && _MSC_VER < 1400 -// This is the only specialization that allows VC++ 7.1 to remove const in -// 'const int[3] and 'const int[3][4]'. However, it causes trouble with GCC -// and thus needs to be conditionally compiled. -template -struct RemoveConst { - typedef typename RemoveConst::type type[N]; -}; -#endif - -// A handy wrapper around RemoveConst that works when the argument -// T depends on template parameters. -#define GTEST_REMOVE_CONST_(T) \ - typename ::testing::internal::RemoveConst::type - -// Turns const U&, U&, const U, and U all into U. -#define GTEST_REMOVE_REFERENCE_AND_CONST_(T) \ - GTEST_REMOVE_CONST_(GTEST_REMOVE_REFERENCE_(T)) - -// Adds reference to a type if it is not a reference type, -// otherwise leaves it unchanged. This is the same as -// tr1::add_reference, which is not widely available yet. -template -struct AddReference { typedef T& type; }; // NOLINT -template -struct AddReference { typedef T& type; }; // NOLINT - -// A handy wrapper around AddReference that works when the argument T -// depends on template parameters. -#define GTEST_ADD_REFERENCE_(T) \ - typename ::testing::internal::AddReference::type - -// Adds a reference to const on top of T as necessary. For example, -// it transforms -// -// char ==> const char& -// const char ==> const char& -// char& ==> const char& -// const char& ==> const char& -// -// The argument T must depend on some template parameters. -#define GTEST_REFERENCE_TO_CONST_(T) \ - GTEST_ADD_REFERENCE_(const GTEST_REMOVE_REFERENCE_(T)) - -// ImplicitlyConvertible::value is a compile-time bool -// constant that's true iff type From can be implicitly converted to -// type To. -template -class ImplicitlyConvertible { - private: - // We need the following helper functions only for their types. - // They have no implementations. - - // MakeFrom() is an expression whose type is From. We cannot simply - // use From(), as the type From may not have a public default - // constructor. - static From MakeFrom(); - - // These two functions are overloaded. Given an expression - // Helper(x), the compiler will pick the first version if x can be - // implicitly converted to type To; otherwise it will pick the - // second version. - // - // The first version returns a value of size 1, and the second - // version returns a value of size 2. Therefore, by checking the - // size of Helper(x), which can be done at compile time, we can tell - // which version of Helper() is used, and hence whether x can be - // implicitly converted to type To. - static char Helper(To); - static char (&Helper(...))[2]; // NOLINT - - // We have to put the 'public' section after the 'private' section, - // or MSVC refuses to compile the code. - public: - // MSVC warns about implicitly converting from double to int for - // possible loss of data, so we need to temporarily disable the - // warning. -#ifdef _MSC_VER -# pragma warning(push) // Saves the current warning state. -# pragma warning(disable:4244) // Temporarily disables warning 4244. - - static const bool value = - sizeof(Helper(ImplicitlyConvertible::MakeFrom())) == 1; -# pragma warning(pop) // Restores the warning state. -#elif defined(__BORLANDC__) - // C++Builder cannot use member overload resolution during template - // instantiation. The simplest workaround is to use its C++0x type traits - // functions (C++Builder 2009 and above only). - static const bool value = __is_convertible(From, To); -#else - static const bool value = - sizeof(Helper(ImplicitlyConvertible::MakeFrom())) == 1; -#endif // _MSV_VER -}; -template -const bool ImplicitlyConvertible::value; - -// IsAProtocolMessage::value is a compile-time bool constant that's -// true iff T is type ProtocolMessage, proto2::Message, or a subclass -// of those. -template -struct IsAProtocolMessage - : public bool_constant< - ImplicitlyConvertible::value || - ImplicitlyConvertible::value> { -}; - -// When the compiler sees expression IsContainerTest(0), if C is an -// STL-style container class, the first overload of IsContainerTest -// will be viable (since both C::iterator* and C::const_iterator* are -// valid types and NULL can be implicitly converted to them). It will -// be picked over the second overload as 'int' is a perfect match for -// the type of argument 0. If C::iterator or C::const_iterator is not -// a valid type, the first overload is not viable, and the second -// overload will be picked. Therefore, we can determine whether C is -// a container class by checking the type of IsContainerTest(0). -// The value of the expression is insignificant. -// -// Note that we look for both C::iterator and C::const_iterator. The -// reason is that C++ injects the name of a class as a member of the -// class itself (e.g. you can refer to class iterator as either -// 'iterator' or 'iterator::iterator'). If we look for C::iterator -// only, for example, we would mistakenly think that a class named -// iterator is an STL container. -// -// Also note that the simpler approach of overloading -// IsContainerTest(typename C::const_iterator*) and -// IsContainerTest(...) doesn't work with Visual Age C++ and Sun C++. -typedef int IsContainer; -template -IsContainer IsContainerTest(int /* dummy */, - typename C::iterator* /* it */ = NULL, - typename C::const_iterator* /* const_it */ = NULL) { - return 0; -} - -typedef char IsNotContainer; -template -IsNotContainer IsContainerTest(long /* dummy */) { return '\0'; } - -// EnableIf::type is void when 'Cond' is true, and -// undefined when 'Cond' is false. To use SFINAE to make a function -// overload only apply when a particular expression is true, add -// "typename EnableIf::type* = 0" as the last parameter. -template struct EnableIf; -template<> struct EnableIf { typedef void type; }; // NOLINT - -// Utilities for native arrays. - -// ArrayEq() compares two k-dimensional native arrays using the -// elements' operator==, where k can be any integer >= 0. When k is -// 0, ArrayEq() degenerates into comparing a single pair of values. - -template -bool ArrayEq(const T* lhs, size_t size, const U* rhs); - -// This generic version is used when k is 0. -template -inline bool ArrayEq(const T& lhs, const U& rhs) { return lhs == rhs; } - -// This overload is used when k >= 1. -template -inline bool ArrayEq(const T(&lhs)[N], const U(&rhs)[N]) { - return internal::ArrayEq(lhs, N, rhs); -} - -// This helper reduces code bloat. If we instead put its logic inside -// the previous ArrayEq() function, arrays with different sizes would -// lead to different copies of the template code. -template -bool ArrayEq(const T* lhs, size_t size, const U* rhs) { - for (size_t i = 0; i != size; i++) { - if (!internal::ArrayEq(lhs[i], rhs[i])) - return false; - } - return true; -} - -// Finds the first element in the iterator range [begin, end) that -// equals elem. Element may be a native array type itself. -template -Iter ArrayAwareFind(Iter begin, Iter end, const Element& elem) { - for (Iter it = begin; it != end; ++it) { - if (internal::ArrayEq(*it, elem)) - return it; - } - return end; -} - -// CopyArray() copies a k-dimensional native array using the elements' -// operator=, where k can be any integer >= 0. When k is 0, -// CopyArray() degenerates into copying a single value. - -template -void CopyArray(const T* from, size_t size, U* to); - -// This generic version is used when k is 0. -template -inline void CopyArray(const T& from, U* to) { *to = from; } - -// This overload is used when k >= 1. -template -inline void CopyArray(const T(&from)[N], U(*to)[N]) { - internal::CopyArray(from, N, *to); -} - -// This helper reduces code bloat. If we instead put its logic inside -// the previous CopyArray() function, arrays with different sizes -// would lead to different copies of the template code. -template -void CopyArray(const T* from, size_t size, U* to) { - for (size_t i = 0; i != size; i++) { - internal::CopyArray(from[i], to + i); - } -} - -// The relation between an NativeArray object (see below) and the -// native array it represents. -enum RelationToSource { - kReference, // The NativeArray references the native array. - kCopy // The NativeArray makes a copy of the native array and - // owns the copy. -}; - -// Adapts a native array to a read-only STL-style container. Instead -// of the complete STL container concept, this adaptor only implements -// members useful for Google Mock's container matchers. New members -// should be added as needed. To simplify the implementation, we only -// support Element being a raw type (i.e. having no top-level const or -// reference modifier). It's the client's responsibility to satisfy -// this requirement. Element can be an array type itself (hence -// multi-dimensional arrays are supported). -template -class NativeArray { - public: - // STL-style container typedefs. - typedef Element value_type; - typedef Element* iterator; - typedef const Element* const_iterator; - - // Constructs from a native array. - NativeArray(const Element* array, size_t count, RelationToSource relation) { - Init(array, count, relation); - } - - // Copy constructor. - NativeArray(const NativeArray& rhs) { - Init(rhs.array_, rhs.size_, rhs.relation_to_source_); - } - - ~NativeArray() { - // Ensures that the user doesn't instantiate NativeArray with a - // const or reference type. - static_cast(StaticAssertTypeEqHelper()); - if (relation_to_source_ == kCopy) - delete[] array_; - } - - // STL-style container methods. - size_t size() const { return size_; } - const_iterator begin() const { return array_; } - const_iterator end() const { return array_ + size_; } - bool operator==(const NativeArray& rhs) const { - return size() == rhs.size() && - ArrayEq(begin(), size(), rhs.begin()); - } - - private: - // Initializes this object; makes a copy of the input array if - // 'relation' is kCopy. - void Init(const Element* array, size_t a_size, RelationToSource relation) { - if (relation == kReference) { - array_ = array; - } else { - Element* const copy = new Element[a_size]; - CopyArray(array, a_size, copy); - array_ = copy; - } - size_ = a_size; - relation_to_source_ = relation; - } - - const Element* array_; - size_t size_; - RelationToSource relation_to_source_; - - GTEST_DISALLOW_ASSIGN_(NativeArray); -}; - -} // namespace internal -} // namespace testing - -#define GTEST_MESSAGE_AT_(file, line, message, result_type) \ - ::testing::internal::AssertHelper(result_type, file, line, message) \ - = ::testing::Message() - -#define GTEST_MESSAGE_(message, result_type) \ - GTEST_MESSAGE_AT_(__FILE__, __LINE__, message, result_type) - -#define GTEST_FATAL_FAILURE_(message) \ - return GTEST_MESSAGE_(message, ::testing::TestPartResult::kFatalFailure) - -#define GTEST_NONFATAL_FAILURE_(message) \ - GTEST_MESSAGE_(message, ::testing::TestPartResult::kNonFatalFailure) - -#define GTEST_SUCCESS_(message) \ - GTEST_MESSAGE_(message, ::testing::TestPartResult::kSuccess) - -// Suppresses MSVC warnings 4072 (unreachable code) for the code following -// statement if it returns or throws (or doesn't return or throw in some -// situations). -#define GTEST_SUPPRESS_UNREACHABLE_CODE_WARNING_BELOW_(statement) \ - if (::testing::internal::AlwaysTrue()) { statement; } - -#define GTEST_TEST_THROW_(statement, expected_exception, fail) \ - GTEST_AMBIGUOUS_ELSE_BLOCKER_ \ - if (::testing::internal::ConstCharPtr gtest_msg = "") { \ - bool gtest_caught_expected = false; \ - try { \ - GTEST_SUPPRESS_UNREACHABLE_CODE_WARNING_BELOW_(statement); \ - } \ - catch (expected_exception const&) { \ - gtest_caught_expected = true; \ - } \ - catch (...) { \ - gtest_msg.value = \ - "Expected: " #statement " throws an exception of type " \ - #expected_exception ".\n Actual: it throws a different type."; \ - goto GTEST_CONCAT_TOKEN_(gtest_label_testthrow_, __LINE__); \ - } \ - if (!gtest_caught_expected) { \ - gtest_msg.value = \ - "Expected: " #statement " throws an exception of type " \ - #expected_exception ".\n Actual: it throws nothing."; \ - goto GTEST_CONCAT_TOKEN_(gtest_label_testthrow_, __LINE__); \ - } \ - } else \ - GTEST_CONCAT_TOKEN_(gtest_label_testthrow_, __LINE__): \ - fail(gtest_msg.value) - -#define GTEST_TEST_NO_THROW_(statement, fail) \ - GTEST_AMBIGUOUS_ELSE_BLOCKER_ \ - if (::testing::internal::AlwaysTrue()) { \ - try { \ - GTEST_SUPPRESS_UNREACHABLE_CODE_WARNING_BELOW_(statement); \ - } \ - catch (...) { \ - goto GTEST_CONCAT_TOKEN_(gtest_label_testnothrow_, __LINE__); \ - } \ - } else \ - GTEST_CONCAT_TOKEN_(gtest_label_testnothrow_, __LINE__): \ - fail("Expected: " #statement " doesn't throw an exception.\n" \ - " Actual: it throws.") - -#define GTEST_TEST_ANY_THROW_(statement, fail) \ - GTEST_AMBIGUOUS_ELSE_BLOCKER_ \ - if (::testing::internal::AlwaysTrue()) { \ - bool gtest_caught_any = false; \ - try { \ - GTEST_SUPPRESS_UNREACHABLE_CODE_WARNING_BELOW_(statement); \ - } \ - catch (...) { \ - gtest_caught_any = true; \ - } \ - if (!gtest_caught_any) { \ - goto GTEST_CONCAT_TOKEN_(gtest_label_testanythrow_, __LINE__); \ - } \ - } else \ - GTEST_CONCAT_TOKEN_(gtest_label_testanythrow_, __LINE__): \ - fail("Expected: " #statement " throws an exception.\n" \ - " Actual: it doesn't.") - - -// Implements Boolean test assertions such as EXPECT_TRUE. expression can be -// either a boolean expression or an AssertionResult. text is a textual -// represenation of expression as it was passed into the EXPECT_TRUE. -#define GTEST_TEST_BOOLEAN_(expression, text, actual, expected, fail) \ - GTEST_AMBIGUOUS_ELSE_BLOCKER_ \ - if (const ::testing::AssertionResult gtest_ar_ = \ - ::testing::AssertionResult(expression)) \ - ; \ - else \ - fail(::testing::internal::GetBoolAssertionFailureMessage(\ - gtest_ar_, text, #actual, #expected).c_str()) - -#define GTEST_TEST_NO_FATAL_FAILURE_(statement, fail) \ - GTEST_AMBIGUOUS_ELSE_BLOCKER_ \ - if (::testing::internal::AlwaysTrue()) { \ - ::testing::internal::HasNewFatalFailureHelper gtest_fatal_failure_checker; \ - GTEST_SUPPRESS_UNREACHABLE_CODE_WARNING_BELOW_(statement); \ - if (gtest_fatal_failure_checker.has_new_fatal_failure()) { \ - goto GTEST_CONCAT_TOKEN_(gtest_label_testnofatal_, __LINE__); \ - } \ - } else \ - GTEST_CONCAT_TOKEN_(gtest_label_testnofatal_, __LINE__): \ - fail("Expected: " #statement " doesn't generate new fatal " \ - "failures in the current thread.\n" \ - " Actual: it does.") - -// Expands to the name of the class that implements the given test. -#define GTEST_TEST_CLASS_NAME_(test_case_name, test_name) \ - test_case_name##_##test_name##_Test - -// Helper macro for defining tests. -#define GTEST_TEST_(test_case_name, test_name, parent_class, parent_id)\ -class GTEST_TEST_CLASS_NAME_(test_case_name, test_name) : public parent_class {\ - public:\ - GTEST_TEST_CLASS_NAME_(test_case_name, test_name)() {}\ - private:\ - virtual void TestBody();\ - static ::testing::TestInfo* const test_info_ GTEST_ATTRIBUTE_UNUSED_;\ - GTEST_DISALLOW_COPY_AND_ASSIGN_(\ - GTEST_TEST_CLASS_NAME_(test_case_name, test_name));\ -};\ -\ -::testing::TestInfo* const GTEST_TEST_CLASS_NAME_(test_case_name, test_name)\ - ::test_info_ =\ - ::testing::internal::MakeAndRegisterTestInfo(\ - #test_case_name, #test_name, NULL, NULL, \ - (parent_id), \ - parent_class::SetUpTestCase, \ - parent_class::TearDownTestCase, \ - new ::testing::internal::TestFactoryImpl<\ - GTEST_TEST_CLASS_NAME_(test_case_name, test_name)>);\ -void GTEST_TEST_CLASS_NAME_(test_case_name, test_name)::TestBody() - -#endif // GTEST_INCLUDE_GTEST_INTERNAL_GTEST_INTERNAL_H_ -// Copyright 2005, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: wan@google.com (Zhanyong Wan) -// -// The Google C++ Testing Framework (Google Test) -// -// This header file defines the public API for death tests. It is -// #included by gtest.h so a user doesn't need to include this -// directly. - -#ifndef GTEST_INCLUDE_GTEST_GTEST_DEATH_TEST_H_ -#define GTEST_INCLUDE_GTEST_GTEST_DEATH_TEST_H_ - -// Copyright 2005, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Authors: wan@google.com (Zhanyong Wan), eefacm@gmail.com (Sean Mcafee) -// -// The Google C++ Testing Framework (Google Test) -// -// This header file defines internal utilities needed for implementing -// death tests. They are subject to change without notice. - -#ifndef GTEST_INCLUDE_GTEST_INTERNAL_GTEST_DEATH_TEST_INTERNAL_H_ -#define GTEST_INCLUDE_GTEST_INTERNAL_GTEST_DEATH_TEST_INTERNAL_H_ - - -#include - -namespace testing { -namespace internal { - -GTEST_DECLARE_string_(internal_run_death_test); - -// Names of the flags (needed for parsing Google Test flags). -const char kDeathTestStyleFlag[] = "death_test_style"; -const char kDeathTestUseFork[] = "death_test_use_fork"; -const char kInternalRunDeathTestFlag[] = "internal_run_death_test"; - -#if GTEST_HAS_DEATH_TEST - -// DeathTest is a class that hides much of the complexity of the -// GTEST_DEATH_TEST_ macro. It is abstract; its static Create method -// returns a concrete class that depends on the prevailing death test -// style, as defined by the --gtest_death_test_style and/or -// --gtest_internal_run_death_test flags. - -// In describing the results of death tests, these terms are used with -// the corresponding definitions: -// -// exit status: The integer exit information in the format specified -// by wait(2) -// exit code: The integer code passed to exit(3), _exit(2), or -// returned from main() -class GTEST_API_ DeathTest { - public: - // Create returns false if there was an error determining the - // appropriate action to take for the current death test; for example, - // if the gtest_death_test_style flag is set to an invalid value. - // The LastMessage method will return a more detailed message in that - // case. Otherwise, the DeathTest pointer pointed to by the "test" - // argument is set. If the death test should be skipped, the pointer - // is set to NULL; otherwise, it is set to the address of a new concrete - // DeathTest object that controls the execution of the current test. - static bool Create(const char* statement, const RE* regex, - const char* file, int line, DeathTest** test); - DeathTest(); - virtual ~DeathTest() { } - - // A helper class that aborts a death test when it's deleted. - class ReturnSentinel { - public: - explicit ReturnSentinel(DeathTest* test) : test_(test) { } - ~ReturnSentinel() { test_->Abort(TEST_ENCOUNTERED_RETURN_STATEMENT); } - private: - DeathTest* const test_; - GTEST_DISALLOW_COPY_AND_ASSIGN_(ReturnSentinel); - } GTEST_ATTRIBUTE_UNUSED_; - - // An enumeration of possible roles that may be taken when a death - // test is encountered. EXECUTE means that the death test logic should - // be executed immediately. OVERSEE means that the program should prepare - // the appropriate environment for a child process to execute the death - // test, then wait for it to complete. - enum TestRole { OVERSEE_TEST, EXECUTE_TEST }; - - // An enumeration of the three reasons that a test might be aborted. - enum AbortReason { - TEST_ENCOUNTERED_RETURN_STATEMENT, - TEST_THREW_EXCEPTION, - TEST_DID_NOT_DIE - }; - - // Assumes one of the above roles. - virtual TestRole AssumeRole() = 0; - - // Waits for the death test to finish and returns its status. - virtual int Wait() = 0; - - // Returns true if the death test passed; that is, the test process - // exited during the test, its exit status matches a user-supplied - // predicate, and its stderr output matches a user-supplied regular - // expression. - // The user-supplied predicate may be a macro expression rather - // than a function pointer or functor, or else Wait and Passed could - // be combined. - virtual bool Passed(bool exit_status_ok) = 0; - - // Signals that the death test did not die as expected. - virtual void Abort(AbortReason reason) = 0; - - // Returns a human-readable outcome message regarding the outcome of - // the last death test. - static const char* LastMessage(); - - static void set_last_death_test_message(const std::string& message); - - private: - // A string containing a description of the outcome of the last death test. - static std::string last_death_test_message_; - - GTEST_DISALLOW_COPY_AND_ASSIGN_(DeathTest); -}; - -// Factory interface for death tests. May be mocked out for testing. -class DeathTestFactory { - public: - virtual ~DeathTestFactory() { } - virtual bool Create(const char* statement, const RE* regex, - const char* file, int line, DeathTest** test) = 0; -}; - -// A concrete DeathTestFactory implementation for normal use. -class DefaultDeathTestFactory : public DeathTestFactory { - public: - virtual bool Create(const char* statement, const RE* regex, - const char* file, int line, DeathTest** test); -}; - -// Returns true if exit_status describes a process that was terminated -// by a signal, or exited normally with a nonzero exit code. -GTEST_API_ bool ExitedUnsuccessfully(int exit_status); - -// Traps C++ exceptions escaping statement and reports them as test -// failures. Note that trapping SEH exceptions is not implemented here. -# if GTEST_HAS_EXCEPTIONS -# define GTEST_EXECUTE_DEATH_TEST_STATEMENT_(statement, death_test) \ - try { \ - GTEST_SUPPRESS_UNREACHABLE_CODE_WARNING_BELOW_(statement); \ - } catch (const ::std::exception& gtest_exception) { \ - fprintf(\ - stderr, \ - "\n%s: Caught std::exception-derived exception escaping the " \ - "death test statement. Exception message: %s\n", \ - ::testing::internal::FormatFileLocation(__FILE__, __LINE__).c_str(), \ - gtest_exception.what()); \ - fflush(stderr); \ - death_test->Abort(::testing::internal::DeathTest::TEST_THREW_EXCEPTION); \ - } catch (...) { \ - death_test->Abort(::testing::internal::DeathTest::TEST_THREW_EXCEPTION); \ - } - -# else -# define GTEST_EXECUTE_DEATH_TEST_STATEMENT_(statement, death_test) \ - GTEST_SUPPRESS_UNREACHABLE_CODE_WARNING_BELOW_(statement) - -# endif - -// This macro is for implementing ASSERT_DEATH*, EXPECT_DEATH*, -// ASSERT_EXIT*, and EXPECT_EXIT*. -# define GTEST_DEATH_TEST_(statement, predicate, regex, fail) \ - GTEST_AMBIGUOUS_ELSE_BLOCKER_ \ - if (::testing::internal::AlwaysTrue()) { \ - const ::testing::internal::RE& gtest_regex = (regex); \ - ::testing::internal::DeathTest* gtest_dt; \ - if (!::testing::internal::DeathTest::Create(#statement, >est_regex, \ - __FILE__, __LINE__, >est_dt)) { \ - goto GTEST_CONCAT_TOKEN_(gtest_label_, __LINE__); \ - } \ - if (gtest_dt != NULL) { \ - ::testing::internal::scoped_ptr< ::testing::internal::DeathTest> \ - gtest_dt_ptr(gtest_dt); \ - switch (gtest_dt->AssumeRole()) { \ - case ::testing::internal::DeathTest::OVERSEE_TEST: \ - if (!gtest_dt->Passed(predicate(gtest_dt->Wait()))) { \ - goto GTEST_CONCAT_TOKEN_(gtest_label_, __LINE__); \ - } \ - break; \ - case ::testing::internal::DeathTest::EXECUTE_TEST: { \ - ::testing::internal::DeathTest::ReturnSentinel \ - gtest_sentinel(gtest_dt); \ - GTEST_EXECUTE_DEATH_TEST_STATEMENT_(statement, gtest_dt); \ - gtest_dt->Abort(::testing::internal::DeathTest::TEST_DID_NOT_DIE); \ - break; \ - } \ - default: \ - break; \ - } \ - } \ - } else \ - GTEST_CONCAT_TOKEN_(gtest_label_, __LINE__): \ - fail(::testing::internal::DeathTest::LastMessage()) -// The symbol "fail" here expands to something into which a message -// can be streamed. - -// This macro is for implementing ASSERT/EXPECT_DEBUG_DEATH when compiled in -// NDEBUG mode. In this case we need the statements to be executed, the regex is -// ignored, and the macro must accept a streamed message even though the message -// is never printed. -# define GTEST_EXECUTE_STATEMENT_(statement, regex) \ - GTEST_AMBIGUOUS_ELSE_BLOCKER_ \ - if (::testing::internal::AlwaysTrue()) { \ - GTEST_SUPPRESS_UNREACHABLE_CODE_WARNING_BELOW_(statement); \ - } else \ - ::testing::Message() - -// A class representing the parsed contents of the -// --gtest_internal_run_death_test flag, as it existed when -// RUN_ALL_TESTS was called. -class InternalRunDeathTestFlag { - public: - InternalRunDeathTestFlag(const std::string& a_file, - int a_line, - int an_index, - int a_write_fd) - : file_(a_file), line_(a_line), index_(an_index), - write_fd_(a_write_fd) {} - - ~InternalRunDeathTestFlag() { - if (write_fd_ >= 0) - posix::Close(write_fd_); - } - - const std::string& file() const { return file_; } - int line() const { return line_; } - int index() const { return index_; } - int write_fd() const { return write_fd_; } - - private: - std::string file_; - int line_; - int index_; - int write_fd_; - - GTEST_DISALLOW_COPY_AND_ASSIGN_(InternalRunDeathTestFlag); -}; - -// Returns a newly created InternalRunDeathTestFlag object with fields -// initialized from the GTEST_FLAG(internal_run_death_test) flag if -// the flag is specified; otherwise returns NULL. -InternalRunDeathTestFlag* ParseInternalRunDeathTestFlag(); - -#else // GTEST_HAS_DEATH_TEST - -// This macro is used for implementing macros such as -// EXPECT_DEATH_IF_SUPPORTED and ASSERT_DEATH_IF_SUPPORTED on systems where -// death tests are not supported. Those macros must compile on such systems -// iff EXPECT_DEATH and ASSERT_DEATH compile with the same parameters on -// systems that support death tests. This allows one to write such a macro -// on a system that does not support death tests and be sure that it will -// compile on a death-test supporting system. -// -// Parameters: -// statement - A statement that a macro such as EXPECT_DEATH would test -// for program termination. This macro has to make sure this -// statement is compiled but not executed, to ensure that -// EXPECT_DEATH_IF_SUPPORTED compiles with a certain -// parameter iff EXPECT_DEATH compiles with it. -// regex - A regex that a macro such as EXPECT_DEATH would use to test -// the output of statement. This parameter has to be -// compiled but not evaluated by this macro, to ensure that -// this macro only accepts expressions that a macro such as -// EXPECT_DEATH would accept. -// terminator - Must be an empty statement for EXPECT_DEATH_IF_SUPPORTED -// and a return statement for ASSERT_DEATH_IF_SUPPORTED. -// This ensures that ASSERT_DEATH_IF_SUPPORTED will not -// compile inside functions where ASSERT_DEATH doesn't -// compile. -// -// The branch that has an always false condition is used to ensure that -// statement and regex are compiled (and thus syntactically correct) but -// never executed. The unreachable code macro protects the terminator -// statement from generating an 'unreachable code' warning in case -// statement unconditionally returns or throws. The Message constructor at -// the end allows the syntax of streaming additional messages into the -// macro, for compilational compatibility with EXPECT_DEATH/ASSERT_DEATH. -# define GTEST_UNSUPPORTED_DEATH_TEST_(statement, regex, terminator) \ - GTEST_AMBIGUOUS_ELSE_BLOCKER_ \ - if (::testing::internal::AlwaysTrue()) { \ - GTEST_LOG_(WARNING) \ - << "Death tests are not supported on this platform.\n" \ - << "Statement '" #statement "' cannot be verified."; \ - } else if (::testing::internal::AlwaysFalse()) { \ - ::testing::internal::RE::PartialMatch(".*", (regex)); \ - GTEST_SUPPRESS_UNREACHABLE_CODE_WARNING_BELOW_(statement); \ - terminator; \ - } else \ - ::testing::Message() - -#endif // GTEST_HAS_DEATH_TEST - -} // namespace internal -} // namespace testing - -#endif // GTEST_INCLUDE_GTEST_INTERNAL_GTEST_DEATH_TEST_INTERNAL_H_ - -namespace testing { - -// This flag controls the style of death tests. Valid values are "threadsafe", -// meaning that the death test child process will re-execute the test binary -// from the start, running only a single death test, or "fast", -// meaning that the child process will execute the test logic immediately -// after forking. -GTEST_DECLARE_string_(death_test_style); - -#if GTEST_HAS_DEATH_TEST - -namespace internal { - -// Returns a Boolean value indicating whether the caller is currently -// executing in the context of the death test child process. Tools such as -// Valgrind heap checkers may need this to modify their behavior in death -// tests. IMPORTANT: This is an internal utility. Using it may break the -// implementation of death tests. User code MUST NOT use it. -GTEST_API_ bool InDeathTestChild(); - -} // namespace internal - -// The following macros are useful for writing death tests. - -// Here's what happens when an ASSERT_DEATH* or EXPECT_DEATH* is -// executed: -// -// 1. It generates a warning if there is more than one active -// thread. This is because it's safe to fork() or clone() only -// when there is a single thread. -// -// 2. The parent process clone()s a sub-process and runs the death -// test in it; the sub-process exits with code 0 at the end of the -// death test, if it hasn't exited already. -// -// 3. The parent process waits for the sub-process to terminate. -// -// 4. The parent process checks the exit code and error message of -// the sub-process. -// -// Examples: -// -// ASSERT_DEATH(server.SendMessage(56, "Hello"), "Invalid port number"); -// for (int i = 0; i < 5; i++) { -// EXPECT_DEATH(server.ProcessRequest(i), -// "Invalid request .* in ProcessRequest()") -// << "Failed to die on request " << i; -// } -// -// ASSERT_EXIT(server.ExitNow(), ::testing::ExitedWithCode(0), "Exiting"); -// -// bool KilledBySIGHUP(int exit_code) { -// return WIFSIGNALED(exit_code) && WTERMSIG(exit_code) == SIGHUP; -// } -// -// ASSERT_EXIT(client.HangUpServer(), KilledBySIGHUP, "Hanging up!"); -// -// On the regular expressions used in death tests: -// -// On POSIX-compliant systems (*nix), we use the library, -// which uses the POSIX extended regex syntax. -// -// On other platforms (e.g. Windows), we only support a simple regex -// syntax implemented as part of Google Test. This limited -// implementation should be enough most of the time when writing -// death tests; though it lacks many features you can find in PCRE -// or POSIX extended regex syntax. For example, we don't support -// union ("x|y"), grouping ("(xy)"), brackets ("[xy]"), and -// repetition count ("x{5,7}"), among others. -// -// Below is the syntax that we do support. We chose it to be a -// subset of both PCRE and POSIX extended regex, so it's easy to -// learn wherever you come from. In the following: 'A' denotes a -// literal character, period (.), or a single \\ escape sequence; -// 'x' and 'y' denote regular expressions; 'm' and 'n' are for -// natural numbers. -// -// c matches any literal character c -// \\d matches any decimal digit -// \\D matches any character that's not a decimal digit -// \\f matches \f -// \\n matches \n -// \\r matches \r -// \\s matches any ASCII whitespace, including \n -// \\S matches any character that's not a whitespace -// \\t matches \t -// \\v matches \v -// \\w matches any letter, _, or decimal digit -// \\W matches any character that \\w doesn't match -// \\c matches any literal character c, which must be a punctuation -// . matches any single character except \n -// A? matches 0 or 1 occurrences of A -// A* matches 0 or many occurrences of A -// A+ matches 1 or many occurrences of A -// ^ matches the beginning of a string (not that of each line) -// $ matches the end of a string (not that of each line) -// xy matches x followed by y -// -// If you accidentally use PCRE or POSIX extended regex features -// not implemented by us, you will get a run-time failure. In that -// case, please try to rewrite your regular expression within the -// above syntax. -// -// This implementation is *not* meant to be as highly tuned or robust -// as a compiled regex library, but should perform well enough for a -// death test, which already incurs significant overhead by launching -// a child process. -// -// Known caveats: -// -// A "threadsafe" style death test obtains the path to the test -// program from argv[0] and re-executes it in the sub-process. For -// simplicity, the current implementation doesn't search the PATH -// when launching the sub-process. This means that the user must -// invoke the test program via a path that contains at least one -// path separator (e.g. path/to/foo_test and -// /absolute/path/to/bar_test are fine, but foo_test is not). This -// is rarely a problem as people usually don't put the test binary -// directory in PATH. -// -// TODO(wan@google.com): make thread-safe death tests search the PATH. - -// Asserts that a given statement causes the program to exit, with an -// integer exit status that satisfies predicate, and emitting error output -// that matches regex. -# define ASSERT_EXIT(statement, predicate, regex) \ - GTEST_DEATH_TEST_(statement, predicate, regex, GTEST_FATAL_FAILURE_) - -// Like ASSERT_EXIT, but continues on to successive tests in the -// test case, if any: -# define EXPECT_EXIT(statement, predicate, regex) \ - GTEST_DEATH_TEST_(statement, predicate, regex, GTEST_NONFATAL_FAILURE_) - -// Asserts that a given statement causes the program to exit, either by -// explicitly exiting with a nonzero exit code or being killed by a -// signal, and emitting error output that matches regex. -# define ASSERT_DEATH(statement, regex) \ - ASSERT_EXIT(statement, ::testing::internal::ExitedUnsuccessfully, regex) - -// Like ASSERT_DEATH, but continues on to successive tests in the -// test case, if any: -# define EXPECT_DEATH(statement, regex) \ - EXPECT_EXIT(statement, ::testing::internal::ExitedUnsuccessfully, regex) - -// Two predicate classes that can be used in {ASSERT,EXPECT}_EXIT*: - -// Tests that an exit code describes a normal exit with a given exit code. -class GTEST_API_ ExitedWithCode { - public: - explicit ExitedWithCode(int exit_code); - bool operator()(int exit_status) const; - private: - // No implementation - assignment is unsupported. - void operator=(const ExitedWithCode& other); - - const int exit_code_; -}; - -# if !GTEST_OS_WINDOWS -// Tests that an exit code describes an exit due to termination by a -// given signal. -class GTEST_API_ KilledBySignal { - public: - explicit KilledBySignal(int signum); - bool operator()(int exit_status) const; - private: - const int signum_; -}; -# endif // !GTEST_OS_WINDOWS - -// EXPECT_DEBUG_DEATH asserts that the given statements die in debug mode. -// The death testing framework causes this to have interesting semantics, -// since the sideeffects of the call are only visible in opt mode, and not -// in debug mode. -// -// In practice, this can be used to test functions that utilize the -// LOG(DFATAL) macro using the following style: -// -// int DieInDebugOr12(int* sideeffect) { -// if (sideeffect) { -// *sideeffect = 12; -// } -// LOG(DFATAL) << "death"; -// return 12; -// } -// -// TEST(TestCase, TestDieOr12WorksInDgbAndOpt) { -// int sideeffect = 0; -// // Only asserts in dbg. -// EXPECT_DEBUG_DEATH(DieInDebugOr12(&sideeffect), "death"); -// -// #ifdef NDEBUG -// // opt-mode has sideeffect visible. -// EXPECT_EQ(12, sideeffect); -// #else -// // dbg-mode no visible sideeffect. -// EXPECT_EQ(0, sideeffect); -// #endif -// } -// -// This will assert that DieInDebugReturn12InOpt() crashes in debug -// mode, usually due to a DCHECK or LOG(DFATAL), but returns the -// appropriate fallback value (12 in this case) in opt mode. If you -// need to test that a function has appropriate side-effects in opt -// mode, include assertions against the side-effects. A general -// pattern for this is: -// -// EXPECT_DEBUG_DEATH({ -// // Side-effects here will have an effect after this statement in -// // opt mode, but none in debug mode. -// EXPECT_EQ(12, DieInDebugOr12(&sideeffect)); -// }, "death"); -// -# ifdef NDEBUG - -# define EXPECT_DEBUG_DEATH(statement, regex) \ - GTEST_EXECUTE_STATEMENT_(statement, regex) - -# define ASSERT_DEBUG_DEATH(statement, regex) \ - GTEST_EXECUTE_STATEMENT_(statement, regex) - -# else - -# define EXPECT_DEBUG_DEATH(statement, regex) \ - EXPECT_DEATH(statement, regex) - -# define ASSERT_DEBUG_DEATH(statement, regex) \ - ASSERT_DEATH(statement, regex) - -# endif // NDEBUG for EXPECT_DEBUG_DEATH -#endif // GTEST_HAS_DEATH_TEST - -// EXPECT_DEATH_IF_SUPPORTED(statement, regex) and -// ASSERT_DEATH_IF_SUPPORTED(statement, regex) expand to real death tests if -// death tests are supported; otherwise they just issue a warning. This is -// useful when you are combining death test assertions with normal test -// assertions in one test. -#if GTEST_HAS_DEATH_TEST -# define EXPECT_DEATH_IF_SUPPORTED(statement, regex) \ - EXPECT_DEATH(statement, regex) -# define ASSERT_DEATH_IF_SUPPORTED(statement, regex) \ - ASSERT_DEATH(statement, regex) -#else -# define EXPECT_DEATH_IF_SUPPORTED(statement, regex) \ - GTEST_UNSUPPORTED_DEATH_TEST_(statement, regex, ) -# define ASSERT_DEATH_IF_SUPPORTED(statement, regex) \ - GTEST_UNSUPPORTED_DEATH_TEST_(statement, regex, return) -#endif - -} // namespace testing - -#endif // GTEST_INCLUDE_GTEST_GTEST_DEATH_TEST_H_ -// This file was GENERATED by command: -// pump.py gtest-param-test.h.pump -// DO NOT EDIT BY HAND!!! - -// Copyright 2008, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Authors: vladl@google.com (Vlad Losev) -// -// Macros and functions for implementing parameterized tests -// in Google C++ Testing Framework (Google Test) -// -// This file is generated by a SCRIPT. DO NOT EDIT BY HAND! -// -#ifndef GTEST_INCLUDE_GTEST_GTEST_PARAM_TEST_H_ -#define GTEST_INCLUDE_GTEST_GTEST_PARAM_TEST_H_ - - -// Value-parameterized tests allow you to test your code with different -// parameters without writing multiple copies of the same test. -// -// Here is how you use value-parameterized tests: - -#if 0 - -// To write value-parameterized tests, first you should define a fixture -// class. It is usually derived from testing::TestWithParam (see below for -// another inheritance scheme that's sometimes useful in more complicated -// class hierarchies), where the type of your parameter values. -// TestWithParam is itself derived from testing::Test. T can be any -// copyable type. If it's a raw pointer, you are responsible for managing the -// lifespan of the pointed values. - -class FooTest : public ::testing::TestWithParam { - // You can implement all the usual class fixture members here. -}; - -// Then, use the TEST_P macro to define as many parameterized tests -// for this fixture as you want. The _P suffix is for "parameterized" -// or "pattern", whichever you prefer to think. - -TEST_P(FooTest, DoesBlah) { - // Inside a test, access the test parameter with the GetParam() method - // of the TestWithParam class: - EXPECT_TRUE(foo.Blah(GetParam())); - ... -} - -TEST_P(FooTest, HasBlahBlah) { - ... -} - -// Finally, you can use INSTANTIATE_TEST_CASE_P to instantiate the test -// case with any set of parameters you want. Google Test defines a number -// of functions for generating test parameters. They return what we call -// (surprise!) parameter generators. Here is a summary of them, which -// are all in the testing namespace: -// -// -// Range(begin, end [, step]) - Yields values {begin, begin+step, -// begin+step+step, ...}. The values do not -// include end. step defaults to 1. -// Values(v1, v2, ..., vN) - Yields values {v1, v2, ..., vN}. -// ValuesIn(container) - Yields values from a C-style array, an STL -// ValuesIn(begin,end) container, or an iterator range [begin, end). -// Bool() - Yields sequence {false, true}. -// Combine(g1, g2, ..., gN) - Yields all combinations (the Cartesian product -// for the math savvy) of the values generated -// by the N generators. -// -// For more details, see comments at the definitions of these functions below -// in this file. -// -// The following statement will instantiate tests from the FooTest test case -// each with parameter values "meeny", "miny", and "moe". - -INSTANTIATE_TEST_CASE_P(InstantiationName, - FooTest, - Values("meeny", "miny", "moe")); - -// To distinguish different instances of the pattern, (yes, you -// can instantiate it more then once) the first argument to the -// INSTANTIATE_TEST_CASE_P macro is a prefix that will be added to the -// actual test case name. Remember to pick unique prefixes for different -// instantiations. The tests from the instantiation above will have -// these names: -// -// * InstantiationName/FooTest.DoesBlah/0 for "meeny" -// * InstantiationName/FooTest.DoesBlah/1 for "miny" -// * InstantiationName/FooTest.DoesBlah/2 for "moe" -// * InstantiationName/FooTest.HasBlahBlah/0 for "meeny" -// * InstantiationName/FooTest.HasBlahBlah/1 for "miny" -// * InstantiationName/FooTest.HasBlahBlah/2 for "moe" -// -// You can use these names in --gtest_filter. -// -// This statement will instantiate all tests from FooTest again, each -// with parameter values "cat" and "dog": - -const char* pets[] = {"cat", "dog"}; -INSTANTIATE_TEST_CASE_P(AnotherInstantiationName, FooTest, ValuesIn(pets)); - -// The tests from the instantiation above will have these names: -// -// * AnotherInstantiationName/FooTest.DoesBlah/0 for "cat" -// * AnotherInstantiationName/FooTest.DoesBlah/1 for "dog" -// * AnotherInstantiationName/FooTest.HasBlahBlah/0 for "cat" -// * AnotherInstantiationName/FooTest.HasBlahBlah/1 for "dog" -// -// Please note that INSTANTIATE_TEST_CASE_P will instantiate all tests -// in the given test case, whether their definitions come before or -// AFTER the INSTANTIATE_TEST_CASE_P statement. -// -// Please also note that generator expressions (including parameters to the -// generators) are evaluated in InitGoogleTest(), after main() has started. -// This allows the user on one hand, to adjust generator parameters in order -// to dynamically determine a set of tests to run and on the other hand, -// give the user a chance to inspect the generated tests with Google Test -// reflection API before RUN_ALL_TESTS() is executed. -// -// You can see samples/sample7_unittest.cc and samples/sample8_unittest.cc -// for more examples. -// -// In the future, we plan to publish the API for defining new parameter -// generators. But for now this interface remains part of the internal -// implementation and is subject to change. -// -// -// A parameterized test fixture must be derived from testing::Test and from -// testing::WithParamInterface, where T is the type of the parameter -// values. Inheriting from TestWithParam satisfies that requirement because -// TestWithParam inherits from both Test and WithParamInterface. In more -// complicated hierarchies, however, it is occasionally useful to inherit -// separately from Test and WithParamInterface. For example: - -class BaseTest : public ::testing::Test { - // You can inherit all the usual members for a non-parameterized test - // fixture here. -}; - -class DerivedTest : public BaseTest, public ::testing::WithParamInterface { - // The usual test fixture members go here too. -}; - -TEST_F(BaseTest, HasFoo) { - // This is an ordinary non-parameterized test. -} - -TEST_P(DerivedTest, DoesBlah) { - // GetParam works just the same here as if you inherit from TestWithParam. - EXPECT_TRUE(foo.Blah(GetParam())); -} - -#endif // 0 - - -#if !GTEST_OS_SYMBIAN -# include -#endif - -// scripts/fuse_gtest.py depends on gtest's own header being #included -// *unconditionally*. Therefore these #includes cannot be moved -// inside #if GTEST_HAS_PARAM_TEST. -// Copyright 2008 Google Inc. -// All Rights Reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: vladl@google.com (Vlad Losev) - -// Type and function utilities for implementing parameterized tests. - -#ifndef GTEST_INCLUDE_GTEST_INTERNAL_GTEST_PARAM_UTIL_H_ -#define GTEST_INCLUDE_GTEST_INTERNAL_GTEST_PARAM_UTIL_H_ - -#include -#include -#include - -// scripts/fuse_gtest.py depends on gtest's own header being #included -// *unconditionally*. Therefore these #includes cannot be moved -// inside #if GTEST_HAS_PARAM_TEST. -// Copyright 2003 Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Authors: Dan Egnor (egnor@google.com) -// -// A "smart" pointer type with reference tracking. Every pointer to a -// particular object is kept on a circular linked list. When the last pointer -// to an object is destroyed or reassigned, the object is deleted. -// -// Used properly, this deletes the object when the last reference goes away. -// There are several caveats: -// - Like all reference counting schemes, cycles lead to leaks. -// - Each smart pointer is actually two pointers (8 bytes instead of 4). -// - Every time a pointer is assigned, the entire list of pointers to that -// object is traversed. This class is therefore NOT SUITABLE when there -// will often be more than two or three pointers to a particular object. -// - References are only tracked as long as linked_ptr<> objects are copied. -// If a linked_ptr<> is converted to a raw pointer and back, BAD THINGS -// will happen (double deletion). -// -// A good use of this class is storing object references in STL containers. -// You can safely put linked_ptr<> in a vector<>. -// Other uses may not be as good. -// -// Note: If you use an incomplete type with linked_ptr<>, the class -// *containing* linked_ptr<> must have a constructor and destructor (even -// if they do nothing!). -// -// Bill Gibbons suggested we use something like this. -// -// Thread Safety: -// Unlike other linked_ptr implementations, in this implementation -// a linked_ptr object is thread-safe in the sense that: -// - it's safe to copy linked_ptr objects concurrently, -// - it's safe to copy *from* a linked_ptr and read its underlying -// raw pointer (e.g. via get()) concurrently, and -// - it's safe to write to two linked_ptrs that point to the same -// shared object concurrently. -// TODO(wan@google.com): rename this to safe_linked_ptr to avoid -// confusion with normal linked_ptr. - -#ifndef GTEST_INCLUDE_GTEST_INTERNAL_GTEST_LINKED_PTR_H_ -#define GTEST_INCLUDE_GTEST_INTERNAL_GTEST_LINKED_PTR_H_ - -#include -#include - - -namespace testing { -namespace internal { - -// Protects copying of all linked_ptr objects. -GTEST_API_ GTEST_DECLARE_STATIC_MUTEX_(g_linked_ptr_mutex); - -// This is used internally by all instances of linked_ptr<>. It needs to be -// a non-template class because different types of linked_ptr<> can refer to -// the same object (linked_ptr(obj) vs linked_ptr(obj)). -// So, it needs to be possible for different types of linked_ptr to participate -// in the same circular linked list, so we need a single class type here. -// -// DO NOT USE THIS CLASS DIRECTLY YOURSELF. Use linked_ptr. -class linked_ptr_internal { - public: - // Create a new circle that includes only this instance. - void join_new() { - next_ = this; - } - - // Many linked_ptr operations may change p.link_ for some linked_ptr - // variable p in the same circle as this object. Therefore we need - // to prevent two such operations from occurring concurrently. - // - // Note that different types of linked_ptr objects can coexist in a - // circle (e.g. linked_ptr, linked_ptr, and - // linked_ptr). Therefore we must use a single mutex to - // protect all linked_ptr objects. This can create serious - // contention in production code, but is acceptable in a testing - // framework. - - // Join an existing circle. - void join(linked_ptr_internal const* ptr) - GTEST_LOCK_EXCLUDED_(g_linked_ptr_mutex) { - MutexLock lock(&g_linked_ptr_mutex); - - linked_ptr_internal const* p = ptr; - while (p->next_ != ptr) p = p->next_; - p->next_ = this; - next_ = ptr; - } - - // Leave whatever circle we're part of. Returns true if we were the - // last member of the circle. Once this is done, you can join() another. - bool depart() - GTEST_LOCK_EXCLUDED_(g_linked_ptr_mutex) { - MutexLock lock(&g_linked_ptr_mutex); - - if (next_ == this) return true; - linked_ptr_internal const* p = next_; - while (p->next_ != this) p = p->next_; - p->next_ = next_; - return false; - } - - private: - mutable linked_ptr_internal const* next_; -}; - -template -class linked_ptr { - public: - typedef T element_type; - - // Take over ownership of a raw pointer. This should happen as soon as - // possible after the object is created. - explicit linked_ptr(T* ptr = NULL) { capture(ptr); } - ~linked_ptr() { depart(); } - - // Copy an existing linked_ptr<>, adding ourselves to the list of references. - template linked_ptr(linked_ptr const& ptr) { copy(&ptr); } - linked_ptr(linked_ptr const& ptr) { // NOLINT - assert(&ptr != this); - copy(&ptr); - } - - // Assignment releases the old value and acquires the new. - template linked_ptr& operator=(linked_ptr const& ptr) { - depart(); - copy(&ptr); - return *this; - } - - linked_ptr& operator=(linked_ptr const& ptr) { - if (&ptr != this) { - depart(); - copy(&ptr); - } - return *this; - } - - // Smart pointer members. - void reset(T* ptr = NULL) { - depart(); - capture(ptr); - } - T* get() const { return value_; } - T* operator->() const { return value_; } - T& operator*() const { return *value_; } - - bool operator==(T* p) const { return value_ == p; } - bool operator!=(T* p) const { return value_ != p; } - template - bool operator==(linked_ptr const& ptr) const { - return value_ == ptr.get(); - } - template - bool operator!=(linked_ptr const& ptr) const { - return value_ != ptr.get(); - } - - private: - template - friend class linked_ptr; - - T* value_; - linked_ptr_internal link_; - - void depart() { - if (link_.depart()) delete value_; - } - - void capture(T* ptr) { - value_ = ptr; - link_.join_new(); - } - - template void copy(linked_ptr const* ptr) { - value_ = ptr->get(); - if (value_) - link_.join(&ptr->link_); - else - link_.join_new(); - } -}; - -template inline -bool operator==(T* ptr, const linked_ptr& x) { - return ptr == x.get(); -} - -template inline -bool operator!=(T* ptr, const linked_ptr& x) { - return ptr != x.get(); -} - -// A function to convert T* into linked_ptr -// Doing e.g. make_linked_ptr(new FooBarBaz(arg)) is a shorter notation -// for linked_ptr >(new FooBarBaz(arg)) -template -linked_ptr make_linked_ptr(T* ptr) { - return linked_ptr(ptr); -} - -} // namespace internal -} // namespace testing - -#endif // GTEST_INCLUDE_GTEST_INTERNAL_GTEST_LINKED_PTR_H_ -// Copyright 2007, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: wan@google.com (Zhanyong Wan) - -// Google Test - The Google C++ Testing Framework -// -// This file implements a universal value printer that can print a -// value of any type T: -// -// void ::testing::internal::UniversalPrinter::Print(value, ostream_ptr); -// -// A user can teach this function how to print a class type T by -// defining either operator<<() or PrintTo() in the namespace that -// defines T. More specifically, the FIRST defined function in the -// following list will be used (assuming T is defined in namespace -// foo): -// -// 1. foo::PrintTo(const T&, ostream*) -// 2. operator<<(ostream&, const T&) defined in either foo or the -// global namespace. -// -// If none of the above is defined, it will print the debug string of -// the value if it is a protocol buffer, or print the raw bytes in the -// value otherwise. -// -// To aid debugging: when T is a reference type, the address of the -// value is also printed; when T is a (const) char pointer, both the -// pointer value and the NUL-terminated string it points to are -// printed. -// -// We also provide some convenient wrappers: -// -// // Prints a value to a string. For a (const or not) char -// // pointer, the NUL-terminated string (but not the pointer) is -// // printed. -// std::string ::testing::PrintToString(const T& value); -// -// // Prints a value tersely: for a reference type, the referenced -// // value (but not the address) is printed; for a (const or not) char -// // pointer, the NUL-terminated string (but not the pointer) is -// // printed. -// void ::testing::internal::UniversalTersePrint(const T& value, ostream*); -// -// // Prints value using the type inferred by the compiler. The difference -// // from UniversalTersePrint() is that this function prints both the -// // pointer and the NUL-terminated string for a (const or not) char pointer. -// void ::testing::internal::UniversalPrint(const T& value, ostream*); -// -// // Prints the fields of a tuple tersely to a string vector, one -// // element for each field. Tuple support must be enabled in -// // gtest-port.h. -// std::vector UniversalTersePrintTupleFieldsToStrings( -// const Tuple& value); -// -// Known limitation: -// -// The print primitives print the elements of an STL-style container -// using the compiler-inferred type of *iter where iter is a -// const_iterator of the container. When const_iterator is an input -// iterator but not a forward iterator, this inferred type may not -// match value_type, and the print output may be incorrect. In -// practice, this is rarely a problem as for most containers -// const_iterator is a forward iterator. We'll fix this if there's an -// actual need for it. Note that this fix cannot rely on value_type -// being defined as many user-defined container types don't have -// value_type. - -#ifndef GTEST_INCLUDE_GTEST_GTEST_PRINTERS_H_ -#define GTEST_INCLUDE_GTEST_GTEST_PRINTERS_H_ - -#include // NOLINT -#include -#include -#include -#include - -namespace testing { - -// Definitions in the 'internal' and 'internal2' name spaces are -// subject to change without notice. DO NOT USE THEM IN USER CODE! -namespace internal2 { - -// Prints the given number of bytes in the given object to the given -// ostream. -GTEST_API_ void PrintBytesInObjectTo(const unsigned char* obj_bytes, - size_t count, - ::std::ostream* os); - -// For selecting which printer to use when a given type has neither << -// nor PrintTo(). -enum TypeKind { - kProtobuf, // a protobuf type - kConvertibleToInteger, // a type implicitly convertible to BiggestInt - // (e.g. a named or unnamed enum type) - kOtherType // anything else -}; - -// TypeWithoutFormatter::PrintValue(value, os) is called -// by the universal printer to print a value of type T when neither -// operator<< nor PrintTo() is defined for T, where kTypeKind is the -// "kind" of T as defined by enum TypeKind. -template -class TypeWithoutFormatter { - public: - // This default version is called when kTypeKind is kOtherType. - static void PrintValue(const T& value, ::std::ostream* os) { - PrintBytesInObjectTo(reinterpret_cast(&value), - sizeof(value), os); - } -}; - -// We print a protobuf using its ShortDebugString() when the string -// doesn't exceed this many characters; otherwise we print it using -// DebugString() for better readability. -const size_t kProtobufOneLinerMaxLength = 50; - -template -class TypeWithoutFormatter { - public: - static void PrintValue(const T& value, ::std::ostream* os) { - const ::testing::internal::string short_str = value.ShortDebugString(); - const ::testing::internal::string pretty_str = - short_str.length() <= kProtobufOneLinerMaxLength ? - short_str : ("\n" + value.DebugString()); - *os << ("<" + pretty_str + ">"); - } -}; - -template -class TypeWithoutFormatter { - public: - // Since T has no << operator or PrintTo() but can be implicitly - // converted to BiggestInt, we print it as a BiggestInt. - // - // Most likely T is an enum type (either named or unnamed), in which - // case printing it as an integer is the desired behavior. In case - // T is not an enum, printing it as an integer is the best we can do - // given that it has no user-defined printer. - static void PrintValue(const T& value, ::std::ostream* os) { - const internal::BiggestInt kBigInt = value; - *os << kBigInt; - } -}; - -// Prints the given value to the given ostream. If the value is a -// protocol message, its debug string is printed; if it's an enum or -// of a type implicitly convertible to BiggestInt, it's printed as an -// integer; otherwise the bytes in the value are printed. This is -// what UniversalPrinter::Print() does when it knows nothing about -// type T and T has neither << operator nor PrintTo(). -// -// A user can override this behavior for a class type Foo by defining -// a << operator in the namespace where Foo is defined. -// -// We put this operator in namespace 'internal2' instead of 'internal' -// to simplify the implementation, as much code in 'internal' needs to -// use << in STL, which would conflict with our own << were it defined -// in 'internal'. -// -// Note that this operator<< takes a generic std::basic_ostream type instead of the more restricted std::ostream. If -// we define it to take an std::ostream instead, we'll get an -// "ambiguous overloads" compiler error when trying to print a type -// Foo that supports streaming to std::basic_ostream, as the compiler cannot tell whether -// operator<<(std::ostream&, const T&) or -// operator<<(std::basic_stream, const Foo&) is more -// specific. -template -::std::basic_ostream& operator<<( - ::std::basic_ostream& os, const T& x) { - TypeWithoutFormatter::value ? kProtobuf : - internal::ImplicitlyConvertible::value ? - kConvertibleToInteger : kOtherType)>::PrintValue(x, &os); - return os; -} - -} // namespace internal2 -} // namespace testing - -// This namespace MUST NOT BE NESTED IN ::testing, or the name look-up -// magic needed for implementing UniversalPrinter won't work. -namespace testing_internal { - -// Used to print a value that is not an STL-style container when the -// user doesn't define PrintTo() for it. -template -void DefaultPrintNonContainerTo(const T& value, ::std::ostream* os) { - // With the following statement, during unqualified name lookup, - // testing::internal2::operator<< appears as if it was declared in - // the nearest enclosing namespace that contains both - // ::testing_internal and ::testing::internal2, i.e. the global - // namespace. For more details, refer to the C++ Standard section - // 7.3.4-1 [namespace.udir]. This allows us to fall back onto - // testing::internal2::operator<< in case T doesn't come with a << - // operator. - // - // We cannot write 'using ::testing::internal2::operator<<;', which - // gcc 3.3 fails to compile due to a compiler bug. - using namespace ::testing::internal2; // NOLINT - - // Assuming T is defined in namespace foo, in the next statement, - // the compiler will consider all of: - // - // 1. foo::operator<< (thanks to Koenig look-up), - // 2. ::operator<< (as the current namespace is enclosed in ::), - // 3. testing::internal2::operator<< (thanks to the using statement above). - // - // The operator<< whose type matches T best will be picked. - // - // We deliberately allow #2 to be a candidate, as sometimes it's - // impossible to define #1 (e.g. when foo is ::std, defining - // anything in it is undefined behavior unless you are a compiler - // vendor.). - *os << value; -} - -} // namespace testing_internal - -namespace testing { -namespace internal { - -// UniversalPrinter::Print(value, ostream_ptr) prints the given -// value to the given ostream. The caller must ensure that -// 'ostream_ptr' is not NULL, or the behavior is undefined. -// -// We define UniversalPrinter as a class template (as opposed to a -// function template), as we need to partially specialize it for -// reference types, which cannot be done with function templates. -template -class UniversalPrinter; - -template -void UniversalPrint(const T& value, ::std::ostream* os); - -// Used to print an STL-style container when the user doesn't define -// a PrintTo() for it. -template -void DefaultPrintTo(IsContainer /* dummy */, - false_type /* is not a pointer */, - const C& container, ::std::ostream* os) { - const size_t kMaxCount = 32; // The maximum number of elements to print. - *os << '{'; - size_t count = 0; - for (typename C::const_iterator it = container.begin(); - it != container.end(); ++it, ++count) { - if (count > 0) { - *os << ','; - if (count == kMaxCount) { // Enough has been printed. - *os << " ..."; - break; - } - } - *os << ' '; - // We cannot call PrintTo(*it, os) here as PrintTo() doesn't - // handle *it being a native array. - internal::UniversalPrint(*it, os); - } - - if (count > 0) { - *os << ' '; - } - *os << '}'; -} - -// Used to print a pointer that is neither a char pointer nor a member -// pointer, when the user doesn't define PrintTo() for it. (A member -// variable pointer or member function pointer doesn't really point to -// a location in the address space. Their representation is -// implementation-defined. Therefore they will be printed as raw -// bytes.) -template -void DefaultPrintTo(IsNotContainer /* dummy */, - true_type /* is a pointer */, - T* p, ::std::ostream* os) { - if (p == NULL) { - *os << "NULL"; - } else { - // C++ doesn't allow casting from a function pointer to any object - // pointer. - // - // IsTrue() silences warnings: "Condition is always true", - // "unreachable code". - if (IsTrue(ImplicitlyConvertible::value)) { - // T is not a function type. We just call << to print p, - // relying on ADL to pick up user-defined << for their pointer - // types, if any. - *os << p; - } else { - // T is a function type, so '*os << p' doesn't do what we want - // (it just prints p as bool). We want to print p as a const - // void*. However, we cannot cast it to const void* directly, - // even using reinterpret_cast, as earlier versions of gcc - // (e.g. 3.4.5) cannot compile the cast when p is a function - // pointer. Casting to UInt64 first solves the problem. - *os << reinterpret_cast( - reinterpret_cast(p)); - } - } -} - -// Used to print a non-container, non-pointer value when the user -// doesn't define PrintTo() for it. -template -void DefaultPrintTo(IsNotContainer /* dummy */, - false_type /* is not a pointer */, - const T& value, ::std::ostream* os) { - ::testing_internal::DefaultPrintNonContainerTo(value, os); -} - -// Prints the given value using the << operator if it has one; -// otherwise prints the bytes in it. This is what -// UniversalPrinter::Print() does when PrintTo() is not specialized -// or overloaded for type T. -// -// A user can override this behavior for a class type Foo by defining -// an overload of PrintTo() in the namespace where Foo is defined. We -// give the user this option as sometimes defining a << operator for -// Foo is not desirable (e.g. the coding style may prevent doing it, -// or there is already a << operator but it doesn't do what the user -// wants). -template -void PrintTo(const T& value, ::std::ostream* os) { - // DefaultPrintTo() is overloaded. The type of its first two - // arguments determine which version will be picked. If T is an - // STL-style container, the version for container will be called; if - // T is a pointer, the pointer version will be called; otherwise the - // generic version will be called. - // - // Note that we check for container types here, prior to we check - // for protocol message types in our operator<<. The rationale is: - // - // For protocol messages, we want to give people a chance to - // override Google Mock's format by defining a PrintTo() or - // operator<<. For STL containers, other formats can be - // incompatible with Google Mock's format for the container - // elements; therefore we check for container types here to ensure - // that our format is used. - // - // The second argument of DefaultPrintTo() is needed to bypass a bug - // in Symbian's C++ compiler that prevents it from picking the right - // overload between: - // - // PrintTo(const T& x, ...); - // PrintTo(T* x, ...); - DefaultPrintTo(IsContainerTest(0), is_pointer(), value, os); -} - -// The following list of PrintTo() overloads tells -// UniversalPrinter::Print() how to print standard types (built-in -// types, strings, plain arrays, and pointers). - -// Overloads for various char types. -GTEST_API_ void PrintTo(unsigned char c, ::std::ostream* os); -GTEST_API_ void PrintTo(signed char c, ::std::ostream* os); -inline void PrintTo(char c, ::std::ostream* os) { - // When printing a plain char, we always treat it as unsigned. This - // way, the output won't be affected by whether the compiler thinks - // char is signed or not. - PrintTo(static_cast(c), os); -} - -// Overloads for other simple built-in types. -inline void PrintTo(bool x, ::std::ostream* os) { - *os << (x ? "true" : "false"); -} - -// Overload for wchar_t type. -// Prints a wchar_t as a symbol if it is printable or as its internal -// code otherwise and also as its decimal code (except for L'\0'). -// The L'\0' char is printed as "L'\\0'". The decimal code is printed -// as signed integer when wchar_t is implemented by the compiler -// as a signed type and is printed as an unsigned integer when wchar_t -// is implemented as an unsigned type. -GTEST_API_ void PrintTo(wchar_t wc, ::std::ostream* os); - -// Overloads for C strings. -GTEST_API_ void PrintTo(const char* s, ::std::ostream* os); -inline void PrintTo(char* s, ::std::ostream* os) { - PrintTo(ImplicitCast_(s), os); -} - -// signed/unsigned char is often used for representing binary data, so -// we print pointers to it as void* to be safe. -inline void PrintTo(const signed char* s, ::std::ostream* os) { - PrintTo(ImplicitCast_(s), os); -} -inline void PrintTo(signed char* s, ::std::ostream* os) { - PrintTo(ImplicitCast_(s), os); -} -inline void PrintTo(const unsigned char* s, ::std::ostream* os) { - PrintTo(ImplicitCast_(s), os); -} -inline void PrintTo(unsigned char* s, ::std::ostream* os) { - PrintTo(ImplicitCast_(s), os); -} - -// MSVC can be configured to define wchar_t as a typedef of unsigned -// short. It defines _NATIVE_WCHAR_T_DEFINED when wchar_t is a native -// type. When wchar_t is a typedef, defining an overload for const -// wchar_t* would cause unsigned short* be printed as a wide string, -// possibly causing invalid memory accesses. -#if !defined(_MSC_VER) || defined(_NATIVE_WCHAR_T_DEFINED) -// Overloads for wide C strings -GTEST_API_ void PrintTo(const wchar_t* s, ::std::ostream* os); -inline void PrintTo(wchar_t* s, ::std::ostream* os) { - PrintTo(ImplicitCast_(s), os); -} -#endif - -// Overload for C arrays. Multi-dimensional arrays are printed -// properly. - -// Prints the given number of elements in an array, without printing -// the curly braces. -template -void PrintRawArrayTo(const T a[], size_t count, ::std::ostream* os) { - UniversalPrint(a[0], os); - for (size_t i = 1; i != count; i++) { - *os << ", "; - UniversalPrint(a[i], os); - } -} - -// Overloads for ::string and ::std::string. -#if GTEST_HAS_GLOBAL_STRING -GTEST_API_ void PrintStringTo(const ::string&s, ::std::ostream* os); -inline void PrintTo(const ::string& s, ::std::ostream* os) { - PrintStringTo(s, os); -} -#endif // GTEST_HAS_GLOBAL_STRING - -GTEST_API_ void PrintStringTo(const ::std::string&s, ::std::ostream* os); -inline void PrintTo(const ::std::string& s, ::std::ostream* os) { - PrintStringTo(s, os); -} - -// Overloads for ::wstring and ::std::wstring. -#if GTEST_HAS_GLOBAL_WSTRING -GTEST_API_ void PrintWideStringTo(const ::wstring&s, ::std::ostream* os); -inline void PrintTo(const ::wstring& s, ::std::ostream* os) { - PrintWideStringTo(s, os); -} -#endif // GTEST_HAS_GLOBAL_WSTRING - -#if GTEST_HAS_STD_WSTRING -GTEST_API_ void PrintWideStringTo(const ::std::wstring&s, ::std::ostream* os); -inline void PrintTo(const ::std::wstring& s, ::std::ostream* os) { - PrintWideStringTo(s, os); -} -#endif // GTEST_HAS_STD_WSTRING - -#if GTEST_HAS_TR1_TUPLE -// Overload for ::std::tr1::tuple. Needed for printing function arguments, -// which are packed as tuples. - -// Helper function for printing a tuple. T must be instantiated with -// a tuple type. -template -void PrintTupleTo(const T& t, ::std::ostream* os); - -// Overloaded PrintTo() for tuples of various arities. We support -// tuples of up-to 10 fields. The following implementation works -// regardless of whether tr1::tuple is implemented using the -// non-standard variadic template feature or not. - -inline void PrintTo(const ::std::tr1::tuple<>& t, ::std::ostream* os) { - PrintTupleTo(t, os); -} - -template -void PrintTo(const ::std::tr1::tuple& t, ::std::ostream* os) { - PrintTupleTo(t, os); -} - -template -void PrintTo(const ::std::tr1::tuple& t, ::std::ostream* os) { - PrintTupleTo(t, os); -} - -template -void PrintTo(const ::std::tr1::tuple& t, ::std::ostream* os) { - PrintTupleTo(t, os); -} - -template -void PrintTo(const ::std::tr1::tuple& t, ::std::ostream* os) { - PrintTupleTo(t, os); -} - -template -void PrintTo(const ::std::tr1::tuple& t, - ::std::ostream* os) { - PrintTupleTo(t, os); -} - -template -void PrintTo(const ::std::tr1::tuple& t, - ::std::ostream* os) { - PrintTupleTo(t, os); -} - -template -void PrintTo(const ::std::tr1::tuple& t, - ::std::ostream* os) { - PrintTupleTo(t, os); -} - -template -void PrintTo(const ::std::tr1::tuple& t, - ::std::ostream* os) { - PrintTupleTo(t, os); -} - -template -void PrintTo(const ::std::tr1::tuple& t, - ::std::ostream* os) { - PrintTupleTo(t, os); -} - -template -void PrintTo( - const ::std::tr1::tuple& t, - ::std::ostream* os) { - PrintTupleTo(t, os); -} -#endif // GTEST_HAS_TR1_TUPLE - -// Overload for std::pair. -template -void PrintTo(const ::std::pair& value, ::std::ostream* os) { - *os << '('; - // We cannot use UniversalPrint(value.first, os) here, as T1 may be - // a reference type. The same for printing value.second. - UniversalPrinter::Print(value.first, os); - *os << ", "; - UniversalPrinter::Print(value.second, os); - *os << ')'; -} - -// Implements printing a non-reference type T by letting the compiler -// pick the right overload of PrintTo() for T. -template -class UniversalPrinter { - public: - // MSVC warns about adding const to a function type, so we want to - // disable the warning. -#ifdef _MSC_VER -# pragma warning(push) // Saves the current warning state. -# pragma warning(disable:4180) // Temporarily disables warning 4180. -#endif // _MSC_VER - - // Note: we deliberately don't call this PrintTo(), as that name - // conflicts with ::testing::internal::PrintTo in the body of the - // function. - static void Print(const T& value, ::std::ostream* os) { - // By default, ::testing::internal::PrintTo() is used for printing - // the value. - // - // Thanks to Koenig look-up, if T is a class and has its own - // PrintTo() function defined in its namespace, that function will - // be visible here. Since it is more specific than the generic ones - // in ::testing::internal, it will be picked by the compiler in the - // following statement - exactly what we want. - PrintTo(value, os); - } - -#ifdef _MSC_VER -# pragma warning(pop) // Restores the warning state. -#endif // _MSC_VER -}; - -// UniversalPrintArray(begin, len, os) prints an array of 'len' -// elements, starting at address 'begin'. -template -void UniversalPrintArray(const T* begin, size_t len, ::std::ostream* os) { - if (len == 0) { - *os << "{}"; - } else { - *os << "{ "; - const size_t kThreshold = 18; - const size_t kChunkSize = 8; - // If the array has more than kThreshold elements, we'll have to - // omit some details by printing only the first and the last - // kChunkSize elements. - // TODO(wan@google.com): let the user control the threshold using a flag. - if (len <= kThreshold) { - PrintRawArrayTo(begin, len, os); - } else { - PrintRawArrayTo(begin, kChunkSize, os); - *os << ", ..., "; - PrintRawArrayTo(begin + len - kChunkSize, kChunkSize, os); - } - *os << " }"; - } -} -// This overload prints a (const) char array compactly. -GTEST_API_ void UniversalPrintArray( - const char* begin, size_t len, ::std::ostream* os); - -// This overload prints a (const) wchar_t array compactly. -GTEST_API_ void UniversalPrintArray( - const wchar_t* begin, size_t len, ::std::ostream* os); - -// Implements printing an array type T[N]. -template -class UniversalPrinter { - public: - // Prints the given array, omitting some elements when there are too - // many. - static void Print(const T (&a)[N], ::std::ostream* os) { - UniversalPrintArray(a, N, os); - } -}; - -// Implements printing a reference type T&. -template -class UniversalPrinter { - public: - // MSVC warns about adding const to a function type, so we want to - // disable the warning. -#ifdef _MSC_VER -# pragma warning(push) // Saves the current warning state. -# pragma warning(disable:4180) // Temporarily disables warning 4180. -#endif // _MSC_VER - - static void Print(const T& value, ::std::ostream* os) { - // Prints the address of the value. We use reinterpret_cast here - // as static_cast doesn't compile when T is a function type. - *os << "@" << reinterpret_cast(&value) << " "; - - // Then prints the value itself. - UniversalPrint(value, os); - } - -#ifdef _MSC_VER -# pragma warning(pop) // Restores the warning state. -#endif // _MSC_VER -}; - -// Prints a value tersely: for a reference type, the referenced value -// (but not the address) is printed; for a (const) char pointer, the -// NUL-terminated string (but not the pointer) is printed. - -template -class UniversalTersePrinter { - public: - static void Print(const T& value, ::std::ostream* os) { - UniversalPrint(value, os); - } -}; -template -class UniversalTersePrinter { - public: - static void Print(const T& value, ::std::ostream* os) { - UniversalPrint(value, os); - } -}; -template -class UniversalTersePrinter { - public: - static void Print(const T (&value)[N], ::std::ostream* os) { - UniversalPrinter::Print(value, os); - } -}; -template <> -class UniversalTersePrinter { - public: - static void Print(const char* str, ::std::ostream* os) { - if (str == NULL) { - *os << "NULL"; - } else { - UniversalPrint(string(str), os); - } - } -}; -template <> -class UniversalTersePrinter { - public: - static void Print(char* str, ::std::ostream* os) { - UniversalTersePrinter::Print(str, os); - } -}; - -#if GTEST_HAS_STD_WSTRING -template <> -class UniversalTersePrinter { - public: - static void Print(const wchar_t* str, ::std::ostream* os) { - if (str == NULL) { - *os << "NULL"; - } else { - UniversalPrint(::std::wstring(str), os); - } - } -}; -#endif - -template <> -class UniversalTersePrinter { - public: - static void Print(wchar_t* str, ::std::ostream* os) { - UniversalTersePrinter::Print(str, os); - } -}; - -template -void UniversalTersePrint(const T& value, ::std::ostream* os) { - UniversalTersePrinter::Print(value, os); -} - -// Prints a value using the type inferred by the compiler. The -// difference between this and UniversalTersePrint() is that for a -// (const) char pointer, this prints both the pointer and the -// NUL-terminated string. -template -void UniversalPrint(const T& value, ::std::ostream* os) { - // A workarond for the bug in VC++ 7.1 that prevents us from instantiating - // UniversalPrinter with T directly. - typedef T T1; - UniversalPrinter::Print(value, os); -} - -#if GTEST_HAS_TR1_TUPLE -typedef ::std::vector Strings; - -// This helper template allows PrintTo() for tuples and -// UniversalTersePrintTupleFieldsToStrings() to be defined by -// induction on the number of tuple fields. The idea is that -// TuplePrefixPrinter::PrintPrefixTo(t, os) prints the first N -// fields in tuple t, and can be defined in terms of -// TuplePrefixPrinter. - -// The inductive case. -template -struct TuplePrefixPrinter { - // Prints the first N fields of a tuple. - template - static void PrintPrefixTo(const Tuple& t, ::std::ostream* os) { - TuplePrefixPrinter::PrintPrefixTo(t, os); - *os << ", "; - UniversalPrinter::type> - ::Print(::std::tr1::get(t), os); - } - - // Tersely prints the first N fields of a tuple to a string vector, - // one element for each field. - template - static void TersePrintPrefixToStrings(const Tuple& t, Strings* strings) { - TuplePrefixPrinter::TersePrintPrefixToStrings(t, strings); - ::std::stringstream ss; - UniversalTersePrint(::std::tr1::get(t), &ss); - strings->push_back(ss.str()); - } -}; - -// Base cases. -template <> -struct TuplePrefixPrinter<0> { - template - static void PrintPrefixTo(const Tuple&, ::std::ostream*) {} - - template - static void TersePrintPrefixToStrings(const Tuple&, Strings*) {} -}; -// We have to specialize the entire TuplePrefixPrinter<> class -// template here, even though the definition of -// TersePrintPrefixToStrings() is the same as the generic version, as -// Embarcadero (formerly CodeGear, formerly Borland) C++ doesn't -// support specializing a method template of a class template. -template <> -struct TuplePrefixPrinter<1> { - template - static void PrintPrefixTo(const Tuple& t, ::std::ostream* os) { - UniversalPrinter::type>:: - Print(::std::tr1::get<0>(t), os); - } - - template - static void TersePrintPrefixToStrings(const Tuple& t, Strings* strings) { - ::std::stringstream ss; - UniversalTersePrint(::std::tr1::get<0>(t), &ss); - strings->push_back(ss.str()); - } -}; - -// Helper function for printing a tuple. T must be instantiated with -// a tuple type. -template -void PrintTupleTo(const T& t, ::std::ostream* os) { - *os << "("; - TuplePrefixPrinter< ::std::tr1::tuple_size::value>:: - PrintPrefixTo(t, os); - *os << ")"; -} - -// Prints the fields of a tuple tersely to a string vector, one -// element for each field. See the comment before -// UniversalTersePrint() for how we define "tersely". -template -Strings UniversalTersePrintTupleFieldsToStrings(const Tuple& value) { - Strings result; - TuplePrefixPrinter< ::std::tr1::tuple_size::value>:: - TersePrintPrefixToStrings(value, &result); - return result; -} -#endif // GTEST_HAS_TR1_TUPLE - -} // namespace internal - -template -::std::string PrintToString(const T& value) { - ::std::stringstream ss; - internal::UniversalTersePrinter::Print(value, &ss); - return ss.str(); -} - -} // namespace testing - -#endif // GTEST_INCLUDE_GTEST_GTEST_PRINTERS_H_ - -#if GTEST_HAS_PARAM_TEST - -namespace testing { -namespace internal { - -// INTERNAL IMPLEMENTATION - DO NOT USE IN USER CODE. -// -// Outputs a message explaining invalid registration of different -// fixture class for the same test case. This may happen when -// TEST_P macro is used to define two tests with the same name -// but in different namespaces. -GTEST_API_ void ReportInvalidTestCaseType(const char* test_case_name, - const char* file, int line); - -template class ParamGeneratorInterface; -template class ParamGenerator; - -// Interface for iterating over elements provided by an implementation -// of ParamGeneratorInterface. -template -class ParamIteratorInterface { - public: - virtual ~ParamIteratorInterface() {} - // A pointer to the base generator instance. - // Used only for the purposes of iterator comparison - // to make sure that two iterators belong to the same generator. - virtual const ParamGeneratorInterface* BaseGenerator() const = 0; - // Advances iterator to point to the next element - // provided by the generator. The caller is responsible - // for not calling Advance() on an iterator equal to - // BaseGenerator()->End(). - virtual void Advance() = 0; - // Clones the iterator object. Used for implementing copy semantics - // of ParamIterator. - virtual ParamIteratorInterface* Clone() const = 0; - // Dereferences the current iterator and provides (read-only) access - // to the pointed value. It is the caller's responsibility not to call - // Current() on an iterator equal to BaseGenerator()->End(). - // Used for implementing ParamGenerator::operator*(). - virtual const T* Current() const = 0; - // Determines whether the given iterator and other point to the same - // element in the sequence generated by the generator. - // Used for implementing ParamGenerator::operator==(). - virtual bool Equals(const ParamIteratorInterface& other) const = 0; -}; - -// Class iterating over elements provided by an implementation of -// ParamGeneratorInterface. It wraps ParamIteratorInterface -// and implements the const forward iterator concept. -template -class ParamIterator { - public: - typedef T value_type; - typedef const T& reference; - typedef ptrdiff_t difference_type; - - // ParamIterator assumes ownership of the impl_ pointer. - ParamIterator(const ParamIterator& other) : impl_(other.impl_->Clone()) {} - ParamIterator& operator=(const ParamIterator& other) { - if (this != &other) - impl_.reset(other.impl_->Clone()); - return *this; - } - - const T& operator*() const { return *impl_->Current(); } - const T* operator->() const { return impl_->Current(); } - // Prefix version of operator++. - ParamIterator& operator++() { - impl_->Advance(); - return *this; - } - // Postfix version of operator++. - ParamIterator operator++(int /*unused*/) { - ParamIteratorInterface* clone = impl_->Clone(); - impl_->Advance(); - return ParamIterator(clone); - } - bool operator==(const ParamIterator& other) const { - return impl_.get() == other.impl_.get() || impl_->Equals(*other.impl_); - } - bool operator!=(const ParamIterator& other) const { - return !(*this == other); - } - - private: - friend class ParamGenerator; - explicit ParamIterator(ParamIteratorInterface* impl) : impl_(impl) {} - scoped_ptr > impl_; -}; - -// ParamGeneratorInterface is the binary interface to access generators -// defined in other translation units. -template -class ParamGeneratorInterface { - public: - typedef T ParamType; - - virtual ~ParamGeneratorInterface() {} - - // Generator interface definition - virtual ParamIteratorInterface* Begin() const = 0; - virtual ParamIteratorInterface* End() const = 0; -}; - -// Wraps ParamGeneratorInterface and provides general generator syntax -// compatible with the STL Container concept. -// This class implements copy initialization semantics and the contained -// ParamGeneratorInterface instance is shared among all copies -// of the original object. This is possible because that instance is immutable. -template -class ParamGenerator { - public: - typedef ParamIterator iterator; - - explicit ParamGenerator(ParamGeneratorInterface* impl) : impl_(impl) {} - ParamGenerator(const ParamGenerator& other) : impl_(other.impl_) {} - - ParamGenerator& operator=(const ParamGenerator& other) { - impl_ = other.impl_; - return *this; - } - - iterator begin() const { return iterator(impl_->Begin()); } - iterator end() const { return iterator(impl_->End()); } - - private: - linked_ptr > impl_; -}; - -// Generates values from a range of two comparable values. Can be used to -// generate sequences of user-defined types that implement operator+() and -// operator<(). -// This class is used in the Range() function. -template -class RangeGenerator : public ParamGeneratorInterface { - public: - RangeGenerator(T begin, T end, IncrementT step) - : begin_(begin), end_(end), - step_(step), end_index_(CalculateEndIndex(begin, end, step)) {} - virtual ~RangeGenerator() {} - - virtual ParamIteratorInterface* Begin() const { - return new Iterator(this, begin_, 0, step_); - } - virtual ParamIteratorInterface* End() const { - return new Iterator(this, end_, end_index_, step_); - } - - private: - class Iterator : public ParamIteratorInterface { - public: - Iterator(const ParamGeneratorInterface* base, T value, int index, - IncrementT step) - : base_(base), value_(value), index_(index), step_(step) {} - virtual ~Iterator() {} - - virtual const ParamGeneratorInterface* BaseGenerator() const { - return base_; - } - virtual void Advance() { - value_ = value_ + step_; - index_++; - } - virtual ParamIteratorInterface* Clone() const { - return new Iterator(*this); - } - virtual const T* Current() const { return &value_; } - virtual bool Equals(const ParamIteratorInterface& other) const { - // Having the same base generator guarantees that the other - // iterator is of the same type and we can downcast. - GTEST_CHECK_(BaseGenerator() == other.BaseGenerator()) - << "The program attempted to compare iterators " - << "from different generators." << std::endl; - const int other_index = - CheckedDowncastToActualType(&other)->index_; - return index_ == other_index; - } - - private: - Iterator(const Iterator& other) - : ParamIteratorInterface(), - base_(other.base_), value_(other.value_), index_(other.index_), - step_(other.step_) {} - - // No implementation - assignment is unsupported. - void operator=(const Iterator& other); - - const ParamGeneratorInterface* const base_; - T value_; - int index_; - const IncrementT step_; - }; // class RangeGenerator::Iterator - - static int CalculateEndIndex(const T& begin, - const T& end, - const IncrementT& step) { - int end_index = 0; - for (T i = begin; i < end; i = i + step) - end_index++; - return end_index; - } - - // No implementation - assignment is unsupported. - void operator=(const RangeGenerator& other); - - const T begin_; - const T end_; - const IncrementT step_; - // The index for the end() iterator. All the elements in the generated - // sequence are indexed (0-based) to aid iterator comparison. - const int end_index_; -}; // class RangeGenerator - - -// Generates values from a pair of STL-style iterators. Used in the -// ValuesIn() function. The elements are copied from the source range -// since the source can be located on the stack, and the generator -// is likely to persist beyond that stack frame. -template -class ValuesInIteratorRangeGenerator : public ParamGeneratorInterface { - public: - template - ValuesInIteratorRangeGenerator(ForwardIterator begin, ForwardIterator end) - : container_(begin, end) {} - virtual ~ValuesInIteratorRangeGenerator() {} - - virtual ParamIteratorInterface* Begin() const { - return new Iterator(this, container_.begin()); - } - virtual ParamIteratorInterface* End() const { - return new Iterator(this, container_.end()); - } - - private: - typedef typename ::std::vector ContainerType; - - class Iterator : public ParamIteratorInterface { - public: - Iterator(const ParamGeneratorInterface* base, - typename ContainerType::const_iterator iterator) - : base_(base), iterator_(iterator) {} - virtual ~Iterator() {} - - virtual const ParamGeneratorInterface* BaseGenerator() const { - return base_; - } - virtual void Advance() { - ++iterator_; - value_.reset(); - } - virtual ParamIteratorInterface* Clone() const { - return new Iterator(*this); - } - // We need to use cached value referenced by iterator_ because *iterator_ - // can return a temporary object (and of type other then T), so just - // having "return &*iterator_;" doesn't work. - // value_ is updated here and not in Advance() because Advance() - // can advance iterator_ beyond the end of the range, and we cannot - // detect that fact. The client code, on the other hand, is - // responsible for not calling Current() on an out-of-range iterator. - virtual const T* Current() const { - if (value_.get() == NULL) - value_.reset(new T(*iterator_)); - return value_.get(); - } - virtual bool Equals(const ParamIteratorInterface& other) const { - // Having the same base generator guarantees that the other - // iterator is of the same type and we can downcast. - GTEST_CHECK_(BaseGenerator() == other.BaseGenerator()) - << "The program attempted to compare iterators " - << "from different generators." << std::endl; - return iterator_ == - CheckedDowncastToActualType(&other)->iterator_; - } - - private: - Iterator(const Iterator& other) - // The explicit constructor call suppresses a false warning - // emitted by gcc when supplied with the -Wextra option. - : ParamIteratorInterface(), - base_(other.base_), - iterator_(other.iterator_) {} - - const ParamGeneratorInterface* const base_; - typename ContainerType::const_iterator iterator_; - // A cached value of *iterator_. We keep it here to allow access by - // pointer in the wrapping iterator's operator->(). - // value_ needs to be mutable to be accessed in Current(). - // Use of scoped_ptr helps manage cached value's lifetime, - // which is bound by the lifespan of the iterator itself. - mutable scoped_ptr value_; - }; // class ValuesInIteratorRangeGenerator::Iterator - - // No implementation - assignment is unsupported. - void operator=(const ValuesInIteratorRangeGenerator& other); - - const ContainerType container_; -}; // class ValuesInIteratorRangeGenerator - -// INTERNAL IMPLEMENTATION - DO NOT USE IN USER CODE. -// -// Stores a parameter value and later creates tests parameterized with that -// value. -template -class ParameterizedTestFactory : public TestFactoryBase { - public: - typedef typename TestClass::ParamType ParamType; - explicit ParameterizedTestFactory(ParamType parameter) : - parameter_(parameter) {} - virtual Test* CreateTest() { - TestClass::SetParam(¶meter_); - return new TestClass(); - } - - private: - const ParamType parameter_; - - GTEST_DISALLOW_COPY_AND_ASSIGN_(ParameterizedTestFactory); -}; - -// INTERNAL IMPLEMENTATION - DO NOT USE IN USER CODE. -// -// TestMetaFactoryBase is a base class for meta-factories that create -// test factories for passing into MakeAndRegisterTestInfo function. -template -class TestMetaFactoryBase { - public: - virtual ~TestMetaFactoryBase() {} - - virtual TestFactoryBase* CreateTestFactory(ParamType parameter) = 0; -}; - -// INTERNAL IMPLEMENTATION - DO NOT USE IN USER CODE. -// -// TestMetaFactory creates test factories for passing into -// MakeAndRegisterTestInfo function. Since MakeAndRegisterTestInfo receives -// ownership of test factory pointer, same factory object cannot be passed -// into that method twice. But ParameterizedTestCaseInfo is going to call -// it for each Test/Parameter value combination. Thus it needs meta factory -// creator class. -template -class TestMetaFactory - : public TestMetaFactoryBase { - public: - typedef typename TestCase::ParamType ParamType; - - TestMetaFactory() {} - - virtual TestFactoryBase* CreateTestFactory(ParamType parameter) { - return new ParameterizedTestFactory(parameter); - } - - private: - GTEST_DISALLOW_COPY_AND_ASSIGN_(TestMetaFactory); -}; - -// INTERNAL IMPLEMENTATION - DO NOT USE IN USER CODE. -// -// ParameterizedTestCaseInfoBase is a generic interface -// to ParameterizedTestCaseInfo classes. ParameterizedTestCaseInfoBase -// accumulates test information provided by TEST_P macro invocations -// and generators provided by INSTANTIATE_TEST_CASE_P macro invocations -// and uses that information to register all resulting test instances -// in RegisterTests method. The ParameterizeTestCaseRegistry class holds -// a collection of pointers to the ParameterizedTestCaseInfo objects -// and calls RegisterTests() on each of them when asked. -class ParameterizedTestCaseInfoBase { - public: - virtual ~ParameterizedTestCaseInfoBase() {} - - // Base part of test case name for display purposes. - virtual const string& GetTestCaseName() const = 0; - // Test case id to verify identity. - virtual TypeId GetTestCaseTypeId() const = 0; - // UnitTest class invokes this method to register tests in this - // test case right before running them in RUN_ALL_TESTS macro. - // This method should not be called more then once on any single - // instance of a ParameterizedTestCaseInfoBase derived class. - virtual void RegisterTests() = 0; - - protected: - ParameterizedTestCaseInfoBase() {} - - private: - GTEST_DISALLOW_COPY_AND_ASSIGN_(ParameterizedTestCaseInfoBase); -}; - -// INTERNAL IMPLEMENTATION - DO NOT USE IN USER CODE. -// -// ParameterizedTestCaseInfo accumulates tests obtained from TEST_P -// macro invocations for a particular test case and generators -// obtained from INSTANTIATE_TEST_CASE_P macro invocations for that -// test case. It registers tests with all values generated by all -// generators when asked. -template -class ParameterizedTestCaseInfo : public ParameterizedTestCaseInfoBase { - public: - // ParamType and GeneratorCreationFunc are private types but are required - // for declarations of public methods AddTestPattern() and - // AddTestCaseInstantiation(). - typedef typename TestCase::ParamType ParamType; - // A function that returns an instance of appropriate generator type. - typedef ParamGenerator(GeneratorCreationFunc)(); - - explicit ParameterizedTestCaseInfo(const char* name) - : test_case_name_(name) {} - - // Test case base name for display purposes. - virtual const string& GetTestCaseName() const { return test_case_name_; } - // Test case id to verify identity. - virtual TypeId GetTestCaseTypeId() const { return GetTypeId(); } - // TEST_P macro uses AddTestPattern() to record information - // about a single test in a LocalTestInfo structure. - // test_case_name is the base name of the test case (without invocation - // prefix). test_base_name is the name of an individual test without - // parameter index. For the test SequenceA/FooTest.DoBar/1 FooTest is - // test case base name and DoBar is test base name. - void AddTestPattern(const char* test_case_name, - const char* test_base_name, - TestMetaFactoryBase* meta_factory) { - tests_.push_back(linked_ptr(new TestInfo(test_case_name, - test_base_name, - meta_factory))); - } - // INSTANTIATE_TEST_CASE_P macro uses AddGenerator() to record information - // about a generator. - int AddTestCaseInstantiation(const string& instantiation_name, - GeneratorCreationFunc* func, - const char* /* file */, - int /* line */) { - instantiations_.push_back(::std::make_pair(instantiation_name, func)); - return 0; // Return value used only to run this method in namespace scope. - } - // UnitTest class invokes this method to register tests in this test case - // test cases right before running tests in RUN_ALL_TESTS macro. - // This method should not be called more then once on any single - // instance of a ParameterizedTestCaseInfoBase derived class. - // UnitTest has a guard to prevent from calling this method more then once. - virtual void RegisterTests() { - for (typename TestInfoContainer::iterator test_it = tests_.begin(); - test_it != tests_.end(); ++test_it) { - linked_ptr test_info = *test_it; - for (typename InstantiationContainer::iterator gen_it = - instantiations_.begin(); gen_it != instantiations_.end(); - ++gen_it) { - const string& instantiation_name = gen_it->first; - ParamGenerator generator((*gen_it->second)()); - - string test_case_name; - if ( !instantiation_name.empty() ) - test_case_name = instantiation_name + "/"; - test_case_name += test_info->test_case_base_name; - - int i = 0; - for (typename ParamGenerator::iterator param_it = - generator.begin(); - param_it != generator.end(); ++param_it, ++i) { - Message test_name_stream; - test_name_stream << test_info->test_base_name << "/" << i; - MakeAndRegisterTestInfo( - test_case_name.c_str(), - test_name_stream.GetString().c_str(), - NULL, // No type parameter. - PrintToString(*param_it).c_str(), - GetTestCaseTypeId(), - TestCase::SetUpTestCase, - TestCase::TearDownTestCase, - test_info->test_meta_factory->CreateTestFactory(*param_it)); - } // for param_it - } // for gen_it - } // for test_it - } // RegisterTests - - private: - // LocalTestInfo structure keeps information about a single test registered - // with TEST_P macro. - struct TestInfo { - TestInfo(const char* a_test_case_base_name, - const char* a_test_base_name, - TestMetaFactoryBase* a_test_meta_factory) : - test_case_base_name(a_test_case_base_name), - test_base_name(a_test_base_name), - test_meta_factory(a_test_meta_factory) {} - - const string test_case_base_name; - const string test_base_name; - const scoped_ptr > test_meta_factory; - }; - typedef ::std::vector > TestInfoContainer; - // Keeps pairs of - // received from INSTANTIATE_TEST_CASE_P macros. - typedef ::std::vector > - InstantiationContainer; - - const string test_case_name_; - TestInfoContainer tests_; - InstantiationContainer instantiations_; - - GTEST_DISALLOW_COPY_AND_ASSIGN_(ParameterizedTestCaseInfo); -}; // class ParameterizedTestCaseInfo - -// INTERNAL IMPLEMENTATION - DO NOT USE IN USER CODE. -// -// ParameterizedTestCaseRegistry contains a map of ParameterizedTestCaseInfoBase -// classes accessed by test case names. TEST_P and INSTANTIATE_TEST_CASE_P -// macros use it to locate their corresponding ParameterizedTestCaseInfo -// descriptors. -class ParameterizedTestCaseRegistry { - public: - ParameterizedTestCaseRegistry() {} - ~ParameterizedTestCaseRegistry() { - for (TestCaseInfoContainer::iterator it = test_case_infos_.begin(); - it != test_case_infos_.end(); ++it) { - delete *it; - } - } - - // Looks up or creates and returns a structure containing information about - // tests and instantiations of a particular test case. - template - ParameterizedTestCaseInfo* GetTestCasePatternHolder( - const char* test_case_name, - const char* file, - int line) { - ParameterizedTestCaseInfo* typed_test_info = NULL; - for (TestCaseInfoContainer::iterator it = test_case_infos_.begin(); - it != test_case_infos_.end(); ++it) { - if ((*it)->GetTestCaseName() == test_case_name) { - if ((*it)->GetTestCaseTypeId() != GetTypeId()) { - // Complain about incorrect usage of Google Test facilities - // and terminate the program since we cannot guaranty correct - // test case setup and tear-down in this case. - ReportInvalidTestCaseType(test_case_name, file, line); - posix::Abort(); - } else { - // At this point we are sure that the object we found is of the same - // type we are looking for, so we downcast it to that type - // without further checks. - typed_test_info = CheckedDowncastToActualType< - ParameterizedTestCaseInfo >(*it); - } - break; - } - } - if (typed_test_info == NULL) { - typed_test_info = new ParameterizedTestCaseInfo(test_case_name); - test_case_infos_.push_back(typed_test_info); - } - return typed_test_info; - } - void RegisterTests() { - for (TestCaseInfoContainer::iterator it = test_case_infos_.begin(); - it != test_case_infos_.end(); ++it) { - (*it)->RegisterTests(); - } - } - - private: - typedef ::std::vector TestCaseInfoContainer; - - TestCaseInfoContainer test_case_infos_; - - GTEST_DISALLOW_COPY_AND_ASSIGN_(ParameterizedTestCaseRegistry); -}; - -} // namespace internal -} // namespace testing - -#endif // GTEST_HAS_PARAM_TEST - -#endif // GTEST_INCLUDE_GTEST_INTERNAL_GTEST_PARAM_UTIL_H_ -// This file was GENERATED by command: -// pump.py gtest-param-util-generated.h.pump -// DO NOT EDIT BY HAND!!! - -// Copyright 2008 Google Inc. -// All Rights Reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: vladl@google.com (Vlad Losev) - -// Type and function utilities for implementing parameterized tests. -// This file is generated by a SCRIPT. DO NOT EDIT BY HAND! -// -// Currently Google Test supports at most 50 arguments in Values, -// and at most 10 arguments in Combine. Please contact -// googletestframework@googlegroups.com if you need more. -// Please note that the number of arguments to Combine is limited -// by the maximum arity of the implementation of tr1::tuple which is -// currently set at 10. - -#ifndef GTEST_INCLUDE_GTEST_INTERNAL_GTEST_PARAM_UTIL_GENERATED_H_ -#define GTEST_INCLUDE_GTEST_INTERNAL_GTEST_PARAM_UTIL_GENERATED_H_ - -// scripts/fuse_gtest.py depends on gtest's own header being #included -// *unconditionally*. Therefore these #includes cannot be moved -// inside #if GTEST_HAS_PARAM_TEST. - -#if GTEST_HAS_PARAM_TEST - -namespace testing { - -// Forward declarations of ValuesIn(), which is implemented in -// include/gtest/gtest-param-test.h. -template -internal::ParamGenerator< - typename ::testing::internal::IteratorTraits::value_type> -ValuesIn(ForwardIterator begin, ForwardIterator end); - -template -internal::ParamGenerator ValuesIn(const T (&array)[N]); - -template -internal::ParamGenerator ValuesIn( - const Container& container); - -namespace internal { - -// Used in the Values() function to provide polymorphic capabilities. -template -class ValueArray1 { - public: - explicit ValueArray1(T1 v1) : v1_(v1) {} - - template - operator ParamGenerator() const { return ValuesIn(&v1_, &v1_ + 1); } - - private: - // No implementation - assignment is unsupported. - void operator=(const ValueArray1& other); - - const T1 v1_; -}; - -template -class ValueArray2 { - public: - ValueArray2(T1 v1, T2 v2) : v1_(v1), v2_(v2) {} - - template - operator ParamGenerator() const { - const T array[] = {static_cast(v1_), static_cast(v2_)}; - return ValuesIn(array); - } - - private: - // No implementation - assignment is unsupported. - void operator=(const ValueArray2& other); - - const T1 v1_; - const T2 v2_; -}; - -template -class ValueArray3 { - public: - ValueArray3(T1 v1, T2 v2, T3 v3) : v1_(v1), v2_(v2), v3_(v3) {} - - template - operator ParamGenerator() const { - const T array[] = {static_cast(v1_), static_cast(v2_), - static_cast(v3_)}; - return ValuesIn(array); - } - - private: - // No implementation - assignment is unsupported. - void operator=(const ValueArray3& other); - - const T1 v1_; - const T2 v2_; - const T3 v3_; -}; - -template -class ValueArray4 { - public: - ValueArray4(T1 v1, T2 v2, T3 v3, T4 v4) : v1_(v1), v2_(v2), v3_(v3), - v4_(v4) {} - - template - operator ParamGenerator() const { - const T array[] = {static_cast(v1_), static_cast(v2_), - static_cast(v3_), static_cast(v4_)}; - return ValuesIn(array); - } - - private: - // No implementation - assignment is unsupported. - void operator=(const ValueArray4& other); - - const T1 v1_; - const T2 v2_; - const T3 v3_; - const T4 v4_; -}; - -template -class ValueArray5 { - public: - ValueArray5(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5) : v1_(v1), v2_(v2), v3_(v3), - v4_(v4), v5_(v5) {} - - template - operator ParamGenerator() const { - const T array[] = {static_cast(v1_), static_cast(v2_), - static_cast(v3_), static_cast(v4_), static_cast(v5_)}; - return ValuesIn(array); - } - - private: - // No implementation - assignment is unsupported. - void operator=(const ValueArray5& other); - - const T1 v1_; - const T2 v2_; - const T3 v3_; - const T4 v4_; - const T5 v5_; -}; - -template -class ValueArray6 { - public: - ValueArray6(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6) : v1_(v1), v2_(v2), - v3_(v3), v4_(v4), v5_(v5), v6_(v6) {} - - template - operator ParamGenerator() const { - const T array[] = {static_cast(v1_), static_cast(v2_), - static_cast(v3_), static_cast(v4_), static_cast(v5_), - static_cast(v6_)}; - return ValuesIn(array); - } - - private: - // No implementation - assignment is unsupported. - void operator=(const ValueArray6& other); - - const T1 v1_; - const T2 v2_; - const T3 v3_; - const T4 v4_; - const T5 v5_; - const T6 v6_; -}; - -template -class ValueArray7 { - public: - ValueArray7(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7) : v1_(v1), - v2_(v2), v3_(v3), v4_(v4), v5_(v5), v6_(v6), v7_(v7) {} - - template - operator ParamGenerator() const { - const T array[] = {static_cast(v1_), static_cast(v2_), - static_cast(v3_), static_cast(v4_), static_cast(v5_), - static_cast(v6_), static_cast(v7_)}; - return ValuesIn(array); - } - - private: - // No implementation - assignment is unsupported. - void operator=(const ValueArray7& other); - - const T1 v1_; - const T2 v2_; - const T3 v3_; - const T4 v4_; - const T5 v5_; - const T6 v6_; - const T7 v7_; -}; - -template -class ValueArray8 { - public: - ValueArray8(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, - T8 v8) : v1_(v1), v2_(v2), v3_(v3), v4_(v4), v5_(v5), v6_(v6), v7_(v7), - v8_(v8) {} - - template - operator ParamGenerator() const { - const T array[] = {static_cast(v1_), static_cast(v2_), - static_cast(v3_), static_cast(v4_), static_cast(v5_), - static_cast(v6_), static_cast(v7_), static_cast(v8_)}; - return ValuesIn(array); - } - - private: - // No implementation - assignment is unsupported. - void operator=(const ValueArray8& other); - - const T1 v1_; - const T2 v2_; - const T3 v3_; - const T4 v4_; - const T5 v5_; - const T6 v6_; - const T7 v7_; - const T8 v8_; -}; - -template -class ValueArray9 { - public: - ValueArray9(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, - T9 v9) : v1_(v1), v2_(v2), v3_(v3), v4_(v4), v5_(v5), v6_(v6), v7_(v7), - v8_(v8), v9_(v9) {} - - template - operator ParamGenerator() const { - const T array[] = {static_cast(v1_), static_cast(v2_), - static_cast(v3_), static_cast(v4_), static_cast(v5_), - static_cast(v6_), static_cast(v7_), static_cast(v8_), - static_cast(v9_)}; - return ValuesIn(array); - } - - private: - // No implementation - assignment is unsupported. - void operator=(const ValueArray9& other); - - const T1 v1_; - const T2 v2_; - const T3 v3_; - const T4 v4_; - const T5 v5_; - const T6 v6_; - const T7 v7_; - const T8 v8_; - const T9 v9_; -}; - -template -class ValueArray10 { - public: - ValueArray10(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, - T10 v10) : v1_(v1), v2_(v2), v3_(v3), v4_(v4), v5_(v5), v6_(v6), v7_(v7), - v8_(v8), v9_(v9), v10_(v10) {} - - template - operator ParamGenerator() const { - const T array[] = {static_cast(v1_), static_cast(v2_), - static_cast(v3_), static_cast(v4_), static_cast(v5_), - static_cast(v6_), static_cast(v7_), static_cast(v8_), - static_cast(v9_), static_cast(v10_)}; - return ValuesIn(array); - } - - private: - // No implementation - assignment is unsupported. - void operator=(const ValueArray10& other); - - const T1 v1_; - const T2 v2_; - const T3 v3_; - const T4 v4_; - const T5 v5_; - const T6 v6_; - const T7 v7_; - const T8 v8_; - const T9 v9_; - const T10 v10_; -}; - -template -class ValueArray11 { - public: - ValueArray11(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, - T10 v10, T11 v11) : v1_(v1), v2_(v2), v3_(v3), v4_(v4), v5_(v5), v6_(v6), - v7_(v7), v8_(v8), v9_(v9), v10_(v10), v11_(v11) {} - - template - operator ParamGenerator() const { - const T array[] = {static_cast(v1_), static_cast(v2_), - static_cast(v3_), static_cast(v4_), static_cast(v5_), - static_cast(v6_), static_cast(v7_), static_cast(v8_), - static_cast(v9_), static_cast(v10_), static_cast(v11_)}; - return ValuesIn(array); - } - - private: - // No implementation - assignment is unsupported. - void operator=(const ValueArray11& other); - - const T1 v1_; - const T2 v2_; - const T3 v3_; - const T4 v4_; - const T5 v5_; - const T6 v6_; - const T7 v7_; - const T8 v8_; - const T9 v9_; - const T10 v10_; - const T11 v11_; -}; - -template -class ValueArray12 { - public: - ValueArray12(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, - T10 v10, T11 v11, T12 v12) : v1_(v1), v2_(v2), v3_(v3), v4_(v4), v5_(v5), - v6_(v6), v7_(v7), v8_(v8), v9_(v9), v10_(v10), v11_(v11), v12_(v12) {} - - template - operator ParamGenerator() const { - const T array[] = {static_cast(v1_), static_cast(v2_), - static_cast(v3_), static_cast(v4_), static_cast(v5_), - static_cast(v6_), static_cast(v7_), static_cast(v8_), - static_cast(v9_), static_cast(v10_), static_cast(v11_), - static_cast(v12_)}; - return ValuesIn(array); - } - - private: - // No implementation - assignment is unsupported. - void operator=(const ValueArray12& other); - - const T1 v1_; - const T2 v2_; - const T3 v3_; - const T4 v4_; - const T5 v5_; - const T6 v6_; - const T7 v7_; - const T8 v8_; - const T9 v9_; - const T10 v10_; - const T11 v11_; - const T12 v12_; -}; - -template -class ValueArray13 { - public: - ValueArray13(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, - T10 v10, T11 v11, T12 v12, T13 v13) : v1_(v1), v2_(v2), v3_(v3), v4_(v4), - v5_(v5), v6_(v6), v7_(v7), v8_(v8), v9_(v9), v10_(v10), v11_(v11), - v12_(v12), v13_(v13) {} - - template - operator ParamGenerator() const { - const T array[] = {static_cast(v1_), static_cast(v2_), - static_cast(v3_), static_cast(v4_), static_cast(v5_), - static_cast(v6_), static_cast(v7_), static_cast(v8_), - static_cast(v9_), static_cast(v10_), static_cast(v11_), - static_cast(v12_), static_cast(v13_)}; - return ValuesIn(array); - } - - private: - // No implementation - assignment is unsupported. - void operator=(const ValueArray13& other); - - const T1 v1_; - const T2 v2_; - const T3 v3_; - const T4 v4_; - const T5 v5_; - const T6 v6_; - const T7 v7_; - const T8 v8_; - const T9 v9_; - const T10 v10_; - const T11 v11_; - const T12 v12_; - const T13 v13_; -}; - -template -class ValueArray14 { - public: - ValueArray14(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, - T10 v10, T11 v11, T12 v12, T13 v13, T14 v14) : v1_(v1), v2_(v2), v3_(v3), - v4_(v4), v5_(v5), v6_(v6), v7_(v7), v8_(v8), v9_(v9), v10_(v10), - v11_(v11), v12_(v12), v13_(v13), v14_(v14) {} - - template - operator ParamGenerator() const { - const T array[] = {static_cast(v1_), static_cast(v2_), - static_cast(v3_), static_cast(v4_), static_cast(v5_), - static_cast(v6_), static_cast(v7_), static_cast(v8_), - static_cast(v9_), static_cast(v10_), static_cast(v11_), - static_cast(v12_), static_cast(v13_), static_cast(v14_)}; - return ValuesIn(array); - } - - private: - // No implementation - assignment is unsupported. - void operator=(const ValueArray14& other); - - const T1 v1_; - const T2 v2_; - const T3 v3_; - const T4 v4_; - const T5 v5_; - const T6 v6_; - const T7 v7_; - const T8 v8_; - const T9 v9_; - const T10 v10_; - const T11 v11_; - const T12 v12_; - const T13 v13_; - const T14 v14_; -}; - -template -class ValueArray15 { - public: - ValueArray15(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, - T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15) : v1_(v1), v2_(v2), - v3_(v3), v4_(v4), v5_(v5), v6_(v6), v7_(v7), v8_(v8), v9_(v9), v10_(v10), - v11_(v11), v12_(v12), v13_(v13), v14_(v14), v15_(v15) {} - - template - operator ParamGenerator() const { - const T array[] = {static_cast(v1_), static_cast(v2_), - static_cast(v3_), static_cast(v4_), static_cast(v5_), - static_cast(v6_), static_cast(v7_), static_cast(v8_), - static_cast(v9_), static_cast(v10_), static_cast(v11_), - static_cast(v12_), static_cast(v13_), static_cast(v14_), - static_cast(v15_)}; - return ValuesIn(array); - } - - private: - // No implementation - assignment is unsupported. - void operator=(const ValueArray15& other); - - const T1 v1_; - const T2 v2_; - const T3 v3_; - const T4 v4_; - const T5 v5_; - const T6 v6_; - const T7 v7_; - const T8 v8_; - const T9 v9_; - const T10 v10_; - const T11 v11_; - const T12 v12_; - const T13 v13_; - const T14 v14_; - const T15 v15_; -}; - -template -class ValueArray16 { - public: - ValueArray16(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, - T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16) : v1_(v1), - v2_(v2), v3_(v3), v4_(v4), v5_(v5), v6_(v6), v7_(v7), v8_(v8), v9_(v9), - v10_(v10), v11_(v11), v12_(v12), v13_(v13), v14_(v14), v15_(v15), - v16_(v16) {} - - template - operator ParamGenerator() const { - const T array[] = {static_cast(v1_), static_cast(v2_), - static_cast(v3_), static_cast(v4_), static_cast(v5_), - static_cast(v6_), static_cast(v7_), static_cast(v8_), - static_cast(v9_), static_cast(v10_), static_cast(v11_), - static_cast(v12_), static_cast(v13_), static_cast(v14_), - static_cast(v15_), static_cast(v16_)}; - return ValuesIn(array); - } - - private: - // No implementation - assignment is unsupported. - void operator=(const ValueArray16& other); - - const T1 v1_; - const T2 v2_; - const T3 v3_; - const T4 v4_; - const T5 v5_; - const T6 v6_; - const T7 v7_; - const T8 v8_; - const T9 v9_; - const T10 v10_; - const T11 v11_; - const T12 v12_; - const T13 v13_; - const T14 v14_; - const T15 v15_; - const T16 v16_; -}; - -template -class ValueArray17 { - public: - ValueArray17(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, - T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, - T17 v17) : v1_(v1), v2_(v2), v3_(v3), v4_(v4), v5_(v5), v6_(v6), v7_(v7), - v8_(v8), v9_(v9), v10_(v10), v11_(v11), v12_(v12), v13_(v13), v14_(v14), - v15_(v15), v16_(v16), v17_(v17) {} - - template - operator ParamGenerator() const { - const T array[] = {static_cast(v1_), static_cast(v2_), - static_cast(v3_), static_cast(v4_), static_cast(v5_), - static_cast(v6_), static_cast(v7_), static_cast(v8_), - static_cast(v9_), static_cast(v10_), static_cast(v11_), - static_cast(v12_), static_cast(v13_), static_cast(v14_), - static_cast(v15_), static_cast(v16_), static_cast(v17_)}; - return ValuesIn(array); - } - - private: - // No implementation - assignment is unsupported. - void operator=(const ValueArray17& other); - - const T1 v1_; - const T2 v2_; - const T3 v3_; - const T4 v4_; - const T5 v5_; - const T6 v6_; - const T7 v7_; - const T8 v8_; - const T9 v9_; - const T10 v10_; - const T11 v11_; - const T12 v12_; - const T13 v13_; - const T14 v14_; - const T15 v15_; - const T16 v16_; - const T17 v17_; -}; - -template -class ValueArray18 { - public: - ValueArray18(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, - T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17, - T18 v18) : v1_(v1), v2_(v2), v3_(v3), v4_(v4), v5_(v5), v6_(v6), v7_(v7), - v8_(v8), v9_(v9), v10_(v10), v11_(v11), v12_(v12), v13_(v13), v14_(v14), - v15_(v15), v16_(v16), v17_(v17), v18_(v18) {} - - template - operator ParamGenerator() const { - const T array[] = {static_cast(v1_), static_cast(v2_), - static_cast(v3_), static_cast(v4_), static_cast(v5_), - static_cast(v6_), static_cast(v7_), static_cast(v8_), - static_cast(v9_), static_cast(v10_), static_cast(v11_), - static_cast(v12_), static_cast(v13_), static_cast(v14_), - static_cast(v15_), static_cast(v16_), static_cast(v17_), - static_cast(v18_)}; - return ValuesIn(array); - } - - private: - // No implementation - assignment is unsupported. - void operator=(const ValueArray18& other); - - const T1 v1_; - const T2 v2_; - const T3 v3_; - const T4 v4_; - const T5 v5_; - const T6 v6_; - const T7 v7_; - const T8 v8_; - const T9 v9_; - const T10 v10_; - const T11 v11_; - const T12 v12_; - const T13 v13_; - const T14 v14_; - const T15 v15_; - const T16 v16_; - const T17 v17_; - const T18 v18_; -}; - -template -class ValueArray19 { - public: - ValueArray19(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, - T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17, - T18 v18, T19 v19) : v1_(v1), v2_(v2), v3_(v3), v4_(v4), v5_(v5), v6_(v6), - v7_(v7), v8_(v8), v9_(v9), v10_(v10), v11_(v11), v12_(v12), v13_(v13), - v14_(v14), v15_(v15), v16_(v16), v17_(v17), v18_(v18), v19_(v19) {} - - template - operator ParamGenerator() const { - const T array[] = {static_cast(v1_), static_cast(v2_), - static_cast(v3_), static_cast(v4_), static_cast(v5_), - static_cast(v6_), static_cast(v7_), static_cast(v8_), - static_cast(v9_), static_cast(v10_), static_cast(v11_), - static_cast(v12_), static_cast(v13_), static_cast(v14_), - static_cast(v15_), static_cast(v16_), static_cast(v17_), - static_cast(v18_), static_cast(v19_)}; - return ValuesIn(array); - } - - private: - // No implementation - assignment is unsupported. - void operator=(const ValueArray19& other); - - const T1 v1_; - const T2 v2_; - const T3 v3_; - const T4 v4_; - const T5 v5_; - const T6 v6_; - const T7 v7_; - const T8 v8_; - const T9 v9_; - const T10 v10_; - const T11 v11_; - const T12 v12_; - const T13 v13_; - const T14 v14_; - const T15 v15_; - const T16 v16_; - const T17 v17_; - const T18 v18_; - const T19 v19_; -}; - -template -class ValueArray20 { - public: - ValueArray20(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, - T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17, - T18 v18, T19 v19, T20 v20) : v1_(v1), v2_(v2), v3_(v3), v4_(v4), v5_(v5), - v6_(v6), v7_(v7), v8_(v8), v9_(v9), v10_(v10), v11_(v11), v12_(v12), - v13_(v13), v14_(v14), v15_(v15), v16_(v16), v17_(v17), v18_(v18), - v19_(v19), v20_(v20) {} - - template - operator ParamGenerator() const { - const T array[] = {static_cast(v1_), static_cast(v2_), - static_cast(v3_), static_cast(v4_), static_cast(v5_), - static_cast(v6_), static_cast(v7_), static_cast(v8_), - static_cast(v9_), static_cast(v10_), static_cast(v11_), - static_cast(v12_), static_cast(v13_), static_cast(v14_), - static_cast(v15_), static_cast(v16_), static_cast(v17_), - static_cast(v18_), static_cast(v19_), static_cast(v20_)}; - return ValuesIn(array); - } - - private: - // No implementation - assignment is unsupported. - void operator=(const ValueArray20& other); - - const T1 v1_; - const T2 v2_; - const T3 v3_; - const T4 v4_; - const T5 v5_; - const T6 v6_; - const T7 v7_; - const T8 v8_; - const T9 v9_; - const T10 v10_; - const T11 v11_; - const T12 v12_; - const T13 v13_; - const T14 v14_; - const T15 v15_; - const T16 v16_; - const T17 v17_; - const T18 v18_; - const T19 v19_; - const T20 v20_; -}; - -template -class ValueArray21 { - public: - ValueArray21(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, - T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17, - T18 v18, T19 v19, T20 v20, T21 v21) : v1_(v1), v2_(v2), v3_(v3), v4_(v4), - v5_(v5), v6_(v6), v7_(v7), v8_(v8), v9_(v9), v10_(v10), v11_(v11), - v12_(v12), v13_(v13), v14_(v14), v15_(v15), v16_(v16), v17_(v17), - v18_(v18), v19_(v19), v20_(v20), v21_(v21) {} - - template - operator ParamGenerator() const { - const T array[] = {static_cast(v1_), static_cast(v2_), - static_cast(v3_), static_cast(v4_), static_cast(v5_), - static_cast(v6_), static_cast(v7_), static_cast(v8_), - static_cast(v9_), static_cast(v10_), static_cast(v11_), - static_cast(v12_), static_cast(v13_), static_cast(v14_), - static_cast(v15_), static_cast(v16_), static_cast(v17_), - static_cast(v18_), static_cast(v19_), static_cast(v20_), - static_cast(v21_)}; - return ValuesIn(array); - } - - private: - // No implementation - assignment is unsupported. - void operator=(const ValueArray21& other); - - const T1 v1_; - const T2 v2_; - const T3 v3_; - const T4 v4_; - const T5 v5_; - const T6 v6_; - const T7 v7_; - const T8 v8_; - const T9 v9_; - const T10 v10_; - const T11 v11_; - const T12 v12_; - const T13 v13_; - const T14 v14_; - const T15 v15_; - const T16 v16_; - const T17 v17_; - const T18 v18_; - const T19 v19_; - const T20 v20_; - const T21 v21_; -}; - -template -class ValueArray22 { - public: - ValueArray22(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, - T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17, - T18 v18, T19 v19, T20 v20, T21 v21, T22 v22) : v1_(v1), v2_(v2), v3_(v3), - v4_(v4), v5_(v5), v6_(v6), v7_(v7), v8_(v8), v9_(v9), v10_(v10), - v11_(v11), v12_(v12), v13_(v13), v14_(v14), v15_(v15), v16_(v16), - v17_(v17), v18_(v18), v19_(v19), v20_(v20), v21_(v21), v22_(v22) {} - - template - operator ParamGenerator() const { - const T array[] = {static_cast(v1_), static_cast(v2_), - static_cast(v3_), static_cast(v4_), static_cast(v5_), - static_cast(v6_), static_cast(v7_), static_cast(v8_), - static_cast(v9_), static_cast(v10_), static_cast(v11_), - static_cast(v12_), static_cast(v13_), static_cast(v14_), - static_cast(v15_), static_cast(v16_), static_cast(v17_), - static_cast(v18_), static_cast(v19_), static_cast(v20_), - static_cast(v21_), static_cast(v22_)}; - return ValuesIn(array); - } - - private: - // No implementation - assignment is unsupported. - void operator=(const ValueArray22& other); - - const T1 v1_; - const T2 v2_; - const T3 v3_; - const T4 v4_; - const T5 v5_; - const T6 v6_; - const T7 v7_; - const T8 v8_; - const T9 v9_; - const T10 v10_; - const T11 v11_; - const T12 v12_; - const T13 v13_; - const T14 v14_; - const T15 v15_; - const T16 v16_; - const T17 v17_; - const T18 v18_; - const T19 v19_; - const T20 v20_; - const T21 v21_; - const T22 v22_; -}; - -template -class ValueArray23 { - public: - ValueArray23(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, - T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17, - T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23) : v1_(v1), v2_(v2), - v3_(v3), v4_(v4), v5_(v5), v6_(v6), v7_(v7), v8_(v8), v9_(v9), v10_(v10), - v11_(v11), v12_(v12), v13_(v13), v14_(v14), v15_(v15), v16_(v16), - v17_(v17), v18_(v18), v19_(v19), v20_(v20), v21_(v21), v22_(v22), - v23_(v23) {} - - template - operator ParamGenerator() const { - const T array[] = {static_cast(v1_), static_cast(v2_), - static_cast(v3_), static_cast(v4_), static_cast(v5_), - static_cast(v6_), static_cast(v7_), static_cast(v8_), - static_cast(v9_), static_cast(v10_), static_cast(v11_), - static_cast(v12_), static_cast(v13_), static_cast(v14_), - static_cast(v15_), static_cast(v16_), static_cast(v17_), - static_cast(v18_), static_cast(v19_), static_cast(v20_), - static_cast(v21_), static_cast(v22_), static_cast(v23_)}; - return ValuesIn(array); - } - - private: - // No implementation - assignment is unsupported. - void operator=(const ValueArray23& other); - - const T1 v1_; - const T2 v2_; - const T3 v3_; - const T4 v4_; - const T5 v5_; - const T6 v6_; - const T7 v7_; - const T8 v8_; - const T9 v9_; - const T10 v10_; - const T11 v11_; - const T12 v12_; - const T13 v13_; - const T14 v14_; - const T15 v15_; - const T16 v16_; - const T17 v17_; - const T18 v18_; - const T19 v19_; - const T20 v20_; - const T21 v21_; - const T22 v22_; - const T23 v23_; -}; - -template -class ValueArray24 { - public: - ValueArray24(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, - T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17, - T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24) : v1_(v1), - v2_(v2), v3_(v3), v4_(v4), v5_(v5), v6_(v6), v7_(v7), v8_(v8), v9_(v9), - v10_(v10), v11_(v11), v12_(v12), v13_(v13), v14_(v14), v15_(v15), - v16_(v16), v17_(v17), v18_(v18), v19_(v19), v20_(v20), v21_(v21), - v22_(v22), v23_(v23), v24_(v24) {} - - template - operator ParamGenerator() const { - const T array[] = {static_cast(v1_), static_cast(v2_), - static_cast(v3_), static_cast(v4_), static_cast(v5_), - static_cast(v6_), static_cast(v7_), static_cast(v8_), - static_cast(v9_), static_cast(v10_), static_cast(v11_), - static_cast(v12_), static_cast(v13_), static_cast(v14_), - static_cast(v15_), static_cast(v16_), static_cast(v17_), - static_cast(v18_), static_cast(v19_), static_cast(v20_), - static_cast(v21_), static_cast(v22_), static_cast(v23_), - static_cast(v24_)}; - return ValuesIn(array); - } - - private: - // No implementation - assignment is unsupported. - void operator=(const ValueArray24& other); - - const T1 v1_; - const T2 v2_; - const T3 v3_; - const T4 v4_; - const T5 v5_; - const T6 v6_; - const T7 v7_; - const T8 v8_; - const T9 v9_; - const T10 v10_; - const T11 v11_; - const T12 v12_; - const T13 v13_; - const T14 v14_; - const T15 v15_; - const T16 v16_; - const T17 v17_; - const T18 v18_; - const T19 v19_; - const T20 v20_; - const T21 v21_; - const T22 v22_; - const T23 v23_; - const T24 v24_; -}; - -template -class ValueArray25 { - public: - ValueArray25(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, - T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17, - T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, - T25 v25) : v1_(v1), v2_(v2), v3_(v3), v4_(v4), v5_(v5), v6_(v6), v7_(v7), - v8_(v8), v9_(v9), v10_(v10), v11_(v11), v12_(v12), v13_(v13), v14_(v14), - v15_(v15), v16_(v16), v17_(v17), v18_(v18), v19_(v19), v20_(v20), - v21_(v21), v22_(v22), v23_(v23), v24_(v24), v25_(v25) {} - - template - operator ParamGenerator() const { - const T array[] = {static_cast(v1_), static_cast(v2_), - static_cast(v3_), static_cast(v4_), static_cast(v5_), - static_cast(v6_), static_cast(v7_), static_cast(v8_), - static_cast(v9_), static_cast(v10_), static_cast(v11_), - static_cast(v12_), static_cast(v13_), static_cast(v14_), - static_cast(v15_), static_cast(v16_), static_cast(v17_), - static_cast(v18_), static_cast(v19_), static_cast(v20_), - static_cast(v21_), static_cast(v22_), static_cast(v23_), - static_cast(v24_), static_cast(v25_)}; - return ValuesIn(array); - } - - private: - // No implementation - assignment is unsupported. - void operator=(const ValueArray25& other); - - const T1 v1_; - const T2 v2_; - const T3 v3_; - const T4 v4_; - const T5 v5_; - const T6 v6_; - const T7 v7_; - const T8 v8_; - const T9 v9_; - const T10 v10_; - const T11 v11_; - const T12 v12_; - const T13 v13_; - const T14 v14_; - const T15 v15_; - const T16 v16_; - const T17 v17_; - const T18 v18_; - const T19 v19_; - const T20 v20_; - const T21 v21_; - const T22 v22_; - const T23 v23_; - const T24 v24_; - const T25 v25_; -}; - -template -class ValueArray26 { - public: - ValueArray26(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, - T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17, - T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25, - T26 v26) : v1_(v1), v2_(v2), v3_(v3), v4_(v4), v5_(v5), v6_(v6), v7_(v7), - v8_(v8), v9_(v9), v10_(v10), v11_(v11), v12_(v12), v13_(v13), v14_(v14), - v15_(v15), v16_(v16), v17_(v17), v18_(v18), v19_(v19), v20_(v20), - v21_(v21), v22_(v22), v23_(v23), v24_(v24), v25_(v25), v26_(v26) {} - - template - operator ParamGenerator() const { - const T array[] = {static_cast(v1_), static_cast(v2_), - static_cast(v3_), static_cast(v4_), static_cast(v5_), - static_cast(v6_), static_cast(v7_), static_cast(v8_), - static_cast(v9_), static_cast(v10_), static_cast(v11_), - static_cast(v12_), static_cast(v13_), static_cast(v14_), - static_cast(v15_), static_cast(v16_), static_cast(v17_), - static_cast(v18_), static_cast(v19_), static_cast(v20_), - static_cast(v21_), static_cast(v22_), static_cast(v23_), - static_cast(v24_), static_cast(v25_), static_cast(v26_)}; - return ValuesIn(array); - } - - private: - // No implementation - assignment is unsupported. - void operator=(const ValueArray26& other); - - const T1 v1_; - const T2 v2_; - const T3 v3_; - const T4 v4_; - const T5 v5_; - const T6 v6_; - const T7 v7_; - const T8 v8_; - const T9 v9_; - const T10 v10_; - const T11 v11_; - const T12 v12_; - const T13 v13_; - const T14 v14_; - const T15 v15_; - const T16 v16_; - const T17 v17_; - const T18 v18_; - const T19 v19_; - const T20 v20_; - const T21 v21_; - const T22 v22_; - const T23 v23_; - const T24 v24_; - const T25 v25_; - const T26 v26_; -}; - -template -class ValueArray27 { - public: - ValueArray27(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, - T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17, - T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25, - T26 v26, T27 v27) : v1_(v1), v2_(v2), v3_(v3), v4_(v4), v5_(v5), v6_(v6), - v7_(v7), v8_(v8), v9_(v9), v10_(v10), v11_(v11), v12_(v12), v13_(v13), - v14_(v14), v15_(v15), v16_(v16), v17_(v17), v18_(v18), v19_(v19), - v20_(v20), v21_(v21), v22_(v22), v23_(v23), v24_(v24), v25_(v25), - v26_(v26), v27_(v27) {} - - template - operator ParamGenerator() const { - const T array[] = {static_cast(v1_), static_cast(v2_), - static_cast(v3_), static_cast(v4_), static_cast(v5_), - static_cast(v6_), static_cast(v7_), static_cast(v8_), - static_cast(v9_), static_cast(v10_), static_cast(v11_), - static_cast(v12_), static_cast(v13_), static_cast(v14_), - static_cast(v15_), static_cast(v16_), static_cast(v17_), - static_cast(v18_), static_cast(v19_), static_cast(v20_), - static_cast(v21_), static_cast(v22_), static_cast(v23_), - static_cast(v24_), static_cast(v25_), static_cast(v26_), - static_cast(v27_)}; - return ValuesIn(array); - } - - private: - // No implementation - assignment is unsupported. - void operator=(const ValueArray27& other); - - const T1 v1_; - const T2 v2_; - const T3 v3_; - const T4 v4_; - const T5 v5_; - const T6 v6_; - const T7 v7_; - const T8 v8_; - const T9 v9_; - const T10 v10_; - const T11 v11_; - const T12 v12_; - const T13 v13_; - const T14 v14_; - const T15 v15_; - const T16 v16_; - const T17 v17_; - const T18 v18_; - const T19 v19_; - const T20 v20_; - const T21 v21_; - const T22 v22_; - const T23 v23_; - const T24 v24_; - const T25 v25_; - const T26 v26_; - const T27 v27_; -}; - -template -class ValueArray28 { - public: - ValueArray28(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, - T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17, - T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25, - T26 v26, T27 v27, T28 v28) : v1_(v1), v2_(v2), v3_(v3), v4_(v4), v5_(v5), - v6_(v6), v7_(v7), v8_(v8), v9_(v9), v10_(v10), v11_(v11), v12_(v12), - v13_(v13), v14_(v14), v15_(v15), v16_(v16), v17_(v17), v18_(v18), - v19_(v19), v20_(v20), v21_(v21), v22_(v22), v23_(v23), v24_(v24), - v25_(v25), v26_(v26), v27_(v27), v28_(v28) {} - - template - operator ParamGenerator() const { - const T array[] = {static_cast(v1_), static_cast(v2_), - static_cast(v3_), static_cast(v4_), static_cast(v5_), - static_cast(v6_), static_cast(v7_), static_cast(v8_), - static_cast(v9_), static_cast(v10_), static_cast(v11_), - static_cast(v12_), static_cast(v13_), static_cast(v14_), - static_cast(v15_), static_cast(v16_), static_cast(v17_), - static_cast(v18_), static_cast(v19_), static_cast(v20_), - static_cast(v21_), static_cast(v22_), static_cast(v23_), - static_cast(v24_), static_cast(v25_), static_cast(v26_), - static_cast(v27_), static_cast(v28_)}; - return ValuesIn(array); - } - - private: - // No implementation - assignment is unsupported. - void operator=(const ValueArray28& other); - - const T1 v1_; - const T2 v2_; - const T3 v3_; - const T4 v4_; - const T5 v5_; - const T6 v6_; - const T7 v7_; - const T8 v8_; - const T9 v9_; - const T10 v10_; - const T11 v11_; - const T12 v12_; - const T13 v13_; - const T14 v14_; - const T15 v15_; - const T16 v16_; - const T17 v17_; - const T18 v18_; - const T19 v19_; - const T20 v20_; - const T21 v21_; - const T22 v22_; - const T23 v23_; - const T24 v24_; - const T25 v25_; - const T26 v26_; - const T27 v27_; - const T28 v28_; -}; - -template -class ValueArray29 { - public: - ValueArray29(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, - T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17, - T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25, - T26 v26, T27 v27, T28 v28, T29 v29) : v1_(v1), v2_(v2), v3_(v3), v4_(v4), - v5_(v5), v6_(v6), v7_(v7), v8_(v8), v9_(v9), v10_(v10), v11_(v11), - v12_(v12), v13_(v13), v14_(v14), v15_(v15), v16_(v16), v17_(v17), - v18_(v18), v19_(v19), v20_(v20), v21_(v21), v22_(v22), v23_(v23), - v24_(v24), v25_(v25), v26_(v26), v27_(v27), v28_(v28), v29_(v29) {} - - template - operator ParamGenerator() const { - const T array[] = {static_cast(v1_), static_cast(v2_), - static_cast(v3_), static_cast(v4_), static_cast(v5_), - static_cast(v6_), static_cast(v7_), static_cast(v8_), - static_cast(v9_), static_cast(v10_), static_cast(v11_), - static_cast(v12_), static_cast(v13_), static_cast(v14_), - static_cast(v15_), static_cast(v16_), static_cast(v17_), - static_cast(v18_), static_cast(v19_), static_cast(v20_), - static_cast(v21_), static_cast(v22_), static_cast(v23_), - static_cast(v24_), static_cast(v25_), static_cast(v26_), - static_cast(v27_), static_cast(v28_), static_cast(v29_)}; - return ValuesIn(array); - } - - private: - // No implementation - assignment is unsupported. - void operator=(const ValueArray29& other); - - const T1 v1_; - const T2 v2_; - const T3 v3_; - const T4 v4_; - const T5 v5_; - const T6 v6_; - const T7 v7_; - const T8 v8_; - const T9 v9_; - const T10 v10_; - const T11 v11_; - const T12 v12_; - const T13 v13_; - const T14 v14_; - const T15 v15_; - const T16 v16_; - const T17 v17_; - const T18 v18_; - const T19 v19_; - const T20 v20_; - const T21 v21_; - const T22 v22_; - const T23 v23_; - const T24 v24_; - const T25 v25_; - const T26 v26_; - const T27 v27_; - const T28 v28_; - const T29 v29_; -}; - -template -class ValueArray30 { - public: - ValueArray30(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, - T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17, - T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25, - T26 v26, T27 v27, T28 v28, T29 v29, T30 v30) : v1_(v1), v2_(v2), v3_(v3), - v4_(v4), v5_(v5), v6_(v6), v7_(v7), v8_(v8), v9_(v9), v10_(v10), - v11_(v11), v12_(v12), v13_(v13), v14_(v14), v15_(v15), v16_(v16), - v17_(v17), v18_(v18), v19_(v19), v20_(v20), v21_(v21), v22_(v22), - v23_(v23), v24_(v24), v25_(v25), v26_(v26), v27_(v27), v28_(v28), - v29_(v29), v30_(v30) {} - - template - operator ParamGenerator() const { - const T array[] = {static_cast(v1_), static_cast(v2_), - static_cast(v3_), static_cast(v4_), static_cast(v5_), - static_cast(v6_), static_cast(v7_), static_cast(v8_), - static_cast(v9_), static_cast(v10_), static_cast(v11_), - static_cast(v12_), static_cast(v13_), static_cast(v14_), - static_cast(v15_), static_cast(v16_), static_cast(v17_), - static_cast(v18_), static_cast(v19_), static_cast(v20_), - static_cast(v21_), static_cast(v22_), static_cast(v23_), - static_cast(v24_), static_cast(v25_), static_cast(v26_), - static_cast(v27_), static_cast(v28_), static_cast(v29_), - static_cast(v30_)}; - return ValuesIn(array); - } - - private: - // No implementation - assignment is unsupported. - void operator=(const ValueArray30& other); - - const T1 v1_; - const T2 v2_; - const T3 v3_; - const T4 v4_; - const T5 v5_; - const T6 v6_; - const T7 v7_; - const T8 v8_; - const T9 v9_; - const T10 v10_; - const T11 v11_; - const T12 v12_; - const T13 v13_; - const T14 v14_; - const T15 v15_; - const T16 v16_; - const T17 v17_; - const T18 v18_; - const T19 v19_; - const T20 v20_; - const T21 v21_; - const T22 v22_; - const T23 v23_; - const T24 v24_; - const T25 v25_; - const T26 v26_; - const T27 v27_; - const T28 v28_; - const T29 v29_; - const T30 v30_; -}; - -template -class ValueArray31 { - public: - ValueArray31(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, - T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17, - T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25, - T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31) : v1_(v1), v2_(v2), - v3_(v3), v4_(v4), v5_(v5), v6_(v6), v7_(v7), v8_(v8), v9_(v9), v10_(v10), - v11_(v11), v12_(v12), v13_(v13), v14_(v14), v15_(v15), v16_(v16), - v17_(v17), v18_(v18), v19_(v19), v20_(v20), v21_(v21), v22_(v22), - v23_(v23), v24_(v24), v25_(v25), v26_(v26), v27_(v27), v28_(v28), - v29_(v29), v30_(v30), v31_(v31) {} - - template - operator ParamGenerator() const { - const T array[] = {static_cast(v1_), static_cast(v2_), - static_cast(v3_), static_cast(v4_), static_cast(v5_), - static_cast(v6_), static_cast(v7_), static_cast(v8_), - static_cast(v9_), static_cast(v10_), static_cast(v11_), - static_cast(v12_), static_cast(v13_), static_cast(v14_), - static_cast(v15_), static_cast(v16_), static_cast(v17_), - static_cast(v18_), static_cast(v19_), static_cast(v20_), - static_cast(v21_), static_cast(v22_), static_cast(v23_), - static_cast(v24_), static_cast(v25_), static_cast(v26_), - static_cast(v27_), static_cast(v28_), static_cast(v29_), - static_cast(v30_), static_cast(v31_)}; - return ValuesIn(array); - } - - private: - // No implementation - assignment is unsupported. - void operator=(const ValueArray31& other); - - const T1 v1_; - const T2 v2_; - const T3 v3_; - const T4 v4_; - const T5 v5_; - const T6 v6_; - const T7 v7_; - const T8 v8_; - const T9 v9_; - const T10 v10_; - const T11 v11_; - const T12 v12_; - const T13 v13_; - const T14 v14_; - const T15 v15_; - const T16 v16_; - const T17 v17_; - const T18 v18_; - const T19 v19_; - const T20 v20_; - const T21 v21_; - const T22 v22_; - const T23 v23_; - const T24 v24_; - const T25 v25_; - const T26 v26_; - const T27 v27_; - const T28 v28_; - const T29 v29_; - const T30 v30_; - const T31 v31_; -}; - -template -class ValueArray32 { - public: - ValueArray32(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, - T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17, - T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25, - T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31, T32 v32) : v1_(v1), - v2_(v2), v3_(v3), v4_(v4), v5_(v5), v6_(v6), v7_(v7), v8_(v8), v9_(v9), - v10_(v10), v11_(v11), v12_(v12), v13_(v13), v14_(v14), v15_(v15), - v16_(v16), v17_(v17), v18_(v18), v19_(v19), v20_(v20), v21_(v21), - v22_(v22), v23_(v23), v24_(v24), v25_(v25), v26_(v26), v27_(v27), - v28_(v28), v29_(v29), v30_(v30), v31_(v31), v32_(v32) {} - - template - operator ParamGenerator() const { - const T array[] = {static_cast(v1_), static_cast(v2_), - static_cast(v3_), static_cast(v4_), static_cast(v5_), - static_cast(v6_), static_cast(v7_), static_cast(v8_), - static_cast(v9_), static_cast(v10_), static_cast(v11_), - static_cast(v12_), static_cast(v13_), static_cast(v14_), - static_cast(v15_), static_cast(v16_), static_cast(v17_), - static_cast(v18_), static_cast(v19_), static_cast(v20_), - static_cast(v21_), static_cast(v22_), static_cast(v23_), - static_cast(v24_), static_cast(v25_), static_cast(v26_), - static_cast(v27_), static_cast(v28_), static_cast(v29_), - static_cast(v30_), static_cast(v31_), static_cast(v32_)}; - return ValuesIn(array); - } - - private: - // No implementation - assignment is unsupported. - void operator=(const ValueArray32& other); - - const T1 v1_; - const T2 v2_; - const T3 v3_; - const T4 v4_; - const T5 v5_; - const T6 v6_; - const T7 v7_; - const T8 v8_; - const T9 v9_; - const T10 v10_; - const T11 v11_; - const T12 v12_; - const T13 v13_; - const T14 v14_; - const T15 v15_; - const T16 v16_; - const T17 v17_; - const T18 v18_; - const T19 v19_; - const T20 v20_; - const T21 v21_; - const T22 v22_; - const T23 v23_; - const T24 v24_; - const T25 v25_; - const T26 v26_; - const T27 v27_; - const T28 v28_; - const T29 v29_; - const T30 v30_; - const T31 v31_; - const T32 v32_; -}; - -template -class ValueArray33 { - public: - ValueArray33(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, - T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17, - T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25, - T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31, T32 v32, - T33 v33) : v1_(v1), v2_(v2), v3_(v3), v4_(v4), v5_(v5), v6_(v6), v7_(v7), - v8_(v8), v9_(v9), v10_(v10), v11_(v11), v12_(v12), v13_(v13), v14_(v14), - v15_(v15), v16_(v16), v17_(v17), v18_(v18), v19_(v19), v20_(v20), - v21_(v21), v22_(v22), v23_(v23), v24_(v24), v25_(v25), v26_(v26), - v27_(v27), v28_(v28), v29_(v29), v30_(v30), v31_(v31), v32_(v32), - v33_(v33) {} - - template - operator ParamGenerator() const { - const T array[] = {static_cast(v1_), static_cast(v2_), - static_cast(v3_), static_cast(v4_), static_cast(v5_), - static_cast(v6_), static_cast(v7_), static_cast(v8_), - static_cast(v9_), static_cast(v10_), static_cast(v11_), - static_cast(v12_), static_cast(v13_), static_cast(v14_), - static_cast(v15_), static_cast(v16_), static_cast(v17_), - static_cast(v18_), static_cast(v19_), static_cast(v20_), - static_cast(v21_), static_cast(v22_), static_cast(v23_), - static_cast(v24_), static_cast(v25_), static_cast(v26_), - static_cast(v27_), static_cast(v28_), static_cast(v29_), - static_cast(v30_), static_cast(v31_), static_cast(v32_), - static_cast(v33_)}; - return ValuesIn(array); - } - - private: - // No implementation - assignment is unsupported. - void operator=(const ValueArray33& other); - - const T1 v1_; - const T2 v2_; - const T3 v3_; - const T4 v4_; - const T5 v5_; - const T6 v6_; - const T7 v7_; - const T8 v8_; - const T9 v9_; - const T10 v10_; - const T11 v11_; - const T12 v12_; - const T13 v13_; - const T14 v14_; - const T15 v15_; - const T16 v16_; - const T17 v17_; - const T18 v18_; - const T19 v19_; - const T20 v20_; - const T21 v21_; - const T22 v22_; - const T23 v23_; - const T24 v24_; - const T25 v25_; - const T26 v26_; - const T27 v27_; - const T28 v28_; - const T29 v29_; - const T30 v30_; - const T31 v31_; - const T32 v32_; - const T33 v33_; -}; - -template -class ValueArray34 { - public: - ValueArray34(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, - T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17, - T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25, - T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31, T32 v32, T33 v33, - T34 v34) : v1_(v1), v2_(v2), v3_(v3), v4_(v4), v5_(v5), v6_(v6), v7_(v7), - v8_(v8), v9_(v9), v10_(v10), v11_(v11), v12_(v12), v13_(v13), v14_(v14), - v15_(v15), v16_(v16), v17_(v17), v18_(v18), v19_(v19), v20_(v20), - v21_(v21), v22_(v22), v23_(v23), v24_(v24), v25_(v25), v26_(v26), - v27_(v27), v28_(v28), v29_(v29), v30_(v30), v31_(v31), v32_(v32), - v33_(v33), v34_(v34) {} - - template - operator ParamGenerator() const { - const T array[] = {static_cast(v1_), static_cast(v2_), - static_cast(v3_), static_cast(v4_), static_cast(v5_), - static_cast(v6_), static_cast(v7_), static_cast(v8_), - static_cast(v9_), static_cast(v10_), static_cast(v11_), - static_cast(v12_), static_cast(v13_), static_cast(v14_), - static_cast(v15_), static_cast(v16_), static_cast(v17_), - static_cast(v18_), static_cast(v19_), static_cast(v20_), - static_cast(v21_), static_cast(v22_), static_cast(v23_), - static_cast(v24_), static_cast(v25_), static_cast(v26_), - static_cast(v27_), static_cast(v28_), static_cast(v29_), - static_cast(v30_), static_cast(v31_), static_cast(v32_), - static_cast(v33_), static_cast(v34_)}; - return ValuesIn(array); - } - - private: - // No implementation - assignment is unsupported. - void operator=(const ValueArray34& other); - - const T1 v1_; - const T2 v2_; - const T3 v3_; - const T4 v4_; - const T5 v5_; - const T6 v6_; - const T7 v7_; - const T8 v8_; - const T9 v9_; - const T10 v10_; - const T11 v11_; - const T12 v12_; - const T13 v13_; - const T14 v14_; - const T15 v15_; - const T16 v16_; - const T17 v17_; - const T18 v18_; - const T19 v19_; - const T20 v20_; - const T21 v21_; - const T22 v22_; - const T23 v23_; - const T24 v24_; - const T25 v25_; - const T26 v26_; - const T27 v27_; - const T28 v28_; - const T29 v29_; - const T30 v30_; - const T31 v31_; - const T32 v32_; - const T33 v33_; - const T34 v34_; -}; - -template -class ValueArray35 { - public: - ValueArray35(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, - T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17, - T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25, - T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31, T32 v32, T33 v33, - T34 v34, T35 v35) : v1_(v1), v2_(v2), v3_(v3), v4_(v4), v5_(v5), v6_(v6), - v7_(v7), v8_(v8), v9_(v9), v10_(v10), v11_(v11), v12_(v12), v13_(v13), - v14_(v14), v15_(v15), v16_(v16), v17_(v17), v18_(v18), v19_(v19), - v20_(v20), v21_(v21), v22_(v22), v23_(v23), v24_(v24), v25_(v25), - v26_(v26), v27_(v27), v28_(v28), v29_(v29), v30_(v30), v31_(v31), - v32_(v32), v33_(v33), v34_(v34), v35_(v35) {} - - template - operator ParamGenerator() const { - const T array[] = {static_cast(v1_), static_cast(v2_), - static_cast(v3_), static_cast(v4_), static_cast(v5_), - static_cast(v6_), static_cast(v7_), static_cast(v8_), - static_cast(v9_), static_cast(v10_), static_cast(v11_), - static_cast(v12_), static_cast(v13_), static_cast(v14_), - static_cast(v15_), static_cast(v16_), static_cast(v17_), - static_cast(v18_), static_cast(v19_), static_cast(v20_), - static_cast(v21_), static_cast(v22_), static_cast(v23_), - static_cast(v24_), static_cast(v25_), static_cast(v26_), - static_cast(v27_), static_cast(v28_), static_cast(v29_), - static_cast(v30_), static_cast(v31_), static_cast(v32_), - static_cast(v33_), static_cast(v34_), static_cast(v35_)}; - return ValuesIn(array); - } - - private: - // No implementation - assignment is unsupported. - void operator=(const ValueArray35& other); - - const T1 v1_; - const T2 v2_; - const T3 v3_; - const T4 v4_; - const T5 v5_; - const T6 v6_; - const T7 v7_; - const T8 v8_; - const T9 v9_; - const T10 v10_; - const T11 v11_; - const T12 v12_; - const T13 v13_; - const T14 v14_; - const T15 v15_; - const T16 v16_; - const T17 v17_; - const T18 v18_; - const T19 v19_; - const T20 v20_; - const T21 v21_; - const T22 v22_; - const T23 v23_; - const T24 v24_; - const T25 v25_; - const T26 v26_; - const T27 v27_; - const T28 v28_; - const T29 v29_; - const T30 v30_; - const T31 v31_; - const T32 v32_; - const T33 v33_; - const T34 v34_; - const T35 v35_; -}; - -template -class ValueArray36 { - public: - ValueArray36(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, - T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17, - T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25, - T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31, T32 v32, T33 v33, - T34 v34, T35 v35, T36 v36) : v1_(v1), v2_(v2), v3_(v3), v4_(v4), v5_(v5), - v6_(v6), v7_(v7), v8_(v8), v9_(v9), v10_(v10), v11_(v11), v12_(v12), - v13_(v13), v14_(v14), v15_(v15), v16_(v16), v17_(v17), v18_(v18), - v19_(v19), v20_(v20), v21_(v21), v22_(v22), v23_(v23), v24_(v24), - v25_(v25), v26_(v26), v27_(v27), v28_(v28), v29_(v29), v30_(v30), - v31_(v31), v32_(v32), v33_(v33), v34_(v34), v35_(v35), v36_(v36) {} - - template - operator ParamGenerator() const { - const T array[] = {static_cast(v1_), static_cast(v2_), - static_cast(v3_), static_cast(v4_), static_cast(v5_), - static_cast(v6_), static_cast(v7_), static_cast(v8_), - static_cast(v9_), static_cast(v10_), static_cast(v11_), - static_cast(v12_), static_cast(v13_), static_cast(v14_), - static_cast(v15_), static_cast(v16_), static_cast(v17_), - static_cast(v18_), static_cast(v19_), static_cast(v20_), - static_cast(v21_), static_cast(v22_), static_cast(v23_), - static_cast(v24_), static_cast(v25_), static_cast(v26_), - static_cast(v27_), static_cast(v28_), static_cast(v29_), - static_cast(v30_), static_cast(v31_), static_cast(v32_), - static_cast(v33_), static_cast(v34_), static_cast(v35_), - static_cast(v36_)}; - return ValuesIn(array); - } - - private: - // No implementation - assignment is unsupported. - void operator=(const ValueArray36& other); - - const T1 v1_; - const T2 v2_; - const T3 v3_; - const T4 v4_; - const T5 v5_; - const T6 v6_; - const T7 v7_; - const T8 v8_; - const T9 v9_; - const T10 v10_; - const T11 v11_; - const T12 v12_; - const T13 v13_; - const T14 v14_; - const T15 v15_; - const T16 v16_; - const T17 v17_; - const T18 v18_; - const T19 v19_; - const T20 v20_; - const T21 v21_; - const T22 v22_; - const T23 v23_; - const T24 v24_; - const T25 v25_; - const T26 v26_; - const T27 v27_; - const T28 v28_; - const T29 v29_; - const T30 v30_; - const T31 v31_; - const T32 v32_; - const T33 v33_; - const T34 v34_; - const T35 v35_; - const T36 v36_; -}; - -template -class ValueArray37 { - public: - ValueArray37(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, - T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17, - T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25, - T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31, T32 v32, T33 v33, - T34 v34, T35 v35, T36 v36, T37 v37) : v1_(v1), v2_(v2), v3_(v3), v4_(v4), - v5_(v5), v6_(v6), v7_(v7), v8_(v8), v9_(v9), v10_(v10), v11_(v11), - v12_(v12), v13_(v13), v14_(v14), v15_(v15), v16_(v16), v17_(v17), - v18_(v18), v19_(v19), v20_(v20), v21_(v21), v22_(v22), v23_(v23), - v24_(v24), v25_(v25), v26_(v26), v27_(v27), v28_(v28), v29_(v29), - v30_(v30), v31_(v31), v32_(v32), v33_(v33), v34_(v34), v35_(v35), - v36_(v36), v37_(v37) {} - - template - operator ParamGenerator() const { - const T array[] = {static_cast(v1_), static_cast(v2_), - static_cast(v3_), static_cast(v4_), static_cast(v5_), - static_cast(v6_), static_cast(v7_), static_cast(v8_), - static_cast(v9_), static_cast(v10_), static_cast(v11_), - static_cast(v12_), static_cast(v13_), static_cast(v14_), - static_cast(v15_), static_cast(v16_), static_cast(v17_), - static_cast(v18_), static_cast(v19_), static_cast(v20_), - static_cast(v21_), static_cast(v22_), static_cast(v23_), - static_cast(v24_), static_cast(v25_), static_cast(v26_), - static_cast(v27_), static_cast(v28_), static_cast(v29_), - static_cast(v30_), static_cast(v31_), static_cast(v32_), - static_cast(v33_), static_cast(v34_), static_cast(v35_), - static_cast(v36_), static_cast(v37_)}; - return ValuesIn(array); - } - - private: - // No implementation - assignment is unsupported. - void operator=(const ValueArray37& other); - - const T1 v1_; - const T2 v2_; - const T3 v3_; - const T4 v4_; - const T5 v5_; - const T6 v6_; - const T7 v7_; - const T8 v8_; - const T9 v9_; - const T10 v10_; - const T11 v11_; - const T12 v12_; - const T13 v13_; - const T14 v14_; - const T15 v15_; - const T16 v16_; - const T17 v17_; - const T18 v18_; - const T19 v19_; - const T20 v20_; - const T21 v21_; - const T22 v22_; - const T23 v23_; - const T24 v24_; - const T25 v25_; - const T26 v26_; - const T27 v27_; - const T28 v28_; - const T29 v29_; - const T30 v30_; - const T31 v31_; - const T32 v32_; - const T33 v33_; - const T34 v34_; - const T35 v35_; - const T36 v36_; - const T37 v37_; -}; - -template -class ValueArray38 { - public: - ValueArray38(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, - T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17, - T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25, - T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31, T32 v32, T33 v33, - T34 v34, T35 v35, T36 v36, T37 v37, T38 v38) : v1_(v1), v2_(v2), v3_(v3), - v4_(v4), v5_(v5), v6_(v6), v7_(v7), v8_(v8), v9_(v9), v10_(v10), - v11_(v11), v12_(v12), v13_(v13), v14_(v14), v15_(v15), v16_(v16), - v17_(v17), v18_(v18), v19_(v19), v20_(v20), v21_(v21), v22_(v22), - v23_(v23), v24_(v24), v25_(v25), v26_(v26), v27_(v27), v28_(v28), - v29_(v29), v30_(v30), v31_(v31), v32_(v32), v33_(v33), v34_(v34), - v35_(v35), v36_(v36), v37_(v37), v38_(v38) {} - - template - operator ParamGenerator() const { - const T array[] = {static_cast(v1_), static_cast(v2_), - static_cast(v3_), static_cast(v4_), static_cast(v5_), - static_cast(v6_), static_cast(v7_), static_cast(v8_), - static_cast(v9_), static_cast(v10_), static_cast(v11_), - static_cast(v12_), static_cast(v13_), static_cast(v14_), - static_cast(v15_), static_cast(v16_), static_cast(v17_), - static_cast(v18_), static_cast(v19_), static_cast(v20_), - static_cast(v21_), static_cast(v22_), static_cast(v23_), - static_cast(v24_), static_cast(v25_), static_cast(v26_), - static_cast(v27_), static_cast(v28_), static_cast(v29_), - static_cast(v30_), static_cast(v31_), static_cast(v32_), - static_cast(v33_), static_cast(v34_), static_cast(v35_), - static_cast(v36_), static_cast(v37_), static_cast(v38_)}; - return ValuesIn(array); - } - - private: - // No implementation - assignment is unsupported. - void operator=(const ValueArray38& other); - - const T1 v1_; - const T2 v2_; - const T3 v3_; - const T4 v4_; - const T5 v5_; - const T6 v6_; - const T7 v7_; - const T8 v8_; - const T9 v9_; - const T10 v10_; - const T11 v11_; - const T12 v12_; - const T13 v13_; - const T14 v14_; - const T15 v15_; - const T16 v16_; - const T17 v17_; - const T18 v18_; - const T19 v19_; - const T20 v20_; - const T21 v21_; - const T22 v22_; - const T23 v23_; - const T24 v24_; - const T25 v25_; - const T26 v26_; - const T27 v27_; - const T28 v28_; - const T29 v29_; - const T30 v30_; - const T31 v31_; - const T32 v32_; - const T33 v33_; - const T34 v34_; - const T35 v35_; - const T36 v36_; - const T37 v37_; - const T38 v38_; -}; - -template -class ValueArray39 { - public: - ValueArray39(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, - T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17, - T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25, - T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31, T32 v32, T33 v33, - T34 v34, T35 v35, T36 v36, T37 v37, T38 v38, T39 v39) : v1_(v1), v2_(v2), - v3_(v3), v4_(v4), v5_(v5), v6_(v6), v7_(v7), v8_(v8), v9_(v9), v10_(v10), - v11_(v11), v12_(v12), v13_(v13), v14_(v14), v15_(v15), v16_(v16), - v17_(v17), v18_(v18), v19_(v19), v20_(v20), v21_(v21), v22_(v22), - v23_(v23), v24_(v24), v25_(v25), v26_(v26), v27_(v27), v28_(v28), - v29_(v29), v30_(v30), v31_(v31), v32_(v32), v33_(v33), v34_(v34), - v35_(v35), v36_(v36), v37_(v37), v38_(v38), v39_(v39) {} - - template - operator ParamGenerator() const { - const T array[] = {static_cast(v1_), static_cast(v2_), - static_cast(v3_), static_cast(v4_), static_cast(v5_), - static_cast(v6_), static_cast(v7_), static_cast(v8_), - static_cast(v9_), static_cast(v10_), static_cast(v11_), - static_cast(v12_), static_cast(v13_), static_cast(v14_), - static_cast(v15_), static_cast(v16_), static_cast(v17_), - static_cast(v18_), static_cast(v19_), static_cast(v20_), - static_cast(v21_), static_cast(v22_), static_cast(v23_), - static_cast(v24_), static_cast(v25_), static_cast(v26_), - static_cast(v27_), static_cast(v28_), static_cast(v29_), - static_cast(v30_), static_cast(v31_), static_cast(v32_), - static_cast(v33_), static_cast(v34_), static_cast(v35_), - static_cast(v36_), static_cast(v37_), static_cast(v38_), - static_cast(v39_)}; - return ValuesIn(array); - } - - private: - // No implementation - assignment is unsupported. - void operator=(const ValueArray39& other); - - const T1 v1_; - const T2 v2_; - const T3 v3_; - const T4 v4_; - const T5 v5_; - const T6 v6_; - const T7 v7_; - const T8 v8_; - const T9 v9_; - const T10 v10_; - const T11 v11_; - const T12 v12_; - const T13 v13_; - const T14 v14_; - const T15 v15_; - const T16 v16_; - const T17 v17_; - const T18 v18_; - const T19 v19_; - const T20 v20_; - const T21 v21_; - const T22 v22_; - const T23 v23_; - const T24 v24_; - const T25 v25_; - const T26 v26_; - const T27 v27_; - const T28 v28_; - const T29 v29_; - const T30 v30_; - const T31 v31_; - const T32 v32_; - const T33 v33_; - const T34 v34_; - const T35 v35_; - const T36 v36_; - const T37 v37_; - const T38 v38_; - const T39 v39_; -}; - -template -class ValueArray40 { - public: - ValueArray40(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, - T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17, - T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25, - T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31, T32 v32, T33 v33, - T34 v34, T35 v35, T36 v36, T37 v37, T38 v38, T39 v39, T40 v40) : v1_(v1), - v2_(v2), v3_(v3), v4_(v4), v5_(v5), v6_(v6), v7_(v7), v8_(v8), v9_(v9), - v10_(v10), v11_(v11), v12_(v12), v13_(v13), v14_(v14), v15_(v15), - v16_(v16), v17_(v17), v18_(v18), v19_(v19), v20_(v20), v21_(v21), - v22_(v22), v23_(v23), v24_(v24), v25_(v25), v26_(v26), v27_(v27), - v28_(v28), v29_(v29), v30_(v30), v31_(v31), v32_(v32), v33_(v33), - v34_(v34), v35_(v35), v36_(v36), v37_(v37), v38_(v38), v39_(v39), - v40_(v40) {} - - template - operator ParamGenerator() const { - const T array[] = {static_cast(v1_), static_cast(v2_), - static_cast(v3_), static_cast(v4_), static_cast(v5_), - static_cast(v6_), static_cast(v7_), static_cast(v8_), - static_cast(v9_), static_cast(v10_), static_cast(v11_), - static_cast(v12_), static_cast(v13_), static_cast(v14_), - static_cast(v15_), static_cast(v16_), static_cast(v17_), - static_cast(v18_), static_cast(v19_), static_cast(v20_), - static_cast(v21_), static_cast(v22_), static_cast(v23_), - static_cast(v24_), static_cast(v25_), static_cast(v26_), - static_cast(v27_), static_cast(v28_), static_cast(v29_), - static_cast(v30_), static_cast(v31_), static_cast(v32_), - static_cast(v33_), static_cast(v34_), static_cast(v35_), - static_cast(v36_), static_cast(v37_), static_cast(v38_), - static_cast(v39_), static_cast(v40_)}; - return ValuesIn(array); - } - - private: - // No implementation - assignment is unsupported. - void operator=(const ValueArray40& other); - - const T1 v1_; - const T2 v2_; - const T3 v3_; - const T4 v4_; - const T5 v5_; - const T6 v6_; - const T7 v7_; - const T8 v8_; - const T9 v9_; - const T10 v10_; - const T11 v11_; - const T12 v12_; - const T13 v13_; - const T14 v14_; - const T15 v15_; - const T16 v16_; - const T17 v17_; - const T18 v18_; - const T19 v19_; - const T20 v20_; - const T21 v21_; - const T22 v22_; - const T23 v23_; - const T24 v24_; - const T25 v25_; - const T26 v26_; - const T27 v27_; - const T28 v28_; - const T29 v29_; - const T30 v30_; - const T31 v31_; - const T32 v32_; - const T33 v33_; - const T34 v34_; - const T35 v35_; - const T36 v36_; - const T37 v37_; - const T38 v38_; - const T39 v39_; - const T40 v40_; -}; - -template -class ValueArray41 { - public: - ValueArray41(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, - T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17, - T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25, - T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31, T32 v32, T33 v33, - T34 v34, T35 v35, T36 v36, T37 v37, T38 v38, T39 v39, T40 v40, - T41 v41) : v1_(v1), v2_(v2), v3_(v3), v4_(v4), v5_(v5), v6_(v6), v7_(v7), - v8_(v8), v9_(v9), v10_(v10), v11_(v11), v12_(v12), v13_(v13), v14_(v14), - v15_(v15), v16_(v16), v17_(v17), v18_(v18), v19_(v19), v20_(v20), - v21_(v21), v22_(v22), v23_(v23), v24_(v24), v25_(v25), v26_(v26), - v27_(v27), v28_(v28), v29_(v29), v30_(v30), v31_(v31), v32_(v32), - v33_(v33), v34_(v34), v35_(v35), v36_(v36), v37_(v37), v38_(v38), - v39_(v39), v40_(v40), v41_(v41) {} - - template - operator ParamGenerator() const { - const T array[] = {static_cast(v1_), static_cast(v2_), - static_cast(v3_), static_cast(v4_), static_cast(v5_), - static_cast(v6_), static_cast(v7_), static_cast(v8_), - static_cast(v9_), static_cast(v10_), static_cast(v11_), - static_cast(v12_), static_cast(v13_), static_cast(v14_), - static_cast(v15_), static_cast(v16_), static_cast(v17_), - static_cast(v18_), static_cast(v19_), static_cast(v20_), - static_cast(v21_), static_cast(v22_), static_cast(v23_), - static_cast(v24_), static_cast(v25_), static_cast(v26_), - static_cast(v27_), static_cast(v28_), static_cast(v29_), - static_cast(v30_), static_cast(v31_), static_cast(v32_), - static_cast(v33_), static_cast(v34_), static_cast(v35_), - static_cast(v36_), static_cast(v37_), static_cast(v38_), - static_cast(v39_), static_cast(v40_), static_cast(v41_)}; - return ValuesIn(array); - } - - private: - // No implementation - assignment is unsupported. - void operator=(const ValueArray41& other); - - const T1 v1_; - const T2 v2_; - const T3 v3_; - const T4 v4_; - const T5 v5_; - const T6 v6_; - const T7 v7_; - const T8 v8_; - const T9 v9_; - const T10 v10_; - const T11 v11_; - const T12 v12_; - const T13 v13_; - const T14 v14_; - const T15 v15_; - const T16 v16_; - const T17 v17_; - const T18 v18_; - const T19 v19_; - const T20 v20_; - const T21 v21_; - const T22 v22_; - const T23 v23_; - const T24 v24_; - const T25 v25_; - const T26 v26_; - const T27 v27_; - const T28 v28_; - const T29 v29_; - const T30 v30_; - const T31 v31_; - const T32 v32_; - const T33 v33_; - const T34 v34_; - const T35 v35_; - const T36 v36_; - const T37 v37_; - const T38 v38_; - const T39 v39_; - const T40 v40_; - const T41 v41_; -}; - -template -class ValueArray42 { - public: - ValueArray42(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, - T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17, - T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25, - T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31, T32 v32, T33 v33, - T34 v34, T35 v35, T36 v36, T37 v37, T38 v38, T39 v39, T40 v40, T41 v41, - T42 v42) : v1_(v1), v2_(v2), v3_(v3), v4_(v4), v5_(v5), v6_(v6), v7_(v7), - v8_(v8), v9_(v9), v10_(v10), v11_(v11), v12_(v12), v13_(v13), v14_(v14), - v15_(v15), v16_(v16), v17_(v17), v18_(v18), v19_(v19), v20_(v20), - v21_(v21), v22_(v22), v23_(v23), v24_(v24), v25_(v25), v26_(v26), - v27_(v27), v28_(v28), v29_(v29), v30_(v30), v31_(v31), v32_(v32), - v33_(v33), v34_(v34), v35_(v35), v36_(v36), v37_(v37), v38_(v38), - v39_(v39), v40_(v40), v41_(v41), v42_(v42) {} - - template - operator ParamGenerator() const { - const T array[] = {static_cast(v1_), static_cast(v2_), - static_cast(v3_), static_cast(v4_), static_cast(v5_), - static_cast(v6_), static_cast(v7_), static_cast(v8_), - static_cast(v9_), static_cast(v10_), static_cast(v11_), - static_cast(v12_), static_cast(v13_), static_cast(v14_), - static_cast(v15_), static_cast(v16_), static_cast(v17_), - static_cast(v18_), static_cast(v19_), static_cast(v20_), - static_cast(v21_), static_cast(v22_), static_cast(v23_), - static_cast(v24_), static_cast(v25_), static_cast(v26_), - static_cast(v27_), static_cast(v28_), static_cast(v29_), - static_cast(v30_), static_cast(v31_), static_cast(v32_), - static_cast(v33_), static_cast(v34_), static_cast(v35_), - static_cast(v36_), static_cast(v37_), static_cast(v38_), - static_cast(v39_), static_cast(v40_), static_cast(v41_), - static_cast(v42_)}; - return ValuesIn(array); - } - - private: - // No implementation - assignment is unsupported. - void operator=(const ValueArray42& other); - - const T1 v1_; - const T2 v2_; - const T3 v3_; - const T4 v4_; - const T5 v5_; - const T6 v6_; - const T7 v7_; - const T8 v8_; - const T9 v9_; - const T10 v10_; - const T11 v11_; - const T12 v12_; - const T13 v13_; - const T14 v14_; - const T15 v15_; - const T16 v16_; - const T17 v17_; - const T18 v18_; - const T19 v19_; - const T20 v20_; - const T21 v21_; - const T22 v22_; - const T23 v23_; - const T24 v24_; - const T25 v25_; - const T26 v26_; - const T27 v27_; - const T28 v28_; - const T29 v29_; - const T30 v30_; - const T31 v31_; - const T32 v32_; - const T33 v33_; - const T34 v34_; - const T35 v35_; - const T36 v36_; - const T37 v37_; - const T38 v38_; - const T39 v39_; - const T40 v40_; - const T41 v41_; - const T42 v42_; -}; - -template -class ValueArray43 { - public: - ValueArray43(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, - T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17, - T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25, - T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31, T32 v32, T33 v33, - T34 v34, T35 v35, T36 v36, T37 v37, T38 v38, T39 v39, T40 v40, T41 v41, - T42 v42, T43 v43) : v1_(v1), v2_(v2), v3_(v3), v4_(v4), v5_(v5), v6_(v6), - v7_(v7), v8_(v8), v9_(v9), v10_(v10), v11_(v11), v12_(v12), v13_(v13), - v14_(v14), v15_(v15), v16_(v16), v17_(v17), v18_(v18), v19_(v19), - v20_(v20), v21_(v21), v22_(v22), v23_(v23), v24_(v24), v25_(v25), - v26_(v26), v27_(v27), v28_(v28), v29_(v29), v30_(v30), v31_(v31), - v32_(v32), v33_(v33), v34_(v34), v35_(v35), v36_(v36), v37_(v37), - v38_(v38), v39_(v39), v40_(v40), v41_(v41), v42_(v42), v43_(v43) {} - - template - operator ParamGenerator() const { - const T array[] = {static_cast(v1_), static_cast(v2_), - static_cast(v3_), static_cast(v4_), static_cast(v5_), - static_cast(v6_), static_cast(v7_), static_cast(v8_), - static_cast(v9_), static_cast(v10_), static_cast(v11_), - static_cast(v12_), static_cast(v13_), static_cast(v14_), - static_cast(v15_), static_cast(v16_), static_cast(v17_), - static_cast(v18_), static_cast(v19_), static_cast(v20_), - static_cast(v21_), static_cast(v22_), static_cast(v23_), - static_cast(v24_), static_cast(v25_), static_cast(v26_), - static_cast(v27_), static_cast(v28_), static_cast(v29_), - static_cast(v30_), static_cast(v31_), static_cast(v32_), - static_cast(v33_), static_cast(v34_), static_cast(v35_), - static_cast(v36_), static_cast(v37_), static_cast(v38_), - static_cast(v39_), static_cast(v40_), static_cast(v41_), - static_cast(v42_), static_cast(v43_)}; - return ValuesIn(array); - } - - private: - // No implementation - assignment is unsupported. - void operator=(const ValueArray43& other); - - const T1 v1_; - const T2 v2_; - const T3 v3_; - const T4 v4_; - const T5 v5_; - const T6 v6_; - const T7 v7_; - const T8 v8_; - const T9 v9_; - const T10 v10_; - const T11 v11_; - const T12 v12_; - const T13 v13_; - const T14 v14_; - const T15 v15_; - const T16 v16_; - const T17 v17_; - const T18 v18_; - const T19 v19_; - const T20 v20_; - const T21 v21_; - const T22 v22_; - const T23 v23_; - const T24 v24_; - const T25 v25_; - const T26 v26_; - const T27 v27_; - const T28 v28_; - const T29 v29_; - const T30 v30_; - const T31 v31_; - const T32 v32_; - const T33 v33_; - const T34 v34_; - const T35 v35_; - const T36 v36_; - const T37 v37_; - const T38 v38_; - const T39 v39_; - const T40 v40_; - const T41 v41_; - const T42 v42_; - const T43 v43_; -}; - -template -class ValueArray44 { - public: - ValueArray44(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, - T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17, - T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25, - T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31, T32 v32, T33 v33, - T34 v34, T35 v35, T36 v36, T37 v37, T38 v38, T39 v39, T40 v40, T41 v41, - T42 v42, T43 v43, T44 v44) : v1_(v1), v2_(v2), v3_(v3), v4_(v4), v5_(v5), - v6_(v6), v7_(v7), v8_(v8), v9_(v9), v10_(v10), v11_(v11), v12_(v12), - v13_(v13), v14_(v14), v15_(v15), v16_(v16), v17_(v17), v18_(v18), - v19_(v19), v20_(v20), v21_(v21), v22_(v22), v23_(v23), v24_(v24), - v25_(v25), v26_(v26), v27_(v27), v28_(v28), v29_(v29), v30_(v30), - v31_(v31), v32_(v32), v33_(v33), v34_(v34), v35_(v35), v36_(v36), - v37_(v37), v38_(v38), v39_(v39), v40_(v40), v41_(v41), v42_(v42), - v43_(v43), v44_(v44) {} - - template - operator ParamGenerator() const { - const T array[] = {static_cast(v1_), static_cast(v2_), - static_cast(v3_), static_cast(v4_), static_cast(v5_), - static_cast(v6_), static_cast(v7_), static_cast(v8_), - static_cast(v9_), static_cast(v10_), static_cast(v11_), - static_cast(v12_), static_cast(v13_), static_cast(v14_), - static_cast(v15_), static_cast(v16_), static_cast(v17_), - static_cast(v18_), static_cast(v19_), static_cast(v20_), - static_cast(v21_), static_cast(v22_), static_cast(v23_), - static_cast(v24_), static_cast(v25_), static_cast(v26_), - static_cast(v27_), static_cast(v28_), static_cast(v29_), - static_cast(v30_), static_cast(v31_), static_cast(v32_), - static_cast(v33_), static_cast(v34_), static_cast(v35_), - static_cast(v36_), static_cast(v37_), static_cast(v38_), - static_cast(v39_), static_cast(v40_), static_cast(v41_), - static_cast(v42_), static_cast(v43_), static_cast(v44_)}; - return ValuesIn(array); - } - - private: - // No implementation - assignment is unsupported. - void operator=(const ValueArray44& other); - - const T1 v1_; - const T2 v2_; - const T3 v3_; - const T4 v4_; - const T5 v5_; - const T6 v6_; - const T7 v7_; - const T8 v8_; - const T9 v9_; - const T10 v10_; - const T11 v11_; - const T12 v12_; - const T13 v13_; - const T14 v14_; - const T15 v15_; - const T16 v16_; - const T17 v17_; - const T18 v18_; - const T19 v19_; - const T20 v20_; - const T21 v21_; - const T22 v22_; - const T23 v23_; - const T24 v24_; - const T25 v25_; - const T26 v26_; - const T27 v27_; - const T28 v28_; - const T29 v29_; - const T30 v30_; - const T31 v31_; - const T32 v32_; - const T33 v33_; - const T34 v34_; - const T35 v35_; - const T36 v36_; - const T37 v37_; - const T38 v38_; - const T39 v39_; - const T40 v40_; - const T41 v41_; - const T42 v42_; - const T43 v43_; - const T44 v44_; -}; - -template -class ValueArray45 { - public: - ValueArray45(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, - T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17, - T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25, - T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31, T32 v32, T33 v33, - T34 v34, T35 v35, T36 v36, T37 v37, T38 v38, T39 v39, T40 v40, T41 v41, - T42 v42, T43 v43, T44 v44, T45 v45) : v1_(v1), v2_(v2), v3_(v3), v4_(v4), - v5_(v5), v6_(v6), v7_(v7), v8_(v8), v9_(v9), v10_(v10), v11_(v11), - v12_(v12), v13_(v13), v14_(v14), v15_(v15), v16_(v16), v17_(v17), - v18_(v18), v19_(v19), v20_(v20), v21_(v21), v22_(v22), v23_(v23), - v24_(v24), v25_(v25), v26_(v26), v27_(v27), v28_(v28), v29_(v29), - v30_(v30), v31_(v31), v32_(v32), v33_(v33), v34_(v34), v35_(v35), - v36_(v36), v37_(v37), v38_(v38), v39_(v39), v40_(v40), v41_(v41), - v42_(v42), v43_(v43), v44_(v44), v45_(v45) {} - - template - operator ParamGenerator() const { - const T array[] = {static_cast(v1_), static_cast(v2_), - static_cast(v3_), static_cast(v4_), static_cast(v5_), - static_cast(v6_), static_cast(v7_), static_cast(v8_), - static_cast(v9_), static_cast(v10_), static_cast(v11_), - static_cast(v12_), static_cast(v13_), static_cast(v14_), - static_cast(v15_), static_cast(v16_), static_cast(v17_), - static_cast(v18_), static_cast(v19_), static_cast(v20_), - static_cast(v21_), static_cast(v22_), static_cast(v23_), - static_cast(v24_), static_cast(v25_), static_cast(v26_), - static_cast(v27_), static_cast(v28_), static_cast(v29_), - static_cast(v30_), static_cast(v31_), static_cast(v32_), - static_cast(v33_), static_cast(v34_), static_cast(v35_), - static_cast(v36_), static_cast(v37_), static_cast(v38_), - static_cast(v39_), static_cast(v40_), static_cast(v41_), - static_cast(v42_), static_cast(v43_), static_cast(v44_), - static_cast(v45_)}; - return ValuesIn(array); - } - - private: - // No implementation - assignment is unsupported. - void operator=(const ValueArray45& other); - - const T1 v1_; - const T2 v2_; - const T3 v3_; - const T4 v4_; - const T5 v5_; - const T6 v6_; - const T7 v7_; - const T8 v8_; - const T9 v9_; - const T10 v10_; - const T11 v11_; - const T12 v12_; - const T13 v13_; - const T14 v14_; - const T15 v15_; - const T16 v16_; - const T17 v17_; - const T18 v18_; - const T19 v19_; - const T20 v20_; - const T21 v21_; - const T22 v22_; - const T23 v23_; - const T24 v24_; - const T25 v25_; - const T26 v26_; - const T27 v27_; - const T28 v28_; - const T29 v29_; - const T30 v30_; - const T31 v31_; - const T32 v32_; - const T33 v33_; - const T34 v34_; - const T35 v35_; - const T36 v36_; - const T37 v37_; - const T38 v38_; - const T39 v39_; - const T40 v40_; - const T41 v41_; - const T42 v42_; - const T43 v43_; - const T44 v44_; - const T45 v45_; -}; - -template -class ValueArray46 { - public: - ValueArray46(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, - T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17, - T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25, - T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31, T32 v32, T33 v33, - T34 v34, T35 v35, T36 v36, T37 v37, T38 v38, T39 v39, T40 v40, T41 v41, - T42 v42, T43 v43, T44 v44, T45 v45, T46 v46) : v1_(v1), v2_(v2), v3_(v3), - v4_(v4), v5_(v5), v6_(v6), v7_(v7), v8_(v8), v9_(v9), v10_(v10), - v11_(v11), v12_(v12), v13_(v13), v14_(v14), v15_(v15), v16_(v16), - v17_(v17), v18_(v18), v19_(v19), v20_(v20), v21_(v21), v22_(v22), - v23_(v23), v24_(v24), v25_(v25), v26_(v26), v27_(v27), v28_(v28), - v29_(v29), v30_(v30), v31_(v31), v32_(v32), v33_(v33), v34_(v34), - v35_(v35), v36_(v36), v37_(v37), v38_(v38), v39_(v39), v40_(v40), - v41_(v41), v42_(v42), v43_(v43), v44_(v44), v45_(v45), v46_(v46) {} - - template - operator ParamGenerator() const { - const T array[] = {static_cast(v1_), static_cast(v2_), - static_cast(v3_), static_cast(v4_), static_cast(v5_), - static_cast(v6_), static_cast(v7_), static_cast(v8_), - static_cast(v9_), static_cast(v10_), static_cast(v11_), - static_cast(v12_), static_cast(v13_), static_cast(v14_), - static_cast(v15_), static_cast(v16_), static_cast(v17_), - static_cast(v18_), static_cast(v19_), static_cast(v20_), - static_cast(v21_), static_cast(v22_), static_cast(v23_), - static_cast(v24_), static_cast(v25_), static_cast(v26_), - static_cast(v27_), static_cast(v28_), static_cast(v29_), - static_cast(v30_), static_cast(v31_), static_cast(v32_), - static_cast(v33_), static_cast(v34_), static_cast(v35_), - static_cast(v36_), static_cast(v37_), static_cast(v38_), - static_cast(v39_), static_cast(v40_), static_cast(v41_), - static_cast(v42_), static_cast(v43_), static_cast(v44_), - static_cast(v45_), static_cast(v46_)}; - return ValuesIn(array); - } - - private: - // No implementation - assignment is unsupported. - void operator=(const ValueArray46& other); - - const T1 v1_; - const T2 v2_; - const T3 v3_; - const T4 v4_; - const T5 v5_; - const T6 v6_; - const T7 v7_; - const T8 v8_; - const T9 v9_; - const T10 v10_; - const T11 v11_; - const T12 v12_; - const T13 v13_; - const T14 v14_; - const T15 v15_; - const T16 v16_; - const T17 v17_; - const T18 v18_; - const T19 v19_; - const T20 v20_; - const T21 v21_; - const T22 v22_; - const T23 v23_; - const T24 v24_; - const T25 v25_; - const T26 v26_; - const T27 v27_; - const T28 v28_; - const T29 v29_; - const T30 v30_; - const T31 v31_; - const T32 v32_; - const T33 v33_; - const T34 v34_; - const T35 v35_; - const T36 v36_; - const T37 v37_; - const T38 v38_; - const T39 v39_; - const T40 v40_; - const T41 v41_; - const T42 v42_; - const T43 v43_; - const T44 v44_; - const T45 v45_; - const T46 v46_; -}; - -template -class ValueArray47 { - public: - ValueArray47(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, - T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17, - T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25, - T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31, T32 v32, T33 v33, - T34 v34, T35 v35, T36 v36, T37 v37, T38 v38, T39 v39, T40 v40, T41 v41, - T42 v42, T43 v43, T44 v44, T45 v45, T46 v46, T47 v47) : v1_(v1), v2_(v2), - v3_(v3), v4_(v4), v5_(v5), v6_(v6), v7_(v7), v8_(v8), v9_(v9), v10_(v10), - v11_(v11), v12_(v12), v13_(v13), v14_(v14), v15_(v15), v16_(v16), - v17_(v17), v18_(v18), v19_(v19), v20_(v20), v21_(v21), v22_(v22), - v23_(v23), v24_(v24), v25_(v25), v26_(v26), v27_(v27), v28_(v28), - v29_(v29), v30_(v30), v31_(v31), v32_(v32), v33_(v33), v34_(v34), - v35_(v35), v36_(v36), v37_(v37), v38_(v38), v39_(v39), v40_(v40), - v41_(v41), v42_(v42), v43_(v43), v44_(v44), v45_(v45), v46_(v46), - v47_(v47) {} - - template - operator ParamGenerator() const { - const T array[] = {static_cast(v1_), static_cast(v2_), - static_cast(v3_), static_cast(v4_), static_cast(v5_), - static_cast(v6_), static_cast(v7_), static_cast(v8_), - static_cast(v9_), static_cast(v10_), static_cast(v11_), - static_cast(v12_), static_cast(v13_), static_cast(v14_), - static_cast(v15_), static_cast(v16_), static_cast(v17_), - static_cast(v18_), static_cast(v19_), static_cast(v20_), - static_cast(v21_), static_cast(v22_), static_cast(v23_), - static_cast(v24_), static_cast(v25_), static_cast(v26_), - static_cast(v27_), static_cast(v28_), static_cast(v29_), - static_cast(v30_), static_cast(v31_), static_cast(v32_), - static_cast(v33_), static_cast(v34_), static_cast(v35_), - static_cast(v36_), static_cast(v37_), static_cast(v38_), - static_cast(v39_), static_cast(v40_), static_cast(v41_), - static_cast(v42_), static_cast(v43_), static_cast(v44_), - static_cast(v45_), static_cast(v46_), static_cast(v47_)}; - return ValuesIn(array); - } - - private: - // No implementation - assignment is unsupported. - void operator=(const ValueArray47& other); - - const T1 v1_; - const T2 v2_; - const T3 v3_; - const T4 v4_; - const T5 v5_; - const T6 v6_; - const T7 v7_; - const T8 v8_; - const T9 v9_; - const T10 v10_; - const T11 v11_; - const T12 v12_; - const T13 v13_; - const T14 v14_; - const T15 v15_; - const T16 v16_; - const T17 v17_; - const T18 v18_; - const T19 v19_; - const T20 v20_; - const T21 v21_; - const T22 v22_; - const T23 v23_; - const T24 v24_; - const T25 v25_; - const T26 v26_; - const T27 v27_; - const T28 v28_; - const T29 v29_; - const T30 v30_; - const T31 v31_; - const T32 v32_; - const T33 v33_; - const T34 v34_; - const T35 v35_; - const T36 v36_; - const T37 v37_; - const T38 v38_; - const T39 v39_; - const T40 v40_; - const T41 v41_; - const T42 v42_; - const T43 v43_; - const T44 v44_; - const T45 v45_; - const T46 v46_; - const T47 v47_; -}; - -template -class ValueArray48 { - public: - ValueArray48(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, - T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17, - T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25, - T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31, T32 v32, T33 v33, - T34 v34, T35 v35, T36 v36, T37 v37, T38 v38, T39 v39, T40 v40, T41 v41, - T42 v42, T43 v43, T44 v44, T45 v45, T46 v46, T47 v47, T48 v48) : v1_(v1), - v2_(v2), v3_(v3), v4_(v4), v5_(v5), v6_(v6), v7_(v7), v8_(v8), v9_(v9), - v10_(v10), v11_(v11), v12_(v12), v13_(v13), v14_(v14), v15_(v15), - v16_(v16), v17_(v17), v18_(v18), v19_(v19), v20_(v20), v21_(v21), - v22_(v22), v23_(v23), v24_(v24), v25_(v25), v26_(v26), v27_(v27), - v28_(v28), v29_(v29), v30_(v30), v31_(v31), v32_(v32), v33_(v33), - v34_(v34), v35_(v35), v36_(v36), v37_(v37), v38_(v38), v39_(v39), - v40_(v40), v41_(v41), v42_(v42), v43_(v43), v44_(v44), v45_(v45), - v46_(v46), v47_(v47), v48_(v48) {} - - template - operator ParamGenerator() const { - const T array[] = {static_cast(v1_), static_cast(v2_), - static_cast(v3_), static_cast(v4_), static_cast(v5_), - static_cast(v6_), static_cast(v7_), static_cast(v8_), - static_cast(v9_), static_cast(v10_), static_cast(v11_), - static_cast(v12_), static_cast(v13_), static_cast(v14_), - static_cast(v15_), static_cast(v16_), static_cast(v17_), - static_cast(v18_), static_cast(v19_), static_cast(v20_), - static_cast(v21_), static_cast(v22_), static_cast(v23_), - static_cast(v24_), static_cast(v25_), static_cast(v26_), - static_cast(v27_), static_cast(v28_), static_cast(v29_), - static_cast(v30_), static_cast(v31_), static_cast(v32_), - static_cast(v33_), static_cast(v34_), static_cast(v35_), - static_cast(v36_), static_cast(v37_), static_cast(v38_), - static_cast(v39_), static_cast(v40_), static_cast(v41_), - static_cast(v42_), static_cast(v43_), static_cast(v44_), - static_cast(v45_), static_cast(v46_), static_cast(v47_), - static_cast(v48_)}; - return ValuesIn(array); - } - - private: - // No implementation - assignment is unsupported. - void operator=(const ValueArray48& other); - - const T1 v1_; - const T2 v2_; - const T3 v3_; - const T4 v4_; - const T5 v5_; - const T6 v6_; - const T7 v7_; - const T8 v8_; - const T9 v9_; - const T10 v10_; - const T11 v11_; - const T12 v12_; - const T13 v13_; - const T14 v14_; - const T15 v15_; - const T16 v16_; - const T17 v17_; - const T18 v18_; - const T19 v19_; - const T20 v20_; - const T21 v21_; - const T22 v22_; - const T23 v23_; - const T24 v24_; - const T25 v25_; - const T26 v26_; - const T27 v27_; - const T28 v28_; - const T29 v29_; - const T30 v30_; - const T31 v31_; - const T32 v32_; - const T33 v33_; - const T34 v34_; - const T35 v35_; - const T36 v36_; - const T37 v37_; - const T38 v38_; - const T39 v39_; - const T40 v40_; - const T41 v41_; - const T42 v42_; - const T43 v43_; - const T44 v44_; - const T45 v45_; - const T46 v46_; - const T47 v47_; - const T48 v48_; -}; - -template -class ValueArray49 { - public: - ValueArray49(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, - T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17, - T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25, - T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31, T32 v32, T33 v33, - T34 v34, T35 v35, T36 v36, T37 v37, T38 v38, T39 v39, T40 v40, T41 v41, - T42 v42, T43 v43, T44 v44, T45 v45, T46 v46, T47 v47, T48 v48, - T49 v49) : v1_(v1), v2_(v2), v3_(v3), v4_(v4), v5_(v5), v6_(v6), v7_(v7), - v8_(v8), v9_(v9), v10_(v10), v11_(v11), v12_(v12), v13_(v13), v14_(v14), - v15_(v15), v16_(v16), v17_(v17), v18_(v18), v19_(v19), v20_(v20), - v21_(v21), v22_(v22), v23_(v23), v24_(v24), v25_(v25), v26_(v26), - v27_(v27), v28_(v28), v29_(v29), v30_(v30), v31_(v31), v32_(v32), - v33_(v33), v34_(v34), v35_(v35), v36_(v36), v37_(v37), v38_(v38), - v39_(v39), v40_(v40), v41_(v41), v42_(v42), v43_(v43), v44_(v44), - v45_(v45), v46_(v46), v47_(v47), v48_(v48), v49_(v49) {} - - template - operator ParamGenerator() const { - const T array[] = {static_cast(v1_), static_cast(v2_), - static_cast(v3_), static_cast(v4_), static_cast(v5_), - static_cast(v6_), static_cast(v7_), static_cast(v8_), - static_cast(v9_), static_cast(v10_), static_cast(v11_), - static_cast(v12_), static_cast(v13_), static_cast(v14_), - static_cast(v15_), static_cast(v16_), static_cast(v17_), - static_cast(v18_), static_cast(v19_), static_cast(v20_), - static_cast(v21_), static_cast(v22_), static_cast(v23_), - static_cast(v24_), static_cast(v25_), static_cast(v26_), - static_cast(v27_), static_cast(v28_), static_cast(v29_), - static_cast(v30_), static_cast(v31_), static_cast(v32_), - static_cast(v33_), static_cast(v34_), static_cast(v35_), - static_cast(v36_), static_cast(v37_), static_cast(v38_), - static_cast(v39_), static_cast(v40_), static_cast(v41_), - static_cast(v42_), static_cast(v43_), static_cast(v44_), - static_cast(v45_), static_cast(v46_), static_cast(v47_), - static_cast(v48_), static_cast(v49_)}; - return ValuesIn(array); - } - - private: - // No implementation - assignment is unsupported. - void operator=(const ValueArray49& other); - - const T1 v1_; - const T2 v2_; - const T3 v3_; - const T4 v4_; - const T5 v5_; - const T6 v6_; - const T7 v7_; - const T8 v8_; - const T9 v9_; - const T10 v10_; - const T11 v11_; - const T12 v12_; - const T13 v13_; - const T14 v14_; - const T15 v15_; - const T16 v16_; - const T17 v17_; - const T18 v18_; - const T19 v19_; - const T20 v20_; - const T21 v21_; - const T22 v22_; - const T23 v23_; - const T24 v24_; - const T25 v25_; - const T26 v26_; - const T27 v27_; - const T28 v28_; - const T29 v29_; - const T30 v30_; - const T31 v31_; - const T32 v32_; - const T33 v33_; - const T34 v34_; - const T35 v35_; - const T36 v36_; - const T37 v37_; - const T38 v38_; - const T39 v39_; - const T40 v40_; - const T41 v41_; - const T42 v42_; - const T43 v43_; - const T44 v44_; - const T45 v45_; - const T46 v46_; - const T47 v47_; - const T48 v48_; - const T49 v49_; -}; - -template -class ValueArray50 { - public: - ValueArray50(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, - T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17, - T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25, - T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31, T32 v32, T33 v33, - T34 v34, T35 v35, T36 v36, T37 v37, T38 v38, T39 v39, T40 v40, T41 v41, - T42 v42, T43 v43, T44 v44, T45 v45, T46 v46, T47 v47, T48 v48, T49 v49, - T50 v50) : v1_(v1), v2_(v2), v3_(v3), v4_(v4), v5_(v5), v6_(v6), v7_(v7), - v8_(v8), v9_(v9), v10_(v10), v11_(v11), v12_(v12), v13_(v13), v14_(v14), - v15_(v15), v16_(v16), v17_(v17), v18_(v18), v19_(v19), v20_(v20), - v21_(v21), v22_(v22), v23_(v23), v24_(v24), v25_(v25), v26_(v26), - v27_(v27), v28_(v28), v29_(v29), v30_(v30), v31_(v31), v32_(v32), - v33_(v33), v34_(v34), v35_(v35), v36_(v36), v37_(v37), v38_(v38), - v39_(v39), v40_(v40), v41_(v41), v42_(v42), v43_(v43), v44_(v44), - v45_(v45), v46_(v46), v47_(v47), v48_(v48), v49_(v49), v50_(v50) {} - - template - operator ParamGenerator() const { - const T array[] = {static_cast(v1_), static_cast(v2_), - static_cast(v3_), static_cast(v4_), static_cast(v5_), - static_cast(v6_), static_cast(v7_), static_cast(v8_), - static_cast(v9_), static_cast(v10_), static_cast(v11_), - static_cast(v12_), static_cast(v13_), static_cast(v14_), - static_cast(v15_), static_cast(v16_), static_cast(v17_), - static_cast(v18_), static_cast(v19_), static_cast(v20_), - static_cast(v21_), static_cast(v22_), static_cast(v23_), - static_cast(v24_), static_cast(v25_), static_cast(v26_), - static_cast(v27_), static_cast(v28_), static_cast(v29_), - static_cast(v30_), static_cast(v31_), static_cast(v32_), - static_cast(v33_), static_cast(v34_), static_cast(v35_), - static_cast(v36_), static_cast(v37_), static_cast(v38_), - static_cast(v39_), static_cast(v40_), static_cast(v41_), - static_cast(v42_), static_cast(v43_), static_cast(v44_), - static_cast(v45_), static_cast(v46_), static_cast(v47_), - static_cast(v48_), static_cast(v49_), static_cast(v50_)}; - return ValuesIn(array); - } - - private: - // No implementation - assignment is unsupported. - void operator=(const ValueArray50& other); - - const T1 v1_; - const T2 v2_; - const T3 v3_; - const T4 v4_; - const T5 v5_; - const T6 v6_; - const T7 v7_; - const T8 v8_; - const T9 v9_; - const T10 v10_; - const T11 v11_; - const T12 v12_; - const T13 v13_; - const T14 v14_; - const T15 v15_; - const T16 v16_; - const T17 v17_; - const T18 v18_; - const T19 v19_; - const T20 v20_; - const T21 v21_; - const T22 v22_; - const T23 v23_; - const T24 v24_; - const T25 v25_; - const T26 v26_; - const T27 v27_; - const T28 v28_; - const T29 v29_; - const T30 v30_; - const T31 v31_; - const T32 v32_; - const T33 v33_; - const T34 v34_; - const T35 v35_; - const T36 v36_; - const T37 v37_; - const T38 v38_; - const T39 v39_; - const T40 v40_; - const T41 v41_; - const T42 v42_; - const T43 v43_; - const T44 v44_; - const T45 v45_; - const T46 v46_; - const T47 v47_; - const T48 v48_; - const T49 v49_; - const T50 v50_; -}; - -# if GTEST_HAS_COMBINE -// INTERNAL IMPLEMENTATION - DO NOT USE IN USER CODE. -// -// Generates values from the Cartesian product of values produced -// by the argument generators. -// -template -class CartesianProductGenerator2 - : public ParamGeneratorInterface< ::std::tr1::tuple > { - public: - typedef ::std::tr1::tuple ParamType; - - CartesianProductGenerator2(const ParamGenerator& g1, - const ParamGenerator& g2) - : g1_(g1), g2_(g2) {} - virtual ~CartesianProductGenerator2() {} - - virtual ParamIteratorInterface* Begin() const { - return new Iterator(this, g1_, g1_.begin(), g2_, g2_.begin()); - } - virtual ParamIteratorInterface* End() const { - return new Iterator(this, g1_, g1_.end(), g2_, g2_.end()); - } - - private: - class Iterator : public ParamIteratorInterface { - public: - Iterator(const ParamGeneratorInterface* base, - const ParamGenerator& g1, - const typename ParamGenerator::iterator& current1, - const ParamGenerator& g2, - const typename ParamGenerator::iterator& current2) - : base_(base), - begin1_(g1.begin()), end1_(g1.end()), current1_(current1), - begin2_(g2.begin()), end2_(g2.end()), current2_(current2) { - ComputeCurrentValue(); - } - virtual ~Iterator() {} - - virtual const ParamGeneratorInterface* BaseGenerator() const { - return base_; - } - // Advance should not be called on beyond-of-range iterators - // so no component iterators must be beyond end of range, either. - virtual void Advance() { - assert(!AtEnd()); - ++current2_; - if (current2_ == end2_) { - current2_ = begin2_; - ++current1_; - } - ComputeCurrentValue(); - } - virtual ParamIteratorInterface* Clone() const { - return new Iterator(*this); - } - virtual const ParamType* Current() const { return ¤t_value_; } - virtual bool Equals(const ParamIteratorInterface& other) const { - // Having the same base generator guarantees that the other - // iterator is of the same type and we can downcast. - GTEST_CHECK_(BaseGenerator() == other.BaseGenerator()) - << "The program attempted to compare iterators " - << "from different generators." << std::endl; - const Iterator* typed_other = - CheckedDowncastToActualType(&other); - // We must report iterators equal if they both point beyond their - // respective ranges. That can happen in a variety of fashions, - // so we have to consult AtEnd(). - return (AtEnd() && typed_other->AtEnd()) || - ( - current1_ == typed_other->current1_ && - current2_ == typed_other->current2_); - } - - private: - Iterator(const Iterator& other) - : base_(other.base_), - begin1_(other.begin1_), - end1_(other.end1_), - current1_(other.current1_), - begin2_(other.begin2_), - end2_(other.end2_), - current2_(other.current2_) { - ComputeCurrentValue(); - } - - void ComputeCurrentValue() { - if (!AtEnd()) - current_value_ = ParamType(*current1_, *current2_); - } - bool AtEnd() const { - // We must report iterator past the end of the range when either of the - // component iterators has reached the end of its range. - return - current1_ == end1_ || - current2_ == end2_; - } - - // No implementation - assignment is unsupported. - void operator=(const Iterator& other); - - const ParamGeneratorInterface* const base_; - // begin[i]_ and end[i]_ define the i-th range that Iterator traverses. - // current[i]_ is the actual traversing iterator. - const typename ParamGenerator::iterator begin1_; - const typename ParamGenerator::iterator end1_; - typename ParamGenerator::iterator current1_; - const typename ParamGenerator::iterator begin2_; - const typename ParamGenerator::iterator end2_; - typename ParamGenerator::iterator current2_; - ParamType current_value_; - }; // class CartesianProductGenerator2::Iterator - - // No implementation - assignment is unsupported. - void operator=(const CartesianProductGenerator2& other); - - const ParamGenerator g1_; - const ParamGenerator g2_; -}; // class CartesianProductGenerator2 - - -template -class CartesianProductGenerator3 - : public ParamGeneratorInterface< ::std::tr1::tuple > { - public: - typedef ::std::tr1::tuple ParamType; - - CartesianProductGenerator3(const ParamGenerator& g1, - const ParamGenerator& g2, const ParamGenerator& g3) - : g1_(g1), g2_(g2), g3_(g3) {} - virtual ~CartesianProductGenerator3() {} - - virtual ParamIteratorInterface* Begin() const { - return new Iterator(this, g1_, g1_.begin(), g2_, g2_.begin(), g3_, - g3_.begin()); - } - virtual ParamIteratorInterface* End() const { - return new Iterator(this, g1_, g1_.end(), g2_, g2_.end(), g3_, g3_.end()); - } - - private: - class Iterator : public ParamIteratorInterface { - public: - Iterator(const ParamGeneratorInterface* base, - const ParamGenerator& g1, - const typename ParamGenerator::iterator& current1, - const ParamGenerator& g2, - const typename ParamGenerator::iterator& current2, - const ParamGenerator& g3, - const typename ParamGenerator::iterator& current3) - : base_(base), - begin1_(g1.begin()), end1_(g1.end()), current1_(current1), - begin2_(g2.begin()), end2_(g2.end()), current2_(current2), - begin3_(g3.begin()), end3_(g3.end()), current3_(current3) { - ComputeCurrentValue(); - } - virtual ~Iterator() {} - - virtual const ParamGeneratorInterface* BaseGenerator() const { - return base_; - } - // Advance should not be called on beyond-of-range iterators - // so no component iterators must be beyond end of range, either. - virtual void Advance() { - assert(!AtEnd()); - ++current3_; - if (current3_ == end3_) { - current3_ = begin3_; - ++current2_; - } - if (current2_ == end2_) { - current2_ = begin2_; - ++current1_; - } - ComputeCurrentValue(); - } - virtual ParamIteratorInterface* Clone() const { - return new Iterator(*this); - } - virtual const ParamType* Current() const { return ¤t_value_; } - virtual bool Equals(const ParamIteratorInterface& other) const { - // Having the same base generator guarantees that the other - // iterator is of the same type and we can downcast. - GTEST_CHECK_(BaseGenerator() == other.BaseGenerator()) - << "The program attempted to compare iterators " - << "from different generators." << std::endl; - const Iterator* typed_other = - CheckedDowncastToActualType(&other); - // We must report iterators equal if they both point beyond their - // respective ranges. That can happen in a variety of fashions, - // so we have to consult AtEnd(). - return (AtEnd() && typed_other->AtEnd()) || - ( - current1_ == typed_other->current1_ && - current2_ == typed_other->current2_ && - current3_ == typed_other->current3_); - } - - private: - Iterator(const Iterator& other) - : base_(other.base_), - begin1_(other.begin1_), - end1_(other.end1_), - current1_(other.current1_), - begin2_(other.begin2_), - end2_(other.end2_), - current2_(other.current2_), - begin3_(other.begin3_), - end3_(other.end3_), - current3_(other.current3_) { - ComputeCurrentValue(); - } - - void ComputeCurrentValue() { - if (!AtEnd()) - current_value_ = ParamType(*current1_, *current2_, *current3_); - } - bool AtEnd() const { - // We must report iterator past the end of the range when either of the - // component iterators has reached the end of its range. - return - current1_ == end1_ || - current2_ == end2_ || - current3_ == end3_; - } - - // No implementation - assignment is unsupported. - void operator=(const Iterator& other); - - const ParamGeneratorInterface* const base_; - // begin[i]_ and end[i]_ define the i-th range that Iterator traverses. - // current[i]_ is the actual traversing iterator. - const typename ParamGenerator::iterator begin1_; - const typename ParamGenerator::iterator end1_; - typename ParamGenerator::iterator current1_; - const typename ParamGenerator::iterator begin2_; - const typename ParamGenerator::iterator end2_; - typename ParamGenerator::iterator current2_; - const typename ParamGenerator::iterator begin3_; - const typename ParamGenerator::iterator end3_; - typename ParamGenerator::iterator current3_; - ParamType current_value_; - }; // class CartesianProductGenerator3::Iterator - - // No implementation - assignment is unsupported. - void operator=(const CartesianProductGenerator3& other); - - const ParamGenerator g1_; - const ParamGenerator g2_; - const ParamGenerator g3_; -}; // class CartesianProductGenerator3 - - -template -class CartesianProductGenerator4 - : public ParamGeneratorInterface< ::std::tr1::tuple > { - public: - typedef ::std::tr1::tuple ParamType; - - CartesianProductGenerator4(const ParamGenerator& g1, - const ParamGenerator& g2, const ParamGenerator& g3, - const ParamGenerator& g4) - : g1_(g1), g2_(g2), g3_(g3), g4_(g4) {} - virtual ~CartesianProductGenerator4() {} - - virtual ParamIteratorInterface* Begin() const { - return new Iterator(this, g1_, g1_.begin(), g2_, g2_.begin(), g3_, - g3_.begin(), g4_, g4_.begin()); - } - virtual ParamIteratorInterface* End() const { - return new Iterator(this, g1_, g1_.end(), g2_, g2_.end(), g3_, g3_.end(), - g4_, g4_.end()); - } - - private: - class Iterator : public ParamIteratorInterface { - public: - Iterator(const ParamGeneratorInterface* base, - const ParamGenerator& g1, - const typename ParamGenerator::iterator& current1, - const ParamGenerator& g2, - const typename ParamGenerator::iterator& current2, - const ParamGenerator& g3, - const typename ParamGenerator::iterator& current3, - const ParamGenerator& g4, - const typename ParamGenerator::iterator& current4) - : base_(base), - begin1_(g1.begin()), end1_(g1.end()), current1_(current1), - begin2_(g2.begin()), end2_(g2.end()), current2_(current2), - begin3_(g3.begin()), end3_(g3.end()), current3_(current3), - begin4_(g4.begin()), end4_(g4.end()), current4_(current4) { - ComputeCurrentValue(); - } - virtual ~Iterator() {} - - virtual const ParamGeneratorInterface* BaseGenerator() const { - return base_; - } - // Advance should not be called on beyond-of-range iterators - // so no component iterators must be beyond end of range, either. - virtual void Advance() { - assert(!AtEnd()); - ++current4_; - if (current4_ == end4_) { - current4_ = begin4_; - ++current3_; - } - if (current3_ == end3_) { - current3_ = begin3_; - ++current2_; - } - if (current2_ == end2_) { - current2_ = begin2_; - ++current1_; - } - ComputeCurrentValue(); - } - virtual ParamIteratorInterface* Clone() const { - return new Iterator(*this); - } - virtual const ParamType* Current() const { return ¤t_value_; } - virtual bool Equals(const ParamIteratorInterface& other) const { - // Having the same base generator guarantees that the other - // iterator is of the same type and we can downcast. - GTEST_CHECK_(BaseGenerator() == other.BaseGenerator()) - << "The program attempted to compare iterators " - << "from different generators." << std::endl; - const Iterator* typed_other = - CheckedDowncastToActualType(&other); - // We must report iterators equal if they both point beyond their - // respective ranges. That can happen in a variety of fashions, - // so we have to consult AtEnd(). - return (AtEnd() && typed_other->AtEnd()) || - ( - current1_ == typed_other->current1_ && - current2_ == typed_other->current2_ && - current3_ == typed_other->current3_ && - current4_ == typed_other->current4_); - } - - private: - Iterator(const Iterator& other) - : base_(other.base_), - begin1_(other.begin1_), - end1_(other.end1_), - current1_(other.current1_), - begin2_(other.begin2_), - end2_(other.end2_), - current2_(other.current2_), - begin3_(other.begin3_), - end3_(other.end3_), - current3_(other.current3_), - begin4_(other.begin4_), - end4_(other.end4_), - current4_(other.current4_) { - ComputeCurrentValue(); - } - - void ComputeCurrentValue() { - if (!AtEnd()) - current_value_ = ParamType(*current1_, *current2_, *current3_, - *current4_); - } - bool AtEnd() const { - // We must report iterator past the end of the range when either of the - // component iterators has reached the end of its range. - return - current1_ == end1_ || - current2_ == end2_ || - current3_ == end3_ || - current4_ == end4_; - } - - // No implementation - assignment is unsupported. - void operator=(const Iterator& other); - - const ParamGeneratorInterface* const base_; - // begin[i]_ and end[i]_ define the i-th range that Iterator traverses. - // current[i]_ is the actual traversing iterator. - const typename ParamGenerator::iterator begin1_; - const typename ParamGenerator::iterator end1_; - typename ParamGenerator::iterator current1_; - const typename ParamGenerator::iterator begin2_; - const typename ParamGenerator::iterator end2_; - typename ParamGenerator::iterator current2_; - const typename ParamGenerator::iterator begin3_; - const typename ParamGenerator::iterator end3_; - typename ParamGenerator::iterator current3_; - const typename ParamGenerator::iterator begin4_; - const typename ParamGenerator::iterator end4_; - typename ParamGenerator::iterator current4_; - ParamType current_value_; - }; // class CartesianProductGenerator4::Iterator - - // No implementation - assignment is unsupported. - void operator=(const CartesianProductGenerator4& other); - - const ParamGenerator g1_; - const ParamGenerator g2_; - const ParamGenerator g3_; - const ParamGenerator g4_; -}; // class CartesianProductGenerator4 - - -template -class CartesianProductGenerator5 - : public ParamGeneratorInterface< ::std::tr1::tuple > { - public: - typedef ::std::tr1::tuple ParamType; - - CartesianProductGenerator5(const ParamGenerator& g1, - const ParamGenerator& g2, const ParamGenerator& g3, - const ParamGenerator& g4, const ParamGenerator& g5) - : g1_(g1), g2_(g2), g3_(g3), g4_(g4), g5_(g5) {} - virtual ~CartesianProductGenerator5() {} - - virtual ParamIteratorInterface* Begin() const { - return new Iterator(this, g1_, g1_.begin(), g2_, g2_.begin(), g3_, - g3_.begin(), g4_, g4_.begin(), g5_, g5_.begin()); - } - virtual ParamIteratorInterface* End() const { - return new Iterator(this, g1_, g1_.end(), g2_, g2_.end(), g3_, g3_.end(), - g4_, g4_.end(), g5_, g5_.end()); - } - - private: - class Iterator : public ParamIteratorInterface { - public: - Iterator(const ParamGeneratorInterface* base, - const ParamGenerator& g1, - const typename ParamGenerator::iterator& current1, - const ParamGenerator& g2, - const typename ParamGenerator::iterator& current2, - const ParamGenerator& g3, - const typename ParamGenerator::iterator& current3, - const ParamGenerator& g4, - const typename ParamGenerator::iterator& current4, - const ParamGenerator& g5, - const typename ParamGenerator::iterator& current5) - : base_(base), - begin1_(g1.begin()), end1_(g1.end()), current1_(current1), - begin2_(g2.begin()), end2_(g2.end()), current2_(current2), - begin3_(g3.begin()), end3_(g3.end()), current3_(current3), - begin4_(g4.begin()), end4_(g4.end()), current4_(current4), - begin5_(g5.begin()), end5_(g5.end()), current5_(current5) { - ComputeCurrentValue(); - } - virtual ~Iterator() {} - - virtual const ParamGeneratorInterface* BaseGenerator() const { - return base_; - } - // Advance should not be called on beyond-of-range iterators - // so no component iterators must be beyond end of range, either. - virtual void Advance() { - assert(!AtEnd()); - ++current5_; - if (current5_ == end5_) { - current5_ = begin5_; - ++current4_; - } - if (current4_ == end4_) { - current4_ = begin4_; - ++current3_; - } - if (current3_ == end3_) { - current3_ = begin3_; - ++current2_; - } - if (current2_ == end2_) { - current2_ = begin2_; - ++current1_; - } - ComputeCurrentValue(); - } - virtual ParamIteratorInterface* Clone() const { - return new Iterator(*this); - } - virtual const ParamType* Current() const { return ¤t_value_; } - virtual bool Equals(const ParamIteratorInterface& other) const { - // Having the same base generator guarantees that the other - // iterator is of the same type and we can downcast. - GTEST_CHECK_(BaseGenerator() == other.BaseGenerator()) - << "The program attempted to compare iterators " - << "from different generators." << std::endl; - const Iterator* typed_other = - CheckedDowncastToActualType(&other); - // We must report iterators equal if they both point beyond their - // respective ranges. That can happen in a variety of fashions, - // so we have to consult AtEnd(). - return (AtEnd() && typed_other->AtEnd()) || - ( - current1_ == typed_other->current1_ && - current2_ == typed_other->current2_ && - current3_ == typed_other->current3_ && - current4_ == typed_other->current4_ && - current5_ == typed_other->current5_); - } - - private: - Iterator(const Iterator& other) - : base_(other.base_), - begin1_(other.begin1_), - end1_(other.end1_), - current1_(other.current1_), - begin2_(other.begin2_), - end2_(other.end2_), - current2_(other.current2_), - begin3_(other.begin3_), - end3_(other.end3_), - current3_(other.current3_), - begin4_(other.begin4_), - end4_(other.end4_), - current4_(other.current4_), - begin5_(other.begin5_), - end5_(other.end5_), - current5_(other.current5_) { - ComputeCurrentValue(); - } - - void ComputeCurrentValue() { - if (!AtEnd()) - current_value_ = ParamType(*current1_, *current2_, *current3_, - *current4_, *current5_); - } - bool AtEnd() const { - // We must report iterator past the end of the range when either of the - // component iterators has reached the end of its range. - return - current1_ == end1_ || - current2_ == end2_ || - current3_ == end3_ || - current4_ == end4_ || - current5_ == end5_; - } - - // No implementation - assignment is unsupported. - void operator=(const Iterator& other); - - const ParamGeneratorInterface* const base_; - // begin[i]_ and end[i]_ define the i-th range that Iterator traverses. - // current[i]_ is the actual traversing iterator. - const typename ParamGenerator::iterator begin1_; - const typename ParamGenerator::iterator end1_; - typename ParamGenerator::iterator current1_; - const typename ParamGenerator::iterator begin2_; - const typename ParamGenerator::iterator end2_; - typename ParamGenerator::iterator current2_; - const typename ParamGenerator::iterator begin3_; - const typename ParamGenerator::iterator end3_; - typename ParamGenerator::iterator current3_; - const typename ParamGenerator::iterator begin4_; - const typename ParamGenerator::iterator end4_; - typename ParamGenerator::iterator current4_; - const typename ParamGenerator::iterator begin5_; - const typename ParamGenerator::iterator end5_; - typename ParamGenerator::iterator current5_; - ParamType current_value_; - }; // class CartesianProductGenerator5::Iterator - - // No implementation - assignment is unsupported. - void operator=(const CartesianProductGenerator5& other); - - const ParamGenerator g1_; - const ParamGenerator g2_; - const ParamGenerator g3_; - const ParamGenerator g4_; - const ParamGenerator g5_; -}; // class CartesianProductGenerator5 - - -template -class CartesianProductGenerator6 - : public ParamGeneratorInterface< ::std::tr1::tuple > { - public: - typedef ::std::tr1::tuple ParamType; - - CartesianProductGenerator6(const ParamGenerator& g1, - const ParamGenerator& g2, const ParamGenerator& g3, - const ParamGenerator& g4, const ParamGenerator& g5, - const ParamGenerator& g6) - : g1_(g1), g2_(g2), g3_(g3), g4_(g4), g5_(g5), g6_(g6) {} - virtual ~CartesianProductGenerator6() {} - - virtual ParamIteratorInterface* Begin() const { - return new Iterator(this, g1_, g1_.begin(), g2_, g2_.begin(), g3_, - g3_.begin(), g4_, g4_.begin(), g5_, g5_.begin(), g6_, g6_.begin()); - } - virtual ParamIteratorInterface* End() const { - return new Iterator(this, g1_, g1_.end(), g2_, g2_.end(), g3_, g3_.end(), - g4_, g4_.end(), g5_, g5_.end(), g6_, g6_.end()); - } - - private: - class Iterator : public ParamIteratorInterface { - public: - Iterator(const ParamGeneratorInterface* base, - const ParamGenerator& g1, - const typename ParamGenerator::iterator& current1, - const ParamGenerator& g2, - const typename ParamGenerator::iterator& current2, - const ParamGenerator& g3, - const typename ParamGenerator::iterator& current3, - const ParamGenerator& g4, - const typename ParamGenerator::iterator& current4, - const ParamGenerator& g5, - const typename ParamGenerator::iterator& current5, - const ParamGenerator& g6, - const typename ParamGenerator::iterator& current6) - : base_(base), - begin1_(g1.begin()), end1_(g1.end()), current1_(current1), - begin2_(g2.begin()), end2_(g2.end()), current2_(current2), - begin3_(g3.begin()), end3_(g3.end()), current3_(current3), - begin4_(g4.begin()), end4_(g4.end()), current4_(current4), - begin5_(g5.begin()), end5_(g5.end()), current5_(current5), - begin6_(g6.begin()), end6_(g6.end()), current6_(current6) { - ComputeCurrentValue(); - } - virtual ~Iterator() {} - - virtual const ParamGeneratorInterface* BaseGenerator() const { - return base_; - } - // Advance should not be called on beyond-of-range iterators - // so no component iterators must be beyond end of range, either. - virtual void Advance() { - assert(!AtEnd()); - ++current6_; - if (current6_ == end6_) { - current6_ = begin6_; - ++current5_; - } - if (current5_ == end5_) { - current5_ = begin5_; - ++current4_; - } - if (current4_ == end4_) { - current4_ = begin4_; - ++current3_; - } - if (current3_ == end3_) { - current3_ = begin3_; - ++current2_; - } - if (current2_ == end2_) { - current2_ = begin2_; - ++current1_; - } - ComputeCurrentValue(); - } - virtual ParamIteratorInterface* Clone() const { - return new Iterator(*this); - } - virtual const ParamType* Current() const { return ¤t_value_; } - virtual bool Equals(const ParamIteratorInterface& other) const { - // Having the same base generator guarantees that the other - // iterator is of the same type and we can downcast. - GTEST_CHECK_(BaseGenerator() == other.BaseGenerator()) - << "The program attempted to compare iterators " - << "from different generators." << std::endl; - const Iterator* typed_other = - CheckedDowncastToActualType(&other); - // We must report iterators equal if they both point beyond their - // respective ranges. That can happen in a variety of fashions, - // so we have to consult AtEnd(). - return (AtEnd() && typed_other->AtEnd()) || - ( - current1_ == typed_other->current1_ && - current2_ == typed_other->current2_ && - current3_ == typed_other->current3_ && - current4_ == typed_other->current4_ && - current5_ == typed_other->current5_ && - current6_ == typed_other->current6_); - } - - private: - Iterator(const Iterator& other) - : base_(other.base_), - begin1_(other.begin1_), - end1_(other.end1_), - current1_(other.current1_), - begin2_(other.begin2_), - end2_(other.end2_), - current2_(other.current2_), - begin3_(other.begin3_), - end3_(other.end3_), - current3_(other.current3_), - begin4_(other.begin4_), - end4_(other.end4_), - current4_(other.current4_), - begin5_(other.begin5_), - end5_(other.end5_), - current5_(other.current5_), - begin6_(other.begin6_), - end6_(other.end6_), - current6_(other.current6_) { - ComputeCurrentValue(); - } - - void ComputeCurrentValue() { - if (!AtEnd()) - current_value_ = ParamType(*current1_, *current2_, *current3_, - *current4_, *current5_, *current6_); - } - bool AtEnd() const { - // We must report iterator past the end of the range when either of the - // component iterators has reached the end of its range. - return - current1_ == end1_ || - current2_ == end2_ || - current3_ == end3_ || - current4_ == end4_ || - current5_ == end5_ || - current6_ == end6_; - } - - // No implementation - assignment is unsupported. - void operator=(const Iterator& other); - - const ParamGeneratorInterface* const base_; - // begin[i]_ and end[i]_ define the i-th range that Iterator traverses. - // current[i]_ is the actual traversing iterator. - const typename ParamGenerator::iterator begin1_; - const typename ParamGenerator::iterator end1_; - typename ParamGenerator::iterator current1_; - const typename ParamGenerator::iterator begin2_; - const typename ParamGenerator::iterator end2_; - typename ParamGenerator::iterator current2_; - const typename ParamGenerator::iterator begin3_; - const typename ParamGenerator::iterator end3_; - typename ParamGenerator::iterator current3_; - const typename ParamGenerator::iterator begin4_; - const typename ParamGenerator::iterator end4_; - typename ParamGenerator::iterator current4_; - const typename ParamGenerator::iterator begin5_; - const typename ParamGenerator::iterator end5_; - typename ParamGenerator::iterator current5_; - const typename ParamGenerator::iterator begin6_; - const typename ParamGenerator::iterator end6_; - typename ParamGenerator::iterator current6_; - ParamType current_value_; - }; // class CartesianProductGenerator6::Iterator - - // No implementation - assignment is unsupported. - void operator=(const CartesianProductGenerator6& other); - - const ParamGenerator g1_; - const ParamGenerator g2_; - const ParamGenerator g3_; - const ParamGenerator g4_; - const ParamGenerator g5_; - const ParamGenerator g6_; -}; // class CartesianProductGenerator6 - - -template -class CartesianProductGenerator7 - : public ParamGeneratorInterface< ::std::tr1::tuple > { - public: - typedef ::std::tr1::tuple ParamType; - - CartesianProductGenerator7(const ParamGenerator& g1, - const ParamGenerator& g2, const ParamGenerator& g3, - const ParamGenerator& g4, const ParamGenerator& g5, - const ParamGenerator& g6, const ParamGenerator& g7) - : g1_(g1), g2_(g2), g3_(g3), g4_(g4), g5_(g5), g6_(g6), g7_(g7) {} - virtual ~CartesianProductGenerator7() {} - - virtual ParamIteratorInterface* Begin() const { - return new Iterator(this, g1_, g1_.begin(), g2_, g2_.begin(), g3_, - g3_.begin(), g4_, g4_.begin(), g5_, g5_.begin(), g6_, g6_.begin(), g7_, - g7_.begin()); - } - virtual ParamIteratorInterface* End() const { - return new Iterator(this, g1_, g1_.end(), g2_, g2_.end(), g3_, g3_.end(), - g4_, g4_.end(), g5_, g5_.end(), g6_, g6_.end(), g7_, g7_.end()); - } - - private: - class Iterator : public ParamIteratorInterface { - public: - Iterator(const ParamGeneratorInterface* base, - const ParamGenerator& g1, - const typename ParamGenerator::iterator& current1, - const ParamGenerator& g2, - const typename ParamGenerator::iterator& current2, - const ParamGenerator& g3, - const typename ParamGenerator::iterator& current3, - const ParamGenerator& g4, - const typename ParamGenerator::iterator& current4, - const ParamGenerator& g5, - const typename ParamGenerator::iterator& current5, - const ParamGenerator& g6, - const typename ParamGenerator::iterator& current6, - const ParamGenerator& g7, - const typename ParamGenerator::iterator& current7) - : base_(base), - begin1_(g1.begin()), end1_(g1.end()), current1_(current1), - begin2_(g2.begin()), end2_(g2.end()), current2_(current2), - begin3_(g3.begin()), end3_(g3.end()), current3_(current3), - begin4_(g4.begin()), end4_(g4.end()), current4_(current4), - begin5_(g5.begin()), end5_(g5.end()), current5_(current5), - begin6_(g6.begin()), end6_(g6.end()), current6_(current6), - begin7_(g7.begin()), end7_(g7.end()), current7_(current7) { - ComputeCurrentValue(); - } - virtual ~Iterator() {} - - virtual const ParamGeneratorInterface* BaseGenerator() const { - return base_; - } - // Advance should not be called on beyond-of-range iterators - // so no component iterators must be beyond end of range, either. - virtual void Advance() { - assert(!AtEnd()); - ++current7_; - if (current7_ == end7_) { - current7_ = begin7_; - ++current6_; - } - if (current6_ == end6_) { - current6_ = begin6_; - ++current5_; - } - if (current5_ == end5_) { - current5_ = begin5_; - ++current4_; - } - if (current4_ == end4_) { - current4_ = begin4_; - ++current3_; - } - if (current3_ == end3_) { - current3_ = begin3_; - ++current2_; - } - if (current2_ == end2_) { - current2_ = begin2_; - ++current1_; - } - ComputeCurrentValue(); - } - virtual ParamIteratorInterface* Clone() const { - return new Iterator(*this); - } - virtual const ParamType* Current() const { return ¤t_value_; } - virtual bool Equals(const ParamIteratorInterface& other) const { - // Having the same base generator guarantees that the other - // iterator is of the same type and we can downcast. - GTEST_CHECK_(BaseGenerator() == other.BaseGenerator()) - << "The program attempted to compare iterators " - << "from different generators." << std::endl; - const Iterator* typed_other = - CheckedDowncastToActualType(&other); - // We must report iterators equal if they both point beyond their - // respective ranges. That can happen in a variety of fashions, - // so we have to consult AtEnd(). - return (AtEnd() && typed_other->AtEnd()) || - ( - current1_ == typed_other->current1_ && - current2_ == typed_other->current2_ && - current3_ == typed_other->current3_ && - current4_ == typed_other->current4_ && - current5_ == typed_other->current5_ && - current6_ == typed_other->current6_ && - current7_ == typed_other->current7_); - } - - private: - Iterator(const Iterator& other) - : base_(other.base_), - begin1_(other.begin1_), - end1_(other.end1_), - current1_(other.current1_), - begin2_(other.begin2_), - end2_(other.end2_), - current2_(other.current2_), - begin3_(other.begin3_), - end3_(other.end3_), - current3_(other.current3_), - begin4_(other.begin4_), - end4_(other.end4_), - current4_(other.current4_), - begin5_(other.begin5_), - end5_(other.end5_), - current5_(other.current5_), - begin6_(other.begin6_), - end6_(other.end6_), - current6_(other.current6_), - begin7_(other.begin7_), - end7_(other.end7_), - current7_(other.current7_) { - ComputeCurrentValue(); - } - - void ComputeCurrentValue() { - if (!AtEnd()) - current_value_ = ParamType(*current1_, *current2_, *current3_, - *current4_, *current5_, *current6_, *current7_); - } - bool AtEnd() const { - // We must report iterator past the end of the range when either of the - // component iterators has reached the end of its range. - return - current1_ == end1_ || - current2_ == end2_ || - current3_ == end3_ || - current4_ == end4_ || - current5_ == end5_ || - current6_ == end6_ || - current7_ == end7_; - } - - // No implementation - assignment is unsupported. - void operator=(const Iterator& other); - - const ParamGeneratorInterface* const base_; - // begin[i]_ and end[i]_ define the i-th range that Iterator traverses. - // current[i]_ is the actual traversing iterator. - const typename ParamGenerator::iterator begin1_; - const typename ParamGenerator::iterator end1_; - typename ParamGenerator::iterator current1_; - const typename ParamGenerator::iterator begin2_; - const typename ParamGenerator::iterator end2_; - typename ParamGenerator::iterator current2_; - const typename ParamGenerator::iterator begin3_; - const typename ParamGenerator::iterator end3_; - typename ParamGenerator::iterator current3_; - const typename ParamGenerator::iterator begin4_; - const typename ParamGenerator::iterator end4_; - typename ParamGenerator::iterator current4_; - const typename ParamGenerator::iterator begin5_; - const typename ParamGenerator::iterator end5_; - typename ParamGenerator::iterator current5_; - const typename ParamGenerator::iterator begin6_; - const typename ParamGenerator::iterator end6_; - typename ParamGenerator::iterator current6_; - const typename ParamGenerator::iterator begin7_; - const typename ParamGenerator::iterator end7_; - typename ParamGenerator::iterator current7_; - ParamType current_value_; - }; // class CartesianProductGenerator7::Iterator - - // No implementation - assignment is unsupported. - void operator=(const CartesianProductGenerator7& other); - - const ParamGenerator g1_; - const ParamGenerator g2_; - const ParamGenerator g3_; - const ParamGenerator g4_; - const ParamGenerator g5_; - const ParamGenerator g6_; - const ParamGenerator g7_; -}; // class CartesianProductGenerator7 - - -template -class CartesianProductGenerator8 - : public ParamGeneratorInterface< ::std::tr1::tuple > { - public: - typedef ::std::tr1::tuple ParamType; - - CartesianProductGenerator8(const ParamGenerator& g1, - const ParamGenerator& g2, const ParamGenerator& g3, - const ParamGenerator& g4, const ParamGenerator& g5, - const ParamGenerator& g6, const ParamGenerator& g7, - const ParamGenerator& g8) - : g1_(g1), g2_(g2), g3_(g3), g4_(g4), g5_(g5), g6_(g6), g7_(g7), - g8_(g8) {} - virtual ~CartesianProductGenerator8() {} - - virtual ParamIteratorInterface* Begin() const { - return new Iterator(this, g1_, g1_.begin(), g2_, g2_.begin(), g3_, - g3_.begin(), g4_, g4_.begin(), g5_, g5_.begin(), g6_, g6_.begin(), g7_, - g7_.begin(), g8_, g8_.begin()); - } - virtual ParamIteratorInterface* End() const { - return new Iterator(this, g1_, g1_.end(), g2_, g2_.end(), g3_, g3_.end(), - g4_, g4_.end(), g5_, g5_.end(), g6_, g6_.end(), g7_, g7_.end(), g8_, - g8_.end()); - } - - private: - class Iterator : public ParamIteratorInterface { - public: - Iterator(const ParamGeneratorInterface* base, - const ParamGenerator& g1, - const typename ParamGenerator::iterator& current1, - const ParamGenerator& g2, - const typename ParamGenerator::iterator& current2, - const ParamGenerator& g3, - const typename ParamGenerator::iterator& current3, - const ParamGenerator& g4, - const typename ParamGenerator::iterator& current4, - const ParamGenerator& g5, - const typename ParamGenerator::iterator& current5, - const ParamGenerator& g6, - const typename ParamGenerator::iterator& current6, - const ParamGenerator& g7, - const typename ParamGenerator::iterator& current7, - const ParamGenerator& g8, - const typename ParamGenerator::iterator& current8) - : base_(base), - begin1_(g1.begin()), end1_(g1.end()), current1_(current1), - begin2_(g2.begin()), end2_(g2.end()), current2_(current2), - begin3_(g3.begin()), end3_(g3.end()), current3_(current3), - begin4_(g4.begin()), end4_(g4.end()), current4_(current4), - begin5_(g5.begin()), end5_(g5.end()), current5_(current5), - begin6_(g6.begin()), end6_(g6.end()), current6_(current6), - begin7_(g7.begin()), end7_(g7.end()), current7_(current7), - begin8_(g8.begin()), end8_(g8.end()), current8_(current8) { - ComputeCurrentValue(); - } - virtual ~Iterator() {} - - virtual const ParamGeneratorInterface* BaseGenerator() const { - return base_; - } - // Advance should not be called on beyond-of-range iterators - // so no component iterators must be beyond end of range, either. - virtual void Advance() { - assert(!AtEnd()); - ++current8_; - if (current8_ == end8_) { - current8_ = begin8_; - ++current7_; - } - if (current7_ == end7_) { - current7_ = begin7_; - ++current6_; - } - if (current6_ == end6_) { - current6_ = begin6_; - ++current5_; - } - if (current5_ == end5_) { - current5_ = begin5_; - ++current4_; - } - if (current4_ == end4_) { - current4_ = begin4_; - ++current3_; - } - if (current3_ == end3_) { - current3_ = begin3_; - ++current2_; - } - if (current2_ == end2_) { - current2_ = begin2_; - ++current1_; - } - ComputeCurrentValue(); - } - virtual ParamIteratorInterface* Clone() const { - return new Iterator(*this); - } - virtual const ParamType* Current() const { return ¤t_value_; } - virtual bool Equals(const ParamIteratorInterface& other) const { - // Having the same base generator guarantees that the other - // iterator is of the same type and we can downcast. - GTEST_CHECK_(BaseGenerator() == other.BaseGenerator()) - << "The program attempted to compare iterators " - << "from different generators." << std::endl; - const Iterator* typed_other = - CheckedDowncastToActualType(&other); - // We must report iterators equal if they both point beyond their - // respective ranges. That can happen in a variety of fashions, - // so we have to consult AtEnd(). - return (AtEnd() && typed_other->AtEnd()) || - ( - current1_ == typed_other->current1_ && - current2_ == typed_other->current2_ && - current3_ == typed_other->current3_ && - current4_ == typed_other->current4_ && - current5_ == typed_other->current5_ && - current6_ == typed_other->current6_ && - current7_ == typed_other->current7_ && - current8_ == typed_other->current8_); - } - - private: - Iterator(const Iterator& other) - : base_(other.base_), - begin1_(other.begin1_), - end1_(other.end1_), - current1_(other.current1_), - begin2_(other.begin2_), - end2_(other.end2_), - current2_(other.current2_), - begin3_(other.begin3_), - end3_(other.end3_), - current3_(other.current3_), - begin4_(other.begin4_), - end4_(other.end4_), - current4_(other.current4_), - begin5_(other.begin5_), - end5_(other.end5_), - current5_(other.current5_), - begin6_(other.begin6_), - end6_(other.end6_), - current6_(other.current6_), - begin7_(other.begin7_), - end7_(other.end7_), - current7_(other.current7_), - begin8_(other.begin8_), - end8_(other.end8_), - current8_(other.current8_) { - ComputeCurrentValue(); - } - - void ComputeCurrentValue() { - if (!AtEnd()) - current_value_ = ParamType(*current1_, *current2_, *current3_, - *current4_, *current5_, *current6_, *current7_, *current8_); - } - bool AtEnd() const { - // We must report iterator past the end of the range when either of the - // component iterators has reached the end of its range. - return - current1_ == end1_ || - current2_ == end2_ || - current3_ == end3_ || - current4_ == end4_ || - current5_ == end5_ || - current6_ == end6_ || - current7_ == end7_ || - current8_ == end8_; - } - - // No implementation - assignment is unsupported. - void operator=(const Iterator& other); - - const ParamGeneratorInterface* const base_; - // begin[i]_ and end[i]_ define the i-th range that Iterator traverses. - // current[i]_ is the actual traversing iterator. - const typename ParamGenerator::iterator begin1_; - const typename ParamGenerator::iterator end1_; - typename ParamGenerator::iterator current1_; - const typename ParamGenerator::iterator begin2_; - const typename ParamGenerator::iterator end2_; - typename ParamGenerator::iterator current2_; - const typename ParamGenerator::iterator begin3_; - const typename ParamGenerator::iterator end3_; - typename ParamGenerator::iterator current3_; - const typename ParamGenerator::iterator begin4_; - const typename ParamGenerator::iterator end4_; - typename ParamGenerator::iterator current4_; - const typename ParamGenerator::iterator begin5_; - const typename ParamGenerator::iterator end5_; - typename ParamGenerator::iterator current5_; - const typename ParamGenerator::iterator begin6_; - const typename ParamGenerator::iterator end6_; - typename ParamGenerator::iterator current6_; - const typename ParamGenerator::iterator begin7_; - const typename ParamGenerator::iterator end7_; - typename ParamGenerator::iterator current7_; - const typename ParamGenerator::iterator begin8_; - const typename ParamGenerator::iterator end8_; - typename ParamGenerator::iterator current8_; - ParamType current_value_; - }; // class CartesianProductGenerator8::Iterator - - // No implementation - assignment is unsupported. - void operator=(const CartesianProductGenerator8& other); - - const ParamGenerator g1_; - const ParamGenerator g2_; - const ParamGenerator g3_; - const ParamGenerator g4_; - const ParamGenerator g5_; - const ParamGenerator g6_; - const ParamGenerator g7_; - const ParamGenerator g8_; -}; // class CartesianProductGenerator8 - - -template -class CartesianProductGenerator9 - : public ParamGeneratorInterface< ::std::tr1::tuple > { - public: - typedef ::std::tr1::tuple ParamType; - - CartesianProductGenerator9(const ParamGenerator& g1, - const ParamGenerator& g2, const ParamGenerator& g3, - const ParamGenerator& g4, const ParamGenerator& g5, - const ParamGenerator& g6, const ParamGenerator& g7, - const ParamGenerator& g8, const ParamGenerator& g9) - : g1_(g1), g2_(g2), g3_(g3), g4_(g4), g5_(g5), g6_(g6), g7_(g7), g8_(g8), - g9_(g9) {} - virtual ~CartesianProductGenerator9() {} - - virtual ParamIteratorInterface* Begin() const { - return new Iterator(this, g1_, g1_.begin(), g2_, g2_.begin(), g3_, - g3_.begin(), g4_, g4_.begin(), g5_, g5_.begin(), g6_, g6_.begin(), g7_, - g7_.begin(), g8_, g8_.begin(), g9_, g9_.begin()); - } - virtual ParamIteratorInterface* End() const { - return new Iterator(this, g1_, g1_.end(), g2_, g2_.end(), g3_, g3_.end(), - g4_, g4_.end(), g5_, g5_.end(), g6_, g6_.end(), g7_, g7_.end(), g8_, - g8_.end(), g9_, g9_.end()); - } - - private: - class Iterator : public ParamIteratorInterface { - public: - Iterator(const ParamGeneratorInterface* base, - const ParamGenerator& g1, - const typename ParamGenerator::iterator& current1, - const ParamGenerator& g2, - const typename ParamGenerator::iterator& current2, - const ParamGenerator& g3, - const typename ParamGenerator::iterator& current3, - const ParamGenerator& g4, - const typename ParamGenerator::iterator& current4, - const ParamGenerator& g5, - const typename ParamGenerator::iterator& current5, - const ParamGenerator& g6, - const typename ParamGenerator::iterator& current6, - const ParamGenerator& g7, - const typename ParamGenerator::iterator& current7, - const ParamGenerator& g8, - const typename ParamGenerator::iterator& current8, - const ParamGenerator& g9, - const typename ParamGenerator::iterator& current9) - : base_(base), - begin1_(g1.begin()), end1_(g1.end()), current1_(current1), - begin2_(g2.begin()), end2_(g2.end()), current2_(current2), - begin3_(g3.begin()), end3_(g3.end()), current3_(current3), - begin4_(g4.begin()), end4_(g4.end()), current4_(current4), - begin5_(g5.begin()), end5_(g5.end()), current5_(current5), - begin6_(g6.begin()), end6_(g6.end()), current6_(current6), - begin7_(g7.begin()), end7_(g7.end()), current7_(current7), - begin8_(g8.begin()), end8_(g8.end()), current8_(current8), - begin9_(g9.begin()), end9_(g9.end()), current9_(current9) { - ComputeCurrentValue(); - } - virtual ~Iterator() {} - - virtual const ParamGeneratorInterface* BaseGenerator() const { - return base_; - } - // Advance should not be called on beyond-of-range iterators - // so no component iterators must be beyond end of range, either. - virtual void Advance() { - assert(!AtEnd()); - ++current9_; - if (current9_ == end9_) { - current9_ = begin9_; - ++current8_; - } - if (current8_ == end8_) { - current8_ = begin8_; - ++current7_; - } - if (current7_ == end7_) { - current7_ = begin7_; - ++current6_; - } - if (current6_ == end6_) { - current6_ = begin6_; - ++current5_; - } - if (current5_ == end5_) { - current5_ = begin5_; - ++current4_; - } - if (current4_ == end4_) { - current4_ = begin4_; - ++current3_; - } - if (current3_ == end3_) { - current3_ = begin3_; - ++current2_; - } - if (current2_ == end2_) { - current2_ = begin2_; - ++current1_; - } - ComputeCurrentValue(); - } - virtual ParamIteratorInterface* Clone() const { - return new Iterator(*this); - } - virtual const ParamType* Current() const { return ¤t_value_; } - virtual bool Equals(const ParamIteratorInterface& other) const { - // Having the same base generator guarantees that the other - // iterator is of the same type and we can downcast. - GTEST_CHECK_(BaseGenerator() == other.BaseGenerator()) - << "The program attempted to compare iterators " - << "from different generators." << std::endl; - const Iterator* typed_other = - CheckedDowncastToActualType(&other); - // We must report iterators equal if they both point beyond their - // respective ranges. That can happen in a variety of fashions, - // so we have to consult AtEnd(). - return (AtEnd() && typed_other->AtEnd()) || - ( - current1_ == typed_other->current1_ && - current2_ == typed_other->current2_ && - current3_ == typed_other->current3_ && - current4_ == typed_other->current4_ && - current5_ == typed_other->current5_ && - current6_ == typed_other->current6_ && - current7_ == typed_other->current7_ && - current8_ == typed_other->current8_ && - current9_ == typed_other->current9_); - } - - private: - Iterator(const Iterator& other) - : base_(other.base_), - begin1_(other.begin1_), - end1_(other.end1_), - current1_(other.current1_), - begin2_(other.begin2_), - end2_(other.end2_), - current2_(other.current2_), - begin3_(other.begin3_), - end3_(other.end3_), - current3_(other.current3_), - begin4_(other.begin4_), - end4_(other.end4_), - current4_(other.current4_), - begin5_(other.begin5_), - end5_(other.end5_), - current5_(other.current5_), - begin6_(other.begin6_), - end6_(other.end6_), - current6_(other.current6_), - begin7_(other.begin7_), - end7_(other.end7_), - current7_(other.current7_), - begin8_(other.begin8_), - end8_(other.end8_), - current8_(other.current8_), - begin9_(other.begin9_), - end9_(other.end9_), - current9_(other.current9_) { - ComputeCurrentValue(); - } - - void ComputeCurrentValue() { - if (!AtEnd()) - current_value_ = ParamType(*current1_, *current2_, *current3_, - *current4_, *current5_, *current6_, *current7_, *current8_, - *current9_); - } - bool AtEnd() const { - // We must report iterator past the end of the range when either of the - // component iterators has reached the end of its range. - return - current1_ == end1_ || - current2_ == end2_ || - current3_ == end3_ || - current4_ == end4_ || - current5_ == end5_ || - current6_ == end6_ || - current7_ == end7_ || - current8_ == end8_ || - current9_ == end9_; - } - - // No implementation - assignment is unsupported. - void operator=(const Iterator& other); - - const ParamGeneratorInterface* const base_; - // begin[i]_ and end[i]_ define the i-th range that Iterator traverses. - // current[i]_ is the actual traversing iterator. - const typename ParamGenerator::iterator begin1_; - const typename ParamGenerator::iterator end1_; - typename ParamGenerator::iterator current1_; - const typename ParamGenerator::iterator begin2_; - const typename ParamGenerator::iterator end2_; - typename ParamGenerator::iterator current2_; - const typename ParamGenerator::iterator begin3_; - const typename ParamGenerator::iterator end3_; - typename ParamGenerator::iterator current3_; - const typename ParamGenerator::iterator begin4_; - const typename ParamGenerator::iterator end4_; - typename ParamGenerator::iterator current4_; - const typename ParamGenerator::iterator begin5_; - const typename ParamGenerator::iterator end5_; - typename ParamGenerator::iterator current5_; - const typename ParamGenerator::iterator begin6_; - const typename ParamGenerator::iterator end6_; - typename ParamGenerator::iterator current6_; - const typename ParamGenerator::iterator begin7_; - const typename ParamGenerator::iterator end7_; - typename ParamGenerator::iterator current7_; - const typename ParamGenerator::iterator begin8_; - const typename ParamGenerator::iterator end8_; - typename ParamGenerator::iterator current8_; - const typename ParamGenerator::iterator begin9_; - const typename ParamGenerator::iterator end9_; - typename ParamGenerator::iterator current9_; - ParamType current_value_; - }; // class CartesianProductGenerator9::Iterator - - // No implementation - assignment is unsupported. - void operator=(const CartesianProductGenerator9& other); - - const ParamGenerator g1_; - const ParamGenerator g2_; - const ParamGenerator g3_; - const ParamGenerator g4_; - const ParamGenerator g5_; - const ParamGenerator g6_; - const ParamGenerator g7_; - const ParamGenerator g8_; - const ParamGenerator g9_; -}; // class CartesianProductGenerator9 - - -template -class CartesianProductGenerator10 - : public ParamGeneratorInterface< ::std::tr1::tuple > { - public: - typedef ::std::tr1::tuple ParamType; - - CartesianProductGenerator10(const ParamGenerator& g1, - const ParamGenerator& g2, const ParamGenerator& g3, - const ParamGenerator& g4, const ParamGenerator& g5, - const ParamGenerator& g6, const ParamGenerator& g7, - const ParamGenerator& g8, const ParamGenerator& g9, - const ParamGenerator& g10) - : g1_(g1), g2_(g2), g3_(g3), g4_(g4), g5_(g5), g6_(g6), g7_(g7), g8_(g8), - g9_(g9), g10_(g10) {} - virtual ~CartesianProductGenerator10() {} - - virtual ParamIteratorInterface* Begin() const { - return new Iterator(this, g1_, g1_.begin(), g2_, g2_.begin(), g3_, - g3_.begin(), g4_, g4_.begin(), g5_, g5_.begin(), g6_, g6_.begin(), g7_, - g7_.begin(), g8_, g8_.begin(), g9_, g9_.begin(), g10_, g10_.begin()); - } - virtual ParamIteratorInterface* End() const { - return new Iterator(this, g1_, g1_.end(), g2_, g2_.end(), g3_, g3_.end(), - g4_, g4_.end(), g5_, g5_.end(), g6_, g6_.end(), g7_, g7_.end(), g8_, - g8_.end(), g9_, g9_.end(), g10_, g10_.end()); - } - - private: - class Iterator : public ParamIteratorInterface { - public: - Iterator(const ParamGeneratorInterface* base, - const ParamGenerator& g1, - const typename ParamGenerator::iterator& current1, - const ParamGenerator& g2, - const typename ParamGenerator::iterator& current2, - const ParamGenerator& g3, - const typename ParamGenerator::iterator& current3, - const ParamGenerator& g4, - const typename ParamGenerator::iterator& current4, - const ParamGenerator& g5, - const typename ParamGenerator::iterator& current5, - const ParamGenerator& g6, - const typename ParamGenerator::iterator& current6, - const ParamGenerator& g7, - const typename ParamGenerator::iterator& current7, - const ParamGenerator& g8, - const typename ParamGenerator::iterator& current8, - const ParamGenerator& g9, - const typename ParamGenerator::iterator& current9, - const ParamGenerator& g10, - const typename ParamGenerator::iterator& current10) - : base_(base), - begin1_(g1.begin()), end1_(g1.end()), current1_(current1), - begin2_(g2.begin()), end2_(g2.end()), current2_(current2), - begin3_(g3.begin()), end3_(g3.end()), current3_(current3), - begin4_(g4.begin()), end4_(g4.end()), current4_(current4), - begin5_(g5.begin()), end5_(g5.end()), current5_(current5), - begin6_(g6.begin()), end6_(g6.end()), current6_(current6), - begin7_(g7.begin()), end7_(g7.end()), current7_(current7), - begin8_(g8.begin()), end8_(g8.end()), current8_(current8), - begin9_(g9.begin()), end9_(g9.end()), current9_(current9), - begin10_(g10.begin()), end10_(g10.end()), current10_(current10) { - ComputeCurrentValue(); - } - virtual ~Iterator() {} - - virtual const ParamGeneratorInterface* BaseGenerator() const { - return base_; - } - // Advance should not be called on beyond-of-range iterators - // so no component iterators must be beyond end of range, either. - virtual void Advance() { - assert(!AtEnd()); - ++current10_; - if (current10_ == end10_) { - current10_ = begin10_; - ++current9_; - } - if (current9_ == end9_) { - current9_ = begin9_; - ++current8_; - } - if (current8_ == end8_) { - current8_ = begin8_; - ++current7_; - } - if (current7_ == end7_) { - current7_ = begin7_; - ++current6_; - } - if (current6_ == end6_) { - current6_ = begin6_; - ++current5_; - } - if (current5_ == end5_) { - current5_ = begin5_; - ++current4_; - } - if (current4_ == end4_) { - current4_ = begin4_; - ++current3_; - } - if (current3_ == end3_) { - current3_ = begin3_; - ++current2_; - } - if (current2_ == end2_) { - current2_ = begin2_; - ++current1_; - } - ComputeCurrentValue(); - } - virtual ParamIteratorInterface* Clone() const { - return new Iterator(*this); - } - virtual const ParamType* Current() const { return ¤t_value_; } - virtual bool Equals(const ParamIteratorInterface& other) const { - // Having the same base generator guarantees that the other - // iterator is of the same type and we can downcast. - GTEST_CHECK_(BaseGenerator() == other.BaseGenerator()) - << "The program attempted to compare iterators " - << "from different generators." << std::endl; - const Iterator* typed_other = - CheckedDowncastToActualType(&other); - // We must report iterators equal if they both point beyond their - // respective ranges. That can happen in a variety of fashions, - // so we have to consult AtEnd(). - return (AtEnd() && typed_other->AtEnd()) || - ( - current1_ == typed_other->current1_ && - current2_ == typed_other->current2_ && - current3_ == typed_other->current3_ && - current4_ == typed_other->current4_ && - current5_ == typed_other->current5_ && - current6_ == typed_other->current6_ && - current7_ == typed_other->current7_ && - current8_ == typed_other->current8_ && - current9_ == typed_other->current9_ && - current10_ == typed_other->current10_); - } - - private: - Iterator(const Iterator& other) - : base_(other.base_), - begin1_(other.begin1_), - end1_(other.end1_), - current1_(other.current1_), - begin2_(other.begin2_), - end2_(other.end2_), - current2_(other.current2_), - begin3_(other.begin3_), - end3_(other.end3_), - current3_(other.current3_), - begin4_(other.begin4_), - end4_(other.end4_), - current4_(other.current4_), - begin5_(other.begin5_), - end5_(other.end5_), - current5_(other.current5_), - begin6_(other.begin6_), - end6_(other.end6_), - current6_(other.current6_), - begin7_(other.begin7_), - end7_(other.end7_), - current7_(other.current7_), - begin8_(other.begin8_), - end8_(other.end8_), - current8_(other.current8_), - begin9_(other.begin9_), - end9_(other.end9_), - current9_(other.current9_), - begin10_(other.begin10_), - end10_(other.end10_), - current10_(other.current10_) { - ComputeCurrentValue(); - } - - void ComputeCurrentValue() { - if (!AtEnd()) - current_value_ = ParamType(*current1_, *current2_, *current3_, - *current4_, *current5_, *current6_, *current7_, *current8_, - *current9_, *current10_); - } - bool AtEnd() const { - // We must report iterator past the end of the range when either of the - // component iterators has reached the end of its range. - return - current1_ == end1_ || - current2_ == end2_ || - current3_ == end3_ || - current4_ == end4_ || - current5_ == end5_ || - current6_ == end6_ || - current7_ == end7_ || - current8_ == end8_ || - current9_ == end9_ || - current10_ == end10_; - } - - // No implementation - assignment is unsupported. - void operator=(const Iterator& other); - - const ParamGeneratorInterface* const base_; - // begin[i]_ and end[i]_ define the i-th range that Iterator traverses. - // current[i]_ is the actual traversing iterator. - const typename ParamGenerator::iterator begin1_; - const typename ParamGenerator::iterator end1_; - typename ParamGenerator::iterator current1_; - const typename ParamGenerator::iterator begin2_; - const typename ParamGenerator::iterator end2_; - typename ParamGenerator::iterator current2_; - const typename ParamGenerator::iterator begin3_; - const typename ParamGenerator::iterator end3_; - typename ParamGenerator::iterator current3_; - const typename ParamGenerator::iterator begin4_; - const typename ParamGenerator::iterator end4_; - typename ParamGenerator::iterator current4_; - const typename ParamGenerator::iterator begin5_; - const typename ParamGenerator::iterator end5_; - typename ParamGenerator::iterator current5_; - const typename ParamGenerator::iterator begin6_; - const typename ParamGenerator::iterator end6_; - typename ParamGenerator::iterator current6_; - const typename ParamGenerator::iterator begin7_; - const typename ParamGenerator::iterator end7_; - typename ParamGenerator::iterator current7_; - const typename ParamGenerator::iterator begin8_; - const typename ParamGenerator::iterator end8_; - typename ParamGenerator::iterator current8_; - const typename ParamGenerator::iterator begin9_; - const typename ParamGenerator::iterator end9_; - typename ParamGenerator::iterator current9_; - const typename ParamGenerator::iterator begin10_; - const typename ParamGenerator::iterator end10_; - typename ParamGenerator::iterator current10_; - ParamType current_value_; - }; // class CartesianProductGenerator10::Iterator - - // No implementation - assignment is unsupported. - void operator=(const CartesianProductGenerator10& other); - - const ParamGenerator g1_; - const ParamGenerator g2_; - const ParamGenerator g3_; - const ParamGenerator g4_; - const ParamGenerator g5_; - const ParamGenerator g6_; - const ParamGenerator g7_; - const ParamGenerator g8_; - const ParamGenerator g9_; - const ParamGenerator g10_; -}; // class CartesianProductGenerator10 - - -// INTERNAL IMPLEMENTATION - DO NOT USE IN USER CODE. -// -// Helper classes providing Combine() with polymorphic features. They allow -// casting CartesianProductGeneratorN to ParamGenerator if T is -// convertible to U. -// -template -class CartesianProductHolder2 { - public: -CartesianProductHolder2(const Generator1& g1, const Generator2& g2) - : g1_(g1), g2_(g2) {} - template - operator ParamGenerator< ::std::tr1::tuple >() const { - return ParamGenerator< ::std::tr1::tuple >( - new CartesianProductGenerator2( - static_cast >(g1_), - static_cast >(g2_))); - } - - private: - // No implementation - assignment is unsupported. - void operator=(const CartesianProductHolder2& other); - - const Generator1 g1_; - const Generator2 g2_; -}; // class CartesianProductHolder2 - -template -class CartesianProductHolder3 { - public: -CartesianProductHolder3(const Generator1& g1, const Generator2& g2, - const Generator3& g3) - : g1_(g1), g2_(g2), g3_(g3) {} - template - operator ParamGenerator< ::std::tr1::tuple >() const { - return ParamGenerator< ::std::tr1::tuple >( - new CartesianProductGenerator3( - static_cast >(g1_), - static_cast >(g2_), - static_cast >(g3_))); - } - - private: - // No implementation - assignment is unsupported. - void operator=(const CartesianProductHolder3& other); - - const Generator1 g1_; - const Generator2 g2_; - const Generator3 g3_; -}; // class CartesianProductHolder3 - -template -class CartesianProductHolder4 { - public: -CartesianProductHolder4(const Generator1& g1, const Generator2& g2, - const Generator3& g3, const Generator4& g4) - : g1_(g1), g2_(g2), g3_(g3), g4_(g4) {} - template - operator ParamGenerator< ::std::tr1::tuple >() const { - return ParamGenerator< ::std::tr1::tuple >( - new CartesianProductGenerator4( - static_cast >(g1_), - static_cast >(g2_), - static_cast >(g3_), - static_cast >(g4_))); - } - - private: - // No implementation - assignment is unsupported. - void operator=(const CartesianProductHolder4& other); - - const Generator1 g1_; - const Generator2 g2_; - const Generator3 g3_; - const Generator4 g4_; -}; // class CartesianProductHolder4 - -template -class CartesianProductHolder5 { - public: -CartesianProductHolder5(const Generator1& g1, const Generator2& g2, - const Generator3& g3, const Generator4& g4, const Generator5& g5) - : g1_(g1), g2_(g2), g3_(g3), g4_(g4), g5_(g5) {} - template - operator ParamGenerator< ::std::tr1::tuple >() const { - return ParamGenerator< ::std::tr1::tuple >( - new CartesianProductGenerator5( - static_cast >(g1_), - static_cast >(g2_), - static_cast >(g3_), - static_cast >(g4_), - static_cast >(g5_))); - } - - private: - // No implementation - assignment is unsupported. - void operator=(const CartesianProductHolder5& other); - - const Generator1 g1_; - const Generator2 g2_; - const Generator3 g3_; - const Generator4 g4_; - const Generator5 g5_; -}; // class CartesianProductHolder5 - -template -class CartesianProductHolder6 { - public: -CartesianProductHolder6(const Generator1& g1, const Generator2& g2, - const Generator3& g3, const Generator4& g4, const Generator5& g5, - const Generator6& g6) - : g1_(g1), g2_(g2), g3_(g3), g4_(g4), g5_(g5), g6_(g6) {} - template - operator ParamGenerator< ::std::tr1::tuple >() const { - return ParamGenerator< ::std::tr1::tuple >( - new CartesianProductGenerator6( - static_cast >(g1_), - static_cast >(g2_), - static_cast >(g3_), - static_cast >(g4_), - static_cast >(g5_), - static_cast >(g6_))); - } - - private: - // No implementation - assignment is unsupported. - void operator=(const CartesianProductHolder6& other); - - const Generator1 g1_; - const Generator2 g2_; - const Generator3 g3_; - const Generator4 g4_; - const Generator5 g5_; - const Generator6 g6_; -}; // class CartesianProductHolder6 - -template -class CartesianProductHolder7 { - public: -CartesianProductHolder7(const Generator1& g1, const Generator2& g2, - const Generator3& g3, const Generator4& g4, const Generator5& g5, - const Generator6& g6, const Generator7& g7) - : g1_(g1), g2_(g2), g3_(g3), g4_(g4), g5_(g5), g6_(g6), g7_(g7) {} - template - operator ParamGenerator< ::std::tr1::tuple >() const { - return ParamGenerator< ::std::tr1::tuple >( - new CartesianProductGenerator7( - static_cast >(g1_), - static_cast >(g2_), - static_cast >(g3_), - static_cast >(g4_), - static_cast >(g5_), - static_cast >(g6_), - static_cast >(g7_))); - } - - private: - // No implementation - assignment is unsupported. - void operator=(const CartesianProductHolder7& other); - - const Generator1 g1_; - const Generator2 g2_; - const Generator3 g3_; - const Generator4 g4_; - const Generator5 g5_; - const Generator6 g6_; - const Generator7 g7_; -}; // class CartesianProductHolder7 - -template -class CartesianProductHolder8 { - public: -CartesianProductHolder8(const Generator1& g1, const Generator2& g2, - const Generator3& g3, const Generator4& g4, const Generator5& g5, - const Generator6& g6, const Generator7& g7, const Generator8& g8) - : g1_(g1), g2_(g2), g3_(g3), g4_(g4), g5_(g5), g6_(g6), g7_(g7), - g8_(g8) {} - template - operator ParamGenerator< ::std::tr1::tuple >() const { - return ParamGenerator< ::std::tr1::tuple >( - new CartesianProductGenerator8( - static_cast >(g1_), - static_cast >(g2_), - static_cast >(g3_), - static_cast >(g4_), - static_cast >(g5_), - static_cast >(g6_), - static_cast >(g7_), - static_cast >(g8_))); - } - - private: - // No implementation - assignment is unsupported. - void operator=(const CartesianProductHolder8& other); - - const Generator1 g1_; - const Generator2 g2_; - const Generator3 g3_; - const Generator4 g4_; - const Generator5 g5_; - const Generator6 g6_; - const Generator7 g7_; - const Generator8 g8_; -}; // class CartesianProductHolder8 - -template -class CartesianProductHolder9 { - public: -CartesianProductHolder9(const Generator1& g1, const Generator2& g2, - const Generator3& g3, const Generator4& g4, const Generator5& g5, - const Generator6& g6, const Generator7& g7, const Generator8& g8, - const Generator9& g9) - : g1_(g1), g2_(g2), g3_(g3), g4_(g4), g5_(g5), g6_(g6), g7_(g7), g8_(g8), - g9_(g9) {} - template - operator ParamGenerator< ::std::tr1::tuple >() const { - return ParamGenerator< ::std::tr1::tuple >( - new CartesianProductGenerator9( - static_cast >(g1_), - static_cast >(g2_), - static_cast >(g3_), - static_cast >(g4_), - static_cast >(g5_), - static_cast >(g6_), - static_cast >(g7_), - static_cast >(g8_), - static_cast >(g9_))); - } - - private: - // No implementation - assignment is unsupported. - void operator=(const CartesianProductHolder9& other); - - const Generator1 g1_; - const Generator2 g2_; - const Generator3 g3_; - const Generator4 g4_; - const Generator5 g5_; - const Generator6 g6_; - const Generator7 g7_; - const Generator8 g8_; - const Generator9 g9_; -}; // class CartesianProductHolder9 - -template -class CartesianProductHolder10 { - public: -CartesianProductHolder10(const Generator1& g1, const Generator2& g2, - const Generator3& g3, const Generator4& g4, const Generator5& g5, - const Generator6& g6, const Generator7& g7, const Generator8& g8, - const Generator9& g9, const Generator10& g10) - : g1_(g1), g2_(g2), g3_(g3), g4_(g4), g5_(g5), g6_(g6), g7_(g7), g8_(g8), - g9_(g9), g10_(g10) {} - template - operator ParamGenerator< ::std::tr1::tuple >() const { - return ParamGenerator< ::std::tr1::tuple >( - new CartesianProductGenerator10( - static_cast >(g1_), - static_cast >(g2_), - static_cast >(g3_), - static_cast >(g4_), - static_cast >(g5_), - static_cast >(g6_), - static_cast >(g7_), - static_cast >(g8_), - static_cast >(g9_), - static_cast >(g10_))); - } - - private: - // No implementation - assignment is unsupported. - void operator=(const CartesianProductHolder10& other); - - const Generator1 g1_; - const Generator2 g2_; - const Generator3 g3_; - const Generator4 g4_; - const Generator5 g5_; - const Generator6 g6_; - const Generator7 g7_; - const Generator8 g8_; - const Generator9 g9_; - const Generator10 g10_; -}; // class CartesianProductHolder10 - -# endif // GTEST_HAS_COMBINE - -} // namespace internal -} // namespace testing - -#endif // GTEST_HAS_PARAM_TEST - -#endif // GTEST_INCLUDE_GTEST_INTERNAL_GTEST_PARAM_UTIL_GENERATED_H_ - -#if GTEST_HAS_PARAM_TEST - -namespace testing { - -// Functions producing parameter generators. -// -// Google Test uses these generators to produce parameters for value- -// parameterized tests. When a parameterized test case is instantiated -// with a particular generator, Google Test creates and runs tests -// for each element in the sequence produced by the generator. -// -// In the following sample, tests from test case FooTest are instantiated -// each three times with parameter values 3, 5, and 8: -// -// class FooTest : public TestWithParam { ... }; -// -// TEST_P(FooTest, TestThis) { -// } -// TEST_P(FooTest, TestThat) { -// } -// INSTANTIATE_TEST_CASE_P(TestSequence, FooTest, Values(3, 5, 8)); -// - -// Range() returns generators providing sequences of values in a range. -// -// Synopsis: -// Range(start, end) -// - returns a generator producing a sequence of values {start, start+1, -// start+2, ..., }. -// Range(start, end, step) -// - returns a generator producing a sequence of values {start, start+step, -// start+step+step, ..., }. -// Notes: -// * The generated sequences never include end. For example, Range(1, 5) -// returns a generator producing a sequence {1, 2, 3, 4}. Range(1, 9, 2) -// returns a generator producing {1, 3, 5, 7}. -// * start and end must have the same type. That type may be any integral or -// floating-point type or a user defined type satisfying these conditions: -// * It must be assignable (have operator=() defined). -// * It must have operator+() (operator+(int-compatible type) for -// two-operand version). -// * It must have operator<() defined. -// Elements in the resulting sequences will also have that type. -// * Condition start < end must be satisfied in order for resulting sequences -// to contain any elements. -// -template -internal::ParamGenerator Range(T start, T end, IncrementT step) { - return internal::ParamGenerator( - new internal::RangeGenerator(start, end, step)); -} - -template -internal::ParamGenerator Range(T start, T end) { - return Range(start, end, 1); -} - -// ValuesIn() function allows generation of tests with parameters coming from -// a container. -// -// Synopsis: -// ValuesIn(const T (&array)[N]) -// - returns a generator producing sequences with elements from -// a C-style array. -// ValuesIn(const Container& container) -// - returns a generator producing sequences with elements from -// an STL-style container. -// ValuesIn(Iterator begin, Iterator end) -// - returns a generator producing sequences with elements from -// a range [begin, end) defined by a pair of STL-style iterators. These -// iterators can also be plain C pointers. -// -// Please note that ValuesIn copies the values from the containers -// passed in and keeps them to generate tests in RUN_ALL_TESTS(). -// -// Examples: -// -// This instantiates tests from test case StringTest -// each with C-string values of "foo", "bar", and "baz": -// -// const char* strings[] = {"foo", "bar", "baz"}; -// INSTANTIATE_TEST_CASE_P(StringSequence, SrtingTest, ValuesIn(strings)); -// -// This instantiates tests from test case StlStringTest -// each with STL strings with values "a" and "b": -// -// ::std::vector< ::std::string> GetParameterStrings() { -// ::std::vector< ::std::string> v; -// v.push_back("a"); -// v.push_back("b"); -// return v; -// } -// -// INSTANTIATE_TEST_CASE_P(CharSequence, -// StlStringTest, -// ValuesIn(GetParameterStrings())); -// -// -// This will also instantiate tests from CharTest -// each with parameter values 'a' and 'b': -// -// ::std::list GetParameterChars() { -// ::std::list list; -// list.push_back('a'); -// list.push_back('b'); -// return list; -// } -// ::std::list l = GetParameterChars(); -// INSTANTIATE_TEST_CASE_P(CharSequence2, -// CharTest, -// ValuesIn(l.begin(), l.end())); -// -template -internal::ParamGenerator< - typename ::testing::internal::IteratorTraits::value_type> -ValuesIn(ForwardIterator begin, ForwardIterator end) { - typedef typename ::testing::internal::IteratorTraits - ::value_type ParamType; - return internal::ParamGenerator( - new internal::ValuesInIteratorRangeGenerator(begin, end)); -} - -template -internal::ParamGenerator ValuesIn(const T (&array)[N]) { - return ValuesIn(array, array + N); -} - -template -internal::ParamGenerator ValuesIn( - const Container& container) { - return ValuesIn(container.begin(), container.end()); -} - -// Values() allows generating tests from explicitly specified list of -// parameters. -// -// Synopsis: -// Values(T v1, T v2, ..., T vN) -// - returns a generator producing sequences with elements v1, v2, ..., vN. -// -// For example, this instantiates tests from test case BarTest each -// with values "one", "two", and "three": -// -// INSTANTIATE_TEST_CASE_P(NumSequence, BarTest, Values("one", "two", "three")); -// -// This instantiates tests from test case BazTest each with values 1, 2, 3.5. -// The exact type of values will depend on the type of parameter in BazTest. -// -// INSTANTIATE_TEST_CASE_P(FloatingNumbers, BazTest, Values(1, 2, 3.5)); -// -// Currently, Values() supports from 1 to 50 parameters. -// -template -internal::ValueArray1 Values(T1 v1) { - return internal::ValueArray1(v1); -} - -template -internal::ValueArray2 Values(T1 v1, T2 v2) { - return internal::ValueArray2(v1, v2); -} - -template -internal::ValueArray3 Values(T1 v1, T2 v2, T3 v3) { - return internal::ValueArray3(v1, v2, v3); -} - -template -internal::ValueArray4 Values(T1 v1, T2 v2, T3 v3, T4 v4) { - return internal::ValueArray4(v1, v2, v3, v4); -} - -template -internal::ValueArray5 Values(T1 v1, T2 v2, T3 v3, T4 v4, - T5 v5) { - return internal::ValueArray5(v1, v2, v3, v4, v5); -} - -template -internal::ValueArray6 Values(T1 v1, T2 v2, T3 v3, - T4 v4, T5 v5, T6 v6) { - return internal::ValueArray6(v1, v2, v3, v4, v5, v6); -} - -template -internal::ValueArray7 Values(T1 v1, T2 v2, T3 v3, - T4 v4, T5 v5, T6 v6, T7 v7) { - return internal::ValueArray7(v1, v2, v3, v4, v5, - v6, v7); -} - -template -internal::ValueArray8 Values(T1 v1, T2 v2, - T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8) { - return internal::ValueArray8(v1, v2, v3, v4, - v5, v6, v7, v8); -} - -template -internal::ValueArray9 Values(T1 v1, T2 v2, - T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9) { - return internal::ValueArray9(v1, v2, v3, - v4, v5, v6, v7, v8, v9); -} - -template -internal::ValueArray10 Values(T1 v1, - T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, T10 v10) { - return internal::ValueArray10(v1, - v2, v3, v4, v5, v6, v7, v8, v9, v10); -} - -template -internal::ValueArray11 Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, - T10 v10, T11 v11) { - return internal::ValueArray11(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11); -} - -template -internal::ValueArray12 Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, - T10 v10, T11 v11, T12 v12) { - return internal::ValueArray12(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12); -} - -template -internal::ValueArray13 Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, - T10 v10, T11 v11, T12 v12, T13 v13) { - return internal::ValueArray13(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13); -} - -template -internal::ValueArray14 Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, - T10 v10, T11 v11, T12 v12, T13 v13, T14 v14) { - return internal::ValueArray14(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, - v14); -} - -template -internal::ValueArray15 Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, - T9 v9, T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15) { - return internal::ValueArray15(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, - v13, v14, v15); -} - -template -internal::ValueArray16 Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, - T8 v8, T9 v9, T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, - T16 v16) { - return internal::ValueArray16(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, - v12, v13, v14, v15, v16); -} - -template -internal::ValueArray17 Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, - T8 v8, T9 v9, T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, - T16 v16, T17 v17) { - return internal::ValueArray17(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, - v11, v12, v13, v14, v15, v16, v17); -} - -template -internal::ValueArray18 Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, - T7 v7, T8 v8, T9 v9, T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, - T16 v16, T17 v17, T18 v18) { - return internal::ValueArray18(v1, v2, v3, v4, v5, v6, v7, v8, v9, - v10, v11, v12, v13, v14, v15, v16, v17, v18); -} - -template -internal::ValueArray19 Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, - T6 v6, T7 v7, T8 v8, T9 v9, T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, - T15 v15, T16 v16, T17 v17, T18 v18, T19 v19) { - return internal::ValueArray19(v1, v2, v3, v4, v5, v6, v7, v8, - v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19); -} - -template -internal::ValueArray20 Values(T1 v1, T2 v2, T3 v3, T4 v4, - T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, T10 v10, T11 v11, T12 v12, T13 v13, - T14 v14, T15 v15, T16 v16, T17 v17, T18 v18, T19 v19, T20 v20) { - return internal::ValueArray20(v1, v2, v3, v4, v5, v6, v7, - v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20); -} - -template -internal::ValueArray21 Values(T1 v1, T2 v2, T3 v3, T4 v4, - T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, T10 v10, T11 v11, T12 v12, T13 v13, - T14 v14, T15 v15, T16 v16, T17 v17, T18 v18, T19 v19, T20 v20, T21 v21) { - return internal::ValueArray21(v1, v2, v3, v4, v5, v6, - v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21); -} - -template -internal::ValueArray22 Values(T1 v1, T2 v2, T3 v3, - T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, T10 v10, T11 v11, T12 v12, - T13 v13, T14 v14, T15 v15, T16 v16, T17 v17, T18 v18, T19 v19, T20 v20, - T21 v21, T22 v22) { - return internal::ValueArray22(v1, v2, v3, v4, - v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, - v20, v21, v22); -} - -template -internal::ValueArray23 Values(T1 v1, T2 v2, - T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, T10 v10, T11 v11, T12 v12, - T13 v13, T14 v14, T15 v15, T16 v16, T17 v17, T18 v18, T19 v19, T20 v20, - T21 v21, T22 v22, T23 v23) { - return internal::ValueArray23(v1, v2, v3, - v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, - v20, v21, v22, v23); -} - -template -internal::ValueArray24 Values(T1 v1, T2 v2, - T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, T10 v10, T11 v11, T12 v12, - T13 v13, T14 v14, T15 v15, T16 v16, T17 v17, T18 v18, T19 v19, T20 v20, - T21 v21, T22 v22, T23 v23, T24 v24) { - return internal::ValueArray24(v1, v2, - v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, - v19, v20, v21, v22, v23, v24); -} - -template -internal::ValueArray25 Values(T1 v1, - T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, T10 v10, T11 v11, - T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17, T18 v18, T19 v19, - T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25) { - return internal::ValueArray25(v1, - v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, - v18, v19, v20, v21, v22, v23, v24, v25); -} - -template -internal::ValueArray26 Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, - T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17, - T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25, - T26 v26) { - return internal::ValueArray26(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, - v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26); -} - -template -internal::ValueArray27 Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, - T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17, - T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25, - T26 v26, T27 v27) { - return internal::ValueArray27(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, - v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27); -} - -template -internal::ValueArray28 Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, - T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17, - T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25, - T26 v26, T27 v27, T28 v28) { - return internal::ValueArray28(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, - v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, - v28); -} - -template -internal::ValueArray29 Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, - T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17, - T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25, - T26 v26, T27 v27, T28 v28, T29 v29) { - return internal::ValueArray29(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, - v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, - v27, v28, v29); -} - -template -internal::ValueArray30 Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, - T9 v9, T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, - T17 v17, T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, - T25 v25, T26 v26, T27 v27, T28 v28, T29 v29, T30 v30) { - return internal::ValueArray30(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, - v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, - v26, v27, v28, v29, v30); -} - -template -internal::ValueArray31 Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, - T8 v8, T9 v9, T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, - T16 v16, T17 v17, T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, - T24 v24, T25 v25, T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31) { - return internal::ValueArray31(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, - v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, - v25, v26, v27, v28, v29, v30, v31); -} - -template -internal::ValueArray32 Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, - T8 v8, T9 v9, T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, - T16 v16, T17 v17, T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, - T24 v24, T25 v25, T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31, - T32 v32) { - return internal::ValueArray32(v1, v2, v3, v4, v5, v6, v7, v8, v9, - v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, - v24, v25, v26, v27, v28, v29, v30, v31, v32); -} - -template -internal::ValueArray33 Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, - T7 v7, T8 v8, T9 v9, T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, - T16 v16, T17 v17, T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, - T24 v24, T25 v25, T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31, - T32 v32, T33 v33) { - return internal::ValueArray33(v1, v2, v3, v4, v5, v6, v7, v8, - v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, - v24, v25, v26, v27, v28, v29, v30, v31, v32, v33); -} - -template -internal::ValueArray34 Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, - T6 v6, T7 v7, T8 v8, T9 v9, T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, - T15 v15, T16 v16, T17 v17, T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, - T23 v23, T24 v24, T25 v25, T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, - T31 v31, T32 v32, T33 v33, T34 v34) { - return internal::ValueArray34(v1, v2, v3, v4, v5, v6, v7, - v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, - v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34); -} - -template -internal::ValueArray35 Values(T1 v1, T2 v2, T3 v3, T4 v4, - T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, T10 v10, T11 v11, T12 v12, T13 v13, - T14 v14, T15 v15, T16 v16, T17 v17, T18 v18, T19 v19, T20 v20, T21 v21, - T22 v22, T23 v23, T24 v24, T25 v25, T26 v26, T27 v27, T28 v28, T29 v29, - T30 v30, T31 v31, T32 v32, T33 v33, T34 v34, T35 v35) { - return internal::ValueArray35(v1, v2, v3, v4, v5, v6, - v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, - v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35); -} - -template -internal::ValueArray36 Values(T1 v1, T2 v2, T3 v3, T4 v4, - T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, T10 v10, T11 v11, T12 v12, T13 v13, - T14 v14, T15 v15, T16 v16, T17 v17, T18 v18, T19 v19, T20 v20, T21 v21, - T22 v22, T23 v23, T24 v24, T25 v25, T26 v26, T27 v27, T28 v28, T29 v29, - T30 v30, T31 v31, T32 v32, T33 v33, T34 v34, T35 v35, T36 v36) { - return internal::ValueArray36(v1, v2, v3, v4, - v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, - v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, - v34, v35, v36); -} - -template -internal::ValueArray37 Values(T1 v1, T2 v2, T3 v3, - T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, T10 v10, T11 v11, T12 v12, - T13 v13, T14 v14, T15 v15, T16 v16, T17 v17, T18 v18, T19 v19, T20 v20, - T21 v21, T22 v22, T23 v23, T24 v24, T25 v25, T26 v26, T27 v27, T28 v28, - T29 v29, T30 v30, T31 v31, T32 v32, T33 v33, T34 v34, T35 v35, T36 v36, - T37 v37) { - return internal::ValueArray37(v1, v2, v3, - v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, - v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, - v34, v35, v36, v37); -} - -template -internal::ValueArray38 Values(T1 v1, T2 v2, - T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, T10 v10, T11 v11, T12 v12, - T13 v13, T14 v14, T15 v15, T16 v16, T17 v17, T18 v18, T19 v19, T20 v20, - T21 v21, T22 v22, T23 v23, T24 v24, T25 v25, T26 v26, T27 v27, T28 v28, - T29 v29, T30 v30, T31 v31, T32 v32, T33 v33, T34 v34, T35 v35, T36 v36, - T37 v37, T38 v38) { - return internal::ValueArray38(v1, v2, - v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, - v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, - v33, v34, v35, v36, v37, v38); -} - -template -internal::ValueArray39 Values(T1 v1, T2 v2, - T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, T10 v10, T11 v11, T12 v12, - T13 v13, T14 v14, T15 v15, T16 v16, T17 v17, T18 v18, T19 v19, T20 v20, - T21 v21, T22 v22, T23 v23, T24 v24, T25 v25, T26 v26, T27 v27, T28 v28, - T29 v29, T30 v30, T31 v31, T32 v32, T33 v33, T34 v34, T35 v35, T36 v36, - T37 v37, T38 v38, T39 v39) { - return internal::ValueArray39(v1, - v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, - v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, - v32, v33, v34, v35, v36, v37, v38, v39); -} - -template -internal::ValueArray40 Values(T1 v1, - T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, T10 v10, T11 v11, - T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17, T18 v18, T19 v19, - T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25, T26 v26, T27 v27, - T28 v28, T29 v29, T30 v30, T31 v31, T32 v32, T33 v33, T34 v34, T35 v35, - T36 v36, T37 v37, T38 v38, T39 v39, T40 v40) { - return internal::ValueArray40(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, - v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, - v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40); -} - -template -internal::ValueArray41 Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, - T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17, - T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25, - T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31, T32 v32, T33 v33, - T34 v34, T35 v35, T36 v36, T37 v37, T38 v38, T39 v39, T40 v40, T41 v41) { - return internal::ValueArray41(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, - v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, - v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41); -} - -template -internal::ValueArray42 Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, - T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17, - T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25, - T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31, T32 v32, T33 v33, - T34 v34, T35 v35, T36 v36, T37 v37, T38 v38, T39 v39, T40 v40, T41 v41, - T42 v42) { - return internal::ValueArray42(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, - v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, - v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, - v42); -} - -template -internal::ValueArray43 Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, - T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17, - T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25, - T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31, T32 v32, T33 v33, - T34 v34, T35 v35, T36 v36, T37 v37, T38 v38, T39 v39, T40 v40, T41 v41, - T42 v42, T43 v43) { - return internal::ValueArray43(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, - v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, - v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, - v41, v42, v43); -} - -template -internal::ValueArray44 Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, - T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17, - T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25, - T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31, T32 v32, T33 v33, - T34 v34, T35 v35, T36 v36, T37 v37, T38 v38, T39 v39, T40 v40, T41 v41, - T42 v42, T43 v43, T44 v44) { - return internal::ValueArray44(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, - v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, - v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, - v40, v41, v42, v43, v44); -} - -template -internal::ValueArray45 Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, - T9 v9, T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, - T17 v17, T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, - T25 v25, T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31, T32 v32, - T33 v33, T34 v34, T35 v35, T36 v36, T37 v37, T38 v38, T39 v39, T40 v40, - T41 v41, T42 v42, T43 v43, T44 v44, T45 v45) { - return internal::ValueArray45(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, - v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, - v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, - v39, v40, v41, v42, v43, v44, v45); -} - -template -internal::ValueArray46 Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, - T8 v8, T9 v9, T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, - T16 v16, T17 v17, T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, - T24 v24, T25 v25, T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31, - T32 v32, T33 v33, T34 v34, T35 v35, T36 v36, T37 v37, T38 v38, T39 v39, - T40 v40, T41 v41, T42 v42, T43 v43, T44 v44, T45 v45, T46 v46) { - return internal::ValueArray46(v1, v2, v3, v4, v5, v6, v7, v8, v9, - v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, - v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, - v38, v39, v40, v41, v42, v43, v44, v45, v46); -} - -template -internal::ValueArray47 Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, - T8 v8, T9 v9, T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, - T16 v16, T17 v17, T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, - T24 v24, T25 v25, T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31, - T32 v32, T33 v33, T34 v34, T35 v35, T36 v36, T37 v37, T38 v38, T39 v39, - T40 v40, T41 v41, T42 v42, T43 v43, T44 v44, T45 v45, T46 v46, T47 v47) { - return internal::ValueArray47(v1, v2, v3, v4, v5, v6, v7, v8, - v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, - v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, - v38, v39, v40, v41, v42, v43, v44, v45, v46, v47); -} - -template -internal::ValueArray48 Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, - T7 v7, T8 v8, T9 v9, T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, - T16 v16, T17 v17, T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, - T24 v24, T25 v25, T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31, - T32 v32, T33 v33, T34 v34, T35 v35, T36 v36, T37 v37, T38 v38, T39 v39, - T40 v40, T41 v41, T42 v42, T43 v43, T44 v44, T45 v45, T46 v46, T47 v47, - T48 v48) { - return internal::ValueArray48(v1, v2, v3, v4, v5, v6, v7, - v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, - v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, - v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48); -} - -template -internal::ValueArray49 Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, - T6 v6, T7 v7, T8 v8, T9 v9, T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, - T15 v15, T16 v16, T17 v17, T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, - T23 v23, T24 v24, T25 v25, T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, - T31 v31, T32 v32, T33 v33, T34 v34, T35 v35, T36 v36, T37 v37, T38 v38, - T39 v39, T40 v40, T41 v41, T42 v42, T43 v43, T44 v44, T45 v45, T46 v46, - T47 v47, T48 v48, T49 v49) { - return internal::ValueArray49(v1, v2, v3, v4, v5, v6, - v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, - v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, - v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49); -} - -template -internal::ValueArray50 Values(T1 v1, T2 v2, T3 v3, T4 v4, - T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, T10 v10, T11 v11, T12 v12, T13 v13, - T14 v14, T15 v15, T16 v16, T17 v17, T18 v18, T19 v19, T20 v20, T21 v21, - T22 v22, T23 v23, T24 v24, T25 v25, T26 v26, T27 v27, T28 v28, T29 v29, - T30 v30, T31 v31, T32 v32, T33 v33, T34 v34, T35 v35, T36 v36, T37 v37, - T38 v38, T39 v39, T40 v40, T41 v41, T42 v42, T43 v43, T44 v44, T45 v45, - T46 v46, T47 v47, T48 v48, T49 v49, T50 v50) { - return internal::ValueArray50(v1, v2, v3, v4, - v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, - v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, - v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, - v48, v49, v50); -} - -// Bool() allows generating tests with parameters in a set of (false, true). -// -// Synopsis: -// Bool() -// - returns a generator producing sequences with elements {false, true}. -// -// It is useful when testing code that depends on Boolean flags. Combinations -// of multiple flags can be tested when several Bool()'s are combined using -// Combine() function. -// -// In the following example all tests in the test case FlagDependentTest -// will be instantiated twice with parameters false and true. -// -// class FlagDependentTest : public testing::TestWithParam { -// virtual void SetUp() { -// external_flag = GetParam(); -// } -// } -// INSTANTIATE_TEST_CASE_P(BoolSequence, FlagDependentTest, Bool()); -// -inline internal::ParamGenerator Bool() { - return Values(false, true); -} - -# if GTEST_HAS_COMBINE -// Combine() allows the user to combine two or more sequences to produce -// values of a Cartesian product of those sequences' elements. -// -// Synopsis: -// Combine(gen1, gen2, ..., genN) -// - returns a generator producing sequences with elements coming from -// the Cartesian product of elements from the sequences generated by -// gen1, gen2, ..., genN. The sequence elements will have a type of -// tuple where T1, T2, ..., TN are the types -// of elements from sequences produces by gen1, gen2, ..., genN. -// -// Combine can have up to 10 arguments. This number is currently limited -// by the maximum number of elements in the tuple implementation used by Google -// Test. -// -// Example: -// -// This will instantiate tests in test case AnimalTest each one with -// the parameter values tuple("cat", BLACK), tuple("cat", WHITE), -// tuple("dog", BLACK), and tuple("dog", WHITE): -// -// enum Color { BLACK, GRAY, WHITE }; -// class AnimalTest -// : public testing::TestWithParam > {...}; -// -// TEST_P(AnimalTest, AnimalLooksNice) {...} -// -// INSTANTIATE_TEST_CASE_P(AnimalVariations, AnimalTest, -// Combine(Values("cat", "dog"), -// Values(BLACK, WHITE))); -// -// This will instantiate tests in FlagDependentTest with all variations of two -// Boolean flags: -// -// class FlagDependentTest -// : public testing::TestWithParam > { -// virtual void SetUp() { -// // Assigns external_flag_1 and external_flag_2 values from the tuple. -// tie(external_flag_1, external_flag_2) = GetParam(); -// } -// }; -// -// TEST_P(FlagDependentTest, TestFeature1) { -// // Test your code using external_flag_1 and external_flag_2 here. -// } -// INSTANTIATE_TEST_CASE_P(TwoBoolSequence, FlagDependentTest, -// Combine(Bool(), Bool())); -// -template -internal::CartesianProductHolder2 Combine( - const Generator1& g1, const Generator2& g2) { - return internal::CartesianProductHolder2( - g1, g2); -} - -template -internal::CartesianProductHolder3 Combine( - const Generator1& g1, const Generator2& g2, const Generator3& g3) { - return internal::CartesianProductHolder3( - g1, g2, g3); -} - -template -internal::CartesianProductHolder4 Combine( - const Generator1& g1, const Generator2& g2, const Generator3& g3, - const Generator4& g4) { - return internal::CartesianProductHolder4( - g1, g2, g3, g4); -} - -template -internal::CartesianProductHolder5 Combine( - const Generator1& g1, const Generator2& g2, const Generator3& g3, - const Generator4& g4, const Generator5& g5) { - return internal::CartesianProductHolder5( - g1, g2, g3, g4, g5); -} - -template -internal::CartesianProductHolder6 Combine( - const Generator1& g1, const Generator2& g2, const Generator3& g3, - const Generator4& g4, const Generator5& g5, const Generator6& g6) { - return internal::CartesianProductHolder6( - g1, g2, g3, g4, g5, g6); -} - -template -internal::CartesianProductHolder7 Combine( - const Generator1& g1, const Generator2& g2, const Generator3& g3, - const Generator4& g4, const Generator5& g5, const Generator6& g6, - const Generator7& g7) { - return internal::CartesianProductHolder7( - g1, g2, g3, g4, g5, g6, g7); -} - -template -internal::CartesianProductHolder8 Combine( - const Generator1& g1, const Generator2& g2, const Generator3& g3, - const Generator4& g4, const Generator5& g5, const Generator6& g6, - const Generator7& g7, const Generator8& g8) { - return internal::CartesianProductHolder8( - g1, g2, g3, g4, g5, g6, g7, g8); -} - -template -internal::CartesianProductHolder9 Combine( - const Generator1& g1, const Generator2& g2, const Generator3& g3, - const Generator4& g4, const Generator5& g5, const Generator6& g6, - const Generator7& g7, const Generator8& g8, const Generator9& g9) { - return internal::CartesianProductHolder9( - g1, g2, g3, g4, g5, g6, g7, g8, g9); -} - -template -internal::CartesianProductHolder10 Combine( - const Generator1& g1, const Generator2& g2, const Generator3& g3, - const Generator4& g4, const Generator5& g5, const Generator6& g6, - const Generator7& g7, const Generator8& g8, const Generator9& g9, - const Generator10& g10) { - return internal::CartesianProductHolder10( - g1, g2, g3, g4, g5, g6, g7, g8, g9, g10); -} -# endif // GTEST_HAS_COMBINE - - - -# define TEST_P(test_case_name, test_name) \ - class GTEST_TEST_CLASS_NAME_(test_case_name, test_name) \ - : public test_case_name { \ - public: \ - GTEST_TEST_CLASS_NAME_(test_case_name, test_name)() {} \ - virtual void TestBody(); \ - private: \ - static int AddToRegistry() { \ - ::testing::UnitTest::GetInstance()->parameterized_test_registry(). \ - GetTestCasePatternHolder(\ - #test_case_name, __FILE__, __LINE__)->AddTestPattern(\ - #test_case_name, \ - #test_name, \ - new ::testing::internal::TestMetaFactory< \ - GTEST_TEST_CLASS_NAME_(test_case_name, test_name)>()); \ - return 0; \ - } \ - static int gtest_registering_dummy_ GTEST_ATTRIBUTE_UNUSED_; \ - GTEST_DISALLOW_COPY_AND_ASSIGN_(\ - GTEST_TEST_CLASS_NAME_(test_case_name, test_name)); \ - }; \ - int GTEST_TEST_CLASS_NAME_(test_case_name, \ - test_name)::gtest_registering_dummy_ = \ - GTEST_TEST_CLASS_NAME_(test_case_name, test_name)::AddToRegistry(); \ - void GTEST_TEST_CLASS_NAME_(test_case_name, test_name)::TestBody() - -# define INSTANTIATE_TEST_CASE_P(prefix, test_case_name, generator) \ - ::testing::internal::ParamGenerator \ - gtest_##prefix##test_case_name##_EvalGenerator_() { return generator; } \ - int gtest_##prefix##test_case_name##_dummy_ GTEST_ATTRIBUTE_UNUSED_ = \ - ::testing::UnitTest::GetInstance()->parameterized_test_registry(). \ - GetTestCasePatternHolder(\ - #test_case_name, __FILE__, __LINE__)->AddTestCaseInstantiation(\ - #prefix, \ - >est_##prefix##test_case_name##_EvalGenerator_, \ - __FILE__, __LINE__) - -} // namespace testing - -#endif // GTEST_HAS_PARAM_TEST - -#endif // GTEST_INCLUDE_GTEST_GTEST_PARAM_TEST_H_ -// Copyright 2006, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: wan@google.com (Zhanyong Wan) -// -// Google C++ Testing Framework definitions useful in production code. - -#ifndef GTEST_INCLUDE_GTEST_GTEST_PROD_H_ -#define GTEST_INCLUDE_GTEST_GTEST_PROD_H_ - -// When you need to test the private or protected members of a class, -// use the FRIEND_TEST macro to declare your tests as friends of the -// class. For example: -// -// class MyClass { -// private: -// void MyMethod(); -// FRIEND_TEST(MyClassTest, MyMethod); -// }; -// -// class MyClassTest : public testing::Test { -// // ... -// }; -// -// TEST_F(MyClassTest, MyMethod) { -// // Can call MyClass::MyMethod() here. -// } - -#define FRIEND_TEST(test_case_name, test_name)\ -friend class test_case_name##_##test_name##_Test - -#endif // GTEST_INCLUDE_GTEST_GTEST_PROD_H_ -// Copyright 2008, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: mheule@google.com (Markus Heule) -// - -#ifndef GTEST_INCLUDE_GTEST_GTEST_TEST_PART_H_ -#define GTEST_INCLUDE_GTEST_GTEST_TEST_PART_H_ - -#include -#include - -namespace testing { - -// A copyable object representing the result of a test part (i.e. an -// assertion or an explicit FAIL(), ADD_FAILURE(), or SUCCESS()). -// -// Don't inherit from TestPartResult as its destructor is not virtual. -class GTEST_API_ TestPartResult { - public: - // The possible outcomes of a test part (i.e. an assertion or an - // explicit SUCCEED(), FAIL(), or ADD_FAILURE()). - enum Type { - kSuccess, // Succeeded. - kNonFatalFailure, // Failed but the test can continue. - kFatalFailure // Failed and the test should be terminated. - }; - - // C'tor. TestPartResult does NOT have a default constructor. - // Always use this constructor (with parameters) to create a - // TestPartResult object. - TestPartResult(Type a_type, - const char* a_file_name, - int a_line_number, - const char* a_message) - : type_(a_type), - file_name_(a_file_name == NULL ? "" : a_file_name), - line_number_(a_line_number), - summary_(ExtractSummary(a_message)), - message_(a_message) { - } - - // Gets the outcome of the test part. - Type type() const { return type_; } - - // Gets the name of the source file where the test part took place, or - // NULL if it's unknown. - const char* file_name() const { - return file_name_.empty() ? NULL : file_name_.c_str(); - } - - // Gets the line in the source file where the test part took place, - // or -1 if it's unknown. - int line_number() const { return line_number_; } - - // Gets the summary of the failure message. - const char* summary() const { return summary_.c_str(); } - - // Gets the message associated with the test part. - const char* message() const { return message_.c_str(); } - - // Returns true iff the test part passed. - bool passed() const { return type_ == kSuccess; } - - // Returns true iff the test part failed. - bool failed() const { return type_ != kSuccess; } - - // Returns true iff the test part non-fatally failed. - bool nonfatally_failed() const { return type_ == kNonFatalFailure; } - - // Returns true iff the test part fatally failed. - bool fatally_failed() const { return type_ == kFatalFailure; } - - private: - Type type_; - - // Gets the summary of the failure message by omitting the stack - // trace in it. - static std::string ExtractSummary(const char* message); - - // The name of the source file where the test part took place, or - // "" if the source file is unknown. - std::string file_name_; - // The line in the source file where the test part took place, or -1 - // if the line number is unknown. - int line_number_; - std::string summary_; // The test failure summary. - std::string message_; // The test failure message. -}; - -// Prints a TestPartResult object. -std::ostream& operator<<(std::ostream& os, const TestPartResult& result); - -// An array of TestPartResult objects. -// -// Don't inherit from TestPartResultArray as its destructor is not -// virtual. -class GTEST_API_ TestPartResultArray { - public: - TestPartResultArray() {} - - // Appends the given TestPartResult to the array. - void Append(const TestPartResult& result); - - // Returns the TestPartResult at the given index (0-based). - const TestPartResult& GetTestPartResult(int index) const; - - // Returns the number of TestPartResult objects in the array. - int size() const; - - private: - std::vector array_; - - GTEST_DISALLOW_COPY_AND_ASSIGN_(TestPartResultArray); -}; - -// This interface knows how to report a test part result. -class TestPartResultReporterInterface { - public: - virtual ~TestPartResultReporterInterface() {} - - virtual void ReportTestPartResult(const TestPartResult& result) = 0; -}; - -namespace internal { - -// This helper class is used by {ASSERT|EXPECT}_NO_FATAL_FAILURE to check if a -// statement generates new fatal failures. To do so it registers itself as the -// current test part result reporter. Besides checking if fatal failures were -// reported, it only delegates the reporting to the former result reporter. -// The original result reporter is restored in the destructor. -// INTERNAL IMPLEMENTATION - DO NOT USE IN A USER PROGRAM. -class GTEST_API_ HasNewFatalFailureHelper - : public TestPartResultReporterInterface { - public: - HasNewFatalFailureHelper(); - virtual ~HasNewFatalFailureHelper(); - virtual void ReportTestPartResult(const TestPartResult& result); - bool has_new_fatal_failure() const { return has_new_fatal_failure_; } - private: - bool has_new_fatal_failure_; - TestPartResultReporterInterface* original_reporter_; - - GTEST_DISALLOW_COPY_AND_ASSIGN_(HasNewFatalFailureHelper); -}; - -} // namespace internal - -} // namespace testing - -#endif // GTEST_INCLUDE_GTEST_GTEST_TEST_PART_H_ -// Copyright 2008 Google Inc. -// All Rights Reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: wan@google.com (Zhanyong Wan) - -#ifndef GTEST_INCLUDE_GTEST_GTEST_TYPED_TEST_H_ -#define GTEST_INCLUDE_GTEST_GTEST_TYPED_TEST_H_ - -// This header implements typed tests and type-parameterized tests. - -// Typed (aka type-driven) tests repeat the same test for types in a -// list. You must know which types you want to test with when writing -// typed tests. Here's how you do it: - -#if 0 - -// First, define a fixture class template. It should be parameterized -// by a type. Remember to derive it from testing::Test. -template -class FooTest : public testing::Test { - public: - ... - typedef std::list List; - static T shared_; - T value_; -}; - -// Next, associate a list of types with the test case, which will be -// repeated for each type in the list. The typedef is necessary for -// the macro to parse correctly. -typedef testing::Types MyTypes; -TYPED_TEST_CASE(FooTest, MyTypes); - -// If the type list contains only one type, you can write that type -// directly without Types<...>: -// TYPED_TEST_CASE(FooTest, int); - -// Then, use TYPED_TEST() instead of TEST_F() to define as many typed -// tests for this test case as you want. -TYPED_TEST(FooTest, DoesBlah) { - // Inside a test, refer to TypeParam to get the type parameter. - // Since we are inside a derived class template, C++ requires use to - // visit the members of FooTest via 'this'. - TypeParam n = this->value_; - - // To visit static members of the fixture, add the TestFixture:: - // prefix. - n += TestFixture::shared_; - - // To refer to typedefs in the fixture, add the "typename - // TestFixture::" prefix. - typename TestFixture::List values; - values.push_back(n); - ... -} - -TYPED_TEST(FooTest, HasPropertyA) { ... } - -#endif // 0 - -// Type-parameterized tests are abstract test patterns parameterized -// by a type. Compared with typed tests, type-parameterized tests -// allow you to define the test pattern without knowing what the type -// parameters are. The defined pattern can be instantiated with -// different types any number of times, in any number of translation -// units. -// -// If you are designing an interface or concept, you can define a -// suite of type-parameterized tests to verify properties that any -// valid implementation of the interface/concept should have. Then, -// each implementation can easily instantiate the test suite to verify -// that it conforms to the requirements, without having to write -// similar tests repeatedly. Here's an example: - -#if 0 - -// First, define a fixture class template. It should be parameterized -// by a type. Remember to derive it from testing::Test. -template -class FooTest : public testing::Test { - ... -}; - -// Next, declare that you will define a type-parameterized test case -// (the _P suffix is for "parameterized" or "pattern", whichever you -// prefer): -TYPED_TEST_CASE_P(FooTest); - -// Then, use TYPED_TEST_P() to define as many type-parameterized tests -// for this type-parameterized test case as you want. -TYPED_TEST_P(FooTest, DoesBlah) { - // Inside a test, refer to TypeParam to get the type parameter. - TypeParam n = 0; - ... -} - -TYPED_TEST_P(FooTest, HasPropertyA) { ... } - -// Now the tricky part: you need to register all test patterns before -// you can instantiate them. The first argument of the macro is the -// test case name; the rest are the names of the tests in this test -// case. -REGISTER_TYPED_TEST_CASE_P(FooTest, - DoesBlah, HasPropertyA); - -// Finally, you are free to instantiate the pattern with the types you -// want. If you put the above code in a header file, you can #include -// it in multiple C++ source files and instantiate it multiple times. -// -// To distinguish different instances of the pattern, the first -// argument to the INSTANTIATE_* macro is a prefix that will be added -// to the actual test case name. Remember to pick unique prefixes for -// different instances. -typedef testing::Types MyTypes; -INSTANTIATE_TYPED_TEST_CASE_P(My, FooTest, MyTypes); - -// If the type list contains only one type, you can write that type -// directly without Types<...>: -// INSTANTIATE_TYPED_TEST_CASE_P(My, FooTest, int); - -#endif // 0 - - -// Implements typed tests. - -#if GTEST_HAS_TYPED_TEST - -// INTERNAL IMPLEMENTATION - DO NOT USE IN USER CODE. -// -// Expands to the name of the typedef for the type parameters of the -// given test case. -# define GTEST_TYPE_PARAMS_(TestCaseName) gtest_type_params_##TestCaseName##_ - -// The 'Types' template argument below must have spaces around it -// since some compilers may choke on '>>' when passing a template -// instance (e.g. Types) -# define TYPED_TEST_CASE(CaseName, Types) \ - typedef ::testing::internal::TypeList< Types >::type \ - GTEST_TYPE_PARAMS_(CaseName) - -# define TYPED_TEST(CaseName, TestName) \ - template \ - class GTEST_TEST_CLASS_NAME_(CaseName, TestName) \ - : public CaseName { \ - private: \ - typedef CaseName TestFixture; \ - typedef gtest_TypeParam_ TypeParam; \ - virtual void TestBody(); \ - }; \ - bool gtest_##CaseName##_##TestName##_registered_ GTEST_ATTRIBUTE_UNUSED_ = \ - ::testing::internal::TypeParameterizedTest< \ - CaseName, \ - ::testing::internal::TemplateSel< \ - GTEST_TEST_CLASS_NAME_(CaseName, TestName)>, \ - GTEST_TYPE_PARAMS_(CaseName)>::Register(\ - "", #CaseName, #TestName, 0); \ - template \ - void GTEST_TEST_CLASS_NAME_(CaseName, TestName)::TestBody() - -#endif // GTEST_HAS_TYPED_TEST - -// Implements type-parameterized tests. - -#if GTEST_HAS_TYPED_TEST_P - -// INTERNAL IMPLEMENTATION - DO NOT USE IN USER CODE. -// -// Expands to the namespace name that the type-parameterized tests for -// the given type-parameterized test case are defined in. The exact -// name of the namespace is subject to change without notice. -# define GTEST_CASE_NAMESPACE_(TestCaseName) \ - gtest_case_##TestCaseName##_ - -// INTERNAL IMPLEMENTATION - DO NOT USE IN USER CODE. -// -// Expands to the name of the variable used to remember the names of -// the defined tests in the given test case. -# define GTEST_TYPED_TEST_CASE_P_STATE_(TestCaseName) \ - gtest_typed_test_case_p_state_##TestCaseName##_ - -// INTERNAL IMPLEMENTATION - DO NOT USE IN USER CODE DIRECTLY. -// -// Expands to the name of the variable used to remember the names of -// the registered tests in the given test case. -# define GTEST_REGISTERED_TEST_NAMES_(TestCaseName) \ - gtest_registered_test_names_##TestCaseName##_ - -// The variables defined in the type-parameterized test macros are -// static as typically these macros are used in a .h file that can be -// #included in multiple translation units linked together. -# define TYPED_TEST_CASE_P(CaseName) \ - static ::testing::internal::TypedTestCasePState \ - GTEST_TYPED_TEST_CASE_P_STATE_(CaseName) - -# define TYPED_TEST_P(CaseName, TestName) \ - namespace GTEST_CASE_NAMESPACE_(CaseName) { \ - template \ - class TestName : public CaseName { \ - private: \ - typedef CaseName TestFixture; \ - typedef gtest_TypeParam_ TypeParam; \ - virtual void TestBody(); \ - }; \ - static bool gtest_##TestName##_defined_ GTEST_ATTRIBUTE_UNUSED_ = \ - GTEST_TYPED_TEST_CASE_P_STATE_(CaseName).AddTestName(\ - __FILE__, __LINE__, #CaseName, #TestName); \ - } \ - template \ - void GTEST_CASE_NAMESPACE_(CaseName)::TestName::TestBody() - -# define REGISTER_TYPED_TEST_CASE_P(CaseName, ...) \ - namespace GTEST_CASE_NAMESPACE_(CaseName) { \ - typedef ::testing::internal::Templates<__VA_ARGS__>::type gtest_AllTests_; \ - } \ - static const char* const GTEST_REGISTERED_TEST_NAMES_(CaseName) = \ - GTEST_TYPED_TEST_CASE_P_STATE_(CaseName).VerifyRegisteredTestNames(\ - __FILE__, __LINE__, #__VA_ARGS__) - -// The 'Types' template argument below must have spaces around it -// since some compilers may choke on '>>' when passing a template -// instance (e.g. Types) -# define INSTANTIATE_TYPED_TEST_CASE_P(Prefix, CaseName, Types) \ - bool gtest_##Prefix##_##CaseName GTEST_ATTRIBUTE_UNUSED_ = \ - ::testing::internal::TypeParameterizedTestCase::type>::Register(\ - #Prefix, #CaseName, GTEST_REGISTERED_TEST_NAMES_(CaseName)) - -#endif // GTEST_HAS_TYPED_TEST_P - -#endif // GTEST_INCLUDE_GTEST_GTEST_TYPED_TEST_H_ - -// Depending on the platform, different string classes are available. -// On Linux, in addition to ::std::string, Google also makes use of -// class ::string, which has the same interface as ::std::string, but -// has a different implementation. -// -// The user can define GTEST_HAS_GLOBAL_STRING to 1 to indicate that -// ::string is available AND is a distinct type to ::std::string, or -// define it to 0 to indicate otherwise. -// -// If the user's ::std::string and ::string are the same class due to -// aliasing, he should define GTEST_HAS_GLOBAL_STRING to 0. -// -// If the user doesn't define GTEST_HAS_GLOBAL_STRING, it is defined -// heuristically. - -namespace testing { - -// Declares the flags. - -// This flag temporary enables the disabled tests. -GTEST_DECLARE_bool_(also_run_disabled_tests); - -// This flag brings the debugger on an assertion failure. -GTEST_DECLARE_bool_(break_on_failure); - -// This flag controls whether Google Test catches all test-thrown exceptions -// and logs them as failures. -GTEST_DECLARE_bool_(catch_exceptions); - -// This flag enables using colors in terminal output. Available values are -// "yes" to enable colors, "no" (disable colors), or "auto" (the default) -// to let Google Test decide. -GTEST_DECLARE_string_(color); - -// This flag sets up the filter to select by name using a glob pattern -// the tests to run. If the filter is not given all tests are executed. -GTEST_DECLARE_string_(filter); - -// This flag causes the Google Test to list tests. None of the tests listed -// are actually run if the flag is provided. -GTEST_DECLARE_bool_(list_tests); - -// This flag controls whether Google Test emits a detailed XML report to a file -// in addition to its normal textual output. -GTEST_DECLARE_string_(output); - -// This flags control whether Google Test prints the elapsed time for each -// test. -GTEST_DECLARE_bool_(print_time); - -// This flag specifies the random number seed. -GTEST_DECLARE_int32_(random_seed); - -// This flag sets how many times the tests are repeated. The default value -// is 1. If the value is -1 the tests are repeating forever. -GTEST_DECLARE_int32_(repeat); - -// This flag controls whether Google Test includes Google Test internal -// stack frames in failure stack traces. -GTEST_DECLARE_bool_(show_internal_stack_frames); - -// When this flag is specified, tests' order is randomized on every iteration. -GTEST_DECLARE_bool_(shuffle); - -// This flag specifies the maximum number of stack frames to be -// printed in a failure message. -GTEST_DECLARE_int32_(stack_trace_depth); - -// When this flag is specified, a failed assertion will throw an -// exception if exceptions are enabled, or exit the program with a -// non-zero code otherwise. -GTEST_DECLARE_bool_(throw_on_failure); - -// When this flag is set with a "host:port" string, on supported -// platforms test results are streamed to the specified port on -// the specified host machine. -GTEST_DECLARE_string_(stream_result_to); - -// The upper limit for valid stack trace depths. -const int kMaxStackTraceDepth = 100; - -namespace internal { - -class AssertHelper; -class DefaultGlobalTestPartResultReporter; -class ExecDeathTest; -class NoExecDeathTest; -class FinalSuccessChecker; -class GTestFlagSaver; -class StreamingListenerTest; -class TestResultAccessor; -class TestEventListenersAccessor; -class TestEventRepeater; -class UnitTestRecordPropertyTestHelper; -class WindowsDeathTest; -class UnitTestImpl* GetUnitTestImpl(); -void ReportFailureInUnknownLocation(TestPartResult::Type result_type, - const std::string& message); - -} // namespace internal - -// The friend relationship of some of these classes is cyclic. -// If we don't forward declare them the compiler might confuse the classes -// in friendship clauses with same named classes on the scope. -class Test; -class TestCase; -class TestInfo; -class UnitTest; - -// A class for indicating whether an assertion was successful. When -// the assertion wasn't successful, the AssertionResult object -// remembers a non-empty message that describes how it failed. -// -// To create an instance of this class, use one of the factory functions -// (AssertionSuccess() and AssertionFailure()). -// -// This class is useful for two purposes: -// 1. Defining predicate functions to be used with Boolean test assertions -// EXPECT_TRUE/EXPECT_FALSE and their ASSERT_ counterparts -// 2. Defining predicate-format functions to be -// used with predicate assertions (ASSERT_PRED_FORMAT*, etc). -// -// For example, if you define IsEven predicate: -// -// testing::AssertionResult IsEven(int n) { -// if ((n % 2) == 0) -// return testing::AssertionSuccess(); -// else -// return testing::AssertionFailure() << n << " is odd"; -// } -// -// Then the failed expectation EXPECT_TRUE(IsEven(Fib(5))) -// will print the message -// -// Value of: IsEven(Fib(5)) -// Actual: false (5 is odd) -// Expected: true -// -// instead of a more opaque -// -// Value of: IsEven(Fib(5)) -// Actual: false -// Expected: true -// -// in case IsEven is a simple Boolean predicate. -// -// If you expect your predicate to be reused and want to support informative -// messages in EXPECT_FALSE and ASSERT_FALSE (negative assertions show up -// about half as often as positive ones in our tests), supply messages for -// both success and failure cases: -// -// testing::AssertionResult IsEven(int n) { -// if ((n % 2) == 0) -// return testing::AssertionSuccess() << n << " is even"; -// else -// return testing::AssertionFailure() << n << " is odd"; -// } -// -// Then a statement EXPECT_FALSE(IsEven(Fib(6))) will print -// -// Value of: IsEven(Fib(6)) -// Actual: true (8 is even) -// Expected: false -// -// NB: Predicates that support negative Boolean assertions have reduced -// performance in positive ones so be careful not to use them in tests -// that have lots (tens of thousands) of positive Boolean assertions. -// -// To use this class with EXPECT_PRED_FORMAT assertions such as: -// -// // Verifies that Foo() returns an even number. -// EXPECT_PRED_FORMAT1(IsEven, Foo()); -// -// you need to define: -// -// testing::AssertionResult IsEven(const char* expr, int n) { -// if ((n % 2) == 0) -// return testing::AssertionSuccess(); -// else -// return testing::AssertionFailure() -// << "Expected: " << expr << " is even\n Actual: it's " << n; -// } -// -// If Foo() returns 5, you will see the following message: -// -// Expected: Foo() is even -// Actual: it's 5 -// -class GTEST_API_ AssertionResult { - public: - // Copy constructor. - // Used in EXPECT_TRUE/FALSE(assertion_result). - AssertionResult(const AssertionResult& other); - // Used in the EXPECT_TRUE/FALSE(bool_expression). - explicit AssertionResult(bool success) : success_(success) {} - - // Returns true iff the assertion succeeded. - operator bool() const { return success_; } // NOLINT - - // Returns the assertion's negation. Used with EXPECT/ASSERT_FALSE. - AssertionResult operator!() const; - - // Returns the text streamed into this AssertionResult. Test assertions - // use it when they fail (i.e., the predicate's outcome doesn't match the - // assertion's expectation). When nothing has been streamed into the - // object, returns an empty string. - const char* message() const { - return message_.get() != NULL ? message_->c_str() : ""; - } - // TODO(vladl@google.com): Remove this after making sure no clients use it. - // Deprecated; please use message() instead. - const char* failure_message() const { return message(); } - - // Streams a custom failure message into this object. - template AssertionResult& operator<<(const T& value) { - AppendMessage(Message() << value); - return *this; - } - - // Allows streaming basic output manipulators such as endl or flush into - // this object. - AssertionResult& operator<<( - ::std::ostream& (*basic_manipulator)(::std::ostream& stream)) { - AppendMessage(Message() << basic_manipulator); - return *this; - } - - private: - // Appends the contents of message to message_. - void AppendMessage(const Message& a_message) { - if (message_.get() == NULL) - message_.reset(new ::std::string); - message_->append(a_message.GetString().c_str()); - } - - // Stores result of the assertion predicate. - bool success_; - // Stores the message describing the condition in case the expectation - // construct is not satisfied with the predicate's outcome. - // Referenced via a pointer to avoid taking too much stack frame space - // with test assertions. - internal::scoped_ptr< ::std::string> message_; - - GTEST_DISALLOW_ASSIGN_(AssertionResult); -}; - -// Makes a successful assertion result. -GTEST_API_ AssertionResult AssertionSuccess(); - -// Makes a failed assertion result. -GTEST_API_ AssertionResult AssertionFailure(); - -// Makes a failed assertion result with the given failure message. -// Deprecated; use AssertionFailure() << msg. -GTEST_API_ AssertionResult AssertionFailure(const Message& msg); - -// The abstract class that all tests inherit from. -// -// In Google Test, a unit test program contains one or many TestCases, and -// each TestCase contains one or many Tests. -// -// When you define a test using the TEST macro, you don't need to -// explicitly derive from Test - the TEST macro automatically does -// this for you. -// -// The only time you derive from Test is when defining a test fixture -// to be used a TEST_F. For example: -// -// class FooTest : public testing::Test { -// protected: -// virtual void SetUp() { ... } -// virtual void TearDown() { ... } -// ... -// }; -// -// TEST_F(FooTest, Bar) { ... } -// TEST_F(FooTest, Baz) { ... } -// -// Test is not copyable. -class GTEST_API_ Test { - public: - friend class TestInfo; - - // Defines types for pointers to functions that set up and tear down - // a test case. - typedef internal::SetUpTestCaseFunc SetUpTestCaseFunc; - typedef internal::TearDownTestCaseFunc TearDownTestCaseFunc; - - // The d'tor is virtual as we intend to inherit from Test. - virtual ~Test(); - - // Sets up the stuff shared by all tests in this test case. - // - // Google Test will call Foo::SetUpTestCase() before running the first - // test in test case Foo. Hence a sub-class can define its own - // SetUpTestCase() method to shadow the one defined in the super - // class. - static void SetUpTestCase() {} - - // Tears down the stuff shared by all tests in this test case. - // - // Google Test will call Foo::TearDownTestCase() after running the last - // test in test case Foo. Hence a sub-class can define its own - // TearDownTestCase() method to shadow the one defined in the super - // class. - static void TearDownTestCase() {} - - // Returns true iff the current test has a fatal failure. - static bool HasFatalFailure(); - - // Returns true iff the current test has a non-fatal failure. - static bool HasNonfatalFailure(); - - // Returns true iff the current test has a (either fatal or - // non-fatal) failure. - static bool HasFailure() { return HasFatalFailure() || HasNonfatalFailure(); } - - // Logs a property for the current test, test case, or for the entire - // invocation of the test program when used outside of the context of a - // test case. Only the last value for a given key is remembered. These - // are public static so they can be called from utility functions that are - // not members of the test fixture. Calls to RecordProperty made during - // lifespan of the test (from the moment its constructor starts to the - // moment its destructor finishes) will be output in XML as attributes of - // the element. Properties recorded from fixture's - // SetUpTestCase or TearDownTestCase are logged as attributes of the - // corresponding element. Calls to RecordProperty made in the - // global context (before or after invocation of RUN_ALL_TESTS and from - // SetUp/TearDown method of Environment objects registered with Google - // Test) will be output as attributes of the element. - static void RecordProperty(const std::string& key, const std::string& value); - static void RecordProperty(const std::string& key, int value); - - protected: - // Creates a Test object. - Test(); - - // Sets up the test fixture. - virtual void SetUp(); - - // Tears down the test fixture. - virtual void TearDown(); - - private: - // Returns true iff the current test has the same fixture class as - // the first test in the current test case. - static bool HasSameFixtureClass(); - - // Runs the test after the test fixture has been set up. - // - // A sub-class must implement this to define the test logic. - // - // DO NOT OVERRIDE THIS FUNCTION DIRECTLY IN A USER PROGRAM. - // Instead, use the TEST or TEST_F macro. - virtual void TestBody() = 0; - - // Sets up, executes, and tears down the test. - void Run(); - - // Deletes self. We deliberately pick an unusual name for this - // internal method to avoid clashing with names used in user TESTs. - void DeleteSelf_() { delete this; } - - // Uses a GTestFlagSaver to save and restore all Google Test flags. - const internal::GTestFlagSaver* const gtest_flag_saver_; - - // Often a user mis-spells SetUp() as Setup() and spends a long time - // wondering why it is never called by Google Test. The declaration of - // the following method is solely for catching such an error at - // compile time: - // - // - The return type is deliberately chosen to be not void, so it - // will be a conflict if a user declares void Setup() in his test - // fixture. - // - // - This method is private, so it will be another compiler error - // if a user calls it from his test fixture. - // - // DO NOT OVERRIDE THIS FUNCTION. - // - // If you see an error about overriding the following function or - // about it being private, you have mis-spelled SetUp() as Setup(). - struct Setup_should_be_spelled_SetUp {}; - virtual Setup_should_be_spelled_SetUp* Setup() { return NULL; } - - // We disallow copying Tests. - GTEST_DISALLOW_COPY_AND_ASSIGN_(Test); -}; - -typedef internal::TimeInMillis TimeInMillis; - -// A copyable object representing a user specified test property which can be -// output as a key/value string pair. -// -// Don't inherit from TestProperty as its destructor is not virtual. -class TestProperty { - public: - // C'tor. TestProperty does NOT have a default constructor. - // Always use this constructor (with parameters) to create a - // TestProperty object. - TestProperty(const std::string& a_key, const std::string& a_value) : - key_(a_key), value_(a_value) { - } - - // Gets the user supplied key. - const char* key() const { - return key_.c_str(); - } - - // Gets the user supplied value. - const char* value() const { - return value_.c_str(); - } - - // Sets a new value, overriding the one supplied in the constructor. - void SetValue(const std::string& new_value) { - value_ = new_value; - } - - private: - // The key supplied by the user. - std::string key_; - // The value supplied by the user. - std::string value_; -}; - -// The result of a single Test. This includes a list of -// TestPartResults, a list of TestProperties, a count of how many -// death tests there are in the Test, and how much time it took to run -// the Test. -// -// TestResult is not copyable. -class GTEST_API_ TestResult { - public: - // Creates an empty TestResult. - TestResult(); - - // D'tor. Do not inherit from TestResult. - ~TestResult(); - - // Gets the number of all test parts. This is the sum of the number - // of successful test parts and the number of failed test parts. - int total_part_count() const; - - // Returns the number of the test properties. - int test_property_count() const; - - // Returns true iff the test passed (i.e. no test part failed). - bool Passed() const { return !Failed(); } - - // Returns true iff the test failed. - bool Failed() const; - - // Returns true iff the test fatally failed. - bool HasFatalFailure() const; - - // Returns true iff the test has a non-fatal failure. - bool HasNonfatalFailure() const; - - // Returns the elapsed time, in milliseconds. - TimeInMillis elapsed_time() const { return elapsed_time_; } - - // Returns the i-th test part result among all the results. i can range - // from 0 to test_property_count() - 1. If i is not in that range, aborts - // the program. - const TestPartResult& GetTestPartResult(int i) const; - - // Returns the i-th test property. i can range from 0 to - // test_property_count() - 1. If i is not in that range, aborts the - // program. - const TestProperty& GetTestProperty(int i) const; - - private: - friend class TestInfo; - friend class TestCase; - friend class UnitTest; - friend class internal::DefaultGlobalTestPartResultReporter; - friend class internal::ExecDeathTest; - friend class internal::TestResultAccessor; - friend class internal::UnitTestImpl; - friend class internal::WindowsDeathTest; - - // Gets the vector of TestPartResults. - const std::vector& test_part_results() const { - return test_part_results_; - } - - // Gets the vector of TestProperties. - const std::vector& test_properties() const { - return test_properties_; - } - - // Sets the elapsed time. - void set_elapsed_time(TimeInMillis elapsed) { elapsed_time_ = elapsed; } - - // Adds a test property to the list. The property is validated and may add - // a non-fatal failure if invalid (e.g., if it conflicts with reserved - // key names). If a property is already recorded for the same key, the - // value will be updated, rather than storing multiple values for the same - // key. xml_element specifies the element for which the property is being - // recorded and is used for validation. - void RecordProperty(const std::string& xml_element, - const TestProperty& test_property); - - // Adds a failure if the key is a reserved attribute of Google Test - // testcase tags. Returns true if the property is valid. - // TODO(russr): Validate attribute names are legal and human readable. - static bool ValidateTestProperty(const std::string& xml_element, - const TestProperty& test_property); - - // Adds a test part result to the list. - void AddTestPartResult(const TestPartResult& test_part_result); - - // Returns the death test count. - int death_test_count() const { return death_test_count_; } - - // Increments the death test count, returning the new count. - int increment_death_test_count() { return ++death_test_count_; } - - // Clears the test part results. - void ClearTestPartResults(); - - // Clears the object. - void Clear(); - - // Protects mutable state of the property vector and of owned - // properties, whose values may be updated. - internal::Mutex test_properites_mutex_; - - // The vector of TestPartResults - std::vector test_part_results_; - // The vector of TestProperties - std::vector test_properties_; - // Running count of death tests. - int death_test_count_; - // The elapsed time, in milliseconds. - TimeInMillis elapsed_time_; - - // We disallow copying TestResult. - GTEST_DISALLOW_COPY_AND_ASSIGN_(TestResult); -}; // class TestResult - -// A TestInfo object stores the following information about a test: -// -// Test case name -// Test name -// Whether the test should be run -// A function pointer that creates the test object when invoked -// Test result -// -// The constructor of TestInfo registers itself with the UnitTest -// singleton such that the RUN_ALL_TESTS() macro knows which tests to -// run. -class GTEST_API_ TestInfo { - public: - // Destructs a TestInfo object. This function is not virtual, so - // don't inherit from TestInfo. - ~TestInfo(); - - // Returns the test case name. - const char* test_case_name() const { return test_case_name_.c_str(); } - - // Returns the test name. - const char* name() const { return name_.c_str(); } - - // Returns the name of the parameter type, or NULL if this is not a typed - // or a type-parameterized test. - const char* type_param() const { - if (type_param_.get() != NULL) - return type_param_->c_str(); - return NULL; - } - - // Returns the text representation of the value parameter, or NULL if this - // is not a value-parameterized test. - const char* value_param() const { - if (value_param_.get() != NULL) - return value_param_->c_str(); - return NULL; - } - - // Returns true if this test should run, that is if the test is not - // disabled (or it is disabled but the also_run_disabled_tests flag has - // been specified) and its full name matches the user-specified filter. - // - // Google Test allows the user to filter the tests by their full names. - // The full name of a test Bar in test case Foo is defined as - // "Foo.Bar". Only the tests that match the filter will run. - // - // A filter is a colon-separated list of glob (not regex) patterns, - // optionally followed by a '-' and a colon-separated list of - // negative patterns (tests to exclude). A test is run if it - // matches one of the positive patterns and does not match any of - // the negative patterns. - // - // For example, *A*:Foo.* is a filter that matches any string that - // contains the character 'A' or starts with "Foo.". - bool should_run() const { return should_run_; } - - // Returns true iff this test will appear in the XML report. - bool is_reportable() const { - // For now, the XML report includes all tests matching the filter. - // In the future, we may trim tests that are excluded because of - // sharding. - return matches_filter_; - } - - // Returns the result of the test. - const TestResult* result() const { return &result_; } - - private: -#if GTEST_HAS_DEATH_TEST - friend class internal::DefaultDeathTestFactory; -#endif // GTEST_HAS_DEATH_TEST - friend class Test; - friend class TestCase; - friend class internal::UnitTestImpl; - friend class internal::StreamingListenerTest; - friend TestInfo* internal::MakeAndRegisterTestInfo( - const char* test_case_name, - const char* name, - const char* type_param, - const char* value_param, - internal::TypeId fixture_class_id, - Test::SetUpTestCaseFunc set_up_tc, - Test::TearDownTestCaseFunc tear_down_tc, - internal::TestFactoryBase* factory); - - // Constructs a TestInfo object. The newly constructed instance assumes - // ownership of the factory object. - TestInfo(const std::string& test_case_name, - const std::string& name, - const char* a_type_param, // NULL if not a type-parameterized test - const char* a_value_param, // NULL if not a value-parameterized test - internal::TypeId fixture_class_id, - internal::TestFactoryBase* factory); - - // Increments the number of death tests encountered in this test so - // far. - int increment_death_test_count() { - return result_.increment_death_test_count(); - } - - // Creates the test object, runs it, records its result, and then - // deletes it. - void Run(); - - static void ClearTestResult(TestInfo* test_info) { - test_info->result_.Clear(); - } - - // These fields are immutable properties of the test. - const std::string test_case_name_; // Test case name - const std::string name_; // Test name - // Name of the parameter type, or NULL if this is not a typed or a - // type-parameterized test. - const internal::scoped_ptr type_param_; - // Text representation of the value parameter, or NULL if this is not a - // value-parameterized test. - const internal::scoped_ptr value_param_; - const internal::TypeId fixture_class_id_; // ID of the test fixture class - bool should_run_; // True iff this test should run - bool is_disabled_; // True iff this test is disabled - bool matches_filter_; // True if this test matches the - // user-specified filter. - internal::TestFactoryBase* const factory_; // The factory that creates - // the test object - - // This field is mutable and needs to be reset before running the - // test for the second time. - TestResult result_; - - GTEST_DISALLOW_COPY_AND_ASSIGN_(TestInfo); -}; - -// A test case, which consists of a vector of TestInfos. -// -// TestCase is not copyable. -class GTEST_API_ TestCase { - public: - // Creates a TestCase with the given name. - // - // TestCase does NOT have a default constructor. Always use this - // constructor to create a TestCase object. - // - // Arguments: - // - // name: name of the test case - // a_type_param: the name of the test's type parameter, or NULL if - // this is not a type-parameterized test. - // set_up_tc: pointer to the function that sets up the test case - // tear_down_tc: pointer to the function that tears down the test case - TestCase(const char* name, const char* a_type_param, - Test::SetUpTestCaseFunc set_up_tc, - Test::TearDownTestCaseFunc tear_down_tc); - - // Destructor of TestCase. - virtual ~TestCase(); - - // Gets the name of the TestCase. - const char* name() const { return name_.c_str(); } - - // Returns the name of the parameter type, or NULL if this is not a - // type-parameterized test case. - const char* type_param() const { - if (type_param_.get() != NULL) - return type_param_->c_str(); - return NULL; - } - - // Returns true if any test in this test case should run. - bool should_run() const { return should_run_; } - - // Gets the number of successful tests in this test case. - int successful_test_count() const; - - // Gets the number of failed tests in this test case. - int failed_test_count() const; - - // Gets the number of disabled tests that will be reported in the XML report. - int reportable_disabled_test_count() const; - - // Gets the number of disabled tests in this test case. - int disabled_test_count() const; - - // Gets the number of tests to be printed in the XML report. - int reportable_test_count() const; - - // Get the number of tests in this test case that should run. - int test_to_run_count() const; - - // Gets the number of all tests in this test case. - int total_test_count() const; - - // Returns true iff the test case passed. - bool Passed() const { return !Failed(); } - - // Returns true iff the test case failed. - bool Failed() const { return failed_test_count() > 0; } - - // Returns the elapsed time, in milliseconds. - TimeInMillis elapsed_time() const { return elapsed_time_; } - - // Returns the i-th test among all the tests. i can range from 0 to - // total_test_count() - 1. If i is not in that range, returns NULL. - const TestInfo* GetTestInfo(int i) const; - - // Returns the TestResult that holds test properties recorded during - // execution of SetUpTestCase and TearDownTestCase. - const TestResult& ad_hoc_test_result() const { return ad_hoc_test_result_; } - - private: - friend class Test; - friend class internal::UnitTestImpl; - - // Gets the (mutable) vector of TestInfos in this TestCase. - std::vector& test_info_list() { return test_info_list_; } - - // Gets the (immutable) vector of TestInfos in this TestCase. - const std::vector& test_info_list() const { - return test_info_list_; - } - - // Returns the i-th test among all the tests. i can range from 0 to - // total_test_count() - 1. If i is not in that range, returns NULL. - TestInfo* GetMutableTestInfo(int i); - - // Sets the should_run member. - void set_should_run(bool should) { should_run_ = should; } - - // Adds a TestInfo to this test case. Will delete the TestInfo upon - // destruction of the TestCase object. - void AddTestInfo(TestInfo * test_info); - - // Clears the results of all tests in this test case. - void ClearResult(); - - // Clears the results of all tests in the given test case. - static void ClearTestCaseResult(TestCase* test_case) { - test_case->ClearResult(); - } - - // Runs every test in this TestCase. - void Run(); - - // Runs SetUpTestCase() for this TestCase. This wrapper is needed - // for catching exceptions thrown from SetUpTestCase(). - void RunSetUpTestCase() { (*set_up_tc_)(); } - - // Runs TearDownTestCase() for this TestCase. This wrapper is - // needed for catching exceptions thrown from TearDownTestCase(). - void RunTearDownTestCase() { (*tear_down_tc_)(); } - - // Returns true iff test passed. - static bool TestPassed(const TestInfo* test_info) { - return test_info->should_run() && test_info->result()->Passed(); - } - - // Returns true iff test failed. - static bool TestFailed(const TestInfo* test_info) { - return test_info->should_run() && test_info->result()->Failed(); - } - - // Returns true iff the test is disabled and will be reported in the XML - // report. - static bool TestReportableDisabled(const TestInfo* test_info) { - return test_info->is_reportable() && test_info->is_disabled_; - } - - // Returns true iff test is disabled. - static bool TestDisabled(const TestInfo* test_info) { - return test_info->is_disabled_; - } - - // Returns true iff this test will appear in the XML report. - static bool TestReportable(const TestInfo* test_info) { - return test_info->is_reportable(); - } - - // Returns true if the given test should run. - static bool ShouldRunTest(const TestInfo* test_info) { - return test_info->should_run(); - } - - // Shuffles the tests in this test case. - void ShuffleTests(internal::Random* random); - - // Restores the test order to before the first shuffle. - void UnshuffleTests(); - - // Name of the test case. - std::string name_; - // Name of the parameter type, or NULL if this is not a typed or a - // type-parameterized test. - const internal::scoped_ptr type_param_; - // The vector of TestInfos in their original order. It owns the - // elements in the vector. - std::vector test_info_list_; - // Provides a level of indirection for the test list to allow easy - // shuffling and restoring the test order. The i-th element in this - // vector is the index of the i-th test in the shuffled test list. - std::vector test_indices_; - // Pointer to the function that sets up the test case. - Test::SetUpTestCaseFunc set_up_tc_; - // Pointer to the function that tears down the test case. - Test::TearDownTestCaseFunc tear_down_tc_; - // True iff any test in this test case should run. - bool should_run_; - // Elapsed time, in milliseconds. - TimeInMillis elapsed_time_; - // Holds test properties recorded during execution of SetUpTestCase and - // TearDownTestCase. - TestResult ad_hoc_test_result_; - - // We disallow copying TestCases. - GTEST_DISALLOW_COPY_AND_ASSIGN_(TestCase); -}; - -// An Environment object is capable of setting up and tearing down an -// environment. The user should subclass this to define his own -// environment(s). -// -// An Environment object does the set-up and tear-down in virtual -// methods SetUp() and TearDown() instead of the constructor and the -// destructor, as: -// -// 1. You cannot safely throw from a destructor. This is a problem -// as in some cases Google Test is used where exceptions are enabled, and -// we may want to implement ASSERT_* using exceptions where they are -// available. -// 2. You cannot use ASSERT_* directly in a constructor or -// destructor. -class Environment { - public: - // The d'tor is virtual as we need to subclass Environment. - virtual ~Environment() {} - - // Override this to define how to set up the environment. - virtual void SetUp() {} - - // Override this to define how to tear down the environment. - virtual void TearDown() {} - private: - // If you see an error about overriding the following function or - // about it being private, you have mis-spelled SetUp() as Setup(). - struct Setup_should_be_spelled_SetUp {}; - virtual Setup_should_be_spelled_SetUp* Setup() { return NULL; } -}; - -// The interface for tracing execution of tests. The methods are organized in -// the order the corresponding events are fired. -class TestEventListener { - public: - virtual ~TestEventListener() {} - - // Fired before any test activity starts. - virtual void OnTestProgramStart(const UnitTest& unit_test) = 0; - - // Fired before each iteration of tests starts. There may be more than - // one iteration if GTEST_FLAG(repeat) is set. iteration is the iteration - // index, starting from 0. - virtual void OnTestIterationStart(const UnitTest& unit_test, - int iteration) = 0; - - // Fired before environment set-up for each iteration of tests starts. - virtual void OnEnvironmentsSetUpStart(const UnitTest& unit_test) = 0; - - // Fired after environment set-up for each iteration of tests ends. - virtual void OnEnvironmentsSetUpEnd(const UnitTest& unit_test) = 0; - - // Fired before the test case starts. - virtual void OnTestCaseStart(const TestCase& test_case) = 0; - - // Fired before the test starts. - virtual void OnTestStart(const TestInfo& test_info) = 0; - - // Fired after a failed assertion or a SUCCEED() invocation. - virtual void OnTestPartResult(const TestPartResult& test_part_result) = 0; - - // Fired after the test ends. - virtual void OnTestEnd(const TestInfo& test_info) = 0; - - // Fired after the test case ends. - virtual void OnTestCaseEnd(const TestCase& test_case) = 0; - - // Fired before environment tear-down for each iteration of tests starts. - virtual void OnEnvironmentsTearDownStart(const UnitTest& unit_test) = 0; - - // Fired after environment tear-down for each iteration of tests ends. - virtual void OnEnvironmentsTearDownEnd(const UnitTest& unit_test) = 0; - - // Fired after each iteration of tests finishes. - virtual void OnTestIterationEnd(const UnitTest& unit_test, - int iteration) = 0; - - // Fired after all test activities have ended. - virtual void OnTestProgramEnd(const UnitTest& unit_test) = 0; -}; - -// The convenience class for users who need to override just one or two -// methods and are not concerned that a possible change to a signature of -// the methods they override will not be caught during the build. For -// comments about each method please see the definition of TestEventListener -// above. -class EmptyTestEventListener : public TestEventListener { - public: - virtual void OnTestProgramStart(const UnitTest& /*unit_test*/) {} - virtual void OnTestIterationStart(const UnitTest& /*unit_test*/, - int /*iteration*/) {} - virtual void OnEnvironmentsSetUpStart(const UnitTest& /*unit_test*/) {} - virtual void OnEnvironmentsSetUpEnd(const UnitTest& /*unit_test*/) {} - virtual void OnTestCaseStart(const TestCase& /*test_case*/) {} - virtual void OnTestStart(const TestInfo& /*test_info*/) {} - virtual void OnTestPartResult(const TestPartResult& /*test_part_result*/) {} - virtual void OnTestEnd(const TestInfo& /*test_info*/) {} - virtual void OnTestCaseEnd(const TestCase& /*test_case*/) {} - virtual void OnEnvironmentsTearDownStart(const UnitTest& /*unit_test*/) {} - virtual void OnEnvironmentsTearDownEnd(const UnitTest& /*unit_test*/) {} - virtual void OnTestIterationEnd(const UnitTest& /*unit_test*/, - int /*iteration*/) {} - virtual void OnTestProgramEnd(const UnitTest& /*unit_test*/) {} -}; - -// TestEventListeners lets users add listeners to track events in Google Test. -class GTEST_API_ TestEventListeners { - public: - TestEventListeners(); - ~TestEventListeners(); - - // Appends an event listener to the end of the list. Google Test assumes - // the ownership of the listener (i.e. it will delete the listener when - // the test program finishes). - void Append(TestEventListener* listener); - - // Removes the given event listener from the list and returns it. It then - // becomes the caller's responsibility to delete the listener. Returns - // NULL if the listener is not found in the list. - TestEventListener* Release(TestEventListener* listener); - - // Returns the standard listener responsible for the default console - // output. Can be removed from the listeners list to shut down default - // console output. Note that removing this object from the listener list - // with Release transfers its ownership to the caller and makes this - // function return NULL the next time. - TestEventListener* default_result_printer() const { - return default_result_printer_; - } - - // Returns the standard listener responsible for the default XML output - // controlled by the --gtest_output=xml flag. Can be removed from the - // listeners list by users who want to shut down the default XML output - // controlled by this flag and substitute it with custom one. Note that - // removing this object from the listener list with Release transfers its - // ownership to the caller and makes this function return NULL the next - // time. - TestEventListener* default_xml_generator() const { - return default_xml_generator_; - } - - private: - friend class TestCase; - friend class TestInfo; - friend class internal::DefaultGlobalTestPartResultReporter; - friend class internal::NoExecDeathTest; - friend class internal::TestEventListenersAccessor; - friend class internal::UnitTestImpl; - - // Returns repeater that broadcasts the TestEventListener events to all - // subscribers. - TestEventListener* repeater(); - - // Sets the default_result_printer attribute to the provided listener. - // The listener is also added to the listener list and previous - // default_result_printer is removed from it and deleted. The listener can - // also be NULL in which case it will not be added to the list. Does - // nothing if the previous and the current listener objects are the same. - void SetDefaultResultPrinter(TestEventListener* listener); - - // Sets the default_xml_generator attribute to the provided listener. The - // listener is also added to the listener list and previous - // default_xml_generator is removed from it and deleted. The listener can - // also be NULL in which case it will not be added to the list. Does - // nothing if the previous and the current listener objects are the same. - void SetDefaultXmlGenerator(TestEventListener* listener); - - // Controls whether events will be forwarded by the repeater to the - // listeners in the list. - bool EventForwardingEnabled() const; - void SuppressEventForwarding(); - - // The actual list of listeners. - internal::TestEventRepeater* repeater_; - // Listener responsible for the standard result output. - TestEventListener* default_result_printer_; - // Listener responsible for the creation of the XML output file. - TestEventListener* default_xml_generator_; - - // We disallow copying TestEventListeners. - GTEST_DISALLOW_COPY_AND_ASSIGN_(TestEventListeners); -}; - -// A UnitTest consists of a vector of TestCases. -// -// This is a singleton class. The only instance of UnitTest is -// created when UnitTest::GetInstance() is first called. This -// instance is never deleted. -// -// UnitTest is not copyable. -// -// This class is thread-safe as long as the methods are called -// according to their specification. -class GTEST_API_ UnitTest { - public: - // Gets the singleton UnitTest object. The first time this method - // is called, a UnitTest object is constructed and returned. - // Consecutive calls will return the same object. - static UnitTest* GetInstance(); - - // Runs all tests in this UnitTest object and prints the result. - // Returns 0 if successful, or 1 otherwise. - // - // This method can only be called from the main thread. - // - // INTERNAL IMPLEMENTATION - DO NOT USE IN A USER PROGRAM. - int Run() GTEST_MUST_USE_RESULT_; - - // Returns the working directory when the first TEST() or TEST_F() - // was executed. The UnitTest object owns the string. - const char* original_working_dir() const; - - // Returns the TestCase object for the test that's currently running, - // or NULL if no test is running. - const TestCase* current_test_case() const - GTEST_LOCK_EXCLUDED_(mutex_); - - // Returns the TestInfo object for the test that's currently running, - // or NULL if no test is running. - const TestInfo* current_test_info() const - GTEST_LOCK_EXCLUDED_(mutex_); - - // Returns the random seed used at the start of the current test run. - int random_seed() const; - -#if GTEST_HAS_PARAM_TEST - // Returns the ParameterizedTestCaseRegistry object used to keep track of - // value-parameterized tests and instantiate and register them. - // - // INTERNAL IMPLEMENTATION - DO NOT USE IN A USER PROGRAM. - internal::ParameterizedTestCaseRegistry& parameterized_test_registry() - GTEST_LOCK_EXCLUDED_(mutex_); -#endif // GTEST_HAS_PARAM_TEST - - // Gets the number of successful test cases. - int successful_test_case_count() const; - - // Gets the number of failed test cases. - int failed_test_case_count() const; - - // Gets the number of all test cases. - int total_test_case_count() const; - - // Gets the number of all test cases that contain at least one test - // that should run. - int test_case_to_run_count() const; - - // Gets the number of successful tests. - int successful_test_count() const; - - // Gets the number of failed tests. - int failed_test_count() const; - - // Gets the number of disabled tests that will be reported in the XML report. - int reportable_disabled_test_count() const; - - // Gets the number of disabled tests. - int disabled_test_count() const; - - // Gets the number of tests to be printed in the XML report. - int reportable_test_count() const; - - // Gets the number of all tests. - int total_test_count() const; - - // Gets the number of tests that should run. - int test_to_run_count() const; - - // Gets the time of the test program start, in ms from the start of the - // UNIX epoch. - TimeInMillis start_timestamp() const; - - // Gets the elapsed time, in milliseconds. - TimeInMillis elapsed_time() const; - - // Returns true iff the unit test passed (i.e. all test cases passed). - bool Passed() const; - - // Returns true iff the unit test failed (i.e. some test case failed - // or something outside of all tests failed). - bool Failed() const; - - // Gets the i-th test case among all the test cases. i can range from 0 to - // total_test_case_count() - 1. If i is not in that range, returns NULL. - const TestCase* GetTestCase(int i) const; - - // Returns the TestResult containing information on test failures and - // properties logged outside of individual test cases. - const TestResult& ad_hoc_test_result() const; - - // Returns the list of event listeners that can be used to track events - // inside Google Test. - TestEventListeners& listeners(); - - private: - // Registers and returns a global test environment. When a test - // program is run, all global test environments will be set-up in - // the order they were registered. After all tests in the program - // have finished, all global test environments will be torn-down in - // the *reverse* order they were registered. - // - // The UnitTest object takes ownership of the given environment. - // - // This method can only be called from the main thread. - Environment* AddEnvironment(Environment* env); - - // Adds a TestPartResult to the current TestResult object. All - // Google Test assertion macros (e.g. ASSERT_TRUE, EXPECT_EQ, etc) - // eventually call this to report their results. The user code - // should use the assertion macros instead of calling this directly. - void AddTestPartResult(TestPartResult::Type result_type, - const char* file_name, - int line_number, - const std::string& message, - const std::string& os_stack_trace) - GTEST_LOCK_EXCLUDED_(mutex_); - - // Adds a TestProperty to the current TestResult object when invoked from - // inside a test, to current TestCase's ad_hoc_test_result_ when invoked - // from SetUpTestCase or TearDownTestCase, or to the global property set - // when invoked elsewhere. If the result already contains a property with - // the same key, the value will be updated. - void RecordProperty(const std::string& key, const std::string& value); - - // Gets the i-th test case among all the test cases. i can range from 0 to - // total_test_case_count() - 1. If i is not in that range, returns NULL. - TestCase* GetMutableTestCase(int i); - - // Accessors for the implementation object. - internal::UnitTestImpl* impl() { return impl_; } - const internal::UnitTestImpl* impl() const { return impl_; } - - // These classes and funcions are friends as they need to access private - // members of UnitTest. - friend class Test; - friend class internal::AssertHelper; - friend class internal::ScopedTrace; - friend class internal::StreamingListenerTest; - friend class internal::UnitTestRecordPropertyTestHelper; - friend Environment* AddGlobalTestEnvironment(Environment* env); - friend internal::UnitTestImpl* internal::GetUnitTestImpl(); - friend void internal::ReportFailureInUnknownLocation( - TestPartResult::Type result_type, - const std::string& message); - - // Creates an empty UnitTest. - UnitTest(); - - // D'tor - virtual ~UnitTest(); - - // Pushes a trace defined by SCOPED_TRACE() on to the per-thread - // Google Test trace stack. - void PushGTestTrace(const internal::TraceInfo& trace) - GTEST_LOCK_EXCLUDED_(mutex_); - - // Pops a trace from the per-thread Google Test trace stack. - void PopGTestTrace() - GTEST_LOCK_EXCLUDED_(mutex_); - - // Protects mutable state in *impl_. This is mutable as some const - // methods need to lock it too. - mutable internal::Mutex mutex_; - - // Opaque implementation object. This field is never changed once - // the object is constructed. We don't mark it as const here, as - // doing so will cause a warning in the constructor of UnitTest. - // Mutable state in *impl_ is protected by mutex_. - internal::UnitTestImpl* impl_; - - // We disallow copying UnitTest. - GTEST_DISALLOW_COPY_AND_ASSIGN_(UnitTest); -}; - -// A convenient wrapper for adding an environment for the test -// program. -// -// You should call this before RUN_ALL_TESTS() is called, probably in -// main(). If you use gtest_main, you need to call this before main() -// starts for it to take effect. For example, you can define a global -// variable like this: -// -// testing::Environment* const foo_env = -// testing::AddGlobalTestEnvironment(new FooEnvironment); -// -// However, we strongly recommend you to write your own main() and -// call AddGlobalTestEnvironment() there, as relying on initialization -// of global variables makes the code harder to read and may cause -// problems when you register multiple environments from different -// translation units and the environments have dependencies among them -// (remember that the compiler doesn't guarantee the order in which -// global variables from different translation units are initialized). -inline Environment* AddGlobalTestEnvironment(Environment* env) { - return UnitTest::GetInstance()->AddEnvironment(env); -} - -// Initializes Google Test. This must be called before calling -// RUN_ALL_TESTS(). In particular, it parses a command line for the -// flags that Google Test recognizes. Whenever a Google Test flag is -// seen, it is removed from argv, and *argc is decremented. -// -// No value is returned. Instead, the Google Test flag variables are -// updated. -// -// Calling the function for the second time has no user-visible effect. -GTEST_API_ void InitGoogleTest(int* argc, char** argv); - -// This overloaded version can be used in Windows programs compiled in -// UNICODE mode. -GTEST_API_ void InitGoogleTest(int* argc, wchar_t** argv); - -namespace internal { - -// FormatForComparison::Format(value) formats a -// value of type ToPrint that is an operand of a comparison assertion -// (e.g. ASSERT_EQ). OtherOperand is the type of the other operand in -// the comparison, and is used to help determine the best way to -// format the value. In particular, when the value is a C string -// (char pointer) and the other operand is an STL string object, we -// want to format the C string as a string, since we know it is -// compared by value with the string object. If the value is a char -// pointer but the other operand is not an STL string object, we don't -// know whether the pointer is supposed to point to a NUL-terminated -// string, and thus want to print it as a pointer to be safe. -// -// INTERNAL IMPLEMENTATION - DO NOT USE IN A USER PROGRAM. - -// The default case. -template -class FormatForComparison { - public: - static ::std::string Format(const ToPrint& value) { - return ::testing::PrintToString(value); - } -}; - -// Array. -template -class FormatForComparison { - public: - static ::std::string Format(const ToPrint* value) { - return FormatForComparison::Format(value); - } -}; - -// By default, print C string as pointers to be safe, as we don't know -// whether they actually point to a NUL-terminated string. - -#define GTEST_IMPL_FORMAT_C_STRING_AS_POINTER_(CharType) \ - template \ - class FormatForComparison { \ - public: \ - static ::std::string Format(CharType* value) { \ - return ::testing::PrintToString(static_cast(value)); \ - } \ - } - -GTEST_IMPL_FORMAT_C_STRING_AS_POINTER_(char); -GTEST_IMPL_FORMAT_C_STRING_AS_POINTER_(const char); -GTEST_IMPL_FORMAT_C_STRING_AS_POINTER_(wchar_t); -GTEST_IMPL_FORMAT_C_STRING_AS_POINTER_(const wchar_t); - -#undef GTEST_IMPL_FORMAT_C_STRING_AS_POINTER_ - -// If a C string is compared with an STL string object, we know it's meant -// to point to a NUL-terminated string, and thus can print it as a string. - -#define GTEST_IMPL_FORMAT_C_STRING_AS_STRING_(CharType, OtherStringType) \ - template <> \ - class FormatForComparison { \ - public: \ - static ::std::string Format(CharType* value) { \ - return ::testing::PrintToString(value); \ - } \ - } - -GTEST_IMPL_FORMAT_C_STRING_AS_STRING_(char, ::std::string); -GTEST_IMPL_FORMAT_C_STRING_AS_STRING_(const char, ::std::string); - -#if GTEST_HAS_GLOBAL_STRING -GTEST_IMPL_FORMAT_C_STRING_AS_STRING_(char, ::string); -GTEST_IMPL_FORMAT_C_STRING_AS_STRING_(const char, ::string); -#endif - -#if GTEST_HAS_GLOBAL_WSTRING -GTEST_IMPL_FORMAT_C_STRING_AS_STRING_(wchar_t, ::wstring); -GTEST_IMPL_FORMAT_C_STRING_AS_STRING_(const wchar_t, ::wstring); -#endif - -#if GTEST_HAS_STD_WSTRING -GTEST_IMPL_FORMAT_C_STRING_AS_STRING_(wchar_t, ::std::wstring); -GTEST_IMPL_FORMAT_C_STRING_AS_STRING_(const wchar_t, ::std::wstring); -#endif - -#undef GTEST_IMPL_FORMAT_C_STRING_AS_STRING_ - -// Formats a comparison assertion (e.g. ASSERT_EQ, EXPECT_LT, and etc) -// operand to be used in a failure message. The type (but not value) -// of the other operand may affect the format. This allows us to -// print a char* as a raw pointer when it is compared against another -// char* or void*, and print it as a C string when it is compared -// against an std::string object, for example. -// -// INTERNAL IMPLEMENTATION - DO NOT USE IN A USER PROGRAM. -template -std::string FormatForComparisonFailureMessage( - const T1& value, const T2& /* other_operand */) { - return FormatForComparison::Format(value); -} - -// The helper function for {ASSERT|EXPECT}_EQ. -template -AssertionResult CmpHelperEQ(const char* expected_expression, - const char* actual_expression, - const T1& expected, - const T2& actual) { -#ifdef _MSC_VER -# pragma warning(push) // Saves the current warning state. -# pragma warning(disable:4389) // Temporarily disables warning on - // signed/unsigned mismatch. -#endif - - if (expected == actual) { - return AssertionSuccess(); - } - -#ifdef _MSC_VER -# pragma warning(pop) // Restores the warning state. -#endif - - return EqFailure(expected_expression, - actual_expression, - FormatForComparisonFailureMessage(expected, actual), - FormatForComparisonFailureMessage(actual, expected), - false); -} - -// With this overloaded version, we allow anonymous enums to be used -// in {ASSERT|EXPECT}_EQ when compiled with gcc 4, as anonymous enums -// can be implicitly cast to BiggestInt. -GTEST_API_ AssertionResult CmpHelperEQ(const char* expected_expression, - const char* actual_expression, - BiggestInt expected, - BiggestInt actual); - -// The helper class for {ASSERT|EXPECT}_EQ. The template argument -// lhs_is_null_literal is true iff the first argument to ASSERT_EQ() -// is a null pointer literal. The following default implementation is -// for lhs_is_null_literal being false. -template -class EqHelper { - public: - // This templatized version is for the general case. - template - static AssertionResult Compare(const char* expected_expression, - const char* actual_expression, - const T1& expected, - const T2& actual) { - return CmpHelperEQ(expected_expression, actual_expression, expected, - actual); - } - - // With this overloaded version, we allow anonymous enums to be used - // in {ASSERT|EXPECT}_EQ when compiled with gcc 4, as anonymous - // enums can be implicitly cast to BiggestInt. - // - // Even though its body looks the same as the above version, we - // cannot merge the two, as it will make anonymous enums unhappy. - static AssertionResult Compare(const char* expected_expression, - const char* actual_expression, - BiggestInt expected, - BiggestInt actual) { - return CmpHelperEQ(expected_expression, actual_expression, expected, - actual); - } -}; - -// This specialization is used when the first argument to ASSERT_EQ() -// is a null pointer literal, like NULL, false, or 0. -template <> -class EqHelper { - public: - // We define two overloaded versions of Compare(). The first - // version will be picked when the second argument to ASSERT_EQ() is - // NOT a pointer, e.g. ASSERT_EQ(0, AnIntFunction()) or - // EXPECT_EQ(false, a_bool). - template - static AssertionResult Compare( - const char* expected_expression, - const char* actual_expression, - const T1& expected, - const T2& actual, - // The following line prevents this overload from being considered if T2 - // is not a pointer type. We need this because ASSERT_EQ(NULL, my_ptr) - // expands to Compare("", "", NULL, my_ptr), which requires a conversion - // to match the Secret* in the other overload, which would otherwise make - // this template match better. - typename EnableIf::value>::type* = 0) { - return CmpHelperEQ(expected_expression, actual_expression, expected, - actual); - } - - // This version will be picked when the second argument to ASSERT_EQ() is a - // pointer, e.g. ASSERT_EQ(NULL, a_pointer). - template - static AssertionResult Compare( - const char* expected_expression, - const char* actual_expression, - // We used to have a second template parameter instead of Secret*. That - // template parameter would deduce to 'long', making this a better match - // than the first overload even without the first overload's EnableIf. - // Unfortunately, gcc with -Wconversion-null warns when "passing NULL to - // non-pointer argument" (even a deduced integral argument), so the old - // implementation caused warnings in user code. - Secret* /* expected (NULL) */, - T* actual) { - // We already know that 'expected' is a null pointer. - return CmpHelperEQ(expected_expression, actual_expression, - static_cast(NULL), actual); - } -}; - -// A macro for implementing the helper functions needed to implement -// ASSERT_?? and EXPECT_??. It is here just to avoid copy-and-paste -// of similar code. -// -// For each templatized helper function, we also define an overloaded -// version for BiggestInt in order to reduce code bloat and allow -// anonymous enums to be used with {ASSERT|EXPECT}_?? when compiled -// with gcc 4. -// -// INTERNAL IMPLEMENTATION - DO NOT USE IN A USER PROGRAM. -#define GTEST_IMPL_CMP_HELPER_(op_name, op)\ -template \ -AssertionResult CmpHelper##op_name(const char* expr1, const char* expr2, \ - const T1& val1, const T2& val2) {\ - if (val1 op val2) {\ - return AssertionSuccess();\ - } else {\ - return AssertionFailure() \ - << "Expected: (" << expr1 << ") " #op " (" << expr2\ - << "), actual: " << FormatForComparisonFailureMessage(val1, val2)\ - << " vs " << FormatForComparisonFailureMessage(val2, val1);\ - }\ -}\ -GTEST_API_ AssertionResult CmpHelper##op_name(\ - const char* expr1, const char* expr2, BiggestInt val1, BiggestInt val2) - -// INTERNAL IMPLEMENTATION - DO NOT USE IN A USER PROGRAM. - -// Implements the helper function for {ASSERT|EXPECT}_NE -GTEST_IMPL_CMP_HELPER_(NE, !=); -// Implements the helper function for {ASSERT|EXPECT}_LE -GTEST_IMPL_CMP_HELPER_(LE, <=); -// Implements the helper function for {ASSERT|EXPECT}_LT -GTEST_IMPL_CMP_HELPER_(LT, <); -// Implements the helper function for {ASSERT|EXPECT}_GE -GTEST_IMPL_CMP_HELPER_(GE, >=); -// Implements the helper function for {ASSERT|EXPECT}_GT -GTEST_IMPL_CMP_HELPER_(GT, >); - -#undef GTEST_IMPL_CMP_HELPER_ - -// The helper function for {ASSERT|EXPECT}_STREQ. -// -// INTERNAL IMPLEMENTATION - DO NOT USE IN A USER PROGRAM. -GTEST_API_ AssertionResult CmpHelperSTREQ(const char* expected_expression, - const char* actual_expression, - const char* expected, - const char* actual); - -// The helper function for {ASSERT|EXPECT}_STRCASEEQ. -// -// INTERNAL IMPLEMENTATION - DO NOT USE IN A USER PROGRAM. -GTEST_API_ AssertionResult CmpHelperSTRCASEEQ(const char* expected_expression, - const char* actual_expression, - const char* expected, - const char* actual); - -// The helper function for {ASSERT|EXPECT}_STRNE. -// -// INTERNAL IMPLEMENTATION - DO NOT USE IN A USER PROGRAM. -GTEST_API_ AssertionResult CmpHelperSTRNE(const char* s1_expression, - const char* s2_expression, - const char* s1, - const char* s2); - -// The helper function for {ASSERT|EXPECT}_STRCASENE. -// -// INTERNAL IMPLEMENTATION - DO NOT USE IN A USER PROGRAM. -GTEST_API_ AssertionResult CmpHelperSTRCASENE(const char* s1_expression, - const char* s2_expression, - const char* s1, - const char* s2); - - -// Helper function for *_STREQ on wide strings. -// -// INTERNAL IMPLEMENTATION - DO NOT USE IN A USER PROGRAM. -GTEST_API_ AssertionResult CmpHelperSTREQ(const char* expected_expression, - const char* actual_expression, - const wchar_t* expected, - const wchar_t* actual); - -// Helper function for *_STRNE on wide strings. -// -// INTERNAL IMPLEMENTATION - DO NOT USE IN A USER PROGRAM. -GTEST_API_ AssertionResult CmpHelperSTRNE(const char* s1_expression, - const char* s2_expression, - const wchar_t* s1, - const wchar_t* s2); - -} // namespace internal - -// IsSubstring() and IsNotSubstring() are intended to be used as the -// first argument to {EXPECT,ASSERT}_PRED_FORMAT2(), not by -// themselves. They check whether needle is a substring of haystack -// (NULL is considered a substring of itself only), and return an -// appropriate error message when they fail. -// -// The {needle,haystack}_expr arguments are the stringified -// expressions that generated the two real arguments. -GTEST_API_ AssertionResult IsSubstring( - const char* needle_expr, const char* haystack_expr, - const char* needle, const char* haystack); -GTEST_API_ AssertionResult IsSubstring( - const char* needle_expr, const char* haystack_expr, - const wchar_t* needle, const wchar_t* haystack); -GTEST_API_ AssertionResult IsNotSubstring( - const char* needle_expr, const char* haystack_expr, - const char* needle, const char* haystack); -GTEST_API_ AssertionResult IsNotSubstring( - const char* needle_expr, const char* haystack_expr, - const wchar_t* needle, const wchar_t* haystack); -GTEST_API_ AssertionResult IsSubstring( - const char* needle_expr, const char* haystack_expr, - const ::std::string& needle, const ::std::string& haystack); -GTEST_API_ AssertionResult IsNotSubstring( - const char* needle_expr, const char* haystack_expr, - const ::std::string& needle, const ::std::string& haystack); - -#if GTEST_HAS_STD_WSTRING -GTEST_API_ AssertionResult IsSubstring( - const char* needle_expr, const char* haystack_expr, - const ::std::wstring& needle, const ::std::wstring& haystack); -GTEST_API_ AssertionResult IsNotSubstring( - const char* needle_expr, const char* haystack_expr, - const ::std::wstring& needle, const ::std::wstring& haystack); -#endif // GTEST_HAS_STD_WSTRING - -namespace internal { - -// Helper template function for comparing floating-points. -// -// Template parameter: -// -// RawType: the raw floating-point type (either float or double) -// -// INTERNAL IMPLEMENTATION - DO NOT USE IN A USER PROGRAM. -template -AssertionResult CmpHelperFloatingPointEQ(const char* expected_expression, - const char* actual_expression, - RawType expected, - RawType actual) { - const FloatingPoint lhs(expected), rhs(actual); - - if (lhs.AlmostEquals(rhs)) { - return AssertionSuccess(); - } - - ::std::stringstream expected_ss; - expected_ss << std::setprecision(std::numeric_limits::digits10 + 2) - << expected; - - ::std::stringstream actual_ss; - actual_ss << std::setprecision(std::numeric_limits::digits10 + 2) - << actual; - - return EqFailure(expected_expression, - actual_expression, - StringStreamToString(&expected_ss), - StringStreamToString(&actual_ss), - false); -} - -// Helper function for implementing ASSERT_NEAR. -// -// INTERNAL IMPLEMENTATION - DO NOT USE IN A USER PROGRAM. -GTEST_API_ AssertionResult DoubleNearPredFormat(const char* expr1, - const char* expr2, - const char* abs_error_expr, - double val1, - double val2, - double abs_error); - -// INTERNAL IMPLEMENTATION - DO NOT USE IN USER CODE. -// A class that enables one to stream messages to assertion macros -class GTEST_API_ AssertHelper { - public: - // Constructor. - AssertHelper(TestPartResult::Type type, - const char* file, - int line, - const char* message); - ~AssertHelper(); - - // Message assignment is a semantic trick to enable assertion - // streaming; see the GTEST_MESSAGE_ macro below. - void operator=(const Message& message) const; - - private: - // We put our data in a struct so that the size of the AssertHelper class can - // be as small as possible. This is important because gcc is incapable of - // re-using stack space even for temporary variables, so every EXPECT_EQ - // reserves stack space for another AssertHelper. - struct AssertHelperData { - AssertHelperData(TestPartResult::Type t, - const char* srcfile, - int line_num, - const char* msg) - : type(t), file(srcfile), line(line_num), message(msg) { } - - TestPartResult::Type const type; - const char* const file; - int const line; - std::string const message; - - private: - GTEST_DISALLOW_COPY_AND_ASSIGN_(AssertHelperData); - }; - - AssertHelperData* const data_; - - GTEST_DISALLOW_COPY_AND_ASSIGN_(AssertHelper); -}; - -} // namespace internal - -#if GTEST_HAS_PARAM_TEST -// The pure interface class that all value-parameterized tests inherit from. -// A value-parameterized class must inherit from both ::testing::Test and -// ::testing::WithParamInterface. In most cases that just means inheriting -// from ::testing::TestWithParam, but more complicated test hierarchies -// may need to inherit from Test and WithParamInterface at different levels. -// -// This interface has support for accessing the test parameter value via -// the GetParam() method. -// -// Use it with one of the parameter generator defining functions, like Range(), -// Values(), ValuesIn(), Bool(), and Combine(). -// -// class FooTest : public ::testing::TestWithParam { -// protected: -// FooTest() { -// // Can use GetParam() here. -// } -// virtual ~FooTest() { -// // Can use GetParam() here. -// } -// virtual void SetUp() { -// // Can use GetParam() here. -// } -// virtual void TearDown { -// // Can use GetParam() here. -// } -// }; -// TEST_P(FooTest, DoesBar) { -// // Can use GetParam() method here. -// Foo foo; -// ASSERT_TRUE(foo.DoesBar(GetParam())); -// } -// INSTANTIATE_TEST_CASE_P(OneToTenRange, FooTest, ::testing::Range(1, 10)); - -template -class WithParamInterface { - public: - typedef T ParamType; - virtual ~WithParamInterface() {} - - // The current parameter value. Is also available in the test fixture's - // constructor. This member function is non-static, even though it only - // references static data, to reduce the opportunity for incorrect uses - // like writing 'WithParamInterface::GetParam()' for a test that - // uses a fixture whose parameter type is int. - const ParamType& GetParam() const { - GTEST_CHECK_(parameter_ != NULL) - << "GetParam() can only be called inside a value-parameterized test " - << "-- did you intend to write TEST_P instead of TEST_F?"; - return *parameter_; - } - - private: - // Sets parameter value. The caller is responsible for making sure the value - // remains alive and unchanged throughout the current test. - static void SetParam(const ParamType* parameter) { - parameter_ = parameter; - } - - // Static value used for accessing parameter during a test lifetime. - static const ParamType* parameter_; - - // TestClass must be a subclass of WithParamInterface and Test. - template friend class internal::ParameterizedTestFactory; -}; - -template -const T* WithParamInterface::parameter_ = NULL; - -// Most value-parameterized classes can ignore the existence of -// WithParamInterface, and can just inherit from ::testing::TestWithParam. - -template -class TestWithParam : public Test, public WithParamInterface { -}; - -#endif // GTEST_HAS_PARAM_TEST - -// Macros for indicating success/failure in test code. - -// ADD_FAILURE unconditionally adds a failure to the current test. -// SUCCEED generates a success - it doesn't automatically make the -// current test successful, as a test is only successful when it has -// no failure. -// -// EXPECT_* verifies that a certain condition is satisfied. If not, -// it behaves like ADD_FAILURE. In particular: -// -// EXPECT_TRUE verifies that a Boolean condition is true. -// EXPECT_FALSE verifies that a Boolean condition is false. -// -// FAIL and ASSERT_* are similar to ADD_FAILURE and EXPECT_*, except -// that they will also abort the current function on failure. People -// usually want the fail-fast behavior of FAIL and ASSERT_*, but those -// writing data-driven tests often find themselves using ADD_FAILURE -// and EXPECT_* more. - -// Generates a nonfatal failure with a generic message. -#define ADD_FAILURE() GTEST_NONFATAL_FAILURE_("Failed") - -// Generates a nonfatal failure at the given source file location with -// a generic message. -#define ADD_FAILURE_AT(file, line) \ - GTEST_MESSAGE_AT_(file, line, "Failed", \ - ::testing::TestPartResult::kNonFatalFailure) - -// Generates a fatal failure with a generic message. -#define GTEST_FAIL() GTEST_FATAL_FAILURE_("Failed") - -// Define this macro to 1 to omit the definition of FAIL(), which is a -// generic name and clashes with some other libraries. -#if !GTEST_DONT_DEFINE_FAIL -# define FAIL() GTEST_FAIL() -#endif - -// Generates a success with a generic message. -#define GTEST_SUCCEED() GTEST_SUCCESS_("Succeeded") - -// Define this macro to 1 to omit the definition of SUCCEED(), which -// is a generic name and clashes with some other libraries. -#if !GTEST_DONT_DEFINE_SUCCEED -# define SUCCEED() GTEST_SUCCEED() -#endif - -// Macros for testing exceptions. -// -// * {ASSERT|EXPECT}_THROW(statement, expected_exception): -// Tests that the statement throws the expected exception. -// * {ASSERT|EXPECT}_NO_THROW(statement): -// Tests that the statement doesn't throw any exception. -// * {ASSERT|EXPECT}_ANY_THROW(statement): -// Tests that the statement throws an exception. - -#define EXPECT_THROW(statement, expected_exception) \ - GTEST_TEST_THROW_(statement, expected_exception, GTEST_NONFATAL_FAILURE_) -#define EXPECT_NO_THROW(statement) \ - GTEST_TEST_NO_THROW_(statement, GTEST_NONFATAL_FAILURE_) -#define EXPECT_ANY_THROW(statement) \ - GTEST_TEST_ANY_THROW_(statement, GTEST_NONFATAL_FAILURE_) -#define ASSERT_THROW(statement, expected_exception) \ - GTEST_TEST_THROW_(statement, expected_exception, GTEST_FATAL_FAILURE_) -#define ASSERT_NO_THROW(statement) \ - GTEST_TEST_NO_THROW_(statement, GTEST_FATAL_FAILURE_) -#define ASSERT_ANY_THROW(statement) \ - GTEST_TEST_ANY_THROW_(statement, GTEST_FATAL_FAILURE_) - -// Boolean assertions. Condition can be either a Boolean expression or an -// AssertionResult. For more information on how to use AssertionResult with -// these macros see comments on that class. -#define EXPECT_TRUE(condition) \ - GTEST_TEST_BOOLEAN_(condition, #condition, false, true, \ - GTEST_NONFATAL_FAILURE_) -#define EXPECT_FALSE(condition) \ - GTEST_TEST_BOOLEAN_(!(condition), #condition, true, false, \ - GTEST_NONFATAL_FAILURE_) -#define ASSERT_TRUE(condition) \ - GTEST_TEST_BOOLEAN_(condition, #condition, false, true, \ - GTEST_FATAL_FAILURE_) -#define ASSERT_FALSE(condition) \ - GTEST_TEST_BOOLEAN_(!(condition), #condition, true, false, \ - GTEST_FATAL_FAILURE_) - -// Includes the auto-generated header that implements a family of -// generic predicate assertion macros. -// Copyright 2006, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// This file is AUTOMATICALLY GENERATED on 10/31/2011 by command -// 'gen_gtest_pred_impl.py 5'. DO NOT EDIT BY HAND! -// -// Implements a family of generic predicate assertion macros. - -#ifndef GTEST_INCLUDE_GTEST_GTEST_PRED_IMPL_H_ -#define GTEST_INCLUDE_GTEST_GTEST_PRED_IMPL_H_ - -// Makes sure this header is not included before gtest.h. -#ifndef GTEST_INCLUDE_GTEST_GTEST_H_ -# error Do not include gtest_pred_impl.h directly. Include gtest.h instead. -#endif // GTEST_INCLUDE_GTEST_GTEST_H_ - -// This header implements a family of generic predicate assertion -// macros: -// -// ASSERT_PRED_FORMAT1(pred_format, v1) -// ASSERT_PRED_FORMAT2(pred_format, v1, v2) -// ... -// -// where pred_format is a function or functor that takes n (in the -// case of ASSERT_PRED_FORMATn) values and their source expression -// text, and returns a testing::AssertionResult. See the definition -// of ASSERT_EQ in gtest.h for an example. -// -// If you don't care about formatting, you can use the more -// restrictive version: -// -// ASSERT_PRED1(pred, v1) -// ASSERT_PRED2(pred, v1, v2) -// ... -// -// where pred is an n-ary function or functor that returns bool, -// and the values v1, v2, ..., must support the << operator for -// streaming to std::ostream. -// -// We also define the EXPECT_* variations. -// -// For now we only support predicates whose arity is at most 5. -// Please email googletestframework@googlegroups.com if you need -// support for higher arities. - -// GTEST_ASSERT_ is the basic statement to which all of the assertions -// in this file reduce. Don't use this in your code. - -#define GTEST_ASSERT_(expression, on_failure) \ - GTEST_AMBIGUOUS_ELSE_BLOCKER_ \ - if (const ::testing::AssertionResult gtest_ar = (expression)) \ - ; \ - else \ - on_failure(gtest_ar.failure_message()) - - -// Helper function for implementing {EXPECT|ASSERT}_PRED1. Don't use -// this in your code. -template -AssertionResult AssertPred1Helper(const char* pred_text, - const char* e1, - Pred pred, - const T1& v1) { - if (pred(v1)) return AssertionSuccess(); - - return AssertionFailure() << pred_text << "(" - << e1 << ") evaluates to false, where" - << "\n" << e1 << " evaluates to " << v1; -} - -// Internal macro for implementing {EXPECT|ASSERT}_PRED_FORMAT1. -// Don't use this in your code. -#define GTEST_PRED_FORMAT1_(pred_format, v1, on_failure)\ - GTEST_ASSERT_(pred_format(#v1, v1), \ - on_failure) - -// Internal macro for implementing {EXPECT|ASSERT}_PRED1. Don't use -// this in your code. -#define GTEST_PRED1_(pred, v1, on_failure)\ - GTEST_ASSERT_(::testing::AssertPred1Helper(#pred, \ - #v1, \ - pred, \ - v1), on_failure) - -// Unary predicate assertion macros. -#define EXPECT_PRED_FORMAT1(pred_format, v1) \ - GTEST_PRED_FORMAT1_(pred_format, v1, GTEST_NONFATAL_FAILURE_) -#define EXPECT_PRED1(pred, v1) \ - GTEST_PRED1_(pred, v1, GTEST_NONFATAL_FAILURE_) -#define ASSERT_PRED_FORMAT1(pred_format, v1) \ - GTEST_PRED_FORMAT1_(pred_format, v1, GTEST_FATAL_FAILURE_) -#define ASSERT_PRED1(pred, v1) \ - GTEST_PRED1_(pred, v1, GTEST_FATAL_FAILURE_) - - - -// Helper function for implementing {EXPECT|ASSERT}_PRED2. Don't use -// this in your code. -template -AssertionResult AssertPred2Helper(const char* pred_text, - const char* e1, - const char* e2, - Pred pred, - const T1& v1, - const T2& v2) { - if (pred(v1, v2)) return AssertionSuccess(); - - return AssertionFailure() << pred_text << "(" - << e1 << ", " - << e2 << ") evaluates to false, where" - << "\n" << e1 << " evaluates to " << v1 - << "\n" << e2 << " evaluates to " << v2; -} - -// Internal macro for implementing {EXPECT|ASSERT}_PRED_FORMAT2. -// Don't use this in your code. -#define GTEST_PRED_FORMAT2_(pred_format, v1, v2, on_failure)\ - GTEST_ASSERT_(pred_format(#v1, #v2, v1, v2), \ - on_failure) - -// Internal macro for implementing {EXPECT|ASSERT}_PRED2. Don't use -// this in your code. -#define GTEST_PRED2_(pred, v1, v2, on_failure)\ - GTEST_ASSERT_(::testing::AssertPred2Helper(#pred, \ - #v1, \ - #v2, \ - pred, \ - v1, \ - v2), on_failure) - -// Binary predicate assertion macros. -#define EXPECT_PRED_FORMAT2(pred_format, v1, v2) \ - GTEST_PRED_FORMAT2_(pred_format, v1, v2, GTEST_NONFATAL_FAILURE_) -#define EXPECT_PRED2(pred, v1, v2) \ - GTEST_PRED2_(pred, v1, v2, GTEST_NONFATAL_FAILURE_) -#define ASSERT_PRED_FORMAT2(pred_format, v1, v2) \ - GTEST_PRED_FORMAT2_(pred_format, v1, v2, GTEST_FATAL_FAILURE_) -#define ASSERT_PRED2(pred, v1, v2) \ - GTEST_PRED2_(pred, v1, v2, GTEST_FATAL_FAILURE_) - - - -// Helper function for implementing {EXPECT|ASSERT}_PRED3. Don't use -// this in your code. -template -AssertionResult AssertPred3Helper(const char* pred_text, - const char* e1, - const char* e2, - const char* e3, - Pred pred, - const T1& v1, - const T2& v2, - const T3& v3) { - if (pred(v1, v2, v3)) return AssertionSuccess(); - - return AssertionFailure() << pred_text << "(" - << e1 << ", " - << e2 << ", " - << e3 << ") evaluates to false, where" - << "\n" << e1 << " evaluates to " << v1 - << "\n" << e2 << " evaluates to " << v2 - << "\n" << e3 << " evaluates to " << v3; -} - -// Internal macro for implementing {EXPECT|ASSERT}_PRED_FORMAT3. -// Don't use this in your code. -#define GTEST_PRED_FORMAT3_(pred_format, v1, v2, v3, on_failure)\ - GTEST_ASSERT_(pred_format(#v1, #v2, #v3, v1, v2, v3), \ - on_failure) - -// Internal macro for implementing {EXPECT|ASSERT}_PRED3. Don't use -// this in your code. -#define GTEST_PRED3_(pred, v1, v2, v3, on_failure)\ - GTEST_ASSERT_(::testing::AssertPred3Helper(#pred, \ - #v1, \ - #v2, \ - #v3, \ - pred, \ - v1, \ - v2, \ - v3), on_failure) - -// Ternary predicate assertion macros. -#define EXPECT_PRED_FORMAT3(pred_format, v1, v2, v3) \ - GTEST_PRED_FORMAT3_(pred_format, v1, v2, v3, GTEST_NONFATAL_FAILURE_) -#define EXPECT_PRED3(pred, v1, v2, v3) \ - GTEST_PRED3_(pred, v1, v2, v3, GTEST_NONFATAL_FAILURE_) -#define ASSERT_PRED_FORMAT3(pred_format, v1, v2, v3) \ - GTEST_PRED_FORMAT3_(pred_format, v1, v2, v3, GTEST_FATAL_FAILURE_) -#define ASSERT_PRED3(pred, v1, v2, v3) \ - GTEST_PRED3_(pred, v1, v2, v3, GTEST_FATAL_FAILURE_) - - - -// Helper function for implementing {EXPECT|ASSERT}_PRED4. Don't use -// this in your code. -template -AssertionResult AssertPred4Helper(const char* pred_text, - const char* e1, - const char* e2, - const char* e3, - const char* e4, - Pred pred, - const T1& v1, - const T2& v2, - const T3& v3, - const T4& v4) { - if (pred(v1, v2, v3, v4)) return AssertionSuccess(); - - return AssertionFailure() << pred_text << "(" - << e1 << ", " - << e2 << ", " - << e3 << ", " - << e4 << ") evaluates to false, where" - << "\n" << e1 << " evaluates to " << v1 - << "\n" << e2 << " evaluates to " << v2 - << "\n" << e3 << " evaluates to " << v3 - << "\n" << e4 << " evaluates to " << v4; -} - -// Internal macro for implementing {EXPECT|ASSERT}_PRED_FORMAT4. -// Don't use this in your code. -#define GTEST_PRED_FORMAT4_(pred_format, v1, v2, v3, v4, on_failure)\ - GTEST_ASSERT_(pred_format(#v1, #v2, #v3, #v4, v1, v2, v3, v4), \ - on_failure) - -// Internal macro for implementing {EXPECT|ASSERT}_PRED4. Don't use -// this in your code. -#define GTEST_PRED4_(pred, v1, v2, v3, v4, on_failure)\ - GTEST_ASSERT_(::testing::AssertPred4Helper(#pred, \ - #v1, \ - #v2, \ - #v3, \ - #v4, \ - pred, \ - v1, \ - v2, \ - v3, \ - v4), on_failure) - -// 4-ary predicate assertion macros. -#define EXPECT_PRED_FORMAT4(pred_format, v1, v2, v3, v4) \ - GTEST_PRED_FORMAT4_(pred_format, v1, v2, v3, v4, GTEST_NONFATAL_FAILURE_) -#define EXPECT_PRED4(pred, v1, v2, v3, v4) \ - GTEST_PRED4_(pred, v1, v2, v3, v4, GTEST_NONFATAL_FAILURE_) -#define ASSERT_PRED_FORMAT4(pred_format, v1, v2, v3, v4) \ - GTEST_PRED_FORMAT4_(pred_format, v1, v2, v3, v4, GTEST_FATAL_FAILURE_) -#define ASSERT_PRED4(pred, v1, v2, v3, v4) \ - GTEST_PRED4_(pred, v1, v2, v3, v4, GTEST_FATAL_FAILURE_) - - - -// Helper function for implementing {EXPECT|ASSERT}_PRED5. Don't use -// this in your code. -template -AssertionResult AssertPred5Helper(const char* pred_text, - const char* e1, - const char* e2, - const char* e3, - const char* e4, - const char* e5, - Pred pred, - const T1& v1, - const T2& v2, - const T3& v3, - const T4& v4, - const T5& v5) { - if (pred(v1, v2, v3, v4, v5)) return AssertionSuccess(); - - return AssertionFailure() << pred_text << "(" - << e1 << ", " - << e2 << ", " - << e3 << ", " - << e4 << ", " - << e5 << ") evaluates to false, where" - << "\n" << e1 << " evaluates to " << v1 - << "\n" << e2 << " evaluates to " << v2 - << "\n" << e3 << " evaluates to " << v3 - << "\n" << e4 << " evaluates to " << v4 - << "\n" << e5 << " evaluates to " << v5; -} - -// Internal macro for implementing {EXPECT|ASSERT}_PRED_FORMAT5. -// Don't use this in your code. -#define GTEST_PRED_FORMAT5_(pred_format, v1, v2, v3, v4, v5, on_failure)\ - GTEST_ASSERT_(pred_format(#v1, #v2, #v3, #v4, #v5, v1, v2, v3, v4, v5), \ - on_failure) - -// Internal macro for implementing {EXPECT|ASSERT}_PRED5. Don't use -// this in your code. -#define GTEST_PRED5_(pred, v1, v2, v3, v4, v5, on_failure)\ - GTEST_ASSERT_(::testing::AssertPred5Helper(#pred, \ - #v1, \ - #v2, \ - #v3, \ - #v4, \ - #v5, \ - pred, \ - v1, \ - v2, \ - v3, \ - v4, \ - v5), on_failure) - -// 5-ary predicate assertion macros. -#define EXPECT_PRED_FORMAT5(pred_format, v1, v2, v3, v4, v5) \ - GTEST_PRED_FORMAT5_(pred_format, v1, v2, v3, v4, v5, GTEST_NONFATAL_FAILURE_) -#define EXPECT_PRED5(pred, v1, v2, v3, v4, v5) \ - GTEST_PRED5_(pred, v1, v2, v3, v4, v5, GTEST_NONFATAL_FAILURE_) -#define ASSERT_PRED_FORMAT5(pred_format, v1, v2, v3, v4, v5) \ - GTEST_PRED_FORMAT5_(pred_format, v1, v2, v3, v4, v5, GTEST_FATAL_FAILURE_) -#define ASSERT_PRED5(pred, v1, v2, v3, v4, v5) \ - GTEST_PRED5_(pred, v1, v2, v3, v4, v5, GTEST_FATAL_FAILURE_) - - - -#endif // GTEST_INCLUDE_GTEST_GTEST_PRED_IMPL_H_ - -// Macros for testing equalities and inequalities. -// -// * {ASSERT|EXPECT}_EQ(expected, actual): Tests that expected == actual -// * {ASSERT|EXPECT}_NE(v1, v2): Tests that v1 != v2 -// * {ASSERT|EXPECT}_LT(v1, v2): Tests that v1 < v2 -// * {ASSERT|EXPECT}_LE(v1, v2): Tests that v1 <= v2 -// * {ASSERT|EXPECT}_GT(v1, v2): Tests that v1 > v2 -// * {ASSERT|EXPECT}_GE(v1, v2): Tests that v1 >= v2 -// -// When they are not, Google Test prints both the tested expressions and -// their actual values. The values must be compatible built-in types, -// or you will get a compiler error. By "compatible" we mean that the -// values can be compared by the respective operator. -// -// Note: -// -// 1. It is possible to make a user-defined type work with -// {ASSERT|EXPECT}_??(), but that requires overloading the -// comparison operators and is thus discouraged by the Google C++ -// Usage Guide. Therefore, you are advised to use the -// {ASSERT|EXPECT}_TRUE() macro to assert that two objects are -// equal. -// -// 2. The {ASSERT|EXPECT}_??() macros do pointer comparisons on -// pointers (in particular, C strings). Therefore, if you use it -// with two C strings, you are testing how their locations in memory -// are related, not how their content is related. To compare two C -// strings by content, use {ASSERT|EXPECT}_STR*(). -// -// 3. {ASSERT|EXPECT}_EQ(expected, actual) is preferred to -// {ASSERT|EXPECT}_TRUE(expected == actual), as the former tells you -// what the actual value is when it fails, and similarly for the -// other comparisons. -// -// 4. Do not depend on the order in which {ASSERT|EXPECT}_??() -// evaluate their arguments, which is undefined. -// -// 5. These macros evaluate their arguments exactly once. -// -// Examples: -// -// EXPECT_NE(5, Foo()); -// EXPECT_EQ(NULL, a_pointer); -// ASSERT_LT(i, array_size); -// ASSERT_GT(records.size(), 0) << "There is no record left."; - -#define EXPECT_EQ(expected, actual) \ - EXPECT_PRED_FORMAT2(::testing::internal:: \ - EqHelper::Compare, \ - expected, actual) -#define EXPECT_NE(expected, actual) \ - EXPECT_PRED_FORMAT2(::testing::internal::CmpHelperNE, expected, actual) -#define EXPECT_LE(val1, val2) \ - EXPECT_PRED_FORMAT2(::testing::internal::CmpHelperLE, val1, val2) -#define EXPECT_LT(val1, val2) \ - EXPECT_PRED_FORMAT2(::testing::internal::CmpHelperLT, val1, val2) -#define EXPECT_GE(val1, val2) \ - EXPECT_PRED_FORMAT2(::testing::internal::CmpHelperGE, val1, val2) -#define EXPECT_GT(val1, val2) \ - EXPECT_PRED_FORMAT2(::testing::internal::CmpHelperGT, val1, val2) - -#define GTEST_ASSERT_EQ(expected, actual) \ - ASSERT_PRED_FORMAT2(::testing::internal:: \ - EqHelper::Compare, \ - expected, actual) -#define GTEST_ASSERT_NE(val1, val2) \ - ASSERT_PRED_FORMAT2(::testing::internal::CmpHelperNE, val1, val2) -#define GTEST_ASSERT_LE(val1, val2) \ - ASSERT_PRED_FORMAT2(::testing::internal::CmpHelperLE, val1, val2) -#define GTEST_ASSERT_LT(val1, val2) \ - ASSERT_PRED_FORMAT2(::testing::internal::CmpHelperLT, val1, val2) -#define GTEST_ASSERT_GE(val1, val2) \ - ASSERT_PRED_FORMAT2(::testing::internal::CmpHelperGE, val1, val2) -#define GTEST_ASSERT_GT(val1, val2) \ - ASSERT_PRED_FORMAT2(::testing::internal::CmpHelperGT, val1, val2) - -// Define macro GTEST_DONT_DEFINE_ASSERT_XY to 1 to omit the definition of -// ASSERT_XY(), which clashes with some users' own code. - -#if !GTEST_DONT_DEFINE_ASSERT_EQ -# define ASSERT_EQ(val1, val2) GTEST_ASSERT_EQ(val1, val2) -#endif - -#if !GTEST_DONT_DEFINE_ASSERT_NE -# define ASSERT_NE(val1, val2) GTEST_ASSERT_NE(val1, val2) -#endif - -#if !GTEST_DONT_DEFINE_ASSERT_LE -# define ASSERT_LE(val1, val2) GTEST_ASSERT_LE(val1, val2) -#endif - -#if !GTEST_DONT_DEFINE_ASSERT_LT -# define ASSERT_LT(val1, val2) GTEST_ASSERT_LT(val1, val2) -#endif - -#if !GTEST_DONT_DEFINE_ASSERT_GE -# define ASSERT_GE(val1, val2) GTEST_ASSERT_GE(val1, val2) -#endif - -#if !GTEST_DONT_DEFINE_ASSERT_GT -# define ASSERT_GT(val1, val2) GTEST_ASSERT_GT(val1, val2) -#endif - -// C-string Comparisons. All tests treat NULL and any non-NULL string -// as different. Two NULLs are equal. -// -// * {ASSERT|EXPECT}_STREQ(s1, s2): Tests that s1 == s2 -// * {ASSERT|EXPECT}_STRNE(s1, s2): Tests that s1 != s2 -// * {ASSERT|EXPECT}_STRCASEEQ(s1, s2): Tests that s1 == s2, ignoring case -// * {ASSERT|EXPECT}_STRCASENE(s1, s2): Tests that s1 != s2, ignoring case -// -// For wide or narrow string objects, you can use the -// {ASSERT|EXPECT}_??() macros. -// -// Don't depend on the order in which the arguments are evaluated, -// which is undefined. -// -// These macros evaluate their arguments exactly once. - -#define EXPECT_STREQ(expected, actual) \ - EXPECT_PRED_FORMAT2(::testing::internal::CmpHelperSTREQ, expected, actual) -#define EXPECT_STRNE(s1, s2) \ - EXPECT_PRED_FORMAT2(::testing::internal::CmpHelperSTRNE, s1, s2) -#define EXPECT_STRCASEEQ(expected, actual) \ - EXPECT_PRED_FORMAT2(::testing::internal::CmpHelperSTRCASEEQ, expected, actual) -#define EXPECT_STRCASENE(s1, s2)\ - EXPECT_PRED_FORMAT2(::testing::internal::CmpHelperSTRCASENE, s1, s2) - -#define ASSERT_STREQ(expected, actual) \ - ASSERT_PRED_FORMAT2(::testing::internal::CmpHelperSTREQ, expected, actual) -#define ASSERT_STRNE(s1, s2) \ - ASSERT_PRED_FORMAT2(::testing::internal::CmpHelperSTRNE, s1, s2) -#define ASSERT_STRCASEEQ(expected, actual) \ - ASSERT_PRED_FORMAT2(::testing::internal::CmpHelperSTRCASEEQ, expected, actual) -#define ASSERT_STRCASENE(s1, s2)\ - ASSERT_PRED_FORMAT2(::testing::internal::CmpHelperSTRCASENE, s1, s2) - -// Macros for comparing floating-point numbers. -// -// * {ASSERT|EXPECT}_FLOAT_EQ(expected, actual): -// Tests that two float values are almost equal. -// * {ASSERT|EXPECT}_DOUBLE_EQ(expected, actual): -// Tests that two double values are almost equal. -// * {ASSERT|EXPECT}_NEAR(v1, v2, abs_error): -// Tests that v1 and v2 are within the given distance to each other. -// -// Google Test uses ULP-based comparison to automatically pick a default -// error bound that is appropriate for the operands. See the -// FloatingPoint template class in gtest-internal.h if you are -// interested in the implementation details. - -#define EXPECT_FLOAT_EQ(expected, actual)\ - EXPECT_PRED_FORMAT2(::testing::internal::CmpHelperFloatingPointEQ, \ - expected, actual) - -#define EXPECT_DOUBLE_EQ(expected, actual)\ - EXPECT_PRED_FORMAT2(::testing::internal::CmpHelperFloatingPointEQ, \ - expected, actual) - -#define ASSERT_FLOAT_EQ(expected, actual)\ - ASSERT_PRED_FORMAT2(::testing::internal::CmpHelperFloatingPointEQ, \ - expected, actual) - -#define ASSERT_DOUBLE_EQ(expected, actual)\ - ASSERT_PRED_FORMAT2(::testing::internal::CmpHelperFloatingPointEQ, \ - expected, actual) - -#define EXPECT_NEAR(val1, val2, abs_error)\ - EXPECT_PRED_FORMAT3(::testing::internal::DoubleNearPredFormat, \ - val1, val2, abs_error) - -#define ASSERT_NEAR(val1, val2, abs_error)\ - ASSERT_PRED_FORMAT3(::testing::internal::DoubleNearPredFormat, \ - val1, val2, abs_error) - -// These predicate format functions work on floating-point values, and -// can be used in {ASSERT|EXPECT}_PRED_FORMAT2*(), e.g. -// -// EXPECT_PRED_FORMAT2(testing::DoubleLE, Foo(), 5.0); - -// Asserts that val1 is less than, or almost equal to, val2. Fails -// otherwise. In particular, it fails if either val1 or val2 is NaN. -GTEST_API_ AssertionResult FloatLE(const char* expr1, const char* expr2, - float val1, float val2); -GTEST_API_ AssertionResult DoubleLE(const char* expr1, const char* expr2, - double val1, double val2); - - -#if GTEST_OS_WINDOWS - -// Macros that test for HRESULT failure and success, these are only useful -// on Windows, and rely on Windows SDK macros and APIs to compile. -// -// * {ASSERT|EXPECT}_HRESULT_{SUCCEEDED|FAILED}(expr) -// -// When expr unexpectedly fails or succeeds, Google Test prints the -// expected result and the actual result with both a human-readable -// string representation of the error, if available, as well as the -// hex result code. -# define EXPECT_HRESULT_SUCCEEDED(expr) \ - EXPECT_PRED_FORMAT1(::testing::internal::IsHRESULTSuccess, (expr)) - -# define ASSERT_HRESULT_SUCCEEDED(expr) \ - ASSERT_PRED_FORMAT1(::testing::internal::IsHRESULTSuccess, (expr)) - -# define EXPECT_HRESULT_FAILED(expr) \ - EXPECT_PRED_FORMAT1(::testing::internal::IsHRESULTFailure, (expr)) - -# define ASSERT_HRESULT_FAILED(expr) \ - ASSERT_PRED_FORMAT1(::testing::internal::IsHRESULTFailure, (expr)) - -#endif // GTEST_OS_WINDOWS - -// Macros that execute statement and check that it doesn't generate new fatal -// failures in the current thread. -// -// * {ASSERT|EXPECT}_NO_FATAL_FAILURE(statement); -// -// Examples: -// -// EXPECT_NO_FATAL_FAILURE(Process()); -// ASSERT_NO_FATAL_FAILURE(Process()) << "Process() failed"; -// -#define ASSERT_NO_FATAL_FAILURE(statement) \ - GTEST_TEST_NO_FATAL_FAILURE_(statement, GTEST_FATAL_FAILURE_) -#define EXPECT_NO_FATAL_FAILURE(statement) \ - GTEST_TEST_NO_FATAL_FAILURE_(statement, GTEST_NONFATAL_FAILURE_) - -// Causes a trace (including the source file path, the current line -// number, and the given message) to be included in every test failure -// message generated by code in the current scope. The effect is -// undone when the control leaves the current scope. -// -// The message argument can be anything streamable to std::ostream. -// -// In the implementation, we include the current line number as part -// of the dummy variable name, thus allowing multiple SCOPED_TRACE()s -// to appear in the same block - as long as they are on different -// lines. -#define SCOPED_TRACE(message) \ - ::testing::internal::ScopedTrace GTEST_CONCAT_TOKEN_(gtest_trace_, __LINE__)(\ - __FILE__, __LINE__, ::testing::Message() << (message)) - -// Compile-time assertion for type equality. -// StaticAssertTypeEq() compiles iff type1 and type2 are -// the same type. The value it returns is not interesting. -// -// Instead of making StaticAssertTypeEq a class template, we make it a -// function template that invokes a helper class template. This -// prevents a user from misusing StaticAssertTypeEq by -// defining objects of that type. -// -// CAVEAT: -// -// When used inside a method of a class template, -// StaticAssertTypeEq() is effective ONLY IF the method is -// instantiated. For example, given: -// -// template class Foo { -// public: -// void Bar() { testing::StaticAssertTypeEq(); } -// }; -// -// the code: -// -// void Test1() { Foo foo; } -// -// will NOT generate a compiler error, as Foo::Bar() is never -// actually instantiated. Instead, you need: -// -// void Test2() { Foo foo; foo.Bar(); } -// -// to cause a compiler error. -template -bool StaticAssertTypeEq() { - (void)internal::StaticAssertTypeEqHelper(); - return true; -} - -// Defines a test. -// -// The first parameter is the name of the test case, and the second -// parameter is the name of the test within the test case. -// -// The convention is to end the test case name with "Test". For -// example, a test case for the Foo class can be named FooTest. -// -// The user should put his test code between braces after using this -// macro. Example: -// -// TEST(FooTest, InitializesCorrectly) { -// Foo foo; -// EXPECT_TRUE(foo.StatusIsOK()); -// } - -// Note that we call GetTestTypeId() instead of GetTypeId< -// ::testing::Test>() here to get the type ID of testing::Test. This -// is to work around a suspected linker bug when using Google Test as -// a framework on Mac OS X. The bug causes GetTypeId< -// ::testing::Test>() to return different values depending on whether -// the call is from the Google Test framework itself or from user test -// code. GetTestTypeId() is guaranteed to always return the same -// value, as it always calls GetTypeId<>() from the Google Test -// framework. -#define GTEST_TEST(test_case_name, test_name)\ - GTEST_TEST_(test_case_name, test_name, \ - ::testing::Test, ::testing::internal::GetTestTypeId()) - -// Define this macro to 1 to omit the definition of TEST(), which -// is a generic name and clashes with some other libraries. -#if !GTEST_DONT_DEFINE_TEST -# define TEST(test_case_name, test_name) GTEST_TEST(test_case_name, test_name) -#endif - -// Defines a test that uses a test fixture. -// -// The first parameter is the name of the test fixture class, which -// also doubles as the test case name. The second parameter is the -// name of the test within the test case. -// -// A test fixture class must be declared earlier. The user should put -// his test code between braces after using this macro. Example: -// -// class FooTest : public testing::Test { -// protected: -// virtual void SetUp() { b_.AddElement(3); } -// -// Foo a_; -// Foo b_; -// }; -// -// TEST_F(FooTest, InitializesCorrectly) { -// EXPECT_TRUE(a_.StatusIsOK()); -// } -// -// TEST_F(FooTest, ReturnsElementCountCorrectly) { -// EXPECT_EQ(0, a_.size()); -// EXPECT_EQ(1, b_.size()); -// } - -#define TEST_F(test_fixture, test_name)\ - GTEST_TEST_(test_fixture, test_name, test_fixture, \ - ::testing::internal::GetTypeId()) - -} // namespace testing - -// Use this function in main() to run all tests. It returns 0 if all -// tests are successful, or 1 otherwise. -// -// RUN_ALL_TESTS() should be invoked after the command line has been -// parsed by InitGoogleTest(). -// -// This function was formerly a macro; thus, it is in the global -// namespace and has an all-caps name. -int RUN_ALL_TESTS() GTEST_MUST_USE_RESULT_; - -inline int RUN_ALL_TESTS() { - return ::testing::UnitTest::GetInstance()->Run(); -} - -#endif // GTEST_INCLUDE_GTEST_GTEST_H_ diff --git a/WebRtc.NET/include/third_party/libvpx/source/libvpx/third_party/libwebm/common/file_util.h b/WebRtc.NET/include/third_party/libvpx/source/libvpx/third_party/libwebm/common/file_util.h deleted file mode 100644 index 0e71eac1..00000000 --- a/WebRtc.NET/include/third_party/libvpx/source/libvpx/third_party/libwebm/common/file_util.h +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) 2016 The WebM project authors. All Rights Reserved. -// -// Use of this source code is governed by a BSD-style license -// that can be found in the LICENSE file in the root of the source -// tree. An additional intellectual property rights grant can be found -// in the file PATENTS. All contributing project authors may -// be found in the AUTHORS file in the root of the source tree. -#ifndef LIBWEBM_COMMON_FILE_UTIL_H_ -#define LIBWEBM_COMMON_FILE_UTIL_H_ - -#include - -#include - -#include "mkvmuxer/mkvmuxertypes.h" // LIBWEBM_DISALLOW_COPY_AND_ASSIGN() - -namespace libwebm { - -// Returns a temporary file name. -std::string GetTempFileName(); - -// Returns size of file specified by |file_name|, or 0 upon failure. -uint64_t GetFileSize(const std::string& file_name); - -// Manages life of temporary file specified at time of construction. Deletes -// file upon destruction. -class TempFileDeleter { - public: - TempFileDeleter(); - explicit TempFileDeleter(std::string file_name) : file_name_(file_name) {} - ~TempFileDeleter(); - const std::string& name() const { return file_name_; } - - private: - std::string file_name_; - LIBWEBM_DISALLOW_COPY_AND_ASSIGN(TempFileDeleter); -}; - -} // namespace libwebm - -#endif // LIBWEBM_COMMON_FILE_UTIL_H_ \ No newline at end of file diff --git a/WebRtc.NET/include/third_party/libvpx/source/libvpx/third_party/libyuv/include/libyuv/basic_types.h b/WebRtc.NET/include/third_party/libvpx/source/libvpx/third_party/libyuv/include/libyuv/basic_types.h deleted file mode 100644 index 54a21814..00000000 --- a/WebRtc.NET/include/third_party/libvpx/source/libvpx/third_party/libyuv/include/libyuv/basic_types.h +++ /dev/null @@ -1,118 +0,0 @@ -/* - * Copyright 2011 The LibYuv Project Authors. All rights reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef INCLUDE_LIBYUV_BASIC_TYPES_H_ // NOLINT -#define INCLUDE_LIBYUV_BASIC_TYPES_H_ - -#include // for NULL, size_t - -#if defined(_MSC_VER) && (_MSC_VER < 1600) -#include // for uintptr_t on x86 -#else -#include // for uintptr_t -#endif - -#ifndef GG_LONGLONG -#ifndef INT_TYPES_DEFINED -#define INT_TYPES_DEFINED -#ifdef COMPILER_MSVC -typedef unsigned __int64 uint64; -typedef __int64 int64; -#ifndef INT64_C -#define INT64_C(x) x ## I64 -#endif -#ifndef UINT64_C -#define UINT64_C(x) x ## UI64 -#endif -#define INT64_F "I64" -#else // COMPILER_MSVC -#if defined(__LP64__) && !defined(__OpenBSD__) && !defined(__APPLE__) -typedef unsigned long uint64; // NOLINT -typedef long int64; // NOLINT -#ifndef INT64_C -#define INT64_C(x) x ## L -#endif -#ifndef UINT64_C -#define UINT64_C(x) x ## UL -#endif -#define INT64_F "l" -#else // defined(__LP64__) && !defined(__OpenBSD__) && !defined(__APPLE__) -typedef unsigned long long uint64; // NOLINT -typedef long long int64; // NOLINT -#ifndef INT64_C -#define INT64_C(x) x ## LL -#endif -#ifndef UINT64_C -#define UINT64_C(x) x ## ULL -#endif -#define INT64_F "ll" -#endif // __LP64__ -#endif // COMPILER_MSVC -typedef unsigned int uint32; -typedef int int32; -typedef unsigned short uint16; // NOLINT -typedef short int16; // NOLINT -typedef unsigned char uint8; -typedef signed char int8; -#endif // INT_TYPES_DEFINED -#endif // GG_LONGLONG - -// Detect compiler is for x86 or x64. -#if defined(__x86_64__) || defined(_M_X64) || \ - defined(__i386__) || defined(_M_IX86) -#define CPU_X86 1 -#endif -// Detect compiler is for ARM. -#if defined(__arm__) || defined(_M_ARM) -#define CPU_ARM 1 -#endif - -#ifndef ALIGNP -#ifdef __cplusplus -#define ALIGNP(p, t) \ - (reinterpret_cast(((reinterpret_cast(p) + \ - ((t) - 1)) & ~((t) - 1)))) -#else -#define ALIGNP(p, t) \ - ((uint8*)((((uintptr_t)(p) + ((t) - 1)) & ~((t) - 1)))) /* NOLINT */ -#endif -#endif - -#if !defined(LIBYUV_API) -#if defined(_WIN32) || defined(__CYGWIN__) -#if defined(LIBYUV_BUILDING_SHARED_LIBRARY) -#define LIBYUV_API __declspec(dllexport) -#elif defined(LIBYUV_USING_SHARED_LIBRARY) -#define LIBYUV_API __declspec(dllimport) -#else -#define LIBYUV_API -#endif // LIBYUV_BUILDING_SHARED_LIBRARY -#elif defined(__GNUC__) && (__GNUC__ >= 4) && !defined(__APPLE__) && \ - (defined(LIBYUV_BUILDING_SHARED_LIBRARY) || \ - defined(LIBYUV_USING_SHARED_LIBRARY)) -#define LIBYUV_API __attribute__ ((visibility ("default"))) -#else -#define LIBYUV_API -#endif // __GNUC__ -#endif // LIBYUV_API - -#define LIBYUV_BOOL int -#define LIBYUV_FALSE 0 -#define LIBYUV_TRUE 1 - -// Visual C x86 or GCC little endian. -#if defined(__x86_64__) || defined(_M_X64) || \ - defined(__i386__) || defined(_M_IX86) || \ - defined(__arm__) || defined(_M_ARM) || \ - (defined(__BYTE_ORDER__) && __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__) -#define LIBYUV_LITTLE_ENDIAN -#endif - -#endif // INCLUDE_LIBYUV_BASIC_TYPES_H_ NOLINT diff --git a/WebRtc.NET/include/third_party/libvpx/source/libvpx/third_party/libyuv/include/libyuv/compare.h b/WebRtc.NET/include/third_party/libvpx/source/libvpx/third_party/libyuv/include/libyuv/compare.h deleted file mode 100644 index 08b2bb2e..00000000 --- a/WebRtc.NET/include/third_party/libvpx/source/libvpx/third_party/libyuv/include/libyuv/compare.h +++ /dev/null @@ -1,78 +0,0 @@ -/* - * Copyright 2011 The LibYuv Project Authors. All rights reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef INCLUDE_LIBYUV_COMPARE_H_ // NOLINT -#define INCLUDE_LIBYUV_COMPARE_H_ - -#include "libyuv/basic_types.h" - -#ifdef __cplusplus -namespace libyuv { -extern "C" { -#endif - -// Compute a hash for specified memory. Seed of 5381 recommended. -LIBYUV_API -uint32 HashDjb2(const uint8* src, uint64 count, uint32 seed); - -// Scan an opaque argb image and return fourcc based on alpha offset. -// Returns FOURCC_ARGB, FOURCC_BGRA, or 0 if unknown. -LIBYUV_API -uint32 ARGBDetect(const uint8* argb, int stride_argb, int width, int height); - -// Sum Square Error - used to compute Mean Square Error or PSNR. -LIBYUV_API -uint64 ComputeSumSquareError(const uint8* src_a, - const uint8* src_b, int count); - -LIBYUV_API -uint64 ComputeSumSquareErrorPlane(const uint8* src_a, int stride_a, - const uint8* src_b, int stride_b, - int width, int height); - -static const int kMaxPsnr = 128; - -LIBYUV_API -double SumSquareErrorToPsnr(uint64 sse, uint64 count); - -LIBYUV_API -double CalcFramePsnr(const uint8* src_a, int stride_a, - const uint8* src_b, int stride_b, - int width, int height); - -LIBYUV_API -double I420Psnr(const uint8* src_y_a, int stride_y_a, - const uint8* src_u_a, int stride_u_a, - const uint8* src_v_a, int stride_v_a, - const uint8* src_y_b, int stride_y_b, - const uint8* src_u_b, int stride_u_b, - const uint8* src_v_b, int stride_v_b, - int width, int height); - -LIBYUV_API -double CalcFrameSsim(const uint8* src_a, int stride_a, - const uint8* src_b, int stride_b, - int width, int height); - -LIBYUV_API -double I420Ssim(const uint8* src_y_a, int stride_y_a, - const uint8* src_u_a, int stride_u_a, - const uint8* src_v_a, int stride_v_a, - const uint8* src_y_b, int stride_y_b, - const uint8* src_u_b, int stride_u_b, - const uint8* src_v_b, int stride_v_b, - int width, int height); - -#ifdef __cplusplus -} // extern "C" -} // namespace libyuv -#endif - -#endif // INCLUDE_LIBYUV_COMPARE_H_ NOLINT diff --git a/WebRtc.NET/include/third_party/libvpx/source/libvpx/third_party/libyuv/include/libyuv/convert.h b/WebRtc.NET/include/third_party/libvpx/source/libvpx/third_party/libyuv/include/libyuv/convert.h deleted file mode 100644 index fcfcf544..00000000 --- a/WebRtc.NET/include/third_party/libvpx/source/libvpx/third_party/libyuv/include/libyuv/convert.h +++ /dev/null @@ -1,259 +0,0 @@ -/* - * Copyright 2011 The LibYuv Project Authors. All rights reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef INCLUDE_LIBYUV_CONVERT_H_ // NOLINT -#define INCLUDE_LIBYUV_CONVERT_H_ - -#include "libyuv/basic_types.h" - -#include "libyuv/rotate.h" // For enum RotationMode. - -// TODO(fbarchard): fix WebRTC source to include following libyuv headers: -#include "libyuv/convert_argb.h" // For WebRTC I420ToARGB. b/620 -#include "libyuv/convert_from.h" // For WebRTC ConvertFromI420. b/620 -#include "libyuv/planar_functions.h" // For WebRTC I420Rect, CopyPlane. b/618 - -#ifdef __cplusplus -namespace libyuv { -extern "C" { -#endif - -// Convert I444 to I420. -LIBYUV_API -int I444ToI420(const uint8* src_y, int src_stride_y, - const uint8* src_u, int src_stride_u, - const uint8* src_v, int src_stride_v, - uint8* dst_y, int dst_stride_y, - uint8* dst_u, int dst_stride_u, - uint8* dst_v, int dst_stride_v, - int width, int height); - -// Convert I422 to I420. -LIBYUV_API -int I422ToI420(const uint8* src_y, int src_stride_y, - const uint8* src_u, int src_stride_u, - const uint8* src_v, int src_stride_v, - uint8* dst_y, int dst_stride_y, - uint8* dst_u, int dst_stride_u, - uint8* dst_v, int dst_stride_v, - int width, int height); - -// Convert I411 to I420. -LIBYUV_API -int I411ToI420(const uint8* src_y, int src_stride_y, - const uint8* src_u, int src_stride_u, - const uint8* src_v, int src_stride_v, - uint8* dst_y, int dst_stride_y, - uint8* dst_u, int dst_stride_u, - uint8* dst_v, int dst_stride_v, - int width, int height); - -// Copy I420 to I420. -#define I420ToI420 I420Copy -LIBYUV_API -int I420Copy(const uint8* src_y, int src_stride_y, - const uint8* src_u, int src_stride_u, - const uint8* src_v, int src_stride_v, - uint8* dst_y, int dst_stride_y, - uint8* dst_u, int dst_stride_u, - uint8* dst_v, int dst_stride_v, - int width, int height); - -// Convert I400 (grey) to I420. -LIBYUV_API -int I400ToI420(const uint8* src_y, int src_stride_y, - uint8* dst_y, int dst_stride_y, - uint8* dst_u, int dst_stride_u, - uint8* dst_v, int dst_stride_v, - int width, int height); - -#define J400ToJ420 I400ToI420 - -// Convert NV12 to I420. -LIBYUV_API -int NV12ToI420(const uint8* src_y, int src_stride_y, - const uint8* src_uv, int src_stride_uv, - uint8* dst_y, int dst_stride_y, - uint8* dst_u, int dst_stride_u, - uint8* dst_v, int dst_stride_v, - int width, int height); - -// Convert NV21 to I420. -LIBYUV_API -int NV21ToI420(const uint8* src_y, int src_stride_y, - const uint8* src_vu, int src_stride_vu, - uint8* dst_y, int dst_stride_y, - uint8* dst_u, int dst_stride_u, - uint8* dst_v, int dst_stride_v, - int width, int height); - -// Convert YUY2 to I420. -LIBYUV_API -int YUY2ToI420(const uint8* src_yuy2, int src_stride_yuy2, - uint8* dst_y, int dst_stride_y, - uint8* dst_u, int dst_stride_u, - uint8* dst_v, int dst_stride_v, - int width, int height); - -// Convert UYVY to I420. -LIBYUV_API -int UYVYToI420(const uint8* src_uyvy, int src_stride_uyvy, - uint8* dst_y, int dst_stride_y, - uint8* dst_u, int dst_stride_u, - uint8* dst_v, int dst_stride_v, - int width, int height); - -// Convert M420 to I420. -LIBYUV_API -int M420ToI420(const uint8* src_m420, int src_stride_m420, - uint8* dst_y, int dst_stride_y, - uint8* dst_u, int dst_stride_u, - uint8* dst_v, int dst_stride_v, - int width, int height); - -// Convert Android420 to I420. -LIBYUV_API -int Android420ToI420(const uint8* src_y, int src_stride_y, - const uint8* src_u, int src_stride_u, - const uint8* src_v, int src_stride_v, - int pixel_stride_uv, - uint8* dst_y, int dst_stride_y, - uint8* dst_u, int dst_stride_u, - uint8* dst_v, int dst_stride_v, - int width, int height); - -// ARGB little endian (bgra in memory) to I420. -LIBYUV_API -int ARGBToI420(const uint8* src_frame, int src_stride_frame, - uint8* dst_y, int dst_stride_y, - uint8* dst_u, int dst_stride_u, - uint8* dst_v, int dst_stride_v, - int width, int height); - -// BGRA little endian (argb in memory) to I420. -LIBYUV_API -int BGRAToI420(const uint8* src_frame, int src_stride_frame, - uint8* dst_y, int dst_stride_y, - uint8* dst_u, int dst_stride_u, - uint8* dst_v, int dst_stride_v, - int width, int height); - -// ABGR little endian (rgba in memory) to I420. -LIBYUV_API -int ABGRToI420(const uint8* src_frame, int src_stride_frame, - uint8* dst_y, int dst_stride_y, - uint8* dst_u, int dst_stride_u, - uint8* dst_v, int dst_stride_v, - int width, int height); - -// RGBA little endian (abgr in memory) to I420. -LIBYUV_API -int RGBAToI420(const uint8* src_frame, int src_stride_frame, - uint8* dst_y, int dst_stride_y, - uint8* dst_u, int dst_stride_u, - uint8* dst_v, int dst_stride_v, - int width, int height); - -// RGB little endian (bgr in memory) to I420. -LIBYUV_API -int RGB24ToI420(const uint8* src_frame, int src_stride_frame, - uint8* dst_y, int dst_stride_y, - uint8* dst_u, int dst_stride_u, - uint8* dst_v, int dst_stride_v, - int width, int height); - -// RGB big endian (rgb in memory) to I420. -LIBYUV_API -int RAWToI420(const uint8* src_frame, int src_stride_frame, - uint8* dst_y, int dst_stride_y, - uint8* dst_u, int dst_stride_u, - uint8* dst_v, int dst_stride_v, - int width, int height); - -// RGB16 (RGBP fourcc) little endian to I420. -LIBYUV_API -int RGB565ToI420(const uint8* src_frame, int src_stride_frame, - uint8* dst_y, int dst_stride_y, - uint8* dst_u, int dst_stride_u, - uint8* dst_v, int dst_stride_v, - int width, int height); - -// RGB15 (RGBO fourcc) little endian to I420. -LIBYUV_API -int ARGB1555ToI420(const uint8* src_frame, int src_stride_frame, - uint8* dst_y, int dst_stride_y, - uint8* dst_u, int dst_stride_u, - uint8* dst_v, int dst_stride_v, - int width, int height); - -// RGB12 (R444 fourcc) little endian to I420. -LIBYUV_API -int ARGB4444ToI420(const uint8* src_frame, int src_stride_frame, - uint8* dst_y, int dst_stride_y, - uint8* dst_u, int dst_stride_u, - uint8* dst_v, int dst_stride_v, - int width, int height); - -#ifdef HAVE_JPEG -// src_width/height provided by capture. -// dst_width/height for clipping determine final size. -LIBYUV_API -int MJPGToI420(const uint8* sample, size_t sample_size, - uint8* dst_y, int dst_stride_y, - uint8* dst_u, int dst_stride_u, - uint8* dst_v, int dst_stride_v, - int src_width, int src_height, - int dst_width, int dst_height); - -// Query size of MJPG in pixels. -LIBYUV_API -int MJPGSize(const uint8* sample, size_t sample_size, - int* width, int* height); -#endif - -// Convert camera sample to I420 with cropping, rotation and vertical flip. -// "src_size" is needed to parse MJPG. -// "dst_stride_y" number of bytes in a row of the dst_y plane. -// Normally this would be the same as dst_width, with recommended alignment -// to 16 bytes for better efficiency. -// If rotation of 90 or 270 is used, stride is affected. The caller should -// allocate the I420 buffer according to rotation. -// "dst_stride_u" number of bytes in a row of the dst_u plane. -// Normally this would be the same as (dst_width + 1) / 2, with -// recommended alignment to 16 bytes for better efficiency. -// If rotation of 90 or 270 is used, stride is affected. -// "crop_x" and "crop_y" are starting position for cropping. -// To center, crop_x = (src_width - dst_width) / 2 -// crop_y = (src_height - dst_height) / 2 -// "src_width" / "src_height" is size of src_frame in pixels. -// "src_height" can be negative indicating a vertically flipped image source. -// "crop_width" / "crop_height" is the size to crop the src to. -// Must be less than or equal to src_width/src_height -// Cropping parameters are pre-rotation. -// "rotation" can be 0, 90, 180 or 270. -// "format" is a fourcc. ie 'I420', 'YUY2' -// Returns 0 for successful; -1 for invalid parameter. Non-zero for failure. -LIBYUV_API -int ConvertToI420(const uint8* src_frame, size_t src_size, - uint8* dst_y, int dst_stride_y, - uint8* dst_u, int dst_stride_u, - uint8* dst_v, int dst_stride_v, - int crop_x, int crop_y, - int src_width, int src_height, - int crop_width, int crop_height, - enum RotationMode rotation, - uint32 format); - -#ifdef __cplusplus -} // extern "C" -} // namespace libyuv -#endif - -#endif // INCLUDE_LIBYUV_CONVERT_H_ NOLINT diff --git a/WebRtc.NET/include/third_party/libvpx/source/libvpx/third_party/libyuv/include/libyuv/convert_argb.h b/WebRtc.NET/include/third_party/libvpx/source/libvpx/third_party/libyuv/include/libyuv/convert_argb.h deleted file mode 100644 index 19672f32..00000000 --- a/WebRtc.NET/include/third_party/libvpx/source/libvpx/third_party/libyuv/include/libyuv/convert_argb.h +++ /dev/null @@ -1,319 +0,0 @@ -/* - * Copyright 2012 The LibYuv Project Authors. All rights reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef INCLUDE_LIBYUV_CONVERT_ARGB_H_ // NOLINT -#define INCLUDE_LIBYUV_CONVERT_ARGB_H_ - -#include "libyuv/basic_types.h" - -#include "libyuv/rotate.h" // For enum RotationMode. - -// TODO(fbarchard): This set of functions should exactly match convert.h -// TODO(fbarchard): Add tests. Create random content of right size and convert -// with C vs Opt and or to I420 and compare. -// TODO(fbarchard): Some of these functions lack parameter setting. - -#ifdef __cplusplus -namespace libyuv { -extern "C" { -#endif - -// Alias. -#define ARGBToARGB ARGBCopy - -// Copy ARGB to ARGB. -LIBYUV_API -int ARGBCopy(const uint8* src_argb, int src_stride_argb, - uint8* dst_argb, int dst_stride_argb, - int width, int height); - -// Convert I420 to ARGB. -LIBYUV_API -int I420ToARGB(const uint8* src_y, int src_stride_y, - const uint8* src_u, int src_stride_u, - const uint8* src_v, int src_stride_v, - uint8* dst_argb, int dst_stride_argb, - int width, int height); - -// Duplicate prototype for function in convert_from.h for remoting. -LIBYUV_API -int I420ToABGR(const uint8* src_y, int src_stride_y, - const uint8* src_u, int src_stride_u, - const uint8* src_v, int src_stride_v, - uint8* dst_argb, int dst_stride_argb, - int width, int height); - -// Convert I422 to ARGB. -LIBYUV_API -int I422ToARGB(const uint8* src_y, int src_stride_y, - const uint8* src_u, int src_stride_u, - const uint8* src_v, int src_stride_v, - uint8* dst_argb, int dst_stride_argb, - int width, int height); - -// Convert I444 to ARGB. -LIBYUV_API -int I444ToARGB(const uint8* src_y, int src_stride_y, - const uint8* src_u, int src_stride_u, - const uint8* src_v, int src_stride_v, - uint8* dst_argb, int dst_stride_argb, - int width, int height); - -// Convert J444 to ARGB. -LIBYUV_API -int J444ToARGB(const uint8* src_y, int src_stride_y, - const uint8* src_u, int src_stride_u, - const uint8* src_v, int src_stride_v, - uint8* dst_argb, int dst_stride_argb, - int width, int height); - -// Convert I444 to ABGR. -LIBYUV_API -int I444ToABGR(const uint8* src_y, int src_stride_y, - const uint8* src_u, int src_stride_u, - const uint8* src_v, int src_stride_v, - uint8* dst_abgr, int dst_stride_abgr, - int width, int height); - -// Convert I411 to ARGB. -LIBYUV_API -int I411ToARGB(const uint8* src_y, int src_stride_y, - const uint8* src_u, int src_stride_u, - const uint8* src_v, int src_stride_v, - uint8* dst_argb, int dst_stride_argb, - int width, int height); - -// Convert I420 with Alpha to preattenuated ARGB. -LIBYUV_API -int I420AlphaToARGB(const uint8* src_y, int src_stride_y, - const uint8* src_u, int src_stride_u, - const uint8* src_v, int src_stride_v, - const uint8* src_a, int src_stride_a, - uint8* dst_argb, int dst_stride_argb, - int width, int height, int attenuate); - -// Convert I420 with Alpha to preattenuated ABGR. -LIBYUV_API -int I420AlphaToABGR(const uint8* src_y, int src_stride_y, - const uint8* src_u, int src_stride_u, - const uint8* src_v, int src_stride_v, - const uint8* src_a, int src_stride_a, - uint8* dst_abgr, int dst_stride_abgr, - int width, int height, int attenuate); - -// Convert I400 (grey) to ARGB. Reverse of ARGBToI400. -LIBYUV_API -int I400ToARGB(const uint8* src_y, int src_stride_y, - uint8* dst_argb, int dst_stride_argb, - int width, int height); - -// Convert J400 (jpeg grey) to ARGB. -LIBYUV_API -int J400ToARGB(const uint8* src_y, int src_stride_y, - uint8* dst_argb, int dst_stride_argb, - int width, int height); - -// Alias. -#define YToARGB I400ToARGB - -// Convert NV12 to ARGB. -LIBYUV_API -int NV12ToARGB(const uint8* src_y, int src_stride_y, - const uint8* src_uv, int src_stride_uv, - uint8* dst_argb, int dst_stride_argb, - int width, int height); - -// Convert NV21 to ARGB. -LIBYUV_API -int NV21ToARGB(const uint8* src_y, int src_stride_y, - const uint8* src_vu, int src_stride_vu, - uint8* dst_argb, int dst_stride_argb, - int width, int height); - -// Convert M420 to ARGB. -LIBYUV_API -int M420ToARGB(const uint8* src_m420, int src_stride_m420, - uint8* dst_argb, int dst_stride_argb, - int width, int height); - -// Convert YUY2 to ARGB. -LIBYUV_API -int YUY2ToARGB(const uint8* src_yuy2, int src_stride_yuy2, - uint8* dst_argb, int dst_stride_argb, - int width, int height); - -// Convert UYVY to ARGB. -LIBYUV_API -int UYVYToARGB(const uint8* src_uyvy, int src_stride_uyvy, - uint8* dst_argb, int dst_stride_argb, - int width, int height); - -// Convert J420 to ARGB. -LIBYUV_API -int J420ToARGB(const uint8* src_y, int src_stride_y, - const uint8* src_u, int src_stride_u, - const uint8* src_v, int src_stride_v, - uint8* dst_argb, int dst_stride_argb, - int width, int height); - -// Convert J422 to ARGB. -LIBYUV_API -int J422ToARGB(const uint8* src_y, int src_stride_y, - const uint8* src_u, int src_stride_u, - const uint8* src_v, int src_stride_v, - uint8* dst_argb, int dst_stride_argb, - int width, int height); - -// Convert J420 to ABGR. -LIBYUV_API -int J420ToABGR(const uint8* src_y, int src_stride_y, - const uint8* src_u, int src_stride_u, - const uint8* src_v, int src_stride_v, - uint8* dst_abgr, int dst_stride_abgr, - int width, int height); - -// Convert J422 to ABGR. -LIBYUV_API -int J422ToABGR(const uint8* src_y, int src_stride_y, - const uint8* src_u, int src_stride_u, - const uint8* src_v, int src_stride_v, - uint8* dst_abgr, int dst_stride_abgr, - int width, int height); - -// Convert H420 to ARGB. -LIBYUV_API -int H420ToARGB(const uint8* src_y, int src_stride_y, - const uint8* src_u, int src_stride_u, - const uint8* src_v, int src_stride_v, - uint8* dst_argb, int dst_stride_argb, - int width, int height); - -// Convert H422 to ARGB. -LIBYUV_API -int H422ToARGB(const uint8* src_y, int src_stride_y, - const uint8* src_u, int src_stride_u, - const uint8* src_v, int src_stride_v, - uint8* dst_argb, int dst_stride_argb, - int width, int height); - -// Convert H420 to ABGR. -LIBYUV_API -int H420ToABGR(const uint8* src_y, int src_stride_y, - const uint8* src_u, int src_stride_u, - const uint8* src_v, int src_stride_v, - uint8* dst_abgr, int dst_stride_abgr, - int width, int height); - -// Convert H422 to ABGR. -LIBYUV_API -int H422ToABGR(const uint8* src_y, int src_stride_y, - const uint8* src_u, int src_stride_u, - const uint8* src_v, int src_stride_v, - uint8* dst_abgr, int dst_stride_abgr, - int width, int height); - -// BGRA little endian (argb in memory) to ARGB. -LIBYUV_API -int BGRAToARGB(const uint8* src_frame, int src_stride_frame, - uint8* dst_argb, int dst_stride_argb, - int width, int height); - -// ABGR little endian (rgba in memory) to ARGB. -LIBYUV_API -int ABGRToARGB(const uint8* src_frame, int src_stride_frame, - uint8* dst_argb, int dst_stride_argb, - int width, int height); - -// RGBA little endian (abgr in memory) to ARGB. -LIBYUV_API -int RGBAToARGB(const uint8* src_frame, int src_stride_frame, - uint8* dst_argb, int dst_stride_argb, - int width, int height); - -// Deprecated function name. -#define BG24ToARGB RGB24ToARGB - -// RGB little endian (bgr in memory) to ARGB. -LIBYUV_API -int RGB24ToARGB(const uint8* src_frame, int src_stride_frame, - uint8* dst_argb, int dst_stride_argb, - int width, int height); - -// RGB big endian (rgb in memory) to ARGB. -LIBYUV_API -int RAWToARGB(const uint8* src_frame, int src_stride_frame, - uint8* dst_argb, int dst_stride_argb, - int width, int height); - -// RGB16 (RGBP fourcc) little endian to ARGB. -LIBYUV_API -int RGB565ToARGB(const uint8* src_frame, int src_stride_frame, - uint8* dst_argb, int dst_stride_argb, - int width, int height); - -// RGB15 (RGBO fourcc) little endian to ARGB. -LIBYUV_API -int ARGB1555ToARGB(const uint8* src_frame, int src_stride_frame, - uint8* dst_argb, int dst_stride_argb, - int width, int height); - -// RGB12 (R444 fourcc) little endian to ARGB. -LIBYUV_API -int ARGB4444ToARGB(const uint8* src_frame, int src_stride_frame, - uint8* dst_argb, int dst_stride_argb, - int width, int height); - -#ifdef HAVE_JPEG -// src_width/height provided by capture -// dst_width/height for clipping determine final size. -LIBYUV_API -int MJPGToARGB(const uint8* sample, size_t sample_size, - uint8* dst_argb, int dst_stride_argb, - int src_width, int src_height, - int dst_width, int dst_height); -#endif - -// Convert camera sample to ARGB with cropping, rotation and vertical flip. -// "src_size" is needed to parse MJPG. -// "dst_stride_argb" number of bytes in a row of the dst_argb plane. -// Normally this would be the same as dst_width, with recommended alignment -// to 16 bytes for better efficiency. -// If rotation of 90 or 270 is used, stride is affected. The caller should -// allocate the I420 buffer according to rotation. -// "dst_stride_u" number of bytes in a row of the dst_u plane. -// Normally this would be the same as (dst_width + 1) / 2, with -// recommended alignment to 16 bytes for better efficiency. -// If rotation of 90 or 270 is used, stride is affected. -// "crop_x" and "crop_y" are starting position for cropping. -// To center, crop_x = (src_width - dst_width) / 2 -// crop_y = (src_height - dst_height) / 2 -// "src_width" / "src_height" is size of src_frame in pixels. -// "src_height" can be negative indicating a vertically flipped image source. -// "crop_width" / "crop_height" is the size to crop the src to. -// Must be less than or equal to src_width/src_height -// Cropping parameters are pre-rotation. -// "rotation" can be 0, 90, 180 or 270. -// "format" is a fourcc. ie 'I420', 'YUY2' -// Returns 0 for successful; -1 for invalid parameter. Non-zero for failure. -LIBYUV_API -int ConvertToARGB(const uint8* src_frame, size_t src_size, - uint8* dst_argb, int dst_stride_argb, - int crop_x, int crop_y, - int src_width, int src_height, - int crop_width, int crop_height, - enum RotationMode rotation, - uint32 format); - -#ifdef __cplusplus -} // extern "C" -} // namespace libyuv -#endif - -#endif // INCLUDE_LIBYUV_CONVERT_ARGB_H_ NOLINT diff --git a/WebRtc.NET/include/third_party/libvpx/source/libvpx/third_party/libyuv/include/libyuv/convert_from.h b/WebRtc.NET/include/third_party/libvpx/source/libvpx/third_party/libyuv/include/libyuv/convert_from.h deleted file mode 100644 index 39e1578a..00000000 --- a/WebRtc.NET/include/third_party/libvpx/source/libvpx/third_party/libyuv/include/libyuv/convert_from.h +++ /dev/null @@ -1,179 +0,0 @@ -/* - * Copyright 2011 The LibYuv Project Authors. All rights reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef INCLUDE_LIBYUV_CONVERT_FROM_H_ // NOLINT -#define INCLUDE_LIBYUV_CONVERT_FROM_H_ - -#include "libyuv/basic_types.h" -#include "libyuv/rotate.h" - -#ifdef __cplusplus -namespace libyuv { -extern "C" { -#endif - -// See Also convert.h for conversions from formats to I420. - -// I420Copy in convert to I420ToI420. - -LIBYUV_API -int I420ToI422(const uint8* src_y, int src_stride_y, - const uint8* src_u, int src_stride_u, - const uint8* src_v, int src_stride_v, - uint8* dst_y, int dst_stride_y, - uint8* dst_u, int dst_stride_u, - uint8* dst_v, int dst_stride_v, - int width, int height); - -LIBYUV_API -int I420ToI444(const uint8* src_y, int src_stride_y, - const uint8* src_u, int src_stride_u, - const uint8* src_v, int src_stride_v, - uint8* dst_y, int dst_stride_y, - uint8* dst_u, int dst_stride_u, - uint8* dst_v, int dst_stride_v, - int width, int height); - -LIBYUV_API -int I420ToI411(const uint8* src_y, int src_stride_y, - const uint8* src_u, int src_stride_u, - const uint8* src_v, int src_stride_v, - uint8* dst_y, int dst_stride_y, - uint8* dst_u, int dst_stride_u, - uint8* dst_v, int dst_stride_v, - int width, int height); - -// Copy to I400. Source can be I420, I422, I444, I400, NV12 or NV21. -LIBYUV_API -int I400Copy(const uint8* src_y, int src_stride_y, - uint8* dst_y, int dst_stride_y, - int width, int height); - -LIBYUV_API -int I420ToNV12(const uint8* src_y, int src_stride_y, - const uint8* src_u, int src_stride_u, - const uint8* src_v, int src_stride_v, - uint8* dst_y, int dst_stride_y, - uint8* dst_uv, int dst_stride_uv, - int width, int height); - -LIBYUV_API -int I420ToNV21(const uint8* src_y, int src_stride_y, - const uint8* src_u, int src_stride_u, - const uint8* src_v, int src_stride_v, - uint8* dst_y, int dst_stride_y, - uint8* dst_vu, int dst_stride_vu, - int width, int height); - -LIBYUV_API -int I420ToYUY2(const uint8* src_y, int src_stride_y, - const uint8* src_u, int src_stride_u, - const uint8* src_v, int src_stride_v, - uint8* dst_frame, int dst_stride_frame, - int width, int height); - -LIBYUV_API -int I420ToUYVY(const uint8* src_y, int src_stride_y, - const uint8* src_u, int src_stride_u, - const uint8* src_v, int src_stride_v, - uint8* dst_frame, int dst_stride_frame, - int width, int height); - -LIBYUV_API -int I420ToARGB(const uint8* src_y, int src_stride_y, - const uint8* src_u, int src_stride_u, - const uint8* src_v, int src_stride_v, - uint8* dst_argb, int dst_stride_argb, - int width, int height); - -LIBYUV_API -int I420ToBGRA(const uint8* src_y, int src_stride_y, - const uint8* src_u, int src_stride_u, - const uint8* src_v, int src_stride_v, - uint8* dst_argb, int dst_stride_argb, - int width, int height); - -LIBYUV_API -int I420ToABGR(const uint8* src_y, int src_stride_y, - const uint8* src_u, int src_stride_u, - const uint8* src_v, int src_stride_v, - uint8* dst_argb, int dst_stride_argb, - int width, int height); - -LIBYUV_API -int I420ToRGBA(const uint8* src_y, int src_stride_y, - const uint8* src_u, int src_stride_u, - const uint8* src_v, int src_stride_v, - uint8* dst_rgba, int dst_stride_rgba, - int width, int height); - -LIBYUV_API -int I420ToRGB24(const uint8* src_y, int src_stride_y, - const uint8* src_u, int src_stride_u, - const uint8* src_v, int src_stride_v, - uint8* dst_frame, int dst_stride_frame, - int width, int height); - -LIBYUV_API -int I420ToRAW(const uint8* src_y, int src_stride_y, - const uint8* src_u, int src_stride_u, - const uint8* src_v, int src_stride_v, - uint8* dst_frame, int dst_stride_frame, - int width, int height); - -LIBYUV_API -int I420ToRGB565(const uint8* src_y, int src_stride_y, - const uint8* src_u, int src_stride_u, - const uint8* src_v, int src_stride_v, - uint8* dst_frame, int dst_stride_frame, - int width, int height); - -// Convert I420 To RGB565 with 4x4 dither matrix (16 bytes). -// Values in dither matrix from 0 to 7 recommended. -// The order of the dither matrix is first byte is upper left. - -LIBYUV_API -int I420ToRGB565Dither(const uint8* src_y, int src_stride_y, - const uint8* src_u, int src_stride_u, - const uint8* src_v, int src_stride_v, - uint8* dst_frame, int dst_stride_frame, - const uint8* dither4x4, int width, int height); - -LIBYUV_API -int I420ToARGB1555(const uint8* src_y, int src_stride_y, - const uint8* src_u, int src_stride_u, - const uint8* src_v, int src_stride_v, - uint8* dst_frame, int dst_stride_frame, - int width, int height); - -LIBYUV_API -int I420ToARGB4444(const uint8* src_y, int src_stride_y, - const uint8* src_u, int src_stride_u, - const uint8* src_v, int src_stride_v, - uint8* dst_frame, int dst_stride_frame, - int width, int height); - -// Convert I420 to specified format. -// "dst_sample_stride" is bytes in a row for the destination. Pass 0 if the -// buffer has contiguous rows. Can be negative. A multiple of 16 is optimal. -LIBYUV_API -int ConvertFromI420(const uint8* y, int y_stride, - const uint8* u, int u_stride, - const uint8* v, int v_stride, - uint8* dst_sample, int dst_sample_stride, - int width, int height, - uint32 format); - -#ifdef __cplusplus -} // extern "C" -} // namespace libyuv -#endif - -#endif // INCLUDE_LIBYUV_CONVERT_FROM_H_ NOLINT diff --git a/WebRtc.NET/include/third_party/libvpx/source/libvpx/third_party/libyuv/include/libyuv/convert_from_argb.h b/WebRtc.NET/include/third_party/libvpx/source/libvpx/third_party/libyuv/include/libyuv/convert_from_argb.h deleted file mode 100644 index 1df53200..00000000 --- a/WebRtc.NET/include/third_party/libvpx/source/libvpx/third_party/libyuv/include/libyuv/convert_from_argb.h +++ /dev/null @@ -1,190 +0,0 @@ -/* - * Copyright 2012 The LibYuv Project Authors. All rights reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef INCLUDE_LIBYUV_CONVERT_FROM_ARGB_H_ // NOLINT -#define INCLUDE_LIBYUV_CONVERT_FROM_ARGB_H_ - -#include "libyuv/basic_types.h" - -#ifdef __cplusplus -namespace libyuv { -extern "C" { -#endif - -// Copy ARGB to ARGB. -#define ARGBToARGB ARGBCopy -LIBYUV_API -int ARGBCopy(const uint8* src_argb, int src_stride_argb, - uint8* dst_argb, int dst_stride_argb, - int width, int height); - -// Convert ARGB To BGRA. -LIBYUV_API -int ARGBToBGRA(const uint8* src_argb, int src_stride_argb, - uint8* dst_bgra, int dst_stride_bgra, - int width, int height); - -// Convert ARGB To ABGR. -LIBYUV_API -int ARGBToABGR(const uint8* src_argb, int src_stride_argb, - uint8* dst_abgr, int dst_stride_abgr, - int width, int height); - -// Convert ARGB To RGBA. -LIBYUV_API -int ARGBToRGBA(const uint8* src_argb, int src_stride_argb, - uint8* dst_rgba, int dst_stride_rgba, - int width, int height); - -// Convert ARGB To RGB24. -LIBYUV_API -int ARGBToRGB24(const uint8* src_argb, int src_stride_argb, - uint8* dst_rgb24, int dst_stride_rgb24, - int width, int height); - -// Convert ARGB To RAW. -LIBYUV_API -int ARGBToRAW(const uint8* src_argb, int src_stride_argb, - uint8* dst_rgb, int dst_stride_rgb, - int width, int height); - -// Convert ARGB To RGB565. -LIBYUV_API -int ARGBToRGB565(const uint8* src_argb, int src_stride_argb, - uint8* dst_rgb565, int dst_stride_rgb565, - int width, int height); - -// Convert ARGB To RGB565 with 4x4 dither matrix (16 bytes). -// Values in dither matrix from 0 to 7 recommended. -// The order of the dither matrix is first byte is upper left. -// TODO(fbarchard): Consider pointer to 2d array for dither4x4. -// const uint8(*dither)[4][4]; -LIBYUV_API -int ARGBToRGB565Dither(const uint8* src_argb, int src_stride_argb, - uint8* dst_rgb565, int dst_stride_rgb565, - const uint8* dither4x4, int width, int height); - -// Convert ARGB To ARGB1555. -LIBYUV_API -int ARGBToARGB1555(const uint8* src_argb, int src_stride_argb, - uint8* dst_argb1555, int dst_stride_argb1555, - int width, int height); - -// Convert ARGB To ARGB4444. -LIBYUV_API -int ARGBToARGB4444(const uint8* src_argb, int src_stride_argb, - uint8* dst_argb4444, int dst_stride_argb4444, - int width, int height); - -// Convert ARGB To I444. -LIBYUV_API -int ARGBToI444(const uint8* src_argb, int src_stride_argb, - uint8* dst_y, int dst_stride_y, - uint8* dst_u, int dst_stride_u, - uint8* dst_v, int dst_stride_v, - int width, int height); - -// Convert ARGB To I422. -LIBYUV_API -int ARGBToI422(const uint8* src_argb, int src_stride_argb, - uint8* dst_y, int dst_stride_y, - uint8* dst_u, int dst_stride_u, - uint8* dst_v, int dst_stride_v, - int width, int height); - -// Convert ARGB To I420. (also in convert.h) -LIBYUV_API -int ARGBToI420(const uint8* src_argb, int src_stride_argb, - uint8* dst_y, int dst_stride_y, - uint8* dst_u, int dst_stride_u, - uint8* dst_v, int dst_stride_v, - int width, int height); - -// Convert ARGB to J420. (JPeg full range I420). -LIBYUV_API -int ARGBToJ420(const uint8* src_argb, int src_stride_argb, - uint8* dst_yj, int dst_stride_yj, - uint8* dst_u, int dst_stride_u, - uint8* dst_v, int dst_stride_v, - int width, int height); - -// Convert ARGB to J422. -LIBYUV_API -int ARGBToJ422(const uint8* src_argb, int src_stride_argb, - uint8* dst_yj, int dst_stride_yj, - uint8* dst_u, int dst_stride_u, - uint8* dst_v, int dst_stride_v, - int width, int height); - -// Convert ARGB To I411. -LIBYUV_API -int ARGBToI411(const uint8* src_argb, int src_stride_argb, - uint8* dst_y, int dst_stride_y, - uint8* dst_u, int dst_stride_u, - uint8* dst_v, int dst_stride_v, - int width, int height); - -// Convert ARGB to J400. (JPeg full range). -LIBYUV_API -int ARGBToJ400(const uint8* src_argb, int src_stride_argb, - uint8* dst_yj, int dst_stride_yj, - int width, int height); - -// Convert ARGB to I400. -LIBYUV_API -int ARGBToI400(const uint8* src_argb, int src_stride_argb, - uint8* dst_y, int dst_stride_y, - int width, int height); - -// Convert ARGB to G. (Reverse of J400toARGB, which replicates G back to ARGB) -LIBYUV_API -int ARGBToG(const uint8* src_argb, int src_stride_argb, - uint8* dst_g, int dst_stride_g, - int width, int height); - -// Convert ARGB To NV12. -LIBYUV_API -int ARGBToNV12(const uint8* src_argb, int src_stride_argb, - uint8* dst_y, int dst_stride_y, - uint8* dst_uv, int dst_stride_uv, - int width, int height); - -// Convert ARGB To NV21. -LIBYUV_API -int ARGBToNV21(const uint8* src_argb, int src_stride_argb, - uint8* dst_y, int dst_stride_y, - uint8* dst_vu, int dst_stride_vu, - int width, int height); - -// Convert ARGB To NV21. -LIBYUV_API -int ARGBToNV21(const uint8* src_argb, int src_stride_argb, - uint8* dst_y, int dst_stride_y, - uint8* dst_vu, int dst_stride_vu, - int width, int height); - -// Convert ARGB To YUY2. -LIBYUV_API -int ARGBToYUY2(const uint8* src_argb, int src_stride_argb, - uint8* dst_yuy2, int dst_stride_yuy2, - int width, int height); - -// Convert ARGB To UYVY. -LIBYUV_API -int ARGBToUYVY(const uint8* src_argb, int src_stride_argb, - uint8* dst_uyvy, int dst_stride_uyvy, - int width, int height); - -#ifdef __cplusplus -} // extern "C" -} // namespace libyuv -#endif - -#endif // INCLUDE_LIBYUV_CONVERT_FROM_ARGB_H_ NOLINT diff --git a/WebRtc.NET/include/third_party/libvpx/source/libvpx/third_party/libyuv/include/libyuv/cpu_id.h b/WebRtc.NET/include/third_party/libvpx/source/libvpx/third_party/libyuv/include/libyuv/cpu_id.h deleted file mode 100644 index dfb7445e..00000000 --- a/WebRtc.NET/include/third_party/libvpx/source/libvpx/third_party/libyuv/include/libyuv/cpu_id.h +++ /dev/null @@ -1,80 +0,0 @@ -/* - * Copyright 2011 The LibYuv Project Authors. All rights reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef INCLUDE_LIBYUV_CPU_ID_H_ // NOLINT -#define INCLUDE_LIBYUV_CPU_ID_H_ - -#include "libyuv/basic_types.h" - -#ifdef __cplusplus -namespace libyuv { -extern "C" { -#endif - -// Internal flag to indicate cpuid requires initialization. -static const int kCpuInitialized = 0x1; - -// These flags are only valid on ARM processors. -static const int kCpuHasARM = 0x2; -static const int kCpuHasNEON = 0x4; -// 0x8 reserved for future ARM flag. - -// These flags are only valid on x86 processors. -static const int kCpuHasX86 = 0x10; -static const int kCpuHasSSE2 = 0x20; -static const int kCpuHasSSSE3 = 0x40; -static const int kCpuHasSSE41 = 0x80; -static const int kCpuHasSSE42 = 0x100; -static const int kCpuHasAVX = 0x200; -static const int kCpuHasAVX2 = 0x400; -static const int kCpuHasERMS = 0x800; -static const int kCpuHasFMA3 = 0x1000; -static const int kCpuHasAVX3 = 0x2000; -// 0x2000, 0x4000, 0x8000 reserved for future X86 flags. - -// These flags are only valid on MIPS processors. -static const int kCpuHasMIPS = 0x10000; -static const int kCpuHasDSPR2 = 0x20000; - -// Internal function used to auto-init. -LIBYUV_API -int InitCpuFlags(void); - -// Internal function for parsing /proc/cpuinfo. -LIBYUV_API -int ArmCpuCaps(const char* cpuinfo_name); - -// Detect CPU has SSE2 etc. -// Test_flag parameter should be one of kCpuHas constants above. -// returns non-zero if instruction set is detected -static __inline int TestCpuFlag(int test_flag) { - LIBYUV_API extern int cpu_info_; - return (!cpu_info_ ? InitCpuFlags() : cpu_info_) & test_flag; -} - -// For testing, allow CPU flags to be disabled. -// ie MaskCpuFlags(~kCpuHasSSSE3) to disable SSSE3. -// MaskCpuFlags(-1) to enable all cpu specific optimizations. -// MaskCpuFlags(1) to disable all cpu specific optimizations. -LIBYUV_API -void MaskCpuFlags(int enable_flags); - -// Low level cpuid for X86. Returns zeros on other CPUs. -// eax is the info type that you want. -// ecx is typically the cpu number, and should normally be zero. -LIBYUV_API -void CpuId(uint32 eax, uint32 ecx, uint32* cpu_info); - -#ifdef __cplusplus -} // extern "C" -} // namespace libyuv -#endif - -#endif // INCLUDE_LIBYUV_CPU_ID_H_ NOLINT diff --git a/WebRtc.NET/include/third_party/libvpx/source/libvpx/third_party/libyuv/include/libyuv/mjpeg_decoder.h b/WebRtc.NET/include/third_party/libvpx/source/libvpx/third_party/libyuv/include/libyuv/mjpeg_decoder.h deleted file mode 100644 index 8423121d..00000000 --- a/WebRtc.NET/include/third_party/libvpx/source/libvpx/third_party/libyuv/include/libyuv/mjpeg_decoder.h +++ /dev/null @@ -1,192 +0,0 @@ -/* - * Copyright 2012 The LibYuv Project Authors. All rights reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef INCLUDE_LIBYUV_MJPEG_DECODER_H_ // NOLINT -#define INCLUDE_LIBYUV_MJPEG_DECODER_H_ - -#include "libyuv/basic_types.h" - -#ifdef __cplusplus -// NOTE: For a simplified public API use convert.h MJPGToI420(). - -struct jpeg_common_struct; -struct jpeg_decompress_struct; -struct jpeg_source_mgr; - -namespace libyuv { - -#ifdef __cplusplus -extern "C" { -#endif - -LIBYUV_BOOL ValidateJpeg(const uint8* sample, size_t sample_size); - -#ifdef __cplusplus -} // extern "C" -#endif - -static const uint32 kUnknownDataSize = 0xFFFFFFFF; - -enum JpegSubsamplingType { - kJpegYuv420, - kJpegYuv422, - kJpegYuv411, - kJpegYuv444, - kJpegYuv400, - kJpegUnknown -}; - -struct Buffer { - const uint8* data; - int len; -}; - -struct BufferVector { - Buffer* buffers; - int len; - int pos; -}; - -struct SetJmpErrorMgr; - -// MJPEG ("Motion JPEG") is a pseudo-standard video codec where the frames are -// simply independent JPEG images with a fixed huffman table (which is omitted). -// It is rarely used in video transmission, but is common as a camera capture -// format, especially in Logitech devices. This class implements a decoder for -// MJPEG frames. -// -// See http://tools.ietf.org/html/rfc2435 -class LIBYUV_API MJpegDecoder { - public: - typedef void (*CallbackFunction)(void* opaque, - const uint8* const* data, - const int* strides, - int rows); - - static const int kColorSpaceUnknown; - static const int kColorSpaceGrayscale; - static const int kColorSpaceRgb; - static const int kColorSpaceYCbCr; - static const int kColorSpaceCMYK; - static const int kColorSpaceYCCK; - - MJpegDecoder(); - ~MJpegDecoder(); - - // Loads a new frame, reads its headers, and determines the uncompressed - // image format. - // Returns LIBYUV_TRUE if image looks valid and format is supported. - // If return value is LIBYUV_TRUE, then the values for all the following - // getters are populated. - // src_len is the size of the compressed mjpeg frame in bytes. - LIBYUV_BOOL LoadFrame(const uint8* src, size_t src_len); - - // Returns width of the last loaded frame in pixels. - int GetWidth(); - - // Returns height of the last loaded frame in pixels. - int GetHeight(); - - // Returns format of the last loaded frame. The return value is one of the - // kColorSpace* constants. - int GetColorSpace(); - - // Number of color components in the color space. - int GetNumComponents(); - - // Sample factors of the n-th component. - int GetHorizSampFactor(int component); - - int GetVertSampFactor(int component); - - int GetHorizSubSampFactor(int component); - - int GetVertSubSampFactor(int component); - - // Public for testability. - int GetImageScanlinesPerImcuRow(); - - // Public for testability. - int GetComponentScanlinesPerImcuRow(int component); - - // Width of a component in bytes. - int GetComponentWidth(int component); - - // Height of a component. - int GetComponentHeight(int component); - - // Width of a component in bytes with padding for DCTSIZE. Public for testing. - int GetComponentStride(int component); - - // Size of a component in bytes. - int GetComponentSize(int component); - - // Call this after LoadFrame() if you decide you don't want to decode it - // after all. - LIBYUV_BOOL UnloadFrame(); - - // Decodes the entire image into a one-buffer-per-color-component format. - // dst_width must match exactly. dst_height must be <= to image height; if - // less, the image is cropped. "planes" must have size equal to at least - // GetNumComponents() and they must point to non-overlapping buffers of size - // at least GetComponentSize(i). The pointers in planes are incremented - // to point to after the end of the written data. - // TODO(fbarchard): Add dst_x, dst_y to allow specific rect to be decoded. - LIBYUV_BOOL DecodeToBuffers(uint8** planes, int dst_width, int dst_height); - - // Decodes the entire image and passes the data via repeated calls to a - // callback function. Each call will get the data for a whole number of - // image scanlines. - // TODO(fbarchard): Add dst_x, dst_y to allow specific rect to be decoded. - LIBYUV_BOOL DecodeToCallback(CallbackFunction fn, void* opaque, - int dst_width, int dst_height); - - // The helper function which recognizes the jpeg sub-sampling type. - static JpegSubsamplingType JpegSubsamplingTypeHelper( - int* subsample_x, int* subsample_y, int number_of_components); - - private: - void AllocOutputBuffers(int num_outbufs); - void DestroyOutputBuffers(); - - LIBYUV_BOOL StartDecode(); - LIBYUV_BOOL FinishDecode(); - - void SetScanlinePointers(uint8** data); - LIBYUV_BOOL DecodeImcuRow(); - - int GetComponentScanlinePadding(int component); - - // A buffer holding the input data for a frame. - Buffer buf_; - BufferVector buf_vec_; - - jpeg_decompress_struct* decompress_struct_; - jpeg_source_mgr* source_mgr_; - SetJmpErrorMgr* error_mgr_; - - // LIBYUV_TRUE iff at least one component has scanline padding. (i.e., - // GetComponentScanlinePadding() != 0.) - LIBYUV_BOOL has_scanline_padding_; - - // Temporaries used to point to scanline outputs. - int num_outbufs_; // Outermost size of all arrays below. - uint8*** scanlines_; - int* scanlines_sizes_; - // Temporary buffer used for decoding when we can't decode directly to the - // output buffers. Large enough for just one iMCU row. - uint8** databuf_; - int* databuf_strides_; -}; - -} // namespace libyuv - -#endif // __cplusplus -#endif // INCLUDE_LIBYUV_MJPEG_DECODER_H_ NOLINT diff --git a/WebRtc.NET/include/third_party/libvpx/source/libvpx/third_party/libyuv/include/libyuv/planar_functions.h b/WebRtc.NET/include/third_party/libvpx/source/libvpx/third_party/libyuv/include/libyuv/planar_functions.h deleted file mode 100644 index 9662516c..00000000 --- a/WebRtc.NET/include/third_party/libvpx/source/libvpx/third_party/libyuv/include/libyuv/planar_functions.h +++ /dev/null @@ -1,521 +0,0 @@ -/* - * Copyright 2011 The LibYuv Project Authors. All rights reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef INCLUDE_LIBYUV_PLANAR_FUNCTIONS_H_ // NOLINT -#define INCLUDE_LIBYUV_PLANAR_FUNCTIONS_H_ - -#include "libyuv/basic_types.h" - -// TODO(fbarchard): Remove the following headers includes. -#include "libyuv/convert.h" -#include "libyuv/convert_argb.h" - -#ifdef __cplusplus -namespace libyuv { -extern "C" { -#endif - -// Copy a plane of data. -LIBYUV_API -void CopyPlane(const uint8* src_y, int src_stride_y, - uint8* dst_y, int dst_stride_y, - int width, int height); - -LIBYUV_API -void CopyPlane_16(const uint16* src_y, int src_stride_y, - uint16* dst_y, int dst_stride_y, - int width, int height); - -// Set a plane of data to a 32 bit value. -LIBYUV_API -void SetPlane(uint8* dst_y, int dst_stride_y, - int width, int height, - uint32 value); - -// Split interleaved UV plane into separate U and V planes. -LIBYUV_API -void SplitUVPlane(const uint8* src_uv, int src_stride_uv, - uint8* dst_u, int dst_stride_u, - uint8* dst_v, int dst_stride_v, - int width, int height); - -// Merge separate U and V planes into one interleaved UV plane. -LIBYUV_API -void MergeUVPlane(const uint8* src_u, int src_stride_u, - const uint8* src_v, int src_stride_v, - uint8* dst_uv, int dst_stride_uv, - int width, int height); - -// Copy I400. Supports inverting. -LIBYUV_API -int I400ToI400(const uint8* src_y, int src_stride_y, - uint8* dst_y, int dst_stride_y, - int width, int height); - -#define J400ToJ400 I400ToI400 - -// Copy I422 to I422. -#define I422ToI422 I422Copy -LIBYUV_API -int I422Copy(const uint8* src_y, int src_stride_y, - const uint8* src_u, int src_stride_u, - const uint8* src_v, int src_stride_v, - uint8* dst_y, int dst_stride_y, - uint8* dst_u, int dst_stride_u, - uint8* dst_v, int dst_stride_v, - int width, int height); - -// Copy I444 to I444. -#define I444ToI444 I444Copy -LIBYUV_API -int I444Copy(const uint8* src_y, int src_stride_y, - const uint8* src_u, int src_stride_u, - const uint8* src_v, int src_stride_v, - uint8* dst_y, int dst_stride_y, - uint8* dst_u, int dst_stride_u, - uint8* dst_v, int dst_stride_v, - int width, int height); - -// Convert YUY2 to I422. -LIBYUV_API -int YUY2ToI422(const uint8* src_yuy2, int src_stride_yuy2, - uint8* dst_y, int dst_stride_y, - uint8* dst_u, int dst_stride_u, - uint8* dst_v, int dst_stride_v, - int width, int height); - -// Convert UYVY to I422. -LIBYUV_API -int UYVYToI422(const uint8* src_uyvy, int src_stride_uyvy, - uint8* dst_y, int dst_stride_y, - uint8* dst_u, int dst_stride_u, - uint8* dst_v, int dst_stride_v, - int width, int height); - -LIBYUV_API -int YUY2ToNV12(const uint8* src_yuy2, int src_stride_yuy2, - uint8* dst_y, int dst_stride_y, - uint8* dst_uv, int dst_stride_uv, - int width, int height); - -LIBYUV_API -int UYVYToNV12(const uint8* src_uyvy, int src_stride_uyvy, - uint8* dst_y, int dst_stride_y, - uint8* dst_uv, int dst_stride_uv, - int width, int height); - -// Convert I420 to I400. (calls CopyPlane ignoring u/v). -LIBYUV_API -int I420ToI400(const uint8* src_y, int src_stride_y, - const uint8* src_u, int src_stride_u, - const uint8* src_v, int src_stride_v, - uint8* dst_y, int dst_stride_y, - int width, int height); - -// Alias -#define J420ToJ400 I420ToI400 -#define I420ToI420Mirror I420Mirror - -// I420 mirror. -LIBYUV_API -int I420Mirror(const uint8* src_y, int src_stride_y, - const uint8* src_u, int src_stride_u, - const uint8* src_v, int src_stride_v, - uint8* dst_y, int dst_stride_y, - uint8* dst_u, int dst_stride_u, - uint8* dst_v, int dst_stride_v, - int width, int height); - -// Alias -#define I400ToI400Mirror I400Mirror - -// I400 mirror. A single plane is mirrored horizontally. -// Pass negative height to achieve 180 degree rotation. -LIBYUV_API -int I400Mirror(const uint8* src_y, int src_stride_y, - uint8* dst_y, int dst_stride_y, - int width, int height); - -// Alias -#define ARGBToARGBMirror ARGBMirror - -// ARGB mirror. -LIBYUV_API -int ARGBMirror(const uint8* src_argb, int src_stride_argb, - uint8* dst_argb, int dst_stride_argb, - int width, int height); - -// Convert NV12 to RGB565. -LIBYUV_API -int NV12ToRGB565(const uint8* src_y, int src_stride_y, - const uint8* src_uv, int src_stride_uv, - uint8* dst_rgb565, int dst_stride_rgb565, - int width, int height); - -// I422ToARGB is in convert_argb.h -// Convert I422 to BGRA. -LIBYUV_API -int I422ToBGRA(const uint8* src_y, int src_stride_y, - const uint8* src_u, int src_stride_u, - const uint8* src_v, int src_stride_v, - uint8* dst_bgra, int dst_stride_bgra, - int width, int height); - -// Convert I422 to ABGR. -LIBYUV_API -int I422ToABGR(const uint8* src_y, int src_stride_y, - const uint8* src_u, int src_stride_u, - const uint8* src_v, int src_stride_v, - uint8* dst_abgr, int dst_stride_abgr, - int width, int height); - -// Convert I422 to RGBA. -LIBYUV_API -int I422ToRGBA(const uint8* src_y, int src_stride_y, - const uint8* src_u, int src_stride_u, - const uint8* src_v, int src_stride_v, - uint8* dst_rgba, int dst_stride_rgba, - int width, int height); - -// Alias -#define RGB24ToRAW RAWToRGB24 - -LIBYUV_API -int RAWToRGB24(const uint8* src_raw, int src_stride_raw, - uint8* dst_rgb24, int dst_stride_rgb24, - int width, int height); - -// Draw a rectangle into I420. -LIBYUV_API -int I420Rect(uint8* dst_y, int dst_stride_y, - uint8* dst_u, int dst_stride_u, - uint8* dst_v, int dst_stride_v, - int x, int y, int width, int height, - int value_y, int value_u, int value_v); - -// Draw a rectangle into ARGB. -LIBYUV_API -int ARGBRect(uint8* dst_argb, int dst_stride_argb, - int x, int y, int width, int height, uint32 value); - -// Convert ARGB to gray scale ARGB. -LIBYUV_API -int ARGBGrayTo(const uint8* src_argb, int src_stride_argb, - uint8* dst_argb, int dst_stride_argb, - int width, int height); - -// Make a rectangle of ARGB gray scale. -LIBYUV_API -int ARGBGray(uint8* dst_argb, int dst_stride_argb, - int x, int y, int width, int height); - -// Make a rectangle of ARGB Sepia tone. -LIBYUV_API -int ARGBSepia(uint8* dst_argb, int dst_stride_argb, - int x, int y, int width, int height); - -// Apply a matrix rotation to each ARGB pixel. -// matrix_argb is 4 signed ARGB values. -128 to 127 representing -2 to 2. -// The first 4 coefficients apply to B, G, R, A and produce B of the output. -// The next 4 coefficients apply to B, G, R, A and produce G of the output. -// The next 4 coefficients apply to B, G, R, A and produce R of the output. -// The last 4 coefficients apply to B, G, R, A and produce A of the output. -LIBYUV_API -int ARGBColorMatrix(const uint8* src_argb, int src_stride_argb, - uint8* dst_argb, int dst_stride_argb, - const int8* matrix_argb, - int width, int height); - -// Deprecated. Use ARGBColorMatrix instead. -// Apply a matrix rotation to each ARGB pixel. -// matrix_argb is 3 signed ARGB values. -128 to 127 representing -1 to 1. -// The first 4 coefficients apply to B, G, R, A and produce B of the output. -// The next 4 coefficients apply to B, G, R, A and produce G of the output. -// The last 4 coefficients apply to B, G, R, A and produce R of the output. -LIBYUV_API -int RGBColorMatrix(uint8* dst_argb, int dst_stride_argb, - const int8* matrix_rgb, - int x, int y, int width, int height); - -// Apply a color table each ARGB pixel. -// Table contains 256 ARGB values. -LIBYUV_API -int ARGBColorTable(uint8* dst_argb, int dst_stride_argb, - const uint8* table_argb, - int x, int y, int width, int height); - -// Apply a color table each ARGB pixel but preserve destination alpha. -// Table contains 256 ARGB values. -LIBYUV_API -int RGBColorTable(uint8* dst_argb, int dst_stride_argb, - const uint8* table_argb, - int x, int y, int width, int height); - -// Apply a luma/color table each ARGB pixel but preserve destination alpha. -// Table contains 32768 values indexed by [Y][C] where 7 it 7 bit luma from -// RGB (YJ style) and C is an 8 bit color component (R, G or B). -LIBYUV_API -int ARGBLumaColorTable(const uint8* src_argb, int src_stride_argb, - uint8* dst_argb, int dst_stride_argb, - const uint8* luma_rgb_table, - int width, int height); - -// Apply a 3 term polynomial to ARGB values. -// poly points to a 4x4 matrix. The first row is constants. The 2nd row is -// coefficients for b, g, r and a. The 3rd row is coefficients for b squared, -// g squared, r squared and a squared. The 4rd row is coefficients for b to -// the 3, g to the 3, r to the 3 and a to the 3. The values are summed and -// result clamped to 0 to 255. -// A polynomial approximation can be dirived using software such as 'R'. - -LIBYUV_API -int ARGBPolynomial(const uint8* src_argb, int src_stride_argb, - uint8* dst_argb, int dst_stride_argb, - const float* poly, - int width, int height); - -// Quantize a rectangle of ARGB. Alpha unaffected. -// scale is a 16 bit fractional fixed point scaler between 0 and 65535. -// interval_size should be a value between 1 and 255. -// interval_offset should be a value between 0 and 255. -LIBYUV_API -int ARGBQuantize(uint8* dst_argb, int dst_stride_argb, - int scale, int interval_size, int interval_offset, - int x, int y, int width, int height); - -// Copy ARGB to ARGB. -LIBYUV_API -int ARGBCopy(const uint8* src_argb, int src_stride_argb, - uint8* dst_argb, int dst_stride_argb, - int width, int height); - -// Copy Alpha channel of ARGB to alpha of ARGB. -LIBYUV_API -int ARGBCopyAlpha(const uint8* src_argb, int src_stride_argb, - uint8* dst_argb, int dst_stride_argb, - int width, int height); - -// Extract the alpha channel from ARGB. -LIBYUV_API -int ARGBExtractAlpha(const uint8* src_argb, int src_stride_argb, - uint8* dst_a, int dst_stride_a, - int width, int height); - -// Copy Y channel to Alpha of ARGB. -LIBYUV_API -int ARGBCopyYToAlpha(const uint8* src_y, int src_stride_y, - uint8* dst_argb, int dst_stride_argb, - int width, int height); - -typedef void (*ARGBBlendRow)(const uint8* src_argb0, const uint8* src_argb1, - uint8* dst_argb, int width); - -// Get function to Alpha Blend ARGB pixels and store to destination. -LIBYUV_API -ARGBBlendRow GetARGBBlend(); - -// Alpha Blend ARGB images and store to destination. -// Source is pre-multiplied by alpha using ARGBAttenuate. -// Alpha of destination is set to 255. -LIBYUV_API -int ARGBBlend(const uint8* src_argb0, int src_stride_argb0, - const uint8* src_argb1, int src_stride_argb1, - uint8* dst_argb, int dst_stride_argb, - int width, int height); - -// Alpha Blend plane and store to destination. -// Source is not pre-multiplied by alpha. -LIBYUV_API -int BlendPlane(const uint8* src_y0, int src_stride_y0, - const uint8* src_y1, int src_stride_y1, - const uint8* alpha, int alpha_stride, - uint8* dst_y, int dst_stride_y, - int width, int height); - -// Alpha Blend YUV images and store to destination. -// Source is not pre-multiplied by alpha. -// Alpha is full width x height and subsampled to half size to apply to UV. -LIBYUV_API -int I420Blend(const uint8* src_y0, int src_stride_y0, - const uint8* src_u0, int src_stride_u0, - const uint8* src_v0, int src_stride_v0, - const uint8* src_y1, int src_stride_y1, - const uint8* src_u1, int src_stride_u1, - const uint8* src_v1, int src_stride_v1, - const uint8* alpha, int alpha_stride, - uint8* dst_y, int dst_stride_y, - uint8* dst_u, int dst_stride_u, - uint8* dst_v, int dst_stride_v, - int width, int height); - -// Multiply ARGB image by ARGB image. Shifted down by 8. Saturates to 255. -LIBYUV_API -int ARGBMultiply(const uint8* src_argb0, int src_stride_argb0, - const uint8* src_argb1, int src_stride_argb1, - uint8* dst_argb, int dst_stride_argb, - int width, int height); - -// Add ARGB image with ARGB image. Saturates to 255. -LIBYUV_API -int ARGBAdd(const uint8* src_argb0, int src_stride_argb0, - const uint8* src_argb1, int src_stride_argb1, - uint8* dst_argb, int dst_stride_argb, - int width, int height); - -// Subtract ARGB image (argb1) from ARGB image (argb0). Saturates to 0. -LIBYUV_API -int ARGBSubtract(const uint8* src_argb0, int src_stride_argb0, - const uint8* src_argb1, int src_stride_argb1, - uint8* dst_argb, int dst_stride_argb, - int width, int height); - -// Convert I422 to YUY2. -LIBYUV_API -int I422ToYUY2(const uint8* src_y, int src_stride_y, - const uint8* src_u, int src_stride_u, - const uint8* src_v, int src_stride_v, - uint8* dst_frame, int dst_stride_frame, - int width, int height); - -// Convert I422 to UYVY. -LIBYUV_API -int I422ToUYVY(const uint8* src_y, int src_stride_y, - const uint8* src_u, int src_stride_u, - const uint8* src_v, int src_stride_v, - uint8* dst_frame, int dst_stride_frame, - int width, int height); - -// Convert unattentuated ARGB to preattenuated ARGB. -LIBYUV_API -int ARGBAttenuate(const uint8* src_argb, int src_stride_argb, - uint8* dst_argb, int dst_stride_argb, - int width, int height); - -// Convert preattentuated ARGB to unattenuated ARGB. -LIBYUV_API -int ARGBUnattenuate(const uint8* src_argb, int src_stride_argb, - uint8* dst_argb, int dst_stride_argb, - int width, int height); - -// Internal function - do not call directly. -// Computes table of cumulative sum for image where the value is the sum -// of all values above and to the left of the entry. Used by ARGBBlur. -LIBYUV_API -int ARGBComputeCumulativeSum(const uint8* src_argb, int src_stride_argb, - int32* dst_cumsum, int dst_stride32_cumsum, - int width, int height); - -// Blur ARGB image. -// dst_cumsum table of width * (height + 1) * 16 bytes aligned to -// 16 byte boundary. -// dst_stride32_cumsum is number of ints in a row (width * 4). -// radius is number of pixels around the center. e.g. 1 = 3x3. 2=5x5. -// Blur is optimized for radius of 5 (11x11) or less. -LIBYUV_API -int ARGBBlur(const uint8* src_argb, int src_stride_argb, - uint8* dst_argb, int dst_stride_argb, - int32* dst_cumsum, int dst_stride32_cumsum, - int width, int height, int radius); - -// Multiply ARGB image by ARGB value. -LIBYUV_API -int ARGBShade(const uint8* src_argb, int src_stride_argb, - uint8* dst_argb, int dst_stride_argb, - int width, int height, uint32 value); - -// Interpolate between two images using specified amount of interpolation -// (0 to 255) and store to destination. -// 'interpolation' is specified as 8 bit fraction where 0 means 100% src0 -// and 255 means 1% src0 and 99% src1. -LIBYUV_API -int InterpolatePlane(const uint8* src0, int src_stride0, - const uint8* src1, int src_stride1, - uint8* dst, int dst_stride, - int width, int height, int interpolation); - -// Interpolate between two ARGB images using specified amount of interpolation -// Internally calls InterpolatePlane with width * 4 (bpp). -LIBYUV_API -int ARGBInterpolate(const uint8* src_argb0, int src_stride_argb0, - const uint8* src_argb1, int src_stride_argb1, - uint8* dst_argb, int dst_stride_argb, - int width, int height, int interpolation); - -// Interpolate between two YUV images using specified amount of interpolation -// Internally calls InterpolatePlane on each plane where the U and V planes -// are half width and half height. -LIBYUV_API -int I420Interpolate(const uint8* src0_y, int src0_stride_y, - const uint8* src0_u, int src0_stride_u, - const uint8* src0_v, int src0_stride_v, - const uint8* src1_y, int src1_stride_y, - const uint8* src1_u, int src1_stride_u, - const uint8* src1_v, int src1_stride_v, - uint8* dst_y, int dst_stride_y, - uint8* dst_u, int dst_stride_u, - uint8* dst_v, int dst_stride_v, - int width, int height, int interpolation); - -#if defined(__pnacl__) || defined(__CLR_VER) || \ - (defined(__i386__) && !defined(__SSE2__)) -#define LIBYUV_DISABLE_X86 -#endif -// MemorySanitizer does not support assembly code yet. http://crbug.com/344505 -#if defined(__has_feature) -#if __has_feature(memory_sanitizer) -#define LIBYUV_DISABLE_X86 -#endif -#endif -// The following are available on all x86 platforms: -#if !defined(LIBYUV_DISABLE_X86) && \ - (defined(_M_IX86) || defined(__x86_64__) || defined(__i386__)) -#define HAS_ARGBAFFINEROW_SSE2 -#endif - -// Row function for copying pixels from a source with a slope to a row -// of destination. Useful for scaling, rotation, mirror, texture mapping. -LIBYUV_API -void ARGBAffineRow_C(const uint8* src_argb, int src_argb_stride, - uint8* dst_argb, const float* uv_dudv, int width); -LIBYUV_API -void ARGBAffineRow_SSE2(const uint8* src_argb, int src_argb_stride, - uint8* dst_argb, const float* uv_dudv, int width); - -// Shuffle ARGB channel order. e.g. BGRA to ARGB. -// shuffler is 16 bytes and must be aligned. -LIBYUV_API -int ARGBShuffle(const uint8* src_bgra, int src_stride_bgra, - uint8* dst_argb, int dst_stride_argb, - const uint8* shuffler, int width, int height); - -// Sobel ARGB effect with planar output. -LIBYUV_API -int ARGBSobelToPlane(const uint8* src_argb, int src_stride_argb, - uint8* dst_y, int dst_stride_y, - int width, int height); - -// Sobel ARGB effect. -LIBYUV_API -int ARGBSobel(const uint8* src_argb, int src_stride_argb, - uint8* dst_argb, int dst_stride_argb, - int width, int height); - -// Sobel ARGB effect w/ Sobel X, Sobel, Sobel Y in ARGB. -LIBYUV_API -int ARGBSobelXY(const uint8* src_argb, int src_stride_argb, - uint8* dst_argb, int dst_stride_argb, - int width, int height); - -#ifdef __cplusplus -} // extern "C" -} // namespace libyuv -#endif - -#endif // INCLUDE_LIBYUV_PLANAR_FUNCTIONS_H_ NOLINT diff --git a/WebRtc.NET/include/third_party/libvpx/source/libvpx/third_party/libyuv/include/libyuv/rotate.h b/WebRtc.NET/include/third_party/libvpx/source/libvpx/third_party/libyuv/include/libyuv/rotate.h deleted file mode 100644 index 8af60b89..00000000 --- a/WebRtc.NET/include/third_party/libvpx/source/libvpx/third_party/libyuv/include/libyuv/rotate.h +++ /dev/null @@ -1,117 +0,0 @@ -/* - * Copyright 2011 The LibYuv Project Authors. All rights reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef INCLUDE_LIBYUV_ROTATE_H_ // NOLINT -#define INCLUDE_LIBYUV_ROTATE_H_ - -#include "libyuv/basic_types.h" - -#ifdef __cplusplus -namespace libyuv { -extern "C" { -#endif - -// Supported rotation. -typedef enum RotationMode { - kRotate0 = 0, // No rotation. - kRotate90 = 90, // Rotate 90 degrees clockwise. - kRotate180 = 180, // Rotate 180 degrees. - kRotate270 = 270, // Rotate 270 degrees clockwise. - - // Deprecated. - kRotateNone = 0, - kRotateClockwise = 90, - kRotateCounterClockwise = 270, -} RotationModeEnum; - -// Rotate I420 frame. -LIBYUV_API -int I420Rotate(const uint8* src_y, int src_stride_y, - const uint8* src_u, int src_stride_u, - const uint8* src_v, int src_stride_v, - uint8* dst_y, int dst_stride_y, - uint8* dst_u, int dst_stride_u, - uint8* dst_v, int dst_stride_v, - int src_width, int src_height, enum RotationMode mode); - -// Rotate NV12 input and store in I420. -LIBYUV_API -int NV12ToI420Rotate(const uint8* src_y, int src_stride_y, - const uint8* src_uv, int src_stride_uv, - uint8* dst_y, int dst_stride_y, - uint8* dst_u, int dst_stride_u, - uint8* dst_v, int dst_stride_v, - int src_width, int src_height, enum RotationMode mode); - -// Rotate a plane by 0, 90, 180, or 270. -LIBYUV_API -int RotatePlane(const uint8* src, int src_stride, - uint8* dst, int dst_stride, - int src_width, int src_height, enum RotationMode mode); - -// Rotate planes by 90, 180, 270. Deprecated. -LIBYUV_API -void RotatePlane90(const uint8* src, int src_stride, - uint8* dst, int dst_stride, - int width, int height); - -LIBYUV_API -void RotatePlane180(const uint8* src, int src_stride, - uint8* dst, int dst_stride, - int width, int height); - -LIBYUV_API -void RotatePlane270(const uint8* src, int src_stride, - uint8* dst, int dst_stride, - int width, int height); - -LIBYUV_API -void RotateUV90(const uint8* src, int src_stride, - uint8* dst_a, int dst_stride_a, - uint8* dst_b, int dst_stride_b, - int width, int height); - -// Rotations for when U and V are interleaved. -// These functions take one input pointer and -// split the data into two buffers while -// rotating them. Deprecated. -LIBYUV_API -void RotateUV180(const uint8* src, int src_stride, - uint8* dst_a, int dst_stride_a, - uint8* dst_b, int dst_stride_b, - int width, int height); - -LIBYUV_API -void RotateUV270(const uint8* src, int src_stride, - uint8* dst_a, int dst_stride_a, - uint8* dst_b, int dst_stride_b, - int width, int height); - -// The 90 and 270 functions are based on transposes. -// Doing a transpose with reversing the read/write -// order will result in a rotation by +- 90 degrees. -// Deprecated. -LIBYUV_API -void TransposePlane(const uint8* src, int src_stride, - uint8* dst, int dst_stride, - int width, int height); - -LIBYUV_API -void TransposeUV(const uint8* src, int src_stride, - uint8* dst_a, int dst_stride_a, - uint8* dst_b, int dst_stride_b, - int width, int height); - -#ifdef __cplusplus -} // extern "C" -} // namespace libyuv -#endif - -#endif // INCLUDE_LIBYUV_ROTATE_H_ NOLINT diff --git a/WebRtc.NET/include/third_party/libvpx/source/libvpx/third_party/libyuv/include/libyuv/rotate_argb.h b/WebRtc.NET/include/third_party/libvpx/source/libvpx/third_party/libyuv/include/libyuv/rotate_argb.h deleted file mode 100644 index 660ff557..00000000 --- a/WebRtc.NET/include/third_party/libvpx/source/libvpx/third_party/libyuv/include/libyuv/rotate_argb.h +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright 2012 The LibYuv Project Authors. All rights reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef INCLUDE_LIBYUV_ROTATE_ARGB_H_ // NOLINT -#define INCLUDE_LIBYUV_ROTATE_ARGB_H_ - -#include "libyuv/basic_types.h" -#include "libyuv/rotate.h" // For RotationMode. - -#ifdef __cplusplus -namespace libyuv { -extern "C" { -#endif - -// Rotate ARGB frame -LIBYUV_API -int ARGBRotate(const uint8* src_argb, int src_stride_argb, - uint8* dst_argb, int dst_stride_argb, - int src_width, int src_height, enum RotationMode mode); - -#ifdef __cplusplus -} // extern "C" -} // namespace libyuv -#endif - -#endif // INCLUDE_LIBYUV_ROTATE_ARGB_H_ NOLINT diff --git a/WebRtc.NET/include/third_party/libvpx/source/libvpx/third_party/libyuv/include/libyuv/rotate_row.h b/WebRtc.NET/include/third_party/libvpx/source/libvpx/third_party/libyuv/include/libyuv/rotate_row.h deleted file mode 100644 index ebc487f9..00000000 --- a/WebRtc.NET/include/third_party/libvpx/source/libvpx/third_party/libyuv/include/libyuv/rotate_row.h +++ /dev/null @@ -1,121 +0,0 @@ -/* - * Copyright 2013 The LibYuv Project Authors. All rights reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef INCLUDE_LIBYUV_ROTATE_ROW_H_ // NOLINT -#define INCLUDE_LIBYUV_ROTATE_ROW_H_ - -#include "libyuv/basic_types.h" - -#ifdef __cplusplus -namespace libyuv { -extern "C" { -#endif - -#if defined(__pnacl__) || defined(__CLR_VER) || \ - (defined(__i386__) && !defined(__SSE2__)) -#define LIBYUV_DISABLE_X86 -#endif -// MemorySanitizer does not support assembly code yet. http://crbug.com/344505 -#if defined(__has_feature) -#if __has_feature(memory_sanitizer) -#define LIBYUV_DISABLE_X86 -#endif -#endif -// The following are available for Visual C and clangcl 32 bit: -#if !defined(LIBYUV_DISABLE_X86) && defined(_M_IX86) -#define HAS_TRANSPOSEWX8_SSSE3 -#define HAS_TRANSPOSEUVWX8_SSE2 -#endif - -// The following are available for GCC 32 or 64 bit but not NaCL for 64 bit: -#if !defined(LIBYUV_DISABLE_X86) && \ - (defined(__i386__) || (defined(__x86_64__) && !defined(__native_client__))) -#define HAS_TRANSPOSEWX8_SSSE3 -#endif - -// The following are available for 64 bit GCC but not NaCL: -#if !defined(LIBYUV_DISABLE_X86) && !defined(__native_client__) && \ - defined(__x86_64__) -#define HAS_TRANSPOSEWX8_FAST_SSSE3 -#define HAS_TRANSPOSEUVWX8_SSE2 -#endif - -#if !defined(LIBYUV_DISABLE_NEON) && !defined(__native_client__) && \ - (defined(__ARM_NEON__) || defined(LIBYUV_NEON) || defined(__aarch64__)) -#define HAS_TRANSPOSEWX8_NEON -#define HAS_TRANSPOSEUVWX8_NEON -#endif - -#if !defined(LIBYUV_DISABLE_MIPS) && !defined(__native_client__) && \ - defined(__mips__) && \ - defined(__mips_dsp) && (__mips_dsp_rev >= 2) -#define HAS_TRANSPOSEWX8_DSPR2 -#define HAS_TRANSPOSEUVWX8_DSPR2 -#endif // defined(__mips__) - -void TransposeWxH_C(const uint8* src, int src_stride, - uint8* dst, int dst_stride, int width, int height); - -void TransposeWx8_C(const uint8* src, int src_stride, - uint8* dst, int dst_stride, int width); -void TransposeWx8_NEON(const uint8* src, int src_stride, - uint8* dst, int dst_stride, int width); -void TransposeWx8_SSSE3(const uint8* src, int src_stride, - uint8* dst, int dst_stride, int width); -void TransposeWx8_Fast_SSSE3(const uint8* src, int src_stride, - uint8* dst, int dst_stride, int width); -void TransposeWx8_DSPR2(const uint8* src, int src_stride, - uint8* dst, int dst_stride, int width); -void TransposeWx8_Fast_DSPR2(const uint8* src, int src_stride, - uint8* dst, int dst_stride, int width); - -void TransposeWx8_Any_NEON(const uint8* src, int src_stride, - uint8* dst, int dst_stride, int width); -void TransposeWx8_Any_SSSE3(const uint8* src, int src_stride, - uint8* dst, int dst_stride, int width); -void TransposeWx8_Fast_Any_SSSE3(const uint8* src, int src_stride, - uint8* dst, int dst_stride, int width); -void TransposeWx8_Any_DSPR2(const uint8* src, int src_stride, - uint8* dst, int dst_stride, int width); - -void TransposeUVWxH_C(const uint8* src, int src_stride, - uint8* dst_a, int dst_stride_a, - uint8* dst_b, int dst_stride_b, - int width, int height); - -void TransposeUVWx8_C(const uint8* src, int src_stride, - uint8* dst_a, int dst_stride_a, - uint8* dst_b, int dst_stride_b, int width); -void TransposeUVWx8_SSE2(const uint8* src, int src_stride, - uint8* dst_a, int dst_stride_a, - uint8* dst_b, int dst_stride_b, int width); -void TransposeUVWx8_NEON(const uint8* src, int src_stride, - uint8* dst_a, int dst_stride_a, - uint8* dst_b, int dst_stride_b, int width); -void TransposeUVWx8_DSPR2(const uint8* src, int src_stride, - uint8* dst_a, int dst_stride_a, - uint8* dst_b, int dst_stride_b, int width); - -void TransposeUVWx8_Any_SSE2(const uint8* src, int src_stride, - uint8* dst_a, int dst_stride_a, - uint8* dst_b, int dst_stride_b, int width); -void TransposeUVWx8_Any_NEON(const uint8* src, int src_stride, - uint8* dst_a, int dst_stride_a, - uint8* dst_b, int dst_stride_b, int width); -void TransposeUVWx8_Any_DSPR2(const uint8* src, int src_stride, - uint8* dst_a, int dst_stride_a, - uint8* dst_b, int dst_stride_b, int width); - -#ifdef __cplusplus -} // extern "C" -} // namespace libyuv -#endif - -#endif // INCLUDE_LIBYUV_ROTATE_ROW_H_ NOLINT diff --git a/WebRtc.NET/include/third_party/libvpx/source/libvpx/third_party/libyuv/include/libyuv/row.h b/WebRtc.NET/include/third_party/libvpx/source/libvpx/third_party/libyuv/include/libyuv/row.h deleted file mode 100644 index 013a7e53..00000000 --- a/WebRtc.NET/include/third_party/libvpx/source/libvpx/third_party/libyuv/include/libyuv/row.h +++ /dev/null @@ -1,1944 +0,0 @@ -/* - * Copyright 2011 The LibYuv Project Authors. All rights reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef INCLUDE_LIBYUV_ROW_H_ // NOLINT -#define INCLUDE_LIBYUV_ROW_H_ - -#include // For malloc. - -#include "libyuv/basic_types.h" - -#ifdef __cplusplus -namespace libyuv { -extern "C" { -#endif - -#define IS_ALIGNED(p, a) (!((uintptr_t)(p) & ((a) - 1))) - -#ifdef __cplusplus -#define align_buffer_64(var, size) \ - uint8* var##_mem = reinterpret_cast(malloc((size) + 63)); \ - uint8* var = reinterpret_cast \ - ((reinterpret_cast(var##_mem) + 63) & ~63) -#else -#define align_buffer_64(var, size) \ - uint8* var##_mem = (uint8*)(malloc((size) + 63)); /* NOLINT */ \ - uint8* var = (uint8*)(((intptr_t)(var##_mem) + 63) & ~63) /* NOLINT */ -#endif - -#define free_aligned_buffer_64(var) \ - free(var##_mem); \ - var = 0 - -#if defined(__pnacl__) || defined(__CLR_VER) || \ - (defined(__i386__) && !defined(__SSE2__)) -#define LIBYUV_DISABLE_X86 -#endif -// MemorySanitizer does not support assembly code yet. http://crbug.com/344505 -#if defined(__has_feature) -#if __has_feature(memory_sanitizer) -#define LIBYUV_DISABLE_X86 -#endif -#endif -// True if compiling for SSSE3 as a requirement. -#if defined(__SSSE3__) || (defined(_M_IX86_FP) && (_M_IX86_FP >= 3)) -#define LIBYUV_SSSE3_ONLY -#endif - -#if defined(__native_client__) -#define LIBYUV_DISABLE_NEON -#endif -// clang >= 3.5.0 required for Arm64. -#if defined(__clang__) && defined(__aarch64__) && !defined(LIBYUV_DISABLE_NEON) -#if (__clang_major__ < 3) || (__clang_major__ == 3 && (__clang_minor__ < 5)) -#define LIBYUV_DISABLE_NEON -#endif // clang >= 3.5 -#endif // __clang__ - -// GCC >= 4.7.0 required for AVX2. -#if defined(__GNUC__) && (defined(__x86_64__) || defined(__i386__)) -#if (__GNUC__ > 4) || (__GNUC__ == 4 && (__GNUC_MINOR__ >= 7)) -#define GCC_HAS_AVX2 1 -#endif // GNUC >= 4.7 -#endif // __GNUC__ - -// clang >= 3.4.0 required for AVX2. -#if defined(__clang__) && (defined(__x86_64__) || defined(__i386__)) -#if (__clang_major__ > 3) || (__clang_major__ == 3 && (__clang_minor__ >= 4)) -#define CLANG_HAS_AVX2 1 -#endif // clang >= 3.4 -#endif // __clang__ - -// Visual C 2012 required for AVX2. -#if defined(_M_IX86) && !defined(__clang__) && \ - defined(_MSC_VER) && _MSC_VER >= 1700 -#define VISUALC_HAS_AVX2 1 -#endif // VisualStudio >= 2012 - -// The following are available on all x86 platforms: -#if !defined(LIBYUV_DISABLE_X86) && \ - (defined(_M_IX86) || defined(__x86_64__) || defined(__i386__)) -// Conversions: -#define HAS_ABGRTOUVROW_SSSE3 -#define HAS_ABGRTOYROW_SSSE3 -#define HAS_ARGB1555TOARGBROW_SSE2 -#define HAS_ARGB4444TOARGBROW_SSE2 -#define HAS_ARGBSETROW_X86 -#define HAS_ARGBSHUFFLEROW_SSE2 -#define HAS_ARGBSHUFFLEROW_SSSE3 -#define HAS_ARGBTOARGB1555ROW_SSE2 -#define HAS_ARGBTOARGB4444ROW_SSE2 -#define HAS_ARGBTORAWROW_SSSE3 -#define HAS_ARGBTORGB24ROW_SSSE3 -#define HAS_ARGBTORGB565DITHERROW_SSE2 -#define HAS_ARGBTORGB565ROW_SSE2 -#define HAS_ARGBTOUV444ROW_SSSE3 -#define HAS_ARGBTOUVJROW_SSSE3 -#define HAS_ARGBTOUVROW_SSSE3 -#define HAS_ARGBTOYJROW_SSSE3 -#define HAS_ARGBTOYROW_SSSE3 -#define HAS_ARGBEXTRACTALPHAROW_SSE2 -#define HAS_BGRATOUVROW_SSSE3 -#define HAS_BGRATOYROW_SSSE3 -#define HAS_COPYROW_ERMS -#define HAS_COPYROW_SSE2 -#define HAS_H422TOARGBROW_SSSE3 -#define HAS_I400TOARGBROW_SSE2 -#define HAS_I422TOARGB1555ROW_SSSE3 -#define HAS_I422TOARGB4444ROW_SSSE3 -#define HAS_I422TOARGBROW_SSSE3 -#define HAS_I422TORGB24ROW_SSSE3 -#define HAS_I422TORGB565ROW_SSSE3 -#define HAS_I422TORGBAROW_SSSE3 -#define HAS_I422TOUYVYROW_SSE2 -#define HAS_I422TOYUY2ROW_SSE2 -#define HAS_I444TOARGBROW_SSSE3 -#define HAS_J400TOARGBROW_SSE2 -#define HAS_J422TOARGBROW_SSSE3 -#define HAS_MERGEUVROW_SSE2 -#define HAS_MIRRORROW_SSSE3 -#define HAS_MIRRORUVROW_SSSE3 -#define HAS_NV12TOARGBROW_SSSE3 -#define HAS_NV12TORGB565ROW_SSSE3 -#define HAS_NV21TOARGBROW_SSSE3 -#define HAS_RAWTOARGBROW_SSSE3 -#define HAS_RAWTORGB24ROW_SSSE3 -#define HAS_RAWTOYROW_SSSE3 -#define HAS_RGB24TOARGBROW_SSSE3 -#define HAS_RGB24TOYROW_SSSE3 -#define HAS_RGB565TOARGBROW_SSE2 -#define HAS_RGBATOUVROW_SSSE3 -#define HAS_RGBATOYROW_SSSE3 -#define HAS_SETROW_ERMS -#define HAS_SETROW_X86 -#define HAS_SPLITUVROW_SSE2 -#define HAS_UYVYTOARGBROW_SSSE3 -#define HAS_UYVYTOUV422ROW_SSE2 -#define HAS_UYVYTOUVROW_SSE2 -#define HAS_UYVYTOYROW_SSE2 -#define HAS_YUY2TOARGBROW_SSSE3 -#define HAS_YUY2TOUV422ROW_SSE2 -#define HAS_YUY2TOUVROW_SSE2 -#define HAS_YUY2TOYROW_SSE2 - -// Effects: -#define HAS_ARGBADDROW_SSE2 -#define HAS_ARGBAFFINEROW_SSE2 -#define HAS_ARGBATTENUATEROW_SSSE3 -#define HAS_ARGBBLENDROW_SSSE3 -#define HAS_ARGBCOLORMATRIXROW_SSSE3 -#define HAS_ARGBCOLORTABLEROW_X86 -#define HAS_ARGBCOPYALPHAROW_SSE2 -#define HAS_ARGBCOPYYTOALPHAROW_SSE2 -#define HAS_ARGBGRAYROW_SSSE3 -#define HAS_ARGBLUMACOLORTABLEROW_SSSE3 -#define HAS_ARGBMIRRORROW_SSE2 -#define HAS_ARGBMULTIPLYROW_SSE2 -#define HAS_ARGBPOLYNOMIALROW_SSE2 -#define HAS_ARGBQUANTIZEROW_SSE2 -#define HAS_ARGBSEPIAROW_SSSE3 -#define HAS_ARGBSHADEROW_SSE2 -#define HAS_ARGBSUBTRACTROW_SSE2 -#define HAS_ARGBUNATTENUATEROW_SSE2 -#define HAS_BLENDPLANEROW_SSSE3 -#define HAS_COMPUTECUMULATIVESUMROW_SSE2 -#define HAS_CUMULATIVESUMTOAVERAGEROW_SSE2 -#define HAS_INTERPOLATEROW_SSSE3 -#define HAS_RGBCOLORTABLEROW_X86 -#define HAS_SOBELROW_SSE2 -#define HAS_SOBELTOPLANEROW_SSE2 -#define HAS_SOBELXROW_SSE2 -#define HAS_SOBELXYROW_SSE2 -#define HAS_SOBELYROW_SSE2 - -// The following functions fail on gcc/clang 32 bit with fpic and framepointer. -// caveat: clangcl uses row_win.cc which works. -#if defined(NDEBUG) || !(defined(_DEBUG) && defined(__i386__)) || \ - !defined(__i386__) || defined(_MSC_VER) -// TODO(fbarchard): fix build error on x86 debug -// https://code.google.com/p/libyuv/issues/detail?id=524 -#define HAS_I411TOARGBROW_SSSE3 -// TODO(fbarchard): fix build error on android_full_debug=1 -// https://code.google.com/p/libyuv/issues/detail?id=517 -#define HAS_I422ALPHATOARGBROW_SSSE3 -#endif -#endif - -// The following are available on all x86 platforms, but -// require VS2012, clang 3.4 or gcc 4.7. -// The code supports NaCL but requires a new compiler and validator. -#if !defined(LIBYUV_DISABLE_X86) && (defined(VISUALC_HAS_AVX2) || \ - defined(CLANG_HAS_AVX2) || defined(GCC_HAS_AVX2)) -#define HAS_ARGBCOPYALPHAROW_AVX2 -#define HAS_ARGBCOPYYTOALPHAROW_AVX2 -#define HAS_ARGBMIRRORROW_AVX2 -#define HAS_ARGBPOLYNOMIALROW_AVX2 -#define HAS_ARGBSHUFFLEROW_AVX2 -#define HAS_ARGBTORGB565DITHERROW_AVX2 -#define HAS_ARGBTOUVJROW_AVX2 -#define HAS_ARGBTOUVROW_AVX2 -#define HAS_ARGBTOYJROW_AVX2 -#define HAS_ARGBTOYROW_AVX2 -#define HAS_COPYROW_AVX -#define HAS_H422TOARGBROW_AVX2 -#define HAS_I400TOARGBROW_AVX2 -#if !(defined(_DEBUG) && defined(__i386__)) -// TODO(fbarchard): fix build error on android_full_debug=1 -// https://code.google.com/p/libyuv/issues/detail?id=517 -#define HAS_I422ALPHATOARGBROW_AVX2 -#endif -#define HAS_I411TOARGBROW_AVX2 -#define HAS_I422TOARGB1555ROW_AVX2 -#define HAS_I422TOARGB4444ROW_AVX2 -#define HAS_I422TOARGBROW_AVX2 -#define HAS_I422TORGB24ROW_AVX2 -#define HAS_I422TORGB565ROW_AVX2 -#define HAS_I422TORGBAROW_AVX2 -#define HAS_I444TOARGBROW_AVX2 -#define HAS_INTERPOLATEROW_AVX2 -#define HAS_J422TOARGBROW_AVX2 -#define HAS_MERGEUVROW_AVX2 -#define HAS_MIRRORROW_AVX2 -#define HAS_NV12TOARGBROW_AVX2 -#define HAS_NV12TORGB565ROW_AVX2 -#define HAS_NV21TOARGBROW_AVX2 -#define HAS_SPLITUVROW_AVX2 -#define HAS_UYVYTOARGBROW_AVX2 -#define HAS_UYVYTOUV422ROW_AVX2 -#define HAS_UYVYTOUVROW_AVX2 -#define HAS_UYVYTOYROW_AVX2 -#define HAS_YUY2TOARGBROW_AVX2 -#define HAS_YUY2TOUV422ROW_AVX2 -#define HAS_YUY2TOUVROW_AVX2 -#define HAS_YUY2TOYROW_AVX2 - -// Effects: -#define HAS_ARGBADDROW_AVX2 -#define HAS_ARGBATTENUATEROW_AVX2 -#define HAS_ARGBMULTIPLYROW_AVX2 -#define HAS_ARGBSUBTRACTROW_AVX2 -#define HAS_ARGBUNATTENUATEROW_AVX2 -#define HAS_BLENDPLANEROW_AVX2 -#endif - -// The following are available for AVX2 Visual C and clangcl 32 bit: -// TODO(fbarchard): Port to gcc. -#if !defined(LIBYUV_DISABLE_X86) && defined(_M_IX86) && \ - (defined(VISUALC_HAS_AVX2) || defined(CLANG_HAS_AVX2)) -#define HAS_ARGB1555TOARGBROW_AVX2 -#define HAS_ARGB4444TOARGBROW_AVX2 -#define HAS_ARGBTOARGB1555ROW_AVX2 -#define HAS_ARGBTOARGB4444ROW_AVX2 -#define HAS_ARGBTORGB565ROW_AVX2 -#define HAS_J400TOARGBROW_AVX2 -#define HAS_RGB565TOARGBROW_AVX2 -#endif - -// The following are also available on x64 Visual C. -#if !defined(LIBYUV_DISABLE_X86) && defined(_MSC_VER) && defined(_M_X64) && \ - (!defined(__clang__) || defined(__SSSE3__)) -#define HAS_I422ALPHATOARGBROW_SSSE3 -#define HAS_I422TOARGBROW_SSSE3 -#endif - -// The following are available on Neon platforms: -#if !defined(LIBYUV_DISABLE_NEON) && \ - (defined(__aarch64__) || defined(__ARM_NEON__) || defined(LIBYUV_NEON)) -#define HAS_ABGRTOUVROW_NEON -#define HAS_ABGRTOYROW_NEON -#define HAS_ARGB1555TOARGBROW_NEON -#define HAS_ARGB1555TOUVROW_NEON -#define HAS_ARGB1555TOYROW_NEON -#define HAS_ARGB4444TOARGBROW_NEON -#define HAS_ARGB4444TOUVROW_NEON -#define HAS_ARGB4444TOYROW_NEON -#define HAS_ARGBSETROW_NEON -#define HAS_ARGBTOARGB1555ROW_NEON -#define HAS_ARGBTOARGB4444ROW_NEON -#define HAS_ARGBTORAWROW_NEON -#define HAS_ARGBTORGB24ROW_NEON -#define HAS_ARGBTORGB565DITHERROW_NEON -#define HAS_ARGBTORGB565ROW_NEON -#define HAS_ARGBTOUV411ROW_NEON -#define HAS_ARGBTOUV444ROW_NEON -#define HAS_ARGBTOUVJROW_NEON -#define HAS_ARGBTOUVROW_NEON -#define HAS_ARGBTOYJROW_NEON -#define HAS_ARGBTOYROW_NEON -#define HAS_ARGBEXTRACTALPHAROW_NEON -#define HAS_BGRATOUVROW_NEON -#define HAS_BGRATOYROW_NEON -#define HAS_COPYROW_NEON -#define HAS_I400TOARGBROW_NEON -#define HAS_I411TOARGBROW_NEON -#define HAS_I422ALPHATOARGBROW_NEON -#define HAS_I422TOARGB1555ROW_NEON -#define HAS_I422TOARGB4444ROW_NEON -#define HAS_I422TOARGBROW_NEON -#define HAS_I422TORGB24ROW_NEON -#define HAS_I422TORGB565ROW_NEON -#define HAS_I422TORGBAROW_NEON -#define HAS_I422TOUYVYROW_NEON -#define HAS_I422TOYUY2ROW_NEON -#define HAS_I444TOARGBROW_NEON -#define HAS_J400TOARGBROW_NEON -#define HAS_MERGEUVROW_NEON -#define HAS_MIRRORROW_NEON -#define HAS_MIRRORUVROW_NEON -#define HAS_NV12TOARGBROW_NEON -#define HAS_NV12TORGB565ROW_NEON -#define HAS_NV21TOARGBROW_NEON -#define HAS_RAWTOARGBROW_NEON -#define HAS_RAWTORGB24ROW_NEON -#define HAS_RAWTOUVROW_NEON -#define HAS_RAWTOYROW_NEON -#define HAS_RGB24TOARGBROW_NEON -#define HAS_RGB24TOUVROW_NEON -#define HAS_RGB24TOYROW_NEON -#define HAS_RGB565TOARGBROW_NEON -#define HAS_RGB565TOUVROW_NEON -#define HAS_RGB565TOYROW_NEON -#define HAS_RGBATOUVROW_NEON -#define HAS_RGBATOYROW_NEON -#define HAS_SETROW_NEON -#define HAS_SPLITUVROW_NEON -#define HAS_UYVYTOARGBROW_NEON -#define HAS_UYVYTOUV422ROW_NEON -#define HAS_UYVYTOUVROW_NEON -#define HAS_UYVYTOYROW_NEON -#define HAS_YUY2TOARGBROW_NEON -#define HAS_YUY2TOUV422ROW_NEON -#define HAS_YUY2TOUVROW_NEON -#define HAS_YUY2TOYROW_NEON - -// Effects: -#define HAS_ARGBADDROW_NEON -#define HAS_ARGBATTENUATEROW_NEON -#define HAS_ARGBBLENDROW_NEON -#define HAS_ARGBCOLORMATRIXROW_NEON -#define HAS_ARGBGRAYROW_NEON -#define HAS_ARGBMIRRORROW_NEON -#define HAS_ARGBMULTIPLYROW_NEON -#define HAS_ARGBQUANTIZEROW_NEON -#define HAS_ARGBSEPIAROW_NEON -#define HAS_ARGBSHADEROW_NEON -#define HAS_ARGBSHUFFLEROW_NEON -#define HAS_ARGBSUBTRACTROW_NEON -#define HAS_INTERPOLATEROW_NEON -#define HAS_SOBELROW_NEON -#define HAS_SOBELTOPLANEROW_NEON -#define HAS_SOBELXROW_NEON -#define HAS_SOBELXYROW_NEON -#define HAS_SOBELYROW_NEON -#endif - -// The following are available on Mips platforms: -#if !defined(LIBYUV_DISABLE_MIPS) && defined(__mips__) && \ - (_MIPS_SIM == _MIPS_SIM_ABI32) && (__mips_isa_rev < 6) -#define HAS_COPYROW_MIPS -#if defined(__mips_dsp) && (__mips_dsp_rev >= 2) -#define HAS_I422TOARGBROW_DSPR2 -#define HAS_INTERPOLATEROW_DSPR2 -#define HAS_MIRRORROW_DSPR2 -#define HAS_MIRRORUVROW_DSPR2 -#define HAS_SPLITUVROW_DSPR2 -#endif -#endif - -#if defined(_MSC_VER) && !defined(__CLR_VER) && !defined(__clang__) -#if defined(VISUALC_HAS_AVX2) -#define SIMD_ALIGNED(var) __declspec(align(32)) var -#else -#define SIMD_ALIGNED(var) __declspec(align(16)) var -#endif -typedef __declspec(align(16)) int16 vec16[8]; -typedef __declspec(align(16)) int32 vec32[4]; -typedef __declspec(align(16)) int8 vec8[16]; -typedef __declspec(align(16)) uint16 uvec16[8]; -typedef __declspec(align(16)) uint32 uvec32[4]; -typedef __declspec(align(16)) uint8 uvec8[16]; -typedef __declspec(align(32)) int16 lvec16[16]; -typedef __declspec(align(32)) int32 lvec32[8]; -typedef __declspec(align(32)) int8 lvec8[32]; -typedef __declspec(align(32)) uint16 ulvec16[16]; -typedef __declspec(align(32)) uint32 ulvec32[8]; -typedef __declspec(align(32)) uint8 ulvec8[32]; -#elif !defined(__pnacl__) && (defined(__GNUC__) || defined(__clang__)) -// Caveat GCC 4.2 to 4.7 have a known issue using vectors with const. -#if defined(CLANG_HAS_AVX2) || defined(GCC_HAS_AVX2) -#define SIMD_ALIGNED(var) var __attribute__((aligned(32))) -#else -#define SIMD_ALIGNED(var) var __attribute__((aligned(16))) -#endif -typedef int16 __attribute__((vector_size(16))) vec16; -typedef int32 __attribute__((vector_size(16))) vec32; -typedef int8 __attribute__((vector_size(16))) vec8; -typedef uint16 __attribute__((vector_size(16))) uvec16; -typedef uint32 __attribute__((vector_size(16))) uvec32; -typedef uint8 __attribute__((vector_size(16))) uvec8; -typedef int16 __attribute__((vector_size(32))) lvec16; -typedef int32 __attribute__((vector_size(32))) lvec32; -typedef int8 __attribute__((vector_size(32))) lvec8; -typedef uint16 __attribute__((vector_size(32))) ulvec16; -typedef uint32 __attribute__((vector_size(32))) ulvec32; -typedef uint8 __attribute__((vector_size(32))) ulvec8; -#else -#define SIMD_ALIGNED(var) var -typedef int16 vec16[8]; -typedef int32 vec32[4]; -typedef int8 vec8[16]; -typedef uint16 uvec16[8]; -typedef uint32 uvec32[4]; -typedef uint8 uvec8[16]; -typedef int16 lvec16[16]; -typedef int32 lvec32[8]; -typedef int8 lvec8[32]; -typedef uint16 ulvec16[16]; -typedef uint32 ulvec32[8]; -typedef uint8 ulvec8[32]; -#endif - -#if defined(__aarch64__) -// This struct is for Arm64 color conversion. -struct YuvConstants { - uvec16 kUVToRB; - uvec16 kUVToRB2; - uvec16 kUVToG; - uvec16 kUVToG2; - vec16 kUVBiasBGR; - vec32 kYToRgb; -}; -#elif defined(__arm__) -// This struct is for ArmV7 color conversion. -struct YuvConstants { - uvec8 kUVToRB; - uvec8 kUVToG; - vec16 kUVBiasBGR; - vec32 kYToRgb; -}; -#else -// This struct is for Intel color conversion. -struct YuvConstants { - int8 kUVToB[32]; - int8 kUVToG[32]; - int8 kUVToR[32]; - int16 kUVBiasB[16]; - int16 kUVBiasG[16]; - int16 kUVBiasR[16]; - int16 kYToRgb[16]; -}; - -// Offsets into YuvConstants structure -#define KUVTOB 0 -#define KUVTOG 32 -#define KUVTOR 64 -#define KUVBIASB 96 -#define KUVBIASG 128 -#define KUVBIASR 160 -#define KYTORGB 192 -#endif - -// Conversion matrix for YUV to RGB -extern const struct YuvConstants SIMD_ALIGNED(kYuvI601Constants); // BT.601 -extern const struct YuvConstants SIMD_ALIGNED(kYuvJPEGConstants); // JPeg -extern const struct YuvConstants SIMD_ALIGNED(kYuvH709Constants); // BT.709 - -// Conversion matrix for YVU to BGR -extern const struct YuvConstants SIMD_ALIGNED(kYvuI601Constants); // BT.601 -extern const struct YuvConstants SIMD_ALIGNED(kYvuJPEGConstants); // JPeg -extern const struct YuvConstants SIMD_ALIGNED(kYvuH709Constants); // BT.709 - -#if defined(__APPLE__) || defined(__x86_64__) || defined(__llvm__) -#define OMITFP -#else -#define OMITFP __attribute__((optimize("omit-frame-pointer"))) -#endif - -// NaCL macros for GCC x86 and x64. -#if defined(__native_client__) -#define LABELALIGN ".p2align 5\n" -#else -#define LABELALIGN -#endif -#if defined(__native_client__) && defined(__x86_64__) -// r14 is used for MEMOP macros. -#define NACL_R14 "r14", -#define BUNDLELOCK ".bundle_lock\n" -#define BUNDLEUNLOCK ".bundle_unlock\n" -#define MEMACCESS(base) "%%nacl:(%%r15,%q" #base ")" -#define MEMACCESS2(offset, base) "%%nacl:" #offset "(%%r15,%q" #base ")" -#define MEMLEA(offset, base) #offset "(%q" #base ")" -#define MEMLEA3(offset, index, scale) \ - #offset "(,%q" #index "," #scale ")" -#define MEMLEA4(offset, base, index, scale) \ - #offset "(%q" #base ",%q" #index "," #scale ")" -#define MEMMOVESTRING(s, d) "%%nacl:(%q" #s "),%%nacl:(%q" #d "), %%r15" -#define MEMSTORESTRING(reg, d) "%%" #reg ",%%nacl:(%q" #d "), %%r15" -#define MEMOPREG(opcode, offset, base, index, scale, reg) \ - BUNDLELOCK \ - "lea " #offset "(%q" #base ",%q" #index "," #scale "),%%r14d\n" \ - #opcode " (%%r15,%%r14),%%" #reg "\n" \ - BUNDLEUNLOCK -#define MEMOPMEM(opcode, reg, offset, base, index, scale) \ - BUNDLELOCK \ - "lea " #offset "(%q" #base ",%q" #index "," #scale "),%%r14d\n" \ - #opcode " %%" #reg ",(%%r15,%%r14)\n" \ - BUNDLEUNLOCK -#define MEMOPARG(opcode, offset, base, index, scale, arg) \ - BUNDLELOCK \ - "lea " #offset "(%q" #base ",%q" #index "," #scale "),%%r14d\n" \ - #opcode " (%%r15,%%r14),%" #arg "\n" \ - BUNDLEUNLOCK -#define VMEMOPREG(opcode, offset, base, index, scale, reg1, reg2) \ - BUNDLELOCK \ - "lea " #offset "(%q" #base ",%q" #index "," #scale "),%%r14d\n" \ - #opcode " (%%r15,%%r14),%%" #reg1 ",%%" #reg2 "\n" \ - BUNDLEUNLOCK -#define VEXTOPMEM(op, sel, reg, offset, base, index, scale) \ - BUNDLELOCK \ - "lea " #offset "(%q" #base ",%q" #index "," #scale "),%%r14d\n" \ - #op " $" #sel ",%%" #reg ",(%%r15,%%r14)\n" \ - BUNDLEUNLOCK -#else // defined(__native_client__) && defined(__x86_64__) -#define NACL_R14 -#define BUNDLEALIGN -#define MEMACCESS(base) "(%" #base ")" -#define MEMACCESS2(offset, base) #offset "(%" #base ")" -#define MEMLEA(offset, base) #offset "(%" #base ")" -#define MEMLEA3(offset, index, scale) \ - #offset "(,%" #index "," #scale ")" -#define MEMLEA4(offset, base, index, scale) \ - #offset "(%" #base ",%" #index "," #scale ")" -#define MEMMOVESTRING(s, d) -#define MEMSTORESTRING(reg, d) -#define MEMOPREG(opcode, offset, base, index, scale, reg) \ - #opcode " " #offset "(%" #base ",%" #index "," #scale "),%%" #reg "\n" -#define MEMOPMEM(opcode, reg, offset, base, index, scale) \ - #opcode " %%" #reg ","#offset "(%" #base ",%" #index "," #scale ")\n" -#define MEMOPARG(opcode, offset, base, index, scale, arg) \ - #opcode " " #offset "(%" #base ",%" #index "," #scale "),%" #arg "\n" -#define VMEMOPREG(opcode, offset, base, index, scale, reg1, reg2) \ - #opcode " " #offset "(%" #base ",%" #index "," #scale "),%%" #reg1 ",%%" \ - #reg2 "\n" -#define VEXTOPMEM(op, sel, reg, offset, base, index, scale) \ - #op " $" #sel ",%%" #reg ","#offset "(%" #base ",%" #index "," #scale ")\n" -#endif // defined(__native_client__) && defined(__x86_64__) - -#if defined(__arm__) || defined(__aarch64__) -#undef MEMACCESS -#if defined(__native_client__) -#define MEMACCESS(base) ".p2align 3\nbic %" #base ", #0xc0000000\n" -#else -#define MEMACCESS(base) -#endif -#endif - -void I444ToARGBRow_NEON(const uint8* src_y, - const uint8* src_u, - const uint8* src_v, - uint8* dst_argb, - const struct YuvConstants* yuvconstants, - int width); -void I422ToARGBRow_NEON(const uint8* src_y, - const uint8* src_u, - const uint8* src_v, - uint8* dst_argb, - const struct YuvConstants* yuvconstants, - int width); -void I422AlphaToARGBRow_NEON(const uint8* y_buf, - const uint8* u_buf, - const uint8* v_buf, - const uint8* a_buf, - uint8* dst_argb, - const struct YuvConstants* yuvconstants, - int width); -void I422ToARGBRow_NEON(const uint8* src_y, - const uint8* src_u, - const uint8* src_v, - uint8* dst_argb, - const struct YuvConstants* yuvconstants, - int width); -void I411ToARGBRow_NEON(const uint8* src_y, - const uint8* src_u, - const uint8* src_v, - uint8* dst_argb, - const struct YuvConstants* yuvconstants, - int width); -void I422ToRGBARow_NEON(const uint8* src_y, - const uint8* src_u, - const uint8* src_v, - uint8* dst_rgba, - const struct YuvConstants* yuvconstants, - int width); -void I422ToRGB24Row_NEON(const uint8* src_y, - const uint8* src_u, - const uint8* src_v, - uint8* dst_rgb24, - const struct YuvConstants* yuvconstants, - int width); -void I422ToRGB565Row_NEON(const uint8* src_y, - const uint8* src_u, - const uint8* src_v, - uint8* dst_rgb565, - const struct YuvConstants* yuvconstants, - int width); -void I422ToARGB1555Row_NEON(const uint8* src_y, - const uint8* src_u, - const uint8* src_v, - uint8* dst_argb1555, - const struct YuvConstants* yuvconstants, - int width); -void I422ToARGB4444Row_NEON(const uint8* src_y, - const uint8* src_u, - const uint8* src_v, - uint8* dst_argb4444, - const struct YuvConstants* yuvconstants, - int width); -void NV12ToARGBRow_NEON(const uint8* src_y, - const uint8* src_uv, - uint8* dst_argb, - const struct YuvConstants* yuvconstants, - int width); -void NV12ToRGB565Row_NEON(const uint8* src_y, - const uint8* src_uv, - uint8* dst_rgb565, - const struct YuvConstants* yuvconstants, - int width); -void NV21ToARGBRow_NEON(const uint8* src_y, - const uint8* src_vu, - uint8* dst_argb, - const struct YuvConstants* yuvconstants, - int width); -void YUY2ToARGBRow_NEON(const uint8* src_yuy2, - uint8* dst_argb, - const struct YuvConstants* yuvconstants, - int width); -void UYVYToARGBRow_NEON(const uint8* src_uyvy, - uint8* dst_argb, - const struct YuvConstants* yuvconstants, - int width); - -void ARGBToYRow_AVX2(const uint8* src_argb, uint8* dst_y, int width); -void ARGBToYRow_Any_AVX2(const uint8* src_argb, uint8* dst_y, int width); -void ARGBToYRow_SSSE3(const uint8* src_argb, uint8* dst_y, int width); -void ARGBToYJRow_AVX2(const uint8* src_argb, uint8* dst_y, int width); -void ARGBToYJRow_Any_AVX2(const uint8* src_argb, uint8* dst_y, int width); -void ARGBToYJRow_SSSE3(const uint8* src_argb, uint8* dst_y, int width); -void BGRAToYRow_SSSE3(const uint8* src_bgra, uint8* dst_y, int width); -void ABGRToYRow_SSSE3(const uint8* src_abgr, uint8* dst_y, int width); -void RGBAToYRow_SSSE3(const uint8* src_rgba, uint8* dst_y, int width); -void RGB24ToYRow_SSSE3(const uint8* src_rgb24, uint8* dst_y, int width); -void RAWToYRow_SSSE3(const uint8* src_raw, uint8* dst_y, int width); -void ARGBToYRow_NEON(const uint8* src_argb, uint8* dst_y, int width); -void ARGBToYJRow_NEON(const uint8* src_argb, uint8* dst_y, int width); -void ARGBToUV444Row_NEON(const uint8* src_argb, uint8* dst_u, uint8* dst_v, - int width); -void ARGBToUV411Row_NEON(const uint8* src_argb, uint8* dst_u, uint8* dst_v, - int width); -void ARGBToUVRow_NEON(const uint8* src_argb, int src_stride_argb, - uint8* dst_u, uint8* dst_v, int width); -void ARGBToUVJRow_NEON(const uint8* src_argb, int src_stride_argb, - uint8* dst_u, uint8* dst_v, int width); -void BGRAToUVRow_NEON(const uint8* src_bgra, int src_stride_bgra, - uint8* dst_u, uint8* dst_v, int width); -void ABGRToUVRow_NEON(const uint8* src_abgr, int src_stride_abgr, - uint8* dst_u, uint8* dst_v, int width); -void RGBAToUVRow_NEON(const uint8* src_rgba, int src_stride_rgba, - uint8* dst_u, uint8* dst_v, int width); -void RGB24ToUVRow_NEON(const uint8* src_rgb24, int src_stride_rgb24, - uint8* dst_u, uint8* dst_v, int width); -void RAWToUVRow_NEON(const uint8* src_raw, int src_stride_raw, - uint8* dst_u, uint8* dst_v, int width); -void RGB565ToUVRow_NEON(const uint8* src_rgb565, int src_stride_rgb565, - uint8* dst_u, uint8* dst_v, int width); -void ARGB1555ToUVRow_NEON(const uint8* src_argb1555, int src_stride_argb1555, - uint8* dst_u, uint8* dst_v, int width); -void ARGB4444ToUVRow_NEON(const uint8* src_argb4444, int src_stride_argb4444, - uint8* dst_u, uint8* dst_v, int width); -void BGRAToYRow_NEON(const uint8* src_bgra, uint8* dst_y, int width); -void ABGRToYRow_NEON(const uint8* src_abgr, uint8* dst_y, int width); -void RGBAToYRow_NEON(const uint8* src_rgba, uint8* dst_y, int width); -void RGB24ToYRow_NEON(const uint8* src_rgb24, uint8* dst_y, int width); -void RAWToYRow_NEON(const uint8* src_raw, uint8* dst_y, int width); -void RGB565ToYRow_NEON(const uint8* src_rgb565, uint8* dst_y, int width); -void ARGB1555ToYRow_NEON(const uint8* src_argb1555, uint8* dst_y, int width); -void ARGB4444ToYRow_NEON(const uint8* src_argb4444, uint8* dst_y, int width); -void ARGBToYRow_C(const uint8* src_argb, uint8* dst_y, int width); -void ARGBToYJRow_C(const uint8* src_argb, uint8* dst_y, int width); -void BGRAToYRow_C(const uint8* src_bgra, uint8* dst_y, int width); -void ABGRToYRow_C(const uint8* src_abgr, uint8* dst_y, int width); -void RGBAToYRow_C(const uint8* src_rgba, uint8* dst_y, int width); -void RGB24ToYRow_C(const uint8* src_rgb24, uint8* dst_y, int width); -void RAWToYRow_C(const uint8* src_raw, uint8* dst_y, int width); -void RGB565ToYRow_C(const uint8* src_rgb565, uint8* dst_y, int width); -void ARGB1555ToYRow_C(const uint8* src_argb1555, uint8* dst_y, int width); -void ARGB4444ToYRow_C(const uint8* src_argb4444, uint8* dst_y, int width); -void ARGBToYRow_Any_SSSE3(const uint8* src_argb, uint8* dst_y, int width); -void ARGBToYJRow_Any_SSSE3(const uint8* src_argb, uint8* dst_y, int width); -void BGRAToYRow_Any_SSSE3(const uint8* src_bgra, uint8* dst_y, int width); -void ABGRToYRow_Any_SSSE3(const uint8* src_abgr, uint8* dst_y, int width); -void RGBAToYRow_Any_SSSE3(const uint8* src_rgba, uint8* dst_y, int width); -void RGB24ToYRow_Any_SSSE3(const uint8* src_rgb24, uint8* dst_y, int width); -void RAWToYRow_Any_SSSE3(const uint8* src_raw, uint8* dst_y, int width); -void ARGBToYRow_Any_NEON(const uint8* src_argb, uint8* dst_y, int width); -void ARGBToYJRow_Any_NEON(const uint8* src_argb, uint8* dst_y, int width); -void BGRAToYRow_Any_NEON(const uint8* src_bgra, uint8* dst_y, int width); -void ABGRToYRow_Any_NEON(const uint8* src_abgr, uint8* dst_y, int width); -void RGBAToYRow_Any_NEON(const uint8* src_rgba, uint8* dst_y, int width); -void RGB24ToYRow_Any_NEON(const uint8* src_rgb24, uint8* dst_y, int width); -void RAWToYRow_Any_NEON(const uint8* src_raw, uint8* dst_y, int width); -void RGB565ToYRow_Any_NEON(const uint8* src_rgb565, uint8* dst_y, int width); -void ARGB1555ToYRow_Any_NEON(const uint8* src_argb1555, uint8* dst_y, - int width); -void ARGB4444ToYRow_Any_NEON(const uint8* src_argb4444, uint8* dst_y, - int width); - -void ARGBToUVRow_AVX2(const uint8* src_argb, int src_stride_argb, - uint8* dst_u, uint8* dst_v, int width); -void ARGBToUVJRow_AVX2(const uint8* src_argb, int src_stride_argb, - uint8* dst_u, uint8* dst_v, int width); -void ARGBToUVRow_SSSE3(const uint8* src_argb, int src_stride_argb, - uint8* dst_u, uint8* dst_v, int width); -void ARGBToUVJRow_SSSE3(const uint8* src_argb, int src_stride_argb, - uint8* dst_u, uint8* dst_v, int width); -void BGRAToUVRow_SSSE3(const uint8* src_bgra, int src_stride_bgra, - uint8* dst_u, uint8* dst_v, int width); -void ABGRToUVRow_SSSE3(const uint8* src_abgr, int src_stride_abgr, - uint8* dst_u, uint8* dst_v, int width); -void RGBAToUVRow_SSSE3(const uint8* src_rgba, int src_stride_rgba, - uint8* dst_u, uint8* dst_v, int width); -void ARGBToUVRow_Any_AVX2(const uint8* src_argb, int src_stride_argb, - uint8* dst_u, uint8* dst_v, int width); -void ARGBToUVJRow_Any_AVX2(const uint8* src_argb, int src_stride_argb, - uint8* dst_u, uint8* dst_v, int width); -void ARGBToUVRow_Any_SSSE3(const uint8* src_argb, int src_stride_argb, - uint8* dst_u, uint8* dst_v, int width); -void ARGBToUVJRow_Any_SSSE3(const uint8* src_argb, int src_stride_argb, - uint8* dst_u, uint8* dst_v, int width); -void BGRAToUVRow_Any_SSSE3(const uint8* src_bgra, int src_stride_bgra, - uint8* dst_u, uint8* dst_v, int width); -void ABGRToUVRow_Any_SSSE3(const uint8* src_abgr, int src_stride_abgr, - uint8* dst_u, uint8* dst_v, int width); -void RGBAToUVRow_Any_SSSE3(const uint8* src_rgba, int src_stride_rgba, - uint8* dst_u, uint8* dst_v, int width); -void ARGBToUV444Row_Any_NEON(const uint8* src_argb, uint8* dst_u, uint8* dst_v, - int width); -void ARGBToUV411Row_Any_NEON(const uint8* src_argb, uint8* dst_u, uint8* dst_v, - int width); -void ARGBToUVRow_Any_NEON(const uint8* src_argb, int src_stride_argb, - uint8* dst_u, uint8* dst_v, int width); -void ARGBToUVJRow_Any_NEON(const uint8* src_argb, int src_stride_argb, - uint8* dst_u, uint8* dst_v, int width); -void BGRAToUVRow_Any_NEON(const uint8* src_bgra, int src_stride_bgra, - uint8* dst_u, uint8* dst_v, int width); -void ABGRToUVRow_Any_NEON(const uint8* src_abgr, int src_stride_abgr, - uint8* dst_u, uint8* dst_v, int width); -void RGBAToUVRow_Any_NEON(const uint8* src_rgba, int src_stride_rgba, - uint8* dst_u, uint8* dst_v, int width); -void RGB24ToUVRow_Any_NEON(const uint8* src_rgb24, int src_stride_rgb24, - uint8* dst_u, uint8* dst_v, int width); -void RAWToUVRow_Any_NEON(const uint8* src_raw, int src_stride_raw, - uint8* dst_u, uint8* dst_v, int width); -void RGB565ToUVRow_Any_NEON(const uint8* src_rgb565, int src_stride_rgb565, - uint8* dst_u, uint8* dst_v, int width); -void ARGB1555ToUVRow_Any_NEON(const uint8* src_argb1555, - int src_stride_argb1555, - uint8* dst_u, uint8* dst_v, int width); -void ARGB4444ToUVRow_Any_NEON(const uint8* src_argb4444, - int src_stride_argb4444, - uint8* dst_u, uint8* dst_v, int width); -void ARGBToUVRow_C(const uint8* src_argb, int src_stride_argb, - uint8* dst_u, uint8* dst_v, int width); -void ARGBToUVJRow_C(const uint8* src_argb, int src_stride_argb, - uint8* dst_u, uint8* dst_v, int width); -void BGRAToUVRow_C(const uint8* src_bgra, int src_stride_bgra, - uint8* dst_u, uint8* dst_v, int width); -void ABGRToUVRow_C(const uint8* src_abgr, int src_stride_abgr, - uint8* dst_u, uint8* dst_v, int width); -void RGBAToUVRow_C(const uint8* src_rgba, int src_stride_rgba, - uint8* dst_u, uint8* dst_v, int width); -void RGB24ToUVRow_C(const uint8* src_rgb24, int src_stride_rgb24, - uint8* dst_u, uint8* dst_v, int width); -void RAWToUVRow_C(const uint8* src_raw, int src_stride_raw, - uint8* dst_u, uint8* dst_v, int width); -void RGB565ToUVRow_C(const uint8* src_rgb565, int src_stride_rgb565, - uint8* dst_u, uint8* dst_v, int width); -void ARGB1555ToUVRow_C(const uint8* src_argb1555, int src_stride_argb1555, - uint8* dst_u, uint8* dst_v, int width); -void ARGB4444ToUVRow_C(const uint8* src_argb4444, int src_stride_argb4444, - uint8* dst_u, uint8* dst_v, int width); - -void ARGBToUV444Row_SSSE3(const uint8* src_argb, - uint8* dst_u, uint8* dst_v, int width); -void ARGBToUV444Row_Any_SSSE3(const uint8* src_argb, - uint8* dst_u, uint8* dst_v, int width); - -void ARGBToUV444Row_C(const uint8* src_argb, - uint8* dst_u, uint8* dst_v, int width); -void ARGBToUV411Row_C(const uint8* src_argb, - uint8* dst_u, uint8* dst_v, int width); - -void MirrorRow_AVX2(const uint8* src, uint8* dst, int width); -void MirrorRow_SSSE3(const uint8* src, uint8* dst, int width); -void MirrorRow_NEON(const uint8* src, uint8* dst, int width); -void MirrorRow_DSPR2(const uint8* src, uint8* dst, int width); -void MirrorRow_C(const uint8* src, uint8* dst, int width); -void MirrorRow_Any_AVX2(const uint8* src, uint8* dst, int width); -void MirrorRow_Any_SSSE3(const uint8* src, uint8* dst, int width); -void MirrorRow_Any_SSE2(const uint8* src, uint8* dst, int width); -void MirrorRow_Any_NEON(const uint8* src, uint8* dst, int width); - -void MirrorUVRow_SSSE3(const uint8* src_uv, uint8* dst_u, uint8* dst_v, - int width); -void MirrorUVRow_NEON(const uint8* src_uv, uint8* dst_u, uint8* dst_v, - int width); -void MirrorUVRow_DSPR2(const uint8* src_uv, uint8* dst_u, uint8* dst_v, - int width); -void MirrorUVRow_C(const uint8* src_uv, uint8* dst_u, uint8* dst_v, int width); - -void ARGBMirrorRow_AVX2(const uint8* src, uint8* dst, int width); -void ARGBMirrorRow_SSE2(const uint8* src, uint8* dst, int width); -void ARGBMirrorRow_NEON(const uint8* src, uint8* dst, int width); -void ARGBMirrorRow_C(const uint8* src, uint8* dst, int width); -void ARGBMirrorRow_Any_AVX2(const uint8* src, uint8* dst, int width); -void ARGBMirrorRow_Any_SSE2(const uint8* src, uint8* dst, int width); -void ARGBMirrorRow_Any_NEON(const uint8* src, uint8* dst, int width); - -void SplitUVRow_C(const uint8* src_uv, uint8* dst_u, uint8* dst_v, int width); -void SplitUVRow_SSE2(const uint8* src_uv, uint8* dst_u, uint8* dst_v, - int width); -void SplitUVRow_AVX2(const uint8* src_uv, uint8* dst_u, uint8* dst_v, - int width); -void SplitUVRow_NEON(const uint8* src_uv, uint8* dst_u, uint8* dst_v, - int width); -void SplitUVRow_DSPR2(const uint8* src_uv, uint8* dst_u, uint8* dst_v, - int width); -void SplitUVRow_Any_SSE2(const uint8* src_uv, uint8* dst_u, uint8* dst_v, - int width); -void SplitUVRow_Any_AVX2(const uint8* src_uv, uint8* dst_u, uint8* dst_v, - int width); -void SplitUVRow_Any_NEON(const uint8* src_uv, uint8* dst_u, uint8* dst_v, - int width); -void SplitUVRow_Any_DSPR2(const uint8* src_uv, uint8* dst_u, uint8* dst_v, - int width); - -void MergeUVRow_C(const uint8* src_u, const uint8* src_v, uint8* dst_uv, - int width); -void MergeUVRow_SSE2(const uint8* src_u, const uint8* src_v, uint8* dst_uv, - int width); -void MergeUVRow_AVX2(const uint8* src_u, const uint8* src_v, uint8* dst_uv, - int width); -void MergeUVRow_NEON(const uint8* src_u, const uint8* src_v, uint8* dst_uv, - int width); -void MergeUVRow_Any_SSE2(const uint8* src_u, const uint8* src_v, uint8* dst_uv, - int width); -void MergeUVRow_Any_AVX2(const uint8* src_u, const uint8* src_v, uint8* dst_uv, - int width); -void MergeUVRow_Any_NEON(const uint8* src_u, const uint8* src_v, uint8* dst_uv, - int width); - -void CopyRow_SSE2(const uint8* src, uint8* dst, int count); -void CopyRow_AVX(const uint8* src, uint8* dst, int count); -void CopyRow_ERMS(const uint8* src, uint8* dst, int count); -void CopyRow_NEON(const uint8* src, uint8* dst, int count); -void CopyRow_MIPS(const uint8* src, uint8* dst, int count); -void CopyRow_C(const uint8* src, uint8* dst, int count); -void CopyRow_Any_SSE2(const uint8* src, uint8* dst, int count); -void CopyRow_Any_AVX(const uint8* src, uint8* dst, int count); -void CopyRow_Any_NEON(const uint8* src, uint8* dst, int count); - -void CopyRow_16_C(const uint16* src, uint16* dst, int count); - -void ARGBCopyAlphaRow_C(const uint8* src_argb, uint8* dst_argb, int width); -void ARGBCopyAlphaRow_SSE2(const uint8* src_argb, uint8* dst_argb, int width); -void ARGBCopyAlphaRow_AVX2(const uint8* src_argb, uint8* dst_argb, int width); -void ARGBCopyAlphaRow_Any_SSE2(const uint8* src_argb, uint8* dst_argb, - int width); -void ARGBCopyAlphaRow_Any_AVX2(const uint8* src_argb, uint8* dst_argb, - int width); - -void ARGBExtractAlphaRow_C(const uint8* src_argb, uint8* dst_a, int width); -void ARGBExtractAlphaRow_SSE2(const uint8* src_argb, uint8* dst_a, int width); -void ARGBExtractAlphaRow_NEON(const uint8* src_argb, uint8* dst_a, int width); -void ARGBExtractAlphaRow_Any_SSE2(const uint8* src_argb, uint8* dst_a, - int width); -void ARGBExtractAlphaRow_Any_NEON(const uint8* src_argb, uint8* dst_a, - int width); - -void ARGBCopyYToAlphaRow_C(const uint8* src_y, uint8* dst_argb, int width); -void ARGBCopyYToAlphaRow_SSE2(const uint8* src_y, uint8* dst_argb, int width); -void ARGBCopyYToAlphaRow_AVX2(const uint8* src_y, uint8* dst_argb, int width); -void ARGBCopyYToAlphaRow_Any_SSE2(const uint8* src_y, uint8* dst_argb, - int width); -void ARGBCopyYToAlphaRow_Any_AVX2(const uint8* src_y, uint8* dst_argb, - int width); - -void SetRow_C(uint8* dst, uint8 v8, int count); -void SetRow_X86(uint8* dst, uint8 v8, int count); -void SetRow_ERMS(uint8* dst, uint8 v8, int count); -void SetRow_NEON(uint8* dst, uint8 v8, int count); -void SetRow_Any_X86(uint8* dst, uint8 v8, int count); -void SetRow_Any_NEON(uint8* dst, uint8 v8, int count); - -void ARGBSetRow_C(uint8* dst_argb, uint32 v32, int count); -void ARGBSetRow_X86(uint8* dst_argb, uint32 v32, int count); -void ARGBSetRow_NEON(uint8* dst_argb, uint32 v32, int count); -void ARGBSetRow_Any_NEON(uint8* dst_argb, uint32 v32, int count); - -// ARGBShufflers for BGRAToARGB etc. -void ARGBShuffleRow_C(const uint8* src_argb, uint8* dst_argb, - const uint8* shuffler, int width); -void ARGBShuffleRow_SSE2(const uint8* src_argb, uint8* dst_argb, - const uint8* shuffler, int width); -void ARGBShuffleRow_SSSE3(const uint8* src_argb, uint8* dst_argb, - const uint8* shuffler, int width); -void ARGBShuffleRow_AVX2(const uint8* src_argb, uint8* dst_argb, - const uint8* shuffler, int width); -void ARGBShuffleRow_NEON(const uint8* src_argb, uint8* dst_argb, - const uint8* shuffler, int width); -void ARGBShuffleRow_Any_SSE2(const uint8* src_argb, uint8* dst_argb, - const uint8* shuffler, int width); -void ARGBShuffleRow_Any_SSSE3(const uint8* src_argb, uint8* dst_argb, - const uint8* shuffler, int width); -void ARGBShuffleRow_Any_AVX2(const uint8* src_argb, uint8* dst_argb, - const uint8* shuffler, int width); -void ARGBShuffleRow_Any_NEON(const uint8* src_argb, uint8* dst_argb, - const uint8* shuffler, int width); - -void RGB24ToARGBRow_SSSE3(const uint8* src_rgb24, uint8* dst_argb, int width); -void RAWToARGBRow_SSSE3(const uint8* src_raw, uint8* dst_argb, int width); -void RAWToRGB24Row_SSSE3(const uint8* src_raw, uint8* dst_rgb24, int width); -void RGB565ToARGBRow_SSE2(const uint8* src_rgb565, uint8* dst_argb, int width); -void ARGB1555ToARGBRow_SSE2(const uint8* src_argb1555, uint8* dst_argb, - int width); -void ARGB4444ToARGBRow_SSE2(const uint8* src_argb4444, uint8* dst_argb, - int width); -void RGB565ToARGBRow_AVX2(const uint8* src_rgb565, uint8* dst_argb, int width); -void ARGB1555ToARGBRow_AVX2(const uint8* src_argb1555, uint8* dst_argb, - int width); -void ARGB4444ToARGBRow_AVX2(const uint8* src_argb4444, uint8* dst_argb, - int width); - -void RGB24ToARGBRow_NEON(const uint8* src_rgb24, uint8* dst_argb, int width); -void RAWToARGBRow_NEON(const uint8* src_raw, uint8* dst_argb, int width); -void RAWToRGB24Row_NEON(const uint8* src_raw, uint8* dst_rgb24, int width); -void RGB565ToARGBRow_NEON(const uint8* src_rgb565, uint8* dst_argb, int width); -void ARGB1555ToARGBRow_NEON(const uint8* src_argb1555, uint8* dst_argb, - int width); -void ARGB4444ToARGBRow_NEON(const uint8* src_argb4444, uint8* dst_argb, - int width); -void RGB24ToARGBRow_C(const uint8* src_rgb24, uint8* dst_argb, int width); -void RAWToARGBRow_C(const uint8* src_raw, uint8* dst_argb, int width); -void RAWToRGB24Row_C(const uint8* src_raw, uint8* dst_rgb24, int width); -void RGB565ToARGBRow_C(const uint8* src_rgb, uint8* dst_argb, int width); -void ARGB1555ToARGBRow_C(const uint8* src_argb, uint8* dst_argb, int width); -void ARGB4444ToARGBRow_C(const uint8* src_argb, uint8* dst_argb, int width); -void RGB24ToARGBRow_Any_SSSE3(const uint8* src_rgb24, uint8* dst_argb, - int width); -void RAWToARGBRow_Any_SSSE3(const uint8* src_raw, uint8* dst_argb, int width); -void RAWToRGB24Row_Any_SSSE3(const uint8* src_raw, uint8* dst_rgb24, int width); - -void RGB565ToARGBRow_Any_SSE2(const uint8* src_rgb565, uint8* dst_argb, - int width); -void ARGB1555ToARGBRow_Any_SSE2(const uint8* src_argb1555, uint8* dst_argb, - int width); -void ARGB4444ToARGBRow_Any_SSE2(const uint8* src_argb4444, uint8* dst_argb, - int width); -void RGB565ToARGBRow_Any_AVX2(const uint8* src_rgb565, uint8* dst_argb, - int width); -void ARGB1555ToARGBRow_Any_AVX2(const uint8* src_argb1555, uint8* dst_argb, - int width); -void ARGB4444ToARGBRow_Any_AVX2(const uint8* src_argb4444, uint8* dst_argb, - int width); - -void RGB24ToARGBRow_Any_NEON(const uint8* src_rgb24, uint8* dst_argb, - int width); -void RAWToARGBRow_Any_NEON(const uint8* src_raw, uint8* dst_argb, int width); -void RAWToRGB24Row_Any_NEON(const uint8* src_raw, uint8* dst_rgb24, int width); -void RGB565ToARGBRow_Any_NEON(const uint8* src_rgb565, uint8* dst_argb, - int width); -void ARGB1555ToARGBRow_Any_NEON(const uint8* src_argb1555, uint8* dst_argb, - int width); -void ARGB4444ToARGBRow_Any_NEON(const uint8* src_argb4444, uint8* dst_argb, - int width); - -void ARGBToRGB24Row_SSSE3(const uint8* src_argb, uint8* dst_rgb, int width); -void ARGBToRAWRow_SSSE3(const uint8* src_argb, uint8* dst_rgb, int width); -void ARGBToRGB565Row_SSE2(const uint8* src_argb, uint8* dst_rgb, int width); -void ARGBToARGB1555Row_SSE2(const uint8* src_argb, uint8* dst_rgb, int width); -void ARGBToARGB4444Row_SSE2(const uint8* src_argb, uint8* dst_rgb, int width); - -void ARGBToRGB565DitherRow_C(const uint8* src_argb, uint8* dst_rgb, - const uint32 dither4, int width); -void ARGBToRGB565DitherRow_SSE2(const uint8* src_argb, uint8* dst_rgb, - const uint32 dither4, int width); -void ARGBToRGB565DitherRow_AVX2(const uint8* src_argb, uint8* dst_rgb, - const uint32 dither4, int width); - -void ARGBToRGB565Row_AVX2(const uint8* src_argb, uint8* dst_rgb, int width); -void ARGBToARGB1555Row_AVX2(const uint8* src_argb, uint8* dst_rgb, int width); -void ARGBToARGB4444Row_AVX2(const uint8* src_argb, uint8* dst_rgb, int width); - -void ARGBToRGB24Row_NEON(const uint8* src_argb, uint8* dst_rgb, int width); -void ARGBToRAWRow_NEON(const uint8* src_argb, uint8* dst_rgb, int width); -void ARGBToRGB565Row_NEON(const uint8* src_argb, uint8* dst_rgb, int width); -void ARGBToARGB1555Row_NEON(const uint8* src_argb, uint8* dst_rgb, int width); -void ARGBToARGB4444Row_NEON(const uint8* src_argb, uint8* dst_rgb, int width); -void ARGBToRGB565DitherRow_NEON(const uint8* src_argb, uint8* dst_rgb, - const uint32 dither4, int width); - -void ARGBToRGBARow_C(const uint8* src_argb, uint8* dst_rgb, int width); -void ARGBToRGB24Row_C(const uint8* src_argb, uint8* dst_rgb, int width); -void ARGBToRAWRow_C(const uint8* src_argb, uint8* dst_rgb, int width); -void ARGBToRGB565Row_C(const uint8* src_argb, uint8* dst_rgb, int width); -void ARGBToARGB1555Row_C(const uint8* src_argb, uint8* dst_rgb, int width); -void ARGBToARGB4444Row_C(const uint8* src_argb, uint8* dst_rgb, int width); - -void J400ToARGBRow_SSE2(const uint8* src_y, uint8* dst_argb, int width); -void J400ToARGBRow_AVX2(const uint8* src_y, uint8* dst_argb, int width); -void J400ToARGBRow_NEON(const uint8* src_y, uint8* dst_argb, int width); -void J400ToARGBRow_C(const uint8* src_y, uint8* dst_argb, int width); -void J400ToARGBRow_Any_SSE2(const uint8* src_y, uint8* dst_argb, int width); -void J400ToARGBRow_Any_AVX2(const uint8* src_y, uint8* dst_argb, int width); -void J400ToARGBRow_Any_NEON(const uint8* src_y, uint8* dst_argb, int width); - -void I444ToARGBRow_C(const uint8* src_y, - const uint8* src_u, - const uint8* src_v, - uint8* dst_argb, - const struct YuvConstants* yuvconstants, - int width); -void I422ToARGBRow_C(const uint8* src_y, - const uint8* src_u, - const uint8* src_v, - uint8* dst_argb, - const struct YuvConstants* yuvconstants, - int width); -void I422ToARGBRow_C(const uint8* src_y, - const uint8* src_u, - const uint8* src_v, - uint8* dst_argb, - const struct YuvConstants* yuvconstants, - int width); -void I422AlphaToARGBRow_C(const uint8* y_buf, - const uint8* u_buf, - const uint8* v_buf, - const uint8* a_buf, - uint8* dst_argb, - const struct YuvConstants* yuvconstants, - int width); -void I411ToARGBRow_C(const uint8* src_y, - const uint8* src_u, - const uint8* src_v, - uint8* dst_argb, - const struct YuvConstants* yuvconstants, - int width); -void NV12ToARGBRow_C(const uint8* src_y, - const uint8* src_uv, - uint8* dst_argb, - const struct YuvConstants* yuvconstants, - int width); -void NV12ToRGB565Row_C(const uint8* src_y, - const uint8* src_uv, - uint8* dst_argb, - const struct YuvConstants* yuvconstants, - int width); -void NV21ToARGBRow_C(const uint8* src_y, - const uint8* src_uv, - uint8* dst_argb, - const struct YuvConstants* yuvconstants, - int width); -void YUY2ToARGBRow_C(const uint8* src_yuy2, - uint8* dst_argb, - const struct YuvConstants* yuvconstants, - int width); -void UYVYToARGBRow_C(const uint8* src_uyvy, - uint8* dst_argb, - const struct YuvConstants* yuvconstants, - int width); -void I422ToRGBARow_C(const uint8* src_y, - const uint8* src_u, - const uint8* src_v, - uint8* dst_rgba, - const struct YuvConstants* yuvconstants, - int width); -void I422ToRGB24Row_C(const uint8* src_y, - const uint8* src_u, - const uint8* src_v, - uint8* dst_rgb24, - const struct YuvConstants* yuvconstants, - int width); -void I422ToARGB4444Row_C(const uint8* src_y, - const uint8* src_u, - const uint8* src_v, - uint8* dst_argb4444, - const struct YuvConstants* yuvconstants, - int width); -void I422ToARGB1555Row_C(const uint8* src_y, - const uint8* src_u, - const uint8* src_v, - uint8* dst_argb4444, - const struct YuvConstants* yuvconstants, - int width); -void I422ToRGB565Row_C(const uint8* src_y, - const uint8* src_u, - const uint8* src_v, - uint8* dst_rgb565, - const struct YuvConstants* yuvconstants, - int width); -void I422ToARGBRow_AVX2(const uint8* src_y, - const uint8* src_u, - const uint8* src_v, - uint8* dst_argb, - const struct YuvConstants* yuvconstants, - int width); -void I422ToARGBRow_AVX2(const uint8* src_y, - const uint8* src_u, - const uint8* src_v, - uint8* dst_argb, - const struct YuvConstants* yuvconstants, - int width); -void I422ToRGBARow_AVX2(const uint8* src_y, - const uint8* src_u, - const uint8* src_v, - uint8* dst_argb, - const struct YuvConstants* yuvconstants, - int width); -void I444ToARGBRow_SSSE3(const uint8* src_y, - const uint8* src_u, - const uint8* src_v, - uint8* dst_argb, - const struct YuvConstants* yuvconstants, - int width); -void I444ToARGBRow_AVX2(const uint8* src_y, - const uint8* src_u, - const uint8* src_v, - uint8* dst_argb, - const struct YuvConstants* yuvconstants, - int width); -void I444ToARGBRow_SSSE3(const uint8* src_y, - const uint8* src_u, - const uint8* src_v, - uint8* dst_argb, - const struct YuvConstants* yuvconstants, - int width); -void I444ToARGBRow_AVX2(const uint8* src_y, - const uint8* src_u, - const uint8* src_v, - uint8* dst_argb, - const struct YuvConstants* yuvconstants, - int width); -void I422ToARGBRow_SSSE3(const uint8* src_y, - const uint8* src_u, - const uint8* src_v, - uint8* dst_argb, - const struct YuvConstants* yuvconstants, - int width); -void I422AlphaToARGBRow_SSSE3(const uint8* y_buf, - const uint8* u_buf, - const uint8* v_buf, - const uint8* a_buf, - uint8* dst_argb, - const struct YuvConstants* yuvconstants, - int width); -void I422AlphaToARGBRow_AVX2(const uint8* y_buf, - const uint8* u_buf, - const uint8* v_buf, - const uint8* a_buf, - uint8* dst_argb, - const struct YuvConstants* yuvconstants, - int width); -void I422ToARGBRow_SSSE3(const uint8* src_y, - const uint8* src_u, - const uint8* src_v, - uint8* dst_argb, - const struct YuvConstants* yuvconstants, - int width); -void I411ToARGBRow_SSSE3(const uint8* src_y, - const uint8* src_u, - const uint8* src_v, - uint8* dst_argb, - const struct YuvConstants* yuvconstants, - int width); -void I411ToARGBRow_AVX2(const uint8* src_y, - const uint8* src_u, - const uint8* src_v, - uint8* dst_argb, - const struct YuvConstants* yuvconstants, - int width); -void NV12ToARGBRow_SSSE3(const uint8* src_y, - const uint8* src_uv, - uint8* dst_argb, - const struct YuvConstants* yuvconstants, - int width); -void NV12ToARGBRow_AVX2(const uint8* src_y, - const uint8* src_uv, - uint8* dst_argb, - const struct YuvConstants* yuvconstants, - int width); -void NV12ToRGB565Row_SSSE3(const uint8* src_y, - const uint8* src_uv, - uint8* dst_argb, - const struct YuvConstants* yuvconstants, - int width); -void NV12ToRGB565Row_AVX2(const uint8* src_y, - const uint8* src_uv, - uint8* dst_argb, - const struct YuvConstants* yuvconstants, - int width); -void NV21ToARGBRow_SSSE3(const uint8* src_y, - const uint8* src_uv, - uint8* dst_argb, - const struct YuvConstants* yuvconstants, - int width); -void NV21ToARGBRow_AVX2(const uint8* src_y, - const uint8* src_uv, - uint8* dst_argb, - const struct YuvConstants* yuvconstants, - int width); -void YUY2ToARGBRow_SSSE3(const uint8* src_yuy2, - uint8* dst_argb, - const struct YuvConstants* yuvconstants, - int width); -void UYVYToARGBRow_SSSE3(const uint8* src_uyvy, - uint8* dst_argb, - const struct YuvConstants* yuvconstants, - int width); -void YUY2ToARGBRow_AVX2(const uint8* src_yuy2, - uint8* dst_argb, - const struct YuvConstants* yuvconstants, - int width); -void UYVYToARGBRow_AVX2(const uint8* src_uyvy, - uint8* dst_argb, - const struct YuvConstants* yuvconstants, - int width); -void I422ToRGBARow_SSSE3(const uint8* src_y, - const uint8* src_u, - const uint8* src_v, - uint8* dst_rgba, - const struct YuvConstants* yuvconstants, - int width); -void I422ToARGB4444Row_SSSE3(const uint8* src_y, - const uint8* src_u, - const uint8* src_v, - uint8* dst_argb, - const struct YuvConstants* yuvconstants, - int width); -void I422ToARGB4444Row_AVX2(const uint8* src_y, - const uint8* src_u, - const uint8* src_v, - uint8* dst_argb, - const struct YuvConstants* yuvconstants, - int width); -void I422ToARGB1555Row_SSSE3(const uint8* src_y, - const uint8* src_u, - const uint8* src_v, - uint8* dst_argb, - const struct YuvConstants* yuvconstants, - int width); -void I422ToARGB1555Row_AVX2(const uint8* src_y, - const uint8* src_u, - const uint8* src_v, - uint8* dst_argb, - const struct YuvConstants* yuvconstants, - int width); -void I422ToRGB565Row_SSSE3(const uint8* src_y, - const uint8* src_u, - const uint8* src_v, - uint8* dst_argb, - const struct YuvConstants* yuvconstants, - int width); -void I422ToRGB565Row_AVX2(const uint8* src_y, - const uint8* src_u, - const uint8* src_v, - uint8* dst_argb, - const struct YuvConstants* yuvconstants, - int width); -void I422ToRGB24Row_SSSE3(const uint8* src_y, - const uint8* src_u, - const uint8* src_v, - uint8* dst_rgb24, - const struct YuvConstants* yuvconstants, - int width); -void I422ToRGB24Row_AVX2(const uint8* src_y, - const uint8* src_u, - const uint8* src_v, - uint8* dst_rgb24, - const struct YuvConstants* yuvconstants, - int width); -void I422ToARGBRow_Any_AVX2(const uint8* src_y, - const uint8* src_u, - const uint8* src_v, - uint8* dst_argb, - const struct YuvConstants* yuvconstants, - int width); -void I422ToRGBARow_Any_AVX2(const uint8* src_y, - const uint8* src_u, - const uint8* src_v, - uint8* dst_argb, - const struct YuvConstants* yuvconstants, - int width); -void I444ToARGBRow_Any_SSSE3(const uint8* src_y, - const uint8* src_u, - const uint8* src_v, - uint8* dst_argb, - const struct YuvConstants* yuvconstants, - int width); -void I444ToARGBRow_Any_AVX2(const uint8* src_y, - const uint8* src_u, - const uint8* src_v, - uint8* dst_argb, - const struct YuvConstants* yuvconstants, - int width); -void I422ToARGBRow_Any_SSSE3(const uint8* src_y, - const uint8* src_u, - const uint8* src_v, - uint8* dst_argb, - const struct YuvConstants* yuvconstants, - int width); -void I422AlphaToARGBRow_Any_SSSE3(const uint8* y_buf, - const uint8* u_buf, - const uint8* v_buf, - const uint8* a_buf, - uint8* dst_argb, - const struct YuvConstants* yuvconstants, - int width); -void I422AlphaToARGBRow_Any_AVX2(const uint8* y_buf, - const uint8* u_buf, - const uint8* v_buf, - const uint8* a_buf, - uint8* dst_argb, - const struct YuvConstants* yuvconstants, - int width); -void I411ToARGBRow_Any_SSSE3(const uint8* src_y, - const uint8* src_u, - const uint8* src_v, - uint8* dst_argb, - const struct YuvConstants* yuvconstants, - int width); -void I411ToARGBRow_Any_AVX2(const uint8* src_y, - const uint8* src_u, - const uint8* src_v, - uint8* dst_argb, - const struct YuvConstants* yuvconstants, - int width); -void NV12ToARGBRow_Any_SSSE3(const uint8* src_y, - const uint8* src_uv, - uint8* dst_argb, - const struct YuvConstants* yuvconstants, - int width); -void NV12ToARGBRow_Any_AVX2(const uint8* src_y, - const uint8* src_uv, - uint8* dst_argb, - const struct YuvConstants* yuvconstants, - int width); -void NV21ToARGBRow_Any_SSSE3(const uint8* src_y, - const uint8* src_vu, - uint8* dst_argb, - const struct YuvConstants* yuvconstants, - int width); -void NV21ToARGBRow_Any_AVX2(const uint8* src_y, - const uint8* src_vu, - uint8* dst_argb, - const struct YuvConstants* yuvconstants, - int width); -void NV12ToRGB565Row_Any_SSSE3(const uint8* src_y, - const uint8* src_uv, - uint8* dst_argb, - const struct YuvConstants* yuvconstants, - int width); -void NV12ToRGB565Row_Any_AVX2(const uint8* src_y, - const uint8* src_uv, - uint8* dst_argb, - const struct YuvConstants* yuvconstants, - int width); -void YUY2ToARGBRow_Any_SSSE3(const uint8* src_yuy2, - uint8* dst_argb, - const struct YuvConstants* yuvconstants, - int width); -void UYVYToARGBRow_Any_SSSE3(const uint8* src_uyvy, - uint8* dst_argb, - const struct YuvConstants* yuvconstants, - int width); -void YUY2ToARGBRow_Any_AVX2(const uint8* src_yuy2, - uint8* dst_argb, - const struct YuvConstants* yuvconstants, - int width); -void UYVYToARGBRow_Any_AVX2(const uint8* src_uyvy, - uint8* dst_argb, - const struct YuvConstants* yuvconstants, - int width); -void I422ToRGBARow_Any_SSSE3(const uint8* src_y, - const uint8* src_u, - const uint8* src_v, - uint8* dst_rgba, - const struct YuvConstants* yuvconstants, - int width); -void I422ToARGB4444Row_Any_SSSE3(const uint8* src_y, - const uint8* src_u, - const uint8* src_v, - uint8* dst_rgba, - const struct YuvConstants* yuvconstants, - int width); -void I422ToARGB4444Row_Any_AVX2(const uint8* src_y, - const uint8* src_u, - const uint8* src_v, - uint8* dst_rgba, - const struct YuvConstants* yuvconstants, - int width); -void I422ToARGB1555Row_Any_SSSE3(const uint8* src_y, - const uint8* src_u, - const uint8* src_v, - uint8* dst_rgba, - const struct YuvConstants* yuvconstants, - int width); -void I422ToARGB1555Row_Any_AVX2(const uint8* src_y, - const uint8* src_u, - const uint8* src_v, - uint8* dst_rgba, - const struct YuvConstants* yuvconstants, - int width); -void I422ToRGB565Row_Any_SSSE3(const uint8* src_y, - const uint8* src_u, - const uint8* src_v, - uint8* dst_rgba, - const struct YuvConstants* yuvconstants, - int width); -void I422ToRGB565Row_Any_AVX2(const uint8* src_y, - const uint8* src_u, - const uint8* src_v, - uint8* dst_rgba, - const struct YuvConstants* yuvconstants, - int width); -void I422ToRGB24Row_Any_SSSE3(const uint8* src_y, - const uint8* src_u, - const uint8* src_v, - uint8* dst_argb, - const struct YuvConstants* yuvconstants, - int width); -void I422ToRGB24Row_Any_AVX2(const uint8* src_y, - const uint8* src_u, - const uint8* src_v, - uint8* dst_argb, - const struct YuvConstants* yuvconstants, - int width); - -void I400ToARGBRow_C(const uint8* src_y, uint8* dst_argb, int width); -void I400ToARGBRow_SSE2(const uint8* src_y, uint8* dst_argb, int width); -void I400ToARGBRow_AVX2(const uint8* src_y, uint8* dst_argb, int width); -void I400ToARGBRow_NEON(const uint8* src_y, uint8* dst_argb, int width); -void I400ToARGBRow_Any_SSE2(const uint8* src_y, uint8* dst_argb, int width); -void I400ToARGBRow_Any_AVX2(const uint8* src_y, uint8* dst_argb, int width); -void I400ToARGBRow_Any_NEON(const uint8* src_y, uint8* dst_argb, int width); - -// ARGB preattenuated alpha blend. -void ARGBBlendRow_SSSE3(const uint8* src_argb, const uint8* src_argb1, - uint8* dst_argb, int width); -void ARGBBlendRow_NEON(const uint8* src_argb, const uint8* src_argb1, - uint8* dst_argb, int width); -void ARGBBlendRow_C(const uint8* src_argb, const uint8* src_argb1, - uint8* dst_argb, int width); - -// Unattenuated planar alpha blend. -void BlendPlaneRow_SSSE3(const uint8* src0, const uint8* src1, - const uint8* alpha, uint8* dst, int width); -void BlendPlaneRow_Any_SSSE3(const uint8* src0, const uint8* src1, - const uint8* alpha, uint8* dst, int width); -void BlendPlaneRow_AVX2(const uint8* src0, const uint8* src1, - const uint8* alpha, uint8* dst, int width); -void BlendPlaneRow_Any_AVX2(const uint8* src0, const uint8* src1, - const uint8* alpha, uint8* dst, int width); -void BlendPlaneRow_C(const uint8* src0, const uint8* src1, - const uint8* alpha, uint8* dst, int width); - -// ARGB multiply images. Same API as Blend, but these require -// pointer and width alignment for SSE2. -void ARGBMultiplyRow_C(const uint8* src_argb, const uint8* src_argb1, - uint8* dst_argb, int width); -void ARGBMultiplyRow_SSE2(const uint8* src_argb, const uint8* src_argb1, - uint8* dst_argb, int width); -void ARGBMultiplyRow_Any_SSE2(const uint8* src_argb, const uint8* src_argb1, - uint8* dst_argb, int width); -void ARGBMultiplyRow_AVX2(const uint8* src_argb, const uint8* src_argb1, - uint8* dst_argb, int width); -void ARGBMultiplyRow_Any_AVX2(const uint8* src_argb, const uint8* src_argb1, - uint8* dst_argb, int width); -void ARGBMultiplyRow_NEON(const uint8* src_argb, const uint8* src_argb1, - uint8* dst_argb, int width); -void ARGBMultiplyRow_Any_NEON(const uint8* src_argb, const uint8* src_argb1, - uint8* dst_argb, int width); - -// ARGB add images. -void ARGBAddRow_C(const uint8* src_argb, const uint8* src_argb1, - uint8* dst_argb, int width); -void ARGBAddRow_SSE2(const uint8* src_argb, const uint8* src_argb1, - uint8* dst_argb, int width); -void ARGBAddRow_Any_SSE2(const uint8* src_argb, const uint8* src_argb1, - uint8* dst_argb, int width); -void ARGBAddRow_AVX2(const uint8* src_argb, const uint8* src_argb1, - uint8* dst_argb, int width); -void ARGBAddRow_Any_AVX2(const uint8* src_argb, const uint8* src_argb1, - uint8* dst_argb, int width); -void ARGBAddRow_NEON(const uint8* src_argb, const uint8* src_argb1, - uint8* dst_argb, int width); -void ARGBAddRow_Any_NEON(const uint8* src_argb, const uint8* src_argb1, - uint8* dst_argb, int width); - -// ARGB subtract images. Same API as Blend, but these require -// pointer and width alignment for SSE2. -void ARGBSubtractRow_C(const uint8* src_argb, const uint8* src_argb1, - uint8* dst_argb, int width); -void ARGBSubtractRow_SSE2(const uint8* src_argb, const uint8* src_argb1, - uint8* dst_argb, int width); -void ARGBSubtractRow_Any_SSE2(const uint8* src_argb, const uint8* src_argb1, - uint8* dst_argb, int width); -void ARGBSubtractRow_AVX2(const uint8* src_argb, const uint8* src_argb1, - uint8* dst_argb, int width); -void ARGBSubtractRow_Any_AVX2(const uint8* src_argb, const uint8* src_argb1, - uint8* dst_argb, int width); -void ARGBSubtractRow_NEON(const uint8* src_argb, const uint8* src_argb1, - uint8* dst_argb, int width); -void ARGBSubtractRow_Any_NEON(const uint8* src_argb, const uint8* src_argb1, - uint8* dst_argb, int width); - -void ARGBToRGB24Row_Any_SSSE3(const uint8* src_argb, uint8* dst_rgb, int width); -void ARGBToRAWRow_Any_SSSE3(const uint8* src_argb, uint8* dst_rgb, int width); -void ARGBToRGB565Row_Any_SSE2(const uint8* src_argb, uint8* dst_rgb, int width); -void ARGBToARGB1555Row_Any_SSE2(const uint8* src_argb, uint8* dst_rgb, - int width); -void ARGBToARGB4444Row_Any_SSE2(const uint8* src_argb, uint8* dst_rgb, - int width); - -void ARGBToRGB565DitherRow_Any_SSE2(const uint8* src_argb, uint8* dst_rgb, - const uint32 dither4, int width); -void ARGBToRGB565DitherRow_Any_AVX2(const uint8* src_argb, uint8* dst_rgb, - const uint32 dither4, int width); - -void ARGBToRGB565Row_Any_AVX2(const uint8* src_argb, uint8* dst_rgb, int width); -void ARGBToARGB1555Row_Any_AVX2(const uint8* src_argb, uint8* dst_rgb, - int width); -void ARGBToARGB4444Row_Any_AVX2(const uint8* src_argb, uint8* dst_rgb, - int width); - -void ARGBToRGB24Row_Any_NEON(const uint8* src_argb, uint8* dst_rgb, int width); -void ARGBToRAWRow_Any_NEON(const uint8* src_argb, uint8* dst_rgb, int width); -void ARGBToRGB565Row_Any_NEON(const uint8* src_argb, uint8* dst_rgb, int width); -void ARGBToARGB1555Row_Any_NEON(const uint8* src_argb, uint8* dst_rgb, - int width); -void ARGBToARGB4444Row_Any_NEON(const uint8* src_argb, uint8* dst_rgb, - int width); -void ARGBToRGB565DitherRow_Any_NEON(const uint8* src_argb, uint8* dst_rgb, - const uint32 dither4, int width); - -void I444ToARGBRow_Any_NEON(const uint8* src_y, - const uint8* src_u, - const uint8* src_v, - uint8* dst_argb, - const struct YuvConstants* yuvconstants, - int width); -void I422ToARGBRow_Any_NEON(const uint8* src_y, - const uint8* src_u, - const uint8* src_v, - uint8* dst_argb, - const struct YuvConstants* yuvconstants, - int width); -void I422AlphaToARGBRow_Any_NEON(const uint8* src_y, - const uint8* src_u, - const uint8* src_v, - const uint8* src_a, - uint8* dst_argb, - const struct YuvConstants* yuvconstants, - int width); -void I411ToARGBRow_Any_NEON(const uint8* src_y, - const uint8* src_u, - const uint8* src_v, - uint8* dst_argb, - const struct YuvConstants* yuvconstants, - int width); -void I422ToRGBARow_Any_NEON(const uint8* src_y, - const uint8* src_u, - const uint8* src_v, - uint8* dst_argb, - const struct YuvConstants* yuvconstants, - int width); -void I422ToRGB24Row_Any_NEON(const uint8* src_y, - const uint8* src_u, - const uint8* src_v, - uint8* dst_argb, - const struct YuvConstants* yuvconstants, - int width); -void I422ToARGB4444Row_Any_NEON(const uint8* src_y, - const uint8* src_u, - const uint8* src_v, - uint8* dst_argb, - const struct YuvConstants* yuvconstants, - int width); -void I422ToARGB1555Row_Any_NEON(const uint8* src_y, - const uint8* src_u, - const uint8* src_v, - uint8* dst_argb, - const struct YuvConstants* yuvconstants, - int width); -void I422ToRGB565Row_Any_NEON(const uint8* src_y, - const uint8* src_u, - const uint8* src_v, - uint8* dst_argb, - const struct YuvConstants* yuvconstants, - int width); -void NV12ToARGBRow_Any_NEON(const uint8* src_y, - const uint8* src_uv, - uint8* dst_argb, - const struct YuvConstants* yuvconstants, - int width); -void NV21ToARGBRow_Any_NEON(const uint8* src_y, - const uint8* src_vu, - uint8* dst_argb, - const struct YuvConstants* yuvconstants, - int width); -void NV12ToRGB565Row_Any_NEON(const uint8* src_y, - const uint8* src_uv, - uint8* dst_argb, - const struct YuvConstants* yuvconstants, - int width); -void YUY2ToARGBRow_Any_NEON(const uint8* src_yuy2, - uint8* dst_argb, - const struct YuvConstants* yuvconstants, - int width); -void UYVYToARGBRow_Any_NEON(const uint8* src_uyvy, - uint8* dst_argb, - const struct YuvConstants* yuvconstants, - int width); -void I422ToARGBRow_DSPR2(const uint8* src_y, - const uint8* src_u, - const uint8* src_v, - uint8* dst_argb, - const struct YuvConstants* yuvconstants, - int width); -void I422ToARGBRow_DSPR2(const uint8* src_y, - const uint8* src_u, - const uint8* src_v, - uint8* dst_argb, - const struct YuvConstants* yuvconstants, - int width); - -void YUY2ToYRow_AVX2(const uint8* src_yuy2, uint8* dst_y, int width); -void YUY2ToUVRow_AVX2(const uint8* src_yuy2, int stride_yuy2, - uint8* dst_u, uint8* dst_v, int width); -void YUY2ToUV422Row_AVX2(const uint8* src_yuy2, - uint8* dst_u, uint8* dst_v, int width); -void YUY2ToYRow_SSE2(const uint8* src_yuy2, uint8* dst_y, int width); -void YUY2ToUVRow_SSE2(const uint8* src_yuy2, int stride_yuy2, - uint8* dst_u, uint8* dst_v, int width); -void YUY2ToUV422Row_SSE2(const uint8* src_yuy2, - uint8* dst_u, uint8* dst_v, int width); -void YUY2ToYRow_NEON(const uint8* src_yuy2, uint8* dst_y, int width); -void YUY2ToUVRow_NEON(const uint8* src_yuy2, int stride_yuy2, - uint8* dst_u, uint8* dst_v, int width); -void YUY2ToUV422Row_NEON(const uint8* src_yuy2, - uint8* dst_u, uint8* dst_v, int width); -void YUY2ToYRow_C(const uint8* src_yuy2, uint8* dst_y, int width); -void YUY2ToUVRow_C(const uint8* src_yuy2, int stride_yuy2, - uint8* dst_u, uint8* dst_v, int width); -void YUY2ToUV422Row_C(const uint8* src_yuy2, - uint8* dst_u, uint8* dst_v, int width); -void YUY2ToYRow_Any_AVX2(const uint8* src_yuy2, uint8* dst_y, int width); -void YUY2ToUVRow_Any_AVX2(const uint8* src_yuy2, int stride_yuy2, - uint8* dst_u, uint8* dst_v, int width); -void YUY2ToUV422Row_Any_AVX2(const uint8* src_yuy2, - uint8* dst_u, uint8* dst_v, int width); -void YUY2ToYRow_Any_SSE2(const uint8* src_yuy2, uint8* dst_y, int width); -void YUY2ToUVRow_Any_SSE2(const uint8* src_yuy2, int stride_yuy2, - uint8* dst_u, uint8* dst_v, int width); -void YUY2ToUV422Row_Any_SSE2(const uint8* src_yuy2, - uint8* dst_u, uint8* dst_v, int width); -void YUY2ToYRow_Any_NEON(const uint8* src_yuy2, uint8* dst_y, int width); -void YUY2ToUVRow_Any_NEON(const uint8* src_yuy2, int stride_yuy2, - uint8* dst_u, uint8* dst_v, int width); -void YUY2ToUV422Row_Any_NEON(const uint8* src_yuy2, - uint8* dst_u, uint8* dst_v, int width); -void UYVYToYRow_AVX2(const uint8* src_uyvy, uint8* dst_y, int width); -void UYVYToUVRow_AVX2(const uint8* src_uyvy, int stride_uyvy, - uint8* dst_u, uint8* dst_v, int width); -void UYVYToUV422Row_AVX2(const uint8* src_uyvy, - uint8* dst_u, uint8* dst_v, int width); -void UYVYToYRow_SSE2(const uint8* src_uyvy, uint8* dst_y, int width); -void UYVYToUVRow_SSE2(const uint8* src_uyvy, int stride_uyvy, - uint8* dst_u, uint8* dst_v, int width); -void UYVYToUV422Row_SSE2(const uint8* src_uyvy, - uint8* dst_u, uint8* dst_v, int width); -void UYVYToYRow_AVX2(const uint8* src_uyvy, uint8* dst_y, int width); -void UYVYToUVRow_AVX2(const uint8* src_uyvy, int stride_uyvy, - uint8* dst_u, uint8* dst_v, int width); -void UYVYToUV422Row_AVX2(const uint8* src_uyvy, - uint8* dst_u, uint8* dst_v, int width); -void UYVYToYRow_NEON(const uint8* src_uyvy, uint8* dst_y, int width); -void UYVYToUVRow_NEON(const uint8* src_uyvy, int stride_uyvy, - uint8* dst_u, uint8* dst_v, int width); -void UYVYToUV422Row_NEON(const uint8* src_uyvy, - uint8* dst_u, uint8* dst_v, int width); - -void UYVYToYRow_C(const uint8* src_uyvy, uint8* dst_y, int width); -void UYVYToUVRow_C(const uint8* src_uyvy, int stride_uyvy, - uint8* dst_u, uint8* dst_v, int width); -void UYVYToUV422Row_C(const uint8* src_uyvy, - uint8* dst_u, uint8* dst_v, int width); -void UYVYToYRow_Any_AVX2(const uint8* src_uyvy, uint8* dst_y, int width); -void UYVYToUVRow_Any_AVX2(const uint8* src_uyvy, int stride_uyvy, - uint8* dst_u, uint8* dst_v, int width); -void UYVYToUV422Row_Any_AVX2(const uint8* src_uyvy, - uint8* dst_u, uint8* dst_v, int width); -void UYVYToYRow_Any_SSE2(const uint8* src_uyvy, uint8* dst_y, int width); -void UYVYToUVRow_Any_SSE2(const uint8* src_uyvy, int stride_uyvy, - uint8* dst_u, uint8* dst_v, int width); -void UYVYToUV422Row_Any_SSE2(const uint8* src_uyvy, - uint8* dst_u, uint8* dst_v, int width); -void UYVYToYRow_Any_NEON(const uint8* src_uyvy, uint8* dst_y, int width); -void UYVYToUVRow_Any_NEON(const uint8* src_uyvy, int stride_uyvy, - uint8* dst_u, uint8* dst_v, int width); -void UYVYToUV422Row_Any_NEON(const uint8* src_uyvy, - uint8* dst_u, uint8* dst_v, int width); - -void I422ToYUY2Row_C(const uint8* src_y, - const uint8* src_u, - const uint8* src_v, - uint8* dst_yuy2, int width); -void I422ToUYVYRow_C(const uint8* src_y, - const uint8* src_u, - const uint8* src_v, - uint8* dst_uyvy, int width); -void I422ToYUY2Row_SSE2(const uint8* src_y, - const uint8* src_u, - const uint8* src_v, - uint8* dst_yuy2, int width); -void I422ToUYVYRow_SSE2(const uint8* src_y, - const uint8* src_u, - const uint8* src_v, - uint8* dst_uyvy, int width); -void I422ToYUY2Row_Any_SSE2(const uint8* src_y, - const uint8* src_u, - const uint8* src_v, - uint8* dst_yuy2, int width); -void I422ToUYVYRow_Any_SSE2(const uint8* src_y, - const uint8* src_u, - const uint8* src_v, - uint8* dst_uyvy, int width); -void I422ToYUY2Row_NEON(const uint8* src_y, - const uint8* src_u, - const uint8* src_v, - uint8* dst_yuy2, int width); -void I422ToUYVYRow_NEON(const uint8* src_y, - const uint8* src_u, - const uint8* src_v, - uint8* dst_uyvy, int width); -void I422ToYUY2Row_Any_NEON(const uint8* src_y, - const uint8* src_u, - const uint8* src_v, - uint8* dst_yuy2, int width); -void I422ToUYVYRow_Any_NEON(const uint8* src_y, - const uint8* src_u, - const uint8* src_v, - uint8* dst_uyvy, int width); - -// Effects related row functions. -void ARGBAttenuateRow_C(const uint8* src_argb, uint8* dst_argb, int width); -void ARGBAttenuateRow_SSSE3(const uint8* src_argb, uint8* dst_argb, int width); -void ARGBAttenuateRow_AVX2(const uint8* src_argb, uint8* dst_argb, int width); -void ARGBAttenuateRow_NEON(const uint8* src_argb, uint8* dst_argb, int width); -void ARGBAttenuateRow_Any_SSE2(const uint8* src_argb, uint8* dst_argb, - int width); -void ARGBAttenuateRow_Any_SSSE3(const uint8* src_argb, uint8* dst_argb, - int width); -void ARGBAttenuateRow_Any_AVX2(const uint8* src_argb, uint8* dst_argb, - int width); -void ARGBAttenuateRow_Any_NEON(const uint8* src_argb, uint8* dst_argb, - int width); - -// Inverse table for unattenuate, shared by C and SSE2. -extern const uint32 fixed_invtbl8[256]; -void ARGBUnattenuateRow_C(const uint8* src_argb, uint8* dst_argb, int width); -void ARGBUnattenuateRow_SSE2(const uint8* src_argb, uint8* dst_argb, int width); -void ARGBUnattenuateRow_AVX2(const uint8* src_argb, uint8* dst_argb, int width); -void ARGBUnattenuateRow_Any_SSE2(const uint8* src_argb, uint8* dst_argb, - int width); -void ARGBUnattenuateRow_Any_AVX2(const uint8* src_argb, uint8* dst_argb, - int width); - -void ARGBGrayRow_C(const uint8* src_argb, uint8* dst_argb, int width); -void ARGBGrayRow_SSSE3(const uint8* src_argb, uint8* dst_argb, int width); -void ARGBGrayRow_NEON(const uint8* src_argb, uint8* dst_argb, int width); - -void ARGBSepiaRow_C(uint8* dst_argb, int width); -void ARGBSepiaRow_SSSE3(uint8* dst_argb, int width); -void ARGBSepiaRow_NEON(uint8* dst_argb, int width); - -void ARGBColorMatrixRow_C(const uint8* src_argb, uint8* dst_argb, - const int8* matrix_argb, int width); -void ARGBColorMatrixRow_SSSE3(const uint8* src_argb, uint8* dst_argb, - const int8* matrix_argb, int width); -void ARGBColorMatrixRow_NEON(const uint8* src_argb, uint8* dst_argb, - const int8* matrix_argb, int width); - -void ARGBColorTableRow_C(uint8* dst_argb, const uint8* table_argb, int width); -void ARGBColorTableRow_X86(uint8* dst_argb, const uint8* table_argb, int width); - -void RGBColorTableRow_C(uint8* dst_argb, const uint8* table_argb, int width); -void RGBColorTableRow_X86(uint8* dst_argb, const uint8* table_argb, int width); - -void ARGBQuantizeRow_C(uint8* dst_argb, int scale, int interval_size, - int interval_offset, int width); -void ARGBQuantizeRow_SSE2(uint8* dst_argb, int scale, int interval_size, - int interval_offset, int width); -void ARGBQuantizeRow_NEON(uint8* dst_argb, int scale, int interval_size, - int interval_offset, int width); - -void ARGBShadeRow_C(const uint8* src_argb, uint8* dst_argb, int width, - uint32 value); -void ARGBShadeRow_SSE2(const uint8* src_argb, uint8* dst_argb, int width, - uint32 value); -void ARGBShadeRow_NEON(const uint8* src_argb, uint8* dst_argb, int width, - uint32 value); - -// Used for blur. -void CumulativeSumToAverageRow_SSE2(const int32* topleft, const int32* botleft, - int width, int area, uint8* dst, int count); -void ComputeCumulativeSumRow_SSE2(const uint8* row, int32* cumsum, - const int32* previous_cumsum, int width); - -void CumulativeSumToAverageRow_C(const int32* topleft, const int32* botleft, - int width, int area, uint8* dst, int count); -void ComputeCumulativeSumRow_C(const uint8* row, int32* cumsum, - const int32* previous_cumsum, int width); - -LIBYUV_API -void ARGBAffineRow_C(const uint8* src_argb, int src_argb_stride, - uint8* dst_argb, const float* uv_dudv, int width); -LIBYUV_API -void ARGBAffineRow_SSE2(const uint8* src_argb, int src_argb_stride, - uint8* dst_argb, const float* uv_dudv, int width); - -// Used for I420Scale, ARGBScale, and ARGBInterpolate. -void InterpolateRow_C(uint8* dst_ptr, const uint8* src_ptr, - ptrdiff_t src_stride_ptr, - int width, int source_y_fraction); -void InterpolateRow_SSSE3(uint8* dst_ptr, const uint8* src_ptr, - ptrdiff_t src_stride_ptr, int width, - int source_y_fraction); -void InterpolateRow_AVX2(uint8* dst_ptr, const uint8* src_ptr, - ptrdiff_t src_stride_ptr, int width, - int source_y_fraction); -void InterpolateRow_NEON(uint8* dst_ptr, const uint8* src_ptr, - ptrdiff_t src_stride_ptr, int width, - int source_y_fraction); -void InterpolateRow_DSPR2(uint8* dst_ptr, const uint8* src_ptr, - ptrdiff_t src_stride_ptr, int width, - int source_y_fraction); -void InterpolateRow_Any_NEON(uint8* dst_ptr, const uint8* src_ptr, - ptrdiff_t src_stride_ptr, int width, - int source_y_fraction); -void InterpolateRow_Any_SSSE3(uint8* dst_ptr, const uint8* src_ptr, - ptrdiff_t src_stride_ptr, int width, - int source_y_fraction); -void InterpolateRow_Any_AVX2(uint8* dst_ptr, const uint8* src_ptr, - ptrdiff_t src_stride_ptr, int width, - int source_y_fraction); -void InterpolateRow_Any_DSPR2(uint8* dst_ptr, const uint8* src_ptr, - ptrdiff_t src_stride_ptr, int width, - int source_y_fraction); - -void InterpolateRow_16_C(uint16* dst_ptr, const uint16* src_ptr, - ptrdiff_t src_stride_ptr, - int width, int source_y_fraction); - -// Sobel images. -void SobelXRow_C(const uint8* src_y0, const uint8* src_y1, const uint8* src_y2, - uint8* dst_sobelx, int width); -void SobelXRow_SSE2(const uint8* src_y0, const uint8* src_y1, - const uint8* src_y2, uint8* dst_sobelx, int width); -void SobelXRow_NEON(const uint8* src_y0, const uint8* src_y1, - const uint8* src_y2, uint8* dst_sobelx, int width); -void SobelYRow_C(const uint8* src_y0, const uint8* src_y1, - uint8* dst_sobely, int width); -void SobelYRow_SSE2(const uint8* src_y0, const uint8* src_y1, - uint8* dst_sobely, int width); -void SobelYRow_NEON(const uint8* src_y0, const uint8* src_y1, - uint8* dst_sobely, int width); -void SobelRow_C(const uint8* src_sobelx, const uint8* src_sobely, - uint8* dst_argb, int width); -void SobelRow_SSE2(const uint8* src_sobelx, const uint8* src_sobely, - uint8* dst_argb, int width); -void SobelRow_NEON(const uint8* src_sobelx, const uint8* src_sobely, - uint8* dst_argb, int width); -void SobelToPlaneRow_C(const uint8* src_sobelx, const uint8* src_sobely, - uint8* dst_y, int width); -void SobelToPlaneRow_SSE2(const uint8* src_sobelx, const uint8* src_sobely, - uint8* dst_y, int width); -void SobelToPlaneRow_NEON(const uint8* src_sobelx, const uint8* src_sobely, - uint8* dst_y, int width); -void SobelXYRow_C(const uint8* src_sobelx, const uint8* src_sobely, - uint8* dst_argb, int width); -void SobelXYRow_SSE2(const uint8* src_sobelx, const uint8* src_sobely, - uint8* dst_argb, int width); -void SobelXYRow_NEON(const uint8* src_sobelx, const uint8* src_sobely, - uint8* dst_argb, int width); -void SobelRow_Any_SSE2(const uint8* src_sobelx, const uint8* src_sobely, - uint8* dst_argb, int width); -void SobelRow_Any_NEON(const uint8* src_sobelx, const uint8* src_sobely, - uint8* dst_argb, int width); -void SobelToPlaneRow_Any_SSE2(const uint8* src_sobelx, const uint8* src_sobely, - uint8* dst_y, int width); -void SobelToPlaneRow_Any_NEON(const uint8* src_sobelx, const uint8* src_sobely, - uint8* dst_y, int width); -void SobelXYRow_Any_SSE2(const uint8* src_sobelx, const uint8* src_sobely, - uint8* dst_argb, int width); -void SobelXYRow_Any_NEON(const uint8* src_sobelx, const uint8* src_sobely, - uint8* dst_argb, int width); - -void ARGBPolynomialRow_C(const uint8* src_argb, - uint8* dst_argb, const float* poly, - int width); -void ARGBPolynomialRow_SSE2(const uint8* src_argb, - uint8* dst_argb, const float* poly, - int width); -void ARGBPolynomialRow_AVX2(const uint8* src_argb, - uint8* dst_argb, const float* poly, - int width); - -void ARGBLumaColorTableRow_C(const uint8* src_argb, uint8* dst_argb, int width, - const uint8* luma, uint32 lumacoeff); -void ARGBLumaColorTableRow_SSSE3(const uint8* src_argb, uint8* dst_argb, - int width, - const uint8* luma, uint32 lumacoeff); - -#ifdef __cplusplus -} // extern "C" -} // namespace libyuv -#endif - -#endif // INCLUDE_LIBYUV_ROW_H_ NOLINT diff --git a/WebRtc.NET/include/third_party/libvpx/source/libvpx/third_party/libyuv/include/libyuv/scale.h b/WebRtc.NET/include/third_party/libvpx/source/libvpx/third_party/libyuv/include/libyuv/scale.h deleted file mode 100644 index 102158d1..00000000 --- a/WebRtc.NET/include/third_party/libvpx/source/libvpx/third_party/libyuv/include/libyuv/scale.h +++ /dev/null @@ -1,103 +0,0 @@ -/* - * Copyright 2011 The LibYuv Project Authors. All rights reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef INCLUDE_LIBYUV_SCALE_H_ // NOLINT -#define INCLUDE_LIBYUV_SCALE_H_ - -#include "libyuv/basic_types.h" - -#ifdef __cplusplus -namespace libyuv { -extern "C" { -#endif - -// Supported filtering. -typedef enum FilterMode { - kFilterNone = 0, // Point sample; Fastest. - kFilterLinear = 1, // Filter horizontally only. - kFilterBilinear = 2, // Faster than box, but lower quality scaling down. - kFilterBox = 3 // Highest quality. -} FilterModeEnum; - -// Scale a YUV plane. -LIBYUV_API -void ScalePlane(const uint8* src, int src_stride, - int src_width, int src_height, - uint8* dst, int dst_stride, - int dst_width, int dst_height, - enum FilterMode filtering); - -LIBYUV_API -void ScalePlane_16(const uint16* src, int src_stride, - int src_width, int src_height, - uint16* dst, int dst_stride, - int dst_width, int dst_height, - enum FilterMode filtering); - -// Scales a YUV 4:2:0 image from the src width and height to the -// dst width and height. -// If filtering is kFilterNone, a simple nearest-neighbor algorithm is -// used. This produces basic (blocky) quality at the fastest speed. -// If filtering is kFilterBilinear, interpolation is used to produce a better -// quality image, at the expense of speed. -// If filtering is kFilterBox, averaging is used to produce ever better -// quality image, at further expense of speed. -// Returns 0 if successful. - -LIBYUV_API -int I420Scale(const uint8* src_y, int src_stride_y, - const uint8* src_u, int src_stride_u, - const uint8* src_v, int src_stride_v, - int src_width, int src_height, - uint8* dst_y, int dst_stride_y, - uint8* dst_u, int dst_stride_u, - uint8* dst_v, int dst_stride_v, - int dst_width, int dst_height, - enum FilterMode filtering); - -LIBYUV_API -int I420Scale_16(const uint16* src_y, int src_stride_y, - const uint16* src_u, int src_stride_u, - const uint16* src_v, int src_stride_v, - int src_width, int src_height, - uint16* dst_y, int dst_stride_y, - uint16* dst_u, int dst_stride_u, - uint16* dst_v, int dst_stride_v, - int dst_width, int dst_height, - enum FilterMode filtering); - -#ifdef __cplusplus -// Legacy API. Deprecated. -LIBYUV_API -int Scale(const uint8* src_y, const uint8* src_u, const uint8* src_v, - int src_stride_y, int src_stride_u, int src_stride_v, - int src_width, int src_height, - uint8* dst_y, uint8* dst_u, uint8* dst_v, - int dst_stride_y, int dst_stride_u, int dst_stride_v, - int dst_width, int dst_height, - LIBYUV_BOOL interpolate); - -// Legacy API. Deprecated. -LIBYUV_API -int ScaleOffset(const uint8* src_i420, int src_width, int src_height, - uint8* dst_i420, int dst_width, int dst_height, int dst_yoffset, - LIBYUV_BOOL interpolate); - -// For testing, allow disabling of specialized scalers. -LIBYUV_API -void SetUseReferenceImpl(LIBYUV_BOOL use); -#endif // __cplusplus - -#ifdef __cplusplus -} // extern "C" -} // namespace libyuv -#endif - -#endif // INCLUDE_LIBYUV_SCALE_H_ NOLINT diff --git a/WebRtc.NET/include/third_party/libvpx/source/libvpx/third_party/libyuv/include/libyuv/scale_argb.h b/WebRtc.NET/include/third_party/libvpx/source/libvpx/third_party/libyuv/include/libyuv/scale_argb.h deleted file mode 100644 index b56cf520..00000000 --- a/WebRtc.NET/include/third_party/libvpx/source/libvpx/third_party/libyuv/include/libyuv/scale_argb.h +++ /dev/null @@ -1,56 +0,0 @@ -/* - * Copyright 2012 The LibYuv Project Authors. All rights reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef INCLUDE_LIBYUV_SCALE_ARGB_H_ // NOLINT -#define INCLUDE_LIBYUV_SCALE_ARGB_H_ - -#include "libyuv/basic_types.h" -#include "libyuv/scale.h" // For FilterMode - -#ifdef __cplusplus -namespace libyuv { -extern "C" { -#endif - -LIBYUV_API -int ARGBScale(const uint8* src_argb, int src_stride_argb, - int src_width, int src_height, - uint8* dst_argb, int dst_stride_argb, - int dst_width, int dst_height, - enum FilterMode filtering); - -// Clipped scale takes destination rectangle coordinates for clip values. -LIBYUV_API -int ARGBScaleClip(const uint8* src_argb, int src_stride_argb, - int src_width, int src_height, - uint8* dst_argb, int dst_stride_argb, - int dst_width, int dst_height, - int clip_x, int clip_y, int clip_width, int clip_height, - enum FilterMode filtering); - -// Scale with YUV conversion to ARGB and clipping. -LIBYUV_API -int YUVToARGBScaleClip(const uint8* src_y, int src_stride_y, - const uint8* src_u, int src_stride_u, - const uint8* src_v, int src_stride_v, - uint32 src_fourcc, - int src_width, int src_height, - uint8* dst_argb, int dst_stride_argb, - uint32 dst_fourcc, - int dst_width, int dst_height, - int clip_x, int clip_y, int clip_width, int clip_height, - enum FilterMode filtering); - -#ifdef __cplusplus -} // extern "C" -} // namespace libyuv -#endif - -#endif // INCLUDE_LIBYUV_SCALE_ARGB_H_ NOLINT diff --git a/WebRtc.NET/include/third_party/libvpx/source/libvpx/third_party/libyuv/include/libyuv/scale_row.h b/WebRtc.NET/include/third_party/libvpx/source/libvpx/third_party/libyuv/include/libyuv/scale_row.h deleted file mode 100644 index df699e6c..00000000 --- a/WebRtc.NET/include/third_party/libvpx/source/libvpx/third_party/libyuv/include/libyuv/scale_row.h +++ /dev/null @@ -1,503 +0,0 @@ -/* - * Copyright 2013 The LibYuv Project Authors. All rights reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef INCLUDE_LIBYUV_SCALE_ROW_H_ // NOLINT -#define INCLUDE_LIBYUV_SCALE_ROW_H_ - -#include "libyuv/basic_types.h" -#include "libyuv/scale.h" - -#ifdef __cplusplus -namespace libyuv { -extern "C" { -#endif - -#if defined(__pnacl__) || defined(__CLR_VER) || \ - (defined(__i386__) && !defined(__SSE2__)) -#define LIBYUV_DISABLE_X86 -#endif -// MemorySanitizer does not support assembly code yet. http://crbug.com/344505 -#if defined(__has_feature) -#if __has_feature(memory_sanitizer) -#define LIBYUV_DISABLE_X86 -#endif -#endif - -// GCC >= 4.7.0 required for AVX2. -#if defined(__GNUC__) && (defined(__x86_64__) || defined(__i386__)) -#if (__GNUC__ > 4) || (__GNUC__ == 4 && (__GNUC_MINOR__ >= 7)) -#define GCC_HAS_AVX2 1 -#endif // GNUC >= 4.7 -#endif // __GNUC__ - -// clang >= 3.4.0 required for AVX2. -#if defined(__clang__) && (defined(__x86_64__) || defined(__i386__)) -#if (__clang_major__ > 3) || (__clang_major__ == 3 && (__clang_minor__ >= 4)) -#define CLANG_HAS_AVX2 1 -#endif // clang >= 3.4 -#endif // __clang__ - -// Visual C 2012 required for AVX2. -#if defined(_M_IX86) && !defined(__clang__) && \ - defined(_MSC_VER) && _MSC_VER >= 1700 -#define VISUALC_HAS_AVX2 1 -#endif // VisualStudio >= 2012 - -// The following are available on all x86 platforms: -#if !defined(LIBYUV_DISABLE_X86) && \ - (defined(_M_IX86) || defined(__x86_64__) || defined(__i386__)) -#define HAS_FIXEDDIV1_X86 -#define HAS_FIXEDDIV_X86 -#define HAS_SCALEARGBCOLS_SSE2 -#define HAS_SCALEARGBCOLSUP2_SSE2 -#define HAS_SCALEARGBFILTERCOLS_SSSE3 -#define HAS_SCALEARGBROWDOWN2_SSE2 -#define HAS_SCALEARGBROWDOWNEVEN_SSE2 -#define HAS_SCALECOLSUP2_SSE2 -#define HAS_SCALEFILTERCOLS_SSSE3 -#define HAS_SCALEROWDOWN2_SSSE3 -#define HAS_SCALEROWDOWN34_SSSE3 -#define HAS_SCALEROWDOWN38_SSSE3 -#define HAS_SCALEROWDOWN4_SSSE3 -#define HAS_SCALEADDROW_SSE2 -#endif - -// The following are available on all x86 platforms, but -// require VS2012, clang 3.4 or gcc 4.7. -// The code supports NaCL but requires a new compiler and validator. -#if !defined(LIBYUV_DISABLE_X86) && (defined(VISUALC_HAS_AVX2) || \ - defined(CLANG_HAS_AVX2) || defined(GCC_HAS_AVX2)) -#define HAS_SCALEADDROW_AVX2 -#define HAS_SCALEROWDOWN2_AVX2 -#define HAS_SCALEROWDOWN4_AVX2 -#endif - -// The following are available on Neon platforms: -#if !defined(LIBYUV_DISABLE_NEON) && !defined(__native_client__) && \ - (defined(__ARM_NEON__) || defined(LIBYUV_NEON) || defined(__aarch64__)) -#define HAS_SCALEARGBCOLS_NEON -#define HAS_SCALEARGBROWDOWN2_NEON -#define HAS_SCALEARGBROWDOWNEVEN_NEON -#define HAS_SCALEFILTERCOLS_NEON -#define HAS_SCALEROWDOWN2_NEON -#define HAS_SCALEROWDOWN34_NEON -#define HAS_SCALEROWDOWN38_NEON -#define HAS_SCALEROWDOWN4_NEON -#define HAS_SCALEARGBFILTERCOLS_NEON -#endif - -// The following are available on Mips platforms: -#if !defined(LIBYUV_DISABLE_MIPS) && !defined(__native_client__) && \ - defined(__mips__) && defined(__mips_dsp) && (__mips_dsp_rev >= 2) -#define HAS_SCALEROWDOWN2_DSPR2 -#define HAS_SCALEROWDOWN4_DSPR2 -#define HAS_SCALEROWDOWN34_DSPR2 -#define HAS_SCALEROWDOWN38_DSPR2 -#endif - -// Scale ARGB vertically with bilinear interpolation. -void ScalePlaneVertical(int src_height, - int dst_width, int dst_height, - int src_stride, int dst_stride, - const uint8* src_argb, uint8* dst_argb, - int x, int y, int dy, - int bpp, enum FilterMode filtering); - -void ScalePlaneVertical_16(int src_height, - int dst_width, int dst_height, - int src_stride, int dst_stride, - const uint16* src_argb, uint16* dst_argb, - int x, int y, int dy, - int wpp, enum FilterMode filtering); - -// Simplify the filtering based on scale factors. -enum FilterMode ScaleFilterReduce(int src_width, int src_height, - int dst_width, int dst_height, - enum FilterMode filtering); - -// Divide num by div and return as 16.16 fixed point result. -int FixedDiv_C(int num, int div); -int FixedDiv_X86(int num, int div); -// Divide num - 1 by div - 1 and return as 16.16 fixed point result. -int FixedDiv1_C(int num, int div); -int FixedDiv1_X86(int num, int div); -#ifdef HAS_FIXEDDIV_X86 -#define FixedDiv FixedDiv_X86 -#define FixedDiv1 FixedDiv1_X86 -#else -#define FixedDiv FixedDiv_C -#define FixedDiv1 FixedDiv1_C -#endif - -// Compute slope values for stepping. -void ScaleSlope(int src_width, int src_height, - int dst_width, int dst_height, - enum FilterMode filtering, - int* x, int* y, int* dx, int* dy); - -void ScaleRowDown2_C(const uint8* src_ptr, ptrdiff_t src_stride, - uint8* dst, int dst_width); -void ScaleRowDown2_16_C(const uint16* src_ptr, ptrdiff_t src_stride, - uint16* dst, int dst_width); -void ScaleRowDown2Linear_C(const uint8* src_ptr, ptrdiff_t src_stride, - uint8* dst, int dst_width); -void ScaleRowDown2Linear_16_C(const uint16* src_ptr, ptrdiff_t src_stride, - uint16* dst, int dst_width); -void ScaleRowDown2Box_C(const uint8* src_ptr, ptrdiff_t src_stride, - uint8* dst, int dst_width); -void ScaleRowDown2Box_Odd_C(const uint8* src_ptr, ptrdiff_t src_stride, - uint8* dst, int dst_width); -void ScaleRowDown2Box_16_C(const uint16* src_ptr, ptrdiff_t src_stride, - uint16* dst, int dst_width); -void ScaleRowDown4_C(const uint8* src_ptr, ptrdiff_t src_stride, - uint8* dst, int dst_width); -void ScaleRowDown4_16_C(const uint16* src_ptr, ptrdiff_t src_stride, - uint16* dst, int dst_width); -void ScaleRowDown4Box_C(const uint8* src_ptr, ptrdiff_t src_stride, - uint8* dst, int dst_width); -void ScaleRowDown4Box_16_C(const uint16* src_ptr, ptrdiff_t src_stride, - uint16* dst, int dst_width); -void ScaleRowDown34_C(const uint8* src_ptr, ptrdiff_t src_stride, - uint8* dst, int dst_width); -void ScaleRowDown34_16_C(const uint16* src_ptr, ptrdiff_t src_stride, - uint16* dst, int dst_width); -void ScaleRowDown34_0_Box_C(const uint8* src_ptr, ptrdiff_t src_stride, - uint8* d, int dst_width); -void ScaleRowDown34_0_Box_16_C(const uint16* src_ptr, ptrdiff_t src_stride, - uint16* d, int dst_width); -void ScaleRowDown34_1_Box_C(const uint8* src_ptr, ptrdiff_t src_stride, - uint8* d, int dst_width); -void ScaleRowDown34_1_Box_16_C(const uint16* src_ptr, ptrdiff_t src_stride, - uint16* d, int dst_width); -void ScaleCols_C(uint8* dst_ptr, const uint8* src_ptr, - int dst_width, int x, int dx); -void ScaleCols_16_C(uint16* dst_ptr, const uint16* src_ptr, - int dst_width, int x, int dx); -void ScaleColsUp2_C(uint8* dst_ptr, const uint8* src_ptr, - int dst_width, int, int); -void ScaleColsUp2_16_C(uint16* dst_ptr, const uint16* src_ptr, - int dst_width, int, int); -void ScaleFilterCols_C(uint8* dst_ptr, const uint8* src_ptr, - int dst_width, int x, int dx); -void ScaleFilterCols_16_C(uint16* dst_ptr, const uint16* src_ptr, - int dst_width, int x, int dx); -void ScaleFilterCols64_C(uint8* dst_ptr, const uint8* src_ptr, - int dst_width, int x, int dx); -void ScaleFilterCols64_16_C(uint16* dst_ptr, const uint16* src_ptr, - int dst_width, int x, int dx); -void ScaleRowDown38_C(const uint8* src_ptr, ptrdiff_t src_stride, - uint8* dst, int dst_width); -void ScaleRowDown38_16_C(const uint16* src_ptr, ptrdiff_t src_stride, - uint16* dst, int dst_width); -void ScaleRowDown38_3_Box_C(const uint8* src_ptr, - ptrdiff_t src_stride, - uint8* dst_ptr, int dst_width); -void ScaleRowDown38_3_Box_16_C(const uint16* src_ptr, - ptrdiff_t src_stride, - uint16* dst_ptr, int dst_width); -void ScaleRowDown38_2_Box_C(const uint8* src_ptr, ptrdiff_t src_stride, - uint8* dst_ptr, int dst_width); -void ScaleRowDown38_2_Box_16_C(const uint16* src_ptr, ptrdiff_t src_stride, - uint16* dst_ptr, int dst_width); -void ScaleAddRow_C(const uint8* src_ptr, uint16* dst_ptr, int src_width); -void ScaleAddRow_16_C(const uint16* src_ptr, uint32* dst_ptr, int src_width); -void ScaleARGBRowDown2_C(const uint8* src_argb, - ptrdiff_t src_stride, - uint8* dst_argb, int dst_width); -void ScaleARGBRowDown2Linear_C(const uint8* src_argb, - ptrdiff_t src_stride, - uint8* dst_argb, int dst_width); -void ScaleARGBRowDown2Box_C(const uint8* src_argb, ptrdiff_t src_stride, - uint8* dst_argb, int dst_width); -void ScaleARGBRowDownEven_C(const uint8* src_argb, ptrdiff_t src_stride, - int src_stepx, - uint8* dst_argb, int dst_width); -void ScaleARGBRowDownEvenBox_C(const uint8* src_argb, - ptrdiff_t src_stride, - int src_stepx, - uint8* dst_argb, int dst_width); -void ScaleARGBCols_C(uint8* dst_argb, const uint8* src_argb, - int dst_width, int x, int dx); -void ScaleARGBCols64_C(uint8* dst_argb, const uint8* src_argb, - int dst_width, int x, int dx); -void ScaleARGBColsUp2_C(uint8* dst_argb, const uint8* src_argb, - int dst_width, int, int); -void ScaleARGBFilterCols_C(uint8* dst_argb, const uint8* src_argb, - int dst_width, int x, int dx); -void ScaleARGBFilterCols64_C(uint8* dst_argb, const uint8* src_argb, - int dst_width, int x, int dx); - -// Specialized scalers for x86. -void ScaleRowDown2_SSSE3(const uint8* src_ptr, ptrdiff_t src_stride, - uint8* dst_ptr, int dst_width); -void ScaleRowDown2Linear_SSSE3(const uint8* src_ptr, ptrdiff_t src_stride, - uint8* dst_ptr, int dst_width); -void ScaleRowDown2Box_SSSE3(const uint8* src_ptr, ptrdiff_t src_stride, - uint8* dst_ptr, int dst_width); -void ScaleRowDown2_AVX2(const uint8* src_ptr, ptrdiff_t src_stride, - uint8* dst_ptr, int dst_width); -void ScaleRowDown2Linear_AVX2(const uint8* src_ptr, ptrdiff_t src_stride, - uint8* dst_ptr, int dst_width); -void ScaleRowDown2Box_AVX2(const uint8* src_ptr, ptrdiff_t src_stride, - uint8* dst_ptr, int dst_width); -void ScaleRowDown4_SSSE3(const uint8* src_ptr, ptrdiff_t src_stride, - uint8* dst_ptr, int dst_width); -void ScaleRowDown4Box_SSSE3(const uint8* src_ptr, ptrdiff_t src_stride, - uint8* dst_ptr, int dst_width); -void ScaleRowDown4_AVX2(const uint8* src_ptr, ptrdiff_t src_stride, - uint8* dst_ptr, int dst_width); -void ScaleRowDown4Box_AVX2(const uint8* src_ptr, ptrdiff_t src_stride, - uint8* dst_ptr, int dst_width); - -void ScaleRowDown34_SSSE3(const uint8* src_ptr, ptrdiff_t src_stride, - uint8* dst_ptr, int dst_width); -void ScaleRowDown34_1_Box_SSSE3(const uint8* src_ptr, - ptrdiff_t src_stride, - uint8* dst_ptr, int dst_width); -void ScaleRowDown34_0_Box_SSSE3(const uint8* src_ptr, - ptrdiff_t src_stride, - uint8* dst_ptr, int dst_width); -void ScaleRowDown38_SSSE3(const uint8* src_ptr, ptrdiff_t src_stride, - uint8* dst_ptr, int dst_width); -void ScaleRowDown38_3_Box_SSSE3(const uint8* src_ptr, - ptrdiff_t src_stride, - uint8* dst_ptr, int dst_width); -void ScaleRowDown38_2_Box_SSSE3(const uint8* src_ptr, - ptrdiff_t src_stride, - uint8* dst_ptr, int dst_width); -void ScaleRowDown2_Any_SSSE3(const uint8* src_ptr, ptrdiff_t src_stride, - uint8* dst_ptr, int dst_width); -void ScaleRowDown2Linear_Any_SSSE3(const uint8* src_ptr, ptrdiff_t src_stride, - uint8* dst_ptr, int dst_width); -void ScaleRowDown2Box_Any_SSSE3(const uint8* src_ptr, ptrdiff_t src_stride, - uint8* dst_ptr, int dst_width); -void ScaleRowDown2Box_Odd_SSSE3(const uint8* src_ptr, ptrdiff_t src_stride, - uint8* dst_ptr, int dst_width); -void ScaleRowDown2_Any_AVX2(const uint8* src_ptr, ptrdiff_t src_stride, - uint8* dst_ptr, int dst_width); -void ScaleRowDown2Linear_Any_AVX2(const uint8* src_ptr, ptrdiff_t src_stride, - uint8* dst_ptr, int dst_width); -void ScaleRowDown2Box_Any_AVX2(const uint8* src_ptr, ptrdiff_t src_stride, - uint8* dst_ptr, int dst_width); -void ScaleRowDown2Box_Odd_AVX2(const uint8* src_ptr, ptrdiff_t src_stride, - uint8* dst_ptr, int dst_width); -void ScaleRowDown4_Any_SSSE3(const uint8* src_ptr, ptrdiff_t src_stride, - uint8* dst_ptr, int dst_width); -void ScaleRowDown4Box_Any_SSSE3(const uint8* src_ptr, ptrdiff_t src_stride, - uint8* dst_ptr, int dst_width); -void ScaleRowDown4_Any_AVX2(const uint8* src_ptr, ptrdiff_t src_stride, - uint8* dst_ptr, int dst_width); -void ScaleRowDown4Box_Any_AVX2(const uint8* src_ptr, ptrdiff_t src_stride, - uint8* dst_ptr, int dst_width); - -void ScaleRowDown34_Any_SSSE3(const uint8* src_ptr, ptrdiff_t src_stride, - uint8* dst_ptr, int dst_width); -void ScaleRowDown34_1_Box_Any_SSSE3(const uint8* src_ptr, - ptrdiff_t src_stride, - uint8* dst_ptr, int dst_width); -void ScaleRowDown34_0_Box_Any_SSSE3(const uint8* src_ptr, - ptrdiff_t src_stride, - uint8* dst_ptr, int dst_width); -void ScaleRowDown38_Any_SSSE3(const uint8* src_ptr, ptrdiff_t src_stride, - uint8* dst_ptr, int dst_width); -void ScaleRowDown38_3_Box_Any_SSSE3(const uint8* src_ptr, - ptrdiff_t src_stride, - uint8* dst_ptr, int dst_width); -void ScaleRowDown38_2_Box_Any_SSSE3(const uint8* src_ptr, - ptrdiff_t src_stride, - uint8* dst_ptr, int dst_width); - -void ScaleAddRow_SSE2(const uint8* src_ptr, uint16* dst_ptr, int src_width); -void ScaleAddRow_AVX2(const uint8* src_ptr, uint16* dst_ptr, int src_width); -void ScaleAddRow_Any_SSE2(const uint8* src_ptr, uint16* dst_ptr, int src_width); -void ScaleAddRow_Any_AVX2(const uint8* src_ptr, uint16* dst_ptr, int src_width); - -void ScaleFilterCols_SSSE3(uint8* dst_ptr, const uint8* src_ptr, - int dst_width, int x, int dx); -void ScaleColsUp2_SSE2(uint8* dst_ptr, const uint8* src_ptr, - int dst_width, int x, int dx); - - -// ARGB Column functions -void ScaleARGBCols_SSE2(uint8* dst_argb, const uint8* src_argb, - int dst_width, int x, int dx); -void ScaleARGBFilterCols_SSSE3(uint8* dst_argb, const uint8* src_argb, - int dst_width, int x, int dx); -void ScaleARGBColsUp2_SSE2(uint8* dst_argb, const uint8* src_argb, - int dst_width, int x, int dx); -void ScaleARGBFilterCols_NEON(uint8* dst_argb, const uint8* src_argb, - int dst_width, int x, int dx); -void ScaleARGBCols_NEON(uint8* dst_argb, const uint8* src_argb, - int dst_width, int x, int dx); -void ScaleARGBFilterCols_Any_NEON(uint8* dst_argb, const uint8* src_argb, - int dst_width, int x, int dx); -void ScaleARGBCols_Any_NEON(uint8* dst_argb, const uint8* src_argb, - int dst_width, int x, int dx); - -// ARGB Row functions -void ScaleARGBRowDown2_SSE2(const uint8* src_argb, ptrdiff_t src_stride, - uint8* dst_argb, int dst_width); -void ScaleARGBRowDown2Linear_SSE2(const uint8* src_argb, ptrdiff_t src_stride, - uint8* dst_argb, int dst_width); -void ScaleARGBRowDown2Box_SSE2(const uint8* src_argb, ptrdiff_t src_stride, - uint8* dst_argb, int dst_width); -void ScaleARGBRowDown2_NEON(const uint8* src_ptr, ptrdiff_t src_stride, - uint8* dst, int dst_width); -void ScaleARGBRowDown2Linear_NEON(const uint8* src_argb, ptrdiff_t src_stride, - uint8* dst_argb, int dst_width); -void ScaleARGBRowDown2Box_NEON(const uint8* src_ptr, ptrdiff_t src_stride, - uint8* dst, int dst_width); -void ScaleARGBRowDown2_Any_SSE2(const uint8* src_argb, ptrdiff_t src_stride, - uint8* dst_argb, int dst_width); -void ScaleARGBRowDown2Linear_Any_SSE2(const uint8* src_argb, - ptrdiff_t src_stride, - uint8* dst_argb, int dst_width); -void ScaleARGBRowDown2Box_Any_SSE2(const uint8* src_argb, ptrdiff_t src_stride, - uint8* dst_argb, int dst_width); -void ScaleARGBRowDown2_Any_NEON(const uint8* src_ptr, ptrdiff_t src_stride, - uint8* dst, int dst_width); -void ScaleARGBRowDown2Linear_Any_NEON(const uint8* src_argb, - ptrdiff_t src_stride, - uint8* dst_argb, int dst_width); -void ScaleARGBRowDown2Box_Any_NEON(const uint8* src_ptr, ptrdiff_t src_stride, - uint8* dst, int dst_width); - -void ScaleARGBRowDownEven_SSE2(const uint8* src_argb, ptrdiff_t src_stride, - int src_stepx, uint8* dst_argb, int dst_width); -void ScaleARGBRowDownEvenBox_SSE2(const uint8* src_argb, ptrdiff_t src_stride, - int src_stepx, - uint8* dst_argb, int dst_width); -void ScaleARGBRowDownEven_NEON(const uint8* src_argb, ptrdiff_t src_stride, - int src_stepx, - uint8* dst_argb, int dst_width); -void ScaleARGBRowDownEvenBox_NEON(const uint8* src_argb, ptrdiff_t src_stride, - int src_stepx, - uint8* dst_argb, int dst_width); -void ScaleARGBRowDownEven_Any_SSE2(const uint8* src_argb, ptrdiff_t src_stride, - int src_stepx, - uint8* dst_argb, int dst_width); -void ScaleARGBRowDownEvenBox_Any_SSE2(const uint8* src_argb, - ptrdiff_t src_stride, - int src_stepx, - uint8* dst_argb, int dst_width); -void ScaleARGBRowDownEven_Any_NEON(const uint8* src_argb, ptrdiff_t src_stride, - int src_stepx, - uint8* dst_argb, int dst_width); -void ScaleARGBRowDownEvenBox_Any_NEON(const uint8* src_argb, - ptrdiff_t src_stride, - int src_stepx, - uint8* dst_argb, int dst_width); - -// ScaleRowDown2Box also used by planar functions -// NEON downscalers with interpolation. - -// Note - not static due to reuse in convert for 444 to 420. -void ScaleRowDown2_NEON(const uint8* src_ptr, ptrdiff_t src_stride, - uint8* dst, int dst_width); -void ScaleRowDown2Linear_NEON(const uint8* src_ptr, ptrdiff_t src_stride, - uint8* dst, int dst_width); -void ScaleRowDown2Box_NEON(const uint8* src_ptr, ptrdiff_t src_stride, - uint8* dst, int dst_width); - -void ScaleRowDown4_NEON(const uint8* src_ptr, ptrdiff_t src_stride, - uint8* dst_ptr, int dst_width); -void ScaleRowDown4Box_NEON(const uint8* src_ptr, ptrdiff_t src_stride, - uint8* dst_ptr, int dst_width); - -// Down scale from 4 to 3 pixels. Use the neon multilane read/write -// to load up the every 4th pixel into a 4 different registers. -// Point samples 32 pixels to 24 pixels. -void ScaleRowDown34_NEON(const uint8* src_ptr, - ptrdiff_t src_stride, - uint8* dst_ptr, int dst_width); -void ScaleRowDown34_0_Box_NEON(const uint8* src_ptr, - ptrdiff_t src_stride, - uint8* dst_ptr, int dst_width); -void ScaleRowDown34_1_Box_NEON(const uint8* src_ptr, - ptrdiff_t src_stride, - uint8* dst_ptr, int dst_width); - -// 32 -> 12 -void ScaleRowDown38_NEON(const uint8* src_ptr, - ptrdiff_t src_stride, - uint8* dst_ptr, int dst_width); -// 32x3 -> 12x1 -void ScaleRowDown38_3_Box_NEON(const uint8* src_ptr, - ptrdiff_t src_stride, - uint8* dst_ptr, int dst_width); -// 32x2 -> 12x1 -void ScaleRowDown38_2_Box_NEON(const uint8* src_ptr, - ptrdiff_t src_stride, - uint8* dst_ptr, int dst_width); - -void ScaleRowDown2_Any_NEON(const uint8* src_ptr, ptrdiff_t src_stride, - uint8* dst, int dst_width); -void ScaleRowDown2Linear_Any_NEON(const uint8* src_ptr, ptrdiff_t src_stride, - uint8* dst, int dst_width); -void ScaleRowDown2Box_Any_NEON(const uint8* src_ptr, ptrdiff_t src_stride, - uint8* dst, int dst_width); -void ScaleRowDown2Box_Odd_NEON(const uint8* src_ptr, ptrdiff_t src_stride, - uint8* dst, int dst_width); -void ScaleRowDown4_Any_NEON(const uint8* src_ptr, ptrdiff_t src_stride, - uint8* dst_ptr, int dst_width); -void ScaleRowDown4Box_Any_NEON(const uint8* src_ptr, ptrdiff_t src_stride, - uint8* dst_ptr, int dst_width); -void ScaleRowDown34_Any_NEON(const uint8* src_ptr, ptrdiff_t src_stride, - uint8* dst_ptr, int dst_width); -void ScaleRowDown34_0_Box_Any_NEON(const uint8* src_ptr, ptrdiff_t src_stride, - uint8* dst_ptr, int dst_width); -void ScaleRowDown34_1_Box_Any_NEON(const uint8* src_ptr, ptrdiff_t src_stride, - uint8* dst_ptr, int dst_width); -// 32 -> 12 -void ScaleRowDown38_Any_NEON(const uint8* src_ptr, ptrdiff_t src_stride, - uint8* dst_ptr, int dst_width); -// 32x3 -> 12x1 -void ScaleRowDown38_3_Box_Any_NEON(const uint8* src_ptr, ptrdiff_t src_stride, - uint8* dst_ptr, int dst_width); -// 32x2 -> 12x1 -void ScaleRowDown38_2_Box_Any_NEON(const uint8* src_ptr, ptrdiff_t src_stride, - uint8* dst_ptr, int dst_width); - -void ScaleAddRow_NEON(const uint8* src_ptr, uint16* dst_ptr, int src_width); -void ScaleAddRow_Any_NEON(const uint8* src_ptr, uint16* dst_ptr, int src_width); - -void ScaleFilterCols_NEON(uint8* dst_ptr, const uint8* src_ptr, - int dst_width, int x, int dx); - -void ScaleFilterCols_Any_NEON(uint8* dst_ptr, const uint8* src_ptr, - int dst_width, int x, int dx); - -void ScaleRowDown2_DSPR2(const uint8* src_ptr, ptrdiff_t src_stride, - uint8* dst, int dst_width); -void ScaleRowDown2Box_DSPR2(const uint8* src_ptr, ptrdiff_t src_stride, - uint8* dst, int dst_width); -void ScaleRowDown4_DSPR2(const uint8* src_ptr, ptrdiff_t src_stride, - uint8* dst, int dst_width); -void ScaleRowDown4Box_DSPR2(const uint8* src_ptr, ptrdiff_t src_stride, - uint8* dst, int dst_width); -void ScaleRowDown34_DSPR2(const uint8* src_ptr, ptrdiff_t src_stride, - uint8* dst, int dst_width); -void ScaleRowDown34_0_Box_DSPR2(const uint8* src_ptr, ptrdiff_t src_stride, - uint8* d, int dst_width); -void ScaleRowDown34_1_Box_DSPR2(const uint8* src_ptr, ptrdiff_t src_stride, - uint8* d, int dst_width); -void ScaleRowDown38_DSPR2(const uint8* src_ptr, ptrdiff_t src_stride, - uint8* dst, int dst_width); -void ScaleRowDown38_2_Box_DSPR2(const uint8* src_ptr, ptrdiff_t src_stride, - uint8* dst_ptr, int dst_width); -void ScaleRowDown38_3_Box_DSPR2(const uint8* src_ptr, ptrdiff_t src_stride, - uint8* dst_ptr, int dst_width); - -#ifdef __cplusplus -} // extern "C" -} // namespace libyuv -#endif - -#endif // INCLUDE_LIBYUV_SCALE_ROW_H_ NOLINT diff --git a/WebRtc.NET/include/third_party/libvpx/source/libvpx/third_party/libyuv/include/libyuv/version.h b/WebRtc.NET/include/third_party/libvpx/source/libvpx/third_party/libyuv/include/libyuv/version.h deleted file mode 100644 index 0fbdc022..00000000 --- a/WebRtc.NET/include/third_party/libvpx/source/libvpx/third_party/libyuv/include/libyuv/version.h +++ /dev/null @@ -1,16 +0,0 @@ -/* - * Copyright 2012 The LibYuv Project Authors. All rights reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef INCLUDE_LIBYUV_VERSION_H_ // NOLINT -#define INCLUDE_LIBYUV_VERSION_H_ - -#define LIBYUV_VERSION 1616 - -#endif // INCLUDE_LIBYUV_VERSION_H_ NOLINT diff --git a/WebRtc.NET/include/third_party/libvpx/source/libvpx/third_party/libyuv/include/libyuv/video_common.h b/WebRtc.NET/include/third_party/libvpx/source/libvpx/third_party/libyuv/include/libyuv/video_common.h deleted file mode 100644 index ad934e42..00000000 --- a/WebRtc.NET/include/third_party/libvpx/source/libvpx/third_party/libyuv/include/libyuv/video_common.h +++ /dev/null @@ -1,184 +0,0 @@ -/* - * Copyright 2011 The LibYuv Project Authors. All rights reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -// Common definitions for video, including fourcc and VideoFormat. - -#ifndef INCLUDE_LIBYUV_VIDEO_COMMON_H_ // NOLINT -#define INCLUDE_LIBYUV_VIDEO_COMMON_H_ - -#include "libyuv/basic_types.h" - -#ifdef __cplusplus -namespace libyuv { -extern "C" { -#endif - -////////////////////////////////////////////////////////////////////////////// -// Definition of FourCC codes -////////////////////////////////////////////////////////////////////////////// - -// Convert four characters to a FourCC code. -// Needs to be a macro otherwise the OS X compiler complains when the kFormat* -// constants are used in a switch. -#ifdef __cplusplus -#define FOURCC(a, b, c, d) ( \ - (static_cast(a)) | (static_cast(b) << 8) | \ - (static_cast(c) << 16) | (static_cast(d) << 24)) -#else -#define FOURCC(a, b, c, d) ( \ - ((uint32)(a)) | ((uint32)(b) << 8) | /* NOLINT */ \ - ((uint32)(c) << 16) | ((uint32)(d) << 24)) /* NOLINT */ -#endif - -// Some pages discussing FourCC codes: -// http://www.fourcc.org/yuv.php -// http://v4l2spec.bytesex.org/spec/book1.htm -// http://developer.apple.com/quicktime/icefloe/dispatch020.html -// http://msdn.microsoft.com/library/windows/desktop/dd206750.aspx#nv12 -// http://people.xiph.org/~xiphmont/containers/nut/nut4cc.txt - -// FourCC codes grouped according to implementation efficiency. -// Primary formats should convert in 1 efficient step. -// Secondary formats are converted in 2 steps. -// Auxilliary formats call primary converters. -enum FourCC { - // 9 Primary YUV formats: 5 planar, 2 biplanar, 2 packed. - FOURCC_I420 = FOURCC('I', '4', '2', '0'), - FOURCC_I422 = FOURCC('I', '4', '2', '2'), - FOURCC_I444 = FOURCC('I', '4', '4', '4'), - FOURCC_I411 = FOURCC('I', '4', '1', '1'), - FOURCC_I400 = FOURCC('I', '4', '0', '0'), - FOURCC_NV21 = FOURCC('N', 'V', '2', '1'), - FOURCC_NV12 = FOURCC('N', 'V', '1', '2'), - FOURCC_YUY2 = FOURCC('Y', 'U', 'Y', '2'), - FOURCC_UYVY = FOURCC('U', 'Y', 'V', 'Y'), - - // 2 Secondary YUV formats: row biplanar. - FOURCC_M420 = FOURCC('M', '4', '2', '0'), - FOURCC_Q420 = FOURCC('Q', '4', '2', '0'), // deprecated. - - // 9 Primary RGB formats: 4 32 bpp, 2 24 bpp, 3 16 bpp. - FOURCC_ARGB = FOURCC('A', 'R', 'G', 'B'), - FOURCC_BGRA = FOURCC('B', 'G', 'R', 'A'), - FOURCC_ABGR = FOURCC('A', 'B', 'G', 'R'), - FOURCC_24BG = FOURCC('2', '4', 'B', 'G'), - FOURCC_RAW = FOURCC('r', 'a', 'w', ' '), - FOURCC_RGBA = FOURCC('R', 'G', 'B', 'A'), - FOURCC_RGBP = FOURCC('R', 'G', 'B', 'P'), // rgb565 LE. - FOURCC_RGBO = FOURCC('R', 'G', 'B', 'O'), // argb1555 LE. - FOURCC_R444 = FOURCC('R', '4', '4', '4'), // argb4444 LE. - - // 4 Secondary RGB formats: 4 Bayer Patterns. deprecated. - FOURCC_RGGB = FOURCC('R', 'G', 'G', 'B'), - FOURCC_BGGR = FOURCC('B', 'G', 'G', 'R'), - FOURCC_GRBG = FOURCC('G', 'R', 'B', 'G'), - FOURCC_GBRG = FOURCC('G', 'B', 'R', 'G'), - - // 1 Primary Compressed YUV format. - FOURCC_MJPG = FOURCC('M', 'J', 'P', 'G'), - - // 5 Auxiliary YUV variations: 3 with U and V planes are swapped, 1 Alias. - FOURCC_YV12 = FOURCC('Y', 'V', '1', '2'), - FOURCC_YV16 = FOURCC('Y', 'V', '1', '6'), - FOURCC_YV24 = FOURCC('Y', 'V', '2', '4'), - FOURCC_YU12 = FOURCC('Y', 'U', '1', '2'), // Linux version of I420. - FOURCC_J420 = FOURCC('J', '4', '2', '0'), - FOURCC_J400 = FOURCC('J', '4', '0', '0'), // unofficial fourcc - FOURCC_H420 = FOURCC('H', '4', '2', '0'), // unofficial fourcc - - // 14 Auxiliary aliases. CanonicalFourCC() maps these to canonical fourcc. - FOURCC_IYUV = FOURCC('I', 'Y', 'U', 'V'), // Alias for I420. - FOURCC_YU16 = FOURCC('Y', 'U', '1', '6'), // Alias for I422. - FOURCC_YU24 = FOURCC('Y', 'U', '2', '4'), // Alias for I444. - FOURCC_YUYV = FOURCC('Y', 'U', 'Y', 'V'), // Alias for YUY2. - FOURCC_YUVS = FOURCC('y', 'u', 'v', 's'), // Alias for YUY2 on Mac. - FOURCC_HDYC = FOURCC('H', 'D', 'Y', 'C'), // Alias for UYVY. - FOURCC_2VUY = FOURCC('2', 'v', 'u', 'y'), // Alias for UYVY on Mac. - FOURCC_JPEG = FOURCC('J', 'P', 'E', 'G'), // Alias for MJPG. - FOURCC_DMB1 = FOURCC('d', 'm', 'b', '1'), // Alias for MJPG on Mac. - FOURCC_BA81 = FOURCC('B', 'A', '8', '1'), // Alias for BGGR. - FOURCC_RGB3 = FOURCC('R', 'G', 'B', '3'), // Alias for RAW. - FOURCC_BGR3 = FOURCC('B', 'G', 'R', '3'), // Alias for 24BG. - FOURCC_CM32 = FOURCC(0, 0, 0, 32), // Alias for BGRA kCMPixelFormat_32ARGB - FOURCC_CM24 = FOURCC(0, 0, 0, 24), // Alias for RAW kCMPixelFormat_24RGB - FOURCC_L555 = FOURCC('L', '5', '5', '5'), // Alias for RGBO. - FOURCC_L565 = FOURCC('L', '5', '6', '5'), // Alias for RGBP. - FOURCC_5551 = FOURCC('5', '5', '5', '1'), // Alias for RGBO. - - // 1 Auxiliary compressed YUV format set aside for capturer. - FOURCC_H264 = FOURCC('H', '2', '6', '4'), - - // Match any fourcc. - FOURCC_ANY = -1, -}; - -enum FourCCBpp { - // Canonical fourcc codes used in our code. - FOURCC_BPP_I420 = 12, - FOURCC_BPP_I422 = 16, - FOURCC_BPP_I444 = 24, - FOURCC_BPP_I411 = 12, - FOURCC_BPP_I400 = 8, - FOURCC_BPP_NV21 = 12, - FOURCC_BPP_NV12 = 12, - FOURCC_BPP_YUY2 = 16, - FOURCC_BPP_UYVY = 16, - FOURCC_BPP_M420 = 12, - FOURCC_BPP_Q420 = 12, - FOURCC_BPP_ARGB = 32, - FOURCC_BPP_BGRA = 32, - FOURCC_BPP_ABGR = 32, - FOURCC_BPP_RGBA = 32, - FOURCC_BPP_24BG = 24, - FOURCC_BPP_RAW = 24, - FOURCC_BPP_RGBP = 16, - FOURCC_BPP_RGBO = 16, - FOURCC_BPP_R444 = 16, - FOURCC_BPP_RGGB = 8, - FOURCC_BPP_BGGR = 8, - FOURCC_BPP_GRBG = 8, - FOURCC_BPP_GBRG = 8, - FOURCC_BPP_YV12 = 12, - FOURCC_BPP_YV16 = 16, - FOURCC_BPP_YV24 = 24, - FOURCC_BPP_YU12 = 12, - FOURCC_BPP_J420 = 12, - FOURCC_BPP_J400 = 8, - FOURCC_BPP_H420 = 12, - FOURCC_BPP_MJPG = 0, // 0 means unknown. - FOURCC_BPP_H264 = 0, - FOURCC_BPP_IYUV = 12, - FOURCC_BPP_YU16 = 16, - FOURCC_BPP_YU24 = 24, - FOURCC_BPP_YUYV = 16, - FOURCC_BPP_YUVS = 16, - FOURCC_BPP_HDYC = 16, - FOURCC_BPP_2VUY = 16, - FOURCC_BPP_JPEG = 1, - FOURCC_BPP_DMB1 = 1, - FOURCC_BPP_BA81 = 8, - FOURCC_BPP_RGB3 = 24, - FOURCC_BPP_BGR3 = 24, - FOURCC_BPP_CM32 = 32, - FOURCC_BPP_CM24 = 24, - - // Match any fourcc. - FOURCC_BPP_ANY = 0, // 0 means unknown. -}; - -// Converts fourcc aliases into canonical ones. -LIBYUV_API uint32 CanonicalFourCC(uint32 fourcc); - -#ifdef __cplusplus -} // extern "C" -} // namespace libyuv -#endif - -#endif // INCLUDE_LIBYUV_VIDEO_COMMON_H_ NOLINT diff --git a/WebRtc.NET/include/third_party/libvpx/source/libvpx/vp8/encoder/bitstream.h b/WebRtc.NET/include/third_party/libvpx/source/libvpx/vp8/encoder/bitstream.h deleted file mode 100644 index 2b196dcd..00000000 --- a/WebRtc.NET/include/third_party/libvpx/source/libvpx/vp8/encoder/bitstream.h +++ /dev/null @@ -1,24 +0,0 @@ -/* - * Copyright (c) 2010 The WebM project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef VP8_ENCODER_BITSTREAM_H_ -#define VP8_ENCODER_BITSTREAM_H_ - -#ifdef __cplusplus -extern "C" { -#endif - -void vp8_pack_tokens(vp8_writer *w, const TOKENEXTRA *p, int xcount); - -#ifdef __cplusplus -} // extern "C" -#endif - -#endif // VP8_ENCODER_BITSTREAM_H_ diff --git a/WebRtc.NET/include/third_party/libvpx/source/libvpx/vp8/encoder/encodeframe.h b/WebRtc.NET/include/third_party/libvpx/source/libvpx/vp8/encoder/encodeframe.h deleted file mode 100644 index c1d86349..00000000 --- a/WebRtc.NET/include/third_party/libvpx/source/libvpx/vp8/encoder/encodeframe.h +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright (c) 2012 The WebM project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ -#ifndef VP8_ENCODER_ENCODEFRAME_H_ -#define VP8_ENCODER_ENCODEFRAME_H_ - -#ifdef __cplusplus -extern "C" { -#endif -extern void vp8_activity_masking(VP8_COMP *cpi, MACROBLOCK *x); - -extern void vp8_build_block_offsets(MACROBLOCK *x); - -extern void vp8_setup_block_ptrs(MACROBLOCK *x); - -extern void vp8_encode_frame(VP8_COMP *cpi); - -extern int vp8cx_encode_inter_macroblock(VP8_COMP *cpi, MACROBLOCK *x, - TOKENEXTRA **t, int recon_yoffset, - int recon_uvoffset, int mb_row, - int mb_col); - -extern int vp8cx_encode_intra_macroblock(VP8_COMP *cpi, MACROBLOCK *x, - TOKENEXTRA **t); -#ifdef __cplusplus -} // extern "C" -#endif - -#endif // VP8_ENCODER_ENCODEFRAME_H_ diff --git a/WebRtc.NET/include/third_party/libvpx/source/libvpx/vp9/decoder/vp9_dthread.h b/WebRtc.NET/include/third_party/libvpx/source/libvpx/vp9/decoder/vp9_dthread.h deleted file mode 100644 index fce0fe7f..00000000 --- a/WebRtc.NET/include/third_party/libvpx/source/libvpx/vp9/decoder/vp9_dthread.h +++ /dev/null @@ -1,74 +0,0 @@ -/* - * Copyright (c) 2014 The WebM project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef VP9_DECODER_VP9_DTHREAD_H_ -#define VP9_DECODER_VP9_DTHREAD_H_ - -#include "./vpx_config.h" -#include "vpx_util/vpx_thread.h" -#include "vpx/internal/vpx_codec_internal.h" - -#ifdef __cplusplus -extern "C" { -#endif - -struct VP9Common; -struct VP9Decoder; - -// WorkerData for the FrameWorker thread. It contains all the information of -// the worker and decode structures for decoding a frame. -typedef struct FrameWorkerData { - struct VP9Decoder *pbi; - const uint8_t *data; - const uint8_t *data_end; - size_t data_size; - void *user_priv; - int result; - int worker_id; - int received_frame; - - // scratch_buffer is used in frame parallel mode only. - // It is used to make a copy of the compressed data. - uint8_t *scratch_buffer; - size_t scratch_buffer_size; - -#if CONFIG_MULTITHREAD - pthread_mutex_t stats_mutex; - pthread_cond_t stats_cond; -#endif - - int frame_context_ready; // Current frame's context is ready to read. - int frame_decoded; // Finished decoding current frame. -} FrameWorkerData; - -void vp9_frameworker_lock_stats(VPxWorker *const worker); -void vp9_frameworker_unlock_stats(VPxWorker *const worker); -void vp9_frameworker_signal_stats(VPxWorker *const worker); - -// Wait until ref_buf has been decoded to row in real pixel unit. -// Note: worker may already finish decoding ref_buf and release it in order to -// start decoding next frame. So need to check whether worker is still decoding -// ref_buf. -void vp9_frameworker_wait(VPxWorker *const worker, RefCntBuffer *const ref_buf, - int row); - -// FrameWorker broadcasts its decoding progress so other workers that are -// waiting on it can resume decoding. -void vp9_frameworker_broadcast(RefCntBuffer *const buf, int row); - -// Copy necessary decoding context from src worker to dst worker. -void vp9_frameworker_copy_context(VPxWorker *const dst_worker, - VPxWorker *const src_worker); - -#ifdef __cplusplus -} // extern "C" -#endif - -#endif // VP9_DECODER_VP9_DTHREAD_H_ diff --git a/WebRtc.NET/include/third_party/libvpx/source/libvpx/vp9/encoder/vp9_denoiser.h b/WebRtc.NET/include/third_party/libvpx/source/libvpx/vp9/encoder/vp9_denoiser.h deleted file mode 100644 index fcfaa505..00000000 --- a/WebRtc.NET/include/third_party/libvpx/source/libvpx/vp9/encoder/vp9_denoiser.h +++ /dev/null @@ -1,104 +0,0 @@ -/* - * Copyright (c) 2012 The WebM project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef VP9_ENCODER_DENOISER_H_ -#define VP9_ENCODER_DENOISER_H_ - -#include "vp9/encoder/vp9_block.h" -#include "vp9/encoder/vp9_skin_detection.h" -#include "vpx_scale/yv12config.h" - -#ifdef __cplusplus -extern "C" { -#endif - -#define MOTION_MAGNITUDE_THRESHOLD (8 * 3) - -typedef enum vp9_denoiser_decision { - COPY_BLOCK, - FILTER_BLOCK, - FILTER_ZEROMV_BLOCK -} VP9_DENOISER_DECISION; - -typedef enum vp9_denoiser_level { - kDenLowLow, - kDenLow, - kDenMedium, - kDenHigh -} VP9_DENOISER_LEVEL; - -typedef struct vp9_denoiser { - YV12_BUFFER_CONFIG running_avg_y[MAX_REF_FRAMES]; - YV12_BUFFER_CONFIG mc_running_avg_y; - YV12_BUFFER_CONFIG last_source; - int increase_denoising; - int frame_buffer_initialized; - int reset; - VP9_DENOISER_LEVEL denoising_level; - VP9_DENOISER_LEVEL prev_denoising_level; -} VP9_DENOISER; - -typedef struct { - int64_t zero_last_cost_orig; - int *ref_frame_cost; - int_mv (*frame_mv)[MAX_REF_FRAMES]; - int reuse_inter_pred; - TX_SIZE best_tx_size; - PREDICTION_MODE best_mode; - MV_REFERENCE_FRAME best_ref_frame; - INTERP_FILTER best_pred_filter; - uint8_t best_mode_skip_txfm; -} VP9_PICKMODE_CTX_DEN; - -struct VP9_COMP; - -void vp9_denoiser_update_frame_info(VP9_DENOISER *denoiser, - YV12_BUFFER_CONFIG src, - FRAME_TYPE frame_type, - int refresh_alt_ref_frame, - int refresh_golden_frame, - int refresh_last_frame, int resized); - -void vp9_denoiser_denoise(struct VP9_COMP *cpi, MACROBLOCK *mb, int mi_row, - int mi_col, BLOCK_SIZE bs, PICK_MODE_CONTEXT *ctx, - VP9_DENOISER_DECISION *denoiser_decision); - -void vp9_denoiser_reset_frame_stats(PICK_MODE_CONTEXT *ctx); - -void vp9_denoiser_update_frame_stats(MODE_INFO *mi, unsigned int sse, - PREDICTION_MODE mode, - PICK_MODE_CONTEXT *ctx); - -int vp9_denoiser_alloc(VP9_DENOISER *denoiser, int width, int height, int ssx, - int ssy, -#if CONFIG_VP9_HIGHBITDEPTH - int use_highbitdepth, -#endif - int border); - -#if CONFIG_VP9_TEMPORAL_DENOISING -// This function is used by both c and sse2 denoiser implementations. -// Define it as a static function within the scope where vp9_denoiser.h -// is referenced. -static INLINE int total_adj_strong_thresh(BLOCK_SIZE bs, - int increase_denoising) { - return (1 << num_pels_log2_lookup[bs]) * (increase_denoising ? 3 : 2); -} -#endif - -void vp9_denoiser_free(VP9_DENOISER *denoiser); - -void vp9_denoiser_set_noise_level(VP9_DENOISER *denoiser, int noise_level); - -#ifdef __cplusplus -} // extern "C" -#endif - -#endif // VP9_ENCODER_DENOISER_H_ diff --git a/WebRtc.NET/include/third_party/libvpx/source/libvpx/vp9/encoder/vp9_ethread.h b/WebRtc.NET/include/third_party/libvpx/source/libvpx/vp9/encoder/vp9_ethread.h deleted file mode 100644 index 1efa4dcd..00000000 --- a/WebRtc.NET/include/third_party/libvpx/source/libvpx/vp9/encoder/vp9_ethread.h +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright (c) 2014 The WebM project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef VP9_ENCODER_VP9_ETHREAD_H_ -#define VP9_ENCODER_VP9_ETHREAD_H_ - -#ifdef __cplusplus -extern "C" { -#endif - -struct VP9_COMP; -struct ThreadData; - -typedef struct EncWorkerData { - struct VP9_COMP *cpi; - struct ThreadData *td; - int start; -} EncWorkerData; - -void vp9_encode_tiles_mt(struct VP9_COMP *cpi); - -#ifdef __cplusplus -} // extern "C" -#endif - -#endif // VP9_ENCODER_VP9_ETHREAD_H_ diff --git a/WebRtc.NET/include/third_party/libvpx/source/libvpx/vp9/encoder/vp9_firstpass.h b/WebRtc.NET/include/third_party/libvpx/source/libvpx/vp9/encoder/vp9_firstpass.h deleted file mode 100644 index 5541893d..00000000 --- a/WebRtc.NET/include/third_party/libvpx/source/libvpx/vp9/encoder/vp9_firstpass.h +++ /dev/null @@ -1,164 +0,0 @@ -/* - * Copyright (c) 2010 The WebM project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef VP9_ENCODER_VP9_FIRSTPASS_H_ -#define VP9_ENCODER_VP9_FIRSTPASS_H_ - -#include "vp9/encoder/vp9_lookahead.h" -#include "vp9/encoder/vp9_ratectrl.h" - -#ifdef __cplusplus -extern "C" { -#endif - -#if CONFIG_FP_MB_STATS - -#define FPMB_DCINTRA_MASK 0x01 - -#define FPMB_MOTION_ZERO_MASK 0x02 -#define FPMB_MOTION_LEFT_MASK 0x04 -#define FPMB_MOTION_RIGHT_MASK 0x08 -#define FPMB_MOTION_UP_MASK 0x10 -#define FPMB_MOTION_DOWN_MASK 0x20 - -#define FPMB_ERROR_SMALL_MASK 0x40 -#define FPMB_ERROR_LARGE_MASK 0x80 -#define FPMB_ERROR_SMALL_TH 2000 -#define FPMB_ERROR_LARGE_TH 48000 - -typedef struct { - uint8_t *mb_stats_start; - uint8_t *mb_stats_end; -} FIRSTPASS_MB_STATS; -#endif - -typedef struct { - double frame; - double weight; - double intra_error; - double coded_error; - double sr_coded_error; - double frame_noise_energy; - double pcnt_inter; - double pcnt_motion; - double pcnt_second_ref; - double pcnt_neutral; - double intra_skip_pct; - double intra_smooth_pct; // % of blocks that are smooth - double inactive_zone_rows; // Image mask rows top and bottom. - double inactive_zone_cols; // Image mask columns at left and right edges. - double MVr; - double mvr_abs; - double MVc; - double mvc_abs; - double MVrv; - double MVcv; - double mv_in_out_count; - double duration; - double count; - int64_t spatial_layer_id; -} FIRSTPASS_STATS; - -typedef enum { - KF_UPDATE = 0, - LF_UPDATE = 1, - GF_UPDATE = 2, - ARF_UPDATE = 3, - OVERLAY_UPDATE = 4, - FRAME_UPDATE_TYPES = 5 -} FRAME_UPDATE_TYPE; - -#define FC_ANIMATION_THRESH 0.15 -typedef enum { - FC_NORMAL = 0, - FC_GRAPHICS_ANIMATION = 1, - FRAME_CONTENT_TYPES = 2 -} FRAME_CONTENT_TYPE; - -typedef struct { - unsigned char index; - unsigned char first_inter_index; - RATE_FACTOR_LEVEL rf_level[(MAX_LAG_BUFFERS * 2) + 1]; - FRAME_UPDATE_TYPE update_type[(MAX_LAG_BUFFERS * 2) + 1]; - unsigned char arf_src_offset[(MAX_LAG_BUFFERS * 2) + 1]; - unsigned char arf_update_idx[(MAX_LAG_BUFFERS * 2) + 1]; - unsigned char arf_ref_idx[(MAX_LAG_BUFFERS * 2) + 1]; - int bit_allocation[(MAX_LAG_BUFFERS * 2) + 1]; -} GF_GROUP; - -typedef struct { - unsigned int section_intra_rating; - FIRSTPASS_STATS total_stats; - FIRSTPASS_STATS this_frame_stats; - const FIRSTPASS_STATS *stats_in; - const FIRSTPASS_STATS *stats_in_start; - const FIRSTPASS_STATS *stats_in_end; - FIRSTPASS_STATS total_left_stats; - int first_pass_done; - int64_t bits_left; - double modified_error_min; - double modified_error_max; - double modified_error_left; - double mb_av_energy; - double mb_smooth_pct; - -#if CONFIG_FP_MB_STATS - uint8_t *frame_mb_stats_buf; - uint8_t *this_frame_mb_stats; - FIRSTPASS_MB_STATS firstpass_mb_stats; -#endif - // An indication of the content type of the current frame - FRAME_CONTENT_TYPE fr_content_type; - - // Projected total bits available for a key frame group of frames - int64_t kf_group_bits; - - // Error score of frames still to be coded in kf group - int64_t kf_group_error_left; - - double bpm_factor; - int rolling_arf_group_target_bits; - int rolling_arf_group_actual_bits; - - int sr_update_lag; - int kf_zeromotion_pct; - int last_kfgroup_zeromotion_pct; - int active_worst_quality; - int baseline_active_worst_quality; - int extend_minq; - int extend_maxq; - int extend_minq_fast; - int arnr_strength_adjustment; - - GF_GROUP gf_group; -} TWO_PASS; - -struct VP9_COMP; - -void vp9_init_first_pass(struct VP9_COMP *cpi); -void vp9_rc_get_first_pass_params(struct VP9_COMP *cpi); -void vp9_first_pass(struct VP9_COMP *cpi, const struct lookahead_entry *source); -void vp9_end_first_pass(struct VP9_COMP *cpi); - -void vp9_init_second_pass(struct VP9_COMP *cpi); -void vp9_rc_get_second_pass_params(struct VP9_COMP *cpi); -void vp9_twopass_postencode_update(struct VP9_COMP *cpi); - -// Post encode update of the rate control parameters for 2-pass -void vp9_twopass_postencode_update(struct VP9_COMP *cpi); - -void calculate_coded_size(struct VP9_COMP *cpi, int *scaled_frame_width, - int *scaled_frame_height); - -#ifdef __cplusplus -} // extern "C" -#endif - -#endif // VP9_ENCODER_VP9_FIRSTPASS_H_ diff --git a/WebRtc.NET/include/third_party/libvpx/source/libvpx/vp9/encoder/vp9_svc_layercontext.h b/WebRtc.NET/include/third_party/libvpx/source/libvpx/vp9/encoder/vp9_svc_layercontext.h deleted file mode 100644 index ee7a6638..00000000 --- a/WebRtc.NET/include/third_party/libvpx/source/libvpx/vp9/encoder/vp9_svc_layercontext.h +++ /dev/null @@ -1,144 +0,0 @@ -/* - * Copyright (c) 2014 The WebM project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef VP9_ENCODER_VP9_SVC_LAYERCONTEXT_H_ -#define VP9_ENCODER_VP9_SVC_LAYERCONTEXT_H_ - -#include "vpx/vpx_encoder.h" - -#include "vp9/encoder/vp9_ratectrl.h" - -#ifdef __cplusplus -extern "C" { -#endif - -typedef struct { - RATE_CONTROL rc; - int target_bandwidth; - int spatial_layer_target_bandwidth; // Target for the spatial layer. - double framerate; - int avg_frame_size; - int max_q; - int min_q; - int scaling_factor_num; - int scaling_factor_den; - TWO_PASS twopass; - vpx_fixed_buf_t rc_twopass_stats_in; - unsigned int current_video_frame_in_layer; - int is_key_frame; - int frames_from_key_frame; - FRAME_TYPE last_frame_type; - struct lookahead_entry *alt_ref_source; - int alt_ref_idx; - int gold_ref_idx; - int has_alt_frame; - size_t layer_size; - struct vpx_psnr_pkt psnr_pkt; - // Cyclic refresh parameters (aq-mode=3), that need to be updated per-frame. - int sb_index; - signed char *map; - uint8_t *last_coded_q_map; - uint8_t *consec_zero_mv; - uint8_t speed; -} LAYER_CONTEXT; - -typedef struct { - int spatial_layer_id; - int temporal_layer_id; - int number_spatial_layers; - int number_temporal_layers; - - int spatial_layer_to_encode; - int first_spatial_layer_to_encode; - int rc_drop_superframe; - - // Workaround for multiple frame contexts - enum { ENCODED = 0, ENCODING, NEED_TO_ENCODE } encode_empty_frame_state; - struct lookahead_entry empty_frame; - int encode_intra_empty_frame; - - // Store scaled source frames to be used for temporal filter to generate - // a alt ref frame. - YV12_BUFFER_CONFIG scaled_frames[MAX_LAG_BUFFERS]; - // Temp buffer used for 2-stage down-sampling, for real-time mode. - YV12_BUFFER_CONFIG scaled_temp; - int scaled_one_half; - int scaled_temp_is_alloc; - - // Layer context used for rate control in one pass temporal CBR mode or - // two pass spatial mode. - LAYER_CONTEXT layer_context[VPX_MAX_LAYERS]; - // Indicates what sort of temporal layering is used. - // Currently, this only works for CBR mode. - VP9E_TEMPORAL_LAYERING_MODE temporal_layering_mode; - // Frame flags and buffer indexes for each spatial layer, set by the - // application (external settings). - int ext_frame_flags[VPX_MAX_LAYERS]; - int ext_lst_fb_idx[VPX_MAX_LAYERS]; - int ext_gld_fb_idx[VPX_MAX_LAYERS]; - int ext_alt_fb_idx[VPX_MAX_LAYERS]; - int ref_frame_index[REF_FRAMES]; - int force_zero_mode_spatial_ref; - int current_superframe; - int use_base_mv; -} SVC; - -struct VP9_COMP; - -// Initialize layer context data from init_config(). -void vp9_init_layer_context(struct VP9_COMP *const cpi); - -// Update the layer context from a change_config() call. -void vp9_update_layer_context_change_config(struct VP9_COMP *const cpi, - const int target_bandwidth); - -// Prior to encoding the frame, update framerate-related quantities -// for the current temporal layer. -void vp9_update_temporal_layer_framerate(struct VP9_COMP *const cpi); - -// Update framerate-related quantities for the current spatial layer. -void vp9_update_spatial_layer_framerate(struct VP9_COMP *const cpi, - double framerate); - -// Prior to encoding the frame, set the layer context, for the current layer -// to be encoded, to the cpi struct. -void vp9_restore_layer_context(struct VP9_COMP *const cpi); - -// Save the layer context after encoding the frame. -void vp9_save_layer_context(struct VP9_COMP *const cpi); - -// Initialize second pass rc for spatial svc. -void vp9_init_second_pass_spatial_svc(struct VP9_COMP *cpi); - -// Increment number of video frames in layer -void vp9_inc_frame_in_layer(struct VP9_COMP *const cpi); - -// Check if current layer is key frame in spatial upper layer -int vp9_is_upper_layer_key_frame(const struct VP9_COMP *const cpi); - -// Get the next source buffer to encode -struct lookahead_entry *vp9_svc_lookahead_pop(struct VP9_COMP *const cpi, - struct lookahead_ctx *ctx, - int drain); - -// Start a frame and initialize svc parameters -int vp9_svc_start_frame(struct VP9_COMP *const cpi); - -int vp9_one_pass_cbr_svc_start_layer(struct VP9_COMP *const cpi); - -void vp9_free_svc_cyclic_refresh(struct VP9_COMP *const cpi); - -void vp9_svc_reset_key_frame(struct VP9_COMP *const cpi); - -#ifdef __cplusplus -} // extern "C" -#endif - -#endif // VP9_ENCODER_VP9_SVC_LAYERCONTEXT_ diff --git a/WebRtc.NET/include/third_party/libvpx/source/libvpx/vp9/vp9_dx_iface.h b/WebRtc.NET/include/third_party/libvpx/source/libvpx/vp9/vp9_dx_iface.h deleted file mode 100644 index c1559599..00000000 --- a/WebRtc.NET/include/third_party/libvpx/source/libvpx/vp9/vp9_dx_iface.h +++ /dev/null @@ -1,69 +0,0 @@ -/* - * Copyright (c) 2015 The WebM project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef VP9_VP9_DX_IFACE_H_ -#define VP9_VP9_DX_IFACE_H_ - -#include "vp9/decoder/vp9_decoder.h" - -typedef vpx_codec_stream_info_t vp9_stream_info_t; - -// This limit is due to framebuffer numbers. -// TODO(hkuang): Remove this limit after implementing ondemand framebuffers. -#define FRAME_CACHE_SIZE 6 // Cache maximum 6 decoded frames. - -typedef struct cache_frame { - int fb_idx; - vpx_image_t img; -} cache_frame; - -struct vpx_codec_alg_priv { - vpx_codec_priv_t base; - vpx_codec_dec_cfg_t cfg; - vp9_stream_info_t si; - int postproc_cfg_set; - vp8_postproc_cfg_t postproc_cfg; - vpx_decrypt_cb decrypt_cb; - void *decrypt_state; - vpx_image_t img; - int img_avail; - int flushed; - int invert_tile_order; - int last_show_frame; // Index of last output frame. - int byte_alignment; - int skip_loop_filter; - - // Frame parallel related. - int frame_parallel_decode; // frame-based threading. - VPxWorker *frame_workers; - int num_frame_workers; - int next_submit_worker_id; - int last_submit_worker_id; - int next_output_worker_id; - int available_threads; - cache_frame frame_cache[FRAME_CACHE_SIZE]; - int frame_cache_write; - int frame_cache_read; - int num_cache_frames; - int need_resync; // wait for key/intra-only frame - // BufferPool that holds all reference frames. Shared by all the FrameWorkers. - BufferPool *buffer_pool; - - // External frame buffer info to save for VP9 common. - void *ext_priv; // Private data associated with the external frame buffers. - vpx_get_frame_buffer_cb_fn_t get_ext_fb_cb; - vpx_release_frame_buffer_cb_fn_t release_ext_fb_cb; - - // Allow for decoding up to a given spatial layer for SVC stream. - int svc_decoding; - int svc_spatial_layer; -}; - -#endif // VP9_VP9_DX_IFACE_H_ diff --git a/WebRtc.NET/include/third_party/libvpx/source/libvpx/vpx_dsp/arm/idct_neon.h b/WebRtc.NET/include/third_party/libvpx/source/libvpx/vpx_dsp/arm/idct_neon.h deleted file mode 100644 index d9b85223..00000000 --- a/WebRtc.NET/include/third_party/libvpx/source/libvpx/vpx_dsp/arm/idct_neon.h +++ /dev/null @@ -1,544 +0,0 @@ -/* - * Copyright (c) 2016 The WebM project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef VPX_DSP_ARM_IDCT_NEON_H_ -#define VPX_DSP_ARM_IDCT_NEON_H_ - -#include - -#include "./vpx_config.h" -#include "vpx_dsp/arm/transpose_neon.h" -#include "vpx_dsp/vpx_dsp_common.h" - -DECLARE_ALIGNED(16, static const int16_t, kCospi[16]) = { - 16384 /* cospi_0_64 */, 15137 /* cospi_8_64 */, - 11585 /* cospi_16_64 */, 6270 /* cospi_24_64 */, - 16069 /* cospi_4_64 */, 13623 /* cospi_12_64 */, - -9102 /* -cospi_20_64 */, 3196 /* cospi_28_64 */, - 16305 /* cospi_2_64 */, 1606 /* cospi_30_64 */, - 14449 /* cospi_10_64 */, 7723 /* cospi_22_64 */, - 15679 /* cospi_6_64 */, -4756 /* -cospi_26_64 */, - 12665 /* cospi_14_64 */, -10394 /* -cospi_18_64 */ -}; - -DECLARE_ALIGNED(16, static const int32_t, kCospi32[8]) = { - 16384 /* cospi_0_64 */, 15137 /* cospi_8_64 */, - 11585 /* cospi_16_64 */, 6270 /* cospi_24_64 */, - 16069 /* cospi_4_64 */, 13623 /* cospi_12_64 */, - -9102 /* -cospi_20_64 */, 3196 /* cospi_28_64 */ -}; - -//------------------------------------------------------------------------------ -// Helper functions used to load tran_low_t into int16, narrowing if necessary. - -static INLINE int16x8x2_t load_tran_low_to_s16x2q(const tran_low_t *buf) { -#if CONFIG_VP9_HIGHBITDEPTH - const int32x4x2_t v0 = vld2q_s32(buf); - const int32x4x2_t v1 = vld2q_s32(buf + 8); - const int16x4_t s0 = vmovn_s32(v0.val[0]); - const int16x4_t s1 = vmovn_s32(v0.val[1]); - const int16x4_t s2 = vmovn_s32(v1.val[0]); - const int16x4_t s3 = vmovn_s32(v1.val[1]); - int16x8x2_t res; - res.val[0] = vcombine_s16(s0, s2); - res.val[1] = vcombine_s16(s1, s3); - return res; -#else - return vld2q_s16(buf); -#endif -} - -static INLINE int16x8_t load_tran_low_to_s16q(const tran_low_t *buf) { -#if CONFIG_VP9_HIGHBITDEPTH - const int32x4_t v0 = vld1q_s32(buf); - const int32x4_t v1 = vld1q_s32(buf + 4); - const int16x4_t s0 = vmovn_s32(v0); - const int16x4_t s1 = vmovn_s32(v1); - return vcombine_s16(s0, s1); -#else - return vld1q_s16(buf); -#endif -} - -static INLINE int16x4_t load_tran_low_to_s16d(const tran_low_t *buf) { -#if CONFIG_VP9_HIGHBITDEPTH - const int32x4_t v0 = vld1q_s32(buf); - return vmovn_s32(v0); -#else - return vld1_s16(buf); -#endif -} - -//------------------------------------------------------------------------------ - -// Multiply a by a_const. Saturate, shift and narrow by 14. -static INLINE int16x8_t multiply_shift_and_narrow_s16(const int16x8_t a, - const int16_t a_const) { - // Shift by 14 + rounding will be within 16 bits for well formed streams. - // See WRAPLOW and dct_const_round_shift for details. - // This instruction doubles the result and returns the high half, essentially - // resulting in a right shift by 15. By multiplying the constant first that - // becomes a right shift by 14. - // The largest possible value used here is - // vpx_dsp/txfm_common.h:cospi_1_64 = 16364 (* 2 = 32728) a which falls *just* - // within the range of int16_t (+32767 / -32768) even when negated. - return vqrdmulhq_n_s16(a, a_const * 2); -} - -// Add a and b, then multiply by ab_const. Shift and narrow by 14. -static INLINE int16x8_t add_multiply_shift_and_narrow_s16( - const int16x8_t a, const int16x8_t b, const int16_t ab_const) { - // In both add_ and it's pair, sub_, the input for well-formed streams will be - // well within 16 bits (input to the idct is the difference between two frames - // and will be within -255 to 255, or 9 bits) - // However, for inputs over about 25,000 (valid for int16_t, but not for idct - // input) this function can not use vaddq_s16. - // In order to match existing behavior and intentionally out of range tests, - // expand the addition up to 32 bits to prevent truncation. - int32x4_t temp_low = vaddl_s16(vget_low_s16(a), vget_low_s16(b)); - int32x4_t temp_high = vaddl_s16(vget_high_s16(a), vget_high_s16(b)); - temp_low = vmulq_n_s32(temp_low, ab_const); - temp_high = vmulq_n_s32(temp_high, ab_const); - return vcombine_s16(vrshrn_n_s32(temp_low, 14), vrshrn_n_s32(temp_high, 14)); -} - -// Subtract b from a, then multiply by ab_const. Shift and narrow by 14. -static INLINE int16x8_t sub_multiply_shift_and_narrow_s16( - const int16x8_t a, const int16x8_t b, const int16_t ab_const) { - int32x4_t temp_low = vsubl_s16(vget_low_s16(a), vget_low_s16(b)); - int32x4_t temp_high = vsubl_s16(vget_high_s16(a), vget_high_s16(b)); - temp_low = vmulq_n_s32(temp_low, ab_const); - temp_high = vmulq_n_s32(temp_high, ab_const); - return vcombine_s16(vrshrn_n_s32(temp_low, 14), vrshrn_n_s32(temp_high, 14)); -} - -// Multiply a by a_const and b by b_const, then accumulate. Shift and narrow by -// 14. -static INLINE int16x8_t multiply_accumulate_shift_and_narrow_s16( - const int16x8_t a, const int16_t a_const, const int16x8_t b, - const int16_t b_const) { - int32x4_t temp_low = vmull_n_s16(vget_low_s16(a), a_const); - int32x4_t temp_high = vmull_n_s16(vget_high_s16(a), a_const); - temp_low = vmlal_n_s16(temp_low, vget_low_s16(b), b_const); - temp_high = vmlal_n_s16(temp_high, vget_high_s16(b), b_const); - return vcombine_s16(vrshrn_n_s32(temp_low, 14), vrshrn_n_s32(temp_high, 14)); -} - -// Shift the output down by 6 and add it to the destination buffer. -static INLINE void add_and_store_u8_s16(const int16x8_t a0, const int16x8_t a1, - const int16x8_t a2, const int16x8_t a3, - const int16x8_t a4, const int16x8_t a5, - const int16x8_t a6, const int16x8_t a7, - uint8_t *b, const int b_stride) { - uint8x8_t b0, b1, b2, b3, b4, b5, b6, b7; - int16x8_t c0, c1, c2, c3, c4, c5, c6, c7; - b0 = vld1_u8(b); - b += b_stride; - b1 = vld1_u8(b); - b += b_stride; - b2 = vld1_u8(b); - b += b_stride; - b3 = vld1_u8(b); - b += b_stride; - b4 = vld1_u8(b); - b += b_stride; - b5 = vld1_u8(b); - b += b_stride; - b6 = vld1_u8(b); - b += b_stride; - b7 = vld1_u8(b); - b -= (7 * b_stride); - - // c = b + (a >> 6) - c0 = vrsraq_n_s16(vreinterpretq_s16_u16(vmovl_u8(b0)), a0, 6); - c1 = vrsraq_n_s16(vreinterpretq_s16_u16(vmovl_u8(b1)), a1, 6); - c2 = vrsraq_n_s16(vreinterpretq_s16_u16(vmovl_u8(b2)), a2, 6); - c3 = vrsraq_n_s16(vreinterpretq_s16_u16(vmovl_u8(b3)), a3, 6); - c4 = vrsraq_n_s16(vreinterpretq_s16_u16(vmovl_u8(b4)), a4, 6); - c5 = vrsraq_n_s16(vreinterpretq_s16_u16(vmovl_u8(b5)), a5, 6); - c6 = vrsraq_n_s16(vreinterpretq_s16_u16(vmovl_u8(b6)), a6, 6); - c7 = vrsraq_n_s16(vreinterpretq_s16_u16(vmovl_u8(b7)), a7, 6); - - b0 = vqmovun_s16(c0); - b1 = vqmovun_s16(c1); - b2 = vqmovun_s16(c2); - b3 = vqmovun_s16(c3); - b4 = vqmovun_s16(c4); - b5 = vqmovun_s16(c5); - b6 = vqmovun_s16(c6); - b7 = vqmovun_s16(c7); - - vst1_u8(b, b0); - b += b_stride; - vst1_u8(b, b1); - b += b_stride; - vst1_u8(b, b2); - b += b_stride; - vst1_u8(b, b3); - b += b_stride; - vst1_u8(b, b4); - b += b_stride; - vst1_u8(b, b5); - b += b_stride; - vst1_u8(b, b6); - b += b_stride; - vst1_u8(b, b7); -} - -static INLINE uint8x16_t create_dcq(const int16_t dc) { - // Clip both sides and gcc may compile to assembly 'usat'. - const int16_t t = (dc < 0) ? 0 : ((dc > 255) ? 255 : dc); - return vdupq_n_u8((uint8_t)t); -} - -static INLINE void idct4x4_16_kernel_bd8(const int16x4_t cospis, - int16x8_t *const a0, - int16x8_t *const a1) { - int16x4_t b0, b1, b2, b3; - int32x4_t c0, c1, c2, c3; - int16x8_t d0, d1; - - transpose_s16_4x4q(a0, a1); - b0 = vget_low_s16(*a0); - b1 = vget_high_s16(*a0); - b2 = vget_low_s16(*a1); - b3 = vget_high_s16(*a1); - c0 = vmull_lane_s16(b0, cospis, 2); - c2 = vmull_lane_s16(b1, cospis, 2); - c1 = vsubq_s32(c0, c2); - c0 = vaddq_s32(c0, c2); - c2 = vmull_lane_s16(b2, cospis, 3); - c3 = vmull_lane_s16(b2, cospis, 1); - c2 = vmlsl_lane_s16(c2, b3, cospis, 1); - c3 = vmlal_lane_s16(c3, b3, cospis, 3); - b0 = vrshrn_n_s32(c0, 14); - b1 = vrshrn_n_s32(c1, 14); - b2 = vrshrn_n_s32(c2, 14); - b3 = vrshrn_n_s32(c3, 14); - d0 = vcombine_s16(b0, b1); - d1 = vcombine_s16(b3, b2); - *a0 = vaddq_s16(d0, d1); - *a1 = vsubq_s16(d0, d1); -} - -static INLINE void idct8x8_12_pass1_bd8( - const int16x4_t cospis0, const int16x4_t cospisd0, const int16x4_t cospisd1, - int16x4_t *const io0, int16x4_t *const io1, int16x4_t *const io2, - int16x4_t *const io3, int16x4_t *const io4, int16x4_t *const io5, - int16x4_t *const io6, int16x4_t *const io7) { - int16x4_t step1[8], step2[8]; - int32x4_t t32[2]; - - transpose_s16_4x4d(io0, io1, io2, io3); - - // stage 1 - step1[4] = vqrdmulh_lane_s16(*io1, cospisd1, 3); - step1[5] = vqrdmulh_lane_s16(*io3, cospisd1, 2); - step1[6] = vqrdmulh_lane_s16(*io3, cospisd1, 1); - step1[7] = vqrdmulh_lane_s16(*io1, cospisd1, 0); - - // stage 2 - step2[1] = vqrdmulh_lane_s16(*io0, cospisd0, 2); - step2[2] = vqrdmulh_lane_s16(*io2, cospisd0, 3); - step2[3] = vqrdmulh_lane_s16(*io2, cospisd0, 1); - - step2[4] = vadd_s16(step1[4], step1[5]); - step2[5] = vsub_s16(step1[4], step1[5]); - step2[6] = vsub_s16(step1[7], step1[6]); - step2[7] = vadd_s16(step1[7], step1[6]); - - // stage 3 - step1[0] = vadd_s16(step2[1], step2[3]); - step1[1] = vadd_s16(step2[1], step2[2]); - step1[2] = vsub_s16(step2[1], step2[2]); - step1[3] = vsub_s16(step2[1], step2[3]); - - t32[1] = vmull_lane_s16(step2[6], cospis0, 2); - t32[0] = vmlsl_lane_s16(t32[1], step2[5], cospis0, 2); - t32[1] = vmlal_lane_s16(t32[1], step2[5], cospis0, 2); - step1[5] = vrshrn_n_s32(t32[0], 14); - step1[6] = vrshrn_n_s32(t32[1], 14); - - // stage 4 - *io0 = vadd_s16(step1[0], step2[7]); - *io1 = vadd_s16(step1[1], step1[6]); - *io2 = vadd_s16(step1[2], step1[5]); - *io3 = vadd_s16(step1[3], step2[4]); - *io4 = vsub_s16(step1[3], step2[4]); - *io5 = vsub_s16(step1[2], step1[5]); - *io6 = vsub_s16(step1[1], step1[6]); - *io7 = vsub_s16(step1[0], step2[7]); -} - -static INLINE void idct8x8_12_pass2_bd8( - const int16x4_t cospis0, const int16x4_t cospisd0, const int16x4_t cospisd1, - const int16x4_t input0, const int16x4_t input1, const int16x4_t input2, - const int16x4_t input3, const int16x4_t input4, const int16x4_t input5, - const int16x4_t input6, const int16x4_t input7, int16x8_t *const output0, - int16x8_t *const output1, int16x8_t *const output2, - int16x8_t *const output3, int16x8_t *const output4, - int16x8_t *const output5, int16x8_t *const output6, - int16x8_t *const output7) { - int16x8_t in[4]; - int16x8_t step1[8], step2[8]; - int32x4_t t32[8]; - int16x4_t t16[8]; - - transpose_s16_4x8(input0, input1, input2, input3, input4, input5, input6, - input7, &in[0], &in[1], &in[2], &in[3]); - - // stage 1 - step1[4] = vqrdmulhq_lane_s16(in[1], cospisd1, 3); - step1[5] = vqrdmulhq_lane_s16(in[3], cospisd1, 2); - step1[6] = vqrdmulhq_lane_s16(in[3], cospisd1, 1); - step1[7] = vqrdmulhq_lane_s16(in[1], cospisd1, 0); - - // stage 2 - step2[1] = vqrdmulhq_lane_s16(in[0], cospisd0, 2); - step2[2] = vqrdmulhq_lane_s16(in[2], cospisd0, 3); - step2[3] = vqrdmulhq_lane_s16(in[2], cospisd0, 1); - - step2[4] = vaddq_s16(step1[4], step1[5]); - step2[5] = vsubq_s16(step1[4], step1[5]); - step2[6] = vsubq_s16(step1[7], step1[6]); - step2[7] = vaddq_s16(step1[7], step1[6]); - - // stage 3 - step1[0] = vaddq_s16(step2[1], step2[3]); - step1[1] = vaddq_s16(step2[1], step2[2]); - step1[2] = vsubq_s16(step2[1], step2[2]); - step1[3] = vsubq_s16(step2[1], step2[3]); - - t32[2] = vmull_lane_s16(vget_low_s16(step2[6]), cospis0, 2); - t32[3] = vmull_lane_s16(vget_high_s16(step2[6]), cospis0, 2); - t32[0] = vmlsl_lane_s16(t32[2], vget_low_s16(step2[5]), cospis0, 2); - t32[1] = vmlsl_lane_s16(t32[3], vget_high_s16(step2[5]), cospis0, 2); - t32[2] = vmlal_lane_s16(t32[2], vget_low_s16(step2[5]), cospis0, 2); - t32[3] = vmlal_lane_s16(t32[3], vget_high_s16(step2[5]), cospis0, 2); - t16[0] = vrshrn_n_s32(t32[0], 14); - t16[1] = vrshrn_n_s32(t32[1], 14); - t16[2] = vrshrn_n_s32(t32[2], 14); - t16[3] = vrshrn_n_s32(t32[3], 14); - step1[5] = vcombine_s16(t16[0], t16[1]); - step1[6] = vcombine_s16(t16[2], t16[3]); - - // stage 4 - *output0 = vaddq_s16(step1[0], step2[7]); - *output1 = vaddq_s16(step1[1], step1[6]); - *output2 = vaddq_s16(step1[2], step1[5]); - *output3 = vaddq_s16(step1[3], step2[4]); - *output4 = vsubq_s16(step1[3], step2[4]); - *output5 = vsubq_s16(step1[2], step1[5]); - *output6 = vsubq_s16(step1[1], step1[6]); - *output7 = vsubq_s16(step1[0], step2[7]); -} - -static INLINE void idct8x8_64_1d_bd8(const int16x4_t cospis0, - const int16x4_t cospis1, - int16x8_t *const io0, int16x8_t *const io1, - int16x8_t *const io2, int16x8_t *const io3, - int16x8_t *const io4, int16x8_t *const io5, - int16x8_t *const io6, - int16x8_t *const io7) { - int16x4_t input_1l, input_1h, input_3l, input_3h, input_5l, input_5h, - input_7l, input_7h; - int16x4_t step1l[4], step1h[4]; - int16x8_t step1[8], step2[8]; - int32x4_t t32[8]; - int16x4_t t16[8]; - - transpose_s16_8x8(io0, io1, io2, io3, io4, io5, io6, io7); - - // stage 1 - input_1l = vget_low_s16(*io1); - input_1h = vget_high_s16(*io1); - input_3l = vget_low_s16(*io3); - input_3h = vget_high_s16(*io3); - input_5l = vget_low_s16(*io5); - input_5h = vget_high_s16(*io5); - input_7l = vget_low_s16(*io7); - input_7h = vget_high_s16(*io7); - step1l[0] = vget_low_s16(*io0); - step1h[0] = vget_high_s16(*io0); - step1l[1] = vget_low_s16(*io2); - step1h[1] = vget_high_s16(*io2); - step1l[2] = vget_low_s16(*io4); - step1h[2] = vget_high_s16(*io4); - step1l[3] = vget_low_s16(*io6); - step1h[3] = vget_high_s16(*io6); - - t32[0] = vmull_lane_s16(input_1l, cospis1, 3); - t32[1] = vmull_lane_s16(input_1h, cospis1, 3); - t32[2] = vmull_lane_s16(input_3l, cospis1, 2); - t32[3] = vmull_lane_s16(input_3h, cospis1, 2); - t32[4] = vmull_lane_s16(input_3l, cospis1, 1); - t32[5] = vmull_lane_s16(input_3h, cospis1, 1); - t32[6] = vmull_lane_s16(input_1l, cospis1, 0); - t32[7] = vmull_lane_s16(input_1h, cospis1, 0); - t32[0] = vmlsl_lane_s16(t32[0], input_7l, cospis1, 0); - t32[1] = vmlsl_lane_s16(t32[1], input_7h, cospis1, 0); - t32[2] = vmlal_lane_s16(t32[2], input_5l, cospis1, 1); - t32[3] = vmlal_lane_s16(t32[3], input_5h, cospis1, 1); - t32[4] = vmlsl_lane_s16(t32[4], input_5l, cospis1, 2); - t32[5] = vmlsl_lane_s16(t32[5], input_5h, cospis1, 2); - t32[6] = vmlal_lane_s16(t32[6], input_7l, cospis1, 3); - t32[7] = vmlal_lane_s16(t32[7], input_7h, cospis1, 3); - t16[0] = vrshrn_n_s32(t32[0], 14); - t16[1] = vrshrn_n_s32(t32[1], 14); - t16[2] = vrshrn_n_s32(t32[2], 14); - t16[3] = vrshrn_n_s32(t32[3], 14); - t16[4] = vrshrn_n_s32(t32[4], 14); - t16[5] = vrshrn_n_s32(t32[5], 14); - t16[6] = vrshrn_n_s32(t32[6], 14); - t16[7] = vrshrn_n_s32(t32[7], 14); - step1[4] = vcombine_s16(t16[0], t16[1]); - step1[5] = vcombine_s16(t16[2], t16[3]); - step1[6] = vcombine_s16(t16[4], t16[5]); - step1[7] = vcombine_s16(t16[6], t16[7]); - - // stage 2 - t32[2] = vmull_lane_s16(step1l[0], cospis0, 2); - t32[3] = vmull_lane_s16(step1h[0], cospis0, 2); - t32[4] = vmull_lane_s16(step1l[1], cospis0, 3); - t32[5] = vmull_lane_s16(step1h[1], cospis0, 3); - t32[6] = vmull_lane_s16(step1l[1], cospis0, 1); - t32[7] = vmull_lane_s16(step1h[1], cospis0, 1); - t32[0] = vmlal_lane_s16(t32[2], step1l[2], cospis0, 2); - t32[1] = vmlal_lane_s16(t32[3], step1h[2], cospis0, 2); - t32[2] = vmlsl_lane_s16(t32[2], step1l[2], cospis0, 2); - t32[3] = vmlsl_lane_s16(t32[3], step1h[2], cospis0, 2); - t32[4] = vmlsl_lane_s16(t32[4], step1l[3], cospis0, 1); - t32[5] = vmlsl_lane_s16(t32[5], step1h[3], cospis0, 1); - t32[6] = vmlal_lane_s16(t32[6], step1l[3], cospis0, 3); - t32[7] = vmlal_lane_s16(t32[7], step1h[3], cospis0, 3); - t16[0] = vrshrn_n_s32(t32[0], 14); - t16[1] = vrshrn_n_s32(t32[1], 14); - t16[2] = vrshrn_n_s32(t32[2], 14); - t16[3] = vrshrn_n_s32(t32[3], 14); - t16[4] = vrshrn_n_s32(t32[4], 14); - t16[5] = vrshrn_n_s32(t32[5], 14); - t16[6] = vrshrn_n_s32(t32[6], 14); - t16[7] = vrshrn_n_s32(t32[7], 14); - step2[0] = vcombine_s16(t16[0], t16[1]); - step2[1] = vcombine_s16(t16[2], t16[3]); - step2[2] = vcombine_s16(t16[4], t16[5]); - step2[3] = vcombine_s16(t16[6], t16[7]); - - step2[4] = vaddq_s16(step1[4], step1[5]); - step2[5] = vsubq_s16(step1[4], step1[5]); - step2[6] = vsubq_s16(step1[7], step1[6]); - step2[7] = vaddq_s16(step1[7], step1[6]); - - // stage 3 - step1[0] = vaddq_s16(step2[0], step2[3]); - step1[1] = vaddq_s16(step2[1], step2[2]); - step1[2] = vsubq_s16(step2[1], step2[2]); - step1[3] = vsubq_s16(step2[0], step2[3]); - - t32[2] = vmull_lane_s16(vget_low_s16(step2[6]), cospis0, 2); - t32[3] = vmull_lane_s16(vget_high_s16(step2[6]), cospis0, 2); - t32[0] = vmlsl_lane_s16(t32[2], vget_low_s16(step2[5]), cospis0, 2); - t32[1] = vmlsl_lane_s16(t32[3], vget_high_s16(step2[5]), cospis0, 2); - t32[2] = vmlal_lane_s16(t32[2], vget_low_s16(step2[5]), cospis0, 2); - t32[3] = vmlal_lane_s16(t32[3], vget_high_s16(step2[5]), cospis0, 2); - t16[0] = vrshrn_n_s32(t32[0], 14); - t16[1] = vrshrn_n_s32(t32[1], 14); - t16[2] = vrshrn_n_s32(t32[2], 14); - t16[3] = vrshrn_n_s32(t32[3], 14); - step1[5] = vcombine_s16(t16[0], t16[1]); - step1[6] = vcombine_s16(t16[2], t16[3]); - - // stage 4 - *io0 = vaddq_s16(step1[0], step2[7]); - *io1 = vaddq_s16(step1[1], step1[6]); - *io2 = vaddq_s16(step1[2], step1[5]); - *io3 = vaddq_s16(step1[3], step2[4]); - *io4 = vsubq_s16(step1[3], step2[4]); - *io5 = vsubq_s16(step1[2], step1[5]); - *io6 = vsubq_s16(step1[1], step1[6]); - *io7 = vsubq_s16(step1[0], step2[7]); -} - -static INLINE void idct16x16_add_wrap_low_8x2(const int32x4_t *const t32, - int16x8_t *const d0, - int16x8_t *const d1) { - int16x4_t t16[4]; - - t16[0] = vrshrn_n_s32(t32[0], 14); - t16[1] = vrshrn_n_s32(t32[1], 14); - t16[2] = vrshrn_n_s32(t32[2], 14); - t16[3] = vrshrn_n_s32(t32[3], 14); - *d0 = vcombine_s16(t16[0], t16[1]); - *d1 = vcombine_s16(t16[2], t16[3]); -} - -static INLINE void idct_cospi_8_24_q_kernel(const int16x8_t s0, - const int16x8_t s1, - const int16x4_t cospi_0_8_16_24, - int32x4_t *const t32) { - t32[0] = vmull_lane_s16(vget_low_s16(s0), cospi_0_8_16_24, 3); - t32[1] = vmull_lane_s16(vget_high_s16(s0), cospi_0_8_16_24, 3); - t32[2] = vmull_lane_s16(vget_low_s16(s1), cospi_0_8_16_24, 3); - t32[3] = vmull_lane_s16(vget_high_s16(s1), cospi_0_8_16_24, 3); - t32[0] = vmlsl_lane_s16(t32[0], vget_low_s16(s1), cospi_0_8_16_24, 1); - t32[1] = vmlsl_lane_s16(t32[1], vget_high_s16(s1), cospi_0_8_16_24, 1); - t32[2] = vmlal_lane_s16(t32[2], vget_low_s16(s0), cospi_0_8_16_24, 1); - t32[3] = vmlal_lane_s16(t32[3], vget_high_s16(s0), cospi_0_8_16_24, 1); -} - -static INLINE void idct_cospi_8_24_q(const int16x8_t s0, const int16x8_t s1, - const int16x4_t cospi_0_8_16_24, - int16x8_t *const d0, int16x8_t *const d1) { - int32x4_t t32[4]; - - idct_cospi_8_24_q_kernel(s0, s1, cospi_0_8_16_24, t32); - idct16x16_add_wrap_low_8x2(t32, d0, d1); -} - -static INLINE void idct_cospi_8_24_neg_q(const int16x8_t s0, const int16x8_t s1, - const int16x4_t cospi_0_8_16_24, - int16x8_t *const d0, - int16x8_t *const d1) { - int32x4_t t32[4]; - - idct_cospi_8_24_q_kernel(s0, s1, cospi_0_8_16_24, t32); - t32[2] = vnegq_s32(t32[2]); - t32[3] = vnegq_s32(t32[3]); - idct16x16_add_wrap_low_8x2(t32, d0, d1); -} - -static INLINE void idct_cospi_16_16_q(const int16x8_t s0, const int16x8_t s1, - const int16x4_t cospi_0_8_16_24, - int16x8_t *const d0, - int16x8_t *const d1) { - int32x4_t t32[6]; - - t32[4] = vmull_lane_s16(vget_low_s16(s1), cospi_0_8_16_24, 2); - t32[5] = vmull_lane_s16(vget_high_s16(s1), cospi_0_8_16_24, 2); - t32[0] = vmlsl_lane_s16(t32[4], vget_low_s16(s0), cospi_0_8_16_24, 2); - t32[1] = vmlsl_lane_s16(t32[5], vget_high_s16(s0), cospi_0_8_16_24, 2); - t32[2] = vmlal_lane_s16(t32[4], vget_low_s16(s0), cospi_0_8_16_24, 2); - t32[3] = vmlal_lane_s16(t32[5], vget_high_s16(s0), cospi_0_8_16_24, 2); - idct16x16_add_wrap_low_8x2(t32, d0, d1); -} - -static INLINE void idct16x16_add8x1(int16x8_t res, uint8_t **dest, - const int stride) { - uint8x8_t d = vld1_u8(*dest); - uint16x8_t q; - - res = vrshrq_n_s16(res, 6); - q = vaddw_u8(vreinterpretq_u16_s16(res), d); - d = vqmovun_s16(vreinterpretq_s16_u16(q)); - vst1_u8(*dest, d); - *dest += stride; -} - -#endif // VPX_DSP_ARM_IDCT_NEON_H_ diff --git a/WebRtc.NET/include/third_party/libvpx/source/libvpx/vpx_dsp/mips/convolve_common_dspr2.h b/WebRtc.NET/include/third_party/libvpx/source/libvpx/vpx_dsp/mips/convolve_common_dspr2.h deleted file mode 100644 index 4eee3bd5..00000000 --- a/WebRtc.NET/include/third_party/libvpx/source/libvpx/vpx_dsp/mips/convolve_common_dspr2.h +++ /dev/null @@ -1,58 +0,0 @@ -/* - * Copyright (c) 2013 The WebM project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef VPX_DSP_MIPS_VPX_COMMON_DSPR2_H_ -#define VPX_DSP_MIPS_VPX_COMMON_DSPR2_H_ - -#include - -#include "./vpx_config.h" -#include "vpx/vpx_integer.h" -#include "vpx_dsp/mips/common_dspr2.h" - -#ifdef __cplusplus -extern "C" { -#endif - -#if HAVE_DSPR2 -void vpx_convolve2_horiz_dspr2(const uint8_t *src, ptrdiff_t src_stride, - uint8_t *dst, ptrdiff_t dst_stride, - const int16_t *filter_x, int x_step_q4, - const int16_t *filter_y, int y_step_q4, int w, - int h); - -void vpx_convolve2_avg_horiz_dspr2(const uint8_t *src, ptrdiff_t src_stride, - uint8_t *dst, ptrdiff_t dst_stride, - const int16_t *filter_x, int x_step_q4, - const int16_t *filter_y, int y_step_q4, - int w, int h); - -void vpx_convolve2_avg_vert_dspr2(const uint8_t *src, ptrdiff_t src_stride, - uint8_t *dst, ptrdiff_t dst_stride, - const int16_t *filter_x, int x_step_q4, - const int16_t *filter_y, int y_step_q4, int w, - int h); - -void vpx_convolve2_dspr2(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, - ptrdiff_t dst_stride, const int16_t *filter, int w, - int h); - -void vpx_convolve2_vert_dspr2(const uint8_t *src, ptrdiff_t src_stride, - uint8_t *dst, ptrdiff_t dst_stride, - const int16_t *filter_x, int x_step_q4, - const int16_t *filter_y, int y_step_q4, int w, - int h); - -#endif // #if HAVE_DSPR2 -#ifdef __cplusplus -} // extern "C" -#endif - -#endif // VPX_DSP_MIPS_VPX_COMMON_DSPR2_H_ diff --git a/WebRtc.NET/include/third_party/libvpx/source/libvpx/vpx_dsp/mips/macros_msa.h b/WebRtc.NET/include/third_party/libvpx/source/libvpx/vpx_dsp/mips/macros_msa.h deleted file mode 100644 index 002e574a..00000000 --- a/WebRtc.NET/include/third_party/libvpx/source/libvpx/vpx_dsp/mips/macros_msa.h +++ /dev/null @@ -1,2071 +0,0 @@ -/* - * Copyright (c) 2015 The WebM project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef VPX_DSP_MIPS_MACROS_MSA_H_ -#define VPX_DSP_MIPS_MACROS_MSA_H_ - -#include - -#include "./vpx_config.h" -#include "vpx/vpx_integer.h" - -#define LD_B(RTYPE, psrc) *((const RTYPE *)(psrc)) -#define LD_UB(...) LD_B(v16u8, __VA_ARGS__) -#define LD_SB(...) LD_B(v16i8, __VA_ARGS__) - -#define LD_H(RTYPE, psrc) *((const RTYPE *)(psrc)) -#define LD_UH(...) LD_H(v8u16, __VA_ARGS__) -#define LD_SH(...) LD_H(v8i16, __VA_ARGS__) - -#define LD_W(RTYPE, psrc) *((const RTYPE *)(psrc)) -#define LD_SW(...) LD_W(v4i32, __VA_ARGS__) - -#define ST_B(RTYPE, in, pdst) *((RTYPE *)(pdst)) = (in) -#define ST_UB(...) ST_B(v16u8, __VA_ARGS__) -#define ST_SB(...) ST_B(v16i8, __VA_ARGS__) - -#define ST_H(RTYPE, in, pdst) *((RTYPE *)(pdst)) = (in) -#define ST_SH(...) ST_H(v8i16, __VA_ARGS__) - -#define ST_W(RTYPE, in, pdst) *((RTYPE *)(pdst)) = (in) -#define ST_SW(...) ST_W(v4i32, __VA_ARGS__) - -#if (__mips_isa_rev >= 6) -#define LH(psrc) \ - ({ \ - const uint8_t *psrc_m = (const uint8_t *)(psrc); \ - uint16_t val_m; \ - \ - __asm__ __volatile__("lh %[val_m], %[psrc_m] \n\t" \ - \ - : [val_m] "=r"(val_m) \ - : [psrc_m] "m"(*psrc_m)); \ - \ - val_m; \ - }) - -#define LW(psrc) \ - ({ \ - const uint8_t *psrc_m = (const uint8_t *)(psrc); \ - uint32_t val_m; \ - \ - __asm__ __volatile__("lw %[val_m], %[psrc_m] \n\t" \ - \ - : [val_m] "=r"(val_m) \ - : [psrc_m] "m"(*psrc_m)); \ - \ - val_m; \ - }) - -#if (__mips == 64) -#define LD(psrc) \ - ({ \ - const uint8_t *psrc_m = (const uint8_t *)(psrc); \ - uint64_t val_m = 0; \ - \ - __asm__ __volatile__("ld %[val_m], %[psrc_m] \n\t" \ - \ - : [val_m] "=r"(val_m) \ - : [psrc_m] "m"(*psrc_m)); \ - \ - val_m; \ - }) -#else // !(__mips == 64) -#define LD(psrc) \ - ({ \ - const uint8_t *psrc_m = (const uint8_t *)(psrc); \ - uint32_t val0_m, val1_m; \ - uint64_t val_m = 0; \ - \ - val0_m = LW(psrc_m); \ - val1_m = LW(psrc_m + 4); \ - \ - val_m = (uint64_t)(val1_m); \ - val_m = (uint64_t)((val_m << 32) & 0xFFFFFFFF00000000); \ - val_m = (uint64_t)(val_m | (uint64_t)val0_m); \ - \ - val_m; \ - }) -#endif // (__mips == 64) - -#define SH(val, pdst) \ - { \ - uint8_t *pdst_m = (uint8_t *)(pdst); \ - const uint16_t val_m = (val); \ - \ - __asm__ __volatile__("sh %[val_m], %[pdst_m] \n\t" \ - \ - : [pdst_m] "=m"(*pdst_m) \ - : [val_m] "r"(val_m)); \ - } - -#define SW(val, pdst) \ - { \ - uint8_t *pdst_m = (uint8_t *)(pdst); \ - const uint32_t val_m = (val); \ - \ - __asm__ __volatile__("sw %[val_m], %[pdst_m] \n\t" \ - \ - : [pdst_m] "=m"(*pdst_m) \ - : [val_m] "r"(val_m)); \ - } - -#define SD(val, pdst) \ - { \ - uint8_t *pdst_m = (uint8_t *)(pdst); \ - const uint64_t val_m = (val); \ - \ - __asm__ __volatile__("sd %[val_m], %[pdst_m] \n\t" \ - \ - : [pdst_m] "=m"(*pdst_m) \ - : [val_m] "r"(val_m)); \ - } -#else // !(__mips_isa_rev >= 6) -#define LH(psrc) \ - ({ \ - const uint8_t *psrc_m = (const uint8_t *)(psrc); \ - uint16_t val_m; \ - \ - __asm__ __volatile__("ulh %[val_m], %[psrc_m] \n\t" \ - \ - : [val_m] "=r"(val_m) \ - : [psrc_m] "m"(*psrc_m)); \ - \ - val_m; \ - }) - -#define LW(psrc) \ - ({ \ - const uint8_t *psrc_m = (const uint8_t *)(psrc); \ - uint32_t val_m; \ - \ - __asm__ __volatile__("ulw %[val_m], %[psrc_m] \n\t" \ - \ - : [val_m] "=r"(val_m) \ - : [psrc_m] "m"(*psrc_m)); \ - \ - val_m; \ - }) - -#if (__mips == 64) -#define LD(psrc) \ - ({ \ - const uint8_t *psrc_m = (const uint8_t *)(psrc); \ - uint64_t val_m = 0; \ - \ - __asm__ __volatile__("uld %[val_m], %[psrc_m] \n\t" \ - \ - : [val_m] "=r"(val_m) \ - : [psrc_m] "m"(*psrc_m)); \ - \ - val_m; \ - }) -#else // !(__mips == 64) -#define LD(psrc) \ - ({ \ - const uint8_t *psrc_m1 = (const uint8_t *)(psrc); \ - uint32_t val0_m, val1_m; \ - uint64_t val_m_combined = 0; \ - \ - val0_m = LW(psrc_m1); \ - val1_m = LW(psrc_m1 + 4); \ - \ - val_m_combined = (uint64_t)(val1_m); \ - val_m_combined = (uint64_t)((val_m_combined << 32) & 0xFFFFFFFF00000000); \ - val_m_combined = (uint64_t)(val_m_combined | (uint64_t)val0_m); \ - \ - val_m_combined; \ - }) -#endif // (__mips == 64) - -#define SH(val, pdst) \ - { \ - uint8_t *pdst_m = (uint8_t *)(pdst); \ - const uint16_t val_m = (val); \ - \ - __asm__ __volatile__("ush %[val_m], %[pdst_m] \n\t" \ - \ - : [pdst_m] "=m"(*pdst_m) \ - : [val_m] "r"(val_m)); \ - } - -#define SW(val, pdst) \ - { \ - uint8_t *pdst_m = (uint8_t *)(pdst); \ - const uint32_t val_m = (val); \ - \ - __asm__ __volatile__("usw %[val_m], %[pdst_m] \n\t" \ - \ - : [pdst_m] "=m"(*pdst_m) \ - : [val_m] "r"(val_m)); \ - } - -#define SD(val, pdst) \ - { \ - uint8_t *pdst_m1 = (uint8_t *)(pdst); \ - uint32_t val0_m, val1_m; \ - \ - val0_m = (uint32_t)((val)&0x00000000FFFFFFFF); \ - val1_m = (uint32_t)(((val) >> 32) & 0x00000000FFFFFFFF); \ - \ - SW(val0_m, pdst_m1); \ - SW(val1_m, pdst_m1 + 4); \ - } -#endif // (__mips_isa_rev >= 6) - -/* Description : Load 4 words with stride - Arguments : Inputs - psrc, stride - Outputs - out0, out1, out2, out3 - Details : Load word in 'out0' from (psrc) - Load word in 'out1' from (psrc + stride) - Load word in 'out2' from (psrc + 2 * stride) - Load word in 'out3' from (psrc + 3 * stride) -*/ -#define LW4(psrc, stride, out0, out1, out2, out3) \ - { \ - out0 = LW((psrc)); \ - out1 = LW((psrc) + stride); \ - out2 = LW((psrc) + 2 * stride); \ - out3 = LW((psrc) + 3 * stride); \ - } - -/* Description : Load double words with stride - Arguments : Inputs - psrc, stride - Outputs - out0, out1 - Details : Load double word in 'out0' from (psrc) - Load double word in 'out1' from (psrc + stride) -*/ -#define LD2(psrc, stride, out0, out1) \ - { \ - out0 = LD((psrc)); \ - out1 = LD((psrc) + stride); \ - } -#define LD4(psrc, stride, out0, out1, out2, out3) \ - { \ - LD2((psrc), stride, out0, out1); \ - LD2((psrc) + 2 * stride, stride, out2, out3); \ - } - -/* Description : Store 4 words with stride - Arguments : Inputs - in0, in1, in2, in3, pdst, stride - Details : Store word from 'in0' to (pdst) - Store word from 'in1' to (pdst + stride) - Store word from 'in2' to (pdst + 2 * stride) - Store word from 'in3' to (pdst + 3 * stride) -*/ -#define SW4(in0, in1, in2, in3, pdst, stride) \ - { \ - SW(in0, (pdst)) \ - SW(in1, (pdst) + stride); \ - SW(in2, (pdst) + 2 * stride); \ - SW(in3, (pdst) + 3 * stride); \ - } - -/* Description : Store 4 double words with stride - Arguments : Inputs - in0, in1, in2, in3, pdst, stride - Details : Store double word from 'in0' to (pdst) - Store double word from 'in1' to (pdst + stride) - Store double word from 'in2' to (pdst + 2 * stride) - Store double word from 'in3' to (pdst + 3 * stride) -*/ -#define SD4(in0, in1, in2, in3, pdst, stride) \ - { \ - SD(in0, (pdst)) \ - SD(in1, (pdst) + stride); \ - SD(in2, (pdst) + 2 * stride); \ - SD(in3, (pdst) + 3 * stride); \ - } - -/* Description : Load vectors with 16 byte elements with stride - Arguments : Inputs - psrc, stride - Outputs - out0, out1 - Return Type - as per RTYPE - Details : Load 16 byte elements in 'out0' from (psrc) - Load 16 byte elements in 'out1' from (psrc + stride) -*/ -#define LD_B2(RTYPE, psrc, stride, out0, out1) \ - { \ - out0 = LD_B(RTYPE, (psrc)); \ - out1 = LD_B(RTYPE, (psrc) + stride); \ - } -#define LD_UB2(...) LD_B2(v16u8, __VA_ARGS__) -#define LD_SB2(...) LD_B2(v16i8, __VA_ARGS__) - -#define LD_B3(RTYPE, psrc, stride, out0, out1, out2) \ - { \ - LD_B2(RTYPE, (psrc), stride, out0, out1); \ - out2 = LD_B(RTYPE, (psrc) + 2 * stride); \ - } -#define LD_UB3(...) LD_B3(v16u8, __VA_ARGS__) - -#define LD_B4(RTYPE, psrc, stride, out0, out1, out2, out3) \ - { \ - LD_B2(RTYPE, (psrc), stride, out0, out1); \ - LD_B2(RTYPE, (psrc) + 2 * stride, stride, out2, out3); \ - } -#define LD_UB4(...) LD_B4(v16u8, __VA_ARGS__) -#define LD_SB4(...) LD_B4(v16i8, __VA_ARGS__) - -#define LD_B5(RTYPE, psrc, stride, out0, out1, out2, out3, out4) \ - { \ - LD_B4(RTYPE, (psrc), stride, out0, out1, out2, out3); \ - out4 = LD_B(RTYPE, (psrc) + 4 * stride); \ - } -#define LD_UB5(...) LD_B5(v16u8, __VA_ARGS__) -#define LD_SB5(...) LD_B5(v16i8, __VA_ARGS__) - -#define LD_B7(RTYPE, psrc, stride, out0, out1, out2, out3, out4, out5, out6) \ - { \ - LD_B5(RTYPE, (psrc), stride, out0, out1, out2, out3, out4); \ - LD_B2(RTYPE, (psrc) + 5 * stride, stride, out5, out6); \ - } -#define LD_SB7(...) LD_B7(v16i8, __VA_ARGS__) - -#define LD_B8(RTYPE, psrc, stride, out0, out1, out2, out3, out4, out5, out6, \ - out7) \ - { \ - LD_B4(RTYPE, (psrc), stride, out0, out1, out2, out3); \ - LD_B4(RTYPE, (psrc) + 4 * stride, stride, out4, out5, out6, out7); \ - } -#define LD_UB8(...) LD_B8(v16u8, __VA_ARGS__) -#define LD_SB8(...) LD_B8(v16i8, __VA_ARGS__) - -/* Description : Load vectors with 8 halfword elements with stride - Arguments : Inputs - psrc, stride - Outputs - out0, out1 - Details : Load 8 halfword elements in 'out0' from (psrc) - Load 8 halfword elements in 'out1' from (psrc + stride) -*/ -#define LD_H2(RTYPE, psrc, stride, out0, out1) \ - { \ - out0 = LD_H(RTYPE, (psrc)); \ - out1 = LD_H(RTYPE, (psrc) + (stride)); \ - } -#define LD_SH2(...) LD_H2(v8i16, __VA_ARGS__) - -#define LD_H4(RTYPE, psrc, stride, out0, out1, out2, out3) \ - { \ - LD_H2(RTYPE, (psrc), stride, out0, out1); \ - LD_H2(RTYPE, (psrc) + 2 * stride, stride, out2, out3); \ - } -#define LD_SH4(...) LD_H4(v8i16, __VA_ARGS__) - -#define LD_H8(RTYPE, psrc, stride, out0, out1, out2, out3, out4, out5, out6, \ - out7) \ - { \ - LD_H4(RTYPE, (psrc), stride, out0, out1, out2, out3); \ - LD_H4(RTYPE, (psrc) + 4 * stride, stride, out4, out5, out6, out7); \ - } -#define LD_SH8(...) LD_H8(v8i16, __VA_ARGS__) - -#define LD_H16(RTYPE, psrc, stride, out0, out1, out2, out3, out4, out5, out6, \ - out7, out8, out9, out10, out11, out12, out13, out14, out15) \ - { \ - LD_H8(RTYPE, (psrc), stride, out0, out1, out2, out3, out4, out5, out6, \ - out7); \ - LD_H8(RTYPE, (psrc) + 8 * stride, stride, out8, out9, out10, out11, out12, \ - out13, out14, out15); \ - } -#define LD_SH16(...) LD_H16(v8i16, __VA_ARGS__) - -/* Description : Load 4x4 block of signed halfword elements from 1D source - data into 4 vectors (Each vector with 4 signed halfwords) - Arguments : Input - psrc - Outputs - out0, out1, out2, out3 -*/ -#define LD4x4_SH(psrc, out0, out1, out2, out3) \ - { \ - out0 = LD_SH(psrc); \ - out2 = LD_SH(psrc + 8); \ - out1 = (v8i16)__msa_ilvl_d((v2i64)out0, (v2i64)out0); \ - out3 = (v8i16)__msa_ilvl_d((v2i64)out2, (v2i64)out2); \ - } - -/* Description : Load 2 vectors of signed word elements with stride - Arguments : Inputs - psrc, stride - Outputs - out0, out1 - Return Type - signed word -*/ -#define LD_SW2(psrc, stride, out0, out1) \ - { \ - out0 = LD_SW((psrc)); \ - out1 = LD_SW((psrc) + stride); \ - } - -/* Description : Store vectors of 16 byte elements with stride - Arguments : Inputs - in0, in1, pdst, stride - Details : Store 16 byte elements from 'in0' to (pdst) - Store 16 byte elements from 'in1' to (pdst + stride) -*/ -#define ST_B2(RTYPE, in0, in1, pdst, stride) \ - { \ - ST_B(RTYPE, in0, (pdst)); \ - ST_B(RTYPE, in1, (pdst) + stride); \ - } -#define ST_UB2(...) ST_B2(v16u8, __VA_ARGS__) - -#define ST_B4(RTYPE, in0, in1, in2, in3, pdst, stride) \ - { \ - ST_B2(RTYPE, in0, in1, (pdst), stride); \ - ST_B2(RTYPE, in2, in3, (pdst) + 2 * stride, stride); \ - } -#define ST_UB4(...) ST_B4(v16u8, __VA_ARGS__) - -#define ST_B8(RTYPE, in0, in1, in2, in3, in4, in5, in6, in7, pdst, stride) \ - { \ - ST_B4(RTYPE, in0, in1, in2, in3, pdst, stride); \ - ST_B4(RTYPE, in4, in5, in6, in7, (pdst) + 4 * stride, stride); \ - } -#define ST_UB8(...) ST_B8(v16u8, __VA_ARGS__) - -/* Description : Store vectors of 8 halfword elements with stride - Arguments : Inputs - in0, in1, pdst, stride - Details : Store 8 halfword elements from 'in0' to (pdst) - Store 8 halfword elements from 'in1' to (pdst + stride) -*/ -#define ST_H2(RTYPE, in0, in1, pdst, stride) \ - { \ - ST_H(RTYPE, in0, (pdst)); \ - ST_H(RTYPE, in1, (pdst) + stride); \ - } -#define ST_SH2(...) ST_H2(v8i16, __VA_ARGS__) - -#define ST_H4(RTYPE, in0, in1, in2, in3, pdst, stride) \ - { \ - ST_H2(RTYPE, in0, in1, (pdst), stride); \ - ST_H2(RTYPE, in2, in3, (pdst) + 2 * stride, stride); \ - } -#define ST_SH4(...) ST_H4(v8i16, __VA_ARGS__) - -#define ST_H8(RTYPE, in0, in1, in2, in3, in4, in5, in6, in7, pdst, stride) \ - { \ - ST_H4(RTYPE, in0, in1, in2, in3, (pdst), stride); \ - ST_H4(RTYPE, in4, in5, in6, in7, (pdst) + 4 * stride, stride); \ - } -#define ST_SH8(...) ST_H8(v8i16, __VA_ARGS__) - -/* Description : Store vectors of word elements with stride - Arguments : Inputs - in0, in1, pdst, stride - Details : Store 4 word elements from 'in0' to (pdst) - Store 4 word elements from 'in1' to (pdst + stride) -*/ -#define ST_SW2(in0, in1, pdst, stride) \ - { \ - ST_SW(in0, (pdst)); \ - ST_SW(in1, (pdst) + stride); \ - } - -/* Description : Store 2x4 byte block to destination memory from input vector - Arguments : Inputs - in, stidx, pdst, stride - Details : Index 'stidx' halfword element from 'in' vector is copied to - the GP register and stored to (pdst) - Index 'stidx+1' halfword element from 'in' vector is copied to - the GP register and stored to (pdst + stride) - Index 'stidx+2' halfword element from 'in' vector is copied to - the GP register and stored to (pdst + 2 * stride) - Index 'stidx+3' halfword element from 'in' vector is copied to - the GP register and stored to (pdst + 3 * stride) -*/ -#define ST2x4_UB(in, stidx, pdst, stride) \ - { \ - uint16_t out0_m, out1_m, out2_m, out3_m; \ - uint8_t *pblk_2x4_m = (uint8_t *)(pdst); \ - \ - out0_m = __msa_copy_u_h((v8i16)in, (stidx)); \ - out1_m = __msa_copy_u_h((v8i16)in, (stidx + 1)); \ - out2_m = __msa_copy_u_h((v8i16)in, (stidx + 2)); \ - out3_m = __msa_copy_u_h((v8i16)in, (stidx + 3)); \ - \ - SH(out0_m, pblk_2x4_m); \ - SH(out1_m, pblk_2x4_m + stride); \ - SH(out2_m, pblk_2x4_m + 2 * stride); \ - SH(out3_m, pblk_2x4_m + 3 * stride); \ - } - -/* Description : Store 4x2 byte block to destination memory from input vector - Arguments : Inputs - in, pdst, stride - Details : Index 0 word element from 'in' vector is copied to the GP - register and stored to (pdst) - Index 1 word element from 'in' vector is copied to the GP - register and stored to (pdst + stride) -*/ -#define ST4x2_UB(in, pdst, stride) \ - { \ - uint32_t out0_m, out1_m; \ - uint8_t *pblk_4x2_m = (uint8_t *)(pdst); \ - \ - out0_m = __msa_copy_u_w((v4i32)in, 0); \ - out1_m = __msa_copy_u_w((v4i32)in, 1); \ - \ - SW(out0_m, pblk_4x2_m); \ - SW(out1_m, pblk_4x2_m + stride); \ - } - -/* Description : Store 4x4 byte block to destination memory from input vector - Arguments : Inputs - in0, in1, pdst, stride - Details : 'Idx0' word element from input vector 'in0' is copied to the - GP register and stored to (pdst) - 'Idx1' word element from input vector 'in0' is copied to the - GP register and stored to (pdst + stride) - 'Idx2' word element from input vector 'in0' is copied to the - GP register and stored to (pdst + 2 * stride) - 'Idx3' word element from input vector 'in0' is copied to the - GP register and stored to (pdst + 3 * stride) -*/ -#define ST4x4_UB(in0, in1, idx0, idx1, idx2, idx3, pdst, stride) \ - { \ - uint32_t out0_m, out1_m, out2_m, out3_m; \ - uint8_t *pblk_4x4_m = (uint8_t *)(pdst); \ - \ - out0_m = __msa_copy_u_w((v4i32)in0, idx0); \ - out1_m = __msa_copy_u_w((v4i32)in0, idx1); \ - out2_m = __msa_copy_u_w((v4i32)in1, idx2); \ - out3_m = __msa_copy_u_w((v4i32)in1, idx3); \ - \ - SW4(out0_m, out1_m, out2_m, out3_m, pblk_4x4_m, stride); \ - } -#define ST4x8_UB(in0, in1, pdst, stride) \ - { \ - uint8_t *pblk_4x8 = (uint8_t *)(pdst); \ - \ - ST4x4_UB(in0, in0, 0, 1, 2, 3, pblk_4x8, stride); \ - ST4x4_UB(in1, in1, 0, 1, 2, 3, pblk_4x8 + 4 * stride, stride); \ - } - -/* Description : Store 8x1 byte block to destination memory from input vector - Arguments : Inputs - in, pdst - Details : Index 0 double word element from 'in' vector is copied to the - GP register and stored to (pdst) -*/ -#define ST8x1_UB(in, pdst) \ - { \ - uint64_t out0_m; \ - \ - out0_m = __msa_copy_u_d((v2i64)in, 0); \ - SD(out0_m, pdst); \ - } - -/* Description : Store 8x2 byte block to destination memory from input vector - Arguments : Inputs - in, pdst, stride - Details : Index 0 double word element from 'in' vector is copied to the - GP register and stored to (pdst) - Index 1 double word element from 'in' vector is copied to the - GP register and stored to (pdst + stride) -*/ -#define ST8x2_UB(in, pdst, stride) \ - { \ - uint64_t out0_m, out1_m; \ - uint8_t *pblk_8x2_m = (uint8_t *)(pdst); \ - \ - out0_m = __msa_copy_u_d((v2i64)in, 0); \ - out1_m = __msa_copy_u_d((v2i64)in, 1); \ - \ - SD(out0_m, pblk_8x2_m); \ - SD(out1_m, pblk_8x2_m + stride); \ - } - -/* Description : Store 8x4 byte block to destination memory from input - vectors - Arguments : Inputs - in0, in1, pdst, stride - Details : Index 0 double word element from 'in0' vector is copied to the - GP register and stored to (pdst) - Index 1 double word element from 'in0' vector is copied to the - GP register and stored to (pdst + stride) - Index 0 double word element from 'in1' vector is copied to the - GP register and stored to (pdst + 2 * stride) - Index 1 double word element from 'in1' vector is copied to the - GP register and stored to (pdst + 3 * stride) -*/ -#define ST8x4_UB(in0, in1, pdst, stride) \ - { \ - uint64_t out0_m, out1_m, out2_m, out3_m; \ - uint8_t *pblk_8x4_m = (uint8_t *)(pdst); \ - \ - out0_m = __msa_copy_u_d((v2i64)in0, 0); \ - out1_m = __msa_copy_u_d((v2i64)in0, 1); \ - out2_m = __msa_copy_u_d((v2i64)in1, 0); \ - out3_m = __msa_copy_u_d((v2i64)in1, 1); \ - \ - SD4(out0_m, out1_m, out2_m, out3_m, pblk_8x4_m, stride); \ - } - -/* Description : average with rounding (in0 + in1 + 1) / 2. - Arguments : Inputs - in0, in1, in2, in3, - Outputs - out0, out1 - Return Type - as per RTYPE - Details : Each unsigned byte element from 'in0' vector is added with - each unsigned byte element from 'in1' vector. Then the average - with rounding is calculated and written to 'out0' -*/ -#define AVER_UB2(RTYPE, in0, in1, in2, in3, out0, out1) \ - { \ - out0 = (RTYPE)__msa_aver_u_b((v16u8)in0, (v16u8)in1); \ - out1 = (RTYPE)__msa_aver_u_b((v16u8)in2, (v16u8)in3); \ - } -#define AVER_UB2_UB(...) AVER_UB2(v16u8, __VA_ARGS__) - -#define AVER_UB4(RTYPE, in0, in1, in2, in3, in4, in5, in6, in7, out0, out1, \ - out2, out3) \ - { \ - AVER_UB2(RTYPE, in0, in1, in2, in3, out0, out1) \ - AVER_UB2(RTYPE, in4, in5, in6, in7, out2, out3) \ - } -#define AVER_UB4_UB(...) AVER_UB4(v16u8, __VA_ARGS__) - -/* Description : Immediate number of elements to slide with zero - Arguments : Inputs - in0, in1, slide_val - Outputs - out0, out1 - Return Type - as per RTYPE - Details : Byte elements from 'zero_m' vector are slid into 'in0' by - value specified in the 'slide_val' -*/ -#define SLDI_B2_0(RTYPE, in0, in1, out0, out1, slide_val) \ - { \ - v16i8 zero_m = { 0 }; \ - out0 = (RTYPE)__msa_sldi_b((v16i8)zero_m, (v16i8)in0, slide_val); \ - out1 = (RTYPE)__msa_sldi_b((v16i8)zero_m, (v16i8)in1, slide_val); \ - } -#define SLDI_B2_0_SW(...) SLDI_B2_0(v4i32, __VA_ARGS__) - -#define SLDI_B4_0(RTYPE, in0, in1, in2, in3, out0, out1, out2, out3, \ - slide_val) \ - { \ - SLDI_B2_0(RTYPE, in0, in1, out0, out1, slide_val); \ - SLDI_B2_0(RTYPE, in2, in3, out2, out3, slide_val); \ - } -#define SLDI_B4_0_UB(...) SLDI_B4_0(v16u8, __VA_ARGS__) - -/* Description : Immediate number of elements to slide - Arguments : Inputs - in0_0, in0_1, in1_0, in1_1, slide_val - Outputs - out0, out1 - Return Type - as per RTYPE - Details : Byte elements from 'in0_0' vector are slid into 'in1_0' by - value specified in the 'slide_val' -*/ -#define SLDI_B2(RTYPE, in0_0, in0_1, in1_0, in1_1, out0, out1, slide_val) \ - { \ - out0 = (RTYPE)__msa_sldi_b((v16i8)in0_0, (v16i8)in1_0, slide_val); \ - out1 = (RTYPE)__msa_sldi_b((v16i8)in0_1, (v16i8)in1_1, slide_val); \ - } -#define SLDI_B2_UB(...) SLDI_B2(v16u8, __VA_ARGS__) -#define SLDI_B2_SH(...) SLDI_B2(v8i16, __VA_ARGS__) - -#define SLDI_B3(RTYPE, in0_0, in0_1, in0_2, in1_0, in1_1, in1_2, out0, out1, \ - out2, slide_val) \ - { \ - SLDI_B2(RTYPE, in0_0, in0_1, in1_0, in1_1, out0, out1, slide_val) \ - out2 = (RTYPE)__msa_sldi_b((v16i8)in0_2, (v16i8)in1_2, slide_val); \ - } -#define SLDI_B3_SB(...) SLDI_B3(v16i8, __VA_ARGS__) -#define SLDI_B3_UH(...) SLDI_B3(v8u16, __VA_ARGS__) - -/* Description : Shuffle byte vector elements as per mask vector - Arguments : Inputs - in0, in1, in2, in3, mask0, mask1 - Outputs - out0, out1 - Return Type - as per RTYPE - Details : Byte elements from 'in0' & 'in1' are copied selectively to - 'out0' as per control vector 'mask0' -*/ -#define VSHF_B2(RTYPE, in0, in1, in2, in3, mask0, mask1, out0, out1) \ - { \ - out0 = (RTYPE)__msa_vshf_b((v16i8)mask0, (v16i8)in1, (v16i8)in0); \ - out1 = (RTYPE)__msa_vshf_b((v16i8)mask1, (v16i8)in3, (v16i8)in2); \ - } -#define VSHF_B2_UB(...) VSHF_B2(v16u8, __VA_ARGS__) -#define VSHF_B2_SB(...) VSHF_B2(v16i8, __VA_ARGS__) -#define VSHF_B2_UH(...) VSHF_B2(v8u16, __VA_ARGS__) - -#define VSHF_B4(RTYPE, in0, in1, mask0, mask1, mask2, mask3, out0, out1, out2, \ - out3) \ - { \ - VSHF_B2(RTYPE, in0, in1, in0, in1, mask0, mask1, out0, out1); \ - VSHF_B2(RTYPE, in0, in1, in0, in1, mask2, mask3, out2, out3); \ - } -#define VSHF_B4_SB(...) VSHF_B4(v16i8, __VA_ARGS__) -#define VSHF_B4_SH(...) VSHF_B4(v8i16, __VA_ARGS__) - -/* Description : Dot product of byte vector elements - Arguments : Inputs - mult0, mult1, cnst0, cnst1 - Outputs - out0, out1 - Return Type - as per RTYPE - Details : Unsigned byte elements from 'mult0' are multiplied with - unsigned byte elements from 'cnst0' producing a result - twice the size of input i.e. unsigned halfword. - The multiplication result of adjacent odd-even elements - are added together and written to the 'out0' vector -*/ -#define DOTP_UB2(RTYPE, mult0, mult1, cnst0, cnst1, out0, out1) \ - { \ - out0 = (RTYPE)__msa_dotp_u_h((v16u8)mult0, (v16u8)cnst0); \ - out1 = (RTYPE)__msa_dotp_u_h((v16u8)mult1, (v16u8)cnst1); \ - } -#define DOTP_UB2_UH(...) DOTP_UB2(v8u16, __VA_ARGS__) - -#define DOTP_UB4(RTYPE, mult0, mult1, mult2, mult3, cnst0, cnst1, cnst2, \ - cnst3, out0, out1, out2, out3) \ - { \ - DOTP_UB2(RTYPE, mult0, mult1, cnst0, cnst1, out0, out1); \ - DOTP_UB2(RTYPE, mult2, mult3, cnst2, cnst3, out2, out3); \ - } -#define DOTP_UB4_UH(...) DOTP_UB4(v8u16, __VA_ARGS__) - -/* Description : Dot product of byte vector elements - Arguments : Inputs - mult0, mult1, cnst0, cnst1 - Outputs - out0, out1 - Return Type - as per RTYPE - Details : Signed byte elements from 'mult0' are multiplied with - signed byte elements from 'cnst0' producing a result - twice the size of input i.e. signed halfword. - The multiplication result of adjacent odd-even elements - are added together and written to the 'out0' vector -*/ -#define DOTP_SB2(RTYPE, mult0, mult1, cnst0, cnst1, out0, out1) \ - { \ - out0 = (RTYPE)__msa_dotp_s_h((v16i8)mult0, (v16i8)cnst0); \ - out1 = (RTYPE)__msa_dotp_s_h((v16i8)mult1, (v16i8)cnst1); \ - } -#define DOTP_SB2_SH(...) DOTP_SB2(v8i16, __VA_ARGS__) - -#define DOTP_SB4(RTYPE, mult0, mult1, mult2, mult3, cnst0, cnst1, cnst2, \ - cnst3, out0, out1, out2, out3) \ - { \ - DOTP_SB2(RTYPE, mult0, mult1, cnst0, cnst1, out0, out1); \ - DOTP_SB2(RTYPE, mult2, mult3, cnst2, cnst3, out2, out3); \ - } -#define DOTP_SB4_SH(...) DOTP_SB4(v8i16, __VA_ARGS__) - -/* Description : Dot product of halfword vector elements - Arguments : Inputs - mult0, mult1, cnst0, cnst1 - Outputs - out0, out1 - Return Type - as per RTYPE - Details : Signed halfword elements from 'mult0' are multiplied with - signed halfword elements from 'cnst0' producing a result - twice the size of input i.e. signed word. - The multiplication result of adjacent odd-even elements - are added together and written to the 'out0' vector -*/ -#define DOTP_SH2(RTYPE, mult0, mult1, cnst0, cnst1, out0, out1) \ - { \ - out0 = (RTYPE)__msa_dotp_s_w((v8i16)mult0, (v8i16)cnst0); \ - out1 = (RTYPE)__msa_dotp_s_w((v8i16)mult1, (v8i16)cnst1); \ - } -#define DOTP_SH2_SW(...) DOTP_SH2(v4i32, __VA_ARGS__) - -#define DOTP_SH4(RTYPE, mult0, mult1, mult2, mult3, cnst0, cnst1, cnst2, \ - cnst3, out0, out1, out2, out3) \ - { \ - DOTP_SH2(RTYPE, mult0, mult1, cnst0, cnst1, out0, out1); \ - DOTP_SH2(RTYPE, mult2, mult3, cnst2, cnst3, out2, out3); \ - } -#define DOTP_SH4_SW(...) DOTP_SH4(v4i32, __VA_ARGS__) - -/* Description : Dot product of word vector elements - Arguments : Inputs - mult0, mult1, cnst0, cnst1 - Outputs - out0, out1 - Return Type - as per RTYPE - Details : Signed word elements from 'mult0' are multiplied with - signed word elements from 'cnst0' producing a result - twice the size of input i.e. signed double word. - The multiplication result of adjacent odd-even elements - are added together and written to the 'out0' vector -*/ -#define DOTP_SW2(RTYPE, mult0, mult1, cnst0, cnst1, out0, out1) \ - { \ - out0 = (RTYPE)__msa_dotp_s_d((v4i32)mult0, (v4i32)cnst0); \ - out1 = (RTYPE)__msa_dotp_s_d((v4i32)mult1, (v4i32)cnst1); \ - } -#define DOTP_SW2_SD(...) DOTP_SW2(v2i64, __VA_ARGS__) - -/* Description : Dot product & addition of byte vector elements - Arguments : Inputs - mult0, mult1, cnst0, cnst1 - Outputs - out0, out1 - Return Type - as per RTYPE - Details : Signed byte elements from 'mult0' are multiplied with - signed byte elements from 'cnst0' producing a result - twice the size of input i.e. signed halfword. - The multiplication result of adjacent odd-even elements - are added to the 'out0' vector -*/ -#define DPADD_SB2(RTYPE, mult0, mult1, cnst0, cnst1, out0, out1) \ - { \ - out0 = (RTYPE)__msa_dpadd_s_h((v8i16)out0, (v16i8)mult0, (v16i8)cnst0); \ - out1 = (RTYPE)__msa_dpadd_s_h((v8i16)out1, (v16i8)mult1, (v16i8)cnst1); \ - } -#define DPADD_SB2_SH(...) DPADD_SB2(v8i16, __VA_ARGS__) - -#define DPADD_SB4(RTYPE, mult0, mult1, mult2, mult3, cnst0, cnst1, cnst2, \ - cnst3, out0, out1, out2, out3) \ - { \ - DPADD_SB2(RTYPE, mult0, mult1, cnst0, cnst1, out0, out1); \ - DPADD_SB2(RTYPE, mult2, mult3, cnst2, cnst3, out2, out3); \ - } -#define DPADD_SB4_SH(...) DPADD_SB4(v8i16, __VA_ARGS__) - -/* Description : Dot product & addition of halfword vector elements - Arguments : Inputs - mult0, mult1, cnst0, cnst1 - Outputs - out0, out1 - Return Type - as per RTYPE - Details : Signed halfword elements from 'mult0' are multiplied with - signed halfword elements from 'cnst0' producing a result - twice the size of input i.e. signed word. - The multiplication result of adjacent odd-even elements - are added to the 'out0' vector -*/ -#define DPADD_SH2(RTYPE, mult0, mult1, cnst0, cnst1, out0, out1) \ - { \ - out0 = (RTYPE)__msa_dpadd_s_w((v4i32)out0, (v8i16)mult0, (v8i16)cnst0); \ - out1 = (RTYPE)__msa_dpadd_s_w((v4i32)out1, (v8i16)mult1, (v8i16)cnst1); \ - } -#define DPADD_SH2_SW(...) DPADD_SH2(v4i32, __VA_ARGS__) - -/* Description : Dot product & addition of double word vector elements - Arguments : Inputs - mult0, mult1 - Outputs - out0, out1 - Return Type - as per RTYPE - Details : Each signed word element from 'mult0' is multiplied with itself - producing an intermediate result twice the size of input - i.e. signed double word - The multiplication result of adjacent odd-even elements - are added to the 'out0' vector -*/ -#define DPADD_SD2(RTYPE, mult0, mult1, out0, out1) \ - { \ - out0 = (RTYPE)__msa_dpadd_s_d((v2i64)out0, (v4i32)mult0, (v4i32)mult0); \ - out1 = (RTYPE)__msa_dpadd_s_d((v2i64)out1, (v4i32)mult1, (v4i32)mult1); \ - } -#define DPADD_SD2_SD(...) DPADD_SD2(v2i64, __VA_ARGS__) - -/* Description : Minimum values between unsigned elements of - either vector are copied to the output vector - Arguments : Inputs - in0, in1, min_vec - Outputs - in place operation - Return Type - as per RTYPE - Details : Minimum of unsigned halfword element values from 'in0' and - 'min_vec' are written to output vector 'in0' -*/ -#define MIN_UH2(RTYPE, in0, in1, min_vec) \ - { \ - in0 = (RTYPE)__msa_min_u_h((v8u16)in0, min_vec); \ - in1 = (RTYPE)__msa_min_u_h((v8u16)in1, min_vec); \ - } -#define MIN_UH2_UH(...) MIN_UH2(v8u16, __VA_ARGS__) - -#define MIN_UH4(RTYPE, in0, in1, in2, in3, min_vec) \ - { \ - MIN_UH2(RTYPE, in0, in1, min_vec); \ - MIN_UH2(RTYPE, in2, in3, min_vec); \ - } -#define MIN_UH4_UH(...) MIN_UH4(v8u16, __VA_ARGS__) - -/* Description : Clips all signed halfword elements of input vector - between 0 & 255 - Arguments : Input - in - Output - out_m - Return Type - signed halfword -*/ -#define CLIP_SH_0_255(in) \ - ({ \ - v8i16 max_m = __msa_ldi_h(255); \ - v8i16 out_m; \ - \ - out_m = __msa_maxi_s_h((v8i16)in, 0); \ - out_m = __msa_min_s_h((v8i16)max_m, (v8i16)out_m); \ - out_m; \ - }) -#define CLIP_SH2_0_255(in0, in1) \ - { \ - in0 = CLIP_SH_0_255(in0); \ - in1 = CLIP_SH_0_255(in1); \ - } -#define CLIP_SH4_0_255(in0, in1, in2, in3) \ - { \ - CLIP_SH2_0_255(in0, in1); \ - CLIP_SH2_0_255(in2, in3); \ - } - -/* Description : Horizontal addition of 4 signed word elements of input vector - Arguments : Input - in (signed word vector) - Output - sum_m (i32 sum) - Return Type - signed word (GP) - Details : 4 signed word elements of 'in' vector are added together and - the resulting integer sum is returned -*/ -#define HADD_SW_S32(in) \ - ({ \ - v2i64 res0_m, res1_m; \ - int32_t sum_m; \ - \ - res0_m = __msa_hadd_s_d((v4i32)in, (v4i32)in); \ - res1_m = __msa_splati_d(res0_m, 1); \ - res0_m = res0_m + res1_m; \ - sum_m = __msa_copy_s_w((v4i32)res0_m, 0); \ - sum_m; \ - }) - -/* Description : Horizontal addition of 4 unsigned word elements - Arguments : Input - in (unsigned word vector) - Output - sum_m (u32 sum) - Return Type - unsigned word (GP) - Details : 4 unsigned word elements of 'in' vector are added together and - the resulting integer sum is returned -*/ -#define HADD_UW_U32(in) \ - ({ \ - v2u64 res0_m, res1_m; \ - uint32_t sum_m; \ - \ - res0_m = __msa_hadd_u_d((v4u32)in, (v4u32)in); \ - res1_m = (v2u64)__msa_splati_d((v2i64)res0_m, 1); \ - res0_m += res1_m; \ - sum_m = __msa_copy_u_w((v4i32)res0_m, 0); \ - sum_m; \ - }) - -/* Description : Horizontal addition of 8 unsigned halfword elements - Arguments : Input - in (unsigned halfword vector) - Output - sum_m (u32 sum) - Return Type - unsigned word - Details : 8 unsigned halfword elements of 'in' vector are added - together and the resulting integer sum is returned -*/ -#define HADD_UH_U32(in) \ - ({ \ - v4u32 res_m; \ - uint32_t sum_m; \ - \ - res_m = __msa_hadd_u_w((v8u16)in, (v8u16)in); \ - sum_m = HADD_UW_U32(res_m); \ - sum_m; \ - }) - -/* Description : Horizontal addition of unsigned byte vector elements - Arguments : Inputs - in0, in1 - Outputs - out0, out1 - Return Type - as per RTYPE - Details : Each unsigned odd byte element from 'in0' is added to - even unsigned byte element from 'in0' (pairwise) and the - halfword result is written to 'out0' -*/ -#define HADD_UB2(RTYPE, in0, in1, out0, out1) \ - { \ - out0 = (RTYPE)__msa_hadd_u_h((v16u8)in0, (v16u8)in0); \ - out1 = (RTYPE)__msa_hadd_u_h((v16u8)in1, (v16u8)in1); \ - } -#define HADD_UB2_UH(...) HADD_UB2(v8u16, __VA_ARGS__) - -#define HADD_UB4(RTYPE, in0, in1, in2, in3, out0, out1, out2, out3) \ - { \ - HADD_UB2(RTYPE, in0, in1, out0, out1); \ - HADD_UB2(RTYPE, in2, in3, out2, out3); \ - } -#define HADD_UB4_UH(...) HADD_UB4(v8u16, __VA_ARGS__) - -/* Description : Horizontal subtraction of unsigned byte vector elements - Arguments : Inputs - in0, in1 - Outputs - out0, out1 - Return Type - as per RTYPE - Details : Each unsigned odd byte element from 'in0' is subtracted from - even unsigned byte element from 'in0' (pairwise) and the - halfword result is written to 'out0' -*/ -#define HSUB_UB2(RTYPE, in0, in1, out0, out1) \ - { \ - out0 = (RTYPE)__msa_hsub_u_h((v16u8)in0, (v16u8)in0); \ - out1 = (RTYPE)__msa_hsub_u_h((v16u8)in1, (v16u8)in1); \ - } -#define HSUB_UB2_SH(...) HSUB_UB2(v8i16, __VA_ARGS__) - -/* Description : SAD (Sum of Absolute Difference) - Arguments : Inputs - in0, in1, ref0, ref1 - Outputs - sad_m (halfword vector) - Return Type - unsigned halfword - Details : Absolute difference of all the byte elements from 'in0' with - 'ref0' is calculated and preserved in 'diff0'. Then even-odd - pairs are added together to generate 8 halfword results. -*/ -#define SAD_UB2_UH(in0, in1, ref0, ref1) \ - ({ \ - v16u8 diff0_m, diff1_m; \ - v8u16 sad_m = { 0 }; \ - \ - diff0_m = __msa_asub_u_b((v16u8)in0, (v16u8)ref0); \ - diff1_m = __msa_asub_u_b((v16u8)in1, (v16u8)ref1); \ - \ - sad_m += __msa_hadd_u_h((v16u8)diff0_m, (v16u8)diff0_m); \ - sad_m += __msa_hadd_u_h((v16u8)diff1_m, (v16u8)diff1_m); \ - \ - sad_m; \ - }) - -/* Description : Horizontal subtraction of signed halfword vector elements - Arguments : Inputs - in0, in1 - Outputs - out0, out1 - Return Type - as per RTYPE - Details : Each signed odd halfword element from 'in0' is subtracted from - even signed halfword element from 'in0' (pairwise) and the - word result is written to 'out0' -*/ -#define HSUB_UH2(RTYPE, in0, in1, out0, out1) \ - { \ - out0 = (RTYPE)__msa_hsub_s_w((v8i16)in0, (v8i16)in0); \ - out1 = (RTYPE)__msa_hsub_s_w((v8i16)in1, (v8i16)in1); \ - } -#define HSUB_UH2_SW(...) HSUB_UH2(v4i32, __VA_ARGS__) - -/* Description : Set element n input vector to GPR value - Arguments : Inputs - in0, in1, in2, in3 - Output - out - Return Type - as per RTYPE - Details : Set element 0 in vector 'out' to value specified in 'in0' -*/ -#define INSERT_W2(RTYPE, in0, in1, out) \ - { \ - out = (RTYPE)__msa_insert_w((v4i32)out, 0, in0); \ - out = (RTYPE)__msa_insert_w((v4i32)out, 1, in1); \ - } -#define INSERT_W2_SB(...) INSERT_W2(v16i8, __VA_ARGS__) - -#define INSERT_W4(RTYPE, in0, in1, in2, in3, out) \ - { \ - out = (RTYPE)__msa_insert_w((v4i32)out, 0, in0); \ - out = (RTYPE)__msa_insert_w((v4i32)out, 1, in1); \ - out = (RTYPE)__msa_insert_w((v4i32)out, 2, in2); \ - out = (RTYPE)__msa_insert_w((v4i32)out, 3, in3); \ - } -#define INSERT_W4_UB(...) INSERT_W4(v16u8, __VA_ARGS__) -#define INSERT_W4_SB(...) INSERT_W4(v16i8, __VA_ARGS__) - -#define INSERT_D2(RTYPE, in0, in1, out) \ - { \ - out = (RTYPE)__msa_insert_d((v2i64)out, 0, in0); \ - out = (RTYPE)__msa_insert_d((v2i64)out, 1, in1); \ - } -#define INSERT_D2_UB(...) INSERT_D2(v16u8, __VA_ARGS__) -#define INSERT_D2_SB(...) INSERT_D2(v16i8, __VA_ARGS__) - -/* Description : Interleave even byte elements from vectors - Arguments : Inputs - in0, in1, in2, in3 - Outputs - out0, out1 - Return Type - as per RTYPE - Details : Even byte elements of 'in0' and 'in1' are interleaved - and written to 'out0' -*/ -#define ILVEV_B2(RTYPE, in0, in1, in2, in3, out0, out1) \ - { \ - out0 = (RTYPE)__msa_ilvev_b((v16i8)in1, (v16i8)in0); \ - out1 = (RTYPE)__msa_ilvev_b((v16i8)in3, (v16i8)in2); \ - } -#define ILVEV_B2_UB(...) ILVEV_B2(v16u8, __VA_ARGS__) -#define ILVEV_B2_SH(...) ILVEV_B2(v8i16, __VA_ARGS__) - -/* Description : Interleave even halfword elements from vectors - Arguments : Inputs - in0, in1, in2, in3 - Outputs - out0, out1 - Return Type - as per RTYPE - Details : Even halfword elements of 'in0' and 'in1' are interleaved - and written to 'out0' -*/ -#define ILVEV_H2(RTYPE, in0, in1, in2, in3, out0, out1) \ - { \ - out0 = (RTYPE)__msa_ilvev_h((v8i16)in1, (v8i16)in0); \ - out1 = (RTYPE)__msa_ilvev_h((v8i16)in3, (v8i16)in2); \ - } -#define ILVEV_H2_UB(...) ILVEV_H2(v16u8, __VA_ARGS__) -#define ILVEV_H2_SH(...) ILVEV_H2(v8i16, __VA_ARGS__) -#define ILVEV_H2_SW(...) ILVEV_H2(v4i32, __VA_ARGS__) - -/* Description : Interleave even word elements from vectors - Arguments : Inputs - in0, in1, in2, in3 - Outputs - out0, out1 - Return Type - as per RTYPE - Details : Even word elements of 'in0' and 'in1' are interleaved - and written to 'out0' -*/ -#define ILVEV_W2(RTYPE, in0, in1, in2, in3, out0, out1) \ - { \ - out0 = (RTYPE)__msa_ilvev_w((v4i32)in1, (v4i32)in0); \ - out1 = (RTYPE)__msa_ilvev_w((v4i32)in3, (v4i32)in2); \ - } -#define ILVEV_W2_SB(...) ILVEV_W2(v16i8, __VA_ARGS__) - -/* Description : Interleave even double word elements from vectors - Arguments : Inputs - in0, in1, in2, in3 - Outputs - out0, out1 - Return Type - as per RTYPE - Details : Even double word elements of 'in0' and 'in1' are interleaved - and written to 'out0' -*/ -#define ILVEV_D2(RTYPE, in0, in1, in2, in3, out0, out1) \ - { \ - out0 = (RTYPE)__msa_ilvev_d((v2i64)in1, (v2i64)in0); \ - out1 = (RTYPE)__msa_ilvev_d((v2i64)in3, (v2i64)in2); \ - } -#define ILVEV_D2_UB(...) ILVEV_D2(v16u8, __VA_ARGS__) - -/* Description : Interleave left half of byte elements from vectors - Arguments : Inputs - in0, in1, in2, in3 - Outputs - out0, out1 - Return Type - as per RTYPE - Details : Left half of byte elements of 'in0' and 'in1' are interleaved - and written to 'out0'. -*/ -#define ILVL_B2(RTYPE, in0, in1, in2, in3, out0, out1) \ - { \ - out0 = (RTYPE)__msa_ilvl_b((v16i8)in0, (v16i8)in1); \ - out1 = (RTYPE)__msa_ilvl_b((v16i8)in2, (v16i8)in3); \ - } -#define ILVL_B2_UB(...) ILVL_B2(v16u8, __VA_ARGS__) -#define ILVL_B2_SB(...) ILVL_B2(v16i8, __VA_ARGS__) -#define ILVL_B2_UH(...) ILVL_B2(v8u16, __VA_ARGS__) -#define ILVL_B2_SH(...) ILVL_B2(v8i16, __VA_ARGS__) - -#define ILVL_B4(RTYPE, in0, in1, in2, in3, in4, in5, in6, in7, out0, out1, \ - out2, out3) \ - { \ - ILVL_B2(RTYPE, in0, in1, in2, in3, out0, out1); \ - ILVL_B2(RTYPE, in4, in5, in6, in7, out2, out3); \ - } -#define ILVL_B4_SB(...) ILVL_B4(v16i8, __VA_ARGS__) -#define ILVL_B4_SH(...) ILVL_B4(v8i16, __VA_ARGS__) -#define ILVL_B4_UH(...) ILVL_B4(v8u16, __VA_ARGS__) - -/* Description : Interleave left half of halfword elements from vectors - Arguments : Inputs - in0, in1, in2, in3 - Outputs - out0, out1 - Return Type - as per RTYPE - Details : Left half of halfword elements of 'in0' and 'in1' are - interleaved and written to 'out0'. -*/ -#define ILVL_H2(RTYPE, in0, in1, in2, in3, out0, out1) \ - { \ - out0 = (RTYPE)__msa_ilvl_h((v8i16)in0, (v8i16)in1); \ - out1 = (RTYPE)__msa_ilvl_h((v8i16)in2, (v8i16)in3); \ - } -#define ILVL_H2_SH(...) ILVL_H2(v8i16, __VA_ARGS__) -#define ILVL_H2_SW(...) ILVL_H2(v4i32, __VA_ARGS__) - -/* Description : Interleave left half of word elements from vectors - Arguments : Inputs - in0, in1, in2, in3 - Outputs - out0, out1 - Return Type - as per RTYPE - Details : Left half of word elements of 'in0' and 'in1' are interleaved - and written to 'out0'. -*/ -#define ILVL_W2(RTYPE, in0, in1, in2, in3, out0, out1) \ - { \ - out0 = (RTYPE)__msa_ilvl_w((v4i32)in0, (v4i32)in1); \ - out1 = (RTYPE)__msa_ilvl_w((v4i32)in2, (v4i32)in3); \ - } -#define ILVL_W2_UB(...) ILVL_W2(v16u8, __VA_ARGS__) -#define ILVL_W2_SH(...) ILVL_W2(v8i16, __VA_ARGS__) - -/* Description : Interleave right half of byte elements from vectors - Arguments : Inputs - in0, in1, in2, in3 - Outputs - out0, out1 - Return Type - as per RTYPE - Details : Right half of byte elements of 'in0' and 'in1' are interleaved - and written to out0. -*/ -#define ILVR_B2(RTYPE, in0, in1, in2, in3, out0, out1) \ - { \ - out0 = (RTYPE)__msa_ilvr_b((v16i8)in0, (v16i8)in1); \ - out1 = (RTYPE)__msa_ilvr_b((v16i8)in2, (v16i8)in3); \ - } -#define ILVR_B2_UB(...) ILVR_B2(v16u8, __VA_ARGS__) -#define ILVR_B2_SB(...) ILVR_B2(v16i8, __VA_ARGS__) -#define ILVR_B2_UH(...) ILVR_B2(v8u16, __VA_ARGS__) -#define ILVR_B2_SH(...) ILVR_B2(v8i16, __VA_ARGS__) - -#define ILVR_B4(RTYPE, in0, in1, in2, in3, in4, in5, in6, in7, out0, out1, \ - out2, out3) \ - { \ - ILVR_B2(RTYPE, in0, in1, in2, in3, out0, out1); \ - ILVR_B2(RTYPE, in4, in5, in6, in7, out2, out3); \ - } -#define ILVR_B4_UB(...) ILVR_B4(v16u8, __VA_ARGS__) -#define ILVR_B4_SB(...) ILVR_B4(v16i8, __VA_ARGS__) -#define ILVR_B4_UH(...) ILVR_B4(v8u16, __VA_ARGS__) -#define ILVR_B4_SH(...) ILVR_B4(v8i16, __VA_ARGS__) - -#define ILVR_B8(RTYPE, in0, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, \ - in11, in12, in13, in14, in15, out0, out1, out2, out3, out4, \ - out5, out6, out7) \ - { \ - ILVR_B4(RTYPE, in0, in1, in2, in3, in4, in5, in6, in7, out0, out1, out2, \ - out3); \ - ILVR_B4(RTYPE, in8, in9, in10, in11, in12, in13, in14, in15, out4, out5, \ - out6, out7); \ - } -#define ILVR_B8_UH(...) ILVR_B8(v8u16, __VA_ARGS__) - -/* Description : Interleave right half of halfword elements from vectors - Arguments : Inputs - in0, in1, in2, in3 - Outputs - out0, out1 - Return Type - as per RTYPE - Details : Right half of halfword elements of 'in0' and 'in1' are - interleaved and written to 'out0'. -*/ -#define ILVR_H2(RTYPE, in0, in1, in2, in3, out0, out1) \ - { \ - out0 = (RTYPE)__msa_ilvr_h((v8i16)in0, (v8i16)in1); \ - out1 = (RTYPE)__msa_ilvr_h((v8i16)in2, (v8i16)in3); \ - } -#define ILVR_H2_SH(...) ILVR_H2(v8i16, __VA_ARGS__) -#define ILVR_H2_SW(...) ILVR_H2(v4i32, __VA_ARGS__) - -#define ILVR_H4(RTYPE, in0, in1, in2, in3, in4, in5, in6, in7, out0, out1, \ - out2, out3) \ - { \ - ILVR_H2(RTYPE, in0, in1, in2, in3, out0, out1); \ - ILVR_H2(RTYPE, in4, in5, in6, in7, out2, out3); \ - } -#define ILVR_H4_SH(...) ILVR_H4(v8i16, __VA_ARGS__) - -#define ILVR_W2(RTYPE, in0, in1, in2, in3, out0, out1) \ - { \ - out0 = (RTYPE)__msa_ilvr_w((v4i32)in0, (v4i32)in1); \ - out1 = (RTYPE)__msa_ilvr_w((v4i32)in2, (v4i32)in3); \ - } -#define ILVR_W2_UB(...) ILVR_W2(v16u8, __VA_ARGS__) -#define ILVR_W2_SH(...) ILVR_W2(v8i16, __VA_ARGS__) - -#define ILVR_W4(RTYPE, in0, in1, in2, in3, in4, in5, in6, in7, out0, out1, \ - out2, out3) \ - { \ - ILVR_W2(RTYPE, in0, in1, in2, in3, out0, out1); \ - ILVR_W2(RTYPE, in4, in5, in6, in7, out2, out3); \ - } -#define ILVR_W4_UB(...) ILVR_W4(v16u8, __VA_ARGS__) - -/* Description : Interleave right half of double word elements from vectors - Arguments : Inputs - in0, in1, in2, in3 - Outputs - out0, out1 - Return Type - as per RTYPE - Details : Right half of double word elements of 'in0' and 'in1' are - interleaved and written to 'out0'. -*/ -#define ILVR_D2(RTYPE, in0, in1, in2, in3, out0, out1) \ - { \ - out0 = (RTYPE)__msa_ilvr_d((v2i64)(in0), (v2i64)(in1)); \ - out1 = (RTYPE)__msa_ilvr_d((v2i64)(in2), (v2i64)(in3)); \ - } -#define ILVR_D2_UB(...) ILVR_D2(v16u8, __VA_ARGS__) -#define ILVR_D2_SB(...) ILVR_D2(v16i8, __VA_ARGS__) -#define ILVR_D2_SH(...) ILVR_D2(v8i16, __VA_ARGS__) - -#define ILVR_D3(RTYPE, in0, in1, in2, in3, in4, in5, out0, out1, out2) \ - { \ - ILVR_D2(RTYPE, in0, in1, in2, in3, out0, out1); \ - out2 = (RTYPE)__msa_ilvr_d((v2i64)(in4), (v2i64)(in5)); \ - } -#define ILVR_D3_SB(...) ILVR_D3(v16i8, __VA_ARGS__) - -#define ILVR_D4(RTYPE, in0, in1, in2, in3, in4, in5, in6, in7, out0, out1, \ - out2, out3) \ - { \ - ILVR_D2(RTYPE, in0, in1, in2, in3, out0, out1); \ - ILVR_D2(RTYPE, in4, in5, in6, in7, out2, out3); \ - } -#define ILVR_D4_SB(...) ILVR_D4(v16i8, __VA_ARGS__) -#define ILVR_D4_UB(...) ILVR_D4(v16u8, __VA_ARGS__) - -/* Description : Interleave both left and right half of input vectors - Arguments : Inputs - in0, in1 - Outputs - out0, out1 - Return Type - as per RTYPE - Details : Right half of byte elements from 'in0' and 'in1' are - interleaved and written to 'out0' -*/ -#define ILVRL_B2(RTYPE, in0, in1, out0, out1) \ - { \ - out0 = (RTYPE)__msa_ilvr_b((v16i8)in0, (v16i8)in1); \ - out1 = (RTYPE)__msa_ilvl_b((v16i8)in0, (v16i8)in1); \ - } -#define ILVRL_B2_UB(...) ILVRL_B2(v16u8, __VA_ARGS__) -#define ILVRL_B2_SB(...) ILVRL_B2(v16i8, __VA_ARGS__) -#define ILVRL_B2_UH(...) ILVRL_B2(v8u16, __VA_ARGS__) -#define ILVRL_B2_SH(...) ILVRL_B2(v8i16, __VA_ARGS__) - -#define ILVRL_H2(RTYPE, in0, in1, out0, out1) \ - { \ - out0 = (RTYPE)__msa_ilvr_h((v8i16)in0, (v8i16)in1); \ - out1 = (RTYPE)__msa_ilvl_h((v8i16)in0, (v8i16)in1); \ - } -#define ILVRL_H2_SH(...) ILVRL_H2(v8i16, __VA_ARGS__) -#define ILVRL_H2_SW(...) ILVRL_H2(v4i32, __VA_ARGS__) - -#define ILVRL_W2(RTYPE, in0, in1, out0, out1) \ - { \ - out0 = (RTYPE)__msa_ilvr_w((v4i32)in0, (v4i32)in1); \ - out1 = (RTYPE)__msa_ilvl_w((v4i32)in0, (v4i32)in1); \ - } -#define ILVRL_W2_UB(...) ILVRL_W2(v16u8, __VA_ARGS__) -#define ILVRL_W2_SH(...) ILVRL_W2(v8i16, __VA_ARGS__) -#define ILVRL_W2_SW(...) ILVRL_W2(v4i32, __VA_ARGS__) - -/* Description : Saturate the halfword element values to the max - unsigned value of (sat_val + 1) bits - The element data width remains unchanged - Arguments : Inputs - in0, in1, sat_val - Outputs - in place operation - Return Type - as per RTYPE - Details : Each unsigned halfword element from 'in0' is saturated to the - value generated with (sat_val + 1) bit range. - The results are written in place -*/ -#define SAT_UH2(RTYPE, in0, in1, sat_val) \ - { \ - in0 = (RTYPE)__msa_sat_u_h((v8u16)in0, sat_val); \ - in1 = (RTYPE)__msa_sat_u_h((v8u16)in1, sat_val); \ - } -#define SAT_UH2_UH(...) SAT_UH2(v8u16, __VA_ARGS__) - -#define SAT_UH4(RTYPE, in0, in1, in2, in3, sat_val) \ - { \ - SAT_UH2(RTYPE, in0, in1, sat_val); \ - SAT_UH2(RTYPE, in2, in3, sat_val) \ - } -#define SAT_UH4_UH(...) SAT_UH4(v8u16, __VA_ARGS__) - -/* Description : Saturate the halfword element values to the max - unsigned value of (sat_val + 1) bits - The element data width remains unchanged - Arguments : Inputs - in0, in1, sat_val - Outputs - in place operation - Return Type - as per RTYPE - Details : Each unsigned halfword element from 'in0' is saturated to the - value generated with (sat_val + 1) bit range - The results are written in place -*/ -#define SAT_SH2(RTYPE, in0, in1, sat_val) \ - { \ - in0 = (RTYPE)__msa_sat_s_h((v8i16)in0, sat_val); \ - in1 = (RTYPE)__msa_sat_s_h((v8i16)in1, sat_val); \ - } -#define SAT_SH2_SH(...) SAT_SH2(v8i16, __VA_ARGS__) - -#define SAT_SH4(RTYPE, in0, in1, in2, in3, sat_val) \ - { \ - SAT_SH2(RTYPE, in0, in1, sat_val); \ - SAT_SH2(RTYPE, in2, in3, sat_val); \ - } -#define SAT_SH4_SH(...) SAT_SH4(v8i16, __VA_ARGS__) - -/* Description : Indexed halfword element values are replicated to all - elements in output vector - Arguments : Inputs - in, idx0, idx1 - Outputs - out0, out1 - Return Type - as per RTYPE - Details : 'idx0' element value from 'in' vector is replicated to all - elements in 'out0' vector - Valid index range for halfword operation is 0-7 -*/ -#define SPLATI_H2(RTYPE, in, idx0, idx1, out0, out1) \ - { \ - out0 = (RTYPE)__msa_splati_h((v8i16)in, idx0); \ - out1 = (RTYPE)__msa_splati_h((v8i16)in, idx1); \ - } -#define SPLATI_H2_SH(...) SPLATI_H2(v8i16, __VA_ARGS__) - -#define SPLATI_H4(RTYPE, in, idx0, idx1, idx2, idx3, out0, out1, out2, out3) \ - { \ - SPLATI_H2(RTYPE, in, idx0, idx1, out0, out1); \ - SPLATI_H2(RTYPE, in, idx2, idx3, out2, out3); \ - } -#define SPLATI_H4_SB(...) SPLATI_H4(v16i8, __VA_ARGS__) -#define SPLATI_H4_SH(...) SPLATI_H4(v8i16, __VA_ARGS__) - -/* Description : Pack even byte elements of vector pairs - Arguments : Inputs - in0, in1, in2, in3 - Outputs - out0, out1 - Return Type - as per RTYPE - Details : Even byte elements of 'in0' are copied to the left half of - 'out0' & even byte elements of 'in1' are copied to the right - half of 'out0'. -*/ -#define PCKEV_B2(RTYPE, in0, in1, in2, in3, out0, out1) \ - { \ - out0 = (RTYPE)__msa_pckev_b((v16i8)in0, (v16i8)in1); \ - out1 = (RTYPE)__msa_pckev_b((v16i8)in2, (v16i8)in3); \ - } -#define PCKEV_B2_SB(...) PCKEV_B2(v16i8, __VA_ARGS__) -#define PCKEV_B2_UB(...) PCKEV_B2(v16u8, __VA_ARGS__) -#define PCKEV_B2_SH(...) PCKEV_B2(v8i16, __VA_ARGS__) - -#define PCKEV_B4(RTYPE, in0, in1, in2, in3, in4, in5, in6, in7, out0, out1, \ - out2, out3) \ - { \ - PCKEV_B2(RTYPE, in0, in1, in2, in3, out0, out1); \ - PCKEV_B2(RTYPE, in4, in5, in6, in7, out2, out3); \ - } -#define PCKEV_B4_SB(...) PCKEV_B4(v16i8, __VA_ARGS__) -#define PCKEV_B4_UB(...) PCKEV_B4(v16u8, __VA_ARGS__) -#define PCKEV_B4_SH(...) PCKEV_B4(v8i16, __VA_ARGS__) - -/* Description : Pack even halfword elements of vector pairs - Arguments : Inputs - in0, in1, in2, in3 - Outputs - out0, out1 - Return Type - as per RTYPE - Details : Even halfword elements of 'in0' are copied to the left half of - 'out0' & even halfword elements of 'in1' are copied to the - right half of 'out0'. -*/ -#define PCKEV_H2(RTYPE, in0, in1, in2, in3, out0, out1) \ - { \ - out0 = (RTYPE)__msa_pckev_h((v8i16)in0, (v8i16)in1); \ - out1 = (RTYPE)__msa_pckev_h((v8i16)in2, (v8i16)in3); \ - } -#define PCKEV_H2_SH(...) PCKEV_H2(v8i16, __VA_ARGS__) -#define PCKEV_H2_SW(...) PCKEV_H2(v4i32, __VA_ARGS__) - -#define PCKEV_H4(RTYPE, in0, in1, in2, in3, in4, in5, in6, in7, out0, out1, \ - out2, out3) \ - { \ - PCKEV_H2(RTYPE, in0, in1, in2, in3, out0, out1); \ - PCKEV_H2(RTYPE, in4, in5, in6, in7, out2, out3); \ - } -#define PCKEV_H4_SH(...) PCKEV_H4(v8i16, __VA_ARGS__) - -/* Description : Pack even double word elements of vector pairs - Arguments : Inputs - in0, in1, in2, in3 - Outputs - out0, out1 - Return Type - as per RTYPE - Details : Even double elements of 'in0' are copied to the left half of - 'out0' & even double elements of 'in1' are copied to the right - half of 'out0'. -*/ -#define PCKEV_D2(RTYPE, in0, in1, in2, in3, out0, out1) \ - { \ - out0 = (RTYPE)__msa_pckev_d((v2i64)in0, (v2i64)in1); \ - out1 = (RTYPE)__msa_pckev_d((v2i64)in2, (v2i64)in3); \ - } -#define PCKEV_D2_UB(...) PCKEV_D2(v16u8, __VA_ARGS__) -#define PCKEV_D2_SH(...) PCKEV_D2(v8i16, __VA_ARGS__) - -#define PCKEV_D4(RTYPE, in0, in1, in2, in3, in4, in5, in6, in7, out0, out1, \ - out2, out3) \ - { \ - PCKEV_D2(RTYPE, in0, in1, in2, in3, out0, out1); \ - PCKEV_D2(RTYPE, in4, in5, in6, in7, out2, out3); \ - } -#define PCKEV_D4_UB(...) PCKEV_D4(v16u8, __VA_ARGS__) - -/* Description : Each byte element is logically xor'ed with immediate 128 - Arguments : Inputs - in0, in1 - Outputs - in place operation - Return Type - as per RTYPE - Details : Each unsigned byte element from input vector 'in0' is - logically xor'ed with 128 and the result is stored in-place. -*/ -#define XORI_B2_128(RTYPE, in0, in1) \ - { \ - in0 = (RTYPE)__msa_xori_b((v16u8)in0, 128); \ - in1 = (RTYPE)__msa_xori_b((v16u8)in1, 128); \ - } -#define XORI_B2_128_UB(...) XORI_B2_128(v16u8, __VA_ARGS__) -#define XORI_B2_128_SB(...) XORI_B2_128(v16i8, __VA_ARGS__) - -#define XORI_B3_128(RTYPE, in0, in1, in2) \ - { \ - XORI_B2_128(RTYPE, in0, in1); \ - in2 = (RTYPE)__msa_xori_b((v16u8)in2, 128); \ - } -#define XORI_B3_128_SB(...) XORI_B3_128(v16i8, __VA_ARGS__) - -#define XORI_B4_128(RTYPE, in0, in1, in2, in3) \ - { \ - XORI_B2_128(RTYPE, in0, in1); \ - XORI_B2_128(RTYPE, in2, in3); \ - } -#define XORI_B4_128_UB(...) XORI_B4_128(v16u8, __VA_ARGS__) -#define XORI_B4_128_SB(...) XORI_B4_128(v16i8, __VA_ARGS__) - -#define XORI_B7_128(RTYPE, in0, in1, in2, in3, in4, in5, in6) \ - { \ - XORI_B4_128(RTYPE, in0, in1, in2, in3); \ - XORI_B3_128(RTYPE, in4, in5, in6); \ - } -#define XORI_B7_128_SB(...) XORI_B7_128(v16i8, __VA_ARGS__) - -/* Description : Average of signed halfword elements -> (a + b) / 2 - Arguments : Inputs - in0, in1, in2, in3, in4, in5, in6, in7 - Outputs - out0, out1, out2, out3 - Return Type - as per RTYPE - Details : Each signed halfword element from 'in0' is added to each - signed halfword element of 'in1' with full precision resulting - in one extra bit in the result. The result is then divided by - 2 and written to 'out0' -*/ -#define AVE_SH4(RTYPE, in0, in1, in2, in3, in4, in5, in6, in7, out0, out1, \ - out2, out3) \ - { \ - out0 = (RTYPE)__msa_ave_s_h((v8i16)in0, (v8i16)in1); \ - out1 = (RTYPE)__msa_ave_s_h((v8i16)in2, (v8i16)in3); \ - out2 = (RTYPE)__msa_ave_s_h((v8i16)in4, (v8i16)in5); \ - out3 = (RTYPE)__msa_ave_s_h((v8i16)in6, (v8i16)in7); \ - } -#define AVE_SH4_SH(...) AVE_SH4(v8i16, __VA_ARGS__) - -/* Description : Addition of signed halfword elements and signed saturation - Arguments : Inputs - in0, in1, in2, in3 - Outputs - out0, out1 - Return Type - as per RTYPE - Details : Signed halfword elements from 'in0' are added to signed - halfword elements of 'in1'. The result is then signed saturated - between halfword data type range -*/ -#define ADDS_SH2(RTYPE, in0, in1, in2, in3, out0, out1) \ - { \ - out0 = (RTYPE)__msa_adds_s_h((v8i16)in0, (v8i16)in1); \ - out1 = (RTYPE)__msa_adds_s_h((v8i16)in2, (v8i16)in3); \ - } -#define ADDS_SH2_SH(...) ADDS_SH2(v8i16, __VA_ARGS__) - -#define ADDS_SH4(RTYPE, in0, in1, in2, in3, in4, in5, in6, in7, out0, out1, \ - out2, out3) \ - { \ - ADDS_SH2(RTYPE, in0, in1, in2, in3, out0, out1); \ - ADDS_SH2(RTYPE, in4, in5, in6, in7, out2, out3); \ - } -#define ADDS_SH4_SH(...) ADDS_SH4(v8i16, __VA_ARGS__) - -/* Description : Shift left all elements of vector (generic for all data types) - Arguments : Inputs - in0, in1, in2, in3, shift - Outputs - in place operation - Return Type - as per input vector RTYPE - Details : Each element of vector 'in0' is left shifted by 'shift' and - the result is written in-place. -*/ -#define SLLI_4V(in0, in1, in2, in3, shift) \ - { \ - in0 = in0 << shift; \ - in1 = in1 << shift; \ - in2 = in2 << shift; \ - in3 = in3 << shift; \ - } - -/* Description : Arithmetic shift right all elements of vector - (generic for all data types) - Arguments : Inputs - in0, in1, in2, in3, shift - Outputs - in place operation - Return Type - as per input vector RTYPE - Details : Each element of vector 'in0' is right shifted by 'shift' and - the result is written in-place. 'shift' is a GP variable. -*/ -#define SRA_4V(in0, in1, in2, in3, shift) \ - { \ - in0 = in0 >> shift; \ - in1 = in1 >> shift; \ - in2 = in2 >> shift; \ - in3 = in3 >> shift; \ - } - -/* Description : Shift right arithmetic rounded words - Arguments : Inputs - in0, in1, shift - Outputs - in place operation - Return Type - as per RTYPE - Details : Each element of vector 'in0' is shifted right arithmetically by - the number of bits in the corresponding element in the vector - 'shift'. The last discarded bit is added to shifted value for - rounding and the result is written in-place. - 'shift' is a vector. -*/ -#define SRAR_W2(RTYPE, in0, in1, shift) \ - { \ - in0 = (RTYPE)__msa_srar_w((v4i32)in0, (v4i32)shift); \ - in1 = (RTYPE)__msa_srar_w((v4i32)in1, (v4i32)shift); \ - } - -#define SRAR_W4(RTYPE, in0, in1, in2, in3, shift) \ - { \ - SRAR_W2(RTYPE, in0, in1, shift) \ - SRAR_W2(RTYPE, in2, in3, shift) \ - } -#define SRAR_W4_SW(...) SRAR_W4(v4i32, __VA_ARGS__) - -/* Description : Shift right arithmetic rounded (immediate) - Arguments : Inputs - in0, in1, shift - Outputs - in place operation - Return Type - as per RTYPE - Details : Each element of vector 'in0' is shifted right arithmetically by - the value in 'shift'. The last discarded bit is added to the - shifted value for rounding and the result is written in-place. - 'shift' is an immediate value. -*/ -#define SRARI_H2(RTYPE, in0, in1, shift) \ - { \ - in0 = (RTYPE)__msa_srari_h((v8i16)in0, shift); \ - in1 = (RTYPE)__msa_srari_h((v8i16)in1, shift); \ - } -#define SRARI_H2_UH(...) SRARI_H2(v8u16, __VA_ARGS__) -#define SRARI_H2_SH(...) SRARI_H2(v8i16, __VA_ARGS__) - -#define SRARI_H4(RTYPE, in0, in1, in2, in3, shift) \ - { \ - SRARI_H2(RTYPE, in0, in1, shift); \ - SRARI_H2(RTYPE, in2, in3, shift); \ - } -#define SRARI_H4_UH(...) SRARI_H4(v8u16, __VA_ARGS__) -#define SRARI_H4_SH(...) SRARI_H4(v8i16, __VA_ARGS__) - -#define SRARI_W2(RTYPE, in0, in1, shift) \ - { \ - in0 = (RTYPE)__msa_srari_w((v4i32)in0, shift); \ - in1 = (RTYPE)__msa_srari_w((v4i32)in1, shift); \ - } -#define SRARI_W2_SW(...) SRARI_W2(v4i32, __VA_ARGS__) - -#define SRARI_W4(RTYPE, in0, in1, in2, in3, shift) \ - { \ - SRARI_W2(RTYPE, in0, in1, shift); \ - SRARI_W2(RTYPE, in2, in3, shift); \ - } -#define SRARI_W4_SW(...) SRARI_W4(v4i32, __VA_ARGS__) - -/* Description : Logical shift right all elements of vector (immediate) - Arguments : Inputs - in0, in1, in2, in3, shift - Outputs - out0, out1, out2, out3 - Return Type - as per RTYPE - Details : Each element of vector 'in0' is right shifted by 'shift' and - the result is written in-place. 'shift' is an immediate value. -*/ -#define SRLI_H4(RTYPE, in0, in1, in2, in3, out0, out1, out2, out3, shift) \ - { \ - out0 = (RTYPE)__msa_srli_h((v8i16)in0, shift); \ - out1 = (RTYPE)__msa_srli_h((v8i16)in1, shift); \ - out2 = (RTYPE)__msa_srli_h((v8i16)in2, shift); \ - out3 = (RTYPE)__msa_srli_h((v8i16)in3, shift); \ - } -#define SRLI_H4_SH(...) SRLI_H4(v8i16, __VA_ARGS__) - -/* Description : Multiplication of pairs of vectors - Arguments : Inputs - in0, in1, in2, in3 - Outputs - out0, out1 - Details : Each element from 'in0' is multiplied with elements from 'in1' - and the result is written to 'out0' -*/ -#define MUL2(in0, in1, in2, in3, out0, out1) \ - { \ - out0 = in0 * in1; \ - out1 = in2 * in3; \ - } -#define MUL4(in0, in1, in2, in3, in4, in5, in6, in7, out0, out1, out2, out3) \ - { \ - MUL2(in0, in1, in2, in3, out0, out1); \ - MUL2(in4, in5, in6, in7, out2, out3); \ - } - -/* Description : Addition of 2 pairs of vectors - Arguments : Inputs - in0, in1, in2, in3 - Outputs - out0, out1 - Details : Each element in 'in0' is added to 'in1' and result is written - to 'out0'. -*/ -#define ADD2(in0, in1, in2, in3, out0, out1) \ - { \ - out0 = in0 + in1; \ - out1 = in2 + in3; \ - } -#define ADD4(in0, in1, in2, in3, in4, in5, in6, in7, out0, out1, out2, out3) \ - { \ - ADD2(in0, in1, in2, in3, out0, out1); \ - ADD2(in4, in5, in6, in7, out2, out3); \ - } - -/* Description : Subtraction of 2 pairs of vectors - Arguments : Inputs - in0, in1, in2, in3 - Outputs - out0, out1 - Details : Each element in 'in1' is subtracted from 'in0' and result is - written to 'out0'. -*/ -#define SUB2(in0, in1, in2, in3, out0, out1) \ - { \ - out0 = in0 - in1; \ - out1 = in2 - in3; \ - } -#define SUB4(in0, in1, in2, in3, in4, in5, in6, in7, out0, out1, out2, out3) \ - { \ - out0 = in0 - in1; \ - out1 = in2 - in3; \ - out2 = in4 - in5; \ - out3 = in6 - in7; \ - } - -/* Description : Sign extend halfword elements from right half of the vector - Arguments : Input - in (halfword vector) - Output - out (sign extended word vector) - Return Type - signed word - Details : Sign bit of halfword elements from input vector 'in' is - extracted and interleaved with same vector 'in0' to generate - 4 word elements keeping sign intact -*/ -#define UNPCK_R_SH_SW(in, out) \ - { \ - v8i16 sign_m; \ - \ - sign_m = __msa_clti_s_h((v8i16)in, 0); \ - out = (v4i32)__msa_ilvr_h(sign_m, (v8i16)in); \ - } - -/* Description : Zero extend unsigned byte elements to halfword elements - Arguments : Input - in (unsigned byte vector) - Outputs - out0, out1 (unsigned halfword vectors) - Return Type - signed halfword - Details : Zero extended right half of vector is returned in 'out0' - Zero extended left half of vector is returned in 'out1' -*/ -#define UNPCK_UB_SH(in, out0, out1) \ - { \ - v16i8 zero_m = { 0 }; \ - \ - ILVRL_B2_SH(zero_m, in, out0, out1); \ - } - -/* Description : Sign extend halfword elements from input vector and return - the result in pair of vectors - Arguments : Input - in (halfword vector) - Outputs - out0, out1 (sign extended word vectors) - Return Type - signed word - Details : Sign bit of halfword elements from input vector 'in' is - extracted and interleaved right with same vector 'in0' to - generate 4 signed word elements in 'out0' - Then interleaved left with same vector 'in0' to - generate 4 signed word elements in 'out1' -*/ -#define UNPCK_SH_SW(in, out0, out1) \ - { \ - v8i16 tmp_m; \ - \ - tmp_m = __msa_clti_s_h((v8i16)in, 0); \ - ILVRL_H2_SW(tmp_m, in, out0, out1); \ - } - -/* Description : Butterfly of 4 input vectors - Arguments : Inputs - in0, in1, in2, in3 - Outputs - out0, out1, out2, out3 - Details : Butterfly operation -*/ -#define BUTTERFLY_4(in0, in1, in2, in3, out0, out1, out2, out3) \ - { \ - out0 = in0 + in3; \ - out1 = in1 + in2; \ - \ - out2 = in1 - in2; \ - out3 = in0 - in3; \ - } - -/* Description : Butterfly of 8 input vectors - Arguments : Inputs - in0 ... in7 - Outputs - out0 .. out7 - Details : Butterfly operation -*/ -#define BUTTERFLY_8(in0, in1, in2, in3, in4, in5, in6, in7, out0, out1, out2, \ - out3, out4, out5, out6, out7) \ - { \ - out0 = in0 + in7; \ - out1 = in1 + in6; \ - out2 = in2 + in5; \ - out3 = in3 + in4; \ - \ - out4 = in3 - in4; \ - out5 = in2 - in5; \ - out6 = in1 - in6; \ - out7 = in0 - in7; \ - } - -/* Description : Butterfly of 16 input vectors - Arguments : Inputs - in0 ... in15 - Outputs - out0 .. out15 - Details : Butterfly operation -*/ -#define BUTTERFLY_16(in0, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, \ - in11, in12, in13, in14, in15, out0, out1, out2, out3, \ - out4, out5, out6, out7, out8, out9, out10, out11, out12, \ - out13, out14, out15) \ - { \ - out0 = in0 + in15; \ - out1 = in1 + in14; \ - out2 = in2 + in13; \ - out3 = in3 + in12; \ - out4 = in4 + in11; \ - out5 = in5 + in10; \ - out6 = in6 + in9; \ - out7 = in7 + in8; \ - \ - out8 = in7 - in8; \ - out9 = in6 - in9; \ - out10 = in5 - in10; \ - out11 = in4 - in11; \ - out12 = in3 - in12; \ - out13 = in2 - in13; \ - out14 = in1 - in14; \ - out15 = in0 - in15; \ - } - -/* Description : Transpose input 8x8 byte block - Arguments : Inputs - in0, in1, in2, in3, in4, in5, in6, in7 - Outputs - out0, out1, out2, out3, out4, out5, out6, out7 - Return Type - as per RTYPE -*/ -#define TRANSPOSE8x8_UB(RTYPE, in0, in1, in2, in3, in4, in5, in6, in7, out0, \ - out1, out2, out3, out4, out5, out6, out7) \ - { \ - v16i8 tmp0_m, tmp1_m, tmp2_m, tmp3_m; \ - v16i8 tmp4_m, tmp5_m, tmp6_m, tmp7_m; \ - \ - ILVR_B4_SB(in2, in0, in3, in1, in6, in4, in7, in5, tmp0_m, tmp1_m, tmp2_m, \ - tmp3_m); \ - ILVRL_B2_SB(tmp1_m, tmp0_m, tmp4_m, tmp5_m); \ - ILVRL_B2_SB(tmp3_m, tmp2_m, tmp6_m, tmp7_m); \ - ILVRL_W2(RTYPE, tmp6_m, tmp4_m, out0, out2); \ - ILVRL_W2(RTYPE, tmp7_m, tmp5_m, out4, out6); \ - SLDI_B2_0(RTYPE, out0, out2, out1, out3, 8); \ - SLDI_B2_0(RTYPE, out4, out6, out5, out7, 8); \ - } -#define TRANSPOSE8x8_UB_UB(...) TRANSPOSE8x8_UB(v16u8, __VA_ARGS__) - -/* Description : Transpose 16x8 block into 8x16 with byte elements in vectors - Arguments : Inputs - in0, in1, in2, in3, in4, in5, in6, in7, - in8, in9, in10, in11, in12, in13, in14, in15 - Outputs - out0, out1, out2, out3, out4, out5, out6, out7 - Return Type - unsigned byte -*/ -#define TRANSPOSE16x8_UB_UB(in0, in1, in2, in3, in4, in5, in6, in7, in8, in9, \ - in10, in11, in12, in13, in14, in15, out0, out1, \ - out2, out3, out4, out5, out6, out7) \ - { \ - v16u8 tmp0_m, tmp1_m, tmp2_m, tmp3_m; \ - v16u8 tmp4_m, tmp5_m, tmp6_m, tmp7_m; \ - \ - ILVEV_D2_UB(in0, in8, in1, in9, out7, out6); \ - ILVEV_D2_UB(in2, in10, in3, in11, out5, out4); \ - ILVEV_D2_UB(in4, in12, in5, in13, out3, out2); \ - ILVEV_D2_UB(in6, in14, in7, in15, out1, out0); \ - \ - tmp0_m = (v16u8)__msa_ilvev_b((v16i8)out6, (v16i8)out7); \ - tmp4_m = (v16u8)__msa_ilvod_b((v16i8)out6, (v16i8)out7); \ - tmp1_m = (v16u8)__msa_ilvev_b((v16i8)out4, (v16i8)out5); \ - tmp5_m = (v16u8)__msa_ilvod_b((v16i8)out4, (v16i8)out5); \ - out5 = (v16u8)__msa_ilvev_b((v16i8)out2, (v16i8)out3); \ - tmp6_m = (v16u8)__msa_ilvod_b((v16i8)out2, (v16i8)out3); \ - out7 = (v16u8)__msa_ilvev_b((v16i8)out0, (v16i8)out1); \ - tmp7_m = (v16u8)__msa_ilvod_b((v16i8)out0, (v16i8)out1); \ - \ - ILVEV_H2_UB(tmp0_m, tmp1_m, out5, out7, tmp2_m, tmp3_m); \ - out0 = (v16u8)__msa_ilvev_w((v4i32)tmp3_m, (v4i32)tmp2_m); \ - out4 = (v16u8)__msa_ilvod_w((v4i32)tmp3_m, (v4i32)tmp2_m); \ - \ - tmp2_m = (v16u8)__msa_ilvod_h((v8i16)tmp1_m, (v8i16)tmp0_m); \ - tmp3_m = (v16u8)__msa_ilvod_h((v8i16)out7, (v8i16)out5); \ - out2 = (v16u8)__msa_ilvev_w((v4i32)tmp3_m, (v4i32)tmp2_m); \ - out6 = (v16u8)__msa_ilvod_w((v4i32)tmp3_m, (v4i32)tmp2_m); \ - \ - ILVEV_H2_UB(tmp4_m, tmp5_m, tmp6_m, tmp7_m, tmp2_m, tmp3_m); \ - out1 = (v16u8)__msa_ilvev_w((v4i32)tmp3_m, (v4i32)tmp2_m); \ - out5 = (v16u8)__msa_ilvod_w((v4i32)tmp3_m, (v4i32)tmp2_m); \ - \ - tmp2_m = (v16u8)__msa_ilvod_h((v8i16)tmp5_m, (v8i16)tmp4_m); \ - tmp2_m = (v16u8)__msa_ilvod_h((v8i16)tmp5_m, (v8i16)tmp4_m); \ - tmp3_m = (v16u8)__msa_ilvod_h((v8i16)tmp7_m, (v8i16)tmp6_m); \ - tmp3_m = (v16u8)__msa_ilvod_h((v8i16)tmp7_m, (v8i16)tmp6_m); \ - out3 = (v16u8)__msa_ilvev_w((v4i32)tmp3_m, (v4i32)tmp2_m); \ - out7 = (v16u8)__msa_ilvod_w((v4i32)tmp3_m, (v4i32)tmp2_m); \ - } - -/* Description : Transpose 4x4 block with half word elements in vectors - Arguments : Inputs - in0, in1, in2, in3 - Outputs - out0, out1, out2, out3 - Return Type - signed halfword -*/ -#define TRANSPOSE4x4_SH_SH(in0, in1, in2, in3, out0, out1, out2, out3) \ - { \ - v8i16 s0_m, s1_m; \ - \ - ILVR_H2_SH(in1, in0, in3, in2, s0_m, s1_m); \ - ILVRL_W2_SH(s1_m, s0_m, out0, out2); \ - out1 = (v8i16)__msa_ilvl_d((v2i64)out0, (v2i64)out0); \ - out3 = (v8i16)__msa_ilvl_d((v2i64)out0, (v2i64)out2); \ - } - -/* Description : Transpose 4x8 block with half word elements in vectors - Arguments : Inputs - in0, in1, in2, in3, in4, in5, in6, in7 - Outputs - out0, out1, out2, out3, out4, out5, out6, out7 - Return Type - signed halfword -*/ -#define TRANSPOSE4X8_SH_SH(in0, in1, in2, in3, in4, in5, in6, in7, out0, out1, \ - out2, out3, out4, out5, out6, out7) \ - { \ - v8i16 tmp0_m, tmp1_m, tmp2_m, tmp3_m; \ - v8i16 tmp0_n, tmp1_n, tmp2_n, tmp3_n; \ - v8i16 zero_m = { 0 }; \ - \ - ILVR_H4_SH(in1, in0, in3, in2, in5, in4, in7, in6, tmp0_n, tmp1_n, tmp2_n, \ - tmp3_n); \ - ILVRL_W2_SH(tmp1_n, tmp0_n, tmp0_m, tmp2_m); \ - ILVRL_W2_SH(tmp3_n, tmp2_n, tmp1_m, tmp3_m); \ - \ - out0 = (v8i16)__msa_ilvr_d((v2i64)tmp1_m, (v2i64)tmp0_m); \ - out1 = (v8i16)__msa_ilvl_d((v2i64)tmp1_m, (v2i64)tmp0_m); \ - out2 = (v8i16)__msa_ilvr_d((v2i64)tmp3_m, (v2i64)tmp2_m); \ - out3 = (v8i16)__msa_ilvl_d((v2i64)tmp3_m, (v2i64)tmp2_m); \ - \ - out4 = zero_m; \ - out5 = zero_m; \ - out6 = zero_m; \ - out7 = zero_m; \ - } - -/* Description : Transpose 8x4 block with half word elements in vectors - Arguments : Inputs - in0, in1, in2, in3, in4, in5, in6, in7 - Outputs - out0, out1, out2, out3, out4, out5, out6, out7 - Return Type - signed halfword -*/ -#define TRANSPOSE8X4_SH_SH(in0, in1, in2, in3, out0, out1, out2, out3) \ - { \ - v8i16 tmp0_m, tmp1_m, tmp2_m, tmp3_m; \ - \ - ILVR_H2_SH(in1, in0, in3, in2, tmp0_m, tmp1_m); \ - ILVL_H2_SH(in1, in0, in3, in2, tmp2_m, tmp3_m); \ - ILVR_W2_SH(tmp1_m, tmp0_m, tmp3_m, tmp2_m, out0, out2); \ - ILVL_W2_SH(tmp1_m, tmp0_m, tmp3_m, tmp2_m, out1, out3); \ - } - -/* Description : Transpose 8x8 block with half word elements in vectors - Arguments : Inputs - in0, in1, in2, in3, in4, in5, in6, in7 - Outputs - out0, out1, out2, out3, out4, out5, out6, out7 - Return Type - as per RTYPE -*/ -#define TRANSPOSE8x8_H(RTYPE, in0, in1, in2, in3, in4, in5, in6, in7, out0, \ - out1, out2, out3, out4, out5, out6, out7) \ - { \ - v8i16 s0_m, s1_m; \ - v8i16 tmp0_m, tmp1_m, tmp2_m, tmp3_m; \ - v8i16 tmp4_m, tmp5_m, tmp6_m, tmp7_m; \ - \ - ILVR_H2_SH(in6, in4, in7, in5, s0_m, s1_m); \ - ILVRL_H2_SH(s1_m, s0_m, tmp0_m, tmp1_m); \ - ILVL_H2_SH(in6, in4, in7, in5, s0_m, s1_m); \ - ILVRL_H2_SH(s1_m, s0_m, tmp2_m, tmp3_m); \ - ILVR_H2_SH(in2, in0, in3, in1, s0_m, s1_m); \ - ILVRL_H2_SH(s1_m, s0_m, tmp4_m, tmp5_m); \ - ILVL_H2_SH(in2, in0, in3, in1, s0_m, s1_m); \ - ILVRL_H2_SH(s1_m, s0_m, tmp6_m, tmp7_m); \ - PCKEV_D4(RTYPE, tmp0_m, tmp4_m, tmp1_m, tmp5_m, tmp2_m, tmp6_m, tmp3_m, \ - tmp7_m, out0, out2, out4, out6); \ - out1 = (RTYPE)__msa_pckod_d((v2i64)tmp0_m, (v2i64)tmp4_m); \ - out3 = (RTYPE)__msa_pckod_d((v2i64)tmp1_m, (v2i64)tmp5_m); \ - out5 = (RTYPE)__msa_pckod_d((v2i64)tmp2_m, (v2i64)tmp6_m); \ - out7 = (RTYPE)__msa_pckod_d((v2i64)tmp3_m, (v2i64)tmp7_m); \ - } -#define TRANSPOSE8x8_SH_SH(...) TRANSPOSE8x8_H(v8i16, __VA_ARGS__) - -/* Description : Transpose 4x4 block with word elements in vectors - Arguments : Inputs - in0, in1, in2, in3 - Outputs - out0, out1, out2, out3 - Return Type - signed word -*/ -#define TRANSPOSE4x4_SW_SW(in0, in1, in2, in3, out0, out1, out2, out3) \ - { \ - v4i32 s0_m, s1_m, s2_m, s3_m; \ - \ - ILVRL_W2_SW(in1, in0, s0_m, s1_m); \ - ILVRL_W2_SW(in3, in2, s2_m, s3_m); \ - \ - out0 = (v4i32)__msa_ilvr_d((v2i64)s2_m, (v2i64)s0_m); \ - out1 = (v4i32)__msa_ilvl_d((v2i64)s2_m, (v2i64)s0_m); \ - out2 = (v4i32)__msa_ilvr_d((v2i64)s3_m, (v2i64)s1_m); \ - out3 = (v4i32)__msa_ilvl_d((v2i64)s3_m, (v2i64)s1_m); \ - } - -/* Description : Add block 4x4 - Arguments : Inputs - in0, in1, in2, in3, pdst, stride - Details : Least significant 4 bytes from each input vector are added to - the destination bytes, clipped between 0-255 and stored. -*/ -#define ADDBLK_ST4x4_UB(in0, in1, in2, in3, pdst, stride) \ - { \ - uint32_t src0_m, src1_m, src2_m, src3_m; \ - v8i16 inp0_m, inp1_m, res0_m, res1_m; \ - v16i8 dst0_m = { 0 }; \ - v16i8 dst1_m = { 0 }; \ - v16i8 zero_m = { 0 }; \ - \ - ILVR_D2_SH(in1, in0, in3, in2, inp0_m, inp1_m) \ - LW4(pdst, stride, src0_m, src1_m, src2_m, src3_m); \ - INSERT_W2_SB(src0_m, src1_m, dst0_m); \ - INSERT_W2_SB(src2_m, src3_m, dst1_m); \ - ILVR_B2_SH(zero_m, dst0_m, zero_m, dst1_m, res0_m, res1_m); \ - ADD2(res0_m, inp0_m, res1_m, inp1_m, res0_m, res1_m); \ - CLIP_SH2_0_255(res0_m, res1_m); \ - PCKEV_B2_SB(res0_m, res0_m, res1_m, res1_m, dst0_m, dst1_m); \ - ST4x4_UB(dst0_m, dst1_m, 0, 1, 0, 1, pdst, stride); \ - } - -/* Description : Pack even elements of input vectors & xor with 128 - Arguments : Inputs - in0, in1 - Output - out_m - Return Type - unsigned byte - Details : Signed byte even elements from 'in0' and 'in1' are packed - together in one vector and the resulting vector is xor'ed with - 128 to shift the range from signed to unsigned byte -*/ -#define PCKEV_XORI128_UB(in0, in1) \ - ({ \ - v16u8 out_m; \ - \ - out_m = (v16u8)__msa_pckev_b((v16i8)in1, (v16i8)in0); \ - out_m = (v16u8)__msa_xori_b((v16u8)out_m, 128); \ - out_m; \ - }) - -/* Description : Converts inputs to unsigned bytes, interleave, average & store - as 8x4 unsigned byte block - Arguments : Inputs - in0, in1, in2, in3, dst0, dst1, dst2, dst3, - pdst, stride -*/ -#define CONVERT_UB_AVG_ST8x4_UB(in0, in1, in2, in3, dst0, dst1, dst2, dst3, \ - pdst, stride) \ - { \ - v16u8 tmp0_m, tmp1_m, tmp2_m, tmp3_m; \ - \ - tmp0_m = PCKEV_XORI128_UB(in0, in1); \ - tmp1_m = PCKEV_XORI128_UB(in2, in3); \ - ILVR_D2_UB(dst1, dst0, dst3, dst2, tmp2_m, tmp3_m); \ - AVER_UB2_UB(tmp0_m, tmp2_m, tmp1_m, tmp3_m, tmp0_m, tmp1_m); \ - ST8x4_UB(tmp0_m, tmp1_m, pdst, stride); \ - } - -/* Description : Pack even byte elements and store byte vector in destination - memory - Arguments : Inputs - in0, in1, pdst -*/ -#define PCKEV_ST_SB(in0, in1, pdst) \ - { \ - v16i8 tmp_m; \ - \ - tmp_m = __msa_pckev_b((v16i8)in1, (v16i8)in0); \ - ST_SB(tmp_m, (pdst)); \ - } - -/* Description : Horizontal 2 tap filter kernel code - Arguments : Inputs - in0, in1, mask, coeff, shift -*/ -#define HORIZ_2TAP_FILT_UH(in0, in1, mask, coeff, shift) \ - ({ \ - v16i8 tmp0_m; \ - v8u16 tmp1_m; \ - \ - tmp0_m = __msa_vshf_b((v16i8)mask, (v16i8)in1, (v16i8)in0); \ - tmp1_m = __msa_dotp_u_h((v16u8)tmp0_m, (v16u8)coeff); \ - tmp1_m = (v8u16)__msa_srari_h((v8i16)tmp1_m, shift); \ - \ - tmp1_m; \ - }) -#endif /* VPX_DSP_MIPS_MACROS_MSA_H_ */ diff --git a/WebRtc.NET/include/third_party/libvpx/source/libvpx/vpx_dsp/psnr.h b/WebRtc.NET/include/third_party/libvpx/source/libvpx/vpx_dsp/psnr.h deleted file mode 100644 index f321131d..00000000 --- a/WebRtc.NET/include/third_party/libvpx/source/libvpx/vpx_dsp/psnr.h +++ /dev/null @@ -1,57 +0,0 @@ -/* -* Copyright (c) 2016 The WebM project authors. All Rights Reserved. -* -* Use of this source code is governed by a BSD-style license -* that can be found in the LICENSE file in the root of the source -* tree. An additional intellectual property rights grant can be found -* in the file PATENTS. All contributing project authors may -* be found in the AUTHORS file in the root of the source tree. -*/ - -#ifndef VPX_DSP_PSNR_H_ -#define VPX_DSP_PSNR_H_ - -#include "vpx_scale/yv12config.h" - -#define MAX_PSNR 100.0 - -#ifdef __cplusplus -extern "C" { -#endif - -typedef struct { - double psnr[4]; // total/y/u/v - uint64_t sse[4]; // total/y/u/v - uint32_t samples[4]; // total/y/u/v -} PSNR_STATS; - -// TODO(dkovalev) change vpx_sse_to_psnr signature: double -> int64_t - -/*!\brief Converts SSE to PSNR -* -* Converts sum of squared errros (SSE) to peak signal-to-noise ratio (PNSR). -* -* \param[in] samples Number of samples -* \param[in] peak Max sample value -* \param[in] sse Sum of squared errors -*/ -double vpx_sse_to_psnr(double samples, double peak, double sse); -int64_t vpx_get_y_sse(const YV12_BUFFER_CONFIG *a, const YV12_BUFFER_CONFIG *b); -#if CONFIG_VP9_HIGHBITDEPTH -int64_t vpx_highbd_get_y_sse(const YV12_BUFFER_CONFIG *a, - const YV12_BUFFER_CONFIG *b); -void vpx_calc_highbd_psnr(const YV12_BUFFER_CONFIG *a, - const YV12_BUFFER_CONFIG *b, PSNR_STATS *psnr, - unsigned int bit_depth, unsigned int in_bit_depth); -#endif -void vpx_calc_psnr(const YV12_BUFFER_CONFIG *a, const YV12_BUFFER_CONFIG *b, - PSNR_STATS *psnr); - -double vpx_psnrhvs(const YV12_BUFFER_CONFIG *source, - const YV12_BUFFER_CONFIG *dest, double *phvs_y, - double *phvs_u, double *phvs_v, uint32_t bd, uint32_t in_bd); - -#ifdef __cplusplus -} // extern "C" -#endif -#endif // VPX_DSP_PSNR_H_ diff --git a/WebRtc.NET/include/third_party/libvpx/source/libvpx/vpx_dsp/txfm_common.h b/WebRtc.NET/include/third_party/libvpx/source/libvpx/vpx_dsp/txfm_common.h deleted file mode 100644 index fd27f928..00000000 --- a/WebRtc.NET/include/third_party/libvpx/source/libvpx/vpx_dsp/txfm_common.h +++ /dev/null @@ -1,66 +0,0 @@ -/* - * Copyright (c) 2015 The WebM project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef VPX_DSP_TXFM_COMMON_H_ -#define VPX_DSP_TXFM_COMMON_H_ - -#include "vpx_dsp/vpx_dsp_common.h" - -// Constants and Macros used by all idct/dct functions -#define DCT_CONST_BITS 14 -#define DCT_CONST_ROUNDING (1 << (DCT_CONST_BITS - 1)) - -#define UNIT_QUANT_SHIFT 2 -#define UNIT_QUANT_FACTOR (1 << UNIT_QUANT_SHIFT) - -// Constants: -// for (int i = 1; i< 32; ++i) -// printf("static const int cospi_%d_64 = %.0f;\n", i, -// round(16384 * cos(i*M_PI/64))); -// Note: sin(k*Pi/64) = cos((32-k)*Pi/64) -static const tran_high_t cospi_1_64 = 16364; -static const tran_high_t cospi_2_64 = 16305; -static const tran_high_t cospi_3_64 = 16207; -static const tran_high_t cospi_4_64 = 16069; -static const tran_high_t cospi_5_64 = 15893; -static const tran_high_t cospi_6_64 = 15679; -static const tran_high_t cospi_7_64 = 15426; -static const tran_high_t cospi_8_64 = 15137; -static const tran_high_t cospi_9_64 = 14811; -static const tran_high_t cospi_10_64 = 14449; -static const tran_high_t cospi_11_64 = 14053; -static const tran_high_t cospi_12_64 = 13623; -static const tran_high_t cospi_13_64 = 13160; -static const tran_high_t cospi_14_64 = 12665; -static const tran_high_t cospi_15_64 = 12140; -static const tran_high_t cospi_16_64 = 11585; -static const tran_high_t cospi_17_64 = 11003; -static const tran_high_t cospi_18_64 = 10394; -static const tran_high_t cospi_19_64 = 9760; -static const tran_high_t cospi_20_64 = 9102; -static const tran_high_t cospi_21_64 = 8423; -static const tran_high_t cospi_22_64 = 7723; -static const tran_high_t cospi_23_64 = 7005; -static const tran_high_t cospi_24_64 = 6270; -static const tran_high_t cospi_25_64 = 5520; -static const tran_high_t cospi_26_64 = 4756; -static const tran_high_t cospi_27_64 = 3981; -static const tran_high_t cospi_28_64 = 3196; -static const tran_high_t cospi_29_64 = 2404; -static const tran_high_t cospi_30_64 = 1606; -static const tran_high_t cospi_31_64 = 804; - -// 16384 * sqrt(2) * sin(kPi/9) * 2 / 3 -static const tran_high_t sinpi_1_9 = 5283; -static const tran_high_t sinpi_2_9 = 9929; -static const tran_high_t sinpi_3_9 = 13377; -static const tran_high_t sinpi_4_9 = 15212; - -#endif // VPX_DSP_TXFM_COMMON_H_ diff --git a/WebRtc.NET/include/third_party/libvpx/source/libvpx/vpx_dsp/vpx_convolve.h b/WebRtc.NET/include/third_party/libvpx/source/libvpx/vpx_dsp/vpx_convolve.h deleted file mode 100644 index ee9744b3..00000000 --- a/WebRtc.NET/include/third_party/libvpx/source/libvpx/vpx_dsp/vpx_convolve.h +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright (c) 2013 The WebM project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ -#ifndef VPX_DSP_VPX_CONVOLVE_H_ -#define VPX_DSP_VPX_CONVOLVE_H_ - -#include "./vpx_config.h" -#include "vpx/vpx_integer.h" - -#ifdef __cplusplus -extern "C" { -#endif - -typedef void (*convolve_fn_t)(const uint8_t *src, ptrdiff_t src_stride, - uint8_t *dst, ptrdiff_t dst_stride, - const int16_t *filter_x, int x_step_q4, - const int16_t *filter_y, int y_step_q4, int w, - int h); - -#if CONFIG_VP9_HIGHBITDEPTH -typedef void (*highbd_convolve_fn_t)(const uint8_t *src, ptrdiff_t src_stride, - uint8_t *dst, ptrdiff_t dst_stride, - const int16_t *filter_x, int x_step_q4, - const int16_t *filter_y, int y_step_q4, - int w, int h, int bd); -#endif - -#ifdef __cplusplus -} // extern "C" -#endif - -#endif // VPX_DSP_VPX_CONVOLVE_H_ diff --git a/WebRtc.NET/include/third_party/libvpx/source/libvpx/vpx_dsp/vpx_filter.h b/WebRtc.NET/include/third_party/libvpx/source/libvpx/vpx_dsp/vpx_filter.h deleted file mode 100644 index 26d69050..00000000 --- a/WebRtc.NET/include/third_party/libvpx/source/libvpx/vpx_dsp/vpx_filter.h +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (c) 2015 The WebM project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef VPX_DSP_VPX_FILTER_H_ -#define VPX_DSP_VPX_FILTER_H_ - -#include "vpx/vpx_integer.h" - -#ifdef __cplusplus -extern "C" { -#endif - -#define FILTER_BITS 7 - -#define SUBPEL_BITS 4 -#define SUBPEL_MASK ((1 << SUBPEL_BITS) - 1) -#define SUBPEL_SHIFTS (1 << SUBPEL_BITS) -#define SUBPEL_TAPS 8 - -typedef int16_t InterpKernel[SUBPEL_TAPS]; - -static INLINE const InterpKernel *get_filter_base(const int16_t *filter) { - // NOTE: This assumes that the filter table is 256-byte aligned. - // TODO(agrange) Modify to make independent of table alignment. - return (const InterpKernel *)(((intptr_t)filter) & ~((intptr_t)0xFF)); -} - -static INLINE int get_filter_offset(const int16_t *f, - const InterpKernel *base) { - return (int)((const InterpKernel *)(intptr_t)f - base); -} - -#ifdef __cplusplus -} // extern "C" -#endif - -#endif // VPX_DSP_VPX_FILTER_H_ diff --git a/WebRtc.NET/include/third_party/libvpx/source/libvpx/vpx_dsp/x86/convolve.h b/WebRtc.NET/include/third_party/libvpx/source/libvpx/vpx_dsp/x86/convolve.h deleted file mode 100644 index d7468ad7..00000000 --- a/WebRtc.NET/include/third_party/libvpx/source/libvpx/vpx_dsp/x86/convolve.h +++ /dev/null @@ -1,198 +0,0 @@ -/* - * Copyright (c) 2015 The WebM project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ -#ifndef VPX_DSP_X86_CONVOLVE_H_ -#define VPX_DSP_X86_CONVOLVE_H_ - -#include - -#include "./vpx_config.h" -#include "vpx/vpx_integer.h" -#include "vpx_ports/mem.h" - -typedef void filter8_1dfunction(const uint8_t *src_ptr, ptrdiff_t src_pitch, - uint8_t *output_ptr, ptrdiff_t out_pitch, - uint32_t output_height, const int16_t *filter); - -#define FUN_CONV_1D(name, step_q4, filter, dir, src_start, avg, opt) \ - void vpx_convolve8_##name##_##opt( \ - const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, \ - ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, \ - const int16_t *filter_y, int y_step_q4, int w, int h) { \ - (void)filter_x; \ - (void)x_step_q4; \ - (void)filter_y; \ - (void)y_step_q4; \ - assert(filter[3] != 128); \ - assert(step_q4 == 16); \ - if (filter[0] | filter[1] | filter[2]) { \ - while (w >= 16) { \ - vpx_filter_block1d16_##dir##8_##avg##opt(src_start, src_stride, dst, \ - dst_stride, h, filter); \ - src += 16; \ - dst += 16; \ - w -= 16; \ - } \ - if (w == 8) { \ - vpx_filter_block1d8_##dir##8_##avg##opt(src_start, src_stride, dst, \ - dst_stride, h, filter); \ - } else if (w == 4) { \ - vpx_filter_block1d4_##dir##8_##avg##opt(src_start, src_stride, dst, \ - dst_stride, h, filter); \ - } \ - } else { \ - while (w >= 16) { \ - vpx_filter_block1d16_##dir##2_##avg##opt(src, src_stride, dst, \ - dst_stride, h, filter); \ - src += 16; \ - dst += 16; \ - w -= 16; \ - } \ - if (w == 8) { \ - vpx_filter_block1d8_##dir##2_##avg##opt(src, src_stride, dst, \ - dst_stride, h, filter); \ - } else if (w == 4) { \ - vpx_filter_block1d4_##dir##2_##avg##opt(src, src_stride, dst, \ - dst_stride, h, filter); \ - } \ - } \ - } - -#define FUN_CONV_2D(avg, opt) \ - void vpx_convolve8_##avg##opt( \ - const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, \ - ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, \ - const int16_t *filter_y, int y_step_q4, int w, int h) { \ - assert(filter_x[3] != 128); \ - assert(filter_y[3] != 128); \ - assert(w <= 64); \ - assert(h <= 64); \ - assert(x_step_q4 == 16); \ - assert(y_step_q4 == 16); \ - if (filter_x[0] | filter_x[1] | filter_x[2]) { \ - DECLARE_ALIGNED(16, uint8_t, fdata2[64 * 71]); \ - vpx_convolve8_horiz_##opt(src - 3 * src_stride, src_stride, fdata2, 64, \ - filter_x, x_step_q4, filter_y, y_step_q4, w, \ - h + 7); \ - vpx_convolve8_##avg##vert_##opt(fdata2 + 3 * 64, 64, dst, dst_stride, \ - filter_x, x_step_q4, filter_y, \ - y_step_q4, w, h); \ - } else { \ - DECLARE_ALIGNED(16, uint8_t, fdata2[64 * 65]); \ - vpx_convolve8_horiz_##opt(src, src_stride, fdata2, 64, filter_x, \ - x_step_q4, filter_y, y_step_q4, w, h + 1); \ - vpx_convolve8_##avg##vert_##opt(fdata2, 64, dst, dst_stride, filter_x, \ - x_step_q4, filter_y, y_step_q4, w, h); \ - } \ - } - -#if CONFIG_VP9_HIGHBITDEPTH - -typedef void highbd_filter8_1dfunction(const uint16_t *src_ptr, - const ptrdiff_t src_pitch, - uint16_t *output_ptr, - ptrdiff_t out_pitch, - unsigned int output_height, - const int16_t *filter, int bd); - -#define HIGH_FUN_CONV_1D(name, step_q4, filter, dir, src_start, avg, opt) \ - void vpx_highbd_convolve8_##name##_##opt( \ - const uint8_t *src8, ptrdiff_t src_stride, uint8_t *dst8, \ - ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, \ - const int16_t *filter_y, int y_step_q4, int w, int h, int bd) { \ - if (step_q4 == 16 && filter[3] != 128) { \ - uint16_t *src = CONVERT_TO_SHORTPTR(src8); \ - uint16_t *dst = CONVERT_TO_SHORTPTR(dst8); \ - if (filter[0] | filter[1] | filter[2]) { \ - while (w >= 16) { \ - vpx_highbd_filter_block1d16_##dir##8_##avg##opt( \ - src_start, src_stride, dst, dst_stride, h, filter, bd); \ - src += 16; \ - dst += 16; \ - w -= 16; \ - } \ - while (w >= 8) { \ - vpx_highbd_filter_block1d8_##dir##8_##avg##opt( \ - src_start, src_stride, dst, dst_stride, h, filter, bd); \ - src += 8; \ - dst += 8; \ - w -= 8; \ - } \ - while (w >= 4) { \ - vpx_highbd_filter_block1d4_##dir##8_##avg##opt( \ - src_start, src_stride, dst, dst_stride, h, filter, bd); \ - src += 4; \ - dst += 4; \ - w -= 4; \ - } \ - } else { \ - while (w >= 16) { \ - vpx_highbd_filter_block1d16_##dir##2_##avg##opt( \ - src, src_stride, dst, dst_stride, h, filter, bd); \ - src += 16; \ - dst += 16; \ - w -= 16; \ - } \ - while (w >= 8) { \ - vpx_highbd_filter_block1d8_##dir##2_##avg##opt( \ - src, src_stride, dst, dst_stride, h, filter, bd); \ - src += 8; \ - dst += 8; \ - w -= 8; \ - } \ - while (w >= 4) { \ - vpx_highbd_filter_block1d4_##dir##2_##avg##opt( \ - src, src_stride, dst, dst_stride, h, filter, bd); \ - src += 4; \ - dst += 4; \ - w -= 4; \ - } \ - } \ - } \ - if (w) { \ - vpx_highbd_convolve8_##name##_c(src8, src_stride, dst8, dst_stride, \ - filter_x, x_step_q4, filter_y, \ - y_step_q4, w, h, bd); \ - } \ - } - -#define HIGH_FUN_CONV_2D(avg, opt) \ - void vpx_highbd_convolve8_##avg##opt( \ - const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, \ - ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, \ - const int16_t *filter_y, int y_step_q4, int w, int h, int bd) { \ - assert(w <= 64); \ - assert(h <= 64); \ - if (x_step_q4 == 16 && y_step_q4 == 16) { \ - if ((filter_x[0] | filter_x[1] | filter_x[2]) || filter_x[3] == 128) { \ - DECLARE_ALIGNED(16, uint16_t, fdata2[64 * 71]); \ - vpx_highbd_convolve8_horiz_##opt( \ - src - 3 * src_stride, src_stride, CONVERT_TO_BYTEPTR(fdata2), 64, \ - filter_x, x_step_q4, filter_y, y_step_q4, w, h + 7, bd); \ - vpx_highbd_convolve8_##avg##vert_##opt( \ - CONVERT_TO_BYTEPTR(fdata2) + 192, 64, dst, dst_stride, filter_x, \ - x_step_q4, filter_y, y_step_q4, w, h, bd); \ - } else { \ - DECLARE_ALIGNED(16, uint16_t, fdata2[64 * 65]); \ - vpx_highbd_convolve8_horiz_##opt( \ - src, src_stride, CONVERT_TO_BYTEPTR(fdata2), 64, filter_x, \ - x_step_q4, filter_y, y_step_q4, w, h + 1, bd); \ - vpx_highbd_convolve8_##avg##vert_##opt( \ - CONVERT_TO_BYTEPTR(fdata2), 64, dst, dst_stride, filter_x, \ - x_step_q4, filter_y, y_step_q4, w, h, bd); \ - } \ - } else { \ - vpx_highbd_convolve8_##avg##c(src, src_stride, dst, dst_stride, \ - filter_x, x_step_q4, filter_y, y_step_q4, \ - w, h, bd); \ - } \ - } -#endif // CONFIG_VP9_HIGHBITDEPTH - -#endif // VPX_DSP_X86_CONVOLVE_H_ diff --git a/WebRtc.NET/include/third_party/libvpx/source/libvpx/vpx_dsp/x86/fdct.h b/WebRtc.NET/include/third_party/libvpx/source/libvpx/vpx_dsp/x86/fdct.h deleted file mode 100644 index 54a6d81f..00000000 --- a/WebRtc.NET/include/third_party/libvpx/source/libvpx/vpx_dsp/x86/fdct.h +++ /dev/null @@ -1,57 +0,0 @@ -/* - * Copyright (c) 2016 The WebM project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ -#ifndef VPX_DSP_X86_FDCT_H_ -#define VPX_DSP_X86_FDCT_H_ - -#include - -#include "./vpx_config.h" -#include "vpx/vpx_integer.h" -#include "vpx_dsp/vpx_dsp_common.h" - -// Load 8 16 bit values. If the source is 32 bits then cast down. -// This does not saturate values. It only truncates. -static INLINE __m128i load_tran_low(const tran_low_t *a) { -#if CONFIG_VP9_HIGHBITDEPTH - return _mm_setr_epi16((int16_t)a[0], (int16_t)a[1], (int16_t)a[2], - (int16_t)a[3], (int16_t)a[4], (int16_t)a[5], - (int16_t)a[6], (int16_t)a[7]); -#else - return _mm_load_si128((const __m128i *)a); -#endif -} - -// Store 8 16 bit values. If the destination is 32 bits then sign extend the -// values by multiplying by 1. -static INLINE void store_tran_low(__m128i a, tran_low_t *b) { -#if CONFIG_VP9_HIGHBITDEPTH - const __m128i one = _mm_set1_epi16(1); - const __m128i a_hi = _mm_mulhi_epi16(a, one); - const __m128i a_lo = _mm_mullo_epi16(a, one); - const __m128i a_1 = _mm_unpacklo_epi16(a_lo, a_hi); - const __m128i a_2 = _mm_unpackhi_epi16(a_lo, a_hi); - _mm_store_si128((__m128i *)(b), a_1); - _mm_store_si128((__m128i *)(b + 4), a_2); -#else - _mm_store_si128((__m128i *)(b), a); -#endif -} - -// Zero fill 8 positions in the output buffer. -static INLINE void store_zero_tran_low(tran_low_t *a) { - const __m128i zero = _mm_setzero_si128(); -#if CONFIG_VP9_HIGHBITDEPTH - _mm_store_si128((__m128i *)(a), zero); - _mm_store_si128((__m128i *)(a + 4), zero); -#else - _mm_store_si128((__m128i *)(a), zero); -#endif -} -#endif // VPX_DSP_X86_FDCT_H_ diff --git a/WebRtc.NET/include/third_party/libvpx/source/libvpx/vpx_dsp/x86/inv_txfm_sse2.h b/WebRtc.NET/include/third_party/libvpx/source/libvpx/vpx_dsp/x86/inv_txfm_sse2.h deleted file mode 100644 index d762a04a..00000000 --- a/WebRtc.NET/include/third_party/libvpx/source/libvpx/vpx_dsp/x86/inv_txfm_sse2.h +++ /dev/null @@ -1,196 +0,0 @@ -/* - * Copyright (c) 2015 The WebM project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef VPX_DSP_X86_INV_TXFM_SSE2_H_ -#define VPX_DSP_X86_INV_TXFM_SSE2_H_ - -#include // SSE2 -#include "./vpx_config.h" -#include "vpx/vpx_integer.h" -#include "vpx_dsp/inv_txfm.h" -#include "vpx_dsp/x86/txfm_common_sse2.h" - -// perform 8x8 transpose -static INLINE void array_transpose_8x8(__m128i *in, __m128i *res) { - const __m128i tr0_0 = _mm_unpacklo_epi16(in[0], in[1]); - const __m128i tr0_1 = _mm_unpacklo_epi16(in[2], in[3]); - const __m128i tr0_2 = _mm_unpackhi_epi16(in[0], in[1]); - const __m128i tr0_3 = _mm_unpackhi_epi16(in[2], in[3]); - const __m128i tr0_4 = _mm_unpacklo_epi16(in[4], in[5]); - const __m128i tr0_5 = _mm_unpacklo_epi16(in[6], in[7]); - const __m128i tr0_6 = _mm_unpackhi_epi16(in[4], in[5]); - const __m128i tr0_7 = _mm_unpackhi_epi16(in[6], in[7]); - - const __m128i tr1_0 = _mm_unpacklo_epi32(tr0_0, tr0_1); - const __m128i tr1_1 = _mm_unpacklo_epi32(tr0_4, tr0_5); - const __m128i tr1_2 = _mm_unpackhi_epi32(tr0_0, tr0_1); - const __m128i tr1_3 = _mm_unpackhi_epi32(tr0_4, tr0_5); - const __m128i tr1_4 = _mm_unpacklo_epi32(tr0_2, tr0_3); - const __m128i tr1_5 = _mm_unpacklo_epi32(tr0_6, tr0_7); - const __m128i tr1_6 = _mm_unpackhi_epi32(tr0_2, tr0_3); - const __m128i tr1_7 = _mm_unpackhi_epi32(tr0_6, tr0_7); - - res[0] = _mm_unpacklo_epi64(tr1_0, tr1_1); - res[1] = _mm_unpackhi_epi64(tr1_0, tr1_1); - res[2] = _mm_unpacklo_epi64(tr1_2, tr1_3); - res[3] = _mm_unpackhi_epi64(tr1_2, tr1_3); - res[4] = _mm_unpacklo_epi64(tr1_4, tr1_5); - res[5] = _mm_unpackhi_epi64(tr1_4, tr1_5); - res[6] = _mm_unpacklo_epi64(tr1_6, tr1_7); - res[7] = _mm_unpackhi_epi64(tr1_6, tr1_7); -} - -#define TRANSPOSE_8X4(in0, in1, in2, in3, out0, out1) \ - { \ - const __m128i tr0_0 = _mm_unpacklo_epi16(in0, in1); \ - const __m128i tr0_1 = _mm_unpacklo_epi16(in2, in3); \ - \ - in0 = _mm_unpacklo_epi32(tr0_0, tr0_1); /* i1 i0 */ \ - in1 = _mm_unpackhi_epi32(tr0_0, tr0_1); /* i3 i2 */ \ - } - -static INLINE void array_transpose_4X8(__m128i *in, __m128i *out) { - const __m128i tr0_0 = _mm_unpacklo_epi16(in[0], in[1]); - const __m128i tr0_1 = _mm_unpacklo_epi16(in[2], in[3]); - const __m128i tr0_4 = _mm_unpacklo_epi16(in[4], in[5]); - const __m128i tr0_5 = _mm_unpacklo_epi16(in[6], in[7]); - - const __m128i tr1_0 = _mm_unpacklo_epi32(tr0_0, tr0_1); - const __m128i tr1_2 = _mm_unpackhi_epi32(tr0_0, tr0_1); - const __m128i tr1_4 = _mm_unpacklo_epi32(tr0_4, tr0_5); - const __m128i tr1_6 = _mm_unpackhi_epi32(tr0_4, tr0_5); - - out[0] = _mm_unpacklo_epi64(tr1_0, tr1_4); - out[1] = _mm_unpackhi_epi64(tr1_0, tr1_4); - out[2] = _mm_unpacklo_epi64(tr1_2, tr1_6); - out[3] = _mm_unpackhi_epi64(tr1_2, tr1_6); -} - -static INLINE void array_transpose_16x16(__m128i *res0, __m128i *res1) { - __m128i tbuf[8]; - array_transpose_8x8(res0, res0); - array_transpose_8x8(res1, tbuf); - array_transpose_8x8(res0 + 8, res1); - array_transpose_8x8(res1 + 8, res1 + 8); - - res0[8] = tbuf[0]; - res0[9] = tbuf[1]; - res0[10] = tbuf[2]; - res0[11] = tbuf[3]; - res0[12] = tbuf[4]; - res0[13] = tbuf[5]; - res0[14] = tbuf[6]; - res0[15] = tbuf[7]; -} - -// Function to allow 8 bit optimisations to be used when profile 0 is used with -// highbitdepth enabled -static INLINE __m128i load_input_data(const tran_low_t *data) { -#if CONFIG_VP9_HIGHBITDEPTH - return octa_set_epi16(data[0], data[1], data[2], data[3], data[4], data[5], - data[6], data[7]); -#else - return _mm_load_si128((const __m128i *)data); -#endif -} - -static INLINE void load_buffer_8x16(const tran_low_t *input, __m128i *in) { - in[0] = load_input_data(input + 0 * 16); - in[1] = load_input_data(input + 1 * 16); - in[2] = load_input_data(input + 2 * 16); - in[3] = load_input_data(input + 3 * 16); - in[4] = load_input_data(input + 4 * 16); - in[5] = load_input_data(input + 5 * 16); - in[6] = load_input_data(input + 6 * 16); - in[7] = load_input_data(input + 7 * 16); - - in[8] = load_input_data(input + 8 * 16); - in[9] = load_input_data(input + 9 * 16); - in[10] = load_input_data(input + 10 * 16); - in[11] = load_input_data(input + 11 * 16); - in[12] = load_input_data(input + 12 * 16); - in[13] = load_input_data(input + 13 * 16); - in[14] = load_input_data(input + 14 * 16); - in[15] = load_input_data(input + 15 * 16); -} - -#define RECON_AND_STORE(dest, in_x) \ - { \ - __m128i d0 = _mm_loadl_epi64((__m128i *)(dest)); \ - d0 = _mm_unpacklo_epi8(d0, zero); \ - d0 = _mm_add_epi16(in_x, d0); \ - d0 = _mm_packus_epi16(d0, d0); \ - _mm_storel_epi64((__m128i *)(dest), d0); \ - } - -static INLINE void write_buffer_8x16(uint8_t *dest, __m128i *in, int stride) { - const __m128i final_rounding = _mm_set1_epi16(1 << 5); - const __m128i zero = _mm_setzero_si128(); - // Final rounding and shift - in[0] = _mm_adds_epi16(in[0], final_rounding); - in[1] = _mm_adds_epi16(in[1], final_rounding); - in[2] = _mm_adds_epi16(in[2], final_rounding); - in[3] = _mm_adds_epi16(in[3], final_rounding); - in[4] = _mm_adds_epi16(in[4], final_rounding); - in[5] = _mm_adds_epi16(in[5], final_rounding); - in[6] = _mm_adds_epi16(in[6], final_rounding); - in[7] = _mm_adds_epi16(in[7], final_rounding); - in[8] = _mm_adds_epi16(in[8], final_rounding); - in[9] = _mm_adds_epi16(in[9], final_rounding); - in[10] = _mm_adds_epi16(in[10], final_rounding); - in[11] = _mm_adds_epi16(in[11], final_rounding); - in[12] = _mm_adds_epi16(in[12], final_rounding); - in[13] = _mm_adds_epi16(in[13], final_rounding); - in[14] = _mm_adds_epi16(in[14], final_rounding); - in[15] = _mm_adds_epi16(in[15], final_rounding); - - in[0] = _mm_srai_epi16(in[0], 6); - in[1] = _mm_srai_epi16(in[1], 6); - in[2] = _mm_srai_epi16(in[2], 6); - in[3] = _mm_srai_epi16(in[3], 6); - in[4] = _mm_srai_epi16(in[4], 6); - in[5] = _mm_srai_epi16(in[5], 6); - in[6] = _mm_srai_epi16(in[6], 6); - in[7] = _mm_srai_epi16(in[7], 6); - in[8] = _mm_srai_epi16(in[8], 6); - in[9] = _mm_srai_epi16(in[9], 6); - in[10] = _mm_srai_epi16(in[10], 6); - in[11] = _mm_srai_epi16(in[11], 6); - in[12] = _mm_srai_epi16(in[12], 6); - in[13] = _mm_srai_epi16(in[13], 6); - in[14] = _mm_srai_epi16(in[14], 6); - in[15] = _mm_srai_epi16(in[15], 6); - - RECON_AND_STORE(dest + 0 * stride, in[0]); - RECON_AND_STORE(dest + 1 * stride, in[1]); - RECON_AND_STORE(dest + 2 * stride, in[2]); - RECON_AND_STORE(dest + 3 * stride, in[3]); - RECON_AND_STORE(dest + 4 * stride, in[4]); - RECON_AND_STORE(dest + 5 * stride, in[5]); - RECON_AND_STORE(dest + 6 * stride, in[6]); - RECON_AND_STORE(dest + 7 * stride, in[7]); - RECON_AND_STORE(dest + 8 * stride, in[8]); - RECON_AND_STORE(dest + 9 * stride, in[9]); - RECON_AND_STORE(dest + 10 * stride, in[10]); - RECON_AND_STORE(dest + 11 * stride, in[11]); - RECON_AND_STORE(dest + 12 * stride, in[12]); - RECON_AND_STORE(dest + 13 * stride, in[13]); - RECON_AND_STORE(dest + 14 * stride, in[14]); - RECON_AND_STORE(dest + 15 * stride, in[15]); -} - -void idct4_sse2(__m128i *in); -void idct8_sse2(__m128i *in); -void idct16_sse2(__m128i *in0, __m128i *in1); -void iadst4_sse2(__m128i *in); -void iadst8_sse2(__m128i *in); -void iadst16_sse2(__m128i *in0, __m128i *in1); - -#endif // VPX_DSP_X86_INV_TXFM_SSE2_H_ diff --git a/WebRtc.NET/include/third_party/libvpx/source/libvpx/vpx_ports/config.h b/WebRtc.NET/include/third_party/libvpx/source/libvpx/vpx_ports/config.h deleted file mode 100644 index 3c1ab99f..00000000 --- a/WebRtc.NET/include/third_party/libvpx/source/libvpx/vpx_ports/config.h +++ /dev/null @@ -1,16 +0,0 @@ -/* - * Copyright (c) 2010 The WebM project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef VPX_PORTS_CONFIG_H_ -#define VPX_PORTS_CONFIG_H_ - -#include "vpx_config.h" - -#endif // VPX_PORTS_CONFIG_H_ diff --git a/WebRtc.NET/include/third_party/libvpx/source/libvpx/vpx_ports/mem.h b/WebRtc.NET/include/third_party/libvpx/source/libvpx/vpx_ports/mem.h deleted file mode 100644 index 2d49b7a0..00000000 --- a/WebRtc.NET/include/third_party/libvpx/source/libvpx/vpx_ports/mem.h +++ /dev/null @@ -1,62 +0,0 @@ -/* - * Copyright (c) 2010 The WebM project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef VPX_PORTS_MEM_H_ -#define VPX_PORTS_MEM_H_ - -#include "vpx_config.h" -#include "vpx/vpx_integer.h" - -#if (defined(__GNUC__) && __GNUC__) || defined(__SUNPRO_C) -#define DECLARE_ALIGNED(n, typ, val) typ val __attribute__((aligned(n))) -#elif defined(_MSC_VER) -#define DECLARE_ALIGNED(n, typ, val) __declspec(align(n)) typ val -#else -#warning No alignment directives known for this compiler. -#define DECLARE_ALIGNED(n, typ, val) typ val -#endif - -/* Indicates that the usage of the specified variable has been audited to assure - * that it's safe to use uninitialized. Silences 'may be used uninitialized' - * warnings on gcc. - */ -#if defined(__GNUC__) && __GNUC__ -#define UNINITIALIZED_IS_SAFE(x) x = x -#else -#define UNINITIALIZED_IS_SAFE(x) x -#endif - -#if HAVE_NEON && defined(_MSC_VER) -#define __builtin_prefetch(x) -#endif - -/* Shift down with rounding */ -#define ROUND_POWER_OF_TWO(value, n) (((value) + (1 << ((n)-1))) >> (n)) -#define ROUND64_POWER_OF_TWO(value, n) (((value) + (1ULL << ((n)-1))) >> (n)) - -#define ALIGN_POWER_OF_TWO(value, n) \ - (((value) + ((1 << (n)) - 1)) & ~((1 << (n)) - 1)) - -#define CONVERT_TO_SHORTPTR(x) ((uint16_t *)(((uintptr_t)(x)) << 1)) -#if CONFIG_VP9_HIGHBITDEPTH -#define CONVERT_TO_BYTEPTR(x) ((uint8_t *)(((uintptr_t)(x)) >> 1)) -#endif // CONFIG_VP9_HIGHBITDEPTH - -#if !defined(__has_feature) -#define __has_feature(x) 0 -#endif // !defined(__has_feature) - -#if __has_feature(address_sanitizer) || defined(__SANITIZE_ADDRESS__) -#define VPX_WITH_ASAN 1 -#else -#define VPX_WITH_ASAN 0 -#endif // __has_feature(address_sanitizer) || defined(__SANITIZE_ADDRESS__) - -#endif // VPX_PORTS_MEM_H_ diff --git a/WebRtc.NET/include/third_party/libvpx/source/libvpx/vpx_ports/system_state.h b/WebRtc.NET/include/third_party/libvpx/source/libvpx/vpx_ports/system_state.h deleted file mode 100644 index 086c6468..00000000 --- a/WebRtc.NET/include/third_party/libvpx/source/libvpx/vpx_ports/system_state.h +++ /dev/null @@ -1,22 +0,0 @@ -/* - * Copyright (c) 2015 The WebM project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef VPX_PORTS_SYSTEM_STATE_H_ -#define VPX_PORTS_SYSTEM_STATE_H_ - -#include "./vpx_config.h" - -#if ARCH_X86 || ARCH_X86_64 -void vpx_reset_mmx_state(void); -#define vpx_clear_system_state() vpx_reset_mmx_state() -#else -#define vpx_clear_system_state() -#endif // ARCH_X86 || ARCH_X86_64 -#endif // VPX_PORTS_SYSTEM_STATE_H_ diff --git a/WebRtc.NET/include/third_party/libyuv/include/libyuv/basic_types.h b/WebRtc.NET/include/third_party/libyuv/include/libyuv/basic_types.h deleted file mode 100644 index 7d98bb93..00000000 --- a/WebRtc.NET/include/third_party/libyuv/include/libyuv/basic_types.h +++ /dev/null @@ -1,117 +0,0 @@ -/* - * Copyright 2011 The LibYuv Project Authors. All rights reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef INCLUDE_LIBYUV_BASIC_TYPES_H_ -#define INCLUDE_LIBYUV_BASIC_TYPES_H_ - -#include // for NULL, size_t - -#if defined(_MSC_VER) && (_MSC_VER < 1600) -#include // for uintptr_t on x86 -#else -#include // for uintptr_t -#endif - -#ifndef GG_LONGLONG -#ifndef INT_TYPES_DEFINED -#define INT_TYPES_DEFINED -#ifdef COMPILER_MSVC -typedef unsigned __int64 uint64; -typedef __int64 int64; -#ifndef INT64_C -#define INT64_C(x) x##I64 -#endif -#ifndef UINT64_C -#define UINT64_C(x) x##UI64 -#endif -#define INT64_F "I64" -#else // COMPILER_MSVC -#if defined(__LP64__) && !defined(__OpenBSD__) && !defined(__APPLE__) -typedef unsigned long uint64; // NOLINT -typedef long int64; // NOLINT -#ifndef INT64_C -#define INT64_C(x) x##L -#endif -#ifndef UINT64_C -#define UINT64_C(x) x##UL -#endif -#define INT64_F "l" -#else // defined(__LP64__) && !defined(__OpenBSD__) && !defined(__APPLE__) -typedef unsigned long long uint64; // NOLINT -typedef long long int64; // NOLINT -#ifndef INT64_C -#define INT64_C(x) x##LL -#endif -#ifndef UINT64_C -#define UINT64_C(x) x##ULL -#endif -#define INT64_F "ll" -#endif // __LP64__ -#endif // COMPILER_MSVC -typedef unsigned int uint32; -typedef int int32; -typedef unsigned short uint16; // NOLINT -typedef short int16; // NOLINT -typedef unsigned char uint8; -typedef signed char int8; -#endif // INT_TYPES_DEFINED -#endif // GG_LONGLONG - -// Detect compiler is for x86 or x64. -#if defined(__x86_64__) || defined(_M_X64) || defined(__i386__) || \ - defined(_M_IX86) -#define CPU_X86 1 -#endif -// Detect compiler is for ARM. -#if defined(__arm__) || defined(_M_ARM) -#define CPU_ARM 1 -#endif - -#ifndef ALIGNP -#ifdef __cplusplus -#define ALIGNP(p, t) \ - reinterpret_cast( \ - ((reinterpret_cast(p) + ((t)-1)) & ~((t)-1))) -#else -#define ALIGNP(p, t) \ - (uint8*)((((uintptr_t)(p) + ((t)-1)) & ~((t)-1))) /* NOLINT */ -#endif -#endif - -#if !defined(LIBYUV_API) -#if defined(_WIN32) || defined(__CYGWIN__) -#if defined(LIBYUV_BUILDING_SHARED_LIBRARY) -#define LIBYUV_API __declspec(dllexport) -#elif defined(LIBYUV_USING_SHARED_LIBRARY) -#define LIBYUV_API __declspec(dllimport) -#else -#define LIBYUV_API -#endif // LIBYUV_BUILDING_SHARED_LIBRARY -#elif defined(__GNUC__) && (__GNUC__ >= 4) && !defined(__APPLE__) && \ - (defined(LIBYUV_BUILDING_SHARED_LIBRARY) || \ - defined(LIBYUV_USING_SHARED_LIBRARY)) -#define LIBYUV_API __attribute__((visibility("default"))) -#else -#define LIBYUV_API -#endif // __GNUC__ -#endif // LIBYUV_API - -#define LIBYUV_BOOL int -#define LIBYUV_FALSE 0 -#define LIBYUV_TRUE 1 - -// Visual C x86 or GCC little endian. -#if defined(__x86_64__) || defined(_M_X64) || defined(__i386__) || \ - defined(_M_IX86) || defined(__arm__) || defined(_M_ARM) || \ - (defined(__BYTE_ORDER__) && __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__) -#define LIBYUV_LITTLE_ENDIAN -#endif - -#endif // INCLUDE_LIBYUV_BASIC_TYPES_H_ diff --git a/WebRtc.NET/include/third_party/libyuv/include/libyuv/compare.h b/WebRtc.NET/include/third_party/libyuv/include/libyuv/compare.h deleted file mode 100644 index 4deca97f..00000000 --- a/WebRtc.NET/include/third_party/libyuv/include/libyuv/compare.h +++ /dev/null @@ -1,100 +0,0 @@ -/* - * Copyright 2011 The LibYuv Project Authors. All rights reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef INCLUDE_LIBYUV_COMPARE_H_ -#define INCLUDE_LIBYUV_COMPARE_H_ - -#include "libyuv/basic_types.h" - -#ifdef __cplusplus -namespace libyuv { -extern "C" { -#endif - -// Compute a hash for specified memory. Seed of 5381 recommended. -LIBYUV_API -uint32 HashDjb2(const uint8* src, uint64 count, uint32 seed); - -// Scan an opaque argb image and return fourcc based on alpha offset. -// Returns FOURCC_ARGB, FOURCC_BGRA, or 0 if unknown. -LIBYUV_API -uint32 ARGBDetect(const uint8* argb, int stride_argb, int width, int height); - -// Sum Square Error - used to compute Mean Square Error or PSNR. -LIBYUV_API -uint64 ComputeSumSquareError(const uint8* src_a, const uint8* src_b, int count); - -LIBYUV_API -uint64 ComputeSumSquareErrorPlane(const uint8* src_a, - int stride_a, - const uint8* src_b, - int stride_b, - int width, - int height); - -static const int kMaxPsnr = 128; - -LIBYUV_API -double SumSquareErrorToPsnr(uint64 sse, uint64 count); - -LIBYUV_API -double CalcFramePsnr(const uint8* src_a, - int stride_a, - const uint8* src_b, - int stride_b, - int width, - int height); - -LIBYUV_API -double I420Psnr(const uint8* src_y_a, - int stride_y_a, - const uint8* src_u_a, - int stride_u_a, - const uint8* src_v_a, - int stride_v_a, - const uint8* src_y_b, - int stride_y_b, - const uint8* src_u_b, - int stride_u_b, - const uint8* src_v_b, - int stride_v_b, - int width, - int height); - -LIBYUV_API -double CalcFrameSsim(const uint8* src_a, - int stride_a, - const uint8* src_b, - int stride_b, - int width, - int height); - -LIBYUV_API -double I420Ssim(const uint8* src_y_a, - int stride_y_a, - const uint8* src_u_a, - int stride_u_a, - const uint8* src_v_a, - int stride_v_a, - const uint8* src_y_b, - int stride_y_b, - const uint8* src_u_b, - int stride_u_b, - const uint8* src_v_b, - int stride_v_b, - int width, - int height); - -#ifdef __cplusplus -} // extern "C" -} // namespace libyuv -#endif - -#endif // INCLUDE_LIBYUV_COMPARE_H_ diff --git a/WebRtc.NET/include/third_party/libyuv/include/libyuv/compare_row.h b/WebRtc.NET/include/third_party/libyuv/include/libyuv/compare_row.h deleted file mode 100644 index 7abc2d4a..00000000 --- a/WebRtc.NET/include/third_party/libyuv/include/libyuv/compare_row.h +++ /dev/null @@ -1,84 +0,0 @@ -/* - * Copyright 2013 The LibYuv Project Authors. All rights reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef INCLUDE_LIBYUV_COMPARE_ROW_H_ -#define INCLUDE_LIBYUV_COMPARE_ROW_H_ - -#include "libyuv/basic_types.h" - -#ifdef __cplusplus -namespace libyuv { -extern "C" { -#endif - -#if defined(__pnacl__) || defined(__CLR_VER) || \ - (defined(__i386__) && !defined(__SSE2__)) -#define LIBYUV_DISABLE_X86 -#endif -// MemorySanitizer does not support assembly code yet. http://crbug.com/344505 -#if defined(__has_feature) -#if __has_feature(memory_sanitizer) -#define LIBYUV_DISABLE_X86 -#endif -#endif - -// Visual C 2012 required for AVX2. -#if defined(_M_IX86) && !defined(__clang__) && defined(_MSC_VER) && \ - _MSC_VER >= 1700 -#define VISUALC_HAS_AVX2 1 -#endif // VisualStudio >= 2012 - -// clang >= 3.4.0 required for AVX2. -#if defined(__clang__) && (defined(__x86_64__) || defined(__i386__)) -#if (__clang_major__ > 3) || (__clang_major__ == 3 && (__clang_minor__ >= 4)) -#define CLANG_HAS_AVX2 1 -#endif // clang >= 3.4 -#endif // __clang__ - -#if !defined(LIBYUV_DISABLE_X86) && defined(_M_IX86) && \ - (defined(VISUALC_HAS_AVX2) || defined(CLANG_HAS_AVX2)) -#define HAS_HASHDJB2_AVX2 -#endif - -// The following are available for Visual C and GCC: -#if !defined(LIBYUV_DISABLE_X86) && \ - (defined(__x86_64__) || (defined(__i386__) || defined(_M_IX86))) -#define HAS_HASHDJB2_SSE41 -#define HAS_SUMSQUAREERROR_SSE2 -#endif - -// The following are available for Visual C and clangcl 32 bit: -#if !defined(LIBYUV_DISABLE_X86) && defined(_M_IX86) && \ - (defined(VISUALC_HAS_AVX2) || defined(CLANG_HAS_AVX2)) -#define HAS_HASHDJB2_AVX2 -#define HAS_SUMSQUAREERROR_AVX2 -#endif - -// The following are available for Neon: -#if !defined(LIBYUV_DISABLE_NEON) && \ - (defined(__ARM_NEON__) || defined(LIBYUV_NEON) || defined(__aarch64__)) -#define HAS_SUMSQUAREERROR_NEON -#endif - -uint32 SumSquareError_C(const uint8* src_a, const uint8* src_b, int count); -uint32 SumSquareError_SSE2(const uint8* src_a, const uint8* src_b, int count); -uint32 SumSquareError_AVX2(const uint8* src_a, const uint8* src_b, int count); -uint32 SumSquareError_NEON(const uint8* src_a, const uint8* src_b, int count); - -uint32 HashDjb2_C(const uint8* src, int count, uint32 seed); -uint32 HashDjb2_SSE41(const uint8* src, int count, uint32 seed); -uint32 HashDjb2_AVX2(const uint8* src, int count, uint32 seed); - -#ifdef __cplusplus -} // extern "C" -} // namespace libyuv -#endif - -#endif // INCLUDE_LIBYUV_COMPARE_ROW_H_ diff --git a/WebRtc.NET/include/third_party/libyuv/include/libyuv/convert.h b/WebRtc.NET/include/third_party/libyuv/include/libyuv/convert.h deleted file mode 100644 index f096d193..00000000 --- a/WebRtc.NET/include/third_party/libyuv/include/libyuv/convert.h +++ /dev/null @@ -1,366 +0,0 @@ -/* - * Copyright 2011 The LibYuv Project Authors. All rights reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef INCLUDE_LIBYUV_CONVERT_H_ -#define INCLUDE_LIBYUV_CONVERT_H_ - -#include "libyuv/basic_types.h" - -#include "libyuv/rotate.h" // For enum RotationMode. - -// TODO(fbarchard): fix WebRTC source to include following libyuv headers: -#include "libyuv/convert_argb.h" // For WebRTC I420ToARGB. b/620 -#include "libyuv/convert_from.h" // For WebRTC ConvertFromI420. b/620 -#include "libyuv/planar_functions.h" // For WebRTC I420Rect, CopyPlane. b/618 - -#ifdef __cplusplus -namespace libyuv { -extern "C" { -#endif - -// Convert I444 to I420. -LIBYUV_API -int I444ToI420(const uint8* src_y, - int src_stride_y, - const uint8* src_u, - int src_stride_u, - const uint8* src_v, - int src_stride_v, - uint8* dst_y, - int dst_stride_y, - uint8* dst_u, - int dst_stride_u, - uint8* dst_v, - int dst_stride_v, - int width, - int height); - -// Convert I422 to I420. -LIBYUV_API -int I422ToI420(const uint8* src_y, - int src_stride_y, - const uint8* src_u, - int src_stride_u, - const uint8* src_v, - int src_stride_v, - uint8* dst_y, - int dst_stride_y, - uint8* dst_u, - int dst_stride_u, - uint8* dst_v, - int dst_stride_v, - int width, - int height); - -// Copy I420 to I420. -#define I420ToI420 I420Copy -LIBYUV_API -int I420Copy(const uint8* src_y, - int src_stride_y, - const uint8* src_u, - int src_stride_u, - const uint8* src_v, - int src_stride_v, - uint8* dst_y, - int dst_stride_y, - uint8* dst_u, - int dst_stride_u, - uint8* dst_v, - int dst_stride_v, - int width, - int height); - -// Convert I400 (grey) to I420. -LIBYUV_API -int I400ToI420(const uint8* src_y, - int src_stride_y, - uint8* dst_y, - int dst_stride_y, - uint8* dst_u, - int dst_stride_u, - uint8* dst_v, - int dst_stride_v, - int width, - int height); - -#define J400ToJ420 I400ToI420 - -// Convert NV12 to I420. -LIBYUV_API -int NV12ToI420(const uint8* src_y, - int src_stride_y, - const uint8* src_uv, - int src_stride_uv, - uint8* dst_y, - int dst_stride_y, - uint8* dst_u, - int dst_stride_u, - uint8* dst_v, - int dst_stride_v, - int width, - int height); - -// Convert NV21 to I420. -LIBYUV_API -int NV21ToI420(const uint8* src_y, - int src_stride_y, - const uint8* src_vu, - int src_stride_vu, - uint8* dst_y, - int dst_stride_y, - uint8* dst_u, - int dst_stride_u, - uint8* dst_v, - int dst_stride_v, - int width, - int height); - -// Convert YUY2 to I420. -LIBYUV_API -int YUY2ToI420(const uint8* src_yuy2, - int src_stride_yuy2, - uint8* dst_y, - int dst_stride_y, - uint8* dst_u, - int dst_stride_u, - uint8* dst_v, - int dst_stride_v, - int width, - int height); - -// Convert UYVY to I420. -LIBYUV_API -int UYVYToI420(const uint8* src_uyvy, - int src_stride_uyvy, - uint8* dst_y, - int dst_stride_y, - uint8* dst_u, - int dst_stride_u, - uint8* dst_v, - int dst_stride_v, - int width, - int height); - -// Convert M420 to I420. -LIBYUV_API -int M420ToI420(const uint8* src_m420, - int src_stride_m420, - uint8* dst_y, - int dst_stride_y, - uint8* dst_u, - int dst_stride_u, - uint8* dst_v, - int dst_stride_v, - int width, - int height); - -// Convert Android420 to I420. -LIBYUV_API -int Android420ToI420(const uint8* src_y, - int src_stride_y, - const uint8* src_u, - int src_stride_u, - const uint8* src_v, - int src_stride_v, - int pixel_stride_uv, - uint8* dst_y, - int dst_stride_y, - uint8* dst_u, - int dst_stride_u, - uint8* dst_v, - int dst_stride_v, - int width, - int height); - -// ARGB little endian (bgra in memory) to I420. -LIBYUV_API -int ARGBToI420(const uint8* src_frame, - int src_stride_frame, - uint8* dst_y, - int dst_stride_y, - uint8* dst_u, - int dst_stride_u, - uint8* dst_v, - int dst_stride_v, - int width, - int height); - -// BGRA little endian (argb in memory) to I420. -LIBYUV_API -int BGRAToI420(const uint8* src_frame, - int src_stride_frame, - uint8* dst_y, - int dst_stride_y, - uint8* dst_u, - int dst_stride_u, - uint8* dst_v, - int dst_stride_v, - int width, - int height); - -// ABGR little endian (rgba in memory) to I420. -LIBYUV_API -int ABGRToI420(const uint8* src_frame, - int src_stride_frame, - uint8* dst_y, - int dst_stride_y, - uint8* dst_u, - int dst_stride_u, - uint8* dst_v, - int dst_stride_v, - int width, - int height); - -// RGBA little endian (abgr in memory) to I420. -LIBYUV_API -int RGBAToI420(const uint8* src_frame, - int src_stride_frame, - uint8* dst_y, - int dst_stride_y, - uint8* dst_u, - int dst_stride_u, - uint8* dst_v, - int dst_stride_v, - int width, - int height); - -// RGB little endian (bgr in memory) to I420. -LIBYUV_API -int RGB24ToI420(const uint8* src_frame, - int src_stride_frame, - uint8* dst_y, - int dst_stride_y, - uint8* dst_u, - int dst_stride_u, - uint8* dst_v, - int dst_stride_v, - int width, - int height); - -// RGB big endian (rgb in memory) to I420. -LIBYUV_API -int RAWToI420(const uint8* src_frame, - int src_stride_frame, - uint8* dst_y, - int dst_stride_y, - uint8* dst_u, - int dst_stride_u, - uint8* dst_v, - int dst_stride_v, - int width, - int height); - -// RGB16 (RGBP fourcc) little endian to I420. -LIBYUV_API -int RGB565ToI420(const uint8* src_frame, - int src_stride_frame, - uint8* dst_y, - int dst_stride_y, - uint8* dst_u, - int dst_stride_u, - uint8* dst_v, - int dst_stride_v, - int width, - int height); - -// RGB15 (RGBO fourcc) little endian to I420. -LIBYUV_API -int ARGB1555ToI420(const uint8* src_frame, - int src_stride_frame, - uint8* dst_y, - int dst_stride_y, - uint8* dst_u, - int dst_stride_u, - uint8* dst_v, - int dst_stride_v, - int width, - int height); - -// RGB12 (R444 fourcc) little endian to I420. -LIBYUV_API -int ARGB4444ToI420(const uint8* src_frame, - int src_stride_frame, - uint8* dst_y, - int dst_stride_y, - uint8* dst_u, - int dst_stride_u, - uint8* dst_v, - int dst_stride_v, - int width, - int height); - -#ifdef HAVE_JPEG -// src_width/height provided by capture. -// dst_width/height for clipping determine final size. -LIBYUV_API -int MJPGToI420(const uint8* sample, - size_t sample_size, - uint8* dst_y, - int dst_stride_y, - uint8* dst_u, - int dst_stride_u, - uint8* dst_v, - int dst_stride_v, - int src_width, - int src_height, - int dst_width, - int dst_height); - -// Query size of MJPG in pixels. -LIBYUV_API -int MJPGSize(const uint8* sample, size_t sample_size, int* width, int* height); -#endif - -// Convert camera sample to I420 with cropping, rotation and vertical flip. -// "src_size" is needed to parse MJPG. -// "dst_stride_y" number of bytes in a row of the dst_y plane. -// Normally this would be the same as dst_width, with recommended alignment -// to 16 bytes for better efficiency. -// If rotation of 90 or 270 is used, stride is affected. The caller should -// allocate the I420 buffer according to rotation. -// "dst_stride_u" number of bytes in a row of the dst_u plane. -// Normally this would be the same as (dst_width + 1) / 2, with -// recommended alignment to 16 bytes for better efficiency. -// If rotation of 90 or 270 is used, stride is affected. -// "crop_x" and "crop_y" are starting position for cropping. -// To center, crop_x = (src_width - dst_width) / 2 -// crop_y = (src_height - dst_height) / 2 -// "src_width" / "src_height" is size of src_frame in pixels. -// "src_height" can be negative indicating a vertically flipped image source. -// "crop_width" / "crop_height" is the size to crop the src to. -// Must be less than or equal to src_width/src_height -// Cropping parameters are pre-rotation. -// "rotation" can be 0, 90, 180 or 270. -// "format" is a fourcc. ie 'I420', 'YUY2' -// Returns 0 for successful; -1 for invalid parameter. Non-zero for failure. -LIBYUV_API -int ConvertToI420(const uint8* src_frame, - size_t src_size, - uint8* dst_y, - int dst_stride_y, - uint8* dst_u, - int dst_stride_u, - uint8* dst_v, - int dst_stride_v, - int crop_x, - int crop_y, - int src_width, - int src_height, - int crop_width, - int crop_height, - enum RotationMode rotation, - uint32 format); - -#ifdef __cplusplus -} // extern "C" -} // namespace libyuv -#endif - -#endif // INCLUDE_LIBYUV_CONVERT_H_ diff --git a/WebRtc.NET/include/third_party/libyuv/include/libyuv/convert_argb.h b/WebRtc.NET/include/third_party/libyuv/include/libyuv/convert_argb.h deleted file mode 100644 index f43a5060..00000000 --- a/WebRtc.NET/include/third_party/libyuv/include/libyuv/convert_argb.h +++ /dev/null @@ -1,454 +0,0 @@ -/* - * Copyright 2012 The LibYuv Project Authors. All rights reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef INCLUDE_LIBYUV_CONVERT_ARGB_H_ -#define INCLUDE_LIBYUV_CONVERT_ARGB_H_ - -#include "libyuv/basic_types.h" - -#include "libyuv/rotate.h" // For enum RotationMode. - -// TODO(fbarchard): This set of functions should exactly match convert.h -// TODO(fbarchard): Add tests. Create random content of right size and convert -// with C vs Opt and or to I420 and compare. -// TODO(fbarchard): Some of these functions lack parameter setting. - -#ifdef __cplusplus -namespace libyuv { -extern "C" { -#endif - -// Alias. -#define ARGBToARGB ARGBCopy - -// Copy ARGB to ARGB. -LIBYUV_API -int ARGBCopy(const uint8* src_argb, - int src_stride_argb, - uint8* dst_argb, - int dst_stride_argb, - int width, - int height); - -// Convert I420 to ARGB. -LIBYUV_API -int I420ToARGB(const uint8* src_y, - int src_stride_y, - const uint8* src_u, - int src_stride_u, - const uint8* src_v, - int src_stride_v, - uint8* dst_argb, - int dst_stride_argb, - int width, - int height); - -// Duplicate prototype for function in convert_from.h for remoting. -LIBYUV_API -int I420ToABGR(const uint8* src_y, - int src_stride_y, - const uint8* src_u, - int src_stride_u, - const uint8* src_v, - int src_stride_v, - uint8* dst_argb, - int dst_stride_argb, - int width, - int height); - -// Convert I422 to ARGB. -LIBYUV_API -int I422ToARGB(const uint8* src_y, - int src_stride_y, - const uint8* src_u, - int src_stride_u, - const uint8* src_v, - int src_stride_v, - uint8* dst_argb, - int dst_stride_argb, - int width, - int height); - -// Convert I444 to ARGB. -LIBYUV_API -int I444ToARGB(const uint8* src_y, - int src_stride_y, - const uint8* src_u, - int src_stride_u, - const uint8* src_v, - int src_stride_v, - uint8* dst_argb, - int dst_stride_argb, - int width, - int height); - -// Convert J444 to ARGB. -LIBYUV_API -int J444ToARGB(const uint8* src_y, - int src_stride_y, - const uint8* src_u, - int src_stride_u, - const uint8* src_v, - int src_stride_v, - uint8* dst_argb, - int dst_stride_argb, - int width, - int height); - -// Convert I444 to ABGR. -LIBYUV_API -int I444ToABGR(const uint8* src_y, - int src_stride_y, - const uint8* src_u, - int src_stride_u, - const uint8* src_v, - int src_stride_v, - uint8* dst_abgr, - int dst_stride_abgr, - int width, - int height); - -// Convert I420 with Alpha to preattenuated ARGB. -LIBYUV_API -int I420AlphaToARGB(const uint8* src_y, - int src_stride_y, - const uint8* src_u, - int src_stride_u, - const uint8* src_v, - int src_stride_v, - const uint8* src_a, - int src_stride_a, - uint8* dst_argb, - int dst_stride_argb, - int width, - int height, - int attenuate); - -// Convert I420 with Alpha to preattenuated ABGR. -LIBYUV_API -int I420AlphaToABGR(const uint8* src_y, - int src_stride_y, - const uint8* src_u, - int src_stride_u, - const uint8* src_v, - int src_stride_v, - const uint8* src_a, - int src_stride_a, - uint8* dst_abgr, - int dst_stride_abgr, - int width, - int height, - int attenuate); - -// Convert I400 (grey) to ARGB. Reverse of ARGBToI400. -LIBYUV_API -int I400ToARGB(const uint8* src_y, - int src_stride_y, - uint8* dst_argb, - int dst_stride_argb, - int width, - int height); - -// Convert J400 (jpeg grey) to ARGB. -LIBYUV_API -int J400ToARGB(const uint8* src_y, - int src_stride_y, - uint8* dst_argb, - int dst_stride_argb, - int width, - int height); - -// Alias. -#define YToARGB I400ToARGB - -// Convert NV12 to ARGB. -LIBYUV_API -int NV12ToARGB(const uint8* src_y, - int src_stride_y, - const uint8* src_uv, - int src_stride_uv, - uint8* dst_argb, - int dst_stride_argb, - int width, - int height); - -// Convert NV21 to ARGB. -LIBYUV_API -int NV21ToARGB(const uint8* src_y, - int src_stride_y, - const uint8* src_vu, - int src_stride_vu, - uint8* dst_argb, - int dst_stride_argb, - int width, - int height); - -// Convert M420 to ARGB. -LIBYUV_API -int M420ToARGB(const uint8* src_m420, - int src_stride_m420, - uint8* dst_argb, - int dst_stride_argb, - int width, - int height); - -// Convert YUY2 to ARGB. -LIBYUV_API -int YUY2ToARGB(const uint8* src_yuy2, - int src_stride_yuy2, - uint8* dst_argb, - int dst_stride_argb, - int width, - int height); - -// Convert UYVY to ARGB. -LIBYUV_API -int UYVYToARGB(const uint8* src_uyvy, - int src_stride_uyvy, - uint8* dst_argb, - int dst_stride_argb, - int width, - int height); - -// Convert J420 to ARGB. -LIBYUV_API -int J420ToARGB(const uint8* src_y, - int src_stride_y, - const uint8* src_u, - int src_stride_u, - const uint8* src_v, - int src_stride_v, - uint8* dst_argb, - int dst_stride_argb, - int width, - int height); - -// Convert J422 to ARGB. -LIBYUV_API -int J422ToARGB(const uint8* src_y, - int src_stride_y, - const uint8* src_u, - int src_stride_u, - const uint8* src_v, - int src_stride_v, - uint8* dst_argb, - int dst_stride_argb, - int width, - int height); - -// Convert J420 to ABGR. -LIBYUV_API -int J420ToABGR(const uint8* src_y, - int src_stride_y, - const uint8* src_u, - int src_stride_u, - const uint8* src_v, - int src_stride_v, - uint8* dst_abgr, - int dst_stride_abgr, - int width, - int height); - -// Convert J422 to ABGR. -LIBYUV_API -int J422ToABGR(const uint8* src_y, - int src_stride_y, - const uint8* src_u, - int src_stride_u, - const uint8* src_v, - int src_stride_v, - uint8* dst_abgr, - int dst_stride_abgr, - int width, - int height); - -// Convert H420 to ARGB. -LIBYUV_API -int H420ToARGB(const uint8* src_y, - int src_stride_y, - const uint8* src_u, - int src_stride_u, - const uint8* src_v, - int src_stride_v, - uint8* dst_argb, - int dst_stride_argb, - int width, - int height); - -// Convert H422 to ARGB. -LIBYUV_API -int H422ToARGB(const uint8* src_y, - int src_stride_y, - const uint8* src_u, - int src_stride_u, - const uint8* src_v, - int src_stride_v, - uint8* dst_argb, - int dst_stride_argb, - int width, - int height); - -// Convert H420 to ABGR. -LIBYUV_API -int H420ToABGR(const uint8* src_y, - int src_stride_y, - const uint8* src_u, - int src_stride_u, - const uint8* src_v, - int src_stride_v, - uint8* dst_abgr, - int dst_stride_abgr, - int width, - int height); - -// Convert H422 to ABGR. -LIBYUV_API -int H422ToABGR(const uint8* src_y, - int src_stride_y, - const uint8* src_u, - int src_stride_u, - const uint8* src_v, - int src_stride_v, - uint8* dst_abgr, - int dst_stride_abgr, - int width, - int height); - -// BGRA little endian (argb in memory) to ARGB. -LIBYUV_API -int BGRAToARGB(const uint8* src_frame, - int src_stride_frame, - uint8* dst_argb, - int dst_stride_argb, - int width, - int height); - -// ABGR little endian (rgba in memory) to ARGB. -LIBYUV_API -int ABGRToARGB(const uint8* src_frame, - int src_stride_frame, - uint8* dst_argb, - int dst_stride_argb, - int width, - int height); - -// RGBA little endian (abgr in memory) to ARGB. -LIBYUV_API -int RGBAToARGB(const uint8* src_frame, - int src_stride_frame, - uint8* dst_argb, - int dst_stride_argb, - int width, - int height); - -// Deprecated function name. -#define BG24ToARGB RGB24ToARGB - -// RGB little endian (bgr in memory) to ARGB. -LIBYUV_API -int RGB24ToARGB(const uint8* src_frame, - int src_stride_frame, - uint8* dst_argb, - int dst_stride_argb, - int width, - int height); - -// RGB big endian (rgb in memory) to ARGB. -LIBYUV_API -int RAWToARGB(const uint8* src_frame, - int src_stride_frame, - uint8* dst_argb, - int dst_stride_argb, - int width, - int height); - -// RGB16 (RGBP fourcc) little endian to ARGB. -LIBYUV_API -int RGB565ToARGB(const uint8* src_frame, - int src_stride_frame, - uint8* dst_argb, - int dst_stride_argb, - int width, - int height); - -// RGB15 (RGBO fourcc) little endian to ARGB. -LIBYUV_API -int ARGB1555ToARGB(const uint8* src_frame, - int src_stride_frame, - uint8* dst_argb, - int dst_stride_argb, - int width, - int height); - -// RGB12 (R444 fourcc) little endian to ARGB. -LIBYUV_API -int ARGB4444ToARGB(const uint8* src_frame, - int src_stride_frame, - uint8* dst_argb, - int dst_stride_argb, - int width, - int height); - -#ifdef HAVE_JPEG -// src_width/height provided by capture -// dst_width/height for clipping determine final size. -LIBYUV_API -int MJPGToARGB(const uint8* sample, - size_t sample_size, - uint8* dst_argb, - int dst_stride_argb, - int src_width, - int src_height, - int dst_width, - int dst_height); -#endif - -// Convert camera sample to ARGB with cropping, rotation and vertical flip. -// "src_size" is needed to parse MJPG. -// "dst_stride_argb" number of bytes in a row of the dst_argb plane. -// Normally this would be the same as dst_width, with recommended alignment -// to 16 bytes for better efficiency. -// If rotation of 90 or 270 is used, stride is affected. The caller should -// allocate the I420 buffer according to rotation. -// "dst_stride_u" number of bytes in a row of the dst_u plane. -// Normally this would be the same as (dst_width + 1) / 2, with -// recommended alignment to 16 bytes for better efficiency. -// If rotation of 90 or 270 is used, stride is affected. -// "crop_x" and "crop_y" are starting position for cropping. -// To center, crop_x = (src_width - dst_width) / 2 -// crop_y = (src_height - dst_height) / 2 -// "src_width" / "src_height" is size of src_frame in pixels. -// "src_height" can be negative indicating a vertically flipped image source. -// "crop_width" / "crop_height" is the size to crop the src to. -// Must be less than or equal to src_width/src_height -// Cropping parameters are pre-rotation. -// "rotation" can be 0, 90, 180 or 270. -// "format" is a fourcc. ie 'I420', 'YUY2' -// Returns 0 for successful; -1 for invalid parameter. Non-zero for failure. -LIBYUV_API -int ConvertToARGB(const uint8* src_frame, - size_t src_size, - uint8* dst_argb, - int dst_stride_argb, - int crop_x, - int crop_y, - int src_width, - int src_height, - int crop_width, - int crop_height, - enum RotationMode rotation, - uint32 format); - -#ifdef __cplusplus -} // extern "C" -} // namespace libyuv -#endif - -#endif // INCLUDE_LIBYUV_CONVERT_ARGB_H_ diff --git a/WebRtc.NET/include/third_party/libyuv/include/libyuv/convert_from.h b/WebRtc.NET/include/third_party/libyuv/include/libyuv/convert_from.h deleted file mode 100644 index 7ddebd4f..00000000 --- a/WebRtc.NET/include/third_party/libyuv/include/libyuv/convert_from.h +++ /dev/null @@ -1,265 +0,0 @@ -/* - * Copyright 2011 The LibYuv Project Authors. All rights reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef INCLUDE_LIBYUV_CONVERT_FROM_H_ -#define INCLUDE_LIBYUV_CONVERT_FROM_H_ - -#include "libyuv/basic_types.h" -#include "libyuv/rotate.h" - -#ifdef __cplusplus -namespace libyuv { -extern "C" { -#endif - -// See Also convert.h for conversions from formats to I420. - -// I420Copy in convert to I420ToI420. - -LIBYUV_API -int I420ToI422(const uint8* src_y, - int src_stride_y, - const uint8* src_u, - int src_stride_u, - const uint8* src_v, - int src_stride_v, - uint8* dst_y, - int dst_stride_y, - uint8* dst_u, - int dst_stride_u, - uint8* dst_v, - int dst_stride_v, - int width, - int height); - -LIBYUV_API -int I420ToI444(const uint8* src_y, - int src_stride_y, - const uint8* src_u, - int src_stride_u, - const uint8* src_v, - int src_stride_v, - uint8* dst_y, - int dst_stride_y, - uint8* dst_u, - int dst_stride_u, - uint8* dst_v, - int dst_stride_v, - int width, - int height); - -// Copy to I400. Source can be I420, I422, I444, I400, NV12 or NV21. -LIBYUV_API -int I400Copy(const uint8* src_y, - int src_stride_y, - uint8* dst_y, - int dst_stride_y, - int width, - int height); - -LIBYUV_API -int I420ToNV12(const uint8* src_y, - int src_stride_y, - const uint8* src_u, - int src_stride_u, - const uint8* src_v, - int src_stride_v, - uint8* dst_y, - int dst_stride_y, - uint8* dst_uv, - int dst_stride_uv, - int width, - int height); - -LIBYUV_API -int I420ToNV21(const uint8* src_y, - int src_stride_y, - const uint8* src_u, - int src_stride_u, - const uint8* src_v, - int src_stride_v, - uint8* dst_y, - int dst_stride_y, - uint8* dst_vu, - int dst_stride_vu, - int width, - int height); - -LIBYUV_API -int I420ToYUY2(const uint8* src_y, - int src_stride_y, - const uint8* src_u, - int src_stride_u, - const uint8* src_v, - int src_stride_v, - uint8* dst_frame, - int dst_stride_frame, - int width, - int height); - -LIBYUV_API -int I420ToUYVY(const uint8* src_y, - int src_stride_y, - const uint8* src_u, - int src_stride_u, - const uint8* src_v, - int src_stride_v, - uint8* dst_frame, - int dst_stride_frame, - int width, - int height); - -LIBYUV_API -int I420ToARGB(const uint8* src_y, - int src_stride_y, - const uint8* src_u, - int src_stride_u, - const uint8* src_v, - int src_stride_v, - uint8* dst_argb, - int dst_stride_argb, - int width, - int height); - -LIBYUV_API -int I420ToBGRA(const uint8* src_y, - int src_stride_y, - const uint8* src_u, - int src_stride_u, - const uint8* src_v, - int src_stride_v, - uint8* dst_argb, - int dst_stride_argb, - int width, - int height); - -LIBYUV_API -int I420ToABGR(const uint8* src_y, - int src_stride_y, - const uint8* src_u, - int src_stride_u, - const uint8* src_v, - int src_stride_v, - uint8* dst_argb, - int dst_stride_argb, - int width, - int height); - -LIBYUV_API -int I420ToRGBA(const uint8* src_y, - int src_stride_y, - const uint8* src_u, - int src_stride_u, - const uint8* src_v, - int src_stride_v, - uint8* dst_rgba, - int dst_stride_rgba, - int width, - int height); - -LIBYUV_API -int I420ToRGB24(const uint8* src_y, - int src_stride_y, - const uint8* src_u, - int src_stride_u, - const uint8* src_v, - int src_stride_v, - uint8* dst_frame, - int dst_stride_frame, - int width, - int height); - -LIBYUV_API -int I420ToRAW(const uint8* src_y, - int src_stride_y, - const uint8* src_u, - int src_stride_u, - const uint8* src_v, - int src_stride_v, - uint8* dst_frame, - int dst_stride_frame, - int width, - int height); - -LIBYUV_API -int I420ToRGB565(const uint8* src_y, - int src_stride_y, - const uint8* src_u, - int src_stride_u, - const uint8* src_v, - int src_stride_v, - uint8* dst_frame, - int dst_stride_frame, - int width, - int height); - -// Convert I420 To RGB565 with 4x4 dither matrix (16 bytes). -// Values in dither matrix from 0 to 7 recommended. -// The order of the dither matrix is first byte is upper left. - -LIBYUV_API -int I420ToRGB565Dither(const uint8* src_y, - int src_stride_y, - const uint8* src_u, - int src_stride_u, - const uint8* src_v, - int src_stride_v, - uint8* dst_frame, - int dst_stride_frame, - const uint8* dither4x4, - int width, - int height); - -LIBYUV_API -int I420ToARGB1555(const uint8* src_y, - int src_stride_y, - const uint8* src_u, - int src_stride_u, - const uint8* src_v, - int src_stride_v, - uint8* dst_frame, - int dst_stride_frame, - int width, - int height); - -LIBYUV_API -int I420ToARGB4444(const uint8* src_y, - int src_stride_y, - const uint8* src_u, - int src_stride_u, - const uint8* src_v, - int src_stride_v, - uint8* dst_frame, - int dst_stride_frame, - int width, - int height); - -// Convert I420 to specified format. -// "dst_sample_stride" is bytes in a row for the destination. Pass 0 if the -// buffer has contiguous rows. Can be negative. A multiple of 16 is optimal. -LIBYUV_API -int ConvertFromI420(const uint8* y, - int y_stride, - const uint8* u, - int u_stride, - const uint8* v, - int v_stride, - uint8* dst_sample, - int dst_sample_stride, - int width, - int height, - uint32 format); - -#ifdef __cplusplus -} // extern "C" -} // namespace libyuv -#endif - -#endif // INCLUDE_LIBYUV_CONVERT_FROM_H_ diff --git a/WebRtc.NET/include/third_party/libyuv/include/libyuv/convert_from_argb.h b/WebRtc.NET/include/third_party/libyuv/include/libyuv/convert_from_argb.h deleted file mode 100644 index 50722d76..00000000 --- a/WebRtc.NET/include/third_party/libyuv/include/libyuv/convert_from_argb.h +++ /dev/null @@ -1,265 +0,0 @@ -/* - * Copyright 2012 The LibYuv Project Authors. All rights reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef INCLUDE_LIBYUV_CONVERT_FROM_ARGB_H_ -#define INCLUDE_LIBYUV_CONVERT_FROM_ARGB_H_ - -#include "libyuv/basic_types.h" - -#ifdef __cplusplus -namespace libyuv { -extern "C" { -#endif - -// Copy ARGB to ARGB. -#define ARGBToARGB ARGBCopy -LIBYUV_API -int ARGBCopy(const uint8* src_argb, - int src_stride_argb, - uint8* dst_argb, - int dst_stride_argb, - int width, - int height); - -// Convert ARGB To BGRA. -LIBYUV_API -int ARGBToBGRA(const uint8* src_argb, - int src_stride_argb, - uint8* dst_bgra, - int dst_stride_bgra, - int width, - int height); - -// Convert ARGB To ABGR. -LIBYUV_API -int ARGBToABGR(const uint8* src_argb, - int src_stride_argb, - uint8* dst_abgr, - int dst_stride_abgr, - int width, - int height); - -// Convert ARGB To RGBA. -LIBYUV_API -int ARGBToRGBA(const uint8* src_argb, - int src_stride_argb, - uint8* dst_rgba, - int dst_stride_rgba, - int width, - int height); - -// Convert ARGB To RGB24. -LIBYUV_API -int ARGBToRGB24(const uint8* src_argb, - int src_stride_argb, - uint8* dst_rgb24, - int dst_stride_rgb24, - int width, - int height); - -// Convert ARGB To RAW. -LIBYUV_API -int ARGBToRAW(const uint8* src_argb, - int src_stride_argb, - uint8* dst_rgb, - int dst_stride_rgb, - int width, - int height); - -// Convert ARGB To RGB565. -LIBYUV_API -int ARGBToRGB565(const uint8* src_argb, - int src_stride_argb, - uint8* dst_rgb565, - int dst_stride_rgb565, - int width, - int height); - -// Convert ARGB To RGB565 with 4x4 dither matrix (16 bytes). -// Values in dither matrix from 0 to 7 recommended. -// The order of the dither matrix is first byte is upper left. -// TODO(fbarchard): Consider pointer to 2d array for dither4x4. -// const uint8(*dither)[4][4]; -LIBYUV_API -int ARGBToRGB565Dither(const uint8* src_argb, - int src_stride_argb, - uint8* dst_rgb565, - int dst_stride_rgb565, - const uint8* dither4x4, - int width, - int height); - -// Convert ARGB To ARGB1555. -LIBYUV_API -int ARGBToARGB1555(const uint8* src_argb, - int src_stride_argb, - uint8* dst_argb1555, - int dst_stride_argb1555, - int width, - int height); - -// Convert ARGB To ARGB4444. -LIBYUV_API -int ARGBToARGB4444(const uint8* src_argb, - int src_stride_argb, - uint8* dst_argb4444, - int dst_stride_argb4444, - int width, - int height); - -// Convert ARGB To I444. -LIBYUV_API -int ARGBToI444(const uint8* src_argb, - int src_stride_argb, - uint8* dst_y, - int dst_stride_y, - uint8* dst_u, - int dst_stride_u, - uint8* dst_v, - int dst_stride_v, - int width, - int height); - -// Convert ARGB To I422. -LIBYUV_API -int ARGBToI422(const uint8* src_argb, - int src_stride_argb, - uint8* dst_y, - int dst_stride_y, - uint8* dst_u, - int dst_stride_u, - uint8* dst_v, - int dst_stride_v, - int width, - int height); - -// Convert ARGB To I420. (also in convert.h) -LIBYUV_API -int ARGBToI420(const uint8* src_argb, - int src_stride_argb, - uint8* dst_y, - int dst_stride_y, - uint8* dst_u, - int dst_stride_u, - uint8* dst_v, - int dst_stride_v, - int width, - int height); - -// Convert ARGB to J420. (JPeg full range I420). -LIBYUV_API -int ARGBToJ420(const uint8* src_argb, - int src_stride_argb, - uint8* dst_yj, - int dst_stride_yj, - uint8* dst_u, - int dst_stride_u, - uint8* dst_v, - int dst_stride_v, - int width, - int height); - -// Convert ARGB to J422. -LIBYUV_API -int ARGBToJ422(const uint8* src_argb, - int src_stride_argb, - uint8* dst_yj, - int dst_stride_yj, - uint8* dst_u, - int dst_stride_u, - uint8* dst_v, - int dst_stride_v, - int width, - int height); - -// Convert ARGB to J400. (JPeg full range). -LIBYUV_API -int ARGBToJ400(const uint8* src_argb, - int src_stride_argb, - uint8* dst_yj, - int dst_stride_yj, - int width, - int height); - -// Convert ARGB to I400. -LIBYUV_API -int ARGBToI400(const uint8* src_argb, - int src_stride_argb, - uint8* dst_y, - int dst_stride_y, - int width, - int height); - -// Convert ARGB to G. (Reverse of J400toARGB, which replicates G back to ARGB) -LIBYUV_API -int ARGBToG(const uint8* src_argb, - int src_stride_argb, - uint8* dst_g, - int dst_stride_g, - int width, - int height); - -// Convert ARGB To NV12. -LIBYUV_API -int ARGBToNV12(const uint8* src_argb, - int src_stride_argb, - uint8* dst_y, - int dst_stride_y, - uint8* dst_uv, - int dst_stride_uv, - int width, - int height); - -// Convert ARGB To NV21. -LIBYUV_API -int ARGBToNV21(const uint8* src_argb, - int src_stride_argb, - uint8* dst_y, - int dst_stride_y, - uint8* dst_vu, - int dst_stride_vu, - int width, - int height); - -// Convert ARGB To NV21. -LIBYUV_API -int ARGBToNV21(const uint8* src_argb, - int src_stride_argb, - uint8* dst_y, - int dst_stride_y, - uint8* dst_vu, - int dst_stride_vu, - int width, - int height); - -// Convert ARGB To YUY2. -LIBYUV_API -int ARGBToYUY2(const uint8* src_argb, - int src_stride_argb, - uint8* dst_yuy2, - int dst_stride_yuy2, - int width, - int height); - -// Convert ARGB To UYVY. -LIBYUV_API -int ARGBToUYVY(const uint8* src_argb, - int src_stride_argb, - uint8* dst_uyvy, - int dst_stride_uyvy, - int width, - int height); - -#ifdef __cplusplus -} // extern "C" -} // namespace libyuv -#endif - -#endif // INCLUDE_LIBYUV_CONVERT_FROM_ARGB_H_ diff --git a/WebRtc.NET/include/third_party/libyuv/include/libyuv/cpu_id.h b/WebRtc.NET/include/third_party/libyuv/include/libyuv/cpu_id.h deleted file mode 100644 index bcddb32e..00000000 --- a/WebRtc.NET/include/third_party/libyuv/include/libyuv/cpu_id.h +++ /dev/null @@ -1,83 +0,0 @@ -/* - * Copyright 2011 The LibYuv Project Authors. All rights reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef INCLUDE_LIBYUV_CPU_ID_H_ -#define INCLUDE_LIBYUV_CPU_ID_H_ - -#include "libyuv/basic_types.h" - -#ifdef __cplusplus -namespace libyuv { -extern "C" { -#endif - -// Internal flag to indicate cpuid requires initialization. -static const int kCpuInitialized = 0x1; - -// These flags are only valid on ARM processors. -static const int kCpuHasARM = 0x2; -static const int kCpuHasNEON = 0x4; -// 0x8 reserved for future ARM flag. - -// These flags are only valid on x86 processors. -static const int kCpuHasX86 = 0x10; -static const int kCpuHasSSE2 = 0x20; -static const int kCpuHasSSSE3 = 0x40; -static const int kCpuHasSSE41 = 0x80; -static const int kCpuHasSSE42 = 0x100; // unused at this time. -static const int kCpuHasAVX = 0x200; -static const int kCpuHasAVX2 = 0x400; -static const int kCpuHasERMS = 0x800; -static const int kCpuHasFMA3 = 0x1000; -static const int kCpuHasAVX3 = 0x2000; -static const int kCpuHasF16C = 0x4000; - -// 0x8000 reserved for future X86 flags. - -// These flags are only valid on MIPS processors. -static const int kCpuHasMIPS = 0x10000; -static const int kCpuHasDSPR2 = 0x20000; -static const int kCpuHasMSA = 0x40000; - -// Internal function used to auto-init. -LIBYUV_API -int InitCpuFlags(void); - -// Internal function for parsing /proc/cpuinfo. -LIBYUV_API -int ArmCpuCaps(const char* cpuinfo_name); - -// Detect CPU has SSE2 etc. -// Test_flag parameter should be one of kCpuHas constants above. -// returns non-zero if instruction set is detected -static __inline int TestCpuFlag(int test_flag) { - LIBYUV_API extern int cpu_info_; - return (!cpu_info_ ? InitCpuFlags() : cpu_info_) & test_flag; -} - -// For testing, allow CPU flags to be disabled. -// ie MaskCpuFlags(~kCpuHasSSSE3) to disable SSSE3. -// MaskCpuFlags(-1) to enable all cpu specific optimizations. -// MaskCpuFlags(1) to disable all cpu specific optimizations. -LIBYUV_API -void MaskCpuFlags(int enable_flags); - -// Low level cpuid for X86. Returns zeros on other CPUs. -// eax is the info type that you want. -// ecx is typically the cpu number, and should normally be zero. -LIBYUV_API -void CpuId(uint32 eax, uint32 ecx, uint32* cpu_info); - -#ifdef __cplusplus -} // extern "C" -} // namespace libyuv -#endif - -#endif // INCLUDE_LIBYUV_CPU_ID_H_ diff --git a/WebRtc.NET/include/third_party/libyuv/include/libyuv/macros_msa.h b/WebRtc.NET/include/third_party/libyuv/include/libyuv/macros_msa.h deleted file mode 100644 index 9be804e1..00000000 --- a/WebRtc.NET/include/third_party/libyuv/include/libyuv/macros_msa.h +++ /dev/null @@ -1,169 +0,0 @@ -/* - * Copyright 2016 The LibYuv Project Authors. All rights reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef INCLUDE_LIBYUV_MACROS_MSA_H_ -#define INCLUDE_LIBYUV_MACROS_MSA_H_ - -#if !defined(LIBYUV_DISABLE_MSA) && defined(__mips_msa) -#include -#include - -#if (__mips_isa_rev >= 6) -#define LW(psrc) \ - ({ \ - uint8* psrc_lw_m = (uint8*)(psrc); /* NOLINT */ \ - uint32 val_m; \ - asm volatile("lw %[val_m], %[psrc_lw_m] \n\t" \ - : [val_m] "=r"(val_m) \ - : [psrc_lw_m] "m"(*psrc_lw_m)); \ - val_m; \ - }) - -#if (__mips == 64) -#define LD(psrc) \ - ({ \ - uint8* psrc_ld_m = (uint8*)(psrc); /* NOLINT */ \ - uint64 val_m = 0; \ - asm volatile("ld %[val_m], %[psrc_ld_m] \n\t" \ - : [val_m] "=r"(val_m) \ - : [psrc_ld_m] "m"(*psrc_ld_m)); \ - val_m; \ - }) -#else // !(__mips == 64) -#define LD(psrc) \ - ({ \ - uint8* psrc_ld_m = (uint8*)(psrc); /* NOLINT */ \ - uint32 val0_m, val1_m; \ - uint64 val_m = 0; \ - val0_m = LW(psrc_ld_m); \ - val1_m = LW(psrc_ld_m + 4); \ - val_m = (uint64)(val1_m); /* NOLINT */ \ - val_m = (uint64)((val_m << 32) & 0xFFFFFFFF00000000); /* NOLINT */ \ - val_m = (uint64)(val_m | (uint64)val0_m); /* NOLINT */ \ - val_m; \ - }) -#endif // (__mips == 64) -#else // !(__mips_isa_rev >= 6) -#define LW(psrc) \ - ({ \ - uint8* psrc_lw_m = (uint8*)(psrc); /* NOLINT */ \ - uint32 val_m; \ - asm volatile("ulw %[val_m], %[psrc_lw_m] \n\t" \ - : [val_m] "=r"(val_m) \ - : [psrc_lw_m] "m"(*psrc_lw_m)); \ - val_m; \ - }) - -#if (__mips == 64) -#define LD(psrc) \ - ({ \ - uint8* psrc_ld_m = (uint8*)(psrc); /* NOLINT */ \ - uint64 val_m = 0; \ - asm volatile("uld %[val_m], %[psrc_ld_m] \n\t" \ - : [val_m] "=r"(val_m) \ - : [psrc_ld_m] "m"(*psrc_ld_m)); \ - val_m; \ - }) -#else // !(__mips == 64) -#define LD(psrc) \ - ({ \ - uint8* psrc_ld_m = (uint8*)(psrc); /* NOLINT */ \ - uint32 val0_m, val1_m; \ - uint64 val_m = 0; \ - val0_m = LW(psrc_ld_m); \ - val1_m = LW(psrc_ld_m + 4); \ - val_m = (uint64)(val1_m); /* NOLINT */ \ - val_m = (uint64)((val_m << 32) & 0xFFFFFFFF00000000); /* NOLINT */ \ - val_m = (uint64)(val_m | (uint64)val0_m); /* NOLINT */ \ - val_m; \ - }) -#endif // (__mips == 64) -#endif // (__mips_isa_rev >= 6) - -// TODO(fbarchard): Consider removing __VAR_ARGS versions. -#define LD_B(RTYPE, psrc) *((RTYPE*)(psrc)) /* NOLINT */ -#define LD_UB(...) LD_B(v16u8, __VA_ARGS__) - -#define ST_B(RTYPE, in, pdst) *((RTYPE*)(pdst)) = (in) /* NOLINT */ -#define ST_UB(...) ST_B(v16u8, __VA_ARGS__) - -/* Description : Load two vectors with 16 'byte' sized elements - Arguments : Inputs - psrc, stride - Outputs - out0, out1 - Return Type - as per RTYPE - Details : Load 16 byte elements in 'out0' from (psrc) - Load 16 byte elements in 'out1' from (psrc + stride) -*/ -#define LD_B2(RTYPE, psrc, stride, out0, out1) \ - { \ - out0 = LD_B(RTYPE, (psrc)); \ - out1 = LD_B(RTYPE, (psrc) + stride); \ - } -#define LD_UB2(...) LD_B2(v16u8, __VA_ARGS__) - -#define LD_B4(RTYPE, psrc, stride, out0, out1, out2, out3) \ - { \ - LD_B2(RTYPE, (psrc), stride, out0, out1); \ - LD_B2(RTYPE, (psrc) + 2 * stride, stride, out2, out3); \ - } -#define LD_UB4(...) LD_B4(v16u8, __VA_ARGS__) - -/* Description : Store two vectors with stride each having 16 'byte' sized - elements - Arguments : Inputs - in0, in1, pdst, stride - Details : Store 16 byte elements from 'in0' to (pdst) - Store 16 byte elements from 'in1' to (pdst + stride) -*/ -#define ST_B2(RTYPE, in0, in1, pdst, stride) \ - { \ - ST_B(RTYPE, in0, (pdst)); \ - ST_B(RTYPE, in1, (pdst) + stride); \ - } -#define ST_UB2(...) ST_B2(v16u8, __VA_ARGS__) - -#define ST_B4(RTYPE, in0, in1, in2, in3, pdst, stride) \ - { \ - ST_B2(RTYPE, in0, in1, (pdst), stride); \ - ST_B2(RTYPE, in2, in3, (pdst) + 2 * stride, stride); \ - } -#define ST_UB4(...) ST_B4(v16u8, __VA_ARGS__) - -// TODO(fbarchard): Consider using __msa_vshf_b and __msa_ilvr_b directly. -/* Description : Shuffle byte vector elements as per mask vector - Arguments : Inputs - in0, in1, in2, in3, mask0, mask1 - Outputs - out0, out1 - Return Type - as per RTYPE - Details : Byte elements from 'in0' & 'in1' are copied selectively to - 'out0' as per control vector 'mask0' -*/ -#define VSHF_B2(RTYPE, in0, in1, in2, in3, mask0, mask1, out0, out1) \ - { \ - out0 = (RTYPE)__msa_vshf_b((v16i8)mask0, (v16i8)in1, (v16i8)in0); \ - out1 = (RTYPE)__msa_vshf_b((v16i8)mask1, (v16i8)in3, (v16i8)in2); \ - } -#define VSHF_B2_UB(...) VSHF_B2(v16u8, __VA_ARGS__) - -/* Description : Interleave both left and right half of input vectors - Arguments : Inputs - in0, in1 - Outputs - out0, out1 - Return Type - as per RTYPE - Details : Right half of byte elements from 'in0' and 'in1' are - interleaved and written to 'out0' -*/ -#define ILVRL_B2(RTYPE, in0, in1, out0, out1) \ - { \ - out0 = (RTYPE)__msa_ilvr_b((v16i8)in0, (v16i8)in1); \ - out1 = (RTYPE)__msa_ilvl_b((v16i8)in0, (v16i8)in1); \ - } -#define ILVRL_B2_UB(...) ILVRL_B2(v16u8, __VA_ARGS__) - -#endif /* !defined(LIBYUV_DISABLE_MSA) && defined(__mips_msa) */ - -#endif // INCLUDE_LIBYUV_MACROS_MSA_H_ diff --git a/WebRtc.NET/include/third_party/libyuv/include/libyuv/mjpeg_decoder.h b/WebRtc.NET/include/third_party/libyuv/include/libyuv/mjpeg_decoder.h deleted file mode 100644 index 8a4f2822..00000000 --- a/WebRtc.NET/include/third_party/libyuv/include/libyuv/mjpeg_decoder.h +++ /dev/null @@ -1,195 +0,0 @@ -/* - * Copyright 2012 The LibYuv Project Authors. All rights reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef INCLUDE_LIBYUV_MJPEG_DECODER_H_ -#define INCLUDE_LIBYUV_MJPEG_DECODER_H_ - -#include "libyuv/basic_types.h" - -#ifdef __cplusplus -// NOTE: For a simplified public API use convert.h MJPGToI420(). - -struct jpeg_common_struct; -struct jpeg_decompress_struct; -struct jpeg_source_mgr; - -namespace libyuv { - -#ifdef __cplusplus -extern "C" { -#endif - -LIBYUV_BOOL ValidateJpeg(const uint8* sample, size_t sample_size); - -#ifdef __cplusplus -} // extern "C" -#endif - -static const uint32 kUnknownDataSize = 0xFFFFFFFF; - -enum JpegSubsamplingType { - kJpegYuv420, - kJpegYuv422, - kJpegYuv444, - kJpegYuv400, - kJpegUnknown -}; - -struct Buffer { - const uint8* data; - int len; -}; - -struct BufferVector { - Buffer* buffers; - int len; - int pos; -}; - -struct SetJmpErrorMgr; - -// MJPEG ("Motion JPEG") is a pseudo-standard video codec where the frames are -// simply independent JPEG images with a fixed huffman table (which is omitted). -// It is rarely used in video transmission, but is common as a camera capture -// format, especially in Logitech devices. This class implements a decoder for -// MJPEG frames. -// -// See http://tools.ietf.org/html/rfc2435 -class LIBYUV_API MJpegDecoder { - public: - typedef void (*CallbackFunction)(void* opaque, - const uint8* const* data, - const int* strides, - int rows); - - static const int kColorSpaceUnknown; - static const int kColorSpaceGrayscale; - static const int kColorSpaceRgb; - static const int kColorSpaceYCbCr; - static const int kColorSpaceCMYK; - static const int kColorSpaceYCCK; - - MJpegDecoder(); - ~MJpegDecoder(); - - // Loads a new frame, reads its headers, and determines the uncompressed - // image format. - // Returns LIBYUV_TRUE if image looks valid and format is supported. - // If return value is LIBYUV_TRUE, then the values for all the following - // getters are populated. - // src_len is the size of the compressed mjpeg frame in bytes. - LIBYUV_BOOL LoadFrame(const uint8* src, size_t src_len); - - // Returns width of the last loaded frame in pixels. - int GetWidth(); - - // Returns height of the last loaded frame in pixels. - int GetHeight(); - - // Returns format of the last loaded frame. The return value is one of the - // kColorSpace* constants. - int GetColorSpace(); - - // Number of color components in the color space. - int GetNumComponents(); - - // Sample factors of the n-th component. - int GetHorizSampFactor(int component); - - int GetVertSampFactor(int component); - - int GetHorizSubSampFactor(int component); - - int GetVertSubSampFactor(int component); - - // Public for testability. - int GetImageScanlinesPerImcuRow(); - - // Public for testability. - int GetComponentScanlinesPerImcuRow(int component); - - // Width of a component in bytes. - int GetComponentWidth(int component); - - // Height of a component. - int GetComponentHeight(int component); - - // Width of a component in bytes with padding for DCTSIZE. Public for testing. - int GetComponentStride(int component); - - // Size of a component in bytes. - int GetComponentSize(int component); - - // Call this after LoadFrame() if you decide you don't want to decode it - // after all. - LIBYUV_BOOL UnloadFrame(); - - // Decodes the entire image into a one-buffer-per-color-component format. - // dst_width must match exactly. dst_height must be <= to image height; if - // less, the image is cropped. "planes" must have size equal to at least - // GetNumComponents() and they must point to non-overlapping buffers of size - // at least GetComponentSize(i). The pointers in planes are incremented - // to point to after the end of the written data. - // TODO(fbarchard): Add dst_x, dst_y to allow specific rect to be decoded. - LIBYUV_BOOL DecodeToBuffers(uint8** planes, int dst_width, int dst_height); - - // Decodes the entire image and passes the data via repeated calls to a - // callback function. Each call will get the data for a whole number of - // image scanlines. - // TODO(fbarchard): Add dst_x, dst_y to allow specific rect to be decoded. - LIBYUV_BOOL DecodeToCallback(CallbackFunction fn, - void* opaque, - int dst_width, - int dst_height); - - // The helper function which recognizes the jpeg sub-sampling type. - static JpegSubsamplingType JpegSubsamplingTypeHelper( - int* subsample_x, - int* subsample_y, - int number_of_components); - - private: - void AllocOutputBuffers(int num_outbufs); - void DestroyOutputBuffers(); - - LIBYUV_BOOL StartDecode(); - LIBYUV_BOOL FinishDecode(); - - void SetScanlinePointers(uint8** data); - LIBYUV_BOOL DecodeImcuRow(); - - int GetComponentScanlinePadding(int component); - - // A buffer holding the input data for a frame. - Buffer buf_; - BufferVector buf_vec_; - - jpeg_decompress_struct* decompress_struct_; - jpeg_source_mgr* source_mgr_; - SetJmpErrorMgr* error_mgr_; - - // LIBYUV_TRUE iff at least one component has scanline padding. (i.e., - // GetComponentScanlinePadding() != 0.) - LIBYUV_BOOL has_scanline_padding_; - - // Temporaries used to point to scanline outputs. - int num_outbufs_; // Outermost size of all arrays below. - uint8*** scanlines_; - int* scanlines_sizes_; - // Temporary buffer used for decoding when we can't decode directly to the - // output buffers. Large enough for just one iMCU row. - uint8** databuf_; - int* databuf_strides_; -}; - -} // namespace libyuv - -#endif // __cplusplus -#endif // INCLUDE_LIBYUV_MJPEG_DECODER_H_ diff --git a/WebRtc.NET/include/third_party/libyuv/include/libyuv/planar_functions.h b/WebRtc.NET/include/third_party/libyuv/include/libyuv/planar_functions.h deleted file mode 100644 index 040839c2..00000000 --- a/WebRtc.NET/include/third_party/libyuv/include/libyuv/planar_functions.h +++ /dev/null @@ -1,796 +0,0 @@ -/* - * Copyright 2011 The LibYuv Project Authors. All rights reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef INCLUDE_LIBYUV_PLANAR_FUNCTIONS_H_ -#define INCLUDE_LIBYUV_PLANAR_FUNCTIONS_H_ - -#include "libyuv/basic_types.h" - -// TODO(fbarchard): Remove the following headers includes. -#include "libyuv/convert.h" -#include "libyuv/convert_argb.h" - -#ifdef __cplusplus -namespace libyuv { -extern "C" { -#endif - -// Copy a plane of data. -LIBYUV_API -void CopyPlane(const uint8* src_y, - int src_stride_y, - uint8* dst_y, - int dst_stride_y, - int width, - int height); - -LIBYUV_API -void CopyPlane_16(const uint16* src_y, - int src_stride_y, - uint16* dst_y, - int dst_stride_y, - int width, - int height); - -// Set a plane of data to a 32 bit value. -LIBYUV_API -void SetPlane(uint8* dst_y, - int dst_stride_y, - int width, - int height, - uint32 value); - -// Split interleaved UV plane into separate U and V planes. -LIBYUV_API -void SplitUVPlane(const uint8* src_uv, - int src_stride_uv, - uint8* dst_u, - int dst_stride_u, - uint8* dst_v, - int dst_stride_v, - int width, - int height); - -// Merge separate U and V planes into one interleaved UV plane. -LIBYUV_API -void MergeUVPlane(const uint8* src_u, - int src_stride_u, - const uint8* src_v, - int src_stride_v, - uint8* dst_uv, - int dst_stride_uv, - int width, - int height); - -// Copy I400. Supports inverting. -LIBYUV_API -int I400ToI400(const uint8* src_y, - int src_stride_y, - uint8* dst_y, - int dst_stride_y, - int width, - int height); - -#define J400ToJ400 I400ToI400 - -// Copy I422 to I422. -#define I422ToI422 I422Copy -LIBYUV_API -int I422Copy(const uint8* src_y, - int src_stride_y, - const uint8* src_u, - int src_stride_u, - const uint8* src_v, - int src_stride_v, - uint8* dst_y, - int dst_stride_y, - uint8* dst_u, - int dst_stride_u, - uint8* dst_v, - int dst_stride_v, - int width, - int height); - -// Copy I444 to I444. -#define I444ToI444 I444Copy -LIBYUV_API -int I444Copy(const uint8* src_y, - int src_stride_y, - const uint8* src_u, - int src_stride_u, - const uint8* src_v, - int src_stride_v, - uint8* dst_y, - int dst_stride_y, - uint8* dst_u, - int dst_stride_u, - uint8* dst_v, - int dst_stride_v, - int width, - int height); - -// Convert YUY2 to I422. -LIBYUV_API -int YUY2ToI422(const uint8* src_yuy2, - int src_stride_yuy2, - uint8* dst_y, - int dst_stride_y, - uint8* dst_u, - int dst_stride_u, - uint8* dst_v, - int dst_stride_v, - int width, - int height); - -// Convert UYVY to I422. -LIBYUV_API -int UYVYToI422(const uint8* src_uyvy, - int src_stride_uyvy, - uint8* dst_y, - int dst_stride_y, - uint8* dst_u, - int dst_stride_u, - uint8* dst_v, - int dst_stride_v, - int width, - int height); - -LIBYUV_API -int YUY2ToNV12(const uint8* src_yuy2, - int src_stride_yuy2, - uint8* dst_y, - int dst_stride_y, - uint8* dst_uv, - int dst_stride_uv, - int width, - int height); - -LIBYUV_API -int UYVYToNV12(const uint8* src_uyvy, - int src_stride_uyvy, - uint8* dst_y, - int dst_stride_y, - uint8* dst_uv, - int dst_stride_uv, - int width, - int height); - -LIBYUV_API -int YUY2ToY(const uint8* src_yuy2, - int src_stride_yuy2, - uint8* dst_y, - int dst_stride_y, - int width, - int height); - -// Convert I420 to I400. (calls CopyPlane ignoring u/v). -LIBYUV_API -int I420ToI400(const uint8* src_y, - int src_stride_y, - const uint8* src_u, - int src_stride_u, - const uint8* src_v, - int src_stride_v, - uint8* dst_y, - int dst_stride_y, - int width, - int height); - -// Alias -#define J420ToJ400 I420ToI400 -#define I420ToI420Mirror I420Mirror - -// I420 mirror. -LIBYUV_API -int I420Mirror(const uint8* src_y, - int src_stride_y, - const uint8* src_u, - int src_stride_u, - const uint8* src_v, - int src_stride_v, - uint8* dst_y, - int dst_stride_y, - uint8* dst_u, - int dst_stride_u, - uint8* dst_v, - int dst_stride_v, - int width, - int height); - -// Alias -#define I400ToI400Mirror I400Mirror - -// I400 mirror. A single plane is mirrored horizontally. -// Pass negative height to achieve 180 degree rotation. -LIBYUV_API -int I400Mirror(const uint8* src_y, - int src_stride_y, - uint8* dst_y, - int dst_stride_y, - int width, - int height); - -// Alias -#define ARGBToARGBMirror ARGBMirror - -// ARGB mirror. -LIBYUV_API -int ARGBMirror(const uint8* src_argb, - int src_stride_argb, - uint8* dst_argb, - int dst_stride_argb, - int width, - int height); - -// Convert NV12 to RGB565. -LIBYUV_API -int NV12ToRGB565(const uint8* src_y, - int src_stride_y, - const uint8* src_uv, - int src_stride_uv, - uint8* dst_rgb565, - int dst_stride_rgb565, - int width, - int height); - -// I422ToARGB is in convert_argb.h -// Convert I422 to BGRA. -LIBYUV_API -int I422ToBGRA(const uint8* src_y, - int src_stride_y, - const uint8* src_u, - int src_stride_u, - const uint8* src_v, - int src_stride_v, - uint8* dst_bgra, - int dst_stride_bgra, - int width, - int height); - -// Convert I422 to ABGR. -LIBYUV_API -int I422ToABGR(const uint8* src_y, - int src_stride_y, - const uint8* src_u, - int src_stride_u, - const uint8* src_v, - int src_stride_v, - uint8* dst_abgr, - int dst_stride_abgr, - int width, - int height); - -// Convert I422 to RGBA. -LIBYUV_API -int I422ToRGBA(const uint8* src_y, - int src_stride_y, - const uint8* src_u, - int src_stride_u, - const uint8* src_v, - int src_stride_v, - uint8* dst_rgba, - int dst_stride_rgba, - int width, - int height); - -// Alias -#define RGB24ToRAW RAWToRGB24 - -LIBYUV_API -int RAWToRGB24(const uint8* src_raw, - int src_stride_raw, - uint8* dst_rgb24, - int dst_stride_rgb24, - int width, - int height); - -// Draw a rectangle into I420. -LIBYUV_API -int I420Rect(uint8* dst_y, - int dst_stride_y, - uint8* dst_u, - int dst_stride_u, - uint8* dst_v, - int dst_stride_v, - int x, - int y, - int width, - int height, - int value_y, - int value_u, - int value_v); - -// Draw a rectangle into ARGB. -LIBYUV_API -int ARGBRect(uint8* dst_argb, - int dst_stride_argb, - int x, - int y, - int width, - int height, - uint32 value); - -// Convert ARGB to gray scale ARGB. -LIBYUV_API -int ARGBGrayTo(const uint8* src_argb, - int src_stride_argb, - uint8* dst_argb, - int dst_stride_argb, - int width, - int height); - -// Make a rectangle of ARGB gray scale. -LIBYUV_API -int ARGBGray(uint8* dst_argb, - int dst_stride_argb, - int x, - int y, - int width, - int height); - -// Make a rectangle of ARGB Sepia tone. -LIBYUV_API -int ARGBSepia(uint8* dst_argb, - int dst_stride_argb, - int x, - int y, - int width, - int height); - -// Apply a matrix rotation to each ARGB pixel. -// matrix_argb is 4 signed ARGB values. -128 to 127 representing -2 to 2. -// The first 4 coefficients apply to B, G, R, A and produce B of the output. -// The next 4 coefficients apply to B, G, R, A and produce G of the output. -// The next 4 coefficients apply to B, G, R, A and produce R of the output. -// The last 4 coefficients apply to B, G, R, A and produce A of the output. -LIBYUV_API -int ARGBColorMatrix(const uint8* src_argb, - int src_stride_argb, - uint8* dst_argb, - int dst_stride_argb, - const int8* matrix_argb, - int width, - int height); - -// Deprecated. Use ARGBColorMatrix instead. -// Apply a matrix rotation to each ARGB pixel. -// matrix_argb is 3 signed ARGB values. -128 to 127 representing -1 to 1. -// The first 4 coefficients apply to B, G, R, A and produce B of the output. -// The next 4 coefficients apply to B, G, R, A and produce G of the output. -// The last 4 coefficients apply to B, G, R, A and produce R of the output. -LIBYUV_API -int RGBColorMatrix(uint8* dst_argb, - int dst_stride_argb, - const int8* matrix_rgb, - int x, - int y, - int width, - int height); - -// Apply a color table each ARGB pixel. -// Table contains 256 ARGB values. -LIBYUV_API -int ARGBColorTable(uint8* dst_argb, - int dst_stride_argb, - const uint8* table_argb, - int x, - int y, - int width, - int height); - -// Apply a color table each ARGB pixel but preserve destination alpha. -// Table contains 256 ARGB values. -LIBYUV_API -int RGBColorTable(uint8* dst_argb, - int dst_stride_argb, - const uint8* table_argb, - int x, - int y, - int width, - int height); - -// Apply a luma/color table each ARGB pixel but preserve destination alpha. -// Table contains 32768 values indexed by [Y][C] where 7 it 7 bit luma from -// RGB (YJ style) and C is an 8 bit color component (R, G or B). -LIBYUV_API -int ARGBLumaColorTable(const uint8* src_argb, - int src_stride_argb, - uint8* dst_argb, - int dst_stride_argb, - const uint8* luma_rgb_table, - int width, - int height); - -// Apply a 3 term polynomial to ARGB values. -// poly points to a 4x4 matrix. The first row is constants. The 2nd row is -// coefficients for b, g, r and a. The 3rd row is coefficients for b squared, -// g squared, r squared and a squared. The 4rd row is coefficients for b to -// the 3, g to the 3, r to the 3 and a to the 3. The values are summed and -// result clamped to 0 to 255. -// A polynomial approximation can be dirived using software such as 'R'. - -LIBYUV_API -int ARGBPolynomial(const uint8* src_argb, - int src_stride_argb, - uint8* dst_argb, - int dst_stride_argb, - const float* poly, - int width, - int height); - -// Convert plane of 16 bit shorts to half floats. -// Source values are multiplied by scale before storing as half float. -LIBYUV_API -int HalfFloatPlane(const uint16* src_y, - int src_stride_y, - uint16* dst_y, - int dst_stride_y, - float scale, - int width, - int height); - -// Quantize a rectangle of ARGB. Alpha unaffected. -// scale is a 16 bit fractional fixed point scaler between 0 and 65535. -// interval_size should be a value between 1 and 255. -// interval_offset should be a value between 0 and 255. -LIBYUV_API -int ARGBQuantize(uint8* dst_argb, - int dst_stride_argb, - int scale, - int interval_size, - int interval_offset, - int x, - int y, - int width, - int height); - -// Copy ARGB to ARGB. -LIBYUV_API -int ARGBCopy(const uint8* src_argb, - int src_stride_argb, - uint8* dst_argb, - int dst_stride_argb, - int width, - int height); - -// Copy Alpha channel of ARGB to alpha of ARGB. -LIBYUV_API -int ARGBCopyAlpha(const uint8* src_argb, - int src_stride_argb, - uint8* dst_argb, - int dst_stride_argb, - int width, - int height); - -// Extract the alpha channel from ARGB. -LIBYUV_API -int ARGBExtractAlpha(const uint8* src_argb, - int src_stride_argb, - uint8* dst_a, - int dst_stride_a, - int width, - int height); - -// Copy Y channel to Alpha of ARGB. -LIBYUV_API -int ARGBCopyYToAlpha(const uint8* src_y, - int src_stride_y, - uint8* dst_argb, - int dst_stride_argb, - int width, - int height); - -typedef void (*ARGBBlendRow)(const uint8* src_argb0, - const uint8* src_argb1, - uint8* dst_argb, - int width); - -// Get function to Alpha Blend ARGB pixels and store to destination. -LIBYUV_API -ARGBBlendRow GetARGBBlend(); - -// Alpha Blend ARGB images and store to destination. -// Source is pre-multiplied by alpha using ARGBAttenuate. -// Alpha of destination is set to 255. -LIBYUV_API -int ARGBBlend(const uint8* src_argb0, - int src_stride_argb0, - const uint8* src_argb1, - int src_stride_argb1, - uint8* dst_argb, - int dst_stride_argb, - int width, - int height); - -// Alpha Blend plane and store to destination. -// Source is not pre-multiplied by alpha. -LIBYUV_API -int BlendPlane(const uint8* src_y0, - int src_stride_y0, - const uint8* src_y1, - int src_stride_y1, - const uint8* alpha, - int alpha_stride, - uint8* dst_y, - int dst_stride_y, - int width, - int height); - -// Alpha Blend YUV images and store to destination. -// Source is not pre-multiplied by alpha. -// Alpha is full width x height and subsampled to half size to apply to UV. -LIBYUV_API -int I420Blend(const uint8* src_y0, - int src_stride_y0, - const uint8* src_u0, - int src_stride_u0, - const uint8* src_v0, - int src_stride_v0, - const uint8* src_y1, - int src_stride_y1, - const uint8* src_u1, - int src_stride_u1, - const uint8* src_v1, - int src_stride_v1, - const uint8* alpha, - int alpha_stride, - uint8* dst_y, - int dst_stride_y, - uint8* dst_u, - int dst_stride_u, - uint8* dst_v, - int dst_stride_v, - int width, - int height); - -// Multiply ARGB image by ARGB image. Shifted down by 8. Saturates to 255. -LIBYUV_API -int ARGBMultiply(const uint8* src_argb0, - int src_stride_argb0, - const uint8* src_argb1, - int src_stride_argb1, - uint8* dst_argb, - int dst_stride_argb, - int width, - int height); - -// Add ARGB image with ARGB image. Saturates to 255. -LIBYUV_API -int ARGBAdd(const uint8* src_argb0, - int src_stride_argb0, - const uint8* src_argb1, - int src_stride_argb1, - uint8* dst_argb, - int dst_stride_argb, - int width, - int height); - -// Subtract ARGB image (argb1) from ARGB image (argb0). Saturates to 0. -LIBYUV_API -int ARGBSubtract(const uint8* src_argb0, - int src_stride_argb0, - const uint8* src_argb1, - int src_stride_argb1, - uint8* dst_argb, - int dst_stride_argb, - int width, - int height); - -// Convert I422 to YUY2. -LIBYUV_API -int I422ToYUY2(const uint8* src_y, - int src_stride_y, - const uint8* src_u, - int src_stride_u, - const uint8* src_v, - int src_stride_v, - uint8* dst_frame, - int dst_stride_frame, - int width, - int height); - -// Convert I422 to UYVY. -LIBYUV_API -int I422ToUYVY(const uint8* src_y, - int src_stride_y, - const uint8* src_u, - int src_stride_u, - const uint8* src_v, - int src_stride_v, - uint8* dst_frame, - int dst_stride_frame, - int width, - int height); - -// Convert unattentuated ARGB to preattenuated ARGB. -LIBYUV_API -int ARGBAttenuate(const uint8* src_argb, - int src_stride_argb, - uint8* dst_argb, - int dst_stride_argb, - int width, - int height); - -// Convert preattentuated ARGB to unattenuated ARGB. -LIBYUV_API -int ARGBUnattenuate(const uint8* src_argb, - int src_stride_argb, - uint8* dst_argb, - int dst_stride_argb, - int width, - int height); - -// Internal function - do not call directly. -// Computes table of cumulative sum for image where the value is the sum -// of all values above and to the left of the entry. Used by ARGBBlur. -LIBYUV_API -int ARGBComputeCumulativeSum(const uint8* src_argb, - int src_stride_argb, - int32* dst_cumsum, - int dst_stride32_cumsum, - int width, - int height); - -// Blur ARGB image. -// dst_cumsum table of width * (height + 1) * 16 bytes aligned to -// 16 byte boundary. -// dst_stride32_cumsum is number of ints in a row (width * 4). -// radius is number of pixels around the center. e.g. 1 = 3x3. 2=5x5. -// Blur is optimized for radius of 5 (11x11) or less. -LIBYUV_API -int ARGBBlur(const uint8* src_argb, - int src_stride_argb, - uint8* dst_argb, - int dst_stride_argb, - int32* dst_cumsum, - int dst_stride32_cumsum, - int width, - int height, - int radius); - -// Multiply ARGB image by ARGB value. -LIBYUV_API -int ARGBShade(const uint8* src_argb, - int src_stride_argb, - uint8* dst_argb, - int dst_stride_argb, - int width, - int height, - uint32 value); - -// Interpolate between two images using specified amount of interpolation -// (0 to 255) and store to destination. -// 'interpolation' is specified as 8 bit fraction where 0 means 100% src0 -// and 255 means 1% src0 and 99% src1. -LIBYUV_API -int InterpolatePlane(const uint8* src0, - int src_stride0, - const uint8* src1, - int src_stride1, - uint8* dst, - int dst_stride, - int width, - int height, - int interpolation); - -// Interpolate between two ARGB images using specified amount of interpolation -// Internally calls InterpolatePlane with width * 4 (bpp). -LIBYUV_API -int ARGBInterpolate(const uint8* src_argb0, - int src_stride_argb0, - const uint8* src_argb1, - int src_stride_argb1, - uint8* dst_argb, - int dst_stride_argb, - int width, - int height, - int interpolation); - -// Interpolate between two YUV images using specified amount of interpolation -// Internally calls InterpolatePlane on each plane where the U and V planes -// are half width and half height. -LIBYUV_API -int I420Interpolate(const uint8* src0_y, - int src0_stride_y, - const uint8* src0_u, - int src0_stride_u, - const uint8* src0_v, - int src0_stride_v, - const uint8* src1_y, - int src1_stride_y, - const uint8* src1_u, - int src1_stride_u, - const uint8* src1_v, - int src1_stride_v, - uint8* dst_y, - int dst_stride_y, - uint8* dst_u, - int dst_stride_u, - uint8* dst_v, - int dst_stride_v, - int width, - int height, - int interpolation); - -#if defined(__pnacl__) || defined(__CLR_VER) || \ - (defined(__i386__) && !defined(__SSE2__)) -#define LIBYUV_DISABLE_X86 -#endif -// MemorySanitizer does not support assembly code yet. http://crbug.com/344505 -#if defined(__has_feature) -#if __has_feature(memory_sanitizer) -#define LIBYUV_DISABLE_X86 -#endif -#endif -// The following are available on all x86 platforms: -#if !defined(LIBYUV_DISABLE_X86) && \ - (defined(_M_IX86) || defined(__x86_64__) || defined(__i386__)) -#define HAS_ARGBAFFINEROW_SSE2 -#endif - -// Row function for copying pixels from a source with a slope to a row -// of destination. Useful for scaling, rotation, mirror, texture mapping. -LIBYUV_API -void ARGBAffineRow_C(const uint8* src_argb, - int src_argb_stride, - uint8* dst_argb, - const float* uv_dudv, - int width); -LIBYUV_API -void ARGBAffineRow_SSE2(const uint8* src_argb, - int src_argb_stride, - uint8* dst_argb, - const float* uv_dudv, - int width); - -// Shuffle ARGB channel order. e.g. BGRA to ARGB. -// shuffler is 16 bytes and must be aligned. -LIBYUV_API -int ARGBShuffle(const uint8* src_bgra, - int src_stride_bgra, - uint8* dst_argb, - int dst_stride_argb, - const uint8* shuffler, - int width, - int height); - -// Sobel ARGB effect with planar output. -LIBYUV_API -int ARGBSobelToPlane(const uint8* src_argb, - int src_stride_argb, - uint8* dst_y, - int dst_stride_y, - int width, - int height); - -// Sobel ARGB effect. -LIBYUV_API -int ARGBSobel(const uint8* src_argb, - int src_stride_argb, - uint8* dst_argb, - int dst_stride_argb, - int width, - int height); - -// Sobel ARGB effect w/ Sobel X, Sobel, Sobel Y in ARGB. -LIBYUV_API -int ARGBSobelXY(const uint8* src_argb, - int src_stride_argb, - uint8* dst_argb, - int dst_stride_argb, - int width, - int height); - -#ifdef __cplusplus -} // extern "C" -} // namespace libyuv -#endif - -#endif // INCLUDE_LIBYUV_PLANAR_FUNCTIONS_H_ diff --git a/WebRtc.NET/include/third_party/libyuv/include/libyuv/rotate.h b/WebRtc.NET/include/third_party/libyuv/include/libyuv/rotate.h deleted file mode 100644 index b9f7154a..00000000 --- a/WebRtc.NET/include/third_party/libyuv/include/libyuv/rotate.h +++ /dev/null @@ -1,164 +0,0 @@ -/* - * Copyright 2011 The LibYuv Project Authors. All rights reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef INCLUDE_LIBYUV_ROTATE_H_ -#define INCLUDE_LIBYUV_ROTATE_H_ - -#include "libyuv/basic_types.h" - -#ifdef __cplusplus -namespace libyuv { -extern "C" { -#endif - -// Supported rotation. -typedef enum RotationMode { - kRotate0 = 0, // No rotation. - kRotate90 = 90, // Rotate 90 degrees clockwise. - kRotate180 = 180, // Rotate 180 degrees. - kRotate270 = 270, // Rotate 270 degrees clockwise. - - // Deprecated. - kRotateNone = 0, - kRotateClockwise = 90, - kRotateCounterClockwise = 270, -} RotationModeEnum; - -// Rotate I420 frame. -LIBYUV_API -int I420Rotate(const uint8* src_y, - int src_stride_y, - const uint8* src_u, - int src_stride_u, - const uint8* src_v, - int src_stride_v, - uint8* dst_y, - int dst_stride_y, - uint8* dst_u, - int dst_stride_u, - uint8* dst_v, - int dst_stride_v, - int src_width, - int src_height, - enum RotationMode mode); - -// Rotate NV12 input and store in I420. -LIBYUV_API -int NV12ToI420Rotate(const uint8* src_y, - int src_stride_y, - const uint8* src_uv, - int src_stride_uv, - uint8* dst_y, - int dst_stride_y, - uint8* dst_u, - int dst_stride_u, - uint8* dst_v, - int dst_stride_v, - int src_width, - int src_height, - enum RotationMode mode); - -// Rotate a plane by 0, 90, 180, or 270. -LIBYUV_API -int RotatePlane(const uint8* src, - int src_stride, - uint8* dst, - int dst_stride, - int src_width, - int src_height, - enum RotationMode mode); - -// Rotate planes by 90, 180, 270. Deprecated. -LIBYUV_API -void RotatePlane90(const uint8* src, - int src_stride, - uint8* dst, - int dst_stride, - int width, - int height); - -LIBYUV_API -void RotatePlane180(const uint8* src, - int src_stride, - uint8* dst, - int dst_stride, - int width, - int height); - -LIBYUV_API -void RotatePlane270(const uint8* src, - int src_stride, - uint8* dst, - int dst_stride, - int width, - int height); - -LIBYUV_API -void RotateUV90(const uint8* src, - int src_stride, - uint8* dst_a, - int dst_stride_a, - uint8* dst_b, - int dst_stride_b, - int width, - int height); - -// Rotations for when U and V are interleaved. -// These functions take one input pointer and -// split the data into two buffers while -// rotating them. Deprecated. -LIBYUV_API -void RotateUV180(const uint8* src, - int src_stride, - uint8* dst_a, - int dst_stride_a, - uint8* dst_b, - int dst_stride_b, - int width, - int height); - -LIBYUV_API -void RotateUV270(const uint8* src, - int src_stride, - uint8* dst_a, - int dst_stride_a, - uint8* dst_b, - int dst_stride_b, - int width, - int height); - -// The 90 and 270 functions are based on transposes. -// Doing a transpose with reversing the read/write -// order will result in a rotation by +- 90 degrees. -// Deprecated. -LIBYUV_API -void TransposePlane(const uint8* src, - int src_stride, - uint8* dst, - int dst_stride, - int width, - int height); - -LIBYUV_API -void TransposeUV(const uint8* src, - int src_stride, - uint8* dst_a, - int dst_stride_a, - uint8* dst_b, - int dst_stride_b, - int width, - int height); - -#ifdef __cplusplus -} // extern "C" -} // namespace libyuv -#endif - -#endif // INCLUDE_LIBYUV_ROTATE_H_ diff --git a/WebRtc.NET/include/third_party/libyuv/include/libyuv/rotate_argb.h b/WebRtc.NET/include/third_party/libyuv/include/libyuv/rotate_argb.h deleted file mode 100644 index be0190c1..00000000 --- a/WebRtc.NET/include/third_party/libyuv/include/libyuv/rotate_argb.h +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Copyright 2012 The LibYuv Project Authors. All rights reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef INCLUDE_LIBYUV_ROTATE_ARGB_H_ -#define INCLUDE_LIBYUV_ROTATE_ARGB_H_ - -#include "libyuv/basic_types.h" -#include "libyuv/rotate.h" // For RotationMode. - -#ifdef __cplusplus -namespace libyuv { -extern "C" { -#endif - -// Rotate ARGB frame -LIBYUV_API -int ARGBRotate(const uint8* src_argb, - int src_stride_argb, - uint8* dst_argb, - int dst_stride_argb, - int src_width, - int src_height, - enum RotationMode mode); - -#ifdef __cplusplus -} // extern "C" -} // namespace libyuv -#endif - -#endif // INCLUDE_LIBYUV_ROTATE_ARGB_H_ diff --git a/WebRtc.NET/include/third_party/libyuv/include/libyuv/rotate_row.h b/WebRtc.NET/include/third_party/libyuv/include/libyuv/rotate_row.h deleted file mode 100644 index af1d0a05..00000000 --- a/WebRtc.NET/include/third_party/libyuv/include/libyuv/rotate_row.h +++ /dev/null @@ -1,187 +0,0 @@ -/* - * Copyright 2013 The LibYuv Project Authors. All rights reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef INCLUDE_LIBYUV_ROTATE_ROW_H_ -#define INCLUDE_LIBYUV_ROTATE_ROW_H_ - -#include "libyuv/basic_types.h" - -#ifdef __cplusplus -namespace libyuv { -extern "C" { -#endif - -#if defined(__pnacl__) || defined(__CLR_VER) || \ - (defined(__i386__) && !defined(__SSE2__)) -#define LIBYUV_DISABLE_X86 -#endif -// MemorySanitizer does not support assembly code yet. http://crbug.com/344505 -#if defined(__has_feature) -#if __has_feature(memory_sanitizer) -#define LIBYUV_DISABLE_X86 -#endif -#endif -// The following are available for Visual C and clangcl 32 bit: -#if !defined(LIBYUV_DISABLE_X86) && defined(_M_IX86) -#define HAS_TRANSPOSEWX8_SSSE3 -#define HAS_TRANSPOSEUVWX8_SSE2 -#endif - -// The following are available for GCC 32 or 64 bit but not NaCL for 64 bit: -#if !defined(LIBYUV_DISABLE_X86) && \ - (defined(__i386__) || \ - (defined(__x86_64__) && !defined(__native_client__))) -#define HAS_TRANSPOSEWX8_SSSE3 -#endif - -// The following are available for 64 bit GCC but not NaCL: -#if !defined(LIBYUV_DISABLE_X86) && !defined(__native_client__) && \ - defined(__x86_64__) -#define HAS_TRANSPOSEWX8_FAST_SSSE3 -#define HAS_TRANSPOSEUVWX8_SSE2 -#endif - -#if !defined(LIBYUV_DISABLE_NEON) && !defined(__native_client__) && \ - (defined(__ARM_NEON__) || defined(LIBYUV_NEON) || defined(__aarch64__)) -#define HAS_TRANSPOSEWX8_NEON -#define HAS_TRANSPOSEUVWX8_NEON -#endif - -#if !defined(LIBYUV_DISABLE_MIPS) && !defined(__native_client__) && \ - defined(__mips__) && defined(__mips_dsp) && (__mips_dsp_rev >= 2) -#define HAS_TRANSPOSEWX8_DSPR2 -#define HAS_TRANSPOSEUVWX8_DSPR2 -#endif // defined(__mips__) - -void TransposeWxH_C(const uint8* src, - int src_stride, - uint8* dst, - int dst_stride, - int width, - int height); - -void TransposeWx8_C(const uint8* src, - int src_stride, - uint8* dst, - int dst_stride, - int width); -void TransposeWx8_NEON(const uint8* src, - int src_stride, - uint8* dst, - int dst_stride, - int width); -void TransposeWx8_SSSE3(const uint8* src, - int src_stride, - uint8* dst, - int dst_stride, - int width); -void TransposeWx8_Fast_SSSE3(const uint8* src, - int src_stride, - uint8* dst, - int dst_stride, - int width); -void TransposeWx8_DSPR2(const uint8* src, - int src_stride, - uint8* dst, - int dst_stride, - int width); -void TransposeWx8_Fast_DSPR2(const uint8* src, - int src_stride, - uint8* dst, - int dst_stride, - int width); - -void TransposeWx8_Any_NEON(const uint8* src, - int src_stride, - uint8* dst, - int dst_stride, - int width); -void TransposeWx8_Any_SSSE3(const uint8* src, - int src_stride, - uint8* dst, - int dst_stride, - int width); -void TransposeWx8_Fast_Any_SSSE3(const uint8* src, - int src_stride, - uint8* dst, - int dst_stride, - int width); -void TransposeWx8_Any_DSPR2(const uint8* src, - int src_stride, - uint8* dst, - int dst_stride, - int width); - -void TransposeUVWxH_C(const uint8* src, - int src_stride, - uint8* dst_a, - int dst_stride_a, - uint8* dst_b, - int dst_stride_b, - int width, - int height); - -void TransposeUVWx8_C(const uint8* src, - int src_stride, - uint8* dst_a, - int dst_stride_a, - uint8* dst_b, - int dst_stride_b, - int width); -void TransposeUVWx8_SSE2(const uint8* src, - int src_stride, - uint8* dst_a, - int dst_stride_a, - uint8* dst_b, - int dst_stride_b, - int width); -void TransposeUVWx8_NEON(const uint8* src, - int src_stride, - uint8* dst_a, - int dst_stride_a, - uint8* dst_b, - int dst_stride_b, - int width); -void TransposeUVWx8_DSPR2(const uint8* src, - int src_stride, - uint8* dst_a, - int dst_stride_a, - uint8* dst_b, - int dst_stride_b, - int width); - -void TransposeUVWx8_Any_SSE2(const uint8* src, - int src_stride, - uint8* dst_a, - int dst_stride_a, - uint8* dst_b, - int dst_stride_b, - int width); -void TransposeUVWx8_Any_NEON(const uint8* src, - int src_stride, - uint8* dst_a, - int dst_stride_a, - uint8* dst_b, - int dst_stride_b, - int width); -void TransposeUVWx8_Any_DSPR2(const uint8* src, - int src_stride, - uint8* dst_a, - int dst_stride_a, - uint8* dst_b, - int dst_stride_b, - int width); - -#ifdef __cplusplus -} // extern "C" -} // namespace libyuv -#endif - -#endif // INCLUDE_LIBYUV_ROTATE_ROW_H_ diff --git a/WebRtc.NET/include/third_party/libyuv/include/libyuv/row.h b/WebRtc.NET/include/third_party/libyuv/include/libyuv/row.h deleted file mode 100644 index 16394da0..00000000 --- a/WebRtc.NET/include/third_party/libyuv/include/libyuv/row.h +++ /dev/null @@ -1,2668 +0,0 @@ -/* - * Copyright 2011 The LibYuv Project Authors. All rights reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef INCLUDE_LIBYUV_ROW_H_ -#define INCLUDE_LIBYUV_ROW_H_ - -#include // For malloc. - -#include "libyuv/basic_types.h" - -#ifdef __cplusplus -namespace libyuv { -extern "C" { -#endif - -#define IS_ALIGNED(p, a) (!((uintptr_t)(p) & ((a)-1))) - -#define align_buffer_64(var, size) \ - uint8* var##_mem = (uint8*)(malloc((size) + 63)); /* NOLINT */ \ - uint8* var = (uint8*)(((intptr_t)(var##_mem) + 63) & ~63) /* NOLINT */ - -#define free_aligned_buffer_64(var) \ - free(var##_mem); \ - var = 0 - -#if defined(__pnacl__) || defined(__CLR_VER) || \ - (defined(__i386__) && !defined(__SSE2__)) -#define LIBYUV_DISABLE_X86 -#endif -// MemorySanitizer does not support assembly code yet. http://crbug.com/344505 -#if defined(__has_feature) -#if __has_feature(memory_sanitizer) -#define LIBYUV_DISABLE_X86 -#endif -#endif -// True if compiling for SSSE3 as a requirement. -#if defined(__SSSE3__) || (defined(_M_IX86_FP) && (_M_IX86_FP >= 3)) -#define LIBYUV_SSSE3_ONLY -#endif - -#if defined(__native_client__) -#define LIBYUV_DISABLE_NEON -#endif -// clang >= 3.5.0 required for Arm64. -#if defined(__clang__) && defined(__aarch64__) && !defined(LIBYUV_DISABLE_NEON) -#if (__clang_major__ < 3) || (__clang_major__ == 3 && (__clang_minor__ < 5)) -#define LIBYUV_DISABLE_NEON -#endif // clang >= 3.5 -#endif // __clang__ - -// GCC >= 4.7.0 required for AVX2. -#if defined(__GNUC__) && (defined(__x86_64__) || defined(__i386__)) -#if (__GNUC__ > 4) || (__GNUC__ == 4 && (__GNUC_MINOR__ >= 7)) -#define GCC_HAS_AVX2 1 -#endif // GNUC >= 4.7 -#endif // __GNUC__ - -// clang >= 3.4.0 required for AVX2. -#if defined(__clang__) && (defined(__x86_64__) || defined(__i386__)) -#if (__clang_major__ > 3) || (__clang_major__ == 3 && (__clang_minor__ >= 4)) -#define CLANG_HAS_AVX2 1 -#endif // clang >= 3.4 -#endif // __clang__ - -// Visual C 2012 required for AVX2. -#if defined(_M_IX86) && !defined(__clang__) && defined(_MSC_VER) && \ - _MSC_VER >= 1700 -#define VISUALC_HAS_AVX2 1 -#endif // VisualStudio >= 2012 - -// The following are available on all x86 platforms: -#if !defined(LIBYUV_DISABLE_X86) && \ - (defined(_M_IX86) || defined(__x86_64__) || defined(__i386__)) -// Conversions: -#define HAS_ABGRTOUVROW_SSSE3 -#define HAS_ABGRTOYROW_SSSE3 -#define HAS_ARGB1555TOARGBROW_SSE2 -#define HAS_ARGB4444TOARGBROW_SSE2 -#define HAS_ARGBEXTRACTALPHAROW_SSE2 -#define HAS_ARGBSETROW_X86 -#define HAS_ARGBSHUFFLEROW_SSE2 -#define HAS_ARGBSHUFFLEROW_SSSE3 -#define HAS_ARGBTOARGB1555ROW_SSE2 -#define HAS_ARGBTOARGB4444ROW_SSE2 -#define HAS_ARGBTORAWROW_SSSE3 -#define HAS_ARGBTORGB24ROW_SSSE3 -#define HAS_ARGBTORGB565DITHERROW_SSE2 -#define HAS_ARGBTORGB565ROW_SSE2 -#define HAS_ARGBTOUV444ROW_SSSE3 -#define HAS_ARGBTOUVJROW_SSSE3 -#define HAS_ARGBTOUVROW_SSSE3 -#define HAS_ARGBTOYJROW_SSSE3 -#define HAS_ARGBTOYROW_SSSE3 -#define HAS_BGRATOUVROW_SSSE3 -#define HAS_BGRATOYROW_SSSE3 -#define HAS_COPYROW_ERMS -#define HAS_COPYROW_SSE2 -#define HAS_H422TOARGBROW_SSSE3 -#define HAS_HALFFLOATROW_SSE2 -#define HAS_I400TOARGBROW_SSE2 -#define HAS_I422TOARGB1555ROW_SSSE3 -#define HAS_I422TOARGB4444ROW_SSSE3 -#define HAS_I422TOARGBROW_SSSE3 -#define HAS_I422TORGB24ROW_SSSE3 -#define HAS_I422TORGB565ROW_SSSE3 -#define HAS_I422TORGBAROW_SSSE3 -#define HAS_I422TOUYVYROW_SSE2 -#define HAS_I422TOYUY2ROW_SSE2 -#define HAS_I444TOARGBROW_SSSE3 -#define HAS_J400TOARGBROW_SSE2 -#define HAS_J422TOARGBROW_SSSE3 -#define HAS_MERGEUVROW_SSE2 -#define HAS_MIRRORROW_SSSE3 -#define HAS_MIRRORUVROW_SSSE3 -#define HAS_NV12TOARGBROW_SSSE3 -#define HAS_NV12TORGB565ROW_SSSE3 -#define HAS_NV21TOARGBROW_SSSE3 -#define HAS_RAWTOARGBROW_SSSE3 -#define HAS_RAWTORGB24ROW_SSSE3 -#define HAS_RAWTOYROW_SSSE3 -#define HAS_RGB24TOARGBROW_SSSE3 -#define HAS_RGB24TOYROW_SSSE3 -#define HAS_RGB565TOARGBROW_SSE2 -#define HAS_RGBATOUVROW_SSSE3 -#define HAS_RGBATOYROW_SSSE3 -#define HAS_SETROW_ERMS -#define HAS_SETROW_X86 -#define HAS_SPLITUVROW_SSE2 -#define HAS_UYVYTOARGBROW_SSSE3 -#define HAS_UYVYTOUV422ROW_SSE2 -#define HAS_UYVYTOUVROW_SSE2 -#define HAS_UYVYTOYROW_SSE2 -#define HAS_YUY2TOARGBROW_SSSE3 -#define HAS_YUY2TOUV422ROW_SSE2 -#define HAS_YUY2TOUVROW_SSE2 -#define HAS_YUY2TOYROW_SSE2 - -// Effects: -#define HAS_ARGBADDROW_SSE2 -#define HAS_ARGBAFFINEROW_SSE2 -#define HAS_ARGBATTENUATEROW_SSSE3 -#define HAS_ARGBBLENDROW_SSSE3 -#define HAS_ARGBCOLORMATRIXROW_SSSE3 -#define HAS_ARGBCOLORTABLEROW_X86 -#define HAS_ARGBCOPYALPHAROW_SSE2 -#define HAS_ARGBCOPYYTOALPHAROW_SSE2 -#define HAS_ARGBGRAYROW_SSSE3 -#define HAS_ARGBLUMACOLORTABLEROW_SSSE3 -#define HAS_ARGBMIRRORROW_SSE2 -#define HAS_ARGBMULTIPLYROW_SSE2 -#define HAS_ARGBPOLYNOMIALROW_SSE2 -#define HAS_ARGBQUANTIZEROW_SSE2 -#define HAS_ARGBSEPIAROW_SSSE3 -#define HAS_ARGBSHADEROW_SSE2 -#define HAS_ARGBSUBTRACTROW_SSE2 -#define HAS_ARGBUNATTENUATEROW_SSE2 -#define HAS_BLENDPLANEROW_SSSE3 -#define HAS_COMPUTECUMULATIVESUMROW_SSE2 -#define HAS_CUMULATIVESUMTOAVERAGEROW_SSE2 -#define HAS_INTERPOLATEROW_SSSE3 -#define HAS_RGBCOLORTABLEROW_X86 -#define HAS_SOBELROW_SSE2 -#define HAS_SOBELTOPLANEROW_SSE2 -#define HAS_SOBELXROW_SSE2 -#define HAS_SOBELXYROW_SSE2 -#define HAS_SOBELYROW_SSE2 - -// The following functions fail on gcc/clang 32 bit with fpic and framepointer. -// caveat: clangcl uses row_win.cc which works. -#if defined(__x86_64__) || !defined(__pic__) || defined(__clang__) || \ - defined(_MSC_VER) -// TODO(fbarchard): fix build error on android_full_debug=1 -// https://code.google.com/p/libyuv/issues/detail?id=517 -#define HAS_I422ALPHATOARGBROW_SSSE3 -#endif -#endif - -// The following are available on all x86 platforms, but -// require VS2012, clang 3.4 or gcc 4.7. -// The code supports NaCL but requires a new compiler and validator. -#if !defined(LIBYUV_DISABLE_X86) && \ - (defined(VISUALC_HAS_AVX2) || defined(CLANG_HAS_AVX2) || \ - defined(GCC_HAS_AVX2)) -#define HAS_ARGBCOPYALPHAROW_AVX2 -#define HAS_ARGBCOPYYTOALPHAROW_AVX2 -#define HAS_ARGBEXTRACTALPHAROW_AVX2 -#define HAS_ARGBMIRRORROW_AVX2 -#define HAS_ARGBPOLYNOMIALROW_AVX2 -#define HAS_ARGBSHUFFLEROW_AVX2 -#define HAS_ARGBTORGB565DITHERROW_AVX2 -#define HAS_ARGBTOUVJROW_AVX2 -#define HAS_ARGBTOUVROW_AVX2 -#define HAS_ARGBTOYJROW_AVX2 -#define HAS_ARGBTOYROW_AVX2 -#define HAS_COPYROW_AVX -#define HAS_H422TOARGBROW_AVX2 -#define HAS_HALFFLOATROW_AVX2 -// #define HAS_HALFFLOATROW_F16C // Enable to test halffloat cast -#define HAS_I400TOARGBROW_AVX2 -#define HAS_I422TOARGB1555ROW_AVX2 -#define HAS_I422TOARGB4444ROW_AVX2 -#define HAS_I422TOARGBROW_AVX2 -#define HAS_I422TORGB24ROW_AVX2 -#define HAS_I422TORGB565ROW_AVX2 -#define HAS_I422TORGBAROW_AVX2 -#define HAS_I444TOARGBROW_AVX2 -#define HAS_INTERPOLATEROW_AVX2 -#define HAS_J422TOARGBROW_AVX2 -#define HAS_MERGEUVROW_AVX2 -#define HAS_MIRRORROW_AVX2 -#define HAS_NV12TOARGBROW_AVX2 -#define HAS_NV12TORGB565ROW_AVX2 -#define HAS_NV21TOARGBROW_AVX2 -#define HAS_SPLITUVROW_AVX2 -#define HAS_UYVYTOARGBROW_AVX2 -#define HAS_UYVYTOUV422ROW_AVX2 -#define HAS_UYVYTOUVROW_AVX2 -#define HAS_UYVYTOYROW_AVX2 -#define HAS_YUY2TOARGBROW_AVX2 -#define HAS_YUY2TOUV422ROW_AVX2 -#define HAS_YUY2TOUVROW_AVX2 -#define HAS_YUY2TOYROW_AVX2 - -// Effects: -#define HAS_ARGBADDROW_AVX2 -#define HAS_ARGBATTENUATEROW_AVX2 -#define HAS_ARGBMULTIPLYROW_AVX2 -#define HAS_ARGBSUBTRACTROW_AVX2 -#define HAS_ARGBUNATTENUATEROW_AVX2 -#define HAS_BLENDPLANEROW_AVX2 - -#if defined(__x86_64__) || !defined(__pic__) || defined(__clang__) || \ - defined(_MSC_VER) -// TODO(fbarchard): fix build error on android_full_debug=1 -// https://code.google.com/p/libyuv/issues/detail?id=517 -#define HAS_I422ALPHATOARGBROW_AVX2 -#endif -#endif - -// The following are available for AVX2 Visual C and clangcl 32 bit: -// TODO(fbarchard): Port to gcc. -#if !defined(LIBYUV_DISABLE_X86) && defined(_M_IX86) && \ - (defined(VISUALC_HAS_AVX2) || defined(CLANG_HAS_AVX2)) -#define HAS_ARGB1555TOARGBROW_AVX2 -#define HAS_ARGB4444TOARGBROW_AVX2 -#define HAS_ARGBTOARGB1555ROW_AVX2 -#define HAS_ARGBTOARGB4444ROW_AVX2 -#define HAS_ARGBTORGB565ROW_AVX2 -#define HAS_J400TOARGBROW_AVX2 -#define HAS_RGB565TOARGBROW_AVX2 -#endif - -// The following are also available on x64 Visual C. -#if !defined(LIBYUV_DISABLE_X86) && defined(_MSC_VER) && defined(_M_X64) && \ - (!defined(__clang__) || defined(__SSSE3__)) -#define HAS_I422ALPHATOARGBROW_SSSE3 -#define HAS_I422TOARGBROW_SSSE3 -#endif - -// The following are available on Neon platforms: -#if !defined(LIBYUV_DISABLE_NEON) && \ - (defined(__aarch64__) || defined(__ARM_NEON__) || defined(LIBYUV_NEON)) -#define HAS_ABGRTOUVROW_NEON -#define HAS_ABGRTOYROW_NEON -#define HAS_ARGB1555TOARGBROW_NEON -#define HAS_ARGB1555TOUVROW_NEON -#define HAS_ARGB1555TOYROW_NEON -#define HAS_ARGB4444TOARGBROW_NEON -#define HAS_ARGB4444TOUVROW_NEON -#define HAS_ARGB4444TOYROW_NEON -#define HAS_ARGBEXTRACTALPHAROW_NEON -#define HAS_ARGBSETROW_NEON -#define HAS_ARGBTOARGB1555ROW_NEON -#define HAS_ARGBTOARGB4444ROW_NEON -#define HAS_ARGBTORAWROW_NEON -#define HAS_ARGBTORGB24ROW_NEON -#define HAS_ARGBTORGB565DITHERROW_NEON -#define HAS_ARGBTORGB565ROW_NEON -#define HAS_ARGBTOUV444ROW_NEON -#define HAS_ARGBTOUVJROW_NEON -#define HAS_ARGBTOUVROW_NEON -#define HAS_ARGBTOYJROW_NEON -#define HAS_ARGBTOYROW_NEON -#define HAS_BGRATOUVROW_NEON -#define HAS_BGRATOYROW_NEON -#define HAS_COPYROW_NEON -#define HAS_HALFFLOATROW_NEON -#define HAS_I400TOARGBROW_NEON -#define HAS_I422ALPHATOARGBROW_NEON -#define HAS_I422TOARGB1555ROW_NEON -#define HAS_I422TOARGB4444ROW_NEON -#define HAS_I422TOARGBROW_NEON -#define HAS_I422TORGB24ROW_NEON -#define HAS_I422TORGB565ROW_NEON -#define HAS_I422TORGBAROW_NEON -#define HAS_I422TOUYVYROW_NEON -#define HAS_I422TOYUY2ROW_NEON -#define HAS_I444TOARGBROW_NEON -#define HAS_J400TOARGBROW_NEON -#define HAS_MERGEUVROW_NEON -#define HAS_MIRRORROW_NEON -#define HAS_MIRRORUVROW_NEON -#define HAS_NV12TOARGBROW_NEON -#define HAS_NV12TORGB565ROW_NEON -#define HAS_NV21TOARGBROW_NEON -#define HAS_RAWTOARGBROW_NEON -#define HAS_RAWTORGB24ROW_NEON -#define HAS_RAWTOUVROW_NEON -#define HAS_RAWTOYROW_NEON -#define HAS_RGB24TOARGBROW_NEON -#define HAS_RGB24TOUVROW_NEON -#define HAS_RGB24TOYROW_NEON -#define HAS_RGB565TOARGBROW_NEON -#define HAS_RGB565TOUVROW_NEON -#define HAS_RGB565TOYROW_NEON -#define HAS_RGBATOUVROW_NEON -#define HAS_RGBATOYROW_NEON -#define HAS_SETROW_NEON -#define HAS_SPLITUVROW_NEON -#define HAS_UYVYTOARGBROW_NEON -#define HAS_UYVYTOUV422ROW_NEON -#define HAS_UYVYTOUVROW_NEON -#define HAS_UYVYTOYROW_NEON -#define HAS_YUY2TOARGBROW_NEON -#define HAS_YUY2TOUV422ROW_NEON -#define HAS_YUY2TOUVROW_NEON -#define HAS_YUY2TOYROW_NEON - -// Effects: -#define HAS_ARGBADDROW_NEON -#define HAS_ARGBATTENUATEROW_NEON -#define HAS_ARGBBLENDROW_NEON -#define HAS_ARGBCOLORMATRIXROW_NEON -#define HAS_ARGBGRAYROW_NEON -#define HAS_ARGBMIRRORROW_NEON -#define HAS_ARGBMULTIPLYROW_NEON -#define HAS_ARGBQUANTIZEROW_NEON -#define HAS_ARGBSEPIAROW_NEON -#define HAS_ARGBSHADEROW_NEON -#define HAS_ARGBSHUFFLEROW_NEON -#define HAS_ARGBSUBTRACTROW_NEON -#define HAS_INTERPOLATEROW_NEON -#define HAS_SOBELROW_NEON -#define HAS_SOBELTOPLANEROW_NEON -#define HAS_SOBELXROW_NEON -#define HAS_SOBELXYROW_NEON -#define HAS_SOBELYROW_NEON -#endif - -// The following are available on Mips platforms: -#if !defined(LIBYUV_DISABLE_MIPS) && defined(__mips__) && \ - (_MIPS_SIM == _MIPS_SIM_ABI32) && (__mips_isa_rev < 6) -#define HAS_COPYROW_MIPS -#if defined(__mips_dsp) && (__mips_dsp_rev >= 2) -#define HAS_I422TOARGBROW_DSPR2 -#define HAS_INTERPOLATEROW_DSPR2 -#define HAS_MIRRORROW_DSPR2 -#define HAS_MIRRORUVROW_DSPR2 -#define HAS_SPLITUVROW_DSPR2 -#endif -#endif - -#if !defined(LIBYUV_DISABLE_MSA) && defined(__mips_msa) -#define HAS_ARGBMIRRORROW_MSA -#define HAS_I422TOUYVYROW_MSA -#define HAS_I422TOYUY2ROW_MSA -#define HAS_MIRRORROW_MSA -#define HAS_UYVYTOUVROW_MSA -#define HAS_UYVYTOYROW_MSA -#define HAS_YUY2TOUV422ROW_MSA -#define HAS_YUY2TOUVROW_MSA -#define HAS_YUY2TOYROW_MSA -#define HAS_ARGB4444TOARGBROW_MSA -#define HAS_ARGBTOYROW_MSA -#define HAS_ARGBTOUVROW_MSA -#define HAS_I422TOARGBROW_MSA -#define HAS_I422TORGBAROW_MSA -#define HAS_I422ALPHATOARGBROW_MSA -#define HAS_I422TORGB24ROW_MSA -#define HAS_ARGBTORGB24ROW_MSA -#define HAS_ARGBTORAWROW_MSA -#define HAS_ARGBTORGB565ROW_MSA -#define HAS_ARGBTOARGB1555ROW_MSA -#define HAS_ARGBTOARGB4444ROW_MSA -#define HAS_ARGBTOUV444ROW_MSA -#define HAS_ARGBMULTIPLYROW_MSA -#define HAS_ARGBADDROW_MSA -#define HAS_ARGBSUBTRACTROW_MSA -#endif - -#if defined(_MSC_VER) && !defined(__CLR_VER) && !defined(__clang__) -#if defined(VISUALC_HAS_AVX2) -#define SIMD_ALIGNED(var) __declspec(align(32)) var -#else -#define SIMD_ALIGNED(var) __declspec(align(16)) var -#endif -typedef __declspec(align(16)) int16 vec16[8]; -typedef __declspec(align(16)) int32 vec32[4]; -typedef __declspec(align(16)) int8 vec8[16]; -typedef __declspec(align(16)) uint16 uvec16[8]; -typedef __declspec(align(16)) uint32 uvec32[4]; -typedef __declspec(align(16)) uint8 uvec8[16]; -typedef __declspec(align(32)) int16 lvec16[16]; -typedef __declspec(align(32)) int32 lvec32[8]; -typedef __declspec(align(32)) int8 lvec8[32]; -typedef __declspec(align(32)) uint16 ulvec16[16]; -typedef __declspec(align(32)) uint32 ulvec32[8]; -typedef __declspec(align(32)) uint8 ulvec8[32]; -#elif !defined(__pnacl__) && (defined(__GNUC__) || defined(__clang__)) -// Caveat GCC 4.2 to 4.7 have a known issue using vectors with const. -#if defined(CLANG_HAS_AVX2) || defined(GCC_HAS_AVX2) -#define SIMD_ALIGNED(var) var __attribute__((aligned(32))) -#else -#define SIMD_ALIGNED(var) var __attribute__((aligned(16))) -#endif -typedef int16 __attribute__((vector_size(16))) vec16; -typedef int32 __attribute__((vector_size(16))) vec32; -typedef int8 __attribute__((vector_size(16))) vec8; -typedef uint16 __attribute__((vector_size(16))) uvec16; -typedef uint32 __attribute__((vector_size(16))) uvec32; -typedef uint8 __attribute__((vector_size(16))) uvec8; -typedef int16 __attribute__((vector_size(32))) lvec16; -typedef int32 __attribute__((vector_size(32))) lvec32; -typedef int8 __attribute__((vector_size(32))) lvec8; -typedef uint16 __attribute__((vector_size(32))) ulvec16; -typedef uint32 __attribute__((vector_size(32))) ulvec32; -typedef uint8 __attribute__((vector_size(32))) ulvec8; -#else -#define SIMD_ALIGNED(var) var -typedef int16 vec16[8]; -typedef int32 vec32[4]; -typedef int8 vec8[16]; -typedef uint16 uvec16[8]; -typedef uint32 uvec32[4]; -typedef uint8 uvec8[16]; -typedef int16 lvec16[16]; -typedef int32 lvec32[8]; -typedef int8 lvec8[32]; -typedef uint16 ulvec16[16]; -typedef uint32 ulvec32[8]; -typedef uint8 ulvec8[32]; -#endif - -#if defined(__aarch64__) -// This struct is for Arm64 color conversion. -struct YuvConstants { - uvec16 kUVToRB; - uvec16 kUVToRB2; - uvec16 kUVToG; - uvec16 kUVToG2; - vec16 kUVBiasBGR; - vec32 kYToRgb; -}; -#elif defined(__arm__) -// This struct is for ArmV7 color conversion. -struct YuvConstants { - uvec8 kUVToRB; - uvec8 kUVToG; - vec16 kUVBiasBGR; - vec32 kYToRgb; -}; -#else -// This struct is for Intel color conversion. -struct YuvConstants { - int8 kUVToB[32]; - int8 kUVToG[32]; - int8 kUVToR[32]; - int16 kUVBiasB[16]; - int16 kUVBiasG[16]; - int16 kUVBiasR[16]; - int16 kYToRgb[16]; -}; - -// Offsets into YuvConstants structure -#define KUVTOB 0 -#define KUVTOG 32 -#define KUVTOR 64 -#define KUVBIASB 96 -#define KUVBIASG 128 -#define KUVBIASR 160 -#define KYTORGB 192 -#endif - -// Conversion matrix for YUV to RGB -extern const struct YuvConstants SIMD_ALIGNED(kYuvI601Constants); // BT.601 -extern const struct YuvConstants SIMD_ALIGNED(kYuvJPEGConstants); // JPeg -extern const struct YuvConstants SIMD_ALIGNED(kYuvH709Constants); // BT.709 - -// Conversion matrix for YVU to BGR -extern const struct YuvConstants SIMD_ALIGNED(kYvuI601Constants); // BT.601 -extern const struct YuvConstants SIMD_ALIGNED(kYvuJPEGConstants); // JPeg -extern const struct YuvConstants SIMD_ALIGNED(kYvuH709Constants); // BT.709 - -#if defined(__APPLE__) || defined(__x86_64__) || defined(__llvm__) -#define OMITFP -#else -#define OMITFP __attribute__((optimize("omit-frame-pointer"))) -#endif - -// NaCL macros for GCC x86 and x64. -#if defined(__native_client__) -#define LABELALIGN ".p2align 5\n" -#else -#define LABELALIGN -#endif -#if defined(__native_client__) && defined(__x86_64__) -// r14 is used for MEMOP macros. -#define NACL_R14 "r14", -#define BUNDLELOCK ".bundle_lock\n" -#define BUNDLEUNLOCK ".bundle_unlock\n" -#define MEMACCESS(base) "%%nacl:(%%r15,%q" #base ")" -#define MEMACCESS2(offset, base) "%%nacl:" #offset "(%%r15,%q" #base ")" -#define MEMLEA(offset, base) #offset "(%q" #base ")" -#define MEMLEA3(offset, index, scale) #offset "(,%q" #index "," #scale ")" -#define MEMLEA4(offset, base, index, scale) \ - #offset "(%q" #base ",%q" #index "," #scale ")" -#define MEMMOVESTRING(s, d) "%%nacl:(%q" #s "),%%nacl:(%q" #d "), %%r15" -#define MEMSTORESTRING(reg, d) "%%" #reg ",%%nacl:(%q" #d "), %%r15" -#define MEMOPREG(opcode, offset, base, index, scale, reg) \ - BUNDLELOCK \ - "lea " #offset "(%q" #base ",%q" #index "," #scale "),%%r14d\n" #opcode \ - " (%%r15,%%r14),%%" #reg "\n" BUNDLEUNLOCK -#define MEMOPMEM(opcode, reg, offset, base, index, scale) \ - BUNDLELOCK \ - "lea " #offset "(%q" #base ",%q" #index "," #scale "),%%r14d\n" #opcode \ - " %%" #reg ",(%%r15,%%r14)\n" BUNDLEUNLOCK -#define MEMOPARG(opcode, offset, base, index, scale, arg) \ - BUNDLELOCK \ - "lea " #offset "(%q" #base ",%q" #index "," #scale "),%%r14d\n" #opcode \ - " (%%r15,%%r14),%" #arg "\n" BUNDLEUNLOCK -#define VMEMOPREG(opcode, offset, base, index, scale, reg1, reg2) \ - BUNDLELOCK \ - "lea " #offset "(%q" #base ",%q" #index "," #scale "),%%r14d\n" #opcode \ - " (%%r15,%%r14),%%" #reg1 ",%%" #reg2 "\n" BUNDLEUNLOCK -#define VEXTOPMEM(op, sel, reg, offset, base, index, scale) \ - BUNDLELOCK \ - "lea " #offset "(%q" #base ",%q" #index "," #scale "),%%r14d\n" #op \ - " $" #sel ",%%" #reg ",(%%r15,%%r14)\n" BUNDLEUNLOCK -#else // defined(__native_client__) && defined(__x86_64__) -#define NACL_R14 -#define BUNDLEALIGN -#define MEMACCESS(base) "(%" #base ")" -#define MEMACCESS2(offset, base) #offset "(%" #base ")" -#define MEMLEA(offset, base) #offset "(%" #base ")" -#define MEMLEA3(offset, index, scale) #offset "(,%" #index "," #scale ")" -#define MEMLEA4(offset, base, index, scale) \ - #offset "(%" #base ",%" #index "," #scale ")" -#define MEMMOVESTRING(s, d) -#define MEMSTORESTRING(reg, d) -#define MEMOPREG(opcode, offset, base, index, scale, reg) \ - #opcode " " #offset "(%" #base ",%" #index "," #scale "),%%" #reg "\n" -#define MEMOPMEM(opcode, reg, offset, base, index, scale) \ - #opcode " %%" #reg "," #offset "(%" #base ",%" #index "," #scale ")\n" -#define MEMOPARG(opcode, offset, base, index, scale, arg) \ - #opcode " " #offset "(%" #base ",%" #index "," #scale "),%" #arg "\n" -#define VMEMOPREG(opcode, offset, base, index, scale, reg1, reg2) \ - #opcode " " #offset "(%" #base ",%" #index "," #scale "),%%" #reg1 \ - ",%%" #reg2 "\n" -#define VEXTOPMEM(op, sel, reg, offset, base, index, scale) \ - #op " $" #sel ",%%" #reg "," #offset "(%" #base ",%" #index "," #scale ")\n" -#endif // defined(__native_client__) && defined(__x86_64__) - -#if defined(__arm__) || defined(__aarch64__) -#undef MEMACCESS -#if defined(__native_client__) -#define MEMACCESS(base) ".p2align 3\nbic %" #base ", #0xc0000000\n" -#else -#define MEMACCESS(base) -#endif -#endif - -void I444ToARGBRow_NEON(const uint8* src_y, - const uint8* src_u, - const uint8* src_v, - uint8* dst_argb, - const struct YuvConstants* yuvconstants, - int width); -void I422ToARGBRow_NEON(const uint8* src_y, - const uint8* src_u, - const uint8* src_v, - uint8* dst_argb, - const struct YuvConstants* yuvconstants, - int width); -void I422AlphaToARGBRow_NEON(const uint8* y_buf, - const uint8* u_buf, - const uint8* v_buf, - const uint8* a_buf, - uint8* dst_argb, - const struct YuvConstants* yuvconstants, - int width); -void I422ToARGBRow_NEON(const uint8* src_y, - const uint8* src_u, - const uint8* src_v, - uint8* dst_argb, - const struct YuvConstants* yuvconstants, - int width); -void I422ToRGBARow_NEON(const uint8* src_y, - const uint8* src_u, - const uint8* src_v, - uint8* dst_rgba, - const struct YuvConstants* yuvconstants, - int width); -void I422ToRGB24Row_NEON(const uint8* src_y, - const uint8* src_u, - const uint8* src_v, - uint8* dst_rgb24, - const struct YuvConstants* yuvconstants, - int width); -void I422ToRGB565Row_NEON(const uint8* src_y, - const uint8* src_u, - const uint8* src_v, - uint8* dst_rgb565, - const struct YuvConstants* yuvconstants, - int width); -void I422ToARGB1555Row_NEON(const uint8* src_y, - const uint8* src_u, - const uint8* src_v, - uint8* dst_argb1555, - const struct YuvConstants* yuvconstants, - int width); -void I422ToARGB4444Row_NEON(const uint8* src_y, - const uint8* src_u, - const uint8* src_v, - uint8* dst_argb4444, - const struct YuvConstants* yuvconstants, - int width); -void NV12ToARGBRow_NEON(const uint8* src_y, - const uint8* src_uv, - uint8* dst_argb, - const struct YuvConstants* yuvconstants, - int width); -void NV12ToRGB565Row_NEON(const uint8* src_y, - const uint8* src_uv, - uint8* dst_rgb565, - const struct YuvConstants* yuvconstants, - int width); -void NV21ToARGBRow_NEON(const uint8* src_y, - const uint8* src_vu, - uint8* dst_argb, - const struct YuvConstants* yuvconstants, - int width); -void YUY2ToARGBRow_NEON(const uint8* src_yuy2, - uint8* dst_argb, - const struct YuvConstants* yuvconstants, - int width); -void UYVYToARGBRow_NEON(const uint8* src_uyvy, - uint8* dst_argb, - const struct YuvConstants* yuvconstants, - int width); -void I422ToARGBRow_MSA(const uint8* src_y, - const uint8* src_u, - const uint8* src_v, - uint8* dst_argb, - const struct YuvConstants* yuvconstants, - int width); -void I422ToRGBARow_MSA(const uint8* src_y, - const uint8* src_u, - const uint8* src_v, - uint8* dst_rgba, - const struct YuvConstants* yuvconstants, - int width); -void I422AlphaToARGBRow_MSA(const uint8* y_buf, - const uint8* u_buf, - const uint8* v_buf, - const uint8* a_buf, - uint8* dst_argb, - const struct YuvConstants* yuvconstants, - int width); -void I422ToRGB24Row_MSA(const uint8* src_y, - const uint8* src_u, - const uint8* src_v, - uint8* dst_rgb24, - const struct YuvConstants* yuvconstants, - int width); -void I422ToRGB565Row_MSA(const uint8* src_y, - const uint8* src_u, - const uint8* src_v, - uint8* dst_rgb565, - const struct YuvConstants* yuvconstants, - int width); -void I422ToARGB4444Row_MSA(const uint8* src_y, - const uint8* src_u, - const uint8* src_v, - uint8* dst_argb4444, - const struct YuvConstants* yuvconstants, - int width); -void I422ToARGB1555Row_MSA(const uint8* src_y, - const uint8* src_u, - const uint8* src_v, - uint8* dst_argb1555, - const struct YuvConstants* yuvconstants, - int width); - -void ARGBToYRow_AVX2(const uint8* src_argb, uint8* dst_y, int width); -void ARGBToYRow_Any_AVX2(const uint8* src_argb, uint8* dst_y, int width); -void ARGBToYRow_SSSE3(const uint8* src_argb, uint8* dst_y, int width); -void ARGBToYJRow_AVX2(const uint8* src_argb, uint8* dst_y, int width); -void ARGBToYJRow_Any_AVX2(const uint8* src_argb, uint8* dst_y, int width); -void ARGBToYJRow_SSSE3(const uint8* src_argb, uint8* dst_y, int width); -void BGRAToYRow_SSSE3(const uint8* src_bgra, uint8* dst_y, int width); -void ABGRToYRow_SSSE3(const uint8* src_abgr, uint8* dst_y, int width); -void RGBAToYRow_SSSE3(const uint8* src_rgba, uint8* dst_y, int width); -void RGB24ToYRow_SSSE3(const uint8* src_rgb24, uint8* dst_y, int width); -void RAWToYRow_SSSE3(const uint8* src_raw, uint8* dst_y, int width); -void ARGBToYRow_NEON(const uint8* src_argb, uint8* dst_y, int width); -void ARGBToYJRow_NEON(const uint8* src_argb, uint8* dst_y, int width); -void ARGBToYRow_MSA(const uint8* src_argb, uint8* dst_y, int width); -void ARGBToUV444Row_NEON(const uint8* src_argb, - uint8* dst_u, - uint8* dst_v, - int width); -void ARGBToUVRow_NEON(const uint8* src_argb, - int src_stride_argb, - uint8* dst_u, - uint8* dst_v, - int width); -void ARGBToUV444Row_MSA(const uint8* src_argb, - uint8* dst_u, - uint8* dst_v, - int width); -void ARGBToUVRow_MSA(const uint8* src_argb, - int src_stride_argb, - uint8* dst_u, - uint8* dst_v, - int width); -void ARGBToUVJRow_NEON(const uint8* src_argb, - int src_stride_argb, - uint8* dst_u, - uint8* dst_v, - int width); -void BGRAToUVRow_NEON(const uint8* src_bgra, - int src_stride_bgra, - uint8* dst_u, - uint8* dst_v, - int width); -void ABGRToUVRow_NEON(const uint8* src_abgr, - int src_stride_abgr, - uint8* dst_u, - uint8* dst_v, - int width); -void RGBAToUVRow_NEON(const uint8* src_rgba, - int src_stride_rgba, - uint8* dst_u, - uint8* dst_v, - int width); -void RGB24ToUVRow_NEON(const uint8* src_rgb24, - int src_stride_rgb24, - uint8* dst_u, - uint8* dst_v, - int width); -void RAWToUVRow_NEON(const uint8* src_raw, - int src_stride_raw, - uint8* dst_u, - uint8* dst_v, - int width); -void RGB565ToUVRow_NEON(const uint8* src_rgb565, - int src_stride_rgb565, - uint8* dst_u, - uint8* dst_v, - int width); -void ARGB1555ToUVRow_NEON(const uint8* src_argb1555, - int src_stride_argb1555, - uint8* dst_u, - uint8* dst_v, - int width); -void ARGB4444ToUVRow_NEON(const uint8* src_argb4444, - int src_stride_argb4444, - uint8* dst_u, - uint8* dst_v, - int width); -void BGRAToYRow_NEON(const uint8* src_bgra, uint8* dst_y, int width); -void ABGRToYRow_NEON(const uint8* src_abgr, uint8* dst_y, int width); -void RGBAToYRow_NEON(const uint8* src_rgba, uint8* dst_y, int width); -void RGB24ToYRow_NEON(const uint8* src_rgb24, uint8* dst_y, int width); -void RAWToYRow_NEON(const uint8* src_raw, uint8* dst_y, int width); -void RGB565ToYRow_NEON(const uint8* src_rgb565, uint8* dst_y, int width); -void ARGB1555ToYRow_NEON(const uint8* src_argb1555, uint8* dst_y, int width); -void ARGB4444ToYRow_NEON(const uint8* src_argb4444, uint8* dst_y, int width); -void ARGBToYRow_C(const uint8* src_argb, uint8* dst_y, int width); -void ARGBToYJRow_C(const uint8* src_argb, uint8* dst_y, int width); -void BGRAToYRow_C(const uint8* src_bgra, uint8* dst_y, int width); -void ABGRToYRow_C(const uint8* src_abgr, uint8* dst_y, int width); -void RGBAToYRow_C(const uint8* src_rgba, uint8* dst_y, int width); -void RGB24ToYRow_C(const uint8* src_rgb24, uint8* dst_y, int width); -void RAWToYRow_C(const uint8* src_raw, uint8* dst_y, int width); -void RGB565ToYRow_C(const uint8* src_rgb565, uint8* dst_y, int width); -void ARGB1555ToYRow_C(const uint8* src_argb1555, uint8* dst_y, int width); -void ARGB4444ToYRow_C(const uint8* src_argb4444, uint8* dst_y, int width); -void ARGBToYRow_Any_SSSE3(const uint8* src_argb, uint8* dst_y, int width); -void ARGBToYJRow_Any_SSSE3(const uint8* src_argb, uint8* dst_y, int width); -void BGRAToYRow_Any_SSSE3(const uint8* src_bgra, uint8* dst_y, int width); -void ABGRToYRow_Any_SSSE3(const uint8* src_abgr, uint8* dst_y, int width); -void RGBAToYRow_Any_SSSE3(const uint8* src_rgba, uint8* dst_y, int width); -void RGB24ToYRow_Any_SSSE3(const uint8* src_rgb24, uint8* dst_y, int width); -void RAWToYRow_Any_SSSE3(const uint8* src_raw, uint8* dst_y, int width); -void ARGBToYRow_Any_NEON(const uint8* src_argb, uint8* dst_y, int width); -void ARGBToYJRow_Any_NEON(const uint8* src_argb, uint8* dst_y, int width); -void BGRAToYRow_Any_NEON(const uint8* src_bgra, uint8* dst_y, int width); -void ABGRToYRow_Any_NEON(const uint8* src_abgr, uint8* dst_y, int width); -void RGBAToYRow_Any_NEON(const uint8* src_rgba, uint8* dst_y, int width); -void RGB24ToYRow_Any_NEON(const uint8* src_rgb24, uint8* dst_y, int width); -void RAWToYRow_Any_NEON(const uint8* src_raw, uint8* dst_y, int width); -void RGB565ToYRow_Any_NEON(const uint8* src_rgb565, uint8* dst_y, int width); -void ARGB1555ToYRow_Any_NEON(const uint8* src_argb1555, - uint8* dst_y, - int width); -void ARGB4444ToYRow_Any_NEON(const uint8* src_argb4444, - uint8* dst_y, - int width); -void ARGBToYRow_Any_MSA(const uint8* src_argb, uint8* dst_y, int width); - -void ARGBToUVRow_AVX2(const uint8* src_argb, - int src_stride_argb, - uint8* dst_u, - uint8* dst_v, - int width); -void ARGBToUVJRow_AVX2(const uint8* src_argb, - int src_stride_argb, - uint8* dst_u, - uint8* dst_v, - int width); -void ARGBToUVRow_SSSE3(const uint8* src_argb, - int src_stride_argb, - uint8* dst_u, - uint8* dst_v, - int width); -void ARGBToUVJRow_SSSE3(const uint8* src_argb, - int src_stride_argb, - uint8* dst_u, - uint8* dst_v, - int width); -void BGRAToUVRow_SSSE3(const uint8* src_bgra, - int src_stride_bgra, - uint8* dst_u, - uint8* dst_v, - int width); -void ABGRToUVRow_SSSE3(const uint8* src_abgr, - int src_stride_abgr, - uint8* dst_u, - uint8* dst_v, - int width); -void RGBAToUVRow_SSSE3(const uint8* src_rgba, - int src_stride_rgba, - uint8* dst_u, - uint8* dst_v, - int width); -void ARGBToUVRow_Any_AVX2(const uint8* src_argb, - int src_stride_argb, - uint8* dst_u, - uint8* dst_v, - int width); -void ARGBToUVJRow_Any_AVX2(const uint8* src_argb, - int src_stride_argb, - uint8* dst_u, - uint8* dst_v, - int width); -void ARGBToUVRow_Any_SSSE3(const uint8* src_argb, - int src_stride_argb, - uint8* dst_u, - uint8* dst_v, - int width); -void ARGBToUVJRow_Any_SSSE3(const uint8* src_argb, - int src_stride_argb, - uint8* dst_u, - uint8* dst_v, - int width); -void BGRAToUVRow_Any_SSSE3(const uint8* src_bgra, - int src_stride_bgra, - uint8* dst_u, - uint8* dst_v, - int width); -void ABGRToUVRow_Any_SSSE3(const uint8* src_abgr, - int src_stride_abgr, - uint8* dst_u, - uint8* dst_v, - int width); -void RGBAToUVRow_Any_SSSE3(const uint8* src_rgba, - int src_stride_rgba, - uint8* dst_u, - uint8* dst_v, - int width); -void ARGBToUV444Row_Any_NEON(const uint8* src_argb, - uint8* dst_u, - uint8* dst_v, - int width); -void ARGBToUVRow_Any_NEON(const uint8* src_argb, - int src_stride_argb, - uint8* dst_u, - uint8* dst_v, - int width); -void ARGBToUV444Row_Any_MSA(const uint8* src_argb, - uint8* dst_u, - uint8* dst_v, - int width); -void ARGBToUVRow_Any_MSA(const uint8* src_argb, - int src_stride_argb, - uint8* dst_u, - uint8* dst_v, - int width); -void ARGBToUVJRow_Any_NEON(const uint8* src_argb, - int src_stride_argb, - uint8* dst_u, - uint8* dst_v, - int width); -void BGRAToUVRow_Any_NEON(const uint8* src_bgra, - int src_stride_bgra, - uint8* dst_u, - uint8* dst_v, - int width); -void ABGRToUVRow_Any_NEON(const uint8* src_abgr, - int src_stride_abgr, - uint8* dst_u, - uint8* dst_v, - int width); -void RGBAToUVRow_Any_NEON(const uint8* src_rgba, - int src_stride_rgba, - uint8* dst_u, - uint8* dst_v, - int width); -void RGB24ToUVRow_Any_NEON(const uint8* src_rgb24, - int src_stride_rgb24, - uint8* dst_u, - uint8* dst_v, - int width); -void RAWToUVRow_Any_NEON(const uint8* src_raw, - int src_stride_raw, - uint8* dst_u, - uint8* dst_v, - int width); -void RGB565ToUVRow_Any_NEON(const uint8* src_rgb565, - int src_stride_rgb565, - uint8* dst_u, - uint8* dst_v, - int width); -void ARGB1555ToUVRow_Any_NEON(const uint8* src_argb1555, - int src_stride_argb1555, - uint8* dst_u, - uint8* dst_v, - int width); -void ARGB4444ToUVRow_Any_NEON(const uint8* src_argb4444, - int src_stride_argb4444, - uint8* dst_u, - uint8* dst_v, - int width); -void ARGBToUVRow_C(const uint8* src_argb, - int src_stride_argb, - uint8* dst_u, - uint8* dst_v, - int width); -void ARGBToUVJRow_C(const uint8* src_argb, - int src_stride_argb, - uint8* dst_u, - uint8* dst_v, - int width); -void BGRAToUVRow_C(const uint8* src_bgra, - int src_stride_bgra, - uint8* dst_u, - uint8* dst_v, - int width); -void ABGRToUVRow_C(const uint8* src_abgr, - int src_stride_abgr, - uint8* dst_u, - uint8* dst_v, - int width); -void RGBAToUVRow_C(const uint8* src_rgba, - int src_stride_rgba, - uint8* dst_u, - uint8* dst_v, - int width); -void RGB24ToUVRow_C(const uint8* src_rgb24, - int src_stride_rgb24, - uint8* dst_u, - uint8* dst_v, - int width); -void RAWToUVRow_C(const uint8* src_raw, - int src_stride_raw, - uint8* dst_u, - uint8* dst_v, - int width); -void RGB565ToUVRow_C(const uint8* src_rgb565, - int src_stride_rgb565, - uint8* dst_u, - uint8* dst_v, - int width); -void ARGB1555ToUVRow_C(const uint8* src_argb1555, - int src_stride_argb1555, - uint8* dst_u, - uint8* dst_v, - int width); -void ARGB4444ToUVRow_C(const uint8* src_argb4444, - int src_stride_argb4444, - uint8* dst_u, - uint8* dst_v, - int width); - -void ARGBToUV444Row_SSSE3(const uint8* src_argb, - uint8* dst_u, - uint8* dst_v, - int width); -void ARGBToUV444Row_Any_SSSE3(const uint8* src_argb, - uint8* dst_u, - uint8* dst_v, - int width); - -void ARGBToUV444Row_C(const uint8* src_argb, - uint8* dst_u, - uint8* dst_v, - int width); - -void MirrorRow_AVX2(const uint8* src, uint8* dst, int width); -void MirrorRow_SSSE3(const uint8* src, uint8* dst, int width); -void MirrorRow_NEON(const uint8* src, uint8* dst, int width); -void MirrorRow_DSPR2(const uint8* src, uint8* dst, int width); -void MirrorRow_MSA(const uint8* src, uint8* dst, int width); -void MirrorRow_C(const uint8* src, uint8* dst, int width); -void MirrorRow_Any_AVX2(const uint8* src, uint8* dst, int width); -void MirrorRow_Any_SSSE3(const uint8* src, uint8* dst, int width); -void MirrorRow_Any_SSE2(const uint8* src, uint8* dst, int width); -void MirrorRow_Any_NEON(const uint8* src, uint8* dst, int width); -void MirrorRow_Any_MSA(const uint8* src, uint8* dst, int width); - -void MirrorUVRow_SSSE3(const uint8* src_uv, - uint8* dst_u, - uint8* dst_v, - int width); -void MirrorUVRow_NEON(const uint8* src_uv, - uint8* dst_u, - uint8* dst_v, - int width); -void MirrorUVRow_DSPR2(const uint8* src_uv, - uint8* dst_u, - uint8* dst_v, - int width); -void MirrorUVRow_C(const uint8* src_uv, uint8* dst_u, uint8* dst_v, int width); - -void ARGBMirrorRow_AVX2(const uint8* src, uint8* dst, int width); -void ARGBMirrorRow_SSE2(const uint8* src, uint8* dst, int width); -void ARGBMirrorRow_NEON(const uint8* src, uint8* dst, int width); -void ARGBMirrorRow_MSA(const uint8* src, uint8* dst, int width); -void ARGBMirrorRow_C(const uint8* src, uint8* dst, int width); -void ARGBMirrorRow_Any_AVX2(const uint8* src, uint8* dst, int width); -void ARGBMirrorRow_Any_SSE2(const uint8* src, uint8* dst, int width); -void ARGBMirrorRow_Any_NEON(const uint8* src, uint8* dst, int width); -void ARGBMirrorRow_Any_MSA(const uint8* src, uint8* dst, int width); - -void SplitUVRow_C(const uint8* src_uv, uint8* dst_u, uint8* dst_v, int width); -void SplitUVRow_SSE2(const uint8* src_uv, - uint8* dst_u, - uint8* dst_v, - int width); -void SplitUVRow_AVX2(const uint8* src_uv, - uint8* dst_u, - uint8* dst_v, - int width); -void SplitUVRow_NEON(const uint8* src_uv, - uint8* dst_u, - uint8* dst_v, - int width); -void SplitUVRow_DSPR2(const uint8* src_uv, - uint8* dst_u, - uint8* dst_v, - int width); -void SplitUVRow_Any_SSE2(const uint8* src_uv, - uint8* dst_u, - uint8* dst_v, - int width); -void SplitUVRow_Any_AVX2(const uint8* src_uv, - uint8* dst_u, - uint8* dst_v, - int width); -void SplitUVRow_Any_NEON(const uint8* src_uv, - uint8* dst_u, - uint8* dst_v, - int width); -void SplitUVRow_Any_DSPR2(const uint8* src_uv, - uint8* dst_u, - uint8* dst_v, - int width); - -void MergeUVRow_C(const uint8* src_u, - const uint8* src_v, - uint8* dst_uv, - int width); -void MergeUVRow_SSE2(const uint8* src_u, - const uint8* src_v, - uint8* dst_uv, - int width); -void MergeUVRow_AVX2(const uint8* src_u, - const uint8* src_v, - uint8* dst_uv, - int width); -void MergeUVRow_NEON(const uint8* src_u, - const uint8* src_v, - uint8* dst_uv, - int width); -void MergeUVRow_Any_SSE2(const uint8* src_u, - const uint8* src_v, - uint8* dst_uv, - int width); -void MergeUVRow_Any_AVX2(const uint8* src_u, - const uint8* src_v, - uint8* dst_uv, - int width); -void MergeUVRow_Any_NEON(const uint8* src_u, - const uint8* src_v, - uint8* dst_uv, - int width); - -void CopyRow_SSE2(const uint8* src, uint8* dst, int count); -void CopyRow_AVX(const uint8* src, uint8* dst, int count); -void CopyRow_ERMS(const uint8* src, uint8* dst, int count); -void CopyRow_NEON(const uint8* src, uint8* dst, int count); -void CopyRow_MIPS(const uint8* src, uint8* dst, int count); -void CopyRow_C(const uint8* src, uint8* dst, int count); -void CopyRow_Any_SSE2(const uint8* src, uint8* dst, int count); -void CopyRow_Any_AVX(const uint8* src, uint8* dst, int count); -void CopyRow_Any_NEON(const uint8* src, uint8* dst, int count); - -void CopyRow_16_C(const uint16* src, uint16* dst, int count); - -void ARGBCopyAlphaRow_C(const uint8* src_argb, uint8* dst_argb, int width); -void ARGBCopyAlphaRow_SSE2(const uint8* src_argb, uint8* dst_argb, int width); -void ARGBCopyAlphaRow_AVX2(const uint8* src_argb, uint8* dst_argb, int width); -void ARGBCopyAlphaRow_Any_SSE2(const uint8* src_argb, - uint8* dst_argb, - int width); -void ARGBCopyAlphaRow_Any_AVX2(const uint8* src_argb, - uint8* dst_argb, - int width); - -void ARGBExtractAlphaRow_C(const uint8* src_argb, uint8* dst_a, int width); -void ARGBExtractAlphaRow_SSE2(const uint8* src_argb, uint8* dst_a, int width); -void ARGBExtractAlphaRow_AVX2(const uint8* src_argb, uint8* dst_a, int width); -void ARGBExtractAlphaRow_NEON(const uint8* src_argb, uint8* dst_a, int width); -void ARGBExtractAlphaRow_Any_SSE2(const uint8* src_argb, - uint8* dst_a, - int width); -void ARGBExtractAlphaRow_Any_AVX2(const uint8* src_argb, - uint8* dst_a, - int width); -void ARGBExtractAlphaRow_Any_NEON(const uint8* src_argb, - uint8* dst_a, - int width); - -void ARGBCopyYToAlphaRow_C(const uint8* src_y, uint8* dst_argb, int width); -void ARGBCopyYToAlphaRow_SSE2(const uint8* src_y, uint8* dst_argb, int width); -void ARGBCopyYToAlphaRow_AVX2(const uint8* src_y, uint8* dst_argb, int width); -void ARGBCopyYToAlphaRow_Any_SSE2(const uint8* src_y, - uint8* dst_argb, - int width); -void ARGBCopyYToAlphaRow_Any_AVX2(const uint8* src_y, - uint8* dst_argb, - int width); - -void SetRow_C(uint8* dst, uint8 v8, int count); -void SetRow_X86(uint8* dst, uint8 v8, int count); -void SetRow_ERMS(uint8* dst, uint8 v8, int count); -void SetRow_NEON(uint8* dst, uint8 v8, int count); -void SetRow_Any_X86(uint8* dst, uint8 v8, int count); -void SetRow_Any_NEON(uint8* dst, uint8 v8, int count); - -void ARGBSetRow_C(uint8* dst_argb, uint32 v32, int count); -void ARGBSetRow_X86(uint8* dst_argb, uint32 v32, int count); -void ARGBSetRow_NEON(uint8* dst_argb, uint32 v32, int count); -void ARGBSetRow_Any_NEON(uint8* dst_argb, uint32 v32, int count); - -// ARGBShufflers for BGRAToARGB etc. -void ARGBShuffleRow_C(const uint8* src_argb, - uint8* dst_argb, - const uint8* shuffler, - int width); -void ARGBShuffleRow_SSE2(const uint8* src_argb, - uint8* dst_argb, - const uint8* shuffler, - int width); -void ARGBShuffleRow_SSSE3(const uint8* src_argb, - uint8* dst_argb, - const uint8* shuffler, - int width); -void ARGBShuffleRow_AVX2(const uint8* src_argb, - uint8* dst_argb, - const uint8* shuffler, - int width); -void ARGBShuffleRow_NEON(const uint8* src_argb, - uint8* dst_argb, - const uint8* shuffler, - int width); -void ARGBShuffleRow_Any_SSE2(const uint8* src_argb, - uint8* dst_argb, - const uint8* shuffler, - int width); -void ARGBShuffleRow_Any_SSSE3(const uint8* src_argb, - uint8* dst_argb, - const uint8* shuffler, - int width); -void ARGBShuffleRow_Any_AVX2(const uint8* src_argb, - uint8* dst_argb, - const uint8* shuffler, - int width); -void ARGBShuffleRow_Any_NEON(const uint8* src_argb, - uint8* dst_argb, - const uint8* shuffler, - int width); - -void RGB24ToARGBRow_SSSE3(const uint8* src_rgb24, uint8* dst_argb, int width); -void RAWToARGBRow_SSSE3(const uint8* src_raw, uint8* dst_argb, int width); -void RAWToRGB24Row_SSSE3(const uint8* src_raw, uint8* dst_rgb24, int width); -void RGB565ToARGBRow_SSE2(const uint8* src_rgb565, uint8* dst_argb, int width); -void ARGB1555ToARGBRow_SSE2(const uint8* src_argb1555, - uint8* dst_argb, - int width); -void ARGB4444ToARGBRow_SSE2(const uint8* src_argb4444, - uint8* dst_argb, - int width); -void RGB565ToARGBRow_AVX2(const uint8* src_rgb565, uint8* dst_argb, int width); -void ARGB1555ToARGBRow_AVX2(const uint8* src_argb1555, - uint8* dst_argb, - int width); -void ARGB4444ToARGBRow_AVX2(const uint8* src_argb4444, - uint8* dst_argb, - int width); - -void RGB24ToARGBRow_NEON(const uint8* src_rgb24, uint8* dst_argb, int width); -void RAWToARGBRow_NEON(const uint8* src_raw, uint8* dst_argb, int width); -void RAWToRGB24Row_NEON(const uint8* src_raw, uint8* dst_rgb24, int width); -void RGB565ToARGBRow_NEON(const uint8* src_rgb565, uint8* dst_argb, int width); -void ARGB1555ToARGBRow_NEON(const uint8* src_argb1555, - uint8* dst_argb, - int width); -void ARGB4444ToARGBRow_NEON(const uint8* src_argb4444, - uint8* dst_argb, - int width); -void ARGB4444ToARGBRow_MSA(const uint8* src_argb4444, - uint8* dst_argb, - int width); -void RGB24ToARGBRow_C(const uint8* src_rgb24, uint8* dst_argb, int width); -void RAWToARGBRow_C(const uint8* src_raw, uint8* dst_argb, int width); -void RAWToRGB24Row_C(const uint8* src_raw, uint8* dst_rgb24, int width); -void RGB565ToARGBRow_C(const uint8* src_rgb, uint8* dst_argb, int width); -void ARGB1555ToARGBRow_C(const uint8* src_argb, uint8* dst_argb, int width); -void ARGB4444ToARGBRow_C(const uint8* src_argb, uint8* dst_argb, int width); -void RGB24ToARGBRow_Any_SSSE3(const uint8* src_rgb24, - uint8* dst_argb, - int width); -void RAWToARGBRow_Any_SSSE3(const uint8* src_raw, uint8* dst_argb, int width); -void RAWToRGB24Row_Any_SSSE3(const uint8* src_raw, uint8* dst_rgb24, int width); - -void RGB565ToARGBRow_Any_SSE2(const uint8* src_rgb565, - uint8* dst_argb, - int width); -void ARGB1555ToARGBRow_Any_SSE2(const uint8* src_argb1555, - uint8* dst_argb, - int width); -void ARGB4444ToARGBRow_Any_SSE2(const uint8* src_argb4444, - uint8* dst_argb, - int width); -void RGB565ToARGBRow_Any_AVX2(const uint8* src_rgb565, - uint8* dst_argb, - int width); -void ARGB1555ToARGBRow_Any_AVX2(const uint8* src_argb1555, - uint8* dst_argb, - int width); -void ARGB4444ToARGBRow_Any_AVX2(const uint8* src_argb4444, - uint8* dst_argb, - int width); - -void RGB24ToARGBRow_Any_NEON(const uint8* src_rgb24, - uint8* dst_argb, - int width); -void RAWToARGBRow_Any_NEON(const uint8* src_raw, uint8* dst_argb, int width); -void RAWToRGB24Row_Any_NEON(const uint8* src_raw, uint8* dst_rgb24, int width); -void RGB565ToARGBRow_Any_NEON(const uint8* src_rgb565, - uint8* dst_argb, - int width); -void ARGB1555ToARGBRow_Any_NEON(const uint8* src_argb1555, - uint8* dst_argb, - int width); -void ARGB4444ToARGBRow_Any_NEON(const uint8* src_argb4444, - uint8* dst_argb, - int width); -void ARGB4444ToARGBRow_Any_MSA(const uint8* src_argb4444, - uint8* dst_argb, - int width); - -void ARGBToRGB24Row_SSSE3(const uint8* src_argb, uint8* dst_rgb, int width); -void ARGBToRAWRow_SSSE3(const uint8* src_argb, uint8* dst_rgb, int width); -void ARGBToRGB565Row_SSE2(const uint8* src_argb, uint8* dst_rgb, int width); -void ARGBToARGB1555Row_SSE2(const uint8* src_argb, uint8* dst_rgb, int width); -void ARGBToARGB4444Row_SSE2(const uint8* src_argb, uint8* dst_rgb, int width); - -void ARGBToRGB565DitherRow_C(const uint8* src_argb, - uint8* dst_rgb, - const uint32 dither4, - int width); -void ARGBToRGB565DitherRow_SSE2(const uint8* src_argb, - uint8* dst_rgb, - const uint32 dither4, - int width); -void ARGBToRGB565DitherRow_AVX2(const uint8* src_argb, - uint8* dst_rgb, - const uint32 dither4, - int width); - -void ARGBToRGB565Row_AVX2(const uint8* src_argb, uint8* dst_rgb, int width); -void ARGBToARGB1555Row_AVX2(const uint8* src_argb, uint8* dst_rgb, int width); -void ARGBToARGB4444Row_AVX2(const uint8* src_argb, uint8* dst_rgb, int width); - -void ARGBToRGB24Row_NEON(const uint8* src_argb, uint8* dst_rgb, int width); -void ARGBToRAWRow_NEON(const uint8* src_argb, uint8* dst_rgb, int width); -void ARGBToRGB565Row_NEON(const uint8* src_argb, uint8* dst_rgb, int width); -void ARGBToARGB1555Row_NEON(const uint8* src_argb, uint8* dst_rgb, int width); -void ARGBToARGB4444Row_NEON(const uint8* src_argb, uint8* dst_rgb, int width); -void ARGBToRGB565DitherRow_NEON(const uint8* src_argb, - uint8* dst_rgb, - const uint32 dither4, - int width); -void ARGBToRGB24Row_MSA(const uint8* src_argb, uint8* dst_rgb, int width); -void ARGBToRAWRow_MSA(const uint8* src_argb, uint8* dst_rgb, int width); -void ARGBToRGB565Row_MSA(const uint8* src_argb, uint8* dst_rgb, int width); -void ARGBToARGB1555Row_MSA(const uint8* src_argb, uint8* dst_rgb, int width); -void ARGBToARGB4444Row_MSA(const uint8* src_argb, uint8* dst_rgb, int width); - -void ARGBToRGBARow_C(const uint8* src_argb, uint8* dst_rgb, int width); -void ARGBToRGB24Row_C(const uint8* src_argb, uint8* dst_rgb, int width); -void ARGBToRAWRow_C(const uint8* src_argb, uint8* dst_rgb, int width); -void ARGBToRGB565Row_C(const uint8* src_argb, uint8* dst_rgb, int width); -void ARGBToARGB1555Row_C(const uint8* src_argb, uint8* dst_rgb, int width); -void ARGBToARGB4444Row_C(const uint8* src_argb, uint8* dst_rgb, int width); - -void J400ToARGBRow_SSE2(const uint8* src_y, uint8* dst_argb, int width); -void J400ToARGBRow_AVX2(const uint8* src_y, uint8* dst_argb, int width); -void J400ToARGBRow_NEON(const uint8* src_y, uint8* dst_argb, int width); -void J400ToARGBRow_C(const uint8* src_y, uint8* dst_argb, int width); -void J400ToARGBRow_Any_SSE2(const uint8* src_y, uint8* dst_argb, int width); -void J400ToARGBRow_Any_AVX2(const uint8* src_y, uint8* dst_argb, int width); -void J400ToARGBRow_Any_NEON(const uint8* src_y, uint8* dst_argb, int width); - -void I444ToARGBRow_C(const uint8* src_y, - const uint8* src_u, - const uint8* src_v, - uint8* dst_argb, - const struct YuvConstants* yuvconstants, - int width); -void I422ToARGBRow_C(const uint8* src_y, - const uint8* src_u, - const uint8* src_v, - uint8* dst_argb, - const struct YuvConstants* yuvconstants, - int width); -void I422ToARGBRow_C(const uint8* src_y, - const uint8* src_u, - const uint8* src_v, - uint8* dst_argb, - const struct YuvConstants* yuvconstants, - int width); -void I422AlphaToARGBRow_C(const uint8* y_buf, - const uint8* u_buf, - const uint8* v_buf, - const uint8* a_buf, - uint8* dst_argb, - const struct YuvConstants* yuvconstants, - int width); -void NV12ToARGBRow_C(const uint8* src_y, - const uint8* src_uv, - uint8* dst_argb, - const struct YuvConstants* yuvconstants, - int width); -void NV12ToRGB565Row_C(const uint8* src_y, - const uint8* src_uv, - uint8* dst_argb, - const struct YuvConstants* yuvconstants, - int width); -void NV21ToARGBRow_C(const uint8* src_y, - const uint8* src_uv, - uint8* dst_argb, - const struct YuvConstants* yuvconstants, - int width); -void YUY2ToARGBRow_C(const uint8* src_yuy2, - uint8* dst_argb, - const struct YuvConstants* yuvconstants, - int width); -void UYVYToARGBRow_C(const uint8* src_uyvy, - uint8* dst_argb, - const struct YuvConstants* yuvconstants, - int width); -void I422ToRGBARow_C(const uint8* src_y, - const uint8* src_u, - const uint8* src_v, - uint8* dst_rgba, - const struct YuvConstants* yuvconstants, - int width); -void I422ToRGB24Row_C(const uint8* src_y, - const uint8* src_u, - const uint8* src_v, - uint8* dst_rgb24, - const struct YuvConstants* yuvconstants, - int width); -void I422ToARGB4444Row_C(const uint8* src_y, - const uint8* src_u, - const uint8* src_v, - uint8* dst_argb4444, - const struct YuvConstants* yuvconstants, - int width); -void I422ToARGB1555Row_C(const uint8* src_y, - const uint8* src_u, - const uint8* src_v, - uint8* dst_argb4444, - const struct YuvConstants* yuvconstants, - int width); -void I422ToRGB565Row_C(const uint8* src_y, - const uint8* src_u, - const uint8* src_v, - uint8* dst_rgb565, - const struct YuvConstants* yuvconstants, - int width); -void I422ToARGBRow_AVX2(const uint8* src_y, - const uint8* src_u, - const uint8* src_v, - uint8* dst_argb, - const struct YuvConstants* yuvconstants, - int width); -void I422ToARGBRow_AVX2(const uint8* src_y, - const uint8* src_u, - const uint8* src_v, - uint8* dst_argb, - const struct YuvConstants* yuvconstants, - int width); -void I422ToRGBARow_AVX2(const uint8* src_y, - const uint8* src_u, - const uint8* src_v, - uint8* dst_argb, - const struct YuvConstants* yuvconstants, - int width); -void I444ToARGBRow_SSSE3(const uint8* src_y, - const uint8* src_u, - const uint8* src_v, - uint8* dst_argb, - const struct YuvConstants* yuvconstants, - int width); -void I444ToARGBRow_AVX2(const uint8* src_y, - const uint8* src_u, - const uint8* src_v, - uint8* dst_argb, - const struct YuvConstants* yuvconstants, - int width); -void I444ToARGBRow_SSSE3(const uint8* src_y, - const uint8* src_u, - const uint8* src_v, - uint8* dst_argb, - const struct YuvConstants* yuvconstants, - int width); -void I444ToARGBRow_AVX2(const uint8* src_y, - const uint8* src_u, - const uint8* src_v, - uint8* dst_argb, - const struct YuvConstants* yuvconstants, - int width); -void I422ToARGBRow_SSSE3(const uint8* src_y, - const uint8* src_u, - const uint8* src_v, - uint8* dst_argb, - const struct YuvConstants* yuvconstants, - int width); -void I422AlphaToARGBRow_SSSE3(const uint8* y_buf, - const uint8* u_buf, - const uint8* v_buf, - const uint8* a_buf, - uint8* dst_argb, - const struct YuvConstants* yuvconstants, - int width); -void I422AlphaToARGBRow_AVX2(const uint8* y_buf, - const uint8* u_buf, - const uint8* v_buf, - const uint8* a_buf, - uint8* dst_argb, - const struct YuvConstants* yuvconstants, - int width); -void I422ToARGBRow_SSSE3(const uint8* src_y, - const uint8* src_u, - const uint8* src_v, - uint8* dst_argb, - const struct YuvConstants* yuvconstants, - int width); -void NV12ToARGBRow_SSSE3(const uint8* src_y, - const uint8* src_uv, - uint8* dst_argb, - const struct YuvConstants* yuvconstants, - int width); -void NV12ToARGBRow_AVX2(const uint8* src_y, - const uint8* src_uv, - uint8* dst_argb, - const struct YuvConstants* yuvconstants, - int width); -void NV12ToRGB565Row_SSSE3(const uint8* src_y, - const uint8* src_uv, - uint8* dst_argb, - const struct YuvConstants* yuvconstants, - int width); -void NV12ToRGB565Row_AVX2(const uint8* src_y, - const uint8* src_uv, - uint8* dst_argb, - const struct YuvConstants* yuvconstants, - int width); -void NV21ToARGBRow_SSSE3(const uint8* src_y, - const uint8* src_uv, - uint8* dst_argb, - const struct YuvConstants* yuvconstants, - int width); -void NV21ToARGBRow_AVX2(const uint8* src_y, - const uint8* src_uv, - uint8* dst_argb, - const struct YuvConstants* yuvconstants, - int width); -void YUY2ToARGBRow_SSSE3(const uint8* src_yuy2, - uint8* dst_argb, - const struct YuvConstants* yuvconstants, - int width); -void UYVYToARGBRow_SSSE3(const uint8* src_uyvy, - uint8* dst_argb, - const struct YuvConstants* yuvconstants, - int width); -void YUY2ToARGBRow_AVX2(const uint8* src_yuy2, - uint8* dst_argb, - const struct YuvConstants* yuvconstants, - int width); -void UYVYToARGBRow_AVX2(const uint8* src_uyvy, - uint8* dst_argb, - const struct YuvConstants* yuvconstants, - int width); -void I422ToRGBARow_SSSE3(const uint8* src_y, - const uint8* src_u, - const uint8* src_v, - uint8* dst_rgba, - const struct YuvConstants* yuvconstants, - int width); -void I422ToARGB4444Row_SSSE3(const uint8* src_y, - const uint8* src_u, - const uint8* src_v, - uint8* dst_argb, - const struct YuvConstants* yuvconstants, - int width); -void I422ToARGB4444Row_AVX2(const uint8* src_y, - const uint8* src_u, - const uint8* src_v, - uint8* dst_argb, - const struct YuvConstants* yuvconstants, - int width); -void I422ToARGB1555Row_SSSE3(const uint8* src_y, - const uint8* src_u, - const uint8* src_v, - uint8* dst_argb, - const struct YuvConstants* yuvconstants, - int width); -void I422ToARGB1555Row_AVX2(const uint8* src_y, - const uint8* src_u, - const uint8* src_v, - uint8* dst_argb, - const struct YuvConstants* yuvconstants, - int width); -void I422ToRGB565Row_SSSE3(const uint8* src_y, - const uint8* src_u, - const uint8* src_v, - uint8* dst_argb, - const struct YuvConstants* yuvconstants, - int width); -void I422ToRGB565Row_AVX2(const uint8* src_y, - const uint8* src_u, - const uint8* src_v, - uint8* dst_argb, - const struct YuvConstants* yuvconstants, - int width); -void I422ToRGB24Row_SSSE3(const uint8* src_y, - const uint8* src_u, - const uint8* src_v, - uint8* dst_rgb24, - const struct YuvConstants* yuvconstants, - int width); -void I422ToRGB24Row_AVX2(const uint8* src_y, - const uint8* src_u, - const uint8* src_v, - uint8* dst_rgb24, - const struct YuvConstants* yuvconstants, - int width); -void I422ToARGBRow_Any_AVX2(const uint8* src_y, - const uint8* src_u, - const uint8* src_v, - uint8* dst_argb, - const struct YuvConstants* yuvconstants, - int width); -void I422ToRGBARow_Any_AVX2(const uint8* src_y, - const uint8* src_u, - const uint8* src_v, - uint8* dst_argb, - const struct YuvConstants* yuvconstants, - int width); -void I444ToARGBRow_Any_SSSE3(const uint8* src_y, - const uint8* src_u, - const uint8* src_v, - uint8* dst_argb, - const struct YuvConstants* yuvconstants, - int width); -void I444ToARGBRow_Any_AVX2(const uint8* src_y, - const uint8* src_u, - const uint8* src_v, - uint8* dst_argb, - const struct YuvConstants* yuvconstants, - int width); -void I422ToARGBRow_Any_SSSE3(const uint8* src_y, - const uint8* src_u, - const uint8* src_v, - uint8* dst_argb, - const struct YuvConstants* yuvconstants, - int width); -void I422AlphaToARGBRow_Any_SSSE3(const uint8* y_buf, - const uint8* u_buf, - const uint8* v_buf, - const uint8* a_buf, - uint8* dst_argb, - const struct YuvConstants* yuvconstants, - int width); -void I422AlphaToARGBRow_Any_AVX2(const uint8* y_buf, - const uint8* u_buf, - const uint8* v_buf, - const uint8* a_buf, - uint8* dst_argb, - const struct YuvConstants* yuvconstants, - int width); -void NV12ToARGBRow_Any_SSSE3(const uint8* src_y, - const uint8* src_uv, - uint8* dst_argb, - const struct YuvConstants* yuvconstants, - int width); -void NV12ToARGBRow_Any_AVX2(const uint8* src_y, - const uint8* src_uv, - uint8* dst_argb, - const struct YuvConstants* yuvconstants, - int width); -void NV21ToARGBRow_Any_SSSE3(const uint8* src_y, - const uint8* src_vu, - uint8* dst_argb, - const struct YuvConstants* yuvconstants, - int width); -void NV21ToARGBRow_Any_AVX2(const uint8* src_y, - const uint8* src_vu, - uint8* dst_argb, - const struct YuvConstants* yuvconstants, - int width); -void NV12ToRGB565Row_Any_SSSE3(const uint8* src_y, - const uint8* src_uv, - uint8* dst_argb, - const struct YuvConstants* yuvconstants, - int width); -void NV12ToRGB565Row_Any_AVX2(const uint8* src_y, - const uint8* src_uv, - uint8* dst_argb, - const struct YuvConstants* yuvconstants, - int width); -void YUY2ToARGBRow_Any_SSSE3(const uint8* src_yuy2, - uint8* dst_argb, - const struct YuvConstants* yuvconstants, - int width); -void UYVYToARGBRow_Any_SSSE3(const uint8* src_uyvy, - uint8* dst_argb, - const struct YuvConstants* yuvconstants, - int width); -void YUY2ToARGBRow_Any_AVX2(const uint8* src_yuy2, - uint8* dst_argb, - const struct YuvConstants* yuvconstants, - int width); -void UYVYToARGBRow_Any_AVX2(const uint8* src_uyvy, - uint8* dst_argb, - const struct YuvConstants* yuvconstants, - int width); -void I422ToRGBARow_Any_SSSE3(const uint8* src_y, - const uint8* src_u, - const uint8* src_v, - uint8* dst_rgba, - const struct YuvConstants* yuvconstants, - int width); -void I422ToARGB4444Row_Any_SSSE3(const uint8* src_y, - const uint8* src_u, - const uint8* src_v, - uint8* dst_rgba, - const struct YuvConstants* yuvconstants, - int width); -void I422ToARGB4444Row_Any_AVX2(const uint8* src_y, - const uint8* src_u, - const uint8* src_v, - uint8* dst_rgba, - const struct YuvConstants* yuvconstants, - int width); -void I422ToARGB1555Row_Any_SSSE3(const uint8* src_y, - const uint8* src_u, - const uint8* src_v, - uint8* dst_rgba, - const struct YuvConstants* yuvconstants, - int width); -void I422ToARGB1555Row_Any_AVX2(const uint8* src_y, - const uint8* src_u, - const uint8* src_v, - uint8* dst_rgba, - const struct YuvConstants* yuvconstants, - int width); -void I422ToRGB565Row_Any_SSSE3(const uint8* src_y, - const uint8* src_u, - const uint8* src_v, - uint8* dst_rgba, - const struct YuvConstants* yuvconstants, - int width); -void I422ToRGB565Row_Any_AVX2(const uint8* src_y, - const uint8* src_u, - const uint8* src_v, - uint8* dst_rgba, - const struct YuvConstants* yuvconstants, - int width); -void I422ToRGB24Row_Any_SSSE3(const uint8* src_y, - const uint8* src_u, - const uint8* src_v, - uint8* dst_argb, - const struct YuvConstants* yuvconstants, - int width); -void I422ToRGB24Row_Any_AVX2(const uint8* src_y, - const uint8* src_u, - const uint8* src_v, - uint8* dst_argb, - const struct YuvConstants* yuvconstants, - int width); - -void I400ToARGBRow_C(const uint8* src_y, uint8* dst_argb, int width); -void I400ToARGBRow_SSE2(const uint8* src_y, uint8* dst_argb, int width); -void I400ToARGBRow_AVX2(const uint8* src_y, uint8* dst_argb, int width); -void I400ToARGBRow_NEON(const uint8* src_y, uint8* dst_argb, int width); -void I400ToARGBRow_Any_SSE2(const uint8* src_y, uint8* dst_argb, int width); -void I400ToARGBRow_Any_AVX2(const uint8* src_y, uint8* dst_argb, int width); -void I400ToARGBRow_Any_NEON(const uint8* src_y, uint8* dst_argb, int width); - -// ARGB preattenuated alpha blend. -void ARGBBlendRow_SSSE3(const uint8* src_argb, - const uint8* src_argb1, - uint8* dst_argb, - int width); -void ARGBBlendRow_NEON(const uint8* src_argb, - const uint8* src_argb1, - uint8* dst_argb, - int width); -void ARGBBlendRow_C(const uint8* src_argb, - const uint8* src_argb1, - uint8* dst_argb, - int width); - -// Unattenuated planar alpha blend. -void BlendPlaneRow_SSSE3(const uint8* src0, - const uint8* src1, - const uint8* alpha, - uint8* dst, - int width); -void BlendPlaneRow_Any_SSSE3(const uint8* src0, - const uint8* src1, - const uint8* alpha, - uint8* dst, - int width); -void BlendPlaneRow_AVX2(const uint8* src0, - const uint8* src1, - const uint8* alpha, - uint8* dst, - int width); -void BlendPlaneRow_Any_AVX2(const uint8* src0, - const uint8* src1, - const uint8* alpha, - uint8* dst, - int width); -void BlendPlaneRow_C(const uint8* src0, - const uint8* src1, - const uint8* alpha, - uint8* dst, - int width); - -// ARGB multiply images. Same API as Blend, but these require -// pointer and width alignment for SSE2. -void ARGBMultiplyRow_C(const uint8* src_argb, - const uint8* src_argb1, - uint8* dst_argb, - int width); -void ARGBMultiplyRow_SSE2(const uint8* src_argb, - const uint8* src_argb1, - uint8* dst_argb, - int width); -void ARGBMultiplyRow_Any_SSE2(const uint8* src_argb, - const uint8* src_argb1, - uint8* dst_argb, - int width); -void ARGBMultiplyRow_AVX2(const uint8* src_argb, - const uint8* src_argb1, - uint8* dst_argb, - int width); -void ARGBMultiplyRow_Any_AVX2(const uint8* src_argb, - const uint8* src_argb1, - uint8* dst_argb, - int width); -void ARGBMultiplyRow_NEON(const uint8* src_argb, - const uint8* src_argb1, - uint8* dst_argb, - int width); -void ARGBMultiplyRow_Any_NEON(const uint8* src_argb, - const uint8* src_argb1, - uint8* dst_argb, - int width); -void ARGBMultiplyRow_MSA(const uint8* src_argb, - const uint8* src_argb1, - uint8* dst_argb, - int width); -void ARGBMultiplyRow_Any_MSA(const uint8* src_argb, - const uint8* src_argb1, - uint8* dst_argb, - int width); - -// ARGB add images. -void ARGBAddRow_C(const uint8* src_argb, - const uint8* src_argb1, - uint8* dst_argb, - int width); -void ARGBAddRow_SSE2(const uint8* src_argb, - const uint8* src_argb1, - uint8* dst_argb, - int width); -void ARGBAddRow_Any_SSE2(const uint8* src_argb, - const uint8* src_argb1, - uint8* dst_argb, - int width); -void ARGBAddRow_AVX2(const uint8* src_argb, - const uint8* src_argb1, - uint8* dst_argb, - int width); -void ARGBAddRow_Any_AVX2(const uint8* src_argb, - const uint8* src_argb1, - uint8* dst_argb, - int width); -void ARGBAddRow_NEON(const uint8* src_argb, - const uint8* src_argb1, - uint8* dst_argb, - int width); -void ARGBAddRow_Any_NEON(const uint8* src_argb, - const uint8* src_argb1, - uint8* dst_argb, - int width); -void ARGBAddRow_MSA(const uint8* src_argb, - const uint8* src_argb1, - uint8* dst_argb, - int width); -void ARGBAddRow_Any_MSA(const uint8* src_argb, - const uint8* src_argb1, - uint8* dst_argb, - int width); - -// ARGB subtract images. Same API as Blend, but these require -// pointer and width alignment for SSE2. -void ARGBSubtractRow_C(const uint8* src_argb, - const uint8* src_argb1, - uint8* dst_argb, - int width); -void ARGBSubtractRow_SSE2(const uint8* src_argb, - const uint8* src_argb1, - uint8* dst_argb, - int width); -void ARGBSubtractRow_Any_SSE2(const uint8* src_argb, - const uint8* src_argb1, - uint8* dst_argb, - int width); -void ARGBSubtractRow_AVX2(const uint8* src_argb, - const uint8* src_argb1, - uint8* dst_argb, - int width); -void ARGBSubtractRow_Any_AVX2(const uint8* src_argb, - const uint8* src_argb1, - uint8* dst_argb, - int width); -void ARGBSubtractRow_NEON(const uint8* src_argb, - const uint8* src_argb1, - uint8* dst_argb, - int width); -void ARGBSubtractRow_Any_NEON(const uint8* src_argb, - const uint8* src_argb1, - uint8* dst_argb, - int width); -void ARGBSubtractRow_MSA(const uint8* src_argb, - const uint8* src_argb1, - uint8* dst_argb, - int width); -void ARGBSubtractRow_Any_MSA(const uint8* src_argb, - const uint8* src_argb1, - uint8* dst_argb, - int width); - -void ARGBToRGB24Row_Any_SSSE3(const uint8* src_argb, uint8* dst_rgb, int width); -void ARGBToRAWRow_Any_SSSE3(const uint8* src_argb, uint8* dst_rgb, int width); -void ARGBToRGB565Row_Any_SSE2(const uint8* src_argb, uint8* dst_rgb, int width); -void ARGBToARGB1555Row_Any_SSE2(const uint8* src_argb, - uint8* dst_rgb, - int width); -void ARGBToARGB4444Row_Any_SSE2(const uint8* src_argb, - uint8* dst_rgb, - int width); - -void ARGBToRGB565DitherRow_Any_SSE2(const uint8* src_argb, - uint8* dst_rgb, - const uint32 dither4, - int width); -void ARGBToRGB565DitherRow_Any_AVX2(const uint8* src_argb, - uint8* dst_rgb, - const uint32 dither4, - int width); - -void ARGBToRGB565Row_Any_AVX2(const uint8* src_argb, uint8* dst_rgb, int width); -void ARGBToARGB1555Row_Any_AVX2(const uint8* src_argb, - uint8* dst_rgb, - int width); -void ARGBToARGB4444Row_Any_AVX2(const uint8* src_argb, - uint8* dst_rgb, - int width); - -void ARGBToRGB24Row_Any_NEON(const uint8* src_argb, uint8* dst_rgb, int width); -void ARGBToRAWRow_Any_NEON(const uint8* src_argb, uint8* dst_rgb, int width); -void ARGBToRGB565Row_Any_NEON(const uint8* src_argb, uint8* dst_rgb, int width); -void ARGBToARGB1555Row_Any_NEON(const uint8* src_argb, - uint8* dst_rgb, - int width); -void ARGBToARGB4444Row_Any_NEON(const uint8* src_argb, - uint8* dst_rgb, - int width); -void ARGBToRGB565DitherRow_Any_NEON(const uint8* src_argb, - uint8* dst_rgb, - const uint32 dither4, - int width); -void ARGBToRGB24Row_Any_MSA(const uint8* src_argb, uint8* dst_rgb, int width); -void ARGBToRAWRow_Any_MSA(const uint8* src_argb, uint8* dst_rgb, int width); -void ARGBToRGB565Row_Any_MSA(const uint8* src_argb, uint8* dst_rgb, int width); -void ARGBToARGB1555Row_Any_MSA(const uint8* src_argb, - uint8* dst_rgb, - int width); -void ARGBToARGB4444Row_Any_MSA(const uint8* src_argb, - uint8* dst_rgb, - int width); - -void I444ToARGBRow_Any_NEON(const uint8* src_y, - const uint8* src_u, - const uint8* src_v, - uint8* dst_argb, - const struct YuvConstants* yuvconstants, - int width); -void I422ToARGBRow_Any_NEON(const uint8* src_y, - const uint8* src_u, - const uint8* src_v, - uint8* dst_argb, - const struct YuvConstants* yuvconstants, - int width); -void I422AlphaToARGBRow_Any_NEON(const uint8* src_y, - const uint8* src_u, - const uint8* src_v, - const uint8* src_a, - uint8* dst_argb, - const struct YuvConstants* yuvconstants, - int width); -void I422ToRGBARow_Any_NEON(const uint8* src_y, - const uint8* src_u, - const uint8* src_v, - uint8* dst_argb, - const struct YuvConstants* yuvconstants, - int width); -void I422ToRGB24Row_Any_NEON(const uint8* src_y, - const uint8* src_u, - const uint8* src_v, - uint8* dst_argb, - const struct YuvConstants* yuvconstants, - int width); -void I422ToARGB4444Row_Any_NEON(const uint8* src_y, - const uint8* src_u, - const uint8* src_v, - uint8* dst_argb, - const struct YuvConstants* yuvconstants, - int width); -void I422ToARGB1555Row_Any_NEON(const uint8* src_y, - const uint8* src_u, - const uint8* src_v, - uint8* dst_argb, - const struct YuvConstants* yuvconstants, - int width); -void I422ToRGB565Row_Any_NEON(const uint8* src_y, - const uint8* src_u, - const uint8* src_v, - uint8* dst_argb, - const struct YuvConstants* yuvconstants, - int width); -void NV12ToARGBRow_Any_NEON(const uint8* src_y, - const uint8* src_uv, - uint8* dst_argb, - const struct YuvConstants* yuvconstants, - int width); -void NV21ToARGBRow_Any_NEON(const uint8* src_y, - const uint8* src_vu, - uint8* dst_argb, - const struct YuvConstants* yuvconstants, - int width); -void NV12ToRGB565Row_Any_NEON(const uint8* src_y, - const uint8* src_uv, - uint8* dst_argb, - const struct YuvConstants* yuvconstants, - int width); -void YUY2ToARGBRow_Any_NEON(const uint8* src_yuy2, - uint8* dst_argb, - const struct YuvConstants* yuvconstants, - int width); -void UYVYToARGBRow_Any_NEON(const uint8* src_uyvy, - uint8* dst_argb, - const struct YuvConstants* yuvconstants, - int width); -void I422ToARGBRow_DSPR2(const uint8* src_y, - const uint8* src_u, - const uint8* src_v, - uint8* dst_argb, - const struct YuvConstants* yuvconstants, - int width); -void I422ToARGBRow_DSPR2(const uint8* src_y, - const uint8* src_u, - const uint8* src_v, - uint8* dst_argb, - const struct YuvConstants* yuvconstants, - int width); -void I422ToARGBRow_Any_MSA(const uint8* src_y, - const uint8* src_u, - const uint8* src_v, - uint8* dst_argb, - const struct YuvConstants* yuvconstants, - int width); -void I422ToRGBARow_Any_MSA(const uint8* src_y, - const uint8* src_u, - const uint8* src_v, - uint8* dst_argb, - const struct YuvConstants* yuvconstants, - int width); -void I422AlphaToARGBRow_Any_MSA(const uint8* src_y, - const uint8* src_u, - const uint8* src_v, - const uint8* src_a, - uint8* dst_argb, - const struct YuvConstants* yuvconstants, - int width); -void I422ToRGB24Row_Any_MSA(const uint8* src_y, - const uint8* src_u, - const uint8* src_v, - uint8* dst_rgb24, - const struct YuvConstants* yuvconstants, - int width); -void I422ToRGB565Row_Any_MSA(const uint8* src_y, - const uint8* src_u, - const uint8* src_v, - uint8* dst_rgb565, - const struct YuvConstants* yuvconstants, - int width); -void I422ToARGB4444Row_Any_MSA(const uint8* src_y, - const uint8* src_u, - const uint8* src_v, - uint8* dst_argb4444, - const struct YuvConstants* yuvconstants, - int width); -void I422ToARGB1555Row_Any_MSA(const uint8* src_y, - const uint8* src_u, - const uint8* src_v, - uint8* dst_argb1555, - const struct YuvConstants* yuvconstants, - int width); - -void YUY2ToYRow_AVX2(const uint8* src_yuy2, uint8* dst_y, int width); -void YUY2ToUVRow_AVX2(const uint8* src_yuy2, - int stride_yuy2, - uint8* dst_u, - uint8* dst_v, - int width); -void YUY2ToUV422Row_AVX2(const uint8* src_yuy2, - uint8* dst_u, - uint8* dst_v, - int width); -void YUY2ToYRow_SSE2(const uint8* src_yuy2, uint8* dst_y, int width); -void YUY2ToUVRow_SSE2(const uint8* src_yuy2, - int stride_yuy2, - uint8* dst_u, - uint8* dst_v, - int width); -void YUY2ToUV422Row_SSE2(const uint8* src_yuy2, - uint8* dst_u, - uint8* dst_v, - int width); -void YUY2ToYRow_NEON(const uint8* src_yuy2, uint8* dst_y, int width); -void YUY2ToUVRow_NEON(const uint8* src_yuy2, - int stride_yuy2, - uint8* dst_u, - uint8* dst_v, - int width); -void YUY2ToUV422Row_NEON(const uint8* src_yuy2, - uint8* dst_u, - uint8* dst_v, - int width); -void YUY2ToYRow_MSA(const uint8* src_yuy2, uint8* dst_y, int width); -void YUY2ToUVRow_MSA(const uint8* src_yuy2, - int stride_yuy2, - uint8* dst_u, - uint8* dst_v, - int width); -void YUY2ToUV422Row_MSA(const uint8* src_yuy2, - uint8* dst_u, - uint8* dst_v, - int width); -void YUY2ToYRow_C(const uint8* src_yuy2, uint8* dst_y, int width); -void YUY2ToUVRow_C(const uint8* src_yuy2, - int stride_yuy2, - uint8* dst_u, - uint8* dst_v, - int width); -void YUY2ToUV422Row_C(const uint8* src_yuy2, - uint8* dst_u, - uint8* dst_v, - int width); -void YUY2ToYRow_Any_AVX2(const uint8* src_yuy2, uint8* dst_y, int width); -void YUY2ToUVRow_Any_AVX2(const uint8* src_yuy2, - int stride_yuy2, - uint8* dst_u, - uint8* dst_v, - int width); -void YUY2ToUV422Row_Any_AVX2(const uint8* src_yuy2, - uint8* dst_u, - uint8* dst_v, - int width); -void YUY2ToYRow_Any_SSE2(const uint8* src_yuy2, uint8* dst_y, int width); -void YUY2ToUVRow_Any_SSE2(const uint8* src_yuy2, - int stride_yuy2, - uint8* dst_u, - uint8* dst_v, - int width); -void YUY2ToUV422Row_Any_SSE2(const uint8* src_yuy2, - uint8* dst_u, - uint8* dst_v, - int width); -void YUY2ToYRow_Any_NEON(const uint8* src_yuy2, uint8* dst_y, int width); -void YUY2ToUVRow_Any_NEON(const uint8* src_yuy2, - int stride_yuy2, - uint8* dst_u, - uint8* dst_v, - int width); -void YUY2ToUV422Row_Any_NEON(const uint8* src_yuy2, - uint8* dst_u, - uint8* dst_v, - int width); -void YUY2ToYRow_Any_MSA(const uint8* src_yuy2, uint8* dst_y, int width); -void YUY2ToUVRow_Any_MSA(const uint8* src_yuy2, - int stride_yuy2, - uint8* dst_u, - uint8* dst_v, - int width); -void YUY2ToUV422Row_Any_MSA(const uint8* src_yuy2, - uint8* dst_u, - uint8* dst_v, - int width); -void UYVYToYRow_AVX2(const uint8* src_uyvy, uint8* dst_y, int width); -void UYVYToUVRow_AVX2(const uint8* src_uyvy, - int stride_uyvy, - uint8* dst_u, - uint8* dst_v, - int width); -void UYVYToUV422Row_AVX2(const uint8* src_uyvy, - uint8* dst_u, - uint8* dst_v, - int width); -void UYVYToYRow_SSE2(const uint8* src_uyvy, uint8* dst_y, int width); -void UYVYToUVRow_SSE2(const uint8* src_uyvy, - int stride_uyvy, - uint8* dst_u, - uint8* dst_v, - int width); -void UYVYToUV422Row_SSE2(const uint8* src_uyvy, - uint8* dst_u, - uint8* dst_v, - int width); -void UYVYToYRow_AVX2(const uint8* src_uyvy, uint8* dst_y, int width); -void UYVYToUVRow_AVX2(const uint8* src_uyvy, - int stride_uyvy, - uint8* dst_u, - uint8* dst_v, - int width); -void UYVYToUV422Row_AVX2(const uint8* src_uyvy, - uint8* dst_u, - uint8* dst_v, - int width); -void UYVYToYRow_NEON(const uint8* src_uyvy, uint8* dst_y, int width); -void UYVYToUVRow_NEON(const uint8* src_uyvy, - int stride_uyvy, - uint8* dst_u, - uint8* dst_v, - int width); -void UYVYToUV422Row_NEON(const uint8* src_uyvy, - uint8* dst_u, - uint8* dst_v, - int width); -void UYVYToYRow_MSA(const uint8* src_uyvy, uint8* dst_y, int width); -void UYVYToUVRow_MSA(const uint8* src_uyvy, - int stride_uyvy, - uint8* dst_u, - uint8* dst_v, - int width); -void UYVYToUV422Row_MSA(const uint8* src_uyvy, - uint8* dst_u, - uint8* dst_v, - int width); - -void UYVYToYRow_C(const uint8* src_uyvy, uint8* dst_y, int width); -void UYVYToUVRow_C(const uint8* src_uyvy, - int stride_uyvy, - uint8* dst_u, - uint8* dst_v, - int width); -void UYVYToUV422Row_C(const uint8* src_uyvy, - uint8* dst_u, - uint8* dst_v, - int width); -void UYVYToYRow_Any_AVX2(const uint8* src_uyvy, uint8* dst_y, int width); -void UYVYToUVRow_Any_AVX2(const uint8* src_uyvy, - int stride_uyvy, - uint8* dst_u, - uint8* dst_v, - int width); -void UYVYToUV422Row_Any_AVX2(const uint8* src_uyvy, - uint8* dst_u, - uint8* dst_v, - int width); -void UYVYToYRow_Any_SSE2(const uint8* src_uyvy, uint8* dst_y, int width); -void UYVYToUVRow_Any_SSE2(const uint8* src_uyvy, - int stride_uyvy, - uint8* dst_u, - uint8* dst_v, - int width); -void UYVYToUV422Row_Any_SSE2(const uint8* src_uyvy, - uint8* dst_u, - uint8* dst_v, - int width); -void UYVYToYRow_Any_NEON(const uint8* src_uyvy, uint8* dst_y, int width); -void UYVYToUVRow_Any_NEON(const uint8* src_uyvy, - int stride_uyvy, - uint8* dst_u, - uint8* dst_v, - int width); -void UYVYToUV422Row_Any_NEON(const uint8* src_uyvy, - uint8* dst_u, - uint8* dst_v, - int width); -void UYVYToYRow_Any_MSA(const uint8* src_uyvy, uint8* dst_y, int width); -void UYVYToUVRow_Any_MSA(const uint8* src_uyvy, - int stride_uyvy, - uint8* dst_u, - uint8* dst_v, - int width); -void UYVYToUV422Row_Any_MSA(const uint8* src_uyvy, - uint8* dst_u, - uint8* dst_v, - int width); - -void I422ToYUY2Row_C(const uint8* src_y, - const uint8* src_u, - const uint8* src_v, - uint8* dst_yuy2, - int width); -void I422ToUYVYRow_C(const uint8* src_y, - const uint8* src_u, - const uint8* src_v, - uint8* dst_uyvy, - int width); -void I422ToYUY2Row_SSE2(const uint8* src_y, - const uint8* src_u, - const uint8* src_v, - uint8* dst_yuy2, - int width); -void I422ToUYVYRow_SSE2(const uint8* src_y, - const uint8* src_u, - const uint8* src_v, - uint8* dst_uyvy, - int width); -void I422ToYUY2Row_Any_SSE2(const uint8* src_y, - const uint8* src_u, - const uint8* src_v, - uint8* dst_yuy2, - int width); -void I422ToUYVYRow_Any_SSE2(const uint8* src_y, - const uint8* src_u, - const uint8* src_v, - uint8* dst_uyvy, - int width); -void I422ToYUY2Row_NEON(const uint8* src_y, - const uint8* src_u, - const uint8* src_v, - uint8* dst_yuy2, - int width); -void I422ToUYVYRow_NEON(const uint8* src_y, - const uint8* src_u, - const uint8* src_v, - uint8* dst_uyvy, - int width); -void I422ToYUY2Row_Any_NEON(const uint8* src_y, - const uint8* src_u, - const uint8* src_v, - uint8* dst_yuy2, - int width); -void I422ToUYVYRow_Any_NEON(const uint8* src_y, - const uint8* src_u, - const uint8* src_v, - uint8* dst_uyvy, - int width); -void I422ToYUY2Row_MSA(const uint8* src_y, - const uint8* src_u, - const uint8* src_v, - uint8* dst_yuy2, - int width); -void I422ToUYVYRow_MSA(const uint8* src_y, - const uint8* src_u, - const uint8* src_v, - uint8* dst_uyvy, - int width); -void I422ToYUY2Row_Any_MSA(const uint8* src_y, - const uint8* src_u, - const uint8* src_v, - uint8* dst_yuy2, - int width); -void I422ToUYVYRow_Any_MSA(const uint8* src_y, - const uint8* src_u, - const uint8* src_v, - uint8* dst_uyvy, - int width); - -// Effects related row functions. -void ARGBAttenuateRow_C(const uint8* src_argb, uint8* dst_argb, int width); -void ARGBAttenuateRow_SSSE3(const uint8* src_argb, uint8* dst_argb, int width); -void ARGBAttenuateRow_AVX2(const uint8* src_argb, uint8* dst_argb, int width); -void ARGBAttenuateRow_NEON(const uint8* src_argb, uint8* dst_argb, int width); -void ARGBAttenuateRow_Any_SSE2(const uint8* src_argb, - uint8* dst_argb, - int width); -void ARGBAttenuateRow_Any_SSSE3(const uint8* src_argb, - uint8* dst_argb, - int width); -void ARGBAttenuateRow_Any_AVX2(const uint8* src_argb, - uint8* dst_argb, - int width); -void ARGBAttenuateRow_Any_NEON(const uint8* src_argb, - uint8* dst_argb, - int width); - -// Inverse table for unattenuate, shared by C and SSE2. -extern const uint32 fixed_invtbl8[256]; -void ARGBUnattenuateRow_C(const uint8* src_argb, uint8* dst_argb, int width); -void ARGBUnattenuateRow_SSE2(const uint8* src_argb, uint8* dst_argb, int width); -void ARGBUnattenuateRow_AVX2(const uint8* src_argb, uint8* dst_argb, int width); -void ARGBUnattenuateRow_Any_SSE2(const uint8* src_argb, - uint8* dst_argb, - int width); -void ARGBUnattenuateRow_Any_AVX2(const uint8* src_argb, - uint8* dst_argb, - int width); - -void ARGBGrayRow_C(const uint8* src_argb, uint8* dst_argb, int width); -void ARGBGrayRow_SSSE3(const uint8* src_argb, uint8* dst_argb, int width); -void ARGBGrayRow_NEON(const uint8* src_argb, uint8* dst_argb, int width); - -void ARGBSepiaRow_C(uint8* dst_argb, int width); -void ARGBSepiaRow_SSSE3(uint8* dst_argb, int width); -void ARGBSepiaRow_NEON(uint8* dst_argb, int width); - -void ARGBColorMatrixRow_C(const uint8* src_argb, - uint8* dst_argb, - const int8* matrix_argb, - int width); -void ARGBColorMatrixRow_SSSE3(const uint8* src_argb, - uint8* dst_argb, - const int8* matrix_argb, - int width); -void ARGBColorMatrixRow_NEON(const uint8* src_argb, - uint8* dst_argb, - const int8* matrix_argb, - int width); - -void ARGBColorTableRow_C(uint8* dst_argb, const uint8* table_argb, int width); -void ARGBColorTableRow_X86(uint8* dst_argb, const uint8* table_argb, int width); - -void RGBColorTableRow_C(uint8* dst_argb, const uint8* table_argb, int width); -void RGBColorTableRow_X86(uint8* dst_argb, const uint8* table_argb, int width); - -void ARGBQuantizeRow_C(uint8* dst_argb, - int scale, - int interval_size, - int interval_offset, - int width); -void ARGBQuantizeRow_SSE2(uint8* dst_argb, - int scale, - int interval_size, - int interval_offset, - int width); -void ARGBQuantizeRow_NEON(uint8* dst_argb, - int scale, - int interval_size, - int interval_offset, - int width); - -void ARGBShadeRow_C(const uint8* src_argb, - uint8* dst_argb, - int width, - uint32 value); -void ARGBShadeRow_SSE2(const uint8* src_argb, - uint8* dst_argb, - int width, - uint32 value); -void ARGBShadeRow_NEON(const uint8* src_argb, - uint8* dst_argb, - int width, - uint32 value); - -// Used for blur. -void CumulativeSumToAverageRow_SSE2(const int32* topleft, - const int32* botleft, - int width, - int area, - uint8* dst, - int count); -void ComputeCumulativeSumRow_SSE2(const uint8* row, - int32* cumsum, - const int32* previous_cumsum, - int width); - -void CumulativeSumToAverageRow_C(const int32* topleft, - const int32* botleft, - int width, - int area, - uint8* dst, - int count); -void ComputeCumulativeSumRow_C(const uint8* row, - int32* cumsum, - const int32* previous_cumsum, - int width); - -LIBYUV_API -void ARGBAffineRow_C(const uint8* src_argb, - int src_argb_stride, - uint8* dst_argb, - const float* uv_dudv, - int width); -LIBYUV_API -void ARGBAffineRow_SSE2(const uint8* src_argb, - int src_argb_stride, - uint8* dst_argb, - const float* uv_dudv, - int width); - -// Used for I420Scale, ARGBScale, and ARGBInterpolate. -void InterpolateRow_C(uint8* dst_ptr, - const uint8* src_ptr, - ptrdiff_t src_stride_ptr, - int width, - int source_y_fraction); -void InterpolateRow_SSSE3(uint8* dst_ptr, - const uint8* src_ptr, - ptrdiff_t src_stride_ptr, - int width, - int source_y_fraction); -void InterpolateRow_AVX2(uint8* dst_ptr, - const uint8* src_ptr, - ptrdiff_t src_stride_ptr, - int width, - int source_y_fraction); -void InterpolateRow_NEON(uint8* dst_ptr, - const uint8* src_ptr, - ptrdiff_t src_stride_ptr, - int width, - int source_y_fraction); -void InterpolateRow_DSPR2(uint8* dst_ptr, - const uint8* src_ptr, - ptrdiff_t src_stride_ptr, - int width, - int source_y_fraction); -void InterpolateRow_Any_NEON(uint8* dst_ptr, - const uint8* src_ptr, - ptrdiff_t src_stride_ptr, - int width, - int source_y_fraction); -void InterpolateRow_Any_SSSE3(uint8* dst_ptr, - const uint8* src_ptr, - ptrdiff_t src_stride_ptr, - int width, - int source_y_fraction); -void InterpolateRow_Any_AVX2(uint8* dst_ptr, - const uint8* src_ptr, - ptrdiff_t src_stride_ptr, - int width, - int source_y_fraction); -void InterpolateRow_Any_DSPR2(uint8* dst_ptr, - const uint8* src_ptr, - ptrdiff_t src_stride_ptr, - int width, - int source_y_fraction); - -void InterpolateRow_16_C(uint16* dst_ptr, - const uint16* src_ptr, - ptrdiff_t src_stride_ptr, - int width, - int source_y_fraction); - -// Sobel images. -void SobelXRow_C(const uint8* src_y0, - const uint8* src_y1, - const uint8* src_y2, - uint8* dst_sobelx, - int width); -void SobelXRow_SSE2(const uint8* src_y0, - const uint8* src_y1, - const uint8* src_y2, - uint8* dst_sobelx, - int width); -void SobelXRow_NEON(const uint8* src_y0, - const uint8* src_y1, - const uint8* src_y2, - uint8* dst_sobelx, - int width); -void SobelYRow_C(const uint8* src_y0, - const uint8* src_y1, - uint8* dst_sobely, - int width); -void SobelYRow_SSE2(const uint8* src_y0, - const uint8* src_y1, - uint8* dst_sobely, - int width); -void SobelYRow_NEON(const uint8* src_y0, - const uint8* src_y1, - uint8* dst_sobely, - int width); -void SobelRow_C(const uint8* src_sobelx, - const uint8* src_sobely, - uint8* dst_argb, - int width); -void SobelRow_SSE2(const uint8* src_sobelx, - const uint8* src_sobely, - uint8* dst_argb, - int width); -void SobelRow_NEON(const uint8* src_sobelx, - const uint8* src_sobely, - uint8* dst_argb, - int width); -void SobelToPlaneRow_C(const uint8* src_sobelx, - const uint8* src_sobely, - uint8* dst_y, - int width); -void SobelToPlaneRow_SSE2(const uint8* src_sobelx, - const uint8* src_sobely, - uint8* dst_y, - int width); -void SobelToPlaneRow_NEON(const uint8* src_sobelx, - const uint8* src_sobely, - uint8* dst_y, - int width); -void SobelXYRow_C(const uint8* src_sobelx, - const uint8* src_sobely, - uint8* dst_argb, - int width); -void SobelXYRow_SSE2(const uint8* src_sobelx, - const uint8* src_sobely, - uint8* dst_argb, - int width); -void SobelXYRow_NEON(const uint8* src_sobelx, - const uint8* src_sobely, - uint8* dst_argb, - int width); -void SobelRow_Any_SSE2(const uint8* src_sobelx, - const uint8* src_sobely, - uint8* dst_argb, - int width); -void SobelRow_Any_NEON(const uint8* src_sobelx, - const uint8* src_sobely, - uint8* dst_argb, - int width); -void SobelToPlaneRow_Any_SSE2(const uint8* src_sobelx, - const uint8* src_sobely, - uint8* dst_y, - int width); -void SobelToPlaneRow_Any_NEON(const uint8* src_sobelx, - const uint8* src_sobely, - uint8* dst_y, - int width); -void SobelXYRow_Any_SSE2(const uint8* src_sobelx, - const uint8* src_sobely, - uint8* dst_argb, - int width); -void SobelXYRow_Any_NEON(const uint8* src_sobelx, - const uint8* src_sobely, - uint8* dst_argb, - int width); - -void ARGBPolynomialRow_C(const uint8* src_argb, - uint8* dst_argb, - const float* poly, - int width); -void ARGBPolynomialRow_SSE2(const uint8* src_argb, - uint8* dst_argb, - const float* poly, - int width); -void ARGBPolynomialRow_AVX2(const uint8* src_argb, - uint8* dst_argb, - const float* poly, - int width); - -// Scale and convert to half float. -void HalfFloatRow_C(const uint16* src, uint16* dst, float scale, int width); -void HalfFloatRow_SSE2(const uint16* src, uint16* dst, float scale, int width); -void HalfFloatRow_Any_SSE2(const uint16* src, - uint16* dst, - float scale, - int width); -void HalfFloatRow_AVX2(const uint16* src, uint16* dst, float scale, int width); -void HalfFloatRow_Any_AVX2(const uint16* src, - uint16* dst, - float scale, - int width); -void HalfFloatRow_F16C(const uint16* src, uint16* dst, float scale, int width); -void HalfFloatRow_Any_F16C(const uint16* src, - uint16* dst, - float scale, - int width); -void HalfFloat1Row_F16C(const uint16* src, uint16* dst, float scale, int width); -void HalfFloat1Row_Any_F16C(const uint16* src, - uint16* dst, - float scale, - int width); -void HalfFloatRow_NEON(const uint16* src, uint16* dst, float scale, int width); -void HalfFloatRow_Any_NEON(const uint16* src, - uint16* dst, - float scale, - int width); -void HalfFloat1Row_NEON(const uint16* src, uint16* dst, float scale, int width); -void HalfFloat1Row_Any_NEON(const uint16* src, - uint16* dst, - float scale, - int width); - -void ARGBLumaColorTableRow_C(const uint8* src_argb, - uint8* dst_argb, - int width, - const uint8* luma, - uint32 lumacoeff); -void ARGBLumaColorTableRow_SSSE3(const uint8* src_argb, - uint8* dst_argb, - int width, - const uint8* luma, - uint32 lumacoeff); - -#ifdef __cplusplus -} // extern "C" -} // namespace libyuv -#endif - -#endif // INCLUDE_LIBYUV_ROW_H_ diff --git a/WebRtc.NET/include/third_party/libyuv/include/libyuv/scale.h b/WebRtc.NET/include/third_party/libyuv/include/libyuv/scale.h deleted file mode 100644 index 6d6b9a85..00000000 --- a/WebRtc.NET/include/third_party/libyuv/include/libyuv/scale.h +++ /dev/null @@ -1,142 +0,0 @@ -/* - * Copyright 2011 The LibYuv Project Authors. All rights reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef INCLUDE_LIBYUV_SCALE_H_ -#define INCLUDE_LIBYUV_SCALE_H_ - -#include "libyuv/basic_types.h" - -#ifdef __cplusplus -namespace libyuv { -extern "C" { -#endif - -// Supported filtering. -typedef enum FilterMode { - kFilterNone = 0, // Point sample; Fastest. - kFilterLinear = 1, // Filter horizontally only. - kFilterBilinear = 2, // Faster than box, but lower quality scaling down. - kFilterBox = 3 // Highest quality. -} FilterModeEnum; - -// Scale a YUV plane. -LIBYUV_API -void ScalePlane(const uint8* src, - int src_stride, - int src_width, - int src_height, - uint8* dst, - int dst_stride, - int dst_width, - int dst_height, - enum FilterMode filtering); - -LIBYUV_API -void ScalePlane_16(const uint16* src, - int src_stride, - int src_width, - int src_height, - uint16* dst, - int dst_stride, - int dst_width, - int dst_height, - enum FilterMode filtering); - -// Scales a YUV 4:2:0 image from the src width and height to the -// dst width and height. -// If filtering is kFilterNone, a simple nearest-neighbor algorithm is -// used. This produces basic (blocky) quality at the fastest speed. -// If filtering is kFilterBilinear, interpolation is used to produce a better -// quality image, at the expense of speed. -// If filtering is kFilterBox, averaging is used to produce ever better -// quality image, at further expense of speed. -// Returns 0 if successful. - -LIBYUV_API -int I420Scale(const uint8* src_y, - int src_stride_y, - const uint8* src_u, - int src_stride_u, - const uint8* src_v, - int src_stride_v, - int src_width, - int src_height, - uint8* dst_y, - int dst_stride_y, - uint8* dst_u, - int dst_stride_u, - uint8* dst_v, - int dst_stride_v, - int dst_width, - int dst_height, - enum FilterMode filtering); - -LIBYUV_API -int I420Scale_16(const uint16* src_y, - int src_stride_y, - const uint16* src_u, - int src_stride_u, - const uint16* src_v, - int src_stride_v, - int src_width, - int src_height, - uint16* dst_y, - int dst_stride_y, - uint16* dst_u, - int dst_stride_u, - uint16* dst_v, - int dst_stride_v, - int dst_width, - int dst_height, - enum FilterMode filtering); - -#ifdef __cplusplus -// Legacy API. Deprecated. -LIBYUV_API -int Scale(const uint8* src_y, - const uint8* src_u, - const uint8* src_v, - int src_stride_y, - int src_stride_u, - int src_stride_v, - int src_width, - int src_height, - uint8* dst_y, - uint8* dst_u, - uint8* dst_v, - int dst_stride_y, - int dst_stride_u, - int dst_stride_v, - int dst_width, - int dst_height, - LIBYUV_BOOL interpolate); - -// Legacy API. Deprecated. -LIBYUV_API -int ScaleOffset(const uint8* src_i420, - int src_width, - int src_height, - uint8* dst_i420, - int dst_width, - int dst_height, - int dst_yoffset, - LIBYUV_BOOL interpolate); - -// For testing, allow disabling of specialized scalers. -LIBYUV_API -void SetUseReferenceImpl(LIBYUV_BOOL use); -#endif // __cplusplus - -#ifdef __cplusplus -} // extern "C" -} // namespace libyuv -#endif - -#endif // INCLUDE_LIBYUV_SCALE_H_ diff --git a/WebRtc.NET/include/third_party/libyuv/include/libyuv/scale_argb.h b/WebRtc.NET/include/third_party/libyuv/include/libyuv/scale_argb.h deleted file mode 100644 index 3d25e579..00000000 --- a/WebRtc.NET/include/third_party/libyuv/include/libyuv/scale_argb.h +++ /dev/null @@ -1,76 +0,0 @@ -/* - * Copyright 2012 The LibYuv Project Authors. All rights reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef INCLUDE_LIBYUV_SCALE_ARGB_H_ -#define INCLUDE_LIBYUV_SCALE_ARGB_H_ - -#include "libyuv/basic_types.h" -#include "libyuv/scale.h" // For FilterMode - -#ifdef __cplusplus -namespace libyuv { -extern "C" { -#endif - -LIBYUV_API -int ARGBScale(const uint8* src_argb, - int src_stride_argb, - int src_width, - int src_height, - uint8* dst_argb, - int dst_stride_argb, - int dst_width, - int dst_height, - enum FilterMode filtering); - -// Clipped scale takes destination rectangle coordinates for clip values. -LIBYUV_API -int ARGBScaleClip(const uint8* src_argb, - int src_stride_argb, - int src_width, - int src_height, - uint8* dst_argb, - int dst_stride_argb, - int dst_width, - int dst_height, - int clip_x, - int clip_y, - int clip_width, - int clip_height, - enum FilterMode filtering); - -// Scale with YUV conversion to ARGB and clipping. -LIBYUV_API -int YUVToARGBScaleClip(const uint8* src_y, - int src_stride_y, - const uint8* src_u, - int src_stride_u, - const uint8* src_v, - int src_stride_v, - uint32 src_fourcc, - int src_width, - int src_height, - uint8* dst_argb, - int dst_stride_argb, - uint32 dst_fourcc, - int dst_width, - int dst_height, - int clip_x, - int clip_y, - int clip_width, - int clip_height, - enum FilterMode filtering); - -#ifdef __cplusplus -} // extern "C" -} // namespace libyuv -#endif - -#endif // INCLUDE_LIBYUV_SCALE_ARGB_H_ diff --git a/WebRtc.NET/include/third_party/libyuv/include/libyuv/scale_row.h b/WebRtc.NET/include/third_party/libyuv/include/libyuv/scale_row.h deleted file mode 100644 index 24471920..00000000 --- a/WebRtc.NET/include/third_party/libyuv/include/libyuv/scale_row.h +++ /dev/null @@ -1,851 +0,0 @@ -/* - * Copyright 2013 The LibYuv Project Authors. All rights reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef INCLUDE_LIBYUV_SCALE_ROW_H_ -#define INCLUDE_LIBYUV_SCALE_ROW_H_ - -#include "libyuv/basic_types.h" -#include "libyuv/scale.h" - -#ifdef __cplusplus -namespace libyuv { -extern "C" { -#endif - -#if defined(__pnacl__) || defined(__CLR_VER) || \ - (defined(__i386__) && !defined(__SSE2__)) -#define LIBYUV_DISABLE_X86 -#endif -// MemorySanitizer does not support assembly code yet. http://crbug.com/344505 -#if defined(__has_feature) -#if __has_feature(memory_sanitizer) -#define LIBYUV_DISABLE_X86 -#endif -#endif - -// GCC >= 4.7.0 required for AVX2. -#if defined(__GNUC__) && (defined(__x86_64__) || defined(__i386__)) -#if (__GNUC__ > 4) || (__GNUC__ == 4 && (__GNUC_MINOR__ >= 7)) -#define GCC_HAS_AVX2 1 -#endif // GNUC >= 4.7 -#endif // __GNUC__ - -// clang >= 3.4.0 required for AVX2. -#if defined(__clang__) && (defined(__x86_64__) || defined(__i386__)) -#if (__clang_major__ > 3) || (__clang_major__ == 3 && (__clang_minor__ >= 4)) -#define CLANG_HAS_AVX2 1 -#endif // clang >= 3.4 -#endif // __clang__ - -// Visual C 2012 required for AVX2. -#if defined(_M_IX86) && !defined(__clang__) && defined(_MSC_VER) && \ - _MSC_VER >= 1700 -#define VISUALC_HAS_AVX2 1 -#endif // VisualStudio >= 2012 - -// The following are available on all x86 platforms: -#if !defined(LIBYUV_DISABLE_X86) && \ - (defined(_M_IX86) || defined(__x86_64__) || defined(__i386__)) -#define HAS_FIXEDDIV1_X86 -#define HAS_FIXEDDIV_X86 -#define HAS_SCALEARGBCOLS_SSE2 -#define HAS_SCALEARGBCOLSUP2_SSE2 -#define HAS_SCALEARGBFILTERCOLS_SSSE3 -#define HAS_SCALEARGBROWDOWN2_SSE2 -#define HAS_SCALEARGBROWDOWNEVEN_SSE2 -#define HAS_SCALECOLSUP2_SSE2 -#define HAS_SCALEFILTERCOLS_SSSE3 -#define HAS_SCALEROWDOWN2_SSSE3 -#define HAS_SCALEROWDOWN34_SSSE3 -#define HAS_SCALEROWDOWN38_SSSE3 -#define HAS_SCALEROWDOWN4_SSSE3 -#define HAS_SCALEADDROW_SSE2 -#endif - -// The following are available on all x86 platforms, but -// require VS2012, clang 3.4 or gcc 4.7. -// The code supports NaCL but requires a new compiler and validator. -#if !defined(LIBYUV_DISABLE_X86) && \ - (defined(VISUALC_HAS_AVX2) || defined(CLANG_HAS_AVX2) || \ - defined(GCC_HAS_AVX2)) -#define HAS_SCALEADDROW_AVX2 -#define HAS_SCALEROWDOWN2_AVX2 -#define HAS_SCALEROWDOWN4_AVX2 -#endif - -// The following are available on Neon platforms: -#if !defined(LIBYUV_DISABLE_NEON) && !defined(__native_client__) && \ - (defined(__ARM_NEON__) || defined(LIBYUV_NEON) || defined(__aarch64__)) -#define HAS_SCALEARGBCOLS_NEON -#define HAS_SCALEARGBROWDOWN2_NEON -#define HAS_SCALEARGBROWDOWNEVEN_NEON -#define HAS_SCALEFILTERCOLS_NEON -#define HAS_SCALEROWDOWN2_NEON -#define HAS_SCALEROWDOWN34_NEON -#define HAS_SCALEROWDOWN38_NEON -#define HAS_SCALEROWDOWN4_NEON -#define HAS_SCALEARGBFILTERCOLS_NEON -#endif - -// The following are available on Mips platforms: -#if !defined(LIBYUV_DISABLE_MIPS) && !defined(__native_client__) && \ - defined(__mips__) && defined(__mips_dsp) && (__mips_dsp_rev >= 2) -#define HAS_SCALEROWDOWN2_DSPR2 -#define HAS_SCALEROWDOWN4_DSPR2 -#define HAS_SCALEROWDOWN34_DSPR2 -#define HAS_SCALEROWDOWN38_DSPR2 -#endif - -#if !defined(LIBYUV_DISABLE_MSA) && defined(__mips_msa) -#define HAS_SCALEARGBROWDOWN2_MSA -#define HAS_SCALEARGBROWDOWNEVEN_MSA -#endif - -// Scale ARGB vertically with bilinear interpolation. -void ScalePlaneVertical(int src_height, - int dst_width, - int dst_height, - int src_stride, - int dst_stride, - const uint8* src_argb, - uint8* dst_argb, - int x, - int y, - int dy, - int bpp, - enum FilterMode filtering); - -void ScalePlaneVertical_16(int src_height, - int dst_width, - int dst_height, - int src_stride, - int dst_stride, - const uint16* src_argb, - uint16* dst_argb, - int x, - int y, - int dy, - int wpp, - enum FilterMode filtering); - -// Simplify the filtering based on scale factors. -enum FilterMode ScaleFilterReduce(int src_width, - int src_height, - int dst_width, - int dst_height, - enum FilterMode filtering); - -// Divide num by div and return as 16.16 fixed point result. -int FixedDiv_C(int num, int div); -int FixedDiv_X86(int num, int div); -// Divide num - 1 by div - 1 and return as 16.16 fixed point result. -int FixedDiv1_C(int num, int div); -int FixedDiv1_X86(int num, int div); -#ifdef HAS_FIXEDDIV_X86 -#define FixedDiv FixedDiv_X86 -#define FixedDiv1 FixedDiv1_X86 -#else -#define FixedDiv FixedDiv_C -#define FixedDiv1 FixedDiv1_C -#endif - -// Compute slope values for stepping. -void ScaleSlope(int src_width, - int src_height, - int dst_width, - int dst_height, - enum FilterMode filtering, - int* x, - int* y, - int* dx, - int* dy); - -void ScaleRowDown2_C(const uint8* src_ptr, - ptrdiff_t src_stride, - uint8* dst, - int dst_width); -void ScaleRowDown2_16_C(const uint16* src_ptr, - ptrdiff_t src_stride, - uint16* dst, - int dst_width); -void ScaleRowDown2Linear_C(const uint8* src_ptr, - ptrdiff_t src_stride, - uint8* dst, - int dst_width); -void ScaleRowDown2Linear_16_C(const uint16* src_ptr, - ptrdiff_t src_stride, - uint16* dst, - int dst_width); -void ScaleRowDown2Box_C(const uint8* src_ptr, - ptrdiff_t src_stride, - uint8* dst, - int dst_width); -void ScaleRowDown2Box_Odd_C(const uint8* src_ptr, - ptrdiff_t src_stride, - uint8* dst, - int dst_width); -void ScaleRowDown2Box_16_C(const uint16* src_ptr, - ptrdiff_t src_stride, - uint16* dst, - int dst_width); -void ScaleRowDown4_C(const uint8* src_ptr, - ptrdiff_t src_stride, - uint8* dst, - int dst_width); -void ScaleRowDown4_16_C(const uint16* src_ptr, - ptrdiff_t src_stride, - uint16* dst, - int dst_width); -void ScaleRowDown4Box_C(const uint8* src_ptr, - ptrdiff_t src_stride, - uint8* dst, - int dst_width); -void ScaleRowDown4Box_16_C(const uint16* src_ptr, - ptrdiff_t src_stride, - uint16* dst, - int dst_width); -void ScaleRowDown34_C(const uint8* src_ptr, - ptrdiff_t src_stride, - uint8* dst, - int dst_width); -void ScaleRowDown34_16_C(const uint16* src_ptr, - ptrdiff_t src_stride, - uint16* dst, - int dst_width); -void ScaleRowDown34_0_Box_C(const uint8* src_ptr, - ptrdiff_t src_stride, - uint8* d, - int dst_width); -void ScaleRowDown34_0_Box_16_C(const uint16* src_ptr, - ptrdiff_t src_stride, - uint16* d, - int dst_width); -void ScaleRowDown34_1_Box_C(const uint8* src_ptr, - ptrdiff_t src_stride, - uint8* d, - int dst_width); -void ScaleRowDown34_1_Box_16_C(const uint16* src_ptr, - ptrdiff_t src_stride, - uint16* d, - int dst_width); -void ScaleCols_C(uint8* dst_ptr, - const uint8* src_ptr, - int dst_width, - int x, - int dx); -void ScaleCols_16_C(uint16* dst_ptr, - const uint16* src_ptr, - int dst_width, - int x, - int dx); -void ScaleColsUp2_C(uint8* dst_ptr, - const uint8* src_ptr, - int dst_width, - int, - int); -void ScaleColsUp2_16_C(uint16* dst_ptr, - const uint16* src_ptr, - int dst_width, - int, - int); -void ScaleFilterCols_C(uint8* dst_ptr, - const uint8* src_ptr, - int dst_width, - int x, - int dx); -void ScaleFilterCols_16_C(uint16* dst_ptr, - const uint16* src_ptr, - int dst_width, - int x, - int dx); -void ScaleFilterCols64_C(uint8* dst_ptr, - const uint8* src_ptr, - int dst_width, - int x, - int dx); -void ScaleFilterCols64_16_C(uint16* dst_ptr, - const uint16* src_ptr, - int dst_width, - int x, - int dx); -void ScaleRowDown38_C(const uint8* src_ptr, - ptrdiff_t src_stride, - uint8* dst, - int dst_width); -void ScaleRowDown38_16_C(const uint16* src_ptr, - ptrdiff_t src_stride, - uint16* dst, - int dst_width); -void ScaleRowDown38_3_Box_C(const uint8* src_ptr, - ptrdiff_t src_stride, - uint8* dst_ptr, - int dst_width); -void ScaleRowDown38_3_Box_16_C(const uint16* src_ptr, - ptrdiff_t src_stride, - uint16* dst_ptr, - int dst_width); -void ScaleRowDown38_2_Box_C(const uint8* src_ptr, - ptrdiff_t src_stride, - uint8* dst_ptr, - int dst_width); -void ScaleRowDown38_2_Box_16_C(const uint16* src_ptr, - ptrdiff_t src_stride, - uint16* dst_ptr, - int dst_width); -void ScaleAddRow_C(const uint8* src_ptr, uint16* dst_ptr, int src_width); -void ScaleAddRow_16_C(const uint16* src_ptr, uint32* dst_ptr, int src_width); -void ScaleARGBRowDown2_C(const uint8* src_argb, - ptrdiff_t src_stride, - uint8* dst_argb, - int dst_width); -void ScaleARGBRowDown2Linear_C(const uint8* src_argb, - ptrdiff_t src_stride, - uint8* dst_argb, - int dst_width); -void ScaleARGBRowDown2Box_C(const uint8* src_argb, - ptrdiff_t src_stride, - uint8* dst_argb, - int dst_width); -void ScaleARGBRowDownEven_C(const uint8* src_argb, - ptrdiff_t src_stride, - int src_stepx, - uint8* dst_argb, - int dst_width); -void ScaleARGBRowDownEvenBox_C(const uint8* src_argb, - ptrdiff_t src_stride, - int src_stepx, - uint8* dst_argb, - int dst_width); -void ScaleARGBCols_C(uint8* dst_argb, - const uint8* src_argb, - int dst_width, - int x, - int dx); -void ScaleARGBCols64_C(uint8* dst_argb, - const uint8* src_argb, - int dst_width, - int x, - int dx); -void ScaleARGBColsUp2_C(uint8* dst_argb, - const uint8* src_argb, - int dst_width, - int, - int); -void ScaleARGBFilterCols_C(uint8* dst_argb, - const uint8* src_argb, - int dst_width, - int x, - int dx); -void ScaleARGBFilterCols64_C(uint8* dst_argb, - const uint8* src_argb, - int dst_width, - int x, - int dx); - -// Specialized scalers for x86. -void ScaleRowDown2_SSSE3(const uint8* src_ptr, - ptrdiff_t src_stride, - uint8* dst_ptr, - int dst_width); -void ScaleRowDown2Linear_SSSE3(const uint8* src_ptr, - ptrdiff_t src_stride, - uint8* dst_ptr, - int dst_width); -void ScaleRowDown2Box_SSSE3(const uint8* src_ptr, - ptrdiff_t src_stride, - uint8* dst_ptr, - int dst_width); -void ScaleRowDown2_AVX2(const uint8* src_ptr, - ptrdiff_t src_stride, - uint8* dst_ptr, - int dst_width); -void ScaleRowDown2Linear_AVX2(const uint8* src_ptr, - ptrdiff_t src_stride, - uint8* dst_ptr, - int dst_width); -void ScaleRowDown2Box_AVX2(const uint8* src_ptr, - ptrdiff_t src_stride, - uint8* dst_ptr, - int dst_width); -void ScaleRowDown4_SSSE3(const uint8* src_ptr, - ptrdiff_t src_stride, - uint8* dst_ptr, - int dst_width); -void ScaleRowDown4Box_SSSE3(const uint8* src_ptr, - ptrdiff_t src_stride, - uint8* dst_ptr, - int dst_width); -void ScaleRowDown4_AVX2(const uint8* src_ptr, - ptrdiff_t src_stride, - uint8* dst_ptr, - int dst_width); -void ScaleRowDown4Box_AVX2(const uint8* src_ptr, - ptrdiff_t src_stride, - uint8* dst_ptr, - int dst_width); - -void ScaleRowDown34_SSSE3(const uint8* src_ptr, - ptrdiff_t src_stride, - uint8* dst_ptr, - int dst_width); -void ScaleRowDown34_1_Box_SSSE3(const uint8* src_ptr, - ptrdiff_t src_stride, - uint8* dst_ptr, - int dst_width); -void ScaleRowDown34_0_Box_SSSE3(const uint8* src_ptr, - ptrdiff_t src_stride, - uint8* dst_ptr, - int dst_width); -void ScaleRowDown38_SSSE3(const uint8* src_ptr, - ptrdiff_t src_stride, - uint8* dst_ptr, - int dst_width); -void ScaleRowDown38_3_Box_SSSE3(const uint8* src_ptr, - ptrdiff_t src_stride, - uint8* dst_ptr, - int dst_width); -void ScaleRowDown38_2_Box_SSSE3(const uint8* src_ptr, - ptrdiff_t src_stride, - uint8* dst_ptr, - int dst_width); -void ScaleRowDown2_Any_SSSE3(const uint8* src_ptr, - ptrdiff_t src_stride, - uint8* dst_ptr, - int dst_width); -void ScaleRowDown2Linear_Any_SSSE3(const uint8* src_ptr, - ptrdiff_t src_stride, - uint8* dst_ptr, - int dst_width); -void ScaleRowDown2Box_Any_SSSE3(const uint8* src_ptr, - ptrdiff_t src_stride, - uint8* dst_ptr, - int dst_width); -void ScaleRowDown2Box_Odd_SSSE3(const uint8* src_ptr, - ptrdiff_t src_stride, - uint8* dst_ptr, - int dst_width); -void ScaleRowDown2_Any_AVX2(const uint8* src_ptr, - ptrdiff_t src_stride, - uint8* dst_ptr, - int dst_width); -void ScaleRowDown2Linear_Any_AVX2(const uint8* src_ptr, - ptrdiff_t src_stride, - uint8* dst_ptr, - int dst_width); -void ScaleRowDown2Box_Any_AVX2(const uint8* src_ptr, - ptrdiff_t src_stride, - uint8* dst_ptr, - int dst_width); -void ScaleRowDown2Box_Odd_AVX2(const uint8* src_ptr, - ptrdiff_t src_stride, - uint8* dst_ptr, - int dst_width); -void ScaleRowDown4_Any_SSSE3(const uint8* src_ptr, - ptrdiff_t src_stride, - uint8* dst_ptr, - int dst_width); -void ScaleRowDown4Box_Any_SSSE3(const uint8* src_ptr, - ptrdiff_t src_stride, - uint8* dst_ptr, - int dst_width); -void ScaleRowDown4_Any_AVX2(const uint8* src_ptr, - ptrdiff_t src_stride, - uint8* dst_ptr, - int dst_width); -void ScaleRowDown4Box_Any_AVX2(const uint8* src_ptr, - ptrdiff_t src_stride, - uint8* dst_ptr, - int dst_width); - -void ScaleRowDown34_Any_SSSE3(const uint8* src_ptr, - ptrdiff_t src_stride, - uint8* dst_ptr, - int dst_width); -void ScaleRowDown34_1_Box_Any_SSSE3(const uint8* src_ptr, - ptrdiff_t src_stride, - uint8* dst_ptr, - int dst_width); -void ScaleRowDown34_0_Box_Any_SSSE3(const uint8* src_ptr, - ptrdiff_t src_stride, - uint8* dst_ptr, - int dst_width); -void ScaleRowDown38_Any_SSSE3(const uint8* src_ptr, - ptrdiff_t src_stride, - uint8* dst_ptr, - int dst_width); -void ScaleRowDown38_3_Box_Any_SSSE3(const uint8* src_ptr, - ptrdiff_t src_stride, - uint8* dst_ptr, - int dst_width); -void ScaleRowDown38_2_Box_Any_SSSE3(const uint8* src_ptr, - ptrdiff_t src_stride, - uint8* dst_ptr, - int dst_width); - -void ScaleAddRow_SSE2(const uint8* src_ptr, uint16* dst_ptr, int src_width); -void ScaleAddRow_AVX2(const uint8* src_ptr, uint16* dst_ptr, int src_width); -void ScaleAddRow_Any_SSE2(const uint8* src_ptr, uint16* dst_ptr, int src_width); -void ScaleAddRow_Any_AVX2(const uint8* src_ptr, uint16* dst_ptr, int src_width); - -void ScaleFilterCols_SSSE3(uint8* dst_ptr, - const uint8* src_ptr, - int dst_width, - int x, - int dx); -void ScaleColsUp2_SSE2(uint8* dst_ptr, - const uint8* src_ptr, - int dst_width, - int x, - int dx); - -// ARGB Column functions -void ScaleARGBCols_SSE2(uint8* dst_argb, - const uint8* src_argb, - int dst_width, - int x, - int dx); -void ScaleARGBFilterCols_SSSE3(uint8* dst_argb, - const uint8* src_argb, - int dst_width, - int x, - int dx); -void ScaleARGBColsUp2_SSE2(uint8* dst_argb, - const uint8* src_argb, - int dst_width, - int x, - int dx); -void ScaleARGBFilterCols_NEON(uint8* dst_argb, - const uint8* src_argb, - int dst_width, - int x, - int dx); -void ScaleARGBCols_NEON(uint8* dst_argb, - const uint8* src_argb, - int dst_width, - int x, - int dx); -void ScaleARGBFilterCols_Any_NEON(uint8* dst_argb, - const uint8* src_argb, - int dst_width, - int x, - int dx); -void ScaleARGBCols_Any_NEON(uint8* dst_argb, - const uint8* src_argb, - int dst_width, - int x, - int dx); - -// ARGB Row functions -void ScaleARGBRowDown2_SSE2(const uint8* src_argb, - ptrdiff_t src_stride, - uint8* dst_argb, - int dst_width); -void ScaleARGBRowDown2Linear_SSE2(const uint8* src_argb, - ptrdiff_t src_stride, - uint8* dst_argb, - int dst_width); -void ScaleARGBRowDown2Box_SSE2(const uint8* src_argb, - ptrdiff_t src_stride, - uint8* dst_argb, - int dst_width); -void ScaleARGBRowDown2_NEON(const uint8* src_ptr, - ptrdiff_t src_stride, - uint8* dst, - int dst_width); -void ScaleARGBRowDown2Linear_NEON(const uint8* src_argb, - ptrdiff_t src_stride, - uint8* dst_argb, - int dst_width); -void ScaleARGBRowDown2Box_NEON(const uint8* src_ptr, - ptrdiff_t src_stride, - uint8* dst, - int dst_width); -void ScaleARGBRowDown2_MSA(const uint8_t* src_argb, - ptrdiff_t src_stride, - uint8_t* dst_argb, - int dst_width); -void ScaleARGBRowDown2Linear_MSA(const uint8_t* src_argb, - ptrdiff_t src_stride, - uint8_t* dst_argb, - int dst_width); -void ScaleARGBRowDown2Box_MSA(const uint8_t* src_argb, - ptrdiff_t src_stride, - uint8_t* dst_argb, - int dst_width); -void ScaleARGBRowDown2_Any_SSE2(const uint8* src_argb, - ptrdiff_t src_stride, - uint8* dst_argb, - int dst_width); -void ScaleARGBRowDown2Linear_Any_SSE2(const uint8* src_argb, - ptrdiff_t src_stride, - uint8* dst_argb, - int dst_width); -void ScaleARGBRowDown2Box_Any_SSE2(const uint8* src_argb, - ptrdiff_t src_stride, - uint8* dst_argb, - int dst_width); -void ScaleARGBRowDown2_Any_NEON(const uint8* src_ptr, - ptrdiff_t src_stride, - uint8* dst, - int dst_width); -void ScaleARGBRowDown2Linear_Any_NEON(const uint8* src_argb, - ptrdiff_t src_stride, - uint8* dst_argb, - int dst_width); -void ScaleARGBRowDown2Box_Any_NEON(const uint8* src_ptr, - ptrdiff_t src_stride, - uint8* dst, - int dst_width); -void ScaleARGBRowDown2_Any_MSA(const uint8_t* src_argb, - ptrdiff_t src_stride, - uint8_t* dst_argb, - int dst_width); -void ScaleARGBRowDown2Linear_Any_MSA(const uint8_t* src_argb, - ptrdiff_t src_stride, - uint8_t* dst_argb, - int dst_width); -void ScaleARGBRowDown2Box_Any_MSA(const uint8_t* src_argb, - ptrdiff_t src_stride, - uint8_t* dst_argb, - int dst_width); - -void ScaleARGBRowDownEven_SSE2(const uint8* src_argb, - ptrdiff_t src_stride, - int src_stepx, - uint8* dst_argb, - int dst_width); -void ScaleARGBRowDownEvenBox_SSE2(const uint8* src_argb, - ptrdiff_t src_stride, - int src_stepx, - uint8* dst_argb, - int dst_width); -void ScaleARGBRowDownEven_NEON(const uint8* src_argb, - ptrdiff_t src_stride, - int src_stepx, - uint8* dst_argb, - int dst_width); -void ScaleARGBRowDownEvenBox_NEON(const uint8* src_argb, - ptrdiff_t src_stride, - int src_stepx, - uint8* dst_argb, - int dst_width); -void ScaleARGBRowDownEven_MSA(const uint8_t* src_argb, - ptrdiff_t src_stride, - int32_t src_stepx, - uint8_t* dst_argb, - int dst_width); -void ScaleARGBRowDownEvenBox_MSA(const uint8* src_argb, - ptrdiff_t src_stride, - int src_stepx, - uint8* dst_argb, - int dst_width); -void ScaleARGBRowDownEven_Any_SSE2(const uint8* src_argb, - ptrdiff_t src_stride, - int src_stepx, - uint8* dst_argb, - int dst_width); -void ScaleARGBRowDownEvenBox_Any_SSE2(const uint8* src_argb, - ptrdiff_t src_stride, - int src_stepx, - uint8* dst_argb, - int dst_width); -void ScaleARGBRowDownEven_Any_NEON(const uint8* src_argb, - ptrdiff_t src_stride, - int src_stepx, - uint8* dst_argb, - int dst_width); -void ScaleARGBRowDownEvenBox_Any_NEON(const uint8* src_argb, - ptrdiff_t src_stride, - int src_stepx, - uint8* dst_argb, - int dst_width); -void ScaleARGBRowDownEven_Any_MSA(const uint8_t* src_argb, - ptrdiff_t src_stride, - int32_t src_stepx, - uint8_t* dst_argb, - int dst_width); -void ScaleARGBRowDownEvenBox_Any_MSA(const uint8* src_argb, - ptrdiff_t src_stride, - int src_stepx, - uint8* dst_argb, - int dst_width); - -// ScaleRowDown2Box also used by planar functions -// NEON downscalers with interpolation. - -// Note - not static due to reuse in convert for 444 to 420. -void ScaleRowDown2_NEON(const uint8* src_ptr, - ptrdiff_t src_stride, - uint8* dst, - int dst_width); -void ScaleRowDown2Linear_NEON(const uint8* src_ptr, - ptrdiff_t src_stride, - uint8* dst, - int dst_width); -void ScaleRowDown2Box_NEON(const uint8* src_ptr, - ptrdiff_t src_stride, - uint8* dst, - int dst_width); - -void ScaleRowDown4_NEON(const uint8* src_ptr, - ptrdiff_t src_stride, - uint8* dst_ptr, - int dst_width); -void ScaleRowDown4Box_NEON(const uint8* src_ptr, - ptrdiff_t src_stride, - uint8* dst_ptr, - int dst_width); - -// Down scale from 4 to 3 pixels. Use the neon multilane read/write -// to load up the every 4th pixel into a 4 different registers. -// Point samples 32 pixels to 24 pixels. -void ScaleRowDown34_NEON(const uint8* src_ptr, - ptrdiff_t src_stride, - uint8* dst_ptr, - int dst_width); -void ScaleRowDown34_0_Box_NEON(const uint8* src_ptr, - ptrdiff_t src_stride, - uint8* dst_ptr, - int dst_width); -void ScaleRowDown34_1_Box_NEON(const uint8* src_ptr, - ptrdiff_t src_stride, - uint8* dst_ptr, - int dst_width); - -// 32 -> 12 -void ScaleRowDown38_NEON(const uint8* src_ptr, - ptrdiff_t src_stride, - uint8* dst_ptr, - int dst_width); -// 32x3 -> 12x1 -void ScaleRowDown38_3_Box_NEON(const uint8* src_ptr, - ptrdiff_t src_stride, - uint8* dst_ptr, - int dst_width); -// 32x2 -> 12x1 -void ScaleRowDown38_2_Box_NEON(const uint8* src_ptr, - ptrdiff_t src_stride, - uint8* dst_ptr, - int dst_width); - -void ScaleRowDown2_Any_NEON(const uint8* src_ptr, - ptrdiff_t src_stride, - uint8* dst, - int dst_width); -void ScaleRowDown2Linear_Any_NEON(const uint8* src_ptr, - ptrdiff_t src_stride, - uint8* dst, - int dst_width); -void ScaleRowDown2Box_Any_NEON(const uint8* src_ptr, - ptrdiff_t src_stride, - uint8* dst, - int dst_width); -void ScaleRowDown2Box_Odd_NEON(const uint8* src_ptr, - ptrdiff_t src_stride, - uint8* dst, - int dst_width); -void ScaleRowDown4_Any_NEON(const uint8* src_ptr, - ptrdiff_t src_stride, - uint8* dst_ptr, - int dst_width); -void ScaleRowDown4Box_Any_NEON(const uint8* src_ptr, - ptrdiff_t src_stride, - uint8* dst_ptr, - int dst_width); -void ScaleRowDown34_Any_NEON(const uint8* src_ptr, - ptrdiff_t src_stride, - uint8* dst_ptr, - int dst_width); -void ScaleRowDown34_0_Box_Any_NEON(const uint8* src_ptr, - ptrdiff_t src_stride, - uint8* dst_ptr, - int dst_width); -void ScaleRowDown34_1_Box_Any_NEON(const uint8* src_ptr, - ptrdiff_t src_stride, - uint8* dst_ptr, - int dst_width); -// 32 -> 12 -void ScaleRowDown38_Any_NEON(const uint8* src_ptr, - ptrdiff_t src_stride, - uint8* dst_ptr, - int dst_width); -// 32x3 -> 12x1 -void ScaleRowDown38_3_Box_Any_NEON(const uint8* src_ptr, - ptrdiff_t src_stride, - uint8* dst_ptr, - int dst_width); -// 32x2 -> 12x1 -void ScaleRowDown38_2_Box_Any_NEON(const uint8* src_ptr, - ptrdiff_t src_stride, - uint8* dst_ptr, - int dst_width); - -void ScaleAddRow_NEON(const uint8* src_ptr, uint16* dst_ptr, int src_width); -void ScaleAddRow_Any_NEON(const uint8* src_ptr, uint16* dst_ptr, int src_width); - -void ScaleFilterCols_NEON(uint8* dst_ptr, - const uint8* src_ptr, - int dst_width, - int x, - int dx); - -void ScaleFilterCols_Any_NEON(uint8* dst_ptr, - const uint8* src_ptr, - int dst_width, - int x, - int dx); - -void ScaleRowDown2_DSPR2(const uint8* src_ptr, - ptrdiff_t src_stride, - uint8* dst, - int dst_width); -void ScaleRowDown2Box_DSPR2(const uint8* src_ptr, - ptrdiff_t src_stride, - uint8* dst, - int dst_width); -void ScaleRowDown4_DSPR2(const uint8* src_ptr, - ptrdiff_t src_stride, - uint8* dst, - int dst_width); -void ScaleRowDown4Box_DSPR2(const uint8* src_ptr, - ptrdiff_t src_stride, - uint8* dst, - int dst_width); -void ScaleRowDown34_DSPR2(const uint8* src_ptr, - ptrdiff_t src_stride, - uint8* dst, - int dst_width); -void ScaleRowDown34_0_Box_DSPR2(const uint8* src_ptr, - ptrdiff_t src_stride, - uint8* d, - int dst_width); -void ScaleRowDown34_1_Box_DSPR2(const uint8* src_ptr, - ptrdiff_t src_stride, - uint8* d, - int dst_width); -void ScaleRowDown38_DSPR2(const uint8* src_ptr, - ptrdiff_t src_stride, - uint8* dst, - int dst_width); -void ScaleRowDown38_2_Box_DSPR2(const uint8* src_ptr, - ptrdiff_t src_stride, - uint8* dst_ptr, - int dst_width); -void ScaleRowDown38_3_Box_DSPR2(const uint8* src_ptr, - ptrdiff_t src_stride, - uint8* dst_ptr, - int dst_width); - -#ifdef __cplusplus -} // extern "C" -} // namespace libyuv -#endif - -#endif // INCLUDE_LIBYUV_SCALE_ROW_H_ diff --git a/WebRtc.NET/include/third_party/libyuv/include/libyuv/version.h b/WebRtc.NET/include/third_party/libyuv/include/libyuv/version.h deleted file mode 100644 index ba5b5f6d..00000000 --- a/WebRtc.NET/include/third_party/libyuv/include/libyuv/version.h +++ /dev/null @@ -1,16 +0,0 @@ -/* - * Copyright 2012 The LibYuv Project Authors. All rights reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef INCLUDE_LIBYUV_VERSION_H_ -#define INCLUDE_LIBYUV_VERSION_H_ - -#define LIBYUV_VERSION 1637 - -#endif // INCLUDE_LIBYUV_VERSION_H_ diff --git a/WebRtc.NET/include/third_party/libyuv/include/libyuv/video_common.h b/WebRtc.NET/include/third_party/libyuv/include/libyuv/video_common.h deleted file mode 100644 index f3711c42..00000000 --- a/WebRtc.NET/include/third_party/libyuv/include/libyuv/video_common.h +++ /dev/null @@ -1,184 +0,0 @@ -/* - * Copyright 2011 The LibYuv Project Authors. All rights reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -// Common definitions for video, including fourcc and VideoFormat. - -#ifndef INCLUDE_LIBYUV_VIDEO_COMMON_H_ -#define INCLUDE_LIBYUV_VIDEO_COMMON_H_ - -#include "libyuv/basic_types.h" - -#ifdef __cplusplus -namespace libyuv { -extern "C" { -#endif - -////////////////////////////////////////////////////////////////////////////// -// Definition of FourCC codes -////////////////////////////////////////////////////////////////////////////// - -// Convert four characters to a FourCC code. -// Needs to be a macro otherwise the OS X compiler complains when the kFormat* -// constants are used in a switch. -#ifdef __cplusplus -#define FOURCC(a, b, c, d) \ - ((static_cast(a)) | (static_cast(b) << 8) | \ - (static_cast(c) << 16) | (static_cast(d) << 24)) -#else -#define FOURCC(a, b, c, d) \ - (((uint32)(a)) | ((uint32)(b) << 8) | /* NOLINT */ \ - ((uint32)(c) << 16) | ((uint32)(d) << 24)) /* NOLINT */ -#endif - -// Some pages discussing FourCC codes: -// http://www.fourcc.org/yuv.php -// http://v4l2spec.bytesex.org/spec/book1.htm -// http://developer.apple.com/quicktime/icefloe/dispatch020.html -// http://msdn.microsoft.com/library/windows/desktop/dd206750.aspx#nv12 -// http://people.xiph.org/~xiphmont/containers/nut/nut4cc.txt - -// FourCC codes grouped according to implementation efficiency. -// Primary formats should convert in 1 efficient step. -// Secondary formats are converted in 2 steps. -// Auxilliary formats call primary converters. -enum FourCC { - // 8 Primary YUV formats: 5 planar, 2 biplanar, 2 packed. - FOURCC_I420 = FOURCC('I', '4', '2', '0'), - FOURCC_I422 = FOURCC('I', '4', '2', '2'), - FOURCC_I444 = FOURCC('I', '4', '4', '4'), - FOURCC_I411 = FOURCC('I', '4', '1', '1'), // deprecated. - FOURCC_I400 = FOURCC('I', '4', '0', '0'), - FOURCC_NV21 = FOURCC('N', 'V', '2', '1'), - FOURCC_NV12 = FOURCC('N', 'V', '1', '2'), - FOURCC_YUY2 = FOURCC('Y', 'U', 'Y', '2'), - FOURCC_UYVY = FOURCC('U', 'Y', 'V', 'Y'), - - // 1 Secondary YUV format: row biplanar. - FOURCC_M420 = FOURCC('M', '4', '2', '0'), - FOURCC_Q420 = FOURCC('Q', '4', '2', '0'), // deprecated. - - // 9 Primary RGB formats: 4 32 bpp, 2 24 bpp, 3 16 bpp. - FOURCC_ARGB = FOURCC('A', 'R', 'G', 'B'), - FOURCC_BGRA = FOURCC('B', 'G', 'R', 'A'), - FOURCC_ABGR = FOURCC('A', 'B', 'G', 'R'), - FOURCC_24BG = FOURCC('2', '4', 'B', 'G'), - FOURCC_RAW = FOURCC('r', 'a', 'w', ' '), - FOURCC_RGBA = FOURCC('R', 'G', 'B', 'A'), - FOURCC_RGBP = FOURCC('R', 'G', 'B', 'P'), // rgb565 LE. - FOURCC_RGBO = FOURCC('R', 'G', 'B', 'O'), // argb1555 LE. - FOURCC_R444 = FOURCC('R', '4', '4', '4'), // argb4444 LE. - - // 4 Secondary RGB formats: 4 Bayer Patterns. deprecated. - FOURCC_RGGB = FOURCC('R', 'G', 'G', 'B'), - FOURCC_BGGR = FOURCC('B', 'G', 'G', 'R'), - FOURCC_GRBG = FOURCC('G', 'R', 'B', 'G'), - FOURCC_GBRG = FOURCC('G', 'B', 'R', 'G'), - - // 1 Primary Compressed YUV format. - FOURCC_MJPG = FOURCC('M', 'J', 'P', 'G'), - - // 5 Auxiliary YUV variations: 3 with U and V planes are swapped, 1 Alias. - FOURCC_YV12 = FOURCC('Y', 'V', '1', '2'), - FOURCC_YV16 = FOURCC('Y', 'V', '1', '6'), - FOURCC_YV24 = FOURCC('Y', 'V', '2', '4'), - FOURCC_YU12 = FOURCC('Y', 'U', '1', '2'), // Linux version of I420. - FOURCC_J420 = FOURCC('J', '4', '2', '0'), - FOURCC_J400 = FOURCC('J', '4', '0', '0'), // unofficial fourcc - FOURCC_H420 = FOURCC('H', '4', '2', '0'), // unofficial fourcc - - // 14 Auxiliary aliases. CanonicalFourCC() maps these to canonical fourcc. - FOURCC_IYUV = FOURCC('I', 'Y', 'U', 'V'), // Alias for I420. - FOURCC_YU16 = FOURCC('Y', 'U', '1', '6'), // Alias for I422. - FOURCC_YU24 = FOURCC('Y', 'U', '2', '4'), // Alias for I444. - FOURCC_YUYV = FOURCC('Y', 'U', 'Y', 'V'), // Alias for YUY2. - FOURCC_YUVS = FOURCC('y', 'u', 'v', 's'), // Alias for YUY2 on Mac. - FOURCC_HDYC = FOURCC('H', 'D', 'Y', 'C'), // Alias for UYVY. - FOURCC_2VUY = FOURCC('2', 'v', 'u', 'y'), // Alias for UYVY on Mac. - FOURCC_JPEG = FOURCC('J', 'P', 'E', 'G'), // Alias for MJPG. - FOURCC_DMB1 = FOURCC('d', 'm', 'b', '1'), // Alias for MJPG on Mac. - FOURCC_BA81 = FOURCC('B', 'A', '8', '1'), // Alias for BGGR. - FOURCC_RGB3 = FOURCC('R', 'G', 'B', '3'), // Alias for RAW. - FOURCC_BGR3 = FOURCC('B', 'G', 'R', '3'), // Alias for 24BG. - FOURCC_CM32 = FOURCC(0, 0, 0, 32), // Alias for BGRA kCMPixelFormat_32ARGB - FOURCC_CM24 = FOURCC(0, 0, 0, 24), // Alias for RAW kCMPixelFormat_24RGB - FOURCC_L555 = FOURCC('L', '5', '5', '5'), // Alias for RGBO. - FOURCC_L565 = FOURCC('L', '5', '6', '5'), // Alias for RGBP. - FOURCC_5551 = FOURCC('5', '5', '5', '1'), // Alias for RGBO. - - // 1 Auxiliary compressed YUV format set aside for capturer. - FOURCC_H264 = FOURCC('H', '2', '6', '4'), - - // Match any fourcc. - FOURCC_ANY = -1, -}; - -enum FourCCBpp { - // Canonical fourcc codes used in our code. - FOURCC_BPP_I420 = 12, - FOURCC_BPP_I422 = 16, - FOURCC_BPP_I444 = 24, - FOURCC_BPP_I411 = 12, - FOURCC_BPP_I400 = 8, - FOURCC_BPP_NV21 = 12, - FOURCC_BPP_NV12 = 12, - FOURCC_BPP_YUY2 = 16, - FOURCC_BPP_UYVY = 16, - FOURCC_BPP_M420 = 12, - FOURCC_BPP_Q420 = 12, - FOURCC_BPP_ARGB = 32, - FOURCC_BPP_BGRA = 32, - FOURCC_BPP_ABGR = 32, - FOURCC_BPP_RGBA = 32, - FOURCC_BPP_24BG = 24, - FOURCC_BPP_RAW = 24, - FOURCC_BPP_RGBP = 16, - FOURCC_BPP_RGBO = 16, - FOURCC_BPP_R444 = 16, - FOURCC_BPP_RGGB = 8, - FOURCC_BPP_BGGR = 8, - FOURCC_BPP_GRBG = 8, - FOURCC_BPP_GBRG = 8, - FOURCC_BPP_YV12 = 12, - FOURCC_BPP_YV16 = 16, - FOURCC_BPP_YV24 = 24, - FOURCC_BPP_YU12 = 12, - FOURCC_BPP_J420 = 12, - FOURCC_BPP_J400 = 8, - FOURCC_BPP_H420 = 12, - FOURCC_BPP_MJPG = 0, // 0 means unknown. - FOURCC_BPP_H264 = 0, - FOURCC_BPP_IYUV = 12, - FOURCC_BPP_YU16 = 16, - FOURCC_BPP_YU24 = 24, - FOURCC_BPP_YUYV = 16, - FOURCC_BPP_YUVS = 16, - FOURCC_BPP_HDYC = 16, - FOURCC_BPP_2VUY = 16, - FOURCC_BPP_JPEG = 1, - FOURCC_BPP_DMB1 = 1, - FOURCC_BPP_BA81 = 8, - FOURCC_BPP_RGB3 = 24, - FOURCC_BPP_BGR3 = 24, - FOURCC_BPP_CM32 = 32, - FOURCC_BPP_CM24 = 24, - - // Match any fourcc. - FOURCC_BPP_ANY = 0, // 0 means unknown. -}; - -// Converts fourcc aliases into canonical ones. -LIBYUV_API uint32 CanonicalFourCC(uint32 fourcc); - -#ifdef __cplusplus -} // extern "C" -} // namespace libyuv -#endif - -#endif // INCLUDE_LIBYUV_VIDEO_COMMON_H_ diff --git a/WebRtc.NET/include/turbojpeg/jconfig.h b/WebRtc.NET/include/turbojpeg/jconfig.h deleted file mode 100644 index a9d363e2..00000000 --- a/WebRtc.NET/include/turbojpeg/jconfig.h +++ /dev/null @@ -1,51 +0,0 @@ -/* jconfig.vc --- jconfig.h for Microsoft Visual C++ on Windows 95 or NT. */ -/* see jconfig.txt for explanations */ - -#define JPEG_LIB_VERSION 62 -#define LIBJPEG_TURBO_VERSION 1.5.1 -#define LIBJPEG_TURBO_VERSION_NUMBER 1005001 -#define C_ARITH_CODING_SUPPORTED -#define D_ARITH_CODING_SUPPORTED -#define MEM_SRCDST_SUPPORTED - -/* - * Define BITS_IN_JSAMPLE as either - * 8 for 8-bit sample values (the usual setting) - * 12 for 12-bit sample values - * Only 8 and 12 are legal data precisions for lossy JPEG according to the - * JPEG standard, and the IJG code does not support anything else! - * We do not support run-time selection of data precision, sorry. - */ - -#define BITS_IN_JSAMPLE 8 /* use 8 or 12 */ - -#define HAVE_UNSIGNED_CHAR -#define HAVE_UNSIGNED_SHORT -/* #define void char */ -/* #define const */ -#undef __CHAR_UNSIGNED__ -#define HAVE_STDDEF_H -#define HAVE_STDLIB_H -#undef NEED_BSD_STRINGS -#undef NEED_SYS_TYPES_H -#undef NEED_FAR_POINTERS /* we presume a 32-bit flat memory model */ -#undef INCOMPLETE_TYPES_BROKEN - -/* Define "boolean" as unsigned char, not int, per Windows custom */ -#ifndef __RPCNDR_H__ /* don't conflict if rpcndr.h already read */ -typedef unsigned char boolean; -#endif -#define HAVE_BOOLEAN /* prevent jmorecfg.h from redefining it */ - -/* Define "INT32" as int, not long, per Windows custom */ -#if !(defined(_BASETSD_H_) || defined(_BASETSD_H)) /* don't conflict if basetsd.h already read */ -typedef short INT16; -typedef signed int INT32; -#endif -#define XMD_H /* prevent jmorecfg.h from redefining it */ - -#ifdef JPEG_INTERNALS - -#undef RIGHT_SHIFT_IS_UNSIGNED - -#endif /* JPEG_INTERNALS */ diff --git a/WebRtc.NET/include/turbojpeg/jpeglib.h b/WebRtc.NET/include/turbojpeg/jpeglib.h deleted file mode 100644 index 6c63f582..00000000 --- a/WebRtc.NET/include/turbojpeg/jpeglib.h +++ /dev/null @@ -1,1122 +0,0 @@ -/* - * jpeglib.h - * - * This file was part of the Independent JPEG Group's software: - * Copyright (C) 1991-1998, Thomas G. Lane. - * Modified 2002-2009 by Guido Vollbeding. - * libjpeg-turbo Modifications: - * Copyright (C) 2009-2011, 2013-2014, 2016, D. R. Commander. - * Copyright (C) 2015, Google, Inc. - * For conditions of distribution and use, see the accompanying README.ijg - * file. - * - * This file defines the application interface for the JPEG library. - * Most applications using the library need only include this file, - * and perhaps jerror.h if they want to know the exact error codes. - */ - -#ifndef JPEGLIB_H -#define JPEGLIB_H - -/* - * First we include the configuration files that record how this - * installation of the JPEG library is set up. jconfig.h can be - * generated automatically for many systems. jmorecfg.h contains - * manual configuration options that most people need not worry about. - */ - -#ifndef JCONFIG_INCLUDED /* in case jinclude.h already did */ -#include "jconfig.h" /* widely used configuration options */ -#endif -#include "jmorecfg.h" /* seldom changed options */ - - -#ifdef __cplusplus -#ifndef DONT_USE_EXTERN_C -extern "C" { -#endif -#endif - - -/* Various constants determining the sizes of things. - * All of these are specified by the JPEG standard, so don't change them - * if you want to be compatible. - */ - -#define DCTSIZE 8 /* The basic DCT block is 8x8 samples */ -#define DCTSIZE2 64 /* DCTSIZE squared; # of elements in a block */ -#define NUM_QUANT_TBLS 4 /* Quantization tables are numbered 0..3 */ -#define NUM_HUFF_TBLS 4 /* Huffman tables are numbered 0..3 */ -#define NUM_ARITH_TBLS 16 /* Arith-coding tables are numbered 0..15 */ -#define MAX_COMPS_IN_SCAN 4 /* JPEG limit on # of components in one scan */ -#define MAX_SAMP_FACTOR 4 /* JPEG limit on sampling factors */ -/* Unfortunately, some bozo at Adobe saw no reason to be bound by the standard; - * the PostScript DCT filter can emit files with many more than 10 blocks/MCU. - * If you happen to run across such a file, you can up D_MAX_BLOCKS_IN_MCU - * to handle it. We even let you do this from the jconfig.h file. However, - * we strongly discourage changing C_MAX_BLOCKS_IN_MCU; just because Adobe - * sometimes emits noncompliant files doesn't mean you should too. - */ -#define C_MAX_BLOCKS_IN_MCU 10 /* compressor's limit on blocks per MCU */ -#ifndef D_MAX_BLOCKS_IN_MCU -#define D_MAX_BLOCKS_IN_MCU 10 /* decompressor's limit on blocks per MCU */ -#endif - - -/* Data structures for images (arrays of samples and of DCT coefficients). - */ - -typedef JSAMPLE *JSAMPROW; /* ptr to one image row of pixel samples. */ -typedef JSAMPROW *JSAMPARRAY; /* ptr to some rows (a 2-D sample array) */ -typedef JSAMPARRAY *JSAMPIMAGE; /* a 3-D sample array: top index is color */ - -typedef JCOEF JBLOCK[DCTSIZE2]; /* one block of coefficients */ -typedef JBLOCK *JBLOCKROW; /* pointer to one row of coefficient blocks */ -typedef JBLOCKROW *JBLOCKARRAY; /* a 2-D array of coefficient blocks */ -typedef JBLOCKARRAY *JBLOCKIMAGE; /* a 3-D array of coefficient blocks */ - -typedef JCOEF *JCOEFPTR; /* useful in a couple of places */ - - -/* Types for JPEG compression parameters and working tables. */ - - -/* DCT coefficient quantization tables. */ - -typedef struct { - /* This array gives the coefficient quantizers in natural array order - * (not the zigzag order in which they are stored in a JPEG DQT marker). - * CAUTION: IJG versions prior to v6a kept this array in zigzag order. - */ - UINT16 quantval[DCTSIZE2]; /* quantization step for each coefficient */ - /* This field is used only during compression. It's initialized FALSE when - * the table is created, and set TRUE when it's been output to the file. - * You could suppress output of a table by setting this to TRUE. - * (See jpeg_suppress_tables for an example.) - */ - boolean sent_table; /* TRUE when table has been output */ -} JQUANT_TBL; - - -/* Huffman coding tables. */ - -typedef struct { - /* These two fields directly represent the contents of a JPEG DHT marker */ - UINT8 bits[17]; /* bits[k] = # of symbols with codes of */ - /* length k bits; bits[0] is unused */ - UINT8 huffval[256]; /* The symbols, in order of incr code length */ - /* This field is used only during compression. It's initialized FALSE when - * the table is created, and set TRUE when it's been output to the file. - * You could suppress output of a table by setting this to TRUE. - * (See jpeg_suppress_tables for an example.) - */ - boolean sent_table; /* TRUE when table has been output */ -} JHUFF_TBL; - - -/* Basic info about one component (color channel). */ - -typedef struct { - /* These values are fixed over the whole image. */ - /* For compression, they must be supplied by parameter setup; */ - /* for decompression, they are read from the SOF marker. */ - int component_id; /* identifier for this component (0..255) */ - int component_index; /* its index in SOF or cinfo->comp_info[] */ - int h_samp_factor; /* horizontal sampling factor (1..4) */ - int v_samp_factor; /* vertical sampling factor (1..4) */ - int quant_tbl_no; /* quantization table selector (0..3) */ - /* These values may vary between scans. */ - /* For compression, they must be supplied by parameter setup; */ - /* for decompression, they are read from the SOS marker. */ - /* The decompressor output side may not use these variables. */ - int dc_tbl_no; /* DC entropy table selector (0..3) */ - int ac_tbl_no; /* AC entropy table selector (0..3) */ - - /* Remaining fields should be treated as private by applications. */ - - /* These values are computed during compression or decompression startup: */ - /* Component's size in DCT blocks. - * Any dummy blocks added to complete an MCU are not counted; therefore - * these values do not depend on whether a scan is interleaved or not. - */ - JDIMENSION width_in_blocks; - JDIMENSION height_in_blocks; - /* Size of a DCT block in samples. Always DCTSIZE for compression. - * For decompression this is the size of the output from one DCT block, - * reflecting any scaling we choose to apply during the IDCT step. - * Values from 1 to 16 are supported. - * Note that different components may receive different IDCT scalings. - */ -#if JPEG_LIB_VERSION >= 70 - int DCT_h_scaled_size; - int DCT_v_scaled_size; -#else - int DCT_scaled_size; -#endif - /* The downsampled dimensions are the component's actual, unpadded number - * of samples at the main buffer (preprocessing/compression interface), thus - * downsampled_width = ceil(image_width * Hi/Hmax) - * and similarly for height. For decompression, IDCT scaling is included, so - * downsampled_width = ceil(image_width * Hi/Hmax * DCT_[h_]scaled_size/DCTSIZE) - */ - JDIMENSION downsampled_width; /* actual width in samples */ - JDIMENSION downsampled_height; /* actual height in samples */ - /* This flag is used only for decompression. In cases where some of the - * components will be ignored (eg grayscale output from YCbCr image), - * we can skip most computations for the unused components. - */ - boolean component_needed; /* do we need the value of this component? */ - - /* These values are computed before starting a scan of the component. */ - /* The decompressor output side may not use these variables. */ - int MCU_width; /* number of blocks per MCU, horizontally */ - int MCU_height; /* number of blocks per MCU, vertically */ - int MCU_blocks; /* MCU_width * MCU_height */ - int MCU_sample_width; /* MCU width in samples, MCU_width*DCT_[h_]scaled_size */ - int last_col_width; /* # of non-dummy blocks across in last MCU */ - int last_row_height; /* # of non-dummy blocks down in last MCU */ - - /* Saved quantization table for component; NULL if none yet saved. - * See jdinput.c comments about the need for this information. - * This field is currently used only for decompression. - */ - JQUANT_TBL *quant_table; - - /* Private per-component storage for DCT or IDCT subsystem. */ - void *dct_table; -} jpeg_component_info; - - -/* The script for encoding a multiple-scan file is an array of these: */ - -typedef struct { - int comps_in_scan; /* number of components encoded in this scan */ - int component_index[MAX_COMPS_IN_SCAN]; /* their SOF/comp_info[] indexes */ - int Ss, Se; /* progressive JPEG spectral selection parms */ - int Ah, Al; /* progressive JPEG successive approx. parms */ -} jpeg_scan_info; - -/* The decompressor can save APPn and COM markers in a list of these: */ - -typedef struct jpeg_marker_struct *jpeg_saved_marker_ptr; - -struct jpeg_marker_struct { - jpeg_saved_marker_ptr next; /* next in list, or NULL */ - UINT8 marker; /* marker code: JPEG_COM, or JPEG_APP0+n */ - unsigned int original_length; /* # bytes of data in the file */ - unsigned int data_length; /* # bytes of data saved at data[] */ - JOCTET *data; /* the data contained in the marker */ - /* the marker length word is not counted in data_length or original_length */ -}; - -/* Known color spaces. */ - -#define JCS_EXTENSIONS 1 -#define JCS_ALPHA_EXTENSIONS 1 - -typedef enum { - JCS_UNKNOWN, /* error/unspecified */ - JCS_GRAYSCALE, /* monochrome */ - JCS_RGB, /* red/green/blue as specified by the RGB_RED, - RGB_GREEN, RGB_BLUE, and RGB_PIXELSIZE macros */ - JCS_YCbCr, /* Y/Cb/Cr (also known as YUV) */ - JCS_CMYK, /* C/M/Y/K */ - JCS_YCCK, /* Y/Cb/Cr/K */ - JCS_EXT_RGB, /* red/green/blue */ - JCS_EXT_RGBX, /* red/green/blue/x */ - JCS_EXT_BGR, /* blue/green/red */ - JCS_EXT_BGRX, /* blue/green/red/x */ - JCS_EXT_XBGR, /* x/blue/green/red */ - JCS_EXT_XRGB, /* x/red/green/blue */ - /* When out_color_space it set to JCS_EXT_RGBX, JCS_EXT_BGRX, JCS_EXT_XBGR, - or JCS_EXT_XRGB during decompression, the X byte is undefined, and in - order to ensure the best performance, libjpeg-turbo can set that byte to - whatever value it wishes. Use the following colorspace constants to - ensure that the X byte is set to 0xFF, so that it can be interpreted as an - opaque alpha channel. */ - JCS_EXT_RGBA, /* red/green/blue/alpha */ - JCS_EXT_BGRA, /* blue/green/red/alpha */ - JCS_EXT_ABGR, /* alpha/blue/green/red */ - JCS_EXT_ARGB, /* alpha/red/green/blue */ - JCS_RGB565 /* 5-bit red/6-bit green/5-bit blue */ -} J_COLOR_SPACE; - -/* DCT/IDCT algorithm options. */ - -typedef enum { - JDCT_ISLOW, /* slow but accurate integer algorithm */ - JDCT_IFAST, /* faster, less accurate integer method */ - JDCT_FLOAT /* floating-point: accurate, fast on fast HW */ -} J_DCT_METHOD; - -#ifndef JDCT_DEFAULT /* may be overridden in jconfig.h */ -#define JDCT_DEFAULT JDCT_ISLOW -#endif -#ifndef JDCT_FASTEST /* may be overridden in jconfig.h */ -#define JDCT_FASTEST JDCT_IFAST -#endif - -/* Dithering options for decompression. */ - -typedef enum { - JDITHER_NONE, /* no dithering */ - JDITHER_ORDERED, /* simple ordered dither */ - JDITHER_FS /* Floyd-Steinberg error diffusion dither */ -} J_DITHER_MODE; - - -/* Common fields between JPEG compression and decompression master structs. */ - -#define jpeg_common_fields \ - struct jpeg_error_mgr *err; /* Error handler module */\ - struct jpeg_memory_mgr *mem; /* Memory manager module */\ - struct jpeg_progress_mgr *progress; /* Progress monitor, or NULL if none */\ - void *client_data; /* Available for use by application */\ - boolean is_decompressor; /* So common code can tell which is which */\ - int global_state /* For checking call sequence validity */ - -/* Routines that are to be used by both halves of the library are declared - * to receive a pointer to this structure. There are no actual instances of - * jpeg_common_struct, only of jpeg_compress_struct and jpeg_decompress_struct. - */ -struct jpeg_common_struct { - jpeg_common_fields; /* Fields common to both master struct types */ - /* Additional fields follow in an actual jpeg_compress_struct or - * jpeg_decompress_struct. All three structs must agree on these - * initial fields! (This would be a lot cleaner in C++.) - */ -}; - -typedef struct jpeg_common_struct *j_common_ptr; -typedef struct jpeg_compress_struct *j_compress_ptr; -typedef struct jpeg_decompress_struct *j_decompress_ptr; - - -/* Master record for a compression instance */ - -struct jpeg_compress_struct { - jpeg_common_fields; /* Fields shared with jpeg_decompress_struct */ - - /* Destination for compressed data */ - struct jpeg_destination_mgr *dest; - - /* Description of source image --- these fields must be filled in by - * outer application before starting compression. in_color_space must - * be correct before you can even call jpeg_set_defaults(). - */ - - JDIMENSION image_width; /* input image width */ - JDIMENSION image_height; /* input image height */ - int input_components; /* # of color components in input image */ - J_COLOR_SPACE in_color_space; /* colorspace of input image */ - - double input_gamma; /* image gamma of input image */ - - /* Compression parameters --- these fields must be set before calling - * jpeg_start_compress(). We recommend calling jpeg_set_defaults() to - * initialize everything to reasonable defaults, then changing anything - * the application specifically wants to change. That way you won't get - * burnt when new parameters are added. Also note that there are several - * helper routines to simplify changing parameters. - */ - -#if JPEG_LIB_VERSION >= 70 - unsigned int scale_num, scale_denom; /* fraction by which to scale image */ - - JDIMENSION jpeg_width; /* scaled JPEG image width */ - JDIMENSION jpeg_height; /* scaled JPEG image height */ - /* Dimensions of actual JPEG image that will be written to file, - * derived from input dimensions by scaling factors above. - * These fields are computed by jpeg_start_compress(). - * You can also use jpeg_calc_jpeg_dimensions() to determine these values - * in advance of calling jpeg_start_compress(). - */ -#endif - - int data_precision; /* bits of precision in image data */ - - int num_components; /* # of color components in JPEG image */ - J_COLOR_SPACE jpeg_color_space; /* colorspace of JPEG image */ - - jpeg_component_info *comp_info; - /* comp_info[i] describes component that appears i'th in SOF */ - - JQUANT_TBL *quant_tbl_ptrs[NUM_QUANT_TBLS]; -#if JPEG_LIB_VERSION >= 70 - int q_scale_factor[NUM_QUANT_TBLS]; -#endif - /* ptrs to coefficient quantization tables, or NULL if not defined, - * and corresponding scale factors (percentage, initialized 100). - */ - - JHUFF_TBL *dc_huff_tbl_ptrs[NUM_HUFF_TBLS]; - JHUFF_TBL *ac_huff_tbl_ptrs[NUM_HUFF_TBLS]; - /* ptrs to Huffman coding tables, or NULL if not defined */ - - UINT8 arith_dc_L[NUM_ARITH_TBLS]; /* L values for DC arith-coding tables */ - UINT8 arith_dc_U[NUM_ARITH_TBLS]; /* U values for DC arith-coding tables */ - UINT8 arith_ac_K[NUM_ARITH_TBLS]; /* Kx values for AC arith-coding tables */ - - int num_scans; /* # of entries in scan_info array */ - const jpeg_scan_info *scan_info; /* script for multi-scan file, or NULL */ - /* The default value of scan_info is NULL, which causes a single-scan - * sequential JPEG file to be emitted. To create a multi-scan file, - * set num_scans and scan_info to point to an array of scan definitions. - */ - - boolean raw_data_in; /* TRUE=caller supplies downsampled data */ - boolean arith_code; /* TRUE=arithmetic coding, FALSE=Huffman */ - boolean optimize_coding; /* TRUE=optimize entropy encoding parms */ - boolean CCIR601_sampling; /* TRUE=first samples are cosited */ -#if JPEG_LIB_VERSION >= 70 - boolean do_fancy_downsampling; /* TRUE=apply fancy downsampling */ -#endif - int smoothing_factor; /* 1..100, or 0 for no input smoothing */ - J_DCT_METHOD dct_method; /* DCT algorithm selector */ - - /* The restart interval can be specified in absolute MCUs by setting - * restart_interval, or in MCU rows by setting restart_in_rows - * (in which case the correct restart_interval will be figured - * for each scan). - */ - unsigned int restart_interval; /* MCUs per restart, or 0 for no restart */ - int restart_in_rows; /* if > 0, MCU rows per restart interval */ - - /* Parameters controlling emission of special markers. */ - - boolean write_JFIF_header; /* should a JFIF marker be written? */ - UINT8 JFIF_major_version; /* What to write for the JFIF version number */ - UINT8 JFIF_minor_version; - /* These three values are not used by the JPEG code, merely copied */ - /* into the JFIF APP0 marker. density_unit can be 0 for unknown, */ - /* 1 for dots/inch, or 2 for dots/cm. Note that the pixel aspect */ - /* ratio is defined by X_density/Y_density even when density_unit=0. */ - UINT8 density_unit; /* JFIF code for pixel size units */ - UINT16 X_density; /* Horizontal pixel density */ - UINT16 Y_density; /* Vertical pixel density */ - boolean write_Adobe_marker; /* should an Adobe marker be written? */ - - /* State variable: index of next scanline to be written to - * jpeg_write_scanlines(). Application may use this to control its - * processing loop, e.g., "while (next_scanline < image_height)". - */ - - JDIMENSION next_scanline; /* 0 .. image_height-1 */ - - /* Remaining fields are known throughout compressor, but generally - * should not be touched by a surrounding application. - */ - - /* - * These fields are computed during compression startup - */ - boolean progressive_mode; /* TRUE if scan script uses progressive mode */ - int max_h_samp_factor; /* largest h_samp_factor */ - int max_v_samp_factor; /* largest v_samp_factor */ - -#if JPEG_LIB_VERSION >= 70 - int min_DCT_h_scaled_size; /* smallest DCT_h_scaled_size of any component */ - int min_DCT_v_scaled_size; /* smallest DCT_v_scaled_size of any component */ -#endif - - JDIMENSION total_iMCU_rows; /* # of iMCU rows to be input to coef ctlr */ - /* The coefficient controller receives data in units of MCU rows as defined - * for fully interleaved scans (whether the JPEG file is interleaved or not). - * There are v_samp_factor * DCTSIZE sample rows of each component in an - * "iMCU" (interleaved MCU) row. - */ - - /* - * These fields are valid during any one scan. - * They describe the components and MCUs actually appearing in the scan. - */ - int comps_in_scan; /* # of JPEG components in this scan */ - jpeg_component_info *cur_comp_info[MAX_COMPS_IN_SCAN]; - /* *cur_comp_info[i] describes component that appears i'th in SOS */ - - JDIMENSION MCUs_per_row; /* # of MCUs across the image */ - JDIMENSION MCU_rows_in_scan; /* # of MCU rows in the image */ - - int blocks_in_MCU; /* # of DCT blocks per MCU */ - int MCU_membership[C_MAX_BLOCKS_IN_MCU]; - /* MCU_membership[i] is index in cur_comp_info of component owning */ - /* i'th block in an MCU */ - - int Ss, Se, Ah, Al; /* progressive JPEG parameters for scan */ - -#if JPEG_LIB_VERSION >= 80 - int block_size; /* the basic DCT block size: 1..16 */ - const int *natural_order; /* natural-order position array */ - int lim_Se; /* min( Se, DCTSIZE2-1 ) */ -#endif - - /* - * Links to compression subobjects (methods and private variables of modules) - */ - struct jpeg_comp_master *master; - struct jpeg_c_main_controller *main; - struct jpeg_c_prep_controller *prep; - struct jpeg_c_coef_controller *coef; - struct jpeg_marker_writer *marker; - struct jpeg_color_converter *cconvert; - struct jpeg_downsampler *downsample; - struct jpeg_forward_dct *fdct; - struct jpeg_entropy_encoder *entropy; - jpeg_scan_info *script_space; /* workspace for jpeg_simple_progression */ - int script_space_size; -}; - - -/* Master record for a decompression instance */ - -struct jpeg_decompress_struct { - jpeg_common_fields; /* Fields shared with jpeg_compress_struct */ - - /* Source of compressed data */ - struct jpeg_source_mgr *src; - - /* Basic description of image --- filled in by jpeg_read_header(). */ - /* Application may inspect these values to decide how to process image. */ - - JDIMENSION image_width; /* nominal image width (from SOF marker) */ - JDIMENSION image_height; /* nominal image height */ - int num_components; /* # of color components in JPEG image */ - J_COLOR_SPACE jpeg_color_space; /* colorspace of JPEG image */ - - /* Decompression processing parameters --- these fields must be set before - * calling jpeg_start_decompress(). Note that jpeg_read_header() initializes - * them to default values. - */ - - J_COLOR_SPACE out_color_space; /* colorspace for output */ - - unsigned int scale_num, scale_denom; /* fraction by which to scale image */ - - double output_gamma; /* image gamma wanted in output */ - - boolean buffered_image; /* TRUE=multiple output passes */ - boolean raw_data_out; /* TRUE=downsampled data wanted */ - - J_DCT_METHOD dct_method; /* IDCT algorithm selector */ - boolean do_fancy_upsampling; /* TRUE=apply fancy upsampling */ - boolean do_block_smoothing; /* TRUE=apply interblock smoothing */ - - boolean quantize_colors; /* TRUE=colormapped output wanted */ - /* the following are ignored if not quantize_colors: */ - J_DITHER_MODE dither_mode; /* type of color dithering to use */ - boolean two_pass_quantize; /* TRUE=use two-pass color quantization */ - int desired_number_of_colors; /* max # colors to use in created colormap */ - /* these are significant only in buffered-image mode: */ - boolean enable_1pass_quant; /* enable future use of 1-pass quantizer */ - boolean enable_external_quant;/* enable future use of external colormap */ - boolean enable_2pass_quant; /* enable future use of 2-pass quantizer */ - - /* Description of actual output image that will be returned to application. - * These fields are computed by jpeg_start_decompress(). - * You can also use jpeg_calc_output_dimensions() to determine these values - * in advance of calling jpeg_start_decompress(). - */ - - JDIMENSION output_width; /* scaled image width */ - JDIMENSION output_height; /* scaled image height */ - int out_color_components; /* # of color components in out_color_space */ - int output_components; /* # of color components returned */ - /* output_components is 1 (a colormap index) when quantizing colors; - * otherwise it equals out_color_components. - */ - int rec_outbuf_height; /* min recommended height of scanline buffer */ - /* If the buffer passed to jpeg_read_scanlines() is less than this many rows - * high, space and time will be wasted due to unnecessary data copying. - * Usually rec_outbuf_height will be 1 or 2, at most 4. - */ - - /* When quantizing colors, the output colormap is described by these fields. - * The application can supply a colormap by setting colormap non-NULL before - * calling jpeg_start_decompress; otherwise a colormap is created during - * jpeg_start_decompress or jpeg_start_output. - * The map has out_color_components rows and actual_number_of_colors columns. - */ - int actual_number_of_colors; /* number of entries in use */ - JSAMPARRAY colormap; /* The color map as a 2-D pixel array */ - - /* State variables: these variables indicate the progress of decompression. - * The application may examine these but must not modify them. - */ - - /* Row index of next scanline to be read from jpeg_read_scanlines(). - * Application may use this to control its processing loop, e.g., - * "while (output_scanline < output_height)". - */ - JDIMENSION output_scanline; /* 0 .. output_height-1 */ - - /* Current input scan number and number of iMCU rows completed in scan. - * These indicate the progress of the decompressor input side. - */ - int input_scan_number; /* Number of SOS markers seen so far */ - JDIMENSION input_iMCU_row; /* Number of iMCU rows completed */ - - /* The "output scan number" is the notional scan being displayed by the - * output side. The decompressor will not allow output scan/row number - * to get ahead of input scan/row, but it can fall arbitrarily far behind. - */ - int output_scan_number; /* Nominal scan number being displayed */ - JDIMENSION output_iMCU_row; /* Number of iMCU rows read */ - - /* Current progression status. coef_bits[c][i] indicates the precision - * with which component c's DCT coefficient i (in zigzag order) is known. - * It is -1 when no data has yet been received, otherwise it is the point - * transform (shift) value for the most recent scan of the coefficient - * (thus, 0 at completion of the progression). - * This pointer is NULL when reading a non-progressive file. - */ - int (*coef_bits)[DCTSIZE2]; /* -1 or current Al value for each coef */ - - /* Internal JPEG parameters --- the application usually need not look at - * these fields. Note that the decompressor output side may not use - * any parameters that can change between scans. - */ - - /* Quantization and Huffman tables are carried forward across input - * datastreams when processing abbreviated JPEG datastreams. - */ - - JQUANT_TBL *quant_tbl_ptrs[NUM_QUANT_TBLS]; - /* ptrs to coefficient quantization tables, or NULL if not defined */ - - JHUFF_TBL *dc_huff_tbl_ptrs[NUM_HUFF_TBLS]; - JHUFF_TBL *ac_huff_tbl_ptrs[NUM_HUFF_TBLS]; - /* ptrs to Huffman coding tables, or NULL if not defined */ - - /* These parameters are never carried across datastreams, since they - * are given in SOF/SOS markers or defined to be reset by SOI. - */ - - int data_precision; /* bits of precision in image data */ - - jpeg_component_info *comp_info; - /* comp_info[i] describes component that appears i'th in SOF */ - -#if JPEG_LIB_VERSION >= 80 - boolean is_baseline; /* TRUE if Baseline SOF0 encountered */ -#endif - boolean progressive_mode; /* TRUE if SOFn specifies progressive mode */ - boolean arith_code; /* TRUE=arithmetic coding, FALSE=Huffman */ - - UINT8 arith_dc_L[NUM_ARITH_TBLS]; /* L values for DC arith-coding tables */ - UINT8 arith_dc_U[NUM_ARITH_TBLS]; /* U values for DC arith-coding tables */ - UINT8 arith_ac_K[NUM_ARITH_TBLS]; /* Kx values for AC arith-coding tables */ - - unsigned int restart_interval; /* MCUs per restart interval, or 0 for no restart */ - - /* These fields record data obtained from optional markers recognized by - * the JPEG library. - */ - boolean saw_JFIF_marker; /* TRUE iff a JFIF APP0 marker was found */ - /* Data copied from JFIF marker; only valid if saw_JFIF_marker is TRUE: */ - UINT8 JFIF_major_version; /* JFIF version number */ - UINT8 JFIF_minor_version; - UINT8 density_unit; /* JFIF code for pixel size units */ - UINT16 X_density; /* Horizontal pixel density */ - UINT16 Y_density; /* Vertical pixel density */ - boolean saw_Adobe_marker; /* TRUE iff an Adobe APP14 marker was found */ - UINT8 Adobe_transform; /* Color transform code from Adobe marker */ - - boolean CCIR601_sampling; /* TRUE=first samples are cosited */ - - /* Aside from the specific data retained from APPn markers known to the - * library, the uninterpreted contents of any or all APPn and COM markers - * can be saved in a list for examination by the application. - */ - jpeg_saved_marker_ptr marker_list; /* Head of list of saved markers */ - - /* Remaining fields are known throughout decompressor, but generally - * should not be touched by a surrounding application. - */ - - /* - * These fields are computed during decompression startup - */ - int max_h_samp_factor; /* largest h_samp_factor */ - int max_v_samp_factor; /* largest v_samp_factor */ - -#if JPEG_LIB_VERSION >= 70 - int min_DCT_h_scaled_size; /* smallest DCT_h_scaled_size of any component */ - int min_DCT_v_scaled_size; /* smallest DCT_v_scaled_size of any component */ -#else - int min_DCT_scaled_size; /* smallest DCT_scaled_size of any component */ -#endif - - JDIMENSION total_iMCU_rows; /* # of iMCU rows in image */ - /* The coefficient controller's input and output progress is measured in - * units of "iMCU" (interleaved MCU) rows. These are the same as MCU rows - * in fully interleaved JPEG scans, but are used whether the scan is - * interleaved or not. We define an iMCU row as v_samp_factor DCT block - * rows of each component. Therefore, the IDCT output contains - * v_samp_factor*DCT_[v_]scaled_size sample rows of a component per iMCU row. - */ - - JSAMPLE *sample_range_limit; /* table for fast range-limiting */ - - /* - * These fields are valid during any one scan. - * They describe the components and MCUs actually appearing in the scan. - * Note that the decompressor output side must not use these fields. - */ - int comps_in_scan; /* # of JPEG components in this scan */ - jpeg_component_info *cur_comp_info[MAX_COMPS_IN_SCAN]; - /* *cur_comp_info[i] describes component that appears i'th in SOS */ - - JDIMENSION MCUs_per_row; /* # of MCUs across the image */ - JDIMENSION MCU_rows_in_scan; /* # of MCU rows in the image */ - - int blocks_in_MCU; /* # of DCT blocks per MCU */ - int MCU_membership[D_MAX_BLOCKS_IN_MCU]; - /* MCU_membership[i] is index in cur_comp_info of component owning */ - /* i'th block in an MCU */ - - int Ss, Se, Ah, Al; /* progressive JPEG parameters for scan */ - -#if JPEG_LIB_VERSION >= 80 - /* These fields are derived from Se of first SOS marker. - */ - int block_size; /* the basic DCT block size: 1..16 */ - const int *natural_order; /* natural-order position array for entropy decode */ - int lim_Se; /* min( Se, DCTSIZE2-1 ) for entropy decode */ -#endif - - /* This field is shared between entropy decoder and marker parser. - * It is either zero or the code of a JPEG marker that has been - * read from the data source, but has not yet been processed. - */ - int unread_marker; - - /* - * Links to decompression subobjects (methods, private variables of modules) - */ - struct jpeg_decomp_master *master; - struct jpeg_d_main_controller *main; - struct jpeg_d_coef_controller *coef; - struct jpeg_d_post_controller *post; - struct jpeg_input_controller *inputctl; - struct jpeg_marker_reader *marker; - struct jpeg_entropy_decoder *entropy; - struct jpeg_inverse_dct *idct; - struct jpeg_upsampler *upsample; - struct jpeg_color_deconverter *cconvert; - struct jpeg_color_quantizer *cquantize; -}; - - -/* "Object" declarations for JPEG modules that may be supplied or called - * directly by the surrounding application. - * As with all objects in the JPEG library, these structs only define the - * publicly visible methods and state variables of a module. Additional - * private fields may exist after the public ones. - */ - - -/* Error handler object */ - -struct jpeg_error_mgr { - /* Error exit handler: does not return to caller */ - void (*error_exit) (j_common_ptr cinfo); - /* Conditionally emit a trace or warning message */ - void (*emit_message) (j_common_ptr cinfo, int msg_level); - /* Routine that actually outputs a trace or error message */ - void (*output_message) (j_common_ptr cinfo); - /* Format a message string for the most recent JPEG error or message */ - void (*format_message) (j_common_ptr cinfo, char *buffer); -#define JMSG_LENGTH_MAX 200 /* recommended size of format_message buffer */ - /* Reset error state variables at start of a new image */ - void (*reset_error_mgr) (j_common_ptr cinfo); - - /* The message ID code and any parameters are saved here. - * A message can have one string parameter or up to 8 int parameters. - */ - int msg_code; -#define JMSG_STR_PARM_MAX 80 - union { - int i[8]; - char s[JMSG_STR_PARM_MAX]; - } msg_parm; - - /* Standard state variables for error facility */ - - int trace_level; /* max msg_level that will be displayed */ - - /* For recoverable corrupt-data errors, we emit a warning message, - * but keep going unless emit_message chooses to abort. emit_message - * should count warnings in num_warnings. The surrounding application - * can check for bad data by seeing if num_warnings is nonzero at the - * end of processing. - */ - long num_warnings; /* number of corrupt-data warnings */ - - /* These fields point to the table(s) of error message strings. - * An application can change the table pointer to switch to a different - * message list (typically, to change the language in which errors are - * reported). Some applications may wish to add additional error codes - * that will be handled by the JPEG library error mechanism; the second - * table pointer is used for this purpose. - * - * First table includes all errors generated by JPEG library itself. - * Error code 0 is reserved for a "no such error string" message. - */ - const char * const *jpeg_message_table; /* Library errors */ - int last_jpeg_message; /* Table contains strings 0..last_jpeg_message */ - /* Second table can be added by application (see cjpeg/djpeg for example). - * It contains strings numbered first_addon_message..last_addon_message. - */ - const char * const *addon_message_table; /* Non-library errors */ - int first_addon_message; /* code for first string in addon table */ - int last_addon_message; /* code for last string in addon table */ -}; - - -/* Progress monitor object */ - -struct jpeg_progress_mgr { - void (*progress_monitor) (j_common_ptr cinfo); - - long pass_counter; /* work units completed in this pass */ - long pass_limit; /* total number of work units in this pass */ - int completed_passes; /* passes completed so far */ - int total_passes; /* total number of passes expected */ -}; - - -/* Data destination object for compression */ - -struct jpeg_destination_mgr { - JOCTET *next_output_byte; /* => next byte to write in buffer */ - size_t free_in_buffer; /* # of byte spaces remaining in buffer */ - - void (*init_destination) (j_compress_ptr cinfo); - boolean (*empty_output_buffer) (j_compress_ptr cinfo); - void (*term_destination) (j_compress_ptr cinfo); -}; - - -/* Data source object for decompression */ - -struct jpeg_source_mgr { - const JOCTET *next_input_byte; /* => next byte to read from buffer */ - size_t bytes_in_buffer; /* # of bytes remaining in buffer */ - - void (*init_source) (j_decompress_ptr cinfo); - boolean (*fill_input_buffer) (j_decompress_ptr cinfo); - void (*skip_input_data) (j_decompress_ptr cinfo, long num_bytes); - boolean (*resync_to_restart) (j_decompress_ptr cinfo, int desired); - void (*term_source) (j_decompress_ptr cinfo); -}; - - -/* Memory manager object. - * Allocates "small" objects (a few K total), "large" objects (tens of K), - * and "really big" objects (virtual arrays with backing store if needed). - * The memory manager does not allow individual objects to be freed; rather, - * each created object is assigned to a pool, and whole pools can be freed - * at once. This is faster and more convenient than remembering exactly what - * to free, especially where malloc()/free() are not too speedy. - * NB: alloc routines never return NULL. They exit to error_exit if not - * successful. - */ - -#define JPOOL_PERMANENT 0 /* lasts until master record is destroyed */ -#define JPOOL_IMAGE 1 /* lasts until done with image/datastream */ -#define JPOOL_NUMPOOLS 2 - -typedef struct jvirt_sarray_control *jvirt_sarray_ptr; -typedef struct jvirt_barray_control *jvirt_barray_ptr; - - -struct jpeg_memory_mgr { - /* Method pointers */ - void *(*alloc_small) (j_common_ptr cinfo, int pool_id, size_t sizeofobject); - void *(*alloc_large) (j_common_ptr cinfo, int pool_id, - size_t sizeofobject); - JSAMPARRAY (*alloc_sarray) (j_common_ptr cinfo, int pool_id, - JDIMENSION samplesperrow, JDIMENSION numrows); - JBLOCKARRAY (*alloc_barray) (j_common_ptr cinfo, int pool_id, - JDIMENSION blocksperrow, JDIMENSION numrows); - jvirt_sarray_ptr (*request_virt_sarray) (j_common_ptr cinfo, int pool_id, - boolean pre_zero, - JDIMENSION samplesperrow, - JDIMENSION numrows, - JDIMENSION maxaccess); - jvirt_barray_ptr (*request_virt_barray) (j_common_ptr cinfo, int pool_id, - boolean pre_zero, - JDIMENSION blocksperrow, - JDIMENSION numrows, - JDIMENSION maxaccess); - void (*realize_virt_arrays) (j_common_ptr cinfo); - JSAMPARRAY (*access_virt_sarray) (j_common_ptr cinfo, jvirt_sarray_ptr ptr, - JDIMENSION start_row, JDIMENSION num_rows, - boolean writable); - JBLOCKARRAY (*access_virt_barray) (j_common_ptr cinfo, jvirt_barray_ptr ptr, - JDIMENSION start_row, JDIMENSION num_rows, - boolean writable); - void (*free_pool) (j_common_ptr cinfo, int pool_id); - void (*self_destruct) (j_common_ptr cinfo); - - /* Limit on memory allocation for this JPEG object. (Note that this is - * merely advisory, not a guaranteed maximum; it only affects the space - * used for virtual-array buffers.) May be changed by outer application - * after creating the JPEG object. - */ - long max_memory_to_use; - - /* Maximum allocation request accepted by alloc_large. */ - long max_alloc_chunk; -}; - - -/* Routine signature for application-supplied marker processing methods. - * Need not pass marker code since it is stored in cinfo->unread_marker. - */ -typedef boolean (*jpeg_marker_parser_method) (j_decompress_ptr cinfo); - - -/* Originally, this macro was used as a way of defining function prototypes - * for both modern compilers as well as older compilers that did not support - * prototype parameters. libjpeg-turbo has never supported these older, - * non-ANSI compilers, but the macro is still included because there is some - * software out there that uses it. - */ - -#define JPP(arglist) arglist - - -/* Default error-management setup */ -EXTERN(struct jpeg_error_mgr *) jpeg_std_error (struct jpeg_error_mgr *err); - -/* Initialization of JPEG compression objects. - * jpeg_create_compress() and jpeg_create_decompress() are the exported - * names that applications should call. These expand to calls on - * jpeg_CreateCompress and jpeg_CreateDecompress with additional information - * passed for version mismatch checking. - * NB: you must set up the error-manager BEFORE calling jpeg_create_xxx. - */ -#define jpeg_create_compress(cinfo) \ - jpeg_CreateCompress((cinfo), JPEG_LIB_VERSION, \ - (size_t) sizeof(struct jpeg_compress_struct)) -#define jpeg_create_decompress(cinfo) \ - jpeg_CreateDecompress((cinfo), JPEG_LIB_VERSION, \ - (size_t) sizeof(struct jpeg_decompress_struct)) -EXTERN(void) jpeg_CreateCompress (j_compress_ptr cinfo, int version, - size_t structsize); -EXTERN(void) jpeg_CreateDecompress (j_decompress_ptr cinfo, int version, - size_t structsize); -/* Destruction of JPEG compression objects */ -EXTERN(void) jpeg_destroy_compress (j_compress_ptr cinfo); -EXTERN(void) jpeg_destroy_decompress (j_decompress_ptr cinfo); - -/* Standard data source and destination managers: stdio streams. */ -/* Caller is responsible for opening the file before and closing after. */ -EXTERN(void) jpeg_stdio_dest (j_compress_ptr cinfo, FILE *outfile); -EXTERN(void) jpeg_stdio_src (j_decompress_ptr cinfo, FILE *infile); - -#if JPEG_LIB_VERSION >= 80 || defined(MEM_SRCDST_SUPPORTED) -/* Data source and destination managers: memory buffers. */ -EXTERN(void) jpeg_mem_dest (j_compress_ptr cinfo, unsigned char **outbuffer, - unsigned long *outsize); -EXTERN(void) jpeg_mem_src (j_decompress_ptr cinfo, - const unsigned char *inbuffer, - unsigned long insize); -#endif - -/* Default parameter setup for compression */ -EXTERN(void) jpeg_set_defaults (j_compress_ptr cinfo); -/* Compression parameter setup aids */ -EXTERN(void) jpeg_set_colorspace (j_compress_ptr cinfo, - J_COLOR_SPACE colorspace); -EXTERN(void) jpeg_default_colorspace (j_compress_ptr cinfo); -EXTERN(void) jpeg_set_quality (j_compress_ptr cinfo, int quality, - boolean force_baseline); -EXTERN(void) jpeg_set_linear_quality (j_compress_ptr cinfo, int scale_factor, - boolean force_baseline); -#if JPEG_LIB_VERSION >= 70 -EXTERN(void) jpeg_default_qtables (j_compress_ptr cinfo, - boolean force_baseline); -#endif -EXTERN(void) jpeg_add_quant_table (j_compress_ptr cinfo, int which_tbl, - const unsigned int *basic_table, - int scale_factor, boolean force_baseline); -EXTERN(int) jpeg_quality_scaling (int quality); -EXTERN(void) jpeg_simple_progression (j_compress_ptr cinfo); -EXTERN(void) jpeg_suppress_tables (j_compress_ptr cinfo, boolean suppress); -EXTERN(JQUANT_TBL *) jpeg_alloc_quant_table (j_common_ptr cinfo); -EXTERN(JHUFF_TBL *) jpeg_alloc_huff_table (j_common_ptr cinfo); - -/* Main entry points for compression */ -EXTERN(void) jpeg_start_compress (j_compress_ptr cinfo, - boolean write_all_tables); -EXTERN(JDIMENSION) jpeg_write_scanlines (j_compress_ptr cinfo, - JSAMPARRAY scanlines, - JDIMENSION num_lines); -EXTERN(void) jpeg_finish_compress (j_compress_ptr cinfo); - -#if JPEG_LIB_VERSION >= 70 -/* Precalculate JPEG dimensions for current compression parameters. */ -EXTERN(void) jpeg_calc_jpeg_dimensions (j_compress_ptr cinfo); -#endif - -/* Replaces jpeg_write_scanlines when writing raw downsampled data. */ -EXTERN(JDIMENSION) jpeg_write_raw_data (j_compress_ptr cinfo, JSAMPIMAGE data, - JDIMENSION num_lines); - -/* Write a special marker. See libjpeg.txt concerning safe usage. */ -EXTERN(void) jpeg_write_marker (j_compress_ptr cinfo, int marker, - const JOCTET *dataptr, unsigned int datalen); -/* Same, but piecemeal. */ -EXTERN(void) jpeg_write_m_header (j_compress_ptr cinfo, int marker, - unsigned int datalen); -EXTERN(void) jpeg_write_m_byte (j_compress_ptr cinfo, int val); - -/* Alternate compression function: just write an abbreviated table file */ -EXTERN(void) jpeg_write_tables (j_compress_ptr cinfo); - -/* Decompression startup: read start of JPEG datastream to see what's there */ -EXTERN(int) jpeg_read_header (j_decompress_ptr cinfo, boolean require_image); -/* Return value is one of: */ -#define JPEG_SUSPENDED 0 /* Suspended due to lack of input data */ -#define JPEG_HEADER_OK 1 /* Found valid image datastream */ -#define JPEG_HEADER_TABLES_ONLY 2 /* Found valid table-specs-only datastream */ -/* If you pass require_image = TRUE (normal case), you need not check for - * a TABLES_ONLY return code; an abbreviated file will cause an error exit. - * JPEG_SUSPENDED is only possible if you use a data source module that can - * give a suspension return (the stdio source module doesn't). - */ - -/* Main entry points for decompression */ -EXTERN(boolean) jpeg_start_decompress (j_decompress_ptr cinfo); -EXTERN(JDIMENSION) jpeg_read_scanlines (j_decompress_ptr cinfo, - JSAMPARRAY scanlines, - JDIMENSION max_lines); -EXTERN(JDIMENSION) jpeg_skip_scanlines (j_decompress_ptr cinfo, - JDIMENSION num_lines); -EXTERN(void) jpeg_crop_scanline (j_decompress_ptr cinfo, JDIMENSION *xoffset, - JDIMENSION *width); -EXTERN(boolean) jpeg_finish_decompress (j_decompress_ptr cinfo); - -/* Replaces jpeg_read_scanlines when reading raw downsampled data. */ -EXTERN(JDIMENSION) jpeg_read_raw_data (j_decompress_ptr cinfo, JSAMPIMAGE data, - JDIMENSION max_lines); - -/* Additional entry points for buffered-image mode. */ -EXTERN(boolean) jpeg_has_multiple_scans (j_decompress_ptr cinfo); -EXTERN(boolean) jpeg_start_output (j_decompress_ptr cinfo, int scan_number); -EXTERN(boolean) jpeg_finish_output (j_decompress_ptr cinfo); -EXTERN(boolean) jpeg_input_complete (j_decompress_ptr cinfo); -EXTERN(void) jpeg_new_colormap (j_decompress_ptr cinfo); -EXTERN(int) jpeg_consume_input (j_decompress_ptr cinfo); -/* Return value is one of: */ -/* #define JPEG_SUSPENDED 0 Suspended due to lack of input data */ -#define JPEG_REACHED_SOS 1 /* Reached start of new scan */ -#define JPEG_REACHED_EOI 2 /* Reached end of image */ -#define JPEG_ROW_COMPLETED 3 /* Completed one iMCU row */ -#define JPEG_SCAN_COMPLETED 4 /* Completed last iMCU row of a scan */ - -/* Precalculate output dimensions for current decompression parameters. */ -#if JPEG_LIB_VERSION >= 80 -EXTERN(void) jpeg_core_output_dimensions (j_decompress_ptr cinfo); -#endif -EXTERN(void) jpeg_calc_output_dimensions (j_decompress_ptr cinfo); - -/* Control saving of COM and APPn markers into marker_list. */ -EXTERN(void) jpeg_save_markers (j_decompress_ptr cinfo, int marker_code, - unsigned int length_limit); - -/* Install a special processing method for COM or APPn markers. */ -EXTERN(void) jpeg_set_marker_processor (j_decompress_ptr cinfo, - int marker_code, - jpeg_marker_parser_method routine); - -/* Read or write raw DCT coefficients --- useful for lossless transcoding. */ -EXTERN(jvirt_barray_ptr *) jpeg_read_coefficients (j_decompress_ptr cinfo); -EXTERN(void) jpeg_write_coefficients (j_compress_ptr cinfo, - jvirt_barray_ptr *coef_arrays); -EXTERN(void) jpeg_copy_critical_parameters (j_decompress_ptr srcinfo, - j_compress_ptr dstinfo); - -/* If you choose to abort compression or decompression before completing - * jpeg_finish_(de)compress, then you need to clean up to release memory, - * temporary files, etc. You can just call jpeg_destroy_(de)compress - * if you're done with the JPEG object, but if you want to clean it up and - * reuse it, call this: - */ -EXTERN(void) jpeg_abort_compress (j_compress_ptr cinfo); -EXTERN(void) jpeg_abort_decompress (j_decompress_ptr cinfo); - -/* Generic versions of jpeg_abort and jpeg_destroy that work on either - * flavor of JPEG object. These may be more convenient in some places. - */ -EXTERN(void) jpeg_abort (j_common_ptr cinfo); -EXTERN(void) jpeg_destroy (j_common_ptr cinfo); - -/* Default restart-marker-resync procedure for use by data source modules */ -EXTERN(boolean) jpeg_resync_to_restart (j_decompress_ptr cinfo, int desired); - - -/* These marker codes are exported since applications and data source modules - * are likely to want to use them. - */ - -#define JPEG_RST0 0xD0 /* RST0 marker code */ -#define JPEG_EOI 0xD9 /* EOI marker code */ -#define JPEG_APP0 0xE0 /* APP0 marker code */ -#define JPEG_COM 0xFE /* COM marker code */ - - -/* If we have a brain-damaged compiler that emits warnings (or worse, errors) - * for structure definitions that are never filled in, keep it quiet by - * supplying dummy definitions for the various substructures. - */ - -#ifdef INCOMPLETE_TYPES_BROKEN -#ifndef JPEG_INTERNALS /* will be defined in jpegint.h */ -struct jvirt_sarray_control { long dummy; }; -struct jvirt_barray_control { long dummy; }; -struct jpeg_comp_master { long dummy; }; -struct jpeg_c_main_controller { long dummy; }; -struct jpeg_c_prep_controller { long dummy; }; -struct jpeg_c_coef_controller { long dummy; }; -struct jpeg_marker_writer { long dummy; }; -struct jpeg_color_converter { long dummy; }; -struct jpeg_downsampler { long dummy; }; -struct jpeg_forward_dct { long dummy; }; -struct jpeg_entropy_encoder { long dummy; }; -struct jpeg_decomp_master { long dummy; }; -struct jpeg_d_main_controller { long dummy; }; -struct jpeg_d_coef_controller { long dummy; }; -struct jpeg_d_post_controller { long dummy; }; -struct jpeg_input_controller { long dummy; }; -struct jpeg_marker_reader { long dummy; }; -struct jpeg_entropy_decoder { long dummy; }; -struct jpeg_inverse_dct { long dummy; }; -struct jpeg_upsampler { long dummy; }; -struct jpeg_color_deconverter { long dummy; }; -struct jpeg_color_quantizer { long dummy; }; -#endif /* JPEG_INTERNALS */ -#endif /* INCOMPLETE_TYPES_BROKEN */ - - -/* - * The JPEG library modules define JPEG_INTERNALS before including this file. - * The internal structure declarations are read only when that is true. - * Applications using the library should not include jpegint.h, but may wish - * to include jerror.h. - */ - -#ifdef JPEG_INTERNALS -#include "jpegint.h" /* fetch private declarations */ -#include "jerror.h" /* fetch error codes too */ -#endif - -#ifdef __cplusplus -#ifndef DONT_USE_EXTERN_C -} -#endif -#endif - -#endif /* JPEGLIB_H */ diff --git a/WebRtc.NET/include/webrtc/api/call/audio_sink.h b/WebRtc.NET/include/webrtc/api/call/audio_sink.h deleted file mode 100644 index e865ead3..00000000 --- a/WebRtc.NET/include/webrtc/api/call/audio_sink.h +++ /dev/null @@ -1,53 +0,0 @@ -/* - * Copyright (c) 2015 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_API_CALL_AUDIO_SINK_H_ -#define WEBRTC_API_CALL_AUDIO_SINK_H_ - -#if defined(WEBRTC_POSIX) && !defined(__STDC_FORMAT_MACROS) -// Avoid conflict with format_macros.h. -#define __STDC_FORMAT_MACROS -#endif - -#include -#include - -namespace webrtc { - -// Represents a simple push audio sink. -class AudioSinkInterface { - public: - virtual ~AudioSinkInterface() {} - - struct Data { - Data(int16_t* data, - size_t samples_per_channel, - int sample_rate, - size_t channels, - uint32_t timestamp) - : data(data), - samples_per_channel(samples_per_channel), - sample_rate(sample_rate), - channels(channels), - timestamp(timestamp) {} - - int16_t* data; // The actual 16bit audio data. - size_t samples_per_channel; // Number of frames in the buffer. - int sample_rate; // Sample rate in Hz. - size_t channels; // Number of channels in the audio data. - uint32_t timestamp; // The RTP timestamp of the first sample. - }; - - virtual void OnData(const Data& audio) = 0; -}; - -} // namespace webrtc - -#endif // WEBRTC_API_CALL_AUDIO_SINK_H_ diff --git a/WebRtc.NET/include/webrtc/api/call/transport.h b/WebRtc.NET/include/webrtc/api/call/transport.h deleted file mode 100644 index 1126f628..00000000 --- a/WebRtc.NET/include/webrtc/api/call/transport.h +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_API_CALL_TRANSPORT_H_ -#define WEBRTC_API_CALL_TRANSPORT_H_ - -#include -#include - -namespace webrtc { - -// TODO(holmer): Look into unifying this with the PacketOptions in -// asyncpacketsocket.h. -struct PacketOptions { - // A 16 bits positive id. Negative ids are invalid and should be interpreted - // as packet_id not being set. - int packet_id = -1; -}; - -class Transport { - public: - virtual bool SendRtp(const uint8_t* packet, - size_t length, - const PacketOptions& options) = 0; - virtual bool SendRtcp(const uint8_t* packet, size_t length) = 0; - - protected: - virtual ~Transport() {} -}; - -} // namespace webrtc - -#endif // WEBRTC_API_CALL_TRANSPORT_H_ diff --git a/WebRtc.NET/include/webrtc/api/datachannel.h b/WebRtc.NET/include/webrtc/api/datachannel.h deleted file mode 100644 index cdb2e627..00000000 --- a/WebRtc.NET/include/webrtc/api/datachannel.h +++ /dev/null @@ -1,298 +0,0 @@ -/* - * Copyright 2012 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_API_DATACHANNEL_H_ -#define WEBRTC_API_DATACHANNEL_H_ - -#include -#include -#include - -#include "webrtc/api/datachannelinterface.h" -#include "webrtc/api/proxy.h" -#include "webrtc/base/messagehandler.h" -#include "webrtc/base/scoped_ref_ptr.h" -#include "webrtc/base/sigslot.h" -#include "webrtc/media/base/mediachannel.h" -#include "webrtc/pc/channel.h" - -namespace webrtc { - -class DataChannel; - -class DataChannelProviderInterface { - public: - // Sends the data to the transport. - virtual bool SendData(const cricket::SendDataParams& params, - const rtc::CopyOnWriteBuffer& payload, - cricket::SendDataResult* result) = 0; - // Connects to the transport signals. - virtual bool ConnectDataChannel(DataChannel* data_channel) = 0; - // Disconnects from the transport signals. - virtual void DisconnectDataChannel(DataChannel* data_channel) = 0; - // Adds the data channel SID to the transport for SCTP. - virtual void AddSctpDataStream(int sid) = 0; - // Removes the data channel SID from the transport for SCTP. - virtual void RemoveSctpDataStream(int sid) = 0; - // Returns true if the transport channel is ready to send data. - virtual bool ReadyToSendData() const = 0; - - protected: - virtual ~DataChannelProviderInterface() {} -}; - -struct InternalDataChannelInit : public DataChannelInit { - enum OpenHandshakeRole { - kOpener, - kAcker, - kNone - }; - // The default role is kOpener because the default |negotiated| is false. - InternalDataChannelInit() : open_handshake_role(kOpener) {} - explicit InternalDataChannelInit(const DataChannelInit& base) - : DataChannelInit(base), open_handshake_role(kOpener) { - // If the channel is externally negotiated, do not send the OPEN message. - if (base.negotiated) { - open_handshake_role = kNone; - } - } - - OpenHandshakeRole open_handshake_role; -}; - -// Helper class to allocate unique IDs for SCTP DataChannels -class SctpSidAllocator { - public: - // Gets the first unused odd/even id based on the DTLS role. If |role| is - // SSL_CLIENT, the allocated id starts from 0 and takes even numbers; - // otherwise, the id starts from 1 and takes odd numbers. - // Returns false if no id can be allocated. - bool AllocateSid(rtc::SSLRole role, int* sid); - - // Attempts to reserve a specific sid. Returns false if it's unavailable. - bool ReserveSid(int sid); - - // Indicates that |sid| isn't in use any more, and is thus available again. - void ReleaseSid(int sid); - - private: - // Checks if |sid| is available to be assigned to a new SCTP data channel. - bool IsSidAvailable(int sid) const; - - std::set used_sids_; -}; - -// DataChannel is a an implementation of the DataChannelInterface based on -// libjingle's data engine. It provides an implementation of unreliable or -// reliabledata channels. Currently this class is specifically designed to use -// both RtpDataEngine and SctpDataEngine. - -// DataChannel states: -// kConnecting: The channel has been created the transport might not yet be -// ready. -// kOpen: The channel have a local SSRC set by a call to UpdateSendSsrc -// and a remote SSRC set by call to UpdateReceiveSsrc and the transport -// has been writable once. -// kClosing: DataChannelInterface::Close has been called or UpdateReceiveSsrc -// has been called with SSRC==0 -// kClosed: Both UpdateReceiveSsrc and UpdateSendSsrc has been called with -// SSRC==0. -class DataChannel : public DataChannelInterface, - public sigslot::has_slots<>, - public rtc::MessageHandler { - public: - static rtc::scoped_refptr Create( - DataChannelProviderInterface* provider, - cricket::DataChannelType dct, - const std::string& label, - const InternalDataChannelInit& config); - - virtual void RegisterObserver(DataChannelObserver* observer); - virtual void UnregisterObserver(); - - virtual std::string label() const { return label_; } - virtual bool reliable() const; - virtual bool ordered() const { return config_.ordered; } - virtual uint16_t maxRetransmitTime() const { - return config_.maxRetransmitTime; - } - virtual uint16_t maxRetransmits() const { return config_.maxRetransmits; } - virtual std::string protocol() const { return config_.protocol; } - virtual bool negotiated() const { return config_.negotiated; } - virtual int id() const { return config_.id; } - virtual uint64_t buffered_amount() const; - virtual void Close(); - virtual DataState state() const { return state_; } - virtual uint32_t messages_sent() const { return messages_sent_; } - virtual uint64_t bytes_sent() const { return bytes_sent_; } - virtual uint32_t messages_received() const { return messages_received_; } - virtual uint64_t bytes_received() const { return bytes_received_; } - virtual bool Send(const DataBuffer& buffer); - - // rtc::MessageHandler override. - virtual void OnMessage(rtc::Message* msg); - - // Called when the channel's ready to use. That can happen when the - // underlying DataMediaChannel becomes ready, or when this channel is a new - // stream on an existing DataMediaChannel, and we've finished negotiation. - void OnChannelReady(bool writable); - - // Slots for provider to connect signals to. - void OnDataReceived(const cricket::ReceiveDataParams& params, - const rtc::CopyOnWriteBuffer& payload); - void OnStreamClosedRemotely(int sid); - - // The remote peer request that this channel should be closed. - void RemotePeerRequestClose(); - - // The following methods are for SCTP only. - - // Sets the SCTP sid and adds to transport layer if not set yet. Should only - // be called once. - void SetSctpSid(int sid); - // Called when the transport channel is created. - // Only needs to be called for SCTP data channels. - void OnTransportChannelCreated(); - // Called when the transport channel is destroyed. - // This method makes sure the DataChannel is disconnected and changes state - // to kClosed. - void OnTransportChannelDestroyed(); - - // The following methods are for RTP only. - - // Set the SSRC this channel should use to send data on the - // underlying data engine. |send_ssrc| == 0 means that the channel is no - // longer part of the session negotiation. - void SetSendSsrc(uint32_t send_ssrc); - // Set the SSRC this channel should use to receive data from the - // underlying data engine. - void SetReceiveSsrc(uint32_t receive_ssrc); - - cricket::DataChannelType data_channel_type() const { - return data_channel_type_; - } - - // Emitted when state transitions to kOpen. - sigslot::signal1 SignalOpened; - // Emitted when state transitions to kClosed. - // In the case of SCTP channels, this signal can be used to tell when the - // channel's sid is free. - sigslot::signal1 SignalClosed; - - protected: - DataChannel(DataChannelProviderInterface* client, - cricket::DataChannelType dct, - const std::string& label); - virtual ~DataChannel(); - - private: - // A packet queue which tracks the total queued bytes. Queued packets are - // owned by this class. - class PacketQueue { - public: - PacketQueue(); - ~PacketQueue(); - - size_t byte_count() const { - return byte_count_; - } - - bool Empty() const; - - DataBuffer* Front(); - - void Pop(); - - void Push(DataBuffer* packet); - - void Clear(); - - void Swap(PacketQueue* other); - - private: - std::deque packets_; - size_t byte_count_; - }; - - // The OPEN(_ACK) signaling state. - enum HandshakeState { - kHandshakeInit, - kHandshakeShouldSendOpen, - kHandshakeShouldSendAck, - kHandshakeWaitingForAck, - kHandshakeReady - }; - - bool Init(const InternalDataChannelInit& config); - void DoClose(); - void UpdateState(); - void SetState(DataState state); - void DisconnectFromProvider(); - - void DeliverQueuedReceivedData(); - - void SendQueuedDataMessages(); - bool SendDataMessage(const DataBuffer& buffer, bool queue_if_blocked); - bool QueueSendDataMessage(const DataBuffer& buffer); - - void SendQueuedControlMessages(); - void QueueControlMessage(const rtc::CopyOnWriteBuffer& buffer); - bool SendControlMessage(const rtc::CopyOnWriteBuffer& buffer); - - std::string label_; - InternalDataChannelInit config_; - DataChannelObserver* observer_; - DataState state_; - uint32_t messages_sent_; - uint64_t bytes_sent_; - uint32_t messages_received_; - uint64_t bytes_received_; - cricket::DataChannelType data_channel_type_; - DataChannelProviderInterface* provider_; - HandshakeState handshake_state_; - bool connected_to_provider_; - bool send_ssrc_set_; - bool receive_ssrc_set_; - bool writable_; - uint32_t send_ssrc_; - uint32_t receive_ssrc_; - // Control messages that always have to get sent out before any queued - // data. - PacketQueue queued_control_data_; - PacketQueue queued_received_data_; - PacketQueue queued_send_data_; -}; - -// Define proxy for DataChannelInterface. -BEGIN_SIGNALING_PROXY_MAP(DataChannel) - PROXY_SIGNALING_THREAD_DESTRUCTOR() - PROXY_METHOD1(void, RegisterObserver, DataChannelObserver*) - PROXY_METHOD0(void, UnregisterObserver) - PROXY_CONSTMETHOD0(std::string, label) - PROXY_CONSTMETHOD0(bool, reliable) - PROXY_CONSTMETHOD0(bool, ordered) - PROXY_CONSTMETHOD0(uint16_t, maxRetransmitTime) - PROXY_CONSTMETHOD0(uint16_t, maxRetransmits) - PROXY_CONSTMETHOD0(std::string, protocol) - PROXY_CONSTMETHOD0(bool, negotiated) - PROXY_CONSTMETHOD0(int, id) - PROXY_CONSTMETHOD0(DataState, state) - PROXY_CONSTMETHOD0(uint32_t, messages_sent) - PROXY_CONSTMETHOD0(uint64_t, bytes_sent) - PROXY_CONSTMETHOD0(uint32_t, messages_received) - PROXY_CONSTMETHOD0(uint64_t, bytes_received) - PROXY_CONSTMETHOD0(uint64_t, buffered_amount) - PROXY_METHOD0(void, Close) - PROXY_METHOD1(bool, Send, const DataBuffer&) -END_PROXY_MAP() - -} // namespace webrtc - -#endif // WEBRTC_API_DATACHANNEL_H_ diff --git a/WebRtc.NET/include/webrtc/api/datachannelinterface.h b/WebRtc.NET/include/webrtc/api/datachannelinterface.h deleted file mode 100644 index 8b788c04..00000000 --- a/WebRtc.NET/include/webrtc/api/datachannelinterface.h +++ /dev/null @@ -1,146 +0,0 @@ -/* - * Copyright 2012 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -// This file contains interfaces for DataChannels -// http://dev.w3.org/2011/webrtc/editor/webrtc.html#rtcdatachannel - -#ifndef WEBRTC_API_DATACHANNELINTERFACE_H_ -#define WEBRTC_API_DATACHANNELINTERFACE_H_ - -#include - -#include "webrtc/base/basictypes.h" -#include "webrtc/base/checks.h" -#include "webrtc/base/copyonwritebuffer.h" -#include "webrtc/base/refcount.h" - - -namespace webrtc { - -struct DataChannelInit { - DataChannelInit() - : reliable(false), - ordered(true), - maxRetransmitTime(-1), - maxRetransmits(-1), - negotiated(false), - id(-1) { - } - - bool reliable; // Deprecated. - bool ordered; // True if ordered delivery is required. - int maxRetransmitTime; // The max period of time in milliseconds in which - // retransmissions will be sent. After this time, no - // more retransmissions will be sent. -1 if unset. - int maxRetransmits; // The max number of retransmissions. -1 if unset. - std::string protocol; // This is set by the application and opaque to the - // WebRTC implementation. - bool negotiated; // True if the channel has been externally negotiated - // and we do not send an in-band signalling in the - // form of an "open" message. - int id; // The stream id, or SID, for SCTP data channels. -1 - // if unset. -}; - -struct DataBuffer { - DataBuffer(const rtc::CopyOnWriteBuffer& data, bool binary) - : data(data), - binary(binary) { - } - // For convenience for unit tests. - explicit DataBuffer(const std::string& text) - : data(text.data(), text.length()), - binary(false) { - } - size_t size() const { return data.size(); } - - rtc::CopyOnWriteBuffer data; - // Indicates if the received data contains UTF-8 or binary data. - // Note that the upper layers are left to verify the UTF-8 encoding. - // TODO(jiayl): prefer to use an enum instead of a bool. - bool binary; -}; - -class DataChannelObserver { - public: - // The data channel state have changed. - virtual void OnStateChange() = 0; - // A data buffer was successfully received. - virtual void OnMessage(const DataBuffer& buffer) = 0; - // The data channel's buffered_amount has changed. - virtual void OnBufferedAmountChange(uint64_t previous_amount){}; - - protected: - virtual ~DataChannelObserver() {} -}; - -class DataChannelInterface : public rtc::RefCountInterface { - public: - // Keep in sync with DataChannel.java:State and - // RTCDataChannel.h:RTCDataChannelState. - enum DataState { - kConnecting, - kOpen, // The DataChannel is ready to send data. - kClosing, - kClosed - }; - - static const char* DataStateString(DataState state) { - switch (state) { - case kConnecting: - return "connecting"; - case kOpen: - return "open"; - case kClosing: - return "closing"; - case kClosed: - return "closed"; - } - RTC_CHECK(false) << "Unknown DataChannel state: " << state; - return ""; - } - - virtual void RegisterObserver(DataChannelObserver* observer) = 0; - virtual void UnregisterObserver() = 0; - // The label attribute represents a label that can be used to distinguish this - // DataChannel object from other DataChannel objects. - virtual std::string label() const = 0; - virtual bool reliable() const = 0; - - // TODO(tommyw): Remove these dummy implementations when all classes have - // implemented these APIs. They should all just return the values the - // DataChannel was created with. - virtual bool ordered() const { return false; } - virtual uint16_t maxRetransmitTime() const { return 0; } - virtual uint16_t maxRetransmits() const { return 0; } - virtual std::string protocol() const { return std::string(); } - virtual bool negotiated() const { return false; } - - virtual int id() const = 0; - virtual DataState state() const = 0; - virtual uint32_t messages_sent() const = 0; - virtual uint64_t bytes_sent() const = 0; - virtual uint32_t messages_received() const = 0; - virtual uint64_t bytes_received() const = 0; - // The buffered_amount returns the number of bytes of application data - // (UTF-8 text and binary data) that have been queued using SendBuffer but - // have not yet been transmitted to the network. - virtual uint64_t buffered_amount() const = 0; - virtual void Close() = 0; - // Sends |data| to the remote peer. - virtual bool Send(const DataBuffer& buffer) = 0; - - protected: - virtual ~DataChannelInterface() {} -}; - -} // namespace webrtc - -#endif // WEBRTC_API_DATACHANNELINTERFACE_H_ diff --git a/WebRtc.NET/include/webrtc/api/dtmfsender.h b/WebRtc.NET/include/webrtc/api/dtmfsender.h deleted file mode 100644 index d4e8f06d..00000000 --- a/WebRtc.NET/include/webrtc/api/dtmfsender.h +++ /dev/null @@ -1,124 +0,0 @@ -/* - * Copyright 2012 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_API_DTMFSENDER_H_ -#define WEBRTC_API_DTMFSENDER_H_ - -#include - -#include "webrtc/api/dtmfsenderinterface.h" -#include "webrtc/api/mediastreaminterface.h" -#include "webrtc/api/proxy.h" -#include "webrtc/base/common.h" -#include "webrtc/base/constructormagic.h" -#include "webrtc/base/messagehandler.h" -#include "webrtc/base/refcount.h" - -// DtmfSender is the native implementation of the RTCDTMFSender defined by -// the WebRTC W3C Editor's Draft. -// http://dev.w3.org/2011/webrtc/editor/webrtc.html - -namespace rtc { -class Thread; -} - -namespace webrtc { - -// This interface is called by DtmfSender to talk to the actual audio channel -// to send DTMF. -class DtmfProviderInterface { - public: - // Returns true if the audio track with given id (|track_id|) is capable - // of sending DTMF. Otherwise returns false. - virtual bool CanInsertDtmf(const std::string& track_id) = 0; - // Sends DTMF |code| via the audio track with given id (|track_id|). - // The |duration| indicates the length of the DTMF tone in ms. - // Returns true on success and false on failure. - virtual bool InsertDtmf(const std::string& track_id, - int code, int duration) = 0; - // Returns a |sigslot::signal0<>| signal. The signal should fire before - // the provider is destroyed. - virtual sigslot::signal0<>* GetOnDestroyedSignal() = 0; - - protected: - virtual ~DtmfProviderInterface() {} -}; - -class DtmfSender - : public DtmfSenderInterface, - public sigslot::has_slots<>, - public rtc::MessageHandler { - public: - static rtc::scoped_refptr Create( - AudioTrackInterface* track, - rtc::Thread* signaling_thread, - DtmfProviderInterface* provider); - - // Implements DtmfSenderInterface. - void RegisterObserver(DtmfSenderObserverInterface* observer) override; - void UnregisterObserver() override; - bool CanInsertDtmf() override; - bool InsertDtmf(const std::string& tones, - int duration, - int inter_tone_gap) override; - const AudioTrackInterface* track() const override; - std::string tones() const override; - int duration() const override; - int inter_tone_gap() const override; - - protected: - DtmfSender(AudioTrackInterface* track, - rtc::Thread* signaling_thread, - DtmfProviderInterface* provider); - virtual ~DtmfSender(); - - private: - DtmfSender(); - - // Implements MessageHandler. - void OnMessage(rtc::Message* msg) override; - - // The DTMF sending task. - void DoInsertDtmf(); - - void OnProviderDestroyed(); - - void StopSending(); - - rtc::scoped_refptr track_; - DtmfSenderObserverInterface* observer_; - rtc::Thread* signaling_thread_; - DtmfProviderInterface* provider_; - std::string tones_; - int duration_; - int inter_tone_gap_; - - RTC_DISALLOW_COPY_AND_ASSIGN(DtmfSender); -}; - -// Define proxy for DtmfSenderInterface. -BEGIN_SIGNALING_PROXY_MAP(DtmfSender) - PROXY_SIGNALING_THREAD_DESTRUCTOR() - PROXY_METHOD1(void, RegisterObserver, DtmfSenderObserverInterface*) - PROXY_METHOD0(void, UnregisterObserver) - PROXY_METHOD0(bool, CanInsertDtmf) - PROXY_METHOD3(bool, InsertDtmf, const std::string&, int, int) - PROXY_CONSTMETHOD0(const AudioTrackInterface*, track) - PROXY_CONSTMETHOD0(std::string, tones) - PROXY_CONSTMETHOD0(int, duration) - PROXY_CONSTMETHOD0(int, inter_tone_gap) -END_PROXY_MAP() - -// Get DTMF code from the DTMF event character. -bool GetDtmfCode(char tone, int* code); - -} // namespace webrtc - -#endif // WEBRTC_API_DTMFSENDER_H_ diff --git a/WebRtc.NET/include/webrtc/api/dtmfsenderinterface.h b/WebRtc.NET/include/webrtc/api/dtmfsenderinterface.h deleted file mode 100644 index a726ca32..00000000 --- a/WebRtc.NET/include/webrtc/api/dtmfsenderinterface.h +++ /dev/null @@ -1,88 +0,0 @@ -/* - * Copyright 2012 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_API_DTMFSENDERINTERFACE_H_ -#define WEBRTC_API_DTMFSENDERINTERFACE_H_ - -#include - -#include "webrtc/api/mediastreaminterface.h" -#include "webrtc/base/common.h" -#include "webrtc/base/refcount.h" - -// This file contains interfaces for DtmfSender. - -namespace webrtc { - -// DtmfSender callback interface. Application should implement this interface -// to get notifications from the DtmfSender. -class DtmfSenderObserverInterface { - public: - // Triggered when DTMF |tone| is sent. - // If |tone| is empty that means the DtmfSender has sent out all the given - // tones. - virtual void OnToneChange(const std::string& tone) = 0; - - protected: - virtual ~DtmfSenderObserverInterface() {} -}; - -// The interface of native implementation of the RTCDTMFSender defined by the -// WebRTC W3C Editor's Draft. -class DtmfSenderInterface : public rtc::RefCountInterface { - public: - virtual void RegisterObserver(DtmfSenderObserverInterface* observer) = 0; - virtual void UnregisterObserver() = 0; - - // Returns true if this DtmfSender is capable of sending DTMF. - // Otherwise returns false. - virtual bool CanInsertDtmf() = 0; - - // Queues a task that sends the DTMF |tones|. The |tones| parameter is treated - // as a series of characters. The characters 0 through 9, A through D, #, and - // * generate the associated DTMF tones. The characters a to d are equivalent - // to A to D. The character ',' indicates a delay of 2 seconds before - // processing the next character in the tones parameter. - // Unrecognized characters are ignored. - // The |duration| parameter indicates the duration in ms to use for each - // character passed in the |tones| parameter. - // The duration cannot be more than 6000 or less than 70. - // The |inter_tone_gap| parameter indicates the gap between tones in ms. - // The |inter_tone_gap| must be at least 50 ms but should be as short as - // possible. - // If InsertDtmf is called on the same object while an existing task for this - // object to generate DTMF is still running, the previous task is canceled. - // Returns true on success and false on failure. - virtual bool InsertDtmf(const std::string& tones, int duration, - int inter_tone_gap) = 0; - - // Returns the track given as argument to the constructor. - virtual const AudioTrackInterface* track() const = 0; - - // Returns the tones remaining to be played out. - virtual std::string tones() const = 0; - - // Returns the current tone duration value in ms. - // This value will be the value last set via the InsertDtmf() method, or the - // default value of 100 ms if InsertDtmf() was never called. - virtual int duration() const = 0; - - // Returns the current value of the between-tone gap in ms. - // This value will be the value last set via the InsertDtmf() method, or the - // default value of 50 ms if InsertDtmf() was never called. - virtual int inter_tone_gap() const = 0; - - protected: - virtual ~DtmfSenderInterface() {} -}; - -} // namespace webrtc - -#endif // WEBRTC_API_DTMFSENDERINTERFACE_H_ diff --git a/WebRtc.NET/include/webrtc/api/fakemediacontroller.h b/WebRtc.NET/include/webrtc/api/fakemediacontroller.h deleted file mode 100644 index bc3f3e2f..00000000 --- a/WebRtc.NET/include/webrtc/api/fakemediacontroller.h +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright 2015 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_API_FAKEMEDIACONTROLLER_H_ -#define WEBRTC_API_FAKEMEDIACONTROLLER_H_ - -#include "webrtc/api/mediacontroller.h" -#include "webrtc/base/checks.h" -#include "webrtc/media/base/mediachannel.h" - -namespace cricket { - -class FakeMediaController : public webrtc::MediaControllerInterface { - public: - explicit FakeMediaController(cricket::ChannelManager* channel_manager, - webrtc::Call* call) - : channel_manager_(channel_manager), call_(call) { - RTC_DCHECK(nullptr != channel_manager_); - RTC_DCHECK(nullptr != call_); - } - ~FakeMediaController() override {} - void Close() override {} - webrtc::Call* call_w() override { return call_; } - cricket::ChannelManager* channel_manager() const override { - return channel_manager_; - } - const MediaConfig& config() const override { return media_config_; } - - private: - const MediaConfig media_config_ = MediaConfig(); - cricket::ChannelManager* channel_manager_; - webrtc::Call* call_; -}; -} // namespace cricket -#endif // WEBRTC_API_FAKEMEDIACONTROLLER_H_ diff --git a/WebRtc.NET/include/webrtc/api/fakemetricsobserver.h b/WebRtc.NET/include/webrtc/api/fakemetricsobserver.h deleted file mode 100644 index baac0ca8..00000000 --- a/WebRtc.NET/include/webrtc/api/fakemetricsobserver.h +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Copyright 2015 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_API_FAKEMETRICSOBSERVER_H_ -#define WEBRTC_API_FAKEMETRICSOBSERVER_H_ - -#include -#include - -#include "webrtc/api/peerconnectioninterface.h" -#include "webrtc/base/thread_checker.h" - -namespace webrtc { - -class FakeMetricsObserver : public MetricsObserverInterface { - public: - FakeMetricsObserver(); - void Reset(); - - void IncrementEnumCounter(PeerConnectionEnumCounterType, - int counter, - int counter_max) override; - void AddHistogramSample(PeerConnectionMetricsName type, - int value) override; - - // Accessors to be used by the tests. - int GetEnumCounter(PeerConnectionEnumCounterType type, int counter) const; - int GetHistogramSample(PeerConnectionMetricsName type) const; - - protected: - ~FakeMetricsObserver() {} - - private: - rtc::ThreadChecker thread_checker_; - // The vector contains maps for each counter type. In the map, it's a mapping - // from individual counter to its count, such that it's memory efficient when - // comes to sparse enum types, like the SSL ciphers in the IANA registry. - std::vector> counters_; - int histogram_samples_[kPeerConnectionMetricsName_Max]; -}; - -} // namespace webrtc - -#endif // WEBRTC_API_FAKEMETRICSOBSERVER_H_ diff --git a/WebRtc.NET/include/webrtc/api/jsep.h b/WebRtc.NET/include/webrtc/api/jsep.h deleted file mode 100644 index 37aed46b..00000000 --- a/WebRtc.NET/include/webrtc/api/jsep.h +++ /dev/null @@ -1,144 +0,0 @@ -/* - * Copyright 2012 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -// Interfaces matching the draft-ietf-rtcweb-jsep-01. - -#ifndef WEBRTC_API_JSEP_H_ -#define WEBRTC_API_JSEP_H_ - -#include - -#include -#include - -#include "webrtc/base/refcount.h" - -namespace cricket { -class Candidate; -class SessionDescription; -} // namespace cricket - -namespace webrtc { - -struct SdpParseError { - public: - // The sdp line that causes the error. - std::string line; - // Explains the error. - std::string description; -}; - -// Class representation of an ICE candidate. -// An instance of this interface is supposed to be owned by one class at -// a time and is therefore not expected to be thread safe. -class IceCandidateInterface { - public: - virtual ~IceCandidateInterface() {} - /// If present, this contains the identierfier of the "media stream - // identification" as defined in [RFC 3388] for m-line this candidate is - // assocated with. - virtual std::string sdp_mid() const = 0; - // This indeicates the index (starting at zero) of m-line in the SDP this - // candidate is assocated with. - virtual int sdp_mline_index() const = 0; - virtual const cricket::Candidate& candidate() const = 0; - // Creates a SDP-ized form of this candidate. - virtual bool ToString(std::string* out) const = 0; -}; - -// Creates a IceCandidateInterface based on SDP string. -// Returns NULL if the sdp string can't be parsed. -// |error| can be NULL if doesn't care about the failure reason. -IceCandidateInterface* CreateIceCandidate(const std::string& sdp_mid, - int sdp_mline_index, - const std::string& sdp, - SdpParseError* error); - -// This class represents a collection of candidates for a specific m-line. -// This class is used in SessionDescriptionInterface to represent all known -// candidates for a certain m-line. -class IceCandidateCollection { - public: - virtual ~IceCandidateCollection() {} - virtual size_t count() const = 0; - // Returns true if an equivalent |candidate| exist in the collection. - virtual bool HasCandidate(const IceCandidateInterface* candidate) const = 0; - virtual const IceCandidateInterface* at(size_t index) const = 0; -}; - -// Class representation of a Session description. -// An instance of this interface is supposed to be owned by one class at -// a time and is therefore not expected to be thread safe. -class SessionDescriptionInterface { - public: - // Supported types: - static const char kOffer[]; - static const char kPrAnswer[]; - static const char kAnswer[]; - - virtual ~SessionDescriptionInterface() {} - virtual cricket::SessionDescription* description() = 0; - virtual const cricket::SessionDescription* description() const = 0; - // Get the session id and session version, which are defined based on - // RFC 4566 for the SDP o= line. - virtual std::string session_id() const = 0; - virtual std::string session_version() const = 0; - virtual std::string type() const = 0; - // Adds the specified candidate to the description. - // Ownership is not transferred. - // Returns false if the session description does not have a media section that - // corresponds to the |candidate| label. - virtual bool AddCandidate(const IceCandidateInterface* candidate) = 0; - // Removes the candidates from the description. - // Returns the number of candidates removed. - virtual size_t RemoveCandidates( - const std::vector& candidates) { return 0; } - - // Returns the number of m- lines in the session description. - virtual size_t number_of_mediasections() const = 0; - // Returns a collection of all candidates that belong to a certain m-line - virtual const IceCandidateCollection* candidates( - size_t mediasection_index) const = 0; - // Serializes the description to SDP. - virtual bool ToString(std::string* out) const = 0; -}; - -// Creates a SessionDescriptionInterface based on SDP string and the type. -// Returns NULL if the sdp string can't be parsed or the type is unsupported. -// |error| can be NULL if doesn't care about the failure reason. -SessionDescriptionInterface* CreateSessionDescription(const std::string& type, - const std::string& sdp, - SdpParseError* error); - -// Jsep CreateOffer and CreateAnswer callback interface. -class CreateSessionDescriptionObserver : public rtc::RefCountInterface { - public: - // The implementation of the CreateSessionDescriptionObserver takes - // the ownership of the |desc|. - virtual void OnSuccess(SessionDescriptionInterface* desc) = 0; - virtual void OnFailure(const std::string& error) = 0; - - protected: - ~CreateSessionDescriptionObserver() {} -}; - -// Jsep SetLocalDescription and SetRemoteDescription callback interface. -class SetSessionDescriptionObserver : public rtc::RefCountInterface { - public: - virtual void OnSuccess() = 0; - virtual void OnFailure(const std::string& error) = 0; - - protected: - ~SetSessionDescriptionObserver() {} -}; - -} // namespace webrtc - -#endif // WEBRTC_API_JSEP_H_ diff --git a/WebRtc.NET/include/webrtc/api/jsepicecandidate.h b/WebRtc.NET/include/webrtc/api/jsepicecandidate.h deleted file mode 100644 index 7e9500bc..00000000 --- a/WebRtc.NET/include/webrtc/api/jsepicecandidate.h +++ /dev/null @@ -1,85 +0,0 @@ -/* - * Copyright 2012 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -// Implements the IceCandidateInterface. - -#ifndef WEBRTC_API_JSEPICECANDIDATE_H_ -#define WEBRTC_API_JSEPICECANDIDATE_H_ - -#include - -#include "webrtc/api/jsep.h" -#include "webrtc/base/constructormagic.h" -#include "webrtc/p2p/base/candidate.h" - -namespace webrtc { - -class JsepIceCandidate : public IceCandidateInterface { - public: - JsepIceCandidate(const std::string& sdp_mid, int sdp_mline_index); - JsepIceCandidate(const std::string& sdp_mid, int sdp_mline_index, - const cricket::Candidate& candidate); - ~JsepIceCandidate(); - // |error| can be NULL if don't care about the failure reason. - bool Initialize(const std::string& sdp, SdpParseError* err); - void SetCandidate(const cricket::Candidate& candidate) { - candidate_ = candidate; - } - - virtual std::string sdp_mid() const { return sdp_mid_; } - virtual int sdp_mline_index() const { return sdp_mline_index_; } - virtual const cricket::Candidate& candidate() const { - return candidate_; - } - - virtual bool ToString(std::string* out) const; - - private: - std::string sdp_mid_; - int sdp_mline_index_; - cricket::Candidate candidate_; - - RTC_DISALLOW_COPY_AND_ASSIGN(JsepIceCandidate); -}; - -// Implementation of IceCandidateCollection. -// This implementation stores JsepIceCandidates. -class JsepCandidateCollection : public IceCandidateCollection { - public: - JsepCandidateCollection() {} - // Move constructor is defined so that a vector of JsepCandidateCollections - // can be resized. - JsepCandidateCollection(JsepCandidateCollection&& o) - : candidates_(std::move(o.candidates_)) {} - ~JsepCandidateCollection(); - virtual size_t count() const { - return candidates_.size(); - } - virtual bool HasCandidate(const IceCandidateInterface* candidate) const; - // Adds and takes ownership of the JsepIceCandidate. - virtual void add(JsepIceCandidate* candidate) { - candidates_.push_back(candidate); - } - virtual const IceCandidateInterface* at(size_t index) const { - return candidates_[index]; - } - // Removes the candidate that has a matching address and protocol. - // Returns the number of candidates that were removed. - size_t remove(const cricket::Candidate& candidate); - - private: - std::vector candidates_; - - RTC_DISALLOW_COPY_AND_ASSIGN(JsepCandidateCollection); -}; - -} // namespace webrtc - -#endif // WEBRTC_API_JSEPICECANDIDATE_H_ diff --git a/WebRtc.NET/include/webrtc/api/jsepsessiondescription.h b/WebRtc.NET/include/webrtc/api/jsepsessiondescription.h deleted file mode 100644 index 8f2ab5ff..00000000 --- a/WebRtc.NET/include/webrtc/api/jsepsessiondescription.h +++ /dev/null @@ -1,88 +0,0 @@ -/* - * Copyright 2012 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -// Implements the SessionDescriptionInterface. - -#ifndef WEBRTC_API_JSEPSESSIONDESCRIPTION_H_ -#define WEBRTC_API_JSEPSESSIONDESCRIPTION_H_ - -#include -#include -#include - -#include "webrtc/api/jsep.h" -#include "webrtc/api/jsepicecandidate.h" -#include "webrtc/base/constructormagic.h" -#include "webrtc/p2p/base/candidate.h" - -namespace cricket { -class SessionDescription; -} - -namespace webrtc { - -class JsepSessionDescription : public SessionDescriptionInterface { - public: - explicit JsepSessionDescription(const std::string& type); - virtual ~JsepSessionDescription(); - - // |error| can be NULL if don't care about the failure reason. - bool Initialize(const std::string& sdp, SdpParseError* error); - - // Takes ownership of |description|. - bool Initialize(cricket::SessionDescription* description, - const std::string& session_id, - const std::string& session_version); - - virtual cricket::SessionDescription* description() { - return description_.get(); - } - virtual const cricket::SessionDescription* description() const { - return description_.get(); - } - virtual std::string session_id() const { - return session_id_; - } - virtual std::string session_version() const { - return session_version_; - } - virtual std::string type() const { - return type_; - } - // Allow changing the type. Used for testing. - void set_type(const std::string& type) { type_ = type; } - virtual bool AddCandidate(const IceCandidateInterface* candidate); - virtual size_t RemoveCandidates( - const std::vector& candidates); - virtual size_t number_of_mediasections() const; - virtual const IceCandidateCollection* candidates( - size_t mediasection_index) const; - virtual bool ToString(std::string* out) const; - - static const int kDefaultVideoCodecId; - static const char kDefaultVideoCodecName[]; - - private: - std::unique_ptr description_; - std::string session_id_; - std::string session_version_; - std::string type_; - std::vector candidate_collection_; - - bool GetMediasectionIndex(const IceCandidateInterface* candidate, - size_t* index); - int GetMediasectionIndex(const cricket::Candidate& candidate); - - RTC_DISALLOW_COPY_AND_ASSIGN(JsepSessionDescription); -}; - -} // namespace webrtc - -#endif // WEBRTC_API_JSEPSESSIONDESCRIPTION_H_ diff --git a/WebRtc.NET/include/webrtc/api/localaudiosource.h b/WebRtc.NET/include/webrtc/api/localaudiosource.h deleted file mode 100644 index e1c023e5..00000000 --- a/WebRtc.NET/include/webrtc/api/localaudiosource.h +++ /dev/null @@ -1,60 +0,0 @@ -/* - * Copyright 2012 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_API_LOCALAUDIOSOURCE_H_ -#define WEBRTC_API_LOCALAUDIOSOURCE_H_ - -#include "webrtc/api/mediastreaminterface.h" -#include "webrtc/api/notifier.h" -#include "webrtc/api/peerconnectioninterface.h" -#include "webrtc/media/base/mediachannel.h" - -// LocalAudioSource implements AudioSourceInterface. -// This contains settings for switching audio processing on and off. - -namespace webrtc { - -class MediaConstraintsInterface; - -class LocalAudioSource : public Notifier { - public: - // Creates an instance of LocalAudioSource. - static rtc::scoped_refptr Create( - const PeerConnectionFactoryInterface::Options& options, - const MediaConstraintsInterface* constraints); - - static rtc::scoped_refptr Create( - const PeerConnectionFactoryInterface::Options& options, - const cricket::AudioOptions* audio_options); - - SourceState state() const override { return kLive; } - bool remote() const override { return false; } - - virtual const cricket::AudioOptions& options() const { return options_; } - - void AddSink(AudioTrackSinkInterface* sink) override {} - void RemoveSink(AudioTrackSinkInterface* sink) override {} - - protected: - LocalAudioSource() {} - ~LocalAudioSource() override {} - - private: - void Initialize(const PeerConnectionFactoryInterface::Options& options, - const MediaConstraintsInterface* constraints); - void Initialize(const PeerConnectionFactoryInterface::Options& options, - const cricket::AudioOptions* audio_options); - - cricket::AudioOptions options_; -}; - -} // namespace webrtc - -#endif // WEBRTC_API_LOCALAUDIOSOURCE_H_ diff --git a/WebRtc.NET/include/webrtc/api/mediaconstraintsinterface.h b/WebRtc.NET/include/webrtc/api/mediaconstraintsinterface.h deleted file mode 100644 index 2017890f..00000000 --- a/WebRtc.NET/include/webrtc/api/mediaconstraintsinterface.h +++ /dev/null @@ -1,151 +0,0 @@ -/* - * Copyright 2013 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -// This file contains the interface for MediaConstraints, corresponding to -// the definition at -// http://www.w3.org/TR/mediacapture-streams/#mediastreamconstraints and also -// used in WebRTC: http://dev.w3.org/2011/webrtc/editor/webrtc.html#constraints. - -// This interface is being deprecated in Chrome, and may be removed -// from WebRTC too. -// https://bugs.chromium.org/p/webrtc/issues/detail?id=5617 - -#ifndef WEBRTC_API_MEDIACONSTRAINTSINTERFACE_H_ -#define WEBRTC_API_MEDIACONSTRAINTSINTERFACE_H_ - -#include -#include - -#include "webrtc/base/optional.h" -#include "webrtc/api/peerconnectioninterface.h" - -namespace webrtc { - -// MediaConstraintsInterface -// Interface used for passing arguments about media constraints -// to the MediaStream and PeerConnection implementation. -class MediaConstraintsInterface { - public: - struct Constraint { - Constraint() {} - Constraint(const std::string& key, const std::string value) - : key(key), value(value) { - } - std::string key; - std::string value; - }; - - class Constraints : public std::vector { - public: - bool FindFirst(const std::string& key, std::string* value) const; - }; - - virtual const Constraints& GetMandatory() const = 0; - virtual const Constraints& GetOptional() const = 0; - - // Constraint keys used by a local video source. - // Specified by draft-alvestrand-constraints-resolution-00b - static const char kMinAspectRatio[]; // minAspectRatio - static const char kMaxAspectRatio[]; // maxAspectRatio - static const char kMaxWidth[]; // maxWidth - static const char kMinWidth[]; // minWidth - static const char kMaxHeight[]; // maxHeight - static const char kMinHeight[]; // minHeight - static const char kMaxFrameRate[]; // maxFrameRate - static const char kMinFrameRate[]; // minFrameRate - - // Constraint keys used by a local audio source. - static const char kEchoCancellation[]; // echoCancellation - - // These keys are google specific. - static const char kGoogEchoCancellation[]; // googEchoCancellation - - static const char kExtendedFilterEchoCancellation[]; // googEchoCancellation2 - static const char kDAEchoCancellation[]; // googDAEchoCancellation - static const char kAutoGainControl[]; // googAutoGainControl - static const char kExperimentalAutoGainControl[]; // googAutoGainControl2 - static const char kNoiseSuppression[]; // googNoiseSuppression - static const char kExperimentalNoiseSuppression[]; // googNoiseSuppression2 - static const char kIntelligibilityEnhancer[]; // intelligibilityEnhancer - static const char kLevelControl[]; // levelControl - static const char - kLevelControlInitialPeakLevelDBFS[]; // levelControlInitialPeakLevelDBFS - static const char kHighpassFilter[]; // googHighpassFilter - static const char kTypingNoiseDetection[]; // googTypingNoiseDetection - static const char kAudioMirroring[]; // googAudioMirroring - static const char - kAudioNetworkAdaptorConfig[]; // goodAudioNetworkAdaptorConfig - - // Google-specific constraint keys for a local video source - static const char kNoiseReduction[]; // googNoiseReduction - - // Constraint keys for CreateOffer / CreateAnswer - // Specified by the W3C PeerConnection spec - static const char kOfferToReceiveVideo[]; // OfferToReceiveVideo - static const char kOfferToReceiveAudio[]; // OfferToReceiveAudio - static const char kVoiceActivityDetection[]; // VoiceActivityDetection - static const char kIceRestart[]; // IceRestart - // These keys are google specific. - static const char kUseRtpMux[]; // googUseRtpMUX - - // Constraints values. - static const char kValueTrue[]; // true - static const char kValueFalse[]; // false - - // PeerConnection constraint keys. - // Temporary pseudo-constraints used to enable DTLS-SRTP - static const char kEnableDtlsSrtp[]; // Enable DTLS-SRTP - // Temporary pseudo-constraints used to enable DataChannels - static const char kEnableRtpDataChannels[]; // Enable RTP DataChannels - // Google-specific constraint keys. - // Temporary pseudo-constraint for enabling DSCP through JS. - static const char kEnableDscp[]; // googDscp - // Constraint to enable IPv6 through JS. - static const char kEnableIPv6[]; // googIPv6 - // Temporary constraint to enable suspend below min bitrate feature. - static const char kEnableVideoSuspendBelowMinBitrate[]; - // googSuspendBelowMinBitrate - // Constraint to enable combined audio+video bandwidth estimation. - static const char kCombinedAudioVideoBwe[]; // googCombinedAudioVideoBwe - static const char kScreencastMinBitrate[]; // googScreencastMinBitrate - static const char kCpuOveruseDetection[]; // googCpuOveruseDetection - static const char kPayloadPadding[]; // googPayloadPadding - - // The prefix of internal-only constraints whose JS set values should be - // stripped by Chrome before passed down to Libjingle. - static const char kInternalConstraintPrefix[]; - - protected: - // Dtor protected as objects shouldn't be deleted via this interface - virtual ~MediaConstraintsInterface() {} -}; - -bool FindConstraint(const MediaConstraintsInterface* constraints, - const std::string& key, bool* value, - size_t* mandatory_constraints); - -bool FindConstraint(const MediaConstraintsInterface* constraints, - const std::string& key, - int* value, - size_t* mandatory_constraints); - -// Copy all relevant constraints into an RTCConfiguration object. -void CopyConstraintsIntoRtcConfiguration( - const MediaConstraintsInterface* constraints, - PeerConnectionInterface::RTCConfiguration* configuration); - -// Copy all relevant constraints into an AudioOptions object. -void CopyConstraintsIntoAudioOptions( - const MediaConstraintsInterface* constraints, - cricket::AudioOptions* options); - -} // namespace webrtc - -#endif // WEBRTC_API_MEDIACONSTRAINTSINTERFACE_H_ diff --git a/WebRtc.NET/include/webrtc/api/mediacontroller.h b/WebRtc.NET/include/webrtc/api/mediacontroller.h deleted file mode 100644 index 5ada20d2..00000000 --- a/WebRtc.NET/include/webrtc/api/mediacontroller.h +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright 2015 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_API_MEDIACONTROLLER_H_ -#define WEBRTC_API_MEDIACONTROLLER_H_ - -#include "webrtc/base/thread.h" - -namespace cricket { -class ChannelManager; -struct MediaConfig; -} // namespace cricket - -namespace webrtc { -class Call; -class VoiceEngine; -class RtcEventLog; - -// The MediaController currently owns shared state between media channels, but -// in the future will create and own RtpSenders and RtpReceivers. -class MediaControllerInterface { - public: - static MediaControllerInterface* Create( - const cricket::MediaConfig& config, - rtc::Thread* worker_thread, - cricket::ChannelManager* channel_manager, - webrtc::RtcEventLog* event_log); - - virtual ~MediaControllerInterface() {} - virtual void Close() = 0; - virtual webrtc::Call* call_w() = 0; - virtual cricket::ChannelManager* channel_manager() const = 0; - virtual const cricket::MediaConfig& config() const = 0; -}; -} // namespace webrtc - -#endif // WEBRTC_API_MEDIACONTROLLER_H_ diff --git a/WebRtc.NET/include/webrtc/api/mediastream.h b/WebRtc.NET/include/webrtc/api/mediastream.h deleted file mode 100644 index 1f80f252..00000000 --- a/WebRtc.NET/include/webrtc/api/mediastream.h +++ /dev/null @@ -1,58 +0,0 @@ -/* - * Copyright 2011 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -// This file contains the implementation of MediaStreamInterface interface. - -#ifndef WEBRTC_API_MEDIASTREAM_H_ -#define WEBRTC_API_MEDIASTREAM_H_ - -#include -#include - -#include "webrtc/api/mediastreaminterface.h" -#include "webrtc/api/notifier.h" - -namespace webrtc { - -class MediaStream : public Notifier { - public: - static rtc::scoped_refptr Create(const std::string& label); - - std::string label() const override { return label_; } - - bool AddTrack(AudioTrackInterface* track) override; - bool AddTrack(VideoTrackInterface* track) override; - bool RemoveTrack(AudioTrackInterface* track) override; - bool RemoveTrack(VideoTrackInterface* track) override; - rtc::scoped_refptr - FindAudioTrack(const std::string& track_id) override; - rtc::scoped_refptr - FindVideoTrack(const std::string& track_id) override; - - AudioTrackVector GetAudioTracks() override { return audio_tracks_; } - VideoTrackVector GetVideoTracks() override { return video_tracks_; } - - protected: - explicit MediaStream(const std::string& label); - - private: - template - bool AddTrack(TrackVector* Tracks, Track* track); - template - bool RemoveTrack(TrackVector* Tracks, MediaStreamTrackInterface* track); - - std::string label_; - AudioTrackVector audio_tracks_; - VideoTrackVector video_tracks_; -}; - -} // namespace webrtc - -#endif // WEBRTC_API_MEDIASTREAM_H_ diff --git a/WebRtc.NET/include/webrtc/api/mediastreaminterface.h b/WebRtc.NET/include/webrtc/api/mediastreaminterface.h deleted file mode 100644 index a52f0c76..00000000 --- a/WebRtc.NET/include/webrtc/api/mediastreaminterface.h +++ /dev/null @@ -1,289 +0,0 @@ -/* - * Copyright 2012 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -// This file contains interfaces for MediaStream, MediaTrack and MediaSource. -// These interfaces are used for implementing MediaStream and MediaTrack as -// defined in http://dev.w3.org/2011/webrtc/editor/webrtc.html#stream-api. These -// interfaces must be used only with PeerConnection. PeerConnectionManager -// interface provides the factory methods to create MediaStream and MediaTracks. - -#ifndef WEBRTC_API_MEDIASTREAMINTERFACE_H_ -#define WEBRTC_API_MEDIASTREAMINTERFACE_H_ - -#include - -#include -#include - -#include "webrtc/api/video/video_frame.h" -// TODO(nisse): Transition hack, Chrome expects that including this -// file declares I420Buffer. Delete after users of I420Buffer are -// fixed to include the new header. -#include "webrtc/api/video/i420_buffer.h" -#include "webrtc/base/refcount.h" -#include "webrtc/base/scoped_ref_ptr.h" -#include "webrtc/base/optional.h" -#include "webrtc/media/base/mediachannel.h" -#include "webrtc/media/base/videosinkinterface.h" -#include "webrtc/media/base/videosourceinterface.h" - -namespace webrtc { - -// Generic observer interface. -class ObserverInterface { - public: - virtual void OnChanged() = 0; - - protected: - virtual ~ObserverInterface() {} -}; - -class NotifierInterface { - public: - virtual void RegisterObserver(ObserverInterface* observer) = 0; - virtual void UnregisterObserver(ObserverInterface* observer) = 0; - - virtual ~NotifierInterface() {} -}; - -// Base class for sources. A MediaStreamTrack have an underlying source that -// provide media. A source can be shared with multiple tracks. -class MediaSourceInterface : public rtc::RefCountInterface, - public NotifierInterface { - public: - enum SourceState { - kInitializing, - kLive, - kEnded, - kMuted - }; - - virtual SourceState state() const = 0; - - virtual bool remote() const = 0; - - protected: - virtual ~MediaSourceInterface() {} -}; - -// Information about a track. -class MediaStreamTrackInterface : public rtc::RefCountInterface, - public NotifierInterface { - public: - enum TrackState { - kLive, - kEnded, - }; - - static const char kAudioKind[]; - static const char kVideoKind[]; - - // The kind() method must return kAudioKind only if the object is a - // subclass of AudioTrackInterface, and kVideoKind only if the - // object is a subclass of VideoTrackInterface. It is typically used - // to protect a static_cast<> to the corresponding subclass. - virtual std::string kind() const = 0; - virtual std::string id() const = 0; - virtual bool enabled() const = 0; - virtual TrackState state() const = 0; - virtual bool set_enabled(bool enable) = 0; - - protected: - virtual ~MediaStreamTrackInterface() {} -}; - -// VideoTrackSourceInterface is a reference counted source used for VideoTracks. -// The same source can be used in multiple VideoTracks. -class VideoTrackSourceInterface - : public MediaSourceInterface, - public rtc::VideoSourceInterface { - public: - struct Stats { - // Original size of captured frame, before video adaptation. - int input_width; - int input_height; - }; - - // Indicates that parameters suitable for screencasts should be automatically - // applied to RtpSenders. - // TODO(perkj): Remove these once all known applications have moved to - // explicitly setting suitable parameters for screencasts and dont' need this - // implicit behavior. - virtual bool is_screencast() const = 0; - - // Indicates that the encoder should denoise video before encoding it. - // If it is not set, the default configuration is used which is different - // depending on video codec. - // TODO(perkj): Remove this once denoising is done by the source, and not by - // the encoder. - virtual rtc::Optional needs_denoising() const = 0; - - // Returns false if no stats are available, e.g, for a remote - // source, or a source which has not seen its first frame yet. - // Should avoid blocking. - virtual bool GetStats(Stats* stats) = 0; - - protected: - virtual ~VideoTrackSourceInterface() {} -}; - -class VideoTrackInterface - : public MediaStreamTrackInterface, - public rtc::VideoSourceInterface { - public: - // Video track content hint, used to override the source is_screencast - // property. - // See https://crbug.com/653531 and https://github.com/WICG/mst-content-hint. - enum class ContentHint { kNone, kFluid, kDetailed }; - - // Register a video sink for this track. - void AddOrUpdateSink(rtc::VideoSinkInterface* sink, - const rtc::VideoSinkWants& wants) override {} - void RemoveSink(rtc::VideoSinkInterface* sink) override {} - - virtual VideoTrackSourceInterface* GetSource() const = 0; - - virtual ContentHint content_hint() const { return ContentHint::kNone; } - virtual void set_content_hint(ContentHint hint) {} - - protected: - virtual ~VideoTrackInterface() {} -}; - -// Interface for receiving audio data from a AudioTrack. -class AudioTrackSinkInterface { - public: - virtual void OnData(const void* audio_data, - int bits_per_sample, - int sample_rate, - size_t number_of_channels, - size_t number_of_frames) = 0; - - protected: - virtual ~AudioTrackSinkInterface() {} -}; - -// AudioSourceInterface is a reference counted source used for AudioTracks. -// The same source can be used in multiple AudioTracks. -class AudioSourceInterface : public MediaSourceInterface { - public: - class AudioObserver { - public: - virtual void OnSetVolume(double volume) = 0; - - protected: - virtual ~AudioObserver() {} - }; - - // TODO(xians): Makes all the interface pure virtual after Chrome has their - // implementations. - // Sets the volume to the source. |volume| is in the range of [0, 10]. - // TODO(tommi): This method should be on the track and ideally volume should - // be applied in the track in a way that does not affect clones of the track. - virtual void SetVolume(double volume) {} - - // Registers/unregisters observer to the audio source. - virtual void RegisterAudioObserver(AudioObserver* observer) {} - virtual void UnregisterAudioObserver(AudioObserver* observer) {} - - // TODO(tommi): Make pure virtual. - virtual void AddSink(AudioTrackSinkInterface* sink) {} - virtual void RemoveSink(AudioTrackSinkInterface* sink) {} -}; - -// Interface of the audio processor used by the audio track to collect -// statistics. -class AudioProcessorInterface : public rtc::RefCountInterface { - public: - struct AudioProcessorStats { - AudioProcessorStats() - : typing_noise_detected(false), - echo_return_loss(0), - echo_return_loss_enhancement(0), - echo_delay_median_ms(0), - echo_delay_std_ms(0), - aec_quality_min(0.0), - residual_echo_likelihood(0.0f), - residual_echo_likelihood_recent_max(0.0f), - aec_divergent_filter_fraction(0.0) {} - ~AudioProcessorStats() {} - - bool typing_noise_detected; - int echo_return_loss; - int echo_return_loss_enhancement; - int echo_delay_median_ms; - int echo_delay_std_ms; - float aec_quality_min; - float residual_echo_likelihood; - float residual_echo_likelihood_recent_max; - float aec_divergent_filter_fraction; - }; - - // Get audio processor statistics. - virtual void GetStats(AudioProcessorStats* stats) = 0; - - protected: - virtual ~AudioProcessorInterface() {} -}; - -class AudioTrackInterface : public MediaStreamTrackInterface { - public: - // TODO(xians): Figure out if the following interface should be const or not. - virtual AudioSourceInterface* GetSource() const = 0; - - // Add/Remove a sink that will receive the audio data from the track. - virtual void AddSink(AudioTrackSinkInterface* sink) = 0; - virtual void RemoveSink(AudioTrackSinkInterface* sink) = 0; - - // Get the signal level from the audio track. - // Return true on success, otherwise false. - // TODO(xians): Change the interface to int GetSignalLevel() and pure virtual - // after Chrome has the correct implementation of the interface. - virtual bool GetSignalLevel(int* level) { return false; } - - // Get the audio processor used by the audio track. Return NULL if the track - // does not have any processor. - // TODO(xians): Make the interface pure virtual. - virtual rtc::scoped_refptr - GetAudioProcessor() { return NULL; } - - protected: - virtual ~AudioTrackInterface() {} -}; - -typedef std::vector > - AudioTrackVector; -typedef std::vector > - VideoTrackVector; - -class MediaStreamInterface : public rtc::RefCountInterface, - public NotifierInterface { - public: - virtual std::string label() const = 0; - - virtual AudioTrackVector GetAudioTracks() = 0; - virtual VideoTrackVector GetVideoTracks() = 0; - virtual rtc::scoped_refptr - FindAudioTrack(const std::string& track_id) = 0; - virtual rtc::scoped_refptr - FindVideoTrack(const std::string& track_id) = 0; - - virtual bool AddTrack(AudioTrackInterface* track) = 0; - virtual bool AddTrack(VideoTrackInterface* track) = 0; - virtual bool RemoveTrack(AudioTrackInterface* track) = 0; - virtual bool RemoveTrack(VideoTrackInterface* track) = 0; - - protected: - virtual ~MediaStreamInterface() {} -}; - -} // namespace webrtc - -#endif // WEBRTC_API_MEDIASTREAMINTERFACE_H_ diff --git a/WebRtc.NET/include/webrtc/api/mediastreamproxy.h b/WebRtc.NET/include/webrtc/api/mediastreamproxy.h deleted file mode 100644 index 4253a093..00000000 --- a/WebRtc.NET/include/webrtc/api/mediastreamproxy.h +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright 2011 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_API_MEDIASTREAMPROXY_H_ -#define WEBRTC_API_MEDIASTREAMPROXY_H_ - -#include "webrtc/api/mediastreaminterface.h" -#include "webrtc/api/proxy.h" - -namespace webrtc { - -BEGIN_SIGNALING_PROXY_MAP(MediaStream) - PROXY_SIGNALING_THREAD_DESTRUCTOR() - PROXY_CONSTMETHOD0(std::string, label) - PROXY_METHOD0(AudioTrackVector, GetAudioTracks) - PROXY_METHOD0(VideoTrackVector, GetVideoTracks) - PROXY_METHOD1(rtc::scoped_refptr, - FindAudioTrack, - const std::string&) - PROXY_METHOD1(rtc::scoped_refptr, - FindVideoTrack, - const std::string&) - PROXY_METHOD1(bool, AddTrack, AudioTrackInterface*) - PROXY_METHOD1(bool, AddTrack, VideoTrackInterface*) - PROXY_METHOD1(bool, RemoveTrack, AudioTrackInterface*) - PROXY_METHOD1(bool, RemoveTrack, VideoTrackInterface*) - PROXY_METHOD1(void, RegisterObserver, ObserverInterface*) - PROXY_METHOD1(void, UnregisterObserver, ObserverInterface*) -END_PROXY_MAP() - -} // namespace webrtc - -#endif // WEBRTC_API_MEDIASTREAMPROXY_H_ diff --git a/WebRtc.NET/include/webrtc/api/mediastreamtrack.h b/WebRtc.NET/include/webrtc/api/mediastreamtrack.h deleted file mode 100644 index 9ba04201..00000000 --- a/WebRtc.NET/include/webrtc/api/mediastreamtrack.h +++ /dev/null @@ -1,62 +0,0 @@ -/* - * Copyright 2011 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_API_MEDIASTREAMTRACK_H_ -#define WEBRTC_API_MEDIASTREAMTRACK_H_ - -#include - -#include "webrtc/api/mediastreaminterface.h" -#include "webrtc/api/notifier.h" - -namespace webrtc { - -// MediaTrack implements the interface common to AudioTrackInterface and -// VideoTrackInterface. -template -class MediaStreamTrack : public Notifier { - public: - typedef typename T::TrackState TypedTrackState; - - std::string id() const override { return id_; } - MediaStreamTrackInterface::TrackState state() const override { - return state_; - } - bool enabled() const override { return enabled_; } - bool set_enabled(bool enable) override { - bool fire_on_change = (enable != enabled_); - enabled_ = enable; - if (fire_on_change) { - Notifier::FireOnChanged(); - } - return fire_on_change; - } - - protected: - explicit MediaStreamTrack(const std::string& id) - : enabled_(true), id_(id), state_(MediaStreamTrackInterface::kLive) {} - - bool set_state(MediaStreamTrackInterface::TrackState new_state) { - bool fire_on_change = (state_ != new_state); - state_ = new_state; - if (fire_on_change) - Notifier::FireOnChanged(); - return true; - } - - private: - bool enabled_; - std::string id_; - MediaStreamTrackInterface::TrackState state_; -}; - -} // namespace webrtc - -#endif // WEBRTC_API_MEDIASTREAMTRACK_H_ diff --git a/WebRtc.NET/include/webrtc/api/mediastreamtrackproxy.h b/WebRtc.NET/include/webrtc/api/mediastreamtrackproxy.h deleted file mode 100644 index da371f8c..00000000 --- a/WebRtc.NET/include/webrtc/api/mediastreamtrackproxy.h +++ /dev/null @@ -1,60 +0,0 @@ -/* - * Copyright 2011 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -// This file includes proxy classes for tracks. The purpose is -// to make sure tracks are only accessed from the signaling thread. - -#ifndef WEBRTC_API_MEDIASTREAMTRACKPROXY_H_ -#define WEBRTC_API_MEDIASTREAMTRACKPROXY_H_ - -#include "webrtc/api/mediastreaminterface.h" -#include "webrtc/api/proxy.h" - -namespace webrtc { - -BEGIN_SIGNALING_PROXY_MAP(AudioTrack) - PROXY_SIGNALING_THREAD_DESTRUCTOR() - PROXY_CONSTMETHOD0(std::string, kind) - PROXY_CONSTMETHOD0(std::string, id) - PROXY_CONSTMETHOD0(TrackState, state) - PROXY_CONSTMETHOD0(bool, enabled) - PROXY_CONSTMETHOD0(AudioSourceInterface*, GetSource) - PROXY_METHOD1(void, AddSink, AudioTrackSinkInterface*) - PROXY_METHOD1(void, RemoveSink, AudioTrackSinkInterface*) - PROXY_METHOD1(bool, GetSignalLevel, int*) - PROXY_METHOD0(rtc::scoped_refptr, GetAudioProcessor) - PROXY_METHOD1(bool, set_enabled, bool) - PROXY_METHOD1(void, RegisterObserver, ObserverInterface*) - PROXY_METHOD1(void, UnregisterObserver, ObserverInterface*) -END_PROXY_MAP() - -BEGIN_PROXY_MAP(VideoTrack) - PROXY_SIGNALING_THREAD_DESTRUCTOR() - PROXY_CONSTMETHOD0(std::string, kind) - PROXY_CONSTMETHOD0(std::string, id) - PROXY_CONSTMETHOD0(TrackState, state) - PROXY_CONSTMETHOD0(bool, enabled) - PROXY_METHOD1(bool, set_enabled, bool) - PROXY_CONSTMETHOD0(ContentHint, content_hint) - PROXY_METHOD1(void, set_content_hint, ContentHint) - PROXY_WORKER_METHOD2(void, - AddOrUpdateSink, - rtc::VideoSinkInterface*, - const rtc::VideoSinkWants&) - PROXY_WORKER_METHOD1(void, RemoveSink, rtc::VideoSinkInterface*) - PROXY_CONSTMETHOD0(VideoTrackSourceInterface*, GetSource) - - PROXY_METHOD1(void, RegisterObserver, ObserverInterface*) - PROXY_METHOD1(void, UnregisterObserver, ObserverInterface*) -END_PROXY_MAP() - -} // namespace webrtc - -#endif // WEBRTC_API_MEDIASTREAMTRACKPROXY_H_ diff --git a/WebRtc.NET/include/webrtc/api/ortcfactory.h b/WebRtc.NET/include/webrtc/api/ortcfactory.h deleted file mode 100644 index dc92774f..00000000 --- a/WebRtc.NET/include/webrtc/api/ortcfactory.h +++ /dev/null @@ -1,64 +0,0 @@ -/* - * Copyright 2017 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_API_ORTCFACTORY_H_ -#define WEBRTC_API_ORTCFACTORY_H_ - -#include - -#include "webrtc/api/ortcfactoryinterface.h" -#include "webrtc/base/constructormagic.h" - -namespace webrtc { - -// Implementation of OrtcFactoryInterface. -// -// See ortcfactoryinterface.h for documentation. -class OrtcFactory : public OrtcFactoryInterface { - public: - OrtcFactory(rtc::Thread* network_thread, - rtc::Thread* signaling_thread, - rtc::NetworkManager* network_manager, - rtc::PacketSocketFactory* socket_factory); - ~OrtcFactory() override; - std::unique_ptr - CreateUdpTransport(int family, uint16_t min_port, uint16_t max_port) override; - - rtc::Thread* network_thread() { return network_thread_; } - rtc::Thread* worker_thread() { return owned_worker_thread_.get(); } - rtc::Thread* signaling_thread() { return signaling_thread_; } - - private: - rtc::Thread* network_thread_; - rtc::Thread* signaling_thread_; - rtc::NetworkManager* network_manager_; - rtc::PacketSocketFactory* socket_factory_; - // If we created/own the objects above, these will be non-null and thus will - // be released automatically upon destruction. - std::unique_ptr owned_network_thread_; - std::unique_ptr owned_worker_thread_; - bool wraps_signaling_thread_ = false; - std::unique_ptr owned_network_manager_; - std::unique_ptr owned_socket_factory_; - RTC_DISALLOW_COPY_AND_ASSIGN(OrtcFactory); -}; - -BEGIN_OWNED_PROXY_MAP(OrtcFactory) - PROXY_SIGNALING_THREAD_DESTRUCTOR() - PROXY_METHOD3(std::unique_ptr, - CreateUdpTransport, - int, - uint16_t, - uint16_t) -END_PROXY_MAP() - -} // namespace webrtc - -#endif // WEBRTC_API_ORTCFACTORY_H_ diff --git a/WebRtc.NET/include/webrtc/api/ortcfactoryinterface.h b/WebRtc.NET/include/webrtc/api/ortcfactoryinterface.h deleted file mode 100644 index 8d46d686..00000000 --- a/WebRtc.NET/include/webrtc/api/ortcfactoryinterface.h +++ /dev/null @@ -1,81 +0,0 @@ -/* - * Copyright 2017 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_API_ORTCFACTORYINTERFACE_H_ -#define WEBRTC_API_ORTCFACTORYINTERFACE_H_ - -#include - -#include "webrtc/api/udptransportinterface.h" -#include "webrtc/base/network.h" -#include "webrtc/base/thread.h" -#include "webrtc/p2p/base/packetsocketfactory.h" - -namespace webrtc { - -// WARNING: This is experimental/under development, so use at your own risk; no -// guarantee about API stability is guaranteed here yet. -// -// This class is the ORTC analog of PeerConnectionFactory. It acts as a factory -// for ORTC objects that can be connected to each other. -// -// Some of these objects may not be represented by the ORTC specification, but -// follow the same general principles. -// -// On object lifetimes: The factory must not be destroyed before destroying the -// objects it created, and the objects passed into the factory must not be -// destroyed before destroying the factory. -class OrtcFactoryInterface { - public: - // |network_thread| is the thread on which packets are sent and received. - // If null, a new rtc::Thread with a default socket server is created. - // - // |signaling_thread| is used for callbacks to the consumer of the API. If - // null, the current thread will be used, which assumes that the API consumer - // is running a message loop on this thread (either using an existing - // rtc::Thread, or by calling rtc::Thread::Current()->ProcessMessages). - // - // |network_manager| is used to determine which network interfaces are - // available. This is used for ICE, for example. If null, a default - // implementation will be used. Only accessed on |network_thread|. - // - // |socket_factory| is used (on the network thread) for creating sockets. If - // it's null, a default implementation will be used, which assumes - // |network_thread| is a normal rtc::Thread. - // - // Note that the OrtcFactoryInterface does not take ownership of any of the - // objects - // passed in, and as previously stated, these objects can't be destroyed - // before the factory is. - static std::unique_ptr Create( - rtc::Thread* network_thread, - rtc::Thread* signaling_thread, - rtc::NetworkManager* network_manager, - rtc::PacketSocketFactory* socket_factory); - // Constructor for convenience which uses default implementations of - // everything (though does still require that the current thread runs a - // message loop; see above). - static std::unique_ptr Create() { - return Create(nullptr, nullptr, nullptr, nullptr); - } - - virtual ~OrtcFactoryInterface() {} - - virtual std::unique_ptr - CreateUdpTransport(int family, uint16_t min_port, uint16_t max_port) = 0; - // Method for convenience that has no port range restrictions. - std::unique_ptr CreateUdpTransport(int family) { - return CreateUdpTransport(family, 0, 0); - } -}; - -} // namespace webrtc - -#endif // WEBRTC_API_ORTCFACTORYINTERFACE_H_ diff --git a/WebRtc.NET/include/webrtc/api/peerconnection.h b/WebRtc.NET/include/webrtc/api/peerconnection.h deleted file mode 100644 index 82dc8edf..00000000 --- a/WebRtc.NET/include/webrtc/api/peerconnection.h +++ /dev/null @@ -1,455 +0,0 @@ -/* - * Copyright 2012 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_API_PEERCONNECTION_H_ -#define WEBRTC_API_PEERCONNECTION_H_ - -#include -#include -#include -#include - -#include "webrtc/api/peerconnectionfactory.h" -#include "webrtc/api/peerconnectioninterface.h" -#include "webrtc/api/rtcstatscollector.h" -#include "webrtc/api/rtpreceiver.h" -#include "webrtc/api/rtpsender.h" -#include "webrtc/api/statscollector.h" -#include "webrtc/api/streamcollection.h" -#include "webrtc/api/webrtcsession.h" - -namespace webrtc { - -class MediaStreamObserver; -class VideoRtpReceiver; -class RtcEventLog; - -// Populates |session_options| from |rtc_options|, and returns true if options -// are valid. -// |session_options|->transport_options map entries must exist in order for -// them to be populated from |rtc_options|. -bool ExtractMediaSessionOptions( - const PeerConnectionInterface::RTCOfferAnswerOptions& rtc_options, - bool is_offer, - cricket::MediaSessionOptions* session_options); - -// Populates |session_options| from |constraints|, and returns true if all -// mandatory constraints are satisfied. -// Assumes that |session_options|->transport_options map entries exist. -// Will also set defaults if corresponding constraints are not present: -// recv_audio=true, recv_video=true, bundle_enabled=true. -// Other fields will be left with existing values. -// -// Deprecated. Will be removed once callers that use constraints are gone. -// TODO(hta): Remove when callers are gone. -// https://bugs.chromium.org/p/webrtc/issues/detail?id=5617 -bool ParseConstraintsForAnswer(const MediaConstraintsInterface* constraints, - cricket::MediaSessionOptions* session_options); - -// Parses the URLs for each server in |servers| to build |stun_servers| and -// |turn_servers|. Can return SYNTAX_ERROR if the URL is malformed, or -// INVALID_PARAMETER if a TURN server is missing |username| or |password|. -RTCErrorType ParseIceServers( - const PeerConnectionInterface::IceServers& servers, - cricket::ServerAddresses* stun_servers, - std::vector* turn_servers); - -// PeerConnection implements the PeerConnectionInterface interface. -// It uses WebRtcSession to implement the PeerConnection functionality. -class PeerConnection : public PeerConnectionInterface, - public IceObserver, - public rtc::MessageHandler, - public sigslot::has_slots<> { - public: - explicit PeerConnection(PeerConnectionFactory* factory); - - bool Initialize( - const PeerConnectionInterface::RTCConfiguration& configuration, - std::unique_ptr allocator, - std::unique_ptr cert_generator, - PeerConnectionObserver* observer); - - rtc::scoped_refptr local_streams() override; - rtc::scoped_refptr remote_streams() override; - bool AddStream(MediaStreamInterface* local_stream) override; - void RemoveStream(MediaStreamInterface* local_stream) override; - - rtc::scoped_refptr AddTrack( - MediaStreamTrackInterface* track, - std::vector streams) override; - bool RemoveTrack(RtpSenderInterface* sender) override; - - virtual WebRtcSession* session() { return session_.get(); } - - rtc::scoped_refptr CreateDtmfSender( - AudioTrackInterface* track) override; - - rtc::scoped_refptr CreateSender( - const std::string& kind, - const std::string& stream_id) override; - - std::vector> GetSenders() - const override; - std::vector> GetReceivers() - const override; - - rtc::scoped_refptr CreateDataChannel( - const std::string& label, - const DataChannelInit* config) override; - bool GetStats(StatsObserver* observer, - webrtc::MediaStreamTrackInterface* track, - StatsOutputLevel level) override; - void GetStats(RTCStatsCollectorCallback* callback) override; - - SignalingState signaling_state() override; - - IceConnectionState ice_connection_state() override; - IceGatheringState ice_gathering_state() override; - - const SessionDescriptionInterface* local_description() const override; - const SessionDescriptionInterface* remote_description() const override; - const SessionDescriptionInterface* current_local_description() const override; - const SessionDescriptionInterface* current_remote_description() - const override; - const SessionDescriptionInterface* pending_local_description() const override; - const SessionDescriptionInterface* pending_remote_description() - const override; - - // JSEP01 - // Deprecated, use version without constraints. - void CreateOffer(CreateSessionDescriptionObserver* observer, - const MediaConstraintsInterface* constraints) override; - void CreateOffer(CreateSessionDescriptionObserver* observer, - const RTCOfferAnswerOptions& options) override; - // Deprecated, use version without constraints. - void CreateAnswer(CreateSessionDescriptionObserver* observer, - const MediaConstraintsInterface* constraints) override; - void CreateAnswer(CreateSessionDescriptionObserver* observer, - const RTCOfferAnswerOptions& options) override; - void SetLocalDescription(SetSessionDescriptionObserver* observer, - SessionDescriptionInterface* desc) override; - void SetRemoteDescription(SetSessionDescriptionObserver* observer, - SessionDescriptionInterface* desc) override; - PeerConnectionInterface::RTCConfiguration GetConfiguration() override; - bool SetConfiguration( - const PeerConnectionInterface::RTCConfiguration& configuration, - RTCError* error) override; - bool SetConfiguration( - const PeerConnectionInterface::RTCConfiguration& configuration) override { - return SetConfiguration(configuration, nullptr); - } - bool AddIceCandidate(const IceCandidateInterface* candidate) override; - bool RemoveIceCandidates( - const std::vector& candidates) override; - - void RegisterUMAObserver(UMAObserver* observer) override; - - bool StartRtcEventLog(rtc::PlatformFile file, - int64_t max_size_bytes) override; - void StopRtcEventLog() override; - - void Close() override; - - sigslot::signal1 SignalDataChannelCreated; - - // Virtual for unit tests. - virtual const std::vector>& - sctp_data_channels() const { - return sctp_data_channels_; - } - - protected: - ~PeerConnection() override; - - private: - struct TrackInfo { - TrackInfo() : ssrc(0) {} - TrackInfo(const std::string& stream_label, - const std::string track_id, - uint32_t ssrc) - : stream_label(stream_label), track_id(track_id), ssrc(ssrc) {} - bool operator==(const TrackInfo& other) { - return this->stream_label == other.stream_label && - this->track_id == other.track_id && this->ssrc == other.ssrc; - } - std::string stream_label; - std::string track_id; - uint32_t ssrc; - }; - typedef std::vector TrackInfos; - - // Implements MessageHandler. - void OnMessage(rtc::Message* msg) override; - - void CreateAudioReceiver(MediaStreamInterface* stream, - const std::string& track_id, - uint32_t ssrc); - - void CreateVideoReceiver(MediaStreamInterface* stream, - const std::string& track_id, - uint32_t ssrc); - void DestroyReceiver(const std::string& track_id); - void DestroyAudioSender(MediaStreamInterface* stream, - AudioTrackInterface* audio_track, - uint32_t ssrc); - void DestroyVideoSender(MediaStreamInterface* stream, - VideoTrackInterface* video_track); - - // Implements IceObserver - void OnIceConnectionChange(IceConnectionState new_state) override; - void OnIceGatheringChange(IceGatheringState new_state) override; - void OnIceCandidate(const IceCandidateInterface* candidate) override; - void OnIceCandidatesRemoved( - const std::vector& candidates) override; - void OnIceConnectionReceivingChange(bool receiving) override; - - // Signals from WebRtcSession. - void OnSessionStateChange(WebRtcSession* session, WebRtcSession::State state); - void ChangeSignalingState(SignalingState signaling_state); - - // Signals from MediaStreamObserver. - void OnAudioTrackAdded(AudioTrackInterface* track, - MediaStreamInterface* stream); - void OnAudioTrackRemoved(AudioTrackInterface* track, - MediaStreamInterface* stream); - void OnVideoTrackAdded(VideoTrackInterface* track, - MediaStreamInterface* stream); - void OnVideoTrackRemoved(VideoTrackInterface* track, - MediaStreamInterface* stream); - - rtc::Thread* signaling_thread() const { - return factory_->signaling_thread(); - } - - rtc::Thread* network_thread() const { return factory_->network_thread(); } - - void PostSetSessionDescriptionFailure(SetSessionDescriptionObserver* observer, - const std::string& error); - void PostCreateSessionDescriptionFailure( - CreateSessionDescriptionObserver* observer, - const std::string& error); - - bool IsClosed() const { - return signaling_state_ == PeerConnectionInterface::kClosed; - } - - // Returns a MediaSessionOptions struct with options decided by |options|, - // the local MediaStreams and DataChannels. - virtual bool GetOptionsForOffer( - const PeerConnectionInterface::RTCOfferAnswerOptions& rtc_options, - cricket::MediaSessionOptions* session_options); - - // Returns a MediaSessionOptions struct with options decided by - // |constraints|, the local MediaStreams and DataChannels. - // Deprecated, use version without constraints. - virtual bool GetOptionsForAnswer( - const MediaConstraintsInterface* constraints, - cricket::MediaSessionOptions* session_options); - virtual bool GetOptionsForAnswer( - const RTCOfferAnswerOptions& options, - cricket::MediaSessionOptions* session_options); - - void InitializeOptionsForAnswer( - cricket::MediaSessionOptions* session_options); - - // Helper function for options processing. - // Deprecated. - virtual void FinishOptionsForAnswer( - cricket::MediaSessionOptions* session_options); - - // Remove all local and remote tracks of type |media_type|. - // Called when a media type is rejected (m-line set to port 0). - void RemoveTracks(cricket::MediaType media_type); - - // Makes sure a MediaStreamTrack is created for each StreamParam in |streams|, - // and existing MediaStreamTracks are removed if there is no corresponding - // StreamParam. If |default_track_needed| is true, a default MediaStreamTrack - // is created if it doesn't exist; if false, it's removed if it exists. - // |media_type| is the type of the |streams| and can be either audio or video. - // If a new MediaStream is created it is added to |new_streams|. - void UpdateRemoteStreamsList( - const std::vector& streams, - bool default_track_needed, - cricket::MediaType media_type, - StreamCollection* new_streams); - - // Triggered when a remote track has been seen for the first time in a remote - // session description. It creates a remote MediaStreamTrackInterface - // implementation and triggers CreateAudioReceiver or CreateVideoReceiver. - void OnRemoteTrackSeen(const std::string& stream_label, - const std::string& track_id, - uint32_t ssrc, - cricket::MediaType media_type); - - // Triggered when a remote track has been removed from a remote session - // description. It removes the remote track with id |track_id| from a remote - // MediaStream and triggers DestroyAudioReceiver or DestroyVideoReceiver. - void OnRemoteTrackRemoved(const std::string& stream_label, - const std::string& track_id, - cricket::MediaType media_type); - - // Finds remote MediaStreams without any tracks and removes them from - // |remote_streams_| and notifies the observer that the MediaStreams no longer - // exist. - void UpdateEndedRemoteMediaStreams(); - - // Loops through the vector of |streams| and finds added and removed - // StreamParams since last time this method was called. - // For each new or removed StreamParam, OnLocalTrackSeen or - // OnLocalTrackRemoved is invoked. - void UpdateLocalTracks(const std::vector& streams, - cricket::MediaType media_type); - - // Triggered when a local track has been seen for the first time in a local - // session description. - // This method triggers CreateAudioSender or CreateVideoSender if the rtp - // streams in the local SessionDescription can be mapped to a MediaStreamTrack - // in a MediaStream in |local_streams_| - void OnLocalTrackSeen(const std::string& stream_label, - const std::string& track_id, - uint32_t ssrc, - cricket::MediaType media_type); - - // Triggered when a local track has been removed from a local session - // description. - // This method triggers DestroyAudioSender or DestroyVideoSender if a stream - // has been removed from the local SessionDescription and the stream can be - // mapped to a MediaStreamTrack in a MediaStream in |local_streams_|. - void OnLocalTrackRemoved(const std::string& stream_label, - const std::string& track_id, - uint32_t ssrc, - cricket::MediaType media_type); - - void UpdateLocalRtpDataChannels(const cricket::StreamParamsVec& streams); - void UpdateRemoteRtpDataChannels(const cricket::StreamParamsVec& streams); - void UpdateClosingRtpDataChannels( - const std::vector& active_channels, - bool is_local_update); - void CreateRemoteRtpDataChannel(const std::string& label, - uint32_t remote_ssrc); - - // Creates channel and adds it to the collection of DataChannels that will - // be offered in a SessionDescription. - rtc::scoped_refptr InternalCreateDataChannel( - const std::string& label, - const InternalDataChannelInit* config); - - // Checks if any data channel has been added. - bool HasDataChannels() const; - - void AllocateSctpSids(rtc::SSLRole role); - void OnSctpDataChannelClosed(DataChannel* channel); - - // Notifications from WebRtcSession relating to BaseChannels. - void OnVoiceChannelCreated(); - void OnVoiceChannelDestroyed(); - void OnVideoChannelCreated(); - void OnVideoChannelDestroyed(); - void OnDataChannelCreated(); - void OnDataChannelDestroyed(); - // Called when the cricket::DataChannel receives a message indicating that a - // webrtc::DataChannel should be opened. - void OnDataChannelOpenMessage(const std::string& label, - const InternalDataChannelInit& config); - - RtpSenderInternal* FindSenderById(const std::string& id); - - std::vector>>::iterator - FindSenderForTrack(MediaStreamTrackInterface* track); - std::vector>>::iterator - FindReceiverForTrack(const std::string& track_id); - - TrackInfos* GetRemoteTracks(cricket::MediaType media_type); - TrackInfos* GetLocalTracks(cricket::MediaType media_type); - const TrackInfo* FindTrackInfo(const TrackInfos& infos, - const std::string& stream_label, - const std::string track_id) const; - - // Returns the specified SCTP DataChannel in sctp_data_channels_, - // or nullptr if not found. - DataChannel* FindDataChannelBySid(int sid) const; - - // Called when first configuring the port allocator. - bool InitializePortAllocator_n(const RTCConfiguration& configuration); - // Called when SetConfiguration is called to apply the supported subset - // of the configuration on the network thread. - bool ReconfigurePortAllocator_n( - const cricket::ServerAddresses& stun_servers, - const std::vector& turn_servers, - IceTransportsType type, - int candidate_pool_size, - bool prune_turn_ports); - - // Starts recording an Rtc EventLog using the supplied platform file. - // This function should only be called from the worker thread. - bool StartRtcEventLog_w(rtc::PlatformFile file, int64_t max_size_bytes); - // Starts recording an Rtc EventLog using the supplied platform file. - // This function should only be called from the worker thread. - void StopRtcEventLog_w(); - - // Storing the factory as a scoped reference pointer ensures that the memory - // in the PeerConnectionFactoryImpl remains available as long as the - // PeerConnection is running. It is passed to PeerConnection as a raw pointer. - // However, since the reference counting is done in the - // PeerConnectionFactoryInterface all instances created using the raw pointer - // will refer to the same reference count. - rtc::scoped_refptr factory_; - PeerConnectionObserver* observer_; - UMAObserver* uma_observer_; - SignalingState signaling_state_; - IceConnectionState ice_connection_state_; - IceGatheringState ice_gathering_state_; - PeerConnectionInterface::RTCConfiguration configuration_; - - std::unique_ptr port_allocator_; - // The EventLog needs to outlive the media controller. - std::unique_ptr event_log_; - std::unique_ptr media_controller_; - - // One PeerConnection has only one RTCP CNAME. - // https://tools.ietf.org/html/draft-ietf-rtcweb-rtp-usage-26#section-4.9 - std::string rtcp_cname_; - - // Streams added via AddStream. - rtc::scoped_refptr local_streams_; - // Streams created as a result of SetRemoteDescription. - rtc::scoped_refptr remote_streams_; - - std::vector> stream_observers_; - - // These lists store track info seen in local/remote descriptions. - TrackInfos remote_audio_tracks_; - TrackInfos remote_video_tracks_; - TrackInfos local_audio_tracks_; - TrackInfos local_video_tracks_; - - SctpSidAllocator sid_allocator_; - // label -> DataChannel - std::map> rtp_data_channels_; - std::vector> sctp_data_channels_; - std::vector> sctp_data_channels_to_free_; - - bool remote_peer_supports_msid_ = false; - - std::vector>> - senders_; - std::vector< - rtc::scoped_refptr>> - receivers_; - std::unique_ptr session_; - std::unique_ptr stats_; - rtc::scoped_refptr stats_collector_; -}; - -} // namespace webrtc - -#endif // WEBRTC_API_PEERCONNECTION_H_ diff --git a/WebRtc.NET/include/webrtc/api/peerconnectionfactory.h b/WebRtc.NET/include/webrtc/api/peerconnectionfactory.h deleted file mode 100644 index 4b412bac..00000000 --- a/WebRtc.NET/include/webrtc/api/peerconnectionfactory.h +++ /dev/null @@ -1,146 +0,0 @@ -/* - * Copyright 2011 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_API_PEERCONNECTIONFACTORY_H_ -#define WEBRTC_API_PEERCONNECTIONFACTORY_H_ - -#include -#include - -#include "webrtc/api/mediacontroller.h" -#include "webrtc/api/mediastreaminterface.h" -#include "webrtc/api/peerconnectioninterface.h" -#include "webrtc/base/scoped_ref_ptr.h" -#include "webrtc/base/thread.h" -#include "webrtc/base/rtccertificategenerator.h" -#include "webrtc/pc/channelmanager.h" - -namespace rtc { -class BasicNetworkManager; -class BasicPacketSocketFactory; -} - -namespace webrtc { - -class RtcEventLog; - -class PeerConnectionFactory : public PeerConnectionFactoryInterface { - public: - void SetOptions(const Options& options) override; - - // Deprecated, use version without constraints. - rtc::scoped_refptr CreatePeerConnection( - const PeerConnectionInterface::RTCConfiguration& configuration, - const MediaConstraintsInterface* constraints, - std::unique_ptr allocator, - std::unique_ptr cert_generator, - PeerConnectionObserver* observer) override; - - virtual rtc::scoped_refptr CreatePeerConnection( - const PeerConnectionInterface::RTCConfiguration& configuration, - std::unique_ptr allocator, - std::unique_ptr cert_generator, - PeerConnectionObserver* observer) override; - - bool Initialize(); - - rtc::scoped_refptr - CreateLocalMediaStream(const std::string& label) override; - - virtual rtc::scoped_refptr CreateAudioSource( - const cricket::AudioOptions& options) override; - // Deprecated, use version without constraints. - rtc::scoped_refptr CreateAudioSource( - const MediaConstraintsInterface* constraints) override; - - virtual rtc::scoped_refptr CreateVideoSource( - cricket::VideoCapturer* capturer) override; - // This version supports filtering on width, height and frame rate. - // For the "constraints=null" case, use the version without constraints. - // TODO(hta): Design a version without MediaConstraintsInterface. - // https://bugs.chromium.org/p/webrtc/issues/detail?id=5617 - rtc::scoped_refptr CreateVideoSource( - cricket::VideoCapturer* capturer, - const MediaConstraintsInterface* constraints) override; - - rtc::scoped_refptr CreateVideoTrack( - const std::string& id, - VideoTrackSourceInterface* video_source) override; - - rtc::scoped_refptr - CreateAudioTrack(const std::string& id, - AudioSourceInterface* audio_source) override; - - bool StartAecDump(rtc::PlatformFile file, int64_t max_size_bytes) override; - void StopAecDump() override; - // TODO(ivoc) Remove after Chrome is updated. - bool StartRtcEventLog(rtc::PlatformFile file) override { return false; } - // TODO(ivoc) Remove after Chrome is updated. - bool StartRtcEventLog(rtc::PlatformFile file, - int64_t max_size_bytes) override { - return false; - } - // TODO(ivoc) Remove after Chrome is updated. - void StopRtcEventLog() override {} - - virtual webrtc::MediaControllerInterface* CreateMediaController( - const cricket::MediaConfig& config, - RtcEventLog* event_log) const; - virtual cricket::TransportController* CreateTransportController( - cricket::PortAllocator* port_allocator, - bool redetermine_role_on_ice_restart); - virtual rtc::Thread* signaling_thread(); - virtual rtc::Thread* worker_thread(); - virtual rtc::Thread* network_thread(); - const Options& options() const { return options_; } - - protected: - PeerConnectionFactory(); - PeerConnectionFactory( - rtc::Thread* network_thread, - rtc::Thread* worker_thread, - rtc::Thread* signaling_thread, - AudioDeviceModule* default_adm, - const rtc::scoped_refptr& - audio_decoder_factory, - cricket::WebRtcVideoEncoderFactory* video_encoder_factory, - cricket::WebRtcVideoDecoderFactory* video_decoder_factory, - rtc::scoped_refptr audio_mixer); - virtual ~PeerConnectionFactory(); - - private: - cricket::MediaEngineInterface* CreateMediaEngine_w(); - - bool owns_ptrs_; - bool wraps_current_thread_; - rtc::Thread* network_thread_; - rtc::Thread* worker_thread_; - rtc::Thread* signaling_thread_; - Options options_; - // External Audio device used for audio playback. - rtc::scoped_refptr default_adm_; - rtc::scoped_refptr audio_decoder_factory_; - std::unique_ptr channel_manager_; - // External Video encoder factory. This can be NULL if the client has not - // injected any. In that case, video engine will use the internal SW encoder. - std::unique_ptr video_encoder_factory_; - // External Video decoder factory. This can be NULL if the client has not - // injected any. In that case, video engine will use the internal SW decoder. - std::unique_ptr video_decoder_factory_; - std::unique_ptr default_network_manager_; - std::unique_ptr default_socket_factory_; - // External audio mixer. This can be NULL. In that case, internal audio mixer - // will be created and used. - rtc::scoped_refptr external_audio_mixer_; -}; - -} // namespace webrtc - -#endif // WEBRTC_API_PEERCONNECTIONFACTORY_H_ diff --git a/WebRtc.NET/include/webrtc/api/peerconnectionfactoryproxy.h b/WebRtc.NET/include/webrtc/api/peerconnectionfactoryproxy.h deleted file mode 100644 index d41aad25..00000000 --- a/WebRtc.NET/include/webrtc/api/peerconnectionfactoryproxy.h +++ /dev/null @@ -1,71 +0,0 @@ -/* - * Copyright 2014 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_API_PEERCONNECTIONFACTORYPROXY_H_ -#define WEBRTC_API_PEERCONNECTIONFACTORYPROXY_H_ - -#include -#include -#include - -#include "webrtc/api/peerconnectioninterface.h" -#include "webrtc/api/proxy.h" -#include "webrtc/base/bind.h" - -namespace webrtc { - -BEGIN_SIGNALING_PROXY_MAP(PeerConnectionFactory) - PROXY_SIGNALING_THREAD_DESTRUCTOR() - PROXY_METHOD1(void, SetOptions, const Options&) - PROXY_METHOD5(rtc::scoped_refptr, - CreatePeerConnection, - const PeerConnectionInterface::RTCConfiguration&, - const MediaConstraintsInterface*, - std::unique_ptr, - std::unique_ptr, - PeerConnectionObserver*); - PROXY_METHOD4(rtc::scoped_refptr, - CreatePeerConnection, - const PeerConnectionInterface::RTCConfiguration&, - std::unique_ptr, - std::unique_ptr, - PeerConnectionObserver*); - PROXY_METHOD1(rtc::scoped_refptr, - CreateLocalMediaStream, const std::string&) - PROXY_METHOD1(rtc::scoped_refptr, - CreateAudioSource, const MediaConstraintsInterface*) - PROXY_METHOD1(rtc::scoped_refptr, - CreateAudioSource, - const cricket::AudioOptions&) - PROXY_METHOD2(rtc::scoped_refptr, - CreateVideoSource, - cricket::VideoCapturer*, - const MediaConstraintsInterface*) - PROXY_METHOD1(rtc::scoped_refptr, - CreateVideoSource, - cricket::VideoCapturer*) - PROXY_METHOD2(rtc::scoped_refptr, - CreateVideoTrack, - const std::string&, - VideoTrackSourceInterface*) - PROXY_METHOD2(rtc::scoped_refptr, - CreateAudioTrack, const std::string&, AudioSourceInterface*) - PROXY_METHOD2(bool, StartAecDump, rtc::PlatformFile, int64_t) - PROXY_METHOD0(void, StopAecDump) - // TODO(ivoc): Remove the StartRtcEventLog and StopRtcEventLog functions as - // soon as they are removed from PeerConnectionFactoryInterface. - PROXY_METHOD1(bool, StartRtcEventLog, rtc::PlatformFile) - PROXY_METHOD2(bool, StartRtcEventLog, rtc::PlatformFile, int64_t) - PROXY_METHOD0(void, StopRtcEventLog) -END_PROXY_MAP() - -} // namespace webrtc - -#endif // WEBRTC_API_PEERCONNECTIONFACTORYPROXY_H_ diff --git a/WebRtc.NET/include/webrtc/api/peerconnectioninterface.h b/WebRtc.NET/include/webrtc/api/peerconnectioninterface.h deleted file mode 100644 index e622e525..00000000 --- a/WebRtc.NET/include/webrtc/api/peerconnectioninterface.h +++ /dev/null @@ -1,891 +0,0 @@ -/* - * Copyright 2012 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -// This file contains the PeerConnection interface as defined in -// http://dev.w3.org/2011/webrtc/editor/webrtc.html#peer-to-peer-connections. -// Applications must use this interface to implement peerconnection. -// PeerConnectionFactory class provides factory methods to create -// peerconnection, mediastream and media tracks objects. -// -// The Following steps are needed to setup a typical call using Jsep. -// 1. Create a PeerConnectionFactoryInterface. Check constructors for more -// information about input parameters. -// 2. Create a PeerConnection object. Provide a configuration string which -// points either to stun or turn server to generate ICE candidates and provide -// an object that implements the PeerConnectionObserver interface. -// 3. Create local MediaStream and MediaTracks using the PeerConnectionFactory -// and add it to PeerConnection by calling AddStream. -// 4. Create an offer and serialize it and send it to the remote peer. -// 5. Once an ice candidate have been found PeerConnection will call the -// observer function OnIceCandidate. The candidates must also be serialized and -// sent to the remote peer. -// 6. Once an answer is received from the remote peer, call -// SetLocalSessionDescription with the offer and SetRemoteSessionDescription -// with the remote answer. -// 7. Once a remote candidate is received from the remote peer, provide it to -// the peerconnection by calling AddIceCandidate. - - -// The Receiver of a call can decide to accept or reject the call. -// This decision will be taken by the application not peerconnection. -// If application decides to accept the call -// 1. Create PeerConnectionFactoryInterface if it doesn't exist. -// 2. Create a new PeerConnection. -// 3. Provide the remote offer to the new PeerConnection object by calling -// SetRemoteSessionDescription. -// 4. Generate an answer to the remote offer by calling CreateAnswer and send it -// back to the remote peer. -// 5. Provide the local answer to the new PeerConnection by calling -// SetLocalSessionDescription with the answer. -// 6. Provide the remote ice candidates by calling AddIceCandidate. -// 7. Once a candidate have been found PeerConnection will call the observer -// function OnIceCandidate. Send these candidates to the remote peer. - -#ifndef WEBRTC_API_PEERCONNECTIONINTERFACE_H_ -#define WEBRTC_API_PEERCONNECTIONINTERFACE_H_ - -#include -#include -#include -#include -#include - -#include "webrtc/api/datachannelinterface.h" -#include "webrtc/api/dtmfsenderinterface.h" -#include "webrtc/api/jsep.h" -#include "webrtc/api/mediastreaminterface.h" -#include "webrtc/api/rtcstatscollector.h" -#include "webrtc/api/rtpreceiverinterface.h" -#include "webrtc/api/rtpsenderinterface.h" -#include "webrtc/api/statstypes.h" -#include "webrtc/api/umametrics.h" -#include "webrtc/base/fileutils.h" -#include "webrtc/base/network.h" -#include "webrtc/base/rtccertificate.h" -#include "webrtc/base/rtccertificategenerator.h" -#include "webrtc/base/socketaddress.h" -#include "webrtc/base/sslstreamadapter.h" -#include "webrtc/media/base/mediachannel.h" -#include "webrtc/p2p/base/portallocator.h" - -namespace rtc { -class SSLIdentity; -class Thread; -} - -namespace cricket { -class WebRtcVideoDecoderFactory; -class WebRtcVideoEncoderFactory; -} - -namespace webrtc { -class AudioDeviceModule; -class AudioMixer; -class MediaConstraintsInterface; - -// MediaStream container interface. -class StreamCollectionInterface : public rtc::RefCountInterface { - public: - // TODO(ronghuawu): Update the function names to c++ style, e.g. find -> Find. - virtual size_t count() = 0; - virtual MediaStreamInterface* at(size_t index) = 0; - virtual MediaStreamInterface* find(const std::string& label) = 0; - virtual MediaStreamTrackInterface* FindAudioTrack( - const std::string& id) = 0; - virtual MediaStreamTrackInterface* FindVideoTrack( - const std::string& id) = 0; - - protected: - // Dtor protected as objects shouldn't be deleted via this interface. - ~StreamCollectionInterface() {} -}; - -class StatsObserver : public rtc::RefCountInterface { - public: - virtual void OnComplete(const StatsReports& reports) = 0; - - protected: - virtual ~StatsObserver() {} -}; - -// Enumeration to represent distinct classes of errors that an application -// may wish to act upon differently. These roughly map to DOMExceptions or -// RTCError "errorDetailEnum" values in the web API, as described in the -// comments below. -enum class RTCErrorType { - // No error. - NONE, - // A supplied parameter is valid, but currently unsupported. - // Maps to InvalidAccessError DOMException. - UNSUPPORTED_PARAMETER, - // General error indicating that a supplied parameter is invalid. - // Maps to InvalidAccessError or TypeError DOMException depending on context. - INVALID_PARAMETER, - // Slightly more specific than INVALID_PARAMETER; a parameter's value was - // outside the allowed range. - // Maps to RangeError DOMException. - INVALID_RANGE, - // Slightly more specific than INVALID_PARAMETER; an error occurred while - // parsing string input. - // Maps to SyntaxError DOMException. - SYNTAX_ERROR, - // The object does not support this operation in its current state. - // Maps to InvalidStateError DOMException. - INVALID_STATE, - // An attempt was made to modify the object in an invalid way. - // Maps to InvalidModificationError DOMException. - INVALID_MODIFICATION, - // An error occurred within an underlying network protocol. - // Maps to NetworkError DOMException. - NETWORK_ERROR, - // The operation failed due to an internal error. - // Maps to OperationError DOMException. - INTERNAL_ERROR, -}; - -// Roughly corresponds to RTCError in the web api. Holds an error type and -// possibly additional information specific to that error. -// -// Doesn't contain anything beyond a type now, but will in the future as more -// errors are implemented. -class RTCError { - public: - RTCError() : type_(RTCErrorType::NONE) {} - explicit RTCError(RTCErrorType type) : type_(type) {} - - RTCErrorType type() const { return type_; } - void set_type(RTCErrorType type) { type_ = type; } - - private: - RTCErrorType type_; -}; - -// Outputs the error as a friendly string. -// Update this method when adding a new error type. -std::ostream& operator<<(std::ostream& stream, RTCErrorType error); - -class PeerConnectionInterface : public rtc::RefCountInterface { - public: - // See http://dev.w3.org/2011/webrtc/editor/webrtc.html#state-definitions . - enum SignalingState { - kStable, - kHaveLocalOffer, - kHaveLocalPrAnswer, - kHaveRemoteOffer, - kHaveRemotePrAnswer, - kClosed, - }; - - enum IceGatheringState { - kIceGatheringNew, - kIceGatheringGathering, - kIceGatheringComplete - }; - - enum IceConnectionState { - kIceConnectionNew, - kIceConnectionChecking, - kIceConnectionConnected, - kIceConnectionCompleted, - kIceConnectionFailed, - kIceConnectionDisconnected, - kIceConnectionClosed, - kIceConnectionMax, - }; - - // TLS certificate policy. - enum TlsCertPolicy { - // For TLS based protocols, ensure the connection is secure by not - // circumventing certificate validation. - kTlsCertPolicySecure, - // For TLS based protocols, disregard security completely by skipping - // certificate validation. This is insecure and should never be used unless - // security is irrelevant in that particular context. - kTlsCertPolicyInsecureNoCheck, - }; - - struct IceServer { - // TODO(jbauch): Remove uri when all code using it has switched to urls. - std::string uri; - std::vector urls; - std::string username; - std::string password; - TlsCertPolicy tls_cert_policy = kTlsCertPolicySecure; - - bool operator==(const IceServer& o) const { - return uri == o.uri && urls == o.urls && username == o.username && - password == o.password && tls_cert_policy == o.tls_cert_policy; - } - bool operator!=(const IceServer& o) const { return !(*this == o); } - }; - typedef std::vector IceServers; - - enum IceTransportsType { - // TODO(pthatcher): Rename these kTransporTypeXXX, but update - // Chromium at the same time. - kNone, - kRelay, - kNoHost, - kAll - }; - - // https://tools.ietf.org/html/draft-ietf-rtcweb-jsep-08#section-4.1.1 - enum BundlePolicy { - kBundlePolicyBalanced, - kBundlePolicyMaxBundle, - kBundlePolicyMaxCompat - }; - - // https://tools.ietf.org/html/draft-ietf-rtcweb-jsep-09#section-4.1.1 - enum RtcpMuxPolicy { - kRtcpMuxPolicyNegotiate, - kRtcpMuxPolicyRequire, - }; - - enum TcpCandidatePolicy { - kTcpCandidatePolicyEnabled, - kTcpCandidatePolicyDisabled - }; - - enum CandidateNetworkPolicy { - kCandidateNetworkPolicyAll, - kCandidateNetworkPolicyLowCost - }; - - enum ContinualGatheringPolicy { - GATHER_ONCE, - GATHER_CONTINUALLY - }; - - enum class RTCConfigurationType { - // A configuration that is safer to use, despite not having the best - // performance. Currently this is the default configuration. - kSafe, - // An aggressive configuration that has better performance, although it - // may be riskier and may need extra support in the application. - kAggressive - }; - - // TODO(hbos): Change into class with private data and public getters. - // TODO(nisse): In particular, accessing fields directly from an - // application is brittle, since the organization mirrors the - // organization of the implementation, which isn't stable. So we - // need getters and setters at least for fields which applications - // are interested in. - struct RTCConfiguration { - // This struct is subject to reorganization, both for naming - // consistency, and to group settings to match where they are used - // in the implementation. To do that, we need getter and setter - // methods for all settings which are of interest to applications, - // Chrome in particular. - - RTCConfiguration() = default; - RTCConfiguration(RTCConfigurationType type) { - if (type == RTCConfigurationType::kAggressive) { - // These parameters are also defined in Java and IOS configurations, - // so their values may be overwritten by the Java or IOS configuration. - bundle_policy = kBundlePolicyMaxBundle; - rtcp_mux_policy = kRtcpMuxPolicyRequire; - ice_connection_receiving_timeout = - kAggressiveIceConnectionReceivingTimeout; - - // These parameters are not defined in Java or IOS configuration, - // so their values will not be overwritten. - enable_ice_renomination = true; - redetermine_role_on_ice_restart = false; - } - } - - bool operator==(const RTCConfiguration& o) const; - bool operator!=(const RTCConfiguration& o) const; - - bool dscp() { return media_config.enable_dscp; } - void set_dscp(bool enable) { media_config.enable_dscp = enable; } - - // TODO(nisse): The corresponding flag in MediaConfig and - // elsewhere should be renamed enable_cpu_adaptation. - bool cpu_adaptation() { - return media_config.video.enable_cpu_overuse_detection; - } - void set_cpu_adaptation(bool enable) { - media_config.video.enable_cpu_overuse_detection = enable; - } - - bool suspend_below_min_bitrate() { - return media_config.video.suspend_below_min_bitrate; - } - void set_suspend_below_min_bitrate(bool enable) { - media_config.video.suspend_below_min_bitrate = enable; - } - - // TODO(nisse): The negation in the corresponding MediaConfig - // attribute is inconsistent, and it should be renamed at some - // point. - bool prerenderer_smoothing() { - return !media_config.video.disable_prerenderer_smoothing; - } - void set_prerenderer_smoothing(bool enable) { - media_config.video.disable_prerenderer_smoothing = !enable; - } - - static const int kUndefined = -1; - // Default maximum number of packets in the audio jitter buffer. - static const int kAudioJitterBufferMaxPackets = 50; - // ICE connection receiving timeout for aggressive configuration. - static const int kAggressiveIceConnectionReceivingTimeout = 1000; - // TODO(pthatcher): Rename this ice_transport_type, but update - // Chromium at the same time. - IceTransportsType type = kAll; - // TODO(pthatcher): Rename this ice_servers, but update Chromium - // at the same time. - IceServers servers; - BundlePolicy bundle_policy = kBundlePolicyBalanced; - RtcpMuxPolicy rtcp_mux_policy = kRtcpMuxPolicyRequire; - TcpCandidatePolicy tcp_candidate_policy = kTcpCandidatePolicyEnabled; - CandidateNetworkPolicy candidate_network_policy = - kCandidateNetworkPolicyAll; - int audio_jitter_buffer_max_packets = kAudioJitterBufferMaxPackets; - bool audio_jitter_buffer_fast_accelerate = false; - int ice_connection_receiving_timeout = kUndefined; // ms - int ice_backup_candidate_pair_ping_interval = kUndefined; // ms - ContinualGatheringPolicy continual_gathering_policy = GATHER_ONCE; - std::vector> certificates; - bool prioritize_most_likely_ice_candidate_pairs = false; - struct cricket::MediaConfig media_config; - // Flags corresponding to values set by constraint flags. - // rtc::Optional flags can be "missing", in which case the webrtc - // default applies. - bool disable_ipv6 = false; - bool enable_rtp_data_channel = false; - bool enable_quic = false; - rtc::Optional screencast_min_bitrate; - rtc::Optional combined_audio_video_bwe; - rtc::Optional enable_dtls_srtp; - int ice_candidate_pool_size = 0; - bool prune_turn_ports = false; - // If set to true, this means the ICE transport should presume TURN-to-TURN - // candidate pairs will succeed, even before a binding response is received. - bool presume_writable_when_fully_relayed = false; - // If true, "renomination" will be added to the ice options in the transport - // description. - bool enable_ice_renomination = false; - // If true, ICE role is redetermined when peerconnection sets a local - // transport description that indicates an ICE restart. - bool redetermine_role_on_ice_restart = true; - // - // Don't forget to update operator== if adding something. - // - }; - - struct RTCOfferAnswerOptions { - static const int kUndefined = -1; - static const int kMaxOfferToReceiveMedia = 1; - - // The default value for constraint offerToReceiveX:true. - static const int kOfferToReceiveMediaTrue = 1; - - int offer_to_receive_video = kUndefined; - int offer_to_receive_audio = kUndefined; - bool voice_activity_detection = true; - bool ice_restart = false; - bool use_rtp_mux = true; - - RTCOfferAnswerOptions() = default; - - RTCOfferAnswerOptions(int offer_to_receive_video, - int offer_to_receive_audio, - bool voice_activity_detection, - bool ice_restart, - bool use_rtp_mux) - : offer_to_receive_video(offer_to_receive_video), - offer_to_receive_audio(offer_to_receive_audio), - voice_activity_detection(voice_activity_detection), - ice_restart(ice_restart), - use_rtp_mux(use_rtp_mux) {} - }; - - // Used by GetStats to decide which stats to include in the stats reports. - // |kStatsOutputLevelStandard| includes the standard stats for Javascript API; - // |kStatsOutputLevelDebug| includes both the standard stats and additional - // stats for debugging purposes. - enum StatsOutputLevel { - kStatsOutputLevelStandard, - kStatsOutputLevelDebug, - }; - - // Accessor methods to active local streams. - virtual rtc::scoped_refptr - local_streams() = 0; - - // Accessor methods to remote streams. - virtual rtc::scoped_refptr - remote_streams() = 0; - - // Add a new MediaStream to be sent on this PeerConnection. - // Note that a SessionDescription negotiation is needed before the - // remote peer can receive the stream. - virtual bool AddStream(MediaStreamInterface* stream) = 0; - - // Remove a MediaStream from this PeerConnection. - // Note that a SessionDescription negotiation is need before the - // remote peer is notified. - virtual void RemoveStream(MediaStreamInterface* stream) = 0; - - // TODO(deadbeef): Make the following two methods pure virtual once - // implemented by all subclasses of PeerConnectionInterface. - // Add a new MediaStreamTrack to be sent on this PeerConnection. - // |streams| indicates which stream labels the track should be associated - // with. - virtual rtc::scoped_refptr AddTrack( - MediaStreamTrackInterface* track, - std::vector streams) { - return nullptr; - } - - // Remove an RtpSender from this PeerConnection. - // Returns true on success. - virtual bool RemoveTrack(RtpSenderInterface* sender) { - return false; - } - - // Returns pointer to the created DtmfSender on success. - // Otherwise returns NULL. - virtual rtc::scoped_refptr CreateDtmfSender( - AudioTrackInterface* track) = 0; - - // TODO(deadbeef): Make these pure virtual once all subclasses implement them. - // |kind| must be "audio" or "video". - // |stream_id| is used to populate the msid attribute; if empty, one will - // be generated automatically. - virtual rtc::scoped_refptr CreateSender( - const std::string& kind, - const std::string& stream_id) { - return rtc::scoped_refptr(); - } - - virtual std::vector> GetSenders() - const { - return std::vector>(); - } - - virtual std::vector> GetReceivers() - const { - return std::vector>(); - } - - virtual bool GetStats(StatsObserver* observer, - MediaStreamTrackInterface* track, - StatsOutputLevel level) = 0; - // Gets stats using the new stats collection API, see webrtc/api/stats/. These - // will replace old stats collection API when the new API has matured enough. - // TODO(hbos): Default implementation that does nothing only exists as to not - // break third party projects. As soon as they have been updated this should - // be changed to "= 0;". - virtual void GetStats(RTCStatsCollectorCallback* callback) {} - - virtual rtc::scoped_refptr CreateDataChannel( - const std::string& label, - const DataChannelInit* config) = 0; - - virtual const SessionDescriptionInterface* local_description() const = 0; - virtual const SessionDescriptionInterface* remote_description() const = 0; - // A "current" description the one currently negotiated from a complete - // offer/answer exchange. - virtual const SessionDescriptionInterface* current_local_description() const { - return nullptr; - } - virtual const SessionDescriptionInterface* current_remote_description() - const { - return nullptr; - } - // A "pending" description is one that's part of an incomplete offer/answer - // exchange (thus, either an offer or a pranswer). Once the offer/answer - // exchange is finished, the "pending" description will become "current". - virtual const SessionDescriptionInterface* pending_local_description() const { - return nullptr; - } - virtual const SessionDescriptionInterface* pending_remote_description() - const { - return nullptr; - } - - // Create a new offer. - // The CreateSessionDescriptionObserver callback will be called when done. - virtual void CreateOffer(CreateSessionDescriptionObserver* observer, - const MediaConstraintsInterface* constraints) {} - - // TODO(jiayl): remove the default impl and the old interface when chromium - // code is updated. - virtual void CreateOffer(CreateSessionDescriptionObserver* observer, - const RTCOfferAnswerOptions& options) {} - - // Create an answer to an offer. - // The CreateSessionDescriptionObserver callback will be called when done. - virtual void CreateAnswer(CreateSessionDescriptionObserver* observer, - const RTCOfferAnswerOptions& options) {} - // Deprecated - use version above. - // TODO(hta): Remove and remove default implementations when all callers - // are updated. - virtual void CreateAnswer(CreateSessionDescriptionObserver* observer, - const MediaConstraintsInterface* constraints) {} - - // Sets the local session description. - // JsepInterface takes the ownership of |desc| even if it fails. - // The |observer| callback will be called when done. - virtual void SetLocalDescription(SetSessionDescriptionObserver* observer, - SessionDescriptionInterface* desc) = 0; - // Sets the remote session description. - // JsepInterface takes the ownership of |desc| even if it fails. - // The |observer| callback will be called when done. - virtual void SetRemoteDescription(SetSessionDescriptionObserver* observer, - SessionDescriptionInterface* desc) = 0; - // Restarts or updates the ICE Agent process of gathering local candidates - // and pinging remote candidates. - // TODO(deadbeef): Remove once Chrome is moved over to SetConfiguration. - virtual bool UpdateIce(const IceServers& configuration, - const MediaConstraintsInterface* constraints) { - return false; - } - virtual bool UpdateIce(const IceServers& configuration) { return false; } - // TODO(deadbeef): Make this pure virtual once all Chrome subclasses of - // PeerConnectionInterface implement it. - virtual PeerConnectionInterface::RTCConfiguration GetConfiguration() { - return PeerConnectionInterface::RTCConfiguration(); - } - - // Sets the PeerConnection's global configuration to |config|. - // - // The members of |config| that may be changed are |type|, |servers|, - // |ice_candidate_pool_size| and |prune_turn_ports| (though the candidate - // pool size can't be changed after the first call to SetLocalDescription). - // Note that this means the BUNDLE and RTCP-multiplexing policies cannot be - // changed with this method. - // - // Any changes to STUN/TURN servers or ICE candidate policy will affect the - // next gathering phase, and cause the next call to createOffer to generate - // new ICE credentials, as described in JSEP. This also occurs when - // |prune_turn_ports| changes, for the same reasoning. - // - // If an error occurs, returns false and populates |error| if non-null: - // - INVALID_MODIFICATION if |config| contains a modified parameter other - // than one of the parameters listed above. - // - INVALID_RANGE if |ice_candidate_pool_size| is out of range. - // - SYNTAX_ERROR if parsing an ICE server URL failed. - // - INVALID_PARAMETER if a TURN server is missing |username| or |password|. - // - INTERNAL_ERROR if an unexpected error occurred. - // - // TODO(deadbeef): Make this pure virtual once all Chrome subclasses of - // PeerConnectionInterface implement it. - virtual bool SetConfiguration( - const PeerConnectionInterface::RTCConfiguration& config, - RTCError* error) { - return false; - } - // Version without error output param for backwards compatibility. - // TODO(deadbeef): Remove once chromium is updated. - virtual bool SetConfiguration( - const PeerConnectionInterface::RTCConfiguration& config) { - return false; - } - // Provides a remote candidate to the ICE Agent. - // A copy of the |candidate| will be created and added to the remote - // description. So the caller of this method still has the ownership of the - // |candidate|. - // TODO(ronghuawu): Consider to change this so that the AddIceCandidate will - // take the ownership of the |candidate|. - virtual bool AddIceCandidate(const IceCandidateInterface* candidate) = 0; - - // Removes a group of remote candidates from the ICE agent. - virtual bool RemoveIceCandidates( - const std::vector& candidates) { - return false; - } - - virtual void RegisterUMAObserver(UMAObserver* observer) = 0; - - // Returns the current SignalingState. - virtual SignalingState signaling_state() = 0; - virtual IceConnectionState ice_connection_state() = 0; - virtual IceGatheringState ice_gathering_state() = 0; - - // Starts RtcEventLog using existing file. Takes ownership of |file| and - // passes it on to Call, which will take the ownership. If the - // operation fails the file will be closed. The logging will stop - // automatically after 10 minutes have passed, or when the StopRtcEventLog - // function is called. - // TODO(ivoc): Make this pure virtual when Chrome is updated. - virtual bool StartRtcEventLog(rtc::PlatformFile file, - int64_t max_size_bytes) { - return false; - } - - // Stops logging the RtcEventLog. - // TODO(ivoc): Make this pure virtual when Chrome is updated. - virtual void StopRtcEventLog() {} - - // Terminates all media and closes the transport. - virtual void Close() = 0; - - protected: - // Dtor protected as objects shouldn't be deleted via this interface. - ~PeerConnectionInterface() {} -}; - -// PeerConnection callback interface. Application should implement these -// methods. -class PeerConnectionObserver { - public: - enum StateType { - kSignalingState, - kIceState, - }; - - // Triggered when the SignalingState changed. - virtual void OnSignalingChange( - PeerConnectionInterface::SignalingState new_state) = 0; - - // TODO(deadbeef): Once all subclasses override the scoped_refptr versions - // of the below three methods, make them pure virtual and remove the raw - // pointer version. - - // Triggered when media is received on a new stream from remote peer. - virtual void OnAddStream(rtc::scoped_refptr stream) {} - // Deprecated; please use the version that uses a scoped_refptr. - virtual void OnAddStream(MediaStreamInterface* stream) {} - - // Triggered when a remote peer close a stream. - virtual void OnRemoveStream(rtc::scoped_refptr stream) { - } - // Deprecated; please use the version that uses a scoped_refptr. - virtual void OnRemoveStream(MediaStreamInterface* stream) {} - - // Triggered when a remote peer opens a data channel. - virtual void OnDataChannel( - rtc::scoped_refptr data_channel){}; - // Deprecated; please use the version that uses a scoped_refptr. - virtual void OnDataChannel(DataChannelInterface* data_channel) {} - - // Triggered when renegotiation is needed. For example, an ICE restart - // has begun. - virtual void OnRenegotiationNeeded() = 0; - - // Called any time the IceConnectionState changes. - virtual void OnIceConnectionChange( - PeerConnectionInterface::IceConnectionState new_state) = 0; - - // Called any time the IceGatheringState changes. - virtual void OnIceGatheringChange( - PeerConnectionInterface::IceGatheringState new_state) = 0; - - // A new ICE candidate has been gathered. - virtual void OnIceCandidate(const IceCandidateInterface* candidate) = 0; - - // Ice candidates have been removed. - // TODO(honghaiz): Make this a pure virtual method when all its subclasses - // implement it. - virtual void OnIceCandidatesRemoved( - const std::vector& candidates) {} - - // Called when the ICE connection receiving status changes. - virtual void OnIceConnectionReceivingChange(bool receiving) {} - - // Called when a track is added to streams. - // TODO(zhihuang) Make this a pure virtual method when all its subclasses - // implement it. - virtual void OnAddTrack( - rtc::scoped_refptr receiver, - const std::vector>& streams) {} - - protected: - // Dtor protected as objects shouldn't be deleted via this interface. - ~PeerConnectionObserver() {} -}; - -// PeerConnectionFactoryInterface is the factory interface use for creating -// PeerConnection, MediaStream and media tracks. -// PeerConnectionFactoryInterface will create required libjingle threads, -// socket and network manager factory classes for networking. -// If an application decides to provide its own threads and network -// implementation of these classes it should use the alternate -// CreatePeerConnectionFactory method which accepts threads as input and use the -// CreatePeerConnection version that takes a PortAllocator as an -// argument. -class PeerConnectionFactoryInterface : public rtc::RefCountInterface { - public: - class Options { - public: - Options() - : disable_encryption(false), - disable_sctp_data_channels(false), - disable_network_monitor(false), - network_ignore_mask(rtc::kDefaultNetworkIgnoreMask), - ssl_max_version(rtc::SSL_PROTOCOL_DTLS_12), - crypto_options(rtc::CryptoOptions::NoGcm()) {} - bool disable_encryption; - bool disable_sctp_data_channels; - bool disable_network_monitor; - - // Sets the network types to ignore. For instance, calling this with - // ADAPTER_TYPE_ETHERNET | ADAPTER_TYPE_LOOPBACK will ignore Ethernet and - // loopback interfaces. - int network_ignore_mask; - - // Sets the maximum supported protocol version. The highest version - // supported by both ends will be used for the connection, i.e. if one - // party supports DTLS 1.0 and the other DTLS 1.2, DTLS 1.0 will be used. - rtc::SSLProtocolVersion ssl_max_version; - - // Sets crypto related options, e.g. enabled cipher suites. - rtc::CryptoOptions crypto_options; - }; - - virtual void SetOptions(const Options& options) = 0; - - virtual rtc::scoped_refptr CreatePeerConnection( - const PeerConnectionInterface::RTCConfiguration& configuration, - const MediaConstraintsInterface* constraints, - std::unique_ptr allocator, - std::unique_ptr cert_generator, - PeerConnectionObserver* observer) = 0; - - virtual rtc::scoped_refptr CreatePeerConnection( - const PeerConnectionInterface::RTCConfiguration& configuration, - std::unique_ptr allocator, - std::unique_ptr cert_generator, - PeerConnectionObserver* observer) = 0; - - virtual rtc::scoped_refptr - CreateLocalMediaStream(const std::string& label) = 0; - - // Creates a AudioSourceInterface. - // |constraints| decides audio processing settings but can be NULL. - virtual rtc::scoped_refptr CreateAudioSource( - const cricket::AudioOptions& options) = 0; - // Deprecated - use version above. - // Can use CopyConstraintsIntoAudioOptions to bridge the gap. - virtual rtc::scoped_refptr CreateAudioSource( - const MediaConstraintsInterface* constraints) = 0; - - // Creates a VideoTrackSourceInterface. The new source take ownership of - // |capturer|. - virtual rtc::scoped_refptr CreateVideoSource( - cricket::VideoCapturer* capturer) = 0; - // A video source creator that allows selection of resolution and frame rate. - // |constraints| decides video resolution and frame rate but can - // be NULL. - // In the NULL case, use the version above. - virtual rtc::scoped_refptr CreateVideoSource( - cricket::VideoCapturer* capturer, - const MediaConstraintsInterface* constraints) = 0; - - // Creates a new local VideoTrack. The same |source| can be used in several - // tracks. - virtual rtc::scoped_refptr CreateVideoTrack( - const std::string& label, - VideoTrackSourceInterface* source) = 0; - - // Creates an new AudioTrack. At the moment |source| can be NULL. - virtual rtc::scoped_refptr - CreateAudioTrack(const std::string& label, - AudioSourceInterface* source) = 0; - - // Starts AEC dump using existing file. Takes ownership of |file| and passes - // it on to VoiceEngine (via other objects) immediately, which will take - // the ownerhip. If the operation fails, the file will be closed. - // A maximum file size in bytes can be specified. When the file size limit is - // reached, logging is stopped automatically. If max_size_bytes is set to a - // value <= 0, no limit will be used, and logging will continue until the - // StopAecDump function is called. - virtual bool StartAecDump(rtc::PlatformFile file, int64_t max_size_bytes) = 0; - - // Stops logging the AEC dump. - virtual void StopAecDump() = 0; - - // This function is deprecated and will be removed when Chrome is updated to - // use the equivalent function on PeerConnectionInterface. - // TODO(ivoc) Remove after Chrome is updated. - virtual bool StartRtcEventLog(rtc::PlatformFile file, - int64_t max_size_bytes) = 0; - // This function is deprecated and will be removed when Chrome is updated to - // use the equivalent function on PeerConnectionInterface. - // TODO(ivoc) Remove after Chrome is updated. - virtual bool StartRtcEventLog(rtc::PlatformFile file) = 0; - - // This function is deprecated and will be removed when Chrome is updated to - // use the equivalent function on PeerConnectionInterface. - // TODO(ivoc) Remove after Chrome is updated. - virtual void StopRtcEventLog() = 0; - - protected: - // Dtor and ctor protected as objects shouldn't be created or deleted via - // this interface. - PeerConnectionFactoryInterface() {} - ~PeerConnectionFactoryInterface() {} // NOLINT -}; - -// Create a new instance of PeerConnectionFactoryInterface. -// -// This method relies on the thread it's called on as the "signaling thread" -// for the PeerConnectionFactory it creates. -// -// As such, if the current thread is not already running an rtc::Thread message -// loop, an application using this method must eventually either call -// rtc::Thread::Current()->Run(), or call -// rtc::Thread::Current()->ProcessMessages() within the application's own -// message loop. -rtc::scoped_refptr -CreatePeerConnectionFactory(); - -// Create a new instance of PeerConnectionFactoryInterface. -// -// |network_thread|, |worker_thread| and |signaling_thread| are -// the only mandatory parameters. -// -// If non-null, ownership of |default_adm|, |encoder_factory| and -// |decoder_factory| are transferred to the returned factory. -rtc::scoped_refptr CreatePeerConnectionFactory( - rtc::Thread* network_thread, - rtc::Thread* worker_thread, - rtc::Thread* signaling_thread, - AudioDeviceModule* default_adm, - cricket::WebRtcVideoEncoderFactory* encoder_factory, - cricket::WebRtcVideoDecoderFactory* decoder_factory); - -// Create a new instance of PeerConnectionFactoryInterface with external audio -// mixer. -// -// If |audio_mixer| is null, an internal audio mixer will be created and used. -rtc::scoped_refptr -CreatePeerConnectionFactoryWithAudioMixer( - rtc::Thread* network_thread, - rtc::Thread* worker_thread, - rtc::Thread* signaling_thread, - AudioDeviceModule* default_adm, - cricket::WebRtcVideoEncoderFactory* encoder_factory, - cricket::WebRtcVideoDecoderFactory* decoder_factory, - rtc::scoped_refptr audio_mixer); - -// Create a new instance of PeerConnectionFactoryInterface. -// Same thread is used as worker and network thread. -inline rtc::scoped_refptr -CreatePeerConnectionFactory( - rtc::Thread* worker_and_network_thread, - rtc::Thread* signaling_thread, - AudioDeviceModule* default_adm, - cricket::WebRtcVideoEncoderFactory* encoder_factory, - cricket::WebRtcVideoDecoderFactory* decoder_factory) { - return CreatePeerConnectionFactory( - worker_and_network_thread, worker_and_network_thread, signaling_thread, - default_adm, encoder_factory, decoder_factory); -} - -} // namespace webrtc - -#endif // WEBRTC_API_PEERCONNECTIONINTERFACE_H_ diff --git a/WebRtc.NET/include/webrtc/api/peerconnectionproxy.h b/WebRtc.NET/include/webrtc/api/peerconnectionproxy.h deleted file mode 100644 index ed707b3c..00000000 --- a/WebRtc.NET/include/webrtc/api/peerconnectionproxy.h +++ /dev/null @@ -1,109 +0,0 @@ -/* - * Copyright 2012 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_API_PEERCONNECTIONPROXY_H_ -#define WEBRTC_API_PEERCONNECTIONPROXY_H_ - -#include "webrtc/api/peerconnectioninterface.h" -#include "webrtc/api/proxy.h" - -namespace webrtc { - -// Define proxy for PeerConnectionInterface. -BEGIN_SIGNALING_PROXY_MAP(PeerConnection) - PROXY_SIGNALING_THREAD_DESTRUCTOR() - PROXY_METHOD0(rtc::scoped_refptr, local_streams) - PROXY_METHOD0(rtc::scoped_refptr, remote_streams) - PROXY_METHOD1(bool, AddStream, MediaStreamInterface*) - PROXY_METHOD1(void, RemoveStream, MediaStreamInterface*) - PROXY_METHOD2(rtc::scoped_refptr, - AddTrack, - MediaStreamTrackInterface*, - std::vector) - PROXY_METHOD1(bool, RemoveTrack, RtpSenderInterface*) - PROXY_METHOD1(rtc::scoped_refptr, - CreateDtmfSender, - AudioTrackInterface*) - PROXY_METHOD2(rtc::scoped_refptr, - CreateSender, - const std::string&, - const std::string&) - PROXY_CONSTMETHOD0(std::vector>, - GetSenders) - PROXY_CONSTMETHOD0(std::vector>, - GetReceivers) - PROXY_METHOD3(bool, - GetStats, - StatsObserver*, - MediaStreamTrackInterface*, - StatsOutputLevel) - PROXY_METHOD1(void, GetStats, RTCStatsCollectorCallback*) - PROXY_METHOD2(rtc::scoped_refptr, - CreateDataChannel, - const std::string&, - const DataChannelInit*) - PROXY_CONSTMETHOD0(const SessionDescriptionInterface*, local_description) - PROXY_CONSTMETHOD0(const SessionDescriptionInterface*, remote_description) - PROXY_CONSTMETHOD0(const SessionDescriptionInterface*, - pending_local_description) - PROXY_CONSTMETHOD0(const SessionDescriptionInterface*, - pending_remote_description) - PROXY_CONSTMETHOD0(const SessionDescriptionInterface*, - current_local_description) - PROXY_CONSTMETHOD0(const SessionDescriptionInterface*, - current_remote_description) - PROXY_METHOD2(void, - CreateOffer, - CreateSessionDescriptionObserver*, - const MediaConstraintsInterface*) - PROXY_METHOD2(void, - CreateAnswer, - CreateSessionDescriptionObserver*, - const MediaConstraintsInterface*) - PROXY_METHOD2(void, - CreateOffer, - CreateSessionDescriptionObserver*, - const RTCOfferAnswerOptions&) - PROXY_METHOD2(void, - CreateAnswer, - CreateSessionDescriptionObserver*, - const RTCOfferAnswerOptions&) - PROXY_METHOD2(void, - SetLocalDescription, - SetSessionDescriptionObserver*, - SessionDescriptionInterface*) - PROXY_METHOD2(void, - SetRemoteDescription, - SetSessionDescriptionObserver*, - SessionDescriptionInterface*) - PROXY_METHOD0(PeerConnectionInterface::RTCConfiguration, GetConfiguration); - PROXY_METHOD2(bool, - SetConfiguration, - const PeerConnectionInterface::RTCConfiguration&, - RTCError*); - PROXY_METHOD1(bool, - SetConfiguration, - const PeerConnectionInterface::RTCConfiguration&); - PROXY_METHOD1(bool, AddIceCandidate, const IceCandidateInterface*) - PROXY_METHOD1(bool, - RemoveIceCandidates, - const std::vector&); - PROXY_METHOD1(void, RegisterUMAObserver, UMAObserver*) - PROXY_METHOD0(SignalingState, signaling_state) - PROXY_METHOD0(IceConnectionState, ice_connection_state) - PROXY_METHOD0(IceGatheringState, ice_gathering_state) - PROXY_METHOD2(bool, StartRtcEventLog, rtc::PlatformFile, int64_t) - PROXY_METHOD0(void, StopRtcEventLog) - PROXY_METHOD0(void, Close) -END_PROXY_MAP() - -} // namespace webrtc - -#endif // WEBRTC_API_PEERCONNECTIONPROXY_H_ diff --git a/WebRtc.NET/include/webrtc/api/proxy.h b/WebRtc.NET/include/webrtc/api/proxy.h deleted file mode 100644 index 51cdd296..00000000 --- a/WebRtc.NET/include/webrtc/api/proxy.h +++ /dev/null @@ -1,558 +0,0 @@ -/* - * Copyright 2013 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -// This file contains Macros for creating proxies for webrtc MediaStream and -// PeerConnection classes. - -// -// Example usage: -// -// class TestInterface : public rtc::RefCountInterface { -// public: -// std::string FooA() = 0; -// std::string FooB(bool arg1) const = 0; -// std::string FooC(bool arg1) = 0; -// }; -// -// Note that return types can not be a const reference. -// -// class Test : public TestInterface { -// ... implementation of the interface. -// }; -// -// BEGIN_PROXY_MAP(Test) -// PROXY_SIGNALING_THREAD_DESTRUCTOR() -// PROXY_METHOD0(std::string, FooA) -// PROXY_CONSTMETHOD1(std::string, FooB, arg1) -// PROXY_WORKER_METHOD1(std::string, FooC, arg1) -// END_PROXY_MAP() -// -// Where the destructor and first two methods are invoked on the signaling -// thread, and the third is invoked on the worker thread. -// -// The proxy can be created using -// -// TestProxy::Create(Thread* signaling_thread, Thread* worker_thread, -// TestInterface*). -// -// The variant defined with BEGIN_SIGNALING_PROXY_MAP is unaware of -// the worker thread, and invokes all methods on the signaling thread. -// -// The variant defined with BEGIN_OWNED_PROXY_MAP does not use -// refcounting, and instead just takes ownership of the object being proxied. - -#ifndef WEBRTC_API_PROXY_H_ -#define WEBRTC_API_PROXY_H_ - -#include - -#include "webrtc/base/event.h" -#include "webrtc/base/thread.h" - -namespace webrtc { - -template -class ReturnType { - public: - template - void Invoke(C* c, M m) { r_ = (c->*m)(); } - template - void Invoke(C* c, M m, T1 a1) { - r_ = (c->*m)(std::move(a1)); - } - template - void Invoke(C* c, M m, T1 a1, T2 a2) { - r_ = (c->*m)(std::move(a1), std::move(a2)); - } - template - void Invoke(C* c, M m, T1 a1, T2 a2, T3 a3) { - r_ = (c->*m)(std::move(a1), std::move(a2), std::move(a3)); - } - template - void Invoke(C* c, M m, T1 a1, T2 a2, T3 a3, T4 a4) { - r_ = (c->*m)(std::move(a1), std::move(a2), std::move(a3), std::move(a4)); - } - template - void Invoke(C* c, M m, T1 a1, T2 a2, T3 a3, T4 a4, T5 a5) { - r_ = (c->*m)(std::move(a1), std::move(a2), std::move(a3), std::move(a4), - std::move(a5)); - } - - R moved_result() { return std::move(r_); } - - private: - R r_; -}; - -template <> -class ReturnType { - public: - template - void Invoke(C* c, M m) { (c->*m)(); } - template - void Invoke(C* c, M m, T1 a1) { - (c->*m)(std::move(a1)); - } - template - void Invoke(C* c, M m, T1 a1, T2 a2) { - (c->*m)(std::move(a1), std::move(a2)); - } - template - void Invoke(C* c, M m, T1 a1, T2 a2, T3 a3) { - (c->*m)(std::move(a1), std::move(a2), std::move(a3)); - } - - void moved_result() {} -}; - -namespace internal { - -class SynchronousMethodCall - : public rtc::MessageData, - public rtc::MessageHandler { - public: - explicit SynchronousMethodCall(rtc::MessageHandler* proxy) - : e_(), proxy_(proxy) {} - ~SynchronousMethodCall() {} - - void Invoke(const rtc::Location& posted_from, rtc::Thread* t) { - if (t->IsCurrent()) { - proxy_->OnMessage(NULL); - } else { - e_.reset(new rtc::Event(false, false)); - t->Post(posted_from, this, 0); - e_->Wait(rtc::Event::kForever); - } - } - - private: - void OnMessage(rtc::Message*) { proxy_->OnMessage(NULL); e_->Set(); } - std::unique_ptr e_; - rtc::MessageHandler* proxy_; -}; - -} // namespace internal - -template -class MethodCall0 : public rtc::Message, - public rtc::MessageHandler { - public: - typedef R (C::*Method)(); - MethodCall0(C* c, Method m) : c_(c), m_(m) {} - - R Marshal(const rtc::Location& posted_from, rtc::Thread* t) { - internal::SynchronousMethodCall(this).Invoke(posted_from, t); - return r_.moved_result(); - } - - private: - void OnMessage(rtc::Message*) { r_.Invoke(c_, m_); } - - C* c_; - Method m_; - ReturnType r_; -}; - -template -class ConstMethodCall0 : public rtc::Message, - public rtc::MessageHandler { - public: - typedef R (C::*Method)() const; - ConstMethodCall0(C* c, Method m) : c_(c), m_(m) {} - - R Marshal(const rtc::Location& posted_from, rtc::Thread* t) { - internal::SynchronousMethodCall(this).Invoke(posted_from, t); - return r_.moved_result(); - } - - private: - void OnMessage(rtc::Message*) { r_.Invoke(c_, m_); } - - C* c_; - Method m_; - ReturnType r_; -}; - -template -class MethodCall1 : public rtc::Message, - public rtc::MessageHandler { - public: - typedef R (C::*Method)(T1 a1); - MethodCall1(C* c, Method m, T1 a1) : c_(c), m_(m), a1_(std::move(a1)) {} - - R Marshal(const rtc::Location& posted_from, rtc::Thread* t) { - internal::SynchronousMethodCall(this).Invoke(posted_from, t); - return r_.moved_result(); - } - - private: - void OnMessage(rtc::Message*) { r_.Invoke(c_, m_, std::move(a1_)); } - - C* c_; - Method m_; - ReturnType r_; - T1 a1_; -}; - -template -class ConstMethodCall1 : public rtc::Message, - public rtc::MessageHandler { - public: - typedef R (C::*Method)(T1 a1) const; - ConstMethodCall1(C* c, Method m, T1 a1) : c_(c), m_(m), a1_(std::move(a1)) {} - - R Marshal(const rtc::Location& posted_from, rtc::Thread* t) { - internal::SynchronousMethodCall(this).Invoke(posted_from, t); - return r_.moved_result(); - } - - private: - void OnMessage(rtc::Message*) { r_.Invoke(c_, m_, std::move(a1_)); } - - C* c_; - Method m_; - ReturnType r_; - T1 a1_; -}; - -template -class MethodCall2 : public rtc::Message, - public rtc::MessageHandler { - public: - typedef R (C::*Method)(T1 a1, T2 a2); - MethodCall2(C* c, Method m, T1 a1, T2 a2) - : c_(c), m_(m), a1_(std::move(a1)), a2_(std::move(a2)) {} - - R Marshal(const rtc::Location& posted_from, rtc::Thread* t) { - internal::SynchronousMethodCall(this).Invoke(posted_from, t); - return r_.moved_result(); - } - - private: - void OnMessage(rtc::Message*) { - r_.Invoke(c_, m_, std::move(a1_), std::move(a2_)); - } - - C* c_; - Method m_; - ReturnType r_; - T1 a1_; - T2 a2_; -}; - -template -class MethodCall3 : public rtc::Message, - public rtc::MessageHandler { - public: - typedef R (C::*Method)(T1 a1, T2 a2, T3 a3); - MethodCall3(C* c, Method m, T1 a1, T2 a2, T3 a3) - : c_(c), - m_(m), - a1_(std::move(a1)), - a2_(std::move(a2)), - a3_(std::move(a3)) {} - - R Marshal(const rtc::Location& posted_from, rtc::Thread* t) { - internal::SynchronousMethodCall(this).Invoke(posted_from, t); - return r_.moved_result(); - } - - private: - void OnMessage(rtc::Message*) { - r_.Invoke(c_, m_, std::move(a1_), std::move(a2_), std::move(a3_)); - } - - C* c_; - Method m_; - ReturnType r_; - T1 a1_; - T2 a2_; - T3 a3_; -}; - -template -class MethodCall4 : public rtc::Message, - public rtc::MessageHandler { - public: - typedef R (C::*Method)(T1 a1, T2 a2, T3 a3, T4 a4); - MethodCall4(C* c, Method m, T1 a1, T2 a2, T3 a3, T4 a4) - : c_(c), - m_(m), - a1_(std::move(a1)), - a2_(std::move(a2)), - a3_(std::move(a3)), - a4_(std::move(a4)) {} - - R Marshal(const rtc::Location& posted_from, rtc::Thread* t) { - internal::SynchronousMethodCall(this).Invoke(posted_from, t); - return r_.moved_result(); - } - - private: - void OnMessage(rtc::Message*) { - r_.Invoke(c_, m_, std::move(a1_), std::move(a2_), std::move(a3_), - std::move(a4_)); - } - - C* c_; - Method m_; - ReturnType r_; - T1 a1_; - T2 a2_; - T3 a3_; - T4 a4_; -}; - -template -class MethodCall5 : public rtc::Message, - public rtc::MessageHandler { - public: - typedef R (C::*Method)(T1 a1, T2 a2, T3 a3, T4 a4, T5 a5); - MethodCall5(C* c, Method m, T1 a1, T2 a2, T3 a3, T4 a4, T5 a5) - : c_(c), - m_(m), - a1_(std::move(a1)), - a2_(std::move(a2)), - a3_(std::move(a3)), - a4_(std::move(a4)), - a5_(std::move(a5)) {} - - R Marshal(const rtc::Location& posted_from, rtc::Thread* t) { - internal::SynchronousMethodCall(this).Invoke(posted_from, t); - return r_.moved_result(); - } - - private: - void OnMessage(rtc::Message*) { - r_.Invoke(c_, m_, std::move(a1_), std::move(a2_), std::move(a3_), - std::move(a4_), std::move(a5_)); - } - - C* c_; - Method m_; - ReturnType r_; - T1 a1_; - T2 a2_; - T3 a3_; - T4 a4_; - T5 a5_; -}; - -// Helper macros to reduce code duplication. -#define PROXY_MAP_BOILERPLATE(c) \ - template \ - class c##ProxyWithInternal; \ - typedef c##ProxyWithInternal c##Proxy; \ - template \ - class c##ProxyWithInternal : public c##Interface { \ - protected: \ - typedef c##Interface C; \ - \ - public: \ - const INTERNAL_CLASS* internal() const { return c_.get(); } \ - INTERNAL_CLASS* internal() { return c_.get(); } - -#define SIGNALING_PROXY_MAP_BOILERPLATE(c) \ - protected: \ - c##ProxyWithInternal(rtc::Thread* signaling_thread, INTERNAL_CLASS* c) \ - : signaling_thread_(signaling_thread), c_(c) {} \ - \ - private: \ - mutable rtc::Thread* signaling_thread_; - -#define WORKER_PROXY_MAP_BOILERPLATE(c) \ - protected: \ - c##ProxyWithInternal(rtc::Thread* signaling_thread, \ - rtc::Thread* worker_thread, INTERNAL_CLASS* c) \ - : signaling_thread_(signaling_thread), \ - worker_thread_(worker_thread), \ - c_(c) {} \ - \ - private: \ - mutable rtc::Thread* signaling_thread_; \ - mutable rtc::Thread* worker_thread_; - -// Note that the destructor is protected so that the proxy can only be -// destroyed via RefCountInterface. -#define REFCOUNTED_PROXY_MAP_BOILERPLATE(c) \ - protected: \ - ~c##ProxyWithInternal() { \ - MethodCall0 call( \ - this, &c##ProxyWithInternal::DestroyInternal); \ - call.Marshal(RTC_FROM_HERE, destructor_thread()); \ - } \ - \ - private: \ - void DestroyInternal() { c_ = nullptr; } \ - rtc::scoped_refptr c_; - -#define OWNED_PROXY_MAP_BOILERPLATE(c) \ - public: \ - ~c##ProxyWithInternal() { \ - MethodCall0 call( \ - this, &c##ProxyWithInternal::DestroyInternal); \ - call.Marshal(RTC_FROM_HERE, destructor_thread()); \ - } \ - \ - private: \ - void DestroyInternal() { c_.reset(nullptr); } \ - std::unique_ptr c_; - -#define BEGIN_SIGNALING_PROXY_MAP(c) \ - PROXY_MAP_BOILERPLATE(c) \ - SIGNALING_PROXY_MAP_BOILERPLATE(c) \ - REFCOUNTED_PROXY_MAP_BOILERPLATE(c) \ - public: \ - static rtc::scoped_refptr Create( \ - rtc::Thread* signaling_thread, INTERNAL_CLASS* c) { \ - return new rtc::RefCountedObject(signaling_thread, \ - c); \ - } - -#define BEGIN_PROXY_MAP(c) \ - PROXY_MAP_BOILERPLATE(c) \ - WORKER_PROXY_MAP_BOILERPLATE(c) \ - REFCOUNTED_PROXY_MAP_BOILERPLATE(c) \ - public: \ - static rtc::scoped_refptr Create( \ - rtc::Thread* signaling_thread, rtc::Thread* worker_thread, \ - INTERNAL_CLASS* c) { \ - return new rtc::RefCountedObject(signaling_thread, \ - worker_thread, c); \ - } - -#define BEGIN_OWNED_PROXY_MAP(c) \ - PROXY_MAP_BOILERPLATE(c) \ - WORKER_PROXY_MAP_BOILERPLATE(c) \ - OWNED_PROXY_MAP_BOILERPLATE(c) \ - public: \ - static std::unique_ptr Create( \ - rtc::Thread* signaling_thread, rtc::Thread* worker_thread, \ - INTERNAL_CLASS* c) { \ - return std::unique_ptr( \ - new c##ProxyWithInternal(signaling_thread, worker_thread, c)); \ - } - -#define PROXY_SIGNALING_THREAD_DESTRUCTOR() \ - private: \ - rtc::Thread* destructor_thread() const { return signaling_thread_; } \ - \ - public: - -#define PROXY_WORKER_THREAD_DESTRUCTOR() \ - private: \ - rtc::Thread* destructor_thread() const { return worker_thread_; } \ - \ - public: - -#define PROXY_METHOD0(r, method) \ - r method() override { \ - MethodCall0 call(c_.get(), &C::method); \ - return call.Marshal(RTC_FROM_HERE, signaling_thread_); \ - } - -#define PROXY_CONSTMETHOD0(r, method) \ - r method() const override { \ - ConstMethodCall0 call(c_.get(), &C::method); \ - return call.Marshal(RTC_FROM_HERE, signaling_thread_); \ - } - -#define PROXY_METHOD1(r, method, t1) \ - r method(t1 a1) override { \ - MethodCall1 call(c_.get(), &C::method, std::move(a1)); \ - return call.Marshal(RTC_FROM_HERE, signaling_thread_); \ - } - -#define PROXY_CONSTMETHOD1(r, method, t1) \ - r method(t1 a1) const override { \ - ConstMethodCall1 call(c_.get(), &C::method, std::move(a1)); \ - return call.Marshal(RTC_FROM_HERE, signaling_thread_); \ - } - -#define PROXY_METHOD2(r, method, t1, t2) \ - r method(t1 a1, t2 a2) override { \ - MethodCall2 call(c_.get(), &C::method, std::move(a1), \ - std::move(a2)); \ - return call.Marshal(RTC_FROM_HERE, signaling_thread_); \ - } - -#define PROXY_METHOD3(r, method, t1, t2, t3) \ - r method(t1 a1, t2 a2, t3 a3) override { \ - MethodCall3 call(c_.get(), &C::method, std::move(a1), \ - std::move(a2), std::move(a3)); \ - return call.Marshal(RTC_FROM_HERE, signaling_thread_); \ - } - -#define PROXY_METHOD4(r, method, t1, t2, t3, t4) \ - r method(t1 a1, t2 a2, t3 a3, t4 a4) override { \ - MethodCall4 call(c_.get(), &C::method, \ - std::move(a1), std::move(a2), \ - std::move(a3), std::move(a4)); \ - return call.Marshal(RTC_FROM_HERE, signaling_thread_); \ - } - -#define PROXY_METHOD5(r, method, t1, t2, t3, t4, t5) \ - r method(t1 a1, t2 a2, t3 a3, t4 a4, t5 a5) override { \ - MethodCall5 call( \ - c_.get(), &C::method, std::move(a1), std::move(a2), std::move(a3), \ - std::move(a4), std::move(a5)); \ - return call.Marshal(RTC_FROM_HERE, signaling_thread_); \ - } - -// Define methods which should be invoked on the worker thread. -#define PROXY_WORKER_METHOD0(r, method) \ - r method() override { \ - MethodCall0 call(c_.get(), &C::method); \ - return call.Marshal(RTC_FROM_HERE, worker_thread_); \ - } - -#define PROXY_WORKER_CONSTMETHOD0(r, method) \ - r method() const override { \ - ConstMethodCall0 call(c_.get(), &C::method); \ - return call.Marshal(RTC_FROM_HERE, worker_thread_); \ - } - -#define PROXY_WORKER_METHOD1(r, method, t1) \ - r method(t1 a1) override { \ - MethodCall1 call(c_.get(), &C::method, std::move(a1)); \ - return call.Marshal(RTC_FROM_HERE, worker_thread_); \ - } - -#define PROXY_WORKER_CONSTMETHOD1(r, method, t1) \ - r method(t1 a1) const override { \ - ConstMethodCall1 call(c_.get(), &C::method, std::move(a1)); \ - return call.Marshal(RTC_FROM_HERE, worker_thread_); \ - } - -#define PROXY_WORKER_METHOD2(r, method, t1, t2) \ - r method(t1 a1, t2 a2) override { \ - MethodCall2 call(c_.get(), &C::method, std::move(a1), \ - std::move(a2)); \ - return call.Marshal(RTC_FROM_HERE, worker_thread_); \ - } - -#define PROXY_WORKER_CONSTMETHOD2(r, method, t1, t2) \ - r method(t1 a1, t2 a2) const override { \ - ConstMethodCall2 call(c_.get(), &C::method, std::move(a1), \ - std::move(a2)); \ - return call.Marshal(RTC_FROM_HERE, worker_thread_); \ - } - -#define END_PROXY_MAP() \ - } \ - ; - -} // namespace webrtc - -#endif // WEBRTC_API_PROXY_H_ diff --git a/WebRtc.NET/include/webrtc/api/quicdatachannel.h b/WebRtc.NET/include/webrtc/api/quicdatachannel.h deleted file mode 100644 index 18a10acb..00000000 --- a/WebRtc.NET/include/webrtc/api/quicdatachannel.h +++ /dev/null @@ -1,220 +0,0 @@ -/* - * Copyright 2016 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_API_QUICDATACHANNEL_H_ -#define WEBRTC_API_QUICDATACHANNEL_H_ - -#include -#include -#include - -#include "webrtc/api/datachannelinterface.h" -#include "webrtc/base/asyncinvoker.h" -#include "webrtc/base/sigslot.h" -#include "webrtc/base/thread.h" - -namespace cricket { -class QuicTransportChannel; -class ReliableQuicStream; -class TransportChannel; -} // namepsace cricket - -namespace net { -// TODO(mikescarlett): Make this uint64_t once QUIC uses 64-bit ids. -typedef uint32_t QuicStreamId; -} // namespace net - -namespace rtc { -class CopyOnWriteBuffer; -} // namespace rtc - -namespace webrtc { - -// Encodes a QUIC message header with the data channel ID and message ID, then -// stores the result in |header|. -void WriteQuicDataChannelMessageHeader(int data_channel_id, - uint64_t message_id, - rtc::CopyOnWriteBuffer* header); - -// Decodes the data channel ID and message ID from the initial data received by -// an incoming QUIC stream. The data channel ID is output to |data_channel_id|, -// the message ID is output to |message_id|, and the number of bytes read is -// output to |bytes_read|. Returns false if either ID cannot be read. -bool ParseQuicDataMessageHeader(const char* data, - size_t len, - int* data_channel_id, - uint64_t* message_id, - size_t* bytes_read); - -// QuicDataChannel is an implementation of DataChannelInterface based on the -// QUIC protocol. It uses a QuicTransportChannel to establish encryption and -// transfer data, and a QuicDataTransport to receive incoming messages at -// the correct data channel. Currently this class implements unordered, reliable -// delivery and does not send an "OPEN" message. -// -// Each time a message is sent: -// -// - The QuicDataChannel prepends it with the data channel id and message id. -// The QuicTransportChannel creates a ReliableQuicStream, then the -// ReliableQuicStream sends the message with a FIN. -// -// - The remote QuicSession creates a ReliableQuicStream to receive the data. -// The remote QuicDataTransport dispatches the ReliableQuicStream to the -// QuicDataChannel with the same id as this data channel. -// -// - The remote QuicDataChannel queues data from the ReliableQuicStream. Once -// it receives a QUIC stream frame with a FIN, it provides the message to the -// DataChannelObserver. -// -// TODO(mikescarlett): Implement ordered delivery, unreliable delivery, and -// an OPEN message similar to the one for SCTP. -class QuicDataChannel : public rtc::RefCountedObject, - public sigslot::has_slots<> { - public: - // Message stores buffered data from the incoming QUIC stream. The QUIC stream - // is provided so that remaining data can be received from the remote peer. - struct Message { - uint64_t id; - rtc::CopyOnWriteBuffer buffer; - cricket::ReliableQuicStream* stream; - }; - - QuicDataChannel(rtc::Thread* signaling_thread, - rtc::Thread* worker_thread, - rtc::Thread* network_thread, - const std::string& label, - const DataChannelInit& config); - ~QuicDataChannel() override; - - // DataChannelInterface overrides. - std::string label() const override { return label_; } - bool reliable() const override { return true; } - bool ordered() const override { return false; } - uint16_t maxRetransmitTime() const override { return -1; } - uint16_t maxRetransmits() const override { return -1; } - bool negotiated() const override { return false; } - int id() const override { return id_; } - DataState state() const override { return state_; } - uint64_t buffered_amount() const override { return buffered_amount_; } - std::string protocol() const override { return protocol_; } - void RegisterObserver(DataChannelObserver* observer) override; - void UnregisterObserver() override; - void Close() override; - bool Send(const DataBuffer& buffer) override; - - // Called from QuicDataTransport to set the QUIC transport channel that the - // QuicDataChannel sends messages with. Returns false if a different QUIC - // transport channel is already set or |channel| is NULL. - // - // The QUIC transport channel is not set in the constructor to allow creating - // the QuicDataChannel before the PeerConnection has a QUIC transport channel, - // such as before the session description is not set. - bool SetTransportChannel(cricket::QuicTransportChannel* channel); - - // Called from QuicDataTransport when an incoming ReliableQuicStream is - // receiving a message received for this data channel. Once this function is - // called, |message| is owned by the QuicDataChannel and should not be - // accessed by the QuicDataTransport. - void OnIncomingMessage(Message&& message); - - // Methods for testing. - // Gets the number of outgoing QUIC streams with write blocked data that are - // currently open for this data channel and are not finished writing a - // message. This is equivalent to the size of |write_blocked_quic_streams_|. - size_t GetNumWriteBlockedStreams() const; - // Gets the number of incoming QUIC streams with buffered data that are - // currently open for this data channel and are not finished receiving a - // message. This is equivalent to the size of |incoming_quic_messages_|. - size_t GetNumIncomingStreams() const; - - private: - // Callbacks from ReliableQuicStream. - // Called when an incoming QUIC stream in |incoming_quic_messages_| has - // received a QUIC stream frame. - void OnDataReceived(net::QuicStreamId stream_id, - const char* data, - size_t len); - // Called when a write blocked QUIC stream that has been added to - // |write_blocked_quic_streams_| is closed. - void OnWriteBlockedStreamClosed(net::QuicStreamId stream_id, int error); - // Called when an incoming QUIC stream that has been added to - // |incoming_quic_messages_| is closed. - void OnIncomingQueuedStreamClosed(net::QuicStreamId stream_id, int error); - // Called when a write blocked QUIC stream in |write_blocked_quic_streams_| - // has written previously queued data. - void OnQueuedBytesWritten(net::QuicStreamId stream_id, - uint64_t queued_bytes_written); - - // Callbacks from |quic_transport_channel_|. - void OnReadyToSend(cricket::TransportChannel* channel); - void OnConnectionClosed(); - - // Network thread methods. - // Sends the data buffer to the remote peer using an outgoing QUIC stream. - // Returns true if the data buffer can be successfully sent, or if it is - // queued to be sent later. - bool Send_n(const DataBuffer& buffer); - - // Worker thread methods. - // Connects the |quic_transport_channel_| signals to this QuicDataChannel, - // then returns the new QuicDataChannel state. - DataState SetTransportChannel_w(); - // Closes the QUIC streams associated with this QuicDataChannel. - void Close_w(); - // Sets |buffered_amount_|. - void SetBufferedAmount_w(uint64_t buffered_amount); - - // Signaling thread methods. - // Triggers QuicDataChannelObserver::OnMessage when a message from the remote - // peer is ready to be read. - void OnMessage_s(const DataBuffer& received_data); - // Triggers QuicDataChannel::OnStateChange if the state change is valid. - // Otherwise does nothing if |state| == |state_| or |state| != kClosed when - // the data channel is closing. - void SetState_s(DataState state); - // Triggers QuicDataChannelObserver::OnBufferedAmountChange when the total - // buffered data changes for a QUIC stream. - void OnBufferedAmountChange_s(uint64_t buffered_amount); - - // QUIC transport channel which owns the QUIC session. It is used to create - // a QUIC stream for sending outgoing messages. - cricket::QuicTransportChannel* quic_transport_channel_ = nullptr; - // Signaling thread for DataChannelInterface methods. - rtc::Thread* const signaling_thread_; - // Worker thread for |quic_transport_channel_| callbacks. - rtc::Thread* const worker_thread_; - // Network thread for sending data and |quic_transport_channel_| callbacks. - rtc::Thread* const network_thread_; - rtc::AsyncInvoker invoker_; - // Map of QUIC stream ID => ReliableQuicStream* for write blocked QUIC - // streams. - std::unordered_map - write_blocked_quic_streams_; - // Map of QUIC stream ID => Message for each incoming QUIC stream. - std::unordered_map incoming_quic_messages_; - // Handles received data from the remote peer and data channel state changes. - DataChannelObserver* observer_ = nullptr; - // QuicDataChannel ID. - int id_; - // Connectivity state of the QuicDataChannel. - DataState state_; - // Total bytes that are buffered among the QUIC streams. - uint64_t buffered_amount_; - // Counter for number of sent messages that is used for message IDs. - uint64_t next_message_id_; - - // Variables for application use. - const std::string& label_; - const std::string& protocol_; -}; - -} // namespace webrtc - -#endif // WEBRTC_API_QUICDATACHANNEL_H_ diff --git a/WebRtc.NET/include/webrtc/api/quicdatatransport.h b/WebRtc.NET/include/webrtc/api/quicdatatransport.h deleted file mode 100644 index b8d3f84b..00000000 --- a/WebRtc.NET/include/webrtc/api/quicdatatransport.h +++ /dev/null @@ -1,115 +0,0 @@ -/* - * Copyright 2016 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_API_QUICDATATRANSPORT_H_ -#define WEBRTC_API_QUICDATATRANSPORT_H_ - -#include -#include - -#include "webrtc/api/datachannelinterface.h" -#include "webrtc/api/quicdatachannel.h" -#include "webrtc/base/scoped_ref_ptr.h" -#include "webrtc/base/sigslot.h" -#include "webrtc/base/thread.h" -#include "webrtc/p2p/base/transportcontroller.h" - -namespace cricket { -class QuicTransportChannel; -class ReliableQuicStream; -} // namepsace cricket - -namespace webrtc { - -// QuicDataTransport creates QuicDataChannels for the PeerConnection. It also -// handles QUIC stream demuxing by distributing incoming QUIC streams from the -// QuicTransportChannel among the QuicDataChannels that it has created. -// -// QuicDataTransport reads the data channel ID from the incoming QUIC stream, -// then looks it up in a map of ID => QuicDataChannel. If the data channel -// exists, it sends the QUIC stream to the QuicDataChannel. -class QuicDataTransport : public sigslot::has_slots<> { - public: - QuicDataTransport(rtc::Thread* signaling_thread, - rtc::Thread* worker_thread, - rtc::Thread* network_thread, - cricket::TransportController* transport_controller); - ~QuicDataTransport() override; - - // The QuicDataTransport acts like a BaseChannel with these functions. - bool SetTransport(const std::string& transport_name); - const std::string& transport_name() const { return transport_name_; } - const std::string& content_name() const { return content_name_; } - void set_content_name(const std::string& content_name) { - content_name_ = content_name; - } - - // Creates a QuicDataChannel that uses this QuicDataTransport. - rtc::scoped_refptr CreateDataChannel( - const std::string& label, - const DataChannelInit* config); - - // Removes a QuicDataChannel with the given ID from the QuicDataTransport's - // data channel map. - void DestroyDataChannel(int id); - - // True if the QuicDataTransport has a data channel with the given ID. - bool HasDataChannel(int id) const; - - // True if the QuicDataTransport has data channels. - bool HasDataChannels() const; - - cricket::QuicTransportChannel* quic_transport_channel() { - return quic_transport_channel_; - } - - private: - // Sets the QUIC transport channel for the QuicDataChannels and the - // QuicDataTransport. Returns false if a different QUIC transport channel is - // already set, the QUIC transport channel cannot be set for any of the - // QuicDataChannels, or |channel| is NULL. - bool SetTransportChannel(cricket::QuicTransportChannel* channel); - - // Called from the QuicTransportChannel when a ReliableQuicStream is created - // to receive incoming data. - void OnIncomingStream(cricket::ReliableQuicStream* stream); - // Called from the ReliableQuicStream when the first QUIC stream frame is - // received for incoming data. The QuicDataTransport reads the data channel ID - // and message ID from the incoming data, then dispatches the - // ReliableQuicStream to the QuicDataChannel with the same data channel ID. - void OnDataReceived(net::QuicStreamId stream_id, - const char* data, - size_t len); - - cricket::QuicTransportChannel* CreateTransportChannel( - const std::string& transport_name); - void DestroyTransportChannel(cricket::TransportChannel* transport_channel); - - // Map of data channel ID => QUIC data channel values. - std::unordered_map> - data_channel_by_id_; - // Map of QUIC stream ID => ReliableQuicStream* values. - std::unordered_map - quic_stream_by_id_; - // QuicTransportChannel for sending/receiving data. - cricket::QuicTransportChannel* quic_transport_channel_ = nullptr; - // Threads for the QUIC data channel. - rtc::Thread* const signaling_thread_; - rtc::Thread* const worker_thread_; - rtc::Thread* const network_thread_; - - cricket::TransportController* transport_controller_; - std::string content_name_; - std::string transport_name_; -}; - -} // namespace webrtc - -#endif // WEBRTC_API_QUICDATATRANSPORT_H_ diff --git a/WebRtc.NET/include/webrtc/api/remoteaudiosource.h b/WebRtc.NET/include/webrtc/api/remoteaudiosource.h deleted file mode 100644 index a67b8955..00000000 --- a/WebRtc.NET/include/webrtc/api/remoteaudiosource.h +++ /dev/null @@ -1,76 +0,0 @@ -/* - * Copyright 2014 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_API_REMOTEAUDIOSOURCE_H_ -#define WEBRTC_API_REMOTEAUDIOSOURCE_H_ - -#include -#include - -#include "webrtc/api/call/audio_sink.h" -#include "webrtc/api/notifier.h" -#include "webrtc/base/criticalsection.h" -#include "webrtc/pc/channel.h" - -namespace rtc { -struct Message; -class Thread; -} // namespace rtc - -namespace webrtc { - -// This class implements the audio source used by the remote audio track. -class RemoteAudioSource : public Notifier { - public: - // Creates an instance of RemoteAudioSource. - static rtc::scoped_refptr Create( - uint32_t ssrc, - cricket::VoiceChannel* channel); - - // MediaSourceInterface implementation. - MediaSourceInterface::SourceState state() const override; - bool remote() const override; - - void AddSink(AudioTrackSinkInterface* sink) override; - void RemoveSink(AudioTrackSinkInterface* sink) override; - - protected: - RemoteAudioSource(); - ~RemoteAudioSource() override; - - // Post construction initialize where we can do things like save a reference - // to ourselves (need to be fully constructed). - void Initialize(uint32_t ssrc, cricket::VoiceChannel* channel); - - private: - typedef std::list AudioObserverList; - - // AudioSourceInterface implementation. - void SetVolume(double volume) override; - void RegisterAudioObserver(AudioObserver* observer) override; - void UnregisterAudioObserver(AudioObserver* observer) override; - - class Sink; - void OnData(const AudioSinkInterface::Data& audio); - void OnAudioChannelGone(); - - class MessageHandler; - void OnMessage(rtc::Message* msg); - - AudioObserverList audio_observers_; - rtc::CriticalSection sink_lock_; - std::list sinks_; - rtc::Thread* const main_thread_; - SourceState state_; -}; - -} // namespace webrtc - -#endif // WEBRTC_API_REMOTEAUDIOSOURCE_H_ diff --git a/WebRtc.NET/include/webrtc/api/rtcstatscollector.h b/WebRtc.NET/include/webrtc/api/rtcstatscollector.h deleted file mode 100644 index cd3c55ee..00000000 --- a/WebRtc.NET/include/webrtc/api/rtcstatscollector.h +++ /dev/null @@ -1,200 +0,0 @@ -/* - * Copyright 2016 The WebRTC Project Authors. All rights reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_API_RTCSTATSCOLLECTOR_H_ -#define WEBRTC_API_RTCSTATSCOLLECTOR_H_ - -#include -#include -#include -#include - -#include "webrtc/api/datachannel.h" -#include "webrtc/api/datachannelinterface.h" -#include "webrtc/api/stats/rtcstats_objects.h" -#include "webrtc/api/stats/rtcstatsreport.h" -#include "webrtc/api/trackmediainfomap.h" -#include "webrtc/base/asyncinvoker.h" -#include "webrtc/base/optional.h" -#include "webrtc/base/refcount.h" -#include "webrtc/base/scoped_ref_ptr.h" -#include "webrtc/base/sigslot.h" -#include "webrtc/base/sslidentity.h" -#include "webrtc/base/timeutils.h" -#include "webrtc/media/base/mediachannel.h" - -namespace cricket { -class Candidate; -} // namespace cricket - -namespace rtc { -class SSLCertificate; -} // namespace rtc - -namespace webrtc { - -class PeerConnection; -struct SessionStats; -struct ChannelNamePairs; - -class RTCStatsCollectorCallback : public virtual rtc::RefCountInterface { - public: - virtual ~RTCStatsCollectorCallback() {} - - virtual void OnStatsDelivered( - const rtc::scoped_refptr& report) = 0; -}; - -// All public methods of the collector are to be called on the signaling thread. -// Stats are gathered on the signaling, worker and network threads -// asynchronously. The callback is invoked on the signaling thread. Resulting -// reports are cached for |cache_lifetime_| ms. -class RTCStatsCollector : public virtual rtc::RefCountInterface, - public sigslot::has_slots<> { - public: - static rtc::scoped_refptr Create( - PeerConnection* pc, - int64_t cache_lifetime_us = 50 * rtc::kNumMicrosecsPerMillisec); - - // Gets a recent stats report. If there is a report cached that is still fresh - // it is returned, otherwise new stats are gathered and returned. A report is - // considered fresh for |cache_lifetime_| ms. const RTCStatsReports are safe - // to use across multiple threads and may be destructed on any thread. - void GetStatsReport(rtc::scoped_refptr callback); - // Clears the cache's reference to the most recent stats report. Subsequently - // calling |GetStatsReport| guarantees fresh stats. - void ClearCachedStatsReport(); - - // If there is a |GetStatsReport| requests in-flight, waits until it has been - // completed. Must be called on the signaling thread. - void WaitForPendingRequest(); - - protected: - RTCStatsCollector(PeerConnection* pc, int64_t cache_lifetime_us); - ~RTCStatsCollector(); - - // Stats gathering on a particular thread. Calls |AddPartialResults| before - // returning. Virtual for the sake of testing. - virtual void ProducePartialResultsOnSignalingThread(int64_t timestamp_us); - virtual void ProducePartialResultsOnNetworkThread(int64_t timestamp_us); - - // Can be called on any thread. - void AddPartialResults( - const rtc::scoped_refptr& partial_report); - - private: - struct CertificateStatsPair { - std::unique_ptr local; - std::unique_ptr remote; - }; - - void AddPartialResults_s(rtc::scoped_refptr partial_report); - void DeliverCachedReport(); - - // Produces |RTCCertificateStats|. - void ProduceCertificateStats_n( - int64_t timestamp_us, - const std::map& transport_cert_stats, - RTCStatsReport* report) const; - // Produces |RTCCodecStats|. - void ProduceCodecStats_n( - int64_t timestamp_us, const TrackMediaInfoMap& track_media_info_map, - RTCStatsReport* report) const; - // Produces |RTCDataChannelStats|. - void ProduceDataChannelStats_s( - int64_t timestamp_us, RTCStatsReport* report) const; - // Produces |RTCIceCandidatePairStats| and |RTCIceCandidateStats|. - void ProduceIceCandidateAndPairStats_n( - int64_t timestamp_us, const SessionStats& session_stats, - RTCStatsReport* report) const; - // Produces |RTCMediaStreamStats| and |RTCMediaStreamTrackStats|. - void ProduceMediaStreamAndTrackStats_s( - int64_t timestamp_us, RTCStatsReport* report) const; - // Produces |RTCPeerConnectionStats|. - void ProducePeerConnectionStats_s( - int64_t timestamp_us, RTCStatsReport* report) const; - // Produces |RTCInboundRTPStreamStats| and |RTCOutboundRTPStreamStats|. - void ProduceRTPStreamStats_n( - int64_t timestamp_us, const SessionStats& session_stats, - const TrackMediaInfoMap& track_media_info_map, - RTCStatsReport* report) const; - // Produces |RTCTransportStats|. - void ProduceTransportStats_n( - int64_t timestamp_us, const SessionStats& session_stats, - const std::map& transport_cert_stats, - RTCStatsReport* report) const; - - // Helper function to stats-producing functions. - std::map - PrepareTransportCertificateStats_n(const SessionStats& session_stats) const; - std::unique_ptr PrepareTrackMediaInfoMap_s() const; - std::map PrepareTrackToID_s() const; - - // Slots for signals (sigslot) that are wired up to |pc_|. - void OnDataChannelCreated(DataChannel* channel); - // Slots for signals (sigslot) that are wired up to |channel|. - void OnDataChannelOpened(DataChannel* channel); - void OnDataChannelClosed(DataChannel* channel); - - PeerConnection* const pc_; - rtc::Thread* const signaling_thread_; - rtc::Thread* const worker_thread_; - rtc::Thread* const network_thread_; - rtc::AsyncInvoker invoker_; - - int num_pending_partial_reports_; - int64_t partial_report_timestamp_us_; - rtc::scoped_refptr partial_report_; - std::vector> callbacks_; - - // Set in |GetStatsReport|, read in |ProducePartialResultsOnNetworkThread| and - // |ProducePartialResultsOnSignalingThread|, reset after work is complete. Not - // passed as arguments to avoid copies. This is thread safe - when we - // set/reset we know there are no pending stats requests in progress. - std::unique_ptr channel_name_pairs_; - std::unique_ptr track_media_info_map_; - std::map track_to_id_; - - // A timestamp, in microseconds, that is based on a timer that is - // monotonically increasing. That is, even if the system clock is modified the - // difference between the timer and this timestamp is how fresh the cached - // report is. - int64_t cache_timestamp_us_; - int64_t cache_lifetime_us_; - rtc::scoped_refptr cached_report_; - - // Data recorded and maintained by the stats collector during its lifetime. - // Some stats are produced from this record instead of other components. - struct InternalRecord { - InternalRecord() : data_channels_opened(0), - data_channels_closed(0) {} - - // The opened count goes up when a channel is fully opened and the closed - // count goes up if a previously opened channel has fully closed. The opened - // count does not go down when a channel closes, meaning (opened - closed) - // is the number of channels currently opened. A channel that is closed - // before reaching the open state does not affect these counters. - uint32_t data_channels_opened; - uint32_t data_channels_closed; - // Identifies by address channels that have been opened, which remain in the - // set until they have been fully closed. - std::set opened_data_channels; - }; - InternalRecord internal_record_; -}; - -const char* CandidateTypeToRTCIceCandidateTypeForTesting( - const std::string& type); -const char* DataStateToRTCDataChannelStateForTesting( - DataChannelInterface::DataState state); - -} // namespace webrtc - -#endif // WEBRTC_API_RTCSTATSCOLLECTOR_H_ diff --git a/WebRtc.NET/include/webrtc/api/rtpparameters.h b/WebRtc.NET/include/webrtc/api/rtpparameters.h deleted file mode 100644 index 13704dc1..00000000 --- a/WebRtc.NET/include/webrtc/api/rtpparameters.h +++ /dev/null @@ -1,63 +0,0 @@ -/* - * Copyright 2015 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_API_RTPPARAMETERS_H_ -#define WEBRTC_API_RTPPARAMETERS_H_ - -#include -#include - -#include "webrtc/base/optional.h" - -namespace webrtc { - -// These structures are defined as part of the RtpSender interface. -// See http://w3c.github.io/webrtc-pc/#rtcrtpsender-interface for details. -struct RtpEncodingParameters { - rtc::Optional ssrc; - bool active = true; - int max_bitrate_bps = -1; - - bool operator==(const RtpEncodingParameters& o) const { - return ssrc == o.ssrc && active == o.active && - max_bitrate_bps == o.max_bitrate_bps; - } - bool operator!=(const RtpEncodingParameters& o) const { - return !(*this == o); - } -}; - -struct RtpCodecParameters { - int payload_type; - std::string mime_type; - int clock_rate; - int channels = 1; - // TODO(deadbeef): Add sdpFmtpLine field. - - bool operator==(const RtpCodecParameters& o) const { - return payload_type == o.payload_type && mime_type == o.mime_type && - clock_rate == o.clock_rate && channels == o.channels; - } - bool operator!=(const RtpCodecParameters& o) const { return !(*this == o); } -}; - -struct RtpParameters { - std::vector encodings; - std::vector codecs; - - bool operator==(const RtpParameters& o) const { - return encodings == o.encodings && codecs == o.codecs; - } - bool operator!=(const RtpParameters& o) const { return !(*this == o); } -}; - -} // namespace webrtc - -#endif // WEBRTC_API_RTPPARAMETERS_H_ diff --git a/WebRtc.NET/include/webrtc/api/rtpreceiver.h b/WebRtc.NET/include/webrtc/api/rtpreceiver.h deleted file mode 100644 index b6807c43..00000000 --- a/WebRtc.NET/include/webrtc/api/rtpreceiver.h +++ /dev/null @@ -1,157 +0,0 @@ -/* - * Copyright 2015 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -// This file contains classes that implement RtpReceiverInterface. -// An RtpReceiver associates a MediaStreamTrackInterface with an underlying -// transport (provided by cricket::VoiceChannel/cricket::VideoChannel) - -#ifndef WEBRTC_API_RTPRECEIVER_H_ -#define WEBRTC_API_RTPRECEIVER_H_ - -#include - -#include - -#include "webrtc/api/mediastreaminterface.h" -#include "webrtc/api/rtpreceiverinterface.h" -#include "webrtc/api/remoteaudiosource.h" -#include "webrtc/api/videotracksource.h" -#include "webrtc/base/sigslot.h" -#include "webrtc/media/base/videobroadcaster.h" -#include "webrtc/pc/channel.h" - -namespace webrtc { - -// Internal class used by PeerConnection. -class RtpReceiverInternal : public RtpReceiverInterface { - public: - virtual void Stop() = 0; -}; - -class AudioRtpReceiver : public ObserverInterface, - public AudioSourceInterface::AudioObserver, - public rtc::RefCountedObject, - public sigslot::has_slots<> { - public: - AudioRtpReceiver(MediaStreamInterface* stream, - const std::string& track_id, - uint32_t ssrc, - cricket::VoiceChannel* channel); - - virtual ~AudioRtpReceiver(); - - // ObserverInterface implementation - void OnChanged() override; - - // AudioSourceInterface::AudioObserver implementation - void OnSetVolume(double volume) override; - - rtc::scoped_refptr audio_track() const { - return track_.get(); - } - - // RtpReceiverInterface implementation - rtc::scoped_refptr track() const override { - return track_.get(); - } - - cricket::MediaType media_type() const override { - return cricket::MEDIA_TYPE_AUDIO; - } - - std::string id() const override { return id_; } - - RtpParameters GetParameters() const override; - bool SetParameters(const RtpParameters& parameters) override; - - // RtpReceiverInternal implementation. - void Stop() override; - - void SetObserver(RtpReceiverObserverInterface* observer) override; - - // Does not take ownership. - // Should call SetChannel(nullptr) before |channel| is destroyed. - void SetChannel(cricket::VoiceChannel* channel); - - private: - void Reconfigure(); - void OnFirstPacketReceived(cricket::BaseChannel* channel); - - const std::string id_; - const uint32_t ssrc_; - cricket::VoiceChannel* channel_; - const rtc::scoped_refptr track_; - bool cached_track_enabled_; - double cached_volume_ = 1; - bool stopped_ = false; - RtpReceiverObserverInterface* observer_ = nullptr; - bool received_first_packet_ = false; -}; - -class VideoRtpReceiver : public rtc::RefCountedObject, - public sigslot::has_slots<> { - public: - VideoRtpReceiver(MediaStreamInterface* stream, - const std::string& track_id, - rtc::Thread* worker_thread, - uint32_t ssrc, - cricket::VideoChannel* channel); - - virtual ~VideoRtpReceiver(); - - rtc::scoped_refptr video_track() const { - return track_.get(); - } - - // RtpReceiverInterface implementation - rtc::scoped_refptr track() const override { - return track_.get(); - } - - cricket::MediaType media_type() const override { - return cricket::MEDIA_TYPE_VIDEO; - } - - std::string id() const override { return id_; } - - RtpParameters GetParameters() const override; - bool SetParameters(const RtpParameters& parameters) override; - - // RtpReceiverInternal implementation. - void Stop() override; - - void SetObserver(RtpReceiverObserverInterface* observer) override; - - // Does not take ownership. - // Should call SetChannel(nullptr) before |channel| is destroyed. - void SetChannel(cricket::VideoChannel* channel); - - private: - void OnFirstPacketReceived(cricket::BaseChannel* channel); - - std::string id_; - uint32_t ssrc_; - cricket::VideoChannel* channel_; - // |broadcaster_| is needed since the decoder can only handle one sink. - // It might be better if the decoder can handle multiple sinks and consider - // the VideoSinkWants. - rtc::VideoBroadcaster broadcaster_; - // |source_| is held here to be able to change the state of the source when - // the VideoRtpReceiver is stopped. - rtc::scoped_refptr source_; - rtc::scoped_refptr track_; - bool stopped_ = false; - RtpReceiverObserverInterface* observer_ = nullptr; - bool received_first_packet_ = false; -}; - -} // namespace webrtc - -#endif // WEBRTC_API_RTPRECEIVER_H_ diff --git a/WebRtc.NET/include/webrtc/api/rtpreceiverinterface.h b/WebRtc.NET/include/webrtc/api/rtpreceiverinterface.h deleted file mode 100644 index 103df473..00000000 --- a/WebRtc.NET/include/webrtc/api/rtpreceiverinterface.h +++ /dev/null @@ -1,80 +0,0 @@ -/* - * Copyright 2015 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -// This file contains interfaces for RtpReceivers -// http://w3c.github.io/webrtc-pc/#rtcrtpreceiver-interface - -#ifndef WEBRTC_API_RTPRECEIVERINTERFACE_H_ -#define WEBRTC_API_RTPRECEIVERINTERFACE_H_ - -#include - -#include "webrtc/api/mediastreaminterface.h" -#include "webrtc/api/proxy.h" -#include "webrtc/api/rtpparameters.h" -#include "webrtc/base/refcount.h" -#include "webrtc/base/scoped_ref_ptr.h" -#include "webrtc/pc/mediasession.h" - -namespace webrtc { - -class RtpReceiverObserverInterface { - public: - // Note: Currently if there are multiple RtpReceivers of the same media type, - // they will all call OnFirstPacketReceived at once. - // - // In the future, it's likely that an RtpReceiver will only call - // OnFirstPacketReceived when a packet is received specifically for its - // SSRC/mid. - virtual void OnFirstPacketReceived(cricket::MediaType media_type) = 0; - - protected: - virtual ~RtpReceiverObserverInterface() {} -}; - -class RtpReceiverInterface : public rtc::RefCountInterface { - public: - virtual rtc::scoped_refptr track() const = 0; - - // Audio or video receiver? - virtual cricket::MediaType media_type() const = 0; - - // Not to be confused with "mid", this is a field we can temporarily use - // to uniquely identify a receiver until we implement Unified Plan SDP. - virtual std::string id() const = 0; - - // The WebRTC specification only defines RTCRtpParameters in terms of senders, - // but this API also applies them to receivers, similar to ORTC: - // http://ortc.org/wp-content/uploads/2016/03/ortc.html#rtcrtpparameters*. - virtual RtpParameters GetParameters() const = 0; - virtual bool SetParameters(const RtpParameters& parameters) = 0; - - // Does not take ownership of observer. - // Must call SetObserver(nullptr) before the observer is destroyed. - virtual void SetObserver(RtpReceiverObserverInterface* observer) = 0; - - protected: - virtual ~RtpReceiverInterface() {} -}; - -// Define proxy for RtpReceiverInterface. -BEGIN_SIGNALING_PROXY_MAP(RtpReceiver) - PROXY_SIGNALING_THREAD_DESTRUCTOR() - PROXY_CONSTMETHOD0(rtc::scoped_refptr, track) - PROXY_CONSTMETHOD0(cricket::MediaType, media_type) - PROXY_CONSTMETHOD0(std::string, id) - PROXY_CONSTMETHOD0(RtpParameters, GetParameters); - PROXY_METHOD1(bool, SetParameters, const RtpParameters&) - PROXY_METHOD1(void, SetObserver, RtpReceiverObserverInterface*); -END_PROXY_MAP() - -} // namespace webrtc - -#endif // WEBRTC_API_RTPRECEIVERINTERFACE_H_ diff --git a/WebRtc.NET/include/webrtc/api/rtpsender.h b/WebRtc.NET/include/webrtc/api/rtpsender.h deleted file mode 100644 index 6c059214..00000000 --- a/WebRtc.NET/include/webrtc/api/rtpsender.h +++ /dev/null @@ -1,235 +0,0 @@ -/* - * Copyright 2015 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -// This file contains classes that implement RtpSenderInterface. -// An RtpSender associates a MediaStreamTrackInterface with an underlying -// transport (provided by AudioProviderInterface/VideoProviderInterface) - -#ifndef WEBRTC_API_RTPSENDER_H_ -#define WEBRTC_API_RTPSENDER_H_ - -#include -#include - -#include "webrtc/api/mediastreaminterface.h" -#include "webrtc/api/rtpsenderinterface.h" -#include "webrtc/api/statscollector.h" -#include "webrtc/base/basictypes.h" -#include "webrtc/base/criticalsection.h" -#include "webrtc/media/base/audiosource.h" -#include "webrtc/pc/channel.h" - -namespace webrtc { - -// Internal interface used by PeerConnection. -class RtpSenderInternal : public RtpSenderInterface { - public: - // Used to set the SSRC of the sender, once a local description has been set. - // If |ssrc| is 0, this indiates that the sender should disconnect from the - // underlying transport (this occurs if the sender isn't seen in a local - // description). - virtual void SetSsrc(uint32_t ssrc) = 0; - - // TODO(deadbeef): Support one sender having multiple stream ids. - virtual void set_stream_id(const std::string& stream_id) = 0; - virtual std::string stream_id() const = 0; - - virtual void Stop() = 0; -}; - -// LocalAudioSinkAdapter receives data callback as a sink to the local -// AudioTrack, and passes the data to the sink of AudioSource. -class LocalAudioSinkAdapter : public AudioTrackSinkInterface, - public cricket::AudioSource { - public: - LocalAudioSinkAdapter(); - virtual ~LocalAudioSinkAdapter(); - - private: - // AudioSinkInterface implementation. - void OnData(const void* audio_data, - int bits_per_sample, - int sample_rate, - size_t number_of_channels, - size_t number_of_frames) override; - - // cricket::AudioSource implementation. - void SetSink(cricket::AudioSource::Sink* sink) override; - - cricket::AudioSource::Sink* sink_; - // Critical section protecting |sink_|. - rtc::CriticalSection lock_; -}; - -class AudioRtpSender : public ObserverInterface, - public rtc::RefCountedObject { - public: - // StatsCollector provided so that Add/RemoveLocalAudioTrack can be called - // at the appropriate times. - // |channel| can be null if one does not exist yet. - AudioRtpSender(AudioTrackInterface* track, - const std::string& stream_id, - cricket::VoiceChannel* channel, - StatsCollector* stats); - - // Randomly generates stream_id. - // |channel| can be null if one does not exist yet. - AudioRtpSender(AudioTrackInterface* track, - cricket::VoiceChannel* channel, - StatsCollector* stats); - - // Randomly generates id and stream_id. - // |channel| can be null if one does not exist yet. - AudioRtpSender(cricket::VoiceChannel* channel, StatsCollector* stats); - - virtual ~AudioRtpSender(); - - // ObserverInterface implementation - void OnChanged() override; - - // RtpSenderInterface implementation - bool SetTrack(MediaStreamTrackInterface* track) override; - rtc::scoped_refptr track() const override { - return track_; - } - - uint32_t ssrc() const override { return ssrc_; } - - cricket::MediaType media_type() const override { - return cricket::MEDIA_TYPE_AUDIO; - } - - std::string id() const override { return id_; } - - std::vector stream_ids() const override { - std::vector ret = {stream_id_}; - return ret; - } - - RtpParameters GetParameters() const override; - bool SetParameters(const RtpParameters& parameters) override; - - // RtpSenderInternal implementation. - void SetSsrc(uint32_t ssrc) override; - - void set_stream_id(const std::string& stream_id) override { - stream_id_ = stream_id; - } - std::string stream_id() const override { return stream_id_; } - - void Stop() override; - - // Does not take ownership. - // Should call SetChannel(nullptr) before |channel| is destroyed. - void SetChannel(cricket::VoiceChannel* channel) { channel_ = channel; } - - private: - // TODO(nisse): Since SSRC == 0 is technically valid, figure out - // some other way to test if we have a valid SSRC. - bool can_send_track() const { return track_ && ssrc_; } - // Helper function to construct options for - // AudioProviderInterface::SetAudioSend. - void SetAudioSend(); - // Helper function to call SetAudioSend with "stop sending" parameters. - void ClearAudioSend(); - - std::string id_; - std::string stream_id_; - cricket::VoiceChannel* channel_ = nullptr; - StatsCollector* stats_; - rtc::scoped_refptr track_; - uint32_t ssrc_ = 0; - bool cached_track_enabled_ = false; - bool stopped_ = false; - - // Used to pass the data callback from the |track_| to the other end of - // cricket::AudioSource. - std::unique_ptr sink_adapter_; -}; - -class VideoRtpSender : public ObserverInterface, - public rtc::RefCountedObject { - public: - // |channel| can be null if one does not exist yet. - VideoRtpSender(VideoTrackInterface* track, - const std::string& stream_id, - cricket::VideoChannel* channel); - - // Randomly generates stream_id. - // |channel| can be null if one does not exist yet. - VideoRtpSender(VideoTrackInterface* track, cricket::VideoChannel* channel); - - // Randomly generates id and stream_id. - // |channel| can be null if one does not exist yet. - explicit VideoRtpSender(cricket::VideoChannel* channel); - - virtual ~VideoRtpSender(); - - // ObserverInterface implementation - void OnChanged() override; - - // RtpSenderInterface implementation - bool SetTrack(MediaStreamTrackInterface* track) override; - rtc::scoped_refptr track() const override { - return track_; - } - - uint32_t ssrc() const override { return ssrc_; } - - cricket::MediaType media_type() const override { - return cricket::MEDIA_TYPE_VIDEO; - } - - std::string id() const override { return id_; } - - std::vector stream_ids() const override { - std::vector ret = {stream_id_}; - return ret; - } - - RtpParameters GetParameters() const override; - bool SetParameters(const RtpParameters& parameters) override; - - // RtpSenderInternal implementation. - void SetSsrc(uint32_t ssrc) override; - - void set_stream_id(const std::string& stream_id) override { - stream_id_ = stream_id; - } - std::string stream_id() const override { return stream_id_; } - - void Stop() override; - - // Does not take ownership. - // Should call SetChannel(nullptr) before |channel| is destroyed. - void SetChannel(cricket::VideoChannel* channel) { channel_ = channel; } - - private: - bool can_send_track() const { return track_ && ssrc_; } - // Helper function to construct options for - // VideoProviderInterface::SetVideoSend. - void SetVideoSend(); - // Helper function to call SetVideoSend with "stop sending" parameters. - void ClearVideoSend(); - - std::string id_; - std::string stream_id_; - cricket::VideoChannel* channel_ = nullptr; - rtc::scoped_refptr track_; - uint32_t ssrc_ = 0; - bool cached_track_enabled_ = false; - VideoTrackInterface::ContentHint cached_track_content_hint_ = - VideoTrackInterface::ContentHint::kNone; - bool stopped_ = false; -}; - -} // namespace webrtc - -#endif // WEBRTC_API_RTPSENDER_H_ diff --git a/WebRtc.NET/include/webrtc/api/rtpsenderinterface.h b/WebRtc.NET/include/webrtc/api/rtpsenderinterface.h deleted file mode 100644 index 2e6b7427..00000000 --- a/WebRtc.NET/include/webrtc/api/rtpsenderinterface.h +++ /dev/null @@ -1,73 +0,0 @@ -/* - * Copyright 2015 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -// This file contains interfaces for RtpSenders -// http://w3c.github.io/webrtc-pc/#rtcrtpsender-interface - -#ifndef WEBRTC_API_RTPSENDERINTERFACE_H_ -#define WEBRTC_API_RTPSENDERINTERFACE_H_ - -#include -#include - -#include "webrtc/api/mediastreaminterface.h" -#include "webrtc/api/proxy.h" -#include "webrtc/api/rtpparameters.h" -#include "webrtc/base/refcount.h" -#include "webrtc/base/scoped_ref_ptr.h" -#include "webrtc/pc/mediasession.h" - -namespace webrtc { - -class RtpSenderInterface : public rtc::RefCountInterface { - public: - // Returns true if successful in setting the track. - // Fails if an audio track is set on a video RtpSender, or vice-versa. - virtual bool SetTrack(MediaStreamTrackInterface* track) = 0; - virtual rtc::scoped_refptr track() const = 0; - - // Returns primary SSRC used by this sender for sending media. - // Returns 0 if not yet determined. - // TODO(deadbeef): Change to rtc::Optional. - // TODO(deadbeef): Remove? With GetParameters this should be redundant. - virtual uint32_t ssrc() const = 0; - - // Audio or video sender? - virtual cricket::MediaType media_type() const = 0; - - // Not to be confused with "mid", this is a field we can temporarily use - // to uniquely identify a receiver until we implement Unified Plan SDP. - virtual std::string id() const = 0; - - virtual std::vector stream_ids() const = 0; - - virtual RtpParameters GetParameters() const = 0; - virtual bool SetParameters(const RtpParameters& parameters) = 0; - - protected: - virtual ~RtpSenderInterface() {} -}; - -// Define proxy for RtpSenderInterface. -BEGIN_SIGNALING_PROXY_MAP(RtpSender) - PROXY_SIGNALING_THREAD_DESTRUCTOR() - PROXY_METHOD1(bool, SetTrack, MediaStreamTrackInterface*) - PROXY_CONSTMETHOD0(rtc::scoped_refptr, track) - PROXY_CONSTMETHOD0(uint32_t, ssrc) - PROXY_CONSTMETHOD0(cricket::MediaType, media_type) - PROXY_CONSTMETHOD0(std::string, id) - PROXY_CONSTMETHOD0(std::vector, stream_ids) - PROXY_CONSTMETHOD0(RtpParameters, GetParameters); - PROXY_METHOD1(bool, SetParameters, const RtpParameters&) -END_PROXY_MAP() - -} // namespace webrtc - -#endif // WEBRTC_API_RTPSENDERINTERFACE_H_ diff --git a/WebRtc.NET/include/webrtc/api/stats/rtcstats_objects.h b/WebRtc.NET/include/webrtc/api/stats/rtcstats_objects.h deleted file mode 100644 index 3bbe228c..00000000 --- a/WebRtc.NET/include/webrtc/api/stats/rtcstats_objects.h +++ /dev/null @@ -1,421 +0,0 @@ -/* - * Copyright 2016 The WebRTC Project Authors. All rights reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_API_STATS_RTCSTATS_OBJECTS_H_ -#define WEBRTC_API_STATS_RTCSTATS_OBJECTS_H_ - -#include - -#include "webrtc/api/stats/rtcstats.h" - -namespace webrtc { - -// https://w3c.github.io/webrtc-pc/#idl-def-rtcdatachannelstate -struct RTCDataChannelState { - static const char* kConnecting; - static const char* kOpen; - static const char* kClosing; - static const char* kClosed; -}; - -// https://w3c.github.io/webrtc-stats/#dom-rtcstatsicecandidatepairstate -struct RTCStatsIceCandidatePairState { - static const char* kFrozen; - static const char* kWaiting; - static const char* kInProgress; - static const char* kFailed; - static const char* kSucceeded; -}; - -// https://w3c.github.io/webrtc-pc/#rtcicecandidatetype-enum -struct RTCIceCandidateType { - static const char* kHost; - static const char* kSrflx; - static const char* kPrflx; - static const char* kRelay; -}; - -// https://w3c.github.io/webrtc-pc/#idl-def-rtcdtlstransportstate -struct RTCDtlsTransportState { - static const char* kNew; - static const char* kConnecting; - static const char* kConnected; - static const char* kClosed; - static const char* kFailed; -}; - -// |RTCMediaStreamTrackStats::kind| is not an enum in the spec but the only -// valid values are "audio" and "video". -// https://w3c.github.io/webrtc-stats/#dom-rtcmediastreamtrackstats-kind -struct RTCMediaStreamTrackKind { - static const char* kAudio; - static const char* kVideo; -}; - -// https://w3c.github.io/webrtc-stats/#certificatestats-dict* -class RTCCertificateStats final : public RTCStats { - public: - WEBRTC_RTCSTATS_DECL(); - - RTCCertificateStats(const std::string& id, int64_t timestamp_us); - RTCCertificateStats(std::string&& id, int64_t timestamp_us); - RTCCertificateStats(const RTCCertificateStats& other); - ~RTCCertificateStats() override; - - RTCStatsMember fingerprint; - RTCStatsMember fingerprint_algorithm; - RTCStatsMember base64_certificate; - RTCStatsMember issuer_certificate_id; -}; - -// https://w3c.github.io/webrtc-stats/#codec-dict* -// Tracking bug crbug.com/659117 -// TODO(hbos): The present codec ID assignment is not sufficient to support -// Unified Plan or unbundled connections in all cases. crbug.com/659117 -class RTCCodecStats final : public RTCStats { - public: - WEBRTC_RTCSTATS_DECL(); - - RTCCodecStats(const std::string& id, int64_t timestamp_us); - RTCCodecStats(std::string&& id, int64_t timestamp_us); - RTCCodecStats(const RTCCodecStats& other); - ~RTCCodecStats() override; - - RTCStatsMember payload_type; - RTCStatsMember codec; - RTCStatsMember clock_rate; - // TODO(hbos): Not collected by |RTCStatsCollector|. crbug.com/659117 - RTCStatsMember channels; - // TODO(hbos): Not collected by |RTCStatsCollector|. crbug.com/659117 - RTCStatsMember parameters; - // TODO(hbos): Not collected by |RTCStatsCollector|. crbug.com/659117 - RTCStatsMember implementation; -}; - -// https://w3c.github.io/webrtc-stats/#dcstats-dict* -class RTCDataChannelStats final : public RTCStats { - public: - WEBRTC_RTCSTATS_DECL(); - - RTCDataChannelStats(const std::string& id, int64_t timestamp_us); - RTCDataChannelStats(std::string&& id, int64_t timestamp_us); - RTCDataChannelStats(const RTCDataChannelStats& other); - ~RTCDataChannelStats() override; - - RTCStatsMember label; - RTCStatsMember protocol; - RTCStatsMember datachannelid; - // TODO(hbos): Support enum types? "RTCStatsMember"? - RTCStatsMember state; - RTCStatsMember messages_sent; - RTCStatsMember bytes_sent; - RTCStatsMember messages_received; - RTCStatsMember bytes_received; -}; - -// https://w3c.github.io/webrtc-stats/#candidatepair-dict* -// TODO(hbos): Tracking bug crbug.com/633550 -class RTCIceCandidatePairStats final : public RTCStats { - public: - WEBRTC_RTCSTATS_DECL(); - - RTCIceCandidatePairStats(const std::string& id, int64_t timestamp_us); - RTCIceCandidatePairStats(std::string&& id, int64_t timestamp_us); - RTCIceCandidatePairStats(const RTCIceCandidatePairStats& other); - ~RTCIceCandidatePairStats() override; - - RTCStatsMember transport_id; - RTCStatsMember local_candidate_id; - RTCStatsMember remote_candidate_id; - // TODO(hbos): Support enum types? - // "RTCStatsMember"? - RTCStatsMember state; - RTCStatsMember priority; - // TODO(hbos): Not collected by |RTCStatsCollector|. crbug.com/633550 - RTCStatsMember nominated; - // TODO(hbos): Collected by |RTCStatsCollector| but different than the spec. - // crbug.com/633550 - RTCStatsMember writable; - // TODO(hbos): Not collected by |RTCStatsCollector|. crbug.com/633550 - RTCStatsMember readable; - RTCStatsMember bytes_sent; - RTCStatsMember bytes_received; - // TODO(hbos): Not collected by |RTCStatsCollector|. crbug.com/633550 - RTCStatsMember total_round_trip_time; - // TODO(hbos): Collected by |RTCStatsCollector| but different than the spec. - // crbug.com/633550 - RTCStatsMember current_round_trip_time; - // TODO(hbos): Not collected by |RTCStatsCollector|. crbug.com/633550 - RTCStatsMember available_outgoing_bitrate; - // TODO(hbos): Not collected by |RTCStatsCollector|. crbug.com/633550 - RTCStatsMember available_incoming_bitrate; - RTCStatsMember requests_received; - RTCStatsMember requests_sent; - RTCStatsMember responses_received; - RTCStatsMember responses_sent; - // TODO(hbos): Not collected by |RTCStatsCollector|. crbug.com/633550 - RTCStatsMember retransmissions_received; - // TODO(hbos): Not collected by |RTCStatsCollector|. crbug.com/633550 - RTCStatsMember retransmissions_sent; - // TODO(hbos): Not collected by |RTCStatsCollector|. crbug.com/633550 - RTCStatsMember consent_requests_received; - RTCStatsMember consent_requests_sent; - // TODO(hbos): Not collected by |RTCStatsCollector|. crbug.com/633550 - RTCStatsMember consent_responses_received; - // TODO(hbos): Not collected by |RTCStatsCollector|. crbug.com/633550 - RTCStatsMember consent_responses_sent; -}; - -// https://w3c.github.io/webrtc-stats/#icecandidate-dict* -// TODO(hbos): |RTCStatsCollector| only collects candidates that are part of -// ice candidate pairs, but there could be candidates not paired with anything. -// crbug.com/632723 -class RTCIceCandidateStats : public RTCStats { - public: - WEBRTC_RTCSTATS_DECL(); - - RTCIceCandidateStats(const RTCIceCandidateStats& other); - ~RTCIceCandidateStats() override; - - RTCStatsMember transport_id; - RTCStatsMember is_remote; - RTCStatsMember ip; - RTCStatsMember port; - RTCStatsMember protocol; - // TODO(hbos): Support enum types? "RTCStatsMember"? - RTCStatsMember candidate_type; - RTCStatsMember priority; - // TODO(hbos): Not collected by |RTCStatsCollector|. crbug.com/632723 - RTCStatsMember url; - // TODO(hbos): |deleted = true| case is not supported by |RTCStatsCollector|. - // crbug.com/632723 - RTCStatsMember deleted; // = false - - protected: - RTCIceCandidateStats( - const std::string& id, int64_t timestamp_us, bool is_remote); - RTCIceCandidateStats(std::string&& id, int64_t timestamp_us, bool is_remote); -}; - -// In the spec both local and remote varieties are of type RTCIceCandidateStats. -// But here we define them as subclasses of |RTCIceCandidateStats| because the -// |kType| need to be different ("RTCStatsType type") in the local/remote case. -// https://w3c.github.io/webrtc-stats/#rtcstatstype-str* -class RTCLocalIceCandidateStats final : public RTCIceCandidateStats { - public: - static const char kType[]; - RTCLocalIceCandidateStats(const std::string& id, int64_t timestamp_us); - RTCLocalIceCandidateStats(std::string&& id, int64_t timestamp_us); - const char* type() const override; -}; - -class RTCRemoteIceCandidateStats final : public RTCIceCandidateStats { - public: - static const char kType[]; - RTCRemoteIceCandidateStats(const std::string& id, int64_t timestamp_us); - RTCRemoteIceCandidateStats(std::string&& id, int64_t timestamp_us); - const char* type() const override; -}; - -// https://w3c.github.io/webrtc-stats/#msstats-dict* -// TODO(hbos): Tracking bug crbug.com/660827 -class RTCMediaStreamStats final : public RTCStats { - public: - WEBRTC_RTCSTATS_DECL(); - - RTCMediaStreamStats(const std::string& id, int64_t timestamp_us); - RTCMediaStreamStats(std::string&& id, int64_t timestamp_us); - RTCMediaStreamStats(const RTCMediaStreamStats& other); - ~RTCMediaStreamStats() override; - - RTCStatsMember stream_identifier; - RTCStatsMember> track_ids; -}; - -// https://w3c.github.io/webrtc-stats/#mststats-dict* -// TODO(hbos): Tracking bug crbug.com/659137 -class RTCMediaStreamTrackStats final : public RTCStats { - public: - WEBRTC_RTCSTATS_DECL(); - - RTCMediaStreamTrackStats(const std::string& id, int64_t timestamp_us, - const char* kind); - RTCMediaStreamTrackStats(std::string&& id, int64_t timestamp_us, - const char* kind); - RTCMediaStreamTrackStats(const RTCMediaStreamTrackStats& other); - ~RTCMediaStreamTrackStats() override; - - RTCStatsMember track_identifier; - RTCStatsMember remote_source; - RTCStatsMember ended; - // TODO(hbos): |RTCStatsCollector| does not return stats for detached tracks. - // crbug.com/659137 - RTCStatsMember detached; - // See |RTCMediaStreamTrackKind| for valid values. - RTCStatsMember kind; - // Video-only members - RTCStatsMember frame_width; - RTCStatsMember frame_height; - // TODO(hbos): Not collected by |RTCStatsCollector|. crbug.com/659137 - RTCStatsMember frames_per_second; - RTCStatsMember frames_sent; - RTCStatsMember frames_received; - RTCStatsMember frames_decoded; - // TODO(hbos): Not collected by |RTCStatsCollector|. crbug.com/659137 - RTCStatsMember frames_dropped; - // TODO(hbos): Not collected by |RTCStatsCollector|. crbug.com/659137 - RTCStatsMember frames_corrupted; - // TODO(hbos): Not collected by |RTCStatsCollector|. crbug.com/659137 - RTCStatsMember partial_frames_lost; - // TODO(hbos): Not collected by |RTCStatsCollector|. crbug.com/659137 - RTCStatsMember full_frames_lost; - // Audio-only members - RTCStatsMember audio_level; - RTCStatsMember echo_return_loss; - RTCStatsMember echo_return_loss_enhancement; -}; - -// https://w3c.github.io/webrtc-stats/#pcstats-dict* -class RTCPeerConnectionStats final : public RTCStats { - public: - WEBRTC_RTCSTATS_DECL(); - - RTCPeerConnectionStats(const std::string& id, int64_t timestamp_us); - RTCPeerConnectionStats(std::string&& id, int64_t timestamp_us); - RTCPeerConnectionStats(const RTCPeerConnectionStats& other); - ~RTCPeerConnectionStats() override; - - RTCStatsMember data_channels_opened; - RTCStatsMember data_channels_closed; -}; - -// https://w3c.github.io/webrtc-stats/#streamstats-dict* -// TODO(hbos): Tracking bug crbug.com/657854 -class RTCRTPStreamStats : public RTCStats { - public: - WEBRTC_RTCSTATS_DECL(); - - RTCRTPStreamStats(const RTCRTPStreamStats& other); - ~RTCRTPStreamStats() override; - - RTCStatsMember ssrc; - // TODO(hbos): When the remote case is supported |RTCStatsCollector| needs to - // set this. crbug.com/657855, 657856 - RTCStatsMember associate_stats_id; - // TODO(hbos): Remote case not supported by |RTCStatsCollector|. - // crbug.com/657855, 657856 - RTCStatsMember is_remote; // = false - RTCStatsMember media_type; - RTCStatsMember media_track_id; - RTCStatsMember transport_id; - RTCStatsMember codec_id; - // FIR and PLI counts are only defined for |media_type == "video"|. - RTCStatsMember fir_count; - RTCStatsMember pli_count; - // TODO(hbos): NACK count should be collected by |RTCStatsCollector| for both - // audio and video but is only defined in the "video" case. crbug.com/657856 - RTCStatsMember nack_count; - // TODO(hbos): Not collected by |RTCStatsCollector|. crbug.com/657854 - // SLI count is only defined for |media_type == "video"|. - RTCStatsMember sli_count; - // TODO(hbos): Only collected for the outbound case, should also be collected - // for inbound case by |RTCStatsCollector|. crbug.com/657854, crbug.com/657855 - RTCStatsMember qp_sum; - - protected: - RTCRTPStreamStats(const std::string& id, int64_t timestamp_us); - RTCRTPStreamStats(std::string&& id, int64_t timestamp_us); -}; - -// https://w3c.github.io/webrtc-stats/#inboundrtpstats-dict* -// Tracking bug crbug.com/657855 -// TODO(hbos): Support the remote case |is_remote = true|. crbug.com/657855 -class RTCInboundRTPStreamStats final : public RTCRTPStreamStats { - public: - WEBRTC_RTCSTATS_DECL(); - - RTCInboundRTPStreamStats(const std::string& id, int64_t timestamp_us); - RTCInboundRTPStreamStats(std::string&& id, int64_t timestamp_us); - RTCInboundRTPStreamStats(const RTCInboundRTPStreamStats& other); - ~RTCInboundRTPStreamStats() override; - - RTCStatsMember packets_received; - RTCStatsMember bytes_received; - RTCStatsMember packets_lost; - // TODO(hbos): Not collected in the "video" case by |RTCStatsCollector|. - // crbug.com/657855 - RTCStatsMember jitter; - RTCStatsMember fraction_lost; - // TODO(hbos): Not collected by |RTCStatsCollector|. crbug.com/657855 - RTCStatsMember packets_discarded; - // TODO(hbos): Not collected by |RTCStatsCollector|. crbug.com/657855 - RTCStatsMember packets_repaired; - // TODO(hbos): Not collected by |RTCStatsCollector|. crbug.com/657855 - RTCStatsMember burst_packets_lost; - // TODO(hbos): Not collected by |RTCStatsCollector|. crbug.com/657855 - RTCStatsMember burst_packets_discarded; - // TODO(hbos): Not collected by |RTCStatsCollector|. crbug.com/657855 - RTCStatsMember burst_loss_count; - // TODO(hbos): Not collected by |RTCStatsCollector|. crbug.com/657855 - RTCStatsMember burst_discard_count; - // TODO(hbos): Not collected by |RTCStatsCollector|. crbug.com/657855 - RTCStatsMember burst_loss_rate; - // TODO(hbos): Not collected by |RTCStatsCollector|. crbug.com/657855 - RTCStatsMember burst_discard_rate; - // TODO(hbos): Not collected by |RTCStatsCollector|. crbug.com/657855 - RTCStatsMember gap_loss_rate; - // TODO(hbos): Not collected by |RTCStatsCollector|. crbug.com/657855 - RTCStatsMember gap_discard_rate; - RTCStatsMember frames_decoded; -}; - -// https://w3c.github.io/webrtc-stats/#outboundrtpstats-dict* -// Tracking bug crbug.com/657856 -// TODO(hbos): Support the remote case |is_remote = true|. crbug.com/657856 -class RTCOutboundRTPStreamStats final : public RTCRTPStreamStats { - public: - WEBRTC_RTCSTATS_DECL(); - - RTCOutboundRTPStreamStats(const std::string& id, int64_t timestamp_us); - RTCOutboundRTPStreamStats(std::string&& id, int64_t timestamp_us); - RTCOutboundRTPStreamStats(const RTCOutboundRTPStreamStats& other); - ~RTCOutboundRTPStreamStats() override; - - RTCStatsMember packets_sent; - RTCStatsMember bytes_sent; - // TODO(hbos): Not collected by |RTCStatsCollector|. crbug.com/657856 - RTCStatsMember target_bitrate; - RTCStatsMember round_trip_time; - RTCStatsMember frames_encoded; -}; - -// https://w3c.github.io/webrtc-stats/#transportstats-dict* -class RTCTransportStats final : public RTCStats { - public: - WEBRTC_RTCSTATS_DECL(); - - RTCTransportStats(const std::string& id, int64_t timestamp_us); - RTCTransportStats(std::string&& id, int64_t timestamp_us); - RTCTransportStats(const RTCTransportStats& other); - ~RTCTransportStats() override; - - RTCStatsMember bytes_sent; - RTCStatsMember bytes_received; - RTCStatsMember rtcp_transport_stats_id; - // TODO(hbos): Support enum types? "RTCStatsMember"? - RTCStatsMember dtls_state; - RTCStatsMember selected_candidate_pair_id; - RTCStatsMember local_certificate_id; - RTCStatsMember remote_certificate_id; -}; - -} // namespace webrtc - -#endif // WEBRTC_API_STATS_RTCSTATS_OBJECTS_H_ diff --git a/WebRtc.NET/include/webrtc/api/streamcollection.h b/WebRtc.NET/include/webrtc/api/streamcollection.h deleted file mode 100644 index bedad832..00000000 --- a/WebRtc.NET/include/webrtc/api/streamcollection.h +++ /dev/null @@ -1,108 +0,0 @@ -/* - * Copyright 2011 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_API_STREAMCOLLECTION_H_ -#define WEBRTC_API_STREAMCOLLECTION_H_ - -#include -#include - -#include "webrtc/api/peerconnectioninterface.h" - -namespace webrtc { - -// Implementation of StreamCollection. -class StreamCollection : public StreamCollectionInterface { - public: - static rtc::scoped_refptr Create() { - rtc::RefCountedObject* implementation = - new rtc::RefCountedObject(); - return implementation; - } - - static rtc::scoped_refptr Create( - StreamCollection* streams) { - rtc::RefCountedObject* implementation = - new rtc::RefCountedObject(streams); - return implementation; - } - - virtual size_t count() { - return media_streams_.size(); - } - - virtual MediaStreamInterface* at(size_t index) { - return media_streams_.at(index); - } - - virtual MediaStreamInterface* find(const std::string& label) { - for (StreamVector::iterator it = media_streams_.begin(); - it != media_streams_.end(); ++it) { - if ((*it)->label().compare(label) == 0) { - return (*it); - } - } - return NULL; - } - - virtual MediaStreamTrackInterface* FindAudioTrack( - const std::string& id) { - for (size_t i = 0; i < media_streams_.size(); ++i) { - MediaStreamTrackInterface* track = media_streams_[i]->FindAudioTrack(id); - if (track) { - return track; - } - } - return NULL; - } - - virtual MediaStreamTrackInterface* FindVideoTrack( - const std::string& id) { - for (size_t i = 0; i < media_streams_.size(); ++i) { - MediaStreamTrackInterface* track = media_streams_[i]->FindVideoTrack(id); - if (track) { - return track; - } - } - return NULL; - } - - void AddStream(MediaStreamInterface* stream) { - for (StreamVector::iterator it = media_streams_.begin(); - it != media_streams_.end(); ++it) { - if ((*it)->label().compare(stream->label()) == 0) - return; - } - media_streams_.push_back(stream); - } - - void RemoveStream(MediaStreamInterface* remove_stream) { - for (StreamVector::iterator it = media_streams_.begin(); - it != media_streams_.end(); ++it) { - if ((*it)->label().compare(remove_stream->label()) == 0) { - media_streams_.erase(it); - break; - } - } - } - - protected: - StreamCollection() {} - explicit StreamCollection(StreamCollection* original) - : media_streams_(original->media_streams_) { - } - typedef std::vector > - StreamVector; - StreamVector media_streams_; -}; - -} // namespace webrtc - -#endif // WEBRTC_API_STREAMCOLLECTION_H_ diff --git a/WebRtc.NET/include/webrtc/api/test/fakeaudiocapturemodule.h b/WebRtc.NET/include/webrtc/api/test/fakeaudiocapturemodule.h deleted file mode 100644 index 34aa7e09..00000000 --- a/WebRtc.NET/include/webrtc/api/test/fakeaudiocapturemodule.h +++ /dev/null @@ -1,281 +0,0 @@ -/* - * Copyright 2012 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -// This class implements an AudioCaptureModule that can be used to detect if -// audio is being received properly if it is fed by another AudioCaptureModule -// in some arbitrary audio pipeline where they are connected. It does not play -// out or record any audio so it does not need access to any hardware and can -// therefore be used in the gtest testing framework. - -// Note P postfix of a function indicates that it should only be called by the -// processing thread. - -#ifndef WEBRTC_API_TEST_FAKEAUDIOCAPTUREMODULE_H_ -#define WEBRTC_API_TEST_FAKEAUDIOCAPTUREMODULE_H_ - -#include - -#include "webrtc/base/basictypes.h" -#include "webrtc/base/criticalsection.h" -#include "webrtc/base/messagehandler.h" -#include "webrtc/base/scoped_ref_ptr.h" -#include "webrtc/common_types.h" -#include "webrtc/modules/audio_device/include/audio_device.h" - -namespace rtc { -class Thread; -} // namespace rtc - -class FakeAudioCaptureModule - : public webrtc::AudioDeviceModule, - public rtc::MessageHandler { - public: - typedef uint16_t Sample; - - // The value for the following constants have been derived by running VoE - // using a real ADM. The constants correspond to 10ms of mono audio at 44kHz. - static const size_t kNumberSamples = 440; - static const size_t kNumberBytesPerSample = sizeof(Sample); - - // Creates a FakeAudioCaptureModule or returns NULL on failure. - static rtc::scoped_refptr Create(); - - // Returns the number of frames that have been successfully pulled by the - // instance. Note that correctly detecting success can only be done if the - // pulled frame was generated/pushed from a FakeAudioCaptureModule. - int frames_received() const; - - // Following functions are inherited from webrtc::AudioDeviceModule. - // Only functions called by PeerConnection are implemented, the rest do - // nothing and return success. If a function is not expected to be called by - // PeerConnection an assertion is triggered if it is in fact called. - int64_t TimeUntilNextProcess() override; - void Process() override; - - int32_t ActiveAudioLayer(AudioLayer* audio_layer) const override; - - ErrorCode LastError() const override; - int32_t RegisterEventObserver( - webrtc::AudioDeviceObserver* event_callback) override; - - // Note: Calling this method from a callback may result in deadlock. - int32_t RegisterAudioCallback( - webrtc::AudioTransport* audio_callback) override; - - int32_t Init() override; - int32_t Terminate() override; - bool Initialized() const override; - - int16_t PlayoutDevices() override; - int16_t RecordingDevices() override; - int32_t PlayoutDeviceName(uint16_t index, - char name[webrtc::kAdmMaxDeviceNameSize], - char guid[webrtc::kAdmMaxGuidSize]) override; - int32_t RecordingDeviceName(uint16_t index, - char name[webrtc::kAdmMaxDeviceNameSize], - char guid[webrtc::kAdmMaxGuidSize]) override; - - int32_t SetPlayoutDevice(uint16_t index) override; - int32_t SetPlayoutDevice(WindowsDeviceType device) override; - int32_t SetRecordingDevice(uint16_t index) override; - int32_t SetRecordingDevice(WindowsDeviceType device) override; - - int32_t PlayoutIsAvailable(bool* available) override; - int32_t InitPlayout() override; - bool PlayoutIsInitialized() const override; - int32_t RecordingIsAvailable(bool* available) override; - int32_t InitRecording() override; - bool RecordingIsInitialized() const override; - - int32_t StartPlayout() override; - int32_t StopPlayout() override; - bool Playing() const override; - int32_t StartRecording() override; - int32_t StopRecording() override; - bool Recording() const override; - - int32_t SetAGC(bool enable) override; - bool AGC() const override; - - int32_t SetWaveOutVolume(uint16_t volume_left, - uint16_t volume_right) override; - int32_t WaveOutVolume(uint16_t* volume_left, - uint16_t* volume_right) const override; - - int32_t InitSpeaker() override; - bool SpeakerIsInitialized() const override; - int32_t InitMicrophone() override; - bool MicrophoneIsInitialized() const override; - - int32_t SpeakerVolumeIsAvailable(bool* available) override; - int32_t SetSpeakerVolume(uint32_t volume) override; - int32_t SpeakerVolume(uint32_t* volume) const override; - int32_t MaxSpeakerVolume(uint32_t* max_volume) const override; - int32_t MinSpeakerVolume(uint32_t* min_volume) const override; - int32_t SpeakerVolumeStepSize(uint16_t* step_size) const override; - - int32_t MicrophoneVolumeIsAvailable(bool* available) override; - int32_t SetMicrophoneVolume(uint32_t volume) override; - int32_t MicrophoneVolume(uint32_t* volume) const override; - int32_t MaxMicrophoneVolume(uint32_t* max_volume) const override; - - int32_t MinMicrophoneVolume(uint32_t* min_volume) const override; - int32_t MicrophoneVolumeStepSize(uint16_t* step_size) const override; - - int32_t SpeakerMuteIsAvailable(bool* available) override; - int32_t SetSpeakerMute(bool enable) override; - int32_t SpeakerMute(bool* enabled) const override; - - int32_t MicrophoneMuteIsAvailable(bool* available) override; - int32_t SetMicrophoneMute(bool enable) override; - int32_t MicrophoneMute(bool* enabled) const override; - - int32_t MicrophoneBoostIsAvailable(bool* available) override; - int32_t SetMicrophoneBoost(bool enable) override; - int32_t MicrophoneBoost(bool* enabled) const override; - - int32_t StereoPlayoutIsAvailable(bool* available) const override; - int32_t SetStereoPlayout(bool enable) override; - int32_t StereoPlayout(bool* enabled) const override; - int32_t StereoRecordingIsAvailable(bool* available) const override; - int32_t SetStereoRecording(bool enable) override; - int32_t StereoRecording(bool* enabled) const override; - int32_t SetRecordingChannel(const ChannelType channel) override; - int32_t RecordingChannel(ChannelType* channel) const override; - - int32_t SetPlayoutBuffer(const BufferType type, - uint16_t size_ms = 0) override; - int32_t PlayoutBuffer(BufferType* type, uint16_t* size_ms) const override; - int32_t PlayoutDelay(uint16_t* delay_ms) const override; - int32_t RecordingDelay(uint16_t* delay_ms) const override; - - int32_t CPULoad(uint16_t* load) const override; - - int32_t StartRawOutputFileRecording( - const char pcm_file_name_utf8[webrtc::kAdmMaxFileNameSize]) override; - int32_t StopRawOutputFileRecording() override; - int32_t StartRawInputFileRecording( - const char pcm_file_name_utf8[webrtc::kAdmMaxFileNameSize]) override; - int32_t StopRawInputFileRecording() override; - - int32_t SetRecordingSampleRate(const uint32_t samples_per_sec) override; - int32_t RecordingSampleRate(uint32_t* samples_per_sec) const override; - int32_t SetPlayoutSampleRate(const uint32_t samples_per_sec) override; - int32_t PlayoutSampleRate(uint32_t* samples_per_sec) const override; - - int32_t ResetAudioDevice() override; - int32_t SetLoudspeakerStatus(bool enable) override; - int32_t GetLoudspeakerStatus(bool* enabled) const override; - bool BuiltInAECIsAvailable() const override { return false; } - int32_t EnableBuiltInAEC(bool enable) override { return -1; } - bool BuiltInAGCIsAvailable() const override { return false; } - int32_t EnableBuiltInAGC(bool enable) override { return -1; } - bool BuiltInNSIsAvailable() const override { return false; } - int32_t EnableBuiltInNS(bool enable) override { return -1; } -#if defined(WEBRTC_IOS) - int GetPlayoutAudioParameters( - webrtc::AudioParameters* params) const override { - return -1; - } - int GetRecordAudioParameters(webrtc::AudioParameters* params) const override { - return -1; - } -#endif // WEBRTC_IOS - - // End of functions inherited from webrtc::AudioDeviceModule. - - // The following function is inherited from rtc::MessageHandler. - void OnMessage(rtc::Message* msg) override; - - protected: - // The constructor is protected because the class needs to be created as a - // reference counted object (for memory managment reasons). It could be - // exposed in which case the burden of proper instantiation would be put on - // the creator of a FakeAudioCaptureModule instance. To create an instance of - // this class use the Create(..) API. - explicit FakeAudioCaptureModule(); - // The destructor is protected because it is reference counted and should not - // be deleted directly. - virtual ~FakeAudioCaptureModule(); - - private: - // Initializes the state of the FakeAudioCaptureModule. This API is called on - // creation by the Create() API. - bool Initialize(); - // SetBuffer() sets all samples in send_buffer_ to |value|. - void SetSendBuffer(int value); - // Resets rec_buffer_. I.e., sets all rec_buffer_ samples to 0. - void ResetRecBuffer(); - // Returns true if rec_buffer_ contains one or more sample greater than or - // equal to |value|. - bool CheckRecBuffer(int value); - - // Returns true/false depending on if recording or playback has been - // enabled/started. - bool ShouldStartProcessing(); - - // Starts or stops the pushing and pulling of audio frames. - void UpdateProcessing(bool start); - - // Starts the periodic calling of ProcessFrame() in a thread safe way. - void StartProcessP(); - // Periodcally called function that ensures that frames are pulled and pushed - // periodically if enabled/started. - void ProcessFrameP(); - // Pulls frames from the registered webrtc::AudioTransport. - void ReceiveFrameP(); - // Pushes frames to the registered webrtc::AudioTransport. - void SendFrameP(); - - // The time in milliseconds when Process() was last called or 0 if no call - // has been made. - int64_t last_process_time_ms_; - - // Callback for playout and recording. - webrtc::AudioTransport* audio_callback_; - - bool recording_; // True when audio is being pushed from the instance. - bool playing_; // True when audio is being pulled by the instance. - - bool play_is_initialized_; // True when the instance is ready to pull audio. - bool rec_is_initialized_; // True when the instance is ready to push audio. - - // Input to and output from RecordedDataIsAvailable(..) makes it possible to - // modify the current mic level. The implementation does not care about the - // mic level so it just feeds back what it receives. - uint32_t current_mic_level_; - - // next_frame_time_ is updated in a non-drifting manner to indicate the next - // wall clock time the next frame should be generated and received. started_ - // ensures that next_frame_time_ can be initialized properly on first call. - bool started_; - int64_t next_frame_time_; - - std::unique_ptr process_thread_; - - // Buffer for storing samples received from the webrtc::AudioTransport. - char rec_buffer_[kNumberSamples * kNumberBytesPerSample]; - // Buffer for samples to send to the webrtc::AudioTransport. - char send_buffer_[kNumberSamples * kNumberBytesPerSample]; - - // Counter of frames received that have samples of high enough amplitude to - // indicate that the frames are not faked somewhere in the audio pipeline - // (e.g. by a jitter buffer). - int frames_received_; - - // Protects variables that are accessed from process_thread_ and - // the main thread. - rtc::CriticalSection crit_; - // Protects |audio_callback_| that is accessed from process_thread_ and - // the main thread. - rtc::CriticalSection crit_callback_; -}; - -#endif // WEBRTC_API_TEST_FAKEAUDIOCAPTUREMODULE_H_ diff --git a/WebRtc.NET/include/webrtc/api/test/fakeperiodicvideocapturer.h b/WebRtc.NET/include/webrtc/api/test/fakeperiodicvideocapturer.h deleted file mode 100644 index 2c16195a..00000000 --- a/WebRtc.NET/include/webrtc/api/test/fakeperiodicvideocapturer.h +++ /dev/null @@ -1,74 +0,0 @@ -/* - * Copyright 2012 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -// FakePeriodicVideoCapturer implements a fake cricket::VideoCapturer that -// creates video frames periodically after it has been started. - -#ifndef WEBRTC_API_TEST_FAKEPERIODICVIDEOCAPTURER_H_ -#define WEBRTC_API_TEST_FAKEPERIODICVIDEOCAPTURER_H_ - -#include - -#include "webrtc/base/thread.h" -#include "webrtc/media/base/fakevideocapturer.h" - -namespace webrtc { - -class FakePeriodicVideoCapturer : public cricket::FakeVideoCapturer, - public rtc::MessageHandler { - public: - FakePeriodicVideoCapturer() { - std::vector formats; - formats.push_back(cricket::VideoFormat(1280, 720, - cricket::VideoFormat::FpsToInterval(30), cricket::FOURCC_I420)); - formats.push_back(cricket::VideoFormat(640, 480, - cricket::VideoFormat::FpsToInterval(30), cricket::FOURCC_I420)); - formats.push_back(cricket::VideoFormat(640, 360, - cricket::VideoFormat::FpsToInterval(30), cricket::FOURCC_I420)); - formats.push_back(cricket::VideoFormat(320, 240, - cricket::VideoFormat::FpsToInterval(30), cricket::FOURCC_I420)); - formats.push_back(cricket::VideoFormat(160, 120, - cricket::VideoFormat::FpsToInterval(30), cricket::FOURCC_I420)); - ResetSupportedFormats(formats); - } - - virtual cricket::CaptureState Start(const cricket::VideoFormat& format) { - cricket::CaptureState state = FakeVideoCapturer::Start(format); - if (state != cricket::CS_FAILED) { - rtc::Thread::Current()->Post(RTC_FROM_HERE, this, MSG_CREATEFRAME); - } - return state; - } - virtual void Stop() { - rtc::Thread::Current()->Clear(this); - } - // Inherited from MesageHandler. - virtual void OnMessage(rtc::Message* msg) { - if (msg->message_id == MSG_CREATEFRAME) { - if (IsRunning()) { - CaptureFrame(); - rtc::Thread::Current()->PostDelayed( - RTC_FROM_HERE, static_cast(GetCaptureFormat()->interval / - rtc::kNumNanosecsPerMillisec), - this, MSG_CREATEFRAME); - } - } - } - - private: - enum { - // Offset 0xFF to make sure this don't collide with base class messages. - MSG_CREATEFRAME = 0xFF - }; -}; - -} // namespace webrtc - -#endif // WEBRTC_API_TEST_FAKEPERIODICVIDEOCAPTURER_H_ diff --git a/WebRtc.NET/include/webrtc/api/test/fakertccertificategenerator.h b/WebRtc.NET/include/webrtc/api/test/fakertccertificategenerator.h deleted file mode 100644 index cd1e4bf5..00000000 --- a/WebRtc.NET/include/webrtc/api/test/fakertccertificategenerator.h +++ /dev/null @@ -1,231 +0,0 @@ -/* - * Copyright 2013 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_API_TEST_FAKERTCCERTIFICATEGENERATOR_H_ -#define WEBRTC_API_TEST_FAKERTCCERTIFICATEGENERATOR_H_ - -#include -#include -#include - -#include "webrtc/api/peerconnectioninterface.h" -#include "webrtc/base/rtccertificate.h" -#include "webrtc/base/rtccertificategenerator.h" - -// RSA with mod size 1024, pub exp 0x10001. -static const rtc::RTCCertificatePEM kRsaPems[] = { - rtc::RTCCertificatePEM( - "-----BEGIN RSA PRIVATE KEY-----\n" - "MIICdwIBADANBgkqhkiG9w0BAQEFAASCAmEwggJdAgEAAoGBAMYRkbhmI7kVA/rM\n" - "czsZ+6JDhDvnkF+vn6yCAGuRPV03zuRqZtDy4N4to7PZu9PjqrRl7nDMXrG3YG9y\n" - "rlIAZ72KjcKKFAJxQyAKLCIdawKRyp8RdK3LEySWEZb0AV58IadqPZDTNHHRX8dz\n" - "5aTSMsbbkZ+C/OzTnbiMqLL/vg6jAgMBAAECgYAvgOs4FJcgvp+TuREx7YtiYVsH\n" - "mwQPTum2z/8VzWGwR8BBHBvIpVe1MbD/Y4seyI2aco/7UaisatSgJhsU46/9Y4fq\n" - "2TwXH9QANf4at4d9n/R6rzwpAJOpgwZgKvdQjkfrKTtgLV+/dawvpxUYkRH4JZM1\n" - "CVGukMfKNrSVH4Ap4QJBAOJmGV1ASPnB4r4nc99at7JuIJmd7fmuVUwUgYi4XgaR\n" - "WhScBsgYwZ/JoywdyZJgnbcrTDuVcWG56B3vXbhdpMsCQQDf9zeJrjnPZ3Cqm79y\n" - "kdqANep0uwZciiNiWxsQrCHztywOvbFhdp8iYVFG9EK8DMY41Y5TxUwsHD+67zao\n" - "ZNqJAkEA1suLUP/GvL8IwuRneQd2tWDqqRQ/Td3qq03hP7e77XtF/buya3Ghclo5\n" - "54czUR89QyVfJEC6278nzA7n2h1uVQJAcG6mztNL6ja/dKZjYZye2CY44QjSlLo0\n" - "MTgTSjdfg/28fFn2Jjtqf9Pi/X+50LWI/RcYMC2no606wRk9kyOuIQJBAK6VSAim\n" - "1pOEjsYQn0X5KEIrz1G3bfCbB848Ime3U2/FWlCHMr6ch8kCZ5d1WUeJD3LbwMNG\n" - "UCXiYxSsu20QNVw=\n" - "-----END RSA PRIVATE KEY-----\n", - "-----BEGIN CERTIFICATE-----\n" - "MIIBmTCCAQKgAwIBAgIEbzBSAjANBgkqhkiG9w0BAQsFADARMQ8wDQYDVQQDEwZX\n" - "ZWJSVEMwHhcNMTQwMTAyMTgyNDQ3WhcNMTQwMjAxMTgyNDQ3WjARMQ8wDQYDVQQD\n" - "EwZXZWJSVEMwgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBAMYRkbhmI7kVA/rM\n" - "czsZ+6JDhDvnkF+vn6yCAGuRPV03zuRqZtDy4N4to7PZu9PjqrRl7nDMXrG3YG9y\n" - "rlIAZ72KjcKKFAJxQyAKLCIdawKRyp8RdK3LEySWEZb0AV58IadqPZDTNHHRX8dz\n" - "5aTSMsbbkZ+C/OzTnbiMqLL/vg6jAgMBAAEwDQYJKoZIhvcNAQELBQADgYEAUflI\n" - "VUe5Krqf5RVa5C3u/UTAOAUJBiDS3VANTCLBxjuMsvqOG0WvaYWP3HYPgrz0jXK2\n" - "LJE/mGw3MyFHEqi81jh95J+ypl6xKW6Rm8jKLR87gUvCaVYn/Z4/P3AqcQTB7wOv\n" - "UD0A8qfhfDM+LK6rPAnCsVN0NRDY3jvd6rzix9M=\n" - "-----END CERTIFICATE-----\n"), - rtc::RTCCertificatePEM( - "-----BEGIN RSA PRIVATE KEY-----\n" - "MIICXQIBAAKBgQDeYqlyJ1wuiMsi905e3X81/WA/G3ym50PIDZBVtSwZi7JVQPgj\n" - "Bl8CPZMvDh9EwB4Ji9ytA8dZZbQ4WbJWPr73zPpJSCvQqz6sOXSlenBRi72acNaQ\n" - "sOR/qPvviJx5I6Hqo4qemfnjZhAW85a5BpgrAwKgMLIQTHCTLWwVSyrDrwIDAQAB\n" - "AoGARni9eY8/hv+SX+I+05EdXt6MQXNUbQ+cSykBNCfVccLzIFEWUQMT2IHqwl6X\n" - "ShIXcq7/n1QzOAEiuzixauM3YHg4xZ1Um2Ha9a7ig5Xg4v6b43bmMkNE6LkoAtYs\n" - "qnQdfMh442b1liDud6IMb1Qk0amt3fSrgRMc547TZQVx4QECQQDxUeDm94r3p4ng\n" - "5rCLLC1K5/6HSTZsh7jatKPlz7GfP/IZlYV7iE5784/n0wRiCjZOS7hQRy/8m2Gp\n" - "pf4aZq+DAkEA6+np4d36FYikydvUrupLT3FkdRHGn/v83qOll/VmeNh+L1xMZlIP\n" - "tM26hAXCcQb7O5+J9y3cx2CAQsBS11ZXZQJAfGgTo76WG9p5UEJdXUInD2jOZPwv\n" - "XIATolxh6kXKcijLLLlSmT7KB0inNYIpzkkpee+7U1d/u6B3FriGaSHq9QJBAM/J\n" - "ICnDdLCgwNvWVraVQC3BpwSB2pswvCFwq7py94V60XFvbw80Ogc6qIv98qvQxVlX\n" - "hJIEgA/PjEi+0ng94Q0CQQDm8XSDby35gmjO+6eRmJtAjtB7nguLvrPXM6CPXRmD\n" - "sRoBocpHw6j9UdzZ6qYG0FkdXZghezXFY58ro2BYYRR3\n" - "-----END RSA PRIVATE KEY-----\n", - "-----BEGIN CERTIFICATE-----\n" - "MIICWDCCAcGgAwIBAgIJALgDjxMbBOhbMA0GCSqGSIb3DQEBCwUAMEUxCzAJBgNV\n" - "BAYTAkFVMRMwEQYDVQQIDApTb21lLVN0YXRlMSEwHwYDVQQKDBhJbnRlcm5ldCBX\n" - "aWRnaXRzIFB0eSBMdGQwHhcNMTUxMTEzMjIzMjEzWhcNMTYxMTEyMjIzMjEzWjBF\n" - "MQswCQYDVQQGEwJBVTETMBEGA1UECAwKU29tZS1TdGF0ZTEhMB8GA1UECgwYSW50\n" - "ZXJuZXQgV2lkZ2l0cyBQdHkgTHRkMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKB\n" - "gQDeYqlyJ1wuiMsi905e3X81/WA/G3ym50PIDZBVtSwZi7JVQPgjBl8CPZMvDh9E\n" - "wB4Ji9ytA8dZZbQ4WbJWPr73zPpJSCvQqz6sOXSlenBRi72acNaQsOR/qPvviJx5\n" - "I6Hqo4qemfnjZhAW85a5BpgrAwKgMLIQTHCTLWwVSyrDrwIDAQABo1AwTjAdBgNV\n" - "HQ4EFgQUx2tbJdlcSTCepn09UdYORXKuSTAwHwYDVR0jBBgwFoAUx2tbJdlcSTCe\n" - "pn09UdYORXKuSTAwDAYDVR0TBAUwAwEB/zANBgkqhkiG9w0BAQsFAAOBgQAmp9Id\n" - "E716gHMqeBG4S2FCgVFCr0a0ugkaneQAN/c2L9CbMemEN9W6jvucUIVOtYd90dDW\n" - "lXuowWmT/JctPe3D2qt4yvYW3puECHk2tVQmrJOZiZiTRtWm6HxkmoUYHYp/DtaS\n" - "1Xe29gSTnZtI5sQCrGMzk3SGRSSs7ejLKiVDBQ==\n" - "-----END CERTIFICATE-----\n") -}; - -// ECDSA with EC_NIST_P256. -// These PEM strings were created by generating an identity with -// |SSLIdentity::Generate| and invoking |identity->PrivateKeyToPEMString()|, -// |identity->PublicKeyToPEMString()| and -// |identity->certificate().ToPEMString()|. -static const rtc::RTCCertificatePEM kEcdsaPems[] = { - rtc::RTCCertificatePEM( - "-----BEGIN PRIVATE KEY-----\n" - "MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQg+qaRsR5uHtqG689M\n" - "A3PHSJNeVpyi5wUKCft62h0UWy+hRANCAAS5Mjc85q9fVq4ln+zOPlaEC/Rzj5Pb\n" - "MVZtf1x/8k2KsbmyZoAMDX2yer/atEuXmItMe3yd6/DXnvboU//D3Lyt\n" - "-----END PRIVATE KEY-----\n", - "-----BEGIN CERTIFICATE-----\n" - "MIIBFTCBu6ADAgECAgkA30tGY5XG7oowCgYIKoZIzj0EAwIwEDEOMAwGA1UEAwwF\n" - "dGVzdDMwHhcNMTYwNTA5MDkxODA4WhcNMTYwNjA5MDkxODA4WjAQMQ4wDAYDVQQD\n" - "DAV0ZXN0MzBZMBMGByqGSM49AgEGCCqGSM49AwEHA0IABLkyNzzmr19WriWf7M4+\n" - "VoQL9HOPk9sxVm1/XH/yTYqxubJmgAwNfbJ6v9q0S5eYi0x7fJ3r8Nee9uhT/8Pc\n" - "vK0wCgYIKoZIzj0EAwIDSQAwRgIhAIIc3+CqfkZ9lLwTj1PvUtt3KhnqF2kD0War\n" - "cCoTBbCxAiEAyp9Cn4vo2ZBhRIVDKyoxmwak8Z0PAVhJAQaWCgoY2D4=\n" - "-----END CERTIFICATE-----\n"), - rtc::RTCCertificatePEM( - "-----BEGIN PRIVATE KEY-----\n" - "MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQghL/G4JRYnuDNbQuh\n" - "LqkytcE39Alsq6FItDVFgOesfCmhRANCAATd53FjPLyVUcwYguEPbSJM03fP6Rx5\n" - "GY1dEZ00+ZykjJI83VfDAyvmpRuGahNtBH0hc+7xkDCbeo6TM0tN35xr\n" - "-----END PRIVATE KEY-----\n", - "-----BEGIN CERTIFICATE-----\n" - "MIIBFDCBu6ADAgECAgkArZYdXMyJ5rswCgYIKoZIzj0EAwIwEDEOMAwGA1UEAwwF\n" - "dGVzdDQwHhcNMTYwNTA5MDkxODA4WhcNMTYwNjA5MDkxODA4WjAQMQ4wDAYDVQQD\n" - "DAV0ZXN0NDBZMBMGByqGSM49AgEGCCqGSM49AwEHA0IABN3ncWM8vJVRzBiC4Q9t\n" - "IkzTd8/pHHkZjV0RnTT5nKSMkjzdV8MDK+alG4ZqE20EfSFz7vGQMJt6jpMzS03f\n" - "nGswCgYIKoZIzj0EAwIDSAAwRQIgb/LBc8OtsC5lEDyjCP6M9xt5mwzUNrQBOFWZ\n" - "1fE/g68CIQD7uoFfbiq6dTp8ZwzbwQ8jJf08KjriamqA9OW/4268Dw==\n" - "-----END CERTIFICATE-----\n") -}; - -class FakeRTCCertificateGenerator - : public rtc::RTCCertificateGeneratorInterface, - public rtc::MessageHandler { - public: - typedef rtc::TypedMessageData > MessageData; - - FakeRTCCertificateGenerator() : should_fail_(false) {} - - void set_should_fail(bool should_fail) { - should_fail_ = should_fail; - } - - void use_original_key() { key_index_ = 0; } - void use_alternate_key() { key_index_ = 1; } - - int generated_certificates() { return generated_certificates_; } - - void GenerateCertificateAsync( - const rtc::KeyParams& key_params, - const rtc::Optional& expires_ms, - const rtc::scoped_refptr& - callback) override { - // The certificates are created from constant PEM strings and use its coded - // expiration time, we do not support modifying it. - RTC_DCHECK(!expires_ms); - MessageData* msg = new MessageData( - rtc::scoped_refptr(callback)); - uint32_t msg_id; - // Only supports RSA-1024-0x10001 and ECDSA-P256. - if (should_fail_) { - msg_id = MSG_FAILURE; - } else if (key_params.type() == rtc::KT_RSA) { - RTC_DCHECK(key_params.rsa_params().mod_size == 1024 && - key_params.rsa_params().pub_exp == 0x10001); - msg_id = MSG_SUCCESS_RSA; - } else { - RTC_DCHECK(key_params.type() == rtc::KT_ECDSA && - key_params.ec_curve() == rtc::EC_NIST_P256); - msg_id = MSG_SUCCESS_ECDSA; - } - rtc::Thread::Current()->Post(RTC_FROM_HERE, this, msg_id, msg); - } - - static rtc::scoped_refptr GenerateCertificate() { - switch (rtc::KT_DEFAULT) { - case rtc::KT_RSA: - return rtc::RTCCertificate::FromPEM(kRsaPems[0]); - case rtc::KT_ECDSA: - return rtc::RTCCertificate::FromPEM(kEcdsaPems[0]); - default: - RTC_NOTREACHED(); - return nullptr; - } - } - - private: - enum { - MSG_SUCCESS_RSA, - MSG_SUCCESS_ECDSA, - MSG_FAILURE, - }; - - const rtc::RTCCertificatePEM& get_pem(const rtc::KeyType& key_type) const { - switch (key_type) { - case rtc::KT_RSA: - return kRsaPems[key_index_]; - case rtc::KT_ECDSA: - return kEcdsaPems[key_index_]; - default: - RTC_NOTREACHED(); - return kEcdsaPems[key_index_]; - } - } - const std::string& get_key(const rtc::KeyType& key_type) const { - return get_pem(key_type).private_key(); - } - const std::string& get_cert(const rtc::KeyType& key_type) const { - return get_pem(key_type).certificate(); - } - - // rtc::MessageHandler implementation. - void OnMessage(rtc::Message* msg) override { - MessageData* message_data = static_cast(msg->pdata); - rtc::scoped_refptr callback = - message_data->data(); - rtc::scoped_refptr certificate; - switch (msg->message_id) { - case MSG_SUCCESS_RSA: - case MSG_SUCCESS_ECDSA: { - rtc::KeyType key_type = - msg->message_id == MSG_SUCCESS_RSA ? rtc::KT_RSA : rtc::KT_ECDSA; - certificate = rtc::RTCCertificate::FromPEM(get_pem(key_type)); - RTC_DCHECK(certificate); - ++generated_certificates_; - callback->OnSuccess(certificate); - break; - } - case MSG_FAILURE: - callback->OnFailure(); - break; - } - delete message_data; - } - - bool should_fail_; - int key_index_ = 0; - int generated_certificates_ = 0; -}; - -#endif // WEBRTC_API_TEST_FAKERTCCERTIFICATEGENERATOR_H_ diff --git a/WebRtc.NET/include/webrtc/api/test/fakevideotrackrenderer.h b/WebRtc.NET/include/webrtc/api/test/fakevideotrackrenderer.h deleted file mode 100644 index 0d9b2488..00000000 --- a/WebRtc.NET/include/webrtc/api/test/fakevideotrackrenderer.h +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright 2012 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_API_TEST_FAKEVIDEOTRACKRENDERER_H_ -#define WEBRTC_API_TEST_FAKEVIDEOTRACKRENDERER_H_ - -#include "webrtc/api/mediastreaminterface.h" -#include "webrtc/media/base/fakevideorenderer.h" - -namespace webrtc { - -class FakeVideoTrackRenderer : public cricket::FakeVideoRenderer { - public: - FakeVideoTrackRenderer(VideoTrackInterface* video_track) - : video_track_(video_track) { - video_track_->AddOrUpdateSink(this, rtc::VideoSinkWants()); - } - ~FakeVideoTrackRenderer() { video_track_->RemoveSink(this); } - - private: - rtc::scoped_refptr video_track_; -}; - -} // namespace webrtc - -#endif // WEBRTC_API_TEST_FAKEVIDEOTRACKRENDERER_H_ diff --git a/WebRtc.NET/include/webrtc/api/test/fakevideotracksource.h b/WebRtc.NET/include/webrtc/api/test/fakevideotracksource.h deleted file mode 100644 index 0638a1f1..00000000 --- a/WebRtc.NET/include/webrtc/api/test/fakevideotracksource.h +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Copyright 2016 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_API_TEST_FAKEVIDEOTRACKSOURCE_H_ -#define WEBRTC_API_TEST_FAKEVIDEOTRACKSOURCE_H_ - -#include "webrtc/api/mediastreaminterface.h" -#include "webrtc/api/videotracksource.h" -#include "webrtc/media/base/fakevideocapturer.h" - -namespace webrtc { - -class FakeVideoTrackSource : public VideoTrackSource { - public: - static rtc::scoped_refptr Create(bool is_screencast) { - return new rtc::RefCountedObject(is_screencast); - } - - static rtc::scoped_refptr Create() { - return Create(false); - } - - cricket::FakeVideoCapturer* fake_video_capturer() { - return &fake_video_capturer_; - } - - bool is_screencast() const override { return is_screencast_; } - - protected: - explicit FakeVideoTrackSource(bool is_screencast) - : VideoTrackSource(&fake_video_capturer_, false /* remote */), - is_screencast_(is_screencast) {} - virtual ~FakeVideoTrackSource() {} - - private: - cricket::FakeVideoCapturer fake_video_capturer_; - const bool is_screencast_; -}; - -} // namespace webrtc - -#endif // WEBRTC_API_TEST_FAKEVIDEOTRACKSOURCE_H_ diff --git a/WebRtc.NET/include/webrtc/api/test/mock_datachannel.h b/WebRtc.NET/include/webrtc/api/test/mock_datachannel.h deleted file mode 100644 index 1cb1948f..00000000 --- a/WebRtc.NET/include/webrtc/api/test/mock_datachannel.h +++ /dev/null @@ -1,58 +0,0 @@ -/* - * Copyright 2016 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_API_TEST_MOCK_DATACHANNEL_H_ -#define WEBRTC_API_TEST_MOCK_DATACHANNEL_H_ - -#include "webrtc/api/datachannel.h" -#include "webrtc/test/gmock.h" - -namespace webrtc { - -class MockDataChannel : public rtc::RefCountedObject { - public: - MockDataChannel(int id, DataState state) - : MockDataChannel(id, "MockDataChannel", state, "udp", 0, 0, 0, 0) { - } - MockDataChannel( - int id, - const std::string& label, - DataState state, - const std::string& protocol, - uint32_t messages_sent, - uint64_t bytes_sent, - uint32_t messages_received, - uint64_t bytes_received) - : rtc::RefCountedObject( - nullptr, cricket::DCT_NONE, label) { - EXPECT_CALL(*this, id()).WillRepeatedly(testing::Return(id)); - EXPECT_CALL(*this, state()).WillRepeatedly(testing::Return(state)); - EXPECT_CALL(*this, protocol()).WillRepeatedly(testing::Return(protocol)); - EXPECT_CALL(*this, messages_sent()).WillRepeatedly( - testing::Return(messages_sent)); - EXPECT_CALL(*this, bytes_sent()).WillRepeatedly( - testing::Return(bytes_sent)); - EXPECT_CALL(*this, messages_received()).WillRepeatedly( - testing::Return(messages_received)); - EXPECT_CALL(*this, bytes_received()).WillRepeatedly( - testing::Return(bytes_received)); - } - MOCK_CONST_METHOD0(id, int()); - MOCK_CONST_METHOD0(state, DataState()); - MOCK_CONST_METHOD0(protocol, std::string()); - MOCK_CONST_METHOD0(messages_sent, uint32_t()); - MOCK_CONST_METHOD0(bytes_sent, uint64_t()); - MOCK_CONST_METHOD0(messages_received, uint32_t()); - MOCK_CONST_METHOD0(bytes_received, uint64_t()); -}; - -} // namespace webrtc - -#endif // WEBRTC_API_TEST_MOCK_DATACHANNEL_H_ diff --git a/WebRtc.NET/include/webrtc/api/test/mock_peerconnection.h b/WebRtc.NET/include/webrtc/api/test/mock_peerconnection.h deleted file mode 100644 index ca39d2ab..00000000 --- a/WebRtc.NET/include/webrtc/api/test/mock_peerconnection.h +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright 2016 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_API_TEST_MOCK_PEERCONNECTION_H_ -#define WEBRTC_API_TEST_MOCK_PEERCONNECTION_H_ - -#include - -#include "webrtc/api/peerconnection.h" -#include "webrtc/test/gmock.h" - -namespace webrtc { - -// The factory isn't really used; it just satisfies the base PeerConnection. -class FakePeerConnectionFactory - : public rtc::RefCountedObject {}; - -class MockPeerConnection - : public rtc::RefCountedObject { - public: - MockPeerConnection() - : rtc::RefCountedObject( - new FakePeerConnectionFactory()) {} - MOCK_METHOD0(local_streams, - rtc::scoped_refptr()); - MOCK_METHOD0(remote_streams, - rtc::scoped_refptr()); - MOCK_METHOD0(session, WebRtcSession*()); - MOCK_CONST_METHOD0(GetSenders, - std::vector>()); - MOCK_CONST_METHOD0(GetReceivers, - std::vector>()); - MOCK_CONST_METHOD0(sctp_data_channels, - const std::vector>&()); -}; - -} // namespace webrtc - -#endif // WEBRTC_API_TEST_MOCK_PEERCONNECTION_H_ diff --git a/WebRtc.NET/include/webrtc/api/test/mock_rtpreceiver.h b/WebRtc.NET/include/webrtc/api/test/mock_rtpreceiver.h deleted file mode 100644 index 25f5c28c..00000000 --- a/WebRtc.NET/include/webrtc/api/test/mock_rtpreceiver.h +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Copyright 2016 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_API_TEST_MOCK_RTPRECEIVER_H_ -#define WEBRTC_API_TEST_MOCK_RTPRECEIVER_H_ - -#include - -#include "webrtc/api/rtpreceiverinterface.h" -#include "webrtc/test/gmock.h" - -namespace webrtc { - -class MockRtpReceiver : public rtc::RefCountedObject { - public: - MOCK_METHOD1(SetTrack, void(MediaStreamTrackInterface*)); - MOCK_CONST_METHOD0(track, rtc::scoped_refptr()); - MOCK_CONST_METHOD0(media_type, cricket::MediaType()); - MOCK_CONST_METHOD0(id, std::string()); - MOCK_CONST_METHOD0(GetParameters, RtpParameters()); - MOCK_METHOD1(SetParameters, bool(const RtpParameters&)); - MOCK_METHOD1(SetObserver, void(RtpReceiverObserverInterface*)); -}; - -} // namespace webrtc - -#endif // WEBRTC_API_TEST_MOCK_RTPRECEIVER_H_ diff --git a/WebRtc.NET/include/webrtc/api/test/mock_rtpsender.h b/WebRtc.NET/include/webrtc/api/test/mock_rtpsender.h deleted file mode 100644 index 7abc4e54..00000000 --- a/WebRtc.NET/include/webrtc/api/test/mock_rtpsender.h +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright 2016 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_API_TEST_MOCK_RTPSENDER_H_ -#define WEBRTC_API_TEST_MOCK_RTPSENDER_H_ - -#include -#include - -#include "webrtc/api/rtpsenderinterface.h" -#include "webrtc/test/gmock.h" - -namespace webrtc { - -class MockRtpSender : public rtc::RefCountedObject { - public: - MOCK_METHOD1(SetTrack, bool(MediaStreamTrackInterface*)); - MOCK_CONST_METHOD0(track, rtc::scoped_refptr()); - MOCK_CONST_METHOD0(ssrc, uint32_t()); - MOCK_CONST_METHOD0(media_type, cricket::MediaType()); - MOCK_CONST_METHOD0(id, std::string()); - MOCK_CONST_METHOD0(stream_ids, std::vector()); - MOCK_CONST_METHOD0(GetParameters, RtpParameters()); - MOCK_METHOD1(SetParameters, bool(const RtpParameters&)); -}; - -} // namespace webrtc - -#endif // WEBRTC_API_TEST_MOCK_RTPSENDER_H_ diff --git a/WebRtc.NET/include/webrtc/api/test/mock_webrtcsession.h b/WebRtc.NET/include/webrtc/api/test/mock_webrtcsession.h deleted file mode 100644 index ae750356..00000000 --- a/WebRtc.NET/include/webrtc/api/test/mock_webrtcsession.h +++ /dev/null @@ -1,65 +0,0 @@ -/* - * Copyright 2016 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_API_TEST_MOCK_WEBRTCSESSION_H_ -#define WEBRTC_API_TEST_MOCK_WEBRTCSESSION_H_ - -#include -#include - -#include "webrtc/api/webrtcsession.h" -#include "webrtc/media/sctp/sctptransportinternal.h" -#include "webrtc/test/gmock.h" - -namespace webrtc { - -class MockWebRtcSession : public webrtc::WebRtcSession { - public: - // TODO(nisse): Valid overrides commented out, because the gmock - // methods don't use any override declarations, and we want to avoid - // warnings from -Winconsistent-missing-override. See - // http://crbug.com/428099. - explicit MockWebRtcSession(MediaControllerInterface* media_controller) - : WebRtcSession( - media_controller, - rtc::Thread::Current(), - rtc::Thread::Current(), - rtc::Thread::Current(), - nullptr, - std::unique_ptr( - new cricket::TransportController(rtc::Thread::Current(), - rtc::Thread::Current(), - nullptr)), - std::unique_ptr()) {} - MOCK_METHOD0(voice_channel, cricket::VoiceChannel*()); - MOCK_METHOD0(video_channel, cricket::VideoChannel*()); - // Libjingle uses "local" for a outgoing track, and "remote" for a incoming - // track. - MOCK_METHOD2(GetLocalTrackIdBySsrc, bool(uint32_t, std::string*)); - MOCK_METHOD2(GetRemoteTrackIdBySsrc, bool(uint32_t, std::string*)); - MOCK_METHOD1(GetStats, - std::unique_ptr(const ChannelNamePairs&)); - MOCK_METHOD2(GetLocalCertificate, - bool(const std::string& transport_name, - rtc::scoped_refptr* certificate)); - - // Workaround for gmock's inability to cope with move-only return values. - std::unique_ptr GetRemoteSSLCertificate( - const std::string& transport_name) /* override */ { - return std::unique_ptr( - GetRemoteSSLCertificate_ReturnsRawPointer(transport_name)); - } - MOCK_METHOD1(GetRemoteSSLCertificate_ReturnsRawPointer, - rtc::SSLCertificate*(const std::string& transport_name)); -}; - -} // namespace webrtc - -#endif // WEBRTC_API_TEST_MOCK_WEBRTCSESSION_H_ diff --git a/WebRtc.NET/include/webrtc/api/test/mockpeerconnectionobservers.h b/WebRtc.NET/include/webrtc/api/test/mockpeerconnectionobservers.h deleted file mode 100644 index 1f000aff..00000000 --- a/WebRtc.NET/include/webrtc/api/test/mockpeerconnectionobservers.h +++ /dev/null @@ -1,230 +0,0 @@ -/* - * Copyright 2012 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -// This file contains mock implementations of observers used in PeerConnection. - -#ifndef WEBRTC_API_TEST_MOCKPEERCONNECTIONOBSERVERS_H_ -#define WEBRTC_API_TEST_MOCKPEERCONNECTIONOBSERVERS_H_ - -#include -#include - -#include "webrtc/api/datachannelinterface.h" -#include "webrtc/base/checks.h" - -namespace webrtc { - -class MockCreateSessionDescriptionObserver - : public webrtc::CreateSessionDescriptionObserver { - public: - MockCreateSessionDescriptionObserver() - : called_(false), - result_(false) {} - virtual ~MockCreateSessionDescriptionObserver() {} - virtual void OnSuccess(SessionDescriptionInterface* desc) { - called_ = true; - result_ = true; - desc_.reset(desc); - } - virtual void OnFailure(const std::string& error) { - called_ = true; - result_ = false; - } - bool called() const { return called_; } - bool result() const { return result_; } - SessionDescriptionInterface* release_desc() { - return desc_.release(); - } - - private: - bool called_; - bool result_; - std::unique_ptr desc_; -}; - -class MockSetSessionDescriptionObserver - : public webrtc::SetSessionDescriptionObserver { - public: - MockSetSessionDescriptionObserver() - : called_(false), - result_(false) {} - virtual ~MockSetSessionDescriptionObserver() {} - virtual void OnSuccess() { - called_ = true; - result_ = true; - } - virtual void OnFailure(const std::string& error) { - called_ = true; - result_ = false; - } - bool called() const { return called_; } - bool result() const { return result_; } - - private: - bool called_; - bool result_; -}; - -class MockDataChannelObserver : public webrtc::DataChannelObserver { - public: - explicit MockDataChannelObserver(webrtc::DataChannelInterface* channel) - : channel_(channel) { - channel_->RegisterObserver(this); - state_ = channel_->state(); - } - virtual ~MockDataChannelObserver() { - channel_->UnregisterObserver(); - } - - void OnBufferedAmountChange(uint64_t previous_amount) override {} - - void OnStateChange() override { state_ = channel_->state(); } - void OnMessage(const DataBuffer& buffer) override { - messages_.push_back( - std::string(buffer.data.data(), buffer.data.size())); - } - - bool IsOpen() const { return state_ == DataChannelInterface::kOpen; } - std::vector messages() const { return messages_; } - std::string last_message() const { - return messages_.empty() ? std::string() : messages_.back(); - } - size_t received_message_count() const { return messages_.size(); } - - private: - rtc::scoped_refptr channel_; - DataChannelInterface::DataState state_; - std::vector messages_; -}; - -class MockStatsObserver : public webrtc::StatsObserver { - public: - MockStatsObserver() : called_(false), stats_() {} - virtual ~MockStatsObserver() {} - - virtual void OnComplete(const StatsReports& reports) { - RTC_CHECK(!called_); - called_ = true; - stats_.Clear(); - stats_.number_of_reports = reports.size(); - for (const auto* r : reports) { - if (r->type() == StatsReport::kStatsReportTypeSsrc) { - stats_.timestamp = r->timestamp(); - GetIntValue(r, StatsReport::kStatsValueNameAudioOutputLevel, - &stats_.audio_output_level); - GetIntValue(r, StatsReport::kStatsValueNameAudioInputLevel, - &stats_.audio_input_level); - GetIntValue(r, StatsReport::kStatsValueNameBytesReceived, - &stats_.bytes_received); - GetIntValue(r, StatsReport::kStatsValueNameBytesSent, - &stats_.bytes_sent); - } else if (r->type() == StatsReport::kStatsReportTypeBwe) { - stats_.timestamp = r->timestamp(); - GetIntValue(r, StatsReport::kStatsValueNameAvailableReceiveBandwidth, - &stats_.available_receive_bandwidth); - } else if (r->type() == StatsReport::kStatsReportTypeComponent) { - stats_.timestamp = r->timestamp(); - GetStringValue(r, StatsReport::kStatsValueNameDtlsCipher, - &stats_.dtls_cipher); - GetStringValue(r, StatsReport::kStatsValueNameSrtpCipher, - &stats_.srtp_cipher); - } - } - } - - bool called() const { return called_; } - size_t number_of_reports() const { return stats_.number_of_reports; } - double timestamp() const { return stats_.timestamp; } - - int AudioOutputLevel() const { - RTC_CHECK(called_); - return stats_.audio_output_level; - } - - int AudioInputLevel() const { - RTC_CHECK(called_); - return stats_.audio_input_level; - } - - int BytesReceived() const { - RTC_CHECK(called_); - return stats_.bytes_received; - } - - int BytesSent() const { - RTC_CHECK(called_); - return stats_.bytes_sent; - } - - int AvailableReceiveBandwidth() const { - RTC_CHECK(called_); - return stats_.available_receive_bandwidth; - } - - std::string DtlsCipher() const { - RTC_CHECK(called_); - return stats_.dtls_cipher; - } - - std::string SrtpCipher() const { - RTC_CHECK(called_); - return stats_.srtp_cipher; - } - - private: - bool GetIntValue(const StatsReport* report, - StatsReport::StatsValueName name, - int* value) { - const StatsReport::Value* v = report->FindValue(name); - if (v) { - // TODO(tommi): We should really just be using an int here :-/ - *value = rtc::FromString(v->ToString()); - } - return v != nullptr; - } - - bool GetStringValue(const StatsReport* report, - StatsReport::StatsValueName name, - std::string* value) { - const StatsReport::Value* v = report->FindValue(name); - if (v) - *value = v->ToString(); - return v != nullptr; - } - - bool called_; - struct { - void Clear() { - number_of_reports = 0; - timestamp = 0; - audio_output_level = 0; - audio_input_level = 0; - bytes_received = 0; - bytes_sent = 0; - available_receive_bandwidth = 0; - dtls_cipher.clear(); - srtp_cipher.clear(); - } - - size_t number_of_reports; - double timestamp; - int audio_output_level; - int audio_input_level; - int bytes_received; - int bytes_sent; - int available_receive_bandwidth; - std::string dtls_cipher; - std::string srtp_cipher; - } stats_; -}; - -} // namespace webrtc - -#endif // WEBRTC_API_TEST_MOCKPEERCONNECTIONOBSERVERS_H_ diff --git a/WebRtc.NET/include/webrtc/api/test/peerconnectiontestwrapper.h b/WebRtc.NET/include/webrtc/api/test/peerconnectiontestwrapper.h deleted file mode 100644 index 6433e8fb..00000000 --- a/WebRtc.NET/include/webrtc/api/test/peerconnectiontestwrapper.h +++ /dev/null @@ -1,118 +0,0 @@ -/* - * Copyright 2013 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_API_TEST_PEERCONNECTIONTESTWRAPPER_H_ -#define WEBRTC_API_TEST_PEERCONNECTIONTESTWRAPPER_H_ - -#include - -#include "webrtc/api/peerconnectioninterface.h" -#include "webrtc/api/test/fakeaudiocapturemodule.h" -#include "webrtc/api/test/fakeconstraints.h" -#include "webrtc/api/test/fakevideotrackrenderer.h" -#include "webrtc/base/sigslot.h" - -class PeerConnectionTestWrapper - : public webrtc::PeerConnectionObserver, - public webrtc::CreateSessionDescriptionObserver, - public sigslot::has_slots<> { - public: - // We need these using declarations because there are two versions of each of - // the below methods and we only override one of them. - // TODO(deadbeef): Remove once there's only one version of the methods. - using PeerConnectionObserver::OnAddStream; - using PeerConnectionObserver::OnRemoveStream; - using PeerConnectionObserver::OnDataChannel; - - static void Connect(PeerConnectionTestWrapper* caller, - PeerConnectionTestWrapper* callee); - - PeerConnectionTestWrapper(const std::string& name, - rtc::Thread* network_thread, - rtc::Thread* worker_thread); - virtual ~PeerConnectionTestWrapper(); - - bool CreatePc( - const webrtc::MediaConstraintsInterface* constraints, - const webrtc::PeerConnectionInterface::RTCConfiguration& config); - - webrtc::PeerConnectionInterface* pc() { return peer_connection_.get(); } - - rtc::scoped_refptr CreateDataChannel( - const std::string& label, - const webrtc::DataChannelInit& init); - - // Implements PeerConnectionObserver. - virtual void OnSignalingChange( - webrtc::PeerConnectionInterface::SignalingState new_state) {} - virtual void OnStateChange( - webrtc::PeerConnectionObserver::StateType state_changed) {} - virtual void OnAddStream( - rtc::scoped_refptr stream); - virtual void OnRemoveStream( - rtc::scoped_refptr stream) {} - virtual void OnDataChannel( - rtc::scoped_refptr data_channel); - virtual void OnRenegotiationNeeded() {} - virtual void OnIceConnectionChange( - webrtc::PeerConnectionInterface::IceConnectionState new_state) {} - virtual void OnIceGatheringChange( - webrtc::PeerConnectionInterface::IceGatheringState new_state) {} - virtual void OnIceCandidate(const webrtc::IceCandidateInterface* candidate); - virtual void OnIceComplete() {} - - // Implements CreateSessionDescriptionObserver. - virtual void OnSuccess(webrtc::SessionDescriptionInterface* desc); - virtual void OnFailure(const std::string& error) {} - - void CreateOffer(const webrtc::MediaConstraintsInterface* constraints); - void CreateAnswer(const webrtc::MediaConstraintsInterface* constraints); - void ReceiveOfferSdp(const std::string& sdp); - void ReceiveAnswerSdp(const std::string& sdp); - void AddIceCandidate(const std::string& sdp_mid, int sdp_mline_index, - const std::string& candidate); - void WaitForCallEstablished(); - void WaitForConnection(); - void WaitForAudio(); - void WaitForVideo(); - void GetAndAddUserMedia( - bool audio, const webrtc::FakeConstraints& audio_constraints, - bool video, const webrtc::FakeConstraints& video_constraints); - - // sigslots - sigslot::signal1 SignalOnIceCandidateCreated; - sigslot::signal3 SignalOnIceCandidateReady; - sigslot::signal1 SignalOnSdpCreated; - sigslot::signal1 SignalOnSdpReady; - sigslot::signal1 SignalOnDataChannel; - - private: - void SetLocalDescription(const std::string& type, const std::string& sdp); - void SetRemoteDescription(const std::string& type, const std::string& sdp); - bool CheckForConnection(); - bool CheckForAudio(); - bool CheckForVideo(); - rtc::scoped_refptr GetUserMedia( - bool audio, const webrtc::FakeConstraints& audio_constraints, - bool video, const webrtc::FakeConstraints& video_constraints); - - std::string name_; - rtc::Thread* const network_thread_; - rtc::Thread* const worker_thread_; - rtc::scoped_refptr peer_connection_; - rtc::scoped_refptr - peer_connection_factory_; - rtc::scoped_refptr fake_audio_capture_module_; - std::unique_ptr renderer_; -}; - -#endif // WEBRTC_API_TEST_PEERCONNECTIONTESTWRAPPER_H_ diff --git a/WebRtc.NET/include/webrtc/api/test/testsdpstrings.h b/WebRtc.NET/include/webrtc/api/test/testsdpstrings.h deleted file mode 100644 index b203aad6..00000000 --- a/WebRtc.NET/include/webrtc/api/test/testsdpstrings.h +++ /dev/null @@ -1,132 +0,0 @@ -/* - * Copyright 2012 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -// This file contain SDP strings used for testing. - -#ifndef WEBRTC_API_TEST_TESTSDPSTRINGS_H_ -#define WEBRTC_API_TEST_TESTSDPSTRINGS_H_ - -namespace webrtc { - -// SDP offer string from a Nightly FireFox build. -static const char kFireFoxSdpOffer[] = - "v=0\r\n" - "o=Mozilla-SIPUA 23551 0 IN IP4 0.0.0.0\r\n" - "s=SIP Call\r\n" - "t=0 0\r\n" - "a=ice-ufrag:e5785931\r\n" - "a=ice-pwd:36fb7878390db89481c1d46daa4278d8\r\n" - "a=fingerprint:sha-256 A7:24:72:CA:6E:02:55:39:BA:66:DF:6E:CC:4C:D8:B0:1A:" - "BF:1A:56:65:7D:F4:03:AD:7E:77:43:2A:29:EC:93\r\n" - "m=audio 36993 RTP/SAVPF 109 0 8 101\r\n" - "c=IN IP4 74.95.2.170\r\n" - "a=rtpmap:109 opus/48000/2\r\n" - "a=ptime:20\r\n" - "a=rtcp-mux\r\n" - "a=rtpmap:0 PCMU/8000\r\n" - "a=rtpmap:8 PCMA/8000\r\n" - "a=rtpmap:101 telephone-event/8000\r\n" - "a=fmtp:101 0-15\r\n" - "a=sendrecv\r\n" - "a=candidate:0 1 UDP 2112946431 172.16.191.1 61725 typ host\r\n" - "a=candidate:2 1 UDP 2112487679 172.16.131.1 58798 typ host\r\n" - "a=candidate:4 1 UDP 2113667327 10.0.254.2 58122 typ host\r\n" - "a=candidate:5 1 UDP 1694302207 74.95.2.170 36993 typ srflx raddr " - "10.0.254.2 rport 58122\r\n" - "a=candidate:0 2 UDP 2112946430 172.16.191.1 55025 typ host\r\n" - "a=candidate:2 2 UDP 2112487678 172.16.131.1 63576 typ host\r\n" - "a=candidate:4 2 UDP 2113667326 10.0.254.2 50962 typ host\r\n" - "a=candidate:5 2 UDP 1694302206 74.95.2.170 41028 typ srflx raddr" - " 10.0.254.2 rport 50962\r\n" - "m=video 38826 RTP/SAVPF 120\r\n" - "c=IN IP4 74.95.2.170\r\n" - "a=rtcp-mux\r\n" - "a=rtpmap:120 VP8/90000\r\n" - "a=sendrecv\r\n" - "a=candidate:0 1 UDP 2112946431 172.16.191.1 62017 typ host\r\n" - "a=candidate:2 1 UDP 2112487679 172.16.131.1 59741 typ host\r\n" - "a=candidate:4 1 UDP 2113667327 10.0.254.2 62652 typ host\r\n" - "a=candidate:5 1 UDP 1694302207 74.95.2.170 38826 typ srflx raddr" - " 10.0.254.2 rport 62652\r\n" - "a=candidate:0 2 UDP 2112946430 172.16.191.1 63440 typ host\r\n" - "a=candidate:2 2 UDP 2112487678 172.16.131.1 51847 typ host\r\n" - "a=candidate:4 2 UDP 2113667326 10.0.254.2 58890 typ host\r\n" - "a=candidate:5 2 UDP 1694302206 74.95.2.170 33611 typ srflx raddr" - " 10.0.254.2 rport 58890\r\n" -#ifdef HAVE_SCTP - "m=application 45536 SCTP/DTLS 5000\r\n" - "c=IN IP4 74.95.2.170\r\n" - "a=fmtp:5000 protocol=webrtc-datachannel;streams=16\r\n" - "a=sendrecv\r\n" - "a=candidate:0 1 UDP 2112946431 172.16.191.1 60248 typ host\r\n" - "a=candidate:2 1 UDP 2112487679 172.16.131.1 55925 typ host\r\n" - "a=candidate:4 1 UDP 2113667327 10.0.254.2 65268 typ host\r\n" - "a=candidate:5 1 UDP 1694302207 74.95.2.170 45536 typ srflx raddr" - " 10.0.254.2 rport 65268\r\n" - "a=candidate:0 2 UDP 2112946430 172.16.191.1 49162 typ host\r\n" - "a=candidate:2 2 UDP 2112487678 172.16.131.1 59635 typ host\r\n" - "a=candidate:4 2 UDP 2113667326 10.0.254.2 61232 typ host\r\n" - "a=candidate:5 2 UDP 1694302206 74.95.2.170 45468 typ srflx raddr" - " 10.0.254.2 rport 61232\r\n" -#endif - ; - -// Audio SDP with a limited set of audio codecs. -static const char kAudioSdp[] = - "v=0\r\n" - "o=- 7859371131 2 IN IP4 192.168.30.208\r\n" - "s=-\r\n" - "c=IN IP4 192.168.30.208\r\n" - "t=0 0\r\n" - "m=audio 16000 RTP/SAVPF 0 8 126\r\n" - "a=rtpmap:0 PCMU/8000\r\n" - "a=rtpmap:8 PCMA/8000\r\n" - "a=rtpmap:126 telephone-event/8000\r\n" - "a=sendrecv\r\n" - "a=rtcp:16000 IN IP4 192.168.30.208\r\n" - "a=rtcp-mux\r\n" - "a=crypto:1 AES_CM_128_HMAC_SHA1_80 " - "inline:tvKIFjbMQ7W0/C2RzhwN0oQglj/7GJg+frdsNRxt\r\n" - "a=ice-ufrag:AI2sRT3r\r\n" - "a=ice-pwd:lByS9z2RSQlSE9XurlvjYmEm\r\n" - "a=ssrc:4227871655 cname:GeAAgb6XCPNLVMX5\r\n" - "a=ssrc:4227871655 msid:1NFAV3iD08ioO2339rQS9pfOI9mDf6GeG9F4 a0\r\n" - "a=ssrc:4227871655 mslabel:1NFAV3iD08ioO2339rQS9pfOI9mDf6GeG9F4\r\n" - "a=ssrc:4227871655 label:1NFAV3iD08ioO2339rQS9pfOI9mDf6GeG9F4a0\r\n" - "a=mid:audio\r\n"; - -static const char kAudioSdpWithUnsupportedCodecs[] = - "v=0\r\n" - "o=- 6858750541 2 IN IP4 192.168.30.208\r\n" - "s=-\r\n" - "c=IN IP4 192.168.30.208\r\n" - "t=0 0\r\n" - "m=audio 16000 RTP/SAVPF 0 8 18 110 126\r\n" - "a=rtpmap:0 PCMU/8000\r\n" - "a=rtpmap:8 PCMA/8000\r\n" - "a=rtpmap:18 WeirdCodec1/8000\r\n" - "a=rtpmap:110 WeirdCodec2/8000\r\n" - "a=rtpmap:126 telephone-event/8000\r\n" - "a=sendonly\r\n" - "a=rtcp:16000 IN IP4 192.168.30.208\r\n" - "a=rtcp-mux\r\n" - "a=crypto:1 AES_CM_128_HMAC_SHA1_80 " - "inline:tvKIFjbMQ7W0/C2RzhwN0oQglj/7GJg+frdsNRxt\r\n" - "a=ice-ufrag:AI2sRT3r\r\n" - "a=ice-pwd:lByS9z2RSQlSE9XurlvjYmEm\r\n" - "a=ssrc:4227871655 cname:TsmD02HRfhkJBm4m\r\n" - "a=ssrc:4227871655 msid:7nU0TApbB-n4dfPlCplWT9QTEsbBDS1IlpW3 a0\r\n" - "a=ssrc:4227871655 mslabel:7nU0TApbB-n4dfPlCplWT9QTEsbBDS1IlpW3\r\n" - "a=ssrc:4227871655 label:7nU0TApbB-n4dfPlCplWT9QTEsbBDS1IlpW3a0\r\n" - "a=mid:audio\r\n"; - -} // namespace webrtc - -#endif // WEBRTC_API_TEST_TESTSDPSTRINGS_H_ diff --git a/WebRtc.NET/include/webrtc/api/trackmediainfomap.h b/WebRtc.NET/include/webrtc/api/trackmediainfomap.h deleted file mode 100644 index 7bf09772..00000000 --- a/WebRtc.NET/include/webrtc/api/trackmediainfomap.h +++ /dev/null @@ -1,98 +0,0 @@ -/* - * Copyright 2016 The WebRTC Project Authors. All rights reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_API_TRACKMEDIAINFOMAP_H_ -#define WEBRTC_API_TRACKMEDIAINFOMAP_H_ - -#include -#include -#include - -#include "webrtc/api/mediastreaminterface.h" -#include "webrtc/api/rtpreceiverinterface.h" -#include "webrtc/api/rtpsenderinterface.h" -#include "webrtc/base/refcount.h" -#include "webrtc/media/base/mediachannel.h" - -namespace webrtc { - -// Audio/video tracks and sender/receiver statistical information are associated -// with each other based on attachments to RTP senders/receivers. This class -// maps that relationship, in both directions, so that stats about a track can -// be retrieved on a per-attachment basis. -// -// An RTP sender/receiver sends or receives media for a set of SSRCs. The media -// comes from an audio/video track that is attached to it. -// |[Voice/Video][Sender/Receiver]Info| has statistical information for a set of -// SSRCs. Looking at the RTP senders and receivers uncovers the track <-> info -// relationships, which this class does. -class TrackMediaInfoMap { - public: - TrackMediaInfoMap( - std::unique_ptr voice_media_info, - std::unique_ptr video_media_info, - const std::vector>& rtp_senders, - const std::vector>& - rtp_receivers); - - const cricket::VoiceMediaInfo* voice_media_info() const { - return voice_media_info_.get(); - } - const cricket::VideoMediaInfo* video_media_info() const { - return video_media_info_.get(); - } - - const std::vector* GetVoiceSenderInfos( - const AudioTrackInterface& local_audio_track) const; - const cricket::VoiceReceiverInfo* GetVoiceReceiverInfo( - const AudioTrackInterface& remote_audio_track) const; - const std::vector* GetVideoSenderInfos( - const VideoTrackInterface& local_video_track) const; - const cricket::VideoReceiverInfo* GetVideoReceiverInfo( - const VideoTrackInterface& remote_video_track) const; - - rtc::scoped_refptr GetAudioTrack( - const cricket::VoiceSenderInfo& voice_sender_info) const; - rtc::scoped_refptr GetAudioTrack( - const cricket::VoiceReceiverInfo& voice_receiver_info) const; - rtc::scoped_refptr GetVideoTrack( - const cricket::VideoSenderInfo& video_sender_info) const; - rtc::scoped_refptr GetVideoTrack( - const cricket::VideoReceiverInfo& video_receiver_info) const; - - private: - std::unique_ptr voice_media_info_; - std::unique_ptr video_media_info_; - // These maps map tracks (identified by a pointer) to their corresponding info - // object of the correct kind. One track can map to multiple info objects. - std::map> - voice_infos_by_local_track_; - std::map - voice_info_by_remote_track_; - std::map> - video_infos_by_local_track_; - std::map - video_info_by_remote_track_; - // These maps map info objects to their corresponding tracks. They are always - // the inverse of the maps above. One info object always maps to only one - // track. - std::map> audio_track_by_sender_info_; - std::map> audio_track_by_receiver_info_; - std::map> video_track_by_sender_info_; - std::map> video_track_by_receiver_info_; -}; - -} // namespace webrtc - -#endif // WEBRTC_API_TRACKMEDIAINFOMAP_H_ diff --git a/WebRtc.NET/include/webrtc/api/udptransportinterface.h b/WebRtc.NET/include/webrtc/api/udptransportinterface.h deleted file mode 100644 index 1a285311..00000000 --- a/WebRtc.NET/include/webrtc/api/udptransportinterface.h +++ /dev/null @@ -1,57 +0,0 @@ -/* - * Copyright 2017 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_API_UDPTRANSPORTINTERFACE_H_ -#define WEBRTC_API_UDPTRANSPORTINTERFACE_H_ - -#include "webrtc/api/proxy.h" -#include "webrtc/base/socketaddress.h" - -namespace webrtc { - -// Interface for a raw UDP transport (not using ICE), meaning a combination of -// a local/remote IP address/port. -// -// An instance can be instantiated using OrtcFactory. -// -// Each instance reserves a UDP port, which will be freed when the -// UdpTransportInterface destructor is called. -// -// Calling SetRemoteAddress sets the destination of outgoing packets; without a -// destination, packets can't be sent, but they can be received. -class UdpTransportInterface { - public: - virtual ~UdpTransportInterface() {} - - // Get the address of the socket allocated for this transport. - virtual rtc::SocketAddress GetLocalAddress() const = 0; - - // Sets the address to which packets will be delivered. - // - // Calling with a "nil" (default-constructed) address is legal, and unsets - // any previously set destination. - // - // However, calling with an incomplete address (port or IP not set) will - // fail. - virtual bool SetRemoteAddress(const rtc::SocketAddress& dest) = 0; - // Simple getter. If never set, returns nil address. - virtual rtc::SocketAddress GetRemoteAddress() const = 0; -}; - -BEGIN_OWNED_PROXY_MAP(UdpTransport) - PROXY_WORKER_THREAD_DESTRUCTOR() - PROXY_WORKER_CONSTMETHOD0(rtc::SocketAddress, GetLocalAddress) - PROXY_WORKER_METHOD1(bool, SetRemoteAddress, const rtc::SocketAddress&) - PROXY_WORKER_CONSTMETHOD0(rtc::SocketAddress, GetRemoteAddress) -END_PROXY_MAP() - -} // namespace webrtc - -#endif // WEBRTC_API_UDPTRANSPORTINTERFACE_H_ diff --git a/WebRtc.NET/include/webrtc/api/umametrics.h b/WebRtc.NET/include/webrtc/api/umametrics.h deleted file mode 100644 index 3e92bace..00000000 --- a/WebRtc.NET/include/webrtc/api/umametrics.h +++ /dev/null @@ -1,143 +0,0 @@ -/* - * Copyright 2014 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -// This file contains enums related to IPv4/IPv6 metrics. - -#ifndef WEBRTC_API_UMAMETRICS_H_ -#define WEBRTC_API_UMAMETRICS_H_ - -#include "webrtc/base/refcount.h" - -namespace webrtc { - -// Used to specify which enum counter type we're incrementing in -// MetricsObserverInterface::IncrementEnumCounter. -enum PeerConnectionEnumCounterType { - kEnumCounterAddressFamily, - // For the next 2 counters, we track them separately based on the "first hop" - // protocol used by the local candidate. "First hop" means the local candidate - // type in the case of non-TURN candidates, and the protocol used to connect - // to the TURN server in the case of TURN candidates. - kEnumCounterIceCandidatePairTypeUdp, - kEnumCounterIceCandidatePairTypeTcp, - - kEnumCounterAudioSrtpCipher, - kEnumCounterAudioSslCipher, - kEnumCounterVideoSrtpCipher, - kEnumCounterVideoSslCipher, - kEnumCounterDataSrtpCipher, - kEnumCounterDataSslCipher, - kEnumCounterDtlsHandshakeError, - kEnumCounterIceRegathering, - kEnumCounterIceRestart, - kPeerConnectionEnumCounterMax -}; - -// Currently this contains information related to WebRTC network/transport -// information. - -// The difference between PeerConnectionEnumCounter and -// PeerConnectionMetricsName is that the "EnumCounter" is only counting the -// occurrences of events, while "Name" has a value associated with it which is -// used to form a histogram. - -// This enum is backed by Chromium's histograms.xml, -// chromium/src/tools/metrics/histograms/histograms.xml -// Existing values cannot be re-ordered and new enums must be added -// before kBoundary. -enum PeerConnectionAddressFamilyCounter { - kPeerConnection_IPv4, - kPeerConnection_IPv6, - kBestConnections_IPv4, - kBestConnections_IPv6, - kPeerConnectionAddressFamilyCounter_Max, -}; - -// TODO(guoweis): Keep previous name here until all references are renamed. -#define kBoundary kPeerConnectionAddressFamilyCounter_Max - -// TODO(guoweis): Keep previous name here until all references are renamed. -typedef PeerConnectionAddressFamilyCounter PeerConnectionUMAMetricsCounter; - -// This enum defines types for UMA samples, which will have a range. -enum PeerConnectionMetricsName { - kNetworkInterfaces_IPv4, // Number of IPv4 interfaces. - kNetworkInterfaces_IPv6, // Number of IPv6 interfaces. - kTimeToConnect, // In milliseconds. - kLocalCandidates_IPv4, // Number of IPv4 local candidates. - kLocalCandidates_IPv6, // Number of IPv6 local candidates. - kPeerConnectionMetricsName_Max -}; - -// TODO(guoweis): Keep previous name here until all references are renamed. -typedef PeerConnectionMetricsName PeerConnectionUMAMetricsName; - -// The IceCandidatePairType has the format of -// _. It is recorded based on the -// type of candidate pair used when the PeerConnection first goes to a completed -// state. When BUNDLE is enabled, only the first transport gets recorded. -enum IceCandidatePairType { - // HostHost is deprecated. It was replaced with the set of types at the bottom - // to report private or public host IP address. - kIceCandidatePairHostHost, - kIceCandidatePairHostSrflx, - kIceCandidatePairHostRelay, - kIceCandidatePairHostPrflx, - kIceCandidatePairSrflxHost, - kIceCandidatePairSrflxSrflx, - kIceCandidatePairSrflxRelay, - kIceCandidatePairSrflxPrflx, - kIceCandidatePairRelayHost, - kIceCandidatePairRelaySrflx, - kIceCandidatePairRelayRelay, - kIceCandidatePairRelayPrflx, - kIceCandidatePairPrflxHost, - kIceCandidatePairPrflxSrflx, - kIceCandidatePairPrflxRelay, - - // The following 4 types tell whether local and remote hosts have private or - // public IP addresses. - kIceCandidatePairHostPrivateHostPrivate, - kIceCandidatePairHostPrivateHostPublic, - kIceCandidatePairHostPublicHostPrivate, - kIceCandidatePairHostPublicHostPublic, - kIceCandidatePairMax -}; - -class MetricsObserverInterface : public rtc::RefCountInterface { - public: - - // |type| is the type of the enum counter to be incremented. |counter| - // is the particular counter in that type. |counter_max| is the next sequence - // number after the highest counter. - virtual void IncrementEnumCounter(PeerConnectionEnumCounterType type, - int counter, - int counter_max) {} - - // This is used to handle sparse counters like SSL cipher suites. - // TODO(guoweis): Remove the implementation once the dependency's interface - // definition is updated. - virtual void IncrementSparseEnumCounter(PeerConnectionEnumCounterType type, - int counter) { - IncrementEnumCounter(type, counter, 0 /* Ignored */); - } - - virtual void AddHistogramSample(PeerConnectionMetricsName type, - int value) = 0; - - protected: - virtual ~MetricsObserverInterface() {} -}; - -typedef MetricsObserverInterface UMAObserver; - -} // namespace webrtc - -#endif // WEBRTC_API_UMAMETRICS_H_ diff --git a/WebRtc.NET/include/webrtc/api/video/i420_buffer.h b/WebRtc.NET/include/webrtc/api/video/i420_buffer.h deleted file mode 100644 index 388a3dd7..00000000 --- a/WebRtc.NET/include/webrtc/api/video/i420_buffer.h +++ /dev/null @@ -1,116 +0,0 @@ -/* - * Copyright (c) 2015 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_API_VIDEO_I420_BUFFER_H_ -#define WEBRTC_API_VIDEO_I420_BUFFER_H_ - -#include - -#include "webrtc/api/video/video_rotation.h" -#include "webrtc/api/video/video_frame_buffer.h" -#include "webrtc/system_wrappers/include/aligned_malloc.h" - -namespace webrtc { - -// Plain I420 buffer in standard memory. -class I420Buffer : public VideoFrameBuffer { - public: - static rtc::scoped_refptr Create(int width, int height); - static rtc::scoped_refptr Create(int width, - int height, - int stride_y, - int stride_u, - int stride_v); - - // Create a new buffer and copy the pixel data. - static rtc::scoped_refptr Copy(const VideoFrameBuffer& buffer); - - static rtc::scoped_refptr Copy( - int width, int height, - const uint8_t* data_y, int stride_y, - const uint8_t* data_u, int stride_u, - const uint8_t* data_v, int stride_v); - - // Returns a rotated copy of |src|. - static rtc::scoped_refptr Rotate(const VideoFrameBuffer& src, - VideoRotation rotation); - - // Sets the buffer to all black. - static void SetBlack(I420Buffer* buffer); - - // Sets all three planes to all zeros. Used to work around for - // quirks in memory checkers - // (https://bugs.chromium.org/p/libyuv/issues/detail?id=377) and - // ffmpeg (http://crbug.com/390941). - // TODO(nisse): Deprecated. Should be deleted if/when those issues - // are resolved in a better way. Or in the mean time, use SetBlack. - void InitializeData(); - - // TODO(nisse): Deprecated, use static method instead. - void SetToBlack() { SetBlack(this); } - - int width() const override; - int height() const override; - const uint8_t* DataY() const override; - const uint8_t* DataU() const override; - const uint8_t* DataV() const override; - - int StrideY() const override; - int StrideU() const override; - int StrideV() const override; - - void* native_handle() const override; - rtc::scoped_refptr NativeToI420Buffer() override; - - uint8_t* MutableDataY(); - uint8_t* MutableDataU(); - uint8_t* MutableDataV(); - - // Scale the cropped area of |src| to the size of |this| buffer, and - // write the result into |this|. - void CropAndScaleFrom(const VideoFrameBuffer& src, - int offset_x, - int offset_y, - int crop_width, - int crop_height); - - // The common case of a center crop, when needed to adjust the - // aspect ratio without distorting the image. - void CropAndScaleFrom(const VideoFrameBuffer& src); - - // Scale all of |src| to the size of |this| buffer, with no cropping. - void ScaleFrom(const VideoFrameBuffer& src); - - // TODO(nisse): Deprecated, delete once downstream applications are updated. - // Returns a rotated versions of |src|. Native buffers are not - // supported. The reason this function doesn't return an I420Buffer, - // is that it returns |src| unchanged in case |rotation| is zero. - static rtc::scoped_refptr Rotate( - rtc::scoped_refptr src, - VideoRotation rotation); - - protected: - I420Buffer(int width, int height); - I420Buffer(int width, int height, int stride_y, int stride_u, int stride_v); - - ~I420Buffer() override; - - private: - const int width_; - const int height_; - const int stride_y_; - const int stride_u_; - const int stride_v_; - const std::unique_ptr data_; -}; - -} // namespace webrtc - -#endif // WEBRTC_API_VIDEO_I420_BUFFER_H_ diff --git a/WebRtc.NET/include/webrtc/api/video/video_frame.h b/WebRtc.NET/include/webrtc/api/video/video_frame.h deleted file mode 100644 index f960fa92..00000000 --- a/WebRtc.NET/include/webrtc/api/video/video_frame.h +++ /dev/null @@ -1,119 +0,0 @@ -/* - * Copyright (c) 2014 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_API_VIDEO_VIDEO_FRAME_H_ -#define WEBRTC_API_VIDEO_VIDEO_FRAME_H_ - -#include - -#include "webrtc/api/video/video_rotation.h" -#include "webrtc/api/video/video_frame_buffer.h" - -// TODO(nisse): Transition hack, some downstream applications expect -// that including this file also defines base/timeutils.h constants. -// Delete after applications are fixed to include the right headers. -#include "webrtc/base/timeutils.h" - -namespace webrtc { - -class VideoFrame { - public: - // TODO(nisse): This constructor is consistent with the now deleted - // cricket::WebRtcVideoFrame. We should consider whether or not we - // want to stick to this style and deprecate the other constructor. - VideoFrame(const rtc::scoped_refptr& buffer, - webrtc::VideoRotation rotation, - int64_t timestamp_us); - - // Preferred constructor. - VideoFrame(const rtc::scoped_refptr& buffer, - uint32_t timestamp, - int64_t render_time_ms, - VideoRotation rotation); - - ~VideoFrame(); - - // Support move and copy. - VideoFrame(const VideoFrame&); - VideoFrame(VideoFrame&&); - VideoFrame& operator=(const VideoFrame&); - VideoFrame& operator=(VideoFrame&&); - - // Get frame width. - int width() const; - - // Get frame height. - int height() const; - - // System monotonic clock, same timebase as rtc::TimeMicros(). - int64_t timestamp_us() const { return timestamp_us_; } - void set_timestamp_us(int64_t timestamp_us) { timestamp_us_ = timestamp_us; } - - // TODO(nisse): After the cricket::VideoFrame and webrtc::VideoFrame - // merge, timestamps other than timestamp_us will likely be - // deprecated. - - // Set frame timestamp (90kHz). - void set_timestamp(uint32_t timestamp) { timestamp_rtp_ = timestamp; } - - // Get frame timestamp (90kHz). - uint32_t timestamp() const { return timestamp_rtp_; } - - // For now, transport_frame_id and rtp timestamp are the same. - // TODO(nisse): Must be handled differently for QUIC. - uint32_t transport_frame_id() const { return timestamp(); } - - // Set capture ntp time in milliseconds. - void set_ntp_time_ms(int64_t ntp_time_ms) { ntp_time_ms_ = ntp_time_ms; } - - // Get capture ntp time in milliseconds. - int64_t ntp_time_ms() const { return ntp_time_ms_; } - - // Naming convention for Coordination of Video Orientation. Please see - // http://www.etsi.org/deliver/etsi_ts/126100_126199/126114/12.07.00_60/ts_126114v120700p.pdf - // - // "pending rotation" or "pending" = a frame that has a VideoRotation > 0. - // - // "not pending" = a frame that has a VideoRotation == 0. - // - // "apply rotation" = modify a frame from being "pending" to being "not - // pending" rotation (a no-op for "unrotated"). - // - VideoRotation rotation() const { return rotation_; } - void set_rotation(VideoRotation rotation) { rotation_ = rotation; } - - // Set render time in milliseconds. - void set_render_time_ms(int64_t render_time_ms); - - // Get render time in milliseconds. - int64_t render_time_ms() const; - - // Return the underlying buffer. Never nullptr for a properly - // initialized VideoFrame. - rtc::scoped_refptr video_frame_buffer() const; - - // TODO(nisse): Deprecated. - // Return true if the frame is stored in a texture. - bool is_texture() const { - return video_frame_buffer()->native_handle() != nullptr; - } - - private: - // An opaque reference counted handle that stores the pixel data. - rtc::scoped_refptr video_frame_buffer_; - uint32_t timestamp_rtp_; - int64_t ntp_time_ms_; - int64_t timestamp_us_; - VideoRotation rotation_; -}; - -} // namespace webrtc - -#endif // WEBRTC_API_VIDEO_VIDEO_FRAME_H_ diff --git a/WebRtc.NET/include/webrtc/api/video/video_frame_buffer.h b/WebRtc.NET/include/webrtc/api/video/video_frame_buffer.h deleted file mode 100644 index c8c2e5d5..00000000 --- a/WebRtc.NET/include/webrtc/api/video/video_frame_buffer.h +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Copyright (c) 2015 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_API_VIDEO_VIDEO_FRAME_BUFFER_H_ -#define WEBRTC_API_VIDEO_VIDEO_FRAME_BUFFER_H_ - -#include - -#include "webrtc/base/refcount.h" -#include "webrtc/base/scoped_ref_ptr.h" - -namespace webrtc { - -// Interface of a simple frame buffer containing pixel data. This interface does -// not contain any frame metadata such as rotation, timestamp, pixel_width, etc. -class VideoFrameBuffer : public rtc::RefCountInterface { - public: - // The resolution of the frame in pixels. For formats where some planes are - // subsampled, this is the highest-resolution plane. - virtual int width() const = 0; - virtual int height() const = 0; - - // Returns pointer to the pixel data for a given plane. The memory is owned by - // the VideoFrameBuffer object and must not be freed by the caller. - virtual const uint8_t* DataY() const = 0; - virtual const uint8_t* DataU() const = 0; - virtual const uint8_t* DataV() const = 0; - - // Returns the number of bytes between successive rows for a given plane. - virtual int StrideY() const = 0; - virtual int StrideU() const = 0; - virtual int StrideV() const = 0; - - // Return the handle of the underlying video frame. This is used when the - // frame is backed by a texture. - virtual void* native_handle() const = 0; - - // Returns a new memory-backed frame buffer converted from this buffer's - // native handle. - virtual rtc::scoped_refptr NativeToI420Buffer() = 0; - - protected: - ~VideoFrameBuffer() override {} -}; - -} // namespace webrtc - -#endif // WEBRTC_API_VIDEO_VIDEO_FRAME_BUFFER_H_ diff --git a/WebRtc.NET/include/webrtc/api/videocapturertracksource.h b/WebRtc.NET/include/webrtc/api/videocapturertracksource.h deleted file mode 100644 index b0a2810b..00000000 --- a/WebRtc.NET/include/webrtc/api/videocapturertracksource.h +++ /dev/null @@ -1,84 +0,0 @@ -/* - * Copyright 2012 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_API_VIDEOCAPTURERTRACKSOURCE_H_ -#define WEBRTC_API_VIDEOCAPTURERTRACKSOURCE_H_ - -#include - -#include "webrtc/api/mediastreaminterface.h" -#include "webrtc/api/videotracksource.h" -#include "webrtc/base/asyncinvoker.h" -#include "webrtc/base/sigslot.h" -#include "webrtc/media/base/videocapturer.h" -#include "webrtc/media/base/videocommon.h" - -// VideoCapturerTrackSource implements VideoTrackSourceInterface. It owns a -// cricket::VideoCapturer and make sure the camera is started at a resolution -// that honors the constraints. -// The state is set depending on the result of starting the capturer. -// If the constraint can't be met or the capturer fails to start, the state -// transition to kEnded, otherwise it transitions to kLive. -namespace webrtc { - -class MediaConstraintsInterface; - -class VideoCapturerTrackSource : public VideoTrackSource, - public sigslot::has_slots<> { - public: - // Creates an instance of VideoCapturerTrackSource. - // VideoCapturerTrackSource take ownership of |capturer|. - // |constraints| can be NULL and in that case the camera is opened using a - // default resolution. - static rtc::scoped_refptr Create( - rtc::Thread* worker_thread, - cricket::VideoCapturer* capturer, - const webrtc::MediaConstraintsInterface* constraints, - bool remote); - - static rtc::scoped_refptr Create( - rtc::Thread* worker_thread, - cricket::VideoCapturer* capturer, - bool remote); - - bool is_screencast() const override { - return video_capturer_->IsScreencast(); - } - rtc::Optional needs_denoising() const override { - return needs_denoising_; - } - - bool GetStats(Stats* stats) override; - - protected: - VideoCapturerTrackSource(rtc::Thread* worker_thread, - cricket::VideoCapturer* capturer, - bool remote); - virtual ~VideoCapturerTrackSource(); - void Initialize(const webrtc::MediaConstraintsInterface* constraints); - - private: - void Stop(); - - void OnStateChange(cricket::VideoCapturer* capturer, - cricket::CaptureState capture_state); - - rtc::Thread* signaling_thread_; - rtc::Thread* worker_thread_; - rtc::AsyncInvoker invoker_; - std::unique_ptr video_capturer_; - bool started_; - cricket::VideoFormat format_; - rtc::Optional needs_denoising_; -}; - -} // namespace webrtc - -#endif // WEBRTC_API_VIDEOCAPTURERTRACKSOURCE_H_ diff --git a/WebRtc.NET/include/webrtc/api/videosourceproxy.h b/WebRtc.NET/include/webrtc/api/videosourceproxy.h deleted file mode 100644 index b678acb0..00000000 --- a/WebRtc.NET/include/webrtc/api/videosourceproxy.h +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright 2012 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_API_VIDEOSOURCEPROXY_H_ -#define WEBRTC_API_VIDEOSOURCEPROXY_H_ - -#include "webrtc/api/proxy.h" -#include "webrtc/api/mediastreaminterface.h" - -namespace webrtc { - -// VideoTrackSourceInterface makes sure the real VideoTrackSourceInterface -// implementation is -// destroyed on the signaling thread and marshals all method calls to the -// signaling thread. -BEGIN_PROXY_MAP(VideoTrackSource) - PROXY_SIGNALING_THREAD_DESTRUCTOR() - PROXY_CONSTMETHOD0(SourceState, state) - PROXY_CONSTMETHOD0(bool, remote) - PROXY_CONSTMETHOD0(bool, is_screencast) - PROXY_CONSTMETHOD0(rtc::Optional, needs_denoising) - PROXY_METHOD1(bool, GetStats, Stats*) - PROXY_WORKER_METHOD2(void, - AddOrUpdateSink, - rtc::VideoSinkInterface*, - const rtc::VideoSinkWants&) - PROXY_WORKER_METHOD1(void, RemoveSink, rtc::VideoSinkInterface*) - PROXY_METHOD1(void, RegisterObserver, ObserverInterface*) - PROXY_METHOD1(void, UnregisterObserver, ObserverInterface*) -END_PROXY_MAP() - -} // namespace webrtc - -#endif // WEBRTC_API_VIDEOSOURCEPROXY_H_ diff --git a/WebRtc.NET/include/webrtc/api/videotrack.h b/WebRtc.NET/include/webrtc/api/videotrack.h deleted file mode 100644 index ebea8485..00000000 --- a/WebRtc.NET/include/webrtc/api/videotrack.h +++ /dev/null @@ -1,60 +0,0 @@ -/* - * Copyright 2012 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_API_VIDEOTRACK_H_ -#define WEBRTC_API_VIDEOTRACK_H_ - -#include -#include - -#include "webrtc/api/mediastreamtrack.h" -#include "webrtc/base/scoped_ref_ptr.h" -#include "webrtc/base/thread_checker.h" -#include "webrtc/media/base/videosourcebase.h" - -namespace webrtc { - -class VideoTrack : public MediaStreamTrack, - public rtc::VideoSourceBase, - public ObserverInterface { - public: - static rtc::scoped_refptr Create( - const std::string& label, - VideoTrackSourceInterface* source); - - void AddOrUpdateSink(rtc::VideoSinkInterface* sink, - const rtc::VideoSinkWants& wants) override; - void RemoveSink(rtc::VideoSinkInterface* sink) override; - - VideoTrackSourceInterface* GetSource() const override { - return video_source_.get(); - } - ContentHint content_hint() const override; - void set_content_hint(ContentHint hint) override; - bool set_enabled(bool enable) override; - std::string kind() const override; - - protected: - VideoTrack(const std::string& id, VideoTrackSourceInterface* video_source); - ~VideoTrack(); - - private: - // Implements ObserverInterface. Observes |video_source_| state. - void OnChanged() override; - - rtc::ThreadChecker signaling_thread_checker_; - rtc::ThreadChecker worker_thread_checker_; - rtc::scoped_refptr video_source_; - ContentHint content_hint_ GUARDED_BY(signaling_thread_checker_); -}; - -} // namespace webrtc - -#endif // WEBRTC_API_VIDEOTRACK_H_ diff --git a/WebRtc.NET/include/webrtc/api/videotracksource.h b/WebRtc.NET/include/webrtc/api/videotracksource.h deleted file mode 100644 index 330af233..00000000 --- a/WebRtc.NET/include/webrtc/api/videotracksource.h +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Copyright 2016 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_API_VIDEOTRACKSOURCE_H_ -#define WEBRTC_API_VIDEOTRACKSOURCE_H_ - -#include "webrtc/api/mediastreaminterface.h" -#include "webrtc/api/notifier.h" -#include "webrtc/base/thread_checker.h" -#include "webrtc/media/base/mediachannel.h" -#include "webrtc/media/base/videosinkinterface.h" - -// VideoTrackSource implements VideoTrackSourceInterface. -namespace webrtc { - -class VideoTrackSource : public Notifier { - public: - VideoTrackSource(rtc::VideoSourceInterface* source, bool remote); - void SetState(SourceState new_state); - // OnSourceDestroyed clears this instance pointer to |source_|. It is useful - // when the underlying rtc::VideoSourceInterface is destroyed before the - // reference counted VideoTrackSource. - void OnSourceDestroyed(); - - SourceState state() const override { return state_; } - bool remote() const override { return remote_; } - - bool is_screencast() const override { return false; } - rtc::Optional needs_denoising() const override { - return rtc::Optional(); } - - bool GetStats(Stats* stats) override { return false; } - - void AddOrUpdateSink(rtc::VideoSinkInterface* sink, - const rtc::VideoSinkWants& wants) override; - void RemoveSink(rtc::VideoSinkInterface* sink) override; - - private: - rtc::ThreadChecker worker_thread_checker_; - rtc::VideoSourceInterface* source_; - cricket::VideoOptions options_; - SourceState state_; - const bool remote_; -}; - -} // namespace webrtc - -#endif // WEBRTC_API_VIDEOTRACKSOURCE_H_ diff --git a/WebRtc.NET/include/webrtc/api/webrtcsession.h b/WebRtc.NET/include/webrtc/api/webrtcsession.h deleted file mode 100644 index 0030342e..00000000 --- a/WebRtc.NET/include/webrtc/api/webrtcsession.h +++ /dev/null @@ -1,654 +0,0 @@ -/* - * Copyright 2012 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_API_WEBRTCSESSION_H_ -#define WEBRTC_API_WEBRTCSESSION_H_ - -#include -#include -#include -#include - -#include "webrtc/api/datachannel.h" -#include "webrtc/api/dtmfsender.h" -#include "webrtc/api/mediacontroller.h" -#include "webrtc/api/peerconnectioninterface.h" -#include "webrtc/api/statstypes.h" -#include "webrtc/base/constructormagic.h" -#include "webrtc/base/optional.h" -#include "webrtc/base/sigslot.h" -#include "webrtc/base/sslidentity.h" -#include "webrtc/base/thread.h" -#include "webrtc/media/base/mediachannel.h" -#include "webrtc/p2p/base/candidate.h" -#include "webrtc/p2p/base/transportcontroller.h" -#include "webrtc/pc/mediasession.h" - -#ifdef HAVE_QUIC -#include "webrtc/api/quicdatatransport.h" -#endif // HAVE_QUIC - -namespace cricket { - -class ChannelManager; -class RtpDataChannel; -class SctpTransportInternal; -class SctpTransportInternalFactory; -class StatsReport; -class VideoChannel; -class VoiceChannel; - -#ifdef HAVE_QUIC -class QuicTransportChannel; -#endif // HAVE_QUIC - -} // namespace cricket - -namespace webrtc { - -class IceRestartAnswerLatch; -class JsepIceCandidate; -class MediaStreamSignaling; -class WebRtcSessionDescriptionFactory; - -extern const char kBundleWithoutRtcpMux[]; -extern const char kCreateChannelFailed[]; -extern const char kInvalidCandidates[]; -extern const char kInvalidSdp[]; -extern const char kMlineMismatch[]; -extern const char kPushDownTDFailed[]; -extern const char kSdpWithoutDtlsFingerprint[]; -extern const char kSdpWithoutSdesCrypto[]; -extern const char kSdpWithoutIceUfragPwd[]; -extern const char kSdpWithoutSdesAndDtlsDisabled[]; -extern const char kSessionError[]; -extern const char kSessionErrorDesc[]; -extern const char kDtlsSrtpSetupFailureRtp[]; -extern const char kDtlsSrtpSetupFailureRtcp[]; -extern const char kEnableBundleFailed[]; - -// Maximum number of received video streams that will be processed by webrtc -// even if they are not signalled beforehand. -extern const int kMaxUnsignalledRecvStreams; - -// ICE state callback interface. -class IceObserver { - public: - IceObserver() {} - // Called any time the IceConnectionState changes - // TODO(honghaiz): Change the name to OnIceConnectionStateChange so as to - // conform to the w3c standard. - virtual void OnIceConnectionChange( - PeerConnectionInterface::IceConnectionState new_state) {} - // Called any time the IceGatheringState changes - virtual void OnIceGatheringChange( - PeerConnectionInterface::IceGatheringState new_state) {} - // New Ice candidate have been found. - virtual void OnIceCandidate(const IceCandidateInterface* candidate) = 0; - - // Some local ICE candidates have been removed. - virtual void OnIceCandidatesRemoved( - const std::vector& candidates) = 0; - - // Called whenever the state changes between receiving and not receiving. - virtual void OnIceConnectionReceivingChange(bool receiving) {} - - protected: - ~IceObserver() {} - - private: - RTC_DISALLOW_COPY_AND_ASSIGN(IceObserver); -}; - -// Statistics for all the transports of the session. -typedef std::map TransportStatsMap; -typedef std::map ProxyTransportMap; - -// TODO(pthatcher): Think of a better name for this. We already have -// a TransportStats in transport.h. Perhaps TransportsStats? -struct SessionStats { - ProxyTransportMap proxy_to_transport; - TransportStatsMap transport_stats; -}; - -struct ChannelNamePair { - ChannelNamePair( - const std::string& content_name, const std::string& transport_name) - : content_name(content_name), transport_name(transport_name) {} - std::string content_name; - std::string transport_name; -}; - -struct ChannelNamePairs { - rtc::Optional voice; - rtc::Optional video; - rtc::Optional data; -}; - -// A WebRtcSession manages general session state. This includes negotiation -// of both the application-level and network-level protocols: the former -// defines what will be sent and the latter defines how it will be sent. Each -// network-level protocol is represented by a Transport object. Each Transport -// participates in the network-level negotiation. The individual streams of -// packets are represented by TransportChannels. The application-level protocol -// is represented by SessionDecription objects. -class WebRtcSession : - - public DtmfProviderInterface, - public DataChannelProviderInterface, - public sigslot::has_slots<> { - public: - enum State { - STATE_INIT = 0, - STATE_SENTOFFER, // Sent offer, waiting for answer. - STATE_RECEIVEDOFFER, // Received an offer. Need to send answer. - STATE_SENTPRANSWER, // Sent provisional answer. Need to send answer. - STATE_RECEIVEDPRANSWER, // Received provisional answer, waiting for answer. - STATE_INPROGRESS, // Offer/answer exchange completed. - STATE_CLOSED, // Close() was called. - }; - - enum Error { - ERROR_NONE = 0, // no error - ERROR_CONTENT = 1, // channel errors in SetLocalContent/SetRemoteContent - ERROR_TRANSPORT = 2, // transport error of some kind - }; - - // |sctp_factory| may be null, in which case SCTP is treated as unsupported. - WebRtcSession( - webrtc::MediaControllerInterface* media_controller, - rtc::Thread* network_thread, - rtc::Thread* worker_thread, - rtc::Thread* signaling_thread, - cricket::PortAllocator* port_allocator, - std::unique_ptr transport_controller, - std::unique_ptr sctp_factory); - virtual ~WebRtcSession(); - - // These are const to allow them to be called from const methods. - rtc::Thread* network_thread() const { return network_thread_; } - rtc::Thread* worker_thread() const { return worker_thread_; } - rtc::Thread* signaling_thread() const { return signaling_thread_; } - - // The ID of this session. - const std::string& id() const { return sid_; } - - bool Initialize( - const PeerConnectionFactoryInterface::Options& options, - std::unique_ptr cert_generator, - const PeerConnectionInterface::RTCConfiguration& rtc_configuration); - // Deletes the voice, video and data channel and changes the session state - // to STATE_CLOSED. - void Close(); - - // Returns true if we were the initial offerer. - bool initial_offerer() const { return initial_offerer_; } - - // Returns the current state of the session. See the enum above for details. - // Each time the state changes, we will fire this signal. - State state() const { return state_; } - sigslot::signal2 SignalState; - - // Returns the last error in the session. See the enum above for details. - Error error() const { return error_; } - const std::string& error_desc() const { return error_desc_; } - - void RegisterIceObserver(IceObserver* observer) { - ice_observer_ = observer; - } - - // Exposed for stats collecting. - virtual cricket::VoiceChannel* voice_channel() { - return voice_channel_.get(); - } - virtual cricket::VideoChannel* video_channel() { - return video_channel_.get(); - } - // Only valid when using deprecated RTP data channels. - virtual cricket::RtpDataChannel* rtp_data_channel() { - return rtp_data_channel_.get(); - } - virtual rtc::Optional sctp_content_name() const { - return sctp_content_name_; - } - virtual rtc::Optional sctp_transport_name() const { - return sctp_transport_name_; - } - - cricket::BaseChannel* GetChannel(const std::string& content_name); - - cricket::SecurePolicy SdesPolicy() const; - - // Get current SSL role used by SCTP's underlying transport. - bool GetSctpSslRole(rtc::SSLRole* role); - // Get SSL role for an arbitrary m= section (handles bundling correctly). - // TODO(deadbeef): This is only used internally by the session description - // factory, it shouldn't really be public). - bool GetSslRole(const std::string& content_name, rtc::SSLRole* role); - - void CreateOffer( - CreateSessionDescriptionObserver* observer, - const PeerConnectionInterface::RTCOfferAnswerOptions& options, - const cricket::MediaSessionOptions& session_options); - void CreateAnswer(CreateSessionDescriptionObserver* observer, - const cricket::MediaSessionOptions& session_options); - // The ownership of |desc| will be transferred after this call. - bool SetLocalDescription(SessionDescriptionInterface* desc, - std::string* err_desc); - // The ownership of |desc| will be transferred after this call. - bool SetRemoteDescription(SessionDescriptionInterface* desc, - std::string* err_desc); - - bool ProcessIceMessage(const IceCandidateInterface* ice_candidate); - - bool RemoveRemoteIceCandidates( - const std::vector& candidates); - - cricket::IceConfig ParseIceConfig( - const PeerConnectionInterface::RTCConfiguration& config) const; - - void SetIceConfig(const cricket::IceConfig& ice_config); - - // Start gathering candidates for any new transports, or transports doing an - // ICE restart. - void MaybeStartGathering(); - - const SessionDescriptionInterface* local_description() const { - return pending_local_description_ ? pending_local_description_.get() - : current_local_description_.get(); - } - const SessionDescriptionInterface* remote_description() const { - return pending_remote_description_ ? pending_remote_description_.get() - : current_remote_description_.get(); - } - const SessionDescriptionInterface* current_local_description() const { - return current_local_description_.get(); - } - const SessionDescriptionInterface* current_remote_description() const { - return current_remote_description_.get(); - } - const SessionDescriptionInterface* pending_local_description() const { - return pending_local_description_.get(); - } - const SessionDescriptionInterface* pending_remote_description() const { - return pending_remote_description_.get(); - } - - // Get the id used as a media stream track's "id" field from ssrc. - virtual bool GetLocalTrackIdBySsrc(uint32_t ssrc, std::string* track_id); - virtual bool GetRemoteTrackIdBySsrc(uint32_t ssrc, std::string* track_id); - - // Implements DtmfProviderInterface. - bool CanInsertDtmf(const std::string& track_id) override; - bool InsertDtmf(const std::string& track_id, - int code, int duration) override; - sigslot::signal0<>* GetOnDestroyedSignal() override; - - // Implements DataChannelProviderInterface. - bool SendData(const cricket::SendDataParams& params, - const rtc::CopyOnWriteBuffer& payload, - cricket::SendDataResult* result) override; - bool ConnectDataChannel(DataChannel* webrtc_data_channel) override; - void DisconnectDataChannel(DataChannel* webrtc_data_channel) override; - void AddSctpDataStream(int sid) override; - void RemoveSctpDataStream(int sid) override; - bool ReadyToSendData() const override; - - // Returns stats for all channels of all transports. - // This avoids exposing the internal structures used to track them. - // The parameterless version creates |ChannelNamePairs| from |voice_channel|, - // |video_channel| and |voice_channel| if available - this requires it to be - // called on the signaling thread - and invokes the other |GetStats|. The - // other |GetStats| can be invoked on any thread; if not invoked on the - // network thread a thread hop will happen. - std::unique_ptr GetStats_s(); - virtual std::unique_ptr GetStats( - const ChannelNamePairs& channel_name_pairs); - - // virtual so it can be mocked in unit tests - virtual bool GetLocalCertificate( - const std::string& transport_name, - rtc::scoped_refptr* certificate); - - // Caller owns returned certificate - virtual std::unique_ptr GetRemoteSSLCertificate( - const std::string& transport_name); - - cricket::DataChannelType data_channel_type() const; - - // Returns true if there was an ICE restart initiated by the remote offer. - bool IceRestartPending(const std::string& content_name) const; - - // Set the "needs-ice-restart" flag as described in JSEP. After the flag is - // set, offers should generate new ufrags/passwords until an ICE restart - // occurs. - void SetNeedsIceRestartFlag(); - // Returns true if the ICE restart flag above was set, and no ICE restart has - // occurred yet for this transport (by applying a local description with - // changed ufrag/password). If the transport has been deleted as a result of - // bundling, returns false. - bool NeedsIceRestart(const std::string& content_name) const; - - // Called when an RTCCertificate is generated or retrieved by - // WebRTCSessionDescriptionFactory. Should happen before setLocalDescription. - void OnCertificateReady( - const rtc::scoped_refptr& certificate); - void OnDtlsSrtpSetupFailure(cricket::BaseChannel*, bool rtcp); - - // For unit test. - bool waiting_for_certificate_for_testing() const; - const rtc::scoped_refptr& certificate_for_testing(); - - void set_metrics_observer( - webrtc::MetricsObserverInterface* metrics_observer) { - metrics_observer_ = metrics_observer; - transport_controller_->SetMetricsObserver(metrics_observer); - } - - // Called when voice_channel_, video_channel_ and - // rtp_data_channel_/sctp_transport_ are created and destroyed. As a result - // of, for example, setting a new description. - sigslot::signal0<> SignalVoiceChannelCreated; - sigslot::signal0<> SignalVoiceChannelDestroyed; - sigslot::signal0<> SignalVideoChannelCreated; - sigslot::signal0<> SignalVideoChannelDestroyed; - sigslot::signal0<> SignalDataChannelCreated; - sigslot::signal0<> SignalDataChannelDestroyed; - // Called when the whole session is destroyed. - sigslot::signal0<> SignalDestroyed; - - // Called when a valid data channel OPEN message is received. - // std::string represents the data channel label. - sigslot::signal2 - SignalDataChannelOpenMessage; -#ifdef HAVE_QUIC - QuicDataTransport* quic_data_transport() { - return quic_data_transport_.get(); - } -#endif // HAVE_QUIC - - private: - // Indicates the type of SessionDescription in a call to SetLocalDescription - // and SetRemoteDescription. - enum Action { - kOffer, - kPrAnswer, - kAnswer, - }; - - // Non-const versions of local_description()/remote_description(), for use - // internally. - SessionDescriptionInterface* mutable_local_description() { - return pending_local_description_ ? pending_local_description_.get() - : current_local_description_.get(); - } - SessionDescriptionInterface* mutable_remote_description() { - return pending_remote_description_ ? pending_remote_description_.get() - : current_remote_description_.get(); - } - - // Log session state. - void LogState(State old_state, State new_state); - - // Updates the state, signaling if necessary. - virtual void SetState(State state); - - // Updates the error state, signaling if necessary. - // TODO(ronghuawu): remove the SetError method that doesn't take |error_desc|. - virtual void SetError(Error error, const std::string& error_desc); - - bool UpdateSessionState(Action action, cricket::ContentSource source, - std::string* err_desc); - static Action GetAction(const std::string& type); - // Push the media parts of the local or remote session description - // down to all of the channels. - bool PushdownMediaDescription(cricket::ContentAction action, - cricket::ContentSource source, - std::string* error_desc); - bool PushdownSctpParameters_n(cricket::ContentSource source); - - bool PushdownTransportDescription(cricket::ContentSource source, - cricket::ContentAction action, - std::string* error_desc); - - // Helper methods to push local and remote transport descriptions. - bool PushdownLocalTransportDescription( - const cricket::SessionDescription* sdesc, - cricket::ContentAction action, - std::string* error_desc); - bool PushdownRemoteTransportDescription( - const cricket::SessionDescription* sdesc, - cricket::ContentAction action, - std::string* error_desc); - - // Returns true and the TransportInfo of the given |content_name| - // from |description|. Returns false if it's not available. - static bool GetTransportDescription( - const cricket::SessionDescription* description, - const std::string& content_name, - cricket::TransportDescription* info); - - // Returns the name of the transport channel when BUNDLE is enabled, or - // nullptr if the channel is not part of any bundle. - const std::string* GetBundleTransportName( - const cricket::ContentInfo* content, - const cricket::ContentGroup* bundle); - - // Cause all the BaseChannels in the bundle group to have the same - // transport channel. - bool EnableBundle(const cricket::ContentGroup& bundle); - - // Enables media channels to allow sending of media. - void EnableChannels(); - // Returns the media index for a local ice candidate given the content name. - // Returns false if the local session description does not have a media - // content called |content_name|. - bool GetLocalCandidateMediaIndex(const std::string& content_name, - int* sdp_mline_index); - // Uses all remote candidates in |remote_desc| in this session. - bool UseCandidatesInSessionDescription( - const SessionDescriptionInterface* remote_desc); - // Uses |candidate| in this session. - bool UseCandidate(const IceCandidateInterface* candidate); - // Deletes the corresponding channel of contents that don't exist in |desc|. - // |desc| can be null. This means that all channels are deleted. - void RemoveUnusedChannels(const cricket::SessionDescription* desc); - - // Allocates media channels based on the |desc|. If |desc| doesn't have - // the BUNDLE option, this method will disable BUNDLE in PortAllocator. - // This method will also delete any existing media channels before creating. - bool CreateChannels(const cricket::SessionDescription* desc); - - // Helper methods to create media channels. - bool CreateVoiceChannel(const cricket::ContentInfo* content, - const std::string* bundle_transport); - bool CreateVideoChannel(const cricket::ContentInfo* content, - const std::string* bundle_transport); - bool CreateDataChannel(const cricket::ContentInfo* content, - const std::string* bundle_transport); - - std::unique_ptr GetStats_n( - const ChannelNamePairs& channel_name_pairs); - - bool CreateSctpTransport_n(const std::string& content_name, - const std::string& transport_name); - // For bundling. - void ChangeSctpTransport_n(const std::string& transport_name); - void DestroySctpTransport_n(); - // SctpTransport signal handlers. Needed to marshal signals from the network - // to signaling thread. - void OnSctpTransportReadyToSendData_n(); - // This may be called with "false" if the direction of the m= section causes - // us to tear down the SCTP connection. - void OnSctpTransportReadyToSendData_s(bool ready); - void OnSctpTransportDataReceived_n(const cricket::ReceiveDataParams& params, - const rtc::CopyOnWriteBuffer& payload); - // Beyond just firing the signal to the signaling thread, listens to SCTP - // CONTROL messages on unused SIDs and processes them as OPEN messages. - void OnSctpTransportDataReceived_s(const cricket::ReceiveDataParams& params, - const rtc::CopyOnWriteBuffer& payload); - void OnSctpStreamClosedRemotely_n(int sid); - - std::string BadStateErrMsg(State state); - void SetIceConnectionState(PeerConnectionInterface::IceConnectionState state); - void SetIceConnectionReceiving(bool receiving); - - bool ValidateBundleSettings(const cricket::SessionDescription* desc); - bool HasRtcpMuxEnabled(const cricket::ContentInfo* content); - // Below methods are helper methods which verifies SDP. - bool ValidateSessionDescription(const SessionDescriptionInterface* sdesc, - cricket::ContentSource source, - std::string* err_desc); - - // Check if a call to SetLocalDescription is acceptable with |action|. - bool ExpectSetLocalDescription(Action action); - // Check if a call to SetRemoteDescription is acceptable with |action|. - bool ExpectSetRemoteDescription(Action action); - // Verifies a=setup attribute as per RFC 5763. - bool ValidateDtlsSetupAttribute(const cricket::SessionDescription* desc, - Action action); - - // Returns true if we are ready to push down the remote candidate. - // |remote_desc| is the new remote description, or NULL if the current remote - // description should be used. Output |valid| is true if the candidate media - // index is valid. - bool ReadyToUseRemoteCandidate(const IceCandidateInterface* candidate, - const SessionDescriptionInterface* remote_desc, - bool* valid); - - // Returns true if SRTP (either using DTLS-SRTP or SDES) is required by - // this session. - bool SrtpRequired() const; - - // TransportController signal handlers. - void OnTransportControllerConnectionState(cricket::IceConnectionState state); - void OnTransportControllerReceiving(bool receiving); - void OnTransportControllerGatheringState(cricket::IceGatheringState state); - void OnTransportControllerCandidatesGathered( - const std::string& transport_name, - const std::vector& candidates); - void OnTransportControllerCandidatesRemoved( - const std::vector& candidates); - void OnTransportControllerDtlsHandshakeError(rtc::SSLHandshakeError error); - - std::string GetSessionErrorMsg(); - - // Invoked when TransportController connection completion is signaled. - // Reports stats for all transports in use. - void ReportTransportStats(); - - // Gather the usage of IPv4/IPv6 as best connection. - void ReportBestConnectionState(const cricket::TransportStats& stats); - - void ReportNegotiatedCiphers(const cricket::TransportStats& stats); - - void OnSentPacket_w(const rtc::SentPacket& sent_packet); - - const std::string GetTransportName(const std::string& content_name); - - void DestroyRtcpTransport_n(const std::string& transport_name); - void DestroyVideoChannel(); - void DestroyVoiceChannel(); - void DestroyDataChannel(); - - rtc::Thread* const network_thread_; - rtc::Thread* const worker_thread_; - rtc::Thread* const signaling_thread_; - - State state_ = STATE_INIT; - Error error_ = ERROR_NONE; - std::string error_desc_; - - const std::string sid_; - bool initial_offerer_ = false; - - const std::unique_ptr transport_controller_; - const std::unique_ptr sctp_factory_; - MediaControllerInterface* media_controller_; - std::unique_ptr voice_channel_; - std::unique_ptr video_channel_; - // |rtp_data_channel_| is used if in RTP data channel mode, |sctp_transport_| - // when using SCTP. - std::unique_ptr rtp_data_channel_; - - std::unique_ptr sctp_transport_; - // |sctp_transport_name_| keeps track of what DTLS transport the SCTP - // transport is using (which can change due to bundling). - rtc::Optional sctp_transport_name_; - // |sctp_content_name_| is the content name (MID) in SDP. - rtc::Optional sctp_content_name_; - // Value cached on signaling thread. Only updated when SctpReadyToSendData - // fires on the signaling thread. - bool sctp_ready_to_send_data_ = false; - // Same as signals provided by SctpTransport, but these are guaranteed to - // fire on the signaling thread, whereas SctpTransport fires on the networking - // thread. - // |sctp_invoker_| is used so that any signals queued on the signaling thread - // from the network thread are immediately discarded if the SctpTransport is - // destroyed (due to m= section being rejected). - // TODO(deadbeef): Use a proxy object to ensure that method calls/signals - // are marshalled to the right thread. Could almost use proxy.h for this, - // but it doesn't have a mechanism for marshalling sigslot::signals - std::unique_ptr sctp_invoker_; - sigslot::signal1 SignalSctpReadyToSendData; - sigslot::signal2 - SignalSctpDataReceived; - sigslot::signal1 SignalSctpStreamClosedRemotely; - - cricket::ChannelManager* channel_manager_; - IceObserver* ice_observer_; - PeerConnectionInterface::IceConnectionState ice_connection_state_; - bool ice_connection_receiving_; - std::unique_ptr current_local_description_; - std::unique_ptr pending_local_description_; - std::unique_ptr current_remote_description_; - std::unique_ptr pending_remote_description_; - // If the remote peer is using a older version of implementation. - bool older_version_remote_peer_; - bool dtls_enabled_; - // Specifies which kind of data channel is allowed. This is controlled - // by the chrome command-line flag and constraints: - // 1. If chrome command-line switch 'enable-sctp-data-channels' is enabled, - // constraint kEnableDtlsSrtp is true, and constaint kEnableRtpDataChannels is - // not set or false, SCTP is allowed (DCT_SCTP); - // 2. If constraint kEnableRtpDataChannels is true, RTP is allowed (DCT_RTP); - // 3. If both 1&2 are false, data channel is not allowed (DCT_NONE). - // The data channel type could be DCT_QUIC if the QUIC data channel is - // enabled. - cricket::DataChannelType data_channel_type_; - // List of content names for which the remote side triggered an ICE restart. - std::set pending_ice_restarts_; - - std::unique_ptr webrtc_session_desc_factory_; - - // Member variables for caching global options. - cricket::AudioOptions audio_options_; - cricket::VideoOptions video_options_; - MetricsObserverInterface* metrics_observer_; - - // Declares the bundle policy for the WebRTCSession. - PeerConnectionInterface::BundlePolicy bundle_policy_; - - // Declares the RTCP mux policy for the WebRTCSession. - PeerConnectionInterface::RtcpMuxPolicy rtcp_mux_policy_; - - bool received_first_video_packet_ = false; - bool received_first_audio_packet_ = false; - -#ifdef HAVE_QUIC - std::unique_ptr quic_data_transport_; -#endif // HAVE_QUIC - - RTC_DISALLOW_COPY_AND_ASSIGN(WebRtcSession); -}; -} // namespace webrtc - -#endif // WEBRTC_API_WEBRTCSESSION_H_ diff --git a/WebRtc.NET/include/webrtc/api/webrtcsessiondescriptionfactory.h b/WebRtc.NET/include/webrtc/api/webrtcsessiondescriptionfactory.h deleted file mode 100644 index 314679d2..00000000 --- a/WebRtc.NET/include/webrtc/api/webrtcsessiondescriptionfactory.h +++ /dev/null @@ -1,169 +0,0 @@ -/* - * Copyright 2013 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_API_WEBRTCSESSIONDESCRIPTIONFACTORY_H_ -#define WEBRTC_API_WEBRTCSESSIONDESCRIPTIONFACTORY_H_ - -#include - -#include "webrtc/api/peerconnectioninterface.h" -#include "webrtc/base/constructormagic.h" -#include "webrtc/base/messagehandler.h" -#include "webrtc/base/rtccertificate.h" -#include "webrtc/base/rtccertificategenerator.h" -#include "webrtc/p2p/base/transportdescriptionfactory.h" -#include "webrtc/pc/mediasession.h" - -namespace cricket { -class ChannelManager; -class TransportDescriptionFactory; -} // namespace cricket - -namespace webrtc { -class CreateSessionDescriptionObserver; -class MediaConstraintsInterface; -class SessionDescriptionInterface; -class WebRtcSession; - -// DTLS certificate request callback class. -class WebRtcCertificateGeneratorCallback - : public rtc::RTCCertificateGeneratorCallback, - public sigslot::has_slots<> { - public: - // |rtc::RTCCertificateGeneratorCallback| overrides. - void OnSuccess( - const rtc::scoped_refptr& certificate) override; - void OnFailure() override; - - sigslot::signal0<> SignalRequestFailed; - sigslot::signal1&> - SignalCertificateReady; -}; - -struct CreateSessionDescriptionRequest { - enum Type { - kOffer, - kAnswer, - }; - - CreateSessionDescriptionRequest( - Type type, - CreateSessionDescriptionObserver* observer, - const cricket::MediaSessionOptions& options) - : type(type), - observer(observer), - options(options) {} - - Type type; - rtc::scoped_refptr observer; - cricket::MediaSessionOptions options; -}; - -// This class is used to create offer/answer session description. Certificates -// for WebRtcSession/DTLS are either supplied at construction or generated -// asynchronously. It queues the create offer/answer request until the -// certificate generation has completed, i.e. when OnCertificateRequestFailed or -// OnCertificateReady is called. -class WebRtcSessionDescriptionFactory : public rtc::MessageHandler, - public sigslot::has_slots<> { - public: - // If |certificate_generator| is not null, DTLS is enabled and a default - // certificate is generated asynchronously; otherwise DTLS is disabled. - WebRtcSessionDescriptionFactory( - rtc::Thread* signaling_thread, - cricket::ChannelManager* channel_manager, - WebRtcSession* session, - const std::string& session_id, - std::unique_ptr cert_generator); - // Construct with DTLS enabled using the specified |certificate|. - WebRtcSessionDescriptionFactory( - rtc::Thread* signaling_thread, - cricket::ChannelManager* channel_manager, - WebRtcSession* session, - const std::string& session_id, - const rtc::scoped_refptr& certificate); - virtual ~WebRtcSessionDescriptionFactory(); - - static void CopyCandidatesFromSessionDescription( - const SessionDescriptionInterface* source_desc, - const std::string& content_name, - SessionDescriptionInterface* dest_desc); - - void CreateOffer( - CreateSessionDescriptionObserver* observer, - const PeerConnectionInterface::RTCOfferAnswerOptions& options, - const cricket::MediaSessionOptions& session_options); - void CreateAnswer(CreateSessionDescriptionObserver* observer, - const cricket::MediaSessionOptions& session_options); - - void SetSdesPolicy(cricket::SecurePolicy secure_policy); - cricket::SecurePolicy SdesPolicy() const; - - sigslot::signal1&> - SignalCertificateReady; - - // For testing. - bool waiting_for_certificate_for_testing() const { - return certificate_request_state_ == CERTIFICATE_WAITING; - } - - private: - enum CertificateRequestState { - CERTIFICATE_NOT_NEEDED, - CERTIFICATE_WAITING, - CERTIFICATE_SUCCEEDED, - CERTIFICATE_FAILED, - }; - - // If |certificate_generator| or |certificate| is not null DTLS is enabled, - // otherwise DTLS is disabled. - WebRtcSessionDescriptionFactory( - rtc::Thread* signaling_thread, - cricket::ChannelManager* channel_manager, - WebRtcSession* session, - const std::string& session_id, - std::unique_ptr cert_generator, - const rtc::scoped_refptr& certificate); - - // MessageHandler implementation. - virtual void OnMessage(rtc::Message* msg); - - void InternalCreateOffer(CreateSessionDescriptionRequest request); - void InternalCreateAnswer(CreateSessionDescriptionRequest request); - // Posts failure notifications for all pending session description requests. - void FailPendingRequests(const std::string& reason); - void PostCreateSessionDescriptionFailed( - CreateSessionDescriptionObserver* observer, - const std::string& error); - void PostCreateSessionDescriptionSucceeded( - CreateSessionDescriptionObserver* observer, - SessionDescriptionInterface* description); - - void OnCertificateRequestFailed(); - void SetCertificate( - const rtc::scoped_refptr& certificate); - - std::queue - create_session_description_requests_; - rtc::Thread* const signaling_thread_; - cricket::TransportDescriptionFactory transport_desc_factory_; - cricket::MediaSessionDescriptionFactory session_desc_factory_; - uint64_t session_version_; - const std::unique_ptr cert_generator_; - // TODO(jiayl): remove the dependency on session once bug 2264 is fixed. - WebRtcSession* const session_; - const std::string session_id_; - CertificateRequestState certificate_request_state_; - - RTC_DISALLOW_COPY_AND_ASSIGN(WebRtcSessionDescriptionFactory); -}; -} // namespace webrtc - -#endif // WEBRTC_API_WEBRTCSESSIONDESCRIPTIONFACTORY_H_ diff --git a/WebRtc.NET/include/webrtc/audio/audio_receive_stream.h b/WebRtc.NET/include/webrtc/audio/audio_receive_stream.h deleted file mode 100644 index 7dfc5d6b..00000000 --- a/WebRtc.NET/include/webrtc/audio/audio_receive_stream.h +++ /dev/null @@ -1,86 +0,0 @@ -/* - * Copyright (c) 2015 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_AUDIO_AUDIO_RECEIVE_STREAM_H_ -#define WEBRTC_AUDIO_AUDIO_RECEIVE_STREAM_H_ - -#include - -#include "webrtc/api/audio/audio_mixer.h" -#include "webrtc/audio/audio_state.h" -#include "webrtc/base/constructormagic.h" -#include "webrtc/base/thread_checker.h" -#include "webrtc/call/audio_receive_stream.h" -#include "webrtc/call/audio_state.h" -#include "webrtc/modules/rtp_rtcp/include/rtp_header_parser.h" - -namespace webrtc { -class RemoteBitrateEstimator; -class RtcEventLog; -class PacketRouter; - -namespace voe { -class ChannelProxy; -} // namespace voe - -namespace internal { -class AudioSendStream; - -class AudioReceiveStream final : public webrtc::AudioReceiveStream, - public AudioMixer::Source { - public: - AudioReceiveStream(PacketRouter* packet_router, - RemoteBitrateEstimator* remote_bitrate_estimator, - const webrtc::AudioReceiveStream::Config& config, - const rtc::scoped_refptr& audio_state, - webrtc::RtcEventLog* event_log); - ~AudioReceiveStream() override; - - // webrtc::AudioReceiveStream implementation. - void Start() override; - void Stop() override; - webrtc::AudioReceiveStream::Stats GetStats() const override; - void SetSink(std::unique_ptr sink) override; - void SetGain(float gain) override; - - void AssociateSendStream(AudioSendStream* send_stream); - void SignalNetworkState(NetworkState state); - bool DeliverRtcp(const uint8_t* packet, size_t length); - bool DeliverRtp(const uint8_t* packet, - size_t length, - const PacketTime& packet_time); - const webrtc::AudioReceiveStream::Config& config() const; - - // AudioMixer::Source - AudioFrameInfo GetAudioFrameWithInfo(int sample_rate_hz, - AudioFrame* audio_frame) override; - int PreferredSampleRate() const override; - int Ssrc() const override; - - private: - VoiceEngine* voice_engine() const; - AudioState* audio_state() const; - int SetVoiceEnginePlayout(bool playout); - - rtc::ThreadChecker thread_checker_; - RemoteBitrateEstimator* const remote_bitrate_estimator_; - const webrtc::AudioReceiveStream::Config config_; - rtc::scoped_refptr audio_state_; - std::unique_ptr rtp_header_parser_; - std::unique_ptr channel_proxy_; - - bool playing_ ACCESS_ON(thread_checker_) = false; - - RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(AudioReceiveStream); -}; -} // namespace internal -} // namespace webrtc - -#endif // WEBRTC_AUDIO_AUDIO_RECEIVE_STREAM_H_ diff --git a/WebRtc.NET/include/webrtc/audio/audio_send_stream.h b/WebRtc.NET/include/webrtc/audio/audio_send_stream.h deleted file mode 100644 index 05ed3aae..00000000 --- a/WebRtc.NET/include/webrtc/audio/audio_send_stream.h +++ /dev/null @@ -1,86 +0,0 @@ -/* - * Copyright (c) 2015 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_AUDIO_AUDIO_SEND_STREAM_H_ -#define WEBRTC_AUDIO_AUDIO_SEND_STREAM_H_ - -#include - -#include "webrtc/base/constructormagic.h" -#include "webrtc/base/thread_checker.h" -#include "webrtc/call/audio_send_stream.h" -#include "webrtc/call/audio_state.h" -#include "webrtc/call/bitrate_allocator.h" - -namespace webrtc { -class CongestionController; -class VoiceEngine; -class RtcEventLog; -class RtcpRttStats; -class PacketRouter; - -namespace voe { -class ChannelProxy; -} // namespace voe - -namespace internal { -class AudioSendStream final : public webrtc::AudioSendStream, - public webrtc::BitrateAllocatorObserver { - public: - AudioSendStream(const webrtc::AudioSendStream::Config& config, - const rtc::scoped_refptr& audio_state, - rtc::TaskQueue* worker_queue, - PacketRouter* packet_router, - CongestionController* congestion_controller, - BitrateAllocator* bitrate_allocator, - RtcEventLog* event_log, - RtcpRttStats* rtcp_rtt_stats); - ~AudioSendStream() override; - - // webrtc::AudioSendStream implementation. - void Start() override; - void Stop() override; - bool SendTelephoneEvent(int payload_type, int payload_frequency, int event, - int duration_ms) override; - void SetMuted(bool muted) override; - webrtc::AudioSendStream::Stats GetStats() const override; - - void SignalNetworkState(NetworkState state); - bool DeliverRtcp(const uint8_t* packet, size_t length); - - // Implements BitrateAllocatorObserver. - uint32_t OnBitrateUpdated(uint32_t bitrate_bps, - uint8_t fraction_loss, - int64_t rtt, - int64_t probing_interval_ms) override; - - const webrtc::AudioSendStream::Config& config() const; - void SetTransportOverhead(int transport_overhead_per_packet); - - private: - VoiceEngine* voice_engine() const; - - bool SetupSendCodec(); - - rtc::ThreadChecker thread_checker_; - rtc::TaskQueue* worker_queue_; - const webrtc::AudioSendStream::Config config_; - rtc::scoped_refptr audio_state_; - std::unique_ptr channel_proxy_; - - BitrateAllocator* const bitrate_allocator_; - CongestionController* const congestion_controller_; - - RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(AudioSendStream); -}; -} // namespace internal -} // namespace webrtc - -#endif // WEBRTC_AUDIO_AUDIO_SEND_STREAM_H_ diff --git a/WebRtc.NET/include/webrtc/audio/audio_state.h b/WebRtc.NET/include/webrtc/audio/audio_state.h deleted file mode 100644 index 29b5a9ed..00000000 --- a/WebRtc.NET/include/webrtc/audio/audio_state.h +++ /dev/null @@ -1,68 +0,0 @@ -/* - * Copyright (c) 2015 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_AUDIO_AUDIO_STATE_H_ -#define WEBRTC_AUDIO_AUDIO_STATE_H_ - -#include "webrtc/audio/audio_transport_proxy.h" -#include "webrtc/audio/scoped_voe_interface.h" -#include "webrtc/base/constructormagic.h" -#include "webrtc/base/criticalsection.h" -#include "webrtc/base/thread_checker.h" -#include "webrtc/call/audio_state.h" -#include "webrtc/voice_engine/include/voe_base.h" - -namespace webrtc { -namespace internal { - -class AudioState final : public webrtc::AudioState, - public webrtc::VoiceEngineObserver { - public: - explicit AudioState(const AudioState::Config& config); - ~AudioState() override; - - VoiceEngine* voice_engine(); - - rtc::scoped_refptr mixer(); - bool typing_noise_detected() const; - - private: - // rtc::RefCountInterface implementation. - int AddRef() const override; - int Release() const override; - - // webrtc::VoiceEngineObserver implementation. - void CallbackOnError(int channel_id, int err_code) override; - - rtc::ThreadChecker thread_checker_; - rtc::ThreadChecker process_thread_checker_; - const webrtc::AudioState::Config config_; - - // We hold one interface pointer to the VoE to make sure it is kept alive. - ScopedVoEInterface voe_base_; - - // The critical section isn't strictly needed in this case, but xSAN bots may - // trigger on unprotected cross-thread access. - rtc::CriticalSection crit_sect_; - bool typing_noise_detected_ GUARDED_BY(crit_sect_) = false; - - // Reference count; implementation copied from rtc::RefCountedObject. - mutable volatile int ref_count_ = 0; - - // Transports mixed audio from the mixer to the audio device and - // recorded audio to the VoE AudioTransport. - AudioTransportProxy audio_transport_proxy_; - - RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(AudioState); -}; -} // namespace internal -} // namespace webrtc - -#endif // WEBRTC_AUDIO_AUDIO_STATE_H_ diff --git a/WebRtc.NET/include/webrtc/audio/audio_transport_proxy.h b/WebRtc.NET/include/webrtc/audio/audio_transport_proxy.h deleted file mode 100644 index 1d033784..00000000 --- a/WebRtc.NET/include/webrtc/audio/audio_transport_proxy.h +++ /dev/null @@ -1,78 +0,0 @@ -/* - * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_AUDIO_AUDIO_TRANSPORT_PROXY_H_ -#define WEBRTC_AUDIO_AUDIO_TRANSPORT_PROXY_H_ - -#include "webrtc/api/audio/audio_mixer.h" -#include "webrtc/base/constructormagic.h" -#include "webrtc/base/scoped_ref_ptr.h" -#include "webrtc/common_audio/resampler/include/push_resampler.h" -#include "webrtc/modules/audio_device/include/audio_device_defines.h" -#include "webrtc/modules/audio_processing/include/audio_processing.h" - -namespace webrtc { - -class AudioTransportProxy : public AudioTransport { - public: - AudioTransportProxy(AudioTransport* voe_audio_transport, - AudioProcessing* apm, - AudioMixer* mixer); - - ~AudioTransportProxy() override; - - int32_t RecordedDataIsAvailable(const void* audioSamples, - const size_t nSamples, - const size_t nBytesPerSample, - const size_t nChannels, - const uint32_t samplesPerSec, - const uint32_t totalDelayMS, - const int32_t clockDrift, - const uint32_t currentMicLevel, - const bool keyPressed, - uint32_t& newMicLevel) override; - - int32_t NeedMorePlayData(const size_t nSamples, - const size_t nBytesPerSample, - const size_t nChannels, - const uint32_t samplesPerSec, - void* audioSamples, - size_t& nSamplesOut, - int64_t* elapsed_time_ms, - int64_t* ntp_time_ms) override; - - void PushCaptureData(int voe_channel, - const void* audio_data, - int bits_per_sample, - int sample_rate, - size_t number_of_channels, - size_t number_of_frames) override; - - void PullRenderData(int bits_per_sample, - int sample_rate, - size_t number_of_channels, - size_t number_of_frames, - void* audio_data, - int64_t* elapsed_time_ms, - int64_t* ntp_time_ms) override; - - private: - AudioTransport* voe_audio_transport_; - AudioProcessing* apm_; - rtc::scoped_refptr mixer_; - AudioFrame mixed_frame_; - // Converts mixed audio to the audio device output rate. - PushResampler resampler_; - - RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(AudioTransportProxy); -}; -} // namespace webrtc - -#endif // WEBRTC_AUDIO_AUDIO_TRANSPORT_PROXY_H_ diff --git a/WebRtc.NET/include/webrtc/audio/scoped_voe_interface.h b/WebRtc.NET/include/webrtc/audio/scoped_voe_interface.h deleted file mode 100644 index 10293372..00000000 --- a/WebRtc.NET/include/webrtc/audio/scoped_voe_interface.h +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) 2015 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_AUDIO_SCOPED_VOE_INTERFACE_H_ -#define WEBRTC_AUDIO_SCOPED_VOE_INTERFACE_H_ - -#include "webrtc/base/checks.h" - -namespace webrtc { - -class VoiceEngine; - -namespace internal { - -// Utility template for obtaining and holding a reference to a VoiceEngine -// interface and making sure it is released when this object goes out of scope. -template class ScopedVoEInterface { - public: - explicit ScopedVoEInterface(webrtc::VoiceEngine* e) - : ptr_(T::GetInterface(e)) { - RTC_DCHECK(ptr_); - } - ~ScopedVoEInterface() { - if (ptr_) { - ptr_->Release(); - } - } - T* operator->() { - RTC_DCHECK(ptr_); - return ptr_; - } - private: - T* ptr_; -}; -} // namespace internal -} // namespace webrtc - -#endif // WEBRTC_AUDIO_SCOPED_VOE_INTERFACE_H_ diff --git a/WebRtc.NET/include/webrtc/audio/utility/audio_frame_operations.h b/WebRtc.NET/include/webrtc/audio/utility/audio_frame_operations.h deleted file mode 100644 index d16b163e..00000000 --- a/WebRtc.NET/include/webrtc/audio/utility/audio_frame_operations.h +++ /dev/null @@ -1,83 +0,0 @@ -/* - * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_AUDIO_UTILITY_AUDIO_FRAME_OPERATIONS_H_ -#define WEBRTC_AUDIO_UTILITY_AUDIO_FRAME_OPERATIONS_H_ - -#include - -#include "webrtc/typedefs.h" - -namespace webrtc { - -class AudioFrame; - -// TODO(andrew): consolidate this with utility.h and audio_frame_manipulator.h. -// Change reference parameters to pointers. Consider using a namespace rather -// than a class. -class AudioFrameOperations { - public: - // Add samples in |frame_to_add| with samples in |result_frame| - // putting the results in |results_frame|. The fields - // |vad_activity_| and |speech_type_| of the result frame are - // updated. If |result_frame| is empty (|samples_per_channel_|==0), - // the samples in |frame_to_add| are added to it. The number of - // channels and number of samples per channel must match except when - // |result_frame| is empty. - static void Add(const AudioFrame& frame_to_add, AudioFrame* result_frame); - - // Upmixes mono |src_audio| to stereo |dst_audio|. This is an out-of-place - // operation, meaning src_audio and dst_audio must point to different - // buffers. It is the caller's responsibility to ensure that |dst_audio| is - // sufficiently large. - static void MonoToStereo(const int16_t* src_audio, - size_t samples_per_channel, - int16_t* dst_audio); - // |frame.num_channels_| will be updated. This version checks for sufficient - // buffer size and that |num_channels_| is mono. - static int MonoToStereo(AudioFrame* frame); - - // Downmixes stereo |src_audio| to mono |dst_audio|. This is an in-place - // operation, meaning |src_audio| and |dst_audio| may point to the same - // buffer. - static void StereoToMono(const int16_t* src_audio, - size_t samples_per_channel, - int16_t* dst_audio); - // |frame.num_channels_| will be updated. This version checks that - // |num_channels_| is stereo. - static int StereoToMono(AudioFrame* frame); - - // Swap the left and right channels of |frame|. Fails silently if |frame| is - // not stereo. - static void SwapStereoChannels(AudioFrame* frame); - - // Conditionally zero out contents of |frame| for implementing audio mute: - // |previous_frame_muted| && |current_frame_muted| - Zero out whole frame. - // |previous_frame_muted| && !|current_frame_muted| - Fade-in at frame start. - // !|previous_frame_muted| && |current_frame_muted| - Fade-out at frame end. - // !|previous_frame_muted| && !|current_frame_muted| - Leave frame untouched. - static void Mute(AudioFrame* frame, - bool previous_frame_muted, - bool current_frame_muted); - - // Zero out contents of frame. - static void Mute(AudioFrame* frame); - - // Halve samples in |frame|. - static void ApplyHalfGain(AudioFrame* frame); - - static int Scale(float left, float right, AudioFrame& frame); - - static int ScaleWithSat(float scale, AudioFrame& frame); -}; - -} // namespace webrtc - -#endif // WEBRTC_AUDIO_UTILITY_AUDIO_FRAME_OPERATIONS_H_ diff --git a/WebRtc.NET/include/webrtc/base/array_view.h b/WebRtc.NET/include/webrtc/base/array_view.h deleted file mode 100644 index aa73ef72..00000000 --- a/WebRtc.NET/include/webrtc/base/array_view.h +++ /dev/null @@ -1,153 +0,0 @@ -/* - * Copyright 2015 The WebRTC Project Authors. All rights reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_BASE_ARRAY_VIEW_H_ -#define WEBRTC_BASE_ARRAY_VIEW_H_ - -#include "webrtc/base/checks.h" -#include "webrtc/base/type_traits.h" - -namespace rtc { - -// Many functions read from or write to arrays. The obvious way to do this is -// to use two arguments, a pointer to the first element and an element count: -// -// bool Contains17(const int* arr, size_t size) { -// for (size_t i = 0; i < size; ++i) { -// if (arr[i] == 17) -// return true; -// } -// return false; -// } -// -// This is flexible, since it doesn't matter how the array is stored (C array, -// std::vector, rtc::Buffer, ...), but it's error-prone because the caller has -// to correctly specify the array length: -// -// Contains17(arr, arraysize(arr)); // C array -// Contains17(&arr[0], arr.size()); // std::vector -// Contains17(arr, size); // pointer + size -// ... -// -// It's also kind of messy to have two separate arguments for what is -// conceptually a single thing. -// -// Enter rtc::ArrayView. It contains a T pointer (to an array it doesn't -// own) and a count, and supports the basic things you'd expect, such as -// indexing and iteration. It allows us to write our function like this: -// -// bool Contains17(rtc::ArrayView arr) { -// for (auto e : arr) { -// if (e == 17) -// return true; -// } -// return false; -// } -// -// And even better, because a bunch of things will implicitly convert to -// ArrayView, we can call it like this: -// -// Contains17(arr); // C array -// Contains17(arr); // std::vector -// Contains17(rtc::ArrayView(arr, size)); // pointer + size -// Contains17(nullptr); // nullptr -> empty ArrayView -// ... -// -// One important point is that ArrayView and ArrayView are -// different types, which allow and don't allow mutation of the array elements, -// respectively. The implicit conversions work just like you'd hope, so that -// e.g. vector will convert to either ArrayView or ArrayView, but const vector will convert only to ArrayView. -// (ArrayView itself can be the source type in such conversions, so -// ArrayView will convert to ArrayView.) -// -// Note: ArrayView is tiny (just a pointer and a count) and trivially copyable, -// so it's probably cheaper to pass it by value than by const reference. -template -class ArrayView final { - public: - using value_type = T; - using const_iterator = const T*; - - // Construct an empty ArrayView. - ArrayView() : ArrayView(static_cast(nullptr), 0) {} - ArrayView(std::nullptr_t) : ArrayView() {} - - // Construct an ArrayView for a (pointer,size) pair. - template - ArrayView(U* data, size_t size) - : data_(size == 0 ? nullptr : data), size_(size) { - CheckInvariant(); - } - - // Construct an ArrayView for an array. - template - ArrayView(U (&array)[N]) : ArrayView(&array[0], N) {} - - // Construct an ArrayView for any type U that has a size() method whose - // return value converts implicitly to size_t, and a data() method whose - // return value converts implicitly to T*. In particular, this means we allow - // conversion from ArrayView to ArrayView, but not the other way - // around. Other allowed conversions include std::vector to ArrayView - // or ArrayView, const std::vector to ArrayView, and - // rtc::Buffer to ArrayView (with the same const behavior as - // std::vector). - template < - typename U, - typename std::enable_if::value>::type* = nullptr> - ArrayView(U& u) : ArrayView(u.data(), u.size()) {} - - // Indexing, size, and iteration. These allow mutation even if the ArrayView - // is const, because the ArrayView doesn't own the array. (To prevent - // mutation, use ArrayView.) - size_t size() const { return size_; } - bool empty() const { return size_ == 0; } - T* data() const { return data_; } - T& operator[](size_t idx) const { - RTC_DCHECK_LT(idx, size_); - RTC_DCHECK(data_); // Follows from size_ > idx and the class invariant. - return data_[idx]; - } - T* begin() const { return data_; } - T* end() const { return data_ + size_; } - const T* cbegin() const { return data_; } - const T* cend() const { return data_ + size_; } - - ArrayView subview(size_t offset, size_t size) const { - if (offset >= size_) - return ArrayView(); - return ArrayView(data_ + offset, std::min(size, size_ - offset)); - } - ArrayView subview(size_t offset) const { return subview(offset, size_); } - - // Comparing two ArrayViews compares their (pointer,size) pairs; it does - // *not* dereference the pointers. - friend bool operator==(const ArrayView& a, const ArrayView& b) { - return a.data_ == b.data_ && a.size_ == b.size_; - } - friend bool operator!=(const ArrayView& a, const ArrayView& b) { - return !(a == b); - } - - private: - // Invariant: !data_ iff size_ == 0. - void CheckInvariant() const { RTC_DCHECK_EQ(!data_, size_ == 0); } - T* data_; - size_t size_; -}; - -template -inline ArrayView MakeArrayView(T* data, size_t size) { - return ArrayView(data, size); -} - -} // namespace rtc - -#endif // WEBRTC_BASE_ARRAY_VIEW_H_ diff --git a/WebRtc.NET/include/webrtc/base/arraysize.h b/WebRtc.NET/include/webrtc/base/arraysize.h deleted file mode 100644 index 56a10392..00000000 --- a/WebRtc.NET/include/webrtc/base/arraysize.h +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright (c) 2015 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_BASE_ARRAYSIZE_H_ -#define WEBRTC_BASE_ARRAYSIZE_H_ - -#include - -// This file defines the arraysize() macro and is derived from Chromium's -// base/macros.h. - -// The arraysize(arr) macro returns the # of elements in an array arr. -// The expression is a compile-time constant, and therefore can be -// used in defining new arrays, for example. If you use arraysize on -// a pointer by mistake, you will get a compile-time error. - -// This template function declaration is used in defining arraysize. -// Note that the function doesn't need an implementation, as we only -// use its type. -template char (&ArraySizeHelper(T (&array)[N]))[N]; - -#define arraysize(array) (sizeof(ArraySizeHelper(array))) - -#endif // WEBRTC_BASE_ARRAYSIZE_H_ diff --git a/WebRtc.NET/include/webrtc/base/asyncinvoker-inl.h b/WebRtc.NET/include/webrtc/base/asyncinvoker-inl.h deleted file mode 100644 index 15fafa88..00000000 --- a/WebRtc.NET/include/webrtc/base/asyncinvoker-inl.h +++ /dev/null @@ -1,139 +0,0 @@ -/* - * Copyright 2014 The WebRTC Project Authors. All rights reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_BASE_ASYNCINVOKER_INL_H_ -#define WEBRTC_BASE_ASYNCINVOKER_INL_H_ - -#include "webrtc/base/bind.h" -#include "webrtc/base/callback.h" -#include "webrtc/base/criticalsection.h" -#include "webrtc/base/messagehandler.h" -#include "webrtc/base/refcount.h" -#include "webrtc/base/scoped_ref_ptr.h" -#include "webrtc/base/sigslot.h" -#include "webrtc/base/thread.h" - -namespace rtc { - -class AsyncInvoker; - -// Helper class for AsyncInvoker. Runs a task and triggers a callback -// on the calling thread if necessary. Instances are ref-counted so their -// lifetime can be independent of AsyncInvoker. -class AsyncClosure : public RefCountInterface { - public: - // Runs the asynchronous task, and triggers a callback to the calling - // thread if needed. Should be called from the target thread. - virtual void Execute() = 0; - protected: - ~AsyncClosure() override {} -}; - -// Simple closure that doesn't trigger a callback for the calling thread. -template -class FireAndForgetAsyncClosure : public AsyncClosure { - public: - explicit FireAndForgetAsyncClosure(const FunctorT& functor) - : functor_(functor) {} - virtual void Execute() { - functor_(); - } - private: - FunctorT functor_; -}; - -// Base class for closures that may trigger a callback for the calling thread. -// Listens for the "destroyed" signals from the calling thread and the invoker, -// and cancels the callback to the calling thread if either is destroyed. -class NotifyingAsyncClosureBase : public AsyncClosure, - public sigslot::has_slots<> { - public: - ~NotifyingAsyncClosureBase() override; - - protected: - NotifyingAsyncClosureBase(AsyncInvoker* invoker, - const Location& callback_posted_from, - Thread* calling_thread); - void TriggerCallback(); - void SetCallback(const Callback0& callback) { - CritScope cs(&crit_); - callback_ = callback; - } - bool CallbackCanceled() const { return calling_thread_ == NULL; } - - private: - AsyncInvoker* invoker_; - Location callback_posted_from_; - Callback0 callback_; - CriticalSection crit_; - Thread* calling_thread_; - - void CancelCallback(); -}; - -// Closures that have a non-void return value and require a callback. -template -class NotifyingAsyncClosure : public NotifyingAsyncClosureBase { - public: - NotifyingAsyncClosure(AsyncInvoker* invoker, - const Location& callback_posted_from, - Thread* calling_thread, - const FunctorT& functor, - void (HostT::*callback)(ReturnT), - HostT* callback_host) - : NotifyingAsyncClosureBase(invoker, - callback_posted_from, - calling_thread), - functor_(functor), - callback_(callback), - callback_host_(callback_host) {} - virtual void Execute() { - ReturnT result = functor_(); - if (!CallbackCanceled()) { - SetCallback(Callback0(Bind(callback_, callback_host_, result))); - TriggerCallback(); - } - } - - private: - FunctorT functor_; - void (HostT::*callback_)(ReturnT); - HostT* callback_host_; -}; - -// Closures that have a void return value and require a callback. -template -class NotifyingAsyncClosure - : public NotifyingAsyncClosureBase { - public: - NotifyingAsyncClosure(AsyncInvoker* invoker, - const Location& callback_posted_from, - Thread* calling_thread, - const FunctorT& functor, - void (HostT::*callback)(), - HostT* callback_host) - : NotifyingAsyncClosureBase(invoker, - callback_posted_from, - calling_thread), - functor_(functor) { - SetCallback(Callback0(Bind(callback, callback_host))); - } - virtual void Execute() { - functor_(); - TriggerCallback(); - } - - private: - FunctorT functor_; -}; - -} // namespace rtc - -#endif // WEBRTC_BASE_ASYNCINVOKER_INL_H_ diff --git a/WebRtc.NET/include/webrtc/base/asyncinvoker.h b/WebRtc.NET/include/webrtc/base/asyncinvoker.h deleted file mode 100644 index d91e3060..00000000 --- a/WebRtc.NET/include/webrtc/base/asyncinvoker.h +++ /dev/null @@ -1,255 +0,0 @@ -/* - * Copyright 2014 The WebRTC Project Authors. All rights reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_BASE_ASYNCINVOKER_H_ -#define WEBRTC_BASE_ASYNCINVOKER_H_ - -#include "webrtc/base/asyncinvoker-inl.h" -#include "webrtc/base/bind.h" -#include "webrtc/base/constructormagic.h" -#include "webrtc/base/sigslot.h" -#include "webrtc/base/scopedptrcollection.h" -#include "webrtc/base/thread.h" - -namespace rtc { - -// Invokes function objects (aka functors) asynchronously on a Thread, and -// owns the lifetime of calls (ie, when this object is destroyed, calls in -// flight are cancelled). AsyncInvoker can optionally execute a user-specified -// function when the asynchronous call is complete, or operates in -// fire-and-forget mode otherwise. -// -// AsyncInvoker does not own the thread it calls functors on. -// -// A note about async calls and object lifetimes: users should -// be mindful of object lifetimes when calling functions asynchronously and -// ensure objects used by the function _cannot_ be deleted between the -// invocation and execution of the functor. AsyncInvoker is designed to -// help: any calls in flight will be cancelled when the AsyncInvoker used to -// make the call is destructed, and any calls executing will be allowed to -// complete before AsyncInvoker destructs. -// -// The easiest way to ensure lifetimes are handled correctly is to create a -// class that owns the Thread and AsyncInvoker objects, and then call its -// methods asynchronously as needed. -// -// Example: -// class MyClass { -// public: -// void FireAsyncTaskWithResult(Thread* thread, int x) { -// // Specify a callback to get the result upon completion. -// invoker_.AsyncInvoke(RTC_FROM_HERE, -// thread, Bind(&MyClass::AsyncTaskWithResult, this, x), -// &MyClass::OnTaskComplete, this); -// } -// void FireAnotherAsyncTask(Thread* thread) { -// // No callback specified means fire-and-forget. -// invoker_.AsyncInvoke(RTC_FROM_HERE, -// thread, Bind(&MyClass::AnotherAsyncTask, this)); -// -// private: -// int AsyncTaskWithResult(int x) { -// // Some long running process... -// return x * x; -// } -// void AnotherAsyncTask() { -// // Some other long running process... -// } -// void OnTaskComplete(int result) { result_ = result; } -// -// AsyncInvoker invoker_; -// int result_; -// }; -class AsyncInvoker : public MessageHandler { - public: - AsyncInvoker(); - ~AsyncInvoker() override; - - // Call |functor| asynchronously on |thread|, with no callback upon - // completion. Returns immediately. - template - void AsyncInvoke(const Location& posted_from, - Thread* thread, - const FunctorT& functor, - uint32_t id = 0) { - scoped_refptr closure( - new RefCountedObject >(functor)); - DoInvoke(posted_from, thread, closure, id); - } - - // Call |functor| asynchronously on |thread| with |delay_ms|, with no callback - // upon completion. Returns immediately. - template - void AsyncInvokeDelayed(const Location& posted_from, - Thread* thread, - const FunctorT& functor, - uint32_t delay_ms, - uint32_t id = 0) { - scoped_refptr closure( - new RefCountedObject >(functor)); - DoInvokeDelayed(posted_from, thread, closure, delay_ms, id); - } - - // Call |functor| asynchronously on |thread|, calling |callback| when done. - // Uses a separate Location for |callback_posted_from| so that the functor - // invoke and the callback invoke can be differentiated. - template - void AsyncInvoke(const Location& posted_from, - const Location& callback_posted_from, - Thread* thread, - const FunctorT& functor, - void (HostT::*callback)(ReturnT), - HostT* callback_host, - uint32_t id = 0) { - scoped_refptr closure( - new RefCountedObject >( - this, callback_posted_from, Thread::Current(), functor, callback, - callback_host)); - DoInvoke(posted_from, thread, closure, id); - } - - // Call |functor| asynchronously on |thread|, calling |callback| when done. - // Uses a separate Location for |callback_posted_from| so that the functor - // invoke and the callback invoke can be differentiated. - // Overloaded for void return. - template - void AsyncInvoke(const Location& posted_from, - const Location& callback_posted_from, - Thread* thread, - const FunctorT& functor, - void (HostT::*callback)(), - HostT* callback_host, - uint32_t id = 0) { - scoped_refptr closure( - new RefCountedObject >( - this, callback_posted_from, Thread::Current(), functor, callback, - callback_host)); - DoInvoke(posted_from, thread, closure, id); - } - - // Synchronously execute on |thread| all outstanding calls we own - // that are pending on |thread|, and wait for calls to complete - // before returning. Optionally filter by message id. - // The destructor will not wait for outstanding calls, so if that - // behavior is desired, call Flush() before destroying this object. - void Flush(Thread* thread, uint32_t id = MQID_ANY); - - // Signaled when this object is destructed. - sigslot::signal0<> SignalInvokerDestroyed; - - private: - void OnMessage(Message* msg) override; - void DoInvoke(const Location& posted_from, - Thread* thread, - const scoped_refptr& closure, - uint32_t id); - void DoInvokeDelayed(const Location& posted_from, - Thread* thread, - const scoped_refptr& closure, - uint32_t delay_ms, - uint32_t id); - bool destroying_; - - RTC_DISALLOW_COPY_AND_ASSIGN(AsyncInvoker); -}; - -// Similar to AsyncInvoker, but guards against the Thread being destroyed while -// there are outstanding dangling pointers to it. It will connect to the current -// thread in the constructor, and will get notified when that thread is -// destroyed. After GuardedAsyncInvoker is constructed, it can be used from -// other threads to post functors to the thread it was constructed on. If that -// thread dies, any further calls to AsyncInvoke() will be safely ignored. -class GuardedAsyncInvoker : public sigslot::has_slots<> { - public: - GuardedAsyncInvoker(); - ~GuardedAsyncInvoker() override; - - // Synchronously execute all outstanding calls we own, and wait for calls to - // complete before returning. Optionally filter by message id. The destructor - // will not wait for outstanding calls, so if that behavior is desired, call - // Flush() first. Returns false if the thread has died. - bool Flush(uint32_t id = MQID_ANY); - - // Call |functor| asynchronously with no callback upon completion. Returns - // immediately. Returns false if the thread has died. - template - bool AsyncInvoke(const Location& posted_from, - const FunctorT& functor, - uint32_t id = 0) { - rtc::CritScope cs(&crit_); - if (thread_ == nullptr) - return false; - invoker_.AsyncInvoke(posted_from, thread_, functor, id); - return true; - } - - // Call |functor| asynchronously with |delay_ms|, with no callback upon - // completion. Returns immediately. Returns false if the thread has died. - template - bool AsyncInvokeDelayed(const Location& posted_from, - const FunctorT& functor, - uint32_t delay_ms, - uint32_t id = 0) { - rtc::CritScope cs(&crit_); - if (thread_ == nullptr) - return false; - invoker_.AsyncInvokeDelayed(posted_from, thread_, - functor, delay_ms, id); - return true; - } - - // Call |functor| asynchronously, calling |callback| when done. Returns false - // if the thread has died. - template - bool AsyncInvoke(const Location& posted_from, - const Location& callback_posted_from, - const FunctorT& functor, - void (HostT::*callback)(ReturnT), - HostT* callback_host, - uint32_t id = 0) { - rtc::CritScope cs(&crit_); - if (thread_ == nullptr) - return false; - invoker_.AsyncInvoke( - posted_from, callback_posted_from, thread_, functor, callback, - callback_host, id); - return true; - } - - // Call |functor| asynchronously calling |callback| when done. Overloaded for - // void return. Returns false if the thread has died. - template - bool AsyncInvoke(const Location& posted_from, - const Location& callback_posted_from, - const FunctorT& functor, - void (HostT::*callback)(), - HostT* callback_host, - uint32_t id = 0) { - rtc::CritScope cs(&crit_); - if (thread_ == nullptr) - return false; - invoker_.AsyncInvoke( - posted_from, callback_posted_from, thread_, functor, callback, - callback_host, id); - return true; - } - - private: - // Callback when |thread_| is destroyed. - void ThreadDestroyed(); - - CriticalSection crit_; - Thread* thread_ GUARDED_BY(crit_); - AsyncInvoker invoker_ GUARDED_BY(crit_); -}; - -} // namespace rtc - -#endif // WEBRTC_BASE_ASYNCINVOKER_H_ diff --git a/WebRtc.NET/include/webrtc/base/asyncpacketsocket.h b/WebRtc.NET/include/webrtc/base/asyncpacketsocket.h deleted file mode 100644 index f18839ed..00000000 --- a/WebRtc.NET/include/webrtc/base/asyncpacketsocket.h +++ /dev/null @@ -1,143 +0,0 @@ -/* - * Copyright 2004 The WebRTC Project Authors. All rights reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_BASE_ASYNCPACKETSOCKET_H_ -#define WEBRTC_BASE_ASYNCPACKETSOCKET_H_ - -#include "webrtc/base/constructormagic.h" -#include "webrtc/base/dscp.h" -#include "webrtc/base/sigslot.h" -#include "webrtc/base/socket.h" -#include "webrtc/base/timeutils.h" - -namespace rtc { - -// This structure holds the info needed to update the packet send time header -// extension, including the information needed to update the authentication tag -// after changing the value. -struct PacketTimeUpdateParams { - PacketTimeUpdateParams(); - ~PacketTimeUpdateParams(); - - int rtp_sendtime_extension_id; // extension header id present in packet. - std::vector srtp_auth_key; // Authentication key. - int srtp_auth_tag_len; // Authentication tag length. - int64_t srtp_packet_index; // Required for Rtp Packet authentication. -}; - -// This structure holds meta information for the packet which is about to send -// over network. -struct PacketOptions { - PacketOptions() : dscp(DSCP_NO_CHANGE), packet_id(-1) {} - explicit PacketOptions(DiffServCodePoint dscp) : dscp(dscp), packet_id(-1) {} - - DiffServCodePoint dscp; - int packet_id; // 16 bits, -1 represents "not set". - PacketTimeUpdateParams packet_time_params; -}; - -// This structure will have the information about when packet is actually -// received by socket. -struct PacketTime { - PacketTime() : timestamp(-1), not_before(-1) {} - PacketTime(int64_t timestamp, int64_t not_before) - : timestamp(timestamp), not_before(not_before) {} - - int64_t timestamp; // Receive time after socket delivers the data. - - // Earliest possible time the data could have arrived, indicating the - // potential error in the |timestamp| value, in case the system, is busy. For - // example, the time of the last select() call. - // If unknown, this value will be set to zero. - int64_t not_before; -}; - -inline PacketTime CreatePacketTime(int64_t not_before) { - return PacketTime(TimeMicros(), not_before); -} - -// Provides the ability to receive packets asynchronously. Sends are not -// buffered since it is acceptable to drop packets under high load. -class AsyncPacketSocket : public sigslot::has_slots<> { - public: - enum State { - STATE_CLOSED, - STATE_BINDING, - STATE_BOUND, - STATE_CONNECTING, - STATE_CONNECTED - }; - - AsyncPacketSocket(); - ~AsyncPacketSocket() override; - - // Returns current local address. Address may be set to NULL if the - // socket is not bound yet (GetState() returns STATE_BINDING). - virtual SocketAddress GetLocalAddress() const = 0; - - // Returns remote address. Returns zeroes if this is not a client TCP socket. - virtual SocketAddress GetRemoteAddress() const = 0; - - // Send a packet. - virtual int Send(const void *pv, size_t cb, const PacketOptions& options) = 0; - virtual int SendTo(const void *pv, size_t cb, const SocketAddress& addr, - const PacketOptions& options) = 0; - - // Close the socket. - virtual int Close() = 0; - - // Returns current state of the socket. - virtual State GetState() const = 0; - - // Get/set options. - virtual int GetOption(Socket::Option opt, int* value) = 0; - virtual int SetOption(Socket::Option opt, int value) = 0; - - // Get/Set current error. - // TODO: Remove SetError(). - virtual int GetError() const = 0; - virtual void SetError(int error) = 0; - - // Emitted each time a packet is read. Used only for UDP and - // connected TCP sockets. - sigslot::signal5 SignalReadPacket; - - // Emitted each time a packet is sent. - sigslot::signal2 SignalSentPacket; - - // Emitted when the socket is currently able to send. - sigslot::signal1 SignalReadyToSend; - - // Emitted after address for the socket is allocated, i.e. binding - // is finished. State of the socket is changed from BINDING to BOUND - // (for UDP and server TCP sockets) or CONNECTING (for client TCP - // sockets). - sigslot::signal2 SignalAddressReady; - - // Emitted for client TCP sockets when state is changed from - // CONNECTING to CONNECTED. - sigslot::signal1 SignalConnect; - - // Emitted for client TCP sockets when state is changed from - // CONNECTED to CLOSED. - sigslot::signal2 SignalClose; - - // Used only for listening TCP sockets. - sigslot::signal2 SignalNewConnection; - - private: - RTC_DISALLOW_COPY_AND_ASSIGN(AsyncPacketSocket); -}; - -} // namespace rtc - -#endif // WEBRTC_BASE_ASYNCPACKETSOCKET_H_ diff --git a/WebRtc.NET/include/webrtc/base/atomicops.h b/WebRtc.NET/include/webrtc/base/atomicops.h deleted file mode 100644 index a286bf01..00000000 --- a/WebRtc.NET/include/webrtc/base/atomicops.h +++ /dev/null @@ -1,87 +0,0 @@ -/* - * Copyright 2011 The WebRTC Project Authors. All rights reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_BASE_ATOMICOPS_H_ -#define WEBRTC_BASE_ATOMICOPS_H_ - -#if defined(WEBRTC_WIN) -// Include winsock2.h before including to maintain consistency with -// win32.h. We can't include win32.h directly here since it pulls in -// headers such as basictypes.h which causes problems in Chromium where webrtc -// exists as two separate projects, webrtc and libjingle. -#include -#include -#endif // defined(WEBRTC_WIN) - -namespace rtc { -class AtomicOps { - public: -#if defined(WEBRTC_WIN) - // Assumes sizeof(int) == sizeof(LONG), which it is on Win32 and Win64. - static int Increment(volatile int* i) { - return ::InterlockedIncrement(reinterpret_cast(i)); - } - static int Decrement(volatile int* i) { - return ::InterlockedDecrement(reinterpret_cast(i)); - } - static int AcquireLoad(volatile const int* i) { - return *i; - } - static void ReleaseStore(volatile int* i, int value) { - *i = value; - } - static int CompareAndSwap(volatile int* i, int old_value, int new_value) { - return ::InterlockedCompareExchange(reinterpret_cast(i), - new_value, - old_value); - } - // Pointer variants. - template - static T* AcquireLoadPtr(T* volatile* ptr) { - return *ptr; - } - template - static T* CompareAndSwapPtr(T* volatile* ptr, T* old_value, T* new_value) { - return static_cast(::InterlockedCompareExchangePointer( - reinterpret_cast(ptr), new_value, old_value)); - } -#else - static int Increment(volatile int* i) { - return __sync_add_and_fetch(i, 1); - } - static int Decrement(volatile int* i) { - return __sync_sub_and_fetch(i, 1); - } - static int AcquireLoad(volatile const int* i) { - return __atomic_load_n(i, __ATOMIC_ACQUIRE); - } - static void ReleaseStore(volatile int* i, int value) { - __atomic_store_n(i, value, __ATOMIC_RELEASE); - } - static int CompareAndSwap(volatile int* i, int old_value, int new_value) { - return __sync_val_compare_and_swap(i, old_value, new_value); - } - // Pointer variants. - template - static T* AcquireLoadPtr(T* volatile* ptr) { - return __atomic_load_n(ptr, __ATOMIC_ACQUIRE); - } - template - static T* CompareAndSwapPtr(T* volatile* ptr, T* old_value, T* new_value) { - return __sync_val_compare_and_swap(ptr, old_value, new_value); - } -#endif -}; - - - -} - -#endif // WEBRTC_BASE_ATOMICOPS_H_ diff --git a/WebRtc.NET/include/webrtc/base/autodetectproxy.h b/WebRtc.NET/include/webrtc/base/autodetectproxy.h deleted file mode 100644 index 1788a033..00000000 --- a/WebRtc.NET/include/webrtc/base/autodetectproxy.h +++ /dev/null @@ -1,90 +0,0 @@ -/* - * Copyright 2004 The WebRTC Project Authors. All rights reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_BASE_AUTODETECTPROXY_H_ -#define WEBRTC_BASE_AUTODETECTPROXY_H_ - -#include - -#include "webrtc/base/constructormagic.h" -#include "webrtc/base/cryptstring.h" -#include "webrtc/base/proxydetect.h" -#include "webrtc/base/proxyinfo.h" -#include "webrtc/base/signalthread.h" - -namespace rtc { - -/////////////////////////////////////////////////////////////////////////////// -// AutoDetectProxy -/////////////////////////////////////////////////////////////////////////////// - -class AsyncResolverInterface; -class AsyncSocket; - -class AutoDetectProxy : public SignalThread { - public: - explicit AutoDetectProxy(const std::string& user_agent); - - const ProxyInfo& proxy() const { return proxy_; } - - void set_server_url(const std::string& url) { - server_url_ = url; - } - void set_proxy(const SocketAddress& proxy) { - proxy_.type = PROXY_UNKNOWN; - proxy_.address = proxy; - } - void set_auth_info(bool use_auth, const std::string& username, - const CryptString& password) { - if (use_auth) { - proxy_.username = username; - proxy_.password = password; - } - } - // Default implementation of GetProxySettingsForUrl. Override for special - // implementation. - virtual bool GetProxyForUrl(const char* agent, - const char* url, - rtc::ProxyInfo* proxy); - enum { MSG_TIMEOUT = SignalThread::ST_MSG_FIRST_AVAILABLE, - MSG_UNRESOLVABLE, - ADP_MSG_FIRST_AVAILABLE}; - - protected: - ~AutoDetectProxy() override; - - // SignalThread Interface - void DoWork() override; - void OnMessage(Message* msg) override; - - void Next(); - void Complete(ProxyType type); - - void OnConnectEvent(AsyncSocket * socket); - void OnReadEvent(AsyncSocket * socket); - void OnCloseEvent(AsyncSocket * socket, int error); - void OnTimeout(); - void OnResolveResult(AsyncResolverInterface* resolver); - bool DoConnect(); - - private: - std::string agent_; - std::string server_url_; - ProxyInfo proxy_; - AsyncResolverInterface* resolver_; - AsyncSocket* socket_; - int next_; - - RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(AutoDetectProxy); -}; - -} // namespace rtc - -#endif // WEBRTC_BASE_AUTODETECTPROXY_H_ diff --git a/WebRtc.NET/include/webrtc/base/base64.h b/WebRtc.NET/include/webrtc/base/base64.h deleted file mode 100644 index 903e77e5..00000000 --- a/WebRtc.NET/include/webrtc/base/base64.h +++ /dev/null @@ -1,123 +0,0 @@ - -//********************************************************************* -//* C_Base64 - a simple base64 encoder and decoder. -//* -//* Copyright (c) 1999, Bob Withers - bwit@pobox.com -//* -//* This code may be freely used for any purpose, either personal -//* or commercial, provided the authors copyright notice remains -//* intact. -//********************************************************************* - -#ifndef WEBRTC_BASE_BASE64_H__ -#define WEBRTC_BASE_BASE64_H__ - -#include -#include - -namespace rtc { - -class Base64 { - public: - enum DecodeOption { - DO_PARSE_STRICT = 1, // Parse only base64 characters - DO_PARSE_WHITE = 2, // Parse only base64 and whitespace characters - DO_PARSE_ANY = 3, // Parse all characters - DO_PARSE_MASK = 3, - - DO_PAD_YES = 4, // Padding is required - DO_PAD_ANY = 8, // Padding is optional - DO_PAD_NO = 12, // Padding is disallowed - DO_PAD_MASK = 12, - - DO_TERM_BUFFER = 16, // Must termiante at end of buffer - DO_TERM_CHAR = 32, // May terminate at any character boundary - DO_TERM_ANY = 48, // May terminate at a sub-character bit offset - DO_TERM_MASK = 48, - - // Strictest interpretation - DO_STRICT = DO_PARSE_STRICT | DO_PAD_YES | DO_TERM_BUFFER, - - DO_LAX = DO_PARSE_ANY | DO_PAD_ANY | DO_TERM_CHAR, - }; - typedef int DecodeFlags; - - static bool IsBase64Char(char ch); - - // Get the char next to the |ch| from the Base64Table. - // If the |ch| is the last one in the Base64Table then returns - // the first one from the table. - // Expects the |ch| be a base64 char. - // The result will be saved in |next_ch|. - // Returns true on success. - static bool GetNextBase64Char(char ch, char* next_ch); - - // Determines whether the given string consists entirely of valid base64 - // encoded characters. - static bool IsBase64Encoded(const std::string& str); - - static void EncodeFromArray(const void* data, - size_t len, - std::string* result); - static bool DecodeFromArray(const char* data, - size_t len, - DecodeFlags flags, - std::string* result, - size_t* data_used); - static bool DecodeFromArray(const char* data, - size_t len, - DecodeFlags flags, - std::vector* result, - size_t* data_used); - static bool DecodeFromArray(const char* data, - size_t len, - DecodeFlags flags, - std::vector* result, - size_t* data_used); - - // Convenience Methods - static inline std::string Encode(const std::string& data) { - std::string result; - EncodeFromArray(data.data(), data.size(), &result); - return result; - } - static inline std::string Decode(const std::string& data, DecodeFlags flags) { - std::string result; - DecodeFromArray(data.data(), data.size(), flags, &result, NULL); - return result; - } - static inline bool Decode(const std::string& data, - DecodeFlags flags, - std::string* result, - size_t* data_used) { - return DecodeFromArray(data.data(), data.size(), flags, result, data_used); - } - static inline bool Decode(const std::string& data, - DecodeFlags flags, - std::vector* result, - size_t* data_used) { - return DecodeFromArray(data.data(), data.size(), flags, result, data_used); - } - - private: - static const char Base64Table[]; - static const unsigned char DecodeTable[]; - - static size_t GetNextQuantum(DecodeFlags parse_flags, - bool illegal_pads, - const char* data, - size_t len, - size_t* dpos, - unsigned char qbuf[4], - bool* padded); - template - static bool DecodeFromArrayTemplate(const char* data, - size_t len, - DecodeFlags flags, - T* result, - size_t* data_used); -}; - -} // namespace rtc - -#endif // WEBRTC_BASE_BASE64_H__ diff --git a/WebRtc.NET/include/webrtc/base/basictypes.h b/WebRtc.NET/include/webrtc/base/basictypes.h deleted file mode 100644 index 87dcdc6d..00000000 --- a/WebRtc.NET/include/webrtc/base/basictypes.h +++ /dev/null @@ -1,70 +0,0 @@ -/* - * Copyright 2004 The WebRTC Project Authors. All rights reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_BASE_BASICTYPES_H_ -#define WEBRTC_BASE_BASICTYPES_H_ - -#include // for NULL, size_t -#include // for uintptr_t and (u)int_t types. - -// Detect compiler is for x86 or x64. -#if defined(__x86_64__) || defined(_M_X64) || \ - defined(__i386__) || defined(_M_IX86) -#define CPU_X86 1 -#endif - -// Detect compiler is for arm. -#if defined(__arm__) || defined(_M_ARM) -#define CPU_ARM 1 -#endif - -#if defined(CPU_X86) && defined(CPU_ARM) -#error CPU_X86 and CPU_ARM both defined. -#endif - -#if !defined(RTC_ARCH_CPU_BIG_ENDIAN) && !defined(RTC_ARCH_CPU_LITTLE_ENDIAN) -// x86, arm or GCC provided __BYTE_ORDER__ macros -#if defined(CPU_X86) || defined(CPU_ARM) || \ - (defined(__BYTE_ORDER__) && __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__) -#define RTC_ARCH_CPU_LITTLE_ENDIAN -#elif defined(__BYTE_ORDER__) && __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ -#define RTC_ARCH_CPU_BIG_ENDIAN -#else -#error RTC_ARCH_CPU_BIG_ENDIAN or RTC_ARCH_CPU_LITTLE_ENDIAN should be defined. -#endif -#endif - -#if defined(RTC_ARCH_CPU_BIG_ENDIAN) && defined(RTC_ARCH_CPU_LITTLE_ENDIAN) -#error RTC_ARCH_CPU_BIG_ENDIAN and RTC_ARCH_CPU_LITTLE_ENDIAN both defined. -#endif - -#if defined(WEBRTC_WIN) -typedef int socklen_t; -#endif - -// The following only works for C++ -#ifdef __cplusplus - -#ifndef ALIGNP -#define ALIGNP(p, t) \ - (reinterpret_cast(((reinterpret_cast(p) + \ - ((t) - 1)) & ~((t) - 1)))) -#endif - -#define RTC_IS_ALIGNED(p, a) (!((uintptr_t)(p) & ((a) - 1))) - -// Use these to declare and define a static local variable that gets leaked so -// that its destructors are not called at exit. -#define RTC_DEFINE_STATIC_LOCAL(type, name, arguments) \ - static type& name = *new type arguments - -#endif // __cplusplus - -#endif // WEBRTC_BASE_BASICTYPES_H_ diff --git a/WebRtc.NET/include/webrtc/base/bind.h b/WebRtc.NET/include/webrtc/base/bind.h deleted file mode 100644 index e8c1ab5e..00000000 --- a/WebRtc.NET/include/webrtc/base/bind.h +++ /dev/null @@ -1,1542 +0,0 @@ -// This file was GENERATED by command: -// pump.py bind.h.pump -// DO NOT EDIT BY HAND!!! - -/* - * Copyright 2012 The WebRTC Project Authors. All rights reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -// To generate bind.h from bind.h.pump, execute: -// /home/build/google3/third_party/gtest/scripts/pump.py bind.h.pump - -// Bind() is an overloaded function that converts method calls into function -// objects (aka functors). The method object is captured as a scoped_refptr<> if -// possible, and as a raw pointer otherwise. Any arguments to the method are -// captured by value. The return value of Bind is a stateful, nullary function -// object. Care should be taken about the lifetime of objects captured by -// Bind(); the returned functor knows nothing about the lifetime of a non -// ref-counted method object or any arguments passed by pointer, and calling the -// functor with a destroyed object will surely do bad things. -// -// Example usage: -// struct Foo { -// int Test1() { return 42; } -// int Test2() const { return 52; } -// int Test3(int x) { return x*x; } -// float Test4(int x, float y) { return x + y; } -// }; -// -// int main() { -// Foo foo; -// cout << rtc::Bind(&Foo::Test1, &foo)() << endl; -// cout << rtc::Bind(&Foo::Test2, &foo)() << endl; -// cout << rtc::Bind(&Foo::Test3, &foo, 3)() << endl; -// cout << rtc::Bind(&Foo::Test4, &foo, 7, 8.5f)() << endl; -// } -// -// Example usage of ref counted objects: -// struct Bar { -// int AddRef(); -// int Release(); -// -// void Test() {} -// void BindThis() { -// // The functor passed to AsyncInvoke() will keep this object alive. -// invoker.AsyncInvoke(RTC_FROM_HERE,rtc::Bind(&Bar::Test, this)); -// } -// }; -// -// int main() { -// rtc::scoped_refptr bar = new rtc::RefCountedObject(); -// auto functor = rtc::Bind(&Bar::Test, bar); -// bar = nullptr; -// // The functor stores an internal scoped_refptr, so this is safe. -// functor(); -// } -// - -#ifndef WEBRTC_BASE_BIND_H_ -#define WEBRTC_BASE_BIND_H_ - -#include "webrtc/base/scoped_ref_ptr.h" -#include "webrtc/base/template_util.h" - -#define NONAME - -namespace rtc { -namespace detail { -// This is needed because the template parameters in Bind can't be resolved -// if they're used both as parameters of the function pointer type and as -// parameters to Bind itself: the function pointer parameters are exact -// matches to the function prototype, but the parameters to bind have -// references stripped. This trick allows the compiler to dictate the Bind -// parameter types rather than deduce them. -template struct identity { typedef T type; }; - -// IsRefCounted::value will be true for types that can be used in -// rtc::scoped_refptr, i.e. types that implements nullary functions AddRef() -// and Release(), regardless of their return types. AddRef() and Release() can -// be defined in T or any superclass of T. -template -class IsRefCounted { - // This is a complex implementation detail done with SFINAE. - - // Define types such that sizeof(Yes) != sizeof(No). - struct Yes { char dummy[1]; }; - struct No { char dummy[2]; }; - // Define two overloaded template functions with return types of different - // size. This way, we can use sizeof() on the return type to determine which - // function the compiler would have chosen. One function will be preferred - // over the other if it is possible to create it without compiler errors, - // otherwise the compiler will simply remove it, and default to the less - // preferred function. - template - static Yes test(R* r, decltype(r->AddRef(), r->Release(), 42)); - template static No test(...); - -public: - // Trick the compiler to tell if it's possible to call AddRef() and Release(). - static const bool value = sizeof(test((T*)nullptr, 42)) == sizeof(Yes); -}; - -// TernaryTypeOperator is a helper class to select a type based on a static bool -// value. -template -struct TernaryTypeOperator {}; - -template -struct TernaryTypeOperator { - typedef IfTrueT type; -}; - -template -struct TernaryTypeOperator { - typedef IfFalseT type; -}; - -// PointerType::type will be scoped_refptr for ref counted types, and T* -// otherwise. -template -struct PointerType { - typedef typename TernaryTypeOperator::value, - scoped_refptr, - T*>::type type; -}; - -} // namespace detail - -template -class MethodFunctor0 { - public: - MethodFunctor0(MethodT method, ObjectT* object) - : method_(method), object_(object) {} - R operator()() const { - return (object_->*method_)(); } - private: - MethodT method_; - typename detail::PointerType::type object_; -}; - -template -class Functor0 { - public: - explicit Functor0(const FunctorT& functor) - : functor_(functor) {} - R operator()() const { - return functor_(); } - private: - FunctorT functor_; -}; - - -#define FP_T(x) R (ObjectT::*x)() - -template -MethodFunctor0 -Bind(FP_T(method), ObjectT* object) { - return MethodFunctor0( - method, object); -} - -#undef FP_T -#define FP_T(x) R (ObjectT::*x)() const - -template -MethodFunctor0 -Bind(FP_T(method), const ObjectT* object) { - return MethodFunctor0( - method, object); -} - -#undef FP_T -#define FP_T(x) R (ObjectT::*x)() - -template -MethodFunctor0 -Bind(FP_T(method), const scoped_refptr& object) { - return MethodFunctor0( - method, object.get()); -} - -#undef FP_T -#define FP_T(x) R (*x)() - -template -Functor0 -Bind(FP_T(function)) { - return Functor0( - function); -} - -#undef FP_T - -template -class MethodFunctor1 { - public: - MethodFunctor1(MethodT method, ObjectT* object, - P1 p1) - : method_(method), object_(object), - p1_(p1) {} - R operator()() const { - return (object_->*method_)(p1_); } - private: - MethodT method_; - typename detail::PointerType::type object_; - typename rtc::remove_reference::type p1_; -}; - -template -class Functor1 { - public: - Functor1(const FunctorT& functor, P1 p1) - : functor_(functor), - p1_(p1) {} - R operator()() const { - return functor_(p1_); } - private: - FunctorT functor_; - typename rtc::remove_reference::type p1_; -}; - - -#define FP_T(x) R (ObjectT::*x)(P1) - -template -MethodFunctor1 -Bind(FP_T(method), ObjectT* object, - typename detail::identity::type p1) { - return MethodFunctor1( - method, object, p1); -} - -#undef FP_T -#define FP_T(x) R (ObjectT::*x)(P1) const - -template -MethodFunctor1 -Bind(FP_T(method), const ObjectT* object, - typename detail::identity::type p1) { - return MethodFunctor1( - method, object, p1); -} - -#undef FP_T -#define FP_T(x) R (ObjectT::*x)(P1) - -template -MethodFunctor1 -Bind(FP_T(method), const scoped_refptr& object, - typename detail::identity::type p1) { - return MethodFunctor1( - method, object.get(), p1); -} - -#undef FP_T -#define FP_T(x) R (*x)(P1) - -template -Functor1 -Bind(FP_T(function), - typename detail::identity::type p1) { - return Functor1( - function, p1); -} - -#undef FP_T - -template -class MethodFunctor2 { - public: - MethodFunctor2(MethodT method, ObjectT* object, - P1 p1, - P2 p2) - : method_(method), object_(object), - p1_(p1), - p2_(p2) {} - R operator()() const { - return (object_->*method_)(p1_, p2_); } - private: - MethodT method_; - typename detail::PointerType::type object_; - typename rtc::remove_reference::type p1_; - typename rtc::remove_reference::type p2_; -}; - -template -class Functor2 { - public: - Functor2(const FunctorT& functor, P1 p1, P2 p2) - : functor_(functor), - p1_(p1), - p2_(p2) {} - R operator()() const { - return functor_(p1_, p2_); } - private: - FunctorT functor_; - typename rtc::remove_reference::type p1_; - typename rtc::remove_reference::type p2_; -}; - - -#define FP_T(x) R (ObjectT::*x)(P1, P2) - -template -MethodFunctor2 -Bind(FP_T(method), ObjectT* object, - typename detail::identity::type p1, - typename detail::identity::type p2) { - return MethodFunctor2( - method, object, p1, p2); -} - -#undef FP_T -#define FP_T(x) R (ObjectT::*x)(P1, P2) const - -template -MethodFunctor2 -Bind(FP_T(method), const ObjectT* object, - typename detail::identity::type p1, - typename detail::identity::type p2) { - return MethodFunctor2( - method, object, p1, p2); -} - -#undef FP_T -#define FP_T(x) R (ObjectT::*x)(P1, P2) - -template -MethodFunctor2 -Bind(FP_T(method), const scoped_refptr& object, - typename detail::identity::type p1, - typename detail::identity::type p2) { - return MethodFunctor2( - method, object.get(), p1, p2); -} - -#undef FP_T -#define FP_T(x) R (*x)(P1, P2) - -template -Functor2 -Bind(FP_T(function), - typename detail::identity::type p1, - typename detail::identity::type p2) { - return Functor2( - function, p1, p2); -} - -#undef FP_T - -template -class MethodFunctor3 { - public: - MethodFunctor3(MethodT method, ObjectT* object, - P1 p1, - P2 p2, - P3 p3) - : method_(method), object_(object), - p1_(p1), - p2_(p2), - p3_(p3) {} - R operator()() const { - return (object_->*method_)(p1_, p2_, p3_); } - private: - MethodT method_; - typename detail::PointerType::type object_; - typename rtc::remove_reference::type p1_; - typename rtc::remove_reference::type p2_; - typename rtc::remove_reference::type p3_; -}; - -template -class Functor3 { - public: - Functor3(const FunctorT& functor, P1 p1, P2 p2, P3 p3) - : functor_(functor), - p1_(p1), - p2_(p2), - p3_(p3) {} - R operator()() const { - return functor_(p1_, p2_, p3_); } - private: - FunctorT functor_; - typename rtc::remove_reference::type p1_; - typename rtc::remove_reference::type p2_; - typename rtc::remove_reference::type p3_; -}; - - -#define FP_T(x) R (ObjectT::*x)(P1, P2, P3) - -template -MethodFunctor3 -Bind(FP_T(method), ObjectT* object, - typename detail::identity::type p1, - typename detail::identity::type p2, - typename detail::identity::type p3) { - return MethodFunctor3( - method, object, p1, p2, p3); -} - -#undef FP_T -#define FP_T(x) R (ObjectT::*x)(P1, P2, P3) const - -template -MethodFunctor3 -Bind(FP_T(method), const ObjectT* object, - typename detail::identity::type p1, - typename detail::identity::type p2, - typename detail::identity::type p3) { - return MethodFunctor3( - method, object, p1, p2, p3); -} - -#undef FP_T -#define FP_T(x) R (ObjectT::*x)(P1, P2, P3) - -template -MethodFunctor3 -Bind(FP_T(method), const scoped_refptr& object, - typename detail::identity::type p1, - typename detail::identity::type p2, - typename detail::identity::type p3) { - return MethodFunctor3( - method, object.get(), p1, p2, p3); -} - -#undef FP_T -#define FP_T(x) R (*x)(P1, P2, P3) - -template -Functor3 -Bind(FP_T(function), - typename detail::identity::type p1, - typename detail::identity::type p2, - typename detail::identity::type p3) { - return Functor3( - function, p1, p2, p3); -} - -#undef FP_T - -template -class MethodFunctor4 { - public: - MethodFunctor4(MethodT method, ObjectT* object, - P1 p1, - P2 p2, - P3 p3, - P4 p4) - : method_(method), object_(object), - p1_(p1), - p2_(p2), - p3_(p3), - p4_(p4) {} - R operator()() const { - return (object_->*method_)(p1_, p2_, p3_, p4_); } - private: - MethodT method_; - typename detail::PointerType::type object_; - typename rtc::remove_reference::type p1_; - typename rtc::remove_reference::type p2_; - typename rtc::remove_reference::type p3_; - typename rtc::remove_reference::type p4_; -}; - -template -class Functor4 { - public: - Functor4(const FunctorT& functor, P1 p1, P2 p2, P3 p3, P4 p4) - : functor_(functor), - p1_(p1), - p2_(p2), - p3_(p3), - p4_(p4) {} - R operator()() const { - return functor_(p1_, p2_, p3_, p4_); } - private: - FunctorT functor_; - typename rtc::remove_reference::type p1_; - typename rtc::remove_reference::type p2_; - typename rtc::remove_reference::type p3_; - typename rtc::remove_reference::type p4_; -}; - - -#define FP_T(x) R (ObjectT::*x)(P1, P2, P3, P4) - -template -MethodFunctor4 -Bind(FP_T(method), ObjectT* object, - typename detail::identity::type p1, - typename detail::identity::type p2, - typename detail::identity::type p3, - typename detail::identity::type p4) { - return MethodFunctor4( - method, object, p1, p2, p3, p4); -} - -#undef FP_T -#define FP_T(x) R (ObjectT::*x)(P1, P2, P3, P4) const - -template -MethodFunctor4 -Bind(FP_T(method), const ObjectT* object, - typename detail::identity::type p1, - typename detail::identity::type p2, - typename detail::identity::type p3, - typename detail::identity::type p4) { - return MethodFunctor4( - method, object, p1, p2, p3, p4); -} - -#undef FP_T -#define FP_T(x) R (ObjectT::*x)(P1, P2, P3, P4) - -template -MethodFunctor4 -Bind(FP_T(method), const scoped_refptr& object, - typename detail::identity::type p1, - typename detail::identity::type p2, - typename detail::identity::type p3, - typename detail::identity::type p4) { - return MethodFunctor4( - method, object.get(), p1, p2, p3, p4); -} - -#undef FP_T -#define FP_T(x) R (*x)(P1, P2, P3, P4) - -template -Functor4 -Bind(FP_T(function), - typename detail::identity::type p1, - typename detail::identity::type p2, - typename detail::identity::type p3, - typename detail::identity::type p4) { - return Functor4( - function, p1, p2, p3, p4); -} - -#undef FP_T - -template -class MethodFunctor5 { - public: - MethodFunctor5(MethodT method, ObjectT* object, - P1 p1, - P2 p2, - P3 p3, - P4 p4, - P5 p5) - : method_(method), object_(object), - p1_(p1), - p2_(p2), - p3_(p3), - p4_(p4), - p5_(p5) {} - R operator()() const { - return (object_->*method_)(p1_, p2_, p3_, p4_, p5_); } - private: - MethodT method_; - typename detail::PointerType::type object_; - typename rtc::remove_reference::type p1_; - typename rtc::remove_reference::type p2_; - typename rtc::remove_reference::type p3_; - typename rtc::remove_reference::type p4_; - typename rtc::remove_reference::type p5_; -}; - -template -class Functor5 { - public: - Functor5(const FunctorT& functor, P1 p1, P2 p2, P3 p3, P4 p4, P5 p5) - : functor_(functor), - p1_(p1), - p2_(p2), - p3_(p3), - p4_(p4), - p5_(p5) {} - R operator()() const { - return functor_(p1_, p2_, p3_, p4_, p5_); } - private: - FunctorT functor_; - typename rtc::remove_reference::type p1_; - typename rtc::remove_reference::type p2_; - typename rtc::remove_reference::type p3_; - typename rtc::remove_reference::type p4_; - typename rtc::remove_reference::type p5_; -}; - - -#define FP_T(x) R (ObjectT::*x)(P1, P2, P3, P4, P5) - -template -MethodFunctor5 -Bind(FP_T(method), ObjectT* object, - typename detail::identity::type p1, - typename detail::identity::type p2, - typename detail::identity::type p3, - typename detail::identity::type p4, - typename detail::identity::type p5) { - return MethodFunctor5( - method, object, p1, p2, p3, p4, p5); -} - -#undef FP_T -#define FP_T(x) R (ObjectT::*x)(P1, P2, P3, P4, P5) const - -template -MethodFunctor5 -Bind(FP_T(method), const ObjectT* object, - typename detail::identity::type p1, - typename detail::identity::type p2, - typename detail::identity::type p3, - typename detail::identity::type p4, - typename detail::identity::type p5) { - return MethodFunctor5( - method, object, p1, p2, p3, p4, p5); -} - -#undef FP_T -#define FP_T(x) R (ObjectT::*x)(P1, P2, P3, P4, P5) - -template -MethodFunctor5 -Bind(FP_T(method), const scoped_refptr& object, - typename detail::identity::type p1, - typename detail::identity::type p2, - typename detail::identity::type p3, - typename detail::identity::type p4, - typename detail::identity::type p5) { - return MethodFunctor5( - method, object.get(), p1, p2, p3, p4, p5); -} - -#undef FP_T -#define FP_T(x) R (*x)(P1, P2, P3, P4, P5) - -template -Functor5 -Bind(FP_T(function), - typename detail::identity::type p1, - typename detail::identity::type p2, - typename detail::identity::type p3, - typename detail::identity::type p4, - typename detail::identity::type p5) { - return Functor5( - function, p1, p2, p3, p4, p5); -} - -#undef FP_T - -template -class MethodFunctor6 { - public: - MethodFunctor6(MethodT method, ObjectT* object, - P1 p1, - P2 p2, - P3 p3, - P4 p4, - P5 p5, - P6 p6) - : method_(method), object_(object), - p1_(p1), - p2_(p2), - p3_(p3), - p4_(p4), - p5_(p5), - p6_(p6) {} - R operator()() const { - return (object_->*method_)(p1_, p2_, p3_, p4_, p5_, p6_); } - private: - MethodT method_; - typename detail::PointerType::type object_; - typename rtc::remove_reference::type p1_; - typename rtc::remove_reference::type p2_; - typename rtc::remove_reference::type p3_; - typename rtc::remove_reference::type p4_; - typename rtc::remove_reference::type p5_; - typename rtc::remove_reference::type p6_; -}; - -template -class Functor6 { - public: - Functor6(const FunctorT& functor, P1 p1, P2 p2, P3 p3, P4 p4, P5 p5, P6 p6) - : functor_(functor), - p1_(p1), - p2_(p2), - p3_(p3), - p4_(p4), - p5_(p5), - p6_(p6) {} - R operator()() const { - return functor_(p1_, p2_, p3_, p4_, p5_, p6_); } - private: - FunctorT functor_; - typename rtc::remove_reference::type p1_; - typename rtc::remove_reference::type p2_; - typename rtc::remove_reference::type p3_; - typename rtc::remove_reference::type p4_; - typename rtc::remove_reference::type p5_; - typename rtc::remove_reference::type p6_; -}; - - -#define FP_T(x) R (ObjectT::*x)(P1, P2, P3, P4, P5, P6) - -template -MethodFunctor6 -Bind(FP_T(method), ObjectT* object, - typename detail::identity::type p1, - typename detail::identity::type p2, - typename detail::identity::type p3, - typename detail::identity::type p4, - typename detail::identity::type p5, - typename detail::identity::type p6) { - return MethodFunctor6( - method, object, p1, p2, p3, p4, p5, p6); -} - -#undef FP_T -#define FP_T(x) R (ObjectT::*x)(P1, P2, P3, P4, P5, P6) const - -template -MethodFunctor6 -Bind(FP_T(method), const ObjectT* object, - typename detail::identity::type p1, - typename detail::identity::type p2, - typename detail::identity::type p3, - typename detail::identity::type p4, - typename detail::identity::type p5, - typename detail::identity::type p6) { - return MethodFunctor6( - method, object, p1, p2, p3, p4, p5, p6); -} - -#undef FP_T -#define FP_T(x) R (ObjectT::*x)(P1, P2, P3, P4, P5, P6) - -template -MethodFunctor6 -Bind(FP_T(method), const scoped_refptr& object, - typename detail::identity::type p1, - typename detail::identity::type p2, - typename detail::identity::type p3, - typename detail::identity::type p4, - typename detail::identity::type p5, - typename detail::identity::type p6) { - return MethodFunctor6( - method, object.get(), p1, p2, p3, p4, p5, p6); -} - -#undef FP_T -#define FP_T(x) R (*x)(P1, P2, P3, P4, P5, P6) - -template -Functor6 -Bind(FP_T(function), - typename detail::identity::type p1, - typename detail::identity::type p2, - typename detail::identity::type p3, - typename detail::identity::type p4, - typename detail::identity::type p5, - typename detail::identity::type p6) { - return Functor6( - function, p1, p2, p3, p4, p5, p6); -} - -#undef FP_T - -template -class MethodFunctor7 { - public: - MethodFunctor7(MethodT method, - ObjectT* object, - P1 p1, - P2 p2, - P3 p3, - P4 p4, - P5 p5, - P6 p6, - P7 p7) - : method_(method), - object_(object), - p1_(p1), - p2_(p2), - p3_(p3), - p4_(p4), - p5_(p5), - p6_(p6), - p7_(p7) {} - R operator()() const { - return (object_->*method_)(p1_, p2_, p3_, p4_, p5_, p6_, p7_); - } - - private: - MethodT method_; - typename detail::PointerType::type object_; - typename rtc::remove_reference::type p1_; - typename rtc::remove_reference::type p2_; - typename rtc::remove_reference::type p3_; - typename rtc::remove_reference::type p4_; - typename rtc::remove_reference::type p5_; - typename rtc::remove_reference::type p6_; - typename rtc::remove_reference::type p7_; -}; - -template -class Functor7 { - public: - Functor7(const FunctorT& functor, - P1 p1, - P2 p2, - P3 p3, - P4 p4, - P5 p5, - P6 p6, - P7 p7) - : functor_(functor), - p1_(p1), - p2_(p2), - p3_(p3), - p4_(p4), - p5_(p5), - p6_(p6), - p7_(p7) {} - R operator()() const { return functor_(p1_, p2_, p3_, p4_, p5_, p6_, p7_); } - - private: - FunctorT functor_; - typename rtc::remove_reference::type p1_; - typename rtc::remove_reference::type p2_; - typename rtc::remove_reference::type p3_; - typename rtc::remove_reference::type p4_; - typename rtc::remove_reference::type p5_; - typename rtc::remove_reference::type p6_; - typename rtc::remove_reference::type p7_; -}; - -#define FP_T(x) R (ObjectT::*x)(P1, P2, P3, P4, P5, P6, P7) - -template -MethodFunctor7 Bind( - FP_T(method), - ObjectT* object, - typename detail::identity::type p1, - typename detail::identity::type p2, - typename detail::identity::type p3, - typename detail::identity::type p4, - typename detail::identity::type p5, - typename detail::identity::type p6, - typename detail::identity::type p7) { - return MethodFunctor7( - method, object, p1, p2, p3, p4, p5, p6, p7); -} - -#undef FP_T -#define FP_T(x) R (ObjectT::*x)(P1, P2, P3, P4, P5, P6, P7) const - -template -MethodFunctor7 Bind( - FP_T(method), - const ObjectT* object, - typename detail::identity::type p1, - typename detail::identity::type p2, - typename detail::identity::type p3, - typename detail::identity::type p4, - typename detail::identity::type p5, - typename detail::identity::type p6, - typename detail::identity::type p7) { - return MethodFunctor7(method, object, p1, p2, p3, p4, p5, p6, p7); -} - -#undef FP_T -#define FP_T(x) R (ObjectT::*x)(P1, P2, P3, P4, P5, P6, P7) - -template -MethodFunctor7 Bind( - FP_T(method), - const scoped_refptr& object, - typename detail::identity::type p1, - typename detail::identity::type p2, - typename detail::identity::type p3, - typename detail::identity::type p4, - typename detail::identity::type p5, - typename detail::identity::type p6, - typename detail::identity::type p7) { - return MethodFunctor7( - method, object.get(), p1, p2, p3, p4, p5, p6, p7); -} - -#undef FP_T -#define FP_T(x) R (*x)(P1, P2, P3, P4, P5, P6, P7) - -template -Functor7 Bind( - FP_T(function), - typename detail::identity::type p1, - typename detail::identity::type p2, - typename detail::identity::type p3, - typename detail::identity::type p4, - typename detail::identity::type p5, - typename detail::identity::type p6, - typename detail::identity::type p7) { - return Functor7( - function, p1, p2, p3, p4, p5, p6, p7); -} - -#undef FP_T - -template -class MethodFunctor8 { - public: - MethodFunctor8(MethodT method, - ObjectT* object, - P1 p1, - P2 p2, - P3 p3, - P4 p4, - P5 p5, - P6 p6, - P7 p7, - P8 p8) - : method_(method), - object_(object), - p1_(p1), - p2_(p2), - p3_(p3), - p4_(p4), - p5_(p5), - p6_(p6), - p7_(p7), - p8_(p8) {} - R operator()() const { - return (object_->*method_)(p1_, p2_, p3_, p4_, p5_, p6_, p7_, p8_); - } - - private: - MethodT method_; - typename detail::PointerType::type object_; - typename rtc::remove_reference::type p1_; - typename rtc::remove_reference::type p2_; - typename rtc::remove_reference::type p3_; - typename rtc::remove_reference::type p4_; - typename rtc::remove_reference::type p5_; - typename rtc::remove_reference::type p6_; - typename rtc::remove_reference::type p7_; - typename rtc::remove_reference::type p8_; -}; - -template -class Functor8 { - public: - Functor8(const FunctorT& functor, - P1 p1, - P2 p2, - P3 p3, - P4 p4, - P5 p5, - P6 p6, - P7 p7, - P8 p8) - : functor_(functor), - p1_(p1), - p2_(p2), - p3_(p3), - p4_(p4), - p5_(p5), - p6_(p6), - p7_(p7), - p8_(p8) {} - R operator()() const { - return functor_(p1_, p2_, p3_, p4_, p5_, p6_, p7_, p8_); - } - - private: - FunctorT functor_; - typename rtc::remove_reference::type p1_; - typename rtc::remove_reference::type p2_; - typename rtc::remove_reference::type p3_; - typename rtc::remove_reference::type p4_; - typename rtc::remove_reference::type p5_; - typename rtc::remove_reference::type p6_; - typename rtc::remove_reference::type p7_; - typename rtc::remove_reference::type p8_; -}; - -#define FP_T(x) R (ObjectT::*x)(P1, P2, P3, P4, P5, P6, P7, P8) - -template -MethodFunctor8 Bind( - FP_T(method), - ObjectT* object, - typename detail::identity::type p1, - typename detail::identity::type p2, - typename detail::identity::type p3, - typename detail::identity::type p4, - typename detail::identity::type p5, - typename detail::identity::type p6, - typename detail::identity::type p7, - typename detail::identity::type p8) { - return MethodFunctor8(method, object, p1, p2, p3, p4, p5, p6, p7, p8); -} - -#undef FP_T -#define FP_T(x) R (ObjectT::*x)(P1, P2, P3, P4, P5, P6, P7, P8) const - -template -MethodFunctor8 -Bind(FP_T(method), - const ObjectT* object, - typename detail::identity::type p1, - typename detail::identity::type p2, - typename detail::identity::type p3, - typename detail::identity::type p4, - typename detail::identity::type p5, - typename detail::identity::type p6, - typename detail::identity::type p7, - typename detail::identity::type p8) { - return MethodFunctor8(method, object, p1, p2, p3, p4, p5, p6, p7, p8); -} - -#undef FP_T -#define FP_T(x) R (ObjectT::*x)(P1, P2, P3, P4, P5, P6, P7, P8) - -template -MethodFunctor8 Bind( - FP_T(method), - const scoped_refptr& object, - typename detail::identity::type p1, - typename detail::identity::type p2, - typename detail::identity::type p3, - typename detail::identity::type p4, - typename detail::identity::type p5, - typename detail::identity::type p6, - typename detail::identity::type p7, - typename detail::identity::type p8) { - return MethodFunctor8(method, object.get(), p1, p2, p3, p4, p5, p6, p7, - p8); -} - -#undef FP_T -#define FP_T(x) R (*x)(P1, P2, P3, P4, P5, P6, P7, P8) - -template -Functor8 Bind( - FP_T(function), - typename detail::identity::type p1, - typename detail::identity::type p2, - typename detail::identity::type p3, - typename detail::identity::type p4, - typename detail::identity::type p5, - typename detail::identity::type p6, - typename detail::identity::type p7, - typename detail::identity::type p8) { - return Functor8( - function, p1, p2, p3, p4, p5, p6, p7, p8); -} - -#undef FP_T - -template -class MethodFunctor9 { - public: - MethodFunctor9(MethodT method, - ObjectT* object, - P1 p1, - P2 p2, - P3 p3, - P4 p4, - P5 p5, - P6 p6, - P7 p7, - P8 p8, - P9 p9) - : method_(method), - object_(object), - p1_(p1), - p2_(p2), - p3_(p3), - p4_(p4), - p5_(p5), - p6_(p6), - p7_(p7), - p8_(p8), - p9_(p9) {} - R operator()() const { - return (object_->*method_)(p1_, p2_, p3_, p4_, p5_, p6_, p7_, p8_, p9_); - } - - private: - MethodT method_; - typename detail::PointerType::type object_; - typename rtc::remove_reference::type p1_; - typename rtc::remove_reference::type p2_; - typename rtc::remove_reference::type p3_; - typename rtc::remove_reference::type p4_; - typename rtc::remove_reference::type p5_; - typename rtc::remove_reference::type p6_; - typename rtc::remove_reference::type p7_; - typename rtc::remove_reference::type p8_; - typename rtc::remove_reference::type p9_; -}; - -template -class Functor9 { - public: - Functor9(const FunctorT& functor, - P1 p1, - P2 p2, - P3 p3, - P4 p4, - P5 p5, - P6 p6, - P7 p7, - P8 p8, - P9 p9) - : functor_(functor), - p1_(p1), - p2_(p2), - p3_(p3), - p4_(p4), - p5_(p5), - p6_(p6), - p7_(p7), - p8_(p8), - p9_(p9) {} - R operator()() const { - return functor_(p1_, p2_, p3_, p4_, p5_, p6_, p7_, p8_, p9_); - } - - private: - FunctorT functor_; - typename rtc::remove_reference::type p1_; - typename rtc::remove_reference::type p2_; - typename rtc::remove_reference::type p3_; - typename rtc::remove_reference::type p4_; - typename rtc::remove_reference::type p5_; - typename rtc::remove_reference::type p6_; - typename rtc::remove_reference::type p7_; - typename rtc::remove_reference::type p8_; - typename rtc::remove_reference::type p9_; -}; - -#define FP_T(x) R (ObjectT::*x)(P1, P2, P3, P4, P5, P6, P7, P8, P9) - -template -MethodFunctor9 -Bind(FP_T(method), - ObjectT* object, - typename detail::identity::type p1, - typename detail::identity::type p2, - typename detail::identity::type p3, - typename detail::identity::type p4, - typename detail::identity::type p5, - typename detail::identity::type p6, - typename detail::identity::type p7, - typename detail::identity::type p8, - typename detail::identity::type p9) { - return MethodFunctor9(method, object, p1, p2, p3, p4, p5, p6, p7, p8, - p9); -} - -#undef FP_T -#define FP_T(x) R (ObjectT::*x)(P1, P2, P3, P4, P5, P6, P7, P8, P9) const - -template -MethodFunctor9 -Bind(FP_T(method), - const ObjectT* object, - typename detail::identity::type p1, - typename detail::identity::type p2, - typename detail::identity::type p3, - typename detail::identity::type p4, - typename detail::identity::type p5, - typename detail::identity::type p6, - typename detail::identity::type p7, - typename detail::identity::type p8, - typename detail::identity::type p9) { - return MethodFunctor9(method, object, p1, p2, p3, p4, p5, p6, p7, - p8, p9); -} - -#undef FP_T -#define FP_T(x) R (ObjectT::*x)(P1, P2, P3, P4, P5, P6, P7, P8, P9) - -template -MethodFunctor9 -Bind(FP_T(method), - const scoped_refptr& object, - typename detail::identity::type p1, - typename detail::identity::type p2, - typename detail::identity::type p3, - typename detail::identity::type p4, - typename detail::identity::type p5, - typename detail::identity::type p6, - typename detail::identity::type p7, - typename detail::identity::type p8, - typename detail::identity::type p9) { - return MethodFunctor9(method, object.get(), p1, p2, p3, p4, p5, p6, - p7, p8, p9); -} - -#undef FP_T -#define FP_T(x) R (*x)(P1, P2, P3, P4, P5, P6, P7, P8, P9) - -template -Functor9 Bind( - FP_T(function), - typename detail::identity::type p1, - typename detail::identity::type p2, - typename detail::identity::type p3, - typename detail::identity::type p4, - typename detail::identity::type p5, - typename detail::identity::type p6, - typename detail::identity::type p7, - typename detail::identity::type p8, - typename detail::identity::type p9) { - return Functor9( - function, p1, p2, p3, p4, p5, p6, p7, p8, p9); -} - -#undef FP_T - -} // namespace rtc - -#undef NONAME - -#endif // WEBRTC_BASE_BIND_H_ diff --git a/WebRtc.NET/include/webrtc/base/buffer.h b/WebRtc.NET/include/webrtc/base/buffer.h deleted file mode 100644 index 44f941eb..00000000 --- a/WebRtc.NET/include/webrtc/base/buffer.h +++ /dev/null @@ -1,374 +0,0 @@ -/* - * Copyright 2004 The WebRTC Project Authors. All rights reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_BASE_BUFFER_H_ -#define WEBRTC_BASE_BUFFER_H_ - -#include -#include -#include -#include -#include - -#include "webrtc/base/array_view.h" -#include "webrtc/base/checks.h" -#include "webrtc/base/type_traits.h" - -namespace rtc { - -namespace internal { - -// (Internal; please don't use outside this file.) Determines if elements of -// type U are compatible with a BufferT. For most types, we just ignore -// top-level const and forbid top-level volatile and require T and U to be -// otherwise equal, but all byte-sized integers (notably char, int8_t, and -// uint8_t) are compatible with each other. (Note: We aim to get rid of this -// behavior, and treat all types the same.) -template -struct BufferCompat { - static constexpr bool value = - !std::is_volatile::value && - ((std::is_integral::value && sizeof(T) == 1) - ? (std::is_integral::value && sizeof(U) == 1) - : (std::is_same::type>::value)); -}; - -} // namespace internal - -// Basic buffer class, can be grown and shrunk dynamically. -// Unlike std::string/vector, does not initialize data when increasing size. -template -class BufferT { - // We want T's destructor and default constructor to be trivial, i.e. perform - // no action, so that we don't have to touch the memory we allocate and - // deallocate. And we want T to be trivially copyable, so that we can copy T - // instances with std::memcpy. This is precisely the definition of a trivial - // type. - static_assert(std::is_trivial::value, "T must be a trivial type."); - - // This class relies heavily on being able to mutate its data. - static_assert(!std::is_const::value, "T may not be const"); - - public: - // An empty BufferT. - BufferT() : size_(0), capacity_(0), data_(nullptr) { - RTC_DCHECK(IsConsistent()); - } - - // Disable copy construction and copy assignment, since copying a buffer is - // expensive enough that we want to force the user to be explicit about it. - BufferT(const BufferT&) = delete; - BufferT& operator=(const BufferT&) = delete; - - BufferT(BufferT&& buf) - : size_(buf.size()), - capacity_(buf.capacity()), - data_(std::move(buf.data_)) { - RTC_DCHECK(IsConsistent()); - buf.OnMovedFrom(); - } - - // Construct a buffer with the specified number of uninitialized elements. - explicit BufferT(size_t size) : BufferT(size, size) {} - - BufferT(size_t size, size_t capacity) - : size_(size), - capacity_(std::max(size, capacity)), - data_(new T[capacity_]) { - RTC_DCHECK(IsConsistent()); - } - - // Construct a buffer and copy the specified number of elements into it. - template ::value>::type* = nullptr> - BufferT(const U* data, size_t size) : BufferT(data, size, size) {} - - template ::value>::type* = nullptr> - BufferT(U* data, size_t size, size_t capacity) : BufferT(size, capacity) { - static_assert(sizeof(T) == sizeof(U), ""); - std::memcpy(data_.get(), data, size * sizeof(U)); - } - - // Construct a buffer from the contents of an array. - template ::value>::type* = nullptr> - BufferT(U (&array)[N]) : BufferT(array, N) {} - - // Get a pointer to the data. Just .data() will give you a (const) T*, but if - // T is a byte-sized integer, you may also use .data() for any other - // byte-sized integer U. - template ::value>::type* = nullptr> - const U* data() const { - RTC_DCHECK(IsConsistent()); - return reinterpret_cast(data_.get()); - } - - template ::value>::type* = nullptr> - U* data() { - RTC_DCHECK(IsConsistent()); - return reinterpret_cast(data_.get()); - } - - bool empty() const { - RTC_DCHECK(IsConsistent()); - return size_ == 0; - } - - size_t size() const { - RTC_DCHECK(IsConsistent()); - return size_; - } - - size_t capacity() const { - RTC_DCHECK(IsConsistent()); - return capacity_; - } - - BufferT& operator=(BufferT&& buf) { - RTC_DCHECK(IsConsistent()); - RTC_DCHECK(buf.IsConsistent()); - size_ = buf.size_; - capacity_ = buf.capacity_; - data_ = std::move(buf.data_); - buf.OnMovedFrom(); - return *this; - } - - bool operator==(const BufferT& buf) const { - RTC_DCHECK(IsConsistent()); - if (size_ != buf.size_) { - return false; - } - if (std::is_integral::value) { - // Optimization. - return std::memcmp(data_.get(), buf.data_.get(), size_ * sizeof(T)) == 0; - } - for (size_t i = 0; i < size_; ++i) { - if (data_[i] != buf.data_[i]) { - return false; - } - } - return true; - } - - bool operator!=(const BufferT& buf) const { return !(*this == buf); } - - T& operator[](size_t index) { - RTC_DCHECK_LT(index, size_); - return data()[index]; - } - - T operator[](size_t index) const { - RTC_DCHECK_LT(index, size_); - return data()[index]; - } - - // The SetData functions replace the contents of the buffer. They accept the - // same input types as the constructors. - template ::value>::type* = nullptr> - void SetData(const U* data, size_t size) { - RTC_DCHECK(IsConsistent()); - size_ = 0; - AppendData(data, size); - } - - template ::value>::type* = nullptr> - void SetData(const U (&array)[N]) { - SetData(array, N); - } - - template ::value>::type* = nullptr> - void SetData(const W& w) { - SetData(w.data(), w.size()); - } - - // Replace the data in the buffer with at most |max_elements| of data, using - // the function |setter|, which should have the following signature: - // size_t setter(ArrayView view) - // |setter| is given an appropriately typed ArrayView of the area in which to - // write the data (i.e. starting at the beginning of the buffer) and should - // return the number of elements actually written. This number must be <= - // |max_elements|. - template ::value>::type* = nullptr> - size_t SetData(size_t max_elements, F&& setter) { - RTC_DCHECK(IsConsistent()); - size_ = 0; - return AppendData(max_elements, std::forward(setter)); - } - - // The AppendData functions add data to the end of the buffer. They accept - // the same input types as the constructors. - template ::value>::type* = nullptr> - void AppendData(const U* data, size_t size) { - RTC_DCHECK(IsConsistent()); - const size_t new_size = size_ + size; - EnsureCapacityWithHeadroom(new_size, true); - static_assert(sizeof(T) == sizeof(U), ""); - std::memcpy(data_.get() + size_, data, size * sizeof(U)); - size_ = new_size; - RTC_DCHECK(IsConsistent()); - } - - template ::value>::type* = nullptr> - void AppendData(const U (&array)[N]) { - AppendData(array, N); - } - - template ::value>::type* = nullptr> - void AppendData(const W& w) { - AppendData(w.data(), w.size()); - } - - template ::value>::type* = nullptr> - void AppendData(const U& item) { - AppendData(&item, 1); - } - - // Append at most |max_elements| to the end of the buffer, using the function - // |setter|, which should have the following signature: - // size_t setter(ArrayView view) - // |setter| is given an appropriately typed ArrayView of the area in which to - // write the data (i.e. starting at the former end of the buffer) and should - // return the number of elements actually written. This number must be <= - // |max_elements|. - template ::value>::type* = nullptr> - size_t AppendData(size_t max_elements, F&& setter) { - RTC_DCHECK(IsConsistent()); - const size_t old_size = size_; - SetSize(old_size + max_elements); - U* base_ptr = data() + old_size; - size_t written_elements = setter(rtc::ArrayView(base_ptr, max_elements)); - - RTC_CHECK_LE(written_elements, max_elements); - size_ = old_size + written_elements; - RTC_DCHECK(IsConsistent()); - return written_elements; - } - - // Sets the size of the buffer. If the new size is smaller than the old, the - // buffer contents will be kept but truncated; if the new size is greater, - // the existing contents will be kept and the new space will be - // uninitialized. - void SetSize(size_t size) { - EnsureCapacityWithHeadroom(size, true); - size_ = size; - } - - // Ensure that the buffer size can be increased to at least capacity without - // further reallocation. (Of course, this operation might need to reallocate - // the buffer.) - void EnsureCapacity(size_t capacity) { - // Don't allocate extra headroom, since the user is asking for a specific - // capacity. - EnsureCapacityWithHeadroom(capacity, false); - } - - // Resets the buffer to zero size without altering capacity. Works even if the - // buffer has been moved from. - void Clear() { - size_ = 0; - RTC_DCHECK(IsConsistent()); - } - - // Swaps two buffers. Also works for buffers that have been moved from. - friend void swap(BufferT& a, BufferT& b) { - using std::swap; - swap(a.size_, b.size_); - swap(a.capacity_, b.capacity_); - swap(a.data_, b.data_); - } - - private: - void EnsureCapacityWithHeadroom(size_t capacity, bool extra_headroom) { - RTC_DCHECK(IsConsistent()); - if (capacity <= capacity_) - return; - - // If the caller asks for extra headroom, ensure that the new capacity is - // >= 1.5 times the old capacity. Any constant > 1 is sufficient to prevent - // quadratic behavior; as to why we pick 1.5 in particular, see - // https://github.com/facebook/folly/blob/master/folly/docs/FBVector.md and - // http://www.gahcep.com/cpp-internals-stl-vector-part-1/. - const size_t new_capacity = - extra_headroom ? std::max(capacity, capacity_ + capacity_ / 2) - : capacity; - - std::unique_ptr new_data(new T[new_capacity]); - std::memcpy(new_data.get(), data_.get(), size_ * sizeof(T)); - data_ = std::move(new_data); - capacity_ = new_capacity; - RTC_DCHECK(IsConsistent()); - } - - // Precondition for all methods except Clear and the destructor. - // Postcondition for all methods except move construction and move - // assignment, which leave the moved-from object in a possibly inconsistent - // state. - bool IsConsistent() const { - return (data_ || capacity_ == 0) && capacity_ >= size_; - } - - // Called when *this has been moved from. Conceptually it's a no-op, but we - // can mutate the state slightly to help subsequent sanity checks catch bugs. - void OnMovedFrom() { -#if RTC_DCHECK_IS_ON - // Make *this consistent and empty. Shouldn't be necessary, but better safe - // than sorry. - size_ = 0; - capacity_ = 0; -#else - // Ensure that *this is always inconsistent, to provoke bugs. - size_ = 1; - capacity_ = 0; -#endif - } - - size_t size_; - size_t capacity_; - std::unique_ptr data_; -}; - -// By far the most common sort of buffer. -using Buffer = BufferT; - -} // namespace rtc - -#endif // WEBRTC_BASE_BUFFER_H_ diff --git a/WebRtc.NET/include/webrtc/base/bytebuffer.h b/WebRtc.NET/include/webrtc/base/bytebuffer.h deleted file mode 100644 index 546c4478..00000000 --- a/WebRtc.NET/include/webrtc/base/bytebuffer.h +++ /dev/null @@ -1,139 +0,0 @@ -/* - * Copyright 2004 The WebRTC Project Authors. All rights reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_BASE_BYTEBUFFER_H_ -#define WEBRTC_BASE_BYTEBUFFER_H_ - -#include - -#include "webrtc/base/basictypes.h" -#include "webrtc/base/buffer.h" -#include "webrtc/base/constructormagic.h" - -namespace rtc { - -class ByteBuffer { - public: - enum ByteOrder { - ORDER_NETWORK = 0, // Default, use network byte order (big endian). - ORDER_HOST, // Use the native order of the host. - }; - - explicit ByteBuffer(ByteOrder byte_order) : byte_order_(byte_order) {} - - ByteOrder Order() const { return byte_order_; } - - private: - ByteOrder byte_order_; - - RTC_DISALLOW_COPY_AND_ASSIGN(ByteBuffer); -}; - -class ByteBufferWriter : public ByteBuffer { - public: - // |byte_order| defines order of bytes in the buffer. - ByteBufferWriter(); - explicit ByteBufferWriter(ByteOrder byte_order); - ByteBufferWriter(const char* bytes, size_t len); - ByteBufferWriter(const char* bytes, size_t len, ByteOrder byte_order); - - ~ByteBufferWriter(); - - const char* Data() const { return bytes_; } - size_t Length() const { return end_; } - size_t Capacity() const { return size_; } - - // Write value to the buffer. Resizes the buffer when it is - // neccessary. - void WriteUInt8(uint8_t val); - void WriteUInt16(uint16_t val); - void WriteUInt24(uint32_t val); - void WriteUInt32(uint32_t val); - void WriteUInt64(uint64_t val); - void WriteUVarint(uint64_t val); - void WriteString(const std::string& val); - void WriteBytes(const char* val, size_t len); - - // Reserves the given number of bytes and returns a char* that can be written - // into. Useful for functions that require a char* buffer and not a - // ByteBufferWriter. - char* ReserveWriteBuffer(size_t len); - - // Resize the buffer to the specified |size|. - void Resize(size_t size); - - // Clears the contents of the buffer. After this, Length() will be 0. - void Clear(); - - private: - void Construct(const char* bytes, size_t size); - - char* bytes_; - size_t size_; - size_t end_; - - // There are sensible ways to define these, but they aren't needed in our code - // base. - RTC_DISALLOW_COPY_AND_ASSIGN(ByteBufferWriter); -}; - -// The ByteBufferReader references the passed data, i.e. the pointer must be -// valid during the lifetime of the reader. -class ByteBufferReader : public ByteBuffer { - public: - ByteBufferReader(const char* bytes, size_t len); - ByteBufferReader(const char* bytes, size_t len, ByteOrder byte_order); - - // Initializes buffer from a zero-terminated string. - explicit ByteBufferReader(const char* bytes); - - explicit ByteBufferReader(const Buffer& buf); - - explicit ByteBufferReader(const ByteBufferWriter& buf); - - // Returns start of unprocessed data. - const char* Data() const { return bytes_ + start_; } - // Returns number of unprocessed bytes. - size_t Length() const { return end_ - start_; } - - // Read a next value from the buffer. Return false if there isn't - // enough data left for the specified type. - bool ReadUInt8(uint8_t* val); - bool ReadUInt16(uint16_t* val); - bool ReadUInt24(uint32_t* val); - bool ReadUInt32(uint32_t* val); - bool ReadUInt64(uint64_t* val); - bool ReadUVarint(uint64_t* val); - bool ReadBytes(char* val, size_t len); - - // Appends next |len| bytes from the buffer to |val|. Returns false - // if there is less than |len| bytes left. - bool ReadString(std::string* val, size_t len); - - // Moves current position |size| bytes forward. Returns false if - // there is less than |size| bytes left in the buffer. Consume doesn't - // permanently remove data, so remembered read positions are still valid - // after this call. - bool Consume(size_t size); - - private: - void Construct(const char* bytes, size_t size); - - const char* bytes_; - size_t size_; - size_t start_; - size_t end_; - - RTC_DISALLOW_COPY_AND_ASSIGN(ByteBufferReader); -}; - -} // namespace rtc - -#endif // WEBRTC_BASE_BYTEBUFFER_H_ diff --git a/WebRtc.NET/include/webrtc/base/byteorder.h b/WebRtc.NET/include/webrtc/base/byteorder.h deleted file mode 100644 index d579e6e1..00000000 --- a/WebRtc.NET/include/webrtc/base/byteorder.h +++ /dev/null @@ -1,166 +0,0 @@ -/* - * Copyright 2004 The WebRTC Project Authors. All rights reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_BASE_BYTEORDER_H_ -#define WEBRTC_BASE_BYTEORDER_H_ - -#if defined(WEBRTC_POSIX) && !defined(__native_client__) -#include -#endif - -#if defined(WEBRTC_WIN) -#include -#endif - -#include "webrtc/base/basictypes.h" - -namespace rtc { - -// Reading and writing of little and big-endian numbers from memory -// TODO: Optimized versions, with direct read/writes of -// integers in host-endian format, when the platform supports it. - -inline void Set8(void* memory, size_t offset, uint8_t v) { - static_cast(memory)[offset] = v; -} - -inline uint8_t Get8(const void* memory, size_t offset) { - return static_cast(memory)[offset]; -} - -inline void SetBE16(void* memory, uint16_t v) { - Set8(memory, 0, static_cast(v >> 8)); - Set8(memory, 1, static_cast(v >> 0)); -} - -inline void SetBE32(void* memory, uint32_t v) { - Set8(memory, 0, static_cast(v >> 24)); - Set8(memory, 1, static_cast(v >> 16)); - Set8(memory, 2, static_cast(v >> 8)); - Set8(memory, 3, static_cast(v >> 0)); -} - -inline void SetBE64(void* memory, uint64_t v) { - Set8(memory, 0, static_cast(v >> 56)); - Set8(memory, 1, static_cast(v >> 48)); - Set8(memory, 2, static_cast(v >> 40)); - Set8(memory, 3, static_cast(v >> 32)); - Set8(memory, 4, static_cast(v >> 24)); - Set8(memory, 5, static_cast(v >> 16)); - Set8(memory, 6, static_cast(v >> 8)); - Set8(memory, 7, static_cast(v >> 0)); -} - -inline uint16_t GetBE16(const void* memory) { - return static_cast((Get8(memory, 0) << 8) | (Get8(memory, 1) << 0)); -} - -inline uint32_t GetBE32(const void* memory) { - return (static_cast(Get8(memory, 0)) << 24) | - (static_cast(Get8(memory, 1)) << 16) | - (static_cast(Get8(memory, 2)) << 8) | - (static_cast(Get8(memory, 3)) << 0); -} - -inline uint64_t GetBE64(const void* memory) { - return (static_cast(Get8(memory, 0)) << 56) | - (static_cast(Get8(memory, 1)) << 48) | - (static_cast(Get8(memory, 2)) << 40) | - (static_cast(Get8(memory, 3)) << 32) | - (static_cast(Get8(memory, 4)) << 24) | - (static_cast(Get8(memory, 5)) << 16) | - (static_cast(Get8(memory, 6)) << 8) | - (static_cast(Get8(memory, 7)) << 0); -} - -inline void SetLE16(void* memory, uint16_t v) { - Set8(memory, 0, static_cast(v >> 0)); - Set8(memory, 1, static_cast(v >> 8)); -} - -inline void SetLE32(void* memory, uint32_t v) { - Set8(memory, 0, static_cast(v >> 0)); - Set8(memory, 1, static_cast(v >> 8)); - Set8(memory, 2, static_cast(v >> 16)); - Set8(memory, 3, static_cast(v >> 24)); -} - -inline void SetLE64(void* memory, uint64_t v) { - Set8(memory, 0, static_cast(v >> 0)); - Set8(memory, 1, static_cast(v >> 8)); - Set8(memory, 2, static_cast(v >> 16)); - Set8(memory, 3, static_cast(v >> 24)); - Set8(memory, 4, static_cast(v >> 32)); - Set8(memory, 5, static_cast(v >> 40)); - Set8(memory, 6, static_cast(v >> 48)); - Set8(memory, 7, static_cast(v >> 56)); -} - -inline uint16_t GetLE16(const void* memory) { - return static_cast((Get8(memory, 0) << 0) | (Get8(memory, 1) << 8)); -} - -inline uint32_t GetLE32(const void* memory) { - return (static_cast(Get8(memory, 0)) << 0) | - (static_cast(Get8(memory, 1)) << 8) | - (static_cast(Get8(memory, 2)) << 16) | - (static_cast(Get8(memory, 3)) << 24); -} - -inline uint64_t GetLE64(const void* memory) { - return (static_cast(Get8(memory, 0)) << 0) | - (static_cast(Get8(memory, 1)) << 8) | - (static_cast(Get8(memory, 2)) << 16) | - (static_cast(Get8(memory, 3)) << 24) | - (static_cast(Get8(memory, 4)) << 32) | - (static_cast(Get8(memory, 5)) << 40) | - (static_cast(Get8(memory, 6)) << 48) | - (static_cast(Get8(memory, 7)) << 56); -} - -// Check if the current host is big endian. -inline bool IsHostBigEndian() { - static const int number = 1; - return 0 == *reinterpret_cast(&number); -} - -inline uint16_t HostToNetwork16(uint16_t n) { - uint16_t result; - SetBE16(&result, n); - return result; -} - -inline uint32_t HostToNetwork32(uint32_t n) { - uint32_t result; - SetBE32(&result, n); - return result; -} - -inline uint64_t HostToNetwork64(uint64_t n) { - uint64_t result; - SetBE64(&result, n); - return result; -} - -inline uint16_t NetworkToHost16(uint16_t n) { - return GetBE16(&n); -} - -inline uint32_t NetworkToHost32(uint32_t n) { - return GetBE32(&n); -} - -inline uint64_t NetworkToHost64(uint64_t n) { - return GetBE64(&n); -} - -} // namespace rtc - -#endif // WEBRTC_BASE_BYTEORDER_H_ diff --git a/WebRtc.NET/include/webrtc/base/callback.h b/WebRtc.NET/include/webrtc/base/callback.h deleted file mode 100644 index 7ffdcd73..00000000 --- a/WebRtc.NET/include/webrtc/base/callback.h +++ /dev/null @@ -1,260 +0,0 @@ -// This file was GENERATED by command: -// pump.py callback.h.pump -// DO NOT EDIT BY HAND!!! - -/* - * Copyright 2012 The WebRTC Project Authors. All rights reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -// To generate callback.h from callback.h.pump, execute: -// /home/build/google3/third_party/gtest/scripts/pump.py callback.h.pump - -// Callbacks are callable object containers. They can hold a function pointer -// or a function object and behave like a value type. Internally, data is -// reference-counted, making copies and pass-by-value inexpensive. -// -// Callbacks are typed using template arguments. The format is: -// CallbackN -// where N is the number of arguments supplied to the callable object. -// Callbacks are invoked using operator(), just like a function or a function -// object. Default-constructed callbacks are "empty," and executing an empty -// callback does nothing. A callback can be made empty by assigning it from -// a default-constructed callback. -// -// Callbacks are similar in purpose to std::function (which isn't available on -// all platforms we support) and a lightweight alternative to sigslots. Since -// they effectively hide the type of the object they call, they're useful in -// breaking dependencies between objects that need to interact with one another. -// Notably, they can hold the results of Bind(), std::bind*, etc, without -// needing -// to know the resulting object type of those calls. -// -// Sigslots, on the other hand, provide a fuller feature set, such as multiple -// subscriptions to a signal, optional thread-safety, and lifetime tracking of -// slots. When these features are needed, choose sigslots. -// -// Example: -// int sqr(int x) { return x * x; } -// struct AddK { -// int k; -// int operator()(int x) const { return x + k; } -// } add_k = {5}; -// -// Callback1 my_callback; -// cout << my_callback.empty() << endl; // true -// -// my_callback = Callback1(&sqr); -// cout << my_callback.empty() << endl; // false -// cout << my_callback(3) << endl; // 9 -// -// my_callback = Callback1(add_k); -// cout << my_callback(10) << endl; // 15 -// -// my_callback = Callback1(); -// cout << my_callback.empty() << endl; // true - -#ifndef WEBRTC_BASE_CALLBACK_H_ -#define WEBRTC_BASE_CALLBACK_H_ - -#include "webrtc/base/refcount.h" -#include "webrtc/base/scoped_ref_ptr.h" - -namespace rtc { - -template -class Callback0 { - public: - // Default copy operations are appropriate for this class. - Callback0() {} - template Callback0(const T& functor) - : helper_(new RefCountedObject< HelperImpl >(functor)) {} - R operator()() { - if (empty()) - return R(); - return helper_->Run(); - } - bool empty() const { return !helper_; } - - private: - struct Helper : RefCountInterface { - virtual ~Helper() {} - virtual R Run() = 0; - }; - template struct HelperImpl : Helper { - explicit HelperImpl(const T& functor) : functor_(functor) {} - virtual R Run() { - return functor_(); - } - T functor_; - }; - scoped_refptr helper_; -}; - -template -class Callback1 { - public: - // Default copy operations are appropriate for this class. - Callback1() {} - template Callback1(const T& functor) - : helper_(new RefCountedObject< HelperImpl >(functor)) {} - R operator()(P1 p1) { - if (empty()) - return R(); - return helper_->Run(p1); - } - bool empty() const { return !helper_; } - - private: - struct Helper : RefCountInterface { - virtual ~Helper() {} - virtual R Run(P1 p1) = 0; - }; - template struct HelperImpl : Helper { - explicit HelperImpl(const T& functor) : functor_(functor) {} - virtual R Run(P1 p1) { - return functor_(p1); - } - T functor_; - }; - scoped_refptr helper_; -}; - -template -class Callback2 { - public: - // Default copy operations are appropriate for this class. - Callback2() {} - template Callback2(const T& functor) - : helper_(new RefCountedObject< HelperImpl >(functor)) {} - R operator()(P1 p1, P2 p2) { - if (empty()) - return R(); - return helper_->Run(p1, p2); - } - bool empty() const { return !helper_; } - - private: - struct Helper : RefCountInterface { - virtual ~Helper() {} - virtual R Run(P1 p1, P2 p2) = 0; - }; - template struct HelperImpl : Helper { - explicit HelperImpl(const T& functor) : functor_(functor) {} - virtual R Run(P1 p1, P2 p2) { - return functor_(p1, p2); - } - T functor_; - }; - scoped_refptr helper_; -}; - -template -class Callback3 { - public: - // Default copy operations are appropriate for this class. - Callback3() {} - template Callback3(const T& functor) - : helper_(new RefCountedObject< HelperImpl >(functor)) {} - R operator()(P1 p1, P2 p2, P3 p3) { - if (empty()) - return R(); - return helper_->Run(p1, p2, p3); - } - bool empty() const { return !helper_; } - - private: - struct Helper : RefCountInterface { - virtual ~Helper() {} - virtual R Run(P1 p1, P2 p2, P3 p3) = 0; - }; - template struct HelperImpl : Helper { - explicit HelperImpl(const T& functor) : functor_(functor) {} - virtual R Run(P1 p1, P2 p2, P3 p3) { - return functor_(p1, p2, p3); - } - T functor_; - }; - scoped_refptr helper_; -}; - -template -class Callback4 { - public: - // Default copy operations are appropriate for this class. - Callback4() {} - template Callback4(const T& functor) - : helper_(new RefCountedObject< HelperImpl >(functor)) {} - R operator()(P1 p1, P2 p2, P3 p3, P4 p4) { - if (empty()) - return R(); - return helper_->Run(p1, p2, p3, p4); - } - bool empty() const { return !helper_; } - - private: - struct Helper : RefCountInterface { - virtual ~Helper() {} - virtual R Run(P1 p1, P2 p2, P3 p3, P4 p4) = 0; - }; - template struct HelperImpl : Helper { - explicit HelperImpl(const T& functor) : functor_(functor) {} - virtual R Run(P1 p1, P2 p2, P3 p3, P4 p4) { - return functor_(p1, p2, p3, p4); - } - T functor_; - }; - scoped_refptr helper_; -}; - -template -class Callback5 { - public: - // Default copy operations are appropriate for this class. - Callback5() {} - template Callback5(const T& functor) - : helper_(new RefCountedObject< HelperImpl >(functor)) {} - R operator()(P1 p1, P2 p2, P3 p3, P4 p4, P5 p5) { - if (empty()) - return R(); - return helper_->Run(p1, p2, p3, p4, p5); - } - bool empty() const { return !helper_; } - - private: - struct Helper : RefCountInterface { - virtual ~Helper() {} - virtual R Run(P1 p1, P2 p2, P3 p3, P4 p4, P5 p5) = 0; - }; - template struct HelperImpl : Helper { - explicit HelperImpl(const T& functor) : functor_(functor) {} - virtual R Run(P1 p1, P2 p2, P3 p3, P4 p4, P5 p5) { - return functor_(p1, p2, p3, p4, p5); - } - T functor_; - }; - scoped_refptr helper_; -}; -} // namespace rtc - -#endif // WEBRTC_BASE_CALLBACK_H_ diff --git a/WebRtc.NET/include/webrtc/base/checks.h b/WebRtc.NET/include/webrtc/base/checks.h deleted file mode 100644 index e165741b..00000000 --- a/WebRtc.NET/include/webrtc/base/checks.h +++ /dev/null @@ -1,289 +0,0 @@ -/* - * Copyright 2006 The WebRTC Project Authors. All rights reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_BASE_CHECKS_H_ -#define WEBRTC_BASE_CHECKS_H_ - -#include "webrtc/typedefs.h" - -// If you for some reson need to know if DCHECKs are on, test the value of -// RTC_DCHECK_IS_ON. (Test its value, not if it's defined; it'll always be -// defined, to either a true or a false value.) -#if !defined(NDEBUG) || defined(DCHECK_ALWAYS_ON) -#define RTC_DCHECK_IS_ON 1 -#else -#define RTC_DCHECK_IS_ON 0 -#endif - -#ifdef __cplusplus -extern "C" { -#endif -NO_RETURN void rtc_FatalMessage(const char* file, int line, const char* msg); -#ifdef __cplusplus -} // extern "C" -#endif - -#ifdef __cplusplus -// C++ version. - -#include -#include - -#include "webrtc/base/safe_compare.h" - -// The macros here print a message to stderr and abort under various -// conditions. All will accept additional stream messages. For example: -// RTC_DCHECK_EQ(foo, bar) << "I'm printed when foo != bar."; -// -// - RTC_CHECK(x) is an assertion that x is always true, and that if it isn't, -// it's better to terminate the process than to continue. During development, -// the reason that it's better to terminate might simply be that the error -// handling code isn't in place yet; in production, the reason might be that -// the author of the code truly believes that x will always be true, but that -// she recognizes that if she is wrong, abrupt and unpleasant process -// termination is still better than carrying on with the assumption violated. -// -// RTC_CHECK always evaluates its argument, so it's OK for x to have side -// effects. -// -// - RTC_DCHECK(x) is the same as RTC_CHECK(x)---an assertion that x is always -// true---except that x will only be evaluated in debug builds; in production -// builds, x is simply assumed to be true. This is useful if evaluating x is -// expensive and the expected cost of failing to detect the violated -// assumption is acceptable. You should not handle cases where a production -// build fails to spot a violated condition, even those that would result in -// crashes. If the code needs to cope with the error, make it cope, but don't -// call RTC_DCHECK; if the condition really can't occur, but you'd sleep -// better at night knowing that the process will suicide instead of carrying -// on in case you were wrong, use RTC_CHECK instead of RTC_DCHECK. -// -// RTC_DCHECK only evaluates its argument in debug builds, so if x has visible -// side effects, you need to write e.g. -// bool w = x; RTC_DCHECK(w); -// -// - RTC_CHECK_EQ, _NE, _GT, ..., and RTC_DCHECK_EQ, _NE, _GT, ... are -// specialized variants of RTC_CHECK and RTC_DCHECK that print prettier -// messages if the condition doesn't hold. Prefer them to raw RTC_CHECK and -// RTC_DCHECK. -// -// - FATAL() aborts unconditionally. -// -// TODO(ajm): Ideally, checks.h would be combined with logging.h, but -// consolidation with system_wrappers/logging.h should happen first. - -namespace rtc { - -// Helper macro which avoids evaluating the arguments to a stream if -// the condition doesn't hold. -#define RTC_LAZY_STREAM(stream, condition) \ - !(condition) ? static_cast(0) : rtc::FatalMessageVoidify() & (stream) - -// The actual stream used isn't important. We reference |ignored| in the code -// but don't evaluate it; this is to avoid "unused variable" warnings (we do so -// in a particularly convoluted way with an extra ?: because that appears to be -// the simplest construct that keeps Visual Studio from complaining about -// condition being unused). -#define RTC_EAT_STREAM_PARAMETERS(ignored) \ - (true ? true : ((void)(ignored), true)) \ - ? static_cast(0) \ - : rtc::FatalMessageVoidify() & rtc::FatalMessage("", 0).stream() - -// Call RTC_EAT_STREAM_PARAMETERS with an argument that fails to compile if -// values of the same types as |a| and |b| can't be compared with the given -// operation, and that would evaluate |a| and |b| if evaluated. -#define RTC_EAT_STREAM_PARAMETERS_OP(op, a, b) \ - RTC_EAT_STREAM_PARAMETERS(((void)rtc::safe_cmp::op(a, b))) - -// RTC_CHECK dies with a fatal error if condition is not true. It is *not* -// controlled by NDEBUG or anything else, so the check will be executed -// regardless of compilation mode. -// -// We make sure RTC_CHECK et al. always evaluates their arguments, as -// doing RTC_CHECK(FunctionWithSideEffect()) is a common idiom. -#define RTC_CHECK(condition) \ - RTC_LAZY_STREAM(rtc::FatalMessage(__FILE__, __LINE__).stream(), \ - !(condition)) \ - << "Check failed: " #condition << std::endl << "# " - -// Helper macro for binary operators. -// Don't use this macro directly in your code, use RTC_CHECK_EQ et al below. -// -// TODO(akalin): Rewrite this so that constructs like if (...) -// RTC_CHECK_EQ(...) else { ... } work properly. -#define RTC_CHECK_OP(name, op, val1, val2) \ - if (std::string* _result = \ - rtc::Check##name##Impl((val1), (val2), #val1 " " #op " " #val2)) \ - rtc::FatalMessage(__FILE__, __LINE__, _result).stream() - -// Build the error message string. This is separate from the "Impl" -// function template because it is not performance critical and so can -// be out of line, while the "Impl" code should be inline. Caller -// takes ownership of the returned string. -template -std::string* MakeCheckOpString(const t1& v1, const t2& v2, const char* names) { - std::ostringstream ss; - ss << names << " (" << v1 << " vs. " << v2 << ")"; - std::string* msg = new std::string(ss.str()); - return msg; -} - -// MSVC doesn't like complex extern templates and DLLs. -#if !defined(COMPILER_MSVC) -// Commonly used instantiations of MakeCheckOpString<>. Explicitly instantiated -// in logging.cc. -extern template std::string* MakeCheckOpString( - const int&, const int&, const char* names); -extern template -std::string* MakeCheckOpString( - const unsigned long&, const unsigned long&, const char* names); -extern template -std::string* MakeCheckOpString( - const unsigned long&, const unsigned int&, const char* names); -extern template -std::string* MakeCheckOpString( - const unsigned int&, const unsigned long&, const char* names); -extern template -std::string* MakeCheckOpString( - const std::string&, const std::string&, const char* name); -#endif - -// Helper functions for RTC_CHECK_OP macro. -// The (int, int) specialization works around the issue that the compiler -// will not instantiate the template version of the function on values of -// unnamed enum type - see comment below. -#define DEFINE_RTC_CHECK_OP_IMPL(name) \ - template \ - inline std::string* Check##name##Impl(const t1& v1, const t2& v2, \ - const char* names) { \ - if (rtc::safe_cmp::name(v1, v2)) \ - return NULL; \ - else \ - return rtc::MakeCheckOpString(v1, v2, names); \ - } \ - inline std::string* Check##name##Impl(int v1, int v2, const char* names) { \ - if (rtc::safe_cmp::name(v1, v2)) \ - return NULL; \ - else \ - return rtc::MakeCheckOpString(v1, v2, names); \ - } -DEFINE_RTC_CHECK_OP_IMPL(Eq) -DEFINE_RTC_CHECK_OP_IMPL(Ne) -DEFINE_RTC_CHECK_OP_IMPL(Le) -DEFINE_RTC_CHECK_OP_IMPL(Lt) -DEFINE_RTC_CHECK_OP_IMPL(Ge) -DEFINE_RTC_CHECK_OP_IMPL(Gt) -#undef DEFINE_RTC_CHECK_OP_IMPL - -#define RTC_CHECK_EQ(val1, val2) RTC_CHECK_OP(Eq, ==, val1, val2) -#define RTC_CHECK_NE(val1, val2) RTC_CHECK_OP(Ne, !=, val1, val2) -#define RTC_CHECK_LE(val1, val2) RTC_CHECK_OP(Le, <=, val1, val2) -#define RTC_CHECK_LT(val1, val2) RTC_CHECK_OP(Lt, <, val1, val2) -#define RTC_CHECK_GE(val1, val2) RTC_CHECK_OP(Ge, >=, val1, val2) -#define RTC_CHECK_GT(val1, val2) RTC_CHECK_OP(Gt, >, val1, val2) - -// The RTC_DCHECK macro is equivalent to RTC_CHECK except that it only generates -// code in debug builds. It does reference the condition parameter in all cases, -// though, so callers won't risk getting warnings about unused variables. -#if RTC_DCHECK_IS_ON -#define RTC_DCHECK(condition) RTC_CHECK(condition) -#define RTC_DCHECK_EQ(v1, v2) RTC_CHECK_EQ(v1, v2) -#define RTC_DCHECK_NE(v1, v2) RTC_CHECK_NE(v1, v2) -#define RTC_DCHECK_LE(v1, v2) RTC_CHECK_LE(v1, v2) -#define RTC_DCHECK_LT(v1, v2) RTC_CHECK_LT(v1, v2) -#define RTC_DCHECK_GE(v1, v2) RTC_CHECK_GE(v1, v2) -#define RTC_DCHECK_GT(v1, v2) RTC_CHECK_GT(v1, v2) -#else -#define RTC_DCHECK(condition) RTC_EAT_STREAM_PARAMETERS(condition) -#define RTC_DCHECK_EQ(v1, v2) RTC_EAT_STREAM_PARAMETERS_OP(Eq, v1, v2) -#define RTC_DCHECK_NE(v1, v2) RTC_EAT_STREAM_PARAMETERS_OP(Ne, v1, v2) -#define RTC_DCHECK_LE(v1, v2) RTC_EAT_STREAM_PARAMETERS_OP(Le, v1, v2) -#define RTC_DCHECK_LT(v1, v2) RTC_EAT_STREAM_PARAMETERS_OP(Lt, v1, v2) -#define RTC_DCHECK_GE(v1, v2) RTC_EAT_STREAM_PARAMETERS_OP(Ge, v1, v2) -#define RTC_DCHECK_GT(v1, v2) RTC_EAT_STREAM_PARAMETERS_OP(Gt, v1, v2) -#endif - -// This is identical to LogMessageVoidify but in name. -class FatalMessageVoidify { - public: - FatalMessageVoidify() { } - // This has to be an operator with a precedence lower than << but - // higher than ?: - void operator&(std::ostream&) { } -}; - -#define RTC_UNREACHABLE_CODE_HIT false -#define RTC_NOTREACHED() RTC_DCHECK(RTC_UNREACHABLE_CODE_HIT) - -#define FATAL() rtc::FatalMessage(__FILE__, __LINE__).stream() -// TODO(ajm): Consider adding RTC_NOTIMPLEMENTED macro when -// base/logging.h and system_wrappers/logging.h are consolidated such that we -// can match the Chromium behavior. - -// Like a stripped-down LogMessage from logging.h, except that it aborts. -class FatalMessage { - public: - FatalMessage(const char* file, int line); - // Used for RTC_CHECK_EQ(), etc. Takes ownership of the given string. - FatalMessage(const char* file, int line, std::string* result); - NO_RETURN ~FatalMessage(); - - std::ostream& stream() { return stream_; } - - private: - void Init(const char* file, int line); - - std::ostringstream stream_; -}; - -// Performs the integer division a/b and returns the result. CHECKs that the -// remainder is zero. -template -inline T CheckedDivExact(T a, T b) { - RTC_CHECK_EQ(a % b, 0) << a << " is not evenly divisible by " << b; - return a / b; -} - -} // namespace rtc - -#else // __cplusplus not defined -// C version. Lacks many features compared to the C++ version, but usage -// guidelines are the same. - -#define RTC_CHECK(condition) \ - do { \ - if (!(condition)) { \ - rtc_FatalMessage(__FILE__, __LINE__, "CHECK failed: " #condition); \ - } \ - } while (0) - -#define RTC_CHECK_EQ(a, b) RTC_CHECK((a) == (b)) -#define RTC_CHECK_NE(a, b) RTC_CHECK((a) != (b)) -#define RTC_CHECK_LE(a, b) RTC_CHECK((a) <= (b)) -#define RTC_CHECK_LT(a, b) RTC_CHECK((a) < (b)) -#define RTC_CHECK_GE(a, b) RTC_CHECK((a) >= (b)) -#define RTC_CHECK_GT(a, b) RTC_CHECK((a) > (b)) - -#define RTC_DCHECK(condition) \ - do { \ - if (RTC_DCHECK_IS_ON && !(condition)) { \ - rtc_FatalMessage(__FILE__, __LINE__, "DCHECK failed: " #condition); \ - } \ - } while (0) - -#define RTC_DCHECK_EQ(a, b) RTC_DCHECK((a) == (b)) -#define RTC_DCHECK_NE(a, b) RTC_DCHECK((a) != (b)) -#define RTC_DCHECK_LE(a, b) RTC_DCHECK((a) <= (b)) -#define RTC_DCHECK_LT(a, b) RTC_DCHECK((a) < (b)) -#define RTC_DCHECK_GE(a, b) RTC_DCHECK((a) >= (b)) -#define RTC_DCHECK_GT(a, b) RTC_DCHECK((a) > (b)) - -#endif // __cplusplus - -#endif // WEBRTC_BASE_CHECKS_H_ diff --git a/WebRtc.NET/include/webrtc/base/common.h b/WebRtc.NET/include/webrtc/base/common.h deleted file mode 100644 index fe98ef5d..00000000 --- a/WebRtc.NET/include/webrtc/base/common.h +++ /dev/null @@ -1,201 +0,0 @@ -/* - * Copyright 2004 The WebRTC Project Authors. All rights reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_BASE_COMMON_H_ // NOLINT -#define WEBRTC_BASE_COMMON_H_ - -#include "webrtc/base/constructormagic.h" - -#if defined(_MSC_VER) -// warning C4355: 'this' : used in base member initializer list -#pragma warning(disable:4355) -#endif - -////////////////////////////////////////////////////////////////////// -// General Utilities -////////////////////////////////////////////////////////////////////// - -#ifndef RTC_UNUSED -#define RTC_UNUSED(x) RtcUnused(static_cast(&x)) -#define RTC_UNUSED2(x, y) RtcUnused(static_cast(&x)); \ - RtcUnused(static_cast(&y)) -#define RTC_UNUSED3(x, y, z) RtcUnused(static_cast(&x)); \ - RtcUnused(static_cast(&y)); \ - RtcUnused(static_cast(&z)) -#define RTC_UNUSED4(x, y, z, a) RtcUnused(static_cast(&x)); \ - RtcUnused(static_cast(&y)); \ - RtcUnused(static_cast(&z)); \ - RtcUnused(static_cast(&a)) -#define RTC_UNUSED5(x, y, z, a, b) RtcUnused(static_cast(&x)); \ - RtcUnused(static_cast(&y)); \ - RtcUnused(static_cast(&z)); \ - RtcUnused(static_cast(&a)); \ - RtcUnused(static_cast(&b)) -inline void RtcUnused(const void*) {} -#endif // RTC_UNUSED - -#if !defined(WEBRTC_WIN) - -#ifndef strnicmp -#define strnicmp(x, y, n) strncasecmp(x, y, n) -#endif - -#ifndef stricmp -#define stricmp(x, y) strcasecmp(x, y) -#endif - -#endif // !defined(WEBRTC_WIN) - -///////////////////////////////////////////////////////////////////////////// -// Assertions -///////////////////////////////////////////////////////////////////////////// - -#ifndef ENABLE_DEBUG -#if !defined(NDEBUG) -#define ENABLE_DEBUG 1 -#else -#define ENABLE_DEBUG 0 -#endif -#endif // !defined(ENABLE_DEBUG) - -// Even for release builds, allow for the override of LogAssert. Though no -// macro is provided, this can still be used for explicit runtime asserts -// and allow applications to override the assert behavior. - -namespace rtc { - - -// If a debugger is attached, triggers a debugger breakpoint. If a debugger is -// not attached, forces program termination. -void Break(); - -// LogAssert writes information about an assertion to the log. It's called by -// Assert (and from the ASSERT macro in debug mode) before any other action -// is taken (e.g. breaking the debugger, abort()ing, etc.). -void LogAssert(const char* function, const char* file, int line, - const char* expression); - -typedef void (*AssertLogger)(const char* function, - const char* file, - int line, - const char* expression); - -// Sets a custom assert logger to be used instead of the default LogAssert -// behavior. To clear the custom assert logger, pass NULL for |logger| and the -// default behavior will be restored. Only one custom assert logger can be set -// at a time, so this should generally be set during application startup and -// only by one component. -void SetCustomAssertLogger(AssertLogger logger); - -bool IsOdd(int n); - -bool IsEven(int n); - -} // namespace rtc - -#if ENABLE_DEBUG - -namespace rtc { - -inline bool Assert(bool result, const char* function, const char* file, - int line, const char* expression) { - if (!result) { - LogAssert(function, file, line, expression); - Break(); - } - return result; -} - -// Same as Assert above, but does not call Break(). Used in assert macros -// that implement their own breaking. -inline bool AssertNoBreak(bool result, const char* function, const char* file, - int line, const char* expression) { - if (!result) - LogAssert(function, file, line, expression); - return result; -} - -} // namespace rtc - -#if defined(_MSC_VER) && _MSC_VER < 1300 -#define __FUNCTION__ "" -#endif - -#ifndef ASSERT -#if defined(WIN32) -// Using debugbreak() inline on Windows directly in the ASSERT macro, has the -// benefit of breaking exactly where the failing expression is and not two -// calls up the stack. -#define ASSERT(x) \ - (rtc::AssertNoBreak((x), __FUNCTION__, __FILE__, __LINE__, #x) ? \ - (void)(1) : __debugbreak()) -#else -#define ASSERT(x) \ - (void)rtc::Assert((x), __FUNCTION__, __FILE__, __LINE__, #x) -#endif -#endif - -#ifndef VERIFY -#if defined(WIN32) -#define VERIFY(x) \ - (rtc::AssertNoBreak((x), __FUNCTION__, __FILE__, __LINE__, #x) ? \ - true : (__debugbreak(), false)) -#else -#define VERIFY(x) rtc::Assert((x), __FUNCTION__, __FILE__, __LINE__, #x) -#endif -#endif - -#else // !ENABLE_DEBUG - -namespace rtc { - -inline bool ImplicitCastToBool(bool result) { return result; } - -} // namespace rtc - -#ifndef ASSERT -#define ASSERT(x) (void)0 -#endif - -#ifndef VERIFY -#define VERIFY(x) rtc::ImplicitCastToBool(x) -#endif - -#endif // !ENABLE_DEBUG - -#define COMPILE_TIME_ASSERT(expr) char CTA_UNIQUE_NAME[expr] -#define CTA_UNIQUE_NAME CTA_MAKE_NAME(__LINE__) -#define CTA_MAKE_NAME(line) CTA_MAKE_NAME2(line) -#define CTA_MAKE_NAME2(line) constraint_ ## line - -// Forces compiler to inline, even against its better judgement. Use wisely. -#if defined(__GNUC__) -#define FORCE_INLINE __attribute__ ((__always_inline__)) -#elif defined(WEBRTC_WIN) -#define FORCE_INLINE __forceinline -#else -#define FORCE_INLINE -#endif - -// Annotate a function indicating the caller must examine the return value. -// Use like: -// int foo() WARN_UNUSED_RESULT; -// To explicitly ignore a result, see |ignore_result()| in . -// TODO(ajm): Hack to avoid multiple definitions until the base/ of webrtc and -// libjingle are merged. -#if !defined(WARN_UNUSED_RESULT) -#if defined(__GNUC__) || defined(__clang__) -#define WARN_UNUSED_RESULT __attribute__ ((__warn_unused_result__)) -#else -#define WARN_UNUSED_RESULT -#endif -#endif // WARN_UNUSED_RESULT - -#endif // WEBRTC_BASE_COMMON_H_ // NOLINT diff --git a/WebRtc.NET/include/webrtc/base/criticalsection.h b/WebRtc.NET/include/webrtc/base/criticalsection.h deleted file mode 100644 index a0f9a6be..00000000 --- a/WebRtc.NET/include/webrtc/base/criticalsection.h +++ /dev/null @@ -1,151 +0,0 @@ -/* - * Copyright 2004 The WebRTC Project Authors. All rights reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_BASE_CRITICALSECTION_H_ -#define WEBRTC_BASE_CRITICALSECTION_H_ - -#include "webrtc/base/atomicops.h" -#include "webrtc/base/checks.h" -#include "webrtc/base/constructormagic.h" -#include "webrtc/base/thread_annotations.h" -#include "webrtc/base/platform_thread_types.h" - -#if defined(WEBRTC_WIN) -// Include winsock2.h before including to maintain consistency with -// win32.h. We can't include win32.h directly here since it pulls in -// headers such as basictypes.h which causes problems in Chromium where webrtc -// exists as two separate projects, webrtc and libjingle. -#include -#include -#include // must come after windows headers. -#endif // defined(WEBRTC_WIN) - -#if defined(WEBRTC_POSIX) -#include -#endif - -// See notes in the 'Performance' unit test for the effects of this flag. -#define USE_NATIVE_MUTEX_ON_MAC 0 - -#if defined(WEBRTC_MAC) && !USE_NATIVE_MUTEX_ON_MAC -#include -#endif - -#define CS_DEBUG_CHECKS RTC_DCHECK_IS_ON - -#if CS_DEBUG_CHECKS -#define CS_DEBUG_CODE(x) x -#else // !CS_DEBUG_CHECKS -#define CS_DEBUG_CODE(x) -#endif // !CS_DEBUG_CHECKS - -namespace rtc { - -// Locking methods (Enter, TryEnter, Leave)are const to permit protecting -// members inside a const context without requiring mutable CriticalSections -// everywhere. -class LOCKABLE CriticalSection { - public: - CriticalSection(); - ~CriticalSection(); - - void Enter() const EXCLUSIVE_LOCK_FUNCTION(); - bool TryEnter() const EXCLUSIVE_TRYLOCK_FUNCTION(true); - void Leave() const UNLOCK_FUNCTION(); - - private: - // Use only for RTC_DCHECKing. - bool CurrentThreadIsOwner() const; - -#if defined(WEBRTC_WIN) - mutable CRITICAL_SECTION crit_; -#elif defined(WEBRTC_POSIX) -#if defined(WEBRTC_MAC) && !USE_NATIVE_MUTEX_ON_MAC - // Number of times the lock has been locked + number of threads waiting. - // TODO(tommi): We could use this number and subtract the recursion count - // to find places where we have multiple threads contending on the same lock. - mutable volatile int lock_queue_; - // |recursion_| represents the recursion count + 1 for the thread that owns - // the lock. Only modified by the thread that owns the lock. - mutable int recursion_; - // Used to signal a single waiting thread when the lock becomes available. - mutable dispatch_semaphore_t semaphore_; - // The thread that currently holds the lock. Required to handle recursion. - mutable PlatformThreadRef owning_thread_; -#else - mutable pthread_mutex_t mutex_; -#endif - CS_DEBUG_CODE(mutable PlatformThreadRef thread_); - CS_DEBUG_CODE(mutable int recursion_count_); -#endif -}; - -// CritScope, for serializing execution through a scope. -class SCOPED_LOCKABLE CritScope { - public: - explicit CritScope(const CriticalSection* cs) EXCLUSIVE_LOCK_FUNCTION(cs); - ~CritScope() UNLOCK_FUNCTION(); - private: - const CriticalSection* const cs_; - RTC_DISALLOW_COPY_AND_ASSIGN(CritScope); -}; - -// Tries to lock a critical section on construction via -// CriticalSection::TryEnter, and unlocks on destruction if the -// lock was taken. Never blocks. -// -// IMPORTANT: Unlike CritScope, the lock may not be owned by this thread in -// subsequent code. Users *must* check locked() to determine if the -// lock was taken. If you're not calling locked(), you're doing it wrong! -class TryCritScope { - public: - explicit TryCritScope(const CriticalSection* cs); - ~TryCritScope(); -#if defined(WEBRTC_WIN) - _Check_return_ bool locked() const; -#else - bool locked() const __attribute__ ((__warn_unused_result__)); -#endif - private: - const CriticalSection* const cs_; - const bool locked_; - CS_DEBUG_CODE(mutable bool lock_was_called_); - RTC_DISALLOW_COPY_AND_ASSIGN(TryCritScope); -}; - -// A POD lock used to protect global variables. Do NOT use for other purposes. -// No custom constructor or private data member should be added. -class LOCKABLE GlobalLockPod { - public: - void Lock() EXCLUSIVE_LOCK_FUNCTION(); - - void Unlock() UNLOCK_FUNCTION(); - - volatile int lock_acquired; -}; - -class GlobalLock : public GlobalLockPod { - public: - GlobalLock(); -}; - -// GlobalLockScope, for serializing execution through a scope. -class SCOPED_LOCKABLE GlobalLockScope { - public: - explicit GlobalLockScope(GlobalLockPod* lock) EXCLUSIVE_LOCK_FUNCTION(lock); - ~GlobalLockScope() UNLOCK_FUNCTION(); - private: - GlobalLockPod* const lock_; - RTC_DISALLOW_COPY_AND_ASSIGN(GlobalLockScope); -}; - -} // namespace rtc - -#endif // WEBRTC_BASE_CRITICALSECTION_H_ diff --git a/WebRtc.NET/include/webrtc/base/cryptstring.h b/WebRtc.NET/include/webrtc/base/cryptstring.h deleted file mode 100644 index e1ee309f..00000000 --- a/WebRtc.NET/include/webrtc/base/cryptstring.h +++ /dev/null @@ -1,167 +0,0 @@ -/* - * Copyright 2004 The WebRTC Project Authors. All rights reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef _WEBRTC_BASE_CRYPTSTRING_H_ -#define _WEBRTC_BASE_CRYPTSTRING_H_ - -#include - -#include -#include -#include - -namespace rtc { - -class CryptStringImpl { -public: - virtual ~CryptStringImpl() {} - virtual size_t GetLength() const = 0; - virtual void CopyTo(char * dest, bool nullterminate) const = 0; - virtual std::string UrlEncode() const = 0; - virtual CryptStringImpl * Copy() const = 0; - virtual void CopyRawTo(std::vector * dest) const = 0; -}; - -class EmptyCryptStringImpl : public CryptStringImpl { -public: - ~EmptyCryptStringImpl() override {} - size_t GetLength() const override; - void CopyTo(char* dest, bool nullterminate) const override; - std::string UrlEncode() const override; - CryptStringImpl* Copy() const override; - void CopyRawTo(std::vector* dest) const override; -}; - -class CryptString { - public: - CryptString(); - size_t GetLength() const { return impl_->GetLength(); } - void CopyTo(char * dest, bool nullterminate) const { impl_->CopyTo(dest, nullterminate); } - CryptString(const CryptString& other); - explicit CryptString(const CryptStringImpl& impl); - ~CryptString(); - CryptString & operator=(const CryptString & other) { - if (this != &other) { - impl_.reset(other.impl_->Copy()); - } - return *this; - } - void Clear() { impl_.reset(new EmptyCryptStringImpl()); } - std::string UrlEncode() const { return impl_->UrlEncode(); } - void CopyRawTo(std::vector * dest) const { - return impl_->CopyRawTo(dest); - } - - private: - std::unique_ptr impl_; -}; - - -// Used for constructing strings where a password is involved and we -// need to ensure that we zero memory afterwards -class FormatCryptString { -public: - FormatCryptString() { - storage_ = new char[32]; - capacity_ = 32; - length_ = 0; - storage_[0] = 0; - } - - void Append(const std::string & text) { - Append(text.data(), text.length()); - } - - void Append(const char * data, size_t length) { - EnsureStorage(length_ + length + 1); - memcpy(storage_ + length_, data, length); - length_ += length; - storage_[length_] = '\0'; - } - - void Append(const CryptString * password) { - size_t len = password->GetLength(); - EnsureStorage(length_ + len + 1); - password->CopyTo(storage_ + length_, true); - length_ += len; - } - - size_t GetLength() { - return length_; - } - - const char * GetData() { - return storage_; - } - - - // Ensures storage of at least n bytes - void EnsureStorage(size_t n) { - if (capacity_ >= n) { - return; - } - - size_t old_capacity = capacity_; - char * old_storage = storage_; - - for (;;) { - capacity_ *= 2; - if (capacity_ >= n) - break; - } - - storage_ = new char[capacity_]; - - if (old_capacity) { - memcpy(storage_, old_storage, length_); - - // zero memory in a way that an optimizer won't optimize it out - old_storage[0] = 0; - for (size_t i = 1; i < old_capacity; i++) { - old_storage[i] = old_storage[i - 1]; - } - delete[] old_storage; - } - } - - ~FormatCryptString() { - if (capacity_) { - storage_[0] = 0; - for (size_t i = 1; i < capacity_; i++) { - storage_[i] = storage_[i - 1]; - } - } - delete[] storage_; - } -private: - char * storage_; - size_t capacity_; - size_t length_; -}; - -class InsecureCryptStringImpl : public CryptStringImpl { - public: - std::string& password() { return password_; } - const std::string& password() const { return password_; } - - ~InsecureCryptStringImpl() override = default; - size_t GetLength() const override; - void CopyTo(char* dest, bool nullterminate) const override; - std::string UrlEncode() const override; - CryptStringImpl* Copy() const override; - void CopyRawTo(std::vector* dest) const override; - - private: - std::string password_; -}; - -} - -#endif // _WEBRTC_BASE_CRYPTSTRING_H_ diff --git a/WebRtc.NET/include/webrtc/base/diskcache.h b/WebRtc.NET/include/webrtc/base/diskcache.h deleted file mode 100644 index 4ac1be15..00000000 --- a/WebRtc.NET/include/webrtc/base/diskcache.h +++ /dev/null @@ -1,125 +0,0 @@ -/* - * Copyright 2004 The WebRTC Project Authors. All rights reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_BASE_DISKCACHE_H__ -#define WEBRTC_BASE_DISKCACHE_H__ - -#include -#include - -#if defined(WEBRTC_WIN) -#undef UnlockResource -#endif // WEBRTC_WIN - -namespace rtc { - -class StreamInterface; - -/////////////////////////////////////////////////////////////////////////////// -// DiskCache - An LRU cache of streams, stored on disk. -// -// Streams are identified by a unique resource id. Multiple streams can be -// associated with each resource id, distinguished by an index. When old -// resources are flushed from the cache, all streams associated with those -// resources are removed together. -// DiskCache is designed to persist across executions of the program. It is -// safe for use from an arbitrary number of users on a single thread, but not -// from multiple threads or other processes. -/////////////////////////////////////////////////////////////////////////////// - -class DiskCache { -public: - DiskCache(); - virtual ~DiskCache(); - - bool Initialize(const std::string& folder, size_t size); - bool Purge(); - - bool LockResource(const std::string& id); - StreamInterface* WriteResource(const std::string& id, size_t index); - bool UnlockResource(const std::string& id); - - StreamInterface* ReadResource(const std::string& id, size_t index) const; - - bool HasResource(const std::string& id) const; - bool HasResourceStream(const std::string& id, size_t index) const; - bool DeleteResource(const std::string& id); - - protected: - virtual bool InitializeEntries() = 0; - virtual bool PurgeFiles() = 0; - - virtual bool FileExists(const std::string& filename) const = 0; - virtual bool DeleteFile(const std::string& filename) const = 0; - - enum LockState { LS_UNLOCKED, LS_LOCKED, LS_UNLOCKING }; - struct Entry { - LockState lock_state; - mutable size_t accessors; - size_t size; - size_t streams; - time_t last_modified; - }; - typedef std::map EntryMap; - friend class DiskCacheAdapter; - - bool CheckLimit(); - - std::string IdToFilename(const std::string& id, size_t index) const; - bool FilenameToId(const std::string& filename, std::string* id, - size_t* index) const; - - const Entry* GetEntry(const std::string& id) const { - return const_cast(this)->GetOrCreateEntry(id, false); - } - Entry* GetOrCreateEntry(const std::string& id, bool create); - - void ReleaseResource(const std::string& id, size_t index) const; - - std::string folder_; - size_t max_cache_, total_size_; - EntryMap map_; - mutable size_t total_accessors_; -}; - -/////////////////////////////////////////////////////////////////////////////// -// CacheLock - Automatically manage locking and unlocking, with optional -// rollback semantics -/////////////////////////////////////////////////////////////////////////////// - -class CacheLock { -public: - CacheLock(DiskCache* cache, const std::string& id, bool rollback = false) - : cache_(cache), id_(id), rollback_(rollback) - { - locked_ = cache_->LockResource(id_); - } - ~CacheLock() { - if (locked_) { - cache_->UnlockResource(id_); - if (rollback_) { - cache_->DeleteResource(id_); - } - } - } - bool IsLocked() const { return locked_; } - void Commit() { rollback_ = false; } - -private: - DiskCache* cache_; - std::string id_; - bool rollback_, locked_; -}; - -/////////////////////////////////////////////////////////////////////////////// - -} // namespace rtc - -#endif // WEBRTC_BASE_DISKCACHE_H__ diff --git a/WebRtc.NET/include/webrtc/base/diskcache_win32.h b/WebRtc.NET/include/webrtc/base/diskcache_win32.h deleted file mode 100644 index 42cb9b02..00000000 --- a/WebRtc.NET/include/webrtc/base/diskcache_win32.h +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Copyright 2006 The WebRTC Project Authors. All rights reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_BASE_DISKCACHEWIN32_H__ -#define WEBRTC_BASE_DISKCACHEWIN32_H__ - -#include "webrtc/base/diskcache.h" - -namespace rtc { - -class DiskCacheWin32 : public DiskCache { - protected: - virtual bool InitializeEntries(); - virtual bool PurgeFiles(); - - virtual bool FileExists(const std::string& filename) const; - virtual bool DeleteFile(const std::string& filename) const; -}; - -} - -#endif // WEBRTC_BASE_DISKCACHEWIN32_H__ diff --git a/WebRtc.NET/include/webrtc/base/dscp.h b/WebRtc.NET/include/webrtc/base/dscp.h deleted file mode 100644 index 970ff93b..00000000 --- a/WebRtc.NET/include/webrtc/base/dscp.h +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright 2013 The WebRTC Project Authors. All rights reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_BASE_DSCP_H_ -#define WEBRTC_BASE_DSCP_H_ - -namespace rtc { -// Differentiated Services Code Point. -// See http://tools.ietf.org/html/rfc2474 for details. -enum DiffServCodePoint { - DSCP_NO_CHANGE = -1, - DSCP_DEFAULT = 0, // Same as DSCP_CS0 - DSCP_CS0 = 0, // The default - DSCP_CS1 = 8, // Bulk/background traffic - DSCP_AF11 = 10, - DSCP_AF12 = 12, - DSCP_AF13 = 14, - DSCP_CS2 = 16, - DSCP_AF21 = 18, - DSCP_AF22 = 20, - DSCP_AF23 = 22, - DSCP_CS3 = 24, - DSCP_AF31 = 26, - DSCP_AF32 = 28, - DSCP_AF33 = 30, - DSCP_CS4 = 32, - DSCP_AF41 = 34, // Video - DSCP_AF42 = 36, // Video - DSCP_AF43 = 38, // Video - DSCP_CS5 = 40, // Video - DSCP_EF = 46, // Voice - DSCP_CS6 = 48, // Voice - DSCP_CS7 = 56, // Control messages -}; - -} // namespace rtc - - #endif // WEBRTC_BASE_DSCP_H_ diff --git a/WebRtc.NET/include/webrtc/base/event.h b/WebRtc.NET/include/webrtc/base/event.h deleted file mode 100644 index 7686d30a..00000000 --- a/WebRtc.NET/include/webrtc/base/event.h +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Copyright 2004 The WebRTC Project Authors. All rights reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_BASE_EVENT_H__ -#define WEBRTC_BASE_EVENT_H__ - -#if defined(WEBRTC_WIN) -#include "webrtc/base/win32.h" // NOLINT: consider this a system header. -#elif defined(WEBRTC_POSIX) -#include -#else -#error "Must define either WEBRTC_WIN or WEBRTC_POSIX." -#endif - -namespace rtc { - -class Event { - public: - static const int kForever = -1; - - Event(bool manual_reset, bool initially_signaled); - ~Event(); - - void Set(); - void Reset(); - - // Wait for the event to become signaled, for the specified number of - // |milliseconds|. To wait indefinetly, pass kForever. - bool Wait(int milliseconds); - - private: -#if defined(WEBRTC_WIN) - HANDLE event_handle_; -#elif defined(WEBRTC_POSIX) - pthread_mutex_t event_mutex_; - pthread_cond_t event_cond_; - const bool is_manual_reset_; - bool event_status_; -#endif -}; - -} // namespace rtc - -#endif // WEBRTC_BASE_EVENT_H__ diff --git a/WebRtc.NET/include/webrtc/base/event_tracer.h b/WebRtc.NET/include/webrtc/base/event_tracer.h deleted file mode 100644 index 51c8cfdc..00000000 --- a/WebRtc.NET/include/webrtc/base/event_tracer.h +++ /dev/null @@ -1,85 +0,0 @@ -/* - * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -// This file defines the interface for event tracing in WebRTC. -// -// Event log handlers are set through SetupEventTracer(). User of this API will -// provide two function pointers to handle event tracing calls. -// -// * GetCategoryEnabledPtr -// Event tracing system calls this function to determine if a particular -// event category is enabled. -// -// * AddTraceEventPtr -// Adds a tracing event. It is the user's responsibility to log the data -// provided. -// -// Parameters for the above two functions are described in trace_event.h. - -#ifndef WEBRTC_BASE_EVENT_TRACER_H_ -#define WEBRTC_BASE_EVENT_TRACER_H_ - -#include - -namespace webrtc { - -typedef const unsigned char* (*GetCategoryEnabledPtr)(const char* name); -typedef void (*AddTraceEventPtr)(char phase, - const unsigned char* category_enabled, - const char* name, - unsigned long long id, - int num_args, - const char** arg_names, - const unsigned char* arg_types, - const unsigned long long* arg_values, - unsigned char flags); - -// User of WebRTC can call this method to setup event tracing. -// -// This method must be called before any WebRTC methods. Functions -// provided should be thread-safe. -void SetupEventTracer( - GetCategoryEnabledPtr get_category_enabled_ptr, - AddTraceEventPtr add_trace_event_ptr); - -// This class defines interface for the event tracing system to call -// internally. Do not call these methods directly. -class EventTracer { - public: - static const unsigned char* GetCategoryEnabled( - const char* name); - - static void AddTraceEvent( - char phase, - const unsigned char* category_enabled, - const char* name, - unsigned long long id, - int num_args, - const char** arg_names, - const unsigned char* arg_types, - const unsigned long long* arg_values, - unsigned char flags); -}; - -} // namespace webrtc - -namespace rtc { -namespace tracing { -// Set up internal event tracer. -void SetupInternalTracer(); -bool StartInternalCapture(const char* filename); -void StartInternalCaptureToFile(FILE* file); -void StopInternalCapture(); -// Make sure we run this, this will tear down the internal tracing. -void ShutdownInternalTracer(); -} // namespace tracing -} // namespace rtc - -#endif // WEBRTC_BASE_EVENT_TRACER_H_ diff --git a/WebRtc.NET/include/webrtc/base/fakeclock.h b/WebRtc.NET/include/webrtc/base/fakeclock.h deleted file mode 100644 index eb78cf86..00000000 --- a/WebRtc.NET/include/webrtc/base/fakeclock.h +++ /dev/null @@ -1,61 +0,0 @@ -/* - * Copyright 2016 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_BASE_FAKECLOCK_H_ -#define WEBRTC_BASE_FAKECLOCK_H_ - -#include "webrtc/base/criticalsection.h" -#include "webrtc/base/timedelta.h" -#include "webrtc/base/timeutils.h" - -namespace rtc { - -// Fake clock for use with unit tests, which does not tick on its own. -// Starts at time 0. -// -// TODO(deadbeef): Unify with webrtc::SimulatedClock. -class FakeClock : public ClockInterface { - public: - ~FakeClock() override {} - - // ClockInterface implementation. - int64_t TimeNanos() const override; - - // Methods that can be used by the test to control the time. - - // Should only be used to set a time in the future. - void SetTimeNanos(int64_t nanos); - void SetTimeMicros(int64_t micros) { - SetTimeNanos(kNumNanosecsPerMicrosec * micros); - } - - void AdvanceTime(TimeDelta delta); - void AdvanceTimeMicros(int64_t micros) { - AdvanceTime(rtc::TimeDelta::FromMicroseconds(micros)); - } - private: - CriticalSection lock_; - int64_t time_ GUARDED_BY(lock_) = 0; -}; - -// Helper class that sets itself as the global clock in its constructor and -// unsets it in its destructor. -class ScopedFakeClock : public FakeClock { - public: - ScopedFakeClock(); - ~ScopedFakeClock() override; - - private: - ClockInterface* prev_clock_; -}; - -} // namespace rtc - -#endif // WEBRTC_BASE_FAKECLOCK_H_ diff --git a/WebRtc.NET/include/webrtc/base/fakesslidentity.h b/WebRtc.NET/include/webrtc/base/fakesslidentity.h deleted file mode 100644 index 3b0df298..00000000 --- a/WebRtc.NET/include/webrtc/base/fakesslidentity.h +++ /dev/null @@ -1,120 +0,0 @@ -/* - * Copyright 2012 The WebRTC Project Authors. All rights reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_BASE_FAKESSLIDENTITY_H_ -#define WEBRTC_BASE_FAKESSLIDENTITY_H_ - -#include -#include -#include - -#include "webrtc/base/common.h" -#include "webrtc/base/messagedigest.h" -#include "webrtc/base/sslidentity.h" - -namespace rtc { - -class FakeSSLCertificate : public rtc::SSLCertificate { - public: - // SHA-1 is the default digest algorithm because it is available in all build - // configurations used for unit testing. - explicit FakeSSLCertificate(const std::string& data) - : data_(data), digest_algorithm_(DIGEST_SHA_1), expiration_time_(-1) {} - explicit FakeSSLCertificate(const std::vector& certs) - : data_(certs.front()), - digest_algorithm_(DIGEST_SHA_1), - expiration_time_(-1) { - std::vector::const_iterator it; - // Skip certs[0]. - for (it = certs.begin() + 1; it != certs.end(); ++it) { - certs_.push_back(FakeSSLCertificate(*it)); - } - } - FakeSSLCertificate* GetReference() const override { - return new FakeSSLCertificate(*this); - } - std::string ToPEMString() const override { - return data_; - } - void ToDER(Buffer* der_buffer) const override { - std::string der_string; - VERIFY(SSLIdentity::PemToDer(kPemTypeCertificate, data_, &der_string)); - der_buffer->SetData(der_string.c_str(), der_string.size()); - } - int64_t CertificateExpirationTime() const override { - return expiration_time_; - } - void SetCertificateExpirationTime(int64_t expiration_time) { - expiration_time_ = expiration_time; - } - void set_digest_algorithm(const std::string& algorithm) { - digest_algorithm_ = algorithm; - } - bool GetSignatureDigestAlgorithm(std::string* algorithm) const override { - *algorithm = digest_algorithm_; - return true; - } - bool ComputeDigest(const std::string& algorithm, - unsigned char* digest, - size_t size, - size_t* length) const override { - *length = rtc::ComputeDigest(algorithm, data_.c_str(), data_.size(), - digest, size); - return (*length != 0); - } - std::unique_ptr GetChain() const override { - if (certs_.empty()) - return nullptr; - std::vector new_certs(certs_.size()); - std::transform(certs_.begin(), certs_.end(), new_certs.begin(), DupCert); - std::unique_ptr chain(new SSLCertChain(new_certs)); - std::for_each(new_certs.begin(), new_certs.end(), DeleteCert); - return chain; - } - - private: - static FakeSSLCertificate* DupCert(FakeSSLCertificate cert) { - return cert.GetReference(); - } - static void DeleteCert(SSLCertificate* cert) { delete cert; } - std::string data_; - std::vector certs_; - std::string digest_algorithm_; - // Expiration time in seconds relative to epoch, 1970-01-01T00:00:00Z (UTC). - int64_t expiration_time_; -}; - -class FakeSSLIdentity : public rtc::SSLIdentity { - public: - explicit FakeSSLIdentity(const std::string& data) : cert_(data) {} - explicit FakeSSLIdentity(const FakeSSLCertificate& cert) : cert_(cert) {} - virtual FakeSSLIdentity* GetReference() const { - return new FakeSSLIdentity(*this); - } - virtual const FakeSSLCertificate& certificate() const { return cert_; } - virtual std::string PrivateKeyToPEMString() const { - RTC_NOTREACHED(); // Not implemented. - return ""; - } - virtual std::string PublicKeyToPEMString() const { - RTC_NOTREACHED(); // Not implemented. - return ""; - } - virtual bool operator==(const SSLIdentity& other) const { - RTC_NOTREACHED(); // Not implemented. - return false; - } - private: - FakeSSLCertificate cert_; -}; - -} // namespace rtc - -#endif // WEBRTC_BASE_FAKESSLIDENTITY_H_ diff --git a/WebRtc.NET/include/webrtc/base/file.h b/WebRtc.NET/include/webrtc/base/file.h deleted file mode 100644 index f4806d1a..00000000 --- a/WebRtc.NET/include/webrtc/base/file.h +++ /dev/null @@ -1,82 +0,0 @@ -/* - * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_BASE_FILE_H_ -#define WEBRTC_BASE_FILE_H_ - -#include - -#include - -#include "webrtc/base/constructormagic.h" -#include "webrtc/base/pathutils.h" -#include "webrtc/base/platform_file.h" - -namespace rtc { - -// This class wraps the platform specific APIs for simple file interactions. -// -// The various read and write methods are best effort, i.e. if an underlying -// call does not manage to read/write all the data more calls will be performed, -// until an error is detected or all data is read/written. -class File { - public: - // Wraps the given PlatformFile. This class is then responsible for closing - // the file, which will be done in the destructor if Close is never called. - explicit File(PlatformFile); - // The default constructor produces a closed file. - File(); - ~File(); - - File(File&& other); - File& operator=(File&& other); - - // Open and Create give files with both reading and writing enabled. - static File Open(const std::string& path); - static File Open(Pathname&& path); - static File Open(const Pathname& path); - // If the file already exists it will be overwritten. - static File Create(const std::string& path); - static File Create(Pathname&& path); - static File Create(const Pathname& path); - - // Remove a file in the file system. - static bool Remove(const std::string& path); - static bool Remove(Pathname&& path); - static bool Remove(const Pathname& path); - - size_t Write(const uint8_t* data, size_t length); - size_t Read(uint8_t* buffer, size_t length); - - // The current position in the file after a call to these methods is platform - // dependent (MSVC gives position offset+length, most other - // compilers/platforms do not alter the position), i.e. do not depend on it, - // do a Seek before any subsequent Read/Write. - size_t WriteAt(const uint8_t* data, size_t length, size_t offset); - size_t ReadAt(uint8_t* buffer, size_t length, size_t offset); - - // Attempt to position the file at the given offset from the start. - // Returns true if successful, false otherwise. - bool Seek(size_t offset); - - // Attempt to close the file. Returns true if successful, false otherwise, - // most notably when the file is already closed. - bool Close(); - - bool IsOpen(); - - private: - PlatformFile file_; - RTC_DISALLOW_COPY_AND_ASSIGN(File); -}; - -} // namespace rtc - -#endif // WEBRTC_BASE_FILE_H_ diff --git a/WebRtc.NET/include/webrtc/base/fileutils.h b/WebRtc.NET/include/webrtc/base/fileutils.h deleted file mode 100644 index 0c19ffc7..00000000 --- a/WebRtc.NET/include/webrtc/base/fileutils.h +++ /dev/null @@ -1,329 +0,0 @@ -/* - * Copyright 2004 The WebRTC Project Authors. All rights reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_BASE_FILEUTILS_H_ -#define WEBRTC_BASE_FILEUTILS_H_ - -#include - -#if !defined(WEBRTC_WIN) -#include -#include -#include -#include -#include -#endif - -#include "webrtc/base/checks.h" -#include "webrtc/base/constructormagic.h" -#include "webrtc/base/platform_file.h" - -namespace rtc { - -class FileStream; -class Pathname; - -////////////////////////// -// Directory Iterator // -////////////////////////// - -// A DirectoryIterator is created with a given directory. It originally points -// to the first file in the directory, and can be advanecd with Next(). This -// allows you to get information about each file. - -class DirectoryIterator { - friend class Filesystem; - public: - // Constructor - DirectoryIterator(); - // Destructor - virtual ~DirectoryIterator(); - - // Starts traversing a directory - // dir is the directory to traverse - // returns true if the directory exists and is valid - // The iterator will point to the first entry in the directory - virtual bool Iterate(const Pathname &path); - - // Advances to the next file - // returns true if there were more files in the directory. - virtual bool Next(); - - // returns true if the file currently pointed to is a directory - virtual bool IsDirectory() const; - - // returns the name of the file currently pointed to - virtual std::string Name() const; - - private: - std::string directory_; -#if defined(WEBRTC_WIN) - WIN32_FIND_DATA data_; - HANDLE handle_; -#else - DIR *dir_; - struct dirent *dirent_; - struct stat stat_; -#endif -}; - -enum FileTimeType { FTT_CREATED, FTT_MODIFIED, FTT_ACCESSED }; - -class FilesystemInterface { - public: - virtual ~FilesystemInterface() {} - - // Returns a DirectoryIterator for a given pathname. - // TODO: Do fancy abstracted stuff - virtual DirectoryIterator* IterateDirectory(); - - // Opens a file. Returns an open StreamInterface if function succeeds. - // Otherwise, returns NULL. - // TODO: Add an error param to indicate failure reason, similar to - // FileStream::Open - virtual FileStream *OpenFile(const Pathname &filename, - const std::string &mode) = 0; - - // This will attempt to delete the path located at filename. - // It ASSERTS and returns false if the path points to a folder or a - // non-existent file. - virtual bool DeleteFile(const Pathname &filename) = 0; - - // This will attempt to delete the empty folder located at 'folder' - // It ASSERTS and returns false if the path points to a file or a non-existent - // folder. It fails normally if the folder is not empty or can otherwise - // not be deleted. - virtual bool DeleteEmptyFolder(const Pathname &folder) = 0; - - // This will call IterateDirectory, to get a directory iterator, and then - // call DeleteFolderAndContents and DeleteFile on every path contained in this - // folder. If the folder is empty, this returns true. - virtual bool DeleteFolderContents(const Pathname &folder); - - // This deletes the contents of a folder, recursively, and then deletes - // the folder itself. - virtual bool DeleteFolderAndContents(const Pathname& folder); - - // Creates a directory. This will call itself recursively to create /foo/bar - // even if /foo does not exist. Returns true if the function succeeds. - virtual bool CreateFolder(const Pathname &pathname) = 0; - - // This moves a file from old_path to new_path, where "old_path" is a - // plain file. This ASSERTs and returns false if old_path points to a - // directory, and returns true if the function succeeds. - // If the new path is on a different volume than the old path, this function - // will attempt to copy and, if that succeeds, delete the old path. - virtual bool MoveFile(const Pathname &old_path, const Pathname &new_path) = 0; - - // This copies a file from old_path to new_path. This method ASSERTs and - // returns false if old_path is a folder, and returns true if the copy - // succeeds. - virtual bool CopyFile(const Pathname &old_path, const Pathname &new_path) = 0; - - // Returns true if pathname refers to a directory - virtual bool IsFolder(const Pathname& pathname) = 0; - - // Returns true if pathname refers to a file - virtual bool IsFile(const Pathname& pathname) = 0; - - // Returns true if pathname refers to no filesystem object, every parent - // directory either exists, or is also absent. - virtual bool IsAbsent(const Pathname& pathname) = 0; - - // Returns true if pathname represents a temporary location on the system. - virtual bool IsTemporaryPath(const Pathname& pathname) = 0; - - // A folder appropriate for storing temporary files (Contents are - // automatically deleted when the program exits) - virtual bool GetTemporaryFolder(Pathname &path, bool create, - const std::string *append) = 0; - - virtual std::string TempFilename(const Pathname &dir, - const std::string &prefix) = 0; - - // Determines the size of the file indicated by path. - virtual bool GetFileSize(const Pathname& path, size_t* size) = 0; - - // Determines a timestamp associated with the file indicated by path. - virtual bool GetFileTime(const Pathname& path, FileTimeType which, - time_t* time) = 0; - - // Get a folder that is unique to the current application, which is suitable - // for sharing data between executions of the app. If the per_user arg is - // true, the folder is also specific to the current user. - virtual bool GetAppDataFolder(Pathname* path, bool per_user) = 0; - - // Get a temporary folder that is unique to the current user and application. - // TODO: Re-evaluate the goals of this function. We probably just need any - // directory that won't collide with another existing directory, and which - // will be cleaned up when the program exits. - virtual bool GetAppTempFolder(Pathname* path) = 0; - - virtual bool GetDiskFreeSpace(const Pathname& path, int64_t* freebytes) = 0; - - // Note: These might go into some shared config section later, but they're - // used by some methods in this interface, so we're leaving them here for now. - void SetOrganizationName(const std::string& organization) { - organization_name_ = organization; - } - void GetOrganizationName(std::string* organization) { - RTC_DCHECK(organization); - *organization = organization_name_; - } - void SetApplicationName(const std::string& application) { - application_name_ = application; - } - void GetApplicationName(std::string* application) { - RTC_DCHECK(application); - *application = application_name_; - } - - protected: - std::string organization_name_; - std::string application_name_; -}; - -class Filesystem { - public: - static FilesystemInterface *default_filesystem() { - RTC_DCHECK(default_filesystem_); - return default_filesystem_; - } - - static void set_default_filesystem(FilesystemInterface *filesystem) { - default_filesystem_ = filesystem; - } - - static FilesystemInterface *swap_default_filesystem( - FilesystemInterface *filesystem) { - FilesystemInterface *cur = default_filesystem_; - default_filesystem_ = filesystem; - return cur; - } - - static DirectoryIterator *IterateDirectory() { - return EnsureDefaultFilesystem()->IterateDirectory(); - } - - static bool CreateFolder(const Pathname &pathname) { - return EnsureDefaultFilesystem()->CreateFolder(pathname); - } - - static FileStream *OpenFile(const Pathname &filename, - const std::string &mode) { - return EnsureDefaultFilesystem()->OpenFile(filename, mode); - } - - static bool DeleteFile(const Pathname &filename) { - return EnsureDefaultFilesystem()->DeleteFile(filename); - } - - static bool DeleteFolderContents(const Pathname &folder) { - return EnsureDefaultFilesystem()->DeleteFolderContents(folder); - } - - static bool DeleteFolderAndContents(const Pathname &folder) { - return EnsureDefaultFilesystem()->DeleteFolderAndContents(folder); - } - - static bool MoveFile(const Pathname &old_path, const Pathname &new_path) { - return EnsureDefaultFilesystem()->MoveFile(old_path, new_path); - } - - static bool CopyFile(const Pathname &old_path, const Pathname &new_path) { - return EnsureDefaultFilesystem()->CopyFile(old_path, new_path); - } - - static bool IsFolder(const Pathname& pathname) { - return EnsureDefaultFilesystem()->IsFolder(pathname); - } - - static bool IsFile(const Pathname &pathname) { - return EnsureDefaultFilesystem()->IsFile(pathname); - } - - static bool IsAbsent(const Pathname &pathname) { - return EnsureDefaultFilesystem()->IsAbsent(pathname); - } - - static bool IsTemporaryPath(const Pathname& pathname) { - return EnsureDefaultFilesystem()->IsTemporaryPath(pathname); - } - - static bool GetTemporaryFolder(Pathname &path, bool create, - const std::string *append) { - return EnsureDefaultFilesystem()->GetTemporaryFolder(path, create, append); - } - - static std::string TempFilename(const Pathname &dir, - const std::string &prefix) { - return EnsureDefaultFilesystem()->TempFilename(dir, prefix); - } - - static bool GetFileSize(const Pathname& path, size_t* size) { - return EnsureDefaultFilesystem()->GetFileSize(path, size); - } - - static bool GetFileTime(const Pathname& path, FileTimeType which, - time_t* time) { - return EnsureDefaultFilesystem()->GetFileTime(path, which, time); - } - - static bool GetAppDataFolder(Pathname* path, bool per_user) { - return EnsureDefaultFilesystem()->GetAppDataFolder(path, per_user); - } - - static bool GetAppTempFolder(Pathname* path) { - return EnsureDefaultFilesystem()->GetAppTempFolder(path); - } - - static bool GetDiskFreeSpace(const Pathname& path, int64_t* freebytes) { - return EnsureDefaultFilesystem()->GetDiskFreeSpace(path, freebytes); - } - - static void SetOrganizationName(const std::string& organization) { - EnsureDefaultFilesystem()->SetOrganizationName(organization); - } - - static void GetOrganizationName(std::string* organization) { - EnsureDefaultFilesystem()->GetOrganizationName(organization); - } - - static void SetApplicationName(const std::string& application) { - EnsureDefaultFilesystem()->SetApplicationName(application); - } - - static void GetApplicationName(std::string* application) { - EnsureDefaultFilesystem()->GetApplicationName(application); - } - - private: - static FilesystemInterface* default_filesystem_; - - static FilesystemInterface *EnsureDefaultFilesystem(); - RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(Filesystem); -}; - -class FilesystemScope{ - public: - explicit FilesystemScope(FilesystemInterface *new_fs) { - old_fs_ = Filesystem::swap_default_filesystem(new_fs); - } - ~FilesystemScope() { - Filesystem::set_default_filesystem(old_fs_); - } - private: - FilesystemInterface* old_fs_; - RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(FilesystemScope); -}; - -} // namespace rtc - -#endif // WEBRTC_BASE_FILEUTILS_H_ diff --git a/WebRtc.NET/include/webrtc/base/fileutils_mock.h b/WebRtc.NET/include/webrtc/base/fileutils_mock.h deleted file mode 100644 index 7ce41fa0..00000000 --- a/WebRtc.NET/include/webrtc/base/fileutils_mock.h +++ /dev/null @@ -1,238 +0,0 @@ -/* - * Copyright 2004 The WebRTC Project Authors. All rights reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_BASE_FILEUTILS_MOCK_H_ -#define WEBRTC_BASE_FILEUTILS_MOCK_H_ - -#include -#include -#include - -#include "webrtc/base/fileutils.h" -#include "webrtc/base/gunit.h" -#include "webrtc/base/pathutils.h" -#include "webrtc/base/stream.h" - -namespace rtc { - -class FakeFileStream : public FileStream { - public: - explicit FakeFileStream(const std::string & contents) : - string_stream_(contents) - {} - - virtual StreamResult Read(void* buffer, size_t buffer_len, - size_t* read, int* error) { - return string_stream_.Read(buffer, buffer_len, read, error); - } - - virtual void Close() { - return string_stream_.Close(); - } - virtual bool GetSize(size_t* size) const { - return string_stream_.GetSize(size); - } - - private: - StringStream string_stream_; -}; - -class FakeDirectoryIterator : public DirectoryIterator { - public: - typedef std::pair File; - - /* - * files should be sorted by directory - * put '/' at the end of file if you want it to be a directory - * - * Sample list: - * /var/dir/file1 - * /var/dir/file2 - * /var/dir/subdir1/ - * /var/dir/subdir2/ - * /var/dir2/file2 - * /var/dir3/ - * - * you can call Iterate for any path: /var, /var/dir, /var/dir2 - * unrelated files will be ignored - */ - explicit FakeDirectoryIterator(const std::vector& all_files) : - all_files_(all_files) {} - - virtual bool Iterate(const Pathname& path) { - path_iterator_ = all_files_.begin(); - path_ = path.pathname(); - - // make sure path ends end with '/' - if (path_.rfind(Pathname::DefaultFolderDelimiter()) != path_.size() - 1) - path_ += Pathname::DefaultFolderDelimiter(); - - return FakeDirectoryIterator::Search(std::string("")); - } - - virtual bool Next() { - std::string current_name = Name(); - path_iterator_++; - return FakeDirectoryIterator::Search(current_name); - } - - bool Search(const std::string& current_name) { - for (; path_iterator_ != all_files_.end(); path_iterator_++) { - if (path_iterator_->first.find(path_) == 0 - && Name().compare(current_name) != 0) { - return true; - } - } - - return false; - } - - virtual bool IsDirectory() const { - std::string sub_path = path_iterator_->first; - - return std::string::npos != - sub_path.find(Pathname::DefaultFolderDelimiter(), path_.size()); - } - - virtual std::string Name() const { - std::string sub_path = path_iterator_->first; - - // path - top level path (ex. /var/lib) - // sub_path - subpath under top level path (ex. /var/lib/dir/dir/file ) - // find shortest non-trivial common path. (ex. /var/lib/dir) - size_t start = path_.size(); - size_t end = sub_path.find(Pathname::DefaultFolderDelimiter(), start); - - if (end != std::string::npos) { - return sub_path.substr(start, end - start); - } else { - return sub_path.substr(start); - } - } - - private: - const std::vector all_files_; - - std::string path_; - std::vector::const_iterator path_iterator_; -}; - -class FakeFileSystem : public FilesystemInterface { - public: - typedef std::pair File; - - explicit FakeFileSystem(const std::vector& all_files) : - all_files_(all_files) {} - - virtual DirectoryIterator *IterateDirectory() { - return new FakeDirectoryIterator(all_files_); - } - - virtual FileStream * OpenFile( - const Pathname &filename, - const std::string &mode) { - std::vector::const_iterator i_files = all_files_.begin(); - std::string path = filename.pathname(); - - for (; i_files != all_files_.end(); i_files++) { - if (i_files->first.compare(path) == 0) { - return new FakeFileStream(i_files->second); - } - } - - return NULL; - } - - bool DeleteFile(const Pathname &filename) { - EXPECT_TRUE(false) << "Unsupported operation"; - return false; - } - bool DeleteEmptyFolder(const Pathname &folder) { - EXPECT_TRUE(false) << "Unsupported operation"; - return false; - } - bool DeleteFolderContents(const Pathname &folder) { - EXPECT_TRUE(false) << "Unsupported operation"; - return false; - } - bool DeleteFolderAndContents(const Pathname &folder) { - EXPECT_TRUE(false) << "Unsupported operation"; - return false; - } - bool CreateFolder(const Pathname &pathname) { - EXPECT_TRUE(false) << "Unsupported operation"; - return false; - } - bool MoveFile(const Pathname &old_path, const Pathname &new_path) { - EXPECT_TRUE(false) << "Unsupported operation"; - return false; - } - bool CopyFile(const Pathname &old_path, const Pathname &new_path) { - EXPECT_TRUE(false) << "Unsupported operation"; - return false; - } - bool IsFolder(const Pathname &pathname) { - EXPECT_TRUE(false) << "Unsupported operation"; - return false; - } - bool IsFile(const Pathname &pathname) { - EXPECT_TRUE(false) << "Unsupported operation"; - return false; - } - bool IsAbsent(const Pathname &pathname) { - EXPECT_TRUE(false) << "Unsupported operation"; - return false; - } - bool IsTemporaryPath(const Pathname &pathname) { - EXPECT_TRUE(false) << "Unsupported operation"; - return false; - } - bool GetTemporaryFolder(Pathname &path, bool create, - const std::string *append) { - EXPECT_TRUE(false) << "Unsupported operation"; - return false; - } - std::string TempFilename(const Pathname &dir, const std::string &prefix) { - EXPECT_TRUE(false) << "Unsupported operation"; - return std::string(); - } - bool GetFileSize(const Pathname &path, size_t *size) { - EXPECT_TRUE(false) << "Unsupported operation"; - return false; - } - bool GetFileTime(const Pathname &path, FileTimeType which, - time_t* time) { - EXPECT_TRUE(false) << "Unsupported operation"; - return false; - } - bool GetAppDataFolder(Pathname *path, bool per_user) { - EXPECT_TRUE(per_user) << "Unsupported operation"; -#if defined(WEBRTC_WIN) - path->SetPathname("c:\\Users\\test_user", ""); -#else - path->SetPathname("/home/user/test_user", ""); -#endif - return true; - } - bool GetAppTempFolder(Pathname *path) { - EXPECT_TRUE(false) << "Unsupported operation"; - return false; - } - bool GetDiskFreeSpace(const Pathname& path, int64_t* freebytes) { - EXPECT_TRUE(false) << "Unsupported operation"; - return false; - } - - private: - const std::vector all_files_; -}; -} // namespace rtc - -#endif // WEBRTC_BASE_FILEUTILS_MOCK_H_ diff --git a/WebRtc.NET/include/webrtc/base/firewallsocketserver.h b/WebRtc.NET/include/webrtc/base/firewallsocketserver.h deleted file mode 100644 index 26fc75ec..00000000 --- a/WebRtc.NET/include/webrtc/base/firewallsocketserver.h +++ /dev/null @@ -1,114 +0,0 @@ -/* - * Copyright 2004 The WebRTC Project Authors. All rights reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_BASE_FIREWALLSOCKETSERVER_H_ -#define WEBRTC_BASE_FIREWALLSOCKETSERVER_H_ - -#include -#include "webrtc/base/socketserver.h" -#include "webrtc/base/criticalsection.h" - -namespace rtc { - -class FirewallManager; - -// This SocketServer shim simulates a rule-based firewall server. - -enum FirewallProtocol { FP_UDP, FP_TCP, FP_ANY }; -enum FirewallDirection { FD_IN, FD_OUT, FD_ANY }; - -class FirewallSocketServer : public SocketServer { - public: - FirewallSocketServer(SocketServer * server, - FirewallManager * manager = NULL, - bool should_delete_server = false); - ~FirewallSocketServer() override; - - SocketServer* socketserver() const { return server_; } - void set_socketserver(SocketServer* server) { - if (server_ && should_delete_server_) { - delete server_; - server_ = NULL; - should_delete_server_ = false; - } - server_ = server; - } - - // Settings to control whether CreateSocket or Socket::Listen succeed. - void set_udp_sockets_enabled(bool enabled) { udp_sockets_enabled_ = enabled; } - void set_tcp_sockets_enabled(bool enabled) { tcp_sockets_enabled_ = enabled; } - bool tcp_listen_enabled() const { return tcp_listen_enabled_; } - void set_tcp_listen_enabled(bool enabled) { tcp_listen_enabled_ = enabled; } - - // Rules govern the behavior of Connect/Accept/Send/Recv attempts. - void AddRule(bool allow, FirewallProtocol p = FP_ANY, - FirewallDirection d = FD_ANY, - const SocketAddress& addr = SocketAddress()); - void AddRule(bool allow, FirewallProtocol p, - const SocketAddress& src, const SocketAddress& dst); - void ClearRules(); - - bool Check(FirewallProtocol p, - const SocketAddress& src, const SocketAddress& dst); - - Socket* CreateSocket(int type) override; - Socket* CreateSocket(int family, int type) override; - - AsyncSocket* CreateAsyncSocket(int type) override; - AsyncSocket* CreateAsyncSocket(int family, int type) override; - - void SetMessageQueue(MessageQueue* queue) override; - bool Wait(int cms, bool process_io) override; - void WakeUp() override; - - Socket * WrapSocket(Socket * sock, int type); - AsyncSocket * WrapSocket(AsyncSocket * sock, int type); - - private: - SocketServer * server_; - FirewallManager * manager_; - CriticalSection crit_; - struct Rule { - bool allow; - FirewallProtocol p; - FirewallDirection d; - SocketAddress src; - SocketAddress dst; - }; - std::vector rules_; - bool should_delete_server_; - bool udp_sockets_enabled_; - bool tcp_sockets_enabled_; - bool tcp_listen_enabled_; -}; - -// FirewallManager allows you to manage firewalls in multiple threads together - -class FirewallManager { - public: - FirewallManager(); - ~FirewallManager(); - - void AddServer(FirewallSocketServer * server); - void RemoveServer(FirewallSocketServer * server); - - void AddRule(bool allow, FirewallProtocol p = FP_ANY, - FirewallDirection d = FD_ANY, - const SocketAddress& addr = SocketAddress()); - void ClearRules(); - - private: - CriticalSection crit_; - std::vector servers_; -}; - -} // namespace rtc - -#endif // WEBRTC_BASE_FIREWALLSOCKETSERVER_H_ diff --git a/WebRtc.NET/include/webrtc/base/format_macros.h b/WebRtc.NET/include/webrtc/base/format_macros.h deleted file mode 100644 index 90f86a68..00000000 --- a/WebRtc.NET/include/webrtc/base/format_macros.h +++ /dev/null @@ -1,96 +0,0 @@ -/* - * Copyright (c) 2014 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_BASE_FORMAT_MACROS_H_ -#define WEBRTC_BASE_FORMAT_MACROS_H_ - -// This file defines the format macros for some integer types and is derived -// from Chromium's base/format_macros.h. - -// To print a 64-bit value in a portable way: -// int64_t value; -// printf("xyz:%" PRId64, value); -// The "d" in the macro corresponds to %d; you can also use PRIu64 etc. -// -// To print a size_t value in a portable way: -// size_t size; -// printf("xyz: %" PRIuS, size); -// The "u" in the macro corresponds to %u, and S is for "size". - -#include "webrtc/typedefs.h" - -#if defined(WEBRTC_POSIX) - -#if (defined(_INTTYPES_H) || defined(_INTTYPES_H_)) && !defined(PRId64) -#error "inttypes.h has already been included before this header file, but " -#error "without __STDC_FORMAT_MACROS defined." -#endif - -#if !defined(__STDC_FORMAT_MACROS) -#define __STDC_FORMAT_MACROS -#endif - -#include - -#if !defined(PRIuS) -#define PRIuS "zu" -#endif - -// The size of NSInteger and NSUInteger varies between 32-bit and 64-bit -// architectures and Apple does not provides standard format macros and -// recommends casting. This has many drawbacks, so instead define macros -// for formatting those types. -#if defined(WEBRTC_MAC) -#if defined(WEBRTC_ARCH_64_BITS) -#if !defined(PRIdNS) -#define PRIdNS "ld" -#endif -#if !defined(PRIuNS) -#define PRIuNS "lu" -#endif -#if !defined(PRIxNS) -#define PRIxNS "lx" -#endif -#else // defined(WEBRTC_ARCH_64_BITS) -#if !defined(PRIdNS) -#define PRIdNS "d" -#endif -#if !defined(PRIuNS) -#define PRIuNS "u" -#endif -#if !defined(PRIxNS) -#define PRIxNS "x" -#endif -#endif -#endif // defined(WEBRTC_MAC) - -#else // WEBRTC_WIN - -#include - -#if !defined(PRId64) -#define PRId64 "I64d" -#endif - -#if !defined(PRIu64) -#define PRIu64 "I64u" -#endif - -#if !defined(PRIx64) -#define PRIx64 "I64x" -#endif - -#if !defined(PRIuS) -#define PRIuS "Iu" -#endif - -#endif - -#endif // WEBRTC_BASE_FORMAT_MACROS_H_ diff --git a/WebRtc.NET/include/webrtc/base/gtest_prod_util.h b/WebRtc.NET/include/webrtc/base/gtest_prod_util.h deleted file mode 100644 index f0cb1145..00000000 --- a/WebRtc.NET/include/webrtc/base/gtest_prod_util.h +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_BASE_GTEST_PROD_UTIL_H_ -#define WEBRTC_BASE_GTEST_PROD_UTIL_H_ - -// Define our own version of FRIEND_TEST here rather than including -// gtest_prod.h to avoid depending on any part of GTest in production code. -#define FRIEND_TEST_WEBRTC(test_case_name, test_name)\ -friend class test_case_name##_##test_name##_Test - -// This file is a plain copy of Chromium's base/gtest_prod_util.h. -// -// This is a wrapper for gtest's FRIEND_TEST macro that friends -// test with all possible prefixes. This is very helpful when changing the test -// prefix, because the friend declarations don't need to be updated. -// -// Example usage: -// -// class MyClass { -// private: -// void MyMethod(); -// FRIEND_TEST_ALL_PREFIXES(MyClassTest, MyMethod); -// }; -#define FRIEND_TEST_ALL_PREFIXES(test_case_name, test_name) \ - FRIEND_TEST_WEBRTC(test_case_name, test_name); \ - FRIEND_TEST_WEBRTC(test_case_name, DISABLED_##test_name); \ - FRIEND_TEST_WEBRTC(test_case_name, FLAKY_##test_name); \ - FRIEND_TEST_WEBRTC(test_case_name, FAILS_##test_name) - -#endif // WEBRTC_BASE_GTEST_PROD_UTIL_H_ diff --git a/WebRtc.NET/include/webrtc/base/gunit.h b/WebRtc.NET/include/webrtc/base/gunit.h deleted file mode 100644 index d49872db..00000000 --- a/WebRtc.NET/include/webrtc/base/gunit.h +++ /dev/null @@ -1,149 +0,0 @@ -/* - * Copyright 2004 The WebRTC Project Authors. All rights reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_BASE_GUNIT_H_ -#define WEBRTC_BASE_GUNIT_H_ - -#include "webrtc/base/fakeclock.h" -#include "webrtc/base/logging.h" -#include "webrtc/base/thread.h" -#if defined(GTEST_RELATIVE_PATH) -#include "webrtc/test/gtest.h" -#else -#include "testing/base/public/gunit.h" -#endif - -// Wait until "ex" is true, or "timeout" expires. -#define WAIT(ex, timeout) \ - for (int64_t start = rtc::SystemTimeMillis(); \ - !(ex) && rtc::SystemTimeMillis() < start + (timeout);) { \ - rtc::Thread::Current()->ProcessMessages(0); \ - rtc::Thread::Current()->SleepMs(1); \ - } - -// This returns the result of the test in res, so that we don't re-evaluate -// the expression in the XXXX_WAIT macros below, since that causes problems -// when the expression is only true the first time you check it. -#define WAIT_(ex, timeout, res) \ - do { \ - int64_t start = rtc::SystemTimeMillis(); \ - res = (ex); \ - while (!res && rtc::SystemTimeMillis() < start + (timeout)) { \ - rtc::Thread::Current()->ProcessMessages(0); \ - rtc::Thread::Current()->SleepMs(1); \ - res = (ex); \ - } \ - } while (0) - -// The typical EXPECT_XXXX and ASSERT_XXXXs, but done until true or a timeout. -#define EXPECT_TRUE_WAIT(ex, timeout) \ - do { \ - bool res; \ - WAIT_(ex, timeout, res); \ - if (!res) EXPECT_TRUE(ex); \ - } while (0) - -#define EXPECT_EQ_WAIT(v1, v2, timeout) \ - do { \ - bool res; \ - WAIT_(v1 == v2, timeout, res); \ - if (!res) EXPECT_EQ(v1, v2); \ - } while (0) - -#define ASSERT_TRUE_WAIT(ex, timeout) \ - do { \ - bool res; \ - WAIT_(ex, timeout, res); \ - if (!res) ASSERT_TRUE(ex); \ - } while (0) - -#define ASSERT_EQ_WAIT(v1, v2, timeout) \ - do { \ - bool res; \ - WAIT_(v1 == v2, timeout, res); \ - if (!res) ASSERT_EQ(v1, v2); \ - } while (0) - -// Version with a "soft" timeout and a margin. This logs if the timeout is -// exceeded, but it only fails if the expression still isn't true after the -// margin time passes. -#define EXPECT_TRUE_WAIT_MARGIN(ex, timeout, margin) \ - do { \ - bool res; \ - WAIT_(ex, timeout, res); \ - if (res) { \ - break; \ - } \ - LOG(LS_WARNING) << "Expression " << #ex << " still not true after " \ - << (timeout) << "ms; waiting an additional " << margin \ - << "ms"; \ - WAIT_(ex, margin, res); \ - if (!res) { \ - EXPECT_TRUE(ex); \ - } \ - } while (0) - -// Wait until "ex" is true, or "timeout" expires, using fake clock where -// messages are processed every millisecond. -#define SIMULATED_WAIT(ex, timeout, clock) \ - for (int64_t start = rtc::TimeMillis(); \ - !(ex) && rtc::TimeMillis() < start + (timeout);) { \ - (clock).AdvanceTime(rtc::TimeDelta::FromMilliseconds(1)); \ - } - -// This returns the result of the test in res, so that we don't re-evaluate -// the expression in the XXXX_WAIT macros below, since that causes problems -// when the expression is only true the first time you check it. -#define SIMULATED_WAIT_(ex, timeout, res, clock) \ - do { \ - int64_t start = rtc::TimeMillis(); \ - res = (ex); \ - while (!res && rtc::TimeMillis() < start + (timeout)) { \ - (clock).AdvanceTime(rtc::TimeDelta::FromMilliseconds(1)); \ - res = (ex); \ - } \ - } while (0) - -// The typical EXPECT_XXXX, but done until true or a timeout with a fake clock. -#define EXPECT_TRUE_SIMULATED_WAIT(ex, timeout, clock) \ - do { \ - bool res; \ - SIMULATED_WAIT_(ex, timeout, res, clock); \ - if (!res) { \ - EXPECT_TRUE(ex); \ - } \ - } while (0) - -#define EXPECT_EQ_SIMULATED_WAIT(v1, v2, timeout, clock) \ - do { \ - bool res; \ - SIMULATED_WAIT_(v1 == v2, timeout, res, clock); \ - if (!res) { \ - EXPECT_EQ(v1, v2); \ - } \ - } while (0) - -#define ASSERT_TRUE_SIMULATED_WAIT(ex, timeout, clock) \ - do { \ - bool res; \ - SIMULATED_WAIT_(ex, timeout, res, clock); \ - if (!res) \ - ASSERT_TRUE(ex); \ - } while (0) - -#define ASSERT_EQ_SIMULATED_WAIT(v1, v2, timeout, clock) \ - do { \ - bool res; \ - SIMULATED_WAIT_(v1 == v2, timeout, res, clock); \ - if (!res) \ - ASSERT_EQ(v1, v2); \ - } while (0) - -#endif // WEBRTC_BASE_GUNIT_H_ diff --git a/WebRtc.NET/include/webrtc/base/helpers.h b/WebRtc.NET/include/webrtc/base/helpers.h deleted file mode 100644 index fcf77afd..00000000 --- a/WebRtc.NET/include/webrtc/base/helpers.h +++ /dev/null @@ -1,64 +0,0 @@ -/* - * Copyright 2004 The WebRTC Project Authors. All rights reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_BASE_HELPERS_H_ -#define WEBRTC_BASE_HELPERS_H_ - -#include -#include "webrtc/base/basictypes.h" - -namespace rtc { - -// For testing, we can return predictable data. -void SetRandomTestMode(bool test); - -// Initializes the RNG, and seeds it with the specified entropy. -bool InitRandom(int seed); -bool InitRandom(const char* seed, size_t len); - -// Generates a (cryptographically) random string of the given length. -// We generate base64 values so that they will be printable. -std::string CreateRandomString(size_t length); - -// Generates a (cryptographically) random string of the given length. -// We generate base64 values so that they will be printable. -// Return false if the random number generator failed. -bool CreateRandomString(size_t length, std::string* str); - -// Generates a (cryptographically) random string of the given length, -// with characters from the given table. Return false if the random -// number generator failed. -// For ease of implementation, the function requires that the table -// size evenly divide 256; otherwise, it returns false. -bool CreateRandomString(size_t length, const std::string& table, - std::string* str); - -// Generates (cryptographically) random data of the given length. -// Return false if the random number generator failed. -bool CreateRandomData(size_t length, std::string* data); - -// Generates a (cryptographically) random UUID version 4 string. -std::string CreateRandomUuid(); - -// Generates a random id. -uint32_t CreateRandomId(); - -// Generates a 64 bit random id. -uint64_t CreateRandomId64(); - -// Generates a random id > 0. -uint32_t CreateRandomNonZeroId(); - -// Generates a random double between 0.0 (inclusive) and 1.0 (exclusive). -double CreateRandomDouble(); - -} // namespace rtc - -#endif // WEBRTC_BASE_HELPERS_H_ diff --git a/WebRtc.NET/include/webrtc/base/httpclient.h b/WebRtc.NET/include/webrtc/base/httpclient.h deleted file mode 100644 index 342d48f8..00000000 --- a/WebRtc.NET/include/webrtc/base/httpclient.h +++ /dev/null @@ -1,200 +0,0 @@ -/* - * Copyright 2004 The WebRTC Project Authors. All rights reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_BASE_HTTPCLIENT_H__ -#define WEBRTC_BASE_HTTPCLIENT_H__ - -#include - -#include "webrtc/base/checks.h" -#include "webrtc/base/common.h" -#include "webrtc/base/httpbase.h" -#include "webrtc/base/nethelpers.h" -#include "webrtc/base/proxyinfo.h" -#include "webrtc/base/sigslot.h" -#include "webrtc/base/socketaddress.h" -#include "webrtc/base/socketpool.h" - -namespace rtc { - -////////////////////////////////////////////////////////////////////// -// Client-specific http utilities -////////////////////////////////////////////////////////////////////// - -// Write cache-relevant response headers to output stream. If size is non-null, -// it contains the length of the output in bytes. output may be null if only -// the length is desired. -bool HttpWriteCacheHeaders(const HttpResponseData* response, - StreamInterface* output, size_t* size); -// Read cached headers from a stream, and them merge them into the response -// object using the specified combine operation. -bool HttpReadCacheHeaders(StreamInterface* input, - HttpResponseData* response, - HttpData::HeaderCombine combine); - -////////////////////////////////////////////////////////////////////// -// HttpClient -// Implements an HTTP 1.1 client. -////////////////////////////////////////////////////////////////////// - -class DiskCache; -class HttpClient; -class IPNetPool; - -class SignalThread; -// What to do: Define STRICT_HTTP_ERROR=1 in your makefile. Use HttpError in -// your code (HttpErrorType should only be used for code that is shared -// with groups which have not yet migrated). -#if defined(STRICT_HTTP_ERROR) && STRICT_HTTP_ERROR -typedef HttpError HttpErrorType; -#else // !STRICT_HTTP_ERROR -typedef int HttpErrorType; -#endif // !STRICT_HTTP_ERROR - -class HttpClient : private IHttpNotify, public sigslot::has_slots<> { -public: - // If HttpRequestData and HttpResponseData objects are provided, they must - // be freed by the caller. Otherwise, an internal object is allocated. - HttpClient(const std::string& agent, StreamPool* pool, - HttpTransaction* transaction = NULL); - ~HttpClient() override; - - void set_pool(StreamPool* pool) { pool_ = pool; } - - void set_agent(const std::string& agent) { agent_ = agent; } - const std::string& agent() const { return agent_; } - - void set_proxy(const ProxyInfo& proxy) { proxy_ = proxy; } - const ProxyInfo& proxy() const { return proxy_; } - - // Request retries occur when the connection closes before the beginning of - // an http response is received. In these cases, the http server may have - // timed out the keepalive connection before it received our request. Note - // that if a request document cannot be rewound, no retry is made. The - // default is 1. - void set_request_retries(size_t retries) { retries_ = retries; } - size_t request_retries() const { return retries_; } - - enum RedirectAction { REDIRECT_DEFAULT, REDIRECT_ALWAYS, REDIRECT_NEVER }; - void set_redirect_action(RedirectAction action) { redirect_action_ = action; } - RedirectAction redirect_action() const { return redirect_action_; } - - enum UriForm { URI_DEFAULT, URI_ABSOLUTE, URI_RELATIVE }; - void set_uri_form(UriForm form) { uri_form_ = form; } - UriForm uri_form() const { return uri_form_; } - - void set_cache(DiskCache* cache) { - RTC_DCHECK(!IsCacheActive()); - cache_ = cache; - } - bool cache_enabled() const { return (NULL != cache_); } - - // reset clears the server, request, and response structures. It will also - // abort an active request. - void reset(); - - void set_server(const SocketAddress& address); - const SocketAddress& server() const { return server_; } - - // Note: in order for HttpClient to retry a POST in response to - // an authentication challenge, a redirect response, or socket disconnection, - // the request document must support 'replaying' by calling Rewind() on it. - HttpTransaction* transaction() { return transaction_; } - const HttpTransaction* transaction() const { return transaction_; } - HttpRequestData& request() { return transaction_->request; } - const HttpRequestData& request() const { return transaction_->request; } - HttpResponseData& response() { return transaction_->response; } - const HttpResponseData& response() const { return transaction_->response; } - - // convenience methods - void prepare_get(const std::string& url); - void prepare_post(const std::string& url, const std::string& content_type, - StreamInterface* request_doc); - - // Convert HttpClient to a pull-based I/O model. - StreamInterface* GetDocumentStream(); - - // After you finish setting up your request, call start. - void start(); - - // Signalled when the header has finished downloading, before the document - // content is processed. You may change the response document in response - // to this signal. The second parameter indicates whether this is an - // intermediate (false) or final (true) header. An intermediate header is - // one that generates another request, such as a redirect or authentication - // challenge. The third parameter indicates the length of the response - // document, or else SIZE_UNKNOWN. Note: Do NOT abort the request in response - // to this signal. - sigslot::signal3 SignalHeaderAvailable; - // Signalled when the current request finishes. On success, err is 0. - sigslot::signal2 SignalHttpClientComplete; - -protected: - void connect(); - void release(); - - bool ShouldRedirect(std::string* location) const; - - bool BeginCacheFile(); - HttpError WriteCacheHeaders(const std::string& id); - void CompleteCacheFile(); - - bool CheckCache(); - HttpError ReadCacheHeaders(const std::string& id, bool override); - HttpError ReadCacheBody(const std::string& id); - - bool PrepareValidate(); - HttpError CompleteValidate(); - - HttpError OnHeaderAvailable(bool ignore_data, bool chunked, size_t data_size); - - void StartDNSLookup(); - void OnResolveResult(AsyncResolverInterface* resolver); - - // IHttpNotify Interface - HttpError onHttpHeaderComplete(bool chunked, size_t& data_size) override; - void onHttpComplete(HttpMode mode, HttpError err) override; - void onHttpClosed(HttpError err) override; - -private: - enum CacheState { CS_READY, CS_WRITING, CS_READING, CS_VALIDATING }; - bool IsCacheActive() const { return (cache_state_ > CS_READY); } - - std::string agent_; - StreamPool* pool_; - HttpBase base_; - SocketAddress server_; - ProxyInfo proxy_; - HttpTransaction* transaction_; - bool free_transaction_; - size_t retries_, attempt_, redirects_; - RedirectAction redirect_action_; - UriForm uri_form_; - std::unique_ptr context_; - DiskCache* cache_; - CacheState cache_state_; - AsyncResolverInterface* resolver_; -}; - -////////////////////////////////////////////////////////////////////// -// HttpClientDefault - Default implementation of HttpClient -////////////////////////////////////////////////////////////////////// - -class HttpClientDefault : public ReuseSocketPool, public HttpClient { -public: - HttpClientDefault(SocketFactory* factory, const std::string& agent, - HttpTransaction* transaction = NULL); -}; - -////////////////////////////////////////////////////////////////////// - -} // namespace rtc - -#endif // WEBRTC_BASE_HTTPCLIENT_H__ diff --git a/WebRtc.NET/include/webrtc/base/httpcommon.h b/WebRtc.NET/include/webrtc/base/httpcommon.h deleted file mode 100644 index 896b40e6..00000000 --- a/WebRtc.NET/include/webrtc/base/httpcommon.h +++ /dev/null @@ -1,459 +0,0 @@ -/* - * Copyright 2004 The WebRTC Project Authors. All rights reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_BASE_HTTPCOMMON_H__ -#define WEBRTC_BASE_HTTPCOMMON_H__ - -#include -#include -#include -#include -#include "webrtc/base/basictypes.h" -#include "webrtc/base/checks.h" -#include "webrtc/base/common.h" -#include "webrtc/base/stringutils.h" -#include "webrtc/base/stream.h" - -namespace rtc { - -class CryptString; -class SocketAddress; - -////////////////////////////////////////////////////////////////////// -// Constants -////////////////////////////////////////////////////////////////////// - -enum HttpCode { - HC_OK = 200, - HC_NON_AUTHORITATIVE = 203, - HC_NO_CONTENT = 204, - HC_PARTIAL_CONTENT = 206, - - HC_MULTIPLE_CHOICES = 300, - HC_MOVED_PERMANENTLY = 301, - HC_FOUND = 302, - HC_SEE_OTHER = 303, - HC_NOT_MODIFIED = 304, - HC_MOVED_TEMPORARILY = 307, - - HC_BAD_REQUEST = 400, - HC_UNAUTHORIZED = 401, - HC_FORBIDDEN = 403, - HC_NOT_FOUND = 404, - HC_PROXY_AUTHENTICATION_REQUIRED = 407, - HC_GONE = 410, - - HC_INTERNAL_SERVER_ERROR = 500, - HC_NOT_IMPLEMENTED = 501, - HC_SERVICE_UNAVAILABLE = 503, -}; - -enum HttpVersion { - HVER_1_0, HVER_1_1, HVER_UNKNOWN, - HVER_LAST = HVER_UNKNOWN -}; - -enum HttpVerb { - HV_GET, HV_POST, HV_PUT, HV_DELETE, HV_CONNECT, HV_HEAD, - HV_LAST = HV_HEAD -}; - -enum HttpError { - HE_NONE, - HE_PROTOCOL, // Received non-valid HTTP data - HE_DISCONNECTED, // Connection closed unexpectedly - HE_OVERFLOW, // Received too much data for internal buffers - HE_CONNECT_FAILED, // The socket failed to connect. - HE_SOCKET_ERROR, // An error occurred on a connected socket - HE_SHUTDOWN, // Http object is being destroyed - HE_OPERATION_CANCELLED, // Connection aborted locally - HE_AUTH, // Proxy Authentication Required - HE_CERTIFICATE_EXPIRED, // During SSL negotiation - HE_STREAM, // Problem reading or writing to the document - HE_CACHE, // Problem reading from cache - HE_DEFAULT -}; - -enum HttpHeader { - HH_AGE, - HH_CACHE_CONTROL, - HH_CONNECTION, - HH_CONTENT_DISPOSITION, - HH_CONTENT_LENGTH, - HH_CONTENT_RANGE, - HH_CONTENT_TYPE, - HH_COOKIE, - HH_DATE, - HH_ETAG, - HH_EXPIRES, - HH_HOST, - HH_IF_MODIFIED_SINCE, - HH_IF_NONE_MATCH, - HH_KEEP_ALIVE, - HH_LAST_MODIFIED, - HH_LOCATION, - HH_PROXY_AUTHENTICATE, - HH_PROXY_AUTHORIZATION, - HH_PROXY_CONNECTION, - HH_RANGE, - HH_SET_COOKIE, - HH_TE, - HH_TRAILERS, - HH_TRANSFER_ENCODING, - HH_UPGRADE, - HH_USER_AGENT, - HH_WWW_AUTHENTICATE, - HH_LAST = HH_WWW_AUTHENTICATE -}; - -const uint16_t HTTP_DEFAULT_PORT = 80; -const uint16_t HTTP_SECURE_PORT = 443; - -////////////////////////////////////////////////////////////////////// -// Utility Functions -////////////////////////////////////////////////////////////////////// - -inline HttpError mkerr(HttpError err, HttpError def_err = HE_DEFAULT) { - return (err != HE_NONE) ? err : def_err; -} - -const char* ToString(HttpVersion version); -bool FromString(HttpVersion& version, const std::string& str); - -const char* ToString(HttpVerb verb); -bool FromString(HttpVerb& verb, const std::string& str); - -const char* ToString(HttpHeader header); -bool FromString(HttpHeader& header, const std::string& str); - -inline bool HttpCodeIsInformational(uint32_t code) { - return ((code / 100) == 1); -} -inline bool HttpCodeIsSuccessful(uint32_t code) { - return ((code / 100) == 2); -} -inline bool HttpCodeIsRedirection(uint32_t code) { - return ((code / 100) == 3); -} -inline bool HttpCodeIsClientError(uint32_t code) { - return ((code / 100) == 4); -} -inline bool HttpCodeIsServerError(uint32_t code) { - return ((code / 100) == 5); -} - -bool HttpCodeHasBody(uint32_t code); -bool HttpCodeIsCacheable(uint32_t code); -bool HttpHeaderIsEndToEnd(HttpHeader header); -bool HttpHeaderIsCollapsible(HttpHeader header); - -struct HttpData; -bool HttpShouldKeepAlive(const HttpData& data); - -typedef std::pair HttpAttribute; -typedef std::vector HttpAttributeList; -void HttpComposeAttributes(const HttpAttributeList& attributes, char separator, - std::string* composed); -void HttpParseAttributes(const char * data, size_t len, - HttpAttributeList& attributes); -bool HttpHasAttribute(const HttpAttributeList& attributes, - const std::string& name, - std::string* value); -bool HttpHasNthAttribute(HttpAttributeList& attributes, - size_t index, - std::string* name, - std::string* value); - -// Convert RFC1123 date (DoW, DD Mon YYYY HH:MM:SS TZ) to unix timestamp -bool HttpDateToSeconds(const std::string& date, time_t* seconds); - -inline uint16_t HttpDefaultPort(bool secure) { - return secure ? HTTP_SECURE_PORT : HTTP_DEFAULT_PORT; -} - -// Returns the http server notation for a given address -std::string HttpAddress(const SocketAddress& address, bool secure); - -// functional for insensitive std::string compare -struct iless { - bool operator()(const std::string& lhs, const std::string& rhs) const { - return (::_stricmp(lhs.c_str(), rhs.c_str()) < 0); - } -}; - -// put quotes around a string and escape any quotes inside it -std::string quote(const std::string& str); - -////////////////////////////////////////////////////////////////////// -// Url -////////////////////////////////////////////////////////////////////// - -template -class Url { -public: - typedef typename Traits::string string; - - // TODO: Implement Encode/Decode - static int Encode(const CTYPE* source, CTYPE* destination, size_t len); - static int Encode(const string& source, string& destination); - static int Decode(const CTYPE* source, CTYPE* destination, size_t len); - static int Decode(const string& source, string& destination); - - Url(const string& url) { do_set_url(url.c_str(), url.size()); } - Url(const string& path, const string& host, uint16_t port = HTTP_DEFAULT_PORT) - : host_(host), port_(port), secure_(HTTP_SECURE_PORT == port) { - set_full_path(path); - } - - bool valid() const { return !host_.empty(); } - void clear() { - host_.clear(); - port_ = HTTP_DEFAULT_PORT; - secure_ = false; - path_.assign(1, static_cast('/')); - query_.clear(); - } - - void set_url(const string& val) { - do_set_url(val.c_str(), val.size()); - } - string url() const { - string val; do_get_url(&val); return val; - } - - void set_address(const string& val) { - do_set_address(val.c_str(), val.size()); - } - string address() const { - string val; do_get_address(&val); return val; - } - - void set_full_path(const string& val) { - do_set_full_path(val.c_str(), val.size()); - } - string full_path() const { - string val; do_get_full_path(&val); return val; - } - - void set_host(const string& val) { host_ = val; } - const string& host() const { return host_; } - - void set_port(uint16_t val) { port_ = val; } - uint16_t port() const { return port_; } - - void set_secure(bool val) { secure_ = val; } - bool secure() const { return secure_; } - - void set_path(const string& val) { - if (val.empty()) { - path_.assign(1, static_cast('/')); - } else { - RTC_DCHECK(val[0] == static_cast('/')); - path_ = val; - } - } - const string& path() const { return path_; } - - void set_query(const string& val) { - RTC_DCHECK(val.empty() || (val[0] == static_cast('?'))); - query_ = val; - } - const string& query() const { return query_; } - - bool get_attribute(const string& name, string* value) const; - -private: - void do_set_url(const CTYPE* val, size_t len); - void do_set_address(const CTYPE* val, size_t len); - void do_set_full_path(const CTYPE* val, size_t len); - - void do_get_url(string* val) const; - void do_get_address(string* val) const; - void do_get_full_path(string* val) const; - - string host_, path_, query_; - uint16_t port_; - bool secure_; -}; - -////////////////////////////////////////////////////////////////////// -// HttpData -////////////////////////////////////////////////////////////////////// - -struct HttpData { - typedef std::multimap HeaderMap; - typedef HeaderMap::const_iterator const_iterator; - typedef HeaderMap::iterator iterator; - - HttpVersion version; - std::unique_ptr document; - - HttpData(); - - enum HeaderCombine { HC_YES, HC_NO, HC_AUTO, HC_REPLACE, HC_NEW }; - void changeHeader(const std::string& name, const std::string& value, - HeaderCombine combine); - inline void addHeader(const std::string& name, const std::string& value, - bool append = true) { - changeHeader(name, value, append ? HC_AUTO : HC_NO); - } - inline void setHeader(const std::string& name, const std::string& value, - bool overwrite = true) { - changeHeader(name, value, overwrite ? HC_REPLACE : HC_NEW); - } - // Returns count of erased headers - size_t clearHeader(const std::string& name); - // Returns iterator to next header - iterator clearHeader(iterator header); - - // keep in mind, this may not do what you want in the face of multiple headers - bool hasHeader(const std::string& name, std::string* value) const; - - inline const_iterator begin() const { - return headers_.begin(); - } - inline const_iterator end() const { - return headers_.end(); - } - inline iterator begin() { - return headers_.begin(); - } - inline iterator end() { - return headers_.end(); - } - inline const_iterator begin(const std::string& name) const { - return headers_.lower_bound(name); - } - inline const_iterator end(const std::string& name) const { - return headers_.upper_bound(name); - } - inline iterator begin(const std::string& name) { - return headers_.lower_bound(name); - } - inline iterator end(const std::string& name) { - return headers_.upper_bound(name); - } - - // Convenience methods using HttpHeader - inline void changeHeader(HttpHeader header, const std::string& value, - HeaderCombine combine) { - changeHeader(ToString(header), value, combine); - } - inline void addHeader(HttpHeader header, const std::string& value, - bool append = true) { - addHeader(ToString(header), value, append); - } - inline void setHeader(HttpHeader header, const std::string& value, - bool overwrite = true) { - setHeader(ToString(header), value, overwrite); - } - inline void clearHeader(HttpHeader header) { - clearHeader(ToString(header)); - } - inline bool hasHeader(HttpHeader header, std::string* value) const { - return hasHeader(ToString(header), value); - } - inline const_iterator begin(HttpHeader header) const { - return headers_.lower_bound(ToString(header)); - } - inline const_iterator end(HttpHeader header) const { - return headers_.upper_bound(ToString(header)); - } - inline iterator begin(HttpHeader header) { - return headers_.lower_bound(ToString(header)); - } - inline iterator end(HttpHeader header) { - return headers_.upper_bound(ToString(header)); - } - - void setContent(const std::string& content_type, StreamInterface* document); - void setDocumentAndLength(StreamInterface* document); - - virtual size_t formatLeader(char* buffer, size_t size) const = 0; - virtual HttpError parseLeader(const char* line, size_t len) = 0; - -protected: - virtual ~HttpData(); - void clear(bool release_document); - void copy(const HttpData& src); - -private: - HeaderMap headers_; -}; - -struct HttpRequestData : public HttpData { - HttpVerb verb; - std::string path; - - HttpRequestData() : verb(HV_GET) { } - - void clear(bool release_document); - void copy(const HttpRequestData& src); - - size_t formatLeader(char* buffer, size_t size) const override; - HttpError parseLeader(const char* line, size_t len) override; - - bool getAbsoluteUri(std::string* uri) const; - bool getRelativeUri(std::string* host, std::string* path) const; -}; - -struct HttpResponseData : public HttpData { - uint32_t scode; - std::string message; - - HttpResponseData() : scode(HC_INTERNAL_SERVER_ERROR) { } - void clear(bool release_document); - void copy(const HttpResponseData& src); - - // Convenience methods - void set_success(uint32_t scode = HC_OK); - void set_success(const std::string& content_type, - StreamInterface* document, - uint32_t scode = HC_OK); - void set_redirect(const std::string& location, - uint32_t scode = HC_MOVED_TEMPORARILY); - void set_error(uint32_t scode); - - size_t formatLeader(char* buffer, size_t size) const override; - HttpError parseLeader(const char* line, size_t len) override; -}; - -struct HttpTransaction { - HttpRequestData request; - HttpResponseData response; -}; - -////////////////////////////////////////////////////////////////////// -// Http Authentication -////////////////////////////////////////////////////////////////////// - -struct HttpAuthContext { - std::string auth_method; - HttpAuthContext(const std::string& auth) : auth_method(auth) { } - virtual ~HttpAuthContext() { } -}; - -enum HttpAuthResult { HAR_RESPONSE, HAR_IGNORE, HAR_CREDENTIALS, HAR_ERROR }; - -// 'context' is used by this function to record information between calls. -// Start by passing a null pointer, then pass the same pointer each additional -// call. When the authentication attempt is finished, delete the context. -HttpAuthResult HttpAuthenticate( - const char * challenge, size_t len, - const SocketAddress& server, - const std::string& method, const std::string& uri, - const std::string& username, const CryptString& password, - HttpAuthContext *& context, std::string& response, std::string& auth_method); - -////////////////////////////////////////////////////////////////////// - -} // namespace rtc - -#endif // WEBRTC_BASE_HTTPCOMMON_H__ diff --git a/WebRtc.NET/include/webrtc/base/json.h b/WebRtc.NET/include/webrtc/base/json.h deleted file mode 100644 index 4c0d2224..00000000 --- a/WebRtc.NET/include/webrtc/base/json.h +++ /dev/null @@ -1,91 +0,0 @@ -/* - * Copyright 2004 The WebRTC Project Authors. All rights reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_BASE_JSON_H_ -#define WEBRTC_BASE_JSON_H_ - -#include -#include - -#if !defined(WEBRTC_EXTERNAL_JSON) -#include "json/json.h" -#else -#include "third_party/jsoncpp/json.h" -#endif - -namespace rtc { - -/////////////////////////////////////////////////////////////////////////////// -// JSON Helpers -/////////////////////////////////////////////////////////////////////////////// - -// Robust conversion operators, better than the ones in JsonCpp. -bool GetIntFromJson(const Json::Value& in, int* out); -bool GetUIntFromJson(const Json::Value& in, unsigned int* out); -bool GetStringFromJson(const Json::Value& in, std::string* out); -bool GetBoolFromJson(const Json::Value& in, bool* out); -bool GetDoubleFromJson(const Json::Value& in, double* out); - -// Pull values out of a JSON array. -bool GetValueFromJsonArray(const Json::Value& in, size_t n, - Json::Value* out); -bool GetIntFromJsonArray(const Json::Value& in, size_t n, - int* out); -bool GetUIntFromJsonArray(const Json::Value& in, size_t n, - unsigned int* out); -bool GetStringFromJsonArray(const Json::Value& in, size_t n, - std::string* out); -bool GetBoolFromJsonArray(const Json::Value& in, size_t n, - bool* out); -bool GetDoubleFromJsonArray(const Json::Value& in, size_t n, - double* out); - -// Convert json arrays to std::vector -bool JsonArrayToValueVector(const Json::Value& in, - std::vector* out); -bool JsonArrayToIntVector(const Json::Value& in, - std::vector* out); -bool JsonArrayToUIntVector(const Json::Value& in, - std::vector* out); -bool JsonArrayToStringVector(const Json::Value& in, - std::vector* out); -bool JsonArrayToBoolVector(const Json::Value& in, - std::vector* out); -bool JsonArrayToDoubleVector(const Json::Value& in, - std::vector* out); - -// Convert std::vector to json array -Json::Value ValueVectorToJsonArray(const std::vector& in); -Json::Value IntVectorToJsonArray(const std::vector& in); -Json::Value UIntVectorToJsonArray(const std::vector& in); -Json::Value StringVectorToJsonArray(const std::vector& in); -Json::Value BoolVectorToJsonArray(const std::vector& in); -Json::Value DoubleVectorToJsonArray(const std::vector& in); - -// Pull values out of a JSON object. -bool GetValueFromJsonObject(const Json::Value& in, const std::string& k, - Json::Value* out); -bool GetIntFromJsonObject(const Json::Value& in, const std::string& k, - int* out); -bool GetUIntFromJsonObject(const Json::Value& in, const std::string& k, - unsigned int* out); -bool GetStringFromJsonObject(const Json::Value& in, const std::string& k, - std::string* out); -bool GetBoolFromJsonObject(const Json::Value& in, const std::string& k, - bool* out); -bool GetDoubleFromJsonObject(const Json::Value& in, const std::string& k, - double* out); - -// Writes out a Json value as a string. -std::string JsonValueToString(const Json::Value& json); - -} // namespace rtc - -#endif // WEBRTC_BASE_JSON_H_ diff --git a/WebRtc.NET/include/webrtc/base/location.h b/WebRtc.NET/include/webrtc/base/location.h deleted file mode 100644 index a541bbef..00000000 --- a/WebRtc.NET/include/webrtc/base/location.h +++ /dev/null @@ -1,57 +0,0 @@ -/* - * Copyright 2016 The WebRTC Project Authors. All rights reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_BASE_LOCATION_H_ -#define WEBRTC_BASE_LOCATION_H_ - -#include - -#include "webrtc/system_wrappers/include/stringize_macros.h" - -namespace rtc { - -// Location provides basic info where of an object was constructed, or was -// significantly brought to life. -// This is a stripped down version of: -// https://code.google.com/p/chromium/codesearch#chromium/src/base/location.h -class Location { - public: - // Constructor should be called with a long-lived char*, such as __FILE__. - // It assumes the provided value will persist as a global constant, and it - // will not make a copy of it. - // - // TODO(deadbeef): Tracing is currently limited to 2 arguments, which is - // why the file name and line number are combined into one argument. - // - // Once TracingV2 is available, separate the file name and line number. - Location(const char* function_name, const char* file_and_line); - Location(); - Location(const Location& other); - Location& operator=(const Location& other); - - const char* function_name() const { return function_name_; } - const char* file_and_line() const { return file_and_line_; } - - std::string ToString() const; - - private: - const char* function_name_; - const char* file_and_line_; -}; - -// Define a macro to record the current source location. -#define RTC_FROM_HERE RTC_FROM_HERE_WITH_FUNCTION(__FUNCTION__) - -#define RTC_FROM_HERE_WITH_FUNCTION(function_name) \ - ::rtc::Location(function_name, __FILE__ ":" STRINGIZE(__LINE__)) - -} // namespace rtc - -#endif // WEBRTC_BASE_LOCATION_H_ diff --git a/WebRtc.NET/include/webrtc/base/logging.h b/WebRtc.NET/include/webrtc/base/logging.h deleted file mode 100644 index 13f0b782..00000000 --- a/WebRtc.NET/include/webrtc/base/logging.h +++ /dev/null @@ -1,367 +0,0 @@ -/* - * Copyright 2004 The WebRTC Project Authors. All rights reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -// LOG(...) an ostream target that can be used to send formatted -// output to a variety of logging targets, such as debugger console, stderr, -// or any LogSink. -// The severity level passed as the first argument to the LOGging -// functions is used as a filter, to limit the verbosity of the logging. -// Static members of LogMessage documented below are used to control the -// verbosity and target of the output. -// There are several variations on the LOG macro which facilitate logging -// of common error conditions, detailed below. - -// LOG(sev) logs the given stream at severity "sev", which must be a -// compile-time constant of the LoggingSeverity type, without the namespace -// prefix. -// LOG_V(sev) Like LOG(), but sev is a run-time variable of the LoggingSeverity -// type (basically, it just doesn't prepend the namespace). -// LOG_F(sev) Like LOG(), but includes the name of the current function. -// LOG_T(sev) Like LOG(), but includes the this pointer. -// LOG_T_F(sev) Like LOG_F(), but includes the this pointer. -// LOG_GLE(M)(sev [, mod]) attempt to add a string description of the -// HRESULT returned by GetLastError. The "M" variant allows searching of a -// DLL's string table for the error description. -// LOG_ERRNO(sev) attempts to add a string description of an errno-derived -// error. errno and associated facilities exist on both Windows and POSIX, -// but on Windows they only apply to the C/C++ runtime. -// LOG_ERR(sev) is an alias for the platform's normal error system, i.e. _GLE on -// Windows and _ERRNO on POSIX. -// (The above three also all have _EX versions that let you specify the error -// code, rather than using the last one.) -// LOG_E(sev, ctx, err, ...) logs a detailed error interpreted using the -// specified context. -// LOG_CHECK_LEVEL(sev) (and LOG_CHECK_LEVEL_V(sev)) can be used as a test -// before performing expensive or sensitive operations whose sole purpose is -// to output logging data at the desired level. -// Lastly, PLOG(sev, err) is an alias for LOG_ERR_EX. - -#ifndef WEBRTC_BASE_LOGGING_H_ -#define WEBRTC_BASE_LOGGING_H_ - -#include - -#include -#include -#include -#include - -#if defined(WEBRTC_MAC) && !defined(WEBRTC_IOS) -#include -#endif - -#include "webrtc/base/basictypes.h" -#include "webrtc/base/constructormagic.h" -#include "webrtc/base/thread_annotations.h" - -namespace rtc { - -/////////////////////////////////////////////////////////////////////////////// -// ConstantLabel can be used to easily generate string names from constant -// values. This can be useful for logging descriptive names of error messages. -// Usage: -// const ConstantLabel LIBRARY_ERRORS[] = { -// KLABEL(SOME_ERROR), -// KLABEL(SOME_OTHER_ERROR), -// ... -// LASTLABEL -// } -// -// int err = LibraryFunc(); -// LOG(LS_ERROR) << "LibraryFunc returned: " -// << ErrorName(err, LIBRARY_ERRORS); - -struct ConstantLabel { int value; const char * label; }; -#define KLABEL(x) { x, #x } -#define TLABEL(x, y) { x, y } -#define LASTLABEL { 0, 0 } - -const char* FindLabel(int value, const ConstantLabel entries[]); -std::string ErrorName(int err, const ConstantLabel* err_table); - -#if defined(WEBRTC_MAC) && !defined(WEBRTC_IOS) -// Returns a UTF8 description from an OS X Status error. -std::string DescriptionFromOSStatus(OSStatus err); -#endif - -////////////////////////////////////////////////////////////////////// - -// Note that the non-standard LoggingSeverity aliases exist because they are -// still in broad use. The meanings of the levels are: -// LS_SENSITIVE: Information which should only be logged with the consent -// of the user, due to privacy concerns. -// LS_VERBOSE: This level is for data which we do not want to appear in the -// normal debug log, but should appear in diagnostic logs. -// LS_INFO: Chatty level used in debugging for all sorts of things, the default -// in debug builds. -// LS_WARNING: Something that may warrant investigation. -// LS_ERROR: Something that should not have occurred. -// LS_NONE: Don't log. -enum LoggingSeverity { - LS_SENSITIVE, - LS_VERBOSE, - LS_INFO, - LS_WARNING, - LS_ERROR, - LS_NONE, - INFO = LS_INFO, - WARNING = LS_WARNING, - LERROR = LS_ERROR -}; - -// LogErrorContext assists in interpreting the meaning of an error value. -enum LogErrorContext { - ERRCTX_NONE, - ERRCTX_ERRNO, // System-local errno - ERRCTX_HRESULT, // Windows HRESULT - ERRCTX_OSSTATUS, // MacOS OSStatus - - // Abbreviations for LOG_E macro - ERRCTX_EN = ERRCTX_ERRNO, // LOG_E(sev, EN, x) - ERRCTX_HR = ERRCTX_HRESULT, // LOG_E(sev, HR, x) - ERRCTX_OS = ERRCTX_OSSTATUS, // LOG_E(sev, OS, x) -}; - -// Virtual sink interface that can receive log messages. -class LogSink { - public: - LogSink() {} - virtual ~LogSink() {} - virtual void OnLogMessage(const std::string& message) = 0; -}; - -class LogMessage { - public: - LogMessage(const char* file, int line, LoggingSeverity sev, - LogErrorContext err_ctx = ERRCTX_NONE, int err = 0, - const char* module = NULL); - - LogMessage(const char* file, - int line, - LoggingSeverity sev, - const std::string& tag); - - ~LogMessage(); - - static inline bool Loggable(LoggingSeverity sev) { return (sev >= min_sev_); } - std::ostream& stream() { return print_stream_; } - - // Returns the time at which this function was called for the first time. - // The time will be used as the logging start time. - // If this is not called externally, the LogMessage ctor also calls it, in - // which case the logging start time will be the time of the first LogMessage - // instance is created. - static int64_t LogStartTime(); - - // Returns the wall clock equivalent of |LogStartTime|, in seconds from the - // epoch. - static uint32_t WallClockStartTime(); - - // LogThreads: Display the thread identifier of the current thread - static void LogThreads(bool on = true); - - // LogTimestamps: Display the elapsed time of the program - static void LogTimestamps(bool on = true); - - // These are the available logging channels - // Debug: Debug console on Windows, otherwise stderr - static void LogToDebug(LoggingSeverity min_sev); - static LoggingSeverity GetLogToDebug() { return dbg_sev_; } - - // Sets whether logs will be directed to stderr in debug mode. - static void SetLogToStderr(bool log_to_stderr); - - // Stream: Any non-blocking stream interface. LogMessage takes ownership of - // the stream. Multiple streams may be specified by using AddLogToStream. - // LogToStream is retained for backwards compatibility; when invoked, it - // will discard any previously set streams and install the specified stream. - // GetLogToStream gets the severity for the specified stream, of if none - // is specified, the minimum stream severity. - // RemoveLogToStream removes the specified stream, without destroying it. - static int GetLogToStream(LogSink* stream = NULL); - static void AddLogToStream(LogSink* stream, LoggingSeverity min_sev); - static void RemoveLogToStream(LogSink* stream); - - // Testing against MinLogSeverity allows code to avoid potentially expensive - // logging operations by pre-checking the logging level. - static int GetMinLogSeverity() { return min_sev_; } - - // Parses the provided parameter stream to configure the options above. - // Useful for configuring logging from the command line. - static void ConfigureLogging(const char* params); - - private: - typedef std::pair StreamAndSeverity; - typedef std::list StreamList; - - // Updates min_sev_ appropriately when debug sinks change. - static void UpdateMinLogSeverity(); - - // These write out the actual log messages. - static void OutputToDebug(const std::string& msg, - LoggingSeverity severity, - const std::string& tag); - - // The ostream that buffers the formatted message before output - std::ostringstream print_stream_; - - // The severity level of this message - LoggingSeverity severity_; - - // The Android debug output tag. - std::string tag_; - - // String data generated in the constructor, that should be appended to - // the message before output. - std::string extra_; - - // dbg_sev_ is the thresholds for those output targets - // min_sev_ is the minimum (most verbose) of those levels, and is used - // as a short-circuit in the logging macros to identify messages that won't - // be logged. - // ctx_sev_ is the minimum level at which file context is displayed - static LoggingSeverity min_sev_, dbg_sev_, ctx_sev_; - - // The output streams and their associated severities - static StreamList streams_; - - // Flags for formatting options - static bool thread_, timestamp_; - - // Determines if logs will be directed to stderr in debug mode. - static bool log_to_stderr_; - - RTC_DISALLOW_COPY_AND_ASSIGN(LogMessage); -}; - -////////////////////////////////////////////////////////////////////// -// Logging Helpers -////////////////////////////////////////////////////////////////////// - -class LogMultilineState { - public: - size_t unprintable_count_[2]; - LogMultilineState() { - unprintable_count_[0] = unprintable_count_[1] = 0; - } -}; - -// When possible, pass optional state variable to track various data across -// multiple calls to LogMultiline. Otherwise, pass NULL. -void LogMultiline(LoggingSeverity level, const char* label, bool input, - const void* data, size_t len, bool hex_mode, - LogMultilineState* state); - -#ifndef LOG - -// The following non-obvious technique for implementation of a -// conditional log stream was stolen from google3/base/logging.h. - -// This class is used to explicitly ignore values in the conditional -// logging macros. This avoids compiler warnings like "value computed -// is not used" and "statement has no effect". - -class LogMessageVoidify { - public: - LogMessageVoidify() { } - // This has to be an operator with a precedence lower than << but - // higher than ?: - void operator&(std::ostream&) { } -}; - -#define LOG_SEVERITY_PRECONDITION(sev) \ - !(rtc::LogMessage::Loggable(sev)) \ - ? (void) 0 \ - : rtc::LogMessageVoidify() & - -#define LOG(sev) \ - LOG_SEVERITY_PRECONDITION(rtc::sev) \ - rtc::LogMessage(__FILE__, __LINE__, rtc::sev).stream() - -// The _V version is for when a variable is passed in. It doesn't do the -// namespace concatination. -#define LOG_V(sev) \ - LOG_SEVERITY_PRECONDITION(sev) \ - rtc::LogMessage(__FILE__, __LINE__, sev).stream() - -// The _F version prefixes the message with the current function name. -#if (defined(__GNUC__) && !defined(NDEBUG)) || defined(WANT_PRETTY_LOG_F) -#define LOG_F(sev) LOG(sev) << __PRETTY_FUNCTION__ << ": " -#define LOG_T_F(sev) LOG(sev) << this << ": " << __PRETTY_FUNCTION__ << ": " -#else -#define LOG_F(sev) LOG(sev) << __FUNCTION__ << ": " -#define LOG_T_F(sev) LOG(sev) << this << ": " << __FUNCTION__ << ": " -#endif - -#define LOG_CHECK_LEVEL(sev) \ - rtc::LogCheckLevel(rtc::sev) -#define LOG_CHECK_LEVEL_V(sev) \ - rtc::LogCheckLevel(sev) - -inline bool LogCheckLevel(LoggingSeverity sev) { - return (LogMessage::GetMinLogSeverity() <= sev); -} - -#define LOG_E(sev, ctx, err, ...) \ - LOG_SEVERITY_PRECONDITION(rtc::sev) \ - rtc::LogMessage(__FILE__, __LINE__, rtc::sev, \ - rtc::ERRCTX_ ## ctx, err , ##__VA_ARGS__) \ - .stream() - -#define LOG_T(sev) LOG(sev) << this << ": " - -#define LOG_ERRNO_EX(sev, err) \ - LOG_E(sev, ERRNO, err) -#define LOG_ERRNO(sev) \ - LOG_ERRNO_EX(sev, errno) - -#if defined(WEBRTC_WIN) -#define LOG_GLE_EX(sev, err) \ - LOG_E(sev, HRESULT, err) -#define LOG_GLE(sev) \ - LOG_GLE_EX(sev, GetLastError()) -#define LOG_GLEM(sev, mod) \ - LOG_E(sev, HRESULT, GetLastError(), mod) -#define LOG_ERR_EX(sev, err) \ - LOG_GLE_EX(sev, err) -#define LOG_ERR(sev) \ - LOG_GLE(sev) -#define LAST_SYSTEM_ERROR \ - (::GetLastError()) -#elif defined(__native_client__) && __native_client__ -#define LOG_ERR_EX(sev, err) \ - LOG(sev) -#define LOG_ERR(sev) \ - LOG(sev) -#define LAST_SYSTEM_ERROR \ - (0) -#elif defined(WEBRTC_POSIX) -#define LOG_ERR_EX(sev, err) \ - LOG_ERRNO_EX(sev, err) -#define LOG_ERR(sev) \ - LOG_ERRNO(sev) -#define LAST_SYSTEM_ERROR \ - (errno) -#endif // WEBRTC_WIN - -#define LOG_TAG(sev, tag) \ - LOG_SEVERITY_PRECONDITION(sev) \ - rtc::LogMessage(NULL, 0, sev, tag).stream() - -#define PLOG(sev, err) \ - LOG_ERR_EX(sev, err) - -// TODO(?): Add an "assert" wrapper that logs in the same manner. - -#endif // LOG - -} // namespace rtc - -#endif // WEBRTC_BASE_LOGGING_H_ diff --git a/WebRtc.NET/include/webrtc/base/maccocoathreadhelper.h b/WebRtc.NET/include/webrtc/base/maccocoathreadhelper.h deleted file mode 100644 index 255d081c..00000000 --- a/WebRtc.NET/include/webrtc/base/maccocoathreadhelper.h +++ /dev/null @@ -1,27 +0,0 @@ -/* - * Copyright 2008 The WebRTC Project Authors. All rights reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -// Helper function for using Cocoa with Posix threads. This header should be -// included from C/C++ files that want to use some Cocoa functionality without -// using the .mm extension (mostly for files that are compiled on multiple -// platforms). - -#ifndef WEBRTC_BASE_MACCOCOATHREADHELPER_H__ -#define WEBRTC_BASE_MACCOCOATHREADHELPER_H__ - -namespace rtc { - -// Cocoa must be "put into multithreading mode" before Cocoa functionality can -// be used on POSIX threads. This function does that. -void InitCocoaMultiThreading(); - -} // namespace rtc - -#endif // WEBRTC_BASE_MACCOCOATHREADHELPER_H__ diff --git a/WebRtc.NET/include/webrtc/base/macconversion.h b/WebRtc.NET/include/webrtc/base/macconversion.h deleted file mode 100644 index 63b27cf9..00000000 --- a/WebRtc.NET/include/webrtc/base/macconversion.h +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Copyright 2004 The WebRTC Project Authors. All rights reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_BASE_MACCONVERSION_H_ -#define WEBRTC_BASE_MACCONVERSION_H_ - -#if defined(WEBRTC_MAC) || defined(WEBRTC_IOS) - -#include - -#include - -// given a CFStringRef, attempt to convert it to a C++ string. -// returns true if it succeeds, false otherwise. -// We can safely assume, given our context, that the string is -// going to be in ASCII, because it will either be an IP address, -// or a domain name, which is guaranteed to be ASCII-representable. -bool p_convertHostCFStringRefToCPPString(const CFStringRef cfstr, - std::string& cppstr); - -// Convert the CFNumber to an integer, putting the integer in the location -// given, and returhing true, if the conversion succeeds. -// If given a NULL or a non-CFNumber, returns false. -// This is pretty aggresive about trying to convert to int. -bool p_convertCFNumberToInt(CFNumberRef cfn, int* i); - -// given a CFNumberRef, determine if it represents a true value. -bool p_isCFNumberTrue(CFNumberRef cfn); - -#endif // WEBRTC_MAC || WEBRTC_IOS - -#endif // WEBRTC_BASE_MACCONVERSION_H_ diff --git a/WebRtc.NET/include/webrtc/base/macutils.h b/WebRtc.NET/include/webrtc/base/macutils.h deleted file mode 100644 index fdcb3eee..00000000 --- a/WebRtc.NET/include/webrtc/base/macutils.h +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Copyright 2007 The WebRTC Project Authors. All rights reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_BASE_MACUTILS_H__ -#define WEBRTC_BASE_MACUTILS_H__ - -#include -#include - -namespace rtc { - -/////////////////////////////////////////////////////////////////////////////// - -// Note that some of these functions work for both iOS and Mac OS X. The ones -// that are specific to Mac are #ifdef'ed as such. - -bool ToUtf8(const CFStringRef str16, std::string* str8); -bool ToUtf16(const std::string& str8, CFStringRef* str16); - -#if defined(WEBRTC_MAC) && !defined(WEBRTC_IOS) -void DecodeFourChar(UInt32 fc, std::string* out); - -enum MacOSVersionName { - kMacOSUnknown, // ??? - kMacOSOlder, // 10.2- - kMacOSPanther, // 10.3 - kMacOSTiger, // 10.4 - kMacOSLeopard, // 10.5 - kMacOSSnowLeopard, // 10.6 - kMacOSLion, // 10.7 - kMacOSMountainLion, // 10.8 - kMacOSMavericks, // 10.9 - kMacOSNewer, // 10.10+ -}; - -MacOSVersionName GetOSVersionName(); -#endif - -/////////////////////////////////////////////////////////////////////////////// - -} // namespace rtc - -#endif // WEBRTC_BASE_MACUTILS_H__ diff --git a/WebRtc.NET/include/webrtc/base/md5.h b/WebRtc.NET/include/webrtc/base/md5.h deleted file mode 100644 index 45e00b73..00000000 --- a/WebRtc.NET/include/webrtc/base/md5.h +++ /dev/null @@ -1,44 +0,0 @@ -/* - * This is the header file for the MD5 message-digest algorithm. - * The algorithm is due to Ron Rivest. This code was - * written by Colin Plumb in 1993, no copyright is claimed. - * This code is in the public domain; do with it what you wish. - * - * Equivalent code is available from RSA Data Security, Inc. - * This code has been tested against that, and is equivalent, - * except that you don't need to include two pages of legalese - * with every copy. - * To compute the message digest of a chunk of bytes, declare an - * MD5Context structure, pass it to MD5Init, call MD5Update as - * needed on buffers full of bytes, and then call MD5Final, which - * will fill a supplied 16-byte array with the digest. - * - */ - -// Changes(fbarchard): Ported to C++ and Google style guide. -// Made context first parameter in MD5Final for consistency with Sha1. -// Changes(hellner): added rtc namespace -// Changes(pbos): Reverted types back to uint32(8)_t with _t suffix. - -#ifndef WEBRTC_BASE_MD5_H_ -#define WEBRTC_BASE_MD5_H_ - -#include -#include - -namespace rtc { - -struct MD5Context { - uint32_t buf[4]; - uint32_t bits[2]; - uint32_t in[16]; -}; - -void MD5Init(MD5Context* context); -void MD5Update(MD5Context* context, const uint8_t* data, size_t len); -void MD5Final(MD5Context* context, uint8_t digest[16]); -void MD5Transform(uint32_t buf[4], const uint32_t in[16]); - -} // namespace rtc - -#endif // WEBRTC_BASE_MD5_H_ diff --git a/WebRtc.NET/include/webrtc/base/md5digest.h b/WebRtc.NET/include/webrtc/base/md5digest.h deleted file mode 100644 index 3f8d656d..00000000 --- a/WebRtc.NET/include/webrtc/base/md5digest.h +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright 2012 The WebRTC Project Authors. All rights reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_BASE_MD5DIGEST_H_ -#define WEBRTC_BASE_MD5DIGEST_H_ - -#include "webrtc/base/md5.h" -#include "webrtc/base/messagedigest.h" - -namespace rtc { - -// A simple wrapper for our MD5 implementation. -class Md5Digest : public MessageDigest { - public: - enum { kSize = 16 }; - Md5Digest() { - MD5Init(&ctx_); - } - size_t Size() const override; - void Update(const void* buf, size_t len) override; - size_t Finish(void* buf, size_t len) override; - - private: - MD5Context ctx_; -}; - -} // namespace rtc - -#endif // WEBRTC_BASE_MD5DIGEST_H_ diff --git a/WebRtc.NET/include/webrtc/base/messagedigest.h b/WebRtc.NET/include/webrtc/base/messagedigest.h deleted file mode 100644 index 5cfcb477..00000000 --- a/WebRtc.NET/include/webrtc/base/messagedigest.h +++ /dev/null @@ -1,109 +0,0 @@ -/* - * Copyright 2004 The WebRTC Project Authors. All rights reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_BASE_MESSAGEDIGEST_H_ -#define WEBRTC_BASE_MESSAGEDIGEST_H_ - -#include - -namespace rtc { - -// Definitions for the digest algorithms. -extern const char DIGEST_MD5[]; -extern const char DIGEST_SHA_1[]; -extern const char DIGEST_SHA_224[]; -extern const char DIGEST_SHA_256[]; -extern const char DIGEST_SHA_384[]; -extern const char DIGEST_SHA_512[]; - -// A general class for computing hashes. -class MessageDigest { - public: - enum { kMaxSize = 64 }; // Maximum known size (SHA-512) - virtual ~MessageDigest() {} - // Returns the digest output size (e.g. 16 bytes for MD5). - virtual size_t Size() const = 0; - // Updates the digest with |len| bytes from |buf|. - virtual void Update(const void* buf, size_t len) = 0; - // Outputs the digest value to |buf| with length |len|. - // Returns the number of bytes written, i.e., Size(). - virtual size_t Finish(void* buf, size_t len) = 0; -}; - -// A factory class for creating digest objects. -class MessageDigestFactory { - public: - static MessageDigest* Create(const std::string& alg); -}; - -// A whitelist of approved digest algorithms from RFC 4572 (FIPS 180). -bool IsFips180DigestAlgorithm(const std::string& alg); - -// Functions to create hashes. - -// Computes the hash of |in_len| bytes of |input|, using the |digest| hash -// implementation, and outputs the hash to the buffer |output|, which is -// |out_len| bytes long. Returns the number of bytes written to |output| if -// successful, or 0 if |out_len| was too small. -size_t ComputeDigest(MessageDigest* digest, const void* input, size_t in_len, - void* output, size_t out_len); -// Like the previous function, but creates a digest implementation based on -// the desired digest name |alg|, e.g. DIGEST_SHA_1. Returns 0 if there is no -// digest with the given name. -size_t ComputeDigest(const std::string& alg, const void* input, size_t in_len, - void* output, size_t out_len); -// Computes the hash of |input| using the |digest| hash implementation, and -// returns it as a hex-encoded string. -std::string ComputeDigest(MessageDigest* digest, const std::string& input); -// Like the previous function, but creates a digest implementation based on -// the desired digest name |alg|, e.g. DIGEST_SHA_1. Returns empty string if -// there is no digest with the given name. -std::string ComputeDigest(const std::string& alg, const std::string& input); -// Like the previous function, but returns an explicit result code. -bool ComputeDigest(const std::string& alg, const std::string& input, - std::string* output); - -// Shorthand way to compute a hex-encoded hash using MD5. -inline std::string MD5(const std::string& input) { - return ComputeDigest(DIGEST_MD5, input); -} - -// Functions to compute RFC 2104 HMACs. - -// Computes the HMAC of |in_len| bytes of |input|, using the |digest| hash -// implementation and |key_len| bytes of |key| to key the HMAC, and outputs -// the HMAC to the buffer |output|, which is |out_len| bytes long. Returns the -// number of bytes written to |output| if successful, or 0 if |out_len| was too -// small. -size_t ComputeHmac(MessageDigest* digest, const void* key, size_t key_len, - const void* input, size_t in_len, - void* output, size_t out_len); -// Like the previous function, but creates a digest implementation based on -// the desired digest name |alg|, e.g. DIGEST_SHA_1. Returns 0 if there is no -// digest with the given name. -size_t ComputeHmac(const std::string& alg, const void* key, size_t key_len, - const void* input, size_t in_len, - void* output, size_t out_len); -// Computes the HMAC of |input| using the |digest| hash implementation and |key| -// to key the HMAC, and returns it as a hex-encoded string. -std::string ComputeHmac(MessageDigest* digest, const std::string& key, - const std::string& input); -// Like the previous function, but creates a digest implementation based on -// the desired digest name |alg|, e.g. DIGEST_SHA_1. Returns empty string if -// there is no digest with the given name. -std::string ComputeHmac(const std::string& alg, const std::string& key, - const std::string& input); -// Like the previous function, but returns an explicit result code. -bool ComputeHmac(const std::string& alg, const std::string& key, - const std::string& input, std::string* output); - -} // namespace rtc - -#endif // WEBRTC_BASE_MESSAGEDIGEST_H_ diff --git a/WebRtc.NET/include/webrtc/base/messagehandler.h b/WebRtc.NET/include/webrtc/base/messagehandler.h deleted file mode 100644 index 6a3c2ef7..00000000 --- a/WebRtc.NET/include/webrtc/base/messagehandler.h +++ /dev/null @@ -1,84 +0,0 @@ -/* - * Copyright 2004 The WebRTC Project Authors. All rights reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_BASE_MESSAGEHANDLER_H_ -#define WEBRTC_BASE_MESSAGEHANDLER_H_ - -#include -#include - -#include "webrtc/base/constructormagic.h" - -namespace rtc { - -struct Message; - -// Messages get dispatched to a MessageHandler - -class MessageHandler { - public: - virtual ~MessageHandler(); - virtual void OnMessage(Message* msg) = 0; - - protected: - MessageHandler() {} - - private: - RTC_DISALLOW_COPY_AND_ASSIGN(MessageHandler); -}; - -// Helper class to facilitate executing a functor on a thread. -template -class FunctorMessageHandler : public MessageHandler { - public: - explicit FunctorMessageHandler(const FunctorT& functor) - : functor_(functor) {} - virtual void OnMessage(Message* msg) { - result_ = functor_(); - } - const ReturnT& result() const { return result_; } - - private: - FunctorT functor_; - ReturnT result_; -}; - -// Specialization for std::unique_ptr. -template -class FunctorMessageHandler, FunctorT> - : public MessageHandler { - public: - explicit FunctorMessageHandler(const FunctorT& functor) : functor_(functor) {} - virtual void OnMessage(Message* msg) { result_ = std::move(functor_()); } - std::unique_ptr result() { return std::move(result_); } - - private: - FunctorT functor_; - std::unique_ptr result_; -}; - -// Specialization for ReturnT of void. -template -class FunctorMessageHandler : public MessageHandler { - public: - explicit FunctorMessageHandler(const FunctorT& functor) - : functor_(functor) {} - virtual void OnMessage(Message* msg) { - functor_(); - } - void result() const {} - - private: - FunctorT functor_; -}; - -} // namespace rtc - -#endif // WEBRTC_BASE_MESSAGEHANDLER_H_ diff --git a/WebRtc.NET/include/webrtc/base/messagequeue.h b/WebRtc.NET/include/webrtc/base/messagequeue.h deleted file mode 100644 index 628ce443..00000000 --- a/WebRtc.NET/include/webrtc/base/messagequeue.h +++ /dev/null @@ -1,314 +0,0 @@ -/* - * Copyright 2004 The WebRTC Project Authors. All rights reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_BASE_MESSAGEQUEUE_H_ -#define WEBRTC_BASE_MESSAGEQUEUE_H_ - -#include - -#include -#include -#include -#include -#include - -#include "webrtc/base/basictypes.h" -#include "webrtc/base/constructormagic.h" -#include "webrtc/base/criticalsection.h" -#include "webrtc/base/location.h" -#include "webrtc/base/messagehandler.h" -#include "webrtc/base/scoped_ref_ptr.h" -#include "webrtc/base/sharedexclusivelock.h" -#include "webrtc/base/sigslot.h" -#include "webrtc/base/socketserver.h" -#include "webrtc/base/timeutils.h" -#include "webrtc/base/thread_annotations.h" - -namespace rtc { - -struct Message; -class MessageQueue; - -// MessageQueueManager does cleanup of of message queues - -class MessageQueueManager { - public: - static void Add(MessageQueue *message_queue); - static void Remove(MessageQueue *message_queue); - static void Clear(MessageHandler *handler); - - // For testing purposes, we expose whether or not the MessageQueueManager - // instance has been initialized. It has no other use relative to the rest of - // the functions of this class, which auto-initialize the underlying - // MessageQueueManager instance when necessary. - static bool IsInitialized(); - - // Mainly for testing purposes, for use with a simulated clock. - // Ensures that all message queues have processed delayed messages - // up until the current point in time. - static void ProcessAllMessageQueues(); - - private: - static MessageQueueManager* Instance(); - - MessageQueueManager(); - ~MessageQueueManager(); - - void AddInternal(MessageQueue *message_queue); - void RemoveInternal(MessageQueue *message_queue); - void ClearInternal(MessageHandler *handler); - void ProcessAllMessageQueuesInternal(); - - static MessageQueueManager* instance_; - // This list contains all live MessageQueues. - std::vector message_queues_ GUARDED_BY(crit_); - - // Acquire this with DebugNonReentrantCritScope. - CriticalSection crit_; - bool locked_ GUARDED_BY(crit_); -}; - -// Derive from this for specialized data -// App manages lifetime, except when messages are purged - -class MessageData { - public: - MessageData() {} - virtual ~MessageData() {} -}; - -template -class TypedMessageData : public MessageData { - public: - explicit TypedMessageData(const T& data) : data_(data) { } - const T& data() const { return data_; } - T& data() { return data_; } - private: - T data_; -}; - -// Like TypedMessageData, but for pointers that require a delete. -template -class ScopedMessageData : public MessageData { - public: - explicit ScopedMessageData(T* data) : data_(data) { } - const std::unique_ptr& data() const { return data_; } - std::unique_ptr& data() { return data_; } - - private: - std::unique_ptr data_; -}; - -// Like ScopedMessageData, but for reference counted pointers. -template -class ScopedRefMessageData : public MessageData { - public: - explicit ScopedRefMessageData(T* data) : data_(data) { } - const scoped_refptr& data() const { return data_; } - scoped_refptr& data() { return data_; } - private: - scoped_refptr data_; -}; - -template -inline MessageData* WrapMessageData(const T& data) { - return new TypedMessageData(data); -} - -template -inline const T& UseMessageData(MessageData* data) { - return static_cast< TypedMessageData* >(data)->data(); -} - -template -class DisposeData : public MessageData { - public: - explicit DisposeData(T* data) : data_(data) { } - virtual ~DisposeData() { delete data_; } - private: - T* data_; -}; - -const uint32_t MQID_ANY = static_cast(-1); -const uint32_t MQID_DISPOSE = static_cast(-2); - -// No destructor - -struct Message { - Message() - : phandler(nullptr), message_id(0), pdata(nullptr), ts_sensitive(0) {} - inline bool Match(MessageHandler* handler, uint32_t id) const { - return (handler == NULL || handler == phandler) - && (id == MQID_ANY || id == message_id); - } - Location posted_from; - MessageHandler *phandler; - uint32_t message_id; - MessageData *pdata; - int64_t ts_sensitive; -}; - -typedef std::list MessageList; - -// DelayedMessage goes into a priority queue, sorted by trigger time. Messages -// with the same trigger time are processed in num_ (FIFO) order. - -class DelayedMessage { - public: - DelayedMessage(int64_t delay, - int64_t trigger, - uint32_t num, - const Message& msg) - : cmsDelay_(delay), msTrigger_(trigger), num_(num), msg_(msg) {} - - bool operator< (const DelayedMessage& dmsg) const { - return (dmsg.msTrigger_ < msTrigger_) - || ((dmsg.msTrigger_ == msTrigger_) && (dmsg.num_ < num_)); - } - - int64_t cmsDelay_; // for debugging - int64_t msTrigger_; - uint32_t num_; - Message msg_; -}; - -class MessageQueue { - public: - static const int kForever = -1; - - // Create a new MessageQueue and optionally assign it to the passed - // SocketServer. Subclasses that override Clear should pass false for - // init_queue and call DoInit() from their constructor to prevent races - // with the MessageQueueManager using the object while the vtable is still - // being created. - MessageQueue(SocketServer* ss, bool init_queue); - MessageQueue(std::unique_ptr ss, bool init_queue); - - // NOTE: SUBCLASSES OF MessageQueue THAT OVERRIDE Clear MUST CALL - // DoDestroy() IN THEIR DESTRUCTORS! This is required to avoid a data race - // between the destructor modifying the vtable, and the MessageQueueManager - // calling Clear on the object from a different thread. - virtual ~MessageQueue(); - - SocketServer* socketserver(); - void set_socketserver(SocketServer* ss); - - // Note: The behavior of MessageQueue has changed. When a MQ is stopped, - // futher Posts and Sends will fail. However, any pending Sends and *ready* - // Posts (as opposed to unexpired delayed Posts) will be delivered before - // Get (or Peek) returns false. By guaranteeing delivery of those messages, - // we eliminate the race condition when an MessageHandler and MessageQueue - // may be destroyed independently of each other. - virtual void Quit(); - virtual bool IsQuitting(); - virtual void Restart(); - - // Get() will process I/O until: - // 1) A message is available (returns true) - // 2) cmsWait seconds have elapsed (returns false) - // 3) Stop() is called (returns false) - virtual bool Get(Message *pmsg, int cmsWait = kForever, - bool process_io = true); - virtual bool Peek(Message *pmsg, int cmsWait = 0); - virtual void Post(const Location& posted_from, - MessageHandler* phandler, - uint32_t id = 0, - MessageData* pdata = NULL, - bool time_sensitive = false); - virtual void PostDelayed(const Location& posted_from, - int cmsDelay, - MessageHandler* phandler, - uint32_t id = 0, - MessageData* pdata = NULL); - virtual void PostAt(const Location& posted_from, - int64_t tstamp, - MessageHandler* phandler, - uint32_t id = 0, - MessageData* pdata = NULL); - // TODO(honghaiz): Remove this when all the dependencies are removed. - virtual void PostAt(const Location& posted_from, - uint32_t tstamp, - MessageHandler* phandler, - uint32_t id = 0, - MessageData* pdata = NULL); - virtual void Clear(MessageHandler* phandler, - uint32_t id = MQID_ANY, - MessageList* removed = NULL); - virtual void Dispatch(Message *pmsg); - virtual void ReceiveSends(); - - // Amount of time until the next message can be retrieved - virtual int GetDelay(); - - bool empty() const { return size() == 0u; } - size_t size() const { - CritScope cs(&crit_); // msgq_.size() is not thread safe. - return msgq_.size() + dmsgq_.size() + (fPeekKeep_ ? 1u : 0u); - } - - // Internally posts a message which causes the doomed object to be deleted - template void Dispose(T* doomed) { - if (doomed) { - Post(RTC_FROM_HERE, NULL, MQID_DISPOSE, new DisposeData(doomed)); - } - } - - // When this signal is sent out, any references to this queue should - // no longer be used. - sigslot::signal0<> SignalQueueDestroyed; - - protected: - class PriorityQueue : public std::priority_queue { - public: - container_type& container() { return c; } - void reheap() { make_heap(c.begin(), c.end(), comp); } - }; - - void DoDelayPost(const Location& posted_from, - int64_t cmsDelay, - int64_t tstamp, - MessageHandler* phandler, - uint32_t id, - MessageData* pdata); - - // Perform initialization, subclasses must call this from their constructor - // if false was passed as init_queue to the MessageQueue constructor. - void DoInit(); - - // Perform cleanup, subclasses that override Clear must call this from the - // destructor. - void DoDestroy(); - - void WakeUpSocketServer(); - - bool fPeekKeep_; - Message msgPeek_; - MessageList msgq_ GUARDED_BY(crit_); - PriorityQueue dmsgq_ GUARDED_BY(crit_); - uint32_t dmsgq_next_num_ GUARDED_BY(crit_); - CriticalSection crit_; - bool fInitialized_; - bool fDestroyed_; - - private: - volatile int stop_; - - // The SocketServer might not be owned by MessageQueue. - SocketServer* ss_ GUARDED_BY(ss_lock_); - // Used if SocketServer ownership lies with |this|. - std::unique_ptr own_ss_; - SharedExclusiveLock ss_lock_; - - RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(MessageQueue); -}; - -} // namespace rtc - -#endif // WEBRTC_BASE_MESSAGEQUEUE_H_ diff --git a/WebRtc.NET/include/webrtc/base/natserver.h b/WebRtc.NET/include/webrtc/base/natserver.h deleted file mode 100644 index 460518bd..00000000 --- a/WebRtc.NET/include/webrtc/base/natserver.h +++ /dev/null @@ -1,124 +0,0 @@ -/* - * Copyright 2004 The WebRTC Project Authors. All rights reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_BASE_NATSERVER_H_ -#define WEBRTC_BASE_NATSERVER_H_ - -#include -#include - -#include "webrtc/base/asyncudpsocket.h" -#include "webrtc/base/constructormagic.h" -#include "webrtc/base/socketaddresspair.h" -#include "webrtc/base/thread.h" -#include "webrtc/base/socketfactory.h" -#include "webrtc/base/nattypes.h" -#include "webrtc/base/proxyserver.h" - -namespace rtc { - -// Change how routes (socketaddress pairs) are compared based on the type of -// NAT. The NAT server maintains a hashtable of the routes that it knows -// about. So these affect which routes are treated the same. -struct RouteCmp { - explicit RouteCmp(NAT* nat); - size_t operator()(const SocketAddressPair& r) const; - bool operator()( - const SocketAddressPair& r1, const SocketAddressPair& r2) const; - - bool symmetric; -}; - -// Changes how addresses are compared based on the filtering rules of the NAT. -struct AddrCmp { - explicit AddrCmp(NAT* nat); - size_t operator()(const SocketAddress& r) const; - bool operator()(const SocketAddress& r1, const SocketAddress& r2) const; - - bool use_ip; - bool use_port; -}; - -// Implements the NAT device. It listens for packets on the internal network, -// translates them, and sends them out over the external network. -// -// TCP connections initiated from the internal side of the NAT server are -// also supported, by making a connection to the NAT server's TCP address and -// then sending the remote address in quasi-STUN format. The connection status -// will be indicated back to the client as a 1 byte status code, where '0' -// indicates success. - -const int NAT_SERVER_UDP_PORT = 4237; -const int NAT_SERVER_TCP_PORT = 4238; - -class NATServer : public sigslot::has_slots<> { - public: - NATServer( - NATType type, SocketFactory* internal, - const SocketAddress& internal_udp_addr, - const SocketAddress& internal_tcp_addr, - SocketFactory* external, const SocketAddress& external_ip); - ~NATServer() override; - - SocketAddress internal_udp_address() const { - return udp_server_socket_->GetLocalAddress(); - } - - SocketAddress internal_tcp_address() const { - return tcp_proxy_server_->GetServerAddress(); - } - - // Packets received on one of the networks. - void OnInternalUDPPacket(AsyncPacketSocket* socket, const char* buf, - size_t size, const SocketAddress& addr, - const PacketTime& packet_time); - void OnExternalUDPPacket(AsyncPacketSocket* socket, const char* buf, - size_t size, const SocketAddress& remote_addr, - const PacketTime& packet_time); - - private: - typedef std::set AddressSet; - - /* Records a translation and the associated external socket. */ - struct TransEntry { - TransEntry(const SocketAddressPair& r, AsyncUDPSocket* s, NAT* nat); - ~TransEntry(); - - void WhitelistInsert(const SocketAddress& addr); - bool WhitelistContains(const SocketAddress& ext_addr); - - SocketAddressPair route; - AsyncUDPSocket* socket; - AddressSet* whitelist; - CriticalSection crit_; - }; - - typedef std::map InternalMap; - typedef std::map ExternalMap; - - /* Creates a new entry that translates the given route. */ - void Translate(const SocketAddressPair& route); - - /* Determines whether the NAT would filter out a packet from this address. */ - bool ShouldFilterOut(TransEntry* entry, const SocketAddress& ext_addr); - - NAT* nat_; - SocketFactory* external_; - SocketAddress external_ip_; - AsyncUDPSocket* udp_server_socket_; - ProxyServer* tcp_proxy_server_; - InternalMap* int_map_; - ExternalMap* ext_map_; - RTC_DISALLOW_COPY_AND_ASSIGN(NATServer); -}; - -} // namespace rtc - -#endif // WEBRTC_BASE_NATSERVER_H_ diff --git a/WebRtc.NET/include/webrtc/base/networkmonitor.h b/WebRtc.NET/include/webrtc/base/networkmonitor.h deleted file mode 100644 index 5459cd63..00000000 --- a/WebRtc.NET/include/webrtc/base/networkmonitor.h +++ /dev/null @@ -1,127 +0,0 @@ -/* - * Copyright 2015 The WebRTC Project Authors. All rights reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_BASE_NETWORKMONITOR_H_ -#define WEBRTC_BASE_NETWORKMONITOR_H_ - -#include "webrtc/base/logging.h" -#include "webrtc/base/sigslot.h" -#include "webrtc/base/thread.h" - -namespace rtc { - -class IPAddress; - -// Error values are negative. -enum NetworkBindingResults { - NETWORK_BIND_SUCCESS = 0, // No error - NETWORK_BIND_FAILURE = -1, // Generic error - NETWORK_BIND_NOT_IMPLEMENTED = -2, - NETWORK_BIND_ADDRESS_NOT_FOUND = -3, - NETWORK_BIND_NETWORK_CHANGED = -4 -}; - -enum AdapterType { - // This enum resembles the one in Chromium net::ConnectionType. - ADAPTER_TYPE_UNKNOWN = 0, - ADAPTER_TYPE_ETHERNET = 1 << 0, - ADAPTER_TYPE_WIFI = 1 << 1, - ADAPTER_TYPE_CELLULAR = 1 << 2, - ADAPTER_TYPE_VPN = 1 << 3, - ADAPTER_TYPE_LOOPBACK = 1 << 4 -}; - -class NetworkBinderInterface { - public: - // Binds a socket to the network that is attached to |address| so that all - // packets on the socket |socket_fd| will be sent via that network. - // This is needed because some operating systems (like Android) require a - // special bind call to put packets on a non-default network interface. - virtual int BindSocketToNetwork(int socket_fd, const IPAddress& address) = 0; - virtual ~NetworkBinderInterface() {} -}; - -/* - * Receives network-change events via |OnNetworksChanged| and signals the - * networks changed event. - * - * Threading consideration: - * It is expected that all upstream operations (from native to Java) are - * performed from the worker thread. This includes creating, starting and - * stopping the monitor. This avoids the potential race condition when creating - * the singleton Java NetworkMonitor class. Downstream operations can be from - * any thread, but this class will forward all the downstream operations onto - * the worker thread. - * - * Memory consideration: - * NetworkMonitor is owned by the caller (NetworkManager). The global network - * monitor factory is owned by the factory itself but needs to be released from - * the factory creator. - */ -// Generic network monitor interface. It starts and stops monitoring network -// changes, and fires the SignalNetworksChanged event when networks change. -class NetworkMonitorInterface { - public: - NetworkMonitorInterface(); - virtual ~NetworkMonitorInterface(); - - sigslot::signal0<> SignalNetworksChanged; - - virtual void Start() = 0; - virtual void Stop() = 0; - - // Implementations should call this method on the base when networks change, - // and the base will fire SignalNetworksChanged on the right thread. - virtual void OnNetworksChanged() = 0; - - virtual AdapterType GetAdapterType(const std::string& interface_name) = 0; -}; - -class NetworkMonitorBase : public NetworkMonitorInterface, - public MessageHandler, - public sigslot::has_slots<> { - public: - NetworkMonitorBase(); - ~NetworkMonitorBase() override; - - void OnNetworksChanged() override; - - void OnMessage(Message* msg) override; - - protected: - Thread* worker_thread() { return worker_thread_; } - - private: - Thread* worker_thread_; -}; - -/* - * NetworkMonitorFactory creates NetworkMonitors. - */ -class NetworkMonitorFactory { - public: - // This is not thread-safe; it should be called once (or once per audio/video - // call) during the call initialization. - static void SetFactory(NetworkMonitorFactory* factory); - - static void ReleaseFactory(NetworkMonitorFactory* factory); - static NetworkMonitorFactory* GetFactory(); - - virtual NetworkMonitorInterface* CreateNetworkMonitor() = 0; - - virtual ~NetworkMonitorFactory(); - - protected: - NetworkMonitorFactory(); -}; - -} // namespace rtc - -#endif // WEBRTC_BASE_NETWORKMONITOR_H_ diff --git a/WebRtc.NET/include/webrtc/base/networkroute.h b/WebRtc.NET/include/webrtc/base/networkroute.h deleted file mode 100644 index a34e6d30..00000000 --- a/WebRtc.NET/include/webrtc/base/networkroute.h +++ /dev/null @@ -1,53 +0,0 @@ -/* - * Copyright 2016 The WebRTC Project Authors. All rights reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_BASE_NETWORKROUTE_H_ -#define WEBRTC_BASE_NETWORKROUTE_H_ - -// TODO(honghaiz): Make a directory that describes the interfaces and structs -// the media code can rely on and the network code can implement, and both can -// depend on that, but not depend on each other. Then, move this file to that -// directory. -namespace rtc { - -struct NetworkRoute { - bool connected; - uint16_t local_network_id; - uint16_t remote_network_id; - int last_sent_packet_id; // Last packet id sent on the PREVIOUS route. - - NetworkRoute() - : connected(false), - local_network_id(0), - remote_network_id(0), - last_sent_packet_id(-1) {} - - // The route is connected if the local and remote network ids are provided. - NetworkRoute(bool connected, - uint16_t local_net_id, - uint16_t remote_net_id, - int last_packet_id) - : connected(connected), - local_network_id(local_net_id), - remote_network_id(remote_net_id), - last_sent_packet_id(last_packet_id) {} - - // |last_sent_packet_id| does not affect the NetworkRoute comparison. - bool operator==(const NetworkRoute& nr) const { - return connected == nr.connected && - local_network_id == nr.local_network_id && - remote_network_id == nr.remote_network_id; - } - - bool operator!=(const NetworkRoute& nr) const { return !(*this == nr); } -}; -} // namespace rtc - -#endif // WEBRTC_BASE_NETWORKROUTE_H_ diff --git a/WebRtc.NET/include/webrtc/base/nullsocketserver.h b/WebRtc.NET/include/webrtc/base/nullsocketserver.h deleted file mode 100644 index e59f2faf..00000000 --- a/WebRtc.NET/include/webrtc/base/nullsocketserver.h +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright 2012 The WebRTC Project Authors. All rights reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_BASE_NULLSOCKETSERVER_H_ -#define WEBRTC_BASE_NULLSOCKETSERVER_H_ - -#include "webrtc/base/event.h" -#include "webrtc/base/socketserver.h" - -namespace rtc { - -class NullSocketServer : public SocketServer { - public: - NullSocketServer(); - ~NullSocketServer() override; - - bool Wait(int cms, bool process_io) override; - void WakeUp() override; - - Socket* CreateSocket(int type) override; - Socket* CreateSocket(int family, int type) override; - AsyncSocket* CreateAsyncSocket(int type) override; - AsyncSocket* CreateAsyncSocket(int family, int type) override; - - private: - Event event_; -}; - -} // namespace rtc - -#endif // WEBRTC_BASE_NULLSOCKETSERVER_H_ diff --git a/WebRtc.NET/include/webrtc/base/openssl.h b/WebRtc.NET/include/webrtc/base/openssl.h deleted file mode 100644 index 2071619d..00000000 --- a/WebRtc.NET/include/webrtc/base/openssl.h +++ /dev/null @@ -1,20 +0,0 @@ -/* - * Copyright 2013 The WebRTC Project Authors. All rights reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_BASE_OPENSSL_H_ -#define WEBRTC_BASE_OPENSSL_H_ - -#include - -#if (OPENSSL_VERSION_NUMBER < 0x10000000L) -#error OpenSSL is older than 1.0.0, which is the minimum supported version. -#endif - -#endif // WEBRTC_BASE_OPENSSL_H_ diff --git a/WebRtc.NET/include/webrtc/base/openssladapter.h b/WebRtc.NET/include/webrtc/base/openssladapter.h deleted file mode 100644 index 554627f5..00000000 --- a/WebRtc.NET/include/webrtc/base/openssladapter.h +++ /dev/null @@ -1,102 +0,0 @@ -/* - * Copyright 2004 The WebRTC Project Authors. All rights reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_BASE_OPENSSLADAPTER_H__ -#define WEBRTC_BASE_OPENSSLADAPTER_H__ - -#include -#include "webrtc/base/messagehandler.h" -#include "webrtc/base/messagequeue.h" -#include "webrtc/base/ssladapter.h" - -typedef struct ssl_st SSL; -typedef struct ssl_ctx_st SSL_CTX; -typedef struct x509_store_ctx_st X509_STORE_CTX; - -namespace rtc { - -/////////////////////////////////////////////////////////////////////////////// - -class OpenSSLAdapter : public SSLAdapter, public MessageHandler { -public: - static bool InitializeSSL(VerificationCallback callback); - static bool InitializeSSLThread(); - static bool CleanupSSL(); - - OpenSSLAdapter(AsyncSocket* socket); - ~OpenSSLAdapter() override; - - void SetMode(SSLMode mode) override; - int StartSSL(const char* hostname, bool restartable) override; - int Send(const void* pv, size_t cb) override; - int SendTo(const void* pv, size_t cb, const SocketAddress& addr) override; - int Recv(void* pv, size_t cb, int64_t* timestamp) override; - int RecvFrom(void* pv, - size_t cb, - SocketAddress* paddr, - int64_t* timestamp) override; - int Close() override; - - // Note that the socket returns ST_CONNECTING while SSL is being negotiated. - ConnState GetState() const override; - -protected: - void OnConnectEvent(AsyncSocket* socket) override; - void OnReadEvent(AsyncSocket* socket) override; - void OnWriteEvent(AsyncSocket* socket) override; - void OnCloseEvent(AsyncSocket* socket, int err) override; - -private: - enum SSLState { - SSL_NONE, SSL_WAIT, SSL_CONNECTING, SSL_CONNECTED, SSL_ERROR - }; - - enum { MSG_TIMEOUT }; - - int BeginSSL(); - int ContinueSSL(); - void Error(const char* context, int err, bool signal = true); - void Cleanup(); - - void OnMessage(Message* msg) override; - - static bool VerifyServerName(SSL* ssl, const char* host, - bool ignore_bad_cert); - bool SSLPostConnectionCheck(SSL* ssl, const char* host); -#if !defined(NDEBUG) - static void SSLInfoCallback(const SSL* s, int where, int ret); -#endif - static int SSLVerifyCallback(int ok, X509_STORE_CTX* store); - static VerificationCallback custom_verify_callback_; - friend class OpenSSLStreamAdapter; // for custom_verify_callback_; - - static bool ConfigureTrustedRootCertificates(SSL_CTX* ctx); - SSL_CTX* SetupSSLContext(); - - SSLState state_; - bool ssl_read_needs_write_; - bool ssl_write_needs_read_; - // If true, socket will retain SSL configuration after Close. - bool restartable_; - - SSL* ssl_; - SSL_CTX* ssl_ctx_; - std::string ssl_host_name_; - // Do DTLS or not - SSLMode ssl_mode_; - - bool custom_verification_succeeded_; -}; - -///////////////////////////////////////////////////////////////////////////// - -} // namespace rtc - -#endif // WEBRTC_BASE_OPENSSLADAPTER_H__ diff --git a/WebRtc.NET/include/webrtc/base/openssldigest.h b/WebRtc.NET/include/webrtc/base/openssldigest.h deleted file mode 100644 index 413df451..00000000 --- a/WebRtc.NET/include/webrtc/base/openssldigest.h +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Copyright 2004 The WebRTC Project Authors. All rights reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_BASE_OPENSSLDIGEST_H_ -#define WEBRTC_BASE_OPENSSLDIGEST_H_ - -#include - -#include "webrtc/base/messagedigest.h" - -namespace rtc { - -// An implementation of the digest class that uses OpenSSL. -class OpenSSLDigest : public MessageDigest { - public: - // Creates an OpenSSLDigest with |algorithm| as the hash algorithm. - explicit OpenSSLDigest(const std::string& algorithm); - ~OpenSSLDigest() override; - // Returns the digest output size (e.g. 16 bytes for MD5). - size_t Size() const override; - // Updates the digest with |len| bytes from |buf|. - void Update(const void* buf, size_t len) override; - // Outputs the digest value to |buf| with length |len|. - size_t Finish(void* buf, size_t len) override; - - // Helper function to look up a digest's EVP by name. - static bool GetDigestEVP(const std::string &algorithm, - const EVP_MD** md); - // Helper function to look up a digest's name by EVP. - static bool GetDigestName(const EVP_MD* md, - std::string* algorithm); - // Helper function to get the length of a digest. - static bool GetDigestSize(const std::string &algorithm, - size_t* len); - - private: - EVP_MD_CTX ctx_; - const EVP_MD* md_; -}; - -} // namespace rtc - -#endif // WEBRTC_BASE_OPENSSLDIGEST_H_ diff --git a/WebRtc.NET/include/webrtc/base/opensslidentity.h b/WebRtc.NET/include/webrtc/base/opensslidentity.h deleted file mode 100644 index 1c3122b3..00000000 --- a/WebRtc.NET/include/webrtc/base/opensslidentity.h +++ /dev/null @@ -1,148 +0,0 @@ -/* - * Copyright 2004 The WebRTC Project Authors. All rights reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_BASE_OPENSSLIDENTITY_H_ -#define WEBRTC_BASE_OPENSSLIDENTITY_H_ - -#include -#include - -#include -#include - -#include "webrtc/base/checks.h" -#include "webrtc/base/common.h" -#include "webrtc/base/constructormagic.h" -#include "webrtc/base/sslidentity.h" - -typedef struct ssl_ctx_st SSL_CTX; - -namespace rtc { - -// OpenSSLKeyPair encapsulates an OpenSSL EVP_PKEY* keypair object, -// which is reference counted inside the OpenSSL library. -class OpenSSLKeyPair { - public: - explicit OpenSSLKeyPair(EVP_PKEY* pkey) : pkey_(pkey) { - RTC_DCHECK(pkey_ != NULL); - } - - static OpenSSLKeyPair* Generate(const KeyParams& key_params); - // Constructs a key pair from the private key PEM string. This must not result - // in missing public key parameters. Returns null on error. - static OpenSSLKeyPair* FromPrivateKeyPEMString( - const std::string& pem_string); - - virtual ~OpenSSLKeyPair(); - - virtual OpenSSLKeyPair* GetReference(); - - EVP_PKEY* pkey() const { return pkey_; } - std::string PrivateKeyToPEMString() const; - std::string PublicKeyToPEMString() const; - bool operator==(const OpenSSLKeyPair& other) const; - bool operator!=(const OpenSSLKeyPair& other) const; - - private: - void AddReference(); - - EVP_PKEY* pkey_; - - RTC_DISALLOW_COPY_AND_ASSIGN(OpenSSLKeyPair); -}; - -// OpenSSLCertificate encapsulates an OpenSSL X509* certificate object, -// which is also reference counted inside the OpenSSL library. -class OpenSSLCertificate : public SSLCertificate { - public: - // Caller retains ownership of the X509 object. - explicit OpenSSLCertificate(X509* x509) : x509_(x509) { - AddReference(); - } - - static OpenSSLCertificate* Generate(OpenSSLKeyPair* key_pair, - const SSLIdentityParams& params); - static OpenSSLCertificate* FromPEMString(const std::string& pem_string); - - ~OpenSSLCertificate() override; - - OpenSSLCertificate* GetReference() const override; - - X509* x509() const { return x509_; } - - std::string ToPEMString() const override; - void ToDER(Buffer* der_buffer) const override; - bool operator==(const OpenSSLCertificate& other) const; - bool operator!=(const OpenSSLCertificate& other) const; - - // Compute the digest of the certificate given algorithm - bool ComputeDigest(const std::string& algorithm, - unsigned char* digest, - size_t size, - size_t* length) const override; - - // Compute the digest of a certificate as an X509 * - static bool ComputeDigest(const X509* x509, - const std::string& algorithm, - unsigned char* digest, - size_t size, - size_t* length); - - bool GetSignatureDigestAlgorithm(std::string* algorithm) const override; - std::unique_ptr GetChain() const override; - - int64_t CertificateExpirationTime() const override; - - private: - void AddReference() const; - - X509* x509_; - - RTC_DISALLOW_COPY_AND_ASSIGN(OpenSSLCertificate); -}; - -// Holds a keypair and certificate together, and a method to generate -// them consistently. -class OpenSSLIdentity : public SSLIdentity { - public: - static OpenSSLIdentity* GenerateWithExpiration(const std::string& common_name, - const KeyParams& key_params, - time_t certificate_lifetime); - static OpenSSLIdentity* GenerateForTest(const SSLIdentityParams& params); - static SSLIdentity* FromPEMStrings(const std::string& private_key, - const std::string& certificate); - ~OpenSSLIdentity() override; - - const OpenSSLCertificate& certificate() const override; - OpenSSLIdentity* GetReference() const override; - - // Configure an SSL context object to use our key and certificate. - bool ConfigureIdentity(SSL_CTX* ctx); - - std::string PrivateKeyToPEMString() const override; - std::string PublicKeyToPEMString() const override; - bool operator==(const OpenSSLIdentity& other) const; - bool operator!=(const OpenSSLIdentity& other) const; - - private: - OpenSSLIdentity(OpenSSLKeyPair* key_pair, OpenSSLCertificate* certificate); - - static OpenSSLIdentity* GenerateInternal(const SSLIdentityParams& params); - - std::unique_ptr key_pair_; - std::unique_ptr certificate_; - - RTC_DISALLOW_COPY_AND_ASSIGN(OpenSSLIdentity); -}; - - -} // namespace rtc - -#endif // WEBRTC_BASE_OPENSSLIDENTITY_H_ diff --git a/WebRtc.NET/include/webrtc/base/optional.h b/WebRtc.NET/include/webrtc/base/optional.h deleted file mode 100644 index 4d2b44e0..00000000 --- a/WebRtc.NET/include/webrtc/base/optional.h +++ /dev/null @@ -1,295 +0,0 @@ -/* - * Copyright 2015 The WebRTC Project Authors. All rights reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_BASE_OPTIONAL_H_ -#define WEBRTC_BASE_OPTIONAL_H_ - -#include -#include -#include - -#include "webrtc/base/array_view.h" -#include "webrtc/base/checks.h" -#include "webrtc/base/sanitizer.h" - -namespace rtc { - -namespace optional_internal { - -#if RTC_HAS_ASAN - -// This is a non-inlined function. The optimizer can't see inside it. -void* FunctionThatDoesNothingImpl(void*); - -template -inline T* FunctionThatDoesNothing(T* x) { - return reinterpret_cast( - FunctionThatDoesNothingImpl(reinterpret_cast(x))); -} - -#else - -template -inline T* FunctionThatDoesNothing(T* x) { return x; } - -#endif - -} // namespace optional_internal - -// Simple std::optional-wannabe. It either contains a T or not. -// -// A moved-from Optional may only be destroyed, and assigned to if T allows -// being assigned to after having been moved from. Specifically, you may not -// assume that it just doesn't contain a value anymore. -// -// Examples of good places to use Optional: -// -// - As a class or struct member, when the member doesn't always have a value: -// struct Prisoner { -// std::string name; -// Optional cell_number; // Empty if not currently incarcerated. -// }; -// -// - As a return value for functions that may fail to return a value on all -// allowed inputs. For example, a function that searches an array might -// return an Optional (the index where it found the element, or -// nothing if it didn't find it); and a function that parses numbers might -// return Optional (the parsed number, or nothing if parsing failed). -// -// Examples of bad places to use Optional: -// -// - As a return value for functions that may fail because of disallowed -// inputs. For example, a string length function should not return -// Optional so that it can return nothing in case the caller passed -// it a null pointer; the function should probably use RTC_[D]CHECK instead, -// and return plain size_t. -// -// - As a return value for functions that may fail to return a value on all -// allowed inputs, but need to tell the caller what went wrong. Returning -// Optional when parsing a single number as in the example above -// might make sense, but any larger parse job is probably going to need to -// tell the caller what the problem was, not just that there was one. -// -// - As a non-mutable function argument. When you want to pass a value of a -// type T that can fail to be there, const T* is almost always both fastest -// and cleanest. (If you're *sure* that the the caller will always already -// have an Optional, const Optional& is slightly faster than const T*, -// but this is a micro-optimization. In general, stick to const T*.) -// -// TODO(kwiberg): Get rid of this class when the standard library has -// std::optional (and we're allowed to use it). -template -class Optional final { - public: - // Construct an empty Optional. - Optional() : has_value_(false), empty_('\0') { - PoisonValue(); - } - - // Construct an Optional that contains a value. - explicit Optional(const T& value) : has_value_(true) { - new (&value_) T(value); - } - explicit Optional(T&& value) : has_value_(true) { - new (&value_) T(std::move(value)); - } - - // Copy constructor: copies the value from m if it has one. - Optional(const Optional& m) : has_value_(m.has_value_) { - if (has_value_) - new (&value_) T(m.value_); - else - PoisonValue(); - } - - // Move constructor: if m has a value, moves the value from m, leaving m - // still in a state where it has a value, but a moved-from one (the - // properties of which depends on T; the only general guarantee is that we - // can destroy m). - Optional(Optional&& m) : has_value_(m.has_value_) { - if (has_value_) - new (&value_) T(std::move(m.value_)); - else - PoisonValue(); - } - - ~Optional() { - if (has_value_) - value_.~T(); - else - UnpoisonValue(); - } - - // Copy assignment. Uses T's copy assignment if both sides have a value, T's - // copy constructor if only the right-hand side has a value. - Optional& operator=(const Optional& m) { - if (m.has_value_) { - if (has_value_) { - value_ = m.value_; // T's copy assignment. - } else { - UnpoisonValue(); - new (&value_) T(m.value_); // T's copy constructor. - has_value_ = true; - } - } else { - reset(); - } - return *this; - } - - // Move assignment. Uses T's move assignment if both sides have a value, T's - // move constructor if only the right-hand side has a value. The state of m - // after it's been moved from is as for the move constructor. - Optional& operator=(Optional&& m) { - if (m.has_value_) { - if (has_value_) { - value_ = std::move(m.value_); // T's move assignment. - } else { - UnpoisonValue(); - new (&value_) T(std::move(m.value_)); // T's move constructor. - has_value_ = true; - } - } else { - reset(); - } - return *this; - } - - // Swap the values if both m1 and m2 have values; move the value if only one - // of them has one. - friend void swap(Optional& m1, Optional& m2) { - if (m1.has_value_) { - if (m2.has_value_) { - // Both have values: swap. - using std::swap; - swap(m1.value_, m2.value_); - } else { - // Only m1 has a value: move it to m2. - m2.UnpoisonValue(); - new (&m2.value_) T(std::move(m1.value_)); - m1.value_.~T(); // Destroy the moved-from value. - m1.has_value_ = false; - m2.has_value_ = true; - m1.PoisonValue(); - } - } else if (m2.has_value_) { - // Only m2 has a value: move it to m1. - m1.UnpoisonValue(); - new (&m1.value_) T(std::move(m2.value_)); - m2.value_.~T(); // Destroy the moved-from value. - m1.has_value_ = true; - m2.has_value_ = false; - m2.PoisonValue(); - } - } - - // Destroy any contained value. Has no effect if we have no value. - void reset() { - if (!has_value_) - return; - value_.~T(); - has_value_ = false; - PoisonValue(); - } - - template - void emplace(Args&&... args) { - if (has_value_) - value_.~T(); - else - UnpoisonValue(); - new (&value_) T(std::forward(args)...); - has_value_ = true; - } - - // Conversion to bool to test if we have a value. - explicit operator bool() const { return has_value_; } - - // Dereferencing. Only allowed if we have a value. - const T* operator->() const { - RTC_DCHECK(has_value_); - return &value_; - } - T* operator->() { - RTC_DCHECK(has_value_); - return &value_; - } - const T& operator*() const { - RTC_DCHECK(has_value_); - return value_; - } - T& operator*() { - RTC_DCHECK(has_value_); - return value_; - } - - // Dereference with a default value in case we don't have a value. - const T& value_or(const T& default_val) const { - // The no-op call prevents the compiler from generating optimized code that - // reads value_ even if !has_value_, but only if FunctionThatDoesNothing is - // not completely inlined; see its declaration.). - return has_value_ ? *optional_internal::FunctionThatDoesNothing(&value_) - : default_val; - } - - // Equality tests. Two Optionals are equal if they contain equivalent values, - // or if they're both empty. - friend bool operator==(const Optional& m1, const Optional& m2) { - return m1.has_value_ && m2.has_value_ ? m1.value_ == m2.value_ - : m1.has_value_ == m2.has_value_; - } - friend bool operator==(const Optional& opt, const T& value) { - return opt.has_value_ && opt.value_ == value; - } - friend bool operator==(const T& value, const Optional& opt) { - return opt.has_value_ && value == opt.value_; - } - - friend bool operator!=(const Optional& m1, const Optional& m2) { - return m1.has_value_ && m2.has_value_ ? m1.value_ != m2.value_ - : m1.has_value_ != m2.has_value_; - } - friend bool operator!=(const Optional& opt, const T& value) { - return !opt.has_value_ || opt.value_ != value; - } - friend bool operator!=(const T& value, const Optional& opt) { - return !opt.has_value_ || value != opt.value_; - } - - private: - // Tell sanitizers that value_ shouldn't be touched. - void PoisonValue() { - rtc::AsanPoison(rtc::MakeArrayView(&value_, 1)); - rtc::MsanMarkUninitialized(rtc::MakeArrayView(&value_, 1)); - } - - // Tell sanitizers that value_ is OK to touch again. - void UnpoisonValue() { - rtc::AsanUnpoison(rtc::MakeArrayView(&value_, 1)); - } - - bool has_value_; // True iff value_ contains a live value. - union { - // empty_ exists only to make it possible to initialize the union, even when - // it doesn't contain any data. If the union goes uninitialized, it may - // trigger compiler warnings. - char empty_; - // By placing value_ in a union, we get to manage its construction and - // destruction manually: the Optional constructors won't automatically - // construct it, and the Optional destructor won't automatically destroy - // it. Basically, this just allocates a properly sized and aligned block of - // memory in which we can manually put a T with placement new. - T value_; - }; -}; - -} // namespace rtc - -#endif // WEBRTC_BASE_OPTIONAL_H_ diff --git a/WebRtc.NET/include/webrtc/base/pathutils.h b/WebRtc.NET/include/webrtc/base/pathutils.h deleted file mode 100644 index 0aebcef1..00000000 --- a/WebRtc.NET/include/webrtc/base/pathutils.h +++ /dev/null @@ -1,111 +0,0 @@ -/* - * Copyright 2004 The WebRTC Project Authors. All rights reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_BASE_PATHUTILS_H__ -#define WEBRTC_BASE_PATHUTILS_H__ - -#include - -#include "webrtc/base/checks.h" - -namespace rtc { - -/////////////////////////////////////////////////////////////////////////////// -// Pathname - parsing of pathnames into components, and vice versa. -// -// To establish consistent terminology, a filename never contains a folder -// component. A folder never contains a filename. A pathname may include -// a folder and/or filename component. Here are some examples: -// -// pathname() /home/john/example.txt -// folder() /home/john/ -// filename() example.txt -// parent_folder() /home/ -// folder_name() john/ -// basename() example -// extension() .txt -// -// Basename may begin, end, and/or include periods, but no folder delimiters. -// If extension exists, it consists of a period followed by zero or more -// non-period/non-delimiter characters, and basename is non-empty. -/////////////////////////////////////////////////////////////////////////////// - -class Pathname { -public: - // Folder delimiters are slash and backslash - static bool IsFolderDelimiter(char ch); - static char DefaultFolderDelimiter(); - - Pathname(); - Pathname(const Pathname&); - Pathname(Pathname&&); - Pathname(const std::string& pathname); - Pathname(const std::string& folder, const std::string& filename); - - Pathname& operator=(const Pathname&); - Pathname& operator=(Pathname&&); - - // Set's the default folder delimiter for this Pathname - char folder_delimiter() const { return folder_delimiter_; } - void SetFolderDelimiter(char delimiter); - - // Normalize changes all folder delimiters to folder_delimiter() - void Normalize(); - - // Reset to the empty pathname - void clear(); - - // Returns true if the pathname is empty. Note: this->pathname().empty() - // is always false. - bool empty() const; - - // Returns the folder and filename components. If the pathname is empty, - // returns a string representing the current directory (as a relative path, - // i.e., "."). - std::string pathname() const; - void SetPathname(const std::string& pathname); - void SetPathname(const std::string& folder, const std::string& filename); - - // Append pathname to the current folder (if any). Any existing filename - // will be discarded. - void AppendPathname(const std::string& pathname); - - std::string folder() const; - std::string folder_name() const; - std::string parent_folder() const; - // SetFolder and AppendFolder will append a folder delimiter, if needed. - void SetFolder(const std::string& folder); - void AppendFolder(const std::string& folder); - - std::string basename() const; - bool SetBasename(const std::string& basename); - - std::string extension() const; - // SetExtension will prefix a period, if needed. - bool SetExtension(const std::string& extension); - - std::string filename() const; - bool SetFilename(const std::string& filename); - -#if defined(WEBRTC_WIN) - bool GetDrive(char* drive, uint32_t bytes) const; - static bool GetDrive(char* drive, - uint32_t bytes, - const std::string& pathname); -#endif - -private: - std::string folder_, basename_, extension_; - char folder_delimiter_; -}; - -} // namespace rtc - -#endif // WEBRTC_BASE_PATHUTILS_H__ diff --git a/WebRtc.NET/include/webrtc/base/physicalsocketserver.h b/WebRtc.NET/include/webrtc/base/physicalsocketserver.h deleted file mode 100644 index 462fab2b..00000000 --- a/WebRtc.NET/include/webrtc/base/physicalsocketserver.h +++ /dev/null @@ -1,229 +0,0 @@ -/* - * Copyright 2004 The WebRTC Project Authors. All rights reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_BASE_PHYSICALSOCKETSERVER_H__ -#define WEBRTC_BASE_PHYSICALSOCKETSERVER_H__ - -#include -#include - -#include "webrtc/base/nethelpers.h" -#include "webrtc/base/socketserver.h" -#include "webrtc/base/criticalsection.h" - -#if defined(WEBRTC_POSIX) -typedef int SOCKET; -#endif // WEBRTC_POSIX - -namespace rtc { - -// Event constants for the Dispatcher class. -enum DispatcherEvent { - DE_READ = 0x0001, - DE_WRITE = 0x0002, - DE_CONNECT = 0x0004, - DE_CLOSE = 0x0008, - DE_ACCEPT = 0x0010, -}; - -class Signaler; -#if defined(WEBRTC_POSIX) -class PosixSignalDispatcher; -#endif - -class Dispatcher { - public: - virtual ~Dispatcher() {} - virtual uint32_t GetRequestedEvents() = 0; - virtual void OnPreEvent(uint32_t ff) = 0; - virtual void OnEvent(uint32_t ff, int err) = 0; -#if defined(WEBRTC_WIN) - virtual WSAEVENT GetWSAEvent() = 0; - virtual SOCKET GetSocket() = 0; - virtual bool CheckSignalClose() = 0; -#elif defined(WEBRTC_POSIX) - virtual int GetDescriptor() = 0; - virtual bool IsDescriptorClosed() = 0; -#endif -}; - -// A socket server that provides the real sockets of the underlying OS. -class PhysicalSocketServer : public SocketServer { - public: - PhysicalSocketServer(); - ~PhysicalSocketServer() override; - - // SocketFactory: - Socket* CreateSocket(int type) override; - Socket* CreateSocket(int family, int type) override; - - AsyncSocket* CreateAsyncSocket(int type) override; - AsyncSocket* CreateAsyncSocket(int family, int type) override; - - // Internal Factory for Accept (virtual so it can be overwritten in tests). - virtual AsyncSocket* WrapSocket(SOCKET s); - - // SocketServer: - bool Wait(int cms, bool process_io) override; - void WakeUp() override; - - void Add(Dispatcher* dispatcher); - void Remove(Dispatcher* dispatcher); - -#if defined(WEBRTC_POSIX) - // Sets the function to be executed in response to the specified POSIX signal. - // The function is executed from inside Wait() using the "self-pipe trick"-- - // regardless of which thread receives the signal--and hence can safely - // manipulate user-level data structures. - // "handler" may be SIG_IGN, SIG_DFL, or a user-specified function, just like - // with signal(2). - // Only one PhysicalSocketServer should have user-level signal handlers. - // Dispatching signals on multiple PhysicalSocketServers is not reliable. - // The signal mask is not modified. It is the caller's responsibily to - // maintain it as desired. - virtual bool SetPosixSignalHandler(int signum, void (*handler)(int)); - - protected: - Dispatcher* signal_dispatcher(); -#endif - - private: - typedef std::vector DispatcherList; - typedef std::vector IteratorList; - -#if defined(WEBRTC_POSIX) - static bool InstallSignal(int signum, void (*handler)(int)); - - std::unique_ptr signal_dispatcher_; -#endif - DispatcherList dispatchers_; - IteratorList iterators_; - Signaler* signal_wakeup_; - CriticalSection crit_; - bool fWait_; -#if defined(WEBRTC_WIN) - WSAEVENT socket_ev_; -#endif -}; - -class PhysicalSocket : public AsyncSocket, public sigslot::has_slots<> { - public: - PhysicalSocket(PhysicalSocketServer* ss, SOCKET s = INVALID_SOCKET); - ~PhysicalSocket() override; - - // Creates the underlying OS socket (same as the "socket" function). - virtual bool Create(int family, int type); - - SocketAddress GetLocalAddress() const override; - SocketAddress GetRemoteAddress() const override; - - int Bind(const SocketAddress& bind_addr) override; - int Connect(const SocketAddress& addr) override; - - int GetError() const override; - void SetError(int error) override; - - ConnState GetState() const override; - - int GetOption(Option opt, int* value) override; - int SetOption(Option opt, int value) override; - - int Send(const void* pv, size_t cb) override; - int SendTo(const void* buffer, - size_t length, - const SocketAddress& addr) override; - - int Recv(void* buffer, size_t length, int64_t* timestamp) override; - int RecvFrom(void* buffer, - size_t length, - SocketAddress* out_addr, - int64_t* timestamp) override; - - int Listen(int backlog) override; - AsyncSocket* Accept(SocketAddress* out_addr) override; - - int Close() override; - - int EstimateMTU(uint16_t* mtu) override; - - SocketServer* socketserver() { return ss_; } - - protected: - int DoConnect(const SocketAddress& connect_addr); - - // Make virtual so ::accept can be overwritten in tests. - virtual SOCKET DoAccept(SOCKET socket, sockaddr* addr, socklen_t* addrlen); - - // Make virtual so ::send can be overwritten in tests. - virtual int DoSend(SOCKET socket, const char* buf, int len, int flags); - - // Make virtual so ::sendto can be overwritten in tests. - virtual int DoSendTo(SOCKET socket, const char* buf, int len, int flags, - const struct sockaddr* dest_addr, socklen_t addrlen); - - void OnResolveResult(AsyncResolverInterface* resolver); - - void UpdateLastError(); - void MaybeRemapSendError(); - - static int TranslateOption(Option opt, int* slevel, int* sopt); - - PhysicalSocketServer* ss_; - SOCKET s_; - uint8_t enabled_events_; - bool udp_; - CriticalSection crit_; - int error_ GUARDED_BY(crit_); - ConnState state_; - AsyncResolver* resolver_; - -#if !defined(NDEBUG) - std::string dbg_addr_; -#endif -}; - -class SocketDispatcher : public Dispatcher, public PhysicalSocket { - public: - explicit SocketDispatcher(PhysicalSocketServer *ss); - SocketDispatcher(SOCKET s, PhysicalSocketServer *ss); - ~SocketDispatcher() override; - - bool Initialize(); - - virtual bool Create(int type); - bool Create(int family, int type) override; - -#if defined(WEBRTC_WIN) - WSAEVENT GetWSAEvent() override; - SOCKET GetSocket() override; - bool CheckSignalClose() override; -#elif defined(WEBRTC_POSIX) - int GetDescriptor() override; - bool IsDescriptorClosed() override; -#endif - - uint32_t GetRequestedEvents() override; - void OnPreEvent(uint32_t ff) override; - void OnEvent(uint32_t ff, int err) override; - - int Close() override; - -#if defined(WEBRTC_WIN) - private: - static int next_id_; - int id_; - bool signal_close_; - int signal_err_; -#endif // WEBRTC_WIN -}; - -} // namespace rtc - -#endif // WEBRTC_BASE_PHYSICALSOCKETSERVER_H__ diff --git a/WebRtc.NET/include/webrtc/base/platform_file.h b/WebRtc.NET/include/webrtc/base/platform_file.h deleted file mode 100644 index 27accf05..00000000 --- a/WebRtc.NET/include/webrtc/base/platform_file.h +++ /dev/null @@ -1,56 +0,0 @@ -/* - * Copyright 2014 The WebRTC Project Authors. All rights reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_BASE_PLATFORM_FILE_H_ -#define WEBRTC_BASE_PLATFORM_FILE_H_ - -#include -#include - -#if defined(WEBRTC_WIN) -#include "webrtc/base/win32.h" -#endif - -namespace rtc { - -#if defined(WEBRTC_WIN) -typedef HANDLE PlatformFile; -#elif defined(WEBRTC_POSIX) -typedef int PlatformFile; -#else -#error Unsupported platform -#endif - -extern const PlatformFile kInvalidPlatformFileValue; - -// Associates a standard FILE stream with an existing PlatformFile. -// Note that after this function has returned a valid FILE stream, -// the PlatformFile should no longer be used. -FILE* FdopenPlatformFileForWriting(PlatformFile file); - -// Closes a PlatformFile. -// Don't use ClosePlatformFile to close a file opened with FdopenPlatformFile. -// Use fclose instead. -bool ClosePlatformFile(PlatformFile file); - -// Removes a file in the filesystem. -bool RemoveFile(const std::string& path); - -// Opens a file for reading and writing. You might want to use base/file.h -// instead. -PlatformFile OpenPlatformFile(const std::string& path); - -// Creates a new file for reading and writing. If the file already exists it -// will be overwritten. You might want to use base/file.h instead. -PlatformFile CreatePlatformFile(const std::string& path); - -} // namespace rtc - -#endif // WEBRTC_BASE_PLATFORM_FILE_H_ diff --git a/WebRtc.NET/include/webrtc/base/platform_thread.h b/WebRtc.NET/include/webrtc/base/platform_thread.h deleted file mode 100644 index d74aec28..00000000 --- a/WebRtc.NET/include/webrtc/base/platform_thread.h +++ /dev/null @@ -1,112 +0,0 @@ -/* - * Copyright (c) 2015 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_BASE_PLATFORM_THREAD_H_ -#define WEBRTC_BASE_PLATFORM_THREAD_H_ - -#include - -#include "webrtc/base/constructormagic.h" -#include "webrtc/base/event.h" -#include "webrtc/base/platform_thread_types.h" -#include "webrtc/base/thread_checker.h" - -namespace rtc { - -PlatformThreadId CurrentThreadId(); -PlatformThreadRef CurrentThreadRef(); - -// Compares two thread identifiers for equality. -bool IsThreadRefEqual(const PlatformThreadRef& a, const PlatformThreadRef& b); - -// Sets the current thread name. -void SetCurrentThreadName(const char* name); - -// Callback function that the spawned thread will enter once spawned. -// A return value of false is interpreted as that the function has no -// more work to do and that the thread can be released. -typedef bool (*ThreadRunFunction)(void*); - -enum ThreadPriority { -#ifdef WEBRTC_WIN - kLowPriority = THREAD_PRIORITY_BELOW_NORMAL, - kNormalPriority = THREAD_PRIORITY_NORMAL, - kHighPriority = THREAD_PRIORITY_ABOVE_NORMAL, - kHighestPriority = THREAD_PRIORITY_HIGHEST, - kRealtimePriority = THREAD_PRIORITY_TIME_CRITICAL -#else - kLowPriority = 1, - kNormalPriority = 2, - kHighPriority = 3, - kHighestPriority = 4, - kRealtimePriority = 5 -#endif -}; - -// Represents a simple worker thread. The implementation must be assumed -// to be single threaded, meaning that all methods of the class, must be -// called from the same thread, including instantiation. -class PlatformThread { - public: - PlatformThread(ThreadRunFunction func, void* obj, const char* thread_name); - virtual ~PlatformThread(); - - const std::string& name() const { return name_; } - - // Spawns a thread and tries to set thread priority according to the priority - // from when CreateThread was called. - void Start(); - - bool IsRunning() const; - - // Returns an identifier for the worker thread that can be used to do - // thread checks. - PlatformThreadRef GetThreadRef() const; - - // Stops (joins) the spawned thread. - void Stop(); - - // Set the priority of the thread. Must be called when thread is running. - bool SetPriority(ThreadPriority priority); - - protected: -#if defined(WEBRTC_WIN) - // Exposed to derived classes to allow for special cases specific to Windows. - bool QueueAPC(PAPCFUNC apc_function, ULONG_PTR data); -#endif - - private: - void Run(); - - ThreadRunFunction const run_function_; - void* const obj_; - // TODO(pbos): Make sure call sites use string literals and update to a const - // char* instead of a std::string. - const std::string name_; - rtc::ThreadChecker thread_checker_; -#if defined(WEBRTC_WIN) - static DWORD WINAPI StartThread(void* param); - - bool stop_; - HANDLE thread_; - DWORD thread_id_; -#else - static void* StartThread(void* param); - - rtc::Event stop_event_; - - pthread_t thread_; -#endif // defined(WEBRTC_WIN) - RTC_DISALLOW_COPY_AND_ASSIGN(PlatformThread); -}; - -} // namespace rtc - -#endif // WEBRTC_BASE_PLATFORM_THREAD_H_ diff --git a/WebRtc.NET/include/webrtc/base/platform_thread_types.h b/WebRtc.NET/include/webrtc/base/platform_thread_types.h deleted file mode 100644 index 546fffd9..00000000 --- a/WebRtc.NET/include/webrtc/base/platform_thread_types.h +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Copyright (c) 2015 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_BASE_PLATFORM_THREAD_TYPES_H_ -#define WEBRTC_BASE_PLATFORM_THREAD_TYPES_H_ - -#if defined(WEBRTC_WIN) -#include -#include -#elif defined(WEBRTC_POSIX) -#include -#include -#endif - -namespace rtc { -#if defined(WEBRTC_WIN) -typedef DWORD PlatformThreadId; -typedef DWORD PlatformThreadRef; -#elif defined(WEBRTC_POSIX) -typedef pid_t PlatformThreadId; -typedef pthread_t PlatformThreadRef; -#endif -} // namespace rtc - -#endif // WEBRTC_BASE_PLATFORM_THREAD_TYPES_H_ diff --git a/WebRtc.NET/include/webrtc/base/proxydetect.h b/WebRtc.NET/include/webrtc/base/proxydetect.h deleted file mode 100644 index 708c332a..00000000 --- a/WebRtc.NET/include/webrtc/base/proxydetect.h +++ /dev/null @@ -1,27 +0,0 @@ -/* - * Copyright 2007 The WebRTC Project Authors. All rights reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef _PROXYDETECT_H_ -#define _PROXYDETECT_H_ - -#include "webrtc/base/proxyinfo.h" - -namespace rtc { -// Auto-detect the proxy server. Returns true if a proxy is configured, -// although hostname may be empty if the proxy is not required for -// the given URL. - -bool GetProxySettingsForUrl(const char* agent, const char* url, - rtc::ProxyInfo* proxy, - bool long_operation = false); - -} // namespace rtc - -#endif // _PROXYDETECT_H_ diff --git a/WebRtc.NET/include/webrtc/base/proxyinfo.h b/WebRtc.NET/include/webrtc/base/proxyinfo.h deleted file mode 100644 index 2251b13e..00000000 --- a/WebRtc.NET/include/webrtc/base/proxyinfo.h +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright 2004 The WebRTC Project Authors. All rights reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_BASE_PROXYINFO_H__ -#define WEBRTC_BASE_PROXYINFO_H__ - -#include -#include "webrtc/base/socketaddress.h" -#include "webrtc/base/cryptstring.h" - -namespace rtc { - -enum ProxyType { - PROXY_NONE, - PROXY_HTTPS, - PROXY_SOCKS5, - PROXY_UNKNOWN -}; -const char * ProxyToString(ProxyType proxy); - -struct ProxyInfo { - ProxyType type; - SocketAddress address; - std::string autoconfig_url; - bool autodetect; - std::string bypass_list; - std::string username; - CryptString password; - - ProxyInfo(); - ~ProxyInfo(); -}; - -} // namespace rtc - -#endif // WEBRTC_BASE_PROXYINFO_H__ diff --git a/WebRtc.NET/include/webrtc/base/race_checker.h b/WebRtc.NET/include/webrtc/base/race_checker.h deleted file mode 100644 index a6ba771f..00000000 --- a/WebRtc.NET/include/webrtc/base/race_checker.h +++ /dev/null @@ -1,78 +0,0 @@ -/* - * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_BASE_RACE_CHECKER_H_ -#define WEBRTC_BASE_RACE_CHECKER_H_ - -#include "webrtc/base/checks.h" -#include "webrtc/base/platform_thread.h" -#include "webrtc/base/thread_annotations.h" - -namespace rtc { - -namespace internal { -class RaceCheckerScope; -} // namespace internal - -// Best-effort race-checking implementation. This primitive uses no -// synchronization at all to be as-fast-as-possible in the non-racy case. -class LOCKABLE RaceChecker { - public: - friend class internal::RaceCheckerScope; - RaceChecker(); - - private: - bool Acquire() const EXCLUSIVE_LOCK_FUNCTION(); - void Release() const UNLOCK_FUNCTION(); - - // Volatile to prevent code being optimized away in Acquire()/Release(). - mutable volatile int access_count_ = 0; - mutable volatile PlatformThreadRef accessing_thread_; -}; - -namespace internal { -class SCOPED_LOCKABLE RaceCheckerScope { - public: - explicit RaceCheckerScope(const RaceChecker* race_checker) - EXCLUSIVE_LOCK_FUNCTION(race_checker); - - bool RaceDetected() const; - ~RaceCheckerScope() UNLOCK_FUNCTION(); - - private: - const RaceChecker* const race_checker_; - const bool race_check_ok_; -}; - -class SCOPED_LOCKABLE RaceCheckerScopeDoNothing { - public: - explicit RaceCheckerScopeDoNothing(const RaceChecker* race_checker) - EXCLUSIVE_LOCK_FUNCTION(race_checker) {} - - ~RaceCheckerScopeDoNothing() UNLOCK_FUNCTION() {} -}; - -} // namespace internal -} // namespace rtc - -#define RTC_CHECK_RUNS_SERIALIZED(x) \ - rtc::internal::RaceCheckerScope race_checker(x); \ - RTC_CHECK(!race_checker.RaceDetected()) - -#if RTC_DCHECK_IS_ON -#define RTC_DCHECK_RUNS_SERIALIZED(x) \ - rtc::internal::RaceCheckerScope race_checker(x); \ - RTC_DCHECK(!race_checker.RaceDetected()) -#else -#define RTC_DCHECK_RUNS_SERIALIZED(x) \ - rtc::internal::RaceCheckerScopeDoNothing race_checker(x) -#endif - -#endif // WEBRTC_BASE_RACE_CHECKER_H_ diff --git a/WebRtc.NET/include/webrtc/base/rate_limiter.h b/WebRtc.NET/include/webrtc/base/rate_limiter.h deleted file mode 100644 index 5809fc12..00000000 --- a/WebRtc.NET/include/webrtc/base/rate_limiter.h +++ /dev/null @@ -1,56 +0,0 @@ -/* - * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_BASE_RATE_LIMITER_H_ -#define WEBRTC_BASE_RATE_LIMITER_H_ - -#include - -#include "webrtc/base/constructormagic.h" -#include "webrtc/base/criticalsection.h" -#include "webrtc/base/rate_statistics.h" - -namespace webrtc { - -class Clock; - -// Class used to limit a bitrate, making sure the average does not exceed a -// maximum as measured over a sliding window. This class is thread safe; all -// methods will acquire (the same) lock befeore executing. -class RateLimiter { - public: - RateLimiter(Clock* clock, int64_t max_window_ms); - ~RateLimiter(); - - // Try to use rate to send bytes. Returns true on success and if so updates - // current rate. - bool TryUseRate(size_t packet_size_bytes); - - // Set the maximum bitrate, in bps, that this limiter allows to send. - void SetMaxRate(uint32_t max_rate_bps); - - // Set the window size over which to measure the current bitrate. - // For example, irt retransmissions, this is typically the RTT. - // Returns true on success and false if window_size_ms is out of range. - bool SetWindowSize(int64_t window_size_ms); - - private: - Clock* const clock_; - rtc::CriticalSection lock_; - RateStatistics current_rate_ GUARDED_BY(lock_); - int64_t window_size_ms_ GUARDED_BY(lock_); - uint32_t max_rate_bps_ GUARDED_BY(lock_); - - RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(RateLimiter); -}; - -} // namespace webrtc - -#endif // WEBRTC_BASE_RATE_LIMITER_H_ diff --git a/WebRtc.NET/include/webrtc/base/ratelimiter.h b/WebRtc.NET/include/webrtc/base/ratelimiter.h deleted file mode 100644 index 1423e991..00000000 --- a/WebRtc.NET/include/webrtc/base/ratelimiter.h +++ /dev/null @@ -1,62 +0,0 @@ -/* - * Copyright 2012 The WebRTC Project Authors. All rights reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_BASE_RATELIMITER_H_ -#define WEBRTC_BASE_RATELIMITER_H_ - -#include - -namespace rtc { - -// Limits the rate of use to a certain maximum quantity per period of -// time. Use, for example, for simple bandwidth throttling. -// -// It's implemented like a diet plan: You have so many calories per -// day. If you hit the limit, you can't eat any more until the next -// day. -class RateLimiter { - public: - // For example, 100kb per second. - RateLimiter(size_t max, double period) - : max_per_period_(max), - period_length_(period), - used_in_period_(0), - period_start_(0.0), - period_end_(period) { - } - virtual ~RateLimiter() {} - - // Returns true if if the desired quantity is available in the - // current period (< (max - used)). Once the given time passes the - // end of the period, used is set to zero and more use is available. - bool CanUse(size_t desired, double time); - // Increment the quantity used this period. If past the end of a - // period, a new period is started. - void Use(size_t used, double time); - - size_t used_in_period() const { - return used_in_period_; - } - - size_t max_per_period() const { - return max_per_period_; - } - - private: - size_t max_per_period_; - double period_length_; - size_t used_in_period_; - double period_start_; - double period_end_; -}; - -} // namespace rtc - -#endif // WEBRTC_BASE_RATELIMITER_H_ diff --git a/WebRtc.NET/include/webrtc/base/refcount.h b/WebRtc.NET/include/webrtc/base/refcount.h deleted file mode 100644 index 565ae495..00000000 --- a/WebRtc.NET/include/webrtc/base/refcount.h +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Copyright 2011 The WebRTC Project Authors. All rights reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ -#ifndef WEBRTC_BASE_REFCOUNT_H_ -#define WEBRTC_BASE_REFCOUNT_H_ - -#include "webrtc/base/refcountedobject.h" - -namespace rtc { - -// Reference count interface. -class RefCountInterface { - public: - virtual int AddRef() const = 0; - virtual int Release() const = 0; - - protected: - virtual ~RefCountInterface() {} -}; - -} // namespace rtc - -#endif // WEBRTC_BASE_REFCOUNT_H_ diff --git a/WebRtc.NET/include/webrtc/base/refcountedobject.h b/WebRtc.NET/include/webrtc/base/refcountedobject.h deleted file mode 100644 index 285ed36b..00000000 --- a/WebRtc.NET/include/webrtc/base/refcountedobject.h +++ /dev/null @@ -1,61 +0,0 @@ -/* - * Copyright 2016 The WebRTC Project Authors. All rights reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ -#ifndef WEBRTC_BASE_REFCOUNTEDOBJECT_H_ -#define WEBRTC_BASE_REFCOUNTEDOBJECT_H_ - -#include - -#include "webrtc/base/atomicops.h" - -namespace rtc { - -template -class RefCountedObject : public T { - public: - RefCountedObject() {} - - template - explicit RefCountedObject(P0&& p0) : T(std::forward(p0)) {} - - template - RefCountedObject(P0&& p0, P1&& p1, Args&&... args) - : T(std::forward(p0), - std::forward(p1), - std::forward(args)...) {} - - virtual int AddRef() const { return AtomicOps::Increment(&ref_count_); } - - virtual int Release() const { - int count = AtomicOps::Decrement(&ref_count_); - if (!count) { - delete this; - } - return count; - } - - // Return whether the reference count is one. If the reference count is used - // in the conventional way, a reference count of 1 implies that the current - // thread owns the reference and no other thread shares it. This call - // performs the test for a reference count of one, and performs the memory - // barrier needed for the owning thread to act on the object, knowing that it - // has exclusive access to the object. - virtual bool HasOneRef() const { - return AtomicOps::AcquireLoad(&ref_count_) == 1; - } - - protected: - virtual ~RefCountedObject() {} - - mutable volatile int ref_count_ = 0; -}; - -} // namespace rtc - -#endif // WEBRTC_BASE_REFCOUNTEDOBJECT_H_ diff --git a/WebRtc.NET/include/webrtc/base/safe_compare.h b/WebRtc.NET/include/webrtc/base/safe_compare.h deleted file mode 100644 index 39fb917a..00000000 --- a/WebRtc.NET/include/webrtc/base/safe_compare.h +++ /dev/null @@ -1,235 +0,0 @@ -/* - * Copyright 2016 The WebRTC Project Authors. All rights reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -// This file defines six functions: -// -// rtc::safe_cmp::Eq // == -// rtc::safe_cmp::Ne // != -// rtc::safe_cmp::Lt // < -// rtc::safe_cmp::Le // <= -// rtc::safe_cmp::Gt // > -// rtc::safe_cmp::Ge // >= -// -// They each accept two arguments of arbitrary types, and in almost all cases, -// they simply call the appropriate comparison operator. However, if both -// arguments are integers, they don't compare them using C++'s quirky rules, -// but instead adhere to the true mathematical definitions. It is as if the -// arguments were first converted to infinite-range signed integers, and then -// compared, although of course nothing expensive like that actually takes -// place. In practice, for signed/signed and unsigned/unsigned comparisons and -// some mixed-signed comparisons with a compile-time constant, the overhead is -// zero; in the remaining cases, it is just a few machine instructions (no -// branches). - -#ifndef WEBRTC_BASE_SAFE_COMPARE_H_ -#define WEBRTC_BASE_SAFE_COMPARE_H_ - -#include -#include - -#include -#include - -namespace rtc { -namespace safe_cmp { - -namespace safe_cmp_impl { - -template -struct LargerIntImpl : std::false_type {}; -template <> -struct LargerIntImpl : std::true_type { - using type = int16_t; -}; -template <> -struct LargerIntImpl : std::true_type { - using type = int32_t; -}; -template <> -struct LargerIntImpl : std::true_type { - using type = int64_t; -}; - -// LargerInt::value is true iff there's a signed type that's larger -// than T1 (and no larger than the larger of T2 and int*, for performance -// reasons); and if there is such a type, LargerInt::type is an alias -// for it. -template -struct LargerInt - : LargerIntImpl {}; - -template -inline typename std::make_unsigned::type MakeUnsigned(T a) { - return static_cast::type>(a); -} - -// Overload for when both T1 and T2 have the same signedness. -template ::value == - std::is_signed::value>::type* = nullptr> -inline bool Cmp(T1 a, T2 b) { - return Op::Op(a, b); -} - -// Overload for signed - unsigned comparison that can be promoted to a bigger -// signed type. -template ::value && - std::is_unsigned::value && - LargerInt::value>::type* = nullptr> -inline bool Cmp(T1 a, T2 b) { - return Op::Op(a, static_cast::type>(b)); -} - -// Overload for unsigned - signed comparison that can be promoted to a bigger -// signed type. -template ::value && - std::is_signed::value && - LargerInt::value>::type* = nullptr> -inline bool Cmp(T1 a, T2 b) { - return Op::Op(static_cast::type>(a), b); -} - -// Overload for signed - unsigned comparison that can't be promoted to a bigger -// signed type. -template ::value && - std::is_unsigned::value && - !LargerInt::value>::type* = nullptr> -inline bool Cmp(T1 a, T2 b) { - return a < 0 ? Op::Op(-1, 0) : Op::Op(safe_cmp_impl::MakeUnsigned(a), b); -} - -// Overload for unsigned - signed comparison that can't be promoted to a bigger -// signed type. -template ::value && - std::is_signed::value && - !LargerInt::value>::type* = nullptr> -inline bool Cmp(T1 a, T2 b) { - return b < 0 ? Op::Op(0, -1) : Op::Op(a, safe_cmp_impl::MakeUnsigned(b)); -} - -#define RTC_SAFECMP_MAKE_OP(name, op) \ - struct name { \ - template \ - static constexpr bool Op(T1 a, T2 b) { \ - return a op b; \ - } \ - }; -RTC_SAFECMP_MAKE_OP(EqOp, ==) -RTC_SAFECMP_MAKE_OP(NeOp, !=) -RTC_SAFECMP_MAKE_OP(LtOp, <) -RTC_SAFECMP_MAKE_OP(LeOp, <=) -RTC_SAFECMP_MAKE_OP(GtOp, >) -RTC_SAFECMP_MAKE_OP(GeOp, >=) -#undef RTC_SAFECMP_MAKE_OP - -// Determines if the given type is an enum that converts implicitly to -// an integral type. -template -struct IsIntEnum { - private: - // This overload is used if the type is an enum, and unary plus - // compiles and turns it into an integral type. - template ::value && - std::is_integral())>::value>::type* = - nullptr> - static int Test(int); - - // Otherwise, this overload is used. - template - static char Test(...); - - public: - static constexpr bool value = - std::is_same::type>(0)), - int>::value; -}; - -// Determines if the given type is integral, or an enum that -// converts implicitly to an integral type. -template -struct IsIntlike { - private: - using X = typename std::remove_reference::type; - - public: - static constexpr bool value = - std::is_integral::value || IsIntEnum::value; -}; - -namespace test_enum_intlike { - -enum E1 { e1 }; -enum { e2 }; -enum class E3 { e3 }; -struct S {}; - -static_assert(IsIntEnum::value, ""); -static_assert(IsIntEnum::value, ""); -static_assert(!IsIntEnum::value, ""); -static_assert(!IsIntEnum::value, ""); -static_assert(!IsIntEnum::value, ""); -static_assert(!IsIntEnum::value, ""); - -static_assert(IsIntlike::value, ""); -static_assert(IsIntlike::value, ""); -static_assert(!IsIntlike::value, ""); -static_assert(IsIntlike::value, ""); -static_assert(!IsIntlike::value, ""); -static_assert(!IsIntlike::value, ""); - -} // test_enum_intlike -} // namespace safe_cmp_impl - -#define RTC_SAFECMP_MAKE_FUN(name) \ - template ::value && \ - safe_cmp_impl::IsIntlike::value>::type* = nullptr> \ - inline bool name(T1 a, T2 b) { \ - /* Unary plus here turns enums into real integral types. */ \ - return safe_cmp_impl::Cmp(+a, +b); \ - } \ - template ::value || \ - !safe_cmp_impl::IsIntlike::value>::type* = nullptr> \ - inline bool name(T1&& a, T2&& b) { \ - return safe_cmp_impl::name##Op::Op(a, b); \ - } -RTC_SAFECMP_MAKE_FUN(Eq) -RTC_SAFECMP_MAKE_FUN(Ne) -RTC_SAFECMP_MAKE_FUN(Lt) -RTC_SAFECMP_MAKE_FUN(Le) -RTC_SAFECMP_MAKE_FUN(Gt) -RTC_SAFECMP_MAKE_FUN(Ge) -#undef RTC_SAFECMP_MAKE_FUN - -} // namespace safe_cmp -} // namespace rtc - -#endif // WEBRTC_BASE_SAFE_COMPARE_H_ diff --git a/WebRtc.NET/include/webrtc/base/safe_conversions.h b/WebRtc.NET/include/webrtc/base/safe_conversions.h deleted file mode 100644 index 51239bc6..00000000 --- a/WebRtc.NET/include/webrtc/base/safe_conversions.h +++ /dev/null @@ -1,70 +0,0 @@ -/* - * Copyright 2014 The WebRTC Project Authors. All rights reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -// Borrowed from Chromium's src/base/numerics/safe_conversions.h. - -#ifndef WEBRTC_BASE_SAFE_CONVERSIONS_H_ -#define WEBRTC_BASE_SAFE_CONVERSIONS_H_ - -#include - -#include "webrtc/base/checks.h" -#include "webrtc/base/safe_conversions_impl.h" - -namespace rtc { - -// Convenience function that returns true if the supplied value is in range -// for the destination type. -template -inline bool IsValueInRangeForNumericType(Src value) { - return internal::RangeCheck(value) == internal::TYPE_VALID; -} - -// checked_cast<> is analogous to static_cast<> for numeric types, -// except that it CHECKs that the specified numeric conversion will not -// overflow or underflow. NaN source will always trigger a CHECK. -template -inline Dst checked_cast(Src value) { - RTC_CHECK(IsValueInRangeForNumericType(value)); - return static_cast(value); -} - -// saturated_cast<> is analogous to static_cast<> for numeric types, except -// that the specified numeric conversion will saturate rather than overflow or -// underflow. NaN assignment to an integral will trigger a RTC_CHECK condition. -template -inline Dst saturated_cast(Src value) { - // Optimization for floating point values, which already saturate. - if (std::numeric_limits::is_iec559) - return static_cast(value); - - switch (internal::RangeCheck(value)) { - case internal::TYPE_VALID: - return static_cast(value); - - case internal::TYPE_UNDERFLOW: - return std::numeric_limits::min(); - - case internal::TYPE_OVERFLOW: - return std::numeric_limits::max(); - - // Should fail only on attempting to assign NaN to a saturated integer. - case internal::TYPE_INVALID: - FATAL(); - return std::numeric_limits::max(); - } - - FATAL(); - return static_cast(value); -} - -} // namespace rtc - -#endif // WEBRTC_BASE_SAFE_CONVERSIONS_H_ diff --git a/WebRtc.NET/include/webrtc/base/safe_conversions_impl.h b/WebRtc.NET/include/webrtc/base/safe_conversions_impl.h deleted file mode 100644 index 52e52eff..00000000 --- a/WebRtc.NET/include/webrtc/base/safe_conversions_impl.h +++ /dev/null @@ -1,188 +0,0 @@ -/* - * Copyright 2014 The WebRTC Project Authors. All rights reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -// Borrowed from Chromium's src/base/numerics/safe_conversions_impl.h. - -#ifndef WEBRTC_BASE_SAFE_CONVERSIONS_IMPL_H_ -#define WEBRTC_BASE_SAFE_CONVERSIONS_IMPL_H_ - -#include - -namespace rtc { -namespace internal { - -enum DstSign { - DST_UNSIGNED, - DST_SIGNED -}; - -enum SrcSign { - SRC_UNSIGNED, - SRC_SIGNED -}; - -enum DstRange { - OVERLAPS_RANGE, - CONTAINS_RANGE -}; - -// Helper templates to statically determine if our destination type can contain -// all values represented by the source type. - -template ::is_signed ? - DST_SIGNED : DST_UNSIGNED, - SrcSign IsSrcSigned = std::numeric_limits::is_signed ? - SRC_SIGNED : SRC_UNSIGNED> -struct StaticRangeCheck {}; - -template -struct StaticRangeCheck { - typedef std::numeric_limits DstLimits; - typedef std::numeric_limits SrcLimits; - // Compare based on max_exponent, which we must compute for integrals. - static const size_t kDstMaxExponent = DstLimits::is_iec559 ? - DstLimits::max_exponent : - (sizeof(Dst) * 8 - 1); - static const size_t kSrcMaxExponent = SrcLimits::is_iec559 ? - SrcLimits::max_exponent : - (sizeof(Src) * 8 - 1); - static const DstRange value = kDstMaxExponent >= kSrcMaxExponent ? - CONTAINS_RANGE : OVERLAPS_RANGE; -}; - -template -struct StaticRangeCheck { - static const DstRange value = sizeof(Dst) >= sizeof(Src) ? - CONTAINS_RANGE : OVERLAPS_RANGE; -}; - -template -struct StaticRangeCheck { - typedef std::numeric_limits DstLimits; - typedef std::numeric_limits SrcLimits; - // Compare based on max_exponent, which we must compute for integrals. - static const size_t kDstMaxExponent = DstLimits::is_iec559 ? - DstLimits::max_exponent : - (sizeof(Dst) * 8 - 1); - static const size_t kSrcMaxExponent = sizeof(Src) * 8; - static const DstRange value = kDstMaxExponent >= kSrcMaxExponent ? - CONTAINS_RANGE : OVERLAPS_RANGE; -}; - -template -struct StaticRangeCheck { - static const DstRange value = OVERLAPS_RANGE; -}; - - -enum RangeCheckResult { - TYPE_VALID = 0, // Value can be represented by the destination type. - TYPE_UNDERFLOW = 1, // Value would overflow. - TYPE_OVERFLOW = 2, // Value would underflow. - TYPE_INVALID = 3 // Source value is invalid (i.e. NaN). -}; - -// This macro creates a RangeCheckResult from an upper and lower bound -// check by taking advantage of the fact that only NaN can be out of range in -// both directions at once. -#define BASE_NUMERIC_RANGE_CHECK_RESULT(is_in_upper_bound, is_in_lower_bound) \ - RangeCheckResult(((is_in_upper_bound) ? 0 : TYPE_OVERFLOW) | \ - ((is_in_lower_bound) ? 0 : TYPE_UNDERFLOW)) - -template ::is_signed ? - DST_SIGNED : DST_UNSIGNED, - SrcSign IsSrcSigned = std::numeric_limits::is_signed ? - SRC_SIGNED : SRC_UNSIGNED, - DstRange IsSrcRangeContained = StaticRangeCheck::value> -struct RangeCheckImpl {}; - -// The following templates are for ranges that must be verified at runtime. We -// split it into checks based on signedness to avoid confusing casts and -// compiler warnings on signed an unsigned comparisons. - -// Dst range always contains the result: nothing to check. -template -struct RangeCheckImpl { - static RangeCheckResult Check(Src value) { - return TYPE_VALID; - } -}; - -// Signed to signed narrowing. -template -struct RangeCheckImpl { - static RangeCheckResult Check(Src value) { - typedef std::numeric_limits DstLimits; - return DstLimits::is_iec559 ? - BASE_NUMERIC_RANGE_CHECK_RESULT( - value <= static_cast(DstLimits::max()), - value >= static_cast(DstLimits::max() * -1)) : - BASE_NUMERIC_RANGE_CHECK_RESULT( - value <= static_cast(DstLimits::max()), - value >= static_cast(DstLimits::min())); - } -}; - -// Unsigned to unsigned narrowing. -template -struct RangeCheckImpl { - static RangeCheckResult Check(Src value) { - typedef std::numeric_limits DstLimits; - return BASE_NUMERIC_RANGE_CHECK_RESULT( - value <= static_cast(DstLimits::max()), true); - } -}; - -// Unsigned to signed. -template -struct RangeCheckImpl { - static RangeCheckResult Check(Src value) { - typedef std::numeric_limits DstLimits; - return sizeof(Dst) > sizeof(Src) ? TYPE_VALID : - BASE_NUMERIC_RANGE_CHECK_RESULT( - value <= static_cast(DstLimits::max()), true); - } -}; - -// Signed to unsigned. -template -struct RangeCheckImpl { - static RangeCheckResult Check(Src value) { - typedef std::numeric_limits DstLimits; - typedef std::numeric_limits SrcLimits; - // Compare based on max_exponent, which we must compute for integrals. - static const size_t kDstMaxExponent = sizeof(Dst) * 8; - static const size_t kSrcMaxExponent = SrcLimits::is_iec559 ? - SrcLimits::max_exponent : - (sizeof(Src) * 8 - 1); - return (kDstMaxExponent >= kSrcMaxExponent) ? - BASE_NUMERIC_RANGE_CHECK_RESULT(true, value >= static_cast(0)) : - BASE_NUMERIC_RANGE_CHECK_RESULT( - value <= static_cast(DstLimits::max()), - value >= static_cast(0)); - } -}; - -template -inline RangeCheckResult RangeCheck(Src value) { - static_assert(std::numeric_limits::is_specialized, - "argument must be numeric"); - static_assert(std::numeric_limits::is_specialized, - "result must be numeric"); - return RangeCheckImpl::Check(value); -} - -} // namespace internal -} // namespace rtc - -#endif // WEBRTC_BASE_SAFE_CONVERSIONS_IMPL_H_ diff --git a/WebRtc.NET/include/webrtc/base/scoped_autorelease_pool.h b/WebRtc.NET/include/webrtc/base/scoped_autorelease_pool.h deleted file mode 100644 index 808231b5..00000000 --- a/WebRtc.NET/include/webrtc/base/scoped_autorelease_pool.h +++ /dev/null @@ -1,60 +0,0 @@ -/* - * Copyright 2008 The WebRTC Project Authors. All rights reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -// Automatically initialize and and free an autoreleasepool. Never allocate -// an instance of this class using "new" - that will result in a compile-time -// error. Only use it as a stack object. -// -// Note: NSAutoreleasePool docs say that you should not normally need to -// declare an NSAutoreleasePool as a member of an object - but there's nothing -// that indicates it will be a problem, as long as the stack lifetime of the -// pool exactly matches the stack lifetime of the object. - -#ifndef WEBRTC_BASE_SCOPED_AUTORELEASE_POOL_H__ -#define WEBRTC_BASE_SCOPED_AUTORELEASE_POOL_H__ - -#if defined(WEBRTC_MAC) - -#include "webrtc/base/common.h" -#include "webrtc/base/constructormagic.h" - -// This header may be included from Obj-C files or C++ files. -#ifdef __OBJC__ -@class NSAutoreleasePool; -#else -class NSAutoreleasePool; -#endif - -namespace rtc { - -class ScopedAutoreleasePool { - public: - ScopedAutoreleasePool(); - ~ScopedAutoreleasePool(); - - private: - // Declaring private overrides of new and delete here enforces the "only use - // as a stack object" discipline. - // - // Note: new is declared as "throw()" to get around a gcc warning about new - // returning NULL, but this method will never get called and therefore will - // never actually throw any exception. - void* operator new(size_t size) throw() { return NULL; } - void operator delete (void* ptr) {} - - NSAutoreleasePool* pool_; - - RTC_DISALLOW_COPY_AND_ASSIGN(ScopedAutoreleasePool); -}; - -} // namespace rtc - -#endif // WEBRTC_MAC -#endif // WEBRTC_BASE_SCOPED_AUTORELEASE_POOL_H__ diff --git a/WebRtc.NET/include/webrtc/base/scopedptrcollection.h b/WebRtc.NET/include/webrtc/base/scopedptrcollection.h deleted file mode 100644 index a4be0356..00000000 --- a/WebRtc.NET/include/webrtc/base/scopedptrcollection.h +++ /dev/null @@ -1,61 +0,0 @@ -/* - * Copyright 2014 The WebRTC Project Authors. All rights reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -// Stores a collection of pointers that are deleted when the container is -// destructed. - -#ifndef WEBRTC_BASE_SCOPEDPTRCOLLECTION_H_ -#define WEBRTC_BASE_SCOPEDPTRCOLLECTION_H_ - -#include - -#include -#include - -#include "webrtc/base/constructormagic.h" - -namespace rtc { - -template -class ScopedPtrCollection { - public: - typedef std::vector VectorT; - - ScopedPtrCollection() { } - ~ScopedPtrCollection() { - for (typename VectorT::iterator it = collection_.begin(); - it != collection_.end(); ++it) { - delete *it; - } - } - - const VectorT& collection() const { return collection_; } - void Reserve(size_t size) { - collection_.reserve(size); - } - void PushBack(T* t) { - collection_.push_back(t); - } - - // Remove |t| from the collection without deleting it. - void Remove(T* t) { - collection_.erase(std::remove(collection_.begin(), collection_.end(), t), - collection_.end()); - } - - private: - VectorT collection_; - - RTC_DISALLOW_COPY_AND_ASSIGN(ScopedPtrCollection); -}; - -} // namespace rtc - -#endif // WEBRTC_BASE_SCOPEDPTRCOLLECTION_H_ diff --git a/WebRtc.NET/include/webrtc/base/sequenced_task_checker.h b/WebRtc.NET/include/webrtc/base/sequenced_task_checker.h deleted file mode 100644 index 4df5b542..00000000 --- a/WebRtc.NET/include/webrtc/base/sequenced_task_checker.h +++ /dev/null @@ -1,78 +0,0 @@ -/* - * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_BASE_SEQUENCED_TASK_CHECKER_H_ -#define WEBRTC_BASE_SEQUENCED_TASK_CHECKER_H_ - -// Apart from debug builds, we also enable the sequence checker in -// builds with RTC_DCHECK_IS_ON so that trybots and waterfall bots -// with this define will get the same level of checking as debug bots. -#define ENABLE_SEQUENCED_TASK_CHECKER RTC_DCHECK_IS_ON - -#include "webrtc/base/checks.h" -#include "webrtc/base/constructormagic.h" -#include "webrtc/base/thread_annotations.h" -#include "webrtc/base/sequenced_task_checker_impl.h" - -namespace rtc { - -// Do nothing implementation, for use in release mode. -// -// Note: You should almost always use the SequencedTaskChecker class to get the -// right version for your build configuration. -class SequencedTaskCheckerDoNothing { - public: - bool CalledSequentially() const { return true; } - - void Detach() {} -}; - -// SequencedTaskChecker is a helper class used to help verify that some methods -// of a class are called on the same task queue or thread. A -// SequencedTaskChecker is bound to a a task queue if the object is -// created on a task queue, or a thread otherwise. -// -// -// Example: -// class MyClass { -// public: -// void Foo() { -// RTC_DCHECK(sequence_checker_.CalledSequentially()); -// ... (do stuff) ... -// } -// -// private: -// SequencedTaskChecker sequence_checker_; -// } -// -// In Release mode, CalledOnValidThread will always return true. -#if ENABLE_SEQUENCED_TASK_CHECKER -class LOCKABLE SequencedTaskChecker : public SequencedTaskCheckerImpl {}; -#else -class LOCKABLE SequencedTaskChecker : public SequencedTaskCheckerDoNothing {}; -#endif // ENABLE_SEQUENCED_TASK_CHECKER_H_ - -namespace internal { -class SCOPED_LOCKABLE SequencedTaskCheckerScope { - public: - explicit SequencedTaskCheckerScope(const SequencedTaskChecker* checker) - EXCLUSIVE_LOCK_FUNCTION(checker); - ~SequencedTaskCheckerScope() UNLOCK_FUNCTION(); -}; - -} // namespace internal - -#define RTC_DCHECK_CALLED_SEQUENTIALLY(x) \ - rtc::internal::SequencedTaskCheckerScope checker(x) - -#undef ENABLE_SEQUENCED_TASK_CHECKER - -} // namespace rtc -#endif // WEBRTC_BASE_SEQUENCED_TASK_CHECKER_H_ diff --git a/WebRtc.NET/include/webrtc/base/sha1.h b/WebRtc.NET/include/webrtc/base/sha1.h deleted file mode 100644 index aa5a6a55..00000000 --- a/WebRtc.NET/include/webrtc/base/sha1.h +++ /dev/null @@ -1,33 +0,0 @@ -/* - * SHA-1 in C - * By Steve Reid - * 100% Public Domain - * -*/ - -// Ported to C++, Google style, under namespace rtc. - -#ifndef WEBRTC_BASE_SHA1_H_ -#define WEBRTC_BASE_SHA1_H_ - -#include -#include - -namespace rtc { - -struct SHA1_CTX { - uint32_t state[5]; - // TODO: Change bit count to uint64_t. - uint32_t count[2]; // Bit count of input. - uint8_t buffer[64]; -}; - -#define SHA1_DIGEST_SIZE 20 - -void SHA1Init(SHA1_CTX* context); -void SHA1Update(SHA1_CTX* context, const uint8_t* data, size_t len); -void SHA1Final(SHA1_CTX* context, uint8_t digest[SHA1_DIGEST_SIZE]); - -#endif // WEBRTC_BASE_SHA1_H_ - -} // namespace rtc diff --git a/WebRtc.NET/include/webrtc/base/sha1digest.h b/WebRtc.NET/include/webrtc/base/sha1digest.h deleted file mode 100644 index d321cb8a..00000000 --- a/WebRtc.NET/include/webrtc/base/sha1digest.h +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright 2012 The WebRTC Project Authors. All rights reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_BASE_SHA1DIGEST_H_ -#define WEBRTC_BASE_SHA1DIGEST_H_ - -#include "webrtc/base/messagedigest.h" -#include "webrtc/base/sha1.h" - -namespace rtc { - -// A simple wrapper for our SHA-1 implementation. -class Sha1Digest : public MessageDigest { - public: - enum { kSize = SHA1_DIGEST_SIZE }; - Sha1Digest() { - SHA1Init(&ctx_); - } - size_t Size() const override; - void Update(const void* buf, size_t len) override; - size_t Finish(void* buf, size_t len) override; - - private: - SHA1_CTX ctx_; -}; - -} // namespace rtc - -#endif // WEBRTC_BASE_SHA1DIGEST_H_ diff --git a/WebRtc.NET/include/webrtc/base/sharedexclusivelock.h b/WebRtc.NET/include/webrtc/base/sharedexclusivelock.h deleted file mode 100644 index a6ca5735..00000000 --- a/WebRtc.NET/include/webrtc/base/sharedexclusivelock.h +++ /dev/null @@ -1,75 +0,0 @@ -/* - * Copyright 2011 The WebRTC Project Authors. All rights reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_BASE_SHAREDEXCLUSIVELOCK_H_ -#define WEBRTC_BASE_SHAREDEXCLUSIVELOCK_H_ - -#include "webrtc/base/constructormagic.h" -#include "webrtc/base/criticalsection.h" -#include "webrtc/base/event.h" - -namespace rtc { - -// This class provides shared-exclusive lock. It can be used in cases like -// multiple-readers/single-writer model. -class LOCKABLE SharedExclusiveLock { - public: - SharedExclusiveLock(); - - // Locking/unlocking methods. It is encouraged to use SharedScope or - // ExclusiveScope for protection. - void LockExclusive() EXCLUSIVE_LOCK_FUNCTION(); - void UnlockExclusive() UNLOCK_FUNCTION(); - void LockShared(); - void UnlockShared(); - - private: - rtc::CriticalSection cs_exclusive_; - rtc::CriticalSection cs_shared_; - rtc::Event shared_count_is_zero_; - int shared_count_; - - RTC_DISALLOW_COPY_AND_ASSIGN(SharedExclusiveLock); -}; - -class SCOPED_LOCKABLE SharedScope { - public: - explicit SharedScope(SharedExclusiveLock* lock) SHARED_LOCK_FUNCTION(lock) - : lock_(lock) { - lock_->LockShared(); - } - - ~SharedScope() UNLOCK_FUNCTION() { lock_->UnlockShared(); } - - private: - SharedExclusiveLock* lock_; - - RTC_DISALLOW_COPY_AND_ASSIGN(SharedScope); -}; - -class SCOPED_LOCKABLE ExclusiveScope { - public: - explicit ExclusiveScope(SharedExclusiveLock* lock) - EXCLUSIVE_LOCK_FUNCTION(lock) - : lock_(lock) { - lock_->LockExclusive(); - } - - ~ExclusiveScope() UNLOCK_FUNCTION() { lock_->UnlockExclusive(); } - - private: - SharedExclusiveLock* lock_; - - RTC_DISALLOW_COPY_AND_ASSIGN(ExclusiveScope); -}; - -} // namespace rtc - -#endif // WEBRTC_BASE_SHAREDEXCLUSIVELOCK_H_ diff --git a/WebRtc.NET/include/webrtc/base/sigslot.h b/WebRtc.NET/include/webrtc/base/sigslot.h deleted file mode 100644 index a5fd5f79..00000000 --- a/WebRtc.NET/include/webrtc/base/sigslot.h +++ /dev/null @@ -1,2804 +0,0 @@ -// sigslot.h: Signal/Slot classes -// -// Written by Sarah Thompson (sarah@telergy.com) 2002. -// -// License: Public domain. You are free to use this code however you like, with the proviso that -// the author takes on no responsibility or liability for any use. -// -// QUICK DOCUMENTATION -// -// (see also the full documentation at http://sigslot.sourceforge.net/) -// -// #define switches -// SIGSLOT_PURE_ISO - Define this to force ISO C++ compliance. This also disables -// all of the thread safety support on platforms where it is -// available. -// -// SIGSLOT_USE_POSIX_THREADS - Force use of Posix threads when using a C++ compiler other than -// gcc on a platform that supports Posix threads. (When using gcc, -// this is the default - use SIGSLOT_PURE_ISO to disable this if -// necessary) -// -// SIGSLOT_DEFAULT_MT_POLICY - Where thread support is enabled, this defaults to multi_threaded_global. -// Otherwise, the default is single_threaded. #define this yourself to -// override the default. In pure ISO mode, anything other than -// single_threaded will cause a compiler error. -// -// PLATFORM NOTES -// -// Win32 - On Win32, the WEBRTC_WIN symbol must be #defined. Most mainstream -// compilers do this by default, but you may need to define it -// yourself if your build environment is less standard. This causes -// the Win32 thread support to be compiled in and used automatically. -// -// Unix/Linux/BSD, etc. - If you're using gcc, it is assumed that you have Posix threads -// available, so they are used automatically. You can override this -// (as under Windows) with the SIGSLOT_PURE_ISO switch. If you're using -// something other than gcc but still want to use Posix threads, you -// need to #define SIGSLOT_USE_POSIX_THREADS. -// -// ISO C++ - If none of the supported platforms are detected, or if -// SIGSLOT_PURE_ISO is defined, all multithreading support is turned off, -// along with any code that might cause a pure ISO C++ environment to -// complain. Before you ask, gcc -ansi -pedantic won't compile this -// library, but gcc -ansi is fine. Pedantic mode seems to throw a lot of -// errors that aren't really there. If you feel like investigating this, -// please contact the author. -// -// -// THREADING MODES -// -// single_threaded - Your program is assumed to be single threaded from the point of view -// of signal/slot usage (i.e. all objects using signals and slots are -// created and destroyed from a single thread). Behaviour if objects are -// destroyed concurrently is undefined (i.e. you'll get the occasional -// segmentation fault/memory exception). -// -// multi_threaded_global - Your program is assumed to be multi threaded. Objects using signals and -// slots can be safely created and destroyed from any thread, even when -// connections exist. In multi_threaded_global mode, this is achieved by a -// single global mutex (actually a critical section on Windows because they -// are faster). This option uses less OS resources, but results in more -// opportunities for contention, possibly resulting in more context switches -// than are strictly necessary. -// -// multi_threaded_local - Behaviour in this mode is essentially the same as multi_threaded_global, -// except that each signal, and each object that inherits has_slots, all -// have their own mutex/critical section. In practice, this means that -// mutex collisions (and hence context switches) only happen if they are -// absolutely essential. However, on some platforms, creating a lot of -// mutexes can slow down the whole OS, so use this option with care. -// -// USING THE LIBRARY -// -// See the full documentation at http://sigslot.sourceforge.net/ -// -// -// Libjingle specific: -// This file has been modified such that has_slots and signalx do not have to be -// using the same threading requirements. E.g. it is possible to connect a -// has_slots and signal0 or -// has_slots and signal0. -// If has_slots is single threaded the user must ensure that it is not trying -// to connect or disconnect to signalx concurrently or data race may occur. -// If signalx is single threaded the user must ensure that disconnect, connect -// or signal is not happening concurrently or data race may occur. - -#ifndef WEBRTC_BASE_SIGSLOT_H__ -#define WEBRTC_BASE_SIGSLOT_H__ - -#include -#include -#include - -// On our copy of sigslot.h, we set single threading as default. -#define SIGSLOT_DEFAULT_MT_POLICY single_threaded - -#if defined(SIGSLOT_PURE_ISO) || (!defined(WEBRTC_WIN) && !defined(__GNUG__) && !defined(SIGSLOT_USE_POSIX_THREADS)) -# define _SIGSLOT_SINGLE_THREADED -#elif defined(WEBRTC_WIN) -# define _SIGSLOT_HAS_WIN32_THREADS -# if !defined(WIN32_LEAN_AND_MEAN) -# define WIN32_LEAN_AND_MEAN -# endif -# include "webrtc/base/win32.h" -#elif defined(__GNUG__) || defined(SIGSLOT_USE_POSIX_THREADS) -# define _SIGSLOT_HAS_POSIX_THREADS -# include -#else -# define _SIGSLOT_SINGLE_THREADED -#endif - -#ifndef SIGSLOT_DEFAULT_MT_POLICY -# ifdef _SIGSLOT_SINGLE_THREADED -# define SIGSLOT_DEFAULT_MT_POLICY single_threaded -# else -# define SIGSLOT_DEFAULT_MT_POLICY multi_threaded_local -# endif -#endif - -// TODO: change this namespace to rtc? -namespace sigslot { - - class single_threaded - { - public: - single_threaded() - { - ; - } - - virtual ~single_threaded() {} - - virtual void lock() {} - - virtual void unlock() {} - }; - -#ifdef _SIGSLOT_HAS_WIN32_THREADS - // The multi threading policies only get compiled in if they are enabled. - class multi_threaded_global - { - public: - multi_threaded_global() - { - static bool isinitialised = false; - - if(!isinitialised) - { - InitializeCriticalSection(get_critsec()); - isinitialised = true; - } - } - - multi_threaded_global(const multi_threaded_global&) - { - ; - } - - virtual ~multi_threaded_global() - { - ; - } - - virtual void lock() - { - EnterCriticalSection(get_critsec()); - } - - virtual void unlock() - { - LeaveCriticalSection(get_critsec()); - } - - private: - CRITICAL_SECTION* get_critsec() - { - static CRITICAL_SECTION g_critsec; - return &g_critsec; - } - }; - - class multi_threaded_local - { - public: - multi_threaded_local() - { - InitializeCriticalSection(&m_critsec); - } - - multi_threaded_local(const multi_threaded_local&) - { - InitializeCriticalSection(&m_critsec); - } - - virtual ~multi_threaded_local() - { - DeleteCriticalSection(&m_critsec); - } - - virtual void lock() - { - EnterCriticalSection(&m_critsec); - } - - virtual void unlock() - { - LeaveCriticalSection(&m_critsec); - } - - private: - CRITICAL_SECTION m_critsec; - }; -#endif // _SIGSLOT_HAS_WIN32_THREADS - -#ifdef _SIGSLOT_HAS_POSIX_THREADS - // The multi threading policies only get compiled in if they are enabled. - class multi_threaded_global - { - public: - multi_threaded_global(); - multi_threaded_global(const multi_threaded_global&); - virtual ~multi_threaded_global(); - virtual void lock(); - virtual void unlock(); - - private: - pthread_mutex_t* get_mutex() - { - static pthread_mutex_t g_mutex; - return &g_mutex; - } - }; - - class multi_threaded_local - { - public: - multi_threaded_local(); - multi_threaded_local(const multi_threaded_local&); - virtual ~multi_threaded_local(); - virtual void lock(); - virtual void unlock(); - - private: - pthread_mutex_t m_mutex; - }; -#endif // _SIGSLOT_HAS_POSIX_THREADS - - template - class lock_block - { - public: - mt_policy *m_mutex; - - lock_block(mt_policy *mtx) - : m_mutex(mtx) - { - m_mutex->lock(); - } - - ~lock_block() - { - m_mutex->unlock(); - } - }; - - class has_slots_interface; - - template - class _connection_base0 - { - public: - virtual ~_connection_base0() {} - virtual has_slots_interface* getdest() const = 0; - virtual void emit() = 0; - virtual _connection_base0* clone() = 0; - virtual _connection_base0* duplicate(has_slots_interface* pnewdest) = 0; - }; - - template - class _connection_base1 - { - public: - virtual ~_connection_base1() {} - virtual has_slots_interface* getdest() const = 0; - virtual void emit(arg1_type) = 0; - virtual _connection_base1* clone() = 0; - virtual _connection_base1* duplicate(has_slots_interface* pnewdest) = 0; - }; - - template - class _connection_base2 - { - public: - virtual ~_connection_base2() {} - virtual has_slots_interface* getdest() const = 0; - virtual void emit(arg1_type, arg2_type) = 0; - virtual _connection_base2* clone() = 0; - virtual _connection_base2* duplicate(has_slots_interface* pnewdest) = 0; - }; - - template - class _connection_base3 - { - public: - virtual ~_connection_base3() {} - virtual has_slots_interface* getdest() const = 0; - virtual void emit(arg1_type, arg2_type, arg3_type) = 0; - virtual _connection_base3* clone() = 0; - virtual _connection_base3* duplicate(has_slots_interface* pnewdest) = 0; - }; - - template - class _connection_base4 - { - public: - virtual ~_connection_base4() {} - virtual has_slots_interface* getdest() const = 0; - virtual void emit(arg1_type, arg2_type, arg3_type, arg4_type) = 0; - virtual _connection_base4* clone() = 0; - virtual _connection_base4* duplicate(has_slots_interface* pnewdest) = 0; - }; - - template - class _connection_base5 - { - public: - virtual ~_connection_base5() {} - virtual has_slots_interface* getdest() const = 0; - virtual void emit(arg1_type, arg2_type, arg3_type, arg4_type, - arg5_type) = 0; - virtual _connection_base5* clone() = 0; - virtual _connection_base5* duplicate(has_slots_interface* pnewdest) = 0; - }; - - template - class _connection_base6 - { - public: - virtual ~_connection_base6() {} - virtual has_slots_interface* getdest() const = 0; - virtual void emit(arg1_type, arg2_type, arg3_type, arg4_type, arg5_type, - arg6_type) = 0; - virtual _connection_base6* clone() = 0; - virtual _connection_base6* duplicate(has_slots_interface* pnewdest) = 0; - }; - - template - class _connection_base7 - { - public: - virtual ~_connection_base7() {} - virtual has_slots_interface* getdest() const = 0; - virtual void emit(arg1_type, arg2_type, arg3_type, arg4_type, arg5_type, - arg6_type, arg7_type) = 0; - virtual _connection_base7* clone() = 0; - virtual _connection_base7* duplicate(has_slots_interface* pnewdest) = 0; - }; - - template - class _connection_base8 - { - public: - virtual ~_connection_base8() {} - virtual has_slots_interface* getdest() const = 0; - virtual void emit(arg1_type, arg2_type, arg3_type, arg4_type, arg5_type, - arg6_type, arg7_type, arg8_type) = 0; - virtual _connection_base8* clone() = 0; - virtual _connection_base8* duplicate(has_slots_interface* pnewdest) = 0; - }; - - class _signal_base_interface - { - public: - virtual ~_signal_base_interface() {} - virtual void slot_disconnect(has_slots_interface* pslot) = 0; - virtual void slot_duplicate(const has_slots_interface* poldslot, has_slots_interface* pnewslot) = 0; - }; - - template - class _signal_base : public _signal_base_interface, public mt_policy - { - }; - - class has_slots_interface - { - public: - has_slots_interface() - { - ; - } - - virtual void signal_connect(_signal_base_interface* sender) = 0; - - virtual void signal_disconnect(_signal_base_interface* sender) = 0; - - virtual ~has_slots_interface() - { - } - - virtual void disconnect_all() = 0; - }; - - template - class has_slots : public has_slots_interface, public mt_policy - { - private: - typedef std::set<_signal_base_interface*> sender_set; - typedef sender_set::const_iterator const_iterator; - - public: - has_slots() - { - ; - } - - has_slots(const has_slots& hs) - { - lock_block lock(this); - const_iterator it = hs.m_senders.begin(); - const_iterator itEnd = hs.m_senders.end(); - - while(it != itEnd) - { - (*it)->slot_duplicate(&hs, this); - m_senders.insert(*it); - ++it; - } - } - - void signal_connect(_signal_base_interface* sender) - { - lock_block lock(this); - m_senders.insert(sender); - } - - void signal_disconnect(_signal_base_interface* sender) - { - lock_block lock(this); - m_senders.erase(sender); - } - - virtual ~has_slots() - { - disconnect_all(); - } - - void disconnect_all() - { - lock_block lock(this); - const_iterator it = m_senders.begin(); - const_iterator itEnd = m_senders.end(); - - while(it != itEnd) - { - (*it)->slot_disconnect(this); - ++it; - } - - m_senders.erase(m_senders.begin(), m_senders.end()); - } - - private: - sender_set m_senders; - }; - - template - class _signal_base0 : public _signal_base - { - public: - typedef std::list<_connection_base0 *> connections_list; - - _signal_base0() - { - ; - } - - _signal_base0(const _signal_base0& s) - : _signal_base(s) - { - lock_block lock(this); - typename connections_list::const_iterator it = s.m_connected_slots.begin(); - typename connections_list::const_iterator itEnd = s.m_connected_slots.end(); - - while(it != itEnd) - { - (*it)->getdest()->signal_connect(this); - m_connected_slots.push_back((*it)->clone()); - - ++it; - } - } - - ~_signal_base0() - { - disconnect_all(); - } - - bool is_empty() - { - lock_block lock(this); - typename connections_list::const_iterator it = m_connected_slots.begin(); - typename connections_list::const_iterator itEnd = m_connected_slots.end(); - return it == itEnd; - } - - void disconnect_all() - { - lock_block lock(this); - typename connections_list::const_iterator it = m_connected_slots.begin(); - typename connections_list::const_iterator itEnd = m_connected_slots.end(); - - while(it != itEnd) - { - (*it)->getdest()->signal_disconnect(this); - delete *it; - - ++it; - } - - m_connected_slots.erase(m_connected_slots.begin(), m_connected_slots.end()); - } - -#if !defined(NDEBUG) - bool connected(has_slots_interface* pclass) - { - lock_block lock(this); - typename connections_list::const_iterator itNext, it = m_connected_slots.begin(); - typename connections_list::const_iterator itEnd = m_connected_slots.end(); - while(it != itEnd) - { - itNext = it; - ++itNext; - if ((*it)->getdest() == pclass) - return true; - it = itNext; - } - return false; - } -#endif - - void disconnect(has_slots_interface* pclass) - { - lock_block lock(this); - typename connections_list::iterator it = m_connected_slots.begin(); - typename connections_list::iterator itEnd = m_connected_slots.end(); - - while(it != itEnd) - { - if((*it)->getdest() == pclass) - { - delete *it; - m_connected_slots.erase(it); - pclass->signal_disconnect(this); - return; - } - - ++it; - } - } - - void slot_disconnect(has_slots_interface* pslot) - { - lock_block lock(this); - typename connections_list::iterator it = m_connected_slots.begin(); - typename connections_list::iterator itEnd = m_connected_slots.end(); - - while(it != itEnd) - { - typename connections_list::iterator itNext = it; - ++itNext; - - if((*it)->getdest() == pslot) - { - delete *it; - m_connected_slots.erase(it); - } - - it = itNext; - } - } - - void slot_duplicate(const has_slots_interface* oldtarget, has_slots_interface* newtarget) - { - lock_block lock(this); - typename connections_list::iterator it = m_connected_slots.begin(); - typename connections_list::iterator itEnd = m_connected_slots.end(); - - while(it != itEnd) - { - if((*it)->getdest() == oldtarget) - { - m_connected_slots.push_back((*it)->duplicate(newtarget)); - } - - ++it; - } - } - - protected: - connections_list m_connected_slots; - }; - - template - class _signal_base1 : public _signal_base - { - public: - typedef std::list<_connection_base1 *> connections_list; - - _signal_base1() - { - ; - } - - _signal_base1(const _signal_base1& s) - : _signal_base(s) - { - lock_block lock(this); - typename connections_list::const_iterator it = s.m_connected_slots.begin(); - typename connections_list::const_iterator itEnd = s.m_connected_slots.end(); - - while(it != itEnd) - { - (*it)->getdest()->signal_connect(this); - m_connected_slots.push_back((*it)->clone()); - - ++it; - } - } - - void slot_duplicate(const has_slots_interface* oldtarget, has_slots_interface* newtarget) - { - lock_block lock(this); - typename connections_list::iterator it = m_connected_slots.begin(); - typename connections_list::iterator itEnd = m_connected_slots.end(); - - while(it != itEnd) - { - if((*it)->getdest() == oldtarget) - { - m_connected_slots.push_back((*it)->duplicate(newtarget)); - } - - ++it; - } - } - - ~_signal_base1() - { - disconnect_all(); - } - - bool is_empty() - { - lock_block lock(this); - typename connections_list::const_iterator it = m_connected_slots.begin(); - typename connections_list::const_iterator itEnd = m_connected_slots.end(); - return it == itEnd; - } - - void disconnect_all() - { - lock_block lock(this); - typename connections_list::const_iterator it = m_connected_slots.begin(); - typename connections_list::const_iterator itEnd = m_connected_slots.end(); - - while(it != itEnd) - { - (*it)->getdest()->signal_disconnect(this); - delete *it; - - ++it; - } - - m_connected_slots.erase(m_connected_slots.begin(), m_connected_slots.end()); - } - -#if !defined(NDEBUG) - bool connected(has_slots_interface* pclass) - { - lock_block lock(this); - typename connections_list::const_iterator itNext, it = m_connected_slots.begin(); - typename connections_list::const_iterator itEnd = m_connected_slots.end(); - while(it != itEnd) - { - itNext = it; - ++itNext; - if ((*it)->getdest() == pclass) - return true; - it = itNext; - } - return false; - } -#endif - - void disconnect(has_slots_interface* pclass) - { - lock_block lock(this); - typename connections_list::iterator it = m_connected_slots.begin(); - typename connections_list::iterator itEnd = m_connected_slots.end(); - - while(it != itEnd) - { - if((*it)->getdest() == pclass) - { - delete *it; - m_connected_slots.erase(it); - pclass->signal_disconnect(this); - return; - } - - ++it; - } - } - - void slot_disconnect(has_slots_interface* pslot) - { - lock_block lock(this); - typename connections_list::iterator it = m_connected_slots.begin(); - typename connections_list::iterator itEnd = m_connected_slots.end(); - - while(it != itEnd) - { - typename connections_list::iterator itNext = it; - ++itNext; - - if((*it)->getdest() == pslot) - { - delete *it; - m_connected_slots.erase(it); - } - - it = itNext; - } - } - - - protected: - connections_list m_connected_slots; - }; - - template - class _signal_base2 : public _signal_base - { - public: - typedef std::list<_connection_base2 *> - connections_list; - - _signal_base2() - { - ; - } - - _signal_base2(const _signal_base2& s) - : _signal_base(s) - { - lock_block lock(this); - typename connections_list::const_iterator it = s.m_connected_slots.begin(); - typename connections_list::const_iterator itEnd = s.m_connected_slots.end(); - - while(it != itEnd) - { - (*it)->getdest()->signal_connect(this); - m_connected_slots.push_back((*it)->clone()); - - ++it; - } - } - - void slot_duplicate(const has_slots_interface* oldtarget, has_slots_interface* newtarget) - { - lock_block lock(this); - typename connections_list::iterator it = m_connected_slots.begin(); - typename connections_list::iterator itEnd = m_connected_slots.end(); - - while(it != itEnd) - { - if((*it)->getdest() == oldtarget) - { - m_connected_slots.push_back((*it)->duplicate(newtarget)); - } - - ++it; - } - } - - ~_signal_base2() - { - disconnect_all(); - } - - bool is_empty() - { - lock_block lock(this); - typename connections_list::const_iterator it = m_connected_slots.begin(); - typename connections_list::const_iterator itEnd = m_connected_slots.end(); - return it == itEnd; - } - - void disconnect_all() - { - lock_block lock(this); - typename connections_list::const_iterator it = m_connected_slots.begin(); - typename connections_list::const_iterator itEnd = m_connected_slots.end(); - - while(it != itEnd) - { - (*it)->getdest()->signal_disconnect(this); - delete *it; - - ++it; - } - - m_connected_slots.erase(m_connected_slots.begin(), m_connected_slots.end()); - } - -#if !defined(NDEBUG) - bool connected(has_slots_interface* pclass) - { - lock_block lock(this); - typename connections_list::const_iterator itNext, it = m_connected_slots.begin(); - typename connections_list::const_iterator itEnd = m_connected_slots.end(); - while(it != itEnd) - { - itNext = it; - ++itNext; - if ((*it)->getdest() == pclass) - return true; - it = itNext; - } - return false; - } -#endif - - void disconnect(has_slots_interface* pclass) - { - lock_block lock(this); - typename connections_list::iterator it = m_connected_slots.begin(); - typename connections_list::iterator itEnd = m_connected_slots.end(); - - while(it != itEnd) - { - if((*it)->getdest() == pclass) - { - delete *it; - m_connected_slots.erase(it); - pclass->signal_disconnect(this); - return; - } - - ++it; - } - } - - void slot_disconnect(has_slots_interface* pslot) - { - lock_block lock(this); - typename connections_list::iterator it = m_connected_slots.begin(); - typename connections_list::iterator itEnd = m_connected_slots.end(); - - while(it != itEnd) - { - typename connections_list::iterator itNext = it; - ++itNext; - - if((*it)->getdest() == pslot) - { - delete *it; - m_connected_slots.erase(it); - } - - it = itNext; - } - } - - protected: - connections_list m_connected_slots; - }; - - template - class _signal_base3 : public _signal_base - { - public: - typedef std::list<_connection_base3 *> - connections_list; - - _signal_base3() - { - ; - } - - _signal_base3(const _signal_base3& s) - : _signal_base(s) - { - lock_block lock(this); - typename connections_list::const_iterator it = s.m_connected_slots.begin(); - typename connections_list::const_iterator itEnd = s.m_connected_slots.end(); - - while(it != itEnd) - { - (*it)->getdest()->signal_connect(this); - m_connected_slots.push_back((*it)->clone()); - - ++it; - } - } - - void slot_duplicate(const has_slots_interface* oldtarget, has_slots_interface* newtarget) - { - lock_block lock(this); - typename connections_list::iterator it = m_connected_slots.begin(); - typename connections_list::iterator itEnd = m_connected_slots.end(); - - while(it != itEnd) - { - if((*it)->getdest() == oldtarget) - { - m_connected_slots.push_back((*it)->duplicate(newtarget)); - } - - ++it; - } - } - - ~_signal_base3() - { - disconnect_all(); - } - - bool is_empty() - { - lock_block lock(this); - typename connections_list::const_iterator it = m_connected_slots.begin(); - typename connections_list::const_iterator itEnd = m_connected_slots.end(); - return it == itEnd; - } - - void disconnect_all() - { - lock_block lock(this); - typename connections_list::const_iterator it = m_connected_slots.begin(); - typename connections_list::const_iterator itEnd = m_connected_slots.end(); - - while(it != itEnd) - { - (*it)->getdest()->signal_disconnect(this); - delete *it; - - ++it; - } - - m_connected_slots.erase(m_connected_slots.begin(), m_connected_slots.end()); - } - -#if !defined(NDEBUG) - bool connected(has_slots_interface* pclass) - { - lock_block lock(this); - typename connections_list::const_iterator itNext, it = m_connected_slots.begin(); - typename connections_list::const_iterator itEnd = m_connected_slots.end(); - while(it != itEnd) - { - itNext = it; - ++itNext; - if ((*it)->getdest() == pclass) - return true; - it = itNext; - } - return false; - } -#endif - - void disconnect(has_slots_interface* pclass) - { - lock_block lock(this); - typename connections_list::iterator it = m_connected_slots.begin(); - typename connections_list::iterator itEnd = m_connected_slots.end(); - - while(it != itEnd) - { - if((*it)->getdest() == pclass) - { - delete *it; - m_connected_slots.erase(it); - pclass->signal_disconnect(this); - return; - } - - ++it; - } - } - - void slot_disconnect(has_slots_interface* pslot) - { - lock_block lock(this); - typename connections_list::iterator it = m_connected_slots.begin(); - typename connections_list::iterator itEnd = m_connected_slots.end(); - - while(it != itEnd) - { - typename connections_list::iterator itNext = it; - ++itNext; - - if((*it)->getdest() == pslot) - { - delete *it; - m_connected_slots.erase(it); - } - - it = itNext; - } - } - - protected: - connections_list m_connected_slots; - }; - - template - class _signal_base4 : public _signal_base - { - public: - typedef std::list<_connection_base4 *> connections_list; - - _signal_base4() - { - ; - } - - _signal_base4(const _signal_base4& s) - : _signal_base(s) - { - lock_block lock(this); - typename connections_list::const_iterator it = s.m_connected_slots.begin(); - typename connections_list::const_iterator itEnd = s.m_connected_slots.end(); - - while(it != itEnd) - { - (*it)->getdest()->signal_connect(this); - m_connected_slots.push_back((*it)->clone()); - - ++it; - } - } - - void slot_duplicate(const has_slots_interface* oldtarget, has_slots_interface* newtarget) - { - lock_block lock(this); - typename connections_list::iterator it = m_connected_slots.begin(); - typename connections_list::iterator itEnd = m_connected_slots.end(); - - while(it != itEnd) - { - if((*it)->getdest() == oldtarget) - { - m_connected_slots.push_back((*it)->duplicate(newtarget)); - } - - ++it; - } - } - - ~_signal_base4() - { - disconnect_all(); - } - - bool is_empty() - { - lock_block lock(this); - typename connections_list::const_iterator it = m_connected_slots.begin(); - typename connections_list::const_iterator itEnd = m_connected_slots.end(); - return it == itEnd; - } - - void disconnect_all() - { - lock_block lock(this); - typename connections_list::const_iterator it = m_connected_slots.begin(); - typename connections_list::const_iterator itEnd = m_connected_slots.end(); - - while(it != itEnd) - { - (*it)->getdest()->signal_disconnect(this); - delete *it; - - ++it; - } - - m_connected_slots.erase(m_connected_slots.begin(), m_connected_slots.end()); - } - -#if !defined(NDEBUG) - bool connected(has_slots_interface* pclass) - { - lock_block lock(this); - typename connections_list::const_iterator itNext, it = m_connected_slots.begin(); - typename connections_list::const_iterator itEnd = m_connected_slots.end(); - while(it != itEnd) - { - itNext = it; - ++itNext; - if ((*it)->getdest() == pclass) - return true; - it = itNext; - } - return false; - } -#endif - - void disconnect(has_slots_interface* pclass) - { - lock_block lock(this); - typename connections_list::iterator it = m_connected_slots.begin(); - typename connections_list::iterator itEnd = m_connected_slots.end(); - - while(it != itEnd) - { - if((*it)->getdest() == pclass) - { - delete *it; - m_connected_slots.erase(it); - pclass->signal_disconnect(this); - return; - } - - ++it; - } - } - - void slot_disconnect(has_slots_interface* pslot) - { - lock_block lock(this); - typename connections_list::iterator it = m_connected_slots.begin(); - typename connections_list::iterator itEnd = m_connected_slots.end(); - - while(it != itEnd) - { - typename connections_list::iterator itNext = it; - ++itNext; - - if((*it)->getdest() == pslot) - { - delete *it; - m_connected_slots.erase(it); - } - - it = itNext; - } - } - - protected: - connections_list m_connected_slots; - }; - - template - class _signal_base5 : public _signal_base - { - public: - typedef std::list<_connection_base5 *> connections_list; - - _signal_base5() - { - ; - } - - _signal_base5(const _signal_base5& s) - : _signal_base(s) - { - lock_block lock(this); - typename connections_list::const_iterator it = s.m_connected_slots.begin(); - typename connections_list::const_iterator itEnd = s.m_connected_slots.end(); - - while(it != itEnd) - { - (*it)->getdest()->signal_connect(this); - m_connected_slots.push_back((*it)->clone()); - - ++it; - } - } - - void slot_duplicate(const has_slots_interface* oldtarget, has_slots_interface* newtarget) - { - lock_block lock(this); - typename connections_list::iterator it = m_connected_slots.begin(); - typename connections_list::iterator itEnd = m_connected_slots.end(); - - while(it != itEnd) - { - if((*it)->getdest() == oldtarget) - { - m_connected_slots.push_back((*it)->duplicate(newtarget)); - } - - ++it; - } - } - - ~_signal_base5() - { - disconnect_all(); - } - - bool is_empty() - { - lock_block lock(this); - typename connections_list::const_iterator it = m_connected_slots.begin(); - typename connections_list::const_iterator itEnd = m_connected_slots.end(); - return it == itEnd; - } - - void disconnect_all() - { - lock_block lock(this); - typename connections_list::const_iterator it = m_connected_slots.begin(); - typename connections_list::const_iterator itEnd = m_connected_slots.end(); - - while(it != itEnd) - { - (*it)->getdest()->signal_disconnect(this); - delete *it; - - ++it; - } - - m_connected_slots.erase(m_connected_slots.begin(), m_connected_slots.end()); - } - -#if !defined(NDEBUG) - bool connected(has_slots_interface* pclass) - { - lock_block lock(this); - typename connections_list::const_iterator itNext, it = m_connected_slots.begin(); - typename connections_list::const_iterator itEnd = m_connected_slots.end(); - while(it != itEnd) - { - itNext = it; - ++itNext; - if ((*it)->getdest() == pclass) - return true; - it = itNext; - } - return false; - } -#endif - - void disconnect(has_slots_interface* pclass) - { - lock_block lock(this); - typename connections_list::iterator it = m_connected_slots.begin(); - typename connections_list::iterator itEnd = m_connected_slots.end(); - - while(it != itEnd) - { - if((*it)->getdest() == pclass) - { - delete *it; - m_connected_slots.erase(it); - pclass->signal_disconnect(this); - return; - } - - ++it; - } - } - - void slot_disconnect(has_slots_interface* pslot) - { - lock_block lock(this); - typename connections_list::iterator it = m_connected_slots.begin(); - typename connections_list::iterator itEnd = m_connected_slots.end(); - - while(it != itEnd) - { - typename connections_list::iterator itNext = it; - ++itNext; - - if((*it)->getdest() == pslot) - { - delete *it; - m_connected_slots.erase(it); - } - - it = itNext; - } - } - - protected: - connections_list m_connected_slots; - }; - - template - class _signal_base6 : public _signal_base - { - public: - typedef std::list<_connection_base6 *> connections_list; - - _signal_base6() - { - ; - } - - _signal_base6(const _signal_base6& s) - : _signal_base(s) - { - lock_block lock(this); - typename connections_list::const_iterator it = s.m_connected_slots.begin(); - typename connections_list::const_iterator itEnd = s.m_connected_slots.end(); - - while(it != itEnd) - { - (*it)->getdest()->signal_connect(this); - m_connected_slots.push_back((*it)->clone()); - - ++it; - } - } - - void slot_duplicate(const has_slots_interface* oldtarget, has_slots_interface* newtarget) - { - lock_block lock(this); - typename connections_list::iterator it = m_connected_slots.begin(); - typename connections_list::iterator itEnd = m_connected_slots.end(); - - while(it != itEnd) - { - if((*it)->getdest() == oldtarget) - { - m_connected_slots.push_back((*it)->duplicate(newtarget)); - } - - ++it; - } - } - - ~_signal_base6() - { - disconnect_all(); - } - - bool is_empty() - { - lock_block lock(this); - typename connections_list::const_iterator it = m_connected_slots.begin(); - typename connections_list::const_iterator itEnd = m_connected_slots.end(); - return it == itEnd; - } - - void disconnect_all() - { - lock_block lock(this); - typename connections_list::const_iterator it = m_connected_slots.begin(); - typename connections_list::const_iterator itEnd = m_connected_slots.end(); - - while(it != itEnd) - { - (*it)->getdest()->signal_disconnect(this); - delete *it; - - ++it; - } - - m_connected_slots.erase(m_connected_slots.begin(), m_connected_slots.end()); - } - -#if !defined(NDEBUG) - bool connected(has_slots_interface* pclass) - { - lock_block lock(this); - typename connections_list::const_iterator itNext, it = m_connected_slots.begin(); - typename connections_list::const_iterator itEnd = m_connected_slots.end(); - while(it != itEnd) - { - itNext = it; - ++itNext; - if ((*it)->getdest() == pclass) - return true; - it = itNext; - } - return false; - } -#endif - - void disconnect(has_slots_interface* pclass) - { - lock_block lock(this); - typename connections_list::iterator it = m_connected_slots.begin(); - typename connections_list::iterator itEnd = m_connected_slots.end(); - - while(it != itEnd) - { - if((*it)->getdest() == pclass) - { - delete *it; - m_connected_slots.erase(it); - pclass->signal_disconnect(this); - return; - } - - ++it; - } - } - - void slot_disconnect(has_slots_interface* pslot) - { - lock_block lock(this); - typename connections_list::iterator it = m_connected_slots.begin(); - typename connections_list::iterator itEnd = m_connected_slots.end(); - - while(it != itEnd) - { - typename connections_list::iterator itNext = it; - ++itNext; - - if((*it)->getdest() == pslot) - { - delete *it; - m_connected_slots.erase(it); - } - - it = itNext; - } - } - - protected: - connections_list m_connected_slots; - }; - - template - class _signal_base7 : public _signal_base - { - public: - typedef std::list<_connection_base7 *> connections_list; - - _signal_base7() - { - ; - } - - _signal_base7(const _signal_base7& s) - : _signal_base(s) - { - lock_block lock(this); - typename connections_list::const_iterator it = s.m_connected_slots.begin(); - typename connections_list::const_iterator itEnd = s.m_connected_slots.end(); - - while(it != itEnd) - { - (*it)->getdest()->signal_connect(this); - m_connected_slots.push_back((*it)->clone()); - - ++it; - } - } - - void slot_duplicate(const has_slots_interface* oldtarget, has_slots_interface* newtarget) - { - lock_block lock(this); - typename connections_list::iterator it = m_connected_slots.begin(); - typename connections_list::iterator itEnd = m_connected_slots.end(); - - while(it != itEnd) - { - if((*it)->getdest() == oldtarget) - { - m_connected_slots.push_back((*it)->duplicate(newtarget)); - } - - ++it; - } - } - - ~_signal_base7() - { - disconnect_all(); - } - - bool is_empty() - { - lock_block lock(this); - typename connections_list::const_iterator it = m_connected_slots.begin(); - typename connections_list::const_iterator itEnd = m_connected_slots.end(); - return it == itEnd; - } - - void disconnect_all() - { - lock_block lock(this); - typename connections_list::const_iterator it = m_connected_slots.begin(); - typename connections_list::const_iterator itEnd = m_connected_slots.end(); - - while(it != itEnd) - { - (*it)->getdest()->signal_disconnect(this); - delete *it; - - ++it; - } - - m_connected_slots.erase(m_connected_slots.begin(), m_connected_slots.end()); - } - -#if !defined(NDEBUG) - bool connected(has_slots_interface* pclass) - { - lock_block lock(this); - typename connections_list::const_iterator itNext, it = m_connected_slots.begin(); - typename connections_list::const_iterator itEnd = m_connected_slots.end(); - while(it != itEnd) - { - itNext = it; - ++itNext; - if ((*it)->getdest() == pclass) - return true; - it = itNext; - } - return false; - } -#endif - - void disconnect(has_slots_interface* pclass) - { - lock_block lock(this); - typename connections_list::iterator it = m_connected_slots.begin(); - typename connections_list::iterator itEnd = m_connected_slots.end(); - - while(it != itEnd) - { - if((*it)->getdest() == pclass) - { - delete *it; - m_connected_slots.erase(it); - pclass->signal_disconnect(this); - return; - } - - ++it; - } - } - - void slot_disconnect(has_slots_interface* pslot) - { - lock_block lock(this); - typename connections_list::iterator it = m_connected_slots.begin(); - typename connections_list::iterator itEnd = m_connected_slots.end(); - - while(it != itEnd) - { - typename connections_list::iterator itNext = it; - ++itNext; - - if((*it)->getdest() == pslot) - { - delete *it; - m_connected_slots.erase(it); - } - - it = itNext; - } - } - - protected: - connections_list m_connected_slots; - }; - - template - class _signal_base8 : public _signal_base - { - public: - typedef std::list<_connection_base8 *> - connections_list; - - _signal_base8() - { - ; - } - - _signal_base8(const _signal_base8& s) - : _signal_base(s) - { - lock_block lock(this); - typename connections_list::const_iterator it = s.m_connected_slots.begin(); - typename connections_list::const_iterator itEnd = s.m_connected_slots.end(); - - while(it != itEnd) - { - (*it)->getdest()->signal_connect(this); - m_connected_slots.push_back((*it)->clone()); - - ++it; - } - } - - void slot_duplicate(const has_slots_interface* oldtarget, has_slots_interface* newtarget) - { - lock_block lock(this); - typename connections_list::iterator it = m_connected_slots.begin(); - typename connections_list::iterator itEnd = m_connected_slots.end(); - - while(it != itEnd) - { - if((*it)->getdest() == oldtarget) - { - m_connected_slots.push_back((*it)->duplicate(newtarget)); - } - - ++it; - } - } - - ~_signal_base8() - { - disconnect_all(); - } - - bool is_empty() - { - lock_block lock(this); - typename connections_list::const_iterator it = m_connected_slots.begin(); - typename connections_list::const_iterator itEnd = m_connected_slots.end(); - return it == itEnd; - } - - void disconnect_all() - { - lock_block lock(this); - typename connections_list::const_iterator it = m_connected_slots.begin(); - typename connections_list::const_iterator itEnd = m_connected_slots.end(); - - while(it != itEnd) - { - (*it)->getdest()->signal_disconnect(this); - delete *it; - - ++it; - } - - m_connected_slots.erase(m_connected_slots.begin(), m_connected_slots.end()); - } - -#if !defined(NDEBUG) - bool connected(has_slots_interface* pclass) - { - lock_block lock(this); - typename connections_list::const_iterator itNext, it = m_connected_slots.begin(); - typename connections_list::const_iterator itEnd = m_connected_slots.end(); - while(it != itEnd) - { - itNext = it; - ++itNext; - if ((*it)->getdest() == pclass) - return true; - it = itNext; - } - return false; - } -#endif - - void disconnect(has_slots_interface* pclass) - { - lock_block lock(this); - typename connections_list::iterator it = m_connected_slots.begin(); - typename connections_list::iterator itEnd = m_connected_slots.end(); - - while(it != itEnd) - { - if((*it)->getdest() == pclass) - { - delete *it; - m_connected_slots.erase(it); - pclass->signal_disconnect(this); - return; - } - - ++it; - } - } - - void slot_disconnect(has_slots_interface* pslot) - { - lock_block lock(this); - typename connections_list::iterator it = m_connected_slots.begin(); - typename connections_list::iterator itEnd = m_connected_slots.end(); - - while(it != itEnd) - { - typename connections_list::iterator itNext = it; - ++itNext; - - if((*it)->getdest() == pslot) - { - delete *it; - m_connected_slots.erase(it); - } - - it = itNext; - } - } - - protected: - connections_list m_connected_slots; - }; - - - template - class _connection0 : public _connection_base0 - { - public: - _connection0() - { - m_pobject = NULL; - m_pmemfun = NULL; - } - - _connection0(dest_type* pobject, void (dest_type::*pmemfun)()) - { - m_pobject = pobject; - m_pmemfun = pmemfun; - } - - virtual ~_connection0() - { - } - - virtual _connection_base0* clone() - { - return new _connection0(*this); - } - - virtual _connection_base0* duplicate(has_slots_interface* pnewdest) - { - return new _connection0((dest_type *)pnewdest, m_pmemfun); - } - - virtual void emit() - { - (m_pobject->*m_pmemfun)(); - } - - virtual has_slots_interface* getdest() const - { - return m_pobject; - } - - private: - dest_type* m_pobject; - void (dest_type::* m_pmemfun)(); - }; - - template - class _connection1 : public _connection_base1 - { - public: - _connection1() - { - m_pobject = NULL; - m_pmemfun = NULL; - } - - _connection1(dest_type* pobject, void (dest_type::*pmemfun)(arg1_type)) - { - m_pobject = pobject; - m_pmemfun = pmemfun; - } - - virtual ~_connection1() - { - } - - virtual _connection_base1* clone() - { - return new _connection1(*this); - } - - virtual _connection_base1* duplicate(has_slots_interface* pnewdest) - { - return new _connection1((dest_type *)pnewdest, m_pmemfun); - } - - virtual void emit(arg1_type a1) - { - (m_pobject->*m_pmemfun)(a1); - } - - virtual has_slots_interface* getdest() const - { - return m_pobject; - } - - private: - dest_type* m_pobject; - void (dest_type::* m_pmemfun)(arg1_type); - }; - - template - class _connection2 : public _connection_base2 - { - public: - _connection2() - { - m_pobject = NULL; - m_pmemfun = NULL; - } - - _connection2(dest_type* pobject, void (dest_type::*pmemfun)(arg1_type, - arg2_type)) - { - m_pobject = pobject; - m_pmemfun = pmemfun; - } - - virtual ~_connection2() - { - } - - virtual _connection_base2* clone() - { - return new _connection2(*this); - } - - virtual _connection_base2* duplicate(has_slots_interface* pnewdest) - { - return new _connection2((dest_type *)pnewdest, m_pmemfun); - } - - virtual void emit(arg1_type a1, arg2_type a2) - { - (m_pobject->*m_pmemfun)(a1, a2); - } - - virtual has_slots_interface* getdest() const - { - return m_pobject; - } - - private: - dest_type* m_pobject; - void (dest_type::* m_pmemfun)(arg1_type, arg2_type); - }; - - template - class _connection3 : public _connection_base3 - { - public: - _connection3() - { - m_pobject = NULL; - m_pmemfun = NULL; - } - - _connection3(dest_type* pobject, void (dest_type::*pmemfun)(arg1_type, - arg2_type, arg3_type)) - { - m_pobject = pobject; - m_pmemfun = pmemfun; - } - - virtual ~_connection3() - { - } - - virtual _connection_base3* clone() - { - return new _connection3(*this); - } - - virtual _connection_base3* duplicate(has_slots_interface* pnewdest) - { - return new _connection3((dest_type *)pnewdest, m_pmemfun); - } - - virtual void emit(arg1_type a1, arg2_type a2, arg3_type a3) - { - (m_pobject->*m_pmemfun)(a1, a2, a3); - } - - virtual has_slots_interface* getdest() const - { - return m_pobject; - } - - private: - dest_type* m_pobject; - void (dest_type::* m_pmemfun)(arg1_type, arg2_type, arg3_type); - }; - - template - class _connection4 : public _connection_base4 - { - public: - _connection4() - { - m_pobject = NULL; - m_pmemfun = NULL; - } - - _connection4(dest_type* pobject, void (dest_type::*pmemfun)(arg1_type, - arg2_type, arg3_type, arg4_type)) - { - m_pobject = pobject; - m_pmemfun = pmemfun; - } - - virtual ~_connection4() - { - } - - virtual _connection_base4* clone() - { - return new _connection4(*this); - } - - virtual _connection_base4* duplicate(has_slots_interface* pnewdest) - { - return new _connection4((dest_type *)pnewdest, m_pmemfun); - } - - virtual void emit(arg1_type a1, arg2_type a2, arg3_type a3, - arg4_type a4) - { - (m_pobject->*m_pmemfun)(a1, a2, a3, a4); - } - - virtual has_slots_interface* getdest() const - { - return m_pobject; - } - - private: - dest_type* m_pobject; - void (dest_type::* m_pmemfun)(arg1_type, arg2_type, arg3_type, - arg4_type); - }; - - template - class _connection5 : public _connection_base5 - { - public: - _connection5() - { - m_pobject = NULL; - m_pmemfun = NULL; - } - - _connection5(dest_type* pobject, void (dest_type::*pmemfun)(arg1_type, - arg2_type, arg3_type, arg4_type, arg5_type)) - { - m_pobject = pobject; - m_pmemfun = pmemfun; - } - - virtual ~_connection5() - { - } - - virtual _connection_base5* clone() - { - return new _connection5(*this); - } - - virtual _connection_base5* duplicate(has_slots_interface* pnewdest) - { - return new _connection5((dest_type *)pnewdest, m_pmemfun); - } - - virtual void emit(arg1_type a1, arg2_type a2, arg3_type a3, arg4_type a4, - arg5_type a5) - { - (m_pobject->*m_pmemfun)(a1, a2, a3, a4, a5); - } - - virtual has_slots_interface* getdest() const - { - return m_pobject; - } - - private: - dest_type* m_pobject; - void (dest_type::* m_pmemfun)(arg1_type, arg2_type, arg3_type, arg4_type, - arg5_type); - }; - - template - class _connection6 : public _connection_base6 - { - public: - _connection6() - { - m_pobject = NULL; - m_pmemfun = NULL; - } - - _connection6(dest_type* pobject, void (dest_type::*pmemfun)(arg1_type, - arg2_type, arg3_type, arg4_type, arg5_type, arg6_type)) - { - m_pobject = pobject; - m_pmemfun = pmemfun; - } - - virtual ~_connection6() - { - } - - virtual _connection_base6* clone() - { - return new _connection6(*this); - } - - virtual _connection_base6* duplicate(has_slots_interface* pnewdest) - { - return new _connection6((dest_type *)pnewdest, m_pmemfun); - } - - virtual void emit(arg1_type a1, arg2_type a2, arg3_type a3, arg4_type a4, - arg5_type a5, arg6_type a6) - { - (m_pobject->*m_pmemfun)(a1, a2, a3, a4, a5, a6); - } - - virtual has_slots_interface* getdest() const - { - return m_pobject; - } - - private: - dest_type* m_pobject; - void (dest_type::* m_pmemfun)(arg1_type, arg2_type, arg3_type, arg4_type, - arg5_type, arg6_type); - }; - - template - class _connection7 : public _connection_base7 - { - public: - _connection7() - { - m_pobject = NULL; - m_pmemfun = NULL; - } - - _connection7(dest_type* pobject, void (dest_type::*pmemfun)(arg1_type, - arg2_type, arg3_type, arg4_type, arg5_type, arg6_type, arg7_type)) - { - m_pobject = pobject; - m_pmemfun = pmemfun; - } - - virtual ~_connection7() - { - } - - virtual _connection_base7* clone() - { - return new _connection7(*this); - } - - virtual _connection_base7* duplicate(has_slots_interface* pnewdest) - { - return new _connection7((dest_type *)pnewdest, m_pmemfun); - } - - virtual void emit(arg1_type a1, arg2_type a2, arg3_type a3, arg4_type a4, - arg5_type a5, arg6_type a6, arg7_type a7) - { - (m_pobject->*m_pmemfun)(a1, a2, a3, a4, a5, a6, a7); - } - - virtual has_slots_interface* getdest() const - { - return m_pobject; - } - - private: - dest_type* m_pobject; - void (dest_type::* m_pmemfun)(arg1_type, arg2_type, arg3_type, arg4_type, - arg5_type, arg6_type, arg7_type); - }; - - template - class _connection8 : public _connection_base8 - { - public: - _connection8() - { - m_pobject = NULL; - m_pmemfun = NULL; - } - - _connection8(dest_type* pobject, void (dest_type::*pmemfun)(arg1_type, - arg2_type, arg3_type, arg4_type, arg5_type, arg6_type, - arg7_type, arg8_type)) - { - m_pobject = pobject; - m_pmemfun = pmemfun; - } - - virtual ~_connection8() - { - } - - virtual _connection_base8* clone() - { - return new _connection8(*this); - } - - virtual _connection_base8* duplicate(has_slots_interface* pnewdest) - { - return new _connection8((dest_type *)pnewdest, m_pmemfun); - } - - virtual void emit(arg1_type a1, arg2_type a2, arg3_type a3, arg4_type a4, - arg5_type a5, arg6_type a6, arg7_type a7, arg8_type a8) - { - (m_pobject->*m_pmemfun)(a1, a2, a3, a4, a5, a6, a7, a8); - } - - virtual has_slots_interface* getdest() const - { - return m_pobject; - } - - private: - dest_type* m_pobject; - void (dest_type::* m_pmemfun)(arg1_type, arg2_type, arg3_type, arg4_type, - arg5_type, arg6_type, arg7_type, arg8_type); - }; - - template - class signal0 : public _signal_base0 - { - public: - typedef _signal_base0 base; - typedef typename base::connections_list connections_list; - using base::m_connected_slots; - - signal0() - { - ; - } - - signal0(const signal0& s) - : _signal_base0(s) - { - ; - } - - template - void connect(desttype* pclass, void (desttype::*pmemfun)()) - { - lock_block lock(this); - _connection0* conn = - new _connection0(pclass, pmemfun); - m_connected_slots.push_back(conn); - pclass->signal_connect(this); - } - - void emit() - { - lock_block lock(this); - typename connections_list::const_iterator itNext, it = m_connected_slots.begin(); - typename connections_list::const_iterator itEnd = m_connected_slots.end(); - - while(it != itEnd) - { - itNext = it; - ++itNext; - - (*it)->emit(); - - it = itNext; - } - } - - void operator()() - { - lock_block lock(this); - typename connections_list::const_iterator itNext, it = m_connected_slots.begin(); - typename connections_list::const_iterator itEnd = m_connected_slots.end(); - - while(it != itEnd) - { - itNext = it; - ++itNext; - - (*it)->emit(); - - it = itNext; - } - } - }; - - template - class signal1 : public _signal_base1 - { - public: - typedef _signal_base1 base; - typedef typename base::connections_list connections_list; - using base::m_connected_slots; - - signal1() - { - ; - } - - signal1(const signal1& s) - : _signal_base1(s) - { - ; - } - - template - void connect(desttype* pclass, void (desttype::*pmemfun)(arg1_type)) - { - lock_block lock(this); - _connection1* conn = - new _connection1(pclass, pmemfun); - m_connected_slots.push_back(conn); - pclass->signal_connect(this); - } - - void emit(arg1_type a1) - { - lock_block lock(this); - typename connections_list::const_iterator itNext, it = m_connected_slots.begin(); - typename connections_list::const_iterator itEnd = m_connected_slots.end(); - - while(it != itEnd) - { - itNext = it; - ++itNext; - - (*it)->emit(a1); - - it = itNext; - } - } - - void operator()(arg1_type a1) - { - lock_block lock(this); - typename connections_list::const_iterator itNext, it = m_connected_slots.begin(); - typename connections_list::const_iterator itEnd = m_connected_slots.end(); - - while(it != itEnd) - { - itNext = it; - ++itNext; - - (*it)->emit(a1); - - it = itNext; - } - } - }; - - template - class signal2 : public _signal_base2 - { - public: - typedef _signal_base2 base; - typedef typename base::connections_list connections_list; - using base::m_connected_slots; - - signal2() - { - ; - } - - signal2(const signal2& s) - : _signal_base2(s) - { - ; - } - - template - void connect(desttype* pclass, void (desttype::*pmemfun)(arg1_type, - arg2_type)) - { - lock_block lock(this); - _connection2* conn = new - _connection2(pclass, pmemfun); - m_connected_slots.push_back(conn); - pclass->signal_connect(this); - } - - void emit(arg1_type a1, arg2_type a2) - { - lock_block lock(this); - typename connections_list::const_iterator itNext, it = m_connected_slots.begin(); - typename connections_list::const_iterator itEnd = m_connected_slots.end(); - - while(it != itEnd) - { - itNext = it; - ++itNext; - - (*it)->emit(a1, a2); - - it = itNext; - } - } - - void operator()(arg1_type a1, arg2_type a2) - { - lock_block lock(this); - typename connections_list::const_iterator itNext, it = m_connected_slots.begin(); - typename connections_list::const_iterator itEnd = m_connected_slots.end(); - - while(it != itEnd) - { - itNext = it; - ++itNext; - - (*it)->emit(a1, a2); - - it = itNext; - } - } - }; - - template - class signal3 : public _signal_base3 - { - public: - typedef _signal_base3 base; - typedef typename base::connections_list connections_list; - using base::m_connected_slots; - - signal3() - { - ; - } - - signal3(const signal3& s) - : _signal_base3(s) - { - ; - } - - template - void connect(desttype* pclass, void (desttype::*pmemfun)(arg1_type, - arg2_type, arg3_type)) - { - lock_block lock(this); - _connection3* conn = - new _connection3(pclass, - pmemfun); - m_connected_slots.push_back(conn); - pclass->signal_connect(this); - } - - void emit(arg1_type a1, arg2_type a2, arg3_type a3) - { - lock_block lock(this); - typename connections_list::const_iterator itNext, it = m_connected_slots.begin(); - typename connections_list::const_iterator itEnd = m_connected_slots.end(); - - while(it != itEnd) - { - itNext = it; - ++itNext; - - (*it)->emit(a1, a2, a3); - - it = itNext; - } - } - - void operator()(arg1_type a1, arg2_type a2, arg3_type a3) - { - lock_block lock(this); - typename connections_list::const_iterator itNext, it = m_connected_slots.begin(); - typename connections_list::const_iterator itEnd = m_connected_slots.end(); - - while(it != itEnd) - { - itNext = it; - ++itNext; - - (*it)->emit(a1, a2, a3); - - it = itNext; - } - } - }; - - template - class signal4 : public _signal_base4 - { - public: - typedef _signal_base4 base; - typedef typename base::connections_list connections_list; - using base::m_connected_slots; - - signal4() - { - ; - } - - signal4(const signal4& s) - : _signal_base4(s) - { - ; - } - - template - void connect(desttype* pclass, void (desttype::*pmemfun)(arg1_type, - arg2_type, arg3_type, arg4_type)) - { - lock_block lock(this); - _connection4* - conn = new _connection4(pclass, pmemfun); - m_connected_slots.push_back(conn); - pclass->signal_connect(this); - } - - void emit(arg1_type a1, arg2_type a2, arg3_type a3, arg4_type a4) - { - lock_block lock(this); - typename connections_list::const_iterator itNext, it = m_connected_slots.begin(); - typename connections_list::const_iterator itEnd = m_connected_slots.end(); - - while(it != itEnd) - { - itNext = it; - ++itNext; - - (*it)->emit(a1, a2, a3, a4); - - it = itNext; - } - } - - void operator()(arg1_type a1, arg2_type a2, arg3_type a3, arg4_type a4) - { - lock_block lock(this); - typename connections_list::const_iterator itNext, it = m_connected_slots.begin(); - typename connections_list::const_iterator itEnd = m_connected_slots.end(); - - while(it != itEnd) - { - itNext = it; - ++itNext; - - (*it)->emit(a1, a2, a3, a4); - - it = itNext; - } - } - }; - - template - class signal5 : public _signal_base5 - { - public: - typedef _signal_base5 base; - typedef typename base::connections_list connections_list; - using base::m_connected_slots; - - signal5() - { - ; - } - - signal5(const signal5& s) - : _signal_base5(s) - { - ; - } - - template - void connect(desttype* pclass, void (desttype::*pmemfun)(arg1_type, - arg2_type, arg3_type, arg4_type, arg5_type)) - { - lock_block lock(this); - _connection5* conn = new _connection5(pclass, pmemfun); - m_connected_slots.push_back(conn); - pclass->signal_connect(this); - } - - void emit(arg1_type a1, arg2_type a2, arg3_type a3, arg4_type a4, - arg5_type a5) - { - lock_block lock(this); - typename connections_list::const_iterator itNext, it = m_connected_slots.begin(); - typename connections_list::const_iterator itEnd = m_connected_slots.end(); - - while(it != itEnd) - { - itNext = it; - ++itNext; - - (*it)->emit(a1, a2, a3, a4, a5); - - it = itNext; - } - } - - void operator()(arg1_type a1, arg2_type a2, arg3_type a3, arg4_type a4, - arg5_type a5) - { - lock_block lock(this); - typename connections_list::const_iterator itNext, it = m_connected_slots.begin(); - typename connections_list::const_iterator itEnd = m_connected_slots.end(); - - while(it != itEnd) - { - itNext = it; - ++itNext; - - (*it)->emit(a1, a2, a3, a4, a5); - - it = itNext; - } - } - }; - - - template - class signal6 : public _signal_base6 - { - public: - typedef _signal_base6 base; - typedef typename base::connections_list connections_list; - using base::m_connected_slots; - - signal6() - { - ; - } - - signal6(const signal6& s) - : _signal_base6(s) - { - ; - } - - template - void connect(desttype* pclass, void (desttype::*pmemfun)(arg1_type, - arg2_type, arg3_type, arg4_type, arg5_type, arg6_type)) - { - lock_block lock(this); - _connection6* conn = - new _connection6(pclass, pmemfun); - m_connected_slots.push_back(conn); - pclass->signal_connect(this); - } - - void emit(arg1_type a1, arg2_type a2, arg3_type a3, arg4_type a4, - arg5_type a5, arg6_type a6) - { - lock_block lock(this); - typename connections_list::const_iterator itNext, it = m_connected_slots.begin(); - typename connections_list::const_iterator itEnd = m_connected_slots.end(); - - while(it != itEnd) - { - itNext = it; - ++itNext; - - (*it)->emit(a1, a2, a3, a4, a5, a6); - - it = itNext; - } - } - - void operator()(arg1_type a1, arg2_type a2, arg3_type a3, arg4_type a4, - arg5_type a5, arg6_type a6) - { - lock_block lock(this); - typename connections_list::const_iterator itNext, it = m_connected_slots.begin(); - typename connections_list::const_iterator itEnd = m_connected_slots.end(); - - while(it != itEnd) - { - itNext = it; - ++itNext; - - (*it)->emit(a1, a2, a3, a4, a5, a6); - - it = itNext; - } - } - }; - - template - class signal7 : public _signal_base7 - { - public: - typedef _signal_base7 base; - typedef typename base::connections_list connections_list; - using base::m_connected_slots; - - signal7() - { - ; - } - - signal7(const signal7& s) - : _signal_base7(s) - { - ; - } - - template - void connect(desttype* pclass, void (desttype::*pmemfun)(arg1_type, - arg2_type, arg3_type, arg4_type, arg5_type, arg6_type, - arg7_type)) - { - lock_block lock(this); - _connection7* conn = - new _connection7(pclass, pmemfun); - m_connected_slots.push_back(conn); - pclass->signal_connect(this); - } - - void emit(arg1_type a1, arg2_type a2, arg3_type a3, arg4_type a4, - arg5_type a5, arg6_type a6, arg7_type a7) - { - lock_block lock(this); - typename connections_list::const_iterator itNext, it = m_connected_slots.begin(); - typename connections_list::const_iterator itEnd = m_connected_slots.end(); - - while(it != itEnd) - { - itNext = it; - ++itNext; - - (*it)->emit(a1, a2, a3, a4, a5, a6, a7); - - it = itNext; - } - } - - void operator()(arg1_type a1, arg2_type a2, arg3_type a3, arg4_type a4, - arg5_type a5, arg6_type a6, arg7_type a7) - { - lock_block lock(this); - typename connections_list::const_iterator itNext, it = m_connected_slots.begin(); - typename connections_list::const_iterator itEnd = m_connected_slots.end(); - - while(it != itEnd) - { - itNext = it; - ++itNext; - - (*it)->emit(a1, a2, a3, a4, a5, a6, a7); - - it = itNext; - } - } - }; - - template - class signal8 : public _signal_base8 - { - public: - typedef _signal_base8 base; - typedef typename base::connections_list connections_list; - using base::m_connected_slots; - - signal8() - { - ; - } - - signal8(const signal8& s) - : _signal_base8(s) - { - ; - } - - template - void connect(desttype* pclass, void (desttype::*pmemfun)(arg1_type, - arg2_type, arg3_type, arg4_type, arg5_type, arg6_type, - arg7_type, arg8_type)) - { - lock_block lock(this); - _connection8* conn = - new _connection8(pclass, pmemfun); - m_connected_slots.push_back(conn); - pclass->signal_connect(this); - } - - void emit(arg1_type a1, arg2_type a2, arg3_type a3, arg4_type a4, - arg5_type a5, arg6_type a6, arg7_type a7, arg8_type a8) - { - lock_block lock(this); - typename connections_list::const_iterator itNext, it = m_connected_slots.begin(); - typename connections_list::const_iterator itEnd = m_connected_slots.end(); - - while(it != itEnd) - { - itNext = it; - ++itNext; - - (*it)->emit(a1, a2, a3, a4, a5, a6, a7, a8); - - it = itNext; - } - } - - void operator()(arg1_type a1, arg2_type a2, arg3_type a3, arg4_type a4, - arg5_type a5, arg6_type a6, arg7_type a7, arg8_type a8) - { - lock_block lock(this); - typename connections_list::const_iterator itNext, it = m_connected_slots.begin(); - typename connections_list::const_iterator itEnd = m_connected_slots.end(); - - while(it != itEnd) - { - itNext = it; - ++itNext; - - (*it)->emit(a1, a2, a3, a4, a5, a6, a7, a8); - - it = itNext; - } - } - }; - -}; // namespace sigslot - -#endif // WEBRTC_BASE_SIGSLOT_H__ diff --git a/WebRtc.NET/include/webrtc/base/sigslotrepeater.h b/WebRtc.NET/include/webrtc/base/sigslotrepeater.h deleted file mode 100644 index d1c891e0..00000000 --- a/WebRtc.NET/include/webrtc/base/sigslotrepeater.h +++ /dev/null @@ -1,94 +0,0 @@ -/* - * Copyright 2006 The WebRTC Project Authors. All rights reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_BASE_SIGSLOTREPEATER_H__ -#define WEBRTC_BASE_SIGSLOTREPEATER_H__ - -// repeaters are both signals and slots, which are designed as intermediate -// pass-throughs for signals and slots which don't know about each other (for -// modularity or encapsulation). This eliminates the need to declare a signal -// handler whose sole purpose is to fire another signal. The repeater connects -// to the originating signal using the 'repeat' method. When the repeated -// signal fires, the repeater will also fire. - -#include "webrtc/base/sigslot.h" - -namespace sigslot { - - template - class repeater0 : public signal0, - public has_slots - { - public: - typedef signal0 base_type; - typedef repeater0 this_type; - - repeater0() { } - repeater0(const this_type& s) : base_type(s) { } - - void reemit() { signal0::emit(); } - void repeat(base_type &s) { s.connect(this, &this_type::reemit); } - void stop(base_type &s) { s.disconnect(this); } - }; - - template - class repeater1 : public signal1, - public has_slots - { - public: - typedef signal1 base_type; - typedef repeater1 this_type; - - repeater1() { } - repeater1(const this_type& s) : base_type(s) { } - - void reemit(arg1_type a1) { signal1::emit(a1); } - void repeat(base_type& s) { s.connect(this, &this_type::reemit); } - void stop(base_type &s) { s.disconnect(this); } - }; - - template - class repeater2 : public signal2, - public has_slots - { - public: - typedef signal2 base_type; - typedef repeater2 this_type; - - repeater2() { } - repeater2(const this_type& s) : base_type(s) { } - - void reemit(arg1_type a1, arg2_type a2) { signal2::emit(a1,a2); } - void repeat(base_type& s) { s.connect(this, &this_type::reemit); } - void stop(base_type &s) { s.disconnect(this); } - }; - - template - class repeater3 : public signal3, - public has_slots - { - public: - typedef signal3 base_type; - typedef repeater3 this_type; - - repeater3() { } - repeater3(const this_type& s) : base_type(s) { } - - void reemit(arg1_type a1, arg2_type a2, arg3_type a3) { - signal3::emit(a1,a2,a3); - } - void repeat(base_type& s) { s.connect(this, &this_type::reemit); } - void stop(base_type &s) { s.disconnect(this); } - }; - -} // namespace sigslot - -#endif // WEBRTC_BASE_SIGSLOTREPEATER_H__ diff --git a/WebRtc.NET/include/webrtc/base/socket.h b/WebRtc.NET/include/webrtc/base/socket.h deleted file mode 100644 index 73dfdbb8..00000000 --- a/WebRtc.NET/include/webrtc/base/socket.h +++ /dev/null @@ -1,202 +0,0 @@ -/* - * Copyright 2004 The WebRTC Project Authors. All rights reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_BASE_SOCKET_H__ -#define WEBRTC_BASE_SOCKET_H__ - -#include - -#if defined(WEBRTC_POSIX) -#include -#include -#include -#include -#define SOCKET_EACCES EACCES -#endif - -#if defined(WEBRTC_WIN) -#include "webrtc/base/win32.h" -#endif - -#include "webrtc/base/basictypes.h" -#include "webrtc/base/constructormagic.h" -#include "webrtc/base/socketaddress.h" - -// Rather than converting errors into a private namespace, -// Reuse the POSIX socket api errors. Note this depends on -// Win32 compatibility. - -#if defined(WEBRTC_WIN) -#undef EWOULDBLOCK // Remove errno.h's definition for each macro below. -#define EWOULDBLOCK WSAEWOULDBLOCK -#undef EINPROGRESS -#define EINPROGRESS WSAEINPROGRESS -#undef EALREADY -#define EALREADY WSAEALREADY -#undef ENOTSOCK -#define ENOTSOCK WSAENOTSOCK -#undef EDESTADDRREQ -#define EDESTADDRREQ WSAEDESTADDRREQ -#undef EMSGSIZE -#define EMSGSIZE WSAEMSGSIZE -#undef EPROTOTYPE -#define EPROTOTYPE WSAEPROTOTYPE -#undef ENOPROTOOPT -#define ENOPROTOOPT WSAENOPROTOOPT -#undef EPROTONOSUPPORT -#define EPROTONOSUPPORT WSAEPROTONOSUPPORT -#undef ESOCKTNOSUPPORT -#define ESOCKTNOSUPPORT WSAESOCKTNOSUPPORT -#undef EOPNOTSUPP -#define EOPNOTSUPP WSAEOPNOTSUPP -#undef EPFNOSUPPORT -#define EPFNOSUPPORT WSAEPFNOSUPPORT -#undef EAFNOSUPPORT -#define EAFNOSUPPORT WSAEAFNOSUPPORT -#undef EADDRINUSE -#define EADDRINUSE WSAEADDRINUSE -#undef EADDRNOTAVAIL -#define EADDRNOTAVAIL WSAEADDRNOTAVAIL -#undef ENETDOWN -#define ENETDOWN WSAENETDOWN -#undef ENETUNREACH -#define ENETUNREACH WSAENETUNREACH -#undef ENETRESET -#define ENETRESET WSAENETRESET -#undef ECONNABORTED -#define ECONNABORTED WSAECONNABORTED -#undef ECONNRESET -#define ECONNRESET WSAECONNRESET -#undef ENOBUFS -#define ENOBUFS WSAENOBUFS -#undef EISCONN -#define EISCONN WSAEISCONN -#undef ENOTCONN -#define ENOTCONN WSAENOTCONN -#undef ESHUTDOWN -#define ESHUTDOWN WSAESHUTDOWN -#undef ETOOMANYREFS -#define ETOOMANYREFS WSAETOOMANYREFS -#undef ETIMEDOUT -#define ETIMEDOUT WSAETIMEDOUT -#undef ECONNREFUSED -#define ECONNREFUSED WSAECONNREFUSED -#undef ELOOP -#define ELOOP WSAELOOP -#undef ENAMETOOLONG -#define ENAMETOOLONG WSAENAMETOOLONG -#undef EHOSTDOWN -#define EHOSTDOWN WSAEHOSTDOWN -#undef EHOSTUNREACH -#define EHOSTUNREACH WSAEHOSTUNREACH -#undef ENOTEMPTY -#define ENOTEMPTY WSAENOTEMPTY -#undef EPROCLIM -#define EPROCLIM WSAEPROCLIM -#undef EUSERS -#define EUSERS WSAEUSERS -#undef EDQUOT -#define EDQUOT WSAEDQUOT -#undef ESTALE -#define ESTALE WSAESTALE -#undef EREMOTE -#define EREMOTE WSAEREMOTE -#undef EACCES -#define SOCKET_EACCES WSAEACCES -#endif // WEBRTC_WIN - -#if defined(WEBRTC_POSIX) -#define INVALID_SOCKET (-1) -#define SOCKET_ERROR (-1) -#define closesocket(s) close(s) -#endif // WEBRTC_POSIX - -namespace rtc { - -inline bool IsBlockingError(int e) { - return (e == EWOULDBLOCK) || (e == EAGAIN) || (e == EINPROGRESS); -} - -struct SentPacket { - SentPacket() : packet_id(-1), send_time_ms(-1) {} - SentPacket(int packet_id, int64_t send_time_ms) - : packet_id(packet_id), send_time_ms(send_time_ms) {} - - int packet_id; - int64_t send_time_ms; -}; - -// General interface for the socket implementations of various networks. The -// methods match those of normal UNIX sockets very closely. -class Socket { - public: - virtual ~Socket() {} - - // Returns the address to which the socket is bound. If the socket is not - // bound, then the any-address is returned. - virtual SocketAddress GetLocalAddress() const = 0; - - // Returns the address to which the socket is connected. If the socket is - // not connected, then the any-address is returned. - virtual SocketAddress GetRemoteAddress() const = 0; - - virtual int Bind(const SocketAddress& addr) = 0; - virtual int Connect(const SocketAddress& addr) = 0; - virtual int Send(const void *pv, size_t cb) = 0; - virtual int SendTo(const void *pv, size_t cb, const SocketAddress& addr) = 0; - // |timestamp| is in units of microseconds. - virtual int Recv(void* pv, size_t cb, int64_t* timestamp) = 0; - virtual int RecvFrom(void* pv, - size_t cb, - SocketAddress* paddr, - int64_t* timestamp) = 0; - virtual int Listen(int backlog) = 0; - virtual Socket *Accept(SocketAddress *paddr) = 0; - virtual int Close() = 0; - virtual int GetError() const = 0; - virtual void SetError(int error) = 0; - inline bool IsBlocking() const { return IsBlockingError(GetError()); } - - enum ConnState { - CS_CLOSED, - CS_CONNECTING, - CS_CONNECTED - }; - virtual ConnState GetState() const = 0; - - // Fills in the given uint16_t with the current estimate of the MTU along the - // path to the address to which this socket is connected. NOTE: This method - // can block for up to 10 seconds on Windows. - virtual int EstimateMTU(uint16_t* mtu) = 0; - - enum Option { - OPT_DONTFRAGMENT, - OPT_RCVBUF, // receive buffer size - OPT_SNDBUF, // send buffer size - OPT_NODELAY, // whether Nagle algorithm is enabled - OPT_IPV6_V6ONLY, // Whether the socket is IPv6 only. - OPT_DSCP, // DSCP code - OPT_RTP_SENDTIME_EXTN_ID, // This is a non-traditional socket option param. - // This is specific to libjingle and will be used - // if SendTime option is needed at socket level. - }; - virtual int GetOption(Option opt, int* value) = 0; - virtual int SetOption(Option opt, int value) = 0; - - protected: - Socket() {} - - private: - RTC_DISALLOW_COPY_AND_ASSIGN(Socket); -}; - -} // namespace rtc - -#endif // WEBRTC_BASE_SOCKET_H__ diff --git a/WebRtc.NET/include/webrtc/base/socketadapters.h b/WebRtc.NET/include/webrtc/base/socketadapters.h deleted file mode 100644 index 02f6bca3..00000000 --- a/WebRtc.NET/include/webrtc/base/socketadapters.h +++ /dev/null @@ -1,250 +0,0 @@ -/* - * Copyright 2004 The WebRTC Project Authors. All rights reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_BASE_SOCKETADAPTERS_H_ -#define WEBRTC_BASE_SOCKETADAPTERS_H_ - -#include -#include - -#include "webrtc/base/asyncsocket.h" -#include "webrtc/base/constructormagic.h" -#include "webrtc/base/cryptstring.h" -#include "webrtc/base/logging.h" - -namespace rtc { - -struct HttpAuthContext; -class ByteBufferReader; -class ByteBufferWriter; - -/////////////////////////////////////////////////////////////////////////////// - -// Implements a socket adapter that can buffer and process data internally, -// as in the case of connecting to a proxy, where you must speak the proxy -// protocol before commencing normal socket behavior. -class BufferedReadAdapter : public AsyncSocketAdapter { - public: - BufferedReadAdapter(AsyncSocket* socket, size_t buffer_size); - ~BufferedReadAdapter() override; - - int Send(const void* pv, size_t cb) override; - int Recv(void* pv, size_t cb, int64_t* timestamp) override; - - protected: - int DirectSend(const void* pv, size_t cb) { - return AsyncSocketAdapter::Send(pv, cb); - } - - void BufferInput(bool on = true); - virtual void ProcessInput(char* data, size_t* len) = 0; - - void OnReadEvent(AsyncSocket* socket) override; - - private: - char * buffer_; - size_t buffer_size_, data_len_; - bool buffering_; - RTC_DISALLOW_COPY_AND_ASSIGN(BufferedReadAdapter); -}; - -/////////////////////////////////////////////////////////////////////////////// - -// Interface for implementing proxy server sockets. -class AsyncProxyServerSocket : public BufferedReadAdapter { - public: - AsyncProxyServerSocket(AsyncSocket* socket, size_t buffer_size); - ~AsyncProxyServerSocket() override; - sigslot::signal2 SignalConnectRequest; - virtual void SendConnectResult(int err, const SocketAddress& addr) = 0; -}; - -/////////////////////////////////////////////////////////////////////////////// - -// Implements a socket adapter that performs the client side of a -// fake SSL handshake. Used for "ssltcp" P2P functionality. -class AsyncSSLSocket : public BufferedReadAdapter { - public: - explicit AsyncSSLSocket(AsyncSocket* socket); - - int Connect(const SocketAddress& addr) override; - - protected: - void OnConnectEvent(AsyncSocket* socket) override; - void ProcessInput(char* data, size_t* len) override; - RTC_DISALLOW_COPY_AND_ASSIGN(AsyncSSLSocket); -}; - -// Implements a socket adapter that performs the server side of a -// fake SSL handshake. Used when implementing a relay server that does "ssltcp". -class AsyncSSLServerSocket : public BufferedReadAdapter { - public: - explicit AsyncSSLServerSocket(AsyncSocket* socket); - - protected: - void ProcessInput(char* data, size_t* len) override; - RTC_DISALLOW_COPY_AND_ASSIGN(AsyncSSLServerSocket); -}; - -/////////////////////////////////////////////////////////////////////////////// - -// Implements a socket adapter that speaks the HTTP/S proxy protocol. -class AsyncHttpsProxySocket : public BufferedReadAdapter { - public: - AsyncHttpsProxySocket(AsyncSocket* socket, const std::string& user_agent, - const SocketAddress& proxy, - const std::string& username, const CryptString& password); - ~AsyncHttpsProxySocket() override; - - // If connect is forced, the adapter will always issue an HTTP CONNECT to the - // target address. Otherwise, it will connect only if the destination port - // is not port 80. - void SetForceConnect(bool force) { force_connect_ = force; } - - int Connect(const SocketAddress& addr) override; - SocketAddress GetRemoteAddress() const override; - int Close() override; - ConnState GetState() const override; - - protected: - void OnConnectEvent(AsyncSocket* socket) override; - void OnCloseEvent(AsyncSocket* socket, int err) override; - void ProcessInput(char* data, size_t* len) override; - - bool ShouldIssueConnect() const; - void SendRequest(); - void ProcessLine(char* data, size_t len); - void EndResponse(); - void Error(int error); - - private: - SocketAddress proxy_, dest_; - std::string agent_, user_, headers_; - CryptString pass_; - bool force_connect_; - size_t content_length_; - int defer_error_; - bool expect_close_; - enum ProxyState { - PS_INIT, PS_LEADER, PS_AUTHENTICATE, PS_SKIP_HEADERS, PS_ERROR_HEADERS, - PS_TUNNEL_HEADERS, PS_SKIP_BODY, PS_TUNNEL, PS_WAIT_CLOSE, PS_ERROR - } state_; - HttpAuthContext * context_; - std::string unknown_mechanisms_; - RTC_DISALLOW_COPY_AND_ASSIGN(AsyncHttpsProxySocket); -}; - -/* TODO: Implement this. -class AsyncHttpsProxyServerSocket : public AsyncProxyServerSocket { - public: - explicit AsyncHttpsProxyServerSocket(AsyncSocket* socket); - - private: - virtual void ProcessInput(char * data, size_t& len); - void Error(int error); - RTC_DISALLOW_COPY_AND_ASSIGN(AsyncHttpsProxyServerSocket); -}; -*/ - -/////////////////////////////////////////////////////////////////////////////// - -// Implements a socket adapter that speaks the SOCKS proxy protocol. -class AsyncSocksProxySocket : public BufferedReadAdapter { - public: - AsyncSocksProxySocket(AsyncSocket* socket, const SocketAddress& proxy, - const std::string& username, const CryptString& password); - ~AsyncSocksProxySocket() override; - - int Connect(const SocketAddress& addr) override; - SocketAddress GetRemoteAddress() const override; - int Close() override; - ConnState GetState() const override; - - protected: - void OnConnectEvent(AsyncSocket* socket) override; - void ProcessInput(char* data, size_t* len) override; - - void SendHello(); - void SendConnect(); - void SendAuth(); - void Error(int error); - - private: - enum State { - SS_INIT, SS_HELLO, SS_AUTH, SS_CONNECT, SS_TUNNEL, SS_ERROR - }; - State state_; - SocketAddress proxy_, dest_; - std::string user_; - CryptString pass_; - RTC_DISALLOW_COPY_AND_ASSIGN(AsyncSocksProxySocket); -}; - -// Implements a proxy server socket for the SOCKS protocol. -class AsyncSocksProxyServerSocket : public AsyncProxyServerSocket { - public: - explicit AsyncSocksProxyServerSocket(AsyncSocket* socket); - - private: - void ProcessInput(char* data, size_t* len) override; - void DirectSend(const ByteBufferWriter& buf); - - void HandleHello(ByteBufferReader* request); - void SendHelloReply(uint8_t method); - void HandleAuth(ByteBufferReader* request); - void SendAuthReply(uint8_t result); - void HandleConnect(ByteBufferReader* request); - void SendConnectResult(int result, const SocketAddress& addr) override; - - void Error(int error); - - static const int kBufferSize = 1024; - enum State { - SS_HELLO, SS_AUTH, SS_CONNECT, SS_CONNECT_PENDING, SS_TUNNEL, SS_ERROR - }; - State state_; - RTC_DISALLOW_COPY_AND_ASSIGN(AsyncSocksProxyServerSocket); -}; - -/////////////////////////////////////////////////////////////////////////////// - -// Implements a socket adapter that logs everything that it sends and receives. -class LoggingSocketAdapter : public AsyncSocketAdapter { - public: - LoggingSocketAdapter(AsyncSocket* socket, LoggingSeverity level, - const char * label, bool hex_mode = false); - - int Send(const void* pv, size_t cb) override; - int SendTo(const void* pv, size_t cb, const SocketAddress& addr) override; - int Recv(void* pv, size_t cb, int64_t* timestamp) override; - int RecvFrom(void* pv, - size_t cb, - SocketAddress* paddr, - int64_t* timestamp) override; - int Close() override; - - protected: - void OnConnectEvent(AsyncSocket* socket) override; - void OnCloseEvent(AsyncSocket* socket, int err) override; - - private: - LoggingSeverity level_; - std::string label_; - bool hex_mode_; - LogMultilineState lms_; - RTC_DISALLOW_COPY_AND_ASSIGN(LoggingSocketAdapter); -}; - -/////////////////////////////////////////////////////////////////////////////// - -} // namespace rtc - -#endif // WEBRTC_BASE_SOCKETADAPTERS_H_ diff --git a/WebRtc.NET/include/webrtc/base/socketfactory.h b/WebRtc.NET/include/webrtc/base/socketfactory.h deleted file mode 100644 index fe0f32bd..00000000 --- a/WebRtc.NET/include/webrtc/base/socketfactory.h +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright 2004 The WebRTC Project Authors. All rights reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_BASE_SOCKETFACTORY_H__ -#define WEBRTC_BASE_SOCKETFACTORY_H__ - -#include "webrtc/base/socket.h" -#include "webrtc/base/asyncsocket.h" - -namespace rtc { - -class SocketFactory { -public: - virtual ~SocketFactory() {} - - // Returns a new socket for blocking communication. The type can be - // SOCK_DGRAM and SOCK_STREAM. - // TODO: C++ inheritance rules mean that all users must have both - // CreateSocket(int) and CreateSocket(int,int). Will remove CreateSocket(int) - // (and CreateAsyncSocket(int) when all callers are changed. - virtual Socket* CreateSocket(int type) = 0; - virtual Socket* CreateSocket(int family, int type) = 0; - // Returns a new socket for nonblocking communication. The type can be - // SOCK_DGRAM and SOCK_STREAM. - virtual AsyncSocket* CreateAsyncSocket(int type) = 0; - virtual AsyncSocket* CreateAsyncSocket(int family, int type) = 0; -}; - -} // namespace rtc - -#endif // WEBRTC_BASE_SOCKETFACTORY_H__ diff --git a/WebRtc.NET/include/webrtc/base/socketpool.h b/WebRtc.NET/include/webrtc/base/socketpool.h deleted file mode 100644 index 5ceab203..00000000 --- a/WebRtc.NET/include/webrtc/base/socketpool.h +++ /dev/null @@ -1,143 +0,0 @@ -/* - * Copyright 2004 The WebRTC Project Authors. All rights reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_BASE_SOCKETPOOL_H_ -#define WEBRTC_BASE_SOCKETPOOL_H_ - -#include -#include -#include "webrtc/base/logging.h" -#include "webrtc/base/sigslot.h" -#include "webrtc/base/socketaddress.h" - -namespace rtc { - -class AsyncSocket; -class LoggingAdapter; -class SocketFactory; -class SocketStream; -class StreamInterface; - -////////////////////////////////////////////////////////////////////// -// StreamPool -////////////////////////////////////////////////////////////////////// - -class StreamPool { -public: - virtual ~StreamPool() { } - - virtual StreamInterface* RequestConnectedStream(const SocketAddress& remote, - int* err) = 0; - virtual void ReturnConnectedStream(StreamInterface* stream) = 0; -}; - -/////////////////////////////////////////////////////////////////////////////// -// StreamCache - Caches a set of open streams, defers creation/destruction to -// the supplied StreamPool. -/////////////////////////////////////////////////////////////////////////////// - -class StreamCache : public StreamPool, public sigslot::has_slots<> { -public: - StreamCache(StreamPool* pool); - ~StreamCache() override; - - // StreamPool Interface - StreamInterface* RequestConnectedStream(const SocketAddress& remote, - int* err) override; - void ReturnConnectedStream(StreamInterface* stream) override; - -private: - typedef std::pair ConnectedStream; - typedef std::list ConnectedList; - - void OnStreamEvent(StreamInterface* stream, int events, int err); - - // We delegate stream creation and deletion to this pool. - StreamPool* pool_; - // Streams that are in use (returned from RequestConnectedStream). - ConnectedList active_; - // Streams which were returned to us, but are still open. - ConnectedList cached_; -}; - -/////////////////////////////////////////////////////////////////////////////// -// NewSocketPool -// Creates a new stream on every request -/////////////////////////////////////////////////////////////////////////////// - -class NewSocketPool : public StreamPool { -public: - NewSocketPool(SocketFactory* factory); - ~NewSocketPool() override; - - // StreamPool Interface - StreamInterface* RequestConnectedStream(const SocketAddress& remote, - int* err) override; - void ReturnConnectedStream(StreamInterface* stream) override; - -private: - SocketFactory* factory_; -}; - -/////////////////////////////////////////////////////////////////////////////// -// ReuseSocketPool -// Maintains a single socket at a time, and will reuse it without closing if -// the destination address is the same. -/////////////////////////////////////////////////////////////////////////////// - -class ReuseSocketPool : public StreamPool, public sigslot::has_slots<> { -public: - ReuseSocketPool(SocketFactory* factory); - ~ReuseSocketPool() override; - - // StreamPool Interface - StreamInterface* RequestConnectedStream(const SocketAddress& remote, - int* err) override; - void ReturnConnectedStream(StreamInterface* stream) override; - -private: - void OnStreamEvent(StreamInterface* stream, int events, int err); - - SocketFactory* factory_; - SocketStream* stream_; - SocketAddress remote_; - bool checked_out_; // Whether the stream is currently checked out -}; - -/////////////////////////////////////////////////////////////////////////////// -// LoggingPoolAdapter - Adapts a StreamPool to supply streams with attached -// LoggingAdapters. -/////////////////////////////////////////////////////////////////////////////// - -class LoggingPoolAdapter : public StreamPool { -public: - LoggingPoolAdapter(StreamPool* pool, LoggingSeverity level, - const std::string& label, bool binary_mode); - ~LoggingPoolAdapter() override; - - // StreamPool Interface - StreamInterface* RequestConnectedStream(const SocketAddress& remote, - int* err) override; - void ReturnConnectedStream(StreamInterface* stream) override; - -private: - StreamPool* pool_; - LoggingSeverity level_; - std::string label_; - bool binary_mode_; - typedef std::deque StreamList; - StreamList recycle_bin_; -}; - -////////////////////////////////////////////////////////////////////// - -} // namespace rtc - -#endif // WEBRTC_BASE_SOCKETPOOL_H_ diff --git a/WebRtc.NET/include/webrtc/base/ssladapter.h b/WebRtc.NET/include/webrtc/base/ssladapter.h deleted file mode 100644 index 57e8ee9c..00000000 --- a/WebRtc.NET/include/webrtc/base/ssladapter.h +++ /dev/null @@ -1,65 +0,0 @@ -/* - * Copyright 2004 The WebRTC Project Authors. All rights reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_BASE_SSLADAPTER_H_ -#define WEBRTC_BASE_SSLADAPTER_H_ - -#include "webrtc/base/asyncsocket.h" -#include "webrtc/base/sslstreamadapter.h" - -namespace rtc { - -/////////////////////////////////////////////////////////////////////////////// - -class SSLAdapter : public AsyncSocketAdapter { - public: - explicit SSLAdapter(AsyncSocket* socket) - : AsyncSocketAdapter(socket), ignore_bad_cert_(false) { } - - bool ignore_bad_cert() const { return ignore_bad_cert_; } - void set_ignore_bad_cert(bool ignore) { ignore_bad_cert_ = ignore; } - - // Do DTLS or TLS (default is TLS, if unspecified) - virtual void SetMode(SSLMode mode) = 0; - - // StartSSL returns 0 if successful. - // If StartSSL is called while the socket is closed or connecting, the SSL - // negotiation will begin as soon as the socket connects. - virtual int StartSSL(const char* hostname, bool restartable) = 0; - - // Create the default SSL adapter for this platform. On failure, returns NULL - // and deletes |socket|. Otherwise, the returned SSLAdapter takes ownership - // of |socket|. - static SSLAdapter* Create(AsyncSocket* socket); - - private: - // If true, the server certificate need not match the configured hostname. - bool ignore_bad_cert_; -}; - -/////////////////////////////////////////////////////////////////////////////// - -typedef bool (*VerificationCallback)(void* cert); - -// Call this on the main thread, before using SSL. -// Call CleanupSSLThread when finished with SSL. -bool InitializeSSL(VerificationCallback callback = NULL); - -// Call to initialize additional threads. -bool InitializeSSLThread(); - -// Call to cleanup additional threads, and also the main thread. -bool CleanupSSL(); - -/////////////////////////////////////////////////////////////////////////////// - -} // namespace rtc - -#endif // WEBRTC_BASE_SSLADAPTER_H_ diff --git a/WebRtc.NET/include/webrtc/base/sslconfig.h b/WebRtc.NET/include/webrtc/base/sslconfig.h deleted file mode 100644 index 6aabad07..00000000 --- a/WebRtc.NET/include/webrtc/base/sslconfig.h +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright 2012 The WebRTC Project Authors. All rights reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_BASE_SSLCONFIG_H_ -#define WEBRTC_BASE_SSLCONFIG_H_ - -// If no preference has been indicated, default to SChannel on Windows and -// OpenSSL everywhere else, if it is available. -#if !defined(SSL_USE_SCHANNEL) && !defined(SSL_USE_OPENSSL) -#if defined(WEBRTC_WIN) - -#define SSL_USE_SCHANNEL 1 - -#else // defined(WEBRTC_WIN) - -#if defined(HAVE_OPENSSL_SSL_H) -#define SSL_USE_OPENSSL 1 -#endif - -#endif // !defined(WEBRTC_WIN) -#endif - -#endif // WEBRTC_BASE_SSLCONFIG_H_ diff --git a/WebRtc.NET/include/webrtc/base/sslidentity.h b/WebRtc.NET/include/webrtc/base/sslidentity.h deleted file mode 100644 index 181174b2..00000000 --- a/WebRtc.NET/include/webrtc/base/sslidentity.h +++ /dev/null @@ -1,274 +0,0 @@ -/* - * Copyright 2004 The WebRTC Project Authors. All rights reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -// Handling of certificates and keypairs for SSLStreamAdapter's peer mode. - -#ifndef WEBRTC_BASE_SSLIDENTITY_H_ -#define WEBRTC_BASE_SSLIDENTITY_H_ - -#include -#include -#include -#include - -#include "webrtc/base/buffer.h" -#include "webrtc/base/constructormagic.h" -#include "webrtc/base/messagedigest.h" -#include "webrtc/base/timeutils.h" - -namespace rtc { - -// Forward declaration due to circular dependency with SSLCertificate. -class SSLCertChain; - -struct SSLCertificateStats { - SSLCertificateStats(std::string&& fingerprint, - std::string&& fingerprint_algorithm, - std::string&& base64_certificate, - std::unique_ptr&& issuer); - ~SSLCertificateStats(); - std::string fingerprint; - std::string fingerprint_algorithm; - std::string base64_certificate; - std::unique_ptr issuer; -}; - -// Abstract interface overridden by SSL library specific -// implementations. - -// A somewhat opaque type used to encapsulate a certificate. -// Wraps the SSL library's notion of a certificate, with reference counting. -// The SSLCertificate object is pretty much immutable once created. -// (The OpenSSL implementation only does reference counting and -// possibly caching of intermediate results.) -class SSLCertificate { - public: - // Parses and builds a certificate from a PEM encoded string. - // Returns NULL on failure. - // The length of the string representation of the certificate is - // stored in *pem_length if it is non-NULL, and only if - // parsing was successful. - // Caller is responsible for freeing the returned object. - static SSLCertificate* FromPEMString(const std::string& pem_string); - virtual ~SSLCertificate() {} - - // Returns a new SSLCertificate object instance wrapping the same - // underlying certificate, including its chain if present. - // Caller is responsible for freeing the returned object. - virtual SSLCertificate* GetReference() const = 0; - - // Provides the cert chain, or null. The chain includes a copy of each - // certificate, excluding the leaf. - virtual std::unique_ptr GetChain() const = 0; - - // Returns a PEM encoded string representation of the certificate. - virtual std::string ToPEMString() const = 0; - - // Provides a DER encoded binary representation of the certificate. - virtual void ToDER(Buffer* der_buffer) const = 0; - - // Gets the name of the digest algorithm that was used to compute this - // certificate's signature. - virtual bool GetSignatureDigestAlgorithm(std::string* algorithm) const = 0; - - // Compute the digest of the certificate given algorithm - virtual bool ComputeDigest(const std::string& algorithm, - unsigned char* digest, - size_t size, - size_t* length) const = 0; - - // Returns the time in seconds relative to epoch, 1970-01-01T00:00:00Z (UTC), - // or -1 if an expiration time could not be retrieved. - virtual int64_t CertificateExpirationTime() const = 0; - - // Gets information (fingerprint, etc.) about this certificate and its chain - // (if it has a certificate chain). This is used for certificate stats, see - // https://w3c.github.io/webrtc-stats/#certificatestats-dict*. - std::unique_ptr GetStats() const; - - private: - std::unique_ptr GetStats( - std::unique_ptr issuer) const; -}; - -// SSLCertChain is a simple wrapper for a vector of SSLCertificates. It serves -// primarily to ensure proper memory management (especially deletion) of the -// SSLCertificate pointers. -class SSLCertChain { - public: - // These constructors copy the provided SSLCertificate(s), so the caller - // retains ownership. - explicit SSLCertChain(const std::vector& certs); - explicit SSLCertChain(const SSLCertificate* cert); - ~SSLCertChain(); - - // Vector access methods. - size_t GetSize() const { return certs_.size(); } - - // Returns a temporary reference, only valid until the chain is destroyed. - const SSLCertificate& Get(size_t pos) const { return *(certs_[pos]); } - - // Returns a new SSLCertChain object instance wrapping the same underlying - // certificate chain. Caller is responsible for freeing the returned object. - SSLCertChain* Copy() const { - return new SSLCertChain(certs_); - } - - private: - // Helper function for duplicating a vector of certificates. - static SSLCertificate* DupCert(const SSLCertificate* cert) { - return cert->GetReference(); - } - - // Helper function for deleting a vector of certificates. - static void DeleteCert(SSLCertificate* cert) { delete cert; } - - std::vector certs_; - - RTC_DISALLOW_COPY_AND_ASSIGN(SSLCertChain); -}; - -// KT_LAST is intended for vector declarations and loops over all key types; -// it does not represent any key type in itself. -// KT_DEFAULT is used as the default KeyType for KeyParams. -enum KeyType { KT_RSA, KT_ECDSA, KT_LAST, KT_DEFAULT = KT_ECDSA }; - -static const int kRsaDefaultModSize = 1024; -static const int kRsaDefaultExponent = 0x10001; // = 2^16+1 = 65537 -static const int kRsaMinModSize = 1024; -static const int kRsaMaxModSize = 8192; - -// Certificate default validity lifetime. -static const int kDefaultCertificateLifetimeInSeconds = - 60 * 60 * 24 * 30; // 30 days -// Certificate validity window. -// This is to compensate for slightly incorrect system clocks. -static const int kCertificateWindowInSeconds = -60 * 60 * 24; - -struct RSAParams { - unsigned int mod_size; - unsigned int pub_exp; -}; - -enum ECCurve { EC_NIST_P256, /* EC_FANCY, */ EC_LAST }; - -class KeyParams { - public: - // Generate a KeyParams object from a simple KeyType, using default params. - explicit KeyParams(KeyType key_type = KT_DEFAULT); - - // Generate a a KeyParams for RSA with explicit parameters. - static KeyParams RSA(int mod_size = kRsaDefaultModSize, - int pub_exp = kRsaDefaultExponent); - - // Generate a a KeyParams for ECDSA specifying the curve. - static KeyParams ECDSA(ECCurve curve = EC_NIST_P256); - - // Check validity of a KeyParams object. Since the factory functions have - // no way of returning errors, this function can be called after creation - // to make sure the parameters are OK. - bool IsValid() const; - - RSAParams rsa_params() const; - - ECCurve ec_curve() const; - - KeyType type() const { return type_; } - - private: - KeyType type_; - union { - RSAParams rsa; - ECCurve curve; - } params_; -}; - -// TODO(hbos): Remove once rtc::KeyType (to be modified) and -// blink::WebRTCKeyType (to be landed) match. By using this function in Chromium -// appropriately we can change KeyType enum -> class without breaking Chromium. -KeyType IntKeyTypeFamilyToKeyType(int key_type_family); - -// Parameters for generating a certificate. If |common_name| is non-empty, it -// will be used for the certificate's subject and issuer name, otherwise a -// random string will be used. -struct SSLIdentityParams { - std::string common_name; - time_t not_before; // Absolute time since epoch in seconds. - time_t not_after; // Absolute time since epoch in seconds. - KeyParams key_params; -}; - -// Our identity in an SSL negotiation: a keypair and certificate (both -// with the same public key). -// This too is pretty much immutable once created. -class SSLIdentity { - public: - // Generates an identity (keypair and self-signed certificate). If - // |common_name| is non-empty, it will be used for the certificate's subject - // and issuer name, otherwise a random string will be used. The key type and - // parameters are defined in |key_param|. The certificate's lifetime in - // seconds from the current time is defined in |certificate_lifetime|; it - // should be a non-negative number. - // Returns NULL on failure. - // Caller is responsible for freeing the returned object. - static SSLIdentity* GenerateWithExpiration(const std::string& common_name, - const KeyParams& key_param, - time_t certificate_lifetime); - static SSLIdentity* Generate(const std::string& common_name, - const KeyParams& key_param); - static SSLIdentity* Generate(const std::string& common_name, - KeyType key_type); - - // Generates an identity with the specified validity period. - // TODO(torbjorng): Now that Generate() accepts relevant params, make tests - // use that instead of this function. - static SSLIdentity* GenerateForTest(const SSLIdentityParams& params); - - // Construct an identity from a private key and a certificate. - static SSLIdentity* FromPEMStrings(const std::string& private_key, - const std::string& certificate); - - virtual ~SSLIdentity() {} - - // Returns a new SSLIdentity object instance wrapping the same - // identity information. - // Caller is responsible for freeing the returned object. - // TODO(hbos,torbjorng): Rename to a less confusing name. - virtual SSLIdentity* GetReference() const = 0; - - // Returns a temporary reference to the certificate. - virtual const SSLCertificate& certificate() const = 0; - virtual std::string PrivateKeyToPEMString() const = 0; - virtual std::string PublicKeyToPEMString() const = 0; - - // Helpers for parsing converting between PEM and DER format. - static bool PemToDer(const std::string& pem_type, - const std::string& pem_string, - std::string* der); - static std::string DerToPem(const std::string& pem_type, - const unsigned char* data, - size_t length); -}; - -bool operator==(const SSLIdentity& a, const SSLIdentity& b); -bool operator!=(const SSLIdentity& a, const SSLIdentity& b); - -// Convert from ASN1 time as restricted by RFC 5280 to seconds from 1970-01-01 -// 00.00 ("epoch"). If the ASN1 time cannot be read, return -1. The data at -// |s| is not 0-terminated; its char count is defined by |length|. -int64_t ASN1TimeToSec(const unsigned char* s, size_t length, bool long_format); - -extern const char kPemTypeCertificate[]; -extern const char kPemTypeRsaPrivateKey[]; -extern const char kPemTypeEcPrivateKey[]; - -} // namespace rtc - -#endif // WEBRTC_BASE_SSLIDENTITY_H_ diff --git a/WebRtc.NET/include/webrtc/base/sslsocketfactory.h b/WebRtc.NET/include/webrtc/base/sslsocketfactory.h deleted file mode 100644 index 792c15c3..00000000 --- a/WebRtc.NET/include/webrtc/base/sslsocketfactory.h +++ /dev/null @@ -1,78 +0,0 @@ -/* - * Copyright 2007 The WebRTC Project Authors. All rights reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_BASE_SSLSOCKETFACTORY_H__ -#define WEBRTC_BASE_SSLSOCKETFACTORY_H__ - -#include "webrtc/base/proxyinfo.h" -#include "webrtc/base/socketserver.h" - -namespace rtc { - -/////////////////////////////////////////////////////////////////////////////// -// SslSocketFactory -/////////////////////////////////////////////////////////////////////////////// - -class SslSocketFactory : public SocketFactory { - public: - SslSocketFactory(SocketFactory* factory, const std::string& user_agent); - ~SslSocketFactory() override; - - void SetAutoDetectProxy() { - autodetect_proxy_ = true; - } - void SetForceConnect(bool force) { - force_connect_ = force; - } - void SetProxy(const ProxyInfo& proxy) { - autodetect_proxy_ = false; - proxy_ = proxy; - } - bool autodetect_proxy() const { return autodetect_proxy_; } - const ProxyInfo& proxy() const { return proxy_; } - - void UseSSL(const char* hostname) { hostname_ = hostname; } - void DisableSSL() { hostname_.clear(); } - void SetIgnoreBadCert(bool ignore) { ignore_bad_cert_ = ignore; } - bool ignore_bad_cert() const { return ignore_bad_cert_; } - - void SetLogging(LoggingSeverity level, const std::string& label, - bool binary_mode = false) { - logging_level_ = level; - logging_label_ = label; - binary_mode_ = binary_mode; - } - - // SocketFactory Interface - Socket* CreateSocket(int type) override; - Socket* CreateSocket(int family, int type) override; - - AsyncSocket* CreateAsyncSocket(int type) override; - AsyncSocket* CreateAsyncSocket(int family, int type) override; - - private: - friend class ProxySocketAdapter; - AsyncSocket* CreateProxySocket(const ProxyInfo& proxy, int family, int type); - - SocketFactory* factory_; - std::string agent_; - bool autodetect_proxy_, force_connect_; - ProxyInfo proxy_; - std::string hostname_, logging_label_; - LoggingSeverity logging_level_; - bool binary_mode_; - bool ignore_bad_cert_; -}; - -/////////////////////////////////////////////////////////////////////////////// - -} // namespace rtc - -#endif // WEBRTC_BASE_SSLSOCKETFACTORY_H__ diff --git a/WebRtc.NET/include/webrtc/base/stream.h b/WebRtc.NET/include/webrtc/base/stream.h deleted file mode 100644 index 33090dfb..00000000 --- a/WebRtc.NET/include/webrtc/base/stream.h +++ /dev/null @@ -1,713 +0,0 @@ -/* - * Copyright 2004 The WebRTC Project Authors. All rights reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_BASE_STREAM_H_ -#define WEBRTC_BASE_STREAM_H_ - -#include - -#include - -#include "webrtc/base/buffer.h" -#include "webrtc/base/constructormagic.h" -#include "webrtc/base/criticalsection.h" -#include "webrtc/base/logging.h" -#include "webrtc/base/messagehandler.h" -#include "webrtc/base/messagequeue.h" -#include "webrtc/base/sigslot.h" - -namespace rtc { - -/////////////////////////////////////////////////////////////////////////////// -// StreamInterface is a generic asynchronous stream interface, supporting read, -// write, and close operations, and asynchronous signalling of state changes. -// The interface is designed with file, memory, and socket implementations in -// mind. Some implementations offer extended operations, such as seeking. -/////////////////////////////////////////////////////////////////////////////// - -// The following enumerations are declared outside of the StreamInterface -// class for brevity in use. - -// The SS_OPENING state indicates that the stream will signal open or closed -// in the future. -enum StreamState { SS_CLOSED, SS_OPENING, SS_OPEN }; - -// Stream read/write methods return this value to indicate various success -// and failure conditions described below. -enum StreamResult { SR_ERROR, SR_SUCCESS, SR_BLOCK, SR_EOS }; - -// StreamEvents are used to asynchronously signal state transitionss. The flags -// may be combined. -// SE_OPEN: The stream has transitioned to the SS_OPEN state -// SE_CLOSE: The stream has transitioned to the SS_CLOSED state -// SE_READ: Data is available, so Read is likely to not return SR_BLOCK -// SE_WRITE: Data can be written, so Write is likely to not return SR_BLOCK -enum StreamEvent { SE_OPEN = 1, SE_READ = 2, SE_WRITE = 4, SE_CLOSE = 8 }; - -class Thread; - -struct StreamEventData : public MessageData { - int events, error; - StreamEventData(int ev, int er) : events(ev), error(er) { } -}; - -class StreamInterface : public MessageHandler { - public: - enum { - MSG_POST_EVENT = 0xF1F1, MSG_MAX = MSG_POST_EVENT - }; - - ~StreamInterface() override; - - virtual StreamState GetState() const = 0; - - // Read attempts to fill buffer of size buffer_len. Write attempts to send - // data_len bytes stored in data. The variables read and write are set only - // on SR_SUCCESS (see below). Likewise, error is only set on SR_ERROR. - // Read and Write return a value indicating: - // SR_ERROR: an error occurred, which is returned in a non-null error - // argument. Interpretation of the error requires knowledge of the - // stream's concrete type, which limits its usefulness. - // SR_SUCCESS: some number of bytes were successfully written, which is - // returned in a non-null read/write argument. - // SR_BLOCK: the stream is in non-blocking mode, and the operation would - // block, or the stream is in SS_OPENING state. - // SR_EOS: the end-of-stream has been reached, or the stream is in the - // SS_CLOSED state. - virtual StreamResult Read(void* buffer, size_t buffer_len, - size_t* read, int* error) = 0; - virtual StreamResult Write(const void* data, size_t data_len, - size_t* written, int* error) = 0; - // Attempt to transition to the SS_CLOSED state. SE_CLOSE will not be - // signalled as a result of this call. - virtual void Close() = 0; - - // Streams may signal one or more StreamEvents to indicate state changes. - // The first argument identifies the stream on which the state change occured. - // The second argument is a bit-wise combination of StreamEvents. - // If SE_CLOSE is signalled, then the third argument is the associated error - // code. Otherwise, the value is undefined. - // Note: Not all streams will support asynchronous event signalling. However, - // SS_OPENING and SR_BLOCK returned from stream member functions imply that - // certain events will be raised in the future. - sigslot::signal3 SignalEvent; - - // Like calling SignalEvent, but posts a message to the specified thread, - // which will call SignalEvent. This helps unroll the stack and prevent - // re-entrancy. - void PostEvent(Thread* t, int events, int err); - // Like the aforementioned method, but posts to the current thread. - void PostEvent(int events, int err); - - // - // OPTIONAL OPERATIONS - // - // Not all implementations will support the following operations. In general, - // a stream will only support an operation if it reasonably efficient to do - // so. For example, while a socket could buffer incoming data to support - // seeking, it will not do so. Instead, a buffering stream adapter should - // be used. - // - // Even though several of these operations are related, you should - // always use whichever operation is most relevant. For example, you may - // be tempted to use GetSize() and GetPosition() to deduce the result of - // GetAvailable(). However, a stream which is read-once may support the - // latter operation but not the former. - // - - // The following four methods are used to avoid copying data multiple times. - - // GetReadData returns a pointer to a buffer which is owned by the stream. - // The buffer contains data_len bytes. NULL is returned if no data is - // available, or if the method fails. If the caller processes the data, it - // must call ConsumeReadData with the number of processed bytes. GetReadData - // does not require a matching call to ConsumeReadData if the data is not - // processed. Read and ConsumeReadData invalidate the buffer returned by - // GetReadData. - virtual const void* GetReadData(size_t* data_len); - virtual void ConsumeReadData(size_t used) {} - - // GetWriteBuffer returns a pointer to a buffer which is owned by the stream. - // The buffer has a capacity of buf_len bytes. NULL is returned if there is - // no buffer available, or if the method fails. The call may write data to - // the buffer, and then call ConsumeWriteBuffer with the number of bytes - // written. GetWriteBuffer does not require a matching call to - // ConsumeWriteData if no data is written. Write, ForceWrite, and - // ConsumeWriteData invalidate the buffer returned by GetWriteBuffer. - // TODO: Allow the caller to specify a minimum buffer size. If the specified - // amount of buffer is not yet available, return NULL and Signal SE_WRITE - // when it is available. If the requested amount is too large, return an - // error. - virtual void* GetWriteBuffer(size_t* buf_len); - virtual void ConsumeWriteBuffer(size_t used) {} - - // Write data_len bytes found in data, circumventing any throttling which - // would could cause SR_BLOCK to be returned. Returns true if all the data - // was written. Otherwise, the method is unsupported, or an unrecoverable - // error occurred, and the error value is set. This method should be used - // sparingly to write critical data which should not be throttled. A stream - // which cannot circumvent its blocking constraints should not implement this - // method. - // NOTE: This interface is being considered experimentally at the moment. It - // would be used by JUDP and BandwidthStream as a way to circumvent certain - // soft limits in writing. - //virtual bool ForceWrite(const void* data, size_t data_len, int* error) { - // if (error) *error = -1; - // return false; - //} - - // Seek to a byte offset from the beginning of the stream. Returns false if - // the stream does not support seeking, or cannot seek to the specified - // position. - virtual bool SetPosition(size_t position); - - // Get the byte offset of the current position from the start of the stream. - // Returns false if the position is not known. - virtual bool GetPosition(size_t* position) const; - - // Get the byte length of the entire stream. Returns false if the length - // is not known. - virtual bool GetSize(size_t* size) const; - - // Return the number of Read()-able bytes remaining before end-of-stream. - // Returns false if not known. - virtual bool GetAvailable(size_t* size) const; - - // Return the number of Write()-able bytes remaining before end-of-stream. - // Returns false if not known. - virtual bool GetWriteRemaining(size_t* size) const; - - // Return true if flush is successful. - virtual bool Flush(); - - // Communicates the amount of data which will be written to the stream. The - // stream may choose to preallocate memory to accomodate this data. The - // stream may return false to indicate that there is not enough room (ie, - // Write will return SR_EOS/SR_ERROR at some point). Note that calling this - // function should not affect the existing state of data in the stream. - virtual bool ReserveSize(size_t size); - - // - // CONVENIENCE METHODS - // - // These methods are implemented in terms of other methods, for convenience. - // - - // Seek to the start of the stream. - inline bool Rewind() { return SetPosition(0); } - - // WriteAll is a helper function which repeatedly calls Write until all the - // data is written, or something other than SR_SUCCESS is returned. Note that - // unlike Write, the argument 'written' is always set, and may be non-zero - // on results other than SR_SUCCESS. The remaining arguments have the - // same semantics as Write. - StreamResult WriteAll(const void* data, size_t data_len, - size_t* written, int* error); - - // Similar to ReadAll. Calls Read until buffer_len bytes have been read, or - // until a non-SR_SUCCESS result is returned. 'read' is always set. - StreamResult ReadAll(void* buffer, size_t buffer_len, - size_t* read, int* error); - - // ReadLine is a helper function which repeatedly calls Read until it hits - // the end-of-line character, or something other than SR_SUCCESS. - // TODO: this is too inefficient to keep here. Break this out into a buffered - // readline object or adapter - StreamResult ReadLine(std::string* line); - - protected: - StreamInterface(); - - // MessageHandler Interface - void OnMessage(Message* msg) override; - - private: - RTC_DISALLOW_COPY_AND_ASSIGN(StreamInterface); -}; - -/////////////////////////////////////////////////////////////////////////////// -// StreamAdapterInterface is a convenient base-class for adapting a stream. -// By default, all operations are pass-through. Override the methods that you -// require adaptation. Streams should really be upgraded to reference-counted. -// In the meantime, use the owned flag to indicate whether the adapter should -// own the adapted stream. -/////////////////////////////////////////////////////////////////////////////// - -class StreamAdapterInterface : public StreamInterface, - public sigslot::has_slots<> { - public: - explicit StreamAdapterInterface(StreamInterface* stream, bool owned = true); - - // Core Stream Interface - StreamState GetState() const override; - StreamResult Read(void* buffer, - size_t buffer_len, - size_t* read, - int* error) override; - StreamResult Write(const void* data, - size_t data_len, - size_t* written, - int* error) override; - void Close() override; - - // Optional Stream Interface - /* Note: Many stream adapters were implemented prior to this Read/Write - interface. Therefore, a simple pass through of data in those cases may - be broken. At a later time, we should do a once-over pass of all - adapters, and make them compliant with these interfaces, after which this - code can be uncommented. - virtual const void* GetReadData(size_t* data_len) { - return stream_->GetReadData(data_len); - } - virtual void ConsumeReadData(size_t used) { - stream_->ConsumeReadData(used); - } - - virtual void* GetWriteBuffer(size_t* buf_len) { - return stream_->GetWriteBuffer(buf_len); - } - virtual void ConsumeWriteBuffer(size_t used) { - stream_->ConsumeWriteBuffer(used); - } - */ - - /* Note: This interface is currently undergoing evaluation. - virtual bool ForceWrite(const void* data, size_t data_len, int* error) { - return stream_->ForceWrite(data, data_len, error); - } - */ - - bool SetPosition(size_t position) override; - bool GetPosition(size_t* position) const override; - bool GetSize(size_t* size) const override; - bool GetAvailable(size_t* size) const override; - bool GetWriteRemaining(size_t* size) const override; - bool ReserveSize(size_t size) override; - bool Flush() override; - - void Attach(StreamInterface* stream, bool owned = true); - StreamInterface* Detach(); - - protected: - ~StreamAdapterInterface() override; - - // Note that the adapter presents itself as the origin of the stream events, - // since users of the adapter may not recognize the adapted object. - virtual void OnEvent(StreamInterface* stream, int events, int err); - StreamInterface* stream() { return stream_; } - - private: - StreamInterface* stream_; - bool owned_; - RTC_DISALLOW_COPY_AND_ASSIGN(StreamAdapterInterface); -}; - -/////////////////////////////////////////////////////////////////////////////// -// StreamTap is a non-modifying, pass-through adapter, which copies all data -// in either direction to the tap. Note that errors or blocking on writing to -// the tap will prevent further tap writes from occurring. -/////////////////////////////////////////////////////////////////////////////// - -class StreamTap : public StreamAdapterInterface { - public: - explicit StreamTap(StreamInterface* stream, StreamInterface* tap); - ~StreamTap() override; - - void AttachTap(StreamInterface* tap); - StreamInterface* DetachTap(); - StreamResult GetTapResult(int* error); - - // StreamAdapterInterface Interface - StreamResult Read(void* buffer, - size_t buffer_len, - size_t* read, - int* error) override; - StreamResult Write(const void* data, - size_t data_len, - size_t* written, - int* error) override; - - private: - std::unique_ptr tap_; - StreamResult tap_result_; - int tap_error_; - RTC_DISALLOW_COPY_AND_ASSIGN(StreamTap); -}; - -/////////////////////////////////////////////////////////////////////////////// -// NullStream gives errors on read, and silently discards all written data. -/////////////////////////////////////////////////////////////////////////////// - -class NullStream : public StreamInterface { - public: - NullStream(); - ~NullStream() override; - - // StreamInterface Interface - StreamState GetState() const override; - StreamResult Read(void* buffer, - size_t buffer_len, - size_t* read, - int* error) override; - StreamResult Write(const void* data, - size_t data_len, - size_t* written, - int* error) override; - void Close() override; -}; - -/////////////////////////////////////////////////////////////////////////////// -// FileStream is a simple implementation of a StreamInterface, which does not -// support asynchronous notification. -/////////////////////////////////////////////////////////////////////////////// - -class FileStream : public StreamInterface { - public: - FileStream(); - ~FileStream() override; - - // The semantics of filename and mode are the same as stdio's fopen - virtual bool Open(const std::string& filename, const char* mode, int* error); - virtual bool OpenShare(const std::string& filename, const char* mode, - int shflag, int* error); - - // By default, reads and writes are buffered for efficiency. Disabling - // buffering causes writes to block until the bytes on disk are updated. - virtual bool DisableBuffering(); - - StreamState GetState() const override; - StreamResult Read(void* buffer, - size_t buffer_len, - size_t* read, - int* error) override; - StreamResult Write(const void* data, - size_t data_len, - size_t* written, - int* error) override; - void Close() override; - bool SetPosition(size_t position) override; - bool GetPosition(size_t* position) const override; - bool GetSize(size_t* size) const override; - bool GetAvailable(size_t* size) const override; - bool ReserveSize(size_t size) override; - - bool Flush() override; - -#if defined(WEBRTC_POSIX) && !defined(__native_client__) - // Tries to aquire an exclusive lock on the file. - // Use OpenShare(...) on win32 to get similar functionality. - bool TryLock(); - bool Unlock(); -#endif - - // Note: Deprecated in favor of Filesystem::GetFileSize(). - static bool GetSize(const std::string& filename, size_t* size); - - protected: - virtual void DoClose(); - - FILE* file_; - - private: - RTC_DISALLOW_COPY_AND_ASSIGN(FileStream); -}; - -/////////////////////////////////////////////////////////////////////////////// -// MemoryStream is a simple implementation of a StreamInterface over in-memory -// data. Data is read and written at the current seek position. Reads return -// end-of-stream when they reach the end of data. Writes actually extend the -// end of data mark. -/////////////////////////////////////////////////////////////////////////////// - -class MemoryStreamBase : public StreamInterface { - public: - StreamState GetState() const override; - StreamResult Read(void* buffer, - size_t bytes, - size_t* bytes_read, - int* error) override; - StreamResult Write(const void* buffer, - size_t bytes, - size_t* bytes_written, - int* error) override; - void Close() override; - bool SetPosition(size_t position) override; - bool GetPosition(size_t* position) const override; - bool GetSize(size_t* size) const override; - bool GetAvailable(size_t* size) const override; - bool ReserveSize(size_t size) override; - - char* GetBuffer() { return buffer_; } - const char* GetBuffer() const { return buffer_; } - - protected: - MemoryStreamBase(); - - virtual StreamResult DoReserve(size_t size, int* error); - - // Invariant: 0 <= seek_position <= data_length_ <= buffer_length_ - char* buffer_; - size_t buffer_length_; - size_t data_length_; - size_t seek_position_; - - private: - RTC_DISALLOW_COPY_AND_ASSIGN(MemoryStreamBase); -}; - -// MemoryStream dynamically resizes to accomodate written data. - -class MemoryStream : public MemoryStreamBase { - public: - MemoryStream(); - explicit MemoryStream(const char* data); // Calls SetData(data, strlen(data)) - MemoryStream(const void* data, size_t length); // Calls SetData(data, length) - ~MemoryStream() override; - - void SetData(const void* data, size_t length); - - protected: - StreamResult DoReserve(size_t size, int* error) override; - // Memory Streams are aligned for efficiency. - static const int kAlignment = 16; - char* buffer_alloc_; -}; - -// ExternalMemoryStream adapts an external memory buffer, so writes which would -// extend past the end of the buffer will return end-of-stream. - -class ExternalMemoryStream : public MemoryStreamBase { - public: - ExternalMemoryStream(); - ExternalMemoryStream(void* data, size_t length); - ~ExternalMemoryStream() override; - - void SetData(void* data, size_t length); -}; - -// FifoBuffer allows for efficient, thread-safe buffering of data between -// writer and reader. As the data can wrap around the end of the buffer, -// MemoryStreamBase can't help us here. - -class FifoBuffer : public StreamInterface { - public: - // Creates a FIFO buffer with the specified capacity. - explicit FifoBuffer(size_t length); - // Creates a FIFO buffer with the specified capacity and owner - FifoBuffer(size_t length, Thread* owner); - ~FifoBuffer() override; - // Gets the amount of data currently readable from the buffer. - bool GetBuffered(size_t* data_len) const; - // Resizes the buffer to the specified capacity. Fails if data_length_ > size - bool SetCapacity(size_t length); - - // Read into |buffer| with an offset from the current read position, offset - // is specified in number of bytes. - // This method doesn't adjust read position nor the number of available - // bytes, user has to call ConsumeReadData() to do this. - StreamResult ReadOffset(void* buffer, size_t bytes, size_t offset, - size_t* bytes_read); - - // Write |buffer| with an offset from the current write position, offset is - // specified in number of bytes. - // This method doesn't adjust the number of buffered bytes, user has to call - // ConsumeWriteBuffer() to do this. - StreamResult WriteOffset(const void* buffer, size_t bytes, size_t offset, - size_t* bytes_written); - - // StreamInterface methods - StreamState GetState() const override; - StreamResult Read(void* buffer, - size_t bytes, - size_t* bytes_read, - int* error) override; - StreamResult Write(const void* buffer, - size_t bytes, - size_t* bytes_written, - int* error) override; - void Close() override; - const void* GetReadData(size_t* data_len) override; - void ConsumeReadData(size_t used) override; - void* GetWriteBuffer(size_t* buf_len) override; - void ConsumeWriteBuffer(size_t used) override; - bool GetWriteRemaining(size_t* size) const override; - - private: - // Helper method that implements ReadOffset. Caller must acquire a lock - // when calling this method. - StreamResult ReadOffsetLocked(void* buffer, size_t bytes, size_t offset, - size_t* bytes_read) - EXCLUSIVE_LOCKS_REQUIRED(crit_); - - // Helper method that implements WriteOffset. Caller must acquire a lock - // when calling this method. - StreamResult WriteOffsetLocked(const void* buffer, size_t bytes, - size_t offset, size_t* bytes_written) - EXCLUSIVE_LOCKS_REQUIRED(crit_); - - // keeps the opened/closed state of the stream - StreamState state_ GUARDED_BY(crit_); - // the allocated buffer - std::unique_ptr buffer_ GUARDED_BY(crit_); - // size of the allocated buffer - size_t buffer_length_ GUARDED_BY(crit_); - // amount of readable data in the buffer - size_t data_length_ GUARDED_BY(crit_); - // offset to the readable data - size_t read_position_ GUARDED_BY(crit_); - // stream callbacks are dispatched on this thread - Thread* owner_; - // object lock - CriticalSection crit_; - RTC_DISALLOW_COPY_AND_ASSIGN(FifoBuffer); -}; - -/////////////////////////////////////////////////////////////////////////////// - -class LoggingAdapter : public StreamAdapterInterface { - public: - LoggingAdapter(StreamInterface* stream, LoggingSeverity level, - const std::string& label, bool hex_mode = false); - - void set_label(const std::string& label); - - StreamResult Read(void* buffer, - size_t buffer_len, - size_t* read, - int* error) override; - StreamResult Write(const void* data, - size_t data_len, - size_t* written, - int* error) override; - void Close() override; - - protected: - void OnEvent(StreamInterface* stream, int events, int err) override; - - private: - LoggingSeverity level_; - std::string label_; - bool hex_mode_; - LogMultilineState lms_; - - RTC_DISALLOW_COPY_AND_ASSIGN(LoggingAdapter); -}; - -/////////////////////////////////////////////////////////////////////////////// -// StringStream - Reads/Writes to an external std::string -/////////////////////////////////////////////////////////////////////////////// - -class StringStream : public StreamInterface { - public: - explicit StringStream(std::string* str); - explicit StringStream(const std::string& str); - - StreamState GetState() const override; - StreamResult Read(void* buffer, - size_t buffer_len, - size_t* read, - int* error) override; - StreamResult Write(const void* data, - size_t data_len, - size_t* written, - int* error) override; - void Close() override; - bool SetPosition(size_t position) override; - bool GetPosition(size_t* position) const override; - bool GetSize(size_t* size) const override; - bool GetAvailable(size_t* size) const override; - bool ReserveSize(size_t size) override; - - private: - std::string& str_; - size_t read_pos_; - bool read_only_; -}; - -/////////////////////////////////////////////////////////////////////////////// -// StreamReference - A reference counting stream adapter -/////////////////////////////////////////////////////////////////////////////// - -// Keep in mind that the streams and adapters defined in this file are -// not thread-safe, so this has limited uses. - -// A StreamRefCount holds the reference count and a pointer to the -// wrapped stream. It deletes the wrapped stream when there are no -// more references. We can then have multiple StreamReference -// instances pointing to one StreamRefCount, all wrapping the same -// stream. - -class StreamReference : public StreamAdapterInterface { - class StreamRefCount; - public: - // Constructor for the first reference to a stream - // Note: get more references through NewReference(). Use this - // constructor only once on a given stream. - explicit StreamReference(StreamInterface* stream); - StreamInterface* GetStream() { return stream(); } - StreamInterface* NewReference(); - ~StreamReference() override; - - private: - class StreamRefCount { - public: - explicit StreamRefCount(StreamInterface* stream) - : stream_(stream), ref_count_(1) { - } - void AddReference() { - CritScope lock(&cs_); - ++ref_count_; - } - void Release() { - int ref_count; - { // Atomic ops would have been a better fit here. - CritScope lock(&cs_); - ref_count = --ref_count_; - } - if (ref_count == 0) { - delete stream_; - delete this; - } - } - private: - StreamInterface* stream_; - int ref_count_; - CriticalSection cs_; - RTC_DISALLOW_COPY_AND_ASSIGN(StreamRefCount); - }; - - // Constructor for adding references - explicit StreamReference(StreamRefCount* stream_ref_count, - StreamInterface* stream); - - StreamRefCount* stream_ref_count_; - RTC_DISALLOW_COPY_AND_ASSIGN(StreamReference); -}; - -/////////////////////////////////////////////////////////////////////////////// - -// Flow attempts to move bytes from source to sink via buffer of size -// buffer_len. The function returns SR_SUCCESS when source reaches -// end-of-stream (returns SR_EOS), and all the data has been written successful -// to sink. Alternately, if source returns SR_BLOCK or SR_ERROR, or if sink -// returns SR_BLOCK, SR_ERROR, or SR_EOS, then the function immediately returns -// with the unexpected StreamResult value. -// data_len is the length of the valid data in buffer. in case of error -// this is the data that read from source but can't move to destination. -// as a pass in parameter, it indicates data in buffer that should move to sink -StreamResult Flow(StreamInterface* source, - char* buffer, size_t buffer_len, - StreamInterface* sink, size_t* data_len = NULL); - -/////////////////////////////////////////////////////////////////////////////// - -} // namespace rtc - -#endif // WEBRTC_BASE_STREAM_H_ diff --git a/WebRtc.NET/include/webrtc/base/stringencode.h b/WebRtc.NET/include/webrtc/base/stringencode.h deleted file mode 100644 index 8f78ad1a..00000000 --- a/WebRtc.NET/include/webrtc/base/stringencode.h +++ /dev/null @@ -1,224 +0,0 @@ -/* - * Copyright 2004 The WebRTC Project Authors. All rights reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_BASE_STRINGENCODE_H_ -#define WEBRTC_BASE_STRINGENCODE_H_ - -#include -#include -#include - -#include "webrtc/base/checks.h" - -namespace rtc { - -////////////////////////////////////////////////////////////////////// -// String Encoding Utilities -////////////////////////////////////////////////////////////////////// - -// Convert an unsigned value to it's utf8 representation. Returns the length -// of the encoded string, or 0 if the encoding is longer than buflen - 1. -size_t utf8_encode(char* buffer, size_t buflen, unsigned long value); -// Decode the utf8 encoded value pointed to by source. Returns the number of -// bytes used by the encoding, or 0 if the encoding is invalid. -size_t utf8_decode(const char* source, size_t srclen, unsigned long* value); - -// Escaping prefixes illegal characters with the escape character. Compact, but -// illegal characters still appear in the string. -size_t escape(char * buffer, size_t buflen, - const char * source, size_t srclen, - const char * illegal, char escape); -// Note: in-place unescaping (buffer == source) is allowed. -size_t unescape(char * buffer, size_t buflen, - const char * source, size_t srclen, - char escape); - -// Encoding replaces illegal characters with the escape character and 2 hex -// chars, so it's a little less compact than escape, but completely removes -// illegal characters. note that hex digits should not be used as illegal -// characters. -size_t encode(char * buffer, size_t buflen, - const char * source, size_t srclen, - const char * illegal, char escape); -// Note: in-place decoding (buffer == source) is allowed. -size_t decode(char * buffer, size_t buflen, - const char * source, size_t srclen, - char escape); - -// Returns a list of characters that may be unsafe for use in the name of a -// file, suitable for passing to the 'illegal' member of escape or encode. -const char* unsafe_filename_characters(); - -// url_encode is an encode operation with a predefined set of illegal characters -// and escape character (for use in URLs, obviously). -size_t url_encode(char * buffer, size_t buflen, - const char * source, size_t srclen); -// Note: in-place decoding (buffer == source) is allowed. -size_t url_decode(char * buffer, size_t buflen, - const char * source, size_t srclen); - -// html_encode prevents data embedded in html from containing markup. -size_t html_encode(char * buffer, size_t buflen, - const char * source, size_t srclen); -// Note: in-place decoding (buffer == source) is allowed. -size_t html_decode(char * buffer, size_t buflen, - const char * source, size_t srclen); - -// xml_encode makes data suitable for inside xml attributes and values. -size_t xml_encode(char * buffer, size_t buflen, - const char * source, size_t srclen); -// Note: in-place decoding (buffer == source) is allowed. -size_t xml_decode(char * buffer, size_t buflen, - const char * source, size_t srclen); - -// Convert an unsigned value from 0 to 15 to the hex character equivalent... -char hex_encode(unsigned char val); -// ...and vice-versa. -bool hex_decode(char ch, unsigned char* val); - -// hex_encode shows the hex representation of binary data in ascii. -size_t hex_encode(char* buffer, size_t buflen, - const char* source, size_t srclen); - -// hex_encode, but separate each byte representation with a delimiter. -// |delimiter| == 0 means no delimiter -// If the buffer is too short, we return 0 -size_t hex_encode_with_delimiter(char* buffer, size_t buflen, - const char* source, size_t srclen, - char delimiter); - -// Helper functions for hex_encode. -std::string hex_encode(const std::string& str); -std::string hex_encode(const char* source, size_t srclen); -std::string hex_encode_with_delimiter(const char* source, size_t srclen, - char delimiter); - -// hex_decode converts ascii hex to binary. -size_t hex_decode(char* buffer, size_t buflen, - const char* source, size_t srclen); - -// hex_decode, assuming that there is a delimiter between every byte -// pair. -// |delimiter| == 0 means no delimiter -// If the buffer is too short or the data is invalid, we return 0. -size_t hex_decode_with_delimiter(char* buffer, size_t buflen, - const char* source, size_t srclen, - char delimiter); - -// Helper functions for hex_decode. -size_t hex_decode(char* buffer, size_t buflen, const std::string& source); -size_t hex_decode_with_delimiter(char* buffer, size_t buflen, - const std::string& source, char delimiter); - -// Apply any suitable string transform (including the ones above) to an STL -// string. Stack-allocated temporary space is used for the transformation, -// so value and source may refer to the same string. -typedef size_t (*Transform)(char * buffer, size_t buflen, - const char * source, size_t srclen); -size_t transform(std::string& value, size_t maxlen, const std::string& source, - Transform t); - -// Return the result of applying transform t to source. -std::string s_transform(const std::string& source, Transform t); - -// Convenience wrappers. -inline std::string s_url_encode(const std::string& source) { - return s_transform(source, url_encode); -} -inline std::string s_url_decode(const std::string& source) { - return s_transform(source, url_decode); -} - -// Splits the source string into multiple fields separated by delimiter, -// with duplicates of delimiter creating empty fields. -size_t split(const std::string& source, char delimiter, - std::vector* fields); - -// Splits the source string into multiple fields separated by delimiter, -// with duplicates of delimiter ignored. Trailing delimiter ignored. -size_t tokenize(const std::string& source, char delimiter, - std::vector* fields); - -// Tokenize, including the empty tokens. -size_t tokenize_with_empty_tokens(const std::string& source, - char delimiter, - std::vector* fields); - -// Tokenize and append the tokens to fields. Return the new size of fields. -size_t tokenize_append(const std::string& source, char delimiter, - std::vector* fields); - -// Splits the source string into multiple fields separated by delimiter, with -// duplicates of delimiter ignored. Trailing delimiter ignored. A substring in -// between the start_mark and the end_mark is treated as a single field. Return -// the size of fields. For example, if source is "filename -// \"/Library/Application Support/media content.txt\"", delimiter is ' ', and -// the start_mark and end_mark are '"', this method returns two fields: -// "filename" and "/Library/Application Support/media content.txt". -size_t tokenize(const std::string& source, char delimiter, char start_mark, - char end_mark, std::vector* fields); - -// Extract the first token from source as separated by delimiter, with -// duplicates of delimiter ignored. Return false if the delimiter could not be -// found, otherwise return true. -bool tokenize_first(const std::string& source, - const char delimiter, - std::string* token, - std::string* rest); - -// Safe sprintf to std::string -//void sprintf(std::string& value, size_t maxlen, const char * format, ...) -// PRINTF_FORMAT(3); - -// Convert arbitrary values to/from a string. - -template -static bool ToString(const T &t, std::string* s) { - RTC_DCHECK(s); - std::ostringstream oss; - oss << std::boolalpha << t; - *s = oss.str(); - return !oss.fail(); -} - -template -static bool FromString(const std::string& s, T* t) { - RTC_DCHECK(t); - std::istringstream iss(s); - iss >> std::boolalpha >> *t; - return !iss.fail(); -} - -// Inline versions of the string conversion routines. - -template -static inline std::string ToString(const T& val) { - std::string str; ToString(val, &str); return str; -} - -template -static inline T FromString(const std::string& str) { - T val; FromString(str, &val); return val; -} - -template -static inline T FromString(const T& defaultValue, const std::string& str) { - T val(defaultValue); FromString(str, &val); return val; -} - -// simple function to strip out characters which shouldn't be -// used in filenames -char make_char_safe_for_filename(char c); - -////////////////////////////////////////////////////////////////////// - -} // namespace rtc - -#endif // WEBRTC_BASE_STRINGENCODE_H__ diff --git a/WebRtc.NET/include/webrtc/base/stringutils.h b/WebRtc.NET/include/webrtc/base/stringutils.h deleted file mode 100644 index de256581..00000000 --- a/WebRtc.NET/include/webrtc/base/stringutils.h +++ /dev/null @@ -1,316 +0,0 @@ -/* - * Copyright 2004 The WebRTC Project Authors. All rights reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_BASE_STRINGUTILS_H__ -#define WEBRTC_BASE_STRINGUTILS_H__ - -#include -#include -#include -#include - -#if defined(WEBRTC_WIN) -#include -#include -#define alloca _alloca -#endif // WEBRTC_WIN - -#if defined(WEBRTC_POSIX) -#ifdef BSD -#include -#else // BSD -#include -#endif // !BSD -#endif // WEBRTC_POSIX - -#include - -/////////////////////////////////////////////////////////////////////////////// -// Generic string/memory utilities -/////////////////////////////////////////////////////////////////////////////// - -#define STACK_ARRAY(TYPE, LEN) static_cast(::alloca((LEN)*sizeof(TYPE))) - -namespace rtc { - -// Complement to memset. Verifies memory consists of count bytes of value c. -bool memory_check(const void* memory, int c, size_t count); - -// Determines whether the simple wildcard pattern matches target. -// Alpha characters in pattern match case-insensitively. -// Asterisks in pattern match 0 or more characters. -// Ex: string_match("www.TEST.GOOGLE.COM", "www.*.com") -> true -bool string_match(const char* target, const char* pattern); - -} // namespace rtc - -/////////////////////////////////////////////////////////////////////////////// -// Rename a bunch of common string functions so they are consistent across -// platforms and between char and wchar_t variants. -// Here is the full list of functions that are unified: -// strlen, strcmp, stricmp, strncmp, strnicmp -// strchr, vsnprintf, strtoul, tolowercase -// tolowercase is like tolower, but not compatible with end-of-file value -// -// It's not clear if we will ever use wchar_t strings on unix. In theory, -// all strings should be Utf8 all the time, except when interfacing with Win32 -// APIs that require Utf16. -/////////////////////////////////////////////////////////////////////////////// - -inline char tolowercase(char c) { - return static_cast(tolower(c)); -} - -#if defined(WEBRTC_WIN) - -inline size_t strlen(const wchar_t* s) { - return wcslen(s); -} -inline int strcmp(const wchar_t* s1, const wchar_t* s2) { - return wcscmp(s1, s2); -} -inline int stricmp(const wchar_t* s1, const wchar_t* s2) { - return _wcsicmp(s1, s2); -} -inline int strncmp(const wchar_t* s1, const wchar_t* s2, size_t n) { - return wcsncmp(s1, s2, n); -} -inline int strnicmp(const wchar_t* s1, const wchar_t* s2, size_t n) { - return _wcsnicmp(s1, s2, n); -} -inline const wchar_t* strchr(const wchar_t* s, wchar_t c) { - return wcschr(s, c); -} -inline const wchar_t* strstr(const wchar_t* haystack, const wchar_t* needle) { - return wcsstr(haystack, needle); -} -#ifndef vsnprintf -inline int vsnprintf(wchar_t* buf, size_t n, const wchar_t* fmt, va_list args) { - return _vsnwprintf(buf, n, fmt, args); -} -#endif // !vsnprintf -inline unsigned long strtoul(const wchar_t* snum, wchar_t** end, int base) { - return wcstoul(snum, end, base); -} -inline wchar_t tolowercase(wchar_t c) { - return static_cast(towlower(c)); -} - -#endif // WEBRTC_WIN - -#if defined(WEBRTC_POSIX) - -inline int _stricmp(const char* s1, const char* s2) { - return strcasecmp(s1, s2); -} -inline int _strnicmp(const char* s1, const char* s2, size_t n) { - return strncasecmp(s1, s2, n); -} - -#endif // WEBRTC_POSIX - -/////////////////////////////////////////////////////////////////////////////// -// Traits simplifies porting string functions to be CTYPE-agnostic -/////////////////////////////////////////////////////////////////////////////// - -namespace rtc { - -const size_t SIZE_UNKNOWN = static_cast(-1); - -template -struct Traits { - // STL string type - //typedef XXX string; - // Null-terminated string - //inline static const CTYPE* empty_str(); -}; - -/////////////////////////////////////////////////////////////////////////////// -// String utilities which work with char or wchar_t -/////////////////////////////////////////////////////////////////////////////// - -template -inline const CTYPE* nonnull(const CTYPE* str, const CTYPE* def_str = NULL) { - return str ? str : (def_str ? def_str : Traits::empty_str()); -} - -template -const CTYPE* strchr(const CTYPE* str, const CTYPE* chs) { - for (size_t i=0; str[i]; ++i) { - for (size_t j=0; chs[j]; ++j) { - if (str[i] == chs[j]) { - return str + i; - } - } - } - return 0; -} - -template -const CTYPE* strchrn(const CTYPE* str, size_t slen, CTYPE ch) { - for (size_t i=0; i -size_t strlenn(const CTYPE* buffer, size_t buflen) { - size_t bufpos = 0; - while (buffer[bufpos] && (bufpos < buflen)) { - ++bufpos; - } - return bufpos; -} - -// Safe versions of strncpy, strncat, snprintf and vsnprintf that always -// null-terminate. - -template -size_t strcpyn(CTYPE* buffer, size_t buflen, - const CTYPE* source, size_t srclen = SIZE_UNKNOWN) { - if (buflen <= 0) - return 0; - - if (srclen == SIZE_UNKNOWN) { - srclen = strlenn(source, buflen - 1); - } else if (srclen >= buflen) { - srclen = buflen - 1; - } - memcpy(buffer, source, srclen * sizeof(CTYPE)); - buffer[srclen] = 0; - return srclen; -} - -template -size_t strcatn(CTYPE* buffer, size_t buflen, - const CTYPE* source, size_t srclen = SIZE_UNKNOWN) { - if (buflen <= 0) - return 0; - - size_t bufpos = strlenn(buffer, buflen - 1); - return bufpos + strcpyn(buffer + bufpos, buflen - bufpos, source, srclen); -} - -// Some compilers (clang specifically) require vsprintfn be defined before -// sprintfn. -template -size_t vsprintfn(CTYPE* buffer, size_t buflen, const CTYPE* format, - va_list args) { - int len = vsnprintf(buffer, buflen, format, args); - if ((len < 0) || (static_cast(len) >= buflen)) { - len = static_cast(buflen - 1); - buffer[len] = 0; - } - return len; -} - -template -size_t sprintfn(CTYPE* buffer, size_t buflen, const CTYPE* format, ...); -template -size_t sprintfn(CTYPE* buffer, size_t buflen, const CTYPE* format, ...) { - va_list args; - va_start(args, format); - size_t len = vsprintfn(buffer, buflen, format, args); - va_end(args); - return len; -} - -/////////////////////////////////////////////////////////////////////////////// -// Allow safe comparing and copying ascii (not UTF-8) with both wide and -// non-wide character strings. -/////////////////////////////////////////////////////////////////////////////// - -inline int asccmp(const char* s1, const char* s2) { - return strcmp(s1, s2); -} -inline int ascicmp(const char* s1, const char* s2) { - return _stricmp(s1, s2); -} -inline int ascncmp(const char* s1, const char* s2, size_t n) { - return strncmp(s1, s2, n); -} -inline int ascnicmp(const char* s1, const char* s2, size_t n) { - return _strnicmp(s1, s2, n); -} -inline size_t asccpyn(char* buffer, size_t buflen, - const char* source, size_t srclen = SIZE_UNKNOWN) { - return strcpyn(buffer, buflen, source, srclen); -} - -#if defined(WEBRTC_WIN) - -typedef wchar_t(*CharacterTransformation)(wchar_t); -inline wchar_t identity(wchar_t c) { return c; } -int ascii_string_compare(const wchar_t* s1, const char* s2, size_t n, - CharacterTransformation transformation); - -inline int asccmp(const wchar_t* s1, const char* s2) { - return ascii_string_compare(s1, s2, static_cast(-1), identity); -} -inline int ascicmp(const wchar_t* s1, const char* s2) { - return ascii_string_compare(s1, s2, static_cast(-1), tolowercase); -} -inline int ascncmp(const wchar_t* s1, const char* s2, size_t n) { - return ascii_string_compare(s1, s2, n, identity); -} -inline int ascnicmp(const wchar_t* s1, const char* s2, size_t n) { - return ascii_string_compare(s1, s2, n, tolowercase); -} -size_t asccpyn(wchar_t* buffer, size_t buflen, - const char* source, size_t srclen = SIZE_UNKNOWN); - -#endif // WEBRTC_WIN - -/////////////////////////////////////////////////////////////////////////////// -// Traits specializations -/////////////////////////////////////////////////////////////////////////////// - -template<> -struct Traits { - typedef std::string string; - inline static const char* empty_str() { return ""; } -}; - -/////////////////////////////////////////////////////////////////////////////// -// Traits specializations (Windows only, currently) -/////////////////////////////////////////////////////////////////////////////// - -#if defined(WEBRTC_WIN) - -template<> -struct Traits { - typedef std::wstring string; - inline static const wchar_t* empty_str() { return L""; } -}; - -#endif // WEBRTC_WIN - -// Replaces all occurrences of "search" with "replace". -void replace_substrs(const char *search, - size_t search_len, - const char *replace, - size_t replace_len, - std::string *s); - -// True iff s1 starts with s2. -bool starts_with(const char *s1, const char *s2); - -// True iff s1 ends with s2. -bool ends_with(const char *s1, const char *s2); - -// Remove leading and trailing whitespaces. -std::string string_trim(const std::string& s); - -} // namespace rtc - -#endif // WEBRTC_BASE_STRINGUTILS_H__ diff --git a/WebRtc.NET/include/webrtc/base/task.h b/WebRtc.NET/include/webrtc/base/task.h deleted file mode 100644 index 4d54cfe8..00000000 --- a/WebRtc.NET/include/webrtc/base/task.h +++ /dev/null @@ -1,175 +0,0 @@ -/* - * Copyright 2004 The WebRTC Project Authors. All rights reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_BASE_TASK_H__ -#define WEBRTC_BASE_TASK_H__ - -#include - -#include - -#include "webrtc/base/sigslot.h" -#include "webrtc/base/taskparent.h" - -///////////////////////////////////////////////////////////////////// -// -// TASK -// -///////////////////////////////////////////////////////////////////// -// -// Task is a state machine infrastructure. States are pushed forward by -// pushing forwards a TaskRunner that holds on to all Tasks. The purpose -// of Task is threefold: -// -// (1) It manages ongoing work on the UI thread. Multitasking without -// threads, keeping it easy, keeping it real. :-) It does this by -// organizing a set of states for each task. When you return from your -// Process*() function, you return an integer for the next state. You do -// not go onto the next state yourself. Every time you enter a state, -// you check to see if you can do anything yet. If not, you return -// STATE_BLOCKED. If you _could_ do anything, do not return -// STATE_BLOCKED - even if you end up in the same state, return -// STATE_mysamestate. When you are done, return STATE_DONE and then the -// task will self-delete sometime afterwards. -// -// (2) It helps you avoid all those reentrancy problems when you chain -// too many triggers on one thread. Basically if you want to tell a task -// to process something for you, you feed your task some information and -// then you Wake() it. Don't tell it to process it right away. If it -// might be working on something as you send it information, you may want -// to have a queue in the task. -// -// (3) Finally it helps manage parent tasks and children. If a parent -// task gets aborted, all the children tasks are too. The nice thing -// about this, for example, is if you have one parent task that -// represents, say, and Xmpp connection, then you can spawn a whole bunch -// of infinite lifetime child tasks and now worry about cleaning them up. -// When the parent task goes to STATE_DONE, the task engine will make -// sure all those children are aborted and get deleted. -// -// Notice that Task has a few built-in states, e.g., -// -// STATE_INIT - the task isn't running yet -// STATE_START - the task is in its first state -// STATE_RESPONSE - the task is in its second state -// STATE_DONE - the task is done -// -// STATE_ERROR - indicates an error - we should audit the error code in -// light of any usage of it to see if it should be improved. When I -// first put down the task stuff I didn't have a good sense of what was -// needed for Abort and Error, and now the subclasses of Task will ground -// the design in a stronger way. -// -// STATE_NEXT - the first undefined state number. (like WM_USER) - you -// can start defining more task states there. -// -// When you define more task states, just override Process(int state) and -// add your own switch statement. If you want to delegate to -// Task::Process, you can effectively delegate to its switch statement. -// No fancy method pointers or such - this is all just pretty low tech, -// easy to debug, and fast. -// -// Also notice that Task has some primitive built-in timeout functionality. -// -// A timeout is defined as "the task stays in STATE_BLOCKED longer than -// timeout_seconds_." -// -// Descendant classes can override this behavior by calling the -// various protected methods to change the timeout behavior. For -// instance, a descendand might call SuspendTimeout() when it knows -// that it isn't waiting for anything that might timeout, but isn't -// yet in the STATE_DONE state. -// - -namespace rtc { - -// Executes a sequence of steps -class Task : public TaskParent { - public: - Task(TaskParent *parent); - ~Task() override; - - int32_t unique_id() { return unique_id_; } - - void Start(); - void Step(); - int GetState() const { return state_; } - bool HasError() const { return (GetState() == STATE_ERROR); } - bool Blocked() const { return blocked_; } - bool IsDone() const { return done_; } - int64_t ElapsedTime(); - - // Called from outside to stop task without any more callbacks - void Abort(bool nowake = false); - - bool TimedOut(); - - int64_t timeout_time() const { return timeout_time_; } - int timeout_seconds() const { return timeout_seconds_; } - void set_timeout_seconds(int timeout_seconds); - - sigslot::signal0<> SignalTimeout; - - // Called inside the task to signal that the task may be unblocked - void Wake(); - - protected: - - enum { - STATE_BLOCKED = -1, - STATE_INIT = 0, - STATE_START = 1, - STATE_DONE = 2, - STATE_ERROR = 3, - STATE_RESPONSE = 4, - STATE_NEXT = 5, // Subclasses which need more states start here and higher - }; - - // Called inside to advise that the task should wake and signal an error - void Error(); - - int64_t CurrentTime(); - - virtual std::string GetStateName(int state) const; - virtual int Process(int state); - virtual void Stop(); - virtual int ProcessStart() = 0; - virtual int ProcessResponse(); - - void ResetTimeout(); - void ClearTimeout(); - - void SuspendTimeout(); - void ResumeTimeout(); - - protected: - virtual int OnTimeout(); - - private: - void Done(); - - int state_; - bool blocked_; - bool done_; - bool aborted_; - bool busy_; - bool error_; - int64_t start_time_; - int64_t timeout_time_; - int timeout_seconds_; - bool timeout_suspended_; - int32_t unique_id_; - - static int32_t unique_id_seed_; -}; - -} // namespace rtc - -#endif // WEBRTC_BASE_TASK_H__ diff --git a/WebRtc.NET/include/webrtc/base/task_queue.h b/WebRtc.NET/include/webrtc/base/task_queue.h deleted file mode 100644 index eeabe05f..00000000 --- a/WebRtc.NET/include/webrtc/base/task_queue.h +++ /dev/null @@ -1,281 +0,0 @@ -/* - * Copyright 2016 The WebRTC Project Authors. All rights reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_BASE_TASK_QUEUE_H_ -#define WEBRTC_BASE_TASK_QUEUE_H_ - -#include -#include -#include - -#if defined(WEBRTC_MAC) && !defined(WEBRTC_BUILD_LIBEVENT) -#include -#endif - -#include "webrtc/base/constructormagic.h" -#include "webrtc/base/criticalsection.h" - -#if defined(WEBRTC_WIN) || defined(WEBRTC_BUILD_LIBEVENT) -#include "webrtc/base/platform_thread.h" -#endif - -#if defined(WEBRTC_BUILD_LIBEVENT) -struct event_base; -struct event; -#endif - -namespace rtc { - -// Base interface for asynchronously executed tasks. -// The interface basically consists of a single function, Run(), that executes -// on the target queue. For more details see the Run() method and TaskQueue. -class QueuedTask { - public: - QueuedTask() {} - virtual ~QueuedTask() {} - - // Main routine that will run when the task is executed on the desired queue. - // The task should return |true| to indicate that it should be deleted or - // |false| to indicate that the queue should consider ownership of the task - // having been transferred. Returning |false| can be useful if a task has - // re-posted itself to a different queue or is otherwise being re-used. - virtual bool Run() = 0; - - private: - RTC_DISALLOW_COPY_AND_ASSIGN(QueuedTask); -}; - -// Simple implementation of QueuedTask for use with rtc::Bind and lambdas. -template -class ClosureTask : public QueuedTask { - public: - explicit ClosureTask(const Closure& closure) : closure_(closure) {} - - private: - bool Run() override { - closure_(); - return true; - } - - Closure closure_; -}; - -// Extends ClosureTask to also allow specifying cleanup code. -// This is useful when using lambdas if guaranteeing cleanup, even if a task -// was dropped (queue is too full), is required. -template -class ClosureTaskWithCleanup : public ClosureTask { - public: - ClosureTaskWithCleanup(const Closure& closure, Cleanup cleanup) - : ClosureTask(closure), cleanup_(cleanup) {} - ~ClosureTaskWithCleanup() { cleanup_(); } - - private: - Cleanup cleanup_; -}; - -// Convenience function to construct closures that can be passed directly -// to methods that support std::unique_ptr but not template -// based parameters. -template -static std::unique_ptr NewClosure(const Closure& closure) { - return std::unique_ptr(new ClosureTask(closure)); -} - -template -static std::unique_ptr NewClosure(const Closure& closure, - const Cleanup& cleanup) { - return std::unique_ptr( - new ClosureTaskWithCleanup(closure, cleanup)); -} - -// Implements a task queue that asynchronously executes tasks in a way that -// guarantees that they're executed in FIFO order and that tasks never overlap. -// Tasks may always execute on the same worker thread and they may not. -// To DCHECK that tasks are executing on a known task queue, use IsCurrent(). -// -// Here are some usage examples: -// -// 1) Asynchronously running a lambda: -// -// class MyClass { -// ... -// TaskQueue queue_("MyQueue"); -// }; -// -// void MyClass::StartWork() { -// queue_.PostTask([]() { Work(); }); -// ... -// -// 2) Doing work asynchronously on a worker queue and providing a notification -// callback on the current queue, when the work has been done: -// -// void MyClass::StartWorkAndLetMeKnowWhenDone( -// std::unique_ptr callback) { -// DCHECK(TaskQueue::Current()) << "Need to be running on a queue"; -// queue_.PostTaskAndReply([]() { Work(); }, std::move(callback)); -// } -// ... -// my_class->StartWorkAndLetMeKnowWhenDone( -// NewClosure([]() { LOG(INFO) << "The work is done!";})); -// -// 3) Posting a custom task on a timer. The task posts itself again after -// every running: -// -// class TimerTask : public QueuedTask { -// public: -// TimerTask() {} -// private: -// bool Run() override { -// ++count_; -// TaskQueue::Current()->PostDelayedTask( -// std::unique_ptr(this), 1000); -// // Ownership has been transferred to the next occurance, -// // so return false to prevent from being deleted now. -// return false; -// } -// int count_ = 0; -// }; -// ... -// queue_.PostDelayedTask( -// std::unique_ptr(new TimerTask()), 1000); -// -// For more examples, see task_queue_unittests.cc. -// -// A note on destruction: -// -// When a TaskQueue is deleted, pending tasks will not be executed but they will -// be deleted. The deletion of tasks may happen asynchronously after the -// TaskQueue itself has been deleted or it may happen synchronously while the -// TaskQueue instance is being deleted. This may vary from one OS to the next -// so assumptions about lifetimes of pending tasks should not be made. -class LOCKABLE TaskQueue { - public: - explicit TaskQueue(const char* queue_name); - // TODO(tommi): Implement move semantics? - ~TaskQueue(); - - static TaskQueue* Current(); - - // Used for DCHECKing the current queue. - static bool IsCurrent(const char* queue_name); - bool IsCurrent() const; - - // TODO(tommi): For better debuggability, implement RTC_FROM_HERE. - - // Ownership of the task is passed to PostTask. - void PostTask(std::unique_ptr task); - void PostTaskAndReply(std::unique_ptr task, - std::unique_ptr reply, - TaskQueue* reply_queue); - void PostTaskAndReply(std::unique_ptr task, - std::unique_ptr reply); - - void PostDelayedTask(std::unique_ptr task, uint32_t milliseconds); - - template - void PostTask(const Closure& closure) { - PostTask(std::unique_ptr(new ClosureTask(closure))); - } - - template - void PostDelayedTask(const Closure& closure, uint32_t milliseconds) { - PostDelayedTask( - std::unique_ptr(new ClosureTask(closure)), - milliseconds); - } - - template - void PostTaskAndReply(const Closure1& task, - const Closure2& reply, - TaskQueue* reply_queue) { - PostTaskAndReply( - std::unique_ptr(new ClosureTask(task)), - std::unique_ptr(new ClosureTask(reply)), - reply_queue); - } - - template - void PostTaskAndReply(std::unique_ptr task, - const Closure& reply) { - PostTaskAndReply(std::move(task), std::unique_ptr( - new ClosureTask(reply))); - } - - template - void PostTaskAndReply(const Closure& task, - std::unique_ptr reply) { - PostTaskAndReply( - std::unique_ptr(new ClosureTask(task)), - std::move(reply)); - } - - template - void PostTaskAndReply(const Closure1& task, const Closure2& reply) { - PostTaskAndReply( - std::unique_ptr(new ClosureTask(task)), - std::unique_ptr(new ClosureTask(reply))); - } - - private: -#if defined(WEBRTC_BUILD_LIBEVENT) - static bool ThreadMain(void* context); - static void OnWakeup(int socket, short flags, void* context); // NOLINT - static void RunTask(int fd, short flags, void* context); // NOLINT - static void RunTimer(int fd, short flags, void* context); // NOLINT - - class PostAndReplyTask; - class SetTimerTask; - - void PrepareReplyTask(PostAndReplyTask* reply_task); - void ReplyTaskDone(PostAndReplyTask* reply_task); - - struct QueueContext; - - int wakeup_pipe_in_ = -1; - int wakeup_pipe_out_ = -1; - event_base* event_base_; - std::unique_ptr wakeup_event_; - PlatformThread thread_; - rtc::CriticalSection pending_lock_; - std::list> pending_ GUARDED_BY(pending_lock_); - std::list pending_replies_ GUARDED_BY(pending_lock_); -#elif defined(WEBRTC_MAC) - struct QueueContext; - struct TaskContext; - struct PostTaskAndReplyContext; - dispatch_queue_t queue_; - QueueContext* const context_; -#elif defined(WEBRTC_WIN) - typedef std::unordered_map> - DelayedTasks; - static bool ThreadMain(void* context); - static bool ProcessQueuedMessages(DelayedTasks* delayed_tasks); - - class WorkerThread : public PlatformThread { - public: - WorkerThread(ThreadRunFunction func, void* obj, const char* thread_name) - : PlatformThread(func, obj, thread_name) {} - - bool QueueAPC(PAPCFUNC apc_function, ULONG_PTR data) { - return PlatformThread::QueueAPC(apc_function, data); - } - }; - WorkerThread thread_; -#else -#error not supported. -#endif - - RTC_DISALLOW_COPY_AND_ASSIGN(TaskQueue); -}; - -} // namespace rtc - -#endif // WEBRTC_BASE_TASK_QUEUE_H_ diff --git a/WebRtc.NET/include/webrtc/base/taskparent.h b/WebRtc.NET/include/webrtc/base/taskparent.h deleted file mode 100644 index 00211645..00000000 --- a/WebRtc.NET/include/webrtc/base/taskparent.h +++ /dev/null @@ -1,63 +0,0 @@ -/* - * Copyright 2004 The WebRTC Project Authors. All rights reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_BASE_TASKPARENT_H__ -#define WEBRTC_BASE_TASKPARENT_H__ - -#include -#include - -#include "webrtc/base/checks.h" -#include "webrtc/base/constructormagic.h" - -namespace rtc { - -class Task; -class TaskRunner; - -class TaskParent { - public: - TaskParent(Task *derived_instance, TaskParent *parent); - explicit TaskParent(TaskRunner *derived_instance); - virtual ~TaskParent(); - - TaskParent *GetParent() { return parent_; } - TaskRunner *GetRunner() { return runner_; } - - bool AllChildrenDone(); - bool AnyChildError(); -#if RTC_DCHECK_IS_ON - bool IsChildTask(Task *task); -#endif - - protected: - void OnStopped(Task *task); - void AbortAllChildren(); - TaskParent *parent() { - return parent_; - } - - private: - void Initialize(); - void OnChildStopped(Task *child); - void AddChild(Task *child); - - TaskParent *parent_; - TaskRunner *runner_; - bool child_error_; - typedef std::set ChildSet; - std::unique_ptr children_; - RTC_DISALLOW_COPY_AND_ASSIGN(TaskParent); -}; - - -} // namespace rtc - -#endif // WEBRTC_BASE_TASKPARENT_H__ diff --git a/WebRtc.NET/include/webrtc/base/taskrunner.h b/WebRtc.NET/include/webrtc/base/taskrunner.h deleted file mode 100644 index f59677a8..00000000 --- a/WebRtc.NET/include/webrtc/base/taskrunner.h +++ /dev/null @@ -1,102 +0,0 @@ -/* - * Copyright 2004 The WebRTC Project Authors. All rights reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_BASE_TASKRUNNER_H__ -#define WEBRTC_BASE_TASKRUNNER_H__ - -#include - -#include - -#include "webrtc/base/checks.h" -#include "webrtc/base/sigslot.h" -#include "webrtc/base/taskparent.h" - -namespace rtc { -class Task; - -const int64_t kSecToMsec = 1000; -const int64_t kMsecTo100ns = 10000; -const int64_t kSecTo100ns = kSecToMsec * kMsecTo100ns; - -class TaskRunner : public TaskParent, public sigslot::has_slots<> { - public: - TaskRunner(); - ~TaskRunner() override; - - virtual void WakeTasks() = 0; - - // Returns the current time in 100ns units. It is used for - // determining timeouts. The origin is not important, only - // the units and that rollover while the computer is running. - // - // On Windows, GetSystemTimeAsFileTime is the typical implementation. - virtual int64_t CurrentTime() = 0; - - void StartTask(Task *task); - void RunTasks(); - void PollTasks(); - - void UpdateTaskTimeout(Task* task, int64_t previous_task_timeout_time); - -#if RTC_DCHECK_IS_ON - bool is_ok_to_delete(Task* task) { - return task == deleting_task_; - } - - void IncrementAbortCount() { - ++abort_count_; - } - - void DecrementAbortCount() { - --abort_count_; - } -#endif - - // Returns the next absolute time when a task times out - // OR "0" if there is no next timeout. - int64_t next_task_timeout() const; - - protected: - // The primary usage of this method is to know if - // a callback timer needs to be set-up or adjusted. - // This method will be called - // * when the next_task_timeout() becomes a smaller value OR - // * when next_task_timeout() has changed values and the previous - // value is in the past. - // - // If the next_task_timeout moves to the future, this method will *not* - // get called (because it subclass should check next_task_timeout() - // when its timer goes off up to see if it needs to set-up a new timer). - // - // Note that this maybe called conservatively. In that it may be - // called when no time change has happened. - virtual void OnTimeoutChange() { - // by default, do nothing. - } - - private: - void InternalRunTasks(bool in_destructor); - void CheckForTimeoutChange(int64_t previous_timeout_time); - - std::vector tasks_; - Task *next_timeout_task_ = nullptr; - bool tasks_running_ = false; -#if RTC_DCHECK_IS_ON - int abort_count_ = 0; - Task* deleting_task_ = nullptr; -#endif - - void RecalcNextTimeout(Task *exclude_task); -}; - -} // namespace rtc - -#endif // TASK_BASE_TASKRUNNER_H__ diff --git a/WebRtc.NET/include/webrtc/base/template_util.h b/WebRtc.NET/include/webrtc/base/template_util.h deleted file mode 100644 index 31464cf3..00000000 --- a/WebRtc.NET/include/webrtc/base/template_util.h +++ /dev/null @@ -1,127 +0,0 @@ -/* - * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -// Borrowed from Chromium's src/base/template_util.h. - -#ifndef WEBRTC_BASE_TEMPLATE_UTIL_H_ -#define WEBRTC_BASE_TEMPLATE_UTIL_H_ - -#include // For size_t. - -namespace rtc { - -// Template definitions from tr1. - -template -struct integral_constant { - static const T value = v; - typedef T value_type; - typedef integral_constant type; -}; - -template const T integral_constant::value; - -typedef integral_constant true_type; -typedef integral_constant false_type; - -template struct is_pointer : false_type {}; -template struct is_pointer : true_type {}; - -template struct is_same : public false_type {}; -template struct is_same : true_type {}; - -template struct is_array : public false_type {}; -template struct is_array : public true_type {}; -template struct is_array : public true_type {}; - -template struct is_non_const_reference : false_type {}; -template struct is_non_const_reference : true_type {}; -template struct is_non_const_reference : false_type {}; - -template struct is_void : false_type {}; -template <> struct is_void : true_type {}; - -template -struct remove_reference { - typedef T type; -}; -template -struct remove_reference { - typedef T type; -}; -template -struct remove_reference { - typedef T type; -}; - -namespace internal { - -// Types YesType and NoType are guaranteed such that sizeof(YesType) < -// sizeof(NoType). -typedef char YesType; - -struct NoType { - YesType dummy[2]; -}; - -// This class is an implementation detail for is_convertible, and you -// don't need to know how it works to use is_convertible. For those -// who care: we declare two different functions, one whose argument is -// of type To and one with a variadic argument list. We give them -// return types of different size, so we can use sizeof to trick the -// compiler into telling us which function it would have chosen if we -// had called it with an argument of type From. See Alexandrescu's -// _Modern C++ Design_ for more details on this sort of trick. - -struct ConvertHelper { - template - static YesType Test(To); - - template - static NoType Test(...); - - template - static From& Create(); -}; - -// Used to determine if a type is a struct/union/class. Inspired by Boost's -// is_class type_trait implementation. -struct IsClassHelper { - template - static YesType Test(void(C::*)(void)); - - template - static NoType Test(...); -}; - -} // namespace internal - -// Inherits from true_type if From is convertible to To, false_type otherwise. -// -// Note that if the type is convertible, this will be a true_type REGARDLESS -// of whether or not the conversion would emit a warning. -template -struct is_convertible - : integral_constant( - internal::ConvertHelper::Create())) == - sizeof(internal::YesType)> { -}; - -template -struct is_class - : integral_constant(0)) == - sizeof(internal::YesType)> { -}; - -} // namespace rtc - -#endif // WEBRTC_BASE_TEMPLATE_UTIL_H_ diff --git a/WebRtc.NET/include/webrtc/base/testbase64.h b/WebRtc.NET/include/webrtc/base/testbase64.h deleted file mode 100644 index 39dd00ce..00000000 --- a/WebRtc.NET/include/webrtc/base/testbase64.h +++ /dev/null @@ -1,5 +0,0 @@ -/* This file was generated by googleclient/talk/binary2header.sh */ - -static unsigned char testbase64[] = { -0xff, 0xd8, 0xff, 0xe0, 0x00, 0x10, 0x4a, 0x46, 0x49, 0x46, 0x00, 0x01, 0x02, 0x01, 0x00, 0x48, 0x00, 0x48, 0x00, 0x00, 0xff, 0xe1, 0x0d, 0x07, 0x45, 0x78, 0x69, 0x66, 0x00, 0x00, 0x4d, 0x4d, 0x00, 0x2a, 0x00, 0x00, 0x00, 0x08, 0x00, 0x0c, 0x01, 0x0e, 0x00, 0x02, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x9e, 0x01, 0x0f, 0x00, 0x02, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0xbe, 0x01, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0xc3, 0x01, 0x12, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x01, 0x00, 0x00, 0x01, 0x1a, 0x00, 0x05, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0xcc, 0x01, 0x1b, 0x00, 0x05, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0xd4, 0x01, 0x28, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x02, 0x00, 0x00, 0x01, 0x31, 0x00, 0x02, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0xdc, 0x01, 0x32, 0x00, 0x02, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0xf0, 0x01, 0x3c, 0x00, 0x02, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x01, 0x04, 0x02, 0x13, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x02, 0x00, 0x00, 0x87, 0x69, 0x00, 0x04, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x01, 0x14, 0x00, 0x00, 0x02, 0xc4, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x00, 0x53, 0x4f, 0x4e, 0x59, 0x00, 0x44, 0x53, 0x43, 0x2d, 0x50, 0x32, 0x30, 0x30, 0x00, 0x00, 0x00, 0x00, 0x48, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x48, 0x00, 0x00, 0x00, 0x01, 0x41, 0x64, 0x6f, 0x62, 0x65, 0x20, 0x50, 0x68, 0x6f, 0x74, 0x6f, 0x73, 0x68, 0x6f, 0x70, 0x20, 0x37, 0x2e, 0x30, 0x00, 0x32, 0x30, 0x30, 0x37, 0x3a, 0x30, 0x31, 0x3a, 0x33, 0x30, 0x20, 0x32, 0x33, 0x3a, 0x31, 0x30, 0x3a, 0x30, 0x34, 0x00, 0x4d, 0x61, 0x63, 0x20, 0x4f, 0x53, 0x20, 0x58, 0x20, 0x31, 0x30, 0x2e, 0x34, 0x2e, 0x38, 0x00, 0x00, 0x1c, 0x82, 0x9a, 0x00, 0x05, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x02, 0x6a, 0x82, 0x9d, 0x00, 0x05, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x02, 0x72, 0x88, 0x22, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x02, 0x00, 0x00, 0x88, 0x27, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x64, 0x00, 0x00, 0x90, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x04, 0x30, 0x32, 0x32, 0x30, 0x90, 0x03, 0x00, 0x02, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x02, 0x7a, 0x90, 0x04, 0x00, 0x02, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x02, 0x8e, 0x91, 0x01, 0x00, 0x07, 0x00, 0x00, 0x00, 0x04, 0x01, 0x02, 0x03, 0x00, 0x91, 0x02, 0x00, 0x05, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x02, 0xa2, 0x92, 0x04, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x02, 0xaa, 0x92, 0x05, 0x00, 0x05, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x02, 0xb2, 0x92, 0x07, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x05, 0x00, 0x00, 0x92, 0x08, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x92, 0x09, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0f, 0x00, 0x00, 0x92, 0x0a, 0x00, 0x05, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x02, 0xba, 0xa0, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x04, 0x30, 0x31, 0x30, 0x30, 0xa0, 0x01, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0xff, 0xff, 0x00, 0x00, 0xa0, 0x02, 0x00, 0x04, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x64, 0xa0, 0x03, 0x00, 0x04, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x64, 0xa3, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x01, 0x03, 0x00, 0x00, 0x00, 0xa3, 0x01, 0x00, 0x07, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0xa4, 0x01, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0xa4, 0x02, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0xa4, 0x03, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0xa4, 0x06, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0xa4, 0x08, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0xa4, 0x09, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0xa4, 0x0a, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x01, 0x90, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x0a, 0x32, 0x30, 0x30, 0x37, 0x3a, 0x30, 0x31, 0x3a, 0x32, 0x30, 0x20, 0x32, 0x33, 0x3a, 0x30, 0x35, 0x3a, 0x35, 0x32, 0x00, 0x32, 0x30, 0x30, 0x37, 0x3a, 0x30, 0x31, 0x3a, 0x32, 0x30, 0x20, 0x32, 0x33, 0x3a, 0x30, 0x35, 0x3a, 0x35, 0x32, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x4f, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x06, 0x01, 0x03, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x06, 0x00, 0x00, 0x01, 0x1a, 0x00, 0x05, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x03, 0x12, 0x01, 0x1b, 0x00, 0x05, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x03, 0x1a, 0x01, 0x28, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x02, 0x00, 0x00, 0x02, 0x01, 0x00, 0x04, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x03, 0x22, 0x02, 0x02, 0x00, 0x04, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x09, 0xdd, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x48, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x48, 0x00, 0x00, 0x00, 0x01, 0xff, 0xd8, 0xff, 0xe0, 0x00, 0x10, 0x4a, 0x46, 0x49, 0x46, 0x00, 0x01, 0x02, 0x01, 0x00, 0x48, 0x00, 0x48, 0x00, 0x00, 0xff, 0xed, 0x00, 0x0c, 0x41, 0x64, 0x6f, 0x62, 0x65, 0x5f, 0x43, 0x4d, 0x00, 0x02, 0xff, 0xee, 0x00, 0x0e, 0x41, 0x64, 0x6f, 0x62, 0x65, 0x00, 0x64, 0x80, 0x00, 0x00, 0x00, 0x01, 0xff, 0xdb, 0x00, 0x84, 0x00, 0x0c, 0x08, 0x08, 0x08, 0x09, 0x08, 0x0c, 0x09, 0x09, 0x0c, 0x11, 0x0b, 0x0a, 0x0b, 0x11, 0x15, 0x0f, 0x0c, 0x0c, 0x0f, 0x15, 0x18, 0x13, 0x13, 0x15, 0x13, 0x13, 0x18, 0x11, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x11, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x01, 0x0d, 0x0b, 0x0b, 0x0d, 0x0e, 0x0d, 0x10, 0x0e, 0x0e, 0x10, 0x14, 0x0e, 0x0e, 0x0e, 0x14, 0x14, 0x0e, 0x0e, 0x0e, 0x0e, 0x14, 0x11, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x11, 0x11, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x11, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0xff, 0xc0, 0x00, 0x11, 0x08, 0x00, 0x64, 0x00, 0x64, 0x03, 0x01, 0x22, 0x00, 0x02, 0x11, 0x01, 0x03, 0x11, 0x01, 0xff, 0xdd, 0x00, 0x04, 0x00, 0x07, 0xff, 0xc4, 0x01, 0x3f, 0x00, 0x00, 0x01, 0x05, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x01, 0x02, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x01, 0x00, 0x01, 0x05, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x10, 0x00, 0x01, 0x04, 0x01, 0x03, 0x02, 0x04, 0x02, 0x05, 0x07, 0x06, 0x08, 0x05, 0x03, 0x0c, 0x33, 0x01, 0x00, 0x02, 0x11, 0x03, 0x04, 0x21, 0x12, 0x31, 0x05, 0x41, 0x51, 0x61, 0x13, 0x22, 0x71, 0x81, 0x32, 0x06, 0x14, 0x91, 0xa1, 0xb1, 0x42, 0x23, 0x24, 0x15, 0x52, 0xc1, 0x62, 0x33, 0x34, 0x72, 0x82, 0xd1, 0x43, 0x07, 0x25, 0x92, 0x53, 0xf0, 0xe1, 0xf1, 0x63, 0x73, 0x35, 0x16, 0xa2, 0xb2, 0x83, 0x26, 0x44, 0x93, 0x54, 0x64, 0x45, 0xc2, 0xa3, 0x74, 0x36, 0x17, 0xd2, 0x55, 0xe2, 0x65, 0xf2, 0xb3, 0x84, 0xc3, 0xd3, 0x75, 0xe3, 0xf3, 0x46, 0x27, 0x94, 0xa4, 0x85, 0xb4, 0x95, 0xc4, 0xd4, 0xe4, 0xf4, 0xa5, 0xb5, 0xc5, 0xd5, 0xe5, 0xf5, 0x56, 0x66, 0x76, 0x86, 0x96, 0xa6, 0xb6, 0xc6, 0xd6, 0xe6, 0xf6, 0x37, 0x47, 0x57, 0x67, 0x77, 0x87, 0x97, 0xa7, 0xb7, 0xc7, 0xd7, 0xe7, 0xf7, 0x11, 0x00, 0x02, 0x02, 0x01, 0x02, 0x04, 0x04, 0x03, 0x04, 0x05, 0x06, 0x07, 0x07, 0x06, 0x05, 0x35, 0x01, 0x00, 0x02, 0x11, 0x03, 0x21, 0x31, 0x12, 0x04, 0x41, 0x51, 0x61, 0x71, 0x22, 0x13, 0x05, 0x32, 0x81, 0x91, 0x14, 0xa1, 0xb1, 0x42, 0x23, 0xc1, 0x52, 0xd1, 0xf0, 0x33, 0x24, 0x62, 0xe1, 0x72, 0x82, 0x92, 0x43, 0x53, 0x15, 0x63, 0x73, 0x34, 0xf1, 0x25, 0x06, 0x16, 0xa2, 0xb2, 0x83, 0x07, 0x26, 0x35, 0xc2, 0xd2, 0x44, 0x93, 0x54, 0xa3, 0x17, 0x64, 0x45, 0x55, 0x36, 0x74, 0x65, 0xe2, 0xf2, 0xb3, 0x84, 0xc3, 0xd3, 0x75, 0xe3, 0xf3, 0x46, 0x94, 0xa4, 0x85, 0xb4, 0x95, 0xc4, 0xd4, 0xe4, 0xf4, 0xa5, 0xb5, 0xc5, 0xd5, 0xe5, 0xf5, 0x56, 0x66, 0x76, 0x86, 0x96, 0xa6, 0xb6, 0xc6, 0xd6, 0xe6, 0xf6, 0x27, 0x37, 0x47, 0x57, 0x67, 0x77, 0x87, 0x97, 0xa7, 0xb7, 0xc7, 0xff, 0xda, 0x00, 0x0c, 0x03, 0x01, 0x00, 0x02, 0x11, 0x03, 0x11, 0x00, 0x3f, 0x00, 0xf2, 0xed, 0xb2, 0x8d, 0x4d, 0x45, 0xcd, 0x2f, 0x3f, 0x44, 0x68, 0x93, 0xc3, 0x58, 0xc8, 0xf1, 0x1f, 0x8a, 0x33, 0x86, 0xda, 0x58, 0xc1, 0xa0, 0x02, 0x4f, 0xc4, 0xa1, 0x69, 0xa5, 0x9b, 0x5b, 0x4b, 0x84, 0x73, 0xdf, 0xc9, 0x15, 0xf8, 0xe3, 0xd1, 0x0e, 0x07, 0x93, 0xf3, 0xd1, 0x0f, 0x1c, 0x17, 0xef, 0x2e, 0x3b, 0x5b, 0xdc, 0xff, 0x00, 0xdf, 0x42, 0xbf, 0x8f, 0x8e, 0xdc, 0x82, 0xca, 0xd8, 0x37, 0x11, 0xa9, 0x3d, 0x82, 0x69, 0x2b, 0xc4, 0x6d, 0xc9, 0x75, 0x25, 0xbc, 0xf7, 0xec, 0xa1, 0xb5, 0x74, 0x19, 0x5d, 0x2e, 0x8a, 0x9a, 0x4b, 0x89, 0x7d, 0xc4, 0x68, 0xc6, 0xf6, 0xfe, 0xb2, 0xa0, 0x30, 0x1d, 0x60, 0x86, 0x88, 0x8d, 0x49, 0x3e, 0x01, 0x11, 0x20, 0xa3, 0x8c, 0xb9, 0xb1, 0xaa, 0x62, 0xad, 0xbf, 0x18, 0x97, 0x43, 0x47, 0x1d, 0xd2, 0xaf, 0x04, 0xd9, 0xb8, 0xc8, 0x0d, 0x68, 0xe4, 0xf7, 0x3e, 0x48, 0xf1, 0x05, 0xbc, 0x25, 0xaa, 0x07, 0x71, 0xd9, 0x14, 0x78, 0xf6, 0x49, 0xb5, 0x90, 0xfd, 0xa7, 0xc6, 0x14, 0xfd, 0x1b, 0x1c, 0xff, 0x00, 0x4d, 0x8d, 0x2e, 0x73, 0x8c, 0x35, 0xa3, 0x52, 0x4f, 0x92, 0x48, 0xa6, 0x1a, 0x24, 0xb6, 0x2a, 0xfa, 0xa5, 0x9e, 0x60, 0x64, 0x39, 0x94, 0x13, 0xcb, 0x27, 0x73, 0x80, 0xf3, 0x0c, 0xf6, 0xff, 0x00, 0xd2, 0x5a, 0x78, 0xbf, 0x53, 0x71, 0xf6, 0x01, 0x75, 0xb6, 0x97, 0x6a, 0x25, 0xa1, 0xad, 0x1f, 0xf4, 0xb7, 0x23, 0x48, 0xb7, 0x94, 0x84, 0x97, 0x5b, 0xff, 0x00, 0x32, 0xa9, 0xdd, 0xfc, 0xed, 0x9b, 0x7e, 0x0d, 0x9e, 0x52, 0x4a, 0x95, 0x61, 0xff, 0xd0, 0xf3, 0x3b, 0xa7, 0x70, 0xee, 0x01, 0x8f, 0xb9, 0x59, 0xfa, 0x7e, 0xdf, 0xe4, 0xc8, 0xf9, 0x2a, 0xc2, 0x5c, 0x63, 0xc3, 0x54, 0x67, 0x87, 0x6e, 0x10, 0x35, 0x68, 0xd4, 0x79, 0x1e, 0x53, 0x4a, 0xe0, 0xdc, 0xe9, 0xb8, 0x1f, 0x6a, 0xda, 0x6c, 0x25, 0x94, 0x37, 0xb0, 0xd0, 0xb8, 0xad, 0x67, 0xe4, 0x55, 0x8a, 0x5b, 0x8b, 0x82, 0xc0, 0x6f, 0x76, 0x80, 0x34, 0x49, 0x05, 0x2e, 0x9e, 0xc6, 0x1c, 0x66, 0x31, 0xba, 0x10, 0x23, 0xe0, 0xaf, 0xe1, 0x61, 0x53, 0x43, 0x8d, 0x81, 0xb3, 0x67, 0xef, 0x9e, 0x49, 0x2a, 0x12, 0x6c, 0xb6, 0x63, 0x1a, 0x0c, 0x31, 0xba, 0x55, 0xcd, 0xac, 0xfa, 0x8e, 0xdf, 0x91, 0x6e, 0x91, 0xd9, 0xb3, 0xc9, 0x73, 0x90, 0x7a, 0xab, 0x6a, 0xc2, 0xa4, 0x60, 0xe2, 0x8f, 0xd2, 0x38, 0x03, 0x7d, 0x9e, 0x0d, 0xff, 0x00, 0xcc, 0xd6, 0xd3, 0x6b, 0x71, 0x67, 0xd2, 0x3e, 0x64, 0x72, 0xab, 0xdb, 0x8d, 0x54, 0x39, 0xc5, 0x83, 0x6b, 0x3d, 0xee, 0x2e, 0xd4, 0x92, 0x3c, 0x4a, 0x56, 0xba, 0xb4, 0x79, 0x5c, 0xf7, 0xb2, 0x96, 0x6c, 0x8d, 0xaf, 0x80, 0x48, 0x3c, 0xf0, 0xb2, 0x1f, 0x63, 0x9c, 0xe9, 0x3f, 0x24, 0x5c, 0xdb, 0xdd, 0x76, 0x43, 0xde, 0xfd, 0x5c, 0xe3, 0x24, 0xfc, 0x50, 0x00, 0x93, 0x0a, 0x78, 0x8a, 0x0d, 0x49, 0xca, 0xcf, 0x93, 0x63, 0x1b, 0x7d, 0xd7, 0x57, 0x50, 0xd5, 0xef, 0x70, 0x6b, 0x4f, 0xc7, 0x45, 0xdb, 0x74, 0x9e, 0x8d, 0x5e, 0x33, 0x83, 0xd8, 0x37, 0xdd, 0xc3, 0xac, 0x3d, 0xbf, 0x92, 0xc5, 0x5b, 0xea, 0xbf, 0xd5, 0x62, 0xc0, 0xdc, 0xbc, 0xbd, 0x2d, 0x22, 0x5a, 0xcf, 0xdd, 0x69, 0xff, 0x00, 0xd1, 0x8e, 0x5d, 0xa5, 0x38, 0xb5, 0xb0, 0x00, 0xc6, 0xc4, 0x24, 0x4a, 0xd6, 0x8d, 0x18, 0x04, 0x49, 0x88, 0x9e, 0x55, 0xd6, 0x61, 0xb0, 0xc1, 0x70, 0x32, 0xdd, 0x3c, 0x95, 0xda, 0xf1, 0xfe, 0xf5, 0x62, 0xbc, 0x76, 0x8e, 0x75, 0x28, 0x02, 0xa2, 0xe7, 0x7d, 0x92, 0xb9, 0x84, 0x96, 0x96, 0xda, 0xf7, 0x70, 0x12, 0x4e, 0x5a, 0xff, 0x00, 0xff, 0xd1, 0xf3, 0x7a, 0x21, 0xaf, 0xde, 0xef, 0xa2, 0x22, 0x55, 0xfc, 0x5a, 0xbd, 0x42, 0xfb, 0x08, 0xfa, 0x67, 0x4f, 0x82, 0xcd, 0x6d, 0x85, 0xc0, 0x56, 0x3b, 0x90, 0xb7, 0xf0, 0x2a, 0x0e, 0x63, 0x58, 0x3b, 0xf2, 0xa3, 0x9e, 0x8c, 0xb8, 0x86, 0xbe, 0x49, 0xf1, 0x2c, 0x0c, 0x86, 0xb4, 0x4c, 0x69, 0xe4, 0xaf, 0x6e, 0xcc, 0x6b, 0x7d, 0x46, 0xb3, 0x70, 0xec, 0x38, 0x51, 0x7d, 0x02, 0x8a, 0xc7, 0xa6, 0xd9, 0x20, 0x68, 0x0f, 0x8f, 0x8a, 0xcf, 0xc9, 0xc2, 0xea, 0x59, 0x5b, 0x48, 0xb0, 0x91, 0xae, 0xe6, 0xc9, 0x03, 0xc9, 0x30, 0x51, 0x66, 0xd4, 0x0d, 0xad, 0xbd, 0x5f, 0x53, 0xcc, 0x6b, 0xb6, 0x90, 0x5a, 0x3b, 0x83, 0x0b, 0x43, 0x17, 0x31, 0xd6, 0xc3, 0x6e, 0x12, 0x3b, 0x79, 0xac, 0xc1, 0x89, 0x47, 0xd9, 0xe8, 0x63, 0x98, 0x45, 0xed, 0x6c, 0x5a, 0xf1, 0xa0, 0x27, 0xc5, 0x5b, 0xc3, 0x6f, 0xa6, 0xe0, 0x1c, 0x7d, 0xb3, 0xa2, 0x69, 0x34, 0x7b, 0xae, 0x1a, 0x8d, 0x45, 0x17, 0x9d, 0xeb, 0xfd, 0x21, 0xd8, 0xb9, 0xae, 0xb5, 0x80, 0xbb, 0x1e, 0xd2, 0x5c, 0xd7, 0x78, 0x13, 0xf9, 0xae, 0x4b, 0xea, 0xc7, 0x4a, 0x39, 0xbd, 0x55, 0xb3, 0xed, 0x66, 0x38, 0xf5, 0x09, 0x22, 0x41, 0x23, 0xe8, 0x37, 0xfb, 0x4b, 0xa1, 0xeb, 0xd6, 0xfe, 0x88, 0x31, 0xbf, 0x41, 0xc0, 0xee, 0xd2, 0x74, 0x02, 0x78, 0x53, 0xfa, 0x97, 0x43, 0x19, 0x85, 0x65, 0xff, 0x00, 0x9d, 0x71, 0x33, 0xe4, 0x1a, 0x7d, 0x8d, 0x53, 0x42, 0x56, 0x35, 0x6b, 0xe5, 0x80, 0x06, 0xc7, 0x57, 0xa7, 0xc4, 0xa9, 0xdb, 0xb6, 0x81, 0x1f, 0xeb, 0xd9, 0x69, 0x56, 0xc2, 0xd0, 0x00, 0xe5, 0x55, 0xc0, 0x12, 0xc2, 0xd7, 0x4e, 0xa2, 0x5a, 0x7c, 0x0a, 0xd0, 0x63, 0x9a, 0xd1, 0xaf, 0xd2, 0xe2, 0x3c, 0x12, 0x62, 0x66, 0xc6, 0x42, 0x23, 0x5a, 0x49, 0x8f, 0x10, 0xa2, 0xd2, 0x3e, 0x28, 0x9d, 0xc4, 0x88, 0x09, 0x29, 0x16, 0xc3, 0x3c, 0x24, 0x8d, 0xe6, 0x92, 0x72, 0x1f, 0xff, 0xd2, 0xf3, 0xbb, 0xb0, 0xfe, 0xcb, 0x99, 0xe9, 0xce, 0xf6, 0x88, 0x2d, 0x77, 0x91, 0x5b, 0x3d, 0x3d, 0xd0, 0xe6, 0x90, 0xa9, 0x65, 0x57, 0x38, 0x95, 0xdd, 0xcb, 0x9a, 0x7d, 0xce, 0xf2, 0x3f, 0x44, 0x23, 0x60, 0x58, 0x76, 0xe9, 0xca, 0x8c, 0xea, 0x1b, 0x31, 0x02, 0x32, 0x23, 0xea, 0xee, 0xb1, 0xcd, 0xb0, 0xc7, 0x87, 0x74, 0x7a, 0xeb, 0x70, 0x1a, 0x71, 0xe1, 0xfe, 0xe4, 0x1c, 0x1d, 0xae, 0xe5, 0x69, 0xd8, 0xfa, 0x99, 0x50, 0x0d, 0x1a, 0xf7, 0x2a, 0x3a, 0x0c, 0xf4, 0x1a, 0x8e, 0xc7, 0x27, 0x5d, 0xbf, 0x18, 0x41, 0xdc, 0xc2, 0xf0, 0x7f, 0x74, 0xf6, 0x3a, 0x22, 0x66, 0xdb, 0x68, 0xc6, 0x80, 0x48, 0x6b, 0x88, 0x06, 0x39, 0x0d, 0xee, 0xaa, 0x1f, 0xb3, 0xd5, 0x1b, 0x83, 0xd8, 0x3b, 0x38, 0x8f, 0x69, 0xfe, 0xdf, 0xd1, 0x4d, 0x29, 0xa1, 0x4c, 0x7a, 0xf4, 0xbf, 0xa7, 0x92, 0xcf, 0xa5, 0x20, 0x08, 0xf3, 0xf6, 0xff, 0x00, 0x15, 0xbb, 0xd1, 0x31, 0xd9, 0x5e, 0x3d, 0x75, 0x56, 0x36, 0x88, 0x00, 0x81, 0xe0, 0x16, 0x5e, 0x55, 0x74, 0x3f, 0x00, 0x9d, 0xe0, 0xcc, 0x69, 0xe7, 0x3a, 0x2d, 0xbe, 0x90, 0x00, 0xa9, 0xae, 0xef, 0x1f, 0x95, 0x4b, 0x0d, 0x9a, 0xdc, 0xc7, 0x45, 0xfe, 0xb1, 0x7d, 0x60, 0xa7, 0xa1, 0xe0, 0x1f, 0x4e, 0x1d, 0x99, 0x69, 0x02, 0x9a, 0xcf, 0x1f, 0xca, 0x7b, 0xbf, 0x90, 0xc5, 0xc2, 0xb3, 0xeb, 0x57, 0xd6, 0x03, 0x6b, 0xae, 0x39, 0xb6, 0x82, 0xe3, 0x31, 0xa1, 0x68, 0xf2, 0x6b, 0x5c, 0x12, 0xfa, 0xe1, 0x91, 0x66, 0x47, 0x5d, 0xb8, 0x3b, 0x4f, 0x44, 0x36, 0xb6, 0x8f, 0x28, 0xdd, 0xff, 0x00, 0x7e, 0x46, 0xab, 0x12, 0x2b, 0x65, 0x55, 0x32, 0xa7, 0x62, 0xb6, 0xbd, 0xf7, 0x64, 0x10, 0xdb, 0x03, 0x9f, 0x1b, 0x9e, 0xc7, 0xd9, 0xb8, 0x3b, 0x1f, 0x67, 0xf3, 0x6c, 0x52, 0x80, 0xd7, 0x7d, 0x0f, 0xea, 0x7f, 0x5d, 0x1d, 0x67, 0xa6, 0x0b, 0x1e, 0x47, 0xda, 0x69, 0x3b, 0x2e, 0x03, 0xc7, 0xf3, 0x5f, 0x1f, 0xf0, 0x8b, 0xa1, 0x02, 0x46, 0xba, 0x79, 0xaf, 0x32, 0xff, 0x00, 0x16, 0xad, 0xca, 0x1d, 0x57, 0x2a, 0xdc, 0x79, 0x18, 0x41, 0xb0, 0xf6, 0x9e, 0xe4, 0x9f, 0xd0, 0x8f, 0xeb, 0x31, 0xab, 0xd2, 0x83, 0xa4, 0xcb, 0x8c, 0xb8, 0xa0, 0x42, 0x12, 0x7b, 0x67, 0x9f, 0x2f, 0xf5, 0x09, 0x26, 0x96, 0xc4, 0xce, 0xa9, 0x20, 0xa7, 0xff, 0xd3, 0xf3, 0x2f, 0xb4, 0x5d, 0xe9, 0x0a, 0xb7, 0x9f, 0x4c, 0x19, 0xdb, 0x3a, 0x2d, 0x5e, 0x94, 0xfd, 0xc4, 0xb7, 0xc5, 0x62, 0xf9, 0x2b, 0xfd, 0x2e, 0xe3, 0x5d, 0xe0, 0x7c, 0x13, 0x48, 0xd1, 0x92, 0x12, 0xa9, 0x0b, 0x7a, 0xbc, 0x2d, 0xc2, 0x7f, 0x92, 0x60, 0xab, 0x4e, 0x79, 0x2e, 0x00, 0xf0, 0xaa, 0xe1, 0xda, 0x3d, 0x43, 0xfc, 0xad, 0x55, 0xbb, 0x80, 0x79, 0x81, 0xa0, 0xe6, 0x54, 0x32, 0x6d, 0x02, 0xbe, 0xf3, 0x61, 0x81, 0xa8, 0x44, 0x14, 0x03, 0x59, 0x0e, 0x1c, 0xf6, 0x1f, 0xdc, 0xb2, 0xec, 0xa3, 0x23, 0x77, 0xe8, 0x6e, 0x70, 0xf2, 0x25, 0x1f, 0x1f, 0x17, 0xa9, 0x6d, 0x71, 0x36, 0x97, 0x47, 0x00, 0xa4, 0x02, 0xe0, 0x2c, 0x7c, 0xc1, 0xab, 0xd5, 0x31, 0x85, 0x35, 0xd4, 0xe6, 0x13, 0x02, 0xd6, 0x4b, 0x67, 0x48, 0x2b, 0xa9, 0xe9, 0x2e, 0x02, 0xb6, 0x4f, 0x82, 0xe5, 0x7a, 0x95, 0x19, 0xc6, 0x87, 0x3d, 0xfb, 0xa2, 0xb8, 0x79, 0x1e, 0x4d, 0x3b, 0x96, 0xcf, 0x4f, 0xbd, 0xcd, 0xa2, 0xa2, 0x1f, 0xa0, 0x82, 0xd3, 0xfc, 0x97, 0x05, 0x24, 0x36, 0x6b, 0xf3, 0x31, 0xa2, 0x35, 0x79, 0xef, 0xad, 0xf8, 0xae, 0xaf, 0xaf, 0xd8, 0xf2, 0xd8, 0x6d, 0xed, 0x6b, 0xda, 0x7b, 0x18, 0x1b, 0x5d, 0xff, 0x00, 0x52, 0xb1, 0x6d, 0xf0, 0x81, 0x31, 0xca, 0xf4, 0x6e, 0xb1, 0x80, 0xce, 0xb1, 0x84, 0xc0, 0x21, 0xb7, 0xd6, 0x77, 0x31, 0xd1, 0x27, 0xc1, 0xcd, 0xfe, 0xd2, 0xe3, 0xec, 0xe8, 0x1d, 0x45, 0x96, 0xb0, 0x9a, 0xb7, 0x87, 0x3f, 0x68, 0x2d, 0xf7, 0x01, 0x1f, 0xbe, 0xd1, 0xf4, 0x7f, 0xb4, 0xa4, 0x0d, 0x77, 0xbb, 0xfa, 0x8f, 0x80, 0x3a, 0x7f, 0x43, 0xaa, 0xe2, 0xdf, 0xd2, 0x65, 0x7e, 0x95, 0xe4, 0x0f, 0x1f, 0xa1, 0xfe, 0x6b, 0x16, 0x9f, 0x52, 0xfa, 0xc1, 0xd3, 0xba, 0x6d, 0x26, 0xdc, 0xac, 0x86, 0xd4, 0xd9, 0x0d, 0x31, 0x2e, 0x74, 0x9e, 0xdb, 0x59, 0x2e, 0x55, 0xe8, 0xc9, 0xb2, 0x96, 0xd5, 0x4b, 0x9f, 0xb8, 0x6d, 0xda, 0x1c, 0x04, 0x09, 0x03, 0xfe, 0x8a, 0xc6, 0xfa, 0xd3, 0xf5, 0x6a, 0xbe, 0xbb, 0x5b, 0x2e, 0xc6, 0xb5, 0x94, 0xe6, 0xd5, 0x20, 0x97, 0x7d, 0x1b, 0x1b, 0xf9, 0xad, 0x7c, 0x7d, 0x17, 0xb7, 0xf3, 0x1e, 0x92, 0x1b, 0x7f, 0xf8, 0xe0, 0x7d, 0x59, 0xdd, 0xfd, 0x32, 0xd8, 0x8f, 0xa5, 0xe8, 0x3a, 0x12, 0x5c, 0x3f, 0xfc, 0xc4, 0xfa, 0xc3, 0xb3, 0x77, 0xa7, 0x56, 0xed, 0xdb, 0x76, 0x7a, 0x8d, 0xdd, 0x1f, 0xbf, 0xfd, 0x44, 0x92, 0x56, 0x8f, 0xff, 0xd4, 0xf2, 0xe8, 0x86, 0x17, 0x1e, 0xfa, 0x04, 0x56, 0x4b, 0x43, 0x6c, 0x6f, 0x2d, 0xe5, 0x46, 0x01, 0x64, 0x2b, 0x14, 0x32, 0x5b, 0xb4, 0xa0, 0x52, 0x1d, 0xde, 0x9b, 0x94, 0xdb, 0xab, 0x6b, 0x81, 0xf7, 0x05, 0xb0, 0xd7, 0x07, 0xb2, 0x27, 0x55, 0xc6, 0x57, 0x65, 0xd8, 0x76, 0x6e, 0x64, 0xed, 0xee, 0x16, 0xce, 0x27, 0x57, 0x63, 0xda, 0x0c, 0xc2, 0x8e, 0x51, 0x67, 0x84, 0xfa, 0x1d, 0xdd, 0x62, 0xc7, 0x07, 0xe9, 0xf7, 0xa3, 0xd6, 0x6c, 0x02, 0x41, 0x55, 0x31, 0xf3, 0x2b, 0xb3, 0xba, 0x2b, 0x2e, 0x68, 0x24, 0x1d, 0x47, 0x64, 0xca, 0xa6, 0x50, 0x41, 0x65, 0x90, 0x6c, 0xb1, 0xa5, 0xae, 0x33, 0x23, 0x51, 0xe4, 0xab, 0x7d, 0x5d, 0xcb, 0xb6, 0xcc, 0x37, 0xd0, 0x40, 0x73, 0x71, 0xde, 0x58, 0x09, 0xe7, 0x6f, 0x2c, 0x44, 0xc9, 0xc9, 0xae, 0xba, 0x9d, 0x63, 0x88, 0x01, 0xa0, 0x95, 0x9d, 0xf5, 0x3f, 0x2a, 0xe6, 0x67, 0xdb, 0x50, 0x83, 0x55, 0xad, 0x36, 0x3e, 0x78, 0x10, 0x74, 0x77, 0xfd, 0x2d, 0xaa, 0x4c, 0x7d, 0x58, 0x73, 0x91, 0xa0, 0x0f, 0x51, 0x45, 0xb7, 0x33, 0xdd, 0x58, 0x69, 0x1d, 0xd8, 0x0c, 0x9f, 0x96, 0x88, 0x19, 0x99, 0x19, 0xac, 0xcf, 0xa3, 0xd2, 0xad, 0xb5, 0xdb, 0x76, 0x8f, 0xad, 0xc4, 0xea, 0xcf, 0xdf, 0x7e, 0xdf, 0xdd, 0xfc, 0xd5, 0xa3, 0x5e, 0x43, 0x2b, 0x6b, 0xb2, 0xad, 0x3b, 0x6a, 0xa4, 0x13, 0xa7, 0x04, 0xac, 0x7a, 0x6f, 0xb3, 0x23, 0x26, 0xcc, 0xfb, 0xb4, 0x75, 0x8e, 0x01, 0x83, 0xf7, 0x58, 0x3e, 0x8b, 0x53, 0xa7, 0x2a, 0x1a, 0x31, 0x42, 0x36, 0x5d, 0x4c, 0x9a, 0xf2, 0xdc, 0xc6, 0xfe, 0x98, 0xb4, 0x34, 0xcb, 0x48, 0x0a, 0x8f, 0xdb, 0xb2, 0xeb, 0x76, 0xd6, 0x07, 0x5c, 0x59, 0xc9, 0x64, 0x8f, 0x93, 0xa7, 0x73, 0x16, 0x83, 0xaf, 0x0e, 0xa4, 0x33, 0xef, 0x50, 0xc5, 0x0c, 0xda, 0x59, 0x10, 0x06, 0x8a, 0x2e, 0x29, 0x0e, 0xac, 0xc2, 0x31, 0x3d, 0x36, 0x69, 0x7e, 0xd6, 0xcc, 0xf5, 0x3d, 0x6f, 0xb3, 0xeb, 0x1b, 0x76, 0xef, 0x3b, 0xa3, 0xfa, 0xc9, 0x2b, 0x5f, 0x66, 0x6f, 0xa9, 0x1e, 0x73, 0xf2, 0x49, 0x2e, 0x39, 0xf7, 0x4f, 0xb7, 0x8d, 0xff, 0xd5, 0xf3, 0x26, 0xfe, 0x0a, 0xc5, 0x1b, 0xa7, 0xcb, 0xb2, 0xcf, 0x49, 0x03, 0xb2, 0x46, 0xee, 0xd9, 0xd9, 0xb3, 0xf4, 0x9f, 0x25, 0x4a, 0xdf, 0x4b, 0x77, 0xe8, 0x27, 0xd4, 0xef, 0x1c, 0x2a, 0x29, 0x26, 0xc5, 0x7c, 0x9d, 0x6c, 0x7f, 0xb7, 0x6e, 0x1b, 0x26, 0x7f, 0x05, 0xa3, 0xfe, 0x53, 0x8d, 0x62, 0x57, 0x30, 0x92, 0x12, 0xfa, 0x2f, 0x86, 0xdf, 0xa4, 0xec, 0x67, 0xfe, 0xd0, 0xf4, 0xff, 0x00, 0x4d, 0xfc, 0xdf, 0x78, 0xe1, 0x68, 0x7d, 0x54, 0x99, 0xbf, 0x6f, 0xf3, 0xbe, 0xdf, 0x8e, 0xdd, 0x7f, 0xef, 0xeb, 0x97, 0x49, 0x3e, 0x3b, 0x7f, 0x06, 0x2c, 0x9f, 0x37, 0x5f, 0xf0, 0x9f, 0x4c, 0xeb, 0x7b, 0xbf, 0x67, 0x55, 0xe8, 0xff, 0x00, 0x31, 0xbc, 0x7a, 0x9e, 0x31, 0xdb, 0xfe, 0x92, 0xae, 0x37, 0x7a, 0x4d, 0xdb, 0xe2, 0x17, 0x9d, 0xa4, 0xa3, 0xc9, 0xba, 0xfc, 0x7b, 0x7d, 0x5f, 0x52, 0xa7, 0x7e, 0xd1, 0x28, 0xf8, 0xf3, 0xb0, 0xc7, 0x32, 0xbc, 0x99, 0x24, 0xc5, 0xe3, 0xab, 0xeb, 0x1f, 0xa4, 0xf5, 0xfc, 0xe1, 0x25, 0xe4, 0xe9, 0x24, 0x97, 0xff, 0xd9, 0xff, 0xed, 0x2e, 0x1c, 0x50, 0x68, 0x6f, 0x74, 0x6f, 0x73, 0x68, 0x6f, 0x70, 0x20, 0x33, 0x2e, 0x30, 0x00, 0x38, 0x42, 0x49, 0x4d, 0x04, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2b, 0x1c, 0x02, 0x00, 0x00, 0x02, 0x00, 0x02, 0x1c, 0x02, 0x78, 0x00, 0x1f, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x00, 0x38, 0x42, 0x49, 0x4d, 0x04, 0x25, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0xfb, 0x09, 0xa6, 0xbd, 0x07, 0x4c, 0x2a, 0x36, 0x9d, 0x8f, 0xe2, 0xcc, 0x57, 0xa9, 0xac, 0x85, 0x38, 0x42, 0x49, 0x4d, 0x03, 0xea, 0x00, 0x00, 0x00, 0x00, 0x1d, 0xb0, 0x3c, 0x3f, 0x78, 0x6d, 0x6c, 0x20, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x3d, 0x22, 0x31, 0x2e, 0x30, 0x22, 0x20, 0x65, 0x6e, 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x3d, 0x22, 0x55, 0x54, 0x46, 0x2d, 0x38, 0x22, 0x3f, 0x3e, 0x0a, 0x3c, 0x21, 0x44, 0x4f, 0x43, 0x54, 0x59, 0x50, 0x45, 0x20, 0x70, 0x6c, 0x69, 0x73, 0x74, 0x20, 0x50, 0x55, 0x42, 0x4c, 0x49, 0x43, 0x20, 0x22, 0x2d, 0x2f, 0x2f, 0x41, 0x70, 0x70, 0x6c, 0x65, 0x20, 0x43, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x72, 0x2f, 0x2f, 0x44, 0x54, 0x44, 0x20, 0x50, 0x4c, 0x49, 0x53, 0x54, 0x20, 0x31, 0x2e, 0x30, 0x2f, 0x2f, 0x45, 0x4e, 0x22, 0x20, 0x22, 0x68, 0x74, 0x74, 0x70, 0x3a, 0x2f, 0x2f, 0x77, 0x77, 0x77, 0x2e, 0x61, 0x70, 0x70, 0x6c, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x44, 0x54, 0x44, 0x73, 0x2f, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x4c, 0x69, 0x73, 0x74, 0x2d, 0x31, 0x2e, 0x30, 0x2e, 0x64, 0x74, 0x64, 0x22, 0x3e, 0x0a, 0x3c, 0x70, 0x6c, 0x69, 0x73, 0x74, 0x20, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x3d, 0x22, 0x31, 0x2e, 0x30, 0x22, 0x3e, 0x0a, 0x3c, 0x64, 0x69, 0x63, 0x74, 0x3e, 0x0a, 0x09, 0x3c, 0x6b, 0x65, 0x79, 0x3e, 0x63, 0x6f, 0x6d, 0x2e, 0x61, 0x70, 0x70, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x69, 0x6e, 0x74, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x2e, 0x50, 0x4d, 0x48, 0x6f, 0x72, 0x69, 0x7a, 0x6f, 0x6e, 0x74, 0x61, 0x6c, 0x52, 0x65, 0x73, 0x3c, 0x2f, 0x6b, 0x65, 0x79, 0x3e, 0x0a, 0x09, 0x3c, 0x64, 0x69, 0x63, 0x74, 0x3e, 0x0a, 0x09, 0x09, 0x3c, 0x6b, 0x65, 0x79, 0x3e, 0x63, 0x6f, 0x6d, 0x2e, 0x61, 0x70, 0x70, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x69, 0x6e, 0x74, 0x2e, 0x74, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x3c, 0x2f, 0x6b, 0x65, 0x79, 0x3e, 0x0a, 0x09, 0x09, 0x3c, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x3e, 0x63, 0x6f, 0x6d, 0x2e, 0x61, 0x70, 0x70, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x69, 0x6e, 0x74, 0x69, 0x6e, 0x67, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x3c, 0x2f, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x3e, 0x0a, 0x09, 0x09, 0x3c, 0x6b, 0x65, 0x79, 0x3e, 0x63, 0x6f, 0x6d, 0x2e, 0x61, 0x70, 0x70, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x69, 0x6e, 0x74, 0x2e, 0x74, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x69, 0x74, 0x65, 0x6d, 0x41, 0x72, 0x72, 0x61, 0x79, 0x3c, 0x2f, 0x6b, 0x65, 0x79, 0x3e, 0x0a, 0x09, 0x09, 0x3c, 0x61, 0x72, 0x72, 0x61, 0x79, 0x3e, 0x0a, 0x09, 0x09, 0x09, 0x3c, 0x64, 0x69, 0x63, 0x74, 0x3e, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x3c, 0x6b, 0x65, 0x79, 0x3e, 0x63, 0x6f, 0x6d, 0x2e, 0x61, 0x70, 0x70, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x69, 0x6e, 0x74, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x2e, 0x50, 0x4d, 0x48, 0x6f, 0x72, 0x69, 0x7a, 0x6f, 0x6e, 0x74, 0x61, 0x6c, 0x52, 0x65, 0x73, 0x3c, 0x2f, 0x6b, 0x65, 0x79, 0x3e, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x3c, 0x72, 0x65, 0x61, 0x6c, 0x3e, 0x37, 0x32, 0x3c, 0x2f, 0x72, 0x65, 0x61, 0x6c, 0x3e, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x3c, 0x6b, 0x65, 0x79, 0x3e, 0x63, 0x6f, 0x6d, 0x2e, 0x61, 0x70, 0x70, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x69, 0x6e, 0x74, 0x2e, 0x74, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x3c, 0x2f, 0x6b, 0x65, 0x79, 0x3e, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x3c, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x3e, 0x63, 0x6f, 0x6d, 0x2e, 0x61, 0x70, 0x70, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x69, 0x6e, 0x74, 0x69, 0x6e, 0x67, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x3c, 0x2f, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x3e, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x3c, 0x6b, 0x65, 0x79, 0x3e, 0x63, 0x6f, 0x6d, 0x2e, 0x61, 0x70, 0x70, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x69, 0x6e, 0x74, 0x2e, 0x74, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x6d, 0x6f, 0x64, 0x44, 0x61, 0x74, 0x65, 0x3c, 0x2f, 0x6b, 0x65, 0x79, 0x3e, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x3c, 0x64, 0x61, 0x74, 0x65, 0x3e, 0x32, 0x30, 0x30, 0x37, 0x2d, 0x30, 0x31, 0x2d, 0x33, 0x30, 0x54, 0x32, 0x32, 0x3a, 0x30, 0x38, 0x3a, 0x34, 0x31, 0x5a, 0x3c, 0x2f, 0x64, 0x61, 0x74, 0x65, 0x3e, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x3c, 0x6b, 0x65, 0x79, 0x3e, 0x63, 0x6f, 0x6d, 0x2e, 0x61, 0x70, 0x70, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x69, 0x6e, 0x74, 0x2e, 0x74, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x73, 0x74, 0x61, 0x74, 0x65, 0x46, 0x6c, 0x61, 0x67, 0x3c, 0x2f, 0x6b, 0x65, 0x79, 0x3e, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x3c, 0x69, 0x6e, 0x74, 0x65, 0x67, 0x65, 0x72, 0x3e, 0x30, 0x3c, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x67, 0x65, 0x72, 0x3e, 0x0a, 0x09, 0x09, 0x09, 0x3c, 0x2f, 0x64, 0x69, 0x63, 0x74, 0x3e, 0x0a, 0x09, 0x09, 0x3c, 0x2f, 0x61, 0x72, 0x72, 0x61, 0x79, 0x3e, 0x0a, 0x09, 0x3c, 0x2f, 0x64, 0x69, 0x63, 0x74, 0x3e, 0x0a, 0x09, 0x3c, 0x6b, 0x65, 0x79, 0x3e, 0x63, 0x6f, 0x6d, 0x2e, 0x61, 0x70, 0x70, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x69, 0x6e, 0x74, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x2e, 0x50, 0x4d, 0x4f, 0x72, 0x69, 0x65, 0x6e, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x3c, 0x2f, 0x6b, 0x65, 0x79, 0x3e, 0x0a, 0x09, 0x3c, 0x64, 0x69, 0x63, 0x74, 0x3e, 0x0a, 0x09, 0x09, 0x3c, 0x6b, 0x65, 0x79, 0x3e, 0x63, 0x6f, 0x6d, 0x2e, 0x61, 0x70, 0x70, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x69, 0x6e, 0x74, 0x2e, 0x74, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x3c, 0x2f, 0x6b, 0x65, 0x79, 0x3e, 0x0a, 0x09, 0x09, 0x3c, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x3e, 0x63, 0x6f, 0x6d, 0x2e, 0x61, 0x70, 0x70, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x69, 0x6e, 0x74, 0x69, 0x6e, 0x67, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x3c, 0x2f, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x3e, 0x0a, 0x09, 0x09, 0x3c, 0x6b, 0x65, 0x79, 0x3e, 0x63, 0x6f, 0x6d, 0x2e, 0x61, 0x70, 0x70, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x69, 0x6e, 0x74, 0x2e, 0x74, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x69, 0x74, 0x65, 0x6d, 0x41, 0x72, 0x72, 0x61, 0x79, 0x3c, 0x2f, 0x6b, 0x65, 0x79, 0x3e, 0x0a, 0x09, 0x09, 0x3c, 0x61, 0x72, 0x72, 0x61, 0x79, 0x3e, 0x0a, 0x09, 0x09, 0x09, 0x3c, 0x64, 0x69, 0x63, 0x74, 0x3e, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x3c, 0x6b, 0x65, 0x79, 0x3e, 0x63, 0x6f, 0x6d, 0x2e, 0x61, 0x70, 0x70, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x69, 0x6e, 0x74, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x2e, 0x50, 0x4d, 0x4f, 0x72, 0x69, 0x65, 0x6e, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x3c, 0x2f, 0x6b, 0x65, 0x79, 0x3e, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x3c, 0x69, 0x6e, 0x74, 0x65, 0x67, 0x65, 0x72, 0x3e, 0x31, 0x3c, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x67, 0x65, 0x72, 0x3e, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x3c, 0x6b, 0x65, 0x79, 0x3e, 0x63, 0x6f, 0x6d, 0x2e, 0x61, 0x70, 0x70, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x69, 0x6e, 0x74, 0x2e, 0x74, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x3c, 0x2f, 0x6b, 0x65, 0x79, 0x3e, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x3c, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x3e, 0x63, 0x6f, 0x6d, 0x2e, 0x61, 0x70, 0x70, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x69, 0x6e, 0x74, 0x69, 0x6e, 0x67, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x3c, 0x2f, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x3e, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x3c, 0x6b, 0x65, 0x79, 0x3e, 0x63, 0x6f, 0x6d, 0x2e, 0x61, 0x70, 0x70, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x69, 0x6e, 0x74, 0x2e, 0x74, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x6d, 0x6f, 0x64, 0x44, 0x61, 0x74, 0x65, 0x3c, 0x2f, 0x6b, 0x65, 0x79, 0x3e, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x3c, 0x64, 0x61, 0x74, 0x65, 0x3e, 0x32, 0x30, 0x30, 0x37, 0x2d, 0x30, 0x31, 0x2d, 0x33, 0x30, 0x54, 0x32, 0x32, 0x3a, 0x30, 0x38, 0x3a, 0x34, 0x31, 0x5a, 0x3c, 0x2f, 0x64, 0x61, 0x74, 0x65, 0x3e, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x3c, 0x6b, 0x65, 0x79, 0x3e, 0x63, 0x6f, 0x6d, 0x2e, 0x61, 0x70, 0x70, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x69, 0x6e, 0x74, 0x2e, 0x74, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x73, 0x74, 0x61, 0x74, 0x65, 0x46, 0x6c, 0x61, 0x67, 0x3c, 0x2f, 0x6b, 0x65, 0x79, 0x3e, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x3c, 0x69, 0x6e, 0x74, 0x65, 0x67, 0x65, 0x72, 0x3e, 0x30, 0x3c, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x67, 0x65, 0x72, 0x3e, 0x0a, 0x09, 0x09, 0x09, 0x3c, 0x2f, 0x64, 0x69, 0x63, 0x74, 0x3e, 0x0a, 0x09, 0x09, 0x3c, 0x2f, 0x61, 0x72, 0x72, 0x61, 0x79, 0x3e, 0x0a, 0x09, 0x3c, 0x2f, 0x64, 0x69, 0x63, 0x74, 0x3e, 0x0a, 0x09, 0x3c, 0x6b, 0x65, 0x79, 0x3e, 0x63, 0x6f, 0x6d, 0x2e, 0x61, 0x70, 0x70, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x69, 0x6e, 0x74, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x2e, 0x50, 0x4d, 0x53, 0x63, 0x61, 0x6c, 0x69, 0x6e, 0x67, 0x3c, 0x2f, 0x6b, 0x65, 0x79, 0x3e, 0x0a, 0x09, 0x3c, 0x64, 0x69, 0x63, 0x74, 0x3e, 0x0a, 0x09, 0x09, 0x3c, 0x6b, 0x65, 0x79, 0x3e, 0x63, 0x6f, 0x6d, 0x2e, 0x61, 0x70, 0x70, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x69, 0x6e, 0x74, 0x2e, 0x74, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x3c, 0x2f, 0x6b, 0x65, 0x79, 0x3e, 0x0a, 0x09, 0x09, 0x3c, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x3e, 0x63, 0x6f, 0x6d, 0x2e, 0x61, 0x70, 0x70, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x69, 0x6e, 0x74, 0x69, 0x6e, 0x67, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x3c, 0x2f, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x3e, 0x0a, 0x09, 0x09, 0x3c, 0x6b, 0x65, 0x79, 0x3e, 0x63, 0x6f, 0x6d, 0x2e, 0x61, 0x70, 0x70, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x69, 0x6e, 0x74, 0x2e, 0x74, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x69, 0x74, 0x65, 0x6d, 0x41, 0x72, 0x72, 0x61, 0x79, 0x3c, 0x2f, 0x6b, 0x65, 0x79, 0x3e, 0x0a, 0x09, 0x09, 0x3c, 0x61, 0x72, 0x72, 0x61, 0x79, 0x3e, 0x0a, 0x09, 0x09, 0x09, 0x3c, 0x64, 0x69, 0x63, 0x74, 0x3e, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x3c, 0x6b, 0x65, 0x79, 0x3e, 0x63, 0x6f, 0x6d, 0x2e, 0x61, 0x70, 0x70, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x69, 0x6e, 0x74, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x2e, 0x50, 0x4d, 0x53, 0x63, 0x61, 0x6c, 0x69, 0x6e, 0x67, 0x3c, 0x2f, 0x6b, 0x65, 0x79, 0x3e, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x3c, 0x72, 0x65, 0x61, 0x6c, 0x3e, 0x31, 0x3c, 0x2f, 0x72, 0x65, 0x61, 0x6c, 0x3e, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x3c, 0x6b, 0x65, 0x79, 0x3e, 0x63, 0x6f, 0x6d, 0x2e, 0x61, 0x70, 0x70, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x69, 0x6e, 0x74, 0x2e, 0x74, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x3c, 0x2f, 0x6b, 0x65, 0x79, 0x3e, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x3c, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x3e, 0x63, 0x6f, 0x6d, 0x2e, 0x61, 0x70, 0x70, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x69, 0x6e, 0x74, 0x69, 0x6e, 0x67, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x3c, 0x2f, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x3e, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x3c, 0x6b, 0x65, 0x79, 0x3e, 0x63, 0x6f, 0x6d, 0x2e, 0x61, 0x70, 0x70, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x69, 0x6e, 0x74, 0x2e, 0x74, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x6d, 0x6f, 0x64, 0x44, 0x61, 0x74, 0x65, 0x3c, 0x2f, 0x6b, 0x65, 0x79, 0x3e, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x3c, 0x64, 0x61, 0x74, 0x65, 0x3e, 0x32, 0x30, 0x30, 0x37, 0x2d, 0x30, 0x31, 0x2d, 0x33, 0x30, 0x54, 0x32, 0x32, 0x3a, 0x30, 0x38, 0x3a, 0x34, 0x31, 0x5a, 0x3c, 0x2f, 0x64, 0x61, 0x74, 0x65, 0x3e, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x3c, 0x6b, 0x65, 0x79, 0x3e, 0x63, 0x6f, 0x6d, 0x2e, 0x61, 0x70, 0x70, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x69, 0x6e, 0x74, 0x2e, 0x74, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x73, 0x74, 0x61, 0x74, 0x65, 0x46, 0x6c, 0x61, 0x67, 0x3c, 0x2f, 0x6b, 0x65, 0x79, 0x3e, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x3c, 0x69, 0x6e, 0x74, 0x65, 0x67, 0x65, 0x72, 0x3e, 0x30, 0x3c, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x67, 0x65, 0x72, 0x3e, 0x0a, 0x09, 0x09, 0x09, 0x3c, 0x2f, 0x64, 0x69, 0x63, 0x74, 0x3e, 0x0a, 0x09, 0x09, 0x3c, 0x2f, 0x61, 0x72, 0x72, 0x61, 0x79, 0x3e, 0x0a, 0x09, 0x3c, 0x2f, 0x64, 0x69, 0x63, 0x74, 0x3e, 0x0a, 0x09, 0x3c, 0x6b, 0x65, 0x79, 0x3e, 0x63, 0x6f, 0x6d, 0x2e, 0x61, 0x70, 0x70, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x69, 0x6e, 0x74, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x2e, 0x50, 0x4d, 0x56, 0x65, 0x72, 0x74, 0x69, 0x63, 0x61, 0x6c, 0x52, 0x65, 0x73, 0x3c, 0x2f, 0x6b, 0x65, 0x79, 0x3e, 0x0a, 0x09, 0x3c, 0x64, 0x69, 0x63, 0x74, 0x3e, 0x0a, 0x09, 0x09, 0x3c, 0x6b, 0x65, 0x79, 0x3e, 0x63, 0x6f, 0x6d, 0x2e, 0x61, 0x70, 0x70, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x69, 0x6e, 0x74, 0x2e, 0x74, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x3c, 0x2f, 0x6b, 0x65, 0x79, 0x3e, 0x0a, 0x09, 0x09, 0x3c, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x3e, 0x63, 0x6f, 0x6d, 0x2e, 0x61, 0x70, 0x70, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x69, 0x6e, 0x74, 0x69, 0x6e, 0x67, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x3c, 0x2f, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x3e, 0x0a, 0x09, 0x09, 0x3c, 0x6b, 0x65, 0x79, 0x3e, 0x63, 0x6f, 0x6d, 0x2e, 0x61, 0x70, 0x70, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x69, 0x6e, 0x74, 0x2e, 0x74, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x69, 0x74, 0x65, 0x6d, 0x41, 0x72, 0x72, 0x61, 0x79, 0x3c, 0x2f, 0x6b, 0x65, 0x79, 0x3e, 0x0a, 0x09, 0x09, 0x3c, 0x61, 0x72, 0x72, 0x61, 0x79, 0x3e, 0x0a, 0x09, 0x09, 0x09, 0x3c, 0x64, 0x69, 0x63, 0x74, 0x3e, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x3c, 0x6b, 0x65, 0x79, 0x3e, 0x63, 0x6f, 0x6d, 0x2e, 0x61, 0x70, 0x70, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x69, 0x6e, 0x74, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x2e, 0x50, 0x4d, 0x56, 0x65, 0x72, 0x74, 0x69, 0x63, 0x61, 0x6c, 0x52, 0x65, 0x73, 0x3c, 0x2f, 0x6b, 0x65, 0x79, 0x3e, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x3c, 0x72, 0x65, 0x61, 0x6c, 0x3e, 0x37, 0x32, 0x3c, 0x2f, 0x72, 0x65, 0x61, 0x6c, 0x3e, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x3c, 0x6b, 0x65, 0x79, 0x3e, 0x63, 0x6f, 0x6d, 0x2e, 0x61, 0x70, 0x70, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x69, 0x6e, 0x74, 0x2e, 0x74, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x3c, 0x2f, 0x6b, 0x65, 0x79, 0x3e, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x3c, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x3e, 0x63, 0x6f, 0x6d, 0x2e, 0x61, 0x70, 0x70, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x69, 0x6e, 0x74, 0x69, 0x6e, 0x67, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x3c, 0x2f, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x3e, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x3c, 0x6b, 0x65, 0x79, 0x3e, 0x63, 0x6f, 0x6d, 0x2e, 0x61, 0x70, 0x70, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x69, 0x6e, 0x74, 0x2e, 0x74, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x6d, 0x6f, 0x64, 0x44, 0x61, 0x74, 0x65, 0x3c, 0x2f, 0x6b, 0x65, 0x79, 0x3e, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x3c, 0x64, 0x61, 0x74, 0x65, 0x3e, 0x32, 0x30, 0x30, 0x37, 0x2d, 0x30, 0x31, 0x2d, 0x33, 0x30, 0x54, 0x32, 0x32, 0x3a, 0x30, 0x38, 0x3a, 0x34, 0x31, 0x5a, 0x3c, 0x2f, 0x64, 0x61, 0x74, 0x65, 0x3e, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x3c, 0x6b, 0x65, 0x79, 0x3e, 0x63, 0x6f, 0x6d, 0x2e, 0x61, 0x70, 0x70, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x69, 0x6e, 0x74, 0x2e, 0x74, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x73, 0x74, 0x61, 0x74, 0x65, 0x46, 0x6c, 0x61, 0x67, 0x3c, 0x2f, 0x6b, 0x65, 0x79, 0x3e, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x3c, 0x69, 0x6e, 0x74, 0x65, 0x67, 0x65, 0x72, 0x3e, 0x30, 0x3c, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x67, 0x65, 0x72, 0x3e, 0x0a, 0x09, 0x09, 0x09, 0x3c, 0x2f, 0x64, 0x69, 0x63, 0x74, 0x3e, 0x0a, 0x09, 0x09, 0x3c, 0x2f, 0x61, 0x72, 0x72, 0x61, 0x79, 0x3e, 0x0a, 0x09, 0x3c, 0x2f, 0x64, 0x69, 0x63, 0x74, 0x3e, 0x0a, 0x09, 0x3c, 0x6b, 0x65, 0x79, 0x3e, 0x63, 0x6f, 0x6d, 0x2e, 0x61, 0x70, 0x70, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x69, 0x6e, 0x74, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x2e, 0x50, 0x4d, 0x56, 0x65, 0x72, 0x74, 0x69, 0x63, 0x61, 0x6c, 0x53, 0x63, 0x61, 0x6c, 0x69, 0x6e, 0x67, 0x3c, 0x2f, 0x6b, 0x65, 0x79, 0x3e, 0x0a, 0x09, 0x3c, 0x64, 0x69, 0x63, 0x74, 0x3e, 0x0a, 0x09, 0x09, 0x3c, 0x6b, 0x65, 0x79, 0x3e, 0x63, 0x6f, 0x6d, 0x2e, 0x61, 0x70, 0x70, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x69, 0x6e, 0x74, 0x2e, 0x74, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x3c, 0x2f, 0x6b, 0x65, 0x79, 0x3e, 0x0a, 0x09, 0x09, 0x3c, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x3e, 0x63, 0x6f, 0x6d, 0x2e, 0x61, 0x70, 0x70, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x69, 0x6e, 0x74, 0x69, 0x6e, 0x67, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x3c, 0x2f, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x3e, 0x0a, 0x09, 0x09, 0x3c, 0x6b, 0x65, 0x79, 0x3e, 0x63, 0x6f, 0x6d, 0x2e, 0x61, 0x70, 0x70, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x69, 0x6e, 0x74, 0x2e, 0x74, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x69, 0x74, 0x65, 0x6d, 0x41, 0x72, 0x72, 0x61, 0x79, 0x3c, 0x2f, 0x6b, 0x65, 0x79, 0x3e, 0x0a, 0x09, 0x09, 0x3c, 0x61, 0x72, 0x72, 0x61, 0x79, 0x3e, 0x0a, 0x09, 0x09, 0x09, 0x3c, 0x64, 0x69, 0x63, 0x74, 0x3e, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x3c, 0x6b, 0x65, 0x79, 0x3e, 0x63, 0x6f, 0x6d, 0x2e, 0x61, 0x70, 0x70, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x69, 0x6e, 0x74, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x2e, 0x50, 0x4d, 0x56, 0x65, 0x72, 0x74, 0x69, 0x63, 0x61, 0x6c, 0x53, 0x63, 0x61, 0x6c, 0x69, 0x6e, 0x67, 0x3c, 0x2f, 0x6b, 0x65, 0x79, 0x3e, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x3c, 0x72, 0x65, 0x61, 0x6c, 0x3e, 0x31, 0x3c, 0x2f, 0x72, 0x65, 0x61, 0x6c, 0x3e, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x3c, 0x6b, 0x65, 0x79, 0x3e, 0x63, 0x6f, 0x6d, 0x2e, 0x61, 0x70, 0x70, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x69, 0x6e, 0x74, 0x2e, 0x74, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x3c, 0x2f, 0x6b, 0x65, 0x79, 0x3e, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x3c, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x3e, 0x63, 0x6f, 0x6d, 0x2e, 0x61, 0x70, 0x70, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x69, 0x6e, 0x74, 0x69, 0x6e, 0x67, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x3c, 0x2f, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x3e, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x3c, 0x6b, 0x65, 0x79, 0x3e, 0x63, 0x6f, 0x6d, 0x2e, 0x61, 0x70, 0x70, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x69, 0x6e, 0x74, 0x2e, 0x74, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x6d, 0x6f, 0x64, 0x44, 0x61, 0x74, 0x65, 0x3c, 0x2f, 0x6b, 0x65, 0x79, 0x3e, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x3c, 0x64, 0x61, 0x74, 0x65, 0x3e, 0x32, 0x30, 0x30, 0x37, 0x2d, 0x30, 0x31, 0x2d, 0x33, 0x30, 0x54, 0x32, 0x32, 0x3a, 0x30, 0x38, 0x3a, 0x34, 0x31, 0x5a, 0x3c, 0x2f, 0x64, 0x61, 0x74, 0x65, 0x3e, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x3c, 0x6b, 0x65, 0x79, 0x3e, 0x63, 0x6f, 0x6d, 0x2e, 0x61, 0x70, 0x70, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x69, 0x6e, 0x74, 0x2e, 0x74, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x73, 0x74, 0x61, 0x74, 0x65, 0x46, 0x6c, 0x61, 0x67, 0x3c, 0x2f, 0x6b, 0x65, 0x79, 0x3e, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x3c, 0x69, 0x6e, 0x74, 0x65, 0x67, 0x65, 0x72, 0x3e, 0x30, 0x3c, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x67, 0x65, 0x72, 0x3e, 0x0a, 0x09, 0x09, 0x09, 0x3c, 0x2f, 0x64, 0x69, 0x63, 0x74, 0x3e, 0x0a, 0x09, 0x09, 0x3c, 0x2f, 0x61, 0x72, 0x72, 0x61, 0x79, 0x3e, 0x0a, 0x09, 0x3c, 0x2f, 0x64, 0x69, 0x63, 0x74, 0x3e, 0x0a, 0x09, 0x3c, 0x6b, 0x65, 0x79, 0x3e, 0x63, 0x6f, 0x6d, 0x2e, 0x61, 0x70, 0x70, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x69, 0x6e, 0x74, 0x2e, 0x73, 0x75, 0x62, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x70, 0x61, 0x70, 0x65, 0x72, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x5f, 0x74, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x3c, 0x2f, 0x6b, 0x65, 0x79, 0x3e, 0x0a, 0x09, 0x3c, 0x64, 0x69, 0x63, 0x74, 0x3e, 0x0a, 0x09, 0x09, 0x3c, 0x6b, 0x65, 0x79, 0x3e, 0x63, 0x6f, 0x6d, 0x2e, 0x61, 0x70, 0x70, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x69, 0x6e, 0x74, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x2e, 0x50, 0x4d, 0x41, 0x64, 0x6a, 0x75, 0x73, 0x74, 0x65, 0x64, 0x50, 0x61, 0x67, 0x65, 0x52, 0x65, 0x63, 0x74, 0x3c, 0x2f, 0x6b, 0x65, 0x79, 0x3e, 0x0a, 0x09, 0x09, 0x3c, 0x64, 0x69, 0x63, 0x74, 0x3e, 0x0a, 0x09, 0x09, 0x09, 0x3c, 0x6b, 0x65, 0x79, 0x3e, 0x63, 0x6f, 0x6d, 0x2e, 0x61, 0x70, 0x70, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x69, 0x6e, 0x74, 0x2e, 0x74, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x3c, 0x2f, 0x6b, 0x65, 0x79, 0x3e, 0x0a, 0x09, 0x09, 0x09, 0x3c, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x3e, 0x63, 0x6f, 0x6d, 0x2e, 0x61, 0x70, 0x70, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x69, 0x6e, 0x74, 0x69, 0x6e, 0x67, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x3c, 0x2f, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x3e, 0x0a, 0x09, 0x09, 0x09, 0x3c, 0x6b, 0x65, 0x79, 0x3e, 0x63, 0x6f, 0x6d, 0x2e, 0x61, 0x70, 0x70, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x69, 0x6e, 0x74, 0x2e, 0x74, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x69, 0x74, 0x65, 0x6d, 0x41, 0x72, 0x72, 0x61, 0x79, 0x3c, 0x2f, 0x6b, 0x65, 0x79, 0x3e, 0x0a, 0x09, 0x09, 0x09, 0x3c, 0x61, 0x72, 0x72, 0x61, 0x79, 0x3e, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x3c, 0x64, 0x69, 0x63, 0x74, 0x3e, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x09, 0x3c, 0x6b, 0x65, 0x79, 0x3e, 0x63, 0x6f, 0x6d, 0x2e, 0x61, 0x70, 0x70, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x69, 0x6e, 0x74, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x2e, 0x50, 0x4d, 0x41, 0x64, 0x6a, 0x75, 0x73, 0x74, 0x65, 0x64, 0x50, 0x61, 0x67, 0x65, 0x52, 0x65, 0x63, 0x74, 0x3c, 0x2f, 0x6b, 0x65, 0x79, 0x3e, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x09, 0x3c, 0x61, 0x72, 0x72, 0x61, 0x79, 0x3e, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x3c, 0x72, 0x65, 0x61, 0x6c, 0x3e, 0x30, 0x2e, 0x30, 0x3c, 0x2f, 0x72, 0x65, 0x61, 0x6c, 0x3e, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x3c, 0x72, 0x65, 0x61, 0x6c, 0x3e, 0x30, 0x2e, 0x30, 0x3c, 0x2f, 0x72, 0x65, 0x61, 0x6c, 0x3e, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x3c, 0x72, 0x65, 0x61, 0x6c, 0x3e, 0x37, 0x33, 0x34, 0x3c, 0x2f, 0x72, 0x65, 0x61, 0x6c, 0x3e, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x3c, 0x72, 0x65, 0x61, 0x6c, 0x3e, 0x35, 0x37, 0x36, 0x3c, 0x2f, 0x72, 0x65, 0x61, 0x6c, 0x3e, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x09, 0x3c, 0x2f, 0x61, 0x72, 0x72, 0x61, 0x79, 0x3e, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x09, 0x3c, 0x6b, 0x65, 0x79, 0x3e, 0x63, 0x6f, 0x6d, 0x2e, 0x61, 0x70, 0x70, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x69, 0x6e, 0x74, 0x2e, 0x74, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x3c, 0x2f, 0x6b, 0x65, 0x79, 0x3e, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x09, 0x3c, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x3e, 0x63, 0x6f, 0x6d, 0x2e, 0x61, 0x70, 0x70, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x69, 0x6e, 0x74, 0x69, 0x6e, 0x67, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x3c, 0x2f, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x3e, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x09, 0x3c, 0x6b, 0x65, 0x79, 0x3e, 0x63, 0x6f, 0x6d, 0x2e, 0x61, 0x70, 0x70, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x69, 0x6e, 0x74, 0x2e, 0x74, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x6d, 0x6f, 0x64, 0x44, 0x61, 0x74, 0x65, 0x3c, 0x2f, 0x6b, 0x65, 0x79, 0x3e, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x09, 0x3c, 0x64, 0x61, 0x74, 0x65, 0x3e, 0x32, 0x30, 0x30, 0x37, 0x2d, 0x30, 0x31, 0x2d, 0x33, 0x30, 0x54, 0x32, 0x32, 0x3a, 0x30, 0x38, 0x3a, 0x34, 0x31, 0x5a, 0x3c, 0x2f, 0x64, 0x61, 0x74, 0x65, 0x3e, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x09, 0x3c, 0x6b, 0x65, 0x79, 0x3e, 0x63, 0x6f, 0x6d, 0x2e, 0x61, 0x70, 0x70, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x69, 0x6e, 0x74, 0x2e, 0x74, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x73, 0x74, 0x61, 0x74, 0x65, 0x46, 0x6c, 0x61, 0x67, 0x3c, 0x2f, 0x6b, 0x65, 0x79, 0x3e, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x09, 0x3c, 0x69, 0x6e, 0x74, 0x65, 0x67, 0x65, 0x72, 0x3e, 0x30, 0x3c, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x67, 0x65, 0x72, 0x3e, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x3c, 0x2f, 0x64, 0x69, 0x63, 0x74, 0x3e, 0x0a, 0x09, 0x09, 0x09, 0x3c, 0x2f, 0x61, 0x72, 0x72, 0x61, 0x79, 0x3e, 0x0a, 0x09, 0x09, 0x3c, 0x2f, 0x64, 0x69, 0x63, 0x74, 0x3e, 0x0a, 0x09, 0x09, 0x3c, 0x6b, 0x65, 0x79, 0x3e, 0x63, 0x6f, 0x6d, 0x2e, 0x61, 0x70, 0x70, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x69, 0x6e, 0x74, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x2e, 0x50, 0x4d, 0x41, 0x64, 0x6a, 0x75, 0x73, 0x74, 0x65, 0x64, 0x50, 0x61, 0x70, 0x65, 0x72, 0x52, 0x65, 0x63, 0x74, 0x3c, 0x2f, 0x6b, 0x65, 0x79, 0x3e, 0x0a, 0x09, 0x09, 0x3c, 0x64, 0x69, 0x63, 0x74, 0x3e, 0x0a, 0x09, 0x09, 0x09, 0x3c, 0x6b, 0x65, 0x79, 0x3e, 0x63, 0x6f, 0x6d, 0x2e, 0x61, 0x70, 0x70, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x69, 0x6e, 0x74, 0x2e, 0x74, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x3c, 0x2f, 0x6b, 0x65, 0x79, 0x3e, 0x0a, 0x09, 0x09, 0x09, 0x3c, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x3e, 0x63, 0x6f, 0x6d, 0x2e, 0x61, 0x70, 0x70, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x69, 0x6e, 0x74, 0x69, 0x6e, 0x67, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x3c, 0x2f, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x3e, 0x0a, 0x09, 0x09, 0x09, 0x3c, 0x6b, 0x65, 0x79, 0x3e, 0x63, 0x6f, 0x6d, 0x2e, 0x61, 0x70, 0x70, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x69, 0x6e, 0x74, 0x2e, 0x74, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x69, 0x74, 0x65, 0x6d, 0x41, 0x72, 0x72, 0x61, 0x79, 0x3c, 0x2f, 0x6b, 0x65, 0x79, 0x3e, 0x0a, 0x09, 0x09, 0x09, 0x3c, 0x61, 0x72, 0x72, 0x61, 0x79, 0x3e, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x3c, 0x64, 0x69, 0x63, 0x74, 0x3e, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x09, 0x3c, 0x6b, 0x65, 0x79, 0x3e, 0x63, 0x6f, 0x6d, 0x2e, 0x61, 0x70, 0x70, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x69, 0x6e, 0x74, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x2e, 0x50, 0x4d, 0x41, 0x64, 0x6a, 0x75, 0x73, 0x74, 0x65, 0x64, 0x50, 0x61, 0x70, 0x65, 0x72, 0x52, 0x65, 0x63, 0x74, 0x3c, 0x2f, 0x6b, 0x65, 0x79, 0x3e, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x09, 0x3c, 0x61, 0x72, 0x72, 0x61, 0x79, 0x3e, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x3c, 0x72, 0x65, 0x61, 0x6c, 0x3e, 0x2d, 0x31, 0x38, 0x3c, 0x2f, 0x72, 0x65, 0x61, 0x6c, 0x3e, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x3c, 0x72, 0x65, 0x61, 0x6c, 0x3e, 0x2d, 0x31, 0x38, 0x3c, 0x2f, 0x72, 0x65, 0x61, 0x6c, 0x3e, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x3c, 0x72, 0x65, 0x61, 0x6c, 0x3e, 0x37, 0x37, 0x34, 0x3c, 0x2f, 0x72, 0x65, 0x61, 0x6c, 0x3e, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x3c, 0x72, 0x65, 0x61, 0x6c, 0x3e, 0x35, 0x39, 0x34, 0x3c, 0x2f, 0x72, 0x65, 0x61, 0x6c, 0x3e, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x09, 0x3c, 0x2f, 0x61, 0x72, 0x72, 0x61, 0x79, 0x3e, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x09, 0x3c, 0x6b, 0x65, 0x79, 0x3e, 0x63, 0x6f, 0x6d, 0x2e, 0x61, 0x70, 0x70, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x69, 0x6e, 0x74, 0x2e, 0x74, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x3c, 0x2f, 0x6b, 0x65, 0x79, 0x3e, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x09, 0x3c, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x3e, 0x63, 0x6f, 0x6d, 0x2e, 0x61, 0x70, 0x70, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x69, 0x6e, 0x74, 0x69, 0x6e, 0x67, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x3c, 0x2f, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x3e, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x09, 0x3c, 0x6b, 0x65, 0x79, 0x3e, 0x63, 0x6f, 0x6d, 0x2e, 0x61, 0x70, 0x70, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x69, 0x6e, 0x74, 0x2e, 0x74, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x6d, 0x6f, 0x64, 0x44, 0x61, 0x74, 0x65, 0x3c, 0x2f, 0x6b, 0x65, 0x79, 0x3e, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x09, 0x3c, 0x64, 0x61, 0x74, 0x65, 0x3e, 0x32, 0x30, 0x30, 0x37, 0x2d, 0x30, 0x31, 0x2d, 0x33, 0x30, 0x54, 0x32, 0x32, 0x3a, 0x30, 0x38, 0x3a, 0x34, 0x31, 0x5a, 0x3c, 0x2f, 0x64, 0x61, 0x74, 0x65, 0x3e, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x09, 0x3c, 0x6b, 0x65, 0x79, 0x3e, 0x63, 0x6f, 0x6d, 0x2e, 0x61, 0x70, 0x70, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x69, 0x6e, 0x74, 0x2e, 0x74, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x73, 0x74, 0x61, 0x74, 0x65, 0x46, 0x6c, 0x61, 0x67, 0x3c, 0x2f, 0x6b, 0x65, 0x79, 0x3e, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x09, 0x3c, 0x69, 0x6e, 0x74, 0x65, 0x67, 0x65, 0x72, 0x3e, 0x30, 0x3c, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x67, 0x65, 0x72, 0x3e, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x3c, 0x2f, 0x64, 0x69, 0x63, 0x74, 0x3e, 0x0a, 0x09, 0x09, 0x09, 0x3c, 0x2f, 0x61, 0x72, 0x72, 0x61, 0x79, 0x3e, 0x0a, 0x09, 0x09, 0x3c, 0x2f, 0x64, 0x69, 0x63, 0x74, 0x3e, 0x0a, 0x09, 0x09, 0x3c, 0x6b, 0x65, 0x79, 0x3e, 0x63, 0x6f, 0x6d, 0x2e, 0x61, 0x70, 0x70, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x69, 0x6e, 0x74, 0x2e, 0x50, 0x61, 0x70, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x2e, 0x50, 0x4d, 0x50, 0x61, 0x70, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x3c, 0x2f, 0x6b, 0x65, 0x79, 0x3e, 0x0a, 0x09, 0x09, 0x3c, 0x64, 0x69, 0x63, 0x74, 0x3e, 0x0a, 0x09, 0x09, 0x09, 0x3c, 0x6b, 0x65, 0x79, 0x3e, 0x63, 0x6f, 0x6d, 0x2e, 0x61, 0x70, 0x70, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x69, 0x6e, 0x74, 0x2e, 0x74, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x3c, 0x2f, 0x6b, 0x65, 0x79, 0x3e, 0x0a, 0x09, 0x09, 0x09, 0x3c, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x3e, 0x63, 0x6f, 0x6d, 0x2e, 0x61, 0x70, 0x70, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x69, 0x6e, 0x74, 0x2e, 0x70, 0x6d, 0x2e, 0x50, 0x6f, 0x73, 0x74, 0x53, 0x63, 0x72, 0x69, 0x70, 0x74, 0x3c, 0x2f, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x3e, 0x0a, 0x09, 0x09, 0x09, 0x3c, 0x6b, 0x65, 0x79, 0x3e, 0x63, 0x6f, 0x6d, 0x2e, 0x61, 0x70, 0x70, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x69, 0x6e, 0x74, 0x2e, 0x74, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x69, 0x74, 0x65, 0x6d, 0x41, 0x72, 0x72, 0x61, 0x79, 0x3c, 0x2f, 0x6b, 0x65, 0x79, 0x3e, 0x0a, 0x09, 0x09, 0x09, 0x3c, 0x61, 0x72, 0x72, 0x61, 0x79, 0x3e, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x3c, 0x64, 0x69, 0x63, 0x74, 0x3e, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x09, 0x3c, 0x6b, 0x65, 0x79, 0x3e, 0x63, 0x6f, 0x6d, 0x2e, 0x61, 0x70, 0x70, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x69, 0x6e, 0x74, 0x2e, 0x50, 0x61, 0x70, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x2e, 0x50, 0x4d, 0x50, 0x61, 0x70, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x3c, 0x2f, 0x6b, 0x65, 0x79, 0x3e, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x09, 0x3c, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x3e, 0x6e, 0x61, 0x2d, 0x6c, 0x65, 0x74, 0x74, 0x65, 0x72, 0x3c, 0x2f, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x3e, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x09, 0x3c, 0x6b, 0x65, 0x79, 0x3e, 0x63, 0x6f, 0x6d, 0x2e, 0x61, 0x70, 0x70, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x69, 0x6e, 0x74, 0x2e, 0x74, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x3c, 0x2f, 0x6b, 0x65, 0x79, 0x3e, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x09, 0x3c, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x3e, 0x63, 0x6f, 0x6d, 0x2e, 0x61, 0x70, 0x70, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x69, 0x6e, 0x74, 0x2e, 0x70, 0x6d, 0x2e, 0x50, 0x6f, 0x73, 0x74, 0x53, 0x63, 0x72, 0x69, 0x70, 0x74, 0x3c, 0x2f, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x3e, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x09, 0x3c, 0x6b, 0x65, 0x79, 0x3e, 0x63, 0x6f, 0x6d, 0x2e, 0x61, 0x70, 0x70, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x69, 0x6e, 0x74, 0x2e, 0x74, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x6d, 0x6f, 0x64, 0x44, 0x61, 0x74, 0x65, 0x3c, 0x2f, 0x6b, 0x65, 0x79, 0x3e, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x09, 0x3c, 0x64, 0x61, 0x74, 0x65, 0x3e, 0x32, 0x30, 0x30, 0x33, 0x2d, 0x30, 0x37, 0x2d, 0x30, 0x31, 0x54, 0x31, 0x37, 0x3a, 0x34, 0x39, 0x3a, 0x33, 0x36, 0x5a, 0x3c, 0x2f, 0x64, 0x61, 0x74, 0x65, 0x3e, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x09, 0x3c, 0x6b, 0x65, 0x79, 0x3e, 0x63, 0x6f, 0x6d, 0x2e, 0x61, 0x70, 0x70, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x69, 0x6e, 0x74, 0x2e, 0x74, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x73, 0x74, 0x61, 0x74, 0x65, 0x46, 0x6c, 0x61, 0x67, 0x3c, 0x2f, 0x6b, 0x65, 0x79, 0x3e, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x09, 0x3c, 0x69, 0x6e, 0x74, 0x65, 0x67, 0x65, 0x72, 0x3e, 0x31, 0x3c, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x67, 0x65, 0x72, 0x3e, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x3c, 0x2f, 0x64, 0x69, 0x63, 0x74, 0x3e, 0x0a, 0x09, 0x09, 0x09, 0x3c, 0x2f, 0x61, 0x72, 0x72, 0x61, 0x79, 0x3e, 0x0a, 0x09, 0x09, 0x3c, 0x2f, 0x64, 0x69, 0x63, 0x74, 0x3e, 0x0a, 0x09, 0x09, 0x3c, 0x6b, 0x65, 0x79, 0x3e, 0x63, 0x6f, 0x6d, 0x2e, 0x61, 0x70, 0x70, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x69, 0x6e, 0x74, 0x2e, 0x50, 0x61, 0x70, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x2e, 0x50, 0x4d, 0x55, 0x6e, 0x61, 0x64, 0x6a, 0x75, 0x73, 0x74, 0x65, 0x64, 0x50, 0x61, 0x67, 0x65, 0x52, 0x65, 0x63, 0x74, 0x3c, 0x2f, 0x6b, 0x65, 0x79, 0x3e, 0x0a, 0x09, 0x09, 0x3c, 0x64, 0x69, 0x63, 0x74, 0x3e, 0x0a, 0x09, 0x09, 0x09, 0x3c, 0x6b, 0x65, 0x79, 0x3e, 0x63, 0x6f, 0x6d, 0x2e, 0x61, 0x70, 0x70, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x69, 0x6e, 0x74, 0x2e, 0x74, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x3c, 0x2f, 0x6b, 0x65, 0x79, 0x3e, 0x0a, 0x09, 0x09, 0x09, 0x3c, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x3e, 0x63, 0x6f, 0x6d, 0x2e, 0x61, 0x70, 0x70, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x69, 0x6e, 0x74, 0x2e, 0x70, 0x6d, 0x2e, 0x50, 0x6f, 0x73, 0x74, 0x53, 0x63, 0x72, 0x69, 0x70, 0x74, 0x3c, 0x2f, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x3e, 0x0a, 0x09, 0x09, 0x09, 0x3c, 0x6b, 0x65, 0x79, 0x3e, 0x63, 0x6f, 0x6d, 0x2e, 0x61, 0x70, 0x70, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x69, 0x6e, 0x74, 0x2e, 0x74, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x69, 0x74, 0x65, 0x6d, 0x41, 0x72, 0x72, 0x61, 0x79, 0x3c, 0x2f, 0x6b, 0x65, 0x79, 0x3e, 0x0a, 0x09, 0x09, 0x09, 0x3c, 0x61, 0x72, 0x72, 0x61, 0x79, 0x3e, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x3c, 0x64, 0x69, 0x63, 0x74, 0x3e, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x09, 0x3c, 0x6b, 0x65, 0x79, 0x3e, 0x63, 0x6f, 0x6d, 0x2e, 0x61, 0x70, 0x70, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x69, 0x6e, 0x74, 0x2e, 0x50, 0x61, 0x70, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x2e, 0x50, 0x4d, 0x55, 0x6e, 0x61, 0x64, 0x6a, 0x75, 0x73, 0x74, 0x65, 0x64, 0x50, 0x61, 0x67, 0x65, 0x52, 0x65, 0x63, 0x74, 0x3c, 0x2f, 0x6b, 0x65, 0x79, 0x3e, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x09, 0x3c, 0x61, 0x72, 0x72, 0x61, 0x79, 0x3e, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x3c, 0x72, 0x65, 0x61, 0x6c, 0x3e, 0x30, 0x2e, 0x30, 0x3c, 0x2f, 0x72, 0x65, 0x61, 0x6c, 0x3e, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x3c, 0x72, 0x65, 0x61, 0x6c, 0x3e, 0x30, 0x2e, 0x30, 0x3c, 0x2f, 0x72, 0x65, 0x61, 0x6c, 0x3e, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x3c, 0x72, 0x65, 0x61, 0x6c, 0x3e, 0x37, 0x33, 0x34, 0x3c, 0x2f, 0x72, 0x65, 0x61, 0x6c, 0x3e, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x3c, 0x72, 0x65, 0x61, 0x6c, 0x3e, 0x35, 0x37, 0x36, 0x3c, 0x2f, 0x72, 0x65, 0x61, 0x6c, 0x3e, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x09, 0x3c, 0x2f, 0x61, 0x72, 0x72, 0x61, 0x79, 0x3e, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x09, 0x3c, 0x6b, 0x65, 0x79, 0x3e, 0x63, 0x6f, 0x6d, 0x2e, 0x61, 0x70, 0x70, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x69, 0x6e, 0x74, 0x2e, 0x74, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x3c, 0x2f, 0x6b, 0x65, 0x79, 0x3e, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x09, 0x3c, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x3e, 0x63, 0x6f, 0x6d, 0x2e, 0x61, 0x70, 0x70, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x69, 0x6e, 0x74, 0x69, 0x6e, 0x67, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x3c, 0x2f, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x3e, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x09, 0x3c, 0x6b, 0x65, 0x79, 0x3e, 0x63, 0x6f, 0x6d, 0x2e, 0x61, 0x70, 0x70, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x69, 0x6e, 0x74, 0x2e, 0x74, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x6d, 0x6f, 0x64, 0x44, 0x61, 0x74, 0x65, 0x3c, 0x2f, 0x6b, 0x65, 0x79, 0x3e, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x09, 0x3c, 0x64, 0x61, 0x74, 0x65, 0x3e, 0x32, 0x30, 0x30, 0x37, 0x2d, 0x30, 0x31, 0x2d, 0x33, 0x30, 0x54, 0x32, 0x32, 0x3a, 0x30, 0x38, 0x3a, 0x34, 0x31, 0x5a, 0x3c, 0x2f, 0x64, 0x61, 0x74, 0x65, 0x3e, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x09, 0x3c, 0x6b, 0x65, 0x79, 0x3e, 0x63, 0x6f, 0x6d, 0x2e, 0x61, 0x70, 0x70, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x69, 0x6e, 0x74, 0x2e, 0x74, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x73, 0x74, 0x61, 0x74, 0x65, 0x46, 0x6c, 0x61, 0x67, 0x3c, 0x2f, 0x6b, 0x65, 0x79, 0x3e, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x09, 0x3c, 0x69, 0x6e, 0x74, 0x65, 0x67, 0x65, 0x72, 0x3e, 0x30, 0x3c, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x67, 0x65, 0x72, 0x3e, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x3c, 0x2f, 0x64, 0x69, 0x63, 0x74, 0x3e, 0x0a, 0x09, 0x09, 0x09, 0x3c, 0x2f, 0x61, 0x72, 0x72, 0x61, 0x79, 0x3e, 0x0a, 0x09, 0x09, 0x3c, 0x2f, 0x64, 0x69, 0x63, 0x74, 0x3e, 0x0a, 0x09, 0x09, 0x3c, 0x6b, 0x65, 0x79, 0x3e, 0x63, 0x6f, 0x6d, 0x2e, 0x61, 0x70, 0x70, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x69, 0x6e, 0x74, 0x2e, 0x50, 0x61, 0x70, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x2e, 0x50, 0x4d, 0x55, 0x6e, 0x61, 0x64, 0x6a, 0x75, 0x73, 0x74, 0x65, 0x64, 0x50, 0x61, 0x70, 0x65, 0x72, 0x52, 0x65, 0x63, 0x74, 0x3c, 0x2f, 0x6b, 0x65, 0x79, 0x3e, 0x0a, 0x09, 0x09, 0x3c, 0x64, 0x69, 0x63, 0x74, 0x3e, 0x0a, 0x09, 0x09, 0x09, 0x3c, 0x6b, 0x65, 0x79, 0x3e, 0x63, 0x6f, 0x6d, 0x2e, 0x61, 0x70, 0x70, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x69, 0x6e, 0x74, 0x2e, 0x74, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x3c, 0x2f, 0x6b, 0x65, 0x79, 0x3e, 0x0a, 0x09, 0x09, 0x09, 0x3c, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x3e, 0x63, 0x6f, 0x6d, 0x2e, 0x61, 0x70, 0x70, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x69, 0x6e, 0x74, 0x2e, 0x70, 0x6d, 0x2e, 0x50, 0x6f, 0x73, 0x74, 0x53, 0x63, 0x72, 0x69, 0x70, 0x74, 0x3c, 0x2f, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x3e, 0x0a, 0x09, 0x09, 0x09, 0x3c, 0x6b, 0x65, 0x79, 0x3e, 0x63, 0x6f, 0x6d, 0x2e, 0x61, 0x70, 0x70, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x69, 0x6e, 0x74, 0x2e, 0x74, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x69, 0x74, 0x65, 0x6d, 0x41, 0x72, 0x72, 0x61, 0x79, 0x3c, 0x2f, 0x6b, 0x65, 0x79, 0x3e, 0x0a, 0x09, 0x09, 0x09, 0x3c, 0x61, 0x72, 0x72, 0x61, 0x79, 0x3e, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x3c, 0x64, 0x69, 0x63, 0x74, 0x3e, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x09, 0x3c, 0x6b, 0x65, 0x79, 0x3e, 0x63, 0x6f, 0x6d, 0x2e, 0x61, 0x70, 0x70, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x69, 0x6e, 0x74, 0x2e, 0x50, 0x61, 0x70, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x2e, 0x50, 0x4d, 0x55, 0x6e, 0x61, 0x64, 0x6a, 0x75, 0x73, 0x74, 0x65, 0x64, 0x50, 0x61, 0x70, 0x65, 0x72, 0x52, 0x65, 0x63, 0x74, 0x3c, 0x2f, 0x6b, 0x65, 0x79, 0x3e, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x09, 0x3c, 0x61, 0x72, 0x72, 0x61, 0x79, 0x3e, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x3c, 0x72, 0x65, 0x61, 0x6c, 0x3e, 0x2d, 0x31, 0x38, 0x3c, 0x2f, 0x72, 0x65, 0x61, 0x6c, 0x3e, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x3c, 0x72, 0x65, 0x61, 0x6c, 0x3e, 0x2d, 0x31, 0x38, 0x3c, 0x2f, 0x72, 0x65, 0x61, 0x6c, 0x3e, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x3c, 0x72, 0x65, 0x61, 0x6c, 0x3e, 0x37, 0x37, 0x34, 0x3c, 0x2f, 0x72, 0x65, 0x61, 0x6c, 0x3e, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x3c, 0x72, 0x65, 0x61, 0x6c, 0x3e, 0x35, 0x39, 0x34, 0x3c, 0x2f, 0x72, 0x65, 0x61, 0x6c, 0x3e, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x09, 0x3c, 0x2f, 0x61, 0x72, 0x72, 0x61, 0x79, 0x3e, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x09, 0x3c, 0x6b, 0x65, 0x79, 0x3e, 0x63, 0x6f, 0x6d, 0x2e, 0x61, 0x70, 0x70, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x69, 0x6e, 0x74, 0x2e, 0x74, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x3c, 0x2f, 0x6b, 0x65, 0x79, 0x3e, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x09, 0x3c, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x3e, 0x63, 0x6f, 0x6d, 0x2e, 0x61, 0x70, 0x70, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x69, 0x6e, 0x74, 0x69, 0x6e, 0x67, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x3c, 0x2f, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x3e, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x09, 0x3c, 0x6b, 0x65, 0x79, 0x3e, 0x63, 0x6f, 0x6d, 0x2e, 0x61, 0x70, 0x70, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x69, 0x6e, 0x74, 0x2e, 0x74, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x6d, 0x6f, 0x64, 0x44, 0x61, 0x74, 0x65, 0x3c, 0x2f, 0x6b, 0x65, 0x79, 0x3e, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x09, 0x3c, 0x64, 0x61, 0x74, 0x65, 0x3e, 0x32, 0x30, 0x30, 0x37, 0x2d, 0x30, 0x31, 0x2d, 0x33, 0x30, 0x54, 0x32, 0x32, 0x3a, 0x30, 0x38, 0x3a, 0x34, 0x31, 0x5a, 0x3c, 0x2f, 0x64, 0x61, 0x74, 0x65, 0x3e, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x09, 0x3c, 0x6b, 0x65, 0x79, 0x3e, 0x63, 0x6f, 0x6d, 0x2e, 0x61, 0x70, 0x70, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x69, 0x6e, 0x74, 0x2e, 0x74, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x73, 0x74, 0x61, 0x74, 0x65, 0x46, 0x6c, 0x61, 0x67, 0x3c, 0x2f, 0x6b, 0x65, 0x79, 0x3e, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x09, 0x3c, 0x69, 0x6e, 0x74, 0x65, 0x67, 0x65, 0x72, 0x3e, 0x30, 0x3c, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x67, 0x65, 0x72, 0x3e, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x3c, 0x2f, 0x64, 0x69, 0x63, 0x74, 0x3e, 0x0a, 0x09, 0x09, 0x09, 0x3c, 0x2f, 0x61, 0x72, 0x72, 0x61, 0x79, 0x3e, 0x0a, 0x09, 0x09, 0x3c, 0x2f, 0x64, 0x69, 0x63, 0x74, 0x3e, 0x0a, 0x09, 0x09, 0x3c, 0x6b, 0x65, 0x79, 0x3e, 0x63, 0x6f, 0x6d, 0x2e, 0x61, 0x70, 0x70, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x69, 0x6e, 0x74, 0x2e, 0x50, 0x61, 0x70, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x2e, 0x70, 0x70, 0x64, 0x2e, 0x50, 0x4d, 0x50, 0x61, 0x70, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x3c, 0x2f, 0x6b, 0x65, 0x79, 0x3e, 0x0a, 0x09, 0x09, 0x3c, 0x64, 0x69, 0x63, 0x74, 0x3e, 0x0a, 0x09, 0x09, 0x09, 0x3c, 0x6b, 0x65, 0x79, 0x3e, 0x63, 0x6f, 0x6d, 0x2e, 0x61, 0x70, 0x70, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x69, 0x6e, 0x74, 0x2e, 0x74, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x3c, 0x2f, 0x6b, 0x65, 0x79, 0x3e, 0x0a, 0x09, 0x09, 0x09, 0x3c, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x3e, 0x63, 0x6f, 0x6d, 0x2e, 0x61, 0x70, 0x70, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x69, 0x6e, 0x74, 0x2e, 0x70, 0x6d, 0x2e, 0x50, 0x6f, 0x73, 0x74, 0x53, 0x63, 0x72, 0x69, 0x70, 0x74, 0x3c, 0x2f, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x3e, 0x0a, 0x09, 0x09, 0x09, 0x3c, 0x6b, 0x65, 0x79, 0x3e, 0x63, 0x6f, 0x6d, 0x2e, 0x61, 0x70, 0x70, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x69, 0x6e, 0x74, 0x2e, 0x74, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x69, 0x74, 0x65, 0x6d, 0x41, 0x72, 0x72, 0x61, 0x79, 0x3c, 0x2f, 0x6b, 0x65, 0x79, 0x3e, 0x0a, 0x09, 0x09, 0x09, 0x3c, 0x61, 0x72, 0x72, 0x61, 0x79, 0x3e, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x3c, 0x64, 0x69, 0x63, 0x74, 0x3e, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x09, 0x3c, 0x6b, 0x65, 0x79, 0x3e, 0x63, 0x6f, 0x6d, 0x2e, 0x61, 0x70, 0x70, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x69, 0x6e, 0x74, 0x2e, 0x50, 0x61, 0x70, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x2e, 0x70, 0x70, 0x64, 0x2e, 0x50, 0x4d, 0x50, 0x61, 0x70, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x3c, 0x2f, 0x6b, 0x65, 0x79, 0x3e, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x09, 0x3c, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x3e, 0x55, 0x53, 0x20, 0x4c, 0x65, 0x74, 0x74, 0x65, 0x72, 0x3c, 0x2f, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x3e, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x09, 0x3c, 0x6b, 0x65, 0x79, 0x3e, 0x63, 0x6f, 0x6d, 0x2e, 0x61, 0x70, 0x70, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x69, 0x6e, 0x74, 0x2e, 0x74, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x3c, 0x2f, 0x6b, 0x65, 0x79, 0x3e, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x09, 0x3c, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x3e, 0x63, 0x6f, 0x6d, 0x2e, 0x61, 0x70, 0x70, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x69, 0x6e, 0x74, 0x2e, 0x70, 0x6d, 0x2e, 0x50, 0x6f, 0x73, 0x74, 0x53, 0x63, 0x72, 0x69, 0x70, 0x74, 0x3c, 0x2f, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x3e, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x09, 0x3c, 0x6b, 0x65, 0x79, 0x3e, 0x63, 0x6f, 0x6d, 0x2e, 0x61, 0x70, 0x70, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x69, 0x6e, 0x74, 0x2e, 0x74, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x6d, 0x6f, 0x64, 0x44, 0x61, 0x74, 0x65, 0x3c, 0x2f, 0x6b, 0x65, 0x79, 0x3e, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x09, 0x3c, 0x64, 0x61, 0x74, 0x65, 0x3e, 0x32, 0x30, 0x30, 0x33, 0x2d, 0x30, 0x37, 0x2d, 0x30, 0x31, 0x54, 0x31, 0x37, 0x3a, 0x34, 0x39, 0x3a, 0x33, 0x36, 0x5a, 0x3c, 0x2f, 0x64, 0x61, 0x74, 0x65, 0x3e, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x09, 0x3c, 0x6b, 0x65, 0x79, 0x3e, 0x63, 0x6f, 0x6d, 0x2e, 0x61, 0x70, 0x70, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x69, 0x6e, 0x74, 0x2e, 0x74, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x73, 0x74, 0x61, 0x74, 0x65, 0x46, 0x6c, 0x61, 0x67, 0x3c, 0x2f, 0x6b, 0x65, 0x79, 0x3e, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x09, 0x3c, 0x69, 0x6e, 0x74, 0x65, 0x67, 0x65, 0x72, 0x3e, 0x31, 0x3c, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x67, 0x65, 0x72, 0x3e, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x3c, 0x2f, 0x64, 0x69, 0x63, 0x74, 0x3e, 0x0a, 0x09, 0x09, 0x09, 0x3c, 0x2f, 0x61, 0x72, 0x72, 0x61, 0x79, 0x3e, 0x0a, 0x09, 0x09, 0x3c, 0x2f, 0x64, 0x69, 0x63, 0x74, 0x3e, 0x0a, 0x09, 0x09, 0x3c, 0x6b, 0x65, 0x79, 0x3e, 0x63, 0x6f, 0x6d, 0x2e, 0x61, 0x70, 0x70, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x69, 0x6e, 0x74, 0x2e, 0x74, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x41, 0x50, 0x49, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x3c, 0x2f, 0x6b, 0x65, 0x79, 0x3e, 0x0a, 0x09, 0x09, 0x3c, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x3e, 0x30, 0x30, 0x2e, 0x32, 0x30, 0x3c, 0x2f, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x3e, 0x0a, 0x09, 0x09, 0x3c, 0x6b, 0x65, 0x79, 0x3e, 0x63, 0x6f, 0x6d, 0x2e, 0x61, 0x70, 0x70, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x69, 0x6e, 0x74, 0x2e, 0x74, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x70, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x4c, 0x6f, 0x63, 0x6b, 0x3c, 0x2f, 0x6b, 0x65, 0x79, 0x3e, 0x0a, 0x09, 0x09, 0x3c, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x2f, 0x3e, 0x0a, 0x09, 0x09, 0x3c, 0x6b, 0x65, 0x79, 0x3e, 0x63, 0x6f, 0x6d, 0x2e, 0x61, 0x70, 0x70, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x69, 0x6e, 0x74, 0x2e, 0x74, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x3c, 0x2f, 0x6b, 0x65, 0x79, 0x3e, 0x0a, 0x09, 0x09, 0x3c, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x3e, 0x63, 0x6f, 0x6d, 0x2e, 0x61, 0x70, 0x70, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x69, 0x6e, 0x74, 0x2e, 0x50, 0x61, 0x70, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x3c, 0x2f, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x3e, 0x0a, 0x09, 0x3c, 0x2f, 0x64, 0x69, 0x63, 0x74, 0x3e, 0x0a, 0x09, 0x3c, 0x6b, 0x65, 0x79, 0x3e, 0x63, 0x6f, 0x6d, 0x2e, 0x61, 0x70, 0x70, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x69, 0x6e, 0x74, 0x2e, 0x74, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x41, 0x50, 0x49, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x3c, 0x2f, 0x6b, 0x65, 0x79, 0x3e, 0x0a, 0x09, 0x3c, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x3e, 0x30, 0x30, 0x2e, 0x32, 0x30, 0x3c, 0x2f, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x3e, 0x0a, 0x09, 0x3c, 0x6b, 0x65, 0x79, 0x3e, 0x63, 0x6f, 0x6d, 0x2e, 0x61, 0x70, 0x70, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x69, 0x6e, 0x74, 0x2e, 0x74, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x70, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x4c, 0x6f, 0x63, 0x6b, 0x3c, 0x2f, 0x6b, 0x65, 0x79, 0x3e, 0x0a, 0x09, 0x3c, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x2f, 0x3e, 0x0a, 0x09, 0x3c, 0x6b, 0x65, 0x79, 0x3e, 0x63, 0x6f, 0x6d, 0x2e, 0x61, 0x70, 0x70, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x69, 0x6e, 0x74, 0x2e, 0x74, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x3c, 0x2f, 0x6b, 0x65, 0x79, 0x3e, 0x0a, 0x09, 0x3c, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x3e, 0x63, 0x6f, 0x6d, 0x2e, 0x61, 0x70, 0x70, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x69, 0x6e, 0x74, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x3c, 0x2f, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x3e, 0x0a, 0x3c, 0x2f, 0x64, 0x69, 0x63, 0x74, 0x3e, 0x0a, 0x3c, 0x2f, 0x70, 0x6c, 0x69, 0x73, 0x74, 0x3e, 0x0a, 0x38, 0x42, 0x49, 0x4d, 0x03, 0xe9, 0x00, 0x00, 0x00, 0x00, 0x00, 0x78, 0x00, 0x03, 0x00, 0x00, 0x00, 0x48, 0x00, 0x48, 0x00, 0x00, 0x00, 0x00, 0x02, 0xde, 0x02, 0x40, 0xff, 0xee, 0xff, 0xee, 0x03, 0x06, 0x02, 0x52, 0x03, 0x67, 0x05, 0x28, 0x03, 0xfc, 0x00, 0x02, 0x00, 0x00, 0x00, 0x48, 0x00, 0x48, 0x00, 0x00, 0x00, 0x00, 0x02, 0xd8, 0x02, 0x28, 0x00, 0x01, 0x00, 0x00, 0x00, 0x64, 0x00, 0x00, 0x00, 0x01, 0x00, 0x03, 0x03, 0x03, 0x00, 0x00, 0x00, 0x01, 0x7f, 0xff, 0x00, 0x01, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x68, 0x08, 0x00, 0x19, 0x01, 0x90, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x42, 0x49, 0x4d, 0x03, 0xed, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x48, 0x00, 0x00, 0x00, 0x01, 0x00, 0x01, 0x00, 0x48, 0x00, 0x00, 0x00, 0x01, 0x00, 0x01, 0x38, 0x42, 0x49, 0x4d, 0x04, 0x26, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0x80, 0x00, 0x00, 0x38, 0x42, 0x49, 0x4d, 0x04, 0x0d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x1e, 0x38, 0x42, 0x49, 0x4d, 0x04, 0x19, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x1e, 0x38, 0x42, 0x49, 0x4d, 0x03, 0xf3, 0x00, 0x00, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x38, 0x42, 0x49, 0x4d, 0x04, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x38, 0x42, 0x49, 0x4d, 0x27, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x38, 0x42, 0x49, 0x4d, 0x03, 0xf5, 0x00, 0x00, 0x00, 0x00, 0x00, 0x48, 0x00, 0x2f, 0x66, 0x66, 0x00, 0x01, 0x00, 0x6c, 0x66, 0x66, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x2f, 0x66, 0x66, 0x00, 0x01, 0x00, 0xa1, 0x99, 0x9a, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x32, 0x00, 0x00, 0x00, 0x01, 0x00, 0x5a, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x35, 0x00, 0x00, 0x00, 0x01, 0x00, 0x2d, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x38, 0x42, 0x49, 0x4d, 0x03, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x03, 0xe8, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x03, 0xe8, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x03, 0xe8, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x03, 0xe8, 0x00, 0x00, 0x38, 0x42, 0x49, 0x4d, 0x04, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x02, 0x40, 0x00, 0x00, 0x02, 0x40, 0x00, 0x00, 0x00, 0x00, 0x38, 0x42, 0x49, 0x4d, 0x04, 0x1e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x38, 0x42, 0x49, 0x4d, 0x04, 0x1a, 0x00, 0x00, 0x00, 0x00, 0x03, 0x45, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x64, 0x00, 0x00, 0x00, 0x64, 0x00, 0x00, 0x00, 0x08, 0x00, 0x44, 0x00, 0x53, 0x00, 0x43, 0x00, 0x30, 0x00, 0x32, 0x00, 0x33, 0x00, 0x32, 0x00, 0x35, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x64, 0x00, 0x00, 0x00, 0x64, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x6e, 0x75, 0x6c, 0x6c, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x06, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x73, 0x4f, 0x62, 0x6a, 0x63, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x52, 0x63, 0x74, 0x31, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x54, 0x6f, 0x70, 0x20, 0x6c, 0x6f, 0x6e, 0x67, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4c, 0x65, 0x66, 0x74, 0x6c, 0x6f, 0x6e, 0x67, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x42, 0x74, 0x6f, 0x6d, 0x6c, 0x6f, 0x6e, 0x67, 0x00, 0x00, 0x00, 0x64, 0x00, 0x00, 0x00, 0x00, 0x52, 0x67, 0x68, 0x74, 0x6c, 0x6f, 0x6e, 0x67, 0x00, 0x00, 0x00, 0x64, 0x00, 0x00, 0x00, 0x06, 0x73, 0x6c, 0x69, 0x63, 0x65, 0x73, 0x56, 0x6c, 0x4c, 0x73, 0x00, 0x00, 0x00, 0x01, 0x4f, 0x62, 0x6a, 0x63, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x73, 0x6c, 0x69, 0x63, 0x65, 0x00, 0x00, 0x00, 0x12, 0x00, 0x00, 0x00, 0x07, 0x73, 0x6c, 0x69, 0x63, 0x65, 0x49, 0x44, 0x6c, 0x6f, 0x6e, 0x67, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x44, 0x6c, 0x6f, 0x6e, 0x67, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x65, 0x6e, 0x75, 0x6d, 0x00, 0x00, 0x00, 0x0c, 0x45, 0x53, 0x6c, 0x69, 0x63, 0x65, 0x4f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x00, 0x00, 0x00, 0x0d, 0x61, 0x75, 0x74, 0x6f, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x00, 0x00, 0x00, 0x00, 0x54, 0x79, 0x70, 0x65, 0x65, 0x6e, 0x75, 0x6d, 0x00, 0x00, 0x00, 0x0a, 0x45, 0x53, 0x6c, 0x69, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x00, 0x00, 0x00, 0x00, 0x49, 0x6d, 0x67, 0x20, 0x00, 0x00, 0x00, 0x06, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x73, 0x4f, 0x62, 0x6a, 0x63, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x52, 0x63, 0x74, 0x31, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x54, 0x6f, 0x70, 0x20, 0x6c, 0x6f, 0x6e, 0x67, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4c, 0x65, 0x66, 0x74, 0x6c, 0x6f, 0x6e, 0x67, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x42, 0x74, 0x6f, 0x6d, 0x6c, 0x6f, 0x6e, 0x67, 0x00, 0x00, 0x00, 0x64, 0x00, 0x00, 0x00, 0x00, 0x52, 0x67, 0x68, 0x74, 0x6c, 0x6f, 0x6e, 0x67, 0x00, 0x00, 0x00, 0x64, 0x00, 0x00, 0x00, 0x03, 0x75, 0x72, 0x6c, 0x54, 0x45, 0x58, 0x54, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x6e, 0x75, 0x6c, 0x6c, 0x54, 0x45, 0x58, 0x54, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4d, 0x73, 0x67, 0x65, 0x54, 0x45, 0x58, 0x54, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x61, 0x6c, 0x74, 0x54, 0x61, 0x67, 0x54, 0x45, 0x58, 0x54, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x63, 0x65, 0x6c, 0x6c, 0x54, 0x65, 0x78, 0x74, 0x49, 0x73, 0x48, 0x54, 0x4d, 0x4c, 0x62, 0x6f, 0x6f, 0x6c, 0x01, 0x00, 0x00, 0x00, 0x08, 0x63, 0x65, 0x6c, 0x6c, 0x54, 0x65, 0x78, 0x74, 0x54, 0x45, 0x58, 0x54, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x09, 0x68, 0x6f, 0x72, 0x7a, 0x41, 0x6c, 0x69, 0x67, 0x6e, 0x65, 0x6e, 0x75, 0x6d, 0x00, 0x00, 0x00, 0x0f, 0x45, 0x53, 0x6c, 0x69, 0x63, 0x65, 0x48, 0x6f, 0x72, 0x7a, 0x41, 0x6c, 0x69, 0x67, 0x6e, 0x00, 0x00, 0x00, 0x07, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x00, 0x00, 0x00, 0x09, 0x76, 0x65, 0x72, 0x74, 0x41, 0x6c, 0x69, 0x67, 0x6e, 0x65, 0x6e, 0x75, 0x6d, 0x00, 0x00, 0x00, 0x0f, 0x45, 0x53, 0x6c, 0x69, 0x63, 0x65, 0x56, 0x65, 0x72, 0x74, 0x41, 0x6c, 0x69, 0x67, 0x6e, 0x00, 0x00, 0x00, 0x07, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x00, 0x00, 0x00, 0x0b, 0x62, 0x67, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x54, 0x79, 0x70, 0x65, 0x65, 0x6e, 0x75, 0x6d, 0x00, 0x00, 0x00, 0x11, 0x45, 0x53, 0x6c, 0x69, 0x63, 0x65, 0x42, 0x47, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x54, 0x79, 0x70, 0x65, 0x00, 0x00, 0x00, 0x00, 0x4e, 0x6f, 0x6e, 0x65, 0x00, 0x00, 0x00, 0x09, 0x74, 0x6f, 0x70, 0x4f, 0x75, 0x74, 0x73, 0x65, 0x74, 0x6c, 0x6f, 0x6e, 0x67, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0a, 0x6c, 0x65, 0x66, 0x74, 0x4f, 0x75, 0x74, 0x73, 0x65, 0x74, 0x6c, 0x6f, 0x6e, 0x67, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x62, 0x6f, 0x74, 0x74, 0x6f, 0x6d, 0x4f, 0x75, 0x74, 0x73, 0x65, 0x74, 0x6c, 0x6f, 0x6e, 0x67, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0b, 0x72, 0x69, 0x67, 0x68, 0x74, 0x4f, 0x75, 0x74, 0x73, 0x65, 0x74, 0x6c, 0x6f, 0x6e, 0x67, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x42, 0x49, 0x4d, 0x04, 0x11, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x38, 0x42, 0x49, 0x4d, 0x04, 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x01, 0x38, 0x42, 0x49, 0x4d, 0x04, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x09, 0xf9, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x64, 0x00, 0x00, 0x00, 0x64, 0x00, 0x00, 0x01, 0x2c, 0x00, 0x00, 0x75, 0x30, 0x00, 0x00, 0x09, 0xdd, 0x00, 0x18, 0x00, 0x01, 0xff, 0xd8, 0xff, 0xe0, 0x00, 0x10, 0x4a, 0x46, 0x49, 0x46, 0x00, 0x01, 0x02, 0x01, 0x00, 0x48, 0x00, 0x48, 0x00, 0x00, 0xff, 0xed, 0x00, 0x0c, 0x41, 0x64, 0x6f, 0x62, 0x65, 0x5f, 0x43, 0x4d, 0x00, 0x02, 0xff, 0xee, 0x00, 0x0e, 0x41, 0x64, 0x6f, 0x62, 0x65, 0x00, 0x64, 0x80, 0x00, 0x00, 0x00, 0x01, 0xff, 0xdb, 0x00, 0x84, 0x00, 0x0c, 0x08, 0x08, 0x08, 0x09, 0x08, 0x0c, 0x09, 0x09, 0x0c, 0x11, 0x0b, 0x0a, 0x0b, 0x11, 0x15, 0x0f, 0x0c, 0x0c, 0x0f, 0x15, 0x18, 0x13, 0x13, 0x15, 0x13, 0x13, 0x18, 0x11, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x11, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x01, 0x0d, 0x0b, 0x0b, 0x0d, 0x0e, 0x0d, 0x10, 0x0e, 0x0e, 0x10, 0x14, 0x0e, 0x0e, 0x0e, 0x14, 0x14, 0x0e, 0x0e, 0x0e, 0x0e, 0x14, 0x11, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x11, 0x11, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x11, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0xff, 0xc0, 0x00, 0x11, 0x08, 0x00, 0x64, 0x00, 0x64, 0x03, 0x01, 0x22, 0x00, 0x02, 0x11, 0x01, 0x03, 0x11, 0x01, 0xff, 0xdd, 0x00, 0x04, 0x00, 0x07, 0xff, 0xc4, 0x01, 0x3f, 0x00, 0x00, 0x01, 0x05, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x01, 0x02, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x01, 0x00, 0x01, 0x05, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x10, 0x00, 0x01, 0x04, 0x01, 0x03, 0x02, 0x04, 0x02, 0x05, 0x07, 0x06, 0x08, 0x05, 0x03, 0x0c, 0x33, 0x01, 0x00, 0x02, 0x11, 0x03, 0x04, 0x21, 0x12, 0x31, 0x05, 0x41, 0x51, 0x61, 0x13, 0x22, 0x71, 0x81, 0x32, 0x06, 0x14, 0x91, 0xa1, 0xb1, 0x42, 0x23, 0x24, 0x15, 0x52, 0xc1, 0x62, 0x33, 0x34, 0x72, 0x82, 0xd1, 0x43, 0x07, 0x25, 0x92, 0x53, 0xf0, 0xe1, 0xf1, 0x63, 0x73, 0x35, 0x16, 0xa2, 0xb2, 0x83, 0x26, 0x44, 0x93, 0x54, 0x64, 0x45, 0xc2, 0xa3, 0x74, 0x36, 0x17, 0xd2, 0x55, 0xe2, 0x65, 0xf2, 0xb3, 0x84, 0xc3, 0xd3, 0x75, 0xe3, 0xf3, 0x46, 0x27, 0x94, 0xa4, 0x85, 0xb4, 0x95, 0xc4, 0xd4, 0xe4, 0xf4, 0xa5, 0xb5, 0xc5, 0xd5, 0xe5, 0xf5, 0x56, 0x66, 0x76, 0x86, 0x96, 0xa6, 0xb6, 0xc6, 0xd6, 0xe6, 0xf6, 0x37, 0x47, 0x57, 0x67, 0x77, 0x87, 0x97, 0xa7, 0xb7, 0xc7, 0xd7, 0xe7, 0xf7, 0x11, 0x00, 0x02, 0x02, 0x01, 0x02, 0x04, 0x04, 0x03, 0x04, 0x05, 0x06, 0x07, 0x07, 0x06, 0x05, 0x35, 0x01, 0x00, 0x02, 0x11, 0x03, 0x21, 0x31, 0x12, 0x04, 0x41, 0x51, 0x61, 0x71, 0x22, 0x13, 0x05, 0x32, 0x81, 0x91, 0x14, 0xa1, 0xb1, 0x42, 0x23, 0xc1, 0x52, 0xd1, 0xf0, 0x33, 0x24, 0x62, 0xe1, 0x72, 0x82, 0x92, 0x43, 0x53, 0x15, 0x63, 0x73, 0x34, 0xf1, 0x25, 0x06, 0x16, 0xa2, 0xb2, 0x83, 0x07, 0x26, 0x35, 0xc2, 0xd2, 0x44, 0x93, 0x54, 0xa3, 0x17, 0x64, 0x45, 0x55, 0x36, 0x74, 0x65, 0xe2, 0xf2, 0xb3, 0x84, 0xc3, 0xd3, 0x75, 0xe3, 0xf3, 0x46, 0x94, 0xa4, 0x85, 0xb4, 0x95, 0xc4, 0xd4, 0xe4, 0xf4, 0xa5, 0xb5, 0xc5, 0xd5, 0xe5, 0xf5, 0x56, 0x66, 0x76, 0x86, 0x96, 0xa6, 0xb6, 0xc6, 0xd6, 0xe6, 0xf6, 0x27, 0x37, 0x47, 0x57, 0x67, 0x77, 0x87, 0x97, 0xa7, 0xb7, 0xc7, 0xff, 0xda, 0x00, 0x0c, 0x03, 0x01, 0x00, 0x02, 0x11, 0x03, 0x11, 0x00, 0x3f, 0x00, 0xf2, 0xed, 0xb2, 0x8d, 0x4d, 0x45, 0xcd, 0x2f, 0x3f, 0x44, 0x68, 0x93, 0xc3, 0x58, 0xc8, 0xf1, 0x1f, 0x8a, 0x33, 0x86, 0xda, 0x58, 0xc1, 0xa0, 0x02, 0x4f, 0xc4, 0xa1, 0x69, 0xa5, 0x9b, 0x5b, 0x4b, 0x84, 0x73, 0xdf, 0xc9, 0x15, 0xf8, 0xe3, 0xd1, 0x0e, 0x07, 0x93, 0xf3, 0xd1, 0x0f, 0x1c, 0x17, 0xef, 0x2e, 0x3b, 0x5b, 0xdc, 0xff, 0x00, 0xdf, 0x42, 0xbf, 0x8f, 0x8e, 0xdc, 0x82, 0xca, 0xd8, 0x37, 0x11, 0xa9, 0x3d, 0x82, 0x69, 0x2b, 0xc4, 0x6d, 0xc9, 0x75, 0x25, 0xbc, 0xf7, 0xec, 0xa1, 0xb5, 0x74, 0x19, 0x5d, 0x2e, 0x8a, 0x9a, 0x4b, 0x89, 0x7d, 0xc4, 0x68, 0xc6, 0xf6, 0xfe, 0xb2, 0xa0, 0x30, 0x1d, 0x60, 0x86, 0x88, 0x8d, 0x49, 0x3e, 0x01, 0x11, 0x20, 0xa3, 0x8c, 0xb9, 0xb1, 0xaa, 0x62, 0xad, 0xbf, 0x18, 0x97, 0x43, 0x47, 0x1d, 0xd2, 0xaf, 0x04, 0xd9, 0xb8, 0xc8, 0x0d, 0x68, 0xe4, 0xf7, 0x3e, 0x48, 0xf1, 0x05, 0xbc, 0x25, 0xaa, 0x07, 0x71, 0xd9, 0x14, 0x78, 0xf6, 0x49, 0xb5, 0x90, 0xfd, 0xa7, 0xc6, 0x14, 0xfd, 0x1b, 0x1c, 0xff, 0x00, 0x4d, 0x8d, 0x2e, 0x73, 0x8c, 0x35, 0xa3, 0x52, 0x4f, 0x92, 0x48, 0xa6, 0x1a, 0x24, 0xb6, 0x2a, 0xfa, 0xa5, 0x9e, 0x60, 0x64, 0x39, 0x94, 0x13, 0xcb, 0x27, 0x73, 0x80, 0xf3, 0x0c, 0xf6, 0xff, 0x00, 0xd2, 0x5a, 0x78, 0xbf, 0x53, 0x71, 0xf6, 0x01, 0x75, 0xb6, 0x97, 0x6a, 0x25, 0xa1, 0xad, 0x1f, 0xf4, 0xb7, 0x23, 0x48, 0xb7, 0x94, 0x84, 0x97, 0x5b, 0xff, 0x00, 0x32, 0xa9, 0xdd, 0xfc, 0xed, 0x9b, 0x7e, 0x0d, 0x9e, 0x52, 0x4a, 0x95, 0x61, 0xff, 0xd0, 0xf3, 0x3b, 0xa7, 0x70, 0xee, 0x01, 0x8f, 0xb9, 0x59, 0xfa, 0x7e, 0xdf, 0xe4, 0xc8, 0xf9, 0x2a, 0xc2, 0x5c, 0x63, 0xc3, 0x54, 0x67, 0x87, 0x6e, 0x10, 0x35, 0x68, 0xd4, 0x79, 0x1e, 0x53, 0x4a, 0xe0, 0xdc, 0xe9, 0xb8, 0x1f, 0x6a, 0xda, 0x6c, 0x25, 0x94, 0x37, 0xb0, 0xd0, 0xb8, 0xad, 0x67, 0xe4, 0x55, 0x8a, 0x5b, 0x8b, 0x82, 0xc0, 0x6f, 0x76, 0x80, 0x34, 0x49, 0x05, 0x2e, 0x9e, 0xc6, 0x1c, 0x66, 0x31, 0xba, 0x10, 0x23, 0xe0, 0xaf, 0xe1, 0x61, 0x53, 0x43, 0x8d, 0x81, 0xb3, 0x67, 0xef, 0x9e, 0x49, 0x2a, 0x12, 0x6c, 0xb6, 0x63, 0x1a, 0x0c, 0x31, 0xba, 0x55, 0xcd, 0xac, 0xfa, 0x8e, 0xdf, 0x91, 0x6e, 0x91, 0xd9, 0xb3, 0xc9, 0x73, 0x90, 0x7a, 0xab, 0x6a, 0xc2, 0xa4, 0x60, 0xe2, 0x8f, 0xd2, 0x38, 0x03, 0x7d, 0x9e, 0x0d, 0xff, 0x00, 0xcc, 0xd6, 0xd3, 0x6b, 0x71, 0x67, 0xd2, 0x3e, 0x64, 0x72, 0xab, 0xdb, 0x8d, 0x54, 0x39, 0xc5, 0x83, 0x6b, 0x3d, 0xee, 0x2e, 0xd4, 0x92, 0x3c, 0x4a, 0x56, 0xba, 0xb4, 0x79, 0x5c, 0xf7, 0xb2, 0x96, 0x6c, 0x8d, 0xaf, 0x80, 0x48, 0x3c, 0xf0, 0xb2, 0x1f, 0x63, 0x9c, 0xe9, 0x3f, 0x24, 0x5c, 0xdb, 0xdd, 0x76, 0x43, 0xde, 0xfd, 0x5c, 0xe3, 0x24, 0xfc, 0x50, 0x00, 0x93, 0x0a, 0x78, 0x8a, 0x0d, 0x49, 0xca, 0xcf, 0x93, 0x63, 0x1b, 0x7d, 0xd7, 0x57, 0x50, 0xd5, 0xef, 0x70, 0x6b, 0x4f, 0xc7, 0x45, 0xdb, 0x74, 0x9e, 0x8d, 0x5e, 0x33, 0x83, 0xd8, 0x37, 0xdd, 0xc3, 0xac, 0x3d, 0xbf, 0x92, 0xc5, 0x5b, 0xea, 0xbf, 0xd5, 0x62, 0xc0, 0xdc, 0xbc, 0xbd, 0x2d, 0x22, 0x5a, 0xcf, 0xdd, 0x69, 0xff, 0x00, 0xd1, 0x8e, 0x5d, 0xa5, 0x38, 0xb5, 0xb0, 0x00, 0xc6, 0xc4, 0x24, 0x4a, 0xd6, 0x8d, 0x18, 0x04, 0x49, 0x88, 0x9e, 0x55, 0xd6, 0x61, 0xb0, 0xc1, 0x70, 0x32, 0xdd, 0x3c, 0x95, 0xda, 0xf1, 0xfe, 0xf5, 0x62, 0xbc, 0x76, 0x8e, 0x75, 0x28, 0x02, 0xa2, 0xe7, 0x7d, 0x92, 0xb9, 0x84, 0x96, 0x96, 0xda, 0xf7, 0x70, 0x12, 0x4e, 0x5a, 0xff, 0x00, 0xff, 0xd1, 0xf3, 0x7a, 0x21, 0xaf, 0xde, 0xef, 0xa2, 0x22, 0x55, 0xfc, 0x5a, 0xbd, 0x42, 0xfb, 0x08, 0xfa, 0x67, 0x4f, 0x82, 0xcd, 0x6d, 0x85, 0xc0, 0x56, 0x3b, 0x90, 0xb7, 0xf0, 0x2a, 0x0e, 0x63, 0x58, 0x3b, 0xf2, 0xa3, 0x9e, 0x8c, 0xb8, 0x86, 0xbe, 0x49, 0xf1, 0x2c, 0x0c, 0x86, 0xb4, 0x4c, 0x69, 0xe4, 0xaf, 0x6e, 0xcc, 0x6b, 0x7d, 0x46, 0xb3, 0x70, 0xec, 0x38, 0x51, 0x7d, 0x02, 0x8a, 0xc7, 0xa6, 0xd9, 0x20, 0x68, 0x0f, 0x8f, 0x8a, 0xcf, 0xc9, 0xc2, 0xea, 0x59, 0x5b, 0x48, 0xb0, 0x91, 0xae, 0xe6, 0xc9, 0x03, 0xc9, 0x30, 0x51, 0x66, 0xd4, 0x0d, 0xad, 0xbd, 0x5f, 0x53, 0xcc, 0x6b, 0xb6, 0x90, 0x5a, 0x3b, 0x83, 0x0b, 0x43, 0x17, 0x31, 0xd6, 0xc3, 0x6e, 0x12, 0x3b, 0x79, 0xac, 0xc1, 0x89, 0x47, 0xd9, 0xe8, 0x63, 0x98, 0x45, 0xed, 0x6c, 0x5a, 0xf1, 0xa0, 0x27, 0xc5, 0x5b, 0xc3, 0x6f, 0xa6, 0xe0, 0x1c, 0x7d, 0xb3, 0xa2, 0x69, 0x34, 0x7b, 0xae, 0x1a, 0x8d, 0x45, 0x17, 0x9d, 0xeb, 0xfd, 0x21, 0xd8, 0xb9, 0xae, 0xb5, 0x80, 0xbb, 0x1e, 0xd2, 0x5c, 0xd7, 0x78, 0x13, 0xf9, 0xae, 0x4b, 0xea, 0xc7, 0x4a, 0x39, 0xbd, 0x55, 0xb3, 0xed, 0x66, 0x38, 0xf5, 0x09, 0x22, 0x41, 0x23, 0xe8, 0x37, 0xfb, 0x4b, 0xa1, 0xeb, 0xd6, 0xfe, 0x88, 0x31, 0xbf, 0x41, 0xc0, 0xee, 0xd2, 0x74, 0x02, 0x78, 0x53, 0xfa, 0x97, 0x43, 0x19, 0x85, 0x65, 0xff, 0x00, 0x9d, 0x71, 0x33, 0xe4, 0x1a, 0x7d, 0x8d, 0x53, 0x42, 0x56, 0x35, 0x6b, 0xe5, 0x80, 0x06, 0xc7, 0x57, 0xa7, 0xc4, 0xa9, 0xdb, 0xb6, 0x81, 0x1f, 0xeb, 0xd9, 0x69, 0x56, 0xc2, 0xd0, 0x00, 0xe5, 0x55, 0xc0, 0x12, 0xc2, 0xd7, 0x4e, 0xa2, 0x5a, 0x7c, 0x0a, 0xd0, 0x63, 0x9a, 0xd1, 0xaf, 0xd2, 0xe2, 0x3c, 0x12, 0x62, 0x66, 0xc6, 0x42, 0x23, 0x5a, 0x49, 0x8f, 0x10, 0xa2, 0xd2, 0x3e, 0x28, 0x9d, 0xc4, 0x88, 0x09, 0x29, 0x16, 0xc3, 0x3c, 0x24, 0x8d, 0xe6, 0x92, 0x72, 0x1f, 0xff, 0xd2, 0xf3, 0xbb, 0xb0, 0xfe, 0xcb, 0x99, 0xe9, 0xce, 0xf6, 0x88, 0x2d, 0x77, 0x91, 0x5b, 0x3d, 0x3d, 0xd0, 0xe6, 0x90, 0xa9, 0x65, 0x57, 0x38, 0x95, 0xdd, 0xcb, 0x9a, 0x7d, 0xce, 0xf2, 0x3f, 0x44, 0x23, 0x60, 0x58, 0x76, 0xe9, 0xca, 0x8c, 0xea, 0x1b, 0x31, 0x02, 0x32, 0x23, 0xea, 0xee, 0xb1, 0xcd, 0xb0, 0xc7, 0x87, 0x74, 0x7a, 0xeb, 0x70, 0x1a, 0x71, 0xe1, 0xfe, 0xe4, 0x1c, 0x1d, 0xae, 0xe5, 0x69, 0xd8, 0xfa, 0x99, 0x50, 0x0d, 0x1a, 0xf7, 0x2a, 0x3a, 0x0c, 0xf4, 0x1a, 0x8e, 0xc7, 0x27, 0x5d, 0xbf, 0x18, 0x41, 0xdc, 0xc2, 0xf0, 0x7f, 0x74, 0xf6, 0x3a, 0x22, 0x66, 0xdb, 0x68, 0xc6, 0x80, 0x48, 0x6b, 0x88, 0x06, 0x39, 0x0d, 0xee, 0xaa, 0x1f, 0xb3, 0xd5, 0x1b, 0x83, 0xd8, 0x3b, 0x38, 0x8f, 0x69, 0xfe, 0xdf, 0xd1, 0x4d, 0x29, 0xa1, 0x4c, 0x7a, 0xf4, 0xbf, 0xa7, 0x92, 0xcf, 0xa5, 0x20, 0x08, 0xf3, 0xf6, 0xff, 0x00, 0x15, 0xbb, 0xd1, 0x31, 0xd9, 0x5e, 0x3d, 0x75, 0x56, 0x36, 0x88, 0x00, 0x81, 0xe0, 0x16, 0x5e, 0x55, 0x74, 0x3f, 0x00, 0x9d, 0xe0, 0xcc, 0x69, 0xe7, 0x3a, 0x2d, 0xbe, 0x90, 0x00, 0xa9, 0xae, 0xef, 0x1f, 0x95, 0x4b, 0x0d, 0x9a, 0xdc, 0xc7, 0x45, 0xfe, 0xb1, 0x7d, 0x60, 0xa7, 0xa1, 0xe0, 0x1f, 0x4e, 0x1d, 0x99, 0x69, 0x02, 0x9a, 0xcf, 0x1f, 0xca, 0x7b, 0xbf, 0x90, 0xc5, 0xc2, 0xb3, 0xeb, 0x57, 0xd6, 0x03, 0x6b, 0xae, 0x39, 0xb6, 0x82, 0xe3, 0x31, 0xa1, 0x68, 0xf2, 0x6b, 0x5c, 0x12, 0xfa, 0xe1, 0x91, 0x66, 0x47, 0x5d, 0xb8, 0x3b, 0x4f, 0x44, 0x36, 0xb6, 0x8f, 0x28, 0xdd, 0xff, 0x00, 0x7e, 0x46, 0xab, 0x12, 0x2b, 0x65, 0x55, 0x32, 0xa7, 0x62, 0xb6, 0xbd, 0xf7, 0x64, 0x10, 0xdb, 0x03, 0x9f, 0x1b, 0x9e, 0xc7, 0xd9, 0xb8, 0x3b, 0x1f, 0x67, 0xf3, 0x6c, 0x52, 0x80, 0xd7, 0x7d, 0x0f, 0xea, 0x7f, 0x5d, 0x1d, 0x67, 0xa6, 0x0b, 0x1e, 0x47, 0xda, 0x69, 0x3b, 0x2e, 0x03, 0xc7, 0xf3, 0x5f, 0x1f, 0xf0, 0x8b, 0xa1, 0x02, 0x46, 0xba, 0x79, 0xaf, 0x32, 0xff, 0x00, 0x16, 0xad, 0xca, 0x1d, 0x57, 0x2a, 0xdc, 0x79, 0x18, 0x41, 0xb0, 0xf6, 0x9e, 0xe4, 0x9f, 0xd0, 0x8f, 0xeb, 0x31, 0xab, 0xd2, 0x83, 0xa4, 0xcb, 0x8c, 0xb8, 0xa0, 0x42, 0x12, 0x7b, 0x67, 0x9f, 0x2f, 0xf5, 0x09, 0x26, 0x96, 0xc4, 0xce, 0xa9, 0x20, 0xa7, 0xff, 0xd3, 0xf3, 0x2f, 0xb4, 0x5d, 0xe9, 0x0a, 0xb7, 0x9f, 0x4c, 0x19, 0xdb, 0x3a, 0x2d, 0x5e, 0x94, 0xfd, 0xc4, 0xb7, 0xc5, 0x62, 0xf9, 0x2b, 0xfd, 0x2e, 0xe3, 0x5d, 0xe0, 0x7c, 0x13, 0x48, 0xd1, 0x92, 0x12, 0xa9, 0x0b, 0x7a, 0xbc, 0x2d, 0xc2, 0x7f, 0x92, 0x60, 0xab, 0x4e, 0x79, 0x2e, 0x00, 0xf0, 0xaa, 0xe1, 0xda, 0x3d, 0x43, 0xfc, 0xad, 0x55, 0xbb, 0x80, 0x79, 0x81, 0xa0, 0xe6, 0x54, 0x32, 0x6d, 0x02, 0xbe, 0xf3, 0x61, 0x81, 0xa8, 0x44, 0x14, 0x03, 0x59, 0x0e, 0x1c, 0xf6, 0x1f, 0xdc, 0xb2, 0xec, 0xa3, 0x23, 0x77, 0xe8, 0x6e, 0x70, 0xf2, 0x25, 0x1f, 0x1f, 0x17, 0xa9, 0x6d, 0x71, 0x36, 0x97, 0x47, 0x00, 0xa4, 0x02, 0xe0, 0x2c, 0x7c, 0xc1, 0xab, 0xd5, 0x31, 0x85, 0x35, 0xd4, 0xe6, 0x13, 0x02, 0xd6, 0x4b, 0x67, 0x48, 0x2b, 0xa9, 0xe9, 0x2e, 0x02, 0xb6, 0x4f, 0x82, 0xe5, 0x7a, 0x95, 0x19, 0xc6, 0x87, 0x3d, 0xfb, 0xa2, 0xb8, 0x79, 0x1e, 0x4d, 0x3b, 0x96, 0xcf, 0x4f, 0xbd, 0xcd, 0xa2, 0xa2, 0x1f, 0xa0, 0x82, 0xd3, 0xfc, 0x97, 0x05, 0x24, 0x36, 0x6b, 0xf3, 0x31, 0xa2, 0x35, 0x79, 0xef, 0xad, 0xf8, 0xae, 0xaf, 0xaf, 0xd8, 0xf2, 0xd8, 0x6d, 0xed, 0x6b, 0xda, 0x7b, 0x18, 0x1b, 0x5d, 0xff, 0x00, 0x52, 0xb1, 0x6d, 0xf0, 0x81, 0x31, 0xca, 0xf4, 0x6e, 0xb1, 0x80, 0xce, 0xb1, 0x84, 0xc0, 0x21, 0xb7, 0xd6, 0x77, 0x31, 0xd1, 0x27, 0xc1, 0xcd, 0xfe, 0xd2, 0xe3, 0xec, 0xe8, 0x1d, 0x45, 0x96, 0xb0, 0x9a, 0xb7, 0x87, 0x3f, 0x68, 0x2d, 0xf7, 0x01, 0x1f, 0xbe, 0xd1, 0xf4, 0x7f, 0xb4, 0xa4, 0x0d, 0x77, 0xbb, 0xfa, 0x8f, 0x80, 0x3a, 0x7f, 0x43, 0xaa, 0xe2, 0xdf, 0xd2, 0x65, 0x7e, 0x95, 0xe4, 0x0f, 0x1f, 0xa1, 0xfe, 0x6b, 0x16, 0x9f, 0x52, 0xfa, 0xc1, 0xd3, 0xba, 0x6d, 0x26, 0xdc, 0xac, 0x86, 0xd4, 0xd9, 0x0d, 0x31, 0x2e, 0x74, 0x9e, 0xdb, 0x59, 0x2e, 0x55, 0xe8, 0xc9, 0xb2, 0x96, 0xd5, 0x4b, 0x9f, 0xb8, 0x6d, 0xda, 0x1c, 0x04, 0x09, 0x03, 0xfe, 0x8a, 0xc6, 0xfa, 0xd3, 0xf5, 0x6a, 0xbe, 0xbb, 0x5b, 0x2e, 0xc6, 0xb5, 0x94, 0xe6, 0xd5, 0x20, 0x97, 0x7d, 0x1b, 0x1b, 0xf9, 0xad, 0x7c, 0x7d, 0x17, 0xb7, 0xf3, 0x1e, 0x92, 0x1b, 0x7f, 0xf8, 0xe0, 0x7d, 0x59, 0xdd, 0xfd, 0x32, 0xd8, 0x8f, 0xa5, 0xe8, 0x3a, 0x12, 0x5c, 0x3f, 0xfc, 0xc4, 0xfa, 0xc3, 0xb3, 0x77, 0xa7, 0x56, 0xed, 0xdb, 0x76, 0x7a, 0x8d, 0xdd, 0x1f, 0xbf, 0xfd, 0x44, 0x92, 0x56, 0x8f, 0xff, 0xd4, 0xf2, 0xe8, 0x86, 0x17, 0x1e, 0xfa, 0x04, 0x56, 0x4b, 0x43, 0x6c, 0x6f, 0x2d, 0xe5, 0x46, 0x01, 0x64, 0x2b, 0x14, 0x32, 0x5b, 0xb4, 0xa0, 0x52, 0x1d, 0xde, 0x9b, 0x94, 0xdb, 0xab, 0x6b, 0x81, 0xf7, 0x05, 0xb0, 0xd7, 0x07, 0xb2, 0x27, 0x55, 0xc6, 0x57, 0x65, 0xd8, 0x76, 0x6e, 0x64, 0xed, 0xee, 0x16, 0xce, 0x27, 0x57, 0x63, 0xda, 0x0c, 0xc2, 0x8e, 0x51, 0x67, 0x84, 0xfa, 0x1d, 0xdd, 0x62, 0xc7, 0x07, 0xe9, 0xf7, 0xa3, 0xd6, 0x6c, 0x02, 0x41, 0x55, 0x31, 0xf3, 0x2b, 0xb3, 0xba, 0x2b, 0x2e, 0x68, 0x24, 0x1d, 0x47, 0x64, 0xca, 0xa6, 0x50, 0x41, 0x65, 0x90, 0x6c, 0xb1, 0xa5, 0xae, 0x33, 0x23, 0x51, 0xe4, 0xab, 0x7d, 0x5d, 0xcb, 0xb6, 0xcc, 0x37, 0xd0, 0x40, 0x73, 0x71, 0xde, 0x58, 0x09, 0xe7, 0x6f, 0x2c, 0x44, 0xc9, 0xc9, 0xae, 0xba, 0x9d, 0x63, 0x88, 0x01, 0xa0, 0x95, 0x9d, 0xf5, 0x3f, 0x2a, 0xe6, 0x67, 0xdb, 0x50, 0x83, 0x55, 0xad, 0x36, 0x3e, 0x78, 0x10, 0x74, 0x77, 0xfd, 0x2d, 0xaa, 0x4c, 0x7d, 0x58, 0x73, 0x91, 0xa0, 0x0f, 0x51, 0x45, 0xb7, 0x33, 0xdd, 0x58, 0x69, 0x1d, 0xd8, 0x0c, 0x9f, 0x96, 0x88, 0x19, 0x99, 0x19, 0xac, 0xcf, 0xa3, 0xd2, 0xad, 0xb5, 0xdb, 0x76, 0x8f, 0xad, 0xc4, 0xea, 0xcf, 0xdf, 0x7e, 0xdf, 0xdd, 0xfc, 0xd5, 0xa3, 0x5e, 0x43, 0x2b, 0x6b, 0xb2, 0xad, 0x3b, 0x6a, 0xa4, 0x13, 0xa7, 0x04, 0xac, 0x7a, 0x6f, 0xb3, 0x23, 0x26, 0xcc, 0xfb, 0xb4, 0x75, 0x8e, 0x01, 0x83, 0xf7, 0x58, 0x3e, 0x8b, 0x53, 0xa7, 0x2a, 0x1a, 0x31, 0x42, 0x36, 0x5d, 0x4c, 0x9a, 0xf2, 0xdc, 0xc6, 0xfe, 0x98, 0xb4, 0x34, 0xcb, 0x48, 0x0a, 0x8f, 0xdb, 0xb2, 0xeb, 0x76, 0xd6, 0x07, 0x5c, 0x59, 0xc9, 0x64, 0x8f, 0x93, 0xa7, 0x73, 0x16, 0x83, 0xaf, 0x0e, 0xa4, 0x33, 0xef, 0x50, 0xc5, 0x0c, 0xda, 0x59, 0x10, 0x06, 0x8a, 0x2e, 0x29, 0x0e, 0xac, 0xc2, 0x31, 0x3d, 0x36, 0x69, 0x7e, 0xd6, 0xcc, 0xf5, 0x3d, 0x6f, 0xb3, 0xeb, 0x1b, 0x76, 0xef, 0x3b, 0xa3, 0xfa, 0xc9, 0x2b, 0x5f, 0x66, 0x6f, 0xa9, 0x1e, 0x73, 0xf2, 0x49, 0x2e, 0x39, 0xf7, 0x4f, 0xb7, 0x8d, 0xff, 0xd5, 0xf3, 0x26, 0xfe, 0x0a, 0xc5, 0x1b, 0xa7, 0xcb, 0xb2, 0xcf, 0x49, 0x03, 0xb2, 0x46, 0xee, 0xd9, 0xd9, 0xb3, 0xf4, 0x9f, 0x25, 0x4a, 0xdf, 0x4b, 0x77, 0xe8, 0x27, 0xd4, 0xef, 0x1c, 0x2a, 0x29, 0x26, 0xc5, 0x7c, 0x9d, 0x6c, 0x7f, 0xb7, 0x6e, 0x1b, 0x26, 0x7f, 0x05, 0xa3, 0xfe, 0x53, 0x8d, 0x62, 0x57, 0x30, 0x92, 0x12, 0xfa, 0x2f, 0x86, 0xdf, 0xa4, 0xec, 0x67, 0xfe, 0xd0, 0xf4, 0xff, 0x00, 0x4d, 0xfc, 0xdf, 0x78, 0xe1, 0x68, 0x7d, 0x54, 0x99, 0xbf, 0x6f, 0xf3, 0xbe, 0xdf, 0x8e, 0xdd, 0x7f, 0xef, 0xeb, 0x97, 0x49, 0x3e, 0x3b, 0x7f, 0x06, 0x2c, 0x9f, 0x37, 0x5f, 0xf0, 0x9f, 0x4c, 0xeb, 0x7b, 0xbf, 0x67, 0x55, 0xe8, 0xff, 0x00, 0x31, 0xbc, 0x7a, 0x9e, 0x31, 0xdb, 0xfe, 0x92, 0xae, 0x37, 0x7a, 0x4d, 0xdb, 0xe2, 0x17, 0x9d, 0xa4, 0xa3, 0xc9, 0xba, 0xfc, 0x7b, 0x7d, 0x5f, 0x52, 0xa7, 0x7e, 0xd1, 0x28, 0xf8, 0xf3, 0xb0, 0xc7, 0x32, 0xbc, 0x99, 0x24, 0xc5, 0xe3, 0xab, 0xeb, 0x1f, 0xa4, 0xf5, 0xfc, 0xe1, 0x25, 0xe4, 0xe9, 0x24, 0x97, 0xff, 0xd9, 0x00, 0x38, 0x42, 0x49, 0x4d, 0x04, 0x21, 0x00, 0x00, 0x00, 0x00, 0x00, 0x55, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x41, 0x00, 0x64, 0x00, 0x6f, 0x00, 0x62, 0x00, 0x65, 0x00, 0x20, 0x00, 0x50, 0x00, 0x68, 0x00, 0x6f, 0x00, 0x74, 0x00, 0x6f, 0x00, 0x73, 0x00, 0x68, 0x00, 0x6f, 0x00, 0x70, 0x00, 0x00, 0x00, 0x13, 0x00, 0x41, 0x00, 0x64, 0x00, 0x6f, 0x00, 0x62, 0x00, 0x65, 0x00, 0x20, 0x00, 0x50, 0x00, 0x68, 0x00, 0x6f, 0x00, 0x74, 0x00, 0x6f, 0x00, 0x73, 0x00, 0x68, 0x00, 0x6f, 0x00, 0x70, 0x00, 0x20, 0x00, 0x37, 0x00, 0x2e, 0x00, 0x30, 0x00, 0x00, 0x00, 0x01, 0x00, 0x38, 0x42, 0x49, 0x4d, 0x04, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x05, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0xff, 0xe1, 0x15, 0x67, 0x68, 0x74, 0x74, 0x70, 0x3a, 0x2f, 0x2f, 0x6e, 0x73, 0x2e, 0x61, 0x64, 0x6f, 0x62, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x78, 0x61, 0x70, 0x2f, 0x31, 0x2e, 0x30, 0x2f, 0x00, 0x3c, 0x3f, 0x78, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x20, 0x62, 0x65, 0x67, 0x69, 0x6e, 0x3d, 0x27, 0xef, 0xbb, 0xbf, 0x27, 0x20, 0x69, 0x64, 0x3d, 0x27, 0x57, 0x35, 0x4d, 0x30, 0x4d, 0x70, 0x43, 0x65, 0x68, 0x69, 0x48, 0x7a, 0x72, 0x65, 0x53, 0x7a, 0x4e, 0x54, 0x63, 0x7a, 0x6b, 0x63, 0x39, 0x64, 0x27, 0x3f, 0x3e, 0x0a, 0x3c, 0x3f, 0x61, 0x64, 0x6f, 0x62, 0x65, 0x2d, 0x78, 0x61, 0x70, 0x2d, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x20, 0x65, 0x73, 0x63, 0x3d, 0x22, 0x43, 0x52, 0x22, 0x3f, 0x3e, 0x0a, 0x3c, 0x78, 0x3a, 0x78, 0x61, 0x70, 0x6d, 0x65, 0x74, 0x61, 0x20, 0x78, 0x6d, 0x6c, 0x6e, 0x73, 0x3a, 0x78, 0x3d, 0x27, 0x61, 0x64, 0x6f, 0x62, 0x65, 0x3a, 0x6e, 0x73, 0x3a, 0x6d, 0x65, 0x74, 0x61, 0x2f, 0x27, 0x20, 0x78, 0x3a, 0x78, 0x61, 0x70, 0x74, 0x6b, 0x3d, 0x27, 0x58, 0x4d, 0x50, 0x20, 0x74, 0x6f, 0x6f, 0x6c, 0x6b, 0x69, 0x74, 0x20, 0x32, 0x2e, 0x38, 0x2e, 0x32, 0x2d, 0x33, 0x33, 0x2c, 0x20, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x77, 0x6f, 0x72, 0x6b, 0x20, 0x31, 0x2e, 0x35, 0x27, 0x3e, 0x0a, 0x3c, 0x72, 0x64, 0x66, 0x3a, 0x52, 0x44, 0x46, 0x20, 0x78, 0x6d, 0x6c, 0x6e, 0x73, 0x3a, 0x72, 0x64, 0x66, 0x3d, 0x27, 0x68, 0x74, 0x74, 0x70, 0x3a, 0x2f, 0x2f, 0x77, 0x77, 0x77, 0x2e, 0x77, 0x33, 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x31, 0x39, 0x39, 0x39, 0x2f, 0x30, 0x32, 0x2f, 0x32, 0x32, 0x2d, 0x72, 0x64, 0x66, 0x2d, 0x73, 0x79, 0x6e, 0x74, 0x61, 0x78, 0x2d, 0x6e, 0x73, 0x23, 0x27, 0x20, 0x78, 0x6d, 0x6c, 0x6e, 0x73, 0x3a, 0x69, 0x58, 0x3d, 0x27, 0x68, 0x74, 0x74, 0x70, 0x3a, 0x2f, 0x2f, 0x6e, 0x73, 0x2e, 0x61, 0x64, 0x6f, 0x62, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x69, 0x58, 0x2f, 0x31, 0x2e, 0x30, 0x2f, 0x27, 0x3e, 0x0a, 0x0a, 0x20, 0x3c, 0x72, 0x64, 0x66, 0x3a, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x61, 0x62, 0x6f, 0x75, 0x74, 0x3d, 0x27, 0x75, 0x75, 0x69, 0x64, 0x3a, 0x32, 0x32, 0x64, 0x30, 0x32, 0x62, 0x30, 0x61, 0x2d, 0x62, 0x32, 0x34, 0x39, 0x2d, 0x31, 0x31, 0x64, 0x62, 0x2d, 0x38, 0x61, 0x66, 0x38, 0x2d, 0x39, 0x31, 0x64, 0x35, 0x34, 0x30, 0x33, 0x66, 0x39, 0x32, 0x66, 0x39, 0x27, 0x0a, 0x20, 0x20, 0x78, 0x6d, 0x6c, 0x6e, 0x73, 0x3a, 0x70, 0x64, 0x66, 0x3d, 0x27, 0x68, 0x74, 0x74, 0x70, 0x3a, 0x2f, 0x2f, 0x6e, 0x73, 0x2e, 0x61, 0x64, 0x6f, 0x62, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x64, 0x66, 0x2f, 0x31, 0x2e, 0x33, 0x2f, 0x27, 0x3e, 0x0a, 0x20, 0x20, 0x3c, 0x21, 0x2d, 0x2d, 0x20, 0x70, 0x64, 0x66, 0x3a, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x20, 0x69, 0x73, 0x20, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x65, 0x64, 0x20, 0x2d, 0x2d, 0x3e, 0x0a, 0x20, 0x3c, 0x2f, 0x72, 0x64, 0x66, 0x3a, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x3e, 0x0a, 0x0a, 0x20, 0x3c, 0x72, 0x64, 0x66, 0x3a, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x61, 0x62, 0x6f, 0x75, 0x74, 0x3d, 0x27, 0x75, 0x75, 0x69, 0x64, 0x3a, 0x32, 0x32, 0x64, 0x30, 0x32, 0x62, 0x30, 0x61, 0x2d, 0x62, 0x32, 0x34, 0x39, 0x2d, 0x31, 0x31, 0x64, 0x62, 0x2d, 0x38, 0x61, 0x66, 0x38, 0x2d, 0x39, 0x31, 0x64, 0x35, 0x34, 0x30, 0x33, 0x66, 0x39, 0x32, 0x66, 0x39, 0x27, 0x0a, 0x20, 0x20, 0x78, 0x6d, 0x6c, 0x6e, 0x73, 0x3a, 0x70, 0x68, 0x6f, 0x74, 0x6f, 0x73, 0x68, 0x6f, 0x70, 0x3d, 0x27, 0x68, 0x74, 0x74, 0x70, 0x3a, 0x2f, 0x2f, 0x6e, 0x73, 0x2e, 0x61, 0x64, 0x6f, 0x62, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x68, 0x6f, 0x74, 0x6f, 0x73, 0x68, 0x6f, 0x70, 0x2f, 0x31, 0x2e, 0x30, 0x2f, 0x27, 0x3e, 0x0a, 0x20, 0x20, 0x3c, 0x21, 0x2d, 0x2d, 0x20, 0x70, 0x68, 0x6f, 0x74, 0x6f, 0x73, 0x68, 0x6f, 0x70, 0x3a, 0x43, 0x61, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x69, 0x73, 0x20, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x65, 0x64, 0x20, 0x2d, 0x2d, 0x3e, 0x0a, 0x20, 0x3c, 0x2f, 0x72, 0x64, 0x66, 0x3a, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x3e, 0x0a, 0x0a, 0x20, 0x3c, 0x72, 0x64, 0x66, 0x3a, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x61, 0x62, 0x6f, 0x75, 0x74, 0x3d, 0x27, 0x75, 0x75, 0x69, 0x64, 0x3a, 0x32, 0x32, 0x64, 0x30, 0x32, 0x62, 0x30, 0x61, 0x2d, 0x62, 0x32, 0x34, 0x39, 0x2d, 0x31, 0x31, 0x64, 0x62, 0x2d, 0x38, 0x61, 0x66, 0x38, 0x2d, 0x39, 0x31, 0x64, 0x35, 0x34, 0x30, 0x33, 0x66, 0x39, 0x32, 0x66, 0x39, 0x27, 0x0a, 0x20, 0x20, 0x78, 0x6d, 0x6c, 0x6e, 0x73, 0x3a, 0x78, 0x61, 0x70, 0x3d, 0x27, 0x68, 0x74, 0x74, 0x70, 0x3a, 0x2f, 0x2f, 0x6e, 0x73, 0x2e, 0x61, 0x64, 0x6f, 0x62, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x78, 0x61, 0x70, 0x2f, 0x31, 0x2e, 0x30, 0x2f, 0x27, 0x3e, 0x0a, 0x20, 0x20, 0x3c, 0x21, 0x2d, 0x2d, 0x20, 0x78, 0x61, 0x70, 0x3a, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x69, 0x73, 0x20, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x65, 0x64, 0x20, 0x2d, 0x2d, 0x3e, 0x0a, 0x20, 0x3c, 0x2f, 0x72, 0x64, 0x66, 0x3a, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x3e, 0x0a, 0x0a, 0x20, 0x3c, 0x72, 0x64, 0x66, 0x3a, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x61, 0x62, 0x6f, 0x75, 0x74, 0x3d, 0x27, 0x75, 0x75, 0x69, 0x64, 0x3a, 0x32, 0x32, 0x64, 0x30, 0x32, 0x62, 0x30, 0x61, 0x2d, 0x62, 0x32, 0x34, 0x39, 0x2d, 0x31, 0x31, 0x64, 0x62, 0x2d, 0x38, 0x61, 0x66, 0x38, 0x2d, 0x39, 0x31, 0x64, 0x35, 0x34, 0x30, 0x33, 0x66, 0x39, 0x32, 0x66, 0x39, 0x27, 0x0a, 0x20, 0x20, 0x78, 0x6d, 0x6c, 0x6e, 0x73, 0x3a, 0x78, 0x61, 0x70, 0x4d, 0x4d, 0x3d, 0x27, 0x68, 0x74, 0x74, 0x70, 0x3a, 0x2f, 0x2f, 0x6e, 0x73, 0x2e, 0x61, 0x64, 0x6f, 0x62, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x78, 0x61, 0x70, 0x2f, 0x31, 0x2e, 0x30, 0x2f, 0x6d, 0x6d, 0x2f, 0x27, 0x3e, 0x0a, 0x20, 0x20, 0x3c, 0x78, 0x61, 0x70, 0x4d, 0x4d, 0x3a, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x49, 0x44, 0x3e, 0x61, 0x64, 0x6f, 0x62, 0x65, 0x3a, 0x64, 0x6f, 0x63, 0x69, 0x64, 0x3a, 0x70, 0x68, 0x6f, 0x74, 0x6f, 0x73, 0x68, 0x6f, 0x70, 0x3a, 0x32, 0x32, 0x64, 0x30, 0x32, 0x62, 0x30, 0x36, 0x2d, 0x62, 0x32, 0x34, 0x39, 0x2d, 0x31, 0x31, 0x64, 0x62, 0x2d, 0x38, 0x61, 0x66, 0x38, 0x2d, 0x39, 0x31, 0x64, 0x35, 0x34, 0x30, 0x33, 0x66, 0x39, 0x32, 0x66, 0x39, 0x3c, 0x2f, 0x78, 0x61, 0x70, 0x4d, 0x4d, 0x3a, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x49, 0x44, 0x3e, 0x0a, 0x20, 0x3c, 0x2f, 0x72, 0x64, 0x66, 0x3a, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x3e, 0x0a, 0x0a, 0x20, 0x3c, 0x72, 0x64, 0x66, 0x3a, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x61, 0x62, 0x6f, 0x75, 0x74, 0x3d, 0x27, 0x75, 0x75, 0x69, 0x64, 0x3a, 0x32, 0x32, 0x64, 0x30, 0x32, 0x62, 0x30, 0x61, 0x2d, 0x62, 0x32, 0x34, 0x39, 0x2d, 0x31, 0x31, 0x64, 0x62, 0x2d, 0x38, 0x61, 0x66, 0x38, 0x2d, 0x39, 0x31, 0x64, 0x35, 0x34, 0x30, 0x33, 0x66, 0x39, 0x32, 0x66, 0x39, 0x27, 0x0a, 0x20, 0x20, 0x78, 0x6d, 0x6c, 0x6e, 0x73, 0x3a, 0x64, 0x63, 0x3d, 0x27, 0x68, 0x74, 0x74, 0x70, 0x3a, 0x2f, 0x2f, 0x70, 0x75, 0x72, 0x6c, 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x64, 0x63, 0x2f, 0x65, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x2f, 0x31, 0x2e, 0x31, 0x2f, 0x27, 0x3e, 0x0a, 0x20, 0x20, 0x3c, 0x64, 0x63, 0x3a, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x3e, 0x0a, 0x20, 0x20, 0x20, 0x3c, 0x72, 0x64, 0x66, 0x3a, 0x41, 0x6c, 0x74, 0x3e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x3c, 0x72, 0x64, 0x66, 0x3a, 0x6c, 0x69, 0x20, 0x78, 0x6d, 0x6c, 0x3a, 0x6c, 0x61, 0x6e, 0x67, 0x3d, 0x27, 0x78, 0x2d, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x27, 0x3e, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x3c, 0x2f, 0x72, 0x64, 0x66, 0x3a, 0x6c, 0x69, 0x3e, 0x0a, 0x20, 0x20, 0x20, 0x3c, 0x2f, 0x72, 0x64, 0x66, 0x3a, 0x41, 0x6c, 0x74, 0x3e, 0x0a, 0x20, 0x20, 0x3c, 0x2f, 0x64, 0x63, 0x3a, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x3e, 0x0a, 0x20, 0x3c, 0x2f, 0x72, 0x64, 0x66, 0x3a, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x3e, 0x0a, 0x0a, 0x3c, 0x2f, 0x72, 0x64, 0x66, 0x3a, 0x52, 0x44, 0x46, 0x3e, 0x0a, 0x3c, 0x2f, 0x78, 0x3a, 0x78, 0x61, 0x70, 0x6d, 0x65, 0x74, 0x61, 0x3e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x0a, 0x3c, 0x3f, 0x78, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x20, 0x65, 0x6e, 0x64, 0x3d, 0x27, 0x77, 0x27, 0x3f, 0x3e, 0xff, 0xee, 0x00, 0x0e, 0x41, 0x64, 0x6f, 0x62, 0x65, 0x00, 0x64, 0x40, 0x00, 0x00, 0x00, 0x01, 0xff, 0xdb, 0x00, 0x84, 0x00, 0x04, 0x03, 0x03, 0x03, 0x03, 0x03, 0x04, 0x03, 0x03, 0x04, 0x06, 0x04, 0x03, 0x04, 0x06, 0x07, 0x05, 0x04, 0x04, 0x05, 0x07, 0x08, 0x06, 0x06, 0x07, 0x06, 0x06, 0x08, 0x0a, 0x08, 0x09, 0x09, 0x09, 0x09, 0x08, 0x0a, 0x0a, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0a, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x01, 0x04, 0x05, 0x05, 0x08, 0x07, 0x08, 0x0f, 0x0a, 0x0a, 0x0f, 0x14, 0x0e, 0x0e, 0x0e, 0x14, 0x14, 0x0e, 0x0e, 0x0e, 0x0e, 0x14, 0x11, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x11, 0x11, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x11, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0xff, 0xc0, 0x00, 0x11, 0x08, 0x00, 0x64, 0x00, 0x64, 0x03, 0x01, 0x11, 0x00, 0x02, 0x11, 0x01, 0x03, 0x11, 0x01, 0xff, 0xdd, 0x00, 0x04, 0x00, 0x0d, 0xff, 0xc4, 0x01, 0xa2, 0x00, 0x00, 0x00, 0x07, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x05, 0x03, 0x02, 0x06, 0x01, 0x00, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x01, 0x00, 0x02, 0x02, 0x03, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x10, 0x00, 0x02, 0x01, 0x03, 0x03, 0x02, 0x04, 0x02, 0x06, 0x07, 0x03, 0x04, 0x02, 0x06, 0x02, 0x73, 0x01, 0x02, 0x03, 0x11, 0x04, 0x00, 0x05, 0x21, 0x12, 0x31, 0x41, 0x51, 0x06, 0x13, 0x61, 0x22, 0x71, 0x81, 0x14, 0x32, 0x91, 0xa1, 0x07, 0x15, 0xb1, 0x42, 0x23, 0xc1, 0x52, 0xd1, 0xe1, 0x33, 0x16, 0x62, 0xf0, 0x24, 0x72, 0x82, 0xf1, 0x25, 0x43, 0x34, 0x53, 0x92, 0xa2, 0xb2, 0x63, 0x73, 0xc2, 0x35, 0x44, 0x27, 0x93, 0xa3, 0xb3, 0x36, 0x17, 0x54, 0x64, 0x74, 0xc3, 0xd2, 0xe2, 0x08, 0x26, 0x83, 0x09, 0x0a, 0x18, 0x19, 0x84, 0x94, 0x45, 0x46, 0xa4, 0xb4, 0x56, 0xd3, 0x55, 0x28, 0x1a, 0xf2, 0xe3, 0xf3, 0xc4, 0xd4, 0xe4, 0xf4, 0x65, 0x75, 0x85, 0x95, 0xa5, 0xb5, 0xc5, 0xd5, 0xe5, 0xf5, 0x66, 0x76, 0x86, 0x96, 0xa6, 0xb6, 0xc6, 0xd6, 0xe6, 0xf6, 0x37, 0x47, 0x57, 0x67, 0x77, 0x87, 0x97, 0xa7, 0xb7, 0xc7, 0xd7, 0xe7, 0xf7, 0x38, 0x48, 0x58, 0x68, 0x78, 0x88, 0x98, 0xa8, 0xb8, 0xc8, 0xd8, 0xe8, 0xf8, 0x29, 0x39, 0x49, 0x59, 0x69, 0x79, 0x89, 0x99, 0xa9, 0xb9, 0xc9, 0xd9, 0xe9, 0xf9, 0x2a, 0x3a, 0x4a, 0x5a, 0x6a, 0x7a, 0x8a, 0x9a, 0xaa, 0xba, 0xca, 0xda, 0xea, 0xfa, 0x11, 0x00, 0x02, 0x02, 0x01, 0x02, 0x03, 0x05, 0x05, 0x04, 0x05, 0x06, 0x04, 0x08, 0x03, 0x03, 0x6d, 0x01, 0x00, 0x02, 0x11, 0x03, 0x04, 0x21, 0x12, 0x31, 0x41, 0x05, 0x51, 0x13, 0x61, 0x22, 0x06, 0x71, 0x81, 0x91, 0x32, 0xa1, 0xb1, 0xf0, 0x14, 0xc1, 0xd1, 0xe1, 0x23, 0x42, 0x15, 0x52, 0x62, 0x72, 0xf1, 0x33, 0x24, 0x34, 0x43, 0x82, 0x16, 0x92, 0x53, 0x25, 0xa2, 0x63, 0xb2, 0xc2, 0x07, 0x73, 0xd2, 0x35, 0xe2, 0x44, 0x83, 0x17, 0x54, 0x93, 0x08, 0x09, 0x0a, 0x18, 0x19, 0x26, 0x36, 0x45, 0x1a, 0x27, 0x64, 0x74, 0x55, 0x37, 0xf2, 0xa3, 0xb3, 0xc3, 0x28, 0x29, 0xd3, 0xe3, 0xf3, 0x84, 0x94, 0xa4, 0xb4, 0xc4, 0xd4, 0xe4, 0xf4, 0x65, 0x75, 0x85, 0x95, 0xa5, 0xb5, 0xc5, 0xd5, 0xe5, 0xf5, 0x46, 0x56, 0x66, 0x76, 0x86, 0x96, 0xa6, 0xb6, 0xc6, 0xd6, 0xe6, 0xf6, 0x47, 0x57, 0x67, 0x77, 0x87, 0x97, 0xa7, 0xb7, 0xc7, 0xd7, 0xe7, 0xf7, 0x38, 0x48, 0x58, 0x68, 0x78, 0x88, 0x98, 0xa8, 0xb8, 0xc8, 0xd8, 0xe8, 0xf8, 0x39, 0x49, 0x59, 0x69, 0x79, 0x89, 0x99, 0xa9, 0xb9, 0xc9, 0xd9, 0xe9, 0xf9, 0x2a, 0x3a, 0x4a, 0x5a, 0x6a, 0x7a, 0x8a, 0x9a, 0xaa, 0xba, 0xca, 0xda, 0xea, 0xfa, 0xff, 0xda, 0x00, 0x0c, 0x03, 0x01, 0x00, 0x02, 0x11, 0x03, 0x11, 0x00, 0x3f, 0x00, 0xf0, 0x67, 0xa6, 0x5c, 0x0f, 0x01, 0xd4, 0x7e, 0x18, 0x12, 0x98, 0xe9, 0xd6, 0x2d, 0x34, 0x6d, 0x70, 0xdf, 0xdc, 0xa1, 0xe3, 0xec, 0x5b, 0xfb, 0x32, 0x24, 0xb2, 0x01, 0x1f, 0x15, 0xa4, 0x52, 0x4a, 0x82, 0x31, 0xf1, 0xfe, 0xd1, 0x3d, 0x14, 0x64, 0x49, 0x64, 0x22, 0x98, 0xcf, 0xa5, 0x46, 0x6c, 0x16, 0x55, 0x71, 0x56, 0x62, 0x28, 0x07, 0xc5, 0x45, 0x15, 0xa0, 0xc8, 0x89, 0x33, 0xe1, 0x63, 0xd2, 0xd8, 0x34, 0x44, 0x17, 0xa0, 0x2c, 0x4d, 0x16, 0xbb, 0xed, 0xdc, 0xf8, 0x64, 0xc1, 0x6b, 0x31, 0x42, 0x18, 0x8e, 0xc7, 0xb5, 0x2a, 0x7d, 0xb2, 0x56, 0xc5, 0x61, 0x8c, 0xf2, 0xa0, 0x1b, 0x1e, 0x83, 0x0d, 0xa1, 0x63, 0x50, 0x1f, 0x97, 0x7c, 0x2a, 0xa9, 0x1a, 0x9a, 0x86, 0x4f, 0xb4, 0xb4, 0x38, 0x0a, 0xa6, 0x0b, 0xb8, 0x0c, 0x05, 0x14, 0xf8, 0x76, 0x3e, 0x19, 0x14, 0xb6, 0x78, 0xf8, 0x8c, 0x2a, 0xd5, 0x01, 0xdc, 0x6f, 0x8a, 0x1a, 0xe3, 0x8d, 0xab, 0xff, 0xd0, 0xf0, 0xec, 0xe9, 0x15, 0xb5, 0xb9, 0x5a, 0x7c, 0x4c, 0xa2, 0x9e, 0x24, 0xf5, 0xca, 0xc6, 0xe5, 0x99, 0xd9, 0x34, 0x99, 0x04, 0x3a, 0x7d, 0xb5, 0xba, 0xd5, 0x51, 0x63, 0x0e, 0xc7, 0xc5, 0x9b, 0x73, 0xf8, 0xe4, 0x6f, 0x76, 0xca, 0xd9, 0xda, 0x54, 0x6d, 0x72, 0x2e, 0x1a, 0x57, 0x11, 0x44, 0x40, 0x0d, 0x27, 0x7a, 0x0f, 0xd9, 0x5f, 0x12, 0x69, 0x4c, 0x84, 0xcd, 0x36, 0xe3, 0x85, 0xb2, 0xcd, 0x2f, 0x4a, 0x8b, 0x58, 0x36, 0xf6, 0x76, 0xa8, 0x64, 0x64, 0x3c, 0xa4, 0x93, 0xaa, 0x25, 0x3c, 0x49, 0xda, 0xa4, 0xe5, 0x26, 0x54, 0xe4, 0x8c, 0x7c, 0x5c, 0x93, 0x4d, 0x67, 0xc9, 0x3a, 0x6e, 0x9f, 0x13, 0xb4, 0xce, 0xf7, 0x3a, 0x9b, 0xad, 0x52, 0xd6, 0x2a, 0xd1, 0x49, 0xee, 0xc7, 0xf8, 0x64, 0x46, 0x42, 0x4e, 0xcd, 0x92, 0xc2, 0x00, 0xdd, 0x8a, 0x47, 0xe5, 0x69, 0x6e, 0xd4, 0xa4, 0x08, 0x16, 0x83, 0x9c, 0x8c, 0xdd, 0x95, 0x6b, 0xb9, 0xf6, 0xef, 0x97, 0x78, 0x94, 0xe3, 0x78, 0x04, 0xa4, 0xf3, 0xe8, 0xee, 0x64, 0xe1, 0x12, 0x10, 0x05, 0x6a, 0xc7, 0xc0, 0x6f, 0x53, 0xf3, 0xc9, 0x89, 0xb4, 0x9c, 0x4e, 0xb4, 0xf2, 0xd3, 0xde, 0x7a, 0xd2, 0x19, 0x16, 0x38, 0x61, 0x5d, 0xd9, 0x88, 0x05, 0x9c, 0xf4, 0x0a, 0x0f, 0x5f, 0x73, 0x84, 0xe4, 0xa4, 0xc7, 0x0d, 0xa5, 0xf1, 0x59, 0xba, 0x5c, 0x08, 0x98, 0x6f, 0xc8, 0x20, 0xfa, 0x4e, 0x4e, 0xf6, 0x69, 0xe1, 0xa2, 0x89, 0xfd, 0x1f, 0x77, 0x2c, 0xe6, 0xce, 0xd6, 0x17, 0x9a, 0x69, 0xdb, 0xd3, 0x86, 0x18, 0xc1, 0x67, 0x77, 0x26, 0x80, 0x28, 0x1b, 0x93, 0x88, 0x41, 0x0f, 0x40, 0xb0, 0xfc, 0x87, 0xf3, 0x43, 0x98, 0xd7, 0x58, 0x96, 0xdb, 0x4d, 0x91, 0x88, 0xe5, 0x6c, 0x58, 0xdc, 0x5c, 0x2a, 0xf7, 0x2c, 0xb1, 0xfc, 0x20, 0x8f, 0x02, 0xd9, 0x65, 0x06, 0xbe, 0x26, 0x6f, 0xa2, 0x7f, 0xce, 0x3d, 0x69, 0x26, 0xdd, 0x13, 0x52, 0xbf, 0xbd, 0x92, 0x62, 0x59, 0x4c, 0x90, 0xac, 0x50, 0x45, 0x5e, 0xbb, 0x09, 0x03, 0x12, 0x29, 0x84, 0x00, 0xc4, 0xc9, 0x11, 0xff, 0x00, 0x42, 0xe7, 0xa7, 0x7a, 0xd4, 0xfd, 0x21, 0x79, 0xe9, 0x78, 0x71, 0x8b, 0x95, 0x39, 0x75, 0xaf, 0x4e, 0x98, 0x78, 0x42, 0x38, 0xdf, 0xff, 0xd1, 0xf0, 0xe6, 0xa0, 0x58, 0xc8, 0x84, 0x9a, 0xaa, 0x30, 0x55, 0xf9, 0x0a, 0x6f, 0x90, 0x0c, 0xca, 0x72, 0x48, 0xb8, 0x1e, 0x89, 0xa7, 0x23, 0x17, 0x24, 0xff, 0x00, 0x61, 0xb6, 0x54, 0x76, 0x6e, 0x1b, 0xa7, 0xbe, 0x50, 0xf2, 0xc1, 0xd7, 0x4c, 0x52, 0x5e, 0x33, 0x5b, 0xe9, 0x10, 0xf4, 0x54, 0x3c, 0x5e, 0x77, 0xee, 0x49, 0xec, 0x2b, 0xb6, 0x63, 0xe4, 0xc9, 0xc3, 0xef, 0x73, 0xf0, 0xe1, 0x32, 0x1b, 0xf2, 0x7a, 0x05, 0xce, 0xad, 0x65, 0xa1, 0x98, 0xb4, 0x0f, 0x2a, 0x5b, 0x23, 0xeb, 0x12, 0x00, 0x88, 0xb0, 0xa8, 0x66, 0x46, 0x3d, 0xea, 0x7b, 0xfb, 0x9e, 0x99, 0x89, 0xbc, 0x8d, 0x97, 0x3a, 0x34, 0x05, 0x32, 0x5d, 0x1f, 0xc9, 0x1a, 0x8c, 0x36, 0x8c, 0x6f, 0x66, 0xfa, 0xc6, 0xb7, 0x7d, 0xf0, 0x94, 0x04, 0xf0, 0x88, 0xc9, 0xd5, 0x9d, 0x8d, 0x4b, 0x11, 0xd4, 0x9f, 0xbb, 0x25, 0xc5, 0xdc, 0xa2, 0x03, 0x99, 0x4b, 0xbc, 0xf3, 0x0d, 0x97, 0x96, 0x74, 0xe5, 0xf2, 0xb6, 0x80, 0x95, 0xbd, 0x99, 0x15, 0xf5, 0x4b, 0xd2, 0x37, 0x58, 0x46, 0xd4, 0x27, 0xc5, 0xce, 0xc1, 0x7c, 0x30, 0x8e, 0x68, 0x94, 0x7b, 0x9e, 0x6d, 0xe6, 0x7b, 0x9b, 0x5d, 0x3a, 0xd8, 0xdb, 0x32, 0xfa, 0x77, 0x65, 0x15, 0xe4, 0x57, 0xa7, 0x21, 0x55, 0x04, 0x57, 0xef, 0xd8, 0x66, 0x56, 0x38, 0x19, 0x1b, 0xe8, 0xe0, 0x67, 0x98, 0xc7, 0x1a, 0x1c, 0xde, 0x71, 0x71, 0x79, 0x2c, 0xf2, 0xfa, 0x8c, 0x48, 0xec, 0xb5, 0x24, 0x9a, 0x0c, 0xce, 0x75, 0x29, 0xae, 0x8c, 0x67, 0xd4, 0xb5, 0x0b, 0x4b, 0x04, 0x05, 0xef, 0x2e, 0x66, 0x8e, 0x18, 0x08, 0x15, 0xdd, 0x8f, 0x11, 0xb0, 0xeb, 0x4c, 0x04, 0x5b, 0x21, 0x2a, 0x7d, 0x41, 0xe4, 0x4f, 0xcb, 0xcb, 0x5d, 0x12, 0x45, 0xb8, 0xb7, 0x53, 0x71, 0xaa, 0x9f, 0x86, 0x5b, 0xd6, 0x50, 0x4a, 0xed, 0xba, 0x46, 0x77, 0x00, 0x13, 0xd4, 0x8c, 0x85, 0xd3, 0x12, 0x6d, 0xeb, 0x1a, 0x67, 0x95, 0xd9, 0x39, 0x39, 0x50, 0xac, 0xff, 0x00, 0x6f, 0xc4, 0xff, 0x00, 0x1c, 0x81, 0x92, 0xb2, 0x6b, 0x6d, 0x02, 0xdd, 0xbd, 0x36, 0x92, 0x36, 0x2d, 0x1f, 0xc0, 0x2a, 0x0b, 0x28, 0x1b, 0x91, 0x41, 0xf4, 0x9c, 0xb6, 0x25, 0x81, 0x46, 0xfe, 0x81, 0xb5, 0xad, 0x3d, 0xba, 0x57, 0xb7, 0xf9, 0xf6, 0xc9, 0xb0, 0x7f, 0xff, 0xd2, 0xf0, 0xe2, 0x86, 0x95, 0xc4, 0x67, 0x7e, 0x3f, 0x11, 0xf7, 0xa8, 0x19, 0x06, 0x69, 0x8d, 0xca, 0xca, 0x24, 0x8f, 0xd3, 0x52, 0x24, 0x89, 0x47, 0x25, 0x1f, 0xcb, 0x20, 0xf8, 0xb2, 0xb2, 0x76, 0x6e, 0x88, 0x36, 0xf6, 0x6f, 0x2a, 0xc1, 0x6e, 0xfa, 0x45, 0xad, 0xbc, 0x3f, 0x0b, 0x46, 0x81, 0x4d, 0x46, 0xea, 0x7a, 0x9a, 0x83, 0x9a, 0xa9, 0xdd, 0xbb, 0xec, 0x7b, 0x06, 0x5b, 0xe5, 0xcf, 0x2e, 0x69, 0xfa, 0x5c, 0xcd, 0x7b, 0x14, 0x5e, 0xa5, 0xee, 0xf5, 0xb8, 0x7d, 0xdd, 0x99, 0xba, 0xef, 0x91, 0x16, 0x5b, 0x36, 0xb6, 0x65, 0x0d, 0xac, 0xb2, 0x5b, 0xed, 0x34, 0x81, 0x7a, 0xbb, 0x46, 0x40, 0x6a, 0x9e, 0xb4, 0x39, 0x31, 0x13, 0x49, 0xda, 0xd2, 0x9b, 0xed, 0x1e, 0xc4, 0x24, 0xb3, 0x35, 0xb2, 0x88, 0x60, 0x06, 0xe6, 0x56, 0x98, 0x96, 0x79, 0x1e, 0x31, 0x51, 0xc9, 0x8f, 0xcb, 0x00, 0xe6, 0xb3, 0xe4, 0xf9, 0x2b, 0xcc, 0x7a, 0x94, 0xda, 0x96, 0xa9, 0x71, 0x77, 0x70, 0x79, 0xcd, 0x33, 0x97, 0x76, 0x3f, 0xcc, 0xc6, 0xa6, 0x9f, 0x2e, 0x99, 0xb9, 0xc6, 0x2a, 0x21, 0xe6, 0x73, 0xca, 0xe6, 0x4a, 0x51, 0x1a, 0x99, 0x1c, 0x28, 0x04, 0x93, 0xd0, 0x0e, 0xa4, 0xe4, 0xda, 0x5f, 0x50, 0xfe, 0x4a, 0xfe, 0x48, 0xb5, 0xb2, 0xc1, 0xe6, 0x1f, 0x31, 0x7e, 0xef, 0x52, 0x91, 0x43, 0xc3, 0x6e, 0x77, 0xf4, 0x22, 0x6d, 0xbf, 0xe4, 0x63, 0x0e, 0xbf, 0xca, 0x36, 0xeb, 0x5c, 0x84, 0xa5, 0x48, 0x7d, 0x3b, 0x61, 0xa1, 0xdb, 0x5b, 0x2c, 0x71, 0xda, 0x45, 0xc4, 0x28, 0x00, 0x81, 0xdb, 0x31, 0xc9, 0xb4, 0xb2, 0x3b, 0x5d, 0x27, 0xa5, 0x05, 0x1b, 0xc7, 0xdb, 0x10, 0xa9, 0xbd, 0xa6, 0x93, 0x0c, 0x75, 0xe4, 0x39, 0x35, 0x41, 0x3d, 0xc5, 0x06, 0xdb, 0x8e, 0xfd, 0x46, 0x5b, 0x1d, 0x98, 0x95, 0x4f, 0x46, 0xdb, 0xd5, 0xfb, 0x29, 0x5e, 0x9d, 0x0d, 0x32, 0xeb, 0x61, 0x4f, 0xff, 0xd3, 0xf1, 0x46, 0x9a, 0x16, 0x1b, 0x91, 0x71, 0x28, 0xac, 0x4a, 0x14, 0x30, 0x3e, 0x19, 0x54, 0xb9, 0x36, 0xc7, 0x9b, 0x2d, 0xd1, 0x6c, 0x45, 0xe3, 0xdc, 0xde, 0xc8, 0x95, 0x5b, 0x87, 0xf8, 0x41, 0x1d, 0x10, 0x54, 0x01, 0x98, 0x79, 0x25, 0xd1, 0xda, 0xe9, 0xe1, 0xb5, 0x9e, 0xac, 0xeb, 0x42, 0xba, 0x8e, 0xdf, 0x8c, 0x31, 0x21, 0x70, 0xb4, 0x5d, 0xbe, 0xc5, 0x7c, 0x2b, 0xed, 0xe1, 0x94, 0x18, 0xb9, 0x51, 0x3d, 0x03, 0x2c, 0x13, 0x6b, 0xf1, 0x42, 0x6e, 0xe2, 0xb7, 0x12, 0xa0, 0xdd, 0x50, 0x9f, 0x4f, 0x6f, 0xa7, 0x6f, 0xc7, 0x03, 0x61, 0xa0, 0x83, 0xb5, 0xf3, 0x97, 0x98, 0x20, 0x9c, 0x44, 0xea, 0xd0, 0xad, 0x48, 0x64, 0x90, 0x21, 0xd8, 0x9f, 0xa7, 0xa6, 0x44, 0xca, 0x99, 0xc6, 0x36, 0xcb, 0x74, 0x5d, 0x7e, 0x5b, 0xfe, 0x31, 0x6a, 0x31, 0xf3, 0x8c, 0xd0, 0xad, 0x40, 0xa3, 0x1f, 0x7c, 0x44, 0xd6, 0x51, 0xd9, 0xe0, 0x5f, 0x9a, 0x7e, 0x41, 0x9f, 0x40, 0xf3, 0x14, 0xba, 0x85, 0xba, 0x34, 0xba, 0x2d, 0xfb, 0x34, 0xd0, 0xcf, 0x4f, 0xb0, 0xce, 0x6a, 0x51, 0xe9, 0xb0, 0x20, 0xf4, 0xf1, 0x19, 0xb2, 0xc3, 0x90, 0x11, 0x4e, 0x97, 0x55, 0x80, 0x83, 0xc4, 0x17, 0x7e, 0x4c, 0x79, 0x19, 0xfc, 0xd1, 0xe7, 0x78, 0x4b, 0x91, 0x1d, 0xae, 0x92, 0xa6, 0xf6, 0x46, 0x75, 0xe4, 0xad, 0x22, 0x1f, 0xdd, 0xa1, 0x07, 0xb3, 0x1e, 0xfe, 0xd9, 0x92, 0xeb, 0x4b, 0xed, 0xfd, 0x0a, 0xc2, 0x63, 0x27, 0xa4, 0x88, 0x17, 0x60, 0x49, 0x35, 0xdc, 0x8e, 0xa5, 0x7d, 0xab, 0xd3, 0x28, 0x90, 0x50, 0xcd, 0xed, 0x2d, 0xda, 0x15, 0x55, 0x51, 0xf1, 0x1a, 0x0a, 0xf7, 0x39, 0x5d, 0xaa, 0x77, 0x6f, 0x01, 0x8e, 0xa7, 0x7d, 0xfa, 0xff, 0x00, 0x66, 0x10, 0xa8, 0xb8, 0x63, 0x76, 0x90, 0xa8, 0x20, 0x06, 0x56, 0xdb, 0x61, 0xda, 0xbd, 0x4f, 0xcb, 0x24, 0x15, 0x0f, 0xf5, 0x66, 0xe5, 0x5f, 0x4c, 0x53, 0xc3, 0xb7, 0xce, 0x99, 0x6b, 0x17, 0xff, 0xd4, 0xf0, 0xec, 0x57, 0x6f, 0x32, 0xa5, 0xa4, 0x43, 0x76, 0x75, 0xa9, 0xf1, 0x03, 0xfa, 0x64, 0x08, 0x6c, 0x8e, 0xfb, 0x3d, 0x7f, 0xcb, 0x16, 0x2b, 0x3d, 0xbc, 0x16, 0xa3, 0x66, 0x6d, 0x98, 0xfb, 0x1e, 0xb9, 0xac, 0xc8, 0x77, 0xb7, 0x7d, 0x01, 0xb3, 0x37, 0xb8, 0xd3, 0x46, 0x95, 0x68, 0x86, 0xd2, 0x2e, 0x4e, 0xab, 0xf0, 0x23, 0x11, 0x4e, 0x5f, 0xcd, 0x98, 0xe7, 0x25, 0x96, 0x71, 0x83, 0x0f, 0xd6, 0x3c, 0xb9, 0xe7, 0x0d, 0x7c, 0x41, 0x22, 0x5e, 0xb3, 0x20, 0x0c, 0x65, 0x80, 0xc8, 0x63, 0x8e, 0xbb, 0x95, 0xa5, 0x07, 0xeb, 0xcc, 0xac, 0x73, 0x83, 0x4e, 0x5c, 0x59, 0x09, 0xd8, 0xec, 0xc8, 0x57, 0x41, 0xd3, 0x4e, 0x95, 0xa5, 0x5b, 0x4b, 0x6a, 0xcb, 0xab, 0x43, 0x10, 0x4b, 0xeb, 0x85, 0xa2, 0x2c, 0x8e, 0x3f, 0x68, 0x54, 0xf5, 0x00, 0xd3, 0x97, 0x7a, 0x65, 0x79, 0xa6, 0x24, 0x76, 0x6f, 0xd3, 0x62, 0x96, 0x30, 0x78, 0xcb, 0x21, 0xf2, 0xf4, 0x22, 0xce, 0x54, 0x8e, 0x46, 0x26, 0x10, 0x7e, 0x0a, 0xf5, 0xd8, 0xf5, 0x1f, 0x31, 0x98, 0x83, 0x73, 0xb3, 0x91, 0xcd, 0x67, 0xe6, 0x7d, 0xe8, 0x16, 0x69, 0x6f, 0x10, 0x1f, 0x54, 0x9a, 0x37, 0xf5, 0x41, 0x5e, 0x7f, 0x0a, 0x29, 0x62, 0x02, 0xf8, 0x9c, 0xc8, 0x8c, 0x77, 0x6a, 0x99, 0xa0, 0x89, 0xff, 0x00, 0x9c, 0x74, 0xd2, 0xed, 0xed, 0xfc, 0xbb, 0x7b, 0xaa, 0x9a, 0x7d, 0x62, 0xfe, 0x46, 0x2d, 0xfe, 0x4c, 0x51, 0x31, 0x11, 0xa9, 0xf6, 0xef, 0x9b, 0x30, 0x5e, 0x7b, 0x38, 0xdd, 0xf4, 0x7f, 0x95, 0x94, 0xbc, 0x12, 0x43, 0x30, 0x6a, 0xb2, 0xf3, 0x86, 0x40, 0x3e, 0xcb, 0xd7, 0x6a, 0xd7, 0xb1, 0xe9, 0x8f, 0x37, 0x19, 0x97, 0x41, 0x2c, 0x71, 0x20, 0xf5, 0x36, 0x9c, 0x55, 0x78, 0x1d, 0x8a, 0x91, 0xd7, 0x11, 0x14, 0x5a, 0x3e, 0x19, 0x03, 0x10, 0x6b, 0xca, 0xbd, 0x86, 0xf8, 0x9d, 0x95, 0x18, 0x36, 0x65, 0x2e, 0xbc, 0x54, 0x1f, 0xa2, 0x99, 0x00, 0x59, 0x2a, 0x6f, 0x5e, 0x55, 0x15, 0xe9, 0x5f, 0xc3, 0x2f, 0xb6, 0x14, 0xff, 0x00, 0xff, 0xd5, 0xf1, 0x95, 0xfe, 0x80, 0x74, 0x0d, 0x7c, 0xd9, 0x89, 0x3d, 0x78, 0x57, 0x8b, 0xc5, 0x28, 0xe8, 0x55, 0xf7, 0x1f, 0x48, 0xca, 0x38, 0xb8, 0x83, 0x9f, 0x93, 0x07, 0x85, 0x3a, 0x7a, 0x6f, 0x95, 0x66, 0x2b, 0x2c, 0x4c, 0x0d, 0x14, 0x00, 0x3e, 0x9c, 0xc3, 0x98, 0x76, 0xb8, 0x45, 0xbd, 0x02, 0xde, 0x48, 0xee, 0xdc, 0xa0, 0x15, 0xe2, 0x2b, 0xc8, 0x8a, 0x8a, 0xfd, 0x3b, 0x66, 0x3f, 0x00, 0x73, 0x84, 0x2d, 0x36, 0xb5, 0xb5, 0x9e, 0x35, 0x1c, 0x29, 0xc4, 0xfe, 0xc8, 0x04, 0x7f, 0xc4, 0x69, 0x91, 0xe1, 0x67, 0x2c, 0x4a, 0xd2, 0xe9, 0x4e, 0xe3, 0xd4, 0xf4, 0x81, 0x5a, 0x12, 0xc5, 0x41, 0x3f, 0x79, 0x38, 0x9b, 0x60, 0x20, 0x07, 0x34, 0xb0, 0xc9, 0x03, 0x5c, 0x23, 0x03, 0x53, 0x13, 0x56, 0x88, 0xdf, 0x09, 0xda, 0x9b, 0xd3, 0xb6, 0x52, 0x0e, 0xec, 0xe4, 0x29, 0x24, 0xfc, 0xd0, 0xe7, 0x75, 0xe5, 0x57, 0x6b, 0x61, 0xfb, 0xf0, 0xca, 0xaa, 0x57, 0xa8, 0xe6, 0x78, 0x1a, 0x7d, 0xf9, 0x95, 0x8a, 0x5e, 0xa0, 0xe3, 0x67, 0x8f, 0xa0, 0xbd, 0x5b, 0xf2, 0xdf, 0x4a, 0x82, 0xcb, 0x4a, 0xb3, 0xb0, 0xb4, 0x41, 0x0a, 0x70, 0x48, 0xd9, 0x57, 0x60, 0x51, 0x3a, 0x8f, 0xbc, 0xe6, 0x7b, 0xcb, 0xe4, 0x3b, 0xa7, 0x3f, 0x9b, 0x9f, 0x9a, 0xba, 0x77, 0xe5, 0x5f, 0x95, 0x9c, 0x59, 0x94, 0x9f, 0xcd, 0x37, 0x8c, 0xa9, 0xa6, 0xd9, 0x39, 0xaa, 0xd0, 0x7d, 0xa9, 0x1c, 0x03, 0x5e, 0x09, 0xff, 0x00, 0x0c, 0x76, 0xcb, 0x62, 0x2d, 0xa5, 0xf2, 0x85, 0xbf, 0xe7, 0x87, 0xe6, 0xa3, 0x5e, 0x4d, 0xa8, 0xc9, 0xe6, 0x8b, 0xd5, 0x69, 0x5c, 0xb0, 0x4a, 0xab, 0xc4, 0xb5, 0x35, 0x0a, 0xaa, 0xea, 0x40, 0x03, 0xa0, 0xf6, 0xcb, 0x40, 0x4d, 0x3e, 0xdb, 0xff, 0x00, 0x9c, 0x7f, 0xfc, 0xce, 0x4f, 0xcc, 0xbf, 0x26, 0x25, 0xe5, 0xd3, 0x2f, 0xe9, 0xdd, 0x3d, 0xfe, 0xab, 0xa9, 0xaa, 0xd2, 0xa6, 0x40, 0x2a, 0xb2, 0x71, 0x00, 0x01, 0xea, 0x0d, 0xe8, 0x3a, 0x64, 0x25, 0x16, 0x1c, 0x8b, 0xd9, 0x51, 0x39, 0x28, 0x12, 0x51, 0x41, 0xfd, 0xa3, 0xd2, 0xb9, 0x4f, 0x0d, 0x33, 0xb5, 0xf4, 0x87, 0x9d, 0x79, 0x0e, 0xb4, 0xaf, 0x6a, 0xf8, 0xf1, 0xf0, 0xc9, 0xda, 0xbf, 0xff, 0xd6, 0xf2, 0xc6, 0xb5, 0x68, 0x64, 0xd0, 0x6d, 0x35, 0x20, 0x39, 0xcd, 0x13, 0x0f, 0x5e, 0x61, 0xfc, 0x8f, 0x40, 0x8b, 0x5e, 0xe0, 0x66, 0x1c, 0x4f, 0xaa, 0x9d, 0xe6, 0xa6, 0x1e, 0x91, 0x2e, 0xa9, 0x87, 0x95, 0xee, 0x9c, 0xc5, 0x55, 0x34, 0x60, 0x40, 0xae, 0x57, 0x30, 0xd9, 0xa7, 0x95, 0xbd, 0x6f, 0xcb, 0x26, 0x39, 0x40, 0x0d, 0x4e, 0xc0, 0x9f, 0x9e, 0x50, 0x5d, 0xac, 0x79, 0x33, 0x8b, 0xbb, 0x9b, 0x3b, 0x6b, 0x35, 0x48, 0x54, 0x09, 0x29, 0x56, 0x7f, 0xe1, 0x86, 0x72, 0x00, 0x2c, 0x6e, 0xf7, 0x63, 0x3e, 0x63, 0xbd, 0xbd, 0x5d, 0x20, 0x2a, 0xb3, 0xa4, 0x33, 0x48, 0xab, 0x21, 0x43, 0xf1, 0x2c, 0x47, 0xed, 0x1d, 0xbc, 0x73, 0x18, 0x9b, 0x64, 0x28, 0x96, 0x3a, 0xc7, 0x49, 0xb0, 0xf4, 0xcc, 0xe9, 0x73, 0x6c, 0xb4, 0xf8, 0x67, 0x92, 0x32, 0x21, 0x70, 0x7b, 0x89, 0x05, 0x57, 0xef, 0x38, 0x28, 0x94, 0x4a, 0x7d, 0x13, 0x7d, 0x6a, 0xd3, 0x4c, 0xb8, 0xf2, 0xc3, 0xc8, 0x2e, 0x03, 0xf3, 0xe2, 0x7d, 0x33, 0xb7, 0xc5, 0xcc, 0x71, 0x03, 0xc6, 0xb9, 0x64, 0x06, 0xe2, 0x9a, 0xf2, 0x4f, 0xd2, 0x6d, 0xe9, 0xfe, 0x41, 0x45, 0x5b, 0x18, 0x66, 0xa5, 0x64, 0x09, 0xf4, 0xd5, 0xb7, 0xcd, 0x93, 0xc7, 0xcf, 0x9b, 0xe5, 0x6f, 0xf9, 0xc8, 0x0d, 0x56, 0xeb, 0x59, 0xfc, 0xce, 0xd5, 0x12, 0x61, 0xc4, 0x69, 0xe9, 0x0d, 0xa4, 0x4b, 0xfe, 0x48, 0x40, 0xd5, 0x3e, 0xe4, 0xb6, 0x64, 0x8e, 0x4c, 0x02, 0x61, 0x65, 0xa0, 0x14, 0xb4, 0xb6, 0xb0, 0xb1, 0xb6, 0xb2, 0x97, 0xcb, 0xf1, 0x5a, 0x2d, 0xc6, 0xa5, 0xac, 0xb4, 0x70, 0x5d, 0xc7, 0x3d, 0xc1, 0x51, 0x24, 0x91, 0xc9, 0x31, 0x75, 0x6b, 0x70, 0x9f, 0x14, 0x68, 0x01, 0x46, 0xe4, 0xb5, 0xa3, 0x17, 0xcb, 0x40, 0x61, 0x6f, 0x47, 0xff, 0x00, 0x9c, 0x3a, 0x8f, 0x5b, 0x4f, 0x3c, 0x6b, 0xb7, 0xfa, 0x30, 0x91, 0x3c, 0xa4, 0xb1, 0x95, 0xb9, 0x82, 0x42, 0x0a, 0xbc, 0x8e, 0xe4, 0xdb, 0xa9, 0xef, 0xc9, 0x17, 0x91, 0x24, 0x7c, 0xb2, 0x05, 0x64, 0xfb, 0x75, 0x64, 0x32, 0x39, 0x69, 0x5b, 0x9c, 0xad, 0xb9, 0xdb, 0xa7, 0xb5, 0x3b, 0x53, 0x2a, 0x21, 0x41, 0x44, 0xf3, 0x8b, 0x8f, 0x2e, 0x43, 0x9d, 0x2b, 0xd4, 0x57, 0x23, 0x41, 0x36, 0xff, 0x00, 0xff, 0xd7, 0xf0, 0xc0, 0xd5, 0xb5, 0x11, 0x64, 0xb6, 0x3f, 0x59, 0x90, 0xd9, 0xab, 0x06, 0xf4, 0x79, 0x7c, 0x3b, 0x74, 0xc8, 0x08, 0x8b, 0xb6, 0xe3, 0x96, 0x55, 0x57, 0xb3, 0x3e, 0xf2, 0x35, 0xc7, 0xd6, 0x0b, 0x45, 0x5d, 0xdc, 0x8a, 0x7d, 0xd9, 0x8d, 0x94, 0x3b, 0x3d, 0x1c, 0x9e, 0xc3, 0xe5, 0xc3, 0x2c, 0x7c, 0xc5, 0x0f, 0xee, 0xdb, 0x8b, 0x0c, 0xc4, 0x26, 0x9d, 0xa0, 0x9a, 0x7d, 0x2c, 0xe5, 0xe4, 0x55, 0x7f, 0xee, 0xc1, 0x15, 0x04, 0xd0, 0x12, 0x3c, 0x72, 0x89, 0x1b, 0x2c, 0xcc, 0xa8, 0x2a, 0x8b, 0x87, 0xbb, 0x63, 0x1a, 0x28, 0x65, 0xf0, 0xed, 0xf2, 0xc3, 0xc2, 0x0a, 0x06, 0x4a, 0x46, 0xc7, 0xa5, 0xa3, 0x59, 0xc8, 0xb2, 0xc7, 0x45, 0x22, 0x9c, 0x14, 0x54, 0x10, 0x46, 0xf5, 0x1d, 0x32, 0x5c, 0x14, 0x14, 0xe4, 0x32, 0x2f, 0x3a, 0xf3, 0xb6, 0x90, 0x9a, 0x6d, 0xae, 0x9f, 0x3d, 0xab, 0xb8, 0x8a, 0x3b, 0xf8, 0x39, 0x44, 0x58, 0xf0, 0x08, 0xd5, 0x14, 0xa5, 0x7b, 0x65, 0x98, 0x8e, 0xfb, 0xb5, 0x67, 0x87, 0xa5, 0xef, 0x5e, 0x44, 0x96, 0x35, 0xb5, 0xb6, 0x59, 0x36, 0xfd, 0xd8, 0xa0, 0xf1, 0x20, 0x53, 0x33, 0xc0, 0x79, 0x59, 0x73, 0x7c, 0xd7, 0xf9, 0xfb, 0xa2, 0xcd, 0x67, 0xf9, 0xa7, 0x7b, 0x72, 0xf1, 0x71, 0x83, 0x53, 0x86, 0x0b, 0x98, 0x24, 0x22, 0x8a, 0xcc, 0x88, 0x23, 0x7f, 0xb8, 0xae, 0xf9, 0x7c, 0x50, 0x1e, 0x5f, 0x7c, 0x48, 0x21, 0x44, 0x6b, 0xce, 0x9b, 0xb0, 0x1b, 0x9e, 0xf5, 0xaf, 0x8e, 0x4d, 0x5f, 0x7a, 0x7f, 0xce, 0x34, 0xf9, 0x5d, 0x3c, 0xa3, 0xf9, 0x69, 0x63, 0xa9, 0x3c, 0x27, 0xeb, 0xda, 0xe1, 0x37, 0xd7, 0x2e, 0xaa, 0xdb, 0x06, 0xda, 0x30, 0x49, 0xfe, 0x54, 0x03, 0x03, 0x49, 0xdc, 0xb3, 0xaf, 0x38, 0xfe, 0x6a, 0xf9, 0x47, 0xc9, 0x3a, 0x74, 0x97, 0xfa, 0xf6, 0xaf, 0x15, 0x85, 0xb8, 0x75, 0x89, 0xb8, 0x87, 0x9a, 0x72, 0xee, 0x2a, 0x14, 0x24, 0x60, 0xb1, 0xa8, 0xdf, 0x07, 0x0b, 0x2d, 0xcb, 0xcf, 0x7f, 0xe8, 0x6a, 0xff, 0x00, 0x26, 0xbd, 0x6a, 0x7f, 0x89, 0x2f, 0xf8, 0x52, 0x9e, 0xb7, 0xe8, 0xb9, 0xb8, 0x57, 0xc2, 0x95, 0xe9, 0x8f, 0x08, 0x5a, 0x2f, 0xff, 0xd0, 0xf0, 0x4d, 0x40, 0xaa, 0xd7, 0x00, 0x64, 0xcb, 0x3c, 0x97, 0xa8, 0xb5, 0x9e, 0xa3, 0x1a, 0xd6, 0x84, 0x95, 0x3f, 0x45, 0x72, 0x9c, 0xa2, 0xc3, 0x99, 0xa5, 0x9d, 0x49, 0xf4, 0x17, 0x97, 0xaf, 0x63, 0x17, 0x52, 0x6f, 0xf0, 0xc8, 0x43, 0x6f, 0x9a, 0xe9, 0x07, 0x70, 0x0e, 0xec, 0x83, 0x51, 0x44, 0xb8, 0x61, 0x1a, 0x9e, 0x11, 0xd3, 0x91, 0x60, 0x68, 0x6b, 0xd3, 0x31, 0x4f, 0x36, 0xd3, 0x4c, 0x52, 0xef, 0x4c, 0xd5, 0x0c, 0xc4, 0x69, 0xda, 0x94, 0xc8, 0x3a, 0xf0, 0x66, 0x07, 0x73, 0xe0, 0x40, 0xfd, 0x79, 0x93, 0x12, 0x1c, 0x9c, 0x32, 0xc7, 0xfc, 0x41, 0x33, 0xd2, 0xb4, 0x6f, 0x38, 0x98, 0x65, 0x76, 0xbf, 0x69, 0x42, 0xd0, 0xaa, 0xc9, 0xde, 0x95, 0xad, 0x28, 0x46, 0x4e, 0xac, 0x39, 0x77, 0x80, 0x11, 0xbf, 0xd8, 0xc7, 0x7c, 0xe1, 0xa5, 0xf9, 0x92, 0x4d, 0x32, 0x5b, 0x8b, 0x93, 0x27, 0xa7, 0x68, 0x56, 0xe2, 0x45, 0xda, 0x85, 0x61, 0x6e, 0x67, 0xad, 0x6b, 0xb0, 0x38, 0xc2, 0x81, 0xe4, 0xc7, 0x52, 0x31, 0x1c, 0x67, 0x86, 0x5b, 0xbd, 0x37, 0xca, 0x7a, 0x94, 0xb1, 0x69, 0xb6, 0x2e, 0xb7, 0x15, 0x48, 0xc2, 0xb4, 0x52, 0x53, 0xac, 0x32, 0xaf, 0xb1, 0xed, 0x9b, 0x10, 0x36, 0x78, 0x5c, 0x9f, 0x51, 0x64, 0x1f, 0x98, 0x3e, 0x58, 0xb6, 0xfc, 0xc8, 0xf2, 0xe5, 0xbc, 0x68, 0x52, 0x2d, 0x5a, 0xd1, 0x84, 0xb6, 0xf3, 0x95, 0x0e, 0xc0, 0x85, 0xe2, 0xcb, 0xd8, 0xd1, 0xbb, 0xe4, 0xc1, 0xa6, 0x97, 0xce, 0x17, 0x5f, 0x95, 0xde, 0x6d, 0xb6, 0xbe, 0xb7, 0x69, 0x34, 0xf3, 0x3c, 0x72, 0xcf, 0xe8, 0xa3, 0x45, 0x49, 0x95, 0x4a, 0x90, 0x3e, 0x35, 0x5a, 0x95, 0x1d, 0xfe, 0x21, 0x93, 0x4d, 0xbe, 0xd2, 0xd2, 0xf5, 0x8b, 0xbd, 0x32, 0x2d, 0x3f, 0x4c, 0x9a, 0xe4, 0xca, 0x9e, 0x90, 0x85, 0x65, 0x55, 0x08, 0x85, 0x91, 0x01, 0x3b, 0x0a, 0x05, 0xe9, 0xb0, 0xc0, 0x5a, 0xc3, 0xcd, 0x3f, 0x3b, 0x7f, 0x26, 0xec, 0xff, 0x00, 0x35, 0x6d, 0x6d, 0xb5, 0x3d, 0x16, 0xfe, 0x0d, 0x3b, 0xcd, 0x96, 0x01, 0x92, 0x46, 0x9e, 0xa2, 0x0b, 0xc8, 0xb7, 0x28, 0x92, 0x71, 0xfb, 0x2e, 0xa7, 0xec, 0x3d, 0x0f, 0xc2, 0x68, 0x71, 0x05, 0x95, 0xd3, 0xe7, 0x9f, 0xfa, 0x16, 0x2f, 0xcd, 0x7f, 0x43, 0xd6, 0xfa, 0xa5, 0x97, 0xab, 0xeb, 0x7a, 0x5f, 0x55, 0xfa, 0xec, 0x5e, 0xaf, 0x0f, 0xf7, 0xed, 0x2b, 0x4e, 0x15, 0xff, 0x00, 0x65, 0xdf, 0x8e, 0x14, 0xf1, 0xbf, 0xff, 0xd1, 0xf0, 0x5a, 0xa7, 0x18, 0x5e, 0x56, 0x1f, 0x68, 0x71, 0x5f, 0xa7, 0xbe, 0x2a, 0x98, 0xdb, 0xfa, 0x90, 0x24, 0x37, 0xb0, 0xfd, 0xb8, 0xa8, 0x58, 0x78, 0xae, 0x43, 0xc9, 0xb4, 0x6d, 0xbb, 0xda, 0x3c, 0xa1, 0xad, 0x43, 0xa8, 0xda, 0xc5, 0x2a, 0x3d, 0x26, 0x5a, 0x02, 0x2b, 0xbe, 0x60, 0x64, 0x8d, 0x17, 0x6f, 0x8b, 0x20, 0x90, 0x7a, 0x3c, 0x32, 0x8b, 0xa8, 0x02, 0xf3, 0xfd, 0xe0, 0x1b, 0x11, 0x98, 0x66, 0x3b, 0xb9, 0x62, 0x54, 0x83, 0x36, 0xf2, 0xa4, 0xe4, 0x29, 0x34, 0xeb, 0xc8, 0x74, 0xae, 0x0d, 0xc3, 0x65, 0x82, 0x13, 0x6b, 0x57, 0xba, 0x54, 0xe4, 0x8c, 0x41, 0x1b, 0x75, 0xa7, 0xe0, 0x72, 0x5c, 0x4c, 0x84, 0x50, 0x5a, 0xb3, 0xdd, 0xdd, 0xc3, 0x24, 0x33, 0xb1, 0x60, 0xe0, 0x86, 0x52, 0x45, 0x38, 0xd2, 0x87, 0x24, 0x26, 0x6d, 0x8c, 0xe1, 0x41, 0x25, 0xfc, 0xa3, 0xd7, 0x2f, 0x6f, 0x3c, 0xbf, 0x73, 0xa5, 0xb2, 0x2c, 0xd1, 0x69, 0x17, 0x2f, 0x6b, 0x14, 0x8c, 0x0f, 0x21, 0x0d, 0x79, 0x46, 0x09, 0x15, 0xed, 0xb7, 0x4e, 0xd9, 0xb9, 0x8b, 0xcb, 0xe4, 0xa2, 0x5e, 0xa3, 0xa6, 0xdf, 0x6a, 0x36, 0xe4, 0xcd, 0x69, 0x1c, 0x4e, 0x84, 0x7c, 0x76, 0xab, 0x21, 0x67, 0xa8, 0xa7, 0xd9, 0xf8, 0x4d, 0x2b, 0xf3, 0xc3, 0x4d, 0x49, 0x57, 0x98, 0x75, 0x6f, 0x31, 0xda, 0xf9, 0xa3, 0x4b, 0xfd, 0x1f, 0x69, 0x1d, 0xae, 0xa1, 0xa9, 0x7e, 0xee, 0xe6, 0xd2, 0x79, 0x18, 0xf3, 0xb5, 0x1f, 0xee, 0xd9, 0x0a, 0x01, 0x4e, 0x3f, 0xb3, 0x4d, 0xf2, 0x9c, 0xb9, 0x04, 0x05, 0xb7, 0xe2, 0x87, 0x1e, 0xdd, 0x19, 0x3e, 0xaf, 0x6b, 0xae, 0xcb, 0x6d, 0x13, 0x0d, 0x45, 0xa2, 0x8e, 0x06, 0xe5, 0x13, 0x2a, 0x02, 0x01, 0x5e, 0x82, 0xb5, 0x04, 0xe6, 0x11, 0xd4, 0xcd, 0xda, 0x43, 0x49, 0x8e, 0xb7, 0xdc, 0xb1, 0x51, 0xe6, 0x4d, 0x76, 0xd2, 0x61, 0x15, 0xaa, 0x4b, 0xa8, 0xc9, 0x6e, 0x49, 0x79, 0x20, 0xe6, 0x8c, 0x49, 0xad, 0x43, 0x16, 0xe4, 0xa7, 0xaf, 0x43, 0xd3, 0x26, 0x35, 0x75, 0xcd, 0xa8, 0xe8, 0x87, 0x46, 0xbf, 0xc7, 0x9a, 0xff, 0x00, 0xd6, 0xbf, 0x48, 0xfe, 0x88, 0xfd, 0xe7, 0x0f, 0xab, 0xfa, 0x3f, 0x58, 0x7f, 0x5f, 0x8d, 0x3f, 0x9f, 0xa7, 0x5e, 0xd4, 0xc3, 0xf9, 0xd1, 0x7c, 0xb6, 0x47, 0xe4, 0x3a, 0x5b, 0xff, 0xd2, 0xf0, 0xb7, 0xa6, 0x1e, 0xdf, 0xd3, 0xf6, 0xa5, 0x71, 0x54, 0xdb, 0x4b, 0x80, 0x3c, 0x42, 0x26, 0xee, 0x29, 0xbe, 0x51, 0x23, 0x4e, 0x44, 0x05, 0x84, 0x45, 0xa5, 0xd5, 0xf7, 0x97, 0x2e, 0xfd, 0x6b, 0x6a, 0x98, 0x09, 0xab, 0xc7, 0xfc, 0x46, 0x3b, 0x4c, 0x26, 0x32, 0x30, 0x3e, 0x4f, 0x49, 0xd0, 0xfc, 0xfb, 0x05, 0xd4, 0x4a, 0x7d, 0x40, 0xac, 0x3a, 0x8e, 0x84, 0x1c, 0xc5, 0x96, 0x2a, 0x73, 0xe1, 0x9c, 0x16, 0x6d, 0xa5, 0x79, 0x86, 0xd6, 0xec, 0x80, 0x5a, 0xa0, 0xf5, 0xca, 0xcc, 0x5c, 0xa1, 0x2b, 0x1b, 0x26, 0x30, 0x6a, 0x31, 0x46, 0xcf, 0x1c, 0x87, 0x94, 0x64, 0x9e, 0x3d, 0xb6, 0xf0, 0xca, 0xa8, 0x39, 0x51, 0x99, 0x42, 0x6b, 0x1a, 0xc5, 0xa5, 0xa5, 0x94, 0xf7, 0x92, 0xc8, 0xaa, 0xb1, 0x23, 0x30, 0x04, 0xf8, 0x0e, 0x9f, 0x4e, 0x4a, 0x11, 0xb2, 0xd5, 0x9b, 0x25, 0x06, 0x1b, 0xff, 0x00, 0x38, 0xfd, 0xad, 0xdf, 0xda, 0xf9, 0xa2, 0xfe, 0xc5, 0x42, 0xbe, 0x9b, 0x7f, 0x0b, 0xdd, 0xdd, 0x07, 0xaf, 0x14, 0x68, 0xd8, 0x71, 0x6d, 0xbb, 0x90, 0xfc, 0x73, 0x6e, 0xf2, 0xf2, 0xdd, 0xf4, 0xad, 0xa6, 0xab, 0x6d, 0x69, 0x14, 0xfa, 0xee, 0xa0, 0xe2, 0x0b, 0x0d, 0x39, 0x19, 0xfe, 0x11, 0xc5, 0x1a, 0x4a, 0x1d, 0x8f, 0x73, 0x4f, 0xf8, 0x96, 0x0b, 0x40, 0x8d, 0xec, 0xf3, 0x6d, 0x3f, 0x52, 0xba, 0xd6, 0x35, 0x8b, 0xbf, 0x36, 0x6a, 0x5f, 0x0d, 0xc5, 0xdc, 0xa8, 0xb6, 0xa8, 0x7a, 0xc5, 0x6c, 0x9b, 0x22, 0x0f, 0xa3, 0x73, 0x9a, 0xbc, 0xb3, 0xe2, 0x36, 0xed, 0xb1, 0x43, 0x80, 0x53, 0xd0, 0xa7, 0xd4, 0x44, 0xfa, 0x7a, 0xda, 0x83, 0xbd, 0x3e, 0x2f, 0xa7, 0x2b, 0xad, 0x9b, 0xb8, 0x8d, 0xa8, 0xe8, 0x91, 0xdb, 0xfa, 0x2d, 0x6f, 0xc3, 0x8a, 0x2d, 0x56, 0xa3, 0xad, 0x4f, 0x5c, 0xa4, 0x0d, 0xdc, 0xa3, 0xca, 0xd0, 0xbf, 0xa1, 0xe3, 0xfa, 0xe7, 0x0f, 0xf2, 0xb9, 0x57, 0xbf, 0x1a, 0xe4, 0xb8, 0x57, 0xc5, 0xdd, 0xff, 0xd3, 0xf0, 0xcc, 0x5d, 0x7b, 0x70, 0xc5, 0x53, 0x6d, 0x2f, 0xd5, 0xe4, 0x69, 0xfd, 0xdf, 0xec, 0xd7, 0xad, 0x7d, 0xb2, 0x8c, 0x8d, 0xd8, 0xed, 0x91, 0x9f, 0x43, 0xea, 0xe7, 0xeb, 0x94, 0xad, 0x3e, 0x1e, 0x95, 0xfc, 0x72, 0x81, 0x7d, 0x1c, 0x9d, 0xba, 0xb1, 0x7b, 0xdf, 0xa9, 0x7a, 0xdf, 0xee, 0x2f, 0xd4, 0xfa, 0xe7, 0xed, 0x7a, 0x7f, 0xdd, 0xff, 0x00, 0xb2, 0xae, 0x64, 0x0b, 0xea, 0xe3, 0x9a, 0xbf, 0x4a, 0x6f, 0xa4, 0xff, 0x00, 0x89, 0xbd, 0x45, 0xfa, 0xb5, 0x79, 0xf7, 0xeb, 0xc7, 0xe9, 0xae, 0x57, 0x2e, 0x17, 0x23, 0x1f, 0x89, 0xd1, 0x99, 0x8f, 0xf1, 0xa7, 0x11, 0xcf, 0xd3, 0xf5, 0x29, 0xb5, 0x6b, 0xd3, 0xe8, 0xcc, 0x7f, 0x45, 0xb9, 0xa3, 0xc5, 0x62, 0xbe, 0x68, 0xff, 0x00, 0x15, 0xfd, 0x4c, 0xfe, 0x90, 0xaf, 0xd4, 0xab, 0xf1, 0x7a, 0x7f, 0x62, 0x9d, 0xab, 0xdf, 0x32, 0xb1, 0x70, 0x5e, 0xdc, 0xdc, 0x2d, 0x47, 0x8b, 0x5e, 0xae, 0x4c, 0xbf, 0xf2, 0x37, 0x9f, 0x3d, 0x5b, 0xd2, 0xff, 0x00, 0x8e, 0x87, 0xee, 0x29, 0x5a, 0xf2, 0xf4, 0xaa, 0xd4, 0xa5, 0x36, 0xa7, 0x3a, 0x57, 0xfd, 0x8e, 0x64, 0x3a, 0xf2, 0xf6, 0xbf, 0xcc, 0x7f, 0x5b, 0xfc, 0x23, 0xa7, 0xfe, 0x8e, 0xff, 0x00, 0x8e, 0x37, 0xd6, 0x63, 0xfa, 0xe5, 0x2b, 0xcb, 0x87, 0xec, 0xd6, 0xbd, 0xb9, 0x7d, 0xac, 0xc7, 0xcd, 0x7c, 0x2d, 0xf8, 0x2b, 0x89, 0x26, 0x8f, 0xd4, 0xfa, 0x94, 0x3e, 0x85, 0x29, 0xc9, 0x69, 0xfc, 0x33, 0x58, 0x5d, 0x9c, 0x79, 0xb2, 0xbb, 0x0f, 0xac, 0x7a, 0x2b, 0xea, 0x75, 0xef, 0x92, 0x0c, 0x53, 0x3d, 0x2f, 0xd4, 0xfa, 0xbb, 0xfa, 0x74, 0xf5, 0x39, 0x9a, 0xd7, 0xe7, 0x80, 0x53, 0x79, 0xba, 0x5b, 0xfe, 0x97, 0xfa, 0x4b, 0xfc, 0xba, 0x7f, 0xb1, 0xc7, 0xab, 0x1e, 0x8f, 0xff, 0xd9 -}; diff --git a/WebRtc.NET/include/webrtc/base/testclient.h b/WebRtc.NET/include/webrtc/base/testclient.h deleted file mode 100644 index 74ef8cc3..00000000 --- a/WebRtc.NET/include/webrtc/base/testclient.h +++ /dev/null @@ -1,107 +0,0 @@ -/* - * Copyright 2004 The WebRTC Project Authors. All rights reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_BASE_TESTCLIENT_H_ -#define WEBRTC_BASE_TESTCLIENT_H_ - -#include -#include "webrtc/base/asyncudpsocket.h" -#include "webrtc/base/constructormagic.h" -#include "webrtc/base/criticalsection.h" - -namespace rtc { - -// A simple client that can send TCP or UDP data and check that it receives -// what it expects to receive. Useful for testing server functionality. -class TestClient : public sigslot::has_slots<> { - public: - // Records the contents of a packet that was received. - struct Packet { - Packet(const SocketAddress& a, - const char* b, - size_t s, - const PacketTime& packet_time); - Packet(const Packet& p); - virtual ~Packet(); - - SocketAddress addr; - char* buf; - size_t size; - PacketTime packet_time; - }; - - // Default timeout for NextPacket reads. - static const int kTimeoutMs = 5000; - - // Creates a client that will send and receive with the given socket and - // will post itself messages with the given thread. - explicit TestClient(AsyncPacketSocket* socket); - ~TestClient() override; - - SocketAddress address() const { return socket_->GetLocalAddress(); } - SocketAddress remote_address() const { return socket_->GetRemoteAddress(); } - - // Checks that the socket moves to the specified connect state. - bool CheckConnState(AsyncPacketSocket::State state); - - // Checks that the socket is connected to the remote side. - bool CheckConnected() { - return CheckConnState(AsyncPacketSocket::STATE_CONNECTED); - } - - // Sends using the clients socket. - int Send(const char* buf, size_t size); - - // Sends using the clients socket to the given destination. - int SendTo(const char* buf, size_t size, const SocketAddress& dest); - - // Returns the next packet received by the client or 0 if none is received - // within the specified timeout. The caller must delete the packet - // when done with it. - Packet* NextPacket(int timeout_ms); - - // Checks that the next packet has the given contents. Returns the remote - // address that the packet was sent from. - bool CheckNextPacket(const char* buf, size_t len, SocketAddress* addr); - - // Checks that no packets have arrived or will arrive in the next second. - bool CheckNoPacket(); - - int GetError(); - int SetOption(Socket::Option opt, int value); - - bool ready_to_send() const { return ready_to_send_count() > 0; } - - // How many times SignalReadyToSend has been fired. - int ready_to_send_count() const { return ready_to_send_count_; } - - private: - // Timeout for reads when no packet is expected. - static const int kNoPacketTimeoutMs = 1000; - // Workaround for the fact that AsyncPacketSocket::GetConnState doesn't exist. - Socket::ConnState GetState(); - // Slot for packets read on the socket. - void OnPacket(AsyncPacketSocket* socket, const char* buf, size_t len, - const SocketAddress& remote_addr, - const PacketTime& packet_time); - void OnReadyToSend(AsyncPacketSocket* socket); - bool CheckTimestamp(int64_t packet_timestamp); - - CriticalSection crit_; - AsyncPacketSocket* socket_; - std::vector* packets_; - int ready_to_send_count_ = 0; - int64_t prev_packet_timestamp_; - RTC_DISALLOW_COPY_AND_ASSIGN(TestClient); -}; - -} // namespace rtc - -#endif // WEBRTC_BASE_TESTCLIENT_H_ diff --git a/WebRtc.NET/include/webrtc/base/testechoserver.h b/WebRtc.NET/include/webrtc/base/testechoserver.h deleted file mode 100644 index 76d714b4..00000000 --- a/WebRtc.NET/include/webrtc/base/testechoserver.h +++ /dev/null @@ -1,75 +0,0 @@ -/* - * Copyright 2004 The WebRTC Project Authors. All rights reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_BASE_TESTECHOSERVER_H_ -#define WEBRTC_BASE_TESTECHOSERVER_H_ - -#include -#include -#include "webrtc/base/asynctcpsocket.h" -#include "webrtc/base/constructormagic.h" -#include "webrtc/base/socketaddress.h" -#include "webrtc/base/sigslot.h" -#include "webrtc/base/thread.h" - -namespace rtc { - -// A test echo server, echoes back any packets sent to it. -// Useful for unit tests. -class TestEchoServer : public sigslot::has_slots<> { - public: - TestEchoServer(Thread* thread, const SocketAddress& addr) - : server_socket_(thread->socketserver()->CreateAsyncSocket(addr.family(), - SOCK_STREAM)) { - server_socket_->Bind(addr); - server_socket_->Listen(5); - server_socket_->SignalReadEvent.connect(this, &TestEchoServer::OnAccept); - } - ~TestEchoServer() { - for (ClientList::iterator it = client_sockets_.begin(); - it != client_sockets_.end(); ++it) { - delete *it; - } - } - - SocketAddress address() const { return server_socket_->GetLocalAddress(); } - - private: - void OnAccept(AsyncSocket* socket) { - AsyncSocket* raw_socket = socket->Accept(NULL); - if (raw_socket) { - AsyncTCPSocket* packet_socket = new AsyncTCPSocket(raw_socket, false); - packet_socket->SignalReadPacket.connect(this, &TestEchoServer::OnPacket); - packet_socket->SignalClose.connect(this, &TestEchoServer::OnClose); - client_sockets_.push_back(packet_socket); - } - } - void OnPacket(AsyncPacketSocket* socket, const char* buf, size_t size, - const SocketAddress& remote_addr, - const PacketTime& packet_time) { - rtc::PacketOptions options; - socket->Send(buf, size, options); - } - void OnClose(AsyncPacketSocket* socket, int err) { - ClientList::iterator it = - std::find(client_sockets_.begin(), client_sockets_.end(), socket); - client_sockets_.erase(it); - Thread::Current()->Dispose(socket); - } - - typedef std::list ClientList; - std::unique_ptr server_socket_; - ClientList client_sockets_; - RTC_DISALLOW_COPY_AND_ASSIGN(TestEchoServer); -}; - -} // namespace rtc - -#endif // WEBRTC_BASE_TESTECHOSERVER_H_ diff --git a/WebRtc.NET/include/webrtc/base/testutils.h b/WebRtc.NET/include/webrtc/base/testutils.h deleted file mode 100644 index 332857d3..00000000 --- a/WebRtc.NET/include/webrtc/base/testutils.h +++ /dev/null @@ -1,567 +0,0 @@ -/* - * Copyright 2004 The WebRTC Project Authors. All rights reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_BASE_TESTUTILS_H__ -#define WEBRTC_BASE_TESTUTILS_H__ - -// Utilities for testing rtc infrastructure in unittests - -#if defined(WEBRTC_LINUX) && !defined(WEBRTC_ANDROID) -#include -#include - -// X defines a few macros that stomp on types that gunit.h uses. -#undef None -#undef Bool -#endif - -#include -#include -#include -#include -#include "webrtc/base/arraysize.h" -#include "webrtc/base/asyncsocket.h" -#include "webrtc/base/checks.h" -#include "webrtc/base/common.h" -#include "webrtc/base/gunit.h" -#include "webrtc/base/nethelpers.h" -#include "webrtc/base/pathutils.h" -#include "webrtc/base/stream.h" -#include "webrtc/base/stringencode.h" -#include "webrtc/base/stringutils.h" -#include "webrtc/base/thread.h" - -namespace testing { - -using namespace rtc; - -/////////////////////////////////////////////////////////////////////////////// -// StreamSink - Monitor asynchronously signalled events from StreamInterface -// or AsyncSocket (which should probably be a StreamInterface. -/////////////////////////////////////////////////////////////////////////////// - -// Note: Any event that is an error is treaded as SSE_ERROR instead of that -// event. - -enum StreamSinkEvent { - SSE_OPEN = SE_OPEN, - SSE_READ = SE_READ, - SSE_WRITE = SE_WRITE, - SSE_CLOSE = SE_CLOSE, - SSE_ERROR = 16 -}; - -class StreamSink : public sigslot::has_slots<> { - public: - void Monitor(StreamInterface* stream) { - stream->SignalEvent.connect(this, &StreamSink::OnEvent); - events_.erase(stream); - } - void Unmonitor(StreamInterface* stream) { - stream->SignalEvent.disconnect(this); - // In case you forgot to unmonitor a previous object with this address - events_.erase(stream); - } - bool Check(StreamInterface* stream, StreamSinkEvent event, bool reset = true) { - return DoCheck(stream, event, reset); - } - int Events(StreamInterface* stream, bool reset = true) { - return DoEvents(stream, reset); - } - - void Monitor(AsyncSocket* socket) { - socket->SignalConnectEvent.connect(this, &StreamSink::OnConnectEvent); - socket->SignalReadEvent.connect(this, &StreamSink::OnReadEvent); - socket->SignalWriteEvent.connect(this, &StreamSink::OnWriteEvent); - socket->SignalCloseEvent.connect(this, &StreamSink::OnCloseEvent); - // In case you forgot to unmonitor a previous object with this address - events_.erase(socket); - } - void Unmonitor(AsyncSocket* socket) { - socket->SignalConnectEvent.disconnect(this); - socket->SignalReadEvent.disconnect(this); - socket->SignalWriteEvent.disconnect(this); - socket->SignalCloseEvent.disconnect(this); - events_.erase(socket); - } - bool Check(AsyncSocket* socket, StreamSinkEvent event, bool reset = true) { - return DoCheck(socket, event, reset); - } - int Events(AsyncSocket* socket, bool reset = true) { - return DoEvents(socket, reset); - } - - private: - typedef std::map EventMap; - - void OnEvent(StreamInterface* stream, int events, int error) { - if (error) { - events = SSE_ERROR; - } - AddEvents(stream, events); - } - void OnConnectEvent(AsyncSocket* socket) { - AddEvents(socket, SSE_OPEN); - } - void OnReadEvent(AsyncSocket* socket) { - AddEvents(socket, SSE_READ); - } - void OnWriteEvent(AsyncSocket* socket) { - AddEvents(socket, SSE_WRITE); - } - void OnCloseEvent(AsyncSocket* socket, int error) { - AddEvents(socket, (0 == error) ? SSE_CLOSE : SSE_ERROR); - } - - void AddEvents(void* obj, int events) { - EventMap::iterator it = events_.find(obj); - if (events_.end() == it) { - events_.insert(EventMap::value_type(obj, events)); - } else { - it->second |= events; - } - } - bool DoCheck(void* obj, StreamSinkEvent event, bool reset) { - EventMap::iterator it = events_.find(obj); - if ((events_.end() == it) || (0 == (it->second & event))) { - return false; - } - if (reset) { - it->second &= ~event; - } - return true; - } - int DoEvents(void* obj, bool reset) { - EventMap::iterator it = events_.find(obj); - if (events_.end() == it) - return 0; - int events = it->second; - if (reset) { - it->second = 0; - } - return events; - } - - EventMap events_; -}; - -/////////////////////////////////////////////////////////////////////////////// -// StreamSource - Implements stream interface and simulates asynchronous -// events on the stream, without a network. Also buffers written data. -/////////////////////////////////////////////////////////////////////////////// - -class StreamSource : public StreamInterface { -public: - StreamSource() { - Clear(); - } - - void Clear() { - readable_data_.clear(); - written_data_.clear(); - state_ = SS_CLOSED; - read_block_ = 0; - write_block_ = SIZE_UNKNOWN; - } - void QueueString(const char* data) { - QueueData(data, strlen(data)); - } - void QueueStringF(const char* format, ...) { - va_list args; - va_start(args, format); - char buffer[1024]; - size_t len = vsprintfn(buffer, sizeof(buffer), format, args); - RTC_CHECK(len < sizeof(buffer) - 1); - va_end(args); - QueueData(buffer, len); - } - void QueueData(const char* data, size_t len) { - readable_data_.insert(readable_data_.end(), data, data + len); - if ((SS_OPEN == state_) && (readable_data_.size() == len)) { - SignalEvent(this, SE_READ, 0); - } - } - std::string ReadData() { - std::string data; - // avoid accessing written_data_[0] if it is undefined - if (written_data_.size() > 0) { - data.insert(0, &written_data_[0], written_data_.size()); - } - written_data_.clear(); - return data; - } - void SetState(StreamState state) { - int events = 0; - if ((SS_OPENING == state_) && (SS_OPEN == state)) { - events |= SE_OPEN; - if (!readable_data_.empty()) { - events |= SE_READ; - } - } else if ((SS_CLOSED != state_) && (SS_CLOSED == state)) { - events |= SE_CLOSE; - } - state_ = state; - if (events) { - SignalEvent(this, events, 0); - } - } - // Will cause Read to block when there are pos bytes in the read queue. - void SetReadBlock(size_t pos) { read_block_ = pos; } - // Will cause Write to block when there are pos bytes in the write queue. - void SetWriteBlock(size_t pos) { write_block_ = pos; } - - virtual StreamState GetState() const { return state_; } - virtual StreamResult Read(void* buffer, size_t buffer_len, - size_t* read, int* error) { - if (SS_CLOSED == state_) { - if (error) *error = -1; - return SR_ERROR; - } - if ((SS_OPENING == state_) || (readable_data_.size() <= read_block_)) { - return SR_BLOCK; - } - size_t count = std::min(buffer_len, readable_data_.size() - read_block_); - memcpy(buffer, &readable_data_[0], count); - size_t new_size = readable_data_.size() - count; - // Avoid undefined access beyond the last element of the vector. - // This only happens when new_size is 0. - if (count < readable_data_.size()) { - memmove(&readable_data_[0], &readable_data_[count], new_size); - } - readable_data_.resize(new_size); - if (read) *read = count; - return SR_SUCCESS; - } - virtual StreamResult Write(const void* data, size_t data_len, - size_t* written, int* error) { - if (SS_CLOSED == state_) { - if (error) *error = -1; - return SR_ERROR; - } - if (SS_OPENING == state_) { - return SR_BLOCK; - } - if (SIZE_UNKNOWN != write_block_) { - if (written_data_.size() >= write_block_) { - return SR_BLOCK; - } - if (data_len > (write_block_ - written_data_.size())) { - data_len = write_block_ - written_data_.size(); - } - } - if (written) *written = data_len; - const char* cdata = static_cast(data); - written_data_.insert(written_data_.end(), cdata, cdata + data_len); - return SR_SUCCESS; - } - virtual void Close() { state_ = SS_CLOSED; } - -private: - typedef std::vector Buffer; - Buffer readable_data_, written_data_; - StreamState state_; - size_t read_block_, write_block_; -}; - -/////////////////////////////////////////////////////////////////////////////// -// SocketTestClient -// Creates a simulated client for testing. Works on real and virtual networks. -/////////////////////////////////////////////////////////////////////////////// - -class SocketTestClient : public sigslot::has_slots<> { -public: - SocketTestClient() { - Init(NULL, AF_INET); - } - SocketTestClient(AsyncSocket* socket) { - Init(socket, socket->GetLocalAddress().family()); - } - SocketTestClient(const SocketAddress& address) { - Init(NULL, address.family()); - socket_->Connect(address); - } - - AsyncSocket* socket() { return socket_.get(); } - - void QueueString(const char* data) { - QueueData(data, strlen(data)); - } - void QueueStringF(const char* format, ...) { - va_list args; - va_start(args, format); - char buffer[1024]; - size_t len = vsprintfn(buffer, sizeof(buffer), format, args); - RTC_CHECK(len < sizeof(buffer) - 1); - va_end(args); - QueueData(buffer, len); - } - void QueueData(const char* data, size_t len) { - send_buffer_.insert(send_buffer_.end(), data, data + len); - if (Socket::CS_CONNECTED == socket_->GetState()) { - Flush(); - } - } - std::string ReadData() { - std::string data(&recv_buffer_[0], recv_buffer_.size()); - recv_buffer_.clear(); - return data; - } - - bool IsConnected() const { - return (Socket::CS_CONNECTED == socket_->GetState()); - } - bool IsClosed() const { - return (Socket::CS_CLOSED == socket_->GetState()); - } - -private: - typedef std::vector Buffer; - - void Init(AsyncSocket* socket, int family) { - if (!socket) { - socket = Thread::Current()->socketserver() - ->CreateAsyncSocket(family, SOCK_STREAM); - } - socket_.reset(socket); - socket_->SignalConnectEvent.connect(this, - &SocketTestClient::OnConnectEvent); - socket_->SignalReadEvent.connect(this, &SocketTestClient::OnReadEvent); - socket_->SignalWriteEvent.connect(this, &SocketTestClient::OnWriteEvent); - socket_->SignalCloseEvent.connect(this, &SocketTestClient::OnCloseEvent); - } - - void Flush() { - size_t sent = 0; - while (sent < send_buffer_.size()) { - int result = socket_->Send(&send_buffer_[sent], - send_buffer_.size() - sent); - if (result > 0) { - sent += result; - } else { - break; - } - } - size_t new_size = send_buffer_.size() - sent; - memmove(&send_buffer_[0], &send_buffer_[sent], new_size); - send_buffer_.resize(new_size); - } - - void OnConnectEvent(AsyncSocket* socket) { - if (!send_buffer_.empty()) { - Flush(); - } - } - void OnReadEvent(AsyncSocket* socket) { - char data[64 * 1024]; - int result = socket_->Recv(data, arraysize(data), nullptr); - if (result > 0) { - recv_buffer_.insert(recv_buffer_.end(), data, data + result); - } - } - void OnWriteEvent(AsyncSocket* socket) { - if (!send_buffer_.empty()) { - Flush(); - } - } - void OnCloseEvent(AsyncSocket* socket, int error) { - } - - std::unique_ptr socket_; - Buffer send_buffer_, recv_buffer_; -}; - -/////////////////////////////////////////////////////////////////////////////// -// SocketTestServer -// Creates a simulated server for testing. Works on real and virtual networks. -/////////////////////////////////////////////////////////////////////////////// - -class SocketTestServer : public sigslot::has_slots<> { - public: - SocketTestServer(const SocketAddress& address) - : socket_(Thread::Current()->socketserver() - ->CreateAsyncSocket(address.family(), SOCK_STREAM)) - { - socket_->SignalReadEvent.connect(this, &SocketTestServer::OnReadEvent); - socket_->Bind(address); - socket_->Listen(5); - } - virtual ~SocketTestServer() { - clear(); - } - - size_t size() const { return clients_.size(); } - SocketTestClient* client(size_t index) const { return clients_[index]; } - SocketTestClient* operator[](size_t index) const { return client(index); } - - void clear() { - for (size_t i=0; i(socket_->Accept(NULL)); - if (!accepted) - return; - clients_.push_back(new SocketTestClient(accepted)); - } - - std::unique_ptr socket_; - std::vector clients_; -}; - -/////////////////////////////////////////////////////////////////////////////// -// Unittest predicates which are similar to STREQ, but for raw memory -/////////////////////////////////////////////////////////////////////////////// - -inline AssertionResult CmpHelperMemEq(const char* expected_expression, - const char* expected_length_expression, - const char* actual_expression, - const char* actual_length_expression, - const void* expected, - size_t expected_length, - const void* actual, - size_t actual_length) -{ - if ((expected_length == actual_length) - && (0 == memcmp(expected, actual, expected_length))) { - return AssertionSuccess(); - } - - Message msg; - msg << "Value of: " << actual_expression - << " [" << actual_length_expression << "]"; - if (true) { //!actual_value.Equals(actual_expression)) { - size_t buffer_size = actual_length * 2 + 1; - char* buffer = STACK_ARRAY(char, buffer_size); - hex_encode(buffer, buffer_size, - reinterpret_cast(actual), actual_length); - msg << "\n Actual: " << buffer << " [" << actual_length << "]"; - } - - msg << "\nExpected: " << expected_expression - << " [" << expected_length_expression << "]"; - if (true) { //!expected_value.Equals(expected_expression)) { - size_t buffer_size = expected_length * 2 + 1; - char* buffer = STACK_ARRAY(char, buffer_size); - hex_encode(buffer, buffer_size, - reinterpret_cast(expected), expected_length); - msg << "\nWhich is: " << buffer << " [" << expected_length << "]"; - } - - return AssertionFailure(msg); -} - -#define EXPECT_MEMEQ(expected, expected_length, actual, actual_length) \ - EXPECT_PRED_FORMAT4(::testing::CmpHelperMemEq, expected, expected_length, \ - actual, actual_length) - -#define ASSERT_MEMEQ(expected, expected_length, actual, actual_length) \ - ASSERT_PRED_FORMAT4(::testing::CmpHelperMemEq, expected, expected_length, \ - actual, actual_length) - -/////////////////////////////////////////////////////////////////////////////// -// Helpers for initializing constant memory with integers in a particular byte -// order -/////////////////////////////////////////////////////////////////////////////// - -#define BYTE_CAST(x) static_cast((x)&0xFF) - -// Declare a N-bit integer as a little-endian sequence of bytes -#define LE16(x) BYTE_CAST(((uint16_t)x) >> 0), BYTE_CAST(((uint16_t)x) >> 8) - -#define LE32(x) \ - BYTE_CAST(((uint32_t)x) >> 0), BYTE_CAST(((uint32_t)x) >> 8), \ - BYTE_CAST(((uint32_t)x) >> 16), BYTE_CAST(((uint32_t)x) >> 24) - -#define LE64(x) \ - BYTE_CAST(((uint64_t)x) >> 0), BYTE_CAST(((uint64_t)x) >> 8), \ - BYTE_CAST(((uint64_t)x) >> 16), BYTE_CAST(((uint64_t)x) >> 24), \ - BYTE_CAST(((uint64_t)x) >> 32), BYTE_CAST(((uint64_t)x) >> 40), \ - BYTE_CAST(((uint64_t)x) >> 48), BYTE_CAST(((uint64_t)x) >> 56) - -// Declare a N-bit integer as a big-endian (Internet) sequence of bytes -#define BE16(x) BYTE_CAST(((uint16_t)x) >> 8), BYTE_CAST(((uint16_t)x) >> 0) - -#define BE32(x) \ - BYTE_CAST(((uint32_t)x) >> 24), BYTE_CAST(((uint32_t)x) >> 16), \ - BYTE_CAST(((uint32_t)x) >> 8), BYTE_CAST(((uint32_t)x) >> 0) - -#define BE64(x) \ - BYTE_CAST(((uint64_t)x) >> 56), BYTE_CAST(((uint64_t)x) >> 48), \ - BYTE_CAST(((uint64_t)x) >> 40), BYTE_CAST(((uint64_t)x) >> 32), \ - BYTE_CAST(((uint64_t)x) >> 24), BYTE_CAST(((uint64_t)x) >> 16), \ - BYTE_CAST(((uint64_t)x) >> 8), BYTE_CAST(((uint64_t)x) >> 0) - -// Declare a N-bit integer as a this-endian (local machine) sequence of bytes -#ifndef BIG_ENDIAN -#define BIG_ENDIAN 1 -#endif // BIG_ENDIAN - -#if BIG_ENDIAN -#define TE16 BE16 -#define TE32 BE32 -#define TE64 BE64 -#else // !BIG_ENDIAN -#define TE16 LE16 -#define TE32 LE32 -#define TE64 LE64 -#endif // !BIG_ENDIAN - -/////////////////////////////////////////////////////////////////////////////// - -// Helpers for determining if X/screencasting is available (on linux). - -#define MAYBE_SKIP_SCREENCAST_TEST() \ - if (!testing::IsScreencastingAvailable()) { \ - LOG(LS_WARNING) << "Skipping test, since it doesn't have the requisite " \ - << "X environment for screen capture."; \ - return; \ - } \ - -#if defined(WEBRTC_LINUX) && !defined(WEBRTC_ANDROID) -struct XDisplay { - XDisplay() : display_(XOpenDisplay(NULL)) { } - ~XDisplay() { if (display_) XCloseDisplay(display_); } - bool IsValid() const { return display_ != NULL; } - operator Display*() { return display_; } - private: - Display* display_; -}; -#endif - -// Returns true if screencasting is available. When false, anything that uses -// screencasting features may fail. -inline bool IsScreencastingAvailable() { -#if defined(WEBRTC_LINUX) && !defined(WEBRTC_ANDROID) - XDisplay display; - if (!display.IsValid()) { - LOG(LS_WARNING) << "No X Display available."; - return false; - } - int ignored_int, major_version, minor_version; - if (!XRRQueryExtension(display, &ignored_int, &ignored_int) || - !XRRQueryVersion(display, &major_version, &minor_version) || - major_version < 1 || - (major_version < 2 && minor_version < 3)) { - LOG(LS_WARNING) << "XRandr version: " << major_version << "." - << minor_version; - LOG(LS_WARNING) << "XRandr is not supported or is too old (pre 1.3)."; - return false; - } -#endif - return true; -} -} // namespace testing - -#endif // WEBRTC_BASE_TESTUTILS_H__ diff --git a/WebRtc.NET/include/webrtc/base/thread.h b/WebRtc.NET/include/webrtc/base/thread.h deleted file mode 100644 index 97e69415..00000000 --- a/WebRtc.NET/include/webrtc/base/thread.h +++ /dev/null @@ -1,334 +0,0 @@ -/* - * Copyright 2004 The WebRTC Project Authors. All rights reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_BASE_THREAD_H_ -#define WEBRTC_BASE_THREAD_H_ - -#include -#include -#include -#include -#include - -#if defined(WEBRTC_POSIX) -#include -#endif -#include "webrtc/base/constructormagic.h" -#include "webrtc/base/event.h" -#include "webrtc/base/messagequeue.h" - -#if defined(WEBRTC_WIN) -#include "webrtc/base/win32.h" -#endif - -namespace rtc { - -class Thread; - -class ThreadManager { - public: - static const int kForever = -1; - - ThreadManager(); - ~ThreadManager(); - - static ThreadManager* Instance(); - - Thread* CurrentThread(); - void SetCurrentThread(Thread* thread); - - // Returns a thread object with its thread_ ivar set - // to whatever the OS uses to represent the thread. - // If there already *is* a Thread object corresponding to this thread, - // this method will return that. Otherwise it creates a new Thread - // object whose wrapped() method will return true, and whose - // handle will, on Win32, be opened with only synchronization privileges - - // if you need more privilegs, rather than changing this method, please - // write additional code to adjust the privileges, or call a different - // factory method of your own devising, because this one gets used in - // unexpected contexts (like inside browser plugins) and it would be a - // shame to break it. It is also conceivable on Win32 that we won't even - // be able to get synchronization privileges, in which case the result - // will have a NULL handle. - Thread *WrapCurrentThread(); - void UnwrapCurrentThread(); - - private: -#if defined(WEBRTC_POSIX) - pthread_key_t key_; -#endif - -#if defined(WEBRTC_WIN) - DWORD key_; -#endif - - RTC_DISALLOW_COPY_AND_ASSIGN(ThreadManager); -}; - -struct _SendMessage { - _SendMessage() {} - Thread *thread; - Message msg; - bool *ready; -}; - -class Runnable { - public: - virtual ~Runnable() {} - virtual void Run(Thread* thread) = 0; - - protected: - Runnable() {} - - private: - RTC_DISALLOW_COPY_AND_ASSIGN(Runnable); -}; - -// WARNING! SUBCLASSES MUST CALL Stop() IN THEIR DESTRUCTORS! See ~Thread(). - -class LOCKABLE Thread : public MessageQueue { - public: - // Create a new Thread and optionally assign it to the passed SocketServer. - Thread(); - explicit Thread(SocketServer* ss); - explicit Thread(std::unique_ptr ss); - - // NOTE: ALL SUBCLASSES OF Thread MUST CALL Stop() IN THEIR DESTRUCTORS (or - // guarantee Stop() is explicitly called before the subclass is destroyed). - // This is required to avoid a data race between the destructor modifying the - // vtable, and the Thread::PreRun calling the virtual method Run(). - ~Thread() override; - - static std::unique_ptr CreateWithSocketServer(); - static std::unique_ptr Create(); - static Thread* Current(); - - // Used to catch performance regressions. Use this to disallow blocking calls - // (Invoke) for a given scope. If a synchronous call is made while this is in - // effect, an assert will be triggered. - // Note that this is a single threaded class. - class ScopedDisallowBlockingCalls { - public: - ScopedDisallowBlockingCalls(); - ~ScopedDisallowBlockingCalls(); - private: - Thread* const thread_; - const bool previous_state_; - }; - - bool IsCurrent() const { - return Current() == this; - } - - // Sleeps the calling thread for the specified number of milliseconds, during - // which time no processing is performed. Returns false if sleeping was - // interrupted by a signal (POSIX only). - static bool SleepMs(int millis); - - // Sets the thread's name, for debugging. Must be called before Start(). - // If |obj| is non-NULL, its value is appended to |name|. - const std::string& name() const { return name_; } - bool SetName(const std::string& name, const void* obj); - - // Starts the execution of the thread. - bool Start(Runnable* runnable = NULL); - - // Tells the thread to stop and waits until it is joined. - // Never call Stop on the current thread. Instead use the inherited Quit - // function which will exit the base MessageQueue without terminating the - // underlying OS thread. - virtual void Stop(); - - // By default, Thread::Run() calls ProcessMessages(kForever). To do other - // work, override Run(). To receive and dispatch messages, call - // ProcessMessages occasionally. - virtual void Run(); - - virtual void Send(const Location& posted_from, - MessageHandler* phandler, - uint32_t id = 0, - MessageData* pdata = NULL); - - // Convenience method to invoke a functor on another thread. Caller must - // provide the |ReturnT| template argument, which cannot (easily) be deduced. - // Uses Send() internally, which blocks the current thread until execution - // is complete. - // Ex: bool result = thread.Invoke(RTC_FROM_HERE, - // &MyFunctionReturningBool); - // NOTE: This function can only be called when synchronous calls are allowed. - // See ScopedDisallowBlockingCalls for details. - template - ReturnT Invoke(const Location& posted_from, const FunctorT& functor) { - FunctorMessageHandler handler(functor); - InvokeInternal(posted_from, &handler); - return handler.result(); - } - - // From MessageQueue - void Clear(MessageHandler* phandler, - uint32_t id = MQID_ANY, - MessageList* removed = NULL) override; - void ReceiveSends() override; - - // ProcessMessages will process I/O and dispatch messages until: - // 1) cms milliseconds have elapsed (returns true) - // 2) Stop() is called (returns false) - bool ProcessMessages(int cms); - - // Returns true if this is a thread that we created using the standard - // constructor, false if it was created by a call to - // ThreadManager::WrapCurrentThread(). The main thread of an application - // is generally not owned, since the OS representation of the thread - // obviously exists before we can get to it. - // You cannot call Start on non-owned threads. - bool IsOwned(); - -#if defined(WEBRTC_WIN) - HANDLE GetHandle() const { - return thread_; - } - DWORD GetId() const { - return thread_id_; - } -#elif defined(WEBRTC_POSIX) - pthread_t GetPThread() { - return thread_; - } -#endif - - // Expose private method running() for tests. - // - // DANGER: this is a terrible public API. Most callers that might want to - // call this likely do not have enough control/knowledge of the Thread in - // question to guarantee that the returned value remains true for the duration - // of whatever code is conditionally executing because of the return value! - bool RunningForTest() { return running(); } - - // Sets the per-thread allow-blocking-calls flag and returns the previous - // value. Must be called on this thread. - bool SetAllowBlockingCalls(bool allow); - - // These functions are public to avoid injecting test hooks. Don't call them - // outside of tests. - // This method should be called when thread is created using non standard - // method, like derived implementation of rtc::Thread and it can not be - // started by calling Start(). This will set started flag to true and - // owned to false. This must be called from the current thread. - bool WrapCurrent(); - void UnwrapCurrent(); - - protected: - // Same as WrapCurrent except that it never fails as it does not try to - // acquire the synchronization access of the thread. The caller should never - // call Stop() or Join() on this thread. - void SafeWrapCurrent(); - - // Blocks the calling thread until this thread has terminated. - void Join(); - - static void AssertBlockingIsAllowedOnCurrentThread(); - - friend class ScopedDisallowBlockingCalls; - - private: - static void *PreRun(void *pv); - - // ThreadManager calls this instead WrapCurrent() because - // ThreadManager::Instance() cannot be used while ThreadManager is - // being created. - // The method tries to get synchronization rights of the thread on Windows if - // |need_synchronize_access| is true. - bool WrapCurrentWithThreadManager(ThreadManager* thread_manager, - bool need_synchronize_access); - - // Return true if the thread was started and hasn't yet stopped. - bool running() { return running_.Wait(0); } - - // Processes received "Send" requests. If |source| is not NULL, only requests - // from |source| are processed, otherwise, all requests are processed. - void ReceiveSendsFromThread(const Thread* source); - - // If |source| is not NULL, pops the first "Send" message from |source| in - // |sendlist_|, otherwise, pops the first "Send" message of |sendlist_|. - // The caller must lock |crit_| before calling. - // Returns true if there is such a message. - bool PopSendMessageFromThread(const Thread* source, _SendMessage* msg); - - void InvokeInternal(const Location& posted_from, MessageHandler* handler); - - std::list<_SendMessage> sendlist_; - std::string name_; - Event running_; // Signalled means running. - -#if defined(WEBRTC_POSIX) - pthread_t thread_; -#endif - -#if defined(WEBRTC_WIN) - HANDLE thread_; - DWORD thread_id_; -#endif - - bool owned_; - bool blocking_calls_allowed_; // By default set to |true|. - - friend class ThreadManager; - - RTC_DISALLOW_COPY_AND_ASSIGN(Thread); -}; - -// AutoThread automatically installs itself at construction -// uninstalls at destruction, if a Thread object is -// _not already_ associated with the current OS thread. - -class AutoThread : public Thread { - public: - AutoThread(); - ~AutoThread() override; - - private: - RTC_DISALLOW_COPY_AND_ASSIGN(AutoThread); -}; - -// Win32 extension for threads that need to use COM -#if defined(WEBRTC_WIN) -class ComThread : public Thread { - public: - ComThread() {} - ~ComThread() override { Stop(); } - - protected: - void Run() override; - - private: - RTC_DISALLOW_COPY_AND_ASSIGN(ComThread); -}; -#endif - -// Provides an easy way to install/uninstall a socketserver on a thread. -class SocketServerScope { - public: - explicit SocketServerScope(SocketServer* ss) { - old_ss_ = Thread::Current()->socketserver(); - Thread::Current()->set_socketserver(ss); - } - ~SocketServerScope() { - Thread::Current()->set_socketserver(old_ss_); - } - - private: - SocketServer* old_ss_; - - RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(SocketServerScope); -}; - -} // namespace rtc - -#endif // WEBRTC_BASE_THREAD_H_ diff --git a/WebRtc.NET/include/webrtc/base/thread_annotations.h b/WebRtc.NET/include/webrtc/base/thread_annotations.h deleted file mode 100644 index 8d5abbdc..00000000 --- a/WebRtc.NET/include/webrtc/base/thread_annotations.h +++ /dev/null @@ -1,100 +0,0 @@ -// -// Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. -// -// Use of this source code is governed by a BSD-style license -// that can be found in the LICENSE file in the root of the source -// tree. An additional intellectual property rights grant can be found -// in the file PATENTS. All contributing project authors may -// be found in the AUTHORS file in the root of the source tree. -// -// Borrowed from -// https://code.google.com/p/gperftools/source/browse/src/base/thread_annotations.h -// but adapted for clang attributes instead of the gcc. -// -// This header file contains the macro definitions for thread safety -// annotations that allow the developers to document the locking policies -// of their multi-threaded code. The annotations can also help program -// analysis tools to identify potential thread safety issues. - -#ifndef WEBRTC_BASE_THREAD_ANNOTATIONS_H_ -#define WEBRTC_BASE_THREAD_ANNOTATIONS_H_ - -#if defined(__clang__) && (!defined(SWIG)) -#define THREAD_ANNOTATION_ATTRIBUTE__(x) __attribute__((x)) -#else -#define THREAD_ANNOTATION_ATTRIBUTE__(x) // no-op -#endif - -// Document if a shared variable/field needs to be protected by a lock. -// GUARDED_BY allows the user to specify a particular lock that should be -// held when accessing the annotated variable, while GUARDED_VAR only -// indicates a shared variable should be guarded (by any lock). GUARDED_VAR -// is primarily used when the client cannot express the name of the lock. -#define GUARDED_BY(x) THREAD_ANNOTATION_ATTRIBUTE__(guarded_by(x)) -#define GUARDED_VAR THREAD_ANNOTATION_ATTRIBUTE__(guarded_var) - -// Document if the memory location pointed to by a pointer should be guarded -// by a lock when dereferencing the pointer. Similar to GUARDED_VAR, -// PT_GUARDED_VAR is primarily used when the client cannot express the name -// of the lock. Note that a pointer variable to a shared memory location -// could itself be a shared variable. For example, if a shared global pointer -// q, which is guarded by mu1, points to a shared memory location that is -// guarded by mu2, q should be annotated as follows: -// int *q GUARDED_BY(mu1) PT_GUARDED_BY(mu2); -#define PT_GUARDED_BY(x) THREAD_ANNOTATION_ATTRIBUTE__(pt_guarded_by(x)) -#define PT_GUARDED_VAR THREAD_ANNOTATION_ATTRIBUTE__(pt_guarded_var) - -// Document the acquisition order between locks that can be held -// simultaneously by a thread. For any two locks that need to be annotated -// to establish an acquisition order, only one of them needs the annotation. -// (i.e. You don't have to annotate both locks with both ACQUIRED_AFTER -// and ACQUIRED_BEFORE.) -#define ACQUIRED_AFTER(x) THREAD_ANNOTATION_ATTRIBUTE__(acquired_after(x)) -#define ACQUIRED_BEFORE(x) THREAD_ANNOTATION_ATTRIBUTE__(acquired_before(x)) - -// The following three annotations document the lock requirements for -// functions/methods. - -// Document if a function expects certain locks to be held before it is called -#define EXCLUSIVE_LOCKS_REQUIRED(...) \ - THREAD_ANNOTATION_ATTRIBUTE__(exclusive_locks_required(__VA_ARGS__)) - -#define SHARED_LOCKS_REQUIRED(...) \ - THREAD_ANNOTATION_ATTRIBUTE__(shared_locks_required(__VA_ARGS__)) - -// Document the locks acquired in the body of the function. These locks -// cannot be held when calling this function (as google3's Mutex locks are -// non-reentrant). -#define LOCKS_EXCLUDED(...) \ - THREAD_ANNOTATION_ATTRIBUTE__(locks_excluded(__VA_ARGS__)) - -// Document the lock the annotated function returns without acquiring it. -#define LOCK_RETURNED(x) THREAD_ANNOTATION_ATTRIBUTE__(lock_returned(x)) - -// Document if a class/type is a lockable type (such as the Mutex class). -#define LOCKABLE THREAD_ANNOTATION_ATTRIBUTE__(lockable) - -// Document if a class is a scoped lockable type (such as the MutexLock class). -#define SCOPED_LOCKABLE THREAD_ANNOTATION_ATTRIBUTE__(scoped_lockable) - -// The following annotations specify lock and unlock primitives. -#define EXCLUSIVE_LOCK_FUNCTION(...) \ - THREAD_ANNOTATION_ATTRIBUTE__(exclusive_lock_function(__VA_ARGS__)) - -#define SHARED_LOCK_FUNCTION(...) \ - THREAD_ANNOTATION_ATTRIBUTE__(shared_lock_function(__VA_ARGS__)) - -#define EXCLUSIVE_TRYLOCK_FUNCTION(...) \ - THREAD_ANNOTATION_ATTRIBUTE__(exclusive_trylock_function(__VA_ARGS__)) - -#define SHARED_TRYLOCK_FUNCTION(...) \ - THREAD_ANNOTATION_ATTRIBUTE__(shared_trylock_function(__VA_ARGS__)) - -#define UNLOCK_FUNCTION(...) \ - THREAD_ANNOTATION_ATTRIBUTE__(unlock_function(__VA_ARGS__)) - -// An escape hatch for thread safety analysis to ignore the annotated function. -#define NO_THREAD_SAFETY_ANALYSIS \ - THREAD_ANNOTATION_ATTRIBUTE__(no_thread_safety_analysis) - -#endif // WEBRTC_BASE_THREAD_ANNOTATIONS_H_ diff --git a/WebRtc.NET/include/webrtc/base/thread_checker.h b/WebRtc.NET/include/webrtc/base/thread_checker.h deleted file mode 100644 index 5914282a..00000000 --- a/WebRtc.NET/include/webrtc/base/thread_checker.h +++ /dev/null @@ -1,178 +0,0 @@ -/* - * Copyright (c) 2014 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -// Borrowed from Chromium's src/base/threading/thread_checker.h. - -#ifndef WEBRTC_BASE_THREAD_CHECKER_H_ -#define WEBRTC_BASE_THREAD_CHECKER_H_ - -// Apart from debug builds, we also enable the thread checker in -// builds with RTC_DCHECK_IS_ON so that trybots and waterfall bots -// with this define will get the same level of thread checking as -// debug bots. -#define ENABLE_THREAD_CHECKER RTC_DCHECK_IS_ON - -#include "webrtc/base/checks.h" -#include "webrtc/base/constructormagic.h" -#include "webrtc/base/thread_annotations.h" -#include "webrtc/base/thread_checker_impl.h" - -namespace rtc { - -// Do nothing implementation, for use in release mode. -// -// Note: You should almost always use the ThreadChecker class to get the -// right version for your build configuration. -class ThreadCheckerDoNothing { - public: - bool CalledOnValidThread() const { - return true; - } - - void DetachFromThread() {} -}; - -// ThreadChecker is a helper class used to help verify that some methods of a -// class are called from the same thread. It provides identical functionality to -// base::NonThreadSafe, but it is meant to be held as a member variable, rather -// than inherited from base::NonThreadSafe. -// -// While inheriting from base::NonThreadSafe may give a clear indication about -// the thread-safety of a class, it may also lead to violations of the style -// guide with regard to multiple inheritance. The choice between having a -// ThreadChecker member and inheriting from base::NonThreadSafe should be based -// on whether: -// - Derived classes need to know the thread they belong to, as opposed to -// having that functionality fully encapsulated in the base class. -// - Derived classes should be able to reassign the base class to another -// thread, via DetachFromThread. -// -// If neither of these are true, then having a ThreadChecker member and calling -// CalledOnValidThread is the preferable solution. -// -// Example: -// class MyClass { -// public: -// void Foo() { -// RTC_DCHECK(thread_checker_.CalledOnValidThread()); -// ... (do stuff) ... -// } -// -// private: -// ThreadChecker thread_checker_; -// } -// -// In Release mode, CalledOnValidThread will always return true. -#if ENABLE_THREAD_CHECKER -class LOCKABLE ThreadChecker : public ThreadCheckerImpl { -}; -#else -class LOCKABLE ThreadChecker : public ThreadCheckerDoNothing { -}; -#endif // ENABLE_THREAD_CHECKER - -#undef ENABLE_THREAD_CHECKER - -namespace internal { -class SCOPED_LOCKABLE AnnounceOnThread { - public: - template - explicit AnnounceOnThread(const ThreadLikeObject* thread_like_object) - EXCLUSIVE_LOCK_FUNCTION(thread_like_object) {} - ~AnnounceOnThread() UNLOCK_FUNCTION() {} - - template - static bool IsCurrent(const ThreadLikeObject* thread_like_object) { - return thread_like_object->IsCurrent(); - } - static bool IsCurrent(const rtc::ThreadChecker* checker) { - return checker->CalledOnValidThread(); - } - - private: - RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(AnnounceOnThread); -}; - -} // namespace internal -} // namespace rtc - -// RUN_ON/ACCESS_ON/RTC_DCHECK_RUN_ON macros allows to annotate variables are -// accessed from same thread/task queue. -// Using tools designed to check mutexes, it checks at compile time everywhere -// variable is access, there is a run-time dcheck thread/task queue is correct. -// -// class ExampleThread { -// public: -// void NeedVar1() { -// RTC_DCHECK_RUN_ON(network_thread_); -// transport_->Send(); -// } -// -// private: -// rtc::Thread* network_thread_; -// int transport_ ACCESS_ON(network_thread_); -// }; -// -// class ExampleThreadChecker { -// public: -// int CalledFromPacer() RUN_ON(pacer_thread_checker_) { -// return var2_; -// } -// -// void CallMeFromPacer() { -// RTC_DCHECK_RUN_ON(&pacer_thread_checker_) -// << "Should be called from pacer"; -// CalledFromPacer(); -// } -// -// private: -// int pacer_var_ ACCESS_ON(pacer_thread_checker_); -// rtc::ThreadChecker pacer_thread_checker_; -// }; -// -// class TaskQueueExample { -// public: -// class Encoder { -// public: -// rtc::TaskQueue* Queue() { return encoder_queue_; } -// void Encode() { -// RTC_DCHECK_RUN_ON(encoder_queue_); -// DoSomething(var_); -// } -// -// private: -// rtc::TaskQueue* const encoder_queue_; -// Frame var_ ACCESS_ON(encoder_queue_); -// }; -// -// void Encode() { -// // Will fail at runtime when DCHECK is enabled: -// // encoder_->Encode(); -// // Will work: -// rtc::scoped_ref_ptr encoder = encoder_; -// encoder_->Queue()->PostTask([encoder] { encoder->Encode(); }); -// } -// -// private: -// rtc::scoped_ref_ptr encoder_; -// } - -// Document if a variable/field is not shared and should be accessed from -// same thread/task queue. -#define ACCESS_ON(x) THREAD_ANNOTATION_ATTRIBUTE__(guarded_by(x)) - -// Document if a function expected to be called from same thread/task queue. -#define RUN_ON(x) THREAD_ANNOTATION_ATTRIBUTE__(exclusive_locks_required(x)) - -#define RTC_DCHECK_RUN_ON(thread_like_object) \ - rtc::internal::AnnounceOnThread thread_announcer(thread_like_object); \ - RTC_DCHECK(rtc::internal::AnnounceOnThread::IsCurrent(thread_like_object)) - -#endif // WEBRTC_BASE_THREAD_CHECKER_H_ diff --git a/WebRtc.NET/include/webrtc/base/thread_checker_impl.h b/WebRtc.NET/include/webrtc/base/thread_checker_impl.h deleted file mode 100644 index b9867c3e..00000000 --- a/WebRtc.NET/include/webrtc/base/thread_checker_impl.h +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Copyright (c) 2014 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -// Borrowed from Chromium's src/base/threading/thread_checker_impl.h. - -#ifndef WEBRTC_BASE_THREAD_CHECKER_IMPL_H_ -#define WEBRTC_BASE_THREAD_CHECKER_IMPL_H_ - -#include "webrtc/base/criticalsection.h" -#include "webrtc/base/platform_thread_types.h" - -namespace rtc { - -// Real implementation of ThreadChecker, for use in debug mode, or -// for temporary use in release mode (e.g. to RTC_CHECK on a threading issue -// seen only in the wild). -// -// Note: You should almost always use the ThreadChecker class to get the -// right version for your build configuration. -class ThreadCheckerImpl { - public: - ThreadCheckerImpl(); - ~ThreadCheckerImpl(); - - bool CalledOnValidThread() const; - - // Changes the thread that is checked for in CalledOnValidThread. This may - // be useful when an object may be created on one thread and then used - // exclusively on another thread. - void DetachFromThread(); - - private: - CriticalSection lock_; - // This is mutable so that CalledOnValidThread can set it. - // It's guarded by |lock_|. - mutable PlatformThreadRef valid_thread_; -}; - -} // namespace rtc - -#endif // WEBRTC_BASE_THREAD_CHECKER_IMPL_H_ diff --git a/WebRtc.NET/include/webrtc/base/timedelta.h b/WebRtc.NET/include/webrtc/base/timedelta.h deleted file mode 100644 index 71c7f9fc..00000000 --- a/WebRtc.NET/include/webrtc/base/timedelta.h +++ /dev/null @@ -1,129 +0,0 @@ -/* - * Copyright 2016 The WebRTC Project Authors. All rights reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_BASE_TIMEDELTA_H_ -#define WEBRTC_BASE_TIMEDELTA_H_ - -#include - -#include "webrtc/base/timeutils.h" - -// Convenience class to convert between different units of relative time. -// Stores time to precision of nanoseconds, as int64_t internally. -// Doesn't check for overflow/underflow. -// -// Based on TimeDelta in: -// https://code.google.com/p/chromium/codesearch#chromium/src/base/time/time.h -namespace rtc { - -class TimeDelta { - public: - TimeDelta() : delta_(0) {} - - // Converts units of time to TimeDeltas. - static constexpr TimeDelta FromSeconds(int64_t secs) { - return TimeDelta(secs * kNumNanosecsPerSec); - } - static constexpr TimeDelta FromMilliseconds(int64_t ms) { - return TimeDelta(ms * kNumNanosecsPerMillisec); - } - static constexpr TimeDelta FromMicroseconds(int64_t us) { - return TimeDelta(us * kNumNanosecsPerMicrosec); - } - static constexpr TimeDelta FromNanoseconds(int64_t ns) { - return TimeDelta(ns); - } - - // Returns true if the time delta is zero. - bool is_zero() const { return delta_ == 0; } - - // Converts TimeDelta to units of time. - int64_t ToSeconds() const { return delta_ / kNumNanosecsPerSec; } - int64_t ToMilliseconds() const { return delta_ / kNumNanosecsPerMillisec; } - int64_t ToMicroseconds() const { return delta_ / kNumNanosecsPerMicrosec; } - int64_t ToNanoseconds() const { return delta_; } - - TimeDelta& operator=(TimeDelta other) { - delta_ = other.delta_; - return *this; - } - - // Computations with other deltas. - TimeDelta operator+(TimeDelta other) const { - return TimeDelta(delta_ + other.delta_); - } - TimeDelta operator-(TimeDelta other) const { - return TimeDelta(delta_ + other.delta_); - } - - TimeDelta& operator+=(TimeDelta other) { return *this = (*this + other); } - TimeDelta& operator-=(TimeDelta other) { return *this = (*this - other); } - TimeDelta operator-() const { return TimeDelta(-delta_); } - - // Computations with numeric types. - template - TimeDelta operator*(T a) const { - return TimeDelta(delta_ * a); - } - template - TimeDelta operator/(T a) const { - return TimeDelta(delta_ / a); - } - template - TimeDelta& operator*=(T a) { - return *this = (*this * a); - } - template - TimeDelta& operator/=(T a) { - return *this = (*this / a); - } - - TimeDelta operator%(TimeDelta a) const { - return TimeDelta(delta_ % a.delta_); - } - - // Comparison operators. - constexpr bool operator==(TimeDelta other) const { - return delta_ == other.delta_; - } - constexpr bool operator!=(TimeDelta other) const { - return delta_ != other.delta_; - } - constexpr bool operator<(TimeDelta other) const { - return delta_ < other.delta_; - } - constexpr bool operator<=(TimeDelta other) const { - return delta_ <= other.delta_; - } - constexpr bool operator>(TimeDelta other) const { - return delta_ > other.delta_; - } - constexpr bool operator>=(TimeDelta other) const { - return delta_ >= other.delta_; - } - - private: - // Constructs a delta given the duration in nanoseconds. This is private - // to avoid confusion by callers with an integer constructor. Use - // FromSeconds, FromMilliseconds, etc. instead. - constexpr explicit TimeDelta(int64_t delta_ns) : delta_(delta_ns) {} - - // Delta in nanoseconds. - int64_t delta_; -}; - -template -inline TimeDelta operator*(T a, TimeDelta td) { - return td * a; -} - -} // namespace rtc - -#endif // WEBRTC_BASE_TIMEDELTA_H_ diff --git a/WebRtc.NET/include/webrtc/base/trace_event.h b/WebRtc.NET/include/webrtc/base/trace_event.h deleted file mode 100644 index 3916af4f..00000000 --- a/WebRtc.NET/include/webrtc/base/trace_event.h +++ /dev/null @@ -1,916 +0,0 @@ -// Copyright (c) 2012 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file under third_party_mods/chromium or at: -// http://src.chromium.org/svn/trunk/src/LICENSE - -#ifndef WEBRTC_BASE_TRACE_EVENT_H_ -#define WEBRTC_BASE_TRACE_EVENT_H_ - -#include - -#include "webrtc/base/event_tracer.h" - -#if defined(TRACE_EVENT0) -#error "Another copy of trace_event.h has already been included." -#endif - -// Extracted from Chromium's src/base/debug/trace_event.h. - -// This header is designed to give you trace_event macros without specifying -// how the events actually get collected and stored. If you need to expose trace -// event to some other universe, you can copy-and-paste this file, -// implement the TRACE_EVENT_API macros, and do any other necessary fixup for -// the target platform. The end result is that multiple libraries can funnel -// events through to a shared trace event collector. - -// Trace events are for tracking application performance and resource usage. -// Macros are provided to track: -// Begin and end of function calls -// Counters -// -// Events are issued against categories. Whereas LOG's -// categories are statically defined, TRACE categories are created -// implicitly with a string. For example: -// TRACE_EVENT_INSTANT0("MY_SUBSYSTEM", "SomeImportantEvent") -// -// Events can be INSTANT, or can be pairs of BEGIN and END in the same scope: -// TRACE_EVENT_BEGIN0("MY_SUBSYSTEM", "SomethingCostly") -// doSomethingCostly() -// TRACE_EVENT_END0("MY_SUBSYSTEM", "SomethingCostly") -// Note: our tools can't always determine the correct BEGIN/END pairs unless -// these are used in the same scope. Use ASYNC_BEGIN/ASYNC_END macros if you -// need them to be in separate scopes. -// -// A common use case is to trace entire function scopes. This -// issues a trace BEGIN and END automatically: -// void doSomethingCostly() { -// TRACE_EVENT0("MY_SUBSYSTEM", "doSomethingCostly"); -// ... -// } -// -// Additional parameters can be associated with an event: -// void doSomethingCostly2(int howMuch) { -// TRACE_EVENT1("MY_SUBSYSTEM", "doSomethingCostly", -// "howMuch", howMuch); -// ... -// } -// -// The trace system will automatically add to this information the -// current process id, thread id, and a timestamp in microseconds. -// -// To trace an asynchronous procedure such as an IPC send/receive, use -// ASYNC_BEGIN and ASYNC_END: -// [single threaded sender code] -// static int send_count = 0; -// ++send_count; -// TRACE_EVENT_ASYNC_BEGIN0("ipc", "message", send_count); -// Send(new MyMessage(send_count)); -// [receive code] -// void OnMyMessage(send_count) { -// TRACE_EVENT_ASYNC_END0("ipc", "message", send_count); -// } -// The third parameter is a unique ID to match ASYNC_BEGIN/ASYNC_END pairs. -// ASYNC_BEGIN and ASYNC_END can occur on any thread of any traced process. -// Pointers can be used for the ID parameter, and they will be mangled -// internally so that the same pointer on two different processes will not -// match. For example: -// class MyTracedClass { -// public: -// MyTracedClass() { -// TRACE_EVENT_ASYNC_BEGIN0("category", "MyTracedClass", this); -// } -// ~MyTracedClass() { -// TRACE_EVENT_ASYNC_END0("category", "MyTracedClass", this); -// } -// } -// -// Trace event also supports counters, which is a way to track a quantity -// as it varies over time. Counters are created with the following macro: -// TRACE_COUNTER1("MY_SUBSYSTEM", "myCounter", g_myCounterValue); -// -// Counters are process-specific. The macro itself can be issued from any -// thread, however. -// -// Sometimes, you want to track two counters at once. You can do this with two -// counter macros: -// TRACE_COUNTER1("MY_SUBSYSTEM", "myCounter0", g_myCounterValue[0]); -// TRACE_COUNTER1("MY_SUBSYSTEM", "myCounter1", g_myCounterValue[1]); -// Or you can do it with a combined macro: -// TRACE_COUNTER2("MY_SUBSYSTEM", "myCounter", -// "bytesPinned", g_myCounterValue[0], -// "bytesAllocated", g_myCounterValue[1]); -// This indicates to the tracing UI that these counters should be displayed -// in a single graph, as a summed area chart. -// -// Since counters are in a global namespace, you may want to disembiguate with a -// unique ID, by using the TRACE_COUNTER_ID* variations. -// -// By default, trace collection is compiled in, but turned off at runtime. -// Collecting trace data is the responsibility of the embedding -// application. In Chrome's case, navigating to about:tracing will turn on -// tracing and display data collected across all active processes. -// -// -// Memory scoping note: -// Tracing copies the pointers, not the string content, of the strings passed -// in for category, name, and arg_names. Thus, the following code will -// cause problems: -// char* str = strdup("impprtantName"); -// TRACE_EVENT_INSTANT0("SUBSYSTEM", str); // BAD! -// free(str); // Trace system now has dangling pointer -// -// To avoid this issue with the |name| and |arg_name| parameters, use the -// TRACE_EVENT_COPY_XXX overloads of the macros at additional runtime overhead. -// Notes: The category must always be in a long-lived char* (i.e. static const). -// The |arg_values|, when used, are always deep copied with the _COPY -// macros. -// -// When are string argument values copied: -// const char* arg_values are only referenced by default: -// TRACE_EVENT1("category", "name", -// "arg1", "literal string is only referenced"); -// Use TRACE_STR_COPY to force copying of a const char*: -// TRACE_EVENT1("category", "name", -// "arg1", TRACE_STR_COPY("string will be copied")); -// std::string arg_values are always copied: -// TRACE_EVENT1("category", "name", -// "arg1", std::string("string will be copied")); -// -// -// Thread Safety: -// Thread safety is provided by methods defined in event_tracer.h. See the file -// for details. - - -// By default, const char* argument values are assumed to have long-lived scope -// and will not be copied. Use this macro to force a const char* to be copied. -#define TRACE_STR_COPY(str) \ - webrtc::trace_event_internal::TraceStringWithCopy(str) - -// This will mark the trace event as disabled by default. The user will need -// to explicitly enable the event. -#define TRACE_DISABLED_BY_DEFAULT(name) "disabled-by-default-" name - -// By default, uint64 ID argument values are not mangled with the Process ID in -// TRACE_EVENT_ASYNC macros. Use this macro to force Process ID mangling. -#define TRACE_ID_MANGLE(id) \ - webrtc::trace_event_internal::TraceID::ForceMangle(id) - -// Records a pair of begin and end events called "name" for the current -// scope, with 0, 1 or 2 associated arguments. If the category is not -// enabled, then this does nothing. -// - category and name strings must have application lifetime (statics or -// literals). They may not include " chars. -#define TRACE_EVENT0(category, name) \ - INTERNAL_TRACE_EVENT_ADD_SCOPED(category, name) -#define TRACE_EVENT1(category, name, arg1_name, arg1_val) \ - INTERNAL_TRACE_EVENT_ADD_SCOPED(category, name, arg1_name, arg1_val) -#define TRACE_EVENT2(category, name, arg1_name, arg1_val, arg2_name, arg2_val) \ - INTERNAL_TRACE_EVENT_ADD_SCOPED(category, name, arg1_name, arg1_val, \ - arg2_name, arg2_val) - -// Same as TRACE_EVENT except that they are not included in official builds. -#ifdef OFFICIAL_BUILD -#define UNSHIPPED_TRACE_EVENT0(category, name) (void)0 -#define UNSHIPPED_TRACE_EVENT1(category, name, arg1_name, arg1_val) (void)0 -#define UNSHIPPED_TRACE_EVENT2(category, name, arg1_name, arg1_val, \ - arg2_name, arg2_val) (void)0 -#define UNSHIPPED_TRACE_EVENT_INSTANT0(category, name) (void)0 -#define UNSHIPPED_TRACE_EVENT_INSTANT1(category, name, arg1_name, arg1_val) \ - (void)0 -#define UNSHIPPED_TRACE_EVENT_INSTANT2(category, name, arg1_name, arg1_val, \ - arg2_name, arg2_val) (void)0 -#else -#define UNSHIPPED_TRACE_EVENT0(category, name) \ - TRACE_EVENT0(category, name) -#define UNSHIPPED_TRACE_EVENT1(category, name, arg1_name, arg1_val) \ - TRACE_EVENT1(category, name, arg1_name, arg1_val) -#define UNSHIPPED_TRACE_EVENT2(category, name, arg1_name, arg1_val, \ - arg2_name, arg2_val) \ - TRACE_EVENT2(category, name, arg1_name, arg1_val, arg2_name, arg2_val) -#define UNSHIPPED_TRACE_EVENT_INSTANT0(category, name) \ - TRACE_EVENT_INSTANT0(category, name) -#define UNSHIPPED_TRACE_EVENT_INSTANT1(category, name, arg1_name, arg1_val) \ - TRACE_EVENT_INSTANT1(category, name, arg1_name, arg1_val) -#define UNSHIPPED_TRACE_EVENT_INSTANT2(category, name, arg1_name, arg1_val, \ - arg2_name, arg2_val) \ - TRACE_EVENT_INSTANT2(category, name, arg1_name, arg1_val, \ - arg2_name, arg2_val) -#endif - -// Records a single event called "name" immediately, with 0, 1 or 2 -// associated arguments. If the category is not enabled, then this -// does nothing. -// - category and name strings must have application lifetime (statics or -// literals). They may not include " chars. -#define TRACE_EVENT_INSTANT0(category, name) \ - INTERNAL_TRACE_EVENT_ADD(TRACE_EVENT_PHASE_INSTANT, \ - category, name, TRACE_EVENT_FLAG_NONE) -#define TRACE_EVENT_INSTANT1(category, name, arg1_name, arg1_val) \ - INTERNAL_TRACE_EVENT_ADD(TRACE_EVENT_PHASE_INSTANT, \ - category, name, TRACE_EVENT_FLAG_NONE, arg1_name, arg1_val) -#define TRACE_EVENT_INSTANT2(category, name, arg1_name, arg1_val, \ - arg2_name, arg2_val) \ - INTERNAL_TRACE_EVENT_ADD(TRACE_EVENT_PHASE_INSTANT, \ - category, name, TRACE_EVENT_FLAG_NONE, arg1_name, arg1_val, \ - arg2_name, arg2_val) -#define TRACE_EVENT_COPY_INSTANT0(category, name) \ - INTERNAL_TRACE_EVENT_ADD(TRACE_EVENT_PHASE_INSTANT, \ - category, name, TRACE_EVENT_FLAG_COPY) -#define TRACE_EVENT_COPY_INSTANT1(category, name, arg1_name, arg1_val) \ - INTERNAL_TRACE_EVENT_ADD(TRACE_EVENT_PHASE_INSTANT, \ - category, name, TRACE_EVENT_FLAG_COPY, arg1_name, arg1_val) -#define TRACE_EVENT_COPY_INSTANT2(category, name, arg1_name, arg1_val, \ - arg2_name, arg2_val) \ - INTERNAL_TRACE_EVENT_ADD(TRACE_EVENT_PHASE_INSTANT, \ - category, name, TRACE_EVENT_FLAG_COPY, arg1_name, arg1_val, \ - arg2_name, arg2_val) - -// Records a single BEGIN event called "name" immediately, with 0, 1 or 2 -// associated arguments. If the category is not enabled, then this -// does nothing. -// - category and name strings must have application lifetime (statics or -// literals). They may not include " chars. -#define TRACE_EVENT_BEGIN0(category, name) \ - INTERNAL_TRACE_EVENT_ADD(TRACE_EVENT_PHASE_BEGIN, \ - category, name, TRACE_EVENT_FLAG_NONE) -#define TRACE_EVENT_BEGIN1(category, name, arg1_name, arg1_val) \ - INTERNAL_TRACE_EVENT_ADD(TRACE_EVENT_PHASE_BEGIN, \ - category, name, TRACE_EVENT_FLAG_NONE, arg1_name, arg1_val) -#define TRACE_EVENT_BEGIN2(category, name, arg1_name, arg1_val, \ - arg2_name, arg2_val) \ - INTERNAL_TRACE_EVENT_ADD(TRACE_EVENT_PHASE_BEGIN, \ - category, name, TRACE_EVENT_FLAG_NONE, arg1_name, arg1_val, \ - arg2_name, arg2_val) -#define TRACE_EVENT_COPY_BEGIN0(category, name) \ - INTERNAL_TRACE_EVENT_ADD(TRACE_EVENT_PHASE_BEGIN, \ - category, name, TRACE_EVENT_FLAG_COPY) -#define TRACE_EVENT_COPY_BEGIN1(category, name, arg1_name, arg1_val) \ - INTERNAL_TRACE_EVENT_ADD(TRACE_EVENT_PHASE_BEGIN, \ - category, name, TRACE_EVENT_FLAG_COPY, arg1_name, arg1_val) -#define TRACE_EVENT_COPY_BEGIN2(category, name, arg1_name, arg1_val, \ - arg2_name, arg2_val) \ - INTERNAL_TRACE_EVENT_ADD(TRACE_EVENT_PHASE_BEGIN, \ - category, name, TRACE_EVENT_FLAG_COPY, arg1_name, arg1_val, \ - arg2_name, arg2_val) - -// Records a single END event for "name" immediately. If the category -// is not enabled, then this does nothing. -// - category and name strings must have application lifetime (statics or -// literals). They may not include " chars. -#define TRACE_EVENT_END0(category, name) \ - INTERNAL_TRACE_EVENT_ADD(TRACE_EVENT_PHASE_END, \ - category, name, TRACE_EVENT_FLAG_NONE) -#define TRACE_EVENT_END1(category, name, arg1_name, arg1_val) \ - INTERNAL_TRACE_EVENT_ADD(TRACE_EVENT_PHASE_END, \ - category, name, TRACE_EVENT_FLAG_NONE, arg1_name, arg1_val) -#define TRACE_EVENT_END2(category, name, arg1_name, arg1_val, \ - arg2_name, arg2_val) \ - INTERNAL_TRACE_EVENT_ADD(TRACE_EVENT_PHASE_END, \ - category, name, TRACE_EVENT_FLAG_NONE, arg1_name, arg1_val, \ - arg2_name, arg2_val) -#define TRACE_EVENT_COPY_END0(category, name) \ - INTERNAL_TRACE_EVENT_ADD(TRACE_EVENT_PHASE_END, \ - category, name, TRACE_EVENT_FLAG_COPY) -#define TRACE_EVENT_COPY_END1(category, name, arg1_name, arg1_val) \ - INTERNAL_TRACE_EVENT_ADD(TRACE_EVENT_PHASE_END, \ - category, name, TRACE_EVENT_FLAG_COPY, arg1_name, arg1_val) -#define TRACE_EVENT_COPY_END2(category, name, arg1_name, arg1_val, \ - arg2_name, arg2_val) \ - INTERNAL_TRACE_EVENT_ADD(TRACE_EVENT_PHASE_END, \ - category, name, TRACE_EVENT_FLAG_COPY, arg1_name, arg1_val, \ - arg2_name, arg2_val) - -// Records the value of a counter called "name" immediately. Value -// must be representable as a 32 bit integer. -// - category and name strings must have application lifetime (statics or -// literals). They may not include " chars. -#define TRACE_COUNTER1(category, name, value) \ - INTERNAL_TRACE_EVENT_ADD(TRACE_EVENT_PHASE_COUNTER, \ - category, name, TRACE_EVENT_FLAG_NONE, \ - "value", static_cast(value)) -#define TRACE_COPY_COUNTER1(category, name, value) \ - INTERNAL_TRACE_EVENT_ADD(TRACE_EVENT_PHASE_COUNTER, \ - category, name, TRACE_EVENT_FLAG_COPY, \ - "value", static_cast(value)) - -// Records the values of a multi-parted counter called "name" immediately. -// The UI will treat value1 and value2 as parts of a whole, displaying their -// values as a stacked-bar chart. -// - category and name strings must have application lifetime (statics or -// literals). They may not include " chars. -#define TRACE_COUNTER2(category, name, value1_name, value1_val, \ - value2_name, value2_val) \ - INTERNAL_TRACE_EVENT_ADD(TRACE_EVENT_PHASE_COUNTER, \ - category, name, TRACE_EVENT_FLAG_NONE, \ - value1_name, static_cast(value1_val), \ - value2_name, static_cast(value2_val)) -#define TRACE_COPY_COUNTER2(category, name, value1_name, value1_val, \ - value2_name, value2_val) \ - INTERNAL_TRACE_EVENT_ADD(TRACE_EVENT_PHASE_COUNTER, \ - category, name, TRACE_EVENT_FLAG_COPY, \ - value1_name, static_cast(value1_val), \ - value2_name, static_cast(value2_val)) - -// Records the value of a counter called "name" immediately. Value -// must be representable as a 32 bit integer. -// - category and name strings must have application lifetime (statics or -// literals). They may not include " chars. -// - |id| is used to disambiguate counters with the same name. It must either -// be a pointer or an integer value up to 64 bits. If it's a pointer, the bits -// will be xored with a hash of the process ID so that the same pointer on -// two different processes will not collide. -#define TRACE_COUNTER_ID1(category, name, id, value) \ - INTERNAL_TRACE_EVENT_ADD_WITH_ID(TRACE_EVENT_PHASE_COUNTER, \ - category, name, id, TRACE_EVENT_FLAG_NONE, \ - "value", static_cast(value)) -#define TRACE_COPY_COUNTER_ID1(category, name, id, value) \ - INTERNAL_TRACE_EVENT_ADD_WITH_ID(TRACE_EVENT_PHASE_COUNTER, \ - category, name, id, TRACE_EVENT_FLAG_COPY, \ - "value", static_cast(value)) - -// Records the values of a multi-parted counter called "name" immediately. -// The UI will treat value1 and value2 as parts of a whole, displaying their -// values as a stacked-bar chart. -// - category and name strings must have application lifetime (statics or -// literals). They may not include " chars. -// - |id| is used to disambiguate counters with the same name. It must either -// be a pointer or an integer value up to 64 bits. If it's a pointer, the bits -// will be xored with a hash of the process ID so that the same pointer on -// two different processes will not collide. -#define TRACE_COUNTER_ID2(category, name, id, value1_name, value1_val, \ - value2_name, value2_val) \ - INTERNAL_TRACE_EVENT_ADD_WITH_ID(TRACE_EVENT_PHASE_COUNTER, \ - category, name, id, TRACE_EVENT_FLAG_NONE, \ - value1_name, static_cast(value1_val), \ - value2_name, static_cast(value2_val)) -#define TRACE_COPY_COUNTER_ID2(category, name, id, value1_name, value1_val, \ - value2_name, value2_val) \ - INTERNAL_TRACE_EVENT_ADD_WITH_ID(TRACE_EVENT_PHASE_COUNTER, \ - category, name, id, TRACE_EVENT_FLAG_COPY, \ - value1_name, static_cast(value1_val), \ - value2_name, static_cast(value2_val)) - - -// Records a single ASYNC_BEGIN event called "name" immediately, with 0, 1 or 2 -// associated arguments. If the category is not enabled, then this -// does nothing. -// - category and name strings must have application lifetime (statics or -// literals). They may not include " chars. -// - |id| is used to match the ASYNC_BEGIN event with the ASYNC_END event. ASYNC -// events are considered to match if their category, name and id values all -// match. |id| must either be a pointer or an integer value up to 64 bits. If -// it's a pointer, the bits will be xored with a hash of the process ID so -// that the same pointer on two different processes will not collide. -// An asynchronous operation can consist of multiple phases. The first phase is -// defined by the ASYNC_BEGIN calls. Additional phases can be defined using the -// ASYNC_STEP macros. When the operation completes, call ASYNC_END. -// An ASYNC trace typically occur on a single thread (if not, they will only be -// drawn on the thread defined in the ASYNC_BEGIN event), but all events in that -// operation must use the same |name| and |id|. Each event can have its own -// args. -#define TRACE_EVENT_ASYNC_BEGIN0(category, name, id) \ - INTERNAL_TRACE_EVENT_ADD_WITH_ID(TRACE_EVENT_PHASE_ASYNC_BEGIN, \ - category, name, id, TRACE_EVENT_FLAG_NONE) -#define TRACE_EVENT_ASYNC_BEGIN1(category, name, id, arg1_name, arg1_val) \ - INTERNAL_TRACE_EVENT_ADD_WITH_ID(TRACE_EVENT_PHASE_ASYNC_BEGIN, \ - category, name, id, TRACE_EVENT_FLAG_NONE, arg1_name, arg1_val) -#define TRACE_EVENT_ASYNC_BEGIN2(category, name, id, arg1_name, arg1_val, \ - arg2_name, arg2_val) \ - INTERNAL_TRACE_EVENT_ADD_WITH_ID(TRACE_EVENT_PHASE_ASYNC_BEGIN, \ - category, name, id, TRACE_EVENT_FLAG_NONE, \ - arg1_name, arg1_val, arg2_name, arg2_val) -#define TRACE_EVENT_COPY_ASYNC_BEGIN0(category, name, id) \ - INTERNAL_TRACE_EVENT_ADD_WITH_ID(TRACE_EVENT_PHASE_ASYNC_BEGIN, \ - category, name, id, TRACE_EVENT_FLAG_COPY) -#define TRACE_EVENT_COPY_ASYNC_BEGIN1(category, name, id, arg1_name, arg1_val) \ - INTERNAL_TRACE_EVENT_ADD_WITH_ID(TRACE_EVENT_PHASE_ASYNC_BEGIN, \ - category, name, id, TRACE_EVENT_FLAG_COPY, \ - arg1_name, arg1_val) -#define TRACE_EVENT_COPY_ASYNC_BEGIN2(category, name, id, arg1_name, arg1_val, \ - arg2_name, arg2_val) \ - INTERNAL_TRACE_EVENT_ADD_WITH_ID(TRACE_EVENT_PHASE_ASYNC_BEGIN, \ - category, name, id, TRACE_EVENT_FLAG_COPY, \ - arg1_name, arg1_val, arg2_name, arg2_val) - -// Records a single ASYNC_STEP event for |step| immediately. If the category -// is not enabled, then this does nothing. The |name| and |id| must match the -// ASYNC_BEGIN event above. The |step| param identifies this step within the -// async event. This should be called at the beginning of the next phase of an -// asynchronous operation. -#define TRACE_EVENT_ASYNC_STEP0(category, name, id, step) \ - INTERNAL_TRACE_EVENT_ADD_WITH_ID(TRACE_EVENT_PHASE_ASYNC_STEP, \ - category, name, id, TRACE_EVENT_FLAG_NONE, "step", step) -#define TRACE_EVENT_ASYNC_STEP1(category, name, id, step, \ - arg1_name, arg1_val) \ - INTERNAL_TRACE_EVENT_ADD_WITH_ID(TRACE_EVENT_PHASE_ASYNC_STEP, \ - category, name, id, TRACE_EVENT_FLAG_NONE, "step", step, \ - arg1_name, arg1_val) -#define TRACE_EVENT_COPY_ASYNC_STEP0(category, name, id, step) \ - INTERNAL_TRACE_EVENT_ADD_WITH_ID(TRACE_EVENT_PHASE_ASYNC_STEP, \ - category, name, id, TRACE_EVENT_FLAG_COPY, "step", step) -#define TRACE_EVENT_COPY_ASYNC_STEP1(category, name, id, step, \ - arg1_name, arg1_val) \ - INTERNAL_TRACE_EVENT_ADD_WITH_ID(TRACE_EVENT_PHASE_ASYNC_STEP, \ - category, name, id, TRACE_EVENT_FLAG_COPY, "step", step, \ - arg1_name, arg1_val) - -// Records a single ASYNC_END event for "name" immediately. If the category -// is not enabled, then this does nothing. -#define TRACE_EVENT_ASYNC_END0(category, name, id) \ - INTERNAL_TRACE_EVENT_ADD_WITH_ID(TRACE_EVENT_PHASE_ASYNC_END, \ - category, name, id, TRACE_EVENT_FLAG_NONE) -#define TRACE_EVENT_ASYNC_END1(category, name, id, arg1_name, arg1_val) \ - INTERNAL_TRACE_EVENT_ADD_WITH_ID(TRACE_EVENT_PHASE_ASYNC_END, \ - category, name, id, TRACE_EVENT_FLAG_NONE, arg1_name, arg1_val) -#define TRACE_EVENT_ASYNC_END2(category, name, id, arg1_name, arg1_val, \ - arg2_name, arg2_val) \ - INTERNAL_TRACE_EVENT_ADD_WITH_ID(TRACE_EVENT_PHASE_ASYNC_END, \ - category, name, id, TRACE_EVENT_FLAG_NONE, \ - arg1_name, arg1_val, arg2_name, arg2_val) -#define TRACE_EVENT_COPY_ASYNC_END0(category, name, id) \ - INTERNAL_TRACE_EVENT_ADD_WITH_ID(TRACE_EVENT_PHASE_ASYNC_END, \ - category, name, id, TRACE_EVENT_FLAG_COPY) -#define TRACE_EVENT_COPY_ASYNC_END1(category, name, id, arg1_name, arg1_val) \ - INTERNAL_TRACE_EVENT_ADD_WITH_ID(TRACE_EVENT_PHASE_ASYNC_END, \ - category, name, id, TRACE_EVENT_FLAG_COPY, \ - arg1_name, arg1_val) -#define TRACE_EVENT_COPY_ASYNC_END2(category, name, id, arg1_name, arg1_val, \ - arg2_name, arg2_val) \ - INTERNAL_TRACE_EVENT_ADD_WITH_ID(TRACE_EVENT_PHASE_ASYNC_END, \ - category, name, id, TRACE_EVENT_FLAG_COPY, \ - arg1_name, arg1_val, arg2_name, arg2_val) - - -// Records a single FLOW_BEGIN event called "name" immediately, with 0, 1 or 2 -// associated arguments. If the category is not enabled, then this -// does nothing. -// - category and name strings must have application lifetime (statics or -// literals). They may not include " chars. -// - |id| is used to match the FLOW_BEGIN event with the FLOW_END event. FLOW -// events are considered to match if their category, name and id values all -// match. |id| must either be a pointer or an integer value up to 64 bits. If -// it's a pointer, the bits will be xored with a hash of the process ID so -// that the same pointer on two different processes will not collide. -// FLOW events are different from ASYNC events in how they are drawn by the -// tracing UI. A FLOW defines asynchronous data flow, such as posting a task -// (FLOW_BEGIN) and later executing that task (FLOW_END). Expect FLOWs to be -// drawn as lines or arrows from FLOW_BEGIN scopes to FLOW_END scopes. Similar -// to ASYNC, a FLOW can consist of multiple phases. The first phase is defined -// by the FLOW_BEGIN calls. Additional phases can be defined using the FLOW_STEP -// macros. When the operation completes, call FLOW_END. An async operation can -// span threads and processes, but all events in that operation must use the -// same |name| and |id|. Each event can have its own args. -#define TRACE_EVENT_FLOW_BEGIN0(category, name, id) \ - INTERNAL_TRACE_EVENT_ADD_WITH_ID(TRACE_EVENT_PHASE_FLOW_BEGIN, \ - category, name, id, TRACE_EVENT_FLAG_NONE) -#define TRACE_EVENT_FLOW_BEGIN1(category, name, id, arg1_name, arg1_val) \ - INTERNAL_TRACE_EVENT_ADD_WITH_ID(TRACE_EVENT_PHASE_FLOW_BEGIN, \ - category, name, id, TRACE_EVENT_FLAG_NONE, arg1_name, arg1_val) -#define TRACE_EVENT_FLOW_BEGIN2(category, name, id, arg1_name, arg1_val, \ - arg2_name, arg2_val) \ - INTERNAL_TRACE_EVENT_ADD_WITH_ID(TRACE_EVENT_PHASE_FLOW_BEGIN, \ - category, name, id, TRACE_EVENT_FLAG_NONE, \ - arg1_name, arg1_val, arg2_name, arg2_val) -#define TRACE_EVENT_COPY_FLOW_BEGIN0(category, name, id) \ - INTERNAL_TRACE_EVENT_ADD_WITH_ID(TRACE_EVENT_PHASE_FLOW_BEGIN, \ - category, name, id, TRACE_EVENT_FLAG_COPY) -#define TRACE_EVENT_COPY_FLOW_BEGIN1(category, name, id, arg1_name, arg1_val) \ - INTERNAL_TRACE_EVENT_ADD_WITH_ID(TRACE_EVENT_PHASE_FLOW_BEGIN, \ - category, name, id, TRACE_EVENT_FLAG_COPY, \ - arg1_name, arg1_val) -#define TRACE_EVENT_COPY_FLOW_BEGIN2(category, name, id, arg1_name, arg1_val, \ - arg2_name, arg2_val) \ - INTERNAL_TRACE_EVENT_ADD_WITH_ID(TRACE_EVENT_PHASE_FLOW_BEGIN, \ - category, name, id, TRACE_EVENT_FLAG_COPY, \ - arg1_name, arg1_val, arg2_name, arg2_val) - -// Records a single FLOW_STEP event for |step| immediately. If the category -// is not enabled, then this does nothing. The |name| and |id| must match the -// FLOW_BEGIN event above. The |step| param identifies this step within the -// async event. This should be called at the beginning of the next phase of an -// asynchronous operation. -#define TRACE_EVENT_FLOW_STEP0(category, name, id, step) \ - INTERNAL_TRACE_EVENT_ADD_WITH_ID(TRACE_EVENT_PHASE_FLOW_STEP, \ - category, name, id, TRACE_EVENT_FLAG_NONE, "step", step) -#define TRACE_EVENT_FLOW_STEP1(category, name, id, step, \ - arg1_name, arg1_val) \ - INTERNAL_TRACE_EVENT_ADD_WITH_ID(TRACE_EVENT_PHASE_FLOW_STEP, \ - category, name, id, TRACE_EVENT_FLAG_NONE, "step", step, \ - arg1_name, arg1_val) -#define TRACE_EVENT_COPY_FLOW_STEP0(category, name, id, step) \ - INTERNAL_TRACE_EVENT_ADD_WITH_ID(TRACE_EVENT_PHASE_FLOW_STEP, \ - category, name, id, TRACE_EVENT_FLAG_COPY, "step", step) -#define TRACE_EVENT_COPY_FLOW_STEP1(category, name, id, step, \ - arg1_name, arg1_val) \ - INTERNAL_TRACE_EVENT_ADD_WITH_ID(TRACE_EVENT_PHASE_FLOW_STEP, \ - category, name, id, TRACE_EVENT_FLAG_COPY, "step", step, \ - arg1_name, arg1_val) - -// Records a single FLOW_END event for "name" immediately. If the category -// is not enabled, then this does nothing. -#define TRACE_EVENT_FLOW_END0(category, name, id) \ - INTERNAL_TRACE_EVENT_ADD_WITH_ID(TRACE_EVENT_PHASE_FLOW_END, \ - category, name, id, TRACE_EVENT_FLAG_NONE) -#define TRACE_EVENT_FLOW_END1(category, name, id, arg1_name, arg1_val) \ - INTERNAL_TRACE_EVENT_ADD_WITH_ID(TRACE_EVENT_PHASE_FLOW_END, \ - category, name, id, TRACE_EVENT_FLAG_NONE, arg1_name, arg1_val) -#define TRACE_EVENT_FLOW_END2(category, name, id, arg1_name, arg1_val, \ - arg2_name, arg2_val) \ - INTERNAL_TRACE_EVENT_ADD_WITH_ID(TRACE_EVENT_PHASE_FLOW_END, \ - category, name, id, TRACE_EVENT_FLAG_NONE, \ - arg1_name, arg1_val, arg2_name, arg2_val) -#define TRACE_EVENT_COPY_FLOW_END0(category, name, id) \ - INTERNAL_TRACE_EVENT_ADD_WITH_ID(TRACE_EVENT_PHASE_FLOW_END, \ - category, name, id, TRACE_EVENT_FLAG_COPY) -#define TRACE_EVENT_COPY_FLOW_END1(category, name, id, arg1_name, arg1_val) \ - INTERNAL_TRACE_EVENT_ADD_WITH_ID(TRACE_EVENT_PHASE_FLOW_END, \ - category, name, id, TRACE_EVENT_FLAG_COPY, \ - arg1_name, arg1_val) -#define TRACE_EVENT_COPY_FLOW_END2(category, name, id, arg1_name, arg1_val, \ - arg2_name, arg2_val) \ - INTERNAL_TRACE_EVENT_ADD_WITH_ID(TRACE_EVENT_PHASE_FLOW_END, \ - category, name, id, TRACE_EVENT_FLAG_COPY, \ - arg1_name, arg1_val, arg2_name, arg2_val) - - -//////////////////////////////////////////////////////////////////////////////// -// Implementation specific tracing API definitions. - -// Get a pointer to the enabled state of the given trace category. Only -// long-lived literal strings should be given as the category name. The returned -// pointer can be held permanently in a local static for example. If the -// unsigned char is non-zero, tracing is enabled. If tracing is enabled, -// TRACE_EVENT_API_ADD_TRACE_EVENT can be called. It's OK if tracing is disabled -// between the load of the tracing state and the call to -// TRACE_EVENT_API_ADD_TRACE_EVENT, because this flag only provides an early out -// for best performance when tracing is disabled. -// const unsigned char* -// TRACE_EVENT_API_GET_CATEGORY_ENABLED(const char* category_name) -#define TRACE_EVENT_API_GET_CATEGORY_ENABLED \ - webrtc::EventTracer::GetCategoryEnabled - -// Add a trace event to the platform tracing system. -// void TRACE_EVENT_API_ADD_TRACE_EVENT( -// char phase, -// const unsigned char* category_enabled, -// const char* name, -// unsigned long long id, -// int num_args, -// const char** arg_names, -// const unsigned char* arg_types, -// const unsigned long long* arg_values, -// unsigned char flags) -#define TRACE_EVENT_API_ADD_TRACE_EVENT webrtc::EventTracer::AddTraceEvent - -//////////////////////////////////////////////////////////////////////////////// - -// Implementation detail: trace event macros create temporary variables -// to keep instrumentation overhead low. These macros give each temporary -// variable a unique name based on the line number to prevent name collissions. -#define INTERNAL_TRACE_EVENT_UID3(a,b) \ - trace_event_unique_##a##b -#define INTERNAL_TRACE_EVENT_UID2(a,b) \ - INTERNAL_TRACE_EVENT_UID3(a,b) -#define INTERNAL_TRACE_EVENT_UID(name_prefix) \ - INTERNAL_TRACE_EVENT_UID2(name_prefix, __LINE__) - -// Implementation detail: internal macro to create static category. -#define INTERNAL_TRACE_EVENT_GET_CATEGORY_INFO(category) \ - static const unsigned char* INTERNAL_TRACE_EVENT_UID(catstatic) = 0; \ - if (!INTERNAL_TRACE_EVENT_UID(catstatic)) { \ - INTERNAL_TRACE_EVENT_UID(catstatic) = \ - TRACE_EVENT_API_GET_CATEGORY_ENABLED(category); \ - } - -// Implementation detail: internal macro to create static category and add -// event if the category is enabled. -#define INTERNAL_TRACE_EVENT_ADD(phase, category, name, flags, ...) \ - do { \ - INTERNAL_TRACE_EVENT_GET_CATEGORY_INFO(category); \ - if (*INTERNAL_TRACE_EVENT_UID(catstatic)) { \ - webrtc::trace_event_internal::AddTraceEvent( \ - phase, INTERNAL_TRACE_EVENT_UID(catstatic), name, \ - webrtc::trace_event_internal::kNoEventId, flags, ##__VA_ARGS__); \ - } \ - } while (0) - -// Implementation detail: internal macro to create static category and add begin -// event if the category is enabled. Also adds the end event when the scope -// ends. -#define INTERNAL_TRACE_EVENT_ADD_SCOPED(category, name, ...) \ - INTERNAL_TRACE_EVENT_GET_CATEGORY_INFO(category); \ - webrtc::trace_event_internal::TraceEndOnScopeClose \ - INTERNAL_TRACE_EVENT_UID(profileScope); \ - if (*INTERNAL_TRACE_EVENT_UID(catstatic)) { \ - webrtc::trace_event_internal::AddTraceEvent( \ - TRACE_EVENT_PHASE_BEGIN, \ - INTERNAL_TRACE_EVENT_UID(catstatic), \ - name, webrtc::trace_event_internal::kNoEventId, \ - TRACE_EVENT_FLAG_NONE, ##__VA_ARGS__); \ - INTERNAL_TRACE_EVENT_UID(profileScope).Initialize( \ - INTERNAL_TRACE_EVENT_UID(catstatic), name); \ - } - -// Implementation detail: internal macro to create static category and add -// event if the category is enabled. -#define INTERNAL_TRACE_EVENT_ADD_WITH_ID(phase, category, name, id, flags, \ - ...) \ - do { \ - INTERNAL_TRACE_EVENT_GET_CATEGORY_INFO(category); \ - if (*INTERNAL_TRACE_EVENT_UID(catstatic)) { \ - unsigned char trace_event_flags = flags | TRACE_EVENT_FLAG_HAS_ID; \ - webrtc::trace_event_internal::TraceID trace_event_trace_id( \ - id, &trace_event_flags); \ - webrtc::trace_event_internal::AddTraceEvent( \ - phase, INTERNAL_TRACE_EVENT_UID(catstatic), \ - name, trace_event_trace_id.data(), trace_event_flags, \ - ##__VA_ARGS__); \ - } \ - } while (0) - -// Notes regarding the following definitions: -// New values can be added and propagated to third party libraries, but existing -// definitions must never be changed, because third party libraries may use old -// definitions. - -// Phase indicates the nature of an event entry. E.g. part of a begin/end pair. -#define TRACE_EVENT_PHASE_BEGIN ('B') -#define TRACE_EVENT_PHASE_END ('E') -#define TRACE_EVENT_PHASE_INSTANT ('I') -#define TRACE_EVENT_PHASE_ASYNC_BEGIN ('S') -#define TRACE_EVENT_PHASE_ASYNC_STEP ('T') -#define TRACE_EVENT_PHASE_ASYNC_END ('F') -#define TRACE_EVENT_PHASE_FLOW_BEGIN ('s') -#define TRACE_EVENT_PHASE_FLOW_STEP ('t') -#define TRACE_EVENT_PHASE_FLOW_END ('f') -#define TRACE_EVENT_PHASE_METADATA ('M') -#define TRACE_EVENT_PHASE_COUNTER ('C') - -// Flags for changing the behavior of TRACE_EVENT_API_ADD_TRACE_EVENT. -#define TRACE_EVENT_FLAG_NONE (static_cast(0)) -#define TRACE_EVENT_FLAG_COPY (static_cast(1 << 0)) -#define TRACE_EVENT_FLAG_HAS_ID (static_cast(1 << 1)) -#define TRACE_EVENT_FLAG_MANGLE_ID (static_cast(1 << 2)) - -// Type values for identifying types in the TraceValue union. -#define TRACE_VALUE_TYPE_BOOL (static_cast(1)) -#define TRACE_VALUE_TYPE_UINT (static_cast(2)) -#define TRACE_VALUE_TYPE_INT (static_cast(3)) -#define TRACE_VALUE_TYPE_DOUBLE (static_cast(4)) -#define TRACE_VALUE_TYPE_POINTER (static_cast(5)) -#define TRACE_VALUE_TYPE_STRING (static_cast(6)) -#define TRACE_VALUE_TYPE_COPY_STRING (static_cast(7)) - -namespace webrtc { -namespace trace_event_internal { - -// Specify these values when the corresponding argument of AddTraceEvent is not -// used. -const int kZeroNumArgs = 0; -const unsigned long long kNoEventId = 0; - -// TraceID encapsulates an ID that can either be an integer or pointer. Pointers -// are mangled with the Process ID so that they are unlikely to collide when the -// same pointer is used on different processes. -class TraceID { - public: - class ForceMangle { - public: - explicit ForceMangle(unsigned long long id) : data_(id) {} - explicit ForceMangle(unsigned long id) : data_(id) {} - explicit ForceMangle(unsigned int id) : data_(id) {} - explicit ForceMangle(unsigned short id) : data_(id) {} - explicit ForceMangle(unsigned char id) : data_(id) {} - explicit ForceMangle(long long id) - : data_(static_cast(id)) {} - explicit ForceMangle(long id) - : data_(static_cast(id)) {} - explicit ForceMangle(int id) - : data_(static_cast(id)) {} - explicit ForceMangle(short id) - : data_(static_cast(id)) {} - explicit ForceMangle(signed char id) - : data_(static_cast(id)) {} - - unsigned long long data() const { return data_; } - - private: - unsigned long long data_; - }; - - explicit TraceID(const void* id, unsigned char* flags) - : data_(static_cast( - reinterpret_cast(id))) { - *flags |= TRACE_EVENT_FLAG_MANGLE_ID; - } - explicit TraceID(ForceMangle id, unsigned char* flags) : data_(id.data()) { - *flags |= TRACE_EVENT_FLAG_MANGLE_ID; - } - explicit TraceID(unsigned long long id, unsigned char* flags) - : data_(id) { (void)flags; } - explicit TraceID(unsigned long id, unsigned char* flags) - : data_(id) { (void)flags; } - explicit TraceID(unsigned int id, unsigned char* flags) - : data_(id) { (void)flags; } - explicit TraceID(unsigned short id, unsigned char* flags) - : data_(id) { (void)flags; } - explicit TraceID(unsigned char id, unsigned char* flags) - : data_(id) { (void)flags; } - explicit TraceID(long long id, unsigned char* flags) - : data_(static_cast(id)) { (void)flags; } - explicit TraceID(long id, unsigned char* flags) - : data_(static_cast(id)) { (void)flags; } - explicit TraceID(int id, unsigned char* flags) - : data_(static_cast(id)) { (void)flags; } - explicit TraceID(short id, unsigned char* flags) - : data_(static_cast(id)) { (void)flags; } - explicit TraceID(signed char id, unsigned char* flags) - : data_(static_cast(id)) { (void)flags; } - - unsigned long long data() const { return data_; } - - private: - unsigned long long data_; -}; - -// Simple union to store various types as unsigned long long. -union TraceValueUnion { - bool as_bool; - unsigned long long as_uint; - long long as_int; - double as_double; - const void* as_pointer; - const char* as_string; -}; - -// Simple container for const char* that should be copied instead of retained. -class TraceStringWithCopy { - public: - explicit TraceStringWithCopy(const char* str) : str_(str) {} - operator const char* () const { return str_; } - private: - const char* str_; -}; - -// Define SetTraceValue for each allowed type. It stores the type and -// value in the return arguments. This allows this API to avoid declaring any -// structures so that it is portable to third_party libraries. -#define INTERNAL_DECLARE_SET_TRACE_VALUE(actual_type, \ - union_member, \ - value_type_id) \ - static inline void SetTraceValue(actual_type arg, \ - unsigned char* type, \ - unsigned long long* value) { \ - TraceValueUnion type_value; \ - type_value.union_member = arg; \ - *type = value_type_id; \ - *value = type_value.as_uint; \ - } -// Simpler form for int types that can be safely casted. -#define INTERNAL_DECLARE_SET_TRACE_VALUE_INT(actual_type, \ - value_type_id) \ - static inline void SetTraceValue(actual_type arg, \ - unsigned char* type, \ - unsigned long long* value) { \ - *type = value_type_id; \ - *value = static_cast(arg); \ - } - -INTERNAL_DECLARE_SET_TRACE_VALUE_INT(unsigned long long, TRACE_VALUE_TYPE_UINT) -INTERNAL_DECLARE_SET_TRACE_VALUE_INT(unsigned long, TRACE_VALUE_TYPE_UINT) -INTERNAL_DECLARE_SET_TRACE_VALUE_INT(unsigned int, TRACE_VALUE_TYPE_UINT) -INTERNAL_DECLARE_SET_TRACE_VALUE_INT(unsigned short, TRACE_VALUE_TYPE_UINT) -INTERNAL_DECLARE_SET_TRACE_VALUE_INT(unsigned char, TRACE_VALUE_TYPE_UINT) -INTERNAL_DECLARE_SET_TRACE_VALUE_INT(long long, TRACE_VALUE_TYPE_INT) -INTERNAL_DECLARE_SET_TRACE_VALUE_INT(long, TRACE_VALUE_TYPE_INT) -INTERNAL_DECLARE_SET_TRACE_VALUE_INT(int, TRACE_VALUE_TYPE_INT) -INTERNAL_DECLARE_SET_TRACE_VALUE_INT(short, TRACE_VALUE_TYPE_INT) -INTERNAL_DECLARE_SET_TRACE_VALUE_INT(signed char, TRACE_VALUE_TYPE_INT) -INTERNAL_DECLARE_SET_TRACE_VALUE(bool, as_bool, TRACE_VALUE_TYPE_BOOL) -INTERNAL_DECLARE_SET_TRACE_VALUE(double, as_double, TRACE_VALUE_TYPE_DOUBLE) -INTERNAL_DECLARE_SET_TRACE_VALUE(const void*, as_pointer, - TRACE_VALUE_TYPE_POINTER) -INTERNAL_DECLARE_SET_TRACE_VALUE(const char*, as_string, - TRACE_VALUE_TYPE_STRING) -INTERNAL_DECLARE_SET_TRACE_VALUE(const TraceStringWithCopy&, as_string, - TRACE_VALUE_TYPE_COPY_STRING) - -#undef INTERNAL_DECLARE_SET_TRACE_VALUE -#undef INTERNAL_DECLARE_SET_TRACE_VALUE_INT - -// std::string version of SetTraceValue so that trace arguments can be strings. -static inline void SetTraceValue(const std::string& arg, - unsigned char* type, - unsigned long long* value) { - TraceValueUnion type_value; - type_value.as_string = arg.c_str(); - *type = TRACE_VALUE_TYPE_COPY_STRING; - *value = type_value.as_uint; -} - -// These AddTraceEvent template functions are defined here instead of in the -// macro, because the arg_values could be temporary objects, such as -// std::string. In order to store pointers to the internal c_str and pass -// through to the tracing API, the arg_values must live throughout -// these procedures. - -static inline void AddTraceEvent(char phase, - const unsigned char* category_enabled, - const char* name, - unsigned long long id, - unsigned char flags) { - TRACE_EVENT_API_ADD_TRACE_EVENT( - phase, category_enabled, name, id, - kZeroNumArgs, NULL, NULL, NULL, - flags); -} - -template -static inline void AddTraceEvent(char phase, - const unsigned char* category_enabled, - const char* name, - unsigned long long id, - unsigned char flags, - const char* arg1_name, - const ARG1_TYPE& arg1_val) { - const int num_args = 1; - unsigned char arg_types[1]; - unsigned long long arg_values[1]; - SetTraceValue(arg1_val, &arg_types[0], &arg_values[0]); - TRACE_EVENT_API_ADD_TRACE_EVENT( - phase, category_enabled, name, id, - num_args, &arg1_name, arg_types, arg_values, - flags); -} - -template -static inline void AddTraceEvent(char phase, - const unsigned char* category_enabled, - const char* name, - unsigned long long id, - unsigned char flags, - const char* arg1_name, - const ARG1_TYPE& arg1_val, - const char* arg2_name, - const ARG2_TYPE& arg2_val) { - const int num_args = 2; - const char* arg_names[2] = { arg1_name, arg2_name }; - unsigned char arg_types[2]; - unsigned long long arg_values[2]; - SetTraceValue(arg1_val, &arg_types[0], &arg_values[0]); - SetTraceValue(arg2_val, &arg_types[1], &arg_values[1]); - TRACE_EVENT_API_ADD_TRACE_EVENT( - phase, category_enabled, name, id, - num_args, arg_names, arg_types, arg_values, - flags); -} - -// Used by TRACE_EVENTx macro. Do not use directly. -class TraceEndOnScopeClose { - public: - // Note: members of data_ intentionally left uninitialized. See Initialize. - TraceEndOnScopeClose() : p_data_(NULL) {} - ~TraceEndOnScopeClose() { - if (p_data_) - AddEventIfEnabled(); - } - - void Initialize(const unsigned char* category_enabled, - const char* name) { - data_.category_enabled = category_enabled; - data_.name = name; - p_data_ = &data_; - } - - private: - // Add the end event if the category is still enabled. - void AddEventIfEnabled() { - // Only called when p_data_ is non-null. - if (*p_data_->category_enabled) { - TRACE_EVENT_API_ADD_TRACE_EVENT( - TRACE_EVENT_PHASE_END, - p_data_->category_enabled, - p_data_->name, kNoEventId, - kZeroNumArgs, NULL, NULL, NULL, - TRACE_EVENT_FLAG_NONE); - } - } - - // This Data struct workaround is to avoid initializing all the members - // in Data during construction of this object, since this object is always - // constructed, even when tracing is disabled. If the members of Data were - // members of this class instead, compiler warnings occur about potential - // uninitialized accesses. - struct Data { - const unsigned char* category_enabled; - const char* name; - }; - Data* p_data_; - Data data_; -}; - -} // namespace trace_event_internal -} // namespace webrtc - -#endif // WEBRTC_BASE_TRACE_EVENT_H_ diff --git a/WebRtc.NET/include/webrtc/base/transformadapter.h b/WebRtc.NET/include/webrtc/base/transformadapter.h deleted file mode 100644 index 290d5605..00000000 --- a/WebRtc.NET/include/webrtc/base/transformadapter.h +++ /dev/null @@ -1,84 +0,0 @@ -/* - * Copyright 2004 The WebRTC Project Authors. All rights reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_BASE_TRANSFORMADAPTER_H__ -#define WEBRTC_BASE_TRANSFORMADAPTER_H__ - -#include "webrtc/base/stream.h" - -namespace rtc { -/////////////////////////////////////////////////////////////////////////////// - -class TransformInterface { -public: - virtual ~TransformInterface() { } - - // Transform should convert the in_len bytes of input into the out_len-sized - // output buffer. If flush is true, there will be no more data following - // input. - // After the transformation, in_len contains the number of bytes consumed, and - // out_len contains the number of bytes ready in output. - // Note: Transform should not return SR_BLOCK, as there is no asynchronous - // notification available. - virtual StreamResult Transform(const void * input, size_t * in_len, - void * output, size_t * out_len, - bool flush) = 0; -}; - -/////////////////////////////////////////////////////////////////////////////// - -// TransformAdapter causes all data passed through to be transformed by the -// supplied TransformInterface object, which may apply compression, encryption, -// etc. - -class TransformAdapter : public StreamAdapterInterface { -public: - // Note that the transformation is unidirectional, in the direction specified - // by the constructor. Operations in the opposite direction result in SR_EOS. - TransformAdapter(StreamInterface * stream, - TransformInterface * transform, - bool direction_read); - ~TransformAdapter() override; - - StreamResult Read(void* buffer, - size_t buffer_len, - size_t* read, - int* error) override; - StreamResult Write(const void* data, - size_t data_len, - size_t* written, - int* error) override; - void Close() override; - - // Apriori, we can't tell what the transformation does to the stream length. - bool GetAvailable(size_t* size) const override; - bool ReserveSize(size_t size) override; - - // Transformations might not be restartable - virtual bool Rewind(); - -private: - enum State { ST_PROCESSING, ST_FLUSHING, ST_COMPLETE, ST_ERROR }; - enum { BUFFER_SIZE = 1024 }; - - TransformInterface * transform_; - bool direction_read_; - State state_; - int error_; - - char buffer_[BUFFER_SIZE]; - size_t len_; -}; - -/////////////////////////////////////////////////////////////////////////////// - -} // namespace rtc - -#endif // WEBRTC_BASE_TRANSFORMADAPTER_H__ diff --git a/WebRtc.NET/include/webrtc/base/type_traits.h b/WebRtc.NET/include/webrtc/base/type_traits.h deleted file mode 100644 index d6a6c373..00000000 --- a/WebRtc.NET/include/webrtc/base/type_traits.h +++ /dev/null @@ -1,77 +0,0 @@ -/* - * Copyright 2016 The WebRTC Project Authors. All rights reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_BASE_TYPE_TRAITS_H_ -#define WEBRTC_BASE_TYPE_TRAITS_H_ - -#include -#include - -namespace rtc { - -// Determines if the given class has zero-argument .data() and .size() methods -// whose return values are convertible to T* and size_t, respectively. -template -class HasDataAndSize { - private: - template < - typename C, - typename std::enable_if< - std::is_convertible().data()), T*>::value && - std::is_convertible().size()), - std::size_t>::value>::type* = nullptr> - static int Test(int); - - template - static char Test(...); - - public: - static constexpr bool value = std::is_same(0)), int>::value; -}; - -namespace test_has_data_and_size { - -template -struct Test1 { - DR data(); - SR size(); -}; -static_assert(HasDataAndSize, int>::value, ""); -static_assert(HasDataAndSize, const int>::value, ""); -static_assert(HasDataAndSize, const int>::value, ""); -static_assert(!HasDataAndSize, int>::value, - "implicit cast of const int* to int*"); -static_assert(!HasDataAndSize, int>::value, - "implicit cast of char* to int*"); - -struct Test2 { - int* data; - size_t size; -}; -static_assert(!HasDataAndSize::value, - ".data and .size aren't functions"); - -struct Test3 { - int* data(); -}; -static_assert(!HasDataAndSize::value, ".size() is missing"); - -class Test4 { - int* data(); - size_t size(); -}; -static_assert(!HasDataAndSize::value, - ".data() and .size() are private"); - -} // namespace test_has_data_and_size - -} // namespace rtc - -#endif // WEBRTC_BASE_TYPE_TRAITS_H_ diff --git a/WebRtc.NET/include/webrtc/base/unixfilesystem.h b/WebRtc.NET/include/webrtc/base/unixfilesystem.h deleted file mode 100644 index e3710ec4..00000000 --- a/WebRtc.NET/include/webrtc/base/unixfilesystem.h +++ /dev/null @@ -1,117 +0,0 @@ -/* - * Copyright 2004 The WebRTC Project Authors. All rights reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_BASE_UNIXFILESYSTEM_H_ -#define WEBRTC_BASE_UNIXFILESYSTEM_H_ - -#include - -#include "webrtc/base/fileutils.h" - -namespace rtc { - -class UnixFilesystem : public FilesystemInterface { - public: - UnixFilesystem(); - ~UnixFilesystem() override; - -#if defined(WEBRTC_ANDROID) || defined(WEBRTC_MAC) - // Android does not have a native code API to fetch the app data or temp - // folders. That needs to be passed into this class from Java. Similarly, iOS - // only supports an Objective-C API for fetching the folder locations, so that - // needs to be passed in here from Objective-C. Or at least that used to be - // the case; now the ctor will do the work if necessary and possible. - // TODO(fischman): add an Android version that uses JNI and drop the - // SetApp*Folder() APIs once external users stop using them. - static void SetAppDataFolder(const std::string& folder); - static void SetAppTempFolder(const std::string& folder); -#endif - - // Opens a file. Returns an open StreamInterface if function succeeds. - // Otherwise, returns NULL. - FileStream* OpenFile(const Pathname& filename, - const std::string& mode) override; - - // This will attempt to delete the file located at filename. - // It will fail with VERIY if you pass it a non-existant file, or a directory. - bool DeleteFile(const Pathname& filename) override; - - // This will attempt to delete the folder located at 'folder' - // It ASSERTs and returns false if you pass it a non-existant folder or a - // plain file. - bool DeleteEmptyFolder(const Pathname& folder) override; - - // Creates a directory. This will call itself recursively to create /foo/bar - // even if /foo does not exist. All created directories are created with the - // given mode. - // Returns TRUE if function succeeds - virtual bool CreateFolder(const Pathname &pathname, mode_t mode); - - // As above, with mode = 0755. - bool CreateFolder(const Pathname& pathname) override; - - // This moves a file from old_path to new_path, where "file" can be a plain - // file or directory, which will be moved recursively. - // Returns true if function succeeds. - bool MoveFile(const Pathname& old_path, const Pathname& new_path) override; - - // This copies a file from old_path to _new_path where "file" can be a plain - // file or directory, which will be copied recursively. - // Returns true if function succeeds - bool CopyFile(const Pathname& old_path, const Pathname& new_path) override; - - // Returns true if a pathname is a directory - bool IsFolder(const Pathname& pathname) override; - - // Returns true if pathname represents a temporary location on the system. - bool IsTemporaryPath(const Pathname& pathname) override; - - // Returns true of pathname represents an existing file - bool IsFile(const Pathname& pathname) override; - - // Returns true if pathname refers to no filesystem object, every parent - // directory either exists, or is also absent. - bool IsAbsent(const Pathname& pathname) override; - - std::string TempFilename(const Pathname& dir, - const std::string& prefix) override; - - // A folder appropriate for storing temporary files (Contents are - // automatically deleted when the program exists) - bool GetTemporaryFolder(Pathname& path, - bool create, - const std::string* append) override; - - bool GetFileSize(const Pathname& path, size_t* size) override; - bool GetFileTime(const Pathname& path, - FileTimeType which, - time_t* time) override; - - bool GetAppDataFolder(Pathname* path, bool per_user) override; - - // Get a temporary folder that is unique to the current user and application. - bool GetAppTempFolder(Pathname* path) override; - - bool GetDiskFreeSpace(const Pathname& path, int64_t* freebytes) override; - - private: -#if defined(WEBRTC_ANDROID) || defined(WEBRTC_MAC) - static char* provided_app_data_folder_; - static char* provided_app_temp_folder_; -#else - static char* app_temp_path_; -#endif - - static char* CopyString(const std::string& str); -}; - -} // namespace rtc - -#endif // WEBRTC_BASE_UNIXFILESYSTEM_H_ diff --git a/WebRtc.NET/include/webrtc/base/weak_ptr.h b/WebRtc.NET/include/webrtc/base/weak_ptr.h deleted file mode 100644 index 28789d01..00000000 --- a/WebRtc.NET/include/webrtc/base/weak_ptr.h +++ /dev/null @@ -1,272 +0,0 @@ -/* - * Copyright 2016 The WebRTC Project Authors. All rights reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_BASE_WEAK_PTR_H_ -#define WEBRTC_BASE_WEAK_PTR_H_ - -#include - -#include - -#include "webrtc/base/refcount.h" -#include "webrtc/base/scoped_ref_ptr.h" -#include "webrtc/base/sequenced_task_checker.h" - -// The implementation is borrowed from chromium except that it does not -// implement SupportsWeakPtr. - -// Weak pointers are pointers to an object that do not affect its lifetime, -// and which may be invalidated (i.e. reset to nullptr) by the object, or its -// owner, at any time, most commonly when the object is about to be deleted. - -// Weak pointers are useful when an object needs to be accessed safely by one -// or more objects other than its owner, and those callers can cope with the -// object vanishing and e.g. tasks posted to it being silently dropped. -// Reference-counting such an object would complicate the ownership graph and -// make it harder to reason about the object's lifetime. - -// EXAMPLE: -// -// class Controller { -// public: -// Controller() : weak_factory_(this) {} -// void SpawnWorker() { Worker::StartNew(weak_factory_.GetWeakPtr()); } -// void WorkComplete(const Result& result) { ... } -// private: -// // Member variables should appear before the WeakPtrFactory, to ensure -// // that any WeakPtrs to Controller are invalidated before its members -// // variable's destructors are executed, rendering them invalid. -// WeakPtrFactory weak_factory_; -// }; -// -// class Worker { -// public: -// static void StartNew(const WeakPtr& controller) { -// Worker* worker = new Worker(controller); -// // Kick off asynchronous processing... -// } -// private: -// Worker(const WeakPtr& controller) -// : controller_(controller) {} -// void DidCompleteAsynchronousProcessing(const Result& result) { -// if (controller_) -// controller_->WorkComplete(result); -// } -// WeakPtr controller_; -// }; -// -// With this implementation a caller may use SpawnWorker() to dispatch multiple -// Workers and subsequently delete the Controller, without waiting for all -// Workers to have completed. - -// ------------------------- IMPORTANT: Thread-safety ------------------------- - -// Weak pointers may be passed safely between threads, but must always be -// dereferenced and invalidated on the same TaskQueue or thread, otherwise -// checking the pointer would be racey. -// -// To ensure correct use, the first time a WeakPtr issued by a WeakPtrFactory -// is dereferenced, the factory and its WeakPtrs become bound to the calling -// TaskQueue/thread, and cannot be dereferenced or -// invalidated on any other TaskQueue/thread. Bound WeakPtrs can still be handed -// off to other TaskQueues, e.g. to use to post tasks back to object on the -// bound sequence. -// -// Thus, at least one WeakPtr object must exist and have been dereferenced on -// the correct thread to enforce that other WeakPtr objects will enforce they -// are used on the desired thread. - -namespace rtc { - -namespace internal { - -class WeakReference { - public: - // Although Flag is bound to a specific sequence, it may be - // deleted from another via base::WeakPtr::~WeakPtr(). - class Flag : public RefCountInterface { - public: - Flag(); - - void Invalidate(); - bool IsValid() const; - - private: - friend class RefCountedObject; - - ~Flag() override; - - SequencedTaskChecker checker_; - bool is_valid_; - }; - - WeakReference(); - explicit WeakReference(const Flag* flag); - ~WeakReference(); - - WeakReference(WeakReference&& other); - WeakReference(const WeakReference& other); - WeakReference& operator=(WeakReference&& other) = default; - WeakReference& operator=(const WeakReference& other) = default; - - bool is_valid() const; - - private: - scoped_refptr flag_; -}; - -class WeakReferenceOwner { - public: - WeakReferenceOwner(); - ~WeakReferenceOwner(); - - WeakReference GetRef() const; - - bool HasRefs() const { return flag_.get() && !flag_->HasOneRef(); } - - void Invalidate(); - - private: - SequencedTaskChecker checker_; - mutable scoped_refptr> flag_; -}; - -// This class simplifies the implementation of WeakPtr's type conversion -// constructor by avoiding the need for a public accessor for ref_. A -// WeakPtr cannot access the private members of WeakPtr, so this -// base class gives us a way to access ref_ in a protected fashion. -class WeakPtrBase { - public: - WeakPtrBase(); - ~WeakPtrBase(); - - WeakPtrBase(const WeakPtrBase& other) = default; - WeakPtrBase(WeakPtrBase&& other) = default; - WeakPtrBase& operator=(const WeakPtrBase& other) = default; - WeakPtrBase& operator=(WeakPtrBase&& other) = default; - - protected: - explicit WeakPtrBase(const WeakReference& ref); - - WeakReference ref_; -}; - -} // namespace internal - -template -class WeakPtrFactory; - -template -class WeakPtr : public internal::WeakPtrBase { - public: - WeakPtr() : ptr_(nullptr) {} - - // Allow conversion from U to T provided U "is a" T. Note that this - // is separate from the (implicit) copy and move constructors. - template - WeakPtr(const WeakPtr& other) - : internal::WeakPtrBase(other), ptr_(other.ptr_) {} - template - WeakPtr(WeakPtr&& other) - : internal::WeakPtrBase(std::move(other)), ptr_(other.ptr_) {} - - T* get() const { return ref_.is_valid() ? ptr_ : nullptr; } - - T& operator*() const { - RTC_DCHECK(get() != nullptr); - return *get(); - } - T* operator->() const { - RTC_DCHECK(get() != nullptr); - return get(); - } - - void reset() { - ref_ = internal::WeakReference(); - ptr_ = nullptr; - } - - // Allow conditionals to test validity, e.g. if (weak_ptr) {...}; - explicit operator bool() const { return get() != nullptr; } - - private: - template - friend class WeakPtr; - friend class WeakPtrFactory; - - WeakPtr(const internal::WeakReference& ref, T* ptr) - : internal::WeakPtrBase(ref), ptr_(ptr) {} - - // This pointer is only valid when ref_.is_valid() is true. Otherwise, its - // value is undefined (as opposed to nullptr). - T* ptr_; -}; - -// Allow callers to compare WeakPtrs against nullptr to test validity. -template -bool operator!=(const WeakPtr& weak_ptr, std::nullptr_t) { - return !(weak_ptr == nullptr); -} -template -bool operator!=(std::nullptr_t, const WeakPtr& weak_ptr) { - return weak_ptr != nullptr; -} -template -bool operator==(const WeakPtr& weak_ptr, std::nullptr_t) { - return weak_ptr.get() == nullptr; -} -template -bool operator==(std::nullptr_t, const WeakPtr& weak_ptr) { - return weak_ptr == nullptr; -} - -// A class may be composed of a WeakPtrFactory and thereby -// control how it exposes weak pointers to itself. This is helpful if you only -// need weak pointers within the implementation of a class. This class is also -// useful when working with primitive types. For example, you could have a -// WeakPtrFactory that is used to pass around a weak reference to a bool. - -// Note that GetWeakPtr must be called on one and only one TaskQueue or thread -// and the WeakPtr must only be dereferenced and invalidated on that same -// TaskQueue/thread. A WeakPtr instance can be copied and posted to other -// sequences though as long as it is not dereferenced (WeakPtr::get()). -template -class WeakPtrFactory { - public: - explicit WeakPtrFactory(T* ptr) : ptr_(ptr) {} - - ~WeakPtrFactory() { ptr_ = nullptr; } - - WeakPtr GetWeakPtr() { - RTC_DCHECK(ptr_); - return WeakPtr(weak_reference_owner_.GetRef(), ptr_); - } - - // Call this method to invalidate all existing weak pointers. - void InvalidateWeakPtrs() { - RTC_DCHECK(ptr_); - weak_reference_owner_.Invalidate(); - } - - // Call this method to determine if any weak pointers exist. - bool HasWeakPtrs() const { - RTC_DCHECK(ptr_); - return weak_reference_owner_.HasRefs(); - } - - private: - internal::WeakReferenceOwner weak_reference_owner_; - T* ptr_; - RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(WeakPtrFactory); -}; - -} // namespace rtc - -#endif // WEBRTC_BASE_WEAK_PTR_H_ diff --git a/WebRtc.NET/include/webrtc/base/win32.h b/WebRtc.NET/include/webrtc/base/win32.h deleted file mode 100644 index dba9b773..00000000 --- a/WebRtc.NET/include/webrtc/base/win32.h +++ /dev/null @@ -1,132 +0,0 @@ -/* - * Copyright 2004 The WebRTC Project Authors. All rights reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_BASE_WIN32_H_ -#define WEBRTC_BASE_WIN32_H_ - -#if defined(WEBRTC_WIN) - -#ifndef WIN32_LEAN_AND_MEAN -#define WIN32_LEAN_AND_MEAN -#endif - -// Make sure we don't get min/max macros -#ifndef NOMINMAX -#define NOMINMAX -#endif - -#include -#include - -#ifndef SECURITY_MANDATORY_LABEL_AUTHORITY -// Add defines that we use if we are compiling against older sdks -#define SECURITY_MANDATORY_MEDIUM_RID (0x00002000L) -#define TokenIntegrityLevel static_cast(0x19) -typedef struct _TOKEN_MANDATORY_LABEL { - SID_AND_ATTRIBUTES Label; -} TOKEN_MANDATORY_LABEL, *PTOKEN_MANDATORY_LABEL; -#endif // SECURITY_MANDATORY_LABEL_AUTHORITY - -#undef SetPort - -#include - -#include "webrtc/base/stringutils.h" -#include "webrtc/base/basictypes.h" - -namespace rtc { - -const char* win32_inet_ntop(int af, const void *src, char* dst, socklen_t size); -int win32_inet_pton(int af, const char* src, void *dst); - -inline std::wstring ToUtf16(const char* utf8, size_t len) { - int len16 = ::MultiByteToWideChar(CP_UTF8, 0, utf8, static_cast(len), - NULL, 0); - wchar_t* ws = STACK_ARRAY(wchar_t, len16); - ::MultiByteToWideChar(CP_UTF8, 0, utf8, static_cast(len), ws, len16); - return std::wstring(ws, len16); -} - -inline std::wstring ToUtf16(const std::string& str) { - return ToUtf16(str.data(), str.length()); -} - -inline std::string ToUtf8(const wchar_t* wide, size_t len) { - int len8 = ::WideCharToMultiByte(CP_UTF8, 0, wide, static_cast(len), - NULL, 0, NULL, NULL); - char* ns = STACK_ARRAY(char, len8); - ::WideCharToMultiByte(CP_UTF8, 0, wide, static_cast(len), ns, len8, - NULL, NULL); - return std::string(ns, len8); -} - -inline std::string ToUtf8(const wchar_t* wide) { - return ToUtf8(wide, wcslen(wide)); -} - -inline std::string ToUtf8(const std::wstring& wstr) { - return ToUtf8(wstr.data(), wstr.length()); -} - -// Convert FILETIME to time_t -void FileTimeToUnixTime(const FILETIME& ft, time_t* ut); - -// Convert time_t to FILETIME -void UnixTimeToFileTime(const time_t& ut, FILETIME * ft); - -// Convert a Utf8 path representation to a non-length-limited Unicode pathname. -bool Utf8ToWindowsFilename(const std::string& utf8, std::wstring* filename); - -// Convert a FILETIME to a UInt64 -inline uint64_t ToUInt64(const FILETIME& ft) { - ULARGE_INTEGER r = {{ft.dwLowDateTime, ft.dwHighDateTime}}; - return r.QuadPart; -} - -enum WindowsMajorVersions { - kWindows2000 = 5, - kWindowsVista = 6, -}; -bool GetOsVersion(int* major, int* minor, int* build); - -inline bool IsWindowsVistaOrLater() { - int major; - return (GetOsVersion(&major, NULL, NULL) && major >= kWindowsVista); -} - -inline bool IsWindowsXpOrLater() { - int major, minor; - return (GetOsVersion(&major, &minor, NULL) && - (major >= kWindowsVista || - (major == kWindows2000 && minor >= 1))); -} - -inline bool IsWindows8OrLater() { - int major, minor; - return (GetOsVersion(&major, &minor, NULL) && - (major > kWindowsVista || - (major == kWindowsVista && minor >= 2))); -} - -// Determine the current integrity level of the process. -bool GetCurrentProcessIntegrityLevel(int* level); - -inline bool IsCurrentProcessLowIntegrity() { - int level; - return (GetCurrentProcessIntegrityLevel(&level) && - level < SECURITY_MANDATORY_MEDIUM_RID); -} - -bool AdjustCurrentProcessPrivilege(const TCHAR* privilege, bool to_enable); - -} // namespace rtc - -#endif // WEBRTC_WIN -#endif // WEBRTC_BASE_WIN32_H_ diff --git a/WebRtc.NET/include/webrtc/base/win32filesystem.h b/WebRtc.NET/include/webrtc/base/win32filesystem.h deleted file mode 100644 index e81def31..00000000 --- a/WebRtc.NET/include/webrtc/base/win32filesystem.h +++ /dev/null @@ -1,91 +0,0 @@ -/* - * Copyright 2004 The WebRTC Project Authors. All rights reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef _WEBRTC_BASE_WIN32FILESYSTEM_H__ -#define _WEBRTC_BASE_WIN32FILESYSTEM_H__ - -#include "fileutils.h" - -namespace rtc { - -class Win32Filesystem : public FilesystemInterface { - public: - // Opens a file. Returns an open StreamInterface if function succeeds. Otherwise, - // returns NULL. - virtual FileStream *OpenFile(const Pathname &filename, - const std::string &mode); - - // This will attempt to delete the path located at filename. - // If the path points to a folder, it will fail with VERIFY - virtual bool DeleteFile(const Pathname &filename); - - // This will attempt to delete an empty folder. If the path does not point to - // a folder, it fails with VERIFY. If the folder is not empty, it fails normally - virtual bool DeleteEmptyFolder(const Pathname &folder); - - // Creates a directory. This will call itself recursively to create /foo/bar even if - // /foo does not exist. - // Returns TRUE if function succeeds - virtual bool CreateFolder(const Pathname &pathname); - - // This moves a file from old_path to new_path. If the new path is on a - // different volume than the old, it will attempt to copy and then delete - // the folder - // Returns true if the file is successfully moved - virtual bool MoveFile(const Pathname &old_path, const Pathname &new_path); - - // This copies a file from old_path to _new_path - // Returns true if function succeeds - virtual bool CopyFile(const Pathname &old_path, const Pathname &new_path); - - // Returns true if a pathname is a directory - virtual bool IsFolder(const Pathname& pathname); - - // Returns true if a file exists at path - virtual bool IsFile(const Pathname &path); - - // Returns true if pathname refers to no filesystem object, every parent - // directory either exists, or is also absent. - virtual bool IsAbsent(const Pathname& pathname); - - // Returns true if pathname represents a temporary location on the system. - virtual bool IsTemporaryPath(const Pathname& pathname); - - // All of the following functions set pathname and return true if successful. - // Returned paths always include a trailing backslash. - // If create is true, the path will be recursively created. - // If append is non-NULL, it will be appended (and possibly created). - - virtual std::string TempFilename(const Pathname &dir, const std::string &prefix); - - virtual bool GetFileSize(const Pathname& path, size_t* size); - virtual bool GetFileTime(const Pathname& path, FileTimeType which, - time_t* time); - - // A folder appropriate for storing temporary files (Contents are - // automatically deleted when the program exists) - virtual bool GetTemporaryFolder(Pathname &path, bool create, - const std::string *append); - - virtual bool GetAppDataFolder(Pathname* path, bool per_user); - - // Get a temporary folder that is unique to the current user and application. - virtual bool GetAppTempFolder(Pathname* path); - - virtual bool GetDiskFreeSpace(const Pathname& path, int64_t* free_bytes); - - private: - // Returns the path to the running application. - bool GetAppPathname(Pathname* path); -}; - -} // namespace rtc - -#endif // WEBRTC_WINFILESYSTEM_H__ diff --git a/WebRtc.NET/include/webrtc/base/win32socketserver.h b/WebRtc.NET/include/webrtc/base/win32socketserver.h deleted file mode 100644 index 28bee6af..00000000 --- a/WebRtc.NET/include/webrtc/base/win32socketserver.h +++ /dev/null @@ -1,167 +0,0 @@ -/* - * Copyright 2004 The WebRTC Project Authors. All rights reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_BASE_WIN32SOCKETSERVER_H_ -#define WEBRTC_BASE_WIN32SOCKETSERVER_H_ - -#if defined(WEBRTC_WIN) -#include "webrtc/base/asyncsocket.h" -#include "webrtc/base/criticalsection.h" -#include "webrtc/base/messagequeue.h" -#include "webrtc/base/socketserver.h" -#include "webrtc/base/socketfactory.h" -#include "webrtc/base/socket.h" -#include "webrtc/base/thread.h" -#include "webrtc/base/win32window.h" - -namespace rtc { - -/////////////////////////////////////////////////////////////////////////////// -// Win32Socket -/////////////////////////////////////////////////////////////////////////////// - -class Win32Socket : public AsyncSocket { - public: - Win32Socket(); - virtual ~Win32Socket(); - - bool CreateT(int family, int type); - - int Attach(SOCKET s); - void SetTimeout(int ms); - - // AsyncSocket Interface - virtual SocketAddress GetLocalAddress() const; - virtual SocketAddress GetRemoteAddress() const; - virtual int Bind(const SocketAddress& addr); - virtual int Connect(const SocketAddress& addr); - virtual int Send(const void *buffer, size_t length); - virtual int SendTo(const void *buffer, size_t length, const SocketAddress& addr); - virtual int Recv(void* buffer, size_t length, int64_t* timestamp); - virtual int RecvFrom(void* buffer, - size_t length, - SocketAddress* out_addr, - int64_t* timestamp); - virtual int Listen(int backlog); - virtual Win32Socket *Accept(SocketAddress *out_addr); - virtual int Close(); - virtual int GetError() const; - virtual void SetError(int error); - virtual ConnState GetState() const; - virtual int EstimateMTU(uint16_t* mtu); - virtual int GetOption(Option opt, int* value); - virtual int SetOption(Option opt, int value); - - private: - void CreateSink(); - bool SetAsync(int events); - int DoConnect(const SocketAddress& addr); - bool HandleClosed(int close_error); - void PostClosed(); - void UpdateLastError(); - static int TranslateOption(Option opt, int* slevel, int* sopt); - - void OnSocketNotify(SOCKET socket, int event, int error); - void OnDnsNotify(HANDLE task, int error); - - SOCKET socket_; - int error_; - ConnState state_; - SocketAddress addr_; // address that we connected to (see DoConnect) - uint32_t connect_time_; - bool closing_; - int close_error_; - - class EventSink; - friend class EventSink; - EventSink * sink_; - - struct DnsLookup; - DnsLookup * dns_; -}; - -/////////////////////////////////////////////////////////////////////////////// -// Win32SocketServer -/////////////////////////////////////////////////////////////////////////////// - -class Win32SocketServer : public SocketServer { - public: - explicit Win32SocketServer(MessageQueue* message_queue); - virtual ~Win32SocketServer(); - - void set_modeless_dialog(HWND hdlg) { - hdlg_ = hdlg; - } - - // SocketServer Interface - virtual Socket* CreateSocket(int type); - virtual Socket* CreateSocket(int family, int type); - - virtual AsyncSocket* CreateAsyncSocket(int type); - virtual AsyncSocket* CreateAsyncSocket(int family, int type); - - virtual void SetMessageQueue(MessageQueue* queue); - virtual bool Wait(int cms, bool process_io); - virtual void WakeUp(); - - void Pump(); - - HWND handle() { return wnd_.handle(); } - - private: - class MessageWindow : public Win32Window { - public: - explicit MessageWindow(Win32SocketServer* ss) : ss_(ss) {} - private: - virtual bool OnMessage(UINT msg, WPARAM wp, LPARAM lp, LRESULT& result); - Win32SocketServer* ss_; - }; - - static const TCHAR kWindowName[]; - MessageQueue *message_queue_; - MessageWindow wnd_; - CriticalSection cs_; - bool posted_; - HWND hdlg_; -}; - -/////////////////////////////////////////////////////////////////////////////// -// Win32Thread. Automatically pumps Windows messages. -/////////////////////////////////////////////////////////////////////////////// - -class Win32Thread : public Thread { - public: - Win32Thread() : ss_(this), id_(0) { - set_socketserver(&ss_); - } - virtual ~Win32Thread() { - Stop(); - set_socketserver(NULL); - } - virtual void Run() { - id_ = GetCurrentThreadId(); - Thread::Run(); - id_ = 0; - } - virtual void Quit() { - PostThreadMessage(id_, WM_QUIT, 0, 0); - } - private: - Win32SocketServer ss_; - DWORD id_; -}; - -/////////////////////////////////////////////////////////////////////////////// - -} // namespace rtc - -#endif // WEBRTC_WIN - -#endif // WEBRTC_BASE_WIN32SOCKETSERVER_H_ diff --git a/WebRtc.NET/include/webrtc/base/win32window.h b/WebRtc.NET/include/webrtc/base/win32window.h deleted file mode 100644 index c0ba6b23..00000000 --- a/WebRtc.NET/include/webrtc/base/win32window.h +++ /dev/null @@ -1,60 +0,0 @@ -/* - * Copyright 2004 The WebRTC Project Authors. All rights reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_BASE_WIN32WINDOW_H_ -#define WEBRTC_BASE_WIN32WINDOW_H_ - -#if defined(WEBRTC_WIN) - -#include "webrtc/base/win32.h" - -namespace rtc { - -/////////////////////////////////////////////////////////////////////////////// -// Win32Window -/////////////////////////////////////////////////////////////////////////////// - -class Win32Window { - public: - Win32Window(); - virtual ~Win32Window(); - - HWND handle() const { return wnd_; } - - bool Create(HWND parent, const wchar_t* title, DWORD style, DWORD exstyle, - int x, int y, int cx, int cy); - void Destroy(); - - // Call this when your DLL unloads. - static void Shutdown(); - - protected: - virtual bool OnMessage(UINT uMsg, WPARAM wParam, LPARAM lParam, - LRESULT& result); - - virtual bool OnClose() { return true; } - virtual void OnNcDestroy() { } - - private: - static LRESULT CALLBACK WndProc(HWND hwnd, UINT uMsg, WPARAM wParam, - LPARAM lParam); - - HWND wnd_; - static HINSTANCE instance_; - static ATOM window_class_; -}; - -/////////////////////////////////////////////////////////////////////////////// - -} // namespace rtc - -#endif // WEBRTC_WIN - -#endif // WEBRTC_BASE_WIN32WINDOW_H_ diff --git a/WebRtc.NET/include/webrtc/base/window.h b/WebRtc.NET/include/webrtc/base/window.h deleted file mode 100644 index e5b5d508..00000000 --- a/WebRtc.NET/include/webrtc/base/window.h +++ /dev/null @@ -1,126 +0,0 @@ -/* - * Copyright 2004 The WebRTC Project Authors. All rights reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_BASE_WINDOW_H_ -#define WEBRTC_BASE_WINDOW_H_ - -#include - -#include "webrtc/base/stringencode.h" - -// Define platform specific window types. -#if defined(WEBRTC_LINUX) && !defined(WEBRTC_ANDROID) -typedef unsigned long Window; // Avoid include . -#elif defined(WEBRTC_WIN) -// We commonly include win32.h in webrtc/base so just include it here. -#include "webrtc/base/win32.h" // Include HWND, HMONITOR. -#elif defined(WEBRTC_MAC) && !defined(WEBRTC_IOS) -typedef unsigned int CGWindowID; -typedef unsigned int CGDirectDisplayID; -#endif - -namespace rtc { - -class WindowId { - public: - // Define WindowT for each platform. -#if defined(WEBRTC_LINUX) && !defined(WEBRTC_ANDROID) - typedef Window WindowT; -#elif defined(WEBRTC_WIN) - typedef HWND WindowT; -#elif defined(WEBRTC_MAC) && !defined(WEBRTC_IOS) - typedef CGWindowID WindowT; -#else - typedef unsigned int WindowT; -#endif - - static WindowId Cast(uint64_t id) { -#if defined(WEBRTC_WIN) - return WindowId(reinterpret_cast(id)); -#else - return WindowId(static_cast(id)); -#endif - } - - static uint64_t Format(const WindowT& id) { -#if defined(WEBRTC_WIN) - return static_cast(reinterpret_cast(id)); -#else - return static_cast(id); -#endif - } - - WindowId() : id_(0) {} - WindowId(const WindowT& id) : id_(id) {} // NOLINT - const WindowT& id() const { return id_; } - bool IsValid() const { return id_ != 0; } - bool Equals(const WindowId& other) const { - return id_ == other.id(); - } - - private: - WindowT id_; -}; - -class DesktopId { - public: - // Define DesktopT for each platform. -#if defined(WEBRTC_LINUX) && !defined(WEBRTC_ANDROID) - typedef Window DesktopT; -#elif defined(WEBRTC_WIN) - typedef HMONITOR DesktopT; -#elif defined(WEBRTC_MAC) && !defined(WEBRTC_IOS) - typedef CGDirectDisplayID DesktopT; -#else - typedef unsigned int DesktopT; -#endif - - static DesktopId Cast(int id, int index) { -#if defined(WEBRTC_WIN) - return DesktopId(reinterpret_cast(id), index); -#else - return DesktopId(static_cast(id), index); -#endif - } - - DesktopId() : id_(0), index_(-1) {} - DesktopId(const DesktopT& id, int index) // NOLINT - : id_(id), index_(index) { - } - const DesktopT& id() const { return id_; } - int index() const { return index_; } - bool IsValid() const { return index_ != -1; } - bool Equals(const DesktopId& other) const { - return id_ == other.id() && index_ == other.index(); - } - - private: - // Id is the platform specific desktop identifier. - DesktopT id_; - // Index is the desktop index as enumerated by each platform. - // Desktop capturer typically takes the index instead of id. - int index_; -}; - -// Window event types. -enum WindowEvent { - WE_RESIZE = 0, - WE_CLOSE = 1, - WE_MINIMIZE = 2, - WE_RESTORE = 3, -}; - -inline std::string ToString(const WindowId& window) { - return ToString(window.id()); -} - -} // namespace rtc - -#endif // WEBRTC_BASE_WINDOW_H_ diff --git a/WebRtc.NET/include/webrtc/base/winping.h b/WebRtc.NET/include/webrtc/base/winping.h deleted file mode 100644 index de79b85e..00000000 --- a/WebRtc.NET/include/webrtc/base/winping.h +++ /dev/null @@ -1,105 +0,0 @@ -/* - * Copyright 2004 The WebRTC Project Authors. All rights reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_BASE_WINPING_H__ -#define WEBRTC_BASE_WINPING_H__ - -#if defined(WEBRTC_WIN) - -#include "webrtc/base/win32.h" -#include "webrtc/base/basictypes.h" -#include "webrtc/base/ipaddress.h" - -namespace rtc { - -// This class wraps a Win32 API for doing ICMP pinging. This API, unlike the -// the normal socket APIs (as implemented on Win9x), will return an error if -// an ICMP packet with the dont-fragment bit set is too large. This means this -// class can be used to detect the MTU to a given address. - -typedef struct ip_option_information { - UCHAR Ttl; // Time To Live - UCHAR Tos; // Type Of Service - UCHAR Flags; // IP header flags - UCHAR OptionsSize; // Size in bytes of options data - PUCHAR OptionsData; // Pointer to options data -} IP_OPTION_INFORMATION, * PIP_OPTION_INFORMATION; - -typedef HANDLE (WINAPI *PIcmpCreateFile)(); - -typedef BOOL (WINAPI *PIcmpCloseHandle)(HANDLE icmp_handle); - -typedef HANDLE (WINAPI *PIcmp6CreateFile)(); - -typedef BOOL (WINAPI *PIcmp6CloseHandle)(HANDLE icmp_handle); - -typedef DWORD (WINAPI *PIcmpSendEcho)( - HANDLE IcmpHandle, - ULONG DestinationAddress, - LPVOID RequestData, - WORD RequestSize, - PIP_OPTION_INFORMATION RequestOptions, - LPVOID ReplyBuffer, - DWORD ReplySize, - DWORD Timeout); - -typedef DWORD (WINAPI *PIcmp6SendEcho2)( - HANDLE IcmpHandle, - HANDLE Event, - FARPROC ApcRoutine, - PVOID ApcContext, - struct sockaddr_in6 *SourceAddress, - struct sockaddr_in6 *DestinationAddress, - LPVOID RequestData, - WORD RequestSize, - PIP_OPTION_INFORMATION RequestOptions, - LPVOID ReplyBuffer, - DWORD ReplySize, - DWORD Timeout -); - -class WinPing { -public: - WinPing(); - ~WinPing(); - - // Determines whether the class was initialized correctly. - bool IsValid() { return valid_; } - - // Attempts to send a ping with the given parameters. - enum PingResult { PING_FAIL, PING_INVALID_PARAMS, - PING_TOO_LARGE, PING_TIMEOUT, PING_SUCCESS }; - PingResult Ping(IPAddress ip, - uint32_t data_size, - uint32_t timeout_millis, - uint8_t ttl, - bool allow_fragments); - -private: - HMODULE dll_; - HANDLE hping_; - HANDLE hping6_; - PIcmpCreateFile create_; - PIcmpCloseHandle close_; - PIcmpSendEcho send_; - PIcmp6CreateFile create6_; - PIcmp6SendEcho2 send6_; - char* data_; - uint32_t dlen_; - char* reply_; - uint32_t rlen_; - bool valid_; -}; - -} // namespace rtc - -#endif // WEBRTC_WIN - -#endif // WEBRTC_BASE_WINPING_H__ diff --git a/WebRtc.NET/include/webrtc/build/ios/SDK/PodTest/PodTest/AppDelegate.h b/WebRtc.NET/include/webrtc/build/ios/SDK/PodTest/PodTest/AppDelegate.h deleted file mode 100644 index de2cc046..00000000 --- a/WebRtc.NET/include/webrtc/build/ios/SDK/PodTest/PodTest/AppDelegate.h +++ /dev/null @@ -1,17 +0,0 @@ -/* - * Copyright 2016 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#import - -@interface AppDelegate : UIResponder - -@property (strong, nonatomic) UIWindow *window; - -@end diff --git a/WebRtc.NET/include/webrtc/build/ios/SDK/PodTest/PodTest/ViewController.h b/WebRtc.NET/include/webrtc/build/ios/SDK/PodTest/PodTest/ViewController.h deleted file mode 100644 index bdf8f318..00000000 --- a/WebRtc.NET/include/webrtc/build/ios/SDK/PodTest/PodTest/ViewController.h +++ /dev/null @@ -1,15 +0,0 @@ -/* - * Copyright 2016 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#import - -@interface ViewController : UIViewController - -@end diff --git a/WebRtc.NET/include/webrtc/call.h b/WebRtc.NET/include/webrtc/call.h deleted file mode 100644 index afea9ddd..00000000 --- a/WebRtc.NET/include/webrtc/call.h +++ /dev/null @@ -1,13 +0,0 @@ -/* - * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -// This file is deprecated. It has been moved to the location below. Please -// update your includes! See: http://bugs.webrtc.org/6716 -#include "webrtc/call/call.h" diff --git a/WebRtc.NET/include/webrtc/call/audio_receive_stream.h b/WebRtc.NET/include/webrtc/call/audio_receive_stream.h deleted file mode 100644 index 38416725..00000000 --- a/WebRtc.NET/include/webrtc/call/audio_receive_stream.h +++ /dev/null @@ -1,139 +0,0 @@ -/* - * Copyright (c) 2015 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_CALL_AUDIO_RECEIVE_STREAM_H_ -#define WEBRTC_CALL_AUDIO_RECEIVE_STREAM_H_ - -#include -#include -#include -#include - -#include "webrtc/api/call/transport.h" -#include "webrtc/base/optional.h" -#include "webrtc/base/scoped_ref_ptr.h" -#include "webrtc/modules/audio_coding/codecs/audio_decoder_factory.h" -#include "webrtc/common_types.h" -#include "webrtc/config.h" -#include "webrtc/typedefs.h" - -namespace webrtc { -class AudioSinkInterface; - -// WORK IN PROGRESS -// This class is under development and is not yet intended for for use outside -// of WebRtc/Libjingle. Please use the VoiceEngine API instead. -// See: https://bugs.chromium.org/p/webrtc/issues/detail?id=4690 - -class AudioReceiveStream { - public: - struct Stats { - uint32_t remote_ssrc = 0; - int64_t bytes_rcvd = 0; - uint32_t packets_rcvd = 0; - uint32_t packets_lost = 0; - float fraction_lost = 0.0f; - std::string codec_name; - rtc::Optional codec_payload_type; - uint32_t ext_seqnum = 0; - uint32_t jitter_ms = 0; - uint32_t jitter_buffer_ms = 0; - uint32_t jitter_buffer_preferred_ms = 0; - uint32_t delay_estimate_ms = 0; - int32_t audio_level = -1; - float expand_rate = 0.0f; - float speech_expand_rate = 0.0f; - float secondary_decoded_rate = 0.0f; - float accelerate_rate = 0.0f; - float preemptive_expand_rate = 0.0f; - int32_t decoding_calls_to_silence_generator = 0; - int32_t decoding_calls_to_neteq = 0; - int32_t decoding_normal = 0; - int32_t decoding_plc = 0; - int32_t decoding_cng = 0; - int32_t decoding_plc_cng = 0; - int32_t decoding_muted_output = 0; - int64_t capture_start_ntp_time_ms = 0; - }; - - struct Config { - std::string ToString() const; - - // Receive-stream specific RTP settings. - struct Rtp { - std::string ToString() const; - - // Synchronization source (stream identifier) to be received. - uint32_t remote_ssrc = 0; - - // Sender SSRC used for sending RTCP (such as receiver reports). - uint32_t local_ssrc = 0; - - // Enable feedback for send side bandwidth estimation. - // See - // https://tools.ietf.org/html/draft-holmer-rmcat-transport-wide-cc-extensions - // for details. - bool transport_cc = false; - - // See NackConfig for description. - NackConfig nack; - - // RTP header extensions used for the received stream. - std::vector extensions; - } rtp; - - Transport* rtcp_send_transport = nullptr; - - // Underlying VoiceEngine handle, used to map AudioReceiveStream to lower- - // level components. - // TODO(solenberg): Remove when VoiceEngine channels are created outside - // of Call. - int voe_channel_id = -1; - - // Identifier for an A/V synchronization group. Empty string to disable. - // TODO(pbos): Synchronize streams in a sync group, not just one video - // stream to one audio stream. Tracked by issue webrtc:4762. - std::string sync_group; - - // Decoder specifications for every payload type that we can receive. - std::map decoder_map; - - rtc::scoped_refptr decoder_factory; - }; - - // Starts stream activity. - // When a stream is active, it can receive, process and deliver packets. - virtual void Start() = 0; - // Stops stream activity. - // When a stream is stopped, it can't receive, process or deliver packets. - virtual void Stop() = 0; - - virtual Stats GetStats() const = 0; - - // Sets an audio sink that receives unmixed audio from the receive stream. - // Ownership of the sink is passed to the stream and can be used by the - // caller to do lifetime management (i.e. when the sink's dtor is called). - // Only one sink can be set and passing a null sink clears an existing one. - // NOTE: Audio must still somehow be pulled through AudioTransport for audio - // to stream through this sink. In practice, this happens if mixed audio - // is being pulled+rendered and/or if audio is being pulled for the purposes - // of feeding to the AEC. - virtual void SetSink(std::unique_ptr sink) = 0; - - // Sets playback gain of the stream, applied when mixing, and thus after it - // is potentially forwarded to any attached AudioSinkInterface implementation. - virtual void SetGain(float gain) = 0; - - protected: - virtual ~AudioReceiveStream() {} -}; -} // namespace webrtc - -#endif // WEBRTC_CALL_AUDIO_RECEIVE_STREAM_H_ diff --git a/WebRtc.NET/include/webrtc/call/audio_send_stream.h b/WebRtc.NET/include/webrtc/call/audio_send_stream.h deleted file mode 100644 index 42914301..00000000 --- a/WebRtc.NET/include/webrtc/call/audio_send_stream.h +++ /dev/null @@ -1,146 +0,0 @@ -/* - * Copyright (c) 2015 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_CALL_AUDIO_SEND_STREAM_H_ -#define WEBRTC_CALL_AUDIO_SEND_STREAM_H_ - -#include -#include -#include - -#include "webrtc/api/call/transport.h" -#include "webrtc/base/optional.h" -#include "webrtc/config.h" -#include "webrtc/modules/audio_coding/codecs/audio_encoder.h" -#include "webrtc/typedefs.h" - -namespace webrtc { - -// WORK IN PROGRESS -// This class is under development and is not yet intended for for use outside -// of WebRtc/Libjingle. Please use the VoiceEngine API instead. -// See: https://bugs.chromium.org/p/webrtc/issues/detail?id=4690 - -class AudioSendStream { - public: - struct Stats { - Stats(); - ~Stats(); - - // TODO(solenberg): Harmonize naming and defaults with receive stream stats. - uint32_t local_ssrc = 0; - int64_t bytes_sent = 0; - int32_t packets_sent = 0; - int32_t packets_lost = -1; - float fraction_lost = -1.0f; - std::string codec_name; - rtc::Optional codec_payload_type; - int32_t ext_seqnum = -1; - int32_t jitter_ms = -1; - int64_t rtt_ms = -1; - int32_t audio_level = -1; - float aec_quality_min = -1.0f; - int32_t echo_delay_median_ms = -1; - int32_t echo_delay_std_ms = -1; - int32_t echo_return_loss = -100; - int32_t echo_return_loss_enhancement = -100; - float residual_echo_likelihood = -1.0f; - float residual_echo_likelihood_recent_max = -1.0f; - bool typing_noise_detected = false; - }; - - struct Config { - Config() = delete; - explicit Config(Transport* send_transport); - ~Config(); - std::string ToString() const; - - // Send-stream specific RTP settings. - struct Rtp { - Rtp(); - ~Rtp(); - std::string ToString() const; - - // Sender SSRC. - uint32_t ssrc = 0; - - // RTP header extensions used for the sent stream. - std::vector extensions; - - // See NackConfig for description. - NackConfig nack; - - // RTCP CNAME, see RFC 3550. - std::string c_name; - } rtp; - - // Transport for outgoing packets. The transport is expected to exist for - // the entire life of the AudioSendStream and is owned by the API client. - Transport* send_transport = nullptr; - - // Underlying VoiceEngine handle, used to map AudioSendStream to lower-level - // components. - // TODO(solenberg): Remove when VoiceEngine channels are created outside - // of Call. - int voe_channel_id = -1; - - // Bitrate limits used for variable audio bitrate streams. Set both to -1 to - // disable audio bitrate adaptation. - // Note: This is still an experimental feature and not ready for real usage. - int min_bitrate_bps = -1; - int max_bitrate_bps = -1; - - // Defines whether to turn on audio network adaptor, and defines its config - // string. - rtc::Optional audio_network_adaptor_config; - - struct SendCodecSpec { - SendCodecSpec(); - std::string ToString() const; - - bool operator==(const SendCodecSpec& rhs) const; - bool operator!=(const SendCodecSpec& rhs) const { - return !(*this == rhs); - } - - bool nack_enabled = false; - bool transport_cc_enabled = false; - bool enable_codec_fec = false; - bool enable_opus_dtx = false; - int opus_max_playback_rate = 0; - int cng_payload_type = -1; - int cng_plfreq = -1; - int max_ptime_ms = -1; - int min_ptime_ms = -1; - webrtc::CodecInst codec_inst; - } send_codec_spec; - }; - - // Starts stream activity. - // When a stream is active, it can receive, process and deliver packets. - virtual void Start() = 0; - // Stops stream activity. - // When a stream is stopped, it can't receive, process or deliver packets. - virtual void Stop() = 0; - - // TODO(solenberg): Make payload_type a config property instead. - virtual bool SendTelephoneEvent(int payload_type, int payload_frequency, - int event, int duration_ms) = 0; - - virtual void SetMuted(bool muted) = 0; - - virtual Stats GetStats() const = 0; - - protected: - virtual ~AudioSendStream() {} -}; -} // namespace webrtc - -#endif // WEBRTC_CALL_AUDIO_SEND_STREAM_H_ diff --git a/WebRtc.NET/include/webrtc/call/audio_state.h b/WebRtc.NET/include/webrtc/call/audio_state.h deleted file mode 100644 index 2c26a174..00000000 --- a/WebRtc.NET/include/webrtc/call/audio_state.h +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Copyright (c) 2015 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ -#ifndef WEBRTC_CALL_AUDIO_STATE_H_ -#define WEBRTC_CALL_AUDIO_STATE_H_ - -#include "webrtc/api/audio/audio_mixer.h" -#include "webrtc/base/refcount.h" -#include "webrtc/base/scoped_ref_ptr.h" - -namespace webrtc { - -class VoiceEngine; - -// WORK IN PROGRESS -// This class is under development and is not yet intended for for use outside -// of WebRtc/Libjingle. Please use the VoiceEngine API instead. -// See: https://bugs.chromium.org/p/webrtc/issues/detail?id=4690 - -// AudioState holds the state which must be shared between multiple instances of -// webrtc::Call for audio processing purposes. -class AudioState : public rtc::RefCountInterface { - public: - struct Config { - // VoiceEngine used for audio streams and audio/video synchronization. - // AudioState will tickle the VoE refcount to keep it alive for as long as - // the AudioState itself. - VoiceEngine* voice_engine = nullptr; - - // The audio mixer connected to active receive streams. One per - // AudioState. - rtc::scoped_refptr audio_mixer; - }; - - // TODO(solenberg): Replace scoped_refptr with shared_ptr once we can use it. - static rtc::scoped_refptr Create( - const AudioState::Config& config); - - virtual ~AudioState() {} -}; -} // namespace webrtc - -#endif // WEBRTC_CALL_AUDIO_STATE_H_ diff --git a/WebRtc.NET/include/webrtc/call/bitrate_allocator.h b/WebRtc.NET/include/webrtc/call/bitrate_allocator.h deleted file mode 100644 index cd3b2e16..00000000 --- a/WebRtc.NET/include/webrtc/call/bitrate_allocator.h +++ /dev/null @@ -1,170 +0,0 @@ -/* - * Copyright (c) 2015 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_CALL_BITRATE_ALLOCATOR_H_ -#define WEBRTC_CALL_BITRATE_ALLOCATOR_H_ - -#include - -#include -#include -#include - -#include "webrtc/base/sequenced_task_checker.h" - -namespace webrtc { - -class Clock; - -// Used by all send streams with adaptive bitrate, to get the currently -// allocated bitrate for the send stream. The current network properties are -// given at the same time, to let the send stream decide about possible loss -// protection. -class BitrateAllocatorObserver { - public: - // Returns the amount of protection used by the BitrateAllocatorObserver - // implementation, as bitrate in bps. - virtual uint32_t OnBitrateUpdated(uint32_t bitrate_bps, - uint8_t fraction_loss, - int64_t rtt, - int64_t probing_interval_ms) = 0; - - protected: - virtual ~BitrateAllocatorObserver() {} -}; - -// Usage: this class will register multiple RtcpBitrateObserver's one at each -// RTCP module. It will aggregate the results and run one bandwidth estimation -// and push the result to the encoders via BitrateAllocatorObserver(s). -class BitrateAllocator { - public: - // Used to get notified when send stream limits such as the minimum send - // bitrate and max padding bitrate is changed. - class LimitObserver { - public: - virtual void OnAllocationLimitsChanged( - uint32_t min_send_bitrate_bps, - uint32_t max_padding_bitrate_bps) = 0; - - protected: - virtual ~LimitObserver() {} - }; - - explicit BitrateAllocator(LimitObserver* limit_observer); - ~BitrateAllocator(); - - // Allocate target_bitrate across the registered BitrateAllocatorObservers. - void OnNetworkChanged(uint32_t target_bitrate_bps, - uint8_t fraction_loss, - int64_t rtt, - int64_t probing_interval_ms); - - // Set the start and max send bitrate used by the bandwidth management. - // - // |observer| updates bitrates if already in use. - // |min_bitrate_bps| = 0 equals no min bitrate. - // |max_bitrate_bps| = 0 equals no max bitrate. - // |enforce_min_bitrate| = 'true' will allocate at least |min_bitrate_bps| for - // this observer, even if the BWE is too low, 'false' will allocate 0 to - // the observer if BWE doesn't allow |min_bitrate_bps|. - // Note that |observer|->OnBitrateUpdated() will be called within the scope of - // this method with the current rtt, fraction_loss and available bitrate and - // that the bitrate in OnBitrateUpdated will be zero if the |observer| is - // currently not allowed to send data. - void AddObserver(BitrateAllocatorObserver* observer, - uint32_t min_bitrate_bps, - uint32_t max_bitrate_bps, - uint32_t pad_up_bitrate_bps, - bool enforce_min_bitrate); - - // Removes a previously added observer, but will not trigger a new bitrate - // allocation. - void RemoveObserver(BitrateAllocatorObserver* observer); - - // Returns initial bitrate allocated for |observer|. If |observer| is not in - // the list of added observers, a best guess is returned. - int GetStartBitrate(BitrateAllocatorObserver* observer); - - private: - // Note: All bitrates for member variables and methods are in bps. - struct ObserverConfig { - ObserverConfig(BitrateAllocatorObserver* observer, - uint32_t min_bitrate_bps, - uint32_t max_bitrate_bps, - uint32_t pad_up_bitrate_bps, - bool enforce_min_bitrate) - : observer(observer), - min_bitrate_bps(min_bitrate_bps), - max_bitrate_bps(max_bitrate_bps), - pad_up_bitrate_bps(pad_up_bitrate_bps), - enforce_min_bitrate(enforce_min_bitrate), - allocated_bitrate_bps(-1), - media_ratio(1.0) {} - - BitrateAllocatorObserver* observer; - uint32_t min_bitrate_bps; - uint32_t max_bitrate_bps; - uint32_t pad_up_bitrate_bps; - bool enforce_min_bitrate; - int64_t allocated_bitrate_bps; - double media_ratio; // Part of the total bitrate used for media [0.0, 1.0]. - }; - - // Calculates the minimum requested send bitrate and max padding bitrate and - // calls LimitObserver::OnAllocationLimitsChanged. - void UpdateAllocationLimits(); - - typedef std::vector ObserverConfigs; - ObserverConfigs::iterator FindObserverConfig( - const BitrateAllocatorObserver* observer); - - typedef std::multimap ObserverSortingMap; - typedef std::map ObserverAllocation; - - ObserverAllocation AllocateBitrates(uint32_t bitrate); - - ObserverAllocation ZeroRateAllocation(); - ObserverAllocation LowRateAllocation(uint32_t bitrate); - ObserverAllocation NormalRateAllocation(uint32_t bitrate, - uint32_t sum_min_bitrates); - ObserverAllocation MaxRateAllocation(uint32_t bitrate, - uint32_t sum_max_bitrates); - - uint32_t LastAllocatedBitrate(const ObserverConfig& observer_config); - // The minimum bitrate required by this observer, including enable-hysteresis - // if the observer is in a paused state. - uint32_t MinBitrateWithHysteresis(const ObserverConfig& observer_config); - // Splits |bitrate| evenly to observers already in |allocation|. - // |include_zero_allocations| decides if zero allocations should be part of - // the distribution or not. The allowed max bitrate is |max_multiplier| x - // observer max bitrate. - void DistributeBitrateEvenly(uint32_t bitrate, - bool include_zero_allocations, - int max_multiplier, - ObserverAllocation* allocation); - bool EnoughBitrateForAllObservers(uint32_t bitrate, - uint32_t sum_min_bitrates); - - rtc::SequencedTaskChecker sequenced_checker_; - LimitObserver* const limit_observer_ GUARDED_BY(&sequenced_checker_); - // Stored in a list to keep track of the insertion order. - ObserverConfigs bitrate_observer_configs_ GUARDED_BY(&sequenced_checker_); - uint32_t last_bitrate_bps_ GUARDED_BY(&sequenced_checker_); - uint32_t last_non_zero_bitrate_bps_ GUARDED_BY(&sequenced_checker_); - uint8_t last_fraction_loss_ GUARDED_BY(&sequenced_checker_); - int64_t last_rtt_ GUARDED_BY(&sequenced_checker_); - int64_t last_probing_interval_ms_ GUARDED_BY(&sequenced_checker_); - // Number of mute events based on too low BWE, not network up/down. - int num_pause_events_ GUARDED_BY(&sequenced_checker_); - Clock* const clock_ GUARDED_BY(&sequenced_checker_); - int64_t last_bwe_log_time_ GUARDED_BY(&sequenced_checker_); -}; -} // namespace webrtc -#endif // WEBRTC_CALL_BITRATE_ALLOCATOR_H_ diff --git a/WebRtc.NET/include/webrtc/call/call.h b/WebRtc.NET/include/webrtc/call/call.h deleted file mode 100644 index fdb6cff7..00000000 --- a/WebRtc.NET/include/webrtc/call/call.h +++ /dev/null @@ -1,165 +0,0 @@ -/* - * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ -#ifndef WEBRTC_CALL_CALL_H_ -#define WEBRTC_CALL_CALL_H_ - -#include -#include - -#include "webrtc/base/networkroute.h" -#include "webrtc/base/platform_file.h" -#include "webrtc/base/socket.h" -#include "webrtc/call/audio_receive_stream.h" -#include "webrtc/call/audio_send_stream.h" -#include "webrtc/call/audio_state.h" -#include "webrtc/call/flexfec_receive_stream.h" -#include "webrtc/common_types.h" -#include "webrtc/video_receive_stream.h" -#include "webrtc/video_send_stream.h" - -namespace webrtc { - -class AudioProcessing; -class RtcEventLog; - -const char* Version(); - -enum class MediaType { - ANY, - AUDIO, - VIDEO, - DATA -}; - -class PacketReceiver { - public: - enum DeliveryStatus { - DELIVERY_OK, - DELIVERY_UNKNOWN_SSRC, - DELIVERY_PACKET_ERROR, - }; - - virtual DeliveryStatus DeliverPacket(MediaType media_type, - const uint8_t* packet, - size_t length, - const PacketTime& packet_time) = 0; - - protected: - virtual ~PacketReceiver() {} -}; - -// A Call instance can contain several send and/or receive streams. All streams -// are assumed to have the same remote endpoint and will share bitrate estimates -// etc. -class Call { - public: - struct Config { - explicit Config(RtcEventLog* event_log) : event_log(event_log) { - RTC_DCHECK(event_log); - } - - static const int kDefaultStartBitrateBps; - - // Bitrate config used until valid bitrate estimates are calculated. Also - // used to cap total bitrate used. - struct BitrateConfig { - int min_bitrate_bps = 0; - int start_bitrate_bps = kDefaultStartBitrateBps; - int max_bitrate_bps = -1; - } bitrate_config; - - // AudioState which is possibly shared between multiple calls. - // TODO(solenberg): Change this to a shared_ptr once we can use C++11. - rtc::scoped_refptr audio_state; - - // Audio Processing Module to be used in this call. - // TODO(solenberg): Change this to a shared_ptr once we can use C++11. - AudioProcessing* audio_processing = nullptr; - - // RtcEventLog to use for this call. Required. - // Use webrtc::RtcEventLog::CreateNull() for a null implementation. - RtcEventLog* event_log = nullptr; - }; - - struct Stats { - std::string ToString(int64_t time_ms) const; - - int send_bandwidth_bps = 0; // Estimated available send bandwidth. - int max_padding_bitrate_bps = 0; // Cumulative configured max padding. - int recv_bandwidth_bps = 0; // Estimated available receive bandwidth. - int64_t pacer_delay_ms = 0; - int64_t rtt_ms = -1; - }; - - static Call* Create(const Call::Config& config); - - virtual AudioSendStream* CreateAudioSendStream( - const AudioSendStream::Config& config) = 0; - virtual void DestroyAudioSendStream(AudioSendStream* send_stream) = 0; - - virtual AudioReceiveStream* CreateAudioReceiveStream( - const AudioReceiveStream::Config& config) = 0; - virtual void DestroyAudioReceiveStream( - AudioReceiveStream* receive_stream) = 0; - - virtual VideoSendStream* CreateVideoSendStream( - VideoSendStream::Config config, - VideoEncoderConfig encoder_config) = 0; - virtual void DestroyVideoSendStream(VideoSendStream* send_stream) = 0; - - virtual VideoReceiveStream* CreateVideoReceiveStream( - VideoReceiveStream::Config configuration) = 0; - virtual void DestroyVideoReceiveStream( - VideoReceiveStream* receive_stream) = 0; - - virtual FlexfecReceiveStream* CreateFlexfecReceiveStream( - const FlexfecReceiveStream::Config& config) = 0; - virtual void DestroyFlexfecReceiveStream( - FlexfecReceiveStream* receive_stream) = 0; - - // All received RTP and RTCP packets for the call should be inserted to this - // PacketReceiver. The PacketReceiver pointer is valid as long as the - // Call instance exists. - virtual PacketReceiver* Receiver() = 0; - - // Returns the call statistics, such as estimated send and receive bandwidth, - // pacing delay, etc. - virtual Stats GetStats() const = 0; - - // TODO(pbos): Like BitrateConfig above this is currently per-stream instead - // of maximum for entire Call. This should be fixed along with the above. - // Specifying a start bitrate (>0) will currently reset the current bitrate - // estimate. This is due to how the 'x-google-start-bitrate' flag is currently - // implemented. - virtual void SetBitrateConfig( - const Config::BitrateConfig& bitrate_config) = 0; - - // TODO(skvlad): When the unbundled case with multiple streams for the same - // media type going over different networks is supported, track the state - // for each stream separately. Right now it's global per media type. - virtual void SignalChannelNetworkState(MediaType media, - NetworkState state) = 0; - - virtual void OnTransportOverheadChanged( - MediaType media, - int transport_overhead_per_packet) = 0; - - virtual void OnNetworkRouteChanged( - const std::string& transport_name, - const rtc::NetworkRoute& network_route) = 0; - - virtual void OnSentPacket(const rtc::SentPacket& sent_packet) = 0; - - virtual ~Call() {} -}; - -} // namespace webrtc - -#endif // WEBRTC_CALL_CALL_H_ diff --git a/WebRtc.NET/include/webrtc/call/flexfec_receive_stream.h b/WebRtc.NET/include/webrtc/call/flexfec_receive_stream.h deleted file mode 100644 index babeee0e..00000000 --- a/WebRtc.NET/include/webrtc/call/flexfec_receive_stream.h +++ /dev/null @@ -1,91 +0,0 @@ -/* - * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_CALL_FLEXFEC_RECEIVE_STREAM_H_ -#define WEBRTC_CALL_FLEXFEC_RECEIVE_STREAM_H_ - -#include - -#include -#include - -#include "webrtc/api/call/transport.h" -#include "webrtc/config.h" - -namespace webrtc { - -class FlexfecReceiveStream { - public: - struct Stats { - std::string ToString(int64_t time_ms) const; - - // TODO(brandtr): Add appropriate stats here. - int flexfec_bitrate_bps; - }; - - struct Config { - explicit Config(Transport* rtcp_send_transport) - : rtcp_send_transport(rtcp_send_transport) { - RTC_DCHECK(rtcp_send_transport); - } - - std::string ToString() const; - - // Returns true if all RTP information is available in order to - // enable receiving FlexFEC. - bool IsCompleteAndEnabled() const; - - // Payload type for FlexFEC. - int payload_type = -1; - - // SSRC for FlexFEC stream to be received. - uint32_t remote_ssrc = 0; - - // Vector containing a single element, corresponding to the SSRC of the - // media stream being protected by this FlexFEC stream. The vector MUST have - // size 1. - // - // TODO(brandtr): Update comment above when we support multistream - // protection. - std::vector protected_media_ssrcs; - - // SSRC for RTCP reports to be sent. - uint32_t local_ssrc = 0; - - // What RTCP mode to use in the reports. - RtcpMode rtcp_mode = RtcpMode::kCompound; - - // Transport for outgoing RTCP packets. - Transport* rtcp_send_transport = nullptr; - - // |transport_cc| is true whenever the send-side BWE RTCP feedback message - // has been negotiated. This is a prerequisite for enabling send-side BWE. - bool transport_cc = false; - - // RTP header extensions that have been negotiated for this track. - std::vector rtp_header_extensions; - }; - - // Starts stream activity. - // When a stream is active, it can receive and process packets. - virtual void Start() = 0; - // Stops stream activity. - // When a stream is stopped, it can't receive nor process packets. - virtual void Stop() = 0; - - virtual Stats GetStats() const = 0; - - protected: - virtual ~FlexfecReceiveStream() = default; -}; - -} // namespace webrtc - -#endif // WEBRTC_CALL_FLEXFEC_RECEIVE_STREAM_H_ diff --git a/WebRtc.NET/include/webrtc/call/flexfec_receive_stream_impl.h b/WebRtc.NET/include/webrtc/call/flexfec_receive_stream_impl.h deleted file mode 100644 index 36ea623c..00000000 --- a/WebRtc.NET/include/webrtc/call/flexfec_receive_stream_impl.h +++ /dev/null @@ -1,63 +0,0 @@ -/* - * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_CALL_FLEXFEC_RECEIVE_STREAM_IMPL_H_ -#define WEBRTC_CALL_FLEXFEC_RECEIVE_STREAM_IMPL_H_ - -#include - -#include "webrtc/base/criticalsection.h" -#include "webrtc/call/flexfec_receive_stream.h" - -namespace webrtc { - -class FlexfecReceiver; -class ProcessThread; -class ReceiveStatistics; -class RecoveredPacketReceiver; -class RtcpRttStats; -class RtpPacketReceived; -class RtpRtcp; - -class FlexfecReceiveStreamImpl : public FlexfecReceiveStream { - public: - FlexfecReceiveStreamImpl(const Config& config, - RecoveredPacketReceiver* recovered_packet_receiver, - RtcpRttStats* rtt_stats, - ProcessThread* process_thread); - ~FlexfecReceiveStreamImpl() override; - - const Config& GetConfig() const { return config_; } - - bool AddAndProcessReceivedPacket(const RtpPacketReceived& packet); - - // Implements FlexfecReceiveStream. - void Start() override; - void Stop() override; - Stats GetStats() const override; - - private: - // Config. - const Config config_; - bool started_ GUARDED_BY(crit_); - rtc::CriticalSection crit_; - - // Erasure code interfacing. - const std::unique_ptr receiver_; - - // RTCP reporting. - const std::unique_ptr rtp_receive_statistics_; - const std::unique_ptr rtp_rtcp_; - ProcessThread* process_thread_; -}; - -} // namespace webrtc - -#endif // WEBRTC_CALL_FLEXFEC_RECEIVE_STREAM_IMPL_H_ diff --git a/WebRtc.NET/include/webrtc/call/rampup_tests.h b/WebRtc.NET/include/webrtc/call/rampup_tests.h deleted file mode 100644 index 606a8cd5..00000000 --- a/WebRtc.NET/include/webrtc/call/rampup_tests.h +++ /dev/null @@ -1,136 +0,0 @@ -/* - * Copyright (c) 2014 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_CALL_RAMPUP_TESTS_H_ -#define WEBRTC_CALL_RAMPUP_TESTS_H_ - -#include -#include -#include - -#include "webrtc/base/event.h" -#include "webrtc/call/call.h" -#include "webrtc/logging/rtc_event_log/rtc_event_log.h" -#include "webrtc/test/call_test.h" - -namespace webrtc { - -static const int kTransmissionTimeOffsetExtensionId = 6; -static const int kAbsSendTimeExtensionId = 7; -static const int kTransportSequenceNumberExtensionId = 8; -static const unsigned int kSingleStreamTargetBps = 1000000; - -class Clock; - -class RampUpTester : public test::EndToEndTest { - public: - RampUpTester(size_t num_video_streams, - size_t num_audio_streams, - unsigned int start_bitrate_bps, - const std::string& extension_type, - bool rtx, - bool red); - ~RampUpTester() override; - - size_t GetNumVideoStreams() const override; - size_t GetNumAudioStreams() const override; - - void PerformTest() override; - - protected: - virtual bool PollStats(); - - void AccumulateStats(const VideoSendStream::StreamStats& stream, - size_t* total_packets_sent, - size_t* total_sent, - size_t* padding_sent, - size_t* media_sent) const; - - void ReportResult(const std::string& measurement, - size_t value, - const std::string& units) const; - void TriggerTestDone(); - - webrtc::RtcEventLogNullImpl event_log_; - rtc::Event event_; - Clock* const clock_; - FakeNetworkPipe::Config forward_transport_config_; - const size_t num_video_streams_; - const size_t num_audio_streams_; - const bool rtx_; - const bool red_; - Call* sender_call_; - VideoSendStream* send_stream_; - test::PacketTransport* send_transport_; - - private: - typedef std::map SsrcMap; - class VideoStreamFactory; - - Call::Config GetSenderCallConfig() override; - void OnVideoStreamsCreated( - VideoSendStream* send_stream, - const std::vector& receive_streams) override; - test::PacketTransport* CreateSendTransport(Call* sender_call) override; - void ModifyVideoConfigs( - VideoSendStream::Config* send_config, - std::vector* receive_configs, - VideoEncoderConfig* encoder_config) override; - void ModifyAudioConfigs( - AudioSendStream::Config* send_config, - std::vector* receive_configs) override; - void OnCallsCreated(Call* sender_call, Call* receiver_call) override; - - static bool BitrateStatsPollingThread(void* obj); - - const int start_bitrate_bps_; - bool start_bitrate_verified_; - int expected_bitrate_bps_; - int64_t test_start_ms_; - int64_t ramp_up_finished_ms_; - - const std::string extension_type_; - std::vector video_ssrcs_; - std::vector video_rtx_ssrcs_; - std::vector audio_ssrcs_; - - rtc::PlatformThread poller_thread_; -}; - -class RampUpDownUpTester : public RampUpTester { - public: - RampUpDownUpTester(size_t num_video_streams, - size_t num_audio_streams, - unsigned int start_bitrate_bps, - const std::string& extension_type, - bool rtx, - bool red); - ~RampUpDownUpTester() override; - - protected: - bool PollStats() override; - - private: - enum TestStates { kFirstRampup, kLowRate, kSecondRampup }; - - Call::Config GetReceiverCallConfig() override; - - std::string GetModifierString() const; - int GetExpectedHighBitrate() const; - int GetHighLinkCapacity() const; - void EvolveTestState(int bitrate_bps, bool suspended); - - TestStates test_state_; - int64_t state_start_ms_; - int64_t interval_start_ms_; - int sent_bytes_; -}; -} // namespace webrtc -#endif // WEBRTC_CALL_RAMPUP_TESTS_H_ diff --git a/WebRtc.NET/include/webrtc/common_audio/fft4g.h b/WebRtc.NET/include/webrtc/common_audio/fft4g.h deleted file mode 100644 index 6dd792f6..00000000 --- a/WebRtc.NET/include/webrtc/common_audio/fft4g.h +++ /dev/null @@ -1,25 +0,0 @@ -/* - * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_COMMON_AUDIO_FFT4G_H_ -#define WEBRTC_COMMON_AUDIO_FFT4G_H_ - -#if defined(__cplusplus) -extern "C" { -#endif - -// Refer to fft4g.c for documentation. -void WebRtc_rdft(size_t n, int isgn, float *a, size_t *ip, float *w); - -#if defined(__cplusplus) -} -#endif - -#endif // WEBRTC_COMMON_AUDIO_FFT4G_H_ diff --git a/WebRtc.NET/include/webrtc/common_audio/fir_filter.h b/WebRtc.NET/include/webrtc/common_audio/fir_filter.h deleted file mode 100644 index a5dc6ece..00000000 --- a/WebRtc.NET/include/webrtc/common_audio/fir_filter.h +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright (c) 2014 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_COMMON_AUDIO_FIR_FILTER_H_ -#define WEBRTC_COMMON_AUDIO_FIR_FILTER_H_ - -#include - -namespace webrtc { - -// Finite Impulse Response filter using floating-point arithmetic. -class FIRFilter { - public: - // Creates a filter with the given coefficients. All initial state values will - // be zeros. - // The length of the chunks fed to the filter should never be greater than - // |max_input_length|. This is needed because, when vectorizing it is - // necessary to concatenate the input after the state, and resizing this array - // dynamically is expensive. - static FIRFilter* Create(const float* coefficients, - size_t coefficients_length, - size_t max_input_length); - - virtual ~FIRFilter() {} - - // Filters the |in| data supplied. - // |out| must be previously allocated and it must be at least of |length|. - virtual void Filter(const float* in, size_t length, float* out) = 0; -}; - -} // namespace webrtc - -#endif // WEBRTC_COMMON_AUDIO_FIR_FILTER_H_ diff --git a/WebRtc.NET/include/webrtc/common_audio/mocks/mock_smoothing_filter.h b/WebRtc.NET/include/webrtc/common_audio/mocks/mock_smoothing_filter.h deleted file mode 100644 index 82cea551..00000000 --- a/WebRtc.NET/include/webrtc/common_audio/mocks/mock_smoothing_filter.h +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_COMMON_AUDIO_MOCKS_MOCK_SMOOTHING_FILTER_H_ -#define WEBRTC_COMMON_AUDIO_MOCKS_MOCK_SMOOTHING_FILTER_H_ - -#include "webrtc/common_audio/smoothing_filter.h" -#include "webrtc/test/gmock.h" - -namespace webrtc { - -class MockSmoothingFilter : public SmoothingFilter { - public: - MOCK_METHOD1(AddSample, void(float)); - MOCK_METHOD0(GetAverage, rtc::Optional()); - MOCK_METHOD1(SetTimeConstantMs, bool(int)); -}; - -} // namespace webrtc - -#endif // WEBRTC_COMMON_AUDIO_MOCKS_MOCK_SMOOTHING_FILTER_H_ diff --git a/WebRtc.NET/include/webrtc/common_audio/real_fourier_openmax.h b/WebRtc.NET/include/webrtc/common_audio/real_fourier_openmax.h deleted file mode 100644 index 63ce5ba0..00000000 --- a/WebRtc.NET/include/webrtc/common_audio/real_fourier_openmax.h +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (c) 2015 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_COMMON_AUDIO_REAL_FOURIER_OPENMAX_H_ -#define WEBRTC_COMMON_AUDIO_REAL_FOURIER_OPENMAX_H_ - -#include - -#include "webrtc/common_audio/real_fourier.h" - -namespace webrtc { - -class RealFourierOpenmax : public RealFourier { - public: - explicit RealFourierOpenmax(int fft_order); - ~RealFourierOpenmax() override; - - void Forward(const float* src, std::complex* dest) const override; - void Inverse(const std::complex* src, float* dest) const override; - - int order() const override { - return order_; - } - - private: - // Basically a forward declare of OMXFFTSpec_R_F32. To get rid of the - // dependency on openmax. - typedef void OMXFFTSpec_R_F32_; - const int order_; - - OMXFFTSpec_R_F32_* const omx_spec_; -}; - -} // namespace webrtc - -#endif // WEBRTC_COMMON_AUDIO_REAL_FOURIER_OPENMAX_H_ - diff --git a/WebRtc.NET/include/webrtc/common_audio/resampler/include/resampler.h b/WebRtc.NET/include/webrtc/common_audio/resampler/include/resampler.h deleted file mode 100644 index e26ac904..00000000 --- a/WebRtc.NET/include/webrtc/common_audio/resampler/include/resampler.h +++ /dev/null @@ -1,95 +0,0 @@ -/* - * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - - -/* - * A wrapper for resampling a numerous amount of sampling combinations. - */ - -#ifndef WEBRTC_RESAMPLER_RESAMPLER_H_ -#define WEBRTC_RESAMPLER_RESAMPLER_H_ - -#include - -#include "webrtc/typedefs.h" - -namespace webrtc { - -// All methods return 0 on success and -1 on failure. -class Resampler -{ - -public: - Resampler(); - Resampler(int inFreq, int outFreq, size_t num_channels); - ~Resampler(); - - // Reset all states - int Reset(int inFreq, int outFreq, size_t num_channels); - - // Reset all states if any parameter has changed - int ResetIfNeeded(int inFreq, int outFreq, size_t num_channels); - - // Resample samplesIn to samplesOut. - int Push(const int16_t* samplesIn, size_t lengthIn, int16_t* samplesOut, - size_t maxLen, size_t &outLen); - -private: - enum ResamplerMode - { - kResamplerMode1To1, - kResamplerMode1To2, - kResamplerMode1To3, - kResamplerMode1To4, - kResamplerMode1To6, - kResamplerMode1To12, - kResamplerMode2To3, - kResamplerMode2To11, - kResamplerMode4To11, - kResamplerMode8To11, - kResamplerMode11To16, - kResamplerMode11To32, - kResamplerMode2To1, - kResamplerMode3To1, - kResamplerMode4To1, - kResamplerMode6To1, - kResamplerMode12To1, - kResamplerMode3To2, - kResamplerMode11To2, - kResamplerMode11To4, - kResamplerMode11To8 - }; - - // Generic pointers since we don't know what states we'll need - void* state1_; - void* state2_; - void* state3_; - - // Storage if needed - int16_t* in_buffer_; - int16_t* out_buffer_; - size_t in_buffer_size_; - size_t out_buffer_size_; - size_t in_buffer_size_max_; - size_t out_buffer_size_max_; - - int my_in_frequency_khz_; - int my_out_frequency_khz_; - ResamplerMode my_mode_; - size_t num_channels_; - - // Extra instance for stereo - Resampler* slave_left_; - Resampler* slave_right_; -}; - -} // namespace webrtc - -#endif // WEBRTC_RESAMPLER_RESAMPLER_H_ diff --git a/WebRtc.NET/include/webrtc/common_audio/resampler/sinusoidal_linear_chirp_source.h b/WebRtc.NET/include/webrtc/common_audio/resampler/sinusoidal_linear_chirp_source.h deleted file mode 100644 index 1807f86a..00000000 --- a/WebRtc.NET/include/webrtc/common_audio/resampler/sinusoidal_linear_chirp_source.h +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -// Modified from the Chromium original here: -// src/media/base/sinc_resampler_unittest.cc - -#ifndef WEBRTC_COMMON_AUDIO_RESAMPLER_SINUSOIDAL_LINEAR_CHIRP_SOURCE_H_ -#define WEBRTC_COMMON_AUDIO_RESAMPLER_SINUSOIDAL_LINEAR_CHIRP_SOURCE_H_ - -#include "webrtc/base/constructormagic.h" -#include "webrtc/common_audio/resampler/sinc_resampler.h" - -namespace webrtc { - -// Fake audio source for testing the resampler. Generates a sinusoidal linear -// chirp (http://en.wikipedia.org/wiki/Chirp) which can be tuned to stress the -// resampler for the specific sample rate conversion being used. -class SinusoidalLinearChirpSource : public SincResamplerCallback { - public: - // |delay_samples| can be used to insert a fractional sample delay into the - // source. It will produce zeros until non-negative time is reached. - SinusoidalLinearChirpSource(int sample_rate, size_t samples, - double max_frequency, double delay_samples); - - virtual ~SinusoidalLinearChirpSource() {} - - void Run(size_t frames, float* destination) override; - - double Frequency(size_t position); - - private: - enum { - kMinFrequency = 5 - }; - - int sample_rate_; - size_t total_samples_; - double max_frequency_; - double k_; - size_t current_index_; - double delay_samples_; - - RTC_DISALLOW_COPY_AND_ASSIGN(SinusoidalLinearChirpSource); -}; - -} // namespace webrtc - -#endif // WEBRTC_COMMON_AUDIO_RESAMPLER_SINUSOIDAL_LINEAR_CHIRP_SOURCE_H_ diff --git a/WebRtc.NET/include/webrtc/common_audio/ring_buffer.h b/WebRtc.NET/include/webrtc/common_audio/ring_buffer.h deleted file mode 100644 index 74951a8b..00000000 --- a/WebRtc.NET/include/webrtc/common_audio/ring_buffer.h +++ /dev/null @@ -1,75 +0,0 @@ -/* - * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -// A ring buffer to hold arbitrary data. Provides no thread safety. Unless -// otherwise specified, functions return 0 on success and -1 on error. - -#ifndef WEBRTC_COMMON_AUDIO_RING_BUFFER_H_ -#define WEBRTC_COMMON_AUDIO_RING_BUFFER_H_ - -#ifdef __cplusplus -extern "C" { -#endif - -#include // size_t - -enum Wrap { SAME_WRAP, DIFF_WRAP }; - -typedef struct RingBuffer { - size_t read_pos; - size_t write_pos; - size_t element_count; - size_t element_size; - enum Wrap rw_wrap; - char* data; -} RingBuffer; - -// Creates and initializes the buffer. Returns NULL on failure. -RingBuffer* WebRtc_CreateBuffer(size_t element_count, size_t element_size); -void WebRtc_InitBuffer(RingBuffer* handle); -void WebRtc_FreeBuffer(void* handle); - -// Reads data from the buffer. The |data_ptr| will point to the address where -// it is located. If all |element_count| data are feasible to read without -// buffer wrap around |data_ptr| will point to the location in the buffer. -// Otherwise, the data will be copied to |data| (memory allocation done by the -// user) and |data_ptr| points to the address of |data|. |data_ptr| is only -// guaranteed to be valid until the next call to WebRtc_WriteBuffer(). -// -// To force a copying to |data|, pass a NULL |data_ptr|. -// -// Returns number of elements read. -size_t WebRtc_ReadBuffer(RingBuffer* handle, - void** data_ptr, - void* data, - size_t element_count); - -// Writes |data| to buffer and returns the number of elements written. -size_t WebRtc_WriteBuffer(RingBuffer* handle, const void* data, - size_t element_count); - -// Moves the buffer read position and returns the number of elements moved. -// Positive |element_count| moves the read position towards the write position, -// that is, flushing the buffer. Negative |element_count| moves the read -// position away from the the write position, that is, stuffing the buffer. -// Returns number of elements moved. -int WebRtc_MoveReadPtr(RingBuffer* handle, int element_count); - -// Returns number of available elements to read. -size_t WebRtc_available_read(const RingBuffer* handle); - -// Returns number of available elements for write. -size_t WebRtc_available_write(const RingBuffer* handle); - -#ifdef __cplusplus -} -#endif - -#endif // WEBRTC_COMMON_AUDIO_RING_BUFFER_H_ diff --git a/WebRtc.NET/include/webrtc/common_audio/signal_processing/complex_fft_tables.h b/WebRtc.NET/include/webrtc/common_audio/signal_processing/complex_fft_tables.h deleted file mode 100644 index ca7b7fe3..00000000 --- a/WebRtc.NET/include/webrtc/common_audio/signal_processing/complex_fft_tables.h +++ /dev/null @@ -1,148 +0,0 @@ -/* - * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - - -#ifndef WEBRTC_COMMON_AUDIO_SIGNAL_PROCESSING_COMPLEX_FFT_TABLES_H_ -#define WEBRTC_COMMON_AUDIO_SIGNAL_PROCESSING_COMPLEX_FFT_TABLES_H_ - -#include "webrtc/typedefs.h" - -static const int16_t kSinTable1024[] = { - 0, 201, 402, 603, 804, 1005, 1206, 1406, - 1607, 1808, 2009, 2209, 2410, 2610, 2811, 3011, - 3211, 3411, 3611, 3811, 4011, 4210, 4409, 4608, - 4807, 5006, 5205, 5403, 5601, 5799, 5997, 6195, - 6392, 6589, 6786, 6982, 7179, 7375, 7571, 7766, - 7961, 8156, 8351, 8545, 8739, 8932, 9126, 9319, - 9511, 9703, 9895, 10087, 10278, 10469, 10659, 10849, - 11038, 11227, 11416, 11604, 11792, 11980, 12166, 12353, - 12539, 12724, 12909, 13094, 13278, 13462, 13645, 13827, - 14009, 14191, 14372, 14552, 14732, 14911, 15090, 15268, - 15446, 15623, 15799, 15975, 16150, 16325, 16499, 16672, - 16845, 17017, 17189, 17360, 17530, 17699, 17868, 18036, - 18204, 18371, 18537, 18702, 18867, 19031, 19194, 19357, - 19519, 19680, 19840, 20000, 20159, 20317, 20474, 20631, - 20787, 20942, 21096, 21249, 21402, 21554, 21705, 21855, - 22004, 22153, 22301, 22448, 22594, 22739, 22883, 23027, - 23169, 23311, 23452, 23592, 23731, 23869, 24006, 24143, - 24278, 24413, 24546, 24679, 24811, 24942, 25072, 25201, - 25329, 25456, 25582, 25707, 25831, 25954, 26077, 26198, - 26318, 26437, 26556, 26673, 26789, 26905, 27019, 27132, - 27244, 27355, 27466, 27575, 27683, 27790, 27896, 28001, - 28105, 28208, 28309, 28410, 28510, 28608, 28706, 28802, - 28897, 28992, 29085, 29177, 29268, 29358, 29446, 29534, - 29621, 29706, 29790, 29873, 29955, 30036, 30116, 30195, - 30272, 30349, 30424, 30498, 30571, 30643, 30713, 30783, - 30851, 30918, 30984, 31049, 31113, 31175, 31236, 31297, - 31356, 31413, 31470, 31525, 31580, 31633, 31684, 31735, - 31785, 31833, 31880, 31926, 31970, 32014, 32056, 32097, - 32137, 32176, 32213, 32249, 32284, 32318, 32350, 32382, - 32412, 32441, 32468, 32495, 32520, 32544, 32567, 32588, - 32609, 32628, 32646, 32662, 32678, 32692, 32705, 32717, - 32727, 32736, 32744, 32751, 32757, 32761, 32764, 32766, - 32767, 32766, 32764, 32761, 32757, 32751, 32744, 32736, - 32727, 32717, 32705, 32692, 32678, 32662, 32646, 32628, - 32609, 32588, 32567, 32544, 32520, 32495, 32468, 32441, - 32412, 32382, 32350, 32318, 32284, 32249, 32213, 32176, - 32137, 32097, 32056, 32014, 31970, 31926, 31880, 31833, - 31785, 31735, 31684, 31633, 31580, 31525, 31470, 31413, - 31356, 31297, 31236, 31175, 31113, 31049, 30984, 30918, - 30851, 30783, 30713, 30643, 30571, 30498, 30424, 30349, - 30272, 30195, 30116, 30036, 29955, 29873, 29790, 29706, - 29621, 29534, 29446, 29358, 29268, 29177, 29085, 28992, - 28897, 28802, 28706, 28608, 28510, 28410, 28309, 28208, - 28105, 28001, 27896, 27790, 27683, 27575, 27466, 27355, - 27244, 27132, 27019, 26905, 26789, 26673, 26556, 26437, - 26318, 26198, 26077, 25954, 25831, 25707, 25582, 25456, - 25329, 25201, 25072, 24942, 24811, 24679, 24546, 24413, - 24278, 24143, 24006, 23869, 23731, 23592, 23452, 23311, - 23169, 23027, 22883, 22739, 22594, 22448, 22301, 22153, - 22004, 21855, 21705, 21554, 21402, 21249, 21096, 20942, - 20787, 20631, 20474, 20317, 20159, 20000, 19840, 19680, - 19519, 19357, 19194, 19031, 18867, 18702, 18537, 18371, - 18204, 18036, 17868, 17699, 17530, 17360, 17189, 17017, - 16845, 16672, 16499, 16325, 16150, 15975, 15799, 15623, - 15446, 15268, 15090, 14911, 14732, 14552, 14372, 14191, - 14009, 13827, 13645, 13462, 13278, 13094, 12909, 12724, - 12539, 12353, 12166, 11980, 11792, 11604, 11416, 11227, - 11038, 10849, 10659, 10469, 10278, 10087, 9895, 9703, - 9511, 9319, 9126, 8932, 8739, 8545, 8351, 8156, - 7961, 7766, 7571, 7375, 7179, 6982, 6786, 6589, - 6392, 6195, 5997, 5799, 5601, 5403, 5205, 5006, - 4807, 4608, 4409, 4210, 4011, 3811, 3611, 3411, - 3211, 3011, 2811, 2610, 2410, 2209, 2009, 1808, - 1607, 1406, 1206, 1005, 804, 603, 402, 201, - 0, -201, -402, -603, -804, -1005, -1206, -1406, - -1607, -1808, -2009, -2209, -2410, -2610, -2811, -3011, - -3211, -3411, -3611, -3811, -4011, -4210, -4409, -4608, - -4807, -5006, -5205, -5403, -5601, -5799, -5997, -6195, - -6392, -6589, -6786, -6982, -7179, -7375, -7571, -7766, - -7961, -8156, -8351, -8545, -8739, -8932, -9126, -9319, - -9511, -9703, -9895, -10087, -10278, -10469, -10659, -10849, - -11038, -11227, -11416, -11604, -11792, -11980, -12166, -12353, - -12539, -12724, -12909, -13094, -13278, -13462, -13645, -13827, - -14009, -14191, -14372, -14552, -14732, -14911, -15090, -15268, - -15446, -15623, -15799, -15975, -16150, -16325, -16499, -16672, - -16845, -17017, -17189, -17360, -17530, -17699, -17868, -18036, - -18204, -18371, -18537, -18702, -18867, -19031, -19194, -19357, - -19519, -19680, -19840, -20000, -20159, -20317, -20474, -20631, - -20787, -20942, -21096, -21249, -21402, -21554, -21705, -21855, - -22004, -22153, -22301, -22448, -22594, -22739, -22883, -23027, - -23169, -23311, -23452, -23592, -23731, -23869, -24006, -24143, - -24278, -24413, -24546, -24679, -24811, -24942, -25072, -25201, - -25329, -25456, -25582, -25707, -25831, -25954, -26077, -26198, - -26318, -26437, -26556, -26673, -26789, -26905, -27019, -27132, - -27244, -27355, -27466, -27575, -27683, -27790, -27896, -28001, - -28105, -28208, -28309, -28410, -28510, -28608, -28706, -28802, - -28897, -28992, -29085, -29177, -29268, -29358, -29446, -29534, - -29621, -29706, -29790, -29873, -29955, -30036, -30116, -30195, - -30272, -30349, -30424, -30498, -30571, -30643, -30713, -30783, - -30851, -30918, -30984, -31049, -31113, -31175, -31236, -31297, - -31356, -31413, -31470, -31525, -31580, -31633, -31684, -31735, - -31785, -31833, -31880, -31926, -31970, -32014, -32056, -32097, - -32137, -32176, -32213, -32249, -32284, -32318, -32350, -32382, - -32412, -32441, -32468, -32495, -32520, -32544, -32567, -32588, - -32609, -32628, -32646, -32662, -32678, -32692, -32705, -32717, - -32727, -32736, -32744, -32751, -32757, -32761, -32764, -32766, - -32767, -32766, -32764, -32761, -32757, -32751, -32744, -32736, - -32727, -32717, -32705, -32692, -32678, -32662, -32646, -32628, - -32609, -32588, -32567, -32544, -32520, -32495, -32468, -32441, - -32412, -32382, -32350, -32318, -32284, -32249, -32213, -32176, - -32137, -32097, -32056, -32014, -31970, -31926, -31880, -31833, - -31785, -31735, -31684, -31633, -31580, -31525, -31470, -31413, - -31356, -31297, -31236, -31175, -31113, -31049, -30984, -30918, - -30851, -30783, -30713, -30643, -30571, -30498, -30424, -30349, - -30272, -30195, -30116, -30036, -29955, -29873, -29790, -29706, - -29621, -29534, -29446, -29358, -29268, -29177, -29085, -28992, - -28897, -28802, -28706, -28608, -28510, -28410, -28309, -28208, - -28105, -28001, -27896, -27790, -27683, -27575, -27466, -27355, - -27244, -27132, -27019, -26905, -26789, -26673, -26556, -26437, - -26318, -26198, -26077, -25954, -25831, -25707, -25582, -25456, - -25329, -25201, -25072, -24942, -24811, -24679, -24546, -24413, - -24278, -24143, -24006, -23869, -23731, -23592, -23452, -23311, - -23169, -23027, -22883, -22739, -22594, -22448, -22301, -22153, - -22004, -21855, -21705, -21554, -21402, -21249, -21096, -20942, - -20787, -20631, -20474, -20317, -20159, -20000, -19840, -19680, - -19519, -19357, -19194, -19031, -18867, -18702, -18537, -18371, - -18204, -18036, -17868, -17699, -17530, -17360, -17189, -17017, - -16845, -16672, -16499, -16325, -16150, -15975, -15799, -15623, - -15446, -15268, -15090, -14911, -14732, -14552, -14372, -14191, - -14009, -13827, -13645, -13462, -13278, -13094, -12909, -12724, - -12539, -12353, -12166, -11980, -11792, -11604, -11416, -11227, - -11038, -10849, -10659, -10469, -10278, -10087, -9895, -9703, - -9511, -9319, -9126, -8932, -8739, -8545, -8351, -8156, - -7961, -7766, -7571, -7375, -7179, -6982, -6786, -6589, - -6392, -6195, -5997, -5799, -5601, -5403, -5205, -5006, - -4807, -4608, -4409, -4210, -4011, -3811, -3611, -3411, - -3211, -3011, -2811, -2610, -2410, -2209, -2009, -1808, - -1607, -1406, -1206, -1005, -804, -603, -402, -201 -}; - -#endif // WEBRTC_COMMON_AUDIO_SIGNAL_PROCESSING_COMPLEX_FFT_TABLES_H_ diff --git a/WebRtc.NET/include/webrtc/common_audio/signal_processing/include/spl_inl_armv7.h b/WebRtc.NET/include/webrtc/common_audio/signal_processing/include/spl_inl_armv7.h deleted file mode 100644 index 27188011..00000000 --- a/WebRtc.NET/include/webrtc/common_audio/signal_processing/include/spl_inl_armv7.h +++ /dev/null @@ -1,136 +0,0 @@ -/* - * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - - -/* This header file includes the inline functions for ARM processors in - * the fix point signal processing library. - */ - -#ifndef WEBRTC_SPL_SPL_INL_ARMV7_H_ -#define WEBRTC_SPL_SPL_INL_ARMV7_H_ - -/* TODO(kma): Replace some assembly code with GCC intrinsics - * (e.g. __builtin_clz). - */ - -/* This function produces result that is not bit exact with that by the generic - * C version in some cases, although the former is at least as accurate as the - * later. - */ -static __inline int32_t WEBRTC_SPL_MUL_16_32_RSFT16(int16_t a, int32_t b) { - int32_t tmp = 0; - __asm __volatile ("smulwb %0, %1, %2":"=r"(tmp):"r"(b), "r"(a)); - return tmp; -} - -static __inline int32_t WEBRTC_SPL_MUL_16_16(int16_t a, int16_t b) { - int32_t tmp = 0; - __asm __volatile ("smulbb %0, %1, %2":"=r"(tmp):"r"(a), "r"(b)); - return tmp; -} - -// TODO(kma): add unit test. -static __inline int32_t WebRtc_MulAccumW16(int16_t a, int16_t b, int32_t c) { - int32_t tmp = 0; - __asm __volatile ("smlabb %0, %1, %2, %3":"=r"(tmp):"r"(a), "r"(b), "r"(c)); - return tmp; -} - -static __inline int16_t WebRtcSpl_AddSatW16(int16_t a, int16_t b) { - int32_t s_sum = 0; - - __asm __volatile ("qadd16 %0, %1, %2":"=r"(s_sum):"r"(a), "r"(b)); - - return (int16_t) s_sum; -} - -static __inline int32_t WebRtcSpl_AddSatW32(int32_t l_var1, int32_t l_var2) { - int32_t l_sum = 0; - - __asm __volatile ("qadd %0, %1, %2":"=r"(l_sum):"r"(l_var1), "r"(l_var2)); - - return l_sum; -} - -static __inline int32_t WebRtcSpl_SubSatW32(int32_t l_var1, int32_t l_var2) { - int32_t l_sub = 0; - - __asm __volatile ("qsub %0, %1, %2":"=r"(l_sub):"r"(l_var1), "r"(l_var2)); - - return l_sub; -} - -static __inline int16_t WebRtcSpl_SubSatW16(int16_t var1, int16_t var2) { - int32_t s_sub = 0; - - __asm __volatile ("qsub16 %0, %1, %2":"=r"(s_sub):"r"(var1), "r"(var2)); - - return (int16_t)s_sub; -} - -static __inline int16_t WebRtcSpl_GetSizeInBits(uint32_t n) { - int32_t tmp = 0; - - __asm __volatile ("clz %0, %1":"=r"(tmp):"r"(n)); - - return (int16_t)(32 - tmp); -} - -static __inline int16_t WebRtcSpl_NormW32(int32_t a) { - int32_t tmp = 0; - - if (a == 0) { - return 0; - } - else if (a < 0) { - a ^= 0xFFFFFFFF; - } - - __asm __volatile ("clz %0, %1":"=r"(tmp):"r"(a)); - - return (int16_t)(tmp - 1); -} - -static __inline int16_t WebRtcSpl_NormU32(uint32_t a) { - int tmp = 0; - - if (a == 0) return 0; - - __asm __volatile ("clz %0, %1":"=r"(tmp):"r"(a)); - - return (int16_t)tmp; -} - -static __inline int16_t WebRtcSpl_NormW16(int16_t a) { - int32_t tmp = 0; - int32_t a_32 = a; - - if (a_32 == 0) { - return 0; - } - else if (a_32 < 0) { - a_32 ^= 0xFFFFFFFF; - } - - __asm __volatile ("clz %0, %1":"=r"(tmp):"r"(a_32)); - - return (int16_t)(tmp - 17); -} - -// TODO(kma): add unit test. -static __inline int16_t WebRtcSpl_SatW32ToW16(int32_t value32) { - int32_t out = 0; - - __asm __volatile ("ssat %0, #16, %1" : "=r"(out) : "r"(value32)); - - return (int16_t)out; -} - -#endif // WEBRTC_SPL_SPL_INL_ARMV7_H_ diff --git a/WebRtc.NET/include/webrtc/common_audio/signal_processing/include/spl_inl_mips.h b/WebRtc.NET/include/webrtc/common_audio/signal_processing/include/spl_inl_mips.h deleted file mode 100644 index cd04bddc..00000000 --- a/WebRtc.NET/include/webrtc/common_audio/signal_processing/include/spl_inl_mips.h +++ /dev/null @@ -1,225 +0,0 @@ -/* - * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - - -// This header file includes the inline functions in -// the fix point signal processing library. - -#ifndef WEBRTC_SPL_SPL_INL_MIPS_H_ -#define WEBRTC_SPL_SPL_INL_MIPS_H_ - -static __inline int32_t WEBRTC_SPL_MUL_16_16(int32_t a, - int32_t b) { - int32_t value32 = 0; - int32_t a1 = 0, b1 = 0; - - __asm __volatile( -#if defined(MIPS32_R2_LE) - "seh %[a1], %[a] \n\t" - "seh %[b1], %[b] \n\t" -#else - "sll %[a1], %[a], 16 \n\t" - "sll %[b1], %[b], 16 \n\t" - "sra %[a1], %[a1], 16 \n\t" - "sra %[b1], %[b1], 16 \n\t" -#endif - "mul %[value32], %[a1], %[b1] \n\t" - : [value32] "=r" (value32), [a1] "=&r" (a1), [b1] "=&r" (b1) - : [a] "r" (a), [b] "r" (b) - : "hi", "lo" - ); - return value32; -} - -static __inline int32_t WEBRTC_SPL_MUL_16_32_RSFT16(int16_t a, - int32_t b) { - int32_t value32 = 0, b1 = 0, b2 = 0; - int32_t a1 = 0; - - __asm __volatile( -#if defined(MIPS32_R2_LE) - "seh %[a1], %[a] \n\t" -#else - "sll %[a1], %[a], 16 \n\t" - "sra %[a1], %[a1], 16 \n\t" -#endif - "andi %[b2], %[b], 0xFFFF \n\t" - "sra %[b1], %[b], 16 \n\t" - "sra %[b2], %[b2], 1 \n\t" - "mul %[value32], %[a1], %[b1] \n\t" - "mul %[b2], %[a1], %[b2] \n\t" - "addiu %[b2], %[b2], 0x4000 \n\t" - "sra %[b2], %[b2], 15 \n\t" - "addu %[value32], %[value32], %[b2] \n\t" - : [value32] "=&r" (value32), [b1] "=&r" (b1), [b2] "=&r" (b2), - [a1] "=&r" (a1) - : [a] "r" (a), [b] "r" (b) - : "hi", "lo" - ); - return value32; -} - -#if defined(MIPS_DSP_R1_LE) -static __inline int16_t WebRtcSpl_SatW32ToW16(int32_t value32) { - __asm __volatile( - "shll_s.w %[value32], %[value32], 16 \n\t" - "sra %[value32], %[value32], 16 \n\t" - : [value32] "+r" (value32) - : - ); - int16_t out16 = (int16_t)value32; - return out16; -} - -static __inline int16_t WebRtcSpl_AddSatW16(int16_t a, int16_t b) { - int32_t value32 = 0; - - __asm __volatile( - "addq_s.ph %[value32], %[a], %[b] \n\t" - : [value32] "=r" (value32) - : [a] "r" (a), [b] "r" (b) - ); - return (int16_t)value32; -} - -static __inline int32_t WebRtcSpl_AddSatW32(int32_t l_var1, int32_t l_var2) { - int32_t l_sum; - - __asm __volatile( - "addq_s.w %[l_sum], %[l_var1], %[l_var2] \n\t" - : [l_sum] "=r" (l_sum) - : [l_var1] "r" (l_var1), [l_var2] "r" (l_var2) - ); - - return l_sum; -} - -static __inline int16_t WebRtcSpl_SubSatW16(int16_t var1, int16_t var2) { - int32_t value32; - - __asm __volatile( - "subq_s.ph %[value32], %[var1], %[var2] \n\t" - : [value32] "=r" (value32) - : [var1] "r" (var1), [var2] "r" (var2) - ); - - return (int16_t)value32; -} - -static __inline int32_t WebRtcSpl_SubSatW32(int32_t l_var1, int32_t l_var2) { - int32_t l_diff; - - __asm __volatile( - "subq_s.w %[l_diff], %[l_var1], %[l_var2] \n\t" - : [l_diff] "=r" (l_diff) - : [l_var1] "r" (l_var1), [l_var2] "r" (l_var2) - ); - - return l_diff; -} -#endif - -static __inline int16_t WebRtcSpl_GetSizeInBits(uint32_t n) { - int bits = 0; - int i32 = 32; - - __asm __volatile( - "clz %[bits], %[n] \n\t" - "subu %[bits], %[i32], %[bits] \n\t" - : [bits] "=&r" (bits) - : [n] "r" (n), [i32] "r" (i32) - ); - - return (int16_t)bits; -} - -static __inline int16_t WebRtcSpl_NormW32(int32_t a) { - int zeros = 0; - - __asm __volatile( - ".set push \n\t" - ".set noreorder \n\t" - "bnez %[a], 1f \n\t" - " sra %[zeros], %[a], 31 \n\t" - "b 2f \n\t" - " move %[zeros], $zero \n\t" - "1: \n\t" - "xor %[zeros], %[a], %[zeros] \n\t" - "clz %[zeros], %[zeros] \n\t" - "addiu %[zeros], %[zeros], -1 \n\t" - "2: \n\t" - ".set pop \n\t" - : [zeros]"=&r"(zeros) - : [a] "r" (a) - ); - - return (int16_t)zeros; -} - -static __inline int16_t WebRtcSpl_NormU32(uint32_t a) { - int zeros = 0; - - __asm __volatile( - "clz %[zeros], %[a] \n\t" - : [zeros] "=r" (zeros) - : [a] "r" (a) - ); - - return (int16_t)(zeros & 0x1f); -} - -static __inline int16_t WebRtcSpl_NormW16(int16_t a) { - int zeros = 0; - int a0 = a << 16; - - __asm __volatile( - ".set push \n\t" - ".set noreorder \n\t" - "bnez %[a0], 1f \n\t" - " sra %[zeros], %[a0], 31 \n\t" - "b 2f \n\t" - " move %[zeros], $zero \n\t" - "1: \n\t" - "xor %[zeros], %[a0], %[zeros] \n\t" - "clz %[zeros], %[zeros] \n\t" - "addiu %[zeros], %[zeros], -1 \n\t" - "2: \n\t" - ".set pop \n\t" - : [zeros]"=&r"(zeros) - : [a0] "r" (a0) - ); - - return (int16_t)zeros; -} - -static __inline int32_t WebRtc_MulAccumW16(int16_t a, - int16_t b, - int32_t c) { - int32_t res = 0, c1 = 0; - __asm __volatile( -#if defined(MIPS32_R2_LE) - "seh %[a], %[a] \n\t" - "seh %[b], %[b] \n\t" -#else - "sll %[a], %[a], 16 \n\t" - "sll %[b], %[b], 16 \n\t" - "sra %[a], %[a], 16 \n\t" - "sra %[b], %[b], 16 \n\t" -#endif - "mul %[res], %[a], %[b] \n\t" - "addu %[c1], %[c], %[res] \n\t" - : [c1] "=r" (c1), [res] "=&r" (res) - : [a] "r" (a), [b] "r" (b), [c] "r" (c) - : "hi", "lo" - ); - return (c1); -} - -#endif // WEBRTC_SPL_SPL_INL_MIPS_H_ diff --git a/WebRtc.NET/include/webrtc/common_audio/signal_processing/resample_by_2_internal.h b/WebRtc.NET/include/webrtc/common_audio/signal_processing/resample_by_2_internal.h deleted file mode 100644 index 5c9533ee..00000000 --- a/WebRtc.NET/include/webrtc/common_audio/signal_processing/resample_by_2_internal.h +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - - -/* - * This header file contains some internal resampling functions. - * - */ - -#ifndef WEBRTC_SPL_RESAMPLE_BY_2_INTERNAL_H_ -#define WEBRTC_SPL_RESAMPLE_BY_2_INTERNAL_H_ - -#include "webrtc/typedefs.h" - -/******************************************************************* - * resample_by_2_fast.c - * Functions for internal use in the other resample functions - ******************************************************************/ -void WebRtcSpl_DownBy2IntToShort(int32_t *in, int32_t len, int16_t *out, - int32_t *state); - -void WebRtcSpl_DownBy2ShortToInt(const int16_t *in, int32_t len, - int32_t *out, int32_t *state); - -void WebRtcSpl_UpBy2ShortToInt(const int16_t *in, int32_t len, - int32_t *out, int32_t *state); - -void WebRtcSpl_UpBy2IntToInt(const int32_t *in, int32_t len, int32_t *out, - int32_t *state); - -void WebRtcSpl_UpBy2IntToShort(const int32_t *in, int32_t len, - int16_t *out, int32_t *state); - -void WebRtcSpl_LPBy2ShortToInt(const int16_t* in, int32_t len, - int32_t* out, int32_t* state); - -void WebRtcSpl_LPBy2IntToInt(const int32_t* in, int32_t len, int32_t* out, - int32_t* state); - -#endif // WEBRTC_SPL_RESAMPLE_BY_2_INTERNAL_H_ diff --git a/WebRtc.NET/include/webrtc/common_audio/vad/vad_core.h b/WebRtc.NET/include/webrtc/common_audio/vad/vad_core.h deleted file mode 100644 index b38c515e..00000000 --- a/WebRtc.NET/include/webrtc/common_audio/vad/vad_core.h +++ /dev/null @@ -1,115 +0,0 @@ -/* - * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - - -/* - * This header file includes the descriptions of the core VAD calls. - */ - -#ifndef WEBRTC_COMMON_AUDIO_VAD_VAD_CORE_H_ -#define WEBRTC_COMMON_AUDIO_VAD_VAD_CORE_H_ - -#include "webrtc/common_audio/signal_processing/include/signal_processing_library.h" -#include "webrtc/typedefs.h" - -enum { kNumChannels = 6 }; // Number of frequency bands (named channels). -enum { kNumGaussians = 2 }; // Number of Gaussians per channel in the GMM. -enum { kTableSize = kNumChannels * kNumGaussians }; -enum { kMinEnergy = 10 }; // Minimum energy required to trigger audio signal. - -typedef struct VadInstT_ -{ - - int vad; - int32_t downsampling_filter_states[4]; - WebRtcSpl_State48khzTo8khz state_48_to_8; - int16_t noise_means[kTableSize]; - int16_t speech_means[kTableSize]; - int16_t noise_stds[kTableSize]; - int16_t speech_stds[kTableSize]; - // TODO(bjornv): Change to |frame_count|. - int32_t frame_counter; - int16_t over_hang; // Over Hang - int16_t num_of_speech; - // TODO(bjornv): Change to |age_vector|. - int16_t index_vector[16 * kNumChannels]; - int16_t low_value_vector[16 * kNumChannels]; - // TODO(bjornv): Change to |median|. - int16_t mean_value[kNumChannels]; - int16_t upper_state[5]; - int16_t lower_state[5]; - int16_t hp_filter_state[4]; - int16_t over_hang_max_1[3]; - int16_t over_hang_max_2[3]; - int16_t individual[3]; - int16_t total[3]; - - int init_flag; - -} VadInstT; - -// Initializes the core VAD component. The default aggressiveness mode is -// controlled by |kDefaultMode| in vad_core.c. -// -// - self [i/o] : Instance that should be initialized -// -// returns : 0 (OK), -1 (NULL pointer in or if the default mode can't be -// set) -int WebRtcVad_InitCore(VadInstT* self); - -/**************************************************************************** - * WebRtcVad_set_mode_core(...) - * - * This function changes the VAD settings - * - * Input: - * - inst : VAD instance - * - mode : Aggressiveness degree - * 0 (High quality) - 3 (Highly aggressive) - * - * Output: - * - inst : Changed instance - * - * Return value : 0 - Ok - * -1 - Error - */ - -int WebRtcVad_set_mode_core(VadInstT* self, int mode); - -/**************************************************************************** - * WebRtcVad_CalcVad48khz(...) - * WebRtcVad_CalcVad32khz(...) - * WebRtcVad_CalcVad16khz(...) - * WebRtcVad_CalcVad8khz(...) - * - * Calculate probability for active speech and make VAD decision. - * - * Input: - * - inst : Instance that should be initialized - * - speech_frame : Input speech frame - * - frame_length : Number of input samples - * - * Output: - * - inst : Updated filter states etc. - * - * Return value : VAD decision - * 0 - No active speech - * 1-6 - Active speech - */ -int WebRtcVad_CalcVad48khz(VadInstT* inst, const int16_t* speech_frame, - size_t frame_length); -int WebRtcVad_CalcVad32khz(VadInstT* inst, const int16_t* speech_frame, - size_t frame_length); -int WebRtcVad_CalcVad16khz(VadInstT* inst, const int16_t* speech_frame, - size_t frame_length); -int WebRtcVad_CalcVad8khz(VadInstT* inst, const int16_t* speech_frame, - size_t frame_length); - -#endif // WEBRTC_COMMON_AUDIO_VAD_VAD_CORE_H_ diff --git a/WebRtc.NET/include/webrtc/common_audio/vad/vad_unittest.h b/WebRtc.NET/include/webrtc/common_audio/vad/vad_unittest.h deleted file mode 100644 index 55ba5271..00000000 --- a/WebRtc.NET/include/webrtc/common_audio/vad/vad_unittest.h +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_COMMON_AUDIO_VAD_VAD_UNITTEST_H -#define WEBRTC_COMMON_AUDIO_VAD_VAD_UNITTEST_H - -#include // size_t - -#include "webrtc/test/gtest.h" -#include "webrtc/typedefs.h" - -namespace { - -// Modes we support -const int kModes[] = { 0, 1, 2, 3 }; -const size_t kModesSize = sizeof(kModes) / sizeof(*kModes); - -// Rates we support. -const int kRates[] = { 8000, 12000, 16000, 24000, 32000, 48000 }; -const size_t kRatesSize = sizeof(kRates) / sizeof(*kRates); - -// Frame lengths we support. -const size_t kMaxFrameLength = 1440; -const size_t kFrameLengths[] = { 80, 120, 160, 240, 320, 480, 640, 960, - kMaxFrameLength }; -const size_t kFrameLengthsSize = sizeof(kFrameLengths) / sizeof(*kFrameLengths); - -} // namespace - -class VadTest : public ::testing::Test { - protected: - VadTest(); - virtual void SetUp(); - virtual void TearDown(); - - // Returns true if the rate and frame length combination is valid. - bool ValidRatesAndFrameLengths(int rate, size_t frame_length); -}; - -#endif // WEBRTC_COMMON_AUDIO_VAD_VAD_UNITTEST_H diff --git a/WebRtc.NET/include/webrtc/common_types.h b/WebRtc.NET/include/webrtc/common_types.h deleted file mode 100644 index 948bd006..00000000 --- a/WebRtc.NET/include/webrtc/common_types.h +++ /dev/null @@ -1,916 +0,0 @@ -/* - * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_COMMON_TYPES_H_ -#define WEBRTC_COMMON_TYPES_H_ - -#include -#include - -#include -#include -#include - -#include "webrtc/api/video/video_rotation.h" -#include "webrtc/base/checks.h" -#include "webrtc/base/optional.h" -#include "webrtc/typedefs.h" - -#if defined(_MSC_VER) -// Disable "new behavior: elements of array will be default initialized" -// warning. Affects OverUseDetectorOptions. -#pragma warning(disable : 4351) -#endif - -#if defined(WEBRTC_EXPORT) -#define WEBRTC_DLLEXPORT _declspec(dllexport) -#elif defined(WEBRTC_DLL) -#define WEBRTC_DLLEXPORT _declspec(dllimport) -#else -#define WEBRTC_DLLEXPORT -#endif - -#ifndef NULL -#define NULL 0 -#endif - -#define RTP_PAYLOAD_NAME_SIZE 32u - -#if defined(WEBRTC_WIN) || defined(WIN32) -// Compares two strings without regard to case. -#define STR_CASE_CMP(s1, s2) ::_stricmp(s1, s2) -// Compares characters of two strings without regard to case. -#define STR_NCASE_CMP(s1, s2, n) ::_strnicmp(s1, s2, n) -#else -#define STR_CASE_CMP(s1, s2) ::strcasecmp(s1, s2) -#define STR_NCASE_CMP(s1, s2, n) ::strncasecmp(s1, s2, n) -#endif - -namespace webrtc { - -class RewindableStream { - public: - virtual ~RewindableStream() {} - virtual int Rewind() = 0; -}; - -class InStream : public RewindableStream { - public: - // Reads |len| bytes from file to |buf|. Returns the number of bytes read - // or -1 on error. - virtual int Read(void* buf, size_t len) = 0; -}; - -class OutStream : public RewindableStream { - public: - // Writes |len| bytes from |buf| to file. The actual writing may happen - // some time later. Call Flush() to force a write. - virtual bool Write(const void* buf, size_t len) = 0; -}; - -enum TraceModule { - kTraceUndefined = 0, - // not a module, triggered from the engine code - kTraceVoice = 0x0001, - // not a module, triggered from the engine code - kTraceVideo = 0x0002, - // not a module, triggered from the utility code - kTraceUtility = 0x0003, - kTraceRtpRtcp = 0x0004, - kTraceTransport = 0x0005, - kTraceSrtp = 0x0006, - kTraceAudioCoding = 0x0007, - kTraceAudioMixerServer = 0x0008, - kTraceAudioMixerClient = 0x0009, - kTraceFile = 0x000a, - kTraceAudioProcessing = 0x000b, - kTraceVideoCoding = 0x0010, - kTraceVideoMixer = 0x0011, - kTraceAudioDevice = 0x0012, - kTraceVideoRenderer = 0x0014, - kTraceVideoCapture = 0x0015, - kTraceRemoteBitrateEstimator = 0x0017, -}; - -enum TraceLevel { - kTraceNone = 0x0000, // no trace - kTraceStateInfo = 0x0001, - kTraceWarning = 0x0002, - kTraceError = 0x0004, - kTraceCritical = 0x0008, - kTraceApiCall = 0x0010, - kTraceDefault = 0x00ff, - - kTraceModuleCall = 0x0020, - kTraceMemory = 0x0100, // memory info - kTraceTimer = 0x0200, // timing info - kTraceStream = 0x0400, // "continuous" stream of data - - // used for debug purposes - kTraceDebug = 0x0800, // debug - kTraceInfo = 0x1000, // debug info - - // Non-verbose level used by LS_INFO of logging.h. Do not use directly. - kTraceTerseInfo = 0x2000, - - kTraceAll = 0xffff -}; - -// External Trace API -class TraceCallback { - public: - virtual void Print(TraceLevel level, const char* message, int length) = 0; - - protected: - virtual ~TraceCallback() {} - TraceCallback() {} -}; - -enum FileFormats { - kFileFormatWavFile = 1, - kFileFormatCompressedFile = 2, - kFileFormatPreencodedFile = 4, - kFileFormatPcm16kHzFile = 7, - kFileFormatPcm8kHzFile = 8, - kFileFormatPcm32kHzFile = 9 -}; - -enum ProcessingTypes { - kPlaybackPerChannel = 0, - kPlaybackAllChannelsMixed, - kRecordingPerChannel, - kRecordingAllChannelsMixed, - kRecordingPreprocessing -}; - -enum FrameType { - kEmptyFrame = 0, - kAudioFrameSpeech = 1, - kAudioFrameCN = 2, - kVideoFrameKey = 3, - kVideoFrameDelta = 4, -}; - -// Statistics for an RTCP channel -struct RtcpStatistics { - RtcpStatistics() - : fraction_lost(0), - cumulative_lost(0), - extended_max_sequence_number(0), - jitter(0) {} - - uint8_t fraction_lost; - uint32_t cumulative_lost; - uint32_t extended_max_sequence_number; - uint32_t jitter; -}; - -class RtcpStatisticsCallback { - public: - virtual ~RtcpStatisticsCallback() {} - - virtual void StatisticsUpdated(const RtcpStatistics& statistics, - uint32_t ssrc) = 0; - virtual void CNameChanged(const char* cname, uint32_t ssrc) = 0; -}; - -// Statistics for RTCP packet types. -struct RtcpPacketTypeCounter { - RtcpPacketTypeCounter() - : first_packet_time_ms(-1), - nack_packets(0), - fir_packets(0), - pli_packets(0), - nack_requests(0), - unique_nack_requests(0) {} - - void Add(const RtcpPacketTypeCounter& other) { - nack_packets += other.nack_packets; - fir_packets += other.fir_packets; - pli_packets += other.pli_packets; - nack_requests += other.nack_requests; - unique_nack_requests += other.unique_nack_requests; - if (other.first_packet_time_ms != -1 && - (other.first_packet_time_ms < first_packet_time_ms || - first_packet_time_ms == -1)) { - // Use oldest time. - first_packet_time_ms = other.first_packet_time_ms; - } - } - - void Subtract(const RtcpPacketTypeCounter& other) { - nack_packets -= other.nack_packets; - fir_packets -= other.fir_packets; - pli_packets -= other.pli_packets; - nack_requests -= other.nack_requests; - unique_nack_requests -= other.unique_nack_requests; - if (other.first_packet_time_ms != -1 && - (other.first_packet_time_ms > first_packet_time_ms || - first_packet_time_ms == -1)) { - // Use youngest time. - first_packet_time_ms = other.first_packet_time_ms; - } - } - - int64_t TimeSinceFirstPacketInMs(int64_t now_ms) const { - return (first_packet_time_ms == -1) ? -1 : (now_ms - first_packet_time_ms); - } - - int UniqueNackRequestsInPercent() const { - if (nack_requests == 0) { - return 0; - } - return static_cast((unique_nack_requests * 100.0f / nack_requests) + - 0.5f); - } - - int64_t first_packet_time_ms; // Time when first packet is sent/received. - uint32_t nack_packets; // Number of RTCP NACK packets. - uint32_t fir_packets; // Number of RTCP FIR packets. - uint32_t pli_packets; // Number of RTCP PLI packets. - uint32_t nack_requests; // Number of NACKed RTP packets. - uint32_t unique_nack_requests; // Number of unique NACKed RTP packets. -}; - -class RtcpPacketTypeCounterObserver { - public: - virtual ~RtcpPacketTypeCounterObserver() {} - virtual void RtcpPacketTypesCounterUpdated( - uint32_t ssrc, - const RtcpPacketTypeCounter& packet_counter) = 0; -}; - -// Rate statistics for a stream. -struct BitrateStatistics { - BitrateStatistics() : bitrate_bps(0), packet_rate(0) {} - - uint32_t bitrate_bps; // Bitrate in bits per second. - uint32_t packet_rate; // Packet rate in packets per second. -}; - -// Callback, used to notify an observer whenever new rates have been estimated. -class BitrateStatisticsObserver { - public: - virtual ~BitrateStatisticsObserver() {} - - virtual void Notify(uint32_t total_bitrate_bps, - uint32_t retransmit_bitrate_bps, - uint32_t ssrc) = 0; -}; - -struct FrameCounts { - FrameCounts() : key_frames(0), delta_frames(0) {} - int key_frames; - int delta_frames; -}; - -// Callback, used to notify an observer whenever frame counts have been updated. -class FrameCountObserver { - public: - virtual ~FrameCountObserver() {} - virtual void FrameCountUpdated(const FrameCounts& frame_counts, - uint32_t ssrc) = 0; -}; - -// Callback, used to notify an observer whenever the send-side delay is updated. -class SendSideDelayObserver { - public: - virtual ~SendSideDelayObserver() {} - virtual void SendSideDelayUpdated(int avg_delay_ms, - int max_delay_ms, - uint32_t ssrc) = 0; -}; - -// Callback, used to notify an observer whenever a packet is sent to the -// transport. -// TODO(asapersson): This class will remove the need for SendSideDelayObserver. -// Remove SendSideDelayObserver once possible. -class SendPacketObserver { - public: - virtual ~SendPacketObserver() {} - virtual void OnSendPacket(uint16_t packet_id, - int64_t capture_time_ms, - uint32_t ssrc) = 0; -}; - -// Callback, used to notify an observer when the overhead per packet -// has changed. -class OverheadObserver { - public: - virtual ~OverheadObserver() = default; - virtual void OnOverheadChanged(size_t overhead_bytes_per_packet) = 0; -}; - -// ================================================================== -// Voice specific types -// ================================================================== - -// Each codec supported can be described by this structure. -struct CodecInst { - int pltype; - char plname[RTP_PAYLOAD_NAME_SIZE]; - int plfreq; - int pacsize; - size_t channels; - int rate; // bits/sec unlike {start,min,max}Bitrate elsewhere in this file! - - bool operator==(const CodecInst& other) const { - return pltype == other.pltype && - (STR_CASE_CMP(plname, other.plname) == 0) && - plfreq == other.plfreq && pacsize == other.pacsize && - channels == other.channels && rate == other.rate; - } - - bool operator!=(const CodecInst& other) const { return !(*this == other); } - - friend std::ostream& operator<<(std::ostream& os, const CodecInst& ci) { - os << "{pltype: " << ci.pltype; - os << ", plname: " << ci.plname; - os << ", plfreq: " << ci.plfreq; - os << ", pacsize: " << ci.pacsize; - os << ", channels: " << ci.channels; - os << ", rate: " << ci.rate << "}"; - return os; - } -}; - -// RTP -enum { kRtpCsrcSize = 15 }; // RFC 3550 page 13 - -enum PayloadFrequencies { - kFreq8000Hz = 8000, - kFreq16000Hz = 16000, - kFreq32000Hz = 32000 -}; - -// Degree of bandwidth reduction. -enum VadModes { - kVadConventional = 0, // lowest reduction - kVadAggressiveLow, - kVadAggressiveMid, - kVadAggressiveHigh // highest reduction -}; - -// NETEQ statistics. -struct NetworkStatistics { - // current jitter buffer size in ms - uint16_t currentBufferSize; - // preferred (optimal) buffer size in ms - uint16_t preferredBufferSize; - // adding extra delay due to "peaky jitter" - bool jitterPeaksFound; - // Loss rate (network + late); fraction between 0 and 1, scaled to Q14. - uint16_t currentPacketLossRate; - // Late loss rate; fraction between 0 and 1, scaled to Q14. - uint16_t currentDiscardRate; - // fraction (of original stream) of synthesized audio inserted through - // expansion (in Q14) - uint16_t currentExpandRate; - // fraction (of original stream) of synthesized speech inserted through - // expansion (in Q14) - uint16_t currentSpeechExpandRate; - // fraction of synthesized speech inserted through pre-emptive expansion - // (in Q14) - uint16_t currentPreemptiveRate; - // fraction of data removed through acceleration (in Q14) - uint16_t currentAccelerateRate; - // fraction of data coming from secondary decoding (in Q14) - uint16_t currentSecondaryDecodedRate; - // clock-drift in parts-per-million (negative or positive) - int32_t clockDriftPPM; - // average packet waiting time in the jitter buffer (ms) - int meanWaitingTimeMs; - // median packet waiting time in the jitter buffer (ms) - int medianWaitingTimeMs; - // min packet waiting time in the jitter buffer (ms) - int minWaitingTimeMs; - // max packet waiting time in the jitter buffer (ms) - int maxWaitingTimeMs; - // added samples in off mode due to packet loss - size_t addedSamples; -}; - -// Statistics for calls to AudioCodingModule::PlayoutData10Ms(). -struct AudioDecodingCallStats { - AudioDecodingCallStats() - : calls_to_silence_generator(0), - calls_to_neteq(0), - decoded_normal(0), - decoded_plc(0), - decoded_cng(0), - decoded_plc_cng(0), - decoded_muted_output(0) {} - - int calls_to_silence_generator; // Number of calls where silence generated, - // and NetEq was disengaged from decoding. - int calls_to_neteq; // Number of calls to NetEq. - int decoded_normal; // Number of calls where audio RTP packet decoded. - int decoded_plc; // Number of calls resulted in PLC. - int decoded_cng; // Number of calls where comfort noise generated due to DTX. - int decoded_plc_cng; // Number of calls resulted where PLC faded to CNG. - int decoded_muted_output; // Number of calls returning a muted state output. -}; - -// Type of Noise Suppression. -enum NsModes { - kNsUnchanged = 0, // previously set mode - kNsDefault, // platform default - kNsConference, // conferencing default - kNsLowSuppression, // lowest suppression - kNsModerateSuppression, - kNsHighSuppression, - kNsVeryHighSuppression, // highest suppression -}; - -// Type of Automatic Gain Control. -enum AgcModes { - kAgcUnchanged = 0, // previously set mode - kAgcDefault, // platform default - // adaptive mode for use when analog volume control exists (e.g. for - // PC softphone) - kAgcAdaptiveAnalog, - // scaling takes place in the digital domain (e.g. for conference servers - // and embedded devices) - kAgcAdaptiveDigital, - // can be used on embedded devices where the capture signal level - // is predictable - kAgcFixedDigital -}; - -// Type of Echo Control. -enum EcModes { - kEcUnchanged = 0, // previously set mode - kEcDefault, // platform default - kEcConference, // conferencing default (aggressive AEC) - kEcAec, // Acoustic Echo Cancellation - kEcAecm, // AEC mobile -}; - -// Mode of AECM. -enum AecmModes { - kAecmQuietEarpieceOrHeadset = 0, - // Quiet earpiece or headset use - kAecmEarpiece, // most earpiece use - kAecmLoudEarpiece, // Loud earpiece or quiet speakerphone use - kAecmSpeakerphone, // most speakerphone use (default) - kAecmLoudSpeakerphone // Loud speakerphone -}; - -// AGC configuration parameters -struct AgcConfig { - unsigned short targetLeveldBOv; - unsigned short digitalCompressionGaindB; - bool limiterEnable; -}; - -enum StereoChannel { kStereoLeft = 0, kStereoRight, kStereoBoth }; - -// Audio device layers -enum AudioLayers { - kAudioPlatformDefault = 0, - kAudioWindowsWave = 1, - kAudioWindowsCore = 2, - kAudioLinuxAlsa = 3, - kAudioLinuxPulse = 4 -}; - -// ================================================================== -// Video specific types -// ================================================================== - -// Raw video types -enum RawVideoType { - kVideoI420 = 0, - kVideoYV12 = 1, - kVideoYUY2 = 2, - kVideoUYVY = 3, - kVideoIYUV = 4, - kVideoARGB = 5, - kVideoRGB24 = 6, - kVideoRGB565 = 7, - kVideoARGB4444 = 8, - kVideoARGB1555 = 9, - kVideoMJPEG = 10, - kVideoNV12 = 11, - kVideoNV21 = 12, - kVideoBGRA = 13, - kVideoUnknown = 99 -}; - -// Video codec -enum { kConfigParameterSize = 128 }; -enum { kPayloadNameSize = 32 }; -enum { kMaxSimulcastStreams = 4 }; -enum { kMaxSpatialLayers = 5 }; -enum { kMaxTemporalStreams = 4 }; - -enum VideoCodecComplexity { - kComplexityNormal = 0, - kComplexityHigh = 1, - kComplexityHigher = 2, - kComplexityMax = 3 -}; - -enum VP8ResilienceMode { - kResilienceOff, // The stream produced by the encoder requires a - // recovery frame (typically a key frame) to be - // decodable after a packet loss. - kResilientStream, // A stream produced by the encoder is resilient to - // packet losses, but packets within a frame subsequent - // to a loss can't be decoded. - kResilientFrames // Same as kResilientStream but with added resilience - // within a frame. -}; - -class TemporalLayersFactory; -// VP8 specific -struct VideoCodecVP8 { - bool pictureLossIndicationOn; - bool feedbackModeOn; - VideoCodecComplexity complexity; - VP8ResilienceMode resilience; - unsigned char numberOfTemporalLayers; - bool denoisingOn; - bool errorConcealmentOn; - bool automaticResizeOn; - bool frameDroppingOn; - int keyFrameInterval; - TemporalLayersFactory* tl_factory; -}; - -// VP9 specific. -struct VideoCodecVP9 { - VideoCodecComplexity complexity; - int resilience; - unsigned char numberOfTemporalLayers; - bool denoisingOn; - bool frameDroppingOn; - int keyFrameInterval; - bool adaptiveQpMode; - bool automaticResizeOn; - unsigned char numberOfSpatialLayers; - bool flexibleMode; -}; - -// TODO(magjed): Move this and other H264 related classes out to their own file. -namespace H264 { - -enum Profile { - kProfileConstrainedBaseline, - kProfileBaseline, - kProfileMain, - kProfileConstrainedHigh, - kProfileHigh, -}; - -} // namespace H264 - -// H264 specific. -struct VideoCodecH264 { - bool frameDroppingOn; - int keyFrameInterval; - // These are NULL/0 if not externally negotiated. - const uint8_t* spsData; - size_t spsLen; - const uint8_t* ppsData; - size_t ppsLen; - H264::Profile profile; -}; - -// Video codec types -enum VideoCodecType { - kVideoCodecVP8, - kVideoCodecVP9, - kVideoCodecH264, - kVideoCodecI420, - kVideoCodecRED, - kVideoCodecULPFEC, - kVideoCodecFlexfec, - kVideoCodecGeneric, - kVideoCodecUnknown -}; - -// Translates from name of codec to codec type and vice versa. -rtc::Optional CodecTypeToPayloadName(VideoCodecType type); -rtc::Optional PayloadNameToCodecType(const std::string& name); - -union VideoCodecUnion { - VideoCodecVP8 VP8; - VideoCodecVP9 VP9; - VideoCodecH264 H264; -}; - -// Simulcast is when the same stream is encoded multiple times with different -// settings such as resolution. -struct SimulcastStream { - unsigned short width; - unsigned short height; - unsigned char numberOfTemporalLayers; - unsigned int maxBitrate; // kilobits/sec. - unsigned int targetBitrate; // kilobits/sec. - unsigned int minBitrate; // kilobits/sec. - unsigned int qpMax; // minimum quality -}; - -struct SpatialLayer { - int scaling_factor_num; - int scaling_factor_den; - int target_bitrate_bps; - // TODO(ivica): Add max_quantizer and min_quantizer? -}; - -enum VideoCodecMode { kRealtimeVideo, kScreensharing }; - -// Common video codec properties -class VideoCodec { - public: - VideoCodec(); - - // Public variables. TODO(hta): Make them private with accessors. - VideoCodecType codecType; - char plName[kPayloadNameSize]; - unsigned char plType; - - unsigned short width; - unsigned short height; - - unsigned int startBitrate; // kilobits/sec. - unsigned int maxBitrate; // kilobits/sec. - unsigned int minBitrate; // kilobits/sec. - unsigned int targetBitrate; // kilobits/sec. - - unsigned char maxFramerate; - - unsigned int qpMax; - unsigned char numberOfSimulcastStreams; - SimulcastStream simulcastStream[kMaxSimulcastStreams]; - SpatialLayer spatialLayers[kMaxSpatialLayers]; - - VideoCodecMode mode; - bool expect_encode_from_texture; - - bool operator==(const VideoCodec& other) const = delete; - bool operator!=(const VideoCodec& other) const = delete; - - // Accessors for codec specific information. - // There is a const version of each that returns a reference, - // and a non-const version that returns a pointer, in order - // to allow modification of the parameters. - VideoCodecVP8* VP8(); - const VideoCodecVP8& VP8() const; - VideoCodecVP9* VP9(); - const VideoCodecVP9& VP9() const; - VideoCodecH264* H264(); - const VideoCodecH264& H264() const; - - private: - // TODO(hta): Consider replacing the union with a pointer type. - // This will allow removing the VideoCodec* types from this file. - VideoCodecUnion codec_specific_; -}; - -class BitrateAllocation { - public: - static const uint32_t kMaxBitrateBps; - BitrateAllocation(); - - bool SetBitrate(size_t spatial_index, - size_t temporal_index, - uint32_t bitrate_bps); - - uint32_t GetBitrate(size_t spatial_index, size_t temporal_index) const; - - // Get the sum of all the temporal layer for a specific spatial layer. - uint32_t GetSpatialLayerSum(size_t spatial_index) const; - - uint32_t get_sum_bps() const { return sum_; } // Sum of all bitrates. - uint32_t get_sum_kbps() const { return (sum_ + 500) / 1000; } - - inline bool operator==(const BitrateAllocation& other) const { - return memcmp(bitrates_, other.bitrates_, sizeof(bitrates_)) == 0; - } - inline bool operator!=(const BitrateAllocation& other) const { - return !(*this == other); - } - - private: - uint32_t sum_; - uint32_t bitrates_[kMaxSpatialLayers][kMaxTemporalStreams]; -}; - -// Bandwidth over-use detector options. These are used to drive -// experimentation with bandwidth estimation parameters. -// See modules/remote_bitrate_estimator/overuse_detector.h -// TODO(terelius): This is only used in overuse_estimator.cc, and only in the -// default constructed state. Can we move the relevant variables into that -// class and delete this? See also disabled warning at line 27 -struct OverUseDetectorOptions { - OverUseDetectorOptions() - : initial_slope(8.0 / 512.0), - initial_offset(0), - initial_e(), - initial_process_noise(), - initial_avg_noise(0.0), - initial_var_noise(50) { - initial_e[0][0] = 100; - initial_e[1][1] = 1e-1; - initial_e[0][1] = initial_e[1][0] = 0; - initial_process_noise[0] = 1e-13; - initial_process_noise[1] = 1e-3; - } - double initial_slope; - double initial_offset; - double initial_e[2][2]; - double initial_process_noise[2]; - double initial_avg_noise; - double initial_var_noise; -}; - -// This structure will have the information about when packet is actually -// received by socket. -struct PacketTime { - PacketTime() : timestamp(-1), not_before(-1) {} - PacketTime(int64_t timestamp, int64_t not_before) - : timestamp(timestamp), not_before(not_before) {} - - int64_t timestamp; // Receive time after socket delivers the data. - int64_t not_before; // Earliest possible time the data could have arrived, - // indicating the potential error in the |timestamp| - // value,in case the system is busy. - // For example, the time of the last select() call. - // If unknown, this value will be set to zero. -}; - -// Minimum and maximum playout delay values from capture to render. -// These are best effort values. -// -// A value < 0 indicates no change from previous valid value. -// -// min = max = 0 indicates that the receiver should try and render -// frame as soon as possible. -// -// min = x, max = y indicates that the receiver is free to adapt -// in the range (x, y) based on network jitter. -// -// Note: Given that this gets embedded in a union, it is up-to the owner to -// initialize these values. -struct PlayoutDelay { - int min_ms; - int max_ms; -}; - -struct RTPHeaderExtension { - RTPHeaderExtension(); - - bool hasTransmissionTimeOffset; - int32_t transmissionTimeOffset; - bool hasAbsoluteSendTime; - uint32_t absoluteSendTime; - bool hasTransportSequenceNumber; - uint16_t transportSequenceNumber; - - // Audio Level includes both level in dBov and voiced/unvoiced bit. See: - // https://datatracker.ietf.org/doc/draft-lennox-avt-rtp-audio-level-exthdr/ - bool hasAudioLevel; - bool voiceActivity; - uint8_t audioLevel; - - // For Coordination of Video Orientation. See - // http://www.etsi.org/deliver/etsi_ts/126100_126199/126114/12.07.00_60/ - // ts_126114v120700p.pdf - bool hasVideoRotation; - VideoRotation videoRotation; - - PlayoutDelay playout_delay = {-1, -1}; -}; - -struct RTPHeader { - RTPHeader(); - - bool markerBit; - uint8_t payloadType; - uint16_t sequenceNumber; - uint32_t timestamp; - uint32_t ssrc; - uint8_t numCSRCs; - uint32_t arrOfCSRCs[kRtpCsrcSize]; - size_t paddingLength; - size_t headerLength; - int payload_type_frequency; - RTPHeaderExtension extension; -}; - -struct RtpPacketCounter { - RtpPacketCounter() - : header_bytes(0), payload_bytes(0), padding_bytes(0), packets(0) {} - - void Add(const RtpPacketCounter& other) { - header_bytes += other.header_bytes; - payload_bytes += other.payload_bytes; - padding_bytes += other.padding_bytes; - packets += other.packets; - } - - void Subtract(const RtpPacketCounter& other) { - RTC_DCHECK_GE(header_bytes, other.header_bytes); - header_bytes -= other.header_bytes; - RTC_DCHECK_GE(payload_bytes, other.payload_bytes); - payload_bytes -= other.payload_bytes; - RTC_DCHECK_GE(padding_bytes, other.padding_bytes); - padding_bytes -= other.padding_bytes; - RTC_DCHECK_GE(packets, other.packets); - packets -= other.packets; - } - - void AddPacket(size_t packet_length, const RTPHeader& header) { - ++packets; - header_bytes += header.headerLength; - padding_bytes += header.paddingLength; - payload_bytes += - packet_length - (header.headerLength + header.paddingLength); - } - - size_t TotalBytes() const { - return header_bytes + payload_bytes + padding_bytes; - } - - size_t header_bytes; // Number of bytes used by RTP headers. - size_t payload_bytes; // Payload bytes, excluding RTP headers and padding. - size_t padding_bytes; // Number of padding bytes. - uint32_t packets; // Number of packets. -}; - -// Data usage statistics for a (rtp) stream. -struct StreamDataCounters { - StreamDataCounters(); - - void Add(const StreamDataCounters& other) { - transmitted.Add(other.transmitted); - retransmitted.Add(other.retransmitted); - fec.Add(other.fec); - if (other.first_packet_time_ms != -1 && - (other.first_packet_time_ms < first_packet_time_ms || - first_packet_time_ms == -1)) { - // Use oldest time. - first_packet_time_ms = other.first_packet_time_ms; - } - } - - void Subtract(const StreamDataCounters& other) { - transmitted.Subtract(other.transmitted); - retransmitted.Subtract(other.retransmitted); - fec.Subtract(other.fec); - if (other.first_packet_time_ms != -1 && - (other.first_packet_time_ms > first_packet_time_ms || - first_packet_time_ms == -1)) { - // Use youngest time. - first_packet_time_ms = other.first_packet_time_ms; - } - } - - int64_t TimeSinceFirstPacketInMs(int64_t now_ms) const { - return (first_packet_time_ms == -1) ? -1 : (now_ms - first_packet_time_ms); - } - - // Returns the number of bytes corresponding to the actual media payload (i.e. - // RTP headers, padding, retransmissions and fec packets are excluded). - // Note this function does not have meaning for an RTX stream. - size_t MediaPayloadBytes() const { - return transmitted.payload_bytes - retransmitted.payload_bytes - - fec.payload_bytes; - } - - int64_t first_packet_time_ms; // Time when first packet is sent/received. - RtpPacketCounter transmitted; // Number of transmitted packets/bytes. - RtpPacketCounter retransmitted; // Number of retransmitted packets/bytes. - RtpPacketCounter fec; // Number of redundancy packets/bytes. -}; - -// Callback, called whenever byte/packet counts have been updated. -class StreamDataCountersCallback { - public: - virtual ~StreamDataCountersCallback() {} - - virtual void DataCountersUpdated(const StreamDataCounters& counters, - uint32_t ssrc) = 0; -}; - -// RTCP mode to use. Compound mode is described by RFC 4585 and reduced-size -// RTCP mode is described by RFC 5506. -enum class RtcpMode { kOff, kCompound, kReducedSize }; - -enum NetworkState { - kNetworkUp, - kNetworkDown, -}; - -} // namespace webrtc - -#endif // WEBRTC_COMMON_TYPES_H_ diff --git a/WebRtc.NET/include/webrtc/common_video/h264/profile_level_id.h b/WebRtc.NET/include/webrtc/common_video/h264/profile_level_id.h deleted file mode 100644 index 20147bb6..00000000 --- a/WebRtc.NET/include/webrtc/common_video/h264/profile_level_id.h +++ /dev/null @@ -1,102 +0,0 @@ -/* - * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_COMMON_VIDEO_H264_PROFILE_LEVEL_ID_H_ -#define WEBRTC_COMMON_VIDEO_H264_PROFILE_LEVEL_ID_H_ - -#include -#include - -#include "webrtc/base/optional.h" -#include "webrtc/common_types.h" - -namespace webrtc { -namespace H264 { - -// Map containting SDP codec parameters. -typedef std::map CodecParameterMap; - -// All values are equal to ten times the level number, except level 1b which is -// special. -enum Level { - kLevel1_b = 0, - kLevel1 = 10, - kLevel1_1 = 11, - kLevel1_2 = 12, - kLevel1_3 = 13, - kLevel2 = 20, - kLevel2_1 = 21, - kLevel2_2 = 22, - kLevel3 = 30, - kLevel3_1 = 31, - kLevel3_2 = 32, - kLevel4 = 40, - kLevel4_1 = 41, - kLevel4_2 = 42, - kLevel5 = 50, - kLevel5_1 = 51, - kLevel5_2 = 52 -}; - -struct ProfileLevelId { - ProfileLevelId(Profile profile, Level level) - : profile(profile), level(level) {} - Profile profile; - Level level; -}; - -// Parse profile level id that is represented as a string of 3 hex bytes. -// Nothing will be returned if the string is not a recognized H264 -// profile level id. -rtc::Optional ParseProfileLevelId(const char* str); - -// Parse profile level id that is represented as a string of 3 hex bytes -// contained in an SDP key-value map. A default profile level id will be -// returned if the profile-level-id key is missing. Nothing will be returned if -// the key is present but the string is invalid. -rtc::Optional ParseSdpProfileLevelId( - const CodecParameterMap& params); - -// Given that a decoder supports up to a given frame size (in pixels) at up to a -// given number of frames per second, return the highest H.264 level where it -// can guarantee that it will be able to support all valid encoded streams that -// are within that level. -rtc::Optional SupportedLevel(int max_frame_pixel_count, float max_fps); - -// Returns canonical string representation as three hex bytes of the profile -// level id, or returns nothing for invalid profile level ids. -rtc::Optional ProfileLevelIdToString( - const ProfileLevelId& profile_level_id); - -// Generate codec parameters that will be used as answer in an SDP negotiation -// based on local supported parameters and remote offered parameters. Both -// |local_supported_params|, |remote_offered_params|, and |answer_params| -// represent sendrecv media descriptions, i.e they are a mix of both encode and -// decode capabilities. In theory, when the profile in |local_supported_params| -// represent a strict superset of the profile in |remote_offered_params|, we -// could limit the profile in |answer_params| to the profile in -// |remote_offered_params|. However, to simplify the code, each supported H264 -// profile should be listed explicitly in the list of local supported codecs, -// even if they are redundant. Then each local codec in the list should be -// tested one at a time against the remote codec, and only when the profiles are -// equal should this function be called. Therefore, this function does not need -// to handle profile intersection, and the profile of |local_supported_params| -// and |remote_offered_params| must be equal before calling this function. The -// parameters that are used when negotiating are the level part of -// profile-level-id and level-asymmetry-allowed. -void GenerateProfileLevelIdForAnswer( - const CodecParameterMap& local_supported_params, - const CodecParameterMap& remote_offered_params, - CodecParameterMap* answer_params); - -} // namespace H264 -} // namespace webrtc - -#endif // WEBRTC_COMMON_VIDEO_H264_PROFILE_LEVEL_ID_H_ diff --git a/WebRtc.NET/include/webrtc/common_video/include/bitrate_adjuster.h b/WebRtc.NET/include/webrtc/common_video/include/bitrate_adjuster.h deleted file mode 100644 index 5fd1e385..00000000 --- a/WebRtc.NET/include/webrtc/common_video/include/bitrate_adjuster.h +++ /dev/null @@ -1,89 +0,0 @@ -/* - * Copyright 2016 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_COMMON_VIDEO_INCLUDE_BITRATE_ADJUSTER_H_ -#define WEBRTC_COMMON_VIDEO_INCLUDE_BITRATE_ADJUSTER_H_ - -#include - -#include "webrtc/base/criticalsection.h" -#include "webrtc/base/rate_statistics.h" - -namespace webrtc { - -class Clock; - -// Certain hardware encoders tend to consistently overshoot the bitrate that -// they are configured to encode at. This class estimates an adjusted bitrate -// that when set on the encoder will produce the desired bitrate. -class BitrateAdjuster { - public: - // min_adjusted_bitrate_pct and max_adjusted_bitrate_pct are the lower and - // upper bound outputted adjusted bitrates as a percentage of the target - // bitrate. - BitrateAdjuster(Clock* clock, - float min_adjusted_bitrate_pct, - float max_adjusted_bitrate_pct); - virtual ~BitrateAdjuster() {} - - static const uint32_t kBitrateUpdateIntervalMs; - static const uint32_t kBitrateUpdateFrameInterval; - static const float kBitrateTolerancePct; - static const float kBytesPerMsToBitsPerSecond; - - // Sets the desired bitrate in bps (bits per second). - // Should be called at least once before Update. - void SetTargetBitrateBps(uint32_t bitrate_bps); - uint32_t GetTargetBitrateBps() const; - - // Returns the adjusted bitrate in bps. - uint32_t GetAdjustedBitrateBps() const; - - // Returns what we think the current bitrate is. - rtc::Optional GetEstimatedBitrateBps(); - - // This should be called after each frame is encoded. The timestamp at which - // it is called is used to estimate the output bitrate of the encoder. - // Should be called from only one thread. - void Update(size_t frame_size); - - private: - // Returns true if the bitrate is within kBitrateTolerancePct of bitrate_bps. - bool IsWithinTolerance(uint32_t bitrate_bps, uint32_t target_bitrate_bps); - - // Returns smallest possible adjusted value. - uint32_t GetMinAdjustedBitrateBps() const EXCLUSIVE_LOCKS_REQUIRED(crit_); - // Returns largest possible adjusted value. - uint32_t GetMaxAdjustedBitrateBps() const EXCLUSIVE_LOCKS_REQUIRED(crit_); - - void Reset(); - void UpdateBitrate(uint32_t current_time_ms) EXCLUSIVE_LOCKS_REQUIRED(crit_); - - rtc::CriticalSection crit_; - Clock* const clock_; - const float min_adjusted_bitrate_pct_; - const float max_adjusted_bitrate_pct_; - // The bitrate we want. - volatile uint32_t target_bitrate_bps_ GUARDED_BY(crit_); - // The bitrate we use to get what we want. - volatile uint32_t adjusted_bitrate_bps_ GUARDED_BY(crit_); - // The target bitrate that the adjusted bitrate was computed from. - volatile uint32_t last_adjusted_target_bitrate_bps_ GUARDED_BY(crit_); - // Used to estimate bitrate. - RateStatistics bitrate_tracker_ GUARDED_BY(crit_); - // The last time we tried to adjust the bitrate. - uint32_t last_bitrate_update_time_ms_ GUARDED_BY(crit_); - // The number of frames since the last time we tried to adjust the bitrate. - uint32_t frames_since_last_update_ GUARDED_BY(crit_); -}; - -} // namespace webrtc - -#endif // WEBRTC_COMMON_VIDEO_INCLUDE_BITRATE_ADJUSTER_H_ diff --git a/WebRtc.NET/include/webrtc/common_video/include/corevideo_frame_buffer.h b/WebRtc.NET/include/webrtc/common_video/include/corevideo_frame_buffer.h deleted file mode 100644 index a00b6770..00000000 --- a/WebRtc.NET/include/webrtc/common_video/include/corevideo_frame_buffer.h +++ /dev/null @@ -1,59 +0,0 @@ -/* - * Copyright 2016 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_COMMON_VIDEO_INCLUDE_COREVIDEO_FRAME_BUFFER_H_ -#define WEBRTC_COMMON_VIDEO_INCLUDE_COREVIDEO_FRAME_BUFFER_H_ - -#include - -#include - -#include "webrtc/common_video/include/video_frame_buffer.h" - -namespace webrtc { - -class CoreVideoFrameBuffer : public NativeHandleBuffer { - public: - explicit CoreVideoFrameBuffer(CVPixelBufferRef pixel_buffer); - CoreVideoFrameBuffer(CVPixelBufferRef pixel_buffer, - int adapted_width, - int adapted_height, - int crop_width, - int crop_height, - int crop_x, - int crop_y); - ~CoreVideoFrameBuffer() override; - - rtc::scoped_refptr NativeToI420Buffer() override; - // Returns true if the internal pixel buffer needs to be cropped. - bool RequiresCropping() const; - // Crop and scales the internal pixel buffer to the output pixel buffer. The - // tmp buffer is used for intermediary splitting the UV channels. This - // function returns true if successful. - bool CropAndScaleTo(std::vector* tmp_buffer, - CVPixelBufferRef output_pixel_buffer) const; - - private: - CVPixelBufferRef pixel_buffer_; - // buffer_width/height is the actual pixel buffer resolution. The width/height - // in NativeHandleBuffer, i.e. width()/height(), is the resolution we will - // scale to in NativeToI420Buffer(). Cropping happens before scaling, so: - // buffer_width >= crop_width >= width(). - const int buffer_width_; - const int buffer_height_; - const int crop_width_; - const int crop_height_; - const int crop_x_; - const int crop_y_; -}; - -} // namespace webrtc - -#endif // WEBRTC_COMMON_VIDEO_INCLUDE_COREVIDEO_FRAME_BUFFER_H_ diff --git a/WebRtc.NET/include/webrtc/common_video/include/frame_callback.h b/WebRtc.NET/include/webrtc/common_video/include/frame_callback.h deleted file mode 100644 index 81737c6b..00000000 --- a/WebRtc.NET/include/webrtc/common_video/include/frame_callback.h +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_COMMON_VIDEO_INCLUDE_FRAME_CALLBACK_H_ -#define WEBRTC_COMMON_VIDEO_INCLUDE_FRAME_CALLBACK_H_ - -#include -#include - -#include "webrtc/common_types.h" - -namespace webrtc { - -class VideoFrame; - -struct EncodedFrame { - public: - EncodedFrame() : data_(NULL), length_(0), frame_type_(kEmptyFrame) {} - EncodedFrame(const uint8_t* data, size_t length, FrameType frame_type) - : data_(data), length_(length), frame_type_(frame_type) {} - - const uint8_t* data_; - const size_t length_; - const FrameType frame_type_; -}; - -class I420FrameCallback { - public: - // This function is called with a I420 frame allowing the user to modify the - // frame content. - virtual void FrameCallback(VideoFrame* video_frame) = 0; - - protected: - virtual ~I420FrameCallback() {} -}; - -class EncodedFrameObserver { - public: - virtual void EncodedFrameCallback(const EncodedFrame& encoded_frame) = 0; - virtual void OnEncodeTiming(int64_t capture_ntp_ms, int encode_duration_ms) {} - - protected: - virtual ~EncodedFrameObserver() {} -}; - -} // namespace webrtc - -#endif // WEBRTC_COMMON_VIDEO_INCLUDE_FRAME_CALLBACK_H_ diff --git a/WebRtc.NET/include/webrtc/common_video/include/incoming_video_stream.h b/WebRtc.NET/include/webrtc/common_video/include/incoming_video_stream.h deleted file mode 100644 index 250bed8d..00000000 --- a/WebRtc.NET/include/webrtc/common_video/include/incoming_video_stream.h +++ /dev/null @@ -1,59 +0,0 @@ -/* - * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_COMMON_VIDEO_INCLUDE_INCOMING_VIDEO_STREAM_H_ -#define WEBRTC_COMMON_VIDEO_INCLUDE_INCOMING_VIDEO_STREAM_H_ - -#include - -#include "webrtc/base/criticalsection.h" -#include "webrtc/base/platform_thread.h" -#include "webrtc/base/race_checker.h" -#include "webrtc/base/thread_annotations.h" -#include "webrtc/base/thread_checker.h" -#include "webrtc/common_video/video_render_frames.h" -#include "webrtc/media/base/videosinkinterface.h" - -namespace webrtc { -class EventTimerWrapper; - -class IncomingVideoStream : public rtc::VideoSinkInterface { - public: - IncomingVideoStream(int32_t delay_ms, - rtc::VideoSinkInterface* callback); - ~IncomingVideoStream() override; - - protected: - static bool IncomingVideoStreamThreadFun(void* obj); - bool IncomingVideoStreamProcess(); - - private: - enum { kEventStartupTimeMs = 10 }; - enum { kEventMaxWaitTimeMs = 100 }; - enum { kFrameRatePeriodMs = 1000 }; - - void OnFrame(const VideoFrame& video_frame) override; - - rtc::ThreadChecker main_thread_checker_; - rtc::ThreadChecker render_thread_checker_; - rtc::RaceChecker decoder_race_checker_; - - rtc::CriticalSection buffer_critsect_; - rtc::PlatformThread incoming_render_thread_; - std::unique_ptr deliver_buffer_event_; - - rtc::VideoSinkInterface* const external_callback_; - std::unique_ptr render_buffers_ - GUARDED_BY(buffer_critsect_); -}; - -} // namespace webrtc - -#endif // WEBRTC_COMMON_VIDEO_INCLUDE_INCOMING_VIDEO_STREAM_H_ diff --git a/WebRtc.NET/include/webrtc/common_video/include/video_bitrate_allocator.h b/WebRtc.NET/include/webrtc/common_video/include/video_bitrate_allocator.h deleted file mode 100644 index b85879db..00000000 --- a/WebRtc.NET/include/webrtc/common_video/include/video_bitrate_allocator.h +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_COMMON_VIDEO_INCLUDE_VIDEO_BITRATE_ALLOCATOR_H_ -#define WEBRTC_COMMON_VIDEO_INCLUDE_VIDEO_BITRATE_ALLOCATOR_H_ - -#include "webrtc/common_types.h" - -namespace webrtc { - -class VideoBitrateAllocator { - public: - VideoBitrateAllocator() {} - virtual ~VideoBitrateAllocator() {} - - virtual BitrateAllocation GetAllocation(uint32_t total_bitrate, - uint32_t framerate) = 0; - virtual uint32_t GetPreferredBitrateBps(uint32_t framerate) = 0; -}; - -class VideoBitrateAllocationObserver { - public: - VideoBitrateAllocationObserver() {} - virtual ~VideoBitrateAllocationObserver() {} - - virtual void OnBitrateAllocationUpdated( - const BitrateAllocation& allocation) = 0; -}; - -} // namespace webrtc - -#endif // WEBRTC_COMMON_VIDEO_INCLUDE_VIDEO_BITRATE_ALLOCATOR_H_ diff --git a/WebRtc.NET/include/webrtc/common_video/include/video_frame_buffer.h b/WebRtc.NET/include/webrtc/common_video/include/video_frame_buffer.h deleted file mode 100644 index dfdd480b..00000000 --- a/WebRtc.NET/include/webrtc/common_video/include/video_frame_buffer.h +++ /dev/null @@ -1,92 +0,0 @@ -/* - * Copyright (c) 2015 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_COMMON_VIDEO_INCLUDE_VIDEO_FRAME_BUFFER_H_ -#define WEBRTC_COMMON_VIDEO_INCLUDE_VIDEO_FRAME_BUFFER_H_ - -#include - -#include "webrtc/api/video/video_frame_buffer.h" -// TODO(nisse): For backwards compatibility, files including this file -// expect it to declare I420Buffer. Delete after callers are updated. -#include "webrtc/api/video/i420_buffer.h" -#include "webrtc/base/callback.h" -#include "webrtc/base/scoped_ref_ptr.h" - -namespace webrtc { - -// Base class for native-handle buffer is a wrapper around a |native_handle|. -// This is used for convenience as most native-handle implementations can share -// many VideoFrame implementations, but need to implement a few others (such -// as their own destructors or conversion methods back to software I420). -class NativeHandleBuffer : public VideoFrameBuffer { - public: - NativeHandleBuffer(void* native_handle, int width, int height); - - int width() const override; - int height() const override; - const uint8_t* DataY() const override; - const uint8_t* DataU() const override; - const uint8_t* DataV() const override; - int StrideY() const override; - int StrideU() const override; - int StrideV() const override; - - void* native_handle() const override; - - protected: - void* native_handle_; - const int width_; - const int height_; -}; - -class WrappedI420Buffer : public webrtc::VideoFrameBuffer { - public: - WrappedI420Buffer(int width, - int height, - const uint8_t* y_plane, - int y_stride, - const uint8_t* u_plane, - int u_stride, - const uint8_t* v_plane, - int v_stride, - const rtc::Callback0& no_longer_used); - int width() const override; - int height() const override; - - const uint8_t* DataY() const override; - const uint8_t* DataU() const override; - const uint8_t* DataV() const override; - int StrideY() const override; - int StrideU() const override; - int StrideV() const override; - - void* native_handle() const override; - - rtc::scoped_refptr NativeToI420Buffer() override; - - private: - friend class rtc::RefCountedObject; - ~WrappedI420Buffer() override; - - const int width_; - const int height_; - const uint8_t* const y_plane_; - const uint8_t* const u_plane_; - const uint8_t* const v_plane_; - const int y_stride_; - const int u_stride_; - const int v_stride_; - rtc::Callback0 no_longer_used_cb_; -}; - -} // namespace webrtc - -#endif // WEBRTC_COMMON_VIDEO_INCLUDE_VIDEO_FRAME_BUFFER_H_ diff --git a/WebRtc.NET/include/webrtc/common_video/include/video_image.h b/WebRtc.NET/include/webrtc/common_video/include/video_image.h deleted file mode 100644 index 4a6e451c..00000000 --- a/WebRtc.NET/include/webrtc/common_video/include/video_image.h +++ /dev/null @@ -1,17 +0,0 @@ -/* - * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_COMMON_VIDEO_INCLUDE_VIDEO_IMAGE_H_ -#define WEBRTC_COMMON_VIDEO_INCLUDE_VIDEO_IMAGE_H_ - -// TODO(pbos): Remove this file and include webrtc/video_frame.h instead. -#include "webrtc/video_frame.h" - -#endif // WEBRTC_COMMON_VIDEO_INCLUDE_VIDEO_IMAGE_H_ diff --git a/WebRtc.NET/include/webrtc/common_video/libyuv/include/webrtc_libyuv.h b/WebRtc.NET/include/webrtc/common_video/libyuv/include/webrtc_libyuv.h deleted file mode 100644 index 6d7ed1fd..00000000 --- a/WebRtc.NET/include/webrtc/common_video/libyuv/include/webrtc_libyuv.h +++ /dev/null @@ -1,166 +0,0 @@ -/* - * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -/* - * WebRTC's wrapper to libyuv. - */ - -#ifndef WEBRTC_COMMON_VIDEO_LIBYUV_INCLUDE_WEBRTC_LIBYUV_H_ -#define WEBRTC_COMMON_VIDEO_LIBYUV_INCLUDE_WEBRTC_LIBYUV_H_ - -#include -#include - -#include "webrtc/api/video/video_frame.h" -#include "webrtc/common_types.h" // RawVideoTypes. -#include "webrtc/typedefs.h" - -namespace webrtc { - -class I420Buffer; - -// Supported video types. -enum VideoType { - kUnknown, - kI420, - kIYUV, - kRGB24, - kABGR, - kARGB, - kARGB4444, - kRGB565, - kARGB1555, - kYUY2, - kYV12, - kUYVY, - kMJPG, - kNV21, - kNV12, - kBGRA, -}; - -// This is the max PSNR value our algorithms can return. -const double kPerfectPSNR = 48.0f; - -// Conversion between the RawVideoType and the LibYuv videoType. -// TODO(wu): Consolidate types into one type throughout WebRtc. -VideoType RawVideoTypeToCommonVideoVideoType(RawVideoType type); - -// Calculate the required buffer size. -// Input: -// - type :The type of the designated video frame. -// - width :frame width in pixels. -// - height :frame height in pixels. -// Return value: :The required size in bytes to accommodate the specified -// video frame. -size_t CalcBufferSize(VideoType type, int width, int height); - -// TODO(mikhal): Add unit test for these two functions and determine location. -// Print VideoFrame to file -// Input: -// - frame : Reference to video frame. -// - file : pointer to file object. It is assumed that the file is -// already open for writing. -// Return value: 0 if OK, < 0 otherwise. -int PrintVideoFrame(const VideoFrame& frame, FILE* file); -int PrintVideoFrame(const VideoFrameBuffer& frame, FILE* file); - -// Extract buffer from VideoFrame or VideoFrameBuffer (consecutive -// planes, no stride) -// Input: -// - frame : Reference to video frame. -// - size : pointer to the size of the allocated buffer. If size is -// insufficient, an error will be returned. -// - buffer : Pointer to buffer -// Return value: length of buffer if OK, < 0 otherwise. -int ExtractBuffer(const rtc::scoped_refptr& input_frame, - size_t size, - uint8_t* buffer); -int ExtractBuffer(const VideoFrame& input_frame, size_t size, uint8_t* buffer); -// Convert To I420 -// Input: -// - src_video_type : Type of input video. -// - src_frame : Pointer to a source frame. -// - crop_x/crop_y : Starting positions for cropping (0 for no crop). -// - src_width : src width in pixels. -// - src_height : src height in pixels. -// - sample_size : Required only for the parsing of MJPG (set to 0 else). -// - rotate : Rotation mode of output image. -// Output: -// - dst_buffer : Reference to a destination frame buffer. -// Return value: 0 if OK, < 0 otherwise. - -// TODO(nisse): Delete this wrapper, and let users call libyuv directly. Most -// calls pass |src_video_type| == kI420, and should use libyuv::I420Copy. Also -// remember to delete the I420Buffer forward declaration above. The only -// exception at the time of this writing is VideoCaptureImpl::IncomingFrame, -// which still needs libyuv::ConvertToI420. -int ConvertToI420(VideoType src_video_type, - const uint8_t* src_frame, - int crop_x, - int crop_y, - int src_width, - int src_height, - size_t sample_size, - VideoRotation rotation, - I420Buffer* dst_buffer); - -// Convert From I420 -// Input: -// - src_frame : Reference to a source frame. -// - dst_video_type : Type of output video. -// - dst_sample_size : Required only for the parsing of MJPG. -// - dst_frame : Pointer to a destination frame. -// Return value: 0 if OK, < 0 otherwise. -// It is assumed that source and destination have equal height. -int ConvertFromI420(const VideoFrame& src_frame, - VideoType dst_video_type, - int dst_sample_size, - uint8_t* dst_frame); - -// Compute PSNR for an I420 frame (all planes). -// Returns the PSNR in decibel, to a maximum of kInfinitePSNR. -double I420PSNR(const VideoFrame* ref_frame, const VideoFrame* test_frame); -double I420PSNR(const VideoFrameBuffer& ref_buffer, - const VideoFrameBuffer& test_buffer); - -// Compute SSIM for an I420 frame (all planes). -double I420SSIM(const VideoFrame* ref_frame, const VideoFrame* test_frame); -double I420SSIM(const VideoFrameBuffer& ref_buffer, - const VideoFrameBuffer& test_buffer); - -// Helper function for scaling NV12 to NV12. -void NV12Scale(std::vector* tmp_buffer, - const uint8_t* src_y, int src_stride_y, - const uint8_t* src_uv, int src_stride_uv, - int src_width, int src_height, - uint8_t* dst_y, int dst_stride_y, - uint8_t* dst_uv, int dst_stride_uv, - int dst_width, int dst_height); - -// Helper class for directly converting and scaling NV12 to I420. The Y-plane -// will be scaled directly to the I420 destination, which makes this faster -// than separate NV12->I420 + I420->I420 scaling. -class NV12ToI420Scaler { - public: - void NV12ToI420Scale(const uint8_t* src_y, int src_stride_y, - const uint8_t* src_uv, int src_stride_uv, - int src_width, int src_height, - uint8_t* dst_y, int dst_stride_y, - uint8_t* dst_u, int dst_stride_u, - uint8_t* dst_v, int dst_stride_v, - int dst_width, int dst_height); - private: - std::vector tmp_uv_planes_; -}; - -} // namespace webrtc - -#endif // WEBRTC_COMMON_VIDEO_LIBYUV_INCLUDE_WEBRTC_LIBYUV_H_ diff --git a/WebRtc.NET/include/webrtc/common_video/rotation.h b/WebRtc.NET/include/webrtc/common_video/rotation.h deleted file mode 100644 index f01c8129..00000000 --- a/WebRtc.NET/include/webrtc/common_video/rotation.h +++ /dev/null @@ -1,18 +0,0 @@ -/* - * Copyright (c) 2015 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -// TODO(nisse): Delete this file, once downstream code is updated. - -#ifndef WEBRTC_COMMON_VIDEO_ROTATION_H_ -#define WEBRTC_COMMON_VIDEO_ROTATION_H_ - -#include "webrtc/api/video/video_rotation.h" - -#endif // WEBRTC_COMMON_VIDEO_ROTATION_H_ diff --git a/WebRtc.NET/include/webrtc/common_video/video_render_frames.h b/WebRtc.NET/include/webrtc/common_video/video_render_frames.h deleted file mode 100644 index 38bc0e9e..00000000 --- a/WebRtc.NET/include/webrtc/common_video/video_render_frames.h +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_COMMON_VIDEO_VIDEO_RENDER_FRAMES_H_ -#define WEBRTC_COMMON_VIDEO_VIDEO_RENDER_FRAMES_H_ - -#include - -#include - -#include "webrtc/api/video/video_frame.h" -#include "webrtc/base/optional.h" - -namespace webrtc { - -// Class definitions -class VideoRenderFrames { - public: - explicit VideoRenderFrames(uint32_t render_delay_ms); - VideoRenderFrames(const VideoRenderFrames&) = delete; - - // Add a frame to the render queue - int32_t AddFrame(const VideoFrame& new_frame); - - // Get a frame for rendering, or false if it's not time to render. - rtc::Optional FrameToRender(); - - // Returns the number of ms to next frame to render - uint32_t TimeToNextFrameRelease(); - - private: - // 10 seconds for 30 fps. - enum { KMaxNumberOfFrames = 300 }; - // Don't render frames with timestamp older than 500ms from now. - enum { KOldRenderTimestampMS = 500 }; - // Don't render frames with timestamp more than 10s into the future. - enum { KFutureRenderTimestampMS = 10000 }; - - // Sorted list with framed to be rendered, oldest first. - std::list incoming_frames_; - - // Estimated delay from a frame is released until it's rendered. - const uint32_t render_delay_ms_; -}; - -} // namespace webrtc - -#endif // WEBRTC_COMMON_VIDEO_VIDEO_RENDER_FRAMES_H_ diff --git a/WebRtc.NET/include/webrtc/config.h b/WebRtc.NET/include/webrtc/config.h deleted file mode 100644 index 22b279c4..00000000 --- a/WebRtc.NET/include/webrtc/config.h +++ /dev/null @@ -1,233 +0,0 @@ -/* - * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -// TODO(pbos): Move Config from common.h to here. - -#ifndef WEBRTC_CONFIG_H_ -#define WEBRTC_CONFIG_H_ - -#include -#include - -#include "webrtc/base/basictypes.h" -#include "webrtc/base/optional.h" -#include "webrtc/base/refcount.h" -#include "webrtc/base/scoped_ref_ptr.h" -#include "webrtc/common_types.h" -#include "webrtc/typedefs.h" - -namespace webrtc { - -// Settings for NACK, see RFC 4585 for details. -struct NackConfig { - NackConfig() : rtp_history_ms(0) {} - std::string ToString() const; - // Send side: the time RTP packets are stored for retransmissions. - // Receive side: the time the receiver is prepared to wait for - // retransmissions. - // Set to '0' to disable. - int rtp_history_ms; -}; - -// Settings for ULPFEC forward error correction. -// Set the payload types to '-1' to disable. -struct UlpfecConfig { - UlpfecConfig() - : ulpfec_payload_type(-1), - red_payload_type(-1), - red_rtx_payload_type(-1) {} - std::string ToString() const; - bool operator==(const UlpfecConfig& other) const; - - // Payload type used for ULPFEC packets. - int ulpfec_payload_type; - - // Payload type used for RED packets. - int red_payload_type; - - // RTX payload type for RED payload. - int red_rtx_payload_type; -}; - -// RTP header extension, see RFC 5285. -struct RtpExtension { - RtpExtension() : id(0) {} - RtpExtension(const std::string& uri, int id) : uri(uri), id(id) {} - std::string ToString() const; - bool operator==(const RtpExtension& rhs) const { - return uri == rhs.uri && id == rhs.id; - } - static bool IsSupportedForAudio(const std::string& uri); - static bool IsSupportedForVideo(const std::string& uri); - - // Header extension for audio levels, as defined in: - // http://tools.ietf.org/html/draft-ietf-avtext-client-to-mixer-audio-level-03 - static const char* kAudioLevelUri; - static const int kAudioLevelDefaultId; - - // Header extension for RTP timestamp offset, see RFC 5450 for details: - // http://tools.ietf.org/html/rfc5450 - static const char* kTimestampOffsetUri; - static const int kTimestampOffsetDefaultId; - - // Header extension for absolute send time, see url for details: - // http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time - static const char* kAbsSendTimeUri; - static const int kAbsSendTimeDefaultId; - - // Header extension for coordination of video orientation, see url for - // details: - // http://www.etsi.org/deliver/etsi_ts/126100_126199/126114/12.07.00_60/ts_126114v120700p.pdf - static const char* kVideoRotationUri; - static const int kVideoRotationDefaultId; - - // Header extension for transport sequence number, see url for details: - // http://www.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions - static const char* kTransportSequenceNumberUri; - static const int kTransportSequenceNumberDefaultId; - - static const char* kPlayoutDelayUri; - static const int kPlayoutDelayDefaultId; - - std::string uri; - int id; -}; - -struct VideoStream { - VideoStream(); - ~VideoStream(); - std::string ToString() const; - - size_t width; - size_t height; - int max_framerate; - - int min_bitrate_bps; - int target_bitrate_bps; - int max_bitrate_bps; - - int max_qp; - - // Bitrate thresholds for enabling additional temporal layers. Since these are - // thresholds in between layers, we have one additional layer. One threshold - // gives two temporal layers, one below the threshold and one above, two give - // three, and so on. - // The VideoEncoder may redistribute bitrates over the temporal layers so a - // bitrate threshold of 100k and an estimate of 105k does not imply that we - // get 100k in one temporal layer and 5k in the other, just that the bitrate - // in the first temporal layer should not exceed 100k. - // TODO(kthelgason): Apart from a special case for two-layer screencast these - // thresholds are not propagated to the VideoEncoder. To be implemented. - std::vector temporal_layer_thresholds_bps; -}; - -class VideoEncoderConfig { - public: - // These are reference counted to permit copying VideoEncoderConfig and be - // kept alive until all encoder_specific_settings go out of scope. - // TODO(kthelgason): Consider removing the need for copying VideoEncoderConfig - // and use rtc::Optional for encoder_specific_settings instead. - class EncoderSpecificSettings : public rtc::RefCountInterface { - public: - // TODO(pbos): Remove FillEncoderSpecificSettings as soon as VideoCodec is - // not in use and encoder implementations ask for codec-specific structs - // directly. - void FillEncoderSpecificSettings(VideoCodec* codec_struct) const; - - virtual void FillVideoCodecVp8(VideoCodecVP8* vp8_settings) const; - virtual void FillVideoCodecVp9(VideoCodecVP9* vp9_settings) const; - virtual void FillVideoCodecH264(VideoCodecH264* h264_settings) const; - private: - ~EncoderSpecificSettings() override {} - friend class VideoEncoderConfig; - }; - - class H264EncoderSpecificSettings : public EncoderSpecificSettings { - public: - explicit H264EncoderSpecificSettings(const VideoCodecH264& specifics); - void FillVideoCodecH264(VideoCodecH264* h264_settings) const override; - - private: - VideoCodecH264 specifics_; - }; - - class Vp8EncoderSpecificSettings : public EncoderSpecificSettings { - public: - explicit Vp8EncoderSpecificSettings(const VideoCodecVP8& specifics); - void FillVideoCodecVp8(VideoCodecVP8* vp8_settings) const override; - - private: - VideoCodecVP8 specifics_; - }; - - class Vp9EncoderSpecificSettings : public EncoderSpecificSettings { - public: - explicit Vp9EncoderSpecificSettings(const VideoCodecVP9& specifics); - void FillVideoCodecVp9(VideoCodecVP9* vp9_settings) const override; - - private: - VideoCodecVP9 specifics_; - }; - - enum class ContentType { - kRealtimeVideo, - kScreen, - }; - - class VideoStreamFactoryInterface : public rtc::RefCountInterface { - public: - // An implementation should return a std::vector with the - // wanted VideoStream settings for the given video resolution. - // The size of the vector may not be larger than - // |encoder_config.number_of_streams|. - virtual std::vector CreateEncoderStreams( - int width, - int height, - const VideoEncoderConfig& encoder_config) = 0; - - protected: - ~VideoStreamFactoryInterface() override {} - }; - - VideoEncoderConfig& operator=(VideoEncoderConfig&&) = default; - VideoEncoderConfig& operator=(const VideoEncoderConfig&) = delete; - - // Mostly used by tests. Avoid creating copies if you can. - VideoEncoderConfig Copy() const { return VideoEncoderConfig(*this); } - - VideoEncoderConfig(); - VideoEncoderConfig(VideoEncoderConfig&&); - ~VideoEncoderConfig(); - std::string ToString() const; - - rtc::scoped_refptr video_stream_factory; - std::vector spatial_layers; - ContentType content_type; - rtc::scoped_refptr encoder_specific_settings; - - // Padding will be used up to this bitrate regardless of the bitrate produced - // by the encoder. Padding above what's actually produced by the encoder helps - // maintaining a higher bitrate estimate. Padding will however not be sent - // unless the estimated bandwidth indicates that the link can handle it. - int min_transmit_bitrate_bps; - int max_bitrate_bps; - - // Max number of encoded VideoStreams to produce. - size_t number_of_streams; - - private: - // Access to the copy constructor is private to force use of the Copy() - // method for those exceptional cases where we do use it. - VideoEncoderConfig(const VideoEncoderConfig&); -}; - -} // namespace webrtc - -#endif // WEBRTC_CONFIG_H_ diff --git a/WebRtc.NET/include/webrtc/logging/rtc_event_log/mock/mock_rtc_event_log.h b/WebRtc.NET/include/webrtc/logging/rtc_event_log/mock/mock_rtc_event_log.h deleted file mode 100644 index 315967b8..00000000 --- a/WebRtc.NET/include/webrtc/logging/rtc_event_log/mock/mock_rtc_event_log.h +++ /dev/null @@ -1,65 +0,0 @@ -/* - * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_LOGGING_RTC_EVENT_LOG_MOCK_MOCK_RTC_EVENT_LOG_H_ -#define WEBRTC_LOGGING_RTC_EVENT_LOG_MOCK_MOCK_RTC_EVENT_LOG_H_ - -#include - -#include "webrtc/logging/rtc_event_log/rtc_event_log.h" -#include "webrtc/test/gmock.h" - -namespace webrtc { - -class MockRtcEventLog : public RtcEventLog { - public: - MOCK_METHOD2(StartLogging, - bool(const std::string& file_name, int64_t max_size_bytes)); - - MOCK_METHOD2(StartLogging, - bool(rtc::PlatformFile log_file, int64_t max_size_bytes)); - - MOCK_METHOD0(StopLogging, void()); - - MOCK_METHOD1(LogVideoReceiveStreamConfig, - void(const webrtc::VideoReceiveStream::Config& config)); - - MOCK_METHOD1(LogVideoSendStreamConfig, - void(const webrtc::VideoSendStream::Config& config)); - - MOCK_METHOD1(LogAudioReceiveStreamConfig, - void(const webrtc::AudioReceiveStream::Config& config)); - - MOCK_METHOD1(LogAudioSendStreamConfig, - void(const webrtc::AudioSendStream::Config& config)); - - MOCK_METHOD4(LogRtpHeader, - void(PacketDirection direction, - MediaType media_type, - const uint8_t* header, - size_t packet_length)); - - MOCK_METHOD4(LogRtcpPacket, - void(PacketDirection direction, - MediaType media_type, - const uint8_t* packet, - size_t length)); - - MOCK_METHOD1(LogAudioPlayout, void(uint32_t ssrc)); - - MOCK_METHOD3(LogBwePacketLossEvent, - void(int32_t bitrate, - uint8_t fraction_loss, - int32_t total_packets)); -}; - -} // namespace webrtc - -#endif // WEBRTC_LOGGING_RTC_EVENT_LOG_MOCK_MOCK_RTC_EVENT_LOG_H_ diff --git a/WebRtc.NET/include/webrtc/logging/rtc_event_log/ringbuffer.h b/WebRtc.NET/include/webrtc/logging/rtc_event_log/ringbuffer.h deleted file mode 100644 index 6c0ffda8..00000000 --- a/WebRtc.NET/include/webrtc/logging/rtc_event_log/ringbuffer.h +++ /dev/null @@ -1,100 +0,0 @@ -/* - * Copyright (c) 2015 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - * - */ - -#ifndef WEBRTC_LOGGING_RTC_EVENT_LOG_RINGBUFFER_H_ -#define WEBRTC_LOGGING_RTC_EVENT_LOG_RINGBUFFER_H_ - -#include -#include - -#include "webrtc/base/checks.h" -#include "webrtc/base/constructormagic.h" - -namespace webrtc { - -// A RingBuffer works like a fixed size queue which starts discarding -// the oldest elements when it becomes full. -template -class RingBuffer { - public: - // Creates a RingBuffer with space for |capacity| elements. - explicit RingBuffer(size_t capacity) - : // We allocate space for one extra sentinel element. - data_(new T[capacity + 1]) { - RTC_DCHECK(capacity > 0); - end_ = data_.get() + (capacity + 1); - front_ = data_.get(); - back_ = data_.get(); - } - - ~RingBuffer() { - // The unique_ptr will free the memory. - } - - // Removes an element from the front of the queue. - void pop_front() { - RTC_DCHECK(!empty()); - ++front_; - if (front_ == end_) { - front_ = data_.get(); - } - } - - // Appends an element to the back of the queue (and removes an - // element from the front if there is no space at the back of the queue). - void push_back(const T& elem) { - *back_ = elem; - ++back_; - if (back_ == end_) { - back_ = data_.get(); - } - if (back_ == front_) { - ++front_; - } - if (front_ == end_) { - front_ = data_.get(); - } - } - - // Appends an element to the back of the queue (and removes an - // element from the front if there is no space at the back of the queue). - void push_back(T&& elem) { - *back_ = std::move(elem); - ++back_; - if (back_ == end_) { - back_ = data_.get(); - } - if (back_ == front_) { - ++front_; - } - if (front_ == end_) { - front_ = data_.get(); - } - } - - T& front() { return *front_; } - - const T& front() const { return *front_; } - - bool empty() const { return (front_ == back_); } - - private: - std::unique_ptr data_; - T* end_; - T* front_; - T* back_; - - RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(RingBuffer); -}; - -} // namespace webrtc - -#endif // WEBRTC_LOGGING_RTC_EVENT_LOG_RINGBUFFER_H_ diff --git a/WebRtc.NET/include/webrtc/logging/rtc_event_log/rtc_event_log.h b/WebRtc.NET/include/webrtc/logging/rtc_event_log/rtc_event_log.h deleted file mode 100644 index ccf60944..00000000 --- a/WebRtc.NET/include/webrtc/logging/rtc_event_log/rtc_event_log.h +++ /dev/null @@ -1,162 +0,0 @@ -/* - * Copyright (c) 2015 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_LOGGING_RTC_EVENT_LOG_RTC_EVENT_LOG_H_ -#define WEBRTC_LOGGING_RTC_EVENT_LOG_RTC_EVENT_LOG_H_ - -#include -#include - -#include "webrtc/base/platform_file.h" -#include "webrtc/call/audio_receive_stream.h" -#include "webrtc/call/audio_send_stream.h" -#include "webrtc/video_receive_stream.h" -#include "webrtc/video_send_stream.h" - -namespace webrtc { - -// Forward declaration of storage class that is automatically generated from -// the protobuf file. -namespace rtclog { -class EventStream; -} // namespace rtclog - -class Clock; -class RtcEventLogImpl; - -enum class MediaType; - -enum PacketDirection { kIncomingPacket = 0, kOutgoingPacket }; - -class RtcEventLog { - public: - virtual ~RtcEventLog() {} - - // Factory method to create an RtcEventLog object. - static std::unique_ptr Create(); - // TODO(nisse): webrtc::Clock is deprecated. Delete this method and - // above forward declaration of Clock when - // webrtc/system_wrappers/include/clock.h is deleted. - static std::unique_ptr Create(const Clock* clock) { - return Create(); - } - - // Create an RtcEventLog object that does nothing. - static std::unique_ptr CreateNull(); - - // Starts logging a maximum of max_size_bytes bytes to the specified file. - // If the file already exists it will be overwritten. - // If max_size_bytes <= 0, logging will be active until StopLogging is called. - // The function has no effect and returns false if we can't start a new log - // e.g. because we are already logging or the file cannot be opened. - virtual bool StartLogging(const std::string& file_name, - int64_t max_size_bytes) = 0; - - // Same as above. The RtcEventLog takes ownership of the file if the call - // is successful, i.e. if it returns true. - virtual bool StartLogging(rtc::PlatformFile platform_file, - int64_t max_size_bytes) = 0; - - // Deprecated. Pass an explicit file size limit. - bool StartLogging(const std::string& file_name) { - return StartLogging(file_name, 10000000); - } - - // Deprecated. Pass an explicit file size limit. - bool StartLogging(rtc::PlatformFile platform_file) { - return StartLogging(platform_file, 10000000); - } - - // Stops logging to file and waits until the thread has finished. - virtual void StopLogging() = 0; - - // Logs configuration information for webrtc::VideoReceiveStream. - virtual void LogVideoReceiveStreamConfig( - const webrtc::VideoReceiveStream::Config& config) = 0; - - // Logs configuration information for webrtc::VideoSendStream. - virtual void LogVideoSendStreamConfig( - const webrtc::VideoSendStream::Config& config) = 0; - - // Logs configuration information for webrtc::AudioReceiveStream. - virtual void LogAudioReceiveStreamConfig( - const webrtc::AudioReceiveStream::Config& config) = 0; - - // Logs configuration information for webrtc::AudioSendStream. - virtual void LogAudioSendStreamConfig( - const webrtc::AudioSendStream::Config& config) = 0; - - // Logs the header of an incoming or outgoing RTP packet. packet_length - // is the total length of the packet, including both header and payload. - virtual void LogRtpHeader(PacketDirection direction, - MediaType media_type, - const uint8_t* header, - size_t packet_length) = 0; - - // Logs an incoming or outgoing RTCP packet. - virtual void LogRtcpPacket(PacketDirection direction, - MediaType media_type, - const uint8_t* packet, - size_t length) = 0; - - // Logs an audio playout event. - virtual void LogAudioPlayout(uint32_t ssrc) = 0; - - // Logs a bitrate update from the bandwidth estimator based on packet loss. - virtual void LogBwePacketLossEvent(int32_t bitrate, - uint8_t fraction_loss, - int32_t total_packets) = 0; - - // Reads an RtcEventLog file and returns true when reading was successful. - // The result is stored in the given EventStream object. - // The order of the events in the EventStream is implementation defined. - // The current implementation writes a LOG_START event, then the old - // configurations, then the remaining events in timestamp order and finally - // a LOG_END event. However, this might change without further notice. - // TODO(terelius): Change result type to a vector? - static bool ParseRtcEventLog(const std::string& file_name, - rtclog::EventStream* result); -}; - -// No-op implementation is used if flag is not set, or in tests. -class RtcEventLogNullImpl final : public RtcEventLog { - public: - bool StartLogging(const std::string& file_name, - int64_t max_size_bytes) override { - return false; - } - bool StartLogging(rtc::PlatformFile platform_file, - int64_t max_size_bytes) override; - void StopLogging() override {} - void LogVideoReceiveStreamConfig( - const VideoReceiveStream::Config& config) override {} - void LogVideoSendStreamConfig( - const VideoSendStream::Config& config) override {} - void LogAudioReceiveStreamConfig( - const AudioReceiveStream::Config& config) override {} - void LogAudioSendStreamConfig( - const AudioSendStream::Config& config) override {} - void LogRtpHeader(PacketDirection direction, - MediaType media_type, - const uint8_t* header, - size_t packet_length) override {} - void LogRtcpPacket(PacketDirection direction, - MediaType media_type, - const uint8_t* packet, - size_t length) override {} - void LogAudioPlayout(uint32_t ssrc) override {} - void LogBwePacketLossEvent(int32_t bitrate, - uint8_t fraction_loss, - int32_t total_packets) override {} -}; - -} // namespace webrtc - -#endif // WEBRTC_LOGGING_RTC_EVENT_LOG_RTC_EVENT_LOG_H_ diff --git a/WebRtc.NET/include/webrtc/logging/rtc_event_log/rtc_event_log_helper_thread.h b/WebRtc.NET/include/webrtc/logging/rtc_event_log/rtc_event_log_helper_thread.h deleted file mode 100644 index 7d41f60d..00000000 --- a/WebRtc.NET/include/webrtc/logging/rtc_event_log/rtc_event_log_helper_thread.h +++ /dev/null @@ -1,128 +0,0 @@ -/* - * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_LOGGING_RTC_EVENT_LOG_RTC_EVENT_LOG_HELPER_THREAD_H_ -#define WEBRTC_LOGGING_RTC_EVENT_LOG_RTC_EVENT_LOG_HELPER_THREAD_H_ - -#include -#include -#include -#include -#include - -#include "webrtc/base/constructormagic.h" -#include "webrtc/base/event.h" -#include "webrtc/base/ignore_wundef.h" -#include "webrtc/base/platform_thread.h" -#include "webrtc/base/swap_queue.h" -#include "webrtc/logging/rtc_event_log/ringbuffer.h" -#include "webrtc/system_wrappers/include/file_wrapper.h" - -#ifdef ENABLE_RTC_EVENT_LOG -// Files generated at build-time by the protobuf compiler. -RTC_PUSH_IGNORING_WUNDEF() -#ifdef WEBRTC_ANDROID_PLATFORM_BUILD -#include "external/webrtc/webrtc/logging/rtc_event_log/rtc_event_log.pb.h" -#else -#include "webrtc/logging/rtc_event_log/rtc_event_log.pb.h" -#endif -RTC_POP_IGNORING_WUNDEF() -#endif - -#ifdef ENABLE_RTC_EVENT_LOG - -namespace webrtc { - -class RtcEventLogHelperThread final { - public: - struct ControlMessage { - ControlMessage() - : message_type(STOP_FILE), - file(nullptr), - max_size_bytes(0), - start_time(0), - stop_time(0) {} - enum { START_FILE, STOP_FILE, TERMINATE_THREAD } message_type; - - std::unique_ptr file; // Only used with START_FILE. - int64_t max_size_bytes; // Only used with START_FILE. - int64_t start_time; // Only used with START_FILE. - int64_t stop_time; // Used with all 3 message types. - - friend void swap(ControlMessage& lhs, ControlMessage& rhs) { - using std::swap; - swap(lhs.message_type, rhs.message_type); - lhs.file.swap(rhs.file); - swap(lhs.max_size_bytes, rhs.max_size_bytes); - swap(lhs.start_time, rhs.start_time); - swap(lhs.stop_time, rhs.stop_time); - } - }; - - RtcEventLogHelperThread( - SwapQueue* message_queue, - SwapQueue>* event_queue); - ~RtcEventLogHelperThread(); - - // This function MUST be called once a STOP_FILE message is added to the - // signalling queue. The function will make sure that the output thread - // wakes up to read the message, and it blocks until the output thread has - // finished writing to the file. - void WaitForFileFinished(); - - // This fuction MUST be called once an event is added to the event queue. - void SignalNewEvent(); - - private: - static bool ThreadOutputFunction(void* obj); - - bool AppendEventToString(rtclog::Event* event); - bool LogToMemory(); - void StartLogFile(); - bool LogToFile(); - void StopLogFile(); - void ProcessEvents(); - - // Message queues for passing events to the logging thread. - SwapQueue* message_queue_; - SwapQueue>* event_queue_; - - // History containing the most recent events (~ 10 s). - RingBuffer> history_; - - // History containing all past configuration events. - std::vector> config_history_; - - std::unique_ptr file_; - rtc::PlatformThread thread_; - - int64_t max_size_bytes_; - int64_t written_bytes_; - int64_t start_time_; - int64_t stop_time_; - - bool has_recent_event_; - std::unique_ptr most_recent_event_; - - // Temporary space for serializing profobuf data. - std::string output_string_; - - rtc::Event wake_periodically_; - rtc::Event wake_from_hibernation_; - rtc::Event file_finished_; - - RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(RtcEventLogHelperThread); -}; - -} // namespace webrtc - -#endif // ENABLE_RTC_EVENT_LOG - -#endif // WEBRTC_LOGGING_RTC_EVENT_LOG_RTC_EVENT_LOG_HELPER_THREAD_H_ diff --git a/WebRtc.NET/include/webrtc/logging/rtc_event_log/rtc_event_log_parser.h b/WebRtc.NET/include/webrtc/logging/rtc_event_log/rtc_event_log_parser.h deleted file mode 100644 index 2d66b905..00000000 --- a/WebRtc.NET/include/webrtc/logging/rtc_event_log/rtc_event_log_parser.h +++ /dev/null @@ -1,132 +0,0 @@ -/* - * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ -#ifndef WEBRTC_LOGGING_RTC_EVENT_LOG_RTC_EVENT_LOG_PARSER_H_ -#define WEBRTC_LOGGING_RTC_EVENT_LOG_RTC_EVENT_LOG_PARSER_H_ - -#include -#include - -#include "webrtc/base/ignore_wundef.h" -#include "webrtc/logging/rtc_event_log/rtc_event_log.h" -#include "webrtc/video_receive_stream.h" -#include "webrtc/video_send_stream.h" - -// Files generated at build-time by the protobuf compiler. -RTC_PUSH_IGNORING_WUNDEF() -#ifdef WEBRTC_ANDROID_PLATFORM_BUILD -#include "external/webrtc/webrtc/logging/rtc_event_log/rtc_event_log.pb.h" -#else -#include "webrtc/logging/rtc_event_log/rtc_event_log.pb.h" -#endif -RTC_POP_IGNORING_WUNDEF() - -namespace webrtc { - -enum class MediaType; - -class ParsedRtcEventLog { - friend class RtcEventLogTestHelper; - - public: - enum EventType { - UNKNOWN_EVENT = 0, - LOG_START = 1, - LOG_END = 2, - RTP_EVENT = 3, - RTCP_EVENT = 4, - AUDIO_PLAYOUT_EVENT = 5, - BWE_PACKET_LOSS_EVENT = 6, - BWE_PACKET_DELAY_EVENT = 7, - VIDEO_RECEIVER_CONFIG_EVENT = 8, - VIDEO_SENDER_CONFIG_EVENT = 9, - AUDIO_RECEIVER_CONFIG_EVENT = 10, - AUDIO_SENDER_CONFIG_EVENT = 11 - }; - - // Reads an RtcEventLog file and returns true if parsing was successful. - bool ParseFile(const std::string& file_name); - - // Reads an RtcEventLog from a string and returns true if successful. - bool ParseString(const std::string& s); - - // Reads an RtcEventLog from an istream and returns true if successful. - bool ParseStream(std::istream& stream); - - // Returns the number of events in an EventStream. - size_t GetNumberOfEvents() const; - - // Reads the arrival timestamp (in microseconds) from a rtclog::Event. - int64_t GetTimestamp(size_t index) const; - - // Reads the event type of the rtclog::Event at |index|. - EventType GetEventType(size_t index) const; - - // Reads the header, direction, media type, header length and packet length - // from the RTP event at |index|, and stores the values in the corresponding - // output parameters. The output parameters can be set to nullptr if those - // values aren't needed. - // NB: The header must have space for at least IP_PACKET_SIZE bytes. - void GetRtpHeader(size_t index, - PacketDirection* incoming, - MediaType* media_type, - uint8_t* header, - size_t* header_length, - size_t* total_length) const; - - // Reads packet, direction, media type and packet length from the RTCP event - // at |index|, and stores the values in the corresponding output parameters. - // The output parameters can be set to nullptr if those values aren't needed. - // NB: The packet must have space for at least IP_PACKET_SIZE bytes. - void GetRtcpPacket(size_t index, - PacketDirection* incoming, - MediaType* media_type, - uint8_t* packet, - size_t* length) const; - - // Reads a config event to a (non-NULL) VideoReceiveStream::Config struct. - // Only the fields that are stored in the protobuf will be written. - void GetVideoReceiveConfig(size_t index, - VideoReceiveStream::Config* config) const; - - // Reads a config event to a (non-NULL) VideoSendStream::Config struct. - // Only the fields that are stored in the protobuf will be written. - void GetVideoSendConfig(size_t index, VideoSendStream::Config* config) const; - - // Reads a config event to a (non-NULL) AudioReceiveStream::Config struct. - // Only the fields that are stored in the protobuf will be written. - void GetAudioReceiveConfig(size_t index, - AudioReceiveStream::Config* config) const; - - // Reads a config event to a (non-NULL) AudioSendStream::Config struct. - // Only the fields that are stored in the protobuf will be written. - void GetAudioSendConfig(size_t index, AudioSendStream::Config* config) const; - - // Reads the SSRC from the audio playout event at |index|. The SSRC is stored - // in the output parameter ssrc. The output parameter can be set to nullptr - // and in that case the function only asserts that the event is well formed. - void GetAudioPlayout(size_t index, uint32_t* ssrc) const; - - // Reads bitrate, fraction loss (as defined in RFC 1889) and total number of - // expected packets from the BWE event at |index| and stores the values in - // the corresponding output parameters. The output parameters can be set to - // nullptr if those values aren't needed. - // NB: The packet must have space for at least IP_PACKET_SIZE bytes. - void GetBwePacketLossEvent(size_t index, - int32_t* bitrate, - uint8_t* fraction_loss, - int32_t* total_packets) const; - - private: - std::vector events_; -}; - -} // namespace webrtc - -#endif // WEBRTC_LOGGING_RTC_EVENT_LOG_RTC_EVENT_LOG_PARSER_H_ diff --git a/WebRtc.NET/include/webrtc/logging/rtc_event_log/rtc_event_log_unittest_helper.h b/WebRtc.NET/include/webrtc/logging/rtc_event_log/rtc_event_log_unittest_helper.h deleted file mode 100644 index 3f89e304..00000000 --- a/WebRtc.NET/include/webrtc/logging/rtc_event_log/rtc_event_log_unittest_helper.h +++ /dev/null @@ -1,67 +0,0 @@ -/* - * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_LOGGING_RTC_EVENT_LOG_RTC_EVENT_LOG_UNITTEST_HELPER_H_ -#define WEBRTC_LOGGING_RTC_EVENT_LOG_RTC_EVENT_LOG_UNITTEST_HELPER_H_ - -#include "webrtc/call/call.h" -#include "webrtc/logging/rtc_event_log/rtc_event_log_parser.h" - -namespace webrtc { - -class RtcEventLogTestHelper { - public: - static void VerifyVideoReceiveStreamConfig( - const ParsedRtcEventLog& parsed_log, - size_t index, - const VideoReceiveStream::Config& config); - static void VerifyVideoSendStreamConfig( - const ParsedRtcEventLog& parsed_log, - size_t index, - const VideoSendStream::Config& config); - static void VerifyAudioReceiveStreamConfig( - const ParsedRtcEventLog& parsed_log, - size_t index, - const AudioReceiveStream::Config& config); - static void VerifyAudioSendStreamConfig( - const ParsedRtcEventLog& parsed_log, - size_t index, - const AudioSendStream::Config& config); - static void VerifyRtpEvent(const ParsedRtcEventLog& parsed_log, - size_t index, - PacketDirection direction, - MediaType media_type, - const uint8_t* header, - size_t header_size, - size_t total_size); - static void VerifyRtcpEvent(const ParsedRtcEventLog& parsed_log, - size_t index, - PacketDirection direction, - MediaType media_type, - const uint8_t* packet, - size_t total_size); - static void VerifyPlayoutEvent(const ParsedRtcEventLog& parsed_log, - size_t index, - uint32_t ssrc); - static void VerifyBweLossEvent(const ParsedRtcEventLog& parsed_log, - size_t index, - int32_t bitrate, - uint8_t fraction_loss, - int32_t total_packets); - - static void VerifyLogStartEvent(const ParsedRtcEventLog& parsed_log, - size_t index); - static void VerifyLogEndEvent(const ParsedRtcEventLog& parsed_log, - size_t index); -}; - -} // namespace webrtc - -#endif // WEBRTC_LOGGING_RTC_EVENT_LOG_RTC_EVENT_LOG_UNITTEST_HELPER_H_ diff --git a/WebRtc.NET/include/webrtc/media/base/codec.h b/WebRtc.NET/include/webrtc/media/base/codec.h deleted file mode 100644 index ac85d1fe..00000000 --- a/WebRtc.NET/include/webrtc/media/base/codec.h +++ /dev/null @@ -1,232 +0,0 @@ -/* - * Copyright (c) 2004 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MEDIA_BASE_CODEC_H_ -#define WEBRTC_MEDIA_BASE_CODEC_H_ - -#include -#include -#include -#include - -#include "webrtc/api/rtpparameters.h" -#include "webrtc/common_types.h" -#include "webrtc/media/base/mediaconstants.h" - -namespace cricket { - -typedef std::map CodecParameterMap; - -class FeedbackParam { - public: - FeedbackParam(const std::string& id, const std::string& param) - : id_(id), - param_(param) { - } - explicit FeedbackParam(const std::string& id) - : id_(id), - param_(kParamValueEmpty) { - } - bool operator==(const FeedbackParam& other) const; - - const std::string& id() const { return id_; } - const std::string& param() const { return param_; } - - private: - std::string id_; // e.g. "nack", "ccm" - std::string param_; // e.g. "", "rpsi", "fir" -}; - -class FeedbackParams { - public: - bool operator==(const FeedbackParams& other) const; - - bool Has(const FeedbackParam& param) const; - void Add(const FeedbackParam& param); - - void Intersect(const FeedbackParams& from); - - const std::vector& params() const { return params_; } - private: - bool HasDuplicateEntries() const; - - std::vector params_; -}; - -struct Codec { - int id; - std::string name; - int clockrate; - CodecParameterMap params; - FeedbackParams feedback_params; - - virtual ~Codec(); - - // Indicates if this codec is compatible with the specified codec. - bool Matches(const Codec& codec) const; - - // Find the parameter for |name| and write the value to |out|. - bool GetParam(const std::string& name, std::string* out) const; - bool GetParam(const std::string& name, int* out) const; - - void SetParam(const std::string& name, const std::string& value); - void SetParam(const std::string& name, int value); - - // It is safe to input a non-existent parameter. - // Returns true if the parameter existed, false if it did not exist. - bool RemoveParam(const std::string& name); - - bool HasFeedbackParam(const FeedbackParam& param) const; - void AddFeedbackParam(const FeedbackParam& param); - - // Filter |this| feedbacks params such that only those shared by both |this| - // and |other| are kept. - void IntersectFeedbackParams(const Codec& other); - - virtual webrtc::RtpCodecParameters ToCodecParameters() const; - - Codec& operator=(const Codec& c); - Codec& operator=(Codec&& c); - - bool operator==(const Codec& c) const; - - bool operator!=(const Codec& c) const { - return !(*this == c); - } - - protected: - // A Codec can't be created without a subclass. - // Creates a codec with the given parameters. - Codec(int id, const std::string& name, int clockrate); - // Creates an empty codec. - Codec(); - Codec(const Codec& c); - Codec(Codec&& c); -}; - -struct AudioCodec : public Codec { - int bitrate; - size_t channels; - - // Creates a codec with the given parameters. - AudioCodec(int id, - const std::string& name, - int clockrate, - int bitrate, - size_t channels); - // Creates an empty codec. - AudioCodec(); - AudioCodec(const AudioCodec& c); - AudioCodec(AudioCodec&& c); - virtual ~AudioCodec() = default; - - // Indicates if this codec is compatible with the specified codec. - bool Matches(const AudioCodec& codec) const; - - std::string ToString() const; - - webrtc::RtpCodecParameters ToCodecParameters() const override; - - AudioCodec& operator=(const AudioCodec& c); - AudioCodec& operator=(AudioCodec&& c); - - bool operator==(const AudioCodec& c) const; - - bool operator!=(const AudioCodec& c) const { - return !(*this == c); - } -}; - -struct VideoCodec : public Codec { - // Creates a codec with the given parameters. - VideoCodec(int id, const std::string& name); - // Creates a codec with the given name and empty id. - explicit VideoCodec(const std::string& name); - // Creates an empty codec. - VideoCodec(); - VideoCodec(const VideoCodec& c); - VideoCodec(VideoCodec&& c); - virtual ~VideoCodec() = default; - - // Indicates if this video codec is the same as the other video codec, e.g. if - // they are both VP8 or VP9, or if they are both H264 with the same H264 - // profile. H264 levels however are not compared. - bool Matches(const VideoCodec& codec) const; - - std::string ToString() const; - - VideoCodec& operator=(const VideoCodec& c); - VideoCodec& operator=(VideoCodec&& c); - - bool operator==(const VideoCodec& c) const; - - bool operator!=(const VideoCodec& c) const { - return !(*this == c); - } - - static VideoCodec CreateRtxCodec(int rtx_payload_type, - int associated_payload_type); - - enum CodecType { - CODEC_VIDEO, - CODEC_RED, - CODEC_ULPFEC, - CODEC_FLEXFEC, - CODEC_RTX, - }; - - CodecType GetCodecType() const; - // Validates a VideoCodec's payload type, dimensions and bitrates etc. If they - // don't make sense (such as max < min bitrate), and error is logged and - // ValidateCodecFormat returns false. - bool ValidateCodecFormat() const; - - private: - void SetDefaultParameters(); -}; - -struct DataCodec : public Codec { - DataCodec(int id, const std::string& name); - DataCodec(); - DataCodec(const DataCodec& c); - DataCodec(DataCodec&& c); - virtual ~DataCodec() = default; - - DataCodec& operator=(const DataCodec& c); - DataCodec& operator=(DataCodec&& c); - - std::string ToString() const; -}; - -// Get the codec setting associated with |payload_type|. If there -// is no codec associated with that payload type it returns nullptr. -template -const Codec* FindCodecById(const std::vector& codecs, int payload_type) { - for (const auto& codec : codecs) { - if (codec.id == payload_type) - return &codec; - } - return nullptr; -} - -bool CodecNamesEq(const std::string& name1, const std::string& name2); -bool CodecNamesEq(const char* name1, const char* name2); -bool HasNack(const Codec& codec); -bool HasRemb(const Codec& codec); -bool HasTransportCc(const Codec& codec); -// Returns the first codec in |supported_codecs| that matches |codec|, or -// nullptr if no codec matches. -const VideoCodec* FindMatchingCodec( - const std::vector& supported_codecs, - const VideoCodec& codec); - -} // namespace cricket - -#endif // WEBRTC_MEDIA_BASE_CODEC_H_ diff --git a/WebRtc.NET/include/webrtc/media/base/cryptoparams.h b/WebRtc.NET/include/webrtc/media/base/cryptoparams.h deleted file mode 100644 index 84c883d6..00000000 --- a/WebRtc.NET/include/webrtc/media/base/cryptoparams.h +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Copyright (c) 2004 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MEDIA_BASE_CRYPTOPARAMS_H_ -#define WEBRTC_MEDIA_BASE_CRYPTOPARAMS_H_ - -#include - -namespace cricket { - -// Parameters for SRTP negotiation, as described in RFC 4568. -struct CryptoParams { - CryptoParams() : tag(0) {} - CryptoParams(int t, - const std::string& cs, - const std::string& kp, - const std::string& sp) - : tag(t), cipher_suite(cs), key_params(kp), session_params(sp) {} - - bool Matches(const CryptoParams& params) const { - return (tag == params.tag && cipher_suite == params.cipher_suite); - } - - int tag; - std::string cipher_suite; - std::string key_params; - std::string session_params; -}; - -} // namespace cricket - -#endif // WEBRTC_MEDIA_BASE_CRYPTOPARAMS_H_ diff --git a/WebRtc.NET/include/webrtc/media/base/device.h b/WebRtc.NET/include/webrtc/media/base/device.h deleted file mode 100644 index 621dd15d..00000000 --- a/WebRtc.NET/include/webrtc/media/base/device.h +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Copyright (c) 2014 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MEDIA_BASE_DEVICE_H_ -#define WEBRTC_MEDIA_BASE_DEVICE_H_ - -#include "webrtc/base/stringencode.h" - -namespace cricket { - -// Used to represent an audio or video capture or render device. -struct Device { - Device() {} - Device(const std::string& name, int id) - : name(name), - id(rtc::ToString(id)) { - } - Device(const std::string& name, const std::string& id) - : name(name), id(id) {} - - std::string name; - std::string id; -}; - -} // namespace cricket - -#endif // WEBRTC_MEDIA_BASE_DEVICE_H_ diff --git a/WebRtc.NET/include/webrtc/media/base/fakertp.h b/WebRtc.NET/include/webrtc/media/base/fakertp.h deleted file mode 100644 index a9c6fe01..00000000 --- a/WebRtc.NET/include/webrtc/media/base/fakertp.h +++ /dev/null @@ -1,87 +0,0 @@ -/* - * Copyright (c) 2004 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -// Fake RTP and RTCP packets to use in unit tests. - -#ifndef WEBRTC_MEDIA_BASE_FAKERTP_H_ -#define WEBRTC_MEDIA_BASE_FAKERTP_H_ - -// A typical PCMU RTP packet. -// PT=0, SN=1, TS=0, SSRC=1 -// all data FF -static const unsigned char kPcmuFrame[] = { - 0x80, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, - 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, - 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, - 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, - 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, - 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, - 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, - 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, - 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, - 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, - 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, - 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, - 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, - 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, - 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, - 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, - 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, - 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, - 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, - 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, - 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, -}; - -// A typical Receiver Report RTCP packet. -// PT=RR, LN=1, SSRC=1 -// send SSRC=2, all other fields 0 -static const unsigned char kRtcpReport[] = { - 0x80, 0xc9, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, - 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 -}; - -// PT = 97, TS = 0, Seq = 1, SSRC = 2 -// H264 - NRI = 1, Type = 1, bit stream = FF - -static const unsigned char kH264Packet[] = { - 0x80, 0x61, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, - 0x21, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, - 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, - 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, - 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, - 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, - 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, - 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, - 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, - 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, - 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, - 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, - 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, - 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, - 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, - 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, - 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, - 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, - 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, - 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, - 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, -}; - -// PT= 101, SN=2, TS=3, SSRC = 4 -static const unsigned char kDataPacket[] = { - 0x80, 0x65, 0x00, 0x02, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x04, - 0x00, 0x00, 0x00, 0x00, - 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, -}; - -#endif // WEBRTC_MEDIA_BASE_FAKERTP_H_ diff --git a/WebRtc.NET/include/webrtc/media/base/fakevideocapturer.h b/WebRtc.NET/include/webrtc/media/base/fakevideocapturer.h deleted file mode 100644 index b5bfd349..00000000 --- a/WebRtc.NET/include/webrtc/media/base/fakevideocapturer.h +++ /dev/null @@ -1,148 +0,0 @@ -/* - * Copyright (c) 2004 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MEDIA_BASE_FAKEVIDEOCAPTURER_H_ -#define WEBRTC_MEDIA_BASE_FAKEVIDEOCAPTURER_H_ - -#include - -#include -#include - -#include "webrtc/api/video/i420_buffer.h" -#include "webrtc/api/video/video_frame.h" -#include "webrtc/base/timeutils.h" -#include "webrtc/media/base/videocapturer.h" -#include "webrtc/media/base/videocommon.h" - -namespace cricket { - -// Fake video capturer that allows the test to manually pump in frames. -class FakeVideoCapturer : public cricket::VideoCapturer { - public: - explicit FakeVideoCapturer(bool is_screencast) - : running_(false), - initial_timestamp_(rtc::TimeNanos()), - next_timestamp_(rtc::kNumNanosecsPerMillisec), - is_screencast_(is_screencast), - rotation_(webrtc::kVideoRotation_0) { - // Default supported formats. Use ResetSupportedFormats to over write. - std::vector formats; - formats.push_back(cricket::VideoFormat(1280, 720, - cricket::VideoFormat::FpsToInterval(30), cricket::FOURCC_I420)); - formats.push_back(cricket::VideoFormat(640, 480, - cricket::VideoFormat::FpsToInterval(30), cricket::FOURCC_I420)); - formats.push_back(cricket::VideoFormat(320, 240, - cricket::VideoFormat::FpsToInterval(30), cricket::FOURCC_I420)); - formats.push_back(cricket::VideoFormat(160, 120, - cricket::VideoFormat::FpsToInterval(30), cricket::FOURCC_I420)); - formats.push_back(cricket::VideoFormat(1280, 720, - cricket::VideoFormat::FpsToInterval(60), cricket::FOURCC_I420)); - ResetSupportedFormats(formats); - } - FakeVideoCapturer() : FakeVideoCapturer(false) {} - - ~FakeVideoCapturer() { - SignalDestroyed(this); - } - - void ResetSupportedFormats(const std::vector& formats) { - SetSupportedFormats(formats); - } - bool CaptureFrame() { - if (!GetCaptureFormat()) { - return false; - } - return CaptureCustomFrame(GetCaptureFormat()->width, - GetCaptureFormat()->height, - GetCaptureFormat()->interval, - GetCaptureFormat()->fourcc); - } - bool CaptureCustomFrame(int width, int height, uint32_t fourcc) { - // default to 30fps - return CaptureCustomFrame(width, height, 33333333, fourcc); - } - bool CaptureCustomFrame(int width, - int height, - int64_t timestamp_interval, - uint32_t fourcc) { - if (!running_) { - return false; - } - RTC_CHECK(fourcc == FOURCC_I420); - RTC_CHECK(width > 0); - RTC_CHECK(height > 0); - - int adapted_width; - int adapted_height; - int crop_width; - int crop_height; - int crop_x; - int crop_y; - - // TODO(nisse): It's a bit silly to have this logic in a fake - // class. Child classes of VideoCapturer are expected to call - // AdaptFrame, and the test case - // VideoCapturerTest.SinkWantsMaxPixelAndMaxPixelCountStepUp - // depends on this. - if (AdaptFrame(width, height, 0, 0, &adapted_width, &adapted_height, - &crop_width, &crop_height, &crop_x, &crop_y, nullptr)) { - rtc::scoped_refptr buffer( - webrtc::I420Buffer::Create(adapted_width, adapted_height)); - buffer->InitializeData(); - - OnFrame(webrtc::VideoFrame( - buffer, rotation_, - next_timestamp_ / rtc::kNumNanosecsPerMicrosec), - width, height); - } - next_timestamp_ += timestamp_interval; - - return true; - } - - sigslot::signal1 SignalDestroyed; - - cricket::CaptureState Start(const cricket::VideoFormat& format) override { - SetCaptureFormat(&format); - running_ = true; - SetCaptureState(cricket::CS_RUNNING); - return cricket::CS_RUNNING; - } - void Stop() override { - running_ = false; - SetCaptureFormat(NULL); - SetCaptureState(cricket::CS_STOPPED); - } - bool IsRunning() override { return running_; } - bool IsScreencast() const override { return is_screencast_; } - bool GetPreferredFourccs(std::vector* fourccs) override { - fourccs->push_back(cricket::FOURCC_I420); - fourccs->push_back(cricket::FOURCC_MJPG); - return true; - } - - void SetRotation(webrtc::VideoRotation rotation) { - rotation_ = rotation; - } - - webrtc::VideoRotation GetRotation() { return rotation_; } - - private: - bool running_; - int64_t initial_timestamp_; - int64_t next_timestamp_; - const bool is_screencast_; - webrtc::VideoRotation rotation_; -}; - -} // namespace cricket - -#endif // WEBRTC_MEDIA_BASE_FAKEVIDEOCAPTURER_H_ diff --git a/WebRtc.NET/include/webrtc/media/base/fakevideorenderer.h b/WebRtc.NET/include/webrtc/media/base/fakevideorenderer.h deleted file mode 100644 index 7255c05f..00000000 --- a/WebRtc.NET/include/webrtc/media/base/fakevideorenderer.h +++ /dev/null @@ -1,139 +0,0 @@ -/* - * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MEDIA_BASE_FAKEVIDEORENDERER_H_ -#define WEBRTC_MEDIA_BASE_FAKEVIDEORENDERER_H_ - -#include "webrtc/api/video/video_frame.h" -#include "webrtc/base/logging.h" -#include "webrtc/media/base/videosinkinterface.h" - -namespace cricket { - -// Faked video renderer that has a callback for actions on rendering. -class FakeVideoRenderer : public rtc::VideoSinkInterface { - public: - FakeVideoRenderer() - : errors_(0), - width_(0), - height_(0), - rotation_(webrtc::kVideoRotation_0), - timestamp_us_(0), - num_rendered_frames_(0), - black_frame_(false) {} - - virtual void OnFrame(const webrtc::VideoFrame& frame) { - rtc::CritScope cs(&crit_); - // TODO(zhurunz) Check with VP8 team to see if we can remove this - // tolerance on Y values. Some unit tests produce Y values close - // to 16 rather than close to zero, for supposedly black frames. - // Largest value observed is 34, e.g., running - // P2PTestConductor.LocalP2PTest16To9 (peerconnection_unittests). - black_frame_ = CheckFrameColorYuv(0, 48, 128, 128, 128, 128, &frame); - // Treat unexpected frame size as error. - ++num_rendered_frames_; - width_ = frame.width(); - height_ = frame.height(); - rotation_ = frame.rotation(); - timestamp_us_ = frame.timestamp_us(); - } - - int errors() const { return errors_; } - int width() const { - rtc::CritScope cs(&crit_); - return width_; - } - int height() const { - rtc::CritScope cs(&crit_); - return height_; - } - webrtc::VideoRotation rotation() const { - rtc::CritScope cs(&crit_); - return rotation_; - } - - int64_t timestamp_us() const { - rtc::CritScope cs(&crit_); - return timestamp_us_; - } - int num_rendered_frames() const { - rtc::CritScope cs(&crit_); - return num_rendered_frames_; - } - bool black_frame() const { - rtc::CritScope cs(&crit_); - return black_frame_; - } - - private: - static bool CheckFrameColorYuv(uint8_t y_min, - uint8_t y_max, - uint8_t u_min, - uint8_t u_max, - uint8_t v_min, - uint8_t v_max, - const webrtc::VideoFrame* frame) { - if (!frame || !frame->video_frame_buffer()) { - return false; - } - // Y - int y_width = frame->width(); - int y_height = frame->height(); - const uint8_t* y_plane = frame->video_frame_buffer()->DataY(); - const uint8_t* y_pos = y_plane; - int32_t y_pitch = frame->video_frame_buffer()->StrideY(); - for (int i = 0; i < y_height; ++i) { - for (int j = 0; j < y_width; ++j) { - uint8_t y_value = *(y_pos + j); - if (y_value < y_min || y_value > y_max) { - return false; - } - } - y_pos += y_pitch; - } - // U and V - int chroma_width = (frame->width() + 1)/2; - int chroma_height = (frame->height() + 1)/2; - const uint8_t* u_plane = frame->video_frame_buffer()->DataU(); - const uint8_t* v_plane = frame->video_frame_buffer()->DataV(); - const uint8_t* u_pos = u_plane; - const uint8_t* v_pos = v_plane; - int32_t u_pitch = frame->video_frame_buffer()->StrideU(); - int32_t v_pitch = frame->video_frame_buffer()->StrideV(); - for (int i = 0; i < chroma_height; ++i) { - for (int j = 0; j < chroma_width; ++j) { - uint8_t u_value = *(u_pos + j); - if (u_value < u_min || u_value > u_max) { - return false; - } - uint8_t v_value = *(v_pos + j); - if (v_value < v_min || v_value > v_max) { - return false; - } - } - u_pos += u_pitch; - v_pos += v_pitch; - } - return true; - } - - int errors_; - int width_; - int height_; - webrtc::VideoRotation rotation_; - int64_t timestamp_us_; - int num_rendered_frames_; - bool black_frame_; - rtc::CriticalSection crit_; -}; - -} // namespace cricket - -#endif // WEBRTC_MEDIA_BASE_FAKEVIDEORENDERER_H_ diff --git a/WebRtc.NET/include/webrtc/media/base/mediachannel.h b/WebRtc.NET/include/webrtc/media/base/mediachannel.h deleted file mode 100644 index ecff95a4..00000000 --- a/WebRtc.NET/include/webrtc/media/base/mediachannel.h +++ /dev/null @@ -1,1207 +0,0 @@ -/* - * Copyright (c) 2004 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MEDIA_BASE_MEDIACHANNEL_H_ -#define WEBRTC_MEDIA_BASE_MEDIACHANNEL_H_ - -#include -#include -#include -#include - -#include "webrtc/api/rtpparameters.h" -#include "webrtc/base/basictypes.h" -#include "webrtc/base/buffer.h" -#include "webrtc/base/copyonwritebuffer.h" -#include "webrtc/base/dscp.h" -#include "webrtc/base/logging.h" -#include "webrtc/base/networkroute.h" -#include "webrtc/base/optional.h" -#include "webrtc/base/sigslot.h" -#include "webrtc/base/socket.h" -#include "webrtc/base/window.h" -#include "webrtc/config.h" -#include "webrtc/media/base/codec.h" -#include "webrtc/media/base/mediaconstants.h" -#include "webrtc/media/base/streamparams.h" -#include "webrtc/media/base/videosinkinterface.h" -#include "webrtc/media/base/videosourceinterface.h" -// TODO(juberti): re-evaluate this include -#include "webrtc/pc/audiomonitor.h" - -namespace rtc { -class RateLimiter; -class Timing; -} - -namespace webrtc { -class AudioSinkInterface; -class VideoFrame; -} - -namespace cricket { - -class AudioSource; -class VideoCapturer; -struct RtpHeader; -struct VideoFormat; - -const int kScreencastDefaultFps = 5; - -template -static std::string ToStringIfSet(const char* key, const rtc::Optional& val) { - std::string str; - if (val) { - str = key; - str += ": "; - str += val ? rtc::ToString(*val) : ""; - str += ", "; - } - return str; -} - -template -static std::string VectorToString(const std::vector& vals) { - std::ostringstream ost; - ost << "["; - for (size_t i = 0; i < vals.size(); ++i) { - if (i > 0) { - ost << ", "; - } - ost << vals[i].ToString(); - } - ost << "]"; - return ost.str(); -} - -template -static T MinPositive(T a, T b) { - if (a <= 0) { - return b; - } - if (b <= 0) { - return a; - } - return std::min(a, b); -} - -// Construction-time settings, passed to -// MediaControllerInterface::Create, and passed on when creating -// MediaChannels. -struct MediaConfig { - // Set DSCP value on packets. This flag comes from the - // PeerConnection constraint 'googDscp'. - bool enable_dscp = false; - - // Video-specific config. - struct Video { - // Enable WebRTC CPU Overuse Detection. This flag comes from the - // PeerConnection constraint 'googCpuOveruseDetection'. - bool enable_cpu_overuse_detection = true; - - // Enable WebRTC suspension of video. No video frames will be sent - // when the bitrate is below the configured minimum bitrate. This - // flag comes from the PeerConnection constraint - // 'googSuspendBelowMinBitrate', and WebRtcVideoChannel2 copies it - // to VideoSendStream::Config::suspend_below_min_bitrate. - bool suspend_below_min_bitrate = false; - - // Set to true if the renderer has an algorithm of frame selection. - // If the value is true, then WebRTC will hand over a frame as soon as - // possible without delay, and rendering smoothness is completely the duty - // of the renderer; - // If the value is false, then WebRTC is responsible to delay frame release - // in order to increase rendering smoothness. - // - // This flag comes from PeerConnection's RtcConfiguration, but is - // currently only set by the command line flag - // 'disable-rtc-smoothness-algorithm'. - // WebRtcVideoChannel2::AddRecvStream copies it to the created - // WebRtcVideoReceiveStream, where it is returned by the - // SmoothsRenderedFrames method. This method is used by the - // VideoReceiveStream, where the value is passed on to the - // IncomingVideoStream constructor. - bool disable_prerenderer_smoothing = false; - - // Enables periodic bandwidth probing in application-limited region. - bool periodic_alr_bandwidth_probing = false; - } video; - - bool operator==(const MediaConfig& o) const { - return enable_dscp == o.enable_dscp && - video.enable_cpu_overuse_detection == - o.video.enable_cpu_overuse_detection && - video.suspend_below_min_bitrate == - o.video.suspend_below_min_bitrate && - video.disable_prerenderer_smoothing == - o.video.disable_prerenderer_smoothing && - video.periodic_alr_bandwidth_probing == - o.video.periodic_alr_bandwidth_probing; - } - - bool operator!=(const MediaConfig& o) const { return !(*this == o); } -}; - -// Options that can be applied to a VoiceMediaChannel or a VoiceMediaEngine. -// Used to be flags, but that makes it hard to selectively apply options. -// We are moving all of the setting of options to structs like this, -// but some things currently still use flags. -struct AudioOptions { - void SetAll(const AudioOptions& change) { - SetFrom(&echo_cancellation, change.echo_cancellation); - SetFrom(&auto_gain_control, change.auto_gain_control); - SetFrom(&noise_suppression, change.noise_suppression); - SetFrom(&highpass_filter, change.highpass_filter); - SetFrom(&stereo_swapping, change.stereo_swapping); - SetFrom(&audio_jitter_buffer_max_packets, - change.audio_jitter_buffer_max_packets); - SetFrom(&audio_jitter_buffer_fast_accelerate, - change.audio_jitter_buffer_fast_accelerate); - SetFrom(&typing_detection, change.typing_detection); - SetFrom(&aecm_generate_comfort_noise, change.aecm_generate_comfort_noise); - SetFrom(&adjust_agc_delta, change.adjust_agc_delta); - SetFrom(&experimental_agc, change.experimental_agc); - SetFrom(&extended_filter_aec, change.extended_filter_aec); - SetFrom(&delay_agnostic_aec, change.delay_agnostic_aec); - SetFrom(&experimental_ns, change.experimental_ns); - SetFrom(&intelligibility_enhancer, change.intelligibility_enhancer); - SetFrom(&level_control, change.level_control); - SetFrom(&residual_echo_detector, change.residual_echo_detector); - SetFrom(&tx_agc_target_dbov, change.tx_agc_target_dbov); - SetFrom(&tx_agc_digital_compression_gain, - change.tx_agc_digital_compression_gain); - SetFrom(&tx_agc_limiter, change.tx_agc_limiter); - SetFrom(&recording_sample_rate, change.recording_sample_rate); - SetFrom(&playout_sample_rate, change.playout_sample_rate); - SetFrom(&combined_audio_video_bwe, change.combined_audio_video_bwe); - SetFrom(&audio_network_adaptor, change.audio_network_adaptor); - SetFrom(&audio_network_adaptor_config, change.audio_network_adaptor_config); - SetFrom(&level_control_initial_peak_level_dbfs, - change.level_control_initial_peak_level_dbfs); - } - - bool operator==(const AudioOptions& o) const { - return echo_cancellation == o.echo_cancellation && - auto_gain_control == o.auto_gain_control && - noise_suppression == o.noise_suppression && - highpass_filter == o.highpass_filter && - stereo_swapping == o.stereo_swapping && - audio_jitter_buffer_max_packets == - o.audio_jitter_buffer_max_packets && - audio_jitter_buffer_fast_accelerate == - o.audio_jitter_buffer_fast_accelerate && - typing_detection == o.typing_detection && - aecm_generate_comfort_noise == o.aecm_generate_comfort_noise && - experimental_agc == o.experimental_agc && - extended_filter_aec == o.extended_filter_aec && - delay_agnostic_aec == o.delay_agnostic_aec && - experimental_ns == o.experimental_ns && - intelligibility_enhancer == o.intelligibility_enhancer && - level_control == o.level_control && - residual_echo_detector == o.residual_echo_detector && - adjust_agc_delta == o.adjust_agc_delta && - tx_agc_target_dbov == o.tx_agc_target_dbov && - tx_agc_digital_compression_gain == - o.tx_agc_digital_compression_gain && - tx_agc_limiter == o.tx_agc_limiter && - recording_sample_rate == o.recording_sample_rate && - playout_sample_rate == o.playout_sample_rate && - combined_audio_video_bwe == o.combined_audio_video_bwe && - audio_network_adaptor == o.audio_network_adaptor && - audio_network_adaptor_config == o.audio_network_adaptor_config && - level_control_initial_peak_level_dbfs == - o.level_control_initial_peak_level_dbfs; - } - bool operator!=(const AudioOptions& o) const { return !(*this == o); } - - std::string ToString() const { - std::ostringstream ost; - ost << "AudioOptions {"; - ost << ToStringIfSet("aec", echo_cancellation); - ost << ToStringIfSet("agc", auto_gain_control); - ost << ToStringIfSet("ns", noise_suppression); - ost << ToStringIfSet("hf", highpass_filter); - ost << ToStringIfSet("swap", stereo_swapping); - ost << ToStringIfSet("audio_jitter_buffer_max_packets", - audio_jitter_buffer_max_packets); - ost << ToStringIfSet("audio_jitter_buffer_fast_accelerate", - audio_jitter_buffer_fast_accelerate); - ost << ToStringIfSet("typing", typing_detection); - ost << ToStringIfSet("comfort_noise", aecm_generate_comfort_noise); - ost << ToStringIfSet("agc_delta", adjust_agc_delta); - ost << ToStringIfSet("experimental_agc", experimental_agc); - ost << ToStringIfSet("extended_filter_aec", extended_filter_aec); - ost << ToStringIfSet("delay_agnostic_aec", delay_agnostic_aec); - ost << ToStringIfSet("experimental_ns", experimental_ns); - ost << ToStringIfSet("intelligibility_enhancer", intelligibility_enhancer); - ost << ToStringIfSet("level_control", level_control); - ost << ToStringIfSet("level_control_initial_peak_level_dbfs", - level_control_initial_peak_level_dbfs); - ost << ToStringIfSet("residual_echo_detector", residual_echo_detector); - ost << ToStringIfSet("tx_agc_target_dbov", tx_agc_target_dbov); - ost << ToStringIfSet("tx_agc_digital_compression_gain", - tx_agc_digital_compression_gain); - ost << ToStringIfSet("tx_agc_limiter", tx_agc_limiter); - ost << ToStringIfSet("recording_sample_rate", recording_sample_rate); - ost << ToStringIfSet("playout_sample_rate", playout_sample_rate); - ost << ToStringIfSet("combined_audio_video_bwe", combined_audio_video_bwe); - ost << ToStringIfSet("audio_network_adaptor", audio_network_adaptor); - // The adaptor config is a serialized proto buffer and therefore not human - // readable. So we comment out the following line. - // ost << ToStringIfSet("audio_network_adaptor_config", - // audio_network_adaptor_config); - ost << "}"; - return ost.str(); - } - - // Audio processing that attempts to filter away the output signal from - // later inbound pickup. - rtc::Optional echo_cancellation; - // Audio processing to adjust the sensitivity of the local mic dynamically. - rtc::Optional auto_gain_control; - // Audio processing to filter out background noise. - rtc::Optional noise_suppression; - // Audio processing to remove background noise of lower frequencies. - rtc::Optional highpass_filter; - // Audio processing to swap the left and right channels. - rtc::Optional stereo_swapping; - // Audio receiver jitter buffer (NetEq) max capacity in number of packets. - rtc::Optional audio_jitter_buffer_max_packets; - // Audio receiver jitter buffer (NetEq) fast accelerate mode. - rtc::Optional audio_jitter_buffer_fast_accelerate; - // Audio processing to detect typing. - rtc::Optional typing_detection; - rtc::Optional aecm_generate_comfort_noise; - rtc::Optional adjust_agc_delta; - rtc::Optional experimental_agc; - rtc::Optional extended_filter_aec; - rtc::Optional delay_agnostic_aec; - rtc::Optional experimental_ns; - rtc::Optional intelligibility_enhancer; - rtc::Optional level_control; - // Specifies an optional initialization value for the level controller. - rtc::Optional level_control_initial_peak_level_dbfs; - // Note that tx_agc_* only applies to non-experimental AGC. - rtc::Optional residual_echo_detector; - rtc::Optional tx_agc_target_dbov; - rtc::Optional tx_agc_digital_compression_gain; - rtc::Optional tx_agc_limiter; - rtc::Optional recording_sample_rate; - rtc::Optional playout_sample_rate; - // Enable combined audio+bandwidth BWE. - // TODO(pthatcher): This flag is set from the - // "googCombinedAudioVideoBwe", but not used anywhere. So delete it, - // and check if any other AudioOptions members are unused. - rtc::Optional combined_audio_video_bwe; - // Enable audio network adaptor. - rtc::Optional audio_network_adaptor; - // Config string for audio network adaptor. - rtc::Optional audio_network_adaptor_config; - - private: - template - static void SetFrom(rtc::Optional* s, const rtc::Optional& o) { - if (o) { - *s = o; - } - } -}; - -// Options that can be applied to a VideoMediaChannel or a VideoMediaEngine. -// Used to be flags, but that makes it hard to selectively apply options. -// We are moving all of the setting of options to structs like this, -// but some things currently still use flags. -struct VideoOptions { - void SetAll(const VideoOptions& change) { - SetFrom(&video_noise_reduction, change.video_noise_reduction); - SetFrom(&screencast_min_bitrate_kbps, change.screencast_min_bitrate_kbps); - SetFrom(&is_screencast, change.is_screencast); - } - - bool operator==(const VideoOptions& o) const { - return video_noise_reduction == o.video_noise_reduction && - screencast_min_bitrate_kbps == o.screencast_min_bitrate_kbps && - is_screencast == o.is_screencast; - } - bool operator!=(const VideoOptions& o) const { return !(*this == o); } - - std::string ToString() const { - std::ostringstream ost; - ost << "VideoOptions {"; - ost << ToStringIfSet("noise reduction", video_noise_reduction); - ost << ToStringIfSet("screencast min bitrate kbps", - screencast_min_bitrate_kbps); - ost << ToStringIfSet("is_screencast ", is_screencast); - ost << "}"; - return ost.str(); - } - - // Enable denoising? This flag comes from the getUserMedia - // constraint 'googNoiseReduction', and WebRtcVideoEngine2 passes it - // on to the codec options. Disabled by default. - rtc::Optional video_noise_reduction; - // Force screencast to use a minimum bitrate. This flag comes from - // the PeerConnection constraint 'googScreencastMinBitrate'. It is - // copied to the encoder config by WebRtcVideoChannel2. - rtc::Optional screencast_min_bitrate_kbps; - // Set by screencast sources. Implies selection of encoding settings - // suitable for screencast. Most likely not the right way to do - // things, e.g., screencast of a text document and screencast of a - // youtube video have different needs. - rtc::Optional is_screencast; - - private: - template - static void SetFrom(rtc::Optional* s, const rtc::Optional& o) { - if (o) { - *s = o; - } - } -}; - -// TODO(isheriff): Remove this once client usage is fixed to use RtpExtension. -struct RtpHeaderExtension { - RtpHeaderExtension() : id(0) {} - RtpHeaderExtension(const std::string& uri, int id) : uri(uri), id(id) {} - - std::string ToString() const { - std::ostringstream ost; - ost << "{"; - ost << "uri: " << uri; - ost << ", id: " << id; - ost << "}"; - return ost.str(); - } - - std::string uri; - int id; -}; - -class MediaChannel : public sigslot::has_slots<> { - public: - class NetworkInterface { - public: - enum SocketType { ST_RTP, ST_RTCP }; - virtual bool SendPacket(rtc::CopyOnWriteBuffer* packet, - const rtc::PacketOptions& options) = 0; - virtual bool SendRtcp(rtc::CopyOnWriteBuffer* packet, - const rtc::PacketOptions& options) = 0; - virtual int SetOption(SocketType type, rtc::Socket::Option opt, - int option) = 0; - virtual ~NetworkInterface() {} - }; - - explicit MediaChannel(const MediaConfig& config) - : enable_dscp_(config.enable_dscp), network_interface_(NULL) {} - MediaChannel() : enable_dscp_(false), network_interface_(NULL) {} - virtual ~MediaChannel() {} - - // Sets the abstract interface class for sending RTP/RTCP data. - virtual void SetInterface(NetworkInterface *iface) { - rtc::CritScope cs(&network_interface_crit_); - network_interface_ = iface; - SetDscp(enable_dscp_ ? PreferredDscp() : rtc::DSCP_DEFAULT); - } - virtual rtc::DiffServCodePoint PreferredDscp() const { - return rtc::DSCP_DEFAULT; - } - // Called when a RTP packet is received. - virtual void OnPacketReceived(rtc::CopyOnWriteBuffer* packet, - const rtc::PacketTime& packet_time) = 0; - // Called when a RTCP packet is received. - virtual void OnRtcpReceived(rtc::CopyOnWriteBuffer* packet, - const rtc::PacketTime& packet_time) = 0; - // Called when the socket's ability to send has changed. - virtual void OnReadyToSend(bool ready) = 0; - // Called when the network route used for sending packets changed. - virtual void OnNetworkRouteChanged( - const std::string& transport_name, - const rtc::NetworkRoute& network_route) = 0; - // Called when the rtp transport overhead changed. - virtual void OnTransportOverheadChanged( - int transport_overhead_per_packet) = 0; - // Creates a new outgoing media stream with SSRCs and CNAME as described - // by sp. - virtual bool AddSendStream(const StreamParams& sp) = 0; - // Removes an outgoing media stream. - // ssrc must be the first SSRC of the media stream if the stream uses - // multiple SSRCs. - virtual bool RemoveSendStream(uint32_t ssrc) = 0; - // Creates a new incoming media stream with SSRCs and CNAME as described - // by sp. - virtual bool AddRecvStream(const StreamParams& sp) = 0; - // Removes an incoming media stream. - // ssrc must be the first SSRC of the media stream if the stream uses - // multiple SSRCs. - virtual bool RemoveRecvStream(uint32_t ssrc) = 0; - - // Returns the absoulte sendtime extension id value from media channel. - virtual int GetRtpSendTimeExtnId() const { - return -1; - } - - // Base method to send packet using NetworkInterface. - bool SendPacket(rtc::CopyOnWriteBuffer* packet, - const rtc::PacketOptions& options) { - return DoSendPacket(packet, false, options); - } - - bool SendRtcp(rtc::CopyOnWriteBuffer* packet, - const rtc::PacketOptions& options) { - return DoSendPacket(packet, true, options); - } - - int SetOption(NetworkInterface::SocketType type, - rtc::Socket::Option opt, - int option) { - rtc::CritScope cs(&network_interface_crit_); - if (!network_interface_) - return -1; - - return network_interface_->SetOption(type, opt, option); - } - - private: - // This method sets DSCP |value| on both RTP and RTCP channels. - int SetDscp(rtc::DiffServCodePoint value) { - int ret; - ret = SetOption(NetworkInterface::ST_RTP, - rtc::Socket::OPT_DSCP, - value); - if (ret == 0) { - ret = SetOption(NetworkInterface::ST_RTCP, - rtc::Socket::OPT_DSCP, - value); - } - return ret; - } - - bool DoSendPacket(rtc::CopyOnWriteBuffer* packet, - bool rtcp, - const rtc::PacketOptions& options) { - rtc::CritScope cs(&network_interface_crit_); - if (!network_interface_) - return false; - - return (!rtcp) ? network_interface_->SendPacket(packet, options) - : network_interface_->SendRtcp(packet, options); - } - - const bool enable_dscp_; - // |network_interface_| can be accessed from the worker_thread and - // from any MediaEngine threads. This critical section is to protect accessing - // of network_interface_ object. - rtc::CriticalSection network_interface_crit_; - NetworkInterface* network_interface_; -}; - -// The stats information is structured as follows: -// Media are represented by either MediaSenderInfo or MediaReceiverInfo. -// Media contains a vector of SSRC infos that are exclusively used by this -// media. (SSRCs shared between media streams can't be represented.) - -// Information about an SSRC. -// This data may be locally recorded, or received in an RTCP SR or RR. -struct SsrcSenderInfo { - SsrcSenderInfo() - : ssrc(0), - timestamp(0) { - } - uint32_t ssrc; - double timestamp; // NTP timestamp, represented as seconds since epoch. -}; - -struct SsrcReceiverInfo { - SsrcReceiverInfo() - : ssrc(0), - timestamp(0) { - } - uint32_t ssrc; - double timestamp; -}; - -struct MediaSenderInfo { - MediaSenderInfo() - : bytes_sent(0), - packets_sent(0), - packets_lost(0), - fraction_lost(0.0), - rtt_ms(0) { - } - void add_ssrc(const SsrcSenderInfo& stat) { - local_stats.push_back(stat); - } - // Temporary utility function for call sites that only provide SSRC. - // As more info is added into SsrcSenderInfo, this function should go away. - void add_ssrc(uint32_t ssrc) { - SsrcSenderInfo stat; - stat.ssrc = ssrc; - add_ssrc(stat); - } - // Utility accessor for clients that are only interested in ssrc numbers. - std::vector ssrcs() const { - std::vector retval; - for (std::vector::const_iterator it = local_stats.begin(); - it != local_stats.end(); ++it) { - retval.push_back(it->ssrc); - } - return retval; - } - // Utility accessor for clients that make the assumption only one ssrc - // exists per media. - // This will eventually go away. - uint32_t ssrc() const { - if (local_stats.size() > 0) { - return local_stats[0].ssrc; - } else { - return 0; - } - } - int64_t bytes_sent; - int packets_sent; - int packets_lost; - float fraction_lost; - int64_t rtt_ms; - std::string codec_name; - rtc::Optional codec_payload_type; - std::vector local_stats; - std::vector remote_stats; -}; - -struct MediaReceiverInfo { - MediaReceiverInfo() - : bytes_rcvd(0), - packets_rcvd(0), - packets_lost(0), - fraction_lost(0.0) { - } - void add_ssrc(const SsrcReceiverInfo& stat) { - local_stats.push_back(stat); - } - // Temporary utility function for call sites that only provide SSRC. - // As more info is added into SsrcSenderInfo, this function should go away. - void add_ssrc(uint32_t ssrc) { - SsrcReceiverInfo stat; - stat.ssrc = ssrc; - add_ssrc(stat); - } - std::vector ssrcs() const { - std::vector retval; - for (std::vector::const_iterator it = local_stats.begin(); - it != local_stats.end(); ++it) { - retval.push_back(it->ssrc); - } - return retval; - } - // Utility accessor for clients that make the assumption only one ssrc - // exists per media. - // This will eventually go away. - uint32_t ssrc() const { - if (local_stats.size() > 0) { - return local_stats[0].ssrc; - } else { - return 0; - } - } - - int64_t bytes_rcvd; - int packets_rcvd; - int packets_lost; - float fraction_lost; - std::string codec_name; - rtc::Optional codec_payload_type; - std::vector local_stats; - std::vector remote_stats; -}; - -struct VoiceSenderInfo : public MediaSenderInfo { - VoiceSenderInfo() - : ext_seqnum(0), - jitter_ms(0), - audio_level(0), - aec_quality_min(0.0), - echo_delay_median_ms(0), - echo_delay_std_ms(0), - echo_return_loss(0), - echo_return_loss_enhancement(0), - residual_echo_likelihood(0.0f), - residual_echo_likelihood_recent_max(0.0f), - typing_noise_detected(false) {} - - int ext_seqnum; - int jitter_ms; - int audio_level; - float aec_quality_min; - int echo_delay_median_ms; - int echo_delay_std_ms; - int echo_return_loss; - int echo_return_loss_enhancement; - float residual_echo_likelihood; - float residual_echo_likelihood_recent_max; - bool typing_noise_detected; -}; - -struct VoiceReceiverInfo : public MediaReceiverInfo { - VoiceReceiverInfo() - : ext_seqnum(0), - jitter_ms(0), - jitter_buffer_ms(0), - jitter_buffer_preferred_ms(0), - delay_estimate_ms(0), - audio_level(0), - expand_rate(0), - speech_expand_rate(0), - secondary_decoded_rate(0), - accelerate_rate(0), - preemptive_expand_rate(0), - decoding_calls_to_silence_generator(0), - decoding_calls_to_neteq(0), - decoding_normal(0), - decoding_plc(0), - decoding_cng(0), - decoding_plc_cng(0), - decoding_muted_output(0), - capture_start_ntp_time_ms(-1) {} - - int ext_seqnum; - int jitter_ms; - int jitter_buffer_ms; - int jitter_buffer_preferred_ms; - int delay_estimate_ms; - int audio_level; - // fraction of synthesized audio inserted through expansion. - float expand_rate; - // fraction of synthesized speech inserted through expansion. - float speech_expand_rate; - // fraction of data out of secondary decoding, including FEC and RED. - float secondary_decoded_rate; - // Fraction of data removed through time compression. - float accelerate_rate; - // Fraction of data inserted through time stretching. - float preemptive_expand_rate; - int decoding_calls_to_silence_generator; - int decoding_calls_to_neteq; - int decoding_normal; - int decoding_plc; - int decoding_cng; - int decoding_plc_cng; - int decoding_muted_output; - // Estimated capture start time in NTP time in ms. - int64_t capture_start_ntp_time_ms; -}; - -struct VideoSenderInfo : public MediaSenderInfo { - VideoSenderInfo() - : packets_cached(0), - firs_rcvd(0), - plis_rcvd(0), - nacks_rcvd(0), - send_frame_width(0), - send_frame_height(0), - framerate_input(0), - framerate_sent(0), - nominal_bitrate(0), - preferred_bitrate(0), - adapt_reason(0), - adapt_changes(0), - avg_encode_ms(0), - encode_usage_percent(0), - frames_encoded(0) {} - - std::vector ssrc_groups; - // TODO(hbos): Move this to |VideoMediaInfo::send_codecs|? - std::string encoder_implementation_name; - int packets_cached; - int firs_rcvd; - int plis_rcvd; - int nacks_rcvd; - int send_frame_width; - int send_frame_height; - int framerate_input; - int framerate_sent; - int nominal_bitrate; - int preferred_bitrate; - int adapt_reason; - int adapt_changes; - int avg_encode_ms; - int encode_usage_percent; - uint32_t frames_encoded; - rtc::Optional qp_sum; -}; - -struct VideoReceiverInfo : public MediaReceiverInfo { - VideoReceiverInfo() - : packets_concealed(0), - firs_sent(0), - plis_sent(0), - nacks_sent(0), - frame_width(0), - frame_height(0), - framerate_rcvd(0), - framerate_decoded(0), - framerate_output(0), - framerate_render_input(0), - framerate_render_output(0), - frames_received(0), - frames_decoded(0), - decode_ms(0), - max_decode_ms(0), - jitter_buffer_ms(0), - min_playout_delay_ms(0), - render_delay_ms(0), - target_delay_ms(0), - current_delay_ms(0), - capture_start_ntp_time_ms(-1) { - } - - std::vector ssrc_groups; - // TODO(hbos): Move this to |VideoMediaInfo::receive_codecs|? - std::string decoder_implementation_name; - int packets_concealed; - int firs_sent; - int plis_sent; - int nacks_sent; - int frame_width; - int frame_height; - int framerate_rcvd; - int framerate_decoded; - int framerate_output; - // Framerate as sent to the renderer. - int framerate_render_input; - // Framerate that the renderer reports. - int framerate_render_output; - uint32_t frames_received; - uint32_t frames_decoded; - - // All stats below are gathered per-VideoReceiver, but some will be correlated - // across MediaStreamTracks. NOTE(hta): when sinking stats into per-SSRC - // structures, reflect this in the new layout. - - // Current frame decode latency. - int decode_ms; - // Maximum observed frame decode latency. - int max_decode_ms; - // Jitter (network-related) latency. - int jitter_buffer_ms; - // Requested minimum playout latency. - int min_playout_delay_ms; - // Requested latency to account for rendering delay. - int render_delay_ms; - // Target overall delay: network+decode+render, accounting for - // min_playout_delay_ms. - int target_delay_ms; - // Current overall delay, possibly ramping towards target_delay_ms. - int current_delay_ms; - - // Estimated capture start time in NTP time in ms. - int64_t capture_start_ntp_time_ms; -}; - -struct DataSenderInfo : public MediaSenderInfo { - DataSenderInfo() - : ssrc(0) { - } - - uint32_t ssrc; -}; - -struct DataReceiverInfo : public MediaReceiverInfo { - DataReceiverInfo() - : ssrc(0) { - } - - uint32_t ssrc; -}; - -struct BandwidthEstimationInfo { - BandwidthEstimationInfo() - : available_send_bandwidth(0), - available_recv_bandwidth(0), - target_enc_bitrate(0), - actual_enc_bitrate(0), - retransmit_bitrate(0), - transmit_bitrate(0), - bucket_delay(0) { - } - - int available_send_bandwidth; - int available_recv_bandwidth; - int target_enc_bitrate; - int actual_enc_bitrate; - int retransmit_bitrate; - int transmit_bitrate; - int64_t bucket_delay; -}; - -// Maps from payload type to |RtpCodecParameters|. -typedef std::map RtpCodecParametersMap; - -struct VoiceMediaInfo { - void Clear() { - senders.clear(); - receivers.clear(); - send_codecs.clear(); - receive_codecs.clear(); - } - std::vector senders; - std::vector receivers; - RtpCodecParametersMap send_codecs; - RtpCodecParametersMap receive_codecs; -}; - -struct VideoMediaInfo { - void Clear() { - senders.clear(); - receivers.clear(); - bw_estimations.clear(); - send_codecs.clear(); - receive_codecs.clear(); - } - std::vector senders; - std::vector receivers; - std::vector bw_estimations; - RtpCodecParametersMap send_codecs; - RtpCodecParametersMap receive_codecs; -}; - -struct DataMediaInfo { - void Clear() { - senders.clear(); - receivers.clear(); - } - std::vector senders; - std::vector receivers; -}; - -struct RtcpParameters { - bool reduced_size = false; -}; - -template -struct RtpParameters { - virtual std::string ToString() const { - std::ostringstream ost; - ost << "{"; - ost << "codecs: " << VectorToString(codecs) << ", "; - ost << "extensions: " << VectorToString(extensions); - ost << "}"; - return ost.str(); - } - - std::vector codecs; - std::vector extensions; - // TODO(pthatcher): Add streams. - RtcpParameters rtcp; - virtual ~RtpParameters() = default; -}; - -// TODO(deadbeef): Rename to RtpSenderParameters, since they're intended to -// encapsulate all the parameters needed for an RtpSender. -template -struct RtpSendParameters : RtpParameters { - std::string ToString() const override { - std::ostringstream ost; - ost << "{"; - ost << "codecs: " << VectorToString(this->codecs) << ", "; - ost << "extensions: " << VectorToString(this->extensions) << ", "; - ost << "max_bandwidth_bps: " << max_bandwidth_bps << ", "; - ost << "}"; - return ost.str(); - } - - int max_bandwidth_bps = -1; -}; - -struct AudioSendParameters : RtpSendParameters { - std::string ToString() const override { - std::ostringstream ost; - ost << "{"; - ost << "codecs: " << VectorToString(this->codecs) << ", "; - ost << "extensions: " << VectorToString(this->extensions) << ", "; - ost << "max_bandwidth_bps: " << max_bandwidth_bps << ", "; - ost << "options: " << options.ToString(); - ost << "}"; - return ost.str(); - } - - AudioOptions options; -}; - -struct AudioRecvParameters : RtpParameters { -}; - -class VoiceMediaChannel : public MediaChannel { - public: - enum Error { - ERROR_NONE = 0, // No error. - ERROR_OTHER, // Other errors. - ERROR_REC_DEVICE_OPEN_FAILED = 100, // Could not open mic. - ERROR_REC_DEVICE_MUTED, // Mic was muted by OS. - ERROR_REC_DEVICE_SILENT, // No background noise picked up. - ERROR_REC_DEVICE_SATURATION, // Mic input is clipping. - ERROR_REC_DEVICE_REMOVED, // Mic was removed while active. - ERROR_REC_RUNTIME_ERROR, // Processing is encountering errors. - ERROR_REC_SRTP_ERROR, // Generic SRTP failure. - ERROR_REC_SRTP_AUTH_FAILED, // Failed to authenticate packets. - ERROR_REC_TYPING_NOISE_DETECTED, // Typing noise is detected. - ERROR_PLAY_DEVICE_OPEN_FAILED = 200, // Could not open playout. - ERROR_PLAY_DEVICE_MUTED, // Playout muted by OS. - ERROR_PLAY_DEVICE_REMOVED, // Playout removed while active. - ERROR_PLAY_RUNTIME_ERROR, // Errors in voice processing. - ERROR_PLAY_SRTP_ERROR, // Generic SRTP failure. - ERROR_PLAY_SRTP_AUTH_FAILED, // Failed to authenticate packets. - ERROR_PLAY_SRTP_REPLAY, // Packet replay detected. - }; - - VoiceMediaChannel() {} - explicit VoiceMediaChannel(const MediaConfig& config) - : MediaChannel(config) {} - virtual ~VoiceMediaChannel() {} - virtual bool SetSendParameters(const AudioSendParameters& params) = 0; - virtual bool SetRecvParameters(const AudioRecvParameters& params) = 0; - virtual webrtc::RtpParameters GetRtpSendParameters(uint32_t ssrc) const = 0; - virtual bool SetRtpSendParameters( - uint32_t ssrc, - const webrtc::RtpParameters& parameters) = 0; - virtual webrtc::RtpParameters GetRtpReceiveParameters( - uint32_t ssrc) const = 0; - virtual bool SetRtpReceiveParameters( - uint32_t ssrc, - const webrtc::RtpParameters& parameters) = 0; - // Starts or stops playout of received audio. - virtual void SetPlayout(bool playout) = 0; - // Starts or stops sending (and potentially capture) of local audio. - virtual void SetSend(bool send) = 0; - // Configure stream for sending. - virtual bool SetAudioSend(uint32_t ssrc, - bool enable, - const AudioOptions* options, - AudioSource* source) = 0; - // Gets current energy levels for all incoming streams. - virtual bool GetActiveStreams(AudioInfo::StreamList* actives) = 0; - // Get the current energy level of the stream sent to the speaker. - virtual int GetOutputLevel() = 0; - // Get the time in milliseconds since last recorded keystroke, or negative. - virtual int GetTimeSinceLastTyping() = 0; - // Temporarily exposed field for tuning typing detect options. - virtual void SetTypingDetectionParameters(int time_window, - int cost_per_typing, int reporting_threshold, int penalty_decay, - int type_event_delay) = 0; - // Set speaker output volume of the specified ssrc. - virtual bool SetOutputVolume(uint32_t ssrc, double volume) = 0; - // Returns if the telephone-event has been negotiated. - virtual bool CanInsertDtmf() = 0; - // Send a DTMF |event|. The DTMF out-of-band signal will be used. - // The |ssrc| should be either 0 or a valid send stream ssrc. - // The valid value for the |event| are 0 to 15 which corresponding to - // DTMF event 0-9, *, #, A-D. - virtual bool InsertDtmf(uint32_t ssrc, int event, int duration) = 0; - // Gets quality stats for the channel. - virtual bool GetStats(VoiceMediaInfo* info) = 0; - - virtual void SetRawAudioSink( - uint32_t ssrc, - std::unique_ptr sink) = 0; -}; - -// TODO(deadbeef): Rename to VideoSenderParameters, since they're intended to -// encapsulate all the parameters needed for a video RtpSender. -struct VideoSendParameters : RtpSendParameters { - // Use conference mode? This flag comes from the remote - // description's SDP line 'a=x-google-flag:conference', copied over - // by VideoChannel::SetRemoteContent_w, and ultimately used by - // conference mode screencast logic in - // WebRtcVideoChannel2::WebRtcVideoSendStream::CreateVideoEncoderConfig. - // The special screencast behaviour is disabled by default. - bool conference_mode = false; -}; - -// TODO(deadbeef): Rename to VideoReceiverParameters, since they're intended to -// encapsulate all the parameters needed for a video RtpReceiver. -struct VideoRecvParameters : RtpParameters { -}; - -class VideoMediaChannel : public MediaChannel { - public: - enum Error { - ERROR_NONE = 0, // No error. - ERROR_OTHER, // Other errors. - ERROR_REC_DEVICE_OPEN_FAILED = 100, // Could not open camera. - ERROR_REC_DEVICE_NO_DEVICE, // No camera. - ERROR_REC_DEVICE_IN_USE, // Device is in already use. - ERROR_REC_DEVICE_REMOVED, // Device is removed. - ERROR_REC_SRTP_ERROR, // Generic sender SRTP failure. - ERROR_REC_SRTP_AUTH_FAILED, // Failed to authenticate packets. - ERROR_REC_CPU_MAX_CANT_DOWNGRADE, // Can't downgrade capture anymore. - ERROR_PLAY_SRTP_ERROR = 200, // Generic receiver SRTP failure. - ERROR_PLAY_SRTP_AUTH_FAILED, // Failed to authenticate packets. - ERROR_PLAY_SRTP_REPLAY, // Packet replay detected. - }; - - VideoMediaChannel() {} - explicit VideoMediaChannel(const MediaConfig& config) - : MediaChannel(config) {} - virtual ~VideoMediaChannel() {} - - virtual bool SetSendParameters(const VideoSendParameters& params) = 0; - virtual bool SetRecvParameters(const VideoRecvParameters& params) = 0; - virtual webrtc::RtpParameters GetRtpSendParameters(uint32_t ssrc) const = 0; - virtual bool SetRtpSendParameters( - uint32_t ssrc, - const webrtc::RtpParameters& parameters) = 0; - virtual webrtc::RtpParameters GetRtpReceiveParameters( - uint32_t ssrc) const = 0; - virtual bool SetRtpReceiveParameters( - uint32_t ssrc, - const webrtc::RtpParameters& parameters) = 0; - // Gets the currently set codecs/payload types to be used for outgoing media. - virtual bool GetSendCodec(VideoCodec* send_codec) = 0; - // Starts or stops transmission (and potentially capture) of local video. - virtual bool SetSend(bool send) = 0; - // Configure stream for sending and register a source. - // The |ssrc| must correspond to a registered send stream. - virtual bool SetVideoSend( - uint32_t ssrc, - bool enable, - const VideoOptions* options, - rtc::VideoSourceInterface* source) = 0; - // Sets the sink object to be used for the specified stream. - // If SSRC is 0, the renderer is used for the 'default' stream. - virtual bool SetSink(uint32_t ssrc, - rtc::VideoSinkInterface* sink) = 0; - // Gets quality stats for the channel. - virtual bool GetStats(VideoMediaInfo* info) = 0; -}; - -enum DataMessageType { - // Chrome-Internal use only. See SctpDataMediaChannel for the actual PPID - // values. - DMT_NONE = 0, - DMT_CONTROL = 1, - DMT_BINARY = 2, - DMT_TEXT = 3, -}; - -// Info about data received in DataMediaChannel. For use in -// DataMediaChannel::SignalDataReceived and in all of the signals that -// signal fires, on up the chain. -struct ReceiveDataParams { - // The in-packet stream indentifier. - // RTP data channels use SSRCs, SCTP data channels use SIDs. - union { - uint32_t ssrc; - int sid; - }; - // The type of message (binary, text, or control). - DataMessageType type; - // A per-stream value incremented per packet in the stream. - int seq_num; - // A per-stream value monotonically increasing with time. - int timestamp; - - ReceiveDataParams() : sid(0), type(DMT_TEXT), seq_num(0), timestamp(0) {} -}; - -struct SendDataParams { - // The in-packet stream indentifier. - // RTP data channels use SSRCs, SCTP data channels use SIDs. - union { - uint32_t ssrc; - int sid; - }; - // The type of message (binary, text, or control). - DataMessageType type; - - // For SCTP, whether to send messages flagged as ordered or not. - // If false, messages can be received out of order. - bool ordered; - // For SCTP, whether the messages are sent reliably or not. - // If false, messages may be lost. - bool reliable; - // For SCTP, if reliable == false, provide partial reliability by - // resending up to this many times. Either count or millis - // is supported, not both at the same time. - int max_rtx_count; - // For SCTP, if reliable == false, provide partial reliability by - // resending for up to this many milliseconds. Either count or millis - // is supported, not both at the same time. - int max_rtx_ms; - - SendDataParams() - : sid(0), - type(DMT_TEXT), - // TODO(pthatcher): Make these true by default? - ordered(false), - reliable(false), - max_rtx_count(0), - max_rtx_ms(0) {} -}; - -enum SendDataResult { SDR_SUCCESS, SDR_ERROR, SDR_BLOCK }; - -struct DataSendParameters : RtpSendParameters { - std::string ToString() const { - std::ostringstream ost; - // Options and extensions aren't used. - ost << "{"; - ost << "codecs: " << VectorToString(codecs) << ", "; - ost << "max_bandwidth_bps: " << max_bandwidth_bps; - ost << "}"; - return ost.str(); - } -}; - -struct DataRecvParameters : RtpParameters { -}; - -class DataMediaChannel : public MediaChannel { - public: - enum Error { - ERROR_NONE = 0, // No error. - ERROR_OTHER, // Other errors. - ERROR_SEND_SRTP_ERROR = 200, // Generic SRTP failure. - ERROR_SEND_SRTP_AUTH_FAILED, // Failed to authenticate packets. - ERROR_RECV_SRTP_ERROR, // Generic SRTP failure. - ERROR_RECV_SRTP_AUTH_FAILED, // Failed to authenticate packets. - ERROR_RECV_SRTP_REPLAY, // Packet replay detected. - }; - - DataMediaChannel() {} - DataMediaChannel(const MediaConfig& config) : MediaChannel(config) {} - virtual ~DataMediaChannel() {} - - virtual bool SetSendParameters(const DataSendParameters& params) = 0; - virtual bool SetRecvParameters(const DataRecvParameters& params) = 0; - - // TODO(pthatcher): Implement this. - virtual bool GetStats(DataMediaInfo* info) { return true; } - - virtual bool SetSend(bool send) = 0; - virtual bool SetReceive(bool receive) = 0; - - virtual void OnNetworkRouteChanged(const std::string& transport_name, - const rtc::NetworkRoute& network_route) {} - - virtual bool SendData( - const SendDataParams& params, - const rtc::CopyOnWriteBuffer& payload, - SendDataResult* result = NULL) = 0; - // Signals when data is received (params, data, len) - sigslot::signal3 SignalDataReceived; - // Signal when the media channel is ready to send the stream. Arguments are: - // writable(bool) - sigslot::signal1 SignalReadyToSend; -}; - -} // namespace cricket - -#endif // WEBRTC_MEDIA_BASE_MEDIACHANNEL_H_ diff --git a/WebRtc.NET/include/webrtc/media/base/mediaengine.h b/WebRtc.NET/include/webrtc/media/base/mediaengine.h deleted file mode 100644 index 0dbac559..00000000 --- a/WebRtc.NET/include/webrtc/media/base/mediaengine.h +++ /dev/null @@ -1,182 +0,0 @@ -/* - * Copyright (c) 2004 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MEDIA_BASE_MEDIAENGINE_H_ -#define WEBRTC_MEDIA_BASE_MEDIAENGINE_H_ - -#if defined(WEBRTC_MAC) && !defined(WEBRTC_IOS) -#include -#endif - -#include -#include - -#include "webrtc/api/rtpparameters.h" -#include "webrtc/base/fileutils.h" -#include "webrtc/base/sigslotrepeater.h" -#include "webrtc/call/audio_state.h" -#include "webrtc/media/base/codec.h" -#include "webrtc/media/base/mediachannel.h" -#include "webrtc/media/base/videocommon.h" -#include "webrtc/modules/audio_coding/codecs/audio_decoder_factory.h" - -#if defined(GOOGLE_CHROME_BUILD) || defined(CHROMIUM_BUILD) -#define DISABLE_MEDIA_ENGINE_FACTORY -#endif - -namespace webrtc { -class AudioDeviceModule; -class AudioMixer; -class Call; -} - -namespace cricket { - -struct RtpCapabilities { - std::vector header_extensions; -}; - -// MediaEngineInterface is an abstraction of a media engine which can be -// subclassed to support different media componentry backends. -// It supports voice and video operations in the same class to facilitate -// proper synchronization between both media types. -class MediaEngineInterface { - public: - virtual ~MediaEngineInterface() {} - - // Initialization - // Starts the engine. - virtual bool Init() = 0; - // TODO(solenberg): Remove once VoE API refactoring is done. - virtual rtc::scoped_refptr GetAudioState() const = 0; - - // MediaChannel creation - // Creates a voice media channel. Returns NULL on failure. - virtual VoiceMediaChannel* CreateChannel(webrtc::Call* call, - const MediaConfig& config, - const AudioOptions& options) = 0; - // Creates a video media channel, paired with the specified voice channel. - // Returns NULL on failure. - virtual VideoMediaChannel* CreateVideoChannel( - webrtc::Call* call, - const MediaConfig& config, - const VideoOptions& options) = 0; - - // Gets the current microphone level, as a value between 0 and 10. - virtual int GetInputLevel() = 0; - - virtual const std::vector& audio_send_codecs() = 0; - virtual const std::vector& audio_recv_codecs() = 0; - virtual RtpCapabilities GetAudioCapabilities() = 0; - virtual std::vector video_codecs() = 0; - virtual RtpCapabilities GetVideoCapabilities() = 0; - - // Starts AEC dump using existing file, a maximum file size in bytes can be - // specified. Logging is stopped just before the size limit is exceeded. - // If max_size_bytes is set to a value <= 0, no limit will be used. - virtual bool StartAecDump(rtc::PlatformFile file, int64_t max_size_bytes) = 0; - - // Stops recording AEC dump. - virtual void StopAecDump() = 0; -}; - - -#if !defined(DISABLE_MEDIA_ENGINE_FACTORY) -class MediaEngineFactory { - public: - typedef cricket::MediaEngineInterface* (*MediaEngineCreateFunction)(); - // Creates a media engine, using either the compiled system default or the - // creation function specified in SetCreateFunction, if specified. - static MediaEngineInterface* Create(); - // Sets the function used when calling Create. If unset, the compiled system - // default will be used. Returns the old create function, or NULL if one - // wasn't set. Likewise, NULL can be used as the |function| parameter to - // reset to the default behavior. - static MediaEngineCreateFunction SetCreateFunction( - MediaEngineCreateFunction function); - private: - static MediaEngineCreateFunction create_function_; -}; -#endif - -// CompositeMediaEngine constructs a MediaEngine from separate -// voice and video engine classes. -template -class CompositeMediaEngine : public MediaEngineInterface { - public: - CompositeMediaEngine(webrtc::AudioDeviceModule* adm, - const rtc::scoped_refptr& - audio_decoder_factory, - rtc::scoped_refptr audio_mixer) - : voice_(adm, audio_decoder_factory, audio_mixer) {} - virtual ~CompositeMediaEngine() {} - virtual bool Init() { - video_.Init(); - return true; - } - - virtual rtc::scoped_refptr GetAudioState() const { - return voice_.GetAudioState(); - } - virtual VoiceMediaChannel* CreateChannel(webrtc::Call* call, - const MediaConfig& config, - const AudioOptions& options) { - return voice_.CreateChannel(call, config, options); - } - virtual VideoMediaChannel* CreateVideoChannel(webrtc::Call* call, - const MediaConfig& config, - const VideoOptions& options) { - return video_.CreateChannel(call, config, options); - } - - virtual int GetInputLevel() { - return voice_.GetInputLevel(); - } - virtual const std::vector& audio_send_codecs() { - return voice_.send_codecs(); - } - virtual const std::vector& audio_recv_codecs() { - return voice_.recv_codecs(); - } - virtual RtpCapabilities GetAudioCapabilities() { - return voice_.GetCapabilities(); - } - virtual std::vector video_codecs() { return video_.codecs(); } - virtual RtpCapabilities GetVideoCapabilities() { - return video_.GetCapabilities(); - } - - virtual bool StartAecDump(rtc::PlatformFile file, int64_t max_size_bytes) { - return voice_.StartAecDump(file, max_size_bytes); - } - - virtual void StopAecDump() { - voice_.StopAecDump(); - } - - protected: - VOICE voice_; - VIDEO video_; -}; - -enum DataChannelType { DCT_NONE = 0, DCT_RTP = 1, DCT_SCTP = 2, DCT_QUIC = 3 }; - -class DataEngineInterface { - public: - virtual ~DataEngineInterface() {} - virtual DataMediaChannel* CreateChannel(const MediaConfig& config) = 0; - virtual const std::vector& data_codecs() = 0; -}; - -webrtc::RtpParameters CreateRtpParametersWithOneEncoding(); - -} // namespace cricket - -#endif // WEBRTC_MEDIA_BASE_MEDIAENGINE_H_ diff --git a/WebRtc.NET/include/webrtc/media/base/rtputils.h b/WebRtc.NET/include/webrtc/media/base/rtputils.h deleted file mode 100644 index 1a710576..00000000 --- a/WebRtc.NET/include/webrtc/media/base/rtputils.h +++ /dev/null @@ -1,82 +0,0 @@ -/* - * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MEDIA_BASE_RTPUTILS_H_ -#define WEBRTC_MEDIA_BASE_RTPUTILS_H_ - -#include "webrtc/base/byteorder.h" - -namespace rtc { -struct PacketTimeUpdateParams; -} // namespace rtc - -namespace cricket { - -const size_t kMinRtpPacketLen = 12; -const size_t kMaxRtpPacketLen = 2048; -const size_t kMinRtcpPacketLen = 4; - -struct RtpHeader { - int payload_type; - int seq_num; - uint32_t timestamp; - uint32_t ssrc; -}; - -enum RtcpTypes { - kRtcpTypeSR = 200, // Sender report payload type. - kRtcpTypeRR = 201, // Receiver report payload type. - kRtcpTypeSDES = 202, // SDES payload type. - kRtcpTypeBye = 203, // BYE payload type. - kRtcpTypeApp = 204, // APP payload type. - kRtcpTypeRTPFB = 205, // Transport layer Feedback message payload type. - kRtcpTypePSFB = 206, // Payload-specific Feedback message payload type. -}; - -bool GetRtpPayloadType(const void* data, size_t len, int* value); -bool GetRtpSeqNum(const void* data, size_t len, int* value); -bool GetRtpTimestamp(const void* data, size_t len, uint32_t* value); -bool GetRtpSsrc(const void* data, size_t len, uint32_t* value); -bool GetRtpHeaderLen(const void* data, size_t len, size_t* value); -bool GetRtcpType(const void* data, size_t len, int* value); -bool GetRtcpSsrc(const void* data, size_t len, uint32_t* value); -bool GetRtpHeader(const void* data, size_t len, RtpHeader* header); - -bool SetRtpSsrc(void* data, size_t len, uint32_t value); -// Assumes version 2, no padding, no extensions, no csrcs. -bool SetRtpHeader(void* data, size_t len, const RtpHeader& header); - -bool IsRtpPacket(const void* data, size_t len); - -// True if |payload type| is 0-127. -bool IsValidRtpPayloadType(int payload_type); - -// Verifies that a packet has a valid RTP header. -bool ValidateRtpHeader(const uint8_t* rtp, - size_t length, - size_t* header_length); - -// Helper method which updates the absolute send time extension if present. -bool UpdateRtpAbsSendTimeExtension(uint8_t* rtp, - size_t length, - int extension_id, - uint64_t time_us); - -// Applies specified |options| to the packet. It updates the absolute send time -// extension header if it is present present then updates HMAC. -bool ApplyPacketOptions(uint8_t* data, - size_t length, - const rtc::PacketTimeUpdateParams& packet_time_params, - uint64_t time_us); - - -} // namespace cricket - -#endif // WEBRTC_MEDIA_BASE_RTPUTILS_H_ diff --git a/WebRtc.NET/include/webrtc/media/base/streamparams.h b/WebRtc.NET/include/webrtc/media/base/streamparams.h deleted file mode 100644 index 75d82809..00000000 --- a/WebRtc.NET/include/webrtc/media/base/streamparams.h +++ /dev/null @@ -1,317 +0,0 @@ -/* - * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -// This file contains structures for describing SSRCs from a media source such -// as a MediaStreamTrack when it is sent across an RTP session. Multiple media -// sources may be sent across the same RTP session, each of them will be -// described by one StreamParams object -// SsrcGroup is used to describe the relationship between the SSRCs that -// are used for this media source. -// E.x: Consider a source that is sent as 3 simulcast streams -// Let the simulcast elements have SSRC 10, 20, 30. -// Let each simulcast element use FEC and let the protection packets have -// SSRC 11,21,31. -// To describe this 4 SsrcGroups are needed, -// StreamParams would then contain ssrc = {10,11,20,21,30,31} and -// ssrc_groups = {{SIM,{10,20,30}, {FEC,{10,11}, {FEC, {20,21}, {FEC {30,31}}} -// Please see RFC 5576. - -#ifndef WEBRTC_MEDIA_BASE_STREAMPARAMS_H_ -#define WEBRTC_MEDIA_BASE_STREAMPARAMS_H_ - -#include - -#include -#include -#include -#include - -#include "webrtc/base/constructormagic.h" - -namespace cricket { - -extern const char kFecSsrcGroupSemantics[]; -extern const char kFecFrSsrcGroupSemantics[]; -extern const char kFidSsrcGroupSemantics[]; -extern const char kSimSsrcGroupSemantics[]; - -struct SsrcGroup { - SsrcGroup(const std::string& usage, const std::vector& ssrcs) - : semantics(usage), ssrcs(ssrcs) {} - - bool operator==(const SsrcGroup& other) const { - return (semantics == other.semantics && ssrcs == other.ssrcs); - } - bool operator!=(const SsrcGroup &other) const { - return !(*this == other); - } - - bool has_semantics(const std::string& semantics) const; - - std::string ToString() const; - - std::string semantics; // e.g FIX, FEC, SIM. - std::vector ssrcs; // SSRCs of this type. -}; - -struct StreamParams { - static StreamParams CreateLegacy(uint32_t ssrc) { - StreamParams stream; - stream.ssrcs.push_back(ssrc); - return stream; - } - - bool operator==(const StreamParams& other) const { - return (groupid == other.groupid && - id == other.id && - ssrcs == other.ssrcs && - ssrc_groups == other.ssrc_groups && - type == other.type && - display == other.display && - cname == other.cname && - sync_label == other.sync_label); - } - bool operator!=(const StreamParams &other) const { - return !(*this == other); - } - - uint32_t first_ssrc() const { - if (ssrcs.empty()) { - return 0; - } - - return ssrcs[0]; - } - bool has_ssrcs() const { - return !ssrcs.empty(); - } - bool has_ssrc(uint32_t ssrc) const { - return std::find(ssrcs.begin(), ssrcs.end(), ssrc) != ssrcs.end(); - } - void add_ssrc(uint32_t ssrc) { ssrcs.push_back(ssrc); } - bool has_ssrc_groups() const { - return !ssrc_groups.empty(); - } - bool has_ssrc_group(const std::string& semantics) const { - return (get_ssrc_group(semantics) != NULL); - } - const SsrcGroup* get_ssrc_group(const std::string& semantics) const { - for (std::vector::const_iterator it = ssrc_groups.begin(); - it != ssrc_groups.end(); ++it) { - if (it->has_semantics(semantics)) { - return &(*it); - } - } - return NULL; - } - - // Convenience function to add an FID ssrc for a primary_ssrc - // that's already been added. - bool AddFidSsrc(uint32_t primary_ssrc, uint32_t fid_ssrc) { - return AddSecondarySsrc(kFidSsrcGroupSemantics, primary_ssrc, fid_ssrc); - } - - // Convenience function to lookup the FID ssrc for a primary_ssrc. - // Returns false if primary_ssrc not found or FID not defined for it. - bool GetFidSsrc(uint32_t primary_ssrc, uint32_t* fid_ssrc) const { - return GetSecondarySsrc(kFidSsrcGroupSemantics, primary_ssrc, fid_ssrc); - } - - // Convenience function to add an FEC-FR ssrc for a primary_ssrc - // that's already been added. - bool AddFecFrSsrc(uint32_t primary_ssrc, uint32_t fecfr_ssrc) { - return AddSecondarySsrc(kFecFrSsrcGroupSemantics, primary_ssrc, fecfr_ssrc); - } - - // Convenience function to lookup the FEC-FR ssrc for a primary_ssrc. - // Returns false if primary_ssrc not found or FEC-FR not defined for it. - bool GetFecFrSsrc(uint32_t primary_ssrc, uint32_t* fecfr_ssrc) const { - return GetSecondarySsrc(kFecFrSsrcGroupSemantics, primary_ssrc, fecfr_ssrc); - } - - // Convenience to get all the SIM SSRCs if there are SIM ssrcs, or - // the first SSRC otherwise. - void GetPrimarySsrcs(std::vector* ssrcs) const; - - // Convenience to get all the FID SSRCs for the given primary ssrcs. - // If a given primary SSRC does not have a FID SSRC, the list of FID - // SSRCS will be smaller than the list of primary SSRCs. - void GetFidSsrcs(const std::vector& primary_ssrcs, - std::vector* fid_ssrcs) const; - - std::string ToString() const; - - // Resource of the MUC jid of the participant of with this stream. - // For 1:1 calls, should be left empty (which means remote streams - // and local streams should not be mixed together). - std::string groupid; - // Unique per-groupid, not across all groupids - std::string id; - std::vector ssrcs; // All SSRCs for this source - std::vector ssrc_groups; // e.g. FID, FEC, SIM - // Examples: "camera", "screencast" - std::string type; - // Friendly name describing stream - std::string display; - std::string cname; // RTCP CNAME - std::string sync_label; // Friendly name of cname. - - private: - bool AddSecondarySsrc(const std::string& semantics, - uint32_t primary_ssrc, - uint32_t secondary_ssrc); - bool GetSecondarySsrc(const std::string& semantics, - uint32_t primary_ssrc, - uint32_t* secondary_ssrc) const; -}; - -// A Stream can be selected by either groupid+id or ssrc. -struct StreamSelector { - explicit StreamSelector(uint32_t ssrc) : ssrc(ssrc) {} - - StreamSelector(const std::string& groupid, - const std::string& streamid) : - ssrc(0), - groupid(groupid), - streamid(streamid) { - } - - bool Matches(const StreamParams& stream) const { - if (ssrc == 0) { - return stream.groupid == groupid && stream.id == streamid; - } else { - return stream.has_ssrc(ssrc); - } - } - - uint32_t ssrc; - std::string groupid; - std::string streamid; -}; - -typedef std::vector StreamParamsVec; - -// A collection of audio and video and data streams. Most of the -// methods are merely for convenience. Many of these methods are keyed -// by ssrc, which is the source identifier in the RTP spec -// (http://tools.ietf.org/html/rfc3550). -// TODO(pthatcher): Add basic unit test for these. -// See https://code.google.com/p/webrtc/issues/detail?id=4107 -struct MediaStreams { - public: - MediaStreams() {} - void CopyFrom(const MediaStreams& sources); - - bool empty() const { - return audio_.empty() && video_.empty() && data_.empty(); - } - - std::vector* mutable_audio() { return &audio_; } - std::vector* mutable_video() { return &video_; } - std::vector* mutable_data() { return &data_; } - const std::vector& audio() const { return audio_; } - const std::vector& video() const { return video_; } - const std::vector& data() const { return data_; } - - // Gets a stream, returning true if found. - bool GetAudioStream( - const StreamSelector& selector, StreamParams* stream); - bool GetVideoStream( - const StreamSelector& selector, StreamParams* stream); - bool GetDataStream( - const StreamSelector& selector, StreamParams* stream); - // Adds a stream. - void AddAudioStream(const StreamParams& stream); - void AddVideoStream(const StreamParams& stream); - void AddDataStream(const StreamParams& stream); - // Removes a stream, returning true if found and removed. - bool RemoveAudioStream(const StreamSelector& selector); - bool RemoveVideoStream(const StreamSelector& selector); - bool RemoveDataStream(const StreamSelector& selector); - - private: - std::vector audio_; - std::vector video_; - std::vector data_; - - RTC_DISALLOW_COPY_AND_ASSIGN(MediaStreams); -}; - -template -const StreamParams* GetStream(const StreamParamsVec& streams, - Condition condition) { - StreamParamsVec::const_iterator found = - std::find_if(streams.begin(), streams.end(), condition); - return found == streams.end() ? nullptr : &(*found); -} - -inline const StreamParams* GetStreamBySsrc(const StreamParamsVec& streams, - uint32_t ssrc) { - return GetStream(streams, - [&ssrc](const StreamParams& sp) { return sp.has_ssrc(ssrc); }); -} - -inline const StreamParams* GetStreamByIds(const StreamParamsVec& streams, - const std::string& groupid, - const std::string& id) { - return GetStream(streams, - [&groupid, &id](const StreamParams& sp) { - return sp.groupid == groupid && sp.id == id; - }); -} - -inline const StreamParams* GetStream(const StreamParamsVec& streams, - const StreamSelector& selector) { - return GetStream(streams, - [&selector](const StreamParams& sp) { return selector.Matches(sp); }); -} - -template -bool RemoveStream(StreamParamsVec* streams, Condition condition) { - auto iter(std::remove_if(streams->begin(), streams->end(), condition)); - if (iter == streams->end()) - return false; - streams->erase(iter, streams->end()); - return true; -} - -// Removes the stream from streams. Returns true if a stream is -// found and removed. -inline bool RemoveStream(StreamParamsVec* streams, - const StreamSelector& selector) { - return RemoveStream(streams, - [&selector](const StreamParams& sp) { return selector.Matches(sp); }); -} -inline bool RemoveStreamBySsrc(StreamParamsVec* streams, uint32_t ssrc) { - return RemoveStream(streams, - [&ssrc](const StreamParams& sp) { return sp.has_ssrc(ssrc); }); -} -inline bool RemoveStreamByIds(StreamParamsVec* streams, - const std::string& groupid, - const std::string& id) { - return RemoveStream(streams, - [&groupid, &id](const StreamParams& sp) { - return sp.groupid == groupid && sp.id == id; - }); -} - -// Checks if |sp| defines parameters for a single primary stream. There may -// be an RTX stream or a FlexFEC stream (or both) associated with the primary -// stream. Leaving as non-static so we can test this function. -bool IsOneSsrcStream(const StreamParams& sp); - -// Checks if |sp| defines parameters for one Simulcast stream. There may be RTX -// streams associated with the simulcast streams. Leaving as non-static so we -// can test this function. -bool IsSimulcastStream(const StreamParams& sp); - -} // namespace cricket - -#endif // WEBRTC_MEDIA_BASE_STREAMPARAMS_H_ diff --git a/WebRtc.NET/include/webrtc/media/base/test/mock_mediachannel.h b/WebRtc.NET/include/webrtc/media/base/test/mock_mediachannel.h deleted file mode 100644 index 6f7e2e5d..00000000 --- a/WebRtc.NET/include/webrtc/media/base/test/mock_mediachannel.h +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright 2016 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MEDIA_BASE_TEST_MOCK_MEDIACHANNEL_H_ -#define WEBRTC_MEDIA_BASE_TEST_MOCK_MEDIACHANNEL_H_ - -#include "webrtc/media/base/fakemediaengine.h" -#include "webrtc/test/gmock.h" - -namespace webrtc { - -class MockVideoMediaChannel : public cricket::FakeVideoMediaChannel { - public: - MockVideoMediaChannel() : - cricket::FakeVideoMediaChannel(NULL, cricket::VideoOptions()) {} - MOCK_METHOD1(GetStats, bool(cricket::VideoMediaInfo*)); -}; - -class MockVoiceMediaChannel : public cricket::FakeVoiceMediaChannel { - public: - MockVoiceMediaChannel() : - cricket::FakeVoiceMediaChannel(NULL, cricket::AudioOptions()) {} - MOCK_METHOD1(GetStats, bool(cricket::VoiceMediaInfo*)); -}; - -} // namespace webrtc - -#endif // WEBRTC_MEDIA_BASE_TEST_MOCK_MEDIACHANNEL_H_ diff --git a/WebRtc.NET/include/webrtc/media/base/testutils.h b/WebRtc.NET/include/webrtc/media/base/testutils.h deleted file mode 100644 index b0aacd57..00000000 --- a/WebRtc.NET/include/webrtc/media/base/testutils.h +++ /dev/null @@ -1,166 +0,0 @@ -/* - * Copyright (c) 2004 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MEDIA_BASE_TESTUTILS_H_ -#define WEBRTC_MEDIA_BASE_TESTUTILS_H_ - -#include -#include - -#include "libyuv/compare.h" -#include "webrtc/base/arraysize.h" -#include "webrtc/base/basictypes.h" -#include "webrtc/base/sigslot.h" -#include "webrtc/base/window.h" -#include "webrtc/media/base/mediachannel.h" -#include "webrtc/media/base/videocapturer.h" -#include "webrtc/media/base/videocommon.h" - -namespace rtc { -class ByteBufferReader; -class ByteBufferWriter; -class StreamInterface; -} - -namespace webrtc { -class VideoFrame; -} - -namespace cricket { - -// Returns size of 420 image with rounding on chroma for odd sizes. -#define I420_SIZE(w, h) (w * h + (((w + 1) / 2) * ((h + 1) / 2)) * 2) -// Returns size of ARGB image. -#define ARGB_SIZE(w, h) (w * h * 4) - -template inline std::vector MakeVector(const T a[], size_t s) { - return std::vector(a, a + s); -} -#define MAKE_VECTOR(a) cricket::MakeVector(a, arraysize(a)) - -struct RtpDumpPacket; -class RtpDumpWriter; - -struct RawRtpPacket { - void WriteToByteBuffer(uint32_t in_ssrc, rtc::ByteBufferWriter* buf) const; - bool ReadFromByteBuffer(rtc::ByteBufferReader* buf); - // Check if this packet is the same as the specified packet except the - // sequence number and timestamp, which should be the same as the specified - // parameters. - bool SameExceptSeqNumTimestampSsrc(const RawRtpPacket& packet, - uint16_t seq, - uint32_t ts, - uint32_t ssc) const; - int size() const { return 28; } - - uint8_t ver_to_cc; - uint8_t m_to_pt; - uint16_t sequence_number; - uint32_t timestamp; - uint32_t ssrc; - char payload[16]; -}; - -struct RawRtcpPacket { - void WriteToByteBuffer(rtc::ByteBufferWriter* buf) const; - bool ReadFromByteBuffer(rtc::ByteBufferReader* buf); - bool EqualsTo(const RawRtcpPacket& packet) const; - - uint8_t ver_to_count; - uint8_t type; - uint16_t length; - char payload[16]; -}; - -// Test helper for testing VideoCapturer implementations. -class VideoCapturerListener - : public sigslot::has_slots<>, - public rtc::VideoSinkInterface { - public: - explicit VideoCapturerListener(VideoCapturer* cap); - ~VideoCapturerListener(); - - CaptureState last_capture_state() const { return last_capture_state_; } - int frame_count() const { return frame_count_; } - int frame_width() const { return frame_width_; } - int frame_height() const { return frame_height_; } - bool resolution_changed() const { return resolution_changed_; } - - void OnStateChange(VideoCapturer* capturer, CaptureState state); - void OnFrame(const webrtc::VideoFrame& frame) override; - - private: - VideoCapturer* capturer_; - CaptureState last_capture_state_; - int frame_count_; - int frame_width_; - int frame_height_; - bool resolution_changed_; -}; - -class ScreencastEventCatcher : public sigslot::has_slots<> { - public: - ScreencastEventCatcher() : ssrc_(0), ev_(rtc::WE_RESIZE) { } - uint32_t ssrc() const { return ssrc_; } - rtc::WindowEvent event() const { return ev_; } - void OnEvent(uint32_t ssrc, rtc::WindowEvent ev) { - ssrc_ = ssrc; - ev_ = ev; - } - private: - uint32_t ssrc_; - rtc::WindowEvent ev_; -}; - -class VideoMediaErrorCatcher : public sigslot::has_slots<> { - public: - VideoMediaErrorCatcher() : ssrc_(0), error_(VideoMediaChannel::ERROR_NONE) { } - uint32_t ssrc() const { return ssrc_; } - VideoMediaChannel::Error error() const { return error_; } - void OnError(uint32_t ssrc, VideoMediaChannel::Error error) { - ssrc_ = ssrc; - error_ = error; - } - private: - uint32_t ssrc_; - VideoMediaChannel::Error error_; -}; - -// Checks whether |codecs| contains |codec|; checks using Codec::Matches(). -template -bool ContainsMatchingCodec(const std::vector& codecs, const C& codec) { - typename std::vector::const_iterator it; - for (it = codecs.begin(); it != codecs.end(); ++it) { - if (it->Matches(codec)) { - return true; - } - } - return false; -} - -// Create Simulcast StreamParams with given |ssrcs| and |cname|. -cricket::StreamParams CreateSimStreamParams(const std::string& cname, - const std::vector& ssrcs); -// Create Simulcast stream with given |ssrcs| and |rtx_ssrcs|. -// The number of |rtx_ssrcs| must match number of |ssrcs|. -cricket::StreamParams CreateSimWithRtxStreamParams( - const std::string& cname, - const std::vector& ssrcs, - const std::vector& rtx_ssrcs); - -// Create StreamParams with single primary SSRC and corresponding FlexFEC SSRC. -cricket::StreamParams CreatePrimaryWithFecFrStreamParams( - const std::string& cname, - uint32_t primary_ssrc, - uint32_t flexfec_ssrc); - -} // namespace cricket - -#endif // WEBRTC_MEDIA_BASE_TESTUTILS_H_ diff --git a/WebRtc.NET/include/webrtc/media/base/videoadapter.h b/WebRtc.NET/include/webrtc/media/base/videoadapter.h deleted file mode 100644 index 553c0857..00000000 --- a/WebRtc.NET/include/webrtc/media/base/videoadapter.h +++ /dev/null @@ -1,87 +0,0 @@ -/* - * Copyright (c) 2010 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MEDIA_BASE_VIDEOADAPTER_H_ -#define WEBRTC_MEDIA_BASE_VIDEOADAPTER_H_ - -#include "webrtc/base/constructormagic.h" -#include "webrtc/base/criticalsection.h" -#include "webrtc/base/optional.h" -#include "webrtc/media/base/videocommon.h" - -namespace cricket { - -// VideoAdapter adapts an input video frame to an output frame based on the -// specified input and output formats. The adaptation includes dropping frames -// to reduce frame rate and scaling frames. -// VideoAdapter is thread safe. -class VideoAdapter { - public: - VideoAdapter(); - VideoAdapter(int required_resolution_alignment); - virtual ~VideoAdapter(); - - // Return the adapted resolution and cropping parameters given the - // input resolution. The input frame should first be cropped, then - // scaled to the final output resolution. Returns true if the frame - // should be adapted, and false if it should be dropped. - bool AdaptFrameResolution(int in_width, - int in_height, - int64_t in_timestamp_ns, - int* cropped_width, - int* cropped_height, - int* out_width, - int* out_height); - - // Requests the output frame size and frame interval from - // |AdaptFrameResolution| to not be larger than |format|. Also, the input - // frame size will be cropped to match the requested aspect ratio. The - // requested aspect ratio is orientation agnostic and will be adjusted to - // maintain the input orientation, so it doesn't matter if e.g. 1280x720 or - // 720x1280 is requested. - void OnOutputFormatRequest(const VideoFormat& format); - - // Requests the output frame size from |AdaptFrameResolution| to not have - // more than |max_pixel_count| pixels and have "one step" up more pixels than - // max_pixel_count_step_up. - void OnResolutionRequest(rtc::Optional max_pixel_count, - rtc::Optional max_pixel_count_step_up); - - private: - // Determine if frame should be dropped based on input fps and requested fps. - bool KeepFrame(int64_t in_timestamp_ns); - - int frames_in_; // Number of input frames. - int frames_out_; // Number of output frames. - int frames_scaled_; // Number of frames scaled. - int adaption_changes_; // Number of changes in scale factor. - int previous_width_; // Previous adapter output width. - int previous_height_; // Previous adapter output height. - // Resolution must be divisible by this factor. - const int required_resolution_alignment_; - // The target timestamp for the next frame based on requested format. - rtc::Optional next_frame_timestamp_ns_ GUARDED_BY(critical_section_); - - // Max number of pixels requested via calls to OnOutputFormatRequest, - // OnResolutionRequest respectively. - // The adapted output format is the minimum of these. - rtc::Optional requested_format_ GUARDED_BY(critical_section_); - int resolution_request_max_pixel_count_ GUARDED_BY(critical_section_); - bool step_up_ GUARDED_BY(critical_section_); - - // The critical section to protect the above variables. - rtc::CriticalSection critical_section_; - - RTC_DISALLOW_COPY_AND_ASSIGN(VideoAdapter); -}; - -} // namespace cricket - -#endif // WEBRTC_MEDIA_BASE_VIDEOADAPTER_H_ diff --git a/WebRtc.NET/include/webrtc/media/base/videocapturerfactory.h b/WebRtc.NET/include/webrtc/media/base/videocapturerfactory.h deleted file mode 100644 index 012c4a46..00000000 --- a/WebRtc.NET/include/webrtc/media/base/videocapturerfactory.h +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright (c) 2014 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MEDIA_BASE_VIDEOCAPTURERFACTORY_H_ -#define WEBRTC_MEDIA_BASE_VIDEOCAPTURERFACTORY_H_ - -#include "webrtc/media/base/device.h" - -namespace cricket { - -class VideoCapturer; - -class VideoDeviceCapturerFactory { - public: - VideoDeviceCapturerFactory() {} - virtual ~VideoDeviceCapturerFactory() {} - - virtual VideoCapturer* Create(const Device& device) = 0; -}; - -} // namespace cricket - -#endif // WEBRTC_MEDIA_BASE_VIDEOCAPTURERFACTORY_H_ diff --git a/WebRtc.NET/include/webrtc/media/base/videocommon.h b/WebRtc.NET/include/webrtc/media/base/videocommon.h deleted file mode 100644 index 47cfb856..00000000 --- a/WebRtc.NET/include/webrtc/media/base/videocommon.h +++ /dev/null @@ -1,229 +0,0 @@ -/* - * Copyright (c) 2004 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -// Common definition for video, including fourcc and VideoFormat. - -#ifndef WEBRTC_MEDIA_BASE_VIDEOCOMMON_H_ // NOLINT -#define WEBRTC_MEDIA_BASE_VIDEOCOMMON_H_ - -#include - -#include - -#include "webrtc/base/timeutils.h" - -namespace cricket { - -// TODO(janahan): For now, a hard-coded ssrc is used as the video ssrc. -// This is because when the video frame is passed to the mediaprocessor for -// processing, it doesn't have the correct ssrc. Since currently only Tx -// Video processing is supported, this is ok. When we switch over to trigger -// from capturer, this should be fixed and this const removed. -const uint32_t kDummyVideoSsrc = 0xFFFFFFFF; - -// Minimum interval is 10k fps. -#define FPS_TO_INTERVAL(fps) \ - (fps ? rtc::kNumNanosecsPerSec / fps : \ - rtc::kNumNanosecsPerSec / 10000) - -////////////////////////////////////////////////////////////////////////////// -// Definition of FourCC codes -////////////////////////////////////////////////////////////////////////////// -// Convert four characters to a FourCC code. -// Needs to be a macro otherwise the OS X compiler complains when the kFormat* -// constants are used in a switch. -#define FOURCC(a, b, c, d) \ - ((static_cast(a)) | (static_cast(b) << 8) | \ - (static_cast(c) << 16) | (static_cast(d) << 24)) -// Some pages discussing FourCC codes: -// http://www.fourcc.org/yuv.php -// http://v4l2spec.bytesex.org/spec/book1.htm -// http://developer.apple.com/quicktime/icefloe/dispatch020.html -// http://msdn.microsoft.com/library/windows/desktop/dd206750.aspx#nv12 -// http://people.xiph.org/~xiphmont/containers/nut/nut4cc.txt - -// FourCC codes grouped according to implementation efficiency. -// Primary formats should convert in 1 efficient step. -// Secondary formats are converted in 2 steps. -// Auxilliary formats call primary converters. -enum FourCC { - // 9 Primary YUV formats: 5 planar, 2 biplanar, 2 packed. - FOURCC_I420 = FOURCC('I', '4', '2', '0'), - FOURCC_I422 = FOURCC('I', '4', '2', '2'), - FOURCC_I444 = FOURCC('I', '4', '4', '4'), - FOURCC_I411 = FOURCC('I', '4', '1', '1'), - FOURCC_I400 = FOURCC('I', '4', '0', '0'), - FOURCC_NV21 = FOURCC('N', 'V', '2', '1'), - FOURCC_NV12 = FOURCC('N', 'V', '1', '2'), - FOURCC_YUY2 = FOURCC('Y', 'U', 'Y', '2'), - FOURCC_UYVY = FOURCC('U', 'Y', 'V', 'Y'), - - // 2 Secondary YUV formats: row biplanar. - FOURCC_M420 = FOURCC('M', '4', '2', '0'), - - // 9 Primary RGB formats: 4 32 bpp, 2 24 bpp, 3 16 bpp. - FOURCC_ARGB = FOURCC('A', 'R', 'G', 'B'), - FOURCC_BGRA = FOURCC('B', 'G', 'R', 'A'), - FOURCC_ABGR = FOURCC('A', 'B', 'G', 'R'), - FOURCC_24BG = FOURCC('2', '4', 'B', 'G'), - FOURCC_RAW = FOURCC('r', 'a', 'w', ' '), - FOURCC_RGBA = FOURCC('R', 'G', 'B', 'A'), - FOURCC_RGBP = FOURCC('R', 'G', 'B', 'P'), // bgr565. - FOURCC_RGBO = FOURCC('R', 'G', 'B', 'O'), // abgr1555. - FOURCC_R444 = FOURCC('R', '4', '4', '4'), // argb4444. - - // 4 Secondary RGB formats: 4 Bayer Patterns. - FOURCC_RGGB = FOURCC('R', 'G', 'G', 'B'), - FOURCC_BGGR = FOURCC('B', 'G', 'G', 'R'), - FOURCC_GRBG = FOURCC('G', 'R', 'B', 'G'), - FOURCC_GBRG = FOURCC('G', 'B', 'R', 'G'), - - // 1 Primary Compressed YUV format. - FOURCC_MJPG = FOURCC('M', 'J', 'P', 'G'), - - // 5 Auxiliary YUV variations: 3 with U and V planes are swapped, 1 Alias. - FOURCC_YV12 = FOURCC('Y', 'V', '1', '2'), - FOURCC_YV16 = FOURCC('Y', 'V', '1', '6'), - FOURCC_YV24 = FOURCC('Y', 'V', '2', '4'), - FOURCC_YU12 = FOURCC('Y', 'U', '1', '2'), // Linux version of I420. - FOURCC_J420 = FOURCC('J', '4', '2', '0'), - FOURCC_J400 = FOURCC('J', '4', '0', '0'), - - // 14 Auxiliary aliases. CanonicalFourCC() maps these to canonical fourcc. - FOURCC_IYUV = FOURCC('I', 'Y', 'U', 'V'), // Alias for I420. - FOURCC_YU16 = FOURCC('Y', 'U', '1', '6'), // Alias for I422. - FOURCC_YU24 = FOURCC('Y', 'U', '2', '4'), // Alias for I444. - FOURCC_YUYV = FOURCC('Y', 'U', 'Y', 'V'), // Alias for YUY2. - FOURCC_YUVS = FOURCC('y', 'u', 'v', 's'), // Alias for YUY2 on Mac. - FOURCC_HDYC = FOURCC('H', 'D', 'Y', 'C'), // Alias for UYVY. - FOURCC_2VUY = FOURCC('2', 'v', 'u', 'y'), // Alias for UYVY on Mac. - FOURCC_JPEG = FOURCC('J', 'P', 'E', 'G'), // Alias for MJPG. - FOURCC_DMB1 = FOURCC('d', 'm', 'b', '1'), // Alias for MJPG on Mac. - FOURCC_BA81 = FOURCC('B', 'A', '8', '1'), // Alias for BGGR. - FOURCC_RGB3 = FOURCC('R', 'G', 'B', '3'), // Alias for RAW. - FOURCC_BGR3 = FOURCC('B', 'G', 'R', '3'), // Alias for 24BG. - FOURCC_CM32 = FOURCC(0, 0, 0, 32), // Alias for BGRA kCMPixelFormat_32ARGB - FOURCC_CM24 = FOURCC(0, 0, 0, 24), // Alias for RAW kCMPixelFormat_24RGB - - // 1 Auxiliary compressed YUV format set aside for capturer. - FOURCC_H264 = FOURCC('H', '2', '6', '4'), -}; - -// Match any fourcc. - -// We move this out of the enum because using it in many places caused -// the compiler to get grumpy, presumably since the above enum is -// backed by an int. -static const uint32_t FOURCC_ANY = 0xFFFFFFFF; - -// Converts fourcc aliases into canonical ones. -uint32_t CanonicalFourCC(uint32_t fourcc); - -// Get FourCC code as a string. -inline std::string GetFourccName(uint32_t fourcc) { - std::string name; - name.push_back(static_cast(fourcc & 0xFF)); - name.push_back(static_cast((fourcc >> 8) & 0xFF)); - name.push_back(static_cast((fourcc >> 16) & 0xFF)); - name.push_back(static_cast((fourcc >> 24) & 0xFF)); - return name; -} - -////////////////////////////////////////////////////////////////////////////// -// Definition of VideoFormat. -////////////////////////////////////////////////////////////////////////////// - -// VideoFormat with Plain Old Data for global variables. -struct VideoFormatPod { - int width; // Number of pixels. - int height; // Number of pixels. - int64_t interval; // Nanoseconds. - uint32_t fourcc; // Color space. FOURCC_ANY means that any color space is OK. -}; - -struct VideoFormat : VideoFormatPod { - static const int64_t kMinimumInterval = - rtc::kNumNanosecsPerSec / 10000; // 10k fps. - - VideoFormat() { - Construct(0, 0, 0, 0); - } - - VideoFormat(int w, int h, int64_t interval_ns, uint32_t cc) { - Construct(w, h, interval_ns, cc); - } - - explicit VideoFormat(const VideoFormatPod& format) { - Construct(format.width, format.height, format.interval, format.fourcc); - } - - void Construct(int w, int h, int64_t interval_ns, uint32_t cc) { - width = w; - height = h; - interval = interval_ns; - fourcc = cc; - } - - static int64_t FpsToInterval(int fps) { - return fps ? rtc::kNumNanosecsPerSec / fps : kMinimumInterval; - } - - static int IntervalToFps(int64_t interval) { - if (!interval) { - return 0; - } - return static_cast(rtc::kNumNanosecsPerSec / interval); - } - - static float IntervalToFpsFloat(int64_t interval) { - if (!interval) { - return 0.f; - } - return static_cast(rtc::kNumNanosecsPerSec) / - static_cast(interval); - } - - bool operator==(const VideoFormat& format) const { - return width == format.width && height == format.height && - interval == format.interval && fourcc == format.fourcc; - } - - bool operator!=(const VideoFormat& format) const { - return !(*this == format); - } - - bool operator<(const VideoFormat& format) const { - return (fourcc < format.fourcc) || - (fourcc == format.fourcc && width < format.width) || - (fourcc == format.fourcc && width == format.width && - height < format.height) || - (fourcc == format.fourcc && width == format.width && - height == format.height && interval > format.interval); - } - - int framerate() const { return IntervalToFps(interval); } - - // Check if both width and height are 0. - bool IsSize0x0() const { return 0 == width && 0 == height; } - - // Check if this format is less than another one by comparing the resolution - // and frame rate. - bool IsPixelRateLess(const VideoFormat& format) const { - return width * height * framerate() < - format.width * format.height * format.framerate(); - } - - // Get a string presentation in the form of "fourcc width x height x fps" - std::string ToString() const; -}; - -} // namespace cricket - -#endif // WEBRTC_MEDIA_BASE_VIDEOCOMMON_H_ // NOLINT diff --git a/WebRtc.NET/include/webrtc/media/base/videoengine_unittest.h b/WebRtc.NET/include/webrtc/media/base/videoengine_unittest.h deleted file mode 100644 index 7758c1e4..00000000 --- a/WebRtc.NET/include/webrtc/media/base/videoengine_unittest.h +++ /dev/null @@ -1,953 +0,0 @@ -/* - * Copyright (c) 2014 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MEDIA_BASE_VIDEOENGINE_UNITTEST_H_ // NOLINT -#define WEBRTC_MEDIA_BASE_VIDEOENGINE_UNITTEST_H_ - -#include -#include -#include - -#include "webrtc/base/bytebuffer.h" -#include "webrtc/base/gunit.h" -#include "webrtc/base/timeutils.h" -#include "webrtc/call/call.h" -#include "webrtc/logging/rtc_event_log/rtc_event_log.h" -#include "webrtc/media/base/fakenetworkinterface.h" -#include "webrtc/media/base/fakevideocapturer.h" -#include "webrtc/media/base/fakevideorenderer.h" -#include "webrtc/media/base/mediachannel.h" -#include "webrtc/media/base/streamparams.h" -#include "webrtc/media/engine/fakewebrtccall.h" - -#define EXPECT_FRAME_WAIT(c, w, h, t) \ - EXPECT_EQ_WAIT((c), renderer_.num_rendered_frames(), (t)); \ - EXPECT_EQ((w), renderer_.width()); \ - EXPECT_EQ((h), renderer_.height()); \ - EXPECT_EQ(0, renderer_.errors()); \ - -#define EXPECT_FRAME_ON_RENDERER_WAIT(r, c, w, h, t) \ - EXPECT_EQ_WAIT((c), (r).num_rendered_frames(), (t)); \ - EXPECT_EQ((w), (r).width()); \ - EXPECT_EQ((h), (r).height()); \ - EXPECT_EQ(0, (r).errors()); \ - -#define EXPECT_GT_FRAME_ON_RENDERER_WAIT(r, c, w, h, t) \ - EXPECT_TRUE_WAIT((r).num_rendered_frames() >= (c) && \ - (w) == (r).width() && \ - (h) == (r).height(), (t)); \ - EXPECT_EQ(0, (r).errors()); - -static const uint32_t kTimeout = 5000U; -static const uint32_t kDefaultReceiveSsrc = 0; -static const uint32_t kSsrc = 1234u; -static const uint32_t kRtxSsrc = 4321u; -static const uint32_t kSsrcs4[] = {1, 2, 3, 4}; -static const int kVideoWidth = 640; -static const int kVideoHeight = 360; -static const int kFramerate = 30; - -inline bool IsEqualCodec(const cricket::VideoCodec& a, - const cricket::VideoCodec& b) { - return a.id == b.id && a.name == b.name; -} - -namespace std { -inline std::ostream& operator<<(std::ostream& s, const cricket::VideoCodec& c) { - s << "{" << c.name << "(" << c.id << ")" - << "}"; - return s; -} -} // namespace std - -template -class VideoMediaChannelTest : public testing::Test, - public sigslot::has_slots<> { - protected: - VideoMediaChannelTest() - : call_(webrtc::Call::Create(webrtc::Call::Config(&event_log_))) {} - - virtual cricket::VideoCodec DefaultCodec() = 0; - - virtual cricket::StreamParams DefaultSendStreamParams() { - return cricket::StreamParams::CreateLegacy(kSsrc); - } - - virtual void SetUp() { - engine_.Init(); - cricket::MediaConfig media_config; - // Disabling cpu overuse detection actually disables quality scaling too; it - // implies DegradationPreference kMaintainResolution. Automatic scaling - // needs to be disabled, otherwise, tests which check the size of received - // frames become flaky. - media_config.video.enable_cpu_overuse_detection = false; - channel_.reset(engine_.CreateChannel(call_.get(), media_config, - cricket::VideoOptions())); - channel_->OnReadyToSend(true); - EXPECT_TRUE(channel_.get() != NULL); - network_interface_.SetDestination(channel_.get()); - channel_->SetInterface(&network_interface_); - media_error_ = cricket::VideoMediaChannel::ERROR_NONE; - cricket::VideoRecvParameters parameters; - parameters.codecs = engine_.codecs(); - channel_->SetRecvParameters(parameters); - EXPECT_TRUE(channel_->AddSendStream(DefaultSendStreamParams())); - video_capturer_.reset(CreateFakeVideoCapturer()); - cricket::VideoFormat format(640, 480, - cricket::VideoFormat::FpsToInterval(kFramerate), - cricket::FOURCC_I420); - EXPECT_EQ(cricket::CS_RUNNING, video_capturer_->Start(format)); - EXPECT_TRUE( - channel_->SetVideoSend(kSsrc, true, nullptr, video_capturer_.get())); - } - - virtual cricket::FakeVideoCapturer* CreateFakeVideoCapturer() { - return new cricket::FakeVideoCapturer(); - } - - // Utility method to setup an additional stream to send and receive video. - // Used to test send and recv between two streams. - void SetUpSecondStream() { - SetUpSecondStreamWithNoRecv(); - // Setup recv for second stream. - EXPECT_TRUE(channel_->AddRecvStream( - cricket::StreamParams::CreateLegacy(kSsrc + 2))); - // Make the second renderer available for use by a new stream. - EXPECT_TRUE(channel_->SetSink(kSsrc + 2, &renderer2_)); - } - // Setup an additional stream just to send video. Defer add recv stream. - // This is required if you want to test unsignalled recv of video rtp packets. - void SetUpSecondStreamWithNoRecv() { - // SetUp() already added kSsrc make sure duplicate SSRCs cant be added. - EXPECT_TRUE(channel_->AddRecvStream( - cricket::StreamParams::CreateLegacy(kSsrc))); - EXPECT_TRUE(channel_->SetSink(kSsrc, &renderer_)); - EXPECT_FALSE(channel_->AddSendStream( - cricket::StreamParams::CreateLegacy(kSsrc))); - EXPECT_TRUE(channel_->AddSendStream( - cricket::StreamParams::CreateLegacy(kSsrc + 2))); - // We dont add recv for the second stream. - - // Setup the receive and renderer for second stream after send. - video_capturer_2_.reset(CreateFakeVideoCapturer()); - cricket::VideoFormat format(640, 480, - cricket::VideoFormat::FpsToInterval(kFramerate), - cricket::FOURCC_I420); - EXPECT_EQ(cricket::CS_RUNNING, video_capturer_2_->Start(format)); - - EXPECT_TRUE(channel_->SetVideoSend(kSsrc + 2, true, nullptr, - video_capturer_2_.get())); - } - virtual void TearDown() { - channel_.reset(); - } - bool SetDefaultCodec() { - return SetOneCodec(DefaultCodec()); - } - - bool SetOneCodec(int pt, const char* name) { - return SetOneCodec(cricket::VideoCodec(pt, name)); - } - bool SetOneCodec(const cricket::VideoCodec& codec) { - cricket::VideoFormat capture_format( - kVideoWidth, kVideoHeight, - cricket::VideoFormat::FpsToInterval(kFramerate), cricket::FOURCC_I420); - - if (video_capturer_) { - EXPECT_EQ(cricket::CS_RUNNING, video_capturer_->Start(capture_format)); - } - if (video_capturer_2_) { - EXPECT_EQ(cricket::CS_RUNNING, video_capturer_2_->Start(capture_format)); - } - - bool sending = channel_->sending(); - bool success = SetSend(false); - if (success) { - cricket::VideoSendParameters parameters; - parameters.codecs.push_back(codec); - success = channel_->SetSendParameters(parameters); - } - if (success) { - success = SetSend(sending); - } - return success; - } - bool SetSend(bool send) { - return channel_->SetSend(send); - } - int DrainOutgoingPackets() { - int packets = 0; - do { - packets = NumRtpPackets(); - // 100 ms should be long enough. - rtc::Thread::Current()->ProcessMessages(100); - } while (NumRtpPackets() > packets); - return NumRtpPackets(); - } - bool SendFrame() { - if (video_capturer_2_) { - video_capturer_2_->CaptureFrame(); - } - return video_capturer_.get() && - video_capturer_->CaptureFrame(); - } - bool WaitAndSendFrame(int wait_ms) { - bool ret = rtc::Thread::Current()->ProcessMessages(wait_ms); - ret &= SendFrame(); - return ret; - } - // Sends frames and waits for the decoder to be fully initialized. - // Returns the number of frames that were sent. - int WaitForDecoder() { -#if defined(HAVE_OPENMAX) - // Send enough frames for the OpenMAX decoder to continue processing, and - // return the number of frames sent. - // Send frames for a full kTimeout's worth of 15fps video. - int frame_count = 0; - while (frame_count < static_cast(kTimeout) / 66) { - EXPECT_TRUE(WaitAndSendFrame(66)); - ++frame_count; - } - return frame_count; -#else - return 0; -#endif - } - bool SendCustomVideoFrame(int w, int h) { - if (!video_capturer_.get()) return false; - return video_capturer_->CaptureCustomFrame(w, h, cricket::FOURCC_I420); - } - int NumRtpBytes() { - return network_interface_.NumRtpBytes(); - } - int NumRtpBytes(uint32_t ssrc) { - return network_interface_.NumRtpBytes(ssrc); - } - int NumRtpPackets() { - return network_interface_.NumRtpPackets(); - } - int NumRtpPackets(uint32_t ssrc) { - return network_interface_.NumRtpPackets(ssrc); - } - int NumSentSsrcs() { - return network_interface_.NumSentSsrcs(); - } - const rtc::CopyOnWriteBuffer* GetRtpPacket(int index) { - return network_interface_.GetRtpPacket(index); - } - int NumRtcpPackets() { - return network_interface_.NumRtcpPackets(); - } - const rtc::CopyOnWriteBuffer* GetRtcpPacket(int index) { - return network_interface_.GetRtcpPacket(index); - } - static int GetPayloadType(const rtc::CopyOnWriteBuffer* p) { - int pt = -1; - ParseRtpPacket(p, NULL, &pt, NULL, NULL, NULL, NULL); - return pt; - } - static bool ParseRtpPacket(const rtc::CopyOnWriteBuffer* p, - bool* x, - int* pt, - int* seqnum, - uint32_t* tstamp, - uint32_t* ssrc, - std::string* payload) { - rtc::ByteBufferReader buf(p->data(), p->size()); - uint8_t u08 = 0; - uint16_t u16 = 0; - uint32_t u32 = 0; - - // Read X and CC fields. - if (!buf.ReadUInt8(&u08)) return false; - bool extension = ((u08 & 0x10) != 0); - uint8_t cc = (u08 & 0x0F); - if (x) *x = extension; - - // Read PT field. - if (!buf.ReadUInt8(&u08)) return false; - if (pt) *pt = (u08 & 0x7F); - - // Read Sequence Number field. - if (!buf.ReadUInt16(&u16)) return false; - if (seqnum) *seqnum = u16; - - // Read Timestamp field. - if (!buf.ReadUInt32(&u32)) return false; - if (tstamp) *tstamp = u32; - - // Read SSRC field. - if (!buf.ReadUInt32(&u32)) return false; - if (ssrc) *ssrc = u32; - - // Skip CSRCs. - for (uint8_t i = 0; i < cc; ++i) { - if (!buf.ReadUInt32(&u32)) return false; - } - - // Skip extension header. - if (extension) { - // Read Profile-specific extension header ID - if (!buf.ReadUInt16(&u16)) return false; - - // Read Extension header length - if (!buf.ReadUInt16(&u16)) return false; - uint16_t ext_header_len = u16; - - // Read Extension header - for (uint16_t i = 0; i < ext_header_len; ++i) { - if (!buf.ReadUInt32(&u32)) return false; - } - } - - if (payload) { - return buf.ReadString(payload, buf.Length()); - } - return true; - } - - // Parse all RTCP packet, from start_index to stop_index, and count how many - // FIR (PT=206 and FMT=4 according to RFC 5104). If successful, set the count - // and return true. - bool CountRtcpFir(int start_index, int stop_index, int* fir_count) { - int count = 0; - for (int i = start_index; i < stop_index; ++i) { - std::unique_ptr p(GetRtcpPacket(i)); - rtc::ByteBufferReader buf(p->data(), p->size()); - size_t total_len = 0; - // The packet may be a compound RTCP packet. - while (total_len < p->size()) { - // Read FMT, type and length. - uint8_t fmt = 0; - uint8_t type = 0; - uint16_t length = 0; - if (!buf.ReadUInt8(&fmt)) return false; - fmt &= 0x1F; - if (!buf.ReadUInt8(&type)) return false; - if (!buf.ReadUInt16(&length)) return false; - buf.Consume(length * 4); // Skip RTCP data. - total_len += (length + 1) * 4; - if ((192 == type) || ((206 == type) && (4 == fmt))) { - ++count; - } - } - } - - if (fir_count) { - *fir_count = count; - } - return true; - } - - void OnVideoChannelError(uint32_t ssrc, - cricket::VideoMediaChannel::Error error) { - media_error_ = error; - } - - // Test that SetSend works. - void SetSend() { - EXPECT_FALSE(channel_->sending()); - EXPECT_TRUE( - channel_->SetVideoSend(kSsrc, true, nullptr, video_capturer_.get())); - EXPECT_TRUE(SetOneCodec(DefaultCodec())); - EXPECT_FALSE(channel_->sending()); - EXPECT_TRUE(SetSend(true)); - EXPECT_TRUE(channel_->sending()); - EXPECT_TRUE(SendFrame()); - EXPECT_TRUE_WAIT(NumRtpPackets() > 0, kTimeout); - EXPECT_TRUE(SetSend(false)); - EXPECT_FALSE(channel_->sending()); - } - // Test that SetSend fails without codecs being set. - void SetSendWithoutCodecs() { - EXPECT_FALSE(channel_->sending()); - EXPECT_FALSE(SetSend(true)); - EXPECT_FALSE(channel_->sending()); - } - // Test that we properly set the send and recv buffer sizes by the time - // SetSend is called. - void SetSendSetsTransportBufferSizes() { - EXPECT_TRUE(SetOneCodec(DefaultCodec())); - EXPECT_TRUE(SetSend(true)); - EXPECT_EQ(64 * 1024, network_interface_.sendbuf_size()); - EXPECT_EQ(64 * 1024, network_interface_.recvbuf_size()); - } - // Tests that we can send frames and the right payload type is used. - void Send(const cricket::VideoCodec& codec) { - EXPECT_TRUE(SetOneCodec(codec)); - EXPECT_TRUE(SetSend(true)); - EXPECT_TRUE(SendFrame()); - EXPECT_TRUE_WAIT(NumRtpPackets() > 0, kTimeout); - std::unique_ptr p(GetRtpPacket(0)); - EXPECT_EQ(codec.id, GetPayloadType(p.get())); - } - // Tests that we can send and receive frames. - void SendAndReceive(const cricket::VideoCodec& codec) { - EXPECT_TRUE(SetOneCodec(codec)); - EXPECT_TRUE(SetSend(true)); - EXPECT_TRUE(channel_->SetSink(kDefaultReceiveSsrc, &renderer_)); - EXPECT_EQ(0, renderer_.num_rendered_frames()); - EXPECT_TRUE(SendFrame()); - EXPECT_FRAME_WAIT(1, kVideoWidth, kVideoHeight, kTimeout); - std::unique_ptr p(GetRtpPacket(0)); - EXPECT_EQ(codec.id, GetPayloadType(p.get())); - } - void SendReceiveManyAndGetStats(const cricket::VideoCodec& codec, - int duration_sec, int fps) { - EXPECT_TRUE(SetOneCodec(codec)); - EXPECT_TRUE(SetSend(true)); - EXPECT_TRUE(channel_->SetSink(kDefaultReceiveSsrc, &renderer_)); - EXPECT_EQ(0, renderer_.num_rendered_frames()); - for (int i = 0; i < duration_sec; ++i) { - for (int frame = 1; frame <= fps; ++frame) { - EXPECT_TRUE(WaitAndSendFrame(1000 / fps)); - EXPECT_FRAME_WAIT(frame + i * fps, kVideoWidth, kVideoHeight, kTimeout); - } - } - std::unique_ptr p(GetRtpPacket(0)); - EXPECT_EQ(codec.id, GetPayloadType(p.get())); - } - - // Test that stats work properly for a 1-1 call. - void GetStats() { - const int kDurationSec = 3; - const int kFps = 10; - SendReceiveManyAndGetStats(DefaultCodec(), kDurationSec, kFps); - - cricket::VideoMediaInfo info; - EXPECT_TRUE(channel_->GetStats(&info)); - - ASSERT_EQ(1U, info.senders.size()); - // TODO(whyuan): bytes_sent and bytes_rcvd are different. Are both payload? - // For webrtc, bytes_sent does not include the RTP header length. - EXPECT_GT(info.senders[0].bytes_sent, 0); - EXPECT_EQ(NumRtpPackets(), info.senders[0].packets_sent); - EXPECT_EQ(0.0, info.senders[0].fraction_lost); - ASSERT_TRUE(info.senders[0].codec_payload_type); - EXPECT_EQ(DefaultCodec().id, *info.senders[0].codec_payload_type); - EXPECT_EQ(0, info.senders[0].firs_rcvd); - EXPECT_EQ(0, info.senders[0].plis_rcvd); - EXPECT_EQ(0, info.senders[0].nacks_rcvd); - EXPECT_EQ(kVideoWidth, info.senders[0].send_frame_width); - EXPECT_EQ(kVideoHeight, info.senders[0].send_frame_height); - EXPECT_GT(info.senders[0].framerate_input, 0); - EXPECT_GT(info.senders[0].framerate_sent, 0); - - EXPECT_EQ(1U, info.send_codecs.count(DefaultCodec().id)); - EXPECT_EQ(DefaultCodec().ToCodecParameters(), - info.send_codecs[DefaultCodec().id]); - - ASSERT_EQ(1U, info.receivers.size()); - EXPECT_EQ(1U, info.senders[0].ssrcs().size()); - EXPECT_EQ(1U, info.receivers[0].ssrcs().size()); - EXPECT_EQ(info.senders[0].ssrcs()[0], info.receivers[0].ssrcs()[0]); - ASSERT_TRUE(info.receivers[0].codec_payload_type); - EXPECT_EQ(DefaultCodec().id, *info.receivers[0].codec_payload_type); - EXPECT_EQ(NumRtpBytes(), info.receivers[0].bytes_rcvd); - EXPECT_EQ(NumRtpPackets(), info.receivers[0].packets_rcvd); - EXPECT_EQ(0.0, info.receivers[0].fraction_lost); - EXPECT_EQ(0, info.receivers[0].packets_lost); - // TODO(asapersson): Not set for webrtc. Handle missing stats. - // EXPECT_EQ(0, info.receivers[0].packets_concealed); - EXPECT_EQ(0, info.receivers[0].firs_sent); - EXPECT_EQ(0, info.receivers[0].plis_sent); - EXPECT_EQ(0, info.receivers[0].nacks_sent); - EXPECT_EQ(kVideoWidth, info.receivers[0].frame_width); - EXPECT_EQ(kVideoHeight, info.receivers[0].frame_height); - EXPECT_GT(info.receivers[0].framerate_rcvd, 0); - EXPECT_GT(info.receivers[0].framerate_decoded, 0); - EXPECT_GT(info.receivers[0].framerate_output, 0); - - EXPECT_EQ(1U, info.receive_codecs.count(DefaultCodec().id)); - EXPECT_EQ(DefaultCodec().ToCodecParameters(), - info.receive_codecs[DefaultCodec().id]); - } - - cricket::VideoSenderInfo GetSenderStats(size_t i) { - cricket::VideoMediaInfo info; - EXPECT_TRUE(channel_->GetStats(&info)); - return info.senders[i]; - } - - cricket::VideoReceiverInfo GetReceiverStats(size_t i) { - cricket::VideoMediaInfo info; - EXPECT_TRUE(channel_->GetStats(&info)); - return info.receivers[i]; - } - - // Test that stats work properly for a conf call with multiple recv streams. - void GetStatsMultipleRecvStreams() { - cricket::FakeVideoRenderer renderer1, renderer2; - EXPECT_TRUE(SetOneCodec(DefaultCodec())); - cricket::VideoSendParameters parameters; - parameters.codecs.push_back(DefaultCodec()); - parameters.conference_mode = true; - EXPECT_TRUE(channel_->SetSendParameters(parameters)); - EXPECT_TRUE(SetSend(true)); - EXPECT_TRUE(channel_->AddRecvStream( - cricket::StreamParams::CreateLegacy(1))); - EXPECT_TRUE(channel_->AddRecvStream( - cricket::StreamParams::CreateLegacy(2))); - EXPECT_TRUE(channel_->SetSink(1, &renderer1)); - EXPECT_TRUE(channel_->SetSink(2, &renderer2)); - EXPECT_EQ(0, renderer1.num_rendered_frames()); - EXPECT_EQ(0, renderer2.num_rendered_frames()); - std::vector ssrcs; - ssrcs.push_back(1); - ssrcs.push_back(2); - network_interface_.SetConferenceMode(true, ssrcs); - EXPECT_TRUE(SendFrame()); - EXPECT_FRAME_ON_RENDERER_WAIT(renderer1, 1, kVideoWidth, kVideoHeight, - kTimeout); - EXPECT_FRAME_ON_RENDERER_WAIT(renderer2, 1, kVideoWidth, kVideoHeight, - kTimeout); - - EXPECT_TRUE(channel_->SetSend(false)); - - cricket::VideoMediaInfo info; - EXPECT_TRUE(channel_->GetStats(&info)); - ASSERT_EQ(1U, info.senders.size()); - // TODO(whyuan): bytes_sent and bytes_rcvd are different. Are both payload? - // For webrtc, bytes_sent does not include the RTP header length. - EXPECT_GT(GetSenderStats(0).bytes_sent, 0); - EXPECT_EQ_WAIT(NumRtpPackets(), GetSenderStats(0).packets_sent, kTimeout); - EXPECT_EQ(kVideoWidth, GetSenderStats(0).send_frame_width); - EXPECT_EQ(kVideoHeight, GetSenderStats(0).send_frame_height); - - ASSERT_EQ(2U, info.receivers.size()); - for (size_t i = 0; i < info.receivers.size(); ++i) { - EXPECT_EQ(1U, GetReceiverStats(i).ssrcs().size()); - EXPECT_EQ(i + 1, GetReceiverStats(i).ssrcs()[0]); - EXPECT_EQ_WAIT(NumRtpBytes(), GetReceiverStats(i).bytes_rcvd, kTimeout); - EXPECT_EQ_WAIT(NumRtpPackets(), GetReceiverStats(i).packets_rcvd, - kTimeout); - EXPECT_EQ_WAIT(kVideoWidth, GetReceiverStats(i).frame_width, kTimeout); - EXPECT_EQ_WAIT(kVideoHeight, GetReceiverStats(i).frame_height, kTimeout); - } - } - // Test that stats work properly for a conf call with multiple send streams. - void GetStatsMultipleSendStreams() { - // Normal setup; note that we set the SSRC explicitly to ensure that - // it will come first in the senders map. - EXPECT_TRUE(SetOneCodec(DefaultCodec())); - cricket::VideoSendParameters parameters; - parameters.codecs.push_back(DefaultCodec()); - parameters.conference_mode = true; - EXPECT_TRUE(channel_->SetSendParameters(parameters)); - EXPECT_TRUE(channel_->AddRecvStream( - cricket::StreamParams::CreateLegacy(kSsrc))); - EXPECT_TRUE(channel_->SetSink(kSsrc, &renderer_)); - EXPECT_TRUE(SetSend(true)); - EXPECT_TRUE(SendFrame()); - EXPECT_TRUE_WAIT(NumRtpPackets() > 0, kTimeout); - EXPECT_FRAME_WAIT(1, kVideoWidth, kVideoHeight, kTimeout); - - // Add an additional capturer, and hook up a renderer to receive it. - cricket::FakeVideoRenderer renderer2; - std::unique_ptr capturer( - CreateFakeVideoCapturer()); - const int kTestWidth = 160; - const int kTestHeight = 120; - cricket::VideoFormat format(kTestWidth, kTestHeight, - cricket::VideoFormat::FpsToInterval(5), - cricket::FOURCC_I420); - EXPECT_EQ(cricket::CS_RUNNING, capturer->Start(format)); - EXPECT_TRUE(channel_->AddSendStream( - cricket::StreamParams::CreateLegacy(5678))); - EXPECT_TRUE(channel_->SetVideoSend(5678, true, nullptr, capturer.get())); - EXPECT_TRUE(channel_->AddRecvStream( - cricket::StreamParams::CreateLegacy(5678))); - EXPECT_TRUE(channel_->SetSink(5678, &renderer2)); - EXPECT_TRUE(capturer->CaptureCustomFrame( - kTestWidth, kTestHeight, cricket::FOURCC_I420)); - EXPECT_FRAME_ON_RENDERER_WAIT( - renderer2, 1, kTestWidth, kTestHeight, kTimeout); - - // Get stats, and make sure they are correct for two senders. We wait until - // the number of expected packets have been sent to avoid races where we - // check stats before it has been updated. - cricket::VideoMediaInfo info; - for (uint32_t i = 0; i < kTimeout; ++i) { - rtc::Thread::Current()->ProcessMessages(1); - EXPECT_TRUE(channel_->GetStats(&info)); - ASSERT_EQ(2U, info.senders.size()); - if (info.senders[0].packets_sent + info.senders[1].packets_sent == - NumRtpPackets()) { - // Stats have been updated for both sent frames, expectations can be - // checked now. - break; - } - } - EXPECT_EQ(NumRtpPackets(), - info.senders[0].packets_sent + info.senders[1].packets_sent) - << "Timed out while waiting for packet counts for all sent packets."; - EXPECT_EQ(1U, info.senders[0].ssrcs().size()); - EXPECT_EQ(1234U, info.senders[0].ssrcs()[0]); - EXPECT_EQ(kVideoWidth, info.senders[0].send_frame_width); - EXPECT_EQ(kVideoHeight, info.senders[0].send_frame_height); - EXPECT_EQ(1U, info.senders[1].ssrcs().size()); - EXPECT_EQ(5678U, info.senders[1].ssrcs()[0]); - EXPECT_EQ(kTestWidth, info.senders[1].send_frame_width); - EXPECT_EQ(kTestHeight, info.senders[1].send_frame_height); - // The capturer must be unregistered here as it runs out of it's scope next. - channel_->SetVideoSend(5678, true, nullptr, nullptr); - } - - // Test that we can set the bandwidth. - void SetSendBandwidth() { - cricket::VideoSendParameters parameters; - parameters.codecs.push_back(DefaultCodec()); - parameters.max_bandwidth_bps = -1; // <= 0 means unlimited. - EXPECT_TRUE(channel_->SetSendParameters(parameters)); - parameters.max_bandwidth_bps = 128 * 1024; - EXPECT_TRUE(channel_->SetSendParameters(parameters)); - } - // Test that we can set the SSRC for the default send source. - void SetSendSsrc() { - EXPECT_TRUE(SetDefaultCodec()); - EXPECT_TRUE(SetSend(true)); - EXPECT_TRUE(SendFrame()); - EXPECT_TRUE_WAIT(NumRtpPackets() > 0, kTimeout); - uint32_t ssrc = 0; - std::unique_ptr p(GetRtpPacket(0)); - ParseRtpPacket(p.get(), NULL, NULL, NULL, NULL, &ssrc, NULL); - EXPECT_EQ(kSsrc, ssrc); - // Packets are being paced out, so these can mismatch between the first and - // second call to NumRtpPackets until pending packets are paced out. - EXPECT_EQ_WAIT(NumRtpPackets(), NumRtpPackets(ssrc), kTimeout); - EXPECT_EQ_WAIT(NumRtpBytes(), NumRtpBytes(ssrc), kTimeout); - EXPECT_EQ(1, NumSentSsrcs()); - EXPECT_EQ(0, NumRtpPackets(kSsrc - 1)); - EXPECT_EQ(0, NumRtpBytes(kSsrc - 1)); - } - // Test that we can set the SSRC even after codecs are set. - void SetSendSsrcAfterSetCodecs() { - // Remove stream added in Setup. - EXPECT_TRUE(channel_->RemoveSendStream(kSsrc)); - EXPECT_TRUE(SetDefaultCodec()); - EXPECT_TRUE(channel_->AddSendStream( - cricket::StreamParams::CreateLegacy(999))); - EXPECT_TRUE( - channel_->SetVideoSend(999u, true, nullptr, video_capturer_.get())); - EXPECT_TRUE(SetSend(true)); - EXPECT_TRUE(WaitAndSendFrame(0)); - EXPECT_TRUE_WAIT(NumRtpPackets() > 0, kTimeout); - uint32_t ssrc = 0; - std::unique_ptr p(GetRtpPacket(0)); - ParseRtpPacket(p.get(), NULL, NULL, NULL, NULL, &ssrc, NULL); - EXPECT_EQ(999u, ssrc); - // Packets are being paced out, so these can mismatch between the first and - // second call to NumRtpPackets until pending packets are paced out. - EXPECT_EQ_WAIT(NumRtpPackets(), NumRtpPackets(ssrc), kTimeout); - EXPECT_EQ_WAIT(NumRtpBytes(), NumRtpBytes(ssrc), kTimeout); - EXPECT_EQ(1, NumSentSsrcs()); - EXPECT_EQ(0, NumRtpPackets(kSsrc)); - EXPECT_EQ(0, NumRtpBytes(kSsrc)); - } - // Test that we can set the default video renderer before and after - // media is received. - void SetSink() { - uint8_t data1[] = { - 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; - - rtc::CopyOnWriteBuffer packet1(data1, sizeof(data1)); - rtc::SetBE32(packet1.data() + 8, kSsrc); - channel_->SetSink(kDefaultReceiveSsrc, NULL); - EXPECT_TRUE(SetDefaultCodec()); - EXPECT_TRUE(SetSend(true)); - EXPECT_EQ(0, renderer_.num_rendered_frames()); - channel_->OnPacketReceived(&packet1, rtc::PacketTime()); - EXPECT_TRUE(channel_->SetSink(kDefaultReceiveSsrc, &renderer_)); - EXPECT_TRUE(SendFrame()); - EXPECT_FRAME_WAIT(1, kVideoWidth, kVideoHeight, kTimeout); - } - - // Tests empty StreamParams is rejected. - void RejectEmptyStreamParams() { - // Remove the send stream that was added during Setup. - EXPECT_TRUE(channel_->RemoveSendStream(kSsrc)); - - cricket::StreamParams empty; - EXPECT_FALSE(channel_->AddSendStream(empty)); - EXPECT_TRUE(channel_->AddSendStream( - cricket::StreamParams::CreateLegacy(789u))); - } - - // Tests setting up and configuring a send stream. - void AddRemoveSendStreams() { - EXPECT_TRUE(SetOneCodec(DefaultCodec())); - EXPECT_TRUE(SetSend(true)); - EXPECT_TRUE(channel_->SetSink(kDefaultReceiveSsrc, &renderer_)); - EXPECT_TRUE(SendFrame()); - EXPECT_FRAME_WAIT(1, kVideoWidth, kVideoHeight, kTimeout); - EXPECT_GT(NumRtpPackets(), 0); - uint32_t ssrc = 0; - size_t last_packet = NumRtpPackets() - 1; - std::unique_ptr - p(GetRtpPacket(static_cast(last_packet))); - ParseRtpPacket(p.get(), NULL, NULL, NULL, NULL, &ssrc, NULL); - EXPECT_EQ(kSsrc, ssrc); - - // Remove the send stream that was added during Setup. - EXPECT_TRUE(channel_->RemoveSendStream(kSsrc)); - int rtp_packets = NumRtpPackets(); - - EXPECT_TRUE(channel_->AddSendStream( - cricket::StreamParams::CreateLegacy(789u))); - EXPECT_TRUE( - channel_->SetVideoSend(789u, true, nullptr, video_capturer_.get())); - EXPECT_EQ(rtp_packets, NumRtpPackets()); - // Wait 30ms to guarantee the engine does not drop the frame. - EXPECT_TRUE(WaitAndSendFrame(30)); - EXPECT_TRUE_WAIT(NumRtpPackets() > rtp_packets, kTimeout); - - last_packet = NumRtpPackets() - 1; - p.reset(GetRtpPacket(static_cast(last_packet))); - ParseRtpPacket(p.get(), NULL, NULL, NULL, NULL, &ssrc, NULL); - EXPECT_EQ(789u, ssrc); - } - - // Tests the behavior of incoming streams in a conference scenario. - void SimulateConference() { - cricket::FakeVideoRenderer renderer1, renderer2; - EXPECT_TRUE(SetDefaultCodec()); - cricket::VideoSendParameters parameters; - parameters.codecs.push_back(DefaultCodec()); - parameters.conference_mode = true; - EXPECT_TRUE(channel_->SetSendParameters(parameters)); - EXPECT_TRUE(SetSend(true)); - EXPECT_TRUE(channel_->AddRecvStream( - cricket::StreamParams::CreateLegacy(1))); - EXPECT_TRUE(channel_->AddRecvStream( - cricket::StreamParams::CreateLegacy(2))); - EXPECT_TRUE(channel_->SetSink(1, &renderer1)); - EXPECT_TRUE(channel_->SetSink(2, &renderer2)); - EXPECT_EQ(0, renderer1.num_rendered_frames()); - EXPECT_EQ(0, renderer2.num_rendered_frames()); - std::vector ssrcs; - ssrcs.push_back(1); - ssrcs.push_back(2); - network_interface_.SetConferenceMode(true, ssrcs); - EXPECT_TRUE(SendFrame()); - EXPECT_FRAME_ON_RENDERER_WAIT(renderer1, 1, kVideoWidth, kVideoHeight, - kTimeout); - EXPECT_FRAME_ON_RENDERER_WAIT(renderer2, 1, kVideoWidth, kVideoHeight, - kTimeout); - - std::unique_ptr p(GetRtpPacket(0)); - EXPECT_EQ(DefaultCodec().id, GetPayloadType(p.get())); - EXPECT_EQ(kVideoWidth, renderer1.width()); - EXPECT_EQ(kVideoHeight, renderer1.height()); - EXPECT_EQ(kVideoWidth, renderer2.width()); - EXPECT_EQ(kVideoHeight, renderer2.height()); - EXPECT_TRUE(channel_->RemoveRecvStream(2)); - EXPECT_TRUE(channel_->RemoveRecvStream(1)); - } - - // Tests that we can add and remove capturers and frames are sent out properly - void AddRemoveCapturer() { - cricket::VideoCodec codec = DefaultCodec(); - const int time_between_send_ms = - cricket::VideoFormat::FpsToInterval(kFramerate); - EXPECT_TRUE(SetOneCodec(codec)); - EXPECT_TRUE(SetSend(true)); - EXPECT_TRUE(channel_->SetSink(kDefaultReceiveSsrc, &renderer_)); - EXPECT_EQ(0, renderer_.num_rendered_frames()); - EXPECT_TRUE(SendFrame()); - EXPECT_FRAME_WAIT(1, kVideoWidth, kVideoHeight, kTimeout); - std::unique_ptr capturer( - CreateFakeVideoCapturer()); - - // TODO(nisse): This testcase fails if we don't configure - // screencast. It's unclear why, I see nothing obvious in this - // test which is related to screencast logic. - cricket::VideoOptions video_options; - video_options.is_screencast = rtc::Optional(true); - channel_->SetVideoSend(kSsrc, true, &video_options, nullptr); - - cricket::VideoFormat format(480, 360, - cricket::VideoFormat::FpsToInterval(30), - cricket::FOURCC_I420); - EXPECT_EQ(cricket::CS_RUNNING, capturer->Start(format)); - // All capturers start generating frames with the same timestamp. ViE does - // not allow the same timestamp to be used. Capture one frame before - // associating the capturer with the channel. - EXPECT_TRUE(capturer->CaptureCustomFrame(format.width, format.height, - cricket::FOURCC_I420)); - - int captured_frames = 1; - for (int iterations = 0; iterations < 2; ++iterations) { - EXPECT_TRUE(channel_->SetVideoSend(kSsrc, true, nullptr, capturer.get())); - rtc::Thread::Current()->ProcessMessages(time_between_send_ms); - EXPECT_TRUE(capturer->CaptureCustomFrame(format.width, format.height, - cricket::FOURCC_I420)); - ++captured_frames; - // Wait until frame of right size is captured. - EXPECT_TRUE_WAIT(renderer_.num_rendered_frames() >= captured_frames && - format.width == renderer_.width() && - format.height == renderer_.height() && - !renderer_.black_frame(), kTimeout); - EXPECT_GE(renderer_.num_rendered_frames(), captured_frames); - EXPECT_EQ(format.width, renderer_.width()); - EXPECT_EQ(format.height, renderer_.height()); - captured_frames = renderer_.num_rendered_frames() + 1; - EXPECT_FALSE(renderer_.black_frame()); - EXPECT_TRUE(channel_->SetVideoSend(kSsrc, true, nullptr, nullptr)); - // Make sure a black frame is generated within the specified timeout. - // The black frame should be the resolution of the previous frame to - // prevent expensive encoder reconfigurations. - EXPECT_TRUE_WAIT(renderer_.num_rendered_frames() >= captured_frames && - format.width == renderer_.width() && - format.height == renderer_.height() && - renderer_.black_frame(), kTimeout); - EXPECT_GE(renderer_.num_rendered_frames(), captured_frames); - EXPECT_EQ(format.width, renderer_.width()); - EXPECT_EQ(format.height, renderer_.height()); - EXPECT_TRUE(renderer_.black_frame()); - - // The black frame has the same timestamp as the next frame since it's - // timestamp is set to the last frame's timestamp + interval. WebRTC will - // not render a frame with the same timestamp so capture another frame - // with the frame capturer to increment the next frame's timestamp. - EXPECT_TRUE(capturer->CaptureCustomFrame(format.width, format.height, - cricket::FOURCC_I420)); - } - } - - // Tests that if SetVideoSend is called with a NULL capturer after the - // capturer was already removed, the application doesn't crash (and no black - // frame is sent). - void RemoveCapturerWithoutAdd() { - EXPECT_TRUE(SetOneCodec(DefaultCodec())); - EXPECT_TRUE(SetSend(true)); - EXPECT_TRUE(channel_->SetSink(kDefaultReceiveSsrc, &renderer_)); - EXPECT_EQ(0, renderer_.num_rendered_frames()); - EXPECT_TRUE(SendFrame()); - EXPECT_FRAME_WAIT(1, kVideoWidth, kVideoHeight, kTimeout); - // Wait for one frame so they don't get dropped because we send frames too - // tightly. - rtc::Thread::Current()->ProcessMessages(30); - // Remove the capturer. - EXPECT_TRUE(channel_->SetVideoSend(kSsrc, true, nullptr, nullptr)); - - // No capturer was added, so this SetVideoSend shouldn't do anything. - EXPECT_TRUE(channel_->SetVideoSend(kSsrc, true, nullptr, nullptr)); - rtc::Thread::Current()->ProcessMessages(300); - // Verify no more frames were sent. - EXPECT_EQ(1, renderer_.num_rendered_frames()); - } - - // Tests that we can add and remove capturer as unique sources. - void AddRemoveCapturerMultipleSources() { - // WebRTC implementation will drop frames if pushed to quickly. Wait the - // interval time to avoid that. - // WebRTC implementation will drop frames if pushed to quickly. Wait the - // interval time to avoid that. - // Set up the stream associated with the engine. - EXPECT_TRUE(channel_->AddRecvStream( - cricket::StreamParams::CreateLegacy(kSsrc))); - EXPECT_TRUE(channel_->SetSink(kSsrc, &renderer_)); - cricket::VideoFormat capture_format; // default format - capture_format.interval = cricket::VideoFormat::FpsToInterval(kFramerate); - // Set up additional stream 1. - cricket::FakeVideoRenderer renderer1; - EXPECT_FALSE(channel_->SetSink(1, &renderer1)); - EXPECT_TRUE(channel_->AddRecvStream( - cricket::StreamParams::CreateLegacy(1))); - EXPECT_TRUE(channel_->SetSink(1, &renderer1)); - EXPECT_TRUE(channel_->AddSendStream( - cricket::StreamParams::CreateLegacy(1))); - std::unique_ptr capturer1( - CreateFakeVideoCapturer()); - EXPECT_EQ(cricket::CS_RUNNING, capturer1->Start(capture_format)); - // Set up additional stream 2. - cricket::FakeVideoRenderer renderer2; - EXPECT_FALSE(channel_->SetSink(2, &renderer2)); - EXPECT_TRUE(channel_->AddRecvStream( - cricket::StreamParams::CreateLegacy(2))); - EXPECT_TRUE(channel_->SetSink(2, &renderer2)); - EXPECT_TRUE(channel_->AddSendStream( - cricket::StreamParams::CreateLegacy(2))); - std::unique_ptr capturer2( - CreateFakeVideoCapturer()); - EXPECT_EQ(cricket::CS_RUNNING, capturer2->Start(capture_format)); - // State for all the streams. - EXPECT_TRUE(SetOneCodec(DefaultCodec())); - // A limitation in the lmi implementation requires that SetVideoSend() is - // called after SetOneCodec(). - // TODO(hellner): this seems like an unnecessary constraint, fix it. - EXPECT_TRUE(channel_->SetVideoSend(1, true, nullptr, capturer1.get())); - EXPECT_TRUE(channel_->SetVideoSend(2, true, nullptr, capturer2.get())); - EXPECT_TRUE(SetSend(true)); - // Test capturer associated with engine. - const int kTestWidth = 160; - const int kTestHeight = 120; - EXPECT_TRUE(capturer1->CaptureCustomFrame( - kTestWidth, kTestHeight, cricket::FOURCC_I420)); - EXPECT_FRAME_ON_RENDERER_WAIT( - renderer1, 1, kTestWidth, kTestHeight, kTimeout); - // Capture a frame with additional capturer2, frames should be received - EXPECT_TRUE(capturer2->CaptureCustomFrame( - kTestWidth, kTestHeight, cricket::FOURCC_I420)); - EXPECT_FRAME_ON_RENDERER_WAIT( - renderer2, 1, kTestWidth, kTestHeight, kTimeout); - // Successfully remove the capturer. - EXPECT_TRUE(channel_->SetVideoSend(kSsrc, true, nullptr, nullptr)); - // The capturers must be unregistered here as it runs out of it's scope - // next. - EXPECT_TRUE(channel_->SetVideoSend(1, true, nullptr, nullptr)); - EXPECT_TRUE(channel_->SetVideoSend(2, true, nullptr, nullptr)); - } - - // Test that multiple send streams can be created and deleted properly. - void MultipleSendStreams() { - // Remove stream added in Setup. I.e. remove stream corresponding to default - // channel. - EXPECT_TRUE(channel_->RemoveSendStream(kSsrc)); - const unsigned int kSsrcsSize = sizeof(kSsrcs4)/sizeof(kSsrcs4[0]); - for (unsigned int i = 0; i < kSsrcsSize; ++i) { - EXPECT_TRUE(channel_->AddSendStream( - cricket::StreamParams::CreateLegacy(kSsrcs4[i]))); - } - // Delete one of the non default channel streams, let the destructor delete - // the remaining ones. - EXPECT_TRUE(channel_->RemoveSendStream(kSsrcs4[kSsrcsSize - 1])); - // Stream should already be deleted. - EXPECT_FALSE(channel_->RemoveSendStream(kSsrcs4[kSsrcsSize - 1])); - } - - // Two streams one channel tests. - - // Tests that we can send and receive frames. - void TwoStreamsSendAndReceive(const cricket::VideoCodec& codec) { - SetUpSecondStream(); - // Test sending and receiving on first stream. - SendAndReceive(codec); - // Test sending and receiving on second stream. - EXPECT_EQ_WAIT(1, renderer2_.num_rendered_frames(), kTimeout); - EXPECT_GT(NumRtpPackets(), 0); - EXPECT_EQ(1, renderer2_.num_rendered_frames()); - } - - webrtc::RtcEventLogNullImpl event_log_; - const std::unique_ptr call_; - E engine_; - std::unique_ptr video_capturer_; - std::unique_ptr video_capturer_2_; - std::unique_ptr channel_; - cricket::FakeNetworkInterface network_interface_; - cricket::FakeVideoRenderer renderer_; - cricket::VideoMediaChannel::Error media_error_; - - // Used by test cases where 2 streams are run on the same channel. - cricket::FakeVideoRenderer renderer2_; -}; - -#endif // WEBRTC_MEDIA_BASE_VIDEOENGINE_UNITTEST_H_ NOLINT diff --git a/WebRtc.NET/include/webrtc/media/base/videoframe.h b/WebRtc.NET/include/webrtc/media/base/videoframe.h deleted file mode 100644 index 8e8a05d7..00000000 --- a/WebRtc.NET/include/webrtc/media/base/videoframe.h +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Copyright (c) 2004 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -// TODO(nisse): Deprecated, replace cricket::VideoFrame with -// webrtc::VideoFrame everywhere, then delete this file. See -// https://bugs.chromium.org/p/webrtc/issues/detail?id=5682. - -#ifndef WEBRTC_MEDIA_BASE_VIDEOFRAME_H_ -#define WEBRTC_MEDIA_BASE_VIDEOFRAME_H_ - -// TODO(nisse): Some applications expect that including this file -// implies an include of logging.h. So keep for compatibility, until -// this file can be deleted. -#include "webrtc/base/logging.h" - -#include "webrtc/api/video/video_frame.h" - -// TODO(nisse): Similarly, some applications expect that including this file -// implies a forward declaration of rtc::Thread. -namespace rtc { -class Thread; -} // namespace rtc - -namespace cricket { - -using VideoFrame = webrtc::VideoFrame; - -} // namespace cricket - -#endif // WEBRTC_MEDIA_BASE_VIDEOFRAME_H_ diff --git a/WebRtc.NET/include/webrtc/media/base/videosinkinterface.h b/WebRtc.NET/include/webrtc/media/base/videosinkinterface.h deleted file mode 100644 index f8b20b09..00000000 --- a/WebRtc.NET/include/webrtc/media/base/videosinkinterface.h +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MEDIA_BASE_VIDEOSINKINTERFACE_H_ -#define WEBRTC_MEDIA_BASE_VIDEOSINKINTERFACE_H_ - -// TODO(nisse): Consider moving this interface (and possibly -// VideoSourceInterface too) from media/base to common_video, to -// reduce dependency cycles. -namespace rtc { - -template -class VideoSinkInterface { - public: - virtual ~VideoSinkInterface() {} - - virtual void OnFrame(const VideoFrameT& frame) = 0; -}; - -} // namespace rtc - -#endif // WEBRTC_MEDIA_BASE_VIDEOSINKINTERFACE_H_ diff --git a/WebRtc.NET/include/webrtc/media/base/videosourceinterface.h b/WebRtc.NET/include/webrtc/media/base/videosourceinterface.h deleted file mode 100644 index bae02c8d..00000000 --- a/WebRtc.NET/include/webrtc/media/base/videosourceinterface.h +++ /dev/null @@ -1,53 +0,0 @@ -/* - * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MEDIA_BASE_VIDEOSOURCEINTERFACE_H_ -#define WEBRTC_MEDIA_BASE_VIDEOSOURCEINTERFACE_H_ - -#include "webrtc/media/base/videosinkinterface.h" -#include "webrtc/base/optional.h" - -namespace rtc { - -// VideoSinkWants is used for notifying the source of properties a video frame -// should have when it is delivered to a certain sink. -struct VideoSinkWants { - // Tells the source whether the sink wants frames with rotation applied. - // By default, any rotation must be applied by the sink. - bool rotation_applied = false; - - // Tells the source that the sink only wants black frames. - bool black_frames = false; - - // Tells the source the maximum number of pixels the sink wants. - rtc::Optional max_pixel_count; - // Like |max_pixel_count| but relative to the given value. The source is - // requested to produce frames with a resolution one "step up" from the given - // value. In practice, this means that the sink can consume this amount of - // pixels but wants more and the source should produce a resolution one - // "step" higher than this but not higher. - rtc::Optional max_pixel_count_step_up; -}; - -template -class VideoSourceInterface { - public: - virtual void AddOrUpdateSink(VideoSinkInterface* sink, - const VideoSinkWants& wants) = 0; - // RemoveSink must guarantee that at the time the method returns, - // there is no current and no future calls to VideoSinkInterface::OnFrame. - virtual void RemoveSink(VideoSinkInterface* sink) = 0; - - protected: - virtual ~VideoSourceInterface() {} -}; - -} // namespace rtc -#endif // WEBRTC_MEDIA_BASE_VIDEOSOURCEINTERFACE_H_ diff --git a/WebRtc.NET/include/webrtc/media/base/yuvframegenerator.h b/WebRtc.NET/include/webrtc/media/base/yuvframegenerator.h deleted file mode 100644 index bb3ed489..00000000 --- a/WebRtc.NET/include/webrtc/media/base/yuvframegenerator.h +++ /dev/null @@ -1,94 +0,0 @@ -/* - * Copyright (c) 2010 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -// Generates YUV420 frames with a "landscape with striped crosshair" in the -// Y-plane, plus a horizontal gradient in the U-plane and a vertical one in the -// V-plane. This makes for a nice mix of colours that is suited for both -// catching visual errors and making sure e.g. YUV->RGB/BGR conversion looks -// the same on different platforms. -// There is also a solid box bouncing around in the Y-plane, and two differently -// coloured lines bouncing horizontally and vertically in the U and V plane. -// This helps illustrating how the frame boundary goes, and can aid as a quite -// handy visual help for noticing e.g. packet loss if the frames are encoded -// and sent over the network. - -#ifndef WEBRTC_MEDIA_BASE_YUVFRAMEGENERATOR_H_ -#define WEBRTC_MEDIA_BASE_YUVFRAMEGENERATOR_H_ - -#include "webrtc/base/basictypes.h" -#include "webrtc/base/constructormagic.h" - -namespace cricket { - -class YuvFrameGenerator { - public: - // Constructs a frame-generator that produces frames of size |width|x|height|. - // If |enable_barcode| is specified, barcodes can be included in the frames - // when calling |GenerateNextFrame(uint8_t*, uint32_t)|. If |enable_barcode| - // is |true| then |width|x|height| should be at least 160x100; otherwise this - // constructor will abort. - YuvFrameGenerator(int width, int height, bool enable_barcode); - ~YuvFrameGenerator(); - - int GetFrameSize() { return frame_data_size_; } - - // Generate the next frame and return it in the provided |frame_buffer|. If - // barcode_value is not |nullptr| the value referred by it will be encoded - // into a barcode in the frame. The value should in the range: - // [0..9,999,999]. If the value exceeds this range or barcodes were not - // requested in the constructor, this function will abort. - void GenerateNextFrame(uint8_t* frame_buffer, int32_t barcode_value); - - int GetHeight() { return height_; } - int GetWidth() { return width_; } - - // Fetch the bounds of the barcode from the generator. The barcode will - // always be at this location. This function will abort if barcodes were not - // requested in the constructor. - void GetBarcodeBounds(int* top, int* left, int* width, int* height); - - private: - void DrawLandscape(uint8_t* p, int w, int h); - void DrawGradientX(uint8_t* p, int w, int h); - void DrawGradientY(uint8_t* p, int w, int h); - void DrawMovingLineX(uint8_t* p, int w, int h, int n); - void DrawMovingLineY(uint8_t* p, int w, int h, int n); - void DrawBouncingCube(uint8_t* p, int w, int h, int n); - - void DrawBarcode(uint32_t value); - int DrawSideGuardBars(int x, int y, int height); - int DrawMiddleGuardBars(int x, int y, int height); - int DrawEanEncodedDigit(int digit, int x, int y, int height, bool r_code); - void DrawBlockRectangle(uint8_t* p, - int x_start, - int y_start, - int width, - int height, - int pitch, - uint8_t value); - - private: - int width_; - int height_; - int frame_index_; - int frame_data_size_; - uint8_t* y_data_; - uint8_t* u_data_; - uint8_t* v_data_; - - int barcode_start_x_; - int barcode_start_y_; - - RTC_DISALLOW_COPY_AND_ASSIGN(YuvFrameGenerator); -}; - -} // namespace cricket - -#endif // WEBRTC_MEDIA_BASE_YUVFRAMEGENERATOR_H_ diff --git a/WebRtc.NET/include/webrtc/media/engine/constants.h b/WebRtc.NET/include/webrtc/media/engine/constants.h deleted file mode 100644 index 19d06a19..00000000 --- a/WebRtc.NET/include/webrtc/media/engine/constants.h +++ /dev/null @@ -1,25 +0,0 @@ -/* - * Copyright (c) 2014 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MEDIA_ENGINE_CONSTANTS_H_ -#define WEBRTC_MEDIA_ENGINE_CONSTANTS_H_ - -namespace cricket { - -extern const int kVideoMtu; -extern const int kVideoRtpBufferSize; - -extern const char kH264CodecName[]; - -extern const int kMinVideoBitrateKbps; - -} // namespace cricket - -#endif // WEBRTC_MEDIA_ENGINE_CONSTANTS_H_ diff --git a/WebRtc.NET/include/webrtc/media/engine/fakewebrtccall.h b/WebRtc.NET/include/webrtc/media/engine/fakewebrtccall.h deleted file mode 100644 index c862c1c1..00000000 --- a/WebRtc.NET/include/webrtc/media/engine/fakewebrtccall.h +++ /dev/null @@ -1,312 +0,0 @@ -/* - * Copyright (c) 2015 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -// This file contains fake implementations, for use in unit tests, of the -// following classes: -// -// webrtc::Call -// webrtc::AudioSendStream -// webrtc::AudioReceiveStream -// webrtc::VideoSendStream -// webrtc::VideoReceiveStream - -#ifndef WEBRTC_MEDIA_ENGINE_FAKEWEBRTCCALL_H_ -#define WEBRTC_MEDIA_ENGINE_FAKEWEBRTCCALL_H_ - -#include -#include -#include -#include - -#include "webrtc/api/video/video_frame.h" -#include "webrtc/base/buffer.h" -#include "webrtc/call/audio_receive_stream.h" -#include "webrtc/call/audio_send_stream.h" -#include "webrtc/call/call.h" -#include "webrtc/call/flexfec_receive_stream.h" -#include "webrtc/video_receive_stream.h" -#include "webrtc/video_send_stream.h" - -namespace cricket { -class FakeAudioSendStream final : public webrtc::AudioSendStream { - public: - struct TelephoneEvent { - int payload_type = -1; - int payload_frequency = -1; - int event_code = 0; - int duration_ms = 0; - }; - - explicit FakeAudioSendStream(const webrtc::AudioSendStream::Config& config); - - const webrtc::AudioSendStream::Config& GetConfig() const; - void SetStats(const webrtc::AudioSendStream::Stats& stats); - TelephoneEvent GetLatestTelephoneEvent() const; - bool IsSending() const { return sending_; } - bool muted() const { return muted_; } - - private: - // webrtc::AudioSendStream implementation. - void Start() override { sending_ = true; } - void Stop() override { sending_ = false; } - - bool SendTelephoneEvent(int payload_type, int payload_frequency, int event, - int duration_ms) override; - void SetMuted(bool muted) override; - webrtc::AudioSendStream::Stats GetStats() const override; - - TelephoneEvent latest_telephone_event_; - webrtc::AudioSendStream::Config config_; - webrtc::AudioSendStream::Stats stats_; - bool sending_ = false; - bool muted_ = false; -}; - -class FakeAudioReceiveStream final : public webrtc::AudioReceiveStream { - public: - explicit FakeAudioReceiveStream( - const webrtc::AudioReceiveStream::Config& config); - - const webrtc::AudioReceiveStream::Config& GetConfig() const; - void SetStats(const webrtc::AudioReceiveStream::Stats& stats); - int received_packets() const { return received_packets_; } - bool VerifyLastPacket(const uint8_t* data, size_t length) const; - const webrtc::AudioSinkInterface* sink() const { return sink_.get(); } - float gain() const { return gain_; } - bool DeliverRtp(const uint8_t* packet, - size_t length, - const webrtc::PacketTime& packet_time); - bool started() const { return started_; } - - private: - // webrtc::AudioReceiveStream implementation. - void Start() override { started_ = true; } - void Stop() override { started_ = false; } - - webrtc::AudioReceiveStream::Stats GetStats() const override; - void SetSink(std::unique_ptr sink) override; - void SetGain(float gain) override; - - webrtc::AudioReceiveStream::Config config_; - webrtc::AudioReceiveStream::Stats stats_; - int received_packets_ = 0; - std::unique_ptr sink_; - float gain_ = 1.0f; - rtc::Buffer last_packet_; - bool started_ = false; -}; - -class FakeVideoSendStream final - : public webrtc::VideoSendStream, - public rtc::VideoSinkInterface { - public: - FakeVideoSendStream(webrtc::VideoSendStream::Config config, - webrtc::VideoEncoderConfig encoder_config); - ~FakeVideoSendStream() override; - const webrtc::VideoSendStream::Config& GetConfig() const; - const webrtc::VideoEncoderConfig& GetEncoderConfig() const; - const std::vector& GetVideoStreams() const; - - bool IsSending() const; - bool GetVp8Settings(webrtc::VideoCodecVP8* settings) const; - bool GetVp9Settings(webrtc::VideoCodecVP9* settings) const; - - int GetNumberOfSwappedFrames() const; - int GetLastWidth() const; - int GetLastHeight() const; - int64_t GetLastTimestamp() const; - void SetStats(const webrtc::VideoSendStream::Stats& stats); - int num_encoder_reconfigurations() const { - return num_encoder_reconfigurations_; - } - - void EnableEncodedFrameRecording(const std::vector& files, - size_t byte_limit) override; - - bool resolution_scaling_enabled() const { - return resolution_scaling_enabled_; - } - void InjectVideoSinkWants(const rtc::VideoSinkWants& wants); - - rtc::VideoSourceInterface* source() const { - return source_; - } - - private: - // rtc::VideoSinkInterface implementation. - void OnFrame(const webrtc::VideoFrame& frame) override; - - // webrtc::VideoSendStream implementation. - void Start() override; - void Stop() override; - void SetSource(rtc::VideoSourceInterface* source, - const webrtc::VideoSendStream::DegradationPreference& - degradation_preference) override; - webrtc::VideoSendStream::Stats GetStats() override; - void ReconfigureVideoEncoder(webrtc::VideoEncoderConfig config) override; - - bool sending_; - webrtc::VideoSendStream::Config config_; - webrtc::VideoEncoderConfig encoder_config_; - std::vector video_streams_; - rtc::VideoSinkWants sink_wants_; - - bool codec_settings_set_; - union VpxSettings { - webrtc::VideoCodecVP8 vp8; - webrtc::VideoCodecVP9 vp9; - } vpx_settings_; - bool resolution_scaling_enabled_; - rtc::VideoSourceInterface* source_; - int num_swapped_frames_; - rtc::Optional last_frame_; - webrtc::VideoSendStream::Stats stats_; - int num_encoder_reconfigurations_ = 0; -}; - -class FakeVideoReceiveStream final : public webrtc::VideoReceiveStream { - public: - explicit FakeVideoReceiveStream(webrtc::VideoReceiveStream::Config config); - - const webrtc::VideoReceiveStream::Config& GetConfig(); - - bool IsReceiving() const; - - void InjectFrame(const webrtc::VideoFrame& frame); - - void SetStats(const webrtc::VideoReceiveStream::Stats& stats); - - void EnableEncodedFrameRecording(rtc::PlatformFile file, - size_t byte_limit) override; - - private: - // webrtc::VideoReceiveStream implementation. - void Start() override; - void Stop() override; - - webrtc::VideoReceiveStream::Stats GetStats() const override; - - webrtc::VideoReceiveStream::Config config_; - bool receiving_; - webrtc::VideoReceiveStream::Stats stats_; -}; - -class FakeFlexfecReceiveStream final : public webrtc::FlexfecReceiveStream { - public: - explicit FakeFlexfecReceiveStream( - const webrtc::FlexfecReceiveStream::Config& config); - - const webrtc::FlexfecReceiveStream::Config& GetConfig() const; - - private: - // webrtc::FlexfecReceiveStream implementation. - void Start() override; - void Stop() override; - - webrtc::FlexfecReceiveStream::Stats GetStats() const override; - - webrtc::FlexfecReceiveStream::Config config_; - bool receiving_; -}; - -class FakeCall final : public webrtc::Call, public webrtc::PacketReceiver { - public: - explicit FakeCall(const webrtc::Call::Config& config); - ~FakeCall() override; - - webrtc::Call::Config GetConfig() const; - const std::vector& GetVideoSendStreams(); - const std::vector& GetVideoReceiveStreams(); - - const std::vector& GetAudioSendStreams(); - const FakeAudioSendStream* GetAudioSendStream(uint32_t ssrc); - const std::vector& GetAudioReceiveStreams(); - const FakeAudioReceiveStream* GetAudioReceiveStream(uint32_t ssrc); - - const std::list& GetFlexfecReceiveStreams(); - - rtc::SentPacket last_sent_packet() const { return last_sent_packet_; } - - // This is useful if we care about the last media packet (with id populated) - // but not the last ICE packet (with -1 ID). - int last_sent_nonnegative_packet_id() const { - return last_sent_nonnegative_packet_id_; - } - - webrtc::NetworkState GetNetworkState(webrtc::MediaType media) const; - int GetNumCreatedSendStreams() const; - int GetNumCreatedReceiveStreams() const; - void SetStats(const webrtc::Call::Stats& stats); - - private: - webrtc::AudioSendStream* CreateAudioSendStream( - const webrtc::AudioSendStream::Config& config) override; - void DestroyAudioSendStream(webrtc::AudioSendStream* send_stream) override; - - webrtc::AudioReceiveStream* CreateAudioReceiveStream( - const webrtc::AudioReceiveStream::Config& config) override; - void DestroyAudioReceiveStream( - webrtc::AudioReceiveStream* receive_stream) override; - - webrtc::VideoSendStream* CreateVideoSendStream( - webrtc::VideoSendStream::Config config, - webrtc::VideoEncoderConfig encoder_config) override; - void DestroyVideoSendStream(webrtc::VideoSendStream* send_stream) override; - - webrtc::VideoReceiveStream* CreateVideoReceiveStream( - webrtc::VideoReceiveStream::Config config) override; - void DestroyVideoReceiveStream( - webrtc::VideoReceiveStream* receive_stream) override; - - webrtc::FlexfecReceiveStream* CreateFlexfecReceiveStream( - const webrtc::FlexfecReceiveStream::Config& config) override; - void DestroyFlexfecReceiveStream( - webrtc::FlexfecReceiveStream* receive_stream) override; - - webrtc::PacketReceiver* Receiver() override; - - DeliveryStatus DeliverPacket(webrtc::MediaType media_type, - const uint8_t* packet, - size_t length, - const webrtc::PacketTime& packet_time) override; - - webrtc::Call::Stats GetStats() const override; - - void SetBitrateConfig( - const webrtc::Call::Config::BitrateConfig& bitrate_config) override; - void OnNetworkRouteChanged(const std::string& transport_name, - const rtc::NetworkRoute& network_route) override {} - void SignalChannelNetworkState(webrtc::MediaType media, - webrtc::NetworkState state) override; - void OnTransportOverheadChanged(webrtc::MediaType media, - int transport_overhead_per_packet) override; - void OnSentPacket(const rtc::SentPacket& sent_packet) override; - - webrtc::Call::Config config_; - webrtc::NetworkState audio_network_state_; - webrtc::NetworkState video_network_state_; - rtc::SentPacket last_sent_packet_; - int last_sent_nonnegative_packet_id_ = -1; - webrtc::Call::Stats stats_; - std::vector video_send_streams_; - std::vector audio_send_streams_; - std::vector video_receive_streams_; - std::vector audio_receive_streams_; - std::list flexfec_receive_streams_; - - int num_created_send_streams_; - int num_created_receive_streams_; - - int audio_transport_overhead_; - int video_transport_overhead_; -}; - -} // namespace cricket -#endif // WEBRTC_MEDIA_ENGINE_FAKEWEBRTCCALL_H_ diff --git a/WebRtc.NET/include/webrtc/media/engine/fakewebrtcvcmfactory.h b/WebRtc.NET/include/webrtc/media/engine/fakewebrtcvcmfactory.h deleted file mode 100644 index 3124cd8f..00000000 --- a/WebRtc.NET/include/webrtc/media/engine/fakewebrtcvcmfactory.h +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Copyright (c) 2004 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MEDIA_ENGINE_FAKEWEBRTCVCMFACTORY_H_ -#define WEBRTC_MEDIA_ENGINE_FAKEWEBRTCVCMFACTORY_H_ - -#include - -#include "webrtc/media/engine/fakewebrtcdeviceinfo.h" -#include "webrtc/media/engine/fakewebrtcvideocapturemodule.h" -#include "webrtc/media/engine/webrtcvideocapturer.h" - -// Factory class to allow the fakes above to be injected into -// WebRtcVideoCapturer. -class FakeWebRtcVcmFactory : public cricket::WebRtcVcmFactoryInterface { - public: - virtual rtc::scoped_refptr Create( - const char* device_id) { - if (!device_info.GetDeviceById(device_id)) return NULL; - rtc::scoped_refptr module( - new rtc::RefCountedObject(this)); - modules.push_back(module); - return module; - } - virtual webrtc::VideoCaptureModule::DeviceInfo* CreateDeviceInfo() { - return &device_info; - } - virtual void DestroyDeviceInfo(webrtc::VideoCaptureModule::DeviceInfo* info) { - } - void OnDestroyed(webrtc::VideoCaptureModule* module) { - std::remove(modules.begin(), modules.end(), module); - } - FakeWebRtcDeviceInfo device_info; - std::vector> modules; -}; - -FakeWebRtcVideoCaptureModule::~FakeWebRtcVideoCaptureModule() { - if (factory_) - factory_->OnDestroyed(this); -} - -#endif // WEBRTC_MEDIA_ENGINE_FAKEWEBRTCVCMFACTORY_H_ diff --git a/WebRtc.NET/include/webrtc/media/engine/fakewebrtcvideocapturemodule.h b/WebRtc.NET/include/webrtc/media/engine/fakewebrtcvideocapturemodule.h deleted file mode 100644 index 0d529992..00000000 --- a/WebRtc.NET/include/webrtc/media/engine/fakewebrtcvideocapturemodule.h +++ /dev/null @@ -1,90 +0,0 @@ -/* - * Copyright (c) 2004 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MEDIA_ENGINE_FAKEWEBRTCVIDEOCAPTUREMODULE_H_ -#define WEBRTC_MEDIA_ENGINE_FAKEWEBRTCVIDEOCAPTUREMODULE_H_ - -#include - -#include "webrtc/api/video/i420_buffer.h" -#include "webrtc/media/base/testutils.h" -#include "webrtc/media/engine/webrtcvideocapturer.h" - -class FakeWebRtcVcmFactory; - -// Fake class for mocking out webrtc::VideoCaptureModule. -class FakeWebRtcVideoCaptureModule : public webrtc::VideoCaptureModule { - public: - FakeWebRtcVideoCaptureModule(FakeWebRtcVcmFactory* factory) - : factory_(factory), - callback_(NULL), - running_(false) { - } - ~FakeWebRtcVideoCaptureModule(); - void RegisterCaptureDataCallback( - rtc::VideoSinkInterface* callback) override { - callback_ = callback; - } - void DeRegisterCaptureDataCallback() override { callback_ = NULL; } - int32_t StartCapture(const webrtc::VideoCaptureCapability& cap) override { - if (running_) return -1; - cap_ = cap; - running_ = true; - return 0; - } - int32_t StopCapture() override { - running_ = false; - return 0; - } - const char* CurrentDeviceName() const override { - return NULL; // not implemented - } - bool CaptureStarted() override { return running_; } - int32_t CaptureSettings(webrtc::VideoCaptureCapability& settings) override { - if (!running_) return -1; - settings = cap_; - return 0; - } - - int32_t SetCaptureRotation(webrtc::VideoRotation rotation) override { - return -1; // not implemented - } - bool SetApplyRotation(bool enable) override { - return true; // ignored - } - bool GetApplyRotation() override { - return true; // Rotation compensation is turned on. - } - void SendFrame(int w, int h) { - if (!running_) return; - - rtc::scoped_refptr buffer = - webrtc::I420Buffer::Create(w, h); - // Initialize memory to satisfy DrMemory tests. See - // https://bugs.chromium.org/p/libyuv/issues/detail?id=377 - buffer->InitializeData(); - if (callback_) { - callback_->OnFrame( - webrtc::VideoFrame(buffer, 0, 0, webrtc::kVideoRotation_0)); - } - } - - const webrtc::VideoCaptureCapability& cap() const { - return cap_; - } - - private: - FakeWebRtcVcmFactory* factory_; - rtc::VideoSinkInterface* callback_; - bool running_; - webrtc::VideoCaptureCapability cap_; -}; - -#endif // WEBRTC_MEDIA_ENGINE_FAKEWEBRTCVIDEOCAPTUREMODULE_H_ diff --git a/WebRtc.NET/include/webrtc/media/engine/fakewebrtcvideoengine.h b/WebRtc.NET/include/webrtc/media/engine/fakewebrtcvideoengine.h deleted file mode 100644 index 224419ad..00000000 --- a/WebRtc.NET/include/webrtc/media/engine/fakewebrtcvideoengine.h +++ /dev/null @@ -1,270 +0,0 @@ -/* - * Copyright (c) 2010 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MEDIA_ENGINE_FAKEWEBRTCVIDEOENGINE_H_ -#define WEBRTC_MEDIA_ENGINE_FAKEWEBRTCVIDEOENGINE_H_ - -#include -#include -#include - -#include "webrtc/base/basictypes.h" -#include "webrtc/base/criticalsection.h" -#include "webrtc/base/gunit.h" -#include "webrtc/base/stringutils.h" -#include "webrtc/base/thread_annotations.h" -#include "webrtc/media/base/codec.h" -#include "webrtc/media/engine/webrtcvideodecoderfactory.h" -#include "webrtc/media/engine/webrtcvideoencoderfactory.h" -#include "webrtc/modules/video_coding/include/video_error_codes.h" -#include "webrtc/video_decoder.h" -#include "webrtc/video_encoder.h" - -namespace cricket { - -static const int kMinVideoBitrate = 100; -static const int kStartVideoBitrate = 300; -static const int kMaxVideoBitrate = 1000; - -// WebRtc channel id and capture id share the same number space. -// This is how AddRenderer(renderId, ...) is able to tell if it is adding a -// renderer for a channel or it is adding a renderer for a capturer. -static const int kViEChannelIdBase = 0; -static const int kViEChannelIdMax = 1000; -static const int kEventTimeoutMs = 10000; - -// Fake class for mocking out webrtc::VideoDecoder -class FakeWebRtcVideoDecoder : public webrtc::VideoDecoder { - public: - FakeWebRtcVideoDecoder() : num_frames_received_(0) {} - - virtual int32_t InitDecode(const webrtc::VideoCodec*, int32_t) { - return WEBRTC_VIDEO_CODEC_OK; - } - - virtual int32_t Decode(const webrtc::EncodedImage&, - bool, - const webrtc::RTPFragmentationHeader*, - const webrtc::CodecSpecificInfo*, - int64_t) { - num_frames_received_++; - return WEBRTC_VIDEO_CODEC_OK; - } - - virtual int32_t RegisterDecodeCompleteCallback( - webrtc::DecodedImageCallback*) { - return WEBRTC_VIDEO_CODEC_OK; - } - - virtual int32_t Release() { return WEBRTC_VIDEO_CODEC_OK; } - - int GetNumFramesReceived() const { - return num_frames_received_; - } - - private: - int num_frames_received_; -}; - -// Fake class for mocking out WebRtcVideoDecoderFactory. -class FakeWebRtcVideoDecoderFactory : public WebRtcVideoDecoderFactory { - public: - FakeWebRtcVideoDecoderFactory() - : num_created_decoders_(0) { - } - - virtual webrtc::VideoDecoder* CreateVideoDecoder( - webrtc::VideoCodecType type) { - if (supported_codec_types_.count(type) == 0) { - return NULL; - } - FakeWebRtcVideoDecoder* decoder = new FakeWebRtcVideoDecoder(); - decoders_.push_back(decoder); - num_created_decoders_++; - return decoder; - } - - virtual webrtc::VideoDecoder* CreateVideoDecoderWithParams( - webrtc::VideoCodecType type, - VideoDecoderParams params) { - params_.push_back(params); - return CreateVideoDecoder(type); - } - - virtual void DestroyVideoDecoder(webrtc::VideoDecoder* decoder) { - decoders_.erase( - std::remove(decoders_.begin(), decoders_.end(), decoder), - decoders_.end()); - delete decoder; - } - - void AddSupportedVideoCodecType(webrtc::VideoCodecType type) { - supported_codec_types_.insert(type); - } - - int GetNumCreatedDecoders() { - return num_created_decoders_; - } - - const std::vector& decoders() { - return decoders_; - } - - const std::vector& params() { return params_; } - - private: - std::set supported_codec_types_; - std::vector decoders_; - int num_created_decoders_; - std::vector params_; -}; - -// Fake class for mocking out webrtc::VideoEnoder -class FakeWebRtcVideoEncoder : public webrtc::VideoEncoder { - public: - FakeWebRtcVideoEncoder() - : init_encode_event_(false, false), num_frames_encoded_(0) {} - - int32_t InitEncode(const webrtc::VideoCodec* codecSettings, - int32_t numberOfCores, - size_t maxPayloadSize) override { - rtc::CritScope lock(&crit_); - codec_settings_ = *codecSettings; - init_encode_event_.Set(); - return WEBRTC_VIDEO_CODEC_OK; - } - - bool WaitForInitEncode() { return init_encode_event_.Wait(kEventTimeoutMs); } - - webrtc::VideoCodec GetCodecSettings() { - rtc::CritScope lock(&crit_); - return codec_settings_; - } - - int32_t Encode(const webrtc::VideoFrame& inputImage, - const webrtc::CodecSpecificInfo* codecSpecificInfo, - const std::vector* frame_types) override { - rtc::CritScope lock(&crit_); - ++num_frames_encoded_; - init_encode_event_.Set(); - return WEBRTC_VIDEO_CODEC_OK; - } - - int32_t RegisterEncodeCompleteCallback( - webrtc::EncodedImageCallback* callback) override { - return WEBRTC_VIDEO_CODEC_OK; - } - - int32_t Release() override { return WEBRTC_VIDEO_CODEC_OK; } - - int32_t SetChannelParameters(uint32_t packetLoss, int64_t rtt) override { - return WEBRTC_VIDEO_CODEC_OK; - } - - int32_t SetRateAllocation(const webrtc::BitrateAllocation& allocation, - uint32_t framerate) override { - return WEBRTC_VIDEO_CODEC_OK; - } - - int GetNumEncodedFrames() { - rtc::CritScope lock(&crit_); - return num_frames_encoded_; - } - - private: - rtc::CriticalSection crit_; - rtc::Event init_encode_event_; - int num_frames_encoded_ GUARDED_BY(crit_); - webrtc::VideoCodec codec_settings_ GUARDED_BY(crit_); -}; - -// Fake class for mocking out WebRtcVideoEncoderFactory. -class FakeWebRtcVideoEncoderFactory : public WebRtcVideoEncoderFactory { - public: - FakeWebRtcVideoEncoderFactory() - : created_video_encoder_event_(false, false), - num_created_encoders_(0), - encoders_have_internal_sources_(false) {} - - webrtc::VideoEncoder* CreateVideoEncoder( - const cricket::VideoCodec& codec) override { - rtc::CritScope lock(&crit_); - if (!FindMatchingCodec(codecs_, codec)) - return nullptr; - FakeWebRtcVideoEncoder* encoder = new FakeWebRtcVideoEncoder(); - encoders_.push_back(encoder); - num_created_encoders_++; - created_video_encoder_event_.Set(); - return encoder; - } - - bool WaitForCreatedVideoEncoders(int num_encoders) { - while (created_video_encoder_event_.Wait(kEventTimeoutMs)) { - if (GetNumCreatedEncoders() >= num_encoders) - return true; - } - return false; - } - - void DestroyVideoEncoder(webrtc::VideoEncoder* encoder) override { - rtc::CritScope lock(&crit_); - encoders_.erase( - std::remove(encoders_.begin(), encoders_.end(), encoder), - encoders_.end()); - delete encoder; - } - - const std::vector& supported_codecs() const override { - return codecs_; - } - - bool EncoderTypeHasInternalSource( - webrtc::VideoCodecType type) const override { - return encoders_have_internal_sources_; - } - - void set_encoders_have_internal_sources(bool internal_source) { - encoders_have_internal_sources_ = internal_source; - } - - void AddSupportedVideoCodec(const cricket::VideoCodec& codec) { - codecs_.push_back(codec); - } - - void AddSupportedVideoCodecType(const std::string& name) { - codecs_.push_back(cricket::VideoCodec(name)); - } - - int GetNumCreatedEncoders() { - rtc::CritScope lock(&crit_); - return num_created_encoders_; - } - - const std::vector encoders() { - rtc::CritScope lock(&crit_); - return encoders_; - } - - private: - // Disable overloaded virtual function warning. TODO(magjed): Remove once - // http://crbug/webrtc/6402 is fixed. - using cricket::WebRtcVideoEncoderFactory::CreateVideoEncoder; - - rtc::CriticalSection crit_; - rtc::Event created_video_encoder_event_; - std::vector codecs_; - std::vector encoders_ GUARDED_BY(crit_); - int num_created_encoders_ GUARDED_BY(crit_); - bool encoders_have_internal_sources_; -}; - -} // namespace cricket - -#endif // WEBRTC_MEDIA_ENGINE_FAKEWEBRTCVIDEOENGINE_H_ diff --git a/WebRtc.NET/include/webrtc/media/engine/fakewebrtcvoiceengine.h b/WebRtc.NET/include/webrtc/media/engine/fakewebrtcvoiceengine.h deleted file mode 100644 index 5f61cf11..00000000 --- a/WebRtc.NET/include/webrtc/media/engine/fakewebrtcvoiceengine.h +++ /dev/null @@ -1,364 +0,0 @@ -/* - * Copyright (c) 2010 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MEDIA_ENGINE_FAKEWEBRTCVOICEENGINE_H_ -#define WEBRTC_MEDIA_ENGINE_FAKEWEBRTCVOICEENGINE_H_ - -#include - -#include -#include -#include - -#include "webrtc/base/checks.h" -#include "webrtc/base/stringutils.h" -#include "webrtc/base/checks.h" -#include "webrtc/config.h" -#include "webrtc/media/base/codec.h" -#include "webrtc/media/base/rtputils.h" -#include "webrtc/media/engine/webrtcvoe.h" -#include "webrtc/modules/audio_coding/acm2/rent_a_codec.h" -#include "webrtc/modules/audio_processing/include/audio_processing.h" - -namespace cricket { - -static const int kOpusBandwidthNb = 4000; -static const int kOpusBandwidthMb = 6000; -static const int kOpusBandwidthWb = 8000; -static const int kOpusBandwidthSwb = 12000; -static const int kOpusBandwidthFb = 20000; - -#define WEBRTC_CHECK_CHANNEL(channel) \ - if (channels_.find(channel) == channels_.end()) return -1; - -#define WEBRTC_STUB(method, args) \ - int method args override { return 0; } - -#define WEBRTC_STUB_CONST(method, args) \ - int method args const override { return 0; } - -#define WEBRTC_BOOL_STUB(method, args) \ - bool method args override { return true; } - -#define WEBRTC_VOID_STUB(method, args) \ - void method args override {} - -#define WEBRTC_FUNC(method, args) int method args override - -class FakeWebRtcVoiceEngine - : public webrtc::VoEAudioProcessing, - public webrtc::VoEBase, public webrtc::VoECodec, - public webrtc::VoEHardware, - public webrtc::VoEVolumeControl { - public: - struct Channel { - std::vector recv_codecs; - size_t neteq_capacity = 0; - bool neteq_fast_accelerate = false; - }; - - explicit FakeWebRtcVoiceEngine(webrtc::AudioProcessing* apm) : apm_(apm) { - memset(&agc_config_, 0, sizeof(agc_config_)); - } - ~FakeWebRtcVoiceEngine() override { - RTC_CHECK(channels_.empty()); - } - - bool ec_metrics_enabled() const { return ec_metrics_enabled_; } - - bool IsInited() const { return inited_; } - int GetLastChannel() const { return last_channel_; } - int GetNumChannels() const { return static_cast(channels_.size()); } - void set_fail_create_channel(bool fail_create_channel) { - fail_create_channel_ = fail_create_channel; - } - - WEBRTC_STUB(Release, ()); - - // webrtc::VoEBase - WEBRTC_STUB(RegisterVoiceEngineObserver, ( - webrtc::VoiceEngineObserver& observer)); - WEBRTC_STUB(DeRegisterVoiceEngineObserver, ()); - WEBRTC_FUNC(Init, - (webrtc::AudioDeviceModule* adm, - webrtc::AudioProcessing* audioproc, - const rtc::scoped_refptr& - decoder_factory)) { - inited_ = true; - return 0; - } - WEBRTC_FUNC(Terminate, ()) { - inited_ = false; - return 0; - } - webrtc::AudioProcessing* audio_processing() override { - return apm_; - } - webrtc::AudioDeviceModule* audio_device_module() override { - return nullptr; - } - WEBRTC_FUNC(CreateChannel, ()) { - return CreateChannel(webrtc::VoEBase::ChannelConfig()); - } - WEBRTC_FUNC(CreateChannel, (const webrtc::VoEBase::ChannelConfig& config)) { - if (fail_create_channel_) { - return -1; - } - Channel* ch = new Channel(); - auto db = webrtc::acm2::RentACodec::Database(); - ch->recv_codecs.assign(db.begin(), db.end()); - ch->neteq_capacity = config.acm_config.neteq_config.max_packets_in_buffer; - ch->neteq_fast_accelerate = - config.acm_config.neteq_config.enable_fast_accelerate; - channels_[++last_channel_] = ch; - return last_channel_; - } - WEBRTC_FUNC(DeleteChannel, (int channel)) { - WEBRTC_CHECK_CHANNEL(channel); - delete channels_[channel]; - channels_.erase(channel); - return 0; - } - WEBRTC_STUB(StartReceive, (int channel)); - WEBRTC_STUB(StartPlayout, (int channel)); - WEBRTC_STUB(StartSend, (int channel)); - WEBRTC_STUB(StopReceive, (int channel)); - WEBRTC_STUB(StopPlayout, (int channel)); - WEBRTC_STUB(StopSend, (int channel)); - WEBRTC_STUB(GetVersion, (char version[1024])); - WEBRTC_STUB(LastError, ()); - WEBRTC_STUB(AssociateSendChannel, (int channel, - int accociate_send_channel)); - - // webrtc::VoECodec - WEBRTC_STUB(NumOfCodecs, ()); - WEBRTC_STUB(GetCodec, (int index, webrtc::CodecInst& codec)); - WEBRTC_STUB(SetSendCodec, (int channel, const webrtc::CodecInst& codec)); - WEBRTC_STUB(GetSendCodec, (int channel, webrtc::CodecInst& codec)); - WEBRTC_STUB(SetBitRate, (int channel, int bitrate_bps)); - WEBRTC_STUB(GetRecCodec, (int channel, webrtc::CodecInst& codec)); - WEBRTC_FUNC(SetRecPayloadType, (int channel, - const webrtc::CodecInst& codec)) { - WEBRTC_CHECK_CHANNEL(channel); - Channel* ch = channels_[channel]; - // Check if something else already has this slot. - if (codec.pltype != -1) { - for (std::vector::iterator it = - ch->recv_codecs.begin(); it != ch->recv_codecs.end(); ++it) { - if (it->pltype == codec.pltype && - _stricmp(it->plname, codec.plname) != 0) { - return -1; - } - } - } - // Otherwise try to find this codec and update its payload type. - int result = -1; // not found - for (std::vector::iterator it = ch->recv_codecs.begin(); - it != ch->recv_codecs.end(); ++it) { - if (strcmp(it->plname, codec.plname) == 0 && - it->plfreq == codec.plfreq && - it->channels == codec.channels) { - it->pltype = codec.pltype; - result = 0; - } - } - return result; - } - WEBRTC_STUB(SetSendCNPayloadType, (int channel, int type, - webrtc::PayloadFrequencies frequency)); - WEBRTC_FUNC(GetRecPayloadType, (int channel, webrtc::CodecInst& codec)) { - WEBRTC_CHECK_CHANNEL(channel); - Channel* ch = channels_[channel]; - for (std::vector::iterator it = ch->recv_codecs.begin(); - it != ch->recv_codecs.end(); ++it) { - if (strcmp(it->plname, codec.plname) == 0 && - it->plfreq == codec.plfreq && - it->channels == codec.channels && - it->pltype != -1) { - codec.pltype = it->pltype; - return 0; - } - } - return -1; // not found - } - WEBRTC_STUB(SetVADStatus, (int channel, bool enable, webrtc::VadModes mode, - bool disableDTX)); - WEBRTC_STUB(GetVADStatus, (int channel, bool& enabled, - webrtc::VadModes& mode, bool& disabledDTX)); - WEBRTC_STUB(SetFECStatus, (int channel, bool enable)); - WEBRTC_STUB(GetFECStatus, (int channel, bool& enable)); - WEBRTC_STUB(SetOpusMaxPlaybackRate, (int channel, int frequency_hz)); - WEBRTC_STUB(SetOpusDtx, (int channel, bool enable_dtx)); - - // webrtc::VoEHardware - WEBRTC_STUB(GetNumOfRecordingDevices, (int& num)); - WEBRTC_STUB(GetNumOfPlayoutDevices, (int& num)); - WEBRTC_STUB(GetRecordingDeviceName, (int i, char* name, char* guid)); - WEBRTC_STUB(GetPlayoutDeviceName, (int i, char* name, char* guid)); - WEBRTC_STUB(SetRecordingDevice, (int, webrtc::StereoChannel)); - WEBRTC_STUB(SetPlayoutDevice, (int)); - WEBRTC_STUB(SetAudioDeviceLayer, (webrtc::AudioLayers)); - WEBRTC_STUB(GetAudioDeviceLayer, (webrtc::AudioLayers&)); - WEBRTC_STUB(SetRecordingSampleRate, (unsigned int samples_per_sec)); - WEBRTC_STUB_CONST(RecordingSampleRate, (unsigned int* samples_per_sec)); - WEBRTC_STUB(SetPlayoutSampleRate, (unsigned int samples_per_sec)); - WEBRTC_STUB_CONST(PlayoutSampleRate, (unsigned int* samples_per_sec)); - WEBRTC_STUB(EnableBuiltInAEC, (bool enable)); - bool BuiltInAECIsAvailable() const override { return false; } - WEBRTC_STUB(EnableBuiltInAGC, (bool enable)); - bool BuiltInAGCIsAvailable() const override { return false; } - WEBRTC_STUB(EnableBuiltInNS, (bool enable)); - bool BuiltInNSIsAvailable() const override { return false; } - - // webrtc::VoEVolumeControl - WEBRTC_STUB(SetSpeakerVolume, (unsigned int)); - WEBRTC_STUB(GetSpeakerVolume, (unsigned int&)); - WEBRTC_STUB(SetMicVolume, (unsigned int)); - WEBRTC_STUB(GetMicVolume, (unsigned int&)); - WEBRTC_STUB(SetInputMute, (int, bool)); - WEBRTC_STUB(GetInputMute, (int, bool&)); - WEBRTC_STUB(GetSpeechInputLevel, (unsigned int&)); - WEBRTC_STUB(GetSpeechOutputLevel, (int, unsigned int&)); - WEBRTC_STUB(GetSpeechInputLevelFullRange, (unsigned int&)); - WEBRTC_STUB(GetSpeechOutputLevelFullRange, (int, unsigned int&)); - WEBRTC_STUB(SetChannelOutputVolumeScaling, (int channel, float scale)); - WEBRTC_STUB(GetChannelOutputVolumeScaling, (int channel, float& scale)); - WEBRTC_STUB(SetOutputVolumePan, (int channel, float left, float right)); - WEBRTC_STUB(GetOutputVolumePan, (int channel, float& left, float& right)); - - // webrtc::VoEAudioProcessing - WEBRTC_FUNC(SetNsStatus, (bool enable, webrtc::NsModes mode)) { - ns_enabled_ = enable; - ns_mode_ = mode; - return 0; - } - WEBRTC_FUNC(GetNsStatus, (bool& enabled, webrtc::NsModes& mode)) { - enabled = ns_enabled_; - mode = ns_mode_; - return 0; - } - WEBRTC_FUNC(SetAgcStatus, (bool enable, webrtc::AgcModes mode)) { - agc_enabled_ = enable; - agc_mode_ = mode; - return 0; - } - WEBRTC_FUNC(GetAgcStatus, (bool& enabled, webrtc::AgcModes& mode)) { - enabled = agc_enabled_; - mode = agc_mode_; - return 0; - } - WEBRTC_FUNC(SetAgcConfig, (webrtc::AgcConfig config)) { - agc_config_ = config; - return 0; - } - WEBRTC_FUNC(GetAgcConfig, (webrtc::AgcConfig& config)) { - config = agc_config_; - return 0; - } - WEBRTC_FUNC(SetEcStatus, (bool enable, webrtc::EcModes mode)) { - ec_enabled_ = enable; - ec_mode_ = mode; - return 0; - } - WEBRTC_FUNC(GetEcStatus, (bool& enabled, webrtc::EcModes& mode)) { - enabled = ec_enabled_; - mode = ec_mode_; - return 0; - } - WEBRTC_STUB(EnableDriftCompensation, (bool enable)) - WEBRTC_BOOL_STUB(DriftCompensationEnabled, ()) - WEBRTC_VOID_STUB(SetDelayOffsetMs, (int offset)) - WEBRTC_STUB(DelayOffsetMs, ()); - WEBRTC_FUNC(SetAecmMode, (webrtc::AecmModes mode, bool enableCNG)) { - aecm_mode_ = mode; - cng_enabled_ = enableCNG; - return 0; - } - WEBRTC_FUNC(GetAecmMode, (webrtc::AecmModes& mode, bool& enabledCNG)) { - mode = aecm_mode_; - enabledCNG = cng_enabled_; - return 0; - } - WEBRTC_STUB(VoiceActivityIndicator, (int channel)); - WEBRTC_FUNC(SetEcMetricsStatus, (bool enable)) { - ec_metrics_enabled_ = enable; - return 0; - } - WEBRTC_STUB(GetEcMetricsStatus, (bool& enabled)); - WEBRTC_STUB(GetEchoMetrics, (int& ERL, int& ERLE, int& RERL, int& A_NLP)); - WEBRTC_STUB(GetEcDelayMetrics, (int& delay_median, int& delay_std, - float& fraction_poor_delays)); - WEBRTC_STUB(StartDebugRecording, (const char* fileNameUTF8)); - WEBRTC_STUB(StartDebugRecording, (FILE* handle)); - WEBRTC_STUB(StopDebugRecording, ()); - WEBRTC_FUNC(SetTypingDetectionStatus, (bool enable)) { - typing_detection_enabled_ = enable; - return 0; - } - WEBRTC_FUNC(GetTypingDetectionStatus, (bool& enabled)) { - enabled = typing_detection_enabled_; - return 0; - } - WEBRTC_STUB(TimeSinceLastTyping, (int& seconds)); - WEBRTC_STUB(SetTypingDetectionParameters, (int timeWindow, - int costPerTyping, - int reportingThreshold, - int penaltyDecay, - int typeEventDelay)); - int EnableHighPassFilter(bool enable) override { - highpass_filter_enabled_ = enable; - return 0; - } - bool IsHighPassFilterEnabled() override { - return highpass_filter_enabled_; - } - bool IsStereoChannelSwappingEnabled() override { - return stereo_swapping_enabled_; - } - void EnableStereoChannelSwapping(bool enable) override { - stereo_swapping_enabled_ = enable; - } - size_t GetNetEqCapacity() const { - auto ch = channels_.find(last_channel_); - RTC_DCHECK(ch != channels_.end()); - return ch->second->neteq_capacity; - } - bool GetNetEqFastAccelerate() const { - auto ch = channels_.find(last_channel_); - RTC_DCHECK(ch != channels_.end()); - return ch->second->neteq_fast_accelerate; - } - - private: - bool inited_ = false; - int last_channel_ = -1; - std::map channels_; - bool fail_create_channel_ = false; - bool ec_enabled_ = false; - bool ec_metrics_enabled_ = false; - bool cng_enabled_ = false; - bool ns_enabled_ = false; - bool agc_enabled_ = false; - bool highpass_filter_enabled_ = false; - bool stereo_swapping_enabled_ = false; - bool typing_detection_enabled_ = false; - webrtc::EcModes ec_mode_ = webrtc::kEcDefault; - webrtc::AecmModes aecm_mode_ = webrtc::kAecmSpeakerphone; - webrtc::NsModes ns_mode_ = webrtc::kNsDefault; - webrtc::AgcModes agc_mode_ = webrtc::kAgcDefault; - webrtc::AgcConfig agc_config_; - webrtc::AudioProcessing* apm_ = nullptr; - - RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(FakeWebRtcVoiceEngine); -}; - -} // namespace cricket - -#endif // WEBRTC_MEDIA_ENGINE_FAKEWEBRTCVOICEENGINE_H_ diff --git a/WebRtc.NET/include/webrtc/media/engine/internaldecoderfactory.h b/WebRtc.NET/include/webrtc/media/engine/internaldecoderfactory.h deleted file mode 100644 index 20ceecc1..00000000 --- a/WebRtc.NET/include/webrtc/media/engine/internaldecoderfactory.h +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MEDIA_ENGINE_INTERNALDECODERFACTORY_H_ -#define WEBRTC_MEDIA_ENGINE_INTERNALDECODERFACTORY_H_ - -#include - -#include "webrtc/media/engine/webrtcvideodecoderfactory.h" - -namespace cricket { - -class InternalDecoderFactory : public WebRtcVideoDecoderFactory { - public: - InternalDecoderFactory(); - virtual ~InternalDecoderFactory(); - - // WebRtcVideoDecoderFactory implementation. - webrtc::VideoDecoder* CreateVideoDecoder( - webrtc::VideoCodecType type) override; - - void DestroyVideoDecoder(webrtc::VideoDecoder* decoder) override; -}; - -} // namespace cricket - -#endif // WEBRTC_MEDIA_ENGINE_INTERNALDECODERFACTORY_H_ diff --git a/WebRtc.NET/include/webrtc/media/engine/internalencoderfactory.h b/WebRtc.NET/include/webrtc/media/engine/internalencoderfactory.h deleted file mode 100644 index 909fa0ff..00000000 --- a/WebRtc.NET/include/webrtc/media/engine/internalencoderfactory.h +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MEDIA_ENGINE_INTERNALENCODERFACTORY_H_ -#define WEBRTC_MEDIA_ENGINE_INTERNALENCODERFACTORY_H_ - -#include - -#include "webrtc/media/engine/webrtcvideoencoderfactory.h" - -namespace cricket { - -class InternalEncoderFactory : public WebRtcVideoEncoderFactory { - public: - InternalEncoderFactory(); - virtual ~InternalEncoderFactory(); - - // WebRtcVideoEncoderFactory implementation. - webrtc::VideoEncoder* CreateVideoEncoder( - const cricket::VideoCodec& codec) override; - const std::vector& supported_codecs() const override; - void DestroyVideoEncoder(webrtc::VideoEncoder* encoder) override; - - private: - // Disable overloaded virtual function warning. TODO(magjed): Remove once - // http://crbug/webrtc/6402 is fixed. - using WebRtcVideoEncoderFactory::CreateVideoEncoder; - - std::vector supported_codecs_; -}; - -} // namespace cricket - -#endif // WEBRTC_MEDIA_ENGINE_INTERNALENCODERFACTORY_H_ diff --git a/WebRtc.NET/include/webrtc/media/engine/nullwebrtcvideoengine.h b/WebRtc.NET/include/webrtc/media/engine/nullwebrtcvideoengine.h deleted file mode 100644 index 2fe87f4b..00000000 --- a/WebRtc.NET/include/webrtc/media/engine/nullwebrtcvideoengine.h +++ /dev/null @@ -1,65 +0,0 @@ -/* - * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MEDIA_ENGINE_NULLWEBRTCVIDEOENGINE_H_ -#define WEBRTC_MEDIA_ENGINE_NULLWEBRTCVIDEOENGINE_H_ - -#include - -#include "webrtc/media/base/mediachannel.h" -#include "webrtc/media/base/mediaengine.h" - -namespace webrtc { - -class Call; - -} // namespace webrtc - - -namespace cricket { - -class VideoMediaChannel; -class WebRtcVideoDecoderFactory; -class WebRtcVideoEncoderFactory; - -// Video engine implementation that does nothing and can be used in -// CompositeMediaEngine. -class NullWebRtcVideoEngine { - public: - NullWebRtcVideoEngine() {} - ~NullWebRtcVideoEngine() {} - - void SetExternalDecoderFactory(WebRtcVideoDecoderFactory* decoder_factory) {} - void SetExternalEncoderFactory(WebRtcVideoEncoderFactory* encoder_factory) {} - - void Init() {} - - const std::vector& codecs() { - return codecs_; - } - - RtpCapabilities GetCapabilities() { - RtpCapabilities capabilities; - return capabilities; - } - - VideoMediaChannel* CreateChannel(webrtc::Call* call, - const MediaConfig& config, - const VideoOptions& options) { - return nullptr; - } - - private: - std::vector codecs_; -}; - -} // namespace cricket - -#endif // WEBRTC_MEDIA_ENGINE_NULLWEBRTCVIDEOENGINE_H_ diff --git a/WebRtc.NET/include/webrtc/media/engine/payload_type_mapper.h b/WebRtc.NET/include/webrtc/media/engine/payload_type_mapper.h deleted file mode 100644 index 248aace1..00000000 --- a/WebRtc.NET/include/webrtc/media/engine/payload_type_mapper.h +++ /dev/null @@ -1,56 +0,0 @@ -/* - * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MEDIA_ENGINE_PAYLOAD_TYPE_MAPPER_H_ -#define WEBRTC_MEDIA_ENGINE_PAYLOAD_TYPE_MAPPER_H_ - -#include -#include - -#include "webrtc/base/optional.h" -#include "webrtc/media/base/codec.h" -#include "webrtc/modules/audio_coding/codecs/audio_format.h" - -namespace cricket { - -webrtc::SdpAudioFormat AudioCodecToSdpAudioFormat(const AudioCodec& ac); - -class PayloadTypeMapper { - public: - PayloadTypeMapper(); - ~PayloadTypeMapper(); - - // Finds the current payload type for |format| or assigns a new one, if no - // current mapping exists. Will return an empty value if it was unable to - // create a mapping, i.e. if all dynamic payload type ids have been used up. - rtc::Optional GetMappingFor(const webrtc::SdpAudioFormat& format); - - // Finds the current payload type for |format|, if any. Returns an empty value - // if no payload type mapping exists for the format. - rtc::Optional FindMappingFor(const webrtc::SdpAudioFormat& format) const; - - // Like GetMappingFor, but fills in an AudioCodec structure with the necessary - // information instead. - rtc::Optional ToAudioCodec(const webrtc::SdpAudioFormat& format); - - private: - struct SdpAudioFormatOrdering { - bool operator()(const webrtc::SdpAudioFormat& a, - const webrtc::SdpAudioFormat& b) const; - }; - - int next_unused_payload_type_; - int max_payload_type_; - std::map mappings_; - std::set used_payload_types_; -}; - -} // namespace cricket -#endif // WEBRTC_MEDIA_ENGINE_PAYLOAD_TYPE_MAPPER_H_ diff --git a/WebRtc.NET/include/webrtc/media/engine/simulcast.h b/WebRtc.NET/include/webrtc/media/engine/simulcast.h deleted file mode 100644 index 20be4c48..00000000 --- a/WebRtc.NET/include/webrtc/media/engine/simulcast.h +++ /dev/null @@ -1,57 +0,0 @@ -/* - * Copyright (c) 2014 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MEDIA_ENGINE_SIMULCAST_H_ -#define WEBRTC_MEDIA_ENGINE_SIMULCAST_H_ - -#include - -#include "webrtc/base/basictypes.h" -#include "webrtc/config.h" - -namespace cricket { -struct StreamParams; - -// Config for use with screen cast when temporal layers are enabled. -struct ScreenshareLayerConfig { - public: - ScreenshareLayerConfig(int tl0_bitrate, int tl1_bitrate); - - // Bitrates, for temporal layers 0 and 1. - int tl0_bitrate_kbps; - int tl1_bitrate_kbps; - - static ScreenshareLayerConfig GetDefault(); - - // Parse bitrate from group name on format "(tl0_bitrate)-(tl1_bitrate)", - // eg. "100-1000" for the default rates. - static bool FromFieldTrialGroup(const std::string& group, - ScreenshareLayerConfig* config); -}; - -// TODO(pthatcher): Write unit tests just for these functions, -// independent of WebrtcVideoEngine. - -int GetTotalMaxBitrateBps(const std::vector& streams); - -// Get the ssrcs of the SIM group from the stream params. -void GetSimulcastSsrcs(const StreamParams& sp, std::vector* ssrcs); - -// Get simulcast settings. -std::vector GetSimulcastConfig(size_t max_streams, - int width, - int height, - int max_bitrate_bps, - int max_qp, - int max_framerate); - -} // namespace cricket - -#endif // WEBRTC_MEDIA_ENGINE_SIMULCAST_H_ diff --git a/WebRtc.NET/include/webrtc/media/engine/videodecodersoftwarefallbackwrapper.h b/WebRtc.NET/include/webrtc/media/engine/videodecodersoftwarefallbackwrapper.h deleted file mode 100644 index 93c9278a..00000000 --- a/WebRtc.NET/include/webrtc/media/engine/videodecodersoftwarefallbackwrapper.h +++ /dev/null @@ -1,61 +0,0 @@ -/* - * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MEDIA_ENGINE_VIDEODECODERSOFTWAREFALLBACKWRAPPER_H_ -#define WEBRTC_MEDIA_ENGINE_VIDEODECODERSOFTWAREFALLBACKWRAPPER_H_ - -#include -#include - -#include "webrtc/video_decoder.h" - -namespace webrtc { - -// Class used to wrap external VideoDecoders to provide a fallback option on -// software decoding when a hardware decoder fails to decode a stream due to -// hardware restrictions, such as max resolution. -class VideoDecoderSoftwareFallbackWrapper : public webrtc::VideoDecoder { - public: - VideoDecoderSoftwareFallbackWrapper(VideoCodecType codec_type, - VideoDecoder* decoder); - - int32_t InitDecode(const VideoCodec* codec_settings, - int32_t number_of_cores) override; - - int32_t Decode(const EncodedImage& input_image, - bool missing_frames, - const RTPFragmentationHeader* fragmentation, - const CodecSpecificInfo* codec_specific_info, - int64_t render_time_ms) override; - - int32_t RegisterDecodeCompleteCallback( - DecodedImageCallback* callback) override; - - int32_t Release() override; - bool PrefersLateDecoding() const override; - - const char* ImplementationName() const override; - - private: - bool InitFallbackDecoder(); - - const VideoCodecType codec_type_; - VideoDecoder* const decoder_; - - VideoCodec codec_settings_; - int32_t number_of_cores_; - std::string fallback_implementation_name_; - std::unique_ptr fallback_decoder_; - DecodedImageCallback* callback_; -}; - -} // namespace webrtc - -#endif // WEBRTC_MEDIA_ENGINE_VIDEODECODERSOFTWAREFALLBACKWRAPPER_H_ diff --git a/WebRtc.NET/include/webrtc/media/engine/videoencodersoftwarefallbackwrapper.h b/WebRtc.NET/include/webrtc/media/engine/videoencodersoftwarefallbackwrapper.h deleted file mode 100644 index 3d53090a..00000000 --- a/WebRtc.NET/include/webrtc/media/engine/videoencodersoftwarefallbackwrapper.h +++ /dev/null @@ -1,77 +0,0 @@ -/* - * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MEDIA_ENGINE_VIDEOENCODERSOFTWAREFALLBACKWRAPPER_H_ -#define WEBRTC_MEDIA_ENGINE_VIDEOENCODERSOFTWAREFALLBACKWRAPPER_H_ - -#include -#include -#include - -#include "webrtc/media/base/codec.h" -#include "webrtc/video_encoder.h" - -namespace webrtc { - -// Class used to wrap external VideoEncoders to provide a fallback option on -// software encoding when a hardware encoder fails to encode a stream due to -// hardware restrictions, such as max resolution. -class VideoEncoderSoftwareFallbackWrapper : public VideoEncoder { - public: - VideoEncoderSoftwareFallbackWrapper(const cricket::VideoCodec& codec, - webrtc::VideoEncoder* encoder); - - int32_t InitEncode(const VideoCodec* codec_settings, - int32_t number_of_cores, - size_t max_payload_size) override; - - int32_t RegisterEncodeCompleteCallback( - EncodedImageCallback* callback) override; - - int32_t Release() override; - int32_t Encode(const VideoFrame& frame, - const CodecSpecificInfo* codec_specific_info, - const std::vector* frame_types) override; - int32_t SetChannelParameters(uint32_t packet_loss, int64_t rtt) override; - int32_t SetRateAllocation(const BitrateAllocation& bitrate_allocation, - uint32_t framerate) override; - bool SupportsNativeHandle() const override; - ScalingSettings GetScalingSettings() const override; - - private: - bool InitFallbackEncoder(); - - // Settings used in the last InitEncode call and used if a dynamic fallback to - // software is required. - VideoCodec codec_settings_; - int32_t number_of_cores_; - size_t max_payload_size_; - - // The last bitrate/framerate set, and a flag for noting they are set. - bool rates_set_; - BitrateAllocation bitrate_allocation_; - uint32_t framerate_; - - // The last channel parameters set, and a flag for noting they are set. - bool channel_parameters_set_; - uint32_t packet_loss_; - int64_t rtt_; - - const cricket::VideoCodec codec_; - webrtc::VideoEncoder* const encoder_; - - std::unique_ptr fallback_encoder_; - std::string fallback_implementation_name_; - EncodedImageCallback* callback_; -}; - -} // namespace webrtc - -#endif // WEBRTC_MEDIA_ENGINE_VIDEOENCODERSOFTWAREFALLBACKWRAPPER_H_ diff --git a/WebRtc.NET/include/webrtc/media/engine/webrtccommon.h b/WebRtc.NET/include/webrtc/media/engine/webrtccommon.h deleted file mode 100644 index 21fc1924..00000000 --- a/WebRtc.NET/include/webrtc/media/engine/webrtccommon.h +++ /dev/null @@ -1,58 +0,0 @@ -/* - * Copyright (c) 2004 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MEDIA_ENGINE_WEBRTCCOMMON_H_ -#define WEBRTC_MEDIA_ENGINE_WEBRTCCOMMON_H_ - -#include "webrtc/common_types.h" - -namespace cricket { - -// Tracing helpers, for easy logging when WebRTC calls fail. -// Example: "LOG_RTCERR1(StartSend, channel);" produces the trace -// "StartSend(1) failed, err=XXXX" -// The method GetLastEngineError must be defined in the calling scope. -#define LOG_RTCERR0(func) \ - LOG_RTCERR0_EX(func, GetLastEngineError()) -#define LOG_RTCERR1(func, a1) \ - LOG_RTCERR1_EX(func, a1, GetLastEngineError()) -#define LOG_RTCERR2(func, a1, a2) \ - LOG_RTCERR2_EX(func, a1, a2, GetLastEngineError()) -#define LOG_RTCERR3(func, a1, a2, a3) \ - LOG_RTCERR3_EX(func, a1, a2, a3, GetLastEngineError()) -#define LOG_RTCERR4(func, a1, a2, a3, a4) \ - LOG_RTCERR4_EX(func, a1, a2, a3, a4, GetLastEngineError()) -#define LOG_RTCERR5(func, a1, a2, a3, a4, a5) \ - LOG_RTCERR5_EX(func, a1, a2, a3, a4, a5, GetLastEngineError()) -#define LOG_RTCERR6(func, a1, a2, a3, a4, a5, a6) \ - LOG_RTCERR6_EX(func, a1, a2, a3, a4, a5, a6, GetLastEngineError()) -#define LOG_RTCERR0_EX(func, err) LOG(LS_WARNING) \ - << "" << #func << "() failed, err=" << err -#define LOG_RTCERR1_EX(func, a1, err) LOG(LS_WARNING) \ - << "" << #func << "(" << a1 << ") failed, err=" << err -#define LOG_RTCERR2_EX(func, a1, a2, err) LOG(LS_WARNING) \ - << "" << #func << "(" << a1 << ", " << a2 << ") failed, err=" \ - << err -#define LOG_RTCERR3_EX(func, a1, a2, a3, err) LOG(LS_WARNING) \ - << "" << #func << "(" << a1 << ", " << a2 << ", " << a3 \ - << ") failed, err=" << err -#define LOG_RTCERR4_EX(func, a1, a2, a3, a4, err) LOG(LS_WARNING) \ - << "" << #func << "(" << a1 << ", " << a2 << ", " << a3 \ - << ", " << a4 << ") failed, err=" << err -#define LOG_RTCERR5_EX(func, a1, a2, a3, a4, a5, err) LOG(LS_WARNING) \ - << "" << #func << "(" << a1 << ", " << a2 << ", " << a3 \ - << ", " << a4 << ", " << a5 << ") failed, err=" << err -#define LOG_RTCERR6_EX(func, a1, a2, a3, a4, a5, a6, err) LOG(LS_WARNING) \ - << "" << #func << "(" << a1 << ", " << a2 << ", " << a3 \ - << ", " << a4 << ", " << a5 << ", " << a6 << ") failed, err=" << err - -} // namespace cricket - -#endif // WEBRTC_MEDIA_ENGINE_WEBRTCCOMMON_H_ diff --git a/WebRtc.NET/include/webrtc/media/engine/webrtcmediaengine.h b/WebRtc.NET/include/webrtc/media/engine/webrtcmediaengine.h deleted file mode 100644 index 17e79c6c..00000000 --- a/WebRtc.NET/include/webrtc/media/engine/webrtcmediaengine.h +++ /dev/null @@ -1,76 +0,0 @@ -/* - * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MEDIA_ENGINE_WEBRTCMEDIAENGINE_H_ -#define WEBRTC_MEDIA_ENGINE_WEBRTCMEDIAENGINE_H_ - -#include -#include - -#include "webrtc/call/call.h" -#include "webrtc/config.h" -#include "webrtc/media/base/mediaengine.h" - -namespace webrtc { -class AudioDecoderFactory; -class AudioDeviceModule; -class AudioMixer; -} -namespace cricket { -class WebRtcVideoDecoderFactory; -class WebRtcVideoEncoderFactory; -} - -namespace cricket { - -class WebRtcMediaEngineFactory { - public: - // TODO(ossu): Backwards-compatible interface. Will be deprecated once the - // audio decoder factory is fully plumbed and used throughout WebRTC. - // See: crbug.com/webrtc/6000 - static MediaEngineInterface* Create( - webrtc::AudioDeviceModule* adm, - WebRtcVideoEncoderFactory* video_encoder_factory, - WebRtcVideoDecoderFactory* video_decoder_factory); - - static MediaEngineInterface* Create( - webrtc::AudioDeviceModule* adm, - const rtc::scoped_refptr& - audio_decoder_factory, - WebRtcVideoEncoderFactory* video_encoder_factory, - WebRtcVideoDecoderFactory* video_decoder_factory); - - static MediaEngineInterface* Create( - webrtc::AudioDeviceModule* adm, - const rtc::scoped_refptr& - audio_decoder_factory, - WebRtcVideoEncoderFactory* video_encoder_factory, - WebRtcVideoDecoderFactory* video_decoder_factory, - rtc::scoped_refptr audio_mixer); -}; - -// Verify that extension IDs are within 1-byte extension range and are not -// overlapping. -bool ValidateRtpExtensions(const std::vector& extensions); - -// Discard any extensions not validated by the 'supported' predicate. Duplicate -// extensions are removed if 'filter_redundant_extensions' is set, and also any -// mutually exclusive extensions (see implementation for details) are removed. -std::vector FilterRtpExtensions( - const std::vector& extensions, - bool (*supported)(const std::string&), - bool filter_redundant_extensions); - -webrtc::Call::Config::BitrateConfig GetBitrateConfigForCodec( - const Codec& codec); - -} // namespace cricket - -#endif // WEBRTC_MEDIA_ENGINE_WEBRTCMEDIAENGINE_H_ diff --git a/WebRtc.NET/include/webrtc/media/engine/webrtcvideocapturerfactory.h b/WebRtc.NET/include/webrtc/media/engine/webrtcvideocapturerfactory.h deleted file mode 100644 index 128ef9d8..00000000 --- a/WebRtc.NET/include/webrtc/media/engine/webrtcvideocapturerfactory.h +++ /dev/null @@ -1,27 +0,0 @@ -/* - * Copyright (c) 2014 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -// TODO(pthatcher): Rename file to match class name. -#ifndef WEBRTC_MEDIA_ENGINE_WEBRTCVIDEOCAPTURERFACTORY_H_ -#define WEBRTC_MEDIA_ENGINE_WEBRTCVIDEOCAPTURERFACTORY_H_ - -#include "webrtc/media/base/videocapturerfactory.h" - -namespace cricket { - -// Creates instances of cricket::WebRtcVideoCapturer. -class WebRtcVideoDeviceCapturerFactory : public VideoDeviceCapturerFactory { - public: - virtual VideoCapturer* Create(const Device& device); -}; - -} // namespace cricket - -#endif // WEBRTC_MEDIA_ENGINE_WEBRTCVIDEOCAPTURERFACTORY_H_ diff --git a/WebRtc.NET/include/webrtc/media/engine/webrtcvideodecoderfactory.h b/WebRtc.NET/include/webrtc/media/engine/webrtcvideodecoderfactory.h deleted file mode 100644 index 7f0921fd..00000000 --- a/WebRtc.NET/include/webrtc/media/engine/webrtcvideodecoderfactory.h +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MEDIA_ENGINE_WEBRTCVIDEODECODERFACTORY_H_ -#define WEBRTC_MEDIA_ENGINE_WEBRTCVIDEODECODERFACTORY_H_ - -#include "webrtc/base/refcount.h" -#include "webrtc/common_types.h" - -namespace webrtc { -class VideoDecoder; -} - -namespace cricket { - -struct VideoDecoderParams { - std::string receive_stream_id; -}; - -class WebRtcVideoDecoderFactory { - public: - // Caller takes the ownership of the returned object and it should be released - // by calling DestroyVideoDecoder(). - virtual webrtc::VideoDecoder* CreateVideoDecoder( - webrtc::VideoCodecType type) = 0; - virtual webrtc::VideoDecoder* CreateVideoDecoderWithParams( - webrtc::VideoCodecType type, - VideoDecoderParams params) { - return CreateVideoDecoder(type); - } - virtual ~WebRtcVideoDecoderFactory() {} - - virtual void DestroyVideoDecoder(webrtc::VideoDecoder* decoder) = 0; -}; - -} // namespace cricket - -#endif // WEBRTC_MEDIA_ENGINE_WEBRTCVIDEODECODERFACTORY_H_ diff --git a/WebRtc.NET/include/webrtc/media/engine/webrtcvideoencoderfactory.h b/WebRtc.NET/include/webrtc/media/engine/webrtcvideoencoderfactory.h deleted file mode 100644 index 35e40920..00000000 --- a/WebRtc.NET/include/webrtc/media/engine/webrtcvideoencoderfactory.h +++ /dev/null @@ -1,89 +0,0 @@ -/* - * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MEDIA_ENGINE_WEBRTCVIDEOENCODERFACTORY_H_ -#define WEBRTC_MEDIA_ENGINE_WEBRTCVIDEOENCODERFACTORY_H_ - -#include - -#include "webrtc/common_types.h" -#include "webrtc/media/base/codec.h" - -namespace webrtc { -class VideoEncoder; -} - -namespace cricket { - -class WebRtcVideoEncoderFactory { - public: - // This VideoCodec class is deprecated. Use cricket::VideoCodec directly - // instead and the corresponding factory function. See - // http://crbug/webrtc/6402 for more info. - struct VideoCodec { - webrtc::VideoCodecType type; - std::string name; - - VideoCodec(webrtc::VideoCodecType t, const std::string& nm) - : type(t), name(nm) {} - - VideoCodec(webrtc::VideoCodecType t, - const std::string& nm, - int w, - int h, - int fr) - : type(t), name(nm) {} - }; - - virtual ~WebRtcVideoEncoderFactory() {} - - // TODO(magjed): Make these functions pure virtual when every external client - // implements it. See http://crbug/webrtc/6402 for more info. - // Caller takes the ownership of the returned object and it should be released - // by calling DestroyVideoEncoder(). - virtual webrtc::VideoEncoder* CreateVideoEncoder( - const cricket::VideoCodec& codec); - - // Returns a list of supported codecs in order of preference. - virtual const std::vector& supported_codecs() const; - - // Caller takes the ownership of the returned object and it should be released - // by calling DestroyVideoEncoder(). - // Deprecated: Use cricket::VideoCodec as argument instead. See - // http://crbug/webrtc/6402 for more info. - virtual webrtc::VideoEncoder* CreateVideoEncoder(webrtc::VideoCodecType type); - - // Returns a list of supported codecs in order of preference. - // Deprecated: Return cricket::VideoCodecs instead. See - // http://crbug/webrtc/6402 for more info. - virtual const std::vector& codecs() const; - - // Returns true if encoders created by this factory of the given codec type - // will use internal camera sources, meaning that they don't require/expect - // frames to be delivered via webrtc::VideoEncoder::Encode. This flag is used - // as the internal_source parameter to - // webrtc::ViEExternalCodec::RegisterExternalSendCodec. - virtual bool EncoderTypeHasInternalSource(webrtc::VideoCodecType type) const { - return false; - } - - virtual void DestroyVideoEncoder(webrtc::VideoEncoder* encoder) = 0; - - private: - // TODO(magjed): Remove these. They are necessary in order to return a const - // reference to a std::vector in the default implementations of codecs() and - // supported_codecs(). See http://crbug/webrtc/6402 for more info. - mutable std::vector encoder_codecs_; - mutable std::vector codecs_; -}; - -} // namespace cricket - -#endif // WEBRTC_MEDIA_ENGINE_WEBRTCVIDEOENCODERFACTORY_H_ diff --git a/WebRtc.NET/include/webrtc/media/engine/webrtcvideoengine2.h b/WebRtc.NET/include/webrtc/media/engine/webrtcvideoengine2.h deleted file mode 100644 index 2ee9bc79..00000000 --- a/WebRtc.NET/include/webrtc/media/engine/webrtcvideoengine2.h +++ /dev/null @@ -1,497 +0,0 @@ -/* - * Copyright (c) 2014 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MEDIA_ENGINE_WEBRTCVIDEOENGINE2_H_ -#define WEBRTC_MEDIA_ENGINE_WEBRTCVIDEOENGINE2_H_ - -#include -#include -#include -#include -#include - -#include "webrtc/api/call/transport.h" -#include "webrtc/api/video/video_frame.h" -#include "webrtc/base/asyncinvoker.h" -#include "webrtc/base/criticalsection.h" -#include "webrtc/base/networkroute.h" -#include "webrtc/base/thread_annotations.h" -#include "webrtc/base/thread_checker.h" -#include "webrtc/media/base/videosinkinterface.h" -#include "webrtc/media/base/videosourceinterface.h" -#include "webrtc/call/call.h" -#include "webrtc/call/flexfec_receive_stream.h" -#include "webrtc/media/base/mediaengine.h" -#include "webrtc/media/engine/webrtcvideodecoderfactory.h" -#include "webrtc/media/engine/webrtcvideoencoderfactory.h" -#include "webrtc/video_receive_stream.h" -#include "webrtc/video_send_stream.h" - -namespace webrtc { -class VideoDecoder; -class VideoEncoder; -struct MediaConfig; -} - -namespace rtc { -class Thread; -} // namespace rtc - -namespace cricket { - -class VideoCapturer; -class VideoProcessor; -class VideoRenderer; -class VoiceMediaChannel; -class WebRtcDecoderObserver; -class WebRtcEncoderObserver; -class WebRtcLocalStreamInfo; -class WebRtcRenderAdapter; -class WebRtcVideoChannel2; -class WebRtcVideoChannelRecvInfo; -class WebRtcVideoChannelSendInfo; -class WebRtcVoiceEngine; -class WebRtcVoiceMediaChannel; - -struct Device; - -class UnsignalledSsrcHandler { - public: - enum Action { - kDropPacket, - kDeliverPacket, - }; - virtual Action OnUnsignalledSsrc(WebRtcVideoChannel2* channel, - uint32_t ssrc) = 0; - virtual ~UnsignalledSsrcHandler() = default; -}; - -// TODO(pbos): Remove, use external handlers only. -class DefaultUnsignalledSsrcHandler : public UnsignalledSsrcHandler { - public: - DefaultUnsignalledSsrcHandler(); - Action OnUnsignalledSsrc(WebRtcVideoChannel2* channel, - uint32_t ssrc) override; - - rtc::VideoSinkInterface* GetDefaultSink() const; - void SetDefaultSink(VideoMediaChannel* channel, - rtc::VideoSinkInterface* sink); - virtual ~DefaultUnsignalledSsrcHandler() = default; - - private: - uint32_t default_recv_ssrc_; - rtc::VideoSinkInterface* default_sink_; -}; - -// WebRtcVideoEngine2 is used for the new native WebRTC Video API (webrtc:1667). -class WebRtcVideoEngine2 { - public: - WebRtcVideoEngine2(); - virtual ~WebRtcVideoEngine2(); - - // Basic video engine implementation. - void Init(); - - WebRtcVideoChannel2* CreateChannel(webrtc::Call* call, - const MediaConfig& config, - const VideoOptions& options); - - std::vector codecs() const; - RtpCapabilities GetCapabilities() const; - - // Set a WebRtcVideoDecoderFactory for external decoding. Video engine does - // not take the ownership of |decoder_factory|. The caller needs to make sure - // that |decoder_factory| outlives the video engine. - void SetExternalDecoderFactory(WebRtcVideoDecoderFactory* decoder_factory); - // Set a WebRtcVideoEncoderFactory for external encoding. Video engine does - // not take the ownership of |encoder_factory|. The caller needs to make sure - // that |encoder_factory| outlives the video engine. - virtual void SetExternalEncoderFactory( - WebRtcVideoEncoderFactory* encoder_factory); - - private: - bool initialized_; - - WebRtcVideoDecoderFactory* external_decoder_factory_; - WebRtcVideoEncoderFactory* external_encoder_factory_; - std::unique_ptr simulcast_encoder_factory_; -}; - -class WebRtcVideoChannel2 : public VideoMediaChannel, public webrtc::Transport { - public: - WebRtcVideoChannel2(webrtc::Call* call, - const MediaConfig& config, - const VideoOptions& options, - WebRtcVideoEncoderFactory* external_encoder_factory, - WebRtcVideoDecoderFactory* external_decoder_factory); - ~WebRtcVideoChannel2() override; - - // VideoMediaChannel implementation - rtc::DiffServCodePoint PreferredDscp() const override; - - bool SetSendParameters(const VideoSendParameters& params) override; - bool SetRecvParameters(const VideoRecvParameters& params) override; - webrtc::RtpParameters GetRtpSendParameters(uint32_t ssrc) const override; - bool SetRtpSendParameters(uint32_t ssrc, - const webrtc::RtpParameters& parameters) override; - webrtc::RtpParameters GetRtpReceiveParameters(uint32_t ssrc) const override; - bool SetRtpReceiveParameters( - uint32_t ssrc, - const webrtc::RtpParameters& parameters) override; - bool GetSendCodec(VideoCodec* send_codec) override; - bool SetSend(bool send) override; - bool SetVideoSend( - uint32_t ssrc, - bool enable, - const VideoOptions* options, - rtc::VideoSourceInterface* source) override; - bool AddSendStream(const StreamParams& sp) override; - bool RemoveSendStream(uint32_t ssrc) override; - bool AddRecvStream(const StreamParams& sp) override; - bool AddRecvStream(const StreamParams& sp, bool default_stream); - bool RemoveRecvStream(uint32_t ssrc) override; - bool SetSink(uint32_t ssrc, - rtc::VideoSinkInterface* sink) override; - bool GetStats(VideoMediaInfo* info) override; - - void OnPacketReceived(rtc::CopyOnWriteBuffer* packet, - const rtc::PacketTime& packet_time) override; - void OnRtcpReceived(rtc::CopyOnWriteBuffer* packet, - const rtc::PacketTime& packet_time) override; - void OnReadyToSend(bool ready) override; - void OnNetworkRouteChanged(const std::string& transport_name, - const rtc::NetworkRoute& network_route) override; - void OnTransportOverheadChanged(int transport_overhead_per_packet) override; - void SetInterface(NetworkInterface* iface) override; - - // Implemented for VideoMediaChannelTest. - bool sending() const { return sending_; } - - // AdaptReason is used for expressing why a WebRtcVideoSendStream request - // a lower input frame size than the currently configured camera input frame - // size. There can be more than one reason OR:ed together. - enum AdaptReason { - ADAPTREASON_NONE = 0, - ADAPTREASON_CPU = 1, - ADAPTREASON_BANDWIDTH = 2, - }; - - private: - class WebRtcVideoReceiveStream; - struct VideoCodecSettings { - VideoCodecSettings(); - - bool operator==(const VideoCodecSettings& other) const; - bool operator!=(const VideoCodecSettings& other) const; - - VideoCodec codec; - webrtc::UlpfecConfig ulpfec; - int flexfec_payload_type; - int rtx_payload_type; - }; - - struct ChangedSendParameters { - // These optionals are unset if not changed. - rtc::Optional codec; - rtc::Optional> rtp_header_extensions; - rtc::Optional max_bandwidth_bps; - rtc::Optional conference_mode; - rtc::Optional rtcp_mode; - }; - - struct ChangedRecvParameters { - // These optionals are unset if not changed. - rtc::Optional> codec_settings; - rtc::Optional> rtp_header_extensions; - }; - - bool GetChangedSendParameters(const VideoSendParameters& params, - ChangedSendParameters* changed_params) const; - bool GetChangedRecvParameters(const VideoRecvParameters& params, - ChangedRecvParameters* changed_params) const; - - void SetMaxSendBandwidth(int bps); - - void ConfigureReceiverRtp( - webrtc::VideoReceiveStream::Config* config, - webrtc::FlexfecReceiveStream::Config* flexfec_config, - const StreamParams& sp) const; - bool ValidateSendSsrcAvailability(const StreamParams& sp) const - EXCLUSIVE_LOCKS_REQUIRED(stream_crit_); - bool ValidateReceiveSsrcAvailability(const StreamParams& sp) const - EXCLUSIVE_LOCKS_REQUIRED(stream_crit_); - void DeleteReceiveStream(WebRtcVideoReceiveStream* stream) - EXCLUSIVE_LOCKS_REQUIRED(stream_crit_); - - static std::string CodecSettingsVectorToString( - const std::vector& codecs); - - // Wrapper for the sender part. - class WebRtcVideoSendStream - : public rtc::VideoSourceInterface { - public: - WebRtcVideoSendStream( - webrtc::Call* call, - const StreamParams& sp, - webrtc::VideoSendStream::Config config, - const VideoOptions& options, - WebRtcVideoEncoderFactory* external_encoder_factory, - bool enable_cpu_overuse_detection, - int max_bitrate_bps, - const rtc::Optional& codec_settings, - const rtc::Optional>& rtp_extensions, - const VideoSendParameters& send_params); - virtual ~WebRtcVideoSendStream(); - - void SetSendParameters(const ChangedSendParameters& send_params); - bool SetRtpParameters(const webrtc::RtpParameters& parameters); - webrtc::RtpParameters GetRtpParameters() const; - - // Implements rtc::VideoSourceInterface. - // WebRtcVideoSendStream acts as a source to the webrtc::VideoSendStream - // in |stream_|. This is done to proxy VideoSinkWants from the encoder to - // the worker thread. - void AddOrUpdateSink(rtc::VideoSinkInterface* sink, - const rtc::VideoSinkWants& wants) override; - void RemoveSink(rtc::VideoSinkInterface* sink) override; - - bool SetVideoSend(bool mute, - const VideoOptions* options, - rtc::VideoSourceInterface* source); - - void SetSend(bool send); - - const std::vector& GetSsrcs() const; - VideoSenderInfo GetVideoSenderInfo(bool log_stats); - void FillBandwidthEstimationInfo(BandwidthEstimationInfo* bwe_info); - - private: - // Parameters needed to reconstruct the underlying stream. - // webrtc::VideoSendStream doesn't support setting a lot of options on the - // fly, so when those need to be changed we tear down and reconstruct with - // similar parameters depending on which options changed etc. - struct VideoSendStreamParameters { - VideoSendStreamParameters( - webrtc::VideoSendStream::Config config, - const VideoOptions& options, - int max_bitrate_bps, - const rtc::Optional& codec_settings); - webrtc::VideoSendStream::Config config; - VideoOptions options; - int max_bitrate_bps; - bool conference_mode; - rtc::Optional codec_settings; - // Sent resolutions + bitrates etc. by the underlying VideoSendStream, - // typically changes when setting a new resolution or reconfiguring - // bitrates. - webrtc::VideoEncoderConfig encoder_config; - }; - - struct AllocatedEncoder { - AllocatedEncoder(webrtc::VideoEncoder* encoder, - const cricket::VideoCodec& codec, - bool external); - webrtc::VideoEncoder* encoder; - webrtc::VideoEncoder* external_encoder; - cricket::VideoCodec codec; - bool external; - }; - - rtc::scoped_refptr - ConfigureVideoEncoderSettings(const VideoCodec& codec); - AllocatedEncoder CreateVideoEncoder(const VideoCodec& codec); - void DestroyVideoEncoder(AllocatedEncoder* encoder); - void SetCodec(const VideoCodecSettings& codec); - void RecreateWebRtcStream(); - webrtc::VideoEncoderConfig CreateVideoEncoderConfig( - const VideoCodec& codec) const; - void ReconfigureEncoder(); - bool ValidateRtpParameters(const webrtc::RtpParameters& parameters); - - // Calls Start or Stop according to whether or not |sending_| is true, - // and whether or not the encoding in |rtp_parameters_| is active. - void UpdateSendState(); - - rtc::ThreadChecker thread_checker_; - rtc::AsyncInvoker invoker_; - rtc::Thread* worker_thread_; - const std::vector ssrcs_ ACCESS_ON(&thread_checker_); - const std::vector ssrc_groups_ ACCESS_ON(&thread_checker_); - webrtc::Call* const call_; - const bool enable_cpu_overuse_detection_; - rtc::VideoSourceInterface* source_ - ACCESS_ON(&thread_checker_); - WebRtcVideoEncoderFactory* const external_encoder_factory_ - ACCESS_ON(&thread_checker_); - - webrtc::VideoSendStream* stream_ ACCESS_ON(&thread_checker_); - rtc::VideoSinkInterface* encoder_sink_ - ACCESS_ON(&thread_checker_); - // Contains settings that are the same for all streams in the MediaChannel, - // such as codecs, header extensions, and the global bitrate limit for the - // entire channel. - VideoSendStreamParameters parameters_ ACCESS_ON(&thread_checker_); - // Contains settings that are unique for each stream, such as max_bitrate. - // Does *not* contain codecs, however. - // TODO(skvlad): Move ssrcs_ and ssrc_groups_ into rtp_parameters_. - // TODO(skvlad): Combine parameters_ and rtp_parameters_ once we have only - // one stream per MediaChannel. - webrtc::RtpParameters rtp_parameters_ ACCESS_ON(&thread_checker_); - AllocatedEncoder allocated_encoder_ ACCESS_ON(&thread_checker_); - - bool sending_ ACCESS_ON(&thread_checker_); - }; - - // Wrapper for the receiver part, contains configs etc. that are needed to - // reconstruct the underlying VideoReceiveStream. - class WebRtcVideoReceiveStream - : public rtc::VideoSinkInterface { - public: - WebRtcVideoReceiveStream( - webrtc::Call* call, - const StreamParams& sp, - webrtc::VideoReceiveStream::Config config, - WebRtcVideoDecoderFactory* external_decoder_factory, - bool default_stream, - const std::vector& recv_codecs, - const webrtc::FlexfecReceiveStream::Config& flexfec_config); - ~WebRtcVideoReceiveStream(); - - const std::vector& GetSsrcs() const; - rtc::Optional GetFirstPrimarySsrc() const; - - void SetLocalSsrc(uint32_t local_ssrc); - // TODO(deadbeef): Move these feedback parameters into the recv parameters. - void SetFeedbackParameters(bool nack_enabled, - bool remb_enabled, - bool transport_cc_enabled, - webrtc::RtcpMode rtcp_mode); - void SetRecvParameters(const ChangedRecvParameters& recv_params); - - void OnFrame(const webrtc::VideoFrame& frame) override; - bool IsDefaultStream() const; - - void SetSink(rtc::VideoSinkInterface* sink); - - VideoReceiverInfo GetVideoReceiverInfo(bool log_stats); - - private: - struct AllocatedDecoder { - AllocatedDecoder(webrtc::VideoDecoder* decoder, - webrtc::VideoCodecType type, - bool external); - webrtc::VideoDecoder* decoder; - // Decoder wrapped into a fallback decoder to permit software fallback. - webrtc::VideoDecoder* external_decoder; - webrtc::VideoCodecType type; - bool external; - }; - - void RecreateWebRtcStream(); - - void ConfigureCodecs(const std::vector& recv_codecs, - std::vector* old_codecs); - AllocatedDecoder CreateOrReuseVideoDecoder( - std::vector* old_decoder, - const VideoCodec& codec); - void ClearDecoders(std::vector* allocated_decoders); - - std::string GetCodecNameFromPayloadType(int payload_type); - - webrtc::Call* const call_; - StreamParams stream_params_; - - // Both |stream_| and |flexfec_stream_| are managed by |this|. They are - // destroyed by calling call_->DestroyVideoReceiveStream and - // call_->DestroyFlexfecReceiveStream, respectively. - webrtc::VideoReceiveStream* stream_; - const bool default_stream_; - webrtc::VideoReceiveStream::Config config_; - webrtc::FlexfecReceiveStream::Config flexfec_config_; - webrtc::FlexfecReceiveStream* flexfec_stream_; - - WebRtcVideoDecoderFactory* const external_decoder_factory_; - std::vector allocated_decoders_; - - rtc::CriticalSection sink_lock_; - rtc::VideoSinkInterface* sink_ GUARDED_BY(sink_lock_); - // Expands remote RTP timestamps to int64_t to be able to estimate how long - // the stream has been running. - rtc::TimestampWrapAroundHandler timestamp_wraparound_handler_ - GUARDED_BY(sink_lock_); - int64_t first_frame_timestamp_ GUARDED_BY(sink_lock_); - // Start NTP time is estimated as current remote NTP time (estimated from - // RTCP) minus the elapsed time, as soon as remote NTP time is available. - int64_t estimated_remote_start_ntp_time_ms_ GUARDED_BY(sink_lock_); - }; - - void Construct(webrtc::Call* call, WebRtcVideoEngine2* engine); - - bool SendRtp(const uint8_t* data, - size_t len, - const webrtc::PacketOptions& options) override; - bool SendRtcp(const uint8_t* data, size_t len) override; - - static std::vector MapCodecs( - const std::vector& codecs); - // Select what video codec will be used for sending, i.e. what codec is used - // for local encoding, based on supported remote codecs. The first remote - // codec that is supported locally will be selected. - rtc::Optional SelectSendVideoCodec( - const std::vector& remote_mapped_codecs) const; - - static bool ReceiveCodecsHaveChanged(std::vector before, - std::vector after); - - void FillSenderStats(VideoMediaInfo* info, bool log_stats); - void FillReceiverStats(VideoMediaInfo* info, bool log_stats); - void FillBandwidthEstimationStats(const webrtc::Call::Stats& stats, - VideoMediaInfo* info); - void FillSendAndReceiveCodecStats(VideoMediaInfo* video_media_info); - - rtc::ThreadChecker thread_checker_; - - uint32_t rtcp_receiver_report_ssrc_; - bool sending_; - webrtc::Call* const call_; - - DefaultUnsignalledSsrcHandler default_unsignalled_ssrc_handler_; - UnsignalledSsrcHandler* const unsignalled_ssrc_handler_; - - const MediaConfig::Video video_config_; - - rtc::CriticalSection stream_crit_; - // Using primary-ssrc (first ssrc) as key. - std::map send_streams_ - GUARDED_BY(stream_crit_); - std::map receive_streams_ - GUARDED_BY(stream_crit_); - std::set send_ssrcs_ GUARDED_BY(stream_crit_); - std::set receive_ssrcs_ GUARDED_BY(stream_crit_); - - rtc::Optional send_codec_; - rtc::Optional> send_rtp_extensions_; - - WebRtcVideoEncoderFactory* const external_encoder_factory_; - WebRtcVideoDecoderFactory* const external_decoder_factory_; - std::vector recv_codecs_; - std::vector recv_rtp_extensions_; - webrtc::Call::Config::BitrateConfig bitrate_config_; - // TODO(deadbeef): Don't duplicate information between - // send_params/recv_params, rtp_extensions, options, etc. - VideoSendParameters send_params_; - VideoOptions default_send_options_; - VideoRecvParameters recv_params_; - int64_t last_stats_log_ms_; -}; - -} // namespace cricket - -#endif // WEBRTC_MEDIA_ENGINE_WEBRTCVIDEOENGINE2_H_ diff --git a/WebRtc.NET/include/webrtc/media/engine/webrtcvideoframe.h b/WebRtc.NET/include/webrtc/media/engine/webrtcvideoframe.h deleted file mode 100644 index d8369053..00000000 --- a/WebRtc.NET/include/webrtc/media/engine/webrtcvideoframe.h +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -// TODO(nisse): Deprecated, replace cricket::WebRtcVideoFrame with -// webrtc::VideoFrame everywhere, then delete this file. See -// https://bugs.chromium.org/p/webrtc/issues/detail?id=5682. - -#ifndef WEBRTC_MEDIA_ENGINE_WEBRTCVIDEOFRAME_H_ -#define WEBRTC_MEDIA_ENGINE_WEBRTCVIDEOFRAME_H_ - -#include - -#include "webrtc/base/buffer.h" -#include "webrtc/base/refcount.h" -#include "webrtc/base/scoped_ref_ptr.h" -#include "webrtc/common_types.h" -#include "webrtc/common_video/include/video_frame_buffer.h" -#include "webrtc/media/base/videoframe.h" - -namespace cricket { - -using WebRtcVideoFrame = webrtc::VideoFrame; - -} // namespace cricket - -#endif // WEBRTC_MEDIA_ENGINE_WEBRTCVIDEOFRAME_H_ diff --git a/WebRtc.NET/include/webrtc/media/engine/webrtcvoe.h b/WebRtc.NET/include/webrtc/media/engine/webrtcvoe.h deleted file mode 100644 index 41a5b5fe..00000000 --- a/WebRtc.NET/include/webrtc/media/engine/webrtcvoe.h +++ /dev/null @@ -1,111 +0,0 @@ -/* - * Copyright (c) 2004 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MEDIA_ENGINE_WEBRTCVOE_H_ -#define WEBRTC_MEDIA_ENGINE_WEBRTCVOE_H_ - -#include - -#include "webrtc/base/common.h" -#include "webrtc/media/engine/webrtccommon.h" - -#include "webrtc/common_types.h" -#include "webrtc/modules/audio_device/include/audio_device.h" -#include "webrtc/voice_engine/include/voe_audio_processing.h" -#include "webrtc/voice_engine/include/voe_base.h" -#include "webrtc/voice_engine/include/voe_codec.h" -#include "webrtc/voice_engine/include/voe_errors.h" -#include "webrtc/voice_engine/include/voe_hardware.h" -#include "webrtc/voice_engine/include/voe_volume_control.h" - -namespace cricket { -// automatically handles lifetime of WebRtc VoiceEngine -class scoped_voe_engine { - public: - explicit scoped_voe_engine(webrtc::VoiceEngine* e) : ptr(e) {} - // VERIFY, to ensure that there are no leaks at shutdown - ~scoped_voe_engine() { if (ptr) VERIFY(webrtc::VoiceEngine::Delete(ptr)); } - // Releases the current pointer. - void reset() { - if (ptr) { - VERIFY(webrtc::VoiceEngine::Delete(ptr)); - ptr = NULL; - } - } - webrtc::VoiceEngine* get() const { return ptr; } - private: - webrtc::VoiceEngine* ptr; -}; - -// unique_ptr-like class to handle obtaining and releasing WebRTC interface -// pointers. -template -class scoped_voe_ptr { - public: - explicit scoped_voe_ptr(const scoped_voe_engine& e) - : ptr(T::GetInterface(e.get())) {} - explicit scoped_voe_ptr(T* p) : ptr(p) {} - ~scoped_voe_ptr() { if (ptr) ptr->Release(); } - T* operator->() const { return ptr; } - T* get() const { return ptr; } - - // Releases the current pointer. - void reset() { - if (ptr) { - ptr->Release(); - ptr = NULL; - } - } - - private: - T* ptr; -}; - -// Utility class for aggregating the various WebRTC interface. -// Fake implementations can also be injected for testing. -class VoEWrapper { - public: - VoEWrapper() - : engine_(webrtc::VoiceEngine::Create()), processing_(engine_), - base_(engine_), codec_(engine_), hw_(engine_), - volume_(engine_) { - } - VoEWrapper(webrtc::VoEAudioProcessing* processing, - webrtc::VoEBase* base, - webrtc::VoECodec* codec, - webrtc::VoEHardware* hw, - webrtc::VoEVolumeControl* volume) - : engine_(NULL), - processing_(processing), - base_(base), - codec_(codec), - hw_(hw), - volume_(volume) { - } - ~VoEWrapper() {} - webrtc::VoiceEngine* engine() const { return engine_.get(); } - webrtc::VoEAudioProcessing* processing() const { return processing_.get(); } - webrtc::VoEBase* base() const { return base_.get(); } - webrtc::VoECodec* codec() const { return codec_.get(); } - webrtc::VoEHardware* hw() const { return hw_.get(); } - webrtc::VoEVolumeControl* volume() const { return volume_.get(); } - int error() { return base_->LastError(); } - - private: - scoped_voe_engine engine_; - scoped_voe_ptr processing_; - scoped_voe_ptr base_; - scoped_voe_ptr codec_; - scoped_voe_ptr hw_; - scoped_voe_ptr volume_; -}; -} // namespace cricket - -#endif // WEBRTC_MEDIA_ENGINE_WEBRTCVOE_H_ diff --git a/WebRtc.NET/include/webrtc/media/engine/webrtcvoiceengine.h b/WebRtc.NET/include/webrtc/media/engine/webrtcvoiceengine.h deleted file mode 100644 index 6c88bbf3..00000000 --- a/WebRtc.NET/include/webrtc/media/engine/webrtcvoiceengine.h +++ /dev/null @@ -1,291 +0,0 @@ -/* - * Copyright (c) 2004 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MEDIA_ENGINE_WEBRTCVOICEENGINE_H_ -#define WEBRTC_MEDIA_ENGINE_WEBRTCVOICEENGINE_H_ - -#include -#include -#include -#include - -#include "webrtc/base/buffer.h" -#include "webrtc/base/constructormagic.h" -#include "webrtc/base/networkroute.h" -#include "webrtc/base/scoped_ref_ptr.h" -#include "webrtc/base/thread_checker.h" -#include "webrtc/call/audio_state.h" -#include "webrtc/call/call.h" -#include "webrtc/config.h" -#include "webrtc/media/base/rtputils.h" -#include "webrtc/media/engine/webrtccommon.h" -#include "webrtc/media/engine/webrtcvoe.h" -#include "webrtc/modules/audio_processing/include/audio_processing.h" -#include "webrtc/pc/channel.h" - -namespace cricket { - -class AudioDeviceModule; -class AudioMixer; -class AudioSource; -class VoEWrapper; -class WebRtcVoiceMediaChannel; - -// WebRtcVoiceEngine is a class to be used with CompositeMediaEngine. -// It uses the WebRtc VoiceEngine library for audio handling. -class WebRtcVoiceEngine final : public webrtc::TraceCallback { - friend class WebRtcVoiceMediaChannel; - public: - // Exposed for the WVoE/MC unit test. - static bool ToCodecInst(const AudioCodec& in, webrtc::CodecInst* out); - - WebRtcVoiceEngine( - webrtc::AudioDeviceModule* adm, - const rtc::scoped_refptr& decoder_factory, - rtc::scoped_refptr audio_mixer); - // Dependency injection for testing. - WebRtcVoiceEngine( - webrtc::AudioDeviceModule* adm, - const rtc::scoped_refptr& decoder_factory, - rtc::scoped_refptr audio_mixer, - VoEWrapper* voe_wrapper); - ~WebRtcVoiceEngine() override; - - rtc::scoped_refptr GetAudioState() const; - VoiceMediaChannel* CreateChannel(webrtc::Call* call, - const MediaConfig& config, - const AudioOptions& options); - - int GetInputLevel(); - - const std::vector& send_codecs() const; - const std::vector& recv_codecs() const; - RtpCapabilities GetCapabilities() const; - - // For tracking WebRtc channels. Needed because we have to pause them - // all when switching devices. - // May only be called by WebRtcVoiceMediaChannel. - void RegisterChannel(WebRtcVoiceMediaChannel* channel); - void UnregisterChannel(WebRtcVoiceMediaChannel* channel); - - // Called by WebRtcVoiceMediaChannel to set a gain offset from - // the default AGC target level. - bool AdjustAgcLevel(int delta); - - VoEWrapper* voe() { return voe_wrapper_.get(); } - int GetLastEngineError(); - - // Starts AEC dump using an existing file. A maximum file size in bytes can be - // specified. When the maximum file size is reached, logging is stopped and - // the file is closed. If max_size_bytes is set to <= 0, no limit will be - // used. - bool StartAecDump(rtc::PlatformFile file, int64_t max_size_bytes); - - // Stops AEC dump. - void StopAecDump(); - - const webrtc::AudioProcessing::Config& GetApmConfigForTest() const { - return apm_config_; - } - - private: - // Every option that is "set" will be applied. Every option not "set" will be - // ignored. This allows us to selectively turn on and off different options - // easily at any time. - bool ApplyOptions(const AudioOptions& options); - void SetDefaultDevices(); - - // webrtc::TraceCallback: - void Print(webrtc::TraceLevel level, const char* trace, int length) override; - - void StartAecDump(const std::string& filename); - int CreateVoEChannel(); - webrtc::AudioDeviceModule* adm(); - webrtc::AudioProcessing* apm(); - - AudioCodecs CollectRecvCodecs() const; - - rtc::ThreadChecker signal_thread_checker_; - rtc::ThreadChecker worker_thread_checker_; - - // The audio device manager. - rtc::scoped_refptr adm_; - rtc::scoped_refptr decoder_factory_; - // Reference to the APM, owned by VoE. - webrtc::AudioProcessing* apm_ = nullptr; - // The primary instance of WebRtc VoiceEngine. - std::unique_ptr voe_wrapper_; - rtc::scoped_refptr audio_state_; - std::vector send_codecs_; - std::vector recv_codecs_; - std::vector channels_; - webrtc::VoEBase::ChannelConfig channel_config_; - bool is_dumping_aec_ = false; - - webrtc::AgcConfig default_agc_config_; - // Cache received extended_filter_aec, delay_agnostic_aec, experimental_ns - // level controller, and intelligibility_enhancer values, and apply them - // in case they are missing in the audio options. We need to do this because - // SetExtraOptions() will revert to defaults for options which are not - // provided. - rtc::Optional extended_filter_aec_; - rtc::Optional delay_agnostic_aec_; - rtc::Optional experimental_ns_; - rtc::Optional intelligibility_enhancer_; - rtc::Optional level_control_; - - webrtc::AudioProcessing::Config apm_config_; - - RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(WebRtcVoiceEngine); -}; - -// WebRtcVoiceMediaChannel is an implementation of VoiceMediaChannel that uses -// WebRtc Voice Engine. -class WebRtcVoiceMediaChannel final : public VoiceMediaChannel, - public webrtc::Transport { - public: - WebRtcVoiceMediaChannel(WebRtcVoiceEngine* engine, - const MediaConfig& config, - const AudioOptions& options, - webrtc::Call* call); - ~WebRtcVoiceMediaChannel() override; - - const AudioOptions& options() const { return options_; } - - rtc::DiffServCodePoint PreferredDscp() const override; - - bool SetSendParameters(const AudioSendParameters& params) override; - bool SetRecvParameters(const AudioRecvParameters& params) override; - webrtc::RtpParameters GetRtpSendParameters(uint32_t ssrc) const override; - bool SetRtpSendParameters(uint32_t ssrc, - const webrtc::RtpParameters& parameters) override; - webrtc::RtpParameters GetRtpReceiveParameters(uint32_t ssrc) const override; - bool SetRtpReceiveParameters( - uint32_t ssrc, - const webrtc::RtpParameters& parameters) override; - - void SetPlayout(bool playout) override; - void SetSend(bool send) override; - bool SetAudioSend(uint32_t ssrc, - bool enable, - const AudioOptions* options, - AudioSource* source) override; - bool AddSendStream(const StreamParams& sp) override; - bool RemoveSendStream(uint32_t ssrc) override; - bool AddRecvStream(const StreamParams& sp) override; - bool RemoveRecvStream(uint32_t ssrc) override; - bool GetActiveStreams(AudioInfo::StreamList* actives) override; - int GetOutputLevel() override; - int GetTimeSinceLastTyping() override; - void SetTypingDetectionParameters(int time_window, - int cost_per_typing, - int reporting_threshold, - int penalty_decay, - int type_event_delay) override; - bool SetOutputVolume(uint32_t ssrc, double volume) override; - - bool CanInsertDtmf() override; - bool InsertDtmf(uint32_t ssrc, int event, int duration) override; - - void OnPacketReceived(rtc::CopyOnWriteBuffer* packet, - const rtc::PacketTime& packet_time) override; - void OnRtcpReceived(rtc::CopyOnWriteBuffer* packet, - const rtc::PacketTime& packet_time) override; - void OnNetworkRouteChanged(const std::string& transport_name, - const rtc::NetworkRoute& network_route) override; - void OnReadyToSend(bool ready) override; - void OnTransportOverheadChanged(int transport_overhead_per_packet) override; - bool GetStats(VoiceMediaInfo* info) override; - - void SetRawAudioSink( - uint32_t ssrc, - std::unique_ptr sink) override; - - // implements Transport interface - bool SendRtp(const uint8_t* data, - size_t len, - const webrtc::PacketOptions& options) override { - rtc::CopyOnWriteBuffer packet(data, len, kMaxRtpPacketLen); - rtc::PacketOptions rtc_options; - rtc_options.packet_id = options.packet_id; - return VoiceMediaChannel::SendPacket(&packet, rtc_options); - } - - bool SendRtcp(const uint8_t* data, size_t len) override { - rtc::CopyOnWriteBuffer packet(data, len, kMaxRtpPacketLen); - return VoiceMediaChannel::SendRtcp(&packet, rtc::PacketOptions()); - } - - int GetReceiveChannelId(uint32_t ssrc) const; - int GetSendChannelId(uint32_t ssrc) const; - - private: - bool SetOptions(const AudioOptions& options); - bool SetRecvCodecs(const std::vector& codecs); - bool SetSendCodecs(const std::vector& codecs); - bool SetLocalSource(uint32_t ssrc, AudioSource* source); - bool MuteStream(uint32_t ssrc, bool mute); - - WebRtcVoiceEngine* engine() { return engine_; } - int GetLastEngineError() { return engine()->GetLastEngineError(); } - int GetOutputLevel(int channel); - void ChangePlayout(bool playout); - int CreateVoEChannel(); - bool DeleteVoEChannel(int channel); - bool IsDefaultRecvStream(uint32_t ssrc) { - return default_recv_ssrc_ == static_cast(ssrc); - } - bool SetMaxSendBitrate(int bps); - bool ValidateRtpParameters(const webrtc::RtpParameters& parameters); - void SetupRecording(); - - rtc::ThreadChecker worker_thread_checker_; - - WebRtcVoiceEngine* const engine_ = nullptr; - std::vector send_codecs_; - std::vector recv_codecs_; - int max_send_bitrate_bps_ = 0; - AudioOptions options_; - rtc::Optional dtmf_payload_type_; - int dtmf_payload_freq_ = -1; - bool recv_transport_cc_enabled_ = false; - bool recv_nack_enabled_ = false; - bool desired_playout_ = false; - bool playout_ = false; - bool send_ = false; - webrtc::Call* const call_ = nullptr; - webrtc::Call::Config::BitrateConfig bitrate_config_; - - // SSRC of unsignalled receive stream, or -1 if there isn't one. - int64_t default_recv_ssrc_ = -1; - // Volume for unsignalled stream, which may be set before the stream exists. - double default_recv_volume_ = 1.0; - // Sink for unsignalled stream, which may be set before the stream exists. - std::unique_ptr default_sink_; - // Default SSRC to use for RTCP receiver reports in case of no signaled - // send streams. See: https://code.google.com/p/webrtc/issues/detail?id=4740 - // and https://code.google.com/p/chromium/issues/detail?id=547661 - uint32_t receiver_reports_ssrc_ = 0xFA17FA17u; - - class WebRtcAudioSendStream; - std::map send_streams_; - std::vector send_rtp_extensions_; - - class WebRtcAudioReceiveStream; - std::map recv_streams_; - std::vector recv_rtp_extensions_; - - webrtc::AudioSendStream::Config::SendCodecSpec send_codec_spec_; - - RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(WebRtcVoiceMediaChannel); -}; -} // namespace cricket - -#endif // WEBRTC_MEDIA_ENGINE_WEBRTCVOICEENGINE_H_ diff --git a/WebRtc.NET/include/webrtc/media/sctp/sctptransport.h b/WebRtc.NET/include/webrtc/media/sctp/sctptransport.h deleted file mode 100644 index 2f2746c4..00000000 --- a/WebRtc.NET/include/webrtc/media/sctp/sctptransport.h +++ /dev/null @@ -1,193 +0,0 @@ -/* - * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MEDIA_SCTP_SCTPTRANSPORT_H_ -#define WEBRTC_MEDIA_SCTP_SCTPTRANSPORT_H_ - -#include - -#include // for unique_ptr. -#include -#include -#include - -#include "webrtc/base/asyncinvoker.h" -#include "webrtc/base/constructormagic.h" -#include "webrtc/base/copyonwritebuffer.h" -#include "webrtc/base/sigslot.h" -#include "webrtc/base/thread.h" -// For SendDataParams/ReceiveDataParams. -#include "webrtc/media/base/mediachannel.h" -#include "webrtc/media/sctp/sctptransportinternal.h" - -// Defined by "usrsctplib/usrsctp.h" -struct sockaddr_conn; -struct sctp_assoc_change; -struct sctp_stream_reset_event; -// Defined by -struct socket; -namespace cricket { - -// Holds data to be passed on to a channel. -struct SctpInboundPacket; - -// From channel calls, data flows like this: -// [network thread (although it can in princple be another thread)] -// 1. SctpTransport::SendData(data) -// 2. usrsctp_sendv(data) -// [network thread returns; sctp thread then calls the following] -// 3. OnSctpOutboundPacket(wrapped_data) -// [sctp thread returns having async invoked on the network thread] -// 4. SctpTransport::OnPacketFromSctpToNetwork(wrapped_data) -// 5. TransportChannel::SendPacket(wrapped_data) -// 6. ... across network ... a packet is sent back ... -// 7. SctpTransport::OnPacketReceived(wrapped_data) -// 8. usrsctp_conninput(wrapped_data) -// [network thread returns; sctp thread then calls the following] -// 9. OnSctpInboundData(data) -// [sctp thread returns having async invoked on the network thread] -// 10. SctpTransport::OnInboundPacketFromSctpToChannel(inboundpacket) -// 11. SctpTransport::OnDataFromSctpToChannel(data) -// 12. SctpTransport::SignalDataReceived(data) -// [from the same thread, methods registered/connected to -// SctpTransport are called with the recieved data] -// TODO(zhihuang): Rename "channel" to "transport" on network-level. -class SctpTransport : public SctpTransportInternal, - public sigslot::has_slots<> { - public: - // |network_thread| is where packets will be processed and callbacks from - // this transport will be posted, and is the only thread on which public - // methods can be called. - // |channel| is required (must not be null). - SctpTransport(rtc::Thread* network_thread, - rtc::PacketTransportInterface* channel); - ~SctpTransport() override; - - // SctpTransportInternal overrides (see sctptransportinternal.h for comments). - void SetTransportChannel(rtc::PacketTransportInterface* channel) override; - bool Start(int local_port, int remote_port) override; - bool OpenStream(int sid) override; - bool ResetStream(int sid) override; - bool SendData(const SendDataParams& params, - const rtc::CopyOnWriteBuffer& payload, - SendDataResult* result = nullptr) override; - bool ReadyToSendData() override; - void set_debug_name_for_testing(const char* debug_name) override { - debug_name_ = debug_name; - } - - // Exposed to allow Post call from c-callbacks. - // TODO(deadbeef): Remove this or at least make it return a const pointer. - rtc::Thread* network_thread() const { return network_thread_; } - - private: - void ConnectTransportChannelSignals(); - void DisconnectTransportChannelSignals(); - - // Creates the socket and connects. - bool Connect(); - - // Returns false when opening the socket failed. - bool OpenSctpSocket(); - // Helpet method to set socket options. - bool ConfigureSctpSocket(); - // Sets |sock_ |to nullptr. - void CloseSctpSocket(); - - // Sends a SCTP_RESET_STREAM for all streams in closing_ssids_. - bool SendQueuedStreamResets(); - - // Sets the "ready to send" flag and fires signal if needed. - void SetReadyToSendData(); - - // Callbacks from DTLS channel. - void OnWritableState(rtc::PacketTransportInterface* transport); - virtual void OnPacketRead(rtc::PacketTransportInterface* transport, - const char* data, - size_t len, - const rtc::PacketTime& packet_time, - int flags); - - // Methods related to usrsctp callbacks. - void OnSendThresholdCallback(); - sockaddr_conn GetSctpSockAddr(int port); - - // Called using |invoker_| to send packet on the network. - void OnPacketFromSctpToNetwork(const rtc::CopyOnWriteBuffer& buffer); - // Called using |invoker_| to decide what to do with the packet. - // The |flags| parameter is used by SCTP to distinguish notification packets - // from other types of packets. - void OnInboundPacketFromSctpToChannel(const rtc::CopyOnWriteBuffer& buffer, - ReceiveDataParams params, - int flags); - void OnDataFromSctpToChannel(const ReceiveDataParams& params, - const rtc::CopyOnWriteBuffer& buffer); - void OnNotificationFromSctp(const rtc::CopyOnWriteBuffer& buffer); - void OnNotificationAssocChange(const sctp_assoc_change& change); - - void OnStreamResetEvent(const struct sctp_stream_reset_event* evt); - - // Responsible for marshalling incoming data to the channels listeners, and - // outgoing data to the network interface. - rtc::Thread* network_thread_; - // Helps pass inbound/outbound packets asynchronously to the network thread. - rtc::AsyncInvoker invoker_; - // Underlying DTLS channel. - rtc::PacketTransportInterface* transport_channel_; - bool was_ever_writable_ = false; - int local_port_ = kSctpDefaultPort; - int remote_port_ = kSctpDefaultPort; - struct socket* sock_ = nullptr; // The socket created by usrsctp_socket(...). - - // Has Start been called? Don't create SCTP socket until it has. - bool started_ = false; - // Are we ready to queue data (SCTP socket created, and not blocked due to - // congestion control)? Different than |transport_channel_|'s "ready to - // send". - bool ready_to_send_data_ = false; - - typedef std::set StreamSet; - // When a data channel opens a stream, it goes into open_streams_. When we - // want to close it, the stream's ID goes into queued_reset_streams_. When - // we actually transmit a RE-CONFIG chunk with that stream ID, the ID goes - // into sent_reset_streams_. When we get a response RE-CONFIG chunk back - // acknowledging the reset, we remove the stream ID from - // sent_reset_streams_. We use sent_reset_streams_ to differentiate - // between acknowledgment RE-CONFIG and peer-initiated RE-CONFIGs. - StreamSet open_streams_; - StreamSet queued_reset_streams_; - StreamSet sent_reset_streams_; - - // A static human-readable name for debugging messages. - const char* debug_name_ = "SctpTransport"; - // Hides usrsctp interactions from this header file. - class UsrSctpWrapper; - - RTC_DISALLOW_COPY_AND_ASSIGN(SctpTransport); -}; - -class SctpTransportFactory : public SctpTransportInternalFactory { - public: - explicit SctpTransportFactory(rtc::Thread* network_thread) - : network_thread_(network_thread) {} - - std::unique_ptr CreateSctpTransport( - rtc::PacketTransportInterface* channel) override { - return std::unique_ptr( - new SctpTransport(network_thread_, channel)); - } - - private: - rtc::Thread* network_thread_; -}; - -} // namespace cricket - -#endif // WEBRTC_MEDIA_SCTP_SCTPTRANSPORT_H_ diff --git a/WebRtc.NET/include/webrtc/modules/audio_coding/acm2/acm_common_defs.h b/WebRtc.NET/include/webrtc/modules/audio_coding/acm2/acm_common_defs.h deleted file mode 100644 index 08519323..00000000 --- a/WebRtc.NET/include/webrtc/modules/audio_coding/acm2/acm_common_defs.h +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MODULES_AUDIO_CODING_ACM2_ACM_COMMON_DEFS_H_ -#define WEBRTC_MODULES_AUDIO_CODING_ACM2_ACM_COMMON_DEFS_H_ - -#include "webrtc/typedefs.h" - -// Checks for enabled codecs, we prevent enabling codecs which are not -// compatible. -#if ((defined WEBRTC_CODEC_ISAC) && (defined WEBRTC_CODEC_ISACFX)) -#error iSAC and iSACFX codecs cannot be enabled at the same time -#endif - -namespace webrtc { - -// General codec specific defines -const int kIsacWbDefaultRate = 32000; -const int kIsacSwbDefaultRate = 56000; -const int kIsacPacSize480 = 480; -const int kIsacPacSize960 = 960; - -} // namespace webrtc - -#endif // WEBRTC_MODULES_AUDIO_CODING_ACM2_ACM_COMMON_DEFS_H_ diff --git a/WebRtc.NET/include/webrtc/modules/audio_coding/acm2/codec_manager.h b/WebRtc.NET/include/webrtc/modules/audio_coding/acm2/codec_manager.h deleted file mode 100644 index b60b7e7b..00000000 --- a/WebRtc.NET/include/webrtc/modules/audio_coding/acm2/codec_manager.h +++ /dev/null @@ -1,75 +0,0 @@ -/* - * Copyright (c) 2015 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MODULES_AUDIO_CODING_ACM2_CODEC_MANAGER_H_ -#define WEBRTC_MODULES_AUDIO_CODING_ACM2_CODEC_MANAGER_H_ - -#include - -#include "webrtc/base/constructormagic.h" -#include "webrtc/base/optional.h" -#include "webrtc/base/thread_checker.h" -#include "webrtc/modules/audio_coding/acm2/rent_a_codec.h" -#include "webrtc/modules/audio_coding/include/audio_coding_module.h" -#include "webrtc/modules/audio_coding/include/audio_coding_module_typedefs.h" -#include "webrtc/common_types.h" - -namespace webrtc { - -class AudioDecoder; -class AudioEncoder; - -namespace acm2 { - -class CodecManager final { - public: - CodecManager(); - ~CodecManager(); - - // Parses the given specification. On success, returns true and updates the - // stored CodecInst and stack parameters; on error, returns false. - bool RegisterEncoder(const CodecInst& send_codec); - - static CodecInst ForgeCodecInst(const AudioEncoder* external_speech_encoder); - - const CodecInst* GetCodecInst() const { - return send_codec_inst_ ? &*send_codec_inst_ : nullptr; - } - - void UnsetCodecInst() { send_codec_inst_ = rtc::Optional(); } - - const RentACodec::StackParameters* GetStackParams() const { - return &codec_stack_params_; - } - RentACodec::StackParameters* GetStackParams() { return &codec_stack_params_; } - - bool SetCopyRed(bool enable); - - bool SetVAD(bool enable, ACMVADMode mode); - - bool SetCodecFEC(bool enable_codec_fec); - - // Uses the provided Rent-A-Codec to create a new encoder stack, if we have a - // complete specification; if so, it is then passed to set_encoder. On error, - // returns false. - bool MakeEncoder(RentACodec* rac, AudioCodingModule* acm); - - private: - rtc::ThreadChecker thread_checker_; - rtc::Optional send_codec_inst_; - RentACodec::StackParameters codec_stack_params_; - bool recreate_encoder_ = true; // Need to recreate encoder? - - RTC_DISALLOW_COPY_AND_ASSIGN(CodecManager); -}; - -} // namespace acm2 -} // namespace webrtc -#endif // WEBRTC_MODULES_AUDIO_CODING_ACM2_CODEC_MANAGER_H_ diff --git a/WebRtc.NET/include/webrtc/modules/audio_coding/acm2/rent_a_codec.h b/WebRtc.NET/include/webrtc/modules/audio_coding/acm2/rent_a_codec.h deleted file mode 100644 index 02a5dd9b..00000000 --- a/WebRtc.NET/include/webrtc/modules/audio_coding/acm2/rent_a_codec.h +++ /dev/null @@ -1,243 +0,0 @@ -/* - * Copyright (c) 2015 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MODULES_AUDIO_CODING_ACM2_RENT_A_CODEC_H_ -#define WEBRTC_MODULES_AUDIO_CODING_ACM2_RENT_A_CODEC_H_ - -#include -#include -#include - -#include "webrtc/base/array_view.h" -#include "webrtc/base/constructormagic.h" -#include "webrtc/base/optional.h" -#include "webrtc/base/scoped_ref_ptr.h" -#include "webrtc/modules/audio_coding/codecs/audio_decoder.h" -#include "webrtc/modules/audio_coding/codecs/audio_format.h" -#include "webrtc/modules/audio_coding/codecs/audio_encoder.h" -#include "webrtc/modules/audio_coding/include/audio_coding_module_typedefs.h" -#include "webrtc/typedefs.h" - -namespace webrtc { - -struct CodecInst; -class LockedIsacBandwidthInfo; - -namespace acm2 { - -class RentACodec { - public: - enum class CodecId { -#if defined(WEBRTC_CODEC_ISAC) || defined(WEBRTC_CODEC_ISACFX) - kISAC, -#endif -#ifdef WEBRTC_CODEC_ISAC - kISACSWB, -#endif - // Mono - kPCM16B, - kPCM16Bwb, - kPCM16Bswb32kHz, - // Stereo - kPCM16B_2ch, - kPCM16Bwb_2ch, - kPCM16Bswb32kHz_2ch, - // Mono - kPCMU, - kPCMA, - // Stereo - kPCMU_2ch, - kPCMA_2ch, -#ifdef WEBRTC_CODEC_ILBC - kILBC, -#endif -#ifdef WEBRTC_CODEC_G722 - kG722, // Mono - kG722_2ch, // Stereo -#endif -#ifdef WEBRTC_CODEC_OPUS - kOpus, // Mono and stereo -#endif - kCNNB, - kCNWB, - kCNSWB, -#ifdef ENABLE_48000_HZ - kCNFB, -#endif - kAVT, - kAVT16kHz, - kAVT32kHz, - kAVT48kHz, -#ifdef WEBRTC_CODEC_RED - kRED, -#endif - kNumCodecs, // Implementation detail. Don't use. - -// Set unsupported codecs to -1. -#if !defined(WEBRTC_CODEC_ISAC) && !defined(WEBRTC_CODEC_ISACFX) - kISAC = -1, -#endif -#ifndef WEBRTC_CODEC_ISAC - kISACSWB = -1, -#endif - // 48 kHz not supported, always set to -1. - kPCM16Bswb48kHz = -1, -#ifndef WEBRTC_CODEC_ILBC - kILBC = -1, -#endif -#ifndef WEBRTC_CODEC_G722 - kG722 = -1, // Mono - kG722_2ch = -1, // Stereo -#endif -#ifndef WEBRTC_CODEC_OPUS - kOpus = -1, // Mono and stereo -#endif -#ifndef WEBRTC_CODEC_RED - kRED = -1, -#endif -#ifndef ENABLE_48000_HZ - kCNFB = -1, -#endif - - kNone = -1 - }; - - enum class NetEqDecoder { - kDecoderPCMu, - kDecoderPCMa, - kDecoderPCMu_2ch, - kDecoderPCMa_2ch, - kDecoderILBC, - kDecoderISAC, - kDecoderISACswb, - kDecoderPCM16B, - kDecoderPCM16Bwb, - kDecoderPCM16Bswb32kHz, - kDecoderPCM16Bswb48kHz, - kDecoderPCM16B_2ch, - kDecoderPCM16Bwb_2ch, - kDecoderPCM16Bswb32kHz_2ch, - kDecoderPCM16Bswb48kHz_2ch, - kDecoderPCM16B_5ch, - kDecoderG722, - kDecoderG722_2ch, - kDecoderRED, - kDecoderAVT, - kDecoderAVT16kHz, - kDecoderAVT32kHz, - kDecoderAVT48kHz, - kDecoderCNGnb, - kDecoderCNGwb, - kDecoderCNGswb32kHz, - kDecoderCNGswb48kHz, - kDecoderArbitrary, - kDecoderOpus, - kDecoderOpus_2ch, - }; - - static rtc::Optional NetEqDecoderToSdpAudioFormat( - NetEqDecoder nd); - - static inline size_t NumberOfCodecs() { - return static_cast(CodecId::kNumCodecs); - } - - static inline rtc::Optional CodecIndexFromId(CodecId codec_id) { - const int i = static_cast(codec_id); - return i >= 0 && i < static_cast(NumberOfCodecs()) - ? rtc::Optional(i) - : rtc::Optional(); - } - - static inline rtc::Optional CodecIdFromIndex(int codec_index) { - return static_cast(codec_index) < NumberOfCodecs() - ? rtc::Optional( - static_cast(codec_index)) - : rtc::Optional(); - } - - static rtc::Optional CodecIdByParams(const char* payload_name, - int sampling_freq_hz, - size_t channels); - static rtc::Optional CodecInstById(CodecId codec_id); - static rtc::Optional CodecIdByInst(const CodecInst& codec_inst); - static rtc::Optional CodecInstByParams(const char* payload_name, - int sampling_freq_hz, - size_t channels); - static bool IsCodecValid(const CodecInst& codec_inst); - - static inline bool IsPayloadTypeValid(int payload_type) { - return payload_type >= 0 && payload_type <= 127; - } - - static rtc::ArrayView Database(); - - static rtc::Optional IsSupportedNumChannels(CodecId codec_id, - size_t num_channels); - - static rtc::Optional NetEqDecoderFromCodecId( - CodecId codec_id, - size_t num_channels); - - // Parse codec_inst and extract payload types. If the given CodecInst was for - // the wrong sort of codec, return kSkip; otherwise, if the rate was illegal, - // return kBadFreq; otherwise, update the given RTP timestamp rate (Hz) -> - // payload type map and return kOk. - enum class RegistrationResult { kOk, kSkip, kBadFreq }; - static RegistrationResult RegisterCngPayloadType(std::map* pt_map, - const CodecInst& codec_inst); - static RegistrationResult RegisterRedPayloadType(std::map* pt_map, - const CodecInst& codec_inst); - - RentACodec(); - ~RentACodec(); - - // Creates and returns an audio encoder built to the given specification. - // Returns null in case of error. - std::unique_ptr RentEncoder(const CodecInst& codec_inst); - - struct StackParameters { - StackParameters(); - ~StackParameters(); - - std::unique_ptr speech_encoder; - - bool use_codec_fec = false; - bool use_red = false; - bool use_cng = false; - ACMVADMode vad_mode = VADNormal; - - // Maps from RTP timestamp rate (in Hz) to payload type. - std::map cng_payload_types; - std::map red_payload_types; - }; - - // Creates and returns an audio encoder stack constructed to the given - // specification. If the specification isn't compatible with the encoder, it - // will be changed to match (things will be switched off). The speech encoder - // will be stolen. If the specification isn't complete, returns nullptr. - std::unique_ptr RentEncoderStack(StackParameters* param); - - // Creates and returns an iSAC decoder. - std::unique_ptr RentIsacDecoder(int sample_rate_hz); - - private: - std::unique_ptr speech_encoder_; - std::unique_ptr cng_encoder_; - std::unique_ptr red_encoder_; - rtc::scoped_refptr isac_bandwidth_info_; - - RTC_DISALLOW_COPY_AND_ASSIGN(RentACodec); -}; - -} // namespace acm2 -} // namespace webrtc - -#endif // WEBRTC_MODULES_AUDIO_CODING_ACM2_RENT_A_CODEC_H_ diff --git a/WebRtc.NET/include/webrtc/modules/audio_coding/audio_network_adaptor/audio_network_adaptor_impl.h b/WebRtc.NET/include/webrtc/modules/audio_coding/audio_network_adaptor/audio_network_adaptor_impl.h deleted file mode 100644 index 801a9ccc..00000000 --- a/WebRtc.NET/include/webrtc/modules/audio_coding/audio_network_adaptor/audio_network_adaptor_impl.h +++ /dev/null @@ -1,75 +0,0 @@ -/* - * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MODULES_AUDIO_CODING_AUDIO_NETWORK_ADAPTOR_AUDIO_NETWORK_ADAPTOR_IMPL_H_ -#define WEBRTC_MODULES_AUDIO_CODING_AUDIO_NETWORK_ADAPTOR_AUDIO_NETWORK_ADAPTOR_IMPL_H_ - -#include - -#include "webrtc/base/constructormagic.h" -#include "webrtc/modules/audio_coding/audio_network_adaptor/controller.h" -#include "webrtc/modules/audio_coding/audio_network_adaptor/controller_manager.h" -#include "webrtc/modules/audio_coding/audio_network_adaptor/debug_dump_writer.h" -#include "webrtc/modules/audio_coding/audio_network_adaptor/include/audio_network_adaptor.h" -#include "webrtc/system_wrappers/include/clock.h" - -namespace webrtc { - -class RtcEventLog; - -class AudioNetworkAdaptorImpl final : public AudioNetworkAdaptor { - public: - struct Config { - Config(); - ~Config(); - RtcEventLog* event_log; - const Clock* clock; - }; - - AudioNetworkAdaptorImpl( - const Config& config, - std::unique_ptr controller_manager, - std::unique_ptr debug_dump_writer = nullptr); - - ~AudioNetworkAdaptorImpl() override; - - void SetUplinkBandwidth(int uplink_bandwidth_bps) override; - - void SetUplinkPacketLossFraction(float uplink_packet_loss_fraction) override; - - void SetRtt(int rtt_ms) override; - - void SetTargetAudioBitrate(int target_audio_bitrate_bps) override; - - void SetOverhead(size_t overhead_bytes_per_packet) override; - - EncoderRuntimeConfig GetEncoderRuntimeConfig() override; - - void StartDebugDump(FILE* file_handle) override; - - void StopDebugDump() override; - - private: - void DumpNetworkMetrics(); - - const Config config_; - - std::unique_ptr controller_manager_; - - std::unique_ptr debug_dump_writer_; - - Controller::NetworkMetrics last_metrics_; - - RTC_DISALLOW_COPY_AND_ASSIGN(AudioNetworkAdaptorImpl); -}; - -} // namespace webrtc - -#endif // WEBRTC_MODULES_AUDIO_CODING_AUDIO_NETWORK_ADAPTOR_AUDIO_NETWORK_ADAPTOR_IMPL_H_ diff --git a/WebRtc.NET/include/webrtc/modules/audio_coding/audio_network_adaptor/bitrate_controller.h b/WebRtc.NET/include/webrtc/modules/audio_coding/audio_network_adaptor/bitrate_controller.h deleted file mode 100644 index a41c5f46..00000000 --- a/WebRtc.NET/include/webrtc/modules/audio_coding/audio_network_adaptor/bitrate_controller.h +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MODULES_AUDIO_CODING_AUDIO_NETWORK_ADAPTOR_BITRATE_CONTROLLER_H_ -#define WEBRTC_MODULES_AUDIO_CODING_AUDIO_NETWORK_ADAPTOR_BITRATE_CONTROLLER_H_ - -#include "webrtc/base/constructormagic.h" -#include "webrtc/modules/audio_coding/audio_network_adaptor/controller.h" - -namespace webrtc { -namespace audio_network_adaptor { - -class BitrateController final : public Controller { - public: - struct Config { - Config(int initial_bitrate_bps, int initial_frame_length_ms); - ~Config(); - int initial_bitrate_bps; - int initial_frame_length_ms; - }; - - explicit BitrateController(const Config& config); - - void MakeDecision(const NetworkMetrics& metrics, - AudioNetworkAdaptor::EncoderRuntimeConfig* config) override; - - private: - const Config config_; - int bitrate_bps_; - int frame_length_ms_; - RTC_DISALLOW_COPY_AND_ASSIGN(BitrateController); -}; - -} // namespace audio_network_adaptor -} // namespace webrtc - -#endif // WEBRTC_MODULES_AUDIO_CODING_AUDIO_NETWORK_ADAPTOR_BITRATE_CONTROLLER_H_ diff --git a/WebRtc.NET/include/webrtc/modules/audio_coding/audio_network_adaptor/channel_controller.h b/WebRtc.NET/include/webrtc/modules/audio_coding/audio_network_adaptor/channel_controller.h deleted file mode 100644 index 5402fa11..00000000 --- a/WebRtc.NET/include/webrtc/modules/audio_coding/audio_network_adaptor/channel_controller.h +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MODULES_AUDIO_CODING_AUDIO_NETWORK_ADAPTOR_CHANNEL_CONTROLLER_H_ -#define WEBRTC_MODULES_AUDIO_CODING_AUDIO_NETWORK_ADAPTOR_CHANNEL_CONTROLLER_H_ - -#include "webrtc/base/constructormagic.h" -#include "webrtc/modules/audio_coding/audio_network_adaptor/controller.h" - -namespace webrtc { - -class ChannelController final : public Controller { - public: - struct Config { - Config(size_t num_encoder_channels, - size_t intial_channels_to_encode, - int channel_1_to_2_bandwidth_bps, - int channel_2_to_1_bandwidth_bps); - size_t num_encoder_channels; - size_t intial_channels_to_encode; - // Uplink bandwidth above which the number of encoded channels should switch - // from 1 to 2. - int channel_1_to_2_bandwidth_bps; - // Uplink bandwidth below which the number of encoded channels should switch - // from 2 to 1. - int channel_2_to_1_bandwidth_bps; - }; - - explicit ChannelController(const Config& config); - - void MakeDecision(const NetworkMetrics& metrics, - AudioNetworkAdaptor::EncoderRuntimeConfig* config) override; - - private: - const Config config_; - size_t channels_to_encode_; - RTC_DISALLOW_COPY_AND_ASSIGN(ChannelController); -}; - -} // namespace webrtc - -#endif // WEBRTC_MODULES_AUDIO_CODING_AUDIO_NETWORK_ADAPTOR_CHANNEL_CONTROLLER_H_ diff --git a/WebRtc.NET/include/webrtc/modules/audio_coding/audio_network_adaptor/controller.h b/WebRtc.NET/include/webrtc/modules/audio_coding/audio_network_adaptor/controller.h deleted file mode 100644 index 4f978043..00000000 --- a/WebRtc.NET/include/webrtc/modules/audio_coding/audio_network_adaptor/controller.h +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MODULES_AUDIO_CODING_AUDIO_NETWORK_ADAPTOR_CONTROLLER_H_ -#define WEBRTC_MODULES_AUDIO_CODING_AUDIO_NETWORK_ADAPTOR_CONTROLLER_H_ - -#include "webrtc/base/optional.h" -#include "webrtc/modules/audio_coding/audio_network_adaptor/include/audio_network_adaptor.h" - -namespace webrtc { - -class Controller { - public: - struct NetworkMetrics { - NetworkMetrics(); - ~NetworkMetrics(); - rtc::Optional uplink_bandwidth_bps; - rtc::Optional uplink_packet_loss_fraction; - rtc::Optional target_audio_bitrate_bps; - rtc::Optional rtt_ms; - rtc::Optional overhead_bytes_per_packet; - }; - - virtual ~Controller() = default; - - virtual void MakeDecision( - const NetworkMetrics& metrics, - AudioNetworkAdaptor::EncoderRuntimeConfig* config) = 0; -}; - -} // namespace webrtc - -#endif // WEBRTC_MODULES_AUDIO_CODING_AUDIO_NETWORK_ADAPTOR_CONTROLLER_H_ diff --git a/WebRtc.NET/include/webrtc/modules/audio_coding/audio_network_adaptor/controller_manager.h b/WebRtc.NET/include/webrtc/modules/audio_coding/audio_network_adaptor/controller_manager.h deleted file mode 100644 index 806042e5..00000000 --- a/WebRtc.NET/include/webrtc/modules/audio_coding/audio_network_adaptor/controller_manager.h +++ /dev/null @@ -1,112 +0,0 @@ -/* - * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MODULES_AUDIO_CODING_AUDIO_NETWORK_ADAPTOR_CONTROLLER_MANAGER_H_ -#define WEBRTC_MODULES_AUDIO_CODING_AUDIO_NETWORK_ADAPTOR_CONTROLLER_MANAGER_H_ - -#include -#include -#include - -#include "webrtc/base/constructormagic.h" -#include "webrtc/modules/audio_coding/audio_network_adaptor/controller.h" - -namespace webrtc { - -class Clock; - -class ControllerManager { - public: - virtual ~ControllerManager() = default; - - // Sort controllers based on their significance. - virtual std::vector GetSortedControllers( - const Controller::NetworkMetrics& metrics) = 0; - - virtual std::vector GetControllers() const = 0; -}; - -class ControllerManagerImpl final : public ControllerManager { - public: - struct Config { - Config(int min_reordering_time_ms, - float min_reordering_squared_distance, - const Clock* clock); - ~Config(); - // Least time since last reordering for a new reordering to be made. - int min_reordering_time_ms; - // Least squared distance from last scoring point for a new reordering to be - // made. - float min_reordering_squared_distance; - const Clock* clock; - }; - - static std::unique_ptr Create( - const std::string& config_string, - size_t num_encoder_channels, - rtc::ArrayView encoder_frame_lengths_ms, - size_t intial_channels_to_encode, - int initial_frame_length_ms, - int initial_bitrate_bps, - bool initial_fec_enabled, - bool initial_dtx_enabled, - const Clock* clock); - - explicit ControllerManagerImpl(const Config& config); - - // Dependency injection for testing. - ControllerManagerImpl( - const Config& config, - std::vector>&& controllers, - const std::map>& - chracteristic_points); - - ~ControllerManagerImpl() override; - - // Sort controllers based on their significance. - std::vector GetSortedControllers( - const Controller::NetworkMetrics& metrics) override; - - std::vector GetControllers() const override; - - private: - // Scoring point is a subset of NetworkMetrics that is used for comparing the - // significance of controllers. - struct ScoringPoint { - ScoringPoint(int uplink_bandwidth_bps, float uplink_packet_loss_fraction); - - // Calculate the normalized [0,1] distance between two scoring points. - float SquaredDistanceTo(const ScoringPoint& scoring_point) const; - - int uplink_bandwidth_bps; - float uplink_packet_loss_fraction; - }; - - const Config config_; - - std::vector> controllers_; - - rtc::Optional last_reordering_time_ms_; - ScoringPoint last_scoring_point_; - - std::vector default_sorted_controllers_; - - std::vector sorted_controllers_; - - // |scoring_points_| saves the characteristic scoring points of various - // controllers. - std::map controller_scoring_points_; - - RTC_DISALLOW_COPY_AND_ASSIGN(ControllerManagerImpl); -}; - -} // namespace webrtc - -#endif // WEBRTC_MODULES_AUDIO_CODING_AUDIO_NETWORK_ADAPTOR_CONTROLLER_MANAGER_H_ diff --git a/WebRtc.NET/include/webrtc/modules/audio_coding/audio_network_adaptor/debug_dump_writer.h b/WebRtc.NET/include/webrtc/modules/audio_coding/audio_network_adaptor/debug_dump_writer.h deleted file mode 100644 index da4b0317..00000000 --- a/WebRtc.NET/include/webrtc/modules/audio_coding/audio_network_adaptor/debug_dump_writer.h +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MODULES_AUDIO_CODING_AUDIO_NETWORK_ADAPTOR_DEBUG_DUMP_WRITER_H_ -#define WEBRTC_MODULES_AUDIO_CODING_AUDIO_NETWORK_ADAPTOR_DEBUG_DUMP_WRITER_H_ - -#include -#include - -#include "webrtc/base/constructormagic.h" -#include "webrtc/modules/audio_coding/audio_network_adaptor/controller.h" -#include "webrtc/modules/audio_coding/audio_network_adaptor/include/audio_network_adaptor.h" -#include "webrtc/system_wrappers/include/file_wrapper.h" - -namespace webrtc { - -class DebugDumpWriter { - public: - static std::unique_ptr Create(FILE* file_handle); - - virtual ~DebugDumpWriter() = default; - - virtual void DumpEncoderRuntimeConfig( - const AudioNetworkAdaptor::EncoderRuntimeConfig& config, - int64_t timestamp) = 0; - - virtual void DumpNetworkMetrics(const Controller::NetworkMetrics& metrics, - int64_t timestamp) = 0; -}; - -} // namespace webrtc - -#endif // WEBRTC_MODULES_AUDIO_CODING_AUDIO_NETWORK_ADAPTOR_DEBUG_DUMP_WRITER_H_ diff --git a/WebRtc.NET/include/webrtc/modules/audio_coding/audio_network_adaptor/dtx_controller.h b/WebRtc.NET/include/webrtc/modules/audio_coding/audio_network_adaptor/dtx_controller.h deleted file mode 100644 index bb8faf45..00000000 --- a/WebRtc.NET/include/webrtc/modules/audio_coding/audio_network_adaptor/dtx_controller.h +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MODULES_AUDIO_CODING_AUDIO_NETWORK_ADAPTOR_DTX_CONTROLLER_H_ -#define WEBRTC_MODULES_AUDIO_CODING_AUDIO_NETWORK_ADAPTOR_DTX_CONTROLLER_H_ - -#include "webrtc/base/constructormagic.h" -#include "webrtc/modules/audio_coding/audio_network_adaptor/controller.h" - -namespace webrtc { - -class DtxController final : public Controller { - public: - struct Config { - Config(bool initial_dtx_enabled, - int dtx_enabling_bandwidth_bps, - int dtx_disabling_bandwidth_bps); - bool initial_dtx_enabled; - // Uplink bandwidth below which DTX should be switched on. - int dtx_enabling_bandwidth_bps; - // Uplink bandwidth above which DTX should be switched off. - int dtx_disabling_bandwidth_bps; - }; - - explicit DtxController(const Config& config); - - void MakeDecision(const NetworkMetrics& metrics, - AudioNetworkAdaptor::EncoderRuntimeConfig* config) override; - - private: - const Config config_; - bool dtx_enabled_; - RTC_DISALLOW_COPY_AND_ASSIGN(DtxController); -}; - -} // namespace webrtc - -#endif // WEBRTC_MODULES_AUDIO_CODING_AUDIO_NETWORK_ADAPTOR_DTX_CONTROLLER_H_ diff --git a/WebRtc.NET/include/webrtc/modules/audio_coding/audio_network_adaptor/fec_controller.h b/WebRtc.NET/include/webrtc/modules/audio_coding/audio_network_adaptor/fec_controller.h deleted file mode 100644 index ac4b1e23..00000000 --- a/WebRtc.NET/include/webrtc/modules/audio_coding/audio_network_adaptor/fec_controller.h +++ /dev/null @@ -1,107 +0,0 @@ -/* - * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MODULES_AUDIO_CODING_AUDIO_NETWORK_ADAPTOR_FEC_CONTROLLER_H_ -#define WEBRTC_MODULES_AUDIO_CODING_AUDIO_NETWORK_ADAPTOR_FEC_CONTROLLER_H_ - -#include - -#include "webrtc/base/constructormagic.h" -#include "webrtc/common_audio/smoothing_filter.h" -#include "webrtc/modules/audio_coding/audio_network_adaptor/controller.h" - -namespace webrtc { - -class FecController final : public Controller { - public: - struct Config { - struct Threshold { - // Threshold defines a curve in the bandwidth/packet-loss domain. The - // curve is characterized by the two conjunction points: A and B. - // - // packet ^ | - // loss | A| - // | \ A: (low_bandwidth_bps, low_bandwidth_packet_loss) - // | \ B: (high_bandwidth_bps, high_bandwidth_packet_loss) - // | B\________ - // |---------------> bandwidth - Threshold(int low_bandwidth_bps, - float low_bandwidth_packet_loss, - int high_bandwidth_bps, - float high_bandwidth_packet_loss); - int low_bandwidth_bps; - float low_bandwidth_packet_loss; - int high_bandwidth_bps; - float high_bandwidth_packet_loss; - }; - - // |fec_enabling_threshold| defines a curve, above which FEC should be - // enabled. |fec_disabling_threshold| defines a curve, under which FEC - // should be disabled. See below - // - // packet-loss ^ | | - // | | | FEC - // | \ \ ON - // | FEC \ \_______ fec_enabling_threshold - // | OFF \_________ fec_disabling_threshold - // |-----------------> bandwidth - Config(bool initial_fec_enabled, - const Threshold& fec_enabling_threshold, - const Threshold& fec_disabling_threshold, - int time_constant_ms, - const Clock* clock); - bool initial_fec_enabled; - Threshold fec_enabling_threshold; - Threshold fec_disabling_threshold; - int time_constant_ms; - const Clock* clock; - }; - - explicit FecController(const Config& config); - - // Dependency injection for testing. - FecController(const Config& config, - std::unique_ptr smoothing_filter); - - ~FecController() override; - - void MakeDecision(const NetworkMetrics& metrics, - AudioNetworkAdaptor::EncoderRuntimeConfig* config) override; - - private: - // Characterize Threshold with packet_loss = slope * bandwidth + offset. - struct ThresholdInfo { - explicit ThresholdInfo(const Config::Threshold& threshold); - float slope; - float offset; - }; - - float GetPacketLossThreshold(int bandwidth_bps, - const Config::Threshold& threshold, - const ThresholdInfo& threshold_info) const; - - bool FecEnablingDecision(const NetworkMetrics& metrics, - const rtc::Optional& packet_loss) const; - bool FecDisablingDecision(const NetworkMetrics& metrics, - const rtc::Optional& packet_loss) const; - - const Config config_; - bool fec_enabled_; - std::unique_ptr packet_loss_smoothed_; - - const ThresholdInfo fec_enabling_threshold_info_; - const ThresholdInfo fec_disabling_threshold_info_; - - RTC_DISALLOW_COPY_AND_ASSIGN(FecController); -}; - -} // namespace webrtc - -#endif // WEBRTC_MODULES_AUDIO_CODING_AUDIO_NETWORK_ADAPTOR_FEC_CONTROLLER_H_ diff --git a/WebRtc.NET/include/webrtc/modules/audio_coding/audio_network_adaptor/frame_length_controller.h b/WebRtc.NET/include/webrtc/modules/audio_coding/audio_network_adaptor/frame_length_controller.h deleted file mode 100644 index bce7f8ff..00000000 --- a/WebRtc.NET/include/webrtc/modules/audio_coding/audio_network_adaptor/frame_length_controller.h +++ /dev/null @@ -1,85 +0,0 @@ -/* - * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MODULES_AUDIO_CODING_AUDIO_NETWORK_ADAPTOR_FRAME_LENGTH_CONTROLLER_H_ -#define WEBRTC_MODULES_AUDIO_CODING_AUDIO_NETWORK_ADAPTOR_FRAME_LENGTH_CONTROLLER_H_ - -#include -#include - -#include "webrtc/base/constructormagic.h" -#include "webrtc/modules/audio_coding/audio_network_adaptor/controller.h" - -namespace webrtc { - -// Determines target frame length based on the network metrics and the decision -// of FEC controller. -class FrameLengthController final : public Controller { - public: - struct Config { - Config(const std::vector& encoder_frame_lengths_ms, - int initial_frame_length_ms, - float fl_increasing_packet_loss_fraction, - float fl_decreasing_packet_loss_fraction, - int fl_20ms_to_60ms_bandwidth_bps, - int fl_60ms_to_20ms_bandwidth_bps); - Config(const Config& other); - ~Config(); - std::vector encoder_frame_lengths_ms; - int initial_frame_length_ms; - // Uplink packet loss fraction below which frame length can increase. - float fl_increasing_packet_loss_fraction; - // Uplink packet loss fraction below which frame length should decrease. - float fl_decreasing_packet_loss_fraction; - // Uplink bandwidth below which frame length can switch from 20ms to 60ms. - int fl_20ms_to_60ms_bandwidth_bps; - // Uplink bandwidth above which frame length should switch from 60ms to - // 20ms. - int fl_60ms_to_20ms_bandwidth_bps; - }; - - explicit FrameLengthController(const Config& config); - - ~FrameLengthController() override; - - void MakeDecision(const NetworkMetrics& metrics, - AudioNetworkAdaptor::EncoderRuntimeConfig* config) override; - - private: - friend class FrameLengthControllerForTest; - - struct FrameLengthChange { - FrameLengthChange(int from_frame_length_ms, int to_frame_length_ms); - ~FrameLengthChange(); - bool operator<(const FrameLengthChange& rhs) const; - int from_frame_length_ms; - int to_frame_length_ms; - }; - - bool FrameLengthIncreasingDecision( - const NetworkMetrics& metrics, - const AudioNetworkAdaptor::EncoderRuntimeConfig& config) const; - - bool FrameLengthDecreasingDecision( - const NetworkMetrics& metrics, - const AudioNetworkAdaptor::EncoderRuntimeConfig& config) const; - - const Config config_; - - std::vector::const_iterator frame_length_ms_; - - std::map frame_length_change_criteria_; - - RTC_DISALLOW_COPY_AND_ASSIGN(FrameLengthController); -}; - -} // namespace webrtc - -#endif // WEBRTC_MODULES_AUDIO_CODING_AUDIO_NETWORK_ADAPTOR_FRAME_LENGTH_CONTROLLER_H_ diff --git a/WebRtc.NET/include/webrtc/modules/audio_coding/audio_network_adaptor/include/audio_network_adaptor.h b/WebRtc.NET/include/webrtc/modules/audio_coding/audio_network_adaptor/include/audio_network_adaptor.h deleted file mode 100644 index 14ddbca0..00000000 --- a/WebRtc.NET/include/webrtc/modules/audio_coding/audio_network_adaptor/include/audio_network_adaptor.h +++ /dev/null @@ -1,61 +0,0 @@ -/* - * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MODULES_AUDIO_CODING_AUDIO_NETWORK_ADAPTOR_INCLUDE_AUDIO_NETWORK_ADAPTOR_H_ -#define WEBRTC_MODULES_AUDIO_CODING_AUDIO_NETWORK_ADAPTOR_INCLUDE_AUDIO_NETWORK_ADAPTOR_H_ - -#include "webrtc/base/optional.h" - -namespace webrtc { - -// An AudioNetworkAdaptor optimizes the audio experience by suggesting a -// suitable runtime configuration (bit rate, frame length, FEC, etc.) to the -// encoder based on network metrics. -class AudioNetworkAdaptor { - public: - struct EncoderRuntimeConfig { - EncoderRuntimeConfig(); - EncoderRuntimeConfig(const EncoderRuntimeConfig& other); - ~EncoderRuntimeConfig(); - rtc::Optional bitrate_bps; - rtc::Optional frame_length_ms; - rtc::Optional uplink_packet_loss_fraction; - rtc::Optional enable_fec; - rtc::Optional enable_dtx; - - // Some encoders can encode fewer channels than the actual input to make - // better use of the bandwidth. |num_channels| sets the number of channels - // to encode. - rtc::Optional num_channels; - }; - - virtual ~AudioNetworkAdaptor() = default; - - virtual void SetUplinkBandwidth(int uplink_bandwidth_bps) = 0; - - virtual void SetUplinkPacketLossFraction( - float uplink_packet_loss_fraction) = 0; - - virtual void SetRtt(int rtt_ms) = 0; - - virtual void SetTargetAudioBitrate(int target_audio_bitrate_bps) = 0; - - virtual void SetOverhead(size_t overhead_bytes_per_packet) = 0; - - virtual EncoderRuntimeConfig GetEncoderRuntimeConfig() = 0; - - virtual void StartDebugDump(FILE* file_handle) = 0; - - virtual void StopDebugDump() = 0; -}; - -} // namespace webrtc - -#endif // WEBRTC_MODULES_AUDIO_CODING_AUDIO_NETWORK_ADAPTOR_INCLUDE_AUDIO_NETWORK_ADAPTOR_H_ diff --git a/WebRtc.NET/include/webrtc/modules/audio_coding/audio_network_adaptor/mock/mock_audio_network_adaptor.h b/WebRtc.NET/include/webrtc/modules/audio_coding/audio_network_adaptor/mock/mock_audio_network_adaptor.h deleted file mode 100644 index a826911c..00000000 --- a/WebRtc.NET/include/webrtc/modules/audio_coding/audio_network_adaptor/mock/mock_audio_network_adaptor.h +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MODULES_AUDIO_CODING_AUDIO_NETWORK_ADAPTOR_MOCK_MOCK_AUDIO_NETWORK_ADAPTOR_H_ -#define WEBRTC_MODULES_AUDIO_CODING_AUDIO_NETWORK_ADAPTOR_MOCK_MOCK_AUDIO_NETWORK_ADAPTOR_H_ - -#include "webrtc/modules/audio_coding/audio_network_adaptor/include/audio_network_adaptor.h" -#include "webrtc/test/gmock.h" - -namespace webrtc { - -class MockAudioNetworkAdaptor : public AudioNetworkAdaptor { - public: - virtual ~MockAudioNetworkAdaptor() { Die(); } - MOCK_METHOD0(Die, void()); - - MOCK_METHOD1(SetUplinkBandwidth, void(int uplink_bandwidth_bps)); - - MOCK_METHOD1(SetUplinkPacketLossFraction, - void(float uplink_packet_loss_fraction)); - - MOCK_METHOD1(SetRtt, void(int rtt_ms)); - - MOCK_METHOD1(SetTargetAudioBitrate, void(int target_audio_bitrate_bps)); - - MOCK_METHOD1(SetOverhead, void(size_t overhead_bytes_per_packet)); - - MOCK_METHOD0(GetEncoderRuntimeConfig, EncoderRuntimeConfig()); - - MOCK_METHOD1(StartDebugDump, void(FILE* file_handle)); - - MOCK_METHOD0(StopDebugDump, void()); -}; - -} // namespace webrtc - -#endif // WEBRTC_MODULES_AUDIO_CODING_AUDIO_NETWORK_ADAPTOR_MOCK_MOCK_AUDIO_NETWORK_ADAPTOR_H_ diff --git a/WebRtc.NET/include/webrtc/modules/audio_coding/audio_network_adaptor/mock/mock_controller.h b/WebRtc.NET/include/webrtc/modules/audio_coding/audio_network_adaptor/mock/mock_controller.h deleted file mode 100644 index 21acadd2..00000000 --- a/WebRtc.NET/include/webrtc/modules/audio_coding/audio_network_adaptor/mock/mock_controller.h +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MODULES_AUDIO_CODING_AUDIO_NETWORK_ADAPTOR_MOCK_MOCK_CONTROLLER_H_ -#define WEBRTC_MODULES_AUDIO_CODING_AUDIO_NETWORK_ADAPTOR_MOCK_MOCK_CONTROLLER_H_ - -#include "webrtc/modules/audio_coding/audio_network_adaptor/controller.h" -#include "webrtc/test/gmock.h" - -namespace webrtc { - -class MockController : public Controller { - public: - virtual ~MockController() { Die(); } - MOCK_METHOD0(Die, void()); - MOCK_METHOD2(MakeDecision, - void(const NetworkMetrics& metrics, - AudioNetworkAdaptor::EncoderRuntimeConfig* config)); -}; - -} // namespace webrtc - -#endif // WEBRTC_MODULES_AUDIO_CODING_AUDIO_NETWORK_ADAPTOR_MOCK_MOCK_CONTROLLER_H_ diff --git a/WebRtc.NET/include/webrtc/modules/audio_coding/audio_network_adaptor/mock/mock_controller_manager.h b/WebRtc.NET/include/webrtc/modules/audio_coding/audio_network_adaptor/mock/mock_controller_manager.h deleted file mode 100644 index 4976fd8d..00000000 --- a/WebRtc.NET/include/webrtc/modules/audio_coding/audio_network_adaptor/mock/mock_controller_manager.h +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MODULES_AUDIO_CODING_AUDIO_NETWORK_ADAPTOR_MOCK_MOCK_CONTROLLER_MANAGER_H_ -#define WEBRTC_MODULES_AUDIO_CODING_AUDIO_NETWORK_ADAPTOR_MOCK_MOCK_CONTROLLER_MANAGER_H_ - -#include - -#include "webrtc/modules/audio_coding/audio_network_adaptor/controller_manager.h" -#include "webrtc/test/gmock.h" - -namespace webrtc { - -class MockControllerManager : public ControllerManager { - public: - virtual ~MockControllerManager() { Die(); } - MOCK_METHOD0(Die, void()); - MOCK_METHOD1( - GetSortedControllers, - std::vector(const Controller::NetworkMetrics& metrics)); - MOCK_CONST_METHOD0(GetControllers, std::vector()); -}; - -} // namespace webrtc - -#endif // WEBRTC_MODULES_AUDIO_CODING_AUDIO_NETWORK_ADAPTOR_MOCK_MOCK_CONTROLLER_MANAGER_H_ diff --git a/WebRtc.NET/include/webrtc/modules/audio_coding/audio_network_adaptor/mock/mock_debug_dump_writer.h b/WebRtc.NET/include/webrtc/modules/audio_coding/audio_network_adaptor/mock/mock_debug_dump_writer.h deleted file mode 100644 index 6a20f7a6..00000000 --- a/WebRtc.NET/include/webrtc/modules/audio_coding/audio_network_adaptor/mock/mock_debug_dump_writer.h +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MODULES_AUDIO_CODING_AUDIO_NETWORK_ADAPTOR_MOCK_MOCK_DEBUG_DUMP_WRITER_H_ -#define WEBRTC_MODULES_AUDIO_CODING_AUDIO_NETWORK_ADAPTOR_MOCK_MOCK_DEBUG_DUMP_WRITER_H_ - -#include "webrtc/modules/audio_coding/audio_network_adaptor/debug_dump_writer.h" -#include "webrtc/test/gmock.h" - -namespace webrtc { - -class MockDebugDumpWriter : public DebugDumpWriter { - public: - virtual ~MockDebugDumpWriter() { Die(); } - MOCK_METHOD0(Die, void()); - - MOCK_METHOD2(DumpEncoderRuntimeConfig, - void(const AudioNetworkAdaptor::EncoderRuntimeConfig& config, - int64_t timestamp)); - MOCK_METHOD2(DumpNetworkMetrics, - void(const Controller::NetworkMetrics& metrics, - int64_t timestamp)); -}; - -} // namespace webrtc - -#endif // WEBRTC_MODULES_AUDIO_CODING_AUDIO_NETWORK_ADAPTOR_MOCK_MOCK_DEBUG_DUMP_WRITER_H_ diff --git a/WebRtc.NET/include/webrtc/modules/audio_coding/codecs/audio_decoder.h b/WebRtc.NET/include/webrtc/modules/audio_coding/codecs/audio_decoder.h deleted file mode 100644 index 8468da20..00000000 --- a/WebRtc.NET/include/webrtc/modules/audio_coding/codecs/audio_decoder.h +++ /dev/null @@ -1,179 +0,0 @@ -/* - * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MODULES_AUDIO_CODING_CODECS_AUDIO_DECODER_H_ -#define WEBRTC_MODULES_AUDIO_CODING_CODECS_AUDIO_DECODER_H_ - -#include -#include - -#include "webrtc/base/array_view.h" -#include "webrtc/base/buffer.h" -#include "webrtc/base/constructormagic.h" -#include "webrtc/base/optional.h" -#include "webrtc/typedefs.h" - -namespace webrtc { - -// This is the interface class for decoders in NetEQ. Each codec type will have -// and implementation of this class. -class AudioDecoder { - public: - enum SpeechType { - kSpeech = 1, - kComfortNoise = 2 - }; - - // Used by PacketDuration below. Save the value -1 for errors. - enum { kNotImplemented = -2 }; - - AudioDecoder() = default; - virtual ~AudioDecoder() = default; - - class EncodedAudioFrame { - public: - struct DecodeResult { - size_t num_decoded_samples; - SpeechType speech_type; - }; - - virtual ~EncodedAudioFrame() = default; - - // Returns the duration in samples-per-channel of this audio frame. - // If no duration can be ascertained, returns zero. - virtual size_t Duration() const = 0; - - // Decodes this frame of audio and writes the result in |decoded|. - // |decoded| must be large enough to store as many samples as indicated by a - // call to Duration() . On success, returns an rtc::Optional containing the - // total number of samples across all channels, as well as whether the - // decoder produced comfort noise or speech. On failure, returns an empty - // rtc::Optional. Decode may be called at most once per frame object. - virtual rtc::Optional Decode( - rtc::ArrayView decoded) const = 0; - }; - - struct ParseResult { - ParseResult(); - ParseResult(uint32_t timestamp, - int priority, - std::unique_ptr frame); - ParseResult(ParseResult&& b); - ~ParseResult(); - - ParseResult& operator=(ParseResult&& b); - - // The timestamp of the frame is in samples per channel. - uint32_t timestamp; - // The relative priority of the frame compared to other frames of the same - // payload and the same timeframe. A higher value means a lower priority. - // The highest priority is zero - negative values are not allowed. - int priority; - std::unique_ptr frame; - }; - - // Let the decoder parse this payload and prepare zero or more decodable - // frames. Each frame must be between 10 ms and 120 ms long. The caller must - // ensure that the AudioDecoder object outlives any frame objects returned by - // this call. The decoder is free to swap or move the data from the |payload| - // buffer. |timestamp| is the input timestamp, in samples, corresponding to - // the start of the payload. - virtual std::vector ParsePayload(rtc::Buffer&& payload, - uint32_t timestamp); - - // Decodes |encode_len| bytes from |encoded| and writes the result in - // |decoded|. The maximum bytes allowed to be written into |decoded| is - // |max_decoded_bytes|. Returns the total number of samples across all - // channels. If the decoder produced comfort noise, |speech_type| - // is set to kComfortNoise, otherwise it is kSpeech. The desired output - // sample rate is provided in |sample_rate_hz|, which must be valid for the - // codec at hand. - int Decode(const uint8_t* encoded, - size_t encoded_len, - int sample_rate_hz, - size_t max_decoded_bytes, - int16_t* decoded, - SpeechType* speech_type); - - // Same as Decode(), but interfaces to the decoders redundant decode function. - // The default implementation simply calls the regular Decode() method. - int DecodeRedundant(const uint8_t* encoded, - size_t encoded_len, - int sample_rate_hz, - size_t max_decoded_bytes, - int16_t* decoded, - SpeechType* speech_type); - - // Indicates if the decoder implements the DecodePlc method. - virtual bool HasDecodePlc() const; - - // Calls the packet-loss concealment of the decoder to update the state after - // one or several lost packets. The caller has to make sure that the - // memory allocated in |decoded| should accommodate |num_frames| frames. - virtual size_t DecodePlc(size_t num_frames, int16_t* decoded); - - // Resets the decoder state (empty buffers etc.). - virtual void Reset() = 0; - - // Notifies the decoder of an incoming packet to NetEQ. - virtual int IncomingPacket(const uint8_t* payload, - size_t payload_len, - uint16_t rtp_sequence_number, - uint32_t rtp_timestamp, - uint32_t arrival_timestamp); - - // Returns the last error code from the decoder. - virtual int ErrorCode(); - - // Returns the duration in samples-per-channel of the payload in |encoded| - // which is |encoded_len| bytes long. Returns kNotImplemented if no duration - // estimate is available, or -1 in case of an error. - virtual int PacketDuration(const uint8_t* encoded, size_t encoded_len) const; - - // Returns the duration in samples-per-channel of the redandant payload in - // |encoded| which is |encoded_len| bytes long. Returns kNotImplemented if no - // duration estimate is available, or -1 in case of an error. - virtual int PacketDurationRedundant(const uint8_t* encoded, - size_t encoded_len) const; - - // Detects whether a packet has forward error correction. The packet is - // comprised of the samples in |encoded| which is |encoded_len| bytes long. - // Returns true if the packet has FEC and false otherwise. - virtual bool PacketHasFec(const uint8_t* encoded, size_t encoded_len) const; - - // Returns the actual sample rate of the decoder's output. This value may not - // change during the lifetime of the decoder. - virtual int SampleRateHz() const = 0; - - // The number of channels in the decoder's output. This value may not change - // during the lifetime of the decoder. - virtual size_t Channels() const = 0; - - protected: - static SpeechType ConvertSpeechType(int16_t type); - - virtual int DecodeInternal(const uint8_t* encoded, - size_t encoded_len, - int sample_rate_hz, - int16_t* decoded, - SpeechType* speech_type) = 0; - - virtual int DecodeRedundantInternal(const uint8_t* encoded, - size_t encoded_len, - int sample_rate_hz, - int16_t* decoded, - SpeechType* speech_type); - - private: - RTC_DISALLOW_COPY_AND_ASSIGN(AudioDecoder); -}; - -} // namespace webrtc -#endif // WEBRTC_MODULES_AUDIO_CODING_CODECS_AUDIO_DECODER_H_ diff --git a/WebRtc.NET/include/webrtc/modules/audio_coding/codecs/audio_decoder_factory.h b/WebRtc.NET/include/webrtc/modules/audio_coding/codecs/audio_decoder_factory.h deleted file mode 100644 index ca578f34..00000000 --- a/WebRtc.NET/include/webrtc/modules/audio_coding/codecs/audio_decoder_factory.h +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MODULES_AUDIO_CODING_CODECS_AUDIO_DECODER_FACTORY_H_ -#define WEBRTC_MODULES_AUDIO_CODING_CODECS_AUDIO_DECODER_FACTORY_H_ - -#include -#include - -#include "webrtc/base/atomicops.h" -#include "webrtc/base/refcount.h" -#include "webrtc/modules/audio_coding/codecs/audio_decoder.h" -#include "webrtc/modules/audio_coding/codecs/audio_format.h" - -namespace webrtc { - -// A factory that creates AudioDecoders. -// NOTE: This class is still under development and may change without notice. -class AudioDecoderFactory : public rtc::RefCountInterface { - public: - virtual std::vector GetSupportedDecoders() = 0; - - virtual bool IsSupportedDecoder(const SdpAudioFormat& format) = 0; - - virtual std::unique_ptr MakeAudioDecoder( - const SdpAudioFormat& format) = 0; -}; - -} // namespace webrtc - -#endif // WEBRTC_MODULES_AUDIO_CODING_CODECS_AUDIO_DECODER_FACTORY_H_ diff --git a/WebRtc.NET/include/webrtc/modules/audio_coding/codecs/audio_encoder.h b/WebRtc.NET/include/webrtc/modules/audio_coding/codecs/audio_encoder.h deleted file mode 100644 index 47152f9e..00000000 --- a/WebRtc.NET/include/webrtc/modules/audio_coding/codecs/audio_encoder.h +++ /dev/null @@ -1,207 +0,0 @@ -/* - * Copyright (c) 2014 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MODULES_AUDIO_CODING_CODECS_AUDIO_ENCODER_H_ -#define WEBRTC_MODULES_AUDIO_CODING_CODECS_AUDIO_ENCODER_H_ - -#include -#include - -#include "webrtc/base/array_view.h" -#include "webrtc/base/buffer.h" -#include "webrtc/base/deprecation.h" -#include "webrtc/base/optional.h" -#include "webrtc/typedefs.h" - -namespace webrtc { - -class Clock; -class RtcEventLog; - -// This is the interface class for encoders in AudioCoding module. Each codec -// type must have an implementation of this class. -class AudioEncoder { - public: - // Used for UMA logging of codec usage. The same codecs, with the - // same values, must be listed in - // src/tools/metrics/histograms/histograms.xml in chromium to log - // correct values. - enum class CodecType { - kOther = 0, // Codec not specified, and/or not listed in this enum - kOpus = 1, - kIsac = 2, - kPcmA = 3, - kPcmU = 4, - kG722 = 5, - kIlbc = 6, - - // Number of histogram bins in the UMA logging of codec types. The - // total number of different codecs that are logged cannot exceed this - // number. - kMaxLoggedAudioCodecTypes - }; - - struct EncodedInfoLeaf { - size_t encoded_bytes = 0; - uint32_t encoded_timestamp = 0; - int payload_type = 0; - bool send_even_if_empty = false; - bool speech = true; - CodecType encoder_type = CodecType::kOther; - }; - - // This is the main struct for auxiliary encoding information. Each encoded - // packet should be accompanied by one EncodedInfo struct, containing the - // total number of |encoded_bytes|, the |encoded_timestamp| and the - // |payload_type|. If the packet contains redundant encodings, the |redundant| - // vector will be populated with EncodedInfoLeaf structs. Each struct in the - // vector represents one encoding; the order of structs in the vector is the - // same as the order in which the actual payloads are written to the byte - // stream. When EncoderInfoLeaf structs are present in the vector, the main - // struct's |encoded_bytes| will be the sum of all the |encoded_bytes| in the - // vector. - struct EncodedInfo : public EncodedInfoLeaf { - EncodedInfo(); - EncodedInfo(const EncodedInfo&); - EncodedInfo(EncodedInfo&&); - ~EncodedInfo(); - EncodedInfo& operator=(const EncodedInfo&); - EncodedInfo& operator=(EncodedInfo&&); - - std::vector redundant; - }; - - virtual ~AudioEncoder() = default; - - // Returns the input sample rate in Hz and the number of input channels. - // These are constants set at instantiation time. - virtual int SampleRateHz() const = 0; - virtual size_t NumChannels() const = 0; - - // Returns the rate at which the RTP timestamps are updated. The default - // implementation returns SampleRateHz(). - virtual int RtpTimestampRateHz() const; - - // Returns the number of 10 ms frames the encoder will put in the next - // packet. This value may only change when Encode() outputs a packet; i.e., - // the encoder may vary the number of 10 ms frames from packet to packet, but - // it must decide the length of the next packet no later than when outputting - // the preceding packet. - virtual size_t Num10MsFramesInNextPacket() const = 0; - - // Returns the maximum value that can be returned by - // Num10MsFramesInNextPacket(). - virtual size_t Max10MsFramesInAPacket() const = 0; - - // Returns the current target bitrate in bits/s. The value -1 means that the - // codec adapts the target automatically, and a current target cannot be - // provided. - virtual int GetTargetBitrate() const = 0; - - // Accepts one 10 ms block of input audio (i.e., SampleRateHz() / 100 * - // NumChannels() samples). Multi-channel audio must be sample-interleaved. - // The encoder appends zero or more bytes of output to |encoded| and returns - // additional encoding information. Encode() checks some preconditions, calls - // EncodeImpl() which does the actual work, and then checks some - // postconditions. - EncodedInfo Encode(uint32_t rtp_timestamp, - rtc::ArrayView audio, - rtc::Buffer* encoded); - - // Resets the encoder to its starting state, discarding any input that has - // been fed to the encoder but not yet emitted in a packet. - virtual void Reset() = 0; - - // Enables or disables codec-internal FEC (forward error correction). Returns - // true if the codec was able to comply. The default implementation returns - // true when asked to disable FEC and false when asked to enable it (meaning - // that FEC isn't supported). - virtual bool SetFec(bool enable); - - // Enables or disables codec-internal VAD/DTX. Returns true if the codec was - // able to comply. The default implementation returns true when asked to - // disable DTX and false when asked to enable it (meaning that DTX isn't - // supported). - virtual bool SetDtx(bool enable); - - // Returns the status of codec-internal DTX. The default implementation always - // returns false. - virtual bool GetDtx() const; - - // Sets the application mode. Returns true if the codec was able to comply. - // The default implementation just returns false. - enum class Application { kSpeech, kAudio }; - virtual bool SetApplication(Application application); - - // Tells the encoder about the highest sample rate the decoder is expected to - // use when decoding the bitstream. The encoder would typically use this - // information to adjust the quality of the encoding. The default - // implementation does nothing. - virtual void SetMaxPlaybackRate(int frequency_hz); - - // This is to be deprecated. Please use |OnReceivedTargetAudioBitrate| - // instead. - // Tells the encoder what average bitrate we'd like it to produce. The - // encoder is free to adjust or disregard the given bitrate (the default - // implementation does the latter). - RTC_DEPRECATED virtual void SetTargetBitrate(int target_bps); - - // Causes this encoder to let go of any other encoders it contains, and - // returns a pointer to an array where they are stored (which is required to - // live as long as this encoder). Unless the returned array is empty, you may - // not call any methods on this encoder afterwards, except for the - // destructor. The default implementation just returns an empty array. - // NOTE: This method is subject to change. Do not call or override it. - virtual rtc::ArrayView> - ReclaimContainedEncoders(); - - // Enables audio network adaptor. Returns true if successful. - virtual bool EnableAudioNetworkAdaptor(const std::string& config_string, - RtcEventLog* event_log, - const Clock* clock); - - // Disables audio network adaptor. - virtual void DisableAudioNetworkAdaptor(); - - // Provides uplink packet loss fraction to this encoder to allow it to adapt. - // |uplink_packet_loss_fraction| is in the range [0.0, 1.0]. - virtual void OnReceivedUplinkPacketLossFraction( - float uplink_packet_loss_fraction); - - // Provides target audio bitrate to this encoder to allow it to adapt. - virtual void OnReceivedTargetAudioBitrate(int target_bps); - - // Provides target audio bitrate and corresponding probing interval of - // the bandwidth estimator to this encoder to allow it to adapt. - virtual void OnReceivedUplinkBandwidth( - int target_audio_bitrate_bps, - rtc::Optional probing_interval_ms); - - // Provides RTT to this encoder to allow it to adapt. - virtual void OnReceivedRtt(int rtt_ms); - - // Provides overhead to this encoder to adapt. The overhead is the number of - // bytes that will be added to each packet the encoder generates. - virtual void OnReceivedOverhead(size_t overhead_bytes_per_packet); - - // To allow encoder to adapt its frame length, it must be provided the frame - // length range that receivers can accept. - virtual void SetReceiverFrameLengthRange(int min_frame_length_ms, - int max_frame_length_ms); - - protected: - // Subclasses implement this to perform the actual encoding. Called by - // Encode(). - virtual EncodedInfo EncodeImpl(uint32_t rtp_timestamp, - rtc::ArrayView audio, - rtc::Buffer* encoded) = 0; -}; -} // namespace webrtc -#endif // WEBRTC_MODULES_AUDIO_CODING_CODECS_AUDIO_ENCODER_H_ diff --git a/WebRtc.NET/include/webrtc/modules/audio_coding/codecs/audio_format.h b/WebRtc.NET/include/webrtc/modules/audio_coding/codecs/audio_format.h deleted file mode 100644 index b3f803cd..00000000 --- a/WebRtc.NET/include/webrtc/modules/audio_coding/codecs/audio_format.h +++ /dev/null @@ -1,65 +0,0 @@ -/* - * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MODULES_AUDIO_CODING_CODECS_AUDIO_FORMAT_H_ -#define WEBRTC_MODULES_AUDIO_CODING_CODECS_AUDIO_FORMAT_H_ - -#include -#include -#include -#include - -namespace webrtc { - -// SDP specification for a single audio codec. -// NOTE: This class is still under development and may change without notice. -struct SdpAudioFormat { - using Parameters = std::map; - - SdpAudioFormat(const SdpAudioFormat&); - SdpAudioFormat(SdpAudioFormat&&); - SdpAudioFormat(const char* name, int clockrate_hz, int num_channels); - SdpAudioFormat(const std::string& name, int clockrate_hz, int num_channels); - SdpAudioFormat(const char* name, - int clockrate_hz, - int num_channels, - const Parameters& param); - SdpAudioFormat(const std::string& name, - int clockrate_hz, - int num_channels, - const Parameters& param); - ~SdpAudioFormat(); - - SdpAudioFormat& operator=(const SdpAudioFormat&); - SdpAudioFormat& operator=(SdpAudioFormat&&); - - friend bool operator==(const SdpAudioFormat& a, const SdpAudioFormat& b); - friend bool operator!=(const SdpAudioFormat& a, const SdpAudioFormat& b) { - return !(a == b); - } - - std::string name; - int clockrate_hz; - int num_channels; - Parameters parameters; -}; - -void swap(SdpAudioFormat& a, SdpAudioFormat& b); -std::ostream& operator<<(std::ostream& os, const SdpAudioFormat& saf); - -struct AudioCodecSpec { - SdpAudioFormat format; - bool allow_comfort_noise; // This encoder can be used with an external - // comfort noise generator. -}; - -} // namespace webrtc - -#endif // WEBRTC_MODULES_AUDIO_CODING_CODECS_AUDIO_FORMAT_H_ diff --git a/WebRtc.NET/include/webrtc/modules/audio_coding/codecs/audio_format_conversion.h b/WebRtc.NET/include/webrtc/modules/audio_coding/codecs/audio_format_conversion.h deleted file mode 100644 index 9267a52b..00000000 --- a/WebRtc.NET/include/webrtc/modules/audio_coding/codecs/audio_format_conversion.h +++ /dev/null @@ -1,24 +0,0 @@ -/* - * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MODULES_AUDIO_CODING_CODECS_AUDIO_FORMAT_CONVERSION_H_ -#define WEBRTC_MODULES_AUDIO_CODING_CODECS_AUDIO_FORMAT_CONVERSION_H_ - -#include "webrtc/common_types.h" -#include "webrtc/modules/audio_coding/codecs/audio_format.h" - -namespace webrtc { - -SdpAudioFormat CodecInstToSdp(const CodecInst& codec_inst); -CodecInst SdpToCodecInst(int payload_type, const SdpAudioFormat& audio_format); - -} // namespace webrtc - -#endif // WEBRTC_MODULES_AUDIO_CODING_CODECS_AUDIO_FORMAT_CONVERSION_H_ diff --git a/WebRtc.NET/include/webrtc/modules/audio_coding/codecs/builtin_audio_decoder_factory.h b/WebRtc.NET/include/webrtc/modules/audio_coding/codecs/builtin_audio_decoder_factory.h deleted file mode 100644 index 7bc35863..00000000 --- a/WebRtc.NET/include/webrtc/modules/audio_coding/codecs/builtin_audio_decoder_factory.h +++ /dev/null @@ -1,27 +0,0 @@ -/* - * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MODULES_AUDIO_CODING_CODECS_BUILTIN_AUDIO_DECODER_FACTORY_H_ -#define WEBRTC_MODULES_AUDIO_CODING_CODECS_BUILTIN_AUDIO_DECODER_FACTORY_H_ - -#include - -#include "webrtc/base/scoped_ref_ptr.h" -#include "webrtc/modules/audio_coding/codecs/audio_decoder_factory.h" - -namespace webrtc { - -// Creates a new factory that can create the built-in types of audio decoders. -// NOTE: This function is still under development and may change without notice. -rtc::scoped_refptr CreateBuiltinAudioDecoderFactory(); - -} // namespace webrtc - -#endif // WEBRTC_MODULES_AUDIO_CODING_CODECS_BUILTIN_AUDIO_DECODER_FACTORY_H_ diff --git a/WebRtc.NET/include/webrtc/modules/audio_coding/codecs/g722/audio_decoder_g722.h b/WebRtc.NET/include/webrtc/modules/audio_coding/codecs/g722/audio_decoder_g722.h deleted file mode 100644 index 9e7c5d9d..00000000 --- a/WebRtc.NET/include/webrtc/modules/audio_coding/codecs/g722/audio_decoder_g722.h +++ /dev/null @@ -1,79 +0,0 @@ -/* - * Copyright (c) 2015 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MODULES_AUDIO_CODING_CODECS_G722_AUDIO_DECODER_G722_H_ -#define WEBRTC_MODULES_AUDIO_CODING_CODECS_G722_AUDIO_DECODER_G722_H_ - -#include "webrtc/base/constructormagic.h" -#include "webrtc/modules/audio_coding/codecs/audio_decoder.h" - -typedef struct WebRtcG722DecInst G722DecInst; - -namespace webrtc { - -class AudioDecoderG722 final : public AudioDecoder { - public: - AudioDecoderG722(); - ~AudioDecoderG722() override; - bool HasDecodePlc() const override; - void Reset() override; - std::vector ParsePayload(rtc::Buffer&& payload, - uint32_t timestamp) override; - int PacketDuration(const uint8_t* encoded, size_t encoded_len) const override; - int SampleRateHz() const override; - size_t Channels() const override; - - protected: - int DecodeInternal(const uint8_t* encoded, - size_t encoded_len, - int sample_rate_hz, - int16_t* decoded, - SpeechType* speech_type) override; - - private: - G722DecInst* dec_state_; - RTC_DISALLOW_COPY_AND_ASSIGN(AudioDecoderG722); -}; - -class AudioDecoderG722Stereo final : public AudioDecoder { - public: - AudioDecoderG722Stereo(); - ~AudioDecoderG722Stereo() override; - void Reset() override; - std::vector ParsePayload(rtc::Buffer&& payload, - uint32_t timestamp) override; - int SampleRateHz() const override; - size_t Channels() const override; - - protected: - int DecodeInternal(const uint8_t* encoded, - size_t encoded_len, - int sample_rate_hz, - int16_t* decoded, - SpeechType* speech_type) override; - - private: - // Splits the stereo-interleaved payload in |encoded| into separate payloads - // for left and right channels. The separated payloads are written to - // |encoded_deinterleaved|, which must hold at least |encoded_len| samples. - // The left channel starts at offset 0, while the right channel starts at - // offset encoded_len / 2 into |encoded_deinterleaved|. - void SplitStereoPacket(const uint8_t* encoded, - size_t encoded_len, - uint8_t* encoded_deinterleaved); - - G722DecInst* dec_state_left_; - G722DecInst* dec_state_right_; - RTC_DISALLOW_COPY_AND_ASSIGN(AudioDecoderG722Stereo); -}; - -} // namespace webrtc - -#endif // WEBRTC_MODULES_AUDIO_CODING_CODECS_G722_AUDIO_DECODER_G722_H_ diff --git a/WebRtc.NET/include/webrtc/modules/audio_coding/codecs/g722/audio_encoder_g722.h b/WebRtc.NET/include/webrtc/modules/audio_coding/codecs/g722/audio_encoder_g722.h deleted file mode 100644 index ad49a865..00000000 --- a/WebRtc.NET/include/webrtc/modules/audio_coding/codecs/g722/audio_encoder_g722.h +++ /dev/null @@ -1,75 +0,0 @@ -/* - * Copyright (c) 2014 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MODULES_AUDIO_CODING_CODECS_G722_AUDIO_ENCODER_G722_H_ -#define WEBRTC_MODULES_AUDIO_CODING_CODECS_G722_AUDIO_ENCODER_G722_H_ - -#include - -#include "webrtc/base/buffer.h" -#include "webrtc/base/constructormagic.h" -#include "webrtc/modules/audio_coding/codecs/audio_encoder.h" -#include "webrtc/modules/audio_coding/codecs/g722/g722_interface.h" - -namespace webrtc { - -struct CodecInst; - -class AudioEncoderG722 final : public AudioEncoder { - public: - struct Config { - bool IsOk() const; - - int payload_type = 9; - int frame_size_ms = 20; - size_t num_channels = 1; - }; - - explicit AudioEncoderG722(const Config& config); - explicit AudioEncoderG722(const CodecInst& codec_inst); - ~AudioEncoderG722() override; - - int SampleRateHz() const override; - size_t NumChannels() const override; - int RtpTimestampRateHz() const override; - size_t Num10MsFramesInNextPacket() const override; - size_t Max10MsFramesInAPacket() const override; - int GetTargetBitrate() const override; - void Reset() override; - - protected: - EncodedInfo EncodeImpl(uint32_t rtp_timestamp, - rtc::ArrayView audio, - rtc::Buffer* encoded) override; - - private: - // The encoder state for one channel. - struct EncoderState { - G722EncInst* encoder; - std::unique_ptr speech_buffer; // Queued up for encoding. - rtc::Buffer encoded_buffer; // Already encoded. - EncoderState(); - ~EncoderState(); - }; - - size_t SamplesPerChannel() const; - - const size_t num_channels_; - const int payload_type_; - const size_t num_10ms_frames_per_packet_; - size_t num_10ms_frames_buffered_; - uint32_t first_timestamp_in_buffer_; - const std::unique_ptr encoders_; - rtc::Buffer interleave_buffer_; - RTC_DISALLOW_COPY_AND_ASSIGN(AudioEncoderG722); -}; - -} // namespace webrtc -#endif // WEBRTC_MODULES_AUDIO_CODING_CODECS_G722_AUDIO_ENCODER_G722_H_ diff --git a/WebRtc.NET/include/webrtc/modules/audio_coding/codecs/g722/g722_enc_dec.h b/WebRtc.NET/include/webrtc/modules/audio_coding/codecs/g722/g722_enc_dec.h deleted file mode 100644 index 7db4895f..00000000 --- a/WebRtc.NET/include/webrtc/modules/audio_coding/codecs/g722/g722_enc_dec.h +++ /dev/null @@ -1,160 +0,0 @@ -/* - * SpanDSP - a series of DSP components for telephony - * - * g722.h - The ITU G.722 codec. - * - * Written by Steve Underwood - * - * Copyright (C) 2005 Steve Underwood - * - * Despite my general liking of the GPL, I place my own contributions - * to this code in the public domain for the benefit of all mankind - - * even the slimy ones who might try to proprietize my work and use it - * to my detriment. - * - * Based on a single channel G.722 codec which is: - * - ***** Copyright (c) CMU 1993 ***** - * Computer Science, Speech Group - * Chengxiang Lu and Alex Hauptmann - * - * $Id: g722.h,v 1.10 2006/06/16 12:45:53 steveu Exp $ - * - * Modifications for WebRtc, 2011/04/28, by tlegrand: - * -Changed to use WebRtc types - * -Added new defines for minimum and maximum values of short int - */ - - -/*! \file */ - -#if !defined(_G722_ENC_DEC_H_) -#define _G722_ENC_DEC_H_ - -#include "webrtc/typedefs.h" - -/*! \page g722_page G.722 encoding and decoding -\section g722_page_sec_1 What does it do? -The G.722 module is a bit exact implementation of the ITU G.722 specification for all three -specified bit rates - 64000bps, 56000bps and 48000bps. It passes the ITU tests. - -To allow fast and flexible interworking with narrow band telephony, the encoder and decoder -support an option for the linear audio to be an 8k samples/second stream. In this mode the -codec is considerably faster, and still fully compatible with wideband terminals using G.722. - -\section g722_page_sec_2 How does it work? -???. -*/ - -#define WEBRTC_INT16_MAX 32767 -#define WEBRTC_INT16_MIN -32768 - -enum -{ - G722_SAMPLE_RATE_8000 = 0x0001, - G722_PACKED = 0x0002 -}; - -typedef struct -{ - /*! TRUE if the operating in the special ITU test mode, with the band split filters - disabled. */ - int itu_test_mode; - /*! TRUE if the G.722 data is packed */ - int packed; - /*! TRUE if encode from 8k samples/second */ - int eight_k; - /*! 6 for 48000kbps, 7 for 56000kbps, or 8 for 64000kbps. */ - int bits_per_sample; - - /*! Signal history for the QMF */ - int x[24]; - - struct - { - int s; - int sp; - int sz; - int r[3]; - int a[3]; - int ap[3]; - int p[3]; - int d[7]; - int b[7]; - int bp[7]; - int sg[7]; - int nb; - int det; - } band[2]; - - unsigned int in_buffer; - int in_bits; - unsigned int out_buffer; - int out_bits; -} G722EncoderState; - -typedef struct -{ - /*! TRUE if the operating in the special ITU test mode, with the band split filters - disabled. */ - int itu_test_mode; - /*! TRUE if the G.722 data is packed */ - int packed; - /*! TRUE if decode to 8k samples/second */ - int eight_k; - /*! 6 for 48000kbps, 7 for 56000kbps, or 8 for 64000kbps. */ - int bits_per_sample; - - /*! Signal history for the QMF */ - int x[24]; - - struct - { - int s; - int sp; - int sz; - int r[3]; - int a[3]; - int ap[3]; - int p[3]; - int d[7]; - int b[7]; - int bp[7]; - int sg[7]; - int nb; - int det; - } band[2]; - - unsigned int in_buffer; - int in_bits; - unsigned int out_buffer; - int out_bits; -} G722DecoderState; - -#ifdef __cplusplus -extern "C" { -#endif - -G722EncoderState* WebRtc_g722_encode_init(G722EncoderState* s, - int rate, - int options); -int WebRtc_g722_encode_release(G722EncoderState *s); -size_t WebRtc_g722_encode(G722EncoderState *s, - uint8_t g722_data[], - const int16_t amp[], - size_t len); - -G722DecoderState* WebRtc_g722_decode_init(G722DecoderState* s, - int rate, - int options); -int WebRtc_g722_decode_release(G722DecoderState *s); -size_t WebRtc_g722_decode(G722DecoderState *s, - int16_t amp[], - const uint8_t g722_data[], - size_t len); - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/WebRtc.NET/include/webrtc/modules/audio_coding/codecs/ilbc/abs_quant.h b/WebRtc.NET/include/webrtc/modules/audio_coding/codecs/ilbc/abs_quant.h deleted file mode 100644 index 51545345..00000000 --- a/WebRtc.NET/include/webrtc/modules/audio_coding/codecs/ilbc/abs_quant.h +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -/****************************************************************** - - iLBC Speech Coder ANSI-C Source Code - - WebRtcIlbcfix_AbsQuant.h - -******************************************************************/ - -#ifndef WEBRTC_MODULES_AUDIO_CODING_CODECS_ILBC_MAIN_SOURCE_ABS_QUANT_H_ -#define WEBRTC_MODULES_AUDIO_CODING_CODECS_ILBC_MAIN_SOURCE_ABS_QUANT_H_ - -#include "defines.h" - -/*----------------------------------------------------------------* - * predictive noise shaping encoding of scaled start state - * (subrutine for WebRtcIlbcfix_StateSearch) - *---------------------------------------------------------------*/ - -void WebRtcIlbcfix_AbsQuant( - IlbcEncoder *iLBCenc_inst, - /* (i) Encoder instance */ - iLBC_bits *iLBC_encbits, /* (i/o) Encoded bits (outputs idxForMax - and idxVec, uses state_first as - input) */ - int16_t *in, /* (i) vector to encode */ - int16_t *weightDenum /* (i) denominator of synthesis filter */ - ); - -#endif diff --git a/WebRtc.NET/include/webrtc/modules/audio_coding/codecs/ilbc/abs_quant_loop.h b/WebRtc.NET/include/webrtc/modules/audio_coding/codecs/ilbc/abs_quant_loop.h deleted file mode 100644 index c8bf6757..00000000 --- a/WebRtc.NET/include/webrtc/modules/audio_coding/codecs/ilbc/abs_quant_loop.h +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -/****************************************************************** - - iLBC Speech Coder ANSI-C Source Code - - WebRtcIlbcfix_AbsQuantLoop.h - -******************************************************************/ - -#ifndef WEBRTC_MODULES_AUDIO_CODING_CODECS_ILBC_MAIN_SOURCE_ABS_QUANT_LOOP_H_ -#define WEBRTC_MODULES_AUDIO_CODING_CODECS_ILBC_MAIN_SOURCE_ABS_QUANT_LOOP_H_ - -#include "defines.h" - -/*----------------------------------------------------------------* - * predictive noise shaping encoding of scaled start state - * (subrutine for WebRtcIlbcfix_StateSearch) - *---------------------------------------------------------------*/ - -void WebRtcIlbcfix_AbsQuantLoop(int16_t *syntOutIN, int16_t *in_weightedIN, - int16_t *weightDenumIN, size_t *quantLenIN, - int16_t *idxVecIN); - -#endif diff --git a/WebRtc.NET/include/webrtc/modules/audio_coding/codecs/ilbc/audio_decoder_ilbc.h b/WebRtc.NET/include/webrtc/modules/audio_coding/codecs/ilbc/audio_decoder_ilbc.h deleted file mode 100644 index 48edfede..00000000 --- a/WebRtc.NET/include/webrtc/modules/audio_coding/codecs/ilbc/audio_decoder_ilbc.h +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright (c) 2015 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MODULES_AUDIO_CODING_CODECS_ILBC_AUDIO_DECODER_ILBC_H_ -#define WEBRTC_MODULES_AUDIO_CODING_CODECS_ILBC_AUDIO_DECODER_ILBC_H_ - -#include "webrtc/base/constructormagic.h" -#include "webrtc/modules/audio_coding/codecs/audio_decoder.h" - -typedef struct iLBC_decinst_t_ IlbcDecoderInstance; - -namespace webrtc { - -class AudioDecoderIlbc final : public AudioDecoder { - public: - AudioDecoderIlbc(); - ~AudioDecoderIlbc() override; - bool HasDecodePlc() const override; - size_t DecodePlc(size_t num_frames, int16_t* decoded) override; - void Reset() override; - std::vector ParsePayload(rtc::Buffer&& payload, - uint32_t timestamp) override; - int SampleRateHz() const override; - size_t Channels() const override; - - protected: - int DecodeInternal(const uint8_t* encoded, - size_t encoded_len, - int sample_rate_hz, - int16_t* decoded, - SpeechType* speech_type) override; - - private: - IlbcDecoderInstance* dec_state_; - RTC_DISALLOW_COPY_AND_ASSIGN(AudioDecoderIlbc); -}; - -} // namespace webrtc -#endif // WEBRTC_MODULES_AUDIO_CODING_CODECS_ILBC_AUDIO_DECODER_ILBC_H_ diff --git a/WebRtc.NET/include/webrtc/modules/audio_coding/codecs/ilbc/audio_encoder_ilbc.h b/WebRtc.NET/include/webrtc/modules/audio_coding/codecs/ilbc/audio_encoder_ilbc.h deleted file mode 100644 index 63639860..00000000 --- a/WebRtc.NET/include/webrtc/modules/audio_coding/codecs/ilbc/audio_encoder_ilbc.h +++ /dev/null @@ -1,61 +0,0 @@ -/* - * Copyright (c) 2014 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MODULES_AUDIO_CODING_CODECS_ILBC_AUDIO_ENCODER_ILBC_H_ -#define WEBRTC_MODULES_AUDIO_CODING_CODECS_ILBC_AUDIO_ENCODER_ILBC_H_ - -#include "webrtc/base/constructormagic.h" -#include "webrtc/modules/audio_coding/codecs/audio_encoder.h" -#include "webrtc/modules/audio_coding/codecs/ilbc/ilbc.h" - -namespace webrtc { - -struct CodecInst; - -class AudioEncoderIlbc final : public AudioEncoder { - public: - struct Config { - bool IsOk() const; - - int payload_type = 102; - int frame_size_ms = 30; // Valid values are 20, 30, 40, and 60 ms. - // Note that frame size 40 ms produces encodings with two 20 ms frames in - // them, and frame size 60 ms consists of two 30 ms frames. - }; - - explicit AudioEncoderIlbc(const Config& config); - explicit AudioEncoderIlbc(const CodecInst& codec_inst); - ~AudioEncoderIlbc() override; - - int SampleRateHz() const override; - size_t NumChannels() const override; - size_t Num10MsFramesInNextPacket() const override; - size_t Max10MsFramesInAPacket() const override; - int GetTargetBitrate() const override; - EncodedInfo EncodeImpl(uint32_t rtp_timestamp, - rtc::ArrayView audio, - rtc::Buffer* encoded) override; - void Reset() override; - - private: - size_t RequiredOutputSizeBytes() const; - - static const size_t kMaxSamplesPerPacket = 480; - const Config config_; - const size_t num_10ms_frames_per_packet_; - size_t num_10ms_frames_buffered_; - uint32_t first_timestamp_in_buffer_; - int16_t input_buffer_[kMaxSamplesPerPacket]; - IlbcEncoderInstance* encoder_; - RTC_DISALLOW_COPY_AND_ASSIGN(AudioEncoderIlbc); -}; - -} // namespace webrtc -#endif // WEBRTC_MODULES_AUDIO_CODING_CODECS_ILBC_AUDIO_ENCODER_ILBC_H_ diff --git a/WebRtc.NET/include/webrtc/modules/audio_coding/codecs/ilbc/augmented_cb_corr.h b/WebRtc.NET/include/webrtc/modules/audio_coding/codecs/ilbc/augmented_cb_corr.h deleted file mode 100644 index c5c40888..00000000 --- a/WebRtc.NET/include/webrtc/modules/audio_coding/codecs/ilbc/augmented_cb_corr.h +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -/****************************************************************** - - iLBC Speech Coder ANSI-C Source Code - - WebRtcIlbcfix_AugmentedCbCorr.h - -******************************************************************/ - -#ifndef WEBRTC_MODULES_AUDIO_CODING_CODECS_ILBC_MAIN_SOURCE_AUGMENTED_CB_CORR_H_ -#define WEBRTC_MODULES_AUDIO_CODING_CODECS_ILBC_MAIN_SOURCE_AUGMENTED_CB_CORR_H_ - -#include "defines.h" - -/*----------------------------------------------------------------* - * Calculate correlation between target and Augmented codebooks - *---------------------------------------------------------------*/ - -void WebRtcIlbcfix_AugmentedCbCorr( - int16_t *target, /* (i) Target vector */ - int16_t *buffer, /* (i) Memory buffer */ - int16_t *interpSamples, /* (i) buffer with - interpolated samples */ - int32_t *crossDot, /* (o) The cross correlation between - the target and the Augmented - vector */ - size_t low, /* (i) Lag to start from (typically - 20) */ - size_t high, /* (i) Lag to end at (typically 39 */ - int scale); /* (i) Scale factor to use for the crossDot */ - -#endif diff --git a/WebRtc.NET/include/webrtc/modules/audio_coding/codecs/ilbc/bw_expand.h b/WebRtc.NET/include/webrtc/modules/audio_coding/codecs/ilbc/bw_expand.h deleted file mode 100644 index b3b16d5d..00000000 --- a/WebRtc.NET/include/webrtc/modules/audio_coding/codecs/ilbc/bw_expand.h +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -/****************************************************************** - - iLBC Speech Coder ANSI-C Source Code - - WebRtcIlbcfix_BwExpand.h - -******************************************************************/ - -#ifndef WEBRTC_MODULES_AUDIO_CODING_CODECS_ILBC_MAIN_SOURCE_BW_EXPAND_H_ -#define WEBRTC_MODULES_AUDIO_CODING_CODECS_ILBC_MAIN_SOURCE_BW_EXPAND_H_ - -#include "defines.h" - -/*----------------------------------------------------------------* - * lpc bandwidth expansion - *---------------------------------------------------------------*/ - -void WebRtcIlbcfix_BwExpand( - int16_t *out, /* (o) the bandwidth expanded lpc coefficients */ - int16_t *in, /* (i) the lpc coefficients before bandwidth - expansion */ - int16_t *coef, /* (i) the bandwidth expansion factor Q15 */ - int16_t length /* (i) the length of lpc coefficient vectors */ - ); - -#endif diff --git a/WebRtc.NET/include/webrtc/modules/audio_coding/codecs/ilbc/cb_mem_energy.h b/WebRtc.NET/include/webrtc/modules/audio_coding/codecs/ilbc/cb_mem_energy.h deleted file mode 100644 index 6da2f43c..00000000 --- a/WebRtc.NET/include/webrtc/modules/audio_coding/codecs/ilbc/cb_mem_energy.h +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -/****************************************************************** - - iLBC Speech Coder ANSI-C Source Code - - WebRtcIlbcfix_CbMemEnergy.h - -******************************************************************/ - -#ifndef WEBRTC_MODULES_AUDIO_CODING_CODECS_ILBC_MAIN_SOURCE_CB_MEM_ENERGY_H_ -#define WEBRTC_MODULES_AUDIO_CODING_CODECS_ILBC_MAIN_SOURCE_CB_MEM_ENERGY_H_ - -void WebRtcIlbcfix_CbMemEnergy( - size_t range, - int16_t *CB, /* (i) The CB memory (1:st section) */ - int16_t *filteredCB, /* (i) The filtered CB memory (2:nd section) */ - size_t lMem, /* (i) Length of the CB memory */ - size_t lTarget, /* (i) Length of the target vector */ - int16_t *energyW16, /* (o) Energy in the CB vectors */ - int16_t *energyShifts, /* (o) Shift value of the energy */ - int scale, /* (i) The scaling of all energy values */ - size_t base_size /* (i) Index to where energy values should be stored */ - ); - -#endif diff --git a/WebRtc.NET/include/webrtc/modules/audio_coding/codecs/ilbc/cb_mem_energy_augmentation.h b/WebRtc.NET/include/webrtc/modules/audio_coding/codecs/ilbc/cb_mem_energy_augmentation.h deleted file mode 100644 index 594ba5f0..00000000 --- a/WebRtc.NET/include/webrtc/modules/audio_coding/codecs/ilbc/cb_mem_energy_augmentation.h +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -/****************************************************************** - - iLBC Speech Coder ANSI-C Source Code - - WebRtcIlbcfix_CbMemEnergyAugmentation.h - -******************************************************************/ - -#ifndef WEBRTC_MODULES_AUDIO_CODING_CODECS_ILBC_MAIN_SOURCE_CB_MEM_ENERGY_AUGMENTATION_H_ -#define WEBRTC_MODULES_AUDIO_CODING_CODECS_ILBC_MAIN_SOURCE_CB_MEM_ENERGY_AUGMENTATION_H_ - -void WebRtcIlbcfix_CbMemEnergyAugmentation( - int16_t *interpSamples, /* (i) The interpolated samples */ - int16_t *CBmem, /* (i) The CB memory */ - int scale, /* (i) The scaling of all energy values */ - size_t base_size, /* (i) Index to where energy values should be stored */ - int16_t *energyW16, /* (o) Energy in the CB vectors */ - int16_t *energyShifts /* (o) Shift value of the energy */ - ); - -#endif diff --git a/WebRtc.NET/include/webrtc/modules/audio_coding/codecs/ilbc/cb_mem_energy_calc.h b/WebRtc.NET/include/webrtc/modules/audio_coding/codecs/ilbc/cb_mem_energy_calc.h deleted file mode 100644 index 2991869d..00000000 --- a/WebRtc.NET/include/webrtc/modules/audio_coding/codecs/ilbc/cb_mem_energy_calc.h +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -/****************************************************************** - - iLBC Speech Coder ANSI-C Source Code - - WebRtcIlbcfix_CbMemEnergyCalc.h - -******************************************************************/ - -#ifndef WEBRTC_MODULES_AUDIO_CODING_CODECS_ILBC_MAIN_SOURCE_CB_MEM_ENERGY_CALC_H_ -#define WEBRTC_MODULES_AUDIO_CODING_CODECS_ILBC_MAIN_SOURCE_CB_MEM_ENERGY_CALC_H_ - -void WebRtcIlbcfix_CbMemEnergyCalc( - int32_t energy, /* (i) input start energy */ - size_t range, /* (i) number of iterations */ - int16_t *ppi, /* (i) input pointer 1 */ - int16_t *ppo, /* (i) input pointer 2 */ - int16_t *energyW16, /* (o) Energy in the CB vectors */ - int16_t *energyShifts, /* (o) Shift value of the energy */ - int scale, /* (i) The scaling of all energy values */ - size_t base_size /* (i) Index to where energy values should be stored */ - ); - -#endif diff --git a/WebRtc.NET/include/webrtc/modules/audio_coding/codecs/ilbc/cb_search.h b/WebRtc.NET/include/webrtc/modules/audio_coding/codecs/ilbc/cb_search.h deleted file mode 100644 index ed1580c0..00000000 --- a/WebRtc.NET/include/webrtc/modules/audio_coding/codecs/ilbc/cb_search.h +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -/****************************************************************** - - iLBC Speech Coder ANSI-C Source Code - - WebRtcIlbcfix_CbSearch.h - -******************************************************************/ - -#ifndef WEBRTC_MODULES_AUDIO_CODING_CODECS_ILBC_MAIN_SOURCE_CB_SEARCH_H_ -#define WEBRTC_MODULES_AUDIO_CODING_CODECS_ILBC_MAIN_SOURCE_CB_SEARCH_H_ - -void WebRtcIlbcfix_CbSearch( - IlbcEncoder *iLBCenc_inst, - /* (i) the encoder state structure */ - int16_t *index, /* (o) Codebook indices */ - int16_t *gain_index, /* (o) Gain quantization indices */ - int16_t *intarget, /* (i) Target vector for encoding */ - int16_t *decResidual,/* (i) Decoded residual for codebook construction */ - size_t lMem, /* (i) Length of buffer */ - size_t lTarget, /* (i) Length of vector */ - int16_t *weightDenum,/* (i) weighting filter coefficients in Q12 */ - size_t block /* (i) the subblock number */ - ); - -#endif diff --git a/WebRtc.NET/include/webrtc/modules/audio_coding/codecs/ilbc/cb_search_core.h b/WebRtc.NET/include/webrtc/modules/audio_coding/codecs/ilbc/cb_search_core.h deleted file mode 100644 index 9648cf29..00000000 --- a/WebRtc.NET/include/webrtc/modules/audio_coding/codecs/ilbc/cb_search_core.h +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -/****************************************************************** - - iLBC Speech Coder ANSI-C Source Code - - WebRtcIlbcfix_CbSearchCore.h - -******************************************************************/ - -#ifndef WEBRTC_MODULES_AUDIO_CODING_CODECS_ILBC_MAIN_SOURCE_CB_SEARCH_CORE_H_ -#define WEBRTC_MODULES_AUDIO_CODING_CODECS_ILBC_MAIN_SOURCE_CB_SEARCH_CORE_H_ - -#include "defines.h" - -void WebRtcIlbcfix_CbSearchCore( - int32_t *cDot, /* (i) Cross Correlation */ - size_t range, /* (i) Search range */ - int16_t stage, /* (i) Stage of this search */ - int16_t *inverseEnergy, /* (i) Inversed energy */ - int16_t *inverseEnergyShift, /* (i) Shifts of inversed energy - with the offset 2*16-29 */ - int32_t *Crit, /* (o) The criteria */ - size_t *bestIndex, /* (o) Index that corresponds to - maximum criteria (in this - vector) */ - int32_t *bestCrit, /* (o) Value of critera for the - chosen index */ - int16_t *bestCritSh); /* (o) The domain of the chosen - criteria */ - -#endif diff --git a/WebRtc.NET/include/webrtc/modules/audio_coding/codecs/ilbc/cb_update_best_index.h b/WebRtc.NET/include/webrtc/modules/audio_coding/codecs/ilbc/cb_update_best_index.h deleted file mode 100644 index a20fa38b..00000000 --- a/WebRtc.NET/include/webrtc/modules/audio_coding/codecs/ilbc/cb_update_best_index.h +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -/****************************************************************** - - iLBC Speech Coder ANSI-C Source Code - - WebRtcIlbcfix_CbUpdateBestIndex.h - -******************************************************************/ - -#ifndef WEBRTC_MODULES_AUDIO_CODING_CODECS_ILBC_MAIN_SOURCE_CB_UPDATE_BEST_INDEX_H_ -#define WEBRTC_MODULES_AUDIO_CODING_CODECS_ILBC_MAIN_SOURCE_CB_UPDATE_BEST_INDEX_H_ - -#include "defines.h" - -void WebRtcIlbcfix_CbUpdateBestIndex( - int32_t CritNew, /* (i) New Potentially best Criteria */ - int16_t CritNewSh, /* (i) Shift value of above Criteria */ - size_t IndexNew, /* (i) Index of new Criteria */ - int32_t cDotNew, /* (i) Cross dot of new index */ - int16_t invEnergyNew, /* (i) Inversed energy new index */ - int16_t energyShiftNew, /* (i) Energy shifts of new index */ - int32_t *CritMax, /* (i/o) Maximum Criteria (so far) */ - int16_t *shTotMax, /* (i/o) Shifts of maximum criteria */ - size_t *bestIndex, /* (i/o) Index that corresponds to - maximum criteria */ - int16_t *bestGain); /* (i/o) Gain in Q14 that corresponds - to maximum criteria */ - -#endif diff --git a/WebRtc.NET/include/webrtc/modules/audio_coding/codecs/ilbc/comp_corr.h b/WebRtc.NET/include/webrtc/modules/audio_coding/codecs/ilbc/comp_corr.h deleted file mode 100644 index ab78c72b..00000000 --- a/WebRtc.NET/include/webrtc/modules/audio_coding/codecs/ilbc/comp_corr.h +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -/****************************************************************** - - iLBC Speech Coder ANSI-C Source Code - - WebRtcIlbcfix_CompCorr.h - -******************************************************************/ - -#ifndef WEBRTC_MODULES_AUDIO_CODING_CODECS_ILBC_MAIN_SOURCE_COMP_CORR_H_ -#define WEBRTC_MODULES_AUDIO_CODING_CODECS_ILBC_MAIN_SOURCE_COMP_CORR_H_ - -#include "defines.h" - -/*----------------------------------------------------------------* - * Compute cross correlation and pitch gain for pitch prediction - * of last subframe at given lag. - *---------------------------------------------------------------*/ - -void WebRtcIlbcfix_CompCorr( - int32_t *corr, /* (o) cross correlation */ - int32_t *ener, /* (o) energy */ - int16_t *buffer, /* (i) signal buffer */ - size_t lag, /* (i) pitch lag */ - size_t bLen, /* (i) length of buffer */ - size_t sRange, /* (i) correlation search length */ - int16_t scale /* (i) number of rightshifts to use */ - ); - -#endif diff --git a/WebRtc.NET/include/webrtc/modules/audio_coding/codecs/ilbc/constants.h b/WebRtc.NET/include/webrtc/modules/audio_coding/codecs/ilbc/constants.h deleted file mode 100644 index 7c4ad4d9..00000000 --- a/WebRtc.NET/include/webrtc/modules/audio_coding/codecs/ilbc/constants.h +++ /dev/null @@ -1,92 +0,0 @@ -/* - * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -/****************************************************************** - - iLBC Speech Coder ANSI-C Source Code - - constants.h - -******************************************************************/ - -#ifndef WEBRTC_MODULES_AUDIO_CODING_CODECS_ILBC_MAIN_SOURCE_CONSTANTS_H_ -#define WEBRTC_MODULES_AUDIO_CODING_CODECS_ILBC_MAIN_SOURCE_CONSTANTS_H_ - -#include "defines.h" -#include "webrtc/typedefs.h" - -/* high pass filters */ - -extern const int16_t WebRtcIlbcfix_kHpInCoefs[]; -extern const int16_t WebRtcIlbcfix_kHpOutCoefs[]; - -/* Window for start state decision */ -extern const int16_t WebRtcIlbcfix_kStartSequenceEnrgWin[]; - -/* low pass filter used for downsampling */ -extern const int16_t WebRtcIlbcfix_kLpFiltCoefs[]; - -/* LPC analysis and quantization */ - -extern const int16_t WebRtcIlbcfix_kLpcWin[]; -extern const int16_t WebRtcIlbcfix_kLpcAsymWin[]; -extern const int32_t WebRtcIlbcfix_kLpcLagWin[]; -extern const int16_t WebRtcIlbcfix_kLpcChirpSyntDenum[]; -extern const int16_t WebRtcIlbcfix_kLpcChirpWeightDenum[]; -extern const int16_t WebRtcIlbcfix_kLsfDimCb[]; -extern const int16_t WebRtcIlbcfix_kLsfSizeCb[]; -extern const int16_t WebRtcIlbcfix_kLsfCb[]; -extern const int16_t WebRtcIlbcfix_kLsfWeight20ms[]; -extern const int16_t WebRtcIlbcfix_kLsfWeight30ms[]; -extern const int16_t WebRtcIlbcfix_kLsfMean[]; -extern const int16_t WebRtcIlbcfix_kLspMean[]; -extern const int16_t WebRtcIlbcfix_kCos[]; -extern const int16_t WebRtcIlbcfix_kCosDerivative[]; -extern const int16_t WebRtcIlbcfix_kCosGrid[]; -extern const int16_t WebRtcIlbcfix_kAcosDerivative[]; - -/* state quantization tables */ - -extern const int16_t WebRtcIlbcfix_kStateSq3[]; -extern const int32_t WebRtcIlbcfix_kChooseFrgQuant[]; -extern const int16_t WebRtcIlbcfix_kScale[]; -extern const int16_t WebRtcIlbcfix_kFrgQuantMod[]; - -/* Ranges for search and filters at different subframes */ - -extern const size_t WebRtcIlbcfix_kSearchRange[5][CB_NSTAGES]; -extern const size_t WebRtcIlbcfix_kFilterRange[]; - -/* gain quantization tables */ - -extern const int16_t WebRtcIlbcfix_kGainSq3[]; -extern const int16_t WebRtcIlbcfix_kGainSq4[]; -extern const int16_t WebRtcIlbcfix_kGainSq5[]; -extern const int16_t WebRtcIlbcfix_kGainSq5Sq[]; -extern const int16_t* const WebRtcIlbcfix_kGain[]; - -/* adaptive codebook definitions */ - -extern const int16_t WebRtcIlbcfix_kCbFiltersRev[]; -extern const int16_t WebRtcIlbcfix_kAlpha[]; - -/* enhancer definitions */ - -extern const int16_t WebRtcIlbcfix_kEnhPolyPhaser[ENH_UPS0][ENH_FLO_MULT2_PLUS1]; -extern const int16_t WebRtcIlbcfix_kEnhWt[]; -extern const size_t WebRtcIlbcfix_kEnhPlocs[]; - -/* PLC tables */ - -extern const int16_t WebRtcIlbcfix_kPlcPerSqr[]; -extern const int16_t WebRtcIlbcfix_kPlcPitchFact[]; -extern const int16_t WebRtcIlbcfix_kPlcPfSlope[]; - -#endif diff --git a/WebRtc.NET/include/webrtc/modules/audio_coding/codecs/ilbc/decoder_interpolate_lsf.h b/WebRtc.NET/include/webrtc/modules/audio_coding/codecs/ilbc/decoder_interpolate_lsf.h deleted file mode 100644 index 37ecf078..00000000 --- a/WebRtc.NET/include/webrtc/modules/audio_coding/codecs/ilbc/decoder_interpolate_lsf.h +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -/****************************************************************** - - iLBC Speech Coder ANSI-C Source Code - - WebRtcIlbcfix_DecoderInterpolateLsp.h - -******************************************************************/ - -#ifndef WEBRTC_MODULES_AUDIO_CODING_CODECS_ILBC_MAIN_SOURCE_DECODER_INTERPOLATE_LSF_H_ -#define WEBRTC_MODULES_AUDIO_CODING_CODECS_ILBC_MAIN_SOURCE_DECODER_INTERPOLATE_LSF_H_ - -#include "defines.h" - -/*----------------------------------------------------------------* - * obtain synthesis and weighting filters form lsf coefficients - *---------------------------------------------------------------*/ - -void WebRtcIlbcfix_DecoderInterpolateLsp( - int16_t *syntdenum, /* (o) synthesis filter coefficients */ - int16_t *weightdenum, /* (o) weighting denumerator - coefficients */ - int16_t *lsfdeq, /* (i) dequantized lsf coefficients */ - int16_t length, /* (i) length of lsf coefficient vector */ - IlbcDecoder *iLBCdec_inst - /* (i) the decoder state structure */ - ); - -#endif diff --git a/WebRtc.NET/include/webrtc/modules/audio_coding/codecs/ilbc/defines.h b/WebRtc.NET/include/webrtc/modules/audio_coding/codecs/ilbc/defines.h deleted file mode 100644 index 2faaea15..00000000 --- a/WebRtc.NET/include/webrtc/modules/audio_coding/codecs/ilbc/defines.h +++ /dev/null @@ -1,220 +0,0 @@ -/* - * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -/****************************************************************** - - iLBC Speech Coder ANSI-C Source Code - - define.h - -******************************************************************/ -#ifndef WEBRTC_MODULES_AUDIO_CODING_CODECS_ILBC_MAIN_SOURCE_DEFINES_H_ -#define WEBRTC_MODULES_AUDIO_CODING_CODECS_ILBC_MAIN_SOURCE_DEFINES_H_ - -#include -#include "signal_processing_library.h" -#include "webrtc/typedefs.h" - -/* general codec settings */ - -#define FS 8000 -#define BLOCKL_20MS 160 -#define BLOCKL_30MS 240 -#define BLOCKL_MAX 240 -#define NSUB_20MS 4 -#define NSUB_30MS 6 -#define NSUB_MAX 6 -#define NASUB_20MS 2 -#define NASUB_30MS 4 -#define NASUB_MAX 4 -#define SUBL 40 -#define STATE_LEN 80 -#define STATE_SHORT_LEN_30MS 58 -#define STATE_SHORT_LEN_20MS 57 - -/* LPC settings */ - -#define LPC_FILTERORDER 10 -#define LPC_LOOKBACK 60 -#define LPC_N_20MS 1 -#define LPC_N_30MS 2 -#define LPC_N_MAX 2 -#define LPC_ASYMDIFF 20 -#define LSF_NSPLIT 3 -#define LSF_NUMBER_OF_STEPS 4 -#define LPC_HALFORDER 5 -#define COS_GRID_POINTS 60 - -/* cb settings */ - -#define CB_NSTAGES 3 -#define CB_EXPAND 2 -#define CB_MEML 147 -#define CB_FILTERLEN (2*4) -#define CB_HALFFILTERLEN 4 -#define CB_RESRANGE 34 -#define CB_MAXGAIN_FIXQ6 83 /* error = -0.24% */ -#define CB_MAXGAIN_FIXQ14 21299 - -/* enhancer */ - -#define ENH_BLOCKL 80 /* block length */ -#define ENH_BLOCKL_HALF (ENH_BLOCKL/2) -#define ENH_HL 3 /* 2*ENH_HL+1 is number blocks - in said second sequence */ -#define ENH_SLOP 2 /* max difference estimated and - correct pitch period */ -#define ENH_PLOCSL 8 /* pitch-estimates and - pitch-locations buffer length */ -#define ENH_OVERHANG 2 -#define ENH_UPS0 4 /* upsampling rate */ -#define ENH_FL0 3 /* 2*FLO+1 is the length of each filter */ -#define ENH_FLO_MULT2_PLUS1 7 -#define ENH_VECTL (ENH_BLOCKL+2*ENH_FL0) -#define ENH_CORRDIM (2*ENH_SLOP+1) -#define ENH_NBLOCKS (BLOCKL/ENH_BLOCKL) -#define ENH_NBLOCKS_EXTRA 5 -#define ENH_NBLOCKS_TOT 8 /* ENH_NBLOCKS+ENH_NBLOCKS_EXTRA */ -#define ENH_BUFL (ENH_NBLOCKS_TOT)*ENH_BLOCKL -#define ENH_BUFL_FILTEROVERHEAD 3 -#define ENH_A0 819 /* Q14 */ -#define ENH_A0_MINUS_A0A0DIV4 848256041 /* Q34 */ -#define ENH_A0DIV2 26843546 /* Q30 */ - -/* PLC */ - -/* Down sampling */ - -#define FILTERORDER_DS_PLUS1 7 -#define DELAY_DS 3 -#define FACTOR_DS 2 - -/* bit stream defs */ - -#define NO_OF_BYTES_20MS 38 -#define NO_OF_BYTES_30MS 50 -#define NO_OF_WORDS_20MS 19 -#define NO_OF_WORDS_30MS 25 -#define STATE_BITS 3 -#define BYTE_LEN 8 -#define ULP_CLASSES 3 - -/* help parameters */ - -#define TWO_PI_FIX 25736 /* Q12 */ - -/* Constants for codebook search and creation */ - -#define ST_MEM_L_TBL 85 -#define MEM_LF_TBL 147 - - -/* Struct for the bits */ -typedef struct iLBC_bits_t_ { - int16_t lsf[LSF_NSPLIT*LPC_N_MAX]; - int16_t cb_index[CB_NSTAGES*(NASUB_MAX+1)]; /* First CB_NSTAGES values contains extra CB index */ - int16_t gain_index[CB_NSTAGES*(NASUB_MAX+1)]; /* First CB_NSTAGES values contains extra CB gain */ - size_t idxForMax; - int16_t state_first; - int16_t idxVec[STATE_SHORT_LEN_30MS]; - int16_t firstbits; - size_t startIdx; -} iLBC_bits; - -/* type definition encoder instance */ -typedef struct IlbcEncoder_ { - - /* flag for frame size mode */ - int16_t mode; - - /* basic parameters for different frame sizes */ - size_t blockl; - size_t nsub; - int16_t nasub; - size_t no_of_bytes, no_of_words; - int16_t lpc_n; - size_t state_short_len; - - /* analysis filter state */ - int16_t anaMem[LPC_FILTERORDER]; - - /* Fix-point old lsf parameters for interpolation */ - int16_t lsfold[LPC_FILTERORDER]; - int16_t lsfdeqold[LPC_FILTERORDER]; - - /* signal buffer for LP analysis */ - int16_t lpc_buffer[LPC_LOOKBACK + BLOCKL_MAX]; - - /* state of input HP filter */ - int16_t hpimemx[2]; - int16_t hpimemy[4]; - -#ifdef SPLIT_10MS - int16_t weightdenumbuf[66]; - int16_t past_samples[160]; - uint16_t bytes[25]; - int16_t section; - int16_t Nfor_flag; - int16_t Nback_flag; - int16_t start_pos; - size_t diff; -#endif - -} IlbcEncoder; - -/* type definition decoder instance */ -typedef struct IlbcDecoder_ { - - /* flag for frame size mode */ - int16_t mode; - - /* basic parameters for different frame sizes */ - size_t blockl; - size_t nsub; - int16_t nasub; - size_t no_of_bytes, no_of_words; - int16_t lpc_n; - size_t state_short_len; - - /* synthesis filter state */ - int16_t syntMem[LPC_FILTERORDER]; - - /* old LSF for interpolation */ - int16_t lsfdeqold[LPC_FILTERORDER]; - - /* pitch lag estimated in enhancer and used in PLC */ - size_t last_lag; - - /* PLC state information */ - int consPLICount, prev_enh_pl; - int16_t perSquare; - - int16_t prevScale, prevPLI; - size_t prevLag; - int16_t prevLpc[LPC_FILTERORDER+1]; - int16_t prevResidual[NSUB_MAX*SUBL]; - int16_t seed; - - /* previous synthesis filter parameters */ - - int16_t old_syntdenum[(LPC_FILTERORDER + 1)*NSUB_MAX]; - - /* state of output HP filter */ - int16_t hpimemx[2]; - int16_t hpimemy[4]; - - /* enhancer state information */ - int use_enhancer; - int16_t enh_buf[ENH_BUFL+ENH_BUFL_FILTEROVERHEAD]; - size_t enh_period[ENH_NBLOCKS_TOT]; - -} IlbcDecoder; - -#endif diff --git a/WebRtc.NET/include/webrtc/modules/audio_coding/codecs/ilbc/do_plc.h b/WebRtc.NET/include/webrtc/modules/audio_coding/codecs/ilbc/do_plc.h deleted file mode 100644 index 38b8fdb7..00000000 --- a/WebRtc.NET/include/webrtc/modules/audio_coding/codecs/ilbc/do_plc.h +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -/****************************************************************** - - iLBC Speech Coder ANSI-C Source Code - - WebRtcIlbcfix_DoThePlc.h - -******************************************************************/ - -#ifndef WEBRTC_MODULES_AUDIO_CODING_CODECS_ILBC_MAIN_SOURCE_DO_PLC_H_ -#define WEBRTC_MODULES_AUDIO_CODING_CODECS_ILBC_MAIN_SOURCE_DO_PLC_H_ - -#include "defines.h" - -/*----------------------------------------------------------------* - * Packet loss concealment routine. Conceals a residual signal - * and LP parameters. If no packet loss, update state. - *---------------------------------------------------------------*/ - -void WebRtcIlbcfix_DoThePlc( - int16_t *PLCresidual, /* (o) concealed residual */ - int16_t *PLClpc, /* (o) concealed LP parameters */ - int16_t PLI, /* (i) packet loss indicator - 0 - no PL, 1 = PL */ - int16_t *decresidual, /* (i) decoded residual */ - int16_t *lpc, /* (i) decoded LPC (only used for no PL) */ - size_t inlag, /* (i) pitch lag */ - IlbcDecoder *iLBCdec_inst - /* (i/o) decoder instance */ - ); - -#endif diff --git a/WebRtc.NET/include/webrtc/modules/audio_coding/codecs/ilbc/encode.h b/WebRtc.NET/include/webrtc/modules/audio_coding/codecs/ilbc/encode.h deleted file mode 100644 index fe6ae625..00000000 --- a/WebRtc.NET/include/webrtc/modules/audio_coding/codecs/ilbc/encode.h +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -/****************************************************************** - - iLBC Speech Coder ANSI-C Source Code - - WebRtcIlbcfix_Encode.h - -******************************************************************/ - -#ifndef WEBRTC_MODULES_AUDIO_CODING_CODECS_ILBC_MAIN_SOURCE_ENCODE_H_ -#define WEBRTC_MODULES_AUDIO_CODING_CODECS_ILBC_MAIN_SOURCE_ENCODE_H_ - -#include "defines.h" - -/*----------------------------------------------------------------* - * main encoder function - *---------------------------------------------------------------*/ - -void WebRtcIlbcfix_EncodeImpl( - uint16_t *bytes, /* (o) encoded data bits iLBC */ - const int16_t *block, /* (i) speech vector to encode */ - IlbcEncoder *iLBCenc_inst /* (i/o) the general encoder - state */ - ); - -#endif diff --git a/WebRtc.NET/include/webrtc/modules/audio_coding/codecs/ilbc/energy_inverse.h b/WebRtc.NET/include/webrtc/modules/audio_coding/codecs/ilbc/energy_inverse.h deleted file mode 100644 index fe250943..00000000 --- a/WebRtc.NET/include/webrtc/modules/audio_coding/codecs/ilbc/energy_inverse.h +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -/****************************************************************** - - iLBC Speech Coder ANSI-C Source Code - - WebRtcIlbcfix_EnergyInverse.h - -******************************************************************/ - -#ifndef WEBRTC_MODULES_AUDIO_CODING_CODECS_ILBC_MAIN_SOURCE_ENERGY_INVERSE_H_ -#define WEBRTC_MODULES_AUDIO_CODING_CODECS_ILBC_MAIN_SOURCE_ENERGY_INVERSE_H_ - -#include "defines.h" - -/* Inverses the in vector in into Q29 domain */ - -void WebRtcIlbcfix_EnergyInverse( - int16_t *energy, /* (i/o) Energy and inverse - energy (in Q29) */ - size_t noOfEnergies); /* (i) The length of the energy - vector */ - -#endif diff --git a/WebRtc.NET/include/webrtc/modules/audio_coding/codecs/ilbc/enh_upsample.h b/WebRtc.NET/include/webrtc/modules/audio_coding/codecs/ilbc/enh_upsample.h deleted file mode 100644 index 00bb28b0..00000000 --- a/WebRtc.NET/include/webrtc/modules/audio_coding/codecs/ilbc/enh_upsample.h +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -/****************************************************************** - - iLBC Speech Coder ANSI-C Source Code - - WebRtcIlbcfix_EnhUpsample.h - -******************************************************************/ - -#ifndef WEBRTC_MODULES_AUDIO_CODING_CODECS_ILBC_MAIN_SOURCE_ENH_UPSAMPLE_H_ -#define WEBRTC_MODULES_AUDIO_CODING_CODECS_ILBC_MAIN_SOURCE_ENH_UPSAMPLE_H_ - -#include "defines.h" - -/*----------------------------------------------------------------* - * upsample finite array assuming zeros outside bounds - *---------------------------------------------------------------*/ - -void WebRtcIlbcfix_EnhUpsample( - int32_t *useq1, /* (o) upsampled output sequence */ - int16_t *seq1 /* (i) unupsampled sequence */ - ); - -#endif diff --git a/WebRtc.NET/include/webrtc/modules/audio_coding/codecs/ilbc/enhancer.h b/WebRtc.NET/include/webrtc/modules/audio_coding/codecs/ilbc/enhancer.h deleted file mode 100644 index ed219fb1..00000000 --- a/WebRtc.NET/include/webrtc/modules/audio_coding/codecs/ilbc/enhancer.h +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -/****************************************************************** - - iLBC Speech Coder ANSI-C Source Code - - WebRtcIlbcfix_Enhancer.h - -******************************************************************/ - -#ifndef WEBRTC_MODULES_AUDIO_CODING_CODECS_ILBC_MAIN_SOURCE_ENHANCER_H_ -#define WEBRTC_MODULES_AUDIO_CODING_CODECS_ILBC_MAIN_SOURCE_ENHANCER_H_ - -#include "defines.h" - -/*----------------------------------------------------------------* - * perform enhancement on idata+centerStartPos through - * idata+centerStartPos+ENH_BLOCKL-1 - *---------------------------------------------------------------*/ - -void WebRtcIlbcfix_Enhancer( - int16_t *odata, /* (o) smoothed block, dimension blockl */ - int16_t *idata, /* (i) data buffer used for enhancing */ - size_t idatal, /* (i) dimension idata */ - size_t centerStartPos, /* (i) first sample current block within idata */ - size_t *period, /* (i) pitch period array (pitch bward-in time) */ - const size_t *plocs, /* (i) locations where period array values valid */ - size_t periodl /* (i) dimension of period and plocs */ - ); - -#endif diff --git a/WebRtc.NET/include/webrtc/modules/audio_coding/codecs/ilbc/enhancer_interface.h b/WebRtc.NET/include/webrtc/modules/audio_coding/codecs/ilbc/enhancer_interface.h deleted file mode 100644 index d540533a..00000000 --- a/WebRtc.NET/include/webrtc/modules/audio_coding/codecs/ilbc/enhancer_interface.h +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -/****************************************************************** - - iLBC Speech Coder ANSI-C Source Code - - WebRtcIlbcfix_EnhancerInterface.h - -******************************************************************/ - -#ifndef WEBRTC_MODULES_AUDIO_CODING_CODECS_ILBC_MAIN_SOURCE_ENHANCER_INTERFACE_H_ -#define WEBRTC_MODULES_AUDIO_CODING_CODECS_ILBC_MAIN_SOURCE_ENHANCER_INTERFACE_H_ - -#include "defines.h" - -/*----------------------------------------------------------------* - * interface for enhancer - *---------------------------------------------------------------*/ - -size_t // (o) Estimated lag in end of in[] - WebRtcIlbcfix_EnhancerInterface( - int16_t* out, // (o) enhanced signal - const int16_t* in, // (i) unenhanced signal - IlbcDecoder* iLBCdec_inst); // (i) buffers etc - -#endif diff --git a/WebRtc.NET/include/webrtc/modules/audio_coding/codecs/ilbc/filtered_cb_vecs.h b/WebRtc.NET/include/webrtc/modules/audio_coding/codecs/ilbc/filtered_cb_vecs.h deleted file mode 100644 index d23b25c1..00000000 --- a/WebRtc.NET/include/webrtc/modules/audio_coding/codecs/ilbc/filtered_cb_vecs.h +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -/****************************************************************** - - iLBC Speech Coder ANSI-C Source Code - - WebRtcIlbcfix_FilteredCbVecs.h - -******************************************************************/ - -#ifndef WEBRTC_MODULES_AUDIO_CODING_CODECS_ILBC_MAIN_SOURCE_FILTERED_CB_VECS_H_ -#define WEBRTC_MODULES_AUDIO_CODING_CODECS_ILBC_MAIN_SOURCE_FILTERED_CB_VECS_H_ - -#include "defines.h" - -/*----------------------------------------------------------------* - * Construct an additional codebook vector by filtering the - * initial codebook buffer. This vector is then used to expand - * the codebook with an additional section. - *---------------------------------------------------------------*/ - -void WebRtcIlbcfix_FilteredCbVecs( - int16_t *cbvectors, /* (o) Codebook vector for the higher section */ - int16_t *CBmem, /* (i) Codebook memory that is filtered to create a - second CB section */ - size_t lMem, /* (i) Length of codebook memory */ - size_t samples /* (i) Number of samples to filter */ - ); - -#endif diff --git a/WebRtc.NET/include/webrtc/modules/audio_coding/codecs/ilbc/frame_classify.h b/WebRtc.NET/include/webrtc/modules/audio_coding/codecs/ilbc/frame_classify.h deleted file mode 100644 index 99f71447..00000000 --- a/WebRtc.NET/include/webrtc/modules/audio_coding/codecs/ilbc/frame_classify.h +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -/****************************************************************** - - iLBC Speech Coder ANSI-C Source Code - - WebRtcIlbcfix_FrameClassify.h - -******************************************************************/ - -#ifndef WEBRTC_MODULES_AUDIO_CODING_CODECS_ILBC_MAIN_SOURCE_FRAME_CLASSIFY_H_ -#define WEBRTC_MODULES_AUDIO_CODING_CODECS_ILBC_MAIN_SOURCE_FRAME_CLASSIFY_H_ - -size_t WebRtcIlbcfix_FrameClassify( - /* (o) Index to the max-energy sub frame */ - IlbcEncoder *iLBCenc_inst, - /* (i/o) the encoder state structure */ - int16_t *residualFIX /* (i) lpc residual signal */ - ); - -#endif diff --git a/WebRtc.NET/include/webrtc/modules/audio_coding/codecs/ilbc/gain_quant.h b/WebRtc.NET/include/webrtc/modules/audio_coding/codecs/ilbc/gain_quant.h deleted file mode 100644 index 39543641..00000000 --- a/WebRtc.NET/include/webrtc/modules/audio_coding/codecs/ilbc/gain_quant.h +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -/****************************************************************** - - iLBC Speech Coder ANSI-C Source Code - - WebRtcIlbcfix_GainQuant.h - -******************************************************************/ - -#ifndef WEBRTC_MODULES_AUDIO_CODING_CODECS_ILBC_MAIN_SOURCE_GAIN_QUANT_H_ -#define WEBRTC_MODULES_AUDIO_CODING_CODECS_ILBC_MAIN_SOURCE_GAIN_QUANT_H_ - -#include "defines.h" - -/*----------------------------------------------------------------* - * quantizer for the gain in the gain-shape coding of residual - *---------------------------------------------------------------*/ - -int16_t WebRtcIlbcfix_GainQuant( /* (o) quantized gain value */ - int16_t gain, /* (i) gain value Q14 */ - int16_t maxIn, /* (i) maximum of gain value Q14 */ - int16_t stage, /* (i) The stage of the search */ - int16_t *index /* (o) quantization index */ - ); - -#endif diff --git a/WebRtc.NET/include/webrtc/modules/audio_coding/codecs/ilbc/get_sync_seq.h b/WebRtc.NET/include/webrtc/modules/audio_coding/codecs/ilbc/get_sync_seq.h deleted file mode 100644 index 0e3b2077..00000000 --- a/WebRtc.NET/include/webrtc/modules/audio_coding/codecs/ilbc/get_sync_seq.h +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -/****************************************************************** - - iLBC Speech Coder ANSI-C Source Code - - WebRtcIlbcfix_GetSyncSeq.h - -******************************************************************/ - -#ifndef WEBRTC_MODULES_AUDIO_CODING_CODECS_ILBC_MAIN_SOURCE_GET_SYNC_SEQ_H_ -#define WEBRTC_MODULES_AUDIO_CODING_CODECS_ILBC_MAIN_SOURCE_GET_SYNC_SEQ_H_ - -#include "defines.h" - -/*----------------------------------------------------------------* - * get the pitch-synchronous sample sequence - *---------------------------------------------------------------*/ - -void WebRtcIlbcfix_GetSyncSeq( - int16_t *idata, /* (i) original data */ - size_t idatal, /* (i) dimension of data */ - size_t centerStartPos, /* (i) where current block starts */ - size_t *period, /* (i) rough-pitch-period array (Q-2) */ - const size_t *plocs, /* (i) where periods of period array are taken (Q-2) */ - size_t periodl, /* (i) dimension period array */ - size_t hl, /* (i) 2*hl+1 is the number of sequences */ - int16_t *surround /* (i/o) The contribution from this sequence - summed with earlier contributions */ - ); - -#endif diff --git a/WebRtc.NET/include/webrtc/modules/audio_coding/codecs/ilbc/hp_input.h b/WebRtc.NET/include/webrtc/modules/audio_coding/codecs/ilbc/hp_input.h deleted file mode 100644 index acdfa912..00000000 --- a/WebRtc.NET/include/webrtc/modules/audio_coding/codecs/ilbc/hp_input.h +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -/****************************************************************** - - iLBC Speech Coder ANSI-C Source Code - - WebRtcIlbcfix_HpInput.h - -******************************************************************/ - -#ifndef WEBRTC_MODULES_AUDIO_CODING_CODECS_ILBC_MAIN_SOURCE_HP_INPUT_H_ -#define WEBRTC_MODULES_AUDIO_CODING_CODECS_ILBC_MAIN_SOURCE_HP_INPUT_H_ - -#include "defines.h" - -void WebRtcIlbcfix_HpInput( - int16_t *signal, /* (i/o) signal vector */ - int16_t *ba, /* (i) B- and A-coefficients (2:nd order) - {b[0] b[1] b[2] -a[1] -a[2]} a[0] - is assumed to be 1.0 */ - int16_t *y, /* (i/o) Filter state yhi[n-1] ylow[n-1] - yhi[n-2] ylow[n-2] */ - int16_t *x, /* (i/o) Filter state x[n-1] x[n-2] */ - size_t len); /* (i) Number of samples to filter */ - -#endif diff --git a/WebRtc.NET/include/webrtc/modules/audio_coding/codecs/ilbc/hp_output.h b/WebRtc.NET/include/webrtc/modules/audio_coding/codecs/ilbc/hp_output.h deleted file mode 100644 index 1840b681..00000000 --- a/WebRtc.NET/include/webrtc/modules/audio_coding/codecs/ilbc/hp_output.h +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -/****************************************************************** - - iLBC Speech Coder ANSI-C Source Code - - WebRtcIlbcfix_HpOutput.h - -******************************************************************/ - -#ifndef WEBRTC_MODULES_AUDIO_CODING_CODECS_ILBC_MAIN_SOURCE_HP_OUTPUT_H_ -#define WEBRTC_MODULES_AUDIO_CODING_CODECS_ILBC_MAIN_SOURCE_HP_OUTPUT_H_ - -#include "defines.h" - -void WebRtcIlbcfix_HpOutput( - int16_t *signal, /* (i/o) signal vector */ - int16_t *ba, /* (i) B- and A-coefficients (2:nd order) - {b[0] b[1] b[2] -a[1] -a[2]} a[0] - is assumed to be 1.0 */ - int16_t *y, /* (i/o) Filter state yhi[n-1] ylow[n-1] - yhi[n-2] ylow[n-2] */ - int16_t *x, /* (i/o) Filter state x[n-1] x[n-2] */ - size_t len); /* (i) Number of samples to filter */ - -#endif diff --git a/WebRtc.NET/include/webrtc/modules/audio_coding/codecs/ilbc/ilbc.h b/WebRtc.NET/include/webrtc/modules/audio_coding/codecs/ilbc/ilbc.h deleted file mode 100644 index c021f5be..00000000 --- a/WebRtc.NET/include/webrtc/modules/audio_coding/codecs/ilbc/ilbc.h +++ /dev/null @@ -1,258 +0,0 @@ -/* - * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -/* - * ilbc.h - * - * This header file contains all of the API's for iLBC. - * - */ - -#ifndef WEBRTC_MODULES_AUDIO_CODING_CODECS_ILBC_ILBC_H_ -#define WEBRTC_MODULES_AUDIO_CODING_CODECS_ILBC_ILBC_H_ - -#include - -/* - * Define the fixpoint numeric formats - */ - -#include "webrtc/typedefs.h" - -/* - * Solution to support multiple instances - * Customer has to cast instance to proper type - */ - -typedef struct iLBC_encinst_t_ IlbcEncoderInstance; - -typedef struct iLBC_decinst_t_ IlbcDecoderInstance; - -/* - * Comfort noise constants - */ - -#define ILBC_SPEECH 1 -#define ILBC_CNG 2 - -#ifdef __cplusplus -extern "C" { -#endif - - /**************************************************************************** - * WebRtcIlbcfix_XxxAssign(...) - * - * These functions assigns the encoder/decoder instance to the specified - * memory location - * - * Input: - * - XXX_xxxinst : Pointer to created instance that should be - * assigned - * - ILBCXXX_inst_Addr : Pointer to the desired memory space - * - size : The size that this structure occupies (in Word16) - * - * Return value : 0 - Ok - * -1 - Error - */ - - int16_t WebRtcIlbcfix_EncoderAssign(IlbcEncoderInstance **iLBC_encinst, - int16_t *ILBCENC_inst_Addr, - int16_t *size); - int16_t WebRtcIlbcfix_DecoderAssign(IlbcDecoderInstance **iLBC_decinst, - int16_t *ILBCDEC_inst_Addr, - int16_t *size); - - - /**************************************************************************** - * WebRtcIlbcfix_XxxAssign(...) - * - * These functions create a instance to the specified structure - * - * Input: - * - XXX_inst : Pointer to created instance that should be created - * - * Return value : 0 - Ok - * -1 - Error - */ - - int16_t WebRtcIlbcfix_EncoderCreate(IlbcEncoderInstance **iLBC_encinst); - int16_t WebRtcIlbcfix_DecoderCreate(IlbcDecoderInstance **iLBC_decinst); - - /**************************************************************************** - * WebRtcIlbcfix_XxxFree(...) - * - * These functions frees the dynamic memory of a specified instance - * - * Input: - * - XXX_inst : Pointer to created instance that should be freed - * - * Return value : 0 - Ok - * -1 - Error - */ - - int16_t WebRtcIlbcfix_EncoderFree(IlbcEncoderInstance *iLBC_encinst); - int16_t WebRtcIlbcfix_DecoderFree(IlbcDecoderInstance *iLBC_decinst); - - - /**************************************************************************** - * WebRtcIlbcfix_EncoderInit(...) - * - * This function initializes a iLBC instance - * - * Input: - * - iLBCenc_inst : iLBC instance, i.e. the user that should receive - * be initialized - * - frameLen : The frame length of the codec 20/30 (ms) - * - * Return value : 0 - Ok - * -1 - Error - */ - - int16_t WebRtcIlbcfix_EncoderInit(IlbcEncoderInstance *iLBCenc_inst, - int16_t frameLen); - - /**************************************************************************** - * WebRtcIlbcfix_Encode(...) - * - * This function encodes one iLBC frame. Input speech length has be a - * multiple of the frame length. - * - * Input: - * - iLBCenc_inst : iLBC instance, i.e. the user that should encode - * a package - * - speechIn : Input speech vector - * - len : Samples in speechIn (160, 240, 320 or 480) - * - * Output: - * - encoded : The encoded data vector - * - * Return value : >0 - Length (in bytes) of coded data - * -1 - Error - */ - - int WebRtcIlbcfix_Encode(IlbcEncoderInstance *iLBCenc_inst, - const int16_t *speechIn, - size_t len, - uint8_t* encoded); - - /**************************************************************************** - * WebRtcIlbcfix_DecoderInit(...) - * - * This function initializes a iLBC instance with either 20 or 30 ms frames - * Alternatively the WebRtcIlbcfix_DecoderInit_XXms can be used. Then it's - * not needed to specify the frame length with a variable. - * - * Input: - * - IlbcDecoderInstance : iLBC decoder instance - * - frameLen : The frame length of the codec 20/30 (ms) - * - * Return value : 0 - Ok - * -1 - Error - */ - - int16_t WebRtcIlbcfix_DecoderInit(IlbcDecoderInstance *iLBCdec_inst, - int16_t frameLen); - void WebRtcIlbcfix_DecoderInit20Ms(IlbcDecoderInstance* iLBCdec_inst); - void WebRtcIlbcfix_Decoderinit30Ms(IlbcDecoderInstance* iLBCdec_inst); - - /**************************************************************************** - * WebRtcIlbcfix_Decode(...) - * - * This function decodes a packet with iLBC frame(s). Output speech length - * will be a multiple of 160 or 240 samples ((160 or 240)*frames/packet). - * - * Input: - * - iLBCdec_inst : iLBC instance, i.e. the user that should decode - * a packet - * - encoded : Encoded iLBC frame(s) - * - len : Bytes in encoded vector - * - * Output: - * - decoded : The decoded vector - * - speechType : 1 normal, 2 CNG - * - * Return value : >0 - Samples in decoded vector - * -1 - Error - */ - - int WebRtcIlbcfix_Decode(IlbcDecoderInstance* iLBCdec_inst, - const uint8_t* encoded, - size_t len, - int16_t* decoded, - int16_t* speechType); - int WebRtcIlbcfix_Decode20Ms(IlbcDecoderInstance* iLBCdec_inst, - const uint8_t* encoded, - size_t len, - int16_t* decoded, - int16_t* speechType); - int WebRtcIlbcfix_Decode30Ms(IlbcDecoderInstance* iLBCdec_inst, - const uint8_t* encoded, - size_t len, - int16_t* decoded, - int16_t* speechType); - - /**************************************************************************** - * WebRtcIlbcfix_DecodePlc(...) - * - * This function conducts PLC for iLBC frame(s). Output speech length - * will be a multiple of 160 or 240 samples. - * - * Input: - * - iLBCdec_inst : iLBC instance, i.e. the user that should perform - * a PLC - * - noOfLostFrames : Number of PLC frames to produce - * - * Output: - * - decoded : The "decoded" vector - * - * Return value : Samples in decoded PLC vector - */ - - size_t WebRtcIlbcfix_DecodePlc(IlbcDecoderInstance *iLBCdec_inst, - int16_t *decoded, - size_t noOfLostFrames); - - /**************************************************************************** - * WebRtcIlbcfix_NetEqPlc(...) - * - * This function updates the decoder when a packet loss has occured, but it - * does not produce any PLC data. Function can be used if another PLC method - * is used (i.e NetEq). - * - * Input: - * - iLBCdec_inst : iLBC instance that should be updated - * - noOfLostFrames : Number of lost frames - * - * Output: - * - decoded : The "decoded" vector (nothing in this case) - * - * Return value : Samples in decoded PLC vector - */ - - size_t WebRtcIlbcfix_NetEqPlc(IlbcDecoderInstance *iLBCdec_inst, - int16_t *decoded, - size_t noOfLostFrames); - - /**************************************************************************** - * WebRtcIlbcfix_version(...) - * - * This function returns the version number of iLBC - * - * Output: - * - version : Version number of iLBC (maximum 20 char) - */ - - void WebRtcIlbcfix_version(char *version); - -#ifdef __cplusplus -} -#endif - -#endif // WEBRTC_MODULES_AUDIO_CODING_CODECS_ILBC_ILBC_H_ diff --git a/WebRtc.NET/include/webrtc/modules/audio_coding/codecs/ilbc/index_conv_dec.h b/WebRtc.NET/include/webrtc/modules/audio_coding/codecs/ilbc/index_conv_dec.h deleted file mode 100644 index 354c5b8a..00000000 --- a/WebRtc.NET/include/webrtc/modules/audio_coding/codecs/ilbc/index_conv_dec.h +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -/****************************************************************** - - iLBC Speech Coder ANSI-C Source Code - - WebRtcIlbcfix_IndexConvDec.h - -******************************************************************/ - -#ifndef WEBRTC_MODULES_AUDIO_CODING_CODECS_ILBC_MAIN_SOURCE_INDEX_CONV_DEC_H_ -#define WEBRTC_MODULES_AUDIO_CODING_CODECS_ILBC_MAIN_SOURCE_INDEX_CONV_DEC_H_ - -#include "defines.h" - -void WebRtcIlbcfix_IndexConvDec( - int16_t *index /* (i/o) Codebook indexes */ - ); - -#endif diff --git a/WebRtc.NET/include/webrtc/modules/audio_coding/codecs/ilbc/init_decode.h b/WebRtc.NET/include/webrtc/modules/audio_coding/codecs/ilbc/init_decode.h deleted file mode 100644 index cdd21920..00000000 --- a/WebRtc.NET/include/webrtc/modules/audio_coding/codecs/ilbc/init_decode.h +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -/****************************************************************** - - iLBC Speech Coder ANSI-C Source Code - - WebRtcIlbcfix_InitDecode.h - -******************************************************************/ - -#ifndef WEBRTC_MODULES_AUDIO_CODING_CODECS_ILBC_MAIN_SOURCE_INIT_DECODE_H_ -#define WEBRTC_MODULES_AUDIO_CODING_CODECS_ILBC_MAIN_SOURCE_INIT_DECODE_H_ - -#include "defines.h" - -/*----------------------------------------------------------------* - * Initiation of decoder instance. - *---------------------------------------------------------------*/ - -int WebRtcIlbcfix_InitDecode( /* (o) Number of decoded samples */ - IlbcDecoder *iLBCdec_inst, /* (i/o) Decoder instance */ - int16_t mode, /* (i) frame size mode */ - int use_enhancer /* (i) 1 to use enhancer - 0 to run without enhancer */ - ); - -#endif diff --git a/WebRtc.NET/include/webrtc/modules/audio_coding/codecs/ilbc/init_encode.h b/WebRtc.NET/include/webrtc/modules/audio_coding/codecs/ilbc/init_encode.h deleted file mode 100644 index 7154661f..00000000 --- a/WebRtc.NET/include/webrtc/modules/audio_coding/codecs/ilbc/init_encode.h +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -/****************************************************************** - - iLBC Speech Coder ANSI-C Source Code - - WebRtcIlbcfix_InitEncode.h - -******************************************************************/ - -#ifndef WEBRTC_MODULES_AUDIO_CODING_CODECS_ILBC_MAIN_SOURCE_INIT_ENCODE_H_ -#define WEBRTC_MODULES_AUDIO_CODING_CODECS_ILBC_MAIN_SOURCE_INIT_ENCODE_H_ - -#include "defines.h" - -/*----------------------------------------------------------------* - * Initiation of encoder instance. - *---------------------------------------------------------------*/ - -int WebRtcIlbcfix_InitEncode( /* (o) Number of bytes encoded */ - IlbcEncoder *iLBCenc_inst, /* (i/o) Encoder instance */ - int16_t mode /* (i) frame size mode */ - ); - -#endif diff --git a/WebRtc.NET/include/webrtc/modules/audio_coding/codecs/ilbc/interpolate.h b/WebRtc.NET/include/webrtc/modules/audio_coding/codecs/ilbc/interpolate.h deleted file mode 100644 index 04832320..00000000 --- a/WebRtc.NET/include/webrtc/modules/audio_coding/codecs/ilbc/interpolate.h +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -/****************************************************************** - - iLBC Speech Coder ANSI-C Source Code - - WebRtcIlbcfix_Interpolate.h - -******************************************************************/ - -#ifndef WEBRTC_MODULES_AUDIO_CODING_CODECS_ILBC_MAIN_SOURCE_INTERPOLATE_H_ -#define WEBRTC_MODULES_AUDIO_CODING_CODECS_ILBC_MAIN_SOURCE_INTERPOLATE_H_ - -#include "defines.h" - -/*----------------------------------------------------------------* - * interpolation between vectors - *---------------------------------------------------------------*/ - -void WebRtcIlbcfix_Interpolate( - int16_t *out, /* (o) output vector */ - int16_t *in1, /* (i) first input vector */ - int16_t *in2, /* (i) second input vector */ - int16_t coef, /* (i) weight coefficient in Q14 */ - int16_t length); /* (i) number of sample is vectors */ - -#endif diff --git a/WebRtc.NET/include/webrtc/modules/audio_coding/codecs/ilbc/interpolate_samples.h b/WebRtc.NET/include/webrtc/modules/audio_coding/codecs/ilbc/interpolate_samples.h deleted file mode 100644 index 7549d2c2..00000000 --- a/WebRtc.NET/include/webrtc/modules/audio_coding/codecs/ilbc/interpolate_samples.h +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -/****************************************************************** - - iLBC Speech Coder ANSI-C Source Code - - WebRtcIlbcfix_InterpolateSamples.h - -******************************************************************/ - -#ifndef WEBRTC_MODULES_AUDIO_CODING_CODECS_ILBC_MAIN_SOURCE_INTERPOLATE_SAMPLES_H_ -#define WEBRTC_MODULES_AUDIO_CODING_CODECS_ILBC_MAIN_SOURCE_INTERPOLATE_SAMPLES_H_ - -#include "defines.h" - -/*----------------------------------------------------------------* - * Construct the interpolated samples for the Augmented CB - *---------------------------------------------------------------*/ - -void WebRtcIlbcfix_InterpolateSamples( - int16_t *interpSamples, /* (o) The interpolated samples */ - int16_t *CBmem, /* (i) The CB memory */ - size_t lMem /* (i) Length of the CB memory */ - ); - -#endif diff --git a/WebRtc.NET/include/webrtc/modules/audio_coding/codecs/ilbc/lpc_encode.h b/WebRtc.NET/include/webrtc/modules/audio_coding/codecs/ilbc/lpc_encode.h deleted file mode 100644 index 9f6f5041..00000000 --- a/WebRtc.NET/include/webrtc/modules/audio_coding/codecs/ilbc/lpc_encode.h +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -/****************************************************************** - - iLBC Speech Coder ANSI-C Source Code - - WebRtcIlbcfix_LpcEncode.h - -******************************************************************/ - -#ifndef WEBRTC_MODULES_AUDIO_CODING_CODECS_ILBC_MAIN_SOURCE_LPC_ENCODE_H_ -#define WEBRTC_MODULES_AUDIO_CODING_CODECS_ILBC_MAIN_SOURCE_LPC_ENCODE_H_ - -#include "defines.h" - -/*----------------------------------------------------------------* - * lpc encoder - *---------------------------------------------------------------*/ - -void WebRtcIlbcfix_LpcEncode( - int16_t *syntdenum, /* (i/o) synthesis filter coefficients - before/after encoding */ - int16_t *weightdenum, /* (i/o) weighting denumerator coefficients - before/after encoding */ - int16_t *lsf_index, /* (o) lsf quantization index */ - int16_t *data, /* (i) Speech to do LPC analysis on */ - IlbcEncoder *iLBCenc_inst - /* (i/o) the encoder state structure */ - ); - -#endif diff --git a/WebRtc.NET/include/webrtc/modules/audio_coding/codecs/ilbc/lsf_check.h b/WebRtc.NET/include/webrtc/modules/audio_coding/codecs/ilbc/lsf_check.h deleted file mode 100644 index 2f4ac8cc..00000000 --- a/WebRtc.NET/include/webrtc/modules/audio_coding/codecs/ilbc/lsf_check.h +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -/****************************************************************** - - iLBC Speech Coder ANSI-C Source Code - - WebRtcIlbcfix_LsfCheck.h - -******************************************************************/ - -#ifndef WEBRTC_MODULES_AUDIO_CODING_CODECS_ILBC_MAIN_SOURCE_LSF_CHECK_H_ -#define WEBRTC_MODULES_AUDIO_CODING_CODECS_ILBC_MAIN_SOURCE_LSF_CHECK_H_ - -#include "defines.h" - -/*----------------------------------------------------------------* - * check for stability of lsf coefficients - *---------------------------------------------------------------*/ - -int WebRtcIlbcfix_LsfCheck( - int16_t *lsf, /* LSF parameters */ - int dim, /* dimension of LSF */ - int NoAn); /* No of analysis per frame */ - -#endif diff --git a/WebRtc.NET/include/webrtc/modules/audio_coding/codecs/ilbc/lsf_interpolate_to_poly_dec.h b/WebRtc.NET/include/webrtc/modules/audio_coding/codecs/ilbc/lsf_interpolate_to_poly_dec.h deleted file mode 100644 index 3540c1c3..00000000 --- a/WebRtc.NET/include/webrtc/modules/audio_coding/codecs/ilbc/lsf_interpolate_to_poly_dec.h +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -/****************************************************************** - - iLBC Speech Coder ANSI-C Source Code - - WebRtcIlbcfix_LspInterpolate2PolyDec.h - -******************************************************************/ - -#ifndef WEBRTC_MODULES_AUDIO_CODING_CODECS_ILBC_MAIN_SOURCE_LSF_INTERPOLATE_TO_POLY_DEC_H_ -#define WEBRTC_MODULES_AUDIO_CODING_CODECS_ILBC_MAIN_SOURCE_LSF_INTERPOLATE_TO_POLY_DEC_H_ - -#include "defines.h" - -/*----------------------------------------------------------------* - * interpolation of lsf coefficients for the decoder - *---------------------------------------------------------------*/ - -void WebRtcIlbcfix_LspInterpolate2PolyDec( - int16_t *a, /* (o) lpc coefficients Q12 */ - int16_t *lsf1, /* (i) first set of lsf coefficients Q13 */ - int16_t *lsf2, /* (i) second set of lsf coefficients Q13 */ - int16_t coef, /* (i) weighting coefficient to use between - lsf1 and lsf2 Q14 */ - int16_t length /* (i) length of coefficient vectors */ - ); - -#endif diff --git a/WebRtc.NET/include/webrtc/modules/audio_coding/codecs/ilbc/lsf_interpolate_to_poly_enc.h b/WebRtc.NET/include/webrtc/modules/audio_coding/codecs/ilbc/lsf_interpolate_to_poly_enc.h deleted file mode 100644 index 799c1003..00000000 --- a/WebRtc.NET/include/webrtc/modules/audio_coding/codecs/ilbc/lsf_interpolate_to_poly_enc.h +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -/****************************************************************** - - iLBC Speech Coder ANSI-C Source Code - - WebRtcIlbcfix_LsfInterpolate2PloyEnc.h - -******************************************************************/ - -#ifndef WEBRTC_MODULES_AUDIO_CODING_CODECS_ILBC_MAIN_SOURCE_LSF_INTERPOLATE_TO_POLY_ENC_H_ -#define WEBRTC_MODULES_AUDIO_CODING_CODECS_ILBC_MAIN_SOURCE_LSF_INTERPOLATE_TO_POLY_ENC_H_ - -#include "defines.h" - -/*----------------------------------------------------------------* - * lsf interpolator and conversion from lsf to a coefficients - * (subrutine to SimpleInterpolateLSF) - *---------------------------------------------------------------*/ - -void WebRtcIlbcfix_LsfInterpolate2PloyEnc( - int16_t *a, /* (o) lpc coefficients Q12 */ - int16_t *lsf1, /* (i) first set of lsf coefficients Q13 */ - int16_t *lsf2, /* (i) second set of lsf coefficients Q13 */ - int16_t coef, /* (i) weighting coefficient to use between - lsf1 and lsf2 Q14 */ - int16_t length /* (i) length of coefficient vectors */ - ); - -#endif diff --git a/WebRtc.NET/include/webrtc/modules/audio_coding/codecs/ilbc/lsf_to_lsp.h b/WebRtc.NET/include/webrtc/modules/audio_coding/codecs/ilbc/lsf_to_lsp.h deleted file mode 100644 index b2104d7d..00000000 --- a/WebRtc.NET/include/webrtc/modules/audio_coding/codecs/ilbc/lsf_to_lsp.h +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -/****************************************************************** - - iLBC Speech Coder ANSI-C Source Code - - WebRtcIlbcfix_Lsf2Lsp.h - -******************************************************************/ - -#ifndef WEBRTC_MODULES_AUDIO_CODING_CODECS_ILBC_MAIN_SOURCE_LSF_TO_LSP_H_ -#define WEBRTC_MODULES_AUDIO_CODING_CODECS_ILBC_MAIN_SOURCE_LSF_TO_LSP_H_ - -#include "defines.h" - -/*----------------------------------------------------------------* - * conversion from lsf to lsp coefficients - *---------------------------------------------------------------*/ - -void WebRtcIlbcfix_Lsf2Lsp( - int16_t *lsf, /* (i) lsf in Q13 values between 0 and pi */ - int16_t *lsp, /* (o) lsp in Q15 values between -1 and 1 */ - int16_t m /* (i) number of coefficients */ - ); - -#endif diff --git a/WebRtc.NET/include/webrtc/modules/audio_coding/codecs/ilbc/lsf_to_poly.h b/WebRtc.NET/include/webrtc/modules/audio_coding/codecs/ilbc/lsf_to_poly.h deleted file mode 100644 index d85f510b..00000000 --- a/WebRtc.NET/include/webrtc/modules/audio_coding/codecs/ilbc/lsf_to_poly.h +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -/****************************************************************** - - iLBC Speech Coder ANSI-C Source Code - - WebRtcIlbcfix_Lsf2Poly.h - -******************************************************************/ - -#ifndef WEBRTC_MODULES_AUDIO_CODING_CODECS_ILBC_MAIN_SOURCE_LSF_TO_POLY_H_ -#define WEBRTC_MODULES_AUDIO_CODING_CODECS_ILBC_MAIN_SOURCE_LSF_TO_POLY_H_ - -#include "defines.h" - -/*----------------------------------------------------------------* - * Convert from LSF coefficients to A coefficients - *---------------------------------------------------------------*/ - -void WebRtcIlbcfix_Lsf2Poly( - int16_t *a, /* (o) predictor coefficients (order = 10) in Q12 */ - int16_t *lsf /* (i) line spectral frequencies in Q13 */ - ); - -#endif diff --git a/WebRtc.NET/include/webrtc/modules/audio_coding/codecs/ilbc/lsp_to_lsf.h b/WebRtc.NET/include/webrtc/modules/audio_coding/codecs/ilbc/lsp_to_lsf.h deleted file mode 100644 index a2bcaff3..00000000 --- a/WebRtc.NET/include/webrtc/modules/audio_coding/codecs/ilbc/lsp_to_lsf.h +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -/****************************************************************** - - iLBC Speech Coder ANSI-C Source Code - - WebRtcIlbcfix_Lsp2Lsf.h - -******************************************************************/ - -#ifndef WEBRTC_MODULES_AUDIO_CODING_CODECS_ILBC_MAIN_SOURCE_LSP_TO_LSF_H_ -#define WEBRTC_MODULES_AUDIO_CODING_CODECS_ILBC_MAIN_SOURCE_LSP_TO_LSF_H_ - -#include "defines.h" - -/*----------------------------------------------------------------* - * conversion from LSP coefficients to LSF coefficients - *---------------------------------------------------------------*/ - -void WebRtcIlbcfix_Lsp2Lsf( - int16_t *lsp, /* (i) lsp vector -1...+1 in Q15 */ - int16_t *lsf, /* (o) Lsf vector 0...Pi in Q13 - (ordered, so that lsf[i]; - -} // namespace webrtc -#endif // WEBRTC_MODULES_AUDIO_CODING_CODECS_ISAC_FIX_INCLUDE_AUDIO_DECODER_ISACFIX_H_ diff --git a/WebRtc.NET/include/webrtc/modules/audio_coding/codecs/isac/fix/include/audio_encoder_isacfix.h b/WebRtc.NET/include/webrtc/modules/audio_coding/codecs/isac/fix/include/audio_encoder_isacfix.h deleted file mode 100644 index b97f04bb..00000000 --- a/WebRtc.NET/include/webrtc/modules/audio_coding/codecs/isac/fix/include/audio_encoder_isacfix.h +++ /dev/null @@ -1,22 +0,0 @@ -/* - * Copyright (c) 2014 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MODULES_AUDIO_CODING_CODECS_ISAC_FIX_INCLUDE_AUDIO_ENCODER_ISACFIX_H_ -#define WEBRTC_MODULES_AUDIO_CODING_CODECS_ISAC_FIX_INCLUDE_AUDIO_ENCODER_ISACFIX_H_ - -#include "webrtc/modules/audio_coding/codecs/isac/audio_encoder_isac_t.h" -#include "webrtc/modules/audio_coding/codecs/isac/fix/source/isac_fix_type.h" - -namespace webrtc { - -using AudioEncoderIsacFix = AudioEncoderIsacT; - -} // namespace webrtc -#endif // WEBRTC_MODULES_AUDIO_CODING_CODECS_ISAC_FIX_INCLUDE_AUDIO_ENCODER_ISACFIX_H_ diff --git a/WebRtc.NET/include/webrtc/modules/audio_coding/codecs/isac/fix/include/isacfix.h b/WebRtc.NET/include/webrtc/modules/audio_coding/codecs/isac/fix/include/isacfix.h deleted file mode 100644 index 7f277ca2..00000000 --- a/WebRtc.NET/include/webrtc/modules/audio_coding/codecs/isac/fix/include/isacfix.h +++ /dev/null @@ -1,637 +0,0 @@ -/* - * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MODULES_AUDIO_CODING_CODECS_ISAC_FIX_INCLUDE_ISACFIX_H_ -#define WEBRTC_MODULES_AUDIO_CODING_CODECS_ISAC_FIX_INCLUDE_ISACFIX_H_ - -#include - -#include "webrtc/modules/audio_coding/codecs/isac/bandwidth_info.h" -#include "webrtc/typedefs.h" - -typedef struct { - void *dummy; -} ISACFIX_MainStruct; - - -#if defined(__cplusplus) -extern "C" { -#endif - - - /************************************************************************** - * WebRtcIsacfix_AssignSize(...) - * - * Functions used when malloc is not allowed - * Output the number of bytes needed to allocate for iSAC struct. - * - */ - - int16_t WebRtcIsacfix_AssignSize(int *sizeinbytes); - - /************************************************************************** - * WebRtcIsacfix_Assign(...) - * - * Functions used when malloc is not allowed, it - * places a struct at the given address. - * - * Input: - * - *ISAC_main_inst : a pointer to the coder instance. - * - ISACFIX_inst_Addr : address of the memory where a space is - * for iSAC structure. - * - * Return value : 0 - Ok - * -1 - Error - */ - - int16_t WebRtcIsacfix_Assign(ISACFIX_MainStruct **inst, - void *ISACFIX_inst_Addr); - - /**************************************************************************** - * WebRtcIsacfix_Create(...) - * - * This function creates an ISAC instance, which will contain the state - * information for one coding/decoding channel. - * - * Input: - * - *ISAC_main_inst : a pointer to the coder instance. - * - * Return value : 0 - Ok - * -1 - Error - */ - - int16_t WebRtcIsacfix_Create(ISACFIX_MainStruct **ISAC_main_inst); - - - /**************************************************************************** - * WebRtcIsacfix_Free(...) - * - * This function frees the ISAC instance created at the beginning. - * - * Input: - * - ISAC_main_inst : a ISAC instance. - * - * Return value : 0 - Ok - * -1 - Error - */ - - int16_t WebRtcIsacfix_Free(ISACFIX_MainStruct *ISAC_main_inst); - - - /**************************************************************************** - * WebRtcIsacfix_EncoderInit(...) - * - * This function initializes an ISAC instance prior to the encoder calls. - * - * Input: - * - ISAC_main_inst : ISAC instance. - * - CodingMode : 0 - Bit rate and frame length are automatically - * adjusted to available bandwidth on - * transmission channel. - * 1 - User sets a frame length and a target bit - * rate which is taken as the maximum short-term - * average bit rate. - * - * Return value : 0 - Ok - * -1 - Error - */ - - int16_t WebRtcIsacfix_EncoderInit(ISACFIX_MainStruct *ISAC_main_inst, - int16_t CodingMode); - - - /**************************************************************************** - * WebRtcIsacfix_Encode(...) - * - * This function encodes 10ms frame(s) and inserts it into a package. - * Input speech length has to be 160 samples (10ms). The encoder buffers those - * 10ms frames until it reaches the chosen Framesize (480 or 960 samples - * corresponding to 30 or 60 ms frames), and then proceeds to the encoding. - * - * Input: - * - ISAC_main_inst : ISAC instance. - * - speechIn : input speech vector. - * - * Output: - * - encoded : the encoded data vector - * - * Return value : >0 - Length (in bytes) of coded data - * 0 - The buffer didn't reach the chosen framesize - * so it keeps buffering speech samples. - * -1 - Error - */ - - int WebRtcIsacfix_Encode(ISACFIX_MainStruct *ISAC_main_inst, - const int16_t *speechIn, - uint8_t* encoded); - - - - /**************************************************************************** - * WebRtcIsacfix_EncodeNb(...) - * - * This function encodes 10ms narrow band (8 kHz sampling) frame(s) and inserts - * it into a package. Input speech length has to be 80 samples (10ms). The encoder - * interpolates into wide-band (16 kHz sampling) buffers those - * 10ms frames until it reaches the chosen Framesize (480 or 960 wide-band samples - * corresponding to 30 or 60 ms frames), and then proceeds to the encoding. - * - * The function is enabled if WEBRTC_ISAC_FIX_NB_CALLS_ENABLED is defined - * - * Input: - * - ISAC_main_inst : ISAC instance. - * - speechIn : input speech vector. - * - * Output: - * - encoded : the encoded data vector - * - * Return value : >0 - Length (in bytes) of coded data - * 0 - The buffer didn't reach the chosen framesize - * so it keeps buffering speech samples. - * -1 - Error - */ - - -#ifdef WEBRTC_ISAC_FIX_NB_CALLS_ENABLED - int16_t WebRtcIsacfix_EncodeNb(ISACFIX_MainStruct *ISAC_main_inst, - const int16_t *speechIn, - int16_t *encoded); -#endif // WEBRTC_ISAC_FIX_NB_CALLS_ENABLED - - - - /**************************************************************************** - * WebRtcIsacfix_DecoderInit(...) - * - * This function initializes an ISAC instance prior to the decoder calls. - * - * Input: - * - ISAC_main_inst : ISAC instance. - */ - - void WebRtcIsacfix_DecoderInit(ISACFIX_MainStruct* ISAC_main_inst); - - /**************************************************************************** - * WebRtcIsacfix_UpdateBwEstimate1(...) - * - * This function updates the estimate of the bandwidth. - * - * Input: - * - ISAC_main_inst : ISAC instance. - * - encoded : encoded ISAC frame(s). - * - packet_size : size of the packet in bytes. - * - rtp_seq_number : the RTP number of the packet. - * - arr_ts : the arrival time of the packet (from NetEq) - * in samples. - * - * Return value : 0 - Ok - * -1 - Error - */ - - int16_t WebRtcIsacfix_UpdateBwEstimate1(ISACFIX_MainStruct *ISAC_main_inst, - const uint8_t* encoded, - size_t packet_size, - uint16_t rtp_seq_number, - uint32_t arr_ts); - - /**************************************************************************** - * WebRtcIsacfix_UpdateBwEstimate(...) - * - * This function updates the estimate of the bandwidth. - * - * Input: - * - ISAC_main_inst : ISAC instance. - * - encoded : encoded ISAC frame(s). - * - packet_size : size of the packet in bytes. - * - rtp_seq_number : the RTP number of the packet. - * - send_ts : the send time of the packet from RTP header, - * in samples. - * - arr_ts : the arrival time of the packet (from NetEq) - * in samples. - * - * Return value : 0 - Ok - * -1 - Error - */ - - int16_t WebRtcIsacfix_UpdateBwEstimate(ISACFIX_MainStruct *ISAC_main_inst, - const uint8_t* encoded, - size_t packet_size, - uint16_t rtp_seq_number, - uint32_t send_ts, - uint32_t arr_ts); - - /**************************************************************************** - * WebRtcIsacfix_Decode(...) - * - * This function decodes an ISAC frame. Output speech length - * will be a multiple of 480 samples: 480 or 960 samples, - * depending on the framesize (30 or 60 ms). - * - * Input: - * - ISAC_main_inst : ISAC instance. - * - encoded : encoded ISAC frame(s) - * - len : bytes in encoded vector - * - * Output: - * - decoded : The decoded vector - * - * Return value : >0 - number of samples in decoded vector - * -1 - Error - */ - - int WebRtcIsacfix_Decode(ISACFIX_MainStruct *ISAC_main_inst, - const uint8_t* encoded, - size_t len, - int16_t *decoded, - int16_t *speechType); - - - /**************************************************************************** - * WebRtcIsacfix_DecodeNb(...) - * - * This function decodes a ISAC frame in narrow-band (8 kHz sampling). - * Output speech length will be a multiple of 240 samples: 240 or 480 samples, - * depending on the framesize (30 or 60 ms). - * - * The function is enabled if WEBRTC_ISAC_FIX_NB_CALLS_ENABLED is defined - * - * Input: - * - ISAC_main_inst : ISAC instance. - * - encoded : encoded ISAC frame(s) - * - len : bytes in encoded vector - * - * Output: - * - decoded : The decoded vector - * - * Return value : >0 - number of samples in decoded vector - * -1 - Error - */ - -#ifdef WEBRTC_ISAC_FIX_NB_CALLS_ENABLED - int WebRtcIsacfix_DecodeNb(ISACFIX_MainStruct *ISAC_main_inst, - const uint16_t *encoded, - size_t len, - int16_t *decoded, - int16_t *speechType); -#endif // WEBRTC_ISAC_FIX_NB_CALLS_ENABLED - - - /**************************************************************************** - * WebRtcIsacfix_DecodePlcNb(...) - * - * This function conducts PLC for ISAC frame(s) in narrow-band (8kHz sampling). - * Output speech length will be "240*noOfLostFrames" samples - * that equevalent of "30*noOfLostFrames" millisecond. - * - * The function is enabled if WEBRTC_ISAC_FIX_NB_CALLS_ENABLED is defined - * - * Input: - * - ISAC_main_inst : ISAC instance. - * - noOfLostFrames : Number of PLC frames (240 sample=30ms) to produce - * NOTE! Maximum number is 2 (480 samples = 60ms) - * - * Output: - * - decoded : The decoded vector - * - * Return value : Number of samples in decoded PLC vector - */ - -#ifdef WEBRTC_ISAC_FIX_NB_CALLS_ENABLED - size_t WebRtcIsacfix_DecodePlcNb(ISACFIX_MainStruct *ISAC_main_inst, - int16_t *decoded, - size_t noOfLostFrames); -#endif // WEBRTC_ISAC_FIX_NB_CALLS_ENABLED - - - - - /**************************************************************************** - * WebRtcIsacfix_DecodePlc(...) - * - * This function conducts PLC for ISAC frame(s) in wide-band (16kHz sampling). - * Output speech length will be "480*noOfLostFrames" samples - * that is equevalent of "30*noOfLostFrames" millisecond. - * - * Input: - * - ISAC_main_inst : ISAC instance. - * - noOfLostFrames : Number of PLC frames (480sample = 30ms) - * to produce - * NOTE! Maximum number is 2 (960 samples = 60ms) - * - * Output: - * - decoded : The decoded vector - * - * Return value : Number of samples in decoded PLC vector - */ - - size_t WebRtcIsacfix_DecodePlc(ISACFIX_MainStruct *ISAC_main_inst, - int16_t *decoded, - size_t noOfLostFrames ); - - - /**************************************************************************** - * WebRtcIsacfix_ReadFrameLen(...) - * - * This function returns the length of the frame represented in the packet. - * - * Input: - * - encoded : Encoded bitstream - * - encoded_len_bytes : Length of the bitstream in bytes. - * - * Output: - * - frameLength : Length of frame in packet (in samples) - * - */ - - int16_t WebRtcIsacfix_ReadFrameLen(const uint8_t* encoded, - size_t encoded_len_bytes, - size_t* frameLength); - - /**************************************************************************** - * WebRtcIsacfix_Control(...) - * - * This function sets the limit on the short-term average bit rate and the - * frame length. Should be used only in Instantaneous mode. - * - * Input: - * - ISAC_main_inst : ISAC instance. - * - rate : limit on the short-term average bit rate, - * in bits/second (between 10000 and 32000) - * - framesize : number of milliseconds per frame (30 or 60) - * - * Return value : 0 - ok - * -1 - Error - */ - - int16_t WebRtcIsacfix_Control(ISACFIX_MainStruct *ISAC_main_inst, - int16_t rate, - int framesize); - - void WebRtcIsacfix_SetInitialBweBottleneck(ISACFIX_MainStruct* ISAC_main_inst, - int bottleneck_bits_per_second); - - /**************************************************************************** - * WebRtcIsacfix_ControlBwe(...) - * - * This function sets the initial values of bottleneck and frame-size if - * iSAC is used in channel-adaptive mode. Through this API, users can - * enforce a frame-size for all values of bottleneck. Then iSAC will not - * automatically change the frame-size. - * - * - * Input: - * - ISAC_main_inst : ISAC instance. - * - rateBPS : initial value of bottleneck in bits/second - * 10000 <= rateBPS <= 32000 is accepted - * - frameSizeMs : number of milliseconds per frame (30 or 60) - * - enforceFrameSize : 1 to enforce the given frame-size through out - * the adaptation process, 0 to let iSAC change - * the frame-size if required. - * - * Return value : 0 - ok - * -1 - Error - */ - - int16_t WebRtcIsacfix_ControlBwe(ISACFIX_MainStruct *ISAC_main_inst, - int16_t rateBPS, - int frameSizeMs, - int16_t enforceFrameSize); - - - - /**************************************************************************** - * WebRtcIsacfix_version(...) - * - * This function returns the version number. - * - * Output: - * - version : Pointer to character string - * - */ - - void WebRtcIsacfix_version(char *version); - - - /**************************************************************************** - * WebRtcIsacfix_GetErrorCode(...) - * - * This function can be used to check the error code of an iSAC instance. When - * a function returns -1 a error code will be set for that instance. The - * function below extract the code of the last error that occured in the - * specified instance. - * - * Input: - * - ISAC_main_inst : ISAC instance - * - * Return value : Error code - */ - - int16_t WebRtcIsacfix_GetErrorCode(ISACFIX_MainStruct *ISAC_main_inst); - - - /**************************************************************************** - * WebRtcIsacfix_GetUplinkBw(...) - * - * This function return iSAC send bitrate - * - * Input: - * - ISAC_main_inst : iSAC instance - * - * Return value : <0 Error code - * else bitrate - */ - - int32_t WebRtcIsacfix_GetUplinkBw(ISACFIX_MainStruct *ISAC_main_inst); - - - /**************************************************************************** - * WebRtcIsacfix_SetMaxPayloadSize(...) - * - * This function sets a limit for the maximum payload size of iSAC. The same - * value is used both for 30 and 60 msec packets. - * The absolute max will be valid until next time the function is called. - * NOTE! This function may override the function WebRtcIsacfix_SetMaxRate() - * - * Input: - * - ISAC_main_inst : iSAC instance - * - maxPayloadBytes : maximum size of the payload in bytes - * valid values are between 100 and 400 bytes - * - * - * Return value : 0 if sucessful - * -1 if error happens - */ - - int16_t WebRtcIsacfix_SetMaxPayloadSize(ISACFIX_MainStruct *ISAC_main_inst, - int16_t maxPayloadBytes); - - - /**************************************************************************** - * WebRtcIsacfix_SetMaxRate(...) - * - * This function sets the maximum rate which the codec may not exceed for a - * singel packet. The maximum rate is set in bits per second. - * The codec has an absolute maximum rate of 53400 bits per second (200 bytes - * per 30 msec). - * It is possible to set a maximum rate between 32000 and 53400 bits per second. - * - * The rate limit is valid until next time the function is called. - * - * NOTE! Packet size will never go above the value set if calling - * WebRtcIsacfix_SetMaxPayloadSize() (default max packet size is 400 bytes). - * - * Input: - * - ISAC_main_inst : iSAC instance - * - maxRateInBytes : maximum rate in bits per second, - * valid values are 32000 to 53400 bits - * - * Return value : 0 if sucessful - * -1 if error happens - */ - - int16_t WebRtcIsacfix_SetMaxRate(ISACFIX_MainStruct *ISAC_main_inst, - int32_t maxRate); - - /**************************************************************************** - * WebRtcIsacfix_CreateInternal(...) - * - * This function creates the memory that is used to store data in the encoder - * - * Input: - * - *ISAC_main_inst : a pointer to the coder instance. - * - * Return value : 0 - Ok - * -1 - Error - */ - - int16_t WebRtcIsacfix_CreateInternal(ISACFIX_MainStruct *ISAC_main_inst); - - - /**************************************************************************** - * WebRtcIsacfix_FreeInternal(...) - * - * This function frees the internal memory for storing encoder data. - * - * Input: - * - ISAC_main_inst : an ISAC instance. - * - * Return value : 0 - Ok - * -1 - Error - */ - - int16_t WebRtcIsacfix_FreeInternal(ISACFIX_MainStruct *ISAC_main_inst); - - - /**************************************************************************** - * WebRtcIsacfix_GetNewBitStream(...) - * - * This function returns encoded data, with the recieved bwe-index in the - * stream. It should always return a complete packet, i.e. only called once - * even for 60 msec frames - * - * Input: - * - ISAC_main_inst : ISAC instance. - * - bweIndex : index of bandwidth estimate to put in new bitstream - * - scale : factor for rate change (0.4 ~=> half the rate, 1 no change). - * - * Output: - * - encoded : the encoded data vector - * - * Return value : >0 - Length (in bytes) of coded data - * -1 - Error - */ - - int16_t WebRtcIsacfix_GetNewBitStream(ISACFIX_MainStruct *ISAC_main_inst, - int16_t bweIndex, - float scale, - uint8_t* encoded); - - - /**************************************************************************** - * WebRtcIsacfix_GetDownLinkBwIndex(...) - * - * This function returns index representing the Bandwidth estimate from - * other side to this side. - * - * Input: - * - ISAC_main_inst : iSAC struct - * - * Output: - * - rateIndex : Bandwidth estimate to transmit to other side. - * - */ - - int16_t WebRtcIsacfix_GetDownLinkBwIndex(ISACFIX_MainStruct* ISAC_main_inst, - int16_t* rateIndex); - - - /**************************************************************************** - * WebRtcIsacfix_UpdateUplinkBw(...) - * - * This function takes an index representing the Bandwidth estimate from - * this side to other side and updates BWE. - * - * Input: - * - ISAC_main_inst : iSAC struct - * - rateIndex : Bandwidth estimate from other side. - * - */ - - int16_t WebRtcIsacfix_UpdateUplinkBw(ISACFIX_MainStruct* ISAC_main_inst, - int16_t rateIndex); - - - /**************************************************************************** - * WebRtcIsacfix_ReadBwIndex(...) - * - * This function returns the index of the Bandwidth estimate from the bitstream. - * - * Input: - * - encoded : Encoded bitstream - * - encoded_len_bytes : Length of the bitstream in bytes. - * - * Output: - * - rateIndex : Bandwidth estimate in bitstream - * - */ - - int16_t WebRtcIsacfix_ReadBwIndex(const uint8_t* encoded, - size_t encoded_len_bytes, - int16_t* rateIndex); - - - /**************************************************************************** - * WebRtcIsacfix_GetNewFrameLen(...) - * - * This function return the next frame length (in samples) of iSAC. - * - * Input: - * -ISAC_main_inst : iSAC instance - * - * Return value : frame lenght in samples - */ - - int16_t WebRtcIsacfix_GetNewFrameLen(ISACFIX_MainStruct *ISAC_main_inst); - - /* Fills in an IsacBandwidthInfo struct. */ - void WebRtcIsacfix_GetBandwidthInfo(ISACFIX_MainStruct* ISAC_main_inst, - IsacBandwidthInfo* bwinfo); - - /* Uses the values from an IsacBandwidthInfo struct. */ - void WebRtcIsacfix_SetBandwidthInfo(ISACFIX_MainStruct* ISAC_main_inst, - const IsacBandwidthInfo* bwinfo); - -#if defined(__cplusplus) -} -#endif - - - -#endif /* WEBRTC_MODULES_AUDIO_CODING_CODECS_ISAC_FIX_INCLUDE_ISACFIX_H_ */ diff --git a/WebRtc.NET/include/webrtc/modules/audio_coding/codecs/isac/fix/source/arith_routins.h b/WebRtc.NET/include/webrtc/modules/audio_coding/codecs/isac/fix/source/arith_routins.h deleted file mode 100644 index 40bbb4cd..00000000 --- a/WebRtc.NET/include/webrtc/modules/audio_coding/codecs/isac/fix/source/arith_routins.h +++ /dev/null @@ -1,160 +0,0 @@ -/* - * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -/* - * arith_routins.h - * - * Functions for arithmetic coding. - * - */ - -#ifndef WEBRTC_MODULES_AUDIO_CODING_CODECS_ISAC_FIX_SOURCE_ARITH_ROUTINS_H_ -#define WEBRTC_MODULES_AUDIO_CODING_CODECS_ISAC_FIX_SOURCE_ARITH_ROUTINS_H_ - -#include "structs.h" - - -/**************************************************************************** - * WebRtcIsacfix_EncLogisticMulti2(...) - * - * Arithmetic coding of spectrum. - * - * Input: - * - streamData : in-/output struct containing bitstream - * - dataQ7 : data vector in Q7 - * - envQ8 : side info vector defining the width of the pdf - * in Q8 - * - lenData : data vector length - * - * Return value : 0 if ok, - * <0 otherwise. - */ -int WebRtcIsacfix_EncLogisticMulti2( - Bitstr_enc *streamData, - int16_t *dataQ7, - const uint16_t *env, - const int16_t lenData); - - -/**************************************************************************** - * WebRtcIsacfix_EncTerminate(...) - * - * Final call to the arithmetic coder for an encoder call. This function - * terminates and return byte stream. - * - * Input: - * - streamData : in-/output struct containing bitstream - * - * Return value : number of bytes in the stream - */ -int16_t WebRtcIsacfix_EncTerminate(Bitstr_enc *streamData); - - -/**************************************************************************** - * WebRtcIsacfix_DecLogisticMulti2(...) - * - * Arithmetic decoding of spectrum. - * - * Input: - * - streamData : in-/output struct containing bitstream - * - envQ8 : side info vector defining the width of the pdf - * in Q8 - * - lenData : data vector length - * - * Input/Output: - * - dataQ7 : input: dither vector, output: data vector, in Q7 - * - * Return value : number of bytes in the stream so far - * <0 if error detected - */ -int WebRtcIsacfix_DecLogisticMulti2( - int16_t *data, - Bitstr_dec *streamData, - const int32_t *env, - const int16_t lenData); - - -/**************************************************************************** - * WebRtcIsacfix_EncHistMulti(...) - * - * Encode the histogram interval - * - * Input: - * - streamData : in-/output struct containing bitstream - * - data : data vector - * - cdf : array of cdf arrays - * - lenData : data vector length - * - * Return value : 0 if ok - * <0 if error detected - */ -int WebRtcIsacfix_EncHistMulti( - Bitstr_enc *streamData, - const int16_t *data, - const uint16_t **cdf, - const int16_t lenData); - - -/**************************************************************************** - * WebRtcIsacfix_DecHistBisectMulti(...) - * - * Function to decode more symbols from the arithmetic bytestream, using - * method of bisection. - * C df tables should be of size 2^k-1 (which corresponds to an - * alphabet size of 2^k-2) - * - * Input: - * - streamData : in-/output struct containing bitstream - * - cdf : array of cdf arrays - * - cdfSize : array of cdf table sizes+1 (power of two: 2^k) - * - lenData : data vector length - * - * Output: - * - data : data vector - * - * Return value : number of bytes in the stream - * <0 if error detected - */ -int16_t WebRtcIsacfix_DecHistBisectMulti( - int16_t *data, - Bitstr_dec *streamData, - const uint16_t **cdf, - const uint16_t *cdfSize, - const int16_t lenData); - - -/**************************************************************************** - * WebRtcIsacfix_DecHistOneStepMulti(...) - * - * Function to decode more symbols from the arithmetic bytestream, taking - * single step up or down at a time. - * cdf tables can be of arbitrary size, but large tables may take a lot of - * iterations. - * - * Input: - * - streamData : in-/output struct containing bitstream - * - cdf : array of cdf arrays - * - initIndex : vector of initial cdf table search entries - * - lenData : data vector length - * - * Output: - * - data : data vector - * - * Return value : number of bytes in original stream - * <0 if error detected - */ -int16_t WebRtcIsacfix_DecHistOneStepMulti( - int16_t *data, - Bitstr_dec *streamData, - const uint16_t **cdf, - const uint16_t *initIndex, - const int16_t lenData); - -#endif /* WEBRTC_MODULES_AUDIO_CODING_CODECS_ISAC_FIX_SOURCE_ARITH_ROUTINS_H_ */ diff --git a/WebRtc.NET/include/webrtc/modules/audio_coding/codecs/isac/fix/source/bandwidth_estimator.h b/WebRtc.NET/include/webrtc/modules/audio_coding/codecs/isac/fix/source/bandwidth_estimator.h deleted file mode 100644 index 101ef620..00000000 --- a/WebRtc.NET/include/webrtc/modules/audio_coding/codecs/isac/fix/source/bandwidth_estimator.h +++ /dev/null @@ -1,135 +0,0 @@ -/* - * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -/* - * bandwidth_estimator.h - * - * This header file contains the API for the Bandwidth Estimator - * designed for iSAC. - * - */ - -#ifndef WEBRTC_MODULES_AUDIO_CODING_CODECS_ISAC_FIX_SOURCE_BANDWIDTH_ESTIMATOR_H_ -#define WEBRTC_MODULES_AUDIO_CODING_CODECS_ISAC_FIX_SOURCE_BANDWIDTH_ESTIMATOR_H_ - -#include "structs.h" - - -/**************************************************************************** - * WebRtcIsacfix_InitBandwidthEstimator(...) - * - * This function initializes the struct for the bandwidth estimator - * - * Input/Output: - * - bwest_str : Struct containing bandwidth information. - * - * Return value : 0 - */ - -int32_t WebRtcIsacfix_InitBandwidthEstimator(BwEstimatorstr *bwest_str); - - -/**************************************************************************** - * WebRtcIsacfix_UpdateUplinkBwImpl(...) - * - * This function updates bottle neck rate received from other side in payload - * and calculates a new bottle neck to send to the other side. - * - * Input/Output: - * - bweStr : struct containing bandwidth information. - * - rtpNumber : value from RTP packet, from NetEq - * - frameSize : length of signal frame in ms, from iSAC decoder - * - sendTime : value in RTP header giving send time in samples - * - arrivalTime : value given by timeGetTime() time of arrival in - * samples of packet from NetEq - * - pksize : size of packet in bytes, from NetEq - * - Index : integer (range 0...23) indicating bottle neck & - * jitter as estimated by other side - * - * Return value : 0 if everything went fine, - * -1 otherwise - */ - -int32_t WebRtcIsacfix_UpdateUplinkBwImpl(BwEstimatorstr *bwest_str, - const uint16_t rtp_number, - const int16_t frameSize, - const uint32_t send_ts, - const uint32_t arr_ts, - const size_t pksize, - const uint16_t Index); - -/* Update receiving estimates. Used when we only receive BWE index, no iSAC data packet. */ -int16_t WebRtcIsacfix_UpdateUplinkBwRec(BwEstimatorstr *bwest_str, - const int16_t Index); - -/**************************************************************************** - * WebRtcIsacfix_GetDownlinkBwIndexImpl(...) - * - * This function calculates and returns the bandwidth/jitter estimation code - * (integer 0...23) to put in the sending iSAC payload. - * - * Input: - * - bweStr : BWE struct - * - * Return: - * bandwith and jitter index (0..23) - */ -uint16_t WebRtcIsacfix_GetDownlinkBwIndexImpl(BwEstimatorstr *bwest_str); - -/* Returns the bandwidth estimation (in bps) */ -uint16_t WebRtcIsacfix_GetDownlinkBandwidth(const BwEstimatorstr *bwest_str); - -/* Returns the bandwidth that iSAC should send with in bps */ -int16_t WebRtcIsacfix_GetUplinkBandwidth(const BwEstimatorstr *bwest_str); - -/* Returns the max delay (in ms) */ -int16_t WebRtcIsacfix_GetDownlinkMaxDelay(const BwEstimatorstr *bwest_str); - -/* Returns the max delay value from the other side in ms */ -int16_t WebRtcIsacfix_GetUplinkMaxDelay(const BwEstimatorstr *bwest_str); - -/* Fills in an IsacExternalBandwidthInfo struct. */ -void WebRtcIsacfixBw_GetBandwidthInfo(BwEstimatorstr* bwest_str, - IsacBandwidthInfo* bwinfo); - -/* Uses the values from an IsacExternalBandwidthInfo struct. */ -void WebRtcIsacfixBw_SetBandwidthInfo(BwEstimatorstr* bwest_str, - const IsacBandwidthInfo* bwinfo); - -/* - * update amount of data in bottle neck buffer and burst handling - * returns minimum payload size (bytes) - */ -uint16_t WebRtcIsacfix_GetMinBytes(RateModel *State, - int16_t StreamSize, /* bytes in bitstream */ - const int16_t FrameLen, /* ms per frame */ - const int16_t BottleNeck, /* bottle neck rate; excl headers (bps) */ - const int16_t DelayBuildUp); /* max delay from bottle neck buffering (ms) */ - -/* - * update long-term average bitrate and amount of data in buffer - */ -void WebRtcIsacfix_UpdateRateModel(RateModel *State, - int16_t StreamSize, /* bytes in bitstream */ - const int16_t FrameSamples, /* samples per frame */ - const int16_t BottleNeck); /* bottle neck rate; excl headers (bps) */ - - -void WebRtcIsacfix_InitRateModel(RateModel *State); - -/* Returns the new framelength value (input argument: bottle_neck) */ -int16_t WebRtcIsacfix_GetNewFrameLength(int16_t bottle_neck, int16_t current_framelength); - -/* Returns the new SNR value (input argument: bottle_neck) */ -//returns snr in Q10 -int16_t WebRtcIsacfix_GetSnr(int16_t bottle_neck, int16_t framesamples); - - -#endif /* WEBRTC_MODULES_AUDIO_CODING_CODECS_ISAC_FIX_SOURCE_BANDWIDTH_ESTIMATOR_H_ */ diff --git a/WebRtc.NET/include/webrtc/modules/audio_coding/codecs/isac/fix/source/codec.h b/WebRtc.NET/include/webrtc/modules/audio_coding/codecs/isac/fix/source/codec.h deleted file mode 100644 index 001a04f3..00000000 --- a/WebRtc.NET/include/webrtc/modules/audio_coding/codecs/isac/fix/source/codec.h +++ /dev/null @@ -1,228 +0,0 @@ -/* - * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -/* - * codec.h - * - * This header file contains the calls to the internal encoder - * and decoder functions. - * - */ - -#ifndef WEBRTC_MODULES_AUDIO_CODING_CODECS_ISAC_FIX_SOURCE_CODEC_H_ -#define WEBRTC_MODULES_AUDIO_CODING_CODECS_ISAC_FIX_SOURCE_CODEC_H_ - -#include "structs.h" - -#ifdef __cplusplus -extern "C" { -#endif - -int WebRtcIsacfix_EstimateBandwidth(BwEstimatorstr* bwest_str, - Bitstr_dec* streamdata, - size_t packet_size, - uint16_t rtp_seq_number, - uint32_t send_ts, - uint32_t arr_ts); - -int WebRtcIsacfix_DecodeImpl(int16_t* signal_out16, - IsacFixDecoderInstance* ISACdec_obj, - size_t* current_framesamples); - -void WebRtcIsacfix_DecodePlcImpl(int16_t* decoded, - IsacFixDecoderInstance* ISACdec_obj, - size_t* current_framesample ); - -int WebRtcIsacfix_EncodeImpl(int16_t* in, - IsacFixEncoderInstance* ISACenc_obj, - BwEstimatorstr* bw_estimatordata, - int16_t CodingMode); - -int WebRtcIsacfix_EncodeStoredData(IsacFixEncoderInstance* ISACenc_obj, - int BWnumber, - float scale); - -/* initialization functions */ - -void WebRtcIsacfix_InitMaskingEnc(MaskFiltstr_enc* maskdata); -void WebRtcIsacfix_InitMaskingDec(MaskFiltstr_dec* maskdata); - -void WebRtcIsacfix_InitPreFilterbank(PreFiltBankstr* prefiltdata); - -void WebRtcIsacfix_InitPostFilterbank(PostFiltBankstr* postfiltdata); - -void WebRtcIsacfix_InitPitchFilter(PitchFiltstr* pitchfiltdata); - -void WebRtcIsacfix_InitPitchAnalysis(PitchAnalysisStruct* State); - -void WebRtcIsacfix_InitPlc(PLCstr* State); - - -/* transform functions */ - -void WebRtcIsacfix_InitTransform(); - -typedef void (*Time2Spec)(int16_t* inre1Q9, - int16_t* inre2Q9, - int16_t* outre, - int16_t* outim); -typedef void (*Spec2Time)(int16_t* inreQ7, - int16_t* inimQ7, - int32_t* outre1Q16, - int32_t* outre2Q16); - -extern Time2Spec WebRtcIsacfix_Time2Spec; -extern Spec2Time WebRtcIsacfix_Spec2Time; - -void WebRtcIsacfix_Time2SpecC(int16_t* inre1Q9, - int16_t* inre2Q9, - int16_t* outre, - int16_t* outim); -void WebRtcIsacfix_Spec2TimeC(int16_t* inreQ7, - int16_t* inimQ7, - int32_t* outre1Q16, - int32_t* outre2Q16); - -#if defined(WEBRTC_HAS_NEON) -void WebRtcIsacfix_Time2SpecNeon(int16_t* inre1Q9, - int16_t* inre2Q9, - int16_t* outre, - int16_t* outim); -void WebRtcIsacfix_Spec2TimeNeon(int16_t* inreQ7, - int16_t* inimQ7, - int32_t* outre1Q16, - int32_t* outre2Q16); -#endif - -#if defined(MIPS32_LE) -void WebRtcIsacfix_Time2SpecMIPS(int16_t* inre1Q9, - int16_t* inre2Q9, - int16_t* outre, - int16_t* outim); -void WebRtcIsacfix_Spec2TimeMIPS(int16_t* inreQ7, - int16_t* inimQ7, - int32_t* outre1Q16, - int32_t* outre2Q16); -#endif - -/* filterbank functions */ - -void WebRtcIsacfix_SplitAndFilter1(int16_t* in, - int16_t* LP16, - int16_t* HP16, - PreFiltBankstr* prefiltdata); - -void WebRtcIsacfix_FilterAndCombine1(int16_t* tempin_ch1, - int16_t* tempin_ch2, - int16_t* out16, - PostFiltBankstr* postfiltdata); - -#ifdef WEBRTC_ISAC_FIX_NB_CALLS_ENABLED - -void WebRtcIsacfix_SplitAndFilter2(int16_t* in, - int16_t* LP16, - int16_t* HP16, - PreFiltBankstr* prefiltdata); - -void WebRtcIsacfix_FilterAndCombine2(int16_t* tempin_ch1, - int16_t* tempin_ch2, - int16_t* out16, - PostFiltBankstr* postfiltdata, - int16_t len); - -#endif - -/* normalized lattice filters */ - -void WebRtcIsacfix_NormLatticeFilterMa(size_t orderCoef, - int32_t* stateGQ15, - int16_t* lat_inQ0, - int16_t* filt_coefQ15, - int32_t* gain_lo_hiQ17, - int16_t lo_hi, - int16_t* lat_outQ9); - -void WebRtcIsacfix_NormLatticeFilterAr(size_t orderCoef, - int16_t* stateGQ0, - int32_t* lat_inQ25, - int16_t* filt_coefQ15, - int32_t* gain_lo_hiQ17, - int16_t lo_hi, - int16_t* lat_outQ0); - -/* TODO(kma): Remove the following functions into individual header files. */ - -/* Internal functions in both C and ARM Neon versions */ - -int WebRtcIsacfix_AutocorrC(int32_t* __restrict r, - const int16_t* __restrict x, - int16_t N, - int16_t order, - int16_t* __restrict scale); - -void WebRtcIsacfix_FilterMaLoopC(int16_t input0, - int16_t input1, - int32_t input2, - int32_t* ptr0, - int32_t* ptr1, - int32_t* ptr2); - -#if defined(WEBRTC_HAS_NEON) -int WebRtcIsacfix_AutocorrNeon(int32_t* __restrict r, - const int16_t* __restrict x, - int16_t N, - int16_t order, - int16_t* __restrict scale); - -void WebRtcIsacfix_FilterMaLoopNeon(int16_t input0, - int16_t input1, - int32_t input2, - int32_t* ptr0, - int32_t* ptr1, - int32_t* ptr2); -#endif - -#if defined(MIPS32_LE) -int WebRtcIsacfix_AutocorrMIPS(int32_t* __restrict r, - const int16_t* __restrict x, - int16_t N, - int16_t order, - int16_t* __restrict scale); - -void WebRtcIsacfix_FilterMaLoopMIPS(int16_t input0, - int16_t input1, - int32_t input2, - int32_t* ptr0, - int32_t* ptr1, - int32_t* ptr2); -#endif - -/* Function pointers associated with the above functions. */ - -typedef int (*AutocorrFix)(int32_t* __restrict r, - const int16_t* __restrict x, - int16_t N, - int16_t order, - int16_t* __restrict scale); -extern AutocorrFix WebRtcIsacfix_AutocorrFix; - -typedef void (*FilterMaLoopFix)(int16_t input0, - int16_t input1, - int32_t input2, - int32_t* ptr0, - int32_t* ptr1, - int32_t* ptr2); -extern FilterMaLoopFix WebRtcIsacfix_FilterMaLoopFix; - -#ifdef __cplusplus -} // extern "C" -#endif - -#endif /* WEBRTC_MODULES_AUDIO_CODING_CODECS_ISAC_FIX_SOURCE_CODEC_H_ */ diff --git a/WebRtc.NET/include/webrtc/modules/audio_coding/codecs/isac/fix/source/entropy_coding.h b/WebRtc.NET/include/webrtc/modules/audio_coding/codecs/isac/fix/source/entropy_coding.h deleted file mode 100644 index 1b87d0ea..00000000 --- a/WebRtc.NET/include/webrtc/modules/audio_coding/codecs/isac/fix/source/entropy_coding.h +++ /dev/null @@ -1,189 +0,0 @@ -/* - * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -/* - * entropy_coding.h - * - * This header file contains all of the functions used to arithmetically - * encode the iSAC bistream - * - */ - -#ifndef WEBRTC_MODULES_AUDIO_CODING_CODECS_ISAC_FIX_SOURCE_ENTROPY_CODING_H_ -#define WEBRTC_MODULES_AUDIO_CODING_CODECS_ISAC_FIX_SOURCE_ENTROPY_CODING_H_ - -#include "structs.h" - -/* decode complex spectrum (return number of bytes in stream) */ -int WebRtcIsacfix_DecodeSpec(Bitstr_dec *streamdata, - int16_t *frQ7, - int16_t *fiQ7, - int16_t AvgPitchGain_Q12); - -/* encode complex spectrum */ -int WebRtcIsacfix_EncodeSpec(const int16_t *fr, - const int16_t *fi, - Bitstr_enc *streamdata, - int16_t AvgPitchGain_Q12); - - -/* decode & dequantize LPC Coef */ -int WebRtcIsacfix_DecodeLpcCoef(Bitstr_dec *streamdata, - int32_t *LPCCoefQ17, - int32_t *gain_lo_hiQ17, - int16_t *outmodel); - -int WebRtcIsacfix_DecodeLpc(int32_t *gain_lo_hiQ17, - int16_t *LPCCoef_loQ15, - int16_t *LPCCoef_hiQ15, - Bitstr_dec *streamdata, - int16_t *outmodel); - -/* quantize & code LPC Coef */ -int WebRtcIsacfix_EncodeLpc(int32_t *gain_lo_hiQ17, - int16_t *LPCCoef_loQ15, - int16_t *LPCCoef_hiQ15, - int16_t *model, - int32_t *sizeQ11, - Bitstr_enc *streamdata, - IsacSaveEncoderData* encData, - transcode_obj *transcodeParam); - -int WebRtcIsacfix_EstCodeLpcGain(int32_t *gain_lo_hiQ17, - Bitstr_enc *streamdata, - IsacSaveEncoderData* encData); -/* decode & dequantize RC */ -int WebRtcIsacfix_DecodeRcCoef(Bitstr_dec *streamdata, - int16_t *RCQ15); - -/* quantize & code RC */ -int WebRtcIsacfix_EncodeRcCoef(int16_t *RCQ15, - Bitstr_enc *streamdata); - -/* decode & dequantize squared Gain */ -int WebRtcIsacfix_DecodeGain2(Bitstr_dec *streamdata, - int32_t *Gain2); - -/* quantize & code squared Gain (input is squared gain) */ -int WebRtcIsacfix_EncodeGain2(int32_t *gain2, - Bitstr_enc *streamdata); - -int WebRtcIsacfix_EncodePitchGain(int16_t *PitchGains_Q12, - Bitstr_enc *streamdata, - IsacSaveEncoderData* encData); - -int WebRtcIsacfix_EncodePitchLag(int16_t *PitchLagQ7, - int16_t *PitchGain_Q12, - Bitstr_enc *streamdata, - IsacSaveEncoderData* encData); - -int WebRtcIsacfix_DecodePitchGain(Bitstr_dec *streamdata, - int16_t *PitchGain_Q12); - -int WebRtcIsacfix_DecodePitchLag(Bitstr_dec *streamdata, - int16_t *PitchGain_Q12, - int16_t *PitchLagQ7); - -int WebRtcIsacfix_DecodeFrameLen(Bitstr_dec *streamdata, - size_t *framelength); - - -int WebRtcIsacfix_EncodeFrameLen(int16_t framelength, - Bitstr_enc *streamdata); - -int WebRtcIsacfix_DecodeSendBandwidth(Bitstr_dec *streamdata, - int16_t *BWno); - - -int WebRtcIsacfix_EncodeReceiveBandwidth(int16_t *BWno, - Bitstr_enc *streamdata); - -void WebRtcIsacfix_TranscodeLpcCoef(int32_t *tmpcoeffs_gQ6, - int16_t *index_gQQ); - -// Pointer functions for LPC transforms. - -typedef void (*MatrixProduct1)(const int16_t matrix0[], - const int32_t matrix1[], - int32_t matrix_product[], - const int matrix1_index_factor1, - const int matrix0_index_factor1, - const int matrix1_index_init_case, - const int matrix1_index_step, - const int matrix0_index_step, - const int inner_loop_count, - const int mid_loop_count, - const int shift); -typedef void (*MatrixProduct2)(const int16_t matrix0[], - const int32_t matrix1[], - int32_t matrix_product[], - const int matrix0_index_factor, - const int matrix0_index_step); - -extern MatrixProduct1 WebRtcIsacfix_MatrixProduct1; -extern MatrixProduct2 WebRtcIsacfix_MatrixProduct2; - -void WebRtcIsacfix_MatrixProduct1C(const int16_t matrix0[], - const int32_t matrix1[], - int32_t matrix_product[], - const int matrix1_index_factor1, - const int matrix0_index_factor1, - const int matrix1_index_init_case, - const int matrix1_index_step, - const int matrix0_index_step, - const int inner_loop_count, - const int mid_loop_count, - const int shift); -void WebRtcIsacfix_MatrixProduct2C(const int16_t matrix0[], - const int32_t matrix1[], - int32_t matrix_product[], - const int matrix0_index_factor, - const int matrix0_index_step); - -#if defined(WEBRTC_HAS_NEON) -void WebRtcIsacfix_MatrixProduct1Neon(const int16_t matrix0[], - const int32_t matrix1[], - int32_t matrix_product[], - const int matrix1_index_factor1, - const int matrix0_index_factor1, - const int matrix1_index_init_case, - const int matrix1_index_step, - const int matrix0_index_step, - const int inner_loop_count, - const int mid_loop_count, - const int shift); -void WebRtcIsacfix_MatrixProduct2Neon(const int16_t matrix0[], - const int32_t matrix1[], - int32_t matrix_product[], - const int matrix0_index_factor, - const int matrix0_index_step); -#endif - -#if defined(MIPS32_LE) -void WebRtcIsacfix_MatrixProduct1MIPS(const int16_t matrix0[], - const int32_t matrix1[], - int32_t matrix_product[], - const int matrix1_index_factor1, - const int matrix0_index_factor1, - const int matrix1_index_init_case, - const int matrix1_index_step, - const int matrix0_index_step, - const int inner_loop_count, - const int mid_loop_count, - const int shift); - -void WebRtcIsacfix_MatrixProduct2MIPS(const int16_t matrix0[], - const int32_t matrix1[], - int32_t matrix_product[], - const int matrix0_index_factor, - const int matrix0_index_step); -#endif - -#endif // WEBRTC_MODULES_AUDIO_CODING_CODECS_ISAC_FIX_SOURCE_ENTROPY_CODING_H_ diff --git a/WebRtc.NET/include/webrtc/modules/audio_coding/codecs/isac/fix/source/fft.h b/WebRtc.NET/include/webrtc/modules/audio_coding/codecs/isac/fix/source/fft.h deleted file mode 100644 index dc7cea81..00000000 --- a/WebRtc.NET/include/webrtc/modules/audio_coding/codecs/isac/fix/source/fft.h +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -/*--------------------------------*-C-*---------------------------------* - * File: - * fft.h - * ---------------------------------------------------------------------* - * Re[]: real value array - * Im[]: imaginary value array - * nTotal: total number of complex values - * nPass: number of elements involved in this pass of transform - * nSpan: nspan/nPass = number of bytes to increment pointer - * in Re[] and Im[] - * isign: exponent: +1 = forward -1 = reverse - * scaling: normalizing constant by which the final result is *divided* - * scaling == -1, normalize by total dimension of the transform - * scaling < -1, normalize by the square-root of the total dimension - * - * ---------------------------------------------------------------------- - * See the comments in the code for correct usage! - */ - -#ifndef WEBRTC_MODULES_AUDIO_CODING_CODECS_ISAC_FIX_SOURCE_FFT_H_ -#define WEBRTC_MODULES_AUDIO_CODING_CODECS_ISAC_FIX_SOURCE_FFT_H_ - - -#include "structs.h" - - -int16_t WebRtcIsacfix_FftRadix16Fastest(int16_t RexQx[], int16_t ImxQx[], int16_t iSign); - - - -#endif /* WEBRTC_MODULES_AUDIO_CODING_CODECS_ISAC_FIX_SOURCE_FFT_H_ */ diff --git a/WebRtc.NET/include/webrtc/modules/audio_coding/codecs/isac/fix/source/filterbank_internal.h b/WebRtc.NET/include/webrtc/modules/audio_coding/codecs/isac/fix/source/filterbank_internal.h deleted file mode 100644 index d488339b..00000000 --- a/WebRtc.NET/include/webrtc/modules/audio_coding/codecs/isac/fix/source/filterbank_internal.h +++ /dev/null @@ -1,90 +0,0 @@ -/* - * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MODULES_AUDIO_CODING_CODECS_ISAC_FIX_SOURCE_FILTERBANK_INTERNAL_H_ -#define WEBRTC_MODULES_AUDIO_CODING_CODECS_ISAC_FIX_SOURCE_FILTERBANK_INTERNAL_H_ - -#include "webrtc/typedefs.h" - -#if defined(__cplusplus) || defined(c_plusplus) -extern "C" { -#endif - -/* Arguments: - * io: Input/output, in Q0. - * len: Input, sample length. - * coefficient: Input. - * state: Input/output, filter state, in Q4. - */ -typedef void (*HighpassFilterFixDec32)(int16_t* io, - int16_t len, - const int16_t* coefficient, - int32_t* state); -extern HighpassFilterFixDec32 WebRtcIsacfix_HighpassFilterFixDec32; - -void WebRtcIsacfix_HighpassFilterFixDec32C(int16_t* io, - int16_t len, - const int16_t* coefficient, - int32_t* state); - -#if defined(MIPS_DSP_R1_LE) -void WebRtcIsacfix_HighpassFilterFixDec32MIPS(int16_t* io, - int16_t len, - const int16_t* coefficient, - int32_t* state); -#endif - -typedef void (*AllpassFilter2FixDec16)( - int16_t *data_ch1, // Input and output in channel 1, in Q0 - int16_t *data_ch2, // Input and output in channel 2, in Q0 - const int16_t *factor_ch1, // Scaling factor for channel 1, in Q15 - const int16_t *factor_ch2, // Scaling factor for channel 2, in Q15 - const int length, // Length of the data buffers - int32_t *filter_state_ch1, // Filter state for channel 1, in Q16 - int32_t *filter_state_ch2); // Filter state for channel 2, in Q16 -extern AllpassFilter2FixDec16 WebRtcIsacfix_AllpassFilter2FixDec16; - -void WebRtcIsacfix_AllpassFilter2FixDec16C( - int16_t *data_ch1, - int16_t *data_ch2, - const int16_t *factor_ch1, - const int16_t *factor_ch2, - const int length, - int32_t *filter_state_ch1, - int32_t *filter_state_ch2); - -#if defined(WEBRTC_HAS_NEON) -void WebRtcIsacfix_AllpassFilter2FixDec16Neon( - int16_t *data_ch1, - int16_t *data_ch2, - const int16_t *factor_ch1, - const int16_t *factor_ch2, - const int length, - int32_t *filter_state_ch1, - int32_t *filter_state_ch2); -#endif - -#if defined(MIPS_DSP_R1_LE) -void WebRtcIsacfix_AllpassFilter2FixDec16MIPS( - int16_t *data_ch1, - int16_t *data_ch2, - const int16_t *factor_ch1, - const int16_t *factor_ch2, - const int length, - int32_t *filter_state_ch1, - int32_t *filter_state_ch2); -#endif - -#if defined(__cplusplus) || defined(c_plusplus) -} -#endif - -#endif -/* WEBRTC_MODULES_AUDIO_CODING_CODECS_ISAC_FIX_SOURCE_FILTERBANK_INTERNAL_H_ */ diff --git a/WebRtc.NET/include/webrtc/modules/audio_coding/codecs/isac/fix/source/filterbank_tables.h b/WebRtc.NET/include/webrtc/modules/audio_coding/codecs/isac/fix/source/filterbank_tables.h deleted file mode 100644 index c96fb05b..00000000 --- a/WebRtc.NET/include/webrtc/modules/audio_coding/codecs/isac/fix/source/filterbank_tables.h +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -/* - * filterbank_tables.h - * - * Header file for variables that are defined in - * filterbank_tables.c. - * - */ - -#ifndef WEBRTC_MODULES_AUDIO_CODING_CODECS_ISAC_FIX_SOURCE_FILTERBANK_TABLES_H_ -#define WEBRTC_MODULES_AUDIO_CODING_CODECS_ISAC_FIX_SOURCE_FILTERBANK_TABLES_H_ - -#include "webrtc/typedefs.h" - -#if defined(__cplusplus) || defined(c_plusplus) -extern "C" { -#endif - -/********************* Coefficient Tables ************************/ - -/* HPstcoeff_in_Q14 = {a1, a2, b1 - b0 * a1, b2 - b0 * a2}; */ -/* [Q30lo Q30hi Q30lo Q30hi Q35lo Q35hi Q35lo Q35hi] */ -extern const int16_t WebRtcIsacfix_kHpStCoeffInQ30[8]; - -/* HPstcoeff_out_1_Q14 = {a1, a2, b1 - b0 * a1, b2 - b0 * a2}; */ -/* [Q30lo Q30hi Q30lo Q30hi Q35lo Q35hi Q35lo Q35hi] */ -extern const int16_t WebRtcIsacfix_kHPStCoeffOut1Q30[8]; - -/* HPstcoeff_out_2_Q14 = {a1, a2, b1 - b0 * a1, b2 - b0 * a2}; */ -/* [Q30lo Q30hi Q30lo Q30hi Q35lo Q35hi Q35lo Q35hi] */ -extern const int16_t WebRtcIsacfix_kHPStCoeffOut2Q30[8]; - -/* The upper channel all-pass filter factors */ -extern const int16_t WebRtcIsacfix_kUpperApFactorsQ15[2]; - -/* The lower channel all-pass filter factors */ -extern const int16_t WebRtcIsacfix_kLowerApFactorsQ15[2]; - -#if defined(__cplusplus) || defined(c_plusplus) -} -#endif - -#endif /* WEBRTC_MODULES_AUDIO_CODING_CODECS_ISAC_FIX_SOURCE_FILTERBANK_TABLES_H_ */ diff --git a/WebRtc.NET/include/webrtc/modules/audio_coding/codecs/isac/fix/source/lpc_masking_model.h b/WebRtc.NET/include/webrtc/modules/audio_coding/codecs/isac/fix/source/lpc_masking_model.h deleted file mode 100644 index aac92758..00000000 --- a/WebRtc.NET/include/webrtc/modules/audio_coding/codecs/isac/fix/source/lpc_masking_model.h +++ /dev/null @@ -1,69 +0,0 @@ -/* - * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -/* - * lpc_masking_model.h - * - * LPC functions - * - */ - -#ifndef WEBRTC_MODULES_AUDIO_CODING_CODECS_ISAC_FIX_SOURCE_LPC_MASKING_MODEL_H_ -#define WEBRTC_MODULES_AUDIO_CODING_CODECS_ISAC_FIX_SOURCE_LPC_MASKING_MODEL_H_ - -#ifdef __cplusplus -extern "C" { -#endif - -#include "structs.h" - -void WebRtcIsacfix_GetVars(const int16_t *input, - const int16_t *pitchGains_Q12, - uint32_t *oldEnergy, - int16_t *varscale); - -void WebRtcIsacfix_GetLpcCoef(int16_t *inLoQ0, - int16_t *inHiQ0, - MaskFiltstr_enc *maskdata, - int16_t snrQ10, - const int16_t *pitchGains_Q12, - int32_t *gain_lo_hiQ17, - int16_t *lo_coeffQ15, - int16_t *hi_coeffQ15); - -typedef int32_t (*CalculateResidualEnergy)(int lpc_order, - int32_t q_val_corr, - int q_val_polynomial, - int16_t* a_polynomial, - int32_t* corr_coeffs, - int* q_val_residual_energy); -extern CalculateResidualEnergy WebRtcIsacfix_CalculateResidualEnergy; - -int32_t WebRtcIsacfix_CalculateResidualEnergyC(int lpc_order, - int32_t q_val_corr, - int q_val_polynomial, - int16_t* a_polynomial, - int32_t* corr_coeffs, - int* q_val_residual_energy); - -#if defined(MIPS_DSP_R2_LE) -int32_t WebRtcIsacfix_CalculateResidualEnergyMIPS(int lpc_order, - int32_t q_val_corr, - int q_val_polynomial, - int16_t* a_polynomial, - int32_t* corr_coeffs, - int* q_val_residual_energy); -#endif - -#ifdef __cplusplus -} /* extern "C" */ -#endif - -#endif /* WEBRTC_MODULES_AUDIO_CODING_CODECS_ISAC_FIX_SOURCE_LPC_MASKING_MODEL_H_ */ diff --git a/WebRtc.NET/include/webrtc/modules/audio_coding/codecs/isac/fix/source/lpc_tables.h b/WebRtc.NET/include/webrtc/modules/audio_coding/codecs/isac/fix/source/lpc_tables.h deleted file mode 100644 index 7e8121e8..00000000 --- a/WebRtc.NET/include/webrtc/modules/audio_coding/codecs/isac/fix/source/lpc_tables.h +++ /dev/null @@ -1,97 +0,0 @@ -/* - * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -/* - * lpc_tables.h - * - * header file for coding tables for the LPC coefficients - * - */ - -#ifndef WEBRTC_MODULES_AUDIO_CODING_CODECS_ISAC_FIX_SOURCE_LPC_TABLES_H_ -#define WEBRTC_MODULES_AUDIO_CODING_CODECS_ISAC_FIX_SOURCE_LPC_TABLES_H_ - -#include "webrtc/typedefs.h" - -/* indices of KLT coefficients used */ -extern const uint16_t WebRtcIsacfix_kSelIndGain[12]; - -extern const uint16_t WebRtcIsacfix_kSelIndShape[108]; - -/* cdf array for model indicator */ -extern const uint16_t WebRtcIsacfix_kModelCdf[KLT_NUM_MODELS+1]; - -/* pointer to cdf array for model indicator */ -extern const uint16_t *WebRtcIsacfix_kModelCdfPtr[1]; - -/* initial cdf index for decoder of model indicator */ -extern const uint16_t WebRtcIsacfix_kModelInitIndex[1]; - -/* offset to go from rounded value to quantization index */ -extern const int16_t WebRtcIsacfix_kQuantMinGain[12]; - -extern const int16_t WebRtcIsacfix_kQuantMinShape[108]; - -/* maximum quantization index */ -extern const uint16_t WebRtcIsacfix_kMaxIndGain[12]; - -extern const uint16_t WebRtcIsacfix_kMaxIndShape[108]; - -/* index offset */ -extern const uint16_t WebRtcIsacfix_kOffsetGain[KLT_NUM_MODELS][12]; - -extern const uint16_t WebRtcIsacfix_kOffsetShape[KLT_NUM_MODELS][108]; - -/* initial cdf index for KLT coefficients */ -extern const uint16_t WebRtcIsacfix_kInitIndexGain[KLT_NUM_MODELS][12]; - -extern const uint16_t WebRtcIsacfix_kInitIndexShape[KLT_NUM_MODELS][108]; - -/* offsets for quantizer representation levels */ -extern const uint16_t WebRtcIsacfix_kOfLevelsGain[3]; - -extern const uint16_t WebRtcIsacfix_kOfLevelsShape[3]; - -/* quantizer representation levels */ -extern const int32_t WebRtcIsacfix_kLevelsGainQ17[1176]; - -extern const int16_t WebRtcIsacfix_kLevelsShapeQ10[1735]; - -/* cdf tables for quantizer indices */ -extern const uint16_t WebRtcIsacfix_kCdfGain[1212]; - -extern const uint16_t WebRtcIsacfix_kCdfShape[2059]; - -/* pointers to cdf tables for quantizer indices */ -extern const uint16_t *WebRtcIsacfix_kCdfGainPtr[KLT_NUM_MODELS][12]; - -extern const uint16_t *WebRtcIsacfix_kCdfShapePtr[KLT_NUM_MODELS][108]; - -/* code length for all coefficients using different models */ -extern const int16_t WebRtcIsacfix_kCodeLenGainQ11[392]; - -extern const int16_t WebRtcIsacfix_kCodeLenShapeQ11[577]; - -/* left KLT transforms */ -extern const int16_t WebRtcIsacfix_kT1GainQ15[KLT_NUM_MODELS][4]; - -extern const int16_t WebRtcIsacfix_kT1ShapeQ15[KLT_NUM_MODELS][324]; - -/* right KLT transforms */ -extern const int16_t WebRtcIsacfix_kT2GainQ15[KLT_NUM_MODELS][36]; - -extern const int16_t WebRtcIsacfix_kT2ShapeQ15[KLT_NUM_MODELS][36]; - -/* means of log gains and LAR coefficients */ -extern const int16_t WebRtcIsacfix_kMeansGainQ8[KLT_NUM_MODELS][12]; - -extern const int32_t WebRtcIsacfix_kMeansShapeQ17[3][108]; - -#endif /* WEBRTC_MODULES_AUDIO_CODING_CODECS_ISAC_FIX_SOURCE_LPC_TABLES_H_ */ diff --git a/WebRtc.NET/include/webrtc/modules/audio_coding/codecs/isac/fix/source/pitch_estimator.h b/WebRtc.NET/include/webrtc/modules/audio_coding/codecs/isac/fix/source/pitch_estimator.h deleted file mode 100644 index 40f15c43..00000000 --- a/WebRtc.NET/include/webrtc/modules/audio_coding/codecs/isac/fix/source/pitch_estimator.h +++ /dev/null @@ -1,65 +0,0 @@ -/* - * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -/* - * pitch_estimator.h - * - * Pitch functions - * - */ - -#ifndef WEBRTC_MODULES_AUDIO_CODING_CODECS_ISAC_FIX_SOURCE_PITCH_ESTIMATOR_H_ -#define WEBRTC_MODULES_AUDIO_CODING_CODECS_ISAC_FIX_SOURCE_PITCH_ESTIMATOR_H_ - -#include "structs.h" - -void WebRtcIsacfix_PitchAnalysis(const int16_t *in, /* PITCH_FRAME_LEN samples */ - int16_t *outQ0, /* PITCH_FRAME_LEN+QLOOKAHEAD samples */ - PitchAnalysisStruct *State, - int16_t *lagsQ7, - int16_t *PitchGains_Q12); - -void WebRtcIsacfix_InitialPitch(const int16_t *in, - PitchAnalysisStruct *State, - int16_t *qlags); - -void WebRtcIsacfix_PitchFilter(int16_t *indatFix, - int16_t *outdatQQ, - PitchFiltstr *pfp, - int16_t *lagsQ7, - int16_t *gainsQ12, - int16_t type); - -void WebRtcIsacfix_PitchFilterCore(int loopNumber, - int16_t gain, - size_t index, - int16_t sign, - int16_t* inputState, - int16_t* outputBuff2, - const int16_t* coefficient, - int16_t* inputBuf, - int16_t* outputBuf, - int* index2); - -void WebRtcIsacfix_PitchFilterGains(const int16_t *indatQ0, - PitchFiltstr *pfp, - int16_t *lagsQ7, - int16_t *gainsQ12); - -void WebRtcIsacfix_DecimateAllpass32(const int16_t *in, - int32_t *state_in, /* array of size: 2*ALLPASSSECTIONS+1 */ - int16_t N, /* number of input samples */ - int16_t *out); /* array of size N/2 */ - -int32_t WebRtcIsacfix_Log2Q8( uint32_t x ); - -void WebRtcIsacfix_PCorr2Q32(const int16_t* in, int32_t* logcorQ8); - -#endif /* WEBRTC_MODULES_AUDIO_CODING_CODECS_ISAC_FIX_SOURCE_PITCH_ESTIMATOR_H_ */ diff --git a/WebRtc.NET/include/webrtc/modules/audio_coding/codecs/isac/fix/source/pitch_gain_tables.h b/WebRtc.NET/include/webrtc/modules/audio_coding/codecs/isac/fix/source/pitch_gain_tables.h deleted file mode 100644 index 4aab2b6c..00000000 --- a/WebRtc.NET/include/webrtc/modules/audio_coding/codecs/isac/fix/source/pitch_gain_tables.h +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -/* - * pitch_gain_tables.h - * - * This file contains tables for the pitch filter side-info in the entropy coder. - * - */ - -#ifndef WEBRTC_MODULES_AUDIO_CODING_CODECS_ISAC_FIX_SOURCE_PITCH_GAIN_TABLES_H_ -#define WEBRTC_MODULES_AUDIO_CODING_CODECS_ISAC_FIX_SOURCE_PITCH_GAIN_TABLES_H_ - -#include "webrtc/typedefs.h" - -/********************* Pitch Filter Gain Coefficient Tables ************************/ -/* cdf for quantized pitch filter gains */ -extern const uint16_t WebRtcIsacfix_kPitchGainCdf[255]; - -/* index limits and ranges */ -extern const int16_t WebRtcIsacfix_kLowerlimiGain[3]; -extern const int16_t WebRtcIsacfix_kUpperlimitGain[3]; -extern const uint16_t WebRtcIsacfix_kMultsGain[2]; - -/* mean values of pitch filter gains in Q12*/ -extern const int16_t WebRtcIsacfix_kPitchGain1[144]; -extern const int16_t WebRtcIsacfix_kPitchGain2[144]; -extern const int16_t WebRtcIsacfix_kPitchGain3[144]; -extern const int16_t WebRtcIsacfix_kPitchGain4[144]; - -/* size of cdf table */ -extern const uint16_t WebRtcIsacfix_kCdfTableSizeGain[1]; - -/* transform matrix */ -extern const int16_t WebRtcIsacfix_kTransform[4][4]; - -#endif /* WEBRTC_MODULES_AUDIO_CODING_CODECS_ISAC_FIX_SOURCE_PITCH_GAIN_TABLES_H_ */ diff --git a/WebRtc.NET/include/webrtc/modules/audio_coding/codecs/isac/fix/source/pitch_lag_tables.h b/WebRtc.NET/include/webrtc/modules/audio_coding/codecs/isac/fix/source/pitch_lag_tables.h deleted file mode 100644 index a5478b2e..00000000 --- a/WebRtc.NET/include/webrtc/modules/audio_coding/codecs/isac/fix/source/pitch_lag_tables.h +++ /dev/null @@ -1,101 +0,0 @@ -/* - * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -/* - * pitch_lag_tables.h - * - * This file contains tables for the pitch filter side-info in the entropy coder. - * - */ - -#ifndef WEBRTC_MODULES_AUDIO_CODING_CODECS_ISAC_FIX_SOURCE_PITCH_LAG_TABLES_H_ -#define WEBRTC_MODULES_AUDIO_CODING_CODECS_ISAC_FIX_SOURCE_PITCH_LAG_TABLES_H_ - -#include "webrtc/typedefs.h" - -/********************* Pitch Filter Lag Coefficient Tables ************************/ - -/* tables for use with small pitch gain */ - -/* cdfs for quantized pitch lags */ -extern const uint16_t WebRtcIsacfix_kPitchLagCdf1Lo[127]; -extern const uint16_t WebRtcIsacfix_kPitchLagCdf2Lo[20]; -extern const uint16_t WebRtcIsacfix_kPitchLagCdf3Lo[2]; -extern const uint16_t WebRtcIsacfix_kPitchLagCdf4Lo[10]; - -extern const uint16_t *WebRtcIsacfix_kPitchLagPtrLo[4]; - -/* size of first cdf table */ -extern const uint16_t WebRtcIsacfix_kPitchLagSizeLo[1]; - -/* index limits and ranges */ -extern const int16_t WebRtcIsacfix_kLowerLimitLo[4]; -extern const int16_t WebRtcIsacfix_kUpperLimitLo[4]; - -/* initial index for arithmetic decoder */ -extern const uint16_t WebRtcIsacfix_kInitIndLo[3]; - -/* mean values of pitch filter lags */ -extern const int16_t WebRtcIsacfix_kMeanLag2Lo[19]; -extern const int16_t WebRtcIsacfix_kMeanLag4Lo[9]; - - - -/* tables for use with medium pitch gain */ - -/* cdfs for quantized pitch lags */ -extern const uint16_t WebRtcIsacfix_kPitchLagCdf1Mid[255]; -extern const uint16_t WebRtcIsacfix_kPitchLagCdf2Mid[36]; -extern const uint16_t WebRtcIsacfix_kPitchLagCdf3Mid[2]; -extern const uint16_t WebRtcIsacfix_kPitchLagCdf4Mid[20]; - -extern const uint16_t *WebRtcIsacfix_kPitchLagPtrMid[4]; - -/* size of first cdf table */ -extern const uint16_t WebRtcIsacfix_kPitchLagSizeMid[1]; - -/* index limits and ranges */ -extern const int16_t WebRtcIsacfix_kLowerLimitMid[4]; -extern const int16_t WebRtcIsacfix_kUpperLimitMid[4]; - -/* initial index for arithmetic decoder */ -extern const uint16_t WebRtcIsacfix_kInitIndMid[3]; - -/* mean values of pitch filter lags */ -extern const int16_t WebRtcIsacfix_kMeanLag2Mid[35]; -extern const int16_t WebRtcIsacfix_kMeanLag4Mid[19]; - - -/* tables for use with large pitch gain */ - -/* cdfs for quantized pitch lags */ -extern const uint16_t WebRtcIsacfix_kPitchLagCdf1Hi[511]; -extern const uint16_t WebRtcIsacfix_kPitchLagCdf2Hi[68]; -extern const uint16_t WebRtcIsacfix_kPitchLagCdf3Hi[2]; -extern const uint16_t WebRtcIsacfix_kPitchLagCdf4Hi[35]; - -extern const uint16_t *WebRtcIsacfix_kPitchLagPtrHi[4]; - -/* size of first cdf table */ -extern const uint16_t WebRtcIsacfix_kPitchLagSizeHi[1]; - -/* index limits and ranges */ -extern const int16_t WebRtcIsacfix_kLowerLimitHi[4]; -extern const int16_t WebRtcIsacfix_kUpperLimitHi[4]; - -/* initial index for arithmetic decoder */ -extern const uint16_t WebRtcIsacfix_kInitIndHi[3]; - -/* mean values of pitch filter lags */ -extern const int16_t WebRtcIsacfix_kMeanLag2Hi[67]; -extern const int16_t WebRtcIsacfix_kMeanLag4Hi[34]; - - -#endif /* WEBRTC_MODULES_AUDIO_CODING_CODECS_ISAC_FIX_SOURCE_PITCH_LAG_TABLES_H_ */ diff --git a/WebRtc.NET/include/webrtc/modules/audio_coding/codecs/isac/fix/source/settings.h b/WebRtc.NET/include/webrtc/modules/audio_coding/codecs/isac/fix/source/settings.h deleted file mode 100644 index 82eb51a2..00000000 --- a/WebRtc.NET/include/webrtc/modules/audio_coding/codecs/isac/fix/source/settings.h +++ /dev/null @@ -1,215 +0,0 @@ -/* - * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -/* - * settings.h - * - * Declaration of #defines used in the iSAC codec - * - */ - -#ifndef WEBRTC_MODULES_AUDIO_CODING_CODECS_ISAC_FIX_SOURCE_SETTINGS_H_ -#define WEBRTC_MODULES_AUDIO_CODING_CODECS_ISAC_FIX_SOURCE_SETTINGS_H_ - - -/* sampling frequency (Hz) */ -#define FS 16000 -/* 1.5 times Sampling frequency */ -#define FS_1_HALF (uint32_t) 24000 -/* Three times Sampling frequency */ -#define FS3 (uint32_t) 48000 -/* Eight times Sampling frequency */ -#define FS8 (uint32_t) 128000 - -/* number of samples per frame (either 480 (30ms) or 960 (60ms)) */ -#define INITIAL_FRAMESAMPLES 960 - -/* miliseconds */ -#define FRAMESIZE 30 -/* number of samples per frame processed in the encoder (30ms) */ -#define FRAMESAMPLES 480 /* ((FRAMESIZE*FS)/1000) */ -#define FRAMESAMPLES_HALF 240 -/* max number of samples per frame (= 60 ms frame) */ -#define MAX_FRAMESAMPLES 960 -/* number of samples per 10ms frame */ -#define FRAMESAMPLES_10ms 160 /* ((10*FS)/1000) */ -/* Number of samples per 1 ms */ -#define SAMPLES_PER_MSEC 16 -/* number of subframes */ -#define SUBFRAMES 6 -/* length of a subframe */ -#define UPDATE 80 -/* length of half a subframe (low/high band) */ -#define HALF_SUBFRAMELEN 40 /* (UPDATE/2) */ -/* samples of look ahead (in a half-band, so actually half the samples of look ahead @ FS) */ -#define QLOOKAHEAD 24 /* 3 ms */ - -/* order of AR model in spectral entropy coder */ -#define AR_ORDER 6 -#define MAX_ORDER 13 -#define LEVINSON_MAX_ORDER 12 - -/* window length (masking analysis) */ -#define WINLEN 256 -/* order of low-band pole filter used to approximate masking curve */ -#define ORDERLO 12 -/* order of hi-band pole filter used to approximate masking curve */ -#define ORDERHI 6 - -#define KLT_NUM_AVG_GAIN 0 -#define KLT_NUM_AVG_SHAPE 0 -#define KLT_NUM_MODELS 3 -#define LPC_SHAPE_ORDER 18 /* (ORDERLO + ORDERHI) */ - -#define KLT_ORDER_GAIN 12 /* (2 * SUBFRAMES) */ -#define KLT_ORDER_SHAPE 108 /* (LPC_SHAPE_ORDER * SUBFRAMES) */ - - - -/* order for post_filter_bank */ -#define POSTQORDER 3 -/* order for pre-filterbank */ -#define QORDER 3 -/* for decimator */ -#define ALLPASSSECTIONS 2 -/* The number of composite all-pass filter factors */ -#define NUMBEROFCOMPOSITEAPSECTIONS 4 - -/* The number of all-pass filter factors in an upper or lower channel*/ -#define NUMBEROFCHANNELAPSECTIONS 2 - - - -#define DPMIN_Q10 -10240 /* -10.00 in Q10 */ -#define DPMAX_Q10 10240 /* 10.00 in Q10 */ -#define MINBITS_Q10 10240 /* 10.0 in Q10 */ - - -/* array size for byte stream in number of Word16. */ -#define STREAM_MAXW16 300 /* The old maximum size still needed for the decoding */ -#define STREAM_MAXW16_30MS 100 /* 100 Word16 = 200 bytes = 53.4 kbit/s @ 30 ms.framelength */ -#define STREAM_MAXW16_60MS 200 /* 200 Word16 = 400 bytes = 53.4 kbit/s @ 60 ms.framelength */ -/* This is used only at the decoder bit-stream struct. - * - The encoder and decoder bitstream containers are of different size because - * old iSAC limited the encoded bitstream to 600 bytes. But newer versions - * restrict to shorter bitstream. - * - We add 10 bytes of guards to the internal bitstream container. The reason - * is that entropy decoder might read few bytes (3 according to our - * observations) more than the actual size of the bitstream. To avoid reading - * outside memory, in rare occasion of full-size bitstream we add 10 bytes - * of guard. */ -#define INTERNAL_STREAM_SIZE_W16 (STREAM_MAXW16 + 5) - -/* storage size for bit counts */ -//#define BIT_COUNTER_SIZE 30 -/* maximum order of any AR model or filter */ -#define MAX_AR_MODEL_ORDER 12 - -/* Maximum number of iterations allowed to limit payload size */ -#define MAX_PAYLOAD_LIMIT_ITERATION 1 - -/* Bandwidth estimator */ - -#define MIN_ISAC_BW 10000 /* Minimum bandwidth in bits per sec */ -#define MAX_ISAC_BW 32000 /* Maxmum bandwidth in bits per sec */ -#define MIN_ISAC_MD 5 /* Minimum Max Delay in ?? */ -#define MAX_ISAC_MD 25 /* Maxmum Max Delay in ?? */ -#define DELAY_CORRECTION_MAX 717 -#define DELAY_CORRECTION_MED 819 -#define Thld_30_60 18000 -#define Thld_60_30 27000 - -/* assumed header size; we don't know the exact number (header compression may be used) */ -#define HEADER_SIZE 35 /* bytes */ -#define INIT_FRAME_LEN 60 -#define INIT_BN_EST 20000 -#define INIT_BN_EST_Q7 2560000 /* 20 kbps in Q7 */ -#define INIT_REC_BN_EST_Q5 789312 /* INIT_BN_EST + INIT_HDR_RATE in Q5 */ - -/* 8738 in Q18 is ~ 1/30 */ -/* #define INIT_HDR_RATE (((HEADER_SIZE * 8 * 1000) * 8738) >> NUM_BITS_TO_SHIFT (INIT_FRAME_LEN)) */ -#define INIT_HDR_RATE 4666 -/* number of packets in a row for a high rate burst */ -#define BURST_LEN 3 -/* ms, max time between two full bursts */ -#define BURST_INTERVAL 800 -/* number of packets in a row for initial high rate burst */ -#define INIT_BURST_LEN 5 -/* bits/s, rate for the first BURST_LEN packets */ -#define INIT_RATE 10240000 /* INIT_BN_EST in Q9 */ - - -/* For pitch analysis */ -#define PITCH_FRAME_LEN 240 /* (FRAMESAMPLES/2) 30 ms */ -#define PITCH_MAX_LAG 140 /* 57 Hz */ -#define PITCH_MIN_LAG 20 /* 400 Hz */ -#define PITCH_MIN_LAG_Q8 5120 /* 256 * PITCH_MIN_LAG */ -#define OFFSET_Q8 768 /* 256 * 3 */ - -#define PITCH_MAX_GAIN_Q12 1843 /* 0.45 */ -#define PITCH_LAG_SPAN2 65 /* (PITCH_MAX_LAG/2-PITCH_MIN_LAG/2+5) */ -#define PITCH_CORR_LEN2 60 /* 15 ms */ -#define PITCH_CORR_STEP2 60 /* (PITCH_FRAME_LEN/4) */ -#define PITCH_SUBFRAMES 4 -#define PITCH_SUBFRAME_LEN 60 /* (PITCH_FRAME_LEN/PITCH_SUBFRAMES) */ - -/* For pitch filter */ -#define PITCH_BUFFSIZE 190 /* (PITCH_MAX_LAG + 50) Extra 50 for fraction and LP filters */ -#define PITCH_INTBUFFSIZE 430 /* (PITCH_FRAME_LEN+PITCH_BUFFSIZE) */ -#define PITCH_FRACS 8 -#define PITCH_FRACORDER 9 -#define PITCH_DAMPORDER 5 - - -/* Order of high pass filter */ -#define HPORDER 2 - - -/* PLC */ -#define DECAY_RATE 10 /* Q15, 20% of decay every lost frame apllied linearly sample by sample*/ -#define PLC_WAS_USED 1 -#define PLC_NOT_USED 3 -#define RECOVERY_OVERLAP 80 -#define RESAMP_RES 256 -#define RESAMP_RES_BIT 8 - - - -/* Define Error codes */ -/* 6000 General */ -#define ISAC_MEMORY_ALLOCATION_FAILED 6010 -#define ISAC_MODE_MISMATCH 6020 -#define ISAC_DISALLOWED_BOTTLENECK 6030 -#define ISAC_DISALLOWED_FRAME_LENGTH 6040 -/* 6200 Bandwidth estimator */ -#define ISAC_RANGE_ERROR_BW_ESTIMATOR 6240 -/* 6400 Encoder */ -#define ISAC_ENCODER_NOT_INITIATED 6410 -#define ISAC_DISALLOWED_CODING_MODE 6420 -#define ISAC_DISALLOWED_FRAME_MODE_ENCODER 6430 -#define ISAC_DISALLOWED_BITSTREAM_LENGTH 6440 -#define ISAC_PAYLOAD_LARGER_THAN_LIMIT 6450 -/* 6600 Decoder */ -#define ISAC_DECODER_NOT_INITIATED 6610 -#define ISAC_EMPTY_PACKET 6620 -#define ISAC_PACKET_TOO_SHORT 6625 -#define ISAC_DISALLOWED_FRAME_MODE_DECODER 6630 -#define ISAC_RANGE_ERROR_DECODE_FRAME_LENGTH 6640 -#define ISAC_RANGE_ERROR_DECODE_BANDWIDTH 6650 -#define ISAC_RANGE_ERROR_DECODE_PITCH_GAIN 6660 -#define ISAC_RANGE_ERROR_DECODE_PITCH_LAG 6670 -#define ISAC_RANGE_ERROR_DECODE_LPC 6680 -#define ISAC_RANGE_ERROR_DECODE_SPECTRUM 6690 -#define ISAC_LENGTH_MISMATCH 6730 -/* 6800 Call setup formats */ -#define ISAC_INCOMPATIBLE_FORMATS 6810 - - -#endif /* WEBRTC_MODULES_AUDIO_CODING_CODECS_ISAC_FIX_SOURCE_SETTINGS_H_ */ diff --git a/WebRtc.NET/include/webrtc/modules/audio_coding/codecs/isac/fix/source/spectrum_ar_model_tables.h b/WebRtc.NET/include/webrtc/modules/audio_coding/codecs/isac/fix/source/spectrum_ar_model_tables.h deleted file mode 100644 index 55832063..00000000 --- a/WebRtc.NET/include/webrtc/modules/audio_coding/codecs/isac/fix/source/spectrum_ar_model_tables.h +++ /dev/null @@ -1,95 +0,0 @@ -/* - * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -/* - * spectrum_ar_model_tables.h - * - * This file contains definitions of tables with AR coefficients, - * Gain coefficients and cosine tables. - * - */ - -#ifndef WEBRTC_MODULES_AUDIO_CODING_CODECS_ISAC_FIX_SOURCE_SPECTRUM_AR_MODEL_TABLES_H_ -#define WEBRTC_MODULES_AUDIO_CODING_CODECS_ISAC_FIX_SOURCE_SPECTRUM_AR_MODEL_TABLES_H_ - -#include "settings.h" -#include "webrtc/typedefs.h" - -/********************* AR Coefficient Tables ************************/ -/* cdf for quantized reflection coefficient 1 */ -extern const uint16_t WebRtcIsacfix_kRc1Cdf[12]; - -/* cdf for quantized reflection coefficient 2 */ -extern const uint16_t WebRtcIsacfix_kRc2Cdf[12]; - -/* cdf for quantized reflection coefficient 3 */ -extern const uint16_t WebRtcIsacfix_kRc3Cdf[12]; - -/* cdf for quantized reflection coefficient 4 */ -extern const uint16_t WebRtcIsacfix_kRc4Cdf[12]; - -/* cdf for quantized reflection coefficient 5 */ -extern const uint16_t WebRtcIsacfix_kRc5Cdf[12]; - -/* cdf for quantized reflection coefficient 6 */ -extern const uint16_t WebRtcIsacfix_kRc6Cdf[12]; - -/* representation levels for quantized reflection coefficient 1 */ -extern const int16_t WebRtcIsacfix_kRc1Levels[11]; - -/* representation levels for quantized reflection coefficient 2 */ -extern const int16_t WebRtcIsacfix_kRc2Levels[11]; - -/* representation levels for quantized reflection coefficient 3 */ -extern const int16_t WebRtcIsacfix_kRc3Levels[11]; - -/* representation levels for quantized reflection coefficient 4 */ -extern const int16_t WebRtcIsacfix_kRc4Levels[11]; - -/* representation levels for quantized reflection coefficient 5 */ -extern const int16_t WebRtcIsacfix_kRc5Levels[11]; - -/* representation levels for quantized reflection coefficient 6 */ -extern const int16_t WebRtcIsacfix_kRc6Levels[11]; - -/* quantization boundary levels for reflection coefficients */ -extern const int16_t WebRtcIsacfix_kRcBound[12]; - -/* initial indices for AR reflection coefficient quantizer and cdf table search */ -extern const uint16_t WebRtcIsacfix_kRcInitInd[AR_ORDER]; - -/* pointers to AR cdf tables */ -extern const uint16_t *WebRtcIsacfix_kRcCdfPtr[AR_ORDER]; - -/* pointers to AR representation levels tables */ -extern const int16_t *WebRtcIsacfix_kRcLevPtr[AR_ORDER]; - - -/******************** GAIN Coefficient Tables ***********************/ -/* cdf for Gain coefficient */ -extern const uint16_t WebRtcIsacfix_kGainCdf[19]; - -/* representation levels for quantized Gain coefficient */ -extern const int32_t WebRtcIsacfix_kGain2Lev[18]; - -/* squared quantization boundary levels for Gain coefficient */ -extern const int32_t WebRtcIsacfix_kGain2Bound[19]; - -/* pointer to Gain cdf table */ -extern const uint16_t *WebRtcIsacfix_kGainPtr[1]; - -/* Gain initial index for gain quantizer and cdf table search */ -extern const uint16_t WebRtcIsacfix_kGainInitInd[1]; - -/************************* Cosine Tables ****************************/ -/* Cosine table */ -extern const int16_t WebRtcIsacfix_kCos[6][60]; - -#endif /* WEBRTC_MODULES_AUDIO_CODING_CODECS_ISAC_FIX_SOURCE_SPECTRUM_AR_MODEL_TABLES_H_ */ diff --git a/WebRtc.NET/include/webrtc/modules/audio_coding/codecs/isac/fix/source/structs.h b/WebRtc.NET/include/webrtc/modules/audio_coding/codecs/isac/fix/source/structs.h deleted file mode 100644 index 278af752..00000000 --- a/WebRtc.NET/include/webrtc/modules/audio_coding/codecs/isac/fix/source/structs.h +++ /dev/null @@ -1,382 +0,0 @@ -/* - * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -/* - * structs.h - * - * This header file contains all the structs used in the ISAC codec - * - */ - -#ifndef WEBRTC_MODULES_AUDIO_CODING_CODECS_ISAC_FIX_SOURCE_STRUCTS_H_ -#define WEBRTC_MODULES_AUDIO_CODING_CODECS_ISAC_FIX_SOURCE_STRUCTS_H_ - - -#include "webrtc/common_audio/signal_processing/include/signal_processing_library.h" -#include "webrtc/modules/audio_coding/codecs/isac/bandwidth_info.h" -#include "webrtc/modules/audio_coding/codecs/isac/fix/source/settings.h" -#include "webrtc/typedefs.h" - -/* Bitstream struct for decoder */ -typedef struct Bitstreamstruct_dec { - - uint16_t stream[INTERNAL_STREAM_SIZE_W16]; /* Array bytestream to decode */ - uint32_t W_upper; /* Upper boundary of interval W */ - uint32_t streamval; - uint16_t stream_index; /* Index to the current position in bytestream */ - int16_t full; /* 0 - first byte in memory filled, second empty*/ - /* 1 - both bytes are empty (we just filled the previous memory */ - - size_t stream_size; /* The size of stream in bytes. */ -} Bitstr_dec; - -/* Bitstream struct for encoder */ -typedef struct Bitstreamstruct_enc { - - uint16_t stream[STREAM_MAXW16_60MS]; /* Vector for adding encoded bytestream */ - uint32_t W_upper; /* Upper boundary of interval W */ - uint32_t streamval; - uint16_t stream_index; /* Index to the current position in bytestream */ - int16_t full; /* 0 - first byte in memory filled, second empty*/ - /* 1 - both bytes are empty (we just filled the previous memory */ - -} Bitstr_enc; - - -typedef struct { - - int16_t DataBufferLoQ0[WINLEN]; - int16_t DataBufferHiQ0[WINLEN]; - - int32_t CorrBufLoQQ[ORDERLO+1]; - int32_t CorrBufHiQQ[ORDERHI+1]; - - int16_t CorrBufLoQdom[ORDERLO+1]; - int16_t CorrBufHiQdom[ORDERHI+1]; - - int32_t PreStateLoGQ15[ORDERLO+1]; - int32_t PreStateHiGQ15[ORDERHI+1]; - - uint32_t OldEnergy; - -} MaskFiltstr_enc; - - - -typedef struct { - - int16_t PostStateLoGQ0[ORDERLO+1]; - int16_t PostStateHiGQ0[ORDERHI+1]; - - uint32_t OldEnergy; - -} MaskFiltstr_dec; - - - - - - - - -typedef struct { - - //state vectors for each of the two analysis filters - - int32_t INSTAT1_fix[2*(QORDER-1)]; - int32_t INSTAT2_fix[2*(QORDER-1)]; - int16_t INLABUF1_fix[QLOOKAHEAD]; - int16_t INLABUF2_fix[QLOOKAHEAD]; - - /* High pass filter */ - int32_t HPstates_fix[HPORDER]; - -} PreFiltBankstr; - - -typedef struct { - - //state vectors for each of the two analysis filters - int32_t STATE_0_LOWER_fix[2*POSTQORDER]; - int32_t STATE_0_UPPER_fix[2*POSTQORDER]; - - /* High pass filter */ - - int32_t HPstates1_fix[HPORDER]; - int32_t HPstates2_fix[HPORDER]; - -} PostFiltBankstr; - -typedef struct { - - - /* data buffer for pitch filter */ - int16_t ubufQQ[PITCH_BUFFSIZE]; - - /* low pass state vector */ - int16_t ystateQQ[PITCH_DAMPORDER]; - - /* old lag and gain */ - int16_t oldlagQ7; - int16_t oldgainQ12; - -} PitchFiltstr; - - - -typedef struct { - - //for inital estimator - int16_t dec_buffer16[PITCH_CORR_LEN2+PITCH_CORR_STEP2+PITCH_MAX_LAG/2-PITCH_FRAME_LEN/2+2]; - int32_t decimator_state32[2*ALLPASSSECTIONS+1]; - int16_t inbuf[QLOOKAHEAD]; - - PitchFiltstr PFstr_wght; - PitchFiltstr PFstr; - - -} PitchAnalysisStruct; - - -typedef struct { - /* Parameters used in PLC to avoid re-computation */ - - /* --- residual signals --- */ - int16_t prevPitchInvIn[FRAMESAMPLES/2]; - int16_t prevPitchInvOut[PITCH_MAX_LAG + 10]; // [FRAMESAMPLES/2]; save 90 - int32_t prevHP[PITCH_MAX_LAG + 10]; // [FRAMESAMPLES/2]; save 90 - - - int16_t decayCoeffPriodic; /* how much to supress a sample */ - int16_t decayCoeffNoise; - int16_t used; /* if PLC is used */ - - - int16_t *lastPitchLP; // [FRAMESAMPLES/2]; saved 240; - - - /* --- LPC side info --- */ - int16_t lofilt_coefQ15[ ORDERLO ]; - int16_t hifilt_coefQ15[ ORDERHI ]; - int32_t gain_lo_hiQ17[2]; - - /* --- LTP side info --- */ - int16_t AvgPitchGain_Q12; - int16_t lastPitchGain_Q12; - int16_t lastPitchLag_Q7; - - /* --- Add-overlap in recovery packet --- */ - int16_t overlapLP[ RECOVERY_OVERLAP ]; // [FRAMESAMPLES/2]; saved 160 - - int16_t pitchCycles; - int16_t A; - int16_t B; - size_t pitchIndex; - size_t stretchLag; - int16_t *prevPitchLP; // [ FRAMESAMPLES/2 ]; saved 240 - int16_t seed; - - int16_t std; -} PLCstr; - - - -/* Have instance of struct together with other iSAC structs */ -typedef struct { - - int16_t prevFrameSizeMs; /* Previous frame size (in ms) */ - uint16_t prevRtpNumber; /* Previous RTP timestamp from received packet */ - /* (in samples relative beginning) */ - uint32_t prevSendTime; /* Send time for previous packet, from RTP header */ - uint32_t prevArrivalTime; /* Arrival time for previous packet (in ms using timeGetTime()) */ - uint16_t prevRtpRate; /* rate of previous packet, derived from RTP timestamps (in bits/s) */ - uint32_t lastUpdate; /* Time since the last update of the Bottle Neck estimate (in samples) */ - uint32_t lastReduction; /* Time sinse the last reduction (in samples) */ - int32_t countUpdates; /* How many times the estimate was update in the beginning */ - - /* The estimated bottle neck rate from there to here (in bits/s) */ - uint32_t recBw; - uint32_t recBwInv; - uint32_t recBwAvg; - uint32_t recBwAvgQ; - - uint32_t minBwInv; - uint32_t maxBwInv; - - /* The estimated mean absolute jitter value, as seen on this side (in ms) */ - int32_t recJitter; - int32_t recJitterShortTerm; - int32_t recJitterShortTermAbs; - int32_t recMaxDelay; - int32_t recMaxDelayAvgQ; - - - int16_t recHeaderRate; /* (assumed) bitrate for headers (bps) */ - - uint32_t sendBwAvg; /* The estimated bottle neck rate from here to there (in bits/s) */ - int32_t sendMaxDelayAvg; /* The estimated mean absolute jitter value, as seen on the other siee (in ms) */ - - - int16_t countRecPkts; /* number of packets received since last update */ - int16_t highSpeedRec; /* flag for marking that a high speed network has been detected downstream */ - - /* number of consecutive pkts sent during which the bwe estimate has - remained at a value greater than the downstream threshold for determining highspeed network */ - int16_t countHighSpeedRec; - - /* flag indicating bwe should not adjust down immediately for very late pckts */ - int16_t inWaitPeriod; - - /* variable holding the time of the start of a window of time when - bwe should not adjust down immediately for very late pckts */ - uint32_t startWaitPeriod; - - /* number of consecutive pkts sent during which the bwe estimate has - remained at a value greater than the upstream threshold for determining highspeed network */ - int16_t countHighSpeedSent; - - /* flag indicated the desired number of packets over threshold rate have been sent and - bwe will assume the connection is over broadband network */ - int16_t highSpeedSend; - - IsacBandwidthInfo external_bw_info; -} BwEstimatorstr; - - -typedef struct { - - /* boolean, flags if previous packet exceeded B.N. */ - int16_t PrevExceed; - /* ms */ - int16_t ExceedAgo; - /* packets left to send in current burst */ - int16_t BurstCounter; - /* packets */ - int16_t InitCounter; - /* ms remaining in buffer when next packet will be sent */ - int16_t StillBuffered; - -} RateModel; - -/* The following strutc is used to store data from encoding, to make it - fast and easy to construct a new bitstream with a different Bandwidth - estimate. All values (except framelength and minBytes) is double size to - handle 60 ms of data. -*/ -typedef struct { - - /* Used to keep track of if it is first or second part of 60 msec packet */ - int startIdx; - - /* Frame length in samples */ - int16_t framelength; - - /* Pitch Gain */ - int16_t pitchGain_index[2]; - - /* Pitch Lag */ - int32_t meanGain[2]; - int16_t pitchIndex[PITCH_SUBFRAMES*2]; - - /* LPC */ - int32_t LPCcoeffs_g[12*2]; /* KLT_ORDER_GAIN = 12 */ - int16_t LPCindex_s[108*2]; /* KLT_ORDER_SHAPE = 108 */ - int16_t LPCindex_g[12*2]; /* KLT_ORDER_GAIN = 12 */ - - /* Encode Spec */ - int16_t fre[FRAMESAMPLES]; - int16_t fim[FRAMESAMPLES]; - int16_t AvgPitchGain[2]; - - /* Used in adaptive mode only */ - int minBytes; - -} IsacSaveEncoderData; - -typedef struct { - - Bitstr_enc bitstr_obj; - MaskFiltstr_enc maskfiltstr_obj; - PreFiltBankstr prefiltbankstr_obj; - PitchFiltstr pitchfiltstr_obj; - PitchAnalysisStruct pitchanalysisstr_obj; - RateModel rate_data_obj; - - int16_t buffer_index; - int16_t current_framesamples; - - int16_t data_buffer_fix[FRAMESAMPLES]; // the size was MAX_FRAMESAMPLES - - int16_t frame_nb; - int16_t BottleNeck; - int16_t MaxDelay; - int16_t new_framelength; - int16_t s2nr; - uint16_t MaxBits; - - int16_t bitstr_seed; -#ifdef WEBRTC_ISAC_FIX_NB_CALLS_ENABLED - PostFiltBankstr interpolatorstr_obj; -#endif - - IsacSaveEncoderData *SaveEnc_ptr; - int16_t payloadLimitBytes30; /* Maximum allowed number of bits for a 30 msec packet */ - int16_t payloadLimitBytes60; /* Maximum allowed number of bits for a 30 msec packet */ - int16_t maxPayloadBytes; /* Maximum allowed number of bits for both 30 and 60 msec packet */ - int16_t maxRateInBytes; /* Maximum allowed rate in bytes per 30 msec packet */ - int16_t enforceFrameSize; /* If set iSAC will never change packet size */ - -} IsacFixEncoderInstance; - - -typedef struct { - - Bitstr_dec bitstr_obj; - MaskFiltstr_dec maskfiltstr_obj; - PostFiltBankstr postfiltbankstr_obj; - PitchFiltstr pitchfiltstr_obj; - PLCstr plcstr_obj; /* TS; for packet loss concealment */ - -#ifdef WEBRTC_ISAC_FIX_NB_CALLS_ENABLED - PreFiltBankstr decimatorstr_obj; -#endif - -} IsacFixDecoderInstance; - - - -typedef struct { - - IsacFixEncoderInstance ISACenc_obj; - IsacFixDecoderInstance ISACdec_obj; - BwEstimatorstr bwestimator_obj; - int16_t CodingMode; /* 0 = adaptive; 1 = instantaneous */ - int16_t errorcode; - int16_t initflag; /* 0 = nothing initiated; 1 = encoder or decoder */ - /* not initiated; 2 = all initiated */ -} ISACFIX_SubStruct; - - -typedef struct { - int32_t lpcGains[12]; /* 6 lower-band & 6 upper-band we may need to double it for 60*/ - /* */ - uint32_t W_upper; /* Upper boundary of interval W */ - uint32_t streamval; - uint16_t stream_index; /* Index to the current position in bytestream */ - int16_t full; /* 0 - first byte in memory filled, second empty*/ - /* 1 - both bytes are empty (we just filled the previous memory */ - uint16_t beforeLastWord; - uint16_t lastWord; -} transcode_obj; - - -//Bitstr_enc myBitStr; - -#endif /* WEBRTC_MODULES_AUDIO_CODING_CODECS_ISAC_FIX_SOURCE_STRUCTS_H_ */ diff --git a/WebRtc.NET/include/webrtc/modules/audio_coding/codecs/isac/locked_bandwidth_info.h b/WebRtc.NET/include/webrtc/modules/audio_coding/codecs/isac/locked_bandwidth_info.h deleted file mode 100644 index 1ab5ae9d..00000000 --- a/WebRtc.NET/include/webrtc/modules/audio_coding/codecs/isac/locked_bandwidth_info.h +++ /dev/null @@ -1,56 +0,0 @@ -/* - * Copyright (c) 2015 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MODULES_AUDIO_CODING_CODECS_ISAC_LOCKED_BANDWIDTH_INFO_H_ -#define WEBRTC_MODULES_AUDIO_CODING_CODECS_ISAC_LOCKED_BANDWIDTH_INFO_H_ - -#include "webrtc/base/atomicops.h" -#include "webrtc/base/criticalsection.h" -#include "webrtc/base/thread_annotations.h" -#include "webrtc/modules/audio_coding/codecs/isac/bandwidth_info.h" - -namespace webrtc { - -// An IsacBandwidthInfo that's safe to access from multiple threads because -// it's protected by a mutex. -class LockedIsacBandwidthInfo final { - public: - LockedIsacBandwidthInfo(); - ~LockedIsacBandwidthInfo(); - - IsacBandwidthInfo Get() const { - rtc::CritScope lock(&lock_); - return bwinfo_; - } - - void Set(const IsacBandwidthInfo& bwinfo) { - rtc::CritScope lock(&lock_); - bwinfo_ = bwinfo; - } - - int AddRef() const { return rtc::AtomicOps::Increment(&ref_count_); } - - int Release() const { - const int count = rtc::AtomicOps::Decrement(&ref_count_); - if (count == 0) { - delete this; - } - return count; - } - - private: - mutable volatile int ref_count_; - rtc::CriticalSection lock_; - IsacBandwidthInfo bwinfo_ GUARDED_BY(lock_); -}; - -} // namespace webrtc - -#endif // WEBRTC_MODULES_AUDIO_CODING_CODECS_ISAC_LOCKED_BANDWIDTH_INFO_H_ diff --git a/WebRtc.NET/include/webrtc/modules/audio_coding/codecs/isac/main/include/audio_decoder_isac.h b/WebRtc.NET/include/webrtc/modules/audio_coding/codecs/isac/main/include/audio_decoder_isac.h deleted file mode 100644 index dcd4852a..00000000 --- a/WebRtc.NET/include/webrtc/modules/audio_coding/codecs/isac/main/include/audio_decoder_isac.h +++ /dev/null @@ -1,22 +0,0 @@ -/* - * Copyright (c) 2015 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MODULES_AUDIO_CODING_CODECS_ISAC_MAIN_INCLUDE_AUDIO_DECODER_ISAC_H_ -#define WEBRTC_MODULES_AUDIO_CODING_CODECS_ISAC_MAIN_INCLUDE_AUDIO_DECODER_ISAC_H_ - -#include "webrtc/modules/audio_coding/codecs/isac/audio_decoder_isac_t.h" -#include "webrtc/modules/audio_coding/codecs/isac/main/source/isac_float_type.h" - -namespace webrtc { - -using AudioDecoderIsac = AudioDecoderIsacT; - -} // namespace webrtc -#endif // WEBRTC_MODULES_AUDIO_CODING_CODECS_ISAC_MAIN_INCLUDE_AUDIO_ENCODER_ISAC_H_ diff --git a/WebRtc.NET/include/webrtc/modules/audio_coding/codecs/isac/main/include/audio_encoder_isac.h b/WebRtc.NET/include/webrtc/modules/audio_coding/codecs/isac/main/include/audio_encoder_isac.h deleted file mode 100644 index cc8665d6..00000000 --- a/WebRtc.NET/include/webrtc/modules/audio_coding/codecs/isac/main/include/audio_encoder_isac.h +++ /dev/null @@ -1,22 +0,0 @@ -/* - * Copyright (c) 2014 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MODULES_AUDIO_CODING_CODECS_ISAC_MAIN_INCLUDE_AUDIO_ENCODER_ISAC_H_ -#define WEBRTC_MODULES_AUDIO_CODING_CODECS_ISAC_MAIN_INCLUDE_AUDIO_ENCODER_ISAC_H_ - -#include "webrtc/modules/audio_coding/codecs/isac/audio_encoder_isac_t.h" -#include "webrtc/modules/audio_coding/codecs/isac/main/source/isac_float_type.h" - -namespace webrtc { - -using AudioEncoderIsac = AudioEncoderIsacT; - -} // namespace webrtc -#endif // WEBRTC_MODULES_AUDIO_CODING_CODECS_ISAC_MAIN_INCLUDE_AUDIO_ENCODER_ISAC_H_ diff --git a/WebRtc.NET/include/webrtc/modules/audio_coding/codecs/isac/main/include/isac.h b/WebRtc.NET/include/webrtc/modules/audio_coding/codecs/isac/main/include/isac.h deleted file mode 100644 index 327e7f4b..00000000 --- a/WebRtc.NET/include/webrtc/modules/audio_coding/codecs/isac/main/include/isac.h +++ /dev/null @@ -1,724 +0,0 @@ -/* - * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MODULES_AUDIO_CODING_CODECS_ISAC_MAIN_INCLUDE_ISAC_H_ -#define WEBRTC_MODULES_AUDIO_CODING_CODECS_ISAC_MAIN_INCLUDE_ISAC_H_ - -#include - -#include "webrtc/modules/audio_coding/codecs/isac/bandwidth_info.h" -#include "webrtc/typedefs.h" - -typedef struct WebRtcISACStruct ISACStruct; - -#if defined(__cplusplus) -extern "C" { -#endif - - /****************************************************************************** - * WebRtcIsac_AssignSize(...) - * - * This function returns the size of the ISAC instance, so that the instance - * can be created outside iSAC. - * - * Input: - * - samplingRate : sampling rate of the input/output audio. - * - * Output: - * - sizeinbytes : number of bytes needed to allocate for the - * instance. - * - * Return value : 0 - Ok - * -1 - Error - */ - - int16_t WebRtcIsac_AssignSize( - int* sizeinbytes); - - - /****************************************************************************** - * WebRtcIsac_Assign(...) - * - * This function assignes the memory already created to the ISAC instance. - * - * Input: - * - *ISAC_main_inst : a pointer to the coder instance. - * - samplingRate : sampling rate of the input/output audio. - * - ISAC_inst_Addr : the already allocated memory, where we put the - * iSAC structure. - * - * Return value : 0 - Ok - * -1 - Error - */ - - int16_t WebRtcIsac_Assign( - ISACStruct** ISAC_main_inst, - void* ISAC_inst_Addr); - - - /****************************************************************************** - * WebRtcIsac_Create(...) - * - * This function creates an ISAC instance, which will contain the state - * information for one coding/decoding channel. - * - * Input: - * - *ISAC_main_inst : a pointer to the coder instance. - * - * Return value : 0 - Ok - * -1 - Error - */ - - int16_t WebRtcIsac_Create( - ISACStruct** ISAC_main_inst); - - - /****************************************************************************** - * WebRtcIsac_Free(...) - * - * This function frees the ISAC instance created at the beginning. - * - * Input: - * - ISAC_main_inst : an ISAC instance. - * - * Return value : 0 - Ok - * -1 - Error - */ - - int16_t WebRtcIsac_Free( - ISACStruct* ISAC_main_inst); - - - /****************************************************************************** - * WebRtcIsac_EncoderInit(...) - * - * This function initializes an ISAC instance prior to the encoder calls. - * - * Input: - * - ISAC_main_inst : ISAC instance. - * - CodingMode : 0 -> Bit rate and frame length are - * automatically adjusted to available bandwidth - * on transmission channel, just valid if codec - * is created to work in wideband mode. - * 1 -> User sets a frame length and a target bit - * rate which is taken as the maximum - * short-term average bit rate. - * - * Return value : 0 - Ok - * -1 - Error - */ - - int16_t WebRtcIsac_EncoderInit( - ISACStruct* ISAC_main_inst, - int16_t CodingMode); - - - /****************************************************************************** - * WebRtcIsac_Encode(...) - * - * This function encodes 10ms audio blocks and inserts it into a package. - * Input speech length has 160 samples if operating at 16 kHz sampling - * rate, or 320 if operating at 32 kHz sampling rate. The encoder buffers the - * input audio until the whole frame is buffered then proceeds with encoding. - * - * - * Input: - * - ISAC_main_inst : ISAC instance. - * - speechIn : input speech vector. - * - * Output: - * - encoded : the encoded data vector - * - * Return value: - * : >0 - Length (in bytes) of coded data - * : 0 - The buffer didn't reach the chosen - * frame-size so it keeps buffering speech - * samples. - * : -1 - Error - */ - - int WebRtcIsac_Encode( - ISACStruct* ISAC_main_inst, - const int16_t* speechIn, - uint8_t* encoded); - - - /****************************************************************************** - * WebRtcIsac_DecoderInit(...) - * - * This function initializes an ISAC instance prior to the decoder calls. - * - * Input: - * - ISAC_main_inst : ISAC instance. - */ - - void WebRtcIsac_DecoderInit(ISACStruct* ISAC_main_inst); - - /****************************************************************************** - * WebRtcIsac_UpdateBwEstimate(...) - * - * This function updates the estimate of the bandwidth. - * - * Input: - * - ISAC_main_inst : ISAC instance. - * - encoded : encoded ISAC frame(s). - * - packet_size : size of the packet. - * - rtp_seq_number : the RTP number of the packet. - * - send_ts : the RTP send timestamp, given in samples - * - arr_ts : the arrival time of the packet (from NetEq) - * in samples. - * - * Return value : 0 - Ok - * -1 - Error - */ - - int16_t WebRtcIsac_UpdateBwEstimate( - ISACStruct* ISAC_main_inst, - const uint8_t* encoded, - size_t packet_size, - uint16_t rtp_seq_number, - uint32_t send_ts, - uint32_t arr_ts); - - - /****************************************************************************** - * WebRtcIsac_Decode(...) - * - * This function decodes an ISAC frame. At 16 kHz sampling rate, the length - * of the output audio could be either 480 or 960 samples, equivalent to - * 30 or 60 ms respectively. At 32 kHz sampling rate, the length of the - * output audio is 960 samples, which is 30 ms. - * - * Input: - * - ISAC_main_inst : ISAC instance. - * - encoded : encoded ISAC frame(s). - * - len : bytes in encoded vector. - * - * Output: - * - decoded : The decoded vector. - * - * Return value : >0 - number of samples in decoded vector. - * -1 - Error. - */ - - int WebRtcIsac_Decode( - ISACStruct* ISAC_main_inst, - const uint8_t* encoded, - size_t len, - int16_t* decoded, - int16_t* speechType); - - - /****************************************************************************** - * WebRtcIsac_DecodePlc(...) - * - * This function conducts PLC for ISAC frame(s). Output speech length - * will be a multiple of frames, i.e. multiples of 30 ms audio. Therefore, - * the output is multiple of 480 samples if operating at 16 kHz and multiple - * of 960 if operating at 32 kHz. - * - * Input: - * - ISAC_main_inst : ISAC instance. - * - noOfLostFrames : Number of PLC frames to produce. - * - * Output: - * - decoded : The decoded vector. - * - * Return value : Number of samples in decoded PLC vector - */ - - size_t WebRtcIsac_DecodePlc( - ISACStruct* ISAC_main_inst, - int16_t* decoded, - size_t noOfLostFrames); - - - /****************************************************************************** - * WebRtcIsac_Control(...) - * - * This function sets the limit on the short-term average bit-rate and the - * frame length. Should be used only in Instantaneous mode. At 16 kHz sampling - * rate, an average bit-rate between 10000 to 32000 bps is valid and a - * frame-size of 30 or 60 ms is acceptable. At 32 kHz, an average bit-rate - * between 10000 to 56000 is acceptable, and the valid frame-size is 30 ms. - * - * Input: - * - ISAC_main_inst : ISAC instance. - * - rate : limit on the short-term average bit rate, - * in bits/second. - * - framesize : frame-size in millisecond. - * - * Return value : 0 - ok - * -1 - Error - */ - - int16_t WebRtcIsac_Control( - ISACStruct* ISAC_main_inst, - int32_t rate, - int framesize); - - void WebRtcIsac_SetInitialBweBottleneck(ISACStruct* ISAC_main_inst, - int bottleneck_bits_per_second); - - /****************************************************************************** - * WebRtcIsac_ControlBwe(...) - * - * This function sets the initial values of bottleneck and frame-size if - * iSAC is used in channel-adaptive mode. Therefore, this API is not - * applicable if the codec is created to operate in super-wideband mode. - * - * Through this API, users can enforce a frame-size for all values of - * bottleneck. Then iSAC will not automatically change the frame-size. - * - * - * Input: - * - ISAC_main_inst : ISAC instance. - * - rateBPS : initial value of bottleneck in bits/second - * 10000 <= rateBPS <= 56000 is accepted - * For default bottleneck set rateBPS = 0 - * - frameSizeMs : number of milliseconds per frame (30 or 60) - * - enforceFrameSize : 1 to enforce the given frame-size through - * out the adaptation process, 0 to let iSAC - * change the frame-size if required. - * - * Return value : 0 - ok - * -1 - Error - */ - - int16_t WebRtcIsac_ControlBwe( - ISACStruct* ISAC_main_inst, - int32_t rateBPS, - int frameSizeMs, - int16_t enforceFrameSize); - - - /****************************************************************************** - * WebRtcIsac_ReadFrameLen(...) - * - * This function returns the length of the frame represented in the packet. - * - * Input: - * - encoded : Encoded bit-stream - * - * Output: - * - frameLength : Length of frame in packet (in samples) - * - */ - - int16_t WebRtcIsac_ReadFrameLen( - ISACStruct* ISAC_main_inst, - const uint8_t* encoded, - int16_t* frameLength); - - - /****************************************************************************** - * WebRtcIsac_version(...) - * - * This function returns the version number. - * - * Output: - * - version : Pointer to character string - * - */ - - void WebRtcIsac_version( - char *version); - - - /****************************************************************************** - * WebRtcIsac_GetErrorCode(...) - * - * This function can be used to check the error code of an iSAC instance. When - * a function returns -1 a error code will be set for that instance. The - * function below extract the code of the last error that occurred in the - * specified instance. - * - * Input: - * - ISAC_main_inst : ISAC instance - * - * Return value : Error code - */ - - int16_t WebRtcIsac_GetErrorCode( - ISACStruct* ISAC_main_inst); - - - /**************************************************************************** - * WebRtcIsac_GetUplinkBw(...) - * - * This function outputs the target bottleneck of the codec. In - * channel-adaptive mode, the target bottleneck is specified through in-band - * signalling retreived by bandwidth estimator. - * In channel-independent, also called instantaneous mode, the target - * bottleneck is provided to the encoder by calling xxx_control(...). If - * xxx_control is never called the default values is returned. The default - * value for bottleneck at 16 kHz encoder sampling rate is 32000 bits/sec, - * and it is 56000 bits/sec for 32 kHz sampling rate. - * Note that the output is the iSAC internal operating bottleneck which might - * differ slightly from the one provided through xxx_control(). - * - * Input: - * - ISAC_main_inst : iSAC instance - * - * Output: - * - *bottleneck : bottleneck in bits/sec - * - * Return value : -1 if error happens - * 0 bit-rates computed correctly. - */ - - int16_t WebRtcIsac_GetUplinkBw( - ISACStruct* ISAC_main_inst, - int32_t* bottleneck); - - - /****************************************************************************** - * WebRtcIsac_SetMaxPayloadSize(...) - * - * This function sets a limit for the maximum payload size of iSAC. The same - * value is used both for 30 and 60 ms packets. If the encoder sampling rate - * is 16 kHz the maximum payload size is between 120 and 400 bytes. If the - * encoder sampling rate is 32 kHz the maximum payload size is between 120 - * and 600 bytes. - * - * If an out of range limit is used, the function returns -1, but the closest - * valid value will be applied. - * - * --------------- - * IMPORTANT NOTES - * --------------- - * The size of a packet is limited to the minimum of 'max-payload-size' and - * 'max-rate.' For instance, let's assume the max-payload-size is set to - * 170 bytes, and max-rate is set to 40 kbps. Note that a limit of 40 kbps - * translates to 150 bytes for 30ms frame-size & 300 bytes for 60ms - * frame-size. Then a packet with a frame-size of 30 ms is limited to 150, - * i.e. min(170, 150), and a packet with 60 ms frame-size is limited to - * 170 bytes, i.e. min(170, 300). - * - * Input: - * - ISAC_main_inst : iSAC instance - * - maxPayloadBytes : maximum size of the payload in bytes - * valid values are between 120 and 400 bytes - * if encoder sampling rate is 16 kHz. For - * 32 kHz encoder sampling rate valid values - * are between 120 and 600 bytes. - * - * Return value : 0 if successful - * -1 if error happens - */ - - int16_t WebRtcIsac_SetMaxPayloadSize( - ISACStruct* ISAC_main_inst, - int16_t maxPayloadBytes); - - - /****************************************************************************** - * WebRtcIsac_SetMaxRate(...) - * - * This function sets the maximum rate which the codec may not exceed for - * any signal packet. The maximum rate is defined and payload-size per - * frame-size in bits per second. - * - * The codec has a maximum rate of 53400 bits per second (200 bytes per 30 - * ms) if the encoder sampling rate is 16kHz, and 160 kbps (600 bytes/30 ms) - * if the encoder sampling rate is 32 kHz. - * - * It is possible to set a maximum rate between 32000 and 53400 bits/sec - * in wideband mode, and 32000 to 160000 bits/sec in super-wideband mode. - * - * If an out of range limit is used, the function returns -1, but the closest - * valid value will be applied. - * - * --------------- - * IMPORTANT NOTES - * --------------- - * The size of a packet is limited to the minimum of 'max-payload-size' and - * 'max-rate.' For instance, let's assume the max-payload-size is set to - * 170 bytes, and max-rate is set to 40 kbps. Note that a limit of 40 kbps - * translates to 150 bytes for 30ms frame-size & 300 bytes for 60ms - * frame-size. Then a packet with a frame-size of 30 ms is limited to 150, - * i.e. min(170, 150), and a packet with 60 ms frame-size is limited to - * 170 bytes, min(170, 300). - * - * Input: - * - ISAC_main_inst : iSAC instance - * - maxRate : maximum rate in bits per second, - * valid values are 32000 to 53400 bits/sec in - * wideband mode, and 32000 to 160000 bits/sec in - * super-wideband mode. - * - * Return value : 0 if successful - * -1 if error happens - */ - - int16_t WebRtcIsac_SetMaxRate( - ISACStruct* ISAC_main_inst, - int32_t maxRate); - - - /****************************************************************************** - * WebRtcIsac_DecSampRate() - * Return the sampling rate of the decoded audio. - * - * Input: - * - ISAC_main_inst : iSAC instance - * - * Return value : sampling frequency in Hertz. - * - */ - - uint16_t WebRtcIsac_DecSampRate(ISACStruct* ISAC_main_inst); - - - /****************************************************************************** - * WebRtcIsac_EncSampRate() - * - * Input: - * - ISAC_main_inst : iSAC instance - * - * Return value : sampling rate in Hertz. - * - */ - - uint16_t WebRtcIsac_EncSampRate(ISACStruct* ISAC_main_inst); - - - /****************************************************************************** - * WebRtcIsac_SetDecSampRate() - * Set the sampling rate of the decoder. Initialization of the decoder WILL - * NOT overwrite the sampling rate of the encoder. The default value is 16 kHz - * which is set when the instance is created. - * - * Input: - * - ISAC_main_inst : iSAC instance - * - sampRate : sampling rate in Hertz. - * - * Return value : 0 if successful - * -1 if failed. - */ - - int16_t WebRtcIsac_SetDecSampRate(ISACStruct* ISAC_main_inst, - uint16_t samp_rate_hz); - - - /****************************************************************************** - * WebRtcIsac_SetEncSampRate() - * Set the sampling rate of the encoder. Initialization of the encoder WILL - * NOT overwrite the sampling rate of the encoder. The default value is 16 kHz - * which is set when the instance is created. The encoding-mode and the - * bottleneck remain unchanged by this call, however, the maximum rate and - * maximum payload-size will reset to their default value. - * - * Input: - * - ISAC_main_inst : iSAC instance - * - sampRate : sampling rate in Hertz. - * - * Return value : 0 if successful - * -1 if failed. - */ - - int16_t WebRtcIsac_SetEncSampRate(ISACStruct* ISAC_main_inst, - uint16_t sample_rate_hz); - - - - /****************************************************************************** - * WebRtcIsac_GetNewBitStream(...) - * - * This function returns encoded data, with the recieved bwe-index in the - * stream. If the rate is set to a value less than bottleneck of codec - * the new bistream will be re-encoded with the given target rate. - * It should always return a complete packet, i.e. only called once - * even for 60 msec frames. - * - * NOTE 1! This function does not write in the ISACStruct, it is not allowed. - * NOTE 2! Currently not implemented for SWB mode. - * NOTE 3! Rates larger than the bottleneck of the codec will be limited - * to the current bottleneck. - * - * Input: - * - ISAC_main_inst : ISAC instance. - * - bweIndex : Index of bandwidth estimate to put in new - * bitstream - * - rate : target rate of the transcoder is bits/sec. - * Valid values are the accepted rate in iSAC, - * i.e. 10000 to 56000. - * - isRCU : if the new bit-stream is an RCU stream. - * Note that the rate parameter always indicates - * the target rate of the main payload, regardless - * of 'isRCU' value. - * - * Output: - * - encoded : The encoded data vector - * - * Return value : >0 - Length (in bytes) of coded data - * -1 - Error or called in SWB mode - * NOTE! No error code is written to - * the struct since it is only allowed to read - * the struct. - */ - int16_t WebRtcIsac_GetNewBitStream( - ISACStruct* ISAC_main_inst, - int16_t bweIndex, - int16_t jitterInfo, - int32_t rate, - uint8_t* encoded, - int16_t isRCU); - - - - /**************************************************************************** - * WebRtcIsac_GetDownLinkBwIndex(...) - * - * This function returns index representing the Bandwidth estimate from - * other side to this side. - * - * Input: - * - ISAC_main_inst : iSAC struct - * - * Output: - * - bweIndex : Bandwidth estimate to transmit to other side. - * - */ - - int16_t WebRtcIsac_GetDownLinkBwIndex( - ISACStruct* ISAC_main_inst, - int16_t* bweIndex, - int16_t* jitterInfo); - - - /**************************************************************************** - * WebRtcIsac_UpdateUplinkBw(...) - * - * This function takes an index representing the Bandwidth estimate from - * this side to other side and updates BWE. - * - * Input: - * - ISAC_main_inst : iSAC struct - * - bweIndex : Bandwidth estimate from other side. - * - */ - - int16_t WebRtcIsac_UpdateUplinkBw( - ISACStruct* ISAC_main_inst, - int16_t bweIndex); - - - /**************************************************************************** - * WebRtcIsac_ReadBwIndex(...) - * - * This function returns the index of the Bandwidth estimate from the bitstream. - * - * Input: - * - encoded : Encoded bitstream - * - * Output: - * - frameLength : Length of frame in packet (in samples) - * - bweIndex : Bandwidth estimate in bitstream - * - */ - - int16_t WebRtcIsac_ReadBwIndex( - const uint8_t* encoded, - int16_t* bweIndex); - - - - /******************************************************************************* - * WebRtcIsac_GetNewFrameLen(...) - * - * returns the frame lenght (in samples) of the next packet. In the case of channel-adaptive - * mode, iSAC decides on its frame lenght based on the estimated bottleneck - * this allows a user to prepare for the next packet (at the encoder) - * - * The primary usage is in CE to make the iSAC works in channel-adaptive mode - * - * Input: - * - ISAC_main_inst : iSAC struct - * - * Return Value : frame lenght in samples - * - */ - - int16_t WebRtcIsac_GetNewFrameLen( - ISACStruct* ISAC_main_inst); - - - /**************************************************************************** - * WebRtcIsac_GetRedPayload(...) - * - * Populates "encoded" with the redundant payload of the recently encoded - * frame. This function has to be called once that WebRtcIsac_Encode(...) - * returns a positive value. Regardless of the frame-size this function will - * be called only once after encoding is completed. - * - * Input: - * - ISAC_main_inst : iSAC struct - * - * Output: - * - encoded : the encoded data vector - * - * - * Return value: - * : >0 - Length (in bytes) of coded data - * : -1 - Error - * - * - */ - int16_t WebRtcIsac_GetRedPayload( - ISACStruct* ISAC_main_inst, - uint8_t* encoded); - - - /**************************************************************************** - * WebRtcIsac_DecodeRcu(...) - * - * This function decodes a redundant (RCU) iSAC frame. Function is called in - * NetEq with a stored RCU payload i case of packet loss. Output speech length - * will be a multiple of 480 samples: 480 or 960 samples, - * depending on the framesize (30 or 60 ms). - * - * Input: - * - ISAC_main_inst : ISAC instance. - * - encoded : encoded ISAC RCU frame(s) - * - len : bytes in encoded vector - * - * Output: - * - decoded : The decoded vector - * - * Return value : >0 - number of samples in decoded vector - * -1 - Error - */ - int WebRtcIsac_DecodeRcu( - ISACStruct* ISAC_main_inst, - const uint8_t* encoded, - size_t len, - int16_t* decoded, - int16_t* speechType); - - /* Fills in an IsacBandwidthInfo struct. |inst| should be a decoder. */ - void WebRtcIsac_GetBandwidthInfo(ISACStruct* inst, IsacBandwidthInfo* bwinfo); - - /* Uses the values from an IsacBandwidthInfo struct. |inst| should be an - encoder. */ - void WebRtcIsac_SetBandwidthInfo(ISACStruct* inst, - const IsacBandwidthInfo* bwinfo); - - /* If |inst| is a decoder but not an encoder: tell it what sample rate the - encoder is using, for bandwidth estimation purposes. */ - void WebRtcIsac_SetEncSampRateInDecoder(ISACStruct* inst, int sample_rate_hz); - -#if defined(__cplusplus) -} -#endif - - - -#endif /* WEBRTC_MODULES_AUDIO_CODING_CODECS_ISAC_MAIN_INCLUDE_ISAC_H_ */ diff --git a/WebRtc.NET/include/webrtc/modules/audio_coding/codecs/isac/main/source/arith_routines.h b/WebRtc.NET/include/webrtc/modules/audio_coding/codecs/isac/main/source/arith_routines.h deleted file mode 100644 index 43ba40e8..00000000 --- a/WebRtc.NET/include/webrtc/modules/audio_coding/codecs/isac/main/source/arith_routines.h +++ /dev/null @@ -1,63 +0,0 @@ -/* - * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -/* - * arith_routines.h - * - * Functions for arithmetic coding. - * - */ - -#ifndef WEBRTC_MODULES_AUDIO_CODING_CODECS_ISAC_MAIN_SOURCE_ARITH_ROUTINES_H_ -#define WEBRTC_MODULES_AUDIO_CODING_CODECS_ISAC_MAIN_SOURCE_ARITH_ROUTINES_H_ - -#include "structs.h" - - -int WebRtcIsac_EncLogisticMulti2( - Bitstr *streamdata, /* in-/output struct containing bitstream */ - int16_t *dataQ7, /* input: data vector */ - const uint16_t *env, /* input: side info vector defining the width of the pdf */ - const int N, /* input: data vector length */ - const int16_t isSWB12kHz); /* if the codec is working in 12kHz bandwidth */ - -/* returns the number of bytes in the stream */ -int WebRtcIsac_EncTerminate(Bitstr *streamdata); /* in-/output struct containing bitstream */ - -/* returns the number of bytes in the stream so far */ -int WebRtcIsac_DecLogisticMulti2( - int16_t *data, /* output: data vector */ - Bitstr *streamdata, /* in-/output struct containing bitstream */ - const uint16_t *env, /* input: side info vector defining the width of the pdf */ - const int16_t *dither, /* input: dither vector */ - const int N, /* input: data vector length */ - const int16_t isSWB12kHz); /* if the codec is working in 12kHz bandwidth */ - -void WebRtcIsac_EncHistMulti( - Bitstr *streamdata, /* in-/output struct containing bitstream */ - const int *data, /* input: data vector */ - const uint16_t **cdf, /* input: array of cdf arrays */ - const int N); /* input: data vector length */ - -int WebRtcIsac_DecHistBisectMulti( - int *data, /* output: data vector */ - Bitstr *streamdata, /* in-/output struct containing bitstream */ - const uint16_t **cdf, /* input: array of cdf arrays */ - const uint16_t *cdf_size, /* input: array of cdf table sizes+1 (power of two: 2^k) */ - const int N); /* input: data vector length */ - -int WebRtcIsac_DecHistOneStepMulti( - int *data, /* output: data vector */ - Bitstr *streamdata, /* in-/output struct containing bitstream */ - const uint16_t **cdf, /* input: array of cdf arrays */ - const uint16_t *init_index,/* input: vector of initial cdf table search entries */ - const int N); /* input: data vector length */ - -#endif /* WEBRTC_MODULES_AUDIO_CODING_CODECS_ISAC_MAIN_SOURCE_ARITH_ROUTINES_H_ */ diff --git a/WebRtc.NET/include/webrtc/modules/audio_coding/codecs/isac/main/source/bandwidth_estimator.h b/WebRtc.NET/include/webrtc/modules/audio_coding/codecs/isac/main/source/bandwidth_estimator.h deleted file mode 100644 index 0704337f..00000000 --- a/WebRtc.NET/include/webrtc/modules/audio_coding/codecs/isac/main/source/bandwidth_estimator.h +++ /dev/null @@ -1,184 +0,0 @@ -/* - * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -/* - * bandwidth_estimator.h - * - * This header file contains the API for the Bandwidth Estimator - * designed for iSAC. - * - */ - -#ifndef WEBRTC_MODULES_AUDIO_CODING_CODECS_ISAC_MAIN_SOURCE_BANDWIDTH_ESTIMATOR_H_ -#define WEBRTC_MODULES_AUDIO_CODING_CODECS_ISAC_MAIN_SOURCE_BANDWIDTH_ESTIMATOR_H_ - -#include "structs.h" -#include "settings.h" - - -#define MIN_ISAC_BW 10000 -#define MIN_ISAC_BW_LB 10000 -#define MIN_ISAC_BW_UB 25000 - -#define MAX_ISAC_BW 56000 -#define MAX_ISAC_BW_UB 32000 -#define MAX_ISAC_BW_LB 32000 - -#define MIN_ISAC_MD 5 -#define MAX_ISAC_MD 25 - -// assumed header size, in bytes; we don't know the exact number -// (header compression may be used) -#define HEADER_SIZE 35 - -// Initial Frame-Size, in ms, for Wideband & Super-Wideband Mode -#define INIT_FRAME_LEN_WB 60 -#define INIT_FRAME_LEN_SWB 30 - -// Initial Bottleneck Estimate, in bits/sec, for -// Wideband & Super-wideband mode -#define INIT_BN_EST_WB 20e3f -#define INIT_BN_EST_SWB 56e3f - -// Initial Header rate (header rate depends on frame-size), -// in bits/sec, for Wideband & Super-Wideband mode. -#define INIT_HDR_RATE_WB \ - ((float)HEADER_SIZE * 8.0f * 1000.0f / (float)INIT_FRAME_LEN_WB) -#define INIT_HDR_RATE_SWB \ - ((float)HEADER_SIZE * 8.0f * 1000.0f / (float)INIT_FRAME_LEN_SWB) - -// number of packets in a row for a high rate burst -#define BURST_LEN 3 - -// ms, max time between two full bursts -#define BURST_INTERVAL 500 - -// number of packets in a row for initial high rate burst -#define INIT_BURST_LEN 5 - -// bits/s, rate for the first BURST_LEN packets -#define INIT_RATE_WB INIT_BN_EST_WB -#define INIT_RATE_SWB INIT_BN_EST_SWB - - -#if defined(__cplusplus) -extern "C" { -#endif - - /* This function initializes the struct */ - /* to be called before using the struct for anything else */ - /* returns 0 if everything went fine, -1 otherwise */ - int32_t WebRtcIsac_InitBandwidthEstimator( - BwEstimatorstr* bwest_str, - enum IsacSamplingRate encoderSampRate, - enum IsacSamplingRate decoderSampRate); - - /* This function updates the receiving estimate */ - /* Parameters: */ - /* rtp_number - value from RTP packet, from NetEq */ - /* frame length - length of signal frame in ms, from iSAC decoder */ - /* send_ts - value in RTP header giving send time in samples */ - /* arr_ts - value given by timeGetTime() time of arrival in samples of packet from NetEq */ - /* pksize - size of packet in bytes, from NetEq */ - /* Index - integer (range 0...23) indicating bottle neck & jitter as estimated by other side */ - /* returns 0 if everything went fine, -1 otherwise */ - int16_t WebRtcIsac_UpdateBandwidthEstimator( - BwEstimatorstr* bwest_str, - const uint16_t rtp_number, - const int32_t frame_length, - const uint32_t send_ts, - const uint32_t arr_ts, - const size_t pksize); - - /* Update receiving estimates. Used when we only receive BWE index, no iSAC data packet. */ - int16_t WebRtcIsac_UpdateUplinkBwImpl( - BwEstimatorstr* bwest_str, - int16_t Index, - enum IsacSamplingRate encoderSamplingFreq); - - /* Returns the bandwidth/jitter estimation code (integer 0...23) to put in the sending iSAC payload */ - void WebRtcIsac_GetDownlinkBwJitIndexImpl( - BwEstimatorstr* bwest_str, - int16_t* bottleneckIndex, - int16_t* jitterInfo, - enum IsacSamplingRate decoderSamplingFreq); - - /* Returns the bandwidth estimation (in bps) */ - int32_t WebRtcIsac_GetDownlinkBandwidth( - const BwEstimatorstr *bwest_str); - - /* Returns the max delay (in ms) */ - int32_t WebRtcIsac_GetDownlinkMaxDelay( - const BwEstimatorstr *bwest_str); - - /* Returns the bandwidth that iSAC should send with in bps */ - int32_t WebRtcIsac_GetUplinkBandwidth(const BwEstimatorstr* bwest_str); - - /* Returns the max delay value from the other side in ms */ - int32_t WebRtcIsac_GetUplinkMaxDelay( - const BwEstimatorstr *bwest_str); - - /* Fills in an IsacExternalBandwidthInfo struct. */ - void WebRtcIsacBw_GetBandwidthInfo( - BwEstimatorstr* bwest_str, - enum IsacSamplingRate decoder_sample_rate_hz, - IsacBandwidthInfo* bwinfo); - - /* Uses the values from an IsacExternalBandwidthInfo struct. */ - void WebRtcIsacBw_SetBandwidthInfo(BwEstimatorstr* bwest_str, - const IsacBandwidthInfo* bwinfo); - - /* - * update amount of data in bottle neck buffer and burst handling - * returns minimum payload size (bytes) - */ - int WebRtcIsac_GetMinBytes( - RateModel* State, - int StreamSize, /* bytes in bitstream */ - const int FrameLen, /* ms per frame */ - const double BottleNeck, /* bottle neck rate; excl headers (bps) */ - const double DelayBuildUp, /* max delay from bottleneck buffering (ms) */ - enum ISACBandwidth bandwidth - /*,int16_t frequentLargePackets*/); - - /* - * update long-term average bitrate and amount of data in buffer - */ - void WebRtcIsac_UpdateRateModel( - RateModel* State, - int StreamSize, /* bytes in bitstream */ - const int FrameSamples, /* samples per frame */ - const double BottleNeck); /* bottle neck rate; excl headers (bps) */ - - - void WebRtcIsac_InitRateModel( - RateModel *State); - - /* Returns the new framelength value (input argument: bottle_neck) */ - int WebRtcIsac_GetNewFrameLength( - double bottle_neck, - int current_framelength); - - /* Returns the new SNR value (input argument: bottle_neck) */ - double WebRtcIsac_GetSnr( - double bottle_neck, - int new_framelength); - - - int16_t WebRtcIsac_UpdateUplinkJitter( - BwEstimatorstr* bwest_str, - int32_t index); - -#if defined(__cplusplus) -} -#endif - - -#endif /* WEBRTC_MODULES_AUDIO_CODING_CODECS_ISAC_MAIN_SOURCE_BANDWIDTH_ESTIMATOR_H_ */ diff --git a/WebRtc.NET/include/webrtc/modules/audio_coding/codecs/isac/main/source/codec.h b/WebRtc.NET/include/webrtc/modules/audio_coding/codecs/isac/main/source/codec.h deleted file mode 100644 index 7ef64b55..00000000 --- a/WebRtc.NET/include/webrtc/modules/audio_coding/codecs/isac/main/source/codec.h +++ /dev/null @@ -1,233 +0,0 @@ -/* - * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -/* - * codec.h - * - * This header file contains the calls to the internal encoder - * and decoder functions. - * - */ - -#ifndef WEBRTC_MODULES_AUDIO_CODING_CODECS_ISAC_MAIN_SOURCE_CODEC_H_ -#define WEBRTC_MODULES_AUDIO_CODING_CODECS_ISAC_MAIN_SOURCE_CODEC_H_ - -#include "structs.h" - - -void WebRtcIsac_ResetBitstream(Bitstr* bit_stream); - -int WebRtcIsac_EstimateBandwidth(BwEstimatorstr* bwest_str, Bitstr* streamdata, - size_t packet_size, - uint16_t rtp_seq_number, - uint32_t send_ts, uint32_t arr_ts, - enum IsacSamplingRate encoderSampRate, - enum IsacSamplingRate decoderSampRate); - -int WebRtcIsac_DecodeLb(const TransformTables* transform_tables, - float* signal_out, - ISACLBDecStruct* ISACdec_obj, - int16_t* current_framesamples, - int16_t isRCUPayload); - -int WebRtcIsac_DecodeRcuLb(float* signal_out, ISACLBDecStruct* ISACdec_obj, - int16_t* current_framesamples); - -int WebRtcIsac_EncodeLb(const TransformTables* transform_tables, - float* in, - ISACLBEncStruct* ISACencLB_obj, - int16_t codingMode, - int16_t bottleneckIndex); - -int WebRtcIsac_EncodeStoredDataLb(const IsacSaveEncoderData* ISACSavedEnc_obj, - Bitstr* ISACBitStr_obj, int BWnumber, - float scale); - -int WebRtcIsac_EncodeStoredDataUb( - const ISACUBSaveEncDataStruct* ISACSavedEnc_obj, Bitstr* bitStream, - int32_t jitterInfo, float scale, enum ISACBandwidth bandwidth); - -int16_t WebRtcIsac_GetRedPayloadUb( - const ISACUBSaveEncDataStruct* ISACSavedEncObj, Bitstr* bitStreamObj, - enum ISACBandwidth bandwidth); - -/****************************************************************************** - * WebRtcIsac_RateAllocation() - * Internal function to perform a rate-allocation for upper and lower-band, - * given a total rate. - * - * Input: - * - inRateBitPerSec : a total bit-rate in bits/sec. - * - * Output: - * - rateLBBitPerSec : a bit-rate allocated to the lower-band - * in bits/sec. - * - rateUBBitPerSec : a bit-rate allocated to the upper-band - * in bits/sec. - * - * Return value : 0 if rate allocation has been successful. - * -1 if failed to allocate rates. - */ - -int16_t WebRtcIsac_RateAllocation(int32_t inRateBitPerSec, - double* rateLBBitPerSec, - double* rateUBBitPerSec, - enum ISACBandwidth* bandwidthKHz); - - -/****************************************************************************** - * WebRtcIsac_DecodeUb16() - * - * Decode the upper-band if the codec is in 0-16 kHz mode. - * - * Input/Output: - * -ISACdec_obj : pointer to the upper-band decoder object. The - * bit-stream is stored inside the decoder object. - * - * Output: - * -signal_out : decoded audio, 480 samples 30 ms. - * - * Return value : >0 number of decoded bytes. - * <0 if an error occurred. - */ -int WebRtcIsac_DecodeUb16(const TransformTables* transform_tables, - float* signal_out, - ISACUBDecStruct* ISACdec_obj, - int16_t isRCUPayload); - -/****************************************************************************** - * WebRtcIsac_DecodeUb12() - * - * Decode the upper-band if the codec is in 0-12 kHz mode. - * - * Input/Output: - * -ISACdec_obj : pointer to the upper-band decoder object. The - * bit-stream is stored inside the decoder object. - * - * Output: - * -signal_out : decoded audio, 480 samples 30 ms. - * - * Return value : >0 number of decoded bytes. - * <0 if an error occurred. - */ -int WebRtcIsac_DecodeUb12(const TransformTables* transform_tables, - float* signal_out, - ISACUBDecStruct* ISACdec_obj, - int16_t isRCUPayload); - -/****************************************************************************** - * WebRtcIsac_EncodeUb16() - * - * Encode the upper-band if the codec is in 0-16 kHz mode. - * - * Input: - * -in : upper-band audio, 160 samples (10 ms). - * - * Input/Output: - * -ISACdec_obj : pointer to the upper-band encoder object. The - * bit-stream is stored inside the encoder object. - * - * Return value : >0 number of encoded bytes. - * <0 if an error occurred. - */ -int WebRtcIsac_EncodeUb16(const TransformTables* transform_tables, - float* in, - ISACUBEncStruct* ISACenc_obj, - int32_t jitterInfo); - -/****************************************************************************** - * WebRtcIsac_EncodeUb12() - * - * Encode the upper-band if the codec is in 0-12 kHz mode. - * - * Input: - * -in : upper-band audio, 160 samples (10 ms). - * - * Input/Output: - * -ISACdec_obj : pointer to the upper-band encoder object. The - * bit-stream is stored inside the encoder object. - * - * Return value : >0 number of encoded bytes. - * <0 if an error occurred. - */ -int WebRtcIsac_EncodeUb12(const TransformTables* transform_tables, - float* in, - ISACUBEncStruct* ISACenc_obj, - int32_t jitterInfo); - -/************************** initialization functions *************************/ - -void WebRtcIsac_InitMasking(MaskFiltstr* maskdata); - -void WebRtcIsac_InitPreFilterbank(PreFiltBankstr* prefiltdata); - -void WebRtcIsac_InitPostFilterbank(PostFiltBankstr* postfiltdata); - -void WebRtcIsac_InitPitchFilter(PitchFiltstr* pitchfiltdata); - -void WebRtcIsac_InitPitchAnalysis(PitchAnalysisStruct* State); - - -/**************************** transform functions ****************************/ - -void WebRtcIsac_InitTransform(TransformTables* tables); - -void WebRtcIsac_Time2Spec(const TransformTables* tables, - double* inre1, - double* inre2, - int16_t* outre, - int16_t* outim, - FFTstr* fftstr_obj); - -void WebRtcIsac_Spec2time(const TransformTables* tables, - double* inre, - double* inim, - double* outre1, - double* outre2, - FFTstr* fftstr_obj); - -/******************************* filter functions ****************************/ - -void WebRtcIsac_AllPoleFilter(double* InOut, double* Coef, size_t lengthInOut, - int orderCoef); - -void WebRtcIsac_AllZeroFilter(double* In, double* Coef, size_t lengthInOut, - int orderCoef, double* Out); - -void WebRtcIsac_ZeroPoleFilter(double* In, double* ZeroCoef, double* PoleCoef, - size_t lengthInOut, int orderCoef, double* Out); - - -/***************************** filterbank functions **************************/ - -void WebRtcIsac_SplitAndFilterFloat(float* in, float* LP, float* HP, - double* LP_la, double* HP_la, - PreFiltBankstr* prefiltdata); - - -void WebRtcIsac_FilterAndCombineFloat(float* InLP, float* InHP, float* Out, - PostFiltBankstr* postfiltdata); - - -/************************* normalized lattice filters ************************/ - -void WebRtcIsac_NormLatticeFilterMa(int orderCoef, float* stateF, float* stateG, - float* lat_in, double* filtcoeflo, - double* lat_out); - -void WebRtcIsac_NormLatticeFilterAr(int orderCoef, float* stateF, float* stateG, - double* lat_in, double* lo_filt_coef, - float* lat_out); - -void WebRtcIsac_Dir2Lat(double* a, int orderCoef, float* sth, float* cth); - -void WebRtcIsac_AutoCorr(double* r, const double* x, size_t N, size_t order); - -#endif /* WEBRTC_MODULES_AUDIO_CODING_CODECS_ISAC_MAIN_SOURCE_CODEC_H_ */ diff --git a/WebRtc.NET/include/webrtc/modules/audio_coding/codecs/isac/main/source/crc.h b/WebRtc.NET/include/webrtc/modules/audio_coding/codecs/isac/main/source/crc.h deleted file mode 100644 index 09583dfc..00000000 --- a/WebRtc.NET/include/webrtc/modules/audio_coding/codecs/isac/main/source/crc.h +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -/* - * crc.h - * - * Checksum functions - * - */ - -#ifndef WEBRTC_MODULES_AUDIO_CODING_CODECS_ISAC_MAIN_SOURCE_CRC_H_ -#define WEBRTC_MODULES_AUDIO_CODING_CODECS_ISAC_MAIN_SOURCE_CRC_H_ - -#include "webrtc/typedefs.h" - -/**************************************************************************** - * WebRtcIsac_GetCrc(...) - * - * This function returns a 32 bit CRC checksum of a bit stream - * - * Input: - * - encoded : payload bit stream - * - no_of_word8s : number of 8-bit words in the bit stream - * - * Output: - * - crc : checksum - * - * Return value : 0 - Ok - * -1 - Error - */ - -int WebRtcIsac_GetCrc( - const int16_t* encoded, - int no_of_word8s, - uint32_t* crc); - - - -#endif /* WEBRTC_MODULES_AUDIO_CODING_CODECS_ISAC_MAIN_SOURCE_CRC_H_ */ diff --git a/WebRtc.NET/include/webrtc/modules/audio_coding/codecs/isac/main/source/entropy_coding.h b/WebRtc.NET/include/webrtc/modules/audio_coding/codecs/isac/main/source/entropy_coding.h deleted file mode 100644 index d715d864..00000000 --- a/WebRtc.NET/include/webrtc/modules/audio_coding/codecs/isac/main/source/entropy_coding.h +++ /dev/null @@ -1,343 +0,0 @@ -/* - * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -/* - * entropy_coding.h - * - * This header file declares all of the functions used to arithmetically - * encode the iSAC bistream - * - */ - -#ifndef WEBRTC_MODULES_AUDIO_CODING_CODECS_ISAC_MAIN_SOURCE_ENTROPY_CODING_H_ -#define WEBRTC_MODULES_AUDIO_CODING_CODECS_ISAC_MAIN_SOURCE_ENTROPY_CODING_H_ - -#include "settings.h" -#include "structs.h" - -/****************************************************************************** - * WebRtcIsac_DecodeSpec() - * Decode real and imaginary part of the DFT coefficients, given a bit-stream. - * The decoded DFT coefficient can be transformed to time domain by - * WebRtcIsac_Time2Spec(). - * - * Input: - * - streamdata : pointer to a stucture containg the encoded - * data and theparameters needed for entropy - * coding. - * - AvgPitchGain_Q12 : average pitch-gain of the frame. This is only - * relevant for 0-4 kHz band, and the input value is - * not used in other bands. - * - band : specifies which band's DFT should be decoded. - * - * Output: - * - *fr : pointer to a buffer where the real part of DFT - * coefficients are written to. - * - *fi : pointer to a buffer where the imaginary part - * of DFT coefficients are written to. - * - * Return value : < 0 if an error occures - * 0 if succeeded. - */ -int WebRtcIsac_DecodeSpec(Bitstr* streamdata, int16_t AvgPitchGain_Q12, - enum ISACBand band, double* fr, double* fi); - -/****************************************************************************** - * WebRtcIsac_EncodeSpec() - * Encode real and imaginary part of the DFT coefficients into the given - * bit-stream. - * - * Input: - * - *fr : pointer to a buffer where the real part of DFT - * coefficients are written to. - * - *fi : pointer to a buffer where the imaginary part - * of DFT coefficients are written to. - * - AvgPitchGain_Q12 : average pitch-gain of the frame. This is only - * relevant for 0-4 kHz band, and the input value is - * not used in other bands. - * - band : specifies which band's DFT should be decoded. - * - * Output: - * - streamdata : pointer to a stucture containg the encoded - * data and theparameters needed for entropy - * coding. - * - * Return value : < 0 if an error occures - * 0 if succeeded. - */ -int WebRtcIsac_EncodeSpec(const int16_t* fr, const int16_t* fi, - int16_t AvgPitchGain_Q12, enum ISACBand band, - Bitstr* streamdata); - -/* decode & dequantize LPC Coef */ -int WebRtcIsac_DecodeLpcCoef(Bitstr* streamdata, double* LPCCoef); -int WebRtcIsac_DecodeLpcCoefUB(Bitstr* streamdata, double* lpcVecs, - double* percepFilterGains, - int16_t bandwidth); - -int WebRtcIsac_DecodeLpc(Bitstr* streamdata, double* LPCCoef_lo, - double* LPCCoef_hi); - -/* quantize & code LPC Coef */ -void WebRtcIsac_EncodeLpcLb(double* LPCCoef_lo, double* LPCCoef_hi, - Bitstr* streamdata, IsacSaveEncoderData* encData); - -void WebRtcIsac_EncodeLpcGainLb(double* LPCCoef_lo, double* LPCCoef_hi, - Bitstr* streamdata, - IsacSaveEncoderData* encData); - -/****************************************************************************** - * WebRtcIsac_EncodeLpcUB() - * Encode LPC parameters, given as A-polynomial, of upper-band. The encoding - * is performed in LAR domain. - * For the upper-band, we compute and encode LPC of some sub-frames, LPC of - * other sub-frames are computed by linear interpolation, in LAR domain. This - * function performs the interpolation and returns the LPC of all sub-frames. - * - * Inputs: - * - lpcCoef : a buffer containing A-polynomials of sub-frames - * (excluding first coefficient that is 1). - * - bandwidth : specifies if the codec is operating at 0-12 kHz - * or 0-16 kHz mode. - * - * Input/output: - * - streamdata : pointer to a structure containing the encoded - * data and the parameters needed for entropy - * coding. - * - * Output: - * - interpolLPCCoeff : Decoded and interpolated LPC (A-polynomial) - * of all sub-frames. - * If LP analysis is of order K, and there are N - * sub-frames then this is a buffer of size - * (k + 1) * N, each vector starts with the LPC gain - * of the corresponding sub-frame. The LPC gains - * are encoded and inserted after this function is - * called. The first A-coefficient which is 1 is not - * included. - * - * Return value : 0 if encoding is successful, - * <0 if failed to encode. - */ -int16_t WebRtcIsac_EncodeLpcUB(double* lpcCoeff, Bitstr* streamdata, - double* interpolLPCCoeff, - int16_t bandwidth, - ISACUBSaveEncDataStruct* encData); - -/****************************************************************************** - * WebRtcIsac_DecodeInterpolLpcUb() - * Decode LPC coefficients and interpolate to get the coefficients fo all - * sub-frmaes. - * - * Inputs: - * - bandwidth : spepecifies if the codec is in 0-12 kHz or - * 0-16 kHz mode. - * - * Input/output: - * - streamdata : pointer to a stucture containg the encoded - * data and theparameters needed for entropy - * coding. - * - * Output: - * - percepFilterParam : Decoded and interpolated LPC (A-polynomial) of - * all sub-frames. - * If LP analysis is of order K, and there are N - * sub-frames then this is a buffer of size - * (k + 1) * N, each vector starts with the LPC gain - * of the corresponding sub-frame. The LPC gains - * are encoded and inserted after this function is - * called. The first A-coefficient which is 1 is not - * included. - * - * Return value : 0 if encoding is successful, - * <0 if failed to encode. - */ -int16_t WebRtcIsac_DecodeInterpolLpcUb(Bitstr* streamdata, - double* percepFilterParam, - int16_t bandwidth); - -/* Decode & dequantize RC */ -int WebRtcIsac_DecodeRc(Bitstr* streamdata, int16_t* RCQ15); - -/* Quantize & code RC */ -void WebRtcIsac_EncodeRc(int16_t* RCQ15, Bitstr* streamdata); - -/* Decode & dequantize squared Gain */ -int WebRtcIsac_DecodeGain2(Bitstr* streamdata, int32_t* Gain2); - -/* Quantize & code squared Gain (input is squared gain) */ -int WebRtcIsac_EncodeGain2(int32_t* gain2, Bitstr* streamdata); - -void WebRtcIsac_EncodePitchGain(int16_t* PitchGains_Q12, - Bitstr* streamdata, - IsacSaveEncoderData* encData); - -void WebRtcIsac_EncodePitchLag(double* PitchLags, - int16_t* PitchGain_Q12, - Bitstr* streamdata, - IsacSaveEncoderData* encData); - -int WebRtcIsac_DecodePitchGain(Bitstr* streamdata, - int16_t* PitchGain_Q12); -int WebRtcIsac_DecodePitchLag(Bitstr* streamdata, int16_t* PitchGain_Q12, - double* PitchLag); - -int WebRtcIsac_DecodeFrameLen(Bitstr* streamdata, int16_t* framelength); -int WebRtcIsac_EncodeFrameLen(int16_t framelength, Bitstr* streamdata); -int WebRtcIsac_DecodeSendBW(Bitstr* streamdata, int16_t* BWno); -void WebRtcIsac_EncodeReceiveBw(int* BWno, Bitstr* streamdata); - -/* Step-down */ -void WebRtcIsac_Poly2Rc(double* a, int N, double* RC); - -/* Step-up */ -void WebRtcIsac_Rc2Poly(double* RC, int N, double* a); - -void WebRtcIsac_TranscodeLPCCoef(double* LPCCoef_lo, double* LPCCoef_hi, - int* index_g); - - -/****************************************************************************** - * WebRtcIsac_EncodeLpcGainUb() - * Encode LPC gains of sub-Frames. - * - * Input/outputs: - * - lpGains : a buffer which contains 'SUBFRAME' number of - * LP gains to be encoded. The input values are - * overwritten by the quantized values. - * - streamdata : pointer to a stucture containg the encoded - * data and theparameters needed for entropy - * coding. - * - * Output: - * - lpcGainIndex : quantization indices for lpc gains, these will - * be stored to be used for FEC. - */ -void WebRtcIsac_EncodeLpcGainUb(double* lpGains, Bitstr* streamdata, - int* lpcGainIndex); - - -/****************************************************************************** - * WebRtcIsac_EncodeLpcGainUb() - * Store LPC gains of sub-Frames in 'streamdata'. - * - * Input: - * - lpGains : a buffer which contains 'SUBFRAME' number of - * LP gains to be encoded. - * Input/outputs: - * - streamdata : pointer to a stucture containg the encoded - * data and theparameters needed for entropy - * coding. - * - */ -void WebRtcIsac_StoreLpcGainUb(double* lpGains, Bitstr* streamdata); - - -/****************************************************************************** - * WebRtcIsac_DecodeLpcGainUb() - * Decode the LPC gain of sub-frames. - * - * Input/output: - * - streamdata : pointer to a stucture containg the encoded - * data and theparameters needed for entropy - * coding. - * - * Output: - * - lpGains : a buffer where decoded LPC gians will be stored. - * - * Return value : 0 if succeeded. - * <0 if failed. - */ -int16_t WebRtcIsac_DecodeLpcGainUb(double* lpGains, Bitstr* streamdata); - - -/****************************************************************************** - * WebRtcIsac_EncodeBandwidth() - * Encode if the bandwidth of encoded audio is 0-12 kHz or 0-16 kHz. - * - * Input: - * - bandwidth : an enumerator specifying if the codec in is - * 0-12 kHz or 0-16 kHz mode. - * - * Input/output: - * - streamdata : pointer to a stucture containg the encoded - * data and theparameters needed for entropy - * coding. - * - * Return value : 0 if succeeded. - * <0 if failed. - */ -int16_t WebRtcIsac_EncodeBandwidth(enum ISACBandwidth bandwidth, - Bitstr* streamData); - - -/****************************************************************************** - * WebRtcIsac_DecodeBandwidth() - * Decode the bandwidth of the encoded audio, i.e. if the bandwidth is 0-12 kHz - * or 0-16 kHz. - * - * Input/output: - * - streamdata : pointer to a stucture containg the encoded - * data and theparameters needed for entropy - * coding. - * - * Output: - * - bandwidth : an enumerator specifying if the codec is in - * 0-12 kHz or 0-16 kHz mode. - * - * Return value : 0 if succeeded. - * <0 if failed. - */ -int16_t WebRtcIsac_DecodeBandwidth(Bitstr* streamData, - enum ISACBandwidth* bandwidth); - - -/****************************************************************************** - * WebRtcIsac_EncodeJitterInfo() - * Decode the jitter information. - * - * Input/output: - * - streamdata : pointer to a stucture containg the encoded - * data and theparameters needed for entropy - * coding. - * - * Input: - * - jitterInfo : one bit of info specifying if the channel is - * in high/low jitter. Zero indicates low jitter - * and one indicates high jitter. - * - * Return value : 0 if succeeded. - * <0 if failed. - */ -int16_t WebRtcIsac_EncodeJitterInfo(int32_t jitterIndex, - Bitstr* streamData); - - -/****************************************************************************** - * WebRtcIsac_DecodeJitterInfo() - * Decode the jitter information. - * - * Input/output: - * - streamdata : pointer to a stucture containg the encoded - * data and theparameters needed for entropy - * coding. - * - * Output: - * - jitterInfo : one bit of info specifying if the channel is - * in high/low jitter. Zero indicates low jitter - * and one indicates high jitter. - * - * Return value : 0 if succeeded. - * <0 if failed. - */ -int16_t WebRtcIsac_DecodeJitterInfo(Bitstr* streamData, - int32_t* jitterInfo); - -#endif /* WEBRTC_MODULES_AUDIO_CODING_CODECS_ISAC_MAIN_SOURCE_ENTROPY_CODING_H_ */ diff --git a/WebRtc.NET/include/webrtc/modules/audio_coding/codecs/isac/main/source/fft.h b/WebRtc.NET/include/webrtc/modules/audio_coding/codecs/isac/main/source/fft.h deleted file mode 100644 index a42f57bc..00000000 --- a/WebRtc.NET/include/webrtc/modules/audio_coding/codecs/isac/main/source/fft.h +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -/*--------------------------------*-C-*---------------------------------* - * File: - * fftn.h - * ---------------------------------------------------------------------* - * Re[]: real value array - * Im[]: imaginary value array - * nTotal: total number of complex values - * nPass: number of elements involved in this pass of transform - * nSpan: nspan/nPass = number of bytes to increment pointer - * in Re[] and Im[] - * isign: exponent: +1 = forward -1 = reverse - * scaling: normalizing constant by which the final result is *divided* - * scaling == -1, normalize by total dimension of the transform - * scaling < -1, normalize by the square-root of the total dimension - * - * ---------------------------------------------------------------------- - * See the comments in the code for correct usage! - */ - -#ifndef WEBRTC_MODULES_AUDIO_CODING_CODECS_ISAC_MAIN_SOURCE_FFT_H_ -#define WEBRTC_MODULES_AUDIO_CODING_CODECS_ISAC_MAIN_SOURCE_FFT_H_ - - -#include "structs.h" - - -/* double precision routine */ - - -int WebRtcIsac_Fftns (unsigned int ndim, const int dims[], double Re[], double Im[], - int isign, double scaling, FFTstr *fftstate); - - - -#endif /* WEBRTC_MODULES_AUDIO_CODING_CODECS_ISAC_MAIN_SOURCE_FFT_H_ */ diff --git a/WebRtc.NET/include/webrtc/modules/audio_coding/codecs/isac/main/source/filterbank_tables.h b/WebRtc.NET/include/webrtc/modules/audio_coding/codecs/isac/main/source/filterbank_tables.h deleted file mode 100644 index e8fda5e5..00000000 --- a/WebRtc.NET/include/webrtc/modules/audio_coding/codecs/isac/main/source/filterbank_tables.h +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -/* - * filterbank_tables.h - * - * Header file for variables that are defined in - * filterbank_tables.c. - * - */ - -#ifndef WEBRTC_MODULES_AUDIO_CODING_CODECS_ISAC_MAIN_SOURCE_FILTERBANK_TABLES_H_ -#define WEBRTC_MODULES_AUDIO_CODING_CODECS_ISAC_MAIN_SOURCE_FILTERBANK_TABLES_H_ - -#include "structs.h" - -/********************* Coefficient Tables ************************/ -/* The number of composite all-pass filter factors */ -#define NUMBEROFCOMPOSITEAPSECTIONS 4 - -/* The number of all-pass filter factors in an upper or lower channel*/ -#define NUMBEROFCHANNELAPSECTIONS 2 - -/* The composite all-pass filter factors */ -extern const float WebRtcIsac_kCompositeApFactorsFloat[4]; - -/* The upper channel all-pass filter factors */ -extern const float WebRtcIsac_kUpperApFactorsFloat[2]; - -/* The lower channel all-pass filter factors */ -extern const float WebRtcIsac_kLowerApFactorsFloat[2]; - -/* The matrix for transforming the backward composite state to upper channel state */ -extern const float WebRtcIsac_kTransform1Float[8]; - -/* The matrix for transforming the backward composite state to lower channel state */ -extern const float WebRtcIsac_kTransform2Float[8]; - -#endif /* WEBRTC_MODULES_AUDIO_CODING_CODECS_ISAC_MAIN_SOURCE_FILTERBANK_TABLES_H_ */ diff --git a/WebRtc.NET/include/webrtc/modules/audio_coding/codecs/isac/main/source/lpc_analysis.h b/WebRtc.NET/include/webrtc/modules/audio_coding/codecs/isac/main/source/lpc_analysis.h deleted file mode 100644 index 8dfe3838..00000000 --- a/WebRtc.NET/include/webrtc/modules/audio_coding/codecs/isac/main/source/lpc_analysis.h +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -/* - * lpc_analysis.h - * - * LPC functions - * - */ - -#ifndef WEBRTC_MODULES_AUDIO_CODING_CODECS_ISAC_MAIN_SOURCE_LPC_ANALYSIS_H_ -#define WEBRTC_MODULES_AUDIO_CODING_CODECS_ISAC_MAIN_SOURCE_LPC_ANALYSIS_H_ - -#include "settings.h" -#include "structs.h" - -double WebRtcIsac_LevDurb(double *a, double *k, double *r, size_t order); - -void WebRtcIsac_GetVars(const double *input, const int16_t *pitchGains_Q12, - double *oldEnergy, double *varscale); - -void WebRtcIsac_GetLpcCoefLb(double *inLo, double *inHi, MaskFiltstr *maskdata, - double signal_noise_ratio, const int16_t *pitchGains_Q12, - double *lo_coeff, double *hi_coeff); - - -void WebRtcIsac_GetLpcGain( - double signal_noise_ratio, - const double* filtCoeffVecs, - int numVecs, - double* gain, - double corrLo[][UB_LPC_ORDER + 1], - const double* varscale); - -void WebRtcIsac_GetLpcCoefUb( - double* inSignal, - MaskFiltstr* maskdata, - double* lpCoeff, - double corr[][UB_LPC_ORDER + 1], - double* varscale, - int16_t bandwidth); - -#endif /* WEBRTC_MODULES_AUDIO_CODING_CODECS_ISAC_MAIN_SOURCE_LPC_ANALYIS_H_ */ diff --git a/WebRtc.NET/include/webrtc/modules/audio_coding/codecs/isac/main/source/lpc_shape_swb12_tables.h b/WebRtc.NET/include/webrtc/modules/audio_coding/codecs/isac/main/source/lpc_shape_swb12_tables.h deleted file mode 100644 index 256f1d4a..00000000 --- a/WebRtc.NET/include/webrtc/modules/audio_coding/codecs/isac/main/source/lpc_shape_swb12_tables.h +++ /dev/null @@ -1,65 +0,0 @@ -/* - * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -/* - * lpc_shape_swb12_tables.h - * - * This file declares tables used for entropy coding of LPC shape of - * upper-band signal if the bandwidth is 12 kHz. - * - */ - -#ifndef WEBRTC_MODULES_AUDIO_CODING_CODECS_ISAC_MAIN_SOURCE_LPC_SHAPE_SWB12_TABLES_H_ -#define WEBRTC_MODULES_AUDIO_CODING_CODECS_ISAC_MAIN_SOURCE_LPC_SHAPE_SWB12_TABLES_H_ - -#include "settings.h" -#include "webrtc/typedefs.h" - -extern const double WebRtcIsac_kMeanLarUb12[UB_LPC_ORDER]; - -extern const double WebRtcIsac_kMeanLpcGain; - -extern const double WebRtcIsac_kIntraVecDecorrMatUb12[UB_LPC_ORDER][UB_LPC_ORDER]; - -extern const double WebRtcIsac_kInterVecDecorrMatUb12 -[UB_LPC_VEC_PER_FRAME][UB_LPC_VEC_PER_FRAME]; - -extern const double WebRtcIsac_kLpcShapeQStepSizeUb12; - -extern const double WebRtcIsac_kLpcShapeLeftRecPointUb12 -[UB_LPC_ORDER*UB_LPC_VEC_PER_FRAME]; - - -extern const int16_t WebRtcIsac_kLpcShapeNumRecPointUb12 -[UB_LPC_ORDER * UB_LPC_VEC_PER_FRAME]; - -extern const uint16_t WebRtcIsac_kLpcShapeEntropySearchUb12 -[UB_LPC_ORDER * UB_LPC_VEC_PER_FRAME]; - -extern const uint16_t WebRtcIsac_kLpcShapeCdfVec0Ub12[14]; - -extern const uint16_t WebRtcIsac_kLpcShapeCdfVec1Ub12[16]; - -extern const uint16_t WebRtcIsac_kLpcShapeCdfVec2Ub12[20]; - -extern const uint16_t WebRtcIsac_kLpcShapeCdfVec3Ub12[28]; - -extern const uint16_t WebRtcIsac_kLpcShapeCdfVec4Ub12[20]; - -extern const uint16_t WebRtcIsac_kLpcShapeCdfVec5Ub12[25]; - -extern const uint16_t WebRtcIsac_kLpcShapeCdfVec6Ub12[33]; - -extern const uint16_t WebRtcIsac_kLpcShapeCdfVec7Ub12[49]; - -extern const uint16_t* WebRtcIsac_kLpcShapeCdfMatUb12 -[UB_LPC_ORDER * UB_LPC_VEC_PER_FRAME]; - -#endif // WEBRTC_MODULES_AUDIO_CODING_CODECS_ISAC_MAIN_SOURCE_LPC_SHAPE_SWB12_TABLES_H_ diff --git a/WebRtc.NET/include/webrtc/modules/audio_coding/codecs/isac/main/source/lpc_shape_swb16_tables.h b/WebRtc.NET/include/webrtc/modules/audio_coding/codecs/isac/main/source/lpc_shape_swb16_tables.h deleted file mode 100644 index 3e1bdf71..00000000 --- a/WebRtc.NET/include/webrtc/modules/audio_coding/codecs/isac/main/source/lpc_shape_swb16_tables.h +++ /dev/null @@ -1,78 +0,0 @@ -/* - * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -/* - * lpc_shape_swb16_tables.h - * - * This file declares tables used for entropy coding of LPC shape of - * upper-band signal if the bandwidth is 16 kHz. - * - */ - -#ifndef WEBRTC_MODULES_AUDIO_CODING_CODECS_ISAC_MAIN_SOURCE_LPC_SHAPE_SWB16_TABLES_H_ -#define WEBRTC_MODULES_AUDIO_CODING_CODECS_ISAC_MAIN_SOURCE_LPC_SHAPE_SWB16_TABLES_H_ - -#include "settings.h" -#include "webrtc/typedefs.h" - -extern const double WebRtcIsac_kMeanLarUb16[UB_LPC_ORDER]; - -extern const double WebRtcIsac_kIintraVecDecorrMatUb16[UB_LPC_ORDER][UB_LPC_ORDER]; - -extern const double WebRtcIsac_kInterVecDecorrMatUb16 -[UB16_LPC_VEC_PER_FRAME][UB16_LPC_VEC_PER_FRAME]; - -extern const uint16_t WebRtcIsac_kLpcShapeCdfVec01Ub16[14]; - -extern const uint16_t WebRtcIsac_kLpcShapeCdfVec1Ub16[16]; - -extern const uint16_t WebRtcIsac_kLpcShapeCdfVec2Ub16[18]; - -extern const uint16_t WebRtcIsac_kLpcShapeCdfVec3Ub16[30]; - -extern const uint16_t WebRtcIsac_kLpcShapeCdfVec4Ub16[16]; - -extern const uint16_t WebRtcIsac_kLpcShapeCdfVec5Ub16[17]; - -extern const uint16_t WebRtcIsac_kLpcShapeCdfVec6Ub16[21]; - -extern const uint16_t WebRtcIsac_kLpcShapeCdfVec7Ub16[36]; - -extern const uint16_t WebRtcIsac_kLpcShapeCdfVec8Ub16[21]; - -extern const uint16_t WebRtcIsac_kLpcShapeCdfVec01Ub160[21]; - -extern const uint16_t WebRtcIsac_kLpcShapeCdfVec01Ub161[28]; - -extern const uint16_t WebRtcIsac_kLpcShapeCdfVec01Ub162[55]; - -extern const uint16_t WebRtcIsac_kLpcShapeCdfVec01Ub163[26]; - -extern const uint16_t WebRtcIsac_kLpcShapeCdfVec01Ub164[28]; - -extern const uint16_t WebRtcIsac_kLpcShapeCdfVec01Ub165[34]; - -extern const uint16_t WebRtcIsac_kLpcShapeCdfVec01Ub166[71]; - -extern const uint16_t* WebRtcIsac_kLpcShapeCdfMatUb16 -[UB_LPC_ORDER * UB16_LPC_VEC_PER_FRAME]; - -extern const double WebRtcIsac_kLpcShapeLeftRecPointUb16 -[UB_LPC_ORDER * UB16_LPC_VEC_PER_FRAME]; - -extern const int16_t WebRtcIsac_kLpcShapeNumRecPointUb16 -[UB_LPC_ORDER * UB16_LPC_VEC_PER_FRAME]; - -extern const uint16_t WebRtcIsac_kLpcShapeEntropySearchUb16 -[UB_LPC_ORDER * UB16_LPC_VEC_PER_FRAME]; - -extern const double WebRtcIsac_kLpcShapeQStepSizeUb16; - -#endif // WEBRTC_MODULES_AUDIO_CODING_CODECS_ISAC_MAIN_SOURCE_LPC_SHAPE_SWB16_TABLES_H_ diff --git a/WebRtc.NET/include/webrtc/modules/audio_coding/codecs/isac/main/source/lpc_tables.h b/WebRtc.NET/include/webrtc/modules/audio_coding/codecs/isac/main/source/lpc_tables.h deleted file mode 100644 index 51f63163..00000000 --- a/WebRtc.NET/include/webrtc/modules/audio_coding/codecs/isac/main/source/lpc_tables.h +++ /dev/null @@ -1,100 +0,0 @@ -/* - * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -/* - * lpc_tables.h - * - * header file for coding tables for the LPC coefficients - * - */ - -#ifndef WEBRTC_MODULES_AUDIO_CODING_CODECS_ISAC_MAIN_SOURCE_LPC_TABLES_H_ -#define WEBRTC_MODULES_AUDIO_CODING_CODECS_ISAC_MAIN_SOURCE_LPC_TABLES_H_ - -#include "structs.h" - -#include "settings.h" - -#define KLT_STEPSIZE 1.00000000 -#define KLT_NUM_AVG_GAIN 0 -#define KLT_NUM_AVG_SHAPE 0 -#define KLT_NUM_MODELS 3 -#define LPC_GAIN_SCALE 4.000f -#define LPC_LOBAND_SCALE 2.100f -#define LPC_LOBAND_ORDER ORDERLO -#define LPC_HIBAND_SCALE 0.450f -#define LPC_HIBAND_ORDER ORDERHI -#define LPC_GAIN_ORDER 2 - -#define LPC_SHAPE_ORDER (LPC_LOBAND_ORDER + LPC_HIBAND_ORDER) - -#define KLT_ORDER_GAIN (LPC_GAIN_ORDER * SUBFRAMES) -#define KLT_ORDER_SHAPE (LPC_SHAPE_ORDER * SUBFRAMES) - -/* cdf array for model indicator */ -extern const uint16_t WebRtcIsac_kQKltModelCdf[KLT_NUM_MODELS+1]; - -/* pointer to cdf array for model indicator */ -extern const uint16_t *WebRtcIsac_kQKltModelCdfPtr[1]; - -/* initial cdf index for decoder of model indicator */ -extern const uint16_t WebRtcIsac_kQKltModelInitIndex[1]; - -/* offset to go from rounded value to quantization index */ -extern const short WebRtcIsac_kQKltQuantMinGain[12]; - -extern const short WebRtcIsac_kQKltQuantMinShape[108]; - -/* maximum quantization index */ -extern const uint16_t WebRtcIsac_kQKltMaxIndGain[12]; - -extern const uint16_t WebRtcIsac_kQKltMaxIndShape[108]; - -/* index offset */ -extern const uint16_t WebRtcIsac_kQKltOffsetGain[12]; - -extern const uint16_t WebRtcIsac_kQKltOffsetShape[108]; - -/* initial cdf index for KLT coefficients */ -extern const uint16_t WebRtcIsac_kQKltInitIndexGain[12]; - -extern const uint16_t WebRtcIsac_kQKltInitIndexShape[108]; - -/* quantizer representation levels */ -extern const double WebRtcIsac_kQKltLevelsGain[392]; - -extern const double WebRtcIsac_kQKltLevelsShape[578]; - -/* cdf tables for quantizer indices */ -extern const uint16_t WebRtcIsac_kQKltCdfGain[404]; - -extern const uint16_t WebRtcIsac_kQKltCdfShape[686]; - -/* pointers to cdf tables for quantizer indices */ -extern const uint16_t *WebRtcIsac_kQKltCdfPtrGain[12]; - -extern const uint16_t *WebRtcIsac_kQKltCdfPtrShape[108]; - -/* left KLT transforms */ -extern const double WebRtcIsac_kKltT1Gain[4]; - -extern const double WebRtcIsac_kKltT1Shape[324]; - -/* right KLT transforms */ -extern const double WebRtcIsac_kKltT2Gain[36]; - -extern const double WebRtcIsac_kKltT2Shape[36]; - -/* means of log gains and LAR coefficients */ -extern const double WebRtcIsac_kLpcMeansGain[12]; - -extern const double WebRtcIsac_kLpcMeansShape[108]; - -#endif /* WEBRTC_MODULES_AUDIO_CODING_CODECS_ISAC_MAIN_SOURCE_LPC_TABLES_H_ */ diff --git a/WebRtc.NET/include/webrtc/modules/audio_coding/codecs/isac/main/source/os_specific_inline.h b/WebRtc.NET/include/webrtc/modules/audio_coding/codecs/isac/main/source/os_specific_inline.h deleted file mode 100644 index 2b446e93..00000000 --- a/WebRtc.NET/include/webrtc/modules/audio_coding/codecs/isac/main/source/os_specific_inline.h +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - - -#ifndef WEBRTC_MODULES_AUDIO_CODING_CODECS_ISAC_MAIN_SOURCE_OS_SPECIFIC_INLINE_H_ -#define WEBRTC_MODULES_AUDIO_CODING_CODECS_ISAC_MAIN_SOURCE_OS_SPECIFIC_INLINE_H_ - -#include -#include "webrtc/typedefs.h" - -#if defined(WEBRTC_POSIX) -#define WebRtcIsac_lrint lrint -#elif (defined(WEBRTC_ARCH_X86) && defined(WIN32)) -static __inline long int WebRtcIsac_lrint(double x_dbl) { - long int x_int; - - __asm { - fld x_dbl - fistp x_int - }; - - return x_int; -} -#else // Do a slow but correct implementation of lrint - -static __inline long int WebRtcIsac_lrint(double x_dbl) { - long int x_int; - x_int = (long int)floor(x_dbl + 0.499999999999); - return x_int; -} - -#endif - -#endif // WEBRTC_MODULES_AUDIO_CODING_CODECS_ISAC_MAIN_SOURCE_OS_SPECIFIC_INLINE_H_ diff --git a/WebRtc.NET/include/webrtc/modules/audio_coding/codecs/isac/main/source/pitch_estimator.h b/WebRtc.NET/include/webrtc/modules/audio_coding/codecs/isac/main/source/pitch_estimator.h deleted file mode 100644 index 6fb02b37..00000000 --- a/WebRtc.NET/include/webrtc/modules/audio_coding/codecs/isac/main/source/pitch_estimator.h +++ /dev/null @@ -1,75 +0,0 @@ -/* - * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -/* - * pitch_estimator.h - * - * Pitch functions - * - */ - -#ifndef WEBRTC_MODULES_AUDIO_CODING_CODECS_ISAC_MAIN_SOURCE_PITCH_ESTIMATOR_H_ -#define WEBRTC_MODULES_AUDIO_CODING_CODECS_ISAC_MAIN_SOURCE_PITCH_ESTIMATOR_H_ - -#include "structs.h" - - - -void WebRtcIsac_PitchAnalysis(const double *in, /* PITCH_FRAME_LEN samples */ - double *out, /* PITCH_FRAME_LEN+QLOOKAHEAD samples */ - PitchAnalysisStruct *State, - double *lags, - double *gains); - -void WebRtcIsac_InitializePitch(const double *in, - const double old_lag, - const double old_gain, - PitchAnalysisStruct *State, - double *lags); - -void WebRtcIsac_PitchfilterPre(double *indat, - double *outdat, - PitchFiltstr *pfp, - double *lags, - double *gains); - -void WebRtcIsac_PitchfilterPost(double *indat, - double *outdat, - PitchFiltstr *pfp, - double *lags, - double *gains); - -void WebRtcIsac_PitchfilterPre_la(double *indat, - double *outdat, - PitchFiltstr *pfp, - double *lags, - double *gains); - -void WebRtcIsac_PitchfilterPre_gains(double *indat, - double *outdat, - double out_dG[][PITCH_FRAME_LEN + QLOOKAHEAD], - PitchFiltstr *pfp, - double *lags, - double *gains); - -void WebRtcIsac_WeightingFilter(const double *in, double *weiout, double *whiout, WeightFiltstr *wfdata); - -void WebRtcIsac_Highpass(const double *in, - double *out, - double *state, - size_t N); - -void WebRtcIsac_DecimateAllpass(const double *in, - double *state_in, /* array of size: - * 2*ALLPASSSECTIONS+1 */ - size_t N, /* number of input samples */ - double *out); /* array of size N/2 */ - -#endif /* WEBRTC_MODULES_AUDIO_CODING_CODECS_ISAC_MAIN_SOURCE_PITCH_ESTIMATOR_H_ */ diff --git a/WebRtc.NET/include/webrtc/modules/audio_coding/codecs/isac/main/source/pitch_gain_tables.h b/WebRtc.NET/include/webrtc/modules/audio_coding/codecs/isac/main/source/pitch_gain_tables.h deleted file mode 100644 index 8d708ce6..00000000 --- a/WebRtc.NET/include/webrtc/modules/audio_coding/codecs/isac/main/source/pitch_gain_tables.h +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -/* - * pitch_gain_tables.h - * - * This file contains tables for the pitch filter side-info in the entropy coder. - * - */ - -#ifndef WEBRTC_MODULES_AUDIO_CODING_CODECS_ISAC_MAIN_SOURCE_PITCH_GAIN_TABLES_H_ -#define WEBRTC_MODULES_AUDIO_CODING_CODECS_ISAC_MAIN_SOURCE_PITCH_GAIN_TABLES_H_ - -#include "webrtc/typedefs.h" - -/* header file for coding tables for the pitch filter side-info in the entropy coder */ -/********************* Pitch Filter Gain Coefficient Tables ************************/ -/* cdf for quantized pitch filter gains */ -extern const uint16_t WebRtcIsac_kQPitchGainCdf[255]; - -/* index limits and ranges */ -extern const int16_t WebRtcIsac_kIndexLowerLimitGain[3]; - -extern const int16_t WebRtcIsac_kIndexUpperLimitGain[3]; -extern const uint16_t WebRtcIsac_kIndexMultsGain[2]; - -/* mean values of pitch filter gains */ -//(Y) -extern const int16_t WebRtcIsac_kQMeanGain1Q12[144]; -extern const int16_t WebRtcIsac_kQMeanGain2Q12[144]; -extern const int16_t WebRtcIsac_kQMeanGain3Q12[144]; -extern const int16_t WebRtcIsac_kQMeanGain4Q12[144]; -//(Y) - -/* size of cdf table */ -extern const uint16_t WebRtcIsac_kQCdfTableSizeGain[1]; - -#endif /* WEBRTC_MODULES_AUDIO_CODING_CODECS_ISAC_MAIN_SOURCE_PITCH_GAIN_TABLES_H_ */ diff --git a/WebRtc.NET/include/webrtc/modules/audio_coding/codecs/isac/main/source/pitch_lag_tables.h b/WebRtc.NET/include/webrtc/modules/audio_coding/codecs/isac/main/source/pitch_lag_tables.h deleted file mode 100644 index 01989f01..00000000 --- a/WebRtc.NET/include/webrtc/modules/audio_coding/codecs/isac/main/source/pitch_lag_tables.h +++ /dev/null @@ -1,114 +0,0 @@ -/* - * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -/* - * pitch_lag_tables.h - * - * This file contains tables for the pitch filter side-info in the entropy coder. - * - */ - -#ifndef WEBRTC_MODULES_AUDIO_CODING_CODECS_ISAC_MAIN_SOURCE_PITCH_LAG_TABLES_H_ -#define WEBRTC_MODULES_AUDIO_CODING_CODECS_ISAC_MAIN_SOURCE_PITCH_LAG_TABLES_H_ - -#include "webrtc/typedefs.h" -/* header file for coding tables for the pitch filter side-info in the entropy coder */ -/********************* Pitch Filter Lag Coefficient Tables ************************/ - -/* tables for use with small pitch gain */ - -/* cdfs for quantized pitch lags */ -extern const uint16_t WebRtcIsac_kQPitchLagCdf1Lo[127]; -extern const uint16_t WebRtcIsac_kQPitchLagCdf2Lo[20]; -extern const uint16_t WebRtcIsac_kQPitchLagCdf3Lo[2]; -extern const uint16_t WebRtcIsac_kQPitchLagCdf4Lo[10]; - -extern const uint16_t *WebRtcIsac_kQPitchLagCdfPtrLo[4]; - -/* size of first cdf table */ -extern const uint16_t WebRtcIsac_kQPitchLagCdfSizeLo[1]; - -/* index limits and ranges */ -extern const int16_t WebRtcIsac_kQIndexLowerLimitLagLo[4]; -extern const int16_t WebRtcIsac_kQIndexUpperLimitLagLo[4]; - -/* initial index for arithmetic decoder */ -extern const uint16_t WebRtcIsac_kQInitIndexLagLo[3]; - -/* mean values of pitch filter lags */ -extern const double WebRtcIsac_kQMeanLag2Lo[19]; -extern const double WebRtcIsac_kQMeanLag3Lo[1]; -extern const double WebRtcIsac_kQMeanLag4Lo[9]; - -extern const double WebRtcIsac_kQPitchLagStepsizeLo; - - -/* tables for use with medium pitch gain */ - -/* cdfs for quantized pitch lags */ -extern const uint16_t WebRtcIsac_kQPitchLagCdf1Mid[255]; -extern const uint16_t WebRtcIsac_kQPitchLagCdf2Mid[36]; -extern const uint16_t WebRtcIsac_kQPitchLagCdf3Mid[2]; -extern const uint16_t WebRtcIsac_kQPitchLagCdf4Mid[20]; - -extern const uint16_t *WebRtcIsac_kQPitchLagCdfPtrMid[4]; - -/* size of first cdf table */ -extern const uint16_t WebRtcIsac_kQPitchLagCdfSizeMid[1]; - -/* index limits and ranges */ -extern const int16_t WebRtcIsac_kQIndexLowerLimitLagMid[4]; -extern const int16_t WebRtcIsac_kQIndexUpperLimitLagMid[4]; - -/* initial index for arithmetic decoder */ -extern const uint16_t WebRtcIsac_kQInitIndexLagMid[3]; - -/* mean values of pitch filter lags */ -extern const double WebRtcIsac_kQMeanLag2Mid[35]; -extern const double WebRtcIsac_kQMeanLag3Mid[1]; -extern const double WebRtcIsac_kQMeanLag4Mid[19]; - -extern const double WebRtcIsac_kQPitchLagStepsizeMid; - - -/* tables for use with large pitch gain */ - -/* cdfs for quantized pitch lags */ -extern const uint16_t WebRtcIsac_kQPitchLagCdf1Hi[511]; -extern const uint16_t WebRtcIsac_kQPitchLagCdf2Hi[68]; -extern const uint16_t WebRtcIsac_kQPitchLagCdf3Hi[2]; -extern const uint16_t WebRtcIsac_kQPitchLagCdf4Hi[35]; - -extern const uint16_t *WebRtcIsac_kQPitchLagCdfPtrHi[4]; - -/* size of first cdf table */ -extern const uint16_t WebRtcIsac_kQPitchLagCdfSizeHi[1]; - -/* index limits and ranges */ -extern const int16_t WebRtcIsac_kQindexLowerLimitLagHi[4]; -extern const int16_t WebRtcIsac_kQindexUpperLimitLagHi[4]; - -/* initial index for arithmetic decoder */ -extern const uint16_t WebRtcIsac_kQInitIndexLagHi[3]; - -/* mean values of pitch filter lags */ -extern const double WebRtcIsac_kQMeanLag2Hi[67]; -extern const double WebRtcIsac_kQMeanLag3Hi[1]; -extern const double WebRtcIsac_kQMeanLag4Hi[34]; - -extern const double WebRtcIsac_kQPitchLagStepsizeHi; - -/* transform matrix */ -extern const double WebRtcIsac_kTransform[4][4]; - -/* transpose transform matrix */ -extern const double WebRtcIsac_kTransformTranspose[4][4]; - -#endif /* WEBRTC_MODULES_AUDIO_CODING_CODECS_ISAC_MAIN_SOURCE_PITCH_LAG_TABLES_H_ */ diff --git a/WebRtc.NET/include/webrtc/modules/audio_coding/codecs/isac/main/source/settings.h b/WebRtc.NET/include/webrtc/modules/audio_coding/codecs/isac/main/source/settings.h deleted file mode 100644 index 31a80653..00000000 --- a/WebRtc.NET/include/webrtc/modules/audio_coding/codecs/isac/main/source/settings.h +++ /dev/null @@ -1,205 +0,0 @@ -/* - * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -/* - * settings.h - * - * Declaration of #defines used in the iSAC codec - * - */ - -#ifndef WEBRTC_MODULES_AUDIO_CODING_CODECS_ISAC_MAIN_SOURCE_SETTINGS_H_ -#define WEBRTC_MODULES_AUDIO_CODING_CODECS_ISAC_MAIN_SOURCE_SETTINGS_H_ - -/* sampling frequency (Hz) */ -#define FS 16000 - -/* number of samples per frame (either 320 (20ms), 480 (30ms) or 960 (60ms)) */ -#define INITIAL_FRAMESAMPLES 960 - - -#define MAXFFTSIZE 2048 -#define NFACTOR 11 - - - -/* do not modify the following; this will have to be modified if we - * have a 20ms framesize option */ -/**********************************************************************/ -/* miliseconds */ -#define FRAMESIZE 30 -/* number of samples per frame processed in the encoder, 480 */ -#define FRAMESAMPLES 480 /* ((FRAMESIZE*FS)/1000) */ -#define FRAMESAMPLES_HALF 240 -#define FRAMESAMPLES_QUARTER 120 -/**********************************************************************/ - - - -/* max number of samples per frame (= 60 ms frame) */ -#define MAX_FRAMESAMPLES 960 -#define MAX_SWBFRAMESAMPLES (MAX_FRAMESAMPLES * 2) -/* number of samples per 10ms frame */ -#define FRAMESAMPLES_10ms ((10*FS)/1000) -#define SWBFRAMESAMPLES_10ms (FRAMESAMPLES_10ms * 2) -/* number of samples in 30 ms frame */ -#define FRAMESAMPLES_30ms 480 -/* number of subframes */ -#define SUBFRAMES 6 -/* length of a subframe */ -#define UPDATE 80 -/* length of half a subframe (low/high band) */ -#define HALF_SUBFRAMELEN (UPDATE/2) -/* samples of look ahead (in a half-band, so actually - * half the samples of look ahead @ FS) */ -#define QLOOKAHEAD 24 /* 3 ms */ -/* order of AR model in spectral entropy coder */ -#define AR_ORDER 6 -/* order of LP model in spectral entropy coder */ -#define LP_ORDER 0 - -/* window length (masking analysis) */ -#define WINLEN 256 -/* order of low-band pole filter used to approximate masking curve */ -#define ORDERLO 12 -/* order of hi-band pole filter used to approximate masking curve */ -#define ORDERHI 6 - -#define UB_LPC_ORDER 4 -#define UB_LPC_VEC_PER_FRAME 2 -#define UB16_LPC_VEC_PER_FRAME 4 -#define UB_ACTIVE_SUBFRAMES 2 -#define UB_MAX_LPC_ORDER 6 -#define UB_INTERPOL_SEGMENTS 1 -#define UB16_INTERPOL_SEGMENTS 3 -#define LB_TOTAL_DELAY_SAMPLES 48 -enum ISACBandwidth {isac8kHz = 8, isac12kHz = 12, isac16kHz = 16}; -enum ISACBand {kIsacLowerBand = 0, kIsacUpperBand12 = 1, kIsacUpperBand16 = 2}; -enum IsacSamplingRate {kIsacWideband = 16, kIsacSuperWideband = 32}; -#define UB_LPC_GAIN_DIM SUBFRAMES -#define FB_STATE_SIZE_WORD32 6 - - -/* order for post_filter_bank */ -#define POSTQORDER 3 -/* order for pre-filterbank */ -#define QORDER 3 -/* another order */ -#define QORDER_ALL (POSTQORDER+QORDER-1) -/* for decimator */ -#define ALLPASSSECTIONS 2 - - -/* array size for byte stream in number of bytes. */ -/* The old maximum size still needed for the decoding */ -#define STREAM_SIZE_MAX 600 -#define STREAM_SIZE_MAX_30 200 /* 200 bytes=53.4 kbps @ 30 ms.framelength */ -#define STREAM_SIZE_MAX_60 400 /* 400 bytes=53.4 kbps @ 60 ms.framelength */ - -/* storage size for bit counts */ -#define BIT_COUNTER_SIZE 30 -/* maximum order of any AR model or filter */ -#define MAX_AR_MODEL_ORDER 12//50 - - -/* For pitch analysis */ -#define PITCH_FRAME_LEN (FRAMESAMPLES_HALF) /* 30 ms */ -#define PITCH_MAX_LAG 140 /* 57 Hz */ -#define PITCH_MIN_LAG 20 /* 400 Hz */ -#define PITCH_MAX_GAIN 0.45 -#define PITCH_MAX_GAIN_06 0.27 /* PITCH_MAX_GAIN*0.6 */ -#define PITCH_MAX_GAIN_Q12 1843 -#define PITCH_LAG_SPAN2 (PITCH_MAX_LAG/2-PITCH_MIN_LAG/2+5) -#define PITCH_CORR_LEN2 60 /* 15 ms */ -#define PITCH_CORR_STEP2 (PITCH_FRAME_LEN/4) -#define PITCH_BW 11 /* half the band width of correlation surface */ -#define PITCH_SUBFRAMES 4 -#define PITCH_GRAN_PER_SUBFRAME 5 -#define PITCH_SUBFRAME_LEN (PITCH_FRAME_LEN/PITCH_SUBFRAMES) -#define PITCH_UPDATE (PITCH_SUBFRAME_LEN/PITCH_GRAN_PER_SUBFRAME) -/* maximum number of peaks to be examined in correlation surface */ -#define PITCH_MAX_NUM_PEAKS 10 -#define PITCH_PEAK_DECAY 0.85 -/* For weighting filter */ -#define PITCH_WLPCORDER 6 -#define PITCH_WLPCWINLEN PITCH_FRAME_LEN -#define PITCH_WLPCASYM 0.3 /* asymmetry parameter */ -#define PITCH_WLPCBUFLEN PITCH_WLPCWINLEN -/* For pitch filter */ -/* Extra 50 for fraction and LP filters */ -#define PITCH_BUFFSIZE (PITCH_MAX_LAG + 50) -#define PITCH_INTBUFFSIZE (PITCH_FRAME_LEN+PITCH_BUFFSIZE) -/* Max rel. step for interpolation */ -#define PITCH_UPSTEP 1.5 -/* Max rel. step for interpolation */ -#define PITCH_DOWNSTEP 0.67 -#define PITCH_FRACS 8 -#define PITCH_FRACORDER 9 -#define PITCH_DAMPORDER 5 -#define PITCH_FILTDELAY 1.5f -/* stepsize for quantization of the pitch Gain */ -#define PITCH_GAIN_STEPSIZE 0.125 - - - -/* Order of high pass filter */ -#define HPORDER 2 - -/* some mathematical constants */ -/* log2(exp) */ -#define LOG2EXP 1.44269504088896 -#define PI 3.14159265358979 - -/* Maximum number of iterations allowed to limit payload size */ -#define MAX_PAYLOAD_LIMIT_ITERATION 5 - -/* Redundant Coding */ -#define RCU_BOTTLENECK_BPS 16000 -#define RCU_TRANSCODING_SCALE 0.40f -#define RCU_TRANSCODING_SCALE_INVERSE 2.5f - -#define RCU_TRANSCODING_SCALE_UB 0.50f -#define RCU_TRANSCODING_SCALE_UB_INVERSE 2.0f - -/* Define Error codes */ -/* 6000 General */ -#define ISAC_MEMORY_ALLOCATION_FAILED 6010 -#define ISAC_MODE_MISMATCH 6020 -#define ISAC_DISALLOWED_BOTTLENECK 6030 -#define ISAC_DISALLOWED_FRAME_LENGTH 6040 -#define ISAC_UNSUPPORTED_SAMPLING_FREQUENCY 6050 - -/* 6200 Bandwidth estimator */ -#define ISAC_RANGE_ERROR_BW_ESTIMATOR 6240 -/* 6400 Encoder */ -#define ISAC_ENCODER_NOT_INITIATED 6410 -#define ISAC_DISALLOWED_CODING_MODE 6420 -#define ISAC_DISALLOWED_FRAME_MODE_ENCODER 6430 -#define ISAC_DISALLOWED_BITSTREAM_LENGTH 6440 -#define ISAC_PAYLOAD_LARGER_THAN_LIMIT 6450 -#define ISAC_DISALLOWED_ENCODER_BANDWIDTH 6460 -/* 6600 Decoder */ -#define ISAC_DECODER_NOT_INITIATED 6610 -#define ISAC_EMPTY_PACKET 6620 -#define ISAC_DISALLOWED_FRAME_MODE_DECODER 6630 -#define ISAC_RANGE_ERROR_DECODE_FRAME_LENGTH 6640 -#define ISAC_RANGE_ERROR_DECODE_BANDWIDTH 6650 -#define ISAC_RANGE_ERROR_DECODE_PITCH_GAIN 6660 -#define ISAC_RANGE_ERROR_DECODE_PITCH_LAG 6670 -#define ISAC_RANGE_ERROR_DECODE_LPC 6680 -#define ISAC_RANGE_ERROR_DECODE_SPECTRUM 6690 -#define ISAC_LENGTH_MISMATCH 6730 -#define ISAC_RANGE_ERROR_DECODE_BANDWITH 6740 -#define ISAC_DISALLOWED_BANDWIDTH_MODE_DECODER 6750 -#define ISAC_DISALLOWED_LPC_MODEL 6760 -/* 6800 Call setup formats */ -#define ISAC_INCOMPATIBLE_FORMATS 6810 - -#endif /* WEBRTC_MODULES_AUDIO_CODING_CODECS_ISAC_MAIN_SOURCE_SETTINGS_H_ */ diff --git a/WebRtc.NET/include/webrtc/modules/audio_coding/codecs/isac/main/source/spectrum_ar_model_tables.h b/WebRtc.NET/include/webrtc/modules/audio_coding/codecs/isac/main/source/spectrum_ar_model_tables.h deleted file mode 100644 index 989cb367..00000000 --- a/WebRtc.NET/include/webrtc/modules/audio_coding/codecs/isac/main/source/spectrum_ar_model_tables.h +++ /dev/null @@ -1,78 +0,0 @@ -/* - * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -/* - * spectrum_ar_model_tables.h - * - * This file contains definitions of tables with AR coefficients, - * Gain coefficients and cosine tables. - * - */ - -#ifndef WEBRTC_MODULES_AUDIO_CODING_CODECS_ISAC_MAIN_SOURCE_SPECTRUM_AR_MODEL_TABLES_H_ -#define WEBRTC_MODULES_AUDIO_CODING_CODECS_ISAC_MAIN_SOURCE_SPECTRUM_AR_MODEL_TABLES_H_ - -#include "structs.h" - -#define NUM_AR_RC_QUANT_BAUNDARY 12 - -/********************* AR Coefficient Tables ************************/ -/* cdf for quantized reflection coefficient 1 */ -extern const uint16_t WebRtcIsac_kQArRc1Cdf[NUM_AR_RC_QUANT_BAUNDARY]; - -/* cdf for quantized reflection coefficient 2 */ -extern const uint16_t WebRtcIsac_kQArRc2Cdf[NUM_AR_RC_QUANT_BAUNDARY]; - -/* cdf for quantized reflection coefficient 3 */ -extern const uint16_t WebRtcIsac_kQArRc3Cdf[NUM_AR_RC_QUANT_BAUNDARY]; - -/* cdf for quantized reflection coefficient 4 */ -extern const uint16_t WebRtcIsac_kQArRc4Cdf[NUM_AR_RC_QUANT_BAUNDARY]; - -/* cdf for quantized reflection coefficient 5 */ -extern const uint16_t WebRtcIsac_kQArRc5Cdf[NUM_AR_RC_QUANT_BAUNDARY]; - -/* cdf for quantized reflection coefficient 6 */ -extern const uint16_t WebRtcIsac_kQArRc6Cdf[NUM_AR_RC_QUANT_BAUNDARY]; - -/* quantization boundary levels for reflection coefficients */ -extern const int16_t WebRtcIsac_kQArBoundaryLevels[NUM_AR_RC_QUANT_BAUNDARY]; - -/* initial indices for AR reflection coefficient quantizer and cdf table search */ -extern const uint16_t WebRtcIsac_kQArRcInitIndex[AR_ORDER]; - -/* pointers to AR cdf tables */ -extern const uint16_t *WebRtcIsac_kQArRcCdfPtr[AR_ORDER]; - -/* pointers to AR representation levels tables */ -extern const int16_t *WebRtcIsac_kQArRcLevelsPtr[AR_ORDER]; - - -/******************** GAIN Coefficient Tables ***********************/ -/* cdf for Gain coefficient */ -extern const uint16_t WebRtcIsac_kQGainCdf[19]; - -/* representation levels for quantized Gain coefficient */ -extern const int32_t WebRtcIsac_kQGain2Levels[18]; - -/* squared quantization boundary levels for Gain coefficient */ -extern const int32_t WebRtcIsac_kQGain2BoundaryLevels[19]; - -/* pointer to Gain cdf table */ -extern const uint16_t *WebRtcIsac_kQGainCdf_ptr[1]; - -/* Gain initial index for gain quantizer and cdf table search */ -extern const uint16_t WebRtcIsac_kQGainInitIndex[1]; - -/************************* Cosine Tables ****************************/ -/* Cosine table */ -extern const int16_t WebRtcIsac_kCos[6][60]; - -#endif /* WEBRTC_MODULES_AUDIO_CODING_CODECS_ISAC_MAIN_SOURCE_SPECTRUM_AR_MODEL_TABLES_H_ */ diff --git a/WebRtc.NET/include/webrtc/modules/audio_coding/codecs/isac/main/source/structs.h b/WebRtc.NET/include/webrtc/modules/audio_coding/codecs/isac/main/source/structs.h deleted file mode 100644 index a2cdca2c..00000000 --- a/WebRtc.NET/include/webrtc/modules/audio_coding/codecs/isac/main/source/structs.h +++ /dev/null @@ -1,495 +0,0 @@ -/* - * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -/* - * structs.h - * - * This header file contains all the structs used in the ISAC codec - * - */ - -#ifndef WEBRTC_MODULES_AUDIO_CODING_CODECS_ISAC_MAIN_SOURCE_STRUCTS_H_ -#define WEBRTC_MODULES_AUDIO_CODING_CODECS_ISAC_MAIN_SOURCE_STRUCTS_H_ - -#include "webrtc/modules/audio_coding/codecs/isac/bandwidth_info.h" -#include "webrtc/modules/audio_coding/codecs/isac/main/include/isac.h" -#include "webrtc/modules/audio_coding/codecs/isac/main/source/settings.h" -#include "webrtc/typedefs.h" - -typedef struct Bitstreamstruct { - - uint8_t stream[STREAM_SIZE_MAX]; - uint32_t W_upper; - uint32_t streamval; - uint32_t stream_index; - -} Bitstr; - -typedef struct { - - double DataBufferLo[WINLEN]; - double DataBufferHi[WINLEN]; - - double CorrBufLo[ORDERLO+1]; - double CorrBufHi[ORDERHI+1]; - - float PreStateLoF[ORDERLO+1]; - float PreStateLoG[ORDERLO+1]; - float PreStateHiF[ORDERHI+1]; - float PreStateHiG[ORDERHI+1]; - float PostStateLoF[ORDERLO+1]; - float PostStateLoG[ORDERLO+1]; - float PostStateHiF[ORDERHI+1]; - float PostStateHiG[ORDERHI+1]; - - double OldEnergy; - -} MaskFiltstr; - - -typedef struct { - - //state vectors for each of the two analysis filters - double INSTAT1[2*(QORDER-1)]; - double INSTAT2[2*(QORDER-1)]; - double INSTATLA1[2*(QORDER-1)]; - double INSTATLA2[2*(QORDER-1)]; - double INLABUF1[QLOOKAHEAD]; - double INLABUF2[QLOOKAHEAD]; - - float INSTAT1_float[2*(QORDER-1)]; - float INSTAT2_float[2*(QORDER-1)]; - float INSTATLA1_float[2*(QORDER-1)]; - float INSTATLA2_float[2*(QORDER-1)]; - float INLABUF1_float[QLOOKAHEAD]; - float INLABUF2_float[QLOOKAHEAD]; - - /* High pass filter */ - double HPstates[HPORDER]; - float HPstates_float[HPORDER]; - -} PreFiltBankstr; - - -typedef struct { - - //state vectors for each of the two analysis filters - double STATE_0_LOWER[2*POSTQORDER]; - double STATE_0_UPPER[2*POSTQORDER]; - - /* High pass filter */ - double HPstates1[HPORDER]; - double HPstates2[HPORDER]; - - float STATE_0_LOWER_float[2*POSTQORDER]; - float STATE_0_UPPER_float[2*POSTQORDER]; - - float HPstates1_float[HPORDER]; - float HPstates2_float[HPORDER]; - -} PostFiltBankstr; - -typedef struct { - - //data buffer for pitch filter - double ubuf[PITCH_BUFFSIZE]; - - //low pass state vector - double ystate[PITCH_DAMPORDER]; - - //old lag and gain - double oldlagp[1]; - double oldgainp[1]; - -} PitchFiltstr; - -typedef struct { - - //data buffer - double buffer[PITCH_WLPCBUFLEN]; - - //state vectors - double istate[PITCH_WLPCORDER]; - double weostate[PITCH_WLPCORDER]; - double whostate[PITCH_WLPCORDER]; - - //LPC window -> should be a global array because constant - double window[PITCH_WLPCWINLEN]; - -} WeightFiltstr; - -typedef struct { - - //for inital estimator - double dec_buffer[PITCH_CORR_LEN2 + PITCH_CORR_STEP2 + - PITCH_MAX_LAG/2 - PITCH_FRAME_LEN/2+2]; - double decimator_state[2*ALLPASSSECTIONS+1]; - double hp_state[2]; - - double whitened_buf[QLOOKAHEAD]; - - double inbuf[QLOOKAHEAD]; - - PitchFiltstr PFstr_wght; - PitchFiltstr PFstr; - WeightFiltstr Wghtstr; - -} PitchAnalysisStruct; - - - -/* Have instance of struct together with other iSAC structs */ -typedef struct { - - /* Previous frame length (in ms) */ - int32_t prev_frame_length; - - /* Previous RTP timestamp from received - packet (in samples relative beginning) */ - int32_t prev_rec_rtp_number; - - /* Send timestamp for previous packet (in ms using timeGetTime()) */ - uint32_t prev_rec_send_ts; - - /* Arrival time for previous packet (in ms using timeGetTime()) */ - uint32_t prev_rec_arr_ts; - - /* rate of previous packet, derived from RTP timestamps (in bits/s) */ - float prev_rec_rtp_rate; - - /* Time sinse the last update of the BN estimate (in ms) */ - uint32_t last_update_ts; - - /* Time sinse the last reduction (in ms) */ - uint32_t last_reduction_ts; - - /* How many times the estimate was update in the beginning */ - int32_t count_tot_updates_rec; - - /* The estimated bottle neck rate from there to here (in bits/s) */ - int32_t rec_bw; - float rec_bw_inv; - float rec_bw_avg; - float rec_bw_avg_Q; - - /* The estimated mean absolute jitter value, - as seen on this side (in ms) */ - float rec_jitter; - float rec_jitter_short_term; - float rec_jitter_short_term_abs; - float rec_max_delay; - float rec_max_delay_avg_Q; - - /* (assumed) bitrate for headers (bps) */ - float rec_header_rate; - - /* The estimated bottle neck rate from here to there (in bits/s) */ - float send_bw_avg; - - /* The estimated mean absolute jitter value, as seen on - the other siee (in ms) */ - float send_max_delay_avg; - - // number of packets received since last update - int num_pkts_rec; - - int num_consec_rec_pkts_over_30k; - - // flag for marking that a high speed network has been - // detected downstream - int hsn_detect_rec; - - int num_consec_snt_pkts_over_30k; - - // flag for marking that a high speed network has - // been detected upstream - int hsn_detect_snd; - - uint32_t start_wait_period; - - int in_wait_period; - - int change_to_WB; - - uint32_t senderTimestamp; - uint32_t receiverTimestamp; - //enum IsacSamplingRate incomingStreamSampFreq; - uint16_t numConsecLatePkts; - float consecLatency; - int16_t inWaitLatePkts; - - IsacBandwidthInfo external_bw_info; -} BwEstimatorstr; - - -typedef struct { - - /* boolean, flags if previous packet exceeded B.N. */ - int PrevExceed; - /* ms */ - int ExceedAgo; - /* packets left to send in current burst */ - int BurstCounter; - /* packets */ - int InitCounter; - /* ms remaining in buffer when next packet will be sent */ - double StillBuffered; - -} RateModel; - - -typedef struct { - - unsigned int SpaceAlloced; - unsigned int MaxPermAlloced; - double Tmp0[MAXFFTSIZE]; - double Tmp1[MAXFFTSIZE]; - double Tmp2[MAXFFTSIZE]; - double Tmp3[MAXFFTSIZE]; - int Perm[MAXFFTSIZE]; - int factor [NFACTOR]; - -} FFTstr; - - -/* The following strutc is used to store data from encoding, to make it - fast and easy to construct a new bitstream with a different Bandwidth - estimate. All values (except framelength and minBytes) is double size to - handle 60 ms of data. -*/ -typedef struct { - - /* Used to keep track of if it is first or second part of 60 msec packet */ - int startIdx; - - /* Frame length in samples */ - int16_t framelength; - - /* Pitch Gain */ - int pitchGain_index[2]; - - /* Pitch Lag */ - double meanGain[2]; - int pitchIndex[PITCH_SUBFRAMES*2]; - - /* LPC */ - int LPCindex_s[108*2]; /* KLT_ORDER_SHAPE = 108 */ - int LPCindex_g[12*2]; /* KLT_ORDER_GAIN = 12 */ - double LPCcoeffs_lo[(ORDERLO+1)*SUBFRAMES*2]; - double LPCcoeffs_hi[(ORDERHI+1)*SUBFRAMES*2]; - - /* Encode Spec */ - int16_t fre[FRAMESAMPLES]; - int16_t fim[FRAMESAMPLES]; - int16_t AvgPitchGain[2]; - - /* Used in adaptive mode only */ - int minBytes; - -} IsacSaveEncoderData; - - -typedef struct { - - int indexLPCShape[UB_LPC_ORDER * UB16_LPC_VEC_PER_FRAME]; - double lpcGain[SUBFRAMES<<1]; - int lpcGainIndex[SUBFRAMES<<1]; - - Bitstr bitStreamObj; - - int16_t realFFT[FRAMESAMPLES_HALF]; - int16_t imagFFT[FRAMESAMPLES_HALF]; -} ISACUBSaveEncDataStruct; - - - -typedef struct { - - Bitstr bitstr_obj; - MaskFiltstr maskfiltstr_obj; - PreFiltBankstr prefiltbankstr_obj; - PitchFiltstr pitchfiltstr_obj; - PitchAnalysisStruct pitchanalysisstr_obj; - FFTstr fftstr_obj; - IsacSaveEncoderData SaveEnc_obj; - - int buffer_index; - int16_t current_framesamples; - - float data_buffer_float[FRAMESAMPLES_30ms]; - - int frame_nb; - double bottleneck; - int16_t new_framelength; - double s2nr; - - /* Maximum allowed number of bits for a 30 msec packet */ - int16_t payloadLimitBytes30; - /* Maximum allowed number of bits for a 30 msec packet */ - int16_t payloadLimitBytes60; - /* Maximum allowed number of bits for both 30 and 60 msec packet */ - int16_t maxPayloadBytes; - /* Maximum allowed rate in bytes per 30 msec packet */ - int16_t maxRateInBytes; - - /*--- - If set to 1 iSAC will not addapt the frame-size, if used in - channel-adaptive mode. The initial value will be used for all rates. - ---*/ - int16_t enforceFrameSize; - - /*----- - This records the BWE index the encoder injected into the bit-stream. - It will be used in RCU. The same BWE index of main payload will be in - the redundant payload. We can not retrive it from BWE because it is - a recursive procedure (WebRtcIsac_GetDownlinkBwJitIndexImpl) and has to be - called only once per each encode. - -----*/ - int16_t lastBWIdx; -} ISACLBEncStruct; - -typedef struct { - - Bitstr bitstr_obj; - MaskFiltstr maskfiltstr_obj; - PreFiltBankstr prefiltbankstr_obj; - FFTstr fftstr_obj; - ISACUBSaveEncDataStruct SaveEnc_obj; - - int buffer_index; - float data_buffer_float[MAX_FRAMESAMPLES + - LB_TOTAL_DELAY_SAMPLES]; - double bottleneck; - /* Maximum allowed number of bits for a 30 msec packet */ - //int16_t payloadLimitBytes30; - /* Maximum allowed number of bits for both 30 and 60 msec packet */ - //int16_t maxPayloadBytes; - int16_t maxPayloadSizeBytes; - - double lastLPCVec[UB_LPC_ORDER]; - int16_t numBytesUsed; - int16_t lastJitterInfo; -} ISACUBEncStruct; - - - -typedef struct { - - Bitstr bitstr_obj; - MaskFiltstr maskfiltstr_obj; - PostFiltBankstr postfiltbankstr_obj; - PitchFiltstr pitchfiltstr_obj; - FFTstr fftstr_obj; - -} ISACLBDecStruct; - -typedef struct { - - Bitstr bitstr_obj; - MaskFiltstr maskfiltstr_obj; - PostFiltBankstr postfiltbankstr_obj; - FFTstr fftstr_obj; - -} ISACUBDecStruct; - - - -typedef struct { - - ISACLBEncStruct ISACencLB_obj; - ISACLBDecStruct ISACdecLB_obj; -} ISACLBStruct; - - -typedef struct { - - ISACUBEncStruct ISACencUB_obj; - ISACUBDecStruct ISACdecUB_obj; -} ISACUBStruct; - -/* - This struct is used to take a snapshot of the entropy coder and LPC gains - right before encoding LPC gains. This allows us to go back to that state - if we like to limit the payload size. -*/ -typedef struct { - /* 6 lower-band & 6 upper-band */ - double loFiltGain[SUBFRAMES]; - double hiFiltGain[SUBFRAMES]; - /* Upper boundary of interval W */ - uint32_t W_upper; - uint32_t streamval; - /* Index to the current position in bytestream */ - uint32_t stream_index; - uint8_t stream[3]; -} transcode_obj; - -typedef struct { - // TODO(kwiberg): The size of these tables could be reduced by storing floats - // instead of doubles, and by making use of the identity cos(x) = - // sin(x+pi/2). They could also be made global constants that we fill in at - // compile time. - double costab1[FRAMESAMPLES_HALF]; - double sintab1[FRAMESAMPLES_HALF]; - double costab2[FRAMESAMPLES_QUARTER]; - double sintab2[FRAMESAMPLES_QUARTER]; -} TransformTables; - -typedef struct { - // lower-band codec instance - ISACLBStruct instLB; - // upper-band codec instance - ISACUBStruct instUB; - - // Bandwidth Estimator and model for the rate. - BwEstimatorstr bwestimator_obj; - RateModel rate_data_obj; - double MaxDelay; - - /* 0 = adaptive; 1 = instantaneous */ - int16_t codingMode; - - // overall bottleneck of the codec - int32_t bottleneck; - - // QMF Filter state - int32_t analysisFBState1[FB_STATE_SIZE_WORD32]; - int32_t analysisFBState2[FB_STATE_SIZE_WORD32]; - int32_t synthesisFBState1[FB_STATE_SIZE_WORD32]; - int32_t synthesisFBState2[FB_STATE_SIZE_WORD32]; - - // Error Code - int16_t errorCode; - - // bandwidth of the encoded audio 8, 12 or 16 kHz - enum ISACBandwidth bandwidthKHz; - // Sampling rate of audio, encoder and decode, 8 or 16 kHz - enum IsacSamplingRate encoderSamplingRateKHz; - enum IsacSamplingRate decoderSamplingRateKHz; - // Flag to keep track of initializations, lower & upper-band - // encoder and decoder. - int16_t initFlag; - - // Flag to to indicate signal bandwidth switch - int16_t resetFlag_8kHz; - - // Maximum allowed rate, measured in Bytes per 30 ms. - int16_t maxRateBytesPer30Ms; - // Maximum allowed payload-size, measured in Bytes. - int16_t maxPayloadSizeBytes; - /* The expected sampling rate of the input signal. Valid values are 16000 - * and 32000. This is not the operation sampling rate of the codec. */ - uint16_t in_sample_rate_hz; - - // Trig tables for WebRtcIsac_Time2Spec and WebRtcIsac_Spec2time. - TransformTables transform_tables; -} ISACMainStruct; - -#endif /* WEBRTC_MODULES_AUDIO_CODING_CODECS_ISAC_MAIN_SOURCE_STRUCTS_H_ */ diff --git a/WebRtc.NET/include/webrtc/modules/audio_coding/codecs/isac/main/util/utility.h b/WebRtc.NET/include/webrtc/modules/audio_coding/codecs/isac/main/util/utility.h deleted file mode 100644 index 1bb6d295..00000000 --- a/WebRtc.NET/include/webrtc/modules/audio_coding/codecs/isac/main/util/utility.h +++ /dev/null @@ -1,144 +0,0 @@ -/* - * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MODULES_AUDIO_CODING_CODECS_ISAC_MAIN_UTIL_UTILITY_H_ -#define WEBRTC_MODULES_AUDIO_CODING_CODECS_ISAC_MAIN_UTIL_UTILITY_H_ - -#include -#include - -#if defined(__cplusplus) -extern "C" { -#endif - -#define OPEN_FILE_WB(filePtr, fullPath) \ - do \ - { \ - if(fullPath != NULL) \ - { \ - filePtr = fopen(fullPath, "wb"); \ - if(filePtr == NULL) \ - { \ - printf("could not open %s to write to.", fullPath); \ - return -1; \ - } \ - } \ - else \ - { \ - filePtr = NULL; \ - } \ - }while(0) - -#define OPEN_FILE_AB(filePtr, fullPath) \ - do \ - { \ - if(fullPath != NULL) \ - { \ - filePtr = fopen(fullPath, "ab"); \ - if(filePtr == NULL) \ - { \ - printf("could not open %s to write to.", fullPath); \ - return -1; \ - } \ - } \ - else \ - { \ - filePtr = NULL; \ - } \ - }while(0) - -#define OPEN_FILE_RB(filePtr, fullPath) \ - do \ - { \ - if(fullPath != NULL) \ - { \ - filePtr = fopen(fullPath, "rb"); \ - if(filePtr == NULL) \ - { \ - printf("could not open %s to read from.", fullPath); \ - return -1; \ - } \ - } \ - else \ - { \ - filePtr = NULL; \ - } \ - }while(0) - -#define WRITE_FILE_D(bufferPtr, len, filePtr) \ - do \ - { \ - if(filePtr != NULL) \ - { \ - double dummy[1000]; \ - int cntr; \ - for(cntr = 0; cntr < (len); cntr++) \ - { \ - dummy[cntr] = (double)bufferPtr[cntr]; \ - } \ - fwrite(dummy, sizeof(double), len, filePtr); \ - fflush(filePtr); \ - } \ - } while(0) - - typedef struct { - unsigned int whenPackGeneratedMs; - unsigned int whenPrevPackLeftMs; - unsigned int sendTimeMs ; /* milisecond */ - unsigned int arrival_time; /* samples */ - unsigned int sample_count; /* samples, also used as "send time stamp" */ - unsigned int rtp_number; - } BottleNeckModel; - - void get_arrival_time( - int current_framesamples, /* samples */ - size_t packet_size, /* bytes */ - int bottleneck, /* excluding headers; bits/s */ - BottleNeckModel* BN_data, - short senderSampFreqHz, - short receiverSampFreqHz); - - /* function for reading audio data from PCM file */ - int readframe( - short* data, - FILE* inp, - int length); - - short readSwitch( - int argc, - char* argv[], - char* strID); - - double readParamDouble( - int argc, - char* argv[], - char* strID, - double defaultVal); - - int readParamInt( - int argc, - char* argv[], - char* strID, - int defaultVal); - - int readParamString( - int argc, - char* argv[], - char* strID, - char* stringParam, - int maxSize); - -#if defined(__cplusplus) -} -#endif - - - -#endif diff --git a/WebRtc.NET/include/webrtc/modules/audio_coding/codecs/mock/mock_audio_decoder_factory.h b/WebRtc.NET/include/webrtc/modules/audio_coding/codecs/mock/mock_audio_decoder_factory.h deleted file mode 100644 index b988b85d..00000000 --- a/WebRtc.NET/include/webrtc/modules/audio_coding/codecs/mock/mock_audio_decoder_factory.h +++ /dev/null @@ -1,83 +0,0 @@ -/* - * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MODULES_AUDIO_CODING_CODECS_MOCK_MOCK_AUDIO_DECODER_FACTORY_H_ -#define WEBRTC_MODULES_AUDIO_CODING_CODECS_MOCK_MOCK_AUDIO_DECODER_FACTORY_H_ - -#include - -#include "webrtc/base/scoped_ref_ptr.h" -#include "webrtc/modules/audio_coding/codecs/audio_decoder_factory.h" -#include "webrtc/modules/audio_coding/codecs/builtin_audio_decoder_factory.h" -#include "webrtc/test/gmock.h" - -namespace webrtc { - -class MockAudioDecoderFactory : public AudioDecoderFactory { - public: - MOCK_METHOD0(GetSupportedDecoders, std::vector()); - MOCK_METHOD1(IsSupportedDecoder, bool(const SdpAudioFormat&)); - std::unique_ptr MakeAudioDecoder( - const SdpAudioFormat& format) { - std::unique_ptr return_value; - MakeAudioDecoderMock(format, &return_value); - return return_value; - } - MOCK_METHOD2(MakeAudioDecoderMock, - void(const SdpAudioFormat& format, - std::unique_ptr* return_value)); - - // Creates a MockAudioDecoderFactory with no formats and that may not be - // invoked to create a codec - useful for initializing a voice engine, for - // example. - static rtc::scoped_refptr - CreateUnusedFactory() { - using testing::_; - using testing::AnyNumber; - using testing::Return; - - rtc::scoped_refptr factory = - new rtc::RefCountedObject; - ON_CALL(*factory.get(), GetSupportedDecoders()) - .WillByDefault(Return(std::vector())); - EXPECT_CALL(*factory.get(), GetSupportedDecoders()).Times(AnyNumber()); - ON_CALL(*factory, IsSupportedDecoder(_)).WillByDefault(Return(false)); - EXPECT_CALL(*factory, IsSupportedDecoder(_)).Times(AnyNumber()); - EXPECT_CALL(*factory.get(), MakeAudioDecoderMock(_, _)).Times(0); - return factory; - } - - // Creates a MockAudioDecoderFactory with no formats that may be invoked to - // create a codec any number of times. It will, though, return nullptr on each - // call, since it supports no codecs. - static rtc::scoped_refptr - CreateEmptyFactory() { - using testing::_; - using testing::AnyNumber; - using testing::Return; - using testing::SetArgPointee; - - rtc::scoped_refptr factory = - new rtc::RefCountedObject; - ON_CALL(*factory.get(), GetSupportedDecoders()) - .WillByDefault(Return(std::vector())); - EXPECT_CALL(*factory.get(), GetSupportedDecoders()).Times(AnyNumber()); - ON_CALL(*factory, IsSupportedDecoder(_)).WillByDefault(Return(false)); - EXPECT_CALL(*factory, IsSupportedDecoder(_)).Times(AnyNumber()); - ON_CALL(*factory.get(), MakeAudioDecoderMock(_, _)) - .WillByDefault(SetArgPointee<1>(nullptr)); - EXPECT_CALL(*factory.get(), MakeAudioDecoderMock(_, _)).Times(AnyNumber()); - return factory; - } -}; - -} // namespace webrtc - -#endif // WEBRTC_MODULES_AUDIO_CODING_CODECS_MOCK_MOCK_AUDIO_DECODER_FACTORY_H_ diff --git a/WebRtc.NET/include/webrtc/modules/audio_coding/codecs/opus/audio_decoder_opus.h b/WebRtc.NET/include/webrtc/modules/audio_coding/codecs/opus/audio_decoder_opus.h deleted file mode 100644 index a0fb34c4..00000000 --- a/WebRtc.NET/include/webrtc/modules/audio_coding/codecs/opus/audio_decoder_opus.h +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Copyright (c) 2015 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MODULES_AUDIO_CODING_CODECS_OPUS_AUDIO_DECODER_OPUS_H_ -#define WEBRTC_MODULES_AUDIO_CODING_CODECS_OPUS_AUDIO_DECODER_OPUS_H_ - -#include "webrtc/base/constructormagic.h" -#include "webrtc/modules/audio_coding/codecs/audio_decoder.h" -#include "webrtc/modules/audio_coding/codecs/opus/opus_interface.h" - -namespace webrtc { - -class AudioDecoderOpus final : public AudioDecoder { - public: - explicit AudioDecoderOpus(size_t num_channels); - ~AudioDecoderOpus() override; - - std::vector ParsePayload(rtc::Buffer&& payload, - uint32_t timestamp) override; - void Reset() override; - int PacketDuration(const uint8_t* encoded, size_t encoded_len) const override; - int PacketDurationRedundant(const uint8_t* encoded, - size_t encoded_len) const override; - bool PacketHasFec(const uint8_t* encoded, size_t encoded_len) const override; - int SampleRateHz() const override; - size_t Channels() const override; - - protected: - int DecodeInternal(const uint8_t* encoded, - size_t encoded_len, - int sample_rate_hz, - int16_t* decoded, - SpeechType* speech_type) override; - int DecodeRedundantInternal(const uint8_t* encoded, - size_t encoded_len, - int sample_rate_hz, - int16_t* decoded, - SpeechType* speech_type) override; - - private: - OpusDecInst* dec_state_; - const size_t channels_; - RTC_DISALLOW_COPY_AND_ASSIGN(AudioDecoderOpus); -}; - -} // namespace webrtc - -#endif // WEBRTC_MODULES_AUDIO_CODING_CODECS_OPUS_AUDIO_DECODER_OPUS_H_ diff --git a/WebRtc.NET/include/webrtc/modules/audio_coding/codecs/opus/audio_encoder_opus.h b/WebRtc.NET/include/webrtc/modules/audio_coding/codecs/opus/audio_encoder_opus.h deleted file mode 100644 index 051a6076..00000000 --- a/WebRtc.NET/include/webrtc/modules/audio_coding/codecs/opus/audio_encoder_opus.h +++ /dev/null @@ -1,183 +0,0 @@ -/* - * Copyright (c) 2014 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MODULES_AUDIO_CODING_CODECS_OPUS_AUDIO_ENCODER_OPUS_H_ -#define WEBRTC_MODULES_AUDIO_CODING_CODECS_OPUS_AUDIO_ENCODER_OPUS_H_ - -#include -#include -#include -#include - -#include "webrtc/base/constructormagic.h" -#include "webrtc/base/optional.h" -#include "webrtc/common_audio/smoothing_filter.h" -#include "webrtc/modules/audio_coding/audio_network_adaptor/include/audio_network_adaptor.h" -#include "webrtc/modules/audio_coding/codecs/opus/opus_interface.h" -#include "webrtc/modules/audio_coding/codecs/audio_encoder.h" - -namespace webrtc { - -class RtcEventLog; - -struct CodecInst; - -class AudioEncoderOpus final : public AudioEncoder { - public: - enum ApplicationMode { - kVoip = 0, - kAudio = 1, - }; - - struct Config { - Config(); - Config(const Config&); - ~Config(); - Config& operator=(const Config&); - - bool IsOk() const; - int GetBitrateBps() const; - // Returns empty if the current bitrate falls within the hysteresis window, - // defined by complexity_threshold_bps +/- complexity_threshold_window_bps. - // Otherwise, returns the current complexity depending on whether the - // current bitrate is above or below complexity_threshold_bps. - rtc::Optional GetNewComplexity() const; - - int frame_size_ms = 20; - size_t num_channels = 1; - int payload_type = 120; - ApplicationMode application = kVoip; - rtc::Optional bitrate_bps; // Unset means to use default value. - bool fec_enabled = false; - int max_playback_rate_hz = 48000; - int complexity = kDefaultComplexity; - // This value may change in the struct's constructor. - int low_rate_complexity = kDefaultComplexity; - // low_rate_complexity is used when the bitrate is below this threshold. - int complexity_threshold_bps = 12500; - int complexity_threshold_window_bps = 1500; - bool dtx_enabled = false; - std::vector supported_frame_lengths_ms; - const Clock* clock = Clock::GetRealTimeClock(); - int uplink_bandwidth_update_interval_ms = 200; - - private: -#if defined(WEBRTC_ANDROID) || defined(WEBRTC_IOS) || defined(WEBRTC_ARCH_ARM) - // If we are on Android, iOS and/or ARM, use a lower complexity setting as - // default, to save encoder complexity. - static const int kDefaultComplexity = 5; -#else - static const int kDefaultComplexity = 9; -#endif - }; - - using AudioNetworkAdaptorCreator = - std::function(const std::string&, - RtcEventLog*, - const Clock*)>; - AudioEncoderOpus( - const Config& config, - AudioNetworkAdaptorCreator&& audio_network_adaptor_creator = nullptr, - std::unique_ptr bitrate_smoother = nullptr); - - explicit AudioEncoderOpus(const CodecInst& codec_inst); - - ~AudioEncoderOpus() override; - - int SampleRateHz() const override; - size_t NumChannels() const override; - size_t Num10MsFramesInNextPacket() const override; - size_t Max10MsFramesInAPacket() const override; - int GetTargetBitrate() const override; - - void Reset() override; - bool SetFec(bool enable) override; - - // Set Opus DTX. Once enabled, Opus stops transmission, when it detects voice - // being inactive. During that, it still sends 2 packets (one for content, one - // for signaling) about every 400 ms. - bool SetDtx(bool enable) override; - bool GetDtx() const override; - - bool SetApplication(Application application) override; - void SetMaxPlaybackRate(int frequency_hz) override; - bool EnableAudioNetworkAdaptor(const std::string& config_string, - RtcEventLog* event_log, - const Clock* clock) override; - void DisableAudioNetworkAdaptor() override; - void OnReceivedUplinkPacketLossFraction( - float uplink_packet_loss_fraction) override; - void OnReceivedUplinkBandwidth( - int target_audio_bitrate_bps, - rtc::Optional probing_interval_ms) override; - void OnReceivedRtt(int rtt_ms) override; - void OnReceivedOverhead(size_t overhead_bytes_per_packet) override; - void SetReceiverFrameLengthRange(int min_frame_length_ms, - int max_frame_length_ms) override; - rtc::ArrayView supported_frame_lengths_ms() const { - return config_.supported_frame_lengths_ms; - } - - // Getters for testing. - float packet_loss_rate() const { return packet_loss_rate_; } - ApplicationMode application() const { return config_.application; } - bool fec_enabled() const { return config_.fec_enabled; } - size_t num_channels_to_encode() const { return num_channels_to_encode_; } - int next_frame_length_ms() const { return next_frame_length_ms_; } - - protected: - EncodedInfo EncodeImpl(uint32_t rtp_timestamp, - rtc::ArrayView audio, - rtc::Buffer* encoded) override; - - private: - class PacketLossFractionSmoother; - - size_t Num10msFramesPerPacket() const; - size_t SamplesPer10msFrame() const; - size_t SufficientOutputBufferSize() const; - bool RecreateEncoderInstance(const Config& config); - void SetFrameLength(int frame_length_ms); - void SetNumChannelsToEncode(size_t num_channels_to_encode); - void SetProjectedPacketLossRate(float fraction); - - // TODO(minyue): remove "override" when we can deprecate - // |AudioEncoder::SetTargetBitrate|. - void SetTargetBitrate(int target_bps) override; - - void ApplyAudioNetworkAdaptor(); - std::unique_ptr DefaultAudioNetworkAdaptorCreator( - const std::string& config_string, - RtcEventLog* event_log, - const Clock* clock) const; - - void MaybeUpdateUplinkBandwidth(); - - Config config_; - float packet_loss_rate_; - std::vector input_buffer_; - OpusEncInst* inst_; - uint32_t first_timestamp_in_buffer_; - size_t num_channels_to_encode_; - int next_frame_length_ms_; - int complexity_; - std::unique_ptr packet_loss_fraction_smoother_; - AudioNetworkAdaptorCreator audio_network_adaptor_creator_; - std::unique_ptr audio_network_adaptor_; - rtc::Optional overhead_bytes_per_packet_; - const std::unique_ptr bitrate_smoother_; - rtc::Optional bitrate_smoother_last_update_time_; - - RTC_DISALLOW_COPY_AND_ASSIGN(AudioEncoderOpus); -}; - -} // namespace webrtc - -#endif // WEBRTC_MODULES_AUDIO_CODING_CODECS_OPUS_AUDIO_ENCODER_OPUS_H_ diff --git a/WebRtc.NET/include/webrtc/modules/audio_coding/neteq/audio_decoder_impl.h b/WebRtc.NET/include/webrtc/modules/audio_coding/neteq/audio_decoder_impl.h deleted file mode 100644 index 5b064ec3..00000000 --- a/WebRtc.NET/include/webrtc/modules/audio_coding/neteq/audio_decoder_impl.h +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MODULES_AUDIO_CODING_NETEQ_AUDIO_DECODER_IMPL_H_ -#define WEBRTC_MODULES_AUDIO_CODING_NETEQ_AUDIO_DECODER_IMPL_H_ - -#include - -#include "webrtc/base/constructormagic.h" -#include "webrtc/modules/audio_coding/codecs/audio_decoder.h" -#ifdef WEBRTC_CODEC_G722 -#include "webrtc/modules/audio_coding/codecs/g722/g722_interface.h" -#endif -#include "webrtc/modules/audio_coding/acm2/rent_a_codec.h" -#include "webrtc/typedefs.h" - -namespace webrtc { - -using NetEqDecoder = acm2::RentACodec::NetEqDecoder; - -// Returns true if |codec_type| is supported. -bool CodecSupported(NetEqDecoder codec_type); - -} // namespace webrtc -#endif // WEBRTC_MODULES_AUDIO_CODING_NETEQ_AUDIO_DECODER_IMPL_H_ diff --git a/WebRtc.NET/include/webrtc/modules/audio_coding/neteq/decision_logic.h b/WebRtc.NET/include/webrtc/modules/audio_coding/neteq/decision_logic.h deleted file mode 100644 index 66c940d7..00000000 --- a/WebRtc.NET/include/webrtc/modules/audio_coding/neteq/decision_logic.h +++ /dev/null @@ -1,168 +0,0 @@ -/* - * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MODULES_AUDIO_CODING_NETEQ_DECISION_LOGIC_H_ -#define WEBRTC_MODULES_AUDIO_CODING_NETEQ_DECISION_LOGIC_H_ - -#include "webrtc/base/constructormagic.h" -#include "webrtc/modules/audio_coding/neteq/defines.h" -#include "webrtc/modules/audio_coding/neteq/include/neteq.h" -#include "webrtc/modules/audio_coding/neteq/tick_timer.h" -#include "webrtc/typedefs.h" - -namespace webrtc { - -// Forward declarations. -class BufferLevelFilter; -class DecoderDatabase; -class DelayManager; -class Expand; -class PacketBuffer; -class SyncBuffer; -struct Packet; - -// This is the base class for the decision tree implementations. Derived classes -// must implement the method GetDecisionSpecialized(). -class DecisionLogic { - public: - // Static factory function which creates different types of objects depending - // on the |playout_mode|. - static DecisionLogic* Create(int fs_hz, - size_t output_size_samples, - NetEqPlayoutMode playout_mode, - DecoderDatabase* decoder_database, - const PacketBuffer& packet_buffer, - DelayManager* delay_manager, - BufferLevelFilter* buffer_level_filter, - const TickTimer* tick_timer); - - // Constructor. - DecisionLogic(int fs_hz, - size_t output_size_samples, - NetEqPlayoutMode playout_mode, - DecoderDatabase* decoder_database, - const PacketBuffer& packet_buffer, - DelayManager* delay_manager, - BufferLevelFilter* buffer_level_filter, - const TickTimer* tick_timer); - - virtual ~DecisionLogic(); - - // Resets object to a clean state. - void Reset(); - - // Resets parts of the state. Typically done when switching codecs. - void SoftReset(); - - // Sets the sample rate and the output block size. - void SetSampleRate(int fs_hz, size_t output_size_samples); - - // Returns the operation that should be done next. |sync_buffer| and |expand| - // are provided for reference. |decoder_frame_length| is the number of samples - // obtained from the last decoded frame. If there is a packet available, it - // should be supplied in |next_packet|; otherwise it should be NULL. The mode - // resulting from the last call to NetEqImpl::GetAudio is supplied in - // |prev_mode|. If there is a DTMF event to play, |play_dtmf| should be set to - // true. The output variable |reset_decoder| will be set to true if a reset is - // required; otherwise it is left unchanged (i.e., it can remain true if it - // was true before the call). This method end with calling - // GetDecisionSpecialized to get the actual return value. - Operations GetDecision(const SyncBuffer& sync_buffer, - const Expand& expand, - size_t decoder_frame_length, - const Packet* next_packet, - Modes prev_mode, - bool play_dtmf, - size_t generated_noise_samples, - bool* reset_decoder); - - // These methods test the |cng_state_| for different conditions. - bool CngRfc3389On() const { return cng_state_ == kCngRfc3389On; } - bool CngOff() const { return cng_state_ == kCngOff; } - - // Resets the |cng_state_| to kCngOff. - void SetCngOff() { cng_state_ = kCngOff; } - - // Reports back to DecisionLogic whether the decision to do expand remains or - // not. Note that this is necessary, since an expand decision can be changed - // to kNormal in NetEqImpl::GetDecision if there is still enough data in the - // sync buffer. - virtual void ExpandDecision(Operations operation); - - // Adds |value| to |sample_memory_|. - void AddSampleMemory(int32_t value) { - sample_memory_ += value; - } - - // Accessors and mutators. - void set_sample_memory(int32_t value) { sample_memory_ = value; } - size_t noise_fast_forward() const { return noise_fast_forward_; } - size_t packet_length_samples() const { return packet_length_samples_; } - void set_packet_length_samples(size_t value) { - packet_length_samples_ = value; - } - void set_prev_time_scale(bool value) { prev_time_scale_ = value; } - NetEqPlayoutMode playout_mode() const { return playout_mode_; } - - protected: - // The value 5 sets maximum time-stretch rate to about 100 ms/s. - static const int kMinTimescaleInterval = 5; - - enum CngState { - kCngOff, - kCngRfc3389On, - kCngInternalOn - }; - - // Returns the operation that should be done next. |sync_buffer| and |expand| - // are provided for reference. |decoder_frame_length| is the number of samples - // obtained from the last decoded frame. If there is a packet available, it - // should be supplied in |next_packet|; otherwise it should be NULL. The mode - // resulting from the last call to NetEqImpl::GetAudio is supplied in - // |prev_mode|. If there is a DTMF event to play, |play_dtmf| should be set to - // true. The output variable |reset_decoder| will be set to true if a reset is - // required; otherwise it is left unchanged (i.e., it can remain true if it - // was true before the call). Should be implemented by derived classes. - virtual Operations GetDecisionSpecialized(const SyncBuffer& sync_buffer, - const Expand& expand, - size_t decoder_frame_length, - const Packet* next_packet, - Modes prev_mode, - bool play_dtmf, - bool* reset_decoder, - size_t generated_noise_samples) = 0; - - // Updates the |buffer_level_filter_| with the current buffer level - // |buffer_size_packets|. - void FilterBufferLevel(size_t buffer_size_packets, Modes prev_mode); - - DecoderDatabase* decoder_database_; - const PacketBuffer& packet_buffer_; - DelayManager* delay_manager_; - BufferLevelFilter* buffer_level_filter_; - const TickTimer* tick_timer_; - int fs_mult_; - size_t output_size_samples_; - CngState cng_state_; // Remember if comfort noise is interrupted by other - // event (e.g., DTMF). - size_t noise_fast_forward_ = 0; - size_t packet_length_samples_; - int sample_memory_; - bool prev_time_scale_; - std::unique_ptr timescale_countdown_; - int num_consecutive_expands_; - const NetEqPlayoutMode playout_mode_; - - private: - RTC_DISALLOW_COPY_AND_ASSIGN(DecisionLogic); -}; - -} // namespace webrtc -#endif // WEBRTC_MODULES_AUDIO_CODING_NETEQ_DECISION_LOGIC_H_ diff --git a/WebRtc.NET/include/webrtc/modules/audio_coding/neteq/decision_logic_fax.h b/WebRtc.NET/include/webrtc/modules/audio_coding/neteq/decision_logic_fax.h deleted file mode 100644 index 67261265..00000000 --- a/WebRtc.NET/include/webrtc/modules/audio_coding/neteq/decision_logic_fax.h +++ /dev/null @@ -1,57 +0,0 @@ -/* - * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MODULES_AUDIO_CODING_NETEQ_DECISION_LOGIC_FAX_H_ -#define WEBRTC_MODULES_AUDIO_CODING_NETEQ_DECISION_LOGIC_FAX_H_ - -#include "webrtc/base/constructormagic.h" -#include "webrtc/modules/audio_coding/neteq/decision_logic.h" -#include "webrtc/typedefs.h" - -namespace webrtc { - -// Implementation of the DecisionLogic class for playout modes kPlayoutFax and -// kPlayoutOff. -class DecisionLogicFax : public DecisionLogic { - public: - // Constructor. - DecisionLogicFax(int fs_hz, - size_t output_size_samples, - NetEqPlayoutMode playout_mode, - DecoderDatabase* decoder_database, - const PacketBuffer& packet_buffer, - DelayManager* delay_manager, - BufferLevelFilter* buffer_level_filter, - const TickTimer* tick_timer) - : DecisionLogic(fs_hz, - output_size_samples, - playout_mode, - decoder_database, - packet_buffer, - delay_manager, - buffer_level_filter, - tick_timer) {} - - protected: - Operations GetDecisionSpecialized(const SyncBuffer& sync_buffer, - const Expand& expand, - size_t decoder_frame_length, - const Packet* next_packet, - Modes prev_mode, - bool play_dtmf, - bool* reset_decoder, - size_t generated_noise_samples) override; - - private: - RTC_DISALLOW_COPY_AND_ASSIGN(DecisionLogicFax); -}; - -} // namespace webrtc -#endif // WEBRTC_MODULES_AUDIO_CODING_NETEQ_DECISION_LOGIC_FAX_H_ diff --git a/WebRtc.NET/include/webrtc/modules/audio_coding/neteq/decision_logic_normal.h b/WebRtc.NET/include/webrtc/modules/audio_coding/neteq/decision_logic_normal.h deleted file mode 100644 index 06058674..00000000 --- a/WebRtc.NET/include/webrtc/modules/audio_coding/neteq/decision_logic_normal.h +++ /dev/null @@ -1,107 +0,0 @@ -/* - * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MODULES_AUDIO_CODING_NETEQ_DECISION_LOGIC_NORMAL_H_ -#define WEBRTC_MODULES_AUDIO_CODING_NETEQ_DECISION_LOGIC_NORMAL_H_ - -#include "webrtc/base/constructormagic.h" -#include "webrtc/modules/audio_coding/neteq/decision_logic.h" -#include "webrtc/typedefs.h" - -namespace webrtc { - -// Implementation of the DecisionLogic class for playout modes kPlayoutOn and -// kPlayoutStreaming. -class DecisionLogicNormal : public DecisionLogic { - public: - // Constructor. - DecisionLogicNormal(int fs_hz, - size_t output_size_samples, - NetEqPlayoutMode playout_mode, - DecoderDatabase* decoder_database, - const PacketBuffer& packet_buffer, - DelayManager* delay_manager, - BufferLevelFilter* buffer_level_filter, - const TickTimer* tick_timer) - : DecisionLogic(fs_hz, - output_size_samples, - playout_mode, - decoder_database, - packet_buffer, - delay_manager, - buffer_level_filter, - tick_timer) {} - - protected: - static const int kReinitAfterExpands = 100; - static const int kMaxWaitForPacket = 10; - - Operations GetDecisionSpecialized(const SyncBuffer& sync_buffer, - const Expand& expand, - size_t decoder_frame_length, - const Packet* next_packet, - Modes prev_mode, - bool play_dtmf, - bool* reset_decoder, - size_t generated_noise_samples) override; - - // Returns the operation to do given that the expected packet is not - // available, but a packet further into the future is at hand. - virtual Operations FuturePacketAvailable( - const SyncBuffer& sync_buffer, - const Expand& expand, - size_t decoder_frame_length, - Modes prev_mode, - uint32_t target_timestamp, - uint32_t available_timestamp, - bool play_dtmf, - size_t generated_noise_samples); - - // Returns the operation to do given that the expected packet is available. - virtual Operations ExpectedPacketAvailable(Modes prev_mode, bool play_dtmf); - - // Returns the operation given that no packets are available (except maybe - // a DTMF event, flagged by setting |play_dtmf| true). - virtual Operations NoPacket(bool play_dtmf); - - private: - // Returns the operation given that the next available packet is a comfort - // noise payload (RFC 3389 only, not codec-internal). - Operations CngOperation(Modes prev_mode, - uint32_t target_timestamp, - uint32_t available_timestamp, - size_t generated_noise_samples); - - // Checks if enough time has elapsed since the last successful timescale - // operation was done (i.e., accelerate or preemptive expand). - bool TimescaleAllowed() const { - return !timescale_countdown_ || timescale_countdown_->Finished(); - } - - // Checks if the current (filtered) buffer level is under the target level. - bool UnderTargetLevel() const; - - // Checks if |timestamp_leap| is so long into the future that a reset due - // to exceeding kReinitAfterExpands will be done. - bool ReinitAfterExpands(uint32_t timestamp_leap) const; - - // Checks if we still have not done enough expands to cover the distance from - // the last decoded packet to the next available packet, the distance beeing - // conveyed in |timestamp_leap|. - bool PacketTooEarly(uint32_t timestamp_leap) const; - - // Checks if num_consecutive_expands_ >= kMaxWaitForPacket. - bool MaxWaitForPacket() const; - - RTC_DISALLOW_COPY_AND_ASSIGN(DecisionLogicNormal); -}; - -} // namespace webrtc -#endif // WEBRTC_MODULES_AUDIO_CODING_NETEQ_DECISION_LOGIC_NORMAL_H_ diff --git a/WebRtc.NET/include/webrtc/modules/audio_coding/neteq/decoder_database.h b/WebRtc.NET/include/webrtc/modules/audio_coding/neteq/decoder_database.h deleted file mode 100644 index 83789daa..00000000 --- a/WebRtc.NET/include/webrtc/modules/audio_coding/neteq/decoder_database.h +++ /dev/null @@ -1,240 +0,0 @@ -/* - * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MODULES_AUDIO_CODING_NETEQ_DECODER_DATABASE_H_ -#define WEBRTC_MODULES_AUDIO_CODING_NETEQ_DECODER_DATABASE_H_ - -#include -#include -#include - -#include "webrtc/base/constructormagic.h" -#include "webrtc/common_types.h" // NULL -#include "webrtc/modules/audio_coding/codecs/audio_decoder_factory.h" -#include "webrtc/modules/audio_coding/codecs/audio_format.h" -#include "webrtc/modules/audio_coding/codecs/cng/webrtc_cng.h" -#include "webrtc/modules/audio_coding/neteq/audio_decoder_impl.h" -#include "webrtc/modules/audio_coding/neteq/packet.h" -#include "webrtc/typedefs.h" - -namespace webrtc { - -class DecoderDatabase { - public: - enum DatabaseReturnCodes { - kOK = 0, - kInvalidRtpPayloadType = -1, - kCodecNotSupported = -2, - kInvalidSampleRate = -3, - kDecoderExists = -4, - kDecoderNotFound = -5, - kInvalidPointer = -6 - }; - - // Class that stores decoder info in the database. - class DecoderInfo { - public: - DecoderInfo(const SdpAudioFormat& audio_format, - AudioDecoderFactory* factory, - const std::string& codec_name); - explicit DecoderInfo(const SdpAudioFormat& audio_format, - AudioDecoderFactory* factory = nullptr); - explicit DecoderInfo(NetEqDecoder ct, - AudioDecoderFactory* factory = nullptr); - DecoderInfo(const SdpAudioFormat& audio_format, - AudioDecoder* ext_dec, - const std::string& codec_name); - DecoderInfo(DecoderInfo&&); - ~DecoderInfo(); - - // Get the AudioDecoder object, creating it first if necessary. - AudioDecoder* GetDecoder() const; - - // Delete the AudioDecoder object, unless it's external. (This means we can - // always recreate it later if we need it.) - void DropDecoder() const { decoder_.reset(); } - - int SampleRateHz() const { - if (IsDtmf()) { - // DTMF has a 1:1 mapping between clock rate and sample rate. - return audio_format_.clockrate_hz; - } - const AudioDecoder* decoder = GetDecoder(); - RTC_DCHECK_EQ(1, !!decoder + !!cng_decoder_); - return decoder ? decoder->SampleRateHz() : cng_decoder_->sample_rate_hz; - } - - const SdpAudioFormat& GetFormat() const { return audio_format_; } - - // Returns true if the decoder's format is comfort noise. - bool IsComfortNoise() const { - RTC_DCHECK_EQ(!!cng_decoder_, subtype_ == Subtype::kComfortNoise); - return subtype_ == Subtype::kComfortNoise; - } - - // Returns true if the decoder's format is DTMF. - bool IsDtmf() const { - return subtype_ == Subtype::kDtmf; - } - - // Returns true if the decoder's format is RED. - bool IsRed() const { - return subtype_ == Subtype::kRed; - } - - // Returns true if the decoder's format is named |name|. - bool IsType(const char* name) const; - // Returns true if the decoder's format is named |name|. - bool IsType(const std::string& name) const; - - const std::string& get_name() const { return name_; } - - private: - // TODO(ossu): |name_| is kept here while we retain the old external - // decoder interface. Remove this once using an - // AudioDecoderFactory has supplanted the old functionality. - const std::string name_; - - const SdpAudioFormat audio_format_; - AudioDecoderFactory* const factory_; - mutable std::unique_ptr decoder_; - - // Set iff this is an external decoder. - AudioDecoder* const external_decoder_; - - // Set iff this is a comfort noise decoder. - struct CngDecoder { - static rtc::Optional Create(const SdpAudioFormat& format); - int sample_rate_hz; - }; - const rtc::Optional cng_decoder_; - - enum class Subtype : int8_t { - kNormal, - kComfortNoise, - kDtmf, - kRed - }; - - static Subtype SubtypeFromFormat(const SdpAudioFormat& format); - - const Subtype subtype_; - }; - - // Maximum value for 8 bits, and an invalid RTP payload type (since it is - // only 7 bits). - static const uint8_t kRtpPayloadTypeError = 0xFF; - - DecoderDatabase( - const rtc::scoped_refptr& decoder_factory); - - virtual ~DecoderDatabase(); - - // Returns true if the database is empty. - virtual bool Empty() const; - - // Returns the number of decoders registered in the database. - virtual int Size() const; - - // Resets the database, erasing all registered payload types, and deleting - // any AudioDecoder objects that were not externally created and inserted - // using InsertExternal(). - virtual void Reset(); - - // Registers |rtp_payload_type| as a decoder of type |codec_type|. The |name| - // is only used to populate the name field in the DecoderInfo struct in the - // database, and can be arbitrary (including empty). Returns kOK on success; - // otherwise an error code. - virtual int RegisterPayload(uint8_t rtp_payload_type, - NetEqDecoder codec_type, - const std::string& name); - - // Registers a decoder for the given payload type. Returns kOK on success; - // otherwise an error code. - virtual int RegisterPayload(int rtp_payload_type, - const SdpAudioFormat& audio_format); - - // Registers an externally created AudioDecoder object, and associates it - // as a decoder of type |codec_type| with |rtp_payload_type|. - virtual int InsertExternal(uint8_t rtp_payload_type, - NetEqDecoder codec_type, - const std::string& codec_name, - AudioDecoder* decoder); - - // Removes the entry for |rtp_payload_type| from the database. - // Returns kDecoderNotFound or kOK depending on the outcome of the operation. - virtual int Remove(uint8_t rtp_payload_type); - - // Remove all entries. - virtual void RemoveAll(); - - // Returns a pointer to the DecoderInfo struct for |rtp_payload_type|. If - // no decoder is registered with that |rtp_payload_type|, NULL is returned. - virtual const DecoderInfo* GetDecoderInfo(uint8_t rtp_payload_type) const; - - // Sets the active decoder to be |rtp_payload_type|. If this call results in a - // change of active decoder, |new_decoder| is set to true. The previous active - // decoder's AudioDecoder object is deleted. - virtual int SetActiveDecoder(uint8_t rtp_payload_type, bool* new_decoder); - - // Returns the current active decoder, or NULL if no active decoder exists. - virtual AudioDecoder* GetActiveDecoder() const; - - // Sets the active comfort noise decoder to be |rtp_payload_type|. If this - // call results in a change of active comfort noise decoder, the previous - // active decoder's AudioDecoder object is deleted. - virtual int SetActiveCngDecoder(uint8_t rtp_payload_type); - - // Returns the current active comfort noise decoder, or NULL if no active - // comfort noise decoder exists. - virtual ComfortNoiseDecoder* GetActiveCngDecoder() const; - - // The following are utility methods: they will look up DecoderInfo through - // GetDecoderInfo and call the respective method on that info object, if it - // exists. - - // Returns a pointer to the AudioDecoder object associated with - // |rtp_payload_type|, or NULL if none is registered. If the AudioDecoder - // object does not exist for that decoder, the object is created. - AudioDecoder* GetDecoder(uint8_t rtp_payload_type) const; - - // Returns if |rtp_payload_type| is registered with a format named |name|. - bool IsType(uint8_t rtp_payload_type, const char* name) const; - - // Returns if |rtp_payload_type| is registered with a format named |name|. - bool IsType(uint8_t rtp_payload_type, const std::string& name) const; - - // Returns true if |rtp_payload_type| is registered as comfort noise. - bool IsComfortNoise(uint8_t rtp_payload_type) const; - - // Returns true if |rtp_payload_type| is registered as DTMF. - bool IsDtmf(uint8_t rtp_payload_type) const; - - // Returns true if |rtp_payload_type| is registered as RED. - bool IsRed(uint8_t rtp_payload_type) const; - - // Returns kOK if all packets in |packet_list| carry payload types that are - // registered in the database. Otherwise, returns kDecoderNotFound. - int CheckPayloadTypes(const PacketList& packet_list) const; - - private: - typedef std::map DecoderMap; - - DecoderMap decoders_; - int active_decoder_type_; - int active_cng_decoder_type_; - mutable std::unique_ptr active_cng_decoder_; - rtc::scoped_refptr decoder_factory_; - - RTC_DISALLOW_COPY_AND_ASSIGN(DecoderDatabase); -}; - -} // namespace webrtc -#endif // WEBRTC_MODULES_AUDIO_CODING_NETEQ_DECODER_DATABASE_H_ diff --git a/WebRtc.NET/include/webrtc/modules/audio_coding/neteq/defines.h b/WebRtc.NET/include/webrtc/modules/audio_coding/neteq/defines.h deleted file mode 100644 index 3ed6b618..00000000 --- a/WebRtc.NET/include/webrtc/modules/audio_coding/neteq/defines.h +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MODULES_AUDIO_CODING_NETEQ_DEFINES_H_ -#define WEBRTC_MODULES_AUDIO_CODING_NETEQ_DEFINES_H_ - -namespace webrtc { - -enum Operations { - kNormal = 0, - kMerge, - kExpand, - kAccelerate, - kFastAccelerate, - kPreemptiveExpand, - kRfc3389Cng, - kRfc3389CngNoPacket, - kCodecInternalCng, - kDtmf, - kAlternativePlc, - kAlternativePlcIncreaseTimestamp, - kAudioRepetition, - kAudioRepetitionIncreaseTimestamp, - kUndefined = -1 -}; - -enum Modes { - kModeNormal = 0, - kModeExpand, - kModeMerge, - kModeAccelerateSuccess, - kModeAccelerateLowEnergy, - kModeAccelerateFail, - kModePreemptiveExpandSuccess, - kModePreemptiveExpandLowEnergy, - kModePreemptiveExpandFail, - kModeRfc3389Cng, - kModeCodecInternalCng, - kModeDtmf, - kModeError, - kModeUndefined = -1 -}; - -} // namespace webrtc -#endif // WEBRTC_MODULES_AUDIO_CODING_NETEQ_DEFINES_H_ diff --git a/WebRtc.NET/include/webrtc/modules/audio_coding/neteq/include/neteq.h b/WebRtc.NET/include/webrtc/modules/audio_coding/neteq/include/neteq.h deleted file mode 100644 index ea059405..00000000 --- a/WebRtc.NET/include/webrtc/modules/audio_coding/neteq/include/neteq.h +++ /dev/null @@ -1,311 +0,0 @@ -/* - * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MODULES_AUDIO_CODING_NETEQ_INCLUDE_NETEQ_H_ -#define WEBRTC_MODULES_AUDIO_CODING_NETEQ_INCLUDE_NETEQ_H_ - -#include // Provide access to size_t. - -#include - -#include "webrtc/base/constructormagic.h" -#include "webrtc/base/optional.h" -#include "webrtc/base/scoped_ref_ptr.h" -#include "webrtc/common_types.h" -#include "webrtc/modules/audio_coding/neteq/audio_decoder_impl.h" -#include "webrtc/typedefs.h" - -namespace webrtc { - -// Forward declarations. -class AudioFrame; -struct WebRtcRTPHeader; -class AudioDecoderFactory; - -struct NetEqNetworkStatistics { - uint16_t current_buffer_size_ms; // Current jitter buffer size in ms. - uint16_t preferred_buffer_size_ms; // Target buffer size in ms. - uint16_t jitter_peaks_found; // 1 if adding extra delay due to peaky - // jitter; 0 otherwise. - uint16_t packet_loss_rate; // Loss rate (network + late) in Q14. - uint16_t packet_discard_rate; // Late loss rate in Q14. - uint16_t expand_rate; // Fraction (of original stream) of synthesized - // audio inserted through expansion (in Q14). - uint16_t speech_expand_rate; // Fraction (of original stream) of synthesized - // speech inserted through expansion (in Q14). - uint16_t preemptive_rate; // Fraction of data inserted through pre-emptive - // expansion (in Q14). - uint16_t accelerate_rate; // Fraction of data removed through acceleration - // (in Q14). - uint16_t secondary_decoded_rate; // Fraction of data coming from secondary - // decoding (in Q14). - int32_t clockdrift_ppm; // Average clock-drift in parts-per-million - // (positive or negative). - size_t added_zero_samples; // Number of zero samples added in "off" mode. - // Statistics for packet waiting times, i.e., the time between a packet - // arrives until it is decoded. - int mean_waiting_time_ms; - int median_waiting_time_ms; - int min_waiting_time_ms; - int max_waiting_time_ms; -}; - -enum NetEqPlayoutMode { - kPlayoutOn, - kPlayoutOff, - kPlayoutFax, - kPlayoutStreaming -}; - -// This is the interface class for NetEq. -class NetEq { - public: - enum BackgroundNoiseMode { - kBgnOn, // Default behavior with eternal noise. - kBgnFade, // Noise fades to zero after some time. - kBgnOff // Background noise is always zero. - }; - - struct Config { - Config() - : sample_rate_hz(16000), - enable_post_decode_vad(false), - max_packets_in_buffer(50), - // |max_delay_ms| has the same effect as calling SetMaximumDelay(). - max_delay_ms(2000), - background_noise_mode(kBgnOff), - playout_mode(kPlayoutOn), - enable_fast_accelerate(false) {} - - std::string ToString() const; - - int sample_rate_hz; // Initial value. Will change with input data. - bool enable_post_decode_vad; - size_t max_packets_in_buffer; - int max_delay_ms; - BackgroundNoiseMode background_noise_mode; - NetEqPlayoutMode playout_mode; - bool enable_fast_accelerate; - bool enable_muted_state = false; - }; - - enum ReturnCodes { - kOK = 0, - kFail = -1, - kNotImplemented = -2 - }; - - enum ErrorCodes { - kNoError = 0, - kOtherError, - kInvalidRtpPayloadType, - kUnknownRtpPayloadType, - kCodecNotSupported, - kDecoderExists, - kDecoderNotFound, - kInvalidSampleRate, - kInvalidPointer, - kAccelerateError, - kPreemptiveExpandError, - kComfortNoiseErrorCode, - kDecoderErrorCode, - kOtherDecoderError, - kInvalidOperation, - kDtmfParameterError, - kDtmfParsingError, - kDtmfInsertError, - kStereoNotSupported, - kSampleUnderrun, - kDecodedTooMuch, - kRedundancySplitError, - kPacketBufferCorruption - }; - - // Creates a new NetEq object, with parameters set in |config|. The |config| - // object will only have to be valid for the duration of the call to this - // method. - static NetEq* Create( - const NetEq::Config& config, - const rtc::scoped_refptr& decoder_factory); - - virtual ~NetEq() {} - - // Inserts a new packet into NetEq. The |receive_timestamp| is an indication - // of the time when the packet was received, and should be measured with - // the same tick rate as the RTP timestamp of the current payload. - // Returns 0 on success, -1 on failure. - virtual int InsertPacket(const WebRtcRTPHeader& rtp_header, - rtc::ArrayView payload, - uint32_t receive_timestamp) = 0; - - // Instructs NetEq to deliver 10 ms of audio data. The data is written to - // |audio_frame|. All data in |audio_frame| is wiped; |data_|, |speech_type_|, - // |num_channels_|, |sample_rate_hz_|, |samples_per_channel_|, and - // |vad_activity_| are updated upon success. If an error is returned, some - // fields may not have been updated, or may contain inconsistent values. - // If muted state is enabled (through Config::enable_muted_state), |muted| - // may be set to true after a prolonged expand period. When this happens, the - // |data_| in |audio_frame| is not written, but should be interpreted as being - // all zeros. - // Returns kOK on success, or kFail in case of an error. - virtual int GetAudio(AudioFrame* audio_frame, bool* muted) = 0; - - // Associates |rtp_payload_type| with |codec| and |codec_name|, and stores the - // information in the codec database. Returns 0 on success, -1 on failure. - // The name is only used to provide information back to the caller about the - // decoders. Hence, the name is arbitrary, and may be empty. - virtual int RegisterPayloadType(NetEqDecoder codec, - const std::string& codec_name, - uint8_t rtp_payload_type) = 0; - - // Provides an externally created decoder object |decoder| to insert in the - // decoder database. The decoder implements a decoder of type |codec| and - // associates it with |rtp_payload_type| and |codec_name|. Returns kOK on - // success, kFail on failure. The name is only used to provide information - // back to the caller about the decoders. Hence, the name is arbitrary, and - // may be empty. - virtual int RegisterExternalDecoder(AudioDecoder* decoder, - NetEqDecoder codec, - const std::string& codec_name, - uint8_t rtp_payload_type) = 0; - - // Associates |rtp_payload_type| with the given codec, which NetEq will - // instantiate when it needs it. Returns true iff successful. - virtual bool RegisterPayloadType(int rtp_payload_type, - const SdpAudioFormat& audio_format) = 0; - - // Removes |rtp_payload_type| from the codec database. Returns 0 on success, - // -1 on failure. - virtual int RemovePayloadType(uint8_t rtp_payload_type) = 0; - - // Removes all payload types from the codec database. - virtual void RemoveAllPayloadTypes() = 0; - - // Sets a minimum delay in millisecond for packet buffer. The minimum is - // maintained unless a higher latency is dictated by channel condition. - // Returns true if the minimum is successfully applied, otherwise false is - // returned. - virtual bool SetMinimumDelay(int delay_ms) = 0; - - // Sets a maximum delay in milliseconds for packet buffer. The latency will - // not exceed the given value, even required delay (given the channel - // conditions) is higher. Calling this method has the same effect as setting - // the |max_delay_ms| value in the NetEq::Config struct. - virtual bool SetMaximumDelay(int delay_ms) = 0; - - // The smallest latency required. This is computed bases on inter-arrival - // time and internal NetEq logic. Note that in computing this latency none of - // the user defined limits (applied by calling setMinimumDelay() and/or - // SetMaximumDelay()) are applied. - virtual int LeastRequiredDelayMs() const = 0; - - // Not implemented. - virtual int SetTargetDelay() = 0; - - // Not implemented. - virtual int TargetDelay() = 0; - - // Returns the current total delay (packet buffer and sync buffer) in ms. - virtual int CurrentDelayMs() const = 0; - - // Returns the current total delay (packet buffer and sync buffer) in ms, - // with smoothing applied to even out short-time fluctuations due to jitter. - // The packet buffer part of the delay is not updated during DTX/CNG periods. - virtual int FilteredCurrentDelayMs() const = 0; - - // Sets the playout mode to |mode|. - // Deprecated. Set the mode in the Config struct passed to the constructor. - // TODO(henrik.lundin) Delete. - virtual void SetPlayoutMode(NetEqPlayoutMode mode) = 0; - - // Returns the current playout mode. - // Deprecated. - // TODO(henrik.lundin) Delete. - virtual NetEqPlayoutMode PlayoutMode() const = 0; - - // Writes the current network statistics to |stats|. The statistics are reset - // after the call. - virtual int NetworkStatistics(NetEqNetworkStatistics* stats) = 0; - - // Writes the current RTCP statistics to |stats|. The statistics are reset - // and a new report period is started with the call. - virtual void GetRtcpStatistics(RtcpStatistics* stats) = 0; - - // Same as RtcpStatistics(), but does not reset anything. - virtual void GetRtcpStatisticsNoReset(RtcpStatistics* stats) = 0; - - // Enables post-decode VAD. When enabled, GetAudio() will return - // kOutputVADPassive when the signal contains no speech. - virtual void EnableVad() = 0; - - // Disables post-decode VAD. - virtual void DisableVad() = 0; - - // Returns the RTP timestamp for the last sample delivered by GetAudio(). - // The return value will be empty if no valid timestamp is available. - virtual rtc::Optional GetPlayoutTimestamp() const = 0; - - // Returns the sample rate in Hz of the audio produced in the last GetAudio - // call. If GetAudio has not been called yet, the configured sample rate - // (Config::sample_rate_hz) is returned. - virtual int last_output_sample_rate_hz() const = 0; - - // Returns info about the decoder for the given payload type, or an empty - // value if we have no decoder for that payload type. - virtual rtc::Optional GetDecoder(int payload_type) const = 0; - - // Returns the decoder format for the given payload type. Returns empty if no - // such payload type was registered. - virtual rtc::Optional GetDecoderFormat( - int payload_type) const = 0; - - // Not implemented. - virtual int SetTargetNumberOfChannels() = 0; - - // Not implemented. - virtual int SetTargetSampleRate() = 0; - - // Returns the error code for the last occurred error. If no error has - // occurred, 0 is returned. - virtual int LastError() const = 0; - - // Returns the error code last returned by a decoder (audio or comfort noise). - // When LastError() returns kDecoderErrorCode or kComfortNoiseErrorCode, check - // this method to get the decoder's error code. - virtual int LastDecoderError() = 0; - - // Flushes both the packet buffer and the sync buffer. - virtual void FlushBuffers() = 0; - - // Current usage of packet-buffer and it's limits. - virtual void PacketBufferStatistics(int* current_num_packets, - int* max_num_packets) const = 0; - - // Enables NACK and sets the maximum size of the NACK list, which should be - // positive and no larger than Nack::kNackListSizeLimit. If NACK is already - // enabled then the maximum NACK list size is modified accordingly. - virtual void EnableNack(size_t max_nack_list_size) = 0; - - virtual void DisableNack() = 0; - - // Returns a list of RTP sequence numbers corresponding to packets to be - // retransmitted, given an estimate of the round-trip time in milliseconds. - virtual std::vector GetNackList( - int64_t round_trip_time_ms) const = 0; - - protected: - NetEq() {} - - private: - RTC_DISALLOW_COPY_AND_ASSIGN(NetEq); -}; - -} // namespace webrtc -#endif // WEBRTC_MODULES_AUDIO_CODING_NETEQ_INCLUDE_NETEQ_H_ diff --git a/WebRtc.NET/include/webrtc/modules/audio_coding/neteq/mock/mock_audio_decoder.h b/WebRtc.NET/include/webrtc/modules/audio_coding/neteq/mock/mock_audio_decoder.h deleted file mode 100644 index 64eeed19..00000000 --- a/WebRtc.NET/include/webrtc/modules/audio_coding/neteq/mock/mock_audio_decoder.h +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MODULES_AUDIO_CODING_NETEQ_MOCK_MOCK_AUDIO_DECODER_H_ -#define WEBRTC_MODULES_AUDIO_CODING_NETEQ_MOCK_MOCK_AUDIO_DECODER_H_ - -#include "webrtc/modules/audio_coding/codecs/audio_decoder.h" - -#include "webrtc/test/gmock.h" - -namespace webrtc { - -class MockAudioDecoder : public AudioDecoder { - public: - MockAudioDecoder() {} - virtual ~MockAudioDecoder() { Die(); } - MOCK_METHOD0(Die, void()); - MOCK_METHOD5(DecodeInternal, - int(const uint8_t*, size_t, int, int16_t*, SpeechType*)); - MOCK_CONST_METHOD0(HasDecodePlc, bool()); - MOCK_METHOD2(DecodePlc, size_t(size_t, int16_t*)); - MOCK_METHOD0(Reset, void()); - MOCK_METHOD5(IncomingPacket, int(const uint8_t*, size_t, uint16_t, uint32_t, - uint32_t)); - MOCK_METHOD0(ErrorCode, int()); - MOCK_CONST_METHOD2(PacketDuration, int(const uint8_t*, size_t)); - MOCK_CONST_METHOD0(Channels, size_t()); - MOCK_CONST_METHOD0(SampleRateHz, int()); -}; - -} // namespace webrtc -#endif // WEBRTC_MODULES_AUDIO_CODING_NETEQ_MOCK_MOCK_AUDIO_DECODER_H_ diff --git a/WebRtc.NET/include/webrtc/modules/audio_coding/neteq/mock/mock_buffer_level_filter.h b/WebRtc.NET/include/webrtc/modules/audio_coding/neteq/mock/mock_buffer_level_filter.h deleted file mode 100644 index da228459..00000000 --- a/WebRtc.NET/include/webrtc/modules/audio_coding/neteq/mock/mock_buffer_level_filter.h +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MODULES_AUDIO_CODING_NETEQ_MOCK_MOCK_BUFFER_LEVEL_FILTER_H_ -#define WEBRTC_MODULES_AUDIO_CODING_NETEQ_MOCK_MOCK_BUFFER_LEVEL_FILTER_H_ - -#include "webrtc/modules/audio_coding/neteq/buffer_level_filter.h" - -#include "webrtc/test/gmock.h" - -namespace webrtc { - -class MockBufferLevelFilter : public BufferLevelFilter { - public: - virtual ~MockBufferLevelFilter() { Die(); } - MOCK_METHOD0(Die, - void()); - MOCK_METHOD0(Reset, - void()); - MOCK_METHOD3(Update, - void(size_t buffer_size_packets, int time_stretched_samples, - size_t packet_len_samples)); - MOCK_METHOD1(SetTargetBufferLevel, - void(int target_buffer_level)); - MOCK_CONST_METHOD0(filtered_current_level, - int()); -}; - -} // namespace webrtc -#endif // WEBRTC_MODULES_AUDIO_CODING_NETEQ_MOCK_MOCK_BUFFER_LEVEL_FILTER_H_ diff --git a/WebRtc.NET/include/webrtc/modules/audio_coding/neteq/mock/mock_decoder_database.h b/WebRtc.NET/include/webrtc/modules/audio_coding/neteq/mock/mock_decoder_database.h deleted file mode 100644 index 40188791..00000000 --- a/WebRtc.NET/include/webrtc/modules/audio_coding/neteq/mock/mock_decoder_database.h +++ /dev/null @@ -1,61 +0,0 @@ -/* - * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MODULES_AUDIO_CODING_NETEQ_MOCK_MOCK_DECODER_DATABASE_H_ -#define WEBRTC_MODULES_AUDIO_CODING_NETEQ_MOCK_MOCK_DECODER_DATABASE_H_ - -#include - -#include "webrtc/modules/audio_coding/neteq/decoder_database.h" - -#include "webrtc/test/gmock.h" - -namespace webrtc { - -class MockDecoderDatabase : public DecoderDatabase { - public: - explicit MockDecoderDatabase( - rtc::scoped_refptr factory = nullptr) - : DecoderDatabase(factory) {} - virtual ~MockDecoderDatabase() { Die(); } - MOCK_METHOD0(Die, void()); - MOCK_CONST_METHOD0(Empty, - bool()); - MOCK_CONST_METHOD0(Size, - int()); - MOCK_METHOD0(Reset, - void()); - MOCK_METHOD3(RegisterPayload, - int(uint8_t rtp_payload_type, NetEqDecoder codec_type, - const std::string& name)); - MOCK_METHOD2(RegisterPayload, - int(int rtp_payload_type, const SdpAudioFormat& audio_format)); - MOCK_METHOD4(InsertExternal, - int(uint8_t rtp_payload_type, - NetEqDecoder codec_type, - const std::string& codec_name, - AudioDecoder* decoder)); - MOCK_METHOD1(Remove, - int(uint8_t rtp_payload_type)); - MOCK_METHOD0(RemoveAll, void()); - MOCK_CONST_METHOD1(GetDecoderInfo, - const DecoderInfo*(uint8_t rtp_payload_type)); - MOCK_METHOD2(SetActiveDecoder, - int(uint8_t rtp_payload_type, bool* new_decoder)); - MOCK_CONST_METHOD0(GetActiveDecoder, - AudioDecoder*()); - MOCK_METHOD1(SetActiveCngDecoder, - int(uint8_t rtp_payload_type)); - MOCK_CONST_METHOD0(GetActiveCngDecoder, - ComfortNoiseDecoder*()); -}; - -} // namespace webrtc -#endif // WEBRTC_MODULES_AUDIO_CODING_NETEQ_MOCK_MOCK_DECODER_DATABASE_H_ diff --git a/WebRtc.NET/include/webrtc/modules/audio_coding/neteq/mock/mock_delay_manager.h b/WebRtc.NET/include/webrtc/modules/audio_coding/neteq/mock/mock_delay_manager.h deleted file mode 100644 index 7a66b68c..00000000 --- a/WebRtc.NET/include/webrtc/modules/audio_coding/neteq/mock/mock_delay_manager.h +++ /dev/null @@ -1,61 +0,0 @@ -/* - * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MODULES_AUDIO_CODING_NETEQ_MOCK_MOCK_DELAY_MANAGER_H_ -#define WEBRTC_MODULES_AUDIO_CODING_NETEQ_MOCK_MOCK_DELAY_MANAGER_H_ - -#include "webrtc/modules/audio_coding/neteq/delay_manager.h" - -#include "webrtc/test/gmock.h" - -namespace webrtc { - -class MockDelayManager : public DelayManager { - public: - MockDelayManager(size_t max_packets_in_buffer, - DelayPeakDetector* peak_detector, - const TickTimer* tick_timer) - : DelayManager(max_packets_in_buffer, peak_detector, tick_timer) {} - virtual ~MockDelayManager() { Die(); } - MOCK_METHOD0(Die, void()); - MOCK_CONST_METHOD0(iat_vector, - const IATVector&()); - MOCK_METHOD3(Update, - int(uint16_t sequence_number, uint32_t timestamp, int sample_rate_hz)); - MOCK_METHOD1(CalculateTargetLevel, - int(int iat_packets)); - MOCK_METHOD1(SetPacketAudioLength, - int(int length_ms)); - MOCK_METHOD0(Reset, - void()); - MOCK_CONST_METHOD0(PeakFound, - bool()); - MOCK_METHOD1(UpdateCounters, - void(int elapsed_time_ms)); - MOCK_METHOD0(ResetPacketIatCount, - void()); - MOCK_CONST_METHOD2(BufferLimits, - void(int* lower_limit, int* higher_limit)); - MOCK_CONST_METHOD0(TargetLevel, - int()); - MOCK_METHOD1(set_extra_delay_ms, - void(int16_t delay)); - MOCK_CONST_METHOD0(base_target_level, - int()); - MOCK_METHOD1(set_streaming_mode, - void(bool value)); - MOCK_CONST_METHOD0(last_pack_cng_or_dtmf, - int()); - MOCK_METHOD1(set_last_pack_cng_or_dtmf, - void(int value)); -}; - -} // namespace webrtc -#endif // WEBRTC_MODULES_AUDIO_CODING_NETEQ_MOCK_MOCK_DELAY_MANAGER_H_ diff --git a/WebRtc.NET/include/webrtc/modules/audio_coding/neteq/mock/mock_dtmf_buffer.h b/WebRtc.NET/include/webrtc/modules/audio_coding/neteq/mock/mock_dtmf_buffer.h deleted file mode 100644 index 0aac22c5..00000000 --- a/WebRtc.NET/include/webrtc/modules/audio_coding/neteq/mock/mock_dtmf_buffer.h +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MODULES_AUDIO_CODING_NETEQ_MOCK_MOCK_DTMF_BUFFER_H_ -#define WEBRTC_MODULES_AUDIO_CODING_NETEQ_MOCK_MOCK_DTMF_BUFFER_H_ - -#include "webrtc/modules/audio_coding/neteq/dtmf_buffer.h" - -#include "webrtc/test/gmock.h" - -namespace webrtc { - -class MockDtmfBuffer : public DtmfBuffer { - public: - MockDtmfBuffer(int fs) : DtmfBuffer(fs) {} - virtual ~MockDtmfBuffer() { Die(); } - MOCK_METHOD0(Die, void()); - MOCK_METHOD0(Flush, - void()); - MOCK_METHOD1(InsertEvent, - int(const DtmfEvent& event)); - MOCK_METHOD2(GetEvent, - bool(uint32_t current_timestamp, DtmfEvent* event)); - MOCK_CONST_METHOD0(Length, - size_t()); - MOCK_CONST_METHOD0(Empty, - bool()); -}; - -} // namespace webrtc -#endif // WEBRTC_MODULES_AUDIO_CODING_NETEQ_MOCK_MOCK_DTMF_BUFFER_H_ diff --git a/WebRtc.NET/include/webrtc/modules/audio_coding/neteq/mock/mock_dtmf_tone_generator.h b/WebRtc.NET/include/webrtc/modules/audio_coding/neteq/mock/mock_dtmf_tone_generator.h deleted file mode 100644 index bb0a5352..00000000 --- a/WebRtc.NET/include/webrtc/modules/audio_coding/neteq/mock/mock_dtmf_tone_generator.h +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MODULES_AUDIO_CODING_NETEQ_MOCK_MOCK_DTMF_TONE_GENERATOR_H_ -#define WEBRTC_MODULES_AUDIO_CODING_NETEQ_MOCK_MOCK_DTMF_TONE_GENERATOR_H_ - -#include "webrtc/modules/audio_coding/neteq/dtmf_tone_generator.h" - -#include "webrtc/test/gmock.h" - -namespace webrtc { - -class MockDtmfToneGenerator : public DtmfToneGenerator { - public: - virtual ~MockDtmfToneGenerator() { Die(); } - MOCK_METHOD0(Die, void()); - MOCK_METHOD3(Init, - int(int fs, int event, int attenuation)); - MOCK_METHOD0(Reset, - void()); - MOCK_METHOD2(Generate, - int(size_t num_samples, AudioMultiVector* output)); - MOCK_CONST_METHOD0(initialized, - bool()); -}; - -} // namespace webrtc -#endif // WEBRTC_MODULES_AUDIO_CODING_NETEQ_MOCK_MOCK_DTMF_TONE_GENERATOR_H_ diff --git a/WebRtc.NET/include/webrtc/modules/audio_coding/neteq/mock/mock_expand.h b/WebRtc.NET/include/webrtc/modules/audio_coding/neteq/mock/mock_expand.h deleted file mode 100644 index 9465f6f5..00000000 --- a/WebRtc.NET/include/webrtc/modules/audio_coding/neteq/mock/mock_expand.h +++ /dev/null @@ -1,64 +0,0 @@ -/* - * Copyright (c) 2014 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MODULES_AUDIO_CODING_NETEQ_MOCK_MOCK_EXPAND_H_ -#define WEBRTC_MODULES_AUDIO_CODING_NETEQ_MOCK_MOCK_EXPAND_H_ - -#include "webrtc/modules/audio_coding/neteq/expand.h" - -#include "webrtc/test/gmock.h" - -namespace webrtc { - -class MockExpand : public Expand { - public: - MockExpand(BackgroundNoise* background_noise, - SyncBuffer* sync_buffer, - RandomVector* random_vector, - StatisticsCalculator* statistics, - int fs, - size_t num_channels) - : Expand(background_noise, - sync_buffer, - random_vector, - statistics, - fs, - num_channels) {} - virtual ~MockExpand() { Die(); } - MOCK_METHOD0(Die, void()); - MOCK_METHOD0(Reset, - void()); - MOCK_METHOD1(Process, - int(AudioMultiVector* output)); - MOCK_METHOD0(SetParametersForNormalAfterExpand, - void()); - MOCK_METHOD0(SetParametersForMergeAfterExpand, - void()); - MOCK_CONST_METHOD0(overlap_length, - size_t()); -}; - -} // namespace webrtc - -namespace webrtc { - -class MockExpandFactory : public ExpandFactory { - public: - MOCK_CONST_METHOD6(Create, - Expand*(BackgroundNoise* background_noise, - SyncBuffer* sync_buffer, - RandomVector* random_vector, - StatisticsCalculator* statistics, - int fs, - size_t num_channels)); -}; - -} // namespace webrtc -#endif // WEBRTC_MODULES_AUDIO_CODING_NETEQ_MOCK_MOCK_EXPAND_H_ diff --git a/WebRtc.NET/include/webrtc/modules/audio_coding/neteq/mock/mock_packet_buffer.h b/WebRtc.NET/include/webrtc/modules/audio_coding/neteq/mock/mock_packet_buffer.h deleted file mode 100644 index 5a2f7e11..00000000 --- a/WebRtc.NET/include/webrtc/modules/audio_coding/neteq/mock/mock_packet_buffer.h +++ /dev/null @@ -1,66 +0,0 @@ -/* - * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MODULES_AUDIO_CODING_NETEQ_MOCK_MOCK_PACKET_BUFFER_H_ -#define WEBRTC_MODULES_AUDIO_CODING_NETEQ_MOCK_MOCK_PACKET_BUFFER_H_ - -#include "webrtc/modules/audio_coding/neteq/packet_buffer.h" - -#include "webrtc/test/gmock.h" - -namespace webrtc { - -class MockPacketBuffer : public PacketBuffer { - public: - MockPacketBuffer(size_t max_number_of_packets, const TickTimer* tick_timer) - : PacketBuffer(max_number_of_packets, tick_timer) {} - virtual ~MockPacketBuffer() { Die(); } - MOCK_METHOD0(Die, void()); - MOCK_METHOD0(Flush, - void()); - MOCK_CONST_METHOD0(Empty, - bool()); - int InsertPacket(Packet&& packet) { - return InsertPacketWrapped(&packet); - } - // Since gtest does not properly support move-only types, InsertPacket is - // implemented as a wrapper. You'll have to implement InsertPacketWrapped - // instead and move from |*packet|. - MOCK_METHOD1(InsertPacketWrapped, - int(Packet* packet)); - MOCK_METHOD4(InsertPacketList, - int(PacketList* packet_list, - const DecoderDatabase& decoder_database, - rtc::Optional* current_rtp_payload_type, - rtc::Optional* current_cng_rtp_payload_type)); - MOCK_CONST_METHOD1(NextTimestamp, - int(uint32_t* next_timestamp)); - MOCK_CONST_METHOD2(NextHigherTimestamp, - int(uint32_t timestamp, uint32_t* next_timestamp)); - MOCK_CONST_METHOD0(PeekNextPacket, - const Packet*()); - MOCK_METHOD0(GetNextPacket, - rtc::Optional()); - MOCK_METHOD0(DiscardNextPacket, - int()); - MOCK_METHOD2(DiscardOldPackets, - int(uint32_t timestamp_limit, uint32_t horizon_samples)); - MOCK_METHOD1(DiscardAllOldPackets, - int(uint32_t timestamp_limit)); - MOCK_CONST_METHOD0(NumPacketsInBuffer, - size_t()); - MOCK_METHOD1(IncrementWaitingTimes, - void(int)); - MOCK_CONST_METHOD0(current_memory_bytes, - int()); -}; - -} // namespace webrtc -#endif // WEBRTC_MODULES_AUDIO_CODING_NETEQ_MOCK_MOCK_PACKET_BUFFER_H_ diff --git a/WebRtc.NET/include/webrtc/modules/audio_coding/neteq/mock/mock_red_payload_splitter.h b/WebRtc.NET/include/webrtc/modules/audio_coding/neteq/mock/mock_red_payload_splitter.h deleted file mode 100644 index 8c6e9399..00000000 --- a/WebRtc.NET/include/webrtc/modules/audio_coding/neteq/mock/mock_red_payload_splitter.h +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MODULES_AUDIO_CODING_NETEQ_MOCK_MOCK_RED_PAYLOAD_SPLITTER_H_ -#define WEBRTC_MODULES_AUDIO_CODING_NETEQ_MOCK_MOCK_RED_PAYLOAD_SPLITTER_H_ - -#include "webrtc/modules/audio_coding/neteq/red_payload_splitter.h" - -#include "webrtc/test/gmock.h" - -namespace webrtc { - -class MockRedPayloadSplitter : public RedPayloadSplitter { - public: - MOCK_METHOD1(SplitRed, bool(PacketList* packet_list)); - MOCK_METHOD2(CheckRedPayloads, - int(PacketList* packet_list, - const DecoderDatabase& decoder_database)); -}; - -} // namespace webrtc -#endif // WEBRTC_MODULES_AUDIO_CODING_NETEQ_MOCK_MOCK_RED_PAYLOAD_SPLITTER_H_ diff --git a/WebRtc.NET/include/webrtc/modules/audio_coding/neteq/neteq_impl.h b/WebRtc.NET/include/webrtc/modules/audio_coding/neteq/neteq_impl.h deleted file mode 100644 index 505f0f2a..00000000 --- a/WebRtc.NET/include/webrtc/modules/audio_coding/neteq/neteq_impl.h +++ /dev/null @@ -1,420 +0,0 @@ -/* - * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MODULES_AUDIO_CODING_NETEQ_NETEQ_IMPL_H_ -#define WEBRTC_MODULES_AUDIO_CODING_NETEQ_NETEQ_IMPL_H_ - -#include -#include - -#include "webrtc/base/constructormagic.h" -#include "webrtc/base/criticalsection.h" -#include "webrtc/base/optional.h" -#include "webrtc/base/thread_annotations.h" -#include "webrtc/modules/audio_coding/neteq/audio_multi_vector.h" -#include "webrtc/modules/audio_coding/neteq/defines.h" -#include "webrtc/modules/audio_coding/neteq/include/neteq.h" -#include "webrtc/modules/audio_coding/neteq/packet.h" // Declare PacketList. -#include "webrtc/modules/audio_coding/neteq/random_vector.h" -#include "webrtc/modules/audio_coding/neteq/rtcp.h" -#include "webrtc/modules/audio_coding/neteq/statistics_calculator.h" -#include "webrtc/modules/audio_coding/neteq/tick_timer.h" -#include "webrtc/typedefs.h" - -namespace webrtc { - -// Forward declarations. -class Accelerate; -class BackgroundNoise; -class BufferLevelFilter; -class ComfortNoise; -class DecisionLogic; -class DecoderDatabase; -class DelayManager; -class DelayPeakDetector; -class DtmfBuffer; -class DtmfToneGenerator; -class Expand; -class Merge; -class NackTracker; -class Normal; -class PacketBuffer; -class RedPayloadSplitter; -class PostDecodeVad; -class PreemptiveExpand; -class RandomVector; -class SyncBuffer; -class TimestampScaler; -struct AccelerateFactory; -struct DtmfEvent; -struct ExpandFactory; -struct PreemptiveExpandFactory; - -class NetEqImpl : public webrtc::NetEq { - public: - enum class OutputType { - kNormalSpeech, - kPLC, - kCNG, - kPLCCNG, - kVadPassive - }; - - struct Dependencies { - // The constructor populates the Dependencies struct with the default - // implementations of the objects. They can all be replaced by the user - // before sending the struct to the NetEqImpl constructor. However, there - // are dependencies between some of the classes inside the struct, so - // swapping out one may make it necessary to re-create another one. - explicit Dependencies( - const NetEq::Config& config, - const rtc::scoped_refptr& decoder_factory); - ~Dependencies(); - - std::unique_ptr tick_timer; - std::unique_ptr buffer_level_filter; - std::unique_ptr decoder_database; - std::unique_ptr delay_peak_detector; - std::unique_ptr delay_manager; - std::unique_ptr dtmf_buffer; - std::unique_ptr dtmf_tone_generator; - std::unique_ptr packet_buffer; - std::unique_ptr red_payload_splitter; - std::unique_ptr timestamp_scaler; - std::unique_ptr accelerate_factory; - std::unique_ptr expand_factory; - std::unique_ptr preemptive_expand_factory; - }; - - // Creates a new NetEqImpl object. - NetEqImpl(const NetEq::Config& config, - Dependencies&& deps, - bool create_components = true); - - ~NetEqImpl() override; - - // Inserts a new packet into NetEq. The |receive_timestamp| is an indication - // of the time when the packet was received, and should be measured with - // the same tick rate as the RTP timestamp of the current payload. - // Returns 0 on success, -1 on failure. - int InsertPacket(const WebRtcRTPHeader& rtp_header, - rtc::ArrayView payload, - uint32_t receive_timestamp) override; - - int GetAudio(AudioFrame* audio_frame, bool* muted) override; - - int RegisterPayloadType(NetEqDecoder codec, - const std::string& codec_name, - uint8_t rtp_payload_type) override; - - int RegisterExternalDecoder(AudioDecoder* decoder, - NetEqDecoder codec, - const std::string& codec_name, - uint8_t rtp_payload_type) override; - - bool RegisterPayloadType(int rtp_payload_type, - const SdpAudioFormat& audio_format) override; - - // Removes |rtp_payload_type| from the codec database. Returns 0 on success, - // -1 on failure. - int RemovePayloadType(uint8_t rtp_payload_type) override; - - void RemoveAllPayloadTypes() override; - - bool SetMinimumDelay(int delay_ms) override; - - bool SetMaximumDelay(int delay_ms) override; - - int LeastRequiredDelayMs() const override; - - int SetTargetDelay() override; - - int TargetDelay() override; - - int CurrentDelayMs() const override; - - int FilteredCurrentDelayMs() const override; - - // Sets the playout mode to |mode|. - // Deprecated. - // TODO(henrik.lundin) Delete. - void SetPlayoutMode(NetEqPlayoutMode mode) override; - - // Returns the current playout mode. - // Deprecated. - // TODO(henrik.lundin) Delete. - NetEqPlayoutMode PlayoutMode() const override; - - // Writes the current network statistics to |stats|. The statistics are reset - // after the call. - int NetworkStatistics(NetEqNetworkStatistics* stats) override; - - // Writes the current RTCP statistics to |stats|. The statistics are reset - // and a new report period is started with the call. - void GetRtcpStatistics(RtcpStatistics* stats) override; - - // Same as RtcpStatistics(), but does not reset anything. - void GetRtcpStatisticsNoReset(RtcpStatistics* stats) override; - - // Enables post-decode VAD. When enabled, GetAudio() will return - // kOutputVADPassive when the signal contains no speech. - void EnableVad() override; - - // Disables post-decode VAD. - void DisableVad() override; - - rtc::Optional GetPlayoutTimestamp() const override; - - int last_output_sample_rate_hz() const override; - - rtc::Optional GetDecoder(int payload_type) const override; - - rtc::Optional GetDecoderFormat( - int payload_type) const override; - - int SetTargetNumberOfChannels() override; - - int SetTargetSampleRate() override; - - // Returns the error code for the last occurred error. If no error has - // occurred, 0 is returned. - int LastError() const override; - - // Returns the error code last returned by a decoder (audio or comfort noise). - // When LastError() returns kDecoderErrorCode or kComfortNoiseErrorCode, check - // this method to get the decoder's error code. - int LastDecoderError() override; - - // Flushes both the packet buffer and the sync buffer. - void FlushBuffers() override; - - void PacketBufferStatistics(int* current_num_packets, - int* max_num_packets) const override; - - void EnableNack(size_t max_nack_list_size) override; - - void DisableNack() override; - - std::vector GetNackList(int64_t round_trip_time_ms) const override; - - // This accessor method is only intended for testing purposes. - const SyncBuffer* sync_buffer_for_test() const; - Operations last_operation_for_test() const; - - protected: - static const int kOutputSizeMs = 10; - static const size_t kMaxFrameSize = 5760; // 120 ms @ 48 kHz. - // TODO(hlundin): Provide a better value for kSyncBufferSize. - // Current value is kMaxFrameSize + 60 ms * 48 kHz, which is enough for - // calculating correlations of current frame against history. - static const size_t kSyncBufferSize = kMaxFrameSize + 60 * 48; - - // Inserts a new packet into NetEq. This is used by the InsertPacket method - // above. Returns 0 on success, otherwise an error code. - // TODO(hlundin): Merge this with InsertPacket above? - int InsertPacketInternal(const WebRtcRTPHeader& rtp_header, - rtc::ArrayView payload, - uint32_t receive_timestamp) - EXCLUSIVE_LOCKS_REQUIRED(crit_sect_); - - // Delivers 10 ms of audio data. The data is written to |audio_frame|. - // Returns 0 on success, otherwise an error code. - int GetAudioInternal(AudioFrame* audio_frame, bool* muted) - EXCLUSIVE_LOCKS_REQUIRED(crit_sect_); - - // Provides a decision to the GetAudioInternal method. The decision what to - // do is written to |operation|. Packets to decode are written to - // |packet_list|, and a DTMF event to play is written to |dtmf_event|. When - // DTMF should be played, |play_dtmf| is set to true by the method. - // Returns 0 on success, otherwise an error code. - int GetDecision(Operations* operation, - PacketList* packet_list, - DtmfEvent* dtmf_event, - bool* play_dtmf) EXCLUSIVE_LOCKS_REQUIRED(crit_sect_); - - // Decodes the speech packets in |packet_list|, and writes the results to - // |decoded_buffer|, which is allocated to hold |decoded_buffer_length| - // elements. The length of the decoded data is written to |decoded_length|. - // The speech type -- speech or (codec-internal) comfort noise -- is written - // to |speech_type|. If |packet_list| contains any SID frames for RFC 3389 - // comfort noise, those are not decoded. - int Decode(PacketList* packet_list, - Operations* operation, - int* decoded_length, - AudioDecoder::SpeechType* speech_type) - EXCLUSIVE_LOCKS_REQUIRED(crit_sect_); - - // Sub-method to Decode(). Performs codec internal CNG. - int DecodeCng(AudioDecoder* decoder, int* decoded_length, - AudioDecoder::SpeechType* speech_type) - EXCLUSIVE_LOCKS_REQUIRED(crit_sect_); - - // Sub-method to Decode(). Performs the actual decoding. - int DecodeLoop(PacketList* packet_list, - const Operations& operation, - AudioDecoder* decoder, - int* decoded_length, - AudioDecoder::SpeechType* speech_type) - EXCLUSIVE_LOCKS_REQUIRED(crit_sect_); - - // Sub-method which calls the Normal class to perform the normal operation. - void DoNormal(const int16_t* decoded_buffer, - size_t decoded_length, - AudioDecoder::SpeechType speech_type, - bool play_dtmf) EXCLUSIVE_LOCKS_REQUIRED(crit_sect_); - - // Sub-method which calls the Merge class to perform the merge operation. - void DoMerge(int16_t* decoded_buffer, - size_t decoded_length, - AudioDecoder::SpeechType speech_type, - bool play_dtmf) EXCLUSIVE_LOCKS_REQUIRED(crit_sect_); - - // Sub-method which calls the Expand class to perform the expand operation. - int DoExpand(bool play_dtmf) EXCLUSIVE_LOCKS_REQUIRED(crit_sect_); - - // Sub-method which calls the Accelerate class to perform the accelerate - // operation. - int DoAccelerate(int16_t* decoded_buffer, - size_t decoded_length, - AudioDecoder::SpeechType speech_type, - bool play_dtmf, - bool fast_accelerate) EXCLUSIVE_LOCKS_REQUIRED(crit_sect_); - - // Sub-method which calls the PreemptiveExpand class to perform the - // preemtive expand operation. - int DoPreemptiveExpand(int16_t* decoded_buffer, - size_t decoded_length, - AudioDecoder::SpeechType speech_type, - bool play_dtmf) EXCLUSIVE_LOCKS_REQUIRED(crit_sect_); - - // Sub-method which calls the ComfortNoise class to generate RFC 3389 comfort - // noise. |packet_list| can either contain one SID frame to update the - // noise parameters, or no payload at all, in which case the previously - // received parameters are used. - int DoRfc3389Cng(PacketList* packet_list, bool play_dtmf) - EXCLUSIVE_LOCKS_REQUIRED(crit_sect_); - - // Calls the audio decoder to generate codec-internal comfort noise when - // no packet was received. - void DoCodecInternalCng(const int16_t* decoded_buffer, size_t decoded_length) - EXCLUSIVE_LOCKS_REQUIRED(crit_sect_); - - // Calls the DtmfToneGenerator class to generate DTMF tones. - int DoDtmf(const DtmfEvent& dtmf_event, bool* play_dtmf) - EXCLUSIVE_LOCKS_REQUIRED(crit_sect_); - - // Produces packet-loss concealment using alternative methods. If the codec - // has an internal PLC, it is called to generate samples. Otherwise, the - // method performs zero-stuffing. - void DoAlternativePlc(bool increase_timestamp) - EXCLUSIVE_LOCKS_REQUIRED(crit_sect_); - - // Overdub DTMF on top of |output|. - int DtmfOverdub(const DtmfEvent& dtmf_event, - size_t num_channels, - int16_t* output) const EXCLUSIVE_LOCKS_REQUIRED(crit_sect_); - - // Extracts packets from |packet_buffer_| to produce at least - // |required_samples| samples. The packets are inserted into |packet_list|. - // Returns the number of samples that the packets in the list will produce, or - // -1 in case of an error. - int ExtractPackets(size_t required_samples, PacketList* packet_list) - EXCLUSIVE_LOCKS_REQUIRED(crit_sect_); - - // Resets various variables and objects to new values based on the sample rate - // |fs_hz| and |channels| number audio channels. - void SetSampleRateAndChannels(int fs_hz, size_t channels) - EXCLUSIVE_LOCKS_REQUIRED(crit_sect_); - - // Returns the output type for the audio produced by the latest call to - // GetAudio(). - OutputType LastOutputType() EXCLUSIVE_LOCKS_REQUIRED(crit_sect_); - - // Updates Expand and Merge. - virtual void UpdatePlcComponents(int fs_hz, size_t channels) - EXCLUSIVE_LOCKS_REQUIRED(crit_sect_); - - // Creates DecisionLogic object with the mode given by |playout_mode_|. - virtual void CreateDecisionLogic() EXCLUSIVE_LOCKS_REQUIRED(crit_sect_); - - rtc::CriticalSection crit_sect_; - const std::unique_ptr tick_timer_ GUARDED_BY(crit_sect_); - const std::unique_ptr buffer_level_filter_ - GUARDED_BY(crit_sect_); - const std::unique_ptr decoder_database_ - GUARDED_BY(crit_sect_); - const std::unique_ptr delay_manager_ GUARDED_BY(crit_sect_); - const std::unique_ptr delay_peak_detector_ - GUARDED_BY(crit_sect_); - const std::unique_ptr dtmf_buffer_ GUARDED_BY(crit_sect_); - const std::unique_ptr dtmf_tone_generator_ - GUARDED_BY(crit_sect_); - const std::unique_ptr packet_buffer_ GUARDED_BY(crit_sect_); - const std::unique_ptr red_payload_splitter_ - GUARDED_BY(crit_sect_); - const std::unique_ptr timestamp_scaler_ - GUARDED_BY(crit_sect_); - const std::unique_ptr vad_ GUARDED_BY(crit_sect_); - const std::unique_ptr expand_factory_ GUARDED_BY(crit_sect_); - const std::unique_ptr accelerate_factory_ - GUARDED_BY(crit_sect_); - const std::unique_ptr preemptive_expand_factory_ - GUARDED_BY(crit_sect_); - - std::unique_ptr background_noise_ GUARDED_BY(crit_sect_); - std::unique_ptr decision_logic_ GUARDED_BY(crit_sect_); - std::unique_ptr algorithm_buffer_ GUARDED_BY(crit_sect_); - std::unique_ptr sync_buffer_ GUARDED_BY(crit_sect_); - std::unique_ptr expand_ GUARDED_BY(crit_sect_); - std::unique_ptr normal_ GUARDED_BY(crit_sect_); - std::unique_ptr merge_ GUARDED_BY(crit_sect_); - std::unique_ptr accelerate_ GUARDED_BY(crit_sect_); - std::unique_ptr preemptive_expand_ GUARDED_BY(crit_sect_); - RandomVector random_vector_ GUARDED_BY(crit_sect_); - std::unique_ptr comfort_noise_ GUARDED_BY(crit_sect_); - Rtcp rtcp_ GUARDED_BY(crit_sect_); - StatisticsCalculator stats_ GUARDED_BY(crit_sect_); - int fs_hz_ GUARDED_BY(crit_sect_); - int fs_mult_ GUARDED_BY(crit_sect_); - int last_output_sample_rate_hz_ GUARDED_BY(crit_sect_); - size_t output_size_samples_ GUARDED_BY(crit_sect_); - size_t decoder_frame_length_ GUARDED_BY(crit_sect_); - Modes last_mode_ GUARDED_BY(crit_sect_); - Operations last_operation_ GUARDED_BY(crit_sect_); - std::unique_ptr mute_factor_array_ GUARDED_BY(crit_sect_); - size_t decoded_buffer_length_ GUARDED_BY(crit_sect_); - std::unique_ptr decoded_buffer_ GUARDED_BY(crit_sect_); - uint32_t playout_timestamp_ GUARDED_BY(crit_sect_); - bool new_codec_ GUARDED_BY(crit_sect_); - uint32_t timestamp_ GUARDED_BY(crit_sect_); - bool reset_decoder_ GUARDED_BY(crit_sect_); - rtc::Optional current_rtp_payload_type_ GUARDED_BY(crit_sect_); - rtc::Optional current_cng_rtp_payload_type_ GUARDED_BY(crit_sect_); - uint32_t ssrc_ GUARDED_BY(crit_sect_); - bool first_packet_ GUARDED_BY(crit_sect_); - int error_code_ GUARDED_BY(crit_sect_); // Store last error code. - int decoder_error_code_ GUARDED_BY(crit_sect_); - const BackgroundNoiseMode background_noise_mode_ GUARDED_BY(crit_sect_); - NetEqPlayoutMode playout_mode_ GUARDED_BY(crit_sect_); - bool enable_fast_accelerate_ GUARDED_BY(crit_sect_); - std::unique_ptr nack_ GUARDED_BY(crit_sect_); - bool nack_enabled_ GUARDED_BY(crit_sect_); - const bool enable_muted_state_ GUARDED_BY(crit_sect_); - AudioFrame::VADActivity last_vad_activity_ GUARDED_BY(crit_sect_) = - AudioFrame::kVadPassive; - std::unique_ptr generated_noise_stopwatch_ - GUARDED_BY(crit_sect_); - - private: - RTC_DISALLOW_COPY_AND_ASSIGN(NetEqImpl); -}; - -} // namespace webrtc -#endif // WEBRTC_MODULES_AUDIO_CODING_NETEQ_NETEQ_IMPL_H_ diff --git a/WebRtc.NET/include/webrtc/modules/audio_coding/neteq/normal.h b/WebRtc.NET/include/webrtc/modules/audio_coding/neteq/normal.h deleted file mode 100644 index 23887f51..00000000 --- a/WebRtc.NET/include/webrtc/modules/audio_coding/neteq/normal.h +++ /dev/null @@ -1,68 +0,0 @@ -/* - * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MODULES_AUDIO_CODING_NETEQ_NORMAL_H_ -#define WEBRTC_MODULES_AUDIO_CODING_NETEQ_NORMAL_H_ - -#include // Access to size_t. - -#include - -#include "webrtc/base/constructormagic.h" -#include "webrtc/modules/audio_coding/neteq/audio_multi_vector.h" -#include "webrtc/modules/audio_coding/neteq/defines.h" -#include "webrtc/typedefs.h" - -namespace webrtc { - -// Forward declarations. -class BackgroundNoise; -class DecoderDatabase; -class Expand; - -// This class provides the "Normal" DSP operation, that is performed when -// there is no data loss, no need to stretch the timing of the signal, and -// no other "special circumstances" are at hand. -class Normal { - public: - Normal(int fs_hz, DecoderDatabase* decoder_database, - const BackgroundNoise& background_noise, - Expand* expand) - : fs_hz_(fs_hz), - decoder_database_(decoder_database), - background_noise_(background_noise), - expand_(expand) { - } - - virtual ~Normal() {} - - // Performs the "Normal" operation. The decoder data is supplied in |input|, - // having |length| samples in total for all channels (interleaved). The - // result is written to |output|. The number of channels allocated in - // |output| defines the number of channels that will be used when - // de-interleaving |input|. |last_mode| contains the mode used in the previous - // GetAudio call (i.e., not the current one), and |external_mute_factor| is - // a pointer to the mute factor in the NetEqImpl class. - int Process(const int16_t* input, size_t length, - Modes last_mode, - int16_t* external_mute_factor_array, - AudioMultiVector* output); - - private: - int fs_hz_; - DecoderDatabase* decoder_database_; - const BackgroundNoise& background_noise_; - Expand* expand_; - - RTC_DISALLOW_COPY_AND_ASSIGN(Normal); -}; - -} // namespace webrtc -#endif // WEBRTC_MODULES_AUDIO_CODING_NETEQ_NORMAL_H_ diff --git a/WebRtc.NET/include/webrtc/modules/audio_coding/neteq/packet.h b/WebRtc.NET/include/webrtc/modules/audio_coding/neteq/packet.h deleted file mode 100644 index 74da83f4..00000000 --- a/WebRtc.NET/include/webrtc/modules/audio_coding/neteq/packet.h +++ /dev/null @@ -1,124 +0,0 @@ -/* - * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MODULES_AUDIO_CODING_NETEQ_PACKET_H_ -#define WEBRTC_MODULES_AUDIO_CODING_NETEQ_PACKET_H_ - -#include -#include - -#include "webrtc/base/buffer.h" -#include "webrtc/modules/audio_coding/codecs/audio_decoder.h" -#include "webrtc/modules/audio_coding/neteq/tick_timer.h" -#include "webrtc/typedefs.h" - -namespace webrtc { - -// Struct for holding RTP packets. -struct Packet { - struct Priority { - Priority() : codec_level(0), red_level(0) {} - Priority(int codec_level, int red_level) - : codec_level(codec_level), red_level(red_level) { - CheckInvariant(); - } - - int codec_level; - int red_level; - - // Priorities are sorted low-to-high, first on the level the codec - // prioritizes it, then on the level of RED packet it is; i.e. if it is a - // primary or secondary payload of a RED packet. For example: with Opus, an - // Fec packet (which the decoder prioritizes lower than a regular packet) - // will not be used if there is _any_ RED payload for the same - // timeframe. The highest priority packet will have levels {0, 0}. Negative - // priorities are not allowed. - bool operator<(const Priority& b) const { - CheckInvariant(); - b.CheckInvariant(); - if (codec_level == b.codec_level) - return red_level < b.red_level; - - return codec_level < b.codec_level; - } - bool operator==(const Priority& b) const { - CheckInvariant(); - b.CheckInvariant(); - return codec_level == b.codec_level && red_level == b.red_level; - } - bool operator!=(const Priority& b) const { return !(*this == b); } - bool operator>(const Priority& b) const { return b < *this; } - bool operator<=(const Priority& b) const { return !(b > *this); } - bool operator>=(const Priority& b) const { return !(b < *this); } - - private: - void CheckInvariant() const { - RTC_DCHECK_GE(codec_level, 0); - RTC_DCHECK_GE(red_level, 0); - } - }; - - uint32_t timestamp; - uint16_t sequence_number; - uint8_t payload_type; - // Datagram excluding RTP header and header extension. - rtc::Buffer payload; - Priority priority; - std::unique_ptr waiting_time; - std::unique_ptr frame; - - Packet(); - Packet(Packet&& b); - ~Packet(); - - // Packets should generally be moved around but sometimes it's useful to make - // a copy, for example for testing purposes. NOTE: Will only work for - // un-parsed packets, i.e. |frame| must be unset. The payload will, however, - // be copied. |waiting_time| will also not be copied. - Packet Clone() const; - - Packet& operator=(Packet&& b); - - // Comparison operators. Establish a packet ordering based on (1) timestamp, - // (2) sequence number and (3) redundancy. - // Timestamp and sequence numbers are compared taking wrap-around into - // account. For two packets with the same sequence number and timestamp a - // primary payload is considered "smaller" than a secondary. - bool operator==(const Packet& rhs) const { - return (this->timestamp == rhs.timestamp && - this->sequence_number == rhs.sequence_number && - this->priority == rhs.priority); - } - bool operator!=(const Packet& rhs) const { return !operator==(rhs); } - bool operator<(const Packet& rhs) const { - if (this->timestamp == rhs.timestamp) { - if (this->sequence_number == rhs.sequence_number) { - // Timestamp and sequence numbers are identical - deem the left hand - // side to be "smaller" (i.e., "earlier") if it has higher priority. - return this->priority < rhs.priority; - } - return (static_cast(rhs.sequence_number - - this->sequence_number) < 0xFFFF / 2); - } - return (static_cast(rhs.timestamp - this->timestamp) < - 0xFFFFFFFF / 2); - } - bool operator>(const Packet& rhs) const { return rhs.operator<(*this); } - bool operator<=(const Packet& rhs) const { return !operator>(rhs); } - bool operator>=(const Packet& rhs) const { return !operator<(rhs); } - - bool empty() const { return !frame && payload.empty(); } -}; - -// A list of packets. -typedef std::list PacketList; - -} // namespace webrtc -#endif // WEBRTC_MODULES_AUDIO_CODING_NETEQ_PACKET_H_ diff --git a/WebRtc.NET/include/webrtc/modules/audio_coding/neteq/packet_buffer.h b/WebRtc.NET/include/webrtc/modules/audio_coding/neteq/packet_buffer.h deleted file mode 100644 index a26d6c5c..00000000 --- a/WebRtc.NET/include/webrtc/modules/audio_coding/neteq/packet_buffer.h +++ /dev/null @@ -1,144 +0,0 @@ -/* - * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MODULES_AUDIO_CODING_NETEQ_PACKET_BUFFER_H_ -#define WEBRTC_MODULES_AUDIO_CODING_NETEQ_PACKET_BUFFER_H_ - -#include "webrtc/base/constructormagic.h" -#include "webrtc/base/optional.h" -#include "webrtc/modules/audio_coding/neteq/packet.h" -#include "webrtc/modules/include/module_common_types.h" -#include "webrtc/typedefs.h" - -namespace webrtc { - -class DecoderDatabase; -class TickTimer; - -// This is the actual buffer holding the packets before decoding. -class PacketBuffer { - public: - enum BufferReturnCodes { - kOK = 0, - kFlushed, - kNotFound, - kBufferEmpty, - kInvalidPacket, - kInvalidPointer - }; - - // Constructor creates a buffer which can hold a maximum of - // |max_number_of_packets| packets. - PacketBuffer(size_t max_number_of_packets, const TickTimer* tick_timer); - - // Deletes all packets in the buffer before destroying the buffer. - virtual ~PacketBuffer(); - - // Flushes the buffer and deletes all packets in it. - virtual void Flush(); - - // Returns true for an empty buffer. - virtual bool Empty() const; - - // Inserts |packet| into the buffer. The buffer will take over ownership of - // the packet object. - // Returns PacketBuffer::kOK on success, PacketBuffer::kFlushed if the buffer - // was flushed due to overfilling. - virtual int InsertPacket(Packet&& packet); - - // Inserts a list of packets into the buffer. The buffer will take over - // ownership of the packet objects. - // Returns PacketBuffer::kOK if all packets were inserted successfully. - // If the buffer was flushed due to overfilling, only a subset of the list is - // inserted, and PacketBuffer::kFlushed is returned. - // The last three parameters are included for legacy compatibility. - // TODO(hlundin): Redesign to not use current_*_payload_type and - // decoder_database. - virtual int InsertPacketList( - PacketList* packet_list, - const DecoderDatabase& decoder_database, - rtc::Optional* current_rtp_payload_type, - rtc::Optional* current_cng_rtp_payload_type); - - // Gets the timestamp for the first packet in the buffer and writes it to the - // output variable |next_timestamp|. - // Returns PacketBuffer::kBufferEmpty if the buffer is empty, - // PacketBuffer::kOK otherwise. - virtual int NextTimestamp(uint32_t* next_timestamp) const; - - // Gets the timestamp for the first packet in the buffer with a timestamp no - // lower than the input limit |timestamp|. The result is written to the output - // variable |next_timestamp|. - // Returns PacketBuffer::kBufferEmpty if the buffer is empty, - // PacketBuffer::kOK otherwise. - virtual int NextHigherTimestamp(uint32_t timestamp, - uint32_t* next_timestamp) const; - - // Returns a (constant) pointer to the first packet in the buffer. Returns - // NULL if the buffer is empty. - virtual const Packet* PeekNextPacket() const; - - // Extracts the first packet in the buffer and returns it. - // Returns an empty optional if the buffer is empty. - virtual rtc::Optional GetNextPacket(); - - // Discards the first packet in the buffer. The packet is deleted. - // Returns PacketBuffer::kBufferEmpty if the buffer is empty, - // PacketBuffer::kOK otherwise. - virtual int DiscardNextPacket(); - - // Discards all packets that are (strictly) older than timestamp_limit, - // but newer than timestamp_limit - horizon_samples. Setting horizon_samples - // to zero implies that the horizon is set to half the timestamp range. That - // is, if a packet is more than 2^31 timestamps into the future compared with - // timestamp_limit (including wrap-around), it is considered old. - // Returns number of packets discarded. - virtual int DiscardOldPackets(uint32_t timestamp_limit, - uint32_t horizon_samples); - - // Discards all packets that are (strictly) older than timestamp_limit. - virtual int DiscardAllOldPackets(uint32_t timestamp_limit); - - // Removes all packets with a specific payload type from the buffer. - virtual void DiscardPacketsWithPayloadType(uint8_t payload_type); - - // Returns the number of packets in the buffer, including duplicates and - // redundant packets. - virtual size_t NumPacketsInBuffer() const; - - // Returns the number of samples in the buffer, including samples carried in - // duplicate and redundant packets. - virtual size_t NumSamplesInBuffer(size_t last_decoded_length) const; - - virtual void BufferStat(int* num_packets, int* max_num_packets) const; - - // Static method returning true if |timestamp| is older than |timestamp_limit| - // but less than |horizon_samples| behind |timestamp_limit|. For instance, - // with timestamp_limit = 100 and horizon_samples = 10, a timestamp in the - // range (90, 100) is considered obsolete, and will yield true. - // Setting |horizon_samples| to 0 is the same as setting it to 2^31, i.e., - // half the 32-bit timestamp range. - static bool IsObsoleteTimestamp(uint32_t timestamp, - uint32_t timestamp_limit, - uint32_t horizon_samples) { - return IsNewerTimestamp(timestamp_limit, timestamp) && - (horizon_samples == 0 || - IsNewerTimestamp(timestamp, timestamp_limit - horizon_samples)); - } - - private: - size_t max_number_of_packets_; - PacketList buffer_; - const TickTimer* tick_timer_; - RTC_DISALLOW_COPY_AND_ASSIGN(PacketBuffer); -}; - -} // namespace webrtc -#endif // WEBRTC_MODULES_AUDIO_CODING_NETEQ_PACKET_BUFFER_H_ diff --git a/WebRtc.NET/include/webrtc/modules/audio_coding/neteq/post_decode_vad.h b/WebRtc.NET/include/webrtc/modules/audio_coding/neteq/post_decode_vad.h deleted file mode 100644 index 7bf5ad13..00000000 --- a/WebRtc.NET/include/webrtc/modules/audio_coding/neteq/post_decode_vad.h +++ /dev/null @@ -1,72 +0,0 @@ -/* - * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MODULES_AUDIO_CODING_NETEQ_POST_DECODE_VAD_H_ -#define WEBRTC_MODULES_AUDIO_CODING_NETEQ_POST_DECODE_VAD_H_ - -#include // size_t - -#include "webrtc/base/constructormagic.h" -#include "webrtc/common_audio/vad/include/webrtc_vad.h" -#include "webrtc/common_types.h" // NULL -#include "webrtc/modules/audio_coding/codecs/audio_decoder.h" -#include "webrtc/modules/audio_coding/neteq/defines.h" -#include "webrtc/modules/audio_coding/neteq/packet.h" -#include "webrtc/typedefs.h" - -namespace webrtc { - -class PostDecodeVad { - public: - PostDecodeVad() - : enabled_(false), - running_(false), - active_speech_(true), - sid_interval_counter_(0), - vad_instance_(NULL) { - } - - virtual ~PostDecodeVad(); - - // Enables post-decode VAD. - void Enable(); - - // Disables post-decode VAD. - void Disable(); - - // Initializes post-decode VAD. - void Init(); - - // Updates post-decode VAD with the audio data in |signal| having |length| - // samples. The data is of type |speech_type|, at the sample rate |fs_hz|. - void Update(int16_t* signal, size_t length, - AudioDecoder::SpeechType speech_type, bool sid_frame, int fs_hz); - - // Accessors. - bool enabled() const { return enabled_; } - bool running() const { return running_; } - bool active_speech() const { return active_speech_; } - - private: - static const int kVadMode = 0; // Sets aggressiveness to "Normal". - // Number of Update() calls without CNG/SID before re-enabling VAD. - static const int kVadAutoEnable = 3000; - - bool enabled_; - bool running_; - bool active_speech_; - int sid_interval_counter_; - ::VadInst* vad_instance_; - - RTC_DISALLOW_COPY_AND_ASSIGN(PostDecodeVad); -}; - -} // namespace webrtc -#endif // WEBRTC_MODULES_AUDIO_CODING_NETEQ_POST_DECODE_VAD_H_ diff --git a/WebRtc.NET/include/webrtc/modules/audio_coding/neteq/random_vector.h b/WebRtc.NET/include/webrtc/modules/audio_coding/neteq/random_vector.h deleted file mode 100644 index 61651e57..00000000 --- a/WebRtc.NET/include/webrtc/modules/audio_coding/neteq/random_vector.h +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MODULES_AUDIO_CODING_NETEQ_RANDOM_VECTOR_H_ -#define WEBRTC_MODULES_AUDIO_CODING_NETEQ_RANDOM_VECTOR_H_ - -#include // size_t - -#include "webrtc/base/constructormagic.h" -#include "webrtc/typedefs.h" - -namespace webrtc { - -// This class generates pseudo-random samples. -class RandomVector { - public: - static const size_t kRandomTableSize = 256; - static const int16_t kRandomTable[kRandomTableSize]; - - RandomVector() - : seed_(777), - seed_increment_(1) { - } - - void Reset(); - - void Generate(size_t length, int16_t* output); - - void IncreaseSeedIncrement(int16_t increase_by); - - // Accessors and mutators. - int16_t seed_increment() { return seed_increment_; } - void set_seed_increment(int16_t value) { seed_increment_ = value; } - - private: - uint32_t seed_; - int16_t seed_increment_; - - RTC_DISALLOW_COPY_AND_ASSIGN(RandomVector); -}; - -} // namespace webrtc -#endif // WEBRTC_MODULES_AUDIO_CODING_NETEQ_RANDOM_VECTOR_H_ diff --git a/WebRtc.NET/include/webrtc/modules/audio_coding/neteq/rtcp.h b/WebRtc.NET/include/webrtc/modules/audio_coding/neteq/rtcp.h deleted file mode 100644 index d222cea7..00000000 --- a/WebRtc.NET/include/webrtc/modules/audio_coding/neteq/rtcp.h +++ /dev/null @@ -1,58 +0,0 @@ -/* - * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MODULES_AUDIO_CODING_NETEQ_RTCP_H_ -#define WEBRTC_MODULES_AUDIO_CODING_NETEQ_RTCP_H_ - -#include "webrtc/base/constructormagic.h" -#include "webrtc/modules/audio_coding/neteq/include/neteq.h" -#include "webrtc/typedefs.h" - -namespace webrtc { - -// Forward declaration. -struct RTPHeader; - -class Rtcp { - public: - Rtcp() { - Init(0); - } - - ~Rtcp() {} - - // Resets the RTCP statistics, and sets the first received sequence number. - void Init(uint16_t start_sequence_number); - - // Updates the RTCP statistics with a new received packet. - void Update(const RTPHeader& rtp_header, uint32_t receive_timestamp); - - // Returns the current RTCP statistics. If |no_reset| is true, the statistics - // are not reset, otherwise they are. - void GetStatistics(bool no_reset, RtcpStatistics* stats); - - private: - uint16_t cycles_; // The number of wrap-arounds for the sequence number. - uint16_t max_seq_no_; // The maximum sequence number received. Starts over - // from 0 after wrap-around. - uint16_t base_seq_no_; // The sequence number of the first received packet. - uint32_t received_packets_; // The number of packets that have been received. - uint32_t received_packets_prior_; // Number of packets received when last - // report was generated. - uint32_t expected_prior_; // Expected number of packets, at the time of the - // last report. - int64_t jitter_; // Current jitter value in Q4. - int32_t transit_; // Clock difference for previous packet. - - RTC_DISALLOW_COPY_AND_ASSIGN(Rtcp); -}; - -} // namespace webrtc -#endif // WEBRTC_MODULES_AUDIO_CODING_NETEQ_RTCP_H_ diff --git a/WebRtc.NET/include/webrtc/modules/audio_coding/neteq/statistics_calculator.h b/WebRtc.NET/include/webrtc/modules/audio_coding/neteq/statistics_calculator.h deleted file mode 100644 index b2df865f..00000000 --- a/WebRtc.NET/include/webrtc/modules/audio_coding/neteq/statistics_calculator.h +++ /dev/null @@ -1,167 +0,0 @@ -/* - * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MODULES_AUDIO_CODING_NETEQ_STATISTICS_CALCULATOR_H_ -#define WEBRTC_MODULES_AUDIO_CODING_NETEQ_STATISTICS_CALCULATOR_H_ - -#include -#include - -#include "webrtc/base/constructormagic.h" -#include "webrtc/modules/audio_coding/neteq/include/neteq.h" -#include "webrtc/typedefs.h" - -namespace webrtc { - -// Forward declarations. -class DecisionLogic; -class DelayManager; - -// This class handles various network statistics in NetEq. -class StatisticsCalculator { - public: - StatisticsCalculator(); - - virtual ~StatisticsCalculator(); - - // Resets most of the counters. - void Reset(); - - // Resets the counters that are not handled by Reset(). - void ResetMcu(); - - // Reports that |num_samples| samples were produced through expansion, and - // that the expansion produced other than just noise samples. - void ExpandedVoiceSamples(size_t num_samples); - - // Reports that |num_samples| samples were produced through expansion, and - // that the expansion produced only noise samples. - void ExpandedNoiseSamples(size_t num_samples); - - // Reports that |num_samples| samples were produced through preemptive - // expansion. - void PreemptiveExpandedSamples(size_t num_samples); - - // Reports that |num_samples| samples were removed through accelerate. - void AcceleratedSamples(size_t num_samples); - - // Reports that |num_samples| zeros were inserted into the output. - void AddZeros(size_t num_samples); - - // Reports that |num_packets| packets were discarded. - void PacketsDiscarded(size_t num_packets); - - // Reports that |num_samples| were lost. - void LostSamples(size_t num_samples); - - // Increases the report interval counter with |num_samples| at a sample rate - // of |fs_hz|. This is how the StatisticsCalculator gets notified that current - // time is increasing. - void IncreaseCounter(size_t num_samples, int fs_hz); - - // Stores new packet waiting time in waiting time statistics. - void StoreWaitingTime(int waiting_time_ms); - - // Reports that |num_samples| samples were decoded from secondary packets. - void SecondaryDecodedSamples(int num_samples); - - // Logs a delayed packet outage event of |outage_duration_ms|. A delayed - // packet outage event is defined as an expand period caused not by an actual - // packet loss, but by a delayed packet. - virtual void LogDelayedPacketOutageEvent(int outage_duration_ms); - - // Returns the current network statistics in |stats|. The current sample rate - // is |fs_hz|, the total number of samples in packet buffer and sync buffer - // yet to play out is |num_samples_in_buffers|, and the number of samples per - // packet is |samples_per_packet|. - void GetNetworkStatistics(int fs_hz, - size_t num_samples_in_buffers, - size_t samples_per_packet, - const DelayManager& delay_manager, - const DecisionLogic& decision_logic, - NetEqNetworkStatistics *stats); - - private: - static const int kMaxReportPeriod = 60; // Seconds before auto-reset. - static const size_t kLenWaitingTimes = 100; - - class PeriodicUmaLogger { - public: - PeriodicUmaLogger(const std::string& uma_name, - int report_interval_ms, - int max_value); - virtual ~PeriodicUmaLogger(); - void AdvanceClock(int step_ms); - - protected: - void LogToUma(int value) const; - virtual int Metric() const = 0; - virtual void Reset() = 0; - - const std::string uma_name_; - const int report_interval_ms_; - const int max_value_; - int timer_ = 0; - }; - - class PeriodicUmaCount final : public PeriodicUmaLogger { - public: - PeriodicUmaCount(const std::string& uma_name, - int report_interval_ms, - int max_value); - ~PeriodicUmaCount() override; - void RegisterSample(); - - protected: - int Metric() const override; - void Reset() override; - - private: - int counter_ = 0; - }; - - class PeriodicUmaAverage final : public PeriodicUmaLogger { - public: - PeriodicUmaAverage(const std::string& uma_name, - int report_interval_ms, - int max_value); - ~PeriodicUmaAverage() override; - void RegisterSample(int value); - - protected: - int Metric() const override; - void Reset() override; - - private: - double sum_ = 0.0; - int counter_ = 0; - }; - - // Calculates numerator / denominator, and returns the value in Q14. - static uint16_t CalculateQ14Ratio(size_t numerator, uint32_t denominator); - - size_t preemptive_samples_; - size_t accelerate_samples_; - size_t added_zero_samples_; - size_t expanded_speech_samples_; - size_t expanded_noise_samples_; - size_t discarded_packets_; - size_t lost_timestamps_; - uint32_t timestamps_since_last_report_; - std::deque waiting_times_; - uint32_t secondary_decoded_samples_; - PeriodicUmaCount delayed_packet_outage_counter_; - PeriodicUmaAverage excess_buffer_delay_; - - RTC_DISALLOW_COPY_AND_ASSIGN(StatisticsCalculator); -}; - -} // namespace webrtc -#endif // WEBRTC_MODULES_AUDIO_CODING_NETEQ_STATISTICS_CALCULATOR_H_ diff --git a/WebRtc.NET/include/webrtc/modules/audio_coding/neteq/test/NETEQTEST_DummyRTPpacket.h b/WebRtc.NET/include/webrtc/modules/audio_coding/neteq/test/NETEQTEST_DummyRTPpacket.h deleted file mode 100644 index 1ac6c9a1..00000000 --- a/WebRtc.NET/include/webrtc/modules/audio_coding/neteq/test/NETEQTEST_DummyRTPpacket.h +++ /dev/null @@ -1,23 +0,0 @@ -/* - * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef NETEQTEST_DUMMYRTPPACKET_H -#define NETEQTEST_DUMMYRTPPACKET_H - -#include "NETEQTEST_RTPpacket.h" - -class NETEQTEST_DummyRTPpacket : public NETEQTEST_RTPpacket { - public: - int readFromFile(FILE* fp) override; - int writeToFile(FILE* fp) override; - void parseHeader() override; -}; - -#endif // NETEQTEST_DUMMYRTPPACKET_H diff --git a/WebRtc.NET/include/webrtc/modules/audio_coding/neteq/test/NETEQTEST_RTPpacket.h b/WebRtc.NET/include/webrtc/modules/audio_coding/neteq/test/NETEQTEST_RTPpacket.h deleted file mode 100644 index 56ed72fc..00000000 --- a/WebRtc.NET/include/webrtc/modules/audio_coding/neteq/test/NETEQTEST_RTPpacket.h +++ /dev/null @@ -1,104 +0,0 @@ -/* - * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef NETEQTEST_RTPPACKET_H -#define NETEQTEST_RTPPACKET_H - -#include -#include -#include "webrtc/typedefs.h" -#include "webrtc/modules/include/module_common_types.h" - -enum stereoModes { - stereoModeMono, - stereoModeSample1, - stereoModeSample2, - stereoModeFrame, - stereoModeDuplicate -}; - -class NETEQTEST_RTPpacket -{ -public: - NETEQTEST_RTPpacket(); - bool operator !() const { return (dataLen() < 0); }; - virtual ~NETEQTEST_RTPpacket(); - void reset(); - static int skipFileHeader(FILE *fp); - virtual int readFromFile(FILE *fp); - int readFixedFromFile(FILE *fp, size_t len); - virtual int writeToFile(FILE *fp); - void blockPT(uint8_t pt); - virtual void parseHeader(); - void parseHeader(webrtc::WebRtcRTPHeader* rtp_header); - const webrtc::WebRtcRTPHeader* RTPinfo() const; - uint8_t * datagram() const; - uint8_t * payload() const; - size_t payloadLen(); - int16_t dataLen() const; - bool isParsed() const; - bool isLost() const; - uint32_t time() const { return _receiveTime; }; - - uint8_t payloadType() const; - uint16_t sequenceNumber() const; - uint32_t timeStamp() const; - uint32_t SSRC() const; - uint8_t markerBit() const; - - int setPayloadType(uint8_t pt); - int setSequenceNumber(uint16_t sn); - int setTimeStamp(uint32_t ts); - int setSSRC(uint32_t ssrc); - int setMarkerBit(uint8_t mb); - void setTime(uint32_t receiveTime) { _receiveTime = receiveTime; }; - - int setRTPheader(const webrtc::WebRtcRTPHeader* RTPinfo); - - int splitStereo(NETEQTEST_RTPpacket* slaveRtp, enum stereoModes mode); - - int extractRED(int index, webrtc::WebRtcRTPHeader& red); - - void scramblePayload(void); - - uint8_t * _datagram; - uint8_t * _payloadPtr; - int _memSize; - int16_t _datagramLen; - size_t _payloadLen; - webrtc::WebRtcRTPHeader _rtpInfo; - bool _rtpParsed; - uint32_t _receiveTime; - bool _lost; - std::map _blockList; - -protected: - static const int _kRDHeaderLen; - static const int _kBasicHeaderLen; - - void parseBasicHeader(webrtc::WebRtcRTPHeader* RTPinfo, int *i_P, int *i_X, - int *i_CC) const; - int calcHeaderLength(int i_X, int i_CC) const; - -private: - void makeRTPheader(unsigned char* rtp_data, uint8_t payloadType, - uint16_t seqNo, uint32_t timestamp, - uint32_t ssrc, uint8_t markerBit) const; - uint16_t parseRTPheader(webrtc::WebRtcRTPHeader* RTPinfo, - uint8_t **payloadPtr = NULL) const; - uint16_t parseRTPheader(uint8_t **payloadPtr = NULL) - { return parseRTPheader(&_rtpInfo, payloadPtr);}; - int calcPadLength(int i_P) const; - void splitStereoSample(NETEQTEST_RTPpacket* slaveRtp, int stride); - void splitStereoFrame(NETEQTEST_RTPpacket* slaveRtp); - void splitStereoDouble(NETEQTEST_RTPpacket* slaveRtp); -}; - -#endif //NETEQTEST_RTPPACKET_H diff --git a/WebRtc.NET/include/webrtc/modules/audio_coding/neteq/test/PayloadTypes.h b/WebRtc.NET/include/webrtc/modules/audio_coding/neteq/test/PayloadTypes.h deleted file mode 100644 index aba525b1..00000000 --- a/WebRtc.NET/include/webrtc/modules/audio_coding/neteq/test/PayloadTypes.h +++ /dev/null @@ -1,76 +0,0 @@ -/* - * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -/* PayloadTypes.h */ -/* Used by NetEqRTPplay application */ - -/* RTP defined codepoints */ -#define NETEQ_CODEC_PCMU_PT 0 -#define NETEQ_CODEC_GSMFR_PT 3 -#define NETEQ_CODEC_G723_PT 4 -#define NETEQ_CODEC_DVI4_PT 125 // 8 kHz version -//#define NETEQ_CODEC_DVI4_16_PT 6 // 16 kHz version -#define NETEQ_CODEC_PCMA_PT 8 -#define NETEQ_CODEC_G722_PT 9 -#define NETEQ_CODEC_CN_PT 13 -//#define NETEQ_CODEC_G728_PT 15 -//#define NETEQ_CODEC_DVI4_11_PT 16 // 11.025 kHz version -//#define NETEQ_CODEC_DVI4_22_PT 17 // 22.050 kHz version -#define NETEQ_CODEC_G729_PT 18 - -/* Dynamic RTP codepoints as defined in VoiceEngine (file VEAPI.cpp) */ -#define NETEQ_CODEC_IPCMWB_PT 97 -#define NETEQ_CODEC_SPEEX8_PT 98 -#define NETEQ_CODEC_SPEEX16_PT 99 -#define NETEQ_CODEC_EG711U_PT 100 -#define NETEQ_CODEC_EG711A_PT 101 -#define NETEQ_CODEC_ILBC_PT 102 -#define NETEQ_CODEC_ISAC_PT 103 -#define NETEQ_CODEC_ISACLC_PT 119 -#define NETEQ_CODEC_ISACSWB_PT 104 -#define NETEQ_CODEC_AVT_PT 106 -#define NETEQ_CODEC_G722_1_16_PT 108 -#define NETEQ_CODEC_G722_1_24_PT 109 -#define NETEQ_CODEC_G722_1_32_PT 110 -#define NETEQ_CODEC_OPUS_PT 111 -#define NETEQ_CODEC_AMR_PT 112 -#define NETEQ_CODEC_GSMEFR_PT 113 -//#define NETEQ_CODEC_ILBCRCU_PT 114 -#define NETEQ_CODEC_G726_16_PT 115 -#define NETEQ_CODEC_G726_24_PT 116 -#define NETEQ_CODEC_G726_32_PT 121 -#define NETEQ_CODEC_RED_PT 117 -#define NETEQ_CODEC_G726_40_PT 118 -//#define NETEQ_CODEC_ENERGY_PT 120 -#define NETEQ_CODEC_CN_WB_PT 105 -#define NETEQ_CODEC_CN_SWB_PT 126 -#define NETEQ_CODEC_G729_1_PT 107 -#define NETEQ_CODEC_G729D_PT 123 -#define NETEQ_CODEC_MELPE_PT 124 - -/* Extra dynamic codepoints */ -#define NETEQ_CODEC_AMRWB_PT 120 -#define NETEQ_CODEC_PCM16B_PT 93 -#define NETEQ_CODEC_PCM16B_WB_PT 94 -#define NETEQ_CODEC_PCM16B_SWB32KHZ_PT 95 -#define NETEQ_CODEC_PCM16B_SWB48KHZ_PT 96 -#define NETEQ_CODEC_MPEG4AAC_PT 122 - - -/* Not default in VoiceEngine */ -#define NETEQ_CODEC_G722_1C_24_PT 84 -#define NETEQ_CODEC_G722_1C_32_PT 85 -#define NETEQ_CODEC_G722_1C_48_PT 86 - -#define NETEQ_CODEC_SILK_8_PT 80 -#define NETEQ_CODEC_SILK_12_PT 81 -#define NETEQ_CODEC_SILK_16_PT 82 -#define NETEQ_CODEC_SILK_24_PT 83 - diff --git a/WebRtc.NET/include/webrtc/modules/audio_coding/neteq/tools/audio_checksum.h b/WebRtc.NET/include/webrtc/modules/audio_coding/neteq/tools/audio_checksum.h deleted file mode 100644 index a302cff9..00000000 --- a/WebRtc.NET/include/webrtc/modules/audio_coding/neteq/tools/audio_checksum.h +++ /dev/null @@ -1,59 +0,0 @@ -/* - * Copyright (c) 2014 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MODULES_AUDIO_CODING_NETEQ_TOOLS_AUDIO_CHECKSUM_H_ -#define WEBRTC_MODULES_AUDIO_CODING_NETEQ_TOOLS_AUDIO_CHECKSUM_H_ - -#include - -#include "webrtc/base/constructormagic.h" -#include "webrtc/base/md5digest.h" -#include "webrtc/base/stringencode.h" -#include "webrtc/modules/audio_coding/neteq/tools/audio_sink.h" -#include "webrtc/typedefs.h" - -namespace webrtc { -namespace test { - -class AudioChecksum : public AudioSink { - public: - AudioChecksum() : finished_(false) {} - - bool WriteArray(const int16_t* audio, size_t num_samples) override { - if (finished_) - return false; - -#ifndef WEBRTC_ARCH_LITTLE_ENDIAN -#error "Big-endian gives a different checksum" -#endif - checksum_.Update(audio, num_samples * sizeof(*audio)); - return true; - } - - // Finalizes the computations, and returns the checksum. - std::string Finish() { - if (!finished_) { - finished_ = true; - checksum_.Finish(checksum_result_, rtc::Md5Digest::kSize); - } - return rtc::hex_encode(checksum_result_, rtc::Md5Digest::kSize); - } - - private: - rtc::Md5Digest checksum_; - char checksum_result_[rtc::Md5Digest::kSize]; - bool finished_; - - RTC_DISALLOW_COPY_AND_ASSIGN(AudioChecksum); -}; - -} // namespace test -} // namespace webrtc -#endif // WEBRTC_MODULES_AUDIO_CODING_NETEQ_TOOLS_AUDIO_CHECKSUM_H_ diff --git a/WebRtc.NET/include/webrtc/modules/audio_coding/neteq/tools/audio_sink.h b/WebRtc.NET/include/webrtc/modules/audio_coding/neteq/tools/audio_sink.h deleted file mode 100644 index 8a5479ef..00000000 --- a/WebRtc.NET/include/webrtc/modules/audio_coding/neteq/tools/audio_sink.h +++ /dev/null @@ -1,61 +0,0 @@ -/* - * Copyright (c) 2014 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MODULES_AUDIO_CODING_NETEQ_TOOLS_AUDIO_SINK_H_ -#define WEBRTC_MODULES_AUDIO_CODING_NETEQ_TOOLS_AUDIO_SINK_H_ - -#include "webrtc/base/constructormagic.h" -#include "webrtc/modules/include/module_common_types.h" -#include "webrtc/typedefs.h" - -namespace webrtc { -namespace test { - -// Interface class for an object receiving raw output audio from test -// applications. -class AudioSink { - public: - AudioSink() {} - virtual ~AudioSink() {} - - // Writes |num_samples| from |audio| to the AudioSink. Returns true if - // successful, otherwise false. - virtual bool WriteArray(const int16_t* audio, size_t num_samples) = 0; - - // Writes |audio_frame| to the AudioSink. Returns true if successful, - // otherwise false. - bool WriteAudioFrame(const AudioFrame& audio_frame) { - return WriteArray( - audio_frame.data_, - audio_frame.samples_per_channel_ * audio_frame.num_channels_); - } - - private: - RTC_DISALLOW_COPY_AND_ASSIGN(AudioSink); -}; - -// Forks the output audio to two AudioSink objects. -class AudioSinkFork : public AudioSink { - public: - AudioSinkFork(AudioSink* left, AudioSink* right) - : left_sink_(left), right_sink_(right) {} - - bool WriteArray(const int16_t* audio, size_t num_samples) override; - - private: - AudioSink* left_sink_; - AudioSink* right_sink_; - - RTC_DISALLOW_COPY_AND_ASSIGN(AudioSinkFork); -}; - -} // namespace test -} // namespace webrtc -#endif // WEBRTC_MODULES_AUDIO_CODING_NETEQ_TOOLS_AUDIO_SINK_H_ diff --git a/WebRtc.NET/include/webrtc/modules/audio_coding/neteq/tools/encode_neteq_input.h b/WebRtc.NET/include/webrtc/modules/audio_coding/neteq/tools/encode_neteq_input.h deleted file mode 100644 index 7c165a81..00000000 --- a/WebRtc.NET/include/webrtc/modules/audio_coding/neteq/tools/encode_neteq_input.h +++ /dev/null @@ -1,71 +0,0 @@ -/* - * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MODULES_AUDIO_CODING_NETEQ_TOOLS_ENCODE_NETEQ_INPUT_H_ -#define WEBRTC_MODULES_AUDIO_CODING_NETEQ_TOOLS_ENCODE_NETEQ_INPUT_H_ - -#include - -#include "webrtc/modules/audio_coding/codecs/audio_encoder.h" -#include "webrtc/modules/audio_coding/neteq/tools/neteq_input.h" -#include "webrtc/modules/include/module_common_types.h" - -namespace webrtc { -namespace test { - -// This class provides a NetEqInput that takes audio from a generator object and -// encodes it using a given audio encoder. -class EncodeNetEqInput : public NetEqInput { - public: - // Generator class, to be provided to the EncodeNetEqInput constructor. - class Generator { - public: - virtual ~Generator() = default; - // Returns the next num_samples values from the signal generator. - virtual rtc::ArrayView Generate(size_t num_samples) = 0; - }; - - // The source will end after the given input duration. - EncodeNetEqInput(std::unique_ptr generator, - std::unique_ptr encoder, - int64_t input_duration_ms); - - rtc::Optional NextPacketTime() const override; - - rtc::Optional NextOutputEventTime() const override; - - std::unique_ptr PopPacket() override; - - void AdvanceOutputEvent() override; - - bool ended() const override { - return next_output_event_ms_ <= input_duration_ms_; - } - - rtc::Optional NextHeader() const override; - - private: - static constexpr int64_t kOutputPeriodMs = 10; - - void CreatePacket(); - - std::unique_ptr generator_; - std::unique_ptr encoder_; - std::unique_ptr packet_data_; - uint32_t rtp_timestamp_ = 0; - int16_t sequence_number_ = 0; - int64_t next_packet_time_ms_ = 0; - int64_t next_output_event_ms_ = 0; - const int64_t input_duration_ms_; -}; - -} // namespace test -} // namespace webrtc -#endif // WEBRTC_MODULES_AUDIO_CODING_NETEQ_TOOLS_ENCODE_NETEQ_INPUT_H_ diff --git a/WebRtc.NET/include/webrtc/modules/audio_coding/neteq/tools/neteq_input.h b/WebRtc.NET/include/webrtc/modules/audio_coding/neteq/tools/neteq_input.h deleted file mode 100644 index be08a791..00000000 --- a/WebRtc.NET/include/webrtc/modules/audio_coding/neteq/tools/neteq_input.h +++ /dev/null @@ -1,80 +0,0 @@ -/* - * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MODULES_AUDIO_CODING_NETEQ_TOOLS_NETEQ_INPUT_H_ -#define WEBRTC_MODULES_AUDIO_CODING_NETEQ_TOOLS_NETEQ_INPUT_H_ - -#include -#include - -#include "webrtc/base/buffer.h" -#include "webrtc/base/optional.h" -#include "webrtc/modules/audio_coding/neteq/tools/packet.h" -#include "webrtc/modules/audio_coding/neteq/tools/packet_source.h" -#include "webrtc/modules/include/module_common_types.h" - -namespace webrtc { -namespace test { - -// Interface class for input to the NetEqTest class. -class NetEqInput { - public: - struct PacketData { - WebRtcRTPHeader header; - rtc::Buffer payload; - double time_ms; - }; - - virtual ~NetEqInput() = default; - - // Returns at what time (in ms) NetEq::InsertPacket should be called next, or - // empty if the source is out of packets. - virtual rtc::Optional NextPacketTime() const = 0; - - // Returns at what time (in ms) NetEq::GetAudio should be called next, or - // empty if no more output events are available. - virtual rtc::Optional NextOutputEventTime() const = 0; - - // Returns the time (in ms) for the next event from either NextPacketTime() - // or NextOutputEventTime(), or empty if both are out of events. - rtc::Optional NextEventTime() const { - const auto a = NextPacketTime(); - const auto b = NextOutputEventTime(); - // Return the minimum of non-empty |a| and |b|, or empty if both are empty. - if (a) { - return b ? rtc::Optional(std::min(*a, *b)) : a; - } - return b ? b : rtc::Optional(); - } - - // Returns the next packet to be inserted into NetEq. The packet following the - // returned one is pre-fetched in the NetEqInput object, such that future - // calls to NextPacketTime() or NextHeader() will return information from that - // packet. - virtual std::unique_ptr PopPacket() = 0; - - // Move to the next output event. This will make NextOutputEventTime() return - // a new value (potentially the same if several output events share the same - // time). - virtual void AdvanceOutputEvent() = 0; - - // Returns true if the source has come to an end. An implementation must - // eventually return true from this method, or the test will end up in an - // infinite loop. - virtual bool ended() const = 0; - - // Returns the RTP header for the next packet, i.e., the packet that will be - // delivered next by PopPacket(). - virtual rtc::Optional NextHeader() const = 0; -}; - -} // namespace test -} // namespace webrtc -#endif // WEBRTC_MODULES_AUDIO_CODING_NETEQ_TOOLS_NETEQ_INPUT_H_ diff --git a/WebRtc.NET/include/webrtc/modules/audio_coding/neteq/tools/neteq_packet_source_input.h b/WebRtc.NET/include/webrtc/modules/audio_coding/neteq/tools/neteq_packet_source_input.h deleted file mode 100644 index 35b54fa4..00000000 --- a/WebRtc.NET/include/webrtc/modules/audio_coding/neteq/tools/neteq_packet_source_input.h +++ /dev/null @@ -1,84 +0,0 @@ -/* - * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MODULES_AUDIO_CODING_NETEQ_TOOLS_NETEQ_PACKET_SOURCE_INPUT_H_ -#define WEBRTC_MODULES_AUDIO_CODING_NETEQ_TOOLS_NETEQ_PACKET_SOURCE_INPUT_H_ - -#include -#include - -#include "webrtc/modules/audio_coding/neteq/tools/neteq_input.h" -#include "webrtc/modules/rtp_rtcp/include/rtp_rtcp_defines.h" - -namespace webrtc { -namespace test { - -class RtpFileSource; -class RtcEventLogSource; - -// An adapter class to dress up a PacketSource object as a NetEqInput. -class NetEqPacketSourceInput : public NetEqInput { - public: - using RtpHeaderExtensionMap = std::map; - - NetEqPacketSourceInput(); - rtc::Optional NextPacketTime() const override; - std::unique_ptr PopPacket() override; - rtc::Optional NextHeader() const override; - bool ended() const override { return !next_output_event_ms_; } - - protected: - virtual PacketSource* source() = 0; - void LoadNextPacket(); - - rtc::Optional next_output_event_ms_; - - private: - std::unique_ptr packet_; -}; - -// Implementation of NetEqPacketSourceInput to be used with an RtpFileSource. -class NetEqRtpDumpInput final : public NetEqPacketSourceInput { - public: - NetEqRtpDumpInput(const std::string& file_name, - const RtpHeaderExtensionMap& hdr_ext_map); - - rtc::Optional NextOutputEventTime() const override; - void AdvanceOutputEvent() override; - - protected: - PacketSource* source() override; - - private: - static constexpr int64_t kOutputPeriodMs = 10; - - std::unique_ptr source_; -}; - -// Implementation of NetEqPacketSourceInput to be used with an -// RtcEventLogSource. -class NetEqEventLogInput final : public NetEqPacketSourceInput { - public: - NetEqEventLogInput(const std::string& file_name, - const RtpHeaderExtensionMap& hdr_ext_map); - - rtc::Optional NextOutputEventTime() const override; - void AdvanceOutputEvent() override; - - protected: - PacketSource* source() override; - - private: - std::unique_ptr source_; -}; - -} // namespace test -} // namespace webrtc -#endif // WEBRTC_MODULES_AUDIO_CODING_NETEQ_TOOLS_NETEQ_PACKET_SOURCE_INPUT_H_ diff --git a/WebRtc.NET/include/webrtc/modules/audio_coding/neteq/tools/neteq_quality_test.h b/WebRtc.NET/include/webrtc/modules/audio_coding/neteq/tools/neteq_quality_test.h deleted file mode 100644 index 0ed7dfb0..00000000 --- a/WebRtc.NET/include/webrtc/modules/audio_coding/neteq/tools/neteq_quality_test.h +++ /dev/null @@ -1,141 +0,0 @@ -/* - * Copyright (c) 2014 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MODULES_AUDIO_CODING_NETEQ_TOOLS_NETEQ_QUALITY_TEST_H_ -#define WEBRTC_MODULES_AUDIO_CODING_NETEQ_TOOLS_NETEQ_QUALITY_TEST_H_ - -#include -#include -#include - -#include "webrtc/modules/audio_coding/neteq/include/neteq.h" -#include "webrtc/modules/audio_coding/neteq/tools/audio_sink.h" -#include "webrtc/modules/audio_coding/neteq/tools/input_audio_file.h" -#include "webrtc/modules/audio_coding/neteq/tools/rtp_generator.h" -#include "webrtc/modules/include/module_common_types.h" -#include "webrtc/test/gtest.h" -#include "webrtc/typedefs.h" - -using google::RegisterFlagValidator; - -namespace webrtc { -namespace test { - -class LossModel { - public: - virtual ~LossModel() {}; - virtual bool Lost() = 0; -}; - -class NoLoss : public LossModel { - public: - bool Lost() override; -}; - -class UniformLoss : public LossModel { - public: - UniformLoss(double loss_rate); - bool Lost() override; - void set_loss_rate(double loss_rate) { loss_rate_ = loss_rate; } - - private: - double loss_rate_; -}; - -class GilbertElliotLoss : public LossModel { - public: - GilbertElliotLoss(double prob_trans_11, double prob_trans_01); - ~GilbertElliotLoss() override; - bool Lost() override; - - private: - // Prob. of losing current packet, when previous packet is lost. - double prob_trans_11_; - // Prob. of losing current packet, when previous packet is not lost. - double prob_trans_01_; - bool lost_last_; - std::unique_ptr uniform_loss_model_; -}; - -class NetEqQualityTest : public ::testing::Test { - protected: - NetEqQualityTest(int block_duration_ms, - int in_sampling_khz, - int out_sampling_khz, - NetEqDecoder decoder_type); - ~NetEqQualityTest() override; - - void SetUp() override; - - // EncodeBlock(...) does the following: - // 1. encodes a block of audio, saved in |in_data| and has a length of - // |block_size_samples| (samples per channel), - // 2. save the bit stream to |payload| of |max_bytes| bytes in size, - // 3. returns the length of the payload (in bytes), - virtual int EncodeBlock(int16_t* in_data, size_t block_size_samples, - rtc::Buffer* payload, size_t max_bytes) = 0; - - // PacketLost(...) determines weather a packet sent at an indicated time gets - // lost or not. - bool PacketLost(); - - // DecodeBlock() decodes a block of audio using the payload stored in - // |payload_| with the length of |payload_size_bytes_| (bytes). The decoded - // audio is to be stored in |out_data_|. - int DecodeBlock(); - - // Transmit() uses |rtp_generator_| to generate a packet and passes it to - // |neteq_|. - int Transmit(); - - // Runs encoding / transmitting / decoding. - void Simulate(); - - // Write to log file. Usage Log() << ... - std::ofstream& Log(); - - NetEqDecoder decoder_type_; - const size_t channels_; - - private: - int decoded_time_ms_; - int decodable_time_ms_; - double drift_factor_; - int packet_loss_rate_; - const int block_duration_ms_; - const int in_sampling_khz_; - const int out_sampling_khz_; - - // Number of samples per channel in a frame. - const size_t in_size_samples_; - - size_t payload_size_bytes_; - size_t max_payload_bytes_; - - std::unique_ptr in_file_; - std::unique_ptr output_; - std::ofstream log_file_; - - std::unique_ptr rtp_generator_; - std::unique_ptr neteq_; - std::unique_ptr loss_model_; - - std::unique_ptr in_data_; - rtc::Buffer payload_; - AudioFrame out_frame_; - WebRtcRTPHeader rtp_header_; - - size_t total_payload_size_bytes_; -}; - -} // namespace test -} // namespace webrtc - -#endif // WEBRTC_MODULES_AUDIO_CODING_NETEQ_TOOLS_NETEQ_QUALITY_TEST_H_ diff --git a/WebRtc.NET/include/webrtc/modules/audio_coding/neteq/tools/neteq_replacement_input.h b/WebRtc.NET/include/webrtc/modules/audio_coding/neteq/tools/neteq_replacement_input.h deleted file mode 100644 index ee1e4ae6..00000000 --- a/WebRtc.NET/include/webrtc/modules/audio_coding/neteq/tools/neteq_replacement_input.h +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MODULES_AUDIO_CODING_NETEQ_TOOLS_NETEQ_REPLACEMENT_INPUT_H_ -#define WEBRTC_MODULES_AUDIO_CODING_NETEQ_TOOLS_NETEQ_REPLACEMENT_INPUT_H_ - -#include -#include - -#include "webrtc/modules/audio_coding/neteq/tools/neteq_input.h" - -namespace webrtc { -namespace test { - -// This class converts the packets from a NetEqInput to fake encodings to be -// decoded by a FakeDecodeFromFile decoder. -class NetEqReplacementInput : public NetEqInput { - public: - NetEqReplacementInput(std::unique_ptr source, - uint8_t replacement_payload_type, - const std::set& comfort_noise_types, - const std::set& forbidden_types); - - rtc::Optional NextPacketTime() const override; - rtc::Optional NextOutputEventTime() const override; - std::unique_ptr PopPacket() override; - void AdvanceOutputEvent() override; - bool ended() const override; - rtc::Optional NextHeader() const override; - - private: - void ReplacePacket(); - - std::unique_ptr source_; - const uint8_t replacement_payload_type_; - const std::set comfort_noise_types_; - const std::set forbidden_types_; - std::unique_ptr packet_; // The next packet to deliver. - uint32_t last_frame_size_timestamps_ = 960; // Initial guess: 20 ms @ 48 kHz. -}; - -} // namespace test -} // namespace webrtc -#endif // WEBRTC_MODULES_AUDIO_CODING_NETEQ_TOOLS_NETEQ_REPLACEMENT_INPUT_H_ diff --git a/WebRtc.NET/include/webrtc/modules/audio_coding/neteq/tools/neteq_test.h b/WebRtc.NET/include/webrtc/modules/audio_coding/neteq/tools/neteq_test.h deleted file mode 100644 index 619626cf..00000000 --- a/WebRtc.NET/include/webrtc/modules/audio_coding/neteq/tools/neteq_test.h +++ /dev/null @@ -1,85 +0,0 @@ -/* - * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MODULES_AUDIO_CODING_NETEQ_TOOLS_NETEQ_TEST_H_ -#define WEBRTC_MODULES_AUDIO_CODING_NETEQ_TOOLS_NETEQ_TEST_H_ - -#include -#include -#include -#include - -#include "webrtc/modules/audio_coding/neteq/include/neteq.h" -#include "webrtc/modules/audio_coding/neteq/tools/audio_sink.h" -#include "webrtc/modules/audio_coding/neteq/tools/neteq_input.h" - -namespace webrtc { -namespace test { - -class NetEqTestErrorCallback { - public: - virtual ~NetEqTestErrorCallback() = default; - virtual void OnInsertPacketError(int error_code, - const NetEqInput::PacketData& packet) {} - virtual void OnGetAudioError(int error_code) {} -}; - -class DefaultNetEqTestErrorCallback : public NetEqTestErrorCallback { - void OnInsertPacketError(int error_code, - const NetEqInput::PacketData& packet) override; - void OnGetAudioError(int error_code) override; -}; - -// Class that provides an input--output test for NetEq. The input (both packets -// and output events) is provided by a NetEqInput object, while the output is -// directed to an AudioSink object. -class NetEqTest { - public: - using DecoderMap = std::map >; - - struct ExternalDecoderInfo { - AudioDecoder* decoder; - NetEqDecoder codec; - std::string codec_name; - }; - - using ExtDecoderMap = std::map; - - // Sets up the test with given configuration, codec mappings, input, ouput, - // and callback objects for error reporting. - NetEqTest(const NetEq::Config& config, - const DecoderMap& codecs, - const ExtDecoderMap& ext_codecs, - std::unique_ptr input, - std::unique_ptr output, - NetEqTestErrorCallback* error_callback); - - ~NetEqTest() = default; - - // Runs the test. Returns the duration of the produced audio in ms. - int64_t Run(); - - // Returns the statistics from NetEq. - NetEqNetworkStatistics SimulationStats(); - - private: - void RegisterDecoders(const DecoderMap& codecs); - void RegisterExternalDecoders(const ExtDecoderMap& codecs); - - std::unique_ptr neteq_; - std::unique_ptr input_; - std::unique_ptr output_; - NetEqTestErrorCallback* error_callback_ = nullptr; - int sample_rate_hz_; -}; - -} // namespace test -} // namespace webrtc -#endif // WEBRTC_MODULES_AUDIO_CODING_NETEQ_TOOLS_NETEQ_TEST_H_ diff --git a/WebRtc.NET/include/webrtc/modules/audio_coding/neteq/tools/output_wav_file.h b/WebRtc.NET/include/webrtc/modules/audio_coding/neteq/tools/output_wav_file.h deleted file mode 100644 index c36c7da9..00000000 --- a/WebRtc.NET/include/webrtc/modules/audio_coding/neteq/tools/output_wav_file.h +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) 2014 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MODULES_AUDIO_CODING_NETEQ_TOOLS_OUTPUT_WAV_FILE_H_ -#define WEBRTC_MODULES_AUDIO_CODING_NETEQ_TOOLS_OUTPUT_WAV_FILE_H_ - -#include - -#include "webrtc/base/constructormagic.h" -#include "webrtc/common_audio/wav_file.h" -#include "webrtc/modules/audio_coding/neteq/tools/audio_sink.h" - -namespace webrtc { -namespace test { - -class OutputWavFile : public AudioSink { - public: - // Creates an OutputWavFile, opening a file named |file_name| for writing. - // The output file is a PCM encoded wav file. - OutputWavFile(const std::string& file_name, int sample_rate_hz) - : wav_writer_(file_name, sample_rate_hz, 1) {} - - bool WriteArray(const int16_t* audio, size_t num_samples) override { - wav_writer_.WriteSamples(audio, num_samples); - return true; - } - - private: - WavWriter wav_writer_; - - RTC_DISALLOW_COPY_AND_ASSIGN(OutputWavFile); -}; - -} // namespace test -} // namespace webrtc -#endif // WEBRTC_MODULES_AUDIO_CODING_NETEQ_TOOLS_OUTPUT_WAV_FILE_H_ diff --git a/WebRtc.NET/include/webrtc/modules/audio_coding/neteq/tools/packet.h b/WebRtc.NET/include/webrtc/modules/audio_coding/neteq/tools/packet.h deleted file mode 100644 index d1508055..00000000 --- a/WebRtc.NET/include/webrtc/modules/audio_coding/neteq/tools/packet.h +++ /dev/null @@ -1,122 +0,0 @@ -/* - * Copyright (c) 2014 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MODULES_AUDIO_CODING_NETEQ_TOOLS_PACKET_H_ -#define WEBRTC_MODULES_AUDIO_CODING_NETEQ_TOOLS_PACKET_H_ - -#include -#include - -#include "webrtc/base/constructormagic.h" -#include "webrtc/common_types.h" -#include "webrtc/typedefs.h" - -namespace webrtc { - -class RtpHeaderParser; -struct WebRtcRTPHeader; - -namespace test { - -// Class for handling RTP packets in test applications. -class Packet { - public: - // Creates a packet, with the packet payload (including header bytes) in - // |packet_memory|. The length of |packet_memory| is |allocated_bytes|. - // The new object assumes ownership of |packet_memory| and will delete it - // when the Packet object is deleted. The |time_ms| is an extra time - // associated with this packet, typically used to denote arrival time. - // The first bytes in |packet_memory| will be parsed using |parser|. - Packet(uint8_t* packet_memory, - size_t allocated_bytes, - double time_ms, - const RtpHeaderParser& parser); - - // Same as above, but with the extra argument |virtual_packet_length_bytes|. - // This is typically used when reading RTP dump files that only contain the - // RTP headers, and no payload (a.k.a RTP dummy files or RTP light). The - // |virtual_packet_length_bytes| tells what size the packet had on wire, - // including the now discarded payload, whereas |allocated_bytes| is the - // length of the remaining payload (typically only the RTP header). - Packet(uint8_t* packet_memory, - size_t allocated_bytes, - size_t virtual_packet_length_bytes, - double time_ms, - const RtpHeaderParser& parser); - - // The following two constructors are the same as above, but without a - // parser. Note that when the object is constructed using any of these - // methods, the header will be parsed using a default RtpHeaderParser object. - // In particular, RTP header extensions won't be parsed. - Packet(uint8_t* packet_memory, size_t allocated_bytes, double time_ms); - - Packet(uint8_t* packet_memory, - size_t allocated_bytes, - size_t virtual_packet_length_bytes, - double time_ms); - - virtual ~Packet(); - - // Parses the first bytes of the RTP payload, interpreting them as RED headers - // according to RFC 2198. The headers will be inserted into |headers|. The - // caller of the method assumes ownership of the objects in the list, and - // must delete them properly. - bool ExtractRedHeaders(std::list* headers) const; - - // Deletes all RTPHeader objects in |headers|, but does not delete |headers| - // itself. - static void DeleteRedHeaders(std::list* headers); - - const uint8_t* payload() const { return payload_; } - - size_t packet_length_bytes() const { return packet_length_bytes_; } - - size_t payload_length_bytes() const { return payload_length_bytes_; } - - size_t virtual_packet_length_bytes() const { - return virtual_packet_length_bytes_; - } - - size_t virtual_payload_length_bytes() const { - return virtual_payload_length_bytes_; - } - - const RTPHeader& header() const { return header_; } - - // Copies the packet header information, converting from the native RTPHeader - // type to WebRtcRTPHeader. - void ConvertHeader(WebRtcRTPHeader* copy_to) const; - - void set_time_ms(double time) { time_ms_ = time; } - double time_ms() const { return time_ms_; } - bool valid_header() const { return valid_header_; } - - private: - bool ParseHeader(const RtpHeaderParser& parser); - void CopyToHeader(RTPHeader* destination) const; - - RTPHeader header_; - std::unique_ptr payload_memory_; - const uint8_t* payload_; // First byte after header. - const size_t packet_length_bytes_; // Total length of packet. - size_t payload_length_bytes_; // Length of the payload, after RTP header. - // Zero for dummy RTP packets. - // Virtual lengths are used when parsing RTP header files (dummy RTP files). - const size_t virtual_packet_length_bytes_; - size_t virtual_payload_length_bytes_; - double time_ms_; // Used to denote a packet's arrival time. - bool valid_header_; // Set by the RtpHeaderParser. - - RTC_DISALLOW_COPY_AND_ASSIGN(Packet); -}; - -} // namespace test -} // namespace webrtc -#endif // WEBRTC_MODULES_AUDIO_CODING_NETEQ_TOOLS_PACKET_H_ diff --git a/WebRtc.NET/include/webrtc/modules/audio_coding/test/APITest.h b/WebRtc.NET/include/webrtc/modules/audio_coding/test/APITest.h deleted file mode 100644 index 99a72018..00000000 --- a/WebRtc.NET/include/webrtc/modules/audio_coding/test/APITest.h +++ /dev/null @@ -1,162 +0,0 @@ -/* - * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MODULES_AUDIO_CODING_TEST_APITEST_H_ -#define WEBRTC_MODULES_AUDIO_CODING_TEST_APITEST_H_ - -#include - -#include "webrtc/modules/audio_coding/include/audio_coding_module.h" -#include "webrtc/modules/audio_coding/test/ACMTest.h" -#include "webrtc/modules/audio_coding/test/Channel.h" -#include "webrtc/modules/audio_coding/test/PCMFile.h" -#include "webrtc/modules/audio_coding/test/utility.h" -#include "webrtc/system_wrappers/include/event_wrapper.h" -#include "webrtc/system_wrappers/include/rw_lock_wrapper.h" - -namespace webrtc { - -enum APITESTAction { - TEST_CHANGE_CODEC_ONLY = 0, - DTX_TEST = 1 -}; - -class APITest : public ACMTest { - public: - APITest(); - ~APITest(); - - void Perform(); - private: - int16_t SetUp(); - - static bool PushAudioThreadA(void* obj); - static bool PullAudioThreadA(void* obj); - static bool ProcessThreadA(void* obj); - static bool APIThreadA(void* obj); - - static bool PushAudioThreadB(void* obj); - static bool PullAudioThreadB(void* obj); - static bool ProcessThreadB(void* obj); - static bool APIThreadB(void* obj); - - void CheckVADStatus(char side); - - // Set Min delay, get delay, playout timestamp - void TestDelay(char side); - - // Unregister a codec & register again. - void TestRegisteration(char side); - - // Playout Mode, background noise mode. - // Receiver Frequency, playout frequency. - void TestPlayout(char receiveSide); - - // - void TestSendVAD(char side); - - void CurrentCodec(char side); - - void ChangeCodec(char side); - - void Wait(uint32_t waitLengthMs); - - void RunTest(char thread); - - bool PushAudioRunA(); - bool PullAudioRunA(); - bool ProcessRunA(); - bool APIRunA(); - - bool PullAudioRunB(); - bool PushAudioRunB(); - bool ProcessRunB(); - bool APIRunB(); - - //--- ACMs - std::unique_ptr _acmA; - std::unique_ptr _acmB; - - //--- Channels - Channel* _channel_A2B; - Channel* _channel_B2A; - - //--- I/O files - // A - PCMFile _inFileA; - PCMFile _outFileA; - // B - PCMFile _outFileB; - PCMFile _inFileB; - - //--- I/O params - // A - int32_t _outFreqHzA; - // B - int32_t _outFreqHzB; - - // Should we write to file. - // we might skip writing to file if we - // run the test for a long time. - bool _writeToFile; - //--- Events - // A - EventTimerWrapper* _pullEventA; // pulling data from ACM - EventTimerWrapper* _pushEventA; // pushing data to ACM - EventTimerWrapper* _processEventA; // process - EventWrapper* _apiEventA; // API calls - // B - EventTimerWrapper* _pullEventB; // pulling data from ACM - EventTimerWrapper* _pushEventB; // pushing data to ACM - EventTimerWrapper* _processEventB; // process - EventWrapper* _apiEventB; // API calls - - // keep track of the codec in either side. - uint8_t _codecCntrA; - uint8_t _codecCntrB; - - // Is set to true if there is no encoder in either side - bool _thereIsEncoderA; - bool _thereIsEncoderB; - bool _thereIsDecoderA; - bool _thereIsDecoderB; - - bool _sendVADA; - bool _sendDTXA; - ACMVADMode _sendVADModeA; - - bool _sendVADB; - bool _sendDTXB; - ACMVADMode _sendVADModeB; - - int32_t _minDelayA; - int32_t _minDelayB; - bool _payloadUsed[32]; - - bool _verbose; - - int _dotPositionA; - int _dotMoveDirectionA; - int _dotPositionB; - int _dotMoveDirectionB; - - char _movingDot[41]; - - VADCallback* _vadCallbackA; - VADCallback* _vadCallbackB; - RWLockWrapper& _apiTestRWLock; - bool _randomTest; - int _testNumA; - int _testNumB; -}; - -} // namespace webrtc - -#endif // WEBRTC_MODULES_AUDIO_CODING_TEST_APITEST_H_ diff --git a/WebRtc.NET/include/webrtc/modules/audio_coding/test/PCMFile.h b/WebRtc.NET/include/webrtc/modules/audio_coding/test/PCMFile.h deleted file mode 100644 index b5ced0ba..00000000 --- a/WebRtc.NET/include/webrtc/modules/audio_coding/test/PCMFile.h +++ /dev/null @@ -1,76 +0,0 @@ -/* - * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MODULES_AUDIO_CODING_TEST_PCMFILE_H_ -#define WEBRTC_MODULES_AUDIO_CODING_TEST_PCMFILE_H_ - -#include -#include - -#include - -#include "webrtc/base/optional.h" -#include "webrtc/modules/include/module_common_types.h" -#include "webrtc/typedefs.h" - -namespace webrtc { - -class PCMFile { - public: - PCMFile(); - PCMFile(uint32_t timestamp); - ~PCMFile(); - - void Open(const std::string& filename, uint16_t frequency, const char* mode, - bool auto_rewind = false); - - int32_t Read10MsData(AudioFrame& audio_frame); - - void Write10MsData(int16_t *playout_buffer, size_t length_smpls); - void Write10MsData(AudioFrame& audio_frame); - - uint16_t PayloadLength10Ms() const; - int32_t SamplingFrequency() const; - void Close(); - bool EndOfFile() const { - return end_of_file_; - } - // Moves forward the specified number of 10 ms blocks. If a limit has been set - // with SetNum10MsBlocksToRead, fast-forwarding does not count towards this - // limit. - void FastForward(int num_10ms_blocks); - void Rewind(); - static int16_t ChooseFile(std::string* file_name, int16_t max_len, - uint16_t* frequency_hz); - bool Rewinded(); - void SaveStereo(bool is_stereo = true); - void ReadStereo(bool is_stereo = true); - // If set, the reading will stop after the specified number of blocks have - // been read. When that has happened, EndOfFile() will return true. Calling - // Rewind() will reset the counter and start over. - void SetNum10MsBlocksToRead(int value); - - private: - FILE* pcm_file_; - uint16_t samples_10ms_; - int32_t frequency_; - bool end_of_file_; - bool auto_rewind_; - bool rewinded_; - uint32_t timestamp_; - bool read_stereo_; - bool save_stereo_; - rtc::Optional num_10ms_blocks_to_read_; - int blocks_read_ = 0; -}; - -} // namespace webrtc - -#endif // WEBRTC_MODULES_AUDIO_CODING_TEST_PCMFILE_H_ diff --git a/WebRtc.NET/include/webrtc/modules/audio_coding/test/PacketLossTest.h b/WebRtc.NET/include/webrtc/modules/audio_coding/test/PacketLossTest.h deleted file mode 100644 index 705fe73f..00000000 --- a/WebRtc.NET/include/webrtc/modules/audio_coding/test/PacketLossTest.h +++ /dev/null @@ -1,67 +0,0 @@ -/* - * Copyright (c) 2014 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MODULES_AUDIO_CODING_TEST_PACKETLOSSTEST_H_ -#define WEBRTC_MODULES_AUDIO_CODING_TEST_PACKETLOSSTEST_H_ - -#include -#include -#include "webrtc/modules/audio_coding/test/EncodeDecodeTest.h" - -namespace webrtc { - -class ReceiverWithPacketLoss : public Receiver { - public: - ReceiverWithPacketLoss(); - void Setup(AudioCodingModule *acm, RTPStream *rtpStream, - std::string out_file_name, int channels, int loss_rate, - int burst_length); - bool IncomingPacket() override; - - protected: - bool PacketLost(); - int loss_rate_; - int burst_length_; - int packet_counter_; - int lost_packet_counter_; - int burst_lost_counter_; -}; - -class SenderWithFEC : public Sender { - public: - SenderWithFEC(); - void Setup(AudioCodingModule *acm, RTPStream *rtpStream, - std::string in_file_name, int sample_rate, int channels, - int expected_loss_rate); - bool SetPacketLossRate(int expected_loss_rate); - bool SetFEC(bool enable_fec); - protected: - int expected_loss_rate_; -}; - -class PacketLossTest : public ACMTest { - public: - PacketLossTest(int channels, int expected_loss_rate_, int actual_loss_rate, - int burst_length); - void Perform(); - protected: - int channels_; - std::string in_file_name_; - int sample_rate_hz_; - std::unique_ptr sender_; - std::unique_ptr receiver_; - int expected_loss_rate_; - int actual_loss_rate_; - int burst_length_; -}; - -} // namespace webrtc - -#endif // WEBRTC_MODULES_AUDIO_CODING_TEST_PACKETLOSSTEST_H_ diff --git a/WebRtc.NET/include/webrtc/modules/audio_coding/test/RTPFile.h b/WebRtc.NET/include/webrtc/modules/audio_coding/test/RTPFile.h deleted file mode 100644 index 696d41eb..00000000 --- a/WebRtc.NET/include/webrtc/modules/audio_coding/test/RTPFile.h +++ /dev/null @@ -1,126 +0,0 @@ -/* - * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MODULES_AUDIO_CODING_TEST_RTPFILE_H_ -#define WEBRTC_MODULES_AUDIO_CODING_TEST_RTPFILE_H_ - -#include -#include - -#include "webrtc/modules/audio_coding/include/audio_coding_module.h" -#include "webrtc/modules/include/module_common_types.h" -#include "webrtc/system_wrappers/include/rw_lock_wrapper.h" -#include "webrtc/typedefs.h" - -namespace webrtc { - -class RTPStream { - public: - virtual ~RTPStream() { - } - - virtual void Write(const uint8_t payloadType, const uint32_t timeStamp, - const int16_t seqNo, const uint8_t* payloadData, - const size_t payloadSize, uint32_t frequency) = 0; - - // Returns the packet's payload size. Zero should be treated as an - // end-of-stream (in the case that EndOfFile() is true) or an error. - virtual size_t Read(WebRtcRTPHeader* rtpInfo, uint8_t* payloadData, - size_t payloadSize, uint32_t* offset) = 0; - virtual bool EndOfFile() const = 0; - - protected: - void MakeRTPheader(uint8_t* rtpHeader, uint8_t payloadType, int16_t seqNo, - uint32_t timeStamp, uint32_t ssrc); - - void ParseRTPHeader(WebRtcRTPHeader* rtpInfo, const uint8_t* rtpHeader); -}; - -class RTPPacket { - public: - RTPPacket(uint8_t payloadType, uint32_t timeStamp, int16_t seqNo, - const uint8_t* payloadData, size_t payloadSize, - uint32_t frequency); - - ~RTPPacket(); - - uint8_t payloadType; - uint32_t timeStamp; - int16_t seqNo; - uint8_t* payloadData; - size_t payloadSize; - uint32_t frequency; -}; - -class RTPBuffer : public RTPStream { - public: - RTPBuffer(); - - ~RTPBuffer(); - - void Write(const uint8_t payloadType, - const uint32_t timeStamp, - const int16_t seqNo, - const uint8_t* payloadData, - const size_t payloadSize, - uint32_t frequency) override; - - size_t Read(WebRtcRTPHeader* rtpInfo, - uint8_t* payloadData, - size_t payloadSize, - uint32_t* offset) override; - - bool EndOfFile() const override; - - private: - RWLockWrapper* _queueRWLock; - std::queue _rtpQueue; -}; - -class RTPFile : public RTPStream { - public: - ~RTPFile() { - } - - RTPFile() - : _rtpFile(NULL), - _rtpEOF(false) { - } - - void Open(const char *outFilename, const char *mode); - - void Close(); - - void WriteHeader(); - - void ReadHeader(); - - void Write(const uint8_t payloadType, - const uint32_t timeStamp, - const int16_t seqNo, - const uint8_t* payloadData, - const size_t payloadSize, - uint32_t frequency) override; - - size_t Read(WebRtcRTPHeader* rtpInfo, - uint8_t* payloadData, - size_t payloadSize, - uint32_t* offset) override; - - bool EndOfFile() const override { return _rtpEOF; } - - private: - FILE* _rtpFile; - bool _rtpEOF; -}; - -} // namespace webrtc - -#endif // WEBRTC_MODULES_AUDIO_CODING_TEST_RTPFILE_H_ diff --git a/WebRtc.NET/include/webrtc/modules/audio_coding/test/TwoWayCommunication.h b/WebRtc.NET/include/webrtc/modules/audio_coding/test/TwoWayCommunication.h deleted file mode 100644 index f9d37f7f..00000000 --- a/WebRtc.NET/include/webrtc/modules/audio_coding/test/TwoWayCommunication.h +++ /dev/null @@ -1,61 +0,0 @@ -/* - * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MODULES_AUDIO_CODING_TEST_TWOWAYCOMMUNICATION_H_ -#define WEBRTC_MODULES_AUDIO_CODING_TEST_TWOWAYCOMMUNICATION_H_ - -#include - -#include "webrtc/modules/audio_coding/include/audio_coding_module.h" -#include "webrtc/modules/audio_coding/test/ACMTest.h" -#include "webrtc/modules/audio_coding/test/Channel.h" -#include "webrtc/modules/audio_coding/test/PCMFile.h" -#include "webrtc/modules/audio_coding/test/utility.h" - -namespace webrtc { - -class TwoWayCommunication : public ACMTest { - public: - explicit TwoWayCommunication(int testMode); - ~TwoWayCommunication(); - - void Perform(); - private: - void ChooseCodec(uint8_t* codecID_A, uint8_t* codecID_B); - void SetUp(); - void SetUpAutotest(); - - std::unique_ptr _acmA; - std::unique_ptr _acmB; - - std::unique_ptr _acmRefA; - std::unique_ptr _acmRefB; - - Channel* _channel_A2B; - Channel* _channel_B2A; - - Channel* _channelRef_A2B; - Channel* _channelRef_B2A; - - PCMFile _inFileA; - PCMFile _inFileB; - - PCMFile _outFileA; - PCMFile _outFileB; - - PCMFile _outFileRefA; - PCMFile _outFileRefB; - - int _testMode; -}; - -} // namespace webrtc - -#endif // WEBRTC_MODULES_AUDIO_CODING_TEST_TWOWAYCOMMUNICATION_H_ diff --git a/WebRtc.NET/include/webrtc/modules/audio_coding/test/iSACTest.h b/WebRtc.NET/include/webrtc/modules/audio_coding/test/iSACTest.h deleted file mode 100644 index 7d3a77e2..00000000 --- a/WebRtc.NET/include/webrtc/modules/audio_coding/test/iSACTest.h +++ /dev/null @@ -1,80 +0,0 @@ -/* - * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MODULES_AUDIO_CODING_TEST_ISACTEST_H_ -#define WEBRTC_MODULES_AUDIO_CODING_TEST_ISACTEST_H_ - -#include - -#include - -#include "webrtc/common_types.h" -#include "webrtc/modules/audio_coding/include/audio_coding_module.h" -#include "webrtc/modules/audio_coding/test/ACMTest.h" -#include "webrtc/modules/audio_coding/test/Channel.h" -#include "webrtc/modules/audio_coding/test/PCMFile.h" -#include "webrtc/modules/audio_coding/test/utility.h" - -#define MAX_FILE_NAME_LENGTH_BYTE 500 -#define NO_OF_CLIENTS 15 - -namespace webrtc { - -struct ACMTestISACConfig { - int32_t currentRateBitPerSec; - int16_t currentFrameSizeMsec; - int16_t encodingMode; - uint32_t initRateBitPerSec; - int16_t initFrameSizeInMsec; - bool enforceFrameSize; -}; - -class ISACTest : public ACMTest { - public: - explicit ISACTest(int testMode); - ~ISACTest(); - - void Perform(); - private: - void Setup(); - - void Run10ms(); - - void EncodeDecode(int testNr, ACMTestISACConfig& wbISACConfig, - ACMTestISACConfig& swbISACConfig); - - void SwitchingSamplingRate(int testNr, int maxSampRateChange); - - std::unique_ptr _acmA; - std::unique_ptr _acmB; - - std::unique_ptr _channel_A2B; - std::unique_ptr _channel_B2A; - - PCMFile _inFileA; - PCMFile _inFileB; - - PCMFile _outFileA; - PCMFile _outFileB; - - uint8_t _idISAC16kHz; - uint8_t _idISAC32kHz; - CodecInst _paramISAC16kHz; - CodecInst _paramISAC32kHz; - - std::string file_name_swb_; - - ACMTestTimer _myTimer; - int _testMode; -}; - -} // namespace webrtc - -#endif // WEBRTC_MODULES_AUDIO_CODING_TEST_ISACTEST_H_ diff --git a/WebRtc.NET/include/webrtc/modules/audio_coding/test/opus_test.h b/WebRtc.NET/include/webrtc/modules/audio_coding/test/opus_test.h deleted file mode 100644 index ce570f66..00000000 --- a/WebRtc.NET/include/webrtc/modules/audio_coding/test/opus_test.h +++ /dev/null @@ -1,61 +0,0 @@ -/* - * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MODULES_AUDIO_CODING_TEST_OPUS_TEST_H_ -#define WEBRTC_MODULES_AUDIO_CODING_TEST_OPUS_TEST_H_ - -#include - -#include - -#include "webrtc/modules/audio_coding/codecs/opus/opus_interface.h" -#include "webrtc/modules/audio_coding/acm2/acm_resampler.h" -#include "webrtc/modules/audio_coding/test/ACMTest.h" -#include "webrtc/modules/audio_coding/test/Channel.h" -#include "webrtc/modules/audio_coding/test/PCMFile.h" -#include "webrtc/modules/audio_coding/test/TestStereo.h" - -namespace webrtc { - -class OpusTest : public ACMTest { - public: - OpusTest(); - ~OpusTest(); - - void Perform(); - - private: - void Run(TestPackStereo* channel, - size_t channels, - int bitrate, - size_t frame_length, - int percent_loss = 0); - - void OpenOutFile(int test_number); - - std::unique_ptr acm_receiver_; - TestPackStereo* channel_a2b_; - PCMFile in_file_stereo_; - PCMFile in_file_mono_; - PCMFile out_file_; - PCMFile out_file_standalone_; - int counter_; - uint8_t payload_type_; - uint32_t rtp_timestamp_; - acm2::ACMResampler resampler_; - WebRtcOpusEncInst* opus_mono_encoder_; - WebRtcOpusEncInst* opus_stereo_encoder_; - WebRtcOpusDecInst* opus_mono_decoder_; - WebRtcOpusDecInst* opus_stereo_decoder_; -}; - -} // namespace webrtc - -#endif // WEBRTC_MODULES_AUDIO_CODING_TEST_OPUS_TEST_H_ diff --git a/WebRtc.NET/include/webrtc/modules/audio_coding/test/utility.h b/WebRtc.NET/include/webrtc/modules/audio_coding/test/utility.h deleted file mode 100644 index 1a3e06d6..00000000 --- a/WebRtc.NET/include/webrtc/modules/audio_coding/test/utility.h +++ /dev/null @@ -1,133 +0,0 @@ -/* - * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MODULES_AUDIO_CODING_TEST_UTILITY_H_ -#define WEBRTC_MODULES_AUDIO_CODING_TEST_UTILITY_H_ - -#include "webrtc/modules/audio_coding/include/audio_coding_module.h" -#include "webrtc/test/gtest.h" - -namespace webrtc { - -//----------------------------- -#define CHECK_ERROR(f) \ - do { \ - EXPECT_GE(f, 0) << "Error Calling API"; \ - } while(0) - -//----------------------------- -#define CHECK_PROTECTED(f) \ - do { \ - if (f >= 0) { \ - ADD_FAILURE() << "Error Calling API"; \ - } else { \ - printf("An expected error is caught.\n"); \ - } \ - } while(0) - -//---------------------------- -#define CHECK_ERROR_MT(f) \ - do { \ - if (f < 0) { \ - fprintf(stderr, "Error Calling API in file %s at line %d \n", \ - __FILE__, __LINE__); \ - } \ - } while(0) - -//---------------------------- -#define CHECK_PROTECTED_MT(f) \ - do { \ - if (f >= 0) { \ - fprintf(stderr, "Error Calling API in file %s at line %d \n", \ - __FILE__, __LINE__); \ - } else { \ - printf("An expected error is caught.\n"); \ - } \ - } while(0) - -#define DELETE_POINTER(p) \ - do { \ - if (p != NULL) { \ - delete p; \ - p = NULL; \ - } \ - } while(0) - -class ACMTestTimer { - public: - ACMTestTimer(); - ~ACMTestTimer(); - - void Reset(); - void Tick10ms(); - void Tick1ms(); - void Tick100ms(); - void Tick1sec(); - void CurrentTimeHMS(char* currTime); - void CurrentTime(unsigned long& h, unsigned char& m, unsigned char& s, - unsigned short& ms); - - private: - void Adjust(); - - unsigned short _msec; - unsigned char _sec; - unsigned char _min; - unsigned long _hour; -}; - -class CircularBuffer { - public: - CircularBuffer(uint32_t len); - ~CircularBuffer(); - - void SetArithMean(bool enable); - void SetVariance(bool enable); - - void Update(const double newVal); - void IsBufferFull(); - - int16_t Variance(double& var); - int16_t ArithMean(double& mean); - - protected: - double* _buff; - uint32_t _idx; - uint32_t _buffLen; - - bool _buffIsFull; - bool _calcAvg; - bool _calcVar; - double _sum; - double _sumSqr; -}; - -int16_t ChooseCodec(CodecInst& codecInst); - -void PrintCodecs(); - -bool FixedPayloadTypeCodec(const char* payloadName); - -class VADCallback : public ACMVADCallback { - public: - VADCallback(); - - int32_t InFrameType(FrameType frame_type) override; - - void PrintFrameTypes(); - void Reset(); - - private: - uint32_t _numFrameTypes[5]; -}; - -} // namespace webrtc - -#endif // WEBRTC_MODULES_AUDIO_CODING_TEST_UTILITY_H_ diff --git a/WebRtc.NET/include/webrtc/modules/audio_conference_mixer/include/audio_conference_mixer.h b/WebRtc.NET/include/webrtc/modules/audio_conference_mixer/include/audio_conference_mixer.h deleted file mode 100644 index 7b14f2f7..00000000 --- a/WebRtc.NET/include/webrtc/modules/audio_conference_mixer/include/audio_conference_mixer.h +++ /dev/null @@ -1,77 +0,0 @@ -/* - * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MODULES_AUDIO_CONFERENCE_MIXER_INCLUDE_AUDIO_CONFERENCE_MIXER_H_ -#define WEBRTC_MODULES_AUDIO_CONFERENCE_MIXER_INCLUDE_AUDIO_CONFERENCE_MIXER_H_ - -#include "webrtc/modules/audio_conference_mixer/include/audio_conference_mixer_defines.h" -#include "webrtc/modules/include/module.h" -#include "webrtc/modules/include/module_common_types.h" - -namespace webrtc { -class AudioMixerOutputReceiver; -class MixerParticipant; -class Trace; - -class AudioConferenceMixer : public Module -{ -public: - enum {kMaximumAmountOfMixedParticipants = 3}; - enum Frequency - { - kNbInHz = 8000, - kWbInHz = 16000, - kSwbInHz = 32000, - kFbInHz = 48000, - kLowestPossible = -1, - kDefaultFrequency = kWbInHz - }; - - // Factory method. Constructor disabled. - static AudioConferenceMixer* Create(int id); - virtual ~AudioConferenceMixer() {} - - // Module functions - int64_t TimeUntilNextProcess() override = 0; - void Process() override = 0; - - // Register/unregister a callback class for receiving the mixed audio. - virtual int32_t RegisterMixedStreamCallback( - AudioMixerOutputReceiver* receiver) = 0; - virtual int32_t UnRegisterMixedStreamCallback() = 0; - - // Add/remove participants as candidates for mixing. - virtual int32_t SetMixabilityStatus(MixerParticipant* participant, - bool mixable) = 0; - // Returns true if a participant is a candidate for mixing. - virtual bool MixabilityStatus( - const MixerParticipant& participant) const = 0; - - // Inform the mixer that the participant should always be mixed and not - // count toward the number of mixed participants. Note that a participant - // must have been added to the mixer (by calling SetMixabilityStatus()) - // before this function can be successfully called. - virtual int32_t SetAnonymousMixabilityStatus( - MixerParticipant* participant, bool mixable) = 0; - // Returns true if the participant is mixed anonymously. - virtual bool AnonymousMixabilityStatus( - const MixerParticipant& participant) const = 0; - - // Set the minimum sampling frequency at which to mix. The mixing algorithm - // may still choose to mix at a higher samling frequency to avoid - // downsampling of audio contributing to the mixed audio. - virtual int32_t SetMinimumMixingFrequency(Frequency freq) = 0; - -protected: - AudioConferenceMixer() {} -}; -} // namespace webrtc - -#endif // WEBRTC_MODULES_AUDIO_CONFERENCE_MIXER_INCLUDE_AUDIO_CONFERENCE_MIXER_H_ diff --git a/WebRtc.NET/include/webrtc/modules/audio_conference_mixer/include/audio_conference_mixer_defines.h b/WebRtc.NET/include/webrtc/modules/audio_conference_mixer/include/audio_conference_mixer_defines.h deleted file mode 100644 index e1c5aedc..00000000 --- a/WebRtc.NET/include/webrtc/modules/audio_conference_mixer/include/audio_conference_mixer_defines.h +++ /dev/null @@ -1,87 +0,0 @@ -/* - * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MODULES_AUDIO_CONFERENCE_MIXER_INCLUDE_AUDIO_CONFERENCE_MIXER_DEFINES_H_ -#define WEBRTC_MODULES_AUDIO_CONFERENCE_MIXER_INCLUDE_AUDIO_CONFERENCE_MIXER_DEFINES_H_ - -#include "webrtc/base/checks.h" -#include "webrtc/modules/include/module_common_types.h" -#include "webrtc/typedefs.h" - -namespace webrtc { -class MixHistory; - -// A callback class that all mixer participants must inherit from/implement. -class MixerParticipant -{ -public: - // The implementation of this function should update audioFrame with new - // audio every time it's called. - // - // If it returns -1, the frame will not be added to the mix. - // - // NOTE: This function should not be called. It will remain for a short - // time so that subclasses can override it without getting warnings. - // TODO(henrik.lundin) Remove this function. - virtual int32_t GetAudioFrame(int32_t id, - AudioFrame* audioFrame) { - RTC_CHECK(false); - return -1; - } - - - // The implementation of GetAudioFrameWithMuted should update audio_frame - // with new audio every time it's called. The return value will be - // interpreted as follows. - enum class AudioFrameInfo { - kNormal, // The samples in audio_frame are valid and should be used. - kMuted, // The samples in audio_frame should not be used, but should be - // implicitly interpreted as zero. Other fields in audio_frame - // may be read and should contain meaningful values. - kError // audio_frame will not be used. - }; - - virtual AudioFrameInfo GetAudioFrameWithMuted(int32_t id, - AudioFrame* audio_frame) { - return GetAudioFrame(id, audio_frame) == -1 ? - AudioFrameInfo::kError : - AudioFrameInfo::kNormal; - } - - // Returns true if the participant was mixed this mix iteration. - bool IsMixed() const; - - // This function specifies the sampling frequency needed for the AudioFrame - // for future GetAudioFrame(..) calls. - virtual int32_t NeededFrequency(int32_t id) const = 0; - - MixHistory* _mixHistory; -protected: - MixerParticipant(); - virtual ~MixerParticipant(); -}; - -class AudioMixerOutputReceiver -{ -public: - // This callback function provides the mixed audio for this mix iteration. - // Note that uniqueAudioFrames is an array of AudioFrame pointers with the - // size according to the size parameter. - virtual void NewMixedAudio(const int32_t id, - const AudioFrame& generalAudioFrame, - const AudioFrame** uniqueAudioFrames, - const uint32_t size) = 0; -protected: - AudioMixerOutputReceiver() {} - virtual ~AudioMixerOutputReceiver() {} -}; -} // namespace webrtc - -#endif // WEBRTC_MODULES_AUDIO_CONFERENCE_MIXER_INCLUDE_AUDIO_CONFERENCE_MIXER_DEFINES_H_ diff --git a/WebRtc.NET/include/webrtc/modules/audio_conference_mixer/source/audio_conference_mixer_impl.h b/WebRtc.NET/include/webrtc/modules/audio_conference_mixer/source/audio_conference_mixer_impl.h deleted file mode 100644 index c2fbe98f..00000000 --- a/WebRtc.NET/include/webrtc/modules/audio_conference_mixer/source/audio_conference_mixer_impl.h +++ /dev/null @@ -1,192 +0,0 @@ -/* - * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MODULES_AUDIO_CONFERENCE_MIXER_SOURCE_AUDIO_CONFERENCE_MIXER_IMPL_H_ -#define WEBRTC_MODULES_AUDIO_CONFERENCE_MIXER_SOURCE_AUDIO_CONFERENCE_MIXER_IMPL_H_ - -#include -#include -#include - -#include "webrtc/modules/audio_conference_mixer/include/audio_conference_mixer.h" -#include "webrtc/modules/audio_conference_mixer/source/memory_pool.h" -#include "webrtc/modules/audio_conference_mixer/source/time_scheduler.h" -#include "webrtc/modules/include/module_common_types.h" -#include "webrtc/typedefs.h" - -namespace webrtc { -class AudioProcessing; -class CriticalSectionWrapper; - -struct FrameAndMuteInfo { - FrameAndMuteInfo(AudioFrame* f, bool m) : frame(f), muted(m) {} - AudioFrame* frame; - bool muted; -}; - -typedef std::list AudioFrameList; -typedef std::list MixerParticipantList; - -// Cheshire cat implementation of MixerParticipant's non virtual functions. -class MixHistory -{ -public: - MixHistory(); - ~MixHistory(); - - // Returns true if the participant is being mixed. - bool IsMixed() const; - - // Returns true if the participant was mixed previous mix - // iteration. - bool WasMixed() const; - - // Updates the mixed status. - int32_t SetIsMixed(bool mixed); - - void ResetMixedStatus(); -private: - bool _isMixed; -}; - -class AudioConferenceMixerImpl : public AudioConferenceMixer -{ -public: - // AudioProcessing only accepts 10 ms frames. - enum {kProcessPeriodicityInMs = 10}; - - AudioConferenceMixerImpl(int id); - ~AudioConferenceMixerImpl(); - - // Must be called after ctor. - bool Init(); - - // Module functions - int64_t TimeUntilNextProcess() override; - void Process() override; - - // AudioConferenceMixer functions - int32_t RegisterMixedStreamCallback( - AudioMixerOutputReceiver* mixReceiver) override; - int32_t UnRegisterMixedStreamCallback() override; - int32_t SetMixabilityStatus(MixerParticipant* participant, - bool mixable) override; - bool MixabilityStatus(const MixerParticipant& participant) const override; - int32_t SetMinimumMixingFrequency(Frequency freq) override; - int32_t SetAnonymousMixabilityStatus( - MixerParticipant* participant, bool mixable) override; - bool AnonymousMixabilityStatus( - const MixerParticipant& participant) const override; - -private: - enum{DEFAULT_AUDIO_FRAME_POOLSIZE = 50}; - - // Set/get mix frequency - int32_t SetOutputFrequency(const Frequency& frequency); - Frequency OutputFrequency() const; - - // Fills mixList with the AudioFrames pointers that should be used when - // mixing. - // maxAudioFrameCounter both input and output specifies how many more - // AudioFrames that are allowed to be mixed. - // rampOutList contain AudioFrames corresponding to an audio stream that - // used to be mixed but shouldn't be mixed any longer. These AudioFrames - // should be ramped out over this AudioFrame to avoid audio discontinuities. - void UpdateToMix( - AudioFrameList* mixList, - AudioFrameList* rampOutList, - std::map* mixParticipantList, - size_t* maxAudioFrameCounter) const; - - // Return the lowest mixing frequency that can be used without having to - // downsample any audio. - int32_t GetLowestMixingFrequency() const; - int32_t GetLowestMixingFrequencyFromList( - const MixerParticipantList& mixList) const; - - // Return the AudioFrames that should be mixed anonymously. - void GetAdditionalAudio(AudioFrameList* additionalFramesList) const; - - // Update the MixHistory of all MixerParticipants. mixedParticipantsList - // should contain a map of MixerParticipants that have been mixed. - void UpdateMixedStatus( - const std::map& mixedParticipantsList) const; - - // Clears audioFrameList and reclaims all memory associated with it. - void ClearAudioFrameList(AudioFrameList* audioFrameList) const; - - // This function returns true if it finds the MixerParticipant in the - // specified list of MixerParticipants. - bool IsParticipantInList(const MixerParticipant& participant, - const MixerParticipantList& participantList) const; - - // Add/remove the MixerParticipant to the specified - // MixerParticipant list. - bool AddParticipantToList( - MixerParticipant* participant, - MixerParticipantList* participantList) const; - bool RemoveParticipantFromList( - MixerParticipant* removeParticipant, - MixerParticipantList* participantList) const; - - // Mix the AudioFrames stored in audioFrameList into mixedAudio. - int32_t MixFromList(AudioFrame* mixedAudio, - const AudioFrameList& audioFrameList) const; - - // Mix the AudioFrames stored in audioFrameList into mixedAudio. No - // record will be kept of this mix (e.g. the corresponding MixerParticipants - // will not be marked as IsMixed() - int32_t MixAnonomouslyFromList(AudioFrame* mixedAudio, - const AudioFrameList& audioFrameList) const; - - bool LimitMixedAudio(AudioFrame* mixedAudio) const; - - std::unique_ptr _crit; - std::unique_ptr _cbCrit; - - int32_t _id; - - Frequency _minimumMixingFreq; - - // Mix result callback - AudioMixerOutputReceiver* _mixReceiver; - - // The current sample frequency and sample size when mixing. - Frequency _outputFrequency; - size_t _sampleSize; - - // Memory pool to avoid allocating/deallocating AudioFrames - MemoryPool* _audioFramePool; - - // List of all participants. Note all lists are disjunct - MixerParticipantList _participantList; // May be mixed. - // Always mixed, anonomously. - MixerParticipantList _additionalParticipantList; - - size_t _numMixedParticipants; - // Determines if we will use a limiter for clipping protection during - // mixing. - bool use_limiter_; - - uint32_t _timeStamp; - - // Metronome class. - TimeScheduler _timeScheduler; - - // Counter keeping track of concurrent calls to process. - // Note: should never be higher than 1 or lower than 0. - int16_t _processCalls; - - // Used for inhibiting saturation in mixing. - std::unique_ptr _limiter; -}; -} // namespace webrtc - -#endif // WEBRTC_MODULES_AUDIO_CONFERENCE_MIXER_SOURCE_AUDIO_CONFERENCE_MIXER_IMPL_H_ diff --git a/WebRtc.NET/include/webrtc/modules/audio_conference_mixer/source/audio_frame_manipulator.h b/WebRtc.NET/include/webrtc/modules/audio_conference_mixer/source/audio_frame_manipulator.h deleted file mode 100644 index c136597f..00000000 --- a/WebRtc.NET/include/webrtc/modules/audio_conference_mixer/source/audio_frame_manipulator.h +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MODULES_AUDIO_CONFERENCE_MIXER_SOURCE_AUDIO_FRAME_MANIPULATOR_H_ -#define WEBRTC_MODULES_AUDIO_CONFERENCE_MIXER_SOURCE_AUDIO_FRAME_MANIPULATOR_H_ - -#include "webrtc/typedefs.h" - -namespace webrtc { -class AudioFrame; - -// Updates the audioFrame's energy (based on its samples). -uint32_t CalculateEnergy(const AudioFrame& audioFrame); - -// Apply linear step function that ramps in/out the audio samples in audioFrame -void RampIn(AudioFrame& audioFrame); -void RampOut(AudioFrame& audioFrame); - -} // namespace webrtc - -#endif // WEBRTC_MODULES_AUDIO_CONFERENCE_MIXER_SOURCE_AUDIO_FRAME_MANIPULATOR_H_ diff --git a/WebRtc.NET/include/webrtc/modules/audio_conference_mixer/source/memory_pool.h b/WebRtc.NET/include/webrtc/modules/audio_conference_mixer/source/memory_pool.h deleted file mode 100644 index c0a81311..00000000 --- a/WebRtc.NET/include/webrtc/modules/audio_conference_mixer/source/memory_pool.h +++ /dev/null @@ -1,122 +0,0 @@ -/* - * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MODULES_AUDIO_CONFERENCE_MIXER_SOURCE_MEMORY_POOL_H_ -#define WEBRTC_MODULES_AUDIO_CONFERENCE_MIXER_SOURCE_MEMORY_POOL_H_ - -#include - -#include "webrtc/typedefs.h" - -#ifdef _WIN32 -#include "webrtc/modules/audio_conference_mixer/source/memory_pool_win.h" -#else -#include "webrtc/modules/audio_conference_mixer/source/memory_pool_posix.h" -#endif - -namespace webrtc { - -template -class MemoryPool -{ -public: - // Factory method, constructor disabled. - static int32_t CreateMemoryPool(MemoryPool*& memoryPool, - uint32_t initialPoolSize); - - // Try to delete the memory pool. Fail with return value -1 if there is - // outstanding memory. - static int32_t DeleteMemoryPool( - MemoryPool*& memoryPool); - - // Get/return unused memory. - int32_t PopMemory(MemoryType*& memory); - int32_t PushMemory(MemoryType*& memory); -private: - MemoryPool(int32_t initialPoolSize); - ~MemoryPool(); - - MemoryPoolImpl* _ptrImpl; -}; - -template -MemoryPool::MemoryPool(int32_t initialPoolSize) -{ - _ptrImpl = new MemoryPoolImpl(initialPoolSize); -} - -template -MemoryPool::~MemoryPool() -{ - delete _ptrImpl; -} - -template int32_t -MemoryPool::CreateMemoryPool(MemoryPool*& memoryPool, - uint32_t initialPoolSize) -{ - memoryPool = new MemoryPool(initialPoolSize); - if(memoryPool == NULL) - { - return -1; - } - if(memoryPool->_ptrImpl == NULL) - { - delete memoryPool; - memoryPool = NULL; - return -1; - } - if(!memoryPool->_ptrImpl->Initialize()) - { - delete memoryPool; - memoryPool = NULL; - return -1; - } - return 0; -} - -template -int32_t MemoryPool::DeleteMemoryPool(MemoryPool*& memoryPool) -{ - if(memoryPool == NULL) - { - return -1; - } - if(memoryPool->_ptrImpl == NULL) - { - return -1; - } - if(memoryPool->_ptrImpl->Terminate() == -1) - { - return -1; - } - delete memoryPool; - memoryPool = NULL; - return 0; -} - -template -int32_t MemoryPool::PopMemory(MemoryType*& memory) -{ - return _ptrImpl->PopMemory(memory); -} - -template -int32_t MemoryPool::PushMemory(MemoryType*& memory) -{ - if(memory == NULL) - { - return -1; - } - return _ptrImpl->PushMemory(memory); -} -} // namespace webrtc - -#endif // WEBRTC_MODULES_AUDIO_CONFERENCE_MIXER_SOURCE_MEMORY_POOL_H_ diff --git a/WebRtc.NET/include/webrtc/modules/audio_conference_mixer/source/memory_pool_posix.h b/WebRtc.NET/include/webrtc/modules/audio_conference_mixer/source/memory_pool_posix.h deleted file mode 100644 index 12aae3f2..00000000 --- a/WebRtc.NET/include/webrtc/modules/audio_conference_mixer/source/memory_pool_posix.h +++ /dev/null @@ -1,158 +0,0 @@ -/* - * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MODULES_AUDIO_CONFERENCE_MIXER_SOURCE_MEMORY_POOL_GENERIC_H_ -#define WEBRTC_MODULES_AUDIO_CONFERENCE_MIXER_SOURCE_MEMORY_POOL_GENERIC_H_ - -#include -#include - -#include "webrtc/system_wrappers/include/critical_section_wrapper.h" -#include "webrtc/typedefs.h" - -namespace webrtc { -template -class MemoryPoolImpl -{ -public: - // MemoryPool functions. - int32_t PopMemory(MemoryType*& memory); - int32_t PushMemory(MemoryType*& memory); - - MemoryPoolImpl(int32_t initialPoolSize); - ~MemoryPoolImpl(); - - // Atomic functions - int32_t Terminate(); - bool Initialize(); -private: - // Non-atomic function. - int32_t CreateMemory(uint32_t amountToCreate); - - CriticalSectionWrapper* _crit; - - bool _terminate; - - std::list _memoryPool; - - uint32_t _initialPoolSize; - uint32_t _createdMemory; - uint32_t _outstandingMemory; -}; - -template -MemoryPoolImpl::MemoryPoolImpl(int32_t initialPoolSize) - : _crit(CriticalSectionWrapper::CreateCriticalSection()), - _terminate(false), - _initialPoolSize(initialPoolSize), - _createdMemory(0), - _outstandingMemory(0) -{ -} - -template -MemoryPoolImpl::~MemoryPoolImpl() -{ - // Trigger assert if there is outstanding memory. - assert(_createdMemory == 0); - assert(_outstandingMemory == 0); - delete _crit; -} - -template -int32_t MemoryPoolImpl::PopMemory(MemoryType*& memory) -{ - CriticalSectionScoped cs(_crit); - if(_terminate) - { - memory = NULL; - return -1; - } - if (_memoryPool.empty()) { - // _memoryPool empty create new memory. - CreateMemory(_initialPoolSize); - if(_memoryPool.empty()) - { - memory = NULL; - return -1; - } - } - memory = _memoryPool.front(); - _memoryPool.pop_front(); - _outstandingMemory++; - return 0; -} - -template -int32_t MemoryPoolImpl::PushMemory(MemoryType*& memory) -{ - if(memory == NULL) - { - return -1; - } - CriticalSectionScoped cs(_crit); - _outstandingMemory--; - if(_memoryPool.size() > (_initialPoolSize << 1)) - { - // Reclaim memory if less than half of the pool is unused. - _createdMemory--; - delete memory; - memory = NULL; - return 0; - } - _memoryPool.push_back(memory); - memory = NULL; - return 0; -} - -template -bool MemoryPoolImpl::Initialize() -{ - CriticalSectionScoped cs(_crit); - return CreateMemory(_initialPoolSize) == 0; -} - -template -int32_t MemoryPoolImpl::Terminate() -{ - CriticalSectionScoped cs(_crit); - assert(_createdMemory == _outstandingMemory + _memoryPool.size()); - - _terminate = true; - // Reclaim all memory. - while(_createdMemory > 0) - { - MemoryType* memory = _memoryPool.front(); - _memoryPool.pop_front(); - delete memory; - _createdMemory--; - } - return 0; -} - -template -int32_t MemoryPoolImpl::CreateMemory( - uint32_t amountToCreate) -{ - for(uint32_t i = 0; i < amountToCreate; i++) - { - MemoryType* memory = new MemoryType(); - if(memory == NULL) - { - return -1; - } - _memoryPool.push_back(memory); - _createdMemory++; - } - return 0; -} -} // namespace webrtc - -#endif // WEBRTC_MODULES_AUDIO_CONFERENCE_MIXER_SOURCE_MEMORY_POOL_GENERIC_H_ diff --git a/WebRtc.NET/include/webrtc/modules/audio_conference_mixer/source/memory_pool_win.h b/WebRtc.NET/include/webrtc/modules/audio_conference_mixer/source/memory_pool_win.h deleted file mode 100644 index 3ec91874..00000000 --- a/WebRtc.NET/include/webrtc/modules/audio_conference_mixer/source/memory_pool_win.h +++ /dev/null @@ -1,199 +0,0 @@ -/* - * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MODULES_AUDIO_CONFERENCE_MIXER_SOURCE_MEMORY_POOL_WINDOWS_H_ -#define WEBRTC_MODULES_AUDIO_CONFERENCE_MIXER_SOURCE_MEMORY_POOL_WINDOWS_H_ - -#include -#include - -#include "webrtc/system_wrappers/include/aligned_malloc.h" -#include "webrtc/system_wrappers/include/atomic32.h" -#include "webrtc/typedefs.h" - -namespace webrtc { -template struct MemoryPoolItem; - -template -struct MemoryPoolItemPayload -{ - MemoryPoolItemPayload() - : memoryType(), - base(NULL) - { - } - MemoryType memoryType; - MemoryPoolItem* base; -}; - -template -struct MemoryPoolItem -{ - // Atomic single linked list entry header. - SLIST_ENTRY itemEntry; - // Atomic single linked list payload. - MemoryPoolItemPayload* payload; -}; - -template -class MemoryPoolImpl -{ -public: - // MemoryPool functions. - int32_t PopMemory(MemoryType*& memory); - int32_t PushMemory(MemoryType*& memory); - - MemoryPoolImpl(int32_t /*initialPoolSize*/); - ~MemoryPoolImpl(); - - // Atomic functions. - int32_t Terminate(); - bool Initialize(); -private: - // Non-atomic function. - MemoryPoolItem* CreateMemory(); - - // Windows implementation of single linked atomic list, documented here: - // http://msdn.microsoft.com/en-us/library/ms686962(VS.85).aspx - - // Atomic single linked list head. - PSLIST_HEADER _pListHead; - - Atomic32 _createdMemory; - Atomic32 _outstandingMemory; -}; - -template -MemoryPoolImpl::MemoryPoolImpl( - int32_t /*initialPoolSize*/) - : _pListHead(NULL), - _createdMemory(0), - _outstandingMemory(0) -{ -} - -template -MemoryPoolImpl::~MemoryPoolImpl() -{ - Terminate(); - if(_pListHead != NULL) - { - AlignedFree(reinterpret_cast(_pListHead)); - _pListHead = NULL; - } - // Trigger assert if there is outstanding memory. - assert(_createdMemory.Value() == 0); - assert(_outstandingMemory.Value() == 0); -} - -template -int32_t MemoryPoolImpl::PopMemory(MemoryType*& memory) -{ - PSLIST_ENTRY pListEntry = InterlockedPopEntrySList(_pListHead); - if(pListEntry == NULL) - { - MemoryPoolItem* item = CreateMemory(); - if(item == NULL) - { - return -1; - } - pListEntry = &(item->itemEntry); - } - ++_outstandingMemory; - memory = &((MemoryPoolItem*)pListEntry)->payload->memoryType; - return 0; -} - -template -int32_t MemoryPoolImpl::PushMemory(MemoryType*& memory) -{ - if(memory == NULL) - { - return -1; - } - - MemoryPoolItem* item = - ((MemoryPoolItemPayload*)memory)->base; - - const int32_t usedItems = --_outstandingMemory; - const int32_t totalItems = _createdMemory.Value(); - const int32_t freeItems = totalItems - usedItems; - if(freeItems < 0) - { - assert(false); - delete item->payload; - AlignedFree(item); - return -1; - } - if(freeItems >= totalItems>>1) - { - delete item->payload; - AlignedFree(item); - --_createdMemory; - return 0; - } - InterlockedPushEntrySList(_pListHead,&(item->itemEntry)); - return 0; -} - -template -bool MemoryPoolImpl::Initialize() -{ - _pListHead = (PSLIST_HEADER)AlignedMalloc(sizeof(SLIST_HEADER), - MEMORY_ALLOCATION_ALIGNMENT); - if(_pListHead == NULL) - { - return false; - } - InitializeSListHead(_pListHead); - return true; -} - -template -int32_t MemoryPoolImpl::Terminate() -{ - int32_t itemsFreed = 0; - PSLIST_ENTRY pListEntry = InterlockedPopEntrySList(_pListHead); - while(pListEntry != NULL) - { - MemoryPoolItem* item = ((MemoryPoolItem*)pListEntry); - delete item->payload; - AlignedFree(item); - --_createdMemory; - itemsFreed++; - pListEntry = InterlockedPopEntrySList(_pListHead); - } - return itemsFreed; -} - -template -MemoryPoolItem* MemoryPoolImpl::CreateMemory() -{ - MemoryPoolItem* returnValue = (MemoryPoolItem*) - AlignedMalloc(sizeof(MemoryPoolItem), - MEMORY_ALLOCATION_ALIGNMENT); - if(returnValue == NULL) - { - return NULL; - } - - returnValue->payload = new MemoryPoolItemPayload(); - if(returnValue->payload == NULL) - { - delete returnValue; - return NULL; - } - returnValue->payload->base = returnValue; - ++_createdMemory; - return returnValue; -} -} // namespace webrtc - -#endif // WEBRTC_MODULES_AUDIO_CONFERENCE_MIXER_SOURCE_MEMORY_POOL_WINDOWS_H_ diff --git a/WebRtc.NET/include/webrtc/modules/audio_conference_mixer/source/time_scheduler.h b/WebRtc.NET/include/webrtc/modules/audio_conference_mixer/source/time_scheduler.h deleted file mode 100644 index d1897fa1..00000000 --- a/WebRtc.NET/include/webrtc/modules/audio_conference_mixer/source/time_scheduler.h +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -// The TimeScheduler class keeps track of periodic events. It is non-drifting -// and keeps track of any missed periods so that it is possible to catch up. -// (compare to a metronome) - -#ifndef WEBRTC_MODULES_AUDIO_CONFERENCE_MIXER_SOURCE_TIME_SCHEDULER_H_ -#define WEBRTC_MODULES_AUDIO_CONFERENCE_MIXER_SOURCE_TIME_SCHEDULER_H_ - -namespace webrtc { -class CriticalSectionWrapper; -class TimeScheduler -{ -public: - TimeScheduler(const int64_t periodicityInMs); - ~TimeScheduler(); - - // Signal that a periodic event has been triggered. - int32_t UpdateScheduler(); - - // Set updateTimeInMs to the amount of time until UpdateScheduler() should - // be called. This time will never be negative. - int32_t TimeToNextUpdate(int64_t& updateTimeInMS) const; - -private: - CriticalSectionWrapper* _crit; - - bool _isStarted; - int64_t _lastPeriodMark; // In ns - - int64_t _periodicityInMs; - int64_t _periodicityInTicks; - uint32_t _missedPeriods; -}; -} // namespace webrtc - -#endif // WEBRTC_MODULES_AUDIO_CONFERENCE_MIXER_SOURCE_TIME_SCHEDULER_H_ diff --git a/WebRtc.NET/include/webrtc/modules/audio_device/android/audio_common.h b/WebRtc.NET/include/webrtc/modules/audio_device/android/audio_common.h deleted file mode 100644 index 53618656..00000000 --- a/WebRtc.NET/include/webrtc/modules/audio_device/android/audio_common.h +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MODULES_AUDIO_DEVICE_ANDROID_AUDIO_COMMON_H_ -#define WEBRTC_MODULES_AUDIO_DEVICE_ANDROID_AUDIO_COMMON_H_ - -namespace webrtc { - -const int kDefaultSampleRate = 44100; -// Delay estimates for the two different supported modes. These values are based -// on real-time round-trip delay estimates on a large set of devices and they -// are lower bounds since the filter length is 128 ms, so the AEC works for -// delays in the range [50, ~170] ms and [150, ~270] ms. Note that, in most -// cases, the lowest delay estimate will not be utilized since devices that -// support low-latency output audio often supports HW AEC as well. -const int kLowLatencyModeDelayEstimateInMilliseconds = 50; -const int kHighLatencyModeDelayEstimateInMilliseconds = 150; - -} // namespace webrtc - -#endif // WEBRTC_MODULES_AUDIO_DEVICE_ANDROID_AUDIO_COMMON_H_ diff --git a/WebRtc.NET/include/webrtc/modules/audio_device/android/audio_device_template.h b/WebRtc.NET/include/webrtc/modules/audio_device/android/audio_device_template.h deleted file mode 100644 index f8307f51..00000000 --- a/WebRtc.NET/include/webrtc/modules/audio_device/android/audio_device_template.h +++ /dev/null @@ -1,563 +0,0 @@ -/* - * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MODULES_AUDIO_DEVICE_ANDROID_AUDIO_DEVICE_TEMPLATE_H_ -#define WEBRTC_MODULES_AUDIO_DEVICE_ANDROID_AUDIO_DEVICE_TEMPLATE_H_ - -#include "webrtc/base/checks.h" -#include "webrtc/base/logging.h" -#include "webrtc/base/thread_checker.h" -#include "webrtc/modules/audio_device/android/audio_manager.h" -#include "webrtc/modules/audio_device/audio_device_generic.h" - -namespace webrtc { - -// InputType/OutputType can be any class that implements the capturing/rendering -// part of the AudioDeviceGeneric API. -// Construction and destruction must be done on one and the same thread. Each -// internal implementation of InputType and OutputType will RTC_DCHECK if that -// is not the case. All implemented methods must also be called on the same -// thread. See comments in each InputType/OutputType class for more info. -// It is possible to call the two static methods (SetAndroidAudioDeviceObjects -// and ClearAndroidAudioDeviceObjects) from a different thread but both will -// RTC_CHECK that the calling thread is attached to a Java VM. - -template -class AudioDeviceTemplate : public AudioDeviceGeneric { - public: - AudioDeviceTemplate(AudioDeviceModule::AudioLayer audio_layer, - AudioManager* audio_manager) - : audio_layer_(audio_layer), - audio_manager_(audio_manager), - output_(audio_manager_), - input_(audio_manager_), - initialized_(false) { - LOG(INFO) << __FUNCTION__; - RTC_CHECK(audio_manager); - audio_manager_->SetActiveAudioLayer(audio_layer); - } - - virtual ~AudioDeviceTemplate() { LOG(INFO) << __FUNCTION__; } - - int32_t ActiveAudioLayer( - AudioDeviceModule::AudioLayer& audioLayer) const override { - LOG(INFO) << __FUNCTION__; - audioLayer = audio_layer_; - return 0; - } - - InitStatus Init() override { - LOG(INFO) << __FUNCTION__; - RTC_DCHECK(thread_checker_.CalledOnValidThread()); - RTC_DCHECK(!initialized_); - if (!audio_manager_->Init()) { - return InitStatus::OTHER_ERROR; - } - if (output_.Init() != 0) { - audio_manager_->Close(); - return InitStatus::PLAYOUT_ERROR; - } - if (input_.Init() != 0) { - output_.Terminate(); - audio_manager_->Close(); - return InitStatus::RECORDING_ERROR; - } - initialized_ = true; - return InitStatus::OK; - } - - int32_t Terminate() override { - LOG(INFO) << __FUNCTION__; - RTC_DCHECK(thread_checker_.CalledOnValidThread()); - int32_t err = input_.Terminate(); - err |= output_.Terminate(); - err |= !audio_manager_->Close(); - initialized_ = false; - RTC_DCHECK_EQ(err, 0); - return err; - } - - bool Initialized() const override { - LOG(INFO) << __FUNCTION__; - RTC_DCHECK(thread_checker_.CalledOnValidThread()); - return initialized_; - } - - int16_t PlayoutDevices() override { - LOG(INFO) << __FUNCTION__; - return 1; - } - - int16_t RecordingDevices() override { - LOG(INFO) << __FUNCTION__; - return 1; - } - - int32_t PlayoutDeviceName( - uint16_t index, - char name[kAdmMaxDeviceNameSize], - char guid[kAdmMaxGuidSize]) override { - FATAL() << "Should never be called"; - return -1; - } - - int32_t RecordingDeviceName( - uint16_t index, - char name[kAdmMaxDeviceNameSize], - char guid[kAdmMaxGuidSize]) override { - FATAL() << "Should never be called"; - return -1; - } - - int32_t SetPlayoutDevice(uint16_t index) override { - // OK to use but it has no effect currently since device selection is - // done using Andoid APIs instead. - LOG(INFO) << __FUNCTION__; - return 0; - } - - int32_t SetPlayoutDevice( - AudioDeviceModule::WindowsDeviceType device) override { - FATAL() << "Should never be called"; - return -1; - } - - int32_t SetRecordingDevice(uint16_t index) override { - // OK to use but it has no effect currently since device selection is - // done using Andoid APIs instead. - LOG(INFO) << __FUNCTION__; - return 0; - } - - int32_t SetRecordingDevice( - AudioDeviceModule::WindowsDeviceType device) override { - FATAL() << "Should never be called"; - return -1; - } - - int32_t PlayoutIsAvailable(bool& available) override { - LOG(INFO) << __FUNCTION__; - available = true; - return 0; - } - - int32_t InitPlayout() override { - LOG(INFO) << __FUNCTION__; - return output_.InitPlayout(); - } - - bool PlayoutIsInitialized() const override { - LOG(INFO) << __FUNCTION__; - return output_.PlayoutIsInitialized(); - } - - int32_t RecordingIsAvailable(bool& available) override { - LOG(INFO) << __FUNCTION__; - available = true; - return 0; - } - - int32_t InitRecording() override { - LOG(INFO) << __FUNCTION__; - return input_.InitRecording(); - } - - bool RecordingIsInitialized() const override { - LOG(INFO) << __FUNCTION__; - return input_.RecordingIsInitialized(); - } - - int32_t StartPlayout() override { - LOG(INFO) << __FUNCTION__; - if (!audio_manager_->IsCommunicationModeEnabled()) { - LOG(WARNING) - << "The application should use MODE_IN_COMMUNICATION audio mode!"; - } - return output_.StartPlayout(); - } - - int32_t StopPlayout() override { - // Avoid using audio manger (JNI/Java cost) if playout was inactive. - if (!Playing()) - return 0; - LOG(INFO) << __FUNCTION__; - int32_t err = output_.StopPlayout(); - return err; - } - - bool Playing() const override { - LOG(INFO) << __FUNCTION__; - return output_.Playing(); - } - - int32_t StartRecording() override { - LOG(INFO) << __FUNCTION__; - if (!audio_manager_->IsCommunicationModeEnabled()) { - LOG(WARNING) - << "The application should use MODE_IN_COMMUNICATION audio mode!"; - } - return input_.StartRecording(); - } - - int32_t StopRecording() override { - // Avoid using audio manger (JNI/Java cost) if recording was inactive. - LOG(INFO) << __FUNCTION__; - if (!Recording()) - return 0; - int32_t err = input_.StopRecording(); - return err; - } - - bool Recording() const override { - return input_.Recording() ; - } - - int32_t SetAGC(bool enable) override { - if (enable) { - FATAL() << "Should never be called"; - } - return -1; - } - - bool AGC() const override { - LOG(INFO) << __FUNCTION__; - return false; - } - - int32_t SetWaveOutVolume( - uint16_t volumeLeft, uint16_t volumeRight) override { - FATAL() << "Should never be called"; - return -1; - } - - int32_t WaveOutVolume( - uint16_t& volumeLeft, uint16_t& volumeRight) const override { - FATAL() << "Should never be called"; - return -1; - } - - int32_t InitSpeaker() override { - LOG(INFO) << __FUNCTION__; - return 0; - } - - bool SpeakerIsInitialized() const override { - LOG(INFO) << __FUNCTION__; - return true; - } - - int32_t InitMicrophone() override { - LOG(INFO) << __FUNCTION__; - return 0; - } - - bool MicrophoneIsInitialized() const override { - LOG(INFO) << __FUNCTION__; - return true; - } - - int32_t SpeakerVolumeIsAvailable(bool& available) override { - LOG(INFO) << __FUNCTION__; - return output_.SpeakerVolumeIsAvailable(available); - } - - int32_t SetSpeakerVolume(uint32_t volume) override { - LOG(INFO) << __FUNCTION__; - return output_.SetSpeakerVolume(volume); - } - - int32_t SpeakerVolume(uint32_t& volume) const override { - LOG(INFO) << __FUNCTION__; - return output_.SpeakerVolume(volume); - } - - int32_t MaxSpeakerVolume(uint32_t& maxVolume) const override { - LOG(INFO) << __FUNCTION__; - return output_.MaxSpeakerVolume(maxVolume); - } - - int32_t MinSpeakerVolume(uint32_t& minVolume) const override { - LOG(INFO) << __FUNCTION__; - return output_.MinSpeakerVolume(minVolume); - } - - int32_t SpeakerVolumeStepSize(uint16_t& stepSize) const override { - FATAL() << "Should never be called"; - return -1; - } - - int32_t MicrophoneVolumeIsAvailable(bool& available) override{ - available = false; - return -1; - } - - int32_t SetMicrophoneVolume(uint32_t volume) override { - FATAL() << "Should never be called"; - return -1; - } - - int32_t MicrophoneVolume(uint32_t& volume) const override { - FATAL() << "Should never be called"; - return -1; - } - - int32_t MaxMicrophoneVolume(uint32_t& maxVolume) const override { - FATAL() << "Should never be called"; - return -1; - } - - int32_t MinMicrophoneVolume(uint32_t& minVolume) const override { - FATAL() << "Should never be called"; - return -1; - } - - int32_t MicrophoneVolumeStepSize(uint16_t& stepSize) const override { - FATAL() << "Should never be called"; - return -1; - } - - int32_t SpeakerMuteIsAvailable(bool& available) override { - FATAL() << "Should never be called"; - return -1; - } - - int32_t SetSpeakerMute(bool enable) override { - FATAL() << "Should never be called"; - return -1; - } - - int32_t SpeakerMute(bool& enabled) const override { - FATAL() << "Should never be called"; - return -1; - } - - int32_t MicrophoneMuteIsAvailable(bool& available) override { - FATAL() << "Not implemented"; - return -1; - } - - int32_t SetMicrophoneMute(bool enable) override { - FATAL() << "Not implemented"; - return -1; - } - - int32_t MicrophoneMute(bool& enabled) const override { - FATAL() << "Not implemented"; - return -1; - } - - int32_t MicrophoneBoostIsAvailable(bool& available) override { - FATAL() << "Should never be called"; - return -1; - } - - int32_t SetMicrophoneBoost(bool enable) override { - FATAL() << "Should never be called"; - return -1; - } - - int32_t MicrophoneBoost(bool& enabled) const override { - FATAL() << "Should never be called"; - return -1; - } - - int32_t StereoPlayoutIsAvailable(bool& available) override { - LOG(INFO) << __FUNCTION__; - available = false; - return 0; - } - - // TODO(henrika): add support. - int32_t SetStereoPlayout(bool enable) override { - LOG(INFO) << __FUNCTION__; - return -1; - } - - // TODO(henrika): add support. - int32_t StereoPlayout(bool& enabled) const override { - enabled = false; - FATAL() << "Should never be called"; - return -1; - } - - int32_t StereoRecordingIsAvailable(bool& available) override { - LOG(INFO) << __FUNCTION__; - available = false; - return 0; - } - - int32_t SetStereoRecording(bool enable) override { - LOG(INFO) << __FUNCTION__; - return -1; - } - - int32_t StereoRecording(bool& enabled) const override { - LOG(INFO) << __FUNCTION__; - enabled = false; - return 0; - } - - int32_t SetPlayoutBuffer( - const AudioDeviceModule::BufferType type, uint16_t sizeMS) override { - FATAL() << "Should never be called"; - return -1; - } - - int32_t PlayoutBuffer( - AudioDeviceModule::BufferType& type, uint16_t& sizeMS) const override { - FATAL() << "Should never be called"; - return -1; - } - - int32_t PlayoutDelay(uint16_t& delay_ms) const override { - // Best guess we can do is to use half of the estimated total delay. - delay_ms = audio_manager_->GetDelayEstimateInMilliseconds() / 2; - RTC_DCHECK_GT(delay_ms, 0); - return 0; - } - - int32_t RecordingDelay(uint16_t& delay_ms) const override { - // Best guess we can do is to use half of the estimated total delay. - LOG(INFO) << __FUNCTION__; - delay_ms = audio_manager_->GetDelayEstimateInMilliseconds() / 2; - RTC_DCHECK_GT(delay_ms, 0); - return 0; - } - - int32_t CPULoad(uint16_t& load) const override { - FATAL() << "Should never be called"; - return -1; - } - - bool PlayoutWarning() const override { - return false; - } - - bool PlayoutError() const override { - return false; - } - - bool RecordingWarning() const override { - return false; - } - - bool RecordingError() const override { - return false; - } - - void ClearPlayoutWarning() override { LOG(INFO) << __FUNCTION__; } - - void ClearPlayoutError() override { LOG(INFO) << __FUNCTION__; } - - void ClearRecordingWarning() override { LOG(INFO) << __FUNCTION__; } - - void ClearRecordingError() override { LOG(INFO) << __FUNCTION__; } - - void AttachAudioBuffer(AudioDeviceBuffer* audioBuffer) override { - LOG(INFO) << __FUNCTION__; - output_.AttachAudioBuffer(audioBuffer); - input_.AttachAudioBuffer(audioBuffer); - } - - // TODO(henrika): remove - int32_t SetPlayoutSampleRate(const uint32_t samplesPerSec) override { - FATAL() << "Should never be called"; - return -1; - } - - int32_t SetLoudspeakerStatus(bool enable) override { - FATAL() << "Should never be called"; - return -1; - } - - int32_t GetLoudspeakerStatus(bool& enable) const override { - FATAL() << "Should never be called"; - return -1; - } - - // Returns true if the device both supports built in AEC and the device - // is not blacklisted. - // Currently, if OpenSL ES is used in both directions, this method will still - // report the correct value and it has the correct effect. As an example: - // a device supports built in AEC and this method returns true. Libjingle - // will then disable the WebRTC based AEC and that will work for all devices - // (mainly Nexus) even when OpenSL ES is used for input since our current - // implementation will enable built-in AEC by default also for OpenSL ES. - // The only "bad" thing that happens today is that when Libjingle calls - // OpenSLESRecorder::EnableBuiltInAEC() it will not have any real effect and - // a "Not Implemented" log will be filed. This non-perfect state will remain - // until I have added full support for audio effects based on OpenSL ES APIs. - bool BuiltInAECIsAvailable() const override { - LOG(INFO) << __FUNCTION__; - return audio_manager_->IsAcousticEchoCancelerSupported(); - } - - // TODO(henrika): add implementation for OpenSL ES based audio as well. - int32_t EnableBuiltInAEC(bool enable) override { - LOG(INFO) << __FUNCTION__ << "(" << enable << ")"; - RTC_CHECK(BuiltInAECIsAvailable()) << "HW AEC is not available"; - return input_.EnableBuiltInAEC(enable); - } - - // Returns true if the device both supports built in AGC and the device - // is not blacklisted. - // TODO(henrika): add implementation for OpenSL ES based audio as well. - // In addition, see comments for BuiltInAECIsAvailable(). - bool BuiltInAGCIsAvailable() const override { - LOG(INFO) << __FUNCTION__; - return audio_manager_->IsAutomaticGainControlSupported(); - } - - // TODO(henrika): add implementation for OpenSL ES based audio as well. - int32_t EnableBuiltInAGC(bool enable) override { - LOG(INFO) << __FUNCTION__ << "(" << enable << ")"; - RTC_CHECK(BuiltInAGCIsAvailable()) << "HW AGC is not available"; - return input_.EnableBuiltInAGC(enable); - } - - // Returns true if the device both supports built in NS and the device - // is not blacklisted. - // TODO(henrika): add implementation for OpenSL ES based audio as well. - // In addition, see comments for BuiltInAECIsAvailable(). - bool BuiltInNSIsAvailable() const override { - LOG(INFO) << __FUNCTION__; - return audio_manager_->IsNoiseSuppressorSupported(); - } - - // TODO(henrika): add implementation for OpenSL ES based audio as well. - int32_t EnableBuiltInNS(bool enable) override { - LOG(INFO) << __FUNCTION__ << "(" << enable << ")"; - RTC_CHECK(BuiltInNSIsAvailable()) << "HW NS is not available"; - return input_.EnableBuiltInNS(enable); - } - - private: - rtc::ThreadChecker thread_checker_; - - // Local copy of the audio layer set during construction of the - // AudioDeviceModuleImpl instance. Read only value. - const AudioDeviceModule::AudioLayer audio_layer_; - - // Non-owning raw pointer to AudioManager instance given to use at - // construction. The real object is owned by AudioDeviceModuleImpl and the - // life time is the same as that of the AudioDeviceModuleImpl, hence there - // is no risk of reading a NULL pointer at any time in this class. - AudioManager* const audio_manager_; - - OutputType output_; - - InputType input_; - - bool initialized_; -}; - -} // namespace webrtc - -#endif // WEBRTC_MODULES_AUDIO_DEVICE_ANDROID_AUDIO_DEVICE_TEMPLATE_H_ diff --git a/WebRtc.NET/include/webrtc/modules/audio_device/android/audio_record_jni.h b/WebRtc.NET/include/webrtc/modules/audio_device/android/audio_record_jni.h deleted file mode 100644 index 3a1a94aa..00000000 --- a/WebRtc.NET/include/webrtc/modules/audio_device/android/audio_record_jni.h +++ /dev/null @@ -1,163 +0,0 @@ -/* - * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MODULES_AUDIO_DEVICE_ANDROID_AUDIO_RECORD_JNI_H_ -#define WEBRTC_MODULES_AUDIO_DEVICE_ANDROID_AUDIO_RECORD_JNI_H_ - -#include - -#include - -#include "webrtc/base/thread_checker.h" -#include "webrtc/modules/audio_device/android/audio_manager.h" -#include "webrtc/modules/audio_device/include/audio_device_defines.h" -#include "webrtc/modules/audio_device/audio_device_generic.h" -#include "webrtc/modules/utility/include/helpers_android.h" -#include "webrtc/modules/utility/include/jvm_android.h" - -namespace webrtc { - -// Implements 16-bit mono PCM audio input support for Android using the Java -// AudioRecord interface. Most of the work is done by its Java counterpart in -// WebRtcAudioRecord.java. This class is created and lives on a thread in -// C++-land, but recorded audio buffers are delivered on a high-priority -// thread managed by the Java class. -// -// The Java class makes use of AudioEffect features (mainly AEC) which are -// first available in Jelly Bean. If it is instantiated running against earlier -// SDKs, the AEC provided by the APM in WebRTC must be used and enabled -// separately instead. -// -// An instance must be created and destroyed on one and the same thread. -// All public methods must also be called on the same thread. A thread checker -// will RTC_DCHECK if any method is called on an invalid thread. -// -// This class uses AttachCurrentThreadIfNeeded to attach to a Java VM if needed -// and detach when the object goes out of scope. Additional thread checking -// guarantees that no other (possibly non attached) thread is used. -class AudioRecordJni { - public: - // Wraps the Java specific parts of the AudioRecordJni into one helper class. - class JavaAudioRecord { - public: - JavaAudioRecord(NativeRegistration* native_registration, - std::unique_ptr audio_track); - ~JavaAudioRecord(); - - int InitRecording(int sample_rate, size_t channels); - bool StartRecording(); - bool StopRecording(); - bool EnableBuiltInAEC(bool enable); - bool EnableBuiltInNS(bool enable); - - private: - std::unique_ptr audio_record_; - jmethodID init_recording_; - jmethodID start_recording_; - jmethodID stop_recording_; - jmethodID enable_built_in_aec_; - jmethodID enable_built_in_ns_; - }; - - explicit AudioRecordJni(AudioManager* audio_manager); - ~AudioRecordJni(); - - int32_t Init(); - int32_t Terminate(); - - int32_t InitRecording(); - bool RecordingIsInitialized() const { return initialized_; } - - int32_t StartRecording(); - int32_t StopRecording(); - bool Recording() const { return recording_; } - - void AttachAudioBuffer(AudioDeviceBuffer* audioBuffer); - - int32_t EnableBuiltInAEC(bool enable); - int32_t EnableBuiltInAGC(bool enable); - int32_t EnableBuiltInNS(bool enable); - - private: - // Called from Java side so we can cache the address of the Java-manged - // |byte_buffer| in |direct_buffer_address_|. The size of the buffer - // is also stored in |direct_buffer_capacity_in_bytes_|. - // This method will be called by the WebRtcAudioRecord constructor, i.e., - // on the same thread that this object is created on. - static void JNICALL CacheDirectBufferAddress( - JNIEnv* env, jobject obj, jobject byte_buffer, jlong nativeAudioRecord); - void OnCacheDirectBufferAddress(JNIEnv* env, jobject byte_buffer); - - // Called periodically by the Java based WebRtcAudioRecord object when - // recording has started. Each call indicates that there are |length| new - // bytes recorded in the memory area |direct_buffer_address_| and it is - // now time to send these to the consumer. - // This method is called on a high-priority thread from Java. The name of - // the thread is 'AudioRecordThread'. - static void JNICALL DataIsRecorded( - JNIEnv* env, jobject obj, jint length, jlong nativeAudioRecord); - void OnDataIsRecorded(int length); - - // Stores thread ID in constructor. - rtc::ThreadChecker thread_checker_; - - // Stores thread ID in first call to OnDataIsRecorded() from high-priority - // thread in Java. Detached during construction of this object. - rtc::ThreadChecker thread_checker_java_; - - // Calls AttachCurrentThread() if this thread is not attached at construction. - // Also ensures that DetachCurrentThread() is called at destruction. - AttachCurrentThreadIfNeeded attach_thread_if_needed_; - - // Wraps the JNI interface pointer and methods associated with it. - std::unique_ptr j_environment_; - - // Contains factory method for creating the Java object. - std::unique_ptr j_native_registration_; - - // Wraps the Java specific parts of the AudioRecordJni class. - std::unique_ptr j_audio_record_; - - // Raw pointer to the audio manger. - const AudioManager* audio_manager_; - - // Contains audio parameters provided to this class at construction by the - // AudioManager. - const AudioParameters audio_parameters_; - - // Delay estimate of the total round-trip delay (input + output). - // Fixed value set once in AttachAudioBuffer() and it can take one out of two - // possible values. See audio_common.h for details. - int total_delay_in_milliseconds_; - - // Cached copy of address to direct audio buffer owned by |j_audio_record_|. - void* direct_buffer_address_; - - // Number of bytes in the direct audio buffer owned by |j_audio_record_|. - size_t direct_buffer_capacity_in_bytes_; - - // Number audio frames per audio buffer. Each audio frame corresponds to - // one sample of PCM mono data at 16 bits per sample. Hence, each audio - // frame contains 2 bytes (given that the Java layer only supports mono). - // Example: 480 for 48000 Hz or 441 for 44100 Hz. - size_t frames_per_buffer_; - - bool initialized_; - - bool recording_; - - // Raw pointer handle provided to us in AttachAudioBuffer(). Owned by the - // AudioDeviceModuleImpl class and called by AudioDeviceModule::Create(). - AudioDeviceBuffer* audio_device_buffer_; -}; - -} // namespace webrtc - -#endif // WEBRTC_MODULES_AUDIO_DEVICE_ANDROID_AUDIO_RECORD_JNI_H_ diff --git a/WebRtc.NET/include/webrtc/modules/audio_device/android/audio_track_jni.h b/WebRtc.NET/include/webrtc/modules/audio_device/android/audio_track_jni.h deleted file mode 100644 index 2c78a590..00000000 --- a/WebRtc.NET/include/webrtc/modules/audio_device/android/audio_track_jni.h +++ /dev/null @@ -1,155 +0,0 @@ -/* - * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MODULES_AUDIO_DEVICE_ANDROID_AUDIO_TRACK_JNI_H_ -#define WEBRTC_MODULES_AUDIO_DEVICE_ANDROID_AUDIO_TRACK_JNI_H_ - -#include - -#include - -#include "webrtc/base/thread_checker.h" -#include "webrtc/modules/audio_device/android/audio_common.h" -#include "webrtc/modules/audio_device/android/audio_manager.h" -#include "webrtc/modules/audio_device/include/audio_device_defines.h" -#include "webrtc/modules/audio_device/audio_device_generic.h" -#include "webrtc/modules/utility/include/helpers_android.h" -#include "webrtc/modules/utility/include/jvm_android.h" - -namespace webrtc { - -// Implements 16-bit mono PCM audio output support for Android using the Java -// AudioTrack interface. Most of the work is done by its Java counterpart in -// WebRtcAudioTrack.java. This class is created and lives on a thread in -// C++-land, but decoded audio buffers are requested on a high-priority -// thread managed by the Java class. -// -// An instance must be created and destroyed on one and the same thread. -// All public methods must also be called on the same thread. A thread checker -// will RTC_DCHECK if any method is called on an invalid thread. -// -// This class uses AttachCurrentThreadIfNeeded to attach to a Java VM if needed -// and detach when the object goes out of scope. Additional thread checking -// guarantees that no other (possibly non attached) thread is used. -class AudioTrackJni { - public: - // Wraps the Java specific parts of the AudioTrackJni into one helper class. - class JavaAudioTrack { - public: - JavaAudioTrack(NativeRegistration* native_registration, - std::unique_ptr audio_track); - ~JavaAudioTrack(); - - bool InitPlayout(int sample_rate, int channels); - bool StartPlayout(); - bool StopPlayout(); - bool SetStreamVolume(int volume); - int GetStreamMaxVolume(); - int GetStreamVolume(); - - private: - std::unique_ptr audio_track_; - jmethodID init_playout_; - jmethodID start_playout_; - jmethodID stop_playout_; - jmethodID set_stream_volume_; - jmethodID get_stream_max_volume_; - jmethodID get_stream_volume_; - }; - - explicit AudioTrackJni(AudioManager* audio_manager); - ~AudioTrackJni(); - - int32_t Init(); - int32_t Terminate(); - - int32_t InitPlayout(); - bool PlayoutIsInitialized() const { return initialized_; } - - int32_t StartPlayout(); - int32_t StopPlayout(); - bool Playing() const { return playing_; } - - int SpeakerVolumeIsAvailable(bool& available); - int SetSpeakerVolume(uint32_t volume); - int SpeakerVolume(uint32_t& volume) const; - int MaxSpeakerVolume(uint32_t& max_volume) const; - int MinSpeakerVolume(uint32_t& min_volume) const; - - void AttachAudioBuffer(AudioDeviceBuffer* audioBuffer); - - private: - // Called from Java side so we can cache the address of the Java-manged - // |byte_buffer| in |direct_buffer_address_|. The size of the buffer - // is also stored in |direct_buffer_capacity_in_bytes_|. - // Called on the same thread as the creating thread. - static void JNICALL CacheDirectBufferAddress( - JNIEnv* env, jobject obj, jobject byte_buffer, jlong nativeAudioTrack); - void OnCacheDirectBufferAddress(JNIEnv* env, jobject byte_buffer); - - // Called periodically by the Java based WebRtcAudioTrack object when - // playout has started. Each call indicates that |length| new bytes should - // be written to the memory area |direct_buffer_address_| for playout. - // This method is called on a high-priority thread from Java. The name of - // the thread is 'AudioTrackThread'. - static void JNICALL GetPlayoutData( - JNIEnv* env, jobject obj, jint length, jlong nativeAudioTrack); - void OnGetPlayoutData(size_t length); - - // Stores thread ID in constructor. - rtc::ThreadChecker thread_checker_; - - // Stores thread ID in first call to OnGetPlayoutData() from high-priority - // thread in Java. Detached during construction of this object. - rtc::ThreadChecker thread_checker_java_; - - // Calls AttachCurrentThread() if this thread is not attached at construction. - // Also ensures that DetachCurrentThread() is called at destruction. - AttachCurrentThreadIfNeeded attach_thread_if_needed_; - - // Wraps the JNI interface pointer and methods associated with it. - std::unique_ptr j_environment_; - - // Contains factory method for creating the Java object. - std::unique_ptr j_native_registration_; - - // Wraps the Java specific parts of the AudioTrackJni class. - std::unique_ptr j_audio_track_; - - // Contains audio parameters provided to this class at construction by the - // AudioManager. - const AudioParameters audio_parameters_; - - // Cached copy of address to direct audio buffer owned by |j_audio_track_|. - void* direct_buffer_address_; - - // Number of bytes in the direct audio buffer owned by |j_audio_track_|. - size_t direct_buffer_capacity_in_bytes_; - - // Number of audio frames per audio buffer. Each audio frame corresponds to - // one sample of PCM mono data at 16 bits per sample. Hence, each audio - // frame contains 2 bytes (given that the Java layer only supports mono). - // Example: 480 for 48000 Hz or 441 for 44100 Hz. - size_t frames_per_buffer_; - - bool initialized_; - - bool playing_; - - // Raw pointer handle provided to us in AttachAudioBuffer(). Owned by the - // AudioDeviceModuleImpl class and called by AudioDeviceModule::Create(). - // The AudioDeviceBuffer is a member of the AudioDeviceModuleImpl instance - // and therefore outlives this object. - AudioDeviceBuffer* audio_device_buffer_; -}; - -} // namespace webrtc - -#endif // WEBRTC_MODULES_AUDIO_DEVICE_ANDROID_AUDIO_TRACK_JNI_H_ diff --git a/WebRtc.NET/include/webrtc/modules/audio_device/android/build_info.h b/WebRtc.NET/include/webrtc/modules/audio_device/android/build_info.h deleted file mode 100644 index d9640dd7..00000000 --- a/WebRtc.NET/include/webrtc/modules/audio_device/android/build_info.h +++ /dev/null @@ -1,85 +0,0 @@ -/* - * Copyright (c) 2015 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MODULES_AUDIO_DEVICE_ANDROID_BUILD_INFO_H_ -#define WEBRTC_MODULES_AUDIO_DEVICE_ANDROID_BUILD_INFO_H_ - -#include -#include -#include - -#include "webrtc/modules/utility/include/jvm_android.h" - -namespace webrtc { - -// This enumeration maps to the values returned by BuildInfo::GetSdkVersion(), -// indicating the Android release associated with a given SDK version. -// See https://developer.android.com/guide/topics/manifest/uses-sdk-element.html -// for details. -enum SdkCode { - SDK_CODE_JELLY_BEAN = 16, // Android 4.1 - SDK_CODE_JELLY_BEAN_MR1 = 17, // Android 4.2 - SDK_CODE_JELLY_BEAN_MR2 = 18, // Android 4.3 - SDK_CODE_KITKAT = 19, // Android 4.4 - SDK_CODE_WATCH = 20, // Android 4.4W - SDK_CODE_LOLLIPOP = 21, // Android 5.0 - SDK_CODE_LOLLIPOP_MR1 = 22, // Android 5.1 - SDK_CODE_MARSHMALLOW = 23, // Android 6.0 - SDK_CODE_N = 24, -}; - -// Utility class used to query the Java class (org/webrtc/voiceengine/BuildInfo) -// for device and Android build information. -// The calling thread is attached to the JVM at construction if needed and a -// valid Java environment object is also created. -// All Get methods must be called on the creating thread. If not, the code will -// hit RTC_DCHECKs when calling JNIEnvironment::JavaToStdString(). -class BuildInfo { - public: - BuildInfo(); - ~BuildInfo() {} - - // End-user-visible name for the end product (e.g. "Nexus 6"). - std::string GetDeviceModel(); - // Consumer-visible brand (e.g. "google"). - std::string GetBrand(); - // Manufacturer of the product/hardware (e.g. "motorola"). - std::string GetDeviceManufacturer(); - // Android build ID (e.g. LMY47D). - std::string GetAndroidBuildId(); - // The type of build (e.g. "user" or "eng"). - std::string GetBuildType(); - // The user-visible version string (e.g. "5.1"). - std::string GetBuildRelease(); - // The user-visible SDK version of the framework (e.g. 21). See SdkCode enum - // for translation. - SdkCode GetSdkVersion(); - - private: - // Helper method which calls a static getter method with |name| and returns - // a string from Java. - std::string GetStringFromJava(const char* name); - - // Ensures that this class can access a valid JNI interface pointer even - // if the creating thread was not attached to the JVM. - AttachCurrentThreadIfNeeded attach_thread_if_needed_; - - // Provides access to the JNIEnv interface pointer and the JavaToStdString() - // method which is used to translate Java strings to std strings. - std::unique_ptr j_environment_; - - // Holds the jclass object and provides access to CallStaticObjectMethod(). - // Used by GetStringFromJava() during construction only. - JavaClass j_build_info_; -}; - -} // namespace webrtc - -#endif // WEBRTC_MODULES_AUDIO_DEVICE_ANDROID_BUILD_INFO_H_ diff --git a/WebRtc.NET/include/webrtc/modules/audio_device/android/opensles_common.h b/WebRtc.NET/include/webrtc/modules/audio_device/android/opensles_common.h deleted file mode 100644 index b0859c2b..00000000 --- a/WebRtc.NET/include/webrtc/modules/audio_device/android/opensles_common.h +++ /dev/null @@ -1,60 +0,0 @@ -/* - * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MODULES_AUDIO_DEVICE_ANDROID_OPENSLES_COMMON_H_ -#define WEBRTC_MODULES_AUDIO_DEVICE_ANDROID_OPENSLES_COMMON_H_ - -#include -#include - -namespace webrtc { - -// Returns a string representation given an integer SL_RESULT_XXX code. -// The mapping can be found in . -const char* GetSLErrorString(size_t code); - -// Configures an SL_DATAFORMAT_PCM structure based on native audio parameters. -SLDataFormat_PCM CreatePCMConfiguration(size_t channels, - int sample_rate, - size_t bits_per_sample); - -// Helper class for using SLObjectItf interfaces. -template -class ScopedSLObject { - public: - ScopedSLObject() : obj_(nullptr) {} - - ~ScopedSLObject() { Reset(); } - - SLType* Receive() { - RTC_DCHECK(!obj_); - return &obj_; - } - - SLDerefType operator->() { return *obj_; } - - SLType Get() const { return obj_; } - - void Reset() { - if (obj_) { - (*obj_)->Destroy(obj_); - obj_ = nullptr; - } - } - - private: - SLType obj_; -}; - -typedef ScopedSLObject ScopedSLObjectItf; - -} // namespace webrtc - -#endif // WEBRTC_MODULES_AUDIO_DEVICE_ANDROID_OPENSLES_COMMON_H_ diff --git a/WebRtc.NET/include/webrtc/modules/audio_device/android/opensles_player.h b/WebRtc.NET/include/webrtc/modules/audio_device/android/opensles_player.h deleted file mode 100644 index 62de50ea..00000000 --- a/WebRtc.NET/include/webrtc/modules/audio_device/android/opensles_player.h +++ /dev/null @@ -1,196 +0,0 @@ -/* - * Copyright (c) 2015 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MODULES_AUDIO_DEVICE_ANDROID_OPENSLES_PLAYER_H_ -#define WEBRTC_MODULES_AUDIO_DEVICE_ANDROID_OPENSLES_PLAYER_H_ - -#include -#include -#include - -#include "webrtc/base/thread_checker.h" -#include "webrtc/modules/audio_device/android/audio_common.h" -#include "webrtc/modules/audio_device/android/audio_manager.h" -#include "webrtc/modules/audio_device/android/opensles_common.h" -#include "webrtc/modules/audio_device/include/audio_device_defines.h" -#include "webrtc/modules/audio_device/audio_device_generic.h" -#include "webrtc/modules/utility/include/helpers_android.h" - -namespace webrtc { - -class FineAudioBuffer; - -// Implements 16-bit mono PCM audio output support for Android using the -// C based OpenSL ES API. No calls from C/C++ to Java using JNI is done. -// -// An instance must be created and destroyed on one and the same thread. -// All public methods must also be called on the same thread. A thread checker -// will RTC_DCHECK if any method is called on an invalid thread. Decoded audio -// buffers are requested on a dedicated internal thread managed by the OpenSL -// ES layer. -// -// The existing design forces the user to call InitPlayout() after Stoplayout() -// to be able to call StartPlayout() again. This is inline with how the Java- -// based implementation works. -// -// OpenSL ES is a native C API which have no Dalvik-related overhead such as -// garbage collection pauses and it supports reduced audio output latency. -// If the device doesn't claim this feature but supports API level 9 (Android -// platform version 2.3) or later, then we can still use the OpenSL ES APIs but -// the output latency may be higher. -class OpenSLESPlayer { - public: - // Beginning with API level 17 (Android 4.2), a buffer count of 2 or more is - // required for lower latency. Beginning with API level 18 (Android 4.3), a - // buffer count of 1 is sufficient for lower latency. In addition, the buffer - // size and sample rate must be compatible with the device's native output - // configuration provided via the audio manager at construction. - // TODO(henrika): perhaps set this value dynamically based on OS version. - static const int kNumOfOpenSLESBuffers = 2; - - explicit OpenSLESPlayer(AudioManager* audio_manager); - ~OpenSLESPlayer(); - - int Init(); - int Terminate(); - - int InitPlayout(); - bool PlayoutIsInitialized() const { return initialized_; } - - int StartPlayout(); - int StopPlayout(); - bool Playing() const { return playing_; } - - int SpeakerVolumeIsAvailable(bool& available); - int SetSpeakerVolume(uint32_t volume); - int SpeakerVolume(uint32_t& volume) const; - int MaxSpeakerVolume(uint32_t& maxVolume) const; - int MinSpeakerVolume(uint32_t& minVolume) const; - - void AttachAudioBuffer(AudioDeviceBuffer* audioBuffer); - - private: - // These callback methods are called when data is required for playout. - // They are both called from an internal "OpenSL ES thread" which is not - // attached to the Dalvik VM. - static void SimpleBufferQueueCallback(SLAndroidSimpleBufferQueueItf caller, - void* context); - void FillBufferQueue(); - // Reads audio data in PCM format using the AudioDeviceBuffer. - // Can be called both on the main thread (during Start()) and from the - // internal audio thread while output streaming is active. - // If the |silence| flag is set, the audio is filled with zeros instead of - // asking the WebRTC layer for real audio data. This procedure is also known - // as audio priming. - void EnqueuePlayoutData(bool silence); - - // Allocate memory for audio buffers which will be used to render audio - // via the SLAndroidSimpleBufferQueueItf interface. - void AllocateDataBuffers(); - - // Obtaines the SL Engine Interface from the existing global Engine object. - // The interface exposes creation methods of all the OpenSL ES object types. - // This method defines the |engine_| member variable. - bool ObtainEngineInterface(); - - // Creates/destroys the output mix object. - bool CreateMix(); - void DestroyMix(); - - // Creates/destroys the audio player and the simple-buffer object. - // Also creates the volume object. - bool CreateAudioPlayer(); - void DestroyAudioPlayer(); - - SLuint32 GetPlayState() const; - - // Ensures that methods are called from the same thread as this object is - // created on. - rtc::ThreadChecker thread_checker_; - - // Stores thread ID in first call to SimpleBufferQueueCallback() from internal - // non-application thread which is not attached to the Dalvik JVM. - // Detached during construction of this object. - rtc::ThreadChecker thread_checker_opensles_; - - // Raw pointer to the audio manager injected at construction. Used to cache - // audio parameters and to access the global SL engine object needed by the - // ObtainEngineInterface() method. The audio manager outlives any instance of - // this class. - AudioManager* audio_manager_; - - // Contains audio parameters provided to this class at construction by the - // AudioManager. - const AudioParameters audio_parameters_; - - // Raw pointer handle provided to us in AttachAudioBuffer(). Owned by the - // AudioDeviceModuleImpl class and called by AudioDeviceModule::Create(). - AudioDeviceBuffer* audio_device_buffer_; - - bool initialized_; - bool playing_; - - // PCM-type format definition. - // TODO(henrika): add support for SLAndroidDataFormat_PCM_EX (android-21) if - // 32-bit float representation is needed. - SLDataFormat_PCM pcm_format_; - - // Queue of audio buffers to be used by the player object for rendering - // audio. They will be used in a Round-robin way and the size of each buffer - // is given by FineAudioBuffer::RequiredBufferSizeBytes(). - std::unique_ptr audio_buffers_[kNumOfOpenSLESBuffers]; - - // FineAudioBuffer takes an AudioDeviceBuffer which delivers audio data - // in chunks of 10ms. It then allows for this data to be pulled in - // a finer or coarser granularity. I.e. interacting with this class instead - // of directly with the AudioDeviceBuffer one can ask for any number of - // audio data samples. - // Example: native buffer size can be 192 audio frames at 48kHz sample rate. - // WebRTC will provide 480 audio frames per 10ms but OpenSL ES asks for 192 - // in each callback (one every 4th ms). This class can then ask for 192 and - // the FineAudioBuffer will ask WebRTC for new data approximately only every - // second callback and also cache non-utilized audio. - std::unique_ptr fine_audio_buffer_; - - // Keeps track of active audio buffer 'n' in the audio_buffers_[n] queue. - // Example (kNumOfOpenSLESBuffers = 2): counts 0, 1, 0, 1, ... - int buffer_index_; - - // This interface exposes creation methods for all the OpenSL ES object types. - // It is the OpenSL ES API entry point. - SLEngineItf engine_; - - // Output mix object to be used by the player object. - webrtc::ScopedSLObjectItf output_mix_; - - // The audio player media object plays out audio to the speakers. It also - // supports volume control. - webrtc::ScopedSLObjectItf player_object_; - - // This interface is supported on the audio player and it controls the state - // of the audio player. - SLPlayItf player_; - - // The Android Simple Buffer Queue interface is supported on the audio player - // and it provides methods to send audio data from the source to the audio - // player for rendering. - SLAndroidSimpleBufferQueueItf simple_buffer_queue_; - - // This interface exposes controls for manipulating the object’s audio volume - // properties. This interface is supported on the Audio Player object. - SLVolumeItf volume_; - - // Last time the OpenSL ES layer asked for audio data to play out. - uint32_t last_play_time_; -}; - -} // namespace webrtc - -#endif // WEBRTC_MODULES_AUDIO_DEVICE_ANDROID_OPENSLES_PLAYER_H_ diff --git a/WebRtc.NET/include/webrtc/modules/audio_device/android/opensles_recorder.h b/WebRtc.NET/include/webrtc/modules/audio_device/android/opensles_recorder.h deleted file mode 100644 index 952371a4..00000000 --- a/WebRtc.NET/include/webrtc/modules/audio_device/android/opensles_recorder.h +++ /dev/null @@ -1,193 +0,0 @@ -/* - * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MODULES_AUDIO_DEVICE_ANDROID_OPENSLES_RECORDER_H_ -#define WEBRTC_MODULES_AUDIO_DEVICE_ANDROID_OPENSLES_RECORDER_H_ - -#include -#include -#include - -#include - -#include "webrtc/base/thread_checker.h" -#include "webrtc/modules/audio_device/android/audio_common.h" -#include "webrtc/modules/audio_device/android/audio_manager.h" -#include "webrtc/modules/audio_device/android/opensles_common.h" -#include "webrtc/modules/audio_device/include/audio_device_defines.h" -#include "webrtc/modules/audio_device/audio_device_generic.h" -#include "webrtc/modules/utility/include/helpers_android.h" - -namespace webrtc { - -class FineAudioBuffer; - -// Implements 16-bit mono PCM audio input support for Android using the -// C based OpenSL ES API. No calls from C/C++ to Java using JNI is done. -// -// An instance must be created and destroyed on one and the same thread. -// All public methods must also be called on the same thread. A thread checker -// will RTC_DCHECK if any method is called on an invalid thread. Recorded audio -// buffers are provided on a dedicated internal thread managed by the OpenSL -// ES layer. -// -// The existing design forces the user to call InitRecording() after -// StopRecording() to be able to call StartRecording() again. This is inline -// with how the Java-based implementation works. -// -// As of API level 21, lower latency audio input is supported on select devices. -// To take advantage of this feature, first confirm that lower latency output is -// available. The capability for lower latency output is a prerequisite for the -// lower latency input feature. Then, create an AudioRecorder with the same -// sample rate and buffer size as would be used for output. OpenSL ES interfaces -// for input effects preclude the lower latency path. -// See https://developer.android.com/ndk/guides/audio/opensl-prog-notes.html -// for more details. -class OpenSLESRecorder { - public: - // Beginning with API level 17 (Android 4.2), a buffer count of 2 or more is - // required for lower latency. Beginning with API level 18 (Android 4.3), a - // buffer count of 1 is sufficient for lower latency. In addition, the buffer - // size and sample rate must be compatible with the device's native input - // configuration provided via the audio manager at construction. - // TODO(henrika): perhaps set this value dynamically based on OS version. - static const int kNumOfOpenSLESBuffers = 2; - - explicit OpenSLESRecorder(AudioManager* audio_manager); - ~OpenSLESRecorder(); - - int Init(); - int Terminate(); - - int InitRecording(); - bool RecordingIsInitialized() const { return initialized_; } - - int StartRecording(); - int StopRecording(); - bool Recording() const { return recording_; } - - void AttachAudioBuffer(AudioDeviceBuffer* audio_buffer); - - // TODO(henrika): add support using OpenSL ES APIs when available. - int EnableBuiltInAEC(bool enable); - int EnableBuiltInAGC(bool enable); - int EnableBuiltInNS(bool enable); - - private: - // Obtaines the SL Engine Interface from the existing global Engine object. - // The interface exposes creation methods of all the OpenSL ES object types. - // This method defines the |engine_| member variable. - bool ObtainEngineInterface(); - - // Creates/destroys the audio recorder and the simple-buffer queue object. - bool CreateAudioRecorder(); - void DestroyAudioRecorder(); - - // Allocate memory for audio buffers which will be used to capture audio - // via the SLAndroidSimpleBufferQueueItf interface. - void AllocateDataBuffers(); - - // These callback methods are called when data has been written to the input - // buffer queue. They are both called from an internal "OpenSL ES thread" - // which is not attached to the Dalvik VM. - static void SimpleBufferQueueCallback(SLAndroidSimpleBufferQueueItf caller, - void* context); - void ReadBufferQueue(); - - // Wraps calls to SLAndroidSimpleBufferQueueState::Enqueue() and it can be - // called both on the main thread (but before recording has started) and from - // the internal audio thread while input streaming is active. It uses - // |simple_buffer_queue_| but no lock is needed since the initial calls from - // the main thread and the native callback thread are mutually exclusive. - bool EnqueueAudioBuffer(); - - // Returns the current recorder state. - SLuint32 GetRecordState() const; - - // Returns the current buffer queue state. - SLAndroidSimpleBufferQueueState GetBufferQueueState() const; - - // Number of buffers currently in the queue. - SLuint32 GetBufferCount(); - - // Prints a log message of the current queue state. Can be used for debugging - // purposes. - void LogBufferState() const; - - // Ensures that methods are called from the same thread as this object is - // created on. - rtc::ThreadChecker thread_checker_; - - // Stores thread ID in first call to SimpleBufferQueueCallback() from internal - // non-application thread which is not attached to the Dalvik JVM. - // Detached during construction of this object. - rtc::ThreadChecker thread_checker_opensles_; - - // Raw pointer to the audio manager injected at construction. Used to cache - // audio parameters and to access the global SL engine object needed by the - // ObtainEngineInterface() method. The audio manager outlives any instance of - // this class. - AudioManager* const audio_manager_; - - // Contains audio parameters provided to this class at construction by the - // AudioManager. - const AudioParameters audio_parameters_; - - // Raw pointer handle provided to us in AttachAudioBuffer(). Owned by the - // AudioDeviceModuleImpl class and called by AudioDeviceModule::Create(). - AudioDeviceBuffer* audio_device_buffer_; - - // PCM-type format definition. - // TODO(henrika): add support for SLAndroidDataFormat_PCM_EX (android-21) if - // 32-bit float representation is needed. - SLDataFormat_PCM pcm_format_; - - bool initialized_; - bool recording_; - - // This interface exposes creation methods for all the OpenSL ES object types. - // It is the OpenSL ES API entry point. - SLEngineItf engine_; - - // The audio recorder media object records audio to the destination specified - // by the data sink capturing it from the input specified by the data source. - webrtc::ScopedSLObjectItf recorder_object_; - - // This interface is supported on the audio recorder object and it controls - // the state of the audio recorder. - SLRecordItf recorder_; - - // The Android Simple Buffer Queue interface is supported on the audio - // recorder. For recording, an app should enqueue empty buffers. When a - // registered callback sends notification that the system has finished writing - // data to the buffer, the app can read the buffer. - SLAndroidSimpleBufferQueueItf simple_buffer_queue_; - - // Consumes audio of native buffer size and feeds the WebRTC layer with 10ms - // chunks of audio. - std::unique_ptr fine_audio_buffer_; - - // Queue of audio buffers to be used by the recorder object for capturing - // audio. They will be used in a Round-robin way and the size of each buffer - // is given by AudioParameters::GetBytesPerBuffer(), i.e., it corresponds to - // the native OpenSL ES buffer size. - std::unique_ptr[]> audio_buffers_; - - // Keeps track of active audio buffer 'n' in the audio_buffers_[n] queue. - // Example (kNumOfOpenSLESBuffers = 2): counts 0, 1, 0, 1, ... - int buffer_index_; - - // Last time the OpenSL ES layer delivered recorded audio data. - uint32_t last_rec_time_; -}; - -} // namespace webrtc - -#endif // WEBRTC_MODULES_AUDIO_DEVICE_ANDROID_OPENSLES_RECORDER_H_ diff --git a/WebRtc.NET/include/webrtc/modules/audio_device/audio_device_buffer.h b/WebRtc.NET/include/webrtc/modules/audio_device/audio_device_buffer.h deleted file mode 100644 index e2c6f287..00000000 --- a/WebRtc.NET/include/webrtc/modules/audio_device/audio_device_buffer.h +++ /dev/null @@ -1,247 +0,0 @@ -/* - * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MODULES_AUDIO_DEVICE_AUDIO_DEVICE_BUFFER_H_ -#define WEBRTC_MODULES_AUDIO_DEVICE_AUDIO_DEVICE_BUFFER_H_ - -#include "webrtc/base/buffer.h" -#include "webrtc/base/task_queue.h" -#include "webrtc/base/thread_annotations.h" -#include "webrtc/base/thread_checker.h" -#include "webrtc/modules/audio_device/include/audio_device.h" -#include "webrtc/system_wrappers/include/file_wrapper.h" -#include "webrtc/typedefs.h" - -namespace webrtc { -// Delta times between two successive playout callbacks are limited to this -// value before added to an internal array. -const size_t kMaxDeltaTimeInMs = 500; -// TODO(henrika): remove when no longer used by external client. -const size_t kMaxBufferSizeBytes = 3840; // 10ms in stereo @ 96kHz - -class AudioDeviceObserver; - -class AudioDeviceBuffer { - public: - enum LogState { - LOG_START = 0, - LOG_STOP, - LOG_ACTIVE, - }; - - AudioDeviceBuffer(); - virtual ~AudioDeviceBuffer(); - - void SetId(uint32_t id) {}; - int32_t RegisterAudioCallback(AudioTransport* audio_callback); - - void StartPlayout(); - void StartRecording(); - void StopPlayout(); - void StopRecording(); - - int32_t SetRecordingSampleRate(uint32_t fsHz); - int32_t SetPlayoutSampleRate(uint32_t fsHz); - int32_t RecordingSampleRate() const; - int32_t PlayoutSampleRate() const; - - int32_t SetRecordingChannels(size_t channels); - int32_t SetPlayoutChannels(size_t channels); - size_t RecordingChannels() const; - size_t PlayoutChannels() const; - int32_t SetRecordingChannel(const AudioDeviceModule::ChannelType channel); - int32_t RecordingChannel(AudioDeviceModule::ChannelType& channel) const; - - virtual int32_t SetRecordedBuffer(const void* audio_buffer, - size_t samples_per_channel); - int32_t SetCurrentMicLevel(uint32_t level); - virtual void SetVQEData(int play_delay_ms, int rec_delay_ms, int clock_drift); - virtual int32_t DeliverRecordedData(); - uint32_t NewMicLevel() const; - - virtual int32_t RequestPlayoutData(size_t samples_per_channel); - virtual int32_t GetPlayoutData(void* audio_buffer); - - // TODO(henrika): these methods should not be used and does not contain any - // valid implementation. Investigate the possibility to either remove them - // or add a proper implementation if needed. - int32_t StartInputFileRecording(const char fileName[kAdmMaxFileNameSize]); - int32_t StopInputFileRecording(); - int32_t StartOutputFileRecording(const char fileName[kAdmMaxFileNameSize]); - int32_t StopOutputFileRecording(); - - int32_t SetTypingStatus(bool typing_status); - - private: - // Starts/stops periodic logging of audio stats. - void StartPeriodicLogging(); - void StopPeriodicLogging(); - - // Called periodically on the internal thread created by the TaskQueue. - // Updates some stats but dooes it on the task queue to ensure that access of - // members is serialized hence avoiding usage of locks. - // state = LOG_START => members are initialized and the timer starts. - // state = LOG_STOP => no logs are printed and the timer stops. - // state = LOG_ACTIVE => logs are printed and the timer is kept alive. - void LogStats(LogState state); - - // Updates counters in each play/record callback but does it on the task - // queue to ensure that they can be read by LogStats() without any locks since - // each task is serialized by the task queue. - void UpdateRecStats(int16_t max_abs, size_t samples_per_channel); - void UpdatePlayStats(int16_t max_abs, size_t samples_per_channel); - - // Clears all members tracking stats for recording and playout. - // These methods both run on the task queue. - void ResetRecStats(); - void ResetPlayStats(); - - // This object lives on the main (creating) thread and most methods are - // called on that same thread. When audio has started some methods will be - // called on either a native audio thread for playout or a native thread for - // recording. Some members are not annotated since they are "protected by - // design" and adding e.g. a race checker can cause failuries for very few - // edge cases and it is IMHO not worth the risk to use them in this class. - // TODO(henrika): see if it is possible to refactor and annotate all members. - - // Main thread on which this object is created. - rtc::ThreadChecker main_thread_checker_; - - // Native (platform specific) audio thread driving the playout side. - rtc::ThreadChecker playout_thread_checker_; - - // Native (platform specific) audio thread driving the recording side. - rtc::ThreadChecker recording_thread_checker_; - - // Task queue used to invoke LogStats() periodically. Tasks are executed on a - // worker thread but it does not necessarily have to be the same thread for - // each task. - rtc::TaskQueue task_queue_; - - // Raw pointer to AudioTransport instance. Supplied to RegisterAudioCallback() - // and it must outlive this object. It is not possible to change this member - // while any media is active. It is possible to start media without calling - // RegisterAudioCallback() but that will lead to ignored audio callbacks in - // both directions where native audio will be acive but no audio samples will - // be transported. - AudioTransport* audio_transport_cb_; - - // The members below that are not annotated are protected by design. They are - // all set on the main thread (verified by |main_thread_checker_|) and then - // read on either the playout or recording audio thread. But, media will never - // be active when the member is set; hence no conflict exists. It is too - // complex to ensure and verify that this is actually the case. - - // Sample rate in Hertz. - uint32_t rec_sample_rate_; - uint32_t play_sample_rate_; - - // Number of audio channels. - size_t rec_channels_; - size_t play_channels_; - - // Keeps track of if playout/recording are active or not. A combination - // of these states are used to determine when to start and stop the timer. - // Only used on the creating thread and not used to control any media flow. - bool playing_ ACCESS_ON(main_thread_checker_); - bool recording_ ACCESS_ON(main_thread_checker_); - - // Buffer used for audio samples to be played out. Size can be changed - // dynamically. The 16-bit samples are interleaved, hence the size is - // proportional to the number of channels. - rtc::BufferT play_buffer_ ACCESS_ON(playout_thread_checker_); - - // Byte buffer used for recorded audio samples. Size can be changed - // dynamically. - rtc::BufferT rec_buffer_ ACCESS_ON(recording_thread_checker_); - - // AGC parameters. -#if !defined(WEBRTC_WIN) - uint32_t current_mic_level_ ACCESS_ON(recording_thread_checker_); -#else - // Windows uses a dedicated thread for volume APIs. - uint32_t current_mic_level_; -#endif - uint32_t new_mic_level_ ACCESS_ON(recording_thread_checker_); - - // Contains true of a key-press has been detected. - bool typing_status_ ACCESS_ON(recording_thread_checker_); - - // Delay values used by the AEC. - int play_delay_ms_ ACCESS_ON(recording_thread_checker_); - int rec_delay_ms_ ACCESS_ON(recording_thread_checker_); - - // Contains a clock-drift measurement. - int clock_drift_ ACCESS_ON(recording_thread_checker_); - - // Counts number of times LogStats() has been called. - size_t num_stat_reports_ ACCESS_ON(task_queue_); - - // Total number of recording callbacks where the source provides 10ms audio - // data each time. - uint64_t rec_callbacks_ ACCESS_ON(task_queue_); - - // Total number of recording callbacks stored at the last timer task. - uint64_t last_rec_callbacks_ ACCESS_ON(task_queue_); - - // Total number of playback callbacks where the sink asks for 10ms audio - // data each time. - uint64_t play_callbacks_ ACCESS_ON(task_queue_); - - // Total number of playout callbacks stored at the last timer task. - uint64_t last_play_callbacks_ ACCESS_ON(task_queue_); - - // Total number of recorded audio samples. - uint64_t rec_samples_ ACCESS_ON(task_queue_); - - // Total number of recorded samples stored at the previous timer task. - uint64_t last_rec_samples_ ACCESS_ON(task_queue_); - - // Total number of played audio samples. - uint64_t play_samples_ ACCESS_ON(task_queue_); - - // Total number of played samples stored at the previous timer task. - uint64_t last_play_samples_ ACCESS_ON(task_queue_); - - // Contains max level (max(abs(x))) of recorded audio packets over the last - // 10 seconds where a new measurement is done twice per second. The level - // is reset to zero at each call to LogStats(). - int16_t max_rec_level_ ACCESS_ON(task_queue_); - - // Contains max level of recorded audio packets over the last 10 seconds - // where a new measurement is done twice per second. - int16_t max_play_level_ ACCESS_ON(task_queue_); - - // Time stamp of last timer task (drives logging). - int64_t last_timer_task_time_ ACCESS_ON(task_queue_); - - // Counts number of audio callbacks modulo 50 to create a signal when - // a new storage of audio stats shall be done. - int16_t rec_stat_count_ ACCESS_ON(recording_thread_checker_); - int16_t play_stat_count_ ACCESS_ON(playout_thread_checker_); - - // Time stamps of when playout and recording starts. - int64_t play_start_time_ ACCESS_ON(main_thread_checker_); - int64_t rec_start_time_ ACCESS_ON(main_thread_checker_); - - // Set to true at construction and modified to false as soon as one audio- - // level estimate larger than zero is detected. - bool only_silence_recorded_; - - // Set to true when logging of audio stats is enabled for the first time in - // StartPeriodicLogging() and set to false by StopPeriodicLogging(). - // Setting this member to false prevents (possiby invalid) log messages from - // being printed in the LogStats() task. - bool log_stats_ ACCESS_ON(task_queue_); -}; - -} // namespace webrtc - -#endif // WEBRTC_MODULES_AUDIO_DEVICE_AUDIO_DEVICE_BUFFER_H_ diff --git a/WebRtc.NET/include/webrtc/modules/audio_device/audio_device_generic.h b/WebRtc.NET/include/webrtc/modules/audio_device/audio_device_generic.h deleted file mode 100644 index 4807c63a..00000000 --- a/WebRtc.NET/include/webrtc/modules/audio_device/audio_device_generic.h +++ /dev/null @@ -1,190 +0,0 @@ -/* - * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_AUDIO_DEVICE_AUDIO_DEVICE_GENERIC_H -#define WEBRTC_AUDIO_DEVICE_AUDIO_DEVICE_GENERIC_H - -#include "webrtc/modules/audio_device/audio_device_buffer.h" -#include "webrtc/modules/audio_device/include/audio_device.h" - -namespace webrtc { - -class AudioDeviceGeneric { - public: - // For use with UMA logging. Must be kept in sync with histograms.xml in - // Chrome, located at - // https://cs.chromium.org/chromium/src/tools/metrics/histograms/histograms.xml - enum class InitStatus { - OK = 0, - PLAYOUT_ERROR = 1, - RECORDING_ERROR = 2, - OTHER_ERROR = 3, - NUM_STATUSES = 4 - }; - // Retrieve the currently utilized audio layer - virtual int32_t ActiveAudioLayer( - AudioDeviceModule::AudioLayer& audioLayer) const = 0; - - // Main initializaton and termination - virtual InitStatus Init() = 0; - virtual int32_t Terminate() = 0; - virtual bool Initialized() const = 0; - - // Device enumeration - virtual int16_t PlayoutDevices() = 0; - virtual int16_t RecordingDevices() = 0; - virtual int32_t PlayoutDeviceName(uint16_t index, - char name[kAdmMaxDeviceNameSize], - char guid[kAdmMaxGuidSize]) = 0; - virtual int32_t RecordingDeviceName(uint16_t index, - char name[kAdmMaxDeviceNameSize], - char guid[kAdmMaxGuidSize]) = 0; - - // Device selection - virtual int32_t SetPlayoutDevice(uint16_t index) = 0; - virtual int32_t SetPlayoutDevice( - AudioDeviceModule::WindowsDeviceType device) = 0; - virtual int32_t SetRecordingDevice(uint16_t index) = 0; - virtual int32_t SetRecordingDevice( - AudioDeviceModule::WindowsDeviceType device) = 0; - - // Audio transport initialization - virtual int32_t PlayoutIsAvailable(bool& available) = 0; - virtual int32_t InitPlayout() = 0; - virtual bool PlayoutIsInitialized() const = 0; - virtual int32_t RecordingIsAvailable(bool& available) = 0; - virtual int32_t InitRecording() = 0; - virtual bool RecordingIsInitialized() const = 0; - - // Audio transport control - virtual int32_t StartPlayout() = 0; - virtual int32_t StopPlayout() = 0; - virtual bool Playing() const = 0; - virtual int32_t StartRecording() = 0; - virtual int32_t StopRecording() = 0; - virtual bool Recording() const = 0; - - // Microphone Automatic Gain Control (AGC) - virtual int32_t SetAGC(bool enable) = 0; - virtual bool AGC() const = 0; - - // Volume control based on the Windows Wave API (Windows only) - virtual int32_t SetWaveOutVolume(uint16_t volumeLeft, - uint16_t volumeRight) = 0; - virtual int32_t WaveOutVolume(uint16_t& volumeLeft, - uint16_t& volumeRight) const = 0; - - // Audio mixer initialization - virtual int32_t InitSpeaker() = 0; - virtual bool SpeakerIsInitialized() const = 0; - virtual int32_t InitMicrophone() = 0; - virtual bool MicrophoneIsInitialized() const = 0; - - // Speaker volume controls - virtual int32_t SpeakerVolumeIsAvailable(bool& available) = 0; - virtual int32_t SetSpeakerVolume(uint32_t volume) = 0; - virtual int32_t SpeakerVolume(uint32_t& volume) const = 0; - virtual int32_t MaxSpeakerVolume(uint32_t& maxVolume) const = 0; - virtual int32_t MinSpeakerVolume(uint32_t& minVolume) const = 0; - virtual int32_t SpeakerVolumeStepSize(uint16_t& stepSize) const = 0; - - // Microphone volume controls - virtual int32_t MicrophoneVolumeIsAvailable(bool& available) = 0; - virtual int32_t SetMicrophoneVolume(uint32_t volume) = 0; - virtual int32_t MicrophoneVolume(uint32_t& volume) const = 0; - virtual int32_t MaxMicrophoneVolume(uint32_t& maxVolume) const = 0; - virtual int32_t MinMicrophoneVolume(uint32_t& minVolume) const = 0; - virtual int32_t MicrophoneVolumeStepSize(uint16_t& stepSize) const = 0; - - // Speaker mute control - virtual int32_t SpeakerMuteIsAvailable(bool& available) = 0; - virtual int32_t SetSpeakerMute(bool enable) = 0; - virtual int32_t SpeakerMute(bool& enabled) const = 0; - - // Microphone mute control - virtual int32_t MicrophoneMuteIsAvailable(bool& available) = 0; - virtual int32_t SetMicrophoneMute(bool enable) = 0; - virtual int32_t MicrophoneMute(bool& enabled) const = 0; - - // Microphone boost control - virtual int32_t MicrophoneBoostIsAvailable(bool& available) = 0; - virtual int32_t SetMicrophoneBoost(bool enable) = 0; - virtual int32_t MicrophoneBoost(bool& enabled) const = 0; - - // Stereo support - virtual int32_t StereoPlayoutIsAvailable(bool& available) = 0; - virtual int32_t SetStereoPlayout(bool enable) = 0; - virtual int32_t StereoPlayout(bool& enabled) const = 0; - virtual int32_t StereoRecordingIsAvailable(bool& available) = 0; - virtual int32_t SetStereoRecording(bool enable) = 0; - virtual int32_t StereoRecording(bool& enabled) const = 0; - - // Delay information and control - virtual int32_t SetPlayoutBuffer(const AudioDeviceModule::BufferType type, - uint16_t sizeMS = 0) = 0; - virtual int32_t PlayoutBuffer(AudioDeviceModule::BufferType& type, - uint16_t& sizeMS) const = 0; - virtual int32_t PlayoutDelay(uint16_t& delayMS) const = 0; - virtual int32_t RecordingDelay(uint16_t& delayMS) const = 0; - - // CPU load - virtual int32_t CPULoad(uint16_t& load) const = 0; - - // Native sample rate controls (samples/sec) - virtual int32_t SetRecordingSampleRate(const uint32_t samplesPerSec); - virtual int32_t SetPlayoutSampleRate(const uint32_t samplesPerSec); - - // Speaker audio routing (for mobile devices) - virtual int32_t SetLoudspeakerStatus(bool enable); - virtual int32_t GetLoudspeakerStatus(bool& enable) const; - - // Reset Audio Device (for mobile devices) - virtual int32_t ResetAudioDevice(); - - // Sound Audio Device control (for WinCE only) - virtual int32_t SoundDeviceControl(unsigned int par1 = 0, - unsigned int par2 = 0, - unsigned int par3 = 0, - unsigned int par4 = 0); - - // Android only - virtual bool BuiltInAECIsAvailable() const; - virtual bool BuiltInAGCIsAvailable() const; - virtual bool BuiltInNSIsAvailable() const; - - // Windows Core Audio and Android only. - virtual int32_t EnableBuiltInAEC(bool enable); - virtual int32_t EnableBuiltInAGC(bool enable); - virtual int32_t EnableBuiltInNS(bool enable); - - // iOS only. - // TODO(henrika): add Android support. -#if defined(WEBRTC_IOS) - virtual int GetPlayoutAudioParameters(AudioParameters* params) const; - virtual int GetRecordAudioParameters(AudioParameters* params) const; -#endif // WEBRTC_IOS - - virtual bool PlayoutWarning() const = 0; - virtual bool PlayoutError() const = 0; - virtual bool RecordingWarning() const = 0; - virtual bool RecordingError() const = 0; - virtual void ClearPlayoutWarning() = 0; - virtual void ClearPlayoutError() = 0; - virtual void ClearRecordingWarning() = 0; - virtual void ClearRecordingError() = 0; - - virtual void AttachAudioBuffer(AudioDeviceBuffer* audioBuffer) = 0; - - virtual ~AudioDeviceGeneric() {} -}; - -} // namespace webrtc - -#endif // WEBRTC_AUDIO_DEVICE_AUDIO_DEVICE_GENERIC_H diff --git a/WebRtc.NET/include/webrtc/modules/audio_device/audio_device_impl.h b/WebRtc.NET/include/webrtc/modules/audio_device/audio_device_impl.h deleted file mode 100644 index 034690f6..00000000 --- a/WebRtc.NET/include/webrtc/modules/audio_device/audio_device_impl.h +++ /dev/null @@ -1,230 +0,0 @@ -/* - * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_AUDIO_DEVICE_AUDIO_DEVICE_IMPL_H -#define WEBRTC_AUDIO_DEVICE_AUDIO_DEVICE_IMPL_H - -#if defined(WEBRTC_INCLUDE_INTERNAL_AUDIO_DEVICE) - -#include - -#include "webrtc/base/checks.h" -#include "webrtc/modules/audio_device/audio_device_buffer.h" -#include "webrtc/modules/audio_device/include/audio_device.h" - -namespace webrtc { - -class AudioDeviceGeneric; -class AudioManager; -class CriticalSectionWrapper; - -class AudioDeviceModuleImpl : public AudioDeviceModule { - public: - enum PlatformType { - kPlatformNotSupported = 0, - kPlatformWin32 = 1, - kPlatformWinCe = 2, - kPlatformLinux = 3, - kPlatformMac = 4, - kPlatformAndroid = 5, - kPlatformIOS = 6 - }; - - int32_t CheckPlatform(); - int32_t CreatePlatformSpecificObjects(); - int32_t AttachAudioBuffer(); - - AudioDeviceModuleImpl(const int32_t id, const AudioLayer audioLayer); - ~AudioDeviceModuleImpl() override; - - int64_t TimeUntilNextProcess() override; - void Process() override; - - // Retrieve the currently utilized audio layer - int32_t ActiveAudioLayer(AudioLayer* audioLayer) const override; - - // Error handling - ErrorCode LastError() const override; - int32_t RegisterEventObserver(AudioDeviceObserver* eventCallback) override; - - // Full-duplex transportation of PCM audio - int32_t RegisterAudioCallback(AudioTransport* audioCallback) override; - - // Main initializaton and termination - int32_t Init() override; - int32_t Terminate() override; - bool Initialized() const override; - - // Device enumeration - int16_t PlayoutDevices() override; - int16_t RecordingDevices() override; - int32_t PlayoutDeviceName(uint16_t index, - char name[kAdmMaxDeviceNameSize], - char guid[kAdmMaxGuidSize]) override; - int32_t RecordingDeviceName(uint16_t index, - char name[kAdmMaxDeviceNameSize], - char guid[kAdmMaxGuidSize]) override; - - // Device selection - int32_t SetPlayoutDevice(uint16_t index) override; - int32_t SetPlayoutDevice(WindowsDeviceType device) override; - int32_t SetRecordingDevice(uint16_t index) override; - int32_t SetRecordingDevice(WindowsDeviceType device) override; - - // Audio transport initialization - int32_t PlayoutIsAvailable(bool* available) override; - int32_t InitPlayout() override; - bool PlayoutIsInitialized() const override; - int32_t RecordingIsAvailable(bool* available) override; - int32_t InitRecording() override; - bool RecordingIsInitialized() const override; - - // Audio transport control - int32_t StartPlayout() override; - int32_t StopPlayout() override; - bool Playing() const override; - int32_t StartRecording() override; - int32_t StopRecording() override; - bool Recording() const override; - - // Microphone Automatic Gain Control (AGC) - int32_t SetAGC(bool enable) override; - bool AGC() const override; - - // Volume control based on the Windows Wave API (Windows only) - int32_t SetWaveOutVolume(uint16_t volumeLeft, uint16_t volumeRight) override; - int32_t WaveOutVolume(uint16_t* volumeLeft, - uint16_t* volumeRight) const override; - - // Audio mixer initialization - int32_t InitSpeaker() override; - bool SpeakerIsInitialized() const override; - int32_t InitMicrophone() override; - bool MicrophoneIsInitialized() const override; - - // Speaker volume controls - int32_t SpeakerVolumeIsAvailable(bool* available) override; - int32_t SetSpeakerVolume(uint32_t volume) override; - int32_t SpeakerVolume(uint32_t* volume) const override; - int32_t MaxSpeakerVolume(uint32_t* maxVolume) const override; - int32_t MinSpeakerVolume(uint32_t* minVolume) const override; - int32_t SpeakerVolumeStepSize(uint16_t* stepSize) const override; - - // Microphone volume controls - int32_t MicrophoneVolumeIsAvailable(bool* available) override; - int32_t SetMicrophoneVolume(uint32_t volume) override; - int32_t MicrophoneVolume(uint32_t* volume) const override; - int32_t MaxMicrophoneVolume(uint32_t* maxVolume) const override; - int32_t MinMicrophoneVolume(uint32_t* minVolume) const override; - int32_t MicrophoneVolumeStepSize(uint16_t* stepSize) const override; - - // Speaker mute control - int32_t SpeakerMuteIsAvailable(bool* available) override; - int32_t SetSpeakerMute(bool enable) override; - int32_t SpeakerMute(bool* enabled) const override; - - // Microphone mute control - int32_t MicrophoneMuteIsAvailable(bool* available) override; - int32_t SetMicrophoneMute(bool enable) override; - int32_t MicrophoneMute(bool* enabled) const override; - - // Microphone boost control - int32_t MicrophoneBoostIsAvailable(bool* available) override; - int32_t SetMicrophoneBoost(bool enable) override; - int32_t MicrophoneBoost(bool* enabled) const override; - - // Stereo support - int32_t StereoPlayoutIsAvailable(bool* available) const override; - int32_t SetStereoPlayout(bool enable) override; - int32_t StereoPlayout(bool* enabled) const override; - int32_t StereoRecordingIsAvailable(bool* available) const override; - int32_t SetStereoRecording(bool enable) override; - int32_t StereoRecording(bool* enabled) const override; - int32_t SetRecordingChannel(const ChannelType channel) override; - int32_t RecordingChannel(ChannelType* channel) const override; - - // Delay information and control - int32_t SetPlayoutBuffer(const BufferType type, uint16_t sizeMS = 0) override; - int32_t PlayoutBuffer(BufferType* type, uint16_t* sizeMS) const override; - int32_t PlayoutDelay(uint16_t* delayMS) const override; - int32_t RecordingDelay(uint16_t* delayMS) const override; - - // CPU load - int32_t CPULoad(uint16_t* load) const override; - - // Recording of raw PCM data - int32_t StartRawOutputFileRecording( - const char pcmFileNameUTF8[kAdmMaxFileNameSize]) override; - int32_t StopRawOutputFileRecording() override; - int32_t StartRawInputFileRecording( - const char pcmFileNameUTF8[kAdmMaxFileNameSize]) override; - int32_t StopRawInputFileRecording() override; - - // Native sample rate controls (samples/sec) - int32_t SetRecordingSampleRate(const uint32_t samplesPerSec) override; - int32_t RecordingSampleRate(uint32_t* samplesPerSec) const override; - int32_t SetPlayoutSampleRate(const uint32_t samplesPerSec) override; - int32_t PlayoutSampleRate(uint32_t* samplesPerSec) const override; - - // Mobile device specific functions - int32_t ResetAudioDevice() override; - int32_t SetLoudspeakerStatus(bool enable) override; - int32_t GetLoudspeakerStatus(bool* enabled) const override; - - bool BuiltInAECIsAvailable() const override; - int32_t EnableBuiltInAEC(bool enable) override; - bool BuiltInAGCIsAvailable() const override; - int32_t EnableBuiltInAGC(bool enable) override; - bool BuiltInNSIsAvailable() const override; - int32_t EnableBuiltInNS(bool enable) override; - -#if defined(WEBRTC_IOS) - int GetPlayoutAudioParameters(AudioParameters* params) const override; - int GetRecordAudioParameters(AudioParameters* params) const override; -#endif // WEBRTC_IOS - - int32_t Id() { return _id; } -#if defined(WEBRTC_ANDROID) - // Only use this acccessor for test purposes on Android. - AudioManager* GetAndroidAudioManagerForTest() { - return _audioManagerAndroid.get(); - } -#endif - AudioDeviceBuffer* GetAudioDeviceBuffer() { return &_audioDeviceBuffer; } - - private: - PlatformType Platform() const; - AudioLayer PlatformAudioLayer() const; - - CriticalSectionWrapper& _critSect; - CriticalSectionWrapper& _critSectEventCb; - CriticalSectionWrapper& _critSectAudioCb; - - AudioDeviceObserver* _ptrCbAudioDeviceObserver; - - AudioDeviceGeneric* _ptrAudioDevice; - - AudioDeviceBuffer _audioDeviceBuffer; -#if defined(WEBRTC_ANDROID) - std::unique_ptr _audioManagerAndroid; -#endif - int32_t _id; - AudioLayer _platformAudioLayer; - int64_t _lastProcessTime; - PlatformType _platformType; - bool _initialized; - mutable ErrorCode _lastError; -}; - -} // namespace webrtc - -#endif // defined(WEBRTC_INCLUDE_INTERNAL_AUDIO_DEVICE) - -#endif // WEBRTC_MODULES_INTERFACE_AUDIO_DEVICE_IMPL_H_ diff --git a/WebRtc.NET/include/webrtc/modules/audio_device/dummy/audio_device_dummy.h b/WebRtc.NET/include/webrtc/modules/audio_device/dummy/audio_device_dummy.h deleted file mode 100644 index 72a0eb1a..00000000 --- a/WebRtc.NET/include/webrtc/modules/audio_device/dummy/audio_device_dummy.h +++ /dev/null @@ -1,147 +0,0 @@ -/* - * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_AUDIO_DEVICE_AUDIO_DEVICE_DUMMY_H -#define WEBRTC_AUDIO_DEVICE_AUDIO_DEVICE_DUMMY_H - -#include - -#include "webrtc/modules/audio_device/audio_device_generic.h" - -namespace webrtc { - -class AudioDeviceDummy : public AudioDeviceGeneric { - public: - AudioDeviceDummy(const int32_t id) {} - virtual ~AudioDeviceDummy() {} - - // Retrieve the currently utilized audio layer - int32_t ActiveAudioLayer( - AudioDeviceModule::AudioLayer& audioLayer) const override; - - // Main initializaton and termination - InitStatus Init() override; - int32_t Terminate() override; - bool Initialized() const override; - - // Device enumeration - int16_t PlayoutDevices() override; - int16_t RecordingDevices() override; - int32_t PlayoutDeviceName(uint16_t index, - char name[kAdmMaxDeviceNameSize], - char guid[kAdmMaxGuidSize]) override; - int32_t RecordingDeviceName(uint16_t index, - char name[kAdmMaxDeviceNameSize], - char guid[kAdmMaxGuidSize]) override; - - // Device selection - int32_t SetPlayoutDevice(uint16_t index) override; - int32_t SetPlayoutDevice( - AudioDeviceModule::WindowsDeviceType device) override; - int32_t SetRecordingDevice(uint16_t index) override; - int32_t SetRecordingDevice( - AudioDeviceModule::WindowsDeviceType device) override; - - // Audio transport initialization - int32_t PlayoutIsAvailable(bool& available) override; - int32_t InitPlayout() override; - bool PlayoutIsInitialized() const override; - int32_t RecordingIsAvailable(bool& available) override; - int32_t InitRecording() override; - bool RecordingIsInitialized() const override; - - // Audio transport control - int32_t StartPlayout() override; - int32_t StopPlayout() override; - bool Playing() const override; - int32_t StartRecording() override; - int32_t StopRecording() override; - bool Recording() const override; - - // Microphone Automatic Gain Control (AGC) - int32_t SetAGC(bool enable) override; - bool AGC() const override; - - // Volume control based on the Windows Wave API (Windows only) - int32_t SetWaveOutVolume(uint16_t volumeLeft, uint16_t volumeRight) override; - int32_t WaveOutVolume(uint16_t& volumeLeft, - uint16_t& volumeRight) const override; - - // Audio mixer initialization - int32_t InitSpeaker() override; - bool SpeakerIsInitialized() const override; - int32_t InitMicrophone() override; - bool MicrophoneIsInitialized() const override; - - // Speaker volume controls - int32_t SpeakerVolumeIsAvailable(bool& available) override; - int32_t SetSpeakerVolume(uint32_t volume) override; - int32_t SpeakerVolume(uint32_t& volume) const override; - int32_t MaxSpeakerVolume(uint32_t& maxVolume) const override; - int32_t MinSpeakerVolume(uint32_t& minVolume) const override; - int32_t SpeakerVolumeStepSize(uint16_t& stepSize) const override; - - // Microphone volume controls - int32_t MicrophoneVolumeIsAvailable(bool& available) override; - int32_t SetMicrophoneVolume(uint32_t volume) override; - int32_t MicrophoneVolume(uint32_t& volume) const override; - int32_t MaxMicrophoneVolume(uint32_t& maxVolume) const override; - int32_t MinMicrophoneVolume(uint32_t& minVolume) const override; - int32_t MicrophoneVolumeStepSize(uint16_t& stepSize) const override; - - // Speaker mute control - int32_t SpeakerMuteIsAvailable(bool& available) override; - int32_t SetSpeakerMute(bool enable) override; - int32_t SpeakerMute(bool& enabled) const override; - - // Microphone mute control - int32_t MicrophoneMuteIsAvailable(bool& available) override; - int32_t SetMicrophoneMute(bool enable) override; - int32_t MicrophoneMute(bool& enabled) const override; - - // Microphone boost control - int32_t MicrophoneBoostIsAvailable(bool& available) override; - int32_t SetMicrophoneBoost(bool enable) override; - int32_t MicrophoneBoost(bool& enabled) const override; - - // Stereo support - int32_t StereoPlayoutIsAvailable(bool& available) override; - int32_t SetStereoPlayout(bool enable) override; - int32_t StereoPlayout(bool& enabled) const override; - int32_t StereoRecordingIsAvailable(bool& available) override; - int32_t SetStereoRecording(bool enable) override; - int32_t StereoRecording(bool& enabled) const override; - - // Delay information and control - int32_t SetPlayoutBuffer(const AudioDeviceModule::BufferType type, - uint16_t sizeMS) override; - int32_t PlayoutBuffer(AudioDeviceModule::BufferType& type, - uint16_t& sizeMS) const override; - int32_t PlayoutDelay(uint16_t& delayMS) const override; - int32_t RecordingDelay(uint16_t& delayMS) const override; - - // CPU load - int32_t CPULoad(uint16_t& load) const override; - - bool PlayoutWarning() const override; - bool PlayoutError() const override; - bool RecordingWarning() const override; - bool RecordingError() const override; - void ClearPlayoutWarning() override; - void ClearPlayoutError() override; - void ClearRecordingWarning() override; - void ClearRecordingError() override; - - void AttachAudioBuffer(AudioDeviceBuffer* audioBuffer) override; -}; - -} // namespace webrtc - -#endif // WEBRTC_AUDIO_DEVICE_AUDIO_DEVICE_DUMMY_H diff --git a/WebRtc.NET/include/webrtc/modules/audio_device/dummy/file_audio_device.h b/WebRtc.NET/include/webrtc/modules/audio_device/dummy/file_audio_device.h deleted file mode 100644 index 2065f21d..00000000 --- a/WebRtc.NET/include/webrtc/modules/audio_device/dummy/file_audio_device.h +++ /dev/null @@ -1,202 +0,0 @@ -/* - * Copyright (c) 2014 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_AUDIO_DEVICE_FILE_AUDIO_DEVICE_H -#define WEBRTC_AUDIO_DEVICE_FILE_AUDIO_DEVICE_H - -#include - -#include -#include - -#include "webrtc/base/timeutils.h" -#include "webrtc/modules/audio_device/audio_device_generic.h" -#include "webrtc/system_wrappers/include/critical_section_wrapper.h" -#include "webrtc/system_wrappers/include/file_wrapper.h" - -namespace rtc { -class PlatformThread; -} // namespace rtc - -namespace webrtc { -class EventWrapper; - -// This is a fake audio device which plays audio from a file as its microphone -// and plays out into a file. -class FileAudioDevice : public AudioDeviceGeneric { - public: - // Constructs a file audio device with |id|. It will read audio from - // |inputFilename| and record output audio to |outputFilename|. - // - // The input file should be a readable 48k stereo raw file, and the output - // file should point to a writable location. The output format will also be - // 48k stereo raw audio. - FileAudioDevice(const int32_t id, - const char* inputFilename, - const char* outputFilename); - virtual ~FileAudioDevice(); - - // Retrieve the currently utilized audio layer - int32_t ActiveAudioLayer( - AudioDeviceModule::AudioLayer& audioLayer) const override; - - // Main initializaton and termination - InitStatus Init() override; - int32_t Terminate() override; - bool Initialized() const override; - - // Device enumeration - int16_t PlayoutDevices() override; - int16_t RecordingDevices() override; - int32_t PlayoutDeviceName(uint16_t index, - char name[kAdmMaxDeviceNameSize], - char guid[kAdmMaxGuidSize]) override; - int32_t RecordingDeviceName(uint16_t index, - char name[kAdmMaxDeviceNameSize], - char guid[kAdmMaxGuidSize]) override; - - // Device selection - int32_t SetPlayoutDevice(uint16_t index) override; - int32_t SetPlayoutDevice( - AudioDeviceModule::WindowsDeviceType device) override; - int32_t SetRecordingDevice(uint16_t index) override; - int32_t SetRecordingDevice( - AudioDeviceModule::WindowsDeviceType device) override; - - // Audio transport initialization - int32_t PlayoutIsAvailable(bool& available) override; - int32_t InitPlayout() override; - bool PlayoutIsInitialized() const override; - int32_t RecordingIsAvailable(bool& available) override; - int32_t InitRecording() override; - bool RecordingIsInitialized() const override; - - // Audio transport control - int32_t StartPlayout() override; - int32_t StopPlayout() override; - bool Playing() const override; - int32_t StartRecording() override; - int32_t StopRecording() override; - bool Recording() const override; - - // Microphone Automatic Gain Control (AGC) - int32_t SetAGC(bool enable) override; - bool AGC() const override; - - // Volume control based on the Windows Wave API (Windows only) - int32_t SetWaveOutVolume(uint16_t volumeLeft, uint16_t volumeRight) override; - int32_t WaveOutVolume(uint16_t& volumeLeft, - uint16_t& volumeRight) const override; - - // Audio mixer initialization - int32_t InitSpeaker() override; - bool SpeakerIsInitialized() const override; - int32_t InitMicrophone() override; - bool MicrophoneIsInitialized() const override; - - // Speaker volume controls - int32_t SpeakerVolumeIsAvailable(bool& available) override; - int32_t SetSpeakerVolume(uint32_t volume) override; - int32_t SpeakerVolume(uint32_t& volume) const override; - int32_t MaxSpeakerVolume(uint32_t& maxVolume) const override; - int32_t MinSpeakerVolume(uint32_t& minVolume) const override; - int32_t SpeakerVolumeStepSize(uint16_t& stepSize) const override; - - // Microphone volume controls - int32_t MicrophoneVolumeIsAvailable(bool& available) override; - int32_t SetMicrophoneVolume(uint32_t volume) override; - int32_t MicrophoneVolume(uint32_t& volume) const override; - int32_t MaxMicrophoneVolume(uint32_t& maxVolume) const override; - int32_t MinMicrophoneVolume(uint32_t& minVolume) const override; - int32_t MicrophoneVolumeStepSize(uint16_t& stepSize) const override; - - // Speaker mute control - int32_t SpeakerMuteIsAvailable(bool& available) override; - int32_t SetSpeakerMute(bool enable) override; - int32_t SpeakerMute(bool& enabled) const override; - - // Microphone mute control - int32_t MicrophoneMuteIsAvailable(bool& available) override; - int32_t SetMicrophoneMute(bool enable) override; - int32_t MicrophoneMute(bool& enabled) const override; - - // Microphone boost control - int32_t MicrophoneBoostIsAvailable(bool& available) override; - int32_t SetMicrophoneBoost(bool enable) override; - int32_t MicrophoneBoost(bool& enabled) const override; - - // Stereo support - int32_t StereoPlayoutIsAvailable(bool& available) override; - int32_t SetStereoPlayout(bool enable) override; - int32_t StereoPlayout(bool& enabled) const override; - int32_t StereoRecordingIsAvailable(bool& available) override; - int32_t SetStereoRecording(bool enable) override; - int32_t StereoRecording(bool& enabled) const override; - - // Delay information and control - int32_t SetPlayoutBuffer(const AudioDeviceModule::BufferType type, - uint16_t sizeMS) override; - int32_t PlayoutBuffer(AudioDeviceModule::BufferType& type, - uint16_t& sizeMS) const override; - int32_t PlayoutDelay(uint16_t& delayMS) const override; - int32_t RecordingDelay(uint16_t& delayMS) const override; - - // CPU load - int32_t CPULoad(uint16_t& load) const override; - - bool PlayoutWarning() const override; - bool PlayoutError() const override; - bool RecordingWarning() const override; - bool RecordingError() const override; - void ClearPlayoutWarning() override; - void ClearPlayoutError() override; - void ClearRecordingWarning() override; - void ClearRecordingError() override; - - void AttachAudioBuffer(AudioDeviceBuffer* audioBuffer) override; - - private: - static bool RecThreadFunc(void*); - static bool PlayThreadFunc(void*); - bool RecThreadProcess(); - bool PlayThreadProcess(); - - int32_t _playout_index; - int32_t _record_index; - AudioDeviceModule::BufferType _playBufType; - AudioDeviceBuffer* _ptrAudioBuffer; - int8_t* _recordingBuffer; // In bytes. - int8_t* _playoutBuffer; // In bytes. - uint32_t _recordingFramesLeft; - uint32_t _playoutFramesLeft; - CriticalSectionWrapper& _critSect; - - size_t _recordingBufferSizeIn10MS; - size_t _recordingFramesIn10MS; - size_t _playoutFramesIn10MS; - - // TODO(pbos): Make plain members instead of pointers and stop resetting them. - std::unique_ptr _ptrThreadRec; - std::unique_ptr _ptrThreadPlay; - - bool _playing; - bool _recording; - int64_t _lastCallPlayoutMillis; - int64_t _lastCallRecordMillis; - - FileWrapper& _outputFile; - FileWrapper& _inputFile; - std::string _outputFilename; - std::string _inputFilename; -}; - -} // namespace webrtc - -#endif // WEBRTC_AUDIO_DEVICE_FILE_AUDIO_DEVICE_H diff --git a/WebRtc.NET/include/webrtc/modules/audio_device/fine_audio_buffer.h b/WebRtc.NET/include/webrtc/modules/audio_device/fine_audio_buffer.h deleted file mode 100644 index 478e0c63..00000000 --- a/WebRtc.NET/include/webrtc/modules/audio_device/fine_audio_buffer.h +++ /dev/null @@ -1,109 +0,0 @@ -/* - * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MODULES_AUDIO_DEVICE_FINE_AUDIO_BUFFER_H_ -#define WEBRTC_MODULES_AUDIO_DEVICE_FINE_AUDIO_BUFFER_H_ - -#include - -#include "webrtc/typedefs.h" - -namespace webrtc { - -class AudioDeviceBuffer; - -// FineAudioBuffer takes an AudioDeviceBuffer (ADB) which deals with audio data -// corresponding to 10ms of data. It then allows for this data to be pulled in -// a finer or coarser granularity. I.e. interacting with this class instead of -// directly with the AudioDeviceBuffer one can ask for any number of audio data -// samples. This class also ensures that audio data can be delivered to the ADB -// in 10ms chunks when the size of the provided audio buffers differs from 10ms. -// As an example: calling DeliverRecordedData() with 5ms buffers will deliver -// accumulated 10ms worth of data to the ADB every second call. -class FineAudioBuffer { - public: - // |device_buffer| is a buffer that provides 10ms of audio data. - // |desired_frame_size_bytes| is the number of bytes of audio data - // GetPlayoutData() should return on success. It is also the required size of - // each recorded buffer used in DeliverRecordedData() calls. - // |sample_rate| is the sample rate of the audio data. This is needed because - // |device_buffer| delivers 10ms of data. Given the sample rate the number - // of samples can be calculated. - FineAudioBuffer(AudioDeviceBuffer* device_buffer, - size_t desired_frame_size_bytes, - int sample_rate); - ~FineAudioBuffer(); - - // Returns the required size of |buffer| when calling GetPlayoutData(). If - // the buffer is smaller memory trampling will happen. - size_t RequiredPlayoutBufferSizeBytes(); - - // Clears buffers and counters dealing with playour and/or recording. - void ResetPlayout(); - void ResetRecord(); - - // |buffer| must be of equal or greater size than what is returned by - // RequiredBufferSize(). This is to avoid unnecessary memcpy. - void GetPlayoutData(int8_t* buffer); - - // Consumes the audio data in |buffer| and sends it to the WebRTC layer in - // chunks of 10ms. The provided delay estimates in |playout_delay_ms| and - // |record_delay_ms| are given to the AEC in the audio processing module. - // They can be fixed values on most platforms and they are ignored if an - // external (hardware/built-in) AEC is used. - // The size of |buffer| is given by |size_in_bytes| and must be equal to - // |desired_frame_size_bytes_|. A RTC_CHECK will be hit if this is not the - // case. - // Example: buffer size is 5ms => call #1 stores 5ms of data, call #2 stores - // 5ms of data and sends a total of 10ms to WebRTC and clears the intenal - // cache. Call #3 restarts the scheme above. - void DeliverRecordedData(const int8_t* buffer, - size_t size_in_bytes, - int playout_delay_ms, - int record_delay_ms); - - private: - // Device buffer that works with 10ms chunks of data both for playout and - // for recording. I.e., the WebRTC side will always be asked for audio to be - // played out in 10ms chunks and recorded audio will be sent to WebRTC in - // 10ms chunks as well. This pointer is owned by the constructor of this - // class and the owner must ensure that the pointer is valid during the life- - // time of this object. - AudioDeviceBuffer* const device_buffer_; - // Number of bytes delivered by GetPlayoutData() call and provided to - // DeliverRecordedData(). - const size_t desired_frame_size_bytes_; - // Sample rate in Hertz. - const int sample_rate_; - // Number of audio samples per 10ms. - const size_t samples_per_10_ms_; - // Number of audio bytes per 10ms. - const size_t bytes_per_10_ms_; - // Storage for output samples that are not yet asked for. - std::unique_ptr playout_cache_buffer_; - // Location of first unread output sample. - size_t playout_cached_buffer_start_; - // Number of bytes stored in output (contain samples to be played out) cache. - size_t playout_cached_bytes_; - // Storage for input samples that are about to be delivered to the WebRTC - // ADB or remains from the last successful delivery of a 10ms audio buffer. - std::unique_ptr record_cache_buffer_; - // Required (max) size in bytes of the |record_cache_buffer_|. - const size_t required_record_buffer_size_bytes_; - // Number of bytes in input (contains recorded samples) cache. - size_t record_cached_bytes_; - // Read and write pointers used in the buffering scheme on the recording side. - size_t record_read_pos_; - size_t record_write_pos_; -}; - -} // namespace webrtc - -#endif // WEBRTC_MODULES_AUDIO_DEVICE_FINE_AUDIO_BUFFER_H_ diff --git a/WebRtc.NET/include/webrtc/modules/audio_device/include/audio_device.h b/WebRtc.NET/include/webrtc/modules/audio_device/include/audio_device.h deleted file mode 100644 index f38a24ae..00000000 --- a/WebRtc.NET/include/webrtc/modules/audio_device/include/audio_device.h +++ /dev/null @@ -1,216 +0,0 @@ -/* - * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef MODULES_AUDIO_DEVICE_INCLUDE_AUDIO_DEVICE_H_ -#define MODULES_AUDIO_DEVICE_INCLUDE_AUDIO_DEVICE_H_ - -#include "webrtc/base/scoped_ref_ptr.h" -#include "webrtc/modules/audio_device/include/audio_device_defines.h" -#include "webrtc/modules/include/module.h" - -namespace webrtc { - -class AudioDeviceModule : public RefCountedModule { - public: - enum ErrorCode { - kAdmErrNone = 0, - kAdmErrArgument = 1 - }; - - enum AudioLayer { - kPlatformDefaultAudio = 0, - kWindowsWaveAudio = 1, - kWindowsCoreAudio = 2, - kLinuxAlsaAudio = 3, - kLinuxPulseAudio = 4, - kAndroidJavaAudio = 5, - kAndroidOpenSLESAudio = 6, - kAndroidJavaInputAndOpenSLESOutputAudio = 7, - kDummyAudio = 8 - }; - - enum WindowsDeviceType { - kDefaultCommunicationDevice = -1, - kDefaultDevice = -2 - }; - - enum BufferType { - kFixedBufferSize = 0, - kAdaptiveBufferSize = 1 - }; - - enum ChannelType { - kChannelLeft = 0, - kChannelRight = 1, - kChannelBoth = 2 - }; - - public: - // Create an ADM. - static rtc::scoped_refptr Create( - const int32_t id, - const AudioLayer audio_layer); - - // Retrieve the currently utilized audio layer - virtual int32_t ActiveAudioLayer(AudioLayer* audioLayer) const = 0; - - // Error handling - virtual ErrorCode LastError() const = 0; - virtual int32_t RegisterEventObserver(AudioDeviceObserver* eventCallback) = 0; - - // Full-duplex transportation of PCM audio - virtual int32_t RegisterAudioCallback(AudioTransport* audioCallback) = 0; - - // Main initialization and termination - virtual int32_t Init() = 0; - virtual int32_t Terminate() = 0; - virtual bool Initialized() const = 0; - - // Device enumeration - virtual int16_t PlayoutDevices() = 0; - virtual int16_t RecordingDevices() = 0; - virtual int32_t PlayoutDeviceName(uint16_t index, - char name[kAdmMaxDeviceNameSize], - char guid[kAdmMaxGuidSize]) = 0; - virtual int32_t RecordingDeviceName(uint16_t index, - char name[kAdmMaxDeviceNameSize], - char guid[kAdmMaxGuidSize]) = 0; - - // Device selection - virtual int32_t SetPlayoutDevice(uint16_t index) = 0; - virtual int32_t SetPlayoutDevice(WindowsDeviceType device) = 0; - virtual int32_t SetRecordingDevice(uint16_t index) = 0; - virtual int32_t SetRecordingDevice(WindowsDeviceType device) = 0; - - // Audio transport initialization - virtual int32_t PlayoutIsAvailable(bool* available) = 0; - virtual int32_t InitPlayout() = 0; - virtual bool PlayoutIsInitialized() const = 0; - virtual int32_t RecordingIsAvailable(bool* available) = 0; - virtual int32_t InitRecording() = 0; - virtual bool RecordingIsInitialized() const = 0; - - // Audio transport control - virtual int32_t StartPlayout() = 0; - virtual int32_t StopPlayout() = 0; - virtual bool Playing() const = 0; - virtual int32_t StartRecording() = 0; - virtual int32_t StopRecording() = 0; - virtual bool Recording() const = 0; - - // Microphone Automatic Gain Control (AGC) - virtual int32_t SetAGC(bool enable) = 0; - virtual bool AGC() const = 0; - - // Volume control based on the Windows Wave API (Windows only) - virtual int32_t SetWaveOutVolume(uint16_t volumeLeft, - uint16_t volumeRight) = 0; - virtual int32_t WaveOutVolume(uint16_t* volumeLeft, - uint16_t* volumeRight) const = 0; - - // Audio mixer initialization - virtual int32_t InitSpeaker() = 0; - virtual bool SpeakerIsInitialized() const = 0; - virtual int32_t InitMicrophone() = 0; - virtual bool MicrophoneIsInitialized() const = 0; - - // Speaker volume controls - virtual int32_t SpeakerVolumeIsAvailable(bool* available) = 0; - virtual int32_t SetSpeakerVolume(uint32_t volume) = 0; - virtual int32_t SpeakerVolume(uint32_t* volume) const = 0; - virtual int32_t MaxSpeakerVolume(uint32_t* maxVolume) const = 0; - virtual int32_t MinSpeakerVolume(uint32_t* minVolume) const = 0; - virtual int32_t SpeakerVolumeStepSize(uint16_t* stepSize) const = 0; - - // Microphone volume controls - virtual int32_t MicrophoneVolumeIsAvailable(bool* available) = 0; - virtual int32_t SetMicrophoneVolume(uint32_t volume) = 0; - virtual int32_t MicrophoneVolume(uint32_t* volume) const = 0; - virtual int32_t MaxMicrophoneVolume(uint32_t* maxVolume) const = 0; - virtual int32_t MinMicrophoneVolume(uint32_t* minVolume) const = 0; - virtual int32_t MicrophoneVolumeStepSize(uint16_t* stepSize) const = 0; - - // Speaker mute control - virtual int32_t SpeakerMuteIsAvailable(bool* available) = 0; - virtual int32_t SetSpeakerMute(bool enable) = 0; - virtual int32_t SpeakerMute(bool* enabled) const = 0; - - // Microphone mute control - virtual int32_t MicrophoneMuteIsAvailable(bool* available) = 0; - virtual int32_t SetMicrophoneMute(bool enable) = 0; - virtual int32_t MicrophoneMute(bool* enabled) const = 0; - - // Microphone boost control - virtual int32_t MicrophoneBoostIsAvailable(bool* available) = 0; - virtual int32_t SetMicrophoneBoost(bool enable) = 0; - virtual int32_t MicrophoneBoost(bool* enabled) const = 0; - - // Stereo support - virtual int32_t StereoPlayoutIsAvailable(bool* available) const = 0; - virtual int32_t SetStereoPlayout(bool enable) = 0; - virtual int32_t StereoPlayout(bool* enabled) const = 0; - virtual int32_t StereoRecordingIsAvailable(bool* available) const = 0; - virtual int32_t SetStereoRecording(bool enable) = 0; - virtual int32_t StereoRecording(bool* enabled) const = 0; - virtual int32_t SetRecordingChannel(const ChannelType channel) = 0; - virtual int32_t RecordingChannel(ChannelType* channel) const = 0; - - // Delay information and control - virtual int32_t SetPlayoutBuffer(const BufferType type, - uint16_t sizeMS = 0) = 0; - virtual int32_t PlayoutBuffer(BufferType* type, uint16_t* sizeMS) const = 0; - virtual int32_t PlayoutDelay(uint16_t* delayMS) const = 0; - virtual int32_t RecordingDelay(uint16_t* delayMS) const = 0; - - // CPU load - virtual int32_t CPULoad(uint16_t* load) const = 0; - - // Recording of raw PCM data - virtual int32_t StartRawOutputFileRecording( - const char pcmFileNameUTF8[kAdmMaxFileNameSize]) = 0; - virtual int32_t StopRawOutputFileRecording() = 0; - virtual int32_t StartRawInputFileRecording( - const char pcmFileNameUTF8[kAdmMaxFileNameSize]) = 0; - virtual int32_t StopRawInputFileRecording() = 0; - - // Native sample rate controls (samples/sec) - virtual int32_t SetRecordingSampleRate(const uint32_t samplesPerSec) = 0; - virtual int32_t RecordingSampleRate(uint32_t* samplesPerSec) const = 0; - virtual int32_t SetPlayoutSampleRate(const uint32_t samplesPerSec) = 0; - virtual int32_t PlayoutSampleRate(uint32_t* samplesPerSec) const = 0; - - // Mobile device specific functions - virtual int32_t ResetAudioDevice() = 0; - virtual int32_t SetLoudspeakerStatus(bool enable) = 0; - virtual int32_t GetLoudspeakerStatus(bool* enabled) const = 0; - - // Only supported on Android. - virtual bool BuiltInAECIsAvailable() const = 0; - virtual bool BuiltInAGCIsAvailable() const = 0; - virtual bool BuiltInNSIsAvailable() const = 0; - - // Enables the built-in audio effects. Only supported on Android. - virtual int32_t EnableBuiltInAEC(bool enable) = 0; - virtual int32_t EnableBuiltInAGC(bool enable) = 0; - virtual int32_t EnableBuiltInNS(bool enable) = 0; - -// Only supported on iOS. -#if defined(WEBRTC_IOS) - virtual int GetPlayoutAudioParameters(AudioParameters* params) const = 0; - virtual int GetRecordAudioParameters(AudioParameters* params) const = 0; -#endif // WEBRTC_IOS - - protected: - ~AudioDeviceModule() override {} -}; - -} // namespace webrtc - -#endif // MODULES_AUDIO_DEVICE_INCLUDE_AUDIO_DEVICE_H_ diff --git a/WebRtc.NET/include/webrtc/modules/audio_device/include/fake_audio_device.h b/WebRtc.NET/include/webrtc/modules/audio_device/include/fake_audio_device.h deleted file mode 100644 index 98fd2f46..00000000 --- a/WebRtc.NET/include/webrtc/modules/audio_device/include/fake_audio_device.h +++ /dev/null @@ -1,169 +0,0 @@ -/* - * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MODULES_AUDIO_DEVICE_INCLUDE_FAKE_AUDIO_DEVICE_H_ -#define WEBRTC_MODULES_AUDIO_DEVICE_INCLUDE_FAKE_AUDIO_DEVICE_H_ - -#include "webrtc/modules/audio_device/include/audio_device.h" - -namespace webrtc { - -class FakeAudioDeviceModule : public AudioDeviceModule { - public: - FakeAudioDeviceModule() {} - virtual ~FakeAudioDeviceModule() {} - virtual int32_t AddRef() const { return 0; } - virtual int32_t Release() const { return 0; } - virtual int32_t RegisterEventObserver(AudioDeviceObserver* eventCallback) { - return 0; - } - virtual int32_t RegisterAudioCallback(AudioTransport* audioCallback) { - return 0; - } - virtual int32_t Init() { return 0; } - virtual int32_t InitSpeaker() { return 0; } - virtual int32_t SetPlayoutDevice(uint16_t index) { return 0; } - virtual int32_t SetPlayoutDevice(WindowsDeviceType device) { return 0; } - virtual int32_t SetStereoPlayout(bool enable) { return 0; } - virtual int32_t StopPlayout() { return 0; } - virtual int32_t InitMicrophone() { return 0; } - virtual int32_t SetRecordingDevice(uint16_t index) { return 0; } - virtual int32_t SetRecordingDevice(WindowsDeviceType device) { return 0; } - virtual int32_t SetStereoRecording(bool enable) { return 0; } - virtual int32_t SetAGC(bool enable) { return 0; } - virtual int32_t StopRecording() { return 0; } - virtual int64_t TimeUntilNextProcess() { return 0; } - virtual void Process() {} - virtual int32_t Terminate() { return 0; } - - virtual int32_t ActiveAudioLayer(AudioLayer* audioLayer) const { return 0; } - virtual ErrorCode LastError() const { return kAdmErrNone; } - virtual bool Initialized() const { return true; } - virtual int16_t PlayoutDevices() { return 0; } - virtual int16_t RecordingDevices() { return 0; } - virtual int32_t PlayoutDeviceName(uint16_t index, - char name[kAdmMaxDeviceNameSize], - char guid[kAdmMaxGuidSize]) { - return 0; - } - virtual int32_t RecordingDeviceName(uint16_t index, - char name[kAdmMaxDeviceNameSize], - char guid[kAdmMaxGuidSize]) { - return 0; - } - virtual int32_t PlayoutIsAvailable(bool* available) { return 0; } - virtual int32_t InitPlayout() { return 0; } - virtual bool PlayoutIsInitialized() const { return true; } - virtual int32_t RecordingIsAvailable(bool* available) { return 0; } - virtual int32_t InitRecording() { return 0; } - virtual bool RecordingIsInitialized() const { return true; } - virtual int32_t StartPlayout() { return 0; } - virtual bool Playing() const { return false; } - virtual int32_t StartRecording() { return 0; } - virtual bool Recording() const { return false; } - virtual bool AGC() const { return true; } - virtual int32_t SetWaveOutVolume(uint16_t volumeLeft, - uint16_t volumeRight) { - return 0; - } - virtual int32_t WaveOutVolume(uint16_t* volumeLeft, - uint16_t* volumeRight) const { - return 0; - } - virtual bool SpeakerIsInitialized() const { return true; } - virtual bool MicrophoneIsInitialized() const { return true; } - virtual int32_t SpeakerVolumeIsAvailable(bool* available) { return 0; } - virtual int32_t SetSpeakerVolume(uint32_t volume) { return 0; } - virtual int32_t SpeakerVolume(uint32_t* volume) const { return 0; } - virtual int32_t MaxSpeakerVolume(uint32_t* maxVolume) const { return 0; } - virtual int32_t MinSpeakerVolume(uint32_t* minVolume) const { return 0; } - virtual int32_t SpeakerVolumeStepSize(uint16_t* stepSize) const { return 0; } - virtual int32_t MicrophoneVolumeIsAvailable(bool* available) { return 0; } - virtual int32_t SetMicrophoneVolume(uint32_t volume) { return 0; } - virtual int32_t MicrophoneVolume(uint32_t* volume) const { return 0; } - virtual int32_t MaxMicrophoneVolume(uint32_t* maxVolume) const { return 0; } - virtual int32_t MinMicrophoneVolume(uint32_t* minVolume) const { return 0; } - virtual int32_t MicrophoneVolumeStepSize(uint16_t* stepSize) const { - return 0; - } - virtual int32_t SpeakerMuteIsAvailable(bool* available) { return 0; } - virtual int32_t SetSpeakerMute(bool enable) { return 0; } - virtual int32_t SpeakerMute(bool* enabled) const { return 0; } - virtual int32_t MicrophoneMuteIsAvailable(bool* available) { return 0; } - virtual int32_t SetMicrophoneMute(bool enable) { return 0; } - virtual int32_t MicrophoneMute(bool* enabled) const { return 0; } - virtual int32_t MicrophoneBoostIsAvailable(bool* available) { return 0; } - virtual int32_t SetMicrophoneBoost(bool enable) { return 0; } - virtual int32_t MicrophoneBoost(bool* enabled) const { return 0; } - virtual int32_t StereoPlayoutIsAvailable(bool* available) const { - *available = false; - return 0; - } - virtual int32_t StereoPlayout(bool* enabled) const { return 0; } - virtual int32_t StereoRecordingIsAvailable(bool* available) const { - *available = false; - return 0; - } - virtual int32_t StereoRecording(bool* enabled) const { return 0; } - virtual int32_t SetRecordingChannel(const ChannelType channel) { return 0; } - virtual int32_t RecordingChannel(ChannelType* channel) const { return 0; } - virtual int32_t SetPlayoutBuffer(const BufferType type, - uint16_t sizeMS = 0) { - return 0; - } - virtual int32_t PlayoutBuffer(BufferType* type, uint16_t* sizeMS) const { - return 0; - } - virtual int32_t PlayoutDelay(uint16_t* delayMS) const { return 0; } - virtual int32_t RecordingDelay(uint16_t* delayMS) const { return 0; } - virtual int32_t CPULoad(uint16_t* load) const { return 0; } - virtual int32_t StartRawOutputFileRecording( - const char pcmFileNameUTF8[kAdmMaxFileNameSize]) { - return 0; - } - virtual int32_t StopRawOutputFileRecording() { return 0; } - virtual int32_t StartRawInputFileRecording( - const char pcmFileNameUTF8[kAdmMaxFileNameSize]) { - return 0; - } - virtual int32_t StopRawInputFileRecording() { return 0; } - virtual int32_t SetRecordingSampleRate(const uint32_t samplesPerSec) { - return 0; - } - virtual int32_t RecordingSampleRate(uint32_t* samplesPerSec) const { - return 0; - } - virtual int32_t SetPlayoutSampleRate(const uint32_t samplesPerSec) { - return 0; - } - virtual int32_t PlayoutSampleRate(uint32_t* samplesPerSec) const { return 0; } - virtual int32_t ResetAudioDevice() { return 0; } - virtual int32_t SetLoudspeakerStatus(bool enable) { return 0; } - virtual int32_t GetLoudspeakerStatus(bool* enabled) const { return 0; } - virtual bool BuiltInAECIsAvailable() const { return false; } - virtual int32_t EnableBuiltInAEC(bool enable) { return -1; } - virtual bool BuiltInAGCIsAvailable() const { return false; } - virtual int32_t EnableBuiltInAGC(bool enable) { return -1; } - virtual bool BuiltInNSIsAvailable() const { return false; } - virtual int32_t EnableBuiltInNS(bool enable) { return -1; } - -#if defined(WEBRTC_IOS) - virtual int GetPlayoutAudioParameters(AudioParameters* params) const { - return -1; - } - virtual int GetRecordAudioParameters(AudioParameters* params) const { - return -1; - } -#endif // WEBRTC_IOS -}; - -} // namespace webrtc - -#endif // WEBRTC_MODULES_AUDIO_DEVICE_INCLUDE_FAKE_AUDIO_DEVICE_H_ diff --git a/WebRtc.NET/include/webrtc/modules/audio_device/include/mock_audio_device.h b/WebRtc.NET/include/webrtc/modules/audio_device/include/mock_audio_device.h deleted file mode 100644 index 2c44c65b..00000000 --- a/WebRtc.NET/include/webrtc/modules/audio_device/include/mock_audio_device.h +++ /dev/null @@ -1,137 +0,0 @@ -/* - * Copyright (c) 2015 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MODULES_AUDIO_DEVICE_INCLUDE_MOCK_AUDIO_DEVICE_H_ -#define WEBRTC_MODULES_AUDIO_DEVICE_INCLUDE_MOCK_AUDIO_DEVICE_H_ - -#include - -#include "webrtc/modules/audio_device/include/audio_device.h" -#include "webrtc/test/gmock.h" - -namespace webrtc { -namespace test { - -class MockAudioDeviceModule : public AudioDeviceModule { - public: - // Module. - MOCK_METHOD0(TimeUntilNextProcess, int64_t()); - MOCK_METHOD0(Process, void()); - MOCK_METHOD1(ProcessThreadAttached, void(ProcessThread*)); - // RefCountedModule. - MOCK_CONST_METHOD0(AddRef, int32_t()); - MOCK_CONST_METHOD0(Release, int32_t()); - // AudioDeviceModule. - MOCK_CONST_METHOD1(ActiveAudioLayer, int32_t(AudioLayer* audioLayer)); - MOCK_CONST_METHOD0(LastError, ErrorCode()); - MOCK_METHOD1(RegisterEventObserver, - int32_t(AudioDeviceObserver* eventCallback)); - MOCK_METHOD1(RegisterAudioCallback, int32_t(AudioTransport* audioCallback)); - MOCK_METHOD0(Init, int32_t()); - MOCK_METHOD0(Terminate, int32_t()); - MOCK_CONST_METHOD0(Initialized, bool()); - MOCK_METHOD0(PlayoutDevices, int16_t()); - MOCK_METHOD0(RecordingDevices, int16_t()); - MOCK_METHOD3(PlayoutDeviceName, int32_t(uint16_t index, - char name[kAdmMaxDeviceNameSize], - char guid[kAdmMaxGuidSize])); - MOCK_METHOD3(RecordingDeviceName, int32_t(uint16_t index, - char name[kAdmMaxDeviceNameSize], - char guid[kAdmMaxGuidSize])); - MOCK_METHOD1(SetPlayoutDevice, int32_t(uint16_t index)); - MOCK_METHOD1(SetPlayoutDevice, int32_t(WindowsDeviceType device)); - MOCK_METHOD1(SetRecordingDevice, int32_t(uint16_t index)); - MOCK_METHOD1(SetRecordingDevice, int32_t(WindowsDeviceType device)); - MOCK_METHOD1(PlayoutIsAvailable, int32_t(bool* available)); - MOCK_METHOD0(InitPlayout, int32_t()); - MOCK_CONST_METHOD0(PlayoutIsInitialized, bool()); - MOCK_METHOD1(RecordingIsAvailable, int32_t(bool* available)); - MOCK_METHOD0(InitRecording, int32_t()); - MOCK_CONST_METHOD0(RecordingIsInitialized, bool()); - MOCK_METHOD0(StartPlayout, int32_t()); - MOCK_METHOD0(StopPlayout, int32_t()); - MOCK_CONST_METHOD0(Playing, bool()); - MOCK_METHOD0(StartRecording, int32_t()); - MOCK_METHOD0(StopRecording, int32_t()); - MOCK_CONST_METHOD0(Recording, bool()); - MOCK_METHOD1(SetAGC, int32_t(bool enable)); - MOCK_CONST_METHOD0(AGC, bool()); - MOCK_METHOD2(SetWaveOutVolume, int32_t(uint16_t volumeLeft, - uint16_t volumeRight)); - MOCK_CONST_METHOD2(WaveOutVolume, int32_t(uint16_t* volumeLeft, - uint16_t* volumeRight)); - MOCK_METHOD0(InitSpeaker, int32_t()); - MOCK_CONST_METHOD0(SpeakerIsInitialized, bool()); - MOCK_METHOD0(InitMicrophone, int32_t()); - MOCK_CONST_METHOD0(MicrophoneIsInitialized, bool()); - MOCK_METHOD1(SpeakerVolumeIsAvailable, int32_t(bool* available)); - MOCK_METHOD1(SetSpeakerVolume, int32_t(uint32_t volume)); - MOCK_CONST_METHOD1(SpeakerVolume, int32_t(uint32_t* volume)); - MOCK_CONST_METHOD1(MaxSpeakerVolume, int32_t(uint32_t* maxVolume)); - MOCK_CONST_METHOD1(MinSpeakerVolume, int32_t(uint32_t* minVolume)); - MOCK_CONST_METHOD1(SpeakerVolumeStepSize, int32_t(uint16_t* stepSize)); - MOCK_METHOD1(MicrophoneVolumeIsAvailable, int32_t(bool* available)); - MOCK_METHOD1(SetMicrophoneVolume, int32_t(uint32_t volume)); - MOCK_CONST_METHOD1(MicrophoneVolume, int32_t(uint32_t* volume)); - MOCK_CONST_METHOD1(MaxMicrophoneVolume, int32_t(uint32_t* maxVolume)); - MOCK_CONST_METHOD1(MinMicrophoneVolume, int32_t(uint32_t* minVolume)); - MOCK_CONST_METHOD1(MicrophoneVolumeStepSize, int32_t(uint16_t* stepSize)); - MOCK_METHOD1(SpeakerMuteIsAvailable, int32_t(bool* available)); - MOCK_METHOD1(SetSpeakerMute, int32_t(bool enable)); - MOCK_CONST_METHOD1(SpeakerMute, int32_t(bool* enabled)); - MOCK_METHOD1(MicrophoneMuteIsAvailable, int32_t(bool* available)); - MOCK_METHOD1(SetMicrophoneMute, int32_t(bool enable)); - MOCK_CONST_METHOD1(MicrophoneMute, int32_t(bool* enabled)); - MOCK_METHOD1(MicrophoneBoostIsAvailable, int32_t(bool* available)); - MOCK_METHOD1(SetMicrophoneBoost, int32_t(bool enable)); - MOCK_CONST_METHOD1(MicrophoneBoost, int32_t(bool* enabled)); - MOCK_CONST_METHOD1(StereoPlayoutIsAvailable, int32_t(bool* available)); - MOCK_METHOD1(SetStereoPlayout, int32_t(bool enable)); - MOCK_CONST_METHOD1(StereoPlayout, int32_t(bool* enabled)); - MOCK_CONST_METHOD1(StereoRecordingIsAvailable, int32_t(bool* available)); - MOCK_METHOD1(SetStereoRecording, int32_t(bool enable)); - MOCK_CONST_METHOD1(StereoRecording, int32_t(bool* enabled)); - MOCK_METHOD1(SetRecordingChannel, int32_t(const ChannelType channel)); - MOCK_CONST_METHOD1(RecordingChannel, int32_t(ChannelType* channel)); - MOCK_METHOD2(SetPlayoutBuffer, int32_t(const BufferType type, - uint16_t sizeMS)); - MOCK_CONST_METHOD2(PlayoutBuffer, int32_t(BufferType* type, - uint16_t* sizeMS)); - MOCK_CONST_METHOD1(PlayoutDelay, int32_t(uint16_t* delayMS)); - MOCK_CONST_METHOD1(RecordingDelay, int32_t(uint16_t* delayMS)); - MOCK_CONST_METHOD1(CPULoad, int32_t(uint16_t* load)); - MOCK_METHOD1(StartRawOutputFileRecording, - int32_t(const char pcmFileNameUTF8[kAdmMaxFileNameSize])); - MOCK_METHOD0(StopRawOutputFileRecording, int32_t()); - MOCK_METHOD1(StartRawInputFileRecording, - int32_t(const char pcmFileNameUTF8[kAdmMaxFileNameSize])); - MOCK_METHOD0(StopRawInputFileRecording, int32_t()); - MOCK_METHOD1(SetRecordingSampleRate, int32_t(const uint32_t samplesPerSec)); - MOCK_CONST_METHOD1(RecordingSampleRate, int32_t(uint32_t* samplesPerSec)); - MOCK_METHOD1(SetPlayoutSampleRate, int32_t(const uint32_t samplesPerSec)); - MOCK_CONST_METHOD1(PlayoutSampleRate, int32_t(uint32_t* samplesPerSec)); - MOCK_METHOD0(ResetAudioDevice, int32_t()); - MOCK_METHOD1(SetLoudspeakerStatus, int32_t(bool enable)); - MOCK_CONST_METHOD1(GetLoudspeakerStatus, int32_t(bool* enabled)); - MOCK_CONST_METHOD0(BuiltInAECIsAvailable, bool()); - MOCK_CONST_METHOD0(BuiltInAGCIsAvailable, bool()); - MOCK_CONST_METHOD0(BuiltInNSIsAvailable, bool()); - MOCK_METHOD1(EnableBuiltInAEC, int32_t(bool enable)); - MOCK_METHOD1(EnableBuiltInAGC, int32_t(bool enable)); - MOCK_METHOD1(EnableBuiltInNS, int32_t(bool enable)); -#if defined(WEBRTC_IOS) - MOCK_CONST_METHOD1(GetPlayoutAudioParameters, int(AudioParameters* params)); - MOCK_CONST_METHOD1(GetRecordAudioParameters, int(AudioParameters* params)); -#endif // WEBRTC_IOS -}; -} // namespace test -} // namespace webrtc - -#endif // WEBRTC_MODULES_AUDIO_DEVICE_INCLUDE_MOCK_AUDIO_DEVICE_H_ diff --git a/WebRtc.NET/include/webrtc/modules/audio_device/ios/audio_device_ios.h b/WebRtc.NET/include/webrtc/modules/audio_device/ios/audio_device_ios.h deleted file mode 100644 index 5aa3b70e..00000000 --- a/WebRtc.NET/include/webrtc/modules/audio_device/ios/audio_device_ios.h +++ /dev/null @@ -1,299 +0,0 @@ -/* - * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MODULES_AUDIO_DEVICE_IOS_AUDIO_DEVICE_IOS_H_ -#define WEBRTC_MODULES_AUDIO_DEVICE_IOS_AUDIO_DEVICE_IOS_H_ - -#include - -#include "WebRTC/RTCMacros.h" -#include "webrtc/base/thread.h" -#include "webrtc/base/thread_checker.h" -#include "webrtc/modules/audio_device/audio_device_generic.h" -#include "webrtc/modules/audio_device/ios/audio_session_observer.h" -#include "webrtc/modules/audio_device/ios/voice_processing_audio_unit.h" - -RTC_FWD_DECL_OBJC_CLASS(RTCAudioSessionDelegateAdapter); - -namespace webrtc { - -class FineAudioBuffer; - -// Implements full duplex 16-bit mono PCM audio support for iOS using a -// Voice-Processing (VP) I/O audio unit in Core Audio. The VP I/O audio unit -// supports audio echo cancellation. It also adds automatic gain control, -// adjustment of voice-processing quality and muting. -// -// An instance must be created and destroyed on one and the same thread. -// All supported public methods must also be called on the same thread. -// A thread checker will RTC_DCHECK if any supported method is called on an -// invalid thread. -// -// Recorded audio will be delivered on a real-time internal I/O thread in the -// audio unit. The audio unit will also ask for audio data to play out on this -// same thread. -class AudioDeviceIOS : public AudioDeviceGeneric, - public AudioSessionObserver, - public VoiceProcessingAudioUnitObserver, - public rtc::MessageHandler { - public: - AudioDeviceIOS(); - ~AudioDeviceIOS(); - - void AttachAudioBuffer(AudioDeviceBuffer* audioBuffer) override; - - InitStatus Init() override; - int32_t Terminate() override; - bool Initialized() const override { return initialized_; } - - int32_t InitPlayout() override; - bool PlayoutIsInitialized() const override { return audio_is_initialized_; } - - int32_t InitRecording() override; - bool RecordingIsInitialized() const override { return audio_is_initialized_; } - - int32_t StartPlayout() override; - int32_t StopPlayout() override; - bool Playing() const override { return playing_; } - - int32_t StartRecording() override; - int32_t StopRecording() override; - bool Recording() const override { return recording_; } - - int32_t SetLoudspeakerStatus(bool enable) override; - int32_t GetLoudspeakerStatus(bool& enabled) const override; - - // These methods returns hard-coded delay values and not dynamic delay - // estimates. The reason is that iOS supports a built-in AEC and the WebRTC - // AEC will always be disabled in the Libjingle layer to avoid running two - // AEC implementations at the same time. And, it saves resources to avoid - // updating these delay values continuously. - // TODO(henrika): it would be possible to mark these two methods as not - // implemented since they are only called for A/V-sync purposes today and - // A/V-sync is not supported on iOS. However, we avoid adding error messages - // the log by using these dummy implementations instead. - int32_t PlayoutDelay(uint16_t& delayMS) const override; - int32_t RecordingDelay(uint16_t& delayMS) const override; - - // Native audio parameters stored during construction. - // These methods are unique for the iOS implementation. - int GetPlayoutAudioParameters(AudioParameters* params) const override; - int GetRecordAudioParameters(AudioParameters* params) const override; - - // These methods are currently not fully implemented on iOS: - - // See audio_device_not_implemented.cc for trivial implementations. - int32_t PlayoutBuffer(AudioDeviceModule::BufferType& type, - uint16_t& sizeMS) const override; - int32_t ActiveAudioLayer( - AudioDeviceModule::AudioLayer& audioLayer) const override; - int32_t ResetAudioDevice() override; - int32_t PlayoutIsAvailable(bool& available) override; - int32_t RecordingIsAvailable(bool& available) override; - int32_t SetAGC(bool enable) override; - bool AGC() const override; - int16_t PlayoutDevices() override; - int16_t RecordingDevices() override; - int32_t PlayoutDeviceName(uint16_t index, - char name[kAdmMaxDeviceNameSize], - char guid[kAdmMaxGuidSize]) override; - int32_t RecordingDeviceName(uint16_t index, - char name[kAdmMaxDeviceNameSize], - char guid[kAdmMaxGuidSize]) override; - int32_t SetPlayoutDevice(uint16_t index) override; - int32_t SetPlayoutDevice( - AudioDeviceModule::WindowsDeviceType device) override; - int32_t SetRecordingDevice(uint16_t index) override; - int32_t SetRecordingDevice( - AudioDeviceModule::WindowsDeviceType device) override; - int32_t SetWaveOutVolume(uint16_t volumeLeft, uint16_t volumeRight) override; - int32_t WaveOutVolume(uint16_t& volumeLeft, - uint16_t& volumeRight) const override; - int32_t InitSpeaker() override; - bool SpeakerIsInitialized() const override; - int32_t InitMicrophone() override; - bool MicrophoneIsInitialized() const override; - int32_t SpeakerVolumeIsAvailable(bool& available) override; - int32_t SetSpeakerVolume(uint32_t volume) override; - int32_t SpeakerVolume(uint32_t& volume) const override; - int32_t MaxSpeakerVolume(uint32_t& maxVolume) const override; - int32_t MinSpeakerVolume(uint32_t& minVolume) const override; - int32_t SpeakerVolumeStepSize(uint16_t& stepSize) const override; - int32_t MicrophoneVolumeIsAvailable(bool& available) override; - int32_t SetMicrophoneVolume(uint32_t volume) override; - int32_t MicrophoneVolume(uint32_t& volume) const override; - int32_t MaxMicrophoneVolume(uint32_t& maxVolume) const override; - int32_t MinMicrophoneVolume(uint32_t& minVolume) const override; - int32_t MicrophoneVolumeStepSize(uint16_t& stepSize) const override; - int32_t MicrophoneMuteIsAvailable(bool& available) override; - int32_t SetMicrophoneMute(bool enable) override; - int32_t MicrophoneMute(bool& enabled) const override; - int32_t SpeakerMuteIsAvailable(bool& available) override; - int32_t SetSpeakerMute(bool enable) override; - int32_t SpeakerMute(bool& enabled) const override; - int32_t MicrophoneBoostIsAvailable(bool& available) override; - int32_t SetMicrophoneBoost(bool enable) override; - int32_t MicrophoneBoost(bool& enabled) const override; - int32_t StereoPlayoutIsAvailable(bool& available) override; - int32_t SetStereoPlayout(bool enable) override; - int32_t StereoPlayout(bool& enabled) const override; - int32_t StereoRecordingIsAvailable(bool& available) override; - int32_t SetStereoRecording(bool enable) override; - int32_t StereoRecording(bool& enabled) const override; - int32_t SetPlayoutBuffer(const AudioDeviceModule::BufferType type, - uint16_t sizeMS) override; - int32_t CPULoad(uint16_t& load) const override; - bool PlayoutWarning() const override; - bool PlayoutError() const override; - bool RecordingWarning() const override; - bool RecordingError() const override; - void ClearPlayoutWarning() override {} - void ClearPlayoutError() override {} - void ClearRecordingWarning() override {} - void ClearRecordingError() override {} - - // AudioSessionObserver methods. May be called from any thread. - void OnInterruptionBegin() override; - void OnInterruptionEnd() override; - void OnValidRouteChange() override; - void OnCanPlayOrRecordChange(bool can_play_or_record) override; - - // VoiceProcessingAudioUnitObserver methods. - OSStatus OnDeliverRecordedData(AudioUnitRenderActionFlags* flags, - const AudioTimeStamp* time_stamp, - UInt32 bus_number, - UInt32 num_frames, - AudioBufferList* io_data) override; - OSStatus OnGetPlayoutData(AudioUnitRenderActionFlags* flags, - const AudioTimeStamp* time_stamp, - UInt32 bus_number, - UInt32 num_frames, - AudioBufferList* io_data) override; - - // Handles messages from posts. - void OnMessage(rtc::Message *msg) override; - - private: - // Called by the relevant AudioSessionObserver methods on |thread_|. - void HandleInterruptionBegin(); - void HandleInterruptionEnd(); - void HandleValidRouteChange(); - void HandleCanPlayOrRecordChange(bool can_play_or_record); - void HandleSampleRateChange(float sample_rate); - - // Uses current |playout_parameters_| and |record_parameters_| to inform the - // audio device buffer (ADB) about our internal audio parameters. - void UpdateAudioDeviceBuffer(); - - // Since the preferred audio parameters are only hints to the OS, the actual - // values may be different once the AVAudioSession has been activated. - // This method asks for the current hardware parameters and takes actions - // if they should differ from what we have asked for initially. It also - // defines |playout_parameters_| and |record_parameters_|. - void SetupAudioBuffersForActiveAudioSession(); - - // Creates the audio unit. - bool CreateAudioUnit(); - - // Updates the audio unit state based on current state. - void UpdateAudioUnit(bool can_play_or_record); - - // Configures the audio session for WebRTC. - void ConfigureAudioSession(); - // Unconfigures the audio session. - void UnconfigureAudioSession(); - - // Activates our audio session, creates and initializes the voice-processing - // audio unit and verifies that we got the preferred native audio parameters. - bool InitPlayOrRecord(); - - // Closes and deletes the voice-processing I/O unit. - void ShutdownPlayOrRecord(); - - // Ensures that methods are called from the same thread as this object is - // created on. - rtc::ThreadChecker thread_checker_; - // Thread that this object is created on. - rtc::Thread* thread_; - - // Raw pointer handle provided to us in AttachAudioBuffer(). Owned by the - // AudioDeviceModuleImpl class and called by AudioDeviceModule::Create(). - // The AudioDeviceBuffer is a member of the AudioDeviceModuleImpl instance - // and therefore outlives this object. - AudioDeviceBuffer* audio_device_buffer_; - - // Contains audio parameters (sample rate, #channels, buffer size etc.) for - // the playout and recording sides. These structure is set in two steps: - // first, native sample rate and #channels are defined in Init(). Next, the - // audio session is activated and we verify that the preferred parameters - // were granted by the OS. At this stage it is also possible to add a third - // component to the parameters; the native I/O buffer duration. - // A RTC_CHECK will be hit if we for some reason fail to open an audio session - // using the specified parameters. - AudioParameters playout_parameters_; - AudioParameters record_parameters_; - - // The AudioUnit used to play and record audio. - std::unique_ptr audio_unit_; - - // FineAudioBuffer takes an AudioDeviceBuffer which delivers audio data - // in chunks of 10ms. It then allows for this data to be pulled in - // a finer or coarser granularity. I.e. interacting with this class instead - // of directly with the AudioDeviceBuffer one can ask for any number of - // audio data samples. Is also supports a similar scheme for the recording - // side. - // Example: native buffer size can be 128 audio frames at 16kHz sample rate. - // WebRTC will provide 480 audio frames per 10ms but iOS asks for 128 - // in each callback (one every 8ms). This class can then ask for 128 and the - // FineAudioBuffer will ask WebRTC for new data only when needed and also - // cache non-utilized audio between callbacks. On the recording side, iOS - // can provide audio data frames of size 128 and these are accumulated until - // enough data to supply one 10ms call exists. This 10ms chunk is then sent - // to WebRTC and the remaining part is stored. - std::unique_ptr fine_audio_buffer_; - - // Extra audio buffer to be used by the playout side for rendering audio. - // The buffer size is given by FineAudioBuffer::RequiredBufferSizeBytes(). - std::unique_ptr playout_audio_buffer_; - - // Provides a mechanism for encapsulating one or more buffers of audio data. - // Only used on the recording side. - AudioBufferList audio_record_buffer_list_; - - // Temporary storage for recorded data. AudioUnitRender() renders into this - // array as soon as a frame of the desired buffer size has been recorded. - std::unique_ptr record_audio_buffer_; - - // Set to 1 when recording is active and 0 otherwise. - volatile int recording_; - - // Set to 1 when playout is active and 0 otherwise. - volatile int playing_; - - // Set to true after successful call to Init(), false otherwise. - bool initialized_; - - // Set to true after successful call to InitRecording() or InitPlayout(), - // false otherwise. - bool audio_is_initialized_; - - // Set to true if audio session is interrupted, false otherwise. - bool is_interrupted_; - - // Audio interruption observer instance. - RTCAudioSessionDelegateAdapter* audio_session_observer_; - - // Set to true if we've activated the audio session. - bool has_configured_session_; -}; - -} // namespace webrtc - -#endif // WEBRTC_MODULES_AUDIO_DEVICE_IOS_AUDIO_DEVICE_IOS_H_ diff --git a/WebRtc.NET/include/webrtc/modules/audio_device/ios/audio_session_observer.h b/WebRtc.NET/include/webrtc/modules/audio_device/ios/audio_session_observer.h deleted file mode 100644 index def8c232..00000000 --- a/WebRtc.NET/include/webrtc/modules/audio_device/ios/audio_session_observer.h +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright 2016 The WebRTC Project Authors. All rights reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MODULES_AUDIO_DEVICE_IOS_AUDIO_SESSION_OBSERVER_H_ -#define WEBRTC_MODULES_AUDIO_DEVICE_IOS_AUDIO_SESSION_OBSERVER_H_ - -#include "webrtc/base/asyncinvoker.h" -#include "webrtc/base/thread.h" - -namespace webrtc { - -// Observer interface for listening to AVAudioSession events. -class AudioSessionObserver { - public: - // Called when audio session interruption begins. - virtual void OnInterruptionBegin() = 0; - - // Called when audio session interruption ends. - virtual void OnInterruptionEnd() = 0; - - // Called when audio route changes. - virtual void OnValidRouteChange() = 0; - - // Called when the ability to play or record changes. - virtual void OnCanPlayOrRecordChange(bool can_play_or_record) = 0; - - protected: - virtual ~AudioSessionObserver() {} -}; - -} // namespace webrtc - -#endif // WEBRTC_MODULES_AUDIO_DEVICE_IOS_AUDIO_SESSION_OBSERVER_H_ diff --git a/WebRtc.NET/include/webrtc/modules/audio_device/ios/objc/RTCAudioSession.h b/WebRtc.NET/include/webrtc/modules/audio_device/ios/objc/RTCAudioSession.h deleted file mode 100644 index ef5cec46..00000000 --- a/WebRtc.NET/include/webrtc/modules/audio_device/ios/objc/RTCAudioSession.h +++ /dev/null @@ -1,224 +0,0 @@ -/* - * Copyright 2016 The WebRTC Project Authors. All rights reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#import -#import - -#import "WebRTC/RTCMacros.h" - -NS_ASSUME_NONNULL_BEGIN - -extern NSString * const kRTCAudioSessionErrorDomain; -/** Method that requires lock was called without lock. */ -extern NSInteger const kRTCAudioSessionErrorLockRequired; -/** Unknown configuration error occurred. */ -extern NSInteger const kRTCAudioSessionErrorConfiguration; - -@class RTCAudioSession; -@class RTCAudioSessionConfiguration; - -// Surfaces AVAudioSession events. WebRTC will listen directly for notifications -// from AVAudioSession and handle them before calling these delegate methods, -// at which point applications can perform additional processing if required. -RTC_EXPORT -@protocol RTCAudioSessionDelegate - -@optional -/** Called on a system notification thread when AVAudioSession starts an - * interruption event. - */ -- (void)audioSessionDidBeginInterruption:(RTCAudioSession *)session; - -/** Called on a system notification thread when AVAudioSession ends an - * interruption event. - */ -- (void)audioSessionDidEndInterruption:(RTCAudioSession *)session - shouldResumeSession:(BOOL)shouldResumeSession; - -/** Called on a system notification thread when AVAudioSession changes the - * route. - */ -- (void)audioSessionDidChangeRoute:(RTCAudioSession *)session - reason:(AVAudioSessionRouteChangeReason)reason - previousRoute:(AVAudioSessionRouteDescription *)previousRoute; - -/** Called on a system notification thread when AVAudioSession media server - * terminates. - */ -- (void)audioSessionMediaServicesWereLost:(RTCAudioSession *)session; - -/** Called on a system notification thread when AVAudioSession media server - * restarts. - */ -- (void)audioSessionMediaServicesWereReset:(RTCAudioSession *)session; - -// TODO(tkchin): Maybe handle SilenceSecondaryAudioHintNotification. - -- (void)audioSession:(RTCAudioSession *)session - didChangeCanPlayOrRecord:(BOOL)canPlayOrRecord; - -/** Called on a WebRTC thread when the audio device is notified to begin - * playback or recording. - */ -- (void)audioSessionDidStartPlayOrRecord:(RTCAudioSession *)session; - -/** Called on a WebRTC thread when the audio device is notified to stop - * playback or recording. - */ -- (void)audioSessionDidStopPlayOrRecord:(RTCAudioSession *)session; - -@end - -/** Proxy class for AVAudioSession that adds a locking mechanism similar to - * AVCaptureDevice. This is used to that interleaving configurations between - * WebRTC and the application layer are avoided. - * - * RTCAudioSession also coordinates activation so that the audio session is - * activated only once. See |setActive:error:|. - */ -RTC_EXPORT -@interface RTCAudioSession : NSObject - -/** Convenience property to access the AVAudioSession singleton. Callers should - * not call setters on AVAudioSession directly, but other method invocations - * are fine. - */ -@property(nonatomic, readonly) AVAudioSession *session; - -/** Our best guess at whether the session is active based on results of calls to - * AVAudioSession. - */ -@property(nonatomic, readonly) BOOL isActive; -/** Whether RTCAudioSession is currently locked for configuration. */ -@property(nonatomic, readonly) BOOL isLocked; - -/** If YES, WebRTC will not initialize the audio unit automatically when an - * audio track is ready for playout or recording. Instead, applications should - * call setIsAudioEnabled. If NO, WebRTC will initialize the audio unit - * as soon as an audio track is ready for playout or recording. - */ -@property(nonatomic, assign) BOOL useManualAudio; - -/** This property is only effective if useManualAudio is YES. - * Represents permission for WebRTC to initialize the VoIP audio unit. - * When set to NO, if the VoIP audio unit used by WebRTC is active, it will be - * stopped and uninitialized. This will stop incoming and outgoing audio. - * When set to YES, WebRTC will initialize and start the audio unit when it is - * needed (e.g. due to establishing an audio connection). - * This property was introduced to work around an issue where if an AVPlayer is - * playing audio while the VoIP audio unit is initialized, its audio would be - * either cut off completely or played at a reduced volume. By preventing - * the audio unit from being initialized until after the audio has completed, - * we are able to prevent the abrupt cutoff. - */ -@property(nonatomic, assign) BOOL isAudioEnabled; - -// Proxy properties. -@property(readonly) NSString *category; -@property(readonly) AVAudioSessionCategoryOptions categoryOptions; -@property(readonly) NSString *mode; -@property(readonly) BOOL secondaryAudioShouldBeSilencedHint; -@property(readonly) AVAudioSessionRouteDescription *currentRoute; -@property(readonly) NSInteger maximumInputNumberOfChannels; -@property(readonly) NSInteger maximumOutputNumberOfChannels; -@property(readonly) float inputGain; -@property(readonly) BOOL inputGainSettable; -@property(readonly) BOOL inputAvailable; -@property(readonly, nullable) - NSArray * inputDataSources; -@property(readonly, nullable) - AVAudioSessionDataSourceDescription *inputDataSource; -@property(readonly, nullable) - NSArray * outputDataSources; -@property(readonly, nullable) - AVAudioSessionDataSourceDescription *outputDataSource; -@property(readonly) double sampleRate; -@property(readonly) double preferredSampleRate; -@property(readonly) NSInteger inputNumberOfChannels; -@property(readonly) NSInteger outputNumberOfChannels; -@property(readonly) float outputVolume; -@property(readonly) NSTimeInterval inputLatency; -@property(readonly) NSTimeInterval outputLatency; -@property(readonly) NSTimeInterval IOBufferDuration; -@property(readonly) NSTimeInterval preferredIOBufferDuration; - -/** Default constructor. */ -+ (instancetype)sharedInstance; -- (instancetype)init NS_UNAVAILABLE; - -/** Adds a delegate, which is held weakly. */ -- (void)addDelegate:(id)delegate; -/** Removes an added delegate. */ -- (void)removeDelegate:(id)delegate; - -/** Request exclusive access to the audio session for configuration. This call - * will block if the lock is held by another object. - */ -- (void)lockForConfiguration; -/** Relinquishes exclusive access to the audio session. */ -- (void)unlockForConfiguration; - -/** If |active|, activates the audio session if it isn't already active. - * Successful calls must be balanced with a setActive:NO when activation is no - * longer required. If not |active|, deactivates the audio session if one is - * active and this is the last balanced call. When deactivating, the - * AVAudioSessionSetActiveOptionNotifyOthersOnDeactivation option is passed to - * AVAudioSession. - */ -- (BOOL)setActive:(BOOL)active - error:(NSError **)outError; - -// The following methods are proxies for the associated methods on -// AVAudioSession. |lockForConfiguration| must be called before using them -// otherwise they will fail with kRTCAudioSessionErrorLockRequired. - -- (BOOL)setCategory:(NSString *)category - withOptions:(AVAudioSessionCategoryOptions)options - error:(NSError **)outError; -- (BOOL)setMode:(NSString *)mode error:(NSError **)outError; -- (BOOL)setInputGain:(float)gain error:(NSError **)outError; -- (BOOL)setPreferredSampleRate:(double)sampleRate error:(NSError **)outError; -- (BOOL)setPreferredIOBufferDuration:(NSTimeInterval)duration - error:(NSError **)outError; -- (BOOL)setPreferredInputNumberOfChannels:(NSInteger)count - error:(NSError **)outError; -- (BOOL)setPreferredOutputNumberOfChannels:(NSInteger)count - error:(NSError **)outError; -- (BOOL)overrideOutputAudioPort:(AVAudioSessionPortOverride)portOverride - error:(NSError **)outError; -- (BOOL)setPreferredInput:(AVAudioSessionPortDescription *)inPort - error:(NSError **)outError; -- (BOOL)setInputDataSource:(AVAudioSessionDataSourceDescription *)dataSource - error:(NSError **)outError; -- (BOOL)setOutputDataSource:(AVAudioSessionDataSourceDescription *)dataSource - error:(NSError **)outError; - -@end - -@interface RTCAudioSession (Configuration) - -/** Applies the configuration to the current session. Attempts to set all - * properties even if previous ones fail. Only the last error will be - * returned. - * |lockForConfiguration| must be called first. - */ -- (BOOL)setConfiguration:(RTCAudioSessionConfiguration *)configuration - error:(NSError **)outError; - -/** Convenience method that calls both setConfiguration and setActive. - * |lockForConfiguration| must be called first. - */ -- (BOOL)setConfiguration:(RTCAudioSessionConfiguration *)configuration - active:(BOOL)active - error:(NSError **)outError; - -@end - -NS_ASSUME_NONNULL_END diff --git a/WebRtc.NET/include/webrtc/modules/audio_device/ios/voice_processing_audio_unit.h b/WebRtc.NET/include/webrtc/modules/audio_device/ios/voice_processing_audio_unit.h deleted file mode 100644 index 2f881e77..00000000 --- a/WebRtc.NET/include/webrtc/modules/audio_device/ios/voice_processing_audio_unit.h +++ /dev/null @@ -1,137 +0,0 @@ -/* - * Copyright 2016 The WebRTC Project Authors. All rights reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MODULES_AUDIO_DEVICE_IOS_VOICE_PROCESSING_AUDIO_UNIT_H_ -#define WEBRTC_MODULES_AUDIO_DEVICE_IOS_VOICE_PROCESSING_AUDIO_UNIT_H_ - -#include - -namespace webrtc { - -class VoiceProcessingAudioUnitObserver { - public: - // Callback function called on a real-time priority I/O thread from the audio - // unit. This method is used to signal that recorded audio is available. - virtual OSStatus OnDeliverRecordedData(AudioUnitRenderActionFlags* flags, - const AudioTimeStamp* time_stamp, - UInt32 bus_number, - UInt32 num_frames, - AudioBufferList* io_data) = 0; - - // Callback function called on a real-time priority I/O thread from the audio - // unit. This method is used to provide audio samples to the audio unit. - virtual OSStatus OnGetPlayoutData(AudioUnitRenderActionFlags* io_action_flags, - const AudioTimeStamp* time_stamp, - UInt32 bus_number, - UInt32 num_frames, - AudioBufferList* io_data) = 0; - - protected: - ~VoiceProcessingAudioUnitObserver() {} -}; - -// Convenience class to abstract away the management of a Voice Processing -// I/O Audio Unit. The Voice Processing I/O unit has the same characteristics -// as the Remote I/O unit (supports full duplex low-latency audio input and -// output) and adds AEC for for two-way duplex communication. It also adds AGC, -// adjustment of voice-processing quality, and muting. Hence, ideal for -// VoIP applications. -class VoiceProcessingAudioUnit { - public: - explicit VoiceProcessingAudioUnit(VoiceProcessingAudioUnitObserver* observer); - ~VoiceProcessingAudioUnit(); - - // TODO(tkchin): enum for state and state checking. - enum State : int32_t { - // Init() should be called. - kInitRequired, - // Audio unit created but not initialized. - kUninitialized, - // Initialized but not started. Equivalent to stopped. - kInitialized, - // Initialized and started. - kStarted, - }; - - // Number of bytes per audio sample for 16-bit signed integer representation. - static const UInt32 kBytesPerSample; - - // Initializes this class by creating the underlying audio unit instance. - // Creates a Voice-Processing I/O unit and configures it for full-duplex - // audio. The selected stream format is selected to avoid internal resampling - // and to match the 10ms callback rate for WebRTC as well as possible. - // Does not intialize the audio unit. - bool Init(); - - VoiceProcessingAudioUnit::State GetState() const; - - // Initializes the underlying audio unit with the given sample rate. - bool Initialize(Float64 sample_rate); - - // Starts the underlying audio unit. - bool Start(); - - // Stops the underlying audio unit. - bool Stop(); - - // Uninitializes the underlying audio unit. - bool Uninitialize(); - - // Calls render on the underlying audio unit. - OSStatus Render(AudioUnitRenderActionFlags* flags, - const AudioTimeStamp* time_stamp, - UInt32 output_bus_number, - UInt32 num_frames, - AudioBufferList* io_data); - - private: - // The C API used to set callbacks requires static functions. When these are - // called, they will invoke the relevant instance method by casting - // in_ref_con to VoiceProcessingAudioUnit*. - static OSStatus OnGetPlayoutData(void* in_ref_con, - AudioUnitRenderActionFlags* flags, - const AudioTimeStamp* time_stamp, - UInt32 bus_number, - UInt32 num_frames, - AudioBufferList* io_data); - static OSStatus OnDeliverRecordedData(void* in_ref_con, - AudioUnitRenderActionFlags* flags, - const AudioTimeStamp* time_stamp, - UInt32 bus_number, - UInt32 num_frames, - AudioBufferList* io_data); - - // Notifies observer that samples are needed for playback. - OSStatus NotifyGetPlayoutData(AudioUnitRenderActionFlags* flags, - const AudioTimeStamp* time_stamp, - UInt32 bus_number, - UInt32 num_frames, - AudioBufferList* io_data); - // Notifies observer that recorded samples are available for render. - OSStatus NotifyDeliverRecordedData(AudioUnitRenderActionFlags* flags, - const AudioTimeStamp* time_stamp, - UInt32 bus_number, - UInt32 num_frames, - AudioBufferList* io_data); - - // Returns the predetermined format with a specific sample rate. See - // implementation file for details on format. - AudioStreamBasicDescription GetFormat(Float64 sample_rate) const; - - // Deletes the underlying audio unit. - void DisposeAudioUnit(); - - VoiceProcessingAudioUnitObserver* observer_; - AudioUnit vpio_unit_; - VoiceProcessingAudioUnit::State state_; -}; -} // namespace webrtc - -#endif // WEBRTC_MODULES_AUDIO_DEVICE_IOS_VOICE_PROCESSING_AUDIO_UNIT_H_ diff --git a/WebRtc.NET/include/webrtc/modules/audio_device/linux/alsasymboltable_linux.h b/WebRtc.NET/include/webrtc/modules/audio_device/linux/alsasymboltable_linux.h deleted file mode 100644 index 82690c50..00000000 --- a/WebRtc.NET/include/webrtc/modules/audio_device/linux/alsasymboltable_linux.h +++ /dev/null @@ -1,147 +0,0 @@ -/* - * libjingle - * Copyright 2004--2010, Google Inc. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * 3. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO - * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; - * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR - * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF - * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef WEBRTC_AUDIO_DEVICE_ALSASYMBOLTABLE_LINUX_H -#define WEBRTC_AUDIO_DEVICE_ALSASYMBOLTABLE_LINUX_H - -#include "webrtc/modules/audio_device/linux/latebindingsymboltable_linux.h" - -namespace webrtc_adm_linux_alsa { - -// The ALSA symbols we need, as an X-Macro list. -// This list must contain precisely every libasound function that is used in -// alsasoundsystem.cc. -#define ALSA_SYMBOLS_LIST \ - X(snd_device_name_free_hint) \ - X(snd_device_name_get_hint) \ - X(snd_device_name_hint) \ - X(snd_pcm_avail_update) \ - X(snd_pcm_close) \ - X(snd_pcm_delay) \ - X(snd_pcm_drop) \ - X(snd_pcm_open) \ - X(snd_pcm_prepare) \ - X(snd_pcm_readi) \ - X(snd_pcm_recover) \ - X(snd_pcm_resume) \ - X(snd_pcm_reset) \ - X(snd_pcm_state) \ - X(snd_pcm_set_params) \ - X(snd_pcm_get_params) \ - X(snd_pcm_start) \ - X(snd_pcm_stream) \ - X(snd_pcm_frames_to_bytes) \ - X(snd_pcm_bytes_to_frames) \ - X(snd_pcm_wait) \ - X(snd_pcm_writei) \ - X(snd_pcm_info_get_class) \ - X(snd_pcm_info_get_subdevices_avail) \ - X(snd_pcm_info_get_subdevice_name) \ - X(snd_pcm_info_set_subdevice) \ - X(snd_pcm_info_get_id) \ - X(snd_pcm_info_set_device) \ - X(snd_pcm_info_set_stream) \ - X(snd_pcm_info_get_name) \ - X(snd_pcm_info_get_subdevices_count) \ - X(snd_pcm_info_sizeof) \ - X(snd_pcm_hw_params) \ - X(snd_pcm_hw_params_malloc) \ - X(snd_pcm_hw_params_free) \ - X(snd_pcm_hw_params_any) \ - X(snd_pcm_hw_params_set_access) \ - X(snd_pcm_hw_params_set_format) \ - X(snd_pcm_hw_params_set_channels) \ - X(snd_pcm_hw_params_set_rate_near) \ - X(snd_pcm_hw_params_set_buffer_size_near) \ - X(snd_card_next) \ - X(snd_card_get_name) \ - X(snd_config_update) \ - X(snd_config_copy) \ - X(snd_config_get_id) \ - X(snd_ctl_open) \ - X(snd_ctl_close) \ - X(snd_ctl_card_info) \ - X(snd_ctl_card_info_sizeof) \ - X(snd_ctl_card_info_get_id) \ - X(snd_ctl_card_info_get_name) \ - X(snd_ctl_pcm_next_device) \ - X(snd_ctl_pcm_info) \ - X(snd_mixer_load) \ - X(snd_mixer_free) \ - X(snd_mixer_detach) \ - X(snd_mixer_close) \ - X(snd_mixer_open) \ - X(snd_mixer_attach) \ - X(snd_mixer_first_elem) \ - X(snd_mixer_elem_next) \ - X(snd_mixer_selem_get_name) \ - X(snd_mixer_selem_is_active) \ - X(snd_mixer_selem_register) \ - X(snd_mixer_selem_set_playback_volume_all) \ - X(snd_mixer_selem_get_playback_volume) \ - X(snd_mixer_selem_has_playback_volume) \ - X(snd_mixer_selem_get_playback_volume_range) \ - X(snd_mixer_selem_has_playback_switch) \ - X(snd_mixer_selem_get_playback_switch) \ - X(snd_mixer_selem_set_playback_switch_all) \ - X(snd_mixer_selem_has_capture_switch) \ - X(snd_mixer_selem_get_capture_switch) \ - X(snd_mixer_selem_set_capture_switch_all) \ - X(snd_mixer_selem_has_capture_volume) \ - X(snd_mixer_selem_set_capture_volume_all) \ - X(snd_mixer_selem_get_capture_volume) \ - X(snd_mixer_selem_get_capture_volume_range) \ - X(snd_dlopen) \ - X(snd_dlclose) \ - X(snd_config) \ - X(snd_config_search) \ - X(snd_config_get_string) \ - X(snd_config_search_definition) \ - X(snd_config_get_type) \ - X(snd_config_delete) \ - X(snd_config_iterator_entry) \ - X(snd_config_iterator_first) \ - X(snd_config_iterator_next) \ - X(snd_config_iterator_end) \ - X(snd_config_delete_compound_members) \ - X(snd_config_get_integer) \ - X(snd_config_get_bool) \ - X(snd_dlsym) \ - X(snd_strerror) \ - X(snd_lib_error) \ - X(snd_lib_error_set_handler) - -LATE_BINDING_SYMBOL_TABLE_DECLARE_BEGIN(AlsaSymbolTable) -#define X(sym) \ - LATE_BINDING_SYMBOL_TABLE_DECLARE_ENTRY(AlsaSymbolTable, sym) -ALSA_SYMBOLS_LIST -#undef X -LATE_BINDING_SYMBOL_TABLE_DECLARE_END(AlsaSymbolTable) - -} // namespace webrtc_adm_linux_alsa - -#endif // WEBRTC_AUDIO_DEVICE_ALSASYMBOLTABLE_LINUX_H diff --git a/WebRtc.NET/include/webrtc/modules/audio_device/linux/audio_device_alsa_linux.h b/WebRtc.NET/include/webrtc/modules/audio_device/linux/audio_device_alsa_linux.h deleted file mode 100644 index aba62e86..00000000 --- a/WebRtc.NET/include/webrtc/modules/audio_device/linux/audio_device_alsa_linux.h +++ /dev/null @@ -1,256 +0,0 @@ -/* - * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_AUDIO_DEVICE_AUDIO_DEVICE_ALSA_LINUX_H -#define WEBRTC_AUDIO_DEVICE_AUDIO_DEVICE_ALSA_LINUX_H - -#include - -#include "webrtc/base/platform_thread.h" -#include "webrtc/modules/audio_device/audio_device_generic.h" -#include "webrtc/modules/audio_device/linux/audio_mixer_manager_alsa_linux.h" -#include "webrtc/system_wrappers/include/critical_section_wrapper.h" - -#if defined(USE_X11) -#include -#endif -#include -#include -#include - - -namespace webrtc -{ -class EventWrapper; - -class AudioDeviceLinuxALSA : public AudioDeviceGeneric -{ -public: - AudioDeviceLinuxALSA(const int32_t id); - virtual ~AudioDeviceLinuxALSA(); - - // Retrieve the currently utilized audio layer - int32_t ActiveAudioLayer( - AudioDeviceModule::AudioLayer& audioLayer) const override; - - // Main initializaton and termination - InitStatus Init() override; - int32_t Terminate() override; - bool Initialized() const override; - - // Device enumeration - int16_t PlayoutDevices() override; - int16_t RecordingDevices() override; - int32_t PlayoutDeviceName(uint16_t index, - char name[kAdmMaxDeviceNameSize], - char guid[kAdmMaxGuidSize]) override; - int32_t RecordingDeviceName(uint16_t index, - char name[kAdmMaxDeviceNameSize], - char guid[kAdmMaxGuidSize]) override; - - // Device selection - int32_t SetPlayoutDevice(uint16_t index) override; - int32_t SetPlayoutDevice( - AudioDeviceModule::WindowsDeviceType device) override; - int32_t SetRecordingDevice(uint16_t index) override; - int32_t SetRecordingDevice( - AudioDeviceModule::WindowsDeviceType device) override; - - // Audio transport initialization - int32_t PlayoutIsAvailable(bool& available) override; - int32_t InitPlayout() override; - bool PlayoutIsInitialized() const override; - int32_t RecordingIsAvailable(bool& available) override; - int32_t InitRecording() override; - bool RecordingIsInitialized() const override; - - // Audio transport control - int32_t StartPlayout() override; - int32_t StopPlayout() override; - bool Playing() const override; - int32_t StartRecording() override; - int32_t StopRecording() override; - bool Recording() const override; - - // Microphone Automatic Gain Control (AGC) - int32_t SetAGC(bool enable) override; - bool AGC() const override; - - // Volume control based on the Windows Wave API (Windows only) - int32_t SetWaveOutVolume(uint16_t volumeLeft, - uint16_t volumeRight) override; - int32_t WaveOutVolume(uint16_t& volumeLeft, - uint16_t& volumeRight) const override; - - // Audio mixer initialization - int32_t InitSpeaker() override; - bool SpeakerIsInitialized() const override; - int32_t InitMicrophone() override; - bool MicrophoneIsInitialized() const override; - - // Speaker volume controls - int32_t SpeakerVolumeIsAvailable(bool& available) override; - int32_t SetSpeakerVolume(uint32_t volume) override; - int32_t SpeakerVolume(uint32_t& volume) const override; - int32_t MaxSpeakerVolume(uint32_t& maxVolume) const override; - int32_t MinSpeakerVolume(uint32_t& minVolume) const override; - int32_t SpeakerVolumeStepSize(uint16_t& stepSize) const override; - - // Microphone volume controls - int32_t MicrophoneVolumeIsAvailable(bool& available) override; - int32_t SetMicrophoneVolume(uint32_t volume) override; - int32_t MicrophoneVolume(uint32_t& volume) const override; - int32_t MaxMicrophoneVolume(uint32_t& maxVolume) const override; - int32_t MinMicrophoneVolume(uint32_t& minVolume) const override; - int32_t MicrophoneVolumeStepSize(uint16_t& stepSize) const override; - - // Speaker mute control - int32_t SpeakerMuteIsAvailable(bool& available) override; - int32_t SetSpeakerMute(bool enable) override; - int32_t SpeakerMute(bool& enabled) const override; - - // Microphone mute control - int32_t MicrophoneMuteIsAvailable(bool& available) override; - int32_t SetMicrophoneMute(bool enable) override; - int32_t MicrophoneMute(bool& enabled) const override; - - // Microphone boost control - int32_t MicrophoneBoostIsAvailable(bool& available) override; - int32_t SetMicrophoneBoost(bool enable) override; - int32_t MicrophoneBoost(bool& enabled) const override; - - // Stereo support - int32_t StereoPlayoutIsAvailable(bool& available) override; - int32_t SetStereoPlayout(bool enable) override; - int32_t StereoPlayout(bool& enabled) const override; - int32_t StereoRecordingIsAvailable(bool& available) override; - int32_t SetStereoRecording(bool enable) override; - int32_t StereoRecording(bool& enabled) const override; - - // Delay information and control - int32_t SetPlayoutBuffer(const AudioDeviceModule::BufferType type, - uint16_t sizeMS) override; - int32_t PlayoutBuffer(AudioDeviceModule::BufferType& type, - uint16_t& sizeMS) const override; - int32_t PlayoutDelay(uint16_t& delayMS) const override; - int32_t RecordingDelay(uint16_t& delayMS) const override; - - // CPU load - int32_t CPULoad(uint16_t& load) const override; - -public: - bool PlayoutWarning() const override; - bool PlayoutError() const override; - bool RecordingWarning() const override; - bool RecordingError() const override; - void ClearPlayoutWarning() override; - void ClearPlayoutError() override; - void ClearRecordingWarning() override; - void ClearRecordingError() override; - -public: - void AttachAudioBuffer(AudioDeviceBuffer* audioBuffer) override; - -private: - int32_t GetDevicesInfo(const int32_t function, - const bool playback, - const int32_t enumDeviceNo = 0, - char* enumDeviceName = NULL, - const int32_t ednLen = 0) const; - int32_t ErrorRecovery(int32_t error, snd_pcm_t* deviceHandle); - -private: - bool KeyPressed() const; - -private: - void Lock() EXCLUSIVE_LOCK_FUNCTION(_critSect) { _critSect.Enter(); }; - void UnLock() UNLOCK_FUNCTION(_critSect) { _critSect.Leave(); }; -private: - inline int32_t InputSanityCheckAfterUnlockedPeriod() const; - inline int32_t OutputSanityCheckAfterUnlockedPeriod() const; - -private: - static bool RecThreadFunc(void*); - static bool PlayThreadFunc(void*); - bool RecThreadProcess(); - bool PlayThreadProcess(); - -private: - AudioDeviceBuffer* _ptrAudioBuffer; - - CriticalSectionWrapper& _critSect; - - // TODO(pbos): Make plain members and start/stop instead of resetting these - // pointers. A thread can be reused. - std::unique_ptr _ptrThreadRec; - std::unique_ptr _ptrThreadPlay; - - int32_t _id; - - AudioMixerManagerLinuxALSA _mixerManager; - - uint16_t _inputDeviceIndex; - uint16_t _outputDeviceIndex; - bool _inputDeviceIsSpecified; - bool _outputDeviceIsSpecified; - - snd_pcm_t* _handleRecord; - snd_pcm_t* _handlePlayout; - - snd_pcm_uframes_t _recordingBuffersizeInFrame; - snd_pcm_uframes_t _recordingPeriodSizeInFrame; - snd_pcm_uframes_t _playoutBufferSizeInFrame; - snd_pcm_uframes_t _playoutPeriodSizeInFrame; - - ssize_t _recordingBufferSizeIn10MS; - ssize_t _playoutBufferSizeIn10MS; - uint32_t _recordingFramesIn10MS; - uint32_t _playoutFramesIn10MS; - - uint32_t _recordingFreq; - uint32_t _playoutFreq; - uint8_t _recChannels; - uint8_t _playChannels; - - int8_t* _recordingBuffer; // in byte - int8_t* _playoutBuffer; // in byte - uint32_t _recordingFramesLeft; - uint32_t _playoutFramesLeft; - - AudioDeviceModule::BufferType _playBufType; - -private: - bool _initialized; - bool _recording; - bool _playing; - bool _recIsInitialized; - bool _playIsInitialized; - bool _AGC; - - snd_pcm_sframes_t _recordingDelay; - snd_pcm_sframes_t _playoutDelay; - - uint16_t _playWarning; - uint16_t _playError; - uint16_t _recWarning; - uint16_t _recError; - - uint16_t _playBufDelay; // playback delay - uint16_t _playBufDelayFixed; // fixed playback delay - - char _oldKeyState[32]; -#if defined(USE_X11) - Display* _XDisplay; -#endif -}; - -} - -#endif // MODULES_AUDIO_DEVICE_MAIN_SOURCE_LINUX_AUDIO_DEVICE_ALSA_LINUX_H_ diff --git a/WebRtc.NET/include/webrtc/modules/audio_device/linux/audio_device_pulse_linux.h b/WebRtc.NET/include/webrtc/modules/audio_device/linux/audio_device_pulse_linux.h deleted file mode 100644 index 3aa16980..00000000 --- a/WebRtc.NET/include/webrtc/modules/audio_device/linux/audio_device_pulse_linux.h +++ /dev/null @@ -1,378 +0,0 @@ -/* - * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_AUDIO_DEVICE_AUDIO_DEVICE_PULSE_LINUX_H -#define WEBRTC_AUDIO_DEVICE_AUDIO_DEVICE_PULSE_LINUX_H - -#include - -#include "webrtc/base/platform_thread.h" -#include "webrtc/base/thread_checker.h" -#include "webrtc/modules/audio_device/audio_device_generic.h" -#include "webrtc/modules/audio_device/linux/audio_mixer_manager_pulse_linux.h" -#include "webrtc/system_wrappers/include/critical_section_wrapper.h" - -#include -#include - -// We define this flag if it's missing from our headers, because we want to be -// able to compile against old headers but still use PA_STREAM_ADJUST_LATENCY -// if run against a recent version of the library. -#ifndef PA_STREAM_ADJUST_LATENCY -#define PA_STREAM_ADJUST_LATENCY 0x2000U -#endif -#ifndef PA_STREAM_START_MUTED -#define PA_STREAM_START_MUTED 0x1000U -#endif - -// Set this constant to 0 to disable latency reading -const uint32_t WEBRTC_PA_REPORT_LATENCY = 1; - -// Constants from implementation by Tristan Schmelcher [tschmelcher@google.com] - -// First PulseAudio protocol version that supports PA_STREAM_ADJUST_LATENCY. -const uint32_t WEBRTC_PA_ADJUST_LATENCY_PROTOCOL_VERSION = 13; - -// Some timing constants for optimal operation. See -// https://tango.0pointer.de/pipermail/pulseaudio-discuss/2008-January/001170.html -// for a good explanation of some of the factors that go into this. - -// Playback. - -// For playback, there is a round-trip delay to fill the server-side playback -// buffer, so setting too low of a latency is a buffer underflow risk. We will -// automatically increase the latency if a buffer underflow does occur, but we -// also enforce a sane minimum at start-up time. Anything lower would be -// virtually guaranteed to underflow at least once, so there's no point in -// allowing lower latencies. -const uint32_t WEBRTC_PA_PLAYBACK_LATENCY_MINIMUM_MSECS = 20; - -// Every time a playback stream underflows, we will reconfigure it with target -// latency that is greater by this amount. -const uint32_t WEBRTC_PA_PLAYBACK_LATENCY_INCREMENT_MSECS = 20; - -// We also need to configure a suitable request size. Too small and we'd burn -// CPU from the overhead of transfering small amounts of data at once. Too large -// and the amount of data remaining in the buffer right before refilling it -// would be a buffer underflow risk. We set it to half of the buffer size. -const uint32_t WEBRTC_PA_PLAYBACK_REQUEST_FACTOR = 2; - -// Capture. - -// For capture, low latency is not a buffer overflow risk, but it makes us burn -// CPU from the overhead of transfering small amounts of data at once, so we set -// a recommended value that we use for the kLowLatency constant (but if the user -// explicitly requests something lower then we will honour it). -// 1ms takes about 6-7% CPU. 5ms takes about 5%. 10ms takes about 4.x%. -const uint32_t WEBRTC_PA_LOW_CAPTURE_LATENCY_MSECS = 10; - -// There is a round-trip delay to ack the data to the server, so the -// server-side buffer needs extra space to prevent buffer overflow. 20ms is -// sufficient, but there is no penalty to making it bigger, so we make it huge. -// (750ms is libpulse's default value for the _total_ buffer size in the -// kNoLatencyRequirements case.) -const uint32_t WEBRTC_PA_CAPTURE_BUFFER_EXTRA_MSECS = 750; - -const uint32_t WEBRTC_PA_MSECS_PER_SEC = 1000; - -// Init _configuredLatencyRec/Play to this value to disable latency requirements -const int32_t WEBRTC_PA_NO_LATENCY_REQUIREMENTS = -1; - -// Set this const to 1 to account for peeked and used data in latency calculation -const uint32_t WEBRTC_PA_CAPTURE_BUFFER_LATENCY_ADJUSTMENT = 0; - -namespace webrtc -{ -class EventWrapper; - -class AudioDeviceLinuxPulse: public AudioDeviceGeneric -{ -public: - AudioDeviceLinuxPulse(const int32_t id); - virtual ~AudioDeviceLinuxPulse(); - - // Retrieve the currently utilized audio layer - int32_t ActiveAudioLayer( - AudioDeviceModule::AudioLayer& audioLayer) const override; - - // Main initializaton and termination - InitStatus Init() override; - int32_t Terminate() override; - bool Initialized() const override; - - // Device enumeration - int16_t PlayoutDevices() override; - int16_t RecordingDevices() override; - int32_t PlayoutDeviceName(uint16_t index, - char name[kAdmMaxDeviceNameSize], - char guid[kAdmMaxGuidSize]) override; - int32_t RecordingDeviceName(uint16_t index, - char name[kAdmMaxDeviceNameSize], - char guid[kAdmMaxGuidSize]) override; - - // Device selection - int32_t SetPlayoutDevice(uint16_t index) override; - int32_t SetPlayoutDevice( - AudioDeviceModule::WindowsDeviceType device) override; - int32_t SetRecordingDevice(uint16_t index) override; - int32_t SetRecordingDevice( - AudioDeviceModule::WindowsDeviceType device) override; - - // Audio transport initialization - int32_t PlayoutIsAvailable(bool& available) override; - int32_t InitPlayout() override; - bool PlayoutIsInitialized() const override; - int32_t RecordingIsAvailable(bool& available) override; - int32_t InitRecording() override; - bool RecordingIsInitialized() const override; - - // Audio transport control - int32_t StartPlayout() override; - int32_t StopPlayout() override; - bool Playing() const override; - int32_t StartRecording() override; - int32_t StopRecording() override; - bool Recording() const override; - - // Microphone Automatic Gain Control (AGC) - int32_t SetAGC(bool enable) override; - bool AGC() const override; - - // Volume control based on the Windows Wave API (Windows only) - int32_t SetWaveOutVolume(uint16_t volumeLeft, - uint16_t volumeRight) override; - int32_t WaveOutVolume(uint16_t& volumeLeft, - uint16_t& volumeRight) const override; - - // Audio mixer initialization - int32_t InitSpeaker() override; - bool SpeakerIsInitialized() const override; - int32_t InitMicrophone() override; - bool MicrophoneIsInitialized() const override; - - // Speaker volume controls - int32_t SpeakerVolumeIsAvailable(bool& available) override; - int32_t SetSpeakerVolume(uint32_t volume) override; - int32_t SpeakerVolume(uint32_t& volume) const override; - int32_t MaxSpeakerVolume(uint32_t& maxVolume) const override; - int32_t MinSpeakerVolume(uint32_t& minVolume) const override; - int32_t SpeakerVolumeStepSize(uint16_t& stepSize) const override; - - // Microphone volume controls - int32_t MicrophoneVolumeIsAvailable(bool& available) override; - int32_t SetMicrophoneVolume(uint32_t volume) override; - int32_t MicrophoneVolume(uint32_t& volume) const override; - int32_t MaxMicrophoneVolume(uint32_t& maxVolume) const override; - int32_t MinMicrophoneVolume(uint32_t& minVolume) const override; - int32_t MicrophoneVolumeStepSize(uint16_t& stepSize) const override; - - // Speaker mute control - int32_t SpeakerMuteIsAvailable(bool& available) override; - int32_t SetSpeakerMute(bool enable) override; - int32_t SpeakerMute(bool& enabled) const override; - - // Microphone mute control - int32_t MicrophoneMuteIsAvailable(bool& available) override; - int32_t SetMicrophoneMute(bool enable) override; - int32_t MicrophoneMute(bool& enabled) const override; - - // Microphone boost control - int32_t MicrophoneBoostIsAvailable(bool& available) override; - int32_t SetMicrophoneBoost(bool enable) override; - int32_t MicrophoneBoost(bool& enabled) const override; - - // Stereo support - int32_t StereoPlayoutIsAvailable(bool& available) override; - int32_t SetStereoPlayout(bool enable) override; - int32_t StereoPlayout(bool& enabled) const override; - int32_t StereoRecordingIsAvailable(bool& available) override; - int32_t SetStereoRecording(bool enable) override; - int32_t StereoRecording(bool& enabled) const override; - - // Delay information and control - int32_t SetPlayoutBuffer(const AudioDeviceModule::BufferType type, - uint16_t sizeMS) override; - int32_t PlayoutBuffer(AudioDeviceModule::BufferType& type, - uint16_t& sizeMS) const override; - int32_t PlayoutDelay(uint16_t& delayMS) const override; - int32_t RecordingDelay(uint16_t& delayMS) const override; - - // CPU load - int32_t CPULoad(uint16_t& load) const override; - - bool PlayoutWarning() const override; - bool PlayoutError() const override; - bool RecordingWarning() const override; - bool RecordingError() const override; - void ClearPlayoutWarning() override; - void ClearPlayoutError() override; - void ClearRecordingWarning() override; - void ClearRecordingError() override; - - void AttachAudioBuffer(AudioDeviceBuffer* audioBuffer) override; - -private: - void Lock() EXCLUSIVE_LOCK_FUNCTION(_critSect) { - _critSect.Enter(); - } - void UnLock() UNLOCK_FUNCTION(_critSect) { - _critSect.Leave(); - } - void WaitForOperationCompletion(pa_operation* paOperation) const; - void WaitForSuccess(pa_operation* paOperation) const; - - bool KeyPressed() const; - - static void PaContextStateCallback(pa_context *c, void *pThis); - static void PaSinkInfoCallback(pa_context *c, const pa_sink_info *i, - int eol, void *pThis); - static void PaSourceInfoCallback(pa_context *c, const pa_source_info *i, - int eol, void *pThis); - static void PaServerInfoCallback(pa_context *c, const pa_server_info *i, - void *pThis); - static void PaStreamStateCallback(pa_stream *p, void *pThis); - void PaContextStateCallbackHandler(pa_context *c); - void PaSinkInfoCallbackHandler(const pa_sink_info *i, int eol); - void PaSourceInfoCallbackHandler(const pa_source_info *i, int eol); - void PaServerInfoCallbackHandler(const pa_server_info *i); - void PaStreamStateCallbackHandler(pa_stream *p); - - void EnableWriteCallback(); - void DisableWriteCallback(); - static void PaStreamWriteCallback(pa_stream *unused, size_t buffer_space, - void *pThis); - void PaStreamWriteCallbackHandler(size_t buffer_space); - static void PaStreamUnderflowCallback(pa_stream *unused, void *pThis); - void PaStreamUnderflowCallbackHandler(); - void EnableReadCallback(); - void DisableReadCallback(); - static void PaStreamReadCallback(pa_stream *unused1, size_t unused2, - void *pThis); - void PaStreamReadCallbackHandler(); - static void PaStreamOverflowCallback(pa_stream *unused, void *pThis); - void PaStreamOverflowCallbackHandler(); - int32_t LatencyUsecs(pa_stream *stream); - int32_t ReadRecordedData(const void* bufferData, size_t bufferSize); - int32_t ProcessRecordedData(int8_t *bufferData, - uint32_t bufferSizeInSamples, - uint32_t recDelay); - - int32_t CheckPulseAudioVersion(); - int32_t InitSamplingFrequency(); - int32_t GetDefaultDeviceInfo(bool recDevice, char* name, uint16_t& index); - int32_t InitPulseAudio(); - int32_t TerminatePulseAudio(); - - void PaLock(); - void PaUnLock(); - - static bool RecThreadFunc(void*); - static bool PlayThreadFunc(void*); - bool RecThreadProcess(); - bool PlayThreadProcess(); - - AudioDeviceBuffer* _ptrAudioBuffer; - - CriticalSectionWrapper& _critSect; - EventWrapper& _timeEventRec; - EventWrapper& _timeEventPlay; - EventWrapper& _recStartEvent; - EventWrapper& _playStartEvent; - - // TODO(pbos): Remove unique_ptr and use directly without resetting. - std::unique_ptr _ptrThreadPlay; - std::unique_ptr _ptrThreadRec; - int32_t _id; - - AudioMixerManagerLinuxPulse _mixerManager; - - uint16_t _inputDeviceIndex; - uint16_t _outputDeviceIndex; - bool _inputDeviceIsSpecified; - bool _outputDeviceIsSpecified; - - int sample_rate_hz_; - uint8_t _recChannels; - uint8_t _playChannels; - - AudioDeviceModule::BufferType _playBufType; - - // Stores thread ID in constructor. - // We can then use ThreadChecker::CalledOnValidThread() to ensure that - // other methods are called from the same thread. - // Currently only does RTC_DCHECK(thread_checker_.CalledOnValidThread()). - rtc::ThreadChecker thread_checker_; - - bool _initialized; - bool _recording; - bool _playing; - bool _recIsInitialized; - bool _playIsInitialized; - bool _startRec; - bool _stopRec; - bool _startPlay; - bool _stopPlay; - bool _AGC; - bool update_speaker_volume_at_startup_; - - uint16_t _playBufDelayFixed; // fixed playback delay - - uint32_t _sndCardPlayDelay; - uint32_t _sndCardRecDelay; - - int32_t _writeErrors; - uint16_t _playWarning; - uint16_t _playError; - uint16_t _recWarning; - uint16_t _recError; - - uint16_t _deviceIndex; - int16_t _numPlayDevices; - int16_t _numRecDevices; - char* _playDeviceName; - char* _recDeviceName; - char* _playDisplayDeviceName; - char* _recDisplayDeviceName; - char _paServerVersion[32]; - - int8_t* _playBuffer; - size_t _playbackBufferSize; - size_t _playbackBufferUnused; - size_t _tempBufferSpace; - int8_t* _recBuffer; - size_t _recordBufferSize; - size_t _recordBufferUsed; - const void* _tempSampleData; - size_t _tempSampleDataSize; - int32_t _configuredLatencyPlay; - int32_t _configuredLatencyRec; - - // PulseAudio - uint16_t _paDeviceIndex; - bool _paStateChanged; - - pa_threaded_mainloop* _paMainloop; - pa_mainloop_api* _paMainloopApi; - pa_context* _paContext; - - pa_stream* _recStream; - pa_stream* _playStream; - uint32_t _recStreamFlags; - uint32_t _playStreamFlags; - pa_buffer_attr _playBufferAttr; - pa_buffer_attr _recBufferAttr; - - char _oldKeyState[32]; - Display* _XDisplay; -}; - -} - -#endif // MODULES_AUDIO_DEVICE_MAIN_SOURCE_LINUX_AUDIO_DEVICE_PULSE_LINUX_H_ diff --git a/WebRtc.NET/include/webrtc/modules/audio_device/linux/audio_mixer_manager_alsa_linux.h b/WebRtc.NET/include/webrtc/modules/audio_device/linux/audio_mixer_manager_alsa_linux.h deleted file mode 100644 index b8be8c1b..00000000 --- a/WebRtc.NET/include/webrtc/modules/audio_device/linux/audio_mixer_manager_alsa_linux.h +++ /dev/null @@ -1,78 +0,0 @@ -/* - * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_AUDIO_DEVICE_AUDIO_MIXER_MANAGER_ALSA_LINUX_H -#define WEBRTC_AUDIO_DEVICE_AUDIO_MIXER_MANAGER_ALSA_LINUX_H - -#include "webrtc/modules/audio_device/include/audio_device.h" -#include "webrtc/modules/audio_device/linux/alsasymboltable_linux.h" -#include "webrtc/system_wrappers/include/critical_section_wrapper.h" -#include "webrtc/typedefs.h" - -#include - -namespace webrtc -{ - -class AudioMixerManagerLinuxALSA -{ -public: - int32_t OpenSpeaker(char* deviceName); - int32_t OpenMicrophone(char* deviceName); - int32_t SetSpeakerVolume(uint32_t volume); - int32_t SpeakerVolume(uint32_t& volume) const; - int32_t MaxSpeakerVolume(uint32_t& maxVolume) const; - int32_t MinSpeakerVolume(uint32_t& minVolume) const; - int32_t SpeakerVolumeStepSize(uint16_t& stepSize) const; - int32_t SpeakerVolumeIsAvailable(bool& available); - int32_t SpeakerMuteIsAvailable(bool& available); - int32_t SetSpeakerMute(bool enable); - int32_t SpeakerMute(bool& enabled) const; - int32_t MicrophoneMuteIsAvailable(bool& available); - int32_t SetMicrophoneMute(bool enable); - int32_t MicrophoneMute(bool& enabled) const; - int32_t MicrophoneBoostIsAvailable(bool& available); - int32_t SetMicrophoneBoost(bool enable); - int32_t MicrophoneBoost(bool& enabled) const; - int32_t MicrophoneVolumeIsAvailable(bool& available); - int32_t SetMicrophoneVolume(uint32_t volume); - int32_t MicrophoneVolume(uint32_t& volume) const; - int32_t MaxMicrophoneVolume(uint32_t& maxVolume) const; - int32_t MinMicrophoneVolume(uint32_t& minVolume) const; - int32_t MicrophoneVolumeStepSize(uint16_t& stepSize) const; - int32_t Close(); - int32_t CloseSpeaker(); - int32_t CloseMicrophone(); - bool SpeakerIsInitialized() const; - bool MicrophoneIsInitialized() const; - -public: - AudioMixerManagerLinuxALSA(const int32_t id); - ~AudioMixerManagerLinuxALSA(); - -private: - int32_t LoadMicMixerElement() const; - int32_t LoadSpeakerMixerElement() const; - void GetControlName(char *controlName, char* deviceName) const; - -private: - CriticalSectionWrapper& _critSect; - int32_t _id; - mutable snd_mixer_t* _outputMixerHandle; - char _outputMixerStr[kAdmMaxDeviceNameSize]; - mutable snd_mixer_t* _inputMixerHandle; - char _inputMixerStr[kAdmMaxDeviceNameSize]; - mutable snd_mixer_elem_t* _outputMixerElement; - mutable snd_mixer_elem_t* _inputMixerElement; -}; - -} - -#endif // MODULES_AUDIO_DEVICE_MAIN_SOURCE_LINUX_AUDIO_MIXER_MANAGER_ALSA_LINUX_H_ diff --git a/WebRtc.NET/include/webrtc/modules/audio_device/linux/audio_mixer_manager_pulse_linux.h b/WebRtc.NET/include/webrtc/modules/audio_device/linux/audio_mixer_manager_pulse_linux.h deleted file mode 100644 index 025fdc58..00000000 --- a/WebRtc.NET/include/webrtc/modules/audio_device/linux/audio_mixer_manager_pulse_linux.h +++ /dev/null @@ -1,120 +0,0 @@ -/* - * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_AUDIO_DEVICE_AUDIO_MIXER_MANAGER_PULSE_LINUX_H -#define WEBRTC_AUDIO_DEVICE_AUDIO_MIXER_MANAGER_PULSE_LINUX_H - -#include "webrtc/modules/audio_device/include/audio_device.h" -#include "webrtc/modules/audio_device/linux/pulseaudiosymboltable_linux.h" -#include "webrtc/system_wrappers/include/critical_section_wrapper.h" -#include "webrtc/typedefs.h" -#include "webrtc/base/thread_checker.h" - -#include -#include - -#ifndef UINT32_MAX -#define UINT32_MAX ((uint32_t)-1) -#endif - -namespace webrtc -{ - -class AudioMixerManagerLinuxPulse -{ -public: - int32_t SetPlayStream(pa_stream* playStream); - int32_t SetRecStream(pa_stream* recStream); - int32_t OpenSpeaker(uint16_t deviceIndex); - int32_t OpenMicrophone(uint16_t deviceIndex); - int32_t SetSpeakerVolume(uint32_t volume); - int32_t SpeakerVolume(uint32_t& volume) const; - int32_t MaxSpeakerVolume(uint32_t& maxVolume) const; - int32_t MinSpeakerVolume(uint32_t& minVolume) const; - int32_t SpeakerVolumeStepSize(uint16_t& stepSize) const; - int32_t SpeakerVolumeIsAvailable(bool& available); - int32_t SpeakerMuteIsAvailable(bool& available); - int32_t SetSpeakerMute(bool enable); - int32_t StereoPlayoutIsAvailable(bool& available); - int32_t StereoRecordingIsAvailable(bool& available); - int32_t SpeakerMute(bool& enabled) const; - int32_t MicrophoneMuteIsAvailable(bool& available); - int32_t SetMicrophoneMute(bool enable); - int32_t MicrophoneMute(bool& enabled) const; - int32_t MicrophoneBoostIsAvailable(bool& available); - int32_t SetMicrophoneBoost(bool enable); - int32_t MicrophoneBoost(bool& enabled) const; - int32_t MicrophoneVolumeIsAvailable(bool& available); - int32_t SetMicrophoneVolume(uint32_t volume); - int32_t MicrophoneVolume(uint32_t& volume) const; - int32_t MaxMicrophoneVolume(uint32_t& maxVolume) const; - int32_t MinMicrophoneVolume(uint32_t& minVolume) const; - int32_t MicrophoneVolumeStepSize(uint16_t& stepSize) const; - int32_t SetPulseAudioObjects(pa_threaded_mainloop* mainloop, - pa_context* context); - int32_t Close(); - int32_t CloseSpeaker(); - int32_t CloseMicrophone(); - bool SpeakerIsInitialized() const; - bool MicrophoneIsInitialized() const; - -public: - AudioMixerManagerLinuxPulse(const int32_t id); - ~AudioMixerManagerLinuxPulse(); - -private: - static void PaSinkInfoCallback(pa_context *c, const pa_sink_info *i, - int eol, void *pThis); - static void PaSinkInputInfoCallback(pa_context *c, - const pa_sink_input_info *i, int eol, - void *pThis); - static void PaSourceInfoCallback(pa_context *c, const pa_source_info *i, - int eol, void *pThis); - static void - PaSetVolumeCallback(pa_context* /*c*/, int success, void* /*pThis*/); - void PaSinkInfoCallbackHandler(const pa_sink_info *i, int eol); - void PaSinkInputInfoCallbackHandler(const pa_sink_input_info *i, int eol); - void PaSourceInfoCallbackHandler(const pa_source_info *i, int eol); - - void WaitForOperationCompletion(pa_operation* paOperation) const; - - bool GetSinkInputInfo() const; - bool GetSinkInfoByIndex(int device_index)const ; - bool GetSourceInfoByIndex(int device_index) const; - -private: - int32_t _id; - int16_t _paOutputDeviceIndex; - int16_t _paInputDeviceIndex; - - pa_stream* _paPlayStream; - pa_stream* _paRecStream; - - pa_threaded_mainloop* _paMainloop; - pa_context* _paContext; - - mutable uint32_t _paVolume; - mutable uint32_t _paMute; - mutable uint32_t _paVolSteps; - bool _paSpeakerMute; - mutable uint32_t _paSpeakerVolume; - mutable uint8_t _paChannels; - bool _paObjectsSet; - - // Stores thread ID in constructor. - // We can then use ThreadChecker::CalledOnValidThread() to ensure that - // other methods are called from the same thread. - // Currently only does RTC_DCHECK(thread_checker_.CalledOnValidThread()). - rtc::ThreadChecker thread_checker_; -}; - -} - -#endif // MODULES_AUDIO_DEVICE_MAIN_SOURCE_LINUX_AUDIO_MIXER_MANAGER_PULSE_LINUX_H_ diff --git a/WebRtc.NET/include/webrtc/modules/audio_device/linux/latebindingsymboltable_linux.h b/WebRtc.NET/include/webrtc/modules/audio_device/linux/latebindingsymboltable_linux.h deleted file mode 100644 index be2803ce..00000000 --- a/WebRtc.NET/include/webrtc/modules/audio_device/linux/latebindingsymboltable_linux.h +++ /dev/null @@ -1,178 +0,0 @@ -/* - * Copyright (c) 2010 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_AUDIO_DEVICE_LATEBINDINGSYMBOLTABLE_LINUX_H -#define WEBRTC_AUDIO_DEVICE_LATEBINDINGSYMBOLTABLE_LINUX_H - -#include -#include // for NULL -#include - -#include "webrtc/base/constructormagic.h" -#include "webrtc/system_wrappers/include/trace.h" - -// This file provides macros for creating "symbol table" classes to simplify the -// dynamic loading of symbols from DLLs. Currently the implementation only -// supports Linux and pure C symbols. -// See talk/sound/pulseaudiosymboltable.(h|cc) for an example. - -namespace webrtc_adm_linux { - -#ifdef WEBRTC_LINUX -typedef void *DllHandle; - -const DllHandle kInvalidDllHandle = NULL; -#else -#error Not implemented -#endif - -// These are helpers for use only by the class below. -DllHandle InternalLoadDll(const char dll_name[]); - -void InternalUnloadDll(DllHandle handle); - -bool InternalLoadSymbols(DllHandle handle, - int num_symbols, - const char *const symbol_names[], - void *symbols[]); - -template -class LateBindingSymbolTable { - public: - LateBindingSymbolTable() - : handle_(kInvalidDllHandle), - undefined_symbols_(false) { - memset(symbols_, 0, sizeof(symbols_)); - } - - ~LateBindingSymbolTable() { - Unload(); - } - - static int NumSymbols() { - return SYMBOL_TABLE_SIZE; - } - - // We do not use this, but we offer it for theoretical convenience. - static const char *GetSymbolName(int index) { - assert(index < NumSymbols()); - return kSymbolNames[index]; - } - - bool IsLoaded() const { - return handle_ != kInvalidDllHandle; - } - - // Loads the DLL and the symbol table. Returns true iff the DLL and symbol - // table loaded successfully. - bool Load() { - if (IsLoaded()) { - return true; - } - if (undefined_symbols_) { - // We do not attempt to load again because repeated attempts are not - // likely to succeed and DLL loading is costly. - //WEBRTC_TRACE(kTraceError, kTraceAudioDevice, -1, - // "We know there are undefined symbols"); - return false; - } - handle_ = InternalLoadDll(kDllName); - if (!IsLoaded()) { - return false; - } - if (!InternalLoadSymbols(handle_, NumSymbols(), kSymbolNames, symbols_)) { - undefined_symbols_ = true; - Unload(); - return false; - } - return true; - } - - void Unload() { - if (!IsLoaded()) { - return; - } - InternalUnloadDll(handle_); - handle_ = kInvalidDllHandle; - memset(symbols_, 0, sizeof(symbols_)); - } - - // Retrieves the given symbol. NOTE: Recommended to use LATESYM_GET below - // instead of this. - void *GetSymbol(int index) const { - assert(IsLoaded()); - assert(index < NumSymbols()); - return symbols_[index]; - } - - private: - DllHandle handle_; - bool undefined_symbols_; - void *symbols_[SYMBOL_TABLE_SIZE]; - - RTC_DISALLOW_COPY_AND_ASSIGN(LateBindingSymbolTable); -}; - -// This macro must be invoked in a header to declare a symbol table class. -#define LATE_BINDING_SYMBOL_TABLE_DECLARE_BEGIN(ClassName) \ -enum { - -// This macro must be invoked in the header declaration once for each symbol -// (recommended to use an X-Macro to avoid duplication). -// This macro defines an enum with names built from the symbols, which -// essentially creates a hash table in the compiler from symbol names to their -// indices in the symbol table class. -#define LATE_BINDING_SYMBOL_TABLE_DECLARE_ENTRY(ClassName, sym) \ - ClassName##_SYMBOL_TABLE_INDEX_##sym, - -// This macro completes the header declaration. -#define LATE_BINDING_SYMBOL_TABLE_DECLARE_END(ClassName) \ - ClassName##_SYMBOL_TABLE_SIZE \ -}; \ -\ -extern const char ClassName##_kDllName[]; \ -extern const char *const \ - ClassName##_kSymbolNames[ClassName##_SYMBOL_TABLE_SIZE]; \ -\ -typedef ::webrtc_adm_linux::LateBindingSymbolTable \ - ClassName; - -// This macro must be invoked in a .cc file to define a previously-declared -// symbol table class. -#define LATE_BINDING_SYMBOL_TABLE_DEFINE_BEGIN(ClassName, dllName) \ -const char ClassName##_kDllName[] = dllName; \ -const char *const ClassName##_kSymbolNames[ClassName##_SYMBOL_TABLE_SIZE] = { - -// This macro must be invoked in the .cc definition once for each symbol -// (recommended to use an X-Macro to avoid duplication). -// This would have to use the mangled name if we were to ever support C++ -// symbols. -#define LATE_BINDING_SYMBOL_TABLE_DEFINE_ENTRY(ClassName, sym) \ - #sym, - -#define LATE_BINDING_SYMBOL_TABLE_DEFINE_END(ClassName) \ -}; - -// Index of a given symbol in the given symbol table class. -#define LATESYM_INDEXOF(ClassName, sym) \ - (ClassName##_SYMBOL_TABLE_INDEX_##sym) - -// Returns a reference to the given late-binded symbol, with the correct type. -#define LATESYM_GET(ClassName, inst, sym) \ - (*reinterpret_cast( \ - (inst)->GetSymbol(LATESYM_INDEXOF(ClassName, sym)))) - -} // namespace webrtc_adm_linux - -#endif // WEBRTC_ADM_LATEBINDINGSYMBOLTABLE_LINUX_H diff --git a/WebRtc.NET/include/webrtc/modules/audio_device/linux/pulseaudiosymboltable_linux.h b/WebRtc.NET/include/webrtc/modules/audio_device/linux/pulseaudiosymboltable_linux.h deleted file mode 100644 index 7f3ccabe..00000000 --- a/WebRtc.NET/include/webrtc/modules/audio_device/linux/pulseaudiosymboltable_linux.h +++ /dev/null @@ -1,104 +0,0 @@ -/* - * libjingle - * Copyright 2004--2010, Google Inc. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * 3. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO - * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; - * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR - * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF - * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef WEBRTC_AUDIO_DEVICE_PULSEAUDIOSYMBOLTABLE_LINUX_H -#define WEBRTC_AUDIO_DEVICE_PULSEAUDIOSYMBOLTABLE_LINUX_H - -#include "webrtc/modules/audio_device/linux/latebindingsymboltable_linux.h" - -namespace webrtc_adm_linux_pulse { - -// The PulseAudio symbols we need, as an X-Macro list. -// This list must contain precisely every libpulse function that is used in -// the ADM LINUX PULSE Device and Mixer classes -#define PULSE_AUDIO_SYMBOLS_LIST \ - X(pa_bytes_per_second) \ - X(pa_context_connect) \ - X(pa_context_disconnect) \ - X(pa_context_errno) \ - X(pa_context_get_protocol_version) \ - X(pa_context_get_server_info) \ - X(pa_context_get_sink_info_list) \ - X(pa_context_get_sink_info_by_index) \ - X(pa_context_get_sink_info_by_name) \ - X(pa_context_get_sink_input_info) \ - X(pa_context_get_source_info_by_index) \ - X(pa_context_get_source_info_by_name) \ - X(pa_context_get_source_info_list) \ - X(pa_context_get_state) \ - X(pa_context_new) \ - X(pa_context_set_sink_input_volume) \ - X(pa_context_set_sink_input_mute) \ - X(pa_context_set_source_volume_by_index) \ - X(pa_context_set_source_mute_by_index) \ - X(pa_context_set_state_callback) \ - X(pa_context_unref) \ - X(pa_cvolume_set) \ - X(pa_operation_get_state) \ - X(pa_operation_unref) \ - X(pa_stream_connect_playback) \ - X(pa_stream_connect_record) \ - X(pa_stream_disconnect) \ - X(pa_stream_drop) \ - X(pa_stream_get_device_index) \ - X(pa_stream_get_index) \ - X(pa_stream_get_latency) \ - X(pa_stream_get_sample_spec) \ - X(pa_stream_get_state) \ - X(pa_stream_new) \ - X(pa_stream_peek) \ - X(pa_stream_readable_size) \ - X(pa_stream_set_buffer_attr) \ - X(pa_stream_set_overflow_callback) \ - X(pa_stream_set_read_callback) \ - X(pa_stream_set_state_callback) \ - X(pa_stream_set_underflow_callback) \ - X(pa_stream_set_write_callback) \ - X(pa_stream_unref) \ - X(pa_stream_writable_size) \ - X(pa_stream_write) \ - X(pa_strerror) \ - X(pa_threaded_mainloop_free) \ - X(pa_threaded_mainloop_get_api) \ - X(pa_threaded_mainloop_lock) \ - X(pa_threaded_mainloop_new) \ - X(pa_threaded_mainloop_signal) \ - X(pa_threaded_mainloop_start) \ - X(pa_threaded_mainloop_stop) \ - X(pa_threaded_mainloop_unlock) \ - X(pa_threaded_mainloop_wait) - -LATE_BINDING_SYMBOL_TABLE_DECLARE_BEGIN(PulseAudioSymbolTable) -#define X(sym) \ - LATE_BINDING_SYMBOL_TABLE_DECLARE_ENTRY(PulseAudioSymbolTable, sym) -PULSE_AUDIO_SYMBOLS_LIST -#undef X -LATE_BINDING_SYMBOL_TABLE_DECLARE_END(PulseAudioSymbolTable) - -} // namespace webrtc_adm_linux_pulse - -#endif // WEBRTC_AUDIO_DEVICE_PULSEAUDIOSYMBOLTABLE_LINUX_H diff --git a/WebRtc.NET/include/webrtc/modules/audio_device/mac/audio_mixer_manager_mac.h b/WebRtc.NET/include/webrtc/modules/audio_device/mac/audio_mixer_manager_mac.h deleted file mode 100644 index 9cbfe2de..00000000 --- a/WebRtc.NET/include/webrtc/modules/audio_device/mac/audio_mixer_manager_mac.h +++ /dev/null @@ -1,79 +0,0 @@ -/* - * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_AUDIO_DEVICE_AUDIO_MIXER_MANAGER_MAC_H -#define WEBRTC_AUDIO_DEVICE_AUDIO_MIXER_MANAGER_MAC_H - -#include "webrtc/modules/audio_device/include/audio_device.h" -#include "webrtc/system_wrappers/include/critical_section_wrapper.h" -#include "webrtc/typedefs.h" - -#include - -namespace webrtc { - -class AudioMixerManagerMac { - public: - int32_t OpenSpeaker(AudioDeviceID deviceID); - int32_t OpenMicrophone(AudioDeviceID deviceID); - int32_t SetSpeakerVolume(uint32_t volume); - int32_t SpeakerVolume(uint32_t& volume) const; - int32_t MaxSpeakerVolume(uint32_t& maxVolume) const; - int32_t MinSpeakerVolume(uint32_t& minVolume) const; - int32_t SpeakerVolumeStepSize(uint16_t& stepSize) const; - int32_t SpeakerVolumeIsAvailable(bool& available); - int32_t SpeakerMuteIsAvailable(bool& available); - int32_t SetSpeakerMute(bool enable); - int32_t SpeakerMute(bool& enabled) const; - int32_t StereoPlayoutIsAvailable(bool& available); - int32_t StereoRecordingIsAvailable(bool& available); - int32_t MicrophoneMuteIsAvailable(bool& available); - int32_t SetMicrophoneMute(bool enable); - int32_t MicrophoneMute(bool& enabled) const; - int32_t MicrophoneBoostIsAvailable(bool& available); - int32_t SetMicrophoneBoost(bool enable); - int32_t MicrophoneBoost(bool& enabled) const; - int32_t MicrophoneVolumeIsAvailable(bool& available); - int32_t SetMicrophoneVolume(uint32_t volume); - int32_t MicrophoneVolume(uint32_t& volume) const; - int32_t MaxMicrophoneVolume(uint32_t& maxVolume) const; - int32_t MinMicrophoneVolume(uint32_t& minVolume) const; - int32_t MicrophoneVolumeStepSize(uint16_t& stepSize) const; - int32_t Close(); - int32_t CloseSpeaker(); - int32_t CloseMicrophone(); - bool SpeakerIsInitialized() const; - bool MicrophoneIsInitialized() const; - - public: - AudioMixerManagerMac(const int32_t id); - ~AudioMixerManagerMac(); - - private: - static void logCAMsg(const TraceLevel level, - const TraceModule module, - const int32_t id, - const char* msg, - const char* err); - - private: - CriticalSectionWrapper& _critSect; - int32_t _id; - - AudioDeviceID _inputDeviceID; - AudioDeviceID _outputDeviceID; - - uint16_t _noInputChannels; - uint16_t _noOutputChannels; -}; - -} // namespace webrtc - -#endif // AUDIO_MIXER_MAC_H diff --git a/WebRtc.NET/include/webrtc/modules/audio_device/mac/portaudio/pa_memorybarrier.h b/WebRtc.NET/include/webrtc/modules/audio_device/mac/portaudio/pa_memorybarrier.h deleted file mode 100644 index f6896222..00000000 --- a/WebRtc.NET/include/webrtc/modules/audio_device/mac/portaudio/pa_memorybarrier.h +++ /dev/null @@ -1,127 +0,0 @@ -/* - * $Id: pa_memorybarrier.h 1240 2007-07-17 13:05:07Z bjornroche $ - * Portable Audio I/O Library - * Memory barrier utilities - * - * Author: Bjorn Roche, XO Audio, LLC - * - * This program uses the PortAudio Portable Audio Library. - * For more information see: http://www.portaudio.com - * Copyright (c) 1999-2000 Ross Bencina and Phil Burk - * - * Permission is hereby granted, free of charge, to any person obtaining - * a copy of this software and associated documentation files - * (the "Software"), to deal in the Software without restriction, - * including without limitation the rights to use, copy, modify, merge, - * publish, distribute, sublicense, and/or sell copies of the Software, - * and to permit persons to whom the Software is furnished to do so, - * subject to the following conditions: - * - * The above copyright notice and this permission notice shall be - * included in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. - * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF - * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION - * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - -/* - * The text above constitutes the entire PortAudio license; however, - * the PortAudio community also makes the following non-binding requests: - * - * Any person wishing to distribute modifications to the Software is - * requested to send the modifications to the original developer so that - * they can be incorporated into the canonical version. It is also - * requested that these non-binding requests be included along with the - * license above. - */ - -/** - @file pa_memorybarrier.h - @ingroup common_src -*/ - -/**************** - * Some memory barrier primitives based on the system. - * right now only OS X, FreeBSD, and Linux are supported. In addition to providing - * memory barriers, these functions should ensure that data cached in registers - * is written out to cache where it can be snooped by other CPUs. (ie, the volatile - * keyword should not be required) - * - * the primitives that must be defined are: - * - * PaUtil_FullMemoryBarrier() - * PaUtil_ReadMemoryBarrier() - * PaUtil_WriteMemoryBarrier() - * - ****************/ - -#if defined(__APPLE__) -# include - /* Here are the memory barrier functions. Mac OS X only provides - full memory barriers, so the three types of barriers are the same, - however, these barriers are superior to compiler-based ones. */ -# define PaUtil_FullMemoryBarrier() OSMemoryBarrier() -# define PaUtil_ReadMemoryBarrier() OSMemoryBarrier() -# define PaUtil_WriteMemoryBarrier() OSMemoryBarrier() -#elif defined(__GNUC__) - /* GCC >= 4.1 has built-in intrinsics. We'll use those */ -# if (__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 1) -# define PaUtil_FullMemoryBarrier() __sync_synchronize() -# define PaUtil_ReadMemoryBarrier() __sync_synchronize() -# define PaUtil_WriteMemoryBarrier() __sync_synchronize() - /* as a fallback, GCC understands volatile asm and "memory" to mean it - * should not reorder memory read/writes */ - /* Note that it is not clear that any compiler actually defines __PPC__, - * it can probably removed safely. */ -# elif defined( __ppc__ ) || defined( __powerpc__) || defined( __PPC__ ) -# define PaUtil_FullMemoryBarrier() asm volatile("sync":::"memory") -# define PaUtil_ReadMemoryBarrier() asm volatile("sync":::"memory") -# define PaUtil_WriteMemoryBarrier() asm volatile("sync":::"memory") -# elif defined( __i386__ ) || defined( __i486__ ) || defined( __i586__ ) || \ - defined( __i686__ ) || defined( __x86_64__ ) -# define PaUtil_FullMemoryBarrier() asm volatile("mfence":::"memory") -# define PaUtil_ReadMemoryBarrier() asm volatile("lfence":::"memory") -# define PaUtil_WriteMemoryBarrier() asm volatile("sfence":::"memory") -# else -# ifdef ALLOW_SMP_DANGERS -# warning Memory barriers not defined on this system or system unknown -# warning For SMP safety, you should fix this. -# define PaUtil_FullMemoryBarrier() -# define PaUtil_ReadMemoryBarrier() -# define PaUtil_WriteMemoryBarrier() -# else -# error Memory barriers are not defined on this system. You can still compile by defining ALLOW_SMP_DANGERS, but SMP safety will not be guaranteed. -# endif -# endif -#elif (_MSC_VER >= 1400) && !defined(_WIN32_WCE) -# include -# pragma intrinsic(_ReadWriteBarrier) -# pragma intrinsic(_ReadBarrier) -# pragma intrinsic(_WriteBarrier) -# define PaUtil_FullMemoryBarrier() _ReadWriteBarrier() -# define PaUtil_ReadMemoryBarrier() _ReadBarrier() -# define PaUtil_WriteMemoryBarrier() _WriteBarrier() -#elif defined(_WIN32_WCE) -# define PaUtil_FullMemoryBarrier() -# define PaUtil_ReadMemoryBarrier() -# define PaUtil_WriteMemoryBarrier() -#elif defined(_MSC_VER) || defined(__BORLANDC__) -# define PaUtil_FullMemoryBarrier() _asm { lock add [esp], 0 } -# define PaUtil_ReadMemoryBarrier() _asm { lock add [esp], 0 } -# define PaUtil_WriteMemoryBarrier() _asm { lock add [esp], 0 } -#else -# ifdef ALLOW_SMP_DANGERS -# warning Memory barriers not defined on this system or system unknown -# warning For SMP safety, you should fix this. -# define PaUtil_FullMemoryBarrier() -# define PaUtil_ReadMemoryBarrier() -# define PaUtil_WriteMemoryBarrier() -# else -# error Memory barriers are not defined on this system. You can still compile by defining ALLOW_SMP_DANGERS, but SMP safety will not be guaranteed. -# endif -#endif diff --git a/WebRtc.NET/include/webrtc/modules/audio_device/mac/portaudio/pa_ringbuffer.h b/WebRtc.NET/include/webrtc/modules/audio_device/mac/portaudio/pa_ringbuffer.h deleted file mode 100644 index 541a8720..00000000 --- a/WebRtc.NET/include/webrtc/modules/audio_device/mac/portaudio/pa_ringbuffer.h +++ /dev/null @@ -1,233 +0,0 @@ -#ifndef WEBRTC_AUDIO_DEVICE_PA_RINGBUFFER_H -#define WEBRTC_AUDIO_DEVICE_PA_RINGBUFFER_H -/* - * $Id: pa_ringbuffer.h 1421 2009-11-18 16:09:05Z bjornroche $ - * Portable Audio I/O Library - * Ring Buffer utility. - * - * Author: Phil Burk, http://www.softsynth.com - * modified for SMP safety on OS X by Bjorn Roche. - * also allowed for const where possible. - * modified for multiple-byte-sized data elements by Sven Fischer - * - * Note that this is safe only for a single-thread reader - * and a single-thread writer. - * - * This program is distributed with the PortAudio Portable Audio Library. - * For more information see: http://www.portaudio.com - * Copyright (c) 1999-2000 Ross Bencina and Phil Burk - * - * Permission is hereby granted, free of charge, to any person obtaining - * a copy of this software and associated documentation files - * (the "Software"), to deal in the Software without restriction, - * including without limitation the rights to use, copy, modify, merge, - * publish, distribute, sublicense, and/or sell copies of the Software, - * and to permit persons to whom the Software is furnished to do so, - * subject to the following conditions: - * - * The above copyright notice and this permission notice shall be - * included in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. - * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF - * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION - * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - -/* - * The text above constitutes the entire PortAudio license; however, - * the PortAudio community also makes the following non-binding requests: - * - * Any person wishing to distribute modifications to the Software is - * requested to send the modifications to the original developer so that - * they can be incorporated into the canonical version. It is also - * requested that these non-binding requests be included along with the - * license above. - */ - -/** @file - @ingroup common_src - @brief Single-reader single-writer lock-free ring buffer - - PaUtilRingBuffer is a ring buffer used to transport samples between - different execution contexts (threads, OS callbacks, interrupt handlers) - without requiring the use of any locks. This only works when there is - a single reader and a single writer (ie. one thread or callback writes - to the ring buffer, another thread or callback reads from it). - - The PaUtilRingBuffer structure manages a ring buffer containing N - elements, where N must be a power of two. An element may be any size - (specified in bytes). - - The memory area used to store the buffer elements must be allocated by - the client prior to calling PaUtil_InitializeRingBuffer() and must outlive - the use of the ring buffer. -*/ - -#if defined(__APPLE__) -#include -typedef int32_t PaRingBufferSize; -#elif defined( __GNUC__ ) -typedef long PaRingBufferSize; -#elif (_MSC_VER >= 1400) -typedef long PaRingBufferSize; -#elif defined(_MSC_VER) || defined(__BORLANDC__) -typedef long PaRingBufferSize; -#else -typedef long PaRingBufferSize; -#endif - - - -#ifdef __cplusplus -extern "C" -{ -#endif /* __cplusplus */ - -typedef struct PaUtilRingBuffer -{ - PaRingBufferSize bufferSize; /**< Number of elements in FIFO. Power of 2. Set by PaUtil_InitRingBuffer. */ - PaRingBufferSize writeIndex; /**< Index of next writable element. Set by PaUtil_AdvanceRingBufferWriteIndex. */ - PaRingBufferSize readIndex; /**< Index of next readable element. Set by PaUtil_AdvanceRingBufferReadIndex. */ - PaRingBufferSize bigMask; /**< Used for wrapping indices with extra bit to distinguish full/empty. */ - PaRingBufferSize smallMask; /**< Used for fitting indices to buffer. */ - PaRingBufferSize elementSizeBytes; /**< Number of bytes per element. */ - char *buffer; /**< Pointer to the buffer containing the actual data. */ -}PaUtilRingBuffer; - -/** Initialize Ring Buffer. - - @param rbuf The ring buffer. - - @param elementSizeBytes The size of a single data element in bytes. - - @param elementCount The number of elements in the buffer (must be power of 2). - - @param dataPtr A pointer to a previously allocated area where the data - will be maintained. It must be elementCount*elementSizeBytes long. - - @return -1 if elementCount is not a power of 2, otherwise 0. -*/ -PaRingBufferSize PaUtil_InitializeRingBuffer( PaUtilRingBuffer *rbuf, PaRingBufferSize elementSizeBytes, PaRingBufferSize elementCount, void *dataPtr ); - -/** Clear buffer. Should only be called when buffer is NOT being read. - - @param rbuf The ring buffer. -*/ -void PaUtil_FlushRingBuffer( PaUtilRingBuffer *rbuf ); - -/** Retrieve the number of elements available in the ring buffer for writing. - - @param rbuf The ring buffer. - - @return The number of elements available for writing. -*/ -PaRingBufferSize PaUtil_GetRingBufferWriteAvailable( PaUtilRingBuffer *rbuf ); - -/** Retrieve the number of elements available in the ring buffer for reading. - - @param rbuf The ring buffer. - - @return The number of elements available for reading. -*/ -PaRingBufferSize PaUtil_GetRingBufferReadAvailable( PaUtilRingBuffer *rbuf ); - -/** Write data to the ring buffer. - - @param rbuf The ring buffer. - - @param data The address of new data to write to the buffer. - - @param elementCount The number of elements to be written. - - @return The number of elements written. -*/ -PaRingBufferSize PaUtil_WriteRingBuffer( PaUtilRingBuffer *rbuf, const void *data, PaRingBufferSize elementCount ); - -/** Read data from the ring buffer. - - @param rbuf The ring buffer. - - @param data The address where the data should be stored. - - @param elementCount The number of elements to be read. - - @return The number of elements read. -*/ -PaRingBufferSize PaUtil_ReadRingBuffer( PaUtilRingBuffer *rbuf, void *data, PaRingBufferSize elementCount ); - -/** Get address of region(s) to which we can write data. - - @param rbuf The ring buffer. - - @param elementCount The number of elements desired. - - @param dataPtr1 The address where the first (or only) region pointer will be - stored. - - @param sizePtr1 The address where the first (or only) region length will be - stored. - - @param dataPtr2 The address where the second region pointer will be stored if - the first region is too small to satisfy elementCount. - - @param sizePtr2 The address where the second region length will be stored if - the first region is too small to satisfy elementCount. - - @return The room available to be written or elementCount, whichever is smaller. -*/ -PaRingBufferSize PaUtil_GetRingBufferWriteRegions( PaUtilRingBuffer *rbuf, PaRingBufferSize elementCount, - void **dataPtr1, PaRingBufferSize *sizePtr1, - void **dataPtr2, PaRingBufferSize *sizePtr2 ); - -/** Advance the write index to the next location to be written. - - @param rbuf The ring buffer. - - @param elementCount The number of elements to advance. - - @return The new position. -*/ -PaRingBufferSize PaUtil_AdvanceRingBufferWriteIndex( PaUtilRingBuffer *rbuf, PaRingBufferSize elementCount ); - -/** Get address of region(s) from which we can write data. - - @param rbuf The ring buffer. - - @param elementCount The number of elements desired. - - @param dataPtr1 The address where the first (or only) region pointer will be - stored. - - @param sizePtr1 The address where the first (or only) region length will be - stored. - - @param dataPtr2 The address where the second region pointer will be stored if - the first region is too small to satisfy elementCount. - - @param sizePtr2 The address where the second region length will be stored if - the first region is too small to satisfy elementCount. - - @return The number of elements available for reading. -*/ -PaRingBufferSize PaUtil_GetRingBufferReadRegions( PaUtilRingBuffer *rbuf, PaRingBufferSize elementCount, - void **dataPtr1, PaRingBufferSize *sizePtr1, - void **dataPtr2, PaRingBufferSize *sizePtr2 ); - -/** Advance the read index to the next location to be read. - - @param rbuf The ring buffer. - - @param elementCount The number of elements to advance. - - @return The new position. -*/ -PaRingBufferSize PaUtil_AdvanceRingBufferReadIndex( PaUtilRingBuffer *rbuf, PaRingBufferSize elementCount ); - -#ifdef __cplusplus -} -#endif /* __cplusplus */ -#endif /* MODULES_AUDIO_DEVICE_MAIN_SOURCE_MAC_PORTAUDIO_PA_RINGBUFFER_H_ */ diff --git a/WebRtc.NET/include/webrtc/modules/audio_device/mock_audio_device_buffer.h b/WebRtc.NET/include/webrtc/modules/audio_device/mock_audio_device_buffer.h deleted file mode 100644 index bfef605a..00000000 --- a/WebRtc.NET/include/webrtc/modules/audio_device/mock_audio_device_buffer.h +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MODULES_AUDIO_DEVICE_MOCK_AUDIO_DEVICE_BUFFER_H_ -#define WEBRTC_MODULES_AUDIO_DEVICE_MOCK_AUDIO_DEVICE_BUFFER_H_ - -#include "webrtc/modules/audio_device/audio_device_buffer.h" -#include "webrtc/test/gmock.h" - -namespace webrtc { - -class MockAudioDeviceBuffer : public AudioDeviceBuffer { - public: - MockAudioDeviceBuffer() {} - virtual ~MockAudioDeviceBuffer() {} - MOCK_METHOD1(RequestPlayoutData, int32_t(size_t nSamples)); - MOCK_METHOD1(GetPlayoutData, int32_t(void* audioBuffer)); - MOCK_METHOD2(SetRecordedBuffer, - int32_t(const void* audioBuffer, size_t nSamples)); - MOCK_METHOD3(SetVQEData, - void(int playDelayMS, int recDelayMS, int clockDrift)); - MOCK_METHOD0(DeliverRecordedData, int32_t()); -}; - -} // namespace webrtc - -#endif // WEBRTC_MODULES_AUDIO_DEVICE_MOCK_AUDIO_DEVICE_BUFFER_H_ diff --git a/WebRtc.NET/include/webrtc/modules/audio_device/test/audio_device_test_defines.h b/WebRtc.NET/include/webrtc/modules/audio_device/test/audio_device_test_defines.h deleted file mode 100644 index 60f98f4a..00000000 --- a/WebRtc.NET/include/webrtc/modules/audio_device/test/audio_device_test_defines.h +++ /dev/null @@ -1,75 +0,0 @@ -/* - * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_AUDIO_DEVICE_AUDIO_DEVICE_TEST_DEFINES_H -#define WEBRTC_AUDIO_DEVICE_AUDIO_DEVICE_TEST_DEFINES_H - -#include "webrtc/common_types.h" -#include "webrtc/modules/audio_device/include/audio_device.h" -#include "webrtc/system_wrappers/include/trace.h" - -#ifdef _WIN32 -#define MACRO_DEFAULT_DEVICE AudioDeviceModule::kDefaultDevice -#define MACRO_DEFAULT_COMMUNICATION_DEVICE AudioDeviceModule::kDefaultCommunicationDevice -#else -#define MACRO_DEFAULT_DEVICE 0 -#define MACRO_DEFAULT_COMMUNICATION_DEVICE 0 -#endif - -#ifdef ANDROID -#include -#define LOG_TAG "WebRtc ADM TEST" -#define TEST_LOG(...) __android_log_print(ANDROID_LOG_DEBUG, LOG_TAG, __VA_ARGS__) -#define TEST_LOG_ERROR(...) __android_log_print(ANDROID_LOG_ERROR, LOG_TAG, __VA_ARGS__) -#else -#define TEST_LOG printf -#define TEST_LOG_ERROR(...) fprintf(stderr, __VA_ARGS__) -#endif - -static int warningCount = 0; - -#define RESET_TEST \ - do { \ - warningCount = 0; \ - } while(0) \ - -#define PRINT_ERR_MSG(msg) \ - do { \ - TEST_LOG_ERROR("Error at line %i of %s\n%s", \ - __LINE__, __FILE__, msg); \ - } while(0) - -#define WARNING(expr) \ - do { \ - if (!(expr)) { \ - TEST_LOG_ERROR("WARNING #%d: at line %i\n\n", \ - warningCount+1, __LINE__); \ - warningCount++; \ - } \ - } while(0) - -#define PRINT_TEST_RESULTS \ - do { \ - if (warningCount > 0) \ - { \ - TEST_LOG(">> %d warnings <<\n\n", \ - warningCount); \ - } \ - } while(0) - -// Helper functions -// For iPhone, they are defined in iPhone specific test code. -// For Android, they are defined in API test only (since both -// API and Func tests are built into the same lib). -// For other, they are defined in both API test and Func test. -const char* GetFilename(const char* filename); -const char* GetResource(const char* resource); - -#endif // WEBRTC_AUDIO_DEVICE_AUDIO_DEVICE_TEST_DEFINES_H diff --git a/WebRtc.NET/include/webrtc/modules/audio_device/win/audio_device_core_win.h b/WebRtc.NET/include/webrtc/modules/audio_device/win/audio_device_core_win.h deleted file mode 100644 index 0ff24741..00000000 --- a/WebRtc.NET/include/webrtc/modules/audio_device/win/audio_device_core_win.h +++ /dev/null @@ -1,378 +0,0 @@ -/* - * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_AUDIO_DEVICE_AUDIO_DEVICE_CORE_WIN_H_ -#define WEBRTC_AUDIO_DEVICE_AUDIO_DEVICE_CORE_WIN_H_ - -#if (_MSC_VER >= 1400) // only include for VS 2005 and higher - -#include "webrtc/modules/audio_device/audio_device_generic.h" - -#include // CLSID_CWMAudioAEC - // (must be before audioclient.h) -#include // WASAPI -#include -#include // MMDevice -#include // Avrt -#include -#include // IMediaObject - -#include "webrtc/base/scoped_ref_ptr.h" -#include "webrtc/system_wrappers/include/critical_section_wrapper.h" - -// Use Multimedia Class Scheduler Service (MMCSS) to boost the thread priority -#pragma comment( lib, "avrt.lib" ) -// AVRT function pointers -typedef BOOL (WINAPI *PAvRevertMmThreadCharacteristics)(HANDLE); -typedef HANDLE (WINAPI *PAvSetMmThreadCharacteristicsA)(LPCSTR, LPDWORD); -typedef BOOL (WINAPI *PAvSetMmThreadPriority)(HANDLE, AVRT_PRIORITY); - -namespace webrtc { - -const float MAX_CORE_SPEAKER_VOLUME = 255.0f; -const float MIN_CORE_SPEAKER_VOLUME = 0.0f; -const float MAX_CORE_MICROPHONE_VOLUME = 255.0f; -const float MIN_CORE_MICROPHONE_VOLUME = 0.0f; -const uint16_t CORE_SPEAKER_VOLUME_STEP_SIZE = 1; -const uint16_t CORE_MICROPHONE_VOLUME_STEP_SIZE = 1; - -// Utility class which initializes COM in the constructor (STA or MTA), -// and uninitializes COM in the destructor. -class ScopedCOMInitializer { - public: - // Enum value provided to initialize the thread as an MTA instead of STA. - enum SelectMTA { kMTA }; - - // Constructor for STA initialization. - ScopedCOMInitializer() { - Initialize(COINIT_APARTMENTTHREADED); - } - - // Constructor for MTA initialization. - explicit ScopedCOMInitializer(SelectMTA mta) { - Initialize(COINIT_MULTITHREADED); - } - - ScopedCOMInitializer::~ScopedCOMInitializer() { - if (SUCCEEDED(hr_)) - CoUninitialize(); - } - - bool succeeded() const { return SUCCEEDED(hr_); } - - private: - void Initialize(COINIT init) { - hr_ = CoInitializeEx(NULL, init); - } - - HRESULT hr_; - - ScopedCOMInitializer(const ScopedCOMInitializer&); - void operator=(const ScopedCOMInitializer&); -}; - - -class AudioDeviceWindowsCore : public AudioDeviceGeneric -{ -public: - AudioDeviceWindowsCore(const int32_t id); - ~AudioDeviceWindowsCore(); - - static bool CoreAudioIsSupported(); - - // Retrieve the currently utilized audio layer - virtual int32_t ActiveAudioLayer(AudioDeviceModule::AudioLayer& audioLayer) const; - - // Main initializaton and termination - virtual InitStatus Init(); - virtual int32_t Terminate(); - virtual bool Initialized() const; - - // Device enumeration - virtual int16_t PlayoutDevices(); - virtual int16_t RecordingDevices(); - virtual int32_t PlayoutDeviceName( - uint16_t index, - char name[kAdmMaxDeviceNameSize], - char guid[kAdmMaxGuidSize]); - virtual int32_t RecordingDeviceName( - uint16_t index, - char name[kAdmMaxDeviceNameSize], - char guid[kAdmMaxGuidSize]); - - // Device selection - virtual int32_t SetPlayoutDevice(uint16_t index); - virtual int32_t SetPlayoutDevice(AudioDeviceModule::WindowsDeviceType device); - virtual int32_t SetRecordingDevice(uint16_t index); - virtual int32_t SetRecordingDevice(AudioDeviceModule::WindowsDeviceType device); - - // Audio transport initialization - virtual int32_t PlayoutIsAvailable(bool& available); - virtual int32_t InitPlayout(); - virtual bool PlayoutIsInitialized() const; - virtual int32_t RecordingIsAvailable(bool& available); - virtual int32_t InitRecording(); - virtual bool RecordingIsInitialized() const; - - // Audio transport control - virtual int32_t StartPlayout(); - virtual int32_t StopPlayout(); - virtual bool Playing() const; - virtual int32_t StartRecording(); - virtual int32_t StopRecording(); - virtual bool Recording() const; - - // Microphone Automatic Gain Control (AGC) - virtual int32_t SetAGC(bool enable); - virtual bool AGC() const; - - // Volume control based on the Windows Wave API (Windows only) - virtual int32_t SetWaveOutVolume(uint16_t volumeLeft, uint16_t volumeRight); - virtual int32_t WaveOutVolume(uint16_t& volumeLeft, uint16_t& volumeRight) const; - - // Audio mixer initialization - virtual int32_t InitSpeaker(); - virtual bool SpeakerIsInitialized() const; - virtual int32_t InitMicrophone(); - virtual bool MicrophoneIsInitialized() const; - - // Speaker volume controls - virtual int32_t SpeakerVolumeIsAvailable(bool& available); - virtual int32_t SetSpeakerVolume(uint32_t volume); - virtual int32_t SpeakerVolume(uint32_t& volume) const; - virtual int32_t MaxSpeakerVolume(uint32_t& maxVolume) const; - virtual int32_t MinSpeakerVolume(uint32_t& minVolume) const; - virtual int32_t SpeakerVolumeStepSize(uint16_t& stepSize) const; - - // Microphone volume controls - virtual int32_t MicrophoneVolumeIsAvailable(bool& available); - virtual int32_t SetMicrophoneVolume(uint32_t volume); - virtual int32_t MicrophoneVolume(uint32_t& volume) const; - virtual int32_t MaxMicrophoneVolume(uint32_t& maxVolume) const; - virtual int32_t MinMicrophoneVolume(uint32_t& minVolume) const; - virtual int32_t MicrophoneVolumeStepSize(uint16_t& stepSize) const; - - // Speaker mute control - virtual int32_t SpeakerMuteIsAvailable(bool& available); - virtual int32_t SetSpeakerMute(bool enable); - virtual int32_t SpeakerMute(bool& enabled) const; - - // Microphone mute control - virtual int32_t MicrophoneMuteIsAvailable(bool& available); - virtual int32_t SetMicrophoneMute(bool enable); - virtual int32_t MicrophoneMute(bool& enabled) const; - - // Microphone boost control - virtual int32_t MicrophoneBoostIsAvailable(bool& available); - virtual int32_t SetMicrophoneBoost(bool enable); - virtual int32_t MicrophoneBoost(bool& enabled) const; - - // Stereo support - virtual int32_t StereoPlayoutIsAvailable(bool& available); - virtual int32_t SetStereoPlayout(bool enable); - virtual int32_t StereoPlayout(bool& enabled) const; - virtual int32_t StereoRecordingIsAvailable(bool& available); - virtual int32_t SetStereoRecording(bool enable); - virtual int32_t StereoRecording(bool& enabled) const; - - // Delay information and control - virtual int32_t SetPlayoutBuffer(const AudioDeviceModule::BufferType type, uint16_t sizeMS); - virtual int32_t PlayoutBuffer(AudioDeviceModule::BufferType& type, uint16_t& sizeMS) const; - virtual int32_t PlayoutDelay(uint16_t& delayMS) const; - virtual int32_t RecordingDelay(uint16_t& delayMS) const; - - // CPU load - virtual int32_t CPULoad(uint16_t& load) const; - - virtual int32_t EnableBuiltInAEC(bool enable); - -public: - virtual bool PlayoutWarning() const; - virtual bool PlayoutError() const; - virtual bool RecordingWarning() const; - virtual bool RecordingError() const; - virtual void ClearPlayoutWarning(); - virtual void ClearPlayoutError(); - virtual void ClearRecordingWarning(); - virtual void ClearRecordingError(); - -public: - virtual void AttachAudioBuffer(AudioDeviceBuffer* audioBuffer); - -private: - bool KeyPressed() const; - -private: // avrt function pointers - PAvRevertMmThreadCharacteristics _PAvRevertMmThreadCharacteristics; - PAvSetMmThreadCharacteristicsA _PAvSetMmThreadCharacteristicsA; - PAvSetMmThreadPriority _PAvSetMmThreadPriority; - HMODULE _avrtLibrary; - bool _winSupportAvrt; - -private: // thread functions - DWORD InitCaptureThreadPriority(); - void RevertCaptureThreadPriority(); - static DWORD WINAPI WSAPICaptureThread(LPVOID context); - DWORD DoCaptureThread(); - - static DWORD WINAPI WSAPICaptureThreadPollDMO(LPVOID context); - DWORD DoCaptureThreadPollDMO(); - - static DWORD WINAPI WSAPIRenderThread(LPVOID context); - DWORD DoRenderThread(); - - static DWORD WINAPI GetCaptureVolumeThread(LPVOID context); - DWORD DoGetCaptureVolumeThread(); - - static DWORD WINAPI SetCaptureVolumeThread(LPVOID context); - DWORD DoSetCaptureVolumeThread(); - - void _Lock() { _critSect.Enter(); }; - void _UnLock() { _critSect.Leave(); }; - -private: - int32_t Id() {return _id;} - -private: - int SetDMOProperties(); - - int SetBoolProperty(IPropertyStore* ptrPS, - REFPROPERTYKEY key, - VARIANT_BOOL value); - - int SetVtI4Property(IPropertyStore* ptrPS, - REFPROPERTYKEY key, - LONG value); - - int32_t _EnumerateEndpointDevicesAll(EDataFlow dataFlow) const; - void _TraceCOMError(HRESULT hr) const; - - int32_t _RefreshDeviceList(EDataFlow dir); - int16_t _DeviceListCount(EDataFlow dir); - int32_t _GetDefaultDeviceName(EDataFlow dir, ERole role, LPWSTR szBuffer, int bufferLen); - int32_t _GetListDeviceName(EDataFlow dir, int index, LPWSTR szBuffer, int bufferLen); - int32_t _GetDeviceName(IMMDevice* pDevice, LPWSTR pszBuffer, int bufferLen); - int32_t _GetListDeviceID(EDataFlow dir, int index, LPWSTR szBuffer, int bufferLen); - int32_t _GetDefaultDeviceID(EDataFlow dir, ERole role, LPWSTR szBuffer, int bufferLen); - int32_t _GetDefaultDeviceIndex(EDataFlow dir, ERole role, int* index); - int32_t _GetDeviceID(IMMDevice* pDevice, LPWSTR pszBuffer, int bufferLen); - int32_t _GetDefaultDevice(EDataFlow dir, ERole role, IMMDevice** ppDevice); - int32_t _GetListDevice(EDataFlow dir, int index, IMMDevice** ppDevice); - - // Converts from wide-char to UTF-8 if UNICODE is defined. - // Does nothing if UNICODE is undefined. - char* WideToUTF8(const TCHAR* src) const; - - int32_t InitRecordingDMO(); - -private: - ScopedCOMInitializer _comInit; - AudioDeviceBuffer* _ptrAudioBuffer; - CriticalSectionWrapper& _critSect; - CriticalSectionWrapper& _volumeMutex; - int32_t _id; - -private: // MMDevice - IMMDeviceEnumerator* _ptrEnumerator; - IMMDeviceCollection* _ptrRenderCollection; - IMMDeviceCollection* _ptrCaptureCollection; - IMMDevice* _ptrDeviceOut; - IMMDevice* _ptrDeviceIn; - -private: // WASAPI - IAudioClient* _ptrClientOut; - IAudioClient* _ptrClientIn; - IAudioRenderClient* _ptrRenderClient; - IAudioCaptureClient* _ptrCaptureClient; - IAudioEndpointVolume* _ptrCaptureVolume; - ISimpleAudioVolume* _ptrRenderSimpleVolume; - - // DirectX Media Object (DMO) for the built-in AEC. - rtc::scoped_refptr _dmo; - rtc::scoped_refptr _mediaBuffer; - bool _builtInAecEnabled; - - HANDLE _hRenderSamplesReadyEvent; - HANDLE _hPlayThread; - HANDLE _hRenderStartedEvent; - HANDLE _hShutdownRenderEvent; - - HANDLE _hCaptureSamplesReadyEvent; - HANDLE _hRecThread; - HANDLE _hCaptureStartedEvent; - HANDLE _hShutdownCaptureEvent; - - HANDLE _hGetCaptureVolumeThread; - HANDLE _hSetCaptureVolumeThread; - HANDLE _hSetCaptureVolumeEvent; - - HANDLE _hMmTask; - - UINT _playAudioFrameSize; - uint32_t _playSampleRate; - uint32_t _devicePlaySampleRate; - uint32_t _playBlockSize; - uint32_t _devicePlayBlockSize; - uint32_t _playChannels; - uint32_t _sndCardPlayDelay; - UINT64 _writtenSamples; - LONGLONG _playAcc; - - UINT _recAudioFrameSize; - uint32_t _recSampleRate; - uint32_t _recBlockSize; - uint32_t _recChannels; - UINT64 _readSamples; - uint32_t _sndCardRecDelay; - - uint16_t _recChannelsPrioList[2]; - uint16_t _playChannelsPrioList[2]; - - LARGE_INTEGER _perfCounterFreq; - double _perfCounterFactor; - float _avgCPULoad; - -private: - bool _initialized; - bool _recording; - bool _playing; - bool _recIsInitialized; - bool _playIsInitialized; - bool _speakerIsInitialized; - bool _microphoneIsInitialized; - - bool _usingInputDeviceIndex; - bool _usingOutputDeviceIndex; - AudioDeviceModule::WindowsDeviceType _inputDevice; - AudioDeviceModule::WindowsDeviceType _outputDevice; - uint16_t _inputDeviceIndex; - uint16_t _outputDeviceIndex; - - bool _AGC; - - uint16_t _playWarning; - uint16_t _playError; - uint16_t _recWarning; - uint16_t _recError; - - AudioDeviceModule::BufferType _playBufType; - uint16_t _playBufDelay; - uint16_t _playBufDelayFixed; - - uint16_t _newMicLevel; - - mutable char _str[512]; -}; - -#endif // #if (_MSC_VER >= 1400) - -} // namespace webrtc - -#endif // WEBRTC_AUDIO_DEVICE_AUDIO_DEVICE_CORE_WIN_H_ diff --git a/WebRtc.NET/include/webrtc/modules/audio_device/win/audio_device_wave_win.h b/WebRtc.NET/include/webrtc/modules/audio_device/win/audio_device_wave_win.h deleted file mode 100644 index 6bb7c171..00000000 --- a/WebRtc.NET/include/webrtc/modules/audio_device/win/audio_device_wave_win.h +++ /dev/null @@ -1,343 +0,0 @@ -/* - * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_AUDIO_DEVICE_AUDIO_DEVICE_WAVE_WIN_H -#define WEBRTC_AUDIO_DEVICE_AUDIO_DEVICE_WAVE_WIN_H - -#include - -#include "webrtc/base/platform_thread.h" -#include "webrtc/modules/audio_device/audio_device_generic.h" -#include "webrtc/modules/audio_device/win/audio_mixer_manager_win.h" - -#pragma comment( lib, "winmm.lib" ) - -namespace webrtc { -class EventTimerWrapper; -class EventWrapper; - -const uint32_t TIMER_PERIOD_MS = 2; -const uint32_t REC_CHECK_TIME_PERIOD_MS = 4; -const uint16_t REC_PUT_BACK_DELAY = 4; - -const uint32_t N_REC_SAMPLES_PER_SEC = 48000; -const uint32_t N_PLAY_SAMPLES_PER_SEC = 48000; - -const uint32_t N_REC_CHANNELS = 1; // default is mono recording -const uint32_t N_PLAY_CHANNELS = 2; // default is stereo playout - -// NOTE - CPU load will not be correct for other sizes than 10ms -const uint32_t REC_BUF_SIZE_IN_SAMPLES = (N_REC_SAMPLES_PER_SEC/100); -const uint32_t PLAY_BUF_SIZE_IN_SAMPLES = (N_PLAY_SAMPLES_PER_SEC/100); - -enum { N_BUFFERS_IN = 200 }; -enum { N_BUFFERS_OUT = 200 }; - -class AudioDeviceWindowsWave : public AudioDeviceGeneric -{ -public: - AudioDeviceWindowsWave(const int32_t id); - ~AudioDeviceWindowsWave(); - - // Retrieve the currently utilized audio layer - virtual int32_t ActiveAudioLayer(AudioDeviceModule::AudioLayer& audioLayer) const; - - // Main initializaton and termination - virtual InitStatus Init(); - virtual int32_t Terminate(); - virtual bool Initialized() const; - - // Device enumeration - virtual int16_t PlayoutDevices(); - virtual int16_t RecordingDevices(); - virtual int32_t PlayoutDeviceName( - uint16_t index, - char name[kAdmMaxDeviceNameSize], - char guid[kAdmMaxGuidSize]); - virtual int32_t RecordingDeviceName( - uint16_t index, - char name[kAdmMaxDeviceNameSize], - char guid[kAdmMaxGuidSize]); - - // Device selection - virtual int32_t SetPlayoutDevice(uint16_t index); - virtual int32_t SetPlayoutDevice(AudioDeviceModule::WindowsDeviceType device); - virtual int32_t SetRecordingDevice(uint16_t index); - virtual int32_t SetRecordingDevice(AudioDeviceModule::WindowsDeviceType device); - - // Audio transport initialization - virtual int32_t PlayoutIsAvailable(bool& available); - virtual int32_t InitPlayout(); - virtual bool PlayoutIsInitialized() const; - virtual int32_t RecordingIsAvailable(bool& available); - virtual int32_t InitRecording(); - virtual bool RecordingIsInitialized() const; - - // Audio transport control - virtual int32_t StartPlayout(); - virtual int32_t StopPlayout(); - virtual bool Playing() const; - virtual int32_t StartRecording(); - virtual int32_t StopRecording(); - virtual bool Recording() const; - - // Microphone Automatic Gain Control (AGC) - virtual int32_t SetAGC(bool enable); - virtual bool AGC() const; - - // Volume control based on the Windows Wave API (Windows only) - virtual int32_t SetWaveOutVolume(uint16_t volumeLeft, uint16_t volumeRight); - virtual int32_t WaveOutVolume(uint16_t& volumeLeft, uint16_t& volumeRight) const; - - // Audio mixer initialization - virtual int32_t InitSpeaker(); - virtual bool SpeakerIsInitialized() const; - virtual int32_t InitMicrophone(); - virtual bool MicrophoneIsInitialized() const; - - // Speaker volume controls - virtual int32_t SpeakerVolumeIsAvailable(bool& available); - virtual int32_t SetSpeakerVolume(uint32_t volume); - virtual int32_t SpeakerVolume(uint32_t& volume) const; - virtual int32_t MaxSpeakerVolume(uint32_t& maxVolume) const; - virtual int32_t MinSpeakerVolume(uint32_t& minVolume) const; - virtual int32_t SpeakerVolumeStepSize(uint16_t& stepSize) const; - - // Microphone volume controls - virtual int32_t MicrophoneVolumeIsAvailable(bool& available); - virtual int32_t SetMicrophoneVolume(uint32_t volume); - virtual int32_t MicrophoneVolume(uint32_t& volume) const; - virtual int32_t MaxMicrophoneVolume(uint32_t& maxVolume) const; - virtual int32_t MinMicrophoneVolume(uint32_t& minVolume) const; - virtual int32_t MicrophoneVolumeStepSize(uint16_t& stepSize) const; - - // Speaker mute control - virtual int32_t SpeakerMuteIsAvailable(bool& available); - virtual int32_t SetSpeakerMute(bool enable); - virtual int32_t SpeakerMute(bool& enabled) const; - - // Microphone mute control - virtual int32_t MicrophoneMuteIsAvailable(bool& available); - virtual int32_t SetMicrophoneMute(bool enable); - virtual int32_t MicrophoneMute(bool& enabled) const; - - // Microphone boost control - virtual int32_t MicrophoneBoostIsAvailable(bool& available); - virtual int32_t SetMicrophoneBoost(bool enable); - virtual int32_t MicrophoneBoost(bool& enabled) const; - - // Stereo support - virtual int32_t StereoPlayoutIsAvailable(bool& available); - virtual int32_t SetStereoPlayout(bool enable); - virtual int32_t StereoPlayout(bool& enabled) const; - virtual int32_t StereoRecordingIsAvailable(bool& available); - virtual int32_t SetStereoRecording(bool enable); - virtual int32_t StereoRecording(bool& enabled) const; - - // Delay information and control - virtual int32_t SetPlayoutBuffer(const AudioDeviceModule::BufferType type, uint16_t sizeMS); - virtual int32_t PlayoutBuffer(AudioDeviceModule::BufferType& type, uint16_t& sizeMS) const; - virtual int32_t PlayoutDelay(uint16_t& delayMS) const; - virtual int32_t RecordingDelay(uint16_t& delayMS) const; - - // CPU load - virtual int32_t CPULoad(uint16_t& load) const; - -public: - virtual bool PlayoutWarning() const; - virtual bool PlayoutError() const; - virtual bool RecordingWarning() const; - virtual bool RecordingError() const; - virtual void ClearPlayoutWarning(); - virtual void ClearPlayoutError(); - virtual void ClearRecordingWarning(); - virtual void ClearRecordingError(); - -public: - virtual void AttachAudioBuffer(AudioDeviceBuffer* audioBuffer); - -private: - void Lock() { _critSect.Enter(); }; - void UnLock() { _critSect.Leave(); }; - int32_t Id() {return _id;} - bool IsUsingOutputDeviceIndex() const {return _usingOutputDeviceIndex;} - AudioDeviceModule::WindowsDeviceType OutputDevice() const {return _outputDevice;} - uint16_t OutputDeviceIndex() const {return _outputDeviceIndex;} - bool IsUsingInputDeviceIndex() const {return _usingInputDeviceIndex;} - AudioDeviceModule::WindowsDeviceType InputDevice() const {return _inputDevice;} - uint16_t InputDeviceIndex() const {return _inputDeviceIndex;} - -private: - inline int32_t InputSanityCheckAfterUnlockedPeriod() const; - inline int32_t OutputSanityCheckAfterUnlockedPeriod() const; - -private: - bool KeyPressed() const; - -private: - int32_t EnumeratePlayoutDevices(); - int32_t EnumerateRecordingDevices(); - void TraceSupportFlags(DWORD dwSupport) const; - void TraceWaveInError(MMRESULT error) const; - void TraceWaveOutError(MMRESULT error) const; - int32_t PrepareStartRecording(); - int32_t PrepareStartPlayout(); - - int32_t RecProc(LONGLONG& consumedTime); - int PlayProc(LONGLONG& consumedTime); - - int32_t GetPlayoutBufferDelay(uint32_t& writtenSamples, uint32_t& playedSamples); - int32_t GetRecordingBufferDelay(uint32_t& readSamples, uint32_t& recSamples); - int32_t Write(int8_t* data, uint16_t nSamples); - int32_t GetClockDrift(const uint32_t plSamp, const uint32_t rcSamp); - int32_t MonitorRecording(const uint32_t time); - int32_t RestartTimerIfNeeded(const uint32_t time); - -private: - static bool ThreadFunc(void*); - bool ThreadProcess(); - - static DWORD WINAPI GetCaptureVolumeThread(LPVOID context); - DWORD DoGetCaptureVolumeThread(); - - static DWORD WINAPI SetCaptureVolumeThread(LPVOID context); - DWORD DoSetCaptureVolumeThread(); - -private: - AudioDeviceBuffer* _ptrAudioBuffer; - - CriticalSectionWrapper& _critSect; - EventTimerWrapper& _timeEvent; - EventWrapper& _recStartEvent; - EventWrapper& _playStartEvent; - - HANDLE _hGetCaptureVolumeThread; - HANDLE _hShutdownGetVolumeEvent; - HANDLE _hSetCaptureVolumeThread; - HANDLE _hShutdownSetVolumeEvent; - HANDLE _hSetCaptureVolumeEvent; - - // TODO(pbos): Remove unique_ptr usage and use PlatformThread directly - std::unique_ptr _ptrThread; - - CriticalSectionWrapper& _critSectCb; - - int32_t _id; - - AudioMixerManager _mixerManager; - - bool _usingInputDeviceIndex; - bool _usingOutputDeviceIndex; - AudioDeviceModule::WindowsDeviceType _inputDevice; - AudioDeviceModule::WindowsDeviceType _outputDevice; - uint16_t _inputDeviceIndex; - uint16_t _outputDeviceIndex; - bool _inputDeviceIsSpecified; - bool _outputDeviceIsSpecified; - - WAVEFORMATEX _waveFormatIn; - WAVEFORMATEX _waveFormatOut; - - HWAVEIN _hWaveIn; - HWAVEOUT _hWaveOut; - - WAVEHDR _waveHeaderIn[N_BUFFERS_IN]; - WAVEHDR _waveHeaderOut[N_BUFFERS_OUT]; - - uint8_t _recChannels; - uint8_t _playChannels; - uint16_t _recBufCount; - uint16_t _recDelayCount; - uint16_t _recPutBackDelay; - - int8_t _recBuffer[N_BUFFERS_IN][4*REC_BUF_SIZE_IN_SAMPLES]; - int8_t _playBuffer[N_BUFFERS_OUT][4*PLAY_BUF_SIZE_IN_SAMPLES]; - - AudioDeviceModule::BufferType _playBufType; - -private: - bool _initialized; - bool _recording; - bool _playing; - bool _recIsInitialized; - bool _playIsInitialized; - bool _startRec; - bool _stopRec; - bool _startPlay; - bool _stopPlay; - bool _AGC; - -private: - uint32_t _prevPlayTime; - uint32_t _prevRecTime; - uint32_t _prevTimerCheckTime; - - uint16_t _playBufCount; // playout buffer index - uint16_t _dTcheckPlayBufDelay; // dT for check of play buffer, {2,5,10} [ms] - uint16_t _playBufDelay; // playback delay - uint16_t _playBufDelayFixed; // fixed playback delay - uint16_t _minPlayBufDelay; // minimum playback delay - uint16_t _MAX_minBuffer; // level of (adaptive) min threshold must be < _MAX_minBuffer - - int32_t _erZeroCounter; // counts "buffer-is-empty" events - int32_t _intro; - int32_t _waitCounter; - - uint32_t _writtenSamples; - uint32_t _writtenSamplesOld; - uint32_t _playedSamplesOld; - - uint32_t _sndCardPlayDelay; - uint32_t _sndCardRecDelay; - - uint32_t _plSampOld; - uint32_t _rcSampOld; - - uint32_t _read_samples; - uint32_t _read_samples_old; - uint32_t _rec_samples_old; - - // State that detects driver problems: - int32_t _dc_diff_mean; - int32_t _dc_y_prev; - int32_t _dc_penalty_counter; - int32_t _dc_prevtime; - uint32_t _dc_prevplay; - - uint32_t _recordedBytes; // accumulated #recorded bytes (reset periodically) - uint32_t _prevRecByteCheckTime; // time when we last checked the recording process - - // CPU load measurements - LARGE_INTEGER _perfFreq; - LONGLONG _playAcc; // accumulated time for playout callback - float _avgCPULoad; // average total (rec+play) CPU load - - int32_t _wrapCounter; - - int32_t _useHeader; - int16_t _timesdwBytes; - int32_t _no_of_msecleft_warnings; - int32_t _writeErrors; - int32_t _timerFaults; - int32_t _timerRestartAttempts; - - uint16_t _playWarning; - uint16_t _playError; - uint16_t _recWarning; - uint16_t _recError; - - uint32_t _newMicLevel; - uint32_t _minMicVolume; - uint32_t _maxMicVolume; -}; - -} // namespace webrtc - -#endif // WEBRTC_AUDIO_DEVICE_AUDIO_DEVICE_WAVE_WIN_H diff --git a/WebRtc.NET/include/webrtc/modules/audio_device/win/audio_mixer_manager_win.h b/WebRtc.NET/include/webrtc/modules/audio_device/win/audio_mixer_manager_win.h deleted file mode 100644 index 1e0ab47a..00000000 --- a/WebRtc.NET/include/webrtc/modules/audio_device/win/audio_mixer_manager_win.h +++ /dev/null @@ -1,139 +0,0 @@ -/* - * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_AUDIO_DEVICE_AUDIO_MIXER_MANAGER_WIN_H -#define WEBRTC_AUDIO_DEVICE_AUDIO_MIXER_MANAGER_WIN_H - -#include "webrtc/typedefs.h" -#include "webrtc/modules/audio_device/include/audio_device.h" -#include "webrtc/system_wrappers/include/critical_section_wrapper.h" -#include -#include - -namespace webrtc { - -class AudioMixerManager -{ -public: - enum { MAX_NUMBER_MIXER_DEVICES = 40 }; - enum { MAX_NUMBER_OF_LINE_CONTROLS = 20 }; - enum { MAX_NUMBER_OF_MULTIPLE_ITEMS = 20 }; - struct SpeakerLineInfo - { - DWORD dwLineID; - bool speakerIsValid; - DWORD dwVolumeControlID; - bool volumeControlIsValid; - DWORD dwMuteControlID; - bool muteControlIsValid; - }; - struct MicrophoneLineInfo - { - DWORD dwLineID; - bool microphoneIsValid; - DWORD dwVolumeControlID; - bool volumeControlIsValid; - DWORD dwMuteControlID; - bool muteControlIsValid; - DWORD dwOnOffControlID; - bool onOffControlIsValid; - }; -public: - int32_t EnumerateAll(); - int32_t EnumerateSpeakers(); - int32_t EnumerateMicrophones(); - int32_t OpenSpeaker(AudioDeviceModule::WindowsDeviceType device); - int32_t OpenSpeaker(uint16_t index); - int32_t OpenMicrophone(AudioDeviceModule::WindowsDeviceType device); - int32_t OpenMicrophone(uint16_t index); - int32_t SetSpeakerVolume(uint32_t volume); - int32_t SpeakerVolume(uint32_t& volume) const; - int32_t MaxSpeakerVolume(uint32_t& maxVolume) const; - int32_t MinSpeakerVolume(uint32_t& minVolume) const; - int32_t SpeakerVolumeStepSize(uint16_t& stepSize) const; - int32_t SpeakerVolumeIsAvailable(bool& available); - int32_t SpeakerMuteIsAvailable(bool& available); - int32_t SetSpeakerMute(bool enable); - int32_t SpeakerMute(bool& enabled) const; - int32_t MicrophoneMuteIsAvailable(bool& available); - int32_t SetMicrophoneMute(bool enable); - int32_t MicrophoneMute(bool& enabled) const; - int32_t MicrophoneBoostIsAvailable(bool& available); - int32_t SetMicrophoneBoost(bool enable); - int32_t MicrophoneBoost(bool& enabled) const; - int32_t MicrophoneVolumeIsAvailable(bool& available); - int32_t SetMicrophoneVolume(uint32_t volume); - int32_t MicrophoneVolume(uint32_t& volume) const; - int32_t MaxMicrophoneVolume(uint32_t& maxVolume) const; - int32_t MinMicrophoneVolume(uint32_t& minVolume) const; - int32_t MicrophoneVolumeStepSize(uint16_t& stepSize) const; - int32_t Close(); - int32_t CloseSpeaker(); - int32_t CloseMicrophone(); - bool SpeakerIsInitialized() const; - bool MicrophoneIsInitialized() const; - UINT Devices() const; - -private: - UINT DestinationLines(UINT mixId) const; - UINT SourceLines(UINT mixId, DWORD destId) const; - bool GetCapabilities(UINT mixId, MIXERCAPS& caps, bool trace = false) const; - bool GetDestinationLineInfo(UINT mixId, DWORD destId, MIXERLINE& line, bool trace = false) const; - bool GetSourceLineInfo(UINT mixId, DWORD destId, DWORD srcId, MIXERLINE& line, bool trace = false) const; - - bool GetAllLineControls(UINT mixId, const MIXERLINE& line, MIXERCONTROL* controlArray, bool trace = false) const; - bool GetLineControl(UINT mixId, DWORD dwControlID, MIXERCONTROL& control) const; - bool GetControlDetails(UINT mixId, MIXERCONTROL& controlArray, bool trace = false) const; - bool GetUnsignedControlValue(UINT mixId, DWORD dwControlID, DWORD& dwValue) const; - bool SetUnsignedControlValue(UINT mixId, DWORD dwControlID, DWORD dwValue) const; - bool SetBooleanControlValue(UINT mixId, DWORD dwControlID, bool value) const; - bool GetBooleanControlValue(UINT mixId, DWORD dwControlID, bool& value) const; - bool GetSelectedMuxSource(UINT mixId, DWORD dwControlID, DWORD cMultipleItems, UINT& index) const; - -private: - void ClearSpeakerState(); - void ClearSpeakerState(UINT idx); - void ClearMicrophoneState(); - void ClearMicrophoneState(UINT idx); - bool SpeakerIsValid(UINT idx) const; - UINT ValidSpeakers() const; - bool MicrophoneIsValid(UINT idx) const; - UINT ValidMicrophones() const; - - void TraceStatusAndSupportFlags(DWORD fdwLine) const; - void TraceTargetType(DWORD dwType) const; - void TraceComponentType(DWORD dwComponentType) const; - void TraceControlType(DWORD dwControlType) const; - void TraceControlStatusAndSupportFlags(DWORD fdwControl) const; - void TraceWaveInError(MMRESULT error) const; - void TraceWaveOutError(MMRESULT error) const; - // Converts from wide-char to UTF-8 if UNICODE is defined. - // Does nothing if UNICODE is undefined. - char* WideToUTF8(const TCHAR* src) const; - -public: - AudioMixerManager(const int32_t id); - ~AudioMixerManager(); - -private: - CriticalSectionWrapper& _critSect; - int32_t _id; - HMIXER _outputMixerHandle; - UINT _outputMixerID; - HMIXER _inputMixerHandle; - UINT _inputMixerID; - SpeakerLineInfo _speakerState[MAX_NUMBER_MIXER_DEVICES]; - MicrophoneLineInfo _microphoneState[MAX_NUMBER_MIXER_DEVICES]; - mutable char _str[MAXERRORLENGTH]; -}; - -} // namespace webrtc - -#endif // WEBRTC_AUDIO_DEVICE_AUDIO_MIXER_MANAGER_H diff --git a/WebRtc.NET/include/webrtc/modules/audio_mixer/audio_frame_manipulator.h b/WebRtc.NET/include/webrtc/modules/audio_mixer/audio_frame_manipulator.h deleted file mode 100644 index 20b66ca1..00000000 --- a/WebRtc.NET/include/webrtc/modules/audio_mixer/audio_frame_manipulator.h +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MODULES_AUDIO_MIXER_AUDIO_FRAME_MANIPULATOR_H_ -#define WEBRTC_MODULES_AUDIO_MIXER_AUDIO_FRAME_MANIPULATOR_H_ - -#include "webrtc/modules/include/module_common_types.h" - -namespace webrtc { - -// Updates the audioFrame's energy (based on its samples). -uint32_t AudioMixerCalculateEnergy(const AudioFrame& audio_frame); - -// Ramps up or down the provided audio frame. Ramp(0, 1, frame) will -// linearly increase the samples in the frame from 0 to full volume. -void Ramp(float start_gain, float target_gain, AudioFrame* audio_frame); - -// Downmixes or upmixes a frame between stereo and mono. -void RemixFrame(size_t target_number_of_channels, AudioFrame* frame); - -} // namespace webrtc - -#endif // WEBRTC_MODULES_AUDIO_MIXER_AUDIO_FRAME_MANIPULATOR_H_ diff --git a/WebRtc.NET/include/webrtc/modules/audio_mixer/audio_mixer_impl.h b/WebRtc.NET/include/webrtc/modules/audio_mixer/audio_mixer_impl.h deleted file mode 100644 index 63bc7404..00000000 --- a/WebRtc.NET/include/webrtc/modules/audio_mixer/audio_mixer_impl.h +++ /dev/null @@ -1,119 +0,0 @@ -/* - * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MODULES_AUDIO_MIXER_AUDIO_MIXER_IMPL_H_ -#define WEBRTC_MODULES_AUDIO_MIXER_AUDIO_MIXER_IMPL_H_ - -#include -#include - -#include "webrtc/api/audio/audio_mixer.h" -#include "webrtc/base/scoped_ref_ptr.h" -#include "webrtc/base/thread_annotations.h" -#include "webrtc/base/race_checker.h" -#include "webrtc/modules/audio_mixer/output_rate_calculator.h" -#include "webrtc/modules/audio_processing/include/audio_processing.h" -#include "webrtc/modules/include/module_common_types.h" -#include "webrtc/system_wrappers/include/critical_section_wrapper.h" -#include "webrtc/typedefs.h" - -namespace webrtc { - -typedef std::vector AudioFrameList; - -class AudioMixerImpl : public AudioMixer { - public: - struct SourceStatus { - SourceStatus(Source* audio_source, bool is_mixed, float gain) - : audio_source(audio_source), is_mixed(is_mixed), gain(gain) {} - Source* audio_source = nullptr; - bool is_mixed = false; - float gain = 0.0f; - - // A frame that will be passed to audio_source->GetAudioFrameWithInfo. - AudioFrame audio_frame; - }; - - using SourceStatusList = std::vector>; - - // AudioProcessing only accepts 10 ms frames. - static const int kFrameDurationInMs = 10; - static const int kMaximumAmountOfMixedAudioSources = 3; - - static rtc::scoped_refptr Create(); - static rtc::scoped_refptr CreateWithOutputRateCalculator( - std::unique_ptr output_rate_calculator); - - ~AudioMixerImpl() override; - - // AudioMixer functions - bool AddSource(Source* audio_source) override; - void RemoveSource(Source* audio_source) override; - - void Mix(size_t number_of_channels, - AudioFrame* audio_frame_for_mixing) override LOCKS_EXCLUDED(crit_); - - // Returns true if the source was mixed last round. Returns - // false and logs an error if the source was never added to the - // mixer. - bool GetAudioSourceMixabilityStatusForTest(Source* audio_source) const; - - protected: - AudioMixerImpl(std::unique_ptr limiter, - std::unique_ptr output_rate_calculator); - - private: - // Set mixing frequency through OutputFrequencyCalculator. - void CalculateOutputFrequency(); - // Get mixing frequency. - int OutputFrequency() const; - - // Compute what audio sources to mix from audio_source_list_. Ramp - // in and out. Update mixed status. Mixes up to - // kMaximumAmountOfMixedAudioSources audio sources. - AudioFrameList GetAudioFromSources() EXCLUSIVE_LOCKS_REQUIRED(crit_); - - // Add/remove the MixerAudioSource to the specified - // MixerAudioSource list. - bool AddAudioSourceToList(Source* audio_source, - SourceStatusList* audio_source_list) const; - bool RemoveAudioSourceFromList(Source* remove_audio_source, - SourceStatusList* audio_source_list) const; - - bool LimitMixedAudio(AudioFrame* mixed_audio) const; - - // The critical section lock guards audio source insertion and - // removal, which can be done from any thread. The race checker - // checks that mixing is done sequentially. - rtc::CriticalSection crit_; - rtc::RaceChecker race_checker_; - - std::unique_ptr output_rate_calculator_; - // The current sample frequency and sample size when mixing. - int output_frequency_ GUARDED_BY(race_checker_); - size_t sample_size_ GUARDED_BY(race_checker_); - - // List of all audio sources. Note all lists are disjunct - SourceStatusList audio_source_list_ GUARDED_BY(crit_); // May be mixed. - - // Determines if we will use a limiter for clipping protection during - // mixing. - bool use_limiter_ GUARDED_BY(race_checker_); - - uint32_t time_stamp_ GUARDED_BY(race_checker_); - - // Used for inhibiting saturation in mixing. - std::unique_ptr limiter_ GUARDED_BY(race_checker_); - - RTC_DISALLOW_COPY_AND_ASSIGN(AudioMixerImpl); -}; -} // namespace webrtc - -#endif // WEBRTC_MODULES_AUDIO_MIXER_AUDIO_MIXER_IMPL_H_ diff --git a/WebRtc.NET/include/webrtc/modules/audio_processing/aec3/aec3_constants.h b/WebRtc.NET/include/webrtc/modules/audio_processing/aec3/aec3_constants.h deleted file mode 100644 index 946e50c7..00000000 --- a/WebRtc.NET/include/webrtc/modules/audio_processing/aec3/aec3_constants.h +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MODULES_AUDIO_PROCESSING_AEC3_AEC3_CONSTANTS_H_ -#define WEBRTC_MODULES_AUDIO_PROCESSING_AEC3_AEC3_CONSTANTS_H_ - -#include - -namespace webrtc { - -constexpr size_t kFftLengthBy2 = 64; -constexpr size_t kFftLengthBy2Plus1 = kFftLengthBy2 + 1; -constexpr size_t kFftLength = 2 * kFftLengthBy2; - -constexpr size_t kMaxNumBands = 3; -constexpr size_t kSubFrameLength = 80; - -constexpr size_t kBlockSize = kFftLengthBy2; -constexpr size_t kExtendedBlockSize = 2 * kFftLengthBy2; -constexpr size_t kSubBlockSize = 16; - -constexpr size_t NumBandsForRate(int sample_rate_hz) { - return static_cast(sample_rate_hz == 8000 ? 1 - : sample_rate_hz / 16000); -} -constexpr int LowestBandRate(int sample_rate_hz) { - return sample_rate_hz == 8000 ? sample_rate_hz : 16000; -} - -static_assert(1 == NumBandsForRate(8000), "Number of bands for 8 kHz"); -static_assert(1 == NumBandsForRate(16000), "Number of bands for 16 kHz"); -static_assert(2 == NumBandsForRate(32000), "Number of bands for 32 kHz"); -static_assert(3 == NumBandsForRate(48000), "Number of bands for 48 kHz"); - -static_assert(8000 == LowestBandRate(8000), "Sample rate of band 0 for 8 kHz"); -static_assert(16000 == LowestBandRate(16000), - "Sample rate of band 0 for 16 kHz"); -static_assert(16000 == LowestBandRate(32000), - "Sample rate of band 0 for 32 kHz"); -static_assert(16000 == LowestBandRate(48000), - "Sample rate of band 0 for 48 kHz"); - -} // namespace webrtc - -#endif // WEBRTC_MODULES_AUDIO_PROCESSING_AEC3_AEC3_CONSTANTS_H_ diff --git a/WebRtc.NET/include/webrtc/modules/audio_processing/aec3/block_processor.h b/WebRtc.NET/include/webrtc/modules/audio_processing/aec3/block_processor.h deleted file mode 100644 index b84b18df..00000000 --- a/WebRtc.NET/include/webrtc/modules/audio_processing/aec3/block_processor.h +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MODULES_AUDIO_PROCESSING_AEC3_BLOCK_PROCESSOR_H_ -#define WEBRTC_MODULES_AUDIO_PROCESSING_AEC3_BLOCK_PROCESSOR_H_ - -#include -#include - -#include "webrtc/base/constructormagic.h" -#include "webrtc/modules/audio_processing/logging/apm_data_dumper.h" - -namespace webrtc { - -// Class for performing echo cancellation on 64 sample blocks of audio data. -class BlockProcessor { - public: - static BlockProcessor* Create(int sample_rate_hz); - virtual ~BlockProcessor() = default; - - // Processes a block of capture data. - virtual void ProcessCapture( - bool known_echo_path_change, - bool saturated_microphone_signal, - std::vector>* capture_block) = 0; - - // Buffers a block of render data supplied by a FrameBlocker object. - virtual bool BufferRender(std::vector>* render_block) = 0; - - // Reports whether echo leakage has been detected in the echo canceller - // output. - virtual void ReportEchoLeakage(bool leakage_detected) = 0; -}; - -} // namespace webrtc - -#endif // WEBRTC_MODULES_AUDIO_PROCESSING_AEC3_BLOCK_PROCESSOR_H_ diff --git a/WebRtc.NET/include/webrtc/modules/audio_processing/aec3/cascaded_biquad_filter.h b/WebRtc.NET/include/webrtc/modules/audio_processing/aec3/cascaded_biquad_filter.h deleted file mode 100644 index 438a166e..00000000 --- a/WebRtc.NET/include/webrtc/modules/audio_processing/aec3/cascaded_biquad_filter.h +++ /dev/null @@ -1,58 +0,0 @@ -/* - * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MODULES_AUDIO_PROCESSING_AEC3_CASCADED_BIQUAD_FILTER_H_ -#define WEBRTC_MODULES_AUDIO_PROCESSING_AEC3_CASCADED_BIQUAD_FILTER_H_ - -#include - -#include "webrtc/base/array_view.h" -#include "webrtc/base/constructormagic.h" - -namespace webrtc { - -// Applies a number of identical biquads in a cascaded manner. The filter -// implementation is direct form 1. -class CascadedBiQuadFilter { - public: - struct BiQuadState { - BiQuadState() : x(), y() {} - float x[2]; - float y[2]; - }; - - struct BiQuadCoefficients { - float b[3]; - float a[2]; - }; - - CascadedBiQuadFilter( - const CascadedBiQuadFilter::BiQuadCoefficients& coefficients, - size_t num_biquads); - ~CascadedBiQuadFilter(); - // Applies the biquads on the values in x in order to form the output in y. - void Process(rtc::ArrayView x, rtc::ArrayView y); - // Applies the biquads on the values in y in an in-place manner. - void Process(rtc::ArrayView y); - - private: - void ApplyBiQuad(rtc::ArrayView x, - rtc::ArrayView y, - CascadedBiQuadFilter::BiQuadState* biquad_state); - - std::vector biquad_states_; - const BiQuadCoefficients coefficients_; - - RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(CascadedBiQuadFilter); -}; - -} // namespace webrtc - -#endif // WEBRTC_MODULES_AUDIO_PROCESSING_AEC3_CASCADED_BIQUAD_FILTER_H_ diff --git a/WebRtc.NET/include/webrtc/modules/audio_processing/aec3/echo_canceller3.h b/WebRtc.NET/include/webrtc/modules/audio_processing/aec3/echo_canceller3.h deleted file mode 100644 index 57714b2b..00000000 --- a/WebRtc.NET/include/webrtc/modules/audio_processing/aec3/echo_canceller3.h +++ /dev/null @@ -1,133 +0,0 @@ -/* - * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MODULES_AUDIO_PROCESSING_AEC3_ECHO_CANCELLER3_H_ -#define WEBRTC_MODULES_AUDIO_PROCESSING_AEC3_ECHO_CANCELLER3_H_ - -#include "webrtc/base/constructormagic.h" -#include "webrtc/base/race_checker.h" -#include "webrtc/base/swap_queue.h" -#include "webrtc/modules/audio_processing/aec3/block_framer.h" -#include "webrtc/modules/audio_processing/aec3/block_processor.h" -#include "webrtc/modules/audio_processing/aec3/cascaded_biquad_filter.h" -#include "webrtc/modules/audio_processing/aec3/frame_blocker.h" -#include "webrtc/modules/audio_processing/audio_buffer.h" -#include "webrtc/modules/audio_processing/include/audio_processing.h" -#include "webrtc/modules/audio_processing/logging/apm_data_dumper.h" - -namespace webrtc { - -// Functor for verifying the invariance of the frames being put into the render -// queue. -class Aec3RenderQueueItemVerifier { - public: - explicit Aec3RenderQueueItemVerifier(size_t num_bands, size_t frame_length) - : num_bands_(num_bands), frame_length_(frame_length) {} - - bool operator()(const std::vector>& v) const { - if (v.size() != num_bands_) { - return false; - } - for (const auto& v_k : v) { - if (v_k.size() != frame_length_) { - return false; - } - } - return true; - } - - private: - const size_t num_bands_; - const size_t frame_length_; -}; - -// Main class for the echo canceller3. -// It does 4 things: -// -Receives 10 ms frames of band-split audio. -// -Optionally applies an anti-hum (high-pass) filter on the -// received signals. -// -Provides the lower level echo canceller functionality with -// blocks of 64 samples of audio data. -// -Partially handles the jitter in the render and capture API -// call sequence. -// -// The class is supposed to be used in a non-concurrent manner apart from the -// AnalyzeRender call which can be called concurrently with the other methods. -class EchoCanceller3 { - public: - // Normal c-tor to use. - EchoCanceller3(int sample_rate_hz, bool use_highpass_filter); - // Testing c-tor that is used only for testing purposes. - EchoCanceller3(int sample_rate_hz, - bool use_highpass_filter, - std::unique_ptr block_processor); - ~EchoCanceller3(); - // Analyzes and stores an internal copy of the split-band domain render - // signal. - bool AnalyzeRender(AudioBuffer* farend); - // Analyzes the full-band domain capture signal to detect signal saturation. - void AnalyzeCapture(AudioBuffer* capture); - // Processes the split-band domain capture signal in order to remove any echo - // present in the signal. - void ProcessCapture(AudioBuffer* capture, bool known_echo_path_change); - - // Signals whether an external detector has detected echo leakage from the - // echo canceller. - // Note that in the case echo leakage has been flagged, it should be unflagged - // once it is no longer occurring. - void ReportEchoLeakage(bool leakage_detected) { - RTC_DCHECK_RUNS_SERIALIZED(&capture_race_checker_); - block_processor_->ReportEchoLeakage(leakage_detected); - } - - // Validates a config. - static bool Validate(const AudioProcessing::Config::EchoCanceller3& config); - // Dumps a config to a string. - static std::string ToString( - const AudioProcessing::Config::EchoCanceller3& config); - - private: - class RenderWriter; - - bool EmptyRenderQueue(); - - rtc::RaceChecker capture_race_checker_; - rtc::RaceChecker render_race_checker_; - - // State that is accessed by the AnalyzeRender call. - std::unique_ptr render_writer_ GUARDED_BY(render_race_checker_); - - // State that may be accessed by the capture thread. - static int instance_count_; - std::unique_ptr data_dumper_; - const int sample_rate_hz_; - const int num_bands_; - const size_t frame_length_; - BlockFramer output_framer_ GUARDED_BY(capture_race_checker_); - FrameBlocker capture_blocker_ GUARDED_BY(capture_race_checker_); - FrameBlocker render_blocker_ GUARDED_BY(capture_race_checker_); - SwapQueue>, Aec3RenderQueueItemVerifier> - render_transfer_queue_; - std::unique_ptr block_processor_ - GUARDED_BY(capture_race_checker_); - std::vector> render_queue_output_frame_ - GUARDED_BY(capture_race_checker_); - std::unique_ptr capture_highpass_filter_ - GUARDED_BY(capture_race_checker_); - bool saturated_microphone_signal_ GUARDED_BY(capture_race_checker_) = false; - std::vector> block_ GUARDED_BY(capture_race_checker_); - std::vector> sub_frame_view_ - GUARDED_BY(capture_race_checker_); - - RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(EchoCanceller3); -}; -} // namespace webrtc - -#endif // WEBRTC_MODULES_AUDIO_PROCESSING_AEC3_ECHO_CANCELLER3_H_ diff --git a/WebRtc.NET/include/webrtc/modules/audio_processing/aec3/mock/mock_block_processor.h b/WebRtc.NET/include/webrtc/modules/audio_processing/aec3/mock/mock_block_processor.h deleted file mode 100644 index d73b095e..00000000 --- a/WebRtc.NET/include/webrtc/modules/audio_processing/aec3/mock/mock_block_processor.h +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MODULES_AUDIO_PROCESSING_AEC3_MOCK_MOCK_BLOCK_PROCESSOR_H_ -#define WEBRTC_MODULES_AUDIO_PROCESSING_AEC3_MOCK_MOCK_BLOCK_PROCESSOR_H_ - -#include - -#include "webrtc/modules/audio_processing/aec3/block_processor.h" -#include "webrtc/test/gmock.h" - -namespace webrtc { -namespace test { - -class MockBlockProcessor : public BlockProcessor { - public: - virtual ~MockBlockProcessor() {} - - MOCK_METHOD3(ProcessCapture, - void(bool known_echo_path_change, - bool saturated_microphone_signal, - std::vector>* capture_block)); - MOCK_METHOD1(BufferRender, bool(std::vector>* block)); - MOCK_METHOD1(ReportEchoLeakage, void(bool leakage_detected)); -}; - -} // namespace test -} // namespace webrtc - -#endif // WEBRTC_MODULES_AUDIO_PROCESSING_AEC3_MOCK_MOCK_BLOCK_PROCESSOR_H_ diff --git a/WebRtc.NET/include/webrtc/modules/audio_processing/aecm/aecm_defines.h b/WebRtc.NET/include/webrtc/modules/audio_processing/aecm/aecm_defines.h deleted file mode 100644 index 6d63990b..00000000 --- a/WebRtc.NET/include/webrtc/modules/audio_processing/aecm/aecm_defines.h +++ /dev/null @@ -1,87 +0,0 @@ -/* - * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MODULES_AUDIO_PROCESSING_AECM_AECM_DEFINES_H_ -#define WEBRTC_MODULES_AUDIO_PROCESSING_AECM_AECM_DEFINES_H_ - -#define AECM_DYNAMIC_Q /* Turn on/off dynamic Q-domain. */ - -/* Algorithm parameters */ -#define FRAME_LEN 80 /* Total frame length, 10 ms. */ - -#define PART_LEN 64 /* Length of partition. */ -#define PART_LEN_SHIFT 7 /* Length of (PART_LEN * 2) in base 2. */ - -#define PART_LEN1 (PART_LEN + 1) /* Unique fft coefficients. */ -#define PART_LEN2 (PART_LEN << 1) /* Length of partition * 2. */ -#define PART_LEN4 (PART_LEN << 2) /* Length of partition * 4. */ -#define FAR_BUF_LEN PART_LEN4 /* Length of buffers. */ -#define MAX_DELAY 100 - -/* Counter parameters */ -#define CONV_LEN 512 /* Convergence length used at startup. */ -#define CONV_LEN2 (CONV_LEN << 1) /* Used at startup. */ - -/* Energy parameters */ -#define MAX_BUF_LEN 64 /* History length of energy signals. */ -#define FAR_ENERGY_MIN 1025 /* Lowest Far energy level: At least 2 */ - /* in energy. */ -#define FAR_ENERGY_DIFF 929 /* Allowed difference between max */ - /* and min. */ -#define ENERGY_DEV_OFFSET 0 /* The energy error offset in Q8. */ -#define ENERGY_DEV_TOL 400 /* The energy estimation tolerance (Q8). */ -#define FAR_ENERGY_VAD_REGION 230 /* Far VAD tolerance region. */ - -/* Stepsize parameters */ -#define MU_MIN 10 /* Min stepsize 2^-MU_MIN (far end energy */ - /* dependent). */ -#define MU_MAX 1 /* Max stepsize 2^-MU_MAX (far end energy */ - /* dependent). */ -#define MU_DIFF 9 /* MU_MIN - MU_MAX */ - -/* Channel parameters */ -#define MIN_MSE_COUNT 20 /* Min number of consecutive blocks with enough */ - /* far end energy to compare channel estimates. */ -#define MIN_MSE_DIFF 29 /* The ratio between adapted and stored channel to */ - /* accept a new storage (0.8 in Q-MSE_RESOLUTION). */ -#define MSE_RESOLUTION 5 /* MSE parameter resolution. */ -#define RESOLUTION_CHANNEL16 12 /* W16 Channel in Q-RESOLUTION_CHANNEL16. */ -#define RESOLUTION_CHANNEL32 28 /* W32 Channel in Q-RESOLUTION_CHANNEL. */ -#define CHANNEL_VAD 16 /* Minimum energy in frequency band */ - /* to update channel. */ - -/* Suppression gain parameters: SUPGAIN parameters in Q-(RESOLUTION_SUPGAIN). */ -#define RESOLUTION_SUPGAIN 8 /* Channel in Q-(RESOLUTION_SUPGAIN). */ -#define SUPGAIN_DEFAULT (1 << RESOLUTION_SUPGAIN) /* Default. */ -#define SUPGAIN_ERROR_PARAM_A 3072 /* Estimation error parameter */ - /* (Maximum gain) (8 in Q8). */ -#define SUPGAIN_ERROR_PARAM_B 1536 /* Estimation error parameter */ - /* (Gain before going down). */ -#define SUPGAIN_ERROR_PARAM_D SUPGAIN_DEFAULT /* Estimation error parameter */ - /* (Should be the same as Default) (1 in Q8). */ -#define SUPGAIN_EPC_DT 200 /* SUPGAIN_ERROR_PARAM_C * ENERGY_DEV_TOL */ - -/* Defines for "check delay estimation" */ -#define CORR_WIDTH 31 /* Number of samples to correlate over. */ -#define CORR_MAX 16 /* Maximum correlation offset. */ -#define CORR_MAX_BUF 63 -#define CORR_DEV 4 -#define CORR_MAX_LEVEL 20 -#define CORR_MAX_LOW 4 -#define CORR_BUF_LEN (CORR_MAX << 1) + 1 -/* Note that CORR_WIDTH + 2*CORR_MAX <= MAX_BUF_LEN. */ - -#define ONE_Q14 (1 << 14) - -/* NLP defines */ -#define NLP_COMP_LOW 3277 /* 0.2 in Q14 */ -#define NLP_COMP_HIGH ONE_Q14 /* 1 in Q14 */ - -#endif diff --git a/WebRtc.NET/include/webrtc/modules/audio_processing/agc/gain_map_internal.h b/WebRtc.NET/include/webrtc/modules/audio_processing/agc/gain_map_internal.h deleted file mode 100644 index 53c71c11..00000000 --- a/WebRtc.NET/include/webrtc/modules/audio_processing/agc/gain_map_internal.h +++ /dev/null @@ -1,275 +0,0 @@ -/* - * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MODULES_AUDIO_PROCESSING_AGC_GAIN_MAP_INTERNAL_H_ -#define WEBRTC_MODULES_AUDIO_PROCESSING_AGC_GAIN_MAP_INTERNAL_H_ - -static const int kGainMapSize = 256; -// Uses parameters: si = 2, sf = 0.25, D = 8/256 -static const int kGainMap[kGainMapSize] = { - -56, - -54, - -52, - -50, - -48, - -47, - -45, - -43, - -42, - -40, - -38, - -37, - -35, - -34, - -33, - -31, - -30, - -29, - -27, - -26, - -25, - -24, - -23, - -22, - -20, - -19, - -18, - -17, - -16, - -15, - -14, - -14, - -13, - -12, - -11, - -10, - -9, - -8, - -8, - -7, - -6, - -5, - -5, - -4, - -3, - -2, - -2, - -1, - 0, - 0, - 1, - 1, - 2, - 3, - 3, - 4, - 4, - 5, - 5, - 6, - 6, - 7, - 7, - 8, - 8, - 9, - 9, - 10, - 10, - 11, - 11, - 12, - 12, - 13, - 13, - 13, - 14, - 14, - 15, - 15, - 15, - 16, - 16, - 17, - 17, - 17, - 18, - 18, - 18, - 19, - 19, - 19, - 20, - 20, - 21, - 21, - 21, - 22, - 22, - 22, - 23, - 23, - 23, - 24, - 24, - 24, - 24, - 25, - 25, - 25, - 26, - 26, - 26, - 27, - 27, - 27, - 28, - 28, - 28, - 28, - 29, - 29, - 29, - 30, - 30, - 30, - 30, - 31, - 31, - 31, - 32, - 32, - 32, - 32, - 33, - 33, - 33, - 33, - 34, - 34, - 34, - 35, - 35, - 35, - 35, - 36, - 36, - 36, - 36, - 37, - 37, - 37, - 38, - 38, - 38, - 38, - 39, - 39, - 39, - 39, - 40, - 40, - 40, - 40, - 41, - 41, - 41, - 41, - 42, - 42, - 42, - 42, - 43, - 43, - 43, - 44, - 44, - 44, - 44, - 45, - 45, - 45, - 45, - 46, - 46, - 46, - 46, - 47, - 47, - 47, - 47, - 48, - 48, - 48, - 48, - 49, - 49, - 49, - 49, - 50, - 50, - 50, - 50, - 51, - 51, - 51, - 51, - 52, - 52, - 52, - 52, - 53, - 53, - 53, - 53, - 54, - 54, - 54, - 54, - 55, - 55, - 55, - 55, - 56, - 56, - 56, - 56, - 57, - 57, - 57, - 57, - 58, - 58, - 58, - 58, - 59, - 59, - 59, - 59, - 60, - 60, - 60, - 60, - 61, - 61, - 61, - 61, - 62, - 62, - 62, - 62, - 63, - 63, - 63, - 63, - 64 -}; - -#endif // WEBRTC_MODULES_AUDIO_PROCESSING_AGC_GAIN_MAP_INTERNAL_H_ diff --git a/WebRtc.NET/include/webrtc/modules/audio_processing/agc/legacy/gain_control.h b/WebRtc.NET/include/webrtc/modules/audio_processing/agc/legacy/gain_control.h deleted file mode 100644 index c3157500..00000000 --- a/WebRtc.NET/include/webrtc/modules/audio_processing/agc/legacy/gain_control.h +++ /dev/null @@ -1,247 +0,0 @@ -/* - * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MODULES_AUDIO_PROCESSING_AGC_LEGACY_GAIN_CONTROL_H_ -#define WEBRTC_MODULES_AUDIO_PROCESSING_AGC_LEGACY_GAIN_CONTROL_H_ - -#include "webrtc/typedefs.h" - -// Errors -#define AGC_UNSPECIFIED_ERROR 18000 -#define AGC_UNSUPPORTED_FUNCTION_ERROR 18001 -#define AGC_UNINITIALIZED_ERROR 18002 -#define AGC_NULL_POINTER_ERROR 18003 -#define AGC_BAD_PARAMETER_ERROR 18004 - -// Warnings -#define AGC_BAD_PARAMETER_WARNING 18050 - -enum { - kAgcModeUnchanged, - kAgcModeAdaptiveAnalog, - kAgcModeAdaptiveDigital, - kAgcModeFixedDigital -}; - -enum { kAgcFalse = 0, kAgcTrue }; - -typedef struct { - int16_t targetLevelDbfs; // default 3 (-3 dBOv) - int16_t compressionGaindB; // default 9 dB - uint8_t limiterEnable; // default kAgcTrue (on) -} WebRtcAgcConfig; - -#if defined(__cplusplus) -extern "C" { -#endif - -/* - * This function analyses the number of samples passed to - * farend and produces any error code that could arise. - * - * Input: - * - agcInst : AGC instance. - * - samples : Number of samples in input vector. - * - * Return value: - * : 0 - Normal operation. - * : -1 - Error. - */ -int WebRtcAgc_GetAddFarendError(void* state, size_t samples); - -/* - * This function processes a 10 ms frame of far-end speech to determine - * if there is active speech. The length of the input speech vector must be - * given in samples (80 when FS=8000, and 160 when FS=16000, FS=32000 or - * FS=48000). - * - * Input: - * - agcInst : AGC instance. - * - inFar : Far-end input speech vector - * - samples : Number of samples in input vector - * - * Return value: - * : 0 - Normal operation. - * : -1 - Error - */ -int WebRtcAgc_AddFarend(void* agcInst, const int16_t* inFar, size_t samples); - -/* - * This function processes a 10 ms frame of microphone speech to determine - * if there is active speech. The length of the input speech vector must be - * given in samples (80 when FS=8000, and 160 when FS=16000, FS=32000 or - * FS=48000). For very low input levels, the input signal is increased in level - * by multiplying and overwriting the samples in inMic[]. - * - * This function should be called before any further processing of the - * near-end microphone signal. - * - * Input: - * - agcInst : AGC instance. - * - inMic : Microphone input speech vector for each band - * - num_bands : Number of bands in input vector - * - samples : Number of samples in input vector - * - * Return value: - * : 0 - Normal operation. - * : -1 - Error - */ -int WebRtcAgc_AddMic(void* agcInst, - int16_t* const* inMic, - size_t num_bands, - size_t samples); - -/* - * This function replaces the analog microphone with a virtual one. - * It is a digital gain applied to the input signal and is used in the - * agcAdaptiveDigital mode where no microphone level is adjustable. The length - * of the input speech vector must be given in samples (80 when FS=8000, and 160 - * when FS=16000, FS=32000 or FS=48000). - * - * Input: - * - agcInst : AGC instance. - * - inMic : Microphone input speech vector for each band - * - num_bands : Number of bands in input vector - * - samples : Number of samples in input vector - * - micLevelIn : Input level of microphone (static) - * - * Output: - * - inMic : Microphone output after processing (L band) - * - inMic_H : Microphone output after processing (H band) - * - micLevelOut : Adjusted microphone level after processing - * - * Return value: - * : 0 - Normal operation. - * : -1 - Error - */ -int WebRtcAgc_VirtualMic(void* agcInst, - int16_t* const* inMic, - size_t num_bands, - size_t samples, - int32_t micLevelIn, - int32_t* micLevelOut); - -/* - * This function processes a 10 ms frame and adjusts (normalizes) the gain both - * analog and digitally. The gain adjustments are done only during active - * periods of speech. The length of the speech vectors must be given in samples - * (80 when FS=8000, and 160 when FS=16000, FS=32000 or FS=48000). The echo - * parameter can be used to ensure the AGC will not adjust upward in the - * presence of echo. - * - * This function should be called after processing the near-end microphone - * signal, in any case after any echo cancellation. - * - * Input: - * - agcInst : AGC instance - * - inNear : Near-end input speech vector for each band - * - num_bands : Number of bands in input/output vector - * - samples : Number of samples in input/output vector - * - inMicLevel : Current microphone volume level - * - echo : Set to 0 if the signal passed to add_mic is - * almost certainly free of echo; otherwise set - * to 1. If you have no information regarding echo - * set to 0. - * - * Output: - * - outMicLevel : Adjusted microphone volume level - * - out : Gain-adjusted near-end speech vector - * : May be the same vector as the input. - * - saturationWarning : A returned value of 1 indicates a saturation event - * has occurred and the volume cannot be further - * reduced. Otherwise will be set to 0. - * - * Return value: - * : 0 - Normal operation. - * : -1 - Error - */ -int WebRtcAgc_Process(void* agcInst, - const int16_t* const* inNear, - size_t num_bands, - size_t samples, - int16_t* const* out, - int32_t inMicLevel, - int32_t* outMicLevel, - int16_t echo, - uint8_t* saturationWarning); - -/* - * This function sets the config parameters (targetLevelDbfs, - * compressionGaindB and limiterEnable). - * - * Input: - * - agcInst : AGC instance - * - config : config struct - * - * Output: - * - * Return value: - * : 0 - Normal operation. - * : -1 - Error - */ -int WebRtcAgc_set_config(void* agcInst, WebRtcAgcConfig config); - -/* - * This function returns the config parameters (targetLevelDbfs, - * compressionGaindB and limiterEnable). - * - * Input: - * - agcInst : AGC instance - * - * Output: - * - config : config struct - * - * Return value: - * : 0 - Normal operation. - * : -1 - Error - */ -int WebRtcAgc_get_config(void* agcInst, WebRtcAgcConfig* config); - -/* - * This function creates and returns an AGC instance, which will contain the - * state information for one (duplex) channel. - */ -void* WebRtcAgc_Create(); - -/* - * This function frees the AGC instance created at the beginning. - * - * Input: - * - agcInst : AGC instance. - */ -void WebRtcAgc_Free(void* agcInst); - -/* - * This function initializes an AGC instance. - * - * Input: - * - agcInst : AGC instance. - * - minLevel : Minimum possible mic level - * - maxLevel : Maximum possible mic level - * - agcMode : 0 - Unchanged - * : 1 - Adaptive Analog Automatic Gain Control -3dBOv - * : 2 - Adaptive Digital Automatic Gain Control -3dBOv - * : 3 - Fixed Digital Gain 0dB - * - fs : Sampling frequency - * - * Return value : 0 - Ok - * -1 - Error - */ -int WebRtcAgc_Init(void* agcInst, - int32_t minLevel, - int32_t maxLevel, - int16_t agcMode, - uint32_t fs); - -#if defined(__cplusplus) -} -#endif - -#endif // WEBRTC_MODULES_AUDIO_PROCESSING_AGC_LEGACY_GAIN_CONTROL_H_ diff --git a/WebRtc.NET/include/webrtc/modules/audio_processing/agc/mock_agc.h b/WebRtc.NET/include/webrtc/modules/audio_processing/agc/mock_agc.h deleted file mode 100644 index 3b9c22fb..00000000 --- a/WebRtc.NET/include/webrtc/modules/audio_processing/agc/mock_agc.h +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MODULES_AUDIO_PROCESSING_AGC_MOCK_AGC_H_ -#define WEBRTC_MODULES_AUDIO_PROCESSING_AGC_MOCK_AGC_H_ - -#include "webrtc/modules/audio_processing/agc/agc.h" - -#include "webrtc/modules/include/module_common_types.h" -#include "webrtc/test/gmock.h" - -namespace webrtc { - -class MockAgc : public Agc { - public: - MOCK_METHOD2(AnalyzePreproc, float(const int16_t* audio, size_t length)); - MOCK_METHOD3(Process, int(const int16_t* audio, size_t length, - int sample_rate_hz)); - MOCK_METHOD1(GetRmsErrorDb, bool(int* error)); - MOCK_METHOD0(Reset, void()); - MOCK_METHOD1(set_target_level_dbfs, int(int level)); - MOCK_CONST_METHOD0(target_level_dbfs, int()); - MOCK_METHOD1(EnableStandaloneVad, void(bool enable)); - MOCK_CONST_METHOD0(standalone_vad_enabled, bool()); -}; - -} // namespace webrtc - -#endif // WEBRTC_MODULES_AUDIO_PROCESSING_AGC_MOCK_AGC_H_ diff --git a/WebRtc.NET/include/webrtc/modules/audio_processing/agc/utility.h b/WebRtc.NET/include/webrtc/modules/audio_processing/agc/utility.h deleted file mode 100644 index df85c2e1..00000000 --- a/WebRtc.NET/include/webrtc/modules/audio_processing/agc/utility.h +++ /dev/null @@ -1,23 +0,0 @@ -/* - * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MODULES_AUDIO_PROCESSING_AGC_UTILITY_H_ -#define WEBRTC_MODULES_AUDIO_PROCESSING_AGC_UTILITY_H_ - -// TODO(turajs): Add description of function. -double Loudness2Db(double loudness); - -double Linear2Loudness(double rms); - -double Db2Loudness(double db); - -double Dbfs2Loudness(double dbfs); - -#endif // WEBRTC_MODULES_AUDIO_PROCESSING_AGC_UTILITY_H_ diff --git a/WebRtc.NET/include/webrtc/modules/audio_processing/audio_processing_impl.h b/WebRtc.NET/include/webrtc/modules/audio_processing/audio_processing_impl.h deleted file mode 100644 index 01b640fc..00000000 --- a/WebRtc.NET/include/webrtc/modules/audio_processing/audio_processing_impl.h +++ /dev/null @@ -1,437 +0,0 @@ -/* - * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MODULES_AUDIO_PROCESSING_AUDIO_PROCESSING_IMPL_H_ -#define WEBRTC_MODULES_AUDIO_PROCESSING_AUDIO_PROCESSING_IMPL_H_ - -#include -#include -#include -#include - -#include "webrtc/base/criticalsection.h" -#include "webrtc/base/function_view.h" -#include "webrtc/base/gtest_prod_util.h" -#include "webrtc/base/ignore_wundef.h" -#include "webrtc/base/swap_queue.h" -#include "webrtc/base/thread_annotations.h" -#include "webrtc/modules/audio_processing/audio_buffer.h" -#include "webrtc/modules/audio_processing/include/audio_processing.h" -#include "webrtc/modules/audio_processing/render_queue_item_verifier.h" -#include "webrtc/modules/audio_processing/rms_level.h" -#include "webrtc/system_wrappers/include/file_wrapper.h" - -#ifdef WEBRTC_AUDIOPROC_DEBUG_DUMP -// Files generated at build-time by the protobuf compiler. -RTC_PUSH_IGNORING_WUNDEF() -#ifdef WEBRTC_ANDROID_PLATFORM_BUILD -#include "external/webrtc/webrtc/modules/audio_processing/debug.pb.h" -#else -#include "webrtc/modules/audio_processing/debug.pb.h" -#endif -RTC_POP_IGNORING_WUNDEF() -#endif // WEBRTC_AUDIOPROC_DEBUG_DUMP - -namespace webrtc { - -class AgcManagerDirect; -class AudioConverter; - -class NonlinearBeamformer; - -class AudioProcessingImpl : public AudioProcessing { - public: - // Methods forcing APM to run in a single-threaded manner. - // Acquires both the render and capture locks. - explicit AudioProcessingImpl(const webrtc::Config& config); - // AudioProcessingImpl takes ownership of beamformer. - AudioProcessingImpl(const webrtc::Config& config, - NonlinearBeamformer* beamformer); - ~AudioProcessingImpl() override; - int Initialize() override; - int Initialize(int capture_input_sample_rate_hz, - int capture_output_sample_rate_hz, - int render_sample_rate_hz, - ChannelLayout capture_input_layout, - ChannelLayout capture_output_layout, - ChannelLayout render_input_layout) override; - int Initialize(const ProcessingConfig& processing_config) override; - void ApplyConfig(const AudioProcessing::Config& config) override; - void SetExtraOptions(const webrtc::Config& config) override; - void UpdateHistogramsOnCallEnd() override; - int StartDebugRecording(const char filename[kMaxFilenameSize], - int64_t max_log_size_bytes) override; - int StartDebugRecording(FILE* handle, int64_t max_log_size_bytes) override; - int StartDebugRecording(FILE* handle) override; - int StartDebugRecordingForPlatformFile(rtc::PlatformFile handle) override; - int StopDebugRecording() override; - - // Capture-side exclusive methods possibly running APM in a - // multi-threaded manner. Acquire the capture lock. - int ProcessStream(AudioFrame* frame) override; - int ProcessStream(const float* const* src, - size_t samples_per_channel, - int input_sample_rate_hz, - ChannelLayout input_layout, - int output_sample_rate_hz, - ChannelLayout output_layout, - float* const* dest) override; - int ProcessStream(const float* const* src, - const StreamConfig& input_config, - const StreamConfig& output_config, - float* const* dest) override; - void set_output_will_be_muted(bool muted) override; - int set_stream_delay_ms(int delay) override; - void set_delay_offset_ms(int offset) override; - int delay_offset_ms() const override; - void set_stream_key_pressed(bool key_pressed) override; - - // Render-side exclusive methods possibly running APM in a - // multi-threaded manner. Acquire the render lock. - int ProcessReverseStream(AudioFrame* frame) override; - int AnalyzeReverseStream(const float* const* data, - size_t samples_per_channel, - int sample_rate_hz, - ChannelLayout layout) override; - int ProcessReverseStream(const float* const* src, - const StreamConfig& input_config, - const StreamConfig& output_config, - float* const* dest) override; - - // Methods only accessed from APM submodules or - // from AudioProcessing tests in a single-threaded manner. - // Hence there is no need for locks in these. - int proc_sample_rate_hz() const override; - int proc_split_sample_rate_hz() const override; - size_t num_input_channels() const override; - size_t num_proc_channels() const override; - size_t num_output_channels() const override; - size_t num_reverse_channels() const override; - int stream_delay_ms() const override; - bool was_stream_delay_set() const override - EXCLUSIVE_LOCKS_REQUIRED(crit_capture_); - - AudioProcessingStatistics GetStatistics() const override; - - // Methods returning pointers to APM submodules. - // No locks are aquired in those, as those locks - // would offer no protection (the submodules are - // created only once in a single-treaded manner - // during APM creation). - EchoCancellation* echo_cancellation() const override; - EchoControlMobile* echo_control_mobile() const override; - GainControl* gain_control() const override; - // TODO(peah): Deprecate this API call. - HighPassFilter* high_pass_filter() const override; - LevelEstimator* level_estimator() const override; - NoiseSuppression* noise_suppression() const override; - VoiceDetection* voice_detection() const override; - - // TODO(peah): Remove these two methods once the new API allows that. - void MutateConfig(rtc::FunctionView mutator); - AudioProcessing::Config GetConfig() const; - - protected: - // Overridden in a mock. - virtual int InitializeLocked() - EXCLUSIVE_LOCKS_REQUIRED(crit_render_, crit_capture_); - - private: - // TODO(peah): These friend classes should be removed as soon as the new - // parameter setting scheme allows. - FRIEND_TEST_ALL_PREFIXES(ApmConfiguration, DefaultBehavior); - FRIEND_TEST_ALL_PREFIXES(ApmConfiguration, ValidConfigBehavior); - FRIEND_TEST_ALL_PREFIXES(ApmConfiguration, InValidConfigBehavior); - struct ApmPublicSubmodules; - struct ApmPrivateSubmodules; - - // Submodule interface implementations. - std::unique_ptr high_pass_filter_impl_; - - class ApmSubmoduleStates { - public: - ApmSubmoduleStates(); - // Updates the submodule state and returns true if it has changed. - bool Update(bool low_cut_filter_enabled, - bool echo_canceller_enabled, - bool mobile_echo_controller_enabled, - bool residual_echo_detector_enabled, - bool noise_suppressor_enabled, - bool intelligibility_enhancer_enabled, - bool beamformer_enabled, - bool adaptive_gain_controller_enabled, - bool level_controller_enabled, - bool echo_canceller3_enabled, - bool voice_activity_detector_enabled, - bool level_estimator_enabled, - bool transient_suppressor_enabled); - bool CaptureMultiBandSubModulesActive() const; - bool CaptureMultiBandProcessingActive() const; - bool RenderMultiBandSubModulesActive() const; - bool RenderMultiBandProcessingActive() const; - - private: - bool low_cut_filter_enabled_ = false; - bool echo_canceller_enabled_ = false; - bool mobile_echo_controller_enabled_ = false; - bool residual_echo_detector_enabled_ = false; - bool noise_suppressor_enabled_ = false; - bool intelligibility_enhancer_enabled_ = false; - bool beamformer_enabled_ = false; - bool adaptive_gain_controller_enabled_ = false; - bool level_controller_enabled_ = false; - bool echo_canceller3_enabled_ = false; - bool level_estimator_enabled_ = false; - bool voice_activity_detector_enabled_ = false; - bool transient_suppressor_enabled_ = false; - bool first_update_ = true; - }; - -#ifdef WEBRTC_AUDIOPROC_DEBUG_DUMP - // State for the debug dump. - struct ApmDebugDumpThreadState { - ApmDebugDumpThreadState(); - ~ApmDebugDumpThreadState(); - std::unique_ptr event_msg; // Protobuf message. - std::string event_str; // Memory for protobuf serialization. - - // Serialized string of last saved APM configuration. - std::string last_serialized_config; - }; - - struct ApmDebugDumpState { - ApmDebugDumpState(); - ~ApmDebugDumpState(); - // Number of bytes that can still be written to the log before the maximum - // size is reached. A value of <= 0 indicates that no limit is used. - int64_t num_bytes_left_for_log_ = -1; - std::unique_ptr debug_file; - ApmDebugDumpThreadState render; - ApmDebugDumpThreadState capture; - }; -#endif - - // Method for modifying the formats struct that are called from both - // the render and capture threads. The check for whether modifications - // are needed is done while holding the render lock only, thereby avoiding - // that the capture thread blocks the render thread. - // The struct is modified in a single-threaded manner by holding both the - // render and capture locks. - int MaybeInitialize(const ProcessingConfig& config, bool force_initialization) - EXCLUSIVE_LOCKS_REQUIRED(crit_render_); - - int MaybeInitializeRender(const ProcessingConfig& processing_config) - EXCLUSIVE_LOCKS_REQUIRED(crit_render_); - - int MaybeInitializeCapture(const ProcessingConfig& processing_config, - bool force_initialization) - EXCLUSIVE_LOCKS_REQUIRED(crit_render_); - - // Method for updating the state keeping track of the active submodules. - // Returns a bool indicating whether the state has changed. - bool UpdateActiveSubmoduleStates() EXCLUSIVE_LOCKS_REQUIRED(crit_capture_); - - // Methods requiring APM running in a single-threaded manner. - // Are called with both the render and capture locks already - // acquired. - void InitializeTransient() - EXCLUSIVE_LOCKS_REQUIRED(crit_render_, crit_capture_); - void InitializeBeamformer() - EXCLUSIVE_LOCKS_REQUIRED(crit_render_, crit_capture_); - void InitializeIntelligibility() - EXCLUSIVE_LOCKS_REQUIRED(crit_render_, crit_capture_); - int InitializeLocked(const ProcessingConfig& config) - EXCLUSIVE_LOCKS_REQUIRED(crit_render_, crit_capture_); - void InitializeLevelController() EXCLUSIVE_LOCKS_REQUIRED(crit_capture_); - void InitializeResidualEchoDetector() - EXCLUSIVE_LOCKS_REQUIRED(crit_render_, crit_capture_); - void InitializeLowCutFilter() EXCLUSIVE_LOCKS_REQUIRED(crit_capture_); - void InitializeEchoCanceller3() EXCLUSIVE_LOCKS_REQUIRED(crit_capture_); - - void EmptyQueuedRenderAudio(); - void AllocateRenderQueue() - EXCLUSIVE_LOCKS_REQUIRED(crit_render_, crit_capture_); - void QueueRenderAudio(AudioBuffer* audio) - EXCLUSIVE_LOCKS_REQUIRED(crit_render_); - - // Capture-side exclusive methods possibly running APM in a multi-threaded - // manner that are called with the render lock already acquired. - int ProcessCaptureStreamLocked() EXCLUSIVE_LOCKS_REQUIRED(crit_capture_); - void MaybeUpdateHistograms() EXCLUSIVE_LOCKS_REQUIRED(crit_capture_); - - // Render-side exclusive methods possibly running APM in a multi-threaded - // manner that are called with the render lock already acquired. - // TODO(ekm): Remove once all clients updated to new interface. - int AnalyzeReverseStreamLocked(const float* const* src, - const StreamConfig& input_config, - const StreamConfig& output_config) - EXCLUSIVE_LOCKS_REQUIRED(crit_render_); - int ProcessRenderStreamLocked() EXCLUSIVE_LOCKS_REQUIRED(crit_render_); - -// Debug dump methods that are internal and called without locks. -// TODO(peah): Make thread safe. -#ifdef WEBRTC_AUDIOPROC_DEBUG_DUMP - // TODO(andrew): make this more graceful. Ideally we would split this stuff - // out into a separate class with an "enabled" and "disabled" implementation. - static int WriteMessageToDebugFile(FileWrapper* debug_file, - int64_t* filesize_limit_bytes, - rtc::CriticalSection* crit_debug, - ApmDebugDumpThreadState* debug_state); - int WriteInitMessage() EXCLUSIVE_LOCKS_REQUIRED(crit_render_, crit_capture_); - - // Writes Config message. If not |forced|, only writes the current config if - // it is different from the last saved one; if |forced|, writes the config - // regardless of the last saved. - int WriteConfigMessage(bool forced) EXCLUSIVE_LOCKS_REQUIRED(crit_capture_) - EXCLUSIVE_LOCKS_REQUIRED(crit_capture_); - - // Critical section. - rtc::CriticalSection crit_debug_; - - // Debug dump state. - ApmDebugDumpState debug_dump_; -#endif - - // Critical sections. - rtc::CriticalSection crit_render_ ACQUIRED_BEFORE(crit_capture_); - rtc::CriticalSection crit_capture_; - - // Struct containing the Config specifying the behavior of APM. - AudioProcessing::Config config_; - - // Class containing information about what submodules are active. - ApmSubmoduleStates submodule_states_; - - // Structs containing the pointers to the submodules. - std::unique_ptr public_submodules_; - std::unique_ptr private_submodules_; - - // State that is written to while holding both the render and capture locks - // but can be read without any lock being held. - // As this is only accessed internally of APM, and all internal methods in APM - // either are holding the render or capture locks, this construct is safe as - // it is not possible to read the variables while writing them. - struct ApmFormatState { - ApmFormatState() - : // Format of processing streams at input/output call sites. - api_format({{{kSampleRate16kHz, 1, false}, - {kSampleRate16kHz, 1, false}, - {kSampleRate16kHz, 1, false}, - {kSampleRate16kHz, 1, false}}}), - render_processing_format(kSampleRate16kHz, 1) {} - ProcessingConfig api_format; - StreamConfig render_processing_format; - } formats_; - - // APM constants. - const struct ApmConstants { - ApmConstants(int agc_startup_min_volume, - int agc_clipped_level_min, - bool use_experimental_agc) - : // Format of processing streams at input/output call sites. - agc_startup_min_volume(agc_startup_min_volume), - agc_clipped_level_min(agc_clipped_level_min), - use_experimental_agc(use_experimental_agc) {} - int agc_startup_min_volume; - int agc_clipped_level_min; - bool use_experimental_agc; - } constants_; - - struct ApmCaptureState { - ApmCaptureState(bool transient_suppressor_enabled, - const std::vector& array_geometry, - SphericalPointf target_direction); - ~ApmCaptureState(); - int aec_system_delay_jumps; - int delay_offset_ms; - bool was_stream_delay_set; - int last_stream_delay_ms; - int last_aec_system_delay_ms; - int stream_delay_jumps; - bool output_will_be_muted; - bool key_pressed; - bool transient_suppressor_enabled; - std::vector array_geometry; - SphericalPointf target_direction; - std::unique_ptr capture_audio; - // Only the rate and samples fields of capture_processing_format_ are used - // because the capture processing number of channels is mutable and is - // tracked by the capture_audio_. - StreamConfig capture_processing_format; - int split_rate; - } capture_ GUARDED_BY(crit_capture_); - - struct ApmCaptureNonLockedState { - ApmCaptureNonLockedState(bool beamformer_enabled, - bool intelligibility_enabled) - : capture_processing_format(kSampleRate16kHz), - split_rate(kSampleRate16kHz), - stream_delay_ms(0), - beamformer_enabled(beamformer_enabled), - intelligibility_enabled(intelligibility_enabled) {} - // Only the rate and samples fields of capture_processing_format_ are used - // because the forward processing number of channels is mutable and is - // tracked by the capture_audio_. - StreamConfig capture_processing_format; - int split_rate; - int stream_delay_ms; - bool beamformer_enabled; - bool intelligibility_enabled; - bool level_controller_enabled = false; - bool echo_canceller3_enabled = false; - } capture_nonlocked_; - - struct ApmRenderState { - ApmRenderState(); - ~ApmRenderState(); - std::unique_ptr render_converter; - std::unique_ptr render_audio; - } render_ GUARDED_BY(crit_render_); - - size_t aec_render_queue_element_max_size_ GUARDED_BY(crit_render_) - GUARDED_BY(crit_capture_) = 0; - std::vector aec_render_queue_buffer_ GUARDED_BY(crit_render_); - std::vector aec_capture_queue_buffer_ GUARDED_BY(crit_capture_); - - size_t aecm_render_queue_element_max_size_ GUARDED_BY(crit_render_) - GUARDED_BY(crit_capture_) = 0; - std::vector aecm_render_queue_buffer_ GUARDED_BY(crit_render_); - std::vector aecm_capture_queue_buffer_ GUARDED_BY(crit_capture_); - - size_t agc_render_queue_element_max_size_ GUARDED_BY(crit_render_) - GUARDED_BY(crit_capture_) = 0; - std::vector agc_render_queue_buffer_ GUARDED_BY(crit_render_); - std::vector agc_capture_queue_buffer_ GUARDED_BY(crit_capture_); - - size_t red_render_queue_element_max_size_ GUARDED_BY(crit_render_) - GUARDED_BY(crit_capture_) = 0; - std::vector red_render_queue_buffer_ GUARDED_BY(crit_render_); - std::vector red_capture_queue_buffer_ GUARDED_BY(crit_capture_); - - RmsLevel capture_input_rms_ GUARDED_BY(crit_capture_); - RmsLevel capture_output_rms_ GUARDED_BY(crit_capture_); - int capture_rms_interval_counter_ GUARDED_BY(crit_capture_) = 0; - - // Lock protection not needed. - std::unique_ptr, RenderQueueItemVerifier>> - aec_render_signal_queue_; - std::unique_ptr< - SwapQueue, RenderQueueItemVerifier>> - aecm_render_signal_queue_; - std::unique_ptr< - SwapQueue, RenderQueueItemVerifier>> - agc_render_signal_queue_; - std::unique_ptr, RenderQueueItemVerifier>> - red_render_signal_queue_; -}; - -} // namespace webrtc - -#endif // WEBRTC_MODULES_AUDIO_PROCESSING_AUDIO_PROCESSING_IMPL_H_ diff --git a/WebRtc.NET/include/webrtc/modules/audio_processing/beamformer/array_util.h b/WebRtc.NET/include/webrtc/modules/audio_processing/beamformer/array_util.h deleted file mode 100644 index f86ad5de..00000000 --- a/WebRtc.NET/include/webrtc/modules/audio_processing/beamformer/array_util.h +++ /dev/null @@ -1,117 +0,0 @@ -/* - * Copyright (c) 2015 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MODULES_AUDIO_PROCESSING_BEAMFORMER_ARRAY_UTIL_H_ -#define WEBRTC_MODULES_AUDIO_PROCESSING_BEAMFORMER_ARRAY_UTIL_H_ - -#include -#include - -#include "webrtc/base/optional.h" - -namespace webrtc { - -// Coordinates in meters. The convention used is: -// x: the horizontal dimension, with positive to the right from the camera's -// perspective. -// y: the depth dimension, with positive forward from the camera's -// perspective. -// z: the vertical dimension, with positive upwards. -template -struct CartesianPoint { - CartesianPoint() { - c[0] = 0; - c[1] = 0; - c[2] = 0; - } - CartesianPoint(T x, T y, T z) { - c[0] = x; - c[1] = y; - c[2] = z; - } - T x() const { return c[0]; } - T y() const { return c[1]; } - T z() const { return c[2]; } - T c[3]; -}; - -using Point = CartesianPoint; - -// Calculates the direction from a to b. -Point PairDirection(const Point& a, const Point& b); - -float DotProduct(const Point& a, const Point& b); -Point CrossProduct(const Point& a, const Point& b); - -bool AreParallel(const Point& a, const Point& b); -bool ArePerpendicular(const Point& a, const Point& b); - -// Returns the minimum distance between any two Points in the given -// |array_geometry|. -float GetMinimumSpacing(const std::vector& array_geometry); - -// If the given array geometry is linear it returns the direction without -// normalizing. -rtc::Optional GetDirectionIfLinear( - const std::vector& array_geometry); - -// If the given array geometry is planar it returns the normal without -// normalizing. -rtc::Optional GetNormalIfPlanar( - const std::vector& array_geometry); - -// Returns the normal of an array if it has one and it is in the xy-plane. -rtc::Optional GetArrayNormalIfExists( - const std::vector& array_geometry); - -// The resulting Point will be in the xy-plane. -Point AzimuthToPoint(float azimuth); - -template -float Distance(CartesianPoint a, CartesianPoint b) { - return std::sqrt((a.x() - b.x()) * (a.x() - b.x()) + - (a.y() - b.y()) * (a.y() - b.y()) + - (a.z() - b.z()) * (a.z() - b.z())); -} - -// The convention used: -// azimuth: zero is to the right from the camera's perspective, with positive -// angles in radians counter-clockwise. -// elevation: zero is horizontal, with positive angles in radians upwards. -// radius: distance from the camera in meters. -template -struct SphericalPoint { - SphericalPoint(T azimuth, T elevation, T radius) { - s[0] = azimuth; - s[1] = elevation; - s[2] = radius; - } - T azimuth() const { return s[0]; } - T elevation() const { return s[1]; } - T distance() const { return s[2]; } - T s[3]; -}; - -using SphericalPointf = SphericalPoint; - -// Helper functions to transform degrees to radians and the inverse. -template -T DegreesToRadians(T angle_degrees) { - return M_PI * angle_degrees / 180; -} - -template -T RadiansToDegrees(T angle_radians) { - return 180 * angle_radians / M_PI; -} - -} // namespace webrtc - -#endif // WEBRTC_MODULES_AUDIO_PROCESSING_BEAMFORMER_ARRAY_UTIL_H_ diff --git a/WebRtc.NET/include/webrtc/modules/audio_processing/beamformer/complex_matrix.h b/WebRtc.NET/include/webrtc/modules/audio_processing/beamformer/complex_matrix.h deleted file mode 100644 index fe0e24c0..00000000 --- a/WebRtc.NET/include/webrtc/modules/audio_processing/beamformer/complex_matrix.h +++ /dev/null @@ -1,96 +0,0 @@ -/* - * Copyright (c) 2014 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MODULES_AUDIO_PROCESSING_BEAMFORMER_COMPLEX_MATRIX_H_ -#define WEBRTC_MODULES_AUDIO_PROCESSING_BEAMFORMER_COMPLEX_MATRIX_H_ - -#include - -#include "webrtc/base/checks.h" -#include "webrtc/modules/audio_processing/beamformer/matrix.h" - -namespace webrtc { - -using std::complex; - -// An extension of Matrix for operations that only work on a complex type. -template -class ComplexMatrix : public Matrix > { - public: - ComplexMatrix() : Matrix >() {} - - ComplexMatrix(size_t num_rows, size_t num_columns) - : Matrix >(num_rows, num_columns) {} - - ComplexMatrix(const complex* data, size_t num_rows, size_t num_columns) - : Matrix >(data, num_rows, num_columns) {} - - // Complex Matrix operations. - ComplexMatrix& PointwiseConjugate() { - complex* const data = this->data(); - size_t size = this->num_rows() * this->num_columns(); - for (size_t i = 0; i < size; ++i) { - data[i] = conj(data[i]); - } - - return *this; - } - - ComplexMatrix& PointwiseConjugate(const ComplexMatrix& operand) { - this->CopyFrom(operand); - return PointwiseConjugate(); - } - - ComplexMatrix& ConjugateTranspose() { - this->CopyDataToScratch(); - size_t num_rows = this->num_rows(); - this->SetNumRows(this->num_columns()); - this->SetNumColumns(num_rows); - this->Resize(); - return ConjugateTranspose(this->scratch_elements()); - } - - ComplexMatrix& ConjugateTranspose(const ComplexMatrix& operand) { - RTC_CHECK_EQ(operand.num_rows(), this->num_columns()); - RTC_CHECK_EQ(operand.num_columns(), this->num_rows()); - return ConjugateTranspose(operand.elements()); - } - - ComplexMatrix& ZeroImag() { - complex* const data = this->data(); - size_t size = this->num_rows() * this->num_columns(); - for (size_t i = 0; i < size; ++i) { - data[i] = complex(data[i].real(), 0); - } - - return *this; - } - - ComplexMatrix& ZeroImag(const ComplexMatrix& operand) { - this->CopyFrom(operand); - return ZeroImag(); - } - - private: - ComplexMatrix& ConjugateTranspose(const complex* const* src) { - complex* const* elements = this->elements(); - for (size_t i = 0; i < this->num_rows(); ++i) { - for (size_t j = 0; j < this->num_columns(); ++j) { - elements[i][j] = conj(src[j][i]); - } - } - - return *this; - } -}; - -} // namespace webrtc - -#endif // WEBRTC_MODULES_AUDIO_PROCESSING_BEAMFORMER_COMPLEX_MATRIX_H_ diff --git a/WebRtc.NET/include/webrtc/modules/audio_processing/beamformer/covariance_matrix_generator.h b/WebRtc.NET/include/webrtc/modules/audio_processing/beamformer/covariance_matrix_generator.h deleted file mode 100644 index 5375518e..00000000 --- a/WebRtc.NET/include/webrtc/modules/audio_processing/beamformer/covariance_matrix_generator.h +++ /dev/null @@ -1,54 +0,0 @@ -/* - * Copyright (c) 2014 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MODULES_AUDIO_PROCESSING_BEAMFORMER_COVARIANCE_MATRIX_GENERATOR_H_ -#define WEBRTC_MODULES_AUDIO_PROCESSING_BEAMFORMER_COVARIANCE_MATRIX_GENERATOR_H_ - -#include "webrtc/modules/audio_processing/beamformer/complex_matrix.h" -#include "webrtc/modules/audio_processing/beamformer/array_util.h" - -namespace webrtc { - -// Helper class for Beamformer in charge of generating covariance matrices. For -// each function, the passed-in ComplexMatrix is expected to be of size -// |num_input_channels| x |num_input_channels|. -class CovarianceMatrixGenerator { - public: - // A uniform covariance matrix with a gap at the target location. WARNING: - // The target angle is assumed to be 0. - static void UniformCovarianceMatrix(float wave_number, - const std::vector& geometry, - ComplexMatrix* mat); - - // The covariance matrix of a source at the given angle. - static void AngledCovarianceMatrix(float sound_speed, - float angle, - size_t frequency_bin, - size_t fft_size, - size_t num_freq_bins, - int sample_rate, - const std::vector& geometry, - ComplexMatrix* mat); - - // Calculates phase shifts that, when applied to a multichannel signal and - // added together, cause constructive interferernce for sources located at - // the given angle. - static void PhaseAlignmentMasks(size_t frequency_bin, - size_t fft_size, - int sample_rate, - float sound_speed, - const std::vector& geometry, - float angle, - ComplexMatrix* mat); -}; - -} // namespace webrtc - -#endif // WEBRTC_MODULES_AUDIO_PROCESSING_BEAMFORMER_BF_HELPERS_H_ diff --git a/WebRtc.NET/include/webrtc/modules/audio_processing/beamformer/matrix.h b/WebRtc.NET/include/webrtc/modules/audio_processing/beamformer/matrix.h deleted file mode 100644 index 40b47934..00000000 --- a/WebRtc.NET/include/webrtc/modules/audio_processing/beamformer/matrix.h +++ /dev/null @@ -1,369 +0,0 @@ -/* - * Copyright (c) 2014 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MODULES_AUDIO_PROCESSING_BEAMFORMER_MATRIX_H_ -#define WEBRTC_MODULES_AUDIO_PROCESSING_BEAMFORMER_MATRIX_H_ - -#include -#include -#include -#include - -#include "webrtc/base/checks.h" -#include "webrtc/base/constructormagic.h" - -namespace { - -// Wrappers to get around the compiler warning resulting from the fact that -// there's no std::sqrt overload for ints. We cast all non-complex types to -// a double for the sqrt method. -template -T sqrt_wrapper(T x) { - return sqrt(static_cast(x)); -} - -template -std::complex sqrt_wrapper(std::complex x) { - return sqrt(x); -} -} // namespace - -namespace webrtc { - -// Matrix is a class for doing standard matrix operations on 2 dimensional -// matrices of any size. Results of matrix operations are stored in the -// calling object. Function overloads exist for both in-place (the calling -// object is used as both an operand and the result) and out-of-place (all -// operands are passed in as parameters) operations. If operand dimensions -// mismatch, the program crashes. Out-of-place operations change the size of -// the calling object, if necessary, before operating. -// -// 'In-place' operations that inherently change the size of the matrix (eg. -// Transpose, Multiply on different-sized matrices) must make temporary copies -// (|scratch_elements_| and |scratch_data_|) of existing data to complete the -// operations. -// -// The data is stored contiguously. Data can be accessed internally as a flat -// array, |data_|, or as an array of row pointers, |elements_|, but is -// available to users only as an array of row pointers through |elements()|. -// Memory for storage is allocated when a matrix is resized only if the new -// size overflows capacity. Memory needed temporarily for any operations is -// similarly resized only if the new size overflows capacity. -// -// If you pass in storage through the ctor, that storage is copied into the -// matrix. TODO(claguna): albeit tricky, allow for data to be referenced -// instead of copied, and owned by the user. -template -class Matrix { - public: - Matrix() : num_rows_(0), num_columns_(0) {} - - // Allocates space for the elements and initializes all values to zero. - Matrix(size_t num_rows, size_t num_columns) - : num_rows_(num_rows), num_columns_(num_columns) { - Resize(); - scratch_data_.resize(num_rows_ * num_columns_); - scratch_elements_.resize(num_rows_); - } - - // Copies |data| into the new Matrix. - Matrix(const T* data, size_t num_rows, size_t num_columns) - : num_rows_(0), num_columns_(0) { - CopyFrom(data, num_rows, num_columns); - scratch_data_.resize(num_rows_ * num_columns_); - scratch_elements_.resize(num_rows_); - } - - virtual ~Matrix() {} - - // Deep copy an existing matrix. - void CopyFrom(const Matrix& other) { - CopyFrom(&other.data_[0], other.num_rows_, other.num_columns_); - } - - // Copy |data| into the Matrix. The current data is lost. - void CopyFrom(const T* const data, size_t num_rows, size_t num_columns) { - Resize(num_rows, num_columns); - memcpy(&data_[0], data, num_rows_ * num_columns_ * sizeof(data_[0])); - } - - Matrix& CopyFromColumn(const T* const* src, - size_t column_index, - size_t num_rows) { - Resize(1, num_rows); - for (size_t i = 0; i < num_columns_; ++i) { - data_[i] = src[i][column_index]; - } - - return *this; - } - - void Resize(size_t num_rows, size_t num_columns) { - if (num_rows != num_rows_ || num_columns != num_columns_) { - num_rows_ = num_rows; - num_columns_ = num_columns; - Resize(); - } - } - - // Accessors and mutators. - size_t num_rows() const { return num_rows_; } - size_t num_columns() const { return num_columns_; } - T* const* elements() { return &elements_[0]; } - const T* const* elements() const { return &elements_[0]; } - - T Trace() { - RTC_CHECK_EQ(num_rows_, num_columns_); - - T trace = 0; - for (size_t i = 0; i < num_rows_; ++i) { - trace += elements_[i][i]; - } - return trace; - } - - // Matrix Operations. Returns *this to support method chaining. - Matrix& Transpose() { - CopyDataToScratch(); - Resize(num_columns_, num_rows_); - return Transpose(scratch_elements()); - } - - Matrix& Transpose(const Matrix& operand) { - RTC_CHECK_EQ(operand.num_rows_, num_columns_); - RTC_CHECK_EQ(operand.num_columns_, num_rows_); - - return Transpose(operand.elements()); - } - - template - Matrix& Scale(const S& scalar) { - for (size_t i = 0; i < data_.size(); ++i) { - data_[i] *= scalar; - } - - return *this; - } - - template - Matrix& Scale(const Matrix& operand, const S& scalar) { - CopyFrom(operand); - return Scale(scalar); - } - - Matrix& Add(const Matrix& operand) { - RTC_CHECK_EQ(num_rows_, operand.num_rows_); - RTC_CHECK_EQ(num_columns_, operand.num_columns_); - - for (size_t i = 0; i < data_.size(); ++i) { - data_[i] += operand.data_[i]; - } - - return *this; - } - - Matrix& Add(const Matrix& lhs, const Matrix& rhs) { - CopyFrom(lhs); - return Add(rhs); - } - - Matrix& Subtract(const Matrix& operand) { - RTC_CHECK_EQ(num_rows_, operand.num_rows_); - RTC_CHECK_EQ(num_columns_, operand.num_columns_); - - for (size_t i = 0; i < data_.size(); ++i) { - data_[i] -= operand.data_[i]; - } - - return *this; - } - - Matrix& Subtract(const Matrix& lhs, const Matrix& rhs) { - CopyFrom(lhs); - return Subtract(rhs); - } - - Matrix& PointwiseMultiply(const Matrix& operand) { - RTC_CHECK_EQ(num_rows_, operand.num_rows_); - RTC_CHECK_EQ(num_columns_, operand.num_columns_); - - for (size_t i = 0; i < data_.size(); ++i) { - data_[i] *= operand.data_[i]; - } - - return *this; - } - - Matrix& PointwiseMultiply(const Matrix& lhs, const Matrix& rhs) { - CopyFrom(lhs); - return PointwiseMultiply(rhs); - } - - Matrix& PointwiseDivide(const Matrix& operand) { - RTC_CHECK_EQ(num_rows_, operand.num_rows_); - RTC_CHECK_EQ(num_columns_, operand.num_columns_); - - for (size_t i = 0; i < data_.size(); ++i) { - data_[i] /= operand.data_[i]; - } - - return *this; - } - - Matrix& PointwiseDivide(const Matrix& lhs, const Matrix& rhs) { - CopyFrom(lhs); - return PointwiseDivide(rhs); - } - - Matrix& PointwiseSquareRoot() { - for (size_t i = 0; i < data_.size(); ++i) { - data_[i] = sqrt_wrapper(data_[i]); - } - - return *this; - } - - Matrix& PointwiseSquareRoot(const Matrix& operand) { - CopyFrom(operand); - return PointwiseSquareRoot(); - } - - Matrix& PointwiseAbsoluteValue() { - for (size_t i = 0; i < data_.size(); ++i) { - data_[i] = abs(data_[i]); - } - - return *this; - } - - Matrix& PointwiseAbsoluteValue(const Matrix& operand) { - CopyFrom(operand); - return PointwiseAbsoluteValue(); - } - - Matrix& PointwiseSquare() { - for (size_t i = 0; i < data_.size(); ++i) { - data_[i] *= data_[i]; - } - - return *this; - } - - Matrix& PointwiseSquare(const Matrix& operand) { - CopyFrom(operand); - return PointwiseSquare(); - } - - Matrix& Multiply(const Matrix& lhs, const Matrix& rhs) { - RTC_CHECK_EQ(lhs.num_columns_, rhs.num_rows_); - RTC_CHECK_EQ(num_rows_, lhs.num_rows_); - RTC_CHECK_EQ(num_columns_, rhs.num_columns_); - - return Multiply(lhs.elements(), rhs.num_rows_, rhs.elements()); - } - - Matrix& Multiply(const Matrix& rhs) { - RTC_CHECK_EQ(num_columns_, rhs.num_rows_); - - CopyDataToScratch(); - Resize(num_rows_, rhs.num_columns_); - return Multiply(scratch_elements(), rhs.num_rows_, rhs.elements()); - } - - std::string ToString() const { - std::ostringstream ss; - ss << std::endl << "Matrix" << std::endl; - - for (size_t i = 0; i < num_rows_; ++i) { - for (size_t j = 0; j < num_columns_; ++j) { - ss << elements_[i][j] << " "; - } - ss << std::endl; - } - ss << std::endl; - - return ss.str(); - } - - protected: - void SetNumRows(const size_t num_rows) { num_rows_ = num_rows; } - void SetNumColumns(const size_t num_columns) { num_columns_ = num_columns; } - T* data() { return &data_[0]; } - const T* data() const { return &data_[0]; } - const T* const* scratch_elements() const { return &scratch_elements_[0]; } - - // Resize the matrix. If an increase in capacity is required, the current - // data is lost. - void Resize() { - size_t size = num_rows_ * num_columns_; - data_.resize(size); - elements_.resize(num_rows_); - - for (size_t i = 0; i < num_rows_; ++i) { - elements_[i] = &data_[i * num_columns_]; - } - } - - // Copies data_ into scratch_data_ and updates scratch_elements_ accordingly. - void CopyDataToScratch() { - scratch_data_ = data_; - scratch_elements_.resize(num_rows_); - - for (size_t i = 0; i < num_rows_; ++i) { - scratch_elements_[i] = &scratch_data_[i * num_columns_]; - } - } - - private: - size_t num_rows_; - size_t num_columns_; - std::vector data_; - std::vector elements_; - - // Stores temporary copies of |data_| and |elements_| for in-place operations - // where referring to original data is necessary. - std::vector scratch_data_; - std::vector scratch_elements_; - - // Helpers for Transpose and Multiply operations that unify in-place and - // out-of-place solutions. - Matrix& Transpose(const T* const* src) { - for (size_t i = 0; i < num_rows_; ++i) { - for (size_t j = 0; j < num_columns_; ++j) { - elements_[i][j] = src[j][i]; - } - } - - return *this; - } - - Matrix& Multiply(const T* const* lhs, - size_t num_rows_rhs, - const T* const* rhs) { - for (size_t row = 0; row < num_rows_; ++row) { - for (size_t col = 0; col < num_columns_; ++col) { - T cur_element = 0; - for (size_t i = 0; i < num_rows_rhs; ++i) { - cur_element += lhs[row][i] * rhs[i][col]; - } - - elements_[row][col] = cur_element; - } - } - - return *this; - } - - RTC_DISALLOW_COPY_AND_ASSIGN(Matrix); -}; - -} // namespace webrtc - -#endif // WEBRTC_MODULES_AUDIO_PROCESSING_BEAMFORMER_MATRIX_H_ diff --git a/WebRtc.NET/include/webrtc/modules/audio_processing/beamformer/matrix_test_helpers.h b/WebRtc.NET/include/webrtc/modules/audio_processing/beamformer/matrix_test_helpers.h deleted file mode 100644 index 57bd82ed..00000000 --- a/WebRtc.NET/include/webrtc/modules/audio_processing/beamformer/matrix_test_helpers.h +++ /dev/null @@ -1,102 +0,0 @@ -/* - * Copyright (c) 2014 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MODULES_AUDIO_PROCESSING_BEAMFORMER_MATRIX_TEST_HELPERS_H_ -#define WEBRTC_MODULES_AUDIO_PROCESSING_BEAMFORMER_MATRIX_TEST_HELPERS_H_ - -#include "webrtc/modules/audio_processing/beamformer/complex_matrix.h" -#include "webrtc/modules/audio_processing/beamformer/matrix.h" -#include "webrtc/test/gtest.h" - -namespace { -const float kTolerance = 0.001f; -} - -namespace webrtc { - -using std::complex; - -// Functions used in both matrix_unittest and complex_matrix_unittest. -class MatrixTestHelpers { - public: - template - static void ValidateMatrixEquality(const Matrix& expected, - const Matrix& actual) { - EXPECT_EQ(expected.num_rows(), actual.num_rows()); - EXPECT_EQ(expected.num_columns(), actual.num_columns()); - - const T* const* expected_elements = expected.elements(); - const T* const* actual_elements = actual.elements(); - for (size_t i = 0; i < expected.num_rows(); ++i) { - for (size_t j = 0; j < expected.num_columns(); ++j) { - EXPECT_EQ(expected_elements[i][j], actual_elements[i][j]); - } - } - } - - static void ValidateMatrixEqualityFloat(const Matrix& expected, - const Matrix& actual) { - EXPECT_EQ(expected.num_rows(), actual.num_rows()); - EXPECT_EQ(expected.num_columns(), actual.num_columns()); - - const float* const* expected_elements = expected.elements(); - const float* const* actual_elements = actual.elements(); - for (size_t i = 0; i < expected.num_rows(); ++i) { - for (size_t j = 0; j < expected.num_columns(); ++j) { - EXPECT_NEAR(expected_elements[i][j], actual_elements[i][j], kTolerance); - } - } - } - - static void ValidateMatrixEqualityComplexFloat( - const Matrix >& expected, - const Matrix >& actual) { - EXPECT_EQ(expected.num_rows(), actual.num_rows()); - EXPECT_EQ(expected.num_columns(), actual.num_columns()); - - const complex* const* expected_elements = expected.elements(); - const complex* const* actual_elements = actual.elements(); - for (size_t i = 0; i < expected.num_rows(); ++i) { - for (size_t j = 0; j < expected.num_columns(); ++j) { - EXPECT_NEAR(expected_elements[i][j].real(), - actual_elements[i][j].real(), - kTolerance); - EXPECT_NEAR(expected_elements[i][j].imag(), - actual_elements[i][j].imag(), - kTolerance); - } - } - } - - static void ValidateMatrixNearEqualityComplexFloat( - const Matrix >& expected, - const Matrix >& actual, - float tolerance) { - EXPECT_EQ(expected.num_rows(), actual.num_rows()); - EXPECT_EQ(expected.num_columns(), actual.num_columns()); - - const complex* const* expected_elements = expected.elements(); - const complex* const* actual_elements = actual.elements(); - for (size_t i = 0; i < expected.num_rows(); ++i) { - for (size_t j = 0; j < expected.num_columns(); ++j) { - EXPECT_NEAR(expected_elements[i][j].real(), - actual_elements[i][j].real(), - tolerance); - EXPECT_NEAR(expected_elements[i][j].imag(), - actual_elements[i][j].imag(), - tolerance); - } - } - } -}; - -} // namespace webrtc - -#endif // WEBRTC_MODULES_AUDIO_PROCESSING_BEAMFORMER_MATRIX_TEST_HELPERS_H_ diff --git a/WebRtc.NET/include/webrtc/modules/audio_processing/beamformer/mock_nonlinear_beamformer.h b/WebRtc.NET/include/webrtc/modules/audio_processing/beamformer/mock_nonlinear_beamformer.h deleted file mode 100644 index 7493dcbb..00000000 --- a/WebRtc.NET/include/webrtc/modules/audio_processing/beamformer/mock_nonlinear_beamformer.h +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Copyright (c) 2015 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MODULES_AUDIO_PROCESSING_BEAMFORMER_MOCK_BEAMFORMER_H_ -#define WEBRTC_MODULES_AUDIO_PROCESSING_BEAMFORMER_MOCK_BEAMFORMER_H_ - -#include - -#include "webrtc/modules/audio_processing/beamformer/nonlinear_beamformer.h" -#include "webrtc/test/gmock.h" - -namespace webrtc { - -class MockNonlinearBeamformer : public NonlinearBeamformer { - public: - MockNonlinearBeamformer(const std::vector& array_geometry, - size_t num_postfilter_channels) - : NonlinearBeamformer(array_geometry, num_postfilter_channels) {} - - MockNonlinearBeamformer(const std::vector& array_geometry) - : NonlinearBeamformer(array_geometry, 1u) {} - - MOCK_METHOD2(Initialize, void(int chunk_size_ms, int sample_rate_hz)); - MOCK_METHOD1(AnalyzeChunk, void(const ChannelBuffer& data)); - MOCK_METHOD1(PostFilter, void(ChannelBuffer* data)); - MOCK_METHOD1(IsInBeam, bool(const SphericalPointf& spherical_point)); - MOCK_METHOD0(is_target_present, bool()); -}; - -} // namespace webrtc - -#endif // WEBRTC_MODULES_AUDIO_PROCESSING_BEAMFORMER_MOCK_BEAMFORMER_H_ diff --git a/WebRtc.NET/include/webrtc/modules/audio_processing/beamformer/nonlinear_beamformer.h b/WebRtc.NET/include/webrtc/modules/audio_processing/beamformer/nonlinear_beamformer.h deleted file mode 100644 index 9b45c8b0..00000000 --- a/WebRtc.NET/include/webrtc/modules/audio_processing/beamformer/nonlinear_beamformer.h +++ /dev/null @@ -1,228 +0,0 @@ -/* - * Copyright (c) 2014 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MODULES_AUDIO_PROCESSING_BEAMFORMER_NONLINEAR_BEAMFORMER_H_ -#define WEBRTC_MODULES_AUDIO_PROCESSING_BEAMFORMER_NONLINEAR_BEAMFORMER_H_ - -// MSVC++ requires this to be set before any other includes to get M_PI. -#define _USE_MATH_DEFINES - -#include - -#include -#include - -#include "webrtc/common_audio/lapped_transform.h" -#include "webrtc/common_audio/channel_buffer.h" -#include "webrtc/modules/audio_processing/beamformer/array_util.h" -#include "webrtc/modules/audio_processing/beamformer/complex_matrix.h" - -namespace webrtc { - -class PostFilterTransform : public LappedTransform::Callback { - public: - PostFilterTransform(size_t num_channels, - size_t chunk_length, - float* window, - size_t fft_size); - - void ProcessChunk(float* const* data, float* final_mask); - - protected: - void ProcessAudioBlock(const complex* const* input, - size_t num_input_channels, - size_t num_freq_bins, - size_t num_output_channels, - complex* const* output) override; - - private: - LappedTransform transform_; - const size_t num_freq_bins_; - float* final_mask_; -}; - -// Enhances sound sources coming directly in front of a uniform linear array -// and suppresses sound sources coming from all other directions. Operates on -// multichannel signals and produces single-channel output. -// -// The implemented nonlinear postfilter algorithm taken from "A Robust Nonlinear -// Beamforming Postprocessor" by Bastiaan Kleijn. -class NonlinearBeamformer : public LappedTransform::Callback { - public: - static const float kHalfBeamWidthRadians; - - explicit NonlinearBeamformer( - const std::vector& array_geometry, - size_t num_postfilter_channels = 1u, - SphericalPointf target_direction = - SphericalPointf(static_cast(M_PI) / 2.f, 0.f, 1.f)); - ~NonlinearBeamformer() override; - - // Sample rate corresponds to the lower band. - // Needs to be called before the NonlinearBeamformer can be used. - virtual void Initialize(int chunk_size_ms, int sample_rate_hz); - - // Analyzes one time-domain chunk of audio. The audio is expected to be split - // into frequency bands inside the ChannelBuffer. The number of frames and - // channels must correspond to the constructor parameters. - virtual void AnalyzeChunk(const ChannelBuffer& data); - - // Applies the postfilter mask to one chunk of audio. The audio is expected to - // be split into frequency bands inside the ChannelBuffer. The number of - // frames and channels must correspond to the constructor parameters. - virtual void PostFilter(ChannelBuffer* data); - - virtual void AimAt(const SphericalPointf& target_direction); - - virtual bool IsInBeam(const SphericalPointf& spherical_point); - - // After processing each block |is_target_present_| is set to true if the - // target signal es present and to false otherwise. This methods can be called - // to know if the data is target signal or interference and process it - // accordingly. - virtual bool is_target_present(); - - protected: - // Process one frequency-domain block of audio. This is where the fun - // happens. Implements LappedTransform::Callback. - void ProcessAudioBlock(const complex* const* input, - size_t num_input_channels, - size_t num_freq_bins, - size_t num_output_channels, - complex* const* output) override; - - private: - FRIEND_TEST_ALL_PREFIXES(NonlinearBeamformerTest, - InterfAnglesTakeAmbiguityIntoAccount); - - typedef Matrix MatrixF; - typedef ComplexMatrix ComplexMatrixF; - typedef complex complex_f; - - void InitLowFrequencyCorrectionRanges(); - void InitHighFrequencyCorrectionRanges(); - void InitInterfAngles(); - void InitDelaySumMasks(); - void InitTargetCovMats(); - void InitDiffuseCovMats(); - void InitInterfCovMats(); - void NormalizeCovMats(); - - // Calculates postfilter masks that minimize the mean squared error of our - // estimation of the desired signal. - float CalculatePostfilterMask(const ComplexMatrixF& interf_cov_mat, - float rpsiw, - float ratio_rxiw_rxim, - float rmxi_r); - - // Prevents the postfilter masks from degenerating too quickly (a cause of - // musical noise). - void ApplyMaskTimeSmoothing(); - void ApplyMaskFrequencySmoothing(); - - // The postfilter masks are unreliable at low frequencies. Calculates a better - // mask by averaging mid-low frequency values. - void ApplyLowFrequencyCorrection(); - - // Postfilter masks are also unreliable at high frequencies. Average mid-high - // frequency masks to calculate a single mask per block which can be applied - // in the time-domain. Further, we average these block-masks over a chunk, - // resulting in one postfilter mask per audio chunk. This allows us to skip - // both transforming and blocking the high-frequency signal. - void ApplyHighFrequencyCorrection(); - - // Compute the means needed for the above frequency correction. - float MaskRangeMean(size_t start_bin, size_t end_bin); - - // Applies post-filter mask to |input| and store in |output|. - void ApplyPostFilter(const complex_f* input, complex_f* output); - - void EstimateTargetPresence(); - - static const size_t kFftSize = 256; - static const size_t kNumFreqBins = kFftSize / 2 + 1; - - // Deals with the fft transform and blocking. - size_t chunk_length_; - std::unique_ptr process_transform_; - std::unique_ptr postfilter_transform_; - float window_[kFftSize]; - - // Parameters exposed to the user. - const size_t num_input_channels_; - const size_t num_postfilter_channels_; - int sample_rate_hz_; - - const std::vector array_geometry_; - // The normal direction of the array if it has one and it is in the xy-plane. - const rtc::Optional array_normal_; - - // Minimum spacing between microphone pairs. - const float min_mic_spacing_; - - // Calculated based on user-input and constants in the .cc file. - size_t low_mean_start_bin_; - size_t low_mean_end_bin_; - size_t high_mean_start_bin_; - size_t high_mean_end_bin_; - - // Quickly varying mask updated every block. - float new_mask_[kNumFreqBins]; - // Time smoothed mask. - float time_smooth_mask_[kNumFreqBins]; - // Time and frequency smoothed mask. - float final_mask_[kNumFreqBins]; - - float target_angle_radians_; - // Angles of the interferer scenarios. - std::vector interf_angles_radians_; - // The angle between the target and the interferer scenarios. - const float away_radians_; - - // Array of length |kNumFreqBins|, Matrix of size |1| x |num_channels_|. - ComplexMatrixF delay_sum_masks_[kNumFreqBins]; - - // Arrays of length |kNumFreqBins|, Matrix of size |num_input_channels_| x - // |num_input_channels_|. - ComplexMatrixF target_cov_mats_[kNumFreqBins]; - ComplexMatrixF uniform_cov_mat_[kNumFreqBins]; - // Array of length |kNumFreqBins|, Matrix of size |num_input_channels_| x - // |num_input_channels_|. The vector has a size equal to the number of - // interferer scenarios. - std::vector> interf_cov_mats_[kNumFreqBins]; - - // Of length |kNumFreqBins|. - float wave_numbers_[kNumFreqBins]; - - // Preallocated for ProcessAudioBlock() - // Of length |kNumFreqBins|. - float rxiws_[kNumFreqBins]; - // The vector has a size equal to the number of interferer scenarios. - std::vector rpsiws_[kNumFreqBins]; - - // The microphone normalization factor. - ComplexMatrixF eig_m_; - - // For processing the high-frequency input signal. - float high_pass_postfilter_mask_; - float old_high_pass_mask_; - - // True when the target signal is present. - bool is_target_present_; - // Number of blocks after which the data is considered interference if the - // mask does not pass |kMaskSignalThreshold|. - size_t hold_target_blocks_; - // Number of blocks since the last mask that passed |kMaskSignalThreshold|. - size_t interference_blocks_count_; -}; - -} // namespace webrtc - -#endif // WEBRTC_MODULES_AUDIO_PROCESSING_BEAMFORMER_NONLINEAR_BEAMFORMER_H_ diff --git a/WebRtc.NET/include/webrtc/modules/audio_processing/common.h b/WebRtc.NET/include/webrtc/modules/audio_processing/common.h deleted file mode 100644 index 184e2a55..00000000 --- a/WebRtc.NET/include/webrtc/modules/audio_processing/common.h +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Copyright (c) 2014 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MODULES_AUDIO_PROCESSING_COMMON_H_ -#define WEBRTC_MODULES_AUDIO_PROCESSING_COMMON_H_ - -#include "webrtc/base/checks.h" -#include "webrtc/modules/audio_processing/include/audio_processing.h" - -namespace webrtc { - -static inline size_t ChannelsFromLayout(AudioProcessing::ChannelLayout layout) { - switch (layout) { - case AudioProcessing::kMono: - case AudioProcessing::kMonoAndKeyboard: - return 1; - case AudioProcessing::kStereo: - case AudioProcessing::kStereoAndKeyboard: - return 2; - } - RTC_NOTREACHED(); - return 0; -} - -} // namespace webrtc - -#endif // WEBRTC_MODULES_AUDIO_PROCESSING_COMMON_H_ diff --git a/WebRtc.NET/include/webrtc/modules/audio_processing/echo_cancellation_impl.h b/WebRtc.NET/include/webrtc/modules/audio_processing/echo_cancellation_impl.h deleted file mode 100644 index 19da9819..00000000 --- a/WebRtc.NET/include/webrtc/modules/audio_processing/echo_cancellation_impl.h +++ /dev/null @@ -1,116 +0,0 @@ -/* - * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MODULES_AUDIO_PROCESSING_ECHO_CANCELLATION_IMPL_H_ -#define WEBRTC_MODULES_AUDIO_PROCESSING_ECHO_CANCELLATION_IMPL_H_ - -#include -#include - -#include "webrtc/base/constructormagic.h" -#include "webrtc/base/criticalsection.h" -#include "webrtc/modules/audio_processing/include/audio_processing.h" - -namespace webrtc { - -class AudioBuffer; - -class EchoCancellationImpl : public EchoCancellation { - public: - EchoCancellationImpl(rtc::CriticalSection* crit_render, - rtc::CriticalSection* crit_capture); - ~EchoCancellationImpl() override; - - void ProcessRenderAudio(rtc::ArrayView packed_render_audio); - int ProcessCaptureAudio(AudioBuffer* audio, int stream_delay_ms); - - // EchoCancellation implementation. - bool is_enabled() const override; - int stream_drift_samples() const override; - SuppressionLevel suppression_level() const override; - bool is_drift_compensation_enabled() const override; - - void Initialize(int sample_rate_hz, - size_t num_reverse_channels_, - size_t num_output_channels_, - size_t num_proc_channels_); - void SetExtraOptions(const webrtc::Config& config); - bool is_delay_agnostic_enabled() const; - bool is_extended_filter_enabled() const; - std::string GetExperimentsDescription(); - bool is_refined_adaptive_filter_enabled() const; - - // Returns the system delay of the first AEC component. - int GetSystemDelayInSamples() const; - - static void PackRenderAudioBuffer(const AudioBuffer* audio, - size_t num_output_channels, - size_t num_channels, - std::vector* packed_buffer); - static size_t NumCancellersRequired(size_t num_output_channels, - size_t num_reverse_channels); - - // Enable logging of various AEC statistics. - int enable_metrics(bool enable) override; - - // Provides various statistics about the AEC. - int GetMetrics(Metrics* metrics) override; - - // Enable logging of delay metrics. - int enable_delay_logging(bool enable) override; - - // Provides delay metrics. - int GetDelayMetrics(int* median, - int* std, - float* fraction_poor_delays) override; - - private: - class Canceller; - struct StreamProperties; - - // EchoCancellation implementation. - int Enable(bool enable) override; - int enable_drift_compensation(bool enable) override; - void set_stream_drift_samples(int drift) override; - int set_suppression_level(SuppressionLevel level) override; - bool are_metrics_enabled() const override; - bool stream_has_echo() const override; - bool is_delay_logging_enabled() const override; - int GetDelayMetrics(int* median, int* std) override; - - struct AecCore* aec_core() const override; - - void AllocateRenderQueue(); - int Configure(); - - rtc::CriticalSection* const crit_render_ ACQUIRED_BEFORE(crit_capture_); - rtc::CriticalSection* const crit_capture_; - - bool enabled_ = false; - bool drift_compensation_enabled_ GUARDED_BY(crit_capture_); - bool metrics_enabled_ GUARDED_BY(crit_capture_); - SuppressionLevel suppression_level_ GUARDED_BY(crit_capture_); - int stream_drift_samples_ GUARDED_BY(crit_capture_); - bool was_stream_drift_set_ GUARDED_BY(crit_capture_); - bool stream_has_echo_ GUARDED_BY(crit_capture_); - bool delay_logging_enabled_ GUARDED_BY(crit_capture_); - bool extended_filter_enabled_ GUARDED_BY(crit_capture_); - bool delay_agnostic_enabled_ GUARDED_BY(crit_capture_); - bool refined_adaptive_filter_enabled_ GUARDED_BY(crit_capture_) = false; - - std::vector> cancellers_; - std::unique_ptr stream_properties_; - - RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(EchoCancellationImpl); -}; - -} // namespace webrtc - -#endif // WEBRTC_MODULES_AUDIO_PROCESSING_ECHO_CANCELLATION_IMPL_H_ diff --git a/WebRtc.NET/include/webrtc/modules/audio_processing/echo_control_mobile_impl.h b/WebRtc.NET/include/webrtc/modules/audio_processing/echo_control_mobile_impl.h deleted file mode 100644 index 571de36a..00000000 --- a/WebRtc.NET/include/webrtc/modules/audio_processing/echo_control_mobile_impl.h +++ /dev/null @@ -1,84 +0,0 @@ -/* - * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MODULES_AUDIO_PROCESSING_ECHO_CONTROL_MOBILE_IMPL_H_ -#define WEBRTC_MODULES_AUDIO_PROCESSING_ECHO_CONTROL_MOBILE_IMPL_H_ - -#include -#include - -#include "webrtc/base/constructormagic.h" -#include "webrtc/base/criticalsection.h" -#include "webrtc/base/swap_queue.h" -#include "webrtc/modules/audio_processing/include/audio_processing.h" -#include "webrtc/modules/audio_processing/render_queue_item_verifier.h" - -namespace webrtc { - -class AudioBuffer; - -class EchoControlMobileImpl : public EchoControlMobile { - public: - EchoControlMobileImpl(rtc::CriticalSection* crit_render, - rtc::CriticalSection* crit_capture); - - ~EchoControlMobileImpl() override; - - void ProcessRenderAudio(rtc::ArrayView packed_render_audio); - int ProcessCaptureAudio(AudioBuffer* audio, int stream_delay_ms); - - // EchoControlMobile implementation. - bool is_enabled() const override; - RoutingMode routing_mode() const override; - bool is_comfort_noise_enabled() const override; - - void Initialize(int sample_rate_hz, - size_t num_reverse_channels, - size_t num_output_channels); - - static void PackRenderAudioBuffer(const AudioBuffer* audio, - size_t num_output_channels, - size_t num_channels, - std::vector* packed_buffer); - - static size_t NumCancellersRequired(size_t num_output_channels, - size_t num_reverse_channels); - - private: - class Canceller; - struct StreamProperties; - - // EchoControlMobile implementation. - int Enable(bool enable) override; - int set_routing_mode(RoutingMode mode) override; - int enable_comfort_noise(bool enable) override; - int SetEchoPath(const void* echo_path, size_t size_bytes) override; - int GetEchoPath(void* echo_path, size_t size_bytes) const override; - - int Configure(); - - rtc::CriticalSection* const crit_render_ ACQUIRED_BEFORE(crit_capture_); - rtc::CriticalSection* const crit_capture_; - - bool enabled_ = false; - - RoutingMode routing_mode_ GUARDED_BY(crit_capture_); - bool comfort_noise_enabled_ GUARDED_BY(crit_capture_); - unsigned char* external_echo_path_ GUARDED_BY(crit_render_) - GUARDED_BY(crit_capture_); - - std::vector> cancellers_; - std::unique_ptr stream_properties_; - - RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(EchoControlMobileImpl); -}; -} // namespace webrtc - -#endif // WEBRTC_MODULES_AUDIO_PROCESSING_ECHO_CONTROL_MOBILE_IMPL_H_ diff --git a/WebRtc.NET/include/webrtc/modules/audio_processing/gain_control_impl.h b/WebRtc.NET/include/webrtc/modules/audio_processing/gain_control_impl.h deleted file mode 100644 index bd56ed45..00000000 --- a/WebRtc.NET/include/webrtc/modules/audio_processing/gain_control_impl.h +++ /dev/null @@ -1,97 +0,0 @@ -/* - * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MODULES_AUDIO_PROCESSING_GAIN_CONTROL_IMPL_H_ -#define WEBRTC_MODULES_AUDIO_PROCESSING_GAIN_CONTROL_IMPL_H_ - -#include -#include - -#include "webrtc/base/constructormagic.h" -#include "webrtc/base/criticalsection.h" -#include "webrtc/base/swap_queue.h" -#include "webrtc/base/thread_annotations.h" -#include "webrtc/modules/audio_processing/include/audio_processing.h" -#include "webrtc/modules/audio_processing/render_queue_item_verifier.h" - -namespace webrtc { - -class ApmDataDumper; -class AudioBuffer; - -class GainControlImpl : public GainControl { - public: - GainControlImpl(rtc::CriticalSection* crit_render, - rtc::CriticalSection* crit_capture); - ~GainControlImpl() override; - - void ProcessRenderAudio(rtc::ArrayView packed_render_audio); - int AnalyzeCaptureAudio(AudioBuffer* audio); - int ProcessCaptureAudio(AudioBuffer* audio, bool stream_has_echo); - - void Initialize(size_t num_proc_channels, int sample_rate_hz); - - static void PackRenderAudioBuffer(AudioBuffer* audio, - std::vector* packed_buffer); - - // GainControl implementation. - bool is_enabled() const override; - int stream_analog_level() override; - bool is_limiter_enabled() const override; - Mode mode() const override; - - int compression_gain_db() const override; - - private: - class GainController; - - // GainControl implementation. - int Enable(bool enable) override; - int set_stream_analog_level(int level) override; - int set_mode(Mode mode) override; - int set_target_level_dbfs(int level) override; - int target_level_dbfs() const override; - int set_compression_gain_db(int gain) override; - int enable_limiter(bool enable) override; - int set_analog_level_limits(int minimum, int maximum) override; - int analog_level_minimum() const override; - int analog_level_maximum() const override; - bool stream_is_saturated() const override; - - int Configure(); - - rtc::CriticalSection* const crit_render_ ACQUIRED_BEFORE(crit_capture_); - rtc::CriticalSection* const crit_capture_; - - std::unique_ptr data_dumper_; - - bool enabled_ = false; - - Mode mode_ GUARDED_BY(crit_capture_); - int minimum_capture_level_ GUARDED_BY(crit_capture_); - int maximum_capture_level_ GUARDED_BY(crit_capture_); - bool limiter_enabled_ GUARDED_BY(crit_capture_); - int target_level_dbfs_ GUARDED_BY(crit_capture_); - int compression_gain_db_ GUARDED_BY(crit_capture_); - int analog_capture_level_ GUARDED_BY(crit_capture_); - bool was_analog_level_set_ GUARDED_BY(crit_capture_); - bool stream_is_saturated_ GUARDED_BY(crit_capture_); - - std::vector> gain_controllers_; - - rtc::Optional num_proc_channels_ GUARDED_BY(crit_capture_); - rtc::Optional sample_rate_hz_ GUARDED_BY(crit_capture_); - - static int instance_counter_; - RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(GainControlImpl); -}; -} // namespace webrtc - -#endif // WEBRTC_MODULES_AUDIO_PROCESSING_GAIN_CONTROL_IMPL_H_ diff --git a/WebRtc.NET/include/webrtc/modules/audio_processing/include/config.h b/WebRtc.NET/include/webrtc/modules/audio_processing/include/config.h deleted file mode 100644 index 0473d2d8..00000000 --- a/WebRtc.NET/include/webrtc/modules/audio_processing/include/config.h +++ /dev/null @@ -1,133 +0,0 @@ -/* - * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MODULES_AUDIO_PROCESSING_INCLUDE_CONFIG_H_ -#define WEBRTC_MODULES_AUDIO_PROCESSING_INCLUDE_CONFIG_H_ - -#include - -#include "webrtc/base/basictypes.h" -#include "webrtc/base/constructormagic.h" - -namespace webrtc { - -// Only add new values to the end of the enumeration and never remove (only -// deprecate) to maintain binary compatibility. -enum class ConfigOptionID { - kMyExperimentForTest, - kAlgo1CostFunctionForTest, - kTemporalLayersFactory, // Deprecated - kNetEqCapacityConfig, // Deprecated - kNetEqFastAccelerate, // Deprecated - kVoicePacing, // Deprecated - kExtendedFilter, - kDelayAgnostic, - kExperimentalAgc, - kExperimentalNs, - kBeamforming, - kIntelligibility, - kEchoCanceller3, // Deprecated - kAecRefinedAdaptiveFilter, - kLevelControl -}; - -// Class Config is designed to ease passing a set of options across webrtc code. -// Options are identified by typename in order to avoid incorrect casts. -// -// Usage: -// * declaring an option: -// struct Algo1_CostFunction { -// virtual float cost(int x) const { return x; } -// virtual ~Algo1_CostFunction() {} -// }; -// -// * accessing an option: -// config.Get().cost(value); -// -// * setting an option: -// struct SqrCost : Algo1_CostFunction { -// virtual float cost(int x) const { return x*x; } -// }; -// config.Set(new SqrCost()); -// -// Note: This class is thread-compatible (like STL containers). -class Config { - public: - // Returns the option if set or a default constructed one. - // Callers that access options too often are encouraged to cache the result. - // Returned references are owned by this. - // - // Requires std::is_default_constructible - template const T& Get() const; - - // Set the option, deleting any previous instance of the same. - // This instance gets ownership of the newly set value. - template void Set(T* value); - - Config(); - ~Config(); - - private: - struct BaseOption { - virtual ~BaseOption() {} - }; - - template - struct Option : BaseOption { - explicit Option(T* v): value(v) {} - ~Option() { - delete value; - } - T* value; - }; - - template - static ConfigOptionID identifier() { - return T::identifier; - } - - // Used to instantiate a default constructed object that doesn't needs to be - // owned. This allows Get to be implemented without requiring explicitly - // locks. - template - static const T& default_value() { - RTC_DEFINE_STATIC_LOCAL(const T, def, ()); - return def; - } - - typedef std::map OptionMap; - OptionMap options_; - - // RTC_DISALLOW_COPY_AND_ASSIGN - Config(const Config&); - void operator=(const Config&); -}; - -template -const T& Config::Get() const { - OptionMap::const_iterator it = options_.find(identifier()); - if (it != options_.end()) { - const T* t = static_cast*>(it->second)->value; - if (t) { - return *t; - } - } - return default_value(); -} - -template -void Config::Set(T* value) { - BaseOption*& it = options_[identifier()]; - delete it; - it = new Option(value); -} -} // namespace webrtc - -#endif // WEBRTC_MODULES_AUDIO_PROCESSING_INCLUDE_CONFIG_H_ diff --git a/WebRtc.NET/include/webrtc/modules/audio_processing/include/mock_audio_processing.h b/WebRtc.NET/include/webrtc/modules/audio_processing/include/mock_audio_processing.h deleted file mode 100644 index b5a1fa4a..00000000 --- a/WebRtc.NET/include/webrtc/modules/audio_processing/include/mock_audio_processing.h +++ /dev/null @@ -1,222 +0,0 @@ -/* - * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MODULES_AUDIO_PROCESSING_INCLUDE_MOCK_AUDIO_PROCESSING_H_ -#define WEBRTC_MODULES_AUDIO_PROCESSING_INCLUDE_MOCK_AUDIO_PROCESSING_H_ - -#include - -#include "webrtc/modules/audio_processing/include/audio_processing.h" -#include "webrtc/test/gmock.h" - -namespace webrtc { - -namespace test { - -class MockEchoCancellation : public EchoCancellation { - public: - virtual ~MockEchoCancellation() {} - MOCK_METHOD1(Enable, int(bool enable)); - MOCK_CONST_METHOD0(is_enabled, bool()); - MOCK_METHOD1(enable_drift_compensation, int(bool enable)); - MOCK_CONST_METHOD0(is_drift_compensation_enabled, bool()); - MOCK_METHOD1(set_stream_drift_samples, void(int drift)); - MOCK_CONST_METHOD0(stream_drift_samples, int()); - MOCK_METHOD1(set_suppression_level, int(SuppressionLevel level)); - MOCK_CONST_METHOD0(suppression_level, SuppressionLevel()); - MOCK_CONST_METHOD0(stream_has_echo, bool()); - MOCK_METHOD1(enable_metrics, int(bool enable)); - MOCK_CONST_METHOD0(are_metrics_enabled, bool()); - MOCK_METHOD1(GetMetrics, int(Metrics* metrics)); - MOCK_METHOD1(enable_delay_logging, int(bool enable)); - MOCK_CONST_METHOD0(is_delay_logging_enabled, bool()); - MOCK_METHOD2(GetDelayMetrics, int(int* median, int* std)); - MOCK_METHOD3(GetDelayMetrics, int(int* median, int* std, - float* fraction_poor_delays)); - MOCK_CONST_METHOD0(aec_core, struct AecCore*()); -}; - -class MockEchoControlMobile : public EchoControlMobile { - public: - virtual ~MockEchoControlMobile() {} - MOCK_METHOD1(Enable, int(bool enable)); - MOCK_CONST_METHOD0(is_enabled, bool()); - MOCK_METHOD1(set_routing_mode, int(RoutingMode mode)); - MOCK_CONST_METHOD0(routing_mode, RoutingMode()); - MOCK_METHOD1(enable_comfort_noise, int(bool enable)); - MOCK_CONST_METHOD0(is_comfort_noise_enabled, bool()); - MOCK_METHOD2(SetEchoPath, int(const void* echo_path, size_t size_bytes)); - MOCK_CONST_METHOD2(GetEchoPath, int(void* echo_path, size_t size_bytes)); -}; - -class MockGainControl : public GainControl { - public: - virtual ~MockGainControl() {} - MOCK_METHOD1(Enable, int(bool enable)); - MOCK_CONST_METHOD0(is_enabled, bool()); - MOCK_METHOD1(set_stream_analog_level, int(int level)); - MOCK_METHOD0(stream_analog_level, int()); - MOCK_METHOD1(set_mode, int(Mode mode)); - MOCK_CONST_METHOD0(mode, Mode()); - MOCK_METHOD1(set_target_level_dbfs, int(int level)); - MOCK_CONST_METHOD0(target_level_dbfs, int()); - MOCK_METHOD1(set_compression_gain_db, int(int gain)); - MOCK_CONST_METHOD0(compression_gain_db, int()); - MOCK_METHOD1(enable_limiter, int(bool enable)); - MOCK_CONST_METHOD0(is_limiter_enabled, bool()); - MOCK_METHOD2(set_analog_level_limits, int(int minimum, int maximum)); - MOCK_CONST_METHOD0(analog_level_minimum, int()); - MOCK_CONST_METHOD0(analog_level_maximum, int()); - MOCK_CONST_METHOD0(stream_is_saturated, bool()); -}; - -class MockHighPassFilter : public HighPassFilter { - public: - virtual ~MockHighPassFilter() {} - MOCK_METHOD1(Enable, int(bool enable)); - MOCK_CONST_METHOD0(is_enabled, bool()); -}; - -class MockLevelEstimator : public LevelEstimator { - public: - virtual ~MockLevelEstimator() {} - MOCK_METHOD1(Enable, int(bool enable)); - MOCK_CONST_METHOD0(is_enabled, bool()); - MOCK_METHOD0(RMS, int()); -}; - -class MockNoiseSuppression : public NoiseSuppression { - public: - virtual ~MockNoiseSuppression() {} - MOCK_METHOD1(Enable, int(bool enable)); - MOCK_CONST_METHOD0(is_enabled, bool()); - MOCK_METHOD1(set_level, int(Level level)); - MOCK_CONST_METHOD0(level, Level()); - MOCK_CONST_METHOD0(speech_probability, float()); - MOCK_METHOD0(NoiseEstimate, std::vector()); -}; - -class MockVoiceDetection : public VoiceDetection { - public: - virtual ~MockVoiceDetection() {} - MOCK_METHOD1(Enable, int(bool enable)); - MOCK_CONST_METHOD0(is_enabled, bool()); - MOCK_CONST_METHOD0(stream_has_voice, bool()); - MOCK_METHOD1(set_stream_has_voice, int(bool has_voice)); - MOCK_METHOD1(set_likelihood, int(Likelihood likelihood)); - MOCK_CONST_METHOD0(likelihood, Likelihood()); - MOCK_METHOD1(set_frame_size_ms, int(int size)); - MOCK_CONST_METHOD0(frame_size_ms, int()); -}; - -class MockAudioProcessing : public AudioProcessing { - public: - MockAudioProcessing() - : echo_cancellation_(new testing::NiceMock()), - echo_control_mobile_(new testing::NiceMock()), - gain_control_(new testing::NiceMock()), - high_pass_filter_(new testing::NiceMock()), - level_estimator_(new testing::NiceMock()), - noise_suppression_(new testing::NiceMock()), - voice_detection_(new testing::NiceMock()) { - } - - virtual ~MockAudioProcessing() {} - - MOCK_METHOD0(Initialize, int()); - MOCK_METHOD6(Initialize, int(int capture_input_sample_rate_hz, - int capture_output_sample_rate_hz, - int render_sample_rate_hz, - ChannelLayout capture_input_layout, - ChannelLayout capture_output_layout, - ChannelLayout render_input_layout)); - MOCK_METHOD1(Initialize, int(const ProcessingConfig& processing_config)); - MOCK_METHOD1(ApplyConfig, void(const Config& config)); - MOCK_METHOD1(SetExtraOptions, void(const webrtc::Config& config)); - MOCK_CONST_METHOD0(proc_sample_rate_hz, int()); - MOCK_CONST_METHOD0(proc_split_sample_rate_hz, int()); - MOCK_CONST_METHOD0(num_input_channels, size_t()); - MOCK_CONST_METHOD0(num_proc_channels, size_t()); - MOCK_CONST_METHOD0(num_output_channels, size_t()); - MOCK_CONST_METHOD0(num_reverse_channels, size_t()); - MOCK_METHOD1(set_output_will_be_muted, void(bool muted)); - MOCK_METHOD1(ProcessStream, int(AudioFrame* frame)); - MOCK_METHOD7(ProcessStream, int(const float* const* src, - size_t samples_per_channel, - int input_sample_rate_hz, - ChannelLayout input_layout, - int output_sample_rate_hz, - ChannelLayout output_layout, - float* const* dest)); - MOCK_METHOD4(ProcessStream, int(const float* const* src, - const StreamConfig& input_config, - const StreamConfig& output_config, - float* const* dest)); - MOCK_METHOD1(ProcessReverseStream, int(AudioFrame* frame)); - MOCK_METHOD4(AnalyzeReverseStream, int(const float* const* data, - size_t samples_per_channel, - int sample_rate_hz, - ChannelLayout layout)); - MOCK_METHOD4(ProcessReverseStream, int(const float* const* src, - const StreamConfig& input_config, - const StreamConfig& output_config, - float* const* dest)); - MOCK_METHOD1(set_stream_delay_ms, int(int delay)); - MOCK_CONST_METHOD0(stream_delay_ms, int()); - MOCK_CONST_METHOD0(was_stream_delay_set, bool()); - MOCK_METHOD1(set_stream_key_pressed, void(bool key_pressed)); - MOCK_METHOD1(set_delay_offset_ms, void(int offset)); - MOCK_CONST_METHOD0(delay_offset_ms, int()); - MOCK_METHOD2(StartDebugRecording, int(const char filename[kMaxFilenameSize], - int64_t max_log_size_bytes)); - MOCK_METHOD2(StartDebugRecording, int(FILE* handle, - int64_t max_log_size_bytes)); - MOCK_METHOD1(StartDebugRecording, int (FILE* handle)); - MOCK_METHOD1(StartDebugRecordingForPlatformFile, - int(rtc::PlatformFile handle)); - MOCK_METHOD0(StopDebugRecording, int()); - MOCK_METHOD0(UpdateHistogramsOnCallEnd, void()); - MOCK_CONST_METHOD0(GetStatistics, AudioProcessingStatistics()); - virtual MockEchoCancellation* echo_cancellation() const { - return echo_cancellation_.get(); - } - virtual MockEchoControlMobile* echo_control_mobile() const { - return echo_control_mobile_.get(); - } - virtual MockGainControl* gain_control() const { - return gain_control_.get(); - } - virtual MockHighPassFilter* high_pass_filter() const { - return high_pass_filter_.get(); - } - virtual MockLevelEstimator* level_estimator() const { - return level_estimator_.get(); - } - virtual MockNoiseSuppression* noise_suppression() const { - return noise_suppression_.get(); - } - virtual MockVoiceDetection* voice_detection() const { - return voice_detection_.get(); - } - - private: - std::unique_ptr echo_cancellation_; - std::unique_ptr echo_control_mobile_; - std::unique_ptr gain_control_; - std::unique_ptr high_pass_filter_; - std::unique_ptr level_estimator_; - std::unique_ptr noise_suppression_; - std::unique_ptr voice_detection_; -}; - -} // namespace test -} // namespace webrtc - -#endif // WEBRTC_MODULES_AUDIO_PROCESSING_INCLUDE_MOCK_AUDIO_PROCESSING_H_ diff --git a/WebRtc.NET/include/webrtc/modules/audio_processing/level_controller/biquad_filter.h b/WebRtc.NET/include/webrtc/modules/audio_processing/level_controller/biquad_filter.h deleted file mode 100644 index 7e073b6f..00000000 --- a/WebRtc.NET/include/webrtc/modules/audio_processing/level_controller/biquad_filter.h +++ /dev/null @@ -1,58 +0,0 @@ -/* - * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MODULES_AUDIO_PROCESSING_LEVEL_CONTROLLER_BIQUAD_FILTER_H_ -#define WEBRTC_MODULES_AUDIO_PROCESSING_LEVEL_CONTROLLER_BIQUAD_FILTER_H_ - -#include - -#include "webrtc/base/array_view.h" -#include "webrtc/base/arraysize.h" -#include "webrtc/base/constructormagic.h" - -namespace webrtc { - -class BiQuadFilter { - public: - struct BiQuadCoefficients { - float b[3]; - float a[2]; - }; - - BiQuadFilter() = default; - - void Initialize(const BiQuadCoefficients& coefficients) { - coefficients_ = coefficients; - } - - // Produces a filtered output y of the input x. Both x and y need to - // have the same length. - void Process(rtc::ArrayView x, rtc::ArrayView y); - - private: - struct BiQuadState { - BiQuadState() { - std::fill(b, b + arraysize(b), 0.f); - std::fill(a, a + arraysize(a), 0.f); - } - - float b[2]; - float a[2]; - }; - - BiQuadState biquad_state_; - BiQuadCoefficients coefficients_; - - RTC_DISALLOW_COPY_AND_ASSIGN(BiQuadFilter); -}; - -} // namespace webrtc - -#endif // WEBRTC_MODULES_AUDIO_PROCESSING_LEVEL_CONTROLLER_BIQUAD_FILTER_H_ diff --git a/WebRtc.NET/include/webrtc/modules/audio_processing/level_controller/down_sampler.h b/WebRtc.NET/include/webrtc/modules/audio_processing/level_controller/down_sampler.h deleted file mode 100644 index 5c8aaf3d..00000000 --- a/WebRtc.NET/include/webrtc/modules/audio_processing/level_controller/down_sampler.h +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MODULES_AUDIO_PROCESSING_LEVEL_CONTROLLER_DOWN_SAMPLER_H_ -#define WEBRTC_MODULES_AUDIO_PROCESSING_LEVEL_CONTROLLER_DOWN_SAMPLER_H_ - -#include "webrtc/base/array_view.h" -#include "webrtc/base/constructormagic.h" -#include "webrtc/modules/audio_processing/level_controller/biquad_filter.h" - -namespace webrtc { - -class ApmDataDumper; - -class DownSampler { - public: - explicit DownSampler(ApmDataDumper* data_dumper); - void Initialize(int sample_rate_hz); - - void DownSample(rtc::ArrayView in, rtc::ArrayView out); - - private: - ApmDataDumper* data_dumper_; - int sample_rate_hz_; - int down_sampling_factor_; - BiQuadFilter low_pass_filter_; - - RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(DownSampler); -}; - -} // namespace webrtc - -#endif // WEBRTC_MODULES_AUDIO_PROCESSING_LEVEL_CONTROLLER_DOWN_SAMPLER_H_ diff --git a/WebRtc.NET/include/webrtc/modules/audio_processing/level_controller/gain_applier.h b/WebRtc.NET/include/webrtc/modules/audio_processing/level_controller/gain_applier.h deleted file mode 100644 index 2fc3543f..00000000 --- a/WebRtc.NET/include/webrtc/modules/audio_processing/level_controller/gain_applier.h +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MODULES_AUDIO_PROCESSING_LEVEL_CONTROLLER_GAIN_APPLIER_H_ -#define WEBRTC_MODULES_AUDIO_PROCESSING_LEVEL_CONTROLLER_GAIN_APPLIER_H_ - -#include "webrtc/base/constructormagic.h" - -namespace webrtc { - -class ApmDataDumper; -class AudioBuffer; - -class GainApplier { - public: - explicit GainApplier(ApmDataDumper* data_dumper); - void Initialize(int sample_rate_hz); - - // Applies the specified gain to the audio frame and returns the resulting - // number of saturated sample values. - int Process(float new_gain, AudioBuffer* audio); - - private: - ApmDataDumper* const data_dumper_; - float old_gain_ = 1.f; - float gain_increase_step_size_ = 0.f; - float gain_normal_decrease_step_size_ = 0.f; - float gain_saturated_decrease_step_size_ = 0.f; - bool last_frame_was_saturated_; - RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(GainApplier); -}; - -} // namespace webrtc - -#endif // WEBRTC_MODULES_AUDIO_PROCESSING_LEVEL_CONTROLLER_GAIN_APPLIER_H_ diff --git a/WebRtc.NET/include/webrtc/modules/audio_processing/level_controller/gain_selector.h b/WebRtc.NET/include/webrtc/modules/audio_processing/level_controller/gain_selector.h deleted file mode 100644 index 78b91015..00000000 --- a/WebRtc.NET/include/webrtc/modules/audio_processing/level_controller/gain_selector.h +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MODULES_AUDIO_PROCESSING_LEVEL_CONTROLLER_GAIN_SELECTOR_H_ -#define WEBRTC_MODULES_AUDIO_PROCESSING_LEVEL_CONTROLLER_GAIN_SELECTOR_H_ - -#include "webrtc/base/constructormagic.h" - -#include "webrtc/modules/audio_processing/level_controller/signal_classifier.h" - -namespace webrtc { - -class GainSelector { - public: - GainSelector(); - void Initialize(int sample_rate_hz); - float GetNewGain(float peak_level, - float noise_energy, - float saturating_gain, - bool gain_jumpstart, - SignalClassifier::SignalType signal_type); - - private: - float gain_; - size_t frame_length_; - int highly_nonstationary_signal_hold_counter_; - - RTC_DISALLOW_COPY_AND_ASSIGN(GainSelector); -}; - -} // namespace webrtc - -#endif // WEBRTC_MODULES_AUDIO_PROCESSING_LEVEL_CONTROLLER_GAIN_SELECTOR_H_ diff --git a/WebRtc.NET/include/webrtc/modules/audio_processing/level_controller/level_controller.h b/WebRtc.NET/include/webrtc/modules/audio_processing/level_controller/level_controller.h deleted file mode 100644 index 1030f795..00000000 --- a/WebRtc.NET/include/webrtc/modules/audio_processing/level_controller/level_controller.h +++ /dev/null @@ -1,95 +0,0 @@ -/* - * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MODULES_AUDIO_PROCESSING_LEVEL_CONTROLLER_LEVEL_CONTROLLER_H_ -#define WEBRTC_MODULES_AUDIO_PROCESSING_LEVEL_CONTROLLER_LEVEL_CONTROLLER_H_ - -#include -#include - -#include "webrtc/base/constructormagic.h" -#include "webrtc/base/optional.h" -#include "webrtc/modules/audio_processing/include/audio_processing.h" -#include "webrtc/modules/audio_processing/level_controller/gain_applier.h" -#include "webrtc/modules/audio_processing/level_controller/gain_selector.h" -#include "webrtc/modules/audio_processing/level_controller/noise_level_estimator.h" -#include "webrtc/modules/audio_processing/level_controller/peak_level_estimator.h" -#include "webrtc/modules/audio_processing/level_controller/saturating_gain_estimator.h" -#include "webrtc/modules/audio_processing/level_controller/signal_classifier.h" - -namespace webrtc { - -class ApmDataDumper; -class AudioBuffer; - -class LevelController { - public: - LevelController(); - ~LevelController(); - - void Initialize(int sample_rate_hz); - void Process(AudioBuffer* audio); - float GetLastGain() { return last_gain_; } - - // TODO(peah): This method is a temporary solution as the the aim is to - // instead apply the config inside the constructor. Therefore this is likely - // to change. - void ApplyConfig(const AudioProcessing::Config::LevelController& config); - // Validates a config. - static bool Validate(const AudioProcessing::Config::LevelController& config); - // Dumps a config to a string. - static std::string ToString( - const AudioProcessing::Config::LevelController& config); - - private: - class Metrics { - public: - Metrics() { Initialize(AudioProcessing::kSampleRate48kHz); } - void Initialize(int sample_rate_hz); - void Update(float long_term_peak_level, - float noise_level, - float gain, - float frame_peak_level); - - private: - void Reset(); - - size_t metrics_frame_counter_; - float gain_sum_; - float peak_level_sum_; - float noise_energy_sum_; - float max_gain_; - float max_peak_level_; - float max_noise_energy_; - float frame_length_; - }; - - std::unique_ptr data_dumper_; - GainSelector gain_selector_; - GainApplier gain_applier_; - SignalClassifier signal_classifier_; - NoiseLevelEstimator noise_level_estimator_; - PeakLevelEstimator peak_level_estimator_; - SaturatingGainEstimator saturating_gain_estimator_; - Metrics metrics_; - rtc::Optional sample_rate_hz_; - static int instance_count_; - float dc_level_[2]; - float dc_forgetting_factor_; - float last_gain_; - bool gain_jumpstart_ = false; - AudioProcessing::Config::LevelController config_; - - RTC_DISALLOW_COPY_AND_ASSIGN(LevelController); -}; - -} // namespace webrtc - -#endif // WEBRTC_MODULES_AUDIO_PROCESSING_LEVEL_CONTROLLER_LEVEL_CONTROLLER_H_ diff --git a/WebRtc.NET/include/webrtc/modules/audio_processing/level_controller/level_controller_constants.h b/WebRtc.NET/include/webrtc/modules/audio_processing/level_controller/level_controller_constants.h deleted file mode 100644 index 7b962d37..00000000 --- a/WebRtc.NET/include/webrtc/modules/audio_processing/level_controller/level_controller_constants.h +++ /dev/null @@ -1,23 +0,0 @@ -/* - * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MODULES_AUDIO_PROCESSING_LEVEL_CONTROLLER_LEVEL_CONTROLLER_CONSTANTS_H_ -#define WEBRTC_MODULES_AUDIO_PROCESSING_LEVEL_CONTROLLER_LEVEL_CONTROLLER_CONSTANTS_H_ - -namespace webrtc { - -const float kMaxLcGain = 10; -const float kMaxLcNoisePower = 100.f * 100.f; -const float kTargetLcPeakLevel = 16384.f; -const float kTargetLcPeakLeveldBFS = -6.0206f; - -} // namespace webrtc - -#endif // WEBRTC_MODULES_AUDIO_PROCESSING_LEVEL_CONTROLLER_LEVEL_CONTROLLER_CONSTANTS_H_ diff --git a/WebRtc.NET/include/webrtc/modules/audio_processing/level_controller/noise_level_estimator.h b/WebRtc.NET/include/webrtc/modules/audio_processing/level_controller/noise_level_estimator.h deleted file mode 100644 index 235b139d..00000000 --- a/WebRtc.NET/include/webrtc/modules/audio_processing/level_controller/noise_level_estimator.h +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MODULES_AUDIO_PROCESSING_LEVEL_CONTROLLER_NOISE_LEVEL_ESTIMATOR_H_ -#define WEBRTC_MODULES_AUDIO_PROCESSING_LEVEL_CONTROLLER_NOISE_LEVEL_ESTIMATOR_H_ - -#include "webrtc/base/constructormagic.h" -#include "webrtc/modules/audio_processing/level_controller/signal_classifier.h" - -namespace webrtc { - -class NoiseLevelEstimator { - public: - NoiseLevelEstimator(); - ~NoiseLevelEstimator(); - void Initialize(int sample_rate_hz); - float Analyze(SignalClassifier::SignalType signal_type, float frame_energy); - - private: - float min_noise_energy_ = 0.f; - bool first_update_; - float noise_energy_; - int noise_energy_hold_counter_; - - RTC_DISALLOW_COPY_AND_ASSIGN(NoiseLevelEstimator); -}; - -} // namespace webrtc - -#endif // WEBRTC_MODULES_AUDIO_PROCESSING_LEVEL_CONTROLLER_NOISE_LEVEL_ESTIMATOR_H_ diff --git a/WebRtc.NET/include/webrtc/modules/audio_processing/level_controller/noise_spectrum_estimator.h b/WebRtc.NET/include/webrtc/modules/audio_processing/level_controller/noise_spectrum_estimator.h deleted file mode 100644 index 4bf81e39..00000000 --- a/WebRtc.NET/include/webrtc/modules/audio_processing/level_controller/noise_spectrum_estimator.h +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MODULES_AUDIO_PROCESSING_LEVEL_CONTROLLER_NOISE_SPECTRUM_ESTIMATOR_H_ -#define WEBRTC_MODULES_AUDIO_PROCESSING_LEVEL_CONTROLLER_NOISE_SPECTRUM_ESTIMATOR_H_ - -#include "webrtc/base/array_view.h" -#include "webrtc/base/constructormagic.h" - -namespace webrtc { - -class ApmDataDumper; - -class NoiseSpectrumEstimator { - public: - explicit NoiseSpectrumEstimator(ApmDataDumper* data_dumper); - void Initialize(); - void Update(rtc::ArrayView spectrum, bool first_update); - - rtc::ArrayView GetNoiseSpectrum() const { - return rtc::ArrayView(noise_spectrum_); - } - - private: - ApmDataDumper* data_dumper_; - float noise_spectrum_[65]; - - RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(NoiseSpectrumEstimator); -}; - -} // namespace webrtc - -#endif // WEBRTC_MODULES_AUDIO_PROCESSING_LEVEL_CONTROLLER_NOISE_SPECTRUM_ESTIMATOR_H_ diff --git a/WebRtc.NET/include/webrtc/modules/audio_processing/level_controller/peak_level_estimator.h b/WebRtc.NET/include/webrtc/modules/audio_processing/level_controller/peak_level_estimator.h deleted file mode 100644 index f9087174..00000000 --- a/WebRtc.NET/include/webrtc/modules/audio_processing/level_controller/peak_level_estimator.h +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MODULES_AUDIO_PROCESSING_LEVEL_CONTROLLER_PEAK_LEVEL_ESTIMATOR_H_ -#define WEBRTC_MODULES_AUDIO_PROCESSING_LEVEL_CONTROLLER_PEAK_LEVEL_ESTIMATOR_H_ - -#include "webrtc/base/constructormagic.h" -#include "webrtc/modules/audio_processing/level_controller/level_controller_constants.h" -#include "webrtc/modules/audio_processing/level_controller/signal_classifier.h" - -namespace webrtc { - -class PeakLevelEstimator { - public: - explicit PeakLevelEstimator(float initial_peak_level_dbfs); - ~PeakLevelEstimator(); - void Initialize(float initial_peak_level_dbfs); - float Analyze(SignalClassifier::SignalType signal_type, - float frame_peak_level); - private: - float peak_level_; - int hold_counter_; - bool initialization_phase_; - - RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(PeakLevelEstimator); -}; - -} // namespace webrtc - -#endif // WEBRTC_MODULES_AUDIO_PROCESSING_LEVEL_CONTROLLER_PEAK_LEVEL_ESTIMATOR_H_ diff --git a/WebRtc.NET/include/webrtc/modules/audio_processing/level_controller/saturating_gain_estimator.h b/WebRtc.NET/include/webrtc/modules/audio_processing/level_controller/saturating_gain_estimator.h deleted file mode 100644 index 1ec723de..00000000 --- a/WebRtc.NET/include/webrtc/modules/audio_processing/level_controller/saturating_gain_estimator.h +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MODULES_AUDIO_PROCESSING_LEVEL_CONTROLLER_SATURATING_GAIN_ESTIMATOR_H_ -#define WEBRTC_MODULES_AUDIO_PROCESSING_LEVEL_CONTROLLER_SATURATING_GAIN_ESTIMATOR_H_ - -#include "webrtc/base/constructormagic.h" - -namespace webrtc { - -class ApmDataDumper; - -class SaturatingGainEstimator { - public: - SaturatingGainEstimator(); - ~SaturatingGainEstimator(); - void Initialize(); - void Update(float gain, int num_saturations); - float GetGain() const { return saturating_gain_; } - - private: - float saturating_gain_; - int saturating_gain_hold_counter_; - - RTC_DISALLOW_COPY_AND_ASSIGN(SaturatingGainEstimator); -}; - -} // namespace webrtc - -#endif // WEBRTC_MODULES_AUDIO_PROCESSING_LEVEL_CONTROLLER_SATURATING_GAIN_ESTIMATOR_H_ diff --git a/WebRtc.NET/include/webrtc/modules/audio_processing/level_controller/signal_classifier.h b/WebRtc.NET/include/webrtc/modules/audio_processing/level_controller/signal_classifier.h deleted file mode 100644 index 8c791fec..00000000 --- a/WebRtc.NET/include/webrtc/modules/audio_processing/level_controller/signal_classifier.h +++ /dev/null @@ -1,67 +0,0 @@ -/* - * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MODULES_AUDIO_PROCESSING_LEVEL_CONTROLLER_SIGNAL_CLASSIFIER_H_ -#define WEBRTC_MODULES_AUDIO_PROCESSING_LEVEL_CONTROLLER_SIGNAL_CLASSIFIER_H_ - -#include -#include - -#include "webrtc/base/array_view.h" -#include "webrtc/base/constructormagic.h" -#include "webrtc/modules/audio_processing/level_controller/down_sampler.h" -#include "webrtc/modules/audio_processing/level_controller/noise_spectrum_estimator.h" -#include "webrtc/modules/audio_processing/utility/ooura_fft.h" - -namespace webrtc { - -class ApmDataDumper; -class AudioBuffer; - -class SignalClassifier { - public: - enum class SignalType { kHighlyNonStationary, kNonStationary, kStationary }; - - explicit SignalClassifier(ApmDataDumper* data_dumper); - ~SignalClassifier(); - - void Initialize(int sample_rate_hz); - void Analyze(const AudioBuffer& audio, SignalType* signal_type); - - private: - class FrameExtender { - public: - FrameExtender(size_t frame_size, size_t extended_frame_size); - ~FrameExtender(); - - void ExtendFrame(rtc::ArrayView x, - rtc::ArrayView x_extended); - - private: - std::vector x_old_; - - RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(FrameExtender); - }; - - ApmDataDumper* const data_dumper_; - DownSampler down_sampler_; - std::unique_ptr frame_extender_; - NoiseSpectrumEstimator noise_spectrum_estimator_; - int sample_rate_hz_; - int initialization_frames_left_; - int consistent_classification_counter_; - SignalType last_signal_type_; - const OouraFft ooura_fft_; - RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(SignalClassifier); -}; - -} // namespace webrtc - -#endif // WEBRTC_MODULES_AUDIO_PROCESSING_LEVEL_CONTROLLER_SIGNAL_CLASSIFIER_H_ diff --git a/WebRtc.NET/include/webrtc/modules/audio_processing/level_estimator_impl.h b/WebRtc.NET/include/webrtc/modules/audio_processing/level_estimator_impl.h deleted file mode 100644 index 11dbdbe5..00000000 --- a/WebRtc.NET/include/webrtc/modules/audio_processing/level_estimator_impl.h +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MODULES_AUDIO_PROCESSING_LEVEL_ESTIMATOR_IMPL_H_ -#define WEBRTC_MODULES_AUDIO_PROCESSING_LEVEL_ESTIMATOR_IMPL_H_ - -#include - -#include "webrtc/base/constructormagic.h" -#include "webrtc/base/criticalsection.h" -#include "webrtc/modules/audio_processing/include/audio_processing.h" - -namespace webrtc { - -class AudioBuffer; -class RmsLevel; - -class LevelEstimatorImpl : public LevelEstimator { - public: - explicit LevelEstimatorImpl(rtc::CriticalSection* crit); - ~LevelEstimatorImpl() override; - - // TODO(peah): Fold into ctor, once public API is removed. - void Initialize(); - void ProcessStream(AudioBuffer* audio); - - // LevelEstimator implementation. - int Enable(bool enable) override; - bool is_enabled() const override; - int RMS() override; - - private: - rtc::CriticalSection* const crit_ = nullptr; - bool enabled_ GUARDED_BY(crit_) = false; - std::unique_ptr rms_ GUARDED_BY(crit_); - RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(LevelEstimatorImpl); -}; -} // namespace webrtc - -#endif // WEBRTC_MODULES_AUDIO_PROCESSING_LEVEL_ESTIMATOR_IMPL_H_ diff --git a/WebRtc.NET/include/webrtc/modules/audio_processing/logging/apm_data_dumper.h b/WebRtc.NET/include/webrtc/modules/audio_processing/logging/apm_data_dumper.h deleted file mode 100644 index 691c4cec..00000000 --- a/WebRtc.NET/include/webrtc/modules/audio_processing/logging/apm_data_dumper.h +++ /dev/null @@ -1,151 +0,0 @@ -/* - * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MODULES_AUDIO_PROCESSING_LOGGING_APM_DATA_DUMPER_H_ -#define WEBRTC_MODULES_AUDIO_PROCESSING_LOGGING_APM_DATA_DUMPER_H_ - -#include - -#include -#include -#include - -#include "webrtc/base/array_view.h" -#include "webrtc/base/constructormagic.h" -#include "webrtc/common_audio/wav_file.h" - -// Check to verify that the define is properly set. -#if !defined(WEBRTC_APM_DEBUG_DUMP) || \ - (WEBRTC_APM_DEBUG_DUMP != 0 && WEBRTC_APM_DEBUG_DUMP != 1) -#error "Set WEBRTC_APM_DEBUG_DUMP to either 0 or 1" -#endif - -namespace webrtc { - -#if WEBRTC_APM_DEBUG_DUMP == 1 -// Functor used to use as a custom deleter in the map of file pointers to raw -// files. -struct RawFileCloseFunctor { - void operator()(FILE* f) const { fclose(f); } -}; -#endif - -// Class that handles dumping of variables into files. -class ApmDataDumper { - public: - // Constructor that takes an instance index that may - // be used to distinguish data dumped from different - // instances of the code. - explicit ApmDataDumper(int instance_index); - - ~ApmDataDumper(); - - // Reinitializes the data dumping such that new versions - // of all files being dumped to are created. - void InitiateNewSetOfRecordings() { -#if WEBRTC_APM_DEBUG_DUMP == 1 - ++recording_set_index_; -#endif - } - - // Methods for performing dumping of data of various types into - // various formats. - void DumpRaw(const char* name, int v_length, const float* v) { -#if WEBRTC_APM_DEBUG_DUMP == 1 - FILE* file = GetRawFile(name); - fwrite(v, sizeof(v[0]), v_length, file); -#endif - } - - void DumpRaw(const char* name, rtc::ArrayView v) { -#if WEBRTC_APM_DEBUG_DUMP == 1 - DumpRaw(name, v.size(), v.data()); -#endif - } - - void DumpRaw(const char* name, int v_length, const bool* v) { -#if WEBRTC_APM_DEBUG_DUMP == 1 - FILE* file = GetRawFile(name); - for (int k = 0; k < v_length; ++k) { - int16_t value = static_cast(v[k]); - fwrite(&value, sizeof(value), 1, file); - } -#endif - } - - void DumpRaw(const char* name, rtc::ArrayView v) { -#if WEBRTC_APM_DEBUG_DUMP == 1 - DumpRaw(name, v.size(), v.data()); -#endif - } - - void DumpRaw(const char* name, int v_length, const int16_t* v) { -#if WEBRTC_APM_DEBUG_DUMP == 1 - FILE* file = GetRawFile(name); - fwrite(v, sizeof(v[0]), v_length, file); -#endif - } - - void DumpRaw(const char* name, rtc::ArrayView v) { -#if WEBRTC_APM_DEBUG_DUMP == 1 - DumpRaw(name, v.size(), v.data()); -#endif - } - - void DumpRaw(const char* name, int v_length, const int32_t* v) { -#if WEBRTC_APM_DEBUG_DUMP == 1 - FILE* file = GetRawFile(name); - fwrite(v, sizeof(v[0]), v_length, file); -#endif - } - - void DumpRaw(const char* name, rtc::ArrayView v) { -#if WEBRTC_APM_DEBUG_DUMP == 1 - DumpRaw(name, v.size(), v.data()); -#endif - } - - void DumpWav(const char* name, - int v_length, - const float* v, - int sample_rate_hz, - int num_channels) { -#if WEBRTC_APM_DEBUG_DUMP == 1 - WavWriter* file = GetWavFile(name, sample_rate_hz, num_channels); - file->WriteSamples(v, v_length); -#endif - } - - void DumpWav(const char* name, - rtc::ArrayView v, - int sample_rate_hz, - int num_channels) { -#if WEBRTC_APM_DEBUG_DUMP == 1 - DumpWav(name, v.size(), v.data(), sample_rate_hz, num_channels); -#endif - } - - private: -#if WEBRTC_APM_DEBUG_DUMP == 1 - const int instance_index_; - int recording_set_index_ = 0; - std::unordered_map> - raw_files_; - std::unordered_map> wav_files_; - - FILE* GetRawFile(const char* name); - WavWriter* GetWavFile(const char* name, int sample_rate_hz, int num_channels); -#endif - RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(ApmDataDumper); -}; - -} // namespace webrtc - -#endif // WEBRTC_MODULES_AUDIO_PROCESSING_LOGGING_APM_DATA_DUMPER_H_ diff --git a/WebRtc.NET/include/webrtc/modules/audio_processing/noise_suppression_impl.h b/WebRtc.NET/include/webrtc/modules/audio_processing/noise_suppression_impl.h deleted file mode 100644 index 111e8e17..00000000 --- a/WebRtc.NET/include/webrtc/modules/audio_processing/noise_suppression_impl.h +++ /dev/null @@ -1,56 +0,0 @@ -/* - * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MODULES_AUDIO_PROCESSING_NOISE_SUPPRESSION_IMPL_H_ -#define WEBRTC_MODULES_AUDIO_PROCESSING_NOISE_SUPPRESSION_IMPL_H_ - -#include -#include - -#include "webrtc/base/constructormagic.h" -#include "webrtc/base/criticalsection.h" -#include "webrtc/modules/audio_processing/include/audio_processing.h" - -namespace webrtc { - -class AudioBuffer; - -class NoiseSuppressionImpl : public NoiseSuppression { - public: - explicit NoiseSuppressionImpl(rtc::CriticalSection* crit); - ~NoiseSuppressionImpl() override; - - // TODO(peah): Fold into ctor, once public API is removed. - void Initialize(size_t channels, int sample_rate_hz); - void AnalyzeCaptureAudio(AudioBuffer* audio); - void ProcessCaptureAudio(AudioBuffer* audio); - - // NoiseSuppression implementation. - int Enable(bool enable) override; - bool is_enabled() const override; - int set_level(Level level) override; - Level level() const override; - float speech_probability() const override; - std::vector NoiseEstimate() override; - static size_t num_noise_bins(); - - private: - class Suppressor; - rtc::CriticalSection* const crit_; - bool enabled_ GUARDED_BY(crit_) = false; - Level level_ GUARDED_BY(crit_) = kModerate; - size_t channels_ GUARDED_BY(crit_) = 0; - int sample_rate_hz_ GUARDED_BY(crit_) = 0; - std::vector> suppressors_ GUARDED_BY(crit_); - RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(NoiseSuppressionImpl); -}; -} // namespace webrtc - -#endif // WEBRTC_MODULES_AUDIO_PROCESSING_NOISE_SUPPRESSION_IMPL_H_ diff --git a/WebRtc.NET/include/webrtc/modules/audio_processing/ns/defines.h b/WebRtc.NET/include/webrtc/modules/audio_processing/ns/defines.h deleted file mode 100644 index 8271332c..00000000 --- a/WebRtc.NET/include/webrtc/modules/audio_processing/ns/defines.h +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MODULES_AUDIO_PROCESSING_NS_MAIN_SOURCE_DEFINES_H_ -#define WEBRTC_MODULES_AUDIO_PROCESSING_NS_MAIN_SOURCE_DEFINES_H_ - -#define BLOCKL_MAX 160 // max processing block length: 160 -#define ANAL_BLOCKL_MAX 256 // max analysis block length: 256 -#define HALF_ANAL_BLOCKL 129 // half max analysis block length + 1 -#define NUM_HIGH_BANDS_MAX 2 // max number of high bands: 2 - -#define QUANTILE (float)0.25 - -#define SIMULT 3 -#define END_STARTUP_LONG 200 -#define END_STARTUP_SHORT 50 -#define FACTOR (float)40.0 -#define WIDTH (float)0.01 - -// Length of fft work arrays. -#define IP_LENGTH (ANAL_BLOCKL_MAX >> 1) // must be at least ceil(2 + sqrt(ANAL_BLOCKL_MAX/2)) -#define W_LENGTH (ANAL_BLOCKL_MAX >> 1) - -//PARAMETERS FOR NEW METHOD -#define DD_PR_SNR (float)0.98 // DD update of prior SNR -#define LRT_TAVG (float)0.50 // tavg parameter for LRT (previously 0.90) -#define SPECT_FL_TAVG (float)0.30 // tavg parameter for spectral flatness measure -#define SPECT_DIFF_TAVG (float)0.30 // tavg parameter for spectral difference measure -#define PRIOR_UPDATE (float)0.10 // update parameter of prior model -#define NOISE_UPDATE (float)0.90 // update parameter for noise -#define SPEECH_UPDATE (float)0.99 // update parameter when likely speech -#define WIDTH_PR_MAP (float)4.0 // width parameter in sigmoid map for prior model -#define LRT_FEATURE_THR (float)0.5 // default threshold for LRT feature -#define SF_FEATURE_THR (float)0.5 // default threshold for Spectral Flatness feature -#define SD_FEATURE_THR (float)0.5 // default threshold for Spectral Difference feature -#define PROB_RANGE (float)0.20 // probability threshold for noise state in - // speech/noise likelihood -#define HIST_PAR_EST 1000 // histogram size for estimation of parameters -#define GAMMA_PAUSE (float)0.05 // update for conservative noise estimate -// -#define B_LIM (float)0.5 // threshold in final energy gain factor calculation -#endif // WEBRTC_MODULES_AUDIO_PROCESSING_NS_MAIN_SOURCE_DEFINES_H_ diff --git a/WebRtc.NET/include/webrtc/modules/audio_processing/ns/nsx_core.h b/WebRtc.NET/include/webrtc/modules/audio_processing/ns/nsx_core.h deleted file mode 100644 index d1754f31..00000000 --- a/WebRtc.NET/include/webrtc/modules/audio_processing/ns/nsx_core.h +++ /dev/null @@ -1,263 +0,0 @@ -/* - * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MODULES_AUDIO_PROCESSING_NS_MAIN_SOURCE_NSX_CORE_H_ -#define WEBRTC_MODULES_AUDIO_PROCESSING_NS_MAIN_SOURCE_NSX_CORE_H_ - -#ifdef NS_FILEDEBUG -#include -#endif - -#include "webrtc/common_audio/signal_processing/include/signal_processing_library.h" -#include "webrtc/modules/audio_processing/ns/nsx_defines.h" -#include "webrtc/typedefs.h" - -typedef struct NoiseSuppressionFixedC_ { - uint32_t fs; - - const int16_t* window; - int16_t analysisBuffer[ANAL_BLOCKL_MAX]; - int16_t synthesisBuffer[ANAL_BLOCKL_MAX]; - uint16_t noiseSupFilter[HALF_ANAL_BLOCKL]; - uint16_t overdrive; /* Q8 */ - uint16_t denoiseBound; /* Q14 */ - const int16_t* factor2Table; - int16_t noiseEstLogQuantile[SIMULT* HALF_ANAL_BLOCKL]; - int16_t noiseEstDensity[SIMULT* HALF_ANAL_BLOCKL]; - int16_t noiseEstCounter[SIMULT]; - int16_t noiseEstQuantile[HALF_ANAL_BLOCKL]; - - size_t anaLen; - size_t anaLen2; - size_t magnLen; - int aggrMode; - int stages; - int initFlag; - int gainMap; - - int32_t maxLrt; - int32_t minLrt; - // Log LRT factor with time-smoothing in Q8. - int32_t logLrtTimeAvgW32[HALF_ANAL_BLOCKL]; - int32_t featureLogLrt; - int32_t thresholdLogLrt; - int16_t weightLogLrt; - - uint32_t featureSpecDiff; - uint32_t thresholdSpecDiff; - int16_t weightSpecDiff; - - uint32_t featureSpecFlat; - uint32_t thresholdSpecFlat; - int16_t weightSpecFlat; - - // Conservative estimate of noise spectrum. - int32_t avgMagnPause[HALF_ANAL_BLOCKL]; - uint32_t magnEnergy; - uint32_t sumMagn; - uint32_t curAvgMagnEnergy; - uint32_t timeAvgMagnEnergy; - uint32_t timeAvgMagnEnergyTmp; - - uint32_t whiteNoiseLevel; // Initial noise estimate. - // Initial magnitude spectrum estimate. - uint32_t initMagnEst[HALF_ANAL_BLOCKL]; - // Pink noise parameters: - int32_t pinkNoiseNumerator; // Numerator. - int32_t pinkNoiseExp; // Power of freq. - int minNorm; // Smallest normalization factor. - int zeroInputSignal; // Zero input signal flag. - - // Noise spectrum from previous frame. - uint32_t prevNoiseU32[HALF_ANAL_BLOCKL]; - // Magnitude spectrum from previous frame. - uint16_t prevMagnU16[HALF_ANAL_BLOCKL]; - // Prior speech/noise probability in Q14. - int16_t priorNonSpeechProb; - - int blockIndex; // Frame index counter. - // Parameter for updating or estimating thresholds/weights for prior model. - int modelUpdate; - int cntThresUpdate; - - // Histograms for parameter estimation. - int16_t histLrt[HIST_PAR_EST]; - int16_t histSpecFlat[HIST_PAR_EST]; - int16_t histSpecDiff[HIST_PAR_EST]; - - // Quantities for high band estimate. - int16_t dataBufHBFX[NUM_HIGH_BANDS_MAX][ANAL_BLOCKL_MAX]; - - int qNoise; - int prevQNoise; - int prevQMagn; - size_t blockLen10ms; - - int16_t real[ANAL_BLOCKL_MAX]; - int16_t imag[ANAL_BLOCKL_MAX]; - int32_t energyIn; - int scaleEnergyIn; - int normData; - - struct RealFFT* real_fft; -} NoiseSuppressionFixedC; - -#ifdef __cplusplus -extern "C" -{ -#endif - -/**************************************************************************** - * WebRtcNsx_InitCore(...) - * - * This function initializes a noise suppression instance - * - * Input: - * - inst : Instance that should be initialized - * - fs : Sampling frequency - * - * Output: - * - inst : Initialized instance - * - * Return value : 0 - Ok - * -1 - Error - */ -int32_t WebRtcNsx_InitCore(NoiseSuppressionFixedC* inst, uint32_t fs); - -/**************************************************************************** - * WebRtcNsx_set_policy_core(...) - * - * This changes the aggressiveness of the noise suppression method. - * - * Input: - * - inst : Instance that should be initialized - * - mode : 0: Mild (6 dB), 1: Medium (10 dB), 2: Aggressive (15 dB) - * - * Output: - * - inst : Initialized instance - * - * Return value : 0 - Ok - * -1 - Error - */ -int WebRtcNsx_set_policy_core(NoiseSuppressionFixedC* inst, int mode); - -/**************************************************************************** - * WebRtcNsx_ProcessCore - * - * Do noise suppression. - * - * Input: - * - inst : Instance that should be initialized - * - inFrame : Input speech frame for each band - * - num_bands : Number of bands - * - * Output: - * - inst : Updated instance - * - outFrame : Output speech frame for each band - */ -void WebRtcNsx_ProcessCore(NoiseSuppressionFixedC* inst, - const short* const* inFrame, - int num_bands, - short* const* outFrame); - -/**************************************************************************** - * Some function pointers, for internal functions shared by ARM NEON and - * generic C code. - */ -// Noise Estimation. -typedef void (*NoiseEstimation)(NoiseSuppressionFixedC* inst, - uint16_t* magn, - uint32_t* noise, - int16_t* q_noise); -extern NoiseEstimation WebRtcNsx_NoiseEstimation; - -// Filter the data in the frequency domain, and create spectrum. -typedef void (*PrepareSpectrum)(NoiseSuppressionFixedC* inst, - int16_t* freq_buff); -extern PrepareSpectrum WebRtcNsx_PrepareSpectrum; - -// For the noise supression process, synthesis, read out fully processed -// segment, and update synthesis buffer. -typedef void (*SynthesisUpdate)(NoiseSuppressionFixedC* inst, - int16_t* out_frame, - int16_t gain_factor); -extern SynthesisUpdate WebRtcNsx_SynthesisUpdate; - -// Update analysis buffer for lower band, and window data before FFT. -typedef void (*AnalysisUpdate)(NoiseSuppressionFixedC* inst, - int16_t* out, - int16_t* new_speech); -extern AnalysisUpdate WebRtcNsx_AnalysisUpdate; - -// Denormalize the real-valued signal |in|, the output from inverse FFT. -typedef void (*Denormalize)(NoiseSuppressionFixedC* inst, - int16_t* in, - int factor); -extern Denormalize WebRtcNsx_Denormalize; - -// Normalize the real-valued signal |in|, the input to forward FFT. -typedef void (*NormalizeRealBuffer)(NoiseSuppressionFixedC* inst, - const int16_t* in, - int16_t* out); -extern NormalizeRealBuffer WebRtcNsx_NormalizeRealBuffer; - -// Compute speech/noise probability. -// Intended to be private. -void WebRtcNsx_SpeechNoiseProb(NoiseSuppressionFixedC* inst, - uint16_t* nonSpeechProbFinal, - uint32_t* priorLocSnr, - uint32_t* postLocSnr); - -#if defined(WEBRTC_HAS_NEON) -// For the above function pointers, functions for generic platforms are declared -// and defined as static in file nsx_core.c, while those for ARM Neon platforms -// are declared below and defined in file nsx_core_neon.c. -void WebRtcNsx_NoiseEstimationNeon(NoiseSuppressionFixedC* inst, - uint16_t* magn, - uint32_t* noise, - int16_t* q_noise); -void WebRtcNsx_SynthesisUpdateNeon(NoiseSuppressionFixedC* inst, - int16_t* out_frame, - int16_t gain_factor); -void WebRtcNsx_AnalysisUpdateNeon(NoiseSuppressionFixedC* inst, - int16_t* out, - int16_t* new_speech); -void WebRtcNsx_PrepareSpectrumNeon(NoiseSuppressionFixedC* inst, - int16_t* freq_buff); -#endif - -#if defined(MIPS32_LE) -// For the above function pointers, functions for generic platforms are declared -// and defined as static in file nsx_core.c, while those for MIPS platforms -// are declared below and defined in file nsx_core_mips.c. -void WebRtcNsx_SynthesisUpdate_mips(NoiseSuppressionFixedC* inst, - int16_t* out_frame, - int16_t gain_factor); -void WebRtcNsx_AnalysisUpdate_mips(NoiseSuppressionFixedC* inst, - int16_t* out, - int16_t* new_speech); -void WebRtcNsx_PrepareSpectrum_mips(NoiseSuppressionFixedC* inst, - int16_t* freq_buff); -void WebRtcNsx_NormalizeRealBuffer_mips(NoiseSuppressionFixedC* inst, - const int16_t* in, - int16_t* out); -#if defined(MIPS_DSP_R1_LE) -void WebRtcNsx_Denormalize_mips(NoiseSuppressionFixedC* inst, - int16_t* in, - int factor); -#endif - -#endif - -#ifdef __cplusplus -} -#endif - -#endif // WEBRTC_MODULES_AUDIO_PROCESSING_NS_MAIN_SOURCE_NSX_CORE_H_ diff --git a/WebRtc.NET/include/webrtc/modules/audio_processing/ns/nsx_defines.h b/WebRtc.NET/include/webrtc/modules/audio_processing/ns/nsx_defines.h deleted file mode 100644 index 862dc3ca..00000000 --- a/WebRtc.NET/include/webrtc/modules/audio_processing/ns/nsx_defines.h +++ /dev/null @@ -1,64 +0,0 @@ -/* - * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MODULES_AUDIO_PROCESSING_NS_MAIN_SOURCE_NSX_DEFINES_H_ -#define WEBRTC_MODULES_AUDIO_PROCESSING_NS_MAIN_SOURCE_NSX_DEFINES_H_ - -#define ANAL_BLOCKL_MAX 256 /* Max analysis block length */ -#define HALF_ANAL_BLOCKL 129 /* Half max analysis block length + 1 */ -#define NUM_HIGH_BANDS_MAX 2 /* Max number of high bands */ -#define SIMULT 3 -#define END_STARTUP_LONG 200 -#define END_STARTUP_SHORT 50 -#define FACTOR_Q16 2621440 /* 40 in Q16 */ -#define FACTOR_Q7 5120 /* 40 in Q7 */ -#define FACTOR_Q7_STARTUP 1024 /* 8 in Q7 */ -#define WIDTH_Q8 3 /* 0.01 in Q8 (or 25 ) */ - -/* PARAMETERS FOR NEW METHOD */ -#define DD_PR_SNR_Q11 2007 /* ~= Q11(0.98) DD update of prior SNR */ -#define ONE_MINUS_DD_PR_SNR_Q11 41 /* DD update of prior SNR */ -#define SPECT_FLAT_TAVG_Q14 4915 /* (0.30) tavg parameter for spectral flatness measure */ -#define SPECT_DIFF_TAVG_Q8 77 /* (0.30) tavg parameter for spectral flatness measure */ -#define PRIOR_UPDATE_Q14 1638 /* Q14(0.1) Update parameter of prior model */ -#define NOISE_UPDATE_Q8 26 /* 26 ~= Q8(0.1) Update parameter for noise */ - -/* Probability threshold for noise state in speech/noise likelihood. */ -#define ONE_MINUS_PROB_RANGE_Q8 205 /* 205 ~= Q8(0.8) */ -#define HIST_PAR_EST 1000 /* Histogram size for estimation of parameters */ - -/* FEATURE EXTRACTION CONFIG */ -/* Bin size of histogram */ -#define BIN_SIZE_LRT 10 -/* Scale parameters: multiply dominant peaks of the histograms by scale factor to obtain. */ -/* Thresholds for prior model */ -#define FACTOR_1_LRT_DIFF 6 /* For LRT and spectral difference (5 times bigger) */ -/* For spectral_flatness: used when noise is flatter than speech (10 times bigger). */ -#define FACTOR_2_FLAT_Q10 922 -/* Peak limit for spectral flatness (varies between 0 and 1) */ -#define THRES_PEAK_FLAT 24 /* * 2 * BIN_SIZE_FLAT_FX */ -/* Limit on spacing of two highest peaks in histogram: spacing determined by bin size. */ -#define LIM_PEAK_SPACE_FLAT_DIFF 4 /* * 2 * BIN_SIZE_DIFF_FX */ -/* Limit on relevance of second peak */ -#define LIM_PEAK_WEIGHT_FLAT_DIFF 2 -#define THRES_FLUCT_LRT 10240 /* = 20 * inst->modelUpdate; fluctuation limit of LRT feat. */ -/* Limit on the max and min values for the feature thresholds */ -#define MAX_FLAT_Q10 38912 /* * 2 * BIN_SIZE_FLAT_FX */ -#define MIN_FLAT_Q10 4096 /* * 2 * BIN_SIZE_FLAT_FX */ -#define MAX_DIFF 100 /* * 2 * BIN_SIZE_DIFF_FX */ -#define MIN_DIFF 16 /* * 2 * BIN_SIZE_DIFF_FX */ -/* Criteria of weight of histogram peak to accept/reject feature */ -#define THRES_WEIGHT_FLAT_DIFF 154 /*(int)(0.3*(inst->modelUpdate)) for flatness and difference */ - -#define STAT_UPDATES 9 /* Update every 512 = 1 << 9 block */ -#define ONE_MINUS_GAMMA_PAUSE_Q8 13 /* ~= Q8(0.05) Update for conservative noise estimate */ -#define GAMMA_NOISE_TRANS_AND_SPEECH_Q8 3 /* ~= Q8(0.01) Update for transition and noise region */ - -#endif /* WEBRTC_MODULES_AUDIO_PROCESSING_NS_MAIN_SOURCE_NSX_DEFINES_H_ */ diff --git a/WebRtc.NET/include/webrtc/modules/audio_processing/ns/windows_private.h b/WebRtc.NET/include/webrtc/modules/audio_processing/ns/windows_private.h deleted file mode 100644 index 44c2e846..00000000 --- a/WebRtc.NET/include/webrtc/modules/audio_processing/ns/windows_private.h +++ /dev/null @@ -1,574 +0,0 @@ -/* - * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MODULES_AUDIO_PROCESSING_NS_MAIN_SOURCE_WINDOWS_PRIVATE_H_ -#define WEBRTC_MODULES_AUDIO_PROCESSING_NS_MAIN_SOURCE_WINDOWS_PRIVATE_H_ - -// Hanning window for 4ms 16kHz -static const float kHanning64w128[128] = { - 0.00000000000000f, 0.02454122852291f, 0.04906767432742f, - 0.07356456359967f, 0.09801714032956f, 0.12241067519922f, - 0.14673047445536f, 0.17096188876030f, 0.19509032201613f, - 0.21910124015687f, 0.24298017990326f, 0.26671275747490f, - 0.29028467725446f, 0.31368174039889f, 0.33688985339222f, - 0.35989503653499f, 0.38268343236509f, 0.40524131400499f, - 0.42755509343028f, 0.44961132965461f, 0.47139673682600f, - 0.49289819222978f, 0.51410274419322f, 0.53499761988710f, - 0.55557023301960f, 0.57580819141785f, 0.59569930449243f, - 0.61523159058063f, 0.63439328416365f, 0.65317284295378f, - 0.67155895484702f, 0.68954054473707f, 0.70710678118655f, - 0.72424708295147f, 0.74095112535496f, 0.75720884650648f, - 0.77301045336274f, 0.78834642762661f, 0.80320753148064f, - 0.81758481315158f, 0.83146961230255f, 0.84485356524971f, - 0.85772861000027f, 0.87008699110871f, 0.88192126434835f, - 0.89322430119552f, 0.90398929312344f, 0.91420975570353f, - 0.92387953251129f, 0.93299279883474f, 0.94154406518302f, - 0.94952818059304f, 0.95694033573221f, 0.96377606579544f, - 0.97003125319454f, 0.97570213003853f, 0.98078528040323f, - 0.98527764238894f, 0.98917650996478f, 0.99247953459871f, - 0.99518472667220f, 0.99729045667869f, 0.99879545620517f, - 0.99969881869620f, 1.00000000000000f, - 0.99969881869620f, 0.99879545620517f, 0.99729045667869f, - 0.99518472667220f, 0.99247953459871f, 0.98917650996478f, - 0.98527764238894f, 0.98078528040323f, 0.97570213003853f, - 0.97003125319454f, 0.96377606579544f, 0.95694033573221f, - 0.94952818059304f, 0.94154406518302f, 0.93299279883474f, - 0.92387953251129f, 0.91420975570353f, 0.90398929312344f, - 0.89322430119552f, 0.88192126434835f, 0.87008699110871f, - 0.85772861000027f, 0.84485356524971f, 0.83146961230255f, - 0.81758481315158f, 0.80320753148064f, 0.78834642762661f, - 0.77301045336274f, 0.75720884650648f, 0.74095112535496f, - 0.72424708295147f, 0.70710678118655f, 0.68954054473707f, - 0.67155895484702f, 0.65317284295378f, 0.63439328416365f, - 0.61523159058063f, 0.59569930449243f, 0.57580819141785f, - 0.55557023301960f, 0.53499761988710f, 0.51410274419322f, - 0.49289819222978f, 0.47139673682600f, 0.44961132965461f, - 0.42755509343028f, 0.40524131400499f, 0.38268343236509f, - 0.35989503653499f, 0.33688985339222f, 0.31368174039889f, - 0.29028467725446f, 0.26671275747490f, 0.24298017990326f, - 0.21910124015687f, 0.19509032201613f, 0.17096188876030f, - 0.14673047445536f, 0.12241067519922f, 0.09801714032956f, - 0.07356456359967f, 0.04906767432742f, 0.02454122852291f -}; - - - -// hybrib Hanning & flat window -static const float kBlocks80w128[128] = { - (float)0.00000000, (float)0.03271908, (float)0.06540313, (float)0.09801714, (float)0.13052619, - (float)0.16289547, (float)0.19509032, (float)0.22707626, (float)0.25881905, (float)0.29028468, - (float)0.32143947, (float)0.35225005, (float)0.38268343, (float)0.41270703, (float)0.44228869, - (float)0.47139674, (float)0.50000000, (float)0.52806785, (float)0.55557023, (float)0.58247770, - (float)0.60876143, (float)0.63439328, (float)0.65934582, (float)0.68359230, (float)0.70710678, - (float)0.72986407, (float)0.75183981, (float)0.77301045, (float)0.79335334, (float)0.81284668, - (float)0.83146961, (float)0.84920218, (float)0.86602540, (float)0.88192126, (float)0.89687274, - (float)0.91086382, (float)0.92387953, (float)0.93590593, (float)0.94693013, (float)0.95694034, - (float)0.96592583, (float)0.97387698, (float)0.98078528, (float)0.98664333, (float)0.99144486, - (float)0.99518473, (float)0.99785892, (float)0.99946459, (float)1.00000000, (float)1.00000000, - (float)1.00000000, (float)1.00000000, (float)1.00000000, (float)1.00000000, (float)1.00000000, - (float)1.00000000, (float)1.00000000, (float)1.00000000, (float)1.00000000, (float)1.00000000, - (float)1.00000000, (float)1.00000000, (float)1.00000000, (float)1.00000000, (float)1.00000000, - (float)1.00000000, (float)1.00000000, (float)1.00000000, (float)1.00000000, (float)1.00000000, - (float)1.00000000, (float)1.00000000, (float)1.00000000, (float)1.00000000, (float)1.00000000, - (float)1.00000000, (float)1.00000000, (float)1.00000000, (float)1.00000000, (float)1.00000000, - (float)1.00000000, (float)0.99946459, (float)0.99785892, (float)0.99518473, (float)0.99144486, - (float)0.98664333, (float)0.98078528, (float)0.97387698, (float)0.96592583, (float)0.95694034, - (float)0.94693013, (float)0.93590593, (float)0.92387953, (float)0.91086382, (float)0.89687274, - (float)0.88192126, (float)0.86602540, (float)0.84920218, (float)0.83146961, (float)0.81284668, - (float)0.79335334, (float)0.77301045, (float)0.75183981, (float)0.72986407, (float)0.70710678, - (float)0.68359230, (float)0.65934582, (float)0.63439328, (float)0.60876143, (float)0.58247770, - (float)0.55557023, (float)0.52806785, (float)0.50000000, (float)0.47139674, (float)0.44228869, - (float)0.41270703, (float)0.38268343, (float)0.35225005, (float)0.32143947, (float)0.29028468, - (float)0.25881905, (float)0.22707626, (float)0.19509032, (float)0.16289547, (float)0.13052619, - (float)0.09801714, (float)0.06540313, (float)0.03271908 -}; - -// hybrib Hanning & flat window -static const float kBlocks160w256[256] = { - (float)0.00000000, (float)0.01636173, (float)0.03271908, (float)0.04906767, (float)0.06540313, - (float)0.08172107, (float)0.09801714, (float)0.11428696, (float)0.13052619, (float)0.14673047, - (float)0.16289547, (float)0.17901686, (float)0.19509032, (float)0.21111155, (float)0.22707626, - (float)0.24298018, (float)0.25881905, (float)0.27458862, (float)0.29028468, (float)0.30590302, - (float)0.32143947, (float)0.33688985, (float)0.35225005, (float)0.36751594, (float)0.38268343, - (float)0.39774847, (float)0.41270703, (float)0.42755509, (float)0.44228869, (float)0.45690388, - (float)0.47139674, (float)0.48576339, (float)0.50000000, (float)0.51410274, (float)0.52806785, - (float)0.54189158, (float)0.55557023, (float)0.56910015, (float)0.58247770, (float)0.59569930, - (float)0.60876143, (float)0.62166057, (float)0.63439328, (float)0.64695615, (float)0.65934582, - (float)0.67155895, (float)0.68359230, (float)0.69544264, (float)0.70710678, (float)0.71858162, - (float)0.72986407, (float)0.74095113, (float)0.75183981, (float)0.76252720, (float)0.77301045, - (float)0.78328675, (float)0.79335334, (float)0.80320753, (float)0.81284668, (float)0.82226822, - (float)0.83146961, (float)0.84044840, (float)0.84920218, (float)0.85772861, (float)0.86602540, - (float)0.87409034, (float)0.88192126, (float)0.88951608, (float)0.89687274, (float)0.90398929, - (float)0.91086382, (float)0.91749450, (float)0.92387953, (float)0.93001722, (float)0.93590593, - (float)0.94154407, (float)0.94693013, (float)0.95206268, (float)0.95694034, (float)0.96156180, - (float)0.96592583, (float)0.97003125, (float)0.97387698, (float)0.97746197, (float)0.98078528, - (float)0.98384601, (float)0.98664333, (float)0.98917651, (float)0.99144486, (float)0.99344778, - (float)0.99518473, (float)0.99665524, (float)0.99785892, (float)0.99879546, (float)0.99946459, - (float)0.99986614, (float)1.00000000, (float)1.00000000, (float)1.00000000, (float)1.00000000, - (float)1.00000000, (float)1.00000000, (float)1.00000000, (float)1.00000000, (float)1.00000000, - (float)1.00000000, (float)1.00000000, (float)1.00000000, (float)1.00000000, (float)1.00000000, - (float)1.00000000, (float)1.00000000, (float)1.00000000, (float)1.00000000, (float)1.00000000, - (float)1.00000000, (float)1.00000000, (float)1.00000000, (float)1.00000000, (float)1.00000000, - (float)1.00000000, (float)1.00000000, (float)1.00000000, (float)1.00000000, (float)1.00000000, - (float)1.00000000, (float)1.00000000, (float)1.00000000, (float)1.00000000, (float)1.00000000, - (float)1.00000000, (float)1.00000000, (float)1.00000000, (float)1.00000000, (float)1.00000000, - (float)1.00000000, (float)1.00000000, (float)1.00000000, (float)1.00000000, (float)1.00000000, - (float)1.00000000, (float)1.00000000, (float)1.00000000, (float)1.00000000, (float)1.00000000, - (float)1.00000000, (float)1.00000000, (float)1.00000000, (float)1.00000000, (float)1.00000000, - (float)1.00000000, (float)1.00000000, (float)1.00000000, (float)1.00000000, (float)1.00000000, - (float)1.00000000, (float)1.00000000, (float)1.00000000, (float)1.00000000, (float)1.00000000, - (float)1.00000000, (float)0.99986614, (float)0.99946459, (float)0.99879546, (float)0.99785892, - (float)0.99665524, (float)0.99518473, (float)0.99344778, (float)0.99144486, (float)0.98917651, - (float)0.98664333, (float)0.98384601, (float)0.98078528, (float)0.97746197, (float)0.97387698, - (float)0.97003125, (float)0.96592583, (float)0.96156180, (float)0.95694034, (float)0.95206268, - (float)0.94693013, (float)0.94154407, (float)0.93590593, (float)0.93001722, (float)0.92387953, - (float)0.91749450, (float)0.91086382, (float)0.90398929, (float)0.89687274, (float)0.88951608, - (float)0.88192126, (float)0.87409034, (float)0.86602540, (float)0.85772861, (float)0.84920218, - (float)0.84044840, (float)0.83146961, (float)0.82226822, (float)0.81284668, (float)0.80320753, - (float)0.79335334, (float)0.78328675, (float)0.77301045, (float)0.76252720, (float)0.75183981, - (float)0.74095113, (float)0.72986407, (float)0.71858162, (float)0.70710678, (float)0.69544264, - (float)0.68359230, (float)0.67155895, (float)0.65934582, (float)0.64695615, (float)0.63439328, - (float)0.62166057, (float)0.60876143, (float)0.59569930, (float)0.58247770, (float)0.56910015, - (float)0.55557023, (float)0.54189158, (float)0.52806785, (float)0.51410274, (float)0.50000000, - (float)0.48576339, (float)0.47139674, (float)0.45690388, (float)0.44228869, (float)0.42755509, - (float)0.41270703, (float)0.39774847, (float)0.38268343, (float)0.36751594, (float)0.35225005, - (float)0.33688985, (float)0.32143947, (float)0.30590302, (float)0.29028468, (float)0.27458862, - (float)0.25881905, (float)0.24298018, (float)0.22707626, (float)0.21111155, (float)0.19509032, - (float)0.17901686, (float)0.16289547, (float)0.14673047, (float)0.13052619, (float)0.11428696, - (float)0.09801714, (float)0.08172107, (float)0.06540313, (float)0.04906767, (float)0.03271908, - (float)0.01636173 -}; - -// hybrib Hanning & flat window: for 20ms -static const float kBlocks320w512[512] = { - (float)0.00000000, (float)0.00818114, (float)0.01636173, (float)0.02454123, (float)0.03271908, - (float)0.04089475, (float)0.04906767, (float)0.05723732, (float)0.06540313, (float)0.07356456, - (float)0.08172107, (float)0.08987211, (float)0.09801714, (float)0.10615561, (float)0.11428696, - (float)0.12241068, (float)0.13052619, (float)0.13863297, (float)0.14673047, (float)0.15481816, - (float)0.16289547, (float)0.17096189, (float)0.17901686, (float)0.18705985, (float)0.19509032, - (float)0.20310773, (float)0.21111155, (float)0.21910124, (float)0.22707626, (float)0.23503609, - (float)0.24298018, (float)0.25090801, (float)0.25881905, (float)0.26671276, (float)0.27458862, - (float)0.28244610, (float)0.29028468, (float)0.29810383, (float)0.30590302, (float)0.31368174, - (float)0.32143947, (float)0.32917568, (float)0.33688985, (float)0.34458148, (float)0.35225005, - (float)0.35989504, (float)0.36751594, (float)0.37511224, (float)0.38268343, (float)0.39022901, - (float)0.39774847, (float)0.40524131, (float)0.41270703, (float)0.42014512, (float)0.42755509, - (float)0.43493645, (float)0.44228869, (float)0.44961133, (float)0.45690388, (float)0.46416584, - (float)0.47139674, (float)0.47859608, (float)0.48576339, (float)0.49289819, (float)0.50000000, - (float)0.50706834, (float)0.51410274, (float)0.52110274, (float)0.52806785, (float)0.53499762, - (float)0.54189158, (float)0.54874927, (float)0.55557023, (float)0.56235401, (float)0.56910015, - (float)0.57580819, (float)0.58247770, (float)0.58910822, (float)0.59569930, (float)0.60225052, - (float)0.60876143, (float)0.61523159, (float)0.62166057, (float)0.62804795, (float)0.63439328, - (float)0.64069616, (float)0.64695615, (float)0.65317284, (float)0.65934582, (float)0.66547466, - (float)0.67155895, (float)0.67759830, (float)0.68359230, (float)0.68954054, (float)0.69544264, - (float)0.70129818, (float)0.70710678, (float)0.71286806, (float)0.71858162, (float)0.72424708, - (float)0.72986407, (float)0.73543221, (float)0.74095113, (float)0.74642045, (float)0.75183981, - (float)0.75720885, (float)0.76252720, (float)0.76779452, (float)0.77301045, (float)0.77817464, - (float)0.78328675, (float)0.78834643, (float)0.79335334, (float)0.79830715, (float)0.80320753, - (float)0.80805415, (float)0.81284668, (float)0.81758481, (float)0.82226822, (float)0.82689659, - (float)0.83146961, (float)0.83598698, (float)0.84044840, (float)0.84485357, (float)0.84920218, - (float)0.85349396, (float)0.85772861, (float)0.86190585, (float)0.86602540, (float)0.87008699, - (float)0.87409034, (float)0.87803519, (float)0.88192126, (float)0.88574831, (float)0.88951608, - (float)0.89322430, (float)0.89687274, (float)0.90046115, (float)0.90398929, (float)0.90745693, - (float)0.91086382, (float)0.91420976, (float)0.91749450, (float)0.92071783, (float)0.92387953, - (float)0.92697940, (float)0.93001722, (float)0.93299280, (float)0.93590593, (float)0.93875641, - (float)0.94154407, (float)0.94426870, (float)0.94693013, (float)0.94952818, (float)0.95206268, - (float)0.95453345, (float)0.95694034, (float)0.95928317, (float)0.96156180, (float)0.96377607, - (float)0.96592583, (float)0.96801094, (float)0.97003125, (float)0.97198664, (float)0.97387698, - (float)0.97570213, (float)0.97746197, (float)0.97915640, (float)0.98078528, (float)0.98234852, - (float)0.98384601, (float)0.98527764, (float)0.98664333, (float)0.98794298, (float)0.98917651, - (float)0.99034383, (float)0.99144486, (float)0.99247953, (float)0.99344778, (float)0.99434953, - (float)0.99518473, (float)0.99595331, (float)0.99665524, (float)0.99729046, (float)0.99785892, - (float)0.99836060, (float)0.99879546, (float)0.99916346, (float)0.99946459, (float)0.99969882, - (float)0.99986614, (float)0.99996653, (float)1.00000000, (float)1.00000000, (float)1.00000000, - (float)1.00000000, (float)1.00000000, (float)1.00000000, (float)1.00000000, (float)1.00000000, - (float)1.00000000, (float)1.00000000, (float)1.00000000, (float)1.00000000, (float)1.00000000, - (float)1.00000000, (float)1.00000000, (float)1.00000000, (float)1.00000000, (float)1.00000000, - (float)1.00000000, (float)1.00000000, (float)1.00000000, (float)1.00000000, (float)1.00000000, - (float)1.00000000, (float)1.00000000, (float)1.00000000, (float)1.00000000, (float)1.00000000, - (float)1.00000000, (float)1.00000000, (float)1.00000000, (float)1.00000000, (float)1.00000000, - (float)1.00000000, (float)1.00000000, (float)1.00000000, (float)1.00000000, (float)1.00000000, - (float)1.00000000, (float)1.00000000, (float)1.00000000, (float)1.00000000, (float)1.00000000, - (float)1.00000000, (float)1.00000000, (float)1.00000000, (float)1.00000000, (float)1.00000000, - (float)1.00000000, (float)1.00000000, (float)1.00000000, (float)1.00000000, (float)1.00000000, - (float)1.00000000, (float)1.00000000, (float)1.00000000, (float)1.00000000, (float)1.00000000, - (float)1.00000000, (float)1.00000000, (float)1.00000000, (float)1.00000000, (float)1.00000000, - (float)1.00000000, (float)1.00000000, (float)1.00000000, (float)1.00000000, (float)1.00000000, - (float)1.00000000, (float)1.00000000, (float)1.00000000, (float)1.00000000, (float)1.00000000, - (float)1.00000000, (float)1.00000000, (float)1.00000000, (float)1.00000000, (float)1.00000000, - (float)1.00000000, (float)1.00000000, (float)1.00000000, (float)1.00000000, (float)1.00000000, - (float)1.00000000, (float)1.00000000, (float)1.00000000, (float)1.00000000, (float)1.00000000, - (float)1.00000000, (float)1.00000000, (float)1.00000000, (float)1.00000000, (float)1.00000000, - (float)1.00000000, (float)1.00000000, (float)1.00000000, (float)1.00000000, (float)1.00000000, - (float)1.00000000, (float)1.00000000, (float)1.00000000, (float)1.00000000, (float)1.00000000, - (float)1.00000000, (float)1.00000000, (float)1.00000000, (float)1.00000000, (float)1.00000000, - (float)1.00000000, (float)1.00000000, (float)1.00000000, (float)1.00000000, (float)1.00000000, - (float)1.00000000, (float)1.00000000, (float)1.00000000, (float)1.00000000, (float)1.00000000, - (float)1.00000000, (float)1.00000000, (float)1.00000000, (float)1.00000000, (float)1.00000000, - (float)1.00000000, (float)1.00000000, (float)1.00000000, (float)1.00000000, (float)1.00000000, - (float)1.00000000, (float)0.99996653, (float)0.99986614, (float)0.99969882, (float)0.99946459, - (float)0.99916346, (float)0.99879546, (float)0.99836060, (float)0.99785892, (float)0.99729046, - (float)0.99665524, (float)0.99595331, (float)0.99518473, (float)0.99434953, (float)0.99344778, - (float)0.99247953, (float)0.99144486, (float)0.99034383, (float)0.98917651, (float)0.98794298, - (float)0.98664333, (float)0.98527764, (float)0.98384601, (float)0.98234852, (float)0.98078528, - (float)0.97915640, (float)0.97746197, (float)0.97570213, (float)0.97387698, (float)0.97198664, - (float)0.97003125, (float)0.96801094, (float)0.96592583, (float)0.96377607, (float)0.96156180, - (float)0.95928317, (float)0.95694034, (float)0.95453345, (float)0.95206268, (float)0.94952818, - (float)0.94693013, (float)0.94426870, (float)0.94154407, (float)0.93875641, (float)0.93590593, - (float)0.93299280, (float)0.93001722, (float)0.92697940, (float)0.92387953, (float)0.92071783, - (float)0.91749450, (float)0.91420976, (float)0.91086382, (float)0.90745693, (float)0.90398929, - (float)0.90046115, (float)0.89687274, (float)0.89322430, (float)0.88951608, (float)0.88574831, - (float)0.88192126, (float)0.87803519, (float)0.87409034, (float)0.87008699, (float)0.86602540, - (float)0.86190585, (float)0.85772861, (float)0.85349396, (float)0.84920218, (float)0.84485357, - (float)0.84044840, (float)0.83598698, (float)0.83146961, (float)0.82689659, (float)0.82226822, - (float)0.81758481, (float)0.81284668, (float)0.80805415, (float)0.80320753, (float)0.79830715, - (float)0.79335334, (float)0.78834643, (float)0.78328675, (float)0.77817464, (float)0.77301045, - (float)0.76779452, (float)0.76252720, (float)0.75720885, (float)0.75183981, (float)0.74642045, - (float)0.74095113, (float)0.73543221, (float)0.72986407, (float)0.72424708, (float)0.71858162, - (float)0.71286806, (float)0.70710678, (float)0.70129818, (float)0.69544264, (float)0.68954054, - (float)0.68359230, (float)0.67759830, (float)0.67155895, (float)0.66547466, (float)0.65934582, - (float)0.65317284, (float)0.64695615, (float)0.64069616, (float)0.63439328, (float)0.62804795, - (float)0.62166057, (float)0.61523159, (float)0.60876143, (float)0.60225052, (float)0.59569930, - (float)0.58910822, (float)0.58247770, (float)0.57580819, (float)0.56910015, (float)0.56235401, - (float)0.55557023, (float)0.54874927, (float)0.54189158, (float)0.53499762, (float)0.52806785, - (float)0.52110274, (float)0.51410274, (float)0.50706834, (float)0.50000000, (float)0.49289819, - (float)0.48576339, (float)0.47859608, (float)0.47139674, (float)0.46416584, (float)0.45690388, - (float)0.44961133, (float)0.44228869, (float)0.43493645, (float)0.42755509, (float)0.42014512, - (float)0.41270703, (float)0.40524131, (float)0.39774847, (float)0.39022901, (float)0.38268343, - (float)0.37511224, (float)0.36751594, (float)0.35989504, (float)0.35225005, (float)0.34458148, - (float)0.33688985, (float)0.32917568, (float)0.32143947, (float)0.31368174, (float)0.30590302, - (float)0.29810383, (float)0.29028468, (float)0.28244610, (float)0.27458862, (float)0.26671276, - (float)0.25881905, (float)0.25090801, (float)0.24298018, (float)0.23503609, (float)0.22707626, - (float)0.21910124, (float)0.21111155, (float)0.20310773, (float)0.19509032, (float)0.18705985, - (float)0.17901686, (float)0.17096189, (float)0.16289547, (float)0.15481816, (float)0.14673047, - (float)0.13863297, (float)0.13052619, (float)0.12241068, (float)0.11428696, (float)0.10615561, - (float)0.09801714, (float)0.08987211, (float)0.08172107, (float)0.07356456, (float)0.06540313, - (float)0.05723732, (float)0.04906767, (float)0.04089475, (float)0.03271908, (float)0.02454123, - (float)0.01636173, (float)0.00818114 -}; - - -// Hanning window: for 15ms at 16kHz with symmetric zeros -static const float kBlocks240w512[512] = { - (float)0.00000000, (float)0.00000000, (float)0.00000000, (float)0.00000000, (float)0.00000000, - (float)0.00000000, (float)0.00000000, (float)0.00000000, (float)0.00000000, (float)0.00000000, - (float)0.00000000, (float)0.00000000, (float)0.00000000, (float)0.00000000, (float)0.00000000, - (float)0.00000000, (float)0.00000000, (float)0.00654494, (float)0.01308960, (float)0.01963369, - (float)0.02617695, (float)0.03271908, (float)0.03925982, (float)0.04579887, (float)0.05233596, - (float)0.05887080, (float)0.06540313, (float)0.07193266, (float)0.07845910, (float)0.08498218, - (float)0.09150162, (float)0.09801714, (float)0.10452846, (float)0.11103531, (float)0.11753740, - (float)0.12403446, (float)0.13052620, (float)0.13701233, (float)0.14349262, (float)0.14996676, - (float)0.15643448, (float)0.16289547, (float)0.16934951, (float)0.17579629, (float)0.18223552, - (float)0.18866697, (float)0.19509032, (float)0.20150533, (float)0.20791170, (float)0.21430916, - (float)0.22069745, (float)0.22707628, (float)0.23344538, (float)0.23980446, (float)0.24615330, - (float)0.25249159, (float)0.25881904, (float)0.26513544, (float)0.27144045, (float)0.27773386, - (float)0.28401536, (float)0.29028466, (float)0.29654160, (float)0.30278578, (float)0.30901700, - (float)0.31523499, (float)0.32143945, (float)0.32763019, (float)0.33380687, (float)0.33996925, - (float)0.34611708, (float)0.35225007, (float)0.35836795, (float)0.36447051, (float)0.37055743, - (float)0.37662852, (float)0.38268346, (float)0.38872197, (float)0.39474389, (float)0.40074885, - (float)0.40673664, (float)0.41270703, (float)0.41865975, (float)0.42459452, (float)0.43051112, - (float)0.43640924, (float)0.44228873, (float)0.44814920, (float)0.45399052, (float)0.45981237, - (float)0.46561453, (float)0.47139674, (float)0.47715878, (float)0.48290035, (float)0.48862126, - (float)0.49432120, (float)0.50000000, (float)0.50565743, (float)0.51129311, (float)0.51690692, - (float)0.52249855, (float)0.52806789, (float)0.53361452, (float)0.53913832, (float)0.54463905, - (float)0.55011642, (float)0.55557024, (float)0.56100029, (float)0.56640625, (float)0.57178795, - (float)0.57714522, (float)0.58247769, (float)0.58778524, (float)0.59306765, (float)0.59832460, - (float)0.60355598, (float)0.60876143, (float)0.61394083, (float)0.61909395, (float)0.62422055, - (float)0.62932038, (float)0.63439333, (float)0.63943899, (float)0.64445734, (float)0.64944810, - (float)0.65441096, (float)0.65934587, (float)0.66425246, (float)0.66913062, (float)0.67398012, - (float)0.67880076, (float)0.68359232, (float)0.68835455, (float)0.69308740, (float)0.69779050, - (float)0.70246369, (float)0.70710677, (float)0.71171963, (float)0.71630198, (float)0.72085363, - (float)0.72537440, (float)0.72986406, (float)0.73432255, (float)0.73874950, (float)0.74314487, - (float)0.74750835, (float)0.75183982, (float)0.75613910, (float)0.76040596, (float)0.76464027, - (float)0.76884186, (float)0.77301043, (float)0.77714598, (float)0.78124821, (float)0.78531694, - (float)0.78935206, (float)0.79335338, (float)0.79732066, (float)0.80125386, (float)0.80515265, - (float)0.80901700, (float)0.81284672, (float)0.81664157, (float)0.82040149, (float)0.82412618, - (float)0.82781565, (float)0.83146966, (float)0.83508795, (float)0.83867061, (float)0.84221727, - (float)0.84572780, (float)0.84920216, (float)0.85264021, (float)0.85604161, (float)0.85940641, - (float)0.86273444, (float)0.86602545, (float)0.86927933, (float)0.87249607, (float)0.87567532, - (float)0.87881714, (float)0.88192129, (float)0.88498765, (float)0.88801610, (float)0.89100653, - (float)0.89395881, (float)0.89687276, (float)0.89974827, (float)0.90258533, (float)0.90538365, - (float)0.90814316, (float)0.91086388, (float)0.91354549, (float)0.91618794, (float)0.91879123, - (float)0.92135513, (float)0.92387950, (float)0.92636442, (float)0.92880958, (float)0.93121493, - (float)0.93358046, (float)0.93590593, (float)0.93819135, (float)0.94043654, (float)0.94264150, - (float)0.94480604, (float)0.94693011, (float)0.94901365, (float)0.95105654, (float)0.95305866, - (float)0.95501995, (float)0.95694035, (float)0.95881975, (float)0.96065807, (float)0.96245527, - (float)0.96421117, (float)0.96592581, (float)0.96759909, (float)0.96923089, (float)0.97082120, - (float)0.97236991, (float)0.97387701, (float)0.97534233, (float)0.97676587, (float)0.97814763, - (float)0.97948742, (float)0.98078531, (float)0.98204112, (float)0.98325491, (float)0.98442656, - (float)0.98555607, (float)0.98664331, (float)0.98768836, (float)0.98869103, (float)0.98965138, - (float)0.99056935, (float)0.99144489, (float)0.99227792, (float)0.99306846, (float)0.99381649, - (float)0.99452192, (float)0.99518472, (float)0.99580491, (float)0.99638247, (float)0.99691731, - (float)0.99740952, (float)0.99785894, (float)0.99826562, (float)0.99862951, (float)0.99895066, - (float)0.99922901, (float)0.99946457, (float)0.99965733, (float)0.99980724, (float)0.99991435, - (float)0.99997860, (float)1.00000000, (float)0.99997860, (float)0.99991435, (float)0.99980724, - (float)0.99965733, (float)0.99946457, (float)0.99922901, (float)0.99895066, (float)0.99862951, - (float)0.99826562, (float)0.99785894, (float)0.99740946, (float)0.99691731, (float)0.99638247, - (float)0.99580491, (float)0.99518472, (float)0.99452192, (float)0.99381644, (float)0.99306846, - (float)0.99227792, (float)0.99144489, (float)0.99056935, (float)0.98965138, (float)0.98869103, - (float)0.98768836, (float)0.98664331, (float)0.98555607, (float)0.98442656, (float)0.98325491, - (float)0.98204112, (float)0.98078525, (float)0.97948742, (float)0.97814757, (float)0.97676587, - (float)0.97534227, (float)0.97387695, (float)0.97236991, (float)0.97082120, (float)0.96923089, - (float)0.96759909, (float)0.96592581, (float)0.96421117, (float)0.96245521, (float)0.96065807, - (float)0.95881969, (float)0.95694029, (float)0.95501995, (float)0.95305860, (float)0.95105648, - (float)0.94901365, (float)0.94693011, (float)0.94480604, (float)0.94264150, (float)0.94043654, - (float)0.93819129, (float)0.93590593, (float)0.93358046, (float)0.93121493, (float)0.92880952, - (float)0.92636436, (float)0.92387950, (float)0.92135507, (float)0.91879123, (float)0.91618794, - (float)0.91354543, (float)0.91086382, (float)0.90814310, (float)0.90538365, (float)0.90258527, - (float)0.89974827, (float)0.89687276, (float)0.89395875, (float)0.89100647, (float)0.88801610, - (float)0.88498759, (float)0.88192123, (float)0.87881714, (float)0.87567532, (float)0.87249595, - (float)0.86927933, (float)0.86602539, (float)0.86273432, (float)0.85940641, (float)0.85604161, - (float)0.85264009, (float)0.84920216, (float)0.84572780, (float)0.84221715, (float)0.83867055, - (float)0.83508795, (float)0.83146954, (float)0.82781565, (float)0.82412612, (float)0.82040137, - (float)0.81664157, (float)0.81284660, (float)0.80901700, (float)0.80515265, (float)0.80125374, - (float)0.79732066, (float)0.79335332, (float)0.78935200, (float)0.78531694, (float)0.78124815, - (float)0.77714586, (float)0.77301049, (float)0.76884180, (float)0.76464021, (float)0.76040596, - (float)0.75613904, (float)0.75183970, (float)0.74750835, (float)0.74314481, (float)0.73874938, - (float)0.73432249, (float)0.72986400, (float)0.72537428, (float)0.72085363, (float)0.71630186, - (float)0.71171951, (float)0.70710677, (float)0.70246363, (float)0.69779032, (float)0.69308734, - (float)0.68835449, (float)0.68359220, (float)0.67880070, (float)0.67398006, (float)0.66913044, - (float)0.66425240, (float)0.65934575, (float)0.65441096, (float)0.64944804, (float)0.64445722, - (float)0.63943905, (float)0.63439327, (float)0.62932026, (float)0.62422055, (float)0.61909389, - (float)0.61394072, (float)0.60876143, (float)0.60355592, (float)0.59832448, (float)0.59306765, - (float)0.58778518, (float)0.58247757, (float)0.57714522, (float)0.57178789, (float)0.56640613, - (float)0.56100023, (float)0.55557019, (float)0.55011630, (float)0.54463905, (float)0.53913826, - (float)0.53361434, (float)0.52806783, (float)0.52249849, (float)0.51690674, (float)0.51129305, - (float)0.50565726, (float)0.50000006, (float)0.49432117, (float)0.48862115, (float)0.48290038, - (float)0.47715873, (float)0.47139663, (float)0.46561456, (float)0.45981231, (float)0.45399037, - (float)0.44814920, (float)0.44228864, (float)0.43640912, (float)0.43051112, (float)0.42459446, - (float)0.41865960, (float)0.41270703, (float)0.40673658, (float)0.40074870, (float)0.39474386, - (float)0.38872188, (float)0.38268328, (float)0.37662849, (float)0.37055734, (float)0.36447033, - (float)0.35836792, (float)0.35224995, (float)0.34611690, (float)0.33996922, (float)0.33380675, - (float)0.32763001, (float)0.32143945, (float)0.31523487, (float)0.30901679, (float)0.30278572, - (float)0.29654145, (float)0.29028472, (float)0.28401530, (float)0.27773371, (float)0.27144048, - (float)0.26513538, (float)0.25881892, (float)0.25249159, (float)0.24615324, (float)0.23980433, - (float)0.23344538, (float)0.22707619, (float)0.22069728, (float)0.21430916, (float)0.20791161, - (float)0.20150517, (float)0.19509031, (float)0.18866688, (float)0.18223536, (float)0.17579627, - (float)0.16934940, (float)0.16289529, (float)0.15643445, (float)0.14996666, (float)0.14349243, - (float)0.13701232, (float)0.13052608, (float)0.12403426, (float)0.11753736, (float)0.11103519, - (float)0.10452849, (float)0.09801710, (float)0.09150149, (float)0.08498220, (float)0.07845904, - (float)0.07193252, (float)0.06540315, (float)0.05887074, (float)0.05233581, (float)0.04579888, - (float)0.03925974, (float)0.03271893, (float)0.02617695, (float)0.01963361, (float)0.01308943, - (float)0.00654493, (float)0.00000000, (float)0.00000000, (float)0.00000000, (float)0.00000000, - (float)0.00000000, (float)0.00000000, (float)0.00000000, (float)0.00000000, (float)0.00000000, - (float)0.00000000, (float)0.00000000, (float)0.00000000, (float)0.00000000, (float)0.00000000, - (float)0.00000000, (float)0.00000000 -}; - - -// Hanning window: for 30ms with 1024 fft with symmetric zeros at 16kHz -static const float kBlocks480w1024[1024] = { - (float)0.00000000, (float)0.00000000, (float)0.00000000, (float)0.00000000, (float)0.00000000, - (float)0.00000000, (float)0.00000000, (float)0.00000000, (float)0.00000000, (float)0.00000000, - (float)0.00000000, (float)0.00000000, (float)0.00000000, (float)0.00000000, (float)0.00000000, - (float)0.00000000, (float)0.00000000, (float)0.00000000, (float)0.00000000, (float)0.00000000, - (float)0.00000000, (float)0.00000000, (float)0.00000000, (float)0.00000000, (float)0.00000000, - (float)0.00000000, (float)0.00000000, (float)0.00000000, (float)0.00000000, (float)0.00000000, - (float)0.00000000, (float)0.00000000, (float)0.00000000, (float)0.00327249, (float)0.00654494, - (float)0.00981732, (float)0.01308960, (float)0.01636173, (float)0.01963369, (float)0.02290544, - (float)0.02617695, (float)0.02944817, (float)0.03271908, (float)0.03598964, (float)0.03925982, - (float)0.04252957, (float)0.04579887, (float)0.04906768, (float)0.05233596, (float)0.05560368, - (float)0.05887080, (float)0.06213730, (float)0.06540313, (float)0.06866825, (float)0.07193266, - (float)0.07519628, (float)0.07845910, (float)0.08172107, (float)0.08498218, (float)0.08824237, - (float)0.09150162, (float)0.09475989, (float)0.09801714, (float)0.10127335, (float)0.10452846, - (float)0.10778246, (float)0.11103531, (float)0.11428697, (float)0.11753740, (float)0.12078657, - (float)0.12403446, (float)0.12728101, (float)0.13052620, (float)0.13376999, (float)0.13701233, - (float)0.14025325, (float)0.14349262, (float)0.14673047, (float)0.14996676, (float)0.15320145, - (float)0.15643448, (float)0.15966582, (float)0.16289547, (float)0.16612339, (float)0.16934951, - (float)0.17257382, (float)0.17579629, (float)0.17901687, (float)0.18223552, (float)0.18545224, - (float)0.18866697, (float)0.19187967, (float)0.19509032, (float)0.19829889, (float)0.20150533, - (float)0.20470962, (float)0.20791170, (float)0.21111156, (float)0.21430916, (float)0.21750447, - (float)0.22069745, (float)0.22388805, (float)0.22707628, (float)0.23026206, (float)0.23344538, - (float)0.23662618, (float)0.23980446, (float)0.24298020, (float)0.24615330, (float)0.24932377, - (float)0.25249159, (float)0.25565669, (float)0.25881904, (float)0.26197866, (float)0.26513544, - (float)0.26828939, (float)0.27144045, (float)0.27458861, (float)0.27773386, (float)0.28087610, - (float)0.28401536, (float)0.28715158, (float)0.29028466, (float)0.29341471, (float)0.29654160, - (float)0.29966527, (float)0.30278578, (float)0.30590302, (float)0.30901700, (float)0.31212768, - (float)0.31523499, (float)0.31833893, (float)0.32143945, (float)0.32453656, (float)0.32763019, - (float)0.33072028, (float)0.33380687, (float)0.33688986, (float)0.33996925, (float)0.34304500, - (float)0.34611708, (float)0.34918544, (float)0.35225007, (float)0.35531089, (float)0.35836795, - (float)0.36142117, (float)0.36447051, (float)0.36751595, (float)0.37055743, (float)0.37359497, - (float)0.37662852, (float)0.37965801, (float)0.38268346, (float)0.38570479, (float)0.38872197, - (float)0.39173502, (float)0.39474389, (float)0.39774847, (float)0.40074885, (float)0.40374491, - (float)0.40673664, (float)0.40972406, (float)0.41270703, (float)0.41568562, (float)0.41865975, - (float)0.42162940, (float)0.42459452, (float)0.42755508, (float)0.43051112, (float)0.43346250, - (float)0.43640924, (float)0.43935132, (float)0.44228873, (float)0.44522133, (float)0.44814920, - (float)0.45107228, (float)0.45399052, (float)0.45690390, (float)0.45981237, (float)0.46271592, - (float)0.46561453, (float)0.46850815, (float)0.47139674, (float)0.47428030, (float)0.47715878, - (float)0.48003215, (float)0.48290035, (float)0.48576337, (float)0.48862126, (float)0.49147385, - (float)0.49432120, (float)0.49716330, (float)0.50000000, (float)0.50283140, (float)0.50565743, - (float)0.50847799, (float)0.51129311, (float)0.51410276, (float)0.51690692, (float)0.51970553, - (float)0.52249855, (float)0.52528602, (float)0.52806789, (float)0.53084403, (float)0.53361452, - (float)0.53637928, (float)0.53913832, (float)0.54189163, (float)0.54463905, (float)0.54738063, - (float)0.55011642, (float)0.55284631, (float)0.55557024, (float)0.55828828, (float)0.56100029, - (float)0.56370628, (float)0.56640625, (float)0.56910014, (float)0.57178795, (float)0.57446963, - (float)0.57714522, (float)0.57981455, (float)0.58247769, (float)0.58513463, (float)0.58778524, - (float)0.59042960, (float)0.59306765, (float)0.59569931, (float)0.59832460, (float)0.60094351, - (float)0.60355598, (float)0.60616195, (float)0.60876143, (float)0.61135441, (float)0.61394083, - (float)0.61652070, (float)0.61909395, (float)0.62166059, (float)0.62422055, (float)0.62677383, - (float)0.62932038, (float)0.63186020, (float)0.63439333, (float)0.63691956, (float)0.63943899, - (float)0.64195162, (float)0.64445734, (float)0.64695615, (float)0.64944810, (float)0.65193301, - (float)0.65441096, (float)0.65688187, (float)0.65934587, (float)0.66180271, (float)0.66425246, - (float)0.66669512, (float)0.66913062, (float)0.67155898, (float)0.67398012, (float)0.67639405, - (float)0.67880076, (float)0.68120021, (float)0.68359232, (float)0.68597710, (float)0.68835455, - (float)0.69072467, (float)0.69308740, (float)0.69544262, (float)0.69779050, (float)0.70013082, - (float)0.70246369, (float)0.70478904, (float)0.70710677, (float)0.70941699, (float)0.71171963, - (float)0.71401459, (float)0.71630198, (float)0.71858168, (float)0.72085363, (float)0.72311789, - (float)0.72537440, (float)0.72762316, (float)0.72986406, (float)0.73209721, (float)0.73432255, - (float)0.73653996, (float)0.73874950, (float)0.74095118, (float)0.74314487, (float)0.74533057, - (float)0.74750835, (float)0.74967808, (float)0.75183982, (float)0.75399351, (float)0.75613910, - (float)0.75827658, (float)0.76040596, (float)0.76252723, (float)0.76464027, (float)0.76674515, - (float)0.76884186, (float)0.77093029, (float)0.77301043, (float)0.77508241, (float)0.77714598, - (float)0.77920127, (float)0.78124821, (float)0.78328675, (float)0.78531694, (float)0.78733873, - (float)0.78935206, (float)0.79135692, (float)0.79335338, (float)0.79534125, (float)0.79732066, - (float)0.79929149, (float)0.80125386, (float)0.80320752, (float)0.80515265, (float)0.80708915, - (float)0.80901700, (float)0.81093621, (float)0.81284672, (float)0.81474853, (float)0.81664157, - (float)0.81852591, (float)0.82040149, (float)0.82226825, (float)0.82412618, (float)0.82597536, - (float)0.82781565, (float)0.82964706, (float)0.83146966, (float)0.83328325, (float)0.83508795, - (float)0.83688378, (float)0.83867061, (float)0.84044838, (float)0.84221727, (float)0.84397703, - (float)0.84572780, (float)0.84746957, (float)0.84920216, (float)0.85092574, (float)0.85264021, - (float)0.85434544, (float)0.85604161, (float)0.85772866, (float)0.85940641, (float)0.86107504, - (float)0.86273444, (float)0.86438453, (float)0.86602545, (float)0.86765707, (float)0.86927933, - (float)0.87089235, (float)0.87249607, (float)0.87409031, (float)0.87567532, (float)0.87725097, - (float)0.87881714, (float)0.88037390, (float)0.88192129, (float)0.88345921, (float)0.88498765, - (float)0.88650668, (float)0.88801610, (float)0.88951612, (float)0.89100653, (float)0.89248741, - (float)0.89395881, (float)0.89542055, (float)0.89687276, (float)0.89831537, (float)0.89974827, - (float)0.90117162, (float)0.90258533, (float)0.90398932, (float)0.90538365, (float)0.90676826, - (float)0.90814316, (float)0.90950841, (float)0.91086388, (float)0.91220951, (float)0.91354549, - (float)0.91487163, (float)0.91618794, (float)0.91749454, (float)0.91879123, (float)0.92007810, - (float)0.92135513, (float)0.92262226, (float)0.92387950, (float)0.92512691, (float)0.92636442, - (float)0.92759192, (float)0.92880958, (float)0.93001723, (float)0.93121493, (float)0.93240267, - (float)0.93358046, (float)0.93474817, (float)0.93590593, (float)0.93705362, (float)0.93819135, - (float)0.93931901, (float)0.94043654, (float)0.94154406, (float)0.94264150, (float)0.94372880, - (float)0.94480604, (float)0.94587320, (float)0.94693011, (float)0.94797695, (float)0.94901365, - (float)0.95004016, (float)0.95105654, (float)0.95206273, (float)0.95305866, (float)0.95404440, - (float)0.95501995, (float)0.95598525, (float)0.95694035, (float)0.95788521, (float)0.95881975, - (float)0.95974404, (float)0.96065807, (float)0.96156180, (float)0.96245527, (float)0.96333838, - (float)0.96421117, (float)0.96507370, (float)0.96592581, (float)0.96676767, (float)0.96759909, - (float)0.96842021, (float)0.96923089, (float)0.97003126, (float)0.97082120, (float)0.97160077, - (float)0.97236991, (float)0.97312868, (float)0.97387701, (float)0.97461486, (float)0.97534233, - (float)0.97605932, (float)0.97676587, (float)0.97746199, (float)0.97814763, (float)0.97882277, - (float)0.97948742, (float)0.98014158, (float)0.98078531, (float)0.98141843, (float)0.98204112, - (float)0.98265332, (float)0.98325491, (float)0.98384601, (float)0.98442656, (float)0.98499662, - (float)0.98555607, (float)0.98610497, (float)0.98664331, (float)0.98717111, (float)0.98768836, - (float)0.98819500, (float)0.98869103, (float)0.98917651, (float)0.98965138, (float)0.99011570, - (float)0.99056935, (float)0.99101239, (float)0.99144489, (float)0.99186671, (float)0.99227792, - (float)0.99267852, (float)0.99306846, (float)0.99344778, (float)0.99381649, (float)0.99417448, - (float)0.99452192, (float)0.99485862, (float)0.99518472, (float)0.99550015, (float)0.99580491, - (float)0.99609905, (float)0.99638247, (float)0.99665523, (float)0.99691731, (float)0.99716878, - (float)0.99740952, (float)0.99763954, (float)0.99785894, (float)0.99806762, (float)0.99826562, - (float)0.99845290, (float)0.99862951, (float)0.99879545, (float)0.99895066, (float)0.99909520, - (float)0.99922901, (float)0.99935216, (float)0.99946457, (float)0.99956632, (float)0.99965733, - (float)0.99973762, (float)0.99980724, (float)0.99986613, (float)0.99991435, (float)0.99995178, - (float)0.99997860, (float)0.99999464, (float)1.00000000, (float)0.99999464, (float)0.99997860, - (float)0.99995178, (float)0.99991435, (float)0.99986613, (float)0.99980724, (float)0.99973762, - (float)0.99965733, (float)0.99956632, (float)0.99946457, (float)0.99935216, (float)0.99922901, - (float)0.99909520, (float)0.99895066, (float)0.99879545, (float)0.99862951, (float)0.99845290, - (float)0.99826562, (float)0.99806762, (float)0.99785894, (float)0.99763954, (float)0.99740946, - (float)0.99716872, (float)0.99691731, (float)0.99665523, (float)0.99638247, (float)0.99609905, - (float)0.99580491, (float)0.99550015, (float)0.99518472, (float)0.99485862, (float)0.99452192, - (float)0.99417448, (float)0.99381644, (float)0.99344778, (float)0.99306846, (float)0.99267852, - (float)0.99227792, (float)0.99186671, (float)0.99144489, (float)0.99101239, (float)0.99056935, - (float)0.99011564, (float)0.98965138, (float)0.98917651, (float)0.98869103, (float)0.98819494, - (float)0.98768836, (float)0.98717111, (float)0.98664331, (float)0.98610497, (float)0.98555607, - (float)0.98499656, (float)0.98442656, (float)0.98384601, (float)0.98325491, (float)0.98265326, - (float)0.98204112, (float)0.98141843, (float)0.98078525, (float)0.98014158, (float)0.97948742, - (float)0.97882277, (float)0.97814757, (float)0.97746193, (float)0.97676587, (float)0.97605932, - (float)0.97534227, (float)0.97461486, (float)0.97387695, (float)0.97312862, (float)0.97236991, - (float)0.97160077, (float)0.97082120, (float)0.97003126, (float)0.96923089, (float)0.96842015, - (float)0.96759909, (float)0.96676761, (float)0.96592581, (float)0.96507365, (float)0.96421117, - (float)0.96333838, (float)0.96245521, (float)0.96156180, (float)0.96065807, (float)0.95974404, - (float)0.95881969, (float)0.95788515, (float)0.95694029, (float)0.95598525, (float)0.95501995, - (float)0.95404440, (float)0.95305860, (float)0.95206267, (float)0.95105648, (float)0.95004016, - (float)0.94901365, (float)0.94797695, (float)0.94693011, (float)0.94587314, (float)0.94480604, - (float)0.94372880, (float)0.94264150, (float)0.94154406, (float)0.94043654, (float)0.93931895, - (float)0.93819129, (float)0.93705362, (float)0.93590593, (float)0.93474817, (float)0.93358046, - (float)0.93240267, (float)0.93121493, (float)0.93001723, (float)0.92880952, (float)0.92759192, - (float)0.92636436, (float)0.92512691, (float)0.92387950, (float)0.92262226, (float)0.92135507, - (float)0.92007804, (float)0.91879123, (float)0.91749448, (float)0.91618794, (float)0.91487157, - (float)0.91354543, (float)0.91220951, (float)0.91086382, (float)0.90950835, (float)0.90814310, - (float)0.90676820, (float)0.90538365, (float)0.90398932, (float)0.90258527, (float)0.90117157, - (float)0.89974827, (float)0.89831525, (float)0.89687276, (float)0.89542055, (float)0.89395875, - (float)0.89248741, (float)0.89100647, (float)0.88951600, (float)0.88801610, (float)0.88650662, - (float)0.88498759, (float)0.88345915, (float)0.88192123, (float)0.88037384, (float)0.87881714, - (float)0.87725091, (float)0.87567532, (float)0.87409031, (float)0.87249595, (float)0.87089223, - (float)0.86927933, (float)0.86765701, (float)0.86602539, (float)0.86438447, (float)0.86273432, - (float)0.86107504, (float)0.85940641, (float)0.85772860, (float)0.85604161, (float)0.85434544, - (float)0.85264009, (float)0.85092574, (float)0.84920216, (float)0.84746951, (float)0.84572780, - (float)0.84397697, (float)0.84221715, (float)0.84044844, (float)0.83867055, (float)0.83688372, - (float)0.83508795, (float)0.83328319, (float)0.83146954, (float)0.82964706, (float)0.82781565, - (float)0.82597530, (float)0.82412612, (float)0.82226813, (float)0.82040137, (float)0.81852591, - (float)0.81664157, (float)0.81474847, (float)0.81284660, (float)0.81093609, (float)0.80901700, - (float)0.80708915, (float)0.80515265, (float)0.80320752, (float)0.80125374, (float)0.79929143, - (float)0.79732066, (float)0.79534125, (float)0.79335332, (float)0.79135686, (float)0.78935200, - (float)0.78733861, (float)0.78531694, (float)0.78328675, (float)0.78124815, (float)0.77920121, - (float)0.77714586, (float)0.77508223, (float)0.77301049, (float)0.77093029, (float)0.76884180, - (float)0.76674509, (float)0.76464021, (float)0.76252711, (float)0.76040596, (float)0.75827658, - (float)0.75613904, (float)0.75399339, (float)0.75183970, (float)0.74967796, (float)0.74750835, - (float)0.74533057, (float)0.74314481, (float)0.74095106, (float)0.73874938, (float)0.73653996, - (float)0.73432249, (float)0.73209721, (float)0.72986400, (float)0.72762305, (float)0.72537428, - (float)0.72311789, (float)0.72085363, (float)0.71858162, (float)0.71630186, (float)0.71401453, - (float)0.71171951, (float)0.70941705, (float)0.70710677, (float)0.70478898, (float)0.70246363, - (float)0.70013070, (float)0.69779032, (float)0.69544268, (float)0.69308734, (float)0.69072461, - (float)0.68835449, (float)0.68597704, (float)0.68359220, (float)0.68120021, (float)0.67880070, - (float)0.67639399, (float)0.67398006, (float)0.67155886, (float)0.66913044, (float)0.66669512, - (float)0.66425240, (float)0.66180259, (float)0.65934575, (float)0.65688181, (float)0.65441096, - (float)0.65193301, (float)0.64944804, (float)0.64695609, (float)0.64445722, (float)0.64195150, - (float)0.63943905, (float)0.63691956, (float)0.63439327, (float)0.63186014, (float)0.62932026, - (float)0.62677372, (float)0.62422055, (float)0.62166059, (float)0.61909389, (float)0.61652064, - (float)0.61394072, (float)0.61135429, (float)0.60876143, (float)0.60616189, (float)0.60355592, - (float)0.60094339, (float)0.59832448, (float)0.59569913, (float)0.59306765, (float)0.59042960, - (float)0.58778518, (float)0.58513451, (float)0.58247757, (float)0.57981461, (float)0.57714522, - (float)0.57446963, (float)0.57178789, (float)0.56910002, (float)0.56640613, (float)0.56370628, - (float)0.56100023, (float)0.55828822, (float)0.55557019, (float)0.55284619, (float)0.55011630, - (float)0.54738069, (float)0.54463905, (float)0.54189152, (float)0.53913826, (float)0.53637916, - (float)0.53361434, (float)0.53084403, (float)0.52806783, (float)0.52528596, (float)0.52249849, - (float)0.51970541, (float)0.51690674, (float)0.51410276, (float)0.51129305, (float)0.50847787, - (float)0.50565726, (float)0.50283122, (float)0.50000006, (float)0.49716327, (float)0.49432117, - (float)0.49147379, (float)0.48862115, (float)0.48576325, (float)0.48290038, (float)0.48003212, - (float)0.47715873, (float)0.47428021, (float)0.47139663, (float)0.46850798, (float)0.46561456, - (float)0.46271589, (float)0.45981231, (float)0.45690379, (float)0.45399037, (float)0.45107210, - (float)0.44814920, (float)0.44522130, (float)0.44228864, (float)0.43935123, (float)0.43640912, - (float)0.43346232, (float)0.43051112, (float)0.42755505, (float)0.42459446, (float)0.42162928, - (float)0.41865960, (float)0.41568545, (float)0.41270703, (float)0.40972400, (float)0.40673658, - (float)0.40374479, (float)0.40074870, (float)0.39774850, (float)0.39474386, (float)0.39173496, - (float)0.38872188, (float)0.38570464, (float)0.38268328, (float)0.37965804, (float)0.37662849, - (float)0.37359491, (float)0.37055734, (float)0.36751580, (float)0.36447033, (float)0.36142117, - (float)0.35836792, (float)0.35531086, (float)0.35224995, (float)0.34918529, (float)0.34611690, - (float)0.34304500, (float)0.33996922, (float)0.33688980, (float)0.33380675, (float)0.33072016, - (float)0.32763001, (float)0.32453656, (float)0.32143945, (float)0.31833887, (float)0.31523487, - (float)0.31212750, (float)0.30901679, (float)0.30590302, (float)0.30278572, (float)0.29966521, - (float)0.29654145, (float)0.29341453, (float)0.29028472, (float)0.28715155, (float)0.28401530, - (float)0.28087601, (float)0.27773371, (float)0.27458847, (float)0.27144048, (float)0.26828936, - (float)0.26513538, (float)0.26197854, (float)0.25881892, (float)0.25565651, (float)0.25249159, - (float)0.24932374, (float)0.24615324, (float)0.24298008, (float)0.23980433, (float)0.23662600, - (float)0.23344538, (float)0.23026201, (float)0.22707619, (float)0.22388794, (float)0.22069728, - (float)0.21750426, (float)0.21430916, (float)0.21111152, (float)0.20791161, (float)0.20470949, - (float)0.20150517, (float)0.19829892, (float)0.19509031, (float)0.19187963, (float)0.18866688, - (float)0.18545210, (float)0.18223536, (float)0.17901689, (float)0.17579627, (float)0.17257376, - (float)0.16934940, (float)0.16612324, (float)0.16289529, (float)0.15966584, (float)0.15643445, - (float)0.15320137, (float)0.14996666, (float)0.14673033, (float)0.14349243, (float)0.14025325, - (float)0.13701232, (float)0.13376991, (float)0.13052608, (float)0.12728085, (float)0.12403426, - (float)0.12078657, (float)0.11753736, (float)0.11428688, (float)0.11103519, (float)0.10778230, - (float)0.10452849, (float)0.10127334, (float)0.09801710, (float)0.09475980, (float)0.09150149, - (float)0.08824220, (float)0.08498220, (float)0.08172106, (float)0.07845904, (float)0.07519618, - (float)0.07193252, (float)0.06866808, (float)0.06540315, (float)0.06213728, (float)0.05887074, - (float)0.05560357, (float)0.05233581, (float)0.04906749, (float)0.04579888, (float)0.04252954, - (float)0.03925974, (float)0.03598953, (float)0.03271893, (float)0.02944798, (float)0.02617695, - (float)0.02290541, (float)0.01963361, (float)0.01636161, (float)0.01308943, (float)0.00981712, - (float)0.00654493, (float)0.00327244, (float)0.00000000, (float)0.00000000, (float)0.00000000, - (float)0.00000000, (float)0.00000000, (float)0.00000000, (float)0.00000000, (float)0.00000000, - (float)0.00000000, (float)0.00000000, (float)0.00000000, (float)0.00000000, (float)0.00000000, - (float)0.00000000, (float)0.00000000, (float)0.00000000, (float)0.00000000, (float)0.00000000, - (float)0.00000000, (float)0.00000000, (float)0.00000000, (float)0.00000000, (float)0.00000000, - (float)0.00000000, (float)0.00000000, (float)0.00000000, (float)0.00000000, (float)0.00000000, - (float)0.00000000, (float)0.00000000, (float)0.00000000, (float)0.00000000 -}; - -#endif // WEBRTC_MODULES_AUDIO_PROCESSING_NS_MAIN_SOURCE_WINDOWS_PRIVATE_H_ diff --git a/WebRtc.NET/include/webrtc/modules/audio_processing/residual_echo_detector.h b/WebRtc.NET/include/webrtc/modules/audio_processing/residual_echo_detector.h deleted file mode 100644 index ba0d0d3c..00000000 --- a/WebRtc.NET/include/webrtc/modules/audio_processing/residual_echo_detector.h +++ /dev/null @@ -1,89 +0,0 @@ -/* - * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MODULES_AUDIO_PROCESSING_RESIDUAL_ECHO_DETECTOR_H_ -#define WEBRTC_MODULES_AUDIO_PROCESSING_RESIDUAL_ECHO_DETECTOR_H_ - -#include - -#include "webrtc/base/array_view.h" -#include "webrtc/modules/audio_processing/echo_detector/circular_buffer.h" -#include "webrtc/modules/audio_processing/echo_detector/mean_variance_estimator.h" -#include "webrtc/modules/audio_processing/echo_detector/moving_max.h" -#include "webrtc/modules/audio_processing/echo_detector/normalized_covariance_estimator.h" - -namespace webrtc { - -class AudioBuffer; -class EchoDetector; - -class ResidualEchoDetector { - public: - ResidualEchoDetector(); - ~ResidualEchoDetector(); - - // This function should be called while holding the render lock. - void AnalyzeRenderAudio(rtc::ArrayView render_audio); - - // This function should be called while holding the capture lock. - void AnalyzeCaptureAudio(rtc::ArrayView capture_audio); - - // This function should be called while holding the capture lock. - void Initialize(); - - // This function is for testing purposes only. - void SetReliabilityForTest(float value) { reliability_ = value; } - - static void PackRenderAudioBuffer(AudioBuffer* audio, - std::vector* packed_buffer); - - // This function should be called while holding the capture lock. - float echo_likelihood() const { return echo_likelihood_; } - - float echo_likelihood_recent_max() const { - return recent_likelihood_max_.max(); - } - - private: - // Keep track if the |Process| function has been previously called. - bool first_process_call_ = true; - // Buffer for storing the power of incoming farend buffers. This is needed for - // cases where calls to BufferFarend and Process are jittery. - CircularBuffer render_buffer_; - // Count how long ago it was that the size of |render_buffer_| was zero. This - // value is also reset to zero when clock drift is detected and a value from - // the renderbuffer is discarded, even though the buffer is not actually zero - // at that point. This is done to avoid repeatedly removing elements in this - // situation. - size_t frames_since_zero_buffer_size_ = 0; - - // Circular buffers containing delayed versions of the power, mean and - // standard deviation, for calculating the delayed covariance values. - std::vector render_power_; - std::vector render_power_mean_; - std::vector render_power_std_dev_; - // Covariance estimates for different delay values. - std::vector covariances_; - // Index where next element should be inserted in all of the above circular - // buffers. - size_t next_insertion_index_ = 0; - - MeanVarianceEstimator render_statistics_; - MeanVarianceEstimator capture_statistics_; - // Current echo likelihood. - float echo_likelihood_ = 0.f; - // Reliability of the current likelihood. - float reliability_ = 0.f; - MovingMax recent_likelihood_max_; -}; - -} // namespace webrtc - -#endif // WEBRTC_MODULES_AUDIO_PROCESSING_RESIDUAL_ECHO_DETECTOR_H_ diff --git a/WebRtc.NET/include/webrtc/modules/audio_processing/test/audio_buffer_tools.h b/WebRtc.NET/include/webrtc/modules/audio_processing/test/audio_buffer_tools.h deleted file mode 100644 index 1fac758c..00000000 --- a/WebRtc.NET/include/webrtc/modules/audio_processing/test/audio_buffer_tools.h +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright (c) 2015 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MODULES_AUDIO_PROCESSING_TEST_AUDIO_BUFFER_TOOLS_H_ -#define WEBRTC_MODULES_AUDIO_PROCESSING_TEST_AUDIO_BUFFER_TOOLS_H_ - -#include -#include "webrtc/base/array_view.h" -#include "webrtc/modules/audio_processing/audio_buffer.h" -#include "webrtc/modules/audio_processing/include/audio_processing.h" - -namespace webrtc { -namespace test { - -// Copies a vector into an audiobuffer. -void CopyVectorToAudioBuffer(const StreamConfig& stream_config, - rtc::ArrayView source, - AudioBuffer* destination); - -// Extracts a vector from an audiobuffer. -void ExtractVectorFromAudioBuffer(const StreamConfig& stream_config, - AudioBuffer* source, - std::vector* destination); - -} // namespace test -} // namespace webrtc - -#endif // WEBRTC_MODULES_AUDIO_PROCESSING_TEST_AUDIO_BUFFER_TOOLS_H_ diff --git a/WebRtc.NET/include/webrtc/modules/audio_processing/test/audio_processing_simulator.h b/WebRtc.NET/include/webrtc/modules/audio_processing/test/audio_processing_simulator.h deleted file mode 100644 index 06735c47..00000000 --- a/WebRtc.NET/include/webrtc/modules/audio_processing/test/audio_processing_simulator.h +++ /dev/null @@ -1,184 +0,0 @@ -/* - * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MODULES_AUDIO_PROCESSING_TEST_AUDIO_PROCESSING_SIMULATOR_H_ -#define WEBRTC_MODULES_AUDIO_PROCESSING_TEST_AUDIO_PROCESSING_SIMULATOR_H_ - -#include -#include -#include -#include -#include - -#include "webrtc/base/timeutils.h" -#include "webrtc/base/constructormagic.h" -#include "webrtc/base/optional.h" -#include "webrtc/common_audio/channel_buffer.h" -#include "webrtc/modules/audio_processing/include/audio_processing.h" -#include "webrtc/modules/audio_processing/test/test_utils.h" - -namespace webrtc { -namespace test { - -// Holds all the parameters available for controlling the simulation. -struct SimulationSettings { - SimulationSettings(); - SimulationSettings(const SimulationSettings&); - ~SimulationSettings(); - rtc::Optional stream_delay; - rtc::Optional stream_drift_samples; - rtc::Optional output_sample_rate_hz; - rtc::Optional output_num_channels; - rtc::Optional reverse_output_sample_rate_hz; - rtc::Optional reverse_output_num_channels; - rtc::Optional microphone_positions; - int target_angle_degrees = 90; - rtc::Optional output_filename; - rtc::Optional reverse_output_filename; - rtc::Optional input_filename; - rtc::Optional reverse_input_filename; - rtc::Optional artificial_nearend_filename; - rtc::Optional use_aec; - rtc::Optional use_aecm; - rtc::Optional use_ed; // Residual Echo Detector. - rtc::Optional ed_graph_output_filename; - rtc::Optional use_agc; - rtc::Optional use_hpf; - rtc::Optional use_ns; - rtc::Optional use_ts; - rtc::Optional use_bf; - rtc::Optional use_ie; - rtc::Optional use_vad; - rtc::Optional use_le; - rtc::Optional use_all; - rtc::Optional aec_suppression_level; - rtc::Optional use_delay_agnostic; - rtc::Optional use_extended_filter; - rtc::Optional use_drift_compensation; - rtc::Optional use_aec3; - rtc::Optional use_lc; - rtc::Optional aecm_routing_mode; - rtc::Optional use_aecm_comfort_noise; - rtc::Optional agc_mode; - rtc::Optional agc_target_level; - rtc::Optional use_agc_limiter; - rtc::Optional agc_compression_gain; - rtc::Optional vad_likelihood; - rtc::Optional ns_level; - rtc::Optional use_refined_adaptive_filter; - bool report_performance = false; - bool report_bitexactness = false; - bool use_verbose_logging = false; - bool discard_all_settings_in_aecdump = true; - rtc::Optional aec_dump_input_filename; - rtc::Optional aec_dump_output_filename; - bool fixed_interface = false; - bool store_intermediate_output = false; - rtc::Optional custom_call_order_filename; -}; - -// Holds a few statistics about a series of TickIntervals. -struct TickIntervalStats { - TickIntervalStats() : min(std::numeric_limits::max()) {} - int64_t sum; - int64_t max; - int64_t min; -}; - -// Copies samples present in a ChannelBuffer into an AudioFrame. -void CopyToAudioFrame(const ChannelBuffer& src, AudioFrame* dest); - -// Provides common functionality for performing audioprocessing simulations. -class AudioProcessingSimulator { - public: - static const int kChunksPerSecond = 1000 / AudioProcessing::kChunkSizeMs; - - explicit AudioProcessingSimulator(const SimulationSettings& settings); - virtual ~AudioProcessingSimulator(); - - // Processes the data in the input. - virtual void Process() = 0; - - // Returns the execution time of all AudioProcessing calls. - const TickIntervalStats& proc_time() const { return proc_time_; } - - // Reports whether the processed recording was bitexact. - bool OutputWasBitexact() { return bitexact_output_; } - - size_t get_num_process_stream_calls() { return num_process_stream_calls_; } - size_t get_num_reverse_process_stream_calls() { - return num_reverse_process_stream_calls_; - } - - protected: - // RAII class for execution time measurement. Updates the provided - // TickIntervalStats based on the time between ScopedTimer creation and - // leaving the enclosing scope. - class ScopedTimer { - public: - explicit ScopedTimer(TickIntervalStats* proc_time) - : proc_time_(proc_time), start_time_(rtc::TimeNanos()) {} - - ~ScopedTimer(); - - private: - TickIntervalStats* const proc_time_; - int64_t start_time_; - }; - - TickIntervalStats* mutable_proc_time() { return &proc_time_; } - void ProcessStream(bool fixed_interface); - void ProcessReverseStream(bool fixed_interface); - void CreateAudioProcessor(); - void DestroyAudioProcessor(); - void SetupBuffersConfigsOutputs(int input_sample_rate_hz, - int output_sample_rate_hz, - int reverse_input_sample_rate_hz, - int reverse_output_sample_rate_hz, - int input_num_channels, - int output_num_channels, - int reverse_input_num_channels, - int reverse_output_num_channels); - - const SimulationSettings settings_; - std::unique_ptr ap_; - - std::unique_ptr> in_buf_; - std::unique_ptr> out_buf_; - std::unique_ptr> reverse_in_buf_; - std::unique_ptr> reverse_out_buf_; - StreamConfig in_config_; - StreamConfig out_config_; - StreamConfig reverse_in_config_; - StreamConfig reverse_out_config_; - std::unique_ptr buffer_reader_; - std::unique_ptr reverse_buffer_reader_; - AudioFrame rev_frame_; - AudioFrame fwd_frame_; - bool bitexact_output_ = true; - - private: - void SetupOutput(); - - size_t num_process_stream_calls_ = 0; - size_t num_reverse_process_stream_calls_ = 0; - size_t output_reset_counter_ = 0; - std::unique_ptr buffer_writer_; - std::unique_ptr reverse_buffer_writer_; - TickIntervalStats proc_time_; - std::ofstream residual_echo_likelihood_graph_writer_; - - RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(AudioProcessingSimulator); -}; - -} // namespace test -} // namespace webrtc - -#endif // WEBRTC_MODULES_AUDIO_PROCESSING_TEST_AUDIO_PROCESSING_SIMULATOR_H_ diff --git a/WebRtc.NET/include/webrtc/modules/audio_processing/test/performance_timer.h b/WebRtc.NET/include/webrtc/modules/audio_processing/test/performance_timer.h deleted file mode 100644 index 5921fae0..00000000 --- a/WebRtc.NET/include/webrtc/modules/audio_processing/test/performance_timer.h +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MODULES_AUDIO_PROCESSING_TEST_PERFORMANCE_TIMER_H_ -#define WEBRTC_MODULES_AUDIO_PROCESSING_TEST_PERFORMANCE_TIMER_H_ - -#include - -#include "webrtc/base/optional.h" -#include "webrtc/system_wrappers/include/clock.h" - -namespace webrtc { -namespace test { - -class PerformanceTimer { - public: - explicit PerformanceTimer(int num_frames_to_process); - ~PerformanceTimer(); - - void StartTimer(); - void StopTimer(); - - double GetDurationAverage() const; - double GetDurationStandardDeviation() const; - - private: - webrtc::Clock* clock_; - rtc::Optional start_timestamp_us_; - std::vector timestamps_us_; -}; - -} // namespace test -} // namespace webrtc - -#endif // WEBRTC_MODULES_AUDIO_PROCESSING_TEST_PERFORMANCE_TIMER_H_ diff --git a/WebRtc.NET/include/webrtc/modules/audio_processing/test/protobuf_utils.h b/WebRtc.NET/include/webrtc/modules/audio_processing/test/protobuf_utils.h deleted file mode 100644 index e132c940..00000000 --- a/WebRtc.NET/include/webrtc/modules/audio_processing/test/protobuf_utils.h +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright (c) 2015 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MODULES_AUDIO_PROCESSING_TEST_PROTOBUF_UTILS_H_ -#define WEBRTC_MODULES_AUDIO_PROCESSING_TEST_PROTOBUF_UTILS_H_ - -#include - -#include "webrtc/base/ignore_wundef.h" - -RTC_PUSH_IGNORING_WUNDEF() -#include "webrtc/modules/audio_processing/debug.pb.h" -RTC_POP_IGNORING_WUNDEF() - -namespace webrtc { - -// Allocates new memory in the unique_ptr to fit the raw message and returns the -// number of bytes read. -size_t ReadMessageBytesFromFile(FILE* file, std::unique_ptr* bytes); - -// Returns true on success, false on error or end-of-file. -bool ReadMessageFromFile(FILE* file, ::google::protobuf::MessageLite* msg); - -} // namespace webrtc - -#endif // WEBRTC_MODULES_AUDIO_PROCESSING_TEST_PROTOBUF_UTILS_H_ diff --git a/WebRtc.NET/include/webrtc/modules/audio_processing/test/test_utils.h b/WebRtc.NET/include/webrtc/modules/audio_processing/test/test_utils.h deleted file mode 100644 index ca66520c..00000000 --- a/WebRtc.NET/include/webrtc/modules/audio_processing/test/test_utils.h +++ /dev/null @@ -1,158 +0,0 @@ -/* - * Copyright (c) 2014 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MODULES_AUDIO_PROCESSING_TEST_TEST_UTILS_H_ -#define WEBRTC_MODULES_AUDIO_PROCESSING_TEST_TEST_UTILS_H_ - -#include -#include -#include -#include -#include -#include - -#include "webrtc/base/constructormagic.h" -#include "webrtc/common_audio/channel_buffer.h" -#include "webrtc/common_audio/wav_file.h" -#include "webrtc/modules/audio_processing/include/audio_processing.h" -#include "webrtc/modules/include/module_common_types.h" - -namespace webrtc { - -static const AudioProcessing::Error kNoErr = AudioProcessing::kNoError; -#define EXPECT_NOERR(expr) EXPECT_EQ(kNoErr, (expr)) - -class RawFile final { - public: - explicit RawFile(const std::string& filename); - ~RawFile(); - - void WriteSamples(const int16_t* samples, size_t num_samples); - void WriteSamples(const float* samples, size_t num_samples); - - private: - FILE* file_handle_; - - RTC_DISALLOW_COPY_AND_ASSIGN(RawFile); -}; - -// Reads ChannelBuffers from a provided WavReader. -class ChannelBufferWavReader final { - public: - explicit ChannelBufferWavReader(std::unique_ptr file); - ~ChannelBufferWavReader(); - - // Reads data from the file according to the |buffer| format. Returns false if - // a full buffer can't be read from the file. - bool Read(ChannelBuffer* buffer); - - private: - std::unique_ptr file_; - std::vector interleaved_; - - RTC_DISALLOW_COPY_AND_ASSIGN(ChannelBufferWavReader); -}; - -// Writes ChannelBuffers to a provided WavWriter. -class ChannelBufferWavWriter final { - public: - explicit ChannelBufferWavWriter(std::unique_ptr file); - ~ChannelBufferWavWriter(); - - void Write(const ChannelBuffer& buffer); - - private: - std::unique_ptr file_; - std::vector interleaved_; - - RTC_DISALLOW_COPY_AND_ASSIGN(ChannelBufferWavWriter); -}; - -void WriteIntData(const int16_t* data, - size_t length, - WavWriter* wav_file, - RawFile* raw_file); - -void WriteFloatData(const float* const* data, - size_t samples_per_channel, - size_t num_channels, - WavWriter* wav_file, - RawFile* raw_file); - -// Exits on failure; do not use in unit tests. -FILE* OpenFile(const std::string& filename, const char* mode); - -size_t SamplesFromRate(int rate); - -void SetFrameSampleRate(AudioFrame* frame, - int sample_rate_hz); - -template -void SetContainerFormat(int sample_rate_hz, - size_t num_channels, - AudioFrame* frame, - std::unique_ptr >* cb) { - SetFrameSampleRate(frame, sample_rate_hz); - frame->num_channels_ = num_channels; - cb->reset(new ChannelBuffer(frame->samples_per_channel_, num_channels)); -} - -AudioProcessing::ChannelLayout LayoutFromChannels(size_t num_channels); - -template -float ComputeSNR(const T* ref, const T* test, size_t length, float* variance) { - float mse = 0; - float mean = 0; - *variance = 0; - for (size_t i = 0; i < length; ++i) { - T error = ref[i] - test[i]; - mse += error * error; - *variance += ref[i] * ref[i]; - mean += ref[i]; - } - mse /= length; - *variance /= length; - mean /= length; - *variance -= mean * mean; - - float snr = 100; // We assign 100 dB to the zero-error case. - if (mse > 0) - snr = 10 * log10(*variance / mse); - return snr; -} - -// Returns a vector parsed from whitespace delimited values in to_parse, -// or an empty vector if the string could not be parsed. -template -std::vector ParseList(const std::string& to_parse) { - std::vector values; - - std::istringstream str(to_parse); - std::copy( - std::istream_iterator(str), - std::istream_iterator(), - std::back_inserter(values)); - - return values; -} - -// Parses the array geometry from the command line. -// -// If a vector with size != num_mics is returned, an error has occurred and an -// appropriate error message has been printed to stdout. -std::vector ParseArrayGeometry(const std::string& mic_positions, - size_t num_mics); - -// Same as above, but without the num_mics check for when it isn't available. -std::vector ParseArrayGeometry(const std::string& mic_positions); - -} // namespace webrtc - -#endif // WEBRTC_MODULES_AUDIO_PROCESSING_TEST_TEST_UTILS_H_ diff --git a/WebRtc.NET/include/webrtc/modules/audio_processing/test/wav_based_simulator.h b/WebRtc.NET/include/webrtc/modules/audio_processing/test/wav_based_simulator.h deleted file mode 100644 index c1fcf616..00000000 --- a/WebRtc.NET/include/webrtc/modules/audio_processing/test/wav_based_simulator.h +++ /dev/null @@ -1,56 +0,0 @@ -/* - * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MODULES_AUDIO_PROCESSING_TEST_WAV_BASED_SIMULATOR_H_ -#define WEBRTC_MODULES_AUDIO_PROCESSING_TEST_WAV_BASED_SIMULATOR_H_ - -#include - -#include "webrtc/modules/audio_processing/test/audio_processing_simulator.h" - -#include "webrtc/base/constructormagic.h" - -namespace webrtc { -namespace test { - -// Used to perform an audio processing simulation from wav files. -class WavBasedSimulator final : public AudioProcessingSimulator { - public: - explicit WavBasedSimulator(const SimulationSettings& settings); - ~WavBasedSimulator() override; - - // Processes the WAV input. - void Process() override; - - private: - enum SimulationEventType { - kProcessStream, - kProcessReverseStream, - }; - - void Initialize(); - bool HandleProcessStreamCall(); - bool HandleProcessReverseStreamCall(); - void PrepareProcessStreamCall(); - void PrepareReverseProcessStreamCall(); - static std::vector GetDefaultEventChain(); - static std::vector GetCustomEventChain( - const std::string& filename); - - std::vector call_chain_; - int last_specified_microphone_level_ = 100; - - RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(WavBasedSimulator); -}; - -} // namespace test -} // namespace webrtc - -#endif // WEBRTC_MODULES_AUDIO_PROCESSING_TEST_WAV_BASED_SIMULATOR_H_ diff --git a/WebRtc.NET/include/webrtc/modules/audio_processing/transient/common.h b/WebRtc.NET/include/webrtc/modules/audio_processing/transient/common.h deleted file mode 100644 index 92194e97..00000000 --- a/WebRtc.NET/include/webrtc/modules/audio_processing/transient/common.h +++ /dev/null @@ -1,27 +0,0 @@ -/* - * Copyright (c) 2014 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MODULES_AUDIO_PROCESSING_TRANSIENT_COMMON_H_ -#define WEBRTC_MODULES_AUDIO_PROCESSING_TRANSIENT_COMMON_H_ -namespace webrtc { -namespace ts { - -static const float kPi = 3.14159265358979323846f; -static const int kChunkSizeMs = 10; -enum { - kSampleRate8kHz = 8000, - kSampleRate16kHz = 16000, - kSampleRate32kHz = 32000, - kSampleRate48kHz = 48000 -}; - -} // namespace ts -} // namespace webrtc -#endif // WEBRTC_MODULES_AUDIO_PROCESSING_TRANSIENT_COMMON_H_ diff --git a/WebRtc.NET/include/webrtc/modules/audio_processing/transient/daubechies_8_wavelet_coeffs.h b/WebRtc.NET/include/webrtc/modules/audio_processing/transient/daubechies_8_wavelet_coeffs.h deleted file mode 100644 index b1236ac7..00000000 --- a/WebRtc.NET/include/webrtc/modules/audio_processing/transient/daubechies_8_wavelet_coeffs.h +++ /dev/null @@ -1,63 +0,0 @@ -/* - * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -// This header file defines the coefficients of the FIR based approximation of -// the Meyer Wavelet -#ifndef WEBRTC_MODULES_AUDIO_PROCESSING_TRANSIENT_DAUBECHIES_8_WAVELET_COEFFS_H_ -#define WEBRTC_MODULES_AUDIO_PROCESSING_TRANSIENT_DAUBECHIES_8_WAVELET_COEFFS_H_ - -// Decomposition coefficients Daubechies 8. - -namespace webrtc { - -const int kDaubechies8CoefficientsLength = 16; - -const float kDaubechies8HighPassCoefficients[kDaubechies8CoefficientsLength] - = { - -5.44158422430816093862e-02f, - 3.12871590914465924627e-01f, - -6.75630736298012846142e-01f, - 5.85354683654869090148e-01f, - 1.58291052560238926228e-02f, - -2.84015542962428091389e-01f, - -4.72484573997972536787e-04f, - 1.28747426620186011803e-01f, - 1.73693010020221083600e-02f, - -4.40882539310647192377e-02f, - -1.39810279170155156436e-02f, - 8.74609404701565465445e-03f, - 4.87035299301066034600e-03f, - -3.91740372995977108837e-04f, - -6.75449405998556772109e-04f, - -1.17476784002281916305e-04f -}; - -const float kDaubechies8LowPassCoefficients[kDaubechies8CoefficientsLength] = { - -1.17476784002281916305e-04f, - 6.75449405998556772109e-04f, - -3.91740372995977108837e-04f, - -4.87035299301066034600e-03f, - 8.74609404701565465445e-03f, - 1.39810279170155156436e-02f, - -4.40882539310647192377e-02f, - -1.73693010020221083600e-02f, - 1.28747426620186011803e-01f, - 4.72484573997972536787e-04f, - -2.84015542962428091389e-01f, - -1.58291052560238926228e-02f, - 5.85354683654869090148e-01f, - 6.75630736298012846142e-01f, - 3.12871590914465924627e-01f, - 5.44158422430816093862e-02f -}; - -} // namespace webrtc - -#endif // WEBRTC_MODULES_AUDIO_PROCESSING_TRANSIENT_DAUBECHIES_8_WAVELET_COEFFS_H_ diff --git a/WebRtc.NET/include/webrtc/modules/audio_processing/transient/file_utils.h b/WebRtc.NET/include/webrtc/modules/audio_processing/transient/file_utils.h deleted file mode 100644 index cc769532..00000000 --- a/WebRtc.NET/include/webrtc/modules/audio_processing/transient/file_utils.h +++ /dev/null @@ -1,118 +0,0 @@ -/* - * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MODULES_AUDIO_PROCESSING_TRANSIENT_FILE_UTILS_H_ -#define WEBRTC_MODULES_AUDIO_PROCESSING_TRANSIENT_FILE_UTILS_H_ - -#include - -#include "webrtc/system_wrappers/include/file_wrapper.h" -#include "webrtc/typedefs.h" - -namespace webrtc { - -// This is a copy of the cast included in the Chromium codebase here: -// http://cs.chromium.org/src/third_party/cld/base/casts.h -template -inline Dest bit_cast(const Source& source) { - // A compile error here means your Dest and Source have different sizes. - static_assert(sizeof(Dest) == sizeof(Source), - "Dest and Source have different sizes"); - - Dest dest; - memcpy(&dest, &source, sizeof(dest)); - return dest; -} - -// Converts the byte array with binary float representation to float. -// Bytes must be in little-endian order. -// Returns 0 if correct, -1 on error. -int ConvertByteArrayToFloat(const uint8_t bytes[4], float* out); - -// Converts the byte array with binary double representation to double. -// Bytes must be in little-endian order. -// Returns 0 if correct, -1 on error. -int ConvertByteArrayToDouble(const uint8_t bytes[8], double* out); - -// Converts a float to a byte array with binary float representation. -// Bytes will be in little-endian order. -// Returns 0 if correct, -1 on error. -int ConvertFloatToByteArray(float value, uint8_t out_bytes[4]); - -// Converts a double to a byte array with binary double representation. -// Bytes will be in little-endian order. -// Returns 0 if correct, -1 on error. -int ConvertDoubleToByteArray(double value, uint8_t out_bytes[8]); - -// Reads |length| 16-bit integers from |file| to |buffer|. -// |file| must be previously opened. -// Returns the number of 16-bit integers read or -1 on error. -size_t ReadInt16BufferFromFile(FileWrapper* file, - size_t length, - int16_t* buffer); - -// Reads |length| 16-bit integers from |file| and stores those values -// (converting them) in |buffer|. -// |file| must be previously opened. -// Returns the number of 16-bit integers read or -1 on error. -size_t ReadInt16FromFileToFloatBuffer(FileWrapper* file, - size_t length, - float* buffer); - -// Reads |length| 16-bit integers from |file| and stores those values -// (converting them) in |buffer|. -// |file| must be previously opened. -// Returns the number of 16-bit integers read or -1 on error. -size_t ReadInt16FromFileToDoubleBuffer(FileWrapper* file, - size_t length, - double* buffer); - -// Reads |length| floats in binary representation (4 bytes) from |file| to -// |buffer|. -// |file| must be previously opened. -// Returns the number of floats read or -1 on error. -size_t ReadFloatBufferFromFile(FileWrapper* file, size_t length, float* buffer); - -// Reads |length| doubles in binary representation (8 bytes) from |file| to -// |buffer|. -// |file| must be previously opened. -// Returns the number of doubles read or -1 on error. -size_t ReadDoubleBufferFromFile(FileWrapper* file, - size_t length, - double* buffer); - -// Writes |length| 16-bit integers from |buffer| in binary representation (2 -// bytes) to |file|. It flushes |file|, so after this call there are no -// writings pending. -// |file| must be previously opened. -// Returns the number of doubles written or -1 on error. -size_t WriteInt16BufferToFile(FileWrapper* file, - size_t length, - const int16_t* buffer); - -// Writes |length| floats from |buffer| in binary representation (4 bytes) to -// |file|. It flushes |file|, so after this call there are no writtings pending. -// |file| must be previously opened. -// Returns the number of doubles written or -1 on error. -size_t WriteFloatBufferToFile(FileWrapper* file, - size_t length, - const float* buffer); - -// Writes |length| doubles from |buffer| in binary representation (8 bytes) to -// |file|. It flushes |file|, so after this call there are no writings pending. -// |file| must be previously opened. -// Returns the number of doubles written or -1 on error. -size_t WriteDoubleBufferToFile(FileWrapper* file, - size_t length, - const double* buffer); - -} // namespace webrtc - -#endif // WEBRTC_MODULES_AUDIO_PROCESSING_TRANSIENT_FILE_UTILS_H_ diff --git a/WebRtc.NET/include/webrtc/modules/audio_processing/vad/common.h b/WebRtc.NET/include/webrtc/modules/audio_processing/vad/common.h deleted file mode 100644 index 4b7fb50f..00000000 --- a/WebRtc.NET/include/webrtc/modules/audio_processing/vad/common.h +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MODULES_AUDIO_PROCESSING_VAD_COMMON_H_ -#define WEBRTC_MODULES_AUDIO_PROCESSING_VAD_COMMON_H_ - -#include - -static const int kSampleRateHz = 16000; -static const size_t kLength10Ms = kSampleRateHz / 100; -static const size_t kMaxNumFrames = 4; - -struct AudioFeatures { - double log_pitch_gain[kMaxNumFrames]; - double pitch_lag_hz[kMaxNumFrames]; - double spectral_peak[kMaxNumFrames]; - double rms[kMaxNumFrames]; - size_t num_frames; - bool silence; -}; - -#endif // WEBRTC_MODULES_AUDIO_PROCESSING_VAD_COMMON_H_ diff --git a/WebRtc.NET/include/webrtc/modules/audio_processing/voice_detection_impl.h b/WebRtc.NET/include/webrtc/modules/audio_processing/voice_detection_impl.h deleted file mode 100644 index 6ba43dbc..00000000 --- a/WebRtc.NET/include/webrtc/modules/audio_processing/voice_detection_impl.h +++ /dev/null @@ -1,58 +0,0 @@ -/* - * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MODULES_AUDIO_PROCESSING_VOICE_DETECTION_IMPL_H_ -#define WEBRTC_MODULES_AUDIO_PROCESSING_VOICE_DETECTION_IMPL_H_ - -#include - -#include "webrtc/base/constructormagic.h" -#include "webrtc/base/criticalsection.h" -#include "webrtc/modules/audio_processing/include/audio_processing.h" - -namespace webrtc { - -class AudioBuffer; - -class VoiceDetectionImpl : public VoiceDetection { - public: - explicit VoiceDetectionImpl(rtc::CriticalSection* crit); - ~VoiceDetectionImpl() override; - - // TODO(peah): Fold into ctor, once public API is removed. - void Initialize(int sample_rate_hz); - void ProcessCaptureAudio(AudioBuffer* audio); - - // VoiceDetection implementation. - int Enable(bool enable) override; - bool is_enabled() const override; - int set_stream_has_voice(bool has_voice) override; - bool stream_has_voice() const override; - int set_likelihood(Likelihood likelihood) override; - Likelihood likelihood() const override; - int set_frame_size_ms(int size) override; - int frame_size_ms() const override; - - private: - class Vad; - rtc::CriticalSection* const crit_; - bool enabled_ GUARDED_BY(crit_) = false; - bool stream_has_voice_ GUARDED_BY(crit_) = false; - bool using_external_vad_ GUARDED_BY(crit_) = false; - Likelihood likelihood_ GUARDED_BY(crit_) = kLowLikelihood; - int frame_size_ms_ GUARDED_BY(crit_) = 10; - size_t frame_size_samples_ GUARDED_BY(crit_) = 0; - int sample_rate_hz_ GUARDED_BY(crit_) = 0; - std::unique_ptr vad_ GUARDED_BY(crit_); - RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(VoiceDetectionImpl); -}; -} // namespace webrtc - -#endif // WEBRTC_MODULES_AUDIO_PROCESSING_VOICE_DETECTION_IMPL_H_ diff --git a/WebRtc.NET/include/webrtc/modules/bitrate_controller/bitrate_controller_impl.h b/WebRtc.NET/include/webrtc/modules/bitrate_controller/bitrate_controller_impl.h deleted file mode 100644 index 7ee6b193..00000000 --- a/WebRtc.NET/include/webrtc/modules/bitrate_controller/bitrate_controller_impl.h +++ /dev/null @@ -1,105 +0,0 @@ -/* - * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - * - * Usage: this class will register multiple RtcpBitrateObserver's one at each - * RTCP module. It will aggregate the results and run one bandwidth estimation - * and push the result to the encoder via VideoEncoderCallback. - */ - -#ifndef WEBRTC_MODULES_BITRATE_CONTROLLER_BITRATE_CONTROLLER_IMPL_H_ -#define WEBRTC_MODULES_BITRATE_CONTROLLER_BITRATE_CONTROLLER_IMPL_H_ - -#include "webrtc/modules/bitrate_controller/include/bitrate_controller.h" - -#include -#include -#include - -#include "webrtc/base/constructormagic.h" -#include "webrtc/base/criticalsection.h" -#include "webrtc/modules/bitrate_controller/send_side_bandwidth_estimation.h" - -namespace webrtc { - -class BitrateControllerImpl : public BitrateController { - public: - // TODO(perkj): BitrateObserver has been deprecated and is not used in WebRTC. - // |observer| is left for project that is not yet updated. - BitrateControllerImpl(Clock* clock, - BitrateObserver* observer, - RtcEventLog* event_log); - virtual ~BitrateControllerImpl() {} - - bool AvailableBandwidth(uint32_t* bandwidth) const override; - - RtcpBandwidthObserver* CreateRtcpBandwidthObserver() override; - - // Deprecated - void SetStartBitrate(int start_bitrate_bps) override; - // Deprecated - void SetMinMaxBitrate(int min_bitrate_bps, int max_bitrate_bps) override; - - void SetBitrates(int start_bitrate_bps, - int min_bitrate_bps, - int max_bitrate_bps) override; - - void ResetBitrates(int bitrate_bps, - int min_bitrate_bps, - int max_bitrate_bps) override; - - - void SetReservedBitrate(uint32_t reserved_bitrate_bps) override; - - // Returns true if the parameters have changed since the last call. - bool GetNetworkParameters(uint32_t* bitrate, - uint8_t* fraction_loss, - int64_t* rtt) override; - - void OnDelayBasedBweResult(const DelayBasedBwe::Result& result) override; - - int64_t TimeUntilNextProcess() override; - void Process() override; - - private: - class RtcpBandwidthObserverImpl; - - // Called by BitrateObserver's direct from the RTCP module. - void OnReceiverEstimatedBitrate(uint32_t bitrate); - - void OnReceivedRtcpReceiverReport(uint8_t fraction_loss, - int64_t rtt, - int number_of_packets, - int64_t now_ms); - - // Deprecated - void MaybeTriggerOnNetworkChanged(); - - void OnNetworkChanged(uint32_t bitrate, - uint8_t fraction_loss, // 0 - 255. - int64_t rtt) EXCLUSIVE_LOCKS_REQUIRED(critsect_); - - // Used by process thread. - Clock* const clock_; - BitrateObserver* const observer_; - int64_t last_bitrate_update_ms_; - RtcEventLog* const event_log_; - - rtc::CriticalSection critsect_; - SendSideBandwidthEstimation bandwidth_estimation_ GUARDED_BY(critsect_); - uint32_t reserved_bitrate_bps_ GUARDED_BY(critsect_); - - uint32_t last_bitrate_bps_ GUARDED_BY(critsect_); - uint8_t last_fraction_loss_ GUARDED_BY(critsect_); - int64_t last_rtt_ms_ GUARDED_BY(critsect_); - uint32_t last_reserved_bitrate_bps_ GUARDED_BY(critsect_); - - RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(BitrateControllerImpl); -}; -} // namespace webrtc -#endif // WEBRTC_MODULES_BITRATE_CONTROLLER_BITRATE_CONTROLLER_IMPL_H_ diff --git a/WebRtc.NET/include/webrtc/modules/bitrate_controller/include/bitrate_controller.h b/WebRtc.NET/include/webrtc/modules/bitrate_controller/include/bitrate_controller.h deleted file mode 100644 index 7400d7d0..00000000 --- a/WebRtc.NET/include/webrtc/modules/bitrate_controller/include/bitrate_controller.h +++ /dev/null @@ -1,94 +0,0 @@ -/* - * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - * - * Usage: this class will register multiple RtcpBitrateObserver's one at each - * RTCP module. It will aggregate the results and run one bandwidth estimation - * and push the result to the encoders via BitrateObserver(s). - */ - -#ifndef WEBRTC_MODULES_BITRATE_CONTROLLER_INCLUDE_BITRATE_CONTROLLER_H_ -#define WEBRTC_MODULES_BITRATE_CONTROLLER_INCLUDE_BITRATE_CONTROLLER_H_ - -#include - -#include "webrtc/modules/congestion_controller/delay_based_bwe.h" -#include "webrtc/modules/include/module.h" -#include "webrtc/modules/pacing/paced_sender.h" -#include "webrtc/modules/rtp_rtcp/include/rtp_rtcp_defines.h" - -namespace webrtc { - -class CriticalSectionWrapper; -class RtcEventLog; -struct PacketInfo; - -// Deprecated -// TODO(perkj): Remove BitrateObserver when no implementations use it. -class BitrateObserver { - // Observer class for bitrate changes announced due to change in bandwidth - // estimate or due to bitrate allocation changes. Fraction loss and rtt is - // also part of this callback to allow the obsevrer to optimize its settings - // for different types of network environments. The bitrate does not include - // packet headers and is measured in bits per second. - public: - virtual void OnNetworkChanged(uint32_t bitrate_bps, - uint8_t fraction_loss, // 0 - 255. - int64_t rtt_ms) = 0; - - virtual ~BitrateObserver() {} -}; - -class BitrateController : public Module { - // This class collects feedback from all streams sent to a peer (via - // RTCPBandwidthObservers). It does one aggregated send side bandwidth - // estimation and divide the available bitrate between all its registered - // BitrateObservers. - public: - static const int kDefaultStartBitratebps = 300000; - - // Deprecated: - // TODO(perkj): BitrateObserver has been deprecated and is not used in WebRTC. - // Remove this method once other other projects does not use it. - static BitrateController* CreateBitrateController(Clock* clock, - BitrateObserver* observer, - RtcEventLog* event_log); - - static BitrateController* CreateBitrateController(Clock* clock, - RtcEventLog* event_log); - - virtual ~BitrateController() {} - - virtual RtcpBandwidthObserver* CreateRtcpBandwidthObserver() = 0; - - // Deprecated - virtual void SetStartBitrate(int start_bitrate_bps) = 0; - // Deprecated - virtual void SetMinMaxBitrate(int min_bitrate_bps, int max_bitrate_bps) = 0; - virtual void SetBitrates(int start_bitrate_bps, - int min_bitrate_bps, - int max_bitrate_bps) = 0; - - virtual void ResetBitrates(int bitrate_bps, - int min_bitrate_bps, - int max_bitrate_bps) = 0; - - virtual void OnDelayBasedBweResult(const DelayBasedBwe::Result& result) = 0; - - // Gets the available payload bandwidth in bits per second. Note that - // this bandwidth excludes packet headers. - virtual bool AvailableBandwidth(uint32_t* bandwidth) const = 0; - - virtual void SetReservedBitrate(uint32_t reserved_bitrate_bps) = 0; - - virtual bool GetNetworkParameters(uint32_t* bitrate, - uint8_t* fraction_loss, - int64_t* rtt) = 0; -}; -} // namespace webrtc -#endif // WEBRTC_MODULES_BITRATE_CONTROLLER_INCLUDE_BITRATE_CONTROLLER_H_ diff --git a/WebRtc.NET/include/webrtc/modules/bitrate_controller/send_side_bandwidth_estimation.h b/WebRtc.NET/include/webrtc/modules/bitrate_controller/send_side_bandwidth_estimation.h deleted file mode 100644 index 9529068e..00000000 --- a/WebRtc.NET/include/webrtc/modules/bitrate_controller/send_side_bandwidth_estimation.h +++ /dev/null @@ -1,105 +0,0 @@ -/* - * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - * - * FEC and NACK added bitrate is handled outside class - */ - -#ifndef WEBRTC_MODULES_BITRATE_CONTROLLER_SEND_SIDE_BANDWIDTH_ESTIMATION_H_ -#define WEBRTC_MODULES_BITRATE_CONTROLLER_SEND_SIDE_BANDWIDTH_ESTIMATION_H_ - -#include -#include -#include - -#include "webrtc/modules/rtp_rtcp/include/rtp_rtcp_defines.h" -#include "webrtc/system_wrappers/include/critical_section_wrapper.h" - -namespace webrtc { - -class RtcEventLog; - -class SendSideBandwidthEstimation { - public: - SendSideBandwidthEstimation() = delete; - explicit SendSideBandwidthEstimation(RtcEventLog* event_log); - virtual ~SendSideBandwidthEstimation(); - - void CurrentEstimate(int* bitrate, uint8_t* loss, int64_t* rtt) const; - - // Call periodically to update estimate. - void UpdateEstimate(int64_t now_ms); - - // Call when we receive a RTCP message with TMMBR or REMB. - void UpdateReceiverEstimate(int64_t now_ms, uint32_t bandwidth); - - // Call when a new delay-based estimate is available. - void UpdateDelayBasedEstimate(int64_t now_ms, uint32_t bitrate_bps); - - // Call when we receive a RTCP message with a ReceiveBlock. - void UpdateReceiverBlock(uint8_t fraction_loss, - int64_t rtt, - int number_of_packets, - int64_t now_ms); - - void SetBitrates(int send_bitrate, - int min_bitrate, - int max_bitrate); - void SetSendBitrate(int bitrate); - void SetMinMaxBitrate(int min_bitrate, int max_bitrate); - int GetMinBitrate() const; - - private: - enum UmaState { kNoUpdate, kFirstDone, kDone }; - - bool IsInStartPhase(int64_t now_ms) const; - - void UpdateUmaStats(int64_t now_ms, int64_t rtt, int lost_packets); - - // Returns the input bitrate capped to the thresholds defined by the max, - // min and incoming bandwidth. - uint32_t CapBitrateToThresholds(int64_t now_ms, uint32_t bitrate); - - // Updates history of min bitrates. - // After this method returns min_bitrate_history_.front().second contains the - // min bitrate used during last kBweIncreaseIntervalMs. - void UpdateMinHistory(int64_t now_ms); - - std::deque > min_bitrate_history_; - - // incoming filters - int lost_packets_since_last_loss_update_Q8_; - int expected_packets_since_last_loss_update_; - - uint32_t bitrate_; - uint32_t min_bitrate_configured_; - uint32_t max_bitrate_configured_; - int64_t last_low_bitrate_log_ms_; - - bool has_decreased_since_last_fraction_loss_; - int64_t last_feedback_ms_; - int64_t last_packet_report_ms_; - int64_t last_timeout_ms_; - uint8_t last_fraction_loss_; - uint8_t last_logged_fraction_loss_; - int64_t last_round_trip_time_ms_; - - uint32_t bwe_incoming_; - uint32_t delay_based_bitrate_bps_; - int64_t time_last_decrease_ms_; - int64_t first_report_time_ms_; - int initially_lost_packets_; - int bitrate_at_2_seconds_kbps_; - UmaState uma_update_state_; - std::vector rampup_uma_stats_updated_; - RtcEventLog* event_log_; - int64_t last_rtc_event_log_ms_; - bool in_timeout_experiment_; -}; -} // namespace webrtc -#endif // WEBRTC_MODULES_BITRATE_CONTROLLER_SEND_SIDE_BANDWIDTH_ESTIMATION_H_ diff --git a/WebRtc.NET/include/webrtc/modules/congestion_controller/delay_based_bwe.h b/WebRtc.NET/include/webrtc/modules/congestion_controller/delay_based_bwe.h deleted file mode 100644 index 6e7a6f8d..00000000 --- a/WebRtc.NET/include/webrtc/modules/congestion_controller/delay_based_bwe.h +++ /dev/null @@ -1,116 +0,0 @@ -/* - * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MODULES_CONGESTION_CONTROLLER_DELAY_BASED_BWE_H_ -#define WEBRTC_MODULES_CONGESTION_CONTROLLER_DELAY_BASED_BWE_H_ - -#include -#include -#include - -#include "webrtc/base/checks.h" -#include "webrtc/base/constructormagic.h" -#include "webrtc/base/rate_statistics.h" -#include "webrtc/base/thread_checker.h" -#include "webrtc/modules/congestion_controller/median_slope_estimator.h" -#include "webrtc/modules/congestion_controller/probe_bitrate_estimator.h" -#include "webrtc/modules/congestion_controller/probing_interval_estimator.h" -#include "webrtc/modules/congestion_controller/trendline_estimator.h" -#include "webrtc/modules/remote_bitrate_estimator/aimd_rate_control.h" -#include "webrtc/modules/remote_bitrate_estimator/include/remote_bitrate_estimator.h" -#include "webrtc/modules/remote_bitrate_estimator/inter_arrival.h" -#include "webrtc/modules/remote_bitrate_estimator/overuse_detector.h" -#include "webrtc/modules/remote_bitrate_estimator/overuse_estimator.h" - -namespace webrtc { - -class DelayBasedBwe { - public: - static const int64_t kStreamTimeOutMs = 2000; - - struct Result { - Result() : updated(false), probe(false), target_bitrate_bps(0) {} - Result(bool probe, uint32_t target_bitrate_bps) - : updated(true), probe(probe), target_bitrate_bps(target_bitrate_bps) {} - bool updated; - bool probe; - uint32_t target_bitrate_bps; - }; - - explicit DelayBasedBwe(Clock* clock); - virtual ~DelayBasedBwe() {} - - Result IncomingPacketFeedbackVector( - const std::vector& packet_feedback_vector); - void OnRttUpdate(int64_t avg_rtt_ms, int64_t max_rtt_ms); - bool LatestEstimate(std::vector* ssrcs, - uint32_t* bitrate_bps) const; - void SetMinBitrate(int min_bitrate_bps); - int64_t GetProbingIntervalMs() const; - - private: - // Computes a bayesian estimate of the throughput given acks containing - // the arrival time and payload size. Samples which are far from the current - // estimate or are based on few packets are given a smaller weight, as they - // are considered to be more likely to have been caused by, e.g., delay spikes - // unrelated to congestion. - class BitrateEstimator { - public: - BitrateEstimator(); - void Update(int64_t now_ms, int bytes); - rtc::Optional bitrate_bps() const; - - private: - float UpdateWindow(int64_t now_ms, int bytes, int rate_window_ms); - int sum_; - int64_t current_win_ms_; - int64_t prev_time_ms_; - float bitrate_estimate_; - float bitrate_estimate_var_; - RateStatistics old_estimator_; - const bool in_experiment_; - }; - - Result IncomingPacketInfo(const PacketInfo& info); - // Updates the current remote rate estimate and returns true if a valid - // estimate exists. - bool UpdateEstimate(int64_t packet_arrival_time_ms, - int64_t now_ms, - rtc::Optional acked_bitrate_bps, - uint32_t* target_bitrate_bps); - const bool in_trendline_experiment_; - const bool in_median_slope_experiment_; - - rtc::ThreadChecker network_thread_; - Clock* const clock_; - std::unique_ptr inter_arrival_; - std::unique_ptr kalman_estimator_; - std::unique_ptr trendline_estimator_; - std::unique_ptr median_slope_estimator_; - OveruseDetector detector_; - BitrateEstimator receiver_incoming_bitrate_; - int64_t last_update_ms_; - int64_t last_seen_packet_ms_; - bool uma_recorded_; - AimdRateControl rate_control_; - ProbeBitrateEstimator probe_bitrate_estimator_; - size_t trendline_window_size_; - double trendline_smoothing_coeff_; - double trendline_threshold_gain_; - ProbingIntervalEstimator probing_interval_estimator_; - size_t median_slope_window_size_; - double median_slope_threshold_gain_; - - RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(DelayBasedBwe); -}; - -} // namespace webrtc - -#endif // WEBRTC_MODULES_CONGESTION_CONTROLLER_DELAY_BASED_BWE_H_ diff --git a/WebRtc.NET/include/webrtc/modules/congestion_controller/include/congestion_controller.h b/WebRtc.NET/include/webrtc/modules/congestion_controller/include/congestion_controller.h deleted file mode 100644 index 1fcb03dd..00000000 --- a/WebRtc.NET/include/webrtc/modules/congestion_controller/include/congestion_controller.h +++ /dev/null @@ -1,150 +0,0 @@ -/* - * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MODULES_CONGESTION_CONTROLLER_INCLUDE_CONGESTION_CONTROLLER_H_ -#define WEBRTC_MODULES_CONGESTION_CONTROLLER_INCLUDE_CONGESTION_CONTROLLER_H_ - -#include - -#include "webrtc/base/constructormagic.h" -#include "webrtc/base/deprecation.h" -#include "webrtc/common_types.h" -#include "webrtc/modules/congestion_controller/transport_feedback_adapter.h" -#include "webrtc/modules/include/module.h" -#include "webrtc/modules/include/module_common_types.h" -#include "webrtc/modules/pacing/packet_router.h" -#include "webrtc/modules/pacing/paced_sender.h" -#include "webrtc/modules/remote_bitrate_estimator/remote_estimator_proxy.h" - -namespace rtc { -struct SentPacket; -} - -namespace webrtc { - -class BitrateController; -class Clock; -class ProbeController; -class RateLimiter; -class RemoteBitrateEstimator; -class RemoteBitrateObserver; -class RtcEventLog; -class TransportFeedbackObserver; - -class CongestionController : public CallStatsObserver, public Module { - public: - // Observer class for bitrate changes announced due to change in bandwidth - // estimate or due to that the send pacer is full. Fraction loss and rtt is - // also part of this callback to allow the observer to optimize its settings - // for different types of network environments. The bitrate does not include - // packet headers and is measured in bits per second. - class Observer { - public: - virtual void OnNetworkChanged(uint32_t bitrate_bps, - uint8_t fraction_loss, // 0 - 255. - int64_t rtt_ms, - int64_t probing_interval_ms) = 0; - - protected: - virtual ~Observer() {} - }; - CongestionController(Clock* clock, - Observer* observer, - RemoteBitrateObserver* remote_bitrate_observer, - RtcEventLog* event_log, - PacketRouter* packet_router); - CongestionController(Clock* clock, - Observer* observer, - RemoteBitrateObserver* remote_bitrate_observer, - RtcEventLog* event_log, - PacketRouter* packet_router, - std::unique_ptr pacer); - virtual ~CongestionController(); - - virtual void OnReceivedPacket(int64_t arrival_time_ms, - size_t payload_size, - const RTPHeader& header); - - virtual void SetBweBitrates(int min_bitrate_bps, - int start_bitrate_bps, - int max_bitrate_bps); - // Resets both the BWE state and the bitrate estimator. Note the first - // argument is the bitrate_bps. - virtual void ResetBweAndBitrates(int bitrate_bps, - int min_bitrate_bps, - int max_bitrate_bps); - virtual void SignalNetworkState(NetworkState state); - virtual void SetTransportOverhead(size_t transport_overhead_bytes_per_packet); - - virtual BitrateController* GetBitrateController() const; - virtual RemoteBitrateEstimator* GetRemoteBitrateEstimator( - bool send_side_bwe); - virtual int64_t GetPacerQueuingDelayMs() const; - // TODO(nisse): Delete this accessor function. The pacer should be - // internal to the congestion controller. - virtual PacedSender* pacer() { return pacer_.get(); } - virtual TransportFeedbackObserver* GetTransportFeedbackObserver(); - RateLimiter* GetRetransmissionRateLimiter(); - void EnablePeriodicAlrProbing(bool enable); - - // SetAllocatedSendBitrateLimits sets bitrates limits imposed by send codec - // settings. - // |min_send_bitrate_bps| is the total minimum send bitrate required by all - // sending streams. This is the minimum bitrate the PacedSender will use. - // Note that CongestionController::OnNetworkChanged can still be called with - // a lower bitrate estimate. - // |max_padding_bitrate_bps| is the max bitrate the send streams request for - // padding. This can be higher than the current network estimate and tells - // the PacedSender how much it should max pad unless there is real packets to - // send. - void SetAllocatedSendBitrateLimits(int min_send_bitrate_bps, - int max_padding_bitrate_bps); - - virtual void OnSentPacket(const rtc::SentPacket& sent_packet); - - // Implements CallStatsObserver. - void OnRttUpdate(int64_t avg_rtt_ms, int64_t max_rtt_ms) override; - - // Implements Module. - int64_t TimeUntilNextProcess() override; - void Process() override; - - private: - void MaybeTriggerOnNetworkChanged(); - - bool IsSendQueueFull() const; - bool IsNetworkDown() const; - bool HasNetworkParametersToReportChanged(uint32_t bitrate_bps, - uint8_t fraction_loss, - int64_t rtt); - Clock* const clock_; - Observer* const observer_; - PacketRouter* const packet_router_; - const std::unique_ptr pacer_; - const std::unique_ptr remote_bitrate_estimator_; - const std::unique_ptr bitrate_controller_; - const std::unique_ptr probe_controller_; - const std::unique_ptr retransmission_rate_limiter_; - RemoteEstimatorProxy remote_estimator_proxy_; - TransportFeedbackAdapter transport_feedback_adapter_; - int min_bitrate_bps_; - int max_bitrate_bps_; - rtc::CriticalSection critsect_; - uint32_t last_reported_bitrate_bps_ GUARDED_BY(critsect_); - uint8_t last_reported_fraction_loss_ GUARDED_BY(critsect_); - int64_t last_reported_rtt_ GUARDED_BY(critsect_); - NetworkState network_state_ GUARDED_BY(critsect_); - - RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(CongestionController); -}; - -} // namespace webrtc - -#endif // WEBRTC_MODULES_CONGESTION_CONTROLLER_INCLUDE_CONGESTION_CONTROLLER_H_ diff --git a/WebRtc.NET/include/webrtc/modules/congestion_controller/include/mock/mock_congestion_controller.h b/WebRtc.NET/include/webrtc/modules/congestion_controller/include/mock/mock_congestion_controller.h deleted file mode 100644 index aefb2be7..00000000 --- a/WebRtc.NET/include/webrtc/modules/congestion_controller/include/mock/mock_congestion_controller.h +++ /dev/null @@ -1,73 +0,0 @@ -/* - * Copyright (c) 2015 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MODULES_CONGESTION_CONTROLLER_INCLUDE_MOCK_MOCK_CONGESTION_CONTROLLER_H_ -#define WEBRTC_MODULES_CONGESTION_CONTROLLER_INCLUDE_MOCK_MOCK_CONGESTION_CONTROLLER_H_ - -#include "webrtc/base/constructormagic.h" -#include "webrtc/base/socket.h" -#include "webrtc/common_types.h" -#include "webrtc/modules/congestion_controller/include/congestion_controller.h" -#include "webrtc/test/gmock.h" - -namespace webrtc { -namespace test { - -class MockCongestionObserver : public CongestionController::Observer { - public: - // TODO(minyue): remove this when old OnNetworkChanged is deprecated. See - // https://bugs.chromium.org/p/webrtc/issues/detail?id=6796 - using CongestionController::Observer::OnNetworkChanged; - - MOCK_METHOD4(OnNetworkChanged, - void(uint32_t bitrate_bps, - uint8_t fraction_loss, - int64_t rtt_ms, - int64_t probing_interval_ms)); -}; - -class MockCongestionController : public CongestionController { - public: - MockCongestionController(Clock* clock, - Observer* observer, - RemoteBitrateObserver* remote_bitrate_observer, - RtcEventLog* event_log, - PacketRouter* packet_router) - : CongestionController(clock, - observer, - remote_bitrate_observer, - event_log, - packet_router) {} - MOCK_METHOD3(OnReceivedPacket, - void(int64_t arrival_time_ms, - size_t payload_size, - const RTPHeader& header)); - MOCK_METHOD3(SetBweBitrates, - void(int min_bitrate_bps, - int start_bitrate_bps, - int max_bitrate_bps)); - MOCK_METHOD1(SignalNetworkState, void(NetworkState state)); - MOCK_CONST_METHOD0(GetBitrateController, BitrateController*()); - MOCK_METHOD1(GetRemoteBitrateEstimator, - RemoteBitrateEstimator*(bool send_side_bwe)); - MOCK_CONST_METHOD0(GetPacerQueuingDelayMs, int64_t()); - MOCK_METHOD0(pacer, PacedSender*()); - MOCK_METHOD0(GetTransportFeedbackObserver, TransportFeedbackObserver*()); - MOCK_METHOD3(UpdatePacerBitrate, - void(int bitrate_kbps, - int max_bitrate_kbps, - int min_bitrate_kbps)); - MOCK_METHOD1(OnSentPacket, void(const rtc::SentPacket& sent_packet)); - - RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(MockCongestionController); -}; -} // namespace test -} // namespace webrtc -#endif // WEBRTC_MODULES_CONGESTION_CONTROLLER_INCLUDE_MOCK_MOCK_CONGESTION_CONTROLLER_H_ diff --git a/WebRtc.NET/include/webrtc/modules/congestion_controller/probe_bitrate_estimator.h b/WebRtc.NET/include/webrtc/modules/congestion_controller/probe_bitrate_estimator.h deleted file mode 100644 index c25c727d..00000000 --- a/WebRtc.NET/include/webrtc/modules/congestion_controller/probe_bitrate_estimator.h +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MODULES_CONGESTION_CONTROLLER_PROBE_BITRATE_ESTIMATOR_H_ -#define WEBRTC_MODULES_CONGESTION_CONTROLLER_PROBE_BITRATE_ESTIMATOR_H_ - -#include -#include - -#include "webrtc/modules/rtp_rtcp/include/rtp_rtcp_defines.h" - -namespace webrtc { - -class ProbeBitrateEstimator { - public: - ProbeBitrateEstimator(); - - // Should be called for every probe packet we receive feedback about. - // Returns the estimated bitrate if the probe completes a valid cluster. - int HandleProbeAndEstimateBitrate(const PacketInfo& packet_info); - - private: - struct AggregatedCluster { - int num_probes = 0; - int64_t first_send_ms = std::numeric_limits::max(); - int64_t last_send_ms = 0; - int64_t first_receive_ms = std::numeric_limits::max(); - int64_t last_receive_ms = 0; - int size_last_send = 0; - int size_first_receive = 0; - int size_total = 0; - }; - - // Erases old cluster data that was seen before |timestamp_ms|. - void EraseOldClusters(int64_t timestamp_ms); - - std::map clusters_; -}; - -} // namespace webrtc - -#endif // WEBRTC_MODULES_CONGESTION_CONTROLLER_PROBE_BITRATE_ESTIMATOR_H_ diff --git a/WebRtc.NET/include/webrtc/modules/congestion_controller/probe_controller.h b/WebRtc.NET/include/webrtc/modules/congestion_controller/probe_controller.h deleted file mode 100644 index a4201e63..00000000 --- a/WebRtc.NET/include/webrtc/modules/congestion_controller/probe_controller.h +++ /dev/null @@ -1,80 +0,0 @@ -/* - * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MODULES_CONGESTION_CONTROLLER_PROBE_CONTROLLER_H_ -#define WEBRTC_MODULES_CONGESTION_CONTROLLER_PROBE_CONTROLLER_H_ - -#include - -#include "webrtc/base/criticalsection.h" -#include "webrtc/common_types.h" -#include "webrtc/modules/pacing/paced_sender.h" - -namespace webrtc { - -class Clock; - -// This class controls initiation of probing to estimate initial channel -// capacity. There is also support for probing during a session when max -// bitrate is adjusted by an application. -class ProbeController { - public: - ProbeController(PacedSender* pacer, Clock* clock); - - void SetBitrates(int64_t min_bitrate_bps, - int64_t start_bitrate_bps, - int64_t max_bitrate_bps); - - void OnNetworkStateChanged(NetworkState state); - - void SetEstimatedBitrate(int64_t bitrate_bps); - - void EnablePeriodicAlrProbing(bool enable); - void Process(); - - private: - enum class State { - // Initial state where no probing has been triggered yet. - kInit, - // Waiting for probing results to continue further probing. - kWaitingForProbingResult, - // Probing is complete. - kProbingComplete, - }; - - void InitiateExponentialProbing() EXCLUSIVE_LOCKS_REQUIRED(critsect_); - void InitiateProbing(int64_t now_ms, - std::initializer_list bitrates_to_probe, - bool probe_further) EXCLUSIVE_LOCKS_REQUIRED(critsect_); - - rtc::CriticalSection critsect_; - PacedSender* const pacer_; - Clock* const clock_; - NetworkState network_state_ GUARDED_BY(critsect_); - State state_ GUARDED_BY(critsect_); - int64_t min_bitrate_to_probe_further_bps_ GUARDED_BY(critsect_); - int64_t time_last_probing_initiated_ms_ GUARDED_BY(critsect_); - int64_t estimated_bitrate_bps_ GUARDED_BY(critsect_); - int64_t start_bitrate_bps_ GUARDED_BY(critsect_); - int64_t max_bitrate_bps_ GUARDED_BY(critsect_); - int64_t last_alr_probing_time_ GUARDED_BY(critsect_); - bool enable_periodic_alr_probing_ GUARDED_BY(critsect_); - - // For WebRTC.BWE.MidCallProbing.* metric. - bool mid_call_probing_waiting_for_result_ GUARDED_BY(&critsect_); - int64_t mid_call_probing_bitrate_bps_ GUARDED_BY(&critsect_); - int64_t mid_call_probing_succcess_threshold_ GUARDED_BY(&critsect_); - - RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(ProbeController); -}; - -} // namespace webrtc - -#endif // WEBRTC_MODULES_CONGESTION_CONTROLLER_PROBE_CONTROLLER_H_ diff --git a/WebRtc.NET/include/webrtc/modules/congestion_controller/probing_interval_estimator.h b/WebRtc.NET/include/webrtc/modules/congestion_controller/probing_interval_estimator.h deleted file mode 100644 index 993e0da5..00000000 --- a/WebRtc.NET/include/webrtc/modules/congestion_controller/probing_interval_estimator.h +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MODULES_CONGESTION_CONTROLLER_PROBING_INTERVAL_ESTIMATOR_H_ -#define WEBRTC_MODULES_CONGESTION_CONTROLLER_PROBING_INTERVAL_ESTIMATOR_H_ - -#include "webrtc/base/constructormagic.h" -#include "webrtc/base/optional.h" -#include "webrtc/modules/remote_bitrate_estimator/aimd_rate_control.h" - -namespace webrtc { - -class ProbingIntervalEstimator { - public: - explicit ProbingIntervalEstimator(const AimdRateControl* aimd_rate_control); - - ProbingIntervalEstimator(int64_t min_interval_ms, - int64_t max_interval_ms, - int64_t default_interval_ms, - const AimdRateControl* aimd_rate_control); - int64_t GetIntervalMs() const; - - private: - const int64_t min_interval_ms_; - const int64_t max_interval_ms_; - const int64_t default_interval_ms_; - const AimdRateControl* const aimd_rate_control_; - RTC_DISALLOW_COPY_AND_ASSIGN(ProbingIntervalEstimator); -}; - -} // namespace webrtc -#endif // WEBRTC_MODULES_CONGESTION_CONTROLLER_PROBING_INTERVAL_ESTIMATOR_H_ diff --git a/WebRtc.NET/include/webrtc/modules/congestion_controller/transport_feedback_adapter.h b/WebRtc.NET/include/webrtc/modules/congestion_controller/transport_feedback_adapter.h deleted file mode 100644 index b7085be9..00000000 --- a/WebRtc.NET/include/webrtc/modules/congestion_controller/transport_feedback_adapter.h +++ /dev/null @@ -1,74 +0,0 @@ -/* - * Copyright (c) 2015 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MODULES_CONGESTION_CONTROLLER_TRANSPORT_FEEDBACK_ADAPTER_H_ -#define WEBRTC_MODULES_CONGESTION_CONTROLLER_TRANSPORT_FEEDBACK_ADAPTER_H_ - -#include -#include - -#include "webrtc/base/criticalsection.h" -#include "webrtc/base/thread_annotations.h" -#include "webrtc/base/thread_checker.h" -#include "webrtc/modules/congestion_controller/delay_based_bwe.h" -#include "webrtc/modules/include/module_common_types.h" -#include "webrtc/modules/remote_bitrate_estimator/include/send_time_history.h" - -namespace webrtc { - -class BitrateController; -class ProcessThread; - -class TransportFeedbackAdapter : public TransportFeedbackObserver, - public CallStatsObserver { - public: - TransportFeedbackAdapter(Clock* clock, BitrateController* bitrate_controller); - virtual ~TransportFeedbackAdapter(); - - void InitBwe(); - // Implements TransportFeedbackObserver. - void AddPacket(uint16_t sequence_number, - size_t length, - int probe_cluster_id) override; - void OnSentPacket(uint16_t sequence_number, int64_t send_time_ms); - - // TODO(holmer): This method should return DelayBasedBwe::Result so that we - // can get rid of the dependency on BitrateController. Requires changes - // to the CongestionController interface. - void OnTransportFeedback(const rtcp::TransportFeedback& feedback) override; - std::vector GetTransportFeedbackVector() const override; - - // Implements CallStatsObserver. - void OnRttUpdate(int64_t avg_rtt_ms, int64_t max_rtt_ms) override; - - void SetMinBitrate(int min_bitrate_bps); - void SetTransportOverhead(int transport_overhead_bytes_per_packet); - - int64_t GetProbingIntervalMs() const; - - private: - std::vector GetPacketFeedbackVector( - const rtcp::TransportFeedback& feedback); - - rtc::CriticalSection lock_; - rtc::CriticalSection bwe_lock_; - int transport_overhead_bytes_per_packet_ GUARDED_BY(&lock_); - SendTimeHistory send_time_history_ GUARDED_BY(&lock_); - std::unique_ptr delay_based_bwe_ GUARDED_BY(&bwe_lock_); - Clock* const clock_; - int64_t current_offset_ms_; - int64_t last_timestamp_us_; - BitrateController* const bitrate_controller_; - std::vector last_packet_feedback_vector_; -}; - -} // namespace webrtc - -#endif // WEBRTC_MODULES_CONGESTION_CONTROLLER_TRANSPORT_FEEDBACK_ADAPTER_H_ diff --git a/WebRtc.NET/include/webrtc/modules/congestion_controller/trendline_estimator.h b/WebRtc.NET/include/webrtc/modules/congestion_controller/trendline_estimator.h deleted file mode 100644 index f09ccb56..00000000 --- a/WebRtc.NET/include/webrtc/modules/congestion_controller/trendline_estimator.h +++ /dev/null @@ -1,71 +0,0 @@ -/* - * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ -#ifndef WEBRTC_MODULES_CONGESTION_CONTROLLER_TRENDLINE_ESTIMATOR_H_ -#define WEBRTC_MODULES_CONGESTION_CONTROLLER_TRENDLINE_ESTIMATOR_H_ - -#include -#include - -#include -#include - -#include "webrtc/base/constructormagic.h" - -namespace webrtc { - -class TrendlineEstimator { - public: - // |window_size| is the number of points required to compute a trend line. - // |smoothing_coef| controls how much we smooth out the delay before fitting - // the trend line. |threshold_gain| is used to scale the trendline slope for - // comparison to the old threshold. Once the old estimator has been removed - // (or the thresholds been merged into the estimators), we can just set the - // threshold instead of setting a gain. - TrendlineEstimator(size_t window_size, - double smoothing_coef, - double threshold_gain); - ~TrendlineEstimator(); - - // Update the estimator with a new sample. The deltas should represent deltas - // between timestamp groups as defined by the InterArrival class. - void Update(double recv_delta_ms, - double send_delta_ms, - int64_t arrival_time_ms); - - // Returns the estimated trend k multiplied by some gain. - // 0 < k < 1 -> the delay increases, queues are filling up - // k == 0 -> the delay does not change - // k < 0 -> the delay decreases, queues are being emptied - double trendline_slope() const { return trendline_ * threshold_gain_; } - - // Returns the number of deltas which the current estimator state is based on. - unsigned int num_of_deltas() const { return num_of_deltas_; } - - private: - // Parameters. - const size_t window_size_; - const double smoothing_coef_; - const double threshold_gain_; - // Used by the existing threshold. - unsigned int num_of_deltas_; - // Keep the arrival times small by using the change from the first packet. - int64_t first_arrival_time_ms; - // Exponential backoff filtering. - double accumulated_delay_; - double smoothed_delay_; - // Linear least squares regression. - std::deque> delay_hist_; - double trendline_; - - RTC_DISALLOW_COPY_AND_ASSIGN(TrendlineEstimator); -}; -} // namespace webrtc - -#endif // WEBRTC_MODULES_CONGESTION_CONTROLLER_TRENDLINE_ESTIMATOR_H_ diff --git a/WebRtc.NET/include/webrtc/modules/desktop_capture/cropped_desktop_frame.h b/WebRtc.NET/include/webrtc/modules/desktop_capture/cropped_desktop_frame.h deleted file mode 100644 index 42ae587a..00000000 --- a/WebRtc.NET/include/webrtc/modules/desktop_capture/cropped_desktop_frame.h +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Copyright (c) 2014 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MODULES_DESKTOP_CAPTURE_CROPPED_DESKTOP_FRAME_H_ -#define WEBRTC_MODULES_DESKTOP_CAPTURE_CROPPED_DESKTOP_FRAME_H_ - -#include "webrtc/modules/desktop_capture/desktop_frame.h" - -namespace webrtc { - -// Returns nullptr frame if |rect| is not contained by the bounds of |frame|. -std::unique_ptr CreateCroppedDesktopFrame( - std::unique_ptr frame, - const DesktopRect& rect); - -} // namespace webrtc - -#endif // WEBRTC_MODULES_DESKTOP_CAPTURE_CROPPED_DESKTOP_FRAME_H_ - diff --git a/WebRtc.NET/include/webrtc/modules/desktop_capture/desktop_and_cursor_composer.h b/WebRtc.NET/include/webrtc/modules/desktop_capture/desktop_and_cursor_composer.h deleted file mode 100644 index 3e339e81..00000000 --- a/WebRtc.NET/include/webrtc/modules/desktop_capture/desktop_and_cursor_composer.h +++ /dev/null @@ -1,67 +0,0 @@ -/* - * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MODULES_DESKTOP_CAPTURE_DESKTOP_AND_CURSOR_COMPOSER_H_ -#define WEBRTC_MODULES_DESKTOP_CAPTURE_DESKTOP_AND_CURSOR_COMPOSER_H_ - -#include - -#include "webrtc/base/constructormagic.h" -#include "webrtc/modules/desktop_capture/desktop_capturer.h" -#include "webrtc/modules/desktop_capture/mouse_cursor_monitor.h" - -namespace webrtc { - -// A wrapper for DesktopCapturer that also captures mouse using specified -// MouseCursorMonitor and renders it on the generated streams. -class DesktopAndCursorComposer : public DesktopCapturer, - public DesktopCapturer::Callback, - public MouseCursorMonitor::Callback { - public: - // Creates a new blender that captures mouse cursor using |mouse_monitor| and - // renders it into the frames generated by |desktop_capturer|. If - // |mouse_monitor| is NULL the frames are passed unmodified. Takes ownership - // of both arguments. - DesktopAndCursorComposer(DesktopCapturer* desktop_capturer, - MouseCursorMonitor* mouse_monitor); - ~DesktopAndCursorComposer() override; - - // DesktopCapturer interface. - void Start(DesktopCapturer::Callback* callback) override; - void SetSharedMemoryFactory( - std::unique_ptr shared_memory_factory) override; - void CaptureFrame() override; - void SetExcludedWindow(WindowId window) override; - - private: - // DesktopCapturer::Callback interface. - void OnCaptureResult(DesktopCapturer::Result result, - std::unique_ptr frame) override; - - // MouseCursorMonitor::Callback interface. - void OnMouseCursor(MouseCursor* cursor) override; - void OnMouseCursorPosition(MouseCursorMonitor::CursorState state, - const DesktopVector& position) override; - - std::unique_ptr desktop_capturer_; - std::unique_ptr mouse_monitor_; - - DesktopCapturer::Callback* callback_; - - std::unique_ptr cursor_; - MouseCursorMonitor::CursorState cursor_state_; - DesktopVector cursor_position_; - - RTC_DISALLOW_COPY_AND_ASSIGN(DesktopAndCursorComposer); -}; - -} // namespace webrtc - -#endif // WEBRTC_MODULES_DESKTOP_CAPTURE_DESKTOP_AND_CURSOR_COMPOSER_H_ diff --git a/WebRtc.NET/include/webrtc/modules/desktop_capture/desktop_capture_types.h b/WebRtc.NET/include/webrtc/modules/desktop_capture/desktop_capture_types.h deleted file mode 100644 index 9a6162a7..00000000 --- a/WebRtc.NET/include/webrtc/modules/desktop_capture/desktop_capture_types.h +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MODULES_DESKTOP_CAPTURE_DESKTOP_CAPTURE_TYPES_H_ -#define WEBRTC_MODULES_DESKTOP_CAPTURE_DESKTOP_CAPTURE_TYPES_H_ - -#include - -#include "webrtc/typedefs.h" - -namespace webrtc { - -// Type used to identify windows on the desktop. Values are platform-specific: -// - On Windows: HWND cast to intptr_t. -// - On Linux (with X11): X11 Window (unsigned long) type cast to intptr_t. -// - On OSX: integer window number. -typedef intptr_t WindowId; - -const WindowId kNullWindowId = 0; - -// Type used to identify screens on the desktop. Values are platform-specific: -// - On Windows: integer display device index. -// - On OSX: CGDirectDisplayID cast to intptr_t. -// - On Linux (with X11): TBD. -typedef intptr_t ScreenId; - -// The screen id corresponds to all screen combined together. -const ScreenId kFullDesktopScreenId = -1; - -const ScreenId kInvalidScreenId = -2; - -} // namespace webrtc - -#endif // WEBRTC_MODULES_DESKTOP_CAPTURE_DESKTOP_CAPTURE_TYPES_H_ diff --git a/WebRtc.NET/include/webrtc/modules/desktop_capture/desktop_frame.h b/WebRtc.NET/include/webrtc/modules/desktop_capture/desktop_frame.h deleted file mode 100644 index d4911350..00000000 --- a/WebRtc.NET/include/webrtc/modules/desktop_capture/desktop_frame.h +++ /dev/null @@ -1,133 +0,0 @@ -/* - * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MODULES_DESKTOP_CAPTURE_DESKTOP_FRAME_H_ -#define WEBRTC_MODULES_DESKTOP_CAPTURE_DESKTOP_FRAME_H_ - -#include - -#include "webrtc/base/constructormagic.h" -#include "webrtc/modules/desktop_capture/desktop_geometry.h" -#include "webrtc/modules/desktop_capture/desktop_region.h" -#include "webrtc/modules/desktop_capture/shared_memory.h" -#include "webrtc/typedefs.h" - -namespace webrtc { - -// DesktopFrame represents a video frame captured from the screen. -class DesktopFrame { - public: - // DesktopFrame objects always hold RGBA data. - static const int kBytesPerPixel = 4; - - virtual ~DesktopFrame(); - - // Size of the frame. - const DesktopSize& size() const { return size_; } - - // Distance in the buffer between two neighboring rows in bytes. - int stride() const { return stride_; } - - // Data buffer used for the frame. - uint8_t* data() const { return data_; } - - // SharedMemory used for the buffer or NULL if memory is allocated on the - // heap. The result is guaranteed to be deleted only after the frame is - // deleted (classes that inherit from DesktopFrame must ensure it). - SharedMemory* shared_memory() const { return shared_memory_; } - - // Indicates region of the screen that has changed since the previous frame. - const DesktopRegion& updated_region() const { return updated_region_; } - DesktopRegion* mutable_updated_region() { return &updated_region_; } - - // DPI of the screen being captured. May be set to zero, e.g. if DPI is - // unknown. - const DesktopVector& dpi() const { return dpi_; } - void set_dpi(const DesktopVector& dpi) { dpi_ = dpi; } - - // Time taken to capture the frame in milliseconds. - int64_t capture_time_ms() const { return capture_time_ms_; } - void set_capture_time_ms(int64_t time_ms) { capture_time_ms_ = time_ms; } - - // Copies pixels from a buffer or another frame. |dest_rect| rect must lay - // within bounds of this frame. - void CopyPixelsFrom(const uint8_t* src_buffer, - int src_stride, - const DesktopRect& dest_rect); - void CopyPixelsFrom(const DesktopFrame& src_frame, - const DesktopVector& src_pos, - const DesktopRect& dest_rect); - - // A helper to return the data pointer of a frame at the specified position. - uint8_t* GetFrameDataAtPos(const DesktopVector& pos) const; - - protected: - DesktopFrame(DesktopSize size, - int stride, - uint8_t* data, - SharedMemory* shared_memory); - - // Ownership of the buffers is defined by the classes that inherit from this - // class. They must guarantee that the buffer is not deleted before the frame - // is deleted. - uint8_t* const data_; - SharedMemory* const shared_memory_; - - private: - const DesktopSize size_; - const int stride_; - - DesktopRegion updated_region_; - DesktopVector dpi_; - int64_t capture_time_ms_; - - RTC_DISALLOW_COPY_AND_ASSIGN(DesktopFrame); -}; - -// A DesktopFrame that stores data in the heap. -class BasicDesktopFrame : public DesktopFrame { - public: - explicit BasicDesktopFrame(DesktopSize size); - ~BasicDesktopFrame() override; - - // Creates a BasicDesktopFrame that contains copy of |frame|. - static DesktopFrame* CopyOf(const DesktopFrame& frame); - - private: - RTC_DISALLOW_COPY_AND_ASSIGN(BasicDesktopFrame); -}; - -// A DesktopFrame that stores data in shared memory. -class SharedMemoryDesktopFrame : public DesktopFrame { - public: - static std::unique_ptr Create( - DesktopSize size, - SharedMemoryFactory* shared_memory_factory); - - static std::unique_ptr Create( - DesktopSize size, - std::unique_ptr shared_memory); - - // Takes ownership of |shared_memory|. - // TODO(zijiehe): Hide constructors after fake_desktop_capturer.cc has been - // migrated, Create() is preferred. - SharedMemoryDesktopFrame(DesktopSize size, - int stride, - SharedMemory* shared_memory); - ~SharedMemoryDesktopFrame() override; - - private: - RTC_DISALLOW_COPY_AND_ASSIGN(SharedMemoryDesktopFrame); -}; - -} // namespace webrtc - -#endif // WEBRTC_MODULES_DESKTOP_CAPTURE_DESKTOP_FRAME_H_ - diff --git a/WebRtc.NET/include/webrtc/modules/desktop_capture/fake_desktop_capturer.h b/WebRtc.NET/include/webrtc/modules/desktop_capture/fake_desktop_capturer.h deleted file mode 100644 index 33073a00..00000000 --- a/WebRtc.NET/include/webrtc/modules/desktop_capture/fake_desktop_capturer.h +++ /dev/null @@ -1,66 +0,0 @@ -/* - * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MODULES_DESKTOP_CAPTURE_FAKE_DESKTOP_CAPTURER_H_ -#define WEBRTC_MODULES_DESKTOP_CAPTURE_FAKE_DESKTOP_CAPTURER_H_ - -#include - -#include "webrtc/modules/desktop_capture/desktop_capturer.h" -#include "webrtc/modules/desktop_capture/desktop_capture_types.h" -#include "webrtc/modules/desktop_capture/desktop_frame_generator.h" -#include "webrtc/modules/desktop_capture/shared_memory.h" - -namespace webrtc { - -// A fake implementation of DesktopCapturer or its derived interfaces to -// generate DesktopFrame for testing purpose. -// -// Consumers can provide a FrameGenerator instance to generate instances of -// DesktopFrame to return for each Capture() function call. -// If no FrameGenerator provided, FakeDesktopCapturer will always return a -// nullptr DesktopFrame. -// -// Double buffering is guaranteed by the FrameGenerator. FrameGenerator -// implements in desktop_frame_generator.h guarantee double buffering, they -// creates a new instance of DesktopFrame each time. -class FakeDesktopCapturer : public DesktopCapturer { - public: - FakeDesktopCapturer(); - ~FakeDesktopCapturer() override; - - // Decides the result which will be returned in next Capture() callback. - void set_result(DesktopCapturer::Result result); - - // Uses the |generator| provided as DesktopFrameGenerator, FakeDesktopCapturer - // does not take the ownership of |generator|. - void set_frame_generator(DesktopFrameGenerator* generator); - - // DesktopCapturer interface - void Start(DesktopCapturer::Callback* callback) override; - void CaptureFrame() override; - void SetSharedMemoryFactory( - std::unique_ptr shared_memory_factory) override; - bool GetSourceList(DesktopCapturer::SourceList* sources) override; - bool SelectSource(DesktopCapturer::SourceId id) override; - - private: - static constexpr DesktopCapturer::SourceId kWindowId = 1378277495; - static constexpr DesktopCapturer::SourceId kScreenId = 1378277496; - - DesktopCapturer::Callback* callback_; - std::unique_ptr shared_memory_factory_; - DesktopCapturer::Result result_; - DesktopFrameGenerator* generator_; -}; - -} // namespace webrtc - -#endif // WEBRTC_MODULES_DESKTOP_CAPTURE_FAKE_DESKTOP_CAPTURER_H_ diff --git a/WebRtc.NET/include/webrtc/modules/desktop_capture/mac/desktop_configuration_monitor.h b/WebRtc.NET/include/webrtc/modules/desktop_capture/mac/desktop_configuration_monitor.h deleted file mode 100644 index 329beef2..00000000 --- a/WebRtc.NET/include/webrtc/modules/desktop_capture/mac/desktop_configuration_monitor.h +++ /dev/null @@ -1,67 +0,0 @@ -/* - * Copyright (c) 2014 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MODULES_DESKTOP_CAPTURE_MAC_DESKTOP_CONFIGURATION_MONITOR_H_ -#define WEBRTC_MODULES_DESKTOP_CAPTURE_MAC_DESKTOP_CONFIGURATION_MONITOR_H_ - -#include - -#include -#include - -#include "webrtc/base/constructormagic.h" -#include "webrtc/modules/desktop_capture/mac/desktop_configuration.h" -#include "webrtc/system_wrappers/include/atomic32.h" - -namespace webrtc { - -class EventWrapper; - -// The class provides functions to synchronize capturing and display -// reconfiguring across threads, and the up-to-date MacDesktopConfiguration. -class DesktopConfigurationMonitor { - public: - DesktopConfigurationMonitor(); - // Acquires a lock on the current configuration. - void Lock(); - // Releases the lock previously acquired. - void Unlock(); - // Returns the current desktop configuration. Should only be called when the - // lock has been acquired. - const MacDesktopConfiguration& desktop_configuration() { - return desktop_configuration_; - } - - void AddRef() { ++ref_count_; } - void Release() { - if (--ref_count_ == 0) - delete this; - } - - private: - static void DisplaysReconfiguredCallback(CGDirectDisplayID display, - CGDisplayChangeSummaryFlags flags, - void *user_parameter); - ~DesktopConfigurationMonitor(); - - void DisplaysReconfigured(CGDirectDisplayID display, - CGDisplayChangeSummaryFlags flags); - - Atomic32 ref_count_; - std::set reconfiguring_displays_; - MacDesktopConfiguration desktop_configuration_; - std::unique_ptr display_configuration_capture_event_; - - RTC_DISALLOW_COPY_AND_ASSIGN(DesktopConfigurationMonitor); -}; - -} // namespace webrtc - -#endif // WEBRTC_MODULES_DESKTOP_CAPTURE_MAC_DESKTOP_CONFIGURATION_MONITOR_H_ diff --git a/WebRtc.NET/include/webrtc/modules/desktop_capture/mac/scoped_pixel_buffer_object.h b/WebRtc.NET/include/webrtc/modules/desktop_capture/mac/scoped_pixel_buffer_object.h deleted file mode 100644 index a32d4709..00000000 --- a/WebRtc.NET/include/webrtc/modules/desktop_capture/mac/scoped_pixel_buffer_object.h +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MODULES_DESKTOP_CAPTURE_SCOPED_PIXEL_BUFFER_OBJECT_H_ -#define WEBRTC_MODULES_DESKTOP_CAPTURE_SCOPED_PIXEL_BUFFER_OBJECT_H_ - -#include -#include - -#include "webrtc/base/constructormagic.h" -#include "webrtc/typedefs.h" - -namespace webrtc { - -class ScopedPixelBufferObject { - public: - ScopedPixelBufferObject(); - ~ScopedPixelBufferObject(); - - bool Init(CGLContextObj cgl_context, int size_in_bytes); - void Release(); - - GLuint get() const { return pixel_buffer_object_; } - - private: - CGLContextObj cgl_context_; - GLuint pixel_buffer_object_; - - RTC_DISALLOW_COPY_AND_ASSIGN(ScopedPixelBufferObject); -}; - -} // namespace webrtc - -#endif // WEBRTC_MODULES_DESKTOP_CAPTURE_SCOPED_PIXEL_BUFFER_OBJECT_H_ diff --git a/WebRtc.NET/include/webrtc/modules/desktop_capture/mac/window_list_utils.h b/WebRtc.NET/include/webrtc/modules/desktop_capture/mac/window_list_utils.h deleted file mode 100644 index 7cc45710..00000000 --- a/WebRtc.NET/include/webrtc/modules/desktop_capture/mac/window_list_utils.h +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright (c) 2014 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MODULES_DESKTOP_CAPTURE_WINDOW_LIST_UTILS_H_ -#define WEBRTC_MODULES_DESKTOP_CAPTURE_WINDOW_LIST_UTILS_H_ - -#include - -#include "webrtc/modules/desktop_capture/desktop_capturer.h" -#include "webrtc/modules/desktop_capture/mac/desktop_configuration.h" - -namespace webrtc { - -// Another helper function to get the on-screen windows. -bool GetWindowList(DesktopCapturer::SourceList* windows, bool ignore_minimized); - -// Returns true if the window is occupying a full screen. -bool IsWindowFullScreen(const MacDesktopConfiguration& desktop_config, - CFDictionaryRef window); - -// Returns true if the window is minimized. -bool IsWindowMinimized(CGWindowID id); - - -} // namespace webrtc - -#endif // WEBRTC_MODULES_DESKTOP_CAPTURE_WINDOW_LIST_UTILS_H_ - diff --git a/WebRtc.NET/include/webrtc/modules/desktop_capture/mouse_cursor_monitor.h b/WebRtc.NET/include/webrtc/modules/desktop_capture/mouse_cursor_monitor.h deleted file mode 100644 index 24dfe72d..00000000 --- a/WebRtc.NET/include/webrtc/modules/desktop_capture/mouse_cursor_monitor.h +++ /dev/null @@ -1,90 +0,0 @@ -/* - * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MODULES_DESKTOP_CAPTURE_MOUSE_CURSOR_MONITOR_H_ -#define WEBRTC_MODULES_DESKTOP_CAPTURE_MOUSE_CURSOR_MONITOR_H_ - -#include "webrtc/modules/desktop_capture/desktop_capture_types.h" -#include "webrtc/modules/desktop_capture/desktop_geometry.h" -#include "webrtc/typedefs.h" - -namespace webrtc { - -class DesktopCaptureOptions; -class DesktopFrame; -class MouseCursor; - -// Captures mouse shape and position. -class MouseCursorMonitor { - public: - enum CursorState { - // Cursor on top of the window including window decorations. - INSIDE, - - // Cursor is outside of the window. - OUTSIDE, - }; - - enum Mode { - // Capture only shape of the mouse cursor, but not position. - SHAPE_ONLY, - - // Capture both, mouse cursor shape and position. - SHAPE_AND_POSITION, - }; - - // Callback interface used to pass current mouse cursor position and shape. - class Callback { - public: - // Called in response to Capture() when the cursor shape has changed. Must - // take ownership of |cursor|. - virtual void OnMouseCursor(MouseCursor* cursor) = 0; - - // Called in response to Capture(). |position| indicates cursor position - // relative to the |window| specified in the constructor. - virtual void OnMouseCursorPosition(CursorState state, - const DesktopVector& position) = 0; - - protected: - virtual ~Callback() {} - }; - - virtual ~MouseCursorMonitor() {} - - // Creates a capturer that notifies of mouse cursor events while the cursor is - // over the specified window. - static MouseCursorMonitor* CreateForWindow( - const DesktopCaptureOptions& options, - WindowId window); - - // Creates a capturer that monitors the mouse cursor shape and position across - // the entire desktop. - // - // TODO(sergeyu): Provide a way to select a specific screen. - static MouseCursorMonitor* CreateForScreen( - const DesktopCaptureOptions& options, - ScreenId screen); - - // Initializes the monitor with the |callback|, which must remain valid until - // capturer is destroyed. - virtual void Init(Callback* callback, Mode mode) = 0; - - // Captures current cursor shape and position (depending on the |mode| passed - // to Init()). Calls Callback::OnMouseCursor() if cursor shape has - // changed since the last call (or when Capture() is called for the first - // time) and then Callback::OnMouseCursorPosition() if mode is set to - // SHAPE_AND_POSITION. - virtual void Capture() = 0; -}; - -} // namespace webrtc - -#endif // WEBRTC_MODULES_DESKTOP_CAPTURE_MOUSE_CURSOR_MONITOR_H_ - diff --git a/WebRtc.NET/include/webrtc/modules/desktop_capture/shared_desktop_frame.h b/WebRtc.NET/include/webrtc/modules/desktop_capture/shared_desktop_frame.h deleted file mode 100644 index f4c3b673..00000000 --- a/WebRtc.NET/include/webrtc/modules/desktop_capture/shared_desktop_frame.h +++ /dev/null @@ -1,56 +0,0 @@ -/* - * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MODULES_DESKTOP_CAPTURE_SHARED_DESKTOP_FRAME_H_ -#define WEBRTC_MODULES_DESKTOP_CAPTURE_SHARED_DESKTOP_FRAME_H_ - -#include "webrtc/base/constructormagic.h" -#include "webrtc/base/refcount.h" -#include "webrtc/base/scoped_ref_ptr.h" -#include "webrtc/modules/desktop_capture/desktop_frame.h" - -namespace webrtc { - -// SharedDesktopFrame is a DesktopFrame that may have multiple instances all -// sharing the same buffer. -class SharedDesktopFrame : public DesktopFrame { - public: - ~SharedDesktopFrame() override; - - static std::unique_ptr Wrap( - std::unique_ptr desktop_frame); - - // Deprecated. - // TODO(sergeyu): remove this method. - static SharedDesktopFrame* Wrap(DesktopFrame* desktop_frame); - - // Returns the underlying instance of DesktopFrame. - DesktopFrame* GetUnderlyingFrame(); - - // Creates a clone of this object. - std::unique_ptr Share(); - - // Checks if the frame is currently shared. If it returns false it's - // guaranteed that there are no clones of the object. - bool IsShared(); - - private: - typedef rtc::RefCountedObject> Core; - - SharedDesktopFrame(rtc::scoped_refptr core); - - rtc::scoped_refptr core_; - - RTC_DISALLOW_COPY_AND_ASSIGN(SharedDesktopFrame); -}; - -} // namespace webrtc - -#endif // WEBRTC_MODULES_DESKTOP_CAPTURE_SHARED_DESKTOP_FRAME_H_ diff --git a/WebRtc.NET/include/webrtc/modules/desktop_capture/shared_memory.h b/WebRtc.NET/include/webrtc/modules/desktop_capture/shared_memory.h deleted file mode 100644 index 6e15f23f..00000000 --- a/WebRtc.NET/include/webrtc/modules/desktop_capture/shared_memory.h +++ /dev/null @@ -1,82 +0,0 @@ -/* - * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MODULES_DESKTOP_CAPTURE_SHARED_MEMORY_H_ -#define WEBRTC_MODULES_DESKTOP_CAPTURE_SHARED_MEMORY_H_ - -#include - -#if defined(WEBRTC_WIN) -#include -#endif - -#include - -#include "webrtc/base/constructormagic.h" -#include "webrtc/typedefs.h" - -namespace webrtc { - -// SharedMemory is a base class for shared memory. It stores all required -// parameters of the buffer, but doesn't have any logic to allocate or destroy -// the actual buffer. DesktopCapturer consumers that need to use shared memory -// for video frames must extend this class with creation and destruction logic -// specific for the target platform and then call -// DesktopCapturer::SetSharedMemoryFactory(). -class SharedMemory { - public: -#if defined(WEBRTC_WIN) - typedef HANDLE Handle; - static const Handle kInvalidHandle; -#else - typedef int Handle; - static const Handle kInvalidHandle; -#endif - - void* data() const { return data_; } - size_t size() const { return size_; } - - // Platform-specific handle of the buffer. - Handle handle() const { return handle_; } - - // Integer identifier that can be used used by consumers of DesktopCapturer - // interface to identify shared memory buffers it created. - int id() const { return id_; } - - virtual ~SharedMemory() {} - - protected: - SharedMemory(void* data, size_t size, Handle handle, int id); - - void* const data_; - const size_t size_; - const Handle handle_; - const int id_; - - private: - RTC_DISALLOW_COPY_AND_ASSIGN(SharedMemory); -}; - -// Interface used to create SharedMemory instances. -class SharedMemoryFactory { - public: - SharedMemoryFactory() {} - virtual ~SharedMemoryFactory() {} - - virtual std::unique_ptr CreateSharedMemory(size_t size) = 0; - - private: - RTC_DISALLOW_COPY_AND_ASSIGN(SharedMemoryFactory); -}; - -} // namespace webrtc - -#endif // WEBRTC_MODULES_DESKTOP_CAPTURE_SHARED_MEMORY_H_ - diff --git a/WebRtc.NET/include/webrtc/modules/desktop_capture/test_utils.h b/WebRtc.NET/include/webrtc/modules/desktop_capture/test_utils.h deleted file mode 100644 index ca272986..00000000 --- a/WebRtc.NET/include/webrtc/modules/desktop_capture/test_utils.h +++ /dev/null @@ -1,27 +0,0 @@ -/* - * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MODULES_DESKTOP_CAPTURE_TEST_UTILS_H_ -#define WEBRTC_MODULES_DESKTOP_CAPTURE_TEST_UTILS_H_ - -#include "webrtc/modules/desktop_capture/desktop_frame.h" - -namespace webrtc { - -// Clears a DesktopFrame |frame| by setting its data() into 0. -void ClearDesktopFrame(DesktopFrame* frame); - -// Compares size() and data() of two DesktopFrames |left| and |right|. -bool DesktopFrameDataEquals(const DesktopFrame& left, - const DesktopFrame& right); - -} // namespace webrtc - -#endif // WEBRTC_MODULES_DESKTOP_CAPTURE_TEST_UTILS_H_ diff --git a/WebRtc.NET/include/webrtc/modules/desktop_capture/win/cursor_unittest_resources.h b/WebRtc.NET/include/webrtc/modules/desktop_capture/win/cursor_unittest_resources.h deleted file mode 100644 index 89545c16..00000000 --- a/WebRtc.NET/include/webrtc/modules/desktop_capture/win/cursor_unittest_resources.h +++ /dev/null @@ -1,24 +0,0 @@ -/* - * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MODULES_DESKTOP_CAPTURE_WIN_CURSOR_UNITTEST_RESOURCES_H_ -#define WEBRTC_MODULES_DESKTOP_CAPTURE_WIN_CURSOR_UNITTEST_RESOURCES_H_ - -#define IDD_CURSOR1_24BPP 101 -#define IDD_CURSOR1_32BPP 102 -#define IDD_CURSOR1_8BPP 103 - -#define IDD_CURSOR2_1BPP 104 -#define IDD_CURSOR2_32BPP 105 - -#define IDD_CURSOR3_4BPP 106 -#define IDD_CURSOR3_32BPP 107 - -#endif // WEBRTC_MODULES_DESKTOP_CAPTURE_WIN_CURSOR_UNITTEST_RESOURCES_H_ diff --git a/WebRtc.NET/include/webrtc/modules/desktop_capture/win/dxgi_adapter_duplicator.h b/WebRtc.NET/include/webrtc/modules/desktop_capture/win/dxgi_adapter_duplicator.h deleted file mode 100644 index 0261105e..00000000 --- a/WebRtc.NET/include/webrtc/modules/desktop_capture/win/dxgi_adapter_duplicator.h +++ /dev/null @@ -1,91 +0,0 @@ -/* - * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MODULES_DESKTOP_CAPTURE_WIN_DXGI_ADAPTER_DUPLICATOR_H_ -#define WEBRTC_MODULES_DESKTOP_CAPTURE_WIN_DXGI_ADAPTER_DUPLICATOR_H_ - -#include - -#include - -#include "webrtc/modules/desktop_capture/desktop_geometry.h" -#include "webrtc/modules/desktop_capture/desktop_region.h" -#include "webrtc/modules/desktop_capture/shared_desktop_frame.h" -#include "webrtc/modules/desktop_capture/win/d3d_device.h" -#include "webrtc/modules/desktop_capture/win/dxgi_output_duplicator.h" - -namespace webrtc { - -// A container of DxgiOutputDuplicators to duplicate monitors attached to a -// single video card. -class DxgiAdapterDuplicator { - public: - struct Context { - Context(); - Context(const Context& other); - ~Context(); - - // Child DxgiOutputDuplicator::Context belongs to this - // DxgiAdapterDuplicator::Context. - std::vector contexts; - }; - - // Creates an instance of DxgiAdapterDuplicator from a D3dDevice. Only - // DxgiDuplicatorController can create an instance. - explicit DxgiAdapterDuplicator(const D3dDevice& device); - - // Move constructor, to make it possible to store instances of - // DxgiAdapterDuplicator in std::vector<>. - DxgiAdapterDuplicator(DxgiAdapterDuplicator&& other); - - ~DxgiAdapterDuplicator(); - - // Initializes the DxgiAdapterDuplicator from a D3dDevice. - bool Initialize(); - - // Sequentially calls Duplicate function of all the DxgiOutputDuplicator - // instances owned by this instance, and writes into |target|. - bool Duplicate(Context* context, SharedDesktopFrame* target); - - // Captures one monitor and writes into |target|. |monitor_id| should be - // between [0, screen_count()). - bool DuplicateMonitor(Context* context, - int monitor_id, - SharedDesktopFrame* target); - - // Returns desktop rect covered by this DxgiAdapterDuplicator. - DesktopRect desktop_rect() const { return desktop_rect_; } - - // Returns the size of one screen owned by this DxgiAdapterDuplicator. |id| - // should be between [0, screen_count()). - DesktopRect ScreenRect(int id) const; - - // Returns the count of screens owned by this DxgiAdapterDuplicator. These - // screens can be retrieved by an interger in the range of - // [0, screen_count()). - int screen_count() const { return static_cast(duplicators_.size()); } - - private: - friend class DxgiDuplicatorController; - - bool DoInitialize(); - - void Setup(Context* context); - - void Unregister(const Context* const context); - - const D3dDevice device_; - std::vector duplicators_; - DesktopRect desktop_rect_; -}; - -} // namespace webrtc - -#endif // WEBRTC_MODULES_DESKTOP_CAPTURE_WIN_DXGI_ADAPTER_DUPLICATOR_H_ diff --git a/WebRtc.NET/include/webrtc/modules/desktop_capture/win/dxgi_duplicator_controller.h b/WebRtc.NET/include/webrtc/modules/desktop_capture/win/dxgi_duplicator_controller.h deleted file mode 100644 index d13961d0..00000000 --- a/WebRtc.NET/include/webrtc/modules/desktop_capture/win/dxgi_duplicator_controller.h +++ /dev/null @@ -1,184 +0,0 @@ -/* - * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MODULES_DESKTOP_CAPTURE_WIN_DXGI_DUPLICATOR_CONTROLLER_H_ -#define WEBRTC_MODULES_DESKTOP_CAPTURE_WIN_DXGI_DUPLICATOR_CONTROLLER_H_ - -#include - -#include -#include - -#include "webrtc/base/criticalsection.h" -#include "webrtc/modules/desktop_capture/desktop_geometry.h" -#include "webrtc/modules/desktop_capture/desktop_region.h" -#include "webrtc/modules/desktop_capture/shared_desktop_frame.h" -#include "webrtc/modules/desktop_capture/win/d3d_device.h" -#include "webrtc/modules/desktop_capture/win/dxgi_adapter_duplicator.h" - -namespace webrtc { - -// A controller for all the objects we need to call Windows DirectX capture APIs -// It's a singleton because only one IDXGIOutputDuplication instance per monitor -// is allowed per application. -// -// Consumers should create a DxgiDuplicatorController::Context and keep it -// throughout their lifetime, and pass it when calling Duplicate(). Consumers -// can also call IsSupported() to determine whether the system supports DXGI -// duplicator or not. If a previous IsSupported() function call returns true, -// but a later Duplicate() returns false, this usually means the display mode is -// changing. Consumers should retry after a while. (Typically 50 milliseconds, -// but according to hardware performance, this time may vary.) -class DxgiDuplicatorController { - public: - // A context to store the status of a single consumer of - // DxgiDuplicatorController. - class Context { - public: - Context(); - // Unregister this Context instance from all Dxgi duplicators during - // destructing. - ~Context(); - - private: - friend class DxgiDuplicatorController; - - // A Context will have an exactly same |identity_| as - // DxgiDuplicatorController, to ensure it has been correctly setted up after - // each DxgiDuplicatorController::Initialize(). - int identity_ = 0; - - // Child DxgiAdapterDuplicator::Context belongs to this Context. - std::vector contexts_; - }; - - // A collection of D3d information we are interested on, which may impact - // capturer performance or reliability. - struct D3dInfo { - // Each video adapter has its own D3D_FEATURE_LEVEL, so this structure - // contains the minimum and maximium D3D_FEATURE_LEVELs current system - // supports. - // Both fields can be 0, which is the default value to indicate no valid - // D3D_FEATURE_LEVEL has been retrieved from underlying OS APIs. - D3D_FEATURE_LEVEL min_feature_level; - D3D_FEATURE_LEVEL max_feature_level; - - // TODO(zijiehe): Add more fields, such as manufacturer name, mode, driver - // version. - }; - - // Returns the singleton instance of DxgiDuplicatorController. - static DxgiDuplicatorController* Instance(); - - // Destructs current instance. We need to make sure COM components and their - // containers are destructed in correct order. - ~DxgiDuplicatorController(); - - // All the following functions implicitly call Initialize() function if - // current instance has not been initialized. - - // Detects whether the system supports DXGI based capturer. - bool IsSupported(); - - // Returns a copy of D3dInfo composed by last Initialize() function call. - bool RetrieveD3dInfo(D3dInfo* info); - - // Captures current screen and writes into target. Since we are using double - // buffering, |last_frame|.updated_region() is used to represent the not - // updated regions in current |target| frame, which should also be copied this - // time. - // TODO(zijiehe): Windows cannot guarantee the frames returned by each - // IDXGIOutputDuplication are synchronized. But we are using a totally - // different threading model than the way Windows suggested, it's hard to - // synchronize them manually. We should find a way to do it. - bool Duplicate(Context* context, SharedDesktopFrame* target); - - // Captures one monitor and writes into target. |monitor_id| should >= 0. If - // |monitor_id| is greater than the total screen count of all the Duplicators, - // this function returns false. - bool DuplicateMonitor(Context* context, - int monitor_id, - SharedDesktopFrame* target); - - // Returns dpi of current system. Returns an empty DesktopVector if system - // does not support DXGI based capturer. - DesktopVector dpi(); - - // Returns entire desktop size. Returns an empty DesktopRect if system does - // not support DXGI based capturer. - DesktopRect desktop_rect(); - - // Returns a DesktopSize to cover entire desktop_rect. This may be different - // than desktop_rect().size(), since top-left screen does not need to start - // from (0, 0). - DesktopSize desktop_size(); - - // Returns the size of one screen. |monitor_id| should be >= 0. If system does - // not support DXGI based capturer, or |monitor_id| is greater than the total - // screen count of all the Duplicators, this function returns an empty - // DesktopRect. - DesktopRect ScreenRect(int id); - - // Returns the count of screens on the system. These screens can be retrieved - // by an integer in the range of [0, ScreenCount()). If system does not - // support DXGI based capturer, this function returns 0. - int ScreenCount(); - - private: - // Context calls private Unregister(Context*) function during - // destructing. - friend class Context; - - // A private constructor to ensure consumers to use - // DxgiDuplicatorController::Instance(). - DxgiDuplicatorController(); - - // Unregisters Context from this instance and all DxgiAdapterDuplicator(s) - // it owns. - void Unregister(const Context* const context); - - // All functions below should be called in |lock_| locked scope. - - // If current instance has not been initialized, executes DoInitialize - // function, and returns initialize result. Otherwise directly returns true. - bool Initialize(); - - bool DoInitialize(); - - // Clears all COM components referred by this instance. So next Duplicate() - // call will eventually initialize this instance again. - void Deinitialize(); - - // A helper function to check whether a Context has been expired. - bool ContextExpired(const Context* const context) const; - - // Updates Context if needed. - void Setup(Context* context); - - // Do the real duplication work. |monitor_id < 0| to capture entire screen. - bool DoDuplicate(Context* context, - int monitor_id, - SharedDesktopFrame* target); - - // This lock must be locked whenever accessing any of the following objects. - rtc::CriticalSection lock_; - - // A self-incremented integer to compare with the one in Context, to - // ensure a Context has been initialized after DxgiDuplicatorController. - int identity_ = 0; - DesktopRect desktop_rect_; - DesktopVector dpi_; - std::vector duplicators_; - D3dInfo d3d_info_; -}; - -} // namespace webrtc - -#endif // WEBRTC_MODULES_DESKTOP_CAPTURE_WIN_DXGI_DUPLICATOR_CONTROLLER_H_ diff --git a/WebRtc.NET/include/webrtc/modules/desktop_capture/win/dxgi_output_duplicator.h b/WebRtc.NET/include/webrtc/modules/desktop_capture/win/dxgi_output_duplicator.h deleted file mode 100644 index 02a78148..00000000 --- a/WebRtc.NET/include/webrtc/modules/desktop_capture/win/dxgi_output_duplicator.h +++ /dev/null @@ -1,133 +0,0 @@ -/* - * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MODULES_DESKTOP_CAPTURE_WIN_DXGI_OUTPUT_DUPLICATOR_H_ -#define WEBRTC_MODULES_DESKTOP_CAPTURE_WIN_DXGI_OUTPUT_DUPLICATOR_H_ - -#include -#include -#include -#include - -#include -#include - -#include "webrtc/base/criticalsection.h" -#include "webrtc/base/thread_annotations.h" -#include "webrtc/modules/desktop_capture/desktop_geometry.h" -#include "webrtc/modules/desktop_capture/desktop_region.h" -#include "webrtc/modules/desktop_capture/desktop_frame_rotation.h" -#include "webrtc/modules/desktop_capture/shared_desktop_frame.h" -#include "webrtc/modules/desktop_capture/win/d3d_device.h" -#include "webrtc/modules/desktop_capture/win/dxgi_texture.h" - -namespace webrtc { - -// Duplicates the content on one IDXGIOutput, i.e. one monitor attached to one -// video card. None of functions in this class is thread-safe. -class DxgiOutputDuplicator { - public: - struct Context { - // The updated region DxgiOutputDuplicator::DetectUpdatedRegion() output - // during last Duplicate() function call. It's a DesktopRegion translated by - // offset of each DxgiOutputDuplicator instance. - DesktopRegion updated_region; - }; - - // Creates an instance of DxgiOutputDuplicator from a D3dDevice and one of its - // IDXGIOutput1. Caller must maintain the lifetime of device, to make sure it - // outlives this instance. Only DxgiAdapterDuplicator can create an instance. - DxgiOutputDuplicator(const D3dDevice& device, - const Microsoft::WRL::ComPtr& output, - const DXGI_OUTPUT_DESC& desc); - - // To allow this class to work with vector. - DxgiOutputDuplicator(DxgiOutputDuplicator&& other); - - // Destructs this instance. We need to make sure texture_ has been released - // before duplication_. - ~DxgiOutputDuplicator(); - - // Initializes duplication_ object. - bool Initialize(); - - // Copies the content of current IDXGIOutput to the |target|. To improve the - // performance, this function copies only regions merged from - // |context|->updated_region and DetectUpdatedRegion(). The |offset| decides - // the offset in the |target| where the content should be copied to. i.e. this - // function copies the content to the rectangle of (offset.x(), offset.y()) to - // (offset.x() + desktop_rect_.width(), offset.y() + desktop_rect_.height()). - // Returns false in case of a failure. - bool Duplicate(Context* context, - DesktopVector offset, - SharedDesktopFrame* target); - - // Returns the desktop rect covered by this DxgiOutputDuplicator. - DesktopRect desktop_rect() const { return desktop_rect_; } - - private: - friend class DxgiAdapterDuplicator; - - // Detects updated region translated by offset from IDXGIOutput1. This - // function will set the |updated_region| as entire DesktopRect starts from - // offset if it failed to execute Windows APIs. - void DetectUpdatedRegion(const DXGI_OUTDUPL_FRAME_INFO& frame_info, - DesktopVector offset, - DesktopRegion* updated_region); - - // Returns untranslated updated region, which are directly returned by Windows - // APIs. Returns false in case of a failure. - bool DoDetectUpdatedRegion(const DXGI_OUTDUPL_FRAME_INFO& frame_info, - DesktopRegion* updated_region); - - bool ReleaseFrame(); - - // Initializes duplication_ instance. Expects duplication_ is in empty status. - // Returns false if system does not support IDXGIOutputDuplication. - bool DuplicateOutput(); - - // Returns a DesktopRect with the same size of desktop_size_, but translated - // by offset. - DesktopRect TranslatedDesktopRect(DesktopVector offset); - - void Setup(Context* context); - - void Unregister(const Context* const context); - - // Spreads changes from |context| to other registered Context(s) in - // contexts_. - void SpreadContextChange(const Context* const context); - - const D3dDevice device_; - const Microsoft::WRL::ComPtr output_; - const DesktopRect desktop_rect_; - Microsoft::WRL::ComPtr duplication_; - DXGI_OUTDUPL_DESC desc_; - std::vector metadata_; - std::unique_ptr texture_; - Rotation rotation_; - DesktopSize unrotated_size_; - - // After each AcquireNextFrame() function call, updated_region_(s) of all - // active Context(s) need to be updated. Since they have missed the - // change this time. And during next Duplicate() function call, their - // updated_region_ will be merged and copied. - std::vector contexts_; - - // The last full frame of this output and its offset. If on AcquireNextFrame() - // failed because of timeout, i.e. no update, we can copy content from - // |last_frame_|. - std::unique_ptr last_frame_; - DesktopVector last_frame_offset_; -}; - -} // namespace webrtc - -#endif // WEBRTC_MODULES_DESKTOP_CAPTURE_WIN_DXGI_OUTPUT_DUPLICATOR_H_ diff --git a/WebRtc.NET/include/webrtc/modules/desktop_capture/win/dxgi_texture_mapping.h b/WebRtc.NET/include/webrtc/modules/desktop_capture/win/dxgi_texture_mapping.h deleted file mode 100644 index f6760df6..00000000 --- a/WebRtc.NET/include/webrtc/modules/desktop_capture/win/dxgi_texture_mapping.h +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MODULES_DESKTOP_CAPTURE_WIN_DXGI_TEXTURE_MAPPING_H_ -#define WEBRTC_MODULES_DESKTOP_CAPTURE_WIN_DXGI_TEXTURE_MAPPING_H_ - -#include -#include - -#include "webrtc/modules/desktop_capture/desktop_geometry.h" -#include "webrtc/modules/desktop_capture/desktop_region.h" -#include "webrtc/modules/desktop_capture/win/dxgi_texture.h" - -namespace webrtc { - -// A DxgiTexture which directly maps bitmap from IDXGIResource. This class is -// used when DXGI_OUTDUPL_DESC.DesktopImageInSystemMemory is true. (This usually -// means the video card shares main memory with CPU, instead of having its own -// individual memory.) -class DxgiTextureMapping : public DxgiTexture { - public: - // Creates a DxgiTextureMapping instance. Caller must maintain the lifetime - // of input duplication to make sure it outlives this instance. - DxgiTextureMapping(const DesktopSize& desktop_size, - IDXGIOutputDuplication* duplication); - - ~DxgiTextureMapping() override; - - bool CopyFrom(const DXGI_OUTDUPL_FRAME_INFO& frame_info, - IDXGIResource* resource) override; - - bool DoRelease() override; - - private: - IDXGIOutputDuplication* const duplication_; -}; - -} // namespace webrtc - -#endif // WEBRTC_MODULES_DESKTOP_CAPTURE_WIN_DXGI_TEXTURE_MAPPING_H_ diff --git a/WebRtc.NET/include/webrtc/modules/desktop_capture/win/dxgi_texture_staging.h b/WebRtc.NET/include/webrtc/modules/desktop_capture/win/dxgi_texture_staging.h deleted file mode 100644 index 3bdf30e2..00000000 --- a/WebRtc.NET/include/webrtc/modules/desktop_capture/win/dxgi_texture_staging.h +++ /dev/null @@ -1,67 +0,0 @@ -/* - * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MODULES_DESKTOP_CAPTURE_WIN_DXGI_TEXTURE_STAGING_H_ -#define WEBRTC_MODULES_DESKTOP_CAPTURE_WIN_DXGI_TEXTURE_STAGING_H_ - -#include -#include -#include - -#include "webrtc/modules/desktop_capture/desktop_geometry.h" -#include "webrtc/modules/desktop_capture/desktop_region.h" -#include "webrtc/modules/desktop_capture/win/d3d_device.h" -#include "webrtc/modules/desktop_capture/win/dxgi_texture.h" - -namespace webrtc { - -// A pair of an ID3D11Texture2D and an IDXGISurface. We need an ID3D11Texture2D -// instance to copy GPU texture to RAM, but an IDXGISurface instance to map the -// texture into a bitmap buffer. These two instances are pointing to a same -// object. -// -// An ID3D11Texture2D is created by an ID3D11Device, so a DxgiTexture cannot be -// shared between two DxgiAdapterDuplicators. -class DxgiTextureStaging : public DxgiTexture { - public: - // Creates a DxgiTextureStaging instance. Caller must maintain the lifetime - // of input device to make sure it outlives this instance. - DxgiTextureStaging(const DesktopSize& desktop_size, const D3dDevice& device); - - ~DxgiTextureStaging() override; - - // Copies selected regions of a frame represented by frame_info and resource. - // Returns false if anything wrong. - bool CopyFrom(const DXGI_OUTDUPL_FRAME_INFO& frame_info, - IDXGIResource* resource) override; - - bool DoRelease() override; - - private: - // Initializes stage_ from a CPU inaccessible IDXGIResource. Returns false if - // it failed to execute Windows APIs, or the size of the texture is not - // consistent with desktop_rect. - bool InitializeStage(ID3D11Texture2D* texture); - - // Makes sure stage_ and surface_ are always pointing to a same object. - // We need an ID3D11Texture2D instance for - // ID3D11DeviceContext::CopySubresourceRegion, but an IDXGISurface for - // IDXGISurface::Map. - void AssertStageAndSurfaceAreSameObject(); - - const DesktopRect desktop_rect_; - const D3dDevice device_; - Microsoft::WRL::ComPtr stage_; - Microsoft::WRL::ComPtr surface_; -}; - -} // namespace webrtc - -#endif // WEBRTC_MODULES_DESKTOP_CAPTURE_WIN_DXGI_TEXTURE_STAGING_H_ diff --git a/WebRtc.NET/include/webrtc/modules/desktop_capture/win/scoped_gdi_object.h b/WebRtc.NET/include/webrtc/modules/desktop_capture/win/scoped_gdi_object.h deleted file mode 100644 index 1cac63e4..00000000 --- a/WebRtc.NET/include/webrtc/modules/desktop_capture/win/scoped_gdi_object.h +++ /dev/null @@ -1,95 +0,0 @@ -/* - * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MODULES_DESKTOP_CAPTURE_WIN_SCOPED_GDI_HANDLE_H_ -#define WEBRTC_MODULES_DESKTOP_CAPTURE_WIN_SCOPED_GDI_HANDLE_H_ - -#include - -#include "webrtc/base/constructormagic.h" -#include "webrtc/typedefs.h" - -namespace webrtc { -namespace win { - -// Scoper for GDI objects. -template -class ScopedGDIObject { - public: - ScopedGDIObject() : handle_(NULL) {} - explicit ScopedGDIObject(T object) : handle_(object) {} - - ~ScopedGDIObject() { - Traits::Close(handle_); - } - - T Get() { - return handle_; - } - - void Set(T object) { - if (handle_ && object != handle_) - Traits::Close(handle_); - handle_ = object; - } - - ScopedGDIObject& operator=(T object) { - Set(object); - return *this; - } - - T release() { - T object = handle_; - handle_ = NULL; - return object; - } - - operator T() { return handle_; } - - private: - T handle_; - - RTC_DISALLOW_COPY_AND_ASSIGN(ScopedGDIObject); -}; - -// The traits class that uses DeleteObject() to close a handle. -template -class DeleteObjectTraits { - public: - // Closes the handle. - static void Close(T handle) { - if (handle) - DeleteObject(handle); - } - - private: - RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(DeleteObjectTraits); -}; - -// The traits class that uses DestroyCursor() to close a handle. -class DestroyCursorTraits { - public: - // Closes the handle. - static void Close(HCURSOR handle) { - if (handle) - DestroyCursor(handle); - } - - private: - RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(DestroyCursorTraits); -}; - -typedef ScopedGDIObject > ScopedBitmap; -typedef ScopedGDIObject ScopedCursor; - -} // namespace win -} // namespace webrtc - -#endif // WEBRTC_MODULES_DESKTOP_CAPTURE_WIN_SCOPED_GDI_HANDLE_H_ diff --git a/WebRtc.NET/include/webrtc/modules/desktop_capture/win/screen_capture_utils.h b/WebRtc.NET/include/webrtc/modules/desktop_capture/win/screen_capture_utils.h deleted file mode 100644 index 751588b4..00000000 --- a/WebRtc.NET/include/webrtc/modules/desktop_capture/win/screen_capture_utils.h +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright (c) 2014 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MODULES_DESKTOP_CAPTURE_WIN_SCREEN_CAPTURE_UTILS_H_ -#define WEBRTC_MODULES_DESKTOP_CAPTURE_WIN_SCREEN_CAPTURE_UTILS_H_ - -#include "webrtc/modules/desktop_capture/desktop_capturer.h" - -namespace webrtc { - -// Output the list of active screens into |screens|. Returns true if succeeded, -// or false if it fails to enumerate the display devices. -bool GetScreenList(DesktopCapturer::SourceList* screens); - -// Returns true if |screen| is a valid screen. The screen device key is -// returned through |device_key| if the screen is valid. The device key can be -// used in GetScreenRect to verify the screen matches the previously obtained -// id. -bool IsScreenValid(DesktopCapturer::SourceId screen, std::wstring* device_key); - -// Get the rect of the screen identified by |screen|, relative to the primary -// display's top-left. If the screen device key does not match |device_key|, or -// the screen does not exist, or any error happens, an empty rect is returned. -DesktopRect GetScreenRect(DesktopCapturer::SourceId screen, - const std::wstring& device_key); - -} // namespace webrtc - -#endif // WEBRTC_MODULES_DESKTOP_CAPTURE_WIN_SCREEN_CAPTURE_UTILS_H_ diff --git a/WebRtc.NET/include/webrtc/modules/desktop_capture/win/screen_capturer_win_directx.h b/WebRtc.NET/include/webrtc/modules/desktop_capture/win/screen_capturer_win_directx.h deleted file mode 100644 index 188fddd0..00000000 --- a/WebRtc.NET/include/webrtc/modules/desktop_capture/win/screen_capturer_win_directx.h +++ /dev/null @@ -1,74 +0,0 @@ -/* - * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MODULES_DESKTOP_CAPTURE_WIN_SCREEN_CAPTURER_WIN_DIRECTX_H_ -#define WEBRTC_MODULES_DESKTOP_CAPTURE_WIN_SCREEN_CAPTURER_WIN_DIRECTX_H_ - -#include - -#include -#include - -#include "webrtc/modules/desktop_capture/desktop_capturer.h" -#include "webrtc/modules/desktop_capture/desktop_capture_options.h" -#include "webrtc/modules/desktop_capture/desktop_region.h" -#include "webrtc/modules/desktop_capture/screen_capture_frame_queue.h" -#include "webrtc/modules/desktop_capture/shared_desktop_frame.h" -#include "webrtc/modules/desktop_capture/win/dxgi_duplicator_controller.h" - -namespace webrtc { - -// ScreenCapturerWinDirectx captures 32bit RGBA using DirectX. -class ScreenCapturerWinDirectx : public DesktopCapturer { - public: - using D3dInfo = DxgiDuplicatorController::D3dInfo; - - // Whether the system supports DirectX based capturing. - static bool IsSupported(); - - // Returns a most recent D3dInfo composed by - // DxgiDuplicatorController::Initialize() function. This function implicitly - // calls DxgiDuplicatorController::Initialize() if it has not been - // initialized. This function returns false and output parameter is kept - // unchanged if DxgiDuplicatorController::Initialize() failed. - // The D3dInfo may change based on hardware configuration even without - // restarting the hardware and software. Refer to https://goo.gl/OOCppq. So - // consumers should not cache the result returned by this function. - static bool RetrieveD3dInfo(D3dInfo* info); - - explicit ScreenCapturerWinDirectx(const DesktopCaptureOptions& options); - - ~ScreenCapturerWinDirectx() override; - - void Start(Callback* callback) override; - void SetSharedMemoryFactory( - std::unique_ptr shared_memory_factory) override; - void CaptureFrame() override; - bool GetSourceList(SourceList* sources) override; - bool SelectSource(SourceId id) override; - - private: - // Returns desktop size of selected screen. - DesktopSize SelectedDesktopSize() const; - - ScreenCaptureFrameQueue frames_; - std::unique_ptr shared_memory_factory_; - Callback* callback_ = nullptr; - - DxgiDuplicatorController::Context context_; - - SourceId current_screen_id_ = kFullDesktopScreenId; - - RTC_DISALLOW_COPY_AND_ASSIGN(ScreenCapturerWinDirectx); -}; - -} // namespace webrtc - -#endif // WEBRTC_MODULES_DESKTOP_CAPTURE_WIN_SCREEN_CAPTURER_WIN_DIRECTX_H_ diff --git a/WebRtc.NET/include/webrtc/modules/desktop_capture/win/screen_capturer_win_gdi.h b/WebRtc.NET/include/webrtc/modules/desktop_capture/win/screen_capturer_win_gdi.h deleted file mode 100644 index 05c0283a..00000000 --- a/WebRtc.NET/include/webrtc/modules/desktop_capture/win/screen_capturer_win_gdi.h +++ /dev/null @@ -1,84 +0,0 @@ -/* - * Copyright (c) 2014 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MODULES_DESKTOP_CAPTURE_WIN_SCREEN_CAPTURER_WIN_GDI_H_ -#define WEBRTC_MODULES_DESKTOP_CAPTURE_WIN_SCREEN_CAPTURER_WIN_GDI_H_ - -#include - -#include - -#include "webrtc/base/constructormagic.h" -#include "webrtc/modules/desktop_capture/desktop_capturer.h" -#include "webrtc/modules/desktop_capture/screen_capture_frame_queue.h" -#include "webrtc/modules/desktop_capture/shared_desktop_frame.h" -#include "webrtc/modules/desktop_capture/win/scoped_thread_desktop.h" - -namespace webrtc { - -// ScreenCapturerWinGdi captures 32bit RGB using GDI. -// -// ScreenCapturerWinGdi is double-buffered as required by ScreenCapturer. -// This class does not detect DesktopFrame::updated_region(), the field is -// always set to the entire frame rectangle. ScreenCapturerDifferWrapper should -// be used if that functionality is necessary. -class ScreenCapturerWinGdi : public DesktopCapturer { - public: - explicit ScreenCapturerWinGdi(const DesktopCaptureOptions& options); - ~ScreenCapturerWinGdi() override; - - // Overridden from ScreenCapturer: - void Start(Callback* callback) override; - void SetSharedMemoryFactory( - std::unique_ptr shared_memory_factory) override; - void CaptureFrame() override; - bool GetSourceList(SourceList* sources) override; - bool SelectSource(SourceId id) override; - - private: - typedef HRESULT (WINAPI * DwmEnableCompositionFunc)(UINT); - - // Make sure that the device contexts match the screen configuration. - void PrepareCaptureResources(); - - // Captures the current screen contents into the current buffer. Returns true - // if succeeded. - bool CaptureImage(); - - // Capture the current cursor shape. - void CaptureCursor(); - - Callback* callback_ = nullptr; - std::unique_ptr shared_memory_factory_; - SourceId current_screen_id_ = kFullDesktopScreenId; - std::wstring current_device_key_; - - ScopedThreadDesktop desktop_; - - // GDI resources used for screen capture. - HDC desktop_dc_ = NULL; - HDC memory_dc_ = NULL; - - // Queue of the frames buffers. - ScreenCaptureFrameQueue queue_; - - // Rectangle describing the bounds of the desktop device context, relative to - // the primary display's top-left. - DesktopRect desktop_dc_rect_; - - HMODULE dwmapi_library_ = NULL; - DwmEnableCompositionFunc composition_func_ = nullptr; - - RTC_DISALLOW_COPY_AND_ASSIGN(ScreenCapturerWinGdi); -}; - -} // namespace webrtc - -#endif // WEBRTC_MODULES_DESKTOP_CAPTURE_WIN_SCREEN_CAPTURER_WIN_GDI_H_ diff --git a/WebRtc.NET/include/webrtc/modules/desktop_capture/win/window_capture_utils.h b/WebRtc.NET/include/webrtc/modules/desktop_capture/win/window_capture_utils.h deleted file mode 100644 index 85bca4c8..00000000 --- a/WebRtc.NET/include/webrtc/modules/desktop_capture/win/window_capture_utils.h +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright (c) 2014 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#include - -#include "webrtc/base/constructormagic.h" -#include "webrtc/modules/desktop_capture/desktop_geometry.h" - -namespace webrtc { - -// Output the window rect, with the left/right/bottom frame border cropped if -// the window is maximized. |cropped_rect| is the cropped rect relative to the -// desktop. |original_rect| is the original rect returned from GetWindowRect. -// Returns true if all API calls succeeded. -bool GetCroppedWindowRect(HWND window, - DesktopRect* cropped_rect, - DesktopRect* original_rect); - -typedef HRESULT (WINAPI *DwmIsCompositionEnabledFunc)(BOOL* enabled); -class AeroChecker { - public: - AeroChecker(); - ~AeroChecker(); - - bool IsAeroEnabled(); - - private: - HMODULE dwmapi_library_; - DwmIsCompositionEnabledFunc func_; - - RTC_DISALLOW_COPY_AND_ASSIGN(AeroChecker); -}; - -} // namespace webrtc diff --git a/WebRtc.NET/include/webrtc/modules/desktop_capture/x11/x_server_pixel_buffer.h b/WebRtc.NET/include/webrtc/modules/desktop_capture/x11/x_server_pixel_buffer.h deleted file mode 100644 index 2a177c4f..00000000 --- a/WebRtc.NET/include/webrtc/modules/desktop_capture/x11/x_server_pixel_buffer.h +++ /dev/null @@ -1,87 +0,0 @@ -/* - * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -// Don't include this file in any .h files because it pulls in some X headers. - -#ifndef WEBRTC_MODULES_DESKTOP_CAPTURE_X11_X_SERVER_PIXEL_BUFFER_H_ -#define WEBRTC_MODULES_DESKTOP_CAPTURE_X11_X_SERVER_PIXEL_BUFFER_H_ - -#include "webrtc/base/constructormagic.h" -#include "webrtc/modules/desktop_capture/desktop_geometry.h" - -#include -#include - -namespace webrtc { - -class DesktopFrame; - -// A class to allow the X server's pixel buffer to be accessed as efficiently -// as possible. -class XServerPixelBuffer { - public: - XServerPixelBuffer(); - ~XServerPixelBuffer(); - - void Release(); - - // Allocate (or reallocate) the pixel buffer for |window|. Returns false in - // case of an error (e.g. window doesn't exist). - bool Init(Display* display, Window window); - - bool is_initialized() { return window_ != 0; } - - // Returns the size of the window the buffer was initialized for. - const DesktopSize& window_size() { return window_size_; } - - // Returns true if the window can be found. - bool IsWindowValid() const; - - // If shared memory is being used without pixmaps, synchronize this pixel - // buffer with the root window contents (otherwise, this is a no-op). - // This is to avoid doing a full-screen capture for each individual - // rectangle in the capture list, when it only needs to be done once at the - // beginning. - void Synchronize(); - - // Capture the specified rectangle and stores it in the |frame|. In the case - // where the full-screen data is captured by Synchronize(), this simply - // returns the pointer without doing any more work. The caller must ensure - // that |rect| is not larger than window_size(). - bool CaptureRect(const DesktopRect& rect, DesktopFrame* frame); - - private: - void InitShm(const XWindowAttributes& attributes); - bool InitPixmaps(int depth); - - // We expose two forms of blitting to handle variations in the pixel format. - // In FastBlit(), the operation is effectively a memcpy. - void FastBlit(uint8_t* image, - const DesktopRect& rect, - DesktopFrame* frame); - void SlowBlit(uint8_t* image, - const DesktopRect& rect, - DesktopFrame* frame); - - Display* display_ = nullptr; - Window window_ = 0; - DesktopSize window_size_; - XImage* x_image_ = nullptr; - XShmSegmentInfo* shm_segment_info_ = nullptr; - Pixmap shm_pixmap_ = 0; - GC shm_gc_ = nullptr; - bool xshm_get_image_succeeded_ = false; - - RTC_DISALLOW_COPY_AND_ASSIGN(XServerPixelBuffer); -}; - -} // namespace webrtc - -#endif // WEBRTC_MODULES_DESKTOP_CAPTURE_X11_X_SERVER_PIXEL_BUFFER_H_ diff --git a/WebRtc.NET/include/webrtc/modules/include/module_common_types.h b/WebRtc.NET/include/webrtc/modules/include/module_common_types.h deleted file mode 100644 index c7854322..00000000 --- a/WebRtc.NET/include/webrtc/modules/include/module_common_types.h +++ /dev/null @@ -1,534 +0,0 @@ -/* - * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MODULES_INCLUDE_MODULE_COMMON_TYPES_H_ -#define WEBRTC_MODULES_INCLUDE_MODULE_COMMON_TYPES_H_ - -#include -#include // memcpy - -#include -#include - -#include "webrtc/api/video/video_rotation.h" -#include "webrtc/base/constructormagic.h" -#include "webrtc/base/deprecation.h" -#include "webrtc/base/safe_conversions.h" -#include "webrtc/common_types.h" -#include "webrtc/modules/video_coding/codecs/vp8/include/vp8_globals.h" -#include "webrtc/modules/video_coding/codecs/vp9/include/vp9_globals.h" -#include "webrtc/modules/video_coding/codecs/h264/include/h264_globals.h" -#include "webrtc/typedefs.h" - -namespace webrtc { - -struct RTPAudioHeader { - uint8_t numEnergy; // number of valid entries in arrOfEnergy - uint8_t arrOfEnergy[kRtpCsrcSize]; // one energy byte (0-9) per channel - bool isCNG; // is this CNG - size_t channel; // number of channels 2 = stereo -}; - -union RTPVideoTypeHeader { - RTPVideoHeaderVP8 VP8; - RTPVideoHeaderVP9 VP9; - RTPVideoHeaderH264 H264; -}; - -enum RtpVideoCodecTypes { - kRtpVideoNone, - kRtpVideoGeneric, - kRtpVideoVp8, - kRtpVideoVp9, - kRtpVideoH264 -}; -// Since RTPVideoHeader is used as a member of a union, it can't have a -// non-trivial default constructor. -struct RTPVideoHeader { - uint16_t width; // size - uint16_t height; - VideoRotation rotation; - - PlayoutDelay playout_delay; - - union { - bool is_first_packet_in_frame; - RTC_DEPRECATED bool isFirstPacket; // first packet in frame - }; - uint8_t simulcastIdx; // Index if the simulcast encoder creating - // this frame, 0 if not using simulcast. - RtpVideoCodecTypes codec; - RTPVideoTypeHeader codecHeader; -}; -union RTPTypeHeader { - RTPAudioHeader Audio; - RTPVideoHeader Video; -}; - -struct WebRtcRTPHeader { - RTPHeader header; - FrameType frameType; - RTPTypeHeader type; - // NTP time of the capture time in local timebase in milliseconds. - int64_t ntp_time_ms; -}; - -class RTPFragmentationHeader { - public: - RTPFragmentationHeader() - : fragmentationVectorSize(0), - fragmentationOffset(NULL), - fragmentationLength(NULL), - fragmentationTimeDiff(NULL), - fragmentationPlType(NULL) {}; - - ~RTPFragmentationHeader() { - delete[] fragmentationOffset; - delete[] fragmentationLength; - delete[] fragmentationTimeDiff; - delete[] fragmentationPlType; - } - - void CopyFrom(const RTPFragmentationHeader& src) { - if (this == &src) { - return; - } - - if (src.fragmentationVectorSize != fragmentationVectorSize) { - // new size of vectors - - // delete old - delete[] fragmentationOffset; - fragmentationOffset = NULL; - delete[] fragmentationLength; - fragmentationLength = NULL; - delete[] fragmentationTimeDiff; - fragmentationTimeDiff = NULL; - delete[] fragmentationPlType; - fragmentationPlType = NULL; - - if (src.fragmentationVectorSize > 0) { - // allocate new - if (src.fragmentationOffset) { - fragmentationOffset = new size_t[src.fragmentationVectorSize]; - } - if (src.fragmentationLength) { - fragmentationLength = new size_t[src.fragmentationVectorSize]; - } - if (src.fragmentationTimeDiff) { - fragmentationTimeDiff = new uint16_t[src.fragmentationVectorSize]; - } - if (src.fragmentationPlType) { - fragmentationPlType = new uint8_t[src.fragmentationVectorSize]; - } - } - // set new size - fragmentationVectorSize = src.fragmentationVectorSize; - } - - if (src.fragmentationVectorSize > 0) { - // copy values - if (src.fragmentationOffset) { - memcpy(fragmentationOffset, src.fragmentationOffset, - src.fragmentationVectorSize * sizeof(size_t)); - } - if (src.fragmentationLength) { - memcpy(fragmentationLength, src.fragmentationLength, - src.fragmentationVectorSize * sizeof(size_t)); - } - if (src.fragmentationTimeDiff) { - memcpy(fragmentationTimeDiff, src.fragmentationTimeDiff, - src.fragmentationVectorSize * sizeof(uint16_t)); - } - if (src.fragmentationPlType) { - memcpy(fragmentationPlType, src.fragmentationPlType, - src.fragmentationVectorSize * sizeof(uint8_t)); - } - } - } - - void VerifyAndAllocateFragmentationHeader(const size_t size) { - assert(size <= std::numeric_limits::max()); - const uint16_t size16 = static_cast(size); - if (fragmentationVectorSize < size16) { - uint16_t oldVectorSize = fragmentationVectorSize; - { - // offset - size_t* oldOffsets = fragmentationOffset; - fragmentationOffset = new size_t[size16]; - memset(fragmentationOffset + oldVectorSize, 0, - sizeof(size_t) * (size16 - oldVectorSize)); - // copy old values - memcpy(fragmentationOffset, oldOffsets, - sizeof(size_t) * oldVectorSize); - delete[] oldOffsets; - } - // length - { - size_t* oldLengths = fragmentationLength; - fragmentationLength = new size_t[size16]; - memset(fragmentationLength + oldVectorSize, 0, - sizeof(size_t) * (size16 - oldVectorSize)); - memcpy(fragmentationLength, oldLengths, - sizeof(size_t) * oldVectorSize); - delete[] oldLengths; - } - // time diff - { - uint16_t* oldTimeDiffs = fragmentationTimeDiff; - fragmentationTimeDiff = new uint16_t[size16]; - memset(fragmentationTimeDiff + oldVectorSize, 0, - sizeof(uint16_t) * (size16 - oldVectorSize)); - memcpy(fragmentationTimeDiff, oldTimeDiffs, - sizeof(uint16_t) * oldVectorSize); - delete[] oldTimeDiffs; - } - // payload type - { - uint8_t* oldTimePlTypes = fragmentationPlType; - fragmentationPlType = new uint8_t[size16]; - memset(fragmentationPlType + oldVectorSize, 0, - sizeof(uint8_t) * (size16 - oldVectorSize)); - memcpy(fragmentationPlType, oldTimePlTypes, - sizeof(uint8_t) * oldVectorSize); - delete[] oldTimePlTypes; - } - fragmentationVectorSize = size16; - } - } - - uint16_t fragmentationVectorSize; // Number of fragmentations - size_t* fragmentationOffset; // Offset of pointer to data for each - // fragmentation - size_t* fragmentationLength; // Data size for each fragmentation - uint16_t* fragmentationTimeDiff; // Timestamp difference relative "now" for - // each fragmentation - uint8_t* fragmentationPlType; // Payload type of each fragmentation - - private: - RTC_DISALLOW_COPY_AND_ASSIGN(RTPFragmentationHeader); -}; - -struct RTCPVoIPMetric { - // RFC 3611 4.7 - uint8_t lossRate; - uint8_t discardRate; - uint8_t burstDensity; - uint8_t gapDensity; - uint16_t burstDuration; - uint16_t gapDuration; - uint16_t roundTripDelay; - uint16_t endSystemDelay; - uint8_t signalLevel; - uint8_t noiseLevel; - uint8_t RERL; - uint8_t Gmin; - uint8_t Rfactor; - uint8_t extRfactor; - uint8_t MOSLQ; - uint8_t MOSCQ; - uint8_t RXconfig; - uint16_t JBnominal; - uint16_t JBmax; - uint16_t JBabsMax; -}; - -// Types for the FEC packet masks. The type |kFecMaskRandom| is based on a -// random loss model. The type |kFecMaskBursty| is based on a bursty/consecutive -// loss model. The packet masks are defined in -// modules/rtp_rtcp/fec_private_tables_random(bursty).h -enum FecMaskType { - kFecMaskRandom, - kFecMaskBursty, -}; - -// Struct containing forward error correction settings. -struct FecProtectionParams { - int fec_rate; - int max_fec_frames; - FecMaskType fec_mask_type; -}; - -// Interface used by the CallStats class to distribute call statistics. -// Callbacks will be triggered as soon as the class has been registered to a -// CallStats object using RegisterStatsObserver. -class CallStatsObserver { - public: - virtual void OnRttUpdate(int64_t avg_rtt_ms, int64_t max_rtt_ms) = 0; - - virtual ~CallStatsObserver() {} -}; - -/* This class holds up to 60 ms of super-wideband (32 kHz) stereo audio. It - * allows for adding and subtracting frames while keeping track of the resulting - * states. - * - * Notes - * - The total number of samples in |data_| is - * samples_per_channel_ * num_channels_ - * - * - Stereo data is interleaved starting with the left channel. - * - */ -class AudioFrame { - public: - // Stereo, 32 kHz, 60 ms (2 * 32 * 60) - enum : size_t { - kMaxDataSizeSamples = 3840 - }; - - enum VADActivity { - kVadActive = 0, - kVadPassive = 1, - kVadUnknown = 2 - }; - enum SpeechType { - kNormalSpeech = 0, - kPLC = 1, - kCNG = 2, - kPLCCNG = 3, - kUndefined = 4 - }; - - AudioFrame(); - - // Resets all members to their default state (except does not modify the - // contents of |data_|). - void Reset(); - - void UpdateFrame(int id, uint32_t timestamp, const int16_t* data, - size_t samples_per_channel, int sample_rate_hz, - SpeechType speech_type, VADActivity vad_activity, - size_t num_channels = 1); - - void CopyFrom(const AudioFrame& src); - - // These methods are deprecated. Use the functions in - // webrtc/audio/utility instead. These methods will exists for a - // short period of time until webrtc clients have updated. See - // webrtc:6548 for details. - RTC_DEPRECATED void Mute(); - RTC_DEPRECATED AudioFrame& operator>>=(const int rhs); - RTC_DEPRECATED AudioFrame& operator+=(const AudioFrame& rhs); - - int id_; - // RTP timestamp of the first sample in the AudioFrame. - uint32_t timestamp_ = 0; - // Time since the first frame in milliseconds. - // -1 represents an uninitialized value. - int64_t elapsed_time_ms_ = -1; - // NTP time of the estimated capture time in local timebase in milliseconds. - // -1 represents an uninitialized value. - int64_t ntp_time_ms_ = -1; - int16_t data_[kMaxDataSizeSamples]; - size_t samples_per_channel_ = 0; - int sample_rate_hz_ = 0; - size_t num_channels_ = 0; - SpeechType speech_type_ = kUndefined; - VADActivity vad_activity_ = kVadUnknown; - - private: - RTC_DISALLOW_COPY_AND_ASSIGN(AudioFrame); -}; - -// TODO(henrik.lundin) Can we remove the call to data_()? -// See https://bugs.chromium.org/p/webrtc/issues/detail?id=5647. -inline AudioFrame::AudioFrame() - : data_() { -} - -inline void AudioFrame::Reset() { - id_ = -1; - // TODO(wu): Zero is a valid value for |timestamp_|. We should initialize - // to an invalid value, or add a new member to indicate invalidity. - timestamp_ = 0; - elapsed_time_ms_ = -1; - ntp_time_ms_ = -1; - samples_per_channel_ = 0; - sample_rate_hz_ = 0; - num_channels_ = 0; - speech_type_ = kUndefined; - vad_activity_ = kVadUnknown; -} - -inline void AudioFrame::UpdateFrame(int id, - uint32_t timestamp, - const int16_t* data, - size_t samples_per_channel, - int sample_rate_hz, - SpeechType speech_type, - VADActivity vad_activity, - size_t num_channels) { - id_ = id; - timestamp_ = timestamp; - samples_per_channel_ = samples_per_channel; - sample_rate_hz_ = sample_rate_hz; - speech_type_ = speech_type; - vad_activity_ = vad_activity; - num_channels_ = num_channels; - - const size_t length = samples_per_channel * num_channels; - assert(length <= kMaxDataSizeSamples); - if (data != NULL) { - memcpy(data_, data, sizeof(int16_t) * length); - } else { - memset(data_, 0, sizeof(int16_t) * length); - } -} - -inline void AudioFrame::CopyFrom(const AudioFrame& src) { - if (this == &src) return; - - id_ = src.id_; - timestamp_ = src.timestamp_; - elapsed_time_ms_ = src.elapsed_time_ms_; - ntp_time_ms_ = src.ntp_time_ms_; - samples_per_channel_ = src.samples_per_channel_; - sample_rate_hz_ = src.sample_rate_hz_; - speech_type_ = src.speech_type_; - vad_activity_ = src.vad_activity_; - num_channels_ = src.num_channels_; - - const size_t length = samples_per_channel_ * num_channels_; - assert(length <= kMaxDataSizeSamples); - memcpy(data_, src.data_, sizeof(int16_t) * length); -} - -inline void AudioFrame::Mute() { - memset(data_, 0, samples_per_channel_ * num_channels_ * sizeof(int16_t)); -} - -inline AudioFrame& AudioFrame::operator>>=(const int rhs) { - assert((num_channels_ > 0) && (num_channels_ < 3)); - if ((num_channels_ > 2) || (num_channels_ < 1)) return *this; - - for (size_t i = 0; i < samples_per_channel_ * num_channels_; i++) { - data_[i] = static_cast(data_[i] >> rhs); - } - return *this; -} - -inline AudioFrame& AudioFrame::operator+=(const AudioFrame& rhs) { - // Sanity check - assert((num_channels_ > 0) && (num_channels_ < 3)); - if ((num_channels_ > 2) || (num_channels_ < 1)) return *this; - if (num_channels_ != rhs.num_channels_) return *this; - - bool noPrevData = false; - if (samples_per_channel_ != rhs.samples_per_channel_) { - if (samples_per_channel_ == 0) { - // special case we have no data to start with - samples_per_channel_ = rhs.samples_per_channel_; - noPrevData = true; - } else { - return *this; - } - } - - if ((vad_activity_ == kVadActive) || rhs.vad_activity_ == kVadActive) { - vad_activity_ = kVadActive; - } else if (vad_activity_ == kVadUnknown || rhs.vad_activity_ == kVadUnknown) { - vad_activity_ = kVadUnknown; - } - - if (speech_type_ != rhs.speech_type_) speech_type_ = kUndefined; - - if (noPrevData) { - memcpy(data_, rhs.data_, - sizeof(int16_t) * rhs.samples_per_channel_ * num_channels_); - } else { - // IMPROVEMENT this can be done very fast in assembly - for (size_t i = 0; i < samples_per_channel_ * num_channels_; i++) { - int32_t wrap_guard = - static_cast(data_[i]) + static_cast(rhs.data_[i]); - data_[i] = rtc::saturated_cast(wrap_guard); - } - } - return *this; -} - -inline bool IsNewerSequenceNumber(uint16_t sequence_number, - uint16_t prev_sequence_number) { - // Distinguish between elements that are exactly 0x8000 apart. - // If s1>s2 and |s1-s2| = 0x8000: IsNewer(s1,s2)=true, IsNewer(s2,s1)=false - // rather than having IsNewer(s1,s2) = IsNewer(s2,s1) = false. - if (static_cast(sequence_number - prev_sequence_number) == 0x8000) { - return sequence_number > prev_sequence_number; - } - return sequence_number != prev_sequence_number && - static_cast(sequence_number - prev_sequence_number) < 0x8000; -} - -inline bool IsNewerTimestamp(uint32_t timestamp, uint32_t prev_timestamp) { - // Distinguish between elements that are exactly 0x80000000 apart. - // If t1>t2 and |t1-t2| = 0x80000000: IsNewer(t1,t2)=true, - // IsNewer(t2,t1)=false - // rather than having IsNewer(t1,t2) = IsNewer(t2,t1) = false. - if (static_cast(timestamp - prev_timestamp) == 0x80000000) { - return timestamp > prev_timestamp; - } - return timestamp != prev_timestamp && - static_cast(timestamp - prev_timestamp) < 0x80000000; -} - -inline uint16_t LatestSequenceNumber(uint16_t sequence_number1, - uint16_t sequence_number2) { - return IsNewerSequenceNumber(sequence_number1, sequence_number2) - ? sequence_number1 - : sequence_number2; -} - -inline uint32_t LatestTimestamp(uint32_t timestamp1, uint32_t timestamp2) { - return IsNewerTimestamp(timestamp1, timestamp2) ? timestamp1 : timestamp2; -} - -// Utility class to unwrap a sequence number to a larger type, for easier -// handling large ranges. Note that sequence numbers will never be unwrapped -// to a negative value. -class SequenceNumberUnwrapper { - public: - SequenceNumberUnwrapper() : last_seq_(-1) {} - - // Get the unwrapped sequence, but don't update the internal state. - int64_t UnwrapWithoutUpdate(uint16_t sequence_number) { - if (last_seq_ == -1) - return sequence_number; - - uint16_t cropped_last = static_cast(last_seq_); - int64_t delta = sequence_number - cropped_last; - if (IsNewerSequenceNumber(sequence_number, cropped_last)) { - if (delta < 0) - delta += (1 << 16); // Wrap forwards. - } else if (delta > 0 && (last_seq_ + delta - (1 << 16)) >= 0) { - // If sequence_number is older but delta is positive, this is a backwards - // wrap-around. However, don't wrap backwards past 0 (unwrapped). - delta -= (1 << 16); - } - - return last_seq_ + delta; - } - - // Only update the internal state to the specified last (unwrapped) sequence. - void UpdateLast(int64_t last_sequence) { last_seq_ = last_sequence; } - - // Unwrap the sequence number and update the internal state. - int64_t Unwrap(uint16_t sequence_number) { - int64_t unwrapped = UnwrapWithoutUpdate(sequence_number); - UpdateLast(unwrapped); - return unwrapped; - } - - private: - int64_t last_seq_; -}; - -} // namespace webrtc - -#endif // WEBRTC_MODULES_INCLUDE_MODULE_COMMON_TYPES_H_ diff --git a/WebRtc.NET/include/webrtc/modules/media_file/media_file.h b/WebRtc.NET/include/webrtc/modules/media_file/media_file.h deleted file mode 100644 index f6924d6b..00000000 --- a/WebRtc.NET/include/webrtc/modules/media_file/media_file.h +++ /dev/null @@ -1,180 +0,0 @@ -/* - * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MODULES_MEDIA_FILE_MEDIA_FILE_H_ -#define WEBRTC_MODULES_MEDIA_FILE_MEDIA_FILE_H_ - -#include "webrtc/common_types.h" -#include "webrtc/modules/include/module.h" -#include "webrtc/modules/include/module_common_types.h" -#include "webrtc/modules/media_file/media_file_defines.h" -#include "webrtc/typedefs.h" - -namespace webrtc { -class MediaFile : public Module -{ -public: - // Factory method. Constructor disabled. id is the identifier for the - // MediaFile instance. - static MediaFile* CreateMediaFile(const int32_t id); - static void DestroyMediaFile(MediaFile* module); - - // Put 10-60ms of audio data from file into the audioBuffer depending on - // codec frame size. dataLengthInBytes is both an input and output - // parameter. As input parameter it indicates the size of audioBuffer. - // As output parameter it indicates the number of bytes written to - // audioBuffer. - // Note: This API only play mono audio but can be used on file containing - // audio with more channels (in which case the audio will be converted to - // mono). - virtual int32_t PlayoutAudioData( - int8_t* audioBuffer, - size_t& dataLengthInBytes) = 0; - - // Put 10-60ms, depending on codec frame size, of audio data from file into - // audioBufferLeft and audioBufferRight. The buffers contain the left and - // right channel of played out stereo audio. - // dataLengthInBytes is both an input and output parameter. As input - // parameter it indicates the size of both audioBufferLeft and - // audioBufferRight. As output parameter it indicates the number of bytes - // written to both audio buffers. - // Note: This API can only be successfully called for WAV files with stereo - // audio. - virtual int32_t PlayoutStereoData( - int8_t* audioBufferLeft, - int8_t* audioBufferRight, - size_t& dataLengthInBytes) = 0; - - // Open the file specified by fileName (relative path is allowed) for - // reading. FileCallback::PlayNotification(..) will be called after - // notificationTimeMs of the file has been played if notificationTimeMs is - // greater than zero. If loop is true the file will be played until - // StopPlaying() is called. When end of file is reached the file is read - // from the start. format specifies the type of file fileName refers to. - // codecInst specifies the encoding of the audio data. Note that - // file formats that contain this information (like WAV files) don't need to - // provide a non-NULL codecInst. startPointMs and stopPointMs, unless zero, - // specify what part of the file should be read. From startPointMs ms to - // stopPointMs ms. - // Note: codecInst.channels should be set to 2 for stereo (and 1 for - // mono). Stereo audio is only supported for WAV files. - virtual int32_t StartPlayingAudioFile( - const char* fileName, - const uint32_t notificationTimeMs = 0, - const bool loop = false, - const FileFormats format = kFileFormatPcm16kHzFile, - const CodecInst* codecInst = NULL, - const uint32_t startPointMs = 0, - const uint32_t stopPointMs = 0) = 0; - - // Prepare for playing audio from stream. - // FileCallback::PlayNotification(..) will be called after - // notificationTimeMs of the file has been played if notificationTimeMs is - // greater than zero. format specifies the type of file fileName refers to. - // codecInst specifies the encoding of the audio data. Note that - // file formats that contain this information (like WAV files) don't need to - // provide a non-NULL codecInst. startPointMs and stopPointMs, unless zero, - // specify what part of the file should be read. From startPointMs ms to - // stopPointMs ms. - // Note: codecInst.channels should be set to 2 for stereo (and 1 for - // mono). Stereo audio is only supported for WAV files. - virtual int32_t StartPlayingAudioStream( - InStream& stream, - const uint32_t notificationTimeMs = 0, - const FileFormats format = kFileFormatPcm16kHzFile, - const CodecInst* codecInst = NULL, - const uint32_t startPointMs = 0, - const uint32_t stopPointMs = 0) = 0; - - // Stop playing from file or stream. - virtual int32_t StopPlaying() = 0; - - // Return true if playing. - virtual bool IsPlaying() = 0; - - - // Set durationMs to the number of ms that has been played from file. - virtual int32_t PlayoutPositionMs( - uint32_t& durationMs) const = 0; - - // Write one audio frame, i.e. the bufferLength first bytes of audioBuffer, - // to file. The audio frame size is determined by the codecInst.pacsize - // parameter of the last sucessfull StartRecordingAudioFile(..) call. - // Note: bufferLength must be exactly one frame. - virtual int32_t IncomingAudioData( - const int8_t* audioBuffer, - const size_t bufferLength) = 0; - - // Open/creates file specified by fileName for writing (relative path is - // allowed). FileCallback::RecordNotification(..) will be called after - // notificationTimeMs of audio data has been recorded if - // notificationTimeMs is greater than zero. - // format specifies the type of file that should be created/opened. - // codecInst specifies the encoding of the audio data. maxSizeBytes - // specifies the number of bytes allowed to be written to file if it is - // greater than zero. - // Note: codecInst.channels should be set to 2 for stereo (and 1 for - // mono). Stereo is only supported for WAV files. - virtual int32_t StartRecordingAudioFile( - const char* fileName, - const FileFormats format, - const CodecInst& codecInst, - const uint32_t notificationTimeMs = 0, - const uint32_t maxSizeBytes = 0) = 0; - - // Prepare for recording audio to stream. - // FileCallback::RecordNotification(..) will be called after - // notificationTimeMs of audio data has been recorded if - // notificationTimeMs is greater than zero. - // format specifies the type of file that stream should correspond to. - // codecInst specifies the encoding of the audio data. - // Note: codecInst.channels should be set to 2 for stereo (and 1 for - // mono). Stereo is only supported for WAV files. - virtual int32_t StartRecordingAudioStream( - OutStream& stream, - const FileFormats format, - const CodecInst& codecInst, - const uint32_t notificationTimeMs = 0) = 0; - - // Stop recording to file or stream. - virtual int32_t StopRecording() = 0; - - // Return true if recording. - virtual bool IsRecording() = 0; - - // Set durationMs to the number of ms that has been recorded to file. - virtual int32_t RecordDurationMs(uint32_t& durationMs) = 0; - - // Return true if recording or playing is stereo. - virtual bool IsStereo() = 0; - - // Register callback to receive media file related notifications. Disables - // callbacks if callback is NULL. - virtual int32_t SetModuleFileCallback(FileCallback* callback) = 0; - - // Set durationMs to the size of the file (in ms) specified by fileName. - // format specifies the type of file fileName refers to. freqInHz specifies - // the sampling frequency of the file. - virtual int32_t FileDurationMs( - const char* fileName, - uint32_t& durationMs, - const FileFormats format, - const uint32_t freqInHz = 16000) = 0; - - // Update codecInst according to the current audio codec being used for - // reading or writing. - virtual int32_t codec_info(CodecInst& codecInst) const = 0; - -protected: - MediaFile() {} - virtual ~MediaFile() {} -}; -} // namespace webrtc -#endif // WEBRTC_MODULES_MEDIA_FILE_MEDIA_FILE_H_ diff --git a/WebRtc.NET/include/webrtc/modules/media_file/media_file_defines.h b/WebRtc.NET/include/webrtc/modules/media_file/media_file_defines.h deleted file mode 100644 index 3113620e..00000000 --- a/WebRtc.NET/include/webrtc/modules/media_file/media_file_defines.h +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MODULES_MEDIA_FILE_MEDIA_FILE_DEFINES_H_ -#define WEBRTC_MODULES_MEDIA_FILE_MEDIA_FILE_DEFINES_H_ - -#include "webrtc/modules/include/module_common_types.h" -#include "webrtc/typedefs.h" - -namespace webrtc { -// Callback class for the MediaFile class. -class FileCallback -{ -public: - virtual ~FileCallback(){} - - // This function is called by MediaFile when a file has been playing for - // durationMs ms. id is the identifier for the MediaFile instance calling - // the callback. - virtual void PlayNotification(const int32_t id, - const uint32_t durationMs) = 0; - - // This function is called by MediaFile when a file has been recording for - // durationMs ms. id is the identifier for the MediaFile instance calling - // the callback. - virtual void RecordNotification(const int32_t id, - const uint32_t durationMs) = 0; - - // This function is called by MediaFile when a file has been stopped - // playing. id is the identifier for the MediaFile instance calling the - // callback. - virtual void PlayFileEnded(const int32_t id) = 0; - - // This function is called by MediaFile when a file has been stopped - // recording. id is the identifier for the MediaFile instance calling the - // callback. - virtual void RecordFileEnded(const int32_t id) = 0; - -protected: - FileCallback() {} -}; -} // namespace webrtc -#endif // WEBRTC_MODULES_MEDIA_FILE_MEDIA_FILE_DEFINES_H_ diff --git a/WebRtc.NET/include/webrtc/modules/media_file/media_file_impl.h b/WebRtc.NET/include/webrtc/modules/media_file/media_file_impl.h deleted file mode 100644 index 677098e8..00000000 --- a/WebRtc.NET/include/webrtc/modules/media_file/media_file_impl.h +++ /dev/null @@ -1,148 +0,0 @@ -/* - * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MODULES_MEDIA_FILE_MEDIA_FILE_IMPL_H_ -#define WEBRTC_MODULES_MEDIA_FILE_MEDIA_FILE_IMPL_H_ - -#include "webrtc/common_types.h" -#include "webrtc/modules/include/module_common_types.h" -#include "webrtc/modules/media_file/media_file.h" -#include "webrtc/modules/media_file/media_file_defines.h" -#include "webrtc/modules/media_file/media_file_utility.h" -#include "webrtc/system_wrappers/include/critical_section_wrapper.h" - -namespace webrtc { -class MediaFileImpl : public MediaFile -{ - -public: - MediaFileImpl(const int32_t id); - ~MediaFileImpl(); - - void Process() override; - int64_t TimeUntilNextProcess() override; - - // MediaFile functions - int32_t PlayoutAudioData(int8_t* audioBuffer, - size_t& dataLengthInBytes) override; - - int32_t PlayoutStereoData(int8_t* audioBufferLeft, - int8_t* audioBufferRight, - size_t& dataLengthInBytes) override; - - int32_t StartPlayingAudioFile( - const char* fileName, - const uint32_t notificationTimeMs = 0, - const bool loop = false, - const FileFormats format = kFileFormatPcm16kHzFile, - const CodecInst* codecInst = NULL, - const uint32_t startPointMs = 0, - const uint32_t stopPointMs = 0) override; - - int32_t StartPlayingAudioStream( - InStream& stream, - const uint32_t notificationTimeMs = 0, - const FileFormats format = kFileFormatPcm16kHzFile, - const CodecInst* codecInst = NULL, - const uint32_t startPointMs = 0, - const uint32_t stopPointMs = 0) override; - - int32_t StopPlaying() override; - - bool IsPlaying() override; - - int32_t PlayoutPositionMs(uint32_t& positionMs) const override; - - int32_t IncomingAudioData(const int8_t* audioBuffer, - const size_t bufferLength) override; - - int32_t StartRecordingAudioFile(const char* fileName, - const FileFormats format, - const CodecInst& codecInst, - const uint32_t notificationTimeMs = 0, - const uint32_t maxSizeBytes = 0) override; - - int32_t StartRecordingAudioStream( - OutStream& stream, - const FileFormats format, - const CodecInst& codecInst, - const uint32_t notificationTimeMs = 0) override; - - int32_t StopRecording() override; - - bool IsRecording() override; - - int32_t RecordDurationMs(uint32_t& durationMs) override; - - bool IsStereo() override; - - int32_t SetModuleFileCallback(FileCallback* callback) override; - - int32_t FileDurationMs(const char* fileName, - uint32_t& durationMs, - const FileFormats format, - const uint32_t freqInHz = 16000) override; - - int32_t codec_info(CodecInst& codecInst) const override; - -private: - // Returns true if the combination of format and codecInst is valid. - static bool ValidFileFormat(const FileFormats format, - const CodecInst* codecInst); - - - // Returns true if the filename is valid - static bool ValidFileName(const char* fileName); - - // Returns true if the combination of startPointMs and stopPointMs is valid. - static bool ValidFilePositions(const uint32_t startPointMs, - const uint32_t stopPointMs); - - // Returns true if frequencyInHz is a supported frequency. - static bool ValidFrequency(const uint32_t frequencyInHz); - - void HandlePlayCallbacks(int32_t bytesRead); - - int32_t StartPlayingStream( - InStream& stream, - bool loop, - const uint32_t notificationTimeMs, - const FileFormats format, - const CodecInst* codecInst, - const uint32_t startPointMs, - const uint32_t stopPointMs); - - int32_t _id; - CriticalSectionWrapper* _crit; - CriticalSectionWrapper* _callbackCrit; - - ModuleFileUtility* _ptrFileUtilityObj; - CodecInst codec_info_; - - InStream* _ptrInStream; - OutStream* _ptrOutStream; - - FileFormats _fileFormat; - uint32_t _recordDurationMs; - uint32_t _playoutPositionMs; - uint32_t _notificationMs; - - bool _playingActive; - bool _recordingActive; - bool _isStereo; - bool _openFile; - - char _fileName[512]; - - FileCallback* _ptrCallback; -}; -} // namespace webrtc - -#endif // WEBRTC_MODULES_MEDIA_FILE_MEDIA_FILE_IMPL_H_ diff --git a/WebRtc.NET/include/webrtc/modules/media_file/media_file_utility.h b/WebRtc.NET/include/webrtc/modules/media_file/media_file_utility.h deleted file mode 100644 index bc2fa5a2..00000000 --- a/WebRtc.NET/include/webrtc/modules/media_file/media_file_utility.h +++ /dev/null @@ -1,284 +0,0 @@ -/* - * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -// Note: the class cannot be used for reading and writing at the same time. -#ifndef WEBRTC_MODULES_MEDIA_FILE_MEDIA_FILE_UTILITY_H_ -#define WEBRTC_MODULES_MEDIA_FILE_MEDIA_FILE_UTILITY_H_ - -#include - -#include "webrtc/common_types.h" -#include "webrtc/modules/media_file/media_file_defines.h" - -namespace webrtc { -class InStream; -class OutStream; - -class ModuleFileUtility -{ -public: - - ModuleFileUtility(const int32_t id); - ~ModuleFileUtility(); - - // Prepare for playing audio from stream. - // startPointMs and stopPointMs, unless zero, specify what part of the file - // should be read. From startPointMs ms to stopPointMs ms. - int32_t InitWavReading(InStream& stream, - const uint32_t startPointMs = 0, - const uint32_t stopPointMs = 0); - - // Put 10-60ms of audio data from stream into the audioBuffer depending on - // codec frame size. dataLengthInBytes indicates the size of audioBuffer. - // The return value is the number of bytes written to audioBuffer. - // Note: This API only play mono audio but can be used on file containing - // audio with more channels (in which case the audio will be converted to - // mono). - int32_t ReadWavDataAsMono(InStream& stream, int8_t* audioBuffer, - const size_t dataLengthInBytes); - - // Put 10-60ms, depending on codec frame size, of audio data from file into - // audioBufferLeft and audioBufferRight. The buffers contain the left and - // right channel of played out stereo audio. - // dataLengthInBytes indicates the size of both audioBufferLeft and - // audioBufferRight. - // The return value is the number of bytes read for each buffer. - // Note: This API can only be successfully called for WAV files with stereo - // audio. - int32_t ReadWavDataAsStereo(InStream& wav, - int8_t* audioBufferLeft, - int8_t* audioBufferRight, - const size_t bufferLength); - - // Prepare for recording audio to stream. - // codecInst specifies the encoding of the audio data. - // Note: codecInst.channels should be set to 2 for stereo (and 1 for - // mono). Stereo is only supported for WAV files. - int32_t InitWavWriting(OutStream& stream, const CodecInst& codecInst); - - // Write one audio frame, i.e. the bufferLength first bytes of audioBuffer, - // to file. The audio frame size is determined by the codecInst.pacsize - // parameter of the last sucessfull StartRecordingAudioFile(..) call. - // The return value is the number of bytes written to audioBuffer. - int32_t WriteWavData(OutStream& stream, - const int8_t* audioBuffer, - const size_t bufferLength); - - // Finalizes the WAV header so that it is correct if nothing more will be - // written to stream. - // Note: this API must be called before closing stream to ensure that the - // WAVE header is updated with the file size. Don't call this API - // if more samples are to be written to stream. - int32_t UpdateWavHeader(OutStream& stream); - - // Prepare for playing audio from stream. - // startPointMs and stopPointMs, unless zero, specify what part of the file - // should be read. From startPointMs ms to stopPointMs ms. - // freqInHz is the PCM sampling frequency. - // NOTE, allowed frequencies are 8000, 16000 and 32000 (Hz) - int32_t InitPCMReading(InStream& stream, - const uint32_t startPointMs = 0, - const uint32_t stopPointMs = 0, - const uint32_t freqInHz = 16000); - - // Put 10-60ms of audio data from stream into the audioBuffer depending on - // codec frame size. dataLengthInBytes indicates the size of audioBuffer. - // The return value is the number of bytes written to audioBuffer. - int32_t ReadPCMData(InStream& stream, int8_t* audioBuffer, - const size_t dataLengthInBytes); - - // Prepare for recording audio to stream. - // freqInHz is the PCM sampling frequency. - // NOTE, allowed frequencies are 8000, 16000 and 32000 (Hz) - int32_t InitPCMWriting(OutStream& stream, const uint32_t freqInHz = 16000); - - // Write one 10ms audio frame, i.e. the bufferLength first bytes of - // audioBuffer, to file. The audio frame size is determined by the freqInHz - // parameter of the last sucessfull InitPCMWriting(..) call. - // The return value is the number of bytes written to audioBuffer. - int32_t WritePCMData(OutStream& stream, - const int8_t* audioBuffer, - size_t bufferLength); - - // Prepare for playing audio from stream. - // startPointMs and stopPointMs, unless zero, specify what part of the file - // should be read. From startPointMs ms to stopPointMs ms. - int32_t InitCompressedReading(InStream& stream, - const uint32_t startPointMs = 0, - const uint32_t stopPointMs = 0); - - // Put 10-60ms of audio data from stream into the audioBuffer depending on - // codec frame size. dataLengthInBytes indicates the size of audioBuffer. - // The return value is the number of bytes written to audioBuffer. - int32_t ReadCompressedData(InStream& stream, - int8_t* audioBuffer, - const size_t dataLengthInBytes); - - // Prepare for recording audio to stream. - // codecInst specifies the encoding of the audio data. - int32_t InitCompressedWriting(OutStream& stream, - const CodecInst& codecInst); - - // Write one audio frame, i.e. the bufferLength first bytes of audioBuffer, - // to file. The audio frame size is determined by the codecInst.pacsize - // parameter of the last sucessfull InitCompressedWriting(..) call. - // The return value is the number of bytes written to stream. - // Note: bufferLength must be exactly one frame. - int32_t WriteCompressedData(OutStream& stream, - const int8_t* audioBuffer, - const size_t bufferLength); - - // Prepare for playing audio from stream. - // codecInst specifies the encoding of the audio data. - int32_t InitPreEncodedReading(InStream& stream, - const CodecInst& codecInst); - - // Put 10-60ms of audio data from stream into the audioBuffer depending on - // codec frame size. dataLengthInBytes indicates the size of audioBuffer. - // The return value is the number of bytes written to audioBuffer. - int32_t ReadPreEncodedData(InStream& stream, - int8_t* audioBuffer, - const size_t dataLengthInBytes); - - // Prepare for recording audio to stream. - // codecInst specifies the encoding of the audio data. - int32_t InitPreEncodedWriting(OutStream& stream, - const CodecInst& codecInst); - - // Write one audio frame, i.e. the bufferLength first bytes of audioBuffer, - // to stream. The audio frame size is determined by the codecInst.pacsize - // parameter of the last sucessfull InitPreEncodedWriting(..) call. - // The return value is the number of bytes written to stream. - // Note: bufferLength must be exactly one frame. - int32_t WritePreEncodedData(OutStream& stream, - const int8_t* inData, - const size_t dataLengthInBytes); - - // Set durationMs to the size of the file (in ms) specified by fileName. - // freqInHz specifies the sampling frequency of the file. - int32_t FileDurationMs(const char* fileName, - const FileFormats fileFormat, - const uint32_t freqInHz = 16000); - - // Return the number of ms that have been played so far. - uint32_t PlayoutPositionMs(); - - // Update codecInst according to the current audio codec being used for - // reading or writing. - int32_t codec_info(CodecInst& codecInst); - -private: - // Biggest WAV frame supported is 10 ms at 48kHz of 2 channel, 16 bit audio. - static const size_t WAV_MAX_BUFFER_SIZE = 480 * 2 * 2; - - - int32_t InitWavCodec(uint32_t samplesPerSec, - size_t channels, - uint32_t bitsPerSample, - uint32_t formatTag); - - // Parse the WAV header in stream. - int32_t ReadWavHeader(InStream& stream); - - // Update the WAV header. freqInHz, bytesPerSample, channels, format, - // lengthInBytes specify characterists of the audio data. - // freqInHz is the sampling frequency. bytesPerSample is the sample size in - // bytes. channels is the number of channels, e.g. 1 is mono and 2 is - // stereo. format is the encode format (e.g. PCMU, PCMA, PCM etc). - // lengthInBytes is the number of bytes the audio samples are using up. - int32_t WriteWavHeader(OutStream& stream, - uint32_t freqInHz, - size_t bytesPerSample, - size_t channels, - uint32_t format, - size_t lengthInBytes); - - // Put dataLengthInBytes of audio data from stream into the audioBuffer. - // The return value is the number of bytes written to audioBuffer. - int32_t ReadWavData(InStream& stream, uint8_t* audioBuffer, - size_t dataLengthInBytes); - - // Update the current audio codec being used for reading or writing - // according to codecInst. - int32_t set_codec_info(const CodecInst& codecInst); - - struct WAVE_FMTINFO_header - { - int16_t formatTag; - int16_t nChannels; - int32_t nSamplesPerSec; - int32_t nAvgBytesPerSec; - int16_t nBlockAlign; - int16_t nBitsPerSample; - }; - // Identifiers for preencoded files. - enum MediaFileUtility_CodecType - { - kCodecNoCodec = 0, - kCodecIsac, - kCodecIsacSwb, - kCodecIsacLc, - kCodecL16_8Khz, - kCodecL16_16kHz, - kCodecL16_32Khz, - kCodecPcmu, - kCodecPcma, - kCodecIlbc20Ms, - kCodecIlbc30Ms, - kCodecG722, - kCodecG722_1_32Kbps, - kCodecG722_1_24Kbps, - kCodecG722_1_16Kbps, - kCodecG722_1c_48, - kCodecG722_1c_32, - kCodecG722_1c_24, - kCodecAmr, - kCodecAmrWb, - kCodecG729, - kCodecG729_1, - kCodecG726_40, - kCodecG726_32, - kCodecG726_24, - kCodecG726_16, - kCodecSpeex8Khz, - kCodecSpeex16Khz - }; - - // TODO (hellner): why store multiple formats. Just store either codec_info_ - // or _wavFormatObj and supply conversion functions. - WAVE_FMTINFO_header _wavFormatObj; - size_t _dataSize; // Chunk size if reading a WAV file - // Number of bytes to read. I.e. frame size in bytes. May be multiple - // chunks if reading WAV. - size_t _readSizeBytes; - - int32_t _id; - - uint32_t _stopPointInMs; - uint32_t _startPointInMs; - uint32_t _playoutPositionMs; - size_t _bytesWritten; - - CodecInst codec_info_; - MediaFileUtility_CodecType _codecId; - - // The amount of bytes, on average, used for one audio sample. - size_t _bytesPerSample; - size_t _readPos; - - // Only reading or writing can be enabled, not both. - bool _reading; - bool _writing; - - // Scratch buffer used for turning stereo audio to mono. - uint8_t _tempData[WAV_MAX_BUFFER_SIZE]; -}; -} // namespace webrtc -#endif // WEBRTC_MODULES_MEDIA_FILE_MEDIA_FILE_UTILITY_H_ diff --git a/WebRtc.NET/include/webrtc/modules/pacing/alr_detector.h b/WebRtc.NET/include/webrtc/modules/pacing/alr_detector.h deleted file mode 100644 index d8870ff0..00000000 --- a/WebRtc.NET/include/webrtc/modules/pacing/alr_detector.h +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MODULES_PACING_ALR_DETECTOR_H_ -#define WEBRTC_MODULES_PACING_ALR_DETECTOR_H_ - -#include "webrtc/base/rate_statistics.h" -#include "webrtc/common_types.h" -#include "webrtc/modules/pacing/paced_sender.h" -#include "webrtc/typedefs.h" - -namespace webrtc { - -// Application limited region detector is a class that utilizes signals of -// elapsed time and bytes sent to estimate whether network traffic is -// currently limited by the application's ability to generate traffic. -// -// AlrDetector provides a signal that can be utilized to adjust -// estimate bandwidth. -// Note: This class is not thread-safe. -class AlrDetector { - public: - AlrDetector(); - ~AlrDetector(); - - void OnBytesSent(size_t bytes_sent, int64_t now_ms); - - // Set current estimated bandwidth. - void SetEstimatedBitrate(int bitrate_bps); - - // Returns time in milliseconds when the current application-limited region - // started or empty result if the sender is currently not application-limited. - rtc::Optional GetApplicationLimitedRegionStartTime() const; - - private: - RateStatistics rate_; - int estimated_bitrate_bps_ = 0; - - // Non-empty in ALR state. - rtc::Optional alr_started_time_ms_; -}; - -} // namespace webrtc - -#endif // WEBRTC_MODULES_PACING_ALR_DETECTOR_H_ diff --git a/WebRtc.NET/include/webrtc/modules/pacing/mock/mock_paced_sender.h b/WebRtc.NET/include/webrtc/modules/pacing/mock/mock_paced_sender.h deleted file mode 100644 index 1eee3f9f..00000000 --- a/WebRtc.NET/include/webrtc/modules/pacing/mock/mock_paced_sender.h +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MODULES_PACING_MOCK_MOCK_PACED_SENDER_H_ -#define WEBRTC_MODULES_PACING_MOCK_MOCK_PACED_SENDER_H_ - -#include - -#include "webrtc/modules/pacing/paced_sender.h" -#include "webrtc/system_wrappers/include/clock.h" -#include "webrtc/test/gmock.h" - -namespace webrtc { - -class MockPacedSender : public PacedSender { - public: - MockPacedSender() : PacedSender(Clock::GetRealTimeClock(), nullptr) {} - MOCK_METHOD6(SendPacket, bool(Priority priority, - uint32_t ssrc, - uint16_t sequence_number, - int64_t capture_time_ms, - size_t bytes, - bool retransmission)); - MOCK_METHOD1(CreateProbeCluster, void(int)); - MOCK_METHOD1(SetEstimatedBitrate, void(uint32_t)); - MOCK_CONST_METHOD0(QueueInMs, int64_t()); - MOCK_CONST_METHOD0(QueueInPackets, int()); - MOCK_CONST_METHOD0(ExpectedQueueTimeMs, int64_t()); - MOCK_CONST_METHOD0(GetApplicationLimitedRegionStartTime, - rtc::Optional()); -}; - -} // namespace webrtc - -#endif // WEBRTC_MODULES_PACING_MOCK_MOCK_PACED_SENDER_H_ diff --git a/WebRtc.NET/include/webrtc/modules/pacing/paced_sender.h b/WebRtc.NET/include/webrtc/modules/pacing/paced_sender.h deleted file mode 100644 index 50ebb14c..00000000 --- a/WebRtc.NET/include/webrtc/modules/pacing/paced_sender.h +++ /dev/null @@ -1,185 +0,0 @@ -/* - * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MODULES_PACING_PACED_SENDER_H_ -#define WEBRTC_MODULES_PACING_PACED_SENDER_H_ - -#include -#include -#include - -#include "webrtc/base/optional.h" -#include "webrtc/base/thread_annotations.h" -#include "webrtc/modules/include/module.h" -#include "webrtc/modules/rtp_rtcp/include/rtp_rtcp_defines.h" -#include "webrtc/typedefs.h" - -namespace webrtc { -class AlrDetector; -class BitrateProber; -class Clock; -class CriticalSectionWrapper; -class ProbeClusterCreatedObserver; - -namespace paced_sender { -class IntervalBudget; -struct Packet; -class PacketQueue; -} // namespace paced_sender - -class PacedSender : public Module, public RtpPacketSender { - public: - class PacketSender { - public: - // Note: packets sent as a result of a callback should not pass by this - // module again. - // Called when it's time to send a queued packet. - // Returns false if packet cannot be sent. - virtual bool TimeToSendPacket(uint32_t ssrc, - uint16_t sequence_number, - int64_t capture_time_ms, - bool retransmission, - int probe_cluster_id) = 0; - // Called when it's a good time to send a padding data. - // Returns the number of bytes sent. - virtual size_t TimeToSendPadding(size_t bytes, int probe_cluster_id) = 0; - - protected: - virtual ~PacketSender() {} - }; - - // Expected max pacer delay in ms. If ExpectedQueueTimeMs() is higher than - // this value, the packet producers should wait (eg drop frames rather than - // encoding them). Bitrate sent may temporarily exceed target set by - // UpdateBitrate() so that this limit will be upheld. - static const int64_t kMaxQueueLengthMs; - // Pacing-rate relative to our target send rate. - // Multiplicative factor that is applied to the target bitrate to calculate - // the number of bytes that can be transmitted per interval. - // Increasing this factor will result in lower delays in cases of bitrate - // overshoots from the encoder. - static const float kDefaultPaceMultiplier; - - static const size_t kMinProbePacketSize = 200; - - PacedSender(Clock* clock, PacketSender* packet_sender); - - virtual ~PacedSender(); - - virtual void CreateProbeCluster(int bitrate_bps); - - // Temporarily pause all sending. - void Pause(); - - // Resume sending packets. - void Resume(); - - // Enable bitrate probing. Enabled by default, mostly here to simplify - // testing. Must be called before any packets are being sent to have an - // effect. - void SetProbingEnabled(bool enabled); - - // Sets the estimated capacity of the network. Must be called once before - // packets can be sent. - // |bitrate_bps| is our estimate of what we are allowed to send on average. - // We will pace out bursts of packets at a bitrate of - // |bitrate_bps| * kDefaultPaceMultiplier. - virtual void SetEstimatedBitrate(uint32_t bitrate_bps); - - // Sets the minimum send bitrate and maximum padding bitrate requested by send - // streams. - // |min_send_bitrate_bps| might be higher that the estimated available network - // bitrate and if so, the pacer will send with |min_send_bitrate_bps|. - // |max_padding_bitrate_bps| might be higher than the estimate available - // network bitrate and if so, the pacer will send padding packets to reach - // the min of the estimated available bitrate and |max_padding_bitrate_bps|. - void SetSendBitrateLimits(int min_send_bitrate_bps, - int max_padding_bitrate_bps); - - // Returns true if we send the packet now, else it will add the packet - // information to the queue and call TimeToSendPacket when it's time to send. - void InsertPacket(RtpPacketSender::Priority priority, - uint32_t ssrc, - uint16_t sequence_number, - int64_t capture_time_ms, - size_t bytes, - bool retransmission) override; - - // Returns the time since the oldest queued packet was enqueued. - virtual int64_t QueueInMs() const; - - virtual size_t QueueSizePackets() const; - - // Returns the number of milliseconds it will take to send the current - // packets in the queue, given the current size and bitrate, ignoring prio. - virtual int64_t ExpectedQueueTimeMs() const; - - // Returns time in milliseconds when the current application-limited region - // started or empty result if the sender is currently not application-limited. - // - // Application Limited Region (ALR) refers to operating in a state where the - // traffic on network is limited due to application not having enough - // traffic to meet the current channel capacity. - virtual rtc::Optional GetApplicationLimitedRegionStartTime() const; - - // Returns the average time since being enqueued, in milliseconds, for all - // packets currently in the pacer queue, or 0 if queue is empty. - virtual int64_t AverageQueueTimeMs(); - - // Returns the number of milliseconds until the module want a worker thread - // to call Process. - int64_t TimeUntilNextProcess() override; - - // Process any pending packets in the queue(s). - void Process() override; - - private: - // Updates the number of bytes that can be sent for the next time interval. - void UpdateBudgetWithElapsedTime(int64_t delta_time_in_ms) - EXCLUSIVE_LOCKS_REQUIRED(critsect_); - void UpdateBudgetWithBytesSent(size_t bytes) - EXCLUSIVE_LOCKS_REQUIRED(critsect_); - - bool SendPacket(const paced_sender::Packet& packet, int probe_cluster_id) - EXCLUSIVE_LOCKS_REQUIRED(critsect_); - size_t SendPadding(size_t padding_needed, int probe_cluster_id) - EXCLUSIVE_LOCKS_REQUIRED(critsect_); - - Clock* const clock_; - PacketSender* const packet_sender_; - std::unique_ptr alr_detector_ GUARDED_BY(critsect_); - - std::unique_ptr critsect_; - bool paused_ GUARDED_BY(critsect_); - // This is the media budget, keeping track of how many bits of media - // we can pace out during the current interval. - std::unique_ptr media_budget_ - GUARDED_BY(critsect_); - // This is the padding budget, keeping track of how many bits of padding we're - // allowed to send out during the current interval. This budget will be - // utilized when there's no media to send. - std::unique_ptr padding_budget_ - GUARDED_BY(critsect_); - - std::unique_ptr prober_ GUARDED_BY(critsect_); - // Actual configured bitrates (media_budget_ may temporarily be higher in - // order to meet pace time constraint). - uint32_t estimated_bitrate_bps_ GUARDED_BY(critsect_); - uint32_t min_send_bitrate_kbps_ GUARDED_BY(critsect_); - uint32_t max_padding_bitrate_kbps_ GUARDED_BY(critsect_); - uint32_t pacing_bitrate_kbps_ GUARDED_BY(critsect_); - - int64_t time_last_update_us_ GUARDED_BY(critsect_); - - std::unique_ptr packets_ GUARDED_BY(critsect_); - uint64_t packet_counter_; -}; -} // namespace webrtc -#endif // WEBRTC_MODULES_PACING_PACED_SENDER_H_ diff --git a/WebRtc.NET/include/webrtc/modules/pacing/packet_router.h b/WebRtc.NET/include/webrtc/modules/pacing/packet_router.h deleted file mode 100644 index 95d630ac..00000000 --- a/WebRtc.NET/include/webrtc/modules/pacing/packet_router.h +++ /dev/null @@ -1,67 +0,0 @@ -/* - * Copyright (c) 2015 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MODULES_PACING_PACKET_ROUTER_H_ -#define WEBRTC_MODULES_PACING_PACKET_ROUTER_H_ - -#include - -#include "webrtc/base/constructormagic.h" -#include "webrtc/base/criticalsection.h" -#include "webrtc/base/thread_annotations.h" -#include "webrtc/base/thread_checker.h" -#include "webrtc/common_types.h" -#include "webrtc/modules/pacing/paced_sender.h" -#include "webrtc/modules/rtp_rtcp/include/rtp_rtcp_defines.h" - -namespace webrtc { - -class RtpRtcp; -namespace rtcp { -class TransportFeedback; -} // namespace rtcp - -// PacketRouter routes outgoing data to the correct sending RTP module, based -// on the simulcast layer in RTPVideoHeader. -class PacketRouter : public PacedSender::PacketSender, - public TransportSequenceNumberAllocator { - public: - PacketRouter(); - virtual ~PacketRouter(); - - void AddRtpModule(RtpRtcp* rtp_module); - void RemoveRtpModule(RtpRtcp* rtp_module); - - // Implements PacedSender::Callback. - bool TimeToSendPacket(uint32_t ssrc, - uint16_t sequence_number, - int64_t capture_timestamp, - bool retransmission, - int probe_cluster_id) override; - - size_t TimeToSendPadding(size_t bytes, int probe_cluster_id) override; - - void SetTransportWideSequenceNumber(uint16_t sequence_number); - uint16_t AllocateSequenceNumber() override; - - // Send transport feedback packet to send-side. - virtual bool SendFeedback(rtcp::TransportFeedback* packet); - - private: - rtc::ThreadChecker pacer_thread_checker_; - rtc::CriticalSection modules_crit_; - std::list rtp_modules_ GUARDED_BY(modules_crit_); - - volatile int transport_seq_; - - RTC_DISALLOW_COPY_AND_ASSIGN(PacketRouter); -}; -} // namespace webrtc -#endif // WEBRTC_MODULES_PACING_PACKET_ROUTER_H_ diff --git a/WebRtc.NET/include/webrtc/modules/remote_bitrate_estimator/aimd_rate_control.h b/WebRtc.NET/include/webrtc/modules/remote_bitrate_estimator/aimd_rate_control.h deleted file mode 100644 index ddfa667a..00000000 --- a/WebRtc.NET/include/webrtc/modules/remote_bitrate_estimator/aimd_rate_control.h +++ /dev/null @@ -1,91 +0,0 @@ -/* - * Copyright (c) 2014 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MODULES_REMOTE_BITRATE_ESTIMATOR_AIMD_RATE_CONTROL_H_ -#define WEBRTC_MODULES_REMOTE_BITRATE_ESTIMATOR_AIMD_RATE_CONTROL_H_ - -#include "webrtc/base/constructormagic.h" -#include "webrtc/modules/remote_bitrate_estimator/include/bwe_defines.h" - -namespace webrtc { - -// A rate control implementation based on additive increases of -// bitrate when no over-use is detected and multiplicative decreases when -// over-uses are detected. When we think the available bandwidth has changes or -// is unknown, we will switch to a "slow-start mode" where we increase -// multiplicatively. -class AimdRateControl { - public: - AimdRateControl(); - virtual ~AimdRateControl() {} - - // Returns true if there is a valid estimate of the incoming bitrate, false - // otherwise. - bool ValidEstimate() const; - void SetMinBitrate(int min_bitrate_bps); - int64_t GetFeedbackInterval() const; - // Returns true if the bitrate estimate hasn't been changed for more than - // an RTT, or if the incoming_bitrate is less than half of the current - // estimate. Should be used to decide if we should reduce the rate further - // when over-using. - bool TimeToReduceFurther(int64_t time_now, - uint32_t incoming_bitrate_bps) const; - uint32_t LatestEstimate() const; - uint32_t UpdateBandwidthEstimate(int64_t now_ms); - void SetRtt(int64_t rtt); - void Update(const RateControlInput* input, int64_t now_ms); - void SetEstimate(int bitrate_bps, int64_t now_ms); - - // Returns the increase rate which is used when used bandwidth is near the - // maximal available bandwidth. - virtual int GetNearMaxIncreaseRateBps() const; - - virtual rtc::Optional GetLastBitrateDecreaseBps() const; - - private: - // Update the target bitrate according based on, among other things, - // the current rate control state, the current target bitrate and the incoming - // bitrate. When in the "increase" state the bitrate will be increased either - // additively or multiplicatively depending on the rate control region. When - // in the "decrease" state the bitrate will be decreased to slightly below the - // incoming bitrate. When in the "hold" state the bitrate will be kept - // constant to allow built up queues to drain. - uint32_t ChangeBitrate(uint32_t current_bit_rate, - uint32_t incoming_bit_rate, - int64_t now_ms); - uint32_t MultiplicativeRateIncrease(int64_t now_ms, int64_t last_ms, - uint32_t current_bitrate_bps) const; - uint32_t AdditiveRateIncrease(int64_t now_ms, int64_t last_ms) const; - void UpdateChangePeriod(int64_t now_ms); - void UpdateMaxBitRateEstimate(float incoming_bit_rate_kbps); - void ChangeState(const RateControlInput& input, int64_t now_ms); - void ChangeState(RateControlState new_state); - void ChangeRegion(RateControlRegion region); - - uint32_t min_configured_bitrate_bps_; - uint32_t max_configured_bitrate_bps_; - uint32_t current_bitrate_bps_; - float avg_max_bitrate_kbps_; - float var_max_bitrate_kbps_; - RateControlState rate_control_state_; - RateControlRegion rate_control_region_; - int64_t time_last_bitrate_change_; - RateControlInput current_input_; - bool updated_; - int64_t time_first_incoming_estimate_; - bool bitrate_is_initialized_; - float beta_; - int64_t rtt_; - bool in_experiment_; - rtc::Optional last_decrease_; -}; -} // namespace webrtc - -#endif // WEBRTC_MODULES_REMOTE_BITRATE_ESTIMATOR_AIMD_RATE_CONTROL_H_ diff --git a/WebRtc.NET/include/webrtc/modules/remote_bitrate_estimator/include/bwe_defines.h b/WebRtc.NET/include/webrtc/modules/remote_bitrate_estimator/include/bwe_defines.h deleted file mode 100644 index 26bfb28c..00000000 --- a/WebRtc.NET/include/webrtc/modules/remote_bitrate_estimator/include/bwe_defines.h +++ /dev/null @@ -1,62 +0,0 @@ -/* - * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MODULES_REMOTE_BITRATE_ESTIMATOR_INCLUDE_BWE_DEFINES_H_ -#define WEBRTC_MODULES_REMOTE_BITRATE_ESTIMATOR_INCLUDE_BWE_DEFINES_H_ - -#include "webrtc/base/optional.h" -#include "webrtc/typedefs.h" - -#define BWE_MAX(a, b) ((a) > (b) ? (a) : (b)) -#define BWE_MIN(a, b) ((a) < (b) ? (a) : (b)) - -namespace webrtc { - -namespace congestion_controller { -int GetMinBitrateBps(); -} // namespace congestion_controller - -static const int64_t kBitrateWindowMs = 1000; - -extern const char* kBweTypeHistogram; - -enum BweNames { - kReceiverNoExtension = 0, - kReceiverTOffset = 1, - kReceiverAbsSendTime = 2, - kSendSideTransportSeqNum = 3, - kBweNamesMax = 4 -}; - -enum BandwidthUsage { - kBwNormal = 0, - kBwUnderusing = 1, - kBwOverusing = 2, -}; - -enum RateControlState { kRcHold, kRcIncrease, kRcDecrease }; - -enum RateControlRegion { kRcNearMax, kRcAboveMax, kRcMaxUnknown }; - -struct RateControlInput { - RateControlInput(BandwidthUsage bw_state, - const rtc::Optional& incoming_bitrate, - double noise_var) - : bw_state(bw_state), - incoming_bitrate(incoming_bitrate), - noise_var(noise_var) {} - - BandwidthUsage bw_state; - rtc::Optional incoming_bitrate; - double noise_var; -}; -} // namespace webrtc - -#endif // WEBRTC_MODULES_REMOTE_BITRATE_ESTIMATOR_INCLUDE_BWE_DEFINES_H_ diff --git a/WebRtc.NET/include/webrtc/modules/remote_bitrate_estimator/include/mock/mock_aimd_rate_control.h b/WebRtc.NET/include/webrtc/modules/remote_bitrate_estimator/include/mock/mock_aimd_rate_control.h deleted file mode 100644 index 822f91af..00000000 --- a/WebRtc.NET/include/webrtc/modules/remote_bitrate_estimator/include/mock/mock_aimd_rate_control.h +++ /dev/null @@ -1,27 +0,0 @@ -/* - * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MODULES_REMOTE_BITRATE_ESTIMATOR_INCLUDE_MOCK_MOCK_AIMD_RATE_CONTROL_H_ -#define WEBRTC_MODULES_REMOTE_BITRATE_ESTIMATOR_INCLUDE_MOCK_MOCK_AIMD_RATE_CONTROL_H_ - -#include "webrtc/modules/remote_bitrate_estimator/aimd_rate_control.h" -#include "webrtc/test/gmock.h" - -namespace webrtc { - -class MockAimdRateControl : public AimdRateControl { - public: - MOCK_CONST_METHOD0(GetNearMaxIncreaseRateBps, int()); - MOCK_CONST_METHOD0(GetLastBitrateDecreaseBps, rtc::Optional()); -}; - -} // namespace webrtc - -#endif // WEBRTC_MODULES_REMOTE_BITRATE_ESTIMATOR_INCLUDE_MOCK_MOCK_AIMD_RATE_CONTROL_H_ diff --git a/WebRtc.NET/include/webrtc/modules/remote_bitrate_estimator/include/mock/mock_remote_bitrate_estimator.h b/WebRtc.NET/include/webrtc/modules/remote_bitrate_estimator/include/mock/mock_remote_bitrate_estimator.h deleted file mode 100644 index b8cc8ef5..00000000 --- a/WebRtc.NET/include/webrtc/modules/remote_bitrate_estimator/include/mock/mock_remote_bitrate_estimator.h +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright (c) 2015 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MODULES_REMOTE_BITRATE_ESTIMATOR_INCLUDE_MOCK_MOCK_REMOTE_BITRATE_ESTIMATOR_H_ -#define WEBRTC_MODULES_REMOTE_BITRATE_ESTIMATOR_INCLUDE_MOCK_MOCK_REMOTE_BITRATE_ESTIMATOR_H_ - -#include - -#include "webrtc/modules/remote_bitrate_estimator/include/remote_bitrate_estimator.h" -#include "webrtc/test/gmock.h" - -namespace webrtc { - -class MockRemoteBitrateObserver : public RemoteBitrateObserver { - public: - MOCK_METHOD2(OnReceiveBitrateChanged, - void(const std::vector& ssrcs, uint32_t bitrate)); -}; - -class MockRemoteBitrateEstimator : public RemoteBitrateEstimator { - public: - MOCK_METHOD1(IncomingPacketFeedbackVector, - void(const std::vector&)); - MOCK_METHOD3(IncomingPacket, void(int64_t, size_t, const RTPHeader&)); - MOCK_METHOD1(RemoveStream, void(uint32_t)); - MOCK_CONST_METHOD2(LatestEstimate, bool(std::vector*, uint32_t*)); - - // From CallStatsObserver; - MOCK_METHOD2(OnRttUpdate, void(int64_t, int64_t)); - - // From Module. - MOCK_METHOD0(TimeUntilNextProcess, int64_t()); - MOCK_METHOD0(Process, void()); - MOCK_METHOD1(SetMinBitrate, void(int)); -}; - -} // namespace webrtc - -#endif // WEBRTC_MODULES_REMOTE_BITRATE_ESTIMATOR_INCLUDE_MOCK_MOCK_REMOTE_BITRATE_ESTIMATOR_H_ diff --git a/WebRtc.NET/include/webrtc/modules/remote_bitrate_estimator/include/mock/mock_remote_bitrate_observer.h b/WebRtc.NET/include/webrtc/modules/remote_bitrate_estimator/include/mock/mock_remote_bitrate_observer.h deleted file mode 100644 index c3fb6acc..00000000 --- a/WebRtc.NET/include/webrtc/modules/remote_bitrate_estimator/include/mock/mock_remote_bitrate_observer.h +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MODULES_REMOTE_BITRATE_ESTIMATOR_INCLUDE_MOCK_MOCK_REMOTE_BITRATE_OBSERVER_H_ -#define WEBRTC_MODULES_REMOTE_BITRATE_ESTIMATOR_INCLUDE_MOCK_MOCK_REMOTE_BITRATE_OBSERVER_H_ - -#include - -#include "webrtc/modules/remote_bitrate_estimator/include/remote_bitrate_estimator.h" -#include "webrtc/test/gmock.h" - -namespace webrtc { - -class MockRemoteBitrateObserver : public RemoteBitrateObserver { - public: - MOCK_METHOD2(OnReceiveBitrateChanged, - void(const std::vector& ssrcs, unsigned int bitrate)); -}; - -} // namespace webrtc - -#endif // WEBRTC_MODULES_REMOTE_BITRATE_ESTIMATOR_INCLUDE_MOCK_MOCK_REMOTE_BITRATE_OBSERVER_H_ diff --git a/WebRtc.NET/include/webrtc/modules/remote_bitrate_estimator/include/remote_bitrate_estimator.h b/WebRtc.NET/include/webrtc/modules/remote_bitrate_estimator/include/remote_bitrate_estimator.h deleted file mode 100644 index 29dd81bf..00000000 --- a/WebRtc.NET/include/webrtc/modules/remote_bitrate_estimator/include/remote_bitrate_estimator.h +++ /dev/null @@ -1,86 +0,0 @@ -/* - * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -// This class estimates the incoming available bandwidth. - -#ifndef WEBRTC_MODULES_REMOTE_BITRATE_ESTIMATOR_INCLUDE_REMOTE_BITRATE_ESTIMATOR_H_ -#define WEBRTC_MODULES_REMOTE_BITRATE_ESTIMATOR_INCLUDE_REMOTE_BITRATE_ESTIMATOR_H_ - -#include -#include - -#include "webrtc/common_types.h" -#include "webrtc/modules/include/module.h" -#include "webrtc/modules/include/module_common_types.h" -#include "webrtc/modules/rtp_rtcp/include/rtp_rtcp_defines.h" -#include "webrtc/typedefs.h" - -namespace webrtc { - -class Clock; - -// RemoteBitrateObserver is used to signal changes in bitrate estimates for -// the incoming streams. -class RemoteBitrateObserver { - public: - // Called when a receive channel group has a new bitrate estimate for the - // incoming streams. - virtual void OnReceiveBitrateChanged(const std::vector& ssrcs, - uint32_t bitrate) = 0; - virtual void OnProbeBitrate(uint32_t bitrate) {} - - virtual ~RemoteBitrateObserver() {} -}; - -// TODO(holmer): Remove when all implementations have been updated. -struct ReceiveBandwidthEstimatorStats {}; - -class RemoteBitrateEstimator : public CallStatsObserver, public Module { - public: - virtual ~RemoteBitrateEstimator() {} - - virtual void IncomingPacketFeedbackVector( - const std::vector& packet_feedback_vector) { - assert(false); - } - - // Called for each incoming packet. Updates the incoming payload bitrate - // estimate and the over-use detector. If an over-use is detected the - // remote bitrate estimate will be updated. Note that |payload_size| is the - // packet size excluding headers. - // Note that |arrival_time_ms| can be of an arbitrary time base. - virtual void IncomingPacket(int64_t arrival_time_ms, - size_t payload_size, - const RTPHeader& header) = 0; - - // Removes all data for |ssrc|. - virtual void RemoveStream(uint32_t ssrc) = 0; - - // Returns true if a valid estimate exists and sets |bitrate_bps| to the - // estimated payload bitrate in bits per second. |ssrcs| is the list of ssrcs - // currently being received and of which the bitrate estimate is based upon. - virtual bool LatestEstimate(std::vector* ssrcs, - uint32_t* bitrate_bps) const = 0; - - // TODO(holmer): Remove when all implementations have been updated. - virtual bool GetStats(ReceiveBandwidthEstimatorStats* output) const { - return false; - } - - virtual void SetMinBitrate(int min_bitrate_bps) = 0; - - protected: - static const int64_t kProcessIntervalMs = 500; - static const int64_t kStreamTimeOutMs = 2000; -}; - -} // namespace webrtc - -#endif // WEBRTC_MODULES_REMOTE_BITRATE_ESTIMATOR_INCLUDE_REMOTE_BITRATE_ESTIMATOR_H_ diff --git a/WebRtc.NET/include/webrtc/modules/remote_bitrate_estimator/include/send_time_history.h b/WebRtc.NET/include/webrtc/modules/remote_bitrate_estimator/include/send_time_history.h deleted file mode 100644 index c0cf1441..00000000 --- a/WebRtc.NET/include/webrtc/modules/remote_bitrate_estimator/include/send_time_history.h +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Copyright (c) 2015 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MODULES_REMOTE_BITRATE_ESTIMATOR_INCLUDE_SEND_TIME_HISTORY_H_ -#define WEBRTC_MODULES_REMOTE_BITRATE_ESTIMATOR_INCLUDE_SEND_TIME_HISTORY_H_ - -#include - -#include "webrtc/base/basictypes.h" -#include "webrtc/base/constructormagic.h" -#include "webrtc/modules/include/module_common_types.h" - -namespace webrtc { -class Clock; -struct PacketInfo; - -class SendTimeHistory { - public: - SendTimeHistory(Clock* clock, int64_t packet_age_limit_ms); - ~SendTimeHistory(); - - void Clear(); - - // Cleanup old entries, then add new packet info with provided parameters. - void AddAndRemoveOld(uint16_t sequence_number, - size_t payload_size, - int probe_cluster_id); - - // Updates packet info identified by |sequence_number| with |send_time_ms|. - // Return false if not found. - bool OnSentPacket(uint16_t sequence_number, int64_t send_time_ms); - - // Look up PacketInfo for a sent packet, based on the sequence number, and - // populate all fields except for arrival_time. The packet parameter must - // thus be non-null and have the sequence_number field set. - bool GetInfo(PacketInfo* packet_info, bool remove); - - private: - Clock* const clock_; - const int64_t packet_age_limit_ms_; - SequenceNumberUnwrapper seq_num_unwrapper_; - std::map history_; - - RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(SendTimeHistory); -}; - -} // namespace webrtc -#endif // WEBRTC_MODULES_REMOTE_BITRATE_ESTIMATOR_INCLUDE_SEND_TIME_HISTORY_H_ diff --git a/WebRtc.NET/include/webrtc/modules/remote_bitrate_estimator/remote_bitrate_estimator_abs_send_time.h b/WebRtc.NET/include/webrtc/modules/remote_bitrate_estimator/remote_bitrate_estimator_abs_send_time.h deleted file mode 100644 index 6e376984..00000000 --- a/WebRtc.NET/include/webrtc/modules/remote_bitrate_estimator/remote_bitrate_estimator_abs_send_time.h +++ /dev/null @@ -1,145 +0,0 @@ -/* - * Copyright (c) 2015 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MODULES_REMOTE_BITRATE_ESTIMATOR_REMOTE_BITRATE_ESTIMATOR_ABS_SEND_TIME_H_ -#define WEBRTC_MODULES_REMOTE_BITRATE_ESTIMATOR_REMOTE_BITRATE_ESTIMATOR_ABS_SEND_TIME_H_ - -#include -#include -#include -#include - -#include "webrtc/base/checks.h" -#include "webrtc/base/constructormagic.h" -#include "webrtc/base/criticalsection.h" -#include "webrtc/base/rate_statistics.h" -#include "webrtc/base/thread_checker.h" -#include "webrtc/modules/remote_bitrate_estimator/aimd_rate_control.h" -#include "webrtc/modules/remote_bitrate_estimator/include/remote_bitrate_estimator.h" -#include "webrtc/modules/remote_bitrate_estimator/inter_arrival.h" -#include "webrtc/modules/remote_bitrate_estimator/overuse_detector.h" -#include "webrtc/modules/remote_bitrate_estimator/overuse_estimator.h" -#include "webrtc/system_wrappers/include/critical_section_wrapper.h" - -namespace webrtc { - -struct Probe { - Probe(int64_t send_time_ms, int64_t recv_time_ms, size_t payload_size) - : send_time_ms(send_time_ms), - recv_time_ms(recv_time_ms), - payload_size(payload_size) {} - int64_t send_time_ms; - int64_t recv_time_ms; - size_t payload_size; -}; - -struct Cluster { - Cluster() - : send_mean_ms(0.0f), - recv_mean_ms(0.0f), - mean_size(0), - count(0), - num_above_min_delta(0) {} - - int GetSendBitrateBps() const { - RTC_CHECK_GT(send_mean_ms, 0.0f); - return mean_size * 8 * 1000 / send_mean_ms; - } - - int GetRecvBitrateBps() const { - RTC_CHECK_GT(recv_mean_ms, 0.0f); - return mean_size * 8 * 1000 / recv_mean_ms; - } - - float send_mean_ms; - float recv_mean_ms; - // TODO(holmer): Add some variance metric as well? - size_t mean_size; - int count; - int num_above_min_delta; -}; - -class RemoteBitrateEstimatorAbsSendTime : public RemoteBitrateEstimator { - public: - RemoteBitrateEstimatorAbsSendTime(RemoteBitrateObserver* observer, - Clock* clock); - virtual ~RemoteBitrateEstimatorAbsSendTime() {} - - void IncomingPacketFeedbackVector( - const std::vector& packet_feedback_vector) override; - - void IncomingPacket(int64_t arrival_time_ms, - size_t payload_size, - const RTPHeader& header) override; - // This class relies on Process() being called periodically (at least once - // every other second) for streams to be timed out properly. Therefore it - // shouldn't be detached from the ProcessThread except if it's about to be - // deleted. - void Process() override; - int64_t TimeUntilNextProcess() override; - void OnRttUpdate(int64_t avg_rtt_ms, int64_t max_rtt_ms) override; - void RemoveStream(uint32_t ssrc) override; - bool LatestEstimate(std::vector* ssrcs, - uint32_t* bitrate_bps) const override; - void SetMinBitrate(int min_bitrate_bps) override; - - private: - typedef std::map Ssrcs; - enum class ProbeResult { kBitrateUpdated, kNoUpdate }; - - static bool IsWithinClusterBounds(int send_delta_ms, - const Cluster& cluster_aggregate); - - static void AddCluster(std::list* clusters, Cluster* cluster); - - void IncomingPacketInfo(int64_t arrival_time_ms, - uint32_t send_time_24bits, - size_t payload_size, - uint32_t ssrc); - - void ComputeClusters(std::list* clusters) const; - - std::list::const_iterator FindBestProbe( - const std::list& clusters) const; - - // Returns true if a probe which changed the estimate was detected. - ProbeResult ProcessClusters(int64_t now_ms) EXCLUSIVE_LOCKS_REQUIRED(&crit_); - - bool IsBitrateImproving(int probe_bitrate_bps) const - EXCLUSIVE_LOCKS_REQUIRED(&crit_); - - void TimeoutStreams(int64_t now_ms) EXCLUSIVE_LOCKS_REQUIRED(&crit_); - - rtc::ThreadChecker network_thread_; - Clock* const clock_; - RemoteBitrateObserver* const observer_; - std::unique_ptr inter_arrival_; - std::unique_ptr estimator_; - OveruseDetector detector_; - RateStatistics incoming_bitrate_; - bool incoming_bitrate_initialized_; - std::vector recent_propagation_delta_ms_; - std::vector recent_update_time_ms_; - std::list probes_; - size_t total_probes_received_; - int64_t first_packet_time_ms_; - int64_t last_update_ms_; - bool uma_recorded_; - - rtc::CriticalSection crit_; - Ssrcs ssrcs_ GUARDED_BY(&crit_); - AimdRateControl remote_rate_ GUARDED_BY(&crit_); - - RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(RemoteBitrateEstimatorAbsSendTime); -}; - -} // namespace webrtc - -#endif // WEBRTC_MODULES_REMOTE_BITRATE_ESTIMATOR_REMOTE_BITRATE_ESTIMATOR_ABS_SEND_TIME_H_ diff --git a/WebRtc.NET/include/webrtc/modules/remote_bitrate_estimator/remote_bitrate_estimator_single_stream.h b/WebRtc.NET/include/webrtc/modules/remote_bitrate_estimator/remote_bitrate_estimator_single_stream.h deleted file mode 100644 index 31d79622..00000000 --- a/WebRtc.NET/include/webrtc/modules/remote_bitrate_estimator/remote_bitrate_estimator_single_stream.h +++ /dev/null @@ -1,75 +0,0 @@ -/* - * Copyright (c) 2015 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MODULES_REMOTE_BITRATE_ESTIMATOR_REMOTE_BITRATE_ESTIMATOR_SINGLE_STREAM_H_ -#define WEBRTC_MODULES_REMOTE_BITRATE_ESTIMATOR_REMOTE_BITRATE_ESTIMATOR_SINGLE_STREAM_H_ - -#include -#include -#include - -#include "webrtc/base/constructormagic.h" -#include "webrtc/base/rate_statistics.h" -#include "webrtc/modules/remote_bitrate_estimator/aimd_rate_control.h" -#include "webrtc/modules/remote_bitrate_estimator/include/remote_bitrate_estimator.h" -#include "webrtc/system_wrappers/include/critical_section_wrapper.h" - -namespace webrtc { - -class RemoteBitrateEstimatorSingleStream : public RemoteBitrateEstimator { - public: - RemoteBitrateEstimatorSingleStream(RemoteBitrateObserver* observer, - Clock* clock); - virtual ~RemoteBitrateEstimatorSingleStream(); - - void IncomingPacket(int64_t arrival_time_ms, - size_t payload_size, - const RTPHeader& header) override; - void Process() override; - int64_t TimeUntilNextProcess() override; - void OnRttUpdate(int64_t avg_rtt_ms, int64_t max_rtt_ms) override; - void RemoveStream(uint32_t ssrc) override; - bool LatestEstimate(std::vector* ssrcs, - uint32_t* bitrate_bps) const override; - void SetMinBitrate(int min_bitrate_bps) override; - - private: - struct Detector; - - typedef std::map SsrcOveruseEstimatorMap; - - // Triggers a new estimate calculation. - void UpdateEstimate(int64_t time_now) - EXCLUSIVE_LOCKS_REQUIRED(crit_sect_.get()); - - void GetSsrcs(std::vector* ssrcs) const - SHARED_LOCKS_REQUIRED(crit_sect_.get()); - - // Returns |remote_rate_| if the pointed to object exists, - // otherwise creates it. - AimdRateControl* GetRemoteRate() EXCLUSIVE_LOCKS_REQUIRED(crit_sect_.get()); - - Clock* clock_; - SsrcOveruseEstimatorMap overuse_detectors_ GUARDED_BY(crit_sect_.get()); - RateStatistics incoming_bitrate_ GUARDED_BY(crit_sect_.get()); - uint32_t last_valid_incoming_bitrate_ GUARDED_BY(crit_sect_.get()); - std::unique_ptr remote_rate_ GUARDED_BY(crit_sect_.get()); - RemoteBitrateObserver* observer_ GUARDED_BY(crit_sect_.get()); - std::unique_ptr crit_sect_; - int64_t last_process_time_; - int64_t process_interval_ms_ GUARDED_BY(crit_sect_.get()); - bool uma_recorded_; - - RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(RemoteBitrateEstimatorSingleStream); -}; - -} // namespace webrtc - -#endif // WEBRTC_MODULES_REMOTE_BITRATE_ESTIMATOR_REMOTE_BITRATE_ESTIMATOR_SINGLE_STREAM_H_ diff --git a/WebRtc.NET/include/webrtc/modules/remote_bitrate_estimator/remote_estimator_proxy.h b/WebRtc.NET/include/webrtc/modules/remote_bitrate_estimator/remote_estimator_proxy.h deleted file mode 100644 index 71099bf9..00000000 --- a/WebRtc.NET/include/webrtc/modules/remote_bitrate_estimator/remote_estimator_proxy.h +++ /dev/null @@ -1,79 +0,0 @@ -/* - * Copyright (c) 2015 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MODULES_REMOTE_BITRATE_ESTIMATOR_REMOTE_ESTIMATOR_PROXY_H_ -#define WEBRTC_MODULES_REMOTE_BITRATE_ESTIMATOR_REMOTE_ESTIMATOR_PROXY_H_ - -#include -#include - -#include "webrtc/base/criticalsection.h" -#include "webrtc/modules/include/module_common_types.h" -#include "webrtc/modules/remote_bitrate_estimator/include/remote_bitrate_estimator.h" - -namespace webrtc { - -class Clock; -class PacketRouter; -namespace rtcp { -class TransportFeedback; -} - -// Class used when send-side BWE is enabled: This proxy is instantiated on the -// receive side. It buffers a number of receive timestamps and then sends -// transport feedback messages back too the send side. - -class RemoteEstimatorProxy : public RemoteBitrateEstimator { - public: - RemoteEstimatorProxy(Clock* clock, PacketRouter* packet_router); - virtual ~RemoteEstimatorProxy(); - - void IncomingPacketFeedbackVector( - const std::vector& packet_feedback_vector) override; - void IncomingPacket(int64_t arrival_time_ms, - size_t payload_size, - const RTPHeader& header) override; - void RemoveStream(uint32_t ssrc) override {} - bool LatestEstimate(std::vector* ssrcs, - unsigned int* bitrate_bps) const override; - void OnRttUpdate(int64_t avg_rtt_ms, int64_t max_rtt_ms) override {} - void SetMinBitrate(int min_bitrate_bps) override {} - int64_t TimeUntilNextProcess() override; - void Process() override; - void OnBitrateChanged(int bitrate); - - static const int kMinSendIntervalMs; - static const int kMaxSendIntervalMs; - static const int kDefaultSendIntervalMs; - static const int kBackWindowMs; - - private: - void OnPacketArrival(uint16_t sequence_number, int64_t arrival_time) - EXCLUSIVE_LOCKS_REQUIRED(&lock_); - bool BuildFeedbackPacket(rtcp::TransportFeedback* feedback_packet); - - Clock* const clock_; - PacketRouter* const packet_router_; - int64_t last_process_time_ms_; - - rtc::CriticalSection lock_; - - uint32_t media_ssrc_ GUARDED_BY(&lock_); - uint8_t feedback_sequence_ GUARDED_BY(&lock_); - SequenceNumberUnwrapper unwrapper_ GUARDED_BY(&lock_); - int64_t window_start_seq_ GUARDED_BY(&lock_); - // Map unwrapped seq -> time. - std::map packet_arrival_times_ GUARDED_BY(&lock_); - int64_t send_interval_ms_ GUARDED_BY(&lock_); -}; - -} // namespace webrtc - -#endif // WEBRTC_MODULES_REMOTE_BITRATE_ESTIMATOR_REMOTE_ESTIMATOR_PROXY_H_ diff --git a/WebRtc.NET/include/webrtc/modules/remote_bitrate_estimator/test/estimators/remb.h b/WebRtc.NET/include/webrtc/modules/remote_bitrate_estimator/test/estimators/remb.h deleted file mode 100644 index cb9af9ac..00000000 --- a/WebRtc.NET/include/webrtc/modules/remote_bitrate_estimator/test/estimators/remb.h +++ /dev/null @@ -1,88 +0,0 @@ -/* - * Copyright (c) 2015 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MODULES_REMOTE_BITRATE_ESTIMATOR_TEST_ESTIMATORS_REMB_H_ -#define WEBRTC_MODULES_REMOTE_BITRATE_ESTIMATOR_TEST_ESTIMATORS_REMB_H_ - -#include -#include -#include - -#include "webrtc/base/constructormagic.h" -#include "webrtc/logging/rtc_event_log/mock/mock_rtc_event_log.h" -#include "webrtc/modules/remote_bitrate_estimator/test/bwe.h" - -namespace webrtc { - -class BitrateObserver; -class BitrateController; -class ReceiveStatistics; -class StreamStatistician; - -namespace testing { -namespace bwe { - -class RembBweSender : public BweSender { - public: - RembBweSender(int kbps, BitrateObserver* observer, Clock* clock); - virtual ~RembBweSender(); - - int GetFeedbackIntervalMs() const override; - void GiveFeedback(const FeedbackPacket& feedback) override; - void OnPacketsSent(const Packets& packets) override {} - int64_t TimeUntilNextProcess() override; - void Process() override; - - protected: - std::unique_ptr bitrate_controller_; - std::unique_ptr feedback_observer_; - - private: - Clock* clock_; - ::testing::NiceMock event_log_; - - RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(RembBweSender); -}; - -class RembReceiver : public BweReceiver, public RemoteBitrateObserver { - public: - static const uint32_t kRemoteBitrateEstimatorMinBitrateBps = 30000; - - RembReceiver(int flow_id, bool plot); - virtual ~RembReceiver(); - - void ReceivePacket(int64_t arrival_time_ms, - const MediaPacket& media_packet) override; - FeedbackPacket* GetFeedback(int64_t now_ms) override; - // Implements RemoteBitrateObserver. - void OnReceiveBitrateChanged(const std::vector& ssrcs, - uint32_t bitrate) override; - - private: - static RTCPReportBlock BuildReportBlock(StreamStatistician* statistician); - bool LatestEstimate(uint32_t* estimate_bps); - - std::string estimate_log_prefix_; - bool plot_estimate_; - SimulatedClock clock_; - std::unique_ptr recv_stats_; - int64_t latest_estimate_bps_; - int64_t last_feedback_ms_; - std::unique_ptr estimator_; - RTCPReportBlock latest_report_block_; - - RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(RembReceiver); -}; - -} // namespace bwe -} // namespace testing -} // namespace webrtc - -#endif // WEBRTC_MODULES_REMOTE_BITRATE_ESTIMATOR_TEST_ESTIMATORS_REMB_H_ diff --git a/WebRtc.NET/include/webrtc/modules/remote_bitrate_estimator/test/estimators/send_side.h b/WebRtc.NET/include/webrtc/modules/remote_bitrate_estimator/test/estimators/send_side.h deleted file mode 100644 index 90ec50fc..00000000 --- a/WebRtc.NET/include/webrtc/modules/remote_bitrate_estimator/test/estimators/send_side.h +++ /dev/null @@ -1,74 +0,0 @@ -/* - * Copyright (c) 2015 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MODULES_REMOTE_BITRATE_ESTIMATOR_TEST_ESTIMATORS_SEND_SIDE_H_ -#define WEBRTC_MODULES_REMOTE_BITRATE_ESTIMATOR_TEST_ESTIMATORS_SEND_SIDE_H_ - -#include -#include - -#include "webrtc/logging/rtc_event_log/mock/mock_rtc_event_log.h" -#include "webrtc/modules/remote_bitrate_estimator/include/send_time_history.h" -#include "webrtc/modules/remote_bitrate_estimator/test/bwe.h" - -namespace webrtc { -namespace testing { -namespace bwe { - -class SendSideBweSender : public BweSender, public RemoteBitrateObserver { - public: - SendSideBweSender(int kbps, BitrateObserver* observer, Clock* clock); - virtual ~SendSideBweSender(); - - int GetFeedbackIntervalMs() const override; - void GiveFeedback(const FeedbackPacket& feedback) override; - void OnPacketsSent(const Packets& packets) override; - void OnReceiveBitrateChanged(const std::vector& ssrcs, - uint32_t bitrate) override; - int64_t TimeUntilNextProcess() override; - void Process() override; - - protected: - std::unique_ptr bitrate_controller_; - std::unique_ptr bwe_; - std::unique_ptr feedback_observer_; - - private: - Clock* const clock_; - RTCPReportBlock report_block_; - SendTimeHistory send_time_history_; - bool has_received_ack_; - uint16_t last_acked_seq_num_; - int64_t last_log_time_ms_; - SequenceNumberUnwrapper seq_num_unwrapper_; - ::testing::NiceMock event_log_; - - RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(SendSideBweSender); -}; - -class SendSideBweReceiver : public BweReceiver { - public: - explicit SendSideBweReceiver(int flow_id); - virtual ~SendSideBweReceiver(); - - void ReceivePacket(int64_t arrival_time_ms, - const MediaPacket& media_packet) override; - FeedbackPacket* GetFeedback(int64_t now_ms) override; - - private: - int64_t last_feedback_ms_; - std::vector packet_feedback_vector_; -}; - -} // namespace bwe -} // namespace testing -} // namespace webrtc - -#endif // WEBRTC_MODULES_REMOTE_BITRATE_ESTIMATOR_TEST_ESTIMATORS_SEND_SIDE_H_ diff --git a/WebRtc.NET/include/webrtc/modules/remote_bitrate_estimator/test/estimators/tcp.h b/WebRtc.NET/include/webrtc/modules/remote_bitrate_estimator/test/estimators/tcp.h deleted file mode 100644 index b33c93ee..00000000 --- a/WebRtc.NET/include/webrtc/modules/remote_bitrate_estimator/test/estimators/tcp.h +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright (c) 2015 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MODULES_REMOTE_BITRATE_ESTIMATOR_TEST_ESTIMATORS_TCP_H_ -#define WEBRTC_MODULES_REMOTE_BITRATE_ESTIMATOR_TEST_ESTIMATORS_TCP_H_ - -#include - -#include "webrtc/modules/remote_bitrate_estimator/test/bwe.h" - -namespace webrtc { -namespace testing { -namespace bwe { -class TcpBweReceiver : public BweReceiver { - public: - explicit TcpBweReceiver(int flow_id); - virtual ~TcpBweReceiver(); - - void ReceivePacket(int64_t arrival_time_ms, - const MediaPacket& media_packet) override; - FeedbackPacket* GetFeedback(int64_t now_ms) override; - - private: - int64_t last_feedback_ms_; - int64_t latest_owd_ms_; - std::vector acks_; -}; -} // namespace bwe -} // namespace testing -} // namespace webrtc -#endif // WEBRTC_MODULES_REMOTE_BITRATE_ESTIMATOR_TEST_ESTIMATORS_TCP_H_ diff --git a/WebRtc.NET/include/webrtc/modules/remote_bitrate_estimator/test/packet.h b/WebRtc.NET/include/webrtc/modules/remote_bitrate_estimator/test/packet.h deleted file mode 100644 index 9aa596c1..00000000 --- a/WebRtc.NET/include/webrtc/modules/remote_bitrate_estimator/test/packet.h +++ /dev/null @@ -1,202 +0,0 @@ -/* - * Copyright (c) 2015 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MODULES_REMOTE_BITRATE_ESTIMATOR_TEST_PACKET_H_ -#define WEBRTC_MODULES_REMOTE_BITRATE_ESTIMATOR_TEST_PACKET_H_ - -#include -#include -#include - -#include "webrtc/common_types.h" -#include "webrtc/modules/rtp_rtcp/include/rtp_rtcp_defines.h" -#include "webrtc/modules/remote_bitrate_estimator/include/remote_bitrate_estimator.h" - -namespace webrtc { -namespace testing { -namespace bwe { - -class Packet { - public: - enum Type { kMedia, kFeedback }; - - Packet(); - Packet(int flow_id, int64_t send_time_us, size_t payload_size); - virtual ~Packet(); - - virtual bool operator<(const Packet& rhs) const; - - virtual int flow_id() const { return flow_id_; } - virtual void set_send_time_us(int64_t send_time_us); - virtual int64_t send_time_us() const { return send_time_us_; } - virtual int64_t sender_timestamp_us() const { return sender_timestamp_us_; } - virtual size_t payload_size() const { return payload_size_; } - virtual Packet::Type GetPacketType() const = 0; - virtual void set_sender_timestamp_us(int64_t sender_timestamp_us) { - sender_timestamp_us_ = sender_timestamp_us; - } - virtual int64_t creation_time_ms() const { - return (creation_time_us_ + 500) / 1000; - } - virtual int64_t sender_timestamp_ms() const { - return (sender_timestamp_us_ + 500) / 1000; - } - virtual int64_t send_time_ms() const { return (send_time_us_ + 500) / 1000; } - - protected: - int flow_id_; - int64_t creation_time_us_; // Time when the packet was created. - int64_t send_time_us_; // Time the packet left last processor touching it. - int64_t sender_timestamp_us_; // Time the packet left the Sender. - size_t payload_size_; // Size of the (non-existent, simulated) payload. -}; - -class MediaPacket : public Packet { - public: - MediaPacket(); - MediaPacket(int flow_id, - int64_t send_time_us, - size_t payload_size, - uint16_t sequence_number); - MediaPacket(int flow_id, - int64_t send_time_us, - size_t payload_size, - const RTPHeader& header); - MediaPacket(int64_t send_time_us, uint16_t sequence_number); - - virtual ~MediaPacket() {} - - int64_t GetAbsSendTimeInMs() const { - int64_t timestamp = header_.extension.absoluteSendTime - << kAbsSendTimeInterArrivalUpshift; - return 1000.0 * timestamp / static_cast(1 << kInterArrivalShift); - } - void SetAbsSendTimeMs(int64_t abs_send_time_ms); - const RTPHeader& header() const { return header_; } - virtual Packet::Type GetPacketType() const { return kMedia; } - uint16_t sequence_number() const { return header_.sequenceNumber; } - - private: - static const int kAbsSendTimeFraction = 18; - static const int kAbsSendTimeInterArrivalUpshift = 8; - static const int kInterArrivalShift = - kAbsSendTimeFraction + kAbsSendTimeInterArrivalUpshift; - - RTPHeader header_; -}; - -class FeedbackPacket : public Packet { - public: - FeedbackPacket(int flow_id, - int64_t this_send_time_us, - int64_t latest_send_time_ms) - : Packet(flow_id, this_send_time_us, 0), - latest_send_time_ms_(latest_send_time_ms) {} - virtual ~FeedbackPacket() {} - - virtual Packet::Type GetPacketType() const { return kFeedback; } - int64_t latest_send_time_ms() const { return latest_send_time_ms_; } - - private: - int64_t latest_send_time_ms_; // Time stamp for the latest sent FbPacket. -}; - -class RembFeedback : public FeedbackPacket { - public: - RembFeedback(int flow_id, - int64_t send_time_us, - int64_t latest_send_time_ms, - uint32_t estimated_bps, - RTCPReportBlock report_block); - virtual ~RembFeedback() {} - - uint32_t estimated_bps() const { return estimated_bps_; } - RTCPReportBlock report_block() const { return report_block_; } - - private: - const uint32_t estimated_bps_; - const RTCPReportBlock report_block_; -}; - -class SendSideBweFeedback : public FeedbackPacket { - public: - typedef std::map ArrivalTimesMap; - SendSideBweFeedback(int flow_id, - int64_t send_time_us, - int64_t latest_send_time_ms, - const std::vector& packet_feedback_vector); - virtual ~SendSideBweFeedback() {} - - const std::vector& packet_feedback_vector() const { - return packet_feedback_vector_; - } - - private: - const std::vector packet_feedback_vector_; -}; - -class NadaFeedback : public FeedbackPacket { - public: - NadaFeedback(int flow_id, - int64_t this_send_time_us, - int64_t exp_smoothed_delay_ms, - int64_t est_queuing_delay_signal_ms, - int64_t congestion_signal, - float derivative, - float receiving_rate, - int64_t latest_send_time_ms) - : FeedbackPacket(flow_id, this_send_time_us, latest_send_time_ms), - exp_smoothed_delay_ms_(exp_smoothed_delay_ms), - est_queuing_delay_signal_ms_(est_queuing_delay_signal_ms), - congestion_signal_(congestion_signal), - derivative_(derivative), - receiving_rate_(receiving_rate) {} - virtual ~NadaFeedback() {} - - int64_t exp_smoothed_delay_ms() const { return exp_smoothed_delay_ms_; } - int64_t est_queuing_delay_signal_ms() const { - return est_queuing_delay_signal_ms_; - } - int64_t congestion_signal() const { return congestion_signal_; } - float derivative() const { return derivative_; } - float receiving_rate() const { return receiving_rate_; } - - private: - int64_t exp_smoothed_delay_ms_; // Referred as d_hat_n. - int64_t est_queuing_delay_signal_ms_; // Referred as d_tilde_n. - int64_t congestion_signal_; // Referred as x_n. - float derivative_; // Referred as x'_n. - float receiving_rate_; // Referred as R_r. -}; - -class TcpFeedback : public FeedbackPacket { - public: - TcpFeedback(int flow_id, - int64_t send_time_us, - int64_t latest_send_time_ms, - const std::vector& acked_packets) - : FeedbackPacket(flow_id, send_time_us, latest_send_time_ms), - acked_packets_(acked_packets) {} - virtual ~TcpFeedback() {} - - const std::vector& acked_packets() const { return acked_packets_; } - - private: - const std::vector acked_packets_; -}; - -typedef std::list Packets; -typedef std::list::iterator PacketsIt; -typedef std::list::const_iterator PacketsConstIt; - -} // namespace bwe -} // namespace testing -} // namespace webrtc -#endif // WEBRTC_MODULES_REMOTE_BITRATE_ESTIMATOR_TEST_PACKET_H_ diff --git a/WebRtc.NET/include/webrtc/modules/remote_bitrate_estimator/test/packet_sender.h b/WebRtc.NET/include/webrtc/modules/remote_bitrate_estimator/test/packet_sender.h deleted file mode 100644 index 0fccb6f1..00000000 --- a/WebRtc.NET/include/webrtc/modules/remote_bitrate_estimator/test/packet_sender.h +++ /dev/null @@ -1,196 +0,0 @@ -/* - * Copyright (c) 2015 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MODULES_REMOTE_BITRATE_ESTIMATOR_TEST_PACKET_SENDER_H_ -#define WEBRTC_MODULES_REMOTE_BITRATE_ESTIMATOR_TEST_PACKET_SENDER_H_ - -#include -#include -#include -#include -#include - -#include "webrtc/base/constructormagic.h" -#include "webrtc/modules/include/module.h" -#include "webrtc/modules/remote_bitrate_estimator/test/bwe.h" -#include "webrtc/modules/remote_bitrate_estimator/test/bwe_test_framework.h" - -namespace webrtc { -namespace testing { -namespace bwe { - -class MetricRecorder; - -class PacketSender : public PacketProcessor { - public: - PacketSender(PacketProcessorListener* listener, int flow_id) - : PacketProcessor(listener, flow_id, kSender), - running_(true), - // For Packet::send_time_us() to be comparable with timestamps from - // clock_, the clock of the PacketSender and the Source must be aligned. - // We assume that both start at time 0. - clock_(0), - metric_recorder_(nullptr) {} - virtual ~PacketSender() {} - // Call GiveFeedback() with the returned interval in milliseconds, provided - // there is a new estimate available. - // Note that changing the feedback interval affects the timing of when the - // output of the estimators is sampled and therefore the baseline files may - // have to be regenerated. - virtual int GetFeedbackIntervalMs() const = 0; - void SetSenderTimestamps(Packets* in_out); - - virtual uint32_t TargetBitrateKbps() { return 0; } - - virtual void Pause(); - virtual void Resume(int64_t paused_time_ms); - - void set_metric_recorder(MetricRecorder* metric_recorder); - virtual void RecordBitrate(); - - protected: - bool running_; // Initialized by default as true. - SimulatedClock clock_; - - private: - MetricRecorder* metric_recorder_; -}; - -class VideoSender : public PacketSender, public BitrateObserver { - public: - VideoSender(PacketProcessorListener* listener, - VideoSource* source, - BandwidthEstimatorType estimator); - virtual ~VideoSender(); - - int GetFeedbackIntervalMs() const override; - void RunFor(int64_t time_ms, Packets* in_out) override; - - virtual VideoSource* source() const { return source_; } - - uint32_t TargetBitrateKbps() override; - - // Implements BitrateObserver. - void OnNetworkChanged(uint32_t target_bitrate_bps, - uint8_t fraction_lost, - int64_t rtt) override; - - void Pause() override; - void Resume(int64_t paused_time_ms) override; - - protected: - void ProcessFeedbackAndGeneratePackets(int64_t time_ms, - std::list* feedbacks, - Packets* generated); - - VideoSource* source_; - std::unique_ptr bwe_; - int64_t start_of_run_ms_; - std::list modules_; - - private: - uint32_t previous_sending_bitrate_; - RTC_DISALLOW_COPY_AND_ASSIGN(VideoSender); -}; - -class PacedVideoSender : public VideoSender, public PacedSender::PacketSender { - public: - PacedVideoSender(PacketProcessorListener* listener, - VideoSource* source, - BandwidthEstimatorType estimator); - virtual ~PacedVideoSender(); - - void RunFor(int64_t time_ms, Packets* in_out) override; - - // Implements PacedSender::Callback. - bool TimeToSendPacket(uint32_t ssrc, - uint16_t sequence_number, - int64_t capture_time_ms, - bool retransmission, - int probe_cluster_id) override; - size_t TimeToSendPadding(size_t bytes, int probe_cluster_id) override; - - // Implements BitrateObserver. - void OnNetworkChanged(uint32_t target_bitrate_bps, - uint8_t fraction_lost, - int64_t rtt) override; - - private: - int64_t TimeUntilNextProcess(const std::list& modules); - void CallProcess(const std::list& modules); - void QueuePackets(Packets* batch, int64_t end_of_batch_time_us); - - PacedSender pacer_; - Packets queue_; - Packets pacer_queue_; - - RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(PacedVideoSender); -}; - -class TcpSender : public PacketSender { - public: - TcpSender(PacketProcessorListener* listener, int flow_id, int64_t offset_ms); - TcpSender(PacketProcessorListener* listener, - int flow_id, - int64_t offset_ms, - int send_limit_bytes); - virtual ~TcpSender() {} - - void RunFor(int64_t time_ms, Packets* in_out) override; - int GetFeedbackIntervalMs() const override { return 10; } - - uint32_t TargetBitrateKbps() override; - - private: - struct InFlight { - public: - explicit InFlight(const MediaPacket& packet) - : sequence_number(packet.header().sequenceNumber), - time_ms(packet.send_time_ms()) {} - - InFlight(uint16_t seq_num, int64_t now_ms) - : sequence_number(seq_num), time_ms(now_ms) {} - - bool operator<(const InFlight& rhs) const { - return sequence_number < rhs.sequence_number; - } - - uint16_t sequence_number; // Sequence number of a packet in flight, or a - // packet which has just been acked. - int64_t time_ms; // Time of when the packet left the sender, or when the - // ack was received. - }; - - void SendPackets(Packets* in_out); - void UpdateCongestionControl(const FeedbackPacket* fb); - int TriggerTimeouts(); - void HandleLoss(); - Packets GeneratePackets(size_t num_packets); - void UpdateSendBitrateEstimate(size_t num_packets); - - float cwnd_; - int ssthresh_; - std::set in_flight_; - bool ack_received_; - uint16_t last_acked_seq_num_; - uint16_t next_sequence_number_; - int64_t offset_ms_; - int64_t last_reduction_time_ms_; - int64_t last_rtt_ms_; - int total_sent_bytes_; - int send_limit_bytes_; // Initialized by default as kNoLimit. - int64_t last_generated_packets_ms_; - size_t num_recent_sent_packets_; - uint32_t bitrate_kbps_; -}; -} // namespace bwe -} // namespace testing -} // namespace webrtc -#endif // WEBRTC_MODULES_REMOTE_BITRATE_ESTIMATOR_TEST_PACKET_SENDER_H_ diff --git a/WebRtc.NET/include/webrtc/modules/remote_bitrate_estimator/tools/bwe_rtp.h b/WebRtc.NET/include/webrtc/modules/remote_bitrate_estimator/tools/bwe_rtp.h deleted file mode 100644 index 2d12a808..00000000 --- a/WebRtc.NET/include/webrtc/modules/remote_bitrate_estimator/tools/bwe_rtp.h +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright (c) 2014 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MODULES_REMOTE_BITRATE_ESTIMATOR_TOOLS_BWE_RTP_H_ -#define WEBRTC_MODULES_REMOTE_BITRATE_ESTIMATOR_TOOLS_BWE_RTP_H_ - -#include - -namespace webrtc { -class Clock; -class RemoteBitrateEstimator; -class RemoteBitrateObserver; -class RtpHeaderParser; -namespace test { -class RtpFileReader; -} -} - -bool ParseArgsAndSetupEstimator( - int argc, - char** argv, - webrtc::Clock* clock, - webrtc::RemoteBitrateObserver* observer, - webrtc::test::RtpFileReader** rtp_reader, - webrtc::RtpHeaderParser** parser, - webrtc::RemoteBitrateEstimator** estimator, - std::string* estimator_used); - -#endif // WEBRTC_MODULES_REMOTE_BITRATE_ESTIMATOR_TOOLS_BWE_RTP_H_ diff --git a/WebRtc.NET/include/webrtc/modules/rtp_rtcp/include/flexfec_receiver.h b/WebRtc.NET/include/webrtc/modules/rtp_rtcp/include/flexfec_receiver.h deleted file mode 100644 index a986fbb8..00000000 --- a/WebRtc.NET/include/webrtc/modules/rtp_rtcp/include/flexfec_receiver.h +++ /dev/null @@ -1,78 +0,0 @@ -/* - * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MODULES_RTP_RTCP_INCLUDE_FLEXFEC_RECEIVER_H_ -#define WEBRTC_MODULES_RTP_RTCP_INCLUDE_FLEXFEC_RECEIVER_H_ - -#include - -#include "webrtc/base/basictypes.h" -#include "webrtc/base/sequenced_task_checker.h" -#include "webrtc/call/call.h" -#include "webrtc/modules/rtp_rtcp/include/ulpfec_receiver.h" -#include "webrtc/modules/rtp_rtcp/source/forward_error_correction.h" -#include "webrtc/modules/rtp_rtcp/source/rtp_packet_received.h" -#include "webrtc/system_wrappers/include/clock.h" - -namespace webrtc { - -// Callback interface for packets recovered by FlexFEC. The implementation -// should be able to demultiplex the recovered RTP packets based on SSRC. -class RecoveredPacketReceiver { - public: - virtual bool OnRecoveredPacket(const uint8_t* packet, size_t length) = 0; - - protected: - virtual ~RecoveredPacketReceiver() = default; -}; - -class FlexfecReceiver { - public: - FlexfecReceiver(uint32_t ssrc, - uint32_t protected_media_ssrc, - RecoveredPacketReceiver* recovered_packet_receiver); - ~FlexfecReceiver(); - - // Inserts a received packet (can be either media or FlexFEC) into the - // internal buffer, and sends the received packets to the erasure code. - // All newly recovered packets are sent back through the callback. - bool AddAndProcessReceivedPacket(const RtpPacketReceived& packet); - - // Returns a counter describing the added and recovered packets. - FecPacketCounter GetPacketCounter() const; - - private: - bool AddReceivedPacket(const RtpPacketReceived& packet); - bool ProcessReceivedPackets(); - - // Config. - const uint32_t ssrc_; - const uint32_t protected_media_ssrc_; - - // Erasure code interfacing and callback. - std::unique_ptr erasure_code_ - GUARDED_BY(sequence_checker_); - ForwardErrorCorrection::ReceivedPacketList received_packets_ - GUARDED_BY(sequence_checker_); - ForwardErrorCorrection::RecoveredPacketList recovered_packets_ - GUARDED_BY(sequence_checker_); - RecoveredPacketReceiver* const recovered_packet_receiver_; - - // Logging and stats. - Clock* const clock_; - int64_t last_recovered_packet_ms_ GUARDED_BY(sequence_checker_); - FecPacketCounter packet_counter_ GUARDED_BY(sequence_checker_); - - rtc::SequencedTaskChecker sequence_checker_; -}; - -} // namespace webrtc - -#endif // WEBRTC_MODULES_RTP_RTCP_INCLUDE_FLEXFEC_RECEIVER_H_ diff --git a/WebRtc.NET/include/webrtc/modules/rtp_rtcp/include/flexfec_sender.h b/WebRtc.NET/include/webrtc/modules/rtp_rtcp/include/flexfec_sender.h deleted file mode 100644 index fa4bd6e7..00000000 --- a/WebRtc.NET/include/webrtc/modules/rtp_rtcp/include/flexfec_sender.h +++ /dev/null @@ -1,86 +0,0 @@ -/* - * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MODULES_RTP_RTCP_INCLUDE_FLEXFEC_SENDER_H_ -#define WEBRTC_MODULES_RTP_RTCP_INCLUDE_FLEXFEC_SENDER_H_ - -#include -#include - -#include "webrtc/base/basictypes.h" -#include "webrtc/base/random.h" -#include "webrtc/base/sequenced_task_checker.h" -#include "webrtc/config.h" -#include "webrtc/modules/include/module_common_types.h" -#include "webrtc/modules/rtp_rtcp/include/flexfec_sender.h" -#include "webrtc/modules/rtp_rtcp/source/rtp_header_extension.h" -#include "webrtc/modules/rtp_rtcp/source/rtp_packet_to_send.h" -#include "webrtc/modules/rtp_rtcp/source/ulpfec_generator.h" -#include "webrtc/system_wrappers/include/clock.h" - -namespace webrtc { - -class RtpPacketToSend; - -// Note that this class is not thread safe, and thus requires external -// synchronization. - -class FlexfecSender { - public: - FlexfecSender(int payload_type, - uint32_t ssrc, - uint32_t protected_media_ssrc, - const std::vector& rtp_header_extensions, - Clock* clock); - ~FlexfecSender(); - - uint32_t ssrc() const { return ssrc_; } - - // Sets the FEC rate, max frames sent before FEC packets are sent, - // and what type of generator matrices are used. - void SetFecParameters(const FecProtectionParams& params); - - // Adds a media packet to the internal buffer. When enough media packets - // have been added, the FEC packets are generated and stored internally. - // These FEC packets are then obtained by calling GetFecPackets(). - // Returns true if the media packet was successfully added. - bool AddRtpPacketAndGenerateFec(const RtpPacketToSend& packet); - - // Returns true if there are generated FEC packets available. - bool FecAvailable() const; - - // Returns generated FlexFEC packets. - std::vector> GetFecPackets(); - - // Returns the overhead, per packet, for FlexFEC. - size_t MaxPacketOverhead() const; - - private: - // Utility. - Clock* const clock_; - Random random_; - int64_t last_generated_packet_ms_; - - // Config. - const int payload_type_; - const uint32_t timestamp_offset_; - const uint32_t ssrc_; - const uint32_t protected_media_ssrc_; - // Sequence number of next packet to generate. - uint16_t seq_num_; - - // Implementation. - UlpfecGenerator ulpfec_generator_; - const RtpHeaderExtensionMap rtp_header_extension_map_; -}; - -} // namespace webrtc - -#endif // WEBRTC_MODULES_RTP_RTCP_INCLUDE_FLEXFEC_SENDER_H_ diff --git a/WebRtc.NET/include/webrtc/modules/rtp_rtcp/include/receive_statistics.h b/WebRtc.NET/include/webrtc/modules/rtp_rtcp/include/receive_statistics.h deleted file mode 100644 index 90a848ad..00000000 --- a/WebRtc.NET/include/webrtc/modules/rtp_rtcp/include/receive_statistics.h +++ /dev/null @@ -1,100 +0,0 @@ -/* - * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MODULES_RTP_RTCP_INCLUDE_RECEIVE_STATISTICS_H_ -#define WEBRTC_MODULES_RTP_RTCP_INCLUDE_RECEIVE_STATISTICS_H_ - -#include - -#include "webrtc/modules/include/module.h" -#include "webrtc/modules/include/module_common_types.h" -#include "webrtc/typedefs.h" - -namespace webrtc { - -class Clock; - -class StreamStatistician { - public: - virtual ~StreamStatistician(); - - virtual bool GetStatistics(RtcpStatistics* statistics, bool reset) = 0; - virtual void GetDataCounters(size_t* bytes_received, - uint32_t* packets_received) const = 0; - - // Gets received stream data counters (includes reset counter values). - virtual void GetReceiveStreamDataCounters( - StreamDataCounters* data_counters) const = 0; - - virtual uint32_t BitrateReceived() const = 0; - - // Returns true if the packet with RTP header |header| is likely to be a - // retransmitted packet, false otherwise. - virtual bool IsRetransmitOfOldPacket(const RTPHeader& header, - int64_t min_rtt) const = 0; - - // Returns true if |sequence_number| is received in order, false otherwise. - virtual bool IsPacketInOrder(uint16_t sequence_number) const = 0; -}; - -typedef std::map StatisticianMap; - -class ReceiveStatistics { - public: - virtual ~ReceiveStatistics() {} - - static ReceiveStatistics* Create(Clock* clock); - - // Updates the receive statistics with this packet. - virtual void IncomingPacket(const RTPHeader& rtp_header, - size_t packet_length, - bool retransmitted) = 0; - - // Increment counter for number of FEC packets received. - virtual void FecPacketReceived(const RTPHeader& header, - size_t packet_length) = 0; - - // Returns a map of all statisticians which have seen an incoming packet - // during the last two seconds. - virtual StatisticianMap GetActiveStatisticians() const = 0; - - // Returns a pointer to the statistician of an ssrc. - virtual StreamStatistician* GetStatistician(uint32_t ssrc) const = 0; - - // Sets the max reordering threshold in number of packets. - virtual void SetMaxReorderingThreshold(int max_reordering_threshold) = 0; - - // Called on new RTCP stats creation. - virtual void RegisterRtcpStatisticsCallback( - RtcpStatisticsCallback* callback) = 0; - - // Called on new RTP stats creation. - virtual void RegisterRtpStatisticsCallback( - StreamDataCountersCallback* callback) = 0; -}; - -class NullReceiveStatistics : public ReceiveStatistics { - public: - void IncomingPacket(const RTPHeader& rtp_header, - size_t packet_length, - bool retransmitted) override; - void FecPacketReceived(const RTPHeader& header, - size_t packet_length) override; - StatisticianMap GetActiveStatisticians() const override; - StreamStatistician* GetStatistician(uint32_t ssrc) const override; - void SetMaxReorderingThreshold(int max_reordering_threshold) override; - void RegisterRtcpStatisticsCallback( - RtcpStatisticsCallback* callback) override; - void RegisterRtpStatisticsCallback( - StreamDataCountersCallback* callback) override; -}; - -} // namespace webrtc -#endif // WEBRTC_MODULES_RTP_RTCP_INCLUDE_RECEIVE_STATISTICS_H_ diff --git a/WebRtc.NET/include/webrtc/modules/rtp_rtcp/include/remote_ntp_time_estimator.h b/WebRtc.NET/include/webrtc/modules/rtp_rtcp/include/remote_ntp_time_estimator.h deleted file mode 100644 index 118df4c4..00000000 --- a/WebRtc.NET/include/webrtc/modules/rtp_rtcp/include/remote_ntp_time_estimator.h +++ /dev/null @@ -1,53 +0,0 @@ -/* - * Copyright (c) 2014 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MODULES_RTP_RTCP_INCLUDE_REMOTE_NTP_TIME_ESTIMATOR_H_ -#define WEBRTC_MODULES_RTP_RTCP_INCLUDE_REMOTE_NTP_TIME_ESTIMATOR_H_ - -#include - -#include "webrtc/base/constructormagic.h" -#include "webrtc/system_wrappers/include/rtp_to_ntp_estimator.h" - -namespace webrtc { - -class Clock; -class TimestampExtrapolator; - -// RemoteNtpTimeEstimator can be used to estimate a given RTP timestamp's NTP -// time in local timebase. -// Note that it needs to be trained with at least 2 RTCP SR (by calling -// |UpdateRtcpTimestamp|) before it can be used. -class RemoteNtpTimeEstimator { - public: - explicit RemoteNtpTimeEstimator(Clock* clock); - - ~RemoteNtpTimeEstimator(); - - // Updates the estimator with round trip time |rtt|, NTP seconds |ntp_secs|, - // NTP fraction |ntp_frac| and RTP timestamp |rtcp_timestamp|. - bool UpdateRtcpTimestamp(int64_t rtt, uint32_t ntp_secs, uint32_t ntp_frac, - uint32_t rtp_timestamp); - - // Estimates the NTP timestamp in local timebase from |rtp_timestamp|. - // Returns the NTP timestamp in ms when success. -1 if failed. - int64_t Estimate(uint32_t rtp_timestamp); - - private: - Clock* clock_; - std::unique_ptr ts_extrapolator_; - RtpToNtpEstimator rtp_to_ntp_; - int64_t last_timing_log_ms_; - RTC_DISALLOW_COPY_AND_ASSIGN(RemoteNtpTimeEstimator); -}; - -} // namespace webrtc - -#endif // WEBRTC_MODULES_RTP_RTCP_INCLUDE_REMOTE_NTP_TIME_ESTIMATOR_H_ diff --git a/WebRtc.NET/include/webrtc/modules/rtp_rtcp/include/rtp_payload_registry.h b/WebRtc.NET/include/webrtc/modules/rtp_rtcp/include/rtp_payload_registry.h deleted file mode 100644 index 668fe876..00000000 --- a/WebRtc.NET/include/webrtc/modules/rtp_rtcp/include/rtp_payload_registry.h +++ /dev/null @@ -1,145 +0,0 @@ -/* - * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MODULES_RTP_RTCP_INCLUDE_RTP_PAYLOAD_REGISTRY_H_ -#define WEBRTC_MODULES_RTP_RTCP_INCLUDE_RTP_PAYLOAD_REGISTRY_H_ - -#include -#include -#include - -#include "webrtc/base/criticalsection.h" -#include "webrtc/base/deprecation.h" -#include "webrtc/modules/rtp_rtcp/source/rtp_receiver_strategy.h" -#include "webrtc/modules/rtp_rtcp/source/rtp_utility.h" - -namespace webrtc { - -struct CodecInst; -class VideoCodec; - -// TODO(magjed): Remove once external code is updated. -class RTPPayloadStrategy { - public: - static RTPPayloadStrategy* CreateStrategy(bool handling_audio) { - return nullptr; - } -}; - -class RTPPayloadRegistry { - public: - RTPPayloadRegistry(); - ~RTPPayloadRegistry(); - // TODO(magjed): Remove once external code is updated. - explicit RTPPayloadRegistry(RTPPayloadStrategy* rtp_payload_strategy) - : RTPPayloadRegistry() {} - - // TODO(magjed): Split RTPPayloadRegistry into separate Audio and Video class - // and simplify the code. http://crbug/webrtc/6743. - int32_t RegisterReceivePayload(const CodecInst& audio_codec, - bool* created_new_payload_type); - int32_t RegisterReceivePayload(const VideoCodec& video_codec); - - int32_t DeRegisterReceivePayload(int8_t payload_type); - - int32_t ReceivePayloadType(const CodecInst& audio_codec, - int8_t* payload_type) const; - int32_t ReceivePayloadType(const VideoCodec& video_codec, - int8_t* payload_type) const; - - bool RtxEnabled() const; - - void SetRtxSsrc(uint32_t ssrc); - - bool GetRtxSsrc(uint32_t* ssrc) const; - - void SetRtxPayloadType(int payload_type, int associated_payload_type); - - bool IsRtx(const RTPHeader& header) const; - - bool RestoreOriginalPacket(uint8_t* restored_packet, - const uint8_t* packet, - size_t* packet_length, - uint32_t original_ssrc, - const RTPHeader& header); - - bool IsRed(const RTPHeader& header) const; - - // Returns true if the media of this RTP packet is encapsulated within an - // extra header, such as RTX or RED. - bool IsEncapsulated(const RTPHeader& header) const; - - bool GetPayloadSpecifics(uint8_t payload_type, PayloadUnion* payload) const; - - int GetPayloadTypeFrequency(uint8_t payload_type) const; - - const RtpUtility::Payload* PayloadTypeToPayload(uint8_t payload_type) const; - - void ResetLastReceivedPayloadTypes() { - rtc::CritScope cs(&crit_sect_); - last_received_payload_type_ = -1; - last_received_media_payload_type_ = -1; - } - - // This sets the payload type of the packets being received from the network - // on the media SSRC. For instance if packets are encapsulated with RED, this - // payload type will be the RED payload type. - void SetIncomingPayloadType(const RTPHeader& header); - - // Returns true if the new media payload type has not changed. - bool ReportMediaPayloadType(uint8_t media_payload_type); - - int8_t red_payload_type() const { return GetPayloadTypeWithName("red"); } - int8_t ulpfec_payload_type() const { - return GetPayloadTypeWithName("ulpfec"); - } - int8_t last_received_payload_type() const { - rtc::CritScope cs(&crit_sect_); - return last_received_payload_type_; - } - void set_last_received_payload_type(int8_t last_received_payload_type) { - rtc::CritScope cs(&crit_sect_); - last_received_payload_type_ = last_received_payload_type; - } - - int8_t last_received_media_payload_type() const { - rtc::CritScope cs(&crit_sect_); - return last_received_media_payload_type_; - } - - RTC_DEPRECATED void set_use_rtx_payload_mapping_on_restore(bool val) {} - - private: - // Prunes the payload type map of the specific payload type, if it exists. - void DeregisterAudioCodecOrRedTypeRegardlessOfPayloadType( - const CodecInst& audio_codec); - - bool IsRtxInternal(const RTPHeader& header) const; - // Returns the payload type for the payload with name |payload_name|, or -1 if - // no such payload is registered. - int8_t GetPayloadTypeWithName(const char* payload_name) const; - - rtc::CriticalSection crit_sect_; - std::map payload_type_map_; - int8_t incoming_payload_type_; - int8_t last_received_payload_type_; - int8_t last_received_media_payload_type_; - bool rtx_; - // Mapping rtx_payload_type_map_[rtx] = associated. - std::map rtx_payload_type_map_; - uint32_t ssrc_rtx_; - // Only warn once per payload type, if an RTX packet is received but - // no associated payload type found in |rtx_payload_type_map_|. - std::set payload_types_with_suppressed_warnings_ GUARDED_BY(crit_sect_); -}; - -} // namespace webrtc - -#endif // WEBRTC_MODULES_RTP_RTCP_INCLUDE_RTP_PAYLOAD_REGISTRY_H_ diff --git a/WebRtc.NET/include/webrtc/modules/rtp_rtcp/include/rtp_receiver.h b/WebRtc.NET/include/webrtc/modules/rtp_rtcp/include/rtp_receiver.h deleted file mode 100644 index 54a99c93..00000000 --- a/WebRtc.NET/include/webrtc/modules/rtp_rtcp/include/rtp_receiver.h +++ /dev/null @@ -1,95 +0,0 @@ -/* - * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MODULES_RTP_RTCP_INCLUDE_RTP_RECEIVER_H_ -#define WEBRTC_MODULES_RTP_RTCP_INCLUDE_RTP_RECEIVER_H_ - -#include "webrtc/modules/rtp_rtcp/include/rtp_rtcp_defines.h" -#include "webrtc/typedefs.h" - -namespace webrtc { - -struct CodecInst; -class RTPPayloadRegistry; -class VideoCodec; - -class TelephoneEventHandler { - public: - virtual ~TelephoneEventHandler() {} - - // The following three methods implement the TelephoneEventHandler interface. - // Forward DTMFs to decoder for playout. - virtual void SetTelephoneEventForwardToDecoder(bool forward_to_decoder) = 0; - - // Is forwarding of outband telephone events turned on/off? - virtual bool TelephoneEventForwardToDecoder() const = 0; - - // Is TelephoneEvent configured with payload type payload_type - virtual bool TelephoneEventPayloadType(const int8_t payload_type) const = 0; -}; - -class RtpReceiver { - public: - // Creates a video-enabled RTP receiver. - static RtpReceiver* CreateVideoReceiver( - Clock* clock, - RtpData* incoming_payload_callback, - RtpFeedback* incoming_messages_callback, - RTPPayloadRegistry* rtp_payload_registry); - - // Creates an audio-enabled RTP receiver. - static RtpReceiver* CreateAudioReceiver( - Clock* clock, - RtpData* incoming_payload_callback, - RtpFeedback* incoming_messages_callback, - RTPPayloadRegistry* rtp_payload_registry); - - virtual ~RtpReceiver() {} - - // Returns a TelephoneEventHandler if available. - virtual TelephoneEventHandler* GetTelephoneEventHandler() = 0; - - // Registers a receive payload in the payload registry and notifies the media - // receiver strategy. - virtual int32_t RegisterReceivePayload(const CodecInst& audio_codec) = 0; - // Registers a receive payload in the payload registry. - virtual int32_t RegisterReceivePayload(const VideoCodec& video_codec) = 0; - - // De-registers |payload_type| from the payload registry. - virtual int32_t DeRegisterReceivePayload(const int8_t payload_type) = 0; - - // Parses the media specific parts of an RTP packet and updates the receiver - // state. This for instance means that any changes in SSRC and payload type is - // detected and acted upon. - virtual bool IncomingRtpPacket(const RTPHeader& rtp_header, - const uint8_t* payload, - size_t payload_length, - PayloadUnion payload_specific, - bool in_order) = 0; - - // Gets the last received timestamp. Returns true if a packet has been - // received, false otherwise. - virtual bool Timestamp(uint32_t* timestamp) const = 0; - // Gets the time in milliseconds when the last timestamp was received. - // Returns true if a packet has been received, false otherwise. - virtual bool LastReceivedTimeMs(int64_t* receive_time_ms) const = 0; - - // Returns the remote SSRC of the currently received RTP stream. - virtual uint32_t SSRC() const = 0; - - // Returns the current remote CSRCs. - virtual int32_t CSRCs(uint32_t array_of_csrc[kRtpCsrcSize]) const = 0; - - // Returns the current energy of the RTP stream received. - virtual int32_t Energy(uint8_t array_of_energy[kRtpCsrcSize]) const = 0; -}; -} // namespace webrtc - -#endif // WEBRTC_MODULES_RTP_RTCP_INCLUDE_RTP_RECEIVER_H_ diff --git a/WebRtc.NET/include/webrtc/modules/rtp_rtcp/include/rtp_rtcp_defines.h b/WebRtc.NET/include/webrtc/modules/rtp_rtcp/include/rtp_rtcp_defines.h deleted file mode 100644 index 567fa0bc..00000000 --- a/WebRtc.NET/include/webrtc/modules/rtp_rtcp/include/rtp_rtcp_defines.h +++ /dev/null @@ -1,403 +0,0 @@ -/* - * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MODULES_RTP_RTCP_INCLUDE_RTP_RTCP_DEFINES_H_ -#define WEBRTC_MODULES_RTP_RTCP_INCLUDE_RTP_RTCP_DEFINES_H_ - -#include -#include -#include - -#include "webrtc/common_types.h" -#include "webrtc/modules/include/module_common_types.h" -#include "webrtc/system_wrappers/include/clock.h" -#include "webrtc/typedefs.h" - -#define RTCP_CNAME_SIZE 256 // RFC 3550 page 44, including null termination -#define IP_PACKET_SIZE 1500 // we assume ethernet -#define MAX_NUMBER_OF_PARALLEL_TELEPHONE_EVENTS 10 - -namespace webrtc { -namespace rtcp { -class TransportFeedback; -} - -const int kVideoPayloadTypeFrequency = 90000; -// TODO(solenberg): RTP time stamp rate for RTCP is fixed at 8k, this is legacy -// and should be fixed. -// See: https://bugs.chromium.org/p/webrtc/issues/detail?id=6458 -const int kBogusRtpRateForAudioRtcp = 8000; - -// Minimum RTP header size in bytes. -const uint8_t kRtpHeaderSize = 12; - -struct AudioPayload { - uint32_t frequency; - size_t channels; - uint32_t rate; -}; - -struct VideoPayload { - RtpVideoCodecTypes videoCodecType; - // The H264 profile only matters if videoCodecType == kRtpVideoH264. - H264::Profile h264_profile; -}; - -union PayloadUnion { - AudioPayload Audio; - VideoPayload Video; -}; - -enum RTPAliveType { kRtpDead = 0, kRtpNoRtp = 1, kRtpAlive = 2 }; - -enum ProtectionType { - kUnprotectedPacket, - kProtectedPacket -}; - -enum StorageType { - kDontRetransmit, - kAllowRetransmission -}; - -enum RTPExtensionType { - kRtpExtensionNone, - kRtpExtensionTransmissionTimeOffset, - kRtpExtensionAudioLevel, - kRtpExtensionAbsoluteSendTime, - kRtpExtensionVideoRotation, - kRtpExtensionTransportSequenceNumber, - kRtpExtensionPlayoutDelay, - kRtpExtensionNumberOfExtensions, -}; - -enum RTCPAppSubTypes { kAppSubtypeBwe = 0x00 }; - -// TODO(sprang): Make this an enum class once rtcp_receiver has been cleaned up. -enum RTCPPacketType : uint32_t { - kRtcpReport = 0x0001, - kRtcpSr = 0x0002, - kRtcpRr = 0x0004, - kRtcpSdes = 0x0008, - kRtcpBye = 0x0010, - kRtcpPli = 0x0020, - kRtcpNack = 0x0040, - kRtcpFir = 0x0080, - kRtcpTmmbr = 0x0100, - kRtcpTmmbn = 0x0200, - kRtcpSrReq = 0x0400, - kRtcpXrVoipMetric = 0x0800, - kRtcpApp = 0x1000, - kRtcpSli = 0x4000, - kRtcpRpsi = 0x8000, - kRtcpRemb = 0x10000, - kRtcpTransmissionTimeOffset = 0x20000, - kRtcpXrReceiverReferenceTime = 0x40000, - kRtcpXrDlrrReportBlock = 0x80000, - kRtcpTransportFeedback = 0x100000, - kRtcpXrTargetBitrate = 0x200000 -}; - -enum KeyFrameRequestMethod { kKeyFrameReqPliRtcp, kKeyFrameReqFirRtcp }; - -enum RtpRtcpPacketType { kPacketRtp = 0, kPacketKeepAlive = 1 }; - -enum RetransmissionMode : uint8_t { - kRetransmitOff = 0x0, - kRetransmitFECPackets = 0x1, - kRetransmitBaseLayer = 0x2, - kRetransmitHigherLayers = 0x4, - kRetransmitAllPackets = 0xFF -}; - -enum RtxMode { - kRtxOff = 0x0, - kRtxRetransmitted = 0x1, // Only send retransmissions over RTX. - kRtxRedundantPayloads = 0x2 // Preventively send redundant payloads - // instead of padding. -}; - -const size_t kRtxHeaderSize = 2; - -struct RTCPSenderInfo { - uint32_t NTPseconds; - uint32_t NTPfraction; - uint32_t RTPtimeStamp; - uint32_t sendPacketCount; - uint32_t sendOctetCount; -}; - -struct RTCPReportBlock { - RTCPReportBlock() - : remoteSSRC(0), sourceSSRC(0), fractionLost(0), cumulativeLost(0), - extendedHighSeqNum(0), jitter(0), lastSR(0), - delaySinceLastSR(0) {} - - RTCPReportBlock(uint32_t remote_ssrc, - uint32_t source_ssrc, - uint8_t fraction_lost, - uint32_t cumulative_lost, - uint32_t extended_high_sequence_number, - uint32_t jitter, - uint32_t last_sender_report, - uint32_t delay_since_last_sender_report) - : remoteSSRC(remote_ssrc), - sourceSSRC(source_ssrc), - fractionLost(fraction_lost), - cumulativeLost(cumulative_lost), - extendedHighSeqNum(extended_high_sequence_number), - jitter(jitter), - lastSR(last_sender_report), - delaySinceLastSR(delay_since_last_sender_report) {} - - // Fields as described by RFC 3550 6.4.2. - uint32_t remoteSSRC; // SSRC of sender of this report. - uint32_t sourceSSRC; // SSRC of the RTP packet sender. - uint8_t fractionLost; - uint32_t cumulativeLost; // 24 bits valid. - uint32_t extendedHighSeqNum; - uint32_t jitter; - uint32_t lastSR; - uint32_t delaySinceLastSR; -}; - -typedef std::list ReportBlockList; - -struct RtpState { - RtpState() - : sequence_number(0), - start_timestamp(0), - timestamp(0), - capture_time_ms(-1), - last_timestamp_time_ms(-1), - media_has_been_sent(false) {} - uint16_t sequence_number; - uint32_t start_timestamp; - uint32_t timestamp; - int64_t capture_time_ms; - int64_t last_timestamp_time_ms; - bool media_has_been_sent; -}; - -class RtpData { - public: - virtual ~RtpData() {} - - virtual int32_t OnReceivedPayloadData(const uint8_t* payload_data, - size_t payload_size, - const WebRtcRTPHeader* rtp_header) = 0; - - virtual bool OnRecoveredPacket(const uint8_t* packet, - size_t packet_length) = 0; -}; - -class RtpFeedback { - public: - virtual ~RtpFeedback() {} - - // Receiving payload change or SSRC change. (return success!) - /* - * channels - number of channels in codec (1 = mono, 2 = stereo) - */ - virtual int32_t OnInitializeDecoder( - int8_t payload_type, - const char payload_name[RTP_PAYLOAD_NAME_SIZE], - int frequency, - size_t channels, - uint32_t rate) = 0; - - virtual void OnIncomingSSRCChanged(uint32_t ssrc) = 0; - - virtual void OnIncomingCSRCChanged(uint32_t csrc, bool added) = 0; -}; - -class RtcpIntraFrameObserver { - public: - virtual void OnReceivedIntraFrameRequest(uint32_t ssrc) = 0; - - virtual void OnReceivedSLI(uint32_t ssrc, - uint8_t picture_id) = 0; - - virtual void OnReceivedRPSI(uint32_t ssrc, - uint64_t picture_id) = 0; - - virtual ~RtcpIntraFrameObserver() {} -}; - -class RtcpBandwidthObserver { - public: - // REMB or TMMBR - virtual void OnReceivedEstimatedBitrate(uint32_t bitrate) = 0; - - virtual void OnReceivedRtcpReceiverReport( - const ReportBlockList& report_blocks, - int64_t rtt, - int64_t now_ms) = 0; - - virtual ~RtcpBandwidthObserver() {} -}; - -struct PacketInfo { - PacketInfo(int64_t arrival_time_ms, uint16_t sequence_number) - : PacketInfo(-1, - arrival_time_ms, - -1, - sequence_number, - 0, - kNotAProbe) {} - - PacketInfo(int64_t arrival_time_ms, - int64_t send_time_ms, - uint16_t sequence_number, - size_t payload_size, - int probe_cluster_id) - : PacketInfo(-1, - arrival_time_ms, - send_time_ms, - sequence_number, - payload_size, - probe_cluster_id) {} - - PacketInfo(int64_t creation_time_ms, - int64_t arrival_time_ms, - int64_t send_time_ms, - uint16_t sequence_number, - size_t payload_size, - int probe_cluster_id) - : creation_time_ms(creation_time_ms), - arrival_time_ms(arrival_time_ms), - send_time_ms(send_time_ms), - sequence_number(sequence_number), - payload_size(payload_size), - probe_cluster_id(probe_cluster_id) {} - - static constexpr int kNotAProbe = -1; - - // Time corresponding to when this object was created. - int64_t creation_time_ms; - // Time corresponding to when the packet was received. Timestamped with the - // receiver's clock. - int64_t arrival_time_ms; - // Time corresponding to when the packet was sent, timestamped with the - // sender's clock. - int64_t send_time_ms; - // Packet identifier, incremented with 1 for every packet generated by the - // sender. - uint16_t sequence_number; - // Size of the packet excluding RTP headers. - size_t payload_size; - // Which probing cluster this packets belongs to. - int probe_cluster_id; -}; - -class TransportFeedbackObserver { - public: - TransportFeedbackObserver() {} - virtual ~TransportFeedbackObserver() {} - - // Note: Transport-wide sequence number as sequence number. Arrival time - // must be set to 0. - virtual void AddPacket(uint16_t sequence_number, - size_t length, - int probe_cluster_id) = 0; - - virtual void OnTransportFeedback(const rtcp::TransportFeedback& feedback) = 0; - - virtual std::vector GetTransportFeedbackVector() const = 0; -}; - -class RtcpRttStats { - public: - virtual void OnRttUpdate(int64_t rtt) = 0; - - virtual int64_t LastProcessedRtt() const = 0; - - virtual ~RtcpRttStats() {} -}; - -// Null object version of RtpFeedback. -class NullRtpFeedback : public RtpFeedback { - public: - virtual ~NullRtpFeedback() {} - - int32_t OnInitializeDecoder(int8_t payload_type, - const char payloadName[RTP_PAYLOAD_NAME_SIZE], - int frequency, - size_t channels, - uint32_t rate) override { - return 0; - } - - void OnIncomingSSRCChanged(uint32_t ssrc) override {} - void OnIncomingCSRCChanged(uint32_t csrc, bool added) override {} -}; - -// Null object version of RtpData. -class NullRtpData : public RtpData { - public: - virtual ~NullRtpData() {} - - int32_t OnReceivedPayloadData(const uint8_t* payload_data, - size_t payload_size, - const WebRtcRTPHeader* rtp_header) override { - return 0; - } - - bool OnRecoveredPacket(const uint8_t* packet, size_t packet_length) override { - return true; - } -}; - -// Statistics about packet loss for a single directional connection. All values -// are totals since the connection initiated. -struct RtpPacketLossStats { - // The number of packets lost in events where no adjacent packets were also - // lost. - uint64_t single_packet_loss_count; - // The number of events in which more than one adjacent packet was lost. - uint64_t multiple_packet_loss_event_count; - // The number of packets lost in events where more than one adjacent packet - // was lost. - uint64_t multiple_packet_loss_packet_count; -}; - -class RtpPacketSender { - public: - RtpPacketSender() {} - virtual ~RtpPacketSender() {} - - enum Priority { - kHighPriority = 0, // Pass through; will be sent immediately. - kNormalPriority = 2, // Put in back of the line. - kLowPriority = 3, // Put in back of the low priority line. - }; - // Low priority packets are mixed with the normal priority packets - // while we are paused. - - // Returns true if we send the packet now, else it will add the packet - // information to the queue and call TimeToSendPacket when it's time to send. - virtual void InsertPacket(Priority priority, - uint32_t ssrc, - uint16_t sequence_number, - int64_t capture_time_ms, - size_t bytes, - bool retransmission) = 0; -}; - -class TransportSequenceNumberAllocator { - public: - TransportSequenceNumberAllocator() {} - virtual ~TransportSequenceNumberAllocator() {} - - virtual uint16_t AllocateSequenceNumber() = 0; -}; - -} // namespace webrtc -#endif // WEBRTC_MODULES_RTP_RTCP_INCLUDE_RTP_RTCP_DEFINES_H_ diff --git a/WebRtc.NET/include/webrtc/modules/rtp_rtcp/mocks/mock_recovered_packet_receiver.h b/WebRtc.NET/include/webrtc/modules/rtp_rtcp/mocks/mock_recovered_packet_receiver.h deleted file mode 100644 index fcc637b0..00000000 --- a/WebRtc.NET/include/webrtc/modules/rtp_rtcp/mocks/mock_recovered_packet_receiver.h +++ /dev/null @@ -1,27 +0,0 @@ -/* - * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MODULES_RTP_RTCP_MOCKS_MOCK_RECOVERED_PACKET_RECEIVER_H_ -#define WEBRTC_MODULES_RTP_RTCP_MOCKS_MOCK_RECOVERED_PACKET_RECEIVER_H_ - -#include "webrtc/base/basictypes.h" -#include "webrtc/modules/rtp_rtcp/include/flexfec_receiver.h" -#include "webrtc/test/gmock.h" - -namespace webrtc { - -class MockRecoveredPacketReceiver : public RecoveredPacketReceiver { - public: - MOCK_METHOD2(OnRecoveredPacket, bool(const uint8_t* packet, size_t length)); -}; - -} // namespace webrtc - -#endif // WEBRTC_MODULES_RTP_RTCP_MOCKS_MOCK_RECOVERED_PACKET_RECEIVER_H_ diff --git a/WebRtc.NET/include/webrtc/modules/rtp_rtcp/mocks/mock_rtcp_rtt_stats.h b/WebRtc.NET/include/webrtc/modules/rtp_rtcp/mocks/mock_rtcp_rtt_stats.h deleted file mode 100644 index 5f2fae9e..00000000 --- a/WebRtc.NET/include/webrtc/modules/rtp_rtcp/mocks/mock_rtcp_rtt_stats.h +++ /dev/null @@ -1,25 +0,0 @@ -/* - * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MODULES_RTP_RTCP_MOCKS_MOCK_RTCP_RTT_STATS_H_ -#define WEBRTC_MODULES_RTP_RTCP_MOCKS_MOCK_RTCP_RTT_STATS_H_ - -#include "webrtc/modules/rtp_rtcp/include/rtp_rtcp_defines.h" -#include "webrtc/test/gmock.h" - -namespace webrtc { - -class MockRtcpRttStats : public RtcpRttStats { - public: - MOCK_METHOD1(OnRttUpdate, void(int64_t rtt)); - MOCK_CONST_METHOD0(LastProcessedRtt, int64_t()); -}; -} // namespace webrtc -#endif // WEBRTC_MODULES_RTP_RTCP_MOCKS_MOCK_RTCP_RTT_STATS_H_ diff --git a/WebRtc.NET/include/webrtc/modules/rtp_rtcp/mocks/mock_rtp_rtcp.h b/WebRtc.NET/include/webrtc/modules/rtp_rtcp/mocks/mock_rtp_rtcp.h deleted file mode 100644 index fc93655a..00000000 --- a/WebRtc.NET/include/webrtc/modules/rtp_rtcp/mocks/mock_rtp_rtcp.h +++ /dev/null @@ -1,212 +0,0 @@ -/* - * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MODULES_RTP_RTCP_MOCKS_MOCK_RTP_RTCP_H_ -#define WEBRTC_MODULES_RTP_RTCP_MOCKS_MOCK_RTP_RTCP_H_ - -#include -#include -#include - -#include "webrtc/base/optional.h" -#include "webrtc/modules/include/module.h" -#include "webrtc/modules/rtp_rtcp/include/rtp_rtcp.h" -#include "webrtc/modules/rtp_rtcp/include/rtp_rtcp_defines.h" -#include "webrtc/modules/rtp_rtcp/source/rtcp_packet/transport_feedback.h" -#include "webrtc/test/gmock.h" - -namespace webrtc { - -class MockRtpData : public RtpData { - public: - MOCK_METHOD3(OnReceivedPayloadData, - int32_t(const uint8_t* payload_data, - size_t payload_size, - const WebRtcRTPHeader* rtp_header)); - - MOCK_METHOD2(OnRecoveredPacket, - bool(const uint8_t* packet, size_t packet_length)); -}; - -class MockRtpRtcp : public RtpRtcp { - public: - MOCK_METHOD1(RegisterDefaultModule, int32_t(RtpRtcp* module)); - MOCK_METHOD0(DeRegisterDefaultModule, int32_t()); - MOCK_METHOD0(DefaultModuleRegistered, bool()); - MOCK_METHOD0(NumberChildModules, uint32_t()); - MOCK_METHOD1(RegisterSyncModule, int32_t(RtpRtcp* module)); - MOCK_METHOD0(DeRegisterSyncModule, int32_t()); - MOCK_METHOD2(IncomingRtcpPacket, - int32_t(const uint8_t* incoming_packet, size_t packet_length)); - MOCK_METHOD1(SetRemoteSSRC, void(uint32_t ssrc)); - MOCK_METHOD4(IncomingAudioNTP, - int32_t(uint32_t audio_received_ntp_secs, - uint32_t audio_received_ntp_frac, - uint32_t audio_rtcp_arrival_time_secs, - uint32_t audio_rtcp_arrival_time_frac)); - MOCK_METHOD0(InitSender, int32_t()); - MOCK_METHOD1(RegisterSendTransport, int32_t(Transport* outgoing_transport)); - MOCK_METHOD1(SetMaxRtpPacketSize, void(size_t size)); - MOCK_METHOD1(SetTransportOverhead, void(int transport_overhead_per_packet)); - MOCK_CONST_METHOD0(MaxPayloadSize, size_t()); - MOCK_CONST_METHOD0(MaxRtpPacketSize, size_t()); - MOCK_METHOD1(RegisterSendPayload, int32_t(const CodecInst& voice_codec)); - MOCK_METHOD1(RegisterSendPayload, int32_t(const VideoCodec& video_codec)); - MOCK_METHOD2(RegisterVideoSendPayload, - void(int payload_type, const char* payload_name)); - MOCK_METHOD1(DeRegisterSendPayload, int32_t(int8_t payload_type)); - MOCK_METHOD2(RegisterSendRtpHeaderExtension, - int32_t(RTPExtensionType type, uint8_t id)); - MOCK_METHOD1(DeregisterSendRtpHeaderExtension, - int32_t(RTPExtensionType type)); - MOCK_CONST_METHOD0(StartTimestamp, uint32_t()); - MOCK_METHOD1(SetStartTimestamp, void(uint32_t timestamp)); - MOCK_CONST_METHOD0(SequenceNumber, uint16_t()); - MOCK_METHOD1(SetSequenceNumber, void(uint16_t seq)); - MOCK_METHOD1(SetRtpState, void(const RtpState& rtp_state)); - MOCK_METHOD1(SetRtxState, void(const RtpState& rtp_state)); - MOCK_CONST_METHOD0(GetRtpState, RtpState()); - MOCK_CONST_METHOD0(GetRtxState, RtpState()); - MOCK_CONST_METHOD0(SSRC, uint32_t()); - MOCK_METHOD1(SetSSRC, void(uint32_t ssrc)); - MOCK_CONST_METHOD1(CSRCs, int32_t(uint32_t csrcs[kRtpCsrcSize])); - MOCK_METHOD1(SetCsrcs, void(const std::vector& csrcs)); - MOCK_METHOD1(SetCSRCStatus, int32_t(bool include)); - MOCK_METHOD1(SetRtxSendStatus, void(int modes)); - MOCK_CONST_METHOD0(RtxSendStatus, int()); - MOCK_METHOD1(SetRtxSsrc, void(uint32_t)); - MOCK_METHOD2(SetRtxSendPayloadType, void(int, int)); - MOCK_CONST_METHOD0(FlexfecSsrc, rtc::Optional()); - MOCK_CONST_METHOD0(RtxSendPayloadType, std::pair()); - MOCK_METHOD1(SetSendingStatus, int32_t(bool sending)); - MOCK_CONST_METHOD0(Sending, bool()); - MOCK_METHOD1(SetSendingMediaStatus, void(bool sending)); - MOCK_CONST_METHOD0(SendingMedia, bool()); - MOCK_CONST_METHOD4(BitrateSent, - void(uint32_t* total_rate, - uint32_t* video_rate, - uint32_t* fec_rate, - uint32_t* nack_rate)); - MOCK_METHOD1(RegisterVideoBitrateObserver, void(BitrateStatisticsObserver*)); - MOCK_CONST_METHOD0(GetVideoBitrateObserver, BitrateStatisticsObserver*(void)); - MOCK_CONST_METHOD1(EstimatedReceiveBandwidth, - int(uint32_t* available_bandwidth)); - MOCK_METHOD9(SendOutgoingData, - bool(FrameType frame_type, - int8_t payload_type, - uint32_t timestamp, - int64_t capture_time_ms, - const uint8_t* payload_data, - size_t payload_size, - const RTPFragmentationHeader* fragmentation, - const RTPVideoHeader* rtp_video_header, - uint32_t* frame_id_out)); - MOCK_METHOD5(TimeToSendPacket, - bool(uint32_t ssrc, - uint16_t sequence_number, - int64_t capture_time_ms, - bool retransmission, - int probe_cluster_id)); - MOCK_METHOD2(TimeToSendPadding, size_t(size_t bytes, int probe_cluster_id)); - MOCK_METHOD2(RegisterRtcpObservers, - void(RtcpIntraFrameObserver* intra_frame_callback, - RtcpBandwidthObserver* bandwidth_callback)); - MOCK_CONST_METHOD0(RTCP, RtcpMode()); - MOCK_METHOD1(SetRTCPStatus, void(RtcpMode method)); - MOCK_METHOD1(SetCNAME, int32_t(const char cname[RTCP_CNAME_SIZE])); - MOCK_CONST_METHOD2(RemoteCNAME, - int32_t(uint32_t remote_ssrc, - char cname[RTCP_CNAME_SIZE])); - MOCK_CONST_METHOD5(RemoteNTP, - int32_t(uint32_t* received_ntp_secs, - uint32_t* received_ntp_frac, - uint32_t* rtcp_arrival_time_secs, - uint32_t* rtcp_arrival_time_frac, - uint32_t* rtcp_timestamp)); - MOCK_METHOD2(AddMixedCNAME, - int32_t(uint32_t ssrc, const char cname[RTCP_CNAME_SIZE])); - MOCK_METHOD1(RemoveMixedCNAME, int32_t(uint32_t ssrc)); - MOCK_CONST_METHOD5(RTT, - int32_t(uint32_t remote_ssrc, - int64_t* rtt, - int64_t* avg_rtt, - int64_t* min_rtt, - int64_t* max_rtt)); - MOCK_METHOD1(SendRTCP, int32_t(RTCPPacketType packet_type)); - MOCK_METHOD1(SendCompoundRTCP, - int32_t(const std::set& packet_types)); - MOCK_METHOD1(SendRTCPReferencePictureSelection, int32_t(uint64_t picture_id)); - MOCK_METHOD1(SendRTCPSliceLossIndication, int32_t(uint8_t picture_id)); - MOCK_CONST_METHOD2(DataCountersRTP, - int32_t(size_t* bytes_sent, uint32_t* packets_sent)); - MOCK_CONST_METHOD2(GetSendStreamDataCounters, - void(StreamDataCounters*, StreamDataCounters*)); - MOCK_CONST_METHOD3(GetRtpPacketLossStats, - void(bool, uint32_t, struct RtpPacketLossStats*)); - MOCK_METHOD1(RemoteRTCPStat, int32_t(RTCPSenderInfo* sender_info)); - MOCK_CONST_METHOD1(RemoteRTCPStat, - int32_t(std::vector* receive_blocks)); - MOCK_METHOD4(SetRTCPApplicationSpecificData, - int32_t(uint8_t sub_type, - uint32_t name, - const uint8_t* data, - uint16_t length)); - MOCK_METHOD1(SetRTCPVoIPMetrics, int32_t(const RTCPVoIPMetric* voip_metric)); - MOCK_METHOD1(SetRtcpXrRrtrStatus, void(bool enable)); - MOCK_CONST_METHOD0(RtcpXrRrtrStatus, bool()); - MOCK_CONST_METHOD0(REMB, bool()); - MOCK_METHOD1(SetREMBStatus, void(bool enable)); - MOCK_METHOD2(SetREMBData, - void(uint32_t bitrate, const std::vector& ssrcs)); - MOCK_CONST_METHOD0(TMMBR, bool()); - MOCK_METHOD1(SetTMMBRStatus, void(bool enable)); - MOCK_METHOD1(OnBandwidthEstimateUpdate, void(uint16_t bandwidth_kbit)); - MOCK_CONST_METHOD0(SelectiveRetransmissions, int()); - MOCK_METHOD1(SetSelectiveRetransmissions, int(uint8_t settings)); - MOCK_METHOD2(SendNACK, int32_t(const uint16_t* nack_list, uint16_t size)); - MOCK_METHOD1(SendNack, void(const std::vector& sequence_numbers)); - MOCK_METHOD2(SetStorePacketsStatus, - void(bool enable, uint16_t number_to_store)); - MOCK_CONST_METHOD0(StorePackets, bool()); - MOCK_METHOD1(RegisterRtcpStatisticsCallback, void(RtcpStatisticsCallback*)); - MOCK_METHOD0(GetRtcpStatisticsCallback, RtcpStatisticsCallback*()); - MOCK_METHOD1(SendFeedbackPacket, bool(const rtcp::TransportFeedback& packet)); - MOCK_METHOD1(SetAudioPacketSize, int32_t(uint16_t packet_size_samples)); - MOCK_METHOD3(SendTelephoneEventOutband, - int32_t(uint8_t key, uint16_t time_ms, uint8_t level)); - MOCK_METHOD1(SetSendREDPayloadType, int32_t(int8_t payload_type)); - MOCK_CONST_METHOD1(SendREDPayloadType, int32_t(int8_t* payload_type)); - MOCK_METHOD2(SetRTPAudioLevelIndicationStatus, - int32_t(bool enable, uint8_t id)); - MOCK_METHOD1(SetAudioLevel, int32_t(uint8_t level_dbov)); - MOCK_METHOD1(SetTargetSendBitrate, void(uint32_t bitrate_bps)); - MOCK_METHOD2(SetUlpfecConfig, - void(int red_payload_type, int fec_payload_type)); - MOCK_METHOD2(SetFecParameters, - bool(const FecProtectionParams& delta_params, - const FecProtectionParams& key_params)); - MOCK_METHOD1(SetKeyFrameRequestMethod, int32_t(KeyFrameRequestMethod method)); - MOCK_METHOD0(RequestKeyFrame, int32_t()); - MOCK_METHOD0(TimeUntilNextProcess, int64_t()); - MOCK_METHOD0(Process, void()); - MOCK_METHOD1(RegisterSendFrameCountObserver, void(FrameCountObserver*)); - MOCK_CONST_METHOD0(GetSendFrameCountObserver, FrameCountObserver*(void)); - MOCK_METHOD1(RegisterSendChannelRtpStatisticsCallback, - void(StreamDataCountersCallback*)); - MOCK_CONST_METHOD0(GetSendChannelRtpStatisticsCallback, - StreamDataCountersCallback*(void)); - MOCK_METHOD1(SetVideoBitrateAllocation, void(const BitrateAllocation&)); - // Members. - unsigned int remote_ssrc_; -}; - -} // namespace webrtc - -#endif // WEBRTC_MODULES_RTP_RTCP_MOCKS_MOCK_RTP_RTCP_H_ diff --git a/WebRtc.NET/include/webrtc/modules/rtp_rtcp/source/fec_private_tables_bursty.h b/WebRtc.NET/include/webrtc/modules/rtp_rtcp/source/fec_private_tables_bursty.h deleted file mode 100644 index 0b39908b..00000000 --- a/WebRtc.NET/include/webrtc/modules/rtp_rtcp/source/fec_private_tables_bursty.h +++ /dev/null @@ -1,762 +0,0 @@ -/* - * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MODULES_RTP_RTCP_SOURCE_FEC_PRIVATE_TABLES_BURSTY_H_ -#define WEBRTC_MODULES_RTP_RTCP_SOURCE_FEC_PRIVATE_TABLES_BURSTY_H_ - -// This file contains a set of packets masks for the FEC code. The masks in -// this table are specifically designed to favor recovery of bursty/consecutive -// loss network conditions. The tradeoff is worse recovery for random losses. -// These packet masks are currently defined to protect up to 12 media packets. -// They have the following property: for any packet mask defined by the -// parameters (k,m), where k = number of media packets, m = number of FEC -// packets, all "consecutive" losses of size <= m are completely recoverable. -// By consecutive losses we mean consecutive with respect to the sequence -// number ordering of the list (media and FEC) of packets. The difference -// between these masks (|kFecMaskBursty|) and |kFecMaskRandom| type, defined -// in fec_private_tables.h, is more significant for longer codes -// (i.e., more packets/symbols in the code, so larger (k,m), i.e., k > 4, -// m > 3). - -#include "webrtc/typedefs.h" - -namespace webrtc { -namespace fec_private_tables { - -const uint8_t kMaskBursty1_1[2] = { - 0x80, 0x00 -}; - -const uint8_t kMaskBursty2_1[2] = { - 0xc0, 0x00 -}; - -const uint8_t kMaskBursty2_2[4] = { - 0x80, 0x00, - 0xc0, 0x00 -}; - -const uint8_t kMaskBursty3_1[2] = { - 0xe0, 0x00 -}; - -const uint8_t kMaskBursty3_2[4] = { - 0xc0, 0x00, - 0xa0, 0x00 -}; - -const uint8_t kMaskBursty3_3[6] = { - 0x80, 0x00, - 0xc0, 0x00, - 0x60, 0x00 -}; - -const uint8_t kMaskBursty4_1[2] = { - 0xf0, 0x00 -}; - -const uint8_t kMaskBursty4_2[4] = { - 0xa0, 0x00, - 0xd0, 0x00 -}; - -const uint8_t kMaskBursty4_3[6] = { - 0xc0, 0x00, - 0x60, 0x00, - 0x90, 0x00 -}; - -const uint8_t kMaskBursty4_4[8] = { - 0x80, 0x00, - 0xc0, 0x00, - 0x60, 0x00, - 0x30, 0x00 -}; - -const uint8_t kMaskBursty5_1[2] = { - 0xf8, 0x00 -}; - -const uint8_t kMaskBursty5_2[4] = { - 0xd0, 0x00, - 0xa8, 0x00 -}; - -const uint8_t kMaskBursty5_3[6] = { - 0x70, 0x00, - 0x90, 0x00, - 0xc8, 0x00 -}; - -const uint8_t kMaskBursty5_4[8] = { - 0xc0, 0x00, - 0x60, 0x00, - 0x30, 0x00, - 0x88, 0x00 -}; - -const uint8_t kMaskBursty5_5[10] = { - 0x80, 0x00, - 0xc0, 0x00, - 0x60, 0x00, - 0x30, 0x00, - 0x18, 0x00 -}; - -const uint8_t kMaskBursty6_1[2] = { - 0xfc, 0x00 -}; - -const uint8_t kMaskBursty6_2[4] = { - 0xa8, 0x00, - 0xd4, 0x00 -}; - -const uint8_t kMaskBursty6_3[6] = { - 0x94, 0x00, - 0xc8, 0x00, - 0x64, 0x00 -}; - -const uint8_t kMaskBursty6_4[8] = { - 0x60, 0x00, - 0x38, 0x00, - 0x88, 0x00, - 0xc4, 0x00 -}; - -const uint8_t kMaskBursty6_5[10] = { - 0xc0, 0x00, - 0x60, 0x00, - 0x30, 0x00, - 0x18, 0x00, - 0x84, 0x00 -}; - -const uint8_t kMaskBursty6_6[12] = { - 0x80, 0x00, - 0xc0, 0x00, - 0x60, 0x00, - 0x30, 0x00, - 0x18, 0x00, - 0x0c, 0x00 -}; - -const uint8_t kMaskBursty7_1[2] = { - 0xfe, 0x00 -}; - -const uint8_t kMaskBursty7_2[4] = { - 0xd4, 0x00, - 0xaa, 0x00 -}; - -const uint8_t kMaskBursty7_3[6] = { - 0xc8, 0x00, - 0x74, 0x00, - 0x92, 0x00 -}; - -const uint8_t kMaskBursty7_4[8] = { - 0x38, 0x00, - 0x8a, 0x00, - 0xc4, 0x00, - 0x62, 0x00 -}; - -const uint8_t kMaskBursty7_5[10] = { - 0x60, 0x00, - 0x30, 0x00, - 0x1c, 0x00, - 0x84, 0x00, - 0xc2, 0x00 -}; - -const uint8_t kMaskBursty7_6[12] = { - 0xc0, 0x00, - 0x60, 0x00, - 0x30, 0x00, - 0x18, 0x00, - 0x0c, 0x00, - 0x82, 0x00 -}; - -const uint8_t kMaskBursty7_7[14] = { - 0x80, 0x00, - 0xc0, 0x00, - 0x60, 0x00, - 0x30, 0x00, - 0x18, 0x00, - 0x0c, 0x00, - 0x06, 0x00 -}; - -const uint8_t kMaskBursty8_1[2] = { - 0xff, 0x00 -}; - -const uint8_t kMaskBursty8_2[4] = { - 0xaa, 0x00, - 0xd5, 0x00 -}; - -const uint8_t kMaskBursty8_3[6] = { - 0x74, 0x00, - 0x92, 0x00, - 0xc9, 0x00 -}; - -const uint8_t kMaskBursty8_4[8] = { - 0x8a, 0x00, - 0xc5, 0x00, - 0x62, 0x00, - 0x31, 0x00 -}; - -const uint8_t kMaskBursty8_5[10] = { - 0x30, 0x00, - 0x1c, 0x00, - 0x85, 0x00, - 0xc2, 0x00, - 0x61, 0x00 -}; - -const uint8_t kMaskBursty8_6[12] = { - 0x60, 0x00, - 0x30, 0x00, - 0x18, 0x00, - 0x0e, 0x00, - 0x82, 0x00, - 0xc1, 0x00 -}; - -const uint8_t kMaskBursty8_7[14] = { - 0xc0, 0x00, - 0x60, 0x00, - 0x30, 0x00, - 0x18, 0x00, - 0x0c, 0x00, - 0x06, 0x00, - 0x81, 0x00 -}; - -const uint8_t kMaskBursty8_8[16] = { - 0x80, 0x00, - 0xc0, 0x00, - 0x60, 0x00, - 0x30, 0x00, - 0x18, 0x00, - 0x0c, 0x00, - 0x06, 0x00, - 0x03, 0x00 -}; - -const uint8_t kMaskBursty9_1[2] = { - 0xff, 0x80 -}; - -const uint8_t kMaskBursty9_2[4] = { - 0xd5, 0x00, - 0xaa, 0x80 -}; - -const uint8_t kMaskBursty9_3[6] = { - 0x92, 0x00, - 0xc9, 0x00, - 0x74, 0x80 -}; - -const uint8_t kMaskBursty9_4[8] = { - 0xc5, 0x00, - 0x62, 0x00, - 0x39, 0x00, - 0x8a, 0x80 -}; - -const uint8_t kMaskBursty9_5[10] = { - 0x1c, 0x00, - 0x85, 0x00, - 0xc2, 0x80, - 0x61, 0x00, - 0x30, 0x80 -}; - -const uint8_t kMaskBursty9_6[12] = { - 0x30, 0x00, - 0x18, 0x00, - 0x0e, 0x00, - 0x82, 0x80, - 0xc1, 0x00, - 0x60, 0x80 -}; - -const uint8_t kMaskBursty9_7[14] = { - 0x60, 0x00, - 0x30, 0x00, - 0x18, 0x00, - 0x0c, 0x00, - 0x07, 0x00, - 0x81, 0x00, - 0xc0, 0x80 -}; - -const uint8_t kMaskBursty9_8[16] = { - 0xc0, 0x00, - 0x60, 0x00, - 0x30, 0x00, - 0x18, 0x00, - 0x0c, 0x00, - 0x06, 0x00, - 0x03, 0x00, - 0x80, 0x80 -}; - -const uint8_t kMaskBursty9_9[18] = { - 0x80, 0x00, - 0xc0, 0x00, - 0x60, 0x00, - 0x30, 0x00, - 0x18, 0x00, - 0x0c, 0x00, - 0x06, 0x00, - 0x03, 0x00, - 0x01, 0x80 -}; - -const uint8_t kMaskBursty10_1[2] = { - 0xff, 0xc0 -}; - -const uint8_t kMaskBursty10_2[4] = { - 0xaa, 0x80, - 0xd5, 0x40 -}; - -const uint8_t kMaskBursty10_3[6] = { - 0xc9, 0x00, - 0x74, 0x80, - 0x92, 0x40 -}; - -const uint8_t kMaskBursty10_4[8] = { - 0x62, 0x00, - 0x39, 0x00, - 0x8a, 0x80, - 0xc5, 0x40 -}; - -const uint8_t kMaskBursty10_5[10] = { - 0x85, 0x00, - 0xc2, 0x80, - 0x61, 0x40, - 0x30, 0x80, - 0x18, 0x40 -}; - -const uint8_t kMaskBursty10_6[12] = { - 0x18, 0x00, - 0x0e, 0x00, - 0x82, 0x80, - 0xc1, 0x40, - 0x60, 0x80, - 0x30, 0x40 -}; - -const uint8_t kMaskBursty10_7[14] = { - 0x30, 0x00, - 0x18, 0x00, - 0x0c, 0x00, - 0x07, 0x00, - 0x81, 0x40, - 0xc0, 0x80, - 0x60, 0x40 -}; - -const uint8_t kMaskBursty10_8[16] = { - 0x60, 0x00, - 0x30, 0x00, - 0x18, 0x00, - 0x0c, 0x00, - 0x06, 0x00, - 0x03, 0x00, - 0x80, 0x80, - 0xc0, 0x40 -}; - -const uint8_t kMaskBursty10_9[18] = { - 0xc0, 0x00, - 0x60, 0x00, - 0x30, 0x00, - 0x18, 0x00, - 0x0c, 0x00, - 0x06, 0x00, - 0x03, 0x00, - 0x01, 0x80, - 0x80, 0x40 -}; - -const uint8_t kMaskBursty10_10[20] = { - 0x80, 0x00, - 0xc0, 0x00, - 0x60, 0x00, - 0x30, 0x00, - 0x18, 0x00, - 0x0c, 0x00, - 0x06, 0x00, - 0x03, 0x00, - 0x01, 0x80, - 0x00, 0xc0 -}; - -const uint8_t kMaskBursty11_1[2] = { - 0xff, 0xe0 -}; - -const uint8_t kMaskBursty11_2[4] = { - 0xd5, 0x40, - 0xaa, 0xa0 -}; - -const uint8_t kMaskBursty11_3[6] = { - 0x74, 0x80, - 0x92, 0x40, - 0xc9, 0x20 -}; - -const uint8_t kMaskBursty11_4[8] = { - 0x39, 0x00, - 0x8a, 0x80, - 0xc5, 0x40, - 0x62, 0x20 -}; - -const uint8_t kMaskBursty11_5[10] = { - 0xc2, 0xc0, - 0x61, 0x00, - 0x30, 0xa0, - 0x1c, 0x40, - 0x85, 0x20 -}; - -const uint8_t kMaskBursty11_6[12] = { - 0x0e, 0x00, - 0x82, 0x80, - 0xc1, 0x40, - 0x60, 0xa0, - 0x30, 0x40, - 0x18, 0x20 -}; - -const uint8_t kMaskBursty11_7[14] = { - 0x18, 0x00, - 0x0c, 0x00, - 0x07, 0x00, - 0x81, 0x40, - 0xc0, 0xa0, - 0x60, 0x40, - 0x30, 0x20 -}; - -const uint8_t kMaskBursty11_8[16] = { - 0x30, 0x00, - 0x18, 0x00, - 0x0c, 0x00, - 0x06, 0x00, - 0x03, 0x40, - 0x80, 0xa0, - 0xc0, 0x40, - 0x60, 0x20 -}; - -const uint8_t kMaskBursty11_9[18] = { - 0x60, 0x00, - 0x30, 0x00, - 0x18, 0x00, - 0x0c, 0x00, - 0x06, 0x00, - 0x03, 0x00, - 0x01, 0x80, - 0x80, 0x40, - 0xc0, 0x20 -}; - -const uint8_t kMaskBursty11_10[20] = { - 0xc0, 0x00, - 0x60, 0x00, - 0x30, 0x00, - 0x18, 0x00, - 0x0c, 0x00, - 0x06, 0x00, - 0x03, 0x00, - 0x01, 0x80, - 0x00, 0xc0, - 0x80, 0x20 -}; - -const uint8_t kMaskBursty11_11[22] = { - 0x80, 0x00, - 0xc0, 0x00, - 0x60, 0x00, - 0x30, 0x00, - 0x18, 0x00, - 0x0c, 0x00, - 0x06, 0x00, - 0x03, 0x00, - 0x01, 0x80, - 0x00, 0xc0, - 0x00, 0x60 -}; - -const uint8_t kMaskBursty12_1[2] = { - 0xff, 0xf0 -}; - -const uint8_t kMaskBursty12_2[4] = { - 0xaa, 0xa0, - 0xd5, 0x50 -}; - -const uint8_t kMaskBursty12_3[6] = { - 0x92, 0x40, - 0xc9, 0x20, - 0x74, 0x90 -}; - -const uint8_t kMaskBursty12_4[8] = { - 0x8a, 0x80, - 0xc5, 0x40, - 0x62, 0x20, - 0x39, 0x10 -}; - -const uint8_t kMaskBursty12_5[10] = { - 0x61, 0x00, - 0x30, 0xa0, - 0x1c, 0x50, - 0x85, 0x20, - 0xc2, 0x90 -}; - -const uint8_t kMaskBursty12_6[12] = { - 0x82, 0x90, - 0xc1, 0x40, - 0x60, 0xa0, - 0x30, 0x50, - 0x18, 0x20, - 0x0c, 0x10 -}; - -const uint8_t kMaskBursty12_7[14] = { - 0x0c, 0x00, - 0x07, 0x00, - 0x81, 0x40, - 0xc0, 0xa0, - 0x60, 0x50, - 0x30, 0x20, - 0x18, 0x10 -}; - -const uint8_t kMaskBursty12_8[16] = { - 0x18, 0x00, - 0x0c, 0x00, - 0x06, 0x00, - 0x03, 0x00, - 0x80, 0xa0, - 0xc0, 0x50, - 0x60, 0x20, - 0x30, 0x10 -}; - -const uint8_t kMaskBursty12_9[18] = { - 0x30, 0x00, - 0x18, 0x00, - 0x0c, 0x00, - 0x06, 0x00, - 0x03, 0x00, - 0x01, 0x80, - 0x80, 0x50, - 0xc0, 0x20, - 0x60, 0x10 -}; - -const uint8_t kMaskBursty12_10[20] = { - 0x60, 0x00, - 0x30, 0x00, - 0x18, 0x00, - 0x0c, 0x00, - 0x06, 0x00, - 0x03, 0x00, - 0x01, 0x80, - 0x00, 0xc0, - 0x80, 0x20, - 0xc0, 0x10 -}; - -const uint8_t kMaskBursty12_11[22] = { - 0xc0, 0x00, - 0x60, 0x00, - 0x30, 0x00, - 0x18, 0x00, - 0x0c, 0x00, - 0x06, 0x00, - 0x03, 0x00, - 0x01, 0x80, - 0x00, 0xc0, - 0x00, 0x60, - 0x80, 0x10 -}; - -const uint8_t kMaskBursty12_12[24] = { - 0x80, 0x00, - 0xc0, 0x00, - 0x60, 0x00, - 0x30, 0x00, - 0x18, 0x00, - 0x0c, 0x00, - 0x06, 0x00, - 0x03, 0x00, - 0x01, 0x80, - 0x00, 0xc0, - 0x00, 0x60, - 0x00, 0x30 -}; - -const uint8_t* kPacketMaskBursty1[1] = { - kMaskBursty1_1 -}; - -const uint8_t* kPacketMaskBursty2[2] = { - kMaskBursty2_1, - kMaskBursty2_2 -}; - -const uint8_t* kPacketMaskBursty3[3] = { - kMaskBursty3_1, - kMaskBursty3_2, - kMaskBursty3_3 -}; - -const uint8_t* kPacketMaskBursty4[4] = { - kMaskBursty4_1, - kMaskBursty4_2, - kMaskBursty4_3, - kMaskBursty4_4 -}; - -const uint8_t* kPacketMaskBursty5[5] = { - kMaskBursty5_1, - kMaskBursty5_2, - kMaskBursty5_3, - kMaskBursty5_4, - kMaskBursty5_5 -}; - -const uint8_t* kPacketMaskBursty6[6] = { - kMaskBursty6_1, - kMaskBursty6_2, - kMaskBursty6_3, - kMaskBursty6_4, - kMaskBursty6_5, - kMaskBursty6_6 -}; - -const uint8_t* kPacketMaskBursty7[7] = { - kMaskBursty7_1, - kMaskBursty7_2, - kMaskBursty7_3, - kMaskBursty7_4, - kMaskBursty7_5, - kMaskBursty7_6, - kMaskBursty7_7 -}; - -const uint8_t* kPacketMaskBursty8[8] = { - kMaskBursty8_1, - kMaskBursty8_2, - kMaskBursty8_3, - kMaskBursty8_4, - kMaskBursty8_5, - kMaskBursty8_6, - kMaskBursty8_7, - kMaskBursty8_8 -}; - -const uint8_t* kPacketMaskBursty9[9] = { - kMaskBursty9_1, - kMaskBursty9_2, - kMaskBursty9_3, - kMaskBursty9_4, - kMaskBursty9_5, - kMaskBursty9_6, - kMaskBursty9_7, - kMaskBursty9_8, - kMaskBursty9_9 -}; - -const uint8_t* kPacketMaskBursty10[10] = { - kMaskBursty10_1, - kMaskBursty10_2, - kMaskBursty10_3, - kMaskBursty10_4, - kMaskBursty10_5, - kMaskBursty10_6, - kMaskBursty10_7, - kMaskBursty10_8, - kMaskBursty10_9, - kMaskBursty10_10 -}; - -const uint8_t* kPacketMaskBursty11[11] = { - kMaskBursty11_1, - kMaskBursty11_2, - kMaskBursty11_3, - kMaskBursty11_4, - kMaskBursty11_5, - kMaskBursty11_6, - kMaskBursty11_7, - kMaskBursty11_8, - kMaskBursty11_9, - kMaskBursty11_10, - kMaskBursty11_11 -}; - -const uint8_t* kPacketMaskBursty12[12] = { - kMaskBursty12_1, - kMaskBursty12_2, - kMaskBursty12_3, - kMaskBursty12_4, - kMaskBursty12_5, - kMaskBursty12_6, - kMaskBursty12_7, - kMaskBursty12_8, - kMaskBursty12_9, - kMaskBursty12_10, - kMaskBursty12_11, - kMaskBursty12_12 -}; - -const uint8_t** kPacketMaskBurstyTbl[12] = { - kPacketMaskBursty1, - kPacketMaskBursty2, - kPacketMaskBursty3, - kPacketMaskBursty4, - kPacketMaskBursty5, - kPacketMaskBursty6, - kPacketMaskBursty7, - kPacketMaskBursty8, - kPacketMaskBursty9, - kPacketMaskBursty10, - kPacketMaskBursty11, - kPacketMaskBursty12 -}; - -} // namespace fec_private_tables -} // namespace webrtc -#endif // WEBRTC_MODULES_RTP_RTCP_SOURCE_FEC_PRIVATE_TABLES_BURSTY_H_ diff --git a/WebRtc.NET/include/webrtc/modules/rtp_rtcp/source/fec_private_tables_random.h b/WebRtc.NET/include/webrtc/modules/rtp_rtcp/source/fec_private_tables_random.h deleted file mode 100644 index 295d7498..00000000 --- a/WebRtc.NET/include/webrtc/modules/rtp_rtcp/source/fec_private_tables_random.h +++ /dev/null @@ -1,24524 +0,0 @@ -/* - * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MODULES_RTP_RTCP_SOURCE_FEC_PRIVATE_TABLES_RANDOM_H_ -#define WEBRTC_MODULES_RTP_RTCP_SOURCE_FEC_PRIVATE_TABLES_RANDOM_H_ - -// This file contains a set of packets masks for the FEC code. The masks in -// this table are specifically designed to favor recovery to random loss. -// These packet masks are defined to protect up to maximum of 48 media packets. - -#include "webrtc/typedefs.h" - -namespace webrtc { -namespace fec_private_tables { - -const uint8_t kMaskRandom10_1[2] = { - 0xff, 0xc0 -}; - -const uint8_t kMaskRandom10_10[20] = { - 0x4c, 0x00, - 0x51, 0x00, - 0xa0, 0x40, - 0x04, 0xc0, - 0x03, 0x80, - 0x86, 0x00, - 0x29, 0x00, - 0x42, 0x40, - 0x98, 0x00, - 0x30, 0x80 -}; - -const uint8_t kMaskRandom10_2[4] = { - 0xaa, 0x80, - 0xd5, 0x40 -}; - -const uint8_t kMaskRandom10_3[6] = { - 0xa4, 0x40, - 0xc9, 0x00, - 0x52, 0x80 -}; - -const uint8_t kMaskRandom10_4[8] = { - 0xca, 0x00, - 0x32, 0x80, - 0xa1, 0x40, - 0x55, 0x00 -}; - -const uint8_t kMaskRandom10_5[10] = { - 0xca, 0x00, - 0x32, 0x80, - 0xa1, 0x40, - 0x55, 0x00, - 0x08, 0xc0 -}; - -const uint8_t kMaskRandom10_6[12] = { - 0x0e, 0x00, - 0x33, 0x00, - 0x10, 0xc0, - 0x45, 0x40, - 0x88, 0x80, - 0xe0, 0x00 -}; - -const uint8_t kMaskRandom10_7[14] = { - 0x46, 0x00, - 0x33, 0x00, - 0x80, 0xc0, - 0x0c, 0x40, - 0x28, 0x80, - 0x94, 0x00, - 0xc1, 0x00 -}; - -const uint8_t kMaskRandom10_8[16] = { - 0x2c, 0x00, - 0x81, 0x80, - 0xa0, 0x40, - 0x05, 0x40, - 0x18, 0x80, - 0xc2, 0x00, - 0x22, 0x80, - 0x50, 0x40 -}; - -const uint8_t kMaskRandom10_9[18] = { - 0x4c, 0x00, - 0x23, 0x00, - 0x88, 0xc0, - 0x21, 0x40, - 0x52, 0x80, - 0x94, 0x00, - 0x26, 0x00, - 0x48, 0x40, - 0x91, 0x80 -}; - -const uint8_t kMaskRandom11_1[2] = { - 0xff, 0xe0 -}; - -const uint8_t kMaskRandom11_10[20] = { - 0x64, 0x40, - 0x51, 0x40, - 0xa9, 0x00, - 0x04, 0xc0, - 0xd0, 0x00, - 0x82, 0x40, - 0x21, 0x20, - 0x0c, 0x20, - 0x4a, 0x00, - 0x12, 0xa0 -}; - -const uint8_t kMaskRandom11_11[22] = { - 0x46, 0x40, - 0x33, 0x20, - 0x99, 0x00, - 0x05, 0x80, - 0x80, 0xa0, - 0x84, 0x40, - 0x40, 0x60, - 0x0a, 0x80, - 0x68, 0x00, - 0x10, 0x20, - 0x30, 0x40 -}; - -const uint8_t kMaskRandom11_2[4] = { - 0xec, 0xc0, - 0x9b, 0xa0 -}; - -const uint8_t kMaskRandom11_3[6] = { - 0xca, 0xc0, - 0xf1, 0x40, - 0xb6, 0x20 -}; - -const uint8_t kMaskRandom11_4[8] = { - 0xc4, 0xc0, - 0x31, 0x60, - 0x4b, 0x20, - 0x2c, 0xa0 -}; - -const uint8_t kMaskRandom11_5[10] = { - 0x86, 0x80, - 0x23, 0x20, - 0x16, 0x20, - 0x4c, 0x20, - 0x41, 0xc0 -}; - -const uint8_t kMaskRandom11_6[12] = { - 0x64, 0x40, - 0x51, 0x40, - 0x0c, 0xa0, - 0xa1, 0x20, - 0x12, 0xa0, - 0x8a, 0x40 -}; - -const uint8_t kMaskRandom11_7[14] = { - 0x46, 0x40, - 0x33, 0x20, - 0x91, 0x80, - 0xa4, 0x20, - 0x50, 0xa0, - 0x84, 0xc0, - 0x09, 0x60 -}; - -const uint8_t kMaskRandom11_8[16] = { - 0x0c, 0x80, - 0x80, 0x60, - 0xa0, 0x80, - 0x05, 0x40, - 0x43, 0x00, - 0x1a, 0x00, - 0x60, 0x20, - 0x14, 0x20 -}; - -const uint8_t kMaskRandom11_9[18] = { - 0x46, 0x40, - 0x62, 0x60, - 0x8c, 0x00, - 0x01, 0x60, - 0x07, 0x80, - 0xa0, 0x80, - 0x18, 0xa0, - 0x91, 0x00, - 0x78, 0x00 -}; - -const uint8_t kMaskRandom12_1[2] = { - 0xff, 0xf0 -}; - -const uint8_t kMaskRandom12_10[20] = { - 0x51, 0x40, - 0x45, 0x10, - 0x80, 0xd0, - 0x24, 0x20, - 0x0a, 0x20, - 0x00, 0xe0, - 0xb8, 0x00, - 0x09, 0x10, - 0x56, 0x00, - 0xa2, 0x80 -}; - -const uint8_t kMaskRandom12_11[22] = { - 0x53, 0x60, - 0x21, 0x30, - 0x10, 0x90, - 0x00, 0x70, - 0x0c, 0x10, - 0x40, 0xc0, - 0x6a, 0x00, - 0x86, 0x00, - 0x24, 0x80, - 0x89, 0x00, - 0xc0, 0x20 -}; - -const uint8_t kMaskRandom12_12[24] = { - 0x10, 0x60, - 0x02, 0x30, - 0x40, 0x50, - 0x21, 0x80, - 0x81, 0x10, - 0x14, 0x80, - 0x98, 0x00, - 0x08, 0x90, - 0x62, 0x00, - 0x24, 0x20, - 0x8a, 0x00, - 0x84, 0x40 -}; - -const uint8_t kMaskRandom12_2[4] = { - 0xec, 0xc0, - 0x93, 0xb0 -}; - -const uint8_t kMaskRandom12_3[6] = { - 0x9b, 0x80, - 0x4f, 0x10, - 0x3c, 0x60 -}; - -const uint8_t kMaskRandom12_4[8] = { - 0x8b, 0x20, - 0x14, 0xb0, - 0x22, 0xd0, - 0x45, 0x50 -}; - -const uint8_t kMaskRandom12_5[10] = { - 0x53, 0x60, - 0x64, 0x20, - 0x0c, 0xc0, - 0x82, 0xa0, - 0x09, 0x30 -}; - -const uint8_t kMaskRandom12_6[12] = { - 0x51, 0x40, - 0xc5, 0x10, - 0x21, 0x80, - 0x12, 0x30, - 0x08, 0xe0, - 0x2e, 0x00 -}; - -const uint8_t kMaskRandom12_7[14] = { - 0x53, 0x60, - 0x21, 0x30, - 0x90, 0x90, - 0x02, 0x50, - 0x06, 0xa0, - 0x2c, 0x00, - 0x88, 0x60 -}; - -const uint8_t kMaskRandom12_8[16] = { - 0x20, 0x60, - 0x80, 0x30, - 0x42, 0x40, - 0x01, 0x90, - 0x14, 0x10, - 0x0a, 0x80, - 0x38, 0x00, - 0xc5, 0x00 -}; - -const uint8_t kMaskRandom12_9[18] = { - 0x53, 0x60, - 0xe4, 0x20, - 0x24, 0x40, - 0xa1, 0x10, - 0x18, 0x30, - 0x03, 0x90, - 0x8a, 0x10, - 0x04, 0x90, - 0x00, 0xe0 -}; - -const uint8_t kMaskRandom13_1[2] = { - 0xff, 0xf8 -}; - -const uint8_t kMaskRandom13_10[20] = { - 0xd1, 0x00, - 0x44, 0x50, - 0x10, 0x98, - 0xa0, 0x50, - 0x4a, 0x08, - 0x40, 0x30, - 0x80, 0x28, - 0x0c, 0x90, - 0x05, 0x88, - 0x62, 0x20 -}; - -const uint8_t kMaskRandom13_11[22] = { - 0x51, 0x20, - 0x22, 0x10, - 0x13, 0x40, - 0x25, 0x00, - 0x18, 0x18, - 0x0a, 0x20, - 0x88, 0x88, - 0x06, 0x80, - 0xe0, 0x20, - 0x84, 0x40, - 0x44, 0x18 -}; - -const uint8_t kMaskRandom13_12[24] = { - 0x28, 0x28, - 0x84, 0x50, - 0x60, 0x40, - 0x05, 0x48, - 0x02, 0x98, - 0x01, 0x30, - 0x48, 0x10, - 0x24, 0x80, - 0x94, 0x00, - 0x8a, 0x00, - 0x11, 0x80, - 0x52, 0x20 -}; - -const uint8_t kMaskRandom13_13[26] = { - 0x51, 0x20, - 0x66, 0x40, - 0x05, 0x48, - 0x81, 0x20, - 0x94, 0x00, - 0x30, 0x80, - 0x21, 0x10, - 0x03, 0xc0, - 0xe8, 0x00, - 0x0a, 0x10, - 0x80, 0x18, - 0x04, 0x90, - 0x08, 0xa8 -}; - -const uint8_t kMaskRandom13_2[4] = { - 0xec, 0xc0, - 0x1b, 0x38 -}; - -const uint8_t kMaskRandom13_3[6] = { - 0x99, 0xb0, - 0x46, 0xd8, - 0x37, 0x28 -}; - -const uint8_t kMaskRandom13_4[8] = { - 0x49, 0xb0, - 0x26, 0xd0, - 0x85, 0x68, - 0x52, 0x58 -}; - -const uint8_t kMaskRandom13_5[10] = { - 0x51, 0x30, - 0x66, 0x40, - 0x0c, 0x68, - 0xa1, 0xc0, - 0x22, 0x98 -}; - -const uint8_t kMaskRandom13_6[12] = { - 0xd1, 0x20, - 0x46, 0xd0, - 0x15, 0x48, - 0x21, 0x70, - 0x28, 0xc8, - 0xaa, 0x20 -}; - -const uint8_t kMaskRandom13_7[14] = { - 0x59, 0x20, - 0x26, 0x50, - 0xb1, 0x40, - 0x2b, 0x08, - 0x14, 0xc8, - 0xc8, 0x88, - 0x84, 0xb0 -}; - -const uint8_t kMaskRandom13_8[16] = { - 0x80, 0xa8, - 0x30, 0x90, - 0x16, 0x08, - 0x03, 0x30, - 0x44, 0x60, - 0x08, 0x18, - 0xd8, 0x00, - 0xa1, 0x40 -}; - -const uint8_t kMaskRandom13_9[18] = { - 0x59, 0x20, - 0x66, 0x40, - 0x14, 0x40, - 0x21, 0x48, - 0x02, 0xc8, - 0x94, 0x10, - 0x80, 0xa8, - 0x0a, 0x90, - 0x40, 0x18 -}; - -const uint8_t kMaskRandom14_1[2] = { - 0xff, 0xfc -}; - -const uint8_t kMaskRandom14_10[20] = { - 0xc0, 0xd4, - 0x1d, 0x40, - 0xd4, 0x08, - 0x02, 0x60, - 0x04, 0x28, - 0x20, 0x98, - 0x40, 0x44, - 0x08, 0x84, - 0x68, 0x00, - 0x23, 0x10 -}; - -const uint8_t kMaskRandom14_11[22] = { - 0x62, 0xd0, - 0x35, 0x20, - 0x14, 0x14, - 0xc5, 0x08, - 0x22, 0x0c, - 0x88, 0xb8, - 0x42, 0x54, - 0x28, 0xa4, - 0x94, 0x20, - 0x1b, 0x04, - 0x22, 0xc0 -}; - -const uint8_t kMaskRandom14_12[24] = { - 0x81, 0x04, - 0x40, 0x68, - 0x90, 0x24, - 0x28, 0x28, - 0x52, 0x10, - 0x41, 0x88, - 0x09, 0x30, - 0x48, 0x44, - 0x04, 0x44, - 0x0e, 0x80, - 0xa5, 0x90, - 0x12, 0x0c -}; - -const uint8_t kMaskRandom14_13[26] = { - 0x62, 0x54, - 0x34, 0x60, - 0x48, 0x04, - 0x00, 0xac, - 0x28, 0x08, - 0x81, 0x08, - 0x23, 0x04, - 0x06, 0x80, - 0x80, 0x14, - 0x30, 0x10, - 0x8c, 0x20, - 0x54, 0x00, - 0x80, 0xc0 -}; - -const uint8_t kMaskRandom14_14[28] = { - 0x40, 0x54, - 0x15, 0x40, - 0xc0, 0x04, - 0x28, 0x10, - 0x05, 0x0c, - 0x64, 0x80, - 0x81, 0x80, - 0x10, 0x98, - 0x84, 0x20, - 0x12, 0x30, - 0x62, 0x00, - 0x28, 0x60, - 0x0e, 0x08, - 0x10, 0x84 -}; - -const uint8_t kMaskRandom14_2[4] = { - 0xec, 0xe8, - 0x3b, 0x9c -}; - -const uint8_t kMaskRandom14_3[6] = { - 0xac, 0xd8, - 0x55, 0x6c, - 0x27, 0xb4 -}; - -const uint8_t kMaskRandom14_4[8] = { - 0x2c, 0xd8, - 0x93, 0x68, - 0x1a, 0xb4, - 0x47, 0x2c -}; - -const uint8_t kMaskRandom14_5[10] = { - 0x64, 0xd8, - 0xa5, 0x68, - 0x52, 0xb4, - 0x1d, 0xa8, - 0x9c, 0x54 -}; - -const uint8_t kMaskRandom14_6[12] = { - 0x4a, 0x54, - 0x95, 0x48, - 0x14, 0xb4, - 0x51, 0xa8, - 0x22, 0x6c, - 0x88, 0x8c -}; - -const uint8_t kMaskRandom14_7[14] = { - 0x62, 0x54, - 0xb9, 0x20, - 0x18, 0xb4, - 0x54, 0x98, - 0x06, 0x6c, - 0x85, 0x54, - 0xaa, 0x88 -}; - -const uint8_t kMaskRandom14_8[16] = { - 0xc0, 0x14, - 0x41, 0x60, - 0x88, 0x30, - 0x20, 0xa4, - 0x0a, 0x48, - 0x04, 0x98, - 0x94, 0x40, - 0x72, 0x00 -}; - -const uint8_t kMaskRandom14_9[18] = { - 0xa2, 0x54, - 0x34, 0x60, - 0x4a, 0x24, - 0x20, 0xa8, - 0x11, 0x84, - 0x49, 0x08, - 0x86, 0x0c, - 0x20, 0xd4, - 0x88, 0x48 -}; - -const uint8_t kMaskRandom15_1[2] = { - 0xff, 0xfe -}; - -const uint8_t kMaskRandom15_10[20] = { - 0xc0, 0xa0, - 0x15, 0x56, - 0x74, 0x40, - 0x00, 0x9c, - 0x01, 0x2c, - 0x44, 0x92, - 0x88, 0x50, - 0x20, 0xa4, - 0xaa, 0x04, - 0x02, 0x62 -}; - -const uint8_t kMaskRandom15_11[22] = { - 0x62, 0x22, - 0xf1, 0x10, - 0x10, 0x0e, - 0x10, 0xb0, - 0x24, 0x24, - 0x01, 0x12, - 0x00, 0xc4, - 0x04, 0xa2, - 0x02, 0x58, - 0x2b, 0x00, - 0x98, 0x40 -}; - -const uint8_t kMaskRandom15_12[24] = { - 0x88, 0x90, - 0x40, 0x54, - 0x82, 0x62, - 0x21, 0xa4, - 0x10, 0x64, - 0x44, 0x0a, - 0x10, 0xc8, - 0x4d, 0x2a, - 0x38, 0x02, - 0x17, 0x48, - 0x90, 0x84, - 0x72, 0x14 -}; - -const uint8_t kMaskRandom15_13[26] = { - 0x62, 0xa2, - 0x34, 0x44, - 0x40, 0x4a, - 0xc4, 0x04, - 0x08, 0x60, - 0x94, 0x12, - 0x88, 0xc0, - 0x21, 0x32, - 0xc1, 0x40, - 0x10, 0x68, - 0x06, 0x90, - 0x59, 0x00, - 0x0a, 0x0c -}; - -const uint8_t kMaskRandom15_14[28] = { - 0x40, 0x82, - 0x15, 0x54, - 0x88, 0x12, - 0xc0, 0x10, - 0x80, 0xa0, - 0x01, 0x22, - 0x40, 0x2c, - 0x22, 0x02, - 0x90, 0x04, - 0x12, 0x40, - 0x5d, 0x00, - 0x20, 0x54, - 0x86, 0x08, - 0x28, 0x88 -}; - -const uint8_t kMaskRandom15_15[30] = { - 0x62, 0x22, - 0x31, 0x10, - 0x58, 0x00, - 0x01, 0x12, - 0x88, 0x20, - 0x44, 0x02, - 0x29, 0x04, - 0x82, 0xa0, - 0x0a, 0x1a, - 0x11, 0xe0, - 0x84, 0x04, - 0x86, 0x40, - 0x00, 0x86, - 0x44, 0x48, - 0x10, 0x98 -}; - -const uint8_t kMaskRandom15_2[4] = { - 0xec, 0xea, - 0xbb, 0x9c -}; - -const uint8_t kMaskRandom15_3[6] = { - 0xac, 0x92, - 0x55, 0x4a, - 0x43, 0x36 -}; - -const uint8_t kMaskRandom15_4[8] = { - 0x25, 0xaa, - 0x95, 0x54, - 0x1a, 0x6a, - 0x43, 0xd4 -}; - -const uint8_t kMaskRandom15_5[10] = { - 0x64, 0xa2, - 0x25, 0x54, - 0x49, 0x68, - 0x53, 0x90, - 0x8e, 0x30 -}; - -const uint8_t kMaskRandom15_6[12] = { - 0x62, 0x8a, - 0x15, 0x54, - 0x4c, 0x46, - 0x52, 0x94, - 0x23, 0x64, - 0x8a, 0x58 -}; - -const uint8_t kMaskRandom15_7[14] = { - 0x62, 0xa2, - 0xb1, 0x14, - 0x18, 0x6a, - 0x44, 0xd4, - 0x13, 0x64, - 0x49, 0x1a, - 0x86, 0x8c -}; - -const uint8_t kMaskRandom15_8[16] = { - 0x90, 0x22, - 0x09, 0x50, - 0x00, 0x6a, - 0x20, 0x34, - 0x14, 0x44, - 0xc2, 0x10, - 0x00, 0xc6, - 0x65, 0x80 -}; - -const uint8_t kMaskRandom15_9[18] = { - 0x62, 0x22, - 0x24, 0x44, - 0xc0, 0x50, - 0x03, 0x0c, - 0x16, 0x28, - 0x89, 0x00, - 0x82, 0x90, - 0x08, 0xa4, - 0x90, 0x48 -}; - -const uint8_t kMaskRandom16_1[2] = { - 0xff, 0xff -}; - -const uint8_t kMaskRandom16_10[20] = { - 0x45, 0x51, - 0x10, 0xa2, - 0x01, 0x25, - 0x0b, 0x42, - 0xd8, 0x20, - 0x82, 0x8c, - 0x24, 0x4a, - 0x38, 0x18, - 0x2a, 0x25, - 0x84, 0x92 -}; - -const uint8_t kMaskRandom16_11[22] = { - 0x55, 0x55, - 0x2a, 0x22, - 0x31, 0x11, - 0x83, 0x42, - 0x06, 0x98, - 0x40, 0xe1, - 0x2c, 0x44, - 0xd8, 0x28, - 0x92, 0x81, - 0x84, 0x32, - 0x68, 0x0c -}; - -const uint8_t kMaskRandom16_12[24] = { - 0x84, 0x31, - 0x18, 0xa2, - 0x4e, 0x01, - 0x44, 0xc8, - 0x0e, 0x90, - 0x20, 0xcc, - 0x93, 0x40, - 0x2d, 0x10, - 0x31, 0x44, - 0xc0, 0x23, - 0x11, 0x25, - 0xe8, 0x80 -}; - -const uint8_t kMaskRandom16_13[26] = { - 0x45, 0x15, - 0x22, 0x22, - 0x96, 0x0c, - 0x0c, 0x50, - 0x62, 0x04, - 0x49, 0x06, - 0x11, 0x82, - 0x12, 0x38, - 0x40, 0x71, - 0xa8, 0x8a, - 0x08, 0xa1, - 0xa0, 0xc0, - 0xc5, 0x10 -}; - -const uint8_t kMaskRandom16_14[28] = { - 0x45, 0x51, - 0x22, 0x0a, - 0x84, 0xd0, - 0x0c, 0x8a, - 0x18, 0x06, - 0x30, 0x03, - 0x61, 0x08, - 0x40, 0x11, - 0x10, 0x2c, - 0x09, 0x60, - 0x00, 0x94, - 0x52, 0x40, - 0xa4, 0x24, - 0x82, 0x88 -}; - -const uint8_t kMaskRandom16_15[30] = { - 0x55, 0x11, - 0x22, 0x22, - 0x11, 0x11, - 0x80, 0x45, - 0x20, 0x1a, - 0x08, 0x68, - 0x22, 0x84, - 0x48, 0x09, - 0x07, 0x01, - 0x94, 0x20, - 0x82, 0x06, - 0x60, 0x48, - 0x89, 0x80, - 0x00, 0x8e, - 0x18, 0x22 -}; - -const uint8_t kMaskRandom16_16[32] = { - 0xa4, 0x10, - 0x01, 0x2a, - 0x06, 0x42, - 0x08, 0x68, - 0x81, 0x90, - 0x00, 0xf0, - 0x50, 0x05, - 0x20, 0x51, - 0x43, 0x08, - 0x68, 0x80, - 0x80, 0x0b, - 0x10, 0x4c, - 0x12, 0x30, - 0x40, 0x85, - 0x0e, 0x04, - 0x18, 0x12 -}; - -const uint8_t kMaskRandom16_2[4] = { - 0xae, 0xae, - 0x79, 0x79 -}; - -const uint8_t kMaskRandom16_3[6] = { - 0xad, 0x2d, - 0x76, 0x36, - 0x26, 0xdb -}; - -const uint8_t kMaskRandom16_4[8] = { - 0x55, 0x55, - 0xaa, 0xaa, - 0x35, 0x35, - 0xca, 0xca -}; - -const uint8_t kMaskRandom16_5[10] = { - 0x55, 0x55, - 0x2a, 0x2a, - 0x24, 0x25, - 0x84, 0xc8, - 0x10, 0xb6 -}; - -const uint8_t kMaskRandom16_6[12] = { - 0x51, 0x51, - 0x0a, 0x2a, - 0xa2, 0x15, - 0x84, 0x4a, - 0x30, 0x92, - 0x04, 0xac -}; - -const uint8_t kMaskRandom16_7[14] = { - 0x45, 0x51, - 0x22, 0x2a, - 0x91, 0x11, - 0x2e, 0x08, - 0x48, 0x34, - 0x90, 0x29, - 0x09, 0x86 -}; - -const uint8_t kMaskRandom16_8[16] = { - 0x20, 0x54, - 0x18, 0x88, - 0x84, 0x07, - 0x60, 0x48, - 0x12, 0x82, - 0x81, 0x41, - 0x40, 0x62, - 0x16, 0x30 -}; - -const uint8_t kMaskRandom16_9[18] = { - 0x55, 0x51, - 0x22, 0x2a, - 0x05, 0x85, - 0x09, 0x4a, - 0x84, 0x32, - 0xc0, 0x0d, - 0x20, 0xa6, - 0x1a, 0x09, - 0x44, 0x64 -}; - -const uint8_t kMaskRandom17_1[6] = { - 0xff, 0xff, 0x80, 0x00, 0x00, 0x00 -}; - -const uint8_t kMaskRandom17_10[60] = { - 0x55, 0x8c, 0x80, 0x00, 0x00, 0x00, - 0xaa, 0x27, 0x00, 0x00, 0x00, 0x00, - 0xa5, 0x32, 0x80, 0x00, 0x00, 0x00, - 0x62, 0x61, 0x80, 0x00, 0x00, 0x00, - 0x3c, 0x5c, 0x00, 0x00, 0x00, 0x00, - 0x8e, 0xcc, 0x00, 0x00, 0x00, 0x00, - 0x6a, 0x2b, 0x00, 0x00, 0x00, 0x00, - 0x36, 0x32, 0x80, 0x00, 0x00, 0x00, - 0xd1, 0x25, 0x80, 0x00, 0x00, 0x00, - 0xc8, 0x02, 0x80, 0x00, 0x00, 0x00 -}; - -const uint8_t kMaskRandom17_11[66] = { - 0x55, 0x8c, 0x80, 0x00, 0x00, 0x00, - 0xaa, 0x27, 0x00, 0x00, 0x00, 0x00, - 0xa5, 0x32, 0x80, 0x00, 0x00, 0x00, - 0x62, 0x61, 0x80, 0x00, 0x00, 0x00, - 0x3c, 0x5c, 0x00, 0x00, 0x00, 0x00, - 0x51, 0x84, 0x80, 0x00, 0x00, 0x00, - 0xa2, 0x27, 0x00, 0x00, 0x00, 0x00, - 0x95, 0x51, 0x80, 0x00, 0x00, 0x00, - 0x4a, 0x1a, 0x00, 0x00, 0x00, 0x00, - 0x30, 0x68, 0x00, 0x00, 0x00, 0x00, - 0x2c, 0x89, 0x00, 0x00, 0x00, 0x00 -}; - -const uint8_t kMaskRandom17_12[72] = { - 0x51, 0x84, 0x80, 0x00, 0x00, 0x00, - 0xa2, 0x27, 0x00, 0x00, 0x00, 0x00, - 0x95, 0x51, 0x80, 0x00, 0x00, 0x00, - 0x4a, 0x1a, 0x00, 0x00, 0x00, 0x00, - 0x30, 0x68, 0x00, 0x00, 0x00, 0x00, - 0x2c, 0x89, 0x00, 0x00, 0x00, 0x00, - 0x55, 0x8c, 0x80, 0x00, 0x00, 0x00, - 0xaa, 0x27, 0x00, 0x00, 0x00, 0x00, - 0xa5, 0x32, 0x80, 0x00, 0x00, 0x00, - 0x62, 0x61, 0x80, 0x00, 0x00, 0x00, - 0x3c, 0x5c, 0x00, 0x00, 0x00, 0x00, - 0x51, 0x35, 0x00, 0x00, 0x00, 0x00 -}; - -const uint8_t kMaskRandom17_13[78] = { - 0x51, 0x84, 0x80, 0x00, 0x00, 0x00, - 0xa2, 0x27, 0x00, 0x00, 0x00, 0x00, - 0x95, 0x51, 0x80, 0x00, 0x00, 0x00, - 0x4a, 0x1a, 0x00, 0x00, 0x00, 0x00, - 0x30, 0x68, 0x00, 0x00, 0x00, 0x00, - 0x2c, 0x89, 0x00, 0x00, 0x00, 0x00, - 0x15, 0x8c, 0x00, 0x00, 0x00, 0x00, - 0x8a, 0x47, 0x00, 0x00, 0x00, 0x00, - 0x25, 0x81, 0x80, 0x00, 0x00, 0x00, - 0x62, 0x12, 0x80, 0x00, 0x00, 0x00, - 0x58, 0x58, 0x00, 0x00, 0x00, 0x00, - 0x0e, 0x28, 0x80, 0x00, 0x00, 0x00, - 0x83, 0x34, 0x00, 0x00, 0x00, 0x00 -}; - -const uint8_t kMaskRandom17_14[84] = { - 0x15, 0x8c, 0x00, 0x00, 0x00, 0x00, - 0x8a, 0x47, 0x00, 0x00, 0x00, 0x00, - 0x25, 0x81, 0x80, 0x00, 0x00, 0x00, - 0x62, 0x12, 0x80, 0x00, 0x00, 0x00, - 0x58, 0x58, 0x00, 0x00, 0x00, 0x00, - 0x0e, 0x28, 0x80, 0x00, 0x00, 0x00, - 0x83, 0x34, 0x00, 0x00, 0x00, 0x00, - 0x51, 0x84, 0x80, 0x00, 0x00, 0x00, - 0xa2, 0x27, 0x00, 0x00, 0x00, 0x00, - 0x95, 0x51, 0x80, 0x00, 0x00, 0x00, - 0x4a, 0x1a, 0x00, 0x00, 0x00, 0x00, - 0x30, 0x68, 0x00, 0x00, 0x00, 0x00, - 0x2c, 0x89, 0x00, 0x00, 0x00, 0x00, - 0xb0, 0xde, 0x80, 0x00, 0x00, 0x00 -}; - -const uint8_t kMaskRandom17_15[90] = { - 0x15, 0x8c, 0x00, 0x00, 0x00, 0x00, - 0x8a, 0x47, 0x00, 0x00, 0x00, 0x00, - 0x25, 0x81, 0x80, 0x00, 0x00, 0x00, - 0x62, 0x12, 0x80, 0x00, 0x00, 0x00, - 0x58, 0x58, 0x00, 0x00, 0x00, 0x00, - 0x0e, 0x28, 0x80, 0x00, 0x00, 0x00, - 0x83, 0x34, 0x00, 0x00, 0x00, 0x00, - 0x25, 0x2c, 0x00, 0x00, 0x00, 0x00, - 0x8a, 0x91, 0x00, 0x00, 0x00, 0x00, - 0x91, 0xc0, 0x80, 0x00, 0x00, 0x00, - 0x68, 0x06, 0x80, 0x00, 0x00, 0x00, - 0x32, 0xc8, 0x00, 0x00, 0x00, 0x00, - 0x43, 0x45, 0x00, 0x00, 0x00, 0x00, - 0xc4, 0x30, 0x80, 0x00, 0x00, 0x00, - 0x1c, 0xa2, 0x00, 0x00, 0x00, 0x00 -}; - -const uint8_t kMaskRandom17_16[96] = { - 0x25, 0x2c, 0x00, 0x00, 0x00, 0x00, - 0x8a, 0x91, 0x00, 0x00, 0x00, 0x00, - 0x91, 0xc0, 0x80, 0x00, 0x00, 0x00, - 0x68, 0x06, 0x80, 0x00, 0x00, 0x00, - 0x32, 0xc8, 0x00, 0x00, 0x00, 0x00, - 0x43, 0x45, 0x00, 0x00, 0x00, 0x00, - 0xc4, 0x30, 0x80, 0x00, 0x00, 0x00, - 0x1c, 0xa2, 0x00, 0x00, 0x00, 0x00, - 0x15, 0x8c, 0x00, 0x00, 0x00, 0x00, - 0x8a, 0x47, 0x00, 0x00, 0x00, 0x00, - 0x25, 0x81, 0x80, 0x00, 0x00, 0x00, - 0x62, 0x12, 0x80, 0x00, 0x00, 0x00, - 0x58, 0x58, 0x00, 0x00, 0x00, 0x00, - 0x0e, 0x28, 0x80, 0x00, 0x00, 0x00, - 0x83, 0x34, 0x00, 0x00, 0x00, 0x00, - 0x0a, 0x1c, 0x00, 0x00, 0x00, 0x00 -}; - -const uint8_t kMaskRandom17_17[102] = { - 0x25, 0x2c, 0x00, 0x00, 0x00, 0x00, - 0x8a, 0x91, 0x00, 0x00, 0x00, 0x00, - 0x91, 0xc0, 0x80, 0x00, 0x00, 0x00, - 0x68, 0x06, 0x80, 0x00, 0x00, 0x00, - 0x32, 0xc8, 0x00, 0x00, 0x00, 0x00, - 0x43, 0x45, 0x00, 0x00, 0x00, 0x00, - 0xc4, 0x30, 0x80, 0x00, 0x00, 0x00, - 0x1c, 0xa2, 0x00, 0x00, 0x00, 0x00, - 0x25, 0x4c, 0x00, 0x00, 0x00, 0x00, - 0x8a, 0x66, 0x00, 0x00, 0x00, 0x00, - 0x91, 0x91, 0x00, 0x00, 0x00, 0x00, - 0x68, 0x42, 0x80, 0x00, 0x00, 0x00, - 0x32, 0xa4, 0x00, 0x00, 0x00, 0x00, - 0x43, 0x13, 0x00, 0x00, 0x00, 0x00, - 0xc4, 0x30, 0x80, 0x00, 0x00, 0x00, - 0x1c, 0x88, 0x80, 0x00, 0x00, 0x00, - 0x3c, 0x09, 0x00, 0x00, 0x00, 0x00 -}; - -const uint8_t kMaskRandom17_2[12] = { - 0xce, 0xce, 0x00, 0x00, 0x00, 0x00, - 0xb9, 0x39, 0x80, 0x00, 0x00, 0x00 -}; - -const uint8_t kMaskRandom17_3[18] = { - 0xcd, 0xcc, 0x00, 0x00, 0x00, 0x00, - 0x97, 0x27, 0x00, 0x00, 0x00, 0x00, - 0xb8, 0xd1, 0x80, 0x00, 0x00, 0x00 -}; - -const uint8_t kMaskRandom17_4[24] = { - 0xca, 0xec, 0x00, 0x00, 0x00, 0x00, - 0xa9, 0x67, 0x00, 0x00, 0x00, 0x00, - 0x3a, 0xb1, 0x80, 0x00, 0x00, 0x00, - 0x55, 0x5a, 0x80, 0x00, 0x00, 0x00 -}; - -const uint8_t kMaskRandom17_5[30] = { - 0x55, 0x44, 0x80, 0x00, 0x00, 0x00, - 0x2a, 0x66, 0x00, 0x00, 0x00, 0x00, - 0x25, 0xa1, 0x80, 0x00, 0x00, 0x00, - 0xe2, 0x12, 0x80, 0x00, 0x00, 0x00, - 0x99, 0x98, 0x00, 0x00, 0x00, 0x00 -}; - -const uint8_t kMaskRandom17_6[36] = { - 0xd1, 0x4c, 0x00, 0x00, 0x00, 0x00, - 0xa2, 0xc5, 0x00, 0x00, 0x00, 0x00, - 0x95, 0x30, 0x80, 0x00, 0x00, 0x00, - 0xca, 0x0a, 0x80, 0x00, 0x00, 0x00, - 0xa4, 0xaa, 0x00, 0x00, 0x00, 0x00, - 0x78, 0x15, 0x00, 0x00, 0x00, 0x00 -}; - -const uint8_t kMaskRandom17_7[42] = { - 0x15, 0x44, 0x80, 0x00, 0x00, 0x00, - 0x8a, 0x23, 0x00, 0x00, 0x00, 0x00, - 0x85, 0x91, 0x00, 0x00, 0x00, 0x00, - 0x32, 0x0a, 0x80, 0x00, 0x00, 0x00, - 0x58, 0x34, 0x00, 0x00, 0x00, 0x00, - 0x2c, 0x0d, 0x00, 0x00, 0x00, 0x00, - 0x43, 0xc8, 0x00, 0x00, 0x00, 0x00 -}; - -const uint8_t kMaskRandom17_8[48] = { - 0x64, 0x16, 0x00, 0x00, 0x00, 0x00, - 0xa2, 0xc2, 0x00, 0x00, 0x00, 0x00, - 0x51, 0x60, 0x80, 0x00, 0x00, 0x00, - 0x4a, 0x85, 0x00, 0x00, 0x00, 0x00, - 0x38, 0x4c, 0x00, 0x00, 0x00, 0x00, - 0x89, 0x29, 0x00, 0x00, 0x00, 0x00, - 0x07, 0x11, 0x80, 0x00, 0x00, 0x00, - 0x94, 0xb0, 0x00, 0x00, 0x00, 0x00 -}; - -const uint8_t kMaskRandom17_9[54] = { - 0x8e, 0xcc, 0x00, 0x00, 0x00, 0x00, - 0x6a, 0x2b, 0x00, 0x00, 0x00, 0x00, - 0x36, 0x32, 0x80, 0x00, 0x00, 0x00, - 0xd1, 0x25, 0x80, 0x00, 0x00, 0x00, - 0x55, 0x8c, 0x80, 0x00, 0x00, 0x00, - 0xaa, 0x27, 0x00, 0x00, 0x00, 0x00, - 0xa5, 0x32, 0x80, 0x00, 0x00, 0x00, - 0x62, 0x61, 0x80, 0x00, 0x00, 0x00, - 0x3c, 0x5c, 0x00, 0x00, 0x00, 0x00 -}; - -const uint8_t kMaskRandom18_1[6] = { - 0xff, 0xff, 0xc0, 0x00, 0x00, 0x00 -}; - -const uint8_t kMaskRandom18_10[60] = { - 0x8c, 0xc6, 0x40, 0x00, 0x00, 0x00, - 0x27, 0x13, 0x80, 0x00, 0x00, 0x00, - 0x32, 0x99, 0x40, 0x00, 0x00, 0x00, - 0x61, 0xb0, 0xc0, 0x00, 0x00, 0x00, - 0x5c, 0x2e, 0x00, 0x00, 0x00, 0x00, - 0xcc, 0x66, 0x00, 0x00, 0x00, 0x00, - 0x2b, 0x15, 0x80, 0x00, 0x00, 0x00, - 0x32, 0x99, 0x40, 0x00, 0x00, 0x00, - 0x25, 0x92, 0xc0, 0x00, 0x00, 0x00, - 0xfd, 0x9d, 0xc0, 0x00, 0x00, 0x00 -}; - -const uint8_t kMaskRandom18_11[66] = { - 0x8c, 0xc6, 0x40, 0x00, 0x00, 0x00, - 0x27, 0x13, 0x80, 0x00, 0x00, 0x00, - 0x32, 0x99, 0x40, 0x00, 0x00, 0x00, - 0x61, 0xb0, 0xc0, 0x00, 0x00, 0x00, - 0x5c, 0x2e, 0x00, 0x00, 0x00, 0x00, - 0x84, 0xc2, 0x40, 0x00, 0x00, 0x00, - 0x27, 0x13, 0x80, 0x00, 0x00, 0x00, - 0x51, 0xa8, 0xc0, 0x00, 0x00, 0x00, - 0x1a, 0x0d, 0x00, 0x00, 0x00, 0x00, - 0x68, 0x34, 0x00, 0x00, 0x00, 0x00, - 0x89, 0x44, 0x80, 0x00, 0x00, 0x00 -}; - -const uint8_t kMaskRandom18_12[72] = { - 0x84, 0xc2, 0x40, 0x00, 0x00, 0x00, - 0x27, 0x13, 0x80, 0x00, 0x00, 0x00, - 0x51, 0xa8, 0xc0, 0x00, 0x00, 0x00, - 0x1a, 0x0d, 0x00, 0x00, 0x00, 0x00, - 0x68, 0x34, 0x00, 0x00, 0x00, 0x00, - 0x89, 0x44, 0x80, 0x00, 0x00, 0x00, - 0x8c, 0xc6, 0x40, 0x00, 0x00, 0x00, - 0x27, 0x13, 0x80, 0x00, 0x00, 0x00, - 0x32, 0x99, 0x40, 0x00, 0x00, 0x00, - 0x61, 0xb0, 0xc0, 0x00, 0x00, 0x00, - 0x5c, 0x2e, 0x00, 0x00, 0x00, 0x00, - 0x5b, 0x0c, 0x40, 0x00, 0x00, 0x00 -}; - -const uint8_t kMaskRandom18_13[78] = { - 0x84, 0xc2, 0x40, 0x00, 0x00, 0x00, - 0x27, 0x13, 0x80, 0x00, 0x00, 0x00, - 0x51, 0xa8, 0xc0, 0x00, 0x00, 0x00, - 0x1a, 0x0d, 0x00, 0x00, 0x00, 0x00, - 0x68, 0x34, 0x00, 0x00, 0x00, 0x00, - 0x89, 0x44, 0x80, 0x00, 0x00, 0x00, - 0x8c, 0x46, 0x00, 0x00, 0x00, 0x00, - 0x47, 0x23, 0x80, 0x00, 0x00, 0x00, - 0x81, 0xc0, 0xc0, 0x00, 0x00, 0x00, - 0x12, 0x89, 0x40, 0x00, 0x00, 0x00, - 0x58, 0x2c, 0x00, 0x00, 0x00, 0x00, - 0x28, 0x94, 0x40, 0x00, 0x00, 0x00, - 0x34, 0x1a, 0x00, 0x00, 0x00, 0x00 -}; - -const uint8_t kMaskRandom18_14[84] = { - 0x8c, 0x46, 0x00, 0x00, 0x00, 0x00, - 0x47, 0x23, 0x80, 0x00, 0x00, 0x00, - 0x81, 0xc0, 0xc0, 0x00, 0x00, 0x00, - 0x12, 0x89, 0x40, 0x00, 0x00, 0x00, - 0x58, 0x2c, 0x00, 0x00, 0x00, 0x00, - 0x28, 0x94, 0x40, 0x00, 0x00, 0x00, - 0x34, 0x1a, 0x00, 0x00, 0x00, 0x00, - 0x84, 0xc2, 0x40, 0x00, 0x00, 0x00, - 0x27, 0x13, 0x80, 0x00, 0x00, 0x00, - 0x51, 0xa8, 0xc0, 0x00, 0x00, 0x00, - 0x1a, 0x0d, 0x00, 0x00, 0x00, 0x00, - 0x68, 0x34, 0x00, 0x00, 0x00, 0x00, - 0x89, 0x44, 0x80, 0x00, 0x00, 0x00, - 0x7f, 0x4f, 0xc0, 0x00, 0x00, 0x00 -}; - -const uint8_t kMaskRandom18_15[90] = { - 0x8c, 0x46, 0x00, 0x00, 0x00, 0x00, - 0x47, 0x23, 0x80, 0x00, 0x00, 0x00, - 0x81, 0xc0, 0xc0, 0x00, 0x00, 0x00, - 0x12, 0x89, 0x40, 0x00, 0x00, 0x00, - 0x58, 0x2c, 0x00, 0x00, 0x00, 0x00, - 0x28, 0x94, 0x40, 0x00, 0x00, 0x00, - 0x34, 0x1a, 0x00, 0x00, 0x00, 0x00, - 0x2c, 0x16, 0x00, 0x00, 0x00, 0x00, - 0x91, 0x48, 0x80, 0x00, 0x00, 0x00, - 0xc0, 0xe0, 0x40, 0x00, 0x00, 0x00, - 0x06, 0x83, 0x40, 0x00, 0x00, 0x00, - 0xc8, 0x64, 0x00, 0x00, 0x00, 0x00, - 0x45, 0x22, 0x80, 0x00, 0x00, 0x00, - 0x30, 0x98, 0x40, 0x00, 0x00, 0x00, - 0xa2, 0x51, 0x00, 0x00, 0x00, 0x00 -}; - -const uint8_t kMaskRandom18_16[96] = { - 0x2c, 0x16, 0x00, 0x00, 0x00, 0x00, - 0x91, 0x48, 0x80, 0x00, 0x00, 0x00, - 0xc0, 0xe0, 0x40, 0x00, 0x00, 0x00, - 0x06, 0x83, 0x40, 0x00, 0x00, 0x00, - 0xc8, 0x64, 0x00, 0x00, 0x00, 0x00, - 0x45, 0x22, 0x80, 0x00, 0x00, 0x00, - 0x30, 0x98, 0x40, 0x00, 0x00, 0x00, - 0xa2, 0x51, 0x00, 0x00, 0x00, 0x00, - 0x8c, 0x46, 0x00, 0x00, 0x00, 0x00, - 0x47, 0x23, 0x80, 0x00, 0x00, 0x00, - 0x81, 0xc0, 0xc0, 0x00, 0x00, 0x00, - 0x12, 0x89, 0x40, 0x00, 0x00, 0x00, - 0x58, 0x2c, 0x00, 0x00, 0x00, 0x00, - 0x28, 0x94, 0x40, 0x00, 0x00, 0x00, - 0x34, 0x1a, 0x00, 0x00, 0x00, 0x00, - 0xef, 0xf2, 0x00, 0x00, 0x00, 0x00 -}; - -const uint8_t kMaskRandom18_17[102] = { - 0x2c, 0x16, 0x00, 0x00, 0x00, 0x00, - 0x91, 0x48, 0x80, 0x00, 0x00, 0x00, - 0xc0, 0xe0, 0x40, 0x00, 0x00, 0x00, - 0x06, 0x83, 0x40, 0x00, 0x00, 0x00, - 0xc8, 0x64, 0x00, 0x00, 0x00, 0x00, - 0x45, 0x22, 0x80, 0x00, 0x00, 0x00, - 0x30, 0x98, 0x40, 0x00, 0x00, 0x00, - 0xa2, 0x51, 0x00, 0x00, 0x00, 0x00, - 0x4c, 0x26, 0x00, 0x00, 0x00, 0x00, - 0x66, 0x33, 0x00, 0x00, 0x00, 0x00, - 0x91, 0x48, 0x80, 0x00, 0x00, 0x00, - 0x42, 0xa1, 0x40, 0x00, 0x00, 0x00, - 0xa4, 0x52, 0x00, 0x00, 0x00, 0x00, - 0x13, 0x09, 0x80, 0x00, 0x00, 0x00, - 0x30, 0x98, 0x40, 0x00, 0x00, 0x00, - 0x88, 0xc4, 0x40, 0x00, 0x00, 0x00, - 0x09, 0x04, 0x80, 0x00, 0x00, 0x00 -}; - -const uint8_t kMaskRandom18_18[108] = { - 0x4c, 0x26, 0x00, 0x00, 0x00, 0x00, - 0x66, 0x33, 0x00, 0x00, 0x00, 0x00, - 0x91, 0x48, 0x80, 0x00, 0x00, 0x00, - 0x42, 0xa1, 0x40, 0x00, 0x00, 0x00, - 0xa4, 0x52, 0x00, 0x00, 0x00, 0x00, - 0x13, 0x09, 0x80, 0x00, 0x00, 0x00, - 0x30, 0x98, 0x40, 0x00, 0x00, 0x00, - 0x88, 0xc4, 0x40, 0x00, 0x00, 0x00, - 0x09, 0x04, 0x80, 0x00, 0x00, 0x00, - 0x2c, 0x16, 0x00, 0x00, 0x00, 0x00, - 0x91, 0x48, 0x80, 0x00, 0x00, 0x00, - 0xc0, 0xe0, 0x40, 0x00, 0x00, 0x00, - 0x06, 0x83, 0x40, 0x00, 0x00, 0x00, - 0xc8, 0x64, 0x00, 0x00, 0x00, 0x00, - 0x45, 0x22, 0x80, 0x00, 0x00, 0x00, - 0x30, 0x98, 0x40, 0x00, 0x00, 0x00, - 0xa2, 0x51, 0x00, 0x00, 0x00, 0x00, - 0xd0, 0x03, 0x40, 0x00, 0x00, 0x00 -}; - -const uint8_t kMaskRandom18_2[12] = { - 0xce, 0x67, 0x00, 0x00, 0x00, 0x00, - 0x39, 0x9c, 0xc0, 0x00, 0x00, 0x00 -}; - -const uint8_t kMaskRandom18_3[18] = { - 0xcc, 0x66, 0x00, 0x00, 0x00, 0x00, - 0x27, 0x15, 0x80, 0x00, 0x00, 0x00, - 0x92, 0xc9, 0x40, 0x00, 0x00, 0x00 -}; - -const uint8_t kMaskRandom18_4[24] = { - 0xec, 0x76, 0x00, 0x00, 0x00, 0x00, - 0x67, 0x33, 0x80, 0x00, 0x00, 0x00, - 0xb1, 0xd8, 0xc0, 0x00, 0x00, 0x00, - 0x5a, 0xad, 0x40, 0x00, 0x00, 0x00 -}; - -const uint8_t kMaskRandom18_5[30] = { - 0x4c, 0xa6, 0x40, 0x00, 0x00, 0x00, - 0x66, 0x33, 0x00, 0x00, 0x00, 0x00, - 0x19, 0xd0, 0xc0, 0x00, 0x00, 0x00, - 0x9c, 0x89, 0x40, 0x00, 0x00, 0x00, - 0xe3, 0x4c, 0x00, 0x00, 0x00, 0x00 -}; - -const uint8_t kMaskRandom18_6[36] = { - 0xcc, 0x26, 0x00, 0x00, 0x00, 0x00, - 0x45, 0x62, 0x80, 0x00, 0x00, 0x00, - 0xb0, 0x98, 0x40, 0x00, 0x00, 0x00, - 0x8a, 0x85, 0x40, 0x00, 0x00, 0x00, - 0x29, 0x53, 0x00, 0x00, 0x00, 0x00, - 0xa6, 0x0a, 0x80, 0x00, 0x00, 0x00 -}; - -const uint8_t kMaskRandom18_7[42] = { - 0x44, 0xa2, 0x40, 0x00, 0x00, 0x00, - 0x23, 0x11, 0x80, 0x00, 0x00, 0x00, - 0x91, 0x48, 0x80, 0x00, 0x00, 0x00, - 0x0a, 0x85, 0x40, 0x00, 0x00, 0x00, - 0x34, 0x1a, 0x00, 0x00, 0x00, 0x00, - 0x0b, 0x06, 0x80, 0x00, 0x00, 0x00, - 0xe0, 0x64, 0x00, 0x00, 0x00, 0x00 -}; - -const uint8_t kMaskRandom18_8[48] = { - 0x16, 0x0b, 0x00, 0x00, 0x00, 0x00, - 0xc2, 0x61, 0x00, 0x00, 0x00, 0x00, - 0x60, 0xb0, 0x40, 0x00, 0x00, 0x00, - 0x85, 0x42, 0x80, 0x00, 0x00, 0x00, - 0x4c, 0x26, 0x00, 0x00, 0x00, 0x00, - 0x29, 0x14, 0x80, 0x00, 0x00, 0x00, - 0x11, 0x88, 0xc0, 0x00, 0x00, 0x00, - 0xb0, 0x58, 0x00, 0x00, 0x00, 0x00 -}; - -const uint8_t kMaskRandom18_9[54] = { - 0x44, 0xa2, 0x40, 0x00, 0x00, 0x00, - 0x66, 0x26, 0x00, 0x00, 0x00, 0x00, - 0x90, 0x49, 0x40, 0x00, 0x00, 0x00, - 0x01, 0xa5, 0x80, 0x00, 0x00, 0x00, - 0x0e, 0x12, 0x80, 0x00, 0x00, 0x00, - 0x13, 0x0b, 0x00, 0x00, 0x00, 0x00, - 0x20, 0xd0, 0x40, 0x00, 0x00, 0x00, - 0xc2, 0x51, 0x00, 0x00, 0x00, 0x00, - 0x29, 0x0c, 0x80, 0x00, 0x00, 0x00 -}; - -const uint8_t kMaskRandom19_1[6] = { - 0xff, 0xff, 0xe0, 0x00, 0x00, 0x00 -}; - -const uint8_t kMaskRandom19_10[60] = { - 0x8c, 0xe3, 0x00, 0x00, 0x00, 0x00, - 0x27, 0x11, 0xc0, 0x00, 0x00, 0x00, - 0x32, 0x8d, 0x20, 0x00, 0x00, 0x00, - 0x61, 0x92, 0x60, 0x00, 0x00, 0x00, - 0x5c, 0x38, 0x80, 0x00, 0x00, 0x00, - 0xcc, 0x75, 0x00, 0x00, 0x00, 0x00, - 0x2b, 0x19, 0xc0, 0x00, 0x00, 0x00, - 0x32, 0xd2, 0x60, 0x00, 0x00, 0x00, - 0x25, 0x8e, 0xa0, 0x00, 0x00, 0x00, - 0x50, 0x88, 0xc0, 0x00, 0x00, 0x00 -}; - -const uint8_t kMaskRandom19_11[66] = { - 0x8c, 0xe3, 0x00, 0x00, 0x00, 0x00, - 0x27, 0x11, 0xc0, 0x00, 0x00, 0x00, - 0x32, 0x8d, 0x20, 0x00, 0x00, 0x00, - 0x61, 0x92, 0x60, 0x00, 0x00, 0x00, - 0x5c, 0x38, 0x80, 0x00, 0x00, 0x00, - 0x84, 0x87, 0x00, 0x00, 0x00, 0x00, - 0x27, 0x19, 0x80, 0x00, 0x00, 0x00, - 0x51, 0x88, 0x60, 0x00, 0x00, 0x00, - 0x1a, 0x22, 0xa0, 0x00, 0x00, 0x00, - 0x68, 0x44, 0x40, 0x00, 0x00, 0x00, - 0x89, 0x70, 0x00, 0x00, 0x00, 0x00 -}; - -const uint8_t kMaskRandom19_12[72] = { - 0x84, 0x87, 0x00, 0x00, 0x00, 0x00, - 0x27, 0x19, 0x80, 0x00, 0x00, 0x00, - 0x51, 0x88, 0x60, 0x00, 0x00, 0x00, - 0x1a, 0x22, 0xa0, 0x00, 0x00, 0x00, - 0x68, 0x44, 0x40, 0x00, 0x00, 0x00, - 0x89, 0x70, 0x00, 0x00, 0x00, 0x00, - 0x8c, 0xe3, 0x00, 0x00, 0x00, 0x00, - 0x27, 0x11, 0xc0, 0x00, 0x00, 0x00, - 0x32, 0x8d, 0x20, 0x00, 0x00, 0x00, - 0x61, 0x92, 0x60, 0x00, 0x00, 0x00, - 0x5c, 0x38, 0x80, 0x00, 0x00, 0x00, - 0x90, 0xc8, 0x80, 0x00, 0x00, 0x00 -}; - -const uint8_t kMaskRandom19_13[78] = { - 0x84, 0x87, 0x00, 0x00, 0x00, 0x00, - 0x27, 0x19, 0x80, 0x00, 0x00, 0x00, - 0x51, 0x88, 0x60, 0x00, 0x00, 0x00, - 0x1a, 0x22, 0xa0, 0x00, 0x00, 0x00, - 0x68, 0x44, 0x40, 0x00, 0x00, 0x00, - 0x89, 0x70, 0x00, 0x00, 0x00, 0x00, - 0x8c, 0x23, 0x00, 0x00, 0x00, 0x00, - 0x47, 0x19, 0x80, 0x00, 0x00, 0x00, - 0x81, 0x88, 0x60, 0x00, 0x00, 0x00, - 0x12, 0x86, 0x20, 0x00, 0x00, 0x00, - 0x58, 0x14, 0x40, 0x00, 0x00, 0x00, - 0x28, 0xca, 0x00, 0x00, 0x00, 0x00, - 0x34, 0x60, 0x80, 0x00, 0x00, 0x00 -}; - -const uint8_t kMaskRandom19_14[84] = { - 0x8c, 0x23, 0x00, 0x00, 0x00, 0x00, - 0x47, 0x19, 0x80, 0x00, 0x00, 0x00, - 0x81, 0x88, 0x60, 0x00, 0x00, 0x00, - 0x12, 0x86, 0x20, 0x00, 0x00, 0x00, - 0x58, 0x14, 0x40, 0x00, 0x00, 0x00, - 0x28, 0xca, 0x00, 0x00, 0x00, 0x00, - 0x34, 0x60, 0x80, 0x00, 0x00, 0x00, - 0x84, 0x87, 0x00, 0x00, 0x00, 0x00, - 0x27, 0x19, 0x80, 0x00, 0x00, 0x00, - 0x51, 0x88, 0x60, 0x00, 0x00, 0x00, - 0x1a, 0x22, 0xa0, 0x00, 0x00, 0x00, - 0x68, 0x44, 0x40, 0x00, 0x00, 0x00, - 0x89, 0x70, 0x00, 0x00, 0x00, 0x00, - 0x6e, 0x27, 0x60, 0x00, 0x00, 0x00 -}; - -const uint8_t kMaskRandom19_15[90] = { - 0x8c, 0x23, 0x00, 0x00, 0x00, 0x00, - 0x47, 0x19, 0x80, 0x00, 0x00, 0x00, - 0x81, 0x88, 0x60, 0x00, 0x00, 0x00, - 0x12, 0x86, 0x20, 0x00, 0x00, 0x00, - 0x58, 0x14, 0x40, 0x00, 0x00, 0x00, - 0x28, 0xca, 0x00, 0x00, 0x00, 0x00, - 0x34, 0x60, 0x80, 0x00, 0x00, 0x00, - 0x2c, 0x16, 0x00, 0x00, 0x00, 0x00, - 0x91, 0x40, 0xc0, 0x00, 0x00, 0x00, - 0xc0, 0xd0, 0x20, 0x00, 0x00, 0x00, - 0x06, 0x82, 0xa0, 0x00, 0x00, 0x00, - 0xc8, 0x0c, 0x40, 0x00, 0x00, 0x00, - 0x45, 0x61, 0x00, 0x00, 0x00, 0x00, - 0x30, 0x91, 0x40, 0x00, 0x00, 0x00, - 0xa2, 0x28, 0x20, 0x00, 0x00, 0x00 -}; - -const uint8_t kMaskRandom19_16[96] = { - 0x2c, 0x16, 0x00, 0x00, 0x00, 0x00, - 0x91, 0x40, 0xc0, 0x00, 0x00, 0x00, - 0xc0, 0xd0, 0x20, 0x00, 0x00, 0x00, - 0x06, 0x82, 0xa0, 0x00, 0x00, 0x00, - 0xc8, 0x0c, 0x40, 0x00, 0x00, 0x00, - 0x45, 0x61, 0x00, 0x00, 0x00, 0x00, - 0x30, 0x91, 0x40, 0x00, 0x00, 0x00, - 0xa2, 0x28, 0x20, 0x00, 0x00, 0x00, - 0x8c, 0x23, 0x00, 0x00, 0x00, 0x00, - 0x47, 0x19, 0x80, 0x00, 0x00, 0x00, - 0x81, 0x88, 0x60, 0x00, 0x00, 0x00, - 0x12, 0x86, 0x20, 0x00, 0x00, 0x00, - 0x58, 0x14, 0x40, 0x00, 0x00, 0x00, - 0x28, 0xca, 0x00, 0x00, 0x00, 0x00, - 0x34, 0x60, 0x80, 0x00, 0x00, 0x00, - 0x7e, 0x75, 0xe0, 0x00, 0x00, 0x00 -}; - -const uint8_t kMaskRandom19_17[102] = { - 0x2c, 0x16, 0x00, 0x00, 0x00, 0x00, - 0x91, 0x40, 0xc0, 0x00, 0x00, 0x00, - 0xc0, 0xd0, 0x20, 0x00, 0x00, 0x00, - 0x06, 0x82, 0xa0, 0x00, 0x00, 0x00, - 0xc8, 0x0c, 0x40, 0x00, 0x00, 0x00, - 0x45, 0x61, 0x00, 0x00, 0x00, 0x00, - 0x30, 0x91, 0x40, 0x00, 0x00, 0x00, - 0xa2, 0x28, 0x20, 0x00, 0x00, 0x00, - 0x4c, 0x27, 0x00, 0x00, 0x00, 0x00, - 0x66, 0x71, 0x80, 0x00, 0x00, 0x00, - 0x91, 0x40, 0xe0, 0x00, 0x00, 0x00, - 0x42, 0x90, 0xa0, 0x00, 0x00, 0x00, - 0xa4, 0x29, 0x40, 0x00, 0x00, 0x00, - 0x13, 0x5a, 0x00, 0x00, 0x00, 0x00, - 0x30, 0x93, 0x40, 0x00, 0x00, 0x00, - 0x88, 0xac, 0x20, 0x00, 0x00, 0x00, - 0x09, 0x0c, 0xc0, 0x00, 0x00, 0x00 -}; - -const uint8_t kMaskRandom19_18[108] = { - 0x4c, 0x27, 0x00, 0x00, 0x00, 0x00, - 0x66, 0x71, 0x80, 0x00, 0x00, 0x00, - 0x91, 0x40, 0xe0, 0x00, 0x00, 0x00, - 0x42, 0x90, 0xa0, 0x00, 0x00, 0x00, - 0xa4, 0x29, 0x40, 0x00, 0x00, 0x00, - 0x13, 0x5a, 0x00, 0x00, 0x00, 0x00, - 0x30, 0x93, 0x40, 0x00, 0x00, 0x00, - 0x88, 0xac, 0x20, 0x00, 0x00, 0x00, - 0x09, 0x0c, 0xc0, 0x00, 0x00, 0x00, - 0x2c, 0x16, 0x00, 0x00, 0x00, 0x00, - 0x91, 0x40, 0xc0, 0x00, 0x00, 0x00, - 0xc0, 0xd0, 0x20, 0x00, 0x00, 0x00, - 0x06, 0x82, 0xa0, 0x00, 0x00, 0x00, - 0xc8, 0x0c, 0x40, 0x00, 0x00, 0x00, - 0x45, 0x61, 0x00, 0x00, 0x00, 0x00, - 0x30, 0x91, 0x40, 0x00, 0x00, 0x00, - 0xa2, 0x28, 0x20, 0x00, 0x00, 0x00, - 0x51, 0x97, 0x20, 0x00, 0x00, 0x00 -}; - -const uint8_t kMaskRandom19_19[114] = { - 0x4c, 0x27, 0x00, 0x00, 0x00, 0x00, - 0x66, 0x71, 0x80, 0x00, 0x00, 0x00, - 0x91, 0x40, 0xe0, 0x00, 0x00, 0x00, - 0x42, 0x90, 0xa0, 0x00, 0x00, 0x00, - 0xa4, 0x29, 0x40, 0x00, 0x00, 0x00, - 0x13, 0x5a, 0x00, 0x00, 0x00, 0x00, - 0x30, 0x93, 0x40, 0x00, 0x00, 0x00, - 0x88, 0xac, 0x20, 0x00, 0x00, 0x00, - 0x09, 0x0c, 0xc0, 0x00, 0x00, 0x00, - 0x4c, 0x26, 0x00, 0x00, 0x00, 0x00, - 0x66, 0x28, 0x80, 0x00, 0x00, 0x00, - 0x91, 0x50, 0x20, 0x00, 0x00, 0x00, - 0x42, 0x82, 0x60, 0x00, 0x00, 0x00, - 0xa4, 0x01, 0xc0, 0x00, 0x00, 0x00, - 0x13, 0x43, 0x00, 0x00, 0x00, 0x00, - 0x30, 0x94, 0x80, 0x00, 0x00, 0x00, - 0x88, 0xa1, 0x20, 0x00, 0x00, 0x00, - 0x09, 0x4c, 0x00, 0x00, 0x00, 0x00, - 0xcd, 0x98, 0x40, 0x00, 0x00, 0x00 -}; - -const uint8_t kMaskRandom19_2[12] = { - 0xce, 0x77, 0x00, 0x00, 0x00, 0x00, - 0x39, 0xcc, 0xe0, 0x00, 0x00, 0x00 -}; - -const uint8_t kMaskRandom19_3[18] = { - 0xcc, 0x67, 0x00, 0x00, 0x00, 0x00, - 0x27, 0x2c, 0xc0, 0x00, 0x00, 0x00, - 0x92, 0xd2, 0x60, 0x00, 0x00, 0x00 -}; - -const uint8_t kMaskRandom19_4[24] = { - 0xec, 0x73, 0x00, 0x00, 0x00, 0x00, - 0x67, 0x19, 0xc0, 0x00, 0x00, 0x00, - 0xb1, 0xcc, 0x60, 0x00, 0x00, 0x00, - 0x5a, 0x96, 0xa0, 0x00, 0x00, 0x00 -}; - -const uint8_t kMaskRandom19_5[30] = { - 0x4c, 0xe7, 0x00, 0x00, 0x00, 0x00, - 0x66, 0x31, 0xc0, 0x00, 0x00, 0x00, - 0xa1, 0xcc, 0x60, 0x00, 0x00, 0x00, - 0x92, 0xa6, 0xa0, 0x00, 0x00, 0x00, - 0xb8, 0x99, 0x80, 0x00, 0x00, 0x00 -}; - -const uint8_t kMaskRandom19_6[36] = { - 0x4c, 0x36, 0x00, 0x00, 0x00, 0x00, - 0x45, 0x68, 0x80, 0x00, 0x00, 0x00, - 0x30, 0xd0, 0x60, 0x00, 0x00, 0x00, - 0x8a, 0x82, 0xa0, 0x00, 0x00, 0x00, - 0x26, 0x0b, 0x40, 0x00, 0x00, 0x00, - 0x95, 0x45, 0x00, 0x00, 0x00, 0x00 -}; - -const uint8_t kMaskRandom19_7[42] = { - 0xc4, 0xa3, 0x00, 0x00, 0x00, 0x00, - 0x23, 0x19, 0x80, 0x00, 0x00, 0x00, - 0x91, 0x1c, 0x20, 0x00, 0x00, 0x00, - 0x4a, 0x82, 0xa0, 0x00, 0x00, 0x00, - 0x34, 0x49, 0x40, 0x00, 0x00, 0x00, - 0x8b, 0x4a, 0x00, 0x00, 0x00, 0x00, - 0xc8, 0x24, 0xc0, 0x00, 0x00, 0x00 -}; - -const uint8_t kMaskRandom19_8[48] = { - 0x16, 0x13, 0x80, 0x00, 0x00, 0x00, - 0xc2, 0x44, 0xc0, 0x00, 0x00, 0x00, - 0x60, 0xe8, 0x20, 0x00, 0x00, 0x00, - 0x85, 0x12, 0x60, 0x00, 0x00, 0x00, - 0xcc, 0x21, 0x40, 0x00, 0x00, 0x00, - 0x29, 0x63, 0x00, 0x00, 0x00, 0x00, - 0x11, 0x98, 0xc0, 0x00, 0x00, 0x00, - 0xb0, 0x0c, 0x60, 0x00, 0x00, 0x00 -}; - -const uint8_t kMaskRandom19_9[54] = { - 0x44, 0xa7, 0x00, 0x00, 0x00, 0x00, - 0x66, 0x70, 0x80, 0x00, 0x00, 0x00, - 0x12, 0xc0, 0xe0, 0x00, 0x00, 0x00, - 0xc3, 0x10, 0xa0, 0x00, 0x00, 0x00, - 0x8c, 0x29, 0x40, 0x00, 0x00, 0x00, - 0x11, 0x5b, 0x00, 0x00, 0x00, 0x00, - 0x21, 0x93, 0x40, 0x00, 0x00, 0x00, - 0xa2, 0x2c, 0x00, 0x00, 0x00, 0x00, - 0x18, 0x0c, 0xe0, 0x00, 0x00, 0x00 -}; - -const uint8_t kMaskRandom1_1[2] = { - 0x80, 0x00 -}; - -const uint8_t kMaskRandom20_1[6] = { - 0xff, 0xff, 0xf0, 0x00, 0x00, 0x00 -}; - -const uint8_t kMaskRandom20_10[60] = { - 0x4c, 0x13, 0x00, 0x00, 0x00, 0x00, - 0x51, 0x14, 0x40, 0x00, 0x00, 0x00, - 0xa0, 0x68, 0x10, 0x00, 0x00, 0x00, - 0x04, 0xc1, 0x30, 0x00, 0x00, 0x00, - 0x03, 0x80, 0xe0, 0x00, 0x00, 0x00, - 0x86, 0x21, 0x80, 0x00, 0x00, 0x00, - 0x29, 0x0a, 0x40, 0x00, 0x00, 0x00, - 0x42, 0x50, 0x90, 0x00, 0x00, 0x00, - 0x98, 0x26, 0x00, 0x00, 0x00, 0x00, - 0x30, 0x8c, 0x20, 0x00, 0x00, 0x00 -}; - -const uint8_t kMaskRandom20_11[66] = { - 0xc6, 0x31, 0x80, 0x00, 0x00, 0x00, - 0x23, 0x88, 0xe0, 0x00, 0x00, 0x00, - 0x1a, 0x46, 0x90, 0x00, 0x00, 0x00, - 0x24, 0xc9, 0x30, 0x00, 0x00, 0x00, - 0x71, 0x1c, 0x40, 0x00, 0x00, 0x00, - 0x0e, 0x03, 0x80, 0x00, 0x00, 0x00, - 0x33, 0x0c, 0xc0, 0x00, 0x00, 0x00, - 0x10, 0xc4, 0x30, 0x00, 0x00, 0x00, - 0x45, 0x51, 0x50, 0x00, 0x00, 0x00, - 0x88, 0xa2, 0x20, 0x00, 0x00, 0x00, - 0xe0, 0x38, 0x00, 0x00, 0x00, 0x00 -}; - -const uint8_t kMaskRandom20_12[72] = { - 0x0e, 0x03, 0x80, 0x00, 0x00, 0x00, - 0x33, 0x0c, 0xc0, 0x00, 0x00, 0x00, - 0x10, 0xc4, 0x30, 0x00, 0x00, 0x00, - 0x45, 0x51, 0x50, 0x00, 0x00, 0x00, - 0x88, 0xa2, 0x20, 0x00, 0x00, 0x00, - 0xe0, 0x38, 0x00, 0x00, 0x00, 0x00, - 0xc6, 0x31, 0x80, 0x00, 0x00, 0x00, - 0x23, 0x88, 0xe0, 0x00, 0x00, 0x00, - 0x1a, 0x46, 0x90, 0x00, 0x00, 0x00, - 0x24, 0xc9, 0x30, 0x00, 0x00, 0x00, - 0x71, 0x1c, 0x40, 0x00, 0x00, 0x00, - 0xf5, 0xdc, 0x40, 0x00, 0x00, 0x00 -}; - -const uint8_t kMaskRandom20_13[78] = { - 0x0e, 0x03, 0x80, 0x00, 0x00, 0x00, - 0x33, 0x0c, 0xc0, 0x00, 0x00, 0x00, - 0x10, 0xc4, 0x30, 0x00, 0x00, 0x00, - 0x45, 0x51, 0x50, 0x00, 0x00, 0x00, - 0x88, 0xa2, 0x20, 0x00, 0x00, 0x00, - 0xe0, 0x38, 0x00, 0x00, 0x00, 0x00, - 0x46, 0x11, 0x80, 0x00, 0x00, 0x00, - 0x33, 0x0c, 0xc0, 0x00, 0x00, 0x00, - 0x10, 0xc4, 0x30, 0x00, 0x00, 0x00, - 0x0c, 0x43, 0x10, 0x00, 0x00, 0x00, - 0x28, 0x8a, 0x20, 0x00, 0x00, 0x00, - 0x94, 0x25, 0x00, 0x00, 0x00, 0x00, - 0xc1, 0x30, 0x40, 0x00, 0x00, 0x00 -}; - -const uint8_t kMaskRandom20_14[84] = { - 0x46, 0x11, 0x80, 0x00, 0x00, 0x00, - 0x33, 0x0c, 0xc0, 0x00, 0x00, 0x00, - 0x10, 0xc4, 0x30, 0x00, 0x00, 0x00, - 0x0c, 0x43, 0x10, 0x00, 0x00, 0x00, - 0x28, 0x8a, 0x20, 0x00, 0x00, 0x00, - 0x94, 0x25, 0x00, 0x00, 0x00, 0x00, - 0xc1, 0x30, 0x40, 0x00, 0x00, 0x00, - 0x0e, 0x03, 0x80, 0x00, 0x00, 0x00, - 0x33, 0x0c, 0xc0, 0x00, 0x00, 0x00, - 0x10, 0xc4, 0x30, 0x00, 0x00, 0x00, - 0x45, 0x51, 0x50, 0x00, 0x00, 0x00, - 0x88, 0xa2, 0x20, 0x00, 0x00, 0x00, - 0xe0, 0x38, 0x00, 0x00, 0x00, 0x00, - 0x56, 0x3e, 0x20, 0x00, 0x00, 0x00 -}; - -const uint8_t kMaskRandom20_15[90] = { - 0x46, 0x11, 0x80, 0x00, 0x00, 0x00, - 0x33, 0x0c, 0xc0, 0x00, 0x00, 0x00, - 0x10, 0xc4, 0x30, 0x00, 0x00, 0x00, - 0x0c, 0x43, 0x10, 0x00, 0x00, 0x00, - 0x28, 0x8a, 0x20, 0x00, 0x00, 0x00, - 0x94, 0x25, 0x00, 0x00, 0x00, 0x00, - 0xc1, 0x30, 0x40, 0x00, 0x00, 0x00, - 0x2c, 0x0b, 0x00, 0x00, 0x00, 0x00, - 0x81, 0xa0, 0x60, 0x00, 0x00, 0x00, - 0xa0, 0x68, 0x10, 0x00, 0x00, 0x00, - 0x05, 0x41, 0x50, 0x00, 0x00, 0x00, - 0x18, 0x86, 0x20, 0x00, 0x00, 0x00, - 0xc2, 0x30, 0x80, 0x00, 0x00, 0x00, - 0x22, 0x88, 0xa0, 0x00, 0x00, 0x00, - 0x50, 0x54, 0x10, 0x00, 0x00, 0x00 -}; - -const uint8_t kMaskRandom20_16[96] = { - 0x2c, 0x0b, 0x00, 0x00, 0x00, 0x00, - 0x81, 0xa0, 0x60, 0x00, 0x00, 0x00, - 0xa0, 0x68, 0x10, 0x00, 0x00, 0x00, - 0x05, 0x41, 0x50, 0x00, 0x00, 0x00, - 0x18, 0x86, 0x20, 0x00, 0x00, 0x00, - 0xc2, 0x30, 0x80, 0x00, 0x00, 0x00, - 0x22, 0x88, 0xa0, 0x00, 0x00, 0x00, - 0x50, 0x54, 0x10, 0x00, 0x00, 0x00, - 0x46, 0x11, 0x80, 0x00, 0x00, 0x00, - 0x33, 0x0c, 0xc0, 0x00, 0x00, 0x00, - 0x10, 0xc4, 0x30, 0x00, 0x00, 0x00, - 0x0c, 0x43, 0x10, 0x00, 0x00, 0x00, - 0x28, 0x8a, 0x20, 0x00, 0x00, 0x00, - 0x94, 0x25, 0x00, 0x00, 0x00, 0x00, - 0xc1, 0x30, 0x40, 0x00, 0x00, 0x00, - 0x28, 0x1c, 0x60, 0x00, 0x00, 0x00 -}; - -const uint8_t kMaskRandom20_17[102] = { - 0x2c, 0x0b, 0x00, 0x00, 0x00, 0x00, - 0x81, 0xa0, 0x60, 0x00, 0x00, 0x00, - 0xa0, 0x68, 0x10, 0x00, 0x00, 0x00, - 0x05, 0x41, 0x50, 0x00, 0x00, 0x00, - 0x18, 0x86, 0x20, 0x00, 0x00, 0x00, - 0xc2, 0x30, 0x80, 0x00, 0x00, 0x00, - 0x22, 0x88, 0xa0, 0x00, 0x00, 0x00, - 0x50, 0x54, 0x10, 0x00, 0x00, 0x00, - 0x4e, 0x13, 0x80, 0x00, 0x00, 0x00, - 0xe3, 0x38, 0xc0, 0x00, 0x00, 0x00, - 0x81, 0xe0, 0x70, 0x00, 0x00, 0x00, - 0x21, 0x48, 0x50, 0x00, 0x00, 0x00, - 0x52, 0x94, 0xa0, 0x00, 0x00, 0x00, - 0xb4, 0x2d, 0x00, 0x00, 0x00, 0x00, - 0x26, 0x89, 0xa0, 0x00, 0x00, 0x00, - 0x58, 0x56, 0x10, 0x00, 0x00, 0x00, - 0x19, 0x86, 0x60, 0x00, 0x00, 0x00 -}; - -const uint8_t kMaskRandom20_18[108] = { - 0x4e, 0x13, 0x80, 0x00, 0x00, 0x00, - 0xe3, 0x38, 0xc0, 0x00, 0x00, 0x00, - 0x81, 0xe0, 0x70, 0x00, 0x00, 0x00, - 0x21, 0x48, 0x50, 0x00, 0x00, 0x00, - 0x52, 0x94, 0xa0, 0x00, 0x00, 0x00, - 0xb4, 0x2d, 0x00, 0x00, 0x00, 0x00, - 0x26, 0x89, 0xa0, 0x00, 0x00, 0x00, - 0x58, 0x56, 0x10, 0x00, 0x00, 0x00, - 0x19, 0x86, 0x60, 0x00, 0x00, 0x00, - 0x2c, 0x0b, 0x00, 0x00, 0x00, 0x00, - 0x81, 0xa0, 0x60, 0x00, 0x00, 0x00, - 0xa0, 0x68, 0x10, 0x00, 0x00, 0x00, - 0x05, 0x41, 0x50, 0x00, 0x00, 0x00, - 0x18, 0x86, 0x20, 0x00, 0x00, 0x00, - 0xc2, 0x30, 0x80, 0x00, 0x00, 0x00, - 0x22, 0x88, 0xa0, 0x00, 0x00, 0x00, - 0x50, 0x54, 0x10, 0x00, 0x00, 0x00, - 0x21, 0x7b, 0xf0, 0x00, 0x00, 0x00 -}; - -const uint8_t kMaskRandom20_19[114] = { - 0x4e, 0x13, 0x80, 0x00, 0x00, 0x00, - 0xe3, 0x38, 0xc0, 0x00, 0x00, 0x00, - 0x81, 0xe0, 0x70, 0x00, 0x00, 0x00, - 0x21, 0x48, 0x50, 0x00, 0x00, 0x00, - 0x52, 0x94, 0xa0, 0x00, 0x00, 0x00, - 0xb4, 0x2d, 0x00, 0x00, 0x00, 0x00, - 0x26, 0x89, 0xa0, 0x00, 0x00, 0x00, - 0x58, 0x56, 0x10, 0x00, 0x00, 0x00, - 0x19, 0x86, 0x60, 0x00, 0x00, 0x00, - 0x4c, 0x13, 0x00, 0x00, 0x00, 0x00, - 0x51, 0x14, 0x40, 0x00, 0x00, 0x00, - 0xa0, 0x68, 0x10, 0x00, 0x00, 0x00, - 0x04, 0xc1, 0x30, 0x00, 0x00, 0x00, - 0x03, 0x80, 0xe0, 0x00, 0x00, 0x00, - 0x86, 0x21, 0x80, 0x00, 0x00, 0x00, - 0x29, 0x0a, 0x40, 0x00, 0x00, 0x00, - 0x42, 0x50, 0x90, 0x00, 0x00, 0x00, - 0x98, 0x26, 0x00, 0x00, 0x00, 0x00, - 0x30, 0x8c, 0x20, 0x00, 0x00, 0x00 -}; - -const uint8_t kMaskRandom20_2[12] = { - 0xee, 0x3b, 0x80, 0x00, 0x00, 0x00, - 0x99, 0xe6, 0x70, 0x00, 0x00, 0x00 -}; - -const uint8_t kMaskRandom20_20[120] = { - 0x4c, 0x13, 0x00, 0x00, 0x00, 0x00, - 0x51, 0x14, 0x40, 0x00, 0x00, 0x00, - 0xa0, 0x68, 0x10, 0x00, 0x00, 0x00, - 0x04, 0xc1, 0x30, 0x00, 0x00, 0x00, - 0x03, 0x80, 0xe0, 0x00, 0x00, 0x00, - 0x86, 0x21, 0x80, 0x00, 0x00, 0x00, - 0x29, 0x0a, 0x40, 0x00, 0x00, 0x00, - 0x42, 0x50, 0x90, 0x00, 0x00, 0x00, - 0x98, 0x26, 0x00, 0x00, 0x00, 0x00, - 0x30, 0x8c, 0x20, 0x00, 0x00, 0x00, - 0x4e, 0x13, 0x80, 0x00, 0x00, 0x00, - 0xe3, 0x38, 0xc0, 0x00, 0x00, 0x00, - 0x81, 0xe0, 0x70, 0x00, 0x00, 0x00, - 0x21, 0x48, 0x50, 0x00, 0x00, 0x00, - 0x52, 0x94, 0xa0, 0x00, 0x00, 0x00, - 0xb4, 0x2d, 0x00, 0x00, 0x00, 0x00, - 0x26, 0x89, 0xa0, 0x00, 0x00, 0x00, - 0x58, 0x56, 0x10, 0x00, 0x00, 0x00, - 0x19, 0x86, 0x60, 0x00, 0x00, 0x00, - 0xf7, 0x8d, 0xa0, 0x00, 0x00, 0x00 -}; - -const uint8_t kMaskRandom20_3[18] = { - 0xce, 0x33, 0x80, 0x00, 0x00, 0x00, - 0x55, 0x95, 0x60, 0x00, 0x00, 0x00, - 0xb1, 0x6a, 0x30, 0x00, 0x00, 0x00 -}; - -const uint8_t kMaskRandom20_4[24] = { - 0xe6, 0x39, 0x80, 0x00, 0x00, 0x00, - 0x33, 0x8c, 0xe0, 0x00, 0x00, 0x00, - 0x98, 0xe6, 0x30, 0x00, 0x00, 0x00, - 0x2d, 0x4b, 0x50, 0x00, 0x00, 0x00 -}; - -const uint8_t kMaskRandom20_5[30] = { - 0xce, 0x33, 0x80, 0x00, 0x00, 0x00, - 0x63, 0x98, 0xe0, 0x00, 0x00, 0x00, - 0x98, 0xe5, 0x30, 0x00, 0x00, 0x00, - 0x2b, 0x53, 0x50, 0x00, 0x00, 0x00, - 0xb4, 0x5c, 0xa0, 0x00, 0x00, 0x00 -}; - -const uint8_t kMaskRandom20_6[36] = { - 0x4c, 0x1b, 0x00, 0x00, 0x00, 0x00, - 0x51, 0x34, 0x40, 0x00, 0x00, 0x00, - 0x20, 0xe8, 0x30, 0x00, 0x00, 0x00, - 0x85, 0x41, 0x50, 0x00, 0x00, 0x00, - 0x06, 0x86, 0xa0, 0x00, 0x00, 0x00, - 0x9a, 0x21, 0x80, 0x00, 0x00, 0x00 -}; - -const uint8_t kMaskRandom20_7[42] = { - 0x4e, 0x11, 0x80, 0x00, 0x00, 0x00, - 0x33, 0x2c, 0x00, 0x00, 0x00, 0x00, - 0x10, 0x0e, 0xb0, 0x00, 0x00, 0x00, - 0x81, 0x51, 0x50, 0x00, 0x00, 0x00, - 0x24, 0xc4, 0xa0, 0x00, 0x00, 0x00, - 0xd4, 0x23, 0x00, 0x00, 0x00, 0x00, - 0x0c, 0xa2, 0x60, 0x00, 0x00, 0x00 -}; - -const uint8_t kMaskRandom20_8[48] = { - 0x27, 0x09, 0xc0, 0x00, 0x00, 0x00, - 0x89, 0xa2, 0x60, 0x00, 0x00, 0x00, - 0xd0, 0x74, 0x10, 0x00, 0x00, 0x00, - 0x24, 0xc9, 0x30, 0x00, 0x00, 0x00, - 0xe2, 0x90, 0xa0, 0x00, 0x00, 0x00, - 0xc6, 0x31, 0x80, 0x00, 0x00, 0x00, - 0x31, 0x8c, 0x60, 0x00, 0x00, 0x00, - 0x18, 0xc6, 0x30, 0x00, 0x00, 0x00 -}; - -const uint8_t kMaskRandom20_9[54] = { - 0x4e, 0x13, 0x80, 0x00, 0x00, 0x00, - 0x62, 0x38, 0xc0, 0x00, 0x00, 0x00, - 0x81, 0xe0, 0x70, 0x00, 0x00, 0x00, - 0xe1, 0x48, 0x50, 0x00, 0x00, 0x00, - 0x13, 0x94, 0xa0, 0x00, 0x00, 0x00, - 0xb4, 0x2d, 0x00, 0x00, 0x00, 0x00, - 0x26, 0x89, 0xa0, 0x00, 0x00, 0x00, - 0x58, 0x56, 0x10, 0x00, 0x00, 0x00, - 0x49, 0x86, 0x50, 0x00, 0x00, 0x00 -}; - -const uint8_t kMaskRandom21_1[6] = { - 0xff, 0xff, 0xf8, 0x00, 0x00, 0x00 -}; - -const uint8_t kMaskRandom21_10[60] = { - 0x4c, 0x19, 0x10, 0x00, 0x00, 0x00, - 0x51, 0x14, 0x50, 0x00, 0x00, 0x00, - 0xa0, 0x6a, 0x40, 0x00, 0x00, 0x00, - 0x04, 0xc1, 0x30, 0x00, 0x00, 0x00, - 0x03, 0xb4, 0x00, 0x00, 0x00, 0x00, - 0x86, 0x20, 0x90, 0x00, 0x00, 0x00, - 0x29, 0x08, 0x48, 0x00, 0x00, 0x00, - 0x42, 0x43, 0x08, 0x00, 0x00, 0x00, - 0x98, 0x12, 0x80, 0x00, 0x00, 0x00, - 0x30, 0x84, 0xa8, 0x00, 0x00, 0x00 -}; - -const uint8_t kMaskRandom21_11[66] = { - 0xc6, 0x21, 0xa0, 0x00, 0x00, 0x00, - 0x23, 0x88, 0xc8, 0x00, 0x00, 0x00, - 0x1a, 0x45, 0x88, 0x00, 0x00, 0x00, - 0x24, 0xd3, 0x08, 0x00, 0x00, 0x00, - 0x71, 0x10, 0x70, 0x00, 0x00, 0x00, - 0x0e, 0x19, 0x10, 0x00, 0x00, 0x00, - 0x33, 0x14, 0x50, 0x00, 0x00, 0x00, - 0x10, 0xc3, 0x28, 0x00, 0x00, 0x00, - 0x45, 0x68, 0x48, 0x00, 0x00, 0x00, - 0x88, 0x84, 0xa8, 0x00, 0x00, 0x00, - 0xe0, 0x22, 0x90, 0x00, 0x00, 0x00 -}; - -const uint8_t kMaskRandom21_12[72] = { - 0x0e, 0x19, 0x10, 0x00, 0x00, 0x00, - 0x33, 0x14, 0x50, 0x00, 0x00, 0x00, - 0x10, 0xc3, 0x28, 0x00, 0x00, 0x00, - 0x45, 0x68, 0x48, 0x00, 0x00, 0x00, - 0x88, 0x84, 0xa8, 0x00, 0x00, 0x00, - 0xe0, 0x22, 0x90, 0x00, 0x00, 0x00, - 0xc6, 0x21, 0xa0, 0x00, 0x00, 0x00, - 0x23, 0x88, 0xc8, 0x00, 0x00, 0x00, - 0x1a, 0x45, 0x88, 0x00, 0x00, 0x00, - 0x24, 0xd3, 0x08, 0x00, 0x00, 0x00, - 0x71, 0x10, 0x70, 0x00, 0x00, 0x00, - 0xa0, 0x65, 0x18, 0x00, 0x00, 0x00 -}; - -const uint8_t kMaskRandom21_13[78] = { - 0x0e, 0x19, 0x10, 0x00, 0x00, 0x00, - 0x33, 0x14, 0x50, 0x00, 0x00, 0x00, - 0x10, 0xc3, 0x28, 0x00, 0x00, 0x00, - 0x45, 0x68, 0x48, 0x00, 0x00, 0x00, - 0x88, 0x84, 0xa8, 0x00, 0x00, 0x00, - 0xe0, 0x22, 0x90, 0x00, 0x00, 0x00, - 0x46, 0x11, 0x90, 0x00, 0x00, 0x00, - 0x33, 0x0c, 0xc8, 0x00, 0x00, 0x00, - 0x10, 0xe4, 0x60, 0x00, 0x00, 0x00, - 0x0c, 0x69, 0x08, 0x00, 0x00, 0x00, - 0x28, 0x94, 0x28, 0x00, 0x00, 0x00, - 0x94, 0x21, 0x30, 0x00, 0x00, 0x00, - 0xc1, 0x02, 0x58, 0x00, 0x00, 0x00 -}; - -const uint8_t kMaskRandom21_14[84] = { - 0x46, 0x11, 0x90, 0x00, 0x00, 0x00, - 0x33, 0x0c, 0xc8, 0x00, 0x00, 0x00, - 0x10, 0xe4, 0x60, 0x00, 0x00, 0x00, - 0x0c, 0x69, 0x08, 0x00, 0x00, 0x00, - 0x28, 0x94, 0x28, 0x00, 0x00, 0x00, - 0x94, 0x21, 0x30, 0x00, 0x00, 0x00, - 0xc1, 0x02, 0x58, 0x00, 0x00, 0x00, - 0x0e, 0x19, 0x10, 0x00, 0x00, 0x00, - 0x33, 0x14, 0x50, 0x00, 0x00, 0x00, - 0x10, 0xc3, 0x28, 0x00, 0x00, 0x00, - 0x45, 0x68, 0x48, 0x00, 0x00, 0x00, - 0x88, 0x84, 0xa8, 0x00, 0x00, 0x00, - 0xe0, 0x22, 0x90, 0x00, 0x00, 0x00, - 0x4d, 0xd0, 0xc0, 0x00, 0x00, 0x00 -}; - -const uint8_t kMaskRandom21_15[90] = { - 0x46, 0x11, 0x90, 0x00, 0x00, 0x00, - 0x33, 0x0c, 0xc8, 0x00, 0x00, 0x00, - 0x10, 0xe4, 0x60, 0x00, 0x00, 0x00, - 0x0c, 0x69, 0x08, 0x00, 0x00, 0x00, - 0x28, 0x94, 0x28, 0x00, 0x00, 0x00, - 0x94, 0x21, 0x30, 0x00, 0x00, 0x00, - 0xc1, 0x02, 0x58, 0x00, 0x00, 0x00, - 0x2c, 0x03, 0x20, 0x00, 0x00, 0x00, - 0x81, 0xa0, 0x18, 0x00, 0x00, 0x00, - 0xa0, 0x68, 0x20, 0x00, 0x00, 0x00, - 0x05, 0x41, 0x50, 0x00, 0x00, 0x00, - 0x18, 0x90, 0xc0, 0x00, 0x00, 0x00, - 0xc2, 0x06, 0x80, 0x00, 0x00, 0x00, - 0x22, 0x98, 0x08, 0x00, 0x00, 0x00, - 0x50, 0x45, 0x08, 0x00, 0x00, 0x00 -}; - -const uint8_t kMaskRandom21_16[96] = { - 0x2c, 0x03, 0x20, 0x00, 0x00, 0x00, - 0x81, 0xa0, 0x18, 0x00, 0x00, 0x00, - 0xa0, 0x68, 0x20, 0x00, 0x00, 0x00, - 0x05, 0x41, 0x50, 0x00, 0x00, 0x00, - 0x18, 0x90, 0xc0, 0x00, 0x00, 0x00, - 0xc2, 0x06, 0x80, 0x00, 0x00, 0x00, - 0x22, 0x98, 0x08, 0x00, 0x00, 0x00, - 0x50, 0x45, 0x08, 0x00, 0x00, 0x00, - 0x46, 0x11, 0x90, 0x00, 0x00, 0x00, - 0x33, 0x0c, 0xc8, 0x00, 0x00, 0x00, - 0x10, 0xe4, 0x60, 0x00, 0x00, 0x00, - 0x0c, 0x69, 0x08, 0x00, 0x00, 0x00, - 0x28, 0x94, 0x28, 0x00, 0x00, 0x00, - 0x94, 0x21, 0x30, 0x00, 0x00, 0x00, - 0xc1, 0x02, 0x58, 0x00, 0x00, 0x00, - 0x3b, 0xf5, 0x38, 0x00, 0x00, 0x00 -}; - -const uint8_t kMaskRandom21_17[102] = { - 0x2c, 0x03, 0x20, 0x00, 0x00, 0x00, - 0x81, 0xa0, 0x18, 0x00, 0x00, 0x00, - 0xa0, 0x68, 0x20, 0x00, 0x00, 0x00, - 0x05, 0x41, 0x50, 0x00, 0x00, 0x00, - 0x18, 0x90, 0xc0, 0x00, 0x00, 0x00, - 0xc2, 0x06, 0x80, 0x00, 0x00, 0x00, - 0x22, 0x98, 0x08, 0x00, 0x00, 0x00, - 0x50, 0x45, 0x08, 0x00, 0x00, 0x00, - 0x4e, 0x11, 0x90, 0x00, 0x00, 0x00, - 0xe3, 0x18, 0x98, 0x00, 0x00, 0x00, - 0x81, 0xe3, 0x00, 0x00, 0x00, 0x00, - 0x21, 0x40, 0x58, 0x00, 0x00, 0x00, - 0x52, 0x81, 0xe0, 0x00, 0x00, 0x00, - 0xb4, 0x28, 0x20, 0x00, 0x00, 0x00, - 0x26, 0x86, 0x28, 0x00, 0x00, 0x00, - 0x58, 0x64, 0x40, 0x00, 0x00, 0x00, - 0x19, 0x9e, 0x00, 0x00, 0x00, 0x00 -}; - -const uint8_t kMaskRandom21_18[108] = { - 0x4e, 0x11, 0x90, 0x00, 0x00, 0x00, - 0xe3, 0x18, 0x98, 0x00, 0x00, 0x00, - 0x81, 0xe3, 0x00, 0x00, 0x00, 0x00, - 0x21, 0x40, 0x58, 0x00, 0x00, 0x00, - 0x52, 0x81, 0xe0, 0x00, 0x00, 0x00, - 0xb4, 0x28, 0x20, 0x00, 0x00, 0x00, - 0x26, 0x86, 0x28, 0x00, 0x00, 0x00, - 0x58, 0x64, 0x40, 0x00, 0x00, 0x00, - 0x19, 0x9e, 0x00, 0x00, 0x00, 0x00, - 0x2c, 0x03, 0x20, 0x00, 0x00, 0x00, - 0x81, 0xa0, 0x18, 0x00, 0x00, 0x00, - 0xa0, 0x68, 0x20, 0x00, 0x00, 0x00, - 0x05, 0x41, 0x50, 0x00, 0x00, 0x00, - 0x18, 0x90, 0xc0, 0x00, 0x00, 0x00, - 0xc2, 0x06, 0x80, 0x00, 0x00, 0x00, - 0x22, 0x98, 0x08, 0x00, 0x00, 0x00, - 0x50, 0x45, 0x08, 0x00, 0x00, 0x00, - 0x5a, 0x56, 0x58, 0x00, 0x00, 0x00 -}; - -const uint8_t kMaskRandom21_19[114] = { - 0x4e, 0x11, 0x90, 0x00, 0x00, 0x00, - 0xe3, 0x18, 0x98, 0x00, 0x00, 0x00, - 0x81, 0xe3, 0x00, 0x00, 0x00, 0x00, - 0x21, 0x40, 0x58, 0x00, 0x00, 0x00, - 0x52, 0x81, 0xe0, 0x00, 0x00, 0x00, - 0xb4, 0x28, 0x20, 0x00, 0x00, 0x00, - 0x26, 0x86, 0x28, 0x00, 0x00, 0x00, - 0x58, 0x64, 0x40, 0x00, 0x00, 0x00, - 0x19, 0x9e, 0x00, 0x00, 0x00, 0x00, - 0x4c, 0x19, 0x10, 0x00, 0x00, 0x00, - 0x51, 0x14, 0x50, 0x00, 0x00, 0x00, - 0xa0, 0x6a, 0x40, 0x00, 0x00, 0x00, - 0x04, 0xc1, 0x30, 0x00, 0x00, 0x00, - 0x03, 0xb4, 0x00, 0x00, 0x00, 0x00, - 0x86, 0x20, 0x90, 0x00, 0x00, 0x00, - 0x29, 0x08, 0x48, 0x00, 0x00, 0x00, - 0x42, 0x43, 0x08, 0x00, 0x00, 0x00, - 0x98, 0x12, 0x80, 0x00, 0x00, 0x00, - 0x30, 0x84, 0xa8, 0x00, 0x00, 0x00 -}; - -const uint8_t kMaskRandom21_2[12] = { - 0xee, 0x3b, 0x30, 0x00, 0x00, 0x00, - 0x99, 0xe6, 0xe8, 0x00, 0x00, 0x00 -}; - -const uint8_t kMaskRandom21_20[120] = { - 0x4c, 0x19, 0x10, 0x00, 0x00, 0x00, - 0x51, 0x14, 0x50, 0x00, 0x00, 0x00, - 0xa0, 0x6a, 0x40, 0x00, 0x00, 0x00, - 0x04, 0xc1, 0x30, 0x00, 0x00, 0x00, - 0x03, 0xb4, 0x00, 0x00, 0x00, 0x00, - 0x86, 0x20, 0x90, 0x00, 0x00, 0x00, - 0x29, 0x08, 0x48, 0x00, 0x00, 0x00, - 0x42, 0x43, 0x08, 0x00, 0x00, 0x00, - 0x98, 0x12, 0x80, 0x00, 0x00, 0x00, - 0x30, 0x84, 0xa8, 0x00, 0x00, 0x00, - 0x4e, 0x11, 0x90, 0x00, 0x00, 0x00, - 0xe3, 0x18, 0x98, 0x00, 0x00, 0x00, - 0x81, 0xe3, 0x00, 0x00, 0x00, 0x00, - 0x21, 0x40, 0x58, 0x00, 0x00, 0x00, - 0x52, 0x81, 0xe0, 0x00, 0x00, 0x00, - 0xb4, 0x28, 0x20, 0x00, 0x00, 0x00, - 0x26, 0x86, 0x28, 0x00, 0x00, 0x00, - 0x58, 0x64, 0x40, 0x00, 0x00, 0x00, - 0x19, 0x9e, 0x00, 0x00, 0x00, 0x00, - 0x2a, 0x03, 0x30, 0x00, 0x00, 0x00 -}; - -const uint8_t kMaskRandom21_21[126] = { - 0x4c, 0x19, 0x10, 0x00, 0x00, 0x00, - 0x51, 0x14, 0x50, 0x00, 0x00, 0x00, - 0xa0, 0x6a, 0x40, 0x00, 0x00, 0x00, - 0x04, 0xc1, 0x30, 0x00, 0x00, 0x00, - 0x03, 0xb4, 0x00, 0x00, 0x00, 0x00, - 0x86, 0x20, 0x90, 0x00, 0x00, 0x00, - 0x29, 0x08, 0x48, 0x00, 0x00, 0x00, - 0x42, 0x43, 0x08, 0x00, 0x00, 0x00, - 0x98, 0x12, 0x80, 0x00, 0x00, 0x00, - 0x30, 0x84, 0xa8, 0x00, 0x00, 0x00, - 0x4c, 0x11, 0x90, 0x00, 0x00, 0x00, - 0x51, 0x0c, 0xc8, 0x00, 0x00, 0x00, - 0xa0, 0x66, 0x40, 0x00, 0x00, 0x00, - 0x04, 0xc1, 0x60, 0x00, 0x00, 0x00, - 0x03, 0xa0, 0x28, 0x00, 0x00, 0x00, - 0x86, 0x21, 0x10, 0x00, 0x00, 0x00, - 0x29, 0x10, 0x18, 0x00, 0x00, 0x00, - 0x42, 0x42, 0xa0, 0x00, 0x00, 0x00, - 0x98, 0x1a, 0x00, 0x00, 0x00, 0x00, - 0x30, 0x84, 0x08, 0x00, 0x00, 0x00, - 0xdf, 0x4c, 0x10, 0x00, 0x00, 0x00 -}; - -const uint8_t kMaskRandom21_3[18] = { - 0xce, 0x32, 0xb0, 0x00, 0x00, 0x00, - 0x55, 0xdc, 0x50, 0x00, 0x00, 0x00, - 0xa8, 0xed, 0x88, 0x00, 0x00, 0x00 -}; - -const uint8_t kMaskRandom21_4[24] = { - 0xe6, 0x31, 0x30, 0x00, 0x00, 0x00, - 0x33, 0x8c, 0x58, 0x00, 0x00, 0x00, - 0x98, 0xd2, 0xc8, 0x00, 0x00, 0x00, - 0x2d, 0x4b, 0x28, 0x00, 0x00, 0x00 -}; - -const uint8_t kMaskRandom21_5[30] = { - 0xce, 0x31, 0xb0, 0x00, 0x00, 0x00, - 0x63, 0x98, 0xd8, 0x00, 0x00, 0x00, - 0x98, 0xc7, 0x68, 0x00, 0x00, 0x00, - 0x4d, 0x6b, 0x50, 0x00, 0x00, 0x00, - 0xb2, 0x6c, 0xa8, 0x00, 0x00, 0x00 -}; - -const uint8_t kMaskRandom21_6[36] = { - 0x4c, 0x19, 0x10, 0x00, 0x00, 0x00, - 0x51, 0x14, 0x50, 0x00, 0x00, 0x00, - 0x20, 0xea, 0x08, 0x00, 0x00, 0x00, - 0x85, 0x41, 0x28, 0x00, 0x00, 0x00, - 0x06, 0x80, 0xd8, 0x00, 0x00, 0x00, - 0x8a, 0x24, 0x30, 0x00, 0x00, 0x00 -}; - -const uint8_t kMaskRandom21_7[42] = { - 0xc6, 0x11, 0x90, 0x00, 0x00, 0x00, - 0x33, 0x04, 0xc8, 0x00, 0x00, 0x00, - 0x18, 0x67, 0x40, 0x00, 0x00, 0x00, - 0x45, 0x42, 0xd0, 0x00, 0x00, 0x00, - 0x12, 0xd4, 0x28, 0x00, 0x00, 0x00, - 0xb4, 0x28, 0x30, 0x00, 0x00, 0x00, - 0x29, 0x92, 0x18, 0x00, 0x00, 0x00 -}; - -const uint8_t kMaskRandom21_8[48] = { - 0x07, 0x0a, 0x70, 0x00, 0x00, 0x00, - 0x49, 0xa8, 0x28, 0x00, 0x00, 0x00, - 0xb0, 0x7a, 0x00, 0x00, 0x00, 0x00, - 0x24, 0xc5, 0xc0, 0x00, 0x00, 0x00, - 0x52, 0x80, 0xe8, 0x00, 0x00, 0x00, - 0xc6, 0x31, 0x80, 0x00, 0x00, 0x00, - 0x31, 0x94, 0x18, 0x00, 0x00, 0x00, - 0x18, 0xc7, 0x08, 0x00, 0x00, 0x00 -}; - -const uint8_t kMaskRandom21_9[54] = { - 0x4e, 0x11, 0x10, 0x00, 0x00, 0x00, - 0x62, 0x1a, 0x08, 0x00, 0x00, 0x00, - 0x80, 0xe9, 0x40, 0x00, 0x00, 0x00, - 0xa1, 0x50, 0x50, 0x00, 0x00, 0x00, - 0x53, 0x00, 0x68, 0x00, 0x00, 0x00, - 0xa4, 0x24, 0x30, 0x00, 0x00, 0x00, - 0x16, 0xa0, 0x88, 0x00, 0x00, 0x00, - 0x58, 0x45, 0x20, 0x00, 0x00, 0x00, - 0x29, 0x86, 0x80, 0x00, 0x00, 0x00 -}; - -const uint8_t kMaskRandom22_1[6] = { - 0xff, 0xff, 0xfc, 0x00, 0x00, 0x00 -}; - -const uint8_t kMaskRandom22_10[60] = { - 0xc0, 0x38, 0x88, 0x00, 0x00, 0x00, - 0x30, 0x0e, 0x28, 0x00, 0x00, 0x00, - 0xe8, 0x07, 0x00, 0x00, 0x00, 0x00, - 0x85, 0x08, 0xa8, 0x00, 0x00, 0x00, - 0xd0, 0x92, 0x10, 0x00, 0x00, 0x00, - 0x86, 0x50, 0x48, 0x00, 0x00, 0x00, - 0x4a, 0x68, 0x0c, 0x00, 0x00, 0x00, - 0x01, 0xa0, 0x74, 0x00, 0x00, 0x00, - 0x4c, 0x81, 0x90, 0x00, 0x00, 0x00, - 0x62, 0x24, 0x04, 0x00, 0x00, 0x00 -}; - -const uint8_t kMaskRandom22_11[66] = { - 0x46, 0x48, 0xc8, 0x00, 0x00, 0x00, - 0x33, 0x26, 0x64, 0x00, 0x00, 0x00, - 0x99, 0x13, 0x20, 0x00, 0x00, 0x00, - 0x05, 0x80, 0xb0, 0x00, 0x00, 0x00, - 0x80, 0xb0, 0x14, 0x00, 0x00, 0x00, - 0x84, 0x50, 0x88, 0x00, 0x00, 0x00, - 0x40, 0x68, 0x0c, 0x00, 0x00, 0x00, - 0x0a, 0x81, 0x50, 0x00, 0x00, 0x00, - 0x68, 0x0d, 0x00, 0x00, 0x00, 0x00, - 0x10, 0x22, 0x04, 0x00, 0x00, 0x00, - 0x30, 0x46, 0x08, 0x00, 0x00, 0x00 -}; - -const uint8_t kMaskRandom22_12[72] = { - 0x64, 0x4c, 0x88, 0x00, 0x00, 0x00, - 0x51, 0x4a, 0x28, 0x00, 0x00, 0x00, - 0x0c, 0xa1, 0x94, 0x00, 0x00, 0x00, - 0xa1, 0x34, 0x24, 0x00, 0x00, 0x00, - 0x12, 0xa2, 0x54, 0x00, 0x00, 0x00, - 0x8a, 0x51, 0x48, 0x00, 0x00, 0x00, - 0x86, 0x90, 0xd0, 0x00, 0x00, 0x00, - 0x23, 0x24, 0x64, 0x00, 0x00, 0x00, - 0x16, 0x22, 0xc4, 0x00, 0x00, 0x00, - 0x4c, 0x29, 0x84, 0x00, 0x00, 0x00, - 0x41, 0xc8, 0x38, 0x00, 0x00, 0x00, - 0xf4, 0x18, 0x9c, 0x00, 0x00, 0x00 -}; - -const uint8_t kMaskRandom22_13[78] = { - 0x64, 0x4c, 0x88, 0x00, 0x00, 0x00, - 0x51, 0x4a, 0x28, 0x00, 0x00, 0x00, - 0x0c, 0xa1, 0x94, 0x00, 0x00, 0x00, - 0xa1, 0x34, 0x24, 0x00, 0x00, 0x00, - 0x12, 0xa2, 0x54, 0x00, 0x00, 0x00, - 0x8a, 0x51, 0x48, 0x00, 0x00, 0x00, - 0x46, 0x48, 0xc8, 0x00, 0x00, 0x00, - 0x33, 0x26, 0x64, 0x00, 0x00, 0x00, - 0x91, 0x92, 0x30, 0x00, 0x00, 0x00, - 0xa4, 0x34, 0x84, 0x00, 0x00, 0x00, - 0x50, 0xaa, 0x14, 0x00, 0x00, 0x00, - 0x84, 0xd0, 0x98, 0x00, 0x00, 0x00, - 0x09, 0x61, 0x2c, 0x00, 0x00, 0x00 -}; - -const uint8_t kMaskRandom22_14[84] = { - 0x46, 0x48, 0xc8, 0x00, 0x00, 0x00, - 0x33, 0x26, 0x64, 0x00, 0x00, 0x00, - 0x91, 0x92, 0x30, 0x00, 0x00, 0x00, - 0xa4, 0x34, 0x84, 0x00, 0x00, 0x00, - 0x50, 0xaa, 0x14, 0x00, 0x00, 0x00, - 0x84, 0xd0, 0x98, 0x00, 0x00, 0x00, - 0x09, 0x61, 0x2c, 0x00, 0x00, 0x00, - 0x64, 0x4c, 0x88, 0x00, 0x00, 0x00, - 0x51, 0x4a, 0x28, 0x00, 0x00, 0x00, - 0x0c, 0xa1, 0x94, 0x00, 0x00, 0x00, - 0xa1, 0x34, 0x24, 0x00, 0x00, 0x00, - 0x12, 0xa2, 0x54, 0x00, 0x00, 0x00, - 0x8a, 0x51, 0x48, 0x00, 0x00, 0x00, - 0xc6, 0xca, 0xe8, 0x00, 0x00, 0x00 -}; - -const uint8_t kMaskRandom22_15[90] = { - 0x46, 0x48, 0xc8, 0x00, 0x00, 0x00, - 0x33, 0x26, 0x64, 0x00, 0x00, 0x00, - 0x91, 0x92, 0x30, 0x00, 0x00, 0x00, - 0xa4, 0x34, 0x84, 0x00, 0x00, 0x00, - 0x50, 0xaa, 0x14, 0x00, 0x00, 0x00, - 0x84, 0xd0, 0x98, 0x00, 0x00, 0x00, - 0x09, 0x61, 0x2c, 0x00, 0x00, 0x00, - 0x0c, 0x81, 0x90, 0x00, 0x00, 0x00, - 0x80, 0x70, 0x0c, 0x00, 0x00, 0x00, - 0xa0, 0x94, 0x10, 0x00, 0x00, 0x00, - 0x05, 0x40, 0xa8, 0x00, 0x00, 0x00, - 0x43, 0x08, 0x60, 0x00, 0x00, 0x00, - 0x1a, 0x03, 0x40, 0x00, 0x00, 0x00, - 0x60, 0x2c, 0x04, 0x00, 0x00, 0x00, - 0x14, 0x22, 0x84, 0x00, 0x00, 0x00 -}; - -const uint8_t kMaskRandom22_16[96] = { - 0x0c, 0x81, 0x90, 0x00, 0x00, 0x00, - 0x80, 0x70, 0x0c, 0x00, 0x00, 0x00, - 0xa0, 0x94, 0x10, 0x00, 0x00, 0x00, - 0x05, 0x40, 0xa8, 0x00, 0x00, 0x00, - 0x43, 0x08, 0x60, 0x00, 0x00, 0x00, - 0x1a, 0x03, 0x40, 0x00, 0x00, 0x00, - 0x60, 0x2c, 0x04, 0x00, 0x00, 0x00, - 0x14, 0x22, 0x84, 0x00, 0x00, 0x00, - 0x46, 0x48, 0xc8, 0x00, 0x00, 0x00, - 0x33, 0x26, 0x64, 0x00, 0x00, 0x00, - 0x91, 0x92, 0x30, 0x00, 0x00, 0x00, - 0xa4, 0x34, 0x84, 0x00, 0x00, 0x00, - 0x50, 0xaa, 0x14, 0x00, 0x00, 0x00, - 0x84, 0xd0, 0x98, 0x00, 0x00, 0x00, - 0x09, 0x61, 0x2c, 0x00, 0x00, 0x00, - 0x86, 0xc1, 0x44, 0x00, 0x00, 0x00 -}; - -const uint8_t kMaskRandom22_17[102] = { - 0x0c, 0x81, 0x90, 0x00, 0x00, 0x00, - 0x80, 0x70, 0x0c, 0x00, 0x00, 0x00, - 0xa0, 0x94, 0x10, 0x00, 0x00, 0x00, - 0x05, 0x40, 0xa8, 0x00, 0x00, 0x00, - 0x43, 0x08, 0x60, 0x00, 0x00, 0x00, - 0x1a, 0x03, 0x40, 0x00, 0x00, 0x00, - 0x60, 0x2c, 0x04, 0x00, 0x00, 0x00, - 0x14, 0x22, 0x84, 0x00, 0x00, 0x00, - 0x46, 0x48, 0xc8, 0x00, 0x00, 0x00, - 0x62, 0x6c, 0x4c, 0x00, 0x00, 0x00, - 0x8c, 0x11, 0x80, 0x00, 0x00, 0x00, - 0x01, 0x60, 0x2c, 0x00, 0x00, 0x00, - 0x07, 0x80, 0xf0, 0x00, 0x00, 0x00, - 0xa0, 0x94, 0x10, 0x00, 0x00, 0x00, - 0x18, 0xa3, 0x14, 0x00, 0x00, 0x00, - 0x91, 0x12, 0x20, 0x00, 0x00, 0x00, - 0x78, 0x0f, 0x00, 0x00, 0x00, 0x00 -}; - -const uint8_t kMaskRandom22_18[108] = { - 0x46, 0x48, 0xc8, 0x00, 0x00, 0x00, - 0x62, 0x6c, 0x4c, 0x00, 0x00, 0x00, - 0x8c, 0x11, 0x80, 0x00, 0x00, 0x00, - 0x01, 0x60, 0x2c, 0x00, 0x00, 0x00, - 0x07, 0x80, 0xf0, 0x00, 0x00, 0x00, - 0xa0, 0x94, 0x10, 0x00, 0x00, 0x00, - 0x18, 0xa3, 0x14, 0x00, 0x00, 0x00, - 0x91, 0x12, 0x20, 0x00, 0x00, 0x00, - 0x78, 0x0f, 0x00, 0x00, 0x00, 0x00, - 0x0c, 0x81, 0x90, 0x00, 0x00, 0x00, - 0x80, 0x70, 0x0c, 0x00, 0x00, 0x00, - 0xa0, 0x94, 0x10, 0x00, 0x00, 0x00, - 0x05, 0x40, 0xa8, 0x00, 0x00, 0x00, - 0x43, 0x08, 0x60, 0x00, 0x00, 0x00, - 0x1a, 0x03, 0x40, 0x00, 0x00, 0x00, - 0x60, 0x2c, 0x04, 0x00, 0x00, 0x00, - 0x14, 0x22, 0x84, 0x00, 0x00, 0x00, - 0xe4, 0xd4, 0x6c, 0x00, 0x00, 0x00 -}; - -const uint8_t kMaskRandom22_19[114] = { - 0x46, 0x48, 0xc8, 0x00, 0x00, 0x00, - 0x62, 0x6c, 0x4c, 0x00, 0x00, 0x00, - 0x8c, 0x11, 0x80, 0x00, 0x00, 0x00, - 0x01, 0x60, 0x2c, 0x00, 0x00, 0x00, - 0x07, 0x80, 0xf0, 0x00, 0x00, 0x00, - 0xa0, 0x94, 0x10, 0x00, 0x00, 0x00, - 0x18, 0xa3, 0x14, 0x00, 0x00, 0x00, - 0x91, 0x12, 0x20, 0x00, 0x00, 0x00, - 0x78, 0x0f, 0x00, 0x00, 0x00, 0x00, - 0x64, 0x4c, 0x88, 0x00, 0x00, 0x00, - 0x51, 0x4a, 0x28, 0x00, 0x00, 0x00, - 0xa9, 0x15, 0x20, 0x00, 0x00, 0x00, - 0x04, 0xc0, 0x98, 0x00, 0x00, 0x00, - 0xd0, 0x1a, 0x00, 0x00, 0x00, 0x00, - 0x82, 0x50, 0x48, 0x00, 0x00, 0x00, - 0x21, 0x24, 0x24, 0x00, 0x00, 0x00, - 0x0c, 0x21, 0x84, 0x00, 0x00, 0x00, - 0x4a, 0x09, 0x40, 0x00, 0x00, 0x00, - 0x12, 0xa2, 0x54, 0x00, 0x00, 0x00 -}; - -const uint8_t kMaskRandom22_2[12] = { - 0xec, 0xdd, 0x98, 0x00, 0x00, 0x00, - 0x9b, 0xb3, 0x74, 0x00, 0x00, 0x00 -}; - -const uint8_t kMaskRandom22_20[120] = { - 0x64, 0x4c, 0x88, 0x00, 0x00, 0x00, - 0x51, 0x4a, 0x28, 0x00, 0x00, 0x00, - 0xa9, 0x15, 0x20, 0x00, 0x00, 0x00, - 0x04, 0xc0, 0x98, 0x00, 0x00, 0x00, - 0xd0, 0x1a, 0x00, 0x00, 0x00, 0x00, - 0x82, 0x50, 0x48, 0x00, 0x00, 0x00, - 0x21, 0x24, 0x24, 0x00, 0x00, 0x00, - 0x0c, 0x21, 0x84, 0x00, 0x00, 0x00, - 0x4a, 0x09, 0x40, 0x00, 0x00, 0x00, - 0x12, 0xa2, 0x54, 0x00, 0x00, 0x00, - 0x46, 0x48, 0xc8, 0x00, 0x00, 0x00, - 0x62, 0x6c, 0x4c, 0x00, 0x00, 0x00, - 0x8c, 0x11, 0x80, 0x00, 0x00, 0x00, - 0x01, 0x60, 0x2c, 0x00, 0x00, 0x00, - 0x07, 0x80, 0xf0, 0x00, 0x00, 0x00, - 0xa0, 0x94, 0x10, 0x00, 0x00, 0x00, - 0x18, 0xa3, 0x14, 0x00, 0x00, 0x00, - 0x91, 0x12, 0x20, 0x00, 0x00, 0x00, - 0x78, 0x0f, 0x00, 0x00, 0x00, 0x00, - 0x3b, 0x48, 0xc4, 0x00, 0x00, 0x00 -}; - -const uint8_t kMaskRandom22_21[126] = { - 0x64, 0x4c, 0x88, 0x00, 0x00, 0x00, - 0x51, 0x4a, 0x28, 0x00, 0x00, 0x00, - 0xa9, 0x15, 0x20, 0x00, 0x00, 0x00, - 0x04, 0xc0, 0x98, 0x00, 0x00, 0x00, - 0xd0, 0x1a, 0x00, 0x00, 0x00, 0x00, - 0x82, 0x50, 0x48, 0x00, 0x00, 0x00, - 0x21, 0x24, 0x24, 0x00, 0x00, 0x00, - 0x0c, 0x21, 0x84, 0x00, 0x00, 0x00, - 0x4a, 0x09, 0x40, 0x00, 0x00, 0x00, - 0x12, 0xa2, 0x54, 0x00, 0x00, 0x00, - 0x46, 0x48, 0xc8, 0x00, 0x00, 0x00, - 0x33, 0x26, 0x64, 0x00, 0x00, 0x00, - 0x99, 0x13, 0x20, 0x00, 0x00, 0x00, - 0x05, 0x80, 0xb0, 0x00, 0x00, 0x00, - 0x80, 0xb0, 0x14, 0x00, 0x00, 0x00, - 0x84, 0x50, 0x88, 0x00, 0x00, 0x00, - 0x40, 0x68, 0x0c, 0x00, 0x00, 0x00, - 0x0a, 0x81, 0x50, 0x00, 0x00, 0x00, - 0x68, 0x0d, 0x00, 0x00, 0x00, 0x00, - 0x10, 0x22, 0x04, 0x00, 0x00, 0x00, - 0x30, 0x46, 0x08, 0x00, 0x00, 0x00 -}; - -const uint8_t kMaskRandom22_22[132] = { - 0x46, 0x48, 0xc8, 0x00, 0x00, 0x00, - 0x33, 0x26, 0x64, 0x00, 0x00, 0x00, - 0x99, 0x13, 0x20, 0x00, 0x00, 0x00, - 0x05, 0x80, 0xb0, 0x00, 0x00, 0x00, - 0x80, 0xb0, 0x14, 0x00, 0x00, 0x00, - 0x84, 0x50, 0x88, 0x00, 0x00, 0x00, - 0x40, 0x68, 0x0c, 0x00, 0x00, 0x00, - 0x0a, 0x81, 0x50, 0x00, 0x00, 0x00, - 0x68, 0x0d, 0x00, 0x00, 0x00, 0x00, - 0x10, 0x22, 0x04, 0x00, 0x00, 0x00, - 0x30, 0x46, 0x08, 0x00, 0x00, 0x00, - 0x64, 0x4c, 0x88, 0x00, 0x00, 0x00, - 0x51, 0x4a, 0x28, 0x00, 0x00, 0x00, - 0xa9, 0x15, 0x20, 0x00, 0x00, 0x00, - 0x04, 0xc0, 0x98, 0x00, 0x00, 0x00, - 0xd0, 0x1a, 0x00, 0x00, 0x00, 0x00, - 0x82, 0x50, 0x48, 0x00, 0x00, 0x00, - 0x21, 0x24, 0x24, 0x00, 0x00, 0x00, - 0x0c, 0x21, 0x84, 0x00, 0x00, 0x00, - 0x4a, 0x09, 0x40, 0x00, 0x00, 0x00, - 0x12, 0xa2, 0x54, 0x00, 0x00, 0x00, - 0x9e, 0xce, 0x88, 0x00, 0x00, 0x00 -}; - -const uint8_t kMaskRandom22_3[18] = { - 0xca, 0xd9, 0x58, 0x00, 0x00, 0x00, - 0xf1, 0x5e, 0x28, 0x00, 0x00, 0x00, - 0xb6, 0x35, 0xc4, 0x00, 0x00, 0x00 -}; - -const uint8_t kMaskRandom22_4[24] = { - 0xc4, 0xd8, 0x98, 0x00, 0x00, 0x00, - 0x31, 0x66, 0x2c, 0x00, 0x00, 0x00, - 0x4b, 0x29, 0x64, 0x00, 0x00, 0x00, - 0x2c, 0xa5, 0x94, 0x00, 0x00, 0x00 -}; - -const uint8_t kMaskRandom22_5[30] = { - 0xc6, 0xd8, 0xd8, 0x00, 0x00, 0x00, - 0x63, 0x6c, 0x6c, 0x00, 0x00, 0x00, - 0x1d, 0xa3, 0xb4, 0x00, 0x00, 0x00, - 0xad, 0x55, 0xa8, 0x00, 0x00, 0x00, - 0xb2, 0xb6, 0x54, 0x00, 0x00, 0x00 -}; - -const uint8_t kMaskRandom22_6[36] = { - 0x64, 0x4c, 0x88, 0x00, 0x00, 0x00, - 0x51, 0x4a, 0x28, 0x00, 0x00, 0x00, - 0xa8, 0x35, 0x04, 0x00, 0x00, 0x00, - 0xc4, 0xa0, 0x94, 0x00, 0x00, 0x00, - 0x03, 0x60, 0x6c, 0x00, 0x00, 0x00, - 0x90, 0xd2, 0x18, 0x00, 0x00, 0x00 -}; - -const uint8_t kMaskRandom22_7[42] = { - 0xc6, 0x48, 0xc8, 0x00, 0x00, 0x00, - 0x13, 0x26, 0x64, 0x00, 0x00, 0x00, - 0x8d, 0x13, 0xa0, 0x00, 0x00, 0x00, - 0x8b, 0x41, 0x68, 0x00, 0x00, 0x00, - 0x52, 0xaa, 0x14, 0x00, 0x00, 0x00, - 0xa2, 0xd4, 0x18, 0x00, 0x00, 0x00, - 0x61, 0xa8, 0x2c, 0x00, 0x00, 0x00 -}; - -const uint8_t kMaskRandom22_8[48] = { - 0x28, 0x85, 0x38, 0x00, 0x00, 0x00, - 0x21, 0xf4, 0x04, 0x00, 0x00, 0x00, - 0xe9, 0x1d, 0x00, 0x00, 0x00, 0x00, - 0x17, 0x02, 0xe0, 0x00, 0x00, 0x00, - 0x83, 0xa0, 0x54, 0x00, 0x00, 0x00, - 0x46, 0x18, 0xe8, 0x00, 0x00, 0x00, - 0x50, 0x6a, 0x0c, 0x00, 0x00, 0x00, - 0x1c, 0x23, 0x84, 0x00, 0x00, 0x00 -}; - -const uint8_t kMaskRandom22_9[54] = { - 0x44, 0x48, 0xc8, 0x00, 0x00, 0x00, - 0x28, 0x2d, 0x0c, 0x00, 0x00, 0x00, - 0x25, 0x14, 0xa0, 0x00, 0x00, 0x00, - 0x59, 0x0a, 0x20, 0x00, 0x00, 0x00, - 0x03, 0xa0, 0x34, 0x00, 0x00, 0x00, - 0xc0, 0xd0, 0x18, 0x00, 0x00, 0x00, - 0xa2, 0x30, 0x44, 0x00, 0x00, 0x00, - 0x14, 0x82, 0xd0, 0x00, 0x00, 0x00, - 0x9a, 0x03, 0x80, 0x00, 0x00, 0x00 -}; - -const uint8_t kMaskRandom23_1[6] = { - 0xff, 0xff, 0xfe, 0x00, 0x00, 0x00 -}; - -const uint8_t kMaskRandom23_10[60] = { - 0x64, 0x4a, 0x28, 0x00, 0x00, 0x00, - 0x51, 0x48, 0xa2, 0x00, 0x00, 0x00, - 0xa9, 0x10, 0x1a, 0x00, 0x00, 0x00, - 0x04, 0xc4, 0x84, 0x00, 0x00, 0x00, - 0xd0, 0x01, 0x44, 0x00, 0x00, 0x00, - 0x82, 0x40, 0x1c, 0x00, 0x00, 0x00, - 0x21, 0x37, 0x00, 0x00, 0x00, 0x00, - 0x0c, 0x21, 0x22, 0x00, 0x00, 0x00, - 0x4a, 0x0a, 0xc0, 0x00, 0x00, 0x00, - 0x12, 0xb4, 0x50, 0x00, 0x00, 0x00 -}; - -const uint8_t kMaskRandom23_11[66] = { - 0x46, 0x4a, 0x6c, 0x00, 0x00, 0x00, - 0x33, 0x24, 0x26, 0x00, 0x00, 0x00, - 0x99, 0x02, 0x12, 0x00, 0x00, 0x00, - 0x05, 0x80, 0x0e, 0x00, 0x00, 0x00, - 0x80, 0xa1, 0x82, 0x00, 0x00, 0x00, - 0x84, 0x48, 0x18, 0x00, 0x00, 0x00, - 0x40, 0x6d, 0x40, 0x00, 0x00, 0x00, - 0x0a, 0x90, 0xc0, 0x00, 0x00, 0x00, - 0x68, 0x04, 0x90, 0x00, 0x00, 0x00, - 0x10, 0x31, 0x20, 0x00, 0x00, 0x00, - 0x30, 0x58, 0x04, 0x00, 0x00, 0x00 -}; - -const uint8_t kMaskRandom23_12[72] = { - 0x64, 0x4a, 0x28, 0x00, 0x00, 0x00, - 0x51, 0x58, 0xa2, 0x00, 0x00, 0x00, - 0x0c, 0xa4, 0x30, 0x00, 0x00, 0x00, - 0xa1, 0x22, 0x46, 0x00, 0x00, 0x00, - 0x12, 0xa1, 0x1c, 0x00, 0x00, 0x00, - 0x8a, 0x45, 0xc0, 0x00, 0x00, 0x00, - 0x86, 0x8a, 0x6c, 0x00, 0x00, 0x00, - 0x23, 0x2c, 0x84, 0x00, 0x00, 0x00, - 0x16, 0x21, 0x98, 0x00, 0x00, 0x00, - 0x4c, 0x30, 0x54, 0x00, 0x00, 0x00, - 0x41, 0xc1, 0x26, 0x00, 0x00, 0x00, - 0x19, 0x56, 0xe4, 0x00, 0x00, 0x00 -}; - -const uint8_t kMaskRandom23_13[78] = { - 0x64, 0x4a, 0x28, 0x00, 0x00, 0x00, - 0x51, 0x58, 0xa2, 0x00, 0x00, 0x00, - 0x0c, 0xa4, 0x30, 0x00, 0x00, 0x00, - 0xa1, 0x22, 0x46, 0x00, 0x00, 0x00, - 0x12, 0xa1, 0x1c, 0x00, 0x00, 0x00, - 0x8a, 0x45, 0xc0, 0x00, 0x00, 0x00, - 0x46, 0x4a, 0x6c, 0x00, 0x00, 0x00, - 0x33, 0x24, 0x26, 0x00, 0x00, 0x00, - 0x91, 0x92, 0x12, 0x00, 0x00, 0x00, - 0xa4, 0x20, 0x4a, 0x00, 0x00, 0x00, - 0x50, 0xa0, 0xd4, 0x00, 0x00, 0x00, - 0x84, 0xc5, 0x80, 0x00, 0x00, 0x00, - 0x09, 0x71, 0x0c, 0x00, 0x00, 0x00 -}; - -const uint8_t kMaskRandom23_14[84] = { - 0x46, 0x4a, 0x6c, 0x00, 0x00, 0x00, - 0x33, 0x24, 0x26, 0x00, 0x00, 0x00, - 0x91, 0x92, 0x12, 0x00, 0x00, 0x00, - 0xa4, 0x20, 0x4a, 0x00, 0x00, 0x00, - 0x50, 0xa0, 0xd4, 0x00, 0x00, 0x00, - 0x84, 0xc5, 0x80, 0x00, 0x00, 0x00, - 0x09, 0x71, 0x0c, 0x00, 0x00, 0x00, - 0x64, 0x4a, 0x28, 0x00, 0x00, 0x00, - 0x51, 0x58, 0xa2, 0x00, 0x00, 0x00, - 0x0c, 0xa4, 0x30, 0x00, 0x00, 0x00, - 0xa1, 0x22, 0x46, 0x00, 0x00, 0x00, - 0x12, 0xa1, 0x1c, 0x00, 0x00, 0x00, - 0x8a, 0x45, 0xc0, 0x00, 0x00, 0x00, - 0x9c, 0x3f, 0xb2, 0x00, 0x00, 0x00 -}; - -const uint8_t kMaskRandom23_15[90] = { - 0x46, 0x4a, 0x6c, 0x00, 0x00, 0x00, - 0x33, 0x24, 0x26, 0x00, 0x00, 0x00, - 0x91, 0x92, 0x12, 0x00, 0x00, 0x00, - 0xa4, 0x20, 0x4a, 0x00, 0x00, 0x00, - 0x50, 0xa0, 0xd4, 0x00, 0x00, 0x00, - 0x84, 0xc5, 0x80, 0x00, 0x00, 0x00, - 0x09, 0x71, 0x0c, 0x00, 0x00, 0x00, - 0x0c, 0x84, 0x0c, 0x00, 0x00, 0x00, - 0x80, 0x70, 0x06, 0x00, 0x00, 0x00, - 0xa0, 0x88, 0x48, 0x00, 0x00, 0x00, - 0x05, 0x40, 0x32, 0x00, 0x00, 0x00, - 0x43, 0x02, 0x82, 0x00, 0x00, 0x00, - 0x1a, 0x01, 0x50, 0x00, 0x00, 0x00, - 0x60, 0x27, 0x00, 0x00, 0x00, 0x00, - 0x14, 0x38, 0xa0, 0x00, 0x00, 0x00 -}; - -const uint8_t kMaskRandom23_16[96] = { - 0x0c, 0x84, 0x0c, 0x00, 0x00, 0x00, - 0x80, 0x70, 0x06, 0x00, 0x00, 0x00, - 0xa0, 0x88, 0x48, 0x00, 0x00, 0x00, - 0x05, 0x40, 0x32, 0x00, 0x00, 0x00, - 0x43, 0x02, 0x82, 0x00, 0x00, 0x00, - 0x1a, 0x01, 0x50, 0x00, 0x00, 0x00, - 0x60, 0x27, 0x00, 0x00, 0x00, 0x00, - 0x14, 0x38, 0xa0, 0x00, 0x00, 0x00, - 0x46, 0x4a, 0x6c, 0x00, 0x00, 0x00, - 0x33, 0x24, 0x26, 0x00, 0x00, 0x00, - 0x91, 0x92, 0x12, 0x00, 0x00, 0x00, - 0xa4, 0x20, 0x4a, 0x00, 0x00, 0x00, - 0x50, 0xa0, 0xd4, 0x00, 0x00, 0x00, - 0x84, 0xc5, 0x80, 0x00, 0x00, 0x00, - 0x09, 0x71, 0x0c, 0x00, 0x00, 0x00, - 0xfa, 0xd9, 0xf4, 0x00, 0x00, 0x00 -}; - -const uint8_t kMaskRandom23_17[102] = { - 0x0c, 0x84, 0x0c, 0x00, 0x00, 0x00, - 0x80, 0x70, 0x06, 0x00, 0x00, 0x00, - 0xa0, 0x88, 0x48, 0x00, 0x00, 0x00, - 0x05, 0x40, 0x32, 0x00, 0x00, 0x00, - 0x43, 0x02, 0x82, 0x00, 0x00, 0x00, - 0x1a, 0x01, 0x50, 0x00, 0x00, 0x00, - 0x60, 0x27, 0x00, 0x00, 0x00, 0x00, - 0x14, 0x38, 0xa0, 0x00, 0x00, 0x00, - 0x46, 0x4a, 0x6c, 0x00, 0x00, 0x00, - 0x62, 0x7c, 0x84, 0x00, 0x00, 0x00, - 0x8c, 0x04, 0x88, 0x00, 0x00, 0x00, - 0x01, 0x74, 0x22, 0x00, 0x00, 0x00, - 0x07, 0x83, 0x06, 0x00, 0x00, 0x00, - 0xa0, 0x80, 0x72, 0x00, 0x00, 0x00, - 0x18, 0xb1, 0x42, 0x00, 0x00, 0x00, - 0x91, 0x00, 0x92, 0x00, 0x00, 0x00, - 0x78, 0x00, 0x1c, 0x00, 0x00, 0x00 -}; - -const uint8_t kMaskRandom23_18[108] = { - 0x46, 0x4a, 0x6c, 0x00, 0x00, 0x00, - 0x62, 0x7c, 0x84, 0x00, 0x00, 0x00, - 0x8c, 0x04, 0x88, 0x00, 0x00, 0x00, - 0x01, 0x74, 0x22, 0x00, 0x00, 0x00, - 0x07, 0x83, 0x06, 0x00, 0x00, 0x00, - 0xa0, 0x80, 0x72, 0x00, 0x00, 0x00, - 0x18, 0xb1, 0x42, 0x00, 0x00, 0x00, - 0x91, 0x00, 0x92, 0x00, 0x00, 0x00, - 0x78, 0x00, 0x1c, 0x00, 0x00, 0x00, - 0x0c, 0x84, 0x0c, 0x00, 0x00, 0x00, - 0x80, 0x70, 0x06, 0x00, 0x00, 0x00, - 0xa0, 0x88, 0x48, 0x00, 0x00, 0x00, - 0x05, 0x40, 0x32, 0x00, 0x00, 0x00, - 0x43, 0x02, 0x82, 0x00, 0x00, 0x00, - 0x1a, 0x01, 0x50, 0x00, 0x00, 0x00, - 0x60, 0x27, 0x00, 0x00, 0x00, 0x00, - 0x14, 0x38, 0xa0, 0x00, 0x00, 0x00, - 0x82, 0x32, 0x56, 0x00, 0x00, 0x00 -}; - -const uint8_t kMaskRandom23_19[114] = { - 0x46, 0x4a, 0x6c, 0x00, 0x00, 0x00, - 0x62, 0x7c, 0x84, 0x00, 0x00, 0x00, - 0x8c, 0x04, 0x88, 0x00, 0x00, 0x00, - 0x01, 0x74, 0x22, 0x00, 0x00, 0x00, - 0x07, 0x83, 0x06, 0x00, 0x00, 0x00, - 0xa0, 0x80, 0x72, 0x00, 0x00, 0x00, - 0x18, 0xb1, 0x42, 0x00, 0x00, 0x00, - 0x91, 0x00, 0x92, 0x00, 0x00, 0x00, - 0x78, 0x00, 0x1c, 0x00, 0x00, 0x00, - 0x64, 0x4a, 0x28, 0x00, 0x00, 0x00, - 0x51, 0x48, 0xa2, 0x00, 0x00, 0x00, - 0xa9, 0x10, 0x1a, 0x00, 0x00, 0x00, - 0x04, 0xc4, 0x84, 0x00, 0x00, 0x00, - 0xd0, 0x01, 0x44, 0x00, 0x00, 0x00, - 0x82, 0x40, 0x1c, 0x00, 0x00, 0x00, - 0x21, 0x37, 0x00, 0x00, 0x00, 0x00, - 0x0c, 0x21, 0x22, 0x00, 0x00, 0x00, - 0x4a, 0x0a, 0xc0, 0x00, 0x00, 0x00, - 0x12, 0xb4, 0x50, 0x00, 0x00, 0x00 -}; - -const uint8_t kMaskRandom23_2[12] = { - 0xec, 0xdd, 0x98, 0x00, 0x00, 0x00, - 0x9b, 0xb2, 0x76, 0x00, 0x00, 0x00 -}; - -const uint8_t kMaskRandom23_20[120] = { - 0x64, 0x4a, 0x28, 0x00, 0x00, 0x00, - 0x51, 0x48, 0xa2, 0x00, 0x00, 0x00, - 0xa9, 0x10, 0x1a, 0x00, 0x00, 0x00, - 0x04, 0xc4, 0x84, 0x00, 0x00, 0x00, - 0xd0, 0x01, 0x44, 0x00, 0x00, 0x00, - 0x82, 0x40, 0x1c, 0x00, 0x00, 0x00, - 0x21, 0x37, 0x00, 0x00, 0x00, 0x00, - 0x0c, 0x21, 0x22, 0x00, 0x00, 0x00, - 0x4a, 0x0a, 0xc0, 0x00, 0x00, 0x00, - 0x12, 0xb4, 0x50, 0x00, 0x00, 0x00, - 0x46, 0x4a, 0x6c, 0x00, 0x00, 0x00, - 0x62, 0x7c, 0x84, 0x00, 0x00, 0x00, - 0x8c, 0x04, 0x88, 0x00, 0x00, 0x00, - 0x01, 0x74, 0x22, 0x00, 0x00, 0x00, - 0x07, 0x83, 0x06, 0x00, 0x00, 0x00, - 0xa0, 0x80, 0x72, 0x00, 0x00, 0x00, - 0x18, 0xb1, 0x42, 0x00, 0x00, 0x00, - 0x91, 0x00, 0x92, 0x00, 0x00, 0x00, - 0x78, 0x00, 0x1c, 0x00, 0x00, 0x00, - 0xdb, 0x4a, 0x7a, 0x00, 0x00, 0x00 -}; - -const uint8_t kMaskRandom23_21[126] = { - 0x64, 0x4a, 0x28, 0x00, 0x00, 0x00, - 0x51, 0x48, 0xa2, 0x00, 0x00, 0x00, - 0xa9, 0x10, 0x1a, 0x00, 0x00, 0x00, - 0x04, 0xc4, 0x84, 0x00, 0x00, 0x00, - 0xd0, 0x01, 0x44, 0x00, 0x00, 0x00, - 0x82, 0x40, 0x1c, 0x00, 0x00, 0x00, - 0x21, 0x37, 0x00, 0x00, 0x00, 0x00, - 0x0c, 0x21, 0x22, 0x00, 0x00, 0x00, - 0x4a, 0x0a, 0xc0, 0x00, 0x00, 0x00, - 0x12, 0xb4, 0x50, 0x00, 0x00, 0x00, - 0x46, 0x4a, 0x6c, 0x00, 0x00, 0x00, - 0x33, 0x24, 0x26, 0x00, 0x00, 0x00, - 0x99, 0x02, 0x12, 0x00, 0x00, 0x00, - 0x05, 0x80, 0x0e, 0x00, 0x00, 0x00, - 0x80, 0xa1, 0x82, 0x00, 0x00, 0x00, - 0x84, 0x48, 0x18, 0x00, 0x00, 0x00, - 0x40, 0x6d, 0x40, 0x00, 0x00, 0x00, - 0x0a, 0x90, 0xc0, 0x00, 0x00, 0x00, - 0x68, 0x04, 0x90, 0x00, 0x00, 0x00, - 0x10, 0x31, 0x20, 0x00, 0x00, 0x00, - 0x30, 0x58, 0x04, 0x00, 0x00, 0x00 -}; - -const uint8_t kMaskRandom23_22[132] = { - 0x46, 0x4a, 0x6c, 0x00, 0x00, 0x00, - 0x33, 0x24, 0x26, 0x00, 0x00, 0x00, - 0x99, 0x02, 0x12, 0x00, 0x00, 0x00, - 0x05, 0x80, 0x0e, 0x00, 0x00, 0x00, - 0x80, 0xa1, 0x82, 0x00, 0x00, 0x00, - 0x84, 0x48, 0x18, 0x00, 0x00, 0x00, - 0x40, 0x6d, 0x40, 0x00, 0x00, 0x00, - 0x0a, 0x90, 0xc0, 0x00, 0x00, 0x00, - 0x68, 0x04, 0x90, 0x00, 0x00, 0x00, - 0x10, 0x31, 0x20, 0x00, 0x00, 0x00, - 0x30, 0x58, 0x04, 0x00, 0x00, 0x00, - 0x64, 0x4a, 0x28, 0x00, 0x00, 0x00, - 0x51, 0x48, 0xa2, 0x00, 0x00, 0x00, - 0xa9, 0x10, 0x1a, 0x00, 0x00, 0x00, - 0x04, 0xc4, 0x84, 0x00, 0x00, 0x00, - 0xd0, 0x01, 0x44, 0x00, 0x00, 0x00, - 0x82, 0x40, 0x1c, 0x00, 0x00, 0x00, - 0x21, 0x37, 0x00, 0x00, 0x00, 0x00, - 0x0c, 0x21, 0x22, 0x00, 0x00, 0x00, - 0x4a, 0x0a, 0xc0, 0x00, 0x00, 0x00, - 0x12, 0xb4, 0x50, 0x00, 0x00, 0x00, - 0xea, 0x8d, 0x1a, 0x00, 0x00, 0x00 -}; - -const uint8_t kMaskRandom23_23[138] = { - 0x46, 0x4a, 0x6c, 0x00, 0x00, 0x00, - 0x33, 0x24, 0x26, 0x00, 0x00, 0x00, - 0x99, 0x02, 0x12, 0x00, 0x00, 0x00, - 0x05, 0x80, 0x0e, 0x00, 0x00, 0x00, - 0x80, 0xa1, 0x82, 0x00, 0x00, 0x00, - 0x84, 0x48, 0x18, 0x00, 0x00, 0x00, - 0x40, 0x6d, 0x40, 0x00, 0x00, 0x00, - 0x0a, 0x90, 0xc0, 0x00, 0x00, 0x00, - 0x68, 0x04, 0x90, 0x00, 0x00, 0x00, - 0x10, 0x31, 0x20, 0x00, 0x00, 0x00, - 0x30, 0x58, 0x04, 0x00, 0x00, 0x00, - 0x46, 0x42, 0x0c, 0x00, 0x00, 0x00, - 0x33, 0x20, 0x46, 0x00, 0x00, 0x00, - 0x99, 0x08, 0x0a, 0x00, 0x00, 0x00, - 0x05, 0x84, 0x30, 0x00, 0x00, 0x00, - 0x80, 0xb0, 0x22, 0x00, 0x00, 0x00, - 0x84, 0x42, 0x90, 0x00, 0x00, 0x00, - 0x40, 0x73, 0x00, 0x00, 0x00, 0x00, - 0x0a, 0x81, 0x12, 0x00, 0x00, 0x00, - 0x68, 0x0c, 0x40, 0x00, 0x00, 0x00, - 0x10, 0x24, 0x84, 0x00, 0x00, 0x00, - 0x30, 0x51, 0x40, 0x00, 0x00, 0x00, - 0x5f, 0x50, 0x88, 0x00, 0x00, 0x00 -}; - -const uint8_t kMaskRandom23_3[18] = { - 0xca, 0xd3, 0x64, 0x00, 0x00, 0x00, - 0xf1, 0x49, 0x3a, 0x00, 0x00, 0x00, - 0x76, 0x27, 0xd0, 0x00, 0x00, 0x00 -}; - -const uint8_t kMaskRandom23_4[24] = { - 0xc4, 0xd1, 0x64, 0x00, 0x00, 0x00, - 0x31, 0x62, 0x96, 0x00, 0x00, 0x00, - 0x4b, 0x24, 0x5a, 0x00, 0x00, 0x00, - 0x2c, 0xa8, 0xaa, 0x00, 0x00, 0x00 -}; - -const uint8_t kMaskRandom23_5[30] = { - 0xc6, 0xca, 0x6c, 0x00, 0x00, 0x00, - 0x63, 0x6c, 0x96, 0x00, 0x00, 0x00, - 0x1d, 0xa1, 0xdc, 0x00, 0x00, 0x00, - 0xad, 0x55, 0x38, 0x00, 0x00, 0x00, - 0xb2, 0xb7, 0x06, 0x00, 0x00, 0x00 -}; - -const uint8_t kMaskRandom23_6[36] = { - 0x64, 0x4a, 0x28, 0x00, 0x00, 0x00, - 0x51, 0x58, 0xa2, 0x00, 0x00, 0x00, - 0x0c, 0xa4, 0x30, 0x00, 0x00, 0x00, - 0xa1, 0x22, 0x46, 0x00, 0x00, 0x00, - 0x12, 0xa1, 0x1c, 0x00, 0x00, 0x00, - 0x8a, 0x45, 0xc0, 0x00, 0x00, 0x00 -}; - -const uint8_t kMaskRandom23_7[42] = { - 0x46, 0x4a, 0x6c, 0x00, 0x00, 0x00, - 0x33, 0x24, 0x26, 0x00, 0x00, 0x00, - 0x91, 0x92, 0x12, 0x00, 0x00, 0x00, - 0xa4, 0x20, 0x4a, 0x00, 0x00, 0x00, - 0x50, 0xa0, 0xd4, 0x00, 0x00, 0x00, - 0x84, 0xc5, 0x80, 0x00, 0x00, 0x00, - 0x09, 0x71, 0x0c, 0x00, 0x00, 0x00 -}; - -const uint8_t kMaskRandom23_8[48] = { - 0x0c, 0x84, 0x0c, 0x00, 0x00, 0x00, - 0x80, 0x70, 0x06, 0x00, 0x00, 0x00, - 0xa0, 0x88, 0x48, 0x00, 0x00, 0x00, - 0x05, 0x40, 0x32, 0x00, 0x00, 0x00, - 0x43, 0x02, 0x82, 0x00, 0x00, 0x00, - 0x1a, 0x01, 0x50, 0x00, 0x00, 0x00, - 0x60, 0x27, 0x00, 0x00, 0x00, 0x00, - 0x14, 0x38, 0xa0, 0x00, 0x00, 0x00 -}; - -const uint8_t kMaskRandom23_9[54] = { - 0x46, 0x4a, 0x6c, 0x00, 0x00, 0x00, - 0x62, 0x7c, 0x84, 0x00, 0x00, 0x00, - 0x8c, 0x04, 0x88, 0x00, 0x00, 0x00, - 0x01, 0x74, 0x22, 0x00, 0x00, 0x00, - 0x07, 0x83, 0x06, 0x00, 0x00, 0x00, - 0xa0, 0x80, 0x72, 0x00, 0x00, 0x00, - 0x18, 0xb1, 0x42, 0x00, 0x00, 0x00, - 0x91, 0x00, 0x92, 0x00, 0x00, 0x00, - 0x78, 0x00, 0x1c, 0x00, 0x00, 0x00 -}; - -const uint8_t kMaskRandom24_1[6] = { - 0xff, 0xff, 0xff, 0x00, 0x00, 0x00 -}; - -const uint8_t kMaskRandom24_10[60] = { - 0x11, 0x45, 0x14, 0x00, 0x00, 0x00, - 0x45, 0x34, 0x53, 0x00, 0x00, 0x00, - 0x00, 0x48, 0x05, 0x00, 0x00, 0x00, - 0x10, 0x83, 0x09, 0x00, 0x00, 0x00, - 0x4a, 0x14, 0xa1, 0x00, 0x00, 0x00, - 0x40, 0xa4, 0x0a, 0x00, 0x00, 0x00, - 0xa0, 0x6a, 0x02, 0x00, 0x00, 0x00, - 0x88, 0x80, 0x8c, 0x00, 0x00, 0x00, - 0x86, 0x08, 0x60, 0x00, 0x00, 0x00, - 0x54, 0x0d, 0x40, 0x00, 0x00, 0x00 -}; - -const uint8_t kMaskRandom24_11[66] = { - 0x53, 0x65, 0x34, 0x00, 0x00, 0x00, - 0xa0, 0x32, 0x11, 0x00, 0x00, 0x00, - 0x15, 0x11, 0x41, 0x00, 0x00, 0x00, - 0x03, 0x50, 0x15, 0x00, 0x00, 0x00, - 0x8c, 0x88, 0xc8, 0x00, 0x00, 0x00, - 0x28, 0x82, 0x88, 0x00, 0x00, 0x00, - 0x08, 0x48, 0x84, 0x00, 0x00, 0x00, - 0x99, 0x01, 0x90, 0x00, 0x00, 0x00, - 0x22, 0x92, 0x29, 0x00, 0x00, 0x00, - 0x46, 0x04, 0x60, 0x00, 0x00, 0x00, - 0x8c, 0x2c, 0x02, 0x00, 0x00, 0x00 -}; - -const uint8_t kMaskRandom24_12[72] = { - 0x10, 0x61, 0x06, 0x00, 0x00, 0x00, - 0x02, 0x30, 0x23, 0x00, 0x00, 0x00, - 0x40, 0x54, 0x05, 0x00, 0x00, 0x00, - 0x21, 0x82, 0x18, 0x00, 0x00, 0x00, - 0x81, 0x18, 0x11, 0x00, 0x00, 0x00, - 0x14, 0x81, 0x48, 0x00, 0x00, 0x00, - 0x98, 0x09, 0x80, 0x00, 0x00, 0x00, - 0x08, 0x90, 0x89, 0x00, 0x00, 0x00, - 0x62, 0x06, 0x20, 0x00, 0x00, 0x00, - 0x24, 0x22, 0x42, 0x00, 0x00, 0x00, - 0x8a, 0x08, 0xa0, 0x00, 0x00, 0x00, - 0x84, 0x48, 0x44, 0x00, 0x00, 0x00 -}; - -const uint8_t kMaskRandom24_13[78] = { - 0x51, 0x45, 0x14, 0x00, 0x00, 0x00, - 0xc5, 0x1c, 0x51, 0x00, 0x00, 0x00, - 0x21, 0x82, 0x18, 0x00, 0x00, 0x00, - 0x12, 0x31, 0x23, 0x00, 0x00, 0x00, - 0x08, 0xe0, 0x8e, 0x00, 0x00, 0x00, - 0x2e, 0x02, 0xe0, 0x00, 0x00, 0x00, - 0x53, 0x65, 0x36, 0x00, 0x00, 0x00, - 0x21, 0x32, 0x13, 0x00, 0x00, 0x00, - 0x90, 0x99, 0x09, 0x00, 0x00, 0x00, - 0x02, 0x50, 0x25, 0x00, 0x00, 0x00, - 0x06, 0xa0, 0x6a, 0x00, 0x00, 0x00, - 0x2c, 0x02, 0xc0, 0x00, 0x00, 0x00, - 0x88, 0x68, 0x86, 0x00, 0x00, 0x00 -}; - -const uint8_t kMaskRandom24_14[84] = { - 0x53, 0x65, 0x36, 0x00, 0x00, 0x00, - 0x21, 0x32, 0x13, 0x00, 0x00, 0x00, - 0x90, 0x99, 0x09, 0x00, 0x00, 0x00, - 0x02, 0x50, 0x25, 0x00, 0x00, 0x00, - 0x06, 0xa0, 0x6a, 0x00, 0x00, 0x00, - 0x2c, 0x02, 0xc0, 0x00, 0x00, 0x00, - 0x88, 0x68, 0x86, 0x00, 0x00, 0x00, - 0x51, 0x45, 0x14, 0x00, 0x00, 0x00, - 0xc5, 0x1c, 0x51, 0x00, 0x00, 0x00, - 0x21, 0x82, 0x18, 0x00, 0x00, 0x00, - 0x12, 0x31, 0x23, 0x00, 0x00, 0x00, - 0x08, 0xe0, 0x8e, 0x00, 0x00, 0x00, - 0x2e, 0x02, 0xe0, 0x00, 0x00, 0x00, - 0xf2, 0xd6, 0x8e, 0x00, 0x00, 0x00 -}; - -const uint8_t kMaskRandom24_15[90] = { - 0x53, 0x65, 0x36, 0x00, 0x00, 0x00, - 0x21, 0x32, 0x13, 0x00, 0x00, 0x00, - 0x90, 0x99, 0x09, 0x00, 0x00, 0x00, - 0x02, 0x50, 0x25, 0x00, 0x00, 0x00, - 0x06, 0xa0, 0x6a, 0x00, 0x00, 0x00, - 0x2c, 0x02, 0xc0, 0x00, 0x00, 0x00, - 0x88, 0x68, 0x86, 0x00, 0x00, 0x00, - 0x20, 0x62, 0x06, 0x00, 0x00, 0x00, - 0x80, 0x38, 0x03, 0x00, 0x00, 0x00, - 0x42, 0x44, 0x24, 0x00, 0x00, 0x00, - 0x01, 0x90, 0x19, 0x00, 0x00, 0x00, - 0x14, 0x11, 0x41, 0x00, 0x00, 0x00, - 0x0a, 0x80, 0xa8, 0x00, 0x00, 0x00, - 0x38, 0x03, 0x80, 0x00, 0x00, 0x00, - 0xc5, 0x0c, 0x50, 0x00, 0x00, 0x00 -}; - -const uint8_t kMaskRandom24_16[96] = { - 0x20, 0x62, 0x06, 0x00, 0x00, 0x00, - 0x80, 0x38, 0x03, 0x00, 0x00, 0x00, - 0x42, 0x44, 0x24, 0x00, 0x00, 0x00, - 0x01, 0x90, 0x19, 0x00, 0x00, 0x00, - 0x14, 0x11, 0x41, 0x00, 0x00, 0x00, - 0x0a, 0x80, 0xa8, 0x00, 0x00, 0x00, - 0x38, 0x03, 0x80, 0x00, 0x00, 0x00, - 0xc5, 0x0c, 0x50, 0x00, 0x00, 0x00, - 0x53, 0x65, 0x36, 0x00, 0x00, 0x00, - 0x21, 0x32, 0x13, 0x00, 0x00, 0x00, - 0x90, 0x99, 0x09, 0x00, 0x00, 0x00, - 0x02, 0x50, 0x25, 0x00, 0x00, 0x00, - 0x06, 0xa0, 0x6a, 0x00, 0x00, 0x00, - 0x2c, 0x02, 0xc0, 0x00, 0x00, 0x00, - 0x88, 0x68, 0x86, 0x00, 0x00, 0x00, - 0xff, 0x6e, 0x0a, 0x00, 0x00, 0x00 -}; - -const uint8_t kMaskRandom24_17[102] = { - 0x20, 0x62, 0x06, 0x00, 0x00, 0x00, - 0x80, 0x38, 0x03, 0x00, 0x00, 0x00, - 0x42, 0x44, 0x24, 0x00, 0x00, 0x00, - 0x01, 0x90, 0x19, 0x00, 0x00, 0x00, - 0x14, 0x11, 0x41, 0x00, 0x00, 0x00, - 0x0a, 0x80, 0xa8, 0x00, 0x00, 0x00, - 0x38, 0x03, 0x80, 0x00, 0x00, 0x00, - 0xc5, 0x0c, 0x50, 0x00, 0x00, 0x00, - 0x53, 0x65, 0x36, 0x00, 0x00, 0x00, - 0xe4, 0x2e, 0x42, 0x00, 0x00, 0x00, - 0x24, 0x42, 0x44, 0x00, 0x00, 0x00, - 0xa1, 0x1a, 0x11, 0x00, 0x00, 0x00, - 0x18, 0x31, 0x83, 0x00, 0x00, 0x00, - 0x03, 0x90, 0x39, 0x00, 0x00, 0x00, - 0x8a, 0x18, 0xa1, 0x00, 0x00, 0x00, - 0x04, 0x90, 0x49, 0x00, 0x00, 0x00, - 0x00, 0xe0, 0x0e, 0x00, 0x00, 0x00 -}; - -const uint8_t kMaskRandom24_18[108] = { - 0x53, 0x65, 0x36, 0x00, 0x00, 0x00, - 0xe4, 0x2e, 0x42, 0x00, 0x00, 0x00, - 0x24, 0x42, 0x44, 0x00, 0x00, 0x00, - 0xa1, 0x1a, 0x11, 0x00, 0x00, 0x00, - 0x18, 0x31, 0x83, 0x00, 0x00, 0x00, - 0x03, 0x90, 0x39, 0x00, 0x00, 0x00, - 0x8a, 0x18, 0xa1, 0x00, 0x00, 0x00, - 0x04, 0x90, 0x49, 0x00, 0x00, 0x00, - 0x00, 0xe0, 0x0e, 0x00, 0x00, 0x00, - 0x20, 0x62, 0x06, 0x00, 0x00, 0x00, - 0x80, 0x38, 0x03, 0x00, 0x00, 0x00, - 0x42, 0x44, 0x24, 0x00, 0x00, 0x00, - 0x01, 0x90, 0x19, 0x00, 0x00, 0x00, - 0x14, 0x11, 0x41, 0x00, 0x00, 0x00, - 0x0a, 0x80, 0xa8, 0x00, 0x00, 0x00, - 0x38, 0x03, 0x80, 0x00, 0x00, 0x00, - 0xc5, 0x0c, 0x50, 0x00, 0x00, 0x00, - 0x34, 0x50, 0xae, 0x00, 0x00, 0x00 -}; - -const uint8_t kMaskRandom24_19[114] = { - 0x53, 0x65, 0x36, 0x00, 0x00, 0x00, - 0xe4, 0x2e, 0x42, 0x00, 0x00, 0x00, - 0x24, 0x42, 0x44, 0x00, 0x00, 0x00, - 0xa1, 0x1a, 0x11, 0x00, 0x00, 0x00, - 0x18, 0x31, 0x83, 0x00, 0x00, 0x00, - 0x03, 0x90, 0x39, 0x00, 0x00, 0x00, - 0x8a, 0x18, 0xa1, 0x00, 0x00, 0x00, - 0x04, 0x90, 0x49, 0x00, 0x00, 0x00, - 0x00, 0xe0, 0x0e, 0x00, 0x00, 0x00, - 0x51, 0x45, 0x14, 0x00, 0x00, 0x00, - 0x45, 0x14, 0x51, 0x00, 0x00, 0x00, - 0x80, 0xd8, 0x0d, 0x00, 0x00, 0x00, - 0x24, 0x22, 0x42, 0x00, 0x00, 0x00, - 0x0a, 0x20, 0xa2, 0x00, 0x00, 0x00, - 0x00, 0xe0, 0x0e, 0x00, 0x00, 0x00, - 0xb8, 0x0b, 0x80, 0x00, 0x00, 0x00, - 0x09, 0x10, 0x91, 0x00, 0x00, 0x00, - 0x56, 0x05, 0x60, 0x00, 0x00, 0x00, - 0xa2, 0x8a, 0x28, 0x00, 0x00, 0x00 -}; - -const uint8_t kMaskRandom24_2[12] = { - 0xec, 0xce, 0xcc, 0x00, 0x00, 0x00, - 0x93, 0xb9, 0x3b, 0x00, 0x00, 0x00 -}; - -const uint8_t kMaskRandom24_20[120] = { - 0x51, 0x45, 0x14, 0x00, 0x00, 0x00, - 0x45, 0x14, 0x51, 0x00, 0x00, 0x00, - 0x80, 0xd8, 0x0d, 0x00, 0x00, 0x00, - 0x24, 0x22, 0x42, 0x00, 0x00, 0x00, - 0x0a, 0x20, 0xa2, 0x00, 0x00, 0x00, - 0x00, 0xe0, 0x0e, 0x00, 0x00, 0x00, - 0xb8, 0x0b, 0x80, 0x00, 0x00, 0x00, - 0x09, 0x10, 0x91, 0x00, 0x00, 0x00, - 0x56, 0x05, 0x60, 0x00, 0x00, 0x00, - 0xa2, 0x8a, 0x28, 0x00, 0x00, 0x00, - 0x53, 0x65, 0x36, 0x00, 0x00, 0x00, - 0xe4, 0x2e, 0x42, 0x00, 0x00, 0x00, - 0x24, 0x42, 0x44, 0x00, 0x00, 0x00, - 0xa1, 0x1a, 0x11, 0x00, 0x00, 0x00, - 0x18, 0x31, 0x83, 0x00, 0x00, 0x00, - 0x03, 0x90, 0x39, 0x00, 0x00, 0x00, - 0x8a, 0x18, 0xa1, 0x00, 0x00, 0x00, - 0x04, 0x90, 0x49, 0x00, 0x00, 0x00, - 0x00, 0xe0, 0x0e, 0x00, 0x00, 0x00, - 0x98, 0xa2, 0x95, 0x00, 0x00, 0x00 -}; - -const uint8_t kMaskRandom24_21[126] = { - 0x51, 0x45, 0x14, 0x00, 0x00, 0x00, - 0x45, 0x14, 0x51, 0x00, 0x00, 0x00, - 0x80, 0xd8, 0x0d, 0x00, 0x00, 0x00, - 0x24, 0x22, 0x42, 0x00, 0x00, 0x00, - 0x0a, 0x20, 0xa2, 0x00, 0x00, 0x00, - 0x00, 0xe0, 0x0e, 0x00, 0x00, 0x00, - 0xb8, 0x0b, 0x80, 0x00, 0x00, 0x00, - 0x09, 0x10, 0x91, 0x00, 0x00, 0x00, - 0x56, 0x05, 0x60, 0x00, 0x00, 0x00, - 0xa2, 0x8a, 0x28, 0x00, 0x00, 0x00, - 0x53, 0x65, 0x36, 0x00, 0x00, 0x00, - 0x21, 0x32, 0x13, 0x00, 0x00, 0x00, - 0x10, 0x91, 0x09, 0x00, 0x00, 0x00, - 0x00, 0x70, 0x07, 0x00, 0x00, 0x00, - 0x0c, 0x10, 0xc1, 0x00, 0x00, 0x00, - 0x40, 0xc4, 0x0c, 0x00, 0x00, 0x00, - 0x6a, 0x06, 0xa0, 0x00, 0x00, 0x00, - 0x86, 0x08, 0x60, 0x00, 0x00, 0x00, - 0x24, 0x82, 0x48, 0x00, 0x00, 0x00, - 0x89, 0x08, 0x90, 0x00, 0x00, 0x00, - 0xc0, 0x2c, 0x02, 0x00, 0x00, 0x00 -}; - -const uint8_t kMaskRandom24_22[132] = { - 0x53, 0x65, 0x36, 0x00, 0x00, 0x00, - 0x21, 0x32, 0x13, 0x00, 0x00, 0x00, - 0x10, 0x91, 0x09, 0x00, 0x00, 0x00, - 0x00, 0x70, 0x07, 0x00, 0x00, 0x00, - 0x0c, 0x10, 0xc1, 0x00, 0x00, 0x00, - 0x40, 0xc4, 0x0c, 0x00, 0x00, 0x00, - 0x6a, 0x06, 0xa0, 0x00, 0x00, 0x00, - 0x86, 0x08, 0x60, 0x00, 0x00, 0x00, - 0x24, 0x82, 0x48, 0x00, 0x00, 0x00, - 0x89, 0x08, 0x90, 0x00, 0x00, 0x00, - 0xc0, 0x2c, 0x02, 0x00, 0x00, 0x00, - 0x51, 0x45, 0x14, 0x00, 0x00, 0x00, - 0x45, 0x14, 0x51, 0x00, 0x00, 0x00, - 0x80, 0xd8, 0x0d, 0x00, 0x00, 0x00, - 0x24, 0x22, 0x42, 0x00, 0x00, 0x00, - 0x0a, 0x20, 0xa2, 0x00, 0x00, 0x00, - 0x00, 0xe0, 0x0e, 0x00, 0x00, 0x00, - 0xb8, 0x0b, 0x80, 0x00, 0x00, 0x00, - 0x09, 0x10, 0x91, 0x00, 0x00, 0x00, - 0x56, 0x05, 0x60, 0x00, 0x00, 0x00, - 0xa2, 0x8a, 0x28, 0x00, 0x00, 0x00, - 0x1a, 0xaa, 0xee, 0x00, 0x00, 0x00 -}; - -const uint8_t kMaskRandom24_23[138] = { - 0x53, 0x65, 0x36, 0x00, 0x00, 0x00, - 0x21, 0x32, 0x13, 0x00, 0x00, 0x00, - 0x10, 0x91, 0x09, 0x00, 0x00, 0x00, - 0x00, 0x70, 0x07, 0x00, 0x00, 0x00, - 0x0c, 0x10, 0xc1, 0x00, 0x00, 0x00, - 0x40, 0xc4, 0x0c, 0x00, 0x00, 0x00, - 0x6a, 0x06, 0xa0, 0x00, 0x00, 0x00, - 0x86, 0x08, 0x60, 0x00, 0x00, 0x00, - 0x24, 0x82, 0x48, 0x00, 0x00, 0x00, - 0x89, 0x08, 0x90, 0x00, 0x00, 0x00, - 0xc0, 0x2c, 0x02, 0x00, 0x00, 0x00, - 0x10, 0x61, 0x06, 0x00, 0x00, 0x00, - 0x02, 0x30, 0x23, 0x00, 0x00, 0x00, - 0x40, 0x54, 0x05, 0x00, 0x00, 0x00, - 0x21, 0x82, 0x18, 0x00, 0x00, 0x00, - 0x81, 0x18, 0x11, 0x00, 0x00, 0x00, - 0x14, 0x81, 0x48, 0x00, 0x00, 0x00, - 0x98, 0x09, 0x80, 0x00, 0x00, 0x00, - 0x08, 0x90, 0x89, 0x00, 0x00, 0x00, - 0x62, 0x06, 0x20, 0x00, 0x00, 0x00, - 0x24, 0x22, 0x42, 0x00, 0x00, 0x00, - 0x8a, 0x08, 0xa0, 0x00, 0x00, 0x00, - 0x84, 0x48, 0x44, 0x00, 0x00, 0x00 -}; - -const uint8_t kMaskRandom24_24[144] = { - 0x10, 0x61, 0x06, 0x00, 0x00, 0x00, - 0x02, 0x30, 0x23, 0x00, 0x00, 0x00, - 0x40, 0x54, 0x05, 0x00, 0x00, 0x00, - 0x21, 0x82, 0x18, 0x00, 0x00, 0x00, - 0x81, 0x18, 0x11, 0x00, 0x00, 0x00, - 0x14, 0x81, 0x48, 0x00, 0x00, 0x00, - 0x98, 0x09, 0x80, 0x00, 0x00, 0x00, - 0x08, 0x90, 0x89, 0x00, 0x00, 0x00, - 0x62, 0x06, 0x20, 0x00, 0x00, 0x00, - 0x24, 0x22, 0x42, 0x00, 0x00, 0x00, - 0x8a, 0x08, 0xa0, 0x00, 0x00, 0x00, - 0x84, 0x48, 0x44, 0x00, 0x00, 0x00, - 0x53, 0x65, 0x36, 0x00, 0x00, 0x00, - 0x21, 0x32, 0x13, 0x00, 0x00, 0x00, - 0x10, 0x91, 0x09, 0x00, 0x00, 0x00, - 0x00, 0x70, 0x07, 0x00, 0x00, 0x00, - 0x0c, 0x10, 0xc1, 0x00, 0x00, 0x00, - 0x40, 0xc4, 0x0c, 0x00, 0x00, 0x00, - 0x6a, 0x06, 0xa0, 0x00, 0x00, 0x00, - 0x86, 0x08, 0x60, 0x00, 0x00, 0x00, - 0x24, 0x82, 0x48, 0x00, 0x00, 0x00, - 0x89, 0x08, 0x90, 0x00, 0x00, 0x00, - 0xc0, 0x2c, 0x02, 0x00, 0x00, 0x00, - 0x88, 0x32, 0x59, 0x00, 0x00, 0x00 -}; - -const uint8_t kMaskRandom24_3[18] = { - 0x9b, 0x29, 0xb2, 0x00, 0x00, 0x00, - 0x49, 0xd4, 0x9d, 0x00, 0x00, 0x00, - 0x3e, 0x83, 0xe8, 0x00, 0x00, 0x00 -}; - -const uint8_t kMaskRandom24_4[24] = { - 0x8b, 0x28, 0xb2, 0x00, 0x00, 0x00, - 0x14, 0xb1, 0x4b, 0x00, 0x00, 0x00, - 0x22, 0xd2, 0x2d, 0x00, 0x00, 0x00, - 0x45, 0x54, 0x55, 0x00, 0x00, 0x00 -}; - -const uint8_t kMaskRandom24_5[30] = { - 0x53, 0x65, 0x36, 0x00, 0x00, 0x00, - 0x64, 0xb6, 0x4b, 0x00, 0x00, 0x00, - 0x0e, 0xe0, 0xee, 0x00, 0x00, 0x00, - 0xa9, 0xca, 0x9c, 0x00, 0x00, 0x00, - 0xb8, 0x3b, 0x83, 0x00, 0x00, 0x00 -}; - -const uint8_t kMaskRandom24_6[36] = { - 0xd1, 0x4d, 0x14, 0x00, 0x00, 0x00, - 0x45, 0x34, 0x53, 0x00, 0x00, 0x00, - 0x22, 0xd2, 0x2d, 0x00, 0x00, 0x00, - 0x16, 0xc1, 0x6c, 0x00, 0x00, 0x00, - 0x0b, 0xa0, 0xba, 0x00, 0x00, 0x00, - 0xe8, 0x8e, 0x88, 0x00, 0x00, 0x00 -}; - -const uint8_t kMaskRandom24_7[42] = { - 0xd3, 0x65, 0x36, 0x00, 0x00, 0x00, - 0x25, 0x32, 0x53, 0x00, 0x00, 0x00, - 0x30, 0xd3, 0x05, 0x00, 0x00, 0x00, - 0x06, 0x48, 0x6c, 0x00, 0x00, 0x00, - 0xc0, 0xb8, 0x1b, 0x00, 0x00, 0x00, - 0x2a, 0xa2, 0xaa, 0x00, 0x00, 0x00, - 0xa8, 0x4e, 0x84, 0x00, 0x00, 0x00 -}; - -const uint8_t kMaskRandom24_8[48] = { - 0x81, 0x60, 0x16, 0x00, 0x00, 0x00, - 0x40, 0x3c, 0x03, 0x00, 0x00, 0x00, - 0x10, 0x91, 0x09, 0x00, 0x00, 0x00, - 0x06, 0x50, 0x65, 0x00, 0x00, 0x00, - 0x20, 0x4a, 0x84, 0x00, 0x00, 0x00, - 0x8a, 0xa0, 0xaa, 0x00, 0x00, 0x00, - 0x33, 0x03, 0x30, 0x00, 0x00, 0x00, - 0x4c, 0x84, 0xc8, 0x00, 0x00, 0x00 -}; - -const uint8_t kMaskRandom24_9[54] = { - 0xd3, 0x65, 0x36, 0x00, 0x00, 0x00, - 0x64, 0x26, 0x42, 0x00, 0x00, 0x00, - 0x18, 0x41, 0xc4, 0x00, 0x00, 0x00, - 0xa0, 0x4a, 0x04, 0x00, 0x00, 0x00, - 0x81, 0x38, 0x13, 0x00, 0x00, 0x00, - 0x22, 0xa2, 0x2a, 0x00, 0x00, 0x00, - 0x08, 0x70, 0x87, 0x00, 0x00, 0x00, - 0x04, 0x90, 0x49, 0x00, 0x00, 0x00, - 0x01, 0xc0, 0x1c, 0x00, 0x00, 0x00 -}; - -const uint8_t kMaskRandom25_1[6] = { - 0xff, 0xff, 0xff, 0x80, 0x00, 0x00 -}; - -const uint8_t kMaskRandom25_10[60] = { - 0x51, 0x4d, 0x10, 0x00, 0x00, 0x00, - 0x45, 0x14, 0x45, 0x00, 0x00, 0x00, - 0x80, 0xd1, 0x09, 0x80, 0x00, 0x00, - 0x24, 0x2a, 0x05, 0x00, 0x00, 0x00, - 0x0a, 0x24, 0xa0, 0x80, 0x00, 0x00, - 0x00, 0xe4, 0x03, 0x00, 0x00, 0x00, - 0xb8, 0x08, 0x02, 0x80, 0x00, 0x00, - 0x09, 0x10, 0xc9, 0x00, 0x00, 0x00, - 0x56, 0x00, 0x58, 0x80, 0x00, 0x00, - 0xa2, 0x86, 0x22, 0x00, 0x00, 0x00 -}; - -const uint8_t kMaskRandom25_11[66] = { - 0x53, 0x65, 0x12, 0x00, 0x00, 0x00, - 0x21, 0x32, 0x21, 0x00, 0x00, 0x00, - 0x10, 0x91, 0x34, 0x00, 0x00, 0x00, - 0x00, 0x72, 0x50, 0x00, 0x00, 0x00, - 0x0c, 0x11, 0x81, 0x80, 0x00, 0x00, - 0x40, 0xc0, 0xa2, 0x00, 0x00, 0x00, - 0x6a, 0x08, 0x88, 0x80, 0x00, 0x00, - 0x86, 0x00, 0x68, 0x00, 0x00, 0x00, - 0x24, 0x8e, 0x02, 0x00, 0x00, 0x00, - 0x89, 0x08, 0x44, 0x00, 0x00, 0x00, - 0xc0, 0x24, 0x41, 0x80, 0x00, 0x00 -}; - -const uint8_t kMaskRandom25_12[72] = { - 0x10, 0x62, 0x82, 0x80, 0x00, 0x00, - 0x02, 0x38, 0x45, 0x00, 0x00, 0x00, - 0x40, 0x56, 0x04, 0x00, 0x00, 0x00, - 0x21, 0x80, 0x54, 0x80, 0x00, 0x00, - 0x81, 0x10, 0x29, 0x80, 0x00, 0x00, - 0x14, 0x80, 0x13, 0x00, 0x00, 0x00, - 0x98, 0x04, 0x81, 0x00, 0x00, 0x00, - 0x08, 0x92, 0x48, 0x00, 0x00, 0x00, - 0x62, 0x09, 0x40, 0x00, 0x00, 0x00, - 0x24, 0x28, 0xa0, 0x00, 0x00, 0x00, - 0x8a, 0x01, 0x18, 0x00, 0x00, 0x00, - 0x84, 0x45, 0x22, 0x00, 0x00, 0x00 -}; - -const uint8_t kMaskRandom25_13[78] = { - 0x51, 0x4d, 0x12, 0x00, 0x00, 0x00, - 0xc5, 0x14, 0x6d, 0x00, 0x00, 0x00, - 0x21, 0x81, 0x54, 0x80, 0x00, 0x00, - 0x12, 0x32, 0x17, 0x00, 0x00, 0x00, - 0x08, 0xe2, 0x8c, 0x80, 0x00, 0x00, - 0x2e, 0x0a, 0xa2, 0x00, 0x00, 0x00, - 0x53, 0x65, 0x92, 0x00, 0x00, 0x00, - 0x21, 0x32, 0x65, 0x00, 0x00, 0x00, - 0x90, 0x9b, 0x14, 0x00, 0x00, 0x00, - 0x02, 0x52, 0xb0, 0x80, 0x00, 0x00, - 0x06, 0xa1, 0x4c, 0x80, 0x00, 0x00, - 0x2c, 0x0c, 0x88, 0x80, 0x00, 0x00, - 0x88, 0x68, 0x4b, 0x00, 0x00, 0x00 -}; - -const uint8_t kMaskRandom25_14[84] = { - 0x53, 0x65, 0x92, 0x00, 0x00, 0x00, - 0x21, 0x32, 0x65, 0x00, 0x00, 0x00, - 0x90, 0x9b, 0x14, 0x00, 0x00, 0x00, - 0x02, 0x52, 0xb0, 0x80, 0x00, 0x00, - 0x06, 0xa1, 0x4c, 0x80, 0x00, 0x00, - 0x2c, 0x0c, 0x88, 0x80, 0x00, 0x00, - 0x88, 0x68, 0x4b, 0x00, 0x00, 0x00, - 0x51, 0x4d, 0x12, 0x00, 0x00, 0x00, - 0xc5, 0x14, 0x6d, 0x00, 0x00, 0x00, - 0x21, 0x81, 0x54, 0x80, 0x00, 0x00, - 0x12, 0x32, 0x17, 0x00, 0x00, 0x00, - 0x08, 0xe2, 0x8c, 0x80, 0x00, 0x00, - 0x2e, 0x0a, 0xa2, 0x00, 0x00, 0x00, - 0x73, 0x76, 0x61, 0x80, 0x00, 0x00 -}; - -const uint8_t kMaskRandom25_15[90] = { - 0x53, 0x65, 0x92, 0x00, 0x00, 0x00, - 0x21, 0x32, 0x65, 0x00, 0x00, 0x00, - 0x90, 0x9b, 0x14, 0x00, 0x00, 0x00, - 0x02, 0x52, 0xb0, 0x80, 0x00, 0x00, - 0x06, 0xa1, 0x4c, 0x80, 0x00, 0x00, - 0x2c, 0x0c, 0x88, 0x80, 0x00, 0x00, - 0x88, 0x68, 0x4b, 0x00, 0x00, 0x00, - 0x20, 0x68, 0x0a, 0x80, 0x00, 0x00, - 0x80, 0x33, 0x09, 0x00, 0x00, 0x00, - 0x42, 0x41, 0x60, 0x80, 0x00, 0x00, - 0x01, 0x90, 0x33, 0x00, 0x00, 0x00, - 0x14, 0x14, 0x46, 0x00, 0x00, 0x00, - 0x0a, 0x80, 0x81, 0x80, 0x00, 0x00, - 0x38, 0x0d, 0x80, 0x00, 0x00, 0x00, - 0xc5, 0x0a, 0x14, 0x00, 0x00, 0x00 -}; - -const uint8_t kMaskRandom25_16[96] = { - 0x20, 0x68, 0x0a, 0x80, 0x00, 0x00, - 0x80, 0x33, 0x09, 0x00, 0x00, 0x00, - 0x42, 0x41, 0x60, 0x80, 0x00, 0x00, - 0x01, 0x90, 0x33, 0x00, 0x00, 0x00, - 0x14, 0x14, 0x46, 0x00, 0x00, 0x00, - 0x0a, 0x80, 0x81, 0x80, 0x00, 0x00, - 0x38, 0x0d, 0x80, 0x00, 0x00, 0x00, - 0xc5, 0x0a, 0x14, 0x00, 0x00, 0x00, - 0x53, 0x65, 0x92, 0x00, 0x00, 0x00, - 0x21, 0x32, 0x65, 0x00, 0x00, 0x00, - 0x90, 0x9b, 0x14, 0x00, 0x00, 0x00, - 0x02, 0x52, 0xb0, 0x80, 0x00, 0x00, - 0x06, 0xa1, 0x4c, 0x80, 0x00, 0x00, - 0x2c, 0x0c, 0x88, 0x80, 0x00, 0x00, - 0x88, 0x68, 0x4b, 0x00, 0x00, 0x00, - 0x16, 0xe8, 0xdc, 0x80, 0x00, 0x00 -}; - -const uint8_t kMaskRandom25_17[102] = { - 0x20, 0x68, 0x0a, 0x80, 0x00, 0x00, - 0x80, 0x33, 0x09, 0x00, 0x00, 0x00, - 0x42, 0x41, 0x60, 0x80, 0x00, 0x00, - 0x01, 0x90, 0x33, 0x00, 0x00, 0x00, - 0x14, 0x14, 0x46, 0x00, 0x00, 0x00, - 0x0a, 0x80, 0x81, 0x80, 0x00, 0x00, - 0x38, 0x0d, 0x80, 0x00, 0x00, 0x00, - 0xc5, 0x0a, 0x14, 0x00, 0x00, 0x00, - 0x53, 0x65, 0x92, 0x00, 0x00, 0x00, - 0xe4, 0x26, 0x64, 0x00, 0x00, 0x00, - 0x24, 0x41, 0x44, 0x00, 0x00, 0x00, - 0xa1, 0x12, 0x14, 0x80, 0x00, 0x00, - 0x18, 0x30, 0x2c, 0x80, 0x00, 0x00, - 0x03, 0x99, 0x41, 0x00, 0x00, 0x00, - 0x8a, 0x18, 0x0a, 0x80, 0x00, 0x00, - 0x04, 0x90, 0xa9, 0x00, 0x00, 0x00, - 0x00, 0xe4, 0x01, 0x80, 0x00, 0x00 -}; - -const uint8_t kMaskRandom25_18[108] = { - 0x53, 0x65, 0x92, 0x00, 0x00, 0x00, - 0xe4, 0x26, 0x64, 0x00, 0x00, 0x00, - 0x24, 0x41, 0x44, 0x00, 0x00, 0x00, - 0xa1, 0x12, 0x14, 0x80, 0x00, 0x00, - 0x18, 0x30, 0x2c, 0x80, 0x00, 0x00, - 0x03, 0x99, 0x41, 0x00, 0x00, 0x00, - 0x8a, 0x18, 0x0a, 0x80, 0x00, 0x00, - 0x04, 0x90, 0xa9, 0x00, 0x00, 0x00, - 0x00, 0xe4, 0x01, 0x80, 0x00, 0x00, - 0x20, 0x68, 0x0a, 0x80, 0x00, 0x00, - 0x80, 0x33, 0x09, 0x00, 0x00, 0x00, - 0x42, 0x41, 0x60, 0x80, 0x00, 0x00, - 0x01, 0x90, 0x33, 0x00, 0x00, 0x00, - 0x14, 0x14, 0x46, 0x00, 0x00, 0x00, - 0x0a, 0x80, 0x81, 0x80, 0x00, 0x00, - 0x38, 0x0d, 0x80, 0x00, 0x00, 0x00, - 0xc5, 0x0a, 0x14, 0x00, 0x00, 0x00, - 0xce, 0x9b, 0xe1, 0x00, 0x00, 0x00 -}; - -const uint8_t kMaskRandom25_19[114] = { - 0x53, 0x65, 0x92, 0x00, 0x00, 0x00, - 0xe4, 0x26, 0x64, 0x00, 0x00, 0x00, - 0x24, 0x41, 0x44, 0x00, 0x00, 0x00, - 0xa1, 0x12, 0x14, 0x80, 0x00, 0x00, - 0x18, 0x30, 0x2c, 0x80, 0x00, 0x00, - 0x03, 0x99, 0x41, 0x00, 0x00, 0x00, - 0x8a, 0x18, 0x0a, 0x80, 0x00, 0x00, - 0x04, 0x90, 0xa9, 0x00, 0x00, 0x00, - 0x00, 0xe4, 0x01, 0x80, 0x00, 0x00, - 0x51, 0x4d, 0x10, 0x00, 0x00, 0x00, - 0x45, 0x14, 0x45, 0x00, 0x00, 0x00, - 0x80, 0xd1, 0x09, 0x80, 0x00, 0x00, - 0x24, 0x2a, 0x05, 0x00, 0x00, 0x00, - 0x0a, 0x24, 0xa0, 0x80, 0x00, 0x00, - 0x00, 0xe4, 0x03, 0x00, 0x00, 0x00, - 0xb8, 0x08, 0x02, 0x80, 0x00, 0x00, - 0x09, 0x10, 0xc9, 0x00, 0x00, 0x00, - 0x56, 0x00, 0x58, 0x80, 0x00, 0x00, - 0xa2, 0x86, 0x22, 0x00, 0x00, 0x00 -}; - -const uint8_t kMaskRandom25_2[12] = { - 0xec, 0xce, 0xcc, 0x00, 0x00, 0x00, - 0x93, 0xb1, 0xb3, 0x80, 0x00, 0x00 -}; - -const uint8_t kMaskRandom25_20[120] = { - 0x51, 0x4d, 0x10, 0x00, 0x00, 0x00, - 0x45, 0x14, 0x45, 0x00, 0x00, 0x00, - 0x80, 0xd1, 0x09, 0x80, 0x00, 0x00, - 0x24, 0x2a, 0x05, 0x00, 0x00, 0x00, - 0x0a, 0x24, 0xa0, 0x80, 0x00, 0x00, - 0x00, 0xe4, 0x03, 0x00, 0x00, 0x00, - 0xb8, 0x08, 0x02, 0x80, 0x00, 0x00, - 0x09, 0x10, 0xc9, 0x00, 0x00, 0x00, - 0x56, 0x00, 0x58, 0x80, 0x00, 0x00, - 0xa2, 0x86, 0x22, 0x00, 0x00, 0x00, - 0x53, 0x65, 0x92, 0x00, 0x00, 0x00, - 0xe4, 0x26, 0x64, 0x00, 0x00, 0x00, - 0x24, 0x41, 0x44, 0x00, 0x00, 0x00, - 0xa1, 0x12, 0x14, 0x80, 0x00, 0x00, - 0x18, 0x30, 0x2c, 0x80, 0x00, 0x00, - 0x03, 0x99, 0x41, 0x00, 0x00, 0x00, - 0x8a, 0x18, 0x0a, 0x80, 0x00, 0x00, - 0x04, 0x90, 0xa9, 0x00, 0x00, 0x00, - 0x00, 0xe4, 0x01, 0x80, 0x00, 0x00, - 0x1b, 0x8a, 0xa0, 0x00, 0x00, 0x00 -}; - -const uint8_t kMaskRandom25_21[126] = { - 0x51, 0x4d, 0x10, 0x00, 0x00, 0x00, - 0x45, 0x14, 0x45, 0x00, 0x00, 0x00, - 0x80, 0xd1, 0x09, 0x80, 0x00, 0x00, - 0x24, 0x2a, 0x05, 0x00, 0x00, 0x00, - 0x0a, 0x24, 0xa0, 0x80, 0x00, 0x00, - 0x00, 0xe4, 0x03, 0x00, 0x00, 0x00, - 0xb8, 0x08, 0x02, 0x80, 0x00, 0x00, - 0x09, 0x10, 0xc9, 0x00, 0x00, 0x00, - 0x56, 0x00, 0x58, 0x80, 0x00, 0x00, - 0xa2, 0x86, 0x22, 0x00, 0x00, 0x00, - 0x53, 0x65, 0x12, 0x00, 0x00, 0x00, - 0x21, 0x32, 0x21, 0x00, 0x00, 0x00, - 0x10, 0x91, 0x34, 0x00, 0x00, 0x00, - 0x00, 0x72, 0x50, 0x00, 0x00, 0x00, - 0x0c, 0x11, 0x81, 0x80, 0x00, 0x00, - 0x40, 0xc0, 0xa2, 0x00, 0x00, 0x00, - 0x6a, 0x08, 0x88, 0x80, 0x00, 0x00, - 0x86, 0x00, 0x68, 0x00, 0x00, 0x00, - 0x24, 0x8e, 0x02, 0x00, 0x00, 0x00, - 0x89, 0x08, 0x44, 0x00, 0x00, 0x00, - 0xc0, 0x24, 0x41, 0x80, 0x00, 0x00 -}; - -const uint8_t kMaskRandom25_22[132] = { - 0x53, 0x65, 0x12, 0x00, 0x00, 0x00, - 0x21, 0x32, 0x21, 0x00, 0x00, 0x00, - 0x10, 0x91, 0x34, 0x00, 0x00, 0x00, - 0x00, 0x72, 0x50, 0x00, 0x00, 0x00, - 0x0c, 0x11, 0x81, 0x80, 0x00, 0x00, - 0x40, 0xc0, 0xa2, 0x00, 0x00, 0x00, - 0x6a, 0x08, 0x88, 0x80, 0x00, 0x00, - 0x86, 0x00, 0x68, 0x00, 0x00, 0x00, - 0x24, 0x8e, 0x02, 0x00, 0x00, 0x00, - 0x89, 0x08, 0x44, 0x00, 0x00, 0x00, - 0xc0, 0x24, 0x41, 0x80, 0x00, 0x00, - 0x51, 0x4d, 0x10, 0x00, 0x00, 0x00, - 0x45, 0x14, 0x45, 0x00, 0x00, 0x00, - 0x80, 0xd1, 0x09, 0x80, 0x00, 0x00, - 0x24, 0x2a, 0x05, 0x00, 0x00, 0x00, - 0x0a, 0x24, 0xa0, 0x80, 0x00, 0x00, - 0x00, 0xe4, 0x03, 0x00, 0x00, 0x00, - 0xb8, 0x08, 0x02, 0x80, 0x00, 0x00, - 0x09, 0x10, 0xc9, 0x00, 0x00, 0x00, - 0x56, 0x00, 0x58, 0x80, 0x00, 0x00, - 0xa2, 0x86, 0x22, 0x00, 0x00, 0x00, - 0x15, 0xa2, 0x99, 0x00, 0x00, 0x00 -}; - -const uint8_t kMaskRandom25_23[138] = { - 0x53, 0x65, 0x12, 0x00, 0x00, 0x00, - 0x21, 0x32, 0x21, 0x00, 0x00, 0x00, - 0x10, 0x91, 0x34, 0x00, 0x00, 0x00, - 0x00, 0x72, 0x50, 0x00, 0x00, 0x00, - 0x0c, 0x11, 0x81, 0x80, 0x00, 0x00, - 0x40, 0xc0, 0xa2, 0x00, 0x00, 0x00, - 0x6a, 0x08, 0x88, 0x80, 0x00, 0x00, - 0x86, 0x00, 0x68, 0x00, 0x00, 0x00, - 0x24, 0x8e, 0x02, 0x00, 0x00, 0x00, - 0x89, 0x08, 0x44, 0x00, 0x00, 0x00, - 0xc0, 0x24, 0x41, 0x80, 0x00, 0x00, - 0x10, 0x62, 0x82, 0x80, 0x00, 0x00, - 0x02, 0x38, 0x45, 0x00, 0x00, 0x00, - 0x40, 0x56, 0x04, 0x00, 0x00, 0x00, - 0x21, 0x80, 0x54, 0x80, 0x00, 0x00, - 0x81, 0x10, 0x29, 0x80, 0x00, 0x00, - 0x14, 0x80, 0x13, 0x00, 0x00, 0x00, - 0x98, 0x04, 0x81, 0x00, 0x00, 0x00, - 0x08, 0x92, 0x48, 0x00, 0x00, 0x00, - 0x62, 0x09, 0x40, 0x00, 0x00, 0x00, - 0x24, 0x28, 0xa0, 0x00, 0x00, 0x00, - 0x8a, 0x01, 0x18, 0x00, 0x00, 0x00, - 0x84, 0x45, 0x22, 0x00, 0x00, 0x00 -}; - -const uint8_t kMaskRandom25_24[144] = { - 0x10, 0x62, 0x82, 0x80, 0x00, 0x00, - 0x02, 0x38, 0x45, 0x00, 0x00, 0x00, - 0x40, 0x56, 0x04, 0x00, 0x00, 0x00, - 0x21, 0x80, 0x54, 0x80, 0x00, 0x00, - 0x81, 0x10, 0x29, 0x80, 0x00, 0x00, - 0x14, 0x80, 0x13, 0x00, 0x00, 0x00, - 0x98, 0x04, 0x81, 0x00, 0x00, 0x00, - 0x08, 0x92, 0x48, 0x00, 0x00, 0x00, - 0x62, 0x09, 0x40, 0x00, 0x00, 0x00, - 0x24, 0x28, 0xa0, 0x00, 0x00, 0x00, - 0x8a, 0x01, 0x18, 0x00, 0x00, 0x00, - 0x84, 0x45, 0x22, 0x00, 0x00, 0x00, - 0x53, 0x65, 0x12, 0x00, 0x00, 0x00, - 0x21, 0x32, 0x21, 0x00, 0x00, 0x00, - 0x10, 0x91, 0x34, 0x00, 0x00, 0x00, - 0x00, 0x72, 0x50, 0x00, 0x00, 0x00, - 0x0c, 0x11, 0x81, 0x80, 0x00, 0x00, - 0x40, 0xc0, 0xa2, 0x00, 0x00, 0x00, - 0x6a, 0x08, 0x88, 0x80, 0x00, 0x00, - 0x86, 0x00, 0x68, 0x00, 0x00, 0x00, - 0x24, 0x8e, 0x02, 0x00, 0x00, 0x00, - 0x89, 0x08, 0x44, 0x00, 0x00, 0x00, - 0xc0, 0x24, 0x41, 0x80, 0x00, 0x00, - 0xf9, 0x0c, 0x14, 0x80, 0x00, 0x00 -}; - -const uint8_t kMaskRandom25_25[150] = { - 0x10, 0x62, 0x82, 0x80, 0x00, 0x00, - 0x02, 0x38, 0x45, 0x00, 0x00, 0x00, - 0x40, 0x56, 0x04, 0x00, 0x00, 0x00, - 0x21, 0x80, 0x54, 0x80, 0x00, 0x00, - 0x81, 0x10, 0x29, 0x80, 0x00, 0x00, - 0x14, 0x80, 0x13, 0x00, 0x00, 0x00, - 0x98, 0x04, 0x81, 0x00, 0x00, 0x00, - 0x08, 0x92, 0x48, 0x00, 0x00, 0x00, - 0x62, 0x09, 0x40, 0x00, 0x00, 0x00, - 0x24, 0x28, 0xa0, 0x00, 0x00, 0x00, - 0x8a, 0x01, 0x18, 0x00, 0x00, 0x00, - 0x84, 0x45, 0x22, 0x00, 0x00, 0x00, - 0x10, 0x65, 0x12, 0x00, 0x00, 0x00, - 0x02, 0x36, 0x64, 0x00, 0x00, 0x00, - 0x40, 0x50, 0x54, 0x80, 0x00, 0x00, - 0x21, 0x88, 0x12, 0x00, 0x00, 0x00, - 0x81, 0x19, 0x40, 0x00, 0x00, 0x00, - 0x14, 0x83, 0x08, 0x00, 0x00, 0x00, - 0x98, 0x02, 0x11, 0x00, 0x00, 0x00, - 0x08, 0x90, 0x3c, 0x00, 0x00, 0x00, - 0x62, 0x0e, 0x80, 0x00, 0x00, 0x00, - 0x24, 0x20, 0xa1, 0x00, 0x00, 0x00, - 0x8a, 0x08, 0x01, 0x80, 0x00, 0x00, - 0x84, 0x40, 0x49, 0x00, 0x00, 0x00, - 0x1c, 0x20, 0x8a, 0x80, 0x00, 0x00 -}; - -const uint8_t kMaskRandom25_3[18] = { - 0x9b, 0x89, 0x9b, 0x00, 0x00, 0x00, - 0x4f, 0x14, 0x6d, 0x80, 0x00, 0x00, - 0x3c, 0x63, 0x72, 0x80, 0x00, 0x00 -}; - -const uint8_t kMaskRandom25_4[24] = { - 0x8b, 0x24, 0x9b, 0x00, 0x00, 0x00, - 0x14, 0xb2, 0x6d, 0x00, 0x00, 0x00, - 0x22, 0xd8, 0x56, 0x80, 0x00, 0x00, - 0x45, 0x55, 0x25, 0x80, 0x00, 0x00 -}; - -const uint8_t kMaskRandom25_5[30] = { - 0x53, 0x65, 0x13, 0x00, 0x00, 0x00, - 0x64, 0x26, 0x64, 0x00, 0x00, 0x00, - 0x0c, 0xc0, 0xc6, 0x80, 0x00, 0x00, - 0x82, 0xaa, 0x1c, 0x00, 0x00, 0x00, - 0x09, 0x32, 0x29, 0x80, 0x00, 0x00 -}; - -const uint8_t kMaskRandom25_6[36] = { - 0x51, 0x4d, 0x12, 0x00, 0x00, 0x00, - 0xc5, 0x14, 0x6d, 0x00, 0x00, 0x00, - 0x21, 0x81, 0x54, 0x80, 0x00, 0x00, - 0x12, 0x32, 0x17, 0x00, 0x00, 0x00, - 0x08, 0xe2, 0x8c, 0x80, 0x00, 0x00, - 0x2e, 0x0a, 0xa2, 0x00, 0x00, 0x00 -}; - -const uint8_t kMaskRandom25_7[42] = { - 0x53, 0x65, 0x92, 0x00, 0x00, 0x00, - 0x21, 0x32, 0x65, 0x00, 0x00, 0x00, - 0x90, 0x9b, 0x14, 0x00, 0x00, 0x00, - 0x02, 0x52, 0xb0, 0x80, 0x00, 0x00, - 0x06, 0xa1, 0x4c, 0x80, 0x00, 0x00, - 0x2c, 0x0c, 0x88, 0x80, 0x00, 0x00, - 0x88, 0x68, 0x4b, 0x00, 0x00, 0x00 -}; - -const uint8_t kMaskRandom25_8[48] = { - 0x20, 0x68, 0x0a, 0x80, 0x00, 0x00, - 0x80, 0x33, 0x09, 0x00, 0x00, 0x00, - 0x42, 0x41, 0x60, 0x80, 0x00, 0x00, - 0x01, 0x90, 0x33, 0x00, 0x00, 0x00, - 0x14, 0x14, 0x46, 0x00, 0x00, 0x00, - 0x0a, 0x80, 0x81, 0x80, 0x00, 0x00, - 0x38, 0x0d, 0x80, 0x00, 0x00, 0x00, - 0xc5, 0x0a, 0x14, 0x00, 0x00, 0x00 -}; - -const uint8_t kMaskRandom25_9[54] = { - 0x53, 0x65, 0x92, 0x00, 0x00, 0x00, - 0xe4, 0x26, 0x64, 0x00, 0x00, 0x00, - 0x24, 0x41, 0x44, 0x00, 0x00, 0x00, - 0xa1, 0x12, 0x14, 0x80, 0x00, 0x00, - 0x18, 0x30, 0x2c, 0x80, 0x00, 0x00, - 0x03, 0x99, 0x41, 0x00, 0x00, 0x00, - 0x8a, 0x18, 0x0a, 0x80, 0x00, 0x00, - 0x04, 0x90, 0xa9, 0x00, 0x00, 0x00, - 0x00, 0xe4, 0x01, 0x80, 0x00, 0x00 -}; - -const uint8_t kMaskRandom26_1[6] = { - 0xff, 0xff, 0xff, 0xc0, 0x00, 0x00 -}; - -const uint8_t kMaskRandom26_10[60] = { - 0xd1, 0x06, 0x88, 0x00, 0x00, 0x00, - 0x44, 0x52, 0x22, 0x80, 0x00, 0x00, - 0x10, 0x98, 0x84, 0xc0, 0x00, 0x00, - 0xa0, 0x55, 0x02, 0x80, 0x00, 0x00, - 0x4a, 0x0a, 0x50, 0x40, 0x00, 0x00, - 0x40, 0x32, 0x01, 0x80, 0x00, 0x00, - 0x80, 0x2c, 0x01, 0x40, 0x00, 0x00, - 0x0c, 0x90, 0x64, 0x80, 0x00, 0x00, - 0x05, 0x88, 0x2c, 0x40, 0x00, 0x00, - 0x62, 0x23, 0x11, 0x00, 0x00, 0x00 -}; - -const uint8_t kMaskRandom26_11[66] = { - 0x51, 0x22, 0x89, 0x00, 0x00, 0x00, - 0x22, 0x11, 0x10, 0x80, 0x00, 0x00, - 0x13, 0x40, 0x9a, 0x00, 0x00, 0x00, - 0x25, 0x01, 0x28, 0x00, 0x00, 0x00, - 0x18, 0x18, 0xc0, 0xc0, 0x00, 0x00, - 0x0a, 0x20, 0x51, 0x00, 0x00, 0x00, - 0x88, 0x8c, 0x44, 0x40, 0x00, 0x00, - 0x06, 0x80, 0x34, 0x00, 0x00, 0x00, - 0xe0, 0x27, 0x01, 0x00, 0x00, 0x00, - 0x84, 0x44, 0x22, 0x00, 0x00, 0x00, - 0x44, 0x1a, 0x20, 0xc0, 0x00, 0x00 -}; - -const uint8_t kMaskRandom26_12[72] = { - 0x28, 0x29, 0x41, 0x40, 0x00, 0x00, - 0x84, 0x54, 0x22, 0x80, 0x00, 0x00, - 0x60, 0x43, 0x02, 0x00, 0x00, 0x00, - 0x05, 0x48, 0x2a, 0x40, 0x00, 0x00, - 0x02, 0x98, 0x14, 0xc0, 0x00, 0x00, - 0x01, 0x30, 0x09, 0x80, 0x00, 0x00, - 0x48, 0x12, 0x40, 0x80, 0x00, 0x00, - 0x24, 0x81, 0x24, 0x00, 0x00, 0x00, - 0x94, 0x04, 0xa0, 0x00, 0x00, 0x00, - 0x8a, 0x04, 0x50, 0x00, 0x00, 0x00, - 0x11, 0x80, 0x8c, 0x00, 0x00, 0x00, - 0x52, 0x22, 0x91, 0x00, 0x00, 0x00 -}; - -const uint8_t kMaskRandom26_13[78] = { - 0x51, 0x22, 0x89, 0x00, 0x00, 0x00, - 0x66, 0x43, 0x32, 0x00, 0x00, 0x00, - 0x05, 0x48, 0x2a, 0x40, 0x00, 0x00, - 0x81, 0x24, 0x09, 0x00, 0x00, 0x00, - 0x94, 0x04, 0xa0, 0x00, 0x00, 0x00, - 0x30, 0x81, 0x84, 0x00, 0x00, 0x00, - 0x21, 0x11, 0x08, 0x80, 0x00, 0x00, - 0x03, 0xc0, 0x1e, 0x00, 0x00, 0x00, - 0xe8, 0x07, 0x40, 0x00, 0x00, 0x00, - 0x0a, 0x10, 0x50, 0x80, 0x00, 0x00, - 0x80, 0x1c, 0x00, 0xc0, 0x00, 0x00, - 0x04, 0x90, 0x24, 0x80, 0x00, 0x00, - 0x08, 0xa8, 0x45, 0x40, 0x00, 0x00 -}; - -const uint8_t kMaskRandom26_14[84] = { - 0x59, 0x22, 0xc9, 0x00, 0x00, 0x00, - 0x26, 0x51, 0x32, 0x80, 0x00, 0x00, - 0xb1, 0x45, 0x8a, 0x00, 0x00, 0x00, - 0x2b, 0x09, 0x58, 0x40, 0x00, 0x00, - 0x14, 0xc8, 0xa6, 0x40, 0x00, 0x00, - 0xc8, 0x8e, 0x44, 0x40, 0x00, 0x00, - 0x84, 0xb4, 0x25, 0x80, 0x00, 0x00, - 0xd1, 0x26, 0x89, 0x00, 0x00, 0x00, - 0x46, 0xd2, 0x36, 0x80, 0x00, 0x00, - 0x15, 0x48, 0xaa, 0x40, 0x00, 0x00, - 0x21, 0x71, 0x0b, 0x80, 0x00, 0x00, - 0x28, 0xc9, 0x46, 0x40, 0x00, 0x00, - 0xaa, 0x25, 0x51, 0x00, 0x00, 0x00, - 0x5d, 0xa7, 0x78, 0x40, 0x00, 0x00 -}; - -const uint8_t kMaskRandom26_15[90] = { - 0x59, 0x22, 0xc9, 0x00, 0x00, 0x00, - 0x26, 0x51, 0x32, 0x80, 0x00, 0x00, - 0xb1, 0x45, 0x8a, 0x00, 0x00, 0x00, - 0x2b, 0x09, 0x58, 0x40, 0x00, 0x00, - 0x14, 0xc8, 0xa6, 0x40, 0x00, 0x00, - 0xc8, 0x8e, 0x44, 0x40, 0x00, 0x00, - 0x84, 0xb4, 0x25, 0x80, 0x00, 0x00, - 0x80, 0xac, 0x05, 0x40, 0x00, 0x00, - 0x30, 0x91, 0x84, 0x80, 0x00, 0x00, - 0x16, 0x08, 0xb0, 0x40, 0x00, 0x00, - 0x03, 0x30, 0x19, 0x80, 0x00, 0x00, - 0x44, 0x62, 0x23, 0x00, 0x00, 0x00, - 0x08, 0x18, 0x40, 0xc0, 0x00, 0x00, - 0xd8, 0x06, 0xc0, 0x00, 0x00, 0x00, - 0xa1, 0x45, 0x0a, 0x00, 0x00, 0x00 -}; - -const uint8_t kMaskRandom26_16[96] = { - 0x80, 0xac, 0x05, 0x40, 0x00, 0x00, - 0x30, 0x91, 0x84, 0x80, 0x00, 0x00, - 0x16, 0x08, 0xb0, 0x40, 0x00, 0x00, - 0x03, 0x30, 0x19, 0x80, 0x00, 0x00, - 0x44, 0x62, 0x23, 0x00, 0x00, 0x00, - 0x08, 0x18, 0x40, 0xc0, 0x00, 0x00, - 0xd8, 0x06, 0xc0, 0x00, 0x00, 0x00, - 0xa1, 0x45, 0x0a, 0x00, 0x00, 0x00, - 0x59, 0x22, 0xc9, 0x00, 0x00, 0x00, - 0x26, 0x51, 0x32, 0x80, 0x00, 0x00, - 0xb1, 0x45, 0x8a, 0x00, 0x00, 0x00, - 0x2b, 0x09, 0x58, 0x40, 0x00, 0x00, - 0x14, 0xc8, 0xa6, 0x40, 0x00, 0x00, - 0xc8, 0x8e, 0x44, 0x40, 0x00, 0x00, - 0x84, 0xb4, 0x25, 0x80, 0x00, 0x00, - 0x3c, 0xaf, 0x88, 0x80, 0x00, 0x00 -}; - -const uint8_t kMaskRandom26_17[102] = { - 0x80, 0xac, 0x05, 0x40, 0x00, 0x00, - 0x30, 0x91, 0x84, 0x80, 0x00, 0x00, - 0x16, 0x08, 0xb0, 0x40, 0x00, 0x00, - 0x03, 0x30, 0x19, 0x80, 0x00, 0x00, - 0x44, 0x62, 0x23, 0x00, 0x00, 0x00, - 0x08, 0x18, 0x40, 0xc0, 0x00, 0x00, - 0xd8, 0x06, 0xc0, 0x00, 0x00, 0x00, - 0xa1, 0x45, 0x0a, 0x00, 0x00, 0x00, - 0x59, 0x22, 0xc9, 0x00, 0x00, 0x00, - 0x66, 0x43, 0x32, 0x00, 0x00, 0x00, - 0x14, 0x40, 0xa2, 0x00, 0x00, 0x00, - 0x21, 0x49, 0x0a, 0x40, 0x00, 0x00, - 0x02, 0xc8, 0x16, 0x40, 0x00, 0x00, - 0x94, 0x14, 0xa0, 0x80, 0x00, 0x00, - 0x80, 0xac, 0x05, 0x40, 0x00, 0x00, - 0x0a, 0x90, 0x54, 0x80, 0x00, 0x00, - 0x40, 0x1a, 0x00, 0xc0, 0x00, 0x00 -}; - -const uint8_t kMaskRandom26_18[108] = { - 0x59, 0x22, 0xc9, 0x00, 0x00, 0x00, - 0x66, 0x43, 0x32, 0x00, 0x00, 0x00, - 0x14, 0x40, 0xa2, 0x00, 0x00, 0x00, - 0x21, 0x49, 0x0a, 0x40, 0x00, 0x00, - 0x02, 0xc8, 0x16, 0x40, 0x00, 0x00, - 0x94, 0x14, 0xa0, 0x80, 0x00, 0x00, - 0x80, 0xac, 0x05, 0x40, 0x00, 0x00, - 0x0a, 0x90, 0x54, 0x80, 0x00, 0x00, - 0x40, 0x1a, 0x00, 0xc0, 0x00, 0x00, - 0x80, 0xac, 0x05, 0x40, 0x00, 0x00, - 0x30, 0x91, 0x84, 0x80, 0x00, 0x00, - 0x16, 0x08, 0xb0, 0x40, 0x00, 0x00, - 0x03, 0x30, 0x19, 0x80, 0x00, 0x00, - 0x44, 0x62, 0x23, 0x00, 0x00, 0x00, - 0x08, 0x18, 0x40, 0xc0, 0x00, 0x00, - 0xd8, 0x06, 0xc0, 0x00, 0x00, 0x00, - 0xa1, 0x45, 0x0a, 0x00, 0x00, 0x00, - 0xaa, 0x0c, 0x83, 0x80, 0x00, 0x00 -}; - -const uint8_t kMaskRandom26_19[114] = { - 0x59, 0x22, 0xc9, 0x00, 0x00, 0x00, - 0x66, 0x43, 0x32, 0x00, 0x00, 0x00, - 0x14, 0x40, 0xa2, 0x00, 0x00, 0x00, - 0x21, 0x49, 0x0a, 0x40, 0x00, 0x00, - 0x02, 0xc8, 0x16, 0x40, 0x00, 0x00, - 0x94, 0x14, 0xa0, 0x80, 0x00, 0x00, - 0x80, 0xac, 0x05, 0x40, 0x00, 0x00, - 0x0a, 0x90, 0x54, 0x80, 0x00, 0x00, - 0x40, 0x1a, 0x00, 0xc0, 0x00, 0x00, - 0xd1, 0x06, 0x88, 0x00, 0x00, 0x00, - 0x44, 0x52, 0x22, 0x80, 0x00, 0x00, - 0x10, 0x98, 0x84, 0xc0, 0x00, 0x00, - 0xa0, 0x55, 0x02, 0x80, 0x00, 0x00, - 0x4a, 0x0a, 0x50, 0x40, 0x00, 0x00, - 0x40, 0x32, 0x01, 0x80, 0x00, 0x00, - 0x80, 0x2c, 0x01, 0x40, 0x00, 0x00, - 0x0c, 0x90, 0x64, 0x80, 0x00, 0x00, - 0x05, 0x88, 0x2c, 0x40, 0x00, 0x00, - 0x62, 0x23, 0x11, 0x00, 0x00, 0x00 -}; - -const uint8_t kMaskRandom26_2[12] = { - 0xec, 0xc7, 0x66, 0x00, 0x00, 0x00, - 0x1b, 0x38, 0xd9, 0xc0, 0x00, 0x00 -}; - -const uint8_t kMaskRandom26_20[120] = { - 0xd1, 0x06, 0x88, 0x00, 0x00, 0x00, - 0x44, 0x52, 0x22, 0x80, 0x00, 0x00, - 0x10, 0x98, 0x84, 0xc0, 0x00, 0x00, - 0xa0, 0x55, 0x02, 0x80, 0x00, 0x00, - 0x4a, 0x0a, 0x50, 0x40, 0x00, 0x00, - 0x40, 0x32, 0x01, 0x80, 0x00, 0x00, - 0x80, 0x2c, 0x01, 0x40, 0x00, 0x00, - 0x0c, 0x90, 0x64, 0x80, 0x00, 0x00, - 0x05, 0x88, 0x2c, 0x40, 0x00, 0x00, - 0x62, 0x23, 0x11, 0x00, 0x00, 0x00, - 0x59, 0x22, 0xc9, 0x00, 0x00, 0x00, - 0x66, 0x43, 0x32, 0x00, 0x00, 0x00, - 0x14, 0x40, 0xa2, 0x00, 0x00, 0x00, - 0x21, 0x49, 0x0a, 0x40, 0x00, 0x00, - 0x02, 0xc8, 0x16, 0x40, 0x00, 0x00, - 0x94, 0x14, 0xa0, 0x80, 0x00, 0x00, - 0x80, 0xac, 0x05, 0x40, 0x00, 0x00, - 0x0a, 0x90, 0x54, 0x80, 0x00, 0x00, - 0x40, 0x1a, 0x00, 0xc0, 0x00, 0x00, - 0xf4, 0x08, 0xec, 0x00, 0x00, 0x00 -}; - -const uint8_t kMaskRandom26_21[126] = { - 0xd1, 0x06, 0x88, 0x00, 0x00, 0x00, - 0x44, 0x52, 0x22, 0x80, 0x00, 0x00, - 0x10, 0x98, 0x84, 0xc0, 0x00, 0x00, - 0xa0, 0x55, 0x02, 0x80, 0x00, 0x00, - 0x4a, 0x0a, 0x50, 0x40, 0x00, 0x00, - 0x40, 0x32, 0x01, 0x80, 0x00, 0x00, - 0x80, 0x2c, 0x01, 0x40, 0x00, 0x00, - 0x0c, 0x90, 0x64, 0x80, 0x00, 0x00, - 0x05, 0x88, 0x2c, 0x40, 0x00, 0x00, - 0x62, 0x23, 0x11, 0x00, 0x00, 0x00, - 0x51, 0x22, 0x89, 0x00, 0x00, 0x00, - 0x22, 0x11, 0x10, 0x80, 0x00, 0x00, - 0x13, 0x40, 0x9a, 0x00, 0x00, 0x00, - 0x25, 0x01, 0x28, 0x00, 0x00, 0x00, - 0x18, 0x18, 0xc0, 0xc0, 0x00, 0x00, - 0x0a, 0x20, 0x51, 0x00, 0x00, 0x00, - 0x88, 0x8c, 0x44, 0x40, 0x00, 0x00, - 0x06, 0x80, 0x34, 0x00, 0x00, 0x00, - 0xe0, 0x27, 0x01, 0x00, 0x00, 0x00, - 0x84, 0x44, 0x22, 0x00, 0x00, 0x00, - 0x44, 0x1a, 0x20, 0xc0, 0x00, 0x00 -}; - -const uint8_t kMaskRandom26_22[132] = { - 0x51, 0x22, 0x89, 0x00, 0x00, 0x00, - 0x22, 0x11, 0x10, 0x80, 0x00, 0x00, - 0x13, 0x40, 0x9a, 0x00, 0x00, 0x00, - 0x25, 0x01, 0x28, 0x00, 0x00, 0x00, - 0x18, 0x18, 0xc0, 0xc0, 0x00, 0x00, - 0x0a, 0x20, 0x51, 0x00, 0x00, 0x00, - 0x88, 0x8c, 0x44, 0x40, 0x00, 0x00, - 0x06, 0x80, 0x34, 0x00, 0x00, 0x00, - 0xe0, 0x27, 0x01, 0x00, 0x00, 0x00, - 0x84, 0x44, 0x22, 0x00, 0x00, 0x00, - 0x44, 0x1a, 0x20, 0xc0, 0x00, 0x00, - 0xd1, 0x06, 0x88, 0x00, 0x00, 0x00, - 0x44, 0x52, 0x22, 0x80, 0x00, 0x00, - 0x10, 0x98, 0x84, 0xc0, 0x00, 0x00, - 0xa0, 0x55, 0x02, 0x80, 0x00, 0x00, - 0x4a, 0x0a, 0x50, 0x40, 0x00, 0x00, - 0x40, 0x32, 0x01, 0x80, 0x00, 0x00, - 0x80, 0x2c, 0x01, 0x40, 0x00, 0x00, - 0x0c, 0x90, 0x64, 0x80, 0x00, 0x00, - 0x05, 0x88, 0x2c, 0x40, 0x00, 0x00, - 0x62, 0x23, 0x11, 0x00, 0x00, 0x00, - 0x13, 0xc6, 0x6b, 0x40, 0x00, 0x00 -}; - -const uint8_t kMaskRandom26_23[138] = { - 0x51, 0x22, 0x89, 0x00, 0x00, 0x00, - 0x22, 0x11, 0x10, 0x80, 0x00, 0x00, - 0x13, 0x40, 0x9a, 0x00, 0x00, 0x00, - 0x25, 0x01, 0x28, 0x00, 0x00, 0x00, - 0x18, 0x18, 0xc0, 0xc0, 0x00, 0x00, - 0x0a, 0x20, 0x51, 0x00, 0x00, 0x00, - 0x88, 0x8c, 0x44, 0x40, 0x00, 0x00, - 0x06, 0x80, 0x34, 0x00, 0x00, 0x00, - 0xe0, 0x27, 0x01, 0x00, 0x00, 0x00, - 0x84, 0x44, 0x22, 0x00, 0x00, 0x00, - 0x44, 0x1a, 0x20, 0xc0, 0x00, 0x00, - 0x28, 0x29, 0x41, 0x40, 0x00, 0x00, - 0x84, 0x54, 0x22, 0x80, 0x00, 0x00, - 0x60, 0x43, 0x02, 0x00, 0x00, 0x00, - 0x05, 0x48, 0x2a, 0x40, 0x00, 0x00, - 0x02, 0x98, 0x14, 0xc0, 0x00, 0x00, - 0x01, 0x30, 0x09, 0x80, 0x00, 0x00, - 0x48, 0x12, 0x40, 0x80, 0x00, 0x00, - 0x24, 0x81, 0x24, 0x00, 0x00, 0x00, - 0x94, 0x04, 0xa0, 0x00, 0x00, 0x00, - 0x8a, 0x04, 0x50, 0x00, 0x00, 0x00, - 0x11, 0x80, 0x8c, 0x00, 0x00, 0x00, - 0x52, 0x22, 0x91, 0x00, 0x00, 0x00 -}; - -const uint8_t kMaskRandom26_24[144] = { - 0x28, 0x29, 0x41, 0x40, 0x00, 0x00, - 0x84, 0x54, 0x22, 0x80, 0x00, 0x00, - 0x60, 0x43, 0x02, 0x00, 0x00, 0x00, - 0x05, 0x48, 0x2a, 0x40, 0x00, 0x00, - 0x02, 0x98, 0x14, 0xc0, 0x00, 0x00, - 0x01, 0x30, 0x09, 0x80, 0x00, 0x00, - 0x48, 0x12, 0x40, 0x80, 0x00, 0x00, - 0x24, 0x81, 0x24, 0x00, 0x00, 0x00, - 0x94, 0x04, 0xa0, 0x00, 0x00, 0x00, - 0x8a, 0x04, 0x50, 0x00, 0x00, 0x00, - 0x11, 0x80, 0x8c, 0x00, 0x00, 0x00, - 0x52, 0x22, 0x91, 0x00, 0x00, 0x00, - 0x51, 0x22, 0x89, 0x00, 0x00, 0x00, - 0x22, 0x11, 0x10, 0x80, 0x00, 0x00, - 0x13, 0x40, 0x9a, 0x00, 0x00, 0x00, - 0x25, 0x01, 0x28, 0x00, 0x00, 0x00, - 0x18, 0x18, 0xc0, 0xc0, 0x00, 0x00, - 0x0a, 0x20, 0x51, 0x00, 0x00, 0x00, - 0x88, 0x8c, 0x44, 0x40, 0x00, 0x00, - 0x06, 0x80, 0x34, 0x00, 0x00, 0x00, - 0xe0, 0x27, 0x01, 0x00, 0x00, 0x00, - 0x84, 0x44, 0x22, 0x00, 0x00, 0x00, - 0x44, 0x1a, 0x20, 0xc0, 0x00, 0x00, - 0xdb, 0x4d, 0xd8, 0x40, 0x00, 0x00 -}; - -const uint8_t kMaskRandom26_25[150] = { - 0x28, 0x29, 0x41, 0x40, 0x00, 0x00, - 0x84, 0x54, 0x22, 0x80, 0x00, 0x00, - 0x60, 0x43, 0x02, 0x00, 0x00, 0x00, - 0x05, 0x48, 0x2a, 0x40, 0x00, 0x00, - 0x02, 0x98, 0x14, 0xc0, 0x00, 0x00, - 0x01, 0x30, 0x09, 0x80, 0x00, 0x00, - 0x48, 0x12, 0x40, 0x80, 0x00, 0x00, - 0x24, 0x81, 0x24, 0x00, 0x00, 0x00, - 0x94, 0x04, 0xa0, 0x00, 0x00, 0x00, - 0x8a, 0x04, 0x50, 0x00, 0x00, 0x00, - 0x11, 0x80, 0x8c, 0x00, 0x00, 0x00, - 0x52, 0x22, 0x91, 0x00, 0x00, 0x00, - 0x51, 0x22, 0x89, 0x00, 0x00, 0x00, - 0x66, 0x43, 0x32, 0x00, 0x00, 0x00, - 0x05, 0x48, 0x2a, 0x40, 0x00, 0x00, - 0x81, 0x24, 0x09, 0x00, 0x00, 0x00, - 0x94, 0x04, 0xa0, 0x00, 0x00, 0x00, - 0x30, 0x81, 0x84, 0x00, 0x00, 0x00, - 0x21, 0x11, 0x08, 0x80, 0x00, 0x00, - 0x03, 0xc0, 0x1e, 0x00, 0x00, 0x00, - 0xe8, 0x07, 0x40, 0x00, 0x00, 0x00, - 0x0a, 0x10, 0x50, 0x80, 0x00, 0x00, - 0x80, 0x1c, 0x00, 0xc0, 0x00, 0x00, - 0x04, 0x90, 0x24, 0x80, 0x00, 0x00, - 0x08, 0xa8, 0x45, 0x40, 0x00, 0x00 -}; - -const uint8_t kMaskRandom26_26[156] = { - 0x51, 0x22, 0x89, 0x00, 0x00, 0x00, - 0x66, 0x43, 0x32, 0x00, 0x00, 0x00, - 0x05, 0x48, 0x2a, 0x40, 0x00, 0x00, - 0x81, 0x24, 0x09, 0x00, 0x00, 0x00, - 0x94, 0x04, 0xa0, 0x00, 0x00, 0x00, - 0x30, 0x81, 0x84, 0x00, 0x00, 0x00, - 0x21, 0x11, 0x08, 0x80, 0x00, 0x00, - 0x03, 0xc0, 0x1e, 0x00, 0x00, 0x00, - 0xe8, 0x07, 0x40, 0x00, 0x00, 0x00, - 0x0a, 0x10, 0x50, 0x80, 0x00, 0x00, - 0x80, 0x1c, 0x00, 0xc0, 0x00, 0x00, - 0x04, 0x90, 0x24, 0x80, 0x00, 0x00, - 0x08, 0xa8, 0x45, 0x40, 0x00, 0x00, - 0x28, 0x29, 0x41, 0x40, 0x00, 0x00, - 0x84, 0x54, 0x22, 0x80, 0x00, 0x00, - 0x60, 0x43, 0x02, 0x00, 0x00, 0x00, - 0x05, 0x48, 0x2a, 0x40, 0x00, 0x00, - 0x02, 0x98, 0x14, 0xc0, 0x00, 0x00, - 0x01, 0x30, 0x09, 0x80, 0x00, 0x00, - 0x48, 0x12, 0x40, 0x80, 0x00, 0x00, - 0x24, 0x81, 0x24, 0x00, 0x00, 0x00, - 0x94, 0x04, 0xa0, 0x00, 0x00, 0x00, - 0x8a, 0x04, 0x50, 0x00, 0x00, 0x00, - 0x11, 0x80, 0x8c, 0x00, 0x00, 0x00, - 0x52, 0x22, 0x91, 0x00, 0x00, 0x00, - 0xf9, 0x13, 0x51, 0x80, 0x00, 0x00 -}; - -const uint8_t kMaskRandom26_3[18] = { - 0x99, 0xb4, 0xcd, 0x80, 0x00, 0x00, - 0x46, 0xda, 0x36, 0xc0, 0x00, 0x00, - 0x37, 0x29, 0xb9, 0x40, 0x00, 0x00 -}; - -const uint8_t kMaskRandom26_4[24] = { - 0x49, 0xb2, 0x4d, 0x80, 0x00, 0x00, - 0x26, 0xd1, 0x36, 0x80, 0x00, 0x00, - 0x85, 0x6c, 0x2b, 0x40, 0x00, 0x00, - 0x52, 0x5a, 0x92, 0xc0, 0x00, 0x00 -}; - -const uint8_t kMaskRandom26_5[30] = { - 0x51, 0x32, 0x89, 0x80, 0x00, 0x00, - 0x66, 0x43, 0x32, 0x00, 0x00, 0x00, - 0x0c, 0x68, 0x63, 0x40, 0x00, 0x00, - 0xa1, 0xc5, 0x0e, 0x00, 0x00, 0x00, - 0x22, 0x99, 0x14, 0xc0, 0x00, 0x00 -}; - -const uint8_t kMaskRandom26_6[36] = { - 0xd1, 0x26, 0x89, 0x00, 0x00, 0x00, - 0x46, 0xd2, 0x36, 0x80, 0x00, 0x00, - 0x15, 0x48, 0xaa, 0x40, 0x00, 0x00, - 0x21, 0x71, 0x0b, 0x80, 0x00, 0x00, - 0x28, 0xc9, 0x46, 0x40, 0x00, 0x00, - 0xaa, 0x25, 0x51, 0x00, 0x00, 0x00 -}; - -const uint8_t kMaskRandom26_7[42] = { - 0x59, 0x22, 0xc9, 0x00, 0x00, 0x00, - 0x26, 0x51, 0x32, 0x80, 0x00, 0x00, - 0xb1, 0x45, 0x8a, 0x00, 0x00, 0x00, - 0x2b, 0x09, 0x58, 0x40, 0x00, 0x00, - 0x14, 0xc8, 0xa6, 0x40, 0x00, 0x00, - 0xc8, 0x8e, 0x44, 0x40, 0x00, 0x00, - 0x84, 0xb4, 0x25, 0x80, 0x00, 0x00 -}; - -const uint8_t kMaskRandom26_8[48] = { - 0x80, 0xac, 0x05, 0x40, 0x00, 0x00, - 0x30, 0x91, 0x84, 0x80, 0x00, 0x00, - 0x16, 0x08, 0xb0, 0x40, 0x00, 0x00, - 0x03, 0x30, 0x19, 0x80, 0x00, 0x00, - 0x44, 0x62, 0x23, 0x00, 0x00, 0x00, - 0x08, 0x18, 0x40, 0xc0, 0x00, 0x00, - 0xd8, 0x06, 0xc0, 0x00, 0x00, 0x00, - 0xa1, 0x45, 0x0a, 0x00, 0x00, 0x00 -}; - -const uint8_t kMaskRandom26_9[54] = { - 0x59, 0x22, 0xc9, 0x00, 0x00, 0x00, - 0x66, 0x43, 0x32, 0x00, 0x00, 0x00, - 0x14, 0x40, 0xa2, 0x00, 0x00, 0x00, - 0x21, 0x49, 0x0a, 0x40, 0x00, 0x00, - 0x02, 0xc8, 0x16, 0x40, 0x00, 0x00, - 0x94, 0x14, 0xa0, 0x80, 0x00, 0x00, - 0x80, 0xac, 0x05, 0x40, 0x00, 0x00, - 0x0a, 0x90, 0x54, 0x80, 0x00, 0x00, - 0x40, 0x1a, 0x00, 0xc0, 0x00, 0x00 -}; - -const uint8_t kMaskRandom27_1[6] = { - 0xff, 0xff, 0xff, 0xe0, 0x00, 0x00 -}; - -const uint8_t kMaskRandom27_10[60] = { - 0xd1, 0x06, 0x06, 0xa0, 0x00, 0x00, - 0x44, 0x50, 0xea, 0x00, 0x00, 0x00, - 0x10, 0x9e, 0xa0, 0x40, 0x00, 0x00, - 0xa0, 0x50, 0x13, 0x00, 0x00, 0x00, - 0x4a, 0x08, 0x21, 0x40, 0x00, 0x00, - 0x40, 0x31, 0x04, 0xc0, 0x00, 0x00, - 0x80, 0x2a, 0x02, 0x20, 0x00, 0x00, - 0x0c, 0x90, 0x44, 0x20, 0x00, 0x00, - 0x05, 0x8b, 0x40, 0x00, 0x00, 0x00, - 0x62, 0x21, 0x18, 0x80, 0x00, 0x00 -}; - -const uint8_t kMaskRandom27_11[66] = { - 0x51, 0x23, 0x16, 0x80, 0x00, 0x00, - 0x22, 0x11, 0xa9, 0x00, 0x00, 0x00, - 0x13, 0x40, 0xa0, 0xa0, 0x00, 0x00, - 0x25, 0x06, 0x28, 0x40, 0x00, 0x00, - 0x18, 0x19, 0x10, 0x60, 0x00, 0x00, - 0x0a, 0x24, 0x45, 0xc0, 0x00, 0x00, - 0x88, 0x8a, 0x12, 0xa0, 0x00, 0x00, - 0x06, 0x81, 0x45, 0x20, 0x00, 0x00, - 0xe0, 0x24, 0xa1, 0x00, 0x00, 0x00, - 0x84, 0x40, 0xd8, 0x20, 0x00, 0x00, - 0x44, 0x19, 0x16, 0x00, 0x00, 0x00 -}; - -const uint8_t kMaskRandom27_12[72] = { - 0x28, 0x2c, 0x08, 0x20, 0x00, 0x00, - 0x84, 0x52, 0x03, 0x40, 0x00, 0x00, - 0x60, 0x44, 0x81, 0x20, 0x00, 0x00, - 0x05, 0x49, 0x41, 0x40, 0x00, 0x00, - 0x02, 0x9a, 0x90, 0x80, 0x00, 0x00, - 0x01, 0x32, 0x0c, 0x40, 0x00, 0x00, - 0x48, 0x10, 0x49, 0x80, 0x00, 0x00, - 0x24, 0x82, 0x42, 0x20, 0x00, 0x00, - 0x94, 0x00, 0x22, 0x20, 0x00, 0x00, - 0x8a, 0x00, 0x74, 0x00, 0x00, 0x00, - 0x11, 0x85, 0x2c, 0x80, 0x00, 0x00, - 0x52, 0x20, 0x90, 0x60, 0x00, 0x00 -}; - -const uint8_t kMaskRandom27_13[78] = { - 0x51, 0x23, 0x12, 0xa0, 0x00, 0x00, - 0x66, 0x41, 0xa3, 0x00, 0x00, 0x00, - 0x05, 0x4a, 0x40, 0x20, 0x00, 0x00, - 0x81, 0x20, 0x05, 0x60, 0x00, 0x00, - 0x94, 0x01, 0x40, 0x40, 0x00, 0x00, - 0x30, 0x84, 0x08, 0x40, 0x00, 0x00, - 0x21, 0x11, 0x18, 0x20, 0x00, 0x00, - 0x03, 0xc0, 0x34, 0x00, 0x00, 0x00, - 0xe8, 0x04, 0x00, 0xa0, 0x00, 0x00, - 0x0a, 0x11, 0x80, 0x80, 0x00, 0x00, - 0x80, 0x1c, 0x61, 0x00, 0x00, 0x00, - 0x04, 0x92, 0xa0, 0x00, 0x00, 0x00, - 0x08, 0xac, 0x06, 0x00, 0x00, 0x00 -}; - -const uint8_t kMaskRandom27_14[84] = { - 0x59, 0x23, 0x12, 0xa0, 0x00, 0x00, - 0x26, 0x55, 0xc9, 0x00, 0x00, 0x00, - 0xb1, 0x40, 0xc5, 0xa0, 0x00, 0x00, - 0x2b, 0x0a, 0xa4, 0xc0, 0x00, 0x00, - 0x14, 0xc8, 0x33, 0x60, 0x00, 0x00, - 0xc8, 0x8c, 0x2a, 0xa0, 0x00, 0x00, - 0x84, 0xb5, 0x54, 0x40, 0x00, 0x00, - 0xd1, 0x22, 0x52, 0xa0, 0x00, 0x00, - 0x46, 0xd4, 0xaa, 0x40, 0x00, 0x00, - 0x15, 0x48, 0xa5, 0xa0, 0x00, 0x00, - 0x21, 0x72, 0x8d, 0x40, 0x00, 0x00, - 0x28, 0xc9, 0x13, 0x60, 0x00, 0x00, - 0xaa, 0x24, 0x44, 0x60, 0x00, 0x00, - 0x0a, 0xe7, 0x3b, 0x20, 0x00, 0x00 -}; - -const uint8_t kMaskRandom27_15[90] = { - 0x59, 0x23, 0x12, 0xa0, 0x00, 0x00, - 0x26, 0x55, 0xc9, 0x00, 0x00, 0x00, - 0xb1, 0x40, 0xc5, 0xa0, 0x00, 0x00, - 0x2b, 0x0a, 0xa4, 0xc0, 0x00, 0x00, - 0x14, 0xc8, 0x33, 0x60, 0x00, 0x00, - 0xc8, 0x8c, 0x2a, 0xa0, 0x00, 0x00, - 0x84, 0xb5, 0x54, 0x40, 0x00, 0x00, - 0x80, 0xae, 0x00, 0xa0, 0x00, 0x00, - 0x30, 0x92, 0x0b, 0x00, 0x00, 0x00, - 0x16, 0x0c, 0x41, 0x80, 0x00, 0x00, - 0x03, 0x31, 0x05, 0x20, 0x00, 0x00, - 0x44, 0x60, 0x52, 0x40, 0x00, 0x00, - 0x08, 0x18, 0x24, 0xc0, 0x00, 0x00, - 0xd8, 0x04, 0xa2, 0x00, 0x00, 0x00, - 0xa1, 0x43, 0x90, 0x00, 0x00, 0x00 -}; - -const uint8_t kMaskRandom27_16[96] = { - 0x80, 0xae, 0x00, 0xa0, 0x00, 0x00, - 0x30, 0x92, 0x0b, 0x00, 0x00, 0x00, - 0x16, 0x0c, 0x41, 0x80, 0x00, 0x00, - 0x03, 0x31, 0x05, 0x20, 0x00, 0x00, - 0x44, 0x60, 0x52, 0x40, 0x00, 0x00, - 0x08, 0x18, 0x24, 0xc0, 0x00, 0x00, - 0xd8, 0x04, 0xa2, 0x00, 0x00, 0x00, - 0xa1, 0x43, 0x90, 0x00, 0x00, 0x00, - 0x59, 0x23, 0x12, 0xa0, 0x00, 0x00, - 0x26, 0x55, 0xc9, 0x00, 0x00, 0x00, - 0xb1, 0x40, 0xc5, 0xa0, 0x00, 0x00, - 0x2b, 0x0a, 0xa4, 0xc0, 0x00, 0x00, - 0x14, 0xc8, 0x33, 0x60, 0x00, 0x00, - 0xc8, 0x8c, 0x2a, 0xa0, 0x00, 0x00, - 0x84, 0xb5, 0x54, 0x40, 0x00, 0x00, - 0x01, 0x50, 0xfb, 0xe0, 0x00, 0x00 -}; - -const uint8_t kMaskRandom27_17[102] = { - 0x80, 0xae, 0x00, 0xa0, 0x00, 0x00, - 0x30, 0x92, 0x0b, 0x00, 0x00, 0x00, - 0x16, 0x0c, 0x41, 0x80, 0x00, 0x00, - 0x03, 0x31, 0x05, 0x20, 0x00, 0x00, - 0x44, 0x60, 0x52, 0x40, 0x00, 0x00, - 0x08, 0x18, 0x24, 0xc0, 0x00, 0x00, - 0xd8, 0x04, 0xa2, 0x00, 0x00, 0x00, - 0xa1, 0x43, 0x90, 0x00, 0x00, 0x00, - 0x59, 0x25, 0x12, 0xa0, 0x00, 0x00, - 0x66, 0x41, 0xa3, 0x00, 0x00, 0x00, - 0x14, 0x42, 0x51, 0x20, 0x00, 0x00, - 0x21, 0x49, 0x05, 0x40, 0x00, 0x00, - 0x02, 0xc8, 0x8c, 0x20, 0x00, 0x00, - 0x94, 0x12, 0x48, 0x40, 0x00, 0x00, - 0x80, 0xac, 0x30, 0x60, 0x00, 0x00, - 0x0a, 0x91, 0x06, 0xa0, 0x00, 0x00, - 0x40, 0x1c, 0x42, 0x40, 0x00, 0x00 -}; - -const uint8_t kMaskRandom27_18[108] = { - 0x59, 0x25, 0x12, 0xa0, 0x00, 0x00, - 0x66, 0x41, 0xa3, 0x00, 0x00, 0x00, - 0x14, 0x42, 0x51, 0x20, 0x00, 0x00, - 0x21, 0x49, 0x05, 0x40, 0x00, 0x00, - 0x02, 0xc8, 0x8c, 0x20, 0x00, 0x00, - 0x94, 0x12, 0x48, 0x40, 0x00, 0x00, - 0x80, 0xac, 0x30, 0x60, 0x00, 0x00, - 0x0a, 0x91, 0x06, 0xa0, 0x00, 0x00, - 0x40, 0x1c, 0x42, 0x40, 0x00, 0x00, - 0x80, 0xae, 0x00, 0xa0, 0x00, 0x00, - 0x30, 0x92, 0x0b, 0x00, 0x00, 0x00, - 0x16, 0x0c, 0x41, 0x80, 0x00, 0x00, - 0x03, 0x31, 0x05, 0x20, 0x00, 0x00, - 0x44, 0x60, 0x52, 0x40, 0x00, 0x00, - 0x08, 0x18, 0x24, 0xc0, 0x00, 0x00, - 0xd8, 0x04, 0xa2, 0x00, 0x00, 0x00, - 0xa1, 0x43, 0x90, 0x00, 0x00, 0x00, - 0x53, 0xc3, 0x33, 0x80, 0x00, 0x00 -}; - -const uint8_t kMaskRandom27_19[114] = { - 0x59, 0x25, 0x12, 0xa0, 0x00, 0x00, - 0x66, 0x41, 0xa3, 0x00, 0x00, 0x00, - 0x14, 0x42, 0x51, 0x20, 0x00, 0x00, - 0x21, 0x49, 0x05, 0x40, 0x00, 0x00, - 0x02, 0xc8, 0x8c, 0x20, 0x00, 0x00, - 0x94, 0x12, 0x48, 0x40, 0x00, 0x00, - 0x80, 0xac, 0x30, 0x60, 0x00, 0x00, - 0x0a, 0x91, 0x06, 0xa0, 0x00, 0x00, - 0x40, 0x1c, 0x42, 0x40, 0x00, 0x00, - 0xd1, 0x06, 0x06, 0xa0, 0x00, 0x00, - 0x44, 0x50, 0xea, 0x00, 0x00, 0x00, - 0x10, 0x9e, 0xa0, 0x40, 0x00, 0x00, - 0xa0, 0x50, 0x13, 0x00, 0x00, 0x00, - 0x4a, 0x08, 0x21, 0x40, 0x00, 0x00, - 0x40, 0x31, 0x04, 0xc0, 0x00, 0x00, - 0x80, 0x2a, 0x02, 0x20, 0x00, 0x00, - 0x0c, 0x90, 0x44, 0x20, 0x00, 0x00, - 0x05, 0x8b, 0x40, 0x00, 0x00, 0x00, - 0x62, 0x21, 0x18, 0x80, 0x00, 0x00 -}; - -const uint8_t kMaskRandom27_2[12] = { - 0xec, 0xc7, 0x67, 0x40, 0x00, 0x00, - 0x1b, 0x39, 0xdc, 0xe0, 0x00, 0x00 -}; - -const uint8_t kMaskRandom27_20[120] = { - 0xd1, 0x06, 0x06, 0xa0, 0x00, 0x00, - 0x44, 0x50, 0xea, 0x00, 0x00, 0x00, - 0x10, 0x9e, 0xa0, 0x40, 0x00, 0x00, - 0xa0, 0x50, 0x13, 0x00, 0x00, 0x00, - 0x4a, 0x08, 0x21, 0x40, 0x00, 0x00, - 0x40, 0x31, 0x04, 0xc0, 0x00, 0x00, - 0x80, 0x2a, 0x02, 0x20, 0x00, 0x00, - 0x0c, 0x90, 0x44, 0x20, 0x00, 0x00, - 0x05, 0x8b, 0x40, 0x00, 0x00, 0x00, - 0x62, 0x21, 0x18, 0x80, 0x00, 0x00, - 0x59, 0x25, 0x12, 0xa0, 0x00, 0x00, - 0x66, 0x41, 0xa3, 0x00, 0x00, 0x00, - 0x14, 0x42, 0x51, 0x20, 0x00, 0x00, - 0x21, 0x49, 0x05, 0x40, 0x00, 0x00, - 0x02, 0xc8, 0x8c, 0x20, 0x00, 0x00, - 0x94, 0x12, 0x48, 0x40, 0x00, 0x00, - 0x80, 0xac, 0x30, 0x60, 0x00, 0x00, - 0x0a, 0x91, 0x06, 0xa0, 0x00, 0x00, - 0x40, 0x1c, 0x42, 0x40, 0x00, 0x00, - 0xcb, 0xff, 0x6f, 0xc0, 0x00, 0x00 -}; - -const uint8_t kMaskRandom27_21[126] = { - 0xd1, 0x06, 0x06, 0xa0, 0x00, 0x00, - 0x44, 0x50, 0xea, 0x00, 0x00, 0x00, - 0x10, 0x9e, 0xa0, 0x40, 0x00, 0x00, - 0xa0, 0x50, 0x13, 0x00, 0x00, 0x00, - 0x4a, 0x08, 0x21, 0x40, 0x00, 0x00, - 0x40, 0x31, 0x04, 0xc0, 0x00, 0x00, - 0x80, 0x2a, 0x02, 0x20, 0x00, 0x00, - 0x0c, 0x90, 0x44, 0x20, 0x00, 0x00, - 0x05, 0x8b, 0x40, 0x00, 0x00, 0x00, - 0x62, 0x21, 0x18, 0x80, 0x00, 0x00, - 0x51, 0x23, 0x16, 0x80, 0x00, 0x00, - 0x22, 0x11, 0xa9, 0x00, 0x00, 0x00, - 0x13, 0x40, 0xa0, 0xa0, 0x00, 0x00, - 0x25, 0x06, 0x28, 0x40, 0x00, 0x00, - 0x18, 0x19, 0x10, 0x60, 0x00, 0x00, - 0x0a, 0x24, 0x45, 0xc0, 0x00, 0x00, - 0x88, 0x8a, 0x12, 0xa0, 0x00, 0x00, - 0x06, 0x81, 0x45, 0x20, 0x00, 0x00, - 0xe0, 0x24, 0xa1, 0x00, 0x00, 0x00, - 0x84, 0x40, 0xd8, 0x20, 0x00, 0x00, - 0x44, 0x19, 0x16, 0x00, 0x00, 0x00 -}; - -const uint8_t kMaskRandom27_22[132] = { - 0x51, 0x23, 0x16, 0x80, 0x00, 0x00, - 0x22, 0x11, 0xa9, 0x00, 0x00, 0x00, - 0x13, 0x40, 0xa0, 0xa0, 0x00, 0x00, - 0x25, 0x06, 0x28, 0x40, 0x00, 0x00, - 0x18, 0x19, 0x10, 0x60, 0x00, 0x00, - 0x0a, 0x24, 0x45, 0xc0, 0x00, 0x00, - 0x88, 0x8a, 0x12, 0xa0, 0x00, 0x00, - 0x06, 0x81, 0x45, 0x20, 0x00, 0x00, - 0xe0, 0x24, 0xa1, 0x00, 0x00, 0x00, - 0x84, 0x40, 0xd8, 0x20, 0x00, 0x00, - 0x44, 0x19, 0x16, 0x00, 0x00, 0x00, - 0xd1, 0x06, 0x06, 0xa0, 0x00, 0x00, - 0x44, 0x50, 0xea, 0x00, 0x00, 0x00, - 0x10, 0x9e, 0xa0, 0x40, 0x00, 0x00, - 0xa0, 0x50, 0x13, 0x00, 0x00, 0x00, - 0x4a, 0x08, 0x21, 0x40, 0x00, 0x00, - 0x40, 0x31, 0x04, 0xc0, 0x00, 0x00, - 0x80, 0x2a, 0x02, 0x20, 0x00, 0x00, - 0x0c, 0x90, 0x44, 0x20, 0x00, 0x00, - 0x05, 0x8b, 0x40, 0x00, 0x00, 0x00, - 0x62, 0x21, 0x18, 0x80, 0x00, 0x00, - 0xf5, 0x2d, 0x52, 0x40, 0x00, 0x00 -}; - -const uint8_t kMaskRandom27_23[138] = { - 0x51, 0x23, 0x16, 0x80, 0x00, 0x00, - 0x22, 0x11, 0xa9, 0x00, 0x00, 0x00, - 0x13, 0x40, 0xa0, 0xa0, 0x00, 0x00, - 0x25, 0x06, 0x28, 0x40, 0x00, 0x00, - 0x18, 0x19, 0x10, 0x60, 0x00, 0x00, - 0x0a, 0x24, 0x45, 0xc0, 0x00, 0x00, - 0x88, 0x8a, 0x12, 0xa0, 0x00, 0x00, - 0x06, 0x81, 0x45, 0x20, 0x00, 0x00, - 0xe0, 0x24, 0xa1, 0x00, 0x00, 0x00, - 0x84, 0x40, 0xd8, 0x20, 0x00, 0x00, - 0x44, 0x19, 0x16, 0x00, 0x00, 0x00, - 0x28, 0x2c, 0x08, 0x20, 0x00, 0x00, - 0x84, 0x52, 0x03, 0x40, 0x00, 0x00, - 0x60, 0x44, 0x81, 0x20, 0x00, 0x00, - 0x05, 0x49, 0x41, 0x40, 0x00, 0x00, - 0x02, 0x9a, 0x90, 0x80, 0x00, 0x00, - 0x01, 0x32, 0x0c, 0x40, 0x00, 0x00, - 0x48, 0x10, 0x49, 0x80, 0x00, 0x00, - 0x24, 0x82, 0x42, 0x20, 0x00, 0x00, - 0x94, 0x00, 0x22, 0x20, 0x00, 0x00, - 0x8a, 0x00, 0x74, 0x00, 0x00, 0x00, - 0x11, 0x85, 0x2c, 0x80, 0x00, 0x00, - 0x52, 0x20, 0x90, 0x60, 0x00, 0x00 -}; - -const uint8_t kMaskRandom27_24[144] = { - 0x28, 0x2c, 0x08, 0x20, 0x00, 0x00, - 0x84, 0x52, 0x03, 0x40, 0x00, 0x00, - 0x60, 0x44, 0x81, 0x20, 0x00, 0x00, - 0x05, 0x49, 0x41, 0x40, 0x00, 0x00, - 0x02, 0x9a, 0x90, 0x80, 0x00, 0x00, - 0x01, 0x32, 0x0c, 0x40, 0x00, 0x00, - 0x48, 0x10, 0x49, 0x80, 0x00, 0x00, - 0x24, 0x82, 0x42, 0x20, 0x00, 0x00, - 0x94, 0x00, 0x22, 0x20, 0x00, 0x00, - 0x8a, 0x00, 0x74, 0x00, 0x00, 0x00, - 0x11, 0x85, 0x2c, 0x80, 0x00, 0x00, - 0x52, 0x20, 0x90, 0x60, 0x00, 0x00, - 0x51, 0x23, 0x16, 0x80, 0x00, 0x00, - 0x22, 0x11, 0xa9, 0x00, 0x00, 0x00, - 0x13, 0x40, 0xa0, 0xa0, 0x00, 0x00, - 0x25, 0x06, 0x28, 0x40, 0x00, 0x00, - 0x18, 0x19, 0x10, 0x60, 0x00, 0x00, - 0x0a, 0x24, 0x45, 0xc0, 0x00, 0x00, - 0x88, 0x8a, 0x12, 0xa0, 0x00, 0x00, - 0x06, 0x81, 0x45, 0x20, 0x00, 0x00, - 0xe0, 0x24, 0xa1, 0x00, 0x00, 0x00, - 0x84, 0x40, 0xd8, 0x20, 0x00, 0x00, - 0x44, 0x19, 0x16, 0x00, 0x00, 0x00, - 0xa2, 0x85, 0xdb, 0xa0, 0x00, 0x00 -}; - -const uint8_t kMaskRandom27_25[150] = { - 0x28, 0x2c, 0x08, 0x20, 0x00, 0x00, - 0x84, 0x52, 0x03, 0x40, 0x00, 0x00, - 0x60, 0x44, 0x81, 0x20, 0x00, 0x00, - 0x05, 0x49, 0x41, 0x40, 0x00, 0x00, - 0x02, 0x9a, 0x90, 0x80, 0x00, 0x00, - 0x01, 0x32, 0x0c, 0x40, 0x00, 0x00, - 0x48, 0x10, 0x49, 0x80, 0x00, 0x00, - 0x24, 0x82, 0x42, 0x20, 0x00, 0x00, - 0x94, 0x00, 0x22, 0x20, 0x00, 0x00, - 0x8a, 0x00, 0x74, 0x00, 0x00, 0x00, - 0x11, 0x85, 0x2c, 0x80, 0x00, 0x00, - 0x52, 0x20, 0x90, 0x60, 0x00, 0x00, - 0x51, 0x23, 0x12, 0xa0, 0x00, 0x00, - 0x66, 0x41, 0xa3, 0x00, 0x00, 0x00, - 0x05, 0x4a, 0x40, 0x20, 0x00, 0x00, - 0x81, 0x20, 0x05, 0x60, 0x00, 0x00, - 0x94, 0x01, 0x40, 0x40, 0x00, 0x00, - 0x30, 0x84, 0x08, 0x40, 0x00, 0x00, - 0x21, 0x11, 0x18, 0x20, 0x00, 0x00, - 0x03, 0xc0, 0x34, 0x00, 0x00, 0x00, - 0xe8, 0x04, 0x00, 0xa0, 0x00, 0x00, - 0x0a, 0x11, 0x80, 0x80, 0x00, 0x00, - 0x80, 0x1c, 0x61, 0x00, 0x00, 0x00, - 0x04, 0x92, 0xa0, 0x00, 0x00, 0x00, - 0x08, 0xac, 0x06, 0x00, 0x00, 0x00 -}; - -const uint8_t kMaskRandom27_26[156] = { - 0x51, 0x23, 0x12, 0xa0, 0x00, 0x00, - 0x66, 0x41, 0xa3, 0x00, 0x00, 0x00, - 0x05, 0x4a, 0x40, 0x20, 0x00, 0x00, - 0x81, 0x20, 0x05, 0x60, 0x00, 0x00, - 0x94, 0x01, 0x40, 0x40, 0x00, 0x00, - 0x30, 0x84, 0x08, 0x40, 0x00, 0x00, - 0x21, 0x11, 0x18, 0x20, 0x00, 0x00, - 0x03, 0xc0, 0x34, 0x00, 0x00, 0x00, - 0xe8, 0x04, 0x00, 0xa0, 0x00, 0x00, - 0x0a, 0x11, 0x80, 0x80, 0x00, 0x00, - 0x80, 0x1c, 0x61, 0x00, 0x00, 0x00, - 0x04, 0x92, 0xa0, 0x00, 0x00, 0x00, - 0x08, 0xac, 0x06, 0x00, 0x00, 0x00, - 0x28, 0x2c, 0x08, 0x20, 0x00, 0x00, - 0x84, 0x52, 0x03, 0x40, 0x00, 0x00, - 0x60, 0x44, 0x81, 0x20, 0x00, 0x00, - 0x05, 0x49, 0x41, 0x40, 0x00, 0x00, - 0x02, 0x9a, 0x90, 0x80, 0x00, 0x00, - 0x01, 0x32, 0x0c, 0x40, 0x00, 0x00, - 0x48, 0x10, 0x49, 0x80, 0x00, 0x00, - 0x24, 0x82, 0x42, 0x20, 0x00, 0x00, - 0x94, 0x00, 0x22, 0x20, 0x00, 0x00, - 0x8a, 0x00, 0x74, 0x00, 0x00, 0x00, - 0x11, 0x85, 0x2c, 0x80, 0x00, 0x00, - 0x52, 0x20, 0x90, 0x60, 0x00, 0x00, - 0xcd, 0x41, 0xa2, 0x40, 0x00, 0x00 -}; - -const uint8_t kMaskRandom27_27[162] = { - 0x51, 0x23, 0x12, 0xa0, 0x00, 0x00, - 0x66, 0x41, 0xa3, 0x00, 0x00, 0x00, - 0x05, 0x4a, 0x40, 0x20, 0x00, 0x00, - 0x81, 0x20, 0x05, 0x60, 0x00, 0x00, - 0x94, 0x01, 0x40, 0x40, 0x00, 0x00, - 0x30, 0x84, 0x08, 0x40, 0x00, 0x00, - 0x21, 0x11, 0x18, 0x20, 0x00, 0x00, - 0x03, 0xc0, 0x34, 0x00, 0x00, 0x00, - 0xe8, 0x04, 0x00, 0xa0, 0x00, 0x00, - 0x0a, 0x11, 0x80, 0x80, 0x00, 0x00, - 0x80, 0x1c, 0x61, 0x00, 0x00, 0x00, - 0x04, 0x92, 0xa0, 0x00, 0x00, 0x00, - 0x08, 0xac, 0x06, 0x00, 0x00, 0x00, - 0x51, 0x22, 0x02, 0xa0, 0x00, 0x00, - 0x66, 0x40, 0xaa, 0x00, 0x00, 0x00, - 0x05, 0x4e, 0x00, 0x20, 0x00, 0x00, - 0x81, 0x21, 0x40, 0x80, 0x00, 0x00, - 0x94, 0x00, 0x28, 0x60, 0x00, 0x00, - 0x30, 0x83, 0x24, 0x00, 0x00, 0x00, - 0x21, 0x14, 0x0c, 0x00, 0x00, 0x00, - 0x03, 0xc0, 0x84, 0xc0, 0x00, 0x00, - 0xe8, 0x04, 0x21, 0x00, 0x00, 0x00, - 0x0a, 0x10, 0x91, 0x80, 0x00, 0x00, - 0x80, 0x1b, 0x10, 0x00, 0x00, 0x00, - 0x04, 0x91, 0x43, 0x00, 0x00, 0x00, - 0x08, 0xa8, 0x70, 0x40, 0x00, 0x00, - 0x9c, 0xc0, 0x84, 0x20, 0x00, 0x00 -}; - -const uint8_t kMaskRandom27_3[18] = { - 0x99, 0xb5, 0x66, 0xc0, 0x00, 0x00, - 0x46, 0xda, 0xab, 0x60, 0x00, 0x00, - 0x37, 0x29, 0x3d, 0xa0, 0x00, 0x00 -}; - -const uint8_t kMaskRandom27_4[24] = { - 0x49, 0xb1, 0x66, 0xc0, 0x00, 0x00, - 0x26, 0xd4, 0x9b, 0x40, 0x00, 0x00, - 0x85, 0x68, 0xd5, 0xa0, 0x00, 0x00, - 0x52, 0x5a, 0x39, 0x60, 0x00, 0x00 -}; - -const uint8_t kMaskRandom27_5[30] = { - 0x51, 0x33, 0x26, 0xc0, 0x00, 0x00, - 0x66, 0x45, 0x2b, 0x40, 0x00, 0x00, - 0x0c, 0x6a, 0x95, 0xa0, 0x00, 0x00, - 0xa1, 0xc0, 0xed, 0x40, 0x00, 0x00, - 0x22, 0x9c, 0xe2, 0xa0, 0x00, 0x00 -}; - -const uint8_t kMaskRandom27_6[36] = { - 0xd1, 0x22, 0x52, 0xa0, 0x00, 0x00, - 0x46, 0xd4, 0xaa, 0x40, 0x00, 0x00, - 0x15, 0x48, 0xa5, 0xa0, 0x00, 0x00, - 0x21, 0x72, 0x8d, 0x40, 0x00, 0x00, - 0x28, 0xc9, 0x13, 0x60, 0x00, 0x00, - 0xaa, 0x24, 0x44, 0x60, 0x00, 0x00 -}; - -const uint8_t kMaskRandom27_7[42] = { - 0x59, 0x23, 0x12, 0xa0, 0x00, 0x00, - 0x26, 0x55, 0xc9, 0x00, 0x00, 0x00, - 0xb1, 0x40, 0xc5, 0xa0, 0x00, 0x00, - 0x2b, 0x0a, 0xa4, 0xc0, 0x00, 0x00, - 0x14, 0xc8, 0x33, 0x60, 0x00, 0x00, - 0xc8, 0x8c, 0x2a, 0xa0, 0x00, 0x00, - 0x84, 0xb5, 0x54, 0x40, 0x00, 0x00 -}; - -const uint8_t kMaskRandom27_8[48] = { - 0x80, 0xae, 0x00, 0xa0, 0x00, 0x00, - 0x30, 0x92, 0x0b, 0x00, 0x00, 0x00, - 0x16, 0x0c, 0x41, 0x80, 0x00, 0x00, - 0x03, 0x31, 0x05, 0x20, 0x00, 0x00, - 0x44, 0x60, 0x52, 0x40, 0x00, 0x00, - 0x08, 0x18, 0x24, 0xc0, 0x00, 0x00, - 0xd8, 0x04, 0xa2, 0x00, 0x00, 0x00, - 0xa1, 0x43, 0x90, 0x00, 0x00, 0x00 -}; - -const uint8_t kMaskRandom27_9[54] = { - 0x59, 0x25, 0x12, 0xa0, 0x00, 0x00, - 0x66, 0x41, 0xa3, 0x00, 0x00, 0x00, - 0x14, 0x42, 0x51, 0x20, 0x00, 0x00, - 0x21, 0x49, 0x05, 0x40, 0x00, 0x00, - 0x02, 0xc8, 0x8c, 0x20, 0x00, 0x00, - 0x94, 0x12, 0x48, 0x40, 0x00, 0x00, - 0x80, 0xac, 0x30, 0x60, 0x00, 0x00, - 0x0a, 0x91, 0x06, 0xa0, 0x00, 0x00, - 0x40, 0x1c, 0x42, 0x40, 0x00, 0x00 -}; - -const uint8_t kMaskRandom28_1[6] = { - 0xff, 0xff, 0xff, 0xf0, 0x00, 0x00 -}; - -const uint8_t kMaskRandom28_10[60] = { - 0xc0, 0xd7, 0x03, 0x50, 0x00, 0x00, - 0x1d, 0x40, 0x75, 0x00, 0x00, 0x00, - 0xd4, 0x0b, 0x50, 0x20, 0x00, 0x00, - 0x02, 0x60, 0x09, 0x80, 0x00, 0x00, - 0x04, 0x28, 0x10, 0xa0, 0x00, 0x00, - 0x20, 0x98, 0x82, 0x60, 0x00, 0x00, - 0x40, 0x45, 0x01, 0x10, 0x00, 0x00, - 0x08, 0x84, 0x22, 0x10, 0x00, 0x00, - 0x68, 0x01, 0xa0, 0x00, 0x00, 0x00, - 0x23, 0x10, 0x8c, 0x40, 0x00, 0x00 -}; - -const uint8_t kMaskRandom28_11[66] = { - 0x62, 0xd1, 0x8b, 0x40, 0x00, 0x00, - 0x35, 0x20, 0xd4, 0x80, 0x00, 0x00, - 0x14, 0x14, 0x50, 0x50, 0x00, 0x00, - 0xc5, 0x0b, 0x14, 0x20, 0x00, 0x00, - 0x22, 0x0c, 0x88, 0x30, 0x00, 0x00, - 0x88, 0xba, 0x22, 0xe0, 0x00, 0x00, - 0x42, 0x55, 0x09, 0x50, 0x00, 0x00, - 0x28, 0xa4, 0xa2, 0x90, 0x00, 0x00, - 0x94, 0x22, 0x50, 0x80, 0x00, 0x00, - 0x1b, 0x04, 0x6c, 0x10, 0x00, 0x00, - 0x22, 0xc0, 0x8b, 0x00, 0x00, 0x00 -}; - -const uint8_t kMaskRandom28_12[72] = { - 0x81, 0x06, 0x04, 0x10, 0x00, 0x00, - 0x40, 0x69, 0x01, 0xa0, 0x00, 0x00, - 0x90, 0x26, 0x40, 0x90, 0x00, 0x00, - 0x28, 0x28, 0xa0, 0xa0, 0x00, 0x00, - 0x52, 0x11, 0x48, 0x40, 0x00, 0x00, - 0x41, 0x89, 0x06, 0x20, 0x00, 0x00, - 0x09, 0x30, 0x24, 0xc0, 0x00, 0x00, - 0x48, 0x45, 0x21, 0x10, 0x00, 0x00, - 0x04, 0x44, 0x11, 0x10, 0x00, 0x00, - 0x0e, 0x80, 0x3a, 0x00, 0x00, 0x00, - 0xa5, 0x92, 0x96, 0x40, 0x00, 0x00, - 0x12, 0x0c, 0x48, 0x30, 0x00, 0x00 -}; - -const uint8_t kMaskRandom28_13[78] = { - 0x62, 0x55, 0x89, 0x50, 0x00, 0x00, - 0x34, 0x60, 0xd1, 0x80, 0x00, 0x00, - 0x48, 0x05, 0x20, 0x10, 0x00, 0x00, - 0x00, 0xac, 0x02, 0xb0, 0x00, 0x00, - 0x28, 0x08, 0xa0, 0x20, 0x00, 0x00, - 0x81, 0x0a, 0x04, 0x20, 0x00, 0x00, - 0x23, 0x04, 0x8c, 0x10, 0x00, 0x00, - 0x06, 0x80, 0x1a, 0x00, 0x00, 0x00, - 0x80, 0x16, 0x00, 0x50, 0x00, 0x00, - 0x30, 0x10, 0xc0, 0x40, 0x00, 0x00, - 0x8c, 0x22, 0x30, 0x80, 0x00, 0x00, - 0x54, 0x01, 0x50, 0x00, 0x00, 0x00, - 0x80, 0xc2, 0x03, 0x00, 0x00, 0x00 -}; - -const uint8_t kMaskRandom28_14[84] = { - 0x40, 0x55, 0x01, 0x50, 0x00, 0x00, - 0x15, 0x40, 0x55, 0x00, 0x00, 0x00, - 0xc0, 0x07, 0x00, 0x10, 0x00, 0x00, - 0x28, 0x10, 0xa0, 0x40, 0x00, 0x00, - 0x05, 0x0c, 0x14, 0x30, 0x00, 0x00, - 0x64, 0x81, 0x92, 0x00, 0x00, 0x00, - 0x81, 0x82, 0x06, 0x00, 0x00, 0x00, - 0x10, 0x98, 0x42, 0x60, 0x00, 0x00, - 0x84, 0x22, 0x10, 0x80, 0x00, 0x00, - 0x12, 0x30, 0x48, 0xc0, 0x00, 0x00, - 0x62, 0x01, 0x88, 0x00, 0x00, 0x00, - 0x28, 0x60, 0xa1, 0x80, 0x00, 0x00, - 0x0e, 0x08, 0x38, 0x20, 0x00, 0x00, - 0x10, 0x84, 0x42, 0x10, 0x00, 0x00 -}; - -const uint8_t kMaskRandom28_15[90] = { - 0x62, 0x55, 0x89, 0x50, 0x00, 0x00, - 0xb9, 0x22, 0xe4, 0x80, 0x00, 0x00, - 0x18, 0xb4, 0x62, 0xd0, 0x00, 0x00, - 0x54, 0x99, 0x52, 0x60, 0x00, 0x00, - 0x06, 0x6c, 0x19, 0xb0, 0x00, 0x00, - 0x85, 0x56, 0x15, 0x50, 0x00, 0x00, - 0xaa, 0x8a, 0xaa, 0x20, 0x00, 0x00, - 0xc0, 0x17, 0x00, 0x50, 0x00, 0x00, - 0x41, 0x61, 0x05, 0x80, 0x00, 0x00, - 0x88, 0x32, 0x20, 0xc0, 0x00, 0x00, - 0x20, 0xa4, 0x82, 0x90, 0x00, 0x00, - 0x0a, 0x48, 0x29, 0x20, 0x00, 0x00, - 0x04, 0x98, 0x12, 0x60, 0x00, 0x00, - 0x94, 0x42, 0x51, 0x00, 0x00, 0x00, - 0x72, 0x01, 0xc8, 0x00, 0x00, 0x00 -}; - -const uint8_t kMaskRandom28_16[96] = { - 0xc0, 0x17, 0x00, 0x50, 0x00, 0x00, - 0x41, 0x61, 0x05, 0x80, 0x00, 0x00, - 0x88, 0x32, 0x20, 0xc0, 0x00, 0x00, - 0x20, 0xa4, 0x82, 0x90, 0x00, 0x00, - 0x0a, 0x48, 0x29, 0x20, 0x00, 0x00, - 0x04, 0x98, 0x12, 0x60, 0x00, 0x00, - 0x94, 0x42, 0x51, 0x00, 0x00, 0x00, - 0x72, 0x01, 0xc8, 0x00, 0x00, 0x00, - 0x62, 0x55, 0x89, 0x50, 0x00, 0x00, - 0xb9, 0x22, 0xe4, 0x80, 0x00, 0x00, - 0x18, 0xb4, 0x62, 0xd0, 0x00, 0x00, - 0x54, 0x99, 0x52, 0x60, 0x00, 0x00, - 0x06, 0x6c, 0x19, 0xb0, 0x00, 0x00, - 0x85, 0x56, 0x15, 0x50, 0x00, 0x00, - 0xaa, 0x8a, 0xaa, 0x20, 0x00, 0x00, - 0xed, 0x76, 0x36, 0x50, 0x00, 0x00 -}; - -const uint8_t kMaskRandom28_17[102] = { - 0xc0, 0x17, 0x00, 0x50, 0x00, 0x00, - 0x41, 0x61, 0x05, 0x80, 0x00, 0x00, - 0x88, 0x32, 0x20, 0xc0, 0x00, 0x00, - 0x20, 0xa4, 0x82, 0x90, 0x00, 0x00, - 0x0a, 0x48, 0x29, 0x20, 0x00, 0x00, - 0x04, 0x98, 0x12, 0x60, 0x00, 0x00, - 0x94, 0x42, 0x51, 0x00, 0x00, 0x00, - 0x72, 0x01, 0xc8, 0x00, 0x00, 0x00, - 0xa2, 0x56, 0x89, 0x50, 0x00, 0x00, - 0x34, 0x60, 0xd1, 0x80, 0x00, 0x00, - 0x4a, 0x25, 0x28, 0x90, 0x00, 0x00, - 0x20, 0xa8, 0x82, 0xa0, 0x00, 0x00, - 0x11, 0x84, 0x46, 0x10, 0x00, 0x00, - 0x49, 0x09, 0x24, 0x20, 0x00, 0x00, - 0x86, 0x0e, 0x18, 0x30, 0x00, 0x00, - 0x20, 0xd4, 0x83, 0x50, 0x00, 0x00, - 0x88, 0x4a, 0x21, 0x20, 0x00, 0x00 -}; - -const uint8_t kMaskRandom28_18[108] = { - 0xa2, 0x56, 0x89, 0x50, 0x00, 0x00, - 0x34, 0x60, 0xd1, 0x80, 0x00, 0x00, - 0x4a, 0x25, 0x28, 0x90, 0x00, 0x00, - 0x20, 0xa8, 0x82, 0xa0, 0x00, 0x00, - 0x11, 0x84, 0x46, 0x10, 0x00, 0x00, - 0x49, 0x09, 0x24, 0x20, 0x00, 0x00, - 0x86, 0x0e, 0x18, 0x30, 0x00, 0x00, - 0x20, 0xd4, 0x83, 0x50, 0x00, 0x00, - 0x88, 0x4a, 0x21, 0x20, 0x00, 0x00, - 0xc0, 0x17, 0x00, 0x50, 0x00, 0x00, - 0x41, 0x61, 0x05, 0x80, 0x00, 0x00, - 0x88, 0x32, 0x20, 0xc0, 0x00, 0x00, - 0x20, 0xa4, 0x82, 0x90, 0x00, 0x00, - 0x0a, 0x48, 0x29, 0x20, 0x00, 0x00, - 0x04, 0x98, 0x12, 0x60, 0x00, 0x00, - 0x94, 0x42, 0x51, 0x00, 0x00, 0x00, - 0x72, 0x01, 0xc8, 0x00, 0x00, 0x00, - 0x6e, 0x9f, 0x98, 0x10, 0x00, 0x00 -}; - -const uint8_t kMaskRandom28_19[114] = { - 0xa2, 0x56, 0x89, 0x50, 0x00, 0x00, - 0x34, 0x60, 0xd1, 0x80, 0x00, 0x00, - 0x4a, 0x25, 0x28, 0x90, 0x00, 0x00, - 0x20, 0xa8, 0x82, 0xa0, 0x00, 0x00, - 0x11, 0x84, 0x46, 0x10, 0x00, 0x00, - 0x49, 0x09, 0x24, 0x20, 0x00, 0x00, - 0x86, 0x0e, 0x18, 0x30, 0x00, 0x00, - 0x20, 0xd4, 0x83, 0x50, 0x00, 0x00, - 0x88, 0x4a, 0x21, 0x20, 0x00, 0x00, - 0xc0, 0xd7, 0x03, 0x50, 0x00, 0x00, - 0x1d, 0x40, 0x75, 0x00, 0x00, 0x00, - 0xd4, 0x0b, 0x50, 0x20, 0x00, 0x00, - 0x02, 0x60, 0x09, 0x80, 0x00, 0x00, - 0x04, 0x28, 0x10, 0xa0, 0x00, 0x00, - 0x20, 0x98, 0x82, 0x60, 0x00, 0x00, - 0x40, 0x45, 0x01, 0x10, 0x00, 0x00, - 0x08, 0x84, 0x22, 0x10, 0x00, 0x00, - 0x68, 0x01, 0xa0, 0x00, 0x00, 0x00, - 0x23, 0x10, 0x8c, 0x40, 0x00, 0x00 -}; - -const uint8_t kMaskRandom28_2[12] = { - 0xec, 0xeb, 0xb3, 0xa0, 0x00, 0x00, - 0x3b, 0x9c, 0xee, 0x70, 0x00, 0x00 -}; - -const uint8_t kMaskRandom28_20[120] = { - 0xc0, 0xd7, 0x03, 0x50, 0x00, 0x00, - 0x1d, 0x40, 0x75, 0x00, 0x00, 0x00, - 0xd4, 0x0b, 0x50, 0x20, 0x00, 0x00, - 0x02, 0x60, 0x09, 0x80, 0x00, 0x00, - 0x04, 0x28, 0x10, 0xa0, 0x00, 0x00, - 0x20, 0x98, 0x82, 0x60, 0x00, 0x00, - 0x40, 0x45, 0x01, 0x10, 0x00, 0x00, - 0x08, 0x84, 0x22, 0x10, 0x00, 0x00, - 0x68, 0x01, 0xa0, 0x00, 0x00, 0x00, - 0x23, 0x10, 0x8c, 0x40, 0x00, 0x00, - 0xa2, 0x56, 0x89, 0x50, 0x00, 0x00, - 0x34, 0x60, 0xd1, 0x80, 0x00, 0x00, - 0x4a, 0x25, 0x28, 0x90, 0x00, 0x00, - 0x20, 0xa8, 0x82, 0xa0, 0x00, 0x00, - 0x11, 0x84, 0x46, 0x10, 0x00, 0x00, - 0x49, 0x09, 0x24, 0x20, 0x00, 0x00, - 0x86, 0x0e, 0x18, 0x30, 0x00, 0x00, - 0x20, 0xd4, 0x83, 0x50, 0x00, 0x00, - 0x88, 0x4a, 0x21, 0x20, 0x00, 0x00, - 0xea, 0x1b, 0x3a, 0x10, 0x00, 0x00 -}; - -const uint8_t kMaskRandom28_21[126] = { - 0xc0, 0xd7, 0x03, 0x50, 0x00, 0x00, - 0x1d, 0x40, 0x75, 0x00, 0x00, 0x00, - 0xd4, 0x0b, 0x50, 0x20, 0x00, 0x00, - 0x02, 0x60, 0x09, 0x80, 0x00, 0x00, - 0x04, 0x28, 0x10, 0xa0, 0x00, 0x00, - 0x20, 0x98, 0x82, 0x60, 0x00, 0x00, - 0x40, 0x45, 0x01, 0x10, 0x00, 0x00, - 0x08, 0x84, 0x22, 0x10, 0x00, 0x00, - 0x68, 0x01, 0xa0, 0x00, 0x00, 0x00, - 0x23, 0x10, 0x8c, 0x40, 0x00, 0x00, - 0x62, 0xd1, 0x8b, 0x40, 0x00, 0x00, - 0x35, 0x20, 0xd4, 0x80, 0x00, 0x00, - 0x14, 0x14, 0x50, 0x50, 0x00, 0x00, - 0xc5, 0x0b, 0x14, 0x20, 0x00, 0x00, - 0x22, 0x0c, 0x88, 0x30, 0x00, 0x00, - 0x88, 0xba, 0x22, 0xe0, 0x00, 0x00, - 0x42, 0x55, 0x09, 0x50, 0x00, 0x00, - 0x28, 0xa4, 0xa2, 0x90, 0x00, 0x00, - 0x94, 0x22, 0x50, 0x80, 0x00, 0x00, - 0x1b, 0x04, 0x6c, 0x10, 0x00, 0x00, - 0x22, 0xc0, 0x8b, 0x00, 0x00, 0x00 -}; - -const uint8_t kMaskRandom28_22[132] = { - 0x62, 0xd1, 0x8b, 0x40, 0x00, 0x00, - 0x35, 0x20, 0xd4, 0x80, 0x00, 0x00, - 0x14, 0x14, 0x50, 0x50, 0x00, 0x00, - 0xc5, 0x0b, 0x14, 0x20, 0x00, 0x00, - 0x22, 0x0c, 0x88, 0x30, 0x00, 0x00, - 0x88, 0xba, 0x22, 0xe0, 0x00, 0x00, - 0x42, 0x55, 0x09, 0x50, 0x00, 0x00, - 0x28, 0xa4, 0xa2, 0x90, 0x00, 0x00, - 0x94, 0x22, 0x50, 0x80, 0x00, 0x00, - 0x1b, 0x04, 0x6c, 0x10, 0x00, 0x00, - 0x22, 0xc0, 0x8b, 0x00, 0x00, 0x00, - 0xc0, 0xd7, 0x03, 0x50, 0x00, 0x00, - 0x1d, 0x40, 0x75, 0x00, 0x00, 0x00, - 0xd4, 0x0b, 0x50, 0x20, 0x00, 0x00, - 0x02, 0x60, 0x09, 0x80, 0x00, 0x00, - 0x04, 0x28, 0x10, 0xa0, 0x00, 0x00, - 0x20, 0x98, 0x82, 0x60, 0x00, 0x00, - 0x40, 0x45, 0x01, 0x10, 0x00, 0x00, - 0x08, 0x84, 0x22, 0x10, 0x00, 0x00, - 0x68, 0x01, 0xa0, 0x00, 0x00, 0x00, - 0x23, 0x10, 0x8c, 0x40, 0x00, 0x00, - 0x45, 0x05, 0x10, 0x00, 0x00, 0x00 -}; - -const uint8_t kMaskRandom28_23[138] = { - 0x62, 0xd1, 0x8b, 0x40, 0x00, 0x00, - 0x35, 0x20, 0xd4, 0x80, 0x00, 0x00, - 0x14, 0x14, 0x50, 0x50, 0x00, 0x00, - 0xc5, 0x0b, 0x14, 0x20, 0x00, 0x00, - 0x22, 0x0c, 0x88, 0x30, 0x00, 0x00, - 0x88, 0xba, 0x22, 0xe0, 0x00, 0x00, - 0x42, 0x55, 0x09, 0x50, 0x00, 0x00, - 0x28, 0xa4, 0xa2, 0x90, 0x00, 0x00, - 0x94, 0x22, 0x50, 0x80, 0x00, 0x00, - 0x1b, 0x04, 0x6c, 0x10, 0x00, 0x00, - 0x22, 0xc0, 0x8b, 0x00, 0x00, 0x00, - 0x81, 0x06, 0x04, 0x10, 0x00, 0x00, - 0x40, 0x69, 0x01, 0xa0, 0x00, 0x00, - 0x90, 0x26, 0x40, 0x90, 0x00, 0x00, - 0x28, 0x28, 0xa0, 0xa0, 0x00, 0x00, - 0x52, 0x11, 0x48, 0x40, 0x00, 0x00, - 0x41, 0x89, 0x06, 0x20, 0x00, 0x00, - 0x09, 0x30, 0x24, 0xc0, 0x00, 0x00, - 0x48, 0x45, 0x21, 0x10, 0x00, 0x00, - 0x04, 0x44, 0x11, 0x10, 0x00, 0x00, - 0x0e, 0x80, 0x3a, 0x00, 0x00, 0x00, - 0xa5, 0x92, 0x96, 0x40, 0x00, 0x00, - 0x12, 0x0c, 0x48, 0x30, 0x00, 0x00 -}; - -const uint8_t kMaskRandom28_24[144] = { - 0x81, 0x06, 0x04, 0x10, 0x00, 0x00, - 0x40, 0x69, 0x01, 0xa0, 0x00, 0x00, - 0x90, 0x26, 0x40, 0x90, 0x00, 0x00, - 0x28, 0x28, 0xa0, 0xa0, 0x00, 0x00, - 0x52, 0x11, 0x48, 0x40, 0x00, 0x00, - 0x41, 0x89, 0x06, 0x20, 0x00, 0x00, - 0x09, 0x30, 0x24, 0xc0, 0x00, 0x00, - 0x48, 0x45, 0x21, 0x10, 0x00, 0x00, - 0x04, 0x44, 0x11, 0x10, 0x00, 0x00, - 0x0e, 0x80, 0x3a, 0x00, 0x00, 0x00, - 0xa5, 0x92, 0x96, 0x40, 0x00, 0x00, - 0x12, 0x0c, 0x48, 0x30, 0x00, 0x00, - 0x62, 0xd1, 0x8b, 0x40, 0x00, 0x00, - 0x35, 0x20, 0xd4, 0x80, 0x00, 0x00, - 0x14, 0x14, 0x50, 0x50, 0x00, 0x00, - 0xc5, 0x0b, 0x14, 0x20, 0x00, 0x00, - 0x22, 0x0c, 0x88, 0x30, 0x00, 0x00, - 0x88, 0xba, 0x22, 0xe0, 0x00, 0x00, - 0x42, 0x55, 0x09, 0x50, 0x00, 0x00, - 0x28, 0xa4, 0xa2, 0x90, 0x00, 0x00, - 0x94, 0x22, 0x50, 0x80, 0x00, 0x00, - 0x1b, 0x04, 0x6c, 0x10, 0x00, 0x00, - 0x22, 0xc0, 0x8b, 0x00, 0x00, 0x00, - 0x6f, 0xd8, 0xee, 0xa0, 0x00, 0x00 -}; - -const uint8_t kMaskRandom28_25[150] = { - 0x81, 0x06, 0x04, 0x10, 0x00, 0x00, - 0x40, 0x69, 0x01, 0xa0, 0x00, 0x00, - 0x90, 0x26, 0x40, 0x90, 0x00, 0x00, - 0x28, 0x28, 0xa0, 0xa0, 0x00, 0x00, - 0x52, 0x11, 0x48, 0x40, 0x00, 0x00, - 0x41, 0x89, 0x06, 0x20, 0x00, 0x00, - 0x09, 0x30, 0x24, 0xc0, 0x00, 0x00, - 0x48, 0x45, 0x21, 0x10, 0x00, 0x00, - 0x04, 0x44, 0x11, 0x10, 0x00, 0x00, - 0x0e, 0x80, 0x3a, 0x00, 0x00, 0x00, - 0xa5, 0x92, 0x96, 0x40, 0x00, 0x00, - 0x12, 0x0c, 0x48, 0x30, 0x00, 0x00, - 0x62, 0x55, 0x89, 0x50, 0x00, 0x00, - 0x34, 0x60, 0xd1, 0x80, 0x00, 0x00, - 0x48, 0x05, 0x20, 0x10, 0x00, 0x00, - 0x00, 0xac, 0x02, 0xb0, 0x00, 0x00, - 0x28, 0x08, 0xa0, 0x20, 0x00, 0x00, - 0x81, 0x0a, 0x04, 0x20, 0x00, 0x00, - 0x23, 0x04, 0x8c, 0x10, 0x00, 0x00, - 0x06, 0x80, 0x1a, 0x00, 0x00, 0x00, - 0x80, 0x16, 0x00, 0x50, 0x00, 0x00, - 0x30, 0x10, 0xc0, 0x40, 0x00, 0x00, - 0x8c, 0x22, 0x30, 0x80, 0x00, 0x00, - 0x54, 0x01, 0x50, 0x00, 0x00, 0x00, - 0x80, 0xc2, 0x03, 0x00, 0x00, 0x00 -}; - -const uint8_t kMaskRandom28_26[156] = { - 0x62, 0x55, 0x89, 0x50, 0x00, 0x00, - 0x34, 0x60, 0xd1, 0x80, 0x00, 0x00, - 0x48, 0x05, 0x20, 0x10, 0x00, 0x00, - 0x00, 0xac, 0x02, 0xb0, 0x00, 0x00, - 0x28, 0x08, 0xa0, 0x20, 0x00, 0x00, - 0x81, 0x0a, 0x04, 0x20, 0x00, 0x00, - 0x23, 0x04, 0x8c, 0x10, 0x00, 0x00, - 0x06, 0x80, 0x1a, 0x00, 0x00, 0x00, - 0x80, 0x16, 0x00, 0x50, 0x00, 0x00, - 0x30, 0x10, 0xc0, 0x40, 0x00, 0x00, - 0x8c, 0x22, 0x30, 0x80, 0x00, 0x00, - 0x54, 0x01, 0x50, 0x00, 0x00, 0x00, - 0x80, 0xc2, 0x03, 0x00, 0x00, 0x00, - 0x81, 0x06, 0x04, 0x10, 0x00, 0x00, - 0x40, 0x69, 0x01, 0xa0, 0x00, 0x00, - 0x90, 0x26, 0x40, 0x90, 0x00, 0x00, - 0x28, 0x28, 0xa0, 0xa0, 0x00, 0x00, - 0x52, 0x11, 0x48, 0x40, 0x00, 0x00, - 0x41, 0x89, 0x06, 0x20, 0x00, 0x00, - 0x09, 0x30, 0x24, 0xc0, 0x00, 0x00, - 0x48, 0x45, 0x21, 0x10, 0x00, 0x00, - 0x04, 0x44, 0x11, 0x10, 0x00, 0x00, - 0x0e, 0x80, 0x3a, 0x00, 0x00, 0x00, - 0xa5, 0x92, 0x96, 0x40, 0x00, 0x00, - 0x12, 0x0c, 0x48, 0x30, 0x00, 0x00, - 0xf1, 0x64, 0xbe, 0x40, 0x00, 0x00 -}; - -const uint8_t kMaskRandom28_27[162] = { - 0x62, 0x55, 0x89, 0x50, 0x00, 0x00, - 0x34, 0x60, 0xd1, 0x80, 0x00, 0x00, - 0x48, 0x05, 0x20, 0x10, 0x00, 0x00, - 0x00, 0xac, 0x02, 0xb0, 0x00, 0x00, - 0x28, 0x08, 0xa0, 0x20, 0x00, 0x00, - 0x81, 0x0a, 0x04, 0x20, 0x00, 0x00, - 0x23, 0x04, 0x8c, 0x10, 0x00, 0x00, - 0x06, 0x80, 0x1a, 0x00, 0x00, 0x00, - 0x80, 0x16, 0x00, 0x50, 0x00, 0x00, - 0x30, 0x10, 0xc0, 0x40, 0x00, 0x00, - 0x8c, 0x22, 0x30, 0x80, 0x00, 0x00, - 0x54, 0x01, 0x50, 0x00, 0x00, 0x00, - 0x80, 0xc2, 0x03, 0x00, 0x00, 0x00, - 0x40, 0x55, 0x01, 0x50, 0x00, 0x00, - 0x15, 0x40, 0x55, 0x00, 0x00, 0x00, - 0xc0, 0x07, 0x00, 0x10, 0x00, 0x00, - 0x28, 0x10, 0xa0, 0x40, 0x00, 0x00, - 0x05, 0x0c, 0x14, 0x30, 0x00, 0x00, - 0x64, 0x81, 0x92, 0x00, 0x00, 0x00, - 0x81, 0x82, 0x06, 0x00, 0x00, 0x00, - 0x10, 0x98, 0x42, 0x60, 0x00, 0x00, - 0x84, 0x22, 0x10, 0x80, 0x00, 0x00, - 0x12, 0x30, 0x48, 0xc0, 0x00, 0x00, - 0x62, 0x01, 0x88, 0x00, 0x00, 0x00, - 0x28, 0x60, 0xa1, 0x80, 0x00, 0x00, - 0x0e, 0x08, 0x38, 0x20, 0x00, 0x00, - 0x10, 0x84, 0x42, 0x10, 0x00, 0x00 -}; - -const uint8_t kMaskRandom28_28[168] = { - 0x40, 0x55, 0x01, 0x50, 0x00, 0x00, - 0x15, 0x40, 0x55, 0x00, 0x00, 0x00, - 0xc0, 0x07, 0x00, 0x10, 0x00, 0x00, - 0x28, 0x10, 0xa0, 0x40, 0x00, 0x00, - 0x05, 0x0c, 0x14, 0x30, 0x00, 0x00, - 0x64, 0x81, 0x92, 0x00, 0x00, 0x00, - 0x81, 0x82, 0x06, 0x00, 0x00, 0x00, - 0x10, 0x98, 0x42, 0x60, 0x00, 0x00, - 0x84, 0x22, 0x10, 0x80, 0x00, 0x00, - 0x12, 0x30, 0x48, 0xc0, 0x00, 0x00, - 0x62, 0x01, 0x88, 0x00, 0x00, 0x00, - 0x28, 0x60, 0xa1, 0x80, 0x00, 0x00, - 0x0e, 0x08, 0x38, 0x20, 0x00, 0x00, - 0x10, 0x84, 0x42, 0x10, 0x00, 0x00, - 0x62, 0x55, 0x89, 0x50, 0x00, 0x00, - 0x34, 0x60, 0xd1, 0x80, 0x00, 0x00, - 0x48, 0x05, 0x20, 0x10, 0x00, 0x00, - 0x00, 0xac, 0x02, 0xb0, 0x00, 0x00, - 0x28, 0x08, 0xa0, 0x20, 0x00, 0x00, - 0x81, 0x0a, 0x04, 0x20, 0x00, 0x00, - 0x23, 0x04, 0x8c, 0x10, 0x00, 0x00, - 0x06, 0x80, 0x1a, 0x00, 0x00, 0x00, - 0x80, 0x16, 0x00, 0x50, 0x00, 0x00, - 0x30, 0x10, 0xc0, 0x40, 0x00, 0x00, - 0x8c, 0x22, 0x30, 0x80, 0x00, 0x00, - 0x54, 0x01, 0x50, 0x00, 0x00, 0x00, - 0x80, 0xc2, 0x03, 0x00, 0x00, 0x00, - 0x36, 0x4f, 0x1f, 0xb0, 0x00, 0x00 -}; - -const uint8_t kMaskRandom28_3[18] = { - 0xac, 0xda, 0xb3, 0x60, 0x00, 0x00, - 0x55, 0x6d, 0x55, 0xb0, 0x00, 0x00, - 0x27, 0xb4, 0x9e, 0xd0, 0x00, 0x00 -}; - -const uint8_t kMaskRandom28_4[24] = { - 0x2c, 0xd8, 0xb3, 0x60, 0x00, 0x00, - 0x93, 0x6a, 0x4d, 0xa0, 0x00, 0x00, - 0x1a, 0xb4, 0x6a, 0xd0, 0x00, 0x00, - 0x47, 0x2d, 0x1c, 0xb0, 0x00, 0x00 -}; - -const uint8_t kMaskRandom28_5[30] = { - 0x64, 0xd9, 0x93, 0x60, 0x00, 0x00, - 0xa5, 0x6a, 0x95, 0xa0, 0x00, 0x00, - 0x52, 0xb5, 0x4a, 0xd0, 0x00, 0x00, - 0x1d, 0xa8, 0x76, 0xa0, 0x00, 0x00, - 0x9c, 0x56, 0x71, 0x50, 0x00, 0x00 -}; - -const uint8_t kMaskRandom28_6[36] = { - 0x4a, 0x55, 0x29, 0x50, 0x00, 0x00, - 0x95, 0x4a, 0x55, 0x20, 0x00, 0x00, - 0x14, 0xb4, 0x52, 0xd0, 0x00, 0x00, - 0x51, 0xa9, 0x46, 0xa0, 0x00, 0x00, - 0x22, 0x6c, 0x89, 0xb0, 0x00, 0x00, - 0x88, 0x8e, 0x22, 0x30, 0x00, 0x00 -}; - -const uint8_t kMaskRandom28_7[42] = { - 0x62, 0x55, 0x89, 0x50, 0x00, 0x00, - 0xb9, 0x22, 0xe4, 0x80, 0x00, 0x00, - 0x18, 0xb4, 0x62, 0xd0, 0x00, 0x00, - 0x54, 0x99, 0x52, 0x60, 0x00, 0x00, - 0x06, 0x6c, 0x19, 0xb0, 0x00, 0x00, - 0x85, 0x56, 0x15, 0x50, 0x00, 0x00, - 0xaa, 0x8a, 0xaa, 0x20, 0x00, 0x00 -}; - -const uint8_t kMaskRandom28_8[48] = { - 0xc0, 0x17, 0x00, 0x50, 0x00, 0x00, - 0x41, 0x61, 0x05, 0x80, 0x00, 0x00, - 0x88, 0x32, 0x20, 0xc0, 0x00, 0x00, - 0x20, 0xa4, 0x82, 0x90, 0x00, 0x00, - 0x0a, 0x48, 0x29, 0x20, 0x00, 0x00, - 0x04, 0x98, 0x12, 0x60, 0x00, 0x00, - 0x94, 0x42, 0x51, 0x00, 0x00, 0x00, - 0x72, 0x01, 0xc8, 0x00, 0x00, 0x00 -}; - -const uint8_t kMaskRandom28_9[54] = { - 0xa2, 0x56, 0x89, 0x50, 0x00, 0x00, - 0x34, 0x60, 0xd1, 0x80, 0x00, 0x00, - 0x4a, 0x25, 0x28, 0x90, 0x00, 0x00, - 0x20, 0xa8, 0x82, 0xa0, 0x00, 0x00, - 0x11, 0x84, 0x46, 0x10, 0x00, 0x00, - 0x49, 0x09, 0x24, 0x20, 0x00, 0x00, - 0x86, 0x0e, 0x18, 0x30, 0x00, 0x00, - 0x20, 0xd4, 0x83, 0x50, 0x00, 0x00, - 0x88, 0x4a, 0x21, 0x20, 0x00, 0x00 -}; - -const uint8_t kMaskRandom29_1[6] = { - 0xff, 0xff, 0xff, 0xf8, 0x00, 0x00 -}; - -const uint8_t kMaskRandom29_10[60] = { - 0xc0, 0xd7, 0x02, 0x80, 0x00, 0x00, - 0x1d, 0x40, 0x55, 0x58, 0x00, 0x00, - 0xd4, 0x09, 0xd1, 0x00, 0x00, 0x00, - 0x02, 0x60, 0x02, 0x70, 0x00, 0x00, - 0x04, 0x28, 0x04, 0xb0, 0x00, 0x00, - 0x20, 0x99, 0x12, 0x48, 0x00, 0x00, - 0x40, 0x46, 0x21, 0x40, 0x00, 0x00, - 0x08, 0x84, 0x82, 0x90, 0x00, 0x00, - 0x68, 0x02, 0xa8, 0x10, 0x00, 0x00, - 0x23, 0x10, 0x09, 0x88, 0x00, 0x00 -}; - -const uint8_t kMaskRandom29_11[66] = { - 0x62, 0xd1, 0x88, 0x88, 0x00, 0x00, - 0x35, 0x23, 0xc4, 0x40, 0x00, 0x00, - 0x14, 0x14, 0x40, 0x38, 0x00, 0x00, - 0xc5, 0x08, 0x42, 0xc0, 0x00, 0x00, - 0x22, 0x0c, 0x90, 0x90, 0x00, 0x00, - 0x88, 0xb8, 0x04, 0x48, 0x00, 0x00, - 0x42, 0x54, 0x03, 0x10, 0x00, 0x00, - 0x28, 0xa4, 0x12, 0x88, 0x00, 0x00, - 0x94, 0x20, 0x09, 0x60, 0x00, 0x00, - 0x1b, 0x04, 0xac, 0x00, 0x00, 0x00, - 0x22, 0xc2, 0x61, 0x00, 0x00, 0x00 -}; - -const uint8_t kMaskRandom29_12[72] = { - 0x81, 0x06, 0x22, 0x40, 0x00, 0x00, - 0x40, 0x69, 0x01, 0x50, 0x00, 0x00, - 0x90, 0x26, 0x09, 0x88, 0x00, 0x00, - 0x28, 0x28, 0x86, 0x90, 0x00, 0x00, - 0x52, 0x10, 0x41, 0x90, 0x00, 0x00, - 0x41, 0x89, 0x10, 0x28, 0x00, 0x00, - 0x09, 0x30, 0x43, 0x20, 0x00, 0x00, - 0x48, 0x45, 0x34, 0xa8, 0x00, 0x00, - 0x04, 0x44, 0xe0, 0x08, 0x00, 0x00, - 0x0e, 0x80, 0x5d, 0x20, 0x00, 0x00, - 0xa5, 0x92, 0x42, 0x10, 0x00, 0x00, - 0x12, 0x0d, 0xc8, 0x50, 0x00, 0x00 -}; - -const uint8_t kMaskRandom29_13[78] = { - 0x62, 0x55, 0x8a, 0x88, 0x00, 0x00, - 0x34, 0x60, 0xd1, 0x10, 0x00, 0x00, - 0x48, 0x05, 0x01, 0x28, 0x00, 0x00, - 0x00, 0xaf, 0x10, 0x10, 0x00, 0x00, - 0x28, 0x08, 0x21, 0x80, 0x00, 0x00, - 0x81, 0x0a, 0x50, 0x48, 0x00, 0x00, - 0x23, 0x06, 0x23, 0x00, 0x00, 0x00, - 0x06, 0x80, 0x84, 0xc8, 0x00, 0x00, - 0x80, 0x17, 0x05, 0x00, 0x00, 0x00, - 0x30, 0x10, 0x41, 0xa0, 0x00, 0x00, - 0x8c, 0x20, 0x1a, 0x40, 0x00, 0x00, - 0x54, 0x01, 0x64, 0x00, 0x00, 0x00, - 0x80, 0xc0, 0x28, 0x30, 0x00, 0x00 -}; - -const uint8_t kMaskRandom29_14[84] = { - 0x40, 0x55, 0x02, 0x08, 0x00, 0x00, - 0x15, 0x40, 0x55, 0x50, 0x00, 0x00, - 0xc0, 0x06, 0x20, 0x48, 0x00, 0x00, - 0x28, 0x13, 0x00, 0x40, 0x00, 0x00, - 0x05, 0x0e, 0x02, 0x80, 0x00, 0x00, - 0x64, 0x80, 0x04, 0x88, 0x00, 0x00, - 0x81, 0x81, 0x00, 0xb0, 0x00, 0x00, - 0x10, 0x98, 0x88, 0x08, 0x00, 0x00, - 0x84, 0x22, 0x40, 0x10, 0x00, 0x00, - 0x12, 0x30, 0x49, 0x00, 0x00, 0x00, - 0x62, 0x01, 0x74, 0x00, 0x00, 0x00, - 0x28, 0x60, 0x81, 0x50, 0x00, 0x00, - 0x0e, 0x0a, 0x18, 0x20, 0x00, 0x00, - 0x10, 0x84, 0xa2, 0x20, 0x00, 0x00 -}; - -const uint8_t kMaskRandom29_15[90] = { - 0x62, 0x55, 0x8a, 0x88, 0x00, 0x00, - 0xb9, 0x22, 0xc4, 0x50, 0x00, 0x00, - 0x18, 0xb4, 0x61, 0xa8, 0x00, 0x00, - 0x54, 0x99, 0x13, 0x50, 0x00, 0x00, - 0x06, 0x6c, 0x4d, 0x90, 0x00, 0x00, - 0x85, 0x55, 0x24, 0x68, 0x00, 0x00, - 0xaa, 0x8a, 0x1a, 0x30, 0x00, 0x00, - 0xc0, 0x16, 0x40, 0x88, 0x00, 0x00, - 0x41, 0x60, 0x25, 0x40, 0x00, 0x00, - 0x88, 0x30, 0x01, 0xa8, 0x00, 0x00, - 0x20, 0xa4, 0x80, 0xd0, 0x00, 0x00, - 0x0a, 0x48, 0x51, 0x10, 0x00, 0x00, - 0x04, 0x9b, 0x08, 0x40, 0x00, 0x00, - 0x94, 0x40, 0x03, 0x18, 0x00, 0x00, - 0x72, 0x01, 0x96, 0x00, 0x00, 0x00 -}; - -const uint8_t kMaskRandom29_16[96] = { - 0xc0, 0x16, 0x40, 0x88, 0x00, 0x00, - 0x41, 0x60, 0x25, 0x40, 0x00, 0x00, - 0x88, 0x30, 0x01, 0xa8, 0x00, 0x00, - 0x20, 0xa4, 0x80, 0xd0, 0x00, 0x00, - 0x0a, 0x48, 0x51, 0x10, 0x00, 0x00, - 0x04, 0x9b, 0x08, 0x40, 0x00, 0x00, - 0x94, 0x40, 0x03, 0x18, 0x00, 0x00, - 0x72, 0x01, 0x96, 0x00, 0x00, 0x00, - 0x62, 0x55, 0x8a, 0x88, 0x00, 0x00, - 0xb9, 0x22, 0xc4, 0x50, 0x00, 0x00, - 0x18, 0xb4, 0x61, 0xa8, 0x00, 0x00, - 0x54, 0x99, 0x13, 0x50, 0x00, 0x00, - 0x06, 0x6c, 0x4d, 0x90, 0x00, 0x00, - 0x85, 0x55, 0x24, 0x68, 0x00, 0x00, - 0xaa, 0x8a, 0x1a, 0x30, 0x00, 0x00, - 0x0d, 0x2c, 0xf2, 0x20, 0x00, 0x00 -}; - -const uint8_t kMaskRandom29_17[102] = { - 0xc0, 0x16, 0x40, 0x88, 0x00, 0x00, - 0x41, 0x60, 0x25, 0x40, 0x00, 0x00, - 0x88, 0x30, 0x01, 0xa8, 0x00, 0x00, - 0x20, 0xa4, 0x80, 0xd0, 0x00, 0x00, - 0x0a, 0x48, 0x51, 0x10, 0x00, 0x00, - 0x04, 0x9b, 0x08, 0x40, 0x00, 0x00, - 0x94, 0x40, 0x03, 0x18, 0x00, 0x00, - 0x72, 0x01, 0x96, 0x00, 0x00, 0x00, - 0xa2, 0x55, 0x88, 0x88, 0x00, 0x00, - 0x34, 0x60, 0x91, 0x10, 0x00, 0x00, - 0x4a, 0x27, 0x01, 0x40, 0x00, 0x00, - 0x20, 0xa8, 0x0c, 0x30, 0x00, 0x00, - 0x11, 0x84, 0x58, 0xa0, 0x00, 0x00, - 0x49, 0x0a, 0x24, 0x00, 0x00, 0x00, - 0x86, 0x0e, 0x0a, 0x40, 0x00, 0x00, - 0x20, 0xd4, 0x22, 0x90, 0x00, 0x00, - 0x88, 0x4a, 0x41, 0x20, 0x00, 0x00 -}; - -const uint8_t kMaskRandom29_18[108] = { - 0xa2, 0x55, 0x88, 0x88, 0x00, 0x00, - 0x34, 0x60, 0x91, 0x10, 0x00, 0x00, - 0x4a, 0x27, 0x01, 0x40, 0x00, 0x00, - 0x20, 0xa8, 0x0c, 0x30, 0x00, 0x00, - 0x11, 0x84, 0x58, 0xa0, 0x00, 0x00, - 0x49, 0x0a, 0x24, 0x00, 0x00, 0x00, - 0x86, 0x0e, 0x0a, 0x40, 0x00, 0x00, - 0x20, 0xd4, 0x22, 0x90, 0x00, 0x00, - 0x88, 0x4a, 0x41, 0x20, 0x00, 0x00, - 0xc0, 0x16, 0x40, 0x88, 0x00, 0x00, - 0x41, 0x60, 0x25, 0x40, 0x00, 0x00, - 0x88, 0x30, 0x01, 0xa8, 0x00, 0x00, - 0x20, 0xa4, 0x80, 0xd0, 0x00, 0x00, - 0x0a, 0x48, 0x51, 0x10, 0x00, 0x00, - 0x04, 0x9b, 0x08, 0x40, 0x00, 0x00, - 0x94, 0x40, 0x03, 0x18, 0x00, 0x00, - 0x72, 0x01, 0x96, 0x00, 0x00, 0x00, - 0x71, 0x36, 0xf2, 0xb0, 0x00, 0x00 -}; - -const uint8_t kMaskRandom29_19[114] = { - 0xa2, 0x55, 0x88, 0x88, 0x00, 0x00, - 0x34, 0x60, 0x91, 0x10, 0x00, 0x00, - 0x4a, 0x27, 0x01, 0x40, 0x00, 0x00, - 0x20, 0xa8, 0x0c, 0x30, 0x00, 0x00, - 0x11, 0x84, 0x58, 0xa0, 0x00, 0x00, - 0x49, 0x0a, 0x24, 0x00, 0x00, 0x00, - 0x86, 0x0e, 0x0a, 0x40, 0x00, 0x00, - 0x20, 0xd4, 0x22, 0x90, 0x00, 0x00, - 0x88, 0x4a, 0x41, 0x20, 0x00, 0x00, - 0xc0, 0xd7, 0x02, 0x80, 0x00, 0x00, - 0x1d, 0x40, 0x55, 0x58, 0x00, 0x00, - 0xd4, 0x09, 0xd1, 0x00, 0x00, 0x00, - 0x02, 0x60, 0x02, 0x70, 0x00, 0x00, - 0x04, 0x28, 0x04, 0xb0, 0x00, 0x00, - 0x20, 0x99, 0x12, 0x48, 0x00, 0x00, - 0x40, 0x46, 0x21, 0x40, 0x00, 0x00, - 0x08, 0x84, 0x82, 0x90, 0x00, 0x00, - 0x68, 0x02, 0xa8, 0x10, 0x00, 0x00, - 0x23, 0x10, 0x09, 0x88, 0x00, 0x00 -}; - -const uint8_t kMaskRandom29_2[12] = { - 0xec, 0xeb, 0xb3, 0xa8, 0x00, 0x00, - 0x3b, 0x9e, 0xee, 0x70, 0x00, 0x00 -}; - -const uint8_t kMaskRandom29_20[120] = { - 0xc0, 0xd7, 0x02, 0x80, 0x00, 0x00, - 0x1d, 0x40, 0x55, 0x58, 0x00, 0x00, - 0xd4, 0x09, 0xd1, 0x00, 0x00, 0x00, - 0x02, 0x60, 0x02, 0x70, 0x00, 0x00, - 0x04, 0x28, 0x04, 0xb0, 0x00, 0x00, - 0x20, 0x99, 0x12, 0x48, 0x00, 0x00, - 0x40, 0x46, 0x21, 0x40, 0x00, 0x00, - 0x08, 0x84, 0x82, 0x90, 0x00, 0x00, - 0x68, 0x02, 0xa8, 0x10, 0x00, 0x00, - 0x23, 0x10, 0x09, 0x88, 0x00, 0x00, - 0xa2, 0x55, 0x88, 0x88, 0x00, 0x00, - 0x34, 0x60, 0x91, 0x10, 0x00, 0x00, - 0x4a, 0x27, 0x01, 0x40, 0x00, 0x00, - 0x20, 0xa8, 0x0c, 0x30, 0x00, 0x00, - 0x11, 0x84, 0x58, 0xa0, 0x00, 0x00, - 0x49, 0x0a, 0x24, 0x00, 0x00, 0x00, - 0x86, 0x0e, 0x0a, 0x40, 0x00, 0x00, - 0x20, 0xd4, 0x22, 0x90, 0x00, 0x00, - 0x88, 0x4a, 0x41, 0x20, 0x00, 0x00, - 0xe7, 0xec, 0xdc, 0xb0, 0x00, 0x00 -}; - -const uint8_t kMaskRandom29_21[126] = { - 0xc0, 0xd7, 0x02, 0x80, 0x00, 0x00, - 0x1d, 0x40, 0x55, 0x58, 0x00, 0x00, - 0xd4, 0x09, 0xd1, 0x00, 0x00, 0x00, - 0x02, 0x60, 0x02, 0x70, 0x00, 0x00, - 0x04, 0x28, 0x04, 0xb0, 0x00, 0x00, - 0x20, 0x99, 0x12, 0x48, 0x00, 0x00, - 0x40, 0x46, 0x21, 0x40, 0x00, 0x00, - 0x08, 0x84, 0x82, 0x90, 0x00, 0x00, - 0x68, 0x02, 0xa8, 0x10, 0x00, 0x00, - 0x23, 0x10, 0x09, 0x88, 0x00, 0x00, - 0x62, 0xd1, 0x88, 0x88, 0x00, 0x00, - 0x35, 0x23, 0xc4, 0x40, 0x00, 0x00, - 0x14, 0x14, 0x40, 0x38, 0x00, 0x00, - 0xc5, 0x08, 0x42, 0xc0, 0x00, 0x00, - 0x22, 0x0c, 0x90, 0x90, 0x00, 0x00, - 0x88, 0xb8, 0x04, 0x48, 0x00, 0x00, - 0x42, 0x54, 0x03, 0x10, 0x00, 0x00, - 0x28, 0xa4, 0x12, 0x88, 0x00, 0x00, - 0x94, 0x20, 0x09, 0x60, 0x00, 0x00, - 0x1b, 0x04, 0xac, 0x00, 0x00, 0x00, - 0x22, 0xc2, 0x61, 0x00, 0x00, 0x00 -}; - -const uint8_t kMaskRandom29_22[132] = { - 0x62, 0xd1, 0x88, 0x88, 0x00, 0x00, - 0x35, 0x23, 0xc4, 0x40, 0x00, 0x00, - 0x14, 0x14, 0x40, 0x38, 0x00, 0x00, - 0xc5, 0x08, 0x42, 0xc0, 0x00, 0x00, - 0x22, 0x0c, 0x90, 0x90, 0x00, 0x00, - 0x88, 0xb8, 0x04, 0x48, 0x00, 0x00, - 0x42, 0x54, 0x03, 0x10, 0x00, 0x00, - 0x28, 0xa4, 0x12, 0x88, 0x00, 0x00, - 0x94, 0x20, 0x09, 0x60, 0x00, 0x00, - 0x1b, 0x04, 0xac, 0x00, 0x00, 0x00, - 0x22, 0xc2, 0x61, 0x00, 0x00, 0x00, - 0xc0, 0xd7, 0x02, 0x80, 0x00, 0x00, - 0x1d, 0x40, 0x55, 0x58, 0x00, 0x00, - 0xd4, 0x09, 0xd1, 0x00, 0x00, 0x00, - 0x02, 0x60, 0x02, 0x70, 0x00, 0x00, - 0x04, 0x28, 0x04, 0xb0, 0x00, 0x00, - 0x20, 0x99, 0x12, 0x48, 0x00, 0x00, - 0x40, 0x46, 0x21, 0x40, 0x00, 0x00, - 0x08, 0x84, 0x82, 0x90, 0x00, 0x00, - 0x68, 0x02, 0xa8, 0x10, 0x00, 0x00, - 0x23, 0x10, 0x09, 0x88, 0x00, 0x00, - 0x1c, 0x90, 0xa9, 0xa0, 0x00, 0x00 -}; - -const uint8_t kMaskRandom29_23[138] = { - 0x62, 0xd1, 0x88, 0x88, 0x00, 0x00, - 0x35, 0x23, 0xc4, 0x40, 0x00, 0x00, - 0x14, 0x14, 0x40, 0x38, 0x00, 0x00, - 0xc5, 0x08, 0x42, 0xc0, 0x00, 0x00, - 0x22, 0x0c, 0x90, 0x90, 0x00, 0x00, - 0x88, 0xb8, 0x04, 0x48, 0x00, 0x00, - 0x42, 0x54, 0x03, 0x10, 0x00, 0x00, - 0x28, 0xa4, 0x12, 0x88, 0x00, 0x00, - 0x94, 0x20, 0x09, 0x60, 0x00, 0x00, - 0x1b, 0x04, 0xac, 0x00, 0x00, 0x00, - 0x22, 0xc2, 0x61, 0x00, 0x00, 0x00, - 0x81, 0x06, 0x22, 0x40, 0x00, 0x00, - 0x40, 0x69, 0x01, 0x50, 0x00, 0x00, - 0x90, 0x26, 0x09, 0x88, 0x00, 0x00, - 0x28, 0x28, 0x86, 0x90, 0x00, 0x00, - 0x52, 0x10, 0x41, 0x90, 0x00, 0x00, - 0x41, 0x89, 0x10, 0x28, 0x00, 0x00, - 0x09, 0x30, 0x43, 0x20, 0x00, 0x00, - 0x48, 0x45, 0x34, 0xa8, 0x00, 0x00, - 0x04, 0x44, 0xe0, 0x08, 0x00, 0x00, - 0x0e, 0x80, 0x5d, 0x20, 0x00, 0x00, - 0xa5, 0x92, 0x42, 0x10, 0x00, 0x00, - 0x12, 0x0d, 0xc8, 0x50, 0x00, 0x00 -}; - -const uint8_t kMaskRandom29_24[144] = { - 0x81, 0x06, 0x22, 0x40, 0x00, 0x00, - 0x40, 0x69, 0x01, 0x50, 0x00, 0x00, - 0x90, 0x26, 0x09, 0x88, 0x00, 0x00, - 0x28, 0x28, 0x86, 0x90, 0x00, 0x00, - 0x52, 0x10, 0x41, 0x90, 0x00, 0x00, - 0x41, 0x89, 0x10, 0x28, 0x00, 0x00, - 0x09, 0x30, 0x43, 0x20, 0x00, 0x00, - 0x48, 0x45, 0x34, 0xa8, 0x00, 0x00, - 0x04, 0x44, 0xe0, 0x08, 0x00, 0x00, - 0x0e, 0x80, 0x5d, 0x20, 0x00, 0x00, - 0xa5, 0x92, 0x42, 0x10, 0x00, 0x00, - 0x12, 0x0d, 0xc8, 0x50, 0x00, 0x00, - 0x62, 0xd1, 0x88, 0x88, 0x00, 0x00, - 0x35, 0x23, 0xc4, 0x40, 0x00, 0x00, - 0x14, 0x14, 0x40, 0x38, 0x00, 0x00, - 0xc5, 0x08, 0x42, 0xc0, 0x00, 0x00, - 0x22, 0x0c, 0x90, 0x90, 0x00, 0x00, - 0x88, 0xb8, 0x04, 0x48, 0x00, 0x00, - 0x42, 0x54, 0x03, 0x10, 0x00, 0x00, - 0x28, 0xa4, 0x12, 0x88, 0x00, 0x00, - 0x94, 0x20, 0x09, 0x60, 0x00, 0x00, - 0x1b, 0x04, 0xac, 0x00, 0x00, 0x00, - 0x22, 0xc2, 0x61, 0x00, 0x00, 0x00, - 0xbd, 0x86, 0x97, 0xc0, 0x00, 0x00 -}; - -const uint8_t kMaskRandom29_25[150] = { - 0x81, 0x06, 0x22, 0x40, 0x00, 0x00, - 0x40, 0x69, 0x01, 0x50, 0x00, 0x00, - 0x90, 0x26, 0x09, 0x88, 0x00, 0x00, - 0x28, 0x28, 0x86, 0x90, 0x00, 0x00, - 0x52, 0x10, 0x41, 0x90, 0x00, 0x00, - 0x41, 0x89, 0x10, 0x28, 0x00, 0x00, - 0x09, 0x30, 0x43, 0x20, 0x00, 0x00, - 0x48, 0x45, 0x34, 0xa8, 0x00, 0x00, - 0x04, 0x44, 0xe0, 0x08, 0x00, 0x00, - 0x0e, 0x80, 0x5d, 0x20, 0x00, 0x00, - 0xa5, 0x92, 0x42, 0x10, 0x00, 0x00, - 0x12, 0x0d, 0xc8, 0x50, 0x00, 0x00, - 0x62, 0x55, 0x8a, 0x88, 0x00, 0x00, - 0x34, 0x60, 0xd1, 0x10, 0x00, 0x00, - 0x48, 0x05, 0x01, 0x28, 0x00, 0x00, - 0x00, 0xaf, 0x10, 0x10, 0x00, 0x00, - 0x28, 0x08, 0x21, 0x80, 0x00, 0x00, - 0x81, 0x0a, 0x50, 0x48, 0x00, 0x00, - 0x23, 0x06, 0x23, 0x00, 0x00, 0x00, - 0x06, 0x80, 0x84, 0xc8, 0x00, 0x00, - 0x80, 0x17, 0x05, 0x00, 0x00, 0x00, - 0x30, 0x10, 0x41, 0xa0, 0x00, 0x00, - 0x8c, 0x20, 0x1a, 0x40, 0x00, 0x00, - 0x54, 0x01, 0x64, 0x00, 0x00, 0x00, - 0x80, 0xc0, 0x28, 0x30, 0x00, 0x00 -}; - -const uint8_t kMaskRandom29_26[156] = { - 0x62, 0x55, 0x8a, 0x88, 0x00, 0x00, - 0x34, 0x60, 0xd1, 0x10, 0x00, 0x00, - 0x48, 0x05, 0x01, 0x28, 0x00, 0x00, - 0x00, 0xaf, 0x10, 0x10, 0x00, 0x00, - 0x28, 0x08, 0x21, 0x80, 0x00, 0x00, - 0x81, 0x0a, 0x50, 0x48, 0x00, 0x00, - 0x23, 0x06, 0x23, 0x00, 0x00, 0x00, - 0x06, 0x80, 0x84, 0xc8, 0x00, 0x00, - 0x80, 0x17, 0x05, 0x00, 0x00, 0x00, - 0x30, 0x10, 0x41, 0xa0, 0x00, 0x00, - 0x8c, 0x20, 0x1a, 0x40, 0x00, 0x00, - 0x54, 0x01, 0x64, 0x00, 0x00, 0x00, - 0x80, 0xc0, 0x28, 0x30, 0x00, 0x00, - 0x81, 0x06, 0x22, 0x40, 0x00, 0x00, - 0x40, 0x69, 0x01, 0x50, 0x00, 0x00, - 0x90, 0x26, 0x09, 0x88, 0x00, 0x00, - 0x28, 0x28, 0x86, 0x90, 0x00, 0x00, - 0x52, 0x10, 0x41, 0x90, 0x00, 0x00, - 0x41, 0x89, 0x10, 0x28, 0x00, 0x00, - 0x09, 0x30, 0x43, 0x20, 0x00, 0x00, - 0x48, 0x45, 0x34, 0xa8, 0x00, 0x00, - 0x04, 0x44, 0xe0, 0x08, 0x00, 0x00, - 0x0e, 0x80, 0x5d, 0x20, 0x00, 0x00, - 0xa5, 0x92, 0x42, 0x10, 0x00, 0x00, - 0x12, 0x0d, 0xc8, 0x50, 0x00, 0x00, - 0xb5, 0x4c, 0xa9, 0x70, 0x00, 0x00 -}; - -const uint8_t kMaskRandom29_27[162] = { - 0x62, 0x55, 0x8a, 0x88, 0x00, 0x00, - 0x34, 0x60, 0xd1, 0x10, 0x00, 0x00, - 0x48, 0x05, 0x01, 0x28, 0x00, 0x00, - 0x00, 0xaf, 0x10, 0x10, 0x00, 0x00, - 0x28, 0x08, 0x21, 0x80, 0x00, 0x00, - 0x81, 0x0a, 0x50, 0x48, 0x00, 0x00, - 0x23, 0x06, 0x23, 0x00, 0x00, 0x00, - 0x06, 0x80, 0x84, 0xc8, 0x00, 0x00, - 0x80, 0x17, 0x05, 0x00, 0x00, 0x00, - 0x30, 0x10, 0x41, 0xa0, 0x00, 0x00, - 0x8c, 0x20, 0x1a, 0x40, 0x00, 0x00, - 0x54, 0x01, 0x64, 0x00, 0x00, 0x00, - 0x80, 0xc0, 0x28, 0x30, 0x00, 0x00, - 0x40, 0x55, 0x02, 0x08, 0x00, 0x00, - 0x15, 0x40, 0x55, 0x50, 0x00, 0x00, - 0xc0, 0x06, 0x20, 0x48, 0x00, 0x00, - 0x28, 0x13, 0x00, 0x40, 0x00, 0x00, - 0x05, 0x0e, 0x02, 0x80, 0x00, 0x00, - 0x64, 0x80, 0x04, 0x88, 0x00, 0x00, - 0x81, 0x81, 0x00, 0xb0, 0x00, 0x00, - 0x10, 0x98, 0x88, 0x08, 0x00, 0x00, - 0x84, 0x22, 0x40, 0x10, 0x00, 0x00, - 0x12, 0x30, 0x49, 0x00, 0x00, 0x00, - 0x62, 0x01, 0x74, 0x00, 0x00, 0x00, - 0x28, 0x60, 0x81, 0x50, 0x00, 0x00, - 0x0e, 0x0a, 0x18, 0x20, 0x00, 0x00, - 0x10, 0x84, 0xa2, 0x20, 0x00, 0x00 -}; - -const uint8_t kMaskRandom29_28[168] = { - 0x40, 0x55, 0x02, 0x08, 0x00, 0x00, - 0x15, 0x40, 0x55, 0x50, 0x00, 0x00, - 0xc0, 0x06, 0x20, 0x48, 0x00, 0x00, - 0x28, 0x13, 0x00, 0x40, 0x00, 0x00, - 0x05, 0x0e, 0x02, 0x80, 0x00, 0x00, - 0x64, 0x80, 0x04, 0x88, 0x00, 0x00, - 0x81, 0x81, 0x00, 0xb0, 0x00, 0x00, - 0x10, 0x98, 0x88, 0x08, 0x00, 0x00, - 0x84, 0x22, 0x40, 0x10, 0x00, 0x00, - 0x12, 0x30, 0x49, 0x00, 0x00, 0x00, - 0x62, 0x01, 0x74, 0x00, 0x00, 0x00, - 0x28, 0x60, 0x81, 0x50, 0x00, 0x00, - 0x0e, 0x0a, 0x18, 0x20, 0x00, 0x00, - 0x10, 0x84, 0xa2, 0x20, 0x00, 0x00, - 0x62, 0x55, 0x8a, 0x88, 0x00, 0x00, - 0x34, 0x60, 0xd1, 0x10, 0x00, 0x00, - 0x48, 0x05, 0x01, 0x28, 0x00, 0x00, - 0x00, 0xaf, 0x10, 0x10, 0x00, 0x00, - 0x28, 0x08, 0x21, 0x80, 0x00, 0x00, - 0x81, 0x0a, 0x50, 0x48, 0x00, 0x00, - 0x23, 0x06, 0x23, 0x00, 0x00, 0x00, - 0x06, 0x80, 0x84, 0xc8, 0x00, 0x00, - 0x80, 0x17, 0x05, 0x00, 0x00, 0x00, - 0x30, 0x10, 0x41, 0xa0, 0x00, 0x00, - 0x8c, 0x20, 0x1a, 0x40, 0x00, 0x00, - 0x54, 0x01, 0x64, 0x00, 0x00, 0x00, - 0x80, 0xc0, 0x28, 0x30, 0x00, 0x00, - 0xbe, 0x1f, 0x99, 0xb0, 0x00, 0x00 -}; - -const uint8_t kMaskRandom29_29[174] = { - 0x40, 0x55, 0x02, 0x08, 0x00, 0x00, - 0x15, 0x40, 0x55, 0x50, 0x00, 0x00, - 0xc0, 0x06, 0x20, 0x48, 0x00, 0x00, - 0x28, 0x13, 0x00, 0x40, 0x00, 0x00, - 0x05, 0x0e, 0x02, 0x80, 0x00, 0x00, - 0x64, 0x80, 0x04, 0x88, 0x00, 0x00, - 0x81, 0x81, 0x00, 0xb0, 0x00, 0x00, - 0x10, 0x98, 0x88, 0x08, 0x00, 0x00, - 0x84, 0x22, 0x40, 0x10, 0x00, 0x00, - 0x12, 0x30, 0x49, 0x00, 0x00, 0x00, - 0x62, 0x01, 0x74, 0x00, 0x00, 0x00, - 0x28, 0x60, 0x81, 0x50, 0x00, 0x00, - 0x0e, 0x0a, 0x18, 0x20, 0x00, 0x00, - 0x10, 0x84, 0xa2, 0x20, 0x00, 0x00, - 0x40, 0x55, 0x88, 0x88, 0x00, 0x00, - 0x15, 0x40, 0xc4, 0x40, 0x00, 0x00, - 0xc0, 0x05, 0x60, 0x00, 0x00, 0x00, - 0x28, 0x10, 0x04, 0x48, 0x00, 0x00, - 0x05, 0x0e, 0x20, 0x80, 0x00, 0x00, - 0x64, 0x81, 0x10, 0x08, 0x00, 0x00, - 0x81, 0x80, 0xa4, 0x10, 0x00, 0x00, - 0x10, 0x9a, 0x0a, 0x80, 0x00, 0x00, - 0x84, 0x20, 0x28, 0x68, 0x00, 0x00, - 0x12, 0x30, 0x47, 0x80, 0x00, 0x00, - 0x62, 0x02, 0x10, 0x10, 0x00, 0x00, - 0x28, 0x62, 0x19, 0x00, 0x00, 0x00, - 0x0e, 0x08, 0x02, 0x18, 0x00, 0x00, - 0x10, 0x85, 0x11, 0x20, 0x00, 0x00, - 0x29, 0x50, 0x42, 0x60, 0x00, 0x00 -}; - -const uint8_t kMaskRandom29_3[18] = { - 0xac, 0xda, 0xb2, 0x48, 0x00, 0x00, - 0x55, 0x6d, 0x55, 0x28, 0x00, 0x00, - 0x27, 0xb5, 0x0c, 0xd8, 0x00, 0x00 -}; - -const uint8_t kMaskRandom29_4[24] = { - 0x2c, 0xd8, 0x96, 0xa8, 0x00, 0x00, - 0x93, 0x6a, 0x55, 0x50, 0x00, 0x00, - 0x1a, 0xb4, 0x69, 0xa8, 0x00, 0x00, - 0x47, 0x2d, 0x0f, 0x50, 0x00, 0x00 -}; - -const uint8_t kMaskRandom29_5[30] = { - 0x64, 0xd9, 0x92, 0x88, 0x00, 0x00, - 0xa5, 0x68, 0x95, 0x50, 0x00, 0x00, - 0x52, 0xb5, 0x25, 0xa0, 0x00, 0x00, - 0x1d, 0xa9, 0x4e, 0x40, 0x00, 0x00, - 0x9c, 0x56, 0x38, 0xc0, 0x00, 0x00 -}; - -const uint8_t kMaskRandom29_6[36] = { - 0x4a, 0x55, 0x8a, 0x28, 0x00, 0x00, - 0x95, 0x48, 0x55, 0x50, 0x00, 0x00, - 0x14, 0xb5, 0x31, 0x18, 0x00, 0x00, - 0x51, 0xa9, 0x4a, 0x50, 0x00, 0x00, - 0x22, 0x6c, 0x8d, 0x90, 0x00, 0x00, - 0x88, 0x8e, 0x29, 0x60, 0x00, 0x00 -}; - -const uint8_t kMaskRandom29_7[42] = { - 0x62, 0x55, 0x8a, 0x88, 0x00, 0x00, - 0xb9, 0x22, 0xc4, 0x50, 0x00, 0x00, - 0x18, 0xb4, 0x61, 0xa8, 0x00, 0x00, - 0x54, 0x99, 0x13, 0x50, 0x00, 0x00, - 0x06, 0x6c, 0x4d, 0x90, 0x00, 0x00, - 0x85, 0x55, 0x24, 0x68, 0x00, 0x00, - 0xaa, 0x8a, 0x1a, 0x30, 0x00, 0x00 -}; - -const uint8_t kMaskRandom29_8[48] = { - 0xc0, 0x16, 0x40, 0x88, 0x00, 0x00, - 0x41, 0x60, 0x25, 0x40, 0x00, 0x00, - 0x88, 0x30, 0x01, 0xa8, 0x00, 0x00, - 0x20, 0xa4, 0x80, 0xd0, 0x00, 0x00, - 0x0a, 0x48, 0x51, 0x10, 0x00, 0x00, - 0x04, 0x9b, 0x08, 0x40, 0x00, 0x00, - 0x94, 0x40, 0x03, 0x18, 0x00, 0x00, - 0x72, 0x01, 0x96, 0x00, 0x00, 0x00 -}; - -const uint8_t kMaskRandom29_9[54] = { - 0xa2, 0x55, 0x88, 0x88, 0x00, 0x00, - 0x34, 0x60, 0x91, 0x10, 0x00, 0x00, - 0x4a, 0x27, 0x01, 0x40, 0x00, 0x00, - 0x20, 0xa8, 0x0c, 0x30, 0x00, 0x00, - 0x11, 0x84, 0x58, 0xa0, 0x00, 0x00, - 0x49, 0x0a, 0x24, 0x00, 0x00, 0x00, - 0x86, 0x0e, 0x0a, 0x40, 0x00, 0x00, - 0x20, 0xd4, 0x22, 0x90, 0x00, 0x00, - 0x88, 0x4a, 0x41, 0x20, 0x00, 0x00 -}; - -const uint8_t kMaskRandom2_1[2] = { - 0xc0, 0x00 -}; - -const uint8_t kMaskRandom2_2[4] = { - 0xc0, 0x00, - 0x80, 0x00 -}; - -const uint8_t kMaskRandom30_1[6] = { - 0xff, 0xff, 0xff, 0xfc, 0x00, 0x00 -}; - -const uint8_t kMaskRandom30_10[60] = { - 0xc0, 0xa1, 0x81, 0x40, 0x00, 0x00, - 0x15, 0x56, 0x2a, 0xac, 0x00, 0x00, - 0x74, 0x40, 0xe8, 0x80, 0x00, 0x00, - 0x00, 0x9c, 0x01, 0x38, 0x00, 0x00, - 0x01, 0x2c, 0x02, 0x58, 0x00, 0x00, - 0x44, 0x92, 0x89, 0x24, 0x00, 0x00, - 0x88, 0x51, 0x10, 0xa0, 0x00, 0x00, - 0x20, 0xa4, 0x41, 0x48, 0x00, 0x00, - 0xaa, 0x05, 0x54, 0x08, 0x00, 0x00, - 0x02, 0x62, 0x04, 0xc4, 0x00, 0x00 -}; - -const uint8_t kMaskRandom30_11[66] = { - 0x62, 0x22, 0xc4, 0x44, 0x00, 0x00, - 0xf1, 0x11, 0xe2, 0x20, 0x00, 0x00, - 0x10, 0x0e, 0x20, 0x1c, 0x00, 0x00, - 0x10, 0xb0, 0x21, 0x60, 0x00, 0x00, - 0x24, 0x24, 0x48, 0x48, 0x00, 0x00, - 0x01, 0x12, 0x02, 0x24, 0x00, 0x00, - 0x00, 0xc4, 0x01, 0x88, 0x00, 0x00, - 0x04, 0xa2, 0x09, 0x44, 0x00, 0x00, - 0x02, 0x58, 0x04, 0xb0, 0x00, 0x00, - 0x2b, 0x00, 0x56, 0x00, 0x00, 0x00, - 0x98, 0x41, 0x30, 0x80, 0x00, 0x00 -}; - -const uint8_t kMaskRandom30_12[72] = { - 0x88, 0x91, 0x11, 0x20, 0x00, 0x00, - 0x40, 0x54, 0x80, 0xa8, 0x00, 0x00, - 0x82, 0x63, 0x04, 0xc4, 0x00, 0x00, - 0x21, 0xa4, 0x43, 0x48, 0x00, 0x00, - 0x10, 0x64, 0x20, 0xc8, 0x00, 0x00, - 0x44, 0x0a, 0x88, 0x14, 0x00, 0x00, - 0x10, 0xc8, 0x21, 0x90, 0x00, 0x00, - 0x4d, 0x2a, 0x9a, 0x54, 0x00, 0x00, - 0x38, 0x02, 0x70, 0x04, 0x00, 0x00, - 0x17, 0x48, 0x2e, 0x90, 0x00, 0x00, - 0x90, 0x85, 0x21, 0x08, 0x00, 0x00, - 0x72, 0x14, 0xe4, 0x28, 0x00, 0x00 -}; - -const uint8_t kMaskRandom30_13[78] = { - 0x62, 0xa2, 0xc5, 0x44, 0x00, 0x00, - 0x34, 0x44, 0x68, 0x88, 0x00, 0x00, - 0x40, 0x4a, 0x80, 0x94, 0x00, 0x00, - 0xc4, 0x05, 0x88, 0x08, 0x00, 0x00, - 0x08, 0x60, 0x10, 0xc0, 0x00, 0x00, - 0x94, 0x13, 0x28, 0x24, 0x00, 0x00, - 0x88, 0xc1, 0x11, 0x80, 0x00, 0x00, - 0x21, 0x32, 0x42, 0x64, 0x00, 0x00, - 0xc1, 0x41, 0x82, 0x80, 0x00, 0x00, - 0x10, 0x68, 0x20, 0xd0, 0x00, 0x00, - 0x06, 0x90, 0x0d, 0x20, 0x00, 0x00, - 0x59, 0x00, 0xb2, 0x00, 0x00, 0x00, - 0x0a, 0x0c, 0x14, 0x18, 0x00, 0x00 -}; - -const uint8_t kMaskRandom30_14[84] = { - 0x40, 0x82, 0x81, 0x04, 0x00, 0x00, - 0x15, 0x54, 0x2a, 0xa8, 0x00, 0x00, - 0x88, 0x13, 0x10, 0x24, 0x00, 0x00, - 0xc0, 0x11, 0x80, 0x20, 0x00, 0x00, - 0x80, 0xa1, 0x01, 0x40, 0x00, 0x00, - 0x01, 0x22, 0x02, 0x44, 0x00, 0x00, - 0x40, 0x2c, 0x80, 0x58, 0x00, 0x00, - 0x22, 0x02, 0x44, 0x04, 0x00, 0x00, - 0x90, 0x05, 0x20, 0x08, 0x00, 0x00, - 0x12, 0x40, 0x24, 0x80, 0x00, 0x00, - 0x5d, 0x00, 0xba, 0x00, 0x00, 0x00, - 0x20, 0x54, 0x40, 0xa8, 0x00, 0x00, - 0x86, 0x09, 0x0c, 0x10, 0x00, 0x00, - 0x28, 0x88, 0x51, 0x10, 0x00, 0x00 -}; - -const uint8_t kMaskRandom30_15[90] = { - 0x62, 0x22, 0xc4, 0x44, 0x00, 0x00, - 0x31, 0x10, 0x62, 0x20, 0x00, 0x00, - 0x58, 0x00, 0xb0, 0x00, 0x00, 0x00, - 0x01, 0x12, 0x02, 0x24, 0x00, 0x00, - 0x88, 0x21, 0x10, 0x40, 0x00, 0x00, - 0x44, 0x02, 0x88, 0x04, 0x00, 0x00, - 0x29, 0x04, 0x52, 0x08, 0x00, 0x00, - 0x82, 0xa1, 0x05, 0x40, 0x00, 0x00, - 0x0a, 0x1a, 0x14, 0x34, 0x00, 0x00, - 0x11, 0xe0, 0x23, 0xc0, 0x00, 0x00, - 0x84, 0x05, 0x08, 0x08, 0x00, 0x00, - 0x86, 0x41, 0x0c, 0x80, 0x00, 0x00, - 0x00, 0x86, 0x01, 0x0c, 0x00, 0x00, - 0x44, 0x48, 0x88, 0x90, 0x00, 0x00, - 0x10, 0x98, 0x21, 0x30, 0x00, 0x00 -}; - -const uint8_t kMaskRandom30_16[96] = { - 0x90, 0x23, 0x20, 0x44, 0x00, 0x00, - 0x09, 0x50, 0x12, 0xa0, 0x00, 0x00, - 0x00, 0x6a, 0x00, 0xd4, 0x00, 0x00, - 0x20, 0x34, 0x40, 0x68, 0x00, 0x00, - 0x14, 0x44, 0x28, 0x88, 0x00, 0x00, - 0xc2, 0x11, 0x84, 0x20, 0x00, 0x00, - 0x00, 0xc6, 0x01, 0x8c, 0x00, 0x00, - 0x65, 0x80, 0xcb, 0x00, 0x00, 0x00, - 0x62, 0xa2, 0xc5, 0x44, 0x00, 0x00, - 0xb1, 0x15, 0x62, 0x28, 0x00, 0x00, - 0x18, 0x6a, 0x30, 0xd4, 0x00, 0x00, - 0x44, 0xd4, 0x89, 0xa8, 0x00, 0x00, - 0x13, 0x64, 0x26, 0xc8, 0x00, 0x00, - 0x49, 0x1a, 0x92, 0x34, 0x00, 0x00, - 0x86, 0x8d, 0x0d, 0x18, 0x00, 0x00, - 0xce, 0x58, 0xa0, 0x14, 0x00, 0x00 -}; - -const uint8_t kMaskRandom30_17[102] = { - 0x90, 0x23, 0x20, 0x44, 0x00, 0x00, - 0x09, 0x50, 0x12, 0xa0, 0x00, 0x00, - 0x00, 0x6a, 0x00, 0xd4, 0x00, 0x00, - 0x20, 0x34, 0x40, 0x68, 0x00, 0x00, - 0x14, 0x44, 0x28, 0x88, 0x00, 0x00, - 0xc2, 0x11, 0x84, 0x20, 0x00, 0x00, - 0x00, 0xc6, 0x01, 0x8c, 0x00, 0x00, - 0x65, 0x80, 0xcb, 0x00, 0x00, 0x00, - 0x62, 0x22, 0xc4, 0x44, 0x00, 0x00, - 0x24, 0x44, 0x48, 0x88, 0x00, 0x00, - 0xc0, 0x51, 0x80, 0xa0, 0x00, 0x00, - 0x03, 0x0c, 0x06, 0x18, 0x00, 0x00, - 0x16, 0x28, 0x2c, 0x50, 0x00, 0x00, - 0x89, 0x01, 0x12, 0x00, 0x00, 0x00, - 0x82, 0x91, 0x05, 0x20, 0x00, 0x00, - 0x08, 0xa4, 0x11, 0x48, 0x00, 0x00, - 0x90, 0x49, 0x20, 0x90, 0x00, 0x00 -}; - -const uint8_t kMaskRandom30_18[108] = { - 0x62, 0x22, 0xc4, 0x44, 0x00, 0x00, - 0x24, 0x44, 0x48, 0x88, 0x00, 0x00, - 0xc0, 0x51, 0x80, 0xa0, 0x00, 0x00, - 0x03, 0x0c, 0x06, 0x18, 0x00, 0x00, - 0x16, 0x28, 0x2c, 0x50, 0x00, 0x00, - 0x89, 0x01, 0x12, 0x00, 0x00, 0x00, - 0x82, 0x91, 0x05, 0x20, 0x00, 0x00, - 0x08, 0xa4, 0x11, 0x48, 0x00, 0x00, - 0x90, 0x49, 0x20, 0x90, 0x00, 0x00, - 0x90, 0x23, 0x20, 0x44, 0x00, 0x00, - 0x09, 0x50, 0x12, 0xa0, 0x00, 0x00, - 0x00, 0x6a, 0x00, 0xd4, 0x00, 0x00, - 0x20, 0x34, 0x40, 0x68, 0x00, 0x00, - 0x14, 0x44, 0x28, 0x88, 0x00, 0x00, - 0xc2, 0x11, 0x84, 0x20, 0x00, 0x00, - 0x00, 0xc6, 0x01, 0x8c, 0x00, 0x00, - 0x65, 0x80, 0xcb, 0x00, 0x00, 0x00, - 0x00, 0xb2, 0x47, 0x80, 0x00, 0x00 -}; - -const uint8_t kMaskRandom30_19[114] = { - 0x62, 0x22, 0xc4, 0x44, 0x00, 0x00, - 0x24, 0x44, 0x48, 0x88, 0x00, 0x00, - 0xc0, 0x51, 0x80, 0xa0, 0x00, 0x00, - 0x03, 0x0c, 0x06, 0x18, 0x00, 0x00, - 0x16, 0x28, 0x2c, 0x50, 0x00, 0x00, - 0x89, 0x01, 0x12, 0x00, 0x00, 0x00, - 0x82, 0x91, 0x05, 0x20, 0x00, 0x00, - 0x08, 0xa4, 0x11, 0x48, 0x00, 0x00, - 0x90, 0x49, 0x20, 0x90, 0x00, 0x00, - 0xc0, 0xa1, 0x81, 0x40, 0x00, 0x00, - 0x15, 0x56, 0x2a, 0xac, 0x00, 0x00, - 0x74, 0x40, 0xe8, 0x80, 0x00, 0x00, - 0x00, 0x9c, 0x01, 0x38, 0x00, 0x00, - 0x01, 0x2c, 0x02, 0x58, 0x00, 0x00, - 0x44, 0x92, 0x89, 0x24, 0x00, 0x00, - 0x88, 0x51, 0x10, 0xa0, 0x00, 0x00, - 0x20, 0xa4, 0x41, 0x48, 0x00, 0x00, - 0xaa, 0x05, 0x54, 0x08, 0x00, 0x00, - 0x02, 0x62, 0x04, 0xc4, 0x00, 0x00 -}; - -const uint8_t kMaskRandom30_2[12] = { - 0xec, 0xeb, 0xd9, 0xd4, 0x00, 0x00, - 0xbb, 0x9d, 0x77, 0x38, 0x00, 0x00 -}; - -const uint8_t kMaskRandom30_20[120] = { - 0xc0, 0xa1, 0x81, 0x40, 0x00, 0x00, - 0x15, 0x56, 0x2a, 0xac, 0x00, 0x00, - 0x74, 0x40, 0xe8, 0x80, 0x00, 0x00, - 0x00, 0x9c, 0x01, 0x38, 0x00, 0x00, - 0x01, 0x2c, 0x02, 0x58, 0x00, 0x00, - 0x44, 0x92, 0x89, 0x24, 0x00, 0x00, - 0x88, 0x51, 0x10, 0xa0, 0x00, 0x00, - 0x20, 0xa4, 0x41, 0x48, 0x00, 0x00, - 0xaa, 0x05, 0x54, 0x08, 0x00, 0x00, - 0x02, 0x62, 0x04, 0xc4, 0x00, 0x00, - 0x62, 0x22, 0xc4, 0x44, 0x00, 0x00, - 0x24, 0x44, 0x48, 0x88, 0x00, 0x00, - 0xc0, 0x51, 0x80, 0xa0, 0x00, 0x00, - 0x03, 0x0c, 0x06, 0x18, 0x00, 0x00, - 0x16, 0x28, 0x2c, 0x50, 0x00, 0x00, - 0x89, 0x01, 0x12, 0x00, 0x00, 0x00, - 0x82, 0x91, 0x05, 0x20, 0x00, 0x00, - 0x08, 0xa4, 0x11, 0x48, 0x00, 0x00, - 0x90, 0x49, 0x20, 0x90, 0x00, 0x00, - 0x51, 0x88, 0xd1, 0x78, 0x00, 0x00 -}; - -const uint8_t kMaskRandom30_21[126] = { - 0xc0, 0xa1, 0x81, 0x40, 0x00, 0x00, - 0x15, 0x56, 0x2a, 0xac, 0x00, 0x00, - 0x74, 0x40, 0xe8, 0x80, 0x00, 0x00, - 0x00, 0x9c, 0x01, 0x38, 0x00, 0x00, - 0x01, 0x2c, 0x02, 0x58, 0x00, 0x00, - 0x44, 0x92, 0x89, 0x24, 0x00, 0x00, - 0x88, 0x51, 0x10, 0xa0, 0x00, 0x00, - 0x20, 0xa4, 0x41, 0x48, 0x00, 0x00, - 0xaa, 0x05, 0x54, 0x08, 0x00, 0x00, - 0x02, 0x62, 0x04, 0xc4, 0x00, 0x00, - 0x62, 0x22, 0xc4, 0x44, 0x00, 0x00, - 0xf1, 0x11, 0xe2, 0x20, 0x00, 0x00, - 0x10, 0x0e, 0x20, 0x1c, 0x00, 0x00, - 0x10, 0xb0, 0x21, 0x60, 0x00, 0x00, - 0x24, 0x24, 0x48, 0x48, 0x00, 0x00, - 0x01, 0x12, 0x02, 0x24, 0x00, 0x00, - 0x00, 0xc4, 0x01, 0x88, 0x00, 0x00, - 0x04, 0xa2, 0x09, 0x44, 0x00, 0x00, - 0x02, 0x58, 0x04, 0xb0, 0x00, 0x00, - 0x2b, 0x00, 0x56, 0x00, 0x00, 0x00, - 0x98, 0x41, 0x30, 0x80, 0x00, 0x00 -}; - -const uint8_t kMaskRandom30_22[132] = { - 0x62, 0x22, 0xc4, 0x44, 0x00, 0x00, - 0xf1, 0x11, 0xe2, 0x20, 0x00, 0x00, - 0x10, 0x0e, 0x20, 0x1c, 0x00, 0x00, - 0x10, 0xb0, 0x21, 0x60, 0x00, 0x00, - 0x24, 0x24, 0x48, 0x48, 0x00, 0x00, - 0x01, 0x12, 0x02, 0x24, 0x00, 0x00, - 0x00, 0xc4, 0x01, 0x88, 0x00, 0x00, - 0x04, 0xa2, 0x09, 0x44, 0x00, 0x00, - 0x02, 0x58, 0x04, 0xb0, 0x00, 0x00, - 0x2b, 0x00, 0x56, 0x00, 0x00, 0x00, - 0x98, 0x41, 0x30, 0x80, 0x00, 0x00, - 0xc0, 0xa1, 0x81, 0x40, 0x00, 0x00, - 0x15, 0x56, 0x2a, 0xac, 0x00, 0x00, - 0x74, 0x40, 0xe8, 0x80, 0x00, 0x00, - 0x00, 0x9c, 0x01, 0x38, 0x00, 0x00, - 0x01, 0x2c, 0x02, 0x58, 0x00, 0x00, - 0x44, 0x92, 0x89, 0x24, 0x00, 0x00, - 0x88, 0x51, 0x10, 0xa0, 0x00, 0x00, - 0x20, 0xa4, 0x41, 0x48, 0x00, 0x00, - 0xaa, 0x05, 0x54, 0x08, 0x00, 0x00, - 0x02, 0x62, 0x04, 0xc4, 0x00, 0x00, - 0x03, 0x10, 0x18, 0x74, 0x00, 0x00 -}; - -const uint8_t kMaskRandom30_23[138] = { - 0x62, 0x22, 0xc4, 0x44, 0x00, 0x00, - 0xf1, 0x11, 0xe2, 0x20, 0x00, 0x00, - 0x10, 0x0e, 0x20, 0x1c, 0x00, 0x00, - 0x10, 0xb0, 0x21, 0x60, 0x00, 0x00, - 0x24, 0x24, 0x48, 0x48, 0x00, 0x00, - 0x01, 0x12, 0x02, 0x24, 0x00, 0x00, - 0x00, 0xc4, 0x01, 0x88, 0x00, 0x00, - 0x04, 0xa2, 0x09, 0x44, 0x00, 0x00, - 0x02, 0x58, 0x04, 0xb0, 0x00, 0x00, - 0x2b, 0x00, 0x56, 0x00, 0x00, 0x00, - 0x98, 0x41, 0x30, 0x80, 0x00, 0x00, - 0x88, 0x91, 0x11, 0x20, 0x00, 0x00, - 0x40, 0x54, 0x80, 0xa8, 0x00, 0x00, - 0x82, 0x63, 0x04, 0xc4, 0x00, 0x00, - 0x21, 0xa4, 0x43, 0x48, 0x00, 0x00, - 0x10, 0x64, 0x20, 0xc8, 0x00, 0x00, - 0x44, 0x0a, 0x88, 0x14, 0x00, 0x00, - 0x10, 0xc8, 0x21, 0x90, 0x00, 0x00, - 0x4d, 0x2a, 0x9a, 0x54, 0x00, 0x00, - 0x38, 0x02, 0x70, 0x04, 0x00, 0x00, - 0x17, 0x48, 0x2e, 0x90, 0x00, 0x00, - 0x90, 0x85, 0x21, 0x08, 0x00, 0x00, - 0x72, 0x14, 0xe4, 0x28, 0x00, 0x00 -}; - -const uint8_t kMaskRandom30_24[144] = { - 0x88, 0x91, 0x11, 0x20, 0x00, 0x00, - 0x40, 0x54, 0x80, 0xa8, 0x00, 0x00, - 0x82, 0x63, 0x04, 0xc4, 0x00, 0x00, - 0x21, 0xa4, 0x43, 0x48, 0x00, 0x00, - 0x10, 0x64, 0x20, 0xc8, 0x00, 0x00, - 0x44, 0x0a, 0x88, 0x14, 0x00, 0x00, - 0x10, 0xc8, 0x21, 0x90, 0x00, 0x00, - 0x4d, 0x2a, 0x9a, 0x54, 0x00, 0x00, - 0x38, 0x02, 0x70, 0x04, 0x00, 0x00, - 0x17, 0x48, 0x2e, 0x90, 0x00, 0x00, - 0x90, 0x85, 0x21, 0x08, 0x00, 0x00, - 0x72, 0x14, 0xe4, 0x28, 0x00, 0x00, - 0x62, 0x22, 0xc4, 0x44, 0x00, 0x00, - 0xf1, 0x11, 0xe2, 0x20, 0x00, 0x00, - 0x10, 0x0e, 0x20, 0x1c, 0x00, 0x00, - 0x10, 0xb0, 0x21, 0x60, 0x00, 0x00, - 0x24, 0x24, 0x48, 0x48, 0x00, 0x00, - 0x01, 0x12, 0x02, 0x24, 0x00, 0x00, - 0x00, 0xc4, 0x01, 0x88, 0x00, 0x00, - 0x04, 0xa2, 0x09, 0x44, 0x00, 0x00, - 0x02, 0x58, 0x04, 0xb0, 0x00, 0x00, - 0x2b, 0x00, 0x56, 0x00, 0x00, 0x00, - 0x98, 0x41, 0x30, 0x80, 0x00, 0x00, - 0xf3, 0x4d, 0x1c, 0x70, 0x00, 0x00 -}; - -const uint8_t kMaskRandom30_25[150] = { - 0x88, 0x91, 0x11, 0x20, 0x00, 0x00, - 0x40, 0x54, 0x80, 0xa8, 0x00, 0x00, - 0x82, 0x63, 0x04, 0xc4, 0x00, 0x00, - 0x21, 0xa4, 0x43, 0x48, 0x00, 0x00, - 0x10, 0x64, 0x20, 0xc8, 0x00, 0x00, - 0x44, 0x0a, 0x88, 0x14, 0x00, 0x00, - 0x10, 0xc8, 0x21, 0x90, 0x00, 0x00, - 0x4d, 0x2a, 0x9a, 0x54, 0x00, 0x00, - 0x38, 0x02, 0x70, 0x04, 0x00, 0x00, - 0x17, 0x48, 0x2e, 0x90, 0x00, 0x00, - 0x90, 0x85, 0x21, 0x08, 0x00, 0x00, - 0x72, 0x14, 0xe4, 0x28, 0x00, 0x00, - 0x62, 0xa2, 0xc5, 0x44, 0x00, 0x00, - 0x34, 0x44, 0x68, 0x88, 0x00, 0x00, - 0x40, 0x4a, 0x80, 0x94, 0x00, 0x00, - 0xc4, 0x05, 0x88, 0x08, 0x00, 0x00, - 0x08, 0x60, 0x10, 0xc0, 0x00, 0x00, - 0x94, 0x13, 0x28, 0x24, 0x00, 0x00, - 0x88, 0xc1, 0x11, 0x80, 0x00, 0x00, - 0x21, 0x32, 0x42, 0x64, 0x00, 0x00, - 0xc1, 0x41, 0x82, 0x80, 0x00, 0x00, - 0x10, 0x68, 0x20, 0xd0, 0x00, 0x00, - 0x06, 0x90, 0x0d, 0x20, 0x00, 0x00, - 0x59, 0x00, 0xb2, 0x00, 0x00, 0x00, - 0x0a, 0x0c, 0x14, 0x18, 0x00, 0x00 -}; - -const uint8_t kMaskRandom30_26[156] = { - 0x62, 0xa2, 0xc5, 0x44, 0x00, 0x00, - 0x34, 0x44, 0x68, 0x88, 0x00, 0x00, - 0x40, 0x4a, 0x80, 0x94, 0x00, 0x00, - 0xc4, 0x05, 0x88, 0x08, 0x00, 0x00, - 0x08, 0x60, 0x10, 0xc0, 0x00, 0x00, - 0x94, 0x13, 0x28, 0x24, 0x00, 0x00, - 0x88, 0xc1, 0x11, 0x80, 0x00, 0x00, - 0x21, 0x32, 0x42, 0x64, 0x00, 0x00, - 0xc1, 0x41, 0x82, 0x80, 0x00, 0x00, - 0x10, 0x68, 0x20, 0xd0, 0x00, 0x00, - 0x06, 0x90, 0x0d, 0x20, 0x00, 0x00, - 0x59, 0x00, 0xb2, 0x00, 0x00, 0x00, - 0x0a, 0x0c, 0x14, 0x18, 0x00, 0x00, - 0x88, 0x91, 0x11, 0x20, 0x00, 0x00, - 0x40, 0x54, 0x80, 0xa8, 0x00, 0x00, - 0x82, 0x63, 0x04, 0xc4, 0x00, 0x00, - 0x21, 0xa4, 0x43, 0x48, 0x00, 0x00, - 0x10, 0x64, 0x20, 0xc8, 0x00, 0x00, - 0x44, 0x0a, 0x88, 0x14, 0x00, 0x00, - 0x10, 0xc8, 0x21, 0x90, 0x00, 0x00, - 0x4d, 0x2a, 0x9a, 0x54, 0x00, 0x00, - 0x38, 0x02, 0x70, 0x04, 0x00, 0x00, - 0x17, 0x48, 0x2e, 0x90, 0x00, 0x00, - 0x90, 0x85, 0x21, 0x08, 0x00, 0x00, - 0x72, 0x14, 0xe4, 0x28, 0x00, 0x00, - 0x83, 0x11, 0xad, 0xe8, 0x00, 0x00 -}; - -const uint8_t kMaskRandom30_27[162] = { - 0x62, 0xa2, 0xc5, 0x44, 0x00, 0x00, - 0x34, 0x44, 0x68, 0x88, 0x00, 0x00, - 0x40, 0x4a, 0x80, 0x94, 0x00, 0x00, - 0xc4, 0x05, 0x88, 0x08, 0x00, 0x00, - 0x08, 0x60, 0x10, 0xc0, 0x00, 0x00, - 0x94, 0x13, 0x28, 0x24, 0x00, 0x00, - 0x88, 0xc1, 0x11, 0x80, 0x00, 0x00, - 0x21, 0x32, 0x42, 0x64, 0x00, 0x00, - 0xc1, 0x41, 0x82, 0x80, 0x00, 0x00, - 0x10, 0x68, 0x20, 0xd0, 0x00, 0x00, - 0x06, 0x90, 0x0d, 0x20, 0x00, 0x00, - 0x59, 0x00, 0xb2, 0x00, 0x00, 0x00, - 0x0a, 0x0c, 0x14, 0x18, 0x00, 0x00, - 0x40, 0x82, 0x81, 0x04, 0x00, 0x00, - 0x15, 0x54, 0x2a, 0xa8, 0x00, 0x00, - 0x88, 0x13, 0x10, 0x24, 0x00, 0x00, - 0xc0, 0x11, 0x80, 0x20, 0x00, 0x00, - 0x80, 0xa1, 0x01, 0x40, 0x00, 0x00, - 0x01, 0x22, 0x02, 0x44, 0x00, 0x00, - 0x40, 0x2c, 0x80, 0x58, 0x00, 0x00, - 0x22, 0x02, 0x44, 0x04, 0x00, 0x00, - 0x90, 0x05, 0x20, 0x08, 0x00, 0x00, - 0x12, 0x40, 0x24, 0x80, 0x00, 0x00, - 0x5d, 0x00, 0xba, 0x00, 0x00, 0x00, - 0x20, 0x54, 0x40, 0xa8, 0x00, 0x00, - 0x86, 0x09, 0x0c, 0x10, 0x00, 0x00, - 0x28, 0x88, 0x51, 0x10, 0x00, 0x00 -}; - -const uint8_t kMaskRandom30_28[168] = { - 0x40, 0x82, 0x81, 0x04, 0x00, 0x00, - 0x15, 0x54, 0x2a, 0xa8, 0x00, 0x00, - 0x88, 0x13, 0x10, 0x24, 0x00, 0x00, - 0xc0, 0x11, 0x80, 0x20, 0x00, 0x00, - 0x80, 0xa1, 0x01, 0x40, 0x00, 0x00, - 0x01, 0x22, 0x02, 0x44, 0x00, 0x00, - 0x40, 0x2c, 0x80, 0x58, 0x00, 0x00, - 0x22, 0x02, 0x44, 0x04, 0x00, 0x00, - 0x90, 0x05, 0x20, 0x08, 0x00, 0x00, - 0x12, 0x40, 0x24, 0x80, 0x00, 0x00, - 0x5d, 0x00, 0xba, 0x00, 0x00, 0x00, - 0x20, 0x54, 0x40, 0xa8, 0x00, 0x00, - 0x86, 0x09, 0x0c, 0x10, 0x00, 0x00, - 0x28, 0x88, 0x51, 0x10, 0x00, 0x00, - 0x62, 0xa2, 0xc5, 0x44, 0x00, 0x00, - 0x34, 0x44, 0x68, 0x88, 0x00, 0x00, - 0x40, 0x4a, 0x80, 0x94, 0x00, 0x00, - 0xc4, 0x05, 0x88, 0x08, 0x00, 0x00, - 0x08, 0x60, 0x10, 0xc0, 0x00, 0x00, - 0x94, 0x13, 0x28, 0x24, 0x00, 0x00, - 0x88, 0xc1, 0x11, 0x80, 0x00, 0x00, - 0x21, 0x32, 0x42, 0x64, 0x00, 0x00, - 0xc1, 0x41, 0x82, 0x80, 0x00, 0x00, - 0x10, 0x68, 0x20, 0xd0, 0x00, 0x00, - 0x06, 0x90, 0x0d, 0x20, 0x00, 0x00, - 0x59, 0x00, 0xb2, 0x00, 0x00, 0x00, - 0x0a, 0x0c, 0x14, 0x18, 0x00, 0x00, - 0x94, 0x59, 0x03, 0x18, 0x00, 0x00 -}; - -const uint8_t kMaskRandom30_29[174] = { - 0x40, 0x82, 0x81, 0x04, 0x00, 0x00, - 0x15, 0x54, 0x2a, 0xa8, 0x00, 0x00, - 0x88, 0x13, 0x10, 0x24, 0x00, 0x00, - 0xc0, 0x11, 0x80, 0x20, 0x00, 0x00, - 0x80, 0xa1, 0x01, 0x40, 0x00, 0x00, - 0x01, 0x22, 0x02, 0x44, 0x00, 0x00, - 0x40, 0x2c, 0x80, 0x58, 0x00, 0x00, - 0x22, 0x02, 0x44, 0x04, 0x00, 0x00, - 0x90, 0x05, 0x20, 0x08, 0x00, 0x00, - 0x12, 0x40, 0x24, 0x80, 0x00, 0x00, - 0x5d, 0x00, 0xba, 0x00, 0x00, 0x00, - 0x20, 0x54, 0x40, 0xa8, 0x00, 0x00, - 0x86, 0x09, 0x0c, 0x10, 0x00, 0x00, - 0x28, 0x88, 0x51, 0x10, 0x00, 0x00, - 0x62, 0x22, 0xc4, 0x44, 0x00, 0x00, - 0x31, 0x10, 0x62, 0x20, 0x00, 0x00, - 0x58, 0x00, 0xb0, 0x00, 0x00, 0x00, - 0x01, 0x12, 0x02, 0x24, 0x00, 0x00, - 0x88, 0x21, 0x10, 0x40, 0x00, 0x00, - 0x44, 0x02, 0x88, 0x04, 0x00, 0x00, - 0x29, 0x04, 0x52, 0x08, 0x00, 0x00, - 0x82, 0xa1, 0x05, 0x40, 0x00, 0x00, - 0x0a, 0x1a, 0x14, 0x34, 0x00, 0x00, - 0x11, 0xe0, 0x23, 0xc0, 0x00, 0x00, - 0x84, 0x05, 0x08, 0x08, 0x00, 0x00, - 0x86, 0x41, 0x0c, 0x80, 0x00, 0x00, - 0x00, 0x86, 0x01, 0x0c, 0x00, 0x00, - 0x44, 0x48, 0x88, 0x90, 0x00, 0x00, - 0x10, 0x98, 0x21, 0x30, 0x00, 0x00 -}; - -const uint8_t kMaskRandom30_3[18] = { - 0xac, 0x93, 0x59, 0x24, 0x00, 0x00, - 0x55, 0x4a, 0xaa, 0x94, 0x00, 0x00, - 0x43, 0x36, 0x86, 0x6c, 0x00, 0x00 -}; - -const uint8_t kMaskRandom30_30[180] = { - 0x62, 0x22, 0xc4, 0x44, 0x00, 0x00, - 0x31, 0x10, 0x62, 0x20, 0x00, 0x00, - 0x58, 0x00, 0xb0, 0x00, 0x00, 0x00, - 0x01, 0x12, 0x02, 0x24, 0x00, 0x00, - 0x88, 0x21, 0x10, 0x40, 0x00, 0x00, - 0x44, 0x02, 0x88, 0x04, 0x00, 0x00, - 0x29, 0x04, 0x52, 0x08, 0x00, 0x00, - 0x82, 0xa1, 0x05, 0x40, 0x00, 0x00, - 0x0a, 0x1a, 0x14, 0x34, 0x00, 0x00, - 0x11, 0xe0, 0x23, 0xc0, 0x00, 0x00, - 0x84, 0x05, 0x08, 0x08, 0x00, 0x00, - 0x86, 0x41, 0x0c, 0x80, 0x00, 0x00, - 0x00, 0x86, 0x01, 0x0c, 0x00, 0x00, - 0x44, 0x48, 0x88, 0x90, 0x00, 0x00, - 0x10, 0x98, 0x21, 0x30, 0x00, 0x00, - 0x40, 0x82, 0x81, 0x04, 0x00, 0x00, - 0x15, 0x54, 0x2a, 0xa8, 0x00, 0x00, - 0x88, 0x13, 0x10, 0x24, 0x00, 0x00, - 0xc0, 0x11, 0x80, 0x20, 0x00, 0x00, - 0x80, 0xa1, 0x01, 0x40, 0x00, 0x00, - 0x01, 0x22, 0x02, 0x44, 0x00, 0x00, - 0x40, 0x2c, 0x80, 0x58, 0x00, 0x00, - 0x22, 0x02, 0x44, 0x04, 0x00, 0x00, - 0x90, 0x05, 0x20, 0x08, 0x00, 0x00, - 0x12, 0x40, 0x24, 0x80, 0x00, 0x00, - 0x5d, 0x00, 0xba, 0x00, 0x00, 0x00, - 0x20, 0x54, 0x40, 0xa8, 0x00, 0x00, - 0x86, 0x09, 0x0c, 0x10, 0x00, 0x00, - 0x28, 0x88, 0x51, 0x10, 0x00, 0x00, - 0x46, 0xf1, 0xef, 0xec, 0x00, 0x00 -}; - -const uint8_t kMaskRandom30_4[24] = { - 0x25, 0xaa, 0x4b, 0x54, 0x00, 0x00, - 0x95, 0x55, 0x2a, 0xa8, 0x00, 0x00, - 0x1a, 0x6a, 0x34, 0xd4, 0x00, 0x00, - 0x43, 0xd4, 0x87, 0xa8, 0x00, 0x00 -}; - -const uint8_t kMaskRandom30_5[30] = { - 0x64, 0xa2, 0xc9, 0x44, 0x00, 0x00, - 0x25, 0x54, 0x4a, 0xa8, 0x00, 0x00, - 0x49, 0x68, 0x92, 0xd0, 0x00, 0x00, - 0x53, 0x90, 0xa7, 0x20, 0x00, 0x00, - 0x8e, 0x31, 0x1c, 0x60, 0x00, 0x00 -}; - -const uint8_t kMaskRandom30_6[36] = { - 0x62, 0x8a, 0xc5, 0x14, 0x00, 0x00, - 0x15, 0x54, 0x2a, 0xa8, 0x00, 0x00, - 0x4c, 0x46, 0x98, 0x8c, 0x00, 0x00, - 0x52, 0x94, 0xa5, 0x28, 0x00, 0x00, - 0x23, 0x64, 0x46, 0xc8, 0x00, 0x00, - 0x8a, 0x59, 0x14, 0xb0, 0x00, 0x00 -}; - -const uint8_t kMaskRandom30_7[42] = { - 0x62, 0xa2, 0xc5, 0x44, 0x00, 0x00, - 0xb1, 0x15, 0x62, 0x28, 0x00, 0x00, - 0x18, 0x6a, 0x30, 0xd4, 0x00, 0x00, - 0x44, 0xd4, 0x89, 0xa8, 0x00, 0x00, - 0x13, 0x64, 0x26, 0xc8, 0x00, 0x00, - 0x49, 0x1a, 0x92, 0x34, 0x00, 0x00, - 0x86, 0x8d, 0x0d, 0x18, 0x00, 0x00 -}; - -const uint8_t kMaskRandom30_8[48] = { - 0x90, 0x23, 0x20, 0x44, 0x00, 0x00, - 0x09, 0x50, 0x12, 0xa0, 0x00, 0x00, - 0x00, 0x6a, 0x00, 0xd4, 0x00, 0x00, - 0x20, 0x34, 0x40, 0x68, 0x00, 0x00, - 0x14, 0x44, 0x28, 0x88, 0x00, 0x00, - 0xc2, 0x11, 0x84, 0x20, 0x00, 0x00, - 0x00, 0xc6, 0x01, 0x8c, 0x00, 0x00, - 0x65, 0x80, 0xcb, 0x00, 0x00, 0x00 -}; - -const uint8_t kMaskRandom30_9[54] = { - 0x62, 0x22, 0xc4, 0x44, 0x00, 0x00, - 0x24, 0x44, 0x48, 0x88, 0x00, 0x00, - 0xc0, 0x51, 0x80, 0xa0, 0x00, 0x00, - 0x03, 0x0c, 0x06, 0x18, 0x00, 0x00, - 0x16, 0x28, 0x2c, 0x50, 0x00, 0x00, - 0x89, 0x01, 0x12, 0x00, 0x00, 0x00, - 0x82, 0x91, 0x05, 0x20, 0x00, 0x00, - 0x08, 0xa4, 0x11, 0x48, 0x00, 0x00, - 0x90, 0x49, 0x20, 0x90, 0x00, 0x00 -}; - -const uint8_t kMaskRandom31_1[6] = { - 0xff, 0xff, 0xff, 0xfe, 0x00, 0x00 -}; - -const uint8_t kMaskRandom31_10[60] = { - 0xc0, 0xa0, 0x8a, 0xa2, 0x00, 0x00, - 0x15, 0x56, 0x21, 0x44, 0x00, 0x00, - 0x74, 0x40, 0x02, 0x4a, 0x00, 0x00, - 0x00, 0x9c, 0x16, 0x84, 0x00, 0x00, - 0x01, 0x2d, 0xb0, 0x40, 0x00, 0x00, - 0x44, 0x93, 0x05, 0x18, 0x00, 0x00, - 0x88, 0x50, 0x48, 0x94, 0x00, 0x00, - 0x20, 0xa4, 0x70, 0x30, 0x00, 0x00, - 0xaa, 0x04, 0x54, 0x4a, 0x00, 0x00, - 0x02, 0x63, 0x09, 0x24, 0x00, 0x00 -}; - -const uint8_t kMaskRandom31_11[66] = { - 0x62, 0x22, 0xaa, 0xaa, 0x00, 0x00, - 0xf1, 0x10, 0x54, 0x44, 0x00, 0x00, - 0x10, 0x0e, 0x62, 0x22, 0x00, 0x00, - 0x10, 0xb1, 0x06, 0x84, 0x00, 0x00, - 0x24, 0x24, 0x0d, 0x30, 0x00, 0x00, - 0x01, 0x12, 0x81, 0xc2, 0x00, 0x00, - 0x00, 0xc4, 0x58, 0x88, 0x00, 0x00, - 0x04, 0xa3, 0xb0, 0x50, 0x00, 0x00, - 0x02, 0x59, 0x25, 0x02, 0x00, 0x00, - 0x2b, 0x01, 0x08, 0x64, 0x00, 0x00, - 0x98, 0x40, 0xd0, 0x18, 0x00, 0x00 -}; - -const uint8_t kMaskRandom31_12[72] = { - 0x88, 0x91, 0x08, 0x62, 0x00, 0x00, - 0x40, 0x54, 0x31, 0x44, 0x00, 0x00, - 0x82, 0x62, 0x9c, 0x02, 0x00, 0x00, - 0x21, 0xa4, 0x89, 0x90, 0x00, 0x00, - 0x10, 0x64, 0x1d, 0x20, 0x00, 0x00, - 0x44, 0x0a, 0x41, 0x98, 0x00, 0x00, - 0x10, 0xc9, 0x26, 0x80, 0x00, 0x00, - 0x4d, 0x2a, 0x5a, 0x20, 0x00, 0x00, - 0x38, 0x02, 0x62, 0x88, 0x00, 0x00, - 0x17, 0x49, 0x80, 0x46, 0x00, 0x00, - 0x90, 0x84, 0x22, 0x4a, 0x00, 0x00, - 0x72, 0x15, 0xd1, 0x00, 0x00, 0x00 -}; - -const uint8_t kMaskRandom31_13[78] = { - 0x62, 0xa2, 0x8a, 0x2a, 0x00, 0x00, - 0x34, 0x44, 0x44, 0x44, 0x00, 0x00, - 0x40, 0x4b, 0x2c, 0x18, 0x00, 0x00, - 0xc4, 0x04, 0x18, 0xa0, 0x00, 0x00, - 0x08, 0x60, 0xc4, 0x08, 0x00, 0x00, - 0x94, 0x12, 0x92, 0x0c, 0x00, 0x00, - 0x88, 0xc0, 0x23, 0x04, 0x00, 0x00, - 0x21, 0x32, 0x24, 0x70, 0x00, 0x00, - 0xc1, 0x40, 0x80, 0xe2, 0x00, 0x00, - 0x10, 0x69, 0x51, 0x14, 0x00, 0x00, - 0x06, 0x90, 0x11, 0x42, 0x00, 0x00, - 0x59, 0x01, 0x41, 0x80, 0x00, 0x00, - 0x0a, 0x0d, 0x8a, 0x20, 0x00, 0x00 -}; - -const uint8_t kMaskRandom31_14[84] = { - 0x40, 0x82, 0x8a, 0xa2, 0x00, 0x00, - 0x15, 0x54, 0x44, 0x14, 0x00, 0x00, - 0x88, 0x13, 0x09, 0xa0, 0x00, 0x00, - 0xc0, 0x10, 0x19, 0x14, 0x00, 0x00, - 0x80, 0xa0, 0x30, 0x0c, 0x00, 0x00, - 0x01, 0x22, 0x60, 0x06, 0x00, 0x00, - 0x40, 0x2c, 0xc2, 0x10, 0x00, 0x00, - 0x22, 0x02, 0x80, 0x22, 0x00, 0x00, - 0x90, 0x04, 0x20, 0x58, 0x00, 0x00, - 0x12, 0x40, 0x12, 0xc0, 0x00, 0x00, - 0x5d, 0x00, 0x01, 0x28, 0x00, 0x00, - 0x20, 0x54, 0xa4, 0x80, 0x00, 0x00, - 0x86, 0x09, 0x48, 0x48, 0x00, 0x00, - 0x28, 0x89, 0x05, 0x10, 0x00, 0x00 -}; - -const uint8_t kMaskRandom31_15[90] = { - 0x62, 0x22, 0xaa, 0x22, 0x00, 0x00, - 0x31, 0x10, 0x44, 0x44, 0x00, 0x00, - 0x58, 0x00, 0x22, 0x22, 0x00, 0x00, - 0x01, 0x13, 0x00, 0x8a, 0x00, 0x00, - 0x88, 0x20, 0x40, 0x34, 0x00, 0x00, - 0x44, 0x02, 0x10, 0xd0, 0x00, 0x00, - 0x29, 0x04, 0x45, 0x08, 0x00, 0x00, - 0x82, 0xa0, 0x90, 0x12, 0x00, 0x00, - 0x0a, 0x1a, 0x0e, 0x02, 0x00, 0x00, - 0x11, 0xe1, 0x28, 0x40, 0x00, 0x00, - 0x84, 0x05, 0x04, 0x0c, 0x00, 0x00, - 0x86, 0x40, 0xc0, 0x90, 0x00, 0x00, - 0x00, 0x87, 0x13, 0x00, 0x00, 0x00, - 0x44, 0x48, 0x01, 0x1c, 0x00, 0x00, - 0x10, 0x98, 0x30, 0x44, 0x00, 0x00 -}; - -const uint8_t kMaskRandom31_16[96] = { - 0x90, 0x22, 0x40, 0xa8, 0x00, 0x00, - 0x09, 0x50, 0x31, 0x10, 0x00, 0x00, - 0x00, 0x6b, 0x08, 0x0e, 0x00, 0x00, - 0x20, 0x34, 0xc0, 0x90, 0x00, 0x00, - 0x14, 0x44, 0x25, 0x04, 0x00, 0x00, - 0xc2, 0x11, 0x02, 0x82, 0x00, 0x00, - 0x00, 0xc6, 0x80, 0xc4, 0x00, 0x00, - 0x65, 0x80, 0x2c, 0x60, 0x00, 0x00, - 0x62, 0xa2, 0x8a, 0xa2, 0x00, 0x00, - 0xb1, 0x14, 0x44, 0x54, 0x00, 0x00, - 0x18, 0x6b, 0x22, 0x22, 0x00, 0x00, - 0x44, 0xd4, 0x5c, 0x10, 0x00, 0x00, - 0x13, 0x64, 0x90, 0x68, 0x00, 0x00, - 0x49, 0x1b, 0x20, 0x52, 0x00, 0x00, - 0x86, 0x8c, 0x13, 0x0c, 0x00, 0x00, - 0x8d, 0x94, 0xa9, 0xe0, 0x00, 0x00 -}; - -const uint8_t kMaskRandom31_17[102] = { - 0x90, 0x22, 0x40, 0xa8, 0x00, 0x00, - 0x09, 0x50, 0x31, 0x10, 0x00, 0x00, - 0x00, 0x6b, 0x08, 0x0e, 0x00, 0x00, - 0x20, 0x34, 0xc0, 0x90, 0x00, 0x00, - 0x14, 0x44, 0x25, 0x04, 0x00, 0x00, - 0xc2, 0x11, 0x02, 0x82, 0x00, 0x00, - 0x00, 0xc6, 0x80, 0xc4, 0x00, 0x00, - 0x65, 0x80, 0x2c, 0x60, 0x00, 0x00, - 0x62, 0x22, 0xaa, 0xa2, 0x00, 0x00, - 0x24, 0x44, 0x44, 0x54, 0x00, 0x00, - 0xc0, 0x50, 0x0b, 0x0a, 0x00, 0x00, - 0x03, 0x0c, 0x12, 0x94, 0x00, 0x00, - 0x16, 0x29, 0x08, 0x64, 0x00, 0x00, - 0x89, 0x01, 0x80, 0x1a, 0x00, 0x00, - 0x82, 0x90, 0x41, 0x4c, 0x00, 0x00, - 0x08, 0xa4, 0x34, 0x12, 0x00, 0x00, - 0x90, 0x48, 0x88, 0xc8, 0x00, 0x00 -}; - -const uint8_t kMaskRandom31_18[108] = { - 0x62, 0x22, 0xaa, 0xa2, 0x00, 0x00, - 0x24, 0x44, 0x44, 0x54, 0x00, 0x00, - 0xc0, 0x50, 0x0b, 0x0a, 0x00, 0x00, - 0x03, 0x0c, 0x12, 0x94, 0x00, 0x00, - 0x16, 0x29, 0x08, 0x64, 0x00, 0x00, - 0x89, 0x01, 0x80, 0x1a, 0x00, 0x00, - 0x82, 0x90, 0x41, 0x4c, 0x00, 0x00, - 0x08, 0xa4, 0x34, 0x12, 0x00, 0x00, - 0x90, 0x48, 0x88, 0xc8, 0x00, 0x00, - 0x90, 0x22, 0x40, 0xa8, 0x00, 0x00, - 0x09, 0x50, 0x31, 0x10, 0x00, 0x00, - 0x00, 0x6b, 0x08, 0x0e, 0x00, 0x00, - 0x20, 0x34, 0xc0, 0x90, 0x00, 0x00, - 0x14, 0x44, 0x25, 0x04, 0x00, 0x00, - 0xc2, 0x11, 0x02, 0x82, 0x00, 0x00, - 0x00, 0xc6, 0x80, 0xc4, 0x00, 0x00, - 0x65, 0x80, 0x2c, 0x60, 0x00, 0x00, - 0xe3, 0xd1, 0x2e, 0x00, 0x00, 0x00 -}; - -const uint8_t kMaskRandom31_19[114] = { - 0x62, 0x22, 0xaa, 0xa2, 0x00, 0x00, - 0x24, 0x44, 0x44, 0x54, 0x00, 0x00, - 0xc0, 0x50, 0x0b, 0x0a, 0x00, 0x00, - 0x03, 0x0c, 0x12, 0x94, 0x00, 0x00, - 0x16, 0x29, 0x08, 0x64, 0x00, 0x00, - 0x89, 0x01, 0x80, 0x1a, 0x00, 0x00, - 0x82, 0x90, 0x41, 0x4c, 0x00, 0x00, - 0x08, 0xa4, 0x34, 0x12, 0x00, 0x00, - 0x90, 0x48, 0x88, 0xc8, 0x00, 0x00, - 0xc0, 0xa0, 0x8a, 0xa2, 0x00, 0x00, - 0x15, 0x56, 0x21, 0x44, 0x00, 0x00, - 0x74, 0x40, 0x02, 0x4a, 0x00, 0x00, - 0x00, 0x9c, 0x16, 0x84, 0x00, 0x00, - 0x01, 0x2d, 0xb0, 0x40, 0x00, 0x00, - 0x44, 0x93, 0x05, 0x18, 0x00, 0x00, - 0x88, 0x50, 0x48, 0x94, 0x00, 0x00, - 0x20, 0xa4, 0x70, 0x30, 0x00, 0x00, - 0xaa, 0x04, 0x54, 0x4a, 0x00, 0x00, - 0x02, 0x63, 0x09, 0x24, 0x00, 0x00 -}; - -const uint8_t kMaskRandom31_2[12] = { - 0xec, 0xeb, 0x5d, 0x5c, 0x00, 0x00, - 0xbb, 0x9c, 0xf2, 0xf2, 0x00, 0x00 -}; - -const uint8_t kMaskRandom31_20[120] = { - 0xc0, 0xa0, 0x8a, 0xa2, 0x00, 0x00, - 0x15, 0x56, 0x21, 0x44, 0x00, 0x00, - 0x74, 0x40, 0x02, 0x4a, 0x00, 0x00, - 0x00, 0x9c, 0x16, 0x84, 0x00, 0x00, - 0x01, 0x2d, 0xb0, 0x40, 0x00, 0x00, - 0x44, 0x93, 0x05, 0x18, 0x00, 0x00, - 0x88, 0x50, 0x48, 0x94, 0x00, 0x00, - 0x20, 0xa4, 0x70, 0x30, 0x00, 0x00, - 0xaa, 0x04, 0x54, 0x4a, 0x00, 0x00, - 0x02, 0x63, 0x09, 0x24, 0x00, 0x00, - 0x62, 0x22, 0xaa, 0xa2, 0x00, 0x00, - 0x24, 0x44, 0x44, 0x54, 0x00, 0x00, - 0xc0, 0x50, 0x0b, 0x0a, 0x00, 0x00, - 0x03, 0x0c, 0x12, 0x94, 0x00, 0x00, - 0x16, 0x29, 0x08, 0x64, 0x00, 0x00, - 0x89, 0x01, 0x80, 0x1a, 0x00, 0x00, - 0x82, 0x90, 0x41, 0x4c, 0x00, 0x00, - 0x08, 0xa4, 0x34, 0x12, 0x00, 0x00, - 0x90, 0x48, 0x88, 0xc8, 0x00, 0x00, - 0x9a, 0xd4, 0x6a, 0x36, 0x00, 0x00 -}; - -const uint8_t kMaskRandom31_21[126] = { - 0xc0, 0xa0, 0x8a, 0xa2, 0x00, 0x00, - 0x15, 0x56, 0x21, 0x44, 0x00, 0x00, - 0x74, 0x40, 0x02, 0x4a, 0x00, 0x00, - 0x00, 0x9c, 0x16, 0x84, 0x00, 0x00, - 0x01, 0x2d, 0xb0, 0x40, 0x00, 0x00, - 0x44, 0x93, 0x05, 0x18, 0x00, 0x00, - 0x88, 0x50, 0x48, 0x94, 0x00, 0x00, - 0x20, 0xa4, 0x70, 0x30, 0x00, 0x00, - 0xaa, 0x04, 0x54, 0x4a, 0x00, 0x00, - 0x02, 0x63, 0x09, 0x24, 0x00, 0x00, - 0x62, 0x22, 0xaa, 0xaa, 0x00, 0x00, - 0xf1, 0x10, 0x54, 0x44, 0x00, 0x00, - 0x10, 0x0e, 0x62, 0x22, 0x00, 0x00, - 0x10, 0xb1, 0x06, 0x84, 0x00, 0x00, - 0x24, 0x24, 0x0d, 0x30, 0x00, 0x00, - 0x01, 0x12, 0x81, 0xc2, 0x00, 0x00, - 0x00, 0xc4, 0x58, 0x88, 0x00, 0x00, - 0x04, 0xa3, 0xb0, 0x50, 0x00, 0x00, - 0x02, 0x59, 0x25, 0x02, 0x00, 0x00, - 0x2b, 0x01, 0x08, 0x64, 0x00, 0x00, - 0x98, 0x40, 0xd0, 0x18, 0x00, 0x00 -}; - -const uint8_t kMaskRandom31_22[132] = { - 0x62, 0x22, 0xaa, 0xaa, 0x00, 0x00, - 0xf1, 0x10, 0x54, 0x44, 0x00, 0x00, - 0x10, 0x0e, 0x62, 0x22, 0x00, 0x00, - 0x10, 0xb1, 0x06, 0x84, 0x00, 0x00, - 0x24, 0x24, 0x0d, 0x30, 0x00, 0x00, - 0x01, 0x12, 0x81, 0xc2, 0x00, 0x00, - 0x00, 0xc4, 0x58, 0x88, 0x00, 0x00, - 0x04, 0xa3, 0xb0, 0x50, 0x00, 0x00, - 0x02, 0x59, 0x25, 0x02, 0x00, 0x00, - 0x2b, 0x01, 0x08, 0x64, 0x00, 0x00, - 0x98, 0x40, 0xd0, 0x18, 0x00, 0x00, - 0xc0, 0xa0, 0x8a, 0xa2, 0x00, 0x00, - 0x15, 0x56, 0x21, 0x44, 0x00, 0x00, - 0x74, 0x40, 0x02, 0x4a, 0x00, 0x00, - 0x00, 0x9c, 0x16, 0x84, 0x00, 0x00, - 0x01, 0x2d, 0xb0, 0x40, 0x00, 0x00, - 0x44, 0x93, 0x05, 0x18, 0x00, 0x00, - 0x88, 0x50, 0x48, 0x94, 0x00, 0x00, - 0x20, 0xa4, 0x70, 0x30, 0x00, 0x00, - 0xaa, 0x04, 0x54, 0x4a, 0x00, 0x00, - 0x02, 0x63, 0x09, 0x24, 0x00, 0x00, - 0x32, 0x23, 0x73, 0x8e, 0x00, 0x00 -}; - -const uint8_t kMaskRandom31_23[138] = { - 0x62, 0x22, 0xaa, 0xaa, 0x00, 0x00, - 0xf1, 0x10, 0x54, 0x44, 0x00, 0x00, - 0x10, 0x0e, 0x62, 0x22, 0x00, 0x00, - 0x10, 0xb1, 0x06, 0x84, 0x00, 0x00, - 0x24, 0x24, 0x0d, 0x30, 0x00, 0x00, - 0x01, 0x12, 0x81, 0xc2, 0x00, 0x00, - 0x00, 0xc4, 0x58, 0x88, 0x00, 0x00, - 0x04, 0xa3, 0xb0, 0x50, 0x00, 0x00, - 0x02, 0x59, 0x25, 0x02, 0x00, 0x00, - 0x2b, 0x01, 0x08, 0x64, 0x00, 0x00, - 0x98, 0x40, 0xd0, 0x18, 0x00, 0x00, - 0x88, 0x91, 0x08, 0x62, 0x00, 0x00, - 0x40, 0x54, 0x31, 0x44, 0x00, 0x00, - 0x82, 0x62, 0x9c, 0x02, 0x00, 0x00, - 0x21, 0xa4, 0x89, 0x90, 0x00, 0x00, - 0x10, 0x64, 0x1d, 0x20, 0x00, 0x00, - 0x44, 0x0a, 0x41, 0x98, 0x00, 0x00, - 0x10, 0xc9, 0x26, 0x80, 0x00, 0x00, - 0x4d, 0x2a, 0x5a, 0x20, 0x00, 0x00, - 0x38, 0x02, 0x62, 0x88, 0x00, 0x00, - 0x17, 0x49, 0x80, 0x46, 0x00, 0x00, - 0x90, 0x84, 0x22, 0x4a, 0x00, 0x00, - 0x72, 0x15, 0xd1, 0x00, 0x00, 0x00 -}; - -const uint8_t kMaskRandom31_24[144] = { - 0x88, 0x91, 0x08, 0x62, 0x00, 0x00, - 0x40, 0x54, 0x31, 0x44, 0x00, 0x00, - 0x82, 0x62, 0x9c, 0x02, 0x00, 0x00, - 0x21, 0xa4, 0x89, 0x90, 0x00, 0x00, - 0x10, 0x64, 0x1d, 0x20, 0x00, 0x00, - 0x44, 0x0a, 0x41, 0x98, 0x00, 0x00, - 0x10, 0xc9, 0x26, 0x80, 0x00, 0x00, - 0x4d, 0x2a, 0x5a, 0x20, 0x00, 0x00, - 0x38, 0x02, 0x62, 0x88, 0x00, 0x00, - 0x17, 0x49, 0x80, 0x46, 0x00, 0x00, - 0x90, 0x84, 0x22, 0x4a, 0x00, 0x00, - 0x72, 0x15, 0xd1, 0x00, 0x00, 0x00, - 0x62, 0x22, 0xaa, 0xaa, 0x00, 0x00, - 0xf1, 0x10, 0x54, 0x44, 0x00, 0x00, - 0x10, 0x0e, 0x62, 0x22, 0x00, 0x00, - 0x10, 0xb1, 0x06, 0x84, 0x00, 0x00, - 0x24, 0x24, 0x0d, 0x30, 0x00, 0x00, - 0x01, 0x12, 0x81, 0xc2, 0x00, 0x00, - 0x00, 0xc4, 0x58, 0x88, 0x00, 0x00, - 0x04, 0xa3, 0xb0, 0x50, 0x00, 0x00, - 0x02, 0x59, 0x25, 0x02, 0x00, 0x00, - 0x2b, 0x01, 0x08, 0x64, 0x00, 0x00, - 0x98, 0x40, 0xd0, 0x18, 0x00, 0x00, - 0xf0, 0xdf, 0x91, 0xb6, 0x00, 0x00 -}; - -const uint8_t kMaskRandom31_25[150] = { - 0x88, 0x91, 0x08, 0x62, 0x00, 0x00, - 0x40, 0x54, 0x31, 0x44, 0x00, 0x00, - 0x82, 0x62, 0x9c, 0x02, 0x00, 0x00, - 0x21, 0xa4, 0x89, 0x90, 0x00, 0x00, - 0x10, 0x64, 0x1d, 0x20, 0x00, 0x00, - 0x44, 0x0a, 0x41, 0x98, 0x00, 0x00, - 0x10, 0xc9, 0x26, 0x80, 0x00, 0x00, - 0x4d, 0x2a, 0x5a, 0x20, 0x00, 0x00, - 0x38, 0x02, 0x62, 0x88, 0x00, 0x00, - 0x17, 0x49, 0x80, 0x46, 0x00, 0x00, - 0x90, 0x84, 0x22, 0x4a, 0x00, 0x00, - 0x72, 0x15, 0xd1, 0x00, 0x00, 0x00, - 0x62, 0xa2, 0x8a, 0x2a, 0x00, 0x00, - 0x34, 0x44, 0x44, 0x44, 0x00, 0x00, - 0x40, 0x4b, 0x2c, 0x18, 0x00, 0x00, - 0xc4, 0x04, 0x18, 0xa0, 0x00, 0x00, - 0x08, 0x60, 0xc4, 0x08, 0x00, 0x00, - 0x94, 0x12, 0x92, 0x0c, 0x00, 0x00, - 0x88, 0xc0, 0x23, 0x04, 0x00, 0x00, - 0x21, 0x32, 0x24, 0x70, 0x00, 0x00, - 0xc1, 0x40, 0x80, 0xe2, 0x00, 0x00, - 0x10, 0x69, 0x51, 0x14, 0x00, 0x00, - 0x06, 0x90, 0x11, 0x42, 0x00, 0x00, - 0x59, 0x01, 0x41, 0x80, 0x00, 0x00, - 0x0a, 0x0d, 0x8a, 0x20, 0x00, 0x00 -}; - -const uint8_t kMaskRandom31_26[156] = { - 0x62, 0xa2, 0x8a, 0x2a, 0x00, 0x00, - 0x34, 0x44, 0x44, 0x44, 0x00, 0x00, - 0x40, 0x4b, 0x2c, 0x18, 0x00, 0x00, - 0xc4, 0x04, 0x18, 0xa0, 0x00, 0x00, - 0x08, 0x60, 0xc4, 0x08, 0x00, 0x00, - 0x94, 0x12, 0x92, 0x0c, 0x00, 0x00, - 0x88, 0xc0, 0x23, 0x04, 0x00, 0x00, - 0x21, 0x32, 0x24, 0x70, 0x00, 0x00, - 0xc1, 0x40, 0x80, 0xe2, 0x00, 0x00, - 0x10, 0x69, 0x51, 0x14, 0x00, 0x00, - 0x06, 0x90, 0x11, 0x42, 0x00, 0x00, - 0x59, 0x01, 0x41, 0x80, 0x00, 0x00, - 0x0a, 0x0d, 0x8a, 0x20, 0x00, 0x00, - 0x88, 0x91, 0x08, 0x62, 0x00, 0x00, - 0x40, 0x54, 0x31, 0x44, 0x00, 0x00, - 0x82, 0x62, 0x9c, 0x02, 0x00, 0x00, - 0x21, 0xa4, 0x89, 0x90, 0x00, 0x00, - 0x10, 0x64, 0x1d, 0x20, 0x00, 0x00, - 0x44, 0x0a, 0x41, 0x98, 0x00, 0x00, - 0x10, 0xc9, 0x26, 0x80, 0x00, 0x00, - 0x4d, 0x2a, 0x5a, 0x20, 0x00, 0x00, - 0x38, 0x02, 0x62, 0x88, 0x00, 0x00, - 0x17, 0x49, 0x80, 0x46, 0x00, 0x00, - 0x90, 0x84, 0x22, 0x4a, 0x00, 0x00, - 0x72, 0x15, 0xd1, 0x00, 0x00, 0x00, - 0xc5, 0x75, 0x48, 0xba, 0x00, 0x00 -}; - -const uint8_t kMaskRandom31_27[162] = { - 0x62, 0xa2, 0x8a, 0x2a, 0x00, 0x00, - 0x34, 0x44, 0x44, 0x44, 0x00, 0x00, - 0x40, 0x4b, 0x2c, 0x18, 0x00, 0x00, - 0xc4, 0x04, 0x18, 0xa0, 0x00, 0x00, - 0x08, 0x60, 0xc4, 0x08, 0x00, 0x00, - 0x94, 0x12, 0x92, 0x0c, 0x00, 0x00, - 0x88, 0xc0, 0x23, 0x04, 0x00, 0x00, - 0x21, 0x32, 0x24, 0x70, 0x00, 0x00, - 0xc1, 0x40, 0x80, 0xe2, 0x00, 0x00, - 0x10, 0x69, 0x51, 0x14, 0x00, 0x00, - 0x06, 0x90, 0x11, 0x42, 0x00, 0x00, - 0x59, 0x01, 0x41, 0x80, 0x00, 0x00, - 0x0a, 0x0d, 0x8a, 0x20, 0x00, 0x00, - 0x40, 0x82, 0x8a, 0xa2, 0x00, 0x00, - 0x15, 0x54, 0x44, 0x14, 0x00, 0x00, - 0x88, 0x13, 0x09, 0xa0, 0x00, 0x00, - 0xc0, 0x10, 0x19, 0x14, 0x00, 0x00, - 0x80, 0xa0, 0x30, 0x0c, 0x00, 0x00, - 0x01, 0x22, 0x60, 0x06, 0x00, 0x00, - 0x40, 0x2c, 0xc2, 0x10, 0x00, 0x00, - 0x22, 0x02, 0x80, 0x22, 0x00, 0x00, - 0x90, 0x04, 0x20, 0x58, 0x00, 0x00, - 0x12, 0x40, 0x12, 0xc0, 0x00, 0x00, - 0x5d, 0x00, 0x01, 0x28, 0x00, 0x00, - 0x20, 0x54, 0xa4, 0x80, 0x00, 0x00, - 0x86, 0x09, 0x48, 0x48, 0x00, 0x00, - 0x28, 0x89, 0x05, 0x10, 0x00, 0x00 -}; - -const uint8_t kMaskRandom31_28[168] = { - 0x40, 0x82, 0x8a, 0xa2, 0x00, 0x00, - 0x15, 0x54, 0x44, 0x14, 0x00, 0x00, - 0x88, 0x13, 0x09, 0xa0, 0x00, 0x00, - 0xc0, 0x10, 0x19, 0x14, 0x00, 0x00, - 0x80, 0xa0, 0x30, 0x0c, 0x00, 0x00, - 0x01, 0x22, 0x60, 0x06, 0x00, 0x00, - 0x40, 0x2c, 0xc2, 0x10, 0x00, 0x00, - 0x22, 0x02, 0x80, 0x22, 0x00, 0x00, - 0x90, 0x04, 0x20, 0x58, 0x00, 0x00, - 0x12, 0x40, 0x12, 0xc0, 0x00, 0x00, - 0x5d, 0x00, 0x01, 0x28, 0x00, 0x00, - 0x20, 0x54, 0xa4, 0x80, 0x00, 0x00, - 0x86, 0x09, 0x48, 0x48, 0x00, 0x00, - 0x28, 0x89, 0x05, 0x10, 0x00, 0x00, - 0x62, 0xa2, 0x8a, 0x2a, 0x00, 0x00, - 0x34, 0x44, 0x44, 0x44, 0x00, 0x00, - 0x40, 0x4b, 0x2c, 0x18, 0x00, 0x00, - 0xc4, 0x04, 0x18, 0xa0, 0x00, 0x00, - 0x08, 0x60, 0xc4, 0x08, 0x00, 0x00, - 0x94, 0x12, 0x92, 0x0c, 0x00, 0x00, - 0x88, 0xc0, 0x23, 0x04, 0x00, 0x00, - 0x21, 0x32, 0x24, 0x70, 0x00, 0x00, - 0xc1, 0x40, 0x80, 0xe2, 0x00, 0x00, - 0x10, 0x69, 0x51, 0x14, 0x00, 0x00, - 0x06, 0x90, 0x11, 0x42, 0x00, 0x00, - 0x59, 0x01, 0x41, 0x80, 0x00, 0x00, - 0x0a, 0x0d, 0x8a, 0x20, 0x00, 0x00, - 0xbc, 0x0d, 0xca, 0x28, 0x00, 0x00 -}; - -const uint8_t kMaskRandom31_29[174] = { - 0x40, 0x82, 0x8a, 0xa2, 0x00, 0x00, - 0x15, 0x54, 0x44, 0x14, 0x00, 0x00, - 0x88, 0x13, 0x09, 0xa0, 0x00, 0x00, - 0xc0, 0x10, 0x19, 0x14, 0x00, 0x00, - 0x80, 0xa0, 0x30, 0x0c, 0x00, 0x00, - 0x01, 0x22, 0x60, 0x06, 0x00, 0x00, - 0x40, 0x2c, 0xc2, 0x10, 0x00, 0x00, - 0x22, 0x02, 0x80, 0x22, 0x00, 0x00, - 0x90, 0x04, 0x20, 0x58, 0x00, 0x00, - 0x12, 0x40, 0x12, 0xc0, 0x00, 0x00, - 0x5d, 0x00, 0x01, 0x28, 0x00, 0x00, - 0x20, 0x54, 0xa4, 0x80, 0x00, 0x00, - 0x86, 0x09, 0x48, 0x48, 0x00, 0x00, - 0x28, 0x89, 0x05, 0x10, 0x00, 0x00, - 0x62, 0x22, 0xaa, 0x22, 0x00, 0x00, - 0x31, 0x10, 0x44, 0x44, 0x00, 0x00, - 0x58, 0x00, 0x22, 0x22, 0x00, 0x00, - 0x01, 0x13, 0x00, 0x8a, 0x00, 0x00, - 0x88, 0x20, 0x40, 0x34, 0x00, 0x00, - 0x44, 0x02, 0x10, 0xd0, 0x00, 0x00, - 0x29, 0x04, 0x45, 0x08, 0x00, 0x00, - 0x82, 0xa0, 0x90, 0x12, 0x00, 0x00, - 0x0a, 0x1a, 0x0e, 0x02, 0x00, 0x00, - 0x11, 0xe1, 0x28, 0x40, 0x00, 0x00, - 0x84, 0x05, 0x04, 0x0c, 0x00, 0x00, - 0x86, 0x40, 0xc0, 0x90, 0x00, 0x00, - 0x00, 0x87, 0x13, 0x00, 0x00, 0x00, - 0x44, 0x48, 0x01, 0x1c, 0x00, 0x00, - 0x10, 0x98, 0x30, 0x44, 0x00, 0x00 -}; - -const uint8_t kMaskRandom31_3[18] = { - 0xac, 0x93, 0x5a, 0x5a, 0x00, 0x00, - 0x55, 0x4a, 0xec, 0x6c, 0x00, 0x00, - 0x43, 0x36, 0x4d, 0xb6, 0x00, 0x00 -}; - -const uint8_t kMaskRandom31_30[180] = { - 0x62, 0x22, 0xaa, 0x22, 0x00, 0x00, - 0x31, 0x10, 0x44, 0x44, 0x00, 0x00, - 0x58, 0x00, 0x22, 0x22, 0x00, 0x00, - 0x01, 0x13, 0x00, 0x8a, 0x00, 0x00, - 0x88, 0x20, 0x40, 0x34, 0x00, 0x00, - 0x44, 0x02, 0x10, 0xd0, 0x00, 0x00, - 0x29, 0x04, 0x45, 0x08, 0x00, 0x00, - 0x82, 0xa0, 0x90, 0x12, 0x00, 0x00, - 0x0a, 0x1a, 0x0e, 0x02, 0x00, 0x00, - 0x11, 0xe1, 0x28, 0x40, 0x00, 0x00, - 0x84, 0x05, 0x04, 0x0c, 0x00, 0x00, - 0x86, 0x40, 0xc0, 0x90, 0x00, 0x00, - 0x00, 0x87, 0x13, 0x00, 0x00, 0x00, - 0x44, 0x48, 0x01, 0x1c, 0x00, 0x00, - 0x10, 0x98, 0x30, 0x44, 0x00, 0x00, - 0x40, 0x82, 0x8a, 0xa2, 0x00, 0x00, - 0x15, 0x54, 0x44, 0x14, 0x00, 0x00, - 0x88, 0x13, 0x09, 0xa0, 0x00, 0x00, - 0xc0, 0x10, 0x19, 0x14, 0x00, 0x00, - 0x80, 0xa0, 0x30, 0x0c, 0x00, 0x00, - 0x01, 0x22, 0x60, 0x06, 0x00, 0x00, - 0x40, 0x2c, 0xc2, 0x10, 0x00, 0x00, - 0x22, 0x02, 0x80, 0x22, 0x00, 0x00, - 0x90, 0x04, 0x20, 0x58, 0x00, 0x00, - 0x12, 0x40, 0x12, 0xc0, 0x00, 0x00, - 0x5d, 0x00, 0x01, 0x28, 0x00, 0x00, - 0x20, 0x54, 0xa4, 0x80, 0x00, 0x00, - 0x86, 0x09, 0x48, 0x48, 0x00, 0x00, - 0x28, 0x89, 0x05, 0x10, 0x00, 0x00, - 0xe1, 0x4f, 0xe0, 0x80, 0x00, 0x00 -}; - -const uint8_t kMaskRandom31_31[186] = { - 0x62, 0x22, 0xaa, 0x22, 0x00, 0x00, - 0x31, 0x10, 0x44, 0x44, 0x00, 0x00, - 0x58, 0x00, 0x22, 0x22, 0x00, 0x00, - 0x01, 0x13, 0x00, 0x8a, 0x00, 0x00, - 0x88, 0x20, 0x40, 0x34, 0x00, 0x00, - 0x44, 0x02, 0x10, 0xd0, 0x00, 0x00, - 0x29, 0x04, 0x45, 0x08, 0x00, 0x00, - 0x82, 0xa0, 0x90, 0x12, 0x00, 0x00, - 0x0a, 0x1a, 0x0e, 0x02, 0x00, 0x00, - 0x11, 0xe1, 0x28, 0x40, 0x00, 0x00, - 0x84, 0x05, 0x04, 0x0c, 0x00, 0x00, - 0x86, 0x40, 0xc0, 0x90, 0x00, 0x00, - 0x00, 0x87, 0x13, 0x00, 0x00, 0x00, - 0x44, 0x48, 0x01, 0x1c, 0x00, 0x00, - 0x10, 0x98, 0x30, 0x44, 0x00, 0x00, - 0x62, 0x23, 0x48, 0x20, 0x00, 0x00, - 0x31, 0x10, 0x02, 0x54, 0x00, 0x00, - 0x58, 0x00, 0x0c, 0x84, 0x00, 0x00, - 0x01, 0x12, 0x10, 0xd0, 0x00, 0x00, - 0x88, 0x21, 0x03, 0x20, 0x00, 0x00, - 0x44, 0x02, 0x01, 0xe0, 0x00, 0x00, - 0x29, 0x04, 0xa0, 0x0a, 0x00, 0x00, - 0x82, 0xa0, 0x40, 0xa2, 0x00, 0x00, - 0x0a, 0x1a, 0x86, 0x10, 0x00, 0x00, - 0x11, 0xe0, 0xd1, 0x00, 0x00, 0x00, - 0x84, 0x05, 0x00, 0x16, 0x00, 0x00, - 0x86, 0x40, 0x20, 0x98, 0x00, 0x00, - 0x00, 0x86, 0x24, 0x60, 0x00, 0x00, - 0x44, 0x48, 0x81, 0x0a, 0x00, 0x00, - 0x10, 0x98, 0x1c, 0x08, 0x00, 0x00, - 0x87, 0x74, 0x30, 0x24, 0x00, 0x00 -}; - -const uint8_t kMaskRandom31_4[24] = { - 0x25, 0xaa, 0xaa, 0xaa, 0x00, 0x00, - 0x95, 0x55, 0x55, 0x54, 0x00, 0x00, - 0x1a, 0x6a, 0x6a, 0x6a, 0x00, 0x00, - 0x43, 0xd5, 0x95, 0x94, 0x00, 0x00 -}; - -const uint8_t kMaskRandom31_5[30] = { - 0x64, 0xa2, 0xaa, 0xaa, 0x00, 0x00, - 0x25, 0x54, 0x54, 0x54, 0x00, 0x00, - 0x49, 0x68, 0x48, 0x4a, 0x00, 0x00, - 0x53, 0x91, 0x09, 0x90, 0x00, 0x00, - 0x8e, 0x30, 0x21, 0x6c, 0x00, 0x00 -}; - -const uint8_t kMaskRandom31_6[36] = { - 0x62, 0x8a, 0xa2, 0xa2, 0x00, 0x00, - 0x15, 0x54, 0x14, 0x54, 0x00, 0x00, - 0x4c, 0x47, 0x44, 0x2a, 0x00, 0x00, - 0x52, 0x95, 0x08, 0x94, 0x00, 0x00, - 0x23, 0x64, 0x61, 0x24, 0x00, 0x00, - 0x8a, 0x58, 0x09, 0x58, 0x00, 0x00 -}; - -const uint8_t kMaskRandom31_7[42] = { - 0x62, 0xa2, 0x8a, 0xa2, 0x00, 0x00, - 0xb1, 0x14, 0x44, 0x54, 0x00, 0x00, - 0x18, 0x6b, 0x22, 0x22, 0x00, 0x00, - 0x44, 0xd4, 0x5c, 0x10, 0x00, 0x00, - 0x13, 0x64, 0x90, 0x68, 0x00, 0x00, - 0x49, 0x1b, 0x20, 0x52, 0x00, 0x00, - 0x86, 0x8c, 0x13, 0x0c, 0x00, 0x00 -}; - -const uint8_t kMaskRandom31_8[48] = { - 0x90, 0x22, 0x40, 0xa8, 0x00, 0x00, - 0x09, 0x50, 0x31, 0x10, 0x00, 0x00, - 0x00, 0x6b, 0x08, 0x0e, 0x00, 0x00, - 0x20, 0x34, 0xc0, 0x90, 0x00, 0x00, - 0x14, 0x44, 0x25, 0x04, 0x00, 0x00, - 0xc2, 0x11, 0x02, 0x82, 0x00, 0x00, - 0x00, 0xc6, 0x80, 0xc4, 0x00, 0x00, - 0x65, 0x80, 0x2c, 0x60, 0x00, 0x00 -}; - -const uint8_t kMaskRandom31_9[54] = { - 0x62, 0x22, 0xaa, 0xa2, 0x00, 0x00, - 0x24, 0x44, 0x44, 0x54, 0x00, 0x00, - 0xc0, 0x50, 0x0b, 0x0a, 0x00, 0x00, - 0x03, 0x0c, 0x12, 0x94, 0x00, 0x00, - 0x16, 0x29, 0x08, 0x64, 0x00, 0x00, - 0x89, 0x01, 0x80, 0x1a, 0x00, 0x00, - 0x82, 0x90, 0x41, 0x4c, 0x00, 0x00, - 0x08, 0xa4, 0x34, 0x12, 0x00, 0x00, - 0x90, 0x48, 0x88, 0xc8, 0x00, 0x00 -}; - -const uint8_t kMaskRandom32_1[6] = { - 0xff, 0xff, 0xff, 0xff, 0x00, 0x00 -}; - -const uint8_t kMaskRandom32_10[60] = { - 0x45, 0x51, 0x45, 0x51, 0x00, 0x00, - 0x10, 0xa2, 0x10, 0xa2, 0x00, 0x00, - 0x01, 0x25, 0x01, 0x25, 0x00, 0x00, - 0x0b, 0x42, 0x0b, 0x42, 0x00, 0x00, - 0xd8, 0x20, 0xd8, 0x20, 0x00, 0x00, - 0x82, 0x8c, 0x82, 0x8c, 0x00, 0x00, - 0x24, 0x4a, 0x24, 0x4a, 0x00, 0x00, - 0x38, 0x18, 0x38, 0x18, 0x00, 0x00, - 0x2a, 0x25, 0x2a, 0x25, 0x00, 0x00, - 0x84, 0x92, 0x84, 0x92, 0x00, 0x00 -}; - -const uint8_t kMaskRandom32_11[66] = { - 0x55, 0x55, 0x55, 0x55, 0x00, 0x00, - 0x2a, 0x22, 0x2a, 0x22, 0x00, 0x00, - 0x31, 0x11, 0x31, 0x11, 0x00, 0x00, - 0x83, 0x42, 0x83, 0x42, 0x00, 0x00, - 0x06, 0x98, 0x06, 0x98, 0x00, 0x00, - 0x40, 0xe1, 0x40, 0xe1, 0x00, 0x00, - 0x2c, 0x44, 0x2c, 0x44, 0x00, 0x00, - 0xd8, 0x28, 0xd8, 0x28, 0x00, 0x00, - 0x92, 0x81, 0x92, 0x81, 0x00, 0x00, - 0x84, 0x32, 0x84, 0x32, 0x00, 0x00, - 0x68, 0x0c, 0x68, 0x0c, 0x00, 0x00 -}; - -const uint8_t kMaskRandom32_12[72] = { - 0x84, 0x31, 0x84, 0x31, 0x00, 0x00, - 0x18, 0xa2, 0x18, 0xa2, 0x00, 0x00, - 0x4e, 0x01, 0x4e, 0x01, 0x00, 0x00, - 0x44, 0xc8, 0x44, 0xc8, 0x00, 0x00, - 0x0e, 0x90, 0x0e, 0x90, 0x00, 0x00, - 0x20, 0xcc, 0x20, 0xcc, 0x00, 0x00, - 0x93, 0x40, 0x93, 0x40, 0x00, 0x00, - 0x2d, 0x10, 0x2d, 0x10, 0x00, 0x00, - 0x31, 0x44, 0x31, 0x44, 0x00, 0x00, - 0xc0, 0x23, 0xc0, 0x23, 0x00, 0x00, - 0x11, 0x25, 0x11, 0x25, 0x00, 0x00, - 0xe8, 0x80, 0xe8, 0x80, 0x00, 0x00 -}; - -const uint8_t kMaskRandom32_13[78] = { - 0x45, 0x15, 0x45, 0x15, 0x00, 0x00, - 0x22, 0x22, 0x22, 0x22, 0x00, 0x00, - 0x96, 0x0c, 0x96, 0x0c, 0x00, 0x00, - 0x0c, 0x50, 0x0c, 0x50, 0x00, 0x00, - 0x62, 0x04, 0x62, 0x04, 0x00, 0x00, - 0x49, 0x06, 0x49, 0x06, 0x00, 0x00, - 0x11, 0x82, 0x11, 0x82, 0x00, 0x00, - 0x12, 0x38, 0x12, 0x38, 0x00, 0x00, - 0x40, 0x71, 0x40, 0x71, 0x00, 0x00, - 0xa8, 0x8a, 0xa8, 0x8a, 0x00, 0x00, - 0x08, 0xa1, 0x08, 0xa1, 0x00, 0x00, - 0xa0, 0xc0, 0xa0, 0xc0, 0x00, 0x00, - 0xc5, 0x10, 0xc5, 0x10, 0x00, 0x00 -}; - -const uint8_t kMaskRandom32_14[84] = { - 0x45, 0x51, 0x45, 0x51, 0x00, 0x00, - 0x22, 0x0a, 0x22, 0x0a, 0x00, 0x00, - 0x84, 0xd0, 0x84, 0xd0, 0x00, 0x00, - 0x0c, 0x8a, 0x0c, 0x8a, 0x00, 0x00, - 0x18, 0x06, 0x18, 0x06, 0x00, 0x00, - 0x30, 0x03, 0x30, 0x03, 0x00, 0x00, - 0x61, 0x08, 0x61, 0x08, 0x00, 0x00, - 0x40, 0x11, 0x40, 0x11, 0x00, 0x00, - 0x10, 0x2c, 0x10, 0x2c, 0x00, 0x00, - 0x09, 0x60, 0x09, 0x60, 0x00, 0x00, - 0x00, 0x94, 0x00, 0x94, 0x00, 0x00, - 0x52, 0x40, 0x52, 0x40, 0x00, 0x00, - 0xa4, 0x24, 0xa4, 0x24, 0x00, 0x00, - 0x82, 0x88, 0x82, 0x88, 0x00, 0x00 -}; - -const uint8_t kMaskRandom32_15[90] = { - 0x55, 0x11, 0x55, 0x11, 0x00, 0x00, - 0x22, 0x22, 0x22, 0x22, 0x00, 0x00, - 0x11, 0x11, 0x11, 0x11, 0x00, 0x00, - 0x80, 0x45, 0x80, 0x45, 0x00, 0x00, - 0x20, 0x1a, 0x20, 0x1a, 0x00, 0x00, - 0x08, 0x68, 0x08, 0x68, 0x00, 0x00, - 0x22, 0x84, 0x22, 0x84, 0x00, 0x00, - 0x48, 0x09, 0x48, 0x09, 0x00, 0x00, - 0x07, 0x01, 0x07, 0x01, 0x00, 0x00, - 0x94, 0x20, 0x94, 0x20, 0x00, 0x00, - 0x82, 0x06, 0x82, 0x06, 0x00, 0x00, - 0x60, 0x48, 0x60, 0x48, 0x00, 0x00, - 0x89, 0x80, 0x89, 0x80, 0x00, 0x00, - 0x00, 0x8e, 0x00, 0x8e, 0x00, 0x00, - 0x18, 0x22, 0x18, 0x22, 0x00, 0x00 -}; - -const uint8_t kMaskRandom32_16[96] = { - 0xa4, 0x10, 0xa4, 0x10, 0x00, 0x00, - 0x01, 0x2a, 0x01, 0x2a, 0x00, 0x00, - 0x06, 0x42, 0x06, 0x42, 0x00, 0x00, - 0x08, 0x68, 0x08, 0x68, 0x00, 0x00, - 0x81, 0x90, 0x81, 0x90, 0x00, 0x00, - 0x00, 0xf0, 0x00, 0xf0, 0x00, 0x00, - 0x50, 0x05, 0x50, 0x05, 0x00, 0x00, - 0x20, 0x51, 0x20, 0x51, 0x00, 0x00, - 0x43, 0x08, 0x43, 0x08, 0x00, 0x00, - 0x68, 0x80, 0x68, 0x80, 0x00, 0x00, - 0x80, 0x0b, 0x80, 0x0b, 0x00, 0x00, - 0x10, 0x4c, 0x10, 0x4c, 0x00, 0x00, - 0x12, 0x30, 0x12, 0x30, 0x00, 0x00, - 0x40, 0x85, 0x40, 0x85, 0x00, 0x00, - 0x0e, 0x04, 0x0e, 0x04, 0x00, 0x00, - 0x18, 0x12, 0x18, 0x12, 0x00, 0x00 -}; - -const uint8_t kMaskRandom32_17[102] = { - 0x20, 0x54, 0x20, 0x54, 0x00, 0x00, - 0x18, 0x88, 0x18, 0x88, 0x00, 0x00, - 0x84, 0x07, 0x84, 0x07, 0x00, 0x00, - 0x60, 0x48, 0x60, 0x48, 0x00, 0x00, - 0x12, 0x82, 0x12, 0x82, 0x00, 0x00, - 0x81, 0x41, 0x81, 0x41, 0x00, 0x00, - 0x40, 0x62, 0x40, 0x62, 0x00, 0x00, - 0x16, 0x30, 0x16, 0x30, 0x00, 0x00, - 0x55, 0x51, 0x55, 0x51, 0x00, 0x00, - 0x22, 0x2a, 0x22, 0x2a, 0x00, 0x00, - 0x05, 0x85, 0x05, 0x85, 0x00, 0x00, - 0x09, 0x4a, 0x09, 0x4a, 0x00, 0x00, - 0x84, 0x32, 0x84, 0x32, 0x00, 0x00, - 0xc0, 0x0d, 0xc0, 0x0d, 0x00, 0x00, - 0x20, 0xa6, 0x20, 0xa6, 0x00, 0x00, - 0x1a, 0x09, 0x1a, 0x09, 0x00, 0x00, - 0x44, 0x64, 0x44, 0x64, 0x00, 0x00 -}; - -const uint8_t kMaskRandom32_18[108] = { - 0x55, 0x51, 0x55, 0x51, 0x00, 0x00, - 0x22, 0x2a, 0x22, 0x2a, 0x00, 0x00, - 0x05, 0x85, 0x05, 0x85, 0x00, 0x00, - 0x09, 0x4a, 0x09, 0x4a, 0x00, 0x00, - 0x84, 0x32, 0x84, 0x32, 0x00, 0x00, - 0xc0, 0x0d, 0xc0, 0x0d, 0x00, 0x00, - 0x20, 0xa6, 0x20, 0xa6, 0x00, 0x00, - 0x1a, 0x09, 0x1a, 0x09, 0x00, 0x00, - 0x44, 0x64, 0x44, 0x64, 0x00, 0x00, - 0x20, 0x54, 0x20, 0x54, 0x00, 0x00, - 0x18, 0x88, 0x18, 0x88, 0x00, 0x00, - 0x84, 0x07, 0x84, 0x07, 0x00, 0x00, - 0x60, 0x48, 0x60, 0x48, 0x00, 0x00, - 0x12, 0x82, 0x12, 0x82, 0x00, 0x00, - 0x81, 0x41, 0x81, 0x41, 0x00, 0x00, - 0x40, 0x62, 0x40, 0x62, 0x00, 0x00, - 0x16, 0x30, 0x16, 0x30, 0x00, 0x00, - 0x1e, 0xb2, 0xd8, 0x53, 0x00, 0x00 -}; - -const uint8_t kMaskRandom32_19[114] = { - 0x55, 0x51, 0x55, 0x51, 0x00, 0x00, - 0x22, 0x2a, 0x22, 0x2a, 0x00, 0x00, - 0x05, 0x85, 0x05, 0x85, 0x00, 0x00, - 0x09, 0x4a, 0x09, 0x4a, 0x00, 0x00, - 0x84, 0x32, 0x84, 0x32, 0x00, 0x00, - 0xc0, 0x0d, 0xc0, 0x0d, 0x00, 0x00, - 0x20, 0xa6, 0x20, 0xa6, 0x00, 0x00, - 0x1a, 0x09, 0x1a, 0x09, 0x00, 0x00, - 0x44, 0x64, 0x44, 0x64, 0x00, 0x00, - 0x45, 0x51, 0x45, 0x51, 0x00, 0x00, - 0x10, 0xa2, 0x10, 0xa2, 0x00, 0x00, - 0x01, 0x25, 0x01, 0x25, 0x00, 0x00, - 0x0b, 0x42, 0x0b, 0x42, 0x00, 0x00, - 0xd8, 0x20, 0xd8, 0x20, 0x00, 0x00, - 0x82, 0x8c, 0x82, 0x8c, 0x00, 0x00, - 0x24, 0x4a, 0x24, 0x4a, 0x00, 0x00, - 0x38, 0x18, 0x38, 0x18, 0x00, 0x00, - 0x2a, 0x25, 0x2a, 0x25, 0x00, 0x00, - 0x84, 0x92, 0x84, 0x92, 0x00, 0x00 -}; - -const uint8_t kMaskRandom32_2[12] = { - 0xae, 0xae, 0xae, 0xae, 0x00, 0x00, - 0x79, 0x79, 0x79, 0x79, 0x00, 0x00 -}; - -const uint8_t kMaskRandom32_20[120] = { - 0x45, 0x51, 0x45, 0x51, 0x00, 0x00, - 0x10, 0xa2, 0x10, 0xa2, 0x00, 0x00, - 0x01, 0x25, 0x01, 0x25, 0x00, 0x00, - 0x0b, 0x42, 0x0b, 0x42, 0x00, 0x00, - 0xd8, 0x20, 0xd8, 0x20, 0x00, 0x00, - 0x82, 0x8c, 0x82, 0x8c, 0x00, 0x00, - 0x24, 0x4a, 0x24, 0x4a, 0x00, 0x00, - 0x38, 0x18, 0x38, 0x18, 0x00, 0x00, - 0x2a, 0x25, 0x2a, 0x25, 0x00, 0x00, - 0x84, 0x92, 0x84, 0x92, 0x00, 0x00, - 0x55, 0x51, 0x55, 0x51, 0x00, 0x00, - 0x22, 0x2a, 0x22, 0x2a, 0x00, 0x00, - 0x05, 0x85, 0x05, 0x85, 0x00, 0x00, - 0x09, 0x4a, 0x09, 0x4a, 0x00, 0x00, - 0x84, 0x32, 0x84, 0x32, 0x00, 0x00, - 0xc0, 0x0d, 0xc0, 0x0d, 0x00, 0x00, - 0x20, 0xa6, 0x20, 0xa6, 0x00, 0x00, - 0x1a, 0x09, 0x1a, 0x09, 0x00, 0x00, - 0x44, 0x64, 0x44, 0x64, 0x00, 0x00, - 0x96, 0xd3, 0xf6, 0xac, 0x00, 0x00 -}; - -const uint8_t kMaskRandom32_21[126] = { - 0x45, 0x51, 0x45, 0x51, 0x00, 0x00, - 0x10, 0xa2, 0x10, 0xa2, 0x00, 0x00, - 0x01, 0x25, 0x01, 0x25, 0x00, 0x00, - 0x0b, 0x42, 0x0b, 0x42, 0x00, 0x00, - 0xd8, 0x20, 0xd8, 0x20, 0x00, 0x00, - 0x82, 0x8c, 0x82, 0x8c, 0x00, 0x00, - 0x24, 0x4a, 0x24, 0x4a, 0x00, 0x00, - 0x38, 0x18, 0x38, 0x18, 0x00, 0x00, - 0x2a, 0x25, 0x2a, 0x25, 0x00, 0x00, - 0x84, 0x92, 0x84, 0x92, 0x00, 0x00, - 0x55, 0x55, 0x55, 0x55, 0x00, 0x00, - 0x2a, 0x22, 0x2a, 0x22, 0x00, 0x00, - 0x31, 0x11, 0x31, 0x11, 0x00, 0x00, - 0x83, 0x42, 0x83, 0x42, 0x00, 0x00, - 0x06, 0x98, 0x06, 0x98, 0x00, 0x00, - 0x40, 0xe1, 0x40, 0xe1, 0x00, 0x00, - 0x2c, 0x44, 0x2c, 0x44, 0x00, 0x00, - 0xd8, 0x28, 0xd8, 0x28, 0x00, 0x00, - 0x92, 0x81, 0x92, 0x81, 0x00, 0x00, - 0x84, 0x32, 0x84, 0x32, 0x00, 0x00, - 0x68, 0x0c, 0x68, 0x0c, 0x00, 0x00 -}; - -const uint8_t kMaskRandom32_22[132] = { - 0x55, 0x55, 0x55, 0x55, 0x00, 0x00, - 0x2a, 0x22, 0x2a, 0x22, 0x00, 0x00, - 0x31, 0x11, 0x31, 0x11, 0x00, 0x00, - 0x83, 0x42, 0x83, 0x42, 0x00, 0x00, - 0x06, 0x98, 0x06, 0x98, 0x00, 0x00, - 0x40, 0xe1, 0x40, 0xe1, 0x00, 0x00, - 0x2c, 0x44, 0x2c, 0x44, 0x00, 0x00, - 0xd8, 0x28, 0xd8, 0x28, 0x00, 0x00, - 0x92, 0x81, 0x92, 0x81, 0x00, 0x00, - 0x84, 0x32, 0x84, 0x32, 0x00, 0x00, - 0x68, 0x0c, 0x68, 0x0c, 0x00, 0x00, - 0x45, 0x51, 0x45, 0x51, 0x00, 0x00, - 0x10, 0xa2, 0x10, 0xa2, 0x00, 0x00, - 0x01, 0x25, 0x01, 0x25, 0x00, 0x00, - 0x0b, 0x42, 0x0b, 0x42, 0x00, 0x00, - 0xd8, 0x20, 0xd8, 0x20, 0x00, 0x00, - 0x82, 0x8c, 0x82, 0x8c, 0x00, 0x00, - 0x24, 0x4a, 0x24, 0x4a, 0x00, 0x00, - 0x38, 0x18, 0x38, 0x18, 0x00, 0x00, - 0x2a, 0x25, 0x2a, 0x25, 0x00, 0x00, - 0x84, 0x92, 0x84, 0x92, 0x00, 0x00, - 0xeb, 0xb2, 0x22, 0x89, 0x00, 0x00 -}; - -const uint8_t kMaskRandom32_23[138] = { - 0x55, 0x55, 0x55, 0x55, 0x00, 0x00, - 0x2a, 0x22, 0x2a, 0x22, 0x00, 0x00, - 0x31, 0x11, 0x31, 0x11, 0x00, 0x00, - 0x83, 0x42, 0x83, 0x42, 0x00, 0x00, - 0x06, 0x98, 0x06, 0x98, 0x00, 0x00, - 0x40, 0xe1, 0x40, 0xe1, 0x00, 0x00, - 0x2c, 0x44, 0x2c, 0x44, 0x00, 0x00, - 0xd8, 0x28, 0xd8, 0x28, 0x00, 0x00, - 0x92, 0x81, 0x92, 0x81, 0x00, 0x00, - 0x84, 0x32, 0x84, 0x32, 0x00, 0x00, - 0x68, 0x0c, 0x68, 0x0c, 0x00, 0x00, - 0x84, 0x31, 0x84, 0x31, 0x00, 0x00, - 0x18, 0xa2, 0x18, 0xa2, 0x00, 0x00, - 0x4e, 0x01, 0x4e, 0x01, 0x00, 0x00, - 0x44, 0xc8, 0x44, 0xc8, 0x00, 0x00, - 0x0e, 0x90, 0x0e, 0x90, 0x00, 0x00, - 0x20, 0xcc, 0x20, 0xcc, 0x00, 0x00, - 0x93, 0x40, 0x93, 0x40, 0x00, 0x00, - 0x2d, 0x10, 0x2d, 0x10, 0x00, 0x00, - 0x31, 0x44, 0x31, 0x44, 0x00, 0x00, - 0xc0, 0x23, 0xc0, 0x23, 0x00, 0x00, - 0x11, 0x25, 0x11, 0x25, 0x00, 0x00, - 0xe8, 0x80, 0xe8, 0x80, 0x00, 0x00 -}; - -const uint8_t kMaskRandom32_24[144] = { - 0x84, 0x31, 0x84, 0x31, 0x00, 0x00, - 0x18, 0xa2, 0x18, 0xa2, 0x00, 0x00, - 0x4e, 0x01, 0x4e, 0x01, 0x00, 0x00, - 0x44, 0xc8, 0x44, 0xc8, 0x00, 0x00, - 0x0e, 0x90, 0x0e, 0x90, 0x00, 0x00, - 0x20, 0xcc, 0x20, 0xcc, 0x00, 0x00, - 0x93, 0x40, 0x93, 0x40, 0x00, 0x00, - 0x2d, 0x10, 0x2d, 0x10, 0x00, 0x00, - 0x31, 0x44, 0x31, 0x44, 0x00, 0x00, - 0xc0, 0x23, 0xc0, 0x23, 0x00, 0x00, - 0x11, 0x25, 0x11, 0x25, 0x00, 0x00, - 0xe8, 0x80, 0xe8, 0x80, 0x00, 0x00, - 0x55, 0x55, 0x55, 0x55, 0x00, 0x00, - 0x2a, 0x22, 0x2a, 0x22, 0x00, 0x00, - 0x31, 0x11, 0x31, 0x11, 0x00, 0x00, - 0x83, 0x42, 0x83, 0x42, 0x00, 0x00, - 0x06, 0x98, 0x06, 0x98, 0x00, 0x00, - 0x40, 0xe1, 0x40, 0xe1, 0x00, 0x00, - 0x2c, 0x44, 0x2c, 0x44, 0x00, 0x00, - 0xd8, 0x28, 0xd8, 0x28, 0x00, 0x00, - 0x92, 0x81, 0x92, 0x81, 0x00, 0x00, - 0x84, 0x32, 0x84, 0x32, 0x00, 0x00, - 0x68, 0x0c, 0x68, 0x0c, 0x00, 0x00, - 0xf3, 0x5a, 0x2f, 0x5d, 0x00, 0x00 -}; - -const uint8_t kMaskRandom32_25[150] = { - 0x84, 0x31, 0x84, 0x31, 0x00, 0x00, - 0x18, 0xa2, 0x18, 0xa2, 0x00, 0x00, - 0x4e, 0x01, 0x4e, 0x01, 0x00, 0x00, - 0x44, 0xc8, 0x44, 0xc8, 0x00, 0x00, - 0x0e, 0x90, 0x0e, 0x90, 0x00, 0x00, - 0x20, 0xcc, 0x20, 0xcc, 0x00, 0x00, - 0x93, 0x40, 0x93, 0x40, 0x00, 0x00, - 0x2d, 0x10, 0x2d, 0x10, 0x00, 0x00, - 0x31, 0x44, 0x31, 0x44, 0x00, 0x00, - 0xc0, 0x23, 0xc0, 0x23, 0x00, 0x00, - 0x11, 0x25, 0x11, 0x25, 0x00, 0x00, - 0xe8, 0x80, 0xe8, 0x80, 0x00, 0x00, - 0x45, 0x15, 0x45, 0x15, 0x00, 0x00, - 0x22, 0x22, 0x22, 0x22, 0x00, 0x00, - 0x96, 0x0c, 0x96, 0x0c, 0x00, 0x00, - 0x0c, 0x50, 0x0c, 0x50, 0x00, 0x00, - 0x62, 0x04, 0x62, 0x04, 0x00, 0x00, - 0x49, 0x06, 0x49, 0x06, 0x00, 0x00, - 0x11, 0x82, 0x11, 0x82, 0x00, 0x00, - 0x12, 0x38, 0x12, 0x38, 0x00, 0x00, - 0x40, 0x71, 0x40, 0x71, 0x00, 0x00, - 0xa8, 0x8a, 0xa8, 0x8a, 0x00, 0x00, - 0x08, 0xa1, 0x08, 0xa1, 0x00, 0x00, - 0xa0, 0xc0, 0xa0, 0xc0, 0x00, 0x00, - 0xc5, 0x10, 0xc5, 0x10, 0x00, 0x00 -}; - -const uint8_t kMaskRandom32_26[156] = { - 0x45, 0x15, 0x45, 0x15, 0x00, 0x00, - 0x22, 0x22, 0x22, 0x22, 0x00, 0x00, - 0x96, 0x0c, 0x96, 0x0c, 0x00, 0x00, - 0x0c, 0x50, 0x0c, 0x50, 0x00, 0x00, - 0x62, 0x04, 0x62, 0x04, 0x00, 0x00, - 0x49, 0x06, 0x49, 0x06, 0x00, 0x00, - 0x11, 0x82, 0x11, 0x82, 0x00, 0x00, - 0x12, 0x38, 0x12, 0x38, 0x00, 0x00, - 0x40, 0x71, 0x40, 0x71, 0x00, 0x00, - 0xa8, 0x8a, 0xa8, 0x8a, 0x00, 0x00, - 0x08, 0xa1, 0x08, 0xa1, 0x00, 0x00, - 0xa0, 0xc0, 0xa0, 0xc0, 0x00, 0x00, - 0xc5, 0x10, 0xc5, 0x10, 0x00, 0x00, - 0x84, 0x31, 0x84, 0x31, 0x00, 0x00, - 0x18, 0xa2, 0x18, 0xa2, 0x00, 0x00, - 0x4e, 0x01, 0x4e, 0x01, 0x00, 0x00, - 0x44, 0xc8, 0x44, 0xc8, 0x00, 0x00, - 0x0e, 0x90, 0x0e, 0x90, 0x00, 0x00, - 0x20, 0xcc, 0x20, 0xcc, 0x00, 0x00, - 0x93, 0x40, 0x93, 0x40, 0x00, 0x00, - 0x2d, 0x10, 0x2d, 0x10, 0x00, 0x00, - 0x31, 0x44, 0x31, 0x44, 0x00, 0x00, - 0xc0, 0x23, 0xc0, 0x23, 0x00, 0x00, - 0x11, 0x25, 0x11, 0x25, 0x00, 0x00, - 0xe8, 0x80, 0xe8, 0x80, 0x00, 0x00, - 0x52, 0x15, 0x62, 0x0a, 0x00, 0x00 -}; - -const uint8_t kMaskRandom32_27[162] = { - 0x45, 0x15, 0x45, 0x15, 0x00, 0x00, - 0x22, 0x22, 0x22, 0x22, 0x00, 0x00, - 0x96, 0x0c, 0x96, 0x0c, 0x00, 0x00, - 0x0c, 0x50, 0x0c, 0x50, 0x00, 0x00, - 0x62, 0x04, 0x62, 0x04, 0x00, 0x00, - 0x49, 0x06, 0x49, 0x06, 0x00, 0x00, - 0x11, 0x82, 0x11, 0x82, 0x00, 0x00, - 0x12, 0x38, 0x12, 0x38, 0x00, 0x00, - 0x40, 0x71, 0x40, 0x71, 0x00, 0x00, - 0xa8, 0x8a, 0xa8, 0x8a, 0x00, 0x00, - 0x08, 0xa1, 0x08, 0xa1, 0x00, 0x00, - 0xa0, 0xc0, 0xa0, 0xc0, 0x00, 0x00, - 0xc5, 0x10, 0xc5, 0x10, 0x00, 0x00, - 0x45, 0x51, 0x45, 0x51, 0x00, 0x00, - 0x22, 0x0a, 0x22, 0x0a, 0x00, 0x00, - 0x84, 0xd0, 0x84, 0xd0, 0x00, 0x00, - 0x0c, 0x8a, 0x0c, 0x8a, 0x00, 0x00, - 0x18, 0x06, 0x18, 0x06, 0x00, 0x00, - 0x30, 0x03, 0x30, 0x03, 0x00, 0x00, - 0x61, 0x08, 0x61, 0x08, 0x00, 0x00, - 0x40, 0x11, 0x40, 0x11, 0x00, 0x00, - 0x10, 0x2c, 0x10, 0x2c, 0x00, 0x00, - 0x09, 0x60, 0x09, 0x60, 0x00, 0x00, - 0x00, 0x94, 0x00, 0x94, 0x00, 0x00, - 0x52, 0x40, 0x52, 0x40, 0x00, 0x00, - 0xa4, 0x24, 0xa4, 0x24, 0x00, 0x00, - 0x82, 0x88, 0x82, 0x88, 0x00, 0x00 -}; - -const uint8_t kMaskRandom32_28[168] = { - 0x45, 0x51, 0x45, 0x51, 0x00, 0x00, - 0x22, 0x0a, 0x22, 0x0a, 0x00, 0x00, - 0x84, 0xd0, 0x84, 0xd0, 0x00, 0x00, - 0x0c, 0x8a, 0x0c, 0x8a, 0x00, 0x00, - 0x18, 0x06, 0x18, 0x06, 0x00, 0x00, - 0x30, 0x03, 0x30, 0x03, 0x00, 0x00, - 0x61, 0x08, 0x61, 0x08, 0x00, 0x00, - 0x40, 0x11, 0x40, 0x11, 0x00, 0x00, - 0x10, 0x2c, 0x10, 0x2c, 0x00, 0x00, - 0x09, 0x60, 0x09, 0x60, 0x00, 0x00, - 0x00, 0x94, 0x00, 0x94, 0x00, 0x00, - 0x52, 0x40, 0x52, 0x40, 0x00, 0x00, - 0xa4, 0x24, 0xa4, 0x24, 0x00, 0x00, - 0x82, 0x88, 0x82, 0x88, 0x00, 0x00, - 0x45, 0x15, 0x45, 0x15, 0x00, 0x00, - 0x22, 0x22, 0x22, 0x22, 0x00, 0x00, - 0x96, 0x0c, 0x96, 0x0c, 0x00, 0x00, - 0x0c, 0x50, 0x0c, 0x50, 0x00, 0x00, - 0x62, 0x04, 0x62, 0x04, 0x00, 0x00, - 0x49, 0x06, 0x49, 0x06, 0x00, 0x00, - 0x11, 0x82, 0x11, 0x82, 0x00, 0x00, - 0x12, 0x38, 0x12, 0x38, 0x00, 0x00, - 0x40, 0x71, 0x40, 0x71, 0x00, 0x00, - 0xa8, 0x8a, 0xa8, 0x8a, 0x00, 0x00, - 0x08, 0xa1, 0x08, 0xa1, 0x00, 0x00, - 0xa0, 0xc0, 0xa0, 0xc0, 0x00, 0x00, - 0xc5, 0x10, 0xc5, 0x10, 0x00, 0x00, - 0x7f, 0xe2, 0xbc, 0x01, 0x00, 0x00 -}; - -const uint8_t kMaskRandom32_29[174] = { - 0x45, 0x51, 0x45, 0x51, 0x00, 0x00, - 0x22, 0x0a, 0x22, 0x0a, 0x00, 0x00, - 0x84, 0xd0, 0x84, 0xd0, 0x00, 0x00, - 0x0c, 0x8a, 0x0c, 0x8a, 0x00, 0x00, - 0x18, 0x06, 0x18, 0x06, 0x00, 0x00, - 0x30, 0x03, 0x30, 0x03, 0x00, 0x00, - 0x61, 0x08, 0x61, 0x08, 0x00, 0x00, - 0x40, 0x11, 0x40, 0x11, 0x00, 0x00, - 0x10, 0x2c, 0x10, 0x2c, 0x00, 0x00, - 0x09, 0x60, 0x09, 0x60, 0x00, 0x00, - 0x00, 0x94, 0x00, 0x94, 0x00, 0x00, - 0x52, 0x40, 0x52, 0x40, 0x00, 0x00, - 0xa4, 0x24, 0xa4, 0x24, 0x00, 0x00, - 0x82, 0x88, 0x82, 0x88, 0x00, 0x00, - 0x55, 0x11, 0x55, 0x11, 0x00, 0x00, - 0x22, 0x22, 0x22, 0x22, 0x00, 0x00, - 0x11, 0x11, 0x11, 0x11, 0x00, 0x00, - 0x80, 0x45, 0x80, 0x45, 0x00, 0x00, - 0x20, 0x1a, 0x20, 0x1a, 0x00, 0x00, - 0x08, 0x68, 0x08, 0x68, 0x00, 0x00, - 0x22, 0x84, 0x22, 0x84, 0x00, 0x00, - 0x48, 0x09, 0x48, 0x09, 0x00, 0x00, - 0x07, 0x01, 0x07, 0x01, 0x00, 0x00, - 0x94, 0x20, 0x94, 0x20, 0x00, 0x00, - 0x82, 0x06, 0x82, 0x06, 0x00, 0x00, - 0x60, 0x48, 0x60, 0x48, 0x00, 0x00, - 0x89, 0x80, 0x89, 0x80, 0x00, 0x00, - 0x00, 0x8e, 0x00, 0x8e, 0x00, 0x00, - 0x18, 0x22, 0x18, 0x22, 0x00, 0x00 -}; - -const uint8_t kMaskRandom32_3[18] = { - 0xad, 0x2d, 0xad, 0x2d, 0x00, 0x00, - 0x76, 0x36, 0x76, 0x36, 0x00, 0x00, - 0x26, 0xdb, 0x26, 0xdb, 0x00, 0x00 -}; - -const uint8_t kMaskRandom32_30[180] = { - 0x55, 0x11, 0x55, 0x11, 0x00, 0x00, - 0x22, 0x22, 0x22, 0x22, 0x00, 0x00, - 0x11, 0x11, 0x11, 0x11, 0x00, 0x00, - 0x80, 0x45, 0x80, 0x45, 0x00, 0x00, - 0x20, 0x1a, 0x20, 0x1a, 0x00, 0x00, - 0x08, 0x68, 0x08, 0x68, 0x00, 0x00, - 0x22, 0x84, 0x22, 0x84, 0x00, 0x00, - 0x48, 0x09, 0x48, 0x09, 0x00, 0x00, - 0x07, 0x01, 0x07, 0x01, 0x00, 0x00, - 0x94, 0x20, 0x94, 0x20, 0x00, 0x00, - 0x82, 0x06, 0x82, 0x06, 0x00, 0x00, - 0x60, 0x48, 0x60, 0x48, 0x00, 0x00, - 0x89, 0x80, 0x89, 0x80, 0x00, 0x00, - 0x00, 0x8e, 0x00, 0x8e, 0x00, 0x00, - 0x18, 0x22, 0x18, 0x22, 0x00, 0x00, - 0x45, 0x51, 0x45, 0x51, 0x00, 0x00, - 0x22, 0x0a, 0x22, 0x0a, 0x00, 0x00, - 0x84, 0xd0, 0x84, 0xd0, 0x00, 0x00, - 0x0c, 0x8a, 0x0c, 0x8a, 0x00, 0x00, - 0x18, 0x06, 0x18, 0x06, 0x00, 0x00, - 0x30, 0x03, 0x30, 0x03, 0x00, 0x00, - 0x61, 0x08, 0x61, 0x08, 0x00, 0x00, - 0x40, 0x11, 0x40, 0x11, 0x00, 0x00, - 0x10, 0x2c, 0x10, 0x2c, 0x00, 0x00, - 0x09, 0x60, 0x09, 0x60, 0x00, 0x00, - 0x00, 0x94, 0x00, 0x94, 0x00, 0x00, - 0x52, 0x40, 0x52, 0x40, 0x00, 0x00, - 0xa4, 0x24, 0xa4, 0x24, 0x00, 0x00, - 0x82, 0x88, 0x82, 0x88, 0x00, 0x00, - 0x1e, 0x27, 0xe2, 0xd8, 0x00, 0x00 -}; - -const uint8_t kMaskRandom32_31[186] = { - 0x55, 0x11, 0x55, 0x11, 0x00, 0x00, - 0x22, 0x22, 0x22, 0x22, 0x00, 0x00, - 0x11, 0x11, 0x11, 0x11, 0x00, 0x00, - 0x80, 0x45, 0x80, 0x45, 0x00, 0x00, - 0x20, 0x1a, 0x20, 0x1a, 0x00, 0x00, - 0x08, 0x68, 0x08, 0x68, 0x00, 0x00, - 0x22, 0x84, 0x22, 0x84, 0x00, 0x00, - 0x48, 0x09, 0x48, 0x09, 0x00, 0x00, - 0x07, 0x01, 0x07, 0x01, 0x00, 0x00, - 0x94, 0x20, 0x94, 0x20, 0x00, 0x00, - 0x82, 0x06, 0x82, 0x06, 0x00, 0x00, - 0x60, 0x48, 0x60, 0x48, 0x00, 0x00, - 0x89, 0x80, 0x89, 0x80, 0x00, 0x00, - 0x00, 0x8e, 0x00, 0x8e, 0x00, 0x00, - 0x18, 0x22, 0x18, 0x22, 0x00, 0x00, - 0xa4, 0x10, 0xa4, 0x10, 0x00, 0x00, - 0x01, 0x2a, 0x01, 0x2a, 0x00, 0x00, - 0x06, 0x42, 0x06, 0x42, 0x00, 0x00, - 0x08, 0x68, 0x08, 0x68, 0x00, 0x00, - 0x81, 0x90, 0x81, 0x90, 0x00, 0x00, - 0x00, 0xf0, 0x00, 0xf0, 0x00, 0x00, - 0x50, 0x05, 0x50, 0x05, 0x00, 0x00, - 0x20, 0x51, 0x20, 0x51, 0x00, 0x00, - 0x43, 0x08, 0x43, 0x08, 0x00, 0x00, - 0x68, 0x80, 0x68, 0x80, 0x00, 0x00, - 0x80, 0x0b, 0x80, 0x0b, 0x00, 0x00, - 0x10, 0x4c, 0x10, 0x4c, 0x00, 0x00, - 0x12, 0x30, 0x12, 0x30, 0x00, 0x00, - 0x40, 0x85, 0x40, 0x85, 0x00, 0x00, - 0x0e, 0x04, 0x0e, 0x04, 0x00, 0x00, - 0x18, 0x12, 0x18, 0x12, 0x00, 0x00 -}; - -const uint8_t kMaskRandom32_32[192] = { - 0xa4, 0x10, 0xa4, 0x10, 0x00, 0x00, - 0x01, 0x2a, 0x01, 0x2a, 0x00, 0x00, - 0x06, 0x42, 0x06, 0x42, 0x00, 0x00, - 0x08, 0x68, 0x08, 0x68, 0x00, 0x00, - 0x81, 0x90, 0x81, 0x90, 0x00, 0x00, - 0x00, 0xf0, 0x00, 0xf0, 0x00, 0x00, - 0x50, 0x05, 0x50, 0x05, 0x00, 0x00, - 0x20, 0x51, 0x20, 0x51, 0x00, 0x00, - 0x43, 0x08, 0x43, 0x08, 0x00, 0x00, - 0x68, 0x80, 0x68, 0x80, 0x00, 0x00, - 0x80, 0x0b, 0x80, 0x0b, 0x00, 0x00, - 0x10, 0x4c, 0x10, 0x4c, 0x00, 0x00, - 0x12, 0x30, 0x12, 0x30, 0x00, 0x00, - 0x40, 0x85, 0x40, 0x85, 0x00, 0x00, - 0x0e, 0x04, 0x0e, 0x04, 0x00, 0x00, - 0x18, 0x12, 0x18, 0x12, 0x00, 0x00, - 0x55, 0x11, 0x55, 0x11, 0x00, 0x00, - 0x22, 0x22, 0x22, 0x22, 0x00, 0x00, - 0x11, 0x11, 0x11, 0x11, 0x00, 0x00, - 0x80, 0x45, 0x80, 0x45, 0x00, 0x00, - 0x20, 0x1a, 0x20, 0x1a, 0x00, 0x00, - 0x08, 0x68, 0x08, 0x68, 0x00, 0x00, - 0x22, 0x84, 0x22, 0x84, 0x00, 0x00, - 0x48, 0x09, 0x48, 0x09, 0x00, 0x00, - 0x07, 0x01, 0x07, 0x01, 0x00, 0x00, - 0x94, 0x20, 0x94, 0x20, 0x00, 0x00, - 0x82, 0x06, 0x82, 0x06, 0x00, 0x00, - 0x60, 0x48, 0x60, 0x48, 0x00, 0x00, - 0x89, 0x80, 0x89, 0x80, 0x00, 0x00, - 0x00, 0x8e, 0x00, 0x8e, 0x00, 0x00, - 0x18, 0x22, 0x18, 0x22, 0x00, 0x00, - 0x60, 0xc4, 0x02, 0x02, 0x00, 0x00 -}; - -const uint8_t kMaskRandom32_4[24] = { - 0x55, 0x55, 0x55, 0x55, 0x00, 0x00, - 0xaa, 0xaa, 0xaa, 0xaa, 0x00, 0x00, - 0x35, 0x35, 0x35, 0x35, 0x00, 0x00, - 0xca, 0xca, 0xca, 0xca, 0x00, 0x00 -}; - -const uint8_t kMaskRandom32_5[30] = { - 0x55, 0x55, 0x55, 0x55, 0x00, 0x00, - 0x2a, 0x2a, 0x2a, 0x2a, 0x00, 0x00, - 0x24, 0x25, 0x24, 0x25, 0x00, 0x00, - 0x84, 0xc8, 0x84, 0xc8, 0x00, 0x00, - 0x10, 0xb6, 0x10, 0xb6, 0x00, 0x00 -}; - -const uint8_t kMaskRandom32_6[36] = { - 0x51, 0x51, 0x51, 0x51, 0x00, 0x00, - 0x0a, 0x2a, 0x0a, 0x2a, 0x00, 0x00, - 0xa2, 0x15, 0xa2, 0x15, 0x00, 0x00, - 0x84, 0x4a, 0x84, 0x4a, 0x00, 0x00, - 0x30, 0x92, 0x30, 0x92, 0x00, 0x00, - 0x04, 0xac, 0x04, 0xac, 0x00, 0x00 -}; - -const uint8_t kMaskRandom32_7[42] = { - 0x45, 0x51, 0x45, 0x51, 0x00, 0x00, - 0x22, 0x2a, 0x22, 0x2a, 0x00, 0x00, - 0x91, 0x11, 0x91, 0x11, 0x00, 0x00, - 0x2e, 0x08, 0x2e, 0x08, 0x00, 0x00, - 0x48, 0x34, 0x48, 0x34, 0x00, 0x00, - 0x90, 0x29, 0x90, 0x29, 0x00, 0x00, - 0x09, 0x86, 0x09, 0x86, 0x00, 0x00 -}; - -const uint8_t kMaskRandom32_8[48] = { - 0x20, 0x54, 0x20, 0x54, 0x00, 0x00, - 0x18, 0x88, 0x18, 0x88, 0x00, 0x00, - 0x84, 0x07, 0x84, 0x07, 0x00, 0x00, - 0x60, 0x48, 0x60, 0x48, 0x00, 0x00, - 0x12, 0x82, 0x12, 0x82, 0x00, 0x00, - 0x81, 0x41, 0x81, 0x41, 0x00, 0x00, - 0x40, 0x62, 0x40, 0x62, 0x00, 0x00, - 0x16, 0x30, 0x16, 0x30, 0x00, 0x00 -}; - -const uint8_t kMaskRandom32_9[54] = { - 0x55, 0x51, 0x55, 0x51, 0x00, 0x00, - 0x22, 0x2a, 0x22, 0x2a, 0x00, 0x00, - 0x05, 0x85, 0x05, 0x85, 0x00, 0x00, - 0x09, 0x4a, 0x09, 0x4a, 0x00, 0x00, - 0x84, 0x32, 0x84, 0x32, 0x00, 0x00, - 0xc0, 0x0d, 0xc0, 0x0d, 0x00, 0x00, - 0x20, 0xa6, 0x20, 0xa6, 0x00, 0x00, - 0x1a, 0x09, 0x1a, 0x09, 0x00, 0x00, - 0x44, 0x64, 0x44, 0x64, 0x00, 0x00 -}; - -const uint8_t kMaskRandom33_1[6] = { - 0xff, 0xff, 0xff, 0xff, 0x80, 0x00 -}; - -const uint8_t kMaskRandom33_10[60] = { - 0x45, 0x51, 0x55, 0x8c, 0x80, 0x00, - 0x10, 0xa2, 0xaa, 0x27, 0x00, 0x00, - 0x01, 0x25, 0xa5, 0x32, 0x80, 0x00, - 0x0b, 0x42, 0x62, 0x61, 0x80, 0x00, - 0xd8, 0x20, 0x3c, 0x5c, 0x00, 0x00, - 0x82, 0x8c, 0x8e, 0xcc, 0x00, 0x00, - 0x24, 0x4a, 0x6a, 0x2b, 0x00, 0x00, - 0x38, 0x18, 0x36, 0x32, 0x80, 0x00, - 0x2a, 0x25, 0xd1, 0x25, 0x80, 0x00, - 0x84, 0x92, 0xc8, 0x02, 0x80, 0x00 -}; - -const uint8_t kMaskRandom33_11[66] = { - 0x55, 0x55, 0x55, 0x8c, 0x80, 0x00, - 0x2a, 0x22, 0xaa, 0x27, 0x00, 0x00, - 0x31, 0x11, 0xa5, 0x32, 0x80, 0x00, - 0x83, 0x42, 0x62, 0x61, 0x80, 0x00, - 0x06, 0x98, 0x3c, 0x5c, 0x00, 0x00, - 0x40, 0xe1, 0x51, 0x84, 0x80, 0x00, - 0x2c, 0x44, 0xa2, 0x27, 0x00, 0x00, - 0xd8, 0x28, 0x95, 0x51, 0x80, 0x00, - 0x92, 0x81, 0x4a, 0x1a, 0x00, 0x00, - 0x84, 0x32, 0x30, 0x68, 0x00, 0x00, - 0x68, 0x0c, 0x2c, 0x89, 0x00, 0x00 -}; - -const uint8_t kMaskRandom33_12[72] = { - 0x84, 0x31, 0x51, 0x84, 0x80, 0x00, - 0x18, 0xa2, 0xa2, 0x27, 0x00, 0x00, - 0x4e, 0x01, 0x95, 0x51, 0x80, 0x00, - 0x44, 0xc8, 0x4a, 0x1a, 0x00, 0x00, - 0x0e, 0x90, 0x30, 0x68, 0x00, 0x00, - 0x20, 0xcc, 0x2c, 0x89, 0x00, 0x00, - 0x93, 0x40, 0x55, 0x8c, 0x80, 0x00, - 0x2d, 0x10, 0xaa, 0x27, 0x00, 0x00, - 0x31, 0x44, 0xa5, 0x32, 0x80, 0x00, - 0xc0, 0x23, 0x62, 0x61, 0x80, 0x00, - 0x11, 0x25, 0x3c, 0x5c, 0x00, 0x00, - 0xe8, 0x80, 0x51, 0x35, 0x00, 0x00 -}; - -const uint8_t kMaskRandom33_13[78] = { - 0x45, 0x15, 0x51, 0x84, 0x80, 0x00, - 0x22, 0x22, 0xa2, 0x27, 0x00, 0x00, - 0x96, 0x0c, 0x95, 0x51, 0x80, 0x00, - 0x0c, 0x50, 0x4a, 0x1a, 0x00, 0x00, - 0x62, 0x04, 0x30, 0x68, 0x00, 0x00, - 0x49, 0x06, 0x2c, 0x89, 0x00, 0x00, - 0x11, 0x82, 0x15, 0x8c, 0x00, 0x00, - 0x12, 0x38, 0x8a, 0x47, 0x00, 0x00, - 0x40, 0x71, 0x25, 0x81, 0x80, 0x00, - 0xa8, 0x8a, 0x62, 0x12, 0x80, 0x00, - 0x08, 0xa1, 0x58, 0x58, 0x00, 0x00, - 0xa0, 0xc0, 0x0e, 0x28, 0x80, 0x00, - 0xc5, 0x10, 0x83, 0x34, 0x00, 0x00 -}; - -const uint8_t kMaskRandom33_14[84] = { - 0x45, 0x51, 0x15, 0x8c, 0x00, 0x00, - 0x22, 0x0a, 0x8a, 0x47, 0x00, 0x00, - 0x84, 0xd0, 0x25, 0x81, 0x80, 0x00, - 0x0c, 0x8a, 0x62, 0x12, 0x80, 0x00, - 0x18, 0x06, 0x58, 0x58, 0x00, 0x00, - 0x30, 0x03, 0x0e, 0x28, 0x80, 0x00, - 0x61, 0x08, 0x83, 0x34, 0x00, 0x00, - 0x40, 0x11, 0x51, 0x84, 0x80, 0x00, - 0x10, 0x2c, 0xa2, 0x27, 0x00, 0x00, - 0x09, 0x60, 0x95, 0x51, 0x80, 0x00, - 0x00, 0x94, 0x4a, 0x1a, 0x00, 0x00, - 0x52, 0x40, 0x30, 0x68, 0x00, 0x00, - 0xa4, 0x24, 0x2c, 0x89, 0x00, 0x00, - 0x82, 0x88, 0xb0, 0xde, 0x80, 0x00 -}; - -const uint8_t kMaskRandom33_15[90] = { - 0x55, 0x11, 0x15, 0x8c, 0x00, 0x00, - 0x22, 0x22, 0x8a, 0x47, 0x00, 0x00, - 0x11, 0x11, 0x25, 0x81, 0x80, 0x00, - 0x80, 0x45, 0x62, 0x12, 0x80, 0x00, - 0x20, 0x1a, 0x58, 0x58, 0x00, 0x00, - 0x08, 0x68, 0x0e, 0x28, 0x80, 0x00, - 0x22, 0x84, 0x83, 0x34, 0x00, 0x00, - 0x48, 0x09, 0x25, 0x2c, 0x00, 0x00, - 0x07, 0x01, 0x8a, 0x91, 0x00, 0x00, - 0x94, 0x20, 0x91, 0xc0, 0x80, 0x00, - 0x82, 0x06, 0x68, 0x06, 0x80, 0x00, - 0x60, 0x48, 0x32, 0xc8, 0x00, 0x00, - 0x89, 0x80, 0x43, 0x45, 0x00, 0x00, - 0x00, 0x8e, 0xc4, 0x30, 0x80, 0x00, - 0x18, 0x22, 0x1c, 0xa2, 0x00, 0x00 -}; - -const uint8_t kMaskRandom33_16[96] = { - 0xa4, 0x10, 0x25, 0x2c, 0x00, 0x00, - 0x01, 0x2a, 0x8a, 0x91, 0x00, 0x00, - 0x06, 0x42, 0x91, 0xc0, 0x80, 0x00, - 0x08, 0x68, 0x68, 0x06, 0x80, 0x00, - 0x81, 0x90, 0x32, 0xc8, 0x00, 0x00, - 0x00, 0xf0, 0x43, 0x45, 0x00, 0x00, - 0x50, 0x05, 0xc4, 0x30, 0x80, 0x00, - 0x20, 0x51, 0x1c, 0xa2, 0x00, 0x00, - 0x43, 0x08, 0x15, 0x8c, 0x00, 0x00, - 0x68, 0x80, 0x8a, 0x47, 0x00, 0x00, - 0x80, 0x0b, 0x25, 0x81, 0x80, 0x00, - 0x10, 0x4c, 0x62, 0x12, 0x80, 0x00, - 0x12, 0x30, 0x58, 0x58, 0x00, 0x00, - 0x40, 0x85, 0x0e, 0x28, 0x80, 0x00, - 0x0e, 0x04, 0x83, 0x34, 0x00, 0x00, - 0x18, 0x12, 0x0a, 0x1c, 0x00, 0x00 -}; - -const uint8_t kMaskRandom33_17[102] = { - 0x20, 0x54, 0x64, 0x16, 0x00, 0x00, - 0x18, 0x88, 0xa2, 0xc2, 0x00, 0x00, - 0x84, 0x07, 0x51, 0x60, 0x80, 0x00, - 0x60, 0x48, 0x4a, 0x85, 0x00, 0x00, - 0x12, 0x82, 0x38, 0x4c, 0x00, 0x00, - 0x81, 0x41, 0x89, 0x29, 0x00, 0x00, - 0x40, 0x62, 0x07, 0x11, 0x80, 0x00, - 0x16, 0x30, 0x94, 0xb0, 0x00, 0x00, - 0x55, 0x51, 0x8e, 0xcc, 0x00, 0x00, - 0x22, 0x2a, 0x6a, 0x2b, 0x00, 0x00, - 0x05, 0x85, 0x36, 0x32, 0x80, 0x00, - 0x09, 0x4a, 0xd1, 0x25, 0x80, 0x00, - 0x84, 0x32, 0x55, 0x8c, 0x80, 0x00, - 0xc0, 0x0d, 0xaa, 0x27, 0x00, 0x00, - 0x20, 0xa6, 0xa5, 0x32, 0x80, 0x00, - 0x1a, 0x09, 0x62, 0x61, 0x80, 0x00, - 0x44, 0x64, 0x3c, 0x5c, 0x00, 0x00 -}; - -const uint8_t kMaskRandom33_18[108] = { - 0x55, 0x51, 0x8e, 0xcc, 0x00, 0x00, - 0x22, 0x2a, 0x6a, 0x2b, 0x00, 0x00, - 0x05, 0x85, 0x36, 0x32, 0x80, 0x00, - 0x09, 0x4a, 0xd1, 0x25, 0x80, 0x00, - 0x84, 0x32, 0x55, 0x8c, 0x80, 0x00, - 0xc0, 0x0d, 0xaa, 0x27, 0x00, 0x00, - 0x20, 0xa6, 0xa5, 0x32, 0x80, 0x00, - 0x1a, 0x09, 0x62, 0x61, 0x80, 0x00, - 0x44, 0x64, 0x3c, 0x5c, 0x00, 0x00, - 0x20, 0x54, 0x64, 0x16, 0x00, 0x00, - 0x18, 0x88, 0xa2, 0xc2, 0x00, 0x00, - 0x84, 0x07, 0x51, 0x60, 0x80, 0x00, - 0x60, 0x48, 0x4a, 0x85, 0x00, 0x00, - 0x12, 0x82, 0x38, 0x4c, 0x00, 0x00, - 0x81, 0x41, 0x89, 0x29, 0x00, 0x00, - 0x40, 0x62, 0x07, 0x11, 0x80, 0x00, - 0x16, 0x30, 0x94, 0xb0, 0x00, 0x00, - 0x89, 0x53, 0x03, 0xad, 0x00, 0x00 -}; - -const uint8_t kMaskRandom33_19[114] = { - 0x55, 0x51, 0x8e, 0xcc, 0x00, 0x00, - 0x22, 0x2a, 0x6a, 0x2b, 0x00, 0x00, - 0x05, 0x85, 0x36, 0x32, 0x80, 0x00, - 0x09, 0x4a, 0xd1, 0x25, 0x80, 0x00, - 0x84, 0x32, 0x55, 0x8c, 0x80, 0x00, - 0xc0, 0x0d, 0xaa, 0x27, 0x00, 0x00, - 0x20, 0xa6, 0xa5, 0x32, 0x80, 0x00, - 0x1a, 0x09, 0x62, 0x61, 0x80, 0x00, - 0x44, 0x64, 0x3c, 0x5c, 0x00, 0x00, - 0x45, 0x51, 0x55, 0x8c, 0x80, 0x00, - 0x10, 0xa2, 0xaa, 0x27, 0x00, 0x00, - 0x01, 0x25, 0xa5, 0x32, 0x80, 0x00, - 0x0b, 0x42, 0x62, 0x61, 0x80, 0x00, - 0xd8, 0x20, 0x3c, 0x5c, 0x00, 0x00, - 0x82, 0x8c, 0x8e, 0xcc, 0x00, 0x00, - 0x24, 0x4a, 0x6a, 0x2b, 0x00, 0x00, - 0x38, 0x18, 0x36, 0x32, 0x80, 0x00, - 0x2a, 0x25, 0xd1, 0x25, 0x80, 0x00, - 0x84, 0x92, 0xc8, 0x02, 0x80, 0x00 -}; - -const uint8_t kMaskRandom33_2[12] = { - 0xae, 0xae, 0xce, 0xce, 0x00, 0x00, - 0x79, 0x79, 0xb9, 0x39, 0x80, 0x00 -}; - -const uint8_t kMaskRandom33_20[120] = { - 0x45, 0x51, 0x55, 0x8c, 0x80, 0x00, - 0x10, 0xa2, 0xaa, 0x27, 0x00, 0x00, - 0x01, 0x25, 0xa5, 0x32, 0x80, 0x00, - 0x0b, 0x42, 0x62, 0x61, 0x80, 0x00, - 0xd8, 0x20, 0x3c, 0x5c, 0x00, 0x00, - 0x82, 0x8c, 0x8e, 0xcc, 0x00, 0x00, - 0x24, 0x4a, 0x6a, 0x2b, 0x00, 0x00, - 0x38, 0x18, 0x36, 0x32, 0x80, 0x00, - 0x2a, 0x25, 0xd1, 0x25, 0x80, 0x00, - 0x84, 0x92, 0xc8, 0x02, 0x80, 0x00, - 0x55, 0x51, 0x8e, 0xcc, 0x00, 0x00, - 0x22, 0x2a, 0x6a, 0x2b, 0x00, 0x00, - 0x05, 0x85, 0x36, 0x32, 0x80, 0x00, - 0x09, 0x4a, 0xd1, 0x25, 0x80, 0x00, - 0x84, 0x32, 0x55, 0x8c, 0x80, 0x00, - 0xc0, 0x0d, 0xaa, 0x27, 0x00, 0x00, - 0x20, 0xa6, 0xa5, 0x32, 0x80, 0x00, - 0x1a, 0x09, 0x62, 0x61, 0x80, 0x00, - 0x44, 0x64, 0x3c, 0x5c, 0x00, 0x00, - 0x73, 0x5f, 0x5b, 0x0e, 0x80, 0x00 -}; - -const uint8_t kMaskRandom33_21[126] = { - 0x45, 0x51, 0x55, 0x8c, 0x80, 0x00, - 0x10, 0xa2, 0xaa, 0x27, 0x00, 0x00, - 0x01, 0x25, 0xa5, 0x32, 0x80, 0x00, - 0x0b, 0x42, 0x62, 0x61, 0x80, 0x00, - 0xd8, 0x20, 0x3c, 0x5c, 0x00, 0x00, - 0x82, 0x8c, 0x8e, 0xcc, 0x00, 0x00, - 0x24, 0x4a, 0x6a, 0x2b, 0x00, 0x00, - 0x38, 0x18, 0x36, 0x32, 0x80, 0x00, - 0x2a, 0x25, 0xd1, 0x25, 0x80, 0x00, - 0x84, 0x92, 0xc8, 0x02, 0x80, 0x00, - 0x55, 0x55, 0x55, 0x8c, 0x80, 0x00, - 0x2a, 0x22, 0xaa, 0x27, 0x00, 0x00, - 0x31, 0x11, 0xa5, 0x32, 0x80, 0x00, - 0x83, 0x42, 0x62, 0x61, 0x80, 0x00, - 0x06, 0x98, 0x3c, 0x5c, 0x00, 0x00, - 0x40, 0xe1, 0x51, 0x84, 0x80, 0x00, - 0x2c, 0x44, 0xa2, 0x27, 0x00, 0x00, - 0xd8, 0x28, 0x95, 0x51, 0x80, 0x00, - 0x92, 0x81, 0x4a, 0x1a, 0x00, 0x00, - 0x84, 0x32, 0x30, 0x68, 0x00, 0x00, - 0x68, 0x0c, 0x2c, 0x89, 0x00, 0x00 -}; - -const uint8_t kMaskRandom33_22[132] = { - 0x55, 0x55, 0x55, 0x8c, 0x80, 0x00, - 0x2a, 0x22, 0xaa, 0x27, 0x00, 0x00, - 0x31, 0x11, 0xa5, 0x32, 0x80, 0x00, - 0x83, 0x42, 0x62, 0x61, 0x80, 0x00, - 0x06, 0x98, 0x3c, 0x5c, 0x00, 0x00, - 0x40, 0xe1, 0x51, 0x84, 0x80, 0x00, - 0x2c, 0x44, 0xa2, 0x27, 0x00, 0x00, - 0xd8, 0x28, 0x95, 0x51, 0x80, 0x00, - 0x92, 0x81, 0x4a, 0x1a, 0x00, 0x00, - 0x84, 0x32, 0x30, 0x68, 0x00, 0x00, - 0x68, 0x0c, 0x2c, 0x89, 0x00, 0x00, - 0x45, 0x51, 0x55, 0x8c, 0x80, 0x00, - 0x10, 0xa2, 0xaa, 0x27, 0x00, 0x00, - 0x01, 0x25, 0xa5, 0x32, 0x80, 0x00, - 0x0b, 0x42, 0x62, 0x61, 0x80, 0x00, - 0xd8, 0x20, 0x3c, 0x5c, 0x00, 0x00, - 0x82, 0x8c, 0x8e, 0xcc, 0x00, 0x00, - 0x24, 0x4a, 0x6a, 0x2b, 0x00, 0x00, - 0x38, 0x18, 0x36, 0x32, 0x80, 0x00, - 0x2a, 0x25, 0xd1, 0x25, 0x80, 0x00, - 0x84, 0x92, 0xc8, 0x02, 0x80, 0x00, - 0xcc, 0xe3, 0x42, 0x6b, 0x80, 0x00 -}; - -const uint8_t kMaskRandom33_23[138] = { - 0x55, 0x55, 0x55, 0x8c, 0x80, 0x00, - 0x2a, 0x22, 0xaa, 0x27, 0x00, 0x00, - 0x31, 0x11, 0xa5, 0x32, 0x80, 0x00, - 0x83, 0x42, 0x62, 0x61, 0x80, 0x00, - 0x06, 0x98, 0x3c, 0x5c, 0x00, 0x00, - 0x40, 0xe1, 0x51, 0x84, 0x80, 0x00, - 0x2c, 0x44, 0xa2, 0x27, 0x00, 0x00, - 0xd8, 0x28, 0x95, 0x51, 0x80, 0x00, - 0x92, 0x81, 0x4a, 0x1a, 0x00, 0x00, - 0x84, 0x32, 0x30, 0x68, 0x00, 0x00, - 0x68, 0x0c, 0x2c, 0x89, 0x00, 0x00, - 0x84, 0x31, 0x51, 0x84, 0x80, 0x00, - 0x18, 0xa2, 0xa2, 0x27, 0x00, 0x00, - 0x4e, 0x01, 0x95, 0x51, 0x80, 0x00, - 0x44, 0xc8, 0x4a, 0x1a, 0x00, 0x00, - 0x0e, 0x90, 0x30, 0x68, 0x00, 0x00, - 0x20, 0xcc, 0x2c, 0x89, 0x00, 0x00, - 0x93, 0x40, 0x55, 0x8c, 0x80, 0x00, - 0x2d, 0x10, 0xaa, 0x27, 0x00, 0x00, - 0x31, 0x44, 0xa5, 0x32, 0x80, 0x00, - 0xc0, 0x23, 0x62, 0x61, 0x80, 0x00, - 0x11, 0x25, 0x3c, 0x5c, 0x00, 0x00, - 0xe8, 0x80, 0x51, 0x35, 0x00, 0x00 -}; - -const uint8_t kMaskRandom33_24[144] = { - 0x84, 0x31, 0x51, 0x84, 0x80, 0x00, - 0x18, 0xa2, 0xa2, 0x27, 0x00, 0x00, - 0x4e, 0x01, 0x95, 0x51, 0x80, 0x00, - 0x44, 0xc8, 0x4a, 0x1a, 0x00, 0x00, - 0x0e, 0x90, 0x30, 0x68, 0x00, 0x00, - 0x20, 0xcc, 0x2c, 0x89, 0x00, 0x00, - 0x93, 0x40, 0x55, 0x8c, 0x80, 0x00, - 0x2d, 0x10, 0xaa, 0x27, 0x00, 0x00, - 0x31, 0x44, 0xa5, 0x32, 0x80, 0x00, - 0xc0, 0x23, 0x62, 0x61, 0x80, 0x00, - 0x11, 0x25, 0x3c, 0x5c, 0x00, 0x00, - 0xe8, 0x80, 0x51, 0x35, 0x00, 0x00, - 0x55, 0x55, 0x55, 0x8c, 0x80, 0x00, - 0x2a, 0x22, 0xaa, 0x27, 0x00, 0x00, - 0x31, 0x11, 0xa5, 0x32, 0x80, 0x00, - 0x83, 0x42, 0x62, 0x61, 0x80, 0x00, - 0x06, 0x98, 0x3c, 0x5c, 0x00, 0x00, - 0x40, 0xe1, 0x51, 0x84, 0x80, 0x00, - 0x2c, 0x44, 0xa2, 0x27, 0x00, 0x00, - 0xd8, 0x28, 0x95, 0x51, 0x80, 0x00, - 0x92, 0x81, 0x4a, 0x1a, 0x00, 0x00, - 0x84, 0x32, 0x30, 0x68, 0x00, 0x00, - 0x68, 0x0c, 0x2c, 0x89, 0x00, 0x00, - 0xdc, 0x4e, 0xfc, 0x70, 0x00, 0x00 -}; - -const uint8_t kMaskRandom33_25[150] = { - 0x84, 0x31, 0x51, 0x84, 0x80, 0x00, - 0x18, 0xa2, 0xa2, 0x27, 0x00, 0x00, - 0x4e, 0x01, 0x95, 0x51, 0x80, 0x00, - 0x44, 0xc8, 0x4a, 0x1a, 0x00, 0x00, - 0x0e, 0x90, 0x30, 0x68, 0x00, 0x00, - 0x20, 0xcc, 0x2c, 0x89, 0x00, 0x00, - 0x93, 0x40, 0x55, 0x8c, 0x80, 0x00, - 0x2d, 0x10, 0xaa, 0x27, 0x00, 0x00, - 0x31, 0x44, 0xa5, 0x32, 0x80, 0x00, - 0xc0, 0x23, 0x62, 0x61, 0x80, 0x00, - 0x11, 0x25, 0x3c, 0x5c, 0x00, 0x00, - 0xe8, 0x80, 0x51, 0x35, 0x00, 0x00, - 0x45, 0x15, 0x51, 0x84, 0x80, 0x00, - 0x22, 0x22, 0xa2, 0x27, 0x00, 0x00, - 0x96, 0x0c, 0x95, 0x51, 0x80, 0x00, - 0x0c, 0x50, 0x4a, 0x1a, 0x00, 0x00, - 0x62, 0x04, 0x30, 0x68, 0x00, 0x00, - 0x49, 0x06, 0x2c, 0x89, 0x00, 0x00, - 0x11, 0x82, 0x15, 0x8c, 0x00, 0x00, - 0x12, 0x38, 0x8a, 0x47, 0x00, 0x00, - 0x40, 0x71, 0x25, 0x81, 0x80, 0x00, - 0xa8, 0x8a, 0x62, 0x12, 0x80, 0x00, - 0x08, 0xa1, 0x58, 0x58, 0x00, 0x00, - 0xa0, 0xc0, 0x0e, 0x28, 0x80, 0x00, - 0xc5, 0x10, 0x83, 0x34, 0x00, 0x00 -}; - -const uint8_t kMaskRandom33_26[156] = { - 0x45, 0x15, 0x51, 0x84, 0x80, 0x00, - 0x22, 0x22, 0xa2, 0x27, 0x00, 0x00, - 0x96, 0x0c, 0x95, 0x51, 0x80, 0x00, - 0x0c, 0x50, 0x4a, 0x1a, 0x00, 0x00, - 0x62, 0x04, 0x30, 0x68, 0x00, 0x00, - 0x49, 0x06, 0x2c, 0x89, 0x00, 0x00, - 0x11, 0x82, 0x15, 0x8c, 0x00, 0x00, - 0x12, 0x38, 0x8a, 0x47, 0x00, 0x00, - 0x40, 0x71, 0x25, 0x81, 0x80, 0x00, - 0xa8, 0x8a, 0x62, 0x12, 0x80, 0x00, - 0x08, 0xa1, 0x58, 0x58, 0x00, 0x00, - 0xa0, 0xc0, 0x0e, 0x28, 0x80, 0x00, - 0xc5, 0x10, 0x83, 0x34, 0x00, 0x00, - 0x84, 0x31, 0x51, 0x84, 0x80, 0x00, - 0x18, 0xa2, 0xa2, 0x27, 0x00, 0x00, - 0x4e, 0x01, 0x95, 0x51, 0x80, 0x00, - 0x44, 0xc8, 0x4a, 0x1a, 0x00, 0x00, - 0x0e, 0x90, 0x30, 0x68, 0x00, 0x00, - 0x20, 0xcc, 0x2c, 0x89, 0x00, 0x00, - 0x93, 0x40, 0x55, 0x8c, 0x80, 0x00, - 0x2d, 0x10, 0xaa, 0x27, 0x00, 0x00, - 0x31, 0x44, 0xa5, 0x32, 0x80, 0x00, - 0xc0, 0x23, 0x62, 0x61, 0x80, 0x00, - 0x11, 0x25, 0x3c, 0x5c, 0x00, 0x00, - 0xe8, 0x80, 0x51, 0x35, 0x00, 0x00, - 0xa4, 0xa4, 0xfc, 0x91, 0x00, 0x00 -}; - -const uint8_t kMaskRandom33_27[162] = { - 0x45, 0x15, 0x51, 0x84, 0x80, 0x00, - 0x22, 0x22, 0xa2, 0x27, 0x00, 0x00, - 0x96, 0x0c, 0x95, 0x51, 0x80, 0x00, - 0x0c, 0x50, 0x4a, 0x1a, 0x00, 0x00, - 0x62, 0x04, 0x30, 0x68, 0x00, 0x00, - 0x49, 0x06, 0x2c, 0x89, 0x00, 0x00, - 0x11, 0x82, 0x15, 0x8c, 0x00, 0x00, - 0x12, 0x38, 0x8a, 0x47, 0x00, 0x00, - 0x40, 0x71, 0x25, 0x81, 0x80, 0x00, - 0xa8, 0x8a, 0x62, 0x12, 0x80, 0x00, - 0x08, 0xa1, 0x58, 0x58, 0x00, 0x00, - 0xa0, 0xc0, 0x0e, 0x28, 0x80, 0x00, - 0xc5, 0x10, 0x83, 0x34, 0x00, 0x00, - 0x45, 0x51, 0x15, 0x8c, 0x00, 0x00, - 0x22, 0x0a, 0x8a, 0x47, 0x00, 0x00, - 0x84, 0xd0, 0x25, 0x81, 0x80, 0x00, - 0x0c, 0x8a, 0x62, 0x12, 0x80, 0x00, - 0x18, 0x06, 0x58, 0x58, 0x00, 0x00, - 0x30, 0x03, 0x0e, 0x28, 0x80, 0x00, - 0x61, 0x08, 0x83, 0x34, 0x00, 0x00, - 0x40, 0x11, 0x51, 0x84, 0x80, 0x00, - 0x10, 0x2c, 0xa2, 0x27, 0x00, 0x00, - 0x09, 0x60, 0x95, 0x51, 0x80, 0x00, - 0x00, 0x94, 0x4a, 0x1a, 0x00, 0x00, - 0x52, 0x40, 0x30, 0x68, 0x00, 0x00, - 0xa4, 0x24, 0x2c, 0x89, 0x00, 0x00, - 0x82, 0x88, 0xb0, 0xde, 0x80, 0x00 -}; - -const uint8_t kMaskRandom33_28[168] = { - 0x45, 0x51, 0x15, 0x8c, 0x00, 0x00, - 0x22, 0x0a, 0x8a, 0x47, 0x00, 0x00, - 0x84, 0xd0, 0x25, 0x81, 0x80, 0x00, - 0x0c, 0x8a, 0x62, 0x12, 0x80, 0x00, - 0x18, 0x06, 0x58, 0x58, 0x00, 0x00, - 0x30, 0x03, 0x0e, 0x28, 0x80, 0x00, - 0x61, 0x08, 0x83, 0x34, 0x00, 0x00, - 0x40, 0x11, 0x51, 0x84, 0x80, 0x00, - 0x10, 0x2c, 0xa2, 0x27, 0x00, 0x00, - 0x09, 0x60, 0x95, 0x51, 0x80, 0x00, - 0x00, 0x94, 0x4a, 0x1a, 0x00, 0x00, - 0x52, 0x40, 0x30, 0x68, 0x00, 0x00, - 0xa4, 0x24, 0x2c, 0x89, 0x00, 0x00, - 0x82, 0x88, 0xb0, 0xde, 0x80, 0x00, - 0x45, 0x15, 0x51, 0x84, 0x80, 0x00, - 0x22, 0x22, 0xa2, 0x27, 0x00, 0x00, - 0x96, 0x0c, 0x95, 0x51, 0x80, 0x00, - 0x0c, 0x50, 0x4a, 0x1a, 0x00, 0x00, - 0x62, 0x04, 0x30, 0x68, 0x00, 0x00, - 0x49, 0x06, 0x2c, 0x89, 0x00, 0x00, - 0x11, 0x82, 0x15, 0x8c, 0x00, 0x00, - 0x12, 0x38, 0x8a, 0x47, 0x00, 0x00, - 0x40, 0x71, 0x25, 0x81, 0x80, 0x00, - 0xa8, 0x8a, 0x62, 0x12, 0x80, 0x00, - 0x08, 0xa1, 0x58, 0x58, 0x00, 0x00, - 0xa0, 0xc0, 0x0e, 0x28, 0x80, 0x00, - 0xc5, 0x10, 0x83, 0x34, 0x00, 0x00, - 0x1b, 0xf4, 0xaa, 0xec, 0x80, 0x00 -}; - -const uint8_t kMaskRandom33_29[174] = { - 0x45, 0x51, 0x15, 0x8c, 0x00, 0x00, - 0x22, 0x0a, 0x8a, 0x47, 0x00, 0x00, - 0x84, 0xd0, 0x25, 0x81, 0x80, 0x00, - 0x0c, 0x8a, 0x62, 0x12, 0x80, 0x00, - 0x18, 0x06, 0x58, 0x58, 0x00, 0x00, - 0x30, 0x03, 0x0e, 0x28, 0x80, 0x00, - 0x61, 0x08, 0x83, 0x34, 0x00, 0x00, - 0x40, 0x11, 0x51, 0x84, 0x80, 0x00, - 0x10, 0x2c, 0xa2, 0x27, 0x00, 0x00, - 0x09, 0x60, 0x95, 0x51, 0x80, 0x00, - 0x00, 0x94, 0x4a, 0x1a, 0x00, 0x00, - 0x52, 0x40, 0x30, 0x68, 0x00, 0x00, - 0xa4, 0x24, 0x2c, 0x89, 0x00, 0x00, - 0x82, 0x88, 0xb0, 0xde, 0x80, 0x00, - 0x55, 0x11, 0x15, 0x8c, 0x00, 0x00, - 0x22, 0x22, 0x8a, 0x47, 0x00, 0x00, - 0x11, 0x11, 0x25, 0x81, 0x80, 0x00, - 0x80, 0x45, 0x62, 0x12, 0x80, 0x00, - 0x20, 0x1a, 0x58, 0x58, 0x00, 0x00, - 0x08, 0x68, 0x0e, 0x28, 0x80, 0x00, - 0x22, 0x84, 0x83, 0x34, 0x00, 0x00, - 0x48, 0x09, 0x25, 0x2c, 0x00, 0x00, - 0x07, 0x01, 0x8a, 0x91, 0x00, 0x00, - 0x94, 0x20, 0x91, 0xc0, 0x80, 0x00, - 0x82, 0x06, 0x68, 0x06, 0x80, 0x00, - 0x60, 0x48, 0x32, 0xc8, 0x00, 0x00, - 0x89, 0x80, 0x43, 0x45, 0x00, 0x00, - 0x00, 0x8e, 0xc4, 0x30, 0x80, 0x00, - 0x18, 0x22, 0x1c, 0xa2, 0x00, 0x00 -}; - -const uint8_t kMaskRandom33_3[18] = { - 0xad, 0x2d, 0xcd, 0xcc, 0x00, 0x00, - 0x76, 0x36, 0x97, 0x27, 0x00, 0x00, - 0x26, 0xdb, 0xb8, 0xd1, 0x80, 0x00 -}; - -const uint8_t kMaskRandom33_30[180] = { - 0x55, 0x11, 0x15, 0x8c, 0x00, 0x00, - 0x22, 0x22, 0x8a, 0x47, 0x00, 0x00, - 0x11, 0x11, 0x25, 0x81, 0x80, 0x00, - 0x80, 0x45, 0x62, 0x12, 0x80, 0x00, - 0x20, 0x1a, 0x58, 0x58, 0x00, 0x00, - 0x08, 0x68, 0x0e, 0x28, 0x80, 0x00, - 0x22, 0x84, 0x83, 0x34, 0x00, 0x00, - 0x48, 0x09, 0x25, 0x2c, 0x00, 0x00, - 0x07, 0x01, 0x8a, 0x91, 0x00, 0x00, - 0x94, 0x20, 0x91, 0xc0, 0x80, 0x00, - 0x82, 0x06, 0x68, 0x06, 0x80, 0x00, - 0x60, 0x48, 0x32, 0xc8, 0x00, 0x00, - 0x89, 0x80, 0x43, 0x45, 0x00, 0x00, - 0x00, 0x8e, 0xc4, 0x30, 0x80, 0x00, - 0x18, 0x22, 0x1c, 0xa2, 0x00, 0x00, - 0x45, 0x51, 0x15, 0x8c, 0x00, 0x00, - 0x22, 0x0a, 0x8a, 0x47, 0x00, 0x00, - 0x84, 0xd0, 0x25, 0x81, 0x80, 0x00, - 0x0c, 0x8a, 0x62, 0x12, 0x80, 0x00, - 0x18, 0x06, 0x58, 0x58, 0x00, 0x00, - 0x30, 0x03, 0x0e, 0x28, 0x80, 0x00, - 0x61, 0x08, 0x83, 0x34, 0x00, 0x00, - 0x40, 0x11, 0x51, 0x84, 0x80, 0x00, - 0x10, 0x2c, 0xa2, 0x27, 0x00, 0x00, - 0x09, 0x60, 0x95, 0x51, 0x80, 0x00, - 0x00, 0x94, 0x4a, 0x1a, 0x00, 0x00, - 0x52, 0x40, 0x30, 0x68, 0x00, 0x00, - 0xa4, 0x24, 0x2c, 0x89, 0x00, 0x00, - 0x82, 0x88, 0xb0, 0xde, 0x80, 0x00, - 0x6d, 0xd2, 0x8c, 0x00, 0x00, 0x00 -}; - -const uint8_t kMaskRandom33_31[186] = { - 0x55, 0x11, 0x15, 0x8c, 0x00, 0x00, - 0x22, 0x22, 0x8a, 0x47, 0x00, 0x00, - 0x11, 0x11, 0x25, 0x81, 0x80, 0x00, - 0x80, 0x45, 0x62, 0x12, 0x80, 0x00, - 0x20, 0x1a, 0x58, 0x58, 0x00, 0x00, - 0x08, 0x68, 0x0e, 0x28, 0x80, 0x00, - 0x22, 0x84, 0x83, 0x34, 0x00, 0x00, - 0x48, 0x09, 0x25, 0x2c, 0x00, 0x00, - 0x07, 0x01, 0x8a, 0x91, 0x00, 0x00, - 0x94, 0x20, 0x91, 0xc0, 0x80, 0x00, - 0x82, 0x06, 0x68, 0x06, 0x80, 0x00, - 0x60, 0x48, 0x32, 0xc8, 0x00, 0x00, - 0x89, 0x80, 0x43, 0x45, 0x00, 0x00, - 0x00, 0x8e, 0xc4, 0x30, 0x80, 0x00, - 0x18, 0x22, 0x1c, 0xa2, 0x00, 0x00, - 0xa4, 0x10, 0x25, 0x2c, 0x00, 0x00, - 0x01, 0x2a, 0x8a, 0x91, 0x00, 0x00, - 0x06, 0x42, 0x91, 0xc0, 0x80, 0x00, - 0x08, 0x68, 0x68, 0x06, 0x80, 0x00, - 0x81, 0x90, 0x32, 0xc8, 0x00, 0x00, - 0x00, 0xf0, 0x43, 0x45, 0x00, 0x00, - 0x50, 0x05, 0xc4, 0x30, 0x80, 0x00, - 0x20, 0x51, 0x1c, 0xa2, 0x00, 0x00, - 0x43, 0x08, 0x15, 0x8c, 0x00, 0x00, - 0x68, 0x80, 0x8a, 0x47, 0x00, 0x00, - 0x80, 0x0b, 0x25, 0x81, 0x80, 0x00, - 0x10, 0x4c, 0x62, 0x12, 0x80, 0x00, - 0x12, 0x30, 0x58, 0x58, 0x00, 0x00, - 0x40, 0x85, 0x0e, 0x28, 0x80, 0x00, - 0x0e, 0x04, 0x83, 0x34, 0x00, 0x00, - 0x18, 0x12, 0x0a, 0x1c, 0x00, 0x00 -}; - -const uint8_t kMaskRandom33_32[192] = { - 0xa4, 0x10, 0x25, 0x2c, 0x00, 0x00, - 0x01, 0x2a, 0x8a, 0x91, 0x00, 0x00, - 0x06, 0x42, 0x91, 0xc0, 0x80, 0x00, - 0x08, 0x68, 0x68, 0x06, 0x80, 0x00, - 0x81, 0x90, 0x32, 0xc8, 0x00, 0x00, - 0x00, 0xf0, 0x43, 0x45, 0x00, 0x00, - 0x50, 0x05, 0xc4, 0x30, 0x80, 0x00, - 0x20, 0x51, 0x1c, 0xa2, 0x00, 0x00, - 0x43, 0x08, 0x15, 0x8c, 0x00, 0x00, - 0x68, 0x80, 0x8a, 0x47, 0x00, 0x00, - 0x80, 0x0b, 0x25, 0x81, 0x80, 0x00, - 0x10, 0x4c, 0x62, 0x12, 0x80, 0x00, - 0x12, 0x30, 0x58, 0x58, 0x00, 0x00, - 0x40, 0x85, 0x0e, 0x28, 0x80, 0x00, - 0x0e, 0x04, 0x83, 0x34, 0x00, 0x00, - 0x18, 0x12, 0x0a, 0x1c, 0x00, 0x00, - 0x55, 0x11, 0x15, 0x8c, 0x00, 0x00, - 0x22, 0x22, 0x8a, 0x47, 0x00, 0x00, - 0x11, 0x11, 0x25, 0x81, 0x80, 0x00, - 0x80, 0x45, 0x62, 0x12, 0x80, 0x00, - 0x20, 0x1a, 0x58, 0x58, 0x00, 0x00, - 0x08, 0x68, 0x0e, 0x28, 0x80, 0x00, - 0x22, 0x84, 0x83, 0x34, 0x00, 0x00, - 0x48, 0x09, 0x25, 0x2c, 0x00, 0x00, - 0x07, 0x01, 0x8a, 0x91, 0x00, 0x00, - 0x94, 0x20, 0x91, 0xc0, 0x80, 0x00, - 0x82, 0x06, 0x68, 0x06, 0x80, 0x00, - 0x60, 0x48, 0x32, 0xc8, 0x00, 0x00, - 0x89, 0x80, 0x43, 0x45, 0x00, 0x00, - 0x00, 0x8e, 0xc4, 0x30, 0x80, 0x00, - 0x18, 0x22, 0x1c, 0xa2, 0x00, 0x00, - 0x73, 0x8e, 0x12, 0xca, 0x80, 0x00 -}; - -const uint8_t kMaskRandom33_33[198] = { - 0xa4, 0x10, 0x25, 0x2c, 0x00, 0x00, - 0x01, 0x2a, 0x8a, 0x91, 0x00, 0x00, - 0x06, 0x42, 0x91, 0xc0, 0x80, 0x00, - 0x08, 0x68, 0x68, 0x06, 0x80, 0x00, - 0x81, 0x90, 0x32, 0xc8, 0x00, 0x00, - 0x00, 0xf0, 0x43, 0x45, 0x00, 0x00, - 0x50, 0x05, 0xc4, 0x30, 0x80, 0x00, - 0x20, 0x51, 0x1c, 0xa2, 0x00, 0x00, - 0x43, 0x08, 0x15, 0x8c, 0x00, 0x00, - 0x68, 0x80, 0x8a, 0x47, 0x00, 0x00, - 0x80, 0x0b, 0x25, 0x81, 0x80, 0x00, - 0x10, 0x4c, 0x62, 0x12, 0x80, 0x00, - 0x12, 0x30, 0x58, 0x58, 0x00, 0x00, - 0x40, 0x85, 0x0e, 0x28, 0x80, 0x00, - 0x0e, 0x04, 0x83, 0x34, 0x00, 0x00, - 0x18, 0x12, 0x0a, 0x1c, 0x00, 0x00, - 0xa4, 0x10, 0x25, 0x2c, 0x00, 0x00, - 0x01, 0x2a, 0x8a, 0x91, 0x00, 0x00, - 0x06, 0x42, 0x91, 0xc0, 0x80, 0x00, - 0x08, 0x68, 0x68, 0x06, 0x80, 0x00, - 0x81, 0x90, 0x32, 0xc8, 0x00, 0x00, - 0x00, 0xf0, 0x43, 0x45, 0x00, 0x00, - 0x50, 0x05, 0xc4, 0x30, 0x80, 0x00, - 0x20, 0x51, 0x1c, 0xa2, 0x00, 0x00, - 0x43, 0x08, 0x25, 0x4c, 0x00, 0x00, - 0x68, 0x80, 0x8a, 0x66, 0x00, 0x00, - 0x80, 0x0b, 0x91, 0x91, 0x00, 0x00, - 0x10, 0x4c, 0x68, 0x42, 0x80, 0x00, - 0x12, 0x30, 0x32, 0xa4, 0x00, 0x00, - 0x40, 0x85, 0x43, 0x13, 0x00, 0x00, - 0x0e, 0x04, 0xc4, 0x30, 0x80, 0x00, - 0x18, 0x12, 0x1c, 0x88, 0x80, 0x00, - 0xdb, 0x10, 0x3c, 0x09, 0x00, 0x00 -}; - -const uint8_t kMaskRandom33_4[24] = { - 0x55, 0x55, 0xca, 0xec, 0x00, 0x00, - 0xaa, 0xaa, 0xa9, 0x67, 0x00, 0x00, - 0x35, 0x35, 0x3a, 0xb1, 0x80, 0x00, - 0xca, 0xca, 0x55, 0x5a, 0x80, 0x00 -}; - -const uint8_t kMaskRandom33_5[30] = { - 0x55, 0x55, 0x55, 0x44, 0x80, 0x00, - 0x2a, 0x2a, 0x2a, 0x66, 0x00, 0x00, - 0x24, 0x25, 0x25, 0xa1, 0x80, 0x00, - 0x84, 0xc8, 0xe2, 0x12, 0x80, 0x00, - 0x10, 0xb6, 0x99, 0x98, 0x00, 0x00 -}; - -const uint8_t kMaskRandom33_6[36] = { - 0x51, 0x51, 0xd1, 0x4c, 0x00, 0x00, - 0x0a, 0x2a, 0xa2, 0xc5, 0x00, 0x00, - 0xa2, 0x15, 0x95, 0x30, 0x80, 0x00, - 0x84, 0x4a, 0xca, 0x0a, 0x80, 0x00, - 0x30, 0x92, 0xa4, 0xaa, 0x00, 0x00, - 0x04, 0xac, 0x78, 0x15, 0x00, 0x00 -}; - -const uint8_t kMaskRandom33_7[42] = { - 0x45, 0x51, 0x15, 0x44, 0x80, 0x00, - 0x22, 0x2a, 0x8a, 0x23, 0x00, 0x00, - 0x91, 0x11, 0x85, 0x91, 0x00, 0x00, - 0x2e, 0x08, 0x32, 0x0a, 0x80, 0x00, - 0x48, 0x34, 0x58, 0x34, 0x00, 0x00, - 0x90, 0x29, 0x2c, 0x0d, 0x00, 0x00, - 0x09, 0x86, 0x43, 0xc8, 0x00, 0x00 -}; - -const uint8_t kMaskRandom33_8[48] = { - 0x20, 0x54, 0x64, 0x16, 0x00, 0x00, - 0x18, 0x88, 0xa2, 0xc2, 0x00, 0x00, - 0x84, 0x07, 0x51, 0x60, 0x80, 0x00, - 0x60, 0x48, 0x4a, 0x85, 0x00, 0x00, - 0x12, 0x82, 0x38, 0x4c, 0x00, 0x00, - 0x81, 0x41, 0x89, 0x29, 0x00, 0x00, - 0x40, 0x62, 0x07, 0x11, 0x80, 0x00, - 0x16, 0x30, 0x94, 0xb0, 0x00, 0x00 -}; - -const uint8_t kMaskRandom33_9[54] = { - 0x55, 0x51, 0x8e, 0xcc, 0x00, 0x00, - 0x22, 0x2a, 0x6a, 0x2b, 0x00, 0x00, - 0x05, 0x85, 0x36, 0x32, 0x80, 0x00, - 0x09, 0x4a, 0xd1, 0x25, 0x80, 0x00, - 0x84, 0x32, 0x55, 0x8c, 0x80, 0x00, - 0xc0, 0x0d, 0xaa, 0x27, 0x00, 0x00, - 0x20, 0xa6, 0xa5, 0x32, 0x80, 0x00, - 0x1a, 0x09, 0x62, 0x61, 0x80, 0x00, - 0x44, 0x64, 0x3c, 0x5c, 0x00, 0x00 -}; - -const uint8_t kMaskRandom34_1[6] = { - 0xff, 0xff, 0xff, 0xff, 0xc0, 0x00 -}; - -const uint8_t kMaskRandom34_10[60] = { - 0x55, 0x8c, 0xaa, 0xc6, 0x40, 0x00, - 0xaa, 0x27, 0x55, 0x13, 0x80, 0x00, - 0xa5, 0x32, 0xd2, 0x99, 0x40, 0x00, - 0x62, 0x61, 0xb1, 0x30, 0xc0, 0x00, - 0x3c, 0x5c, 0x1e, 0x2e, 0x00, 0x00, - 0x8e, 0xcc, 0x47, 0x66, 0x00, 0x00, - 0x6a, 0x2b, 0x35, 0x15, 0x80, 0x00, - 0x36, 0x32, 0x9b, 0x19, 0x40, 0x00, - 0xd1, 0x25, 0xe8, 0x92, 0xc0, 0x00, - 0xc8, 0x02, 0xe4, 0x01, 0x40, 0x00 -}; - -const uint8_t kMaskRandom34_11[66] = { - 0x55, 0x8c, 0xaa, 0xc6, 0x40, 0x00, - 0xaa, 0x27, 0x55, 0x13, 0x80, 0x00, - 0xa5, 0x32, 0xd2, 0x99, 0x40, 0x00, - 0x62, 0x61, 0xb1, 0x30, 0xc0, 0x00, - 0x3c, 0x5c, 0x1e, 0x2e, 0x00, 0x00, - 0x51, 0x84, 0xa8, 0xc2, 0x40, 0x00, - 0xa2, 0x27, 0x51, 0x13, 0x80, 0x00, - 0x95, 0x51, 0xca, 0xa8, 0xc0, 0x00, - 0x4a, 0x1a, 0x25, 0x0d, 0x00, 0x00, - 0x30, 0x68, 0x18, 0x34, 0x00, 0x00, - 0x2c, 0x89, 0x16, 0x44, 0x80, 0x00 -}; - -const uint8_t kMaskRandom34_12[72] = { - 0x51, 0x84, 0xa8, 0xc2, 0x40, 0x00, - 0xa2, 0x27, 0x51, 0x13, 0x80, 0x00, - 0x95, 0x51, 0xca, 0xa8, 0xc0, 0x00, - 0x4a, 0x1a, 0x25, 0x0d, 0x00, 0x00, - 0x30, 0x68, 0x18, 0x34, 0x00, 0x00, - 0x2c, 0x89, 0x16, 0x44, 0x80, 0x00, - 0x55, 0x8c, 0xaa, 0xc6, 0x40, 0x00, - 0xaa, 0x27, 0x55, 0x13, 0x80, 0x00, - 0xa5, 0x32, 0xd2, 0x99, 0x40, 0x00, - 0x62, 0x61, 0xb1, 0x30, 0xc0, 0x00, - 0x3c, 0x5c, 0x1e, 0x2e, 0x00, 0x00, - 0x51, 0x35, 0x28, 0x9a, 0x80, 0x00 -}; - -const uint8_t kMaskRandom34_13[78] = { - 0x51, 0x84, 0xa8, 0xc2, 0x40, 0x00, - 0xa2, 0x27, 0x51, 0x13, 0x80, 0x00, - 0x95, 0x51, 0xca, 0xa8, 0xc0, 0x00, - 0x4a, 0x1a, 0x25, 0x0d, 0x00, 0x00, - 0x30, 0x68, 0x18, 0x34, 0x00, 0x00, - 0x2c, 0x89, 0x16, 0x44, 0x80, 0x00, - 0x15, 0x8c, 0x0a, 0xc6, 0x00, 0x00, - 0x8a, 0x47, 0x45, 0x23, 0x80, 0x00, - 0x25, 0x81, 0x92, 0xc0, 0xc0, 0x00, - 0x62, 0x12, 0xb1, 0x09, 0x40, 0x00, - 0x58, 0x58, 0x2c, 0x2c, 0x00, 0x00, - 0x0e, 0x28, 0x87, 0x14, 0x40, 0x00, - 0x83, 0x34, 0x41, 0x9a, 0x00, 0x00 -}; - -const uint8_t kMaskRandom34_14[84] = { - 0x15, 0x8c, 0x0a, 0xc6, 0x00, 0x00, - 0x8a, 0x47, 0x45, 0x23, 0x80, 0x00, - 0x25, 0x81, 0x92, 0xc0, 0xc0, 0x00, - 0x62, 0x12, 0xb1, 0x09, 0x40, 0x00, - 0x58, 0x58, 0x2c, 0x2c, 0x00, 0x00, - 0x0e, 0x28, 0x87, 0x14, 0x40, 0x00, - 0x83, 0x34, 0x41, 0x9a, 0x00, 0x00, - 0x51, 0x84, 0xa8, 0xc2, 0x40, 0x00, - 0xa2, 0x27, 0x51, 0x13, 0x80, 0x00, - 0x95, 0x51, 0xca, 0xa8, 0xc0, 0x00, - 0x4a, 0x1a, 0x25, 0x0d, 0x00, 0x00, - 0x30, 0x68, 0x18, 0x34, 0x00, 0x00, - 0x2c, 0x89, 0x16, 0x44, 0x80, 0x00, - 0xb0, 0xde, 0xd8, 0x6f, 0x40, 0x00 -}; - -const uint8_t kMaskRandom34_15[90] = { - 0x15, 0x8c, 0x0a, 0xc6, 0x00, 0x00, - 0x8a, 0x47, 0x45, 0x23, 0x80, 0x00, - 0x25, 0x81, 0x92, 0xc0, 0xc0, 0x00, - 0x62, 0x12, 0xb1, 0x09, 0x40, 0x00, - 0x58, 0x58, 0x2c, 0x2c, 0x00, 0x00, - 0x0e, 0x28, 0x87, 0x14, 0x40, 0x00, - 0x83, 0x34, 0x41, 0x9a, 0x00, 0x00, - 0x25, 0x2c, 0x12, 0x96, 0x00, 0x00, - 0x8a, 0x91, 0x45, 0x48, 0x80, 0x00, - 0x91, 0xc0, 0xc8, 0xe0, 0x40, 0x00, - 0x68, 0x06, 0xb4, 0x03, 0x40, 0x00, - 0x32, 0xc8, 0x19, 0x64, 0x00, 0x00, - 0x43, 0x45, 0x21, 0xa2, 0x80, 0x00, - 0xc4, 0x30, 0xe2, 0x18, 0x40, 0x00, - 0x1c, 0xa2, 0x0e, 0x51, 0x00, 0x00 -}; - -const uint8_t kMaskRandom34_16[96] = { - 0x25, 0x2c, 0x12, 0x96, 0x00, 0x00, - 0x8a, 0x91, 0x45, 0x48, 0x80, 0x00, - 0x91, 0xc0, 0xc8, 0xe0, 0x40, 0x00, - 0x68, 0x06, 0xb4, 0x03, 0x40, 0x00, - 0x32, 0xc8, 0x19, 0x64, 0x00, 0x00, - 0x43, 0x45, 0x21, 0xa2, 0x80, 0x00, - 0xc4, 0x30, 0xe2, 0x18, 0x40, 0x00, - 0x1c, 0xa2, 0x0e, 0x51, 0x00, 0x00, - 0x15, 0x8c, 0x0a, 0xc6, 0x00, 0x00, - 0x8a, 0x47, 0x45, 0x23, 0x80, 0x00, - 0x25, 0x81, 0x92, 0xc0, 0xc0, 0x00, - 0x62, 0x12, 0xb1, 0x09, 0x40, 0x00, - 0x58, 0x58, 0x2c, 0x2c, 0x00, 0x00, - 0x0e, 0x28, 0x87, 0x14, 0x40, 0x00, - 0x83, 0x34, 0x41, 0x9a, 0x00, 0x00, - 0x0a, 0x1c, 0x05, 0x0e, 0x00, 0x00 -}; - -const uint8_t kMaskRandom34_17[102] = { - 0x25, 0x2c, 0x12, 0x96, 0x00, 0x00, - 0x8a, 0x91, 0x45, 0x48, 0x80, 0x00, - 0x91, 0xc0, 0xc8, 0xe0, 0x40, 0x00, - 0x68, 0x06, 0xb4, 0x03, 0x40, 0x00, - 0x32, 0xc8, 0x19, 0x64, 0x00, 0x00, - 0x43, 0x45, 0x21, 0xa2, 0x80, 0x00, - 0xc4, 0x30, 0xe2, 0x18, 0x40, 0x00, - 0x1c, 0xa2, 0x0e, 0x51, 0x00, 0x00, - 0x25, 0x4c, 0x12, 0xa6, 0x00, 0x00, - 0x8a, 0x66, 0x45, 0x33, 0x00, 0x00, - 0x91, 0x91, 0x48, 0xc8, 0x80, 0x00, - 0x68, 0x42, 0xb4, 0x21, 0x40, 0x00, - 0x32, 0xa4, 0x19, 0x52, 0x00, 0x00, - 0x43, 0x13, 0x21, 0x89, 0x80, 0x00, - 0xc4, 0x30, 0xe2, 0x18, 0x40, 0x00, - 0x1c, 0x88, 0x8e, 0x44, 0x40, 0x00, - 0x3c, 0x09, 0x1e, 0x04, 0x80, 0x00 -}; - -const uint8_t kMaskRandom34_18[108] = { - 0x8e, 0xcc, 0x47, 0x66, 0x00, 0x00, - 0x6a, 0x2b, 0x35, 0x15, 0x80, 0x00, - 0x36, 0x32, 0x9b, 0x19, 0x40, 0x00, - 0xd1, 0x25, 0xe8, 0x92, 0xc0, 0x00, - 0x55, 0x8c, 0xaa, 0xc6, 0x40, 0x00, - 0xaa, 0x27, 0x55, 0x13, 0x80, 0x00, - 0xa5, 0x32, 0xd2, 0x99, 0x40, 0x00, - 0x62, 0x61, 0xb1, 0x30, 0xc0, 0x00, - 0x3c, 0x5c, 0x1e, 0x2e, 0x00, 0x00, - 0x64, 0x16, 0x32, 0x0b, 0x00, 0x00, - 0xa2, 0xc2, 0x51, 0x61, 0x00, 0x00, - 0x51, 0x60, 0xa8, 0xb0, 0x40, 0x00, - 0x4a, 0x85, 0x25, 0x42, 0x80, 0x00, - 0x38, 0x4c, 0x1c, 0x26, 0x00, 0x00, - 0x89, 0x29, 0x44, 0x94, 0x80, 0x00, - 0x07, 0x11, 0x83, 0x88, 0xc0, 0x00, - 0x94, 0xb0, 0x4a, 0x58, 0x00, 0x00, - 0x89, 0x70, 0xf3, 0xf7, 0x40, 0x00 -}; - -const uint8_t kMaskRandom34_19[114] = { - 0x8e, 0xcc, 0x47, 0x66, 0x00, 0x00, - 0x6a, 0x2b, 0x35, 0x15, 0x80, 0x00, - 0x36, 0x32, 0x9b, 0x19, 0x40, 0x00, - 0xd1, 0x25, 0xe8, 0x92, 0xc0, 0x00, - 0x55, 0x8c, 0xaa, 0xc6, 0x40, 0x00, - 0xaa, 0x27, 0x55, 0x13, 0x80, 0x00, - 0xa5, 0x32, 0xd2, 0x99, 0x40, 0x00, - 0x62, 0x61, 0xb1, 0x30, 0xc0, 0x00, - 0x3c, 0x5c, 0x1e, 0x2e, 0x00, 0x00, - 0x55, 0x8c, 0xaa, 0xc6, 0x40, 0x00, - 0xaa, 0x27, 0x55, 0x13, 0x80, 0x00, - 0xa5, 0x32, 0xd2, 0x99, 0x40, 0x00, - 0x62, 0x61, 0xb1, 0x30, 0xc0, 0x00, - 0x3c, 0x5c, 0x1e, 0x2e, 0x00, 0x00, - 0x8e, 0xcc, 0x47, 0x66, 0x00, 0x00, - 0x6a, 0x2b, 0x35, 0x15, 0x80, 0x00, - 0x36, 0x32, 0x9b, 0x19, 0x40, 0x00, - 0xd1, 0x25, 0xe8, 0x92, 0xc0, 0x00, - 0xc8, 0x02, 0xe4, 0x01, 0x40, 0x00 -}; - -const uint8_t kMaskRandom34_2[12] = { - 0xce, 0xce, 0x67, 0x67, 0x00, 0x00, - 0xb9, 0x39, 0xdc, 0x9c, 0xc0, 0x00 -}; - -const uint8_t kMaskRandom34_20[120] = { - 0x55, 0x8c, 0xaa, 0xc6, 0x40, 0x00, - 0xaa, 0x27, 0x55, 0x13, 0x80, 0x00, - 0xa5, 0x32, 0xd2, 0x99, 0x40, 0x00, - 0x62, 0x61, 0xb1, 0x30, 0xc0, 0x00, - 0x3c, 0x5c, 0x1e, 0x2e, 0x00, 0x00, - 0x8e, 0xcc, 0x47, 0x66, 0x00, 0x00, - 0x6a, 0x2b, 0x35, 0x15, 0x80, 0x00, - 0x36, 0x32, 0x9b, 0x19, 0x40, 0x00, - 0xd1, 0x25, 0xe8, 0x92, 0xc0, 0x00, - 0xc8, 0x02, 0xe4, 0x01, 0x40, 0x00, - 0x8e, 0xcc, 0x47, 0x66, 0x00, 0x00, - 0x6a, 0x2b, 0x35, 0x15, 0x80, 0x00, - 0x36, 0x32, 0x9b, 0x19, 0x40, 0x00, - 0xd1, 0x25, 0xe8, 0x92, 0xc0, 0x00, - 0x55, 0x8c, 0xaa, 0xc6, 0x40, 0x00, - 0xaa, 0x27, 0x55, 0x13, 0x80, 0x00, - 0xa5, 0x32, 0xd2, 0x99, 0x40, 0x00, - 0x62, 0x61, 0xb1, 0x30, 0xc0, 0x00, - 0x3c, 0x5c, 0x1e, 0x2e, 0x00, 0x00, - 0x5d, 0xc5, 0xfe, 0xd8, 0x40, 0x00 -}; - -const uint8_t kMaskRandom34_21[126] = { - 0x55, 0x8c, 0xaa, 0xc6, 0x40, 0x00, - 0xaa, 0x27, 0x55, 0x13, 0x80, 0x00, - 0xa5, 0x32, 0xd2, 0x99, 0x40, 0x00, - 0x62, 0x61, 0xb1, 0x30, 0xc0, 0x00, - 0x3c, 0x5c, 0x1e, 0x2e, 0x00, 0x00, - 0x8e, 0xcc, 0x47, 0x66, 0x00, 0x00, - 0x6a, 0x2b, 0x35, 0x15, 0x80, 0x00, - 0x36, 0x32, 0x9b, 0x19, 0x40, 0x00, - 0xd1, 0x25, 0xe8, 0x92, 0xc0, 0x00, - 0xc8, 0x02, 0xe4, 0x01, 0x40, 0x00, - 0x55, 0x8c, 0xaa, 0xc6, 0x40, 0x00, - 0xaa, 0x27, 0x55, 0x13, 0x80, 0x00, - 0xa5, 0x32, 0xd2, 0x99, 0x40, 0x00, - 0x62, 0x61, 0xb1, 0x30, 0xc0, 0x00, - 0x3c, 0x5c, 0x1e, 0x2e, 0x00, 0x00, - 0x51, 0x84, 0xa8, 0xc2, 0x40, 0x00, - 0xa2, 0x27, 0x51, 0x13, 0x80, 0x00, - 0x95, 0x51, 0xca, 0xa8, 0xc0, 0x00, - 0x4a, 0x1a, 0x25, 0x0d, 0x00, 0x00, - 0x30, 0x68, 0x18, 0x34, 0x00, 0x00, - 0x2c, 0x89, 0x16, 0x44, 0x80, 0x00 -}; - -const uint8_t kMaskRandom34_22[132] = { - 0x55, 0x8c, 0xaa, 0xc6, 0x40, 0x00, - 0xaa, 0x27, 0x55, 0x13, 0x80, 0x00, - 0xa5, 0x32, 0xd2, 0x99, 0x40, 0x00, - 0x62, 0x61, 0xb1, 0x30, 0xc0, 0x00, - 0x3c, 0x5c, 0x1e, 0x2e, 0x00, 0x00, - 0x51, 0x84, 0xa8, 0xc2, 0x40, 0x00, - 0xa2, 0x27, 0x51, 0x13, 0x80, 0x00, - 0x95, 0x51, 0xca, 0xa8, 0xc0, 0x00, - 0x4a, 0x1a, 0x25, 0x0d, 0x00, 0x00, - 0x30, 0x68, 0x18, 0x34, 0x00, 0x00, - 0x2c, 0x89, 0x16, 0x44, 0x80, 0x00, - 0x55, 0x8c, 0xaa, 0xc6, 0x40, 0x00, - 0xaa, 0x27, 0x55, 0x13, 0x80, 0x00, - 0xa5, 0x32, 0xd2, 0x99, 0x40, 0x00, - 0x62, 0x61, 0xb1, 0x30, 0xc0, 0x00, - 0x3c, 0x5c, 0x1e, 0x2e, 0x00, 0x00, - 0x8e, 0xcc, 0x47, 0x66, 0x00, 0x00, - 0x6a, 0x2b, 0x35, 0x15, 0x80, 0x00, - 0x36, 0x32, 0x9b, 0x19, 0x40, 0x00, - 0xd1, 0x25, 0xe8, 0x92, 0xc0, 0x00, - 0xc8, 0x02, 0xe4, 0x01, 0x40, 0x00, - 0x2a, 0xf7, 0x4f, 0xf5, 0x80, 0x00 -}; - -const uint8_t kMaskRandom34_23[138] = { - 0x55, 0x8c, 0xaa, 0xc6, 0x40, 0x00, - 0xaa, 0x27, 0x55, 0x13, 0x80, 0x00, - 0xa5, 0x32, 0xd2, 0x99, 0x40, 0x00, - 0x62, 0x61, 0xb1, 0x30, 0xc0, 0x00, - 0x3c, 0x5c, 0x1e, 0x2e, 0x00, 0x00, - 0x51, 0x84, 0xa8, 0xc2, 0x40, 0x00, - 0xa2, 0x27, 0x51, 0x13, 0x80, 0x00, - 0x95, 0x51, 0xca, 0xa8, 0xc0, 0x00, - 0x4a, 0x1a, 0x25, 0x0d, 0x00, 0x00, - 0x30, 0x68, 0x18, 0x34, 0x00, 0x00, - 0x2c, 0x89, 0x16, 0x44, 0x80, 0x00, - 0x51, 0x84, 0xa8, 0xc2, 0x40, 0x00, - 0xa2, 0x27, 0x51, 0x13, 0x80, 0x00, - 0x95, 0x51, 0xca, 0xa8, 0xc0, 0x00, - 0x4a, 0x1a, 0x25, 0x0d, 0x00, 0x00, - 0x30, 0x68, 0x18, 0x34, 0x00, 0x00, - 0x2c, 0x89, 0x16, 0x44, 0x80, 0x00, - 0x55, 0x8c, 0xaa, 0xc6, 0x40, 0x00, - 0xaa, 0x27, 0x55, 0x13, 0x80, 0x00, - 0xa5, 0x32, 0xd2, 0x99, 0x40, 0x00, - 0x62, 0x61, 0xb1, 0x30, 0xc0, 0x00, - 0x3c, 0x5c, 0x1e, 0x2e, 0x00, 0x00, - 0x51, 0x35, 0x28, 0x9a, 0x80, 0x00 -}; - -const uint8_t kMaskRandom34_24[144] = { - 0x51, 0x84, 0xa8, 0xc2, 0x40, 0x00, - 0xa2, 0x27, 0x51, 0x13, 0x80, 0x00, - 0x95, 0x51, 0xca, 0xa8, 0xc0, 0x00, - 0x4a, 0x1a, 0x25, 0x0d, 0x00, 0x00, - 0x30, 0x68, 0x18, 0x34, 0x00, 0x00, - 0x2c, 0x89, 0x16, 0x44, 0x80, 0x00, - 0x55, 0x8c, 0xaa, 0xc6, 0x40, 0x00, - 0xaa, 0x27, 0x55, 0x13, 0x80, 0x00, - 0xa5, 0x32, 0xd2, 0x99, 0x40, 0x00, - 0x62, 0x61, 0xb1, 0x30, 0xc0, 0x00, - 0x3c, 0x5c, 0x1e, 0x2e, 0x00, 0x00, - 0x51, 0x35, 0x28, 0x9a, 0x80, 0x00, - 0x55, 0x8c, 0xaa, 0xc6, 0x40, 0x00, - 0xaa, 0x27, 0x55, 0x13, 0x80, 0x00, - 0xa5, 0x32, 0xd2, 0x99, 0x40, 0x00, - 0x62, 0x61, 0xb1, 0x30, 0xc0, 0x00, - 0x3c, 0x5c, 0x1e, 0x2e, 0x00, 0x00, - 0x51, 0x84, 0xa8, 0xc2, 0x40, 0x00, - 0xa2, 0x27, 0x51, 0x13, 0x80, 0x00, - 0x95, 0x51, 0xca, 0xa8, 0xc0, 0x00, - 0x4a, 0x1a, 0x25, 0x0d, 0x00, 0x00, - 0x30, 0x68, 0x18, 0x34, 0x00, 0x00, - 0x2c, 0x89, 0x16, 0x44, 0x80, 0x00, - 0x4c, 0xb8, 0x04, 0x74, 0xc0, 0x00 -}; - -const uint8_t kMaskRandom34_25[150] = { - 0x51, 0x84, 0xa8, 0xc2, 0x40, 0x00, - 0xa2, 0x27, 0x51, 0x13, 0x80, 0x00, - 0x95, 0x51, 0xca, 0xa8, 0xc0, 0x00, - 0x4a, 0x1a, 0x25, 0x0d, 0x00, 0x00, - 0x30, 0x68, 0x18, 0x34, 0x00, 0x00, - 0x2c, 0x89, 0x16, 0x44, 0x80, 0x00, - 0x55, 0x8c, 0xaa, 0xc6, 0x40, 0x00, - 0xaa, 0x27, 0x55, 0x13, 0x80, 0x00, - 0xa5, 0x32, 0xd2, 0x99, 0x40, 0x00, - 0x62, 0x61, 0xb1, 0x30, 0xc0, 0x00, - 0x3c, 0x5c, 0x1e, 0x2e, 0x00, 0x00, - 0x51, 0x35, 0x28, 0x9a, 0x80, 0x00, - 0x51, 0x84, 0xa8, 0xc2, 0x40, 0x00, - 0xa2, 0x27, 0x51, 0x13, 0x80, 0x00, - 0x95, 0x51, 0xca, 0xa8, 0xc0, 0x00, - 0x4a, 0x1a, 0x25, 0x0d, 0x00, 0x00, - 0x30, 0x68, 0x18, 0x34, 0x00, 0x00, - 0x2c, 0x89, 0x16, 0x44, 0x80, 0x00, - 0x15, 0x8c, 0x0a, 0xc6, 0x00, 0x00, - 0x8a, 0x47, 0x45, 0x23, 0x80, 0x00, - 0x25, 0x81, 0x92, 0xc0, 0xc0, 0x00, - 0x62, 0x12, 0xb1, 0x09, 0x40, 0x00, - 0x58, 0x58, 0x2c, 0x2c, 0x00, 0x00, - 0x0e, 0x28, 0x87, 0x14, 0x40, 0x00, - 0x83, 0x34, 0x41, 0x9a, 0x00, 0x00 -}; - -const uint8_t kMaskRandom34_26[156] = { - 0x51, 0x84, 0xa8, 0xc2, 0x40, 0x00, - 0xa2, 0x27, 0x51, 0x13, 0x80, 0x00, - 0x95, 0x51, 0xca, 0xa8, 0xc0, 0x00, - 0x4a, 0x1a, 0x25, 0x0d, 0x00, 0x00, - 0x30, 0x68, 0x18, 0x34, 0x00, 0x00, - 0x2c, 0x89, 0x16, 0x44, 0x80, 0x00, - 0x15, 0x8c, 0x0a, 0xc6, 0x00, 0x00, - 0x8a, 0x47, 0x45, 0x23, 0x80, 0x00, - 0x25, 0x81, 0x92, 0xc0, 0xc0, 0x00, - 0x62, 0x12, 0xb1, 0x09, 0x40, 0x00, - 0x58, 0x58, 0x2c, 0x2c, 0x00, 0x00, - 0x0e, 0x28, 0x87, 0x14, 0x40, 0x00, - 0x83, 0x34, 0x41, 0x9a, 0x00, 0x00, - 0x51, 0x84, 0xa8, 0xc2, 0x40, 0x00, - 0xa2, 0x27, 0x51, 0x13, 0x80, 0x00, - 0x95, 0x51, 0xca, 0xa8, 0xc0, 0x00, - 0x4a, 0x1a, 0x25, 0x0d, 0x00, 0x00, - 0x30, 0x68, 0x18, 0x34, 0x00, 0x00, - 0x2c, 0x89, 0x16, 0x44, 0x80, 0x00, - 0x55, 0x8c, 0xaa, 0xc6, 0x40, 0x00, - 0xaa, 0x27, 0x55, 0x13, 0x80, 0x00, - 0xa5, 0x32, 0xd2, 0x99, 0x40, 0x00, - 0x62, 0x61, 0xb1, 0x30, 0xc0, 0x00, - 0x3c, 0x5c, 0x1e, 0x2e, 0x00, 0x00, - 0x51, 0x35, 0x28, 0x9a, 0x80, 0x00, - 0x95, 0x20, 0xe9, 0xef, 0xc0, 0x00 -}; - -const uint8_t kMaskRandom34_27[162] = { - 0x51, 0x84, 0xa8, 0xc2, 0x40, 0x00, - 0xa2, 0x27, 0x51, 0x13, 0x80, 0x00, - 0x95, 0x51, 0xca, 0xa8, 0xc0, 0x00, - 0x4a, 0x1a, 0x25, 0x0d, 0x00, 0x00, - 0x30, 0x68, 0x18, 0x34, 0x00, 0x00, - 0x2c, 0x89, 0x16, 0x44, 0x80, 0x00, - 0x15, 0x8c, 0x0a, 0xc6, 0x00, 0x00, - 0x8a, 0x47, 0x45, 0x23, 0x80, 0x00, - 0x25, 0x81, 0x92, 0xc0, 0xc0, 0x00, - 0x62, 0x12, 0xb1, 0x09, 0x40, 0x00, - 0x58, 0x58, 0x2c, 0x2c, 0x00, 0x00, - 0x0e, 0x28, 0x87, 0x14, 0x40, 0x00, - 0x83, 0x34, 0x41, 0x9a, 0x00, 0x00, - 0x15, 0x8c, 0x0a, 0xc6, 0x00, 0x00, - 0x8a, 0x47, 0x45, 0x23, 0x80, 0x00, - 0x25, 0x81, 0x92, 0xc0, 0xc0, 0x00, - 0x62, 0x12, 0xb1, 0x09, 0x40, 0x00, - 0x58, 0x58, 0x2c, 0x2c, 0x00, 0x00, - 0x0e, 0x28, 0x87, 0x14, 0x40, 0x00, - 0x83, 0x34, 0x41, 0x9a, 0x00, 0x00, - 0x51, 0x84, 0xa8, 0xc2, 0x40, 0x00, - 0xa2, 0x27, 0x51, 0x13, 0x80, 0x00, - 0x95, 0x51, 0xca, 0xa8, 0xc0, 0x00, - 0x4a, 0x1a, 0x25, 0x0d, 0x00, 0x00, - 0x30, 0x68, 0x18, 0x34, 0x00, 0x00, - 0x2c, 0x89, 0x16, 0x44, 0x80, 0x00, - 0xb0, 0xde, 0xd8, 0x6f, 0x40, 0x00 -}; - -const uint8_t kMaskRandom34_28[168] = { - 0x15, 0x8c, 0x0a, 0xc6, 0x00, 0x00, - 0x8a, 0x47, 0x45, 0x23, 0x80, 0x00, - 0x25, 0x81, 0x92, 0xc0, 0xc0, 0x00, - 0x62, 0x12, 0xb1, 0x09, 0x40, 0x00, - 0x58, 0x58, 0x2c, 0x2c, 0x00, 0x00, - 0x0e, 0x28, 0x87, 0x14, 0x40, 0x00, - 0x83, 0x34, 0x41, 0x9a, 0x00, 0x00, - 0x51, 0x84, 0xa8, 0xc2, 0x40, 0x00, - 0xa2, 0x27, 0x51, 0x13, 0x80, 0x00, - 0x95, 0x51, 0xca, 0xa8, 0xc0, 0x00, - 0x4a, 0x1a, 0x25, 0x0d, 0x00, 0x00, - 0x30, 0x68, 0x18, 0x34, 0x00, 0x00, - 0x2c, 0x89, 0x16, 0x44, 0x80, 0x00, - 0xb0, 0xde, 0xd8, 0x6f, 0x40, 0x00, - 0x51, 0x84, 0xa8, 0xc2, 0x40, 0x00, - 0xa2, 0x27, 0x51, 0x13, 0x80, 0x00, - 0x95, 0x51, 0xca, 0xa8, 0xc0, 0x00, - 0x4a, 0x1a, 0x25, 0x0d, 0x00, 0x00, - 0x30, 0x68, 0x18, 0x34, 0x00, 0x00, - 0x2c, 0x89, 0x16, 0x44, 0x80, 0x00, - 0x15, 0x8c, 0x0a, 0xc6, 0x00, 0x00, - 0x8a, 0x47, 0x45, 0x23, 0x80, 0x00, - 0x25, 0x81, 0x92, 0xc0, 0xc0, 0x00, - 0x62, 0x12, 0xb1, 0x09, 0x40, 0x00, - 0x58, 0x58, 0x2c, 0x2c, 0x00, 0x00, - 0x0e, 0x28, 0x87, 0x14, 0x40, 0x00, - 0x83, 0x34, 0x41, 0x9a, 0x00, 0x00, - 0x10, 0x6c, 0xff, 0x60, 0x80, 0x00 -}; - -const uint8_t kMaskRandom34_29[174] = { - 0x15, 0x8c, 0x0a, 0xc6, 0x00, 0x00, - 0x8a, 0x47, 0x45, 0x23, 0x80, 0x00, - 0x25, 0x81, 0x92, 0xc0, 0xc0, 0x00, - 0x62, 0x12, 0xb1, 0x09, 0x40, 0x00, - 0x58, 0x58, 0x2c, 0x2c, 0x00, 0x00, - 0x0e, 0x28, 0x87, 0x14, 0x40, 0x00, - 0x83, 0x34, 0x41, 0x9a, 0x00, 0x00, - 0x51, 0x84, 0xa8, 0xc2, 0x40, 0x00, - 0xa2, 0x27, 0x51, 0x13, 0x80, 0x00, - 0x95, 0x51, 0xca, 0xa8, 0xc0, 0x00, - 0x4a, 0x1a, 0x25, 0x0d, 0x00, 0x00, - 0x30, 0x68, 0x18, 0x34, 0x00, 0x00, - 0x2c, 0x89, 0x16, 0x44, 0x80, 0x00, - 0xb0, 0xde, 0xd8, 0x6f, 0x40, 0x00, - 0x15, 0x8c, 0x0a, 0xc6, 0x00, 0x00, - 0x8a, 0x47, 0x45, 0x23, 0x80, 0x00, - 0x25, 0x81, 0x92, 0xc0, 0xc0, 0x00, - 0x62, 0x12, 0xb1, 0x09, 0x40, 0x00, - 0x58, 0x58, 0x2c, 0x2c, 0x00, 0x00, - 0x0e, 0x28, 0x87, 0x14, 0x40, 0x00, - 0x83, 0x34, 0x41, 0x9a, 0x00, 0x00, - 0x25, 0x2c, 0x12, 0x96, 0x00, 0x00, - 0x8a, 0x91, 0x45, 0x48, 0x80, 0x00, - 0x91, 0xc0, 0xc8, 0xe0, 0x40, 0x00, - 0x68, 0x06, 0xb4, 0x03, 0x40, 0x00, - 0x32, 0xc8, 0x19, 0x64, 0x00, 0x00, - 0x43, 0x45, 0x21, 0xa2, 0x80, 0x00, - 0xc4, 0x30, 0xe2, 0x18, 0x40, 0x00, - 0x1c, 0xa2, 0x0e, 0x51, 0x00, 0x00 -}; - -const uint8_t kMaskRandom34_3[18] = { - 0xcd, 0xcc, 0x66, 0xe6, 0x00, 0x00, - 0x97, 0x27, 0x4b, 0x93, 0x80, 0x00, - 0xb8, 0xd1, 0xdc, 0x68, 0xc0, 0x00 -}; - -const uint8_t kMaskRandom34_30[180] = { - 0x15, 0x8c, 0x0a, 0xc6, 0x00, 0x00, - 0x8a, 0x47, 0x45, 0x23, 0x80, 0x00, - 0x25, 0x81, 0x92, 0xc0, 0xc0, 0x00, - 0x62, 0x12, 0xb1, 0x09, 0x40, 0x00, - 0x58, 0x58, 0x2c, 0x2c, 0x00, 0x00, - 0x0e, 0x28, 0x87, 0x14, 0x40, 0x00, - 0x83, 0x34, 0x41, 0x9a, 0x00, 0x00, - 0x25, 0x2c, 0x12, 0x96, 0x00, 0x00, - 0x8a, 0x91, 0x45, 0x48, 0x80, 0x00, - 0x91, 0xc0, 0xc8, 0xe0, 0x40, 0x00, - 0x68, 0x06, 0xb4, 0x03, 0x40, 0x00, - 0x32, 0xc8, 0x19, 0x64, 0x00, 0x00, - 0x43, 0x45, 0x21, 0xa2, 0x80, 0x00, - 0xc4, 0x30, 0xe2, 0x18, 0x40, 0x00, - 0x1c, 0xa2, 0x0e, 0x51, 0x00, 0x00, - 0x15, 0x8c, 0x0a, 0xc6, 0x00, 0x00, - 0x8a, 0x47, 0x45, 0x23, 0x80, 0x00, - 0x25, 0x81, 0x92, 0xc0, 0xc0, 0x00, - 0x62, 0x12, 0xb1, 0x09, 0x40, 0x00, - 0x58, 0x58, 0x2c, 0x2c, 0x00, 0x00, - 0x0e, 0x28, 0x87, 0x14, 0x40, 0x00, - 0x83, 0x34, 0x41, 0x9a, 0x00, 0x00, - 0x51, 0x84, 0xa8, 0xc2, 0x40, 0x00, - 0xa2, 0x27, 0x51, 0x13, 0x80, 0x00, - 0x95, 0x51, 0xca, 0xa8, 0xc0, 0x00, - 0x4a, 0x1a, 0x25, 0x0d, 0x00, 0x00, - 0x30, 0x68, 0x18, 0x34, 0x00, 0x00, - 0x2c, 0x89, 0x16, 0x44, 0x80, 0x00, - 0xb0, 0xde, 0xd8, 0x6f, 0x40, 0x00, - 0x87, 0x93, 0x96, 0xc7, 0x80, 0x00 -}; - -const uint8_t kMaskRandom34_31[186] = { - 0x15, 0x8c, 0x0a, 0xc6, 0x00, 0x00, - 0x8a, 0x47, 0x45, 0x23, 0x80, 0x00, - 0x25, 0x81, 0x92, 0xc0, 0xc0, 0x00, - 0x62, 0x12, 0xb1, 0x09, 0x40, 0x00, - 0x58, 0x58, 0x2c, 0x2c, 0x00, 0x00, - 0x0e, 0x28, 0x87, 0x14, 0x40, 0x00, - 0x83, 0x34, 0x41, 0x9a, 0x00, 0x00, - 0x25, 0x2c, 0x12, 0x96, 0x00, 0x00, - 0x8a, 0x91, 0x45, 0x48, 0x80, 0x00, - 0x91, 0xc0, 0xc8, 0xe0, 0x40, 0x00, - 0x68, 0x06, 0xb4, 0x03, 0x40, 0x00, - 0x32, 0xc8, 0x19, 0x64, 0x00, 0x00, - 0x43, 0x45, 0x21, 0xa2, 0x80, 0x00, - 0xc4, 0x30, 0xe2, 0x18, 0x40, 0x00, - 0x1c, 0xa2, 0x0e, 0x51, 0x00, 0x00, - 0x25, 0x2c, 0x12, 0x96, 0x00, 0x00, - 0x8a, 0x91, 0x45, 0x48, 0x80, 0x00, - 0x91, 0xc0, 0xc8, 0xe0, 0x40, 0x00, - 0x68, 0x06, 0xb4, 0x03, 0x40, 0x00, - 0x32, 0xc8, 0x19, 0x64, 0x00, 0x00, - 0x43, 0x45, 0x21, 0xa2, 0x80, 0x00, - 0xc4, 0x30, 0xe2, 0x18, 0x40, 0x00, - 0x1c, 0xa2, 0x0e, 0x51, 0x00, 0x00, - 0x15, 0x8c, 0x0a, 0xc6, 0x00, 0x00, - 0x8a, 0x47, 0x45, 0x23, 0x80, 0x00, - 0x25, 0x81, 0x92, 0xc0, 0xc0, 0x00, - 0x62, 0x12, 0xb1, 0x09, 0x40, 0x00, - 0x58, 0x58, 0x2c, 0x2c, 0x00, 0x00, - 0x0e, 0x28, 0x87, 0x14, 0x40, 0x00, - 0x83, 0x34, 0x41, 0x9a, 0x00, 0x00, - 0x0a, 0x1c, 0x05, 0x0e, 0x00, 0x00 -}; - -const uint8_t kMaskRandom34_32[192] = { - 0x25, 0x2c, 0x12, 0x96, 0x00, 0x00, - 0x8a, 0x91, 0x45, 0x48, 0x80, 0x00, - 0x91, 0xc0, 0xc8, 0xe0, 0x40, 0x00, - 0x68, 0x06, 0xb4, 0x03, 0x40, 0x00, - 0x32, 0xc8, 0x19, 0x64, 0x00, 0x00, - 0x43, 0x45, 0x21, 0xa2, 0x80, 0x00, - 0xc4, 0x30, 0xe2, 0x18, 0x40, 0x00, - 0x1c, 0xa2, 0x0e, 0x51, 0x00, 0x00, - 0x15, 0x8c, 0x0a, 0xc6, 0x00, 0x00, - 0x8a, 0x47, 0x45, 0x23, 0x80, 0x00, - 0x25, 0x81, 0x92, 0xc0, 0xc0, 0x00, - 0x62, 0x12, 0xb1, 0x09, 0x40, 0x00, - 0x58, 0x58, 0x2c, 0x2c, 0x00, 0x00, - 0x0e, 0x28, 0x87, 0x14, 0x40, 0x00, - 0x83, 0x34, 0x41, 0x9a, 0x00, 0x00, - 0x0a, 0x1c, 0x05, 0x0e, 0x00, 0x00, - 0x15, 0x8c, 0x0a, 0xc6, 0x00, 0x00, - 0x8a, 0x47, 0x45, 0x23, 0x80, 0x00, - 0x25, 0x81, 0x92, 0xc0, 0xc0, 0x00, - 0x62, 0x12, 0xb1, 0x09, 0x40, 0x00, - 0x58, 0x58, 0x2c, 0x2c, 0x00, 0x00, - 0x0e, 0x28, 0x87, 0x14, 0x40, 0x00, - 0x83, 0x34, 0x41, 0x9a, 0x00, 0x00, - 0x25, 0x2c, 0x12, 0x96, 0x00, 0x00, - 0x8a, 0x91, 0x45, 0x48, 0x80, 0x00, - 0x91, 0xc0, 0xc8, 0xe0, 0x40, 0x00, - 0x68, 0x06, 0xb4, 0x03, 0x40, 0x00, - 0x32, 0xc8, 0x19, 0x64, 0x00, 0x00, - 0x43, 0x45, 0x21, 0xa2, 0x80, 0x00, - 0xc4, 0x30, 0xe2, 0x18, 0x40, 0x00, - 0x1c, 0xa2, 0x0e, 0x51, 0x00, 0x00, - 0xa6, 0x27, 0xa9, 0x4a, 0x40, 0x00 -}; - -const uint8_t kMaskRandom34_33[198] = { - 0x25, 0x2c, 0x12, 0x96, 0x00, 0x00, - 0x8a, 0x91, 0x45, 0x48, 0x80, 0x00, - 0x91, 0xc0, 0xc8, 0xe0, 0x40, 0x00, - 0x68, 0x06, 0xb4, 0x03, 0x40, 0x00, - 0x32, 0xc8, 0x19, 0x64, 0x00, 0x00, - 0x43, 0x45, 0x21, 0xa2, 0x80, 0x00, - 0xc4, 0x30, 0xe2, 0x18, 0x40, 0x00, - 0x1c, 0xa2, 0x0e, 0x51, 0x00, 0x00, - 0x15, 0x8c, 0x0a, 0xc6, 0x00, 0x00, - 0x8a, 0x47, 0x45, 0x23, 0x80, 0x00, - 0x25, 0x81, 0x92, 0xc0, 0xc0, 0x00, - 0x62, 0x12, 0xb1, 0x09, 0x40, 0x00, - 0x58, 0x58, 0x2c, 0x2c, 0x00, 0x00, - 0x0e, 0x28, 0x87, 0x14, 0x40, 0x00, - 0x83, 0x34, 0x41, 0x9a, 0x00, 0x00, - 0x0a, 0x1c, 0x05, 0x0e, 0x00, 0x00, - 0x25, 0x2c, 0x12, 0x96, 0x00, 0x00, - 0x8a, 0x91, 0x45, 0x48, 0x80, 0x00, - 0x91, 0xc0, 0xc8, 0xe0, 0x40, 0x00, - 0x68, 0x06, 0xb4, 0x03, 0x40, 0x00, - 0x32, 0xc8, 0x19, 0x64, 0x00, 0x00, - 0x43, 0x45, 0x21, 0xa2, 0x80, 0x00, - 0xc4, 0x30, 0xe2, 0x18, 0x40, 0x00, - 0x1c, 0xa2, 0x0e, 0x51, 0x00, 0x00, - 0x25, 0x4c, 0x12, 0xa6, 0x00, 0x00, - 0x8a, 0x66, 0x45, 0x33, 0x00, 0x00, - 0x91, 0x91, 0x48, 0xc8, 0x80, 0x00, - 0x68, 0x42, 0xb4, 0x21, 0x40, 0x00, - 0x32, 0xa4, 0x19, 0x52, 0x00, 0x00, - 0x43, 0x13, 0x21, 0x89, 0x80, 0x00, - 0xc4, 0x30, 0xe2, 0x18, 0x40, 0x00, - 0x1c, 0x88, 0x8e, 0x44, 0x40, 0x00, - 0x3c, 0x09, 0x1e, 0x04, 0x80, 0x00 -}; - -const uint8_t kMaskRandom34_34[204] = { - 0x25, 0x2c, 0x12, 0x96, 0x00, 0x00, - 0x8a, 0x91, 0x45, 0x48, 0x80, 0x00, - 0x91, 0xc0, 0xc8, 0xe0, 0x40, 0x00, - 0x68, 0x06, 0xb4, 0x03, 0x40, 0x00, - 0x32, 0xc8, 0x19, 0x64, 0x00, 0x00, - 0x43, 0x45, 0x21, 0xa2, 0x80, 0x00, - 0xc4, 0x30, 0xe2, 0x18, 0x40, 0x00, - 0x1c, 0xa2, 0x0e, 0x51, 0x00, 0x00, - 0x25, 0x4c, 0x12, 0xa6, 0x00, 0x00, - 0x8a, 0x66, 0x45, 0x33, 0x00, 0x00, - 0x91, 0x91, 0x48, 0xc8, 0x80, 0x00, - 0x68, 0x42, 0xb4, 0x21, 0x40, 0x00, - 0x32, 0xa4, 0x19, 0x52, 0x00, 0x00, - 0x43, 0x13, 0x21, 0x89, 0x80, 0x00, - 0xc4, 0x30, 0xe2, 0x18, 0x40, 0x00, - 0x1c, 0x88, 0x8e, 0x44, 0x40, 0x00, - 0x3c, 0x09, 0x1e, 0x04, 0x80, 0x00, - 0x25, 0x2c, 0x12, 0x96, 0x00, 0x00, - 0x8a, 0x91, 0x45, 0x48, 0x80, 0x00, - 0x91, 0xc0, 0xc8, 0xe0, 0x40, 0x00, - 0x68, 0x06, 0xb4, 0x03, 0x40, 0x00, - 0x32, 0xc8, 0x19, 0x64, 0x00, 0x00, - 0x43, 0x45, 0x21, 0xa2, 0x80, 0x00, - 0xc4, 0x30, 0xe2, 0x18, 0x40, 0x00, - 0x1c, 0xa2, 0x0e, 0x51, 0x00, 0x00, - 0x15, 0x8c, 0x0a, 0xc6, 0x00, 0x00, - 0x8a, 0x47, 0x45, 0x23, 0x80, 0x00, - 0x25, 0x81, 0x92, 0xc0, 0xc0, 0x00, - 0x62, 0x12, 0xb1, 0x09, 0x40, 0x00, - 0x58, 0x58, 0x2c, 0x2c, 0x00, 0x00, - 0x0e, 0x28, 0x87, 0x14, 0x40, 0x00, - 0x83, 0x34, 0x41, 0x9a, 0x00, 0x00, - 0x0a, 0x1c, 0x05, 0x0e, 0x00, 0x00, - 0x30, 0x3c, 0xb3, 0xe6, 0x80, 0x00 -}; - -const uint8_t kMaskRandom34_4[24] = { - 0xca, 0xec, 0x65, 0x76, 0x00, 0x00, - 0xa9, 0x67, 0x54, 0xb3, 0x80, 0x00, - 0x3a, 0xb1, 0x9d, 0x58, 0xc0, 0x00, - 0x55, 0x5a, 0xaa, 0xad, 0x40, 0x00 -}; - -const uint8_t kMaskRandom34_5[30] = { - 0x55, 0x44, 0xaa, 0xa2, 0x40, 0x00, - 0x2a, 0x66, 0x15, 0x33, 0x00, 0x00, - 0x25, 0xa1, 0x92, 0xd0, 0xc0, 0x00, - 0xe2, 0x12, 0xf1, 0x09, 0x40, 0x00, - 0x99, 0x98, 0x4c, 0xcc, 0x00, 0x00 -}; - -const uint8_t kMaskRandom34_6[36] = { - 0xd1, 0x4c, 0x68, 0xa6, 0x00, 0x00, - 0xa2, 0xc5, 0x51, 0x62, 0x80, 0x00, - 0x95, 0x30, 0xca, 0x98, 0x40, 0x00, - 0xca, 0x0a, 0xe5, 0x05, 0x40, 0x00, - 0xa4, 0xaa, 0x52, 0x55, 0x00, 0x00, - 0x78, 0x15, 0x3c, 0x0a, 0x80, 0x00 -}; - -const uint8_t kMaskRandom34_7[42] = { - 0x15, 0x44, 0x8a, 0xa2, 0x40, 0x00, - 0x8a, 0x23, 0x45, 0x11, 0x80, 0x00, - 0x85, 0x91, 0x42, 0xc8, 0x80, 0x00, - 0x32, 0x0a, 0x99, 0x05, 0x40, 0x00, - 0x58, 0x34, 0x2c, 0x1a, 0x00, 0x00, - 0x2c, 0x0d, 0x16, 0x06, 0x80, 0x00, - 0x43, 0xc8, 0x21, 0xe4, 0x00, 0x00 -}; - -const uint8_t kMaskRandom34_8[48] = { - 0x64, 0x16, 0x32, 0x0b, 0x00, 0x00, - 0xa2, 0xc2, 0x51, 0x61, 0x00, 0x00, - 0x51, 0x60, 0xa8, 0xb0, 0x40, 0x00, - 0x4a, 0x85, 0x25, 0x42, 0x80, 0x00, - 0x38, 0x4c, 0x1c, 0x26, 0x00, 0x00, - 0x89, 0x29, 0x44, 0x94, 0x80, 0x00, - 0x07, 0x11, 0x83, 0x88, 0xc0, 0x00, - 0x94, 0xb0, 0x4a, 0x58, 0x00, 0x00 -}; - -const uint8_t kMaskRandom34_9[54] = { - 0x8e, 0xcc, 0x47, 0x66, 0x00, 0x00, - 0x6a, 0x2b, 0x35, 0x15, 0x80, 0x00, - 0x36, 0x32, 0x9b, 0x19, 0x40, 0x00, - 0xd1, 0x25, 0xe8, 0x92, 0xc0, 0x00, - 0x55, 0x8c, 0xaa, 0xc6, 0x40, 0x00, - 0xaa, 0x27, 0x55, 0x13, 0x80, 0x00, - 0xa5, 0x32, 0xd2, 0x99, 0x40, 0x00, - 0x62, 0x61, 0xb1, 0x30, 0xc0, 0x00, - 0x3c, 0x5c, 0x1e, 0x2e, 0x00, 0x00 -}; - -const uint8_t kMaskRandom35_1[6] = { - 0xff, 0xff, 0xff, 0xff, 0xe0, 0x00 -}; - -const uint8_t kMaskRandom35_10[60] = { - 0x55, 0x8c, 0xc6, 0x63, 0x20, 0x00, - 0xaa, 0x27, 0x13, 0x89, 0xc0, 0x00, - 0xa5, 0x32, 0x99, 0x4c, 0xa0, 0x00, - 0x62, 0x61, 0xb0, 0xd8, 0x60, 0x00, - 0x3c, 0x5c, 0x2e, 0x17, 0x00, 0x00, - 0x8e, 0xcc, 0x66, 0x33, 0x00, 0x00, - 0x6a, 0x2b, 0x15, 0x8a, 0xc0, 0x00, - 0x36, 0x32, 0x99, 0x4c, 0xa0, 0x00, - 0xd1, 0x25, 0x92, 0xc9, 0x60, 0x00, - 0xc8, 0x02, 0xfe, 0xce, 0xe0, 0x00 -}; - -const uint8_t kMaskRandom35_11[66] = { - 0x55, 0x8c, 0xc6, 0x63, 0x20, 0x00, - 0xaa, 0x27, 0x13, 0x89, 0xc0, 0x00, - 0xa5, 0x32, 0x99, 0x4c, 0xa0, 0x00, - 0x62, 0x61, 0xb0, 0xd8, 0x60, 0x00, - 0x3c, 0x5c, 0x2e, 0x17, 0x00, 0x00, - 0x51, 0x84, 0xc2, 0x61, 0x20, 0x00, - 0xa2, 0x27, 0x13, 0x89, 0xc0, 0x00, - 0x95, 0x51, 0xa8, 0xd4, 0x60, 0x00, - 0x4a, 0x1a, 0x0d, 0x06, 0x80, 0x00, - 0x30, 0x68, 0x34, 0x1a, 0x00, 0x00, - 0x2c, 0x89, 0x44, 0xa2, 0x40, 0x00 -}; - -const uint8_t kMaskRandom35_12[72] = { - 0x51, 0x84, 0xc2, 0x61, 0x20, 0x00, - 0xa2, 0x27, 0x13, 0x89, 0xc0, 0x00, - 0x95, 0x51, 0xa8, 0xd4, 0x60, 0x00, - 0x4a, 0x1a, 0x0d, 0x06, 0x80, 0x00, - 0x30, 0x68, 0x34, 0x1a, 0x00, 0x00, - 0x2c, 0x89, 0x44, 0xa2, 0x40, 0x00, - 0x55, 0x8c, 0xc6, 0x63, 0x20, 0x00, - 0xaa, 0x27, 0x13, 0x89, 0xc0, 0x00, - 0xa5, 0x32, 0x99, 0x4c, 0xa0, 0x00, - 0x62, 0x61, 0xb0, 0xd8, 0x60, 0x00, - 0x3c, 0x5c, 0x2e, 0x17, 0x00, 0x00, - 0x51, 0x35, 0x2d, 0x86, 0x20, 0x00 -}; - -const uint8_t kMaskRandom35_13[78] = { - 0x51, 0x84, 0xc2, 0x61, 0x20, 0x00, - 0xa2, 0x27, 0x13, 0x89, 0xc0, 0x00, - 0x95, 0x51, 0xa8, 0xd4, 0x60, 0x00, - 0x4a, 0x1a, 0x0d, 0x06, 0x80, 0x00, - 0x30, 0x68, 0x34, 0x1a, 0x00, 0x00, - 0x2c, 0x89, 0x44, 0xa2, 0x40, 0x00, - 0x15, 0x8c, 0x46, 0x23, 0x00, 0x00, - 0x8a, 0x47, 0x23, 0x91, 0xc0, 0x00, - 0x25, 0x81, 0xc0, 0xe0, 0x60, 0x00, - 0x62, 0x12, 0x89, 0x44, 0xa0, 0x00, - 0x58, 0x58, 0x2c, 0x16, 0x00, 0x00, - 0x0e, 0x28, 0x94, 0x4a, 0x20, 0x00, - 0x83, 0x34, 0x1a, 0x0d, 0x00, 0x00 -}; - -const uint8_t kMaskRandom35_14[84] = { - 0x15, 0x8c, 0x46, 0x23, 0x00, 0x00, - 0x8a, 0x47, 0x23, 0x91, 0xc0, 0x00, - 0x25, 0x81, 0xc0, 0xe0, 0x60, 0x00, - 0x62, 0x12, 0x89, 0x44, 0xa0, 0x00, - 0x58, 0x58, 0x2c, 0x16, 0x00, 0x00, - 0x0e, 0x28, 0x94, 0x4a, 0x20, 0x00, - 0x83, 0x34, 0x1a, 0x0d, 0x00, 0x00, - 0x51, 0x84, 0xc2, 0x61, 0x20, 0x00, - 0xa2, 0x27, 0x13, 0x89, 0xc0, 0x00, - 0x95, 0x51, 0xa8, 0xd4, 0x60, 0x00, - 0x4a, 0x1a, 0x0d, 0x06, 0x80, 0x00, - 0x30, 0x68, 0x34, 0x1a, 0x00, 0x00, - 0x2c, 0x89, 0x44, 0xa2, 0x40, 0x00, - 0xb0, 0xde, 0xbf, 0xa7, 0xe0, 0x00 -}; - -const uint8_t kMaskRandom35_15[90] = { - 0x15, 0x8c, 0x46, 0x23, 0x00, 0x00, - 0x8a, 0x47, 0x23, 0x91, 0xc0, 0x00, - 0x25, 0x81, 0xc0, 0xe0, 0x60, 0x00, - 0x62, 0x12, 0x89, 0x44, 0xa0, 0x00, - 0x58, 0x58, 0x2c, 0x16, 0x00, 0x00, - 0x0e, 0x28, 0x94, 0x4a, 0x20, 0x00, - 0x83, 0x34, 0x1a, 0x0d, 0x00, 0x00, - 0x25, 0x2c, 0x16, 0x0b, 0x00, 0x00, - 0x8a, 0x91, 0x48, 0xa4, 0x40, 0x00, - 0x91, 0xc0, 0xe0, 0x70, 0x20, 0x00, - 0x68, 0x06, 0x83, 0x41, 0xa0, 0x00, - 0x32, 0xc8, 0x64, 0x32, 0x00, 0x00, - 0x43, 0x45, 0x22, 0x91, 0x40, 0x00, - 0xc4, 0x30, 0x98, 0x4c, 0x20, 0x00, - 0x1c, 0xa2, 0x51, 0x28, 0x80, 0x00 -}; - -const uint8_t kMaskRandom35_16[96] = { - 0x25, 0x2c, 0x16, 0x0b, 0x00, 0x00, - 0x8a, 0x91, 0x48, 0xa4, 0x40, 0x00, - 0x91, 0xc0, 0xe0, 0x70, 0x20, 0x00, - 0x68, 0x06, 0x83, 0x41, 0xa0, 0x00, - 0x32, 0xc8, 0x64, 0x32, 0x00, 0x00, - 0x43, 0x45, 0x22, 0x91, 0x40, 0x00, - 0xc4, 0x30, 0x98, 0x4c, 0x20, 0x00, - 0x1c, 0xa2, 0x51, 0x28, 0x80, 0x00, - 0x15, 0x8c, 0x46, 0x23, 0x00, 0x00, - 0x8a, 0x47, 0x23, 0x91, 0xc0, 0x00, - 0x25, 0x81, 0xc0, 0xe0, 0x60, 0x00, - 0x62, 0x12, 0x89, 0x44, 0xa0, 0x00, - 0x58, 0x58, 0x2c, 0x16, 0x00, 0x00, - 0x0e, 0x28, 0x94, 0x4a, 0x20, 0x00, - 0x83, 0x34, 0x1a, 0x0d, 0x00, 0x00, - 0x0a, 0x1c, 0x77, 0xf9, 0x00, 0x00 -}; - -const uint8_t kMaskRandom35_17[102] = { - 0x25, 0x2c, 0x16, 0x0b, 0x00, 0x00, - 0x8a, 0x91, 0x48, 0xa4, 0x40, 0x00, - 0x91, 0xc0, 0xe0, 0x70, 0x20, 0x00, - 0x68, 0x06, 0x83, 0x41, 0xa0, 0x00, - 0x32, 0xc8, 0x64, 0x32, 0x00, 0x00, - 0x43, 0x45, 0x22, 0x91, 0x40, 0x00, - 0xc4, 0x30, 0x98, 0x4c, 0x20, 0x00, - 0x1c, 0xa2, 0x51, 0x28, 0x80, 0x00, - 0x25, 0x4c, 0x26, 0x13, 0x00, 0x00, - 0x8a, 0x66, 0x33, 0x19, 0x80, 0x00, - 0x91, 0x91, 0x48, 0xa4, 0x40, 0x00, - 0x68, 0x42, 0xa1, 0x50, 0xa0, 0x00, - 0x32, 0xa4, 0x52, 0x29, 0x00, 0x00, - 0x43, 0x13, 0x09, 0x84, 0xc0, 0x00, - 0xc4, 0x30, 0x98, 0x4c, 0x20, 0x00, - 0x1c, 0x88, 0xc4, 0x62, 0x20, 0x00, - 0x3c, 0x09, 0x04, 0x82, 0x40, 0x00 -}; - -const uint8_t kMaskRandom35_18[108] = { - 0x8e, 0xcc, 0x22, 0x51, 0x20, 0x00, - 0x6a, 0x2b, 0x33, 0x13, 0x00, 0x00, - 0x36, 0x32, 0xc8, 0x24, 0xa0, 0x00, - 0xd1, 0x25, 0x80, 0xd2, 0xc0, 0x00, - 0x55, 0x8c, 0x87, 0x09, 0x40, 0x00, - 0xaa, 0x27, 0x09, 0x85, 0x80, 0x00, - 0xa5, 0x32, 0x90, 0x68, 0x20, 0x00, - 0x62, 0x61, 0xe1, 0x28, 0x80, 0x00, - 0x3c, 0x5c, 0x14, 0x86, 0x40, 0x00, - 0x64, 0x16, 0x0b, 0x05, 0x80, 0x00, - 0xa2, 0xc2, 0x61, 0x30, 0x80, 0x00, - 0x51, 0x60, 0xb0, 0x58, 0x20, 0x00, - 0x4a, 0x85, 0x42, 0xa1, 0x40, 0x00, - 0x38, 0x4c, 0x26, 0x13, 0x00, 0x00, - 0x89, 0x29, 0x14, 0x8a, 0x40, 0x00, - 0x07, 0x11, 0x88, 0xc4, 0x60, 0x00, - 0x94, 0xb0, 0x58, 0x2c, 0x00, 0x00, - 0x40, 0xc9, 0x65, 0xbe, 0xc0, 0x00 -}; - -const uint8_t kMaskRandom35_19[114] = { - 0x8e, 0xcc, 0x22, 0x51, 0x20, 0x00, - 0x6a, 0x2b, 0x33, 0x13, 0x00, 0x00, - 0x36, 0x32, 0xc8, 0x24, 0xa0, 0x00, - 0xd1, 0x25, 0x80, 0xd2, 0xc0, 0x00, - 0x55, 0x8c, 0x87, 0x09, 0x40, 0x00, - 0xaa, 0x27, 0x09, 0x85, 0x80, 0x00, - 0xa5, 0x32, 0x90, 0x68, 0x20, 0x00, - 0x62, 0x61, 0xe1, 0x28, 0x80, 0x00, - 0x3c, 0x5c, 0x14, 0x86, 0x40, 0x00, - 0x55, 0x8c, 0xc6, 0x63, 0x20, 0x00, - 0xaa, 0x27, 0x13, 0x89, 0xc0, 0x00, - 0xa5, 0x32, 0x99, 0x4c, 0xa0, 0x00, - 0x62, 0x61, 0xb0, 0xd8, 0x60, 0x00, - 0x3c, 0x5c, 0x2e, 0x17, 0x00, 0x00, - 0x8e, 0xcc, 0x66, 0x33, 0x00, 0x00, - 0x6a, 0x2b, 0x15, 0x8a, 0xc0, 0x00, - 0x36, 0x32, 0x99, 0x4c, 0xa0, 0x00, - 0xd1, 0x25, 0x92, 0xc9, 0x60, 0x00, - 0xc8, 0x02, 0xfe, 0xce, 0xe0, 0x00 -}; - -const uint8_t kMaskRandom35_2[12] = { - 0xce, 0xce, 0x67, 0x33, 0x80, 0x00, - 0xb9, 0x39, 0x9c, 0xce, 0x60, 0x00 -}; - -const uint8_t kMaskRandom35_20[120] = { - 0x55, 0x8c, 0xc6, 0x63, 0x20, 0x00, - 0xaa, 0x27, 0x13, 0x89, 0xc0, 0x00, - 0xa5, 0x32, 0x99, 0x4c, 0xa0, 0x00, - 0x62, 0x61, 0xb0, 0xd8, 0x60, 0x00, - 0x3c, 0x5c, 0x2e, 0x17, 0x00, 0x00, - 0x8e, 0xcc, 0x66, 0x33, 0x00, 0x00, - 0x6a, 0x2b, 0x15, 0x8a, 0xc0, 0x00, - 0x36, 0x32, 0x99, 0x4c, 0xa0, 0x00, - 0xd1, 0x25, 0x92, 0xc9, 0x60, 0x00, - 0xc8, 0x02, 0xfe, 0xce, 0xe0, 0x00, - 0x8e, 0xcc, 0x22, 0x51, 0x20, 0x00, - 0x6a, 0x2b, 0x33, 0x13, 0x00, 0x00, - 0x36, 0x32, 0xc8, 0x24, 0xa0, 0x00, - 0xd1, 0x25, 0x80, 0xd2, 0xc0, 0x00, - 0x55, 0x8c, 0x87, 0x09, 0x40, 0x00, - 0xaa, 0x27, 0x09, 0x85, 0x80, 0x00, - 0xa5, 0x32, 0x90, 0x68, 0x20, 0x00, - 0x62, 0x61, 0xe1, 0x28, 0x80, 0x00, - 0x3c, 0x5c, 0x14, 0x86, 0x40, 0x00, - 0x63, 0x36, 0x5c, 0xd3, 0x80, 0x00 -}; - -const uint8_t kMaskRandom35_21[126] = { - 0x55, 0x8c, 0xc6, 0x63, 0x20, 0x00, - 0xaa, 0x27, 0x13, 0x89, 0xc0, 0x00, - 0xa5, 0x32, 0x99, 0x4c, 0xa0, 0x00, - 0x62, 0x61, 0xb0, 0xd8, 0x60, 0x00, - 0x3c, 0x5c, 0x2e, 0x17, 0x00, 0x00, - 0x8e, 0xcc, 0x66, 0x33, 0x00, 0x00, - 0x6a, 0x2b, 0x15, 0x8a, 0xc0, 0x00, - 0x36, 0x32, 0x99, 0x4c, 0xa0, 0x00, - 0xd1, 0x25, 0x92, 0xc9, 0x60, 0x00, - 0xc8, 0x02, 0xfe, 0xce, 0xe0, 0x00, - 0x55, 0x8c, 0xc6, 0x63, 0x20, 0x00, - 0xaa, 0x27, 0x13, 0x89, 0xc0, 0x00, - 0xa5, 0x32, 0x99, 0x4c, 0xa0, 0x00, - 0x62, 0x61, 0xb0, 0xd8, 0x60, 0x00, - 0x3c, 0x5c, 0x2e, 0x17, 0x00, 0x00, - 0x51, 0x84, 0xc2, 0x61, 0x20, 0x00, - 0xa2, 0x27, 0x13, 0x89, 0xc0, 0x00, - 0x95, 0x51, 0xa8, 0xd4, 0x60, 0x00, - 0x4a, 0x1a, 0x0d, 0x06, 0x80, 0x00, - 0x30, 0x68, 0x34, 0x1a, 0x00, 0x00, - 0x2c, 0x89, 0x44, 0xa2, 0x40, 0x00 -}; - -const uint8_t kMaskRandom35_22[132] = { - 0x55, 0x8c, 0xc6, 0x63, 0x20, 0x00, - 0xaa, 0x27, 0x13, 0x89, 0xc0, 0x00, - 0xa5, 0x32, 0x99, 0x4c, 0xa0, 0x00, - 0x62, 0x61, 0xb0, 0xd8, 0x60, 0x00, - 0x3c, 0x5c, 0x2e, 0x17, 0x00, 0x00, - 0x51, 0x84, 0xc2, 0x61, 0x20, 0x00, - 0xa2, 0x27, 0x13, 0x89, 0xc0, 0x00, - 0x95, 0x51, 0xa8, 0xd4, 0x60, 0x00, - 0x4a, 0x1a, 0x0d, 0x06, 0x80, 0x00, - 0x30, 0x68, 0x34, 0x1a, 0x00, 0x00, - 0x2c, 0x89, 0x44, 0xa2, 0x40, 0x00, - 0x55, 0x8c, 0xc6, 0x63, 0x20, 0x00, - 0xaa, 0x27, 0x13, 0x89, 0xc0, 0x00, - 0xa5, 0x32, 0x99, 0x4c, 0xa0, 0x00, - 0x62, 0x61, 0xb0, 0xd8, 0x60, 0x00, - 0x3c, 0x5c, 0x2e, 0x17, 0x00, 0x00, - 0x8e, 0xcc, 0x66, 0x33, 0x00, 0x00, - 0x6a, 0x2b, 0x15, 0x8a, 0xc0, 0x00, - 0x36, 0x32, 0x99, 0x4c, 0xa0, 0x00, - 0xd1, 0x25, 0x92, 0xc9, 0x60, 0x00, - 0xc8, 0x02, 0xfe, 0xce, 0xe0, 0x00, - 0x84, 0xc7, 0xbc, 0xcc, 0x00, 0x00 -}; - -const uint8_t kMaskRandom35_23[138] = { - 0x55, 0x8c, 0xc6, 0x63, 0x20, 0x00, - 0xaa, 0x27, 0x13, 0x89, 0xc0, 0x00, - 0xa5, 0x32, 0x99, 0x4c, 0xa0, 0x00, - 0x62, 0x61, 0xb0, 0xd8, 0x60, 0x00, - 0x3c, 0x5c, 0x2e, 0x17, 0x00, 0x00, - 0x51, 0x84, 0xc2, 0x61, 0x20, 0x00, - 0xa2, 0x27, 0x13, 0x89, 0xc0, 0x00, - 0x95, 0x51, 0xa8, 0xd4, 0x60, 0x00, - 0x4a, 0x1a, 0x0d, 0x06, 0x80, 0x00, - 0x30, 0x68, 0x34, 0x1a, 0x00, 0x00, - 0x2c, 0x89, 0x44, 0xa2, 0x40, 0x00, - 0x51, 0x84, 0xc2, 0x61, 0x20, 0x00, - 0xa2, 0x27, 0x13, 0x89, 0xc0, 0x00, - 0x95, 0x51, 0xa8, 0xd4, 0x60, 0x00, - 0x4a, 0x1a, 0x0d, 0x06, 0x80, 0x00, - 0x30, 0x68, 0x34, 0x1a, 0x00, 0x00, - 0x2c, 0x89, 0x44, 0xa2, 0x40, 0x00, - 0x55, 0x8c, 0xc6, 0x63, 0x20, 0x00, - 0xaa, 0x27, 0x13, 0x89, 0xc0, 0x00, - 0xa5, 0x32, 0x99, 0x4c, 0xa0, 0x00, - 0x62, 0x61, 0xb0, 0xd8, 0x60, 0x00, - 0x3c, 0x5c, 0x2e, 0x17, 0x00, 0x00, - 0x51, 0x35, 0x2d, 0x86, 0x20, 0x00 -}; - -const uint8_t kMaskRandom35_24[144] = { - 0x51, 0x84, 0xc2, 0x61, 0x20, 0x00, - 0xa2, 0x27, 0x13, 0x89, 0xc0, 0x00, - 0x95, 0x51, 0xa8, 0xd4, 0x60, 0x00, - 0x4a, 0x1a, 0x0d, 0x06, 0x80, 0x00, - 0x30, 0x68, 0x34, 0x1a, 0x00, 0x00, - 0x2c, 0x89, 0x44, 0xa2, 0x40, 0x00, - 0x55, 0x8c, 0xc6, 0x63, 0x20, 0x00, - 0xaa, 0x27, 0x13, 0x89, 0xc0, 0x00, - 0xa5, 0x32, 0x99, 0x4c, 0xa0, 0x00, - 0x62, 0x61, 0xb0, 0xd8, 0x60, 0x00, - 0x3c, 0x5c, 0x2e, 0x17, 0x00, 0x00, - 0x51, 0x35, 0x2d, 0x86, 0x20, 0x00, - 0x55, 0x8c, 0xc6, 0x63, 0x20, 0x00, - 0xaa, 0x27, 0x13, 0x89, 0xc0, 0x00, - 0xa5, 0x32, 0x99, 0x4c, 0xa0, 0x00, - 0x62, 0x61, 0xb0, 0xd8, 0x60, 0x00, - 0x3c, 0x5c, 0x2e, 0x17, 0x00, 0x00, - 0x51, 0x84, 0xc2, 0x61, 0x20, 0x00, - 0xa2, 0x27, 0x13, 0x89, 0xc0, 0x00, - 0x95, 0x51, 0xa8, 0xd4, 0x60, 0x00, - 0x4a, 0x1a, 0x0d, 0x06, 0x80, 0x00, - 0x30, 0x68, 0x34, 0x1a, 0x00, 0x00, - 0x2c, 0x89, 0x44, 0xa2, 0x40, 0x00, - 0x0d, 0xfb, 0x06, 0x89, 0x00, 0x00 -}; - -const uint8_t kMaskRandom35_25[150] = { - 0x51, 0x84, 0xc2, 0x61, 0x20, 0x00, - 0xa2, 0x27, 0x13, 0x89, 0xc0, 0x00, - 0x95, 0x51, 0xa8, 0xd4, 0x60, 0x00, - 0x4a, 0x1a, 0x0d, 0x06, 0x80, 0x00, - 0x30, 0x68, 0x34, 0x1a, 0x00, 0x00, - 0x2c, 0x89, 0x44, 0xa2, 0x40, 0x00, - 0x55, 0x8c, 0xc6, 0x63, 0x20, 0x00, - 0xaa, 0x27, 0x13, 0x89, 0xc0, 0x00, - 0xa5, 0x32, 0x99, 0x4c, 0xa0, 0x00, - 0x62, 0x61, 0xb0, 0xd8, 0x60, 0x00, - 0x3c, 0x5c, 0x2e, 0x17, 0x00, 0x00, - 0x51, 0x35, 0x2d, 0x86, 0x20, 0x00, - 0x51, 0x84, 0xc2, 0x61, 0x20, 0x00, - 0xa2, 0x27, 0x13, 0x89, 0xc0, 0x00, - 0x95, 0x51, 0xa8, 0xd4, 0x60, 0x00, - 0x4a, 0x1a, 0x0d, 0x06, 0x80, 0x00, - 0x30, 0x68, 0x34, 0x1a, 0x00, 0x00, - 0x2c, 0x89, 0x44, 0xa2, 0x40, 0x00, - 0x15, 0x8c, 0x46, 0x23, 0x00, 0x00, - 0x8a, 0x47, 0x23, 0x91, 0xc0, 0x00, - 0x25, 0x81, 0xc0, 0xe0, 0x60, 0x00, - 0x62, 0x12, 0x89, 0x44, 0xa0, 0x00, - 0x58, 0x58, 0x2c, 0x16, 0x00, 0x00, - 0x0e, 0x28, 0x94, 0x4a, 0x20, 0x00, - 0x83, 0x34, 0x1a, 0x0d, 0x00, 0x00 -}; - -const uint8_t kMaskRandom35_26[156] = { - 0x51, 0x84, 0xc2, 0x61, 0x20, 0x00, - 0xa2, 0x27, 0x13, 0x89, 0xc0, 0x00, - 0x95, 0x51, 0xa8, 0xd4, 0x60, 0x00, - 0x4a, 0x1a, 0x0d, 0x06, 0x80, 0x00, - 0x30, 0x68, 0x34, 0x1a, 0x00, 0x00, - 0x2c, 0x89, 0x44, 0xa2, 0x40, 0x00, - 0x15, 0x8c, 0x46, 0x23, 0x00, 0x00, - 0x8a, 0x47, 0x23, 0x91, 0xc0, 0x00, - 0x25, 0x81, 0xc0, 0xe0, 0x60, 0x00, - 0x62, 0x12, 0x89, 0x44, 0xa0, 0x00, - 0x58, 0x58, 0x2c, 0x16, 0x00, 0x00, - 0x0e, 0x28, 0x94, 0x4a, 0x20, 0x00, - 0x83, 0x34, 0x1a, 0x0d, 0x00, 0x00, - 0x51, 0x84, 0xc2, 0x61, 0x20, 0x00, - 0xa2, 0x27, 0x13, 0x89, 0xc0, 0x00, - 0x95, 0x51, 0xa8, 0xd4, 0x60, 0x00, - 0x4a, 0x1a, 0x0d, 0x06, 0x80, 0x00, - 0x30, 0x68, 0x34, 0x1a, 0x00, 0x00, - 0x2c, 0x89, 0x44, 0xa2, 0x40, 0x00, - 0x55, 0x8c, 0xc6, 0x63, 0x20, 0x00, - 0xaa, 0x27, 0x13, 0x89, 0xc0, 0x00, - 0xa5, 0x32, 0x99, 0x4c, 0xa0, 0x00, - 0x62, 0x61, 0xb0, 0xd8, 0x60, 0x00, - 0x3c, 0x5c, 0x2e, 0x17, 0x00, 0x00, - 0x51, 0x35, 0x2d, 0x86, 0x20, 0x00, - 0xc4, 0x57, 0x70, 0x47, 0x40, 0x00 -}; - -const uint8_t kMaskRandom35_27[162] = { - 0x51, 0x84, 0xc2, 0x61, 0x20, 0x00, - 0xa2, 0x27, 0x13, 0x89, 0xc0, 0x00, - 0x95, 0x51, 0xa8, 0xd4, 0x60, 0x00, - 0x4a, 0x1a, 0x0d, 0x06, 0x80, 0x00, - 0x30, 0x68, 0x34, 0x1a, 0x00, 0x00, - 0x2c, 0x89, 0x44, 0xa2, 0x40, 0x00, - 0x15, 0x8c, 0x46, 0x23, 0x00, 0x00, - 0x8a, 0x47, 0x23, 0x91, 0xc0, 0x00, - 0x25, 0x81, 0xc0, 0xe0, 0x60, 0x00, - 0x62, 0x12, 0x89, 0x44, 0xa0, 0x00, - 0x58, 0x58, 0x2c, 0x16, 0x00, 0x00, - 0x0e, 0x28, 0x94, 0x4a, 0x20, 0x00, - 0x83, 0x34, 0x1a, 0x0d, 0x00, 0x00, - 0x15, 0x8c, 0x46, 0x23, 0x00, 0x00, - 0x8a, 0x47, 0x23, 0x91, 0xc0, 0x00, - 0x25, 0x81, 0xc0, 0xe0, 0x60, 0x00, - 0x62, 0x12, 0x89, 0x44, 0xa0, 0x00, - 0x58, 0x58, 0x2c, 0x16, 0x00, 0x00, - 0x0e, 0x28, 0x94, 0x4a, 0x20, 0x00, - 0x83, 0x34, 0x1a, 0x0d, 0x00, 0x00, - 0x51, 0x84, 0xc2, 0x61, 0x20, 0x00, - 0xa2, 0x27, 0x13, 0x89, 0xc0, 0x00, - 0x95, 0x51, 0xa8, 0xd4, 0x60, 0x00, - 0x4a, 0x1a, 0x0d, 0x06, 0x80, 0x00, - 0x30, 0x68, 0x34, 0x1a, 0x00, 0x00, - 0x2c, 0x89, 0x44, 0xa2, 0x40, 0x00, - 0xb0, 0xde, 0xbf, 0xa7, 0xe0, 0x00 -}; - -const uint8_t kMaskRandom35_28[168] = { - 0x15, 0x8c, 0x46, 0x23, 0x00, 0x00, - 0x8a, 0x47, 0x23, 0x91, 0xc0, 0x00, - 0x25, 0x81, 0xc0, 0xe0, 0x60, 0x00, - 0x62, 0x12, 0x89, 0x44, 0xa0, 0x00, - 0x58, 0x58, 0x2c, 0x16, 0x00, 0x00, - 0x0e, 0x28, 0x94, 0x4a, 0x20, 0x00, - 0x83, 0x34, 0x1a, 0x0d, 0x00, 0x00, - 0x51, 0x84, 0xc2, 0x61, 0x20, 0x00, - 0xa2, 0x27, 0x13, 0x89, 0xc0, 0x00, - 0x95, 0x51, 0xa8, 0xd4, 0x60, 0x00, - 0x4a, 0x1a, 0x0d, 0x06, 0x80, 0x00, - 0x30, 0x68, 0x34, 0x1a, 0x00, 0x00, - 0x2c, 0x89, 0x44, 0xa2, 0x40, 0x00, - 0xb0, 0xde, 0xbf, 0xa7, 0xe0, 0x00, - 0x51, 0x84, 0xc2, 0x61, 0x20, 0x00, - 0xa2, 0x27, 0x13, 0x89, 0xc0, 0x00, - 0x95, 0x51, 0xa8, 0xd4, 0x60, 0x00, - 0x4a, 0x1a, 0x0d, 0x06, 0x80, 0x00, - 0x30, 0x68, 0x34, 0x1a, 0x00, 0x00, - 0x2c, 0x89, 0x44, 0xa2, 0x40, 0x00, - 0x15, 0x8c, 0x46, 0x23, 0x00, 0x00, - 0x8a, 0x47, 0x23, 0x91, 0xc0, 0x00, - 0x25, 0x81, 0xc0, 0xe0, 0x60, 0x00, - 0x62, 0x12, 0x89, 0x44, 0xa0, 0x00, - 0x58, 0x58, 0x2c, 0x16, 0x00, 0x00, - 0x0e, 0x28, 0x94, 0x4a, 0x20, 0x00, - 0x83, 0x34, 0x1a, 0x0d, 0x00, 0x00, - 0x34, 0x4a, 0x80, 0x94, 0x40, 0x00 -}; - -const uint8_t kMaskRandom35_29[174] = { - 0x15, 0x8c, 0x46, 0x23, 0x00, 0x00, - 0x8a, 0x47, 0x23, 0x91, 0xc0, 0x00, - 0x25, 0x81, 0xc0, 0xe0, 0x60, 0x00, - 0x62, 0x12, 0x89, 0x44, 0xa0, 0x00, - 0x58, 0x58, 0x2c, 0x16, 0x00, 0x00, - 0x0e, 0x28, 0x94, 0x4a, 0x20, 0x00, - 0x83, 0x34, 0x1a, 0x0d, 0x00, 0x00, - 0x51, 0x84, 0xc2, 0x61, 0x20, 0x00, - 0xa2, 0x27, 0x13, 0x89, 0xc0, 0x00, - 0x95, 0x51, 0xa8, 0xd4, 0x60, 0x00, - 0x4a, 0x1a, 0x0d, 0x06, 0x80, 0x00, - 0x30, 0x68, 0x34, 0x1a, 0x00, 0x00, - 0x2c, 0x89, 0x44, 0xa2, 0x40, 0x00, - 0xb0, 0xde, 0xbf, 0xa7, 0xe0, 0x00, - 0x15, 0x8c, 0x46, 0x23, 0x00, 0x00, - 0x8a, 0x47, 0x23, 0x91, 0xc0, 0x00, - 0x25, 0x81, 0xc0, 0xe0, 0x60, 0x00, - 0x62, 0x12, 0x89, 0x44, 0xa0, 0x00, - 0x58, 0x58, 0x2c, 0x16, 0x00, 0x00, - 0x0e, 0x28, 0x94, 0x4a, 0x20, 0x00, - 0x83, 0x34, 0x1a, 0x0d, 0x00, 0x00, - 0x25, 0x2c, 0x16, 0x0b, 0x00, 0x00, - 0x8a, 0x91, 0x48, 0xa4, 0x40, 0x00, - 0x91, 0xc0, 0xe0, 0x70, 0x20, 0x00, - 0x68, 0x06, 0x83, 0x41, 0xa0, 0x00, - 0x32, 0xc8, 0x64, 0x32, 0x00, 0x00, - 0x43, 0x45, 0x22, 0x91, 0x40, 0x00, - 0xc4, 0x30, 0x98, 0x4c, 0x20, 0x00, - 0x1c, 0xa2, 0x51, 0x28, 0x80, 0x00 -}; - -const uint8_t kMaskRandom35_3[18] = { - 0xcd, 0xcc, 0x66, 0x33, 0x00, 0x00, - 0x97, 0x27, 0x13, 0x8a, 0xc0, 0x00, - 0xb8, 0xd1, 0xc9, 0x64, 0xa0, 0x00 -}; - -const uint8_t kMaskRandom35_30[180] = { - 0x15, 0x8c, 0x46, 0x23, 0x00, 0x00, - 0x8a, 0x47, 0x23, 0x91, 0xc0, 0x00, - 0x25, 0x81, 0xc0, 0xe0, 0x60, 0x00, - 0x62, 0x12, 0x89, 0x44, 0xa0, 0x00, - 0x58, 0x58, 0x2c, 0x16, 0x00, 0x00, - 0x0e, 0x28, 0x94, 0x4a, 0x20, 0x00, - 0x83, 0x34, 0x1a, 0x0d, 0x00, 0x00, - 0x25, 0x2c, 0x16, 0x0b, 0x00, 0x00, - 0x8a, 0x91, 0x48, 0xa4, 0x40, 0x00, - 0x91, 0xc0, 0xe0, 0x70, 0x20, 0x00, - 0x68, 0x06, 0x83, 0x41, 0xa0, 0x00, - 0x32, 0xc8, 0x64, 0x32, 0x00, 0x00, - 0x43, 0x45, 0x22, 0x91, 0x40, 0x00, - 0xc4, 0x30, 0x98, 0x4c, 0x20, 0x00, - 0x1c, 0xa2, 0x51, 0x28, 0x80, 0x00, - 0x15, 0x8c, 0x46, 0x23, 0x00, 0x00, - 0x8a, 0x47, 0x23, 0x91, 0xc0, 0x00, - 0x25, 0x81, 0xc0, 0xe0, 0x60, 0x00, - 0x62, 0x12, 0x89, 0x44, 0xa0, 0x00, - 0x58, 0x58, 0x2c, 0x16, 0x00, 0x00, - 0x0e, 0x28, 0x94, 0x4a, 0x20, 0x00, - 0x83, 0x34, 0x1a, 0x0d, 0x00, 0x00, - 0x51, 0x84, 0xc2, 0x61, 0x20, 0x00, - 0xa2, 0x27, 0x13, 0x89, 0xc0, 0x00, - 0x95, 0x51, 0xa8, 0xd4, 0x60, 0x00, - 0x4a, 0x1a, 0x0d, 0x06, 0x80, 0x00, - 0x30, 0x68, 0x34, 0x1a, 0x00, 0x00, - 0x2c, 0x89, 0x44, 0xa2, 0x40, 0x00, - 0xb0, 0xde, 0xbf, 0xa7, 0xe0, 0x00, - 0x32, 0x1b, 0x9f, 0x09, 0x20, 0x00 -}; - -const uint8_t kMaskRandom35_31[186] = { - 0x15, 0x8c, 0x46, 0x23, 0x00, 0x00, - 0x8a, 0x47, 0x23, 0x91, 0xc0, 0x00, - 0x25, 0x81, 0xc0, 0xe0, 0x60, 0x00, - 0x62, 0x12, 0x89, 0x44, 0xa0, 0x00, - 0x58, 0x58, 0x2c, 0x16, 0x00, 0x00, - 0x0e, 0x28, 0x94, 0x4a, 0x20, 0x00, - 0x83, 0x34, 0x1a, 0x0d, 0x00, 0x00, - 0x25, 0x2c, 0x16, 0x0b, 0x00, 0x00, - 0x8a, 0x91, 0x48, 0xa4, 0x40, 0x00, - 0x91, 0xc0, 0xe0, 0x70, 0x20, 0x00, - 0x68, 0x06, 0x83, 0x41, 0xa0, 0x00, - 0x32, 0xc8, 0x64, 0x32, 0x00, 0x00, - 0x43, 0x45, 0x22, 0x91, 0x40, 0x00, - 0xc4, 0x30, 0x98, 0x4c, 0x20, 0x00, - 0x1c, 0xa2, 0x51, 0x28, 0x80, 0x00, - 0x25, 0x2c, 0x16, 0x0b, 0x00, 0x00, - 0x8a, 0x91, 0x48, 0xa4, 0x40, 0x00, - 0x91, 0xc0, 0xe0, 0x70, 0x20, 0x00, - 0x68, 0x06, 0x83, 0x41, 0xa0, 0x00, - 0x32, 0xc8, 0x64, 0x32, 0x00, 0x00, - 0x43, 0x45, 0x22, 0x91, 0x40, 0x00, - 0xc4, 0x30, 0x98, 0x4c, 0x20, 0x00, - 0x1c, 0xa2, 0x51, 0x28, 0x80, 0x00, - 0x15, 0x8c, 0x46, 0x23, 0x00, 0x00, - 0x8a, 0x47, 0x23, 0x91, 0xc0, 0x00, - 0x25, 0x81, 0xc0, 0xe0, 0x60, 0x00, - 0x62, 0x12, 0x89, 0x44, 0xa0, 0x00, - 0x58, 0x58, 0x2c, 0x16, 0x00, 0x00, - 0x0e, 0x28, 0x94, 0x4a, 0x20, 0x00, - 0x83, 0x34, 0x1a, 0x0d, 0x00, 0x00, - 0x0a, 0x1c, 0x77, 0xf9, 0x00, 0x00 -}; - -const uint8_t kMaskRandom35_32[192] = { - 0x25, 0x2c, 0x16, 0x0b, 0x00, 0x00, - 0x8a, 0x91, 0x48, 0xa4, 0x40, 0x00, - 0x91, 0xc0, 0xe0, 0x70, 0x20, 0x00, - 0x68, 0x06, 0x83, 0x41, 0xa0, 0x00, - 0x32, 0xc8, 0x64, 0x32, 0x00, 0x00, - 0x43, 0x45, 0x22, 0x91, 0x40, 0x00, - 0xc4, 0x30, 0x98, 0x4c, 0x20, 0x00, - 0x1c, 0xa2, 0x51, 0x28, 0x80, 0x00, - 0x15, 0x8c, 0x46, 0x23, 0x00, 0x00, - 0x8a, 0x47, 0x23, 0x91, 0xc0, 0x00, - 0x25, 0x81, 0xc0, 0xe0, 0x60, 0x00, - 0x62, 0x12, 0x89, 0x44, 0xa0, 0x00, - 0x58, 0x58, 0x2c, 0x16, 0x00, 0x00, - 0x0e, 0x28, 0x94, 0x4a, 0x20, 0x00, - 0x83, 0x34, 0x1a, 0x0d, 0x00, 0x00, - 0x0a, 0x1c, 0x77, 0xf9, 0x00, 0x00, - 0x15, 0x8c, 0x46, 0x23, 0x00, 0x00, - 0x8a, 0x47, 0x23, 0x91, 0xc0, 0x00, - 0x25, 0x81, 0xc0, 0xe0, 0x60, 0x00, - 0x62, 0x12, 0x89, 0x44, 0xa0, 0x00, - 0x58, 0x58, 0x2c, 0x16, 0x00, 0x00, - 0x0e, 0x28, 0x94, 0x4a, 0x20, 0x00, - 0x83, 0x34, 0x1a, 0x0d, 0x00, 0x00, - 0x25, 0x2c, 0x16, 0x0b, 0x00, 0x00, - 0x8a, 0x91, 0x48, 0xa4, 0x40, 0x00, - 0x91, 0xc0, 0xe0, 0x70, 0x20, 0x00, - 0x68, 0x06, 0x83, 0x41, 0xa0, 0x00, - 0x32, 0xc8, 0x64, 0x32, 0x00, 0x00, - 0x43, 0x45, 0x22, 0x91, 0x40, 0x00, - 0xc4, 0x30, 0x98, 0x4c, 0x20, 0x00, - 0x1c, 0xa2, 0x51, 0x28, 0x80, 0x00, - 0xeb, 0x31, 0x7b, 0x80, 0x00, 0x00 -}; - -const uint8_t kMaskRandom35_33[198] = { - 0x25, 0x2c, 0x16, 0x0b, 0x00, 0x00, - 0x8a, 0x91, 0x48, 0xa4, 0x40, 0x00, - 0x91, 0xc0, 0xe0, 0x70, 0x20, 0x00, - 0x68, 0x06, 0x83, 0x41, 0xa0, 0x00, - 0x32, 0xc8, 0x64, 0x32, 0x00, 0x00, - 0x43, 0x45, 0x22, 0x91, 0x40, 0x00, - 0xc4, 0x30, 0x98, 0x4c, 0x20, 0x00, - 0x1c, 0xa2, 0x51, 0x28, 0x80, 0x00, - 0x15, 0x8c, 0x46, 0x23, 0x00, 0x00, - 0x8a, 0x47, 0x23, 0x91, 0xc0, 0x00, - 0x25, 0x81, 0xc0, 0xe0, 0x60, 0x00, - 0x62, 0x12, 0x89, 0x44, 0xa0, 0x00, - 0x58, 0x58, 0x2c, 0x16, 0x00, 0x00, - 0x0e, 0x28, 0x94, 0x4a, 0x20, 0x00, - 0x83, 0x34, 0x1a, 0x0d, 0x00, 0x00, - 0x0a, 0x1c, 0x77, 0xf9, 0x00, 0x00, - 0x25, 0x2c, 0x16, 0x0b, 0x00, 0x00, - 0x8a, 0x91, 0x48, 0xa4, 0x40, 0x00, - 0x91, 0xc0, 0xe0, 0x70, 0x20, 0x00, - 0x68, 0x06, 0x83, 0x41, 0xa0, 0x00, - 0x32, 0xc8, 0x64, 0x32, 0x00, 0x00, - 0x43, 0x45, 0x22, 0x91, 0x40, 0x00, - 0xc4, 0x30, 0x98, 0x4c, 0x20, 0x00, - 0x1c, 0xa2, 0x51, 0x28, 0x80, 0x00, - 0x25, 0x4c, 0x26, 0x13, 0x00, 0x00, - 0x8a, 0x66, 0x33, 0x19, 0x80, 0x00, - 0x91, 0x91, 0x48, 0xa4, 0x40, 0x00, - 0x68, 0x42, 0xa1, 0x50, 0xa0, 0x00, - 0x32, 0xa4, 0x52, 0x29, 0x00, 0x00, - 0x43, 0x13, 0x09, 0x84, 0xc0, 0x00, - 0xc4, 0x30, 0x98, 0x4c, 0x20, 0x00, - 0x1c, 0x88, 0xc4, 0x62, 0x20, 0x00, - 0x3c, 0x09, 0x04, 0x82, 0x40, 0x00 -}; - -const uint8_t kMaskRandom35_34[204] = { - 0x25, 0x2c, 0x16, 0x0b, 0x00, 0x00, - 0x8a, 0x91, 0x48, 0xa4, 0x40, 0x00, - 0x91, 0xc0, 0xe0, 0x70, 0x20, 0x00, - 0x68, 0x06, 0x83, 0x41, 0xa0, 0x00, - 0x32, 0xc8, 0x64, 0x32, 0x00, 0x00, - 0x43, 0x45, 0x22, 0x91, 0x40, 0x00, - 0xc4, 0x30, 0x98, 0x4c, 0x20, 0x00, - 0x1c, 0xa2, 0x51, 0x28, 0x80, 0x00, - 0x25, 0x4c, 0x26, 0x13, 0x00, 0x00, - 0x8a, 0x66, 0x33, 0x19, 0x80, 0x00, - 0x91, 0x91, 0x48, 0xa4, 0x40, 0x00, - 0x68, 0x42, 0xa1, 0x50, 0xa0, 0x00, - 0x32, 0xa4, 0x52, 0x29, 0x00, 0x00, - 0x43, 0x13, 0x09, 0x84, 0xc0, 0x00, - 0xc4, 0x30, 0x98, 0x4c, 0x20, 0x00, - 0x1c, 0x88, 0xc4, 0x62, 0x20, 0x00, - 0x3c, 0x09, 0x04, 0x82, 0x40, 0x00, - 0x25, 0x2c, 0x16, 0x0b, 0x00, 0x00, - 0x8a, 0x91, 0x48, 0xa4, 0x40, 0x00, - 0x91, 0xc0, 0xe0, 0x70, 0x20, 0x00, - 0x68, 0x06, 0x83, 0x41, 0xa0, 0x00, - 0x32, 0xc8, 0x64, 0x32, 0x00, 0x00, - 0x43, 0x45, 0x22, 0x91, 0x40, 0x00, - 0xc4, 0x30, 0x98, 0x4c, 0x20, 0x00, - 0x1c, 0xa2, 0x51, 0x28, 0x80, 0x00, - 0x15, 0x8c, 0x46, 0x23, 0x00, 0x00, - 0x8a, 0x47, 0x23, 0x91, 0xc0, 0x00, - 0x25, 0x81, 0xc0, 0xe0, 0x60, 0x00, - 0x62, 0x12, 0x89, 0x44, 0xa0, 0x00, - 0x58, 0x58, 0x2c, 0x16, 0x00, 0x00, - 0x0e, 0x28, 0x94, 0x4a, 0x20, 0x00, - 0x83, 0x34, 0x1a, 0x0d, 0x00, 0x00, - 0x0a, 0x1c, 0x77, 0xf9, 0x00, 0x00, - 0x70, 0x07, 0xcd, 0x8c, 0xc0, 0x00 -}; - -const uint8_t kMaskRandom35_35[210] = { - 0x25, 0x2c, 0x16, 0x0b, 0x00, 0x00, - 0x8a, 0x91, 0x48, 0xa4, 0x40, 0x00, - 0x91, 0xc0, 0xe0, 0x70, 0x20, 0x00, - 0x68, 0x06, 0x83, 0x41, 0xa0, 0x00, - 0x32, 0xc8, 0x64, 0x32, 0x00, 0x00, - 0x43, 0x45, 0x22, 0x91, 0x40, 0x00, - 0xc4, 0x30, 0x98, 0x4c, 0x20, 0x00, - 0x1c, 0xa2, 0x51, 0x28, 0x80, 0x00, - 0x25, 0x4c, 0x26, 0x13, 0x00, 0x00, - 0x8a, 0x66, 0x33, 0x19, 0x80, 0x00, - 0x91, 0x91, 0x48, 0xa4, 0x40, 0x00, - 0x68, 0x42, 0xa1, 0x50, 0xa0, 0x00, - 0x32, 0xa4, 0x52, 0x29, 0x00, 0x00, - 0x43, 0x13, 0x09, 0x84, 0xc0, 0x00, - 0xc4, 0x30, 0x98, 0x4c, 0x20, 0x00, - 0x1c, 0x88, 0xc4, 0x62, 0x20, 0x00, - 0x3c, 0x09, 0x04, 0x82, 0x40, 0x00, - 0x25, 0x2c, 0x26, 0x13, 0x00, 0x00, - 0x8a, 0x91, 0x33, 0x19, 0x80, 0x00, - 0x91, 0xc0, 0xc8, 0xa4, 0x40, 0x00, - 0x68, 0x06, 0xa1, 0x50, 0xa0, 0x00, - 0x32, 0xc8, 0x52, 0x29, 0x00, 0x00, - 0x43, 0x45, 0x09, 0x84, 0xc0, 0x00, - 0xc4, 0x30, 0x98, 0x4c, 0x20, 0x00, - 0x1c, 0xa2, 0x44, 0x62, 0x20, 0x00, - 0x25, 0x4c, 0x04, 0x82, 0x40, 0x00, - 0x8a, 0x66, 0x16, 0x0b, 0x00, 0x00, - 0x91, 0x91, 0x48, 0xa4, 0x40, 0x00, - 0x68, 0x42, 0xe0, 0x70, 0x20, 0x00, - 0x32, 0xa4, 0x03, 0x41, 0xa0, 0x00, - 0x43, 0x13, 0x64, 0x32, 0x00, 0x00, - 0xc4, 0x30, 0xa2, 0x91, 0x40, 0x00, - 0x1c, 0x88, 0x98, 0x4c, 0x20, 0x00, - 0x3c, 0x09, 0x51, 0x28, 0x80, 0x00, - 0xc2, 0x1c, 0x68, 0x01, 0xa0, 0x00 -}; - -const uint8_t kMaskRandom35_4[24] = { - 0xca, 0xec, 0x76, 0x3b, 0x00, 0x00, - 0xa9, 0x67, 0x33, 0x99, 0xc0, 0x00, - 0x3a, 0xb1, 0xd8, 0xec, 0x60, 0x00, - 0x55, 0x5a, 0xad, 0x56, 0xa0, 0x00 -}; - -const uint8_t kMaskRandom35_5[30] = { - 0x55, 0x44, 0xa6, 0x53, 0x20, 0x00, - 0x2a, 0x66, 0x33, 0x19, 0x80, 0x00, - 0x25, 0xa1, 0x8c, 0xe8, 0x60, 0x00, - 0xe2, 0x12, 0xce, 0x44, 0xa0, 0x00, - 0x99, 0x98, 0x71, 0xa6, 0x00, 0x00 -}; - -const uint8_t kMaskRandom35_6[36] = { - 0xd1, 0x4c, 0x66, 0x13, 0x00, 0x00, - 0xa2, 0xc5, 0x22, 0xb1, 0x40, 0x00, - 0x95, 0x30, 0xd8, 0x4c, 0x20, 0x00, - 0xca, 0x0a, 0xc5, 0x42, 0xa0, 0x00, - 0xa4, 0xaa, 0x14, 0xa9, 0x80, 0x00, - 0x78, 0x15, 0x53, 0x05, 0x40, 0x00 -}; - -const uint8_t kMaskRandom35_7[42] = { - 0x15, 0x44, 0xa2, 0x51, 0x20, 0x00, - 0x8a, 0x23, 0x11, 0x88, 0xc0, 0x00, - 0x85, 0x91, 0x48, 0xa4, 0x40, 0x00, - 0x32, 0x0a, 0x85, 0x42, 0xa0, 0x00, - 0x58, 0x34, 0x1a, 0x0d, 0x00, 0x00, - 0x2c, 0x0d, 0x05, 0x83, 0x40, 0x00, - 0x43, 0xc8, 0x70, 0x32, 0x00, 0x00 -}; - -const uint8_t kMaskRandom35_8[48] = { - 0x64, 0x16, 0x0b, 0x05, 0x80, 0x00, - 0xa2, 0xc2, 0x61, 0x30, 0x80, 0x00, - 0x51, 0x60, 0xb0, 0x58, 0x20, 0x00, - 0x4a, 0x85, 0x42, 0xa1, 0x40, 0x00, - 0x38, 0x4c, 0x26, 0x13, 0x00, 0x00, - 0x89, 0x29, 0x14, 0x8a, 0x40, 0x00, - 0x07, 0x11, 0x88, 0xc4, 0x60, 0x00, - 0x94, 0xb0, 0x58, 0x2c, 0x00, 0x00 -}; - -const uint8_t kMaskRandom35_9[54] = { - 0x8e, 0xcc, 0x22, 0x51, 0x20, 0x00, - 0x6a, 0x2b, 0x33, 0x13, 0x00, 0x00, - 0x36, 0x32, 0xc8, 0x24, 0xa0, 0x00, - 0xd1, 0x25, 0x80, 0xd2, 0xc0, 0x00, - 0x55, 0x8c, 0x87, 0x09, 0x40, 0x00, - 0xaa, 0x27, 0x09, 0x85, 0x80, 0x00, - 0xa5, 0x32, 0x90, 0x68, 0x20, 0x00, - 0x62, 0x61, 0xe1, 0x28, 0x80, 0x00, - 0x3c, 0x5c, 0x14, 0x86, 0x40, 0x00 -}; - -const uint8_t kMaskRandom36_1[6] = { - 0xff, 0xff, 0xff, 0xff, 0xf0, 0x00 -}; - -const uint8_t kMaskRandom36_10[60] = { - 0x8c, 0xc6, 0x63, 0x31, 0x90, 0x00, - 0x27, 0x13, 0x89, 0xc4, 0xe0, 0x00, - 0x32, 0x99, 0x4c, 0xa6, 0x50, 0x00, - 0x61, 0xb0, 0xd8, 0x6c, 0x30, 0x00, - 0x5c, 0x2e, 0x17, 0x0b, 0x80, 0x00, - 0xcc, 0x66, 0x33, 0x19, 0x80, 0x00, - 0x2b, 0x15, 0x8a, 0xc5, 0x60, 0x00, - 0x32, 0x99, 0x4c, 0xa6, 0x50, 0x00, - 0x25, 0x92, 0xc9, 0x64, 0xb0, 0x00, - 0xfd, 0x9d, 0xff, 0x67, 0x70, 0x00 -}; - -const uint8_t kMaskRandom36_11[66] = { - 0x8c, 0xc6, 0x63, 0x31, 0x90, 0x00, - 0x27, 0x13, 0x89, 0xc4, 0xe0, 0x00, - 0x32, 0x99, 0x4c, 0xa6, 0x50, 0x00, - 0x61, 0xb0, 0xd8, 0x6c, 0x30, 0x00, - 0x5c, 0x2e, 0x17, 0x0b, 0x80, 0x00, - 0x84, 0xc2, 0x61, 0x30, 0x90, 0x00, - 0x27, 0x13, 0x89, 0xc4, 0xe0, 0x00, - 0x51, 0xa8, 0xd4, 0x6a, 0x30, 0x00, - 0x1a, 0x0d, 0x06, 0x83, 0x40, 0x00, - 0x68, 0x34, 0x1a, 0x0d, 0x00, 0x00, - 0x89, 0x44, 0xa2, 0x51, 0x20, 0x00 -}; - -const uint8_t kMaskRandom36_12[72] = { - 0x84, 0xc2, 0x61, 0x30, 0x90, 0x00, - 0x27, 0x13, 0x89, 0xc4, 0xe0, 0x00, - 0x51, 0xa8, 0xd4, 0x6a, 0x30, 0x00, - 0x1a, 0x0d, 0x06, 0x83, 0x40, 0x00, - 0x68, 0x34, 0x1a, 0x0d, 0x00, 0x00, - 0x89, 0x44, 0xa2, 0x51, 0x20, 0x00, - 0x8c, 0xc6, 0x63, 0x31, 0x90, 0x00, - 0x27, 0x13, 0x89, 0xc4, 0xe0, 0x00, - 0x32, 0x99, 0x4c, 0xa6, 0x50, 0x00, - 0x61, 0xb0, 0xd8, 0x6c, 0x30, 0x00, - 0x5c, 0x2e, 0x17, 0x0b, 0x80, 0x00, - 0x5b, 0x0c, 0x56, 0xc3, 0x10, 0x00 -}; - -const uint8_t kMaskRandom36_13[78] = { - 0x84, 0xc2, 0x61, 0x30, 0x90, 0x00, - 0x27, 0x13, 0x89, 0xc4, 0xe0, 0x00, - 0x51, 0xa8, 0xd4, 0x6a, 0x30, 0x00, - 0x1a, 0x0d, 0x06, 0x83, 0x40, 0x00, - 0x68, 0x34, 0x1a, 0x0d, 0x00, 0x00, - 0x89, 0x44, 0xa2, 0x51, 0x20, 0x00, - 0x8c, 0x46, 0x23, 0x11, 0x80, 0x00, - 0x47, 0x23, 0x91, 0xc8, 0xe0, 0x00, - 0x81, 0xc0, 0xe0, 0x70, 0x30, 0x00, - 0x12, 0x89, 0x44, 0xa2, 0x50, 0x00, - 0x58, 0x2c, 0x16, 0x0b, 0x00, 0x00, - 0x28, 0x94, 0x4a, 0x25, 0x10, 0x00, - 0x34, 0x1a, 0x0d, 0x06, 0x80, 0x00 -}; - -const uint8_t kMaskRandom36_14[84] = { - 0x8c, 0x46, 0x23, 0x11, 0x80, 0x00, - 0x47, 0x23, 0x91, 0xc8, 0xe0, 0x00, - 0x81, 0xc0, 0xe0, 0x70, 0x30, 0x00, - 0x12, 0x89, 0x44, 0xa2, 0x50, 0x00, - 0x58, 0x2c, 0x16, 0x0b, 0x00, 0x00, - 0x28, 0x94, 0x4a, 0x25, 0x10, 0x00, - 0x34, 0x1a, 0x0d, 0x06, 0x80, 0x00, - 0x84, 0xc2, 0x61, 0x30, 0x90, 0x00, - 0x27, 0x13, 0x89, 0xc4, 0xe0, 0x00, - 0x51, 0xa8, 0xd4, 0x6a, 0x30, 0x00, - 0x1a, 0x0d, 0x06, 0x83, 0x40, 0x00, - 0x68, 0x34, 0x1a, 0x0d, 0x00, 0x00, - 0x89, 0x44, 0xa2, 0x51, 0x20, 0x00, - 0x7f, 0x4f, 0xdf, 0xd3, 0xf0, 0x00 -}; - -const uint8_t kMaskRandom36_15[90] = { - 0x8c, 0x46, 0x23, 0x11, 0x80, 0x00, - 0x47, 0x23, 0x91, 0xc8, 0xe0, 0x00, - 0x81, 0xc0, 0xe0, 0x70, 0x30, 0x00, - 0x12, 0x89, 0x44, 0xa2, 0x50, 0x00, - 0x58, 0x2c, 0x16, 0x0b, 0x00, 0x00, - 0x28, 0x94, 0x4a, 0x25, 0x10, 0x00, - 0x34, 0x1a, 0x0d, 0x06, 0x80, 0x00, - 0x2c, 0x16, 0x0b, 0x05, 0x80, 0x00, - 0x91, 0x48, 0xa4, 0x52, 0x20, 0x00, - 0xc0, 0xe0, 0x70, 0x38, 0x10, 0x00, - 0x06, 0x83, 0x41, 0xa0, 0xd0, 0x00, - 0xc8, 0x64, 0x32, 0x19, 0x00, 0x00, - 0x45, 0x22, 0x91, 0x48, 0xa0, 0x00, - 0x30, 0x98, 0x4c, 0x26, 0x10, 0x00, - 0xa2, 0x51, 0x28, 0x94, 0x40, 0x00 -}; - -const uint8_t kMaskRandom36_16[96] = { - 0x2c, 0x16, 0x0b, 0x05, 0x80, 0x00, - 0x91, 0x48, 0xa4, 0x52, 0x20, 0x00, - 0xc0, 0xe0, 0x70, 0x38, 0x10, 0x00, - 0x06, 0x83, 0x41, 0xa0, 0xd0, 0x00, - 0xc8, 0x64, 0x32, 0x19, 0x00, 0x00, - 0x45, 0x22, 0x91, 0x48, 0xa0, 0x00, - 0x30, 0x98, 0x4c, 0x26, 0x10, 0x00, - 0xa2, 0x51, 0x28, 0x94, 0x40, 0x00, - 0x8c, 0x46, 0x23, 0x11, 0x80, 0x00, - 0x47, 0x23, 0x91, 0xc8, 0xe0, 0x00, - 0x81, 0xc0, 0xe0, 0x70, 0x30, 0x00, - 0x12, 0x89, 0x44, 0xa2, 0x50, 0x00, - 0x58, 0x2c, 0x16, 0x0b, 0x00, 0x00, - 0x28, 0x94, 0x4a, 0x25, 0x10, 0x00, - 0x34, 0x1a, 0x0d, 0x06, 0x80, 0x00, - 0xef, 0xf2, 0x3b, 0xfc, 0x80, 0x00 -}; - -const uint8_t kMaskRandom36_17[102] = { - 0x2c, 0x16, 0x0b, 0x05, 0x80, 0x00, - 0x91, 0x48, 0xa4, 0x52, 0x20, 0x00, - 0xc0, 0xe0, 0x70, 0x38, 0x10, 0x00, - 0x06, 0x83, 0x41, 0xa0, 0xd0, 0x00, - 0xc8, 0x64, 0x32, 0x19, 0x00, 0x00, - 0x45, 0x22, 0x91, 0x48, 0xa0, 0x00, - 0x30, 0x98, 0x4c, 0x26, 0x10, 0x00, - 0xa2, 0x51, 0x28, 0x94, 0x40, 0x00, - 0x4c, 0x26, 0x13, 0x09, 0x80, 0x00, - 0x66, 0x33, 0x19, 0x8c, 0xc0, 0x00, - 0x91, 0x48, 0xa4, 0x52, 0x20, 0x00, - 0x42, 0xa1, 0x50, 0xa8, 0x50, 0x00, - 0xa4, 0x52, 0x29, 0x14, 0x80, 0x00, - 0x13, 0x09, 0x84, 0xc2, 0x60, 0x00, - 0x30, 0x98, 0x4c, 0x26, 0x10, 0x00, - 0x88, 0xc4, 0x62, 0x31, 0x10, 0x00, - 0x09, 0x04, 0x82, 0x41, 0x20, 0x00 -}; - -const uint8_t kMaskRandom36_18[108] = { - 0x4c, 0x26, 0x13, 0x09, 0x80, 0x00, - 0x66, 0x33, 0x19, 0x8c, 0xc0, 0x00, - 0x91, 0x48, 0xa4, 0x52, 0x20, 0x00, - 0x42, 0xa1, 0x50, 0xa8, 0x50, 0x00, - 0xa4, 0x52, 0x29, 0x14, 0x80, 0x00, - 0x13, 0x09, 0x84, 0xc2, 0x60, 0x00, - 0x30, 0x98, 0x4c, 0x26, 0x10, 0x00, - 0x88, 0xc4, 0x62, 0x31, 0x10, 0x00, - 0x09, 0x04, 0x82, 0x41, 0x20, 0x00, - 0x2c, 0x16, 0x0b, 0x05, 0x80, 0x00, - 0x91, 0x48, 0xa4, 0x52, 0x20, 0x00, - 0xc0, 0xe0, 0x70, 0x38, 0x10, 0x00, - 0x06, 0x83, 0x41, 0xa0, 0xd0, 0x00, - 0xc8, 0x64, 0x32, 0x19, 0x00, 0x00, - 0x45, 0x22, 0x91, 0x48, 0xa0, 0x00, - 0x30, 0x98, 0x4c, 0x26, 0x10, 0x00, - 0xa2, 0x51, 0x28, 0x94, 0x40, 0x00, - 0xd0, 0x03, 0x74, 0x00, 0xd0, 0x00 -}; - -const uint8_t kMaskRandom36_19[114] = { - 0x44, 0xa2, 0x51, 0x28, 0x90, 0x00, - 0x66, 0x26, 0x19, 0x89, 0x80, 0x00, - 0x90, 0x49, 0x64, 0x12, 0x50, 0x00, - 0x01, 0xa5, 0x80, 0x69, 0x60, 0x00, - 0x0e, 0x12, 0x83, 0x84, 0xa0, 0x00, - 0x13, 0x0b, 0x04, 0xc2, 0xc0, 0x00, - 0x20, 0xd0, 0x48, 0x34, 0x10, 0x00, - 0xc2, 0x51, 0x30, 0x94, 0x40, 0x00, - 0x29, 0x0c, 0x8a, 0x43, 0x20, 0x00, - 0x8c, 0xc6, 0x63, 0x31, 0x90, 0x00, - 0x27, 0x13, 0x89, 0xc4, 0xe0, 0x00, - 0x32, 0x99, 0x4c, 0xa6, 0x50, 0x00, - 0x61, 0xb0, 0xd8, 0x6c, 0x30, 0x00, - 0x5c, 0x2e, 0x17, 0x0b, 0x80, 0x00, - 0xcc, 0x66, 0x33, 0x19, 0x80, 0x00, - 0x2b, 0x15, 0x8a, 0xc5, 0x60, 0x00, - 0x32, 0x99, 0x4c, 0xa6, 0x50, 0x00, - 0x25, 0x92, 0xc9, 0x64, 0xb0, 0x00, - 0xfd, 0x9d, 0xff, 0x67, 0x70, 0x00 -}; - -const uint8_t kMaskRandom36_2[12] = { - 0xce, 0x67, 0x33, 0x99, 0xc0, 0x00, - 0x39, 0x9c, 0xce, 0x67, 0x30, 0x00 -}; - -const uint8_t kMaskRandom36_20[120] = { - 0x8c, 0xc6, 0x63, 0x31, 0x90, 0x00, - 0x27, 0x13, 0x89, 0xc4, 0xe0, 0x00, - 0x32, 0x99, 0x4c, 0xa6, 0x50, 0x00, - 0x61, 0xb0, 0xd8, 0x6c, 0x30, 0x00, - 0x5c, 0x2e, 0x17, 0x0b, 0x80, 0x00, - 0xcc, 0x66, 0x33, 0x19, 0x80, 0x00, - 0x2b, 0x15, 0x8a, 0xc5, 0x60, 0x00, - 0x32, 0x99, 0x4c, 0xa6, 0x50, 0x00, - 0x25, 0x92, 0xc9, 0x64, 0xb0, 0x00, - 0xfd, 0x9d, 0xff, 0x67, 0x70, 0x00, - 0x44, 0xa2, 0x51, 0x28, 0x90, 0x00, - 0x66, 0x26, 0x19, 0x89, 0x80, 0x00, - 0x90, 0x49, 0x64, 0x12, 0x50, 0x00, - 0x01, 0xa5, 0x80, 0x69, 0x60, 0x00, - 0x0e, 0x12, 0x83, 0x84, 0xa0, 0x00, - 0x13, 0x0b, 0x04, 0xc2, 0xc0, 0x00, - 0x20, 0xd0, 0x48, 0x34, 0x10, 0x00, - 0xc2, 0x51, 0x30, 0x94, 0x40, 0x00, - 0x29, 0x0c, 0x8a, 0x43, 0x20, 0x00, - 0x45, 0xb9, 0x08, 0x16, 0x30, 0x00 -}; - -const uint8_t kMaskRandom36_21[126] = { - 0x8c, 0xc6, 0x63, 0x31, 0x90, 0x00, - 0x27, 0x13, 0x89, 0xc4, 0xe0, 0x00, - 0x32, 0x99, 0x4c, 0xa6, 0x50, 0x00, - 0x61, 0xb0, 0xd8, 0x6c, 0x30, 0x00, - 0x5c, 0x2e, 0x17, 0x0b, 0x80, 0x00, - 0xcc, 0x66, 0x33, 0x19, 0x80, 0x00, - 0x2b, 0x15, 0x8a, 0xc5, 0x60, 0x00, - 0x32, 0x99, 0x4c, 0xa6, 0x50, 0x00, - 0x25, 0x92, 0xc9, 0x64, 0xb0, 0x00, - 0xfd, 0x9d, 0xff, 0x67, 0x70, 0x00, - 0x8c, 0xc6, 0x63, 0x31, 0x90, 0x00, - 0x27, 0x13, 0x89, 0xc4, 0xe0, 0x00, - 0x32, 0x99, 0x4c, 0xa6, 0x50, 0x00, - 0x61, 0xb0, 0xd8, 0x6c, 0x30, 0x00, - 0x5c, 0x2e, 0x17, 0x0b, 0x80, 0x00, - 0x84, 0xc2, 0x61, 0x30, 0x90, 0x00, - 0x27, 0x13, 0x89, 0xc4, 0xe0, 0x00, - 0x51, 0xa8, 0xd4, 0x6a, 0x30, 0x00, - 0x1a, 0x0d, 0x06, 0x83, 0x40, 0x00, - 0x68, 0x34, 0x1a, 0x0d, 0x00, 0x00, - 0x89, 0x44, 0xa2, 0x51, 0x20, 0x00 -}; - -const uint8_t kMaskRandom36_22[132] = { - 0x8c, 0xc6, 0x63, 0x31, 0x90, 0x00, - 0x27, 0x13, 0x89, 0xc4, 0xe0, 0x00, - 0x32, 0x99, 0x4c, 0xa6, 0x50, 0x00, - 0x61, 0xb0, 0xd8, 0x6c, 0x30, 0x00, - 0x5c, 0x2e, 0x17, 0x0b, 0x80, 0x00, - 0x84, 0xc2, 0x61, 0x30, 0x90, 0x00, - 0x27, 0x13, 0x89, 0xc4, 0xe0, 0x00, - 0x51, 0xa8, 0xd4, 0x6a, 0x30, 0x00, - 0x1a, 0x0d, 0x06, 0x83, 0x40, 0x00, - 0x68, 0x34, 0x1a, 0x0d, 0x00, 0x00, - 0x89, 0x44, 0xa2, 0x51, 0x20, 0x00, - 0x8c, 0xc6, 0x63, 0x31, 0x90, 0x00, - 0x27, 0x13, 0x89, 0xc4, 0xe0, 0x00, - 0x32, 0x99, 0x4c, 0xa6, 0x50, 0x00, - 0x61, 0xb0, 0xd8, 0x6c, 0x30, 0x00, - 0x5c, 0x2e, 0x17, 0x0b, 0x80, 0x00, - 0xcc, 0x66, 0x33, 0x19, 0x80, 0x00, - 0x2b, 0x15, 0x8a, 0xc5, 0x60, 0x00, - 0x32, 0x99, 0x4c, 0xa6, 0x50, 0x00, - 0x25, 0x92, 0xc9, 0x64, 0xb0, 0x00, - 0xfd, 0x9d, 0xff, 0x67, 0x70, 0x00, - 0x71, 0x04, 0xba, 0x7b, 0xe0, 0x00 -}; - -const uint8_t kMaskRandom36_23[138] = { - 0x8c, 0xc6, 0x63, 0x31, 0x90, 0x00, - 0x27, 0x13, 0x89, 0xc4, 0xe0, 0x00, - 0x32, 0x99, 0x4c, 0xa6, 0x50, 0x00, - 0x61, 0xb0, 0xd8, 0x6c, 0x30, 0x00, - 0x5c, 0x2e, 0x17, 0x0b, 0x80, 0x00, - 0x84, 0xc2, 0x61, 0x30, 0x90, 0x00, - 0x27, 0x13, 0x89, 0xc4, 0xe0, 0x00, - 0x51, 0xa8, 0xd4, 0x6a, 0x30, 0x00, - 0x1a, 0x0d, 0x06, 0x83, 0x40, 0x00, - 0x68, 0x34, 0x1a, 0x0d, 0x00, 0x00, - 0x89, 0x44, 0xa2, 0x51, 0x20, 0x00, - 0x84, 0xc2, 0x61, 0x30, 0x90, 0x00, - 0x27, 0x13, 0x89, 0xc4, 0xe0, 0x00, - 0x51, 0xa8, 0xd4, 0x6a, 0x30, 0x00, - 0x1a, 0x0d, 0x06, 0x83, 0x40, 0x00, - 0x68, 0x34, 0x1a, 0x0d, 0x00, 0x00, - 0x89, 0x44, 0xa2, 0x51, 0x20, 0x00, - 0x8c, 0xc6, 0x63, 0x31, 0x90, 0x00, - 0x27, 0x13, 0x89, 0xc4, 0xe0, 0x00, - 0x32, 0x99, 0x4c, 0xa6, 0x50, 0x00, - 0x61, 0xb0, 0xd8, 0x6c, 0x30, 0x00, - 0x5c, 0x2e, 0x17, 0x0b, 0x80, 0x00, - 0x5b, 0x0c, 0x56, 0xc3, 0x10, 0x00 -}; - -const uint8_t kMaskRandom36_24[144] = { - 0x84, 0xc2, 0x61, 0x30, 0x90, 0x00, - 0x27, 0x13, 0x89, 0xc4, 0xe0, 0x00, - 0x51, 0xa8, 0xd4, 0x6a, 0x30, 0x00, - 0x1a, 0x0d, 0x06, 0x83, 0x40, 0x00, - 0x68, 0x34, 0x1a, 0x0d, 0x00, 0x00, - 0x89, 0x44, 0xa2, 0x51, 0x20, 0x00, - 0x8c, 0xc6, 0x63, 0x31, 0x90, 0x00, - 0x27, 0x13, 0x89, 0xc4, 0xe0, 0x00, - 0x32, 0x99, 0x4c, 0xa6, 0x50, 0x00, - 0x61, 0xb0, 0xd8, 0x6c, 0x30, 0x00, - 0x5c, 0x2e, 0x17, 0x0b, 0x80, 0x00, - 0x5b, 0x0c, 0x56, 0xc3, 0x10, 0x00, - 0x8c, 0xc6, 0x63, 0x31, 0x90, 0x00, - 0x27, 0x13, 0x89, 0xc4, 0xe0, 0x00, - 0x32, 0x99, 0x4c, 0xa6, 0x50, 0x00, - 0x61, 0xb0, 0xd8, 0x6c, 0x30, 0x00, - 0x5c, 0x2e, 0x17, 0x0b, 0x80, 0x00, - 0x84, 0xc2, 0x61, 0x30, 0x90, 0x00, - 0x27, 0x13, 0x89, 0xc4, 0xe0, 0x00, - 0x51, 0xa8, 0xd4, 0x6a, 0x30, 0x00, - 0x1a, 0x0d, 0x06, 0x83, 0x40, 0x00, - 0x68, 0x34, 0x1a, 0x0d, 0x00, 0x00, - 0x89, 0x44, 0xa2, 0x51, 0x20, 0x00, - 0x76, 0x3a, 0xeb, 0x17, 0xc0, 0x00 -}; - -const uint8_t kMaskRandom36_25[150] = { - 0x84, 0xc2, 0x61, 0x30, 0x90, 0x00, - 0x27, 0x13, 0x89, 0xc4, 0xe0, 0x00, - 0x51, 0xa8, 0xd4, 0x6a, 0x30, 0x00, - 0x1a, 0x0d, 0x06, 0x83, 0x40, 0x00, - 0x68, 0x34, 0x1a, 0x0d, 0x00, 0x00, - 0x89, 0x44, 0xa2, 0x51, 0x20, 0x00, - 0x8c, 0xc6, 0x63, 0x31, 0x90, 0x00, - 0x27, 0x13, 0x89, 0xc4, 0xe0, 0x00, - 0x32, 0x99, 0x4c, 0xa6, 0x50, 0x00, - 0x61, 0xb0, 0xd8, 0x6c, 0x30, 0x00, - 0x5c, 0x2e, 0x17, 0x0b, 0x80, 0x00, - 0x5b, 0x0c, 0x56, 0xc3, 0x10, 0x00, - 0x84, 0xc2, 0x61, 0x30, 0x90, 0x00, - 0x27, 0x13, 0x89, 0xc4, 0xe0, 0x00, - 0x51, 0xa8, 0xd4, 0x6a, 0x30, 0x00, - 0x1a, 0x0d, 0x06, 0x83, 0x40, 0x00, - 0x68, 0x34, 0x1a, 0x0d, 0x00, 0x00, - 0x89, 0x44, 0xa2, 0x51, 0x20, 0x00, - 0x8c, 0x46, 0x23, 0x11, 0x80, 0x00, - 0x47, 0x23, 0x91, 0xc8, 0xe0, 0x00, - 0x81, 0xc0, 0xe0, 0x70, 0x30, 0x00, - 0x12, 0x89, 0x44, 0xa2, 0x50, 0x00, - 0x58, 0x2c, 0x16, 0x0b, 0x00, 0x00, - 0x28, 0x94, 0x4a, 0x25, 0x10, 0x00, - 0x34, 0x1a, 0x0d, 0x06, 0x80, 0x00 -}; - -const uint8_t kMaskRandom36_26[156] = { - 0x84, 0xc2, 0x61, 0x30, 0x90, 0x00, - 0x27, 0x13, 0x89, 0xc4, 0xe0, 0x00, - 0x51, 0xa8, 0xd4, 0x6a, 0x30, 0x00, - 0x1a, 0x0d, 0x06, 0x83, 0x40, 0x00, - 0x68, 0x34, 0x1a, 0x0d, 0x00, 0x00, - 0x89, 0x44, 0xa2, 0x51, 0x20, 0x00, - 0x8c, 0x46, 0x23, 0x11, 0x80, 0x00, - 0x47, 0x23, 0x91, 0xc8, 0xe0, 0x00, - 0x81, 0xc0, 0xe0, 0x70, 0x30, 0x00, - 0x12, 0x89, 0x44, 0xa2, 0x50, 0x00, - 0x58, 0x2c, 0x16, 0x0b, 0x00, 0x00, - 0x28, 0x94, 0x4a, 0x25, 0x10, 0x00, - 0x34, 0x1a, 0x0d, 0x06, 0x80, 0x00, - 0x84, 0xc2, 0x61, 0x30, 0x90, 0x00, - 0x27, 0x13, 0x89, 0xc4, 0xe0, 0x00, - 0x51, 0xa8, 0xd4, 0x6a, 0x30, 0x00, - 0x1a, 0x0d, 0x06, 0x83, 0x40, 0x00, - 0x68, 0x34, 0x1a, 0x0d, 0x00, 0x00, - 0x89, 0x44, 0xa2, 0x51, 0x20, 0x00, - 0x8c, 0xc6, 0x63, 0x31, 0x90, 0x00, - 0x27, 0x13, 0x89, 0xc4, 0xe0, 0x00, - 0x32, 0x99, 0x4c, 0xa6, 0x50, 0x00, - 0x61, 0xb0, 0xd8, 0x6c, 0x30, 0x00, - 0x5c, 0x2e, 0x17, 0x0b, 0x80, 0x00, - 0x5b, 0x0c, 0x56, 0xc3, 0x10, 0x00, - 0xec, 0x58, 0x0e, 0x6c, 0xe0, 0x00 -}; - -const uint8_t kMaskRandom36_27[162] = { - 0x84, 0xc2, 0x61, 0x30, 0x90, 0x00, - 0x27, 0x13, 0x89, 0xc4, 0xe0, 0x00, - 0x51, 0xa8, 0xd4, 0x6a, 0x30, 0x00, - 0x1a, 0x0d, 0x06, 0x83, 0x40, 0x00, - 0x68, 0x34, 0x1a, 0x0d, 0x00, 0x00, - 0x89, 0x44, 0xa2, 0x51, 0x20, 0x00, - 0x8c, 0x46, 0x23, 0x11, 0x80, 0x00, - 0x47, 0x23, 0x91, 0xc8, 0xe0, 0x00, - 0x81, 0xc0, 0xe0, 0x70, 0x30, 0x00, - 0x12, 0x89, 0x44, 0xa2, 0x50, 0x00, - 0x58, 0x2c, 0x16, 0x0b, 0x00, 0x00, - 0x28, 0x94, 0x4a, 0x25, 0x10, 0x00, - 0x34, 0x1a, 0x0d, 0x06, 0x80, 0x00, - 0x8c, 0x46, 0x23, 0x11, 0x80, 0x00, - 0x47, 0x23, 0x91, 0xc8, 0xe0, 0x00, - 0x81, 0xc0, 0xe0, 0x70, 0x30, 0x00, - 0x12, 0x89, 0x44, 0xa2, 0x50, 0x00, - 0x58, 0x2c, 0x16, 0x0b, 0x00, 0x00, - 0x28, 0x94, 0x4a, 0x25, 0x10, 0x00, - 0x34, 0x1a, 0x0d, 0x06, 0x80, 0x00, - 0x84, 0xc2, 0x61, 0x30, 0x90, 0x00, - 0x27, 0x13, 0x89, 0xc4, 0xe0, 0x00, - 0x51, 0xa8, 0xd4, 0x6a, 0x30, 0x00, - 0x1a, 0x0d, 0x06, 0x83, 0x40, 0x00, - 0x68, 0x34, 0x1a, 0x0d, 0x00, 0x00, - 0x89, 0x44, 0xa2, 0x51, 0x20, 0x00, - 0x7f, 0x4f, 0xdf, 0xd3, 0xf0, 0x00 -}; - -const uint8_t kMaskRandom36_28[168] = { - 0x8c, 0x46, 0x23, 0x11, 0x80, 0x00, - 0x47, 0x23, 0x91, 0xc8, 0xe0, 0x00, - 0x81, 0xc0, 0xe0, 0x70, 0x30, 0x00, - 0x12, 0x89, 0x44, 0xa2, 0x50, 0x00, - 0x58, 0x2c, 0x16, 0x0b, 0x00, 0x00, - 0x28, 0x94, 0x4a, 0x25, 0x10, 0x00, - 0x34, 0x1a, 0x0d, 0x06, 0x80, 0x00, - 0x84, 0xc2, 0x61, 0x30, 0x90, 0x00, - 0x27, 0x13, 0x89, 0xc4, 0xe0, 0x00, - 0x51, 0xa8, 0xd4, 0x6a, 0x30, 0x00, - 0x1a, 0x0d, 0x06, 0x83, 0x40, 0x00, - 0x68, 0x34, 0x1a, 0x0d, 0x00, 0x00, - 0x89, 0x44, 0xa2, 0x51, 0x20, 0x00, - 0x7f, 0x4f, 0xdf, 0xd3, 0xf0, 0x00, - 0x84, 0xc2, 0x61, 0x30, 0x90, 0x00, - 0x27, 0x13, 0x89, 0xc4, 0xe0, 0x00, - 0x51, 0xa8, 0xd4, 0x6a, 0x30, 0x00, - 0x1a, 0x0d, 0x06, 0x83, 0x40, 0x00, - 0x68, 0x34, 0x1a, 0x0d, 0x00, 0x00, - 0x89, 0x44, 0xa2, 0x51, 0x20, 0x00, - 0x8c, 0x46, 0x23, 0x11, 0x80, 0x00, - 0x47, 0x23, 0x91, 0xc8, 0xe0, 0x00, - 0x81, 0xc0, 0xe0, 0x70, 0x30, 0x00, - 0x12, 0x89, 0x44, 0xa2, 0x50, 0x00, - 0x58, 0x2c, 0x16, 0x0b, 0x00, 0x00, - 0x28, 0x94, 0x4a, 0x25, 0x10, 0x00, - 0x34, 0x1a, 0x0d, 0x06, 0x80, 0x00, - 0x29, 0xfd, 0x91, 0x6f, 0xd0, 0x00 -}; - -const uint8_t kMaskRandom36_29[174] = { - 0x8c, 0x46, 0x23, 0x11, 0x80, 0x00, - 0x47, 0x23, 0x91, 0xc8, 0xe0, 0x00, - 0x81, 0xc0, 0xe0, 0x70, 0x30, 0x00, - 0x12, 0x89, 0x44, 0xa2, 0x50, 0x00, - 0x58, 0x2c, 0x16, 0x0b, 0x00, 0x00, - 0x28, 0x94, 0x4a, 0x25, 0x10, 0x00, - 0x34, 0x1a, 0x0d, 0x06, 0x80, 0x00, - 0x84, 0xc2, 0x61, 0x30, 0x90, 0x00, - 0x27, 0x13, 0x89, 0xc4, 0xe0, 0x00, - 0x51, 0xa8, 0xd4, 0x6a, 0x30, 0x00, - 0x1a, 0x0d, 0x06, 0x83, 0x40, 0x00, - 0x68, 0x34, 0x1a, 0x0d, 0x00, 0x00, - 0x89, 0x44, 0xa2, 0x51, 0x20, 0x00, - 0x7f, 0x4f, 0xdf, 0xd3, 0xf0, 0x00, - 0x8c, 0x46, 0x23, 0x11, 0x80, 0x00, - 0x47, 0x23, 0x91, 0xc8, 0xe0, 0x00, - 0x81, 0xc0, 0xe0, 0x70, 0x30, 0x00, - 0x12, 0x89, 0x44, 0xa2, 0x50, 0x00, - 0x58, 0x2c, 0x16, 0x0b, 0x00, 0x00, - 0x28, 0x94, 0x4a, 0x25, 0x10, 0x00, - 0x34, 0x1a, 0x0d, 0x06, 0x80, 0x00, - 0x2c, 0x16, 0x0b, 0x05, 0x80, 0x00, - 0x91, 0x48, 0xa4, 0x52, 0x20, 0x00, - 0xc0, 0xe0, 0x70, 0x38, 0x10, 0x00, - 0x06, 0x83, 0x41, 0xa0, 0xd0, 0x00, - 0xc8, 0x64, 0x32, 0x19, 0x00, 0x00, - 0x45, 0x22, 0x91, 0x48, 0xa0, 0x00, - 0x30, 0x98, 0x4c, 0x26, 0x10, 0x00, - 0xa2, 0x51, 0x28, 0x94, 0x40, 0x00 -}; - -const uint8_t kMaskRandom36_3[18] = { - 0xcc, 0x66, 0x33, 0x19, 0x80, 0x00, - 0x27, 0x15, 0x89, 0xc5, 0x60, 0x00, - 0x92, 0xc9, 0x64, 0xb2, 0x50, 0x00 -}; - -const uint8_t kMaskRandom36_30[180] = { - 0x8c, 0x46, 0x23, 0x11, 0x80, 0x00, - 0x47, 0x23, 0x91, 0xc8, 0xe0, 0x00, - 0x81, 0xc0, 0xe0, 0x70, 0x30, 0x00, - 0x12, 0x89, 0x44, 0xa2, 0x50, 0x00, - 0x58, 0x2c, 0x16, 0x0b, 0x00, 0x00, - 0x28, 0x94, 0x4a, 0x25, 0x10, 0x00, - 0x34, 0x1a, 0x0d, 0x06, 0x80, 0x00, - 0x2c, 0x16, 0x0b, 0x05, 0x80, 0x00, - 0x91, 0x48, 0xa4, 0x52, 0x20, 0x00, - 0xc0, 0xe0, 0x70, 0x38, 0x10, 0x00, - 0x06, 0x83, 0x41, 0xa0, 0xd0, 0x00, - 0xc8, 0x64, 0x32, 0x19, 0x00, 0x00, - 0x45, 0x22, 0x91, 0x48, 0xa0, 0x00, - 0x30, 0x98, 0x4c, 0x26, 0x10, 0x00, - 0xa2, 0x51, 0x28, 0x94, 0x40, 0x00, - 0x8c, 0x46, 0x23, 0x11, 0x80, 0x00, - 0x47, 0x23, 0x91, 0xc8, 0xe0, 0x00, - 0x81, 0xc0, 0xe0, 0x70, 0x30, 0x00, - 0x12, 0x89, 0x44, 0xa2, 0x50, 0x00, - 0x58, 0x2c, 0x16, 0x0b, 0x00, 0x00, - 0x28, 0x94, 0x4a, 0x25, 0x10, 0x00, - 0x34, 0x1a, 0x0d, 0x06, 0x80, 0x00, - 0x84, 0xc2, 0x61, 0x30, 0x90, 0x00, - 0x27, 0x13, 0x89, 0xc4, 0xe0, 0x00, - 0x51, 0xa8, 0xd4, 0x6a, 0x30, 0x00, - 0x1a, 0x0d, 0x06, 0x83, 0x40, 0x00, - 0x68, 0x34, 0x1a, 0x0d, 0x00, 0x00, - 0x89, 0x44, 0xa2, 0x51, 0x20, 0x00, - 0x7f, 0x4f, 0xdf, 0xd3, 0xf0, 0x00, - 0xc5, 0x38, 0xbb, 0x98, 0x80, 0x00 -}; - -const uint8_t kMaskRandom36_31[186] = { - 0x8c, 0x46, 0x23, 0x11, 0x80, 0x00, - 0x47, 0x23, 0x91, 0xc8, 0xe0, 0x00, - 0x81, 0xc0, 0xe0, 0x70, 0x30, 0x00, - 0x12, 0x89, 0x44, 0xa2, 0x50, 0x00, - 0x58, 0x2c, 0x16, 0x0b, 0x00, 0x00, - 0x28, 0x94, 0x4a, 0x25, 0x10, 0x00, - 0x34, 0x1a, 0x0d, 0x06, 0x80, 0x00, - 0x2c, 0x16, 0x0b, 0x05, 0x80, 0x00, - 0x91, 0x48, 0xa4, 0x52, 0x20, 0x00, - 0xc0, 0xe0, 0x70, 0x38, 0x10, 0x00, - 0x06, 0x83, 0x41, 0xa0, 0xd0, 0x00, - 0xc8, 0x64, 0x32, 0x19, 0x00, 0x00, - 0x45, 0x22, 0x91, 0x48, 0xa0, 0x00, - 0x30, 0x98, 0x4c, 0x26, 0x10, 0x00, - 0xa2, 0x51, 0x28, 0x94, 0x40, 0x00, - 0x2c, 0x16, 0x0b, 0x05, 0x80, 0x00, - 0x91, 0x48, 0xa4, 0x52, 0x20, 0x00, - 0xc0, 0xe0, 0x70, 0x38, 0x10, 0x00, - 0x06, 0x83, 0x41, 0xa0, 0xd0, 0x00, - 0xc8, 0x64, 0x32, 0x19, 0x00, 0x00, - 0x45, 0x22, 0x91, 0x48, 0xa0, 0x00, - 0x30, 0x98, 0x4c, 0x26, 0x10, 0x00, - 0xa2, 0x51, 0x28, 0x94, 0x40, 0x00, - 0x8c, 0x46, 0x23, 0x11, 0x80, 0x00, - 0x47, 0x23, 0x91, 0xc8, 0xe0, 0x00, - 0x81, 0xc0, 0xe0, 0x70, 0x30, 0x00, - 0x12, 0x89, 0x44, 0xa2, 0x50, 0x00, - 0x58, 0x2c, 0x16, 0x0b, 0x00, 0x00, - 0x28, 0x94, 0x4a, 0x25, 0x10, 0x00, - 0x34, 0x1a, 0x0d, 0x06, 0x80, 0x00, - 0xef, 0xf2, 0x3b, 0xfc, 0x80, 0x00 -}; - -const uint8_t kMaskRandom36_32[192] = { - 0x2c, 0x16, 0x0b, 0x05, 0x80, 0x00, - 0x91, 0x48, 0xa4, 0x52, 0x20, 0x00, - 0xc0, 0xe0, 0x70, 0x38, 0x10, 0x00, - 0x06, 0x83, 0x41, 0xa0, 0xd0, 0x00, - 0xc8, 0x64, 0x32, 0x19, 0x00, 0x00, - 0x45, 0x22, 0x91, 0x48, 0xa0, 0x00, - 0x30, 0x98, 0x4c, 0x26, 0x10, 0x00, - 0xa2, 0x51, 0x28, 0x94, 0x40, 0x00, - 0x8c, 0x46, 0x23, 0x11, 0x80, 0x00, - 0x47, 0x23, 0x91, 0xc8, 0xe0, 0x00, - 0x81, 0xc0, 0xe0, 0x70, 0x30, 0x00, - 0x12, 0x89, 0x44, 0xa2, 0x50, 0x00, - 0x58, 0x2c, 0x16, 0x0b, 0x00, 0x00, - 0x28, 0x94, 0x4a, 0x25, 0x10, 0x00, - 0x34, 0x1a, 0x0d, 0x06, 0x80, 0x00, - 0xef, 0xf2, 0x3b, 0xfc, 0x80, 0x00, - 0x8c, 0x46, 0x23, 0x11, 0x80, 0x00, - 0x47, 0x23, 0x91, 0xc8, 0xe0, 0x00, - 0x81, 0xc0, 0xe0, 0x70, 0x30, 0x00, - 0x12, 0x89, 0x44, 0xa2, 0x50, 0x00, - 0x58, 0x2c, 0x16, 0x0b, 0x00, 0x00, - 0x28, 0x94, 0x4a, 0x25, 0x10, 0x00, - 0x34, 0x1a, 0x0d, 0x06, 0x80, 0x00, - 0x2c, 0x16, 0x0b, 0x05, 0x80, 0x00, - 0x91, 0x48, 0xa4, 0x52, 0x20, 0x00, - 0xc0, 0xe0, 0x70, 0x38, 0x10, 0x00, - 0x06, 0x83, 0x41, 0xa0, 0xd0, 0x00, - 0xc8, 0x64, 0x32, 0x19, 0x00, 0x00, - 0x45, 0x22, 0x91, 0x48, 0xa0, 0x00, - 0x30, 0x98, 0x4c, 0x26, 0x10, 0x00, - 0xa2, 0x51, 0x28, 0x94, 0x40, 0x00, - 0x3a, 0x28, 0x9c, 0x2f, 0xc0, 0x00 -}; - -const uint8_t kMaskRandom36_33[198] = { - 0x2c, 0x16, 0x0b, 0x05, 0x80, 0x00, - 0x91, 0x48, 0xa4, 0x52, 0x20, 0x00, - 0xc0, 0xe0, 0x70, 0x38, 0x10, 0x00, - 0x06, 0x83, 0x41, 0xa0, 0xd0, 0x00, - 0xc8, 0x64, 0x32, 0x19, 0x00, 0x00, - 0x45, 0x22, 0x91, 0x48, 0xa0, 0x00, - 0x30, 0x98, 0x4c, 0x26, 0x10, 0x00, - 0xa2, 0x51, 0x28, 0x94, 0x40, 0x00, - 0x8c, 0x46, 0x23, 0x11, 0x80, 0x00, - 0x47, 0x23, 0x91, 0xc8, 0xe0, 0x00, - 0x81, 0xc0, 0xe0, 0x70, 0x30, 0x00, - 0x12, 0x89, 0x44, 0xa2, 0x50, 0x00, - 0x58, 0x2c, 0x16, 0x0b, 0x00, 0x00, - 0x28, 0x94, 0x4a, 0x25, 0x10, 0x00, - 0x34, 0x1a, 0x0d, 0x06, 0x80, 0x00, - 0xef, 0xf2, 0x3b, 0xfc, 0x80, 0x00, - 0x2c, 0x16, 0x0b, 0x05, 0x80, 0x00, - 0x91, 0x48, 0xa4, 0x52, 0x20, 0x00, - 0xc0, 0xe0, 0x70, 0x38, 0x10, 0x00, - 0x06, 0x83, 0x41, 0xa0, 0xd0, 0x00, - 0xc8, 0x64, 0x32, 0x19, 0x00, 0x00, - 0x45, 0x22, 0x91, 0x48, 0xa0, 0x00, - 0x30, 0x98, 0x4c, 0x26, 0x10, 0x00, - 0xa2, 0x51, 0x28, 0x94, 0x40, 0x00, - 0x4c, 0x26, 0x13, 0x09, 0x80, 0x00, - 0x66, 0x33, 0x19, 0x8c, 0xc0, 0x00, - 0x91, 0x48, 0xa4, 0x52, 0x20, 0x00, - 0x42, 0xa1, 0x50, 0xa8, 0x50, 0x00, - 0xa4, 0x52, 0x29, 0x14, 0x80, 0x00, - 0x13, 0x09, 0x84, 0xc2, 0x60, 0x00, - 0x30, 0x98, 0x4c, 0x26, 0x10, 0x00, - 0x88, 0xc4, 0x62, 0x31, 0x10, 0x00, - 0x09, 0x04, 0x82, 0x41, 0x20, 0x00 -}; - -const uint8_t kMaskRandom36_34[204] = { - 0x2c, 0x16, 0x0b, 0x05, 0x80, 0x00, - 0x91, 0x48, 0xa4, 0x52, 0x20, 0x00, - 0xc0, 0xe0, 0x70, 0x38, 0x10, 0x00, - 0x06, 0x83, 0x41, 0xa0, 0xd0, 0x00, - 0xc8, 0x64, 0x32, 0x19, 0x00, 0x00, - 0x45, 0x22, 0x91, 0x48, 0xa0, 0x00, - 0x30, 0x98, 0x4c, 0x26, 0x10, 0x00, - 0xa2, 0x51, 0x28, 0x94, 0x40, 0x00, - 0x4c, 0x26, 0x13, 0x09, 0x80, 0x00, - 0x66, 0x33, 0x19, 0x8c, 0xc0, 0x00, - 0x91, 0x48, 0xa4, 0x52, 0x20, 0x00, - 0x42, 0xa1, 0x50, 0xa8, 0x50, 0x00, - 0xa4, 0x52, 0x29, 0x14, 0x80, 0x00, - 0x13, 0x09, 0x84, 0xc2, 0x60, 0x00, - 0x30, 0x98, 0x4c, 0x26, 0x10, 0x00, - 0x88, 0xc4, 0x62, 0x31, 0x10, 0x00, - 0x09, 0x04, 0x82, 0x41, 0x20, 0x00, - 0x2c, 0x16, 0x0b, 0x05, 0x80, 0x00, - 0x91, 0x48, 0xa4, 0x52, 0x20, 0x00, - 0xc0, 0xe0, 0x70, 0x38, 0x10, 0x00, - 0x06, 0x83, 0x41, 0xa0, 0xd0, 0x00, - 0xc8, 0x64, 0x32, 0x19, 0x00, 0x00, - 0x45, 0x22, 0x91, 0x48, 0xa0, 0x00, - 0x30, 0x98, 0x4c, 0x26, 0x10, 0x00, - 0xa2, 0x51, 0x28, 0x94, 0x40, 0x00, - 0x8c, 0x46, 0x23, 0x11, 0x80, 0x00, - 0x47, 0x23, 0x91, 0xc8, 0xe0, 0x00, - 0x81, 0xc0, 0xe0, 0x70, 0x30, 0x00, - 0x12, 0x89, 0x44, 0xa2, 0x50, 0x00, - 0x58, 0x2c, 0x16, 0x0b, 0x00, 0x00, - 0x28, 0x94, 0x4a, 0x25, 0x10, 0x00, - 0x34, 0x1a, 0x0d, 0x06, 0x80, 0x00, - 0xef, 0xf2, 0x3b, 0xfc, 0x80, 0x00, - 0xf7, 0x5e, 0x66, 0x5b, 0x60, 0x00 -}; - -const uint8_t kMaskRandom36_35[210] = { - 0x2c, 0x16, 0x0b, 0x05, 0x80, 0x00, - 0x91, 0x48, 0xa4, 0x52, 0x20, 0x00, - 0xc0, 0xe0, 0x70, 0x38, 0x10, 0x00, - 0x06, 0x83, 0x41, 0xa0, 0xd0, 0x00, - 0xc8, 0x64, 0x32, 0x19, 0x00, 0x00, - 0x45, 0x22, 0x91, 0x48, 0xa0, 0x00, - 0x30, 0x98, 0x4c, 0x26, 0x10, 0x00, - 0xa2, 0x51, 0x28, 0x94, 0x40, 0x00, - 0x4c, 0x26, 0x13, 0x09, 0x80, 0x00, - 0x66, 0x33, 0x19, 0x8c, 0xc0, 0x00, - 0x91, 0x48, 0xa4, 0x52, 0x20, 0x00, - 0x42, 0xa1, 0x50, 0xa8, 0x50, 0x00, - 0xa4, 0x52, 0x29, 0x14, 0x80, 0x00, - 0x13, 0x09, 0x84, 0xc2, 0x60, 0x00, - 0x30, 0x98, 0x4c, 0x26, 0x10, 0x00, - 0x88, 0xc4, 0x62, 0x31, 0x10, 0x00, - 0x09, 0x04, 0x82, 0x41, 0x20, 0x00, - 0x4c, 0x26, 0x13, 0x09, 0x80, 0x00, - 0x66, 0x33, 0x19, 0x8c, 0xc0, 0x00, - 0x91, 0x48, 0xa4, 0x52, 0x20, 0x00, - 0x42, 0xa1, 0x50, 0xa8, 0x50, 0x00, - 0xa4, 0x52, 0x29, 0x14, 0x80, 0x00, - 0x13, 0x09, 0x84, 0xc2, 0x60, 0x00, - 0x30, 0x98, 0x4c, 0x26, 0x10, 0x00, - 0x88, 0xc4, 0x62, 0x31, 0x10, 0x00, - 0x09, 0x04, 0x82, 0x41, 0x20, 0x00, - 0x2c, 0x16, 0x0b, 0x05, 0x80, 0x00, - 0x91, 0x48, 0xa4, 0x52, 0x20, 0x00, - 0xc0, 0xe0, 0x70, 0x38, 0x10, 0x00, - 0x06, 0x83, 0x41, 0xa0, 0xd0, 0x00, - 0xc8, 0x64, 0x32, 0x19, 0x00, 0x00, - 0x45, 0x22, 0x91, 0x48, 0xa0, 0x00, - 0x30, 0x98, 0x4c, 0x26, 0x10, 0x00, - 0xa2, 0x51, 0x28, 0x94, 0x40, 0x00, - 0xd0, 0x03, 0x74, 0x00, 0xd0, 0x00 -}; - -const uint8_t kMaskRandom36_36[216] = { - 0x4c, 0x26, 0x13, 0x09, 0x80, 0x00, - 0x66, 0x33, 0x19, 0x8c, 0xc0, 0x00, - 0x91, 0x48, 0xa4, 0x52, 0x20, 0x00, - 0x42, 0xa1, 0x50, 0xa8, 0x50, 0x00, - 0xa4, 0x52, 0x29, 0x14, 0x80, 0x00, - 0x13, 0x09, 0x84, 0xc2, 0x60, 0x00, - 0x30, 0x98, 0x4c, 0x26, 0x10, 0x00, - 0x88, 0xc4, 0x62, 0x31, 0x10, 0x00, - 0x09, 0x04, 0x82, 0x41, 0x20, 0x00, - 0x2c, 0x16, 0x0b, 0x05, 0x80, 0x00, - 0x91, 0x48, 0xa4, 0x52, 0x20, 0x00, - 0xc0, 0xe0, 0x70, 0x38, 0x10, 0x00, - 0x06, 0x83, 0x41, 0xa0, 0xd0, 0x00, - 0xc8, 0x64, 0x32, 0x19, 0x00, 0x00, - 0x45, 0x22, 0x91, 0x48, 0xa0, 0x00, - 0x30, 0x98, 0x4c, 0x26, 0x10, 0x00, - 0xa2, 0x51, 0x28, 0x94, 0x40, 0x00, - 0xd0, 0x03, 0x74, 0x00, 0xd0, 0x00, - 0x2c, 0x16, 0x0b, 0x05, 0x80, 0x00, - 0x91, 0x48, 0xa4, 0x52, 0x20, 0x00, - 0xc0, 0xe0, 0x70, 0x38, 0x10, 0x00, - 0x06, 0x83, 0x41, 0xa0, 0xd0, 0x00, - 0xc8, 0x64, 0x32, 0x19, 0x00, 0x00, - 0x45, 0x22, 0x91, 0x48, 0xa0, 0x00, - 0x30, 0x98, 0x4c, 0x26, 0x10, 0x00, - 0xa2, 0x51, 0x28, 0x94, 0x40, 0x00, - 0x4c, 0x26, 0x13, 0x09, 0x80, 0x00, - 0x66, 0x33, 0x19, 0x8c, 0xc0, 0x00, - 0x91, 0x48, 0xa4, 0x52, 0x20, 0x00, - 0x42, 0xa1, 0x50, 0xa8, 0x50, 0x00, - 0xa4, 0x52, 0x29, 0x14, 0x80, 0x00, - 0x13, 0x09, 0x84, 0xc2, 0x60, 0x00, - 0x30, 0x98, 0x4c, 0x26, 0x10, 0x00, - 0x88, 0xc4, 0x62, 0x31, 0x10, 0x00, - 0x09, 0x04, 0x82, 0x41, 0x20, 0x00, - 0xa4, 0x9c, 0x31, 0x13, 0x80, 0x00 -}; - -const uint8_t kMaskRandom36_4[24] = { - 0xec, 0x76, 0x3b, 0x1d, 0x80, 0x00, - 0x67, 0x33, 0x99, 0xcc, 0xe0, 0x00, - 0xb1, 0xd8, 0xec, 0x76, 0x30, 0x00, - 0x5a, 0xad, 0x56, 0xab, 0x50, 0x00 -}; - -const uint8_t kMaskRandom36_5[30] = { - 0x4c, 0xa6, 0x53, 0x29, 0x90, 0x00, - 0x66, 0x33, 0x19, 0x8c, 0xc0, 0x00, - 0x19, 0xd0, 0xc6, 0x74, 0x30, 0x00, - 0x9c, 0x89, 0x67, 0x22, 0x50, 0x00, - 0xe3, 0x4c, 0x38, 0xd3, 0x00, 0x00 -}; - -const uint8_t kMaskRandom36_6[36] = { - 0xcc, 0x26, 0x33, 0x09, 0x80, 0x00, - 0x45, 0x62, 0x91, 0x58, 0xa0, 0x00, - 0xb0, 0x98, 0x6c, 0x26, 0x10, 0x00, - 0x8a, 0x85, 0x62, 0xa1, 0x50, 0x00, - 0x29, 0x53, 0x0a, 0x54, 0xc0, 0x00, - 0xa6, 0x0a, 0xa9, 0x82, 0xa0, 0x00 -}; - -const uint8_t kMaskRandom36_7[42] = { - 0x44, 0xa2, 0x51, 0x28, 0x90, 0x00, - 0x23, 0x11, 0x88, 0xc4, 0x60, 0x00, - 0x91, 0x48, 0xa4, 0x52, 0x20, 0x00, - 0x0a, 0x85, 0x42, 0xa1, 0x50, 0x00, - 0x34, 0x1a, 0x0d, 0x06, 0x80, 0x00, - 0x0b, 0x06, 0x82, 0xc1, 0xa0, 0x00, - 0xe0, 0x64, 0x38, 0x19, 0x00, 0x00 -}; - -const uint8_t kMaskRandom36_8[48] = { - 0x16, 0x0b, 0x05, 0x82, 0xc0, 0x00, - 0xc2, 0x61, 0x30, 0x98, 0x40, 0x00, - 0x60, 0xb0, 0x58, 0x2c, 0x10, 0x00, - 0x85, 0x42, 0xa1, 0x50, 0xa0, 0x00, - 0x4c, 0x26, 0x13, 0x09, 0x80, 0x00, - 0x29, 0x14, 0x8a, 0x45, 0x20, 0x00, - 0x11, 0x88, 0xc4, 0x62, 0x30, 0x00, - 0xb0, 0x58, 0x2c, 0x16, 0x00, 0x00 -}; - -const uint8_t kMaskRandom36_9[54] = { - 0x44, 0xa2, 0x51, 0x28, 0x90, 0x00, - 0x66, 0x26, 0x19, 0x89, 0x80, 0x00, - 0x90, 0x49, 0x64, 0x12, 0x50, 0x00, - 0x01, 0xa5, 0x80, 0x69, 0x60, 0x00, - 0x0e, 0x12, 0x83, 0x84, 0xa0, 0x00, - 0x13, 0x0b, 0x04, 0xc2, 0xc0, 0x00, - 0x20, 0xd0, 0x48, 0x34, 0x10, 0x00, - 0xc2, 0x51, 0x30, 0x94, 0x40, 0x00, - 0x29, 0x0c, 0x8a, 0x43, 0x20, 0x00 -}; - -const uint8_t kMaskRandom37_1[6] = { - 0xff, 0xff, 0xff, 0xff, 0xf8, 0x00 -}; - -const uint8_t kMaskRandom37_10[60] = { - 0x8c, 0xc6, 0x63, 0x38, 0xc0, 0x00, - 0x27, 0x13, 0x89, 0xc4, 0x70, 0x00, - 0x32, 0x99, 0x4c, 0xa3, 0x48, 0x00, - 0x61, 0xb0, 0xd8, 0x64, 0x98, 0x00, - 0x5c, 0x2e, 0x17, 0x0e, 0x20, 0x00, - 0xcc, 0x66, 0x33, 0x1d, 0x40, 0x00, - 0x2b, 0x15, 0x8a, 0xc6, 0x70, 0x00, - 0x32, 0x99, 0x4c, 0xb4, 0x98, 0x00, - 0x25, 0x92, 0xc9, 0x63, 0xa8, 0x00, - 0xfd, 0x9d, 0xd4, 0x22, 0x30, 0x00 -}; - -const uint8_t kMaskRandom37_11[66] = { - 0x8c, 0xc6, 0x63, 0x38, 0xc0, 0x00, - 0x27, 0x13, 0x89, 0xc4, 0x70, 0x00, - 0x32, 0x99, 0x4c, 0xa3, 0x48, 0x00, - 0x61, 0xb0, 0xd8, 0x64, 0x98, 0x00, - 0x5c, 0x2e, 0x17, 0x0e, 0x20, 0x00, - 0x84, 0xc2, 0x61, 0x21, 0xc0, 0x00, - 0x27, 0x13, 0x89, 0xc6, 0x60, 0x00, - 0x51, 0xa8, 0xd4, 0x62, 0x18, 0x00, - 0x1a, 0x0d, 0x06, 0x88, 0xa8, 0x00, - 0x68, 0x34, 0x1a, 0x11, 0x10, 0x00, - 0x89, 0x44, 0xa2, 0x5c, 0x00, 0x00 -}; - -const uint8_t kMaskRandom37_12[72] = { - 0x84, 0xc2, 0x61, 0x21, 0xc0, 0x00, - 0x27, 0x13, 0x89, 0xc6, 0x60, 0x00, - 0x51, 0xa8, 0xd4, 0x62, 0x18, 0x00, - 0x1a, 0x0d, 0x06, 0x88, 0xa8, 0x00, - 0x68, 0x34, 0x1a, 0x11, 0x10, 0x00, - 0x89, 0x44, 0xa2, 0x5c, 0x00, 0x00, - 0x8c, 0xc6, 0x63, 0x38, 0xc0, 0x00, - 0x27, 0x13, 0x89, 0xc4, 0x70, 0x00, - 0x32, 0x99, 0x4c, 0xa3, 0x48, 0x00, - 0x61, 0xb0, 0xd8, 0x64, 0x98, 0x00, - 0x5c, 0x2e, 0x17, 0x0e, 0x20, 0x00, - 0x5b, 0x0c, 0x64, 0x32, 0x20, 0x00 -}; - -const uint8_t kMaskRandom37_13[78] = { - 0x84, 0xc2, 0x61, 0x21, 0xc0, 0x00, - 0x27, 0x13, 0x89, 0xc6, 0x60, 0x00, - 0x51, 0xa8, 0xd4, 0x62, 0x18, 0x00, - 0x1a, 0x0d, 0x06, 0x88, 0xa8, 0x00, - 0x68, 0x34, 0x1a, 0x11, 0x10, 0x00, - 0x89, 0x44, 0xa2, 0x5c, 0x00, 0x00, - 0x8c, 0x46, 0x23, 0x08, 0xc0, 0x00, - 0x47, 0x23, 0x91, 0xc6, 0x60, 0x00, - 0x81, 0xc0, 0xe0, 0x62, 0x18, 0x00, - 0x12, 0x89, 0x44, 0xa1, 0x88, 0x00, - 0x58, 0x2c, 0x16, 0x05, 0x10, 0x00, - 0x28, 0x94, 0x4a, 0x32, 0x80, 0x00, - 0x34, 0x1a, 0x0d, 0x18, 0x20, 0x00 -}; - -const uint8_t kMaskRandom37_14[84] = { - 0x8c, 0x46, 0x23, 0x08, 0xc0, 0x00, - 0x47, 0x23, 0x91, 0xc6, 0x60, 0x00, - 0x81, 0xc0, 0xe0, 0x62, 0x18, 0x00, - 0x12, 0x89, 0x44, 0xa1, 0x88, 0x00, - 0x58, 0x2c, 0x16, 0x05, 0x10, 0x00, - 0x28, 0x94, 0x4a, 0x32, 0x80, 0x00, - 0x34, 0x1a, 0x0d, 0x18, 0x20, 0x00, - 0x84, 0xc2, 0x61, 0x21, 0xc0, 0x00, - 0x27, 0x13, 0x89, 0xc6, 0x60, 0x00, - 0x51, 0xa8, 0xd4, 0x62, 0x18, 0x00, - 0x1a, 0x0d, 0x06, 0x88, 0xa8, 0x00, - 0x68, 0x34, 0x1a, 0x11, 0x10, 0x00, - 0x89, 0x44, 0xa2, 0x5c, 0x00, 0x00, - 0x7f, 0x4f, 0xdb, 0x89, 0xd8, 0x00 -}; - -const uint8_t kMaskRandom37_15[90] = { - 0x8c, 0x46, 0x23, 0x08, 0xc0, 0x00, - 0x47, 0x23, 0x91, 0xc6, 0x60, 0x00, - 0x81, 0xc0, 0xe0, 0x62, 0x18, 0x00, - 0x12, 0x89, 0x44, 0xa1, 0x88, 0x00, - 0x58, 0x2c, 0x16, 0x05, 0x10, 0x00, - 0x28, 0x94, 0x4a, 0x32, 0x80, 0x00, - 0x34, 0x1a, 0x0d, 0x18, 0x20, 0x00, - 0x2c, 0x16, 0x0b, 0x05, 0x80, 0x00, - 0x91, 0x48, 0xa4, 0x50, 0x30, 0x00, - 0xc0, 0xe0, 0x70, 0x34, 0x08, 0x00, - 0x06, 0x83, 0x41, 0xa0, 0xa8, 0x00, - 0xc8, 0x64, 0x32, 0x03, 0x10, 0x00, - 0x45, 0x22, 0x91, 0x58, 0x40, 0x00, - 0x30, 0x98, 0x4c, 0x24, 0x50, 0x00, - 0xa2, 0x51, 0x28, 0x8a, 0x08, 0x00 -}; - -const uint8_t kMaskRandom37_16[96] = { - 0x2c, 0x16, 0x0b, 0x05, 0x80, 0x00, - 0x91, 0x48, 0xa4, 0x50, 0x30, 0x00, - 0xc0, 0xe0, 0x70, 0x34, 0x08, 0x00, - 0x06, 0x83, 0x41, 0xa0, 0xa8, 0x00, - 0xc8, 0x64, 0x32, 0x03, 0x10, 0x00, - 0x45, 0x22, 0x91, 0x58, 0x40, 0x00, - 0x30, 0x98, 0x4c, 0x24, 0x50, 0x00, - 0xa2, 0x51, 0x28, 0x8a, 0x08, 0x00, - 0x8c, 0x46, 0x23, 0x08, 0xc0, 0x00, - 0x47, 0x23, 0x91, 0xc6, 0x60, 0x00, - 0x81, 0xc0, 0xe0, 0x62, 0x18, 0x00, - 0x12, 0x89, 0x44, 0xa1, 0x88, 0x00, - 0x58, 0x2c, 0x16, 0x05, 0x10, 0x00, - 0x28, 0x94, 0x4a, 0x32, 0x80, 0x00, - 0x34, 0x1a, 0x0d, 0x18, 0x20, 0x00, - 0xef, 0xf2, 0x1f, 0x9d, 0x78, 0x00 -}; - -const uint8_t kMaskRandom37_17[102] = { - 0x2c, 0x16, 0x0b, 0x05, 0x80, 0x00, - 0x91, 0x48, 0xa4, 0x50, 0x30, 0x00, - 0xc0, 0xe0, 0x70, 0x34, 0x08, 0x00, - 0x06, 0x83, 0x41, 0xa0, 0xa8, 0x00, - 0xc8, 0x64, 0x32, 0x03, 0x10, 0x00, - 0x45, 0x22, 0x91, 0x58, 0x40, 0x00, - 0x30, 0x98, 0x4c, 0x24, 0x50, 0x00, - 0xa2, 0x51, 0x28, 0x8a, 0x08, 0x00, - 0x4c, 0x26, 0x13, 0x09, 0xc0, 0x00, - 0x66, 0x33, 0x19, 0x9c, 0x60, 0x00, - 0x91, 0x48, 0xa4, 0x50, 0x38, 0x00, - 0x42, 0xa1, 0x50, 0xa4, 0x28, 0x00, - 0xa4, 0x52, 0x29, 0x0a, 0x50, 0x00, - 0x13, 0x09, 0x84, 0xd6, 0x80, 0x00, - 0x30, 0x98, 0x4c, 0x24, 0xd0, 0x00, - 0x88, 0xc4, 0x62, 0x2b, 0x08, 0x00, - 0x09, 0x04, 0x82, 0x43, 0x30, 0x00 -}; - -const uint8_t kMaskRandom37_18[108] = { - 0x4c, 0x26, 0x13, 0x09, 0xc0, 0x00, - 0x66, 0x33, 0x19, 0x9c, 0x60, 0x00, - 0x91, 0x48, 0xa4, 0x50, 0x38, 0x00, - 0x42, 0xa1, 0x50, 0xa4, 0x28, 0x00, - 0xa4, 0x52, 0x29, 0x0a, 0x50, 0x00, - 0x13, 0x09, 0x84, 0xd6, 0x80, 0x00, - 0x30, 0x98, 0x4c, 0x24, 0xd0, 0x00, - 0x88, 0xc4, 0x62, 0x2b, 0x08, 0x00, - 0x09, 0x04, 0x82, 0x43, 0x30, 0x00, - 0x2c, 0x16, 0x0b, 0x05, 0x80, 0x00, - 0x91, 0x48, 0xa4, 0x50, 0x30, 0x00, - 0xc0, 0xe0, 0x70, 0x34, 0x08, 0x00, - 0x06, 0x83, 0x41, 0xa0, 0xa8, 0x00, - 0xc8, 0x64, 0x32, 0x03, 0x10, 0x00, - 0x45, 0x22, 0x91, 0x58, 0x40, 0x00, - 0x30, 0x98, 0x4c, 0x24, 0x50, 0x00, - 0xa2, 0x51, 0x28, 0x8a, 0x08, 0x00, - 0xd0, 0x03, 0x54, 0x65, 0xc8, 0x00 -}; - -const uint8_t kMaskRandom37_19[114] = { - 0x44, 0xa2, 0x51, 0x29, 0xc0, 0x00, - 0x66, 0x26, 0x19, 0x9c, 0x20, 0x00, - 0x90, 0x49, 0x44, 0xb0, 0x38, 0x00, - 0x01, 0xa5, 0xb0, 0xc4, 0x28, 0x00, - 0x0e, 0x12, 0xa3, 0x0a, 0x50, 0x00, - 0x13, 0x0b, 0x04, 0x56, 0xc0, 0x00, - 0x20, 0xd0, 0x48, 0x64, 0xd0, 0x00, - 0xc2, 0x51, 0x28, 0x8b, 0x00, 0x00, - 0x29, 0x0c, 0x86, 0x03, 0x38, 0x00, - 0x8c, 0xc6, 0x63, 0x38, 0xc0, 0x00, - 0x27, 0x13, 0x89, 0xc4, 0x70, 0x00, - 0x32, 0x99, 0x4c, 0xa3, 0x48, 0x00, - 0x61, 0xb0, 0xd8, 0x64, 0x98, 0x00, - 0x5c, 0x2e, 0x17, 0x0e, 0x20, 0x00, - 0xcc, 0x66, 0x33, 0x1d, 0x40, 0x00, - 0x2b, 0x15, 0x8a, 0xc6, 0x70, 0x00, - 0x32, 0x99, 0x4c, 0xb4, 0x98, 0x00, - 0x25, 0x92, 0xc9, 0x63, 0xa8, 0x00, - 0xfd, 0x9d, 0xd4, 0x22, 0x30, 0x00 -}; - -const uint8_t kMaskRandom37_2[12] = { - 0xce, 0x67, 0x33, 0x9d, 0xc0, 0x00, - 0x39, 0x9c, 0xce, 0x73, 0x38, 0x00 -}; - -const uint8_t kMaskRandom37_20[120] = { - 0x8c, 0xc6, 0x63, 0x38, 0xc0, 0x00, - 0x27, 0x13, 0x89, 0xc4, 0x70, 0x00, - 0x32, 0x99, 0x4c, 0xa3, 0x48, 0x00, - 0x61, 0xb0, 0xd8, 0x64, 0x98, 0x00, - 0x5c, 0x2e, 0x17, 0x0e, 0x20, 0x00, - 0xcc, 0x66, 0x33, 0x1d, 0x40, 0x00, - 0x2b, 0x15, 0x8a, 0xc6, 0x70, 0x00, - 0x32, 0x99, 0x4c, 0xb4, 0x98, 0x00, - 0x25, 0x92, 0xc9, 0x63, 0xa8, 0x00, - 0xfd, 0x9d, 0xd4, 0x22, 0x30, 0x00, - 0x44, 0xa2, 0x51, 0x29, 0xc0, 0x00, - 0x66, 0x26, 0x19, 0x9c, 0x20, 0x00, - 0x90, 0x49, 0x44, 0xb0, 0x38, 0x00, - 0x01, 0xa5, 0xb0, 0xc4, 0x28, 0x00, - 0x0e, 0x12, 0xa3, 0x0a, 0x50, 0x00, - 0x13, 0x0b, 0x04, 0x56, 0xc0, 0x00, - 0x20, 0xd0, 0x48, 0x64, 0xd0, 0x00, - 0xc2, 0x51, 0x28, 0x8b, 0x00, 0x00, - 0x29, 0x0c, 0x86, 0x03, 0x38, 0x00, - 0xe5, 0x44, 0xda, 0x3a, 0xc8, 0x00 -}; - -const uint8_t kMaskRandom37_21[126] = { - 0x8c, 0xc6, 0x63, 0x38, 0xc0, 0x00, - 0x27, 0x13, 0x89, 0xc4, 0x70, 0x00, - 0x32, 0x99, 0x4c, 0xa3, 0x48, 0x00, - 0x61, 0xb0, 0xd8, 0x64, 0x98, 0x00, - 0x5c, 0x2e, 0x17, 0x0e, 0x20, 0x00, - 0xcc, 0x66, 0x33, 0x1d, 0x40, 0x00, - 0x2b, 0x15, 0x8a, 0xc6, 0x70, 0x00, - 0x32, 0x99, 0x4c, 0xb4, 0x98, 0x00, - 0x25, 0x92, 0xc9, 0x63, 0xa8, 0x00, - 0xfd, 0x9d, 0xd4, 0x22, 0x30, 0x00, - 0x8c, 0xc6, 0x63, 0x38, 0xc0, 0x00, - 0x27, 0x13, 0x89, 0xc4, 0x70, 0x00, - 0x32, 0x99, 0x4c, 0xa3, 0x48, 0x00, - 0x61, 0xb0, 0xd8, 0x64, 0x98, 0x00, - 0x5c, 0x2e, 0x17, 0x0e, 0x20, 0x00, - 0x84, 0xc2, 0x61, 0x21, 0xc0, 0x00, - 0x27, 0x13, 0x89, 0xc6, 0x60, 0x00, - 0x51, 0xa8, 0xd4, 0x62, 0x18, 0x00, - 0x1a, 0x0d, 0x06, 0x88, 0xa8, 0x00, - 0x68, 0x34, 0x1a, 0x11, 0x10, 0x00, - 0x89, 0x44, 0xa2, 0x5c, 0x00, 0x00 -}; - -const uint8_t kMaskRandom37_22[132] = { - 0x8c, 0xc6, 0x63, 0x38, 0xc0, 0x00, - 0x27, 0x13, 0x89, 0xc4, 0x70, 0x00, - 0x32, 0x99, 0x4c, 0xa3, 0x48, 0x00, - 0x61, 0xb0, 0xd8, 0x64, 0x98, 0x00, - 0x5c, 0x2e, 0x17, 0x0e, 0x20, 0x00, - 0x84, 0xc2, 0x61, 0x21, 0xc0, 0x00, - 0x27, 0x13, 0x89, 0xc6, 0x60, 0x00, - 0x51, 0xa8, 0xd4, 0x62, 0x18, 0x00, - 0x1a, 0x0d, 0x06, 0x88, 0xa8, 0x00, - 0x68, 0x34, 0x1a, 0x11, 0x10, 0x00, - 0x89, 0x44, 0xa2, 0x5c, 0x00, 0x00, - 0x8c, 0xc6, 0x63, 0x38, 0xc0, 0x00, - 0x27, 0x13, 0x89, 0xc4, 0x70, 0x00, - 0x32, 0x99, 0x4c, 0xa3, 0x48, 0x00, - 0x61, 0xb0, 0xd8, 0x64, 0x98, 0x00, - 0x5c, 0x2e, 0x17, 0x0e, 0x20, 0x00, - 0xcc, 0x66, 0x33, 0x1d, 0x40, 0x00, - 0x2b, 0x15, 0x8a, 0xc6, 0x70, 0x00, - 0x32, 0x99, 0x4c, 0xb4, 0x98, 0x00, - 0x25, 0x92, 0xc9, 0x63, 0xa8, 0x00, - 0xfd, 0x9d, 0xd4, 0x22, 0x30, 0x00, - 0xe4, 0xd3, 0xff, 0x5a, 0x28, 0x00 -}; - -const uint8_t kMaskRandom37_23[138] = { - 0x8c, 0xc6, 0x63, 0x38, 0xc0, 0x00, - 0x27, 0x13, 0x89, 0xc4, 0x70, 0x00, - 0x32, 0x99, 0x4c, 0xa3, 0x48, 0x00, - 0x61, 0xb0, 0xd8, 0x64, 0x98, 0x00, - 0x5c, 0x2e, 0x17, 0x0e, 0x20, 0x00, - 0x84, 0xc2, 0x61, 0x21, 0xc0, 0x00, - 0x27, 0x13, 0x89, 0xc6, 0x60, 0x00, - 0x51, 0xa8, 0xd4, 0x62, 0x18, 0x00, - 0x1a, 0x0d, 0x06, 0x88, 0xa8, 0x00, - 0x68, 0x34, 0x1a, 0x11, 0x10, 0x00, - 0x89, 0x44, 0xa2, 0x5c, 0x00, 0x00, - 0x84, 0xc2, 0x61, 0x21, 0xc0, 0x00, - 0x27, 0x13, 0x89, 0xc6, 0x60, 0x00, - 0x51, 0xa8, 0xd4, 0x62, 0x18, 0x00, - 0x1a, 0x0d, 0x06, 0x88, 0xa8, 0x00, - 0x68, 0x34, 0x1a, 0x11, 0x10, 0x00, - 0x89, 0x44, 0xa2, 0x5c, 0x00, 0x00, - 0x8c, 0xc6, 0x63, 0x38, 0xc0, 0x00, - 0x27, 0x13, 0x89, 0xc4, 0x70, 0x00, - 0x32, 0x99, 0x4c, 0xa3, 0x48, 0x00, - 0x61, 0xb0, 0xd8, 0x64, 0x98, 0x00, - 0x5c, 0x2e, 0x17, 0x0e, 0x20, 0x00, - 0x5b, 0x0c, 0x64, 0x32, 0x20, 0x00 -}; - -const uint8_t kMaskRandom37_24[144] = { - 0x84, 0xc2, 0x61, 0x21, 0xc0, 0x00, - 0x27, 0x13, 0x89, 0xc6, 0x60, 0x00, - 0x51, 0xa8, 0xd4, 0x62, 0x18, 0x00, - 0x1a, 0x0d, 0x06, 0x88, 0xa8, 0x00, - 0x68, 0x34, 0x1a, 0x11, 0x10, 0x00, - 0x89, 0x44, 0xa2, 0x5c, 0x00, 0x00, - 0x8c, 0xc6, 0x63, 0x38, 0xc0, 0x00, - 0x27, 0x13, 0x89, 0xc4, 0x70, 0x00, - 0x32, 0x99, 0x4c, 0xa3, 0x48, 0x00, - 0x61, 0xb0, 0xd8, 0x64, 0x98, 0x00, - 0x5c, 0x2e, 0x17, 0x0e, 0x20, 0x00, - 0x5b, 0x0c, 0x64, 0x32, 0x20, 0x00, - 0x8c, 0xc6, 0x63, 0x38, 0xc0, 0x00, - 0x27, 0x13, 0x89, 0xc4, 0x70, 0x00, - 0x32, 0x99, 0x4c, 0xa3, 0x48, 0x00, - 0x61, 0xb0, 0xd8, 0x64, 0x98, 0x00, - 0x5c, 0x2e, 0x17, 0x0e, 0x20, 0x00, - 0x84, 0xc2, 0x61, 0x21, 0xc0, 0x00, - 0x27, 0x13, 0x89, 0xc6, 0x60, 0x00, - 0x51, 0xa8, 0xd4, 0x62, 0x18, 0x00, - 0x1a, 0x0d, 0x06, 0x88, 0xa8, 0x00, - 0x68, 0x34, 0x1a, 0x11, 0x10, 0x00, - 0x89, 0x44, 0xa2, 0x5c, 0x00, 0x00, - 0xad, 0x58, 0xb2, 0x36, 0x68, 0x00 -}; - -const uint8_t kMaskRandom37_25[150] = { - 0x84, 0xc2, 0x61, 0x21, 0xc0, 0x00, - 0x27, 0x13, 0x89, 0xc6, 0x60, 0x00, - 0x51, 0xa8, 0xd4, 0x62, 0x18, 0x00, - 0x1a, 0x0d, 0x06, 0x88, 0xa8, 0x00, - 0x68, 0x34, 0x1a, 0x11, 0x10, 0x00, - 0x89, 0x44, 0xa2, 0x5c, 0x00, 0x00, - 0x8c, 0xc6, 0x63, 0x38, 0xc0, 0x00, - 0x27, 0x13, 0x89, 0xc4, 0x70, 0x00, - 0x32, 0x99, 0x4c, 0xa3, 0x48, 0x00, - 0x61, 0xb0, 0xd8, 0x64, 0x98, 0x00, - 0x5c, 0x2e, 0x17, 0x0e, 0x20, 0x00, - 0x5b, 0x0c, 0x64, 0x32, 0x20, 0x00, - 0x84, 0xc2, 0x61, 0x21, 0xc0, 0x00, - 0x27, 0x13, 0x89, 0xc6, 0x60, 0x00, - 0x51, 0xa8, 0xd4, 0x62, 0x18, 0x00, - 0x1a, 0x0d, 0x06, 0x88, 0xa8, 0x00, - 0x68, 0x34, 0x1a, 0x11, 0x10, 0x00, - 0x89, 0x44, 0xa2, 0x5c, 0x00, 0x00, - 0x8c, 0x46, 0x23, 0x08, 0xc0, 0x00, - 0x47, 0x23, 0x91, 0xc6, 0x60, 0x00, - 0x81, 0xc0, 0xe0, 0x62, 0x18, 0x00, - 0x12, 0x89, 0x44, 0xa1, 0x88, 0x00, - 0x58, 0x2c, 0x16, 0x05, 0x10, 0x00, - 0x28, 0x94, 0x4a, 0x32, 0x80, 0x00, - 0x34, 0x1a, 0x0d, 0x18, 0x20, 0x00 -}; - -const uint8_t kMaskRandom37_26[156] = { - 0x84, 0xc2, 0x61, 0x21, 0xc0, 0x00, - 0x27, 0x13, 0x89, 0xc6, 0x60, 0x00, - 0x51, 0xa8, 0xd4, 0x62, 0x18, 0x00, - 0x1a, 0x0d, 0x06, 0x88, 0xa8, 0x00, - 0x68, 0x34, 0x1a, 0x11, 0x10, 0x00, - 0x89, 0x44, 0xa2, 0x5c, 0x00, 0x00, - 0x8c, 0x46, 0x23, 0x08, 0xc0, 0x00, - 0x47, 0x23, 0x91, 0xc6, 0x60, 0x00, - 0x81, 0xc0, 0xe0, 0x62, 0x18, 0x00, - 0x12, 0x89, 0x44, 0xa1, 0x88, 0x00, - 0x58, 0x2c, 0x16, 0x05, 0x10, 0x00, - 0x28, 0x94, 0x4a, 0x32, 0x80, 0x00, - 0x34, 0x1a, 0x0d, 0x18, 0x20, 0x00, - 0x84, 0xc2, 0x61, 0x21, 0xc0, 0x00, - 0x27, 0x13, 0x89, 0xc6, 0x60, 0x00, - 0x51, 0xa8, 0xd4, 0x62, 0x18, 0x00, - 0x1a, 0x0d, 0x06, 0x88, 0xa8, 0x00, - 0x68, 0x34, 0x1a, 0x11, 0x10, 0x00, - 0x89, 0x44, 0xa2, 0x5c, 0x00, 0x00, - 0x8c, 0xc6, 0x63, 0x38, 0xc0, 0x00, - 0x27, 0x13, 0x89, 0xc4, 0x70, 0x00, - 0x32, 0x99, 0x4c, 0xa3, 0x48, 0x00, - 0x61, 0xb0, 0xd8, 0x64, 0x98, 0x00, - 0x5c, 0x2e, 0x17, 0x0e, 0x20, 0x00, - 0x5b, 0x0c, 0x64, 0x32, 0x20, 0x00, - 0x7f, 0xb2, 0x5a, 0xaa, 0x20, 0x00 -}; - -const uint8_t kMaskRandom37_27[162] = { - 0x84, 0xc2, 0x61, 0x21, 0xc0, 0x00, - 0x27, 0x13, 0x89, 0xc6, 0x60, 0x00, - 0x51, 0xa8, 0xd4, 0x62, 0x18, 0x00, - 0x1a, 0x0d, 0x06, 0x88, 0xa8, 0x00, - 0x68, 0x34, 0x1a, 0x11, 0x10, 0x00, - 0x89, 0x44, 0xa2, 0x5c, 0x00, 0x00, - 0x8c, 0x46, 0x23, 0x08, 0xc0, 0x00, - 0x47, 0x23, 0x91, 0xc6, 0x60, 0x00, - 0x81, 0xc0, 0xe0, 0x62, 0x18, 0x00, - 0x12, 0x89, 0x44, 0xa1, 0x88, 0x00, - 0x58, 0x2c, 0x16, 0x05, 0x10, 0x00, - 0x28, 0x94, 0x4a, 0x32, 0x80, 0x00, - 0x34, 0x1a, 0x0d, 0x18, 0x20, 0x00, - 0x8c, 0x46, 0x23, 0x08, 0xc0, 0x00, - 0x47, 0x23, 0x91, 0xc6, 0x60, 0x00, - 0x81, 0xc0, 0xe0, 0x62, 0x18, 0x00, - 0x12, 0x89, 0x44, 0xa1, 0x88, 0x00, - 0x58, 0x2c, 0x16, 0x05, 0x10, 0x00, - 0x28, 0x94, 0x4a, 0x32, 0x80, 0x00, - 0x34, 0x1a, 0x0d, 0x18, 0x20, 0x00, - 0x84, 0xc2, 0x61, 0x21, 0xc0, 0x00, - 0x27, 0x13, 0x89, 0xc6, 0x60, 0x00, - 0x51, 0xa8, 0xd4, 0x62, 0x18, 0x00, - 0x1a, 0x0d, 0x06, 0x88, 0xa8, 0x00, - 0x68, 0x34, 0x1a, 0x11, 0x10, 0x00, - 0x89, 0x44, 0xa2, 0x5c, 0x00, 0x00, - 0x7f, 0x4f, 0xdb, 0x89, 0xd8, 0x00 -}; - -const uint8_t kMaskRandom37_28[168] = { - 0x8c, 0x46, 0x23, 0x08, 0xc0, 0x00, - 0x47, 0x23, 0x91, 0xc6, 0x60, 0x00, - 0x81, 0xc0, 0xe0, 0x62, 0x18, 0x00, - 0x12, 0x89, 0x44, 0xa1, 0x88, 0x00, - 0x58, 0x2c, 0x16, 0x05, 0x10, 0x00, - 0x28, 0x94, 0x4a, 0x32, 0x80, 0x00, - 0x34, 0x1a, 0x0d, 0x18, 0x20, 0x00, - 0x84, 0xc2, 0x61, 0x21, 0xc0, 0x00, - 0x27, 0x13, 0x89, 0xc6, 0x60, 0x00, - 0x51, 0xa8, 0xd4, 0x62, 0x18, 0x00, - 0x1a, 0x0d, 0x06, 0x88, 0xa8, 0x00, - 0x68, 0x34, 0x1a, 0x11, 0x10, 0x00, - 0x89, 0x44, 0xa2, 0x5c, 0x00, 0x00, - 0x7f, 0x4f, 0xdb, 0x89, 0xd8, 0x00, - 0x84, 0xc2, 0x61, 0x21, 0xc0, 0x00, - 0x27, 0x13, 0x89, 0xc6, 0x60, 0x00, - 0x51, 0xa8, 0xd4, 0x62, 0x18, 0x00, - 0x1a, 0x0d, 0x06, 0x88, 0xa8, 0x00, - 0x68, 0x34, 0x1a, 0x11, 0x10, 0x00, - 0x89, 0x44, 0xa2, 0x5c, 0x00, 0x00, - 0x8c, 0x46, 0x23, 0x08, 0xc0, 0x00, - 0x47, 0x23, 0x91, 0xc6, 0x60, 0x00, - 0x81, 0xc0, 0xe0, 0x62, 0x18, 0x00, - 0x12, 0x89, 0x44, 0xa1, 0x88, 0x00, - 0x58, 0x2c, 0x16, 0x05, 0x10, 0x00, - 0x28, 0x94, 0x4a, 0x32, 0x80, 0x00, - 0x34, 0x1a, 0x0d, 0x18, 0x20, 0x00, - 0x7b, 0xc4, 0x24, 0xbf, 0x10, 0x00 -}; - -const uint8_t kMaskRandom37_29[174] = { - 0x8c, 0x46, 0x23, 0x08, 0xc0, 0x00, - 0x47, 0x23, 0x91, 0xc6, 0x60, 0x00, - 0x81, 0xc0, 0xe0, 0x62, 0x18, 0x00, - 0x12, 0x89, 0x44, 0xa1, 0x88, 0x00, - 0x58, 0x2c, 0x16, 0x05, 0x10, 0x00, - 0x28, 0x94, 0x4a, 0x32, 0x80, 0x00, - 0x34, 0x1a, 0x0d, 0x18, 0x20, 0x00, - 0x84, 0xc2, 0x61, 0x21, 0xc0, 0x00, - 0x27, 0x13, 0x89, 0xc6, 0x60, 0x00, - 0x51, 0xa8, 0xd4, 0x62, 0x18, 0x00, - 0x1a, 0x0d, 0x06, 0x88, 0xa8, 0x00, - 0x68, 0x34, 0x1a, 0x11, 0x10, 0x00, - 0x89, 0x44, 0xa2, 0x5c, 0x00, 0x00, - 0x7f, 0x4f, 0xdb, 0x89, 0xd8, 0x00, - 0x8c, 0x46, 0x23, 0x08, 0xc0, 0x00, - 0x47, 0x23, 0x91, 0xc6, 0x60, 0x00, - 0x81, 0xc0, 0xe0, 0x62, 0x18, 0x00, - 0x12, 0x89, 0x44, 0xa1, 0x88, 0x00, - 0x58, 0x2c, 0x16, 0x05, 0x10, 0x00, - 0x28, 0x94, 0x4a, 0x32, 0x80, 0x00, - 0x34, 0x1a, 0x0d, 0x18, 0x20, 0x00, - 0x2c, 0x16, 0x0b, 0x05, 0x80, 0x00, - 0x91, 0x48, 0xa4, 0x50, 0x30, 0x00, - 0xc0, 0xe0, 0x70, 0x34, 0x08, 0x00, - 0x06, 0x83, 0x41, 0xa0, 0xa8, 0x00, - 0xc8, 0x64, 0x32, 0x03, 0x10, 0x00, - 0x45, 0x22, 0x91, 0x58, 0x40, 0x00, - 0x30, 0x98, 0x4c, 0x24, 0x50, 0x00, - 0xa2, 0x51, 0x28, 0x8a, 0x08, 0x00 -}; - -const uint8_t kMaskRandom37_3[18] = { - 0xcc, 0x66, 0x33, 0x19, 0xc0, 0x00, - 0x27, 0x15, 0x89, 0xcb, 0x30, 0x00, - 0x92, 0xc9, 0x64, 0xb4, 0x98, 0x00 -}; - -const uint8_t kMaskRandom37_30[180] = { - 0x8c, 0x46, 0x23, 0x08, 0xc0, 0x00, - 0x47, 0x23, 0x91, 0xc6, 0x60, 0x00, - 0x81, 0xc0, 0xe0, 0x62, 0x18, 0x00, - 0x12, 0x89, 0x44, 0xa1, 0x88, 0x00, - 0x58, 0x2c, 0x16, 0x05, 0x10, 0x00, - 0x28, 0x94, 0x4a, 0x32, 0x80, 0x00, - 0x34, 0x1a, 0x0d, 0x18, 0x20, 0x00, - 0x2c, 0x16, 0x0b, 0x05, 0x80, 0x00, - 0x91, 0x48, 0xa4, 0x50, 0x30, 0x00, - 0xc0, 0xe0, 0x70, 0x34, 0x08, 0x00, - 0x06, 0x83, 0x41, 0xa0, 0xa8, 0x00, - 0xc8, 0x64, 0x32, 0x03, 0x10, 0x00, - 0x45, 0x22, 0x91, 0x58, 0x40, 0x00, - 0x30, 0x98, 0x4c, 0x24, 0x50, 0x00, - 0xa2, 0x51, 0x28, 0x8a, 0x08, 0x00, - 0x8c, 0x46, 0x23, 0x08, 0xc0, 0x00, - 0x47, 0x23, 0x91, 0xc6, 0x60, 0x00, - 0x81, 0xc0, 0xe0, 0x62, 0x18, 0x00, - 0x12, 0x89, 0x44, 0xa1, 0x88, 0x00, - 0x58, 0x2c, 0x16, 0x05, 0x10, 0x00, - 0x28, 0x94, 0x4a, 0x32, 0x80, 0x00, - 0x34, 0x1a, 0x0d, 0x18, 0x20, 0x00, - 0x84, 0xc2, 0x61, 0x21, 0xc0, 0x00, - 0x27, 0x13, 0x89, 0xc6, 0x60, 0x00, - 0x51, 0xa8, 0xd4, 0x62, 0x18, 0x00, - 0x1a, 0x0d, 0x06, 0x88, 0xa8, 0x00, - 0x68, 0x34, 0x1a, 0x11, 0x10, 0x00, - 0x89, 0x44, 0xa2, 0x5c, 0x00, 0x00, - 0x7f, 0x4f, 0xdb, 0x89, 0xd8, 0x00, - 0x1d, 0x8e, 0x11, 0xb0, 0xe8, 0x00 -}; - -const uint8_t kMaskRandom37_31[186] = { - 0x8c, 0x46, 0x23, 0x08, 0xc0, 0x00, - 0x47, 0x23, 0x91, 0xc6, 0x60, 0x00, - 0x81, 0xc0, 0xe0, 0x62, 0x18, 0x00, - 0x12, 0x89, 0x44, 0xa1, 0x88, 0x00, - 0x58, 0x2c, 0x16, 0x05, 0x10, 0x00, - 0x28, 0x94, 0x4a, 0x32, 0x80, 0x00, - 0x34, 0x1a, 0x0d, 0x18, 0x20, 0x00, - 0x2c, 0x16, 0x0b, 0x05, 0x80, 0x00, - 0x91, 0x48, 0xa4, 0x50, 0x30, 0x00, - 0xc0, 0xe0, 0x70, 0x34, 0x08, 0x00, - 0x06, 0x83, 0x41, 0xa0, 0xa8, 0x00, - 0xc8, 0x64, 0x32, 0x03, 0x10, 0x00, - 0x45, 0x22, 0x91, 0x58, 0x40, 0x00, - 0x30, 0x98, 0x4c, 0x24, 0x50, 0x00, - 0xa2, 0x51, 0x28, 0x8a, 0x08, 0x00, - 0x2c, 0x16, 0x0b, 0x05, 0x80, 0x00, - 0x91, 0x48, 0xa4, 0x50, 0x30, 0x00, - 0xc0, 0xe0, 0x70, 0x34, 0x08, 0x00, - 0x06, 0x83, 0x41, 0xa0, 0xa8, 0x00, - 0xc8, 0x64, 0x32, 0x03, 0x10, 0x00, - 0x45, 0x22, 0x91, 0x58, 0x40, 0x00, - 0x30, 0x98, 0x4c, 0x24, 0x50, 0x00, - 0xa2, 0x51, 0x28, 0x8a, 0x08, 0x00, - 0x8c, 0x46, 0x23, 0x08, 0xc0, 0x00, - 0x47, 0x23, 0x91, 0xc6, 0x60, 0x00, - 0x81, 0xc0, 0xe0, 0x62, 0x18, 0x00, - 0x12, 0x89, 0x44, 0xa1, 0x88, 0x00, - 0x58, 0x2c, 0x16, 0x05, 0x10, 0x00, - 0x28, 0x94, 0x4a, 0x32, 0x80, 0x00, - 0x34, 0x1a, 0x0d, 0x18, 0x20, 0x00, - 0xef, 0xf2, 0x1f, 0x9d, 0x78, 0x00 -}; - -const uint8_t kMaskRandom37_32[192] = { - 0x2c, 0x16, 0x0b, 0x05, 0x80, 0x00, - 0x91, 0x48, 0xa4, 0x50, 0x30, 0x00, - 0xc0, 0xe0, 0x70, 0x34, 0x08, 0x00, - 0x06, 0x83, 0x41, 0xa0, 0xa8, 0x00, - 0xc8, 0x64, 0x32, 0x03, 0x10, 0x00, - 0x45, 0x22, 0x91, 0x58, 0x40, 0x00, - 0x30, 0x98, 0x4c, 0x24, 0x50, 0x00, - 0xa2, 0x51, 0x28, 0x8a, 0x08, 0x00, - 0x8c, 0x46, 0x23, 0x08, 0xc0, 0x00, - 0x47, 0x23, 0x91, 0xc6, 0x60, 0x00, - 0x81, 0xc0, 0xe0, 0x62, 0x18, 0x00, - 0x12, 0x89, 0x44, 0xa1, 0x88, 0x00, - 0x58, 0x2c, 0x16, 0x05, 0x10, 0x00, - 0x28, 0x94, 0x4a, 0x32, 0x80, 0x00, - 0x34, 0x1a, 0x0d, 0x18, 0x20, 0x00, - 0xef, 0xf2, 0x1f, 0x9d, 0x78, 0x00, - 0x8c, 0x46, 0x23, 0x08, 0xc0, 0x00, - 0x47, 0x23, 0x91, 0xc6, 0x60, 0x00, - 0x81, 0xc0, 0xe0, 0x62, 0x18, 0x00, - 0x12, 0x89, 0x44, 0xa1, 0x88, 0x00, - 0x58, 0x2c, 0x16, 0x05, 0x10, 0x00, - 0x28, 0x94, 0x4a, 0x32, 0x80, 0x00, - 0x34, 0x1a, 0x0d, 0x18, 0x20, 0x00, - 0x2c, 0x16, 0x0b, 0x05, 0x80, 0x00, - 0x91, 0x48, 0xa4, 0x50, 0x30, 0x00, - 0xc0, 0xe0, 0x70, 0x34, 0x08, 0x00, - 0x06, 0x83, 0x41, 0xa0, 0xa8, 0x00, - 0xc8, 0x64, 0x32, 0x03, 0x10, 0x00, - 0x45, 0x22, 0x91, 0x58, 0x40, 0x00, - 0x30, 0x98, 0x4c, 0x24, 0x50, 0x00, - 0xa2, 0x51, 0x28, 0x8a, 0x08, 0x00, - 0xf7, 0x95, 0x57, 0x8c, 0x40, 0x00 -}; - -const uint8_t kMaskRandom37_33[198] = { - 0x2c, 0x16, 0x0b, 0x05, 0x80, 0x00, - 0x91, 0x48, 0xa4, 0x50, 0x30, 0x00, - 0xc0, 0xe0, 0x70, 0x34, 0x08, 0x00, - 0x06, 0x83, 0x41, 0xa0, 0xa8, 0x00, - 0xc8, 0x64, 0x32, 0x03, 0x10, 0x00, - 0x45, 0x22, 0x91, 0x58, 0x40, 0x00, - 0x30, 0x98, 0x4c, 0x24, 0x50, 0x00, - 0xa2, 0x51, 0x28, 0x8a, 0x08, 0x00, - 0x8c, 0x46, 0x23, 0x08, 0xc0, 0x00, - 0x47, 0x23, 0x91, 0xc6, 0x60, 0x00, - 0x81, 0xc0, 0xe0, 0x62, 0x18, 0x00, - 0x12, 0x89, 0x44, 0xa1, 0x88, 0x00, - 0x58, 0x2c, 0x16, 0x05, 0x10, 0x00, - 0x28, 0x94, 0x4a, 0x32, 0x80, 0x00, - 0x34, 0x1a, 0x0d, 0x18, 0x20, 0x00, - 0xef, 0xf2, 0x1f, 0x9d, 0x78, 0x00, - 0x2c, 0x16, 0x0b, 0x05, 0x80, 0x00, - 0x91, 0x48, 0xa4, 0x50, 0x30, 0x00, - 0xc0, 0xe0, 0x70, 0x34, 0x08, 0x00, - 0x06, 0x83, 0x41, 0xa0, 0xa8, 0x00, - 0xc8, 0x64, 0x32, 0x03, 0x10, 0x00, - 0x45, 0x22, 0x91, 0x58, 0x40, 0x00, - 0x30, 0x98, 0x4c, 0x24, 0x50, 0x00, - 0xa2, 0x51, 0x28, 0x8a, 0x08, 0x00, - 0x4c, 0x26, 0x13, 0x09, 0xc0, 0x00, - 0x66, 0x33, 0x19, 0x9c, 0x60, 0x00, - 0x91, 0x48, 0xa4, 0x50, 0x38, 0x00, - 0x42, 0xa1, 0x50, 0xa4, 0x28, 0x00, - 0xa4, 0x52, 0x29, 0x0a, 0x50, 0x00, - 0x13, 0x09, 0x84, 0xd6, 0x80, 0x00, - 0x30, 0x98, 0x4c, 0x24, 0xd0, 0x00, - 0x88, 0xc4, 0x62, 0x2b, 0x08, 0x00, - 0x09, 0x04, 0x82, 0x43, 0x30, 0x00 -}; - -const uint8_t kMaskRandom37_34[204] = { - 0x2c, 0x16, 0x0b, 0x05, 0x80, 0x00, - 0x91, 0x48, 0xa4, 0x50, 0x30, 0x00, - 0xc0, 0xe0, 0x70, 0x34, 0x08, 0x00, - 0x06, 0x83, 0x41, 0xa0, 0xa8, 0x00, - 0xc8, 0x64, 0x32, 0x03, 0x10, 0x00, - 0x45, 0x22, 0x91, 0x58, 0x40, 0x00, - 0x30, 0x98, 0x4c, 0x24, 0x50, 0x00, - 0xa2, 0x51, 0x28, 0x8a, 0x08, 0x00, - 0x4c, 0x26, 0x13, 0x09, 0xc0, 0x00, - 0x66, 0x33, 0x19, 0x9c, 0x60, 0x00, - 0x91, 0x48, 0xa4, 0x50, 0x38, 0x00, - 0x42, 0xa1, 0x50, 0xa4, 0x28, 0x00, - 0xa4, 0x52, 0x29, 0x0a, 0x50, 0x00, - 0x13, 0x09, 0x84, 0xd6, 0x80, 0x00, - 0x30, 0x98, 0x4c, 0x24, 0xd0, 0x00, - 0x88, 0xc4, 0x62, 0x2b, 0x08, 0x00, - 0x09, 0x04, 0x82, 0x43, 0x30, 0x00, - 0x2c, 0x16, 0x0b, 0x05, 0x80, 0x00, - 0x91, 0x48, 0xa4, 0x50, 0x30, 0x00, - 0xc0, 0xe0, 0x70, 0x34, 0x08, 0x00, - 0x06, 0x83, 0x41, 0xa0, 0xa8, 0x00, - 0xc8, 0x64, 0x32, 0x03, 0x10, 0x00, - 0x45, 0x22, 0x91, 0x58, 0x40, 0x00, - 0x30, 0x98, 0x4c, 0x24, 0x50, 0x00, - 0xa2, 0x51, 0x28, 0x8a, 0x08, 0x00, - 0x8c, 0x46, 0x23, 0x08, 0xc0, 0x00, - 0x47, 0x23, 0x91, 0xc6, 0x60, 0x00, - 0x81, 0xc0, 0xe0, 0x62, 0x18, 0x00, - 0x12, 0x89, 0x44, 0xa1, 0x88, 0x00, - 0x58, 0x2c, 0x16, 0x05, 0x10, 0x00, - 0x28, 0x94, 0x4a, 0x32, 0x80, 0x00, - 0x34, 0x1a, 0x0d, 0x18, 0x20, 0x00, - 0xef, 0xf2, 0x1f, 0x9d, 0x78, 0x00, - 0x31, 0x9c, 0xfb, 0x37, 0xc0, 0x00 -}; - -const uint8_t kMaskRandom37_35[210] = { - 0x2c, 0x16, 0x0b, 0x05, 0x80, 0x00, - 0x91, 0x48, 0xa4, 0x50, 0x30, 0x00, - 0xc0, 0xe0, 0x70, 0x34, 0x08, 0x00, - 0x06, 0x83, 0x41, 0xa0, 0xa8, 0x00, - 0xc8, 0x64, 0x32, 0x03, 0x10, 0x00, - 0x45, 0x22, 0x91, 0x58, 0x40, 0x00, - 0x30, 0x98, 0x4c, 0x24, 0x50, 0x00, - 0xa2, 0x51, 0x28, 0x8a, 0x08, 0x00, - 0x4c, 0x26, 0x13, 0x09, 0xc0, 0x00, - 0x66, 0x33, 0x19, 0x9c, 0x60, 0x00, - 0x91, 0x48, 0xa4, 0x50, 0x38, 0x00, - 0x42, 0xa1, 0x50, 0xa4, 0x28, 0x00, - 0xa4, 0x52, 0x29, 0x0a, 0x50, 0x00, - 0x13, 0x09, 0x84, 0xd6, 0x80, 0x00, - 0x30, 0x98, 0x4c, 0x24, 0xd0, 0x00, - 0x88, 0xc4, 0x62, 0x2b, 0x08, 0x00, - 0x09, 0x04, 0x82, 0x43, 0x30, 0x00, - 0x4c, 0x26, 0x13, 0x09, 0xc0, 0x00, - 0x66, 0x33, 0x19, 0x9c, 0x60, 0x00, - 0x91, 0x48, 0xa4, 0x50, 0x38, 0x00, - 0x42, 0xa1, 0x50, 0xa4, 0x28, 0x00, - 0xa4, 0x52, 0x29, 0x0a, 0x50, 0x00, - 0x13, 0x09, 0x84, 0xd6, 0x80, 0x00, - 0x30, 0x98, 0x4c, 0x24, 0xd0, 0x00, - 0x88, 0xc4, 0x62, 0x2b, 0x08, 0x00, - 0x09, 0x04, 0x82, 0x43, 0x30, 0x00, - 0x2c, 0x16, 0x0b, 0x05, 0x80, 0x00, - 0x91, 0x48, 0xa4, 0x50, 0x30, 0x00, - 0xc0, 0xe0, 0x70, 0x34, 0x08, 0x00, - 0x06, 0x83, 0x41, 0xa0, 0xa8, 0x00, - 0xc8, 0x64, 0x32, 0x03, 0x10, 0x00, - 0x45, 0x22, 0x91, 0x58, 0x40, 0x00, - 0x30, 0x98, 0x4c, 0x24, 0x50, 0x00, - 0xa2, 0x51, 0x28, 0x8a, 0x08, 0x00, - 0xd0, 0x03, 0x54, 0x65, 0xc8, 0x00 -}; - -const uint8_t kMaskRandom37_36[216] = { - 0x4c, 0x26, 0x13, 0x09, 0xc0, 0x00, - 0x66, 0x33, 0x19, 0x9c, 0x60, 0x00, - 0x91, 0x48, 0xa4, 0x50, 0x38, 0x00, - 0x42, 0xa1, 0x50, 0xa4, 0x28, 0x00, - 0xa4, 0x52, 0x29, 0x0a, 0x50, 0x00, - 0x13, 0x09, 0x84, 0xd6, 0x80, 0x00, - 0x30, 0x98, 0x4c, 0x24, 0xd0, 0x00, - 0x88, 0xc4, 0x62, 0x2b, 0x08, 0x00, - 0x09, 0x04, 0x82, 0x43, 0x30, 0x00, - 0x2c, 0x16, 0x0b, 0x05, 0x80, 0x00, - 0x91, 0x48, 0xa4, 0x50, 0x30, 0x00, - 0xc0, 0xe0, 0x70, 0x34, 0x08, 0x00, - 0x06, 0x83, 0x41, 0xa0, 0xa8, 0x00, - 0xc8, 0x64, 0x32, 0x03, 0x10, 0x00, - 0x45, 0x22, 0x91, 0x58, 0x40, 0x00, - 0x30, 0x98, 0x4c, 0x24, 0x50, 0x00, - 0xa2, 0x51, 0x28, 0x8a, 0x08, 0x00, - 0xd0, 0x03, 0x54, 0x65, 0xc8, 0x00, - 0x2c, 0x16, 0x0b, 0x05, 0x80, 0x00, - 0x91, 0x48, 0xa4, 0x50, 0x30, 0x00, - 0xc0, 0xe0, 0x70, 0x34, 0x08, 0x00, - 0x06, 0x83, 0x41, 0xa0, 0xa8, 0x00, - 0xc8, 0x64, 0x32, 0x03, 0x10, 0x00, - 0x45, 0x22, 0x91, 0x58, 0x40, 0x00, - 0x30, 0x98, 0x4c, 0x24, 0x50, 0x00, - 0xa2, 0x51, 0x28, 0x8a, 0x08, 0x00, - 0x4c, 0x26, 0x13, 0x09, 0xc0, 0x00, - 0x66, 0x33, 0x19, 0x9c, 0x60, 0x00, - 0x91, 0x48, 0xa4, 0x50, 0x38, 0x00, - 0x42, 0xa1, 0x50, 0xa4, 0x28, 0x00, - 0xa4, 0x52, 0x29, 0x0a, 0x50, 0x00, - 0x13, 0x09, 0x84, 0xd6, 0x80, 0x00, - 0x30, 0x98, 0x4c, 0x24, 0xd0, 0x00, - 0x88, 0xc4, 0x62, 0x2b, 0x08, 0x00, - 0x09, 0x04, 0x82, 0x43, 0x30, 0x00, - 0xc3, 0xc7, 0xce, 0xd8, 0x50, 0x00 -}; - -const uint8_t kMaskRandom37_37[222] = { - 0x4c, 0x26, 0x13, 0x09, 0xc0, 0x00, - 0x66, 0x33, 0x19, 0x9c, 0x60, 0x00, - 0x91, 0x48, 0xa4, 0x50, 0x38, 0x00, - 0x42, 0xa1, 0x50, 0xa4, 0x28, 0x00, - 0xa4, 0x52, 0x29, 0x0a, 0x50, 0x00, - 0x13, 0x09, 0x84, 0xd6, 0x80, 0x00, - 0x30, 0x98, 0x4c, 0x24, 0xd0, 0x00, - 0x88, 0xc4, 0x62, 0x2b, 0x08, 0x00, - 0x09, 0x04, 0x82, 0x43, 0x30, 0x00, - 0x2c, 0x16, 0x0b, 0x05, 0x80, 0x00, - 0x91, 0x48, 0xa4, 0x50, 0x30, 0x00, - 0xc0, 0xe0, 0x70, 0x34, 0x08, 0x00, - 0x06, 0x83, 0x41, 0xa0, 0xa8, 0x00, - 0xc8, 0x64, 0x32, 0x03, 0x10, 0x00, - 0x45, 0x22, 0x91, 0x58, 0x40, 0x00, - 0x30, 0x98, 0x4c, 0x24, 0x50, 0x00, - 0xa2, 0x51, 0x28, 0x8a, 0x08, 0x00, - 0xd0, 0x03, 0x54, 0x65, 0xc8, 0x00, - 0x4c, 0x26, 0x13, 0x09, 0xc0, 0x00, - 0x66, 0x33, 0x19, 0x9c, 0x60, 0x00, - 0x91, 0x48, 0xa4, 0x50, 0x38, 0x00, - 0x42, 0xa1, 0x50, 0xa4, 0x28, 0x00, - 0xa4, 0x52, 0x29, 0x0a, 0x50, 0x00, - 0x13, 0x09, 0x84, 0xd6, 0x80, 0x00, - 0x30, 0x98, 0x4c, 0x24, 0xd0, 0x00, - 0x88, 0xc4, 0x62, 0x2b, 0x08, 0x00, - 0x09, 0x04, 0x82, 0x43, 0x30, 0x00, - 0x2c, 0x16, 0x13, 0x09, 0x80, 0x00, - 0x91, 0x48, 0x99, 0x8a, 0x20, 0x00, - 0xc0, 0xe0, 0x64, 0x54, 0x08, 0x00, - 0x06, 0x83, 0x50, 0xa0, 0x98, 0x00, - 0xc8, 0x64, 0x29, 0x00, 0x70, 0x00, - 0x45, 0x22, 0x84, 0xd0, 0xc0, 0x00, - 0x30, 0x98, 0x4c, 0x25, 0x20, 0x00, - 0xa2, 0x51, 0x22, 0x28, 0x48, 0x00, - 0xd0, 0x03, 0x42, 0x53, 0x00, 0x00, - 0xee, 0xf5, 0xb3, 0x66, 0x10, 0x00 -}; - -const uint8_t kMaskRandom37_4[24] = { - 0xec, 0x76, 0x3b, 0x1c, 0xc0, 0x00, - 0x67, 0x33, 0x99, 0xc6, 0x70, 0x00, - 0xb1, 0xd8, 0xec, 0x73, 0x18, 0x00, - 0x5a, 0xad, 0x56, 0xa5, 0xa8, 0x00 -}; - -const uint8_t kMaskRandom37_5[30] = { - 0x4c, 0xa6, 0x53, 0x39, 0xc0, 0x00, - 0x66, 0x33, 0x19, 0x8c, 0x70, 0x00, - 0x19, 0xd0, 0xe8, 0x73, 0x18, 0x00, - 0x9c, 0x89, 0x64, 0xa9, 0xa8, 0x00, - 0xe3, 0x4c, 0x2e, 0x26, 0x60, 0x00 -}; - -const uint8_t kMaskRandom37_6[36] = { - 0xcc, 0x26, 0x13, 0x0d, 0x80, 0x00, - 0x45, 0x62, 0x91, 0x5a, 0x20, 0x00, - 0xb0, 0x98, 0x4c, 0x34, 0x18, 0x00, - 0x8a, 0x85, 0x62, 0xa0, 0xa8, 0x00, - 0x29, 0x53, 0x09, 0x82, 0xd0, 0x00, - 0xa6, 0x0a, 0xa5, 0x51, 0x40, 0x00 -}; - -const uint8_t kMaskRandom37_7[42] = { - 0x44, 0xa2, 0x71, 0x28, 0xc0, 0x00, - 0x23, 0x11, 0x88, 0xc6, 0x60, 0x00, - 0x91, 0x48, 0xa4, 0x47, 0x08, 0x00, - 0x0a, 0x85, 0x52, 0xa0, 0xa8, 0x00, - 0x34, 0x1a, 0x0d, 0x12, 0x50, 0x00, - 0x0b, 0x06, 0xa2, 0xd2, 0x80, 0x00, - 0xe0, 0x64, 0x32, 0x09, 0x30, 0x00 -}; - -const uint8_t kMaskRandom37_8[48] = { - 0x16, 0x0b, 0x05, 0x84, 0xe0, 0x00, - 0xc2, 0x61, 0x30, 0x91, 0x30, 0x00, - 0x60, 0xb0, 0x58, 0x3a, 0x08, 0x00, - 0x85, 0x42, 0xa1, 0x44, 0x98, 0x00, - 0x4c, 0x26, 0x33, 0x08, 0x50, 0x00, - 0x29, 0x14, 0x8a, 0x58, 0xc0, 0x00, - 0x11, 0x88, 0xc4, 0x66, 0x30, 0x00, - 0xb0, 0x58, 0x2c, 0x03, 0x18, 0x00 -}; - -const uint8_t kMaskRandom37_9[54] = { - 0x44, 0xa2, 0x51, 0x29, 0xc0, 0x00, - 0x66, 0x26, 0x19, 0x9c, 0x20, 0x00, - 0x90, 0x49, 0x44, 0xb0, 0x38, 0x00, - 0x01, 0xa5, 0xb0, 0xc4, 0x28, 0x00, - 0x0e, 0x12, 0xa3, 0x0a, 0x50, 0x00, - 0x13, 0x0b, 0x04, 0x56, 0xc0, 0x00, - 0x20, 0xd0, 0x48, 0x64, 0xd0, 0x00, - 0xc2, 0x51, 0x28, 0x8b, 0x00, 0x00, - 0x29, 0x0c, 0x86, 0x03, 0x38, 0x00 -}; - -const uint8_t kMaskRandom38_1[6] = { - 0xff, 0xff, 0xff, 0xff, 0xfc, 0x00 -}; - -const uint8_t kMaskRandom38_10[60] = { - 0x8c, 0xe3, 0x11, 0x9c, 0x60, 0x00, - 0x27, 0x11, 0xc4, 0xe2, 0x38, 0x00, - 0x32, 0x8d, 0x26, 0x51, 0xa4, 0x00, - 0x61, 0x92, 0x6c, 0x32, 0x4c, 0x00, - 0x5c, 0x38, 0x8b, 0x87, 0x10, 0x00, - 0xcc, 0x75, 0x19, 0x8e, 0xa0, 0x00, - 0x2b, 0x19, 0xc5, 0x63, 0x38, 0x00, - 0x32, 0xd2, 0x66, 0x5a, 0x4c, 0x00, - 0x25, 0x8e, 0xa4, 0xb1, 0xd4, 0x00, - 0x50, 0x88, 0xca, 0x11, 0x18, 0x00 -}; - -const uint8_t kMaskRandom38_11[66] = { - 0x8c, 0xe3, 0x11, 0x9c, 0x60, 0x00, - 0x27, 0x11, 0xc4, 0xe2, 0x38, 0x00, - 0x32, 0x8d, 0x26, 0x51, 0xa4, 0x00, - 0x61, 0x92, 0x6c, 0x32, 0x4c, 0x00, - 0x5c, 0x38, 0x8b, 0x87, 0x10, 0x00, - 0x84, 0x87, 0x10, 0x90, 0xe0, 0x00, - 0x27, 0x19, 0x84, 0xe3, 0x30, 0x00, - 0x51, 0x88, 0x6a, 0x31, 0x0c, 0x00, - 0x1a, 0x22, 0xa3, 0x44, 0x54, 0x00, - 0x68, 0x44, 0x4d, 0x08, 0x88, 0x00, - 0x89, 0x70, 0x11, 0x2e, 0x00, 0x00 -}; - -const uint8_t kMaskRandom38_12[72] = { - 0x84, 0x87, 0x10, 0x90, 0xe0, 0x00, - 0x27, 0x19, 0x84, 0xe3, 0x30, 0x00, - 0x51, 0x88, 0x6a, 0x31, 0x0c, 0x00, - 0x1a, 0x22, 0xa3, 0x44, 0x54, 0x00, - 0x68, 0x44, 0x4d, 0x08, 0x88, 0x00, - 0x89, 0x70, 0x11, 0x2e, 0x00, 0x00, - 0x8c, 0xe3, 0x11, 0x9c, 0x60, 0x00, - 0x27, 0x11, 0xc4, 0xe2, 0x38, 0x00, - 0x32, 0x8d, 0x26, 0x51, 0xa4, 0x00, - 0x61, 0x92, 0x6c, 0x32, 0x4c, 0x00, - 0x5c, 0x38, 0x8b, 0x87, 0x10, 0x00, - 0x90, 0xc8, 0x92, 0x19, 0x10, 0x00 -}; - -const uint8_t kMaskRandom38_13[78] = { - 0x84, 0x87, 0x10, 0x90, 0xe0, 0x00, - 0x27, 0x19, 0x84, 0xe3, 0x30, 0x00, - 0x51, 0x88, 0x6a, 0x31, 0x0c, 0x00, - 0x1a, 0x22, 0xa3, 0x44, 0x54, 0x00, - 0x68, 0x44, 0x4d, 0x08, 0x88, 0x00, - 0x89, 0x70, 0x11, 0x2e, 0x00, 0x00, - 0x8c, 0x23, 0x11, 0x84, 0x60, 0x00, - 0x47, 0x19, 0x88, 0xe3, 0x30, 0x00, - 0x81, 0x88, 0x70, 0x31, 0x0c, 0x00, - 0x12, 0x86, 0x22, 0x50, 0xc4, 0x00, - 0x58, 0x14, 0x4b, 0x02, 0x88, 0x00, - 0x28, 0xca, 0x05, 0x19, 0x40, 0x00, - 0x34, 0x60, 0x86, 0x8c, 0x10, 0x00 -}; - -const uint8_t kMaskRandom38_14[84] = { - 0x8c, 0x23, 0x11, 0x84, 0x60, 0x00, - 0x47, 0x19, 0x88, 0xe3, 0x30, 0x00, - 0x81, 0x88, 0x70, 0x31, 0x0c, 0x00, - 0x12, 0x86, 0x22, 0x50, 0xc4, 0x00, - 0x58, 0x14, 0x4b, 0x02, 0x88, 0x00, - 0x28, 0xca, 0x05, 0x19, 0x40, 0x00, - 0x34, 0x60, 0x86, 0x8c, 0x10, 0x00, - 0x84, 0x87, 0x10, 0x90, 0xe0, 0x00, - 0x27, 0x19, 0x84, 0xe3, 0x30, 0x00, - 0x51, 0x88, 0x6a, 0x31, 0x0c, 0x00, - 0x1a, 0x22, 0xa3, 0x44, 0x54, 0x00, - 0x68, 0x44, 0x4d, 0x08, 0x88, 0x00, - 0x89, 0x70, 0x11, 0x2e, 0x00, 0x00, - 0x6e, 0x27, 0x6d, 0xc4, 0xec, 0x00 -}; - -const uint8_t kMaskRandom38_15[90] = { - 0x8c, 0x23, 0x11, 0x84, 0x60, 0x00, - 0x47, 0x19, 0x88, 0xe3, 0x30, 0x00, - 0x81, 0x88, 0x70, 0x31, 0x0c, 0x00, - 0x12, 0x86, 0x22, 0x50, 0xc4, 0x00, - 0x58, 0x14, 0x4b, 0x02, 0x88, 0x00, - 0x28, 0xca, 0x05, 0x19, 0x40, 0x00, - 0x34, 0x60, 0x86, 0x8c, 0x10, 0x00, - 0x2c, 0x16, 0x05, 0x82, 0xc0, 0x00, - 0x91, 0x40, 0xd2, 0x28, 0x18, 0x00, - 0xc0, 0xd0, 0x38, 0x1a, 0x04, 0x00, - 0x06, 0x82, 0xa0, 0xd0, 0x54, 0x00, - 0xc8, 0x0c, 0x59, 0x01, 0x88, 0x00, - 0x45, 0x61, 0x08, 0xac, 0x20, 0x00, - 0x30, 0x91, 0x46, 0x12, 0x28, 0x00, - 0xa2, 0x28, 0x34, 0x45, 0x04, 0x00 -}; - -const uint8_t kMaskRandom38_16[96] = { - 0x2c, 0x16, 0x05, 0x82, 0xc0, 0x00, - 0x91, 0x40, 0xd2, 0x28, 0x18, 0x00, - 0xc0, 0xd0, 0x38, 0x1a, 0x04, 0x00, - 0x06, 0x82, 0xa0, 0xd0, 0x54, 0x00, - 0xc8, 0x0c, 0x59, 0x01, 0x88, 0x00, - 0x45, 0x61, 0x08, 0xac, 0x20, 0x00, - 0x30, 0x91, 0x46, 0x12, 0x28, 0x00, - 0xa2, 0x28, 0x34, 0x45, 0x04, 0x00, - 0x8c, 0x23, 0x11, 0x84, 0x60, 0x00, - 0x47, 0x19, 0x88, 0xe3, 0x30, 0x00, - 0x81, 0x88, 0x70, 0x31, 0x0c, 0x00, - 0x12, 0x86, 0x22, 0x50, 0xc4, 0x00, - 0x58, 0x14, 0x4b, 0x02, 0x88, 0x00, - 0x28, 0xca, 0x05, 0x19, 0x40, 0x00, - 0x34, 0x60, 0x86, 0x8c, 0x10, 0x00, - 0x7e, 0x75, 0xef, 0xce, 0xbc, 0x00 -}; - -const uint8_t kMaskRandom38_17[102] = { - 0x2c, 0x16, 0x05, 0x82, 0xc0, 0x00, - 0x91, 0x40, 0xd2, 0x28, 0x18, 0x00, - 0xc0, 0xd0, 0x38, 0x1a, 0x04, 0x00, - 0x06, 0x82, 0xa0, 0xd0, 0x54, 0x00, - 0xc8, 0x0c, 0x59, 0x01, 0x88, 0x00, - 0x45, 0x61, 0x08, 0xac, 0x20, 0x00, - 0x30, 0x91, 0x46, 0x12, 0x28, 0x00, - 0xa2, 0x28, 0x34, 0x45, 0x04, 0x00, - 0x4c, 0x27, 0x09, 0x84, 0xe0, 0x00, - 0x66, 0x71, 0x8c, 0xce, 0x30, 0x00, - 0x91, 0x40, 0xf2, 0x28, 0x1c, 0x00, - 0x42, 0x90, 0xa8, 0x52, 0x14, 0x00, - 0xa4, 0x29, 0x54, 0x85, 0x28, 0x00, - 0x13, 0x5a, 0x02, 0x6b, 0x40, 0x00, - 0x30, 0x93, 0x46, 0x12, 0x68, 0x00, - 0x88, 0xac, 0x31, 0x15, 0x84, 0x00, - 0x09, 0x0c, 0xc1, 0x21, 0x98, 0x00 -}; - -const uint8_t kMaskRandom38_18[108] = { - 0x4c, 0x27, 0x09, 0x84, 0xe0, 0x00, - 0x66, 0x71, 0x8c, 0xce, 0x30, 0x00, - 0x91, 0x40, 0xf2, 0x28, 0x1c, 0x00, - 0x42, 0x90, 0xa8, 0x52, 0x14, 0x00, - 0xa4, 0x29, 0x54, 0x85, 0x28, 0x00, - 0x13, 0x5a, 0x02, 0x6b, 0x40, 0x00, - 0x30, 0x93, 0x46, 0x12, 0x68, 0x00, - 0x88, 0xac, 0x31, 0x15, 0x84, 0x00, - 0x09, 0x0c, 0xc1, 0x21, 0x98, 0x00, - 0x2c, 0x16, 0x05, 0x82, 0xc0, 0x00, - 0x91, 0x40, 0xd2, 0x28, 0x18, 0x00, - 0xc0, 0xd0, 0x38, 0x1a, 0x04, 0x00, - 0x06, 0x82, 0xa0, 0xd0, 0x54, 0x00, - 0xc8, 0x0c, 0x59, 0x01, 0x88, 0x00, - 0x45, 0x61, 0x08, 0xac, 0x20, 0x00, - 0x30, 0x91, 0x46, 0x12, 0x28, 0x00, - 0xa2, 0x28, 0x34, 0x45, 0x04, 0x00, - 0x51, 0x97, 0x2a, 0x32, 0xe4, 0x00 -}; - -const uint8_t kMaskRandom38_19[114] = { - 0x4c, 0x27, 0x09, 0x84, 0xe0, 0x00, - 0x66, 0x71, 0x8c, 0xce, 0x30, 0x00, - 0x91, 0x40, 0xf2, 0x28, 0x1c, 0x00, - 0x42, 0x90, 0xa8, 0x52, 0x14, 0x00, - 0xa4, 0x29, 0x54, 0x85, 0x28, 0x00, - 0x13, 0x5a, 0x02, 0x6b, 0x40, 0x00, - 0x30, 0x93, 0x46, 0x12, 0x68, 0x00, - 0x88, 0xac, 0x31, 0x15, 0x84, 0x00, - 0x09, 0x0c, 0xc1, 0x21, 0x98, 0x00, - 0x4c, 0x26, 0x09, 0x84, 0xc0, 0x00, - 0x66, 0x28, 0x8c, 0xc5, 0x10, 0x00, - 0x91, 0x50, 0x32, 0x2a, 0x04, 0x00, - 0x42, 0x82, 0x68, 0x50, 0x4c, 0x00, - 0xa4, 0x01, 0xd4, 0x80, 0x38, 0x00, - 0x13, 0x43, 0x02, 0x68, 0x60, 0x00, - 0x30, 0x94, 0x86, 0x12, 0x90, 0x00, - 0x88, 0xa1, 0x31, 0x14, 0x24, 0x00, - 0x09, 0x4c, 0x01, 0x29, 0x80, 0x00, - 0xcd, 0x98, 0x59, 0xb3, 0x08, 0x00 -}; - -const uint8_t kMaskRandom38_2[12] = { - 0xce, 0x77, 0x19, 0xce, 0xe0, 0x00, - 0x39, 0xcc, 0xe7, 0x39, 0x9c, 0x00 -}; - -const uint8_t kMaskRandom38_20[120] = { - 0x8c, 0xe3, 0x11, 0x9c, 0x60, 0x00, - 0x27, 0x11, 0xc4, 0xe2, 0x38, 0x00, - 0x32, 0x8d, 0x26, 0x51, 0xa4, 0x00, - 0x61, 0x92, 0x6c, 0x32, 0x4c, 0x00, - 0x5c, 0x38, 0x8b, 0x87, 0x10, 0x00, - 0xcc, 0x75, 0x19, 0x8e, 0xa0, 0x00, - 0x2b, 0x19, 0xc5, 0x63, 0x38, 0x00, - 0x32, 0xd2, 0x66, 0x5a, 0x4c, 0x00, - 0x25, 0x8e, 0xa4, 0xb1, 0xd4, 0x00, - 0x50, 0x88, 0xca, 0x11, 0x18, 0x00, - 0x44, 0xa7, 0x08, 0x94, 0xe0, 0x00, - 0x66, 0x70, 0x8c, 0xce, 0x10, 0x00, - 0x12, 0xc0, 0xe2, 0x58, 0x1c, 0x00, - 0xc3, 0x10, 0xb8, 0x62, 0x14, 0x00, - 0x8c, 0x29, 0x51, 0x85, 0x28, 0x00, - 0x11, 0x5b, 0x02, 0x2b, 0x60, 0x00, - 0x21, 0x93, 0x44, 0x32, 0x68, 0x00, - 0xa2, 0x2c, 0x14, 0x45, 0x80, 0x00, - 0x18, 0x0c, 0xe3, 0x01, 0x9c, 0x00, - 0xe6, 0xbc, 0x88, 0xe3, 0x78, 0x00 -}; - -const uint8_t kMaskRandom38_21[126] = { - 0x8c, 0xe3, 0x11, 0x9c, 0x60, 0x00, - 0x27, 0x11, 0xc4, 0xe2, 0x38, 0x00, - 0x32, 0x8d, 0x26, 0x51, 0xa4, 0x00, - 0x61, 0x92, 0x6c, 0x32, 0x4c, 0x00, - 0x5c, 0x38, 0x8b, 0x87, 0x10, 0x00, - 0xcc, 0x75, 0x19, 0x8e, 0xa0, 0x00, - 0x2b, 0x19, 0xc5, 0x63, 0x38, 0x00, - 0x32, 0xd2, 0x66, 0x5a, 0x4c, 0x00, - 0x25, 0x8e, 0xa4, 0xb1, 0xd4, 0x00, - 0x50, 0x88, 0xca, 0x11, 0x18, 0x00, - 0x8c, 0xe3, 0x11, 0x9c, 0x60, 0x00, - 0x27, 0x11, 0xc4, 0xe2, 0x38, 0x00, - 0x32, 0x8d, 0x26, 0x51, 0xa4, 0x00, - 0x61, 0x92, 0x6c, 0x32, 0x4c, 0x00, - 0x5c, 0x38, 0x8b, 0x87, 0x10, 0x00, - 0x84, 0x87, 0x10, 0x90, 0xe0, 0x00, - 0x27, 0x19, 0x84, 0xe3, 0x30, 0x00, - 0x51, 0x88, 0x6a, 0x31, 0x0c, 0x00, - 0x1a, 0x22, 0xa3, 0x44, 0x54, 0x00, - 0x68, 0x44, 0x4d, 0x08, 0x88, 0x00, - 0x89, 0x70, 0x11, 0x2e, 0x00, 0x00 -}; - -const uint8_t kMaskRandom38_22[132] = { - 0x8c, 0xe3, 0x11, 0x9c, 0x60, 0x00, - 0x27, 0x11, 0xc4, 0xe2, 0x38, 0x00, - 0x32, 0x8d, 0x26, 0x51, 0xa4, 0x00, - 0x61, 0x92, 0x6c, 0x32, 0x4c, 0x00, - 0x5c, 0x38, 0x8b, 0x87, 0x10, 0x00, - 0x84, 0x87, 0x10, 0x90, 0xe0, 0x00, - 0x27, 0x19, 0x84, 0xe3, 0x30, 0x00, - 0x51, 0x88, 0x6a, 0x31, 0x0c, 0x00, - 0x1a, 0x22, 0xa3, 0x44, 0x54, 0x00, - 0x68, 0x44, 0x4d, 0x08, 0x88, 0x00, - 0x89, 0x70, 0x11, 0x2e, 0x00, 0x00, - 0x8c, 0xe3, 0x11, 0x9c, 0x60, 0x00, - 0x27, 0x11, 0xc4, 0xe2, 0x38, 0x00, - 0x32, 0x8d, 0x26, 0x51, 0xa4, 0x00, - 0x61, 0x92, 0x6c, 0x32, 0x4c, 0x00, - 0x5c, 0x38, 0x8b, 0x87, 0x10, 0x00, - 0xcc, 0x75, 0x19, 0x8e, 0xa0, 0x00, - 0x2b, 0x19, 0xc5, 0x63, 0x38, 0x00, - 0x32, 0xd2, 0x66, 0x5a, 0x4c, 0x00, - 0x25, 0x8e, 0xa4, 0xb1, 0xd4, 0x00, - 0x50, 0x88, 0xca, 0x11, 0x18, 0x00, - 0x0c, 0x3c, 0x48, 0x3d, 0x58, 0x00 -}; - -const uint8_t kMaskRandom38_23[138] = { - 0x8c, 0xe3, 0x11, 0x9c, 0x60, 0x00, - 0x27, 0x11, 0xc4, 0xe2, 0x38, 0x00, - 0x32, 0x8d, 0x26, 0x51, 0xa4, 0x00, - 0x61, 0x92, 0x6c, 0x32, 0x4c, 0x00, - 0x5c, 0x38, 0x8b, 0x87, 0x10, 0x00, - 0x84, 0x87, 0x10, 0x90, 0xe0, 0x00, - 0x27, 0x19, 0x84, 0xe3, 0x30, 0x00, - 0x51, 0x88, 0x6a, 0x31, 0x0c, 0x00, - 0x1a, 0x22, 0xa3, 0x44, 0x54, 0x00, - 0x68, 0x44, 0x4d, 0x08, 0x88, 0x00, - 0x89, 0x70, 0x11, 0x2e, 0x00, 0x00, - 0x84, 0x87, 0x10, 0x90, 0xe0, 0x00, - 0x27, 0x19, 0x84, 0xe3, 0x30, 0x00, - 0x51, 0x88, 0x6a, 0x31, 0x0c, 0x00, - 0x1a, 0x22, 0xa3, 0x44, 0x54, 0x00, - 0x68, 0x44, 0x4d, 0x08, 0x88, 0x00, - 0x89, 0x70, 0x11, 0x2e, 0x00, 0x00, - 0x8c, 0xe3, 0x11, 0x9c, 0x60, 0x00, - 0x27, 0x11, 0xc4, 0xe2, 0x38, 0x00, - 0x32, 0x8d, 0x26, 0x51, 0xa4, 0x00, - 0x61, 0x92, 0x6c, 0x32, 0x4c, 0x00, - 0x5c, 0x38, 0x8b, 0x87, 0x10, 0x00, - 0x90, 0xc8, 0x92, 0x19, 0x10, 0x00 -}; - -const uint8_t kMaskRandom38_24[144] = { - 0x84, 0x87, 0x10, 0x90, 0xe0, 0x00, - 0x27, 0x19, 0x84, 0xe3, 0x30, 0x00, - 0x51, 0x88, 0x6a, 0x31, 0x0c, 0x00, - 0x1a, 0x22, 0xa3, 0x44, 0x54, 0x00, - 0x68, 0x44, 0x4d, 0x08, 0x88, 0x00, - 0x89, 0x70, 0x11, 0x2e, 0x00, 0x00, - 0x8c, 0xe3, 0x11, 0x9c, 0x60, 0x00, - 0x27, 0x11, 0xc4, 0xe2, 0x38, 0x00, - 0x32, 0x8d, 0x26, 0x51, 0xa4, 0x00, - 0x61, 0x92, 0x6c, 0x32, 0x4c, 0x00, - 0x5c, 0x38, 0x8b, 0x87, 0x10, 0x00, - 0x90, 0xc8, 0x92, 0x19, 0x10, 0x00, - 0x8c, 0xe3, 0x11, 0x9c, 0x60, 0x00, - 0x27, 0x11, 0xc4, 0xe2, 0x38, 0x00, - 0x32, 0x8d, 0x26, 0x51, 0xa4, 0x00, - 0x61, 0x92, 0x6c, 0x32, 0x4c, 0x00, - 0x5c, 0x38, 0x8b, 0x87, 0x10, 0x00, - 0x84, 0x87, 0x10, 0x90, 0xe0, 0x00, - 0x27, 0x19, 0x84, 0xe3, 0x30, 0x00, - 0x51, 0x88, 0x6a, 0x31, 0x0c, 0x00, - 0x1a, 0x22, 0xa3, 0x44, 0x54, 0x00, - 0x68, 0x44, 0x4d, 0x08, 0x88, 0x00, - 0x89, 0x70, 0x11, 0x2e, 0x00, 0x00, - 0x93, 0xc8, 0xb3, 0xbe, 0x5c, 0x00 -}; - -const uint8_t kMaskRandom38_25[150] = { - 0x84, 0x87, 0x10, 0x90, 0xe0, 0x00, - 0x27, 0x19, 0x84, 0xe3, 0x30, 0x00, - 0x51, 0x88, 0x6a, 0x31, 0x0c, 0x00, - 0x1a, 0x22, 0xa3, 0x44, 0x54, 0x00, - 0x68, 0x44, 0x4d, 0x08, 0x88, 0x00, - 0x89, 0x70, 0x11, 0x2e, 0x00, 0x00, - 0x8c, 0xe3, 0x11, 0x9c, 0x60, 0x00, - 0x27, 0x11, 0xc4, 0xe2, 0x38, 0x00, - 0x32, 0x8d, 0x26, 0x51, 0xa4, 0x00, - 0x61, 0x92, 0x6c, 0x32, 0x4c, 0x00, - 0x5c, 0x38, 0x8b, 0x87, 0x10, 0x00, - 0x90, 0xc8, 0x92, 0x19, 0x10, 0x00, - 0x84, 0x87, 0x10, 0x90, 0xe0, 0x00, - 0x27, 0x19, 0x84, 0xe3, 0x30, 0x00, - 0x51, 0x88, 0x6a, 0x31, 0x0c, 0x00, - 0x1a, 0x22, 0xa3, 0x44, 0x54, 0x00, - 0x68, 0x44, 0x4d, 0x08, 0x88, 0x00, - 0x89, 0x70, 0x11, 0x2e, 0x00, 0x00, - 0x8c, 0x23, 0x11, 0x84, 0x60, 0x00, - 0x47, 0x19, 0x88, 0xe3, 0x30, 0x00, - 0x81, 0x88, 0x70, 0x31, 0x0c, 0x00, - 0x12, 0x86, 0x22, 0x50, 0xc4, 0x00, - 0x58, 0x14, 0x4b, 0x02, 0x88, 0x00, - 0x28, 0xca, 0x05, 0x19, 0x40, 0x00, - 0x34, 0x60, 0x86, 0x8c, 0x10, 0x00 -}; - -const uint8_t kMaskRandom38_26[156] = { - 0x84, 0x87, 0x10, 0x90, 0xe0, 0x00, - 0x27, 0x19, 0x84, 0xe3, 0x30, 0x00, - 0x51, 0x88, 0x6a, 0x31, 0x0c, 0x00, - 0x1a, 0x22, 0xa3, 0x44, 0x54, 0x00, - 0x68, 0x44, 0x4d, 0x08, 0x88, 0x00, - 0x89, 0x70, 0x11, 0x2e, 0x00, 0x00, - 0x8c, 0x23, 0x11, 0x84, 0x60, 0x00, - 0x47, 0x19, 0x88, 0xe3, 0x30, 0x00, - 0x81, 0x88, 0x70, 0x31, 0x0c, 0x00, - 0x12, 0x86, 0x22, 0x50, 0xc4, 0x00, - 0x58, 0x14, 0x4b, 0x02, 0x88, 0x00, - 0x28, 0xca, 0x05, 0x19, 0x40, 0x00, - 0x34, 0x60, 0x86, 0x8c, 0x10, 0x00, - 0x84, 0x87, 0x10, 0x90, 0xe0, 0x00, - 0x27, 0x19, 0x84, 0xe3, 0x30, 0x00, - 0x51, 0x88, 0x6a, 0x31, 0x0c, 0x00, - 0x1a, 0x22, 0xa3, 0x44, 0x54, 0x00, - 0x68, 0x44, 0x4d, 0x08, 0x88, 0x00, - 0x89, 0x70, 0x11, 0x2e, 0x00, 0x00, - 0x8c, 0xe3, 0x11, 0x9c, 0x60, 0x00, - 0x27, 0x11, 0xc4, 0xe2, 0x38, 0x00, - 0x32, 0x8d, 0x26, 0x51, 0xa4, 0x00, - 0x61, 0x92, 0x6c, 0x32, 0x4c, 0x00, - 0x5c, 0x38, 0x8b, 0x87, 0x10, 0x00, - 0x90, 0xc8, 0x92, 0x19, 0x10, 0x00, - 0x4b, 0xab, 0xfc, 0xe6, 0xe8, 0x00 -}; - -const uint8_t kMaskRandom38_27[162] = { - 0x84, 0x87, 0x10, 0x90, 0xe0, 0x00, - 0x27, 0x19, 0x84, 0xe3, 0x30, 0x00, - 0x51, 0x88, 0x6a, 0x31, 0x0c, 0x00, - 0x1a, 0x22, 0xa3, 0x44, 0x54, 0x00, - 0x68, 0x44, 0x4d, 0x08, 0x88, 0x00, - 0x89, 0x70, 0x11, 0x2e, 0x00, 0x00, - 0x8c, 0x23, 0x11, 0x84, 0x60, 0x00, - 0x47, 0x19, 0x88, 0xe3, 0x30, 0x00, - 0x81, 0x88, 0x70, 0x31, 0x0c, 0x00, - 0x12, 0x86, 0x22, 0x50, 0xc4, 0x00, - 0x58, 0x14, 0x4b, 0x02, 0x88, 0x00, - 0x28, 0xca, 0x05, 0x19, 0x40, 0x00, - 0x34, 0x60, 0x86, 0x8c, 0x10, 0x00, - 0x8c, 0x23, 0x11, 0x84, 0x60, 0x00, - 0x47, 0x19, 0x88, 0xe3, 0x30, 0x00, - 0x81, 0x88, 0x70, 0x31, 0x0c, 0x00, - 0x12, 0x86, 0x22, 0x50, 0xc4, 0x00, - 0x58, 0x14, 0x4b, 0x02, 0x88, 0x00, - 0x28, 0xca, 0x05, 0x19, 0x40, 0x00, - 0x34, 0x60, 0x86, 0x8c, 0x10, 0x00, - 0x84, 0x87, 0x10, 0x90, 0xe0, 0x00, - 0x27, 0x19, 0x84, 0xe3, 0x30, 0x00, - 0x51, 0x88, 0x6a, 0x31, 0x0c, 0x00, - 0x1a, 0x22, 0xa3, 0x44, 0x54, 0x00, - 0x68, 0x44, 0x4d, 0x08, 0x88, 0x00, - 0x89, 0x70, 0x11, 0x2e, 0x00, 0x00, - 0x6e, 0x27, 0x6d, 0xc4, 0xec, 0x00 -}; - -const uint8_t kMaskRandom38_28[168] = { - 0x8c, 0x23, 0x11, 0x84, 0x60, 0x00, - 0x47, 0x19, 0x88, 0xe3, 0x30, 0x00, - 0x81, 0x88, 0x70, 0x31, 0x0c, 0x00, - 0x12, 0x86, 0x22, 0x50, 0xc4, 0x00, - 0x58, 0x14, 0x4b, 0x02, 0x88, 0x00, - 0x28, 0xca, 0x05, 0x19, 0x40, 0x00, - 0x34, 0x60, 0x86, 0x8c, 0x10, 0x00, - 0x84, 0x87, 0x10, 0x90, 0xe0, 0x00, - 0x27, 0x19, 0x84, 0xe3, 0x30, 0x00, - 0x51, 0x88, 0x6a, 0x31, 0x0c, 0x00, - 0x1a, 0x22, 0xa3, 0x44, 0x54, 0x00, - 0x68, 0x44, 0x4d, 0x08, 0x88, 0x00, - 0x89, 0x70, 0x11, 0x2e, 0x00, 0x00, - 0x6e, 0x27, 0x6d, 0xc4, 0xec, 0x00, - 0x84, 0x87, 0x10, 0x90, 0xe0, 0x00, - 0x27, 0x19, 0x84, 0xe3, 0x30, 0x00, - 0x51, 0x88, 0x6a, 0x31, 0x0c, 0x00, - 0x1a, 0x22, 0xa3, 0x44, 0x54, 0x00, - 0x68, 0x44, 0x4d, 0x08, 0x88, 0x00, - 0x89, 0x70, 0x11, 0x2e, 0x00, 0x00, - 0x8c, 0x23, 0x11, 0x84, 0x60, 0x00, - 0x47, 0x19, 0x88, 0xe3, 0x30, 0x00, - 0x81, 0x88, 0x70, 0x31, 0x0c, 0x00, - 0x12, 0x86, 0x22, 0x50, 0xc4, 0x00, - 0x58, 0x14, 0x4b, 0x02, 0x88, 0x00, - 0x28, 0xca, 0x05, 0x19, 0x40, 0x00, - 0x34, 0x60, 0x86, 0x8c, 0x10, 0x00, - 0x70, 0x1b, 0x5b, 0x2c, 0x0c, 0x00 -}; - -const uint8_t kMaskRandom38_29[174] = { - 0x8c, 0x23, 0x11, 0x84, 0x60, 0x00, - 0x47, 0x19, 0x88, 0xe3, 0x30, 0x00, - 0x81, 0x88, 0x70, 0x31, 0x0c, 0x00, - 0x12, 0x86, 0x22, 0x50, 0xc4, 0x00, - 0x58, 0x14, 0x4b, 0x02, 0x88, 0x00, - 0x28, 0xca, 0x05, 0x19, 0x40, 0x00, - 0x34, 0x60, 0x86, 0x8c, 0x10, 0x00, - 0x84, 0x87, 0x10, 0x90, 0xe0, 0x00, - 0x27, 0x19, 0x84, 0xe3, 0x30, 0x00, - 0x51, 0x88, 0x6a, 0x31, 0x0c, 0x00, - 0x1a, 0x22, 0xa3, 0x44, 0x54, 0x00, - 0x68, 0x44, 0x4d, 0x08, 0x88, 0x00, - 0x89, 0x70, 0x11, 0x2e, 0x00, 0x00, - 0x6e, 0x27, 0x6d, 0xc4, 0xec, 0x00, - 0x8c, 0x23, 0x11, 0x84, 0x60, 0x00, - 0x47, 0x19, 0x88, 0xe3, 0x30, 0x00, - 0x81, 0x88, 0x70, 0x31, 0x0c, 0x00, - 0x12, 0x86, 0x22, 0x50, 0xc4, 0x00, - 0x58, 0x14, 0x4b, 0x02, 0x88, 0x00, - 0x28, 0xca, 0x05, 0x19, 0x40, 0x00, - 0x34, 0x60, 0x86, 0x8c, 0x10, 0x00, - 0x2c, 0x16, 0x05, 0x82, 0xc0, 0x00, - 0x91, 0x40, 0xd2, 0x28, 0x18, 0x00, - 0xc0, 0xd0, 0x38, 0x1a, 0x04, 0x00, - 0x06, 0x82, 0xa0, 0xd0, 0x54, 0x00, - 0xc8, 0x0c, 0x59, 0x01, 0x88, 0x00, - 0x45, 0x61, 0x08, 0xac, 0x20, 0x00, - 0x30, 0x91, 0x46, 0x12, 0x28, 0x00, - 0xa2, 0x28, 0x34, 0x45, 0x04, 0x00 -}; - -const uint8_t kMaskRandom38_3[18] = { - 0xcc, 0x67, 0x19, 0x8c, 0xe0, 0x00, - 0x27, 0x2c, 0xc4, 0xe5, 0x98, 0x00, - 0x92, 0xd2, 0x72, 0x5a, 0x4c, 0x00 -}; - -const uint8_t kMaskRandom38_30[180] = { - 0x8c, 0x23, 0x11, 0x84, 0x60, 0x00, - 0x47, 0x19, 0x88, 0xe3, 0x30, 0x00, - 0x81, 0x88, 0x70, 0x31, 0x0c, 0x00, - 0x12, 0x86, 0x22, 0x50, 0xc4, 0x00, - 0x58, 0x14, 0x4b, 0x02, 0x88, 0x00, - 0x28, 0xca, 0x05, 0x19, 0x40, 0x00, - 0x34, 0x60, 0x86, 0x8c, 0x10, 0x00, - 0x2c, 0x16, 0x05, 0x82, 0xc0, 0x00, - 0x91, 0x40, 0xd2, 0x28, 0x18, 0x00, - 0xc0, 0xd0, 0x38, 0x1a, 0x04, 0x00, - 0x06, 0x82, 0xa0, 0xd0, 0x54, 0x00, - 0xc8, 0x0c, 0x59, 0x01, 0x88, 0x00, - 0x45, 0x61, 0x08, 0xac, 0x20, 0x00, - 0x30, 0x91, 0x46, 0x12, 0x28, 0x00, - 0xa2, 0x28, 0x34, 0x45, 0x04, 0x00, - 0x8c, 0x23, 0x11, 0x84, 0x60, 0x00, - 0x47, 0x19, 0x88, 0xe3, 0x30, 0x00, - 0x81, 0x88, 0x70, 0x31, 0x0c, 0x00, - 0x12, 0x86, 0x22, 0x50, 0xc4, 0x00, - 0x58, 0x14, 0x4b, 0x02, 0x88, 0x00, - 0x28, 0xca, 0x05, 0x19, 0x40, 0x00, - 0x34, 0x60, 0x86, 0x8c, 0x10, 0x00, - 0x84, 0x87, 0x10, 0x90, 0xe0, 0x00, - 0x27, 0x19, 0x84, 0xe3, 0x30, 0x00, - 0x51, 0x88, 0x6a, 0x31, 0x0c, 0x00, - 0x1a, 0x22, 0xa3, 0x44, 0x54, 0x00, - 0x68, 0x44, 0x4d, 0x08, 0x88, 0x00, - 0x89, 0x70, 0x11, 0x2e, 0x00, 0x00, - 0x6e, 0x27, 0x6d, 0xc4, 0xec, 0x00, - 0x5b, 0x16, 0xdf, 0xb8, 0xd0, 0x00 -}; - -const uint8_t kMaskRandom38_31[186] = { - 0x8c, 0x23, 0x11, 0x84, 0x60, 0x00, - 0x47, 0x19, 0x88, 0xe3, 0x30, 0x00, - 0x81, 0x88, 0x70, 0x31, 0x0c, 0x00, - 0x12, 0x86, 0x22, 0x50, 0xc4, 0x00, - 0x58, 0x14, 0x4b, 0x02, 0x88, 0x00, - 0x28, 0xca, 0x05, 0x19, 0x40, 0x00, - 0x34, 0x60, 0x86, 0x8c, 0x10, 0x00, - 0x2c, 0x16, 0x05, 0x82, 0xc0, 0x00, - 0x91, 0x40, 0xd2, 0x28, 0x18, 0x00, - 0xc0, 0xd0, 0x38, 0x1a, 0x04, 0x00, - 0x06, 0x82, 0xa0, 0xd0, 0x54, 0x00, - 0xc8, 0x0c, 0x59, 0x01, 0x88, 0x00, - 0x45, 0x61, 0x08, 0xac, 0x20, 0x00, - 0x30, 0x91, 0x46, 0x12, 0x28, 0x00, - 0xa2, 0x28, 0x34, 0x45, 0x04, 0x00, - 0x2c, 0x16, 0x05, 0x82, 0xc0, 0x00, - 0x91, 0x40, 0xd2, 0x28, 0x18, 0x00, - 0xc0, 0xd0, 0x38, 0x1a, 0x04, 0x00, - 0x06, 0x82, 0xa0, 0xd0, 0x54, 0x00, - 0xc8, 0x0c, 0x59, 0x01, 0x88, 0x00, - 0x45, 0x61, 0x08, 0xac, 0x20, 0x00, - 0x30, 0x91, 0x46, 0x12, 0x28, 0x00, - 0xa2, 0x28, 0x34, 0x45, 0x04, 0x00, - 0x8c, 0x23, 0x11, 0x84, 0x60, 0x00, - 0x47, 0x19, 0x88, 0xe3, 0x30, 0x00, - 0x81, 0x88, 0x70, 0x31, 0x0c, 0x00, - 0x12, 0x86, 0x22, 0x50, 0xc4, 0x00, - 0x58, 0x14, 0x4b, 0x02, 0x88, 0x00, - 0x28, 0xca, 0x05, 0x19, 0x40, 0x00, - 0x34, 0x60, 0x86, 0x8c, 0x10, 0x00, - 0x7e, 0x75, 0xef, 0xce, 0xbc, 0x00 -}; - -const uint8_t kMaskRandom38_32[192] = { - 0x2c, 0x16, 0x05, 0x82, 0xc0, 0x00, - 0x91, 0x40, 0xd2, 0x28, 0x18, 0x00, - 0xc0, 0xd0, 0x38, 0x1a, 0x04, 0x00, - 0x06, 0x82, 0xa0, 0xd0, 0x54, 0x00, - 0xc8, 0x0c, 0x59, 0x01, 0x88, 0x00, - 0x45, 0x61, 0x08, 0xac, 0x20, 0x00, - 0x30, 0x91, 0x46, 0x12, 0x28, 0x00, - 0xa2, 0x28, 0x34, 0x45, 0x04, 0x00, - 0x8c, 0x23, 0x11, 0x84, 0x60, 0x00, - 0x47, 0x19, 0x88, 0xe3, 0x30, 0x00, - 0x81, 0x88, 0x70, 0x31, 0x0c, 0x00, - 0x12, 0x86, 0x22, 0x50, 0xc4, 0x00, - 0x58, 0x14, 0x4b, 0x02, 0x88, 0x00, - 0x28, 0xca, 0x05, 0x19, 0x40, 0x00, - 0x34, 0x60, 0x86, 0x8c, 0x10, 0x00, - 0x7e, 0x75, 0xef, 0xce, 0xbc, 0x00, - 0x8c, 0x23, 0x11, 0x84, 0x60, 0x00, - 0x47, 0x19, 0x88, 0xe3, 0x30, 0x00, - 0x81, 0x88, 0x70, 0x31, 0x0c, 0x00, - 0x12, 0x86, 0x22, 0x50, 0xc4, 0x00, - 0x58, 0x14, 0x4b, 0x02, 0x88, 0x00, - 0x28, 0xca, 0x05, 0x19, 0x40, 0x00, - 0x34, 0x60, 0x86, 0x8c, 0x10, 0x00, - 0x2c, 0x16, 0x05, 0x82, 0xc0, 0x00, - 0x91, 0x40, 0xd2, 0x28, 0x18, 0x00, - 0xc0, 0xd0, 0x38, 0x1a, 0x04, 0x00, - 0x06, 0x82, 0xa0, 0xd0, 0x54, 0x00, - 0xc8, 0x0c, 0x59, 0x01, 0x88, 0x00, - 0x45, 0x61, 0x08, 0xac, 0x20, 0x00, - 0x30, 0x91, 0x46, 0x12, 0x28, 0x00, - 0xa2, 0x28, 0x34, 0x45, 0x04, 0x00, - 0x33, 0x10, 0x02, 0x4e, 0x54, 0x00 -}; - -const uint8_t kMaskRandom38_33[198] = { - 0x2c, 0x16, 0x05, 0x82, 0xc0, 0x00, - 0x91, 0x40, 0xd2, 0x28, 0x18, 0x00, - 0xc0, 0xd0, 0x38, 0x1a, 0x04, 0x00, - 0x06, 0x82, 0xa0, 0xd0, 0x54, 0x00, - 0xc8, 0x0c, 0x59, 0x01, 0x88, 0x00, - 0x45, 0x61, 0x08, 0xac, 0x20, 0x00, - 0x30, 0x91, 0x46, 0x12, 0x28, 0x00, - 0xa2, 0x28, 0x34, 0x45, 0x04, 0x00, - 0x8c, 0x23, 0x11, 0x84, 0x60, 0x00, - 0x47, 0x19, 0x88, 0xe3, 0x30, 0x00, - 0x81, 0x88, 0x70, 0x31, 0x0c, 0x00, - 0x12, 0x86, 0x22, 0x50, 0xc4, 0x00, - 0x58, 0x14, 0x4b, 0x02, 0x88, 0x00, - 0x28, 0xca, 0x05, 0x19, 0x40, 0x00, - 0x34, 0x60, 0x86, 0x8c, 0x10, 0x00, - 0x7e, 0x75, 0xef, 0xce, 0xbc, 0x00, - 0x2c, 0x16, 0x05, 0x82, 0xc0, 0x00, - 0x91, 0x40, 0xd2, 0x28, 0x18, 0x00, - 0xc0, 0xd0, 0x38, 0x1a, 0x04, 0x00, - 0x06, 0x82, 0xa0, 0xd0, 0x54, 0x00, - 0xc8, 0x0c, 0x59, 0x01, 0x88, 0x00, - 0x45, 0x61, 0x08, 0xac, 0x20, 0x00, - 0x30, 0x91, 0x46, 0x12, 0x28, 0x00, - 0xa2, 0x28, 0x34, 0x45, 0x04, 0x00, - 0x4c, 0x27, 0x09, 0x84, 0xe0, 0x00, - 0x66, 0x71, 0x8c, 0xce, 0x30, 0x00, - 0x91, 0x40, 0xf2, 0x28, 0x1c, 0x00, - 0x42, 0x90, 0xa8, 0x52, 0x14, 0x00, - 0xa4, 0x29, 0x54, 0x85, 0x28, 0x00, - 0x13, 0x5a, 0x02, 0x6b, 0x40, 0x00, - 0x30, 0x93, 0x46, 0x12, 0x68, 0x00, - 0x88, 0xac, 0x31, 0x15, 0x84, 0x00, - 0x09, 0x0c, 0xc1, 0x21, 0x98, 0x00 -}; - -const uint8_t kMaskRandom38_34[204] = { - 0x2c, 0x16, 0x05, 0x82, 0xc0, 0x00, - 0x91, 0x40, 0xd2, 0x28, 0x18, 0x00, - 0xc0, 0xd0, 0x38, 0x1a, 0x04, 0x00, - 0x06, 0x82, 0xa0, 0xd0, 0x54, 0x00, - 0xc8, 0x0c, 0x59, 0x01, 0x88, 0x00, - 0x45, 0x61, 0x08, 0xac, 0x20, 0x00, - 0x30, 0x91, 0x46, 0x12, 0x28, 0x00, - 0xa2, 0x28, 0x34, 0x45, 0x04, 0x00, - 0x4c, 0x27, 0x09, 0x84, 0xe0, 0x00, - 0x66, 0x71, 0x8c, 0xce, 0x30, 0x00, - 0x91, 0x40, 0xf2, 0x28, 0x1c, 0x00, - 0x42, 0x90, 0xa8, 0x52, 0x14, 0x00, - 0xa4, 0x29, 0x54, 0x85, 0x28, 0x00, - 0x13, 0x5a, 0x02, 0x6b, 0x40, 0x00, - 0x30, 0x93, 0x46, 0x12, 0x68, 0x00, - 0x88, 0xac, 0x31, 0x15, 0x84, 0x00, - 0x09, 0x0c, 0xc1, 0x21, 0x98, 0x00, - 0x2c, 0x16, 0x05, 0x82, 0xc0, 0x00, - 0x91, 0x40, 0xd2, 0x28, 0x18, 0x00, - 0xc0, 0xd0, 0x38, 0x1a, 0x04, 0x00, - 0x06, 0x82, 0xa0, 0xd0, 0x54, 0x00, - 0xc8, 0x0c, 0x59, 0x01, 0x88, 0x00, - 0x45, 0x61, 0x08, 0xac, 0x20, 0x00, - 0x30, 0x91, 0x46, 0x12, 0x28, 0x00, - 0xa2, 0x28, 0x34, 0x45, 0x04, 0x00, - 0x8c, 0x23, 0x11, 0x84, 0x60, 0x00, - 0x47, 0x19, 0x88, 0xe3, 0x30, 0x00, - 0x81, 0x88, 0x70, 0x31, 0x0c, 0x00, - 0x12, 0x86, 0x22, 0x50, 0xc4, 0x00, - 0x58, 0x14, 0x4b, 0x02, 0x88, 0x00, - 0x28, 0xca, 0x05, 0x19, 0x40, 0x00, - 0x34, 0x60, 0x86, 0x8c, 0x10, 0x00, - 0x7e, 0x75, 0xef, 0xce, 0xbc, 0x00, - 0x91, 0x48, 0xfa, 0xf0, 0xd8, 0x00 -}; - -const uint8_t kMaskRandom38_35[210] = { - 0x2c, 0x16, 0x05, 0x82, 0xc0, 0x00, - 0x91, 0x40, 0xd2, 0x28, 0x18, 0x00, - 0xc0, 0xd0, 0x38, 0x1a, 0x04, 0x00, - 0x06, 0x82, 0xa0, 0xd0, 0x54, 0x00, - 0xc8, 0x0c, 0x59, 0x01, 0x88, 0x00, - 0x45, 0x61, 0x08, 0xac, 0x20, 0x00, - 0x30, 0x91, 0x46, 0x12, 0x28, 0x00, - 0xa2, 0x28, 0x34, 0x45, 0x04, 0x00, - 0x4c, 0x27, 0x09, 0x84, 0xe0, 0x00, - 0x66, 0x71, 0x8c, 0xce, 0x30, 0x00, - 0x91, 0x40, 0xf2, 0x28, 0x1c, 0x00, - 0x42, 0x90, 0xa8, 0x52, 0x14, 0x00, - 0xa4, 0x29, 0x54, 0x85, 0x28, 0x00, - 0x13, 0x5a, 0x02, 0x6b, 0x40, 0x00, - 0x30, 0x93, 0x46, 0x12, 0x68, 0x00, - 0x88, 0xac, 0x31, 0x15, 0x84, 0x00, - 0x09, 0x0c, 0xc1, 0x21, 0x98, 0x00, - 0x4c, 0x27, 0x09, 0x84, 0xe0, 0x00, - 0x66, 0x71, 0x8c, 0xce, 0x30, 0x00, - 0x91, 0x40, 0xf2, 0x28, 0x1c, 0x00, - 0x42, 0x90, 0xa8, 0x52, 0x14, 0x00, - 0xa4, 0x29, 0x54, 0x85, 0x28, 0x00, - 0x13, 0x5a, 0x02, 0x6b, 0x40, 0x00, - 0x30, 0x93, 0x46, 0x12, 0x68, 0x00, - 0x88, 0xac, 0x31, 0x15, 0x84, 0x00, - 0x09, 0x0c, 0xc1, 0x21, 0x98, 0x00, - 0x2c, 0x16, 0x05, 0x82, 0xc0, 0x00, - 0x91, 0x40, 0xd2, 0x28, 0x18, 0x00, - 0xc0, 0xd0, 0x38, 0x1a, 0x04, 0x00, - 0x06, 0x82, 0xa0, 0xd0, 0x54, 0x00, - 0xc8, 0x0c, 0x59, 0x01, 0x88, 0x00, - 0x45, 0x61, 0x08, 0xac, 0x20, 0x00, - 0x30, 0x91, 0x46, 0x12, 0x28, 0x00, - 0xa2, 0x28, 0x34, 0x45, 0x04, 0x00, - 0x51, 0x97, 0x2a, 0x32, 0xe4, 0x00 -}; - -const uint8_t kMaskRandom38_36[216] = { - 0x4c, 0x27, 0x09, 0x84, 0xe0, 0x00, - 0x66, 0x71, 0x8c, 0xce, 0x30, 0x00, - 0x91, 0x40, 0xf2, 0x28, 0x1c, 0x00, - 0x42, 0x90, 0xa8, 0x52, 0x14, 0x00, - 0xa4, 0x29, 0x54, 0x85, 0x28, 0x00, - 0x13, 0x5a, 0x02, 0x6b, 0x40, 0x00, - 0x30, 0x93, 0x46, 0x12, 0x68, 0x00, - 0x88, 0xac, 0x31, 0x15, 0x84, 0x00, - 0x09, 0x0c, 0xc1, 0x21, 0x98, 0x00, - 0x2c, 0x16, 0x05, 0x82, 0xc0, 0x00, - 0x91, 0x40, 0xd2, 0x28, 0x18, 0x00, - 0xc0, 0xd0, 0x38, 0x1a, 0x04, 0x00, - 0x06, 0x82, 0xa0, 0xd0, 0x54, 0x00, - 0xc8, 0x0c, 0x59, 0x01, 0x88, 0x00, - 0x45, 0x61, 0x08, 0xac, 0x20, 0x00, - 0x30, 0x91, 0x46, 0x12, 0x28, 0x00, - 0xa2, 0x28, 0x34, 0x45, 0x04, 0x00, - 0x51, 0x97, 0x2a, 0x32, 0xe4, 0x00, - 0x2c, 0x16, 0x05, 0x82, 0xc0, 0x00, - 0x91, 0x40, 0xd2, 0x28, 0x18, 0x00, - 0xc0, 0xd0, 0x38, 0x1a, 0x04, 0x00, - 0x06, 0x82, 0xa0, 0xd0, 0x54, 0x00, - 0xc8, 0x0c, 0x59, 0x01, 0x88, 0x00, - 0x45, 0x61, 0x08, 0xac, 0x20, 0x00, - 0x30, 0x91, 0x46, 0x12, 0x28, 0x00, - 0xa2, 0x28, 0x34, 0x45, 0x04, 0x00, - 0x4c, 0x27, 0x09, 0x84, 0xe0, 0x00, - 0x66, 0x71, 0x8c, 0xce, 0x30, 0x00, - 0x91, 0x40, 0xf2, 0x28, 0x1c, 0x00, - 0x42, 0x90, 0xa8, 0x52, 0x14, 0x00, - 0xa4, 0x29, 0x54, 0x85, 0x28, 0x00, - 0x13, 0x5a, 0x02, 0x6b, 0x40, 0x00, - 0x30, 0x93, 0x46, 0x12, 0x68, 0x00, - 0x88, 0xac, 0x31, 0x15, 0x84, 0x00, - 0x09, 0x0c, 0xc1, 0x21, 0x98, 0x00, - 0x80, 0x95, 0xc2, 0x68, 0x28, 0x00 -}; - -const uint8_t kMaskRandom38_37[222] = { - 0x4c, 0x27, 0x09, 0x84, 0xe0, 0x00, - 0x66, 0x71, 0x8c, 0xce, 0x30, 0x00, - 0x91, 0x40, 0xf2, 0x28, 0x1c, 0x00, - 0x42, 0x90, 0xa8, 0x52, 0x14, 0x00, - 0xa4, 0x29, 0x54, 0x85, 0x28, 0x00, - 0x13, 0x5a, 0x02, 0x6b, 0x40, 0x00, - 0x30, 0x93, 0x46, 0x12, 0x68, 0x00, - 0x88, 0xac, 0x31, 0x15, 0x84, 0x00, - 0x09, 0x0c, 0xc1, 0x21, 0x98, 0x00, - 0x2c, 0x16, 0x05, 0x82, 0xc0, 0x00, - 0x91, 0x40, 0xd2, 0x28, 0x18, 0x00, - 0xc0, 0xd0, 0x38, 0x1a, 0x04, 0x00, - 0x06, 0x82, 0xa0, 0xd0, 0x54, 0x00, - 0xc8, 0x0c, 0x59, 0x01, 0x88, 0x00, - 0x45, 0x61, 0x08, 0xac, 0x20, 0x00, - 0x30, 0x91, 0x46, 0x12, 0x28, 0x00, - 0xa2, 0x28, 0x34, 0x45, 0x04, 0x00, - 0x51, 0x97, 0x2a, 0x32, 0xe4, 0x00, - 0x4c, 0x27, 0x09, 0x84, 0xe0, 0x00, - 0x66, 0x71, 0x8c, 0xce, 0x30, 0x00, - 0x91, 0x40, 0xf2, 0x28, 0x1c, 0x00, - 0x42, 0x90, 0xa8, 0x52, 0x14, 0x00, - 0xa4, 0x29, 0x54, 0x85, 0x28, 0x00, - 0x13, 0x5a, 0x02, 0x6b, 0x40, 0x00, - 0x30, 0x93, 0x46, 0x12, 0x68, 0x00, - 0x88, 0xac, 0x31, 0x15, 0x84, 0x00, - 0x09, 0x0c, 0xc1, 0x21, 0x98, 0x00, - 0x4c, 0x26, 0x09, 0x84, 0xc0, 0x00, - 0x66, 0x28, 0x8c, 0xc5, 0x10, 0x00, - 0x91, 0x50, 0x32, 0x2a, 0x04, 0x00, - 0x42, 0x82, 0x68, 0x50, 0x4c, 0x00, - 0xa4, 0x01, 0xd4, 0x80, 0x38, 0x00, - 0x13, 0x43, 0x02, 0x68, 0x60, 0x00, - 0x30, 0x94, 0x86, 0x12, 0x90, 0x00, - 0x88, 0xa1, 0x31, 0x14, 0x24, 0x00, - 0x09, 0x4c, 0x01, 0x29, 0x80, 0x00, - 0xcd, 0x98, 0x59, 0xb3, 0x08, 0x00 -}; - -const uint8_t kMaskRandom38_38[228] = { - 0x4c, 0x27, 0x09, 0x84, 0xe0, 0x00, - 0x66, 0x71, 0x8c, 0xce, 0x30, 0x00, - 0x91, 0x40, 0xf2, 0x28, 0x1c, 0x00, - 0x42, 0x90, 0xa8, 0x52, 0x14, 0x00, - 0xa4, 0x29, 0x54, 0x85, 0x28, 0x00, - 0x13, 0x5a, 0x02, 0x6b, 0x40, 0x00, - 0x30, 0x93, 0x46, 0x12, 0x68, 0x00, - 0x88, 0xac, 0x31, 0x15, 0x84, 0x00, - 0x09, 0x0c, 0xc1, 0x21, 0x98, 0x00, - 0x4c, 0x26, 0x09, 0x84, 0xc0, 0x00, - 0x66, 0x28, 0x8c, 0xc5, 0x10, 0x00, - 0x91, 0x50, 0x32, 0x2a, 0x04, 0x00, - 0x42, 0x82, 0x68, 0x50, 0x4c, 0x00, - 0xa4, 0x01, 0xd4, 0x80, 0x38, 0x00, - 0x13, 0x43, 0x02, 0x68, 0x60, 0x00, - 0x30, 0x94, 0x86, 0x12, 0x90, 0x00, - 0x88, 0xa1, 0x31, 0x14, 0x24, 0x00, - 0x09, 0x4c, 0x01, 0x29, 0x80, 0x00, - 0xcd, 0x98, 0x59, 0xb3, 0x08, 0x00, - 0x4c, 0x27, 0x09, 0x84, 0xe0, 0x00, - 0x66, 0x71, 0x8c, 0xce, 0x30, 0x00, - 0x91, 0x40, 0xf2, 0x28, 0x1c, 0x00, - 0x42, 0x90, 0xa8, 0x52, 0x14, 0x00, - 0xa4, 0x29, 0x54, 0x85, 0x28, 0x00, - 0x13, 0x5a, 0x02, 0x6b, 0x40, 0x00, - 0x30, 0x93, 0x46, 0x12, 0x68, 0x00, - 0x88, 0xac, 0x31, 0x15, 0x84, 0x00, - 0x09, 0x0c, 0xc1, 0x21, 0x98, 0x00, - 0x2c, 0x16, 0x05, 0x82, 0xc0, 0x00, - 0x91, 0x40, 0xd2, 0x28, 0x18, 0x00, - 0xc0, 0xd0, 0x38, 0x1a, 0x04, 0x00, - 0x06, 0x82, 0xa0, 0xd0, 0x54, 0x00, - 0xc8, 0x0c, 0x59, 0x01, 0x88, 0x00, - 0x45, 0x61, 0x08, 0xac, 0x20, 0x00, - 0x30, 0x91, 0x46, 0x12, 0x28, 0x00, - 0xa2, 0x28, 0x34, 0x45, 0x04, 0x00, - 0x51, 0x97, 0x2a, 0x32, 0xe4, 0x00, - 0x8c, 0xed, 0x11, 0x5f, 0x24, 0x00 -}; - -const uint8_t kMaskRandom38_4[24] = { - 0xec, 0x73, 0x1d, 0x8e, 0x60, 0x00, - 0x67, 0x19, 0xcc, 0xe3, 0x38, 0x00, - 0xb1, 0xcc, 0x76, 0x39, 0x8c, 0x00, - 0x5a, 0x96, 0xab, 0x52, 0xd4, 0x00 -}; - -const uint8_t kMaskRandom38_5[30] = { - 0x4c, 0xe7, 0x09, 0x9c, 0xe0, 0x00, - 0x66, 0x31, 0xcc, 0xc6, 0x38, 0x00, - 0xa1, 0xcc, 0x74, 0x39, 0x8c, 0x00, - 0x92, 0xa6, 0xb2, 0x54, 0xd4, 0x00, - 0xb8, 0x99, 0x97, 0x13, 0x30, 0x00 -}; - -const uint8_t kMaskRandom38_6[36] = { - 0x4c, 0x36, 0x09, 0x86, 0xc0, 0x00, - 0x45, 0x68, 0x88, 0xad, 0x10, 0x00, - 0x30, 0xd0, 0x66, 0x1a, 0x0c, 0x00, - 0x8a, 0x82, 0xb1, 0x50, 0x54, 0x00, - 0x26, 0x0b, 0x44, 0xc1, 0x68, 0x00, - 0x95, 0x45, 0x12, 0xa8, 0xa0, 0x00 -}; - -const uint8_t kMaskRandom38_7[42] = { - 0xc4, 0xa3, 0x18, 0x94, 0x60, 0x00, - 0x23, 0x19, 0x84, 0x63, 0x30, 0x00, - 0x91, 0x1c, 0x32, 0x23, 0x84, 0x00, - 0x4a, 0x82, 0xa9, 0x50, 0x54, 0x00, - 0x34, 0x49, 0x46, 0x89, 0x28, 0x00, - 0x8b, 0x4a, 0x11, 0x69, 0x40, 0x00, - 0xc8, 0x24, 0xd9, 0x04, 0x98, 0x00 -}; - -const uint8_t kMaskRandom38_8[48] = { - 0x16, 0x13, 0x82, 0xc2, 0x70, 0x00, - 0xc2, 0x44, 0xd8, 0x48, 0x98, 0x00, - 0x60, 0xe8, 0x2c, 0x1d, 0x04, 0x00, - 0x85, 0x12, 0x70, 0xa2, 0x4c, 0x00, - 0xcc, 0x21, 0x59, 0x84, 0x28, 0x00, - 0x29, 0x63, 0x05, 0x2c, 0x60, 0x00, - 0x11, 0x98, 0xc2, 0x33, 0x18, 0x00, - 0xb0, 0x0c, 0x76, 0x01, 0x8c, 0x00 -}; - -const uint8_t kMaskRandom38_9[54] = { - 0x44, 0xa7, 0x08, 0x94, 0xe0, 0x00, - 0x66, 0x70, 0x8c, 0xce, 0x10, 0x00, - 0x12, 0xc0, 0xe2, 0x58, 0x1c, 0x00, - 0xc3, 0x10, 0xb8, 0x62, 0x14, 0x00, - 0x8c, 0x29, 0x51, 0x85, 0x28, 0x00, - 0x11, 0x5b, 0x02, 0x2b, 0x60, 0x00, - 0x21, 0x93, 0x44, 0x32, 0x68, 0x00, - 0xa2, 0x2c, 0x14, 0x45, 0x80, 0x00, - 0x18, 0x0c, 0xe3, 0x01, 0x9c, 0x00 -}; - -const uint8_t kMaskRandom39_1[6] = { - 0xff, 0xff, 0xff, 0xff, 0xfe, 0x00 -}; - -const uint8_t kMaskRandom39_10[60] = { - 0x8c, 0xe3, 0x09, 0x82, 0x60, 0x00, - 0x27, 0x11, 0xca, 0x22, 0x88, 0x00, - 0x32, 0x8d, 0x34, 0x0d, 0x02, 0x00, - 0x61, 0x92, 0x60, 0x98, 0x26, 0x00, - 0x5c, 0x38, 0x80, 0x70, 0x1c, 0x00, - 0xcc, 0x75, 0x10, 0xc4, 0x30, 0x00, - 0x2b, 0x19, 0xc5, 0x21, 0x48, 0x00, - 0x32, 0xd2, 0x68, 0x4a, 0x12, 0x00, - 0x25, 0x8e, 0xb3, 0x04, 0xc0, 0x00, - 0x50, 0x88, 0xc6, 0x11, 0x84, 0x00 -}; - -const uint8_t kMaskRandom39_11[66] = { - 0x8c, 0xe3, 0x18, 0xc6, 0x30, 0x00, - 0x27, 0x11, 0xc4, 0x71, 0x1c, 0x00, - 0x32, 0x8d, 0x23, 0x48, 0xd2, 0x00, - 0x61, 0x92, 0x64, 0x99, 0x26, 0x00, - 0x5c, 0x38, 0x8e, 0x23, 0x88, 0x00, - 0x84, 0x87, 0x01, 0xc0, 0x70, 0x00, - 0x27, 0x19, 0x86, 0x61, 0x98, 0x00, - 0x51, 0x88, 0x62, 0x18, 0x86, 0x00, - 0x1a, 0x22, 0xa8, 0xaa, 0x2a, 0x00, - 0x68, 0x44, 0x51, 0x14, 0x44, 0x00, - 0x89, 0x70, 0x1c, 0x07, 0x00, 0x00 -}; - -const uint8_t kMaskRandom39_12[72] = { - 0x84, 0x87, 0x01, 0xc0, 0x70, 0x00, - 0x27, 0x19, 0x86, 0x61, 0x98, 0x00, - 0x51, 0x88, 0x62, 0x18, 0x86, 0x00, - 0x1a, 0x22, 0xa8, 0xaa, 0x2a, 0x00, - 0x68, 0x44, 0x51, 0x14, 0x44, 0x00, - 0x89, 0x70, 0x1c, 0x07, 0x00, 0x00, - 0x8c, 0xe3, 0x18, 0xc6, 0x30, 0x00, - 0x27, 0x11, 0xc4, 0x71, 0x1c, 0x00, - 0x32, 0x8d, 0x23, 0x48, 0xd2, 0x00, - 0x61, 0x92, 0x64, 0x99, 0x26, 0x00, - 0x5c, 0x38, 0x8e, 0x23, 0x88, 0x00, - 0x90, 0xc8, 0x9e, 0xbb, 0x88, 0x00 -}; - -const uint8_t kMaskRandom39_13[78] = { - 0x84, 0x87, 0x01, 0xc0, 0x70, 0x00, - 0x27, 0x19, 0x86, 0x61, 0x98, 0x00, - 0x51, 0x88, 0x62, 0x18, 0x86, 0x00, - 0x1a, 0x22, 0xa8, 0xaa, 0x2a, 0x00, - 0x68, 0x44, 0x51, 0x14, 0x44, 0x00, - 0x89, 0x70, 0x1c, 0x07, 0x00, 0x00, - 0x8c, 0x23, 0x08, 0xc2, 0x30, 0x00, - 0x47, 0x19, 0x86, 0x61, 0x98, 0x00, - 0x81, 0x88, 0x62, 0x18, 0x86, 0x00, - 0x12, 0x86, 0x21, 0x88, 0x62, 0x00, - 0x58, 0x14, 0x45, 0x11, 0x44, 0x00, - 0x28, 0xca, 0x12, 0x84, 0xa0, 0x00, - 0x34, 0x60, 0x98, 0x26, 0x08, 0x00 -}; - -const uint8_t kMaskRandom39_14[84] = { - 0x8c, 0x23, 0x08, 0xc2, 0x30, 0x00, - 0x47, 0x19, 0x86, 0x61, 0x98, 0x00, - 0x81, 0x88, 0x62, 0x18, 0x86, 0x00, - 0x12, 0x86, 0x21, 0x88, 0x62, 0x00, - 0x58, 0x14, 0x45, 0x11, 0x44, 0x00, - 0x28, 0xca, 0x12, 0x84, 0xa0, 0x00, - 0x34, 0x60, 0x98, 0x26, 0x08, 0x00, - 0x84, 0x87, 0x01, 0xc0, 0x70, 0x00, - 0x27, 0x19, 0x86, 0x61, 0x98, 0x00, - 0x51, 0x88, 0x62, 0x18, 0x86, 0x00, - 0x1a, 0x22, 0xa8, 0xaa, 0x2a, 0x00, - 0x68, 0x44, 0x51, 0x14, 0x44, 0x00, - 0x89, 0x70, 0x1c, 0x07, 0x00, 0x00, - 0x6e, 0x27, 0x6a, 0xc7, 0xc4, 0x00 -}; - -const uint8_t kMaskRandom39_15[90] = { - 0x8c, 0x23, 0x08, 0xc2, 0x30, 0x00, - 0x47, 0x19, 0x86, 0x61, 0x98, 0x00, - 0x81, 0x88, 0x62, 0x18, 0x86, 0x00, - 0x12, 0x86, 0x21, 0x88, 0x62, 0x00, - 0x58, 0x14, 0x45, 0x11, 0x44, 0x00, - 0x28, 0xca, 0x12, 0x84, 0xa0, 0x00, - 0x34, 0x60, 0x98, 0x26, 0x08, 0x00, - 0x2c, 0x16, 0x05, 0x81, 0x60, 0x00, - 0x91, 0x40, 0xd0, 0x34, 0x0c, 0x00, - 0xc0, 0xd0, 0x34, 0x0d, 0x02, 0x00, - 0x06, 0x82, 0xa0, 0xa8, 0x2a, 0x00, - 0xc8, 0x0c, 0x43, 0x10, 0xc4, 0x00, - 0x45, 0x61, 0x18, 0x46, 0x10, 0x00, - 0x30, 0x91, 0x44, 0x51, 0x14, 0x00, - 0xa2, 0x28, 0x2a, 0x0a, 0x82, 0x00 -}; - -const uint8_t kMaskRandom39_16[96] = { - 0x2c, 0x16, 0x05, 0x81, 0x60, 0x00, - 0x91, 0x40, 0xd0, 0x34, 0x0c, 0x00, - 0xc0, 0xd0, 0x34, 0x0d, 0x02, 0x00, - 0x06, 0x82, 0xa0, 0xa8, 0x2a, 0x00, - 0xc8, 0x0c, 0x43, 0x10, 0xc4, 0x00, - 0x45, 0x61, 0x18, 0x46, 0x10, 0x00, - 0x30, 0x91, 0x44, 0x51, 0x14, 0x00, - 0xa2, 0x28, 0x2a, 0x0a, 0x82, 0x00, - 0x8c, 0x23, 0x08, 0xc2, 0x30, 0x00, - 0x47, 0x19, 0x86, 0x61, 0x98, 0x00, - 0x81, 0x88, 0x62, 0x18, 0x86, 0x00, - 0x12, 0x86, 0x21, 0x88, 0x62, 0x00, - 0x58, 0x14, 0x45, 0x11, 0x44, 0x00, - 0x28, 0xca, 0x12, 0x84, 0xa0, 0x00, - 0x34, 0x60, 0x98, 0x26, 0x08, 0x00, - 0x7e, 0x75, 0xe5, 0x03, 0x8c, 0x00 -}; - -const uint8_t kMaskRandom39_17[102] = { - 0x2c, 0x16, 0x05, 0x81, 0x60, 0x00, - 0x91, 0x40, 0xd0, 0x34, 0x0c, 0x00, - 0xc0, 0xd0, 0x34, 0x0d, 0x02, 0x00, - 0x06, 0x82, 0xa0, 0xa8, 0x2a, 0x00, - 0xc8, 0x0c, 0x43, 0x10, 0xc4, 0x00, - 0x45, 0x61, 0x18, 0x46, 0x10, 0x00, - 0x30, 0x91, 0x44, 0x51, 0x14, 0x00, - 0xa2, 0x28, 0x2a, 0x0a, 0x82, 0x00, - 0x4c, 0x27, 0x09, 0xc2, 0x70, 0x00, - 0x66, 0x71, 0x9c, 0x67, 0x18, 0x00, - 0x91, 0x40, 0xf0, 0x3c, 0x0e, 0x00, - 0x42, 0x90, 0xa4, 0x29, 0x0a, 0x00, - 0xa4, 0x29, 0x4a, 0x52, 0x94, 0x00, - 0x13, 0x5a, 0x16, 0x85, 0xa0, 0x00, - 0x30, 0x93, 0x44, 0xd1, 0x34, 0x00, - 0x88, 0xac, 0x2b, 0x0a, 0xc2, 0x00, - 0x09, 0x0c, 0xc3, 0x30, 0xcc, 0x00 -}; - -const uint8_t kMaskRandom39_18[108] = { - 0x4c, 0x27, 0x09, 0xc2, 0x70, 0x00, - 0x66, 0x71, 0x9c, 0x67, 0x18, 0x00, - 0x91, 0x40, 0xf0, 0x3c, 0x0e, 0x00, - 0x42, 0x90, 0xa4, 0x29, 0x0a, 0x00, - 0xa4, 0x29, 0x4a, 0x52, 0x94, 0x00, - 0x13, 0x5a, 0x16, 0x85, 0xa0, 0x00, - 0x30, 0x93, 0x44, 0xd1, 0x34, 0x00, - 0x88, 0xac, 0x2b, 0x0a, 0xc2, 0x00, - 0x09, 0x0c, 0xc3, 0x30, 0xcc, 0x00, - 0x2c, 0x16, 0x05, 0x81, 0x60, 0x00, - 0x91, 0x40, 0xd0, 0x34, 0x0c, 0x00, - 0xc0, 0xd0, 0x34, 0x0d, 0x02, 0x00, - 0x06, 0x82, 0xa0, 0xa8, 0x2a, 0x00, - 0xc8, 0x0c, 0x43, 0x10, 0xc4, 0x00, - 0x45, 0x61, 0x18, 0x46, 0x10, 0x00, - 0x30, 0x91, 0x44, 0x51, 0x14, 0x00, - 0xa2, 0x28, 0x2a, 0x0a, 0x82, 0x00, - 0x51, 0x97, 0x24, 0x2f, 0x7e, 0x00 -}; - -const uint8_t kMaskRandom39_19[114] = { - 0x4c, 0x27, 0x09, 0xc2, 0x70, 0x00, - 0x66, 0x71, 0x9c, 0x67, 0x18, 0x00, - 0x91, 0x40, 0xf0, 0x3c, 0x0e, 0x00, - 0x42, 0x90, 0xa4, 0x29, 0x0a, 0x00, - 0xa4, 0x29, 0x4a, 0x52, 0x94, 0x00, - 0x13, 0x5a, 0x16, 0x85, 0xa0, 0x00, - 0x30, 0x93, 0x44, 0xd1, 0x34, 0x00, - 0x88, 0xac, 0x2b, 0x0a, 0xc2, 0x00, - 0x09, 0x0c, 0xc3, 0x30, 0xcc, 0x00, - 0x4c, 0x26, 0x09, 0x82, 0x60, 0x00, - 0x66, 0x28, 0x8a, 0x22, 0x88, 0x00, - 0x91, 0x50, 0x34, 0x0d, 0x02, 0x00, - 0x42, 0x82, 0x60, 0x98, 0x26, 0x00, - 0xa4, 0x01, 0xc0, 0x70, 0x1c, 0x00, - 0x13, 0x43, 0x10, 0xc4, 0x30, 0x00, - 0x30, 0x94, 0x85, 0x21, 0x48, 0x00, - 0x88, 0xa1, 0x28, 0x4a, 0x12, 0x00, - 0x09, 0x4c, 0x13, 0x04, 0xc0, 0x00, - 0xcd, 0x98, 0x46, 0x11, 0x84, 0x00 -}; - -const uint8_t kMaskRandom39_2[12] = { - 0xce, 0x77, 0x1d, 0xc7, 0x70, 0x00, - 0x39, 0xcc, 0xf3, 0x3c, 0xce, 0x00 -}; - -const uint8_t kMaskRandom39_20[120] = { - 0x8c, 0xe3, 0x09, 0x82, 0x60, 0x00, - 0x27, 0x11, 0xca, 0x22, 0x88, 0x00, - 0x32, 0x8d, 0x34, 0x0d, 0x02, 0x00, - 0x61, 0x92, 0x60, 0x98, 0x26, 0x00, - 0x5c, 0x38, 0x80, 0x70, 0x1c, 0x00, - 0xcc, 0x75, 0x10, 0xc4, 0x30, 0x00, - 0x2b, 0x19, 0xc5, 0x21, 0x48, 0x00, - 0x32, 0xd2, 0x68, 0x4a, 0x12, 0x00, - 0x25, 0x8e, 0xb3, 0x04, 0xc0, 0x00, - 0x50, 0x88, 0xc6, 0x11, 0x84, 0x00, - 0x44, 0xa7, 0x09, 0xc2, 0x70, 0x00, - 0x66, 0x70, 0x8c, 0x47, 0x18, 0x00, - 0x12, 0xc0, 0xf0, 0x3c, 0x0e, 0x00, - 0xc3, 0x10, 0xbc, 0x29, 0x0a, 0x00, - 0x8c, 0x29, 0x42, 0x72, 0x94, 0x00, - 0x11, 0x5b, 0x16, 0x85, 0xa0, 0x00, - 0x21, 0x93, 0x44, 0xd1, 0x34, 0x00, - 0xa2, 0x2c, 0x0b, 0x0a, 0xc2, 0x00, - 0x18, 0x0c, 0xe9, 0x30, 0xca, 0x00, - 0x0d, 0xba, 0x52, 0x38, 0xbc, 0x00 -}; - -const uint8_t kMaskRandom39_21[126] = { - 0x8c, 0xe3, 0x09, 0x82, 0x60, 0x00, - 0x27, 0x11, 0xca, 0x22, 0x88, 0x00, - 0x32, 0x8d, 0x34, 0x0d, 0x02, 0x00, - 0x61, 0x92, 0x60, 0x98, 0x26, 0x00, - 0x5c, 0x38, 0x80, 0x70, 0x1c, 0x00, - 0xcc, 0x75, 0x10, 0xc4, 0x30, 0x00, - 0x2b, 0x19, 0xc5, 0x21, 0x48, 0x00, - 0x32, 0xd2, 0x68, 0x4a, 0x12, 0x00, - 0x25, 0x8e, 0xb3, 0x04, 0xc0, 0x00, - 0x50, 0x88, 0xc6, 0x11, 0x84, 0x00, - 0x8c, 0xe3, 0x18, 0xc6, 0x30, 0x00, - 0x27, 0x11, 0xc4, 0x71, 0x1c, 0x00, - 0x32, 0x8d, 0x23, 0x48, 0xd2, 0x00, - 0x61, 0x92, 0x64, 0x99, 0x26, 0x00, - 0x5c, 0x38, 0x8e, 0x23, 0x88, 0x00, - 0x84, 0x87, 0x01, 0xc0, 0x70, 0x00, - 0x27, 0x19, 0x86, 0x61, 0x98, 0x00, - 0x51, 0x88, 0x62, 0x18, 0x86, 0x00, - 0x1a, 0x22, 0xa8, 0xaa, 0x2a, 0x00, - 0x68, 0x44, 0x51, 0x14, 0x44, 0x00, - 0x89, 0x70, 0x1c, 0x07, 0x00, 0x00 -}; - -const uint8_t kMaskRandom39_22[132] = { - 0x8c, 0xe3, 0x18, 0xc6, 0x30, 0x00, - 0x27, 0x11, 0xc4, 0x71, 0x1c, 0x00, - 0x32, 0x8d, 0x23, 0x48, 0xd2, 0x00, - 0x61, 0x92, 0x64, 0x99, 0x26, 0x00, - 0x5c, 0x38, 0x8e, 0x23, 0x88, 0x00, - 0x84, 0x87, 0x01, 0xc0, 0x70, 0x00, - 0x27, 0x19, 0x86, 0x61, 0x98, 0x00, - 0x51, 0x88, 0x62, 0x18, 0x86, 0x00, - 0x1a, 0x22, 0xa8, 0xaa, 0x2a, 0x00, - 0x68, 0x44, 0x51, 0x14, 0x44, 0x00, - 0x89, 0x70, 0x1c, 0x07, 0x00, 0x00, - 0x8c, 0xe3, 0x09, 0x82, 0x60, 0x00, - 0x27, 0x11, 0xca, 0x22, 0x88, 0x00, - 0x32, 0x8d, 0x34, 0x0d, 0x02, 0x00, - 0x61, 0x92, 0x60, 0x98, 0x26, 0x00, - 0x5c, 0x38, 0x80, 0x70, 0x1c, 0x00, - 0xcc, 0x75, 0x10, 0xc4, 0x30, 0x00, - 0x2b, 0x19, 0xc5, 0x21, 0x48, 0x00, - 0x32, 0xd2, 0x68, 0x4a, 0x12, 0x00, - 0x25, 0x8e, 0xb3, 0x04, 0xc0, 0x00, - 0x50, 0x88, 0xc6, 0x11, 0x84, 0x00, - 0xfc, 0x5a, 0xb2, 0x13, 0x12, 0x00 -}; - -const uint8_t kMaskRandom39_23[138] = { - 0x8c, 0xe3, 0x18, 0xc6, 0x30, 0x00, - 0x27, 0x11, 0xc4, 0x71, 0x1c, 0x00, - 0x32, 0x8d, 0x23, 0x48, 0xd2, 0x00, - 0x61, 0x92, 0x64, 0x99, 0x26, 0x00, - 0x5c, 0x38, 0x8e, 0x23, 0x88, 0x00, - 0x84, 0x87, 0x01, 0xc0, 0x70, 0x00, - 0x27, 0x19, 0x86, 0x61, 0x98, 0x00, - 0x51, 0x88, 0x62, 0x18, 0x86, 0x00, - 0x1a, 0x22, 0xa8, 0xaa, 0x2a, 0x00, - 0x68, 0x44, 0x51, 0x14, 0x44, 0x00, - 0x89, 0x70, 0x1c, 0x07, 0x00, 0x00, - 0x84, 0x87, 0x01, 0xc0, 0x70, 0x00, - 0x27, 0x19, 0x86, 0x61, 0x98, 0x00, - 0x51, 0x88, 0x62, 0x18, 0x86, 0x00, - 0x1a, 0x22, 0xa8, 0xaa, 0x2a, 0x00, - 0x68, 0x44, 0x51, 0x14, 0x44, 0x00, - 0x89, 0x70, 0x1c, 0x07, 0x00, 0x00, - 0x8c, 0xe3, 0x18, 0xc6, 0x30, 0x00, - 0x27, 0x11, 0xc4, 0x71, 0x1c, 0x00, - 0x32, 0x8d, 0x23, 0x48, 0xd2, 0x00, - 0x61, 0x92, 0x64, 0x99, 0x26, 0x00, - 0x5c, 0x38, 0x8e, 0x23, 0x88, 0x00, - 0x90, 0xc8, 0x9e, 0xbb, 0x88, 0x00 -}; - -const uint8_t kMaskRandom39_24[144] = { - 0x84, 0x87, 0x01, 0xc0, 0x70, 0x00, - 0x27, 0x19, 0x86, 0x61, 0x98, 0x00, - 0x51, 0x88, 0x62, 0x18, 0x86, 0x00, - 0x1a, 0x22, 0xa8, 0xaa, 0x2a, 0x00, - 0x68, 0x44, 0x51, 0x14, 0x44, 0x00, - 0x89, 0x70, 0x1c, 0x07, 0x00, 0x00, - 0x8c, 0xe3, 0x18, 0xc6, 0x30, 0x00, - 0x27, 0x11, 0xc4, 0x71, 0x1c, 0x00, - 0x32, 0x8d, 0x23, 0x48, 0xd2, 0x00, - 0x61, 0x92, 0x64, 0x99, 0x26, 0x00, - 0x5c, 0x38, 0x8e, 0x23, 0x88, 0x00, - 0x90, 0xc8, 0x9e, 0xbb, 0x88, 0x00, - 0x8c, 0xe3, 0x18, 0xc6, 0x30, 0x00, - 0x27, 0x11, 0xc4, 0x71, 0x1c, 0x00, - 0x32, 0x8d, 0x23, 0x48, 0xd2, 0x00, - 0x61, 0x92, 0x64, 0x99, 0x26, 0x00, - 0x5c, 0x38, 0x8e, 0x23, 0x88, 0x00, - 0x84, 0x87, 0x01, 0xc0, 0x70, 0x00, - 0x27, 0x19, 0x86, 0x61, 0x98, 0x00, - 0x51, 0x88, 0x62, 0x18, 0x86, 0x00, - 0x1a, 0x22, 0xa8, 0xaa, 0x2a, 0x00, - 0x68, 0x44, 0x51, 0x14, 0x44, 0x00, - 0x89, 0x70, 0x1c, 0x07, 0x00, 0x00, - 0xac, 0xbc, 0xf0, 0xff, 0x62, 0x00 -}; - -const uint8_t kMaskRandom39_25[150] = { - 0x84, 0x87, 0x01, 0xc0, 0x70, 0x00, - 0x27, 0x19, 0x86, 0x61, 0x98, 0x00, - 0x51, 0x88, 0x62, 0x18, 0x86, 0x00, - 0x1a, 0x22, 0xa8, 0xaa, 0x2a, 0x00, - 0x68, 0x44, 0x51, 0x14, 0x44, 0x00, - 0x89, 0x70, 0x1c, 0x07, 0x00, 0x00, - 0x8c, 0xe3, 0x18, 0xc6, 0x30, 0x00, - 0x27, 0x11, 0xc4, 0x71, 0x1c, 0x00, - 0x32, 0x8d, 0x23, 0x48, 0xd2, 0x00, - 0x61, 0x92, 0x64, 0x99, 0x26, 0x00, - 0x5c, 0x38, 0x8e, 0x23, 0x88, 0x00, - 0x90, 0xc8, 0x9e, 0xbb, 0x88, 0x00, - 0x84, 0x87, 0x01, 0xc0, 0x70, 0x00, - 0x27, 0x19, 0x86, 0x61, 0x98, 0x00, - 0x51, 0x88, 0x62, 0x18, 0x86, 0x00, - 0x1a, 0x22, 0xa8, 0xaa, 0x2a, 0x00, - 0x68, 0x44, 0x51, 0x14, 0x44, 0x00, - 0x89, 0x70, 0x1c, 0x07, 0x00, 0x00, - 0x8c, 0x23, 0x08, 0xc2, 0x30, 0x00, - 0x47, 0x19, 0x86, 0x61, 0x98, 0x00, - 0x81, 0x88, 0x62, 0x18, 0x86, 0x00, - 0x12, 0x86, 0x21, 0x88, 0x62, 0x00, - 0x58, 0x14, 0x45, 0x11, 0x44, 0x00, - 0x28, 0xca, 0x12, 0x84, 0xa0, 0x00, - 0x34, 0x60, 0x98, 0x26, 0x08, 0x00 -}; - -const uint8_t kMaskRandom39_26[156] = { - 0x84, 0x87, 0x01, 0xc0, 0x70, 0x00, - 0x27, 0x19, 0x86, 0x61, 0x98, 0x00, - 0x51, 0x88, 0x62, 0x18, 0x86, 0x00, - 0x1a, 0x22, 0xa8, 0xaa, 0x2a, 0x00, - 0x68, 0x44, 0x51, 0x14, 0x44, 0x00, - 0x89, 0x70, 0x1c, 0x07, 0x00, 0x00, - 0x8c, 0x23, 0x08, 0xc2, 0x30, 0x00, - 0x47, 0x19, 0x86, 0x61, 0x98, 0x00, - 0x81, 0x88, 0x62, 0x18, 0x86, 0x00, - 0x12, 0x86, 0x21, 0x88, 0x62, 0x00, - 0x58, 0x14, 0x45, 0x11, 0x44, 0x00, - 0x28, 0xca, 0x12, 0x84, 0xa0, 0x00, - 0x34, 0x60, 0x98, 0x26, 0x08, 0x00, - 0x84, 0x87, 0x01, 0xc0, 0x70, 0x00, - 0x27, 0x19, 0x86, 0x61, 0x98, 0x00, - 0x51, 0x88, 0x62, 0x18, 0x86, 0x00, - 0x1a, 0x22, 0xa8, 0xaa, 0x2a, 0x00, - 0x68, 0x44, 0x51, 0x14, 0x44, 0x00, - 0x89, 0x70, 0x1c, 0x07, 0x00, 0x00, - 0x8c, 0xe3, 0x18, 0xc6, 0x30, 0x00, - 0x27, 0x11, 0xc4, 0x71, 0x1c, 0x00, - 0x32, 0x8d, 0x23, 0x48, 0xd2, 0x00, - 0x61, 0x92, 0x64, 0x99, 0x26, 0x00, - 0x5c, 0x38, 0x8e, 0x23, 0x88, 0x00, - 0x90, 0xc8, 0x9e, 0xbb, 0x88, 0x00, - 0x10, 0x17, 0x44, 0x72, 0xec, 0x00 -}; - -const uint8_t kMaskRandom39_27[162] = { - 0x84, 0x87, 0x01, 0xc0, 0x70, 0x00, - 0x27, 0x19, 0x86, 0x61, 0x98, 0x00, - 0x51, 0x88, 0x62, 0x18, 0x86, 0x00, - 0x1a, 0x22, 0xa8, 0xaa, 0x2a, 0x00, - 0x68, 0x44, 0x51, 0x14, 0x44, 0x00, - 0x89, 0x70, 0x1c, 0x07, 0x00, 0x00, - 0x8c, 0x23, 0x08, 0xc2, 0x30, 0x00, - 0x47, 0x19, 0x86, 0x61, 0x98, 0x00, - 0x81, 0x88, 0x62, 0x18, 0x86, 0x00, - 0x12, 0x86, 0x21, 0x88, 0x62, 0x00, - 0x58, 0x14, 0x45, 0x11, 0x44, 0x00, - 0x28, 0xca, 0x12, 0x84, 0xa0, 0x00, - 0x34, 0x60, 0x98, 0x26, 0x08, 0x00, - 0x8c, 0x23, 0x08, 0xc2, 0x30, 0x00, - 0x47, 0x19, 0x86, 0x61, 0x98, 0x00, - 0x81, 0x88, 0x62, 0x18, 0x86, 0x00, - 0x12, 0x86, 0x21, 0x88, 0x62, 0x00, - 0x58, 0x14, 0x45, 0x11, 0x44, 0x00, - 0x28, 0xca, 0x12, 0x84, 0xa0, 0x00, - 0x34, 0x60, 0x98, 0x26, 0x08, 0x00, - 0x84, 0x87, 0x01, 0xc0, 0x70, 0x00, - 0x27, 0x19, 0x86, 0x61, 0x98, 0x00, - 0x51, 0x88, 0x62, 0x18, 0x86, 0x00, - 0x1a, 0x22, 0xa8, 0xaa, 0x2a, 0x00, - 0x68, 0x44, 0x51, 0x14, 0x44, 0x00, - 0x89, 0x70, 0x1c, 0x07, 0x00, 0x00, - 0x6e, 0x27, 0x6a, 0xc7, 0xc4, 0x00 -}; - -const uint8_t kMaskRandom39_28[168] = { - 0x8c, 0x23, 0x08, 0xc2, 0x30, 0x00, - 0x47, 0x19, 0x86, 0x61, 0x98, 0x00, - 0x81, 0x88, 0x62, 0x18, 0x86, 0x00, - 0x12, 0x86, 0x21, 0x88, 0x62, 0x00, - 0x58, 0x14, 0x45, 0x11, 0x44, 0x00, - 0x28, 0xca, 0x12, 0x84, 0xa0, 0x00, - 0x34, 0x60, 0x98, 0x26, 0x08, 0x00, - 0x84, 0x87, 0x01, 0xc0, 0x70, 0x00, - 0x27, 0x19, 0x86, 0x61, 0x98, 0x00, - 0x51, 0x88, 0x62, 0x18, 0x86, 0x00, - 0x1a, 0x22, 0xa8, 0xaa, 0x2a, 0x00, - 0x68, 0x44, 0x51, 0x14, 0x44, 0x00, - 0x89, 0x70, 0x1c, 0x07, 0x00, 0x00, - 0x6e, 0x27, 0x6a, 0xc7, 0xc4, 0x00, - 0x84, 0x87, 0x01, 0xc0, 0x70, 0x00, - 0x27, 0x19, 0x86, 0x61, 0x98, 0x00, - 0x51, 0x88, 0x62, 0x18, 0x86, 0x00, - 0x1a, 0x22, 0xa8, 0xaa, 0x2a, 0x00, - 0x68, 0x44, 0x51, 0x14, 0x44, 0x00, - 0x89, 0x70, 0x1c, 0x07, 0x00, 0x00, - 0x8c, 0x23, 0x08, 0xc2, 0x30, 0x00, - 0x47, 0x19, 0x86, 0x61, 0x98, 0x00, - 0x81, 0x88, 0x62, 0x18, 0x86, 0x00, - 0x12, 0x86, 0x21, 0x88, 0x62, 0x00, - 0x58, 0x14, 0x45, 0x11, 0x44, 0x00, - 0x28, 0xca, 0x12, 0x84, 0xa0, 0x00, - 0x34, 0x60, 0x98, 0x26, 0x08, 0x00, - 0x86, 0xb6, 0x04, 0xbc, 0x1e, 0x00 -}; - -const uint8_t kMaskRandom39_29[174] = { - 0x8c, 0x23, 0x08, 0xc2, 0x30, 0x00, - 0x47, 0x19, 0x86, 0x61, 0x98, 0x00, - 0x81, 0x88, 0x62, 0x18, 0x86, 0x00, - 0x12, 0x86, 0x21, 0x88, 0x62, 0x00, - 0x58, 0x14, 0x45, 0x11, 0x44, 0x00, - 0x28, 0xca, 0x12, 0x84, 0xa0, 0x00, - 0x34, 0x60, 0x98, 0x26, 0x08, 0x00, - 0x84, 0x87, 0x01, 0xc0, 0x70, 0x00, - 0x27, 0x19, 0x86, 0x61, 0x98, 0x00, - 0x51, 0x88, 0x62, 0x18, 0x86, 0x00, - 0x1a, 0x22, 0xa8, 0xaa, 0x2a, 0x00, - 0x68, 0x44, 0x51, 0x14, 0x44, 0x00, - 0x89, 0x70, 0x1c, 0x07, 0x00, 0x00, - 0x6e, 0x27, 0x6a, 0xc7, 0xc4, 0x00, - 0x8c, 0x23, 0x08, 0xc2, 0x30, 0x00, - 0x47, 0x19, 0x86, 0x61, 0x98, 0x00, - 0x81, 0x88, 0x62, 0x18, 0x86, 0x00, - 0x12, 0x86, 0x21, 0x88, 0x62, 0x00, - 0x58, 0x14, 0x45, 0x11, 0x44, 0x00, - 0x28, 0xca, 0x12, 0x84, 0xa0, 0x00, - 0x34, 0x60, 0x98, 0x26, 0x08, 0x00, - 0x2c, 0x16, 0x05, 0x81, 0x60, 0x00, - 0x91, 0x40, 0xd0, 0x34, 0x0c, 0x00, - 0xc0, 0xd0, 0x34, 0x0d, 0x02, 0x00, - 0x06, 0x82, 0xa0, 0xa8, 0x2a, 0x00, - 0xc8, 0x0c, 0x43, 0x10, 0xc4, 0x00, - 0x45, 0x61, 0x18, 0x46, 0x10, 0x00, - 0x30, 0x91, 0x44, 0x51, 0x14, 0x00, - 0xa2, 0x28, 0x2a, 0x0a, 0x82, 0x00 -}; - -const uint8_t kMaskRandom39_3[18] = { - 0xcc, 0x67, 0x19, 0xc6, 0x70, 0x00, - 0x27, 0x2c, 0xca, 0xb2, 0xac, 0x00, - 0x92, 0xd2, 0x76, 0x2d, 0x46, 0x00 -}; - -const uint8_t kMaskRandom39_30[180] = { - 0x8c, 0x23, 0x08, 0xc2, 0x30, 0x00, - 0x47, 0x19, 0x86, 0x61, 0x98, 0x00, - 0x81, 0x88, 0x62, 0x18, 0x86, 0x00, - 0x12, 0x86, 0x21, 0x88, 0x62, 0x00, - 0x58, 0x14, 0x45, 0x11, 0x44, 0x00, - 0x28, 0xca, 0x12, 0x84, 0xa0, 0x00, - 0x34, 0x60, 0x98, 0x26, 0x08, 0x00, - 0x2c, 0x16, 0x05, 0x81, 0x60, 0x00, - 0x91, 0x40, 0xd0, 0x34, 0x0c, 0x00, - 0xc0, 0xd0, 0x34, 0x0d, 0x02, 0x00, - 0x06, 0x82, 0xa0, 0xa8, 0x2a, 0x00, - 0xc8, 0x0c, 0x43, 0x10, 0xc4, 0x00, - 0x45, 0x61, 0x18, 0x46, 0x10, 0x00, - 0x30, 0x91, 0x44, 0x51, 0x14, 0x00, - 0xa2, 0x28, 0x2a, 0x0a, 0x82, 0x00, - 0x8c, 0x23, 0x08, 0xc2, 0x30, 0x00, - 0x47, 0x19, 0x86, 0x61, 0x98, 0x00, - 0x81, 0x88, 0x62, 0x18, 0x86, 0x00, - 0x12, 0x86, 0x21, 0x88, 0x62, 0x00, - 0x58, 0x14, 0x45, 0x11, 0x44, 0x00, - 0x28, 0xca, 0x12, 0x84, 0xa0, 0x00, - 0x34, 0x60, 0x98, 0x26, 0x08, 0x00, - 0x84, 0x87, 0x01, 0xc0, 0x70, 0x00, - 0x27, 0x19, 0x86, 0x61, 0x98, 0x00, - 0x51, 0x88, 0x62, 0x18, 0x86, 0x00, - 0x1a, 0x22, 0xa8, 0xaa, 0x2a, 0x00, - 0x68, 0x44, 0x51, 0x14, 0x44, 0x00, - 0x89, 0x70, 0x1c, 0x07, 0x00, 0x00, - 0x6e, 0x27, 0x6a, 0xc7, 0xc4, 0x00, - 0xb3, 0x1d, 0x13, 0x03, 0x5a, 0x00 -}; - -const uint8_t kMaskRandom39_31[186] = { - 0x8c, 0x23, 0x08, 0xc2, 0x30, 0x00, - 0x47, 0x19, 0x86, 0x61, 0x98, 0x00, - 0x81, 0x88, 0x62, 0x18, 0x86, 0x00, - 0x12, 0x86, 0x21, 0x88, 0x62, 0x00, - 0x58, 0x14, 0x45, 0x11, 0x44, 0x00, - 0x28, 0xca, 0x12, 0x84, 0xa0, 0x00, - 0x34, 0x60, 0x98, 0x26, 0x08, 0x00, - 0x2c, 0x16, 0x05, 0x81, 0x60, 0x00, - 0x91, 0x40, 0xd0, 0x34, 0x0c, 0x00, - 0xc0, 0xd0, 0x34, 0x0d, 0x02, 0x00, - 0x06, 0x82, 0xa0, 0xa8, 0x2a, 0x00, - 0xc8, 0x0c, 0x43, 0x10, 0xc4, 0x00, - 0x45, 0x61, 0x18, 0x46, 0x10, 0x00, - 0x30, 0x91, 0x44, 0x51, 0x14, 0x00, - 0xa2, 0x28, 0x2a, 0x0a, 0x82, 0x00, - 0x2c, 0x16, 0x05, 0x81, 0x60, 0x00, - 0x91, 0x40, 0xd0, 0x34, 0x0c, 0x00, - 0xc0, 0xd0, 0x34, 0x0d, 0x02, 0x00, - 0x06, 0x82, 0xa0, 0xa8, 0x2a, 0x00, - 0xc8, 0x0c, 0x43, 0x10, 0xc4, 0x00, - 0x45, 0x61, 0x18, 0x46, 0x10, 0x00, - 0x30, 0x91, 0x44, 0x51, 0x14, 0x00, - 0xa2, 0x28, 0x2a, 0x0a, 0x82, 0x00, - 0x8c, 0x23, 0x08, 0xc2, 0x30, 0x00, - 0x47, 0x19, 0x86, 0x61, 0x98, 0x00, - 0x81, 0x88, 0x62, 0x18, 0x86, 0x00, - 0x12, 0x86, 0x21, 0x88, 0x62, 0x00, - 0x58, 0x14, 0x45, 0x11, 0x44, 0x00, - 0x28, 0xca, 0x12, 0x84, 0xa0, 0x00, - 0x34, 0x60, 0x98, 0x26, 0x08, 0x00, - 0x7e, 0x75, 0xe5, 0x03, 0x8c, 0x00 -}; - -const uint8_t kMaskRandom39_32[192] = { - 0x2c, 0x16, 0x05, 0x81, 0x60, 0x00, - 0x91, 0x40, 0xd0, 0x34, 0x0c, 0x00, - 0xc0, 0xd0, 0x34, 0x0d, 0x02, 0x00, - 0x06, 0x82, 0xa0, 0xa8, 0x2a, 0x00, - 0xc8, 0x0c, 0x43, 0x10, 0xc4, 0x00, - 0x45, 0x61, 0x18, 0x46, 0x10, 0x00, - 0x30, 0x91, 0x44, 0x51, 0x14, 0x00, - 0xa2, 0x28, 0x2a, 0x0a, 0x82, 0x00, - 0x8c, 0x23, 0x08, 0xc2, 0x30, 0x00, - 0x47, 0x19, 0x86, 0x61, 0x98, 0x00, - 0x81, 0x88, 0x62, 0x18, 0x86, 0x00, - 0x12, 0x86, 0x21, 0x88, 0x62, 0x00, - 0x58, 0x14, 0x45, 0x11, 0x44, 0x00, - 0x28, 0xca, 0x12, 0x84, 0xa0, 0x00, - 0x34, 0x60, 0x98, 0x26, 0x08, 0x00, - 0x7e, 0x75, 0xe5, 0x03, 0x8c, 0x00, - 0x8c, 0x23, 0x08, 0xc2, 0x30, 0x00, - 0x47, 0x19, 0x86, 0x61, 0x98, 0x00, - 0x81, 0x88, 0x62, 0x18, 0x86, 0x00, - 0x12, 0x86, 0x21, 0x88, 0x62, 0x00, - 0x58, 0x14, 0x45, 0x11, 0x44, 0x00, - 0x28, 0xca, 0x12, 0x84, 0xa0, 0x00, - 0x34, 0x60, 0x98, 0x26, 0x08, 0x00, - 0x2c, 0x16, 0x05, 0x81, 0x60, 0x00, - 0x91, 0x40, 0xd0, 0x34, 0x0c, 0x00, - 0xc0, 0xd0, 0x34, 0x0d, 0x02, 0x00, - 0x06, 0x82, 0xa0, 0xa8, 0x2a, 0x00, - 0xc8, 0x0c, 0x43, 0x10, 0xc4, 0x00, - 0x45, 0x61, 0x18, 0x46, 0x10, 0x00, - 0x30, 0x91, 0x44, 0x51, 0x14, 0x00, - 0xa2, 0x28, 0x2a, 0x0a, 0x82, 0x00, - 0x83, 0x1a, 0x3c, 0x2a, 0x7a, 0x00 -}; - -const uint8_t kMaskRandom39_33[198] = { - 0x2c, 0x16, 0x05, 0x81, 0x60, 0x00, - 0x91, 0x40, 0xd0, 0x34, 0x0c, 0x00, - 0xc0, 0xd0, 0x34, 0x0d, 0x02, 0x00, - 0x06, 0x82, 0xa0, 0xa8, 0x2a, 0x00, - 0xc8, 0x0c, 0x43, 0x10, 0xc4, 0x00, - 0x45, 0x61, 0x18, 0x46, 0x10, 0x00, - 0x30, 0x91, 0x44, 0x51, 0x14, 0x00, - 0xa2, 0x28, 0x2a, 0x0a, 0x82, 0x00, - 0x8c, 0x23, 0x08, 0xc2, 0x30, 0x00, - 0x47, 0x19, 0x86, 0x61, 0x98, 0x00, - 0x81, 0x88, 0x62, 0x18, 0x86, 0x00, - 0x12, 0x86, 0x21, 0x88, 0x62, 0x00, - 0x58, 0x14, 0x45, 0x11, 0x44, 0x00, - 0x28, 0xca, 0x12, 0x84, 0xa0, 0x00, - 0x34, 0x60, 0x98, 0x26, 0x08, 0x00, - 0x7e, 0x75, 0xe5, 0x03, 0x8c, 0x00, - 0x2c, 0x16, 0x05, 0x81, 0x60, 0x00, - 0x91, 0x40, 0xd0, 0x34, 0x0c, 0x00, - 0xc0, 0xd0, 0x34, 0x0d, 0x02, 0x00, - 0x06, 0x82, 0xa0, 0xa8, 0x2a, 0x00, - 0xc8, 0x0c, 0x43, 0x10, 0xc4, 0x00, - 0x45, 0x61, 0x18, 0x46, 0x10, 0x00, - 0x30, 0x91, 0x44, 0x51, 0x14, 0x00, - 0xa2, 0x28, 0x2a, 0x0a, 0x82, 0x00, - 0x4c, 0x27, 0x09, 0xc2, 0x70, 0x00, - 0x66, 0x71, 0x9c, 0x67, 0x18, 0x00, - 0x91, 0x40, 0xf0, 0x3c, 0x0e, 0x00, - 0x42, 0x90, 0xa4, 0x29, 0x0a, 0x00, - 0xa4, 0x29, 0x4a, 0x52, 0x94, 0x00, - 0x13, 0x5a, 0x16, 0x85, 0xa0, 0x00, - 0x30, 0x93, 0x44, 0xd1, 0x34, 0x00, - 0x88, 0xac, 0x2b, 0x0a, 0xc2, 0x00, - 0x09, 0x0c, 0xc3, 0x30, 0xcc, 0x00 -}; - -const uint8_t kMaskRandom39_34[204] = { - 0x2c, 0x16, 0x05, 0x81, 0x60, 0x00, - 0x91, 0x40, 0xd0, 0x34, 0x0c, 0x00, - 0xc0, 0xd0, 0x34, 0x0d, 0x02, 0x00, - 0x06, 0x82, 0xa0, 0xa8, 0x2a, 0x00, - 0xc8, 0x0c, 0x43, 0x10, 0xc4, 0x00, - 0x45, 0x61, 0x18, 0x46, 0x10, 0x00, - 0x30, 0x91, 0x44, 0x51, 0x14, 0x00, - 0xa2, 0x28, 0x2a, 0x0a, 0x82, 0x00, - 0x4c, 0x27, 0x09, 0xc2, 0x70, 0x00, - 0x66, 0x71, 0x9c, 0x67, 0x18, 0x00, - 0x91, 0x40, 0xf0, 0x3c, 0x0e, 0x00, - 0x42, 0x90, 0xa4, 0x29, 0x0a, 0x00, - 0xa4, 0x29, 0x4a, 0x52, 0x94, 0x00, - 0x13, 0x5a, 0x16, 0x85, 0xa0, 0x00, - 0x30, 0x93, 0x44, 0xd1, 0x34, 0x00, - 0x88, 0xac, 0x2b, 0x0a, 0xc2, 0x00, - 0x09, 0x0c, 0xc3, 0x30, 0xcc, 0x00, - 0x2c, 0x16, 0x05, 0x81, 0x60, 0x00, - 0x91, 0x40, 0xd0, 0x34, 0x0c, 0x00, - 0xc0, 0xd0, 0x34, 0x0d, 0x02, 0x00, - 0x06, 0x82, 0xa0, 0xa8, 0x2a, 0x00, - 0xc8, 0x0c, 0x43, 0x10, 0xc4, 0x00, - 0x45, 0x61, 0x18, 0x46, 0x10, 0x00, - 0x30, 0x91, 0x44, 0x51, 0x14, 0x00, - 0xa2, 0x28, 0x2a, 0x0a, 0x82, 0x00, - 0x8c, 0x23, 0x08, 0xc2, 0x30, 0x00, - 0x47, 0x19, 0x86, 0x61, 0x98, 0x00, - 0x81, 0x88, 0x62, 0x18, 0x86, 0x00, - 0x12, 0x86, 0x21, 0x88, 0x62, 0x00, - 0x58, 0x14, 0x45, 0x11, 0x44, 0x00, - 0x28, 0xca, 0x12, 0x84, 0xa0, 0x00, - 0x34, 0x60, 0x98, 0x26, 0x08, 0x00, - 0x7e, 0x75, 0xe5, 0x03, 0x8c, 0x00, - 0xc6, 0xbb, 0x7e, 0xd9, 0x80, 0x00 -}; - -const uint8_t kMaskRandom39_35[210] = { - 0x2c, 0x16, 0x05, 0x81, 0x60, 0x00, - 0x91, 0x40, 0xd0, 0x34, 0x0c, 0x00, - 0xc0, 0xd0, 0x34, 0x0d, 0x02, 0x00, - 0x06, 0x82, 0xa0, 0xa8, 0x2a, 0x00, - 0xc8, 0x0c, 0x43, 0x10, 0xc4, 0x00, - 0x45, 0x61, 0x18, 0x46, 0x10, 0x00, - 0x30, 0x91, 0x44, 0x51, 0x14, 0x00, - 0xa2, 0x28, 0x2a, 0x0a, 0x82, 0x00, - 0x4c, 0x27, 0x09, 0xc2, 0x70, 0x00, - 0x66, 0x71, 0x9c, 0x67, 0x18, 0x00, - 0x91, 0x40, 0xf0, 0x3c, 0x0e, 0x00, - 0x42, 0x90, 0xa4, 0x29, 0x0a, 0x00, - 0xa4, 0x29, 0x4a, 0x52, 0x94, 0x00, - 0x13, 0x5a, 0x16, 0x85, 0xa0, 0x00, - 0x30, 0x93, 0x44, 0xd1, 0x34, 0x00, - 0x88, 0xac, 0x2b, 0x0a, 0xc2, 0x00, - 0x09, 0x0c, 0xc3, 0x30, 0xcc, 0x00, - 0x4c, 0x27, 0x09, 0xc2, 0x70, 0x00, - 0x66, 0x71, 0x9c, 0x67, 0x18, 0x00, - 0x91, 0x40, 0xf0, 0x3c, 0x0e, 0x00, - 0x42, 0x90, 0xa4, 0x29, 0x0a, 0x00, - 0xa4, 0x29, 0x4a, 0x52, 0x94, 0x00, - 0x13, 0x5a, 0x16, 0x85, 0xa0, 0x00, - 0x30, 0x93, 0x44, 0xd1, 0x34, 0x00, - 0x88, 0xac, 0x2b, 0x0a, 0xc2, 0x00, - 0x09, 0x0c, 0xc3, 0x30, 0xcc, 0x00, - 0x2c, 0x16, 0x05, 0x81, 0x60, 0x00, - 0x91, 0x40, 0xd0, 0x34, 0x0c, 0x00, - 0xc0, 0xd0, 0x34, 0x0d, 0x02, 0x00, - 0x06, 0x82, 0xa0, 0xa8, 0x2a, 0x00, - 0xc8, 0x0c, 0x43, 0x10, 0xc4, 0x00, - 0x45, 0x61, 0x18, 0x46, 0x10, 0x00, - 0x30, 0x91, 0x44, 0x51, 0x14, 0x00, - 0xa2, 0x28, 0x2a, 0x0a, 0x82, 0x00, - 0x51, 0x97, 0x24, 0x2f, 0x7e, 0x00 -}; - -const uint8_t kMaskRandom39_36[216] = { - 0x4c, 0x27, 0x09, 0xc2, 0x70, 0x00, - 0x66, 0x71, 0x9c, 0x67, 0x18, 0x00, - 0x91, 0x40, 0xf0, 0x3c, 0x0e, 0x00, - 0x42, 0x90, 0xa4, 0x29, 0x0a, 0x00, - 0xa4, 0x29, 0x4a, 0x52, 0x94, 0x00, - 0x13, 0x5a, 0x16, 0x85, 0xa0, 0x00, - 0x30, 0x93, 0x44, 0xd1, 0x34, 0x00, - 0x88, 0xac, 0x2b, 0x0a, 0xc2, 0x00, - 0x09, 0x0c, 0xc3, 0x30, 0xcc, 0x00, - 0x2c, 0x16, 0x05, 0x81, 0x60, 0x00, - 0x91, 0x40, 0xd0, 0x34, 0x0c, 0x00, - 0xc0, 0xd0, 0x34, 0x0d, 0x02, 0x00, - 0x06, 0x82, 0xa0, 0xa8, 0x2a, 0x00, - 0xc8, 0x0c, 0x43, 0x10, 0xc4, 0x00, - 0x45, 0x61, 0x18, 0x46, 0x10, 0x00, - 0x30, 0x91, 0x44, 0x51, 0x14, 0x00, - 0xa2, 0x28, 0x2a, 0x0a, 0x82, 0x00, - 0x51, 0x97, 0x24, 0x2f, 0x7e, 0x00, - 0x2c, 0x16, 0x05, 0x81, 0x60, 0x00, - 0x91, 0x40, 0xd0, 0x34, 0x0c, 0x00, - 0xc0, 0xd0, 0x34, 0x0d, 0x02, 0x00, - 0x06, 0x82, 0xa0, 0xa8, 0x2a, 0x00, - 0xc8, 0x0c, 0x43, 0x10, 0xc4, 0x00, - 0x45, 0x61, 0x18, 0x46, 0x10, 0x00, - 0x30, 0x91, 0x44, 0x51, 0x14, 0x00, - 0xa2, 0x28, 0x2a, 0x0a, 0x82, 0x00, - 0x4c, 0x27, 0x09, 0xc2, 0x70, 0x00, - 0x66, 0x71, 0x9c, 0x67, 0x18, 0x00, - 0x91, 0x40, 0xf0, 0x3c, 0x0e, 0x00, - 0x42, 0x90, 0xa4, 0x29, 0x0a, 0x00, - 0xa4, 0x29, 0x4a, 0x52, 0x94, 0x00, - 0x13, 0x5a, 0x16, 0x85, 0xa0, 0x00, - 0x30, 0x93, 0x44, 0xd1, 0x34, 0x00, - 0x88, 0xac, 0x2b, 0x0a, 0xc2, 0x00, - 0x09, 0x0c, 0xc3, 0x30, 0xcc, 0x00, - 0x11, 0x78, 0xfe, 0x43, 0xd6, 0x00 -}; - -const uint8_t kMaskRandom39_37[222] = { - 0x4c, 0x27, 0x09, 0xc2, 0x70, 0x00, - 0x66, 0x71, 0x9c, 0x67, 0x18, 0x00, - 0x91, 0x40, 0xf0, 0x3c, 0x0e, 0x00, - 0x42, 0x90, 0xa4, 0x29, 0x0a, 0x00, - 0xa4, 0x29, 0x4a, 0x52, 0x94, 0x00, - 0x13, 0x5a, 0x16, 0x85, 0xa0, 0x00, - 0x30, 0x93, 0x44, 0xd1, 0x34, 0x00, - 0x88, 0xac, 0x2b, 0x0a, 0xc2, 0x00, - 0x09, 0x0c, 0xc3, 0x30, 0xcc, 0x00, - 0x2c, 0x16, 0x05, 0x81, 0x60, 0x00, - 0x91, 0x40, 0xd0, 0x34, 0x0c, 0x00, - 0xc0, 0xd0, 0x34, 0x0d, 0x02, 0x00, - 0x06, 0x82, 0xa0, 0xa8, 0x2a, 0x00, - 0xc8, 0x0c, 0x43, 0x10, 0xc4, 0x00, - 0x45, 0x61, 0x18, 0x46, 0x10, 0x00, - 0x30, 0x91, 0x44, 0x51, 0x14, 0x00, - 0xa2, 0x28, 0x2a, 0x0a, 0x82, 0x00, - 0x51, 0x97, 0x24, 0x2f, 0x7e, 0x00, - 0x4c, 0x27, 0x09, 0xc2, 0x70, 0x00, - 0x66, 0x71, 0x9c, 0x67, 0x18, 0x00, - 0x91, 0x40, 0xf0, 0x3c, 0x0e, 0x00, - 0x42, 0x90, 0xa4, 0x29, 0x0a, 0x00, - 0xa4, 0x29, 0x4a, 0x52, 0x94, 0x00, - 0x13, 0x5a, 0x16, 0x85, 0xa0, 0x00, - 0x30, 0x93, 0x44, 0xd1, 0x34, 0x00, - 0x88, 0xac, 0x2b, 0x0a, 0xc2, 0x00, - 0x09, 0x0c, 0xc3, 0x30, 0xcc, 0x00, - 0x4c, 0x26, 0x09, 0x82, 0x60, 0x00, - 0x66, 0x28, 0x8a, 0x22, 0x88, 0x00, - 0x91, 0x50, 0x34, 0x0d, 0x02, 0x00, - 0x42, 0x82, 0x60, 0x98, 0x26, 0x00, - 0xa4, 0x01, 0xc0, 0x70, 0x1c, 0x00, - 0x13, 0x43, 0x10, 0xc4, 0x30, 0x00, - 0x30, 0x94, 0x85, 0x21, 0x48, 0x00, - 0x88, 0xa1, 0x28, 0x4a, 0x12, 0x00, - 0x09, 0x4c, 0x13, 0x04, 0xc0, 0x00, - 0xcd, 0x98, 0x46, 0x11, 0x84, 0x00 -}; - -const uint8_t kMaskRandom39_38[228] = { - 0x4c, 0x27, 0x09, 0xc2, 0x70, 0x00, - 0x66, 0x71, 0x9c, 0x67, 0x18, 0x00, - 0x91, 0x40, 0xf0, 0x3c, 0x0e, 0x00, - 0x42, 0x90, 0xa4, 0x29, 0x0a, 0x00, - 0xa4, 0x29, 0x4a, 0x52, 0x94, 0x00, - 0x13, 0x5a, 0x16, 0x85, 0xa0, 0x00, - 0x30, 0x93, 0x44, 0xd1, 0x34, 0x00, - 0x88, 0xac, 0x2b, 0x0a, 0xc2, 0x00, - 0x09, 0x0c, 0xc3, 0x30, 0xcc, 0x00, - 0x4c, 0x26, 0x09, 0x82, 0x60, 0x00, - 0x66, 0x28, 0x8a, 0x22, 0x88, 0x00, - 0x91, 0x50, 0x34, 0x0d, 0x02, 0x00, - 0x42, 0x82, 0x60, 0x98, 0x26, 0x00, - 0xa4, 0x01, 0xc0, 0x70, 0x1c, 0x00, - 0x13, 0x43, 0x10, 0xc4, 0x30, 0x00, - 0x30, 0x94, 0x85, 0x21, 0x48, 0x00, - 0x88, 0xa1, 0x28, 0x4a, 0x12, 0x00, - 0x09, 0x4c, 0x13, 0x04, 0xc0, 0x00, - 0xcd, 0x98, 0x46, 0x11, 0x84, 0x00, - 0x4c, 0x27, 0x09, 0xc2, 0x70, 0x00, - 0x66, 0x71, 0x9c, 0x67, 0x18, 0x00, - 0x91, 0x40, 0xf0, 0x3c, 0x0e, 0x00, - 0x42, 0x90, 0xa4, 0x29, 0x0a, 0x00, - 0xa4, 0x29, 0x4a, 0x52, 0x94, 0x00, - 0x13, 0x5a, 0x16, 0x85, 0xa0, 0x00, - 0x30, 0x93, 0x44, 0xd1, 0x34, 0x00, - 0x88, 0xac, 0x2b, 0x0a, 0xc2, 0x00, - 0x09, 0x0c, 0xc3, 0x30, 0xcc, 0x00, - 0x2c, 0x16, 0x05, 0x81, 0x60, 0x00, - 0x91, 0x40, 0xd0, 0x34, 0x0c, 0x00, - 0xc0, 0xd0, 0x34, 0x0d, 0x02, 0x00, - 0x06, 0x82, 0xa0, 0xa8, 0x2a, 0x00, - 0xc8, 0x0c, 0x43, 0x10, 0xc4, 0x00, - 0x45, 0x61, 0x18, 0x46, 0x10, 0x00, - 0x30, 0x91, 0x44, 0x51, 0x14, 0x00, - 0xa2, 0x28, 0x2a, 0x0a, 0x82, 0x00, - 0x51, 0x97, 0x24, 0x2f, 0x7e, 0x00, - 0x9e, 0xd8, 0x3c, 0x7e, 0x2e, 0x00 -}; - -const uint8_t kMaskRandom39_39[234] = { - 0x4c, 0x27, 0x09, 0xc2, 0x70, 0x00, - 0x66, 0x71, 0x9c, 0x67, 0x18, 0x00, - 0x91, 0x40, 0xf0, 0x3c, 0x0e, 0x00, - 0x42, 0x90, 0xa4, 0x29, 0x0a, 0x00, - 0xa4, 0x29, 0x4a, 0x52, 0x94, 0x00, - 0x13, 0x5a, 0x16, 0x85, 0xa0, 0x00, - 0x30, 0x93, 0x44, 0xd1, 0x34, 0x00, - 0x88, 0xac, 0x2b, 0x0a, 0xc2, 0x00, - 0x09, 0x0c, 0xc3, 0x30, 0xcc, 0x00, - 0x4c, 0x26, 0x09, 0x82, 0x60, 0x00, - 0x66, 0x28, 0x8a, 0x22, 0x88, 0x00, - 0x91, 0x50, 0x34, 0x0d, 0x02, 0x00, - 0x42, 0x82, 0x60, 0x98, 0x26, 0x00, - 0xa4, 0x01, 0xc0, 0x70, 0x1c, 0x00, - 0x13, 0x43, 0x10, 0xc4, 0x30, 0x00, - 0x30, 0x94, 0x85, 0x21, 0x48, 0x00, - 0x88, 0xa1, 0x28, 0x4a, 0x12, 0x00, - 0x09, 0x4c, 0x13, 0x04, 0xc0, 0x00, - 0xcd, 0x98, 0x46, 0x11, 0x84, 0x00, - 0x4c, 0x27, 0x09, 0x82, 0x60, 0x00, - 0x66, 0x71, 0x8a, 0x22, 0x88, 0x00, - 0x91, 0x40, 0xf4, 0x0d, 0x02, 0x00, - 0x42, 0x90, 0xa0, 0x98, 0x26, 0x00, - 0xa4, 0x29, 0x40, 0x70, 0x1c, 0x00, - 0x13, 0x5a, 0x10, 0xc4, 0x30, 0x00, - 0x30, 0x93, 0x45, 0x21, 0x48, 0x00, - 0x88, 0xac, 0x28, 0x4a, 0x12, 0x00, - 0x09, 0x0c, 0xd3, 0x04, 0xc0, 0x00, - 0x4c, 0x26, 0x06, 0x11, 0x84, 0x00, - 0x66, 0x28, 0x89, 0xc2, 0x70, 0x00, - 0x91, 0x50, 0x3c, 0x67, 0x18, 0x00, - 0x42, 0x82, 0x70, 0x3c, 0x0e, 0x00, - 0xa4, 0x01, 0xc4, 0x29, 0x0a, 0x00, - 0x13, 0x43, 0x0a, 0x52, 0x94, 0x00, - 0x30, 0x94, 0x96, 0x85, 0xa0, 0x00, - 0x88, 0xa1, 0x24, 0xd1, 0x34, 0x00, - 0x09, 0x4c, 0x0b, 0x0a, 0xc2, 0x00, - 0xcd, 0x98, 0x43, 0x30, 0xcc, 0x00, - 0x1d, 0x04, 0x3e, 0xf1, 0xb4, 0x00 -}; - -const uint8_t kMaskRandom39_4[24] = { - 0xec, 0x73, 0x1c, 0xc7, 0x30, 0x00, - 0x67, 0x19, 0xc6, 0x71, 0x9c, 0x00, - 0xb1, 0xcc, 0x73, 0x1c, 0xc6, 0x00, - 0x5a, 0x96, 0xa5, 0xa9, 0x6a, 0x00 -}; - -const uint8_t kMaskRandom39_5[30] = { - 0x4c, 0xe7, 0x19, 0xc6, 0x70, 0x00, - 0x66, 0x31, 0xcc, 0x73, 0x1c, 0x00, - 0xa1, 0xcc, 0x73, 0x1c, 0xa6, 0x00, - 0x92, 0xa6, 0xa5, 0x6a, 0x6a, 0x00, - 0xb8, 0x99, 0x96, 0x8b, 0x94, 0x00 -}; - -const uint8_t kMaskRandom39_6[36] = { - 0x4c, 0x36, 0x09, 0x83, 0x60, 0x00, - 0x45, 0x68, 0x8a, 0x26, 0x88, 0x00, - 0x30, 0xd0, 0x64, 0x1d, 0x06, 0x00, - 0x8a, 0x82, 0xb0, 0xa8, 0x2a, 0x00, - 0x26, 0x0b, 0x40, 0xd0, 0xd4, 0x00, - 0x95, 0x45, 0x13, 0x44, 0x30, 0x00 -}; - -const uint8_t kMaskRandom39_7[42] = { - 0xc4, 0xa3, 0x09, 0xc2, 0x30, 0x00, - 0x23, 0x19, 0x86, 0x65, 0x80, 0x00, - 0x91, 0x1c, 0x22, 0x01, 0xd6, 0x00, - 0x4a, 0x82, 0xb0, 0x2a, 0x2a, 0x00, - 0x34, 0x49, 0x44, 0x98, 0x94, 0x00, - 0x8b, 0x4a, 0x1a, 0x84, 0x60, 0x00, - 0xc8, 0x24, 0xc1, 0x94, 0x4c, 0x00 -}; - -const uint8_t kMaskRandom39_8[48] = { - 0x16, 0x13, 0x84, 0xe1, 0x38, 0x00, - 0xc2, 0x44, 0xd1, 0x34, 0x4c, 0x00, - 0x60, 0xe8, 0x3a, 0x0e, 0x82, 0x00, - 0x85, 0x12, 0x64, 0x99, 0x26, 0x00, - 0xcc, 0x21, 0x5c, 0x52, 0x14, 0x00, - 0x29, 0x63, 0x18, 0xc6, 0x30, 0x00, - 0x11, 0x98, 0xc6, 0x31, 0x8c, 0x00, - 0xb0, 0x0c, 0x63, 0x18, 0xc6, 0x00 -}; - -const uint8_t kMaskRandom39_9[54] = { - 0x44, 0xa7, 0x09, 0xc2, 0x70, 0x00, - 0x66, 0x70, 0x8c, 0x47, 0x18, 0x00, - 0x12, 0xc0, 0xf0, 0x3c, 0x0e, 0x00, - 0xc3, 0x10, 0xbc, 0x29, 0x0a, 0x00, - 0x8c, 0x29, 0x42, 0x72, 0x94, 0x00, - 0x11, 0x5b, 0x16, 0x85, 0xa0, 0x00, - 0x21, 0x93, 0x44, 0xd1, 0x34, 0x00, - 0xa2, 0x2c, 0x0b, 0x0a, 0xc2, 0x00, - 0x18, 0x0c, 0xe9, 0x30, 0xca, 0x00 -}; - -const uint8_t kMaskRandom3_1[2] = { - 0xe0, 0x00 -}; - -const uint8_t kMaskRandom3_2[4] = { - 0xc0, 0x00, - 0xa0, 0x00 -}; - -const uint8_t kMaskRandom3_3[6] = { - 0xc0, 0x00, - 0xa0, 0x00, - 0x60, 0x00 -}; - -const uint8_t kMaskRandom40_1[6] = { - 0xff, 0xff, 0xff, 0xff, 0xff, 0x00 -}; - -const uint8_t kMaskRandom40_10[60] = { - 0x4c, 0x13, 0x04, 0xc1, 0x30, 0x00, - 0x51, 0x14, 0x45, 0x11, 0x44, 0x00, - 0xa0, 0x68, 0x1a, 0x06, 0x81, 0x00, - 0x04, 0xc1, 0x30, 0x4c, 0x13, 0x00, - 0x03, 0x80, 0xe0, 0x38, 0x0e, 0x00, - 0x86, 0x21, 0x88, 0x62, 0x18, 0x00, - 0x29, 0x0a, 0x42, 0x90, 0xa4, 0x00, - 0x42, 0x50, 0x94, 0x25, 0x09, 0x00, - 0x98, 0x26, 0x09, 0x82, 0x60, 0x00, - 0x30, 0x8c, 0x23, 0x08, 0xc2, 0x00 -}; - -const uint8_t kMaskRandom40_11[66] = { - 0xc6, 0x31, 0x8c, 0x63, 0x18, 0x00, - 0x23, 0x88, 0xe2, 0x38, 0x8e, 0x00, - 0x1a, 0x46, 0x91, 0xa4, 0x69, 0x00, - 0x24, 0xc9, 0x32, 0x4c, 0x93, 0x00, - 0x71, 0x1c, 0x47, 0x11, 0xc4, 0x00, - 0x0e, 0x03, 0x80, 0xe0, 0x38, 0x00, - 0x33, 0x0c, 0xc3, 0x30, 0xcc, 0x00, - 0x10, 0xc4, 0x31, 0x0c, 0x43, 0x00, - 0x45, 0x51, 0x54, 0x55, 0x15, 0x00, - 0x88, 0xa2, 0x28, 0x8a, 0x22, 0x00, - 0xe0, 0x38, 0x0e, 0x03, 0x80, 0x00 -}; - -const uint8_t kMaskRandom40_12[72] = { - 0x0e, 0x03, 0x80, 0xe0, 0x38, 0x00, - 0x33, 0x0c, 0xc3, 0x30, 0xcc, 0x00, - 0x10, 0xc4, 0x31, 0x0c, 0x43, 0x00, - 0x45, 0x51, 0x54, 0x55, 0x15, 0x00, - 0x88, 0xa2, 0x28, 0x8a, 0x22, 0x00, - 0xe0, 0x38, 0x0e, 0x03, 0x80, 0x00, - 0xc6, 0x31, 0x8c, 0x63, 0x18, 0x00, - 0x23, 0x88, 0xe2, 0x38, 0x8e, 0x00, - 0x1a, 0x46, 0x91, 0xa4, 0x69, 0x00, - 0x24, 0xc9, 0x32, 0x4c, 0x93, 0x00, - 0x71, 0x1c, 0x47, 0x11, 0xc4, 0x00, - 0xf5, 0xdc, 0x4f, 0x5d, 0xc4, 0x00 -}; - -const uint8_t kMaskRandom40_13[78] = { - 0x0e, 0x03, 0x80, 0xe0, 0x38, 0x00, - 0x33, 0x0c, 0xc3, 0x30, 0xcc, 0x00, - 0x10, 0xc4, 0x31, 0x0c, 0x43, 0x00, - 0x45, 0x51, 0x54, 0x55, 0x15, 0x00, - 0x88, 0xa2, 0x28, 0x8a, 0x22, 0x00, - 0xe0, 0x38, 0x0e, 0x03, 0x80, 0x00, - 0x46, 0x11, 0x84, 0x61, 0x18, 0x00, - 0x33, 0x0c, 0xc3, 0x30, 0xcc, 0x00, - 0x10, 0xc4, 0x31, 0x0c, 0x43, 0x00, - 0x0c, 0x43, 0x10, 0xc4, 0x31, 0x00, - 0x28, 0x8a, 0x22, 0x88, 0xa2, 0x00, - 0x94, 0x25, 0x09, 0x42, 0x50, 0x00, - 0xc1, 0x30, 0x4c, 0x13, 0x04, 0x00 -}; - -const uint8_t kMaskRandom40_14[84] = { - 0x46, 0x11, 0x84, 0x61, 0x18, 0x00, - 0x33, 0x0c, 0xc3, 0x30, 0xcc, 0x00, - 0x10, 0xc4, 0x31, 0x0c, 0x43, 0x00, - 0x0c, 0x43, 0x10, 0xc4, 0x31, 0x00, - 0x28, 0x8a, 0x22, 0x88, 0xa2, 0x00, - 0x94, 0x25, 0x09, 0x42, 0x50, 0x00, - 0xc1, 0x30, 0x4c, 0x13, 0x04, 0x00, - 0x0e, 0x03, 0x80, 0xe0, 0x38, 0x00, - 0x33, 0x0c, 0xc3, 0x30, 0xcc, 0x00, - 0x10, 0xc4, 0x31, 0x0c, 0x43, 0x00, - 0x45, 0x51, 0x54, 0x55, 0x15, 0x00, - 0x88, 0xa2, 0x28, 0x8a, 0x22, 0x00, - 0xe0, 0x38, 0x0e, 0x03, 0x80, 0x00, - 0x56, 0x3e, 0x25, 0x63, 0xe2, 0x00 -}; - -const uint8_t kMaskRandom40_15[90] = { - 0x46, 0x11, 0x84, 0x61, 0x18, 0x00, - 0x33, 0x0c, 0xc3, 0x30, 0xcc, 0x00, - 0x10, 0xc4, 0x31, 0x0c, 0x43, 0x00, - 0x0c, 0x43, 0x10, 0xc4, 0x31, 0x00, - 0x28, 0x8a, 0x22, 0x88, 0xa2, 0x00, - 0x94, 0x25, 0x09, 0x42, 0x50, 0x00, - 0xc1, 0x30, 0x4c, 0x13, 0x04, 0x00, - 0x2c, 0x0b, 0x02, 0xc0, 0xb0, 0x00, - 0x81, 0xa0, 0x68, 0x1a, 0x06, 0x00, - 0xa0, 0x68, 0x1a, 0x06, 0x81, 0x00, - 0x05, 0x41, 0x50, 0x54, 0x15, 0x00, - 0x18, 0x86, 0x21, 0x88, 0x62, 0x00, - 0xc2, 0x30, 0x8c, 0x23, 0x08, 0x00, - 0x22, 0x88, 0xa2, 0x28, 0x8a, 0x00, - 0x50, 0x54, 0x15, 0x05, 0x41, 0x00 -}; - -const uint8_t kMaskRandom40_16[96] = { - 0x2c, 0x0b, 0x02, 0xc0, 0xb0, 0x00, - 0x81, 0xa0, 0x68, 0x1a, 0x06, 0x00, - 0xa0, 0x68, 0x1a, 0x06, 0x81, 0x00, - 0x05, 0x41, 0x50, 0x54, 0x15, 0x00, - 0x18, 0x86, 0x21, 0x88, 0x62, 0x00, - 0xc2, 0x30, 0x8c, 0x23, 0x08, 0x00, - 0x22, 0x88, 0xa2, 0x28, 0x8a, 0x00, - 0x50, 0x54, 0x15, 0x05, 0x41, 0x00, - 0x46, 0x11, 0x84, 0x61, 0x18, 0x00, - 0x33, 0x0c, 0xc3, 0x30, 0xcc, 0x00, - 0x10, 0xc4, 0x31, 0x0c, 0x43, 0x00, - 0x0c, 0x43, 0x10, 0xc4, 0x31, 0x00, - 0x28, 0x8a, 0x22, 0x88, 0xa2, 0x00, - 0x94, 0x25, 0x09, 0x42, 0x50, 0x00, - 0xc1, 0x30, 0x4c, 0x13, 0x04, 0x00, - 0x28, 0x1c, 0x62, 0x81, 0xc6, 0x00 -}; - -const uint8_t kMaskRandom40_17[102] = { - 0x2c, 0x0b, 0x02, 0xc0, 0xb0, 0x00, - 0x81, 0xa0, 0x68, 0x1a, 0x06, 0x00, - 0xa0, 0x68, 0x1a, 0x06, 0x81, 0x00, - 0x05, 0x41, 0x50, 0x54, 0x15, 0x00, - 0x18, 0x86, 0x21, 0x88, 0x62, 0x00, - 0xc2, 0x30, 0x8c, 0x23, 0x08, 0x00, - 0x22, 0x88, 0xa2, 0x28, 0x8a, 0x00, - 0x50, 0x54, 0x15, 0x05, 0x41, 0x00, - 0x4e, 0x13, 0x84, 0xe1, 0x38, 0x00, - 0xe3, 0x38, 0xce, 0x33, 0x8c, 0x00, - 0x81, 0xe0, 0x78, 0x1e, 0x07, 0x00, - 0x21, 0x48, 0x52, 0x14, 0x85, 0x00, - 0x52, 0x94, 0xa5, 0x29, 0x4a, 0x00, - 0xb4, 0x2d, 0x0b, 0x42, 0xd0, 0x00, - 0x26, 0x89, 0xa2, 0x68, 0x9a, 0x00, - 0x58, 0x56, 0x15, 0x85, 0x61, 0x00, - 0x19, 0x86, 0x61, 0x98, 0x66, 0x00 -}; - -const uint8_t kMaskRandom40_18[108] = { - 0x4e, 0x13, 0x84, 0xe1, 0x38, 0x00, - 0xe3, 0x38, 0xce, 0x33, 0x8c, 0x00, - 0x81, 0xe0, 0x78, 0x1e, 0x07, 0x00, - 0x21, 0x48, 0x52, 0x14, 0x85, 0x00, - 0x52, 0x94, 0xa5, 0x29, 0x4a, 0x00, - 0xb4, 0x2d, 0x0b, 0x42, 0xd0, 0x00, - 0x26, 0x89, 0xa2, 0x68, 0x9a, 0x00, - 0x58, 0x56, 0x15, 0x85, 0x61, 0x00, - 0x19, 0x86, 0x61, 0x98, 0x66, 0x00, - 0x2c, 0x0b, 0x02, 0xc0, 0xb0, 0x00, - 0x81, 0xa0, 0x68, 0x1a, 0x06, 0x00, - 0xa0, 0x68, 0x1a, 0x06, 0x81, 0x00, - 0x05, 0x41, 0x50, 0x54, 0x15, 0x00, - 0x18, 0x86, 0x21, 0x88, 0x62, 0x00, - 0xc2, 0x30, 0x8c, 0x23, 0x08, 0x00, - 0x22, 0x88, 0xa2, 0x28, 0x8a, 0x00, - 0x50, 0x54, 0x15, 0x05, 0x41, 0x00, - 0x21, 0x7b, 0xf2, 0x17, 0xbf, 0x00 -}; - -const uint8_t kMaskRandom40_19[114] = { - 0x4e, 0x13, 0x84, 0xe1, 0x38, 0x00, - 0xe3, 0x38, 0xce, 0x33, 0x8c, 0x00, - 0x81, 0xe0, 0x78, 0x1e, 0x07, 0x00, - 0x21, 0x48, 0x52, 0x14, 0x85, 0x00, - 0x52, 0x94, 0xa5, 0x29, 0x4a, 0x00, - 0xb4, 0x2d, 0x0b, 0x42, 0xd0, 0x00, - 0x26, 0x89, 0xa2, 0x68, 0x9a, 0x00, - 0x58, 0x56, 0x15, 0x85, 0x61, 0x00, - 0x19, 0x86, 0x61, 0x98, 0x66, 0x00, - 0x4c, 0x13, 0x04, 0xc1, 0x30, 0x00, - 0x51, 0x14, 0x45, 0x11, 0x44, 0x00, - 0xa0, 0x68, 0x1a, 0x06, 0x81, 0x00, - 0x04, 0xc1, 0x30, 0x4c, 0x13, 0x00, - 0x03, 0x80, 0xe0, 0x38, 0x0e, 0x00, - 0x86, 0x21, 0x88, 0x62, 0x18, 0x00, - 0x29, 0x0a, 0x42, 0x90, 0xa4, 0x00, - 0x42, 0x50, 0x94, 0x25, 0x09, 0x00, - 0x98, 0x26, 0x09, 0x82, 0x60, 0x00, - 0x30, 0x8c, 0x23, 0x08, 0xc2, 0x00 -}; - -const uint8_t kMaskRandom40_2[12] = { - 0xee, 0x3b, 0x8e, 0xe3, 0xb8, 0x00, - 0x99, 0xe6, 0x79, 0x9e, 0x67, 0x00 -}; - -const uint8_t kMaskRandom40_20[120] = { - 0x4c, 0x13, 0x04, 0xc1, 0x30, 0x00, - 0x51, 0x14, 0x45, 0x11, 0x44, 0x00, - 0xa0, 0x68, 0x1a, 0x06, 0x81, 0x00, - 0x04, 0xc1, 0x30, 0x4c, 0x13, 0x00, - 0x03, 0x80, 0xe0, 0x38, 0x0e, 0x00, - 0x86, 0x21, 0x88, 0x62, 0x18, 0x00, - 0x29, 0x0a, 0x42, 0x90, 0xa4, 0x00, - 0x42, 0x50, 0x94, 0x25, 0x09, 0x00, - 0x98, 0x26, 0x09, 0x82, 0x60, 0x00, - 0x30, 0x8c, 0x23, 0x08, 0xc2, 0x00, - 0x4e, 0x13, 0x84, 0xe1, 0x38, 0x00, - 0xe3, 0x38, 0xce, 0x33, 0x8c, 0x00, - 0x81, 0xe0, 0x78, 0x1e, 0x07, 0x00, - 0x21, 0x48, 0x52, 0x14, 0x85, 0x00, - 0x52, 0x94, 0xa5, 0x29, 0x4a, 0x00, - 0xb4, 0x2d, 0x0b, 0x42, 0xd0, 0x00, - 0x26, 0x89, 0xa2, 0x68, 0x9a, 0x00, - 0x58, 0x56, 0x15, 0x85, 0x61, 0x00, - 0x19, 0x86, 0x61, 0x98, 0x66, 0x00, - 0xf7, 0x8d, 0xaf, 0x78, 0xda, 0x00 -}; - -const uint8_t kMaskRandom40_21[126] = { - 0x4c, 0x13, 0x04, 0xc1, 0x30, 0x00, - 0x51, 0x14, 0x45, 0x11, 0x44, 0x00, - 0xa0, 0x68, 0x1a, 0x06, 0x81, 0x00, - 0x04, 0xc1, 0x30, 0x4c, 0x13, 0x00, - 0x03, 0x80, 0xe0, 0x38, 0x0e, 0x00, - 0x86, 0x21, 0x88, 0x62, 0x18, 0x00, - 0x29, 0x0a, 0x42, 0x90, 0xa4, 0x00, - 0x42, 0x50, 0x94, 0x25, 0x09, 0x00, - 0x98, 0x26, 0x09, 0x82, 0x60, 0x00, - 0x30, 0x8c, 0x23, 0x08, 0xc2, 0x00, - 0xc6, 0x31, 0x8c, 0x63, 0x18, 0x00, - 0x23, 0x88, 0xe2, 0x38, 0x8e, 0x00, - 0x1a, 0x46, 0x91, 0xa4, 0x69, 0x00, - 0x24, 0xc9, 0x32, 0x4c, 0x93, 0x00, - 0x71, 0x1c, 0x47, 0x11, 0xc4, 0x00, - 0x0e, 0x03, 0x80, 0xe0, 0x38, 0x00, - 0x33, 0x0c, 0xc3, 0x30, 0xcc, 0x00, - 0x10, 0xc4, 0x31, 0x0c, 0x43, 0x00, - 0x45, 0x51, 0x54, 0x55, 0x15, 0x00, - 0x88, 0xa2, 0x28, 0x8a, 0x22, 0x00, - 0xe0, 0x38, 0x0e, 0x03, 0x80, 0x00 -}; - -const uint8_t kMaskRandom40_22[132] = { - 0xc6, 0x31, 0x8c, 0x63, 0x18, 0x00, - 0x23, 0x88, 0xe2, 0x38, 0x8e, 0x00, - 0x1a, 0x46, 0x91, 0xa4, 0x69, 0x00, - 0x24, 0xc9, 0x32, 0x4c, 0x93, 0x00, - 0x71, 0x1c, 0x47, 0x11, 0xc4, 0x00, - 0x0e, 0x03, 0x80, 0xe0, 0x38, 0x00, - 0x33, 0x0c, 0xc3, 0x30, 0xcc, 0x00, - 0x10, 0xc4, 0x31, 0x0c, 0x43, 0x00, - 0x45, 0x51, 0x54, 0x55, 0x15, 0x00, - 0x88, 0xa2, 0x28, 0x8a, 0x22, 0x00, - 0xe0, 0x38, 0x0e, 0x03, 0x80, 0x00, - 0x4c, 0x13, 0x04, 0xc1, 0x30, 0x00, - 0x51, 0x14, 0x45, 0x11, 0x44, 0x00, - 0xa0, 0x68, 0x1a, 0x06, 0x81, 0x00, - 0x04, 0xc1, 0x30, 0x4c, 0x13, 0x00, - 0x03, 0x80, 0xe0, 0x38, 0x0e, 0x00, - 0x86, 0x21, 0x88, 0x62, 0x18, 0x00, - 0x29, 0x0a, 0x42, 0x90, 0xa4, 0x00, - 0x42, 0x50, 0x94, 0x25, 0x09, 0x00, - 0x98, 0x26, 0x09, 0x82, 0x60, 0x00, - 0x30, 0x8c, 0x23, 0x08, 0xc2, 0x00, - 0x89, 0xee, 0x1f, 0x38, 0xca, 0x00 -}; - -const uint8_t kMaskRandom40_23[138] = { - 0xc6, 0x31, 0x8c, 0x63, 0x18, 0x00, - 0x23, 0x88, 0xe2, 0x38, 0x8e, 0x00, - 0x1a, 0x46, 0x91, 0xa4, 0x69, 0x00, - 0x24, 0xc9, 0x32, 0x4c, 0x93, 0x00, - 0x71, 0x1c, 0x47, 0x11, 0xc4, 0x00, - 0x0e, 0x03, 0x80, 0xe0, 0x38, 0x00, - 0x33, 0x0c, 0xc3, 0x30, 0xcc, 0x00, - 0x10, 0xc4, 0x31, 0x0c, 0x43, 0x00, - 0x45, 0x51, 0x54, 0x55, 0x15, 0x00, - 0x88, 0xa2, 0x28, 0x8a, 0x22, 0x00, - 0xe0, 0x38, 0x0e, 0x03, 0x80, 0x00, - 0x0e, 0x03, 0x80, 0xe0, 0x38, 0x00, - 0x33, 0x0c, 0xc3, 0x30, 0xcc, 0x00, - 0x10, 0xc4, 0x31, 0x0c, 0x43, 0x00, - 0x45, 0x51, 0x54, 0x55, 0x15, 0x00, - 0x88, 0xa2, 0x28, 0x8a, 0x22, 0x00, - 0xe0, 0x38, 0x0e, 0x03, 0x80, 0x00, - 0xc6, 0x31, 0x8c, 0x63, 0x18, 0x00, - 0x23, 0x88, 0xe2, 0x38, 0x8e, 0x00, - 0x1a, 0x46, 0x91, 0xa4, 0x69, 0x00, - 0x24, 0xc9, 0x32, 0x4c, 0x93, 0x00, - 0x71, 0x1c, 0x47, 0x11, 0xc4, 0x00, - 0xf5, 0xdc, 0x4f, 0x5d, 0xc4, 0x00 -}; - -const uint8_t kMaskRandom40_24[144] = { - 0x0e, 0x03, 0x80, 0xe0, 0x38, 0x00, - 0x33, 0x0c, 0xc3, 0x30, 0xcc, 0x00, - 0x10, 0xc4, 0x31, 0x0c, 0x43, 0x00, - 0x45, 0x51, 0x54, 0x55, 0x15, 0x00, - 0x88, 0xa2, 0x28, 0x8a, 0x22, 0x00, - 0xe0, 0x38, 0x0e, 0x03, 0x80, 0x00, - 0xc6, 0x31, 0x8c, 0x63, 0x18, 0x00, - 0x23, 0x88, 0xe2, 0x38, 0x8e, 0x00, - 0x1a, 0x46, 0x91, 0xa4, 0x69, 0x00, - 0x24, 0xc9, 0x32, 0x4c, 0x93, 0x00, - 0x71, 0x1c, 0x47, 0x11, 0xc4, 0x00, - 0xf5, 0xdc, 0x4f, 0x5d, 0xc4, 0x00, - 0xc6, 0x31, 0x8c, 0x63, 0x18, 0x00, - 0x23, 0x88, 0xe2, 0x38, 0x8e, 0x00, - 0x1a, 0x46, 0x91, 0xa4, 0x69, 0x00, - 0x24, 0xc9, 0x32, 0x4c, 0x93, 0x00, - 0x71, 0x1c, 0x47, 0x11, 0xc4, 0x00, - 0x0e, 0x03, 0x80, 0xe0, 0x38, 0x00, - 0x33, 0x0c, 0xc3, 0x30, 0xcc, 0x00, - 0x10, 0xc4, 0x31, 0x0c, 0x43, 0x00, - 0x45, 0x51, 0x54, 0x55, 0x15, 0x00, - 0x88, 0xa2, 0x28, 0x8a, 0x22, 0x00, - 0xe0, 0x38, 0x0e, 0x03, 0x80, 0x00, - 0x68, 0xde, 0x83, 0xa9, 0xcf, 0x00 -}; - -const uint8_t kMaskRandom40_25[150] = { - 0x0e, 0x03, 0x80, 0xe0, 0x38, 0x00, - 0x33, 0x0c, 0xc3, 0x30, 0xcc, 0x00, - 0x10, 0xc4, 0x31, 0x0c, 0x43, 0x00, - 0x45, 0x51, 0x54, 0x55, 0x15, 0x00, - 0x88, 0xa2, 0x28, 0x8a, 0x22, 0x00, - 0xe0, 0x38, 0x0e, 0x03, 0x80, 0x00, - 0xc6, 0x31, 0x8c, 0x63, 0x18, 0x00, - 0x23, 0x88, 0xe2, 0x38, 0x8e, 0x00, - 0x1a, 0x46, 0x91, 0xa4, 0x69, 0x00, - 0x24, 0xc9, 0x32, 0x4c, 0x93, 0x00, - 0x71, 0x1c, 0x47, 0x11, 0xc4, 0x00, - 0xf5, 0xdc, 0x4f, 0x5d, 0xc4, 0x00, - 0x0e, 0x03, 0x80, 0xe0, 0x38, 0x00, - 0x33, 0x0c, 0xc3, 0x30, 0xcc, 0x00, - 0x10, 0xc4, 0x31, 0x0c, 0x43, 0x00, - 0x45, 0x51, 0x54, 0x55, 0x15, 0x00, - 0x88, 0xa2, 0x28, 0x8a, 0x22, 0x00, - 0xe0, 0x38, 0x0e, 0x03, 0x80, 0x00, - 0x46, 0x11, 0x84, 0x61, 0x18, 0x00, - 0x33, 0x0c, 0xc3, 0x30, 0xcc, 0x00, - 0x10, 0xc4, 0x31, 0x0c, 0x43, 0x00, - 0x0c, 0x43, 0x10, 0xc4, 0x31, 0x00, - 0x28, 0x8a, 0x22, 0x88, 0xa2, 0x00, - 0x94, 0x25, 0x09, 0x42, 0x50, 0x00, - 0xc1, 0x30, 0x4c, 0x13, 0x04, 0x00 -}; - -const uint8_t kMaskRandom40_26[156] = { - 0x0e, 0x03, 0x80, 0xe0, 0x38, 0x00, - 0x33, 0x0c, 0xc3, 0x30, 0xcc, 0x00, - 0x10, 0xc4, 0x31, 0x0c, 0x43, 0x00, - 0x45, 0x51, 0x54, 0x55, 0x15, 0x00, - 0x88, 0xa2, 0x28, 0x8a, 0x22, 0x00, - 0xe0, 0x38, 0x0e, 0x03, 0x80, 0x00, - 0x46, 0x11, 0x84, 0x61, 0x18, 0x00, - 0x33, 0x0c, 0xc3, 0x30, 0xcc, 0x00, - 0x10, 0xc4, 0x31, 0x0c, 0x43, 0x00, - 0x0c, 0x43, 0x10, 0xc4, 0x31, 0x00, - 0x28, 0x8a, 0x22, 0x88, 0xa2, 0x00, - 0x94, 0x25, 0x09, 0x42, 0x50, 0x00, - 0xc1, 0x30, 0x4c, 0x13, 0x04, 0x00, - 0x0e, 0x03, 0x80, 0xe0, 0x38, 0x00, - 0x33, 0x0c, 0xc3, 0x30, 0xcc, 0x00, - 0x10, 0xc4, 0x31, 0x0c, 0x43, 0x00, - 0x45, 0x51, 0x54, 0x55, 0x15, 0x00, - 0x88, 0xa2, 0x28, 0x8a, 0x22, 0x00, - 0xe0, 0x38, 0x0e, 0x03, 0x80, 0x00, - 0xc6, 0x31, 0x8c, 0x63, 0x18, 0x00, - 0x23, 0x88, 0xe2, 0x38, 0x8e, 0x00, - 0x1a, 0x46, 0x91, 0xa4, 0x69, 0x00, - 0x24, 0xc9, 0x32, 0x4c, 0x93, 0x00, - 0x71, 0x1c, 0x47, 0x11, 0xc4, 0x00, - 0xf5, 0xdc, 0x4f, 0x5d, 0xc4, 0x00, - 0x06, 0x8e, 0x8c, 0x1a, 0xd2, 0x00 -}; - -const uint8_t kMaskRandom40_27[162] = { - 0x0e, 0x03, 0x80, 0xe0, 0x38, 0x00, - 0x33, 0x0c, 0xc3, 0x30, 0xcc, 0x00, - 0x10, 0xc4, 0x31, 0x0c, 0x43, 0x00, - 0x45, 0x51, 0x54, 0x55, 0x15, 0x00, - 0x88, 0xa2, 0x28, 0x8a, 0x22, 0x00, - 0xe0, 0x38, 0x0e, 0x03, 0x80, 0x00, - 0x46, 0x11, 0x84, 0x61, 0x18, 0x00, - 0x33, 0x0c, 0xc3, 0x30, 0xcc, 0x00, - 0x10, 0xc4, 0x31, 0x0c, 0x43, 0x00, - 0x0c, 0x43, 0x10, 0xc4, 0x31, 0x00, - 0x28, 0x8a, 0x22, 0x88, 0xa2, 0x00, - 0x94, 0x25, 0x09, 0x42, 0x50, 0x00, - 0xc1, 0x30, 0x4c, 0x13, 0x04, 0x00, - 0x46, 0x11, 0x84, 0x61, 0x18, 0x00, - 0x33, 0x0c, 0xc3, 0x30, 0xcc, 0x00, - 0x10, 0xc4, 0x31, 0x0c, 0x43, 0x00, - 0x0c, 0x43, 0x10, 0xc4, 0x31, 0x00, - 0x28, 0x8a, 0x22, 0x88, 0xa2, 0x00, - 0x94, 0x25, 0x09, 0x42, 0x50, 0x00, - 0xc1, 0x30, 0x4c, 0x13, 0x04, 0x00, - 0x0e, 0x03, 0x80, 0xe0, 0x38, 0x00, - 0x33, 0x0c, 0xc3, 0x30, 0xcc, 0x00, - 0x10, 0xc4, 0x31, 0x0c, 0x43, 0x00, - 0x45, 0x51, 0x54, 0x55, 0x15, 0x00, - 0x88, 0xa2, 0x28, 0x8a, 0x22, 0x00, - 0xe0, 0x38, 0x0e, 0x03, 0x80, 0x00, - 0x56, 0x3e, 0x25, 0x63, 0xe2, 0x00 -}; - -const uint8_t kMaskRandom40_28[168] = { - 0x46, 0x11, 0x84, 0x61, 0x18, 0x00, - 0x33, 0x0c, 0xc3, 0x30, 0xcc, 0x00, - 0x10, 0xc4, 0x31, 0x0c, 0x43, 0x00, - 0x0c, 0x43, 0x10, 0xc4, 0x31, 0x00, - 0x28, 0x8a, 0x22, 0x88, 0xa2, 0x00, - 0x94, 0x25, 0x09, 0x42, 0x50, 0x00, - 0xc1, 0x30, 0x4c, 0x13, 0x04, 0x00, - 0x0e, 0x03, 0x80, 0xe0, 0x38, 0x00, - 0x33, 0x0c, 0xc3, 0x30, 0xcc, 0x00, - 0x10, 0xc4, 0x31, 0x0c, 0x43, 0x00, - 0x45, 0x51, 0x54, 0x55, 0x15, 0x00, - 0x88, 0xa2, 0x28, 0x8a, 0x22, 0x00, - 0xe0, 0x38, 0x0e, 0x03, 0x80, 0x00, - 0x56, 0x3e, 0x25, 0x63, 0xe2, 0x00, - 0x0e, 0x03, 0x80, 0xe0, 0x38, 0x00, - 0x33, 0x0c, 0xc3, 0x30, 0xcc, 0x00, - 0x10, 0xc4, 0x31, 0x0c, 0x43, 0x00, - 0x45, 0x51, 0x54, 0x55, 0x15, 0x00, - 0x88, 0xa2, 0x28, 0x8a, 0x22, 0x00, - 0xe0, 0x38, 0x0e, 0x03, 0x80, 0x00, - 0x46, 0x11, 0x84, 0x61, 0x18, 0x00, - 0x33, 0x0c, 0xc3, 0x30, 0xcc, 0x00, - 0x10, 0xc4, 0x31, 0x0c, 0x43, 0x00, - 0x0c, 0x43, 0x10, 0xc4, 0x31, 0x00, - 0x28, 0x8a, 0x22, 0x88, 0xa2, 0x00, - 0x94, 0x25, 0x09, 0x42, 0x50, 0x00, - 0xc1, 0x30, 0x4c, 0x13, 0x04, 0x00, - 0x68, 0x0e, 0x9b, 0x52, 0xb6, 0x00 -}; - -const uint8_t kMaskRandom40_29[174] = { - 0x46, 0x11, 0x84, 0x61, 0x18, 0x00, - 0x33, 0x0c, 0xc3, 0x30, 0xcc, 0x00, - 0x10, 0xc4, 0x31, 0x0c, 0x43, 0x00, - 0x0c, 0x43, 0x10, 0xc4, 0x31, 0x00, - 0x28, 0x8a, 0x22, 0x88, 0xa2, 0x00, - 0x94, 0x25, 0x09, 0x42, 0x50, 0x00, - 0xc1, 0x30, 0x4c, 0x13, 0x04, 0x00, - 0x0e, 0x03, 0x80, 0xe0, 0x38, 0x00, - 0x33, 0x0c, 0xc3, 0x30, 0xcc, 0x00, - 0x10, 0xc4, 0x31, 0x0c, 0x43, 0x00, - 0x45, 0x51, 0x54, 0x55, 0x15, 0x00, - 0x88, 0xa2, 0x28, 0x8a, 0x22, 0x00, - 0xe0, 0x38, 0x0e, 0x03, 0x80, 0x00, - 0x56, 0x3e, 0x25, 0x63, 0xe2, 0x00, - 0x46, 0x11, 0x84, 0x61, 0x18, 0x00, - 0x33, 0x0c, 0xc3, 0x30, 0xcc, 0x00, - 0x10, 0xc4, 0x31, 0x0c, 0x43, 0x00, - 0x0c, 0x43, 0x10, 0xc4, 0x31, 0x00, - 0x28, 0x8a, 0x22, 0x88, 0xa2, 0x00, - 0x94, 0x25, 0x09, 0x42, 0x50, 0x00, - 0xc1, 0x30, 0x4c, 0x13, 0x04, 0x00, - 0x2c, 0x0b, 0x02, 0xc0, 0xb0, 0x00, - 0x81, 0xa0, 0x68, 0x1a, 0x06, 0x00, - 0xa0, 0x68, 0x1a, 0x06, 0x81, 0x00, - 0x05, 0x41, 0x50, 0x54, 0x15, 0x00, - 0x18, 0x86, 0x21, 0x88, 0x62, 0x00, - 0xc2, 0x30, 0x8c, 0x23, 0x08, 0x00, - 0x22, 0x88, 0xa2, 0x28, 0x8a, 0x00, - 0x50, 0x54, 0x15, 0x05, 0x41, 0x00 -}; - -const uint8_t kMaskRandom40_3[18] = { - 0xce, 0x33, 0x8c, 0xe3, 0x38, 0x00, - 0x55, 0x95, 0x65, 0x59, 0x56, 0x00, - 0xb1, 0x6a, 0x3b, 0x16, 0xa3, 0x00 -}; - -const uint8_t kMaskRandom40_30[180] = { - 0x46, 0x11, 0x84, 0x61, 0x18, 0x00, - 0x33, 0x0c, 0xc3, 0x30, 0xcc, 0x00, - 0x10, 0xc4, 0x31, 0x0c, 0x43, 0x00, - 0x0c, 0x43, 0x10, 0xc4, 0x31, 0x00, - 0x28, 0x8a, 0x22, 0x88, 0xa2, 0x00, - 0x94, 0x25, 0x09, 0x42, 0x50, 0x00, - 0xc1, 0x30, 0x4c, 0x13, 0x04, 0x00, - 0x2c, 0x0b, 0x02, 0xc0, 0xb0, 0x00, - 0x81, 0xa0, 0x68, 0x1a, 0x06, 0x00, - 0xa0, 0x68, 0x1a, 0x06, 0x81, 0x00, - 0x05, 0x41, 0x50, 0x54, 0x15, 0x00, - 0x18, 0x86, 0x21, 0x88, 0x62, 0x00, - 0xc2, 0x30, 0x8c, 0x23, 0x08, 0x00, - 0x22, 0x88, 0xa2, 0x28, 0x8a, 0x00, - 0x50, 0x54, 0x15, 0x05, 0x41, 0x00, - 0x46, 0x11, 0x84, 0x61, 0x18, 0x00, - 0x33, 0x0c, 0xc3, 0x30, 0xcc, 0x00, - 0x10, 0xc4, 0x31, 0x0c, 0x43, 0x00, - 0x0c, 0x43, 0x10, 0xc4, 0x31, 0x00, - 0x28, 0x8a, 0x22, 0x88, 0xa2, 0x00, - 0x94, 0x25, 0x09, 0x42, 0x50, 0x00, - 0xc1, 0x30, 0x4c, 0x13, 0x04, 0x00, - 0x0e, 0x03, 0x80, 0xe0, 0x38, 0x00, - 0x33, 0x0c, 0xc3, 0x30, 0xcc, 0x00, - 0x10, 0xc4, 0x31, 0x0c, 0x43, 0x00, - 0x45, 0x51, 0x54, 0x55, 0x15, 0x00, - 0x88, 0xa2, 0x28, 0x8a, 0x22, 0x00, - 0xe0, 0x38, 0x0e, 0x03, 0x80, 0x00, - 0x56, 0x3e, 0x25, 0x63, 0xe2, 0x00, - 0xe1, 0x47, 0x04, 0x05, 0x47, 0x00 -}; - -const uint8_t kMaskRandom40_31[186] = { - 0x46, 0x11, 0x84, 0x61, 0x18, 0x00, - 0x33, 0x0c, 0xc3, 0x30, 0xcc, 0x00, - 0x10, 0xc4, 0x31, 0x0c, 0x43, 0x00, - 0x0c, 0x43, 0x10, 0xc4, 0x31, 0x00, - 0x28, 0x8a, 0x22, 0x88, 0xa2, 0x00, - 0x94, 0x25, 0x09, 0x42, 0x50, 0x00, - 0xc1, 0x30, 0x4c, 0x13, 0x04, 0x00, - 0x2c, 0x0b, 0x02, 0xc0, 0xb0, 0x00, - 0x81, 0xa0, 0x68, 0x1a, 0x06, 0x00, - 0xa0, 0x68, 0x1a, 0x06, 0x81, 0x00, - 0x05, 0x41, 0x50, 0x54, 0x15, 0x00, - 0x18, 0x86, 0x21, 0x88, 0x62, 0x00, - 0xc2, 0x30, 0x8c, 0x23, 0x08, 0x00, - 0x22, 0x88, 0xa2, 0x28, 0x8a, 0x00, - 0x50, 0x54, 0x15, 0x05, 0x41, 0x00, - 0x2c, 0x0b, 0x02, 0xc0, 0xb0, 0x00, - 0x81, 0xa0, 0x68, 0x1a, 0x06, 0x00, - 0xa0, 0x68, 0x1a, 0x06, 0x81, 0x00, - 0x05, 0x41, 0x50, 0x54, 0x15, 0x00, - 0x18, 0x86, 0x21, 0x88, 0x62, 0x00, - 0xc2, 0x30, 0x8c, 0x23, 0x08, 0x00, - 0x22, 0x88, 0xa2, 0x28, 0x8a, 0x00, - 0x50, 0x54, 0x15, 0x05, 0x41, 0x00, - 0x46, 0x11, 0x84, 0x61, 0x18, 0x00, - 0x33, 0x0c, 0xc3, 0x30, 0xcc, 0x00, - 0x10, 0xc4, 0x31, 0x0c, 0x43, 0x00, - 0x0c, 0x43, 0x10, 0xc4, 0x31, 0x00, - 0x28, 0x8a, 0x22, 0x88, 0xa2, 0x00, - 0x94, 0x25, 0x09, 0x42, 0x50, 0x00, - 0xc1, 0x30, 0x4c, 0x13, 0x04, 0x00, - 0x28, 0x1c, 0x62, 0x81, 0xc6, 0x00 -}; - -const uint8_t kMaskRandom40_32[192] = { - 0x2c, 0x0b, 0x02, 0xc0, 0xb0, 0x00, - 0x81, 0xa0, 0x68, 0x1a, 0x06, 0x00, - 0xa0, 0x68, 0x1a, 0x06, 0x81, 0x00, - 0x05, 0x41, 0x50, 0x54, 0x15, 0x00, - 0x18, 0x86, 0x21, 0x88, 0x62, 0x00, - 0xc2, 0x30, 0x8c, 0x23, 0x08, 0x00, - 0x22, 0x88, 0xa2, 0x28, 0x8a, 0x00, - 0x50, 0x54, 0x15, 0x05, 0x41, 0x00, - 0x46, 0x11, 0x84, 0x61, 0x18, 0x00, - 0x33, 0x0c, 0xc3, 0x30, 0xcc, 0x00, - 0x10, 0xc4, 0x31, 0x0c, 0x43, 0x00, - 0x0c, 0x43, 0x10, 0xc4, 0x31, 0x00, - 0x28, 0x8a, 0x22, 0x88, 0xa2, 0x00, - 0x94, 0x25, 0x09, 0x42, 0x50, 0x00, - 0xc1, 0x30, 0x4c, 0x13, 0x04, 0x00, - 0x28, 0x1c, 0x62, 0x81, 0xc6, 0x00, - 0x46, 0x11, 0x84, 0x61, 0x18, 0x00, - 0x33, 0x0c, 0xc3, 0x30, 0xcc, 0x00, - 0x10, 0xc4, 0x31, 0x0c, 0x43, 0x00, - 0x0c, 0x43, 0x10, 0xc4, 0x31, 0x00, - 0x28, 0x8a, 0x22, 0x88, 0xa2, 0x00, - 0x94, 0x25, 0x09, 0x42, 0x50, 0x00, - 0xc1, 0x30, 0x4c, 0x13, 0x04, 0x00, - 0x2c, 0x0b, 0x02, 0xc0, 0xb0, 0x00, - 0x81, 0xa0, 0x68, 0x1a, 0x06, 0x00, - 0xa0, 0x68, 0x1a, 0x06, 0x81, 0x00, - 0x05, 0x41, 0x50, 0x54, 0x15, 0x00, - 0x18, 0x86, 0x21, 0x88, 0x62, 0x00, - 0xc2, 0x30, 0x8c, 0x23, 0x08, 0x00, - 0x22, 0x88, 0xa2, 0x28, 0x8a, 0x00, - 0x50, 0x54, 0x15, 0x05, 0x41, 0x00, - 0x03, 0x0c, 0x46, 0x10, 0xc5, 0x00 -}; - -const uint8_t kMaskRandom40_33[198] = { - 0x2c, 0x0b, 0x02, 0xc0, 0xb0, 0x00, - 0x81, 0xa0, 0x68, 0x1a, 0x06, 0x00, - 0xa0, 0x68, 0x1a, 0x06, 0x81, 0x00, - 0x05, 0x41, 0x50, 0x54, 0x15, 0x00, - 0x18, 0x86, 0x21, 0x88, 0x62, 0x00, - 0xc2, 0x30, 0x8c, 0x23, 0x08, 0x00, - 0x22, 0x88, 0xa2, 0x28, 0x8a, 0x00, - 0x50, 0x54, 0x15, 0x05, 0x41, 0x00, - 0x46, 0x11, 0x84, 0x61, 0x18, 0x00, - 0x33, 0x0c, 0xc3, 0x30, 0xcc, 0x00, - 0x10, 0xc4, 0x31, 0x0c, 0x43, 0x00, - 0x0c, 0x43, 0x10, 0xc4, 0x31, 0x00, - 0x28, 0x8a, 0x22, 0x88, 0xa2, 0x00, - 0x94, 0x25, 0x09, 0x42, 0x50, 0x00, - 0xc1, 0x30, 0x4c, 0x13, 0x04, 0x00, - 0x28, 0x1c, 0x62, 0x81, 0xc6, 0x00, - 0x2c, 0x0b, 0x02, 0xc0, 0xb0, 0x00, - 0x81, 0xa0, 0x68, 0x1a, 0x06, 0x00, - 0xa0, 0x68, 0x1a, 0x06, 0x81, 0x00, - 0x05, 0x41, 0x50, 0x54, 0x15, 0x00, - 0x18, 0x86, 0x21, 0x88, 0x62, 0x00, - 0xc2, 0x30, 0x8c, 0x23, 0x08, 0x00, - 0x22, 0x88, 0xa2, 0x28, 0x8a, 0x00, - 0x50, 0x54, 0x15, 0x05, 0x41, 0x00, - 0x4e, 0x13, 0x84, 0xe1, 0x38, 0x00, - 0xe3, 0x38, 0xce, 0x33, 0x8c, 0x00, - 0x81, 0xe0, 0x78, 0x1e, 0x07, 0x00, - 0x21, 0x48, 0x52, 0x14, 0x85, 0x00, - 0x52, 0x94, 0xa5, 0x29, 0x4a, 0x00, - 0xb4, 0x2d, 0x0b, 0x42, 0xd0, 0x00, - 0x26, 0x89, 0xa2, 0x68, 0x9a, 0x00, - 0x58, 0x56, 0x15, 0x85, 0x61, 0x00, - 0x19, 0x86, 0x61, 0x98, 0x66, 0x00 -}; - -const uint8_t kMaskRandom40_34[204] = { - 0x2c, 0x0b, 0x02, 0xc0, 0xb0, 0x00, - 0x81, 0xa0, 0x68, 0x1a, 0x06, 0x00, - 0xa0, 0x68, 0x1a, 0x06, 0x81, 0x00, - 0x05, 0x41, 0x50, 0x54, 0x15, 0x00, - 0x18, 0x86, 0x21, 0x88, 0x62, 0x00, - 0xc2, 0x30, 0x8c, 0x23, 0x08, 0x00, - 0x22, 0x88, 0xa2, 0x28, 0x8a, 0x00, - 0x50, 0x54, 0x15, 0x05, 0x41, 0x00, - 0x4e, 0x13, 0x84, 0xe1, 0x38, 0x00, - 0xe3, 0x38, 0xce, 0x33, 0x8c, 0x00, - 0x81, 0xe0, 0x78, 0x1e, 0x07, 0x00, - 0x21, 0x48, 0x52, 0x14, 0x85, 0x00, - 0x52, 0x94, 0xa5, 0x29, 0x4a, 0x00, - 0xb4, 0x2d, 0x0b, 0x42, 0xd0, 0x00, - 0x26, 0x89, 0xa2, 0x68, 0x9a, 0x00, - 0x58, 0x56, 0x15, 0x85, 0x61, 0x00, - 0x19, 0x86, 0x61, 0x98, 0x66, 0x00, - 0x2c, 0x0b, 0x02, 0xc0, 0xb0, 0x00, - 0x81, 0xa0, 0x68, 0x1a, 0x06, 0x00, - 0xa0, 0x68, 0x1a, 0x06, 0x81, 0x00, - 0x05, 0x41, 0x50, 0x54, 0x15, 0x00, - 0x18, 0x86, 0x21, 0x88, 0x62, 0x00, - 0xc2, 0x30, 0x8c, 0x23, 0x08, 0x00, - 0x22, 0x88, 0xa2, 0x28, 0x8a, 0x00, - 0x50, 0x54, 0x15, 0x05, 0x41, 0x00, - 0x46, 0x11, 0x84, 0x61, 0x18, 0x00, - 0x33, 0x0c, 0xc3, 0x30, 0xcc, 0x00, - 0x10, 0xc4, 0x31, 0x0c, 0x43, 0x00, - 0x0c, 0x43, 0x10, 0xc4, 0x31, 0x00, - 0x28, 0x8a, 0x22, 0x88, 0xa2, 0x00, - 0x94, 0x25, 0x09, 0x42, 0x50, 0x00, - 0xc1, 0x30, 0x4c, 0x13, 0x04, 0x00, - 0x28, 0x1c, 0x62, 0x81, 0xc6, 0x00, - 0x87, 0x3c, 0x08, 0x19, 0x31, 0x00 -}; - -const uint8_t kMaskRandom40_35[210] = { - 0x2c, 0x0b, 0x02, 0xc0, 0xb0, 0x00, - 0x81, 0xa0, 0x68, 0x1a, 0x06, 0x00, - 0xa0, 0x68, 0x1a, 0x06, 0x81, 0x00, - 0x05, 0x41, 0x50, 0x54, 0x15, 0x00, - 0x18, 0x86, 0x21, 0x88, 0x62, 0x00, - 0xc2, 0x30, 0x8c, 0x23, 0x08, 0x00, - 0x22, 0x88, 0xa2, 0x28, 0x8a, 0x00, - 0x50, 0x54, 0x15, 0x05, 0x41, 0x00, - 0x4e, 0x13, 0x84, 0xe1, 0x38, 0x00, - 0xe3, 0x38, 0xce, 0x33, 0x8c, 0x00, - 0x81, 0xe0, 0x78, 0x1e, 0x07, 0x00, - 0x21, 0x48, 0x52, 0x14, 0x85, 0x00, - 0x52, 0x94, 0xa5, 0x29, 0x4a, 0x00, - 0xb4, 0x2d, 0x0b, 0x42, 0xd0, 0x00, - 0x26, 0x89, 0xa2, 0x68, 0x9a, 0x00, - 0x58, 0x56, 0x15, 0x85, 0x61, 0x00, - 0x19, 0x86, 0x61, 0x98, 0x66, 0x00, - 0x4e, 0x13, 0x84, 0xe1, 0x38, 0x00, - 0xe3, 0x38, 0xce, 0x33, 0x8c, 0x00, - 0x81, 0xe0, 0x78, 0x1e, 0x07, 0x00, - 0x21, 0x48, 0x52, 0x14, 0x85, 0x00, - 0x52, 0x94, 0xa5, 0x29, 0x4a, 0x00, - 0xb4, 0x2d, 0x0b, 0x42, 0xd0, 0x00, - 0x26, 0x89, 0xa2, 0x68, 0x9a, 0x00, - 0x58, 0x56, 0x15, 0x85, 0x61, 0x00, - 0x19, 0x86, 0x61, 0x98, 0x66, 0x00, - 0x2c, 0x0b, 0x02, 0xc0, 0xb0, 0x00, - 0x81, 0xa0, 0x68, 0x1a, 0x06, 0x00, - 0xa0, 0x68, 0x1a, 0x06, 0x81, 0x00, - 0x05, 0x41, 0x50, 0x54, 0x15, 0x00, - 0x18, 0x86, 0x21, 0x88, 0x62, 0x00, - 0xc2, 0x30, 0x8c, 0x23, 0x08, 0x00, - 0x22, 0x88, 0xa2, 0x28, 0x8a, 0x00, - 0x50, 0x54, 0x15, 0x05, 0x41, 0x00, - 0x21, 0x7b, 0xf2, 0x17, 0xbf, 0x00 -}; - -const uint8_t kMaskRandom40_36[216] = { - 0x4e, 0x13, 0x84, 0xe1, 0x38, 0x00, - 0xe3, 0x38, 0xce, 0x33, 0x8c, 0x00, - 0x81, 0xe0, 0x78, 0x1e, 0x07, 0x00, - 0x21, 0x48, 0x52, 0x14, 0x85, 0x00, - 0x52, 0x94, 0xa5, 0x29, 0x4a, 0x00, - 0xb4, 0x2d, 0x0b, 0x42, 0xd0, 0x00, - 0x26, 0x89, 0xa2, 0x68, 0x9a, 0x00, - 0x58, 0x56, 0x15, 0x85, 0x61, 0x00, - 0x19, 0x86, 0x61, 0x98, 0x66, 0x00, - 0x2c, 0x0b, 0x02, 0xc0, 0xb0, 0x00, - 0x81, 0xa0, 0x68, 0x1a, 0x06, 0x00, - 0xa0, 0x68, 0x1a, 0x06, 0x81, 0x00, - 0x05, 0x41, 0x50, 0x54, 0x15, 0x00, - 0x18, 0x86, 0x21, 0x88, 0x62, 0x00, - 0xc2, 0x30, 0x8c, 0x23, 0x08, 0x00, - 0x22, 0x88, 0xa2, 0x28, 0x8a, 0x00, - 0x50, 0x54, 0x15, 0x05, 0x41, 0x00, - 0x21, 0x7b, 0xf2, 0x17, 0xbf, 0x00, - 0x2c, 0x0b, 0x02, 0xc0, 0xb0, 0x00, - 0x81, 0xa0, 0x68, 0x1a, 0x06, 0x00, - 0xa0, 0x68, 0x1a, 0x06, 0x81, 0x00, - 0x05, 0x41, 0x50, 0x54, 0x15, 0x00, - 0x18, 0x86, 0x21, 0x88, 0x62, 0x00, - 0xc2, 0x30, 0x8c, 0x23, 0x08, 0x00, - 0x22, 0x88, 0xa2, 0x28, 0x8a, 0x00, - 0x50, 0x54, 0x15, 0x05, 0x41, 0x00, - 0x4e, 0x13, 0x84, 0xe1, 0x38, 0x00, - 0xe3, 0x38, 0xce, 0x33, 0x8c, 0x00, - 0x81, 0xe0, 0x78, 0x1e, 0x07, 0x00, - 0x21, 0x48, 0x52, 0x14, 0x85, 0x00, - 0x52, 0x94, 0xa5, 0x29, 0x4a, 0x00, - 0xb4, 0x2d, 0x0b, 0x42, 0xd0, 0x00, - 0x26, 0x89, 0xa2, 0x68, 0x9a, 0x00, - 0x58, 0x56, 0x15, 0x85, 0x61, 0x00, - 0x19, 0x86, 0x61, 0x98, 0x66, 0x00, - 0x1e, 0xb9, 0x3d, 0x25, 0xcc, 0x00 -}; - -const uint8_t kMaskRandom40_37[222] = { - 0x4e, 0x13, 0x84, 0xe1, 0x38, 0x00, - 0xe3, 0x38, 0xce, 0x33, 0x8c, 0x00, - 0x81, 0xe0, 0x78, 0x1e, 0x07, 0x00, - 0x21, 0x48, 0x52, 0x14, 0x85, 0x00, - 0x52, 0x94, 0xa5, 0x29, 0x4a, 0x00, - 0xb4, 0x2d, 0x0b, 0x42, 0xd0, 0x00, - 0x26, 0x89, 0xa2, 0x68, 0x9a, 0x00, - 0x58, 0x56, 0x15, 0x85, 0x61, 0x00, - 0x19, 0x86, 0x61, 0x98, 0x66, 0x00, - 0x2c, 0x0b, 0x02, 0xc0, 0xb0, 0x00, - 0x81, 0xa0, 0x68, 0x1a, 0x06, 0x00, - 0xa0, 0x68, 0x1a, 0x06, 0x81, 0x00, - 0x05, 0x41, 0x50, 0x54, 0x15, 0x00, - 0x18, 0x86, 0x21, 0x88, 0x62, 0x00, - 0xc2, 0x30, 0x8c, 0x23, 0x08, 0x00, - 0x22, 0x88, 0xa2, 0x28, 0x8a, 0x00, - 0x50, 0x54, 0x15, 0x05, 0x41, 0x00, - 0x21, 0x7b, 0xf2, 0x17, 0xbf, 0x00, - 0x4e, 0x13, 0x84, 0xe1, 0x38, 0x00, - 0xe3, 0x38, 0xce, 0x33, 0x8c, 0x00, - 0x81, 0xe0, 0x78, 0x1e, 0x07, 0x00, - 0x21, 0x48, 0x52, 0x14, 0x85, 0x00, - 0x52, 0x94, 0xa5, 0x29, 0x4a, 0x00, - 0xb4, 0x2d, 0x0b, 0x42, 0xd0, 0x00, - 0x26, 0x89, 0xa2, 0x68, 0x9a, 0x00, - 0x58, 0x56, 0x15, 0x85, 0x61, 0x00, - 0x19, 0x86, 0x61, 0x98, 0x66, 0x00, - 0x4c, 0x13, 0x04, 0xc1, 0x30, 0x00, - 0x51, 0x14, 0x45, 0x11, 0x44, 0x00, - 0xa0, 0x68, 0x1a, 0x06, 0x81, 0x00, - 0x04, 0xc1, 0x30, 0x4c, 0x13, 0x00, - 0x03, 0x80, 0xe0, 0x38, 0x0e, 0x00, - 0x86, 0x21, 0x88, 0x62, 0x18, 0x00, - 0x29, 0x0a, 0x42, 0x90, 0xa4, 0x00, - 0x42, 0x50, 0x94, 0x25, 0x09, 0x00, - 0x98, 0x26, 0x09, 0x82, 0x60, 0x00, - 0x30, 0x8c, 0x23, 0x08, 0xc2, 0x00 -}; - -const uint8_t kMaskRandom40_38[228] = { - 0x4e, 0x13, 0x84, 0xe1, 0x38, 0x00, - 0xe3, 0x38, 0xce, 0x33, 0x8c, 0x00, - 0x81, 0xe0, 0x78, 0x1e, 0x07, 0x00, - 0x21, 0x48, 0x52, 0x14, 0x85, 0x00, - 0x52, 0x94, 0xa5, 0x29, 0x4a, 0x00, - 0xb4, 0x2d, 0x0b, 0x42, 0xd0, 0x00, - 0x26, 0x89, 0xa2, 0x68, 0x9a, 0x00, - 0x58, 0x56, 0x15, 0x85, 0x61, 0x00, - 0x19, 0x86, 0x61, 0x98, 0x66, 0x00, - 0x4c, 0x13, 0x04, 0xc1, 0x30, 0x00, - 0x51, 0x14, 0x45, 0x11, 0x44, 0x00, - 0xa0, 0x68, 0x1a, 0x06, 0x81, 0x00, - 0x04, 0xc1, 0x30, 0x4c, 0x13, 0x00, - 0x03, 0x80, 0xe0, 0x38, 0x0e, 0x00, - 0x86, 0x21, 0x88, 0x62, 0x18, 0x00, - 0x29, 0x0a, 0x42, 0x90, 0xa4, 0x00, - 0x42, 0x50, 0x94, 0x25, 0x09, 0x00, - 0x98, 0x26, 0x09, 0x82, 0x60, 0x00, - 0x30, 0x8c, 0x23, 0x08, 0xc2, 0x00, - 0x4e, 0x13, 0x84, 0xe1, 0x38, 0x00, - 0xe3, 0x38, 0xce, 0x33, 0x8c, 0x00, - 0x81, 0xe0, 0x78, 0x1e, 0x07, 0x00, - 0x21, 0x48, 0x52, 0x14, 0x85, 0x00, - 0x52, 0x94, 0xa5, 0x29, 0x4a, 0x00, - 0xb4, 0x2d, 0x0b, 0x42, 0xd0, 0x00, - 0x26, 0x89, 0xa2, 0x68, 0x9a, 0x00, - 0x58, 0x56, 0x15, 0x85, 0x61, 0x00, - 0x19, 0x86, 0x61, 0x98, 0x66, 0x00, - 0x2c, 0x0b, 0x02, 0xc0, 0xb0, 0x00, - 0x81, 0xa0, 0x68, 0x1a, 0x06, 0x00, - 0xa0, 0x68, 0x1a, 0x06, 0x81, 0x00, - 0x05, 0x41, 0x50, 0x54, 0x15, 0x00, - 0x18, 0x86, 0x21, 0x88, 0x62, 0x00, - 0xc2, 0x30, 0x8c, 0x23, 0x08, 0x00, - 0x22, 0x88, 0xa2, 0x28, 0x8a, 0x00, - 0x50, 0x54, 0x15, 0x05, 0x41, 0x00, - 0x21, 0x7b, 0xf2, 0x17, 0xbf, 0x00, - 0xea, 0xaa, 0x20, 0xa2, 0x1b, 0x00 -}; - -const uint8_t kMaskRandom40_39[234] = { - 0x4e, 0x13, 0x84, 0xe1, 0x38, 0x00, - 0xe3, 0x38, 0xce, 0x33, 0x8c, 0x00, - 0x81, 0xe0, 0x78, 0x1e, 0x07, 0x00, - 0x21, 0x48, 0x52, 0x14, 0x85, 0x00, - 0x52, 0x94, 0xa5, 0x29, 0x4a, 0x00, - 0xb4, 0x2d, 0x0b, 0x42, 0xd0, 0x00, - 0x26, 0x89, 0xa2, 0x68, 0x9a, 0x00, - 0x58, 0x56, 0x15, 0x85, 0x61, 0x00, - 0x19, 0x86, 0x61, 0x98, 0x66, 0x00, - 0x4c, 0x13, 0x04, 0xc1, 0x30, 0x00, - 0x51, 0x14, 0x45, 0x11, 0x44, 0x00, - 0xa0, 0x68, 0x1a, 0x06, 0x81, 0x00, - 0x04, 0xc1, 0x30, 0x4c, 0x13, 0x00, - 0x03, 0x80, 0xe0, 0x38, 0x0e, 0x00, - 0x86, 0x21, 0x88, 0x62, 0x18, 0x00, - 0x29, 0x0a, 0x42, 0x90, 0xa4, 0x00, - 0x42, 0x50, 0x94, 0x25, 0x09, 0x00, - 0x98, 0x26, 0x09, 0x82, 0x60, 0x00, - 0x30, 0x8c, 0x23, 0x08, 0xc2, 0x00, - 0x4c, 0x13, 0x04, 0xc1, 0x30, 0x00, - 0x51, 0x14, 0x45, 0x11, 0x44, 0x00, - 0xa0, 0x68, 0x1a, 0x06, 0x81, 0x00, - 0x04, 0xc1, 0x30, 0x4c, 0x13, 0x00, - 0x03, 0x80, 0xe0, 0x38, 0x0e, 0x00, - 0x86, 0x21, 0x88, 0x62, 0x18, 0x00, - 0x29, 0x0a, 0x42, 0x90, 0xa4, 0x00, - 0x42, 0x50, 0x94, 0x25, 0x09, 0x00, - 0x98, 0x26, 0x09, 0x82, 0x60, 0x00, - 0x30, 0x8c, 0x23, 0x08, 0xc2, 0x00, - 0x4e, 0x13, 0x84, 0xe1, 0x38, 0x00, - 0xe3, 0x38, 0xce, 0x33, 0x8c, 0x00, - 0x81, 0xe0, 0x78, 0x1e, 0x07, 0x00, - 0x21, 0x48, 0x52, 0x14, 0x85, 0x00, - 0x52, 0x94, 0xa5, 0x29, 0x4a, 0x00, - 0xb4, 0x2d, 0x0b, 0x42, 0xd0, 0x00, - 0x26, 0x89, 0xa2, 0x68, 0x9a, 0x00, - 0x58, 0x56, 0x15, 0x85, 0x61, 0x00, - 0x19, 0x86, 0x61, 0x98, 0x66, 0x00, - 0xf7, 0x8d, 0xaf, 0x78, 0xda, 0x00 -}; - -const uint8_t kMaskRandom40_4[24] = { - 0xe6, 0x39, 0x8e, 0x63, 0x98, 0x00, - 0x33, 0x8c, 0xe3, 0x38, 0xce, 0x00, - 0x98, 0xe6, 0x39, 0x8e, 0x63, 0x00, - 0x2d, 0x4b, 0x52, 0xd4, 0xb5, 0x00 -}; - -const uint8_t kMaskRandom40_40[240] = { - 0x4c, 0x13, 0x04, 0xc1, 0x30, 0x00, - 0x51, 0x14, 0x45, 0x11, 0x44, 0x00, - 0xa0, 0x68, 0x1a, 0x06, 0x81, 0x00, - 0x04, 0xc1, 0x30, 0x4c, 0x13, 0x00, - 0x03, 0x80, 0xe0, 0x38, 0x0e, 0x00, - 0x86, 0x21, 0x88, 0x62, 0x18, 0x00, - 0x29, 0x0a, 0x42, 0x90, 0xa4, 0x00, - 0x42, 0x50, 0x94, 0x25, 0x09, 0x00, - 0x98, 0x26, 0x09, 0x82, 0x60, 0x00, - 0x30, 0x8c, 0x23, 0x08, 0xc2, 0x00, - 0x4e, 0x13, 0x84, 0xe1, 0x38, 0x00, - 0xe3, 0x38, 0xce, 0x33, 0x8c, 0x00, - 0x81, 0xe0, 0x78, 0x1e, 0x07, 0x00, - 0x21, 0x48, 0x52, 0x14, 0x85, 0x00, - 0x52, 0x94, 0xa5, 0x29, 0x4a, 0x00, - 0xb4, 0x2d, 0x0b, 0x42, 0xd0, 0x00, - 0x26, 0x89, 0xa2, 0x68, 0x9a, 0x00, - 0x58, 0x56, 0x15, 0x85, 0x61, 0x00, - 0x19, 0x86, 0x61, 0x98, 0x66, 0x00, - 0xf7, 0x8d, 0xaf, 0x78, 0xda, 0x00, - 0x4e, 0x13, 0x84, 0xe1, 0x38, 0x00, - 0xe3, 0x38, 0xce, 0x33, 0x8c, 0x00, - 0x81, 0xe0, 0x78, 0x1e, 0x07, 0x00, - 0x21, 0x48, 0x52, 0x14, 0x85, 0x00, - 0x52, 0x94, 0xa5, 0x29, 0x4a, 0x00, - 0xb4, 0x2d, 0x0b, 0x42, 0xd0, 0x00, - 0x26, 0x89, 0xa2, 0x68, 0x9a, 0x00, - 0x58, 0x56, 0x15, 0x85, 0x61, 0x00, - 0x19, 0x86, 0x61, 0x98, 0x66, 0x00, - 0x4c, 0x13, 0x04, 0xc1, 0x30, 0x00, - 0x51, 0x14, 0x45, 0x11, 0x44, 0x00, - 0xa0, 0x68, 0x1a, 0x06, 0x81, 0x00, - 0x04, 0xc1, 0x30, 0x4c, 0x13, 0x00, - 0x03, 0x80, 0xe0, 0x38, 0x0e, 0x00, - 0x86, 0x21, 0x88, 0x62, 0x18, 0x00, - 0x29, 0x0a, 0x42, 0x90, 0xa4, 0x00, - 0x42, 0x50, 0x94, 0x25, 0x09, 0x00, - 0x98, 0x26, 0x09, 0x82, 0x60, 0x00, - 0x30, 0x8c, 0x23, 0x08, 0xc2, 0x00, - 0xa6, 0xf3, 0xab, 0x1b, 0x87, 0x00 -}; - -const uint8_t kMaskRandom40_5[30] = { - 0xce, 0x33, 0x8c, 0xe3, 0x38, 0x00, - 0x63, 0x98, 0xe6, 0x39, 0x8e, 0x00, - 0x98, 0xe5, 0x39, 0x8e, 0x53, 0x00, - 0x2b, 0x53, 0x52, 0xb5, 0x35, 0x00, - 0xb4, 0x5c, 0xab, 0x45, 0xca, 0x00 -}; - -const uint8_t kMaskRandom40_6[36] = { - 0x4c, 0x1b, 0x04, 0xc1, 0xb0, 0x00, - 0x51, 0x34, 0x45, 0x13, 0x44, 0x00, - 0x20, 0xe8, 0x32, 0x0e, 0x83, 0x00, - 0x85, 0x41, 0x58, 0x54, 0x15, 0x00, - 0x06, 0x86, 0xa0, 0x68, 0x6a, 0x00, - 0x9a, 0x21, 0x89, 0xa2, 0x18, 0x00 -}; - -const uint8_t kMaskRandom40_7[42] = { - 0x4e, 0x11, 0x84, 0xe1, 0x18, 0x00, - 0x33, 0x2c, 0x03, 0x32, 0xc0, 0x00, - 0x10, 0x0e, 0xb1, 0x00, 0xeb, 0x00, - 0x81, 0x51, 0x58, 0x15, 0x15, 0x00, - 0x24, 0xc4, 0xa2, 0x4c, 0x4a, 0x00, - 0xd4, 0x23, 0x0d, 0x42, 0x30, 0x00, - 0x0c, 0xa2, 0x60, 0xca, 0x26, 0x00 -}; - -const uint8_t kMaskRandom40_8[48] = { - 0x27, 0x09, 0xc2, 0x70, 0x9c, 0x00, - 0x89, 0xa2, 0x68, 0x9a, 0x26, 0x00, - 0xd0, 0x74, 0x1d, 0x07, 0x41, 0x00, - 0x24, 0xc9, 0x32, 0x4c, 0x93, 0x00, - 0xe2, 0x90, 0xae, 0x29, 0x0a, 0x00, - 0xc6, 0x31, 0x8c, 0x63, 0x18, 0x00, - 0x31, 0x8c, 0x63, 0x18, 0xc6, 0x00, - 0x18, 0xc6, 0x31, 0x8c, 0x63, 0x00 -}; - -const uint8_t kMaskRandom40_9[54] = { - 0x4e, 0x13, 0x84, 0xe1, 0x38, 0x00, - 0x62, 0x38, 0xc6, 0x23, 0x8c, 0x00, - 0x81, 0xe0, 0x78, 0x1e, 0x07, 0x00, - 0xe1, 0x48, 0x5e, 0x14, 0x85, 0x00, - 0x13, 0x94, 0xa1, 0x39, 0x4a, 0x00, - 0xb4, 0x2d, 0x0b, 0x42, 0xd0, 0x00, - 0x26, 0x89, 0xa2, 0x68, 0x9a, 0x00, - 0x58, 0x56, 0x15, 0x85, 0x61, 0x00, - 0x49, 0x86, 0x54, 0x98, 0x65, 0x00 -}; - -const uint8_t kMaskRandom41_1[6] = { - 0xff, 0xff, 0xff, 0xff, 0xff, 0x80 -}; - -const uint8_t kMaskRandom41_10[60] = { - 0x4c, 0x13, 0x04, 0xc1, 0x91, 0x00, - 0x51, 0x14, 0x45, 0x11, 0x45, 0x00, - 0xa0, 0x68, 0x1a, 0x06, 0xa4, 0x00, - 0x04, 0xc1, 0x30, 0x4c, 0x13, 0x00, - 0x03, 0x80, 0xe0, 0x3b, 0x40, 0x00, - 0x86, 0x21, 0x88, 0x62, 0x09, 0x00, - 0x29, 0x0a, 0x42, 0x90, 0x84, 0x80, - 0x42, 0x50, 0x94, 0x24, 0x30, 0x80, - 0x98, 0x26, 0x09, 0x81, 0x28, 0x00, - 0x30, 0x8c, 0x23, 0x08, 0x4a, 0x80 -}; - -const uint8_t kMaskRandom41_11[66] = { - 0xc6, 0x31, 0x8c, 0x62, 0x1a, 0x00, - 0x23, 0x88, 0xe2, 0x38, 0x8c, 0x80, - 0x1a, 0x46, 0x91, 0xa4, 0x58, 0x80, - 0x24, 0xc9, 0x32, 0x4d, 0x30, 0x80, - 0x71, 0x1c, 0x47, 0x11, 0x07, 0x00, - 0x0e, 0x03, 0x80, 0xe1, 0x91, 0x00, - 0x33, 0x0c, 0xc3, 0x31, 0x45, 0x00, - 0x10, 0xc4, 0x31, 0x0c, 0x32, 0x80, - 0x45, 0x51, 0x54, 0x56, 0x84, 0x80, - 0x88, 0xa2, 0x28, 0x88, 0x4a, 0x80, - 0xe0, 0x38, 0x0e, 0x02, 0x29, 0x00 -}; - -const uint8_t kMaskRandom41_12[72] = { - 0x0e, 0x03, 0x80, 0xe1, 0x91, 0x00, - 0x33, 0x0c, 0xc3, 0x31, 0x45, 0x00, - 0x10, 0xc4, 0x31, 0x0c, 0x32, 0x80, - 0x45, 0x51, 0x54, 0x56, 0x84, 0x80, - 0x88, 0xa2, 0x28, 0x88, 0x4a, 0x80, - 0xe0, 0x38, 0x0e, 0x02, 0x29, 0x00, - 0xc6, 0x31, 0x8c, 0x62, 0x1a, 0x00, - 0x23, 0x88, 0xe2, 0x38, 0x8c, 0x80, - 0x1a, 0x46, 0x91, 0xa4, 0x58, 0x80, - 0x24, 0xc9, 0x32, 0x4d, 0x30, 0x80, - 0x71, 0x1c, 0x47, 0x11, 0x07, 0x00, - 0xf5, 0xdc, 0x4a, 0x06, 0x51, 0x80 -}; - -const uint8_t kMaskRandom41_13[78] = { - 0x0e, 0x03, 0x80, 0xe1, 0x91, 0x00, - 0x33, 0x0c, 0xc3, 0x31, 0x45, 0x00, - 0x10, 0xc4, 0x31, 0x0c, 0x32, 0x80, - 0x45, 0x51, 0x54, 0x56, 0x84, 0x80, - 0x88, 0xa2, 0x28, 0x88, 0x4a, 0x80, - 0xe0, 0x38, 0x0e, 0x02, 0x29, 0x00, - 0x46, 0x11, 0x84, 0x61, 0x19, 0x00, - 0x33, 0x0c, 0xc3, 0x30, 0xcc, 0x80, - 0x10, 0xc4, 0x31, 0x0e, 0x46, 0x00, - 0x0c, 0x43, 0x10, 0xc6, 0x90, 0x80, - 0x28, 0x8a, 0x22, 0x89, 0x42, 0x80, - 0x94, 0x25, 0x09, 0x42, 0x13, 0x00, - 0xc1, 0x30, 0x4c, 0x10, 0x25, 0x80 -}; - -const uint8_t kMaskRandom41_14[84] = { - 0x46, 0x11, 0x84, 0x61, 0x19, 0x00, - 0x33, 0x0c, 0xc3, 0x30, 0xcc, 0x80, - 0x10, 0xc4, 0x31, 0x0e, 0x46, 0x00, - 0x0c, 0x43, 0x10, 0xc6, 0x90, 0x80, - 0x28, 0x8a, 0x22, 0x89, 0x42, 0x80, - 0x94, 0x25, 0x09, 0x42, 0x13, 0x00, - 0xc1, 0x30, 0x4c, 0x10, 0x25, 0x80, - 0x0e, 0x03, 0x80, 0xe1, 0x91, 0x00, - 0x33, 0x0c, 0xc3, 0x31, 0x45, 0x00, - 0x10, 0xc4, 0x31, 0x0c, 0x32, 0x80, - 0x45, 0x51, 0x54, 0x56, 0x84, 0x80, - 0x88, 0xa2, 0x28, 0x88, 0x4a, 0x80, - 0xe0, 0x38, 0x0e, 0x02, 0x29, 0x00, - 0x56, 0x3e, 0x24, 0xdd, 0x0c, 0x00 -}; - -const uint8_t kMaskRandom41_15[90] = { - 0x46, 0x11, 0x84, 0x61, 0x19, 0x00, - 0x33, 0x0c, 0xc3, 0x30, 0xcc, 0x80, - 0x10, 0xc4, 0x31, 0x0e, 0x46, 0x00, - 0x0c, 0x43, 0x10, 0xc6, 0x90, 0x80, - 0x28, 0x8a, 0x22, 0x89, 0x42, 0x80, - 0x94, 0x25, 0x09, 0x42, 0x13, 0x00, - 0xc1, 0x30, 0x4c, 0x10, 0x25, 0x80, - 0x2c, 0x0b, 0x02, 0xc0, 0x32, 0x00, - 0x81, 0xa0, 0x68, 0x1a, 0x01, 0x80, - 0xa0, 0x68, 0x1a, 0x06, 0x82, 0x00, - 0x05, 0x41, 0x50, 0x54, 0x15, 0x00, - 0x18, 0x86, 0x21, 0x89, 0x0c, 0x00, - 0xc2, 0x30, 0x8c, 0x20, 0x68, 0x00, - 0x22, 0x88, 0xa2, 0x29, 0x80, 0x80, - 0x50, 0x54, 0x15, 0x04, 0x50, 0x80 -}; - -const uint8_t kMaskRandom41_16[96] = { - 0x2c, 0x0b, 0x02, 0xc0, 0x32, 0x00, - 0x81, 0xa0, 0x68, 0x1a, 0x01, 0x80, - 0xa0, 0x68, 0x1a, 0x06, 0x82, 0x00, - 0x05, 0x41, 0x50, 0x54, 0x15, 0x00, - 0x18, 0x86, 0x21, 0x89, 0x0c, 0x00, - 0xc2, 0x30, 0x8c, 0x20, 0x68, 0x00, - 0x22, 0x88, 0xa2, 0x29, 0x80, 0x80, - 0x50, 0x54, 0x15, 0x04, 0x50, 0x80, - 0x46, 0x11, 0x84, 0x61, 0x19, 0x00, - 0x33, 0x0c, 0xc3, 0x30, 0xcc, 0x80, - 0x10, 0xc4, 0x31, 0x0e, 0x46, 0x00, - 0x0c, 0x43, 0x10, 0xc6, 0x90, 0x80, - 0x28, 0x8a, 0x22, 0x89, 0x42, 0x80, - 0x94, 0x25, 0x09, 0x42, 0x13, 0x00, - 0xc1, 0x30, 0x4c, 0x10, 0x25, 0x80, - 0x28, 0x1c, 0x63, 0xbf, 0x53, 0x80 -}; - -const uint8_t kMaskRandom41_17[102] = { - 0x2c, 0x0b, 0x02, 0xc0, 0x32, 0x00, - 0x81, 0xa0, 0x68, 0x1a, 0x01, 0x80, - 0xa0, 0x68, 0x1a, 0x06, 0x82, 0x00, - 0x05, 0x41, 0x50, 0x54, 0x15, 0x00, - 0x18, 0x86, 0x21, 0x89, 0x0c, 0x00, - 0xc2, 0x30, 0x8c, 0x20, 0x68, 0x00, - 0x22, 0x88, 0xa2, 0x29, 0x80, 0x80, - 0x50, 0x54, 0x15, 0x04, 0x50, 0x80, - 0x4e, 0x13, 0x84, 0xe1, 0x19, 0x00, - 0xe3, 0x38, 0xce, 0x31, 0x89, 0x80, - 0x81, 0xe0, 0x78, 0x1e, 0x30, 0x00, - 0x21, 0x48, 0x52, 0x14, 0x05, 0x80, - 0x52, 0x94, 0xa5, 0x28, 0x1e, 0x00, - 0xb4, 0x2d, 0x0b, 0x42, 0x82, 0x00, - 0x26, 0x89, 0xa2, 0x68, 0x62, 0x80, - 0x58, 0x56, 0x15, 0x86, 0x44, 0x00, - 0x19, 0x86, 0x61, 0x99, 0xe0, 0x00 -}; - -const uint8_t kMaskRandom41_18[108] = { - 0x4e, 0x13, 0x84, 0xe1, 0x19, 0x00, - 0xe3, 0x38, 0xce, 0x31, 0x89, 0x80, - 0x81, 0xe0, 0x78, 0x1e, 0x30, 0x00, - 0x21, 0x48, 0x52, 0x14, 0x05, 0x80, - 0x52, 0x94, 0xa5, 0x28, 0x1e, 0x00, - 0xb4, 0x2d, 0x0b, 0x42, 0x82, 0x00, - 0x26, 0x89, 0xa2, 0x68, 0x62, 0x80, - 0x58, 0x56, 0x15, 0x86, 0x44, 0x00, - 0x19, 0x86, 0x61, 0x99, 0xe0, 0x00, - 0x2c, 0x0b, 0x02, 0xc0, 0x32, 0x00, - 0x81, 0xa0, 0x68, 0x1a, 0x01, 0x80, - 0xa0, 0x68, 0x1a, 0x06, 0x82, 0x00, - 0x05, 0x41, 0x50, 0x54, 0x15, 0x00, - 0x18, 0x86, 0x21, 0x89, 0x0c, 0x00, - 0xc2, 0x30, 0x8c, 0x20, 0x68, 0x00, - 0x22, 0x88, 0xa2, 0x29, 0x80, 0x80, - 0x50, 0x54, 0x15, 0x04, 0x50, 0x80, - 0x21, 0x7b, 0xf5, 0xa5, 0x65, 0x80 -}; - -const uint8_t kMaskRandom41_19[114] = { - 0x4e, 0x13, 0x84, 0xe1, 0x19, 0x00, - 0xe3, 0x38, 0xce, 0x31, 0x89, 0x80, - 0x81, 0xe0, 0x78, 0x1e, 0x30, 0x00, - 0x21, 0x48, 0x52, 0x14, 0x05, 0x80, - 0x52, 0x94, 0xa5, 0x28, 0x1e, 0x00, - 0xb4, 0x2d, 0x0b, 0x42, 0x82, 0x00, - 0x26, 0x89, 0xa2, 0x68, 0x62, 0x80, - 0x58, 0x56, 0x15, 0x86, 0x44, 0x00, - 0x19, 0x86, 0x61, 0x99, 0xe0, 0x00, - 0x4c, 0x13, 0x04, 0xc1, 0x91, 0x00, - 0x51, 0x14, 0x45, 0x11, 0x45, 0x00, - 0xa0, 0x68, 0x1a, 0x06, 0xa4, 0x00, - 0x04, 0xc1, 0x30, 0x4c, 0x13, 0x00, - 0x03, 0x80, 0xe0, 0x3b, 0x40, 0x00, - 0x86, 0x21, 0x88, 0x62, 0x09, 0x00, - 0x29, 0x0a, 0x42, 0x90, 0x84, 0x80, - 0x42, 0x50, 0x94, 0x24, 0x30, 0x80, - 0x98, 0x26, 0x09, 0x81, 0x28, 0x00, - 0x30, 0x8c, 0x23, 0x08, 0x4a, 0x80 -}; - -const uint8_t kMaskRandom41_2[12] = { - 0xee, 0x3b, 0x8e, 0xe3, 0xb3, 0x00, - 0x99, 0xe6, 0x79, 0x9e, 0x6e, 0x80 -}; - -const uint8_t kMaskRandom41_20[120] = { - 0x4c, 0x13, 0x04, 0xc1, 0x91, 0x00, - 0x51, 0x14, 0x45, 0x11, 0x45, 0x00, - 0xa0, 0x68, 0x1a, 0x06, 0xa4, 0x00, - 0x04, 0xc1, 0x30, 0x4c, 0x13, 0x00, - 0x03, 0x80, 0xe0, 0x3b, 0x40, 0x00, - 0x86, 0x21, 0x88, 0x62, 0x09, 0x00, - 0x29, 0x0a, 0x42, 0x90, 0x84, 0x80, - 0x42, 0x50, 0x94, 0x24, 0x30, 0x80, - 0x98, 0x26, 0x09, 0x81, 0x28, 0x00, - 0x30, 0x8c, 0x23, 0x08, 0x4a, 0x80, - 0x4e, 0x13, 0x84, 0xe1, 0x19, 0x00, - 0xe3, 0x38, 0xce, 0x31, 0x89, 0x80, - 0x81, 0xe0, 0x78, 0x1e, 0x30, 0x00, - 0x21, 0x48, 0x52, 0x14, 0x05, 0x80, - 0x52, 0x94, 0xa5, 0x28, 0x1e, 0x00, - 0xb4, 0x2d, 0x0b, 0x42, 0x82, 0x00, - 0x26, 0x89, 0xa2, 0x68, 0x62, 0x80, - 0x58, 0x56, 0x15, 0x86, 0x44, 0x00, - 0x19, 0x86, 0x61, 0x99, 0xe0, 0x00, - 0xf7, 0x8d, 0xa2, 0xa0, 0x33, 0x00 -}; - -const uint8_t kMaskRandom41_21[126] = { - 0x4c, 0x13, 0x04, 0xc1, 0x91, 0x00, - 0x51, 0x14, 0x45, 0x11, 0x45, 0x00, - 0xa0, 0x68, 0x1a, 0x06, 0xa4, 0x00, - 0x04, 0xc1, 0x30, 0x4c, 0x13, 0x00, - 0x03, 0x80, 0xe0, 0x3b, 0x40, 0x00, - 0x86, 0x21, 0x88, 0x62, 0x09, 0x00, - 0x29, 0x0a, 0x42, 0x90, 0x84, 0x80, - 0x42, 0x50, 0x94, 0x24, 0x30, 0x80, - 0x98, 0x26, 0x09, 0x81, 0x28, 0x00, - 0x30, 0x8c, 0x23, 0x08, 0x4a, 0x80, - 0xc6, 0x31, 0x8c, 0x62, 0x1a, 0x00, - 0x23, 0x88, 0xe2, 0x38, 0x8c, 0x80, - 0x1a, 0x46, 0x91, 0xa4, 0x58, 0x80, - 0x24, 0xc9, 0x32, 0x4d, 0x30, 0x80, - 0x71, 0x1c, 0x47, 0x11, 0x07, 0x00, - 0x0e, 0x03, 0x80, 0xe1, 0x91, 0x00, - 0x33, 0x0c, 0xc3, 0x31, 0x45, 0x00, - 0x10, 0xc4, 0x31, 0x0c, 0x32, 0x80, - 0x45, 0x51, 0x54, 0x56, 0x84, 0x80, - 0x88, 0xa2, 0x28, 0x88, 0x4a, 0x80, - 0xe0, 0x38, 0x0e, 0x02, 0x29, 0x00 -}; - -const uint8_t kMaskRandom41_22[132] = { - 0xc6, 0x31, 0x8c, 0x62, 0x1a, 0x00, - 0x23, 0x88, 0xe2, 0x38, 0x8c, 0x80, - 0x1a, 0x46, 0x91, 0xa4, 0x58, 0x80, - 0x24, 0xc9, 0x32, 0x4d, 0x30, 0x80, - 0x71, 0x1c, 0x47, 0x11, 0x07, 0x00, - 0x0e, 0x03, 0x80, 0xe1, 0x91, 0x00, - 0x33, 0x0c, 0xc3, 0x31, 0x45, 0x00, - 0x10, 0xc4, 0x31, 0x0c, 0x32, 0x80, - 0x45, 0x51, 0x54, 0x56, 0x84, 0x80, - 0x88, 0xa2, 0x28, 0x88, 0x4a, 0x80, - 0xe0, 0x38, 0x0e, 0x02, 0x29, 0x00, - 0x4c, 0x13, 0x04, 0xc1, 0x91, 0x00, - 0x51, 0x14, 0x45, 0x11, 0x45, 0x00, - 0xa0, 0x68, 0x1a, 0x06, 0xa4, 0x00, - 0x04, 0xc1, 0x30, 0x4c, 0x13, 0x00, - 0x03, 0x80, 0xe0, 0x3b, 0x40, 0x00, - 0x86, 0x21, 0x88, 0x62, 0x09, 0x00, - 0x29, 0x0a, 0x42, 0x90, 0x84, 0x80, - 0x42, 0x50, 0x94, 0x24, 0x30, 0x80, - 0x98, 0x26, 0x09, 0x81, 0x28, 0x00, - 0x30, 0x8c, 0x23, 0x08, 0x4a, 0x80, - 0x33, 0x09, 0x6e, 0x49, 0x6b, 0x80 -}; - -const uint8_t kMaskRandom41_23[138] = { - 0xc6, 0x31, 0x8c, 0x62, 0x1a, 0x00, - 0x23, 0x88, 0xe2, 0x38, 0x8c, 0x80, - 0x1a, 0x46, 0x91, 0xa4, 0x58, 0x80, - 0x24, 0xc9, 0x32, 0x4d, 0x30, 0x80, - 0x71, 0x1c, 0x47, 0x11, 0x07, 0x00, - 0x0e, 0x03, 0x80, 0xe1, 0x91, 0x00, - 0x33, 0x0c, 0xc3, 0x31, 0x45, 0x00, - 0x10, 0xc4, 0x31, 0x0c, 0x32, 0x80, - 0x45, 0x51, 0x54, 0x56, 0x84, 0x80, - 0x88, 0xa2, 0x28, 0x88, 0x4a, 0x80, - 0xe0, 0x38, 0x0e, 0x02, 0x29, 0x00, - 0x0e, 0x03, 0x80, 0xe1, 0x91, 0x00, - 0x33, 0x0c, 0xc3, 0x31, 0x45, 0x00, - 0x10, 0xc4, 0x31, 0x0c, 0x32, 0x80, - 0x45, 0x51, 0x54, 0x56, 0x84, 0x80, - 0x88, 0xa2, 0x28, 0x88, 0x4a, 0x80, - 0xe0, 0x38, 0x0e, 0x02, 0x29, 0x00, - 0xc6, 0x31, 0x8c, 0x62, 0x1a, 0x00, - 0x23, 0x88, 0xe2, 0x38, 0x8c, 0x80, - 0x1a, 0x46, 0x91, 0xa4, 0x58, 0x80, - 0x24, 0xc9, 0x32, 0x4d, 0x30, 0x80, - 0x71, 0x1c, 0x47, 0x11, 0x07, 0x00, - 0xf5, 0xdc, 0x4a, 0x06, 0x51, 0x80 -}; - -const uint8_t kMaskRandom41_24[144] = { - 0x0e, 0x03, 0x80, 0xe1, 0x91, 0x00, - 0x33, 0x0c, 0xc3, 0x31, 0x45, 0x00, - 0x10, 0xc4, 0x31, 0x0c, 0x32, 0x80, - 0x45, 0x51, 0x54, 0x56, 0x84, 0x80, - 0x88, 0xa2, 0x28, 0x88, 0x4a, 0x80, - 0xe0, 0x38, 0x0e, 0x02, 0x29, 0x00, - 0xc6, 0x31, 0x8c, 0x62, 0x1a, 0x00, - 0x23, 0x88, 0xe2, 0x38, 0x8c, 0x80, - 0x1a, 0x46, 0x91, 0xa4, 0x58, 0x80, - 0x24, 0xc9, 0x32, 0x4d, 0x30, 0x80, - 0x71, 0x1c, 0x47, 0x11, 0x07, 0x00, - 0xf5, 0xdc, 0x4a, 0x06, 0x51, 0x80, - 0xc6, 0x31, 0x8c, 0x62, 0x1a, 0x00, - 0x23, 0x88, 0xe2, 0x38, 0x8c, 0x80, - 0x1a, 0x46, 0x91, 0xa4, 0x58, 0x80, - 0x24, 0xc9, 0x32, 0x4d, 0x30, 0x80, - 0x71, 0x1c, 0x47, 0x11, 0x07, 0x00, - 0x0e, 0x03, 0x80, 0xe1, 0x91, 0x00, - 0x33, 0x0c, 0xc3, 0x31, 0x45, 0x00, - 0x10, 0xc4, 0x31, 0x0c, 0x32, 0x80, - 0x45, 0x51, 0x54, 0x56, 0x84, 0x80, - 0x88, 0xa2, 0x28, 0x88, 0x4a, 0x80, - 0xe0, 0x38, 0x0e, 0x02, 0x29, 0x00, - 0x45, 0xa6, 0xef, 0xc9, 0xc3, 0x00 -}; - -const uint8_t kMaskRandom41_25[150] = { - 0x0e, 0x03, 0x80, 0xe1, 0x91, 0x00, - 0x33, 0x0c, 0xc3, 0x31, 0x45, 0x00, - 0x10, 0xc4, 0x31, 0x0c, 0x32, 0x80, - 0x45, 0x51, 0x54, 0x56, 0x84, 0x80, - 0x88, 0xa2, 0x28, 0x88, 0x4a, 0x80, - 0xe0, 0x38, 0x0e, 0x02, 0x29, 0x00, - 0xc6, 0x31, 0x8c, 0x62, 0x1a, 0x00, - 0x23, 0x88, 0xe2, 0x38, 0x8c, 0x80, - 0x1a, 0x46, 0x91, 0xa4, 0x58, 0x80, - 0x24, 0xc9, 0x32, 0x4d, 0x30, 0x80, - 0x71, 0x1c, 0x47, 0x11, 0x07, 0x00, - 0xf5, 0xdc, 0x4a, 0x06, 0x51, 0x80, - 0x0e, 0x03, 0x80, 0xe1, 0x91, 0x00, - 0x33, 0x0c, 0xc3, 0x31, 0x45, 0x00, - 0x10, 0xc4, 0x31, 0x0c, 0x32, 0x80, - 0x45, 0x51, 0x54, 0x56, 0x84, 0x80, - 0x88, 0xa2, 0x28, 0x88, 0x4a, 0x80, - 0xe0, 0x38, 0x0e, 0x02, 0x29, 0x00, - 0x46, 0x11, 0x84, 0x61, 0x19, 0x00, - 0x33, 0x0c, 0xc3, 0x30, 0xcc, 0x80, - 0x10, 0xc4, 0x31, 0x0e, 0x46, 0x00, - 0x0c, 0x43, 0x10, 0xc6, 0x90, 0x80, - 0x28, 0x8a, 0x22, 0x89, 0x42, 0x80, - 0x94, 0x25, 0x09, 0x42, 0x13, 0x00, - 0xc1, 0x30, 0x4c, 0x10, 0x25, 0x80 -}; - -const uint8_t kMaskRandom41_26[156] = { - 0x0e, 0x03, 0x80, 0xe1, 0x91, 0x00, - 0x33, 0x0c, 0xc3, 0x31, 0x45, 0x00, - 0x10, 0xc4, 0x31, 0x0c, 0x32, 0x80, - 0x45, 0x51, 0x54, 0x56, 0x84, 0x80, - 0x88, 0xa2, 0x28, 0x88, 0x4a, 0x80, - 0xe0, 0x38, 0x0e, 0x02, 0x29, 0x00, - 0x46, 0x11, 0x84, 0x61, 0x19, 0x00, - 0x33, 0x0c, 0xc3, 0x30, 0xcc, 0x80, - 0x10, 0xc4, 0x31, 0x0e, 0x46, 0x00, - 0x0c, 0x43, 0x10, 0xc6, 0x90, 0x80, - 0x28, 0x8a, 0x22, 0x89, 0x42, 0x80, - 0x94, 0x25, 0x09, 0x42, 0x13, 0x00, - 0xc1, 0x30, 0x4c, 0x10, 0x25, 0x80, - 0x0e, 0x03, 0x80, 0xe1, 0x91, 0x00, - 0x33, 0x0c, 0xc3, 0x31, 0x45, 0x00, - 0x10, 0xc4, 0x31, 0x0c, 0x32, 0x80, - 0x45, 0x51, 0x54, 0x56, 0x84, 0x80, - 0x88, 0xa2, 0x28, 0x88, 0x4a, 0x80, - 0xe0, 0x38, 0x0e, 0x02, 0x29, 0x00, - 0xc6, 0x31, 0x8c, 0x62, 0x1a, 0x00, - 0x23, 0x88, 0xe2, 0x38, 0x8c, 0x80, - 0x1a, 0x46, 0x91, 0xa4, 0x58, 0x80, - 0x24, 0xc9, 0x32, 0x4d, 0x30, 0x80, - 0x71, 0x1c, 0x47, 0x11, 0x07, 0x00, - 0xf5, 0xdc, 0x4a, 0x06, 0x51, 0x80, - 0x6f, 0x72, 0xf1, 0xe7, 0x1a, 0x80 -}; - -const uint8_t kMaskRandom41_27[162] = { - 0x0e, 0x03, 0x80, 0xe1, 0x91, 0x00, - 0x33, 0x0c, 0xc3, 0x31, 0x45, 0x00, - 0x10, 0xc4, 0x31, 0x0c, 0x32, 0x80, - 0x45, 0x51, 0x54, 0x56, 0x84, 0x80, - 0x88, 0xa2, 0x28, 0x88, 0x4a, 0x80, - 0xe0, 0x38, 0x0e, 0x02, 0x29, 0x00, - 0x46, 0x11, 0x84, 0x61, 0x19, 0x00, - 0x33, 0x0c, 0xc3, 0x30, 0xcc, 0x80, - 0x10, 0xc4, 0x31, 0x0e, 0x46, 0x00, - 0x0c, 0x43, 0x10, 0xc6, 0x90, 0x80, - 0x28, 0x8a, 0x22, 0x89, 0x42, 0x80, - 0x94, 0x25, 0x09, 0x42, 0x13, 0x00, - 0xc1, 0x30, 0x4c, 0x10, 0x25, 0x80, - 0x46, 0x11, 0x84, 0x61, 0x19, 0x00, - 0x33, 0x0c, 0xc3, 0x30, 0xcc, 0x80, - 0x10, 0xc4, 0x31, 0x0e, 0x46, 0x00, - 0x0c, 0x43, 0x10, 0xc6, 0x90, 0x80, - 0x28, 0x8a, 0x22, 0x89, 0x42, 0x80, - 0x94, 0x25, 0x09, 0x42, 0x13, 0x00, - 0xc1, 0x30, 0x4c, 0x10, 0x25, 0x80, - 0x0e, 0x03, 0x80, 0xe1, 0x91, 0x00, - 0x33, 0x0c, 0xc3, 0x31, 0x45, 0x00, - 0x10, 0xc4, 0x31, 0x0c, 0x32, 0x80, - 0x45, 0x51, 0x54, 0x56, 0x84, 0x80, - 0x88, 0xa2, 0x28, 0x88, 0x4a, 0x80, - 0xe0, 0x38, 0x0e, 0x02, 0x29, 0x00, - 0x56, 0x3e, 0x24, 0xdd, 0x0c, 0x00 -}; - -const uint8_t kMaskRandom41_28[168] = { - 0x46, 0x11, 0x84, 0x61, 0x19, 0x00, - 0x33, 0x0c, 0xc3, 0x30, 0xcc, 0x80, - 0x10, 0xc4, 0x31, 0x0e, 0x46, 0x00, - 0x0c, 0x43, 0x10, 0xc6, 0x90, 0x80, - 0x28, 0x8a, 0x22, 0x89, 0x42, 0x80, - 0x94, 0x25, 0x09, 0x42, 0x13, 0x00, - 0xc1, 0x30, 0x4c, 0x10, 0x25, 0x80, - 0x0e, 0x03, 0x80, 0xe1, 0x91, 0x00, - 0x33, 0x0c, 0xc3, 0x31, 0x45, 0x00, - 0x10, 0xc4, 0x31, 0x0c, 0x32, 0x80, - 0x45, 0x51, 0x54, 0x56, 0x84, 0x80, - 0x88, 0xa2, 0x28, 0x88, 0x4a, 0x80, - 0xe0, 0x38, 0x0e, 0x02, 0x29, 0x00, - 0x56, 0x3e, 0x24, 0xdd, 0x0c, 0x00, - 0x0e, 0x03, 0x80, 0xe1, 0x91, 0x00, - 0x33, 0x0c, 0xc3, 0x31, 0x45, 0x00, - 0x10, 0xc4, 0x31, 0x0c, 0x32, 0x80, - 0x45, 0x51, 0x54, 0x56, 0x84, 0x80, - 0x88, 0xa2, 0x28, 0x88, 0x4a, 0x80, - 0xe0, 0x38, 0x0e, 0x02, 0x29, 0x00, - 0x46, 0x11, 0x84, 0x61, 0x19, 0x00, - 0x33, 0x0c, 0xc3, 0x30, 0xcc, 0x80, - 0x10, 0xc4, 0x31, 0x0e, 0x46, 0x00, - 0x0c, 0x43, 0x10, 0xc6, 0x90, 0x80, - 0x28, 0x8a, 0x22, 0x89, 0x42, 0x80, - 0x94, 0x25, 0x09, 0x42, 0x13, 0x00, - 0xc1, 0x30, 0x4c, 0x10, 0x25, 0x80, - 0x61, 0x2c, 0xfa, 0x25, 0x38, 0x00 -}; - -const uint8_t kMaskRandom41_29[174] = { - 0x46, 0x11, 0x84, 0x61, 0x19, 0x00, - 0x33, 0x0c, 0xc3, 0x30, 0xcc, 0x80, - 0x10, 0xc4, 0x31, 0x0e, 0x46, 0x00, - 0x0c, 0x43, 0x10, 0xc6, 0x90, 0x80, - 0x28, 0x8a, 0x22, 0x89, 0x42, 0x80, - 0x94, 0x25, 0x09, 0x42, 0x13, 0x00, - 0xc1, 0x30, 0x4c, 0x10, 0x25, 0x80, - 0x0e, 0x03, 0x80, 0xe1, 0x91, 0x00, - 0x33, 0x0c, 0xc3, 0x31, 0x45, 0x00, - 0x10, 0xc4, 0x31, 0x0c, 0x32, 0x80, - 0x45, 0x51, 0x54, 0x56, 0x84, 0x80, - 0x88, 0xa2, 0x28, 0x88, 0x4a, 0x80, - 0xe0, 0x38, 0x0e, 0x02, 0x29, 0x00, - 0x56, 0x3e, 0x24, 0xdd, 0x0c, 0x00, - 0x46, 0x11, 0x84, 0x61, 0x19, 0x00, - 0x33, 0x0c, 0xc3, 0x30, 0xcc, 0x80, - 0x10, 0xc4, 0x31, 0x0e, 0x46, 0x00, - 0x0c, 0x43, 0x10, 0xc6, 0x90, 0x80, - 0x28, 0x8a, 0x22, 0x89, 0x42, 0x80, - 0x94, 0x25, 0x09, 0x42, 0x13, 0x00, - 0xc1, 0x30, 0x4c, 0x10, 0x25, 0x80, - 0x2c, 0x0b, 0x02, 0xc0, 0x32, 0x00, - 0x81, 0xa0, 0x68, 0x1a, 0x01, 0x80, - 0xa0, 0x68, 0x1a, 0x06, 0x82, 0x00, - 0x05, 0x41, 0x50, 0x54, 0x15, 0x00, - 0x18, 0x86, 0x21, 0x89, 0x0c, 0x00, - 0xc2, 0x30, 0x8c, 0x20, 0x68, 0x00, - 0x22, 0x88, 0xa2, 0x29, 0x80, 0x80, - 0x50, 0x54, 0x15, 0x04, 0x50, 0x80 -}; - -const uint8_t kMaskRandom41_3[18] = { - 0xce, 0x33, 0x8c, 0xe3, 0x2b, 0x00, - 0x55, 0x95, 0x65, 0x5d, 0xc5, 0x00, - 0xb1, 0x6a, 0x3a, 0x8e, 0xd8, 0x80 -}; - -const uint8_t kMaskRandom41_30[180] = { - 0x46, 0x11, 0x84, 0x61, 0x19, 0x00, - 0x33, 0x0c, 0xc3, 0x30, 0xcc, 0x80, - 0x10, 0xc4, 0x31, 0x0e, 0x46, 0x00, - 0x0c, 0x43, 0x10, 0xc6, 0x90, 0x80, - 0x28, 0x8a, 0x22, 0x89, 0x42, 0x80, - 0x94, 0x25, 0x09, 0x42, 0x13, 0x00, - 0xc1, 0x30, 0x4c, 0x10, 0x25, 0x80, - 0x2c, 0x0b, 0x02, 0xc0, 0x32, 0x00, - 0x81, 0xa0, 0x68, 0x1a, 0x01, 0x80, - 0xa0, 0x68, 0x1a, 0x06, 0x82, 0x00, - 0x05, 0x41, 0x50, 0x54, 0x15, 0x00, - 0x18, 0x86, 0x21, 0x89, 0x0c, 0x00, - 0xc2, 0x30, 0x8c, 0x20, 0x68, 0x00, - 0x22, 0x88, 0xa2, 0x29, 0x80, 0x80, - 0x50, 0x54, 0x15, 0x04, 0x50, 0x80, - 0x46, 0x11, 0x84, 0x61, 0x19, 0x00, - 0x33, 0x0c, 0xc3, 0x30, 0xcc, 0x80, - 0x10, 0xc4, 0x31, 0x0e, 0x46, 0x00, - 0x0c, 0x43, 0x10, 0xc6, 0x90, 0x80, - 0x28, 0x8a, 0x22, 0x89, 0x42, 0x80, - 0x94, 0x25, 0x09, 0x42, 0x13, 0x00, - 0xc1, 0x30, 0x4c, 0x10, 0x25, 0x80, - 0x0e, 0x03, 0x80, 0xe1, 0x91, 0x00, - 0x33, 0x0c, 0xc3, 0x31, 0x45, 0x00, - 0x10, 0xc4, 0x31, 0x0c, 0x32, 0x80, - 0x45, 0x51, 0x54, 0x56, 0x84, 0x80, - 0x88, 0xa2, 0x28, 0x88, 0x4a, 0x80, - 0xe0, 0x38, 0x0e, 0x02, 0x29, 0x00, - 0x56, 0x3e, 0x24, 0xdd, 0x0c, 0x00, - 0x59, 0x53, 0x31, 0x62, 0x15, 0x00 -}; - -const uint8_t kMaskRandom41_31[186] = { - 0x46, 0x11, 0x84, 0x61, 0x19, 0x00, - 0x33, 0x0c, 0xc3, 0x30, 0xcc, 0x80, - 0x10, 0xc4, 0x31, 0x0e, 0x46, 0x00, - 0x0c, 0x43, 0x10, 0xc6, 0x90, 0x80, - 0x28, 0x8a, 0x22, 0x89, 0x42, 0x80, - 0x94, 0x25, 0x09, 0x42, 0x13, 0x00, - 0xc1, 0x30, 0x4c, 0x10, 0x25, 0x80, - 0x2c, 0x0b, 0x02, 0xc0, 0x32, 0x00, - 0x81, 0xa0, 0x68, 0x1a, 0x01, 0x80, - 0xa0, 0x68, 0x1a, 0x06, 0x82, 0x00, - 0x05, 0x41, 0x50, 0x54, 0x15, 0x00, - 0x18, 0x86, 0x21, 0x89, 0x0c, 0x00, - 0xc2, 0x30, 0x8c, 0x20, 0x68, 0x00, - 0x22, 0x88, 0xa2, 0x29, 0x80, 0x80, - 0x50, 0x54, 0x15, 0x04, 0x50, 0x80, - 0x2c, 0x0b, 0x02, 0xc0, 0x32, 0x00, - 0x81, 0xa0, 0x68, 0x1a, 0x01, 0x80, - 0xa0, 0x68, 0x1a, 0x06, 0x82, 0x00, - 0x05, 0x41, 0x50, 0x54, 0x15, 0x00, - 0x18, 0x86, 0x21, 0x89, 0x0c, 0x00, - 0xc2, 0x30, 0x8c, 0x20, 0x68, 0x00, - 0x22, 0x88, 0xa2, 0x29, 0x80, 0x80, - 0x50, 0x54, 0x15, 0x04, 0x50, 0x80, - 0x46, 0x11, 0x84, 0x61, 0x19, 0x00, - 0x33, 0x0c, 0xc3, 0x30, 0xcc, 0x80, - 0x10, 0xc4, 0x31, 0x0e, 0x46, 0x00, - 0x0c, 0x43, 0x10, 0xc6, 0x90, 0x80, - 0x28, 0x8a, 0x22, 0x89, 0x42, 0x80, - 0x94, 0x25, 0x09, 0x42, 0x13, 0x00, - 0xc1, 0x30, 0x4c, 0x10, 0x25, 0x80, - 0x28, 0x1c, 0x63, 0xbf, 0x53, 0x80 -}; - -const uint8_t kMaskRandom41_32[192] = { - 0x2c, 0x0b, 0x02, 0xc0, 0x32, 0x00, - 0x81, 0xa0, 0x68, 0x1a, 0x01, 0x80, - 0xa0, 0x68, 0x1a, 0x06, 0x82, 0x00, - 0x05, 0x41, 0x50, 0x54, 0x15, 0x00, - 0x18, 0x86, 0x21, 0x89, 0x0c, 0x00, - 0xc2, 0x30, 0x8c, 0x20, 0x68, 0x00, - 0x22, 0x88, 0xa2, 0x29, 0x80, 0x80, - 0x50, 0x54, 0x15, 0x04, 0x50, 0x80, - 0x46, 0x11, 0x84, 0x61, 0x19, 0x00, - 0x33, 0x0c, 0xc3, 0x30, 0xcc, 0x80, - 0x10, 0xc4, 0x31, 0x0e, 0x46, 0x00, - 0x0c, 0x43, 0x10, 0xc6, 0x90, 0x80, - 0x28, 0x8a, 0x22, 0x89, 0x42, 0x80, - 0x94, 0x25, 0x09, 0x42, 0x13, 0x00, - 0xc1, 0x30, 0x4c, 0x10, 0x25, 0x80, - 0x28, 0x1c, 0x63, 0xbf, 0x53, 0x80, - 0x46, 0x11, 0x84, 0x61, 0x19, 0x00, - 0x33, 0x0c, 0xc3, 0x30, 0xcc, 0x80, - 0x10, 0xc4, 0x31, 0x0e, 0x46, 0x00, - 0x0c, 0x43, 0x10, 0xc6, 0x90, 0x80, - 0x28, 0x8a, 0x22, 0x89, 0x42, 0x80, - 0x94, 0x25, 0x09, 0x42, 0x13, 0x00, - 0xc1, 0x30, 0x4c, 0x10, 0x25, 0x80, - 0x2c, 0x0b, 0x02, 0xc0, 0x32, 0x00, - 0x81, 0xa0, 0x68, 0x1a, 0x01, 0x80, - 0xa0, 0x68, 0x1a, 0x06, 0x82, 0x00, - 0x05, 0x41, 0x50, 0x54, 0x15, 0x00, - 0x18, 0x86, 0x21, 0x89, 0x0c, 0x00, - 0xc2, 0x30, 0x8c, 0x20, 0x68, 0x00, - 0x22, 0x88, 0xa2, 0x29, 0x80, 0x80, - 0x50, 0x54, 0x15, 0x04, 0x50, 0x80, - 0xca, 0xbb, 0xcb, 0x6d, 0xaa, 0x00 -}; - -const uint8_t kMaskRandom41_33[198] = { - 0x2c, 0x0b, 0x02, 0xc0, 0x32, 0x00, - 0x81, 0xa0, 0x68, 0x1a, 0x01, 0x80, - 0xa0, 0x68, 0x1a, 0x06, 0x82, 0x00, - 0x05, 0x41, 0x50, 0x54, 0x15, 0x00, - 0x18, 0x86, 0x21, 0x89, 0x0c, 0x00, - 0xc2, 0x30, 0x8c, 0x20, 0x68, 0x00, - 0x22, 0x88, 0xa2, 0x29, 0x80, 0x80, - 0x50, 0x54, 0x15, 0x04, 0x50, 0x80, - 0x46, 0x11, 0x84, 0x61, 0x19, 0x00, - 0x33, 0x0c, 0xc3, 0x30, 0xcc, 0x80, - 0x10, 0xc4, 0x31, 0x0e, 0x46, 0x00, - 0x0c, 0x43, 0x10, 0xc6, 0x90, 0x80, - 0x28, 0x8a, 0x22, 0x89, 0x42, 0x80, - 0x94, 0x25, 0x09, 0x42, 0x13, 0x00, - 0xc1, 0x30, 0x4c, 0x10, 0x25, 0x80, - 0x28, 0x1c, 0x63, 0xbf, 0x53, 0x80, - 0x2c, 0x0b, 0x02, 0xc0, 0x32, 0x00, - 0x81, 0xa0, 0x68, 0x1a, 0x01, 0x80, - 0xa0, 0x68, 0x1a, 0x06, 0x82, 0x00, - 0x05, 0x41, 0x50, 0x54, 0x15, 0x00, - 0x18, 0x86, 0x21, 0x89, 0x0c, 0x00, - 0xc2, 0x30, 0x8c, 0x20, 0x68, 0x00, - 0x22, 0x88, 0xa2, 0x29, 0x80, 0x80, - 0x50, 0x54, 0x15, 0x04, 0x50, 0x80, - 0x4e, 0x13, 0x84, 0xe1, 0x19, 0x00, - 0xe3, 0x38, 0xce, 0x31, 0x89, 0x80, - 0x81, 0xe0, 0x78, 0x1e, 0x30, 0x00, - 0x21, 0x48, 0x52, 0x14, 0x05, 0x80, - 0x52, 0x94, 0xa5, 0x28, 0x1e, 0x00, - 0xb4, 0x2d, 0x0b, 0x42, 0x82, 0x00, - 0x26, 0x89, 0xa2, 0x68, 0x62, 0x80, - 0x58, 0x56, 0x15, 0x86, 0x44, 0x00, - 0x19, 0x86, 0x61, 0x99, 0xe0, 0x00 -}; - -const uint8_t kMaskRandom41_34[204] = { - 0x2c, 0x0b, 0x02, 0xc0, 0x32, 0x00, - 0x81, 0xa0, 0x68, 0x1a, 0x01, 0x80, - 0xa0, 0x68, 0x1a, 0x06, 0x82, 0x00, - 0x05, 0x41, 0x50, 0x54, 0x15, 0x00, - 0x18, 0x86, 0x21, 0x89, 0x0c, 0x00, - 0xc2, 0x30, 0x8c, 0x20, 0x68, 0x00, - 0x22, 0x88, 0xa2, 0x29, 0x80, 0x80, - 0x50, 0x54, 0x15, 0x04, 0x50, 0x80, - 0x4e, 0x13, 0x84, 0xe1, 0x19, 0x00, - 0xe3, 0x38, 0xce, 0x31, 0x89, 0x80, - 0x81, 0xe0, 0x78, 0x1e, 0x30, 0x00, - 0x21, 0x48, 0x52, 0x14, 0x05, 0x80, - 0x52, 0x94, 0xa5, 0x28, 0x1e, 0x00, - 0xb4, 0x2d, 0x0b, 0x42, 0x82, 0x00, - 0x26, 0x89, 0xa2, 0x68, 0x62, 0x80, - 0x58, 0x56, 0x15, 0x86, 0x44, 0x00, - 0x19, 0x86, 0x61, 0x99, 0xe0, 0x00, - 0x2c, 0x0b, 0x02, 0xc0, 0x32, 0x00, - 0x81, 0xa0, 0x68, 0x1a, 0x01, 0x80, - 0xa0, 0x68, 0x1a, 0x06, 0x82, 0x00, - 0x05, 0x41, 0x50, 0x54, 0x15, 0x00, - 0x18, 0x86, 0x21, 0x89, 0x0c, 0x00, - 0xc2, 0x30, 0x8c, 0x20, 0x68, 0x00, - 0x22, 0x88, 0xa2, 0x29, 0x80, 0x80, - 0x50, 0x54, 0x15, 0x04, 0x50, 0x80, - 0x46, 0x11, 0x84, 0x61, 0x19, 0x00, - 0x33, 0x0c, 0xc3, 0x30, 0xcc, 0x80, - 0x10, 0xc4, 0x31, 0x0e, 0x46, 0x00, - 0x0c, 0x43, 0x10, 0xc6, 0x90, 0x80, - 0x28, 0x8a, 0x22, 0x89, 0x42, 0x80, - 0x94, 0x25, 0x09, 0x42, 0x13, 0x00, - 0xc1, 0x30, 0x4c, 0x10, 0x25, 0x80, - 0x28, 0x1c, 0x63, 0xbf, 0x53, 0x80, - 0xbd, 0x37, 0x3f, 0x75, 0x36, 0x80 -}; - -const uint8_t kMaskRandom41_35[210] = { - 0x2c, 0x0b, 0x02, 0xc0, 0x32, 0x00, - 0x81, 0xa0, 0x68, 0x1a, 0x01, 0x80, - 0xa0, 0x68, 0x1a, 0x06, 0x82, 0x00, - 0x05, 0x41, 0x50, 0x54, 0x15, 0x00, - 0x18, 0x86, 0x21, 0x89, 0x0c, 0x00, - 0xc2, 0x30, 0x8c, 0x20, 0x68, 0x00, - 0x22, 0x88, 0xa2, 0x29, 0x80, 0x80, - 0x50, 0x54, 0x15, 0x04, 0x50, 0x80, - 0x4e, 0x13, 0x84, 0xe1, 0x19, 0x00, - 0xe3, 0x38, 0xce, 0x31, 0x89, 0x80, - 0x81, 0xe0, 0x78, 0x1e, 0x30, 0x00, - 0x21, 0x48, 0x52, 0x14, 0x05, 0x80, - 0x52, 0x94, 0xa5, 0x28, 0x1e, 0x00, - 0xb4, 0x2d, 0x0b, 0x42, 0x82, 0x00, - 0x26, 0x89, 0xa2, 0x68, 0x62, 0x80, - 0x58, 0x56, 0x15, 0x86, 0x44, 0x00, - 0x19, 0x86, 0x61, 0x99, 0xe0, 0x00, - 0x4e, 0x13, 0x84, 0xe1, 0x19, 0x00, - 0xe3, 0x38, 0xce, 0x31, 0x89, 0x80, - 0x81, 0xe0, 0x78, 0x1e, 0x30, 0x00, - 0x21, 0x48, 0x52, 0x14, 0x05, 0x80, - 0x52, 0x94, 0xa5, 0x28, 0x1e, 0x00, - 0xb4, 0x2d, 0x0b, 0x42, 0x82, 0x00, - 0x26, 0x89, 0xa2, 0x68, 0x62, 0x80, - 0x58, 0x56, 0x15, 0x86, 0x44, 0x00, - 0x19, 0x86, 0x61, 0x99, 0xe0, 0x00, - 0x2c, 0x0b, 0x02, 0xc0, 0x32, 0x00, - 0x81, 0xa0, 0x68, 0x1a, 0x01, 0x80, - 0xa0, 0x68, 0x1a, 0x06, 0x82, 0x00, - 0x05, 0x41, 0x50, 0x54, 0x15, 0x00, - 0x18, 0x86, 0x21, 0x89, 0x0c, 0x00, - 0xc2, 0x30, 0x8c, 0x20, 0x68, 0x00, - 0x22, 0x88, 0xa2, 0x29, 0x80, 0x80, - 0x50, 0x54, 0x15, 0x04, 0x50, 0x80, - 0x21, 0x7b, 0xf5, 0xa5, 0x65, 0x80 -}; - -const uint8_t kMaskRandom41_36[216] = { - 0x4e, 0x13, 0x84, 0xe1, 0x19, 0x00, - 0xe3, 0x38, 0xce, 0x31, 0x89, 0x80, - 0x81, 0xe0, 0x78, 0x1e, 0x30, 0x00, - 0x21, 0x48, 0x52, 0x14, 0x05, 0x80, - 0x52, 0x94, 0xa5, 0x28, 0x1e, 0x00, - 0xb4, 0x2d, 0x0b, 0x42, 0x82, 0x00, - 0x26, 0x89, 0xa2, 0x68, 0x62, 0x80, - 0x58, 0x56, 0x15, 0x86, 0x44, 0x00, - 0x19, 0x86, 0x61, 0x99, 0xe0, 0x00, - 0x2c, 0x0b, 0x02, 0xc0, 0x32, 0x00, - 0x81, 0xa0, 0x68, 0x1a, 0x01, 0x80, - 0xa0, 0x68, 0x1a, 0x06, 0x82, 0x00, - 0x05, 0x41, 0x50, 0x54, 0x15, 0x00, - 0x18, 0x86, 0x21, 0x89, 0x0c, 0x00, - 0xc2, 0x30, 0x8c, 0x20, 0x68, 0x00, - 0x22, 0x88, 0xa2, 0x29, 0x80, 0x80, - 0x50, 0x54, 0x15, 0x04, 0x50, 0x80, - 0x21, 0x7b, 0xf5, 0xa5, 0x65, 0x80, - 0x2c, 0x0b, 0x02, 0xc0, 0x32, 0x00, - 0x81, 0xa0, 0x68, 0x1a, 0x01, 0x80, - 0xa0, 0x68, 0x1a, 0x06, 0x82, 0x00, - 0x05, 0x41, 0x50, 0x54, 0x15, 0x00, - 0x18, 0x86, 0x21, 0x89, 0x0c, 0x00, - 0xc2, 0x30, 0x8c, 0x20, 0x68, 0x00, - 0x22, 0x88, 0xa2, 0x29, 0x80, 0x80, - 0x50, 0x54, 0x15, 0x04, 0x50, 0x80, - 0x4e, 0x13, 0x84, 0xe1, 0x19, 0x00, - 0xe3, 0x38, 0xce, 0x31, 0x89, 0x80, - 0x81, 0xe0, 0x78, 0x1e, 0x30, 0x00, - 0x21, 0x48, 0x52, 0x14, 0x05, 0x80, - 0x52, 0x94, 0xa5, 0x28, 0x1e, 0x00, - 0xb4, 0x2d, 0x0b, 0x42, 0x82, 0x00, - 0x26, 0x89, 0xa2, 0x68, 0x62, 0x80, - 0x58, 0x56, 0x15, 0x86, 0x44, 0x00, - 0x19, 0x86, 0x61, 0x99, 0xe0, 0x00, - 0xc1, 0xb1, 0x80, 0xbe, 0x3e, 0x00 -}; - -const uint8_t kMaskRandom41_37[222] = { - 0x4e, 0x13, 0x84, 0xe1, 0x19, 0x00, - 0xe3, 0x38, 0xce, 0x31, 0x89, 0x80, - 0x81, 0xe0, 0x78, 0x1e, 0x30, 0x00, - 0x21, 0x48, 0x52, 0x14, 0x05, 0x80, - 0x52, 0x94, 0xa5, 0x28, 0x1e, 0x00, - 0xb4, 0x2d, 0x0b, 0x42, 0x82, 0x00, - 0x26, 0x89, 0xa2, 0x68, 0x62, 0x80, - 0x58, 0x56, 0x15, 0x86, 0x44, 0x00, - 0x19, 0x86, 0x61, 0x99, 0xe0, 0x00, - 0x2c, 0x0b, 0x02, 0xc0, 0x32, 0x00, - 0x81, 0xa0, 0x68, 0x1a, 0x01, 0x80, - 0xa0, 0x68, 0x1a, 0x06, 0x82, 0x00, - 0x05, 0x41, 0x50, 0x54, 0x15, 0x00, - 0x18, 0x86, 0x21, 0x89, 0x0c, 0x00, - 0xc2, 0x30, 0x8c, 0x20, 0x68, 0x00, - 0x22, 0x88, 0xa2, 0x29, 0x80, 0x80, - 0x50, 0x54, 0x15, 0x04, 0x50, 0x80, - 0x21, 0x7b, 0xf5, 0xa5, 0x65, 0x80, - 0x4e, 0x13, 0x84, 0xe1, 0x19, 0x00, - 0xe3, 0x38, 0xce, 0x31, 0x89, 0x80, - 0x81, 0xe0, 0x78, 0x1e, 0x30, 0x00, - 0x21, 0x48, 0x52, 0x14, 0x05, 0x80, - 0x52, 0x94, 0xa5, 0x28, 0x1e, 0x00, - 0xb4, 0x2d, 0x0b, 0x42, 0x82, 0x00, - 0x26, 0x89, 0xa2, 0x68, 0x62, 0x80, - 0x58, 0x56, 0x15, 0x86, 0x44, 0x00, - 0x19, 0x86, 0x61, 0x99, 0xe0, 0x00, - 0x4c, 0x13, 0x04, 0xc1, 0x91, 0x00, - 0x51, 0x14, 0x45, 0x11, 0x45, 0x00, - 0xa0, 0x68, 0x1a, 0x06, 0xa4, 0x00, - 0x04, 0xc1, 0x30, 0x4c, 0x13, 0x00, - 0x03, 0x80, 0xe0, 0x3b, 0x40, 0x00, - 0x86, 0x21, 0x88, 0x62, 0x09, 0x00, - 0x29, 0x0a, 0x42, 0x90, 0x84, 0x80, - 0x42, 0x50, 0x94, 0x24, 0x30, 0x80, - 0x98, 0x26, 0x09, 0x81, 0x28, 0x00, - 0x30, 0x8c, 0x23, 0x08, 0x4a, 0x80 -}; - -const uint8_t kMaskRandom41_38[228] = { - 0x4e, 0x13, 0x84, 0xe1, 0x19, 0x00, - 0xe3, 0x38, 0xce, 0x31, 0x89, 0x80, - 0x81, 0xe0, 0x78, 0x1e, 0x30, 0x00, - 0x21, 0x48, 0x52, 0x14, 0x05, 0x80, - 0x52, 0x94, 0xa5, 0x28, 0x1e, 0x00, - 0xb4, 0x2d, 0x0b, 0x42, 0x82, 0x00, - 0x26, 0x89, 0xa2, 0x68, 0x62, 0x80, - 0x58, 0x56, 0x15, 0x86, 0x44, 0x00, - 0x19, 0x86, 0x61, 0x99, 0xe0, 0x00, - 0x4c, 0x13, 0x04, 0xc1, 0x91, 0x00, - 0x51, 0x14, 0x45, 0x11, 0x45, 0x00, - 0xa0, 0x68, 0x1a, 0x06, 0xa4, 0x00, - 0x04, 0xc1, 0x30, 0x4c, 0x13, 0x00, - 0x03, 0x80, 0xe0, 0x3b, 0x40, 0x00, - 0x86, 0x21, 0x88, 0x62, 0x09, 0x00, - 0x29, 0x0a, 0x42, 0x90, 0x84, 0x80, - 0x42, 0x50, 0x94, 0x24, 0x30, 0x80, - 0x98, 0x26, 0x09, 0x81, 0x28, 0x00, - 0x30, 0x8c, 0x23, 0x08, 0x4a, 0x80, - 0x4e, 0x13, 0x84, 0xe1, 0x19, 0x00, - 0xe3, 0x38, 0xce, 0x31, 0x89, 0x80, - 0x81, 0xe0, 0x78, 0x1e, 0x30, 0x00, - 0x21, 0x48, 0x52, 0x14, 0x05, 0x80, - 0x52, 0x94, 0xa5, 0x28, 0x1e, 0x00, - 0xb4, 0x2d, 0x0b, 0x42, 0x82, 0x00, - 0x26, 0x89, 0xa2, 0x68, 0x62, 0x80, - 0x58, 0x56, 0x15, 0x86, 0x44, 0x00, - 0x19, 0x86, 0x61, 0x99, 0xe0, 0x00, - 0x2c, 0x0b, 0x02, 0xc0, 0x32, 0x00, - 0x81, 0xa0, 0x68, 0x1a, 0x01, 0x80, - 0xa0, 0x68, 0x1a, 0x06, 0x82, 0x00, - 0x05, 0x41, 0x50, 0x54, 0x15, 0x00, - 0x18, 0x86, 0x21, 0x89, 0x0c, 0x00, - 0xc2, 0x30, 0x8c, 0x20, 0x68, 0x00, - 0x22, 0x88, 0xa2, 0x29, 0x80, 0x80, - 0x50, 0x54, 0x15, 0x04, 0x50, 0x80, - 0x21, 0x7b, 0xf5, 0xa5, 0x65, 0x80, - 0xea, 0xc8, 0xbb, 0xd4, 0x5d, 0x00 -}; - -const uint8_t kMaskRandom41_39[234] = { - 0x4e, 0x13, 0x84, 0xe1, 0x19, 0x00, - 0xe3, 0x38, 0xce, 0x31, 0x89, 0x80, - 0x81, 0xe0, 0x78, 0x1e, 0x30, 0x00, - 0x21, 0x48, 0x52, 0x14, 0x05, 0x80, - 0x52, 0x94, 0xa5, 0x28, 0x1e, 0x00, - 0xb4, 0x2d, 0x0b, 0x42, 0x82, 0x00, - 0x26, 0x89, 0xa2, 0x68, 0x62, 0x80, - 0x58, 0x56, 0x15, 0x86, 0x44, 0x00, - 0x19, 0x86, 0x61, 0x99, 0xe0, 0x00, - 0x4c, 0x13, 0x04, 0xc1, 0x91, 0x00, - 0x51, 0x14, 0x45, 0x11, 0x45, 0x00, - 0xa0, 0x68, 0x1a, 0x06, 0xa4, 0x00, - 0x04, 0xc1, 0x30, 0x4c, 0x13, 0x00, - 0x03, 0x80, 0xe0, 0x3b, 0x40, 0x00, - 0x86, 0x21, 0x88, 0x62, 0x09, 0x00, - 0x29, 0x0a, 0x42, 0x90, 0x84, 0x80, - 0x42, 0x50, 0x94, 0x24, 0x30, 0x80, - 0x98, 0x26, 0x09, 0x81, 0x28, 0x00, - 0x30, 0x8c, 0x23, 0x08, 0x4a, 0x80, - 0x4c, 0x13, 0x04, 0xc1, 0x91, 0x00, - 0x51, 0x14, 0x45, 0x11, 0x45, 0x00, - 0xa0, 0x68, 0x1a, 0x06, 0xa4, 0x00, - 0x04, 0xc1, 0x30, 0x4c, 0x13, 0x00, - 0x03, 0x80, 0xe0, 0x3b, 0x40, 0x00, - 0x86, 0x21, 0x88, 0x62, 0x09, 0x00, - 0x29, 0x0a, 0x42, 0x90, 0x84, 0x80, - 0x42, 0x50, 0x94, 0x24, 0x30, 0x80, - 0x98, 0x26, 0x09, 0x81, 0x28, 0x00, - 0x30, 0x8c, 0x23, 0x08, 0x4a, 0x80, - 0x4e, 0x13, 0x84, 0xe1, 0x19, 0x00, - 0xe3, 0x38, 0xce, 0x31, 0x89, 0x80, - 0x81, 0xe0, 0x78, 0x1e, 0x30, 0x00, - 0x21, 0x48, 0x52, 0x14, 0x05, 0x80, - 0x52, 0x94, 0xa5, 0x28, 0x1e, 0x00, - 0xb4, 0x2d, 0x0b, 0x42, 0x82, 0x00, - 0x26, 0x89, 0xa2, 0x68, 0x62, 0x80, - 0x58, 0x56, 0x15, 0x86, 0x44, 0x00, - 0x19, 0x86, 0x61, 0x99, 0xe0, 0x00, - 0xf7, 0x8d, 0xa2, 0xa0, 0x33, 0x00 -}; - -const uint8_t kMaskRandom41_4[24] = { - 0xe6, 0x39, 0x8e, 0x63, 0x13, 0x00, - 0x33, 0x8c, 0xe3, 0x38, 0xc5, 0x80, - 0x98, 0xe6, 0x39, 0x8d, 0x2c, 0x80, - 0x2d, 0x4b, 0x52, 0xd4, 0xb2, 0x80 -}; - -const uint8_t kMaskRandom41_40[240] = { - 0x4c, 0x13, 0x04, 0xc1, 0x91, 0x00, - 0x51, 0x14, 0x45, 0x11, 0x45, 0x00, - 0xa0, 0x68, 0x1a, 0x06, 0xa4, 0x00, - 0x04, 0xc1, 0x30, 0x4c, 0x13, 0x00, - 0x03, 0x80, 0xe0, 0x3b, 0x40, 0x00, - 0x86, 0x21, 0x88, 0x62, 0x09, 0x00, - 0x29, 0x0a, 0x42, 0x90, 0x84, 0x80, - 0x42, 0x50, 0x94, 0x24, 0x30, 0x80, - 0x98, 0x26, 0x09, 0x81, 0x28, 0x00, - 0x30, 0x8c, 0x23, 0x08, 0x4a, 0x80, - 0x4e, 0x13, 0x84, 0xe1, 0x19, 0x00, - 0xe3, 0x38, 0xce, 0x31, 0x89, 0x80, - 0x81, 0xe0, 0x78, 0x1e, 0x30, 0x00, - 0x21, 0x48, 0x52, 0x14, 0x05, 0x80, - 0x52, 0x94, 0xa5, 0x28, 0x1e, 0x00, - 0xb4, 0x2d, 0x0b, 0x42, 0x82, 0x00, - 0x26, 0x89, 0xa2, 0x68, 0x62, 0x80, - 0x58, 0x56, 0x15, 0x86, 0x44, 0x00, - 0x19, 0x86, 0x61, 0x99, 0xe0, 0x00, - 0xf7, 0x8d, 0xa2, 0xa0, 0x33, 0x00, - 0x4e, 0x13, 0x84, 0xe1, 0x19, 0x00, - 0xe3, 0x38, 0xce, 0x31, 0x89, 0x80, - 0x81, 0xe0, 0x78, 0x1e, 0x30, 0x00, - 0x21, 0x48, 0x52, 0x14, 0x05, 0x80, - 0x52, 0x94, 0xa5, 0x28, 0x1e, 0x00, - 0xb4, 0x2d, 0x0b, 0x42, 0x82, 0x00, - 0x26, 0x89, 0xa2, 0x68, 0x62, 0x80, - 0x58, 0x56, 0x15, 0x86, 0x44, 0x00, - 0x19, 0x86, 0x61, 0x99, 0xe0, 0x00, - 0x4c, 0x13, 0x04, 0xc1, 0x91, 0x00, - 0x51, 0x14, 0x45, 0x11, 0x45, 0x00, - 0xa0, 0x68, 0x1a, 0x06, 0xa4, 0x00, - 0x04, 0xc1, 0x30, 0x4c, 0x13, 0x00, - 0x03, 0x80, 0xe0, 0x3b, 0x40, 0x00, - 0x86, 0x21, 0x88, 0x62, 0x09, 0x00, - 0x29, 0x0a, 0x42, 0x90, 0x84, 0x80, - 0x42, 0x50, 0x94, 0x24, 0x30, 0x80, - 0x98, 0x26, 0x09, 0x81, 0x28, 0x00, - 0x30, 0x8c, 0x23, 0x08, 0x4a, 0x80, - 0xe8, 0x07, 0x18, 0x9a, 0x02, 0x00 -}; - -const uint8_t kMaskRandom41_41[246] = { - 0x4c, 0x13, 0x04, 0xc1, 0x91, 0x00, - 0x51, 0x14, 0x45, 0x11, 0x45, 0x00, - 0xa0, 0x68, 0x1a, 0x06, 0xa4, 0x00, - 0x04, 0xc1, 0x30, 0x4c, 0x13, 0x00, - 0x03, 0x80, 0xe0, 0x3b, 0x40, 0x00, - 0x86, 0x21, 0x88, 0x62, 0x09, 0x00, - 0x29, 0x0a, 0x42, 0x90, 0x84, 0x80, - 0x42, 0x50, 0x94, 0x24, 0x30, 0x80, - 0x98, 0x26, 0x09, 0x81, 0x28, 0x00, - 0x30, 0x8c, 0x23, 0x08, 0x4a, 0x80, - 0x4e, 0x13, 0x84, 0xe1, 0x19, 0x00, - 0xe3, 0x38, 0xce, 0x31, 0x89, 0x80, - 0x81, 0xe0, 0x78, 0x1e, 0x30, 0x00, - 0x21, 0x48, 0x52, 0x14, 0x05, 0x80, - 0x52, 0x94, 0xa5, 0x28, 0x1e, 0x00, - 0xb4, 0x2d, 0x0b, 0x42, 0x82, 0x00, - 0x26, 0x89, 0xa2, 0x68, 0x62, 0x80, - 0x58, 0x56, 0x15, 0x86, 0x44, 0x00, - 0x19, 0x86, 0x61, 0x99, 0xe0, 0x00, - 0xf7, 0x8d, 0xa2, 0xa0, 0x33, 0x00, - 0x4c, 0x13, 0x04, 0xc1, 0x91, 0x00, - 0x51, 0x14, 0x45, 0x11, 0x45, 0x00, - 0xa0, 0x68, 0x1a, 0x06, 0xa4, 0x00, - 0x04, 0xc1, 0x30, 0x4c, 0x13, 0x00, - 0x03, 0x80, 0xe0, 0x3b, 0x40, 0x00, - 0x86, 0x21, 0x88, 0x62, 0x09, 0x00, - 0x29, 0x0a, 0x42, 0x90, 0x84, 0x80, - 0x42, 0x50, 0x94, 0x24, 0x30, 0x80, - 0x98, 0x26, 0x09, 0x81, 0x28, 0x00, - 0x30, 0x8c, 0x23, 0x08, 0x4a, 0x80, - 0x4e, 0x13, 0x84, 0xc1, 0x19, 0x00, - 0xe3, 0x38, 0xc5, 0x10, 0xcc, 0x80, - 0x81, 0xe0, 0x7a, 0x06, 0x64, 0x00, - 0x21, 0x48, 0x50, 0x4c, 0x16, 0x00, - 0x52, 0x94, 0xa0, 0x3a, 0x02, 0x80, - 0xb4, 0x2d, 0x08, 0x62, 0x11, 0x00, - 0x26, 0x89, 0xa2, 0x91, 0x01, 0x80, - 0x58, 0x56, 0x14, 0x24, 0x2a, 0x00, - 0x19, 0x86, 0x69, 0x81, 0xa0, 0x00, - 0xf7, 0x8d, 0xa3, 0x08, 0x40, 0x80, - 0x2b, 0xea, 0x4d, 0xf4, 0xc1, 0x00 -}; - -const uint8_t kMaskRandom41_5[30] = { - 0xce, 0x33, 0x8c, 0xe3, 0x1b, 0x00, - 0x63, 0x98, 0xe6, 0x39, 0x8d, 0x80, - 0x98, 0xe5, 0x39, 0x8c, 0x76, 0x80, - 0x2b, 0x53, 0x54, 0xd6, 0xb5, 0x00, - 0xb4, 0x5c, 0xab, 0x26, 0xca, 0x80 -}; - -const uint8_t kMaskRandom41_6[36] = { - 0x4c, 0x1b, 0x04, 0xc1, 0x91, 0x00, - 0x51, 0x34, 0x45, 0x11, 0x45, 0x00, - 0x20, 0xe8, 0x32, 0x0e, 0xa0, 0x80, - 0x85, 0x41, 0x58, 0x54, 0x12, 0x80, - 0x06, 0x86, 0xa0, 0x68, 0x0d, 0x80, - 0x9a, 0x21, 0x88, 0xa2, 0x43, 0x00 -}; - -const uint8_t kMaskRandom41_7[42] = { - 0x4e, 0x11, 0x8c, 0x61, 0x19, 0x00, - 0x33, 0x2c, 0x03, 0x30, 0x4c, 0x80, - 0x10, 0x0e, 0xb1, 0x86, 0x74, 0x00, - 0x81, 0x51, 0x54, 0x54, 0x2d, 0x00, - 0x24, 0xc4, 0xa1, 0x2d, 0x42, 0x80, - 0xd4, 0x23, 0x0b, 0x42, 0x83, 0x00, - 0x0c, 0xa2, 0x62, 0x99, 0x21, 0x80 -}; - -const uint8_t kMaskRandom41_8[48] = { - 0x27, 0x09, 0xc0, 0x70, 0xa7, 0x00, - 0x89, 0xa2, 0x64, 0x9a, 0x82, 0x80, - 0xd0, 0x74, 0x1b, 0x07, 0xa0, 0x00, - 0x24, 0xc9, 0x32, 0x4c, 0x5c, 0x00, - 0xe2, 0x90, 0xa5, 0x28, 0x0e, 0x80, - 0xc6, 0x31, 0x8c, 0x63, 0x18, 0x00, - 0x31, 0x8c, 0x63, 0x19, 0x41, 0x80, - 0x18, 0xc6, 0x31, 0x8c, 0x70, 0x80 -}; - -const uint8_t kMaskRandom41_9[54] = { - 0x4e, 0x13, 0x84, 0xe1, 0x11, 0x00, - 0x62, 0x38, 0xc6, 0x21, 0xa0, 0x80, - 0x81, 0xe0, 0x78, 0x0e, 0x94, 0x00, - 0xe1, 0x48, 0x5a, 0x15, 0x05, 0x00, - 0x13, 0x94, 0xa5, 0x30, 0x06, 0x80, - 0xb4, 0x2d, 0x0a, 0x42, 0x43, 0x00, - 0x26, 0x89, 0xa1, 0x6a, 0x08, 0x80, - 0x58, 0x56, 0x15, 0x84, 0x52, 0x00, - 0x49, 0x86, 0x52, 0x98, 0x68, 0x00 -}; - -const uint8_t kMaskRandom42_1[6] = { - 0xff, 0xff, 0xff, 0xff, 0xff, 0xc0 -}; - -const uint8_t kMaskRandom42_10[60] = { - 0x4c, 0x19, 0x12, 0x60, 0xc8, 0x80, - 0x51, 0x14, 0x52, 0x88, 0xa2, 0x80, - 0xa0, 0x6a, 0x45, 0x03, 0x52, 0x00, - 0x04, 0xc1, 0x30, 0x26, 0x09, 0x80, - 0x03, 0xb4, 0x00, 0x1d, 0xa0, 0x00, - 0x86, 0x20, 0x94, 0x31, 0x04, 0x80, - 0x29, 0x08, 0x49, 0x48, 0x42, 0x40, - 0x42, 0x43, 0x0a, 0x12, 0x18, 0x40, - 0x98, 0x12, 0x84, 0xc0, 0x94, 0x00, - 0x30, 0x84, 0xa9, 0x84, 0x25, 0x40 -}; - -const uint8_t kMaskRandom42_11[66] = { - 0xc6, 0x21, 0xa6, 0x31, 0x0d, 0x00, - 0x23, 0x88, 0xc9, 0x1c, 0x46, 0x40, - 0x1a, 0x45, 0x88, 0xd2, 0x2c, 0x40, - 0x24, 0xd3, 0x09, 0x26, 0x98, 0x40, - 0x71, 0x10, 0x73, 0x88, 0x83, 0x80, - 0x0e, 0x19, 0x10, 0x70, 0xc8, 0x80, - 0x33, 0x14, 0x51, 0x98, 0xa2, 0x80, - 0x10, 0xc3, 0x28, 0x86, 0x19, 0x40, - 0x45, 0x68, 0x4a, 0x2b, 0x42, 0x40, - 0x88, 0x84, 0xac, 0x44, 0x25, 0x40, - 0xe0, 0x22, 0x97, 0x01, 0x14, 0x80 -}; - -const uint8_t kMaskRandom42_12[72] = { - 0x0e, 0x19, 0x10, 0x70, 0xc8, 0x80, - 0x33, 0x14, 0x51, 0x98, 0xa2, 0x80, - 0x10, 0xc3, 0x28, 0x86, 0x19, 0x40, - 0x45, 0x68, 0x4a, 0x2b, 0x42, 0x40, - 0x88, 0x84, 0xac, 0x44, 0x25, 0x40, - 0xe0, 0x22, 0x97, 0x01, 0x14, 0x80, - 0xc6, 0x21, 0xa6, 0x31, 0x0d, 0x00, - 0x23, 0x88, 0xc9, 0x1c, 0x46, 0x40, - 0x1a, 0x45, 0x88, 0xd2, 0x2c, 0x40, - 0x24, 0xd3, 0x09, 0x26, 0x98, 0x40, - 0x71, 0x10, 0x73, 0x88, 0x83, 0x80, - 0xa0, 0x65, 0x1d, 0x03, 0x28, 0xc0 -}; - -const uint8_t kMaskRandom42_13[78] = { - 0x0e, 0x19, 0x10, 0x70, 0xc8, 0x80, - 0x33, 0x14, 0x51, 0x98, 0xa2, 0x80, - 0x10, 0xc3, 0x28, 0x86, 0x19, 0x40, - 0x45, 0x68, 0x4a, 0x2b, 0x42, 0x40, - 0x88, 0x84, 0xac, 0x44, 0x25, 0x40, - 0xe0, 0x22, 0x97, 0x01, 0x14, 0x80, - 0x46, 0x11, 0x92, 0x30, 0x8c, 0x80, - 0x33, 0x0c, 0xc9, 0x98, 0x66, 0x40, - 0x10, 0xe4, 0x60, 0x87, 0x23, 0x00, - 0x0c, 0x69, 0x08, 0x63, 0x48, 0x40, - 0x28, 0x94, 0x29, 0x44, 0xa1, 0x40, - 0x94, 0x21, 0x34, 0xa1, 0x09, 0x80, - 0xc1, 0x02, 0x5e, 0x08, 0x12, 0xc0 -}; - -const uint8_t kMaskRandom42_14[84] = { - 0x46, 0x11, 0x92, 0x30, 0x8c, 0x80, - 0x33, 0x0c, 0xc9, 0x98, 0x66, 0x40, - 0x10, 0xe4, 0x60, 0x87, 0x23, 0x00, - 0x0c, 0x69, 0x08, 0x63, 0x48, 0x40, - 0x28, 0x94, 0x29, 0x44, 0xa1, 0x40, - 0x94, 0x21, 0x34, 0xa1, 0x09, 0x80, - 0xc1, 0x02, 0x5e, 0x08, 0x12, 0xc0, - 0x0e, 0x19, 0x10, 0x70, 0xc8, 0x80, - 0x33, 0x14, 0x51, 0x98, 0xa2, 0x80, - 0x10, 0xc3, 0x28, 0x86, 0x19, 0x40, - 0x45, 0x68, 0x4a, 0x2b, 0x42, 0x40, - 0x88, 0x84, 0xac, 0x44, 0x25, 0x40, - 0xe0, 0x22, 0x97, 0x01, 0x14, 0x80, - 0x4d, 0xd0, 0xc2, 0x6e, 0x86, 0x00 -}; - -const uint8_t kMaskRandom42_15[90] = { - 0x46, 0x11, 0x92, 0x30, 0x8c, 0x80, - 0x33, 0x0c, 0xc9, 0x98, 0x66, 0x40, - 0x10, 0xe4, 0x60, 0x87, 0x23, 0x00, - 0x0c, 0x69, 0x08, 0x63, 0x48, 0x40, - 0x28, 0x94, 0x29, 0x44, 0xa1, 0x40, - 0x94, 0x21, 0x34, 0xa1, 0x09, 0x80, - 0xc1, 0x02, 0x5e, 0x08, 0x12, 0xc0, - 0x2c, 0x03, 0x21, 0x60, 0x19, 0x00, - 0x81, 0xa0, 0x1c, 0x0d, 0x00, 0xc0, - 0xa0, 0x68, 0x25, 0x03, 0x41, 0x00, - 0x05, 0x41, 0x50, 0x2a, 0x0a, 0x80, - 0x18, 0x90, 0xc0, 0xc4, 0x86, 0x00, - 0xc2, 0x06, 0x86, 0x10, 0x34, 0x00, - 0x22, 0x98, 0x09, 0x14, 0xc0, 0x40, - 0x50, 0x45, 0x0a, 0x82, 0x28, 0x40 -}; - -const uint8_t kMaskRandom42_16[96] = { - 0x2c, 0x03, 0x21, 0x60, 0x19, 0x00, - 0x81, 0xa0, 0x1c, 0x0d, 0x00, 0xc0, - 0xa0, 0x68, 0x25, 0x03, 0x41, 0x00, - 0x05, 0x41, 0x50, 0x2a, 0x0a, 0x80, - 0x18, 0x90, 0xc0, 0xc4, 0x86, 0x00, - 0xc2, 0x06, 0x86, 0x10, 0x34, 0x00, - 0x22, 0x98, 0x09, 0x14, 0xc0, 0x40, - 0x50, 0x45, 0x0a, 0x82, 0x28, 0x40, - 0x46, 0x11, 0x92, 0x30, 0x8c, 0x80, - 0x33, 0x0c, 0xc9, 0x98, 0x66, 0x40, - 0x10, 0xe4, 0x60, 0x87, 0x23, 0x00, - 0x0c, 0x69, 0x08, 0x63, 0x48, 0x40, - 0x28, 0x94, 0x29, 0x44, 0xa1, 0x40, - 0x94, 0x21, 0x34, 0xa1, 0x09, 0x80, - 0xc1, 0x02, 0x5e, 0x08, 0x12, 0xc0, - 0x3b, 0xf5, 0x39, 0xdf, 0xa9, 0xc0 -}; - -const uint8_t kMaskRandom42_17[102] = { - 0x2c, 0x03, 0x21, 0x60, 0x19, 0x00, - 0x81, 0xa0, 0x1c, 0x0d, 0x00, 0xc0, - 0xa0, 0x68, 0x25, 0x03, 0x41, 0x00, - 0x05, 0x41, 0x50, 0x2a, 0x0a, 0x80, - 0x18, 0x90, 0xc0, 0xc4, 0x86, 0x00, - 0xc2, 0x06, 0x86, 0x10, 0x34, 0x00, - 0x22, 0x98, 0x09, 0x14, 0xc0, 0x40, - 0x50, 0x45, 0x0a, 0x82, 0x28, 0x40, - 0x4e, 0x11, 0x92, 0x70, 0x8c, 0x80, - 0xe3, 0x18, 0x9f, 0x18, 0xc4, 0xc0, - 0x81, 0xe3, 0x04, 0x0f, 0x18, 0x00, - 0x21, 0x40, 0x59, 0x0a, 0x02, 0xc0, - 0x52, 0x81, 0xe2, 0x94, 0x0f, 0x00, - 0xb4, 0x28, 0x25, 0xa1, 0x41, 0x00, - 0x26, 0x86, 0x29, 0x34, 0x31, 0x40, - 0x58, 0x64, 0x42, 0xc3, 0x22, 0x00, - 0x19, 0x9e, 0x00, 0xcc, 0xf0, 0x00 -}; - -const uint8_t kMaskRandom42_18[108] = { - 0x4e, 0x11, 0x92, 0x70, 0x8c, 0x80, - 0xe3, 0x18, 0x9f, 0x18, 0xc4, 0xc0, - 0x81, 0xe3, 0x04, 0x0f, 0x18, 0x00, - 0x21, 0x40, 0x59, 0x0a, 0x02, 0xc0, - 0x52, 0x81, 0xe2, 0x94, 0x0f, 0x00, - 0xb4, 0x28, 0x25, 0xa1, 0x41, 0x00, - 0x26, 0x86, 0x29, 0x34, 0x31, 0x40, - 0x58, 0x64, 0x42, 0xc3, 0x22, 0x00, - 0x19, 0x9e, 0x00, 0xcc, 0xf0, 0x00, - 0x2c, 0x03, 0x21, 0x60, 0x19, 0x00, - 0x81, 0xa0, 0x1c, 0x0d, 0x00, 0xc0, - 0xa0, 0x68, 0x25, 0x03, 0x41, 0x00, - 0x05, 0x41, 0x50, 0x2a, 0x0a, 0x80, - 0x18, 0x90, 0xc0, 0xc4, 0x86, 0x00, - 0xc2, 0x06, 0x86, 0x10, 0x34, 0x00, - 0x22, 0x98, 0x09, 0x14, 0xc0, 0x40, - 0x50, 0x45, 0x0a, 0x82, 0x28, 0x40, - 0x5a, 0x56, 0x5a, 0xd2, 0xb2, 0xc0 -}; - -const uint8_t kMaskRandom42_19[114] = { - 0x4e, 0x11, 0x92, 0x70, 0x8c, 0x80, - 0xe3, 0x18, 0x9f, 0x18, 0xc4, 0xc0, - 0x81, 0xe3, 0x04, 0x0f, 0x18, 0x00, - 0x21, 0x40, 0x59, 0x0a, 0x02, 0xc0, - 0x52, 0x81, 0xe2, 0x94, 0x0f, 0x00, - 0xb4, 0x28, 0x25, 0xa1, 0x41, 0x00, - 0x26, 0x86, 0x29, 0x34, 0x31, 0x40, - 0x58, 0x64, 0x42, 0xc3, 0x22, 0x00, - 0x19, 0x9e, 0x00, 0xcc, 0xf0, 0x00, - 0x4c, 0x19, 0x12, 0x60, 0xc8, 0x80, - 0x51, 0x14, 0x52, 0x88, 0xa2, 0x80, - 0xa0, 0x6a, 0x45, 0x03, 0x52, 0x00, - 0x04, 0xc1, 0x30, 0x26, 0x09, 0x80, - 0x03, 0xb4, 0x00, 0x1d, 0xa0, 0x00, - 0x86, 0x20, 0x94, 0x31, 0x04, 0x80, - 0x29, 0x08, 0x49, 0x48, 0x42, 0x40, - 0x42, 0x43, 0x0a, 0x12, 0x18, 0x40, - 0x98, 0x12, 0x84, 0xc0, 0x94, 0x00, - 0x30, 0x84, 0xa9, 0x84, 0x25, 0x40 -}; - -const uint8_t kMaskRandom42_2[12] = { - 0xee, 0x3b, 0x37, 0x71, 0xd9, 0x80, - 0x99, 0xe6, 0xec, 0xcf, 0x37, 0x40 -}; - -const uint8_t kMaskRandom42_20[120] = { - 0x4c, 0x19, 0x12, 0x60, 0xc8, 0x80, - 0x51, 0x14, 0x52, 0x88, 0xa2, 0x80, - 0xa0, 0x6a, 0x45, 0x03, 0x52, 0x00, - 0x04, 0xc1, 0x30, 0x26, 0x09, 0x80, - 0x03, 0xb4, 0x00, 0x1d, 0xa0, 0x00, - 0x86, 0x20, 0x94, 0x31, 0x04, 0x80, - 0x29, 0x08, 0x49, 0x48, 0x42, 0x40, - 0x42, 0x43, 0x0a, 0x12, 0x18, 0x40, - 0x98, 0x12, 0x84, 0xc0, 0x94, 0x00, - 0x30, 0x84, 0xa9, 0x84, 0x25, 0x40, - 0x4e, 0x11, 0x92, 0x70, 0x8c, 0x80, - 0xe3, 0x18, 0x9f, 0x18, 0xc4, 0xc0, - 0x81, 0xe3, 0x04, 0x0f, 0x18, 0x00, - 0x21, 0x40, 0x59, 0x0a, 0x02, 0xc0, - 0x52, 0x81, 0xe2, 0x94, 0x0f, 0x00, - 0xb4, 0x28, 0x25, 0xa1, 0x41, 0x00, - 0x26, 0x86, 0x29, 0x34, 0x31, 0x40, - 0x58, 0x64, 0x42, 0xc3, 0x22, 0x00, - 0x19, 0x9e, 0x00, 0xcc, 0xf0, 0x00, - 0x2a, 0x03, 0x31, 0x50, 0x19, 0x80 -}; - -const uint8_t kMaskRandom42_21[126] = { - 0x4c, 0x19, 0x12, 0x60, 0xc8, 0x80, - 0x51, 0x14, 0x52, 0x88, 0xa2, 0x80, - 0xa0, 0x6a, 0x45, 0x03, 0x52, 0x00, - 0x04, 0xc1, 0x30, 0x26, 0x09, 0x80, - 0x03, 0xb4, 0x00, 0x1d, 0xa0, 0x00, - 0x86, 0x20, 0x94, 0x31, 0x04, 0x80, - 0x29, 0x08, 0x49, 0x48, 0x42, 0x40, - 0x42, 0x43, 0x0a, 0x12, 0x18, 0x40, - 0x98, 0x12, 0x84, 0xc0, 0x94, 0x00, - 0x30, 0x84, 0xa9, 0x84, 0x25, 0x40, - 0x4c, 0x11, 0x92, 0x60, 0x8c, 0x80, - 0x51, 0x0c, 0xca, 0x88, 0x66, 0x40, - 0xa0, 0x66, 0x45, 0x03, 0x32, 0x00, - 0x04, 0xc1, 0x60, 0x26, 0x0b, 0x00, - 0x03, 0xa0, 0x28, 0x1d, 0x01, 0x40, - 0x86, 0x21, 0x14, 0x31, 0x08, 0x80, - 0x29, 0x10, 0x19, 0x48, 0x80, 0xc0, - 0x42, 0x42, 0xa2, 0x12, 0x15, 0x00, - 0x98, 0x1a, 0x04, 0xc0, 0xd0, 0x00, - 0x30, 0x84, 0x09, 0x84, 0x20, 0x40, - 0xdf, 0x4c, 0x16, 0xfa, 0x60, 0x80 -}; - -const uint8_t kMaskRandom42_22[132] = { - 0xc6, 0x21, 0xa6, 0x31, 0x0d, 0x00, - 0x23, 0x88, 0xc9, 0x1c, 0x46, 0x40, - 0x1a, 0x45, 0x88, 0xd2, 0x2c, 0x40, - 0x24, 0xd3, 0x09, 0x26, 0x98, 0x40, - 0x71, 0x10, 0x73, 0x88, 0x83, 0x80, - 0x0e, 0x19, 0x10, 0x70, 0xc8, 0x80, - 0x33, 0x14, 0x51, 0x98, 0xa2, 0x80, - 0x10, 0xc3, 0x28, 0x86, 0x19, 0x40, - 0x45, 0x68, 0x4a, 0x2b, 0x42, 0x40, - 0x88, 0x84, 0xac, 0x44, 0x25, 0x40, - 0xe0, 0x22, 0x97, 0x01, 0x14, 0x80, - 0x4c, 0x19, 0x12, 0x60, 0xc8, 0x80, - 0x51, 0x14, 0x52, 0x88, 0xa2, 0x80, - 0xa0, 0x6a, 0x45, 0x03, 0x52, 0x00, - 0x04, 0xc1, 0x30, 0x26, 0x09, 0x80, - 0x03, 0xb4, 0x00, 0x1d, 0xa0, 0x00, - 0x86, 0x20, 0x94, 0x31, 0x04, 0x80, - 0x29, 0x08, 0x49, 0x48, 0x42, 0x40, - 0x42, 0x43, 0x0a, 0x12, 0x18, 0x40, - 0x98, 0x12, 0x84, 0xc0, 0x94, 0x00, - 0x30, 0x84, 0xa9, 0x84, 0x25, 0x40, - 0xdb, 0x36, 0xb0, 0x33, 0x14, 0x80 -}; - -const uint8_t kMaskRandom42_23[138] = { - 0xc6, 0x21, 0xa6, 0x31, 0x0d, 0x00, - 0x23, 0x88, 0xc9, 0x1c, 0x46, 0x40, - 0x1a, 0x45, 0x88, 0xd2, 0x2c, 0x40, - 0x24, 0xd3, 0x09, 0x26, 0x98, 0x40, - 0x71, 0x10, 0x73, 0x88, 0x83, 0x80, - 0x0e, 0x19, 0x10, 0x70, 0xc8, 0x80, - 0x33, 0x14, 0x51, 0x98, 0xa2, 0x80, - 0x10, 0xc3, 0x28, 0x86, 0x19, 0x40, - 0x45, 0x68, 0x4a, 0x2b, 0x42, 0x40, - 0x88, 0x84, 0xac, 0x44, 0x25, 0x40, - 0xe0, 0x22, 0x97, 0x01, 0x14, 0x80, - 0x0e, 0x19, 0x10, 0x70, 0xc8, 0x80, - 0x33, 0x14, 0x51, 0x98, 0xa2, 0x80, - 0x10, 0xc3, 0x28, 0x86, 0x19, 0x40, - 0x45, 0x68, 0x4a, 0x2b, 0x42, 0x40, - 0x88, 0x84, 0xac, 0x44, 0x25, 0x40, - 0xe0, 0x22, 0x97, 0x01, 0x14, 0x80, - 0xc6, 0x21, 0xa6, 0x31, 0x0d, 0x00, - 0x23, 0x88, 0xc9, 0x1c, 0x46, 0x40, - 0x1a, 0x45, 0x88, 0xd2, 0x2c, 0x40, - 0x24, 0xd3, 0x09, 0x26, 0x98, 0x40, - 0x71, 0x10, 0x73, 0x88, 0x83, 0x80, - 0xa0, 0x65, 0x1d, 0x03, 0x28, 0xc0 -}; - -const uint8_t kMaskRandom42_24[144] = { - 0x0e, 0x19, 0x10, 0x70, 0xc8, 0x80, - 0x33, 0x14, 0x51, 0x98, 0xa2, 0x80, - 0x10, 0xc3, 0x28, 0x86, 0x19, 0x40, - 0x45, 0x68, 0x4a, 0x2b, 0x42, 0x40, - 0x88, 0x84, 0xac, 0x44, 0x25, 0x40, - 0xe0, 0x22, 0x97, 0x01, 0x14, 0x80, - 0xc6, 0x21, 0xa6, 0x31, 0x0d, 0x00, - 0x23, 0x88, 0xc9, 0x1c, 0x46, 0x40, - 0x1a, 0x45, 0x88, 0xd2, 0x2c, 0x40, - 0x24, 0xd3, 0x09, 0x26, 0x98, 0x40, - 0x71, 0x10, 0x73, 0x88, 0x83, 0x80, - 0xa0, 0x65, 0x1d, 0x03, 0x28, 0xc0, - 0xc6, 0x21, 0xa6, 0x31, 0x0d, 0x00, - 0x23, 0x88, 0xc9, 0x1c, 0x46, 0x40, - 0x1a, 0x45, 0x88, 0xd2, 0x2c, 0x40, - 0x24, 0xd3, 0x09, 0x26, 0x98, 0x40, - 0x71, 0x10, 0x73, 0x88, 0x83, 0x80, - 0x0e, 0x19, 0x10, 0x70, 0xc8, 0x80, - 0x33, 0x14, 0x51, 0x98, 0xa2, 0x80, - 0x10, 0xc3, 0x28, 0x86, 0x19, 0x40, - 0x45, 0x68, 0x4a, 0x2b, 0x42, 0x40, - 0x88, 0x84, 0xac, 0x44, 0x25, 0x40, - 0xe0, 0x22, 0x97, 0x01, 0x14, 0x80, - 0x2e, 0x1c, 0x92, 0xbb, 0x07, 0xc0 -}; - -const uint8_t kMaskRandom42_25[150] = { - 0x0e, 0x19, 0x10, 0x70, 0xc8, 0x80, - 0x33, 0x14, 0x51, 0x98, 0xa2, 0x80, - 0x10, 0xc3, 0x28, 0x86, 0x19, 0x40, - 0x45, 0x68, 0x4a, 0x2b, 0x42, 0x40, - 0x88, 0x84, 0xac, 0x44, 0x25, 0x40, - 0xe0, 0x22, 0x97, 0x01, 0x14, 0x80, - 0xc6, 0x21, 0xa6, 0x31, 0x0d, 0x00, - 0x23, 0x88, 0xc9, 0x1c, 0x46, 0x40, - 0x1a, 0x45, 0x88, 0xd2, 0x2c, 0x40, - 0x24, 0xd3, 0x09, 0x26, 0x98, 0x40, - 0x71, 0x10, 0x73, 0x88, 0x83, 0x80, - 0xa0, 0x65, 0x1d, 0x03, 0x28, 0xc0, - 0x0e, 0x19, 0x10, 0x70, 0xc8, 0x80, - 0x33, 0x14, 0x51, 0x98, 0xa2, 0x80, - 0x10, 0xc3, 0x28, 0x86, 0x19, 0x40, - 0x45, 0x68, 0x4a, 0x2b, 0x42, 0x40, - 0x88, 0x84, 0xac, 0x44, 0x25, 0x40, - 0xe0, 0x22, 0x97, 0x01, 0x14, 0x80, - 0x46, 0x11, 0x92, 0x30, 0x8c, 0x80, - 0x33, 0x0c, 0xc9, 0x98, 0x66, 0x40, - 0x10, 0xe4, 0x60, 0x87, 0x23, 0x00, - 0x0c, 0x69, 0x08, 0x63, 0x48, 0x40, - 0x28, 0x94, 0x29, 0x44, 0xa1, 0x40, - 0x94, 0x21, 0x34, 0xa1, 0x09, 0x80, - 0xc1, 0x02, 0x5e, 0x08, 0x12, 0xc0 -}; - -const uint8_t kMaskRandom42_26[156] = { - 0x0e, 0x19, 0x10, 0x70, 0xc8, 0x80, - 0x33, 0x14, 0x51, 0x98, 0xa2, 0x80, - 0x10, 0xc3, 0x28, 0x86, 0x19, 0x40, - 0x45, 0x68, 0x4a, 0x2b, 0x42, 0x40, - 0x88, 0x84, 0xac, 0x44, 0x25, 0x40, - 0xe0, 0x22, 0x97, 0x01, 0x14, 0x80, - 0x46, 0x11, 0x92, 0x30, 0x8c, 0x80, - 0x33, 0x0c, 0xc9, 0x98, 0x66, 0x40, - 0x10, 0xe4, 0x60, 0x87, 0x23, 0x00, - 0x0c, 0x69, 0x08, 0x63, 0x48, 0x40, - 0x28, 0x94, 0x29, 0x44, 0xa1, 0x40, - 0x94, 0x21, 0x34, 0xa1, 0x09, 0x80, - 0xc1, 0x02, 0x5e, 0x08, 0x12, 0xc0, - 0x0e, 0x19, 0x10, 0x70, 0xc8, 0x80, - 0x33, 0x14, 0x51, 0x98, 0xa2, 0x80, - 0x10, 0xc3, 0x28, 0x86, 0x19, 0x40, - 0x45, 0x68, 0x4a, 0x2b, 0x42, 0x40, - 0x88, 0x84, 0xac, 0x44, 0x25, 0x40, - 0xe0, 0x22, 0x97, 0x01, 0x14, 0x80, - 0xc6, 0x21, 0xa6, 0x31, 0x0d, 0x00, - 0x23, 0x88, 0xc9, 0x1c, 0x46, 0x40, - 0x1a, 0x45, 0x88, 0xd2, 0x2c, 0x40, - 0x24, 0xd3, 0x09, 0x26, 0x98, 0x40, - 0x71, 0x10, 0x73, 0x88, 0x83, 0x80, - 0xa0, 0x65, 0x1d, 0x03, 0x28, 0xc0, - 0xb8, 0x41, 0xed, 0xa3, 0x77, 0xc0 -}; - -const uint8_t kMaskRandom42_27[162] = { - 0x0e, 0x19, 0x10, 0x70, 0xc8, 0x80, - 0x33, 0x14, 0x51, 0x98, 0xa2, 0x80, - 0x10, 0xc3, 0x28, 0x86, 0x19, 0x40, - 0x45, 0x68, 0x4a, 0x2b, 0x42, 0x40, - 0x88, 0x84, 0xac, 0x44, 0x25, 0x40, - 0xe0, 0x22, 0x97, 0x01, 0x14, 0x80, - 0x46, 0x11, 0x92, 0x30, 0x8c, 0x80, - 0x33, 0x0c, 0xc9, 0x98, 0x66, 0x40, - 0x10, 0xe4, 0x60, 0x87, 0x23, 0x00, - 0x0c, 0x69, 0x08, 0x63, 0x48, 0x40, - 0x28, 0x94, 0x29, 0x44, 0xa1, 0x40, - 0x94, 0x21, 0x34, 0xa1, 0x09, 0x80, - 0xc1, 0x02, 0x5e, 0x08, 0x12, 0xc0, - 0x46, 0x11, 0x92, 0x30, 0x8c, 0x80, - 0x33, 0x0c, 0xc9, 0x98, 0x66, 0x40, - 0x10, 0xe4, 0x60, 0x87, 0x23, 0x00, - 0x0c, 0x69, 0x08, 0x63, 0x48, 0x40, - 0x28, 0x94, 0x29, 0x44, 0xa1, 0x40, - 0x94, 0x21, 0x34, 0xa1, 0x09, 0x80, - 0xc1, 0x02, 0x5e, 0x08, 0x12, 0xc0, - 0x0e, 0x19, 0x10, 0x70, 0xc8, 0x80, - 0x33, 0x14, 0x51, 0x98, 0xa2, 0x80, - 0x10, 0xc3, 0x28, 0x86, 0x19, 0x40, - 0x45, 0x68, 0x4a, 0x2b, 0x42, 0x40, - 0x88, 0x84, 0xac, 0x44, 0x25, 0x40, - 0xe0, 0x22, 0x97, 0x01, 0x14, 0x80, - 0x4d, 0xd0, 0xc2, 0x6e, 0x86, 0x00 -}; - -const uint8_t kMaskRandom42_28[168] = { - 0x46, 0x11, 0x92, 0x30, 0x8c, 0x80, - 0x33, 0x0c, 0xc9, 0x98, 0x66, 0x40, - 0x10, 0xe4, 0x60, 0x87, 0x23, 0x00, - 0x0c, 0x69, 0x08, 0x63, 0x48, 0x40, - 0x28, 0x94, 0x29, 0x44, 0xa1, 0x40, - 0x94, 0x21, 0x34, 0xa1, 0x09, 0x80, - 0xc1, 0x02, 0x5e, 0x08, 0x12, 0xc0, - 0x0e, 0x19, 0x10, 0x70, 0xc8, 0x80, - 0x33, 0x14, 0x51, 0x98, 0xa2, 0x80, - 0x10, 0xc3, 0x28, 0x86, 0x19, 0x40, - 0x45, 0x68, 0x4a, 0x2b, 0x42, 0x40, - 0x88, 0x84, 0xac, 0x44, 0x25, 0x40, - 0xe0, 0x22, 0x97, 0x01, 0x14, 0x80, - 0x4d, 0xd0, 0xc2, 0x6e, 0x86, 0x00, - 0x0e, 0x19, 0x10, 0x70, 0xc8, 0x80, - 0x33, 0x14, 0x51, 0x98, 0xa2, 0x80, - 0x10, 0xc3, 0x28, 0x86, 0x19, 0x40, - 0x45, 0x68, 0x4a, 0x2b, 0x42, 0x40, - 0x88, 0x84, 0xac, 0x44, 0x25, 0x40, - 0xe0, 0x22, 0x97, 0x01, 0x14, 0x80, - 0x46, 0x11, 0x92, 0x30, 0x8c, 0x80, - 0x33, 0x0c, 0xc9, 0x98, 0x66, 0x40, - 0x10, 0xe4, 0x60, 0x87, 0x23, 0x00, - 0x0c, 0x69, 0x08, 0x63, 0x48, 0x40, - 0x28, 0x94, 0x29, 0x44, 0xa1, 0x40, - 0x94, 0x21, 0x34, 0xa1, 0x09, 0x80, - 0xc1, 0x02, 0x5e, 0x08, 0x12, 0xc0, - 0xc3, 0x3c, 0x56, 0xc2, 0x30, 0x40 -}; - -const uint8_t kMaskRandom42_29[174] = { - 0x46, 0x11, 0x92, 0x30, 0x8c, 0x80, - 0x33, 0x0c, 0xc9, 0x98, 0x66, 0x40, - 0x10, 0xe4, 0x60, 0x87, 0x23, 0x00, - 0x0c, 0x69, 0x08, 0x63, 0x48, 0x40, - 0x28, 0x94, 0x29, 0x44, 0xa1, 0x40, - 0x94, 0x21, 0x34, 0xa1, 0x09, 0x80, - 0xc1, 0x02, 0x5e, 0x08, 0x12, 0xc0, - 0x0e, 0x19, 0x10, 0x70, 0xc8, 0x80, - 0x33, 0x14, 0x51, 0x98, 0xa2, 0x80, - 0x10, 0xc3, 0x28, 0x86, 0x19, 0x40, - 0x45, 0x68, 0x4a, 0x2b, 0x42, 0x40, - 0x88, 0x84, 0xac, 0x44, 0x25, 0x40, - 0xe0, 0x22, 0x97, 0x01, 0x14, 0x80, - 0x4d, 0xd0, 0xc2, 0x6e, 0x86, 0x00, - 0x46, 0x11, 0x92, 0x30, 0x8c, 0x80, - 0x33, 0x0c, 0xc9, 0x98, 0x66, 0x40, - 0x10, 0xe4, 0x60, 0x87, 0x23, 0x00, - 0x0c, 0x69, 0x08, 0x63, 0x48, 0x40, - 0x28, 0x94, 0x29, 0x44, 0xa1, 0x40, - 0x94, 0x21, 0x34, 0xa1, 0x09, 0x80, - 0xc1, 0x02, 0x5e, 0x08, 0x12, 0xc0, - 0x2c, 0x03, 0x21, 0x60, 0x19, 0x00, - 0x81, 0xa0, 0x1c, 0x0d, 0x00, 0xc0, - 0xa0, 0x68, 0x25, 0x03, 0x41, 0x00, - 0x05, 0x41, 0x50, 0x2a, 0x0a, 0x80, - 0x18, 0x90, 0xc0, 0xc4, 0x86, 0x00, - 0xc2, 0x06, 0x86, 0x10, 0x34, 0x00, - 0x22, 0x98, 0x09, 0x14, 0xc0, 0x40, - 0x50, 0x45, 0x0a, 0x82, 0x28, 0x40 -}; - -const uint8_t kMaskRandom42_3[18] = { - 0xce, 0x32, 0xb6, 0x71, 0x95, 0x80, - 0x55, 0xdc, 0x52, 0xae, 0xe2, 0x80, - 0xa8, 0xed, 0x8d, 0x47, 0x6c, 0x40 -}; - -const uint8_t kMaskRandom42_30[180] = { - 0x46, 0x11, 0x92, 0x30, 0x8c, 0x80, - 0x33, 0x0c, 0xc9, 0x98, 0x66, 0x40, - 0x10, 0xe4, 0x60, 0x87, 0x23, 0x00, - 0x0c, 0x69, 0x08, 0x63, 0x48, 0x40, - 0x28, 0x94, 0x29, 0x44, 0xa1, 0x40, - 0x94, 0x21, 0x34, 0xa1, 0x09, 0x80, - 0xc1, 0x02, 0x5e, 0x08, 0x12, 0xc0, - 0x2c, 0x03, 0x21, 0x60, 0x19, 0x00, - 0x81, 0xa0, 0x1c, 0x0d, 0x00, 0xc0, - 0xa0, 0x68, 0x25, 0x03, 0x41, 0x00, - 0x05, 0x41, 0x50, 0x2a, 0x0a, 0x80, - 0x18, 0x90, 0xc0, 0xc4, 0x86, 0x00, - 0xc2, 0x06, 0x86, 0x10, 0x34, 0x00, - 0x22, 0x98, 0x09, 0x14, 0xc0, 0x40, - 0x50, 0x45, 0x0a, 0x82, 0x28, 0x40, - 0x46, 0x11, 0x92, 0x30, 0x8c, 0x80, - 0x33, 0x0c, 0xc9, 0x98, 0x66, 0x40, - 0x10, 0xe4, 0x60, 0x87, 0x23, 0x00, - 0x0c, 0x69, 0x08, 0x63, 0x48, 0x40, - 0x28, 0x94, 0x29, 0x44, 0xa1, 0x40, - 0x94, 0x21, 0x34, 0xa1, 0x09, 0x80, - 0xc1, 0x02, 0x5e, 0x08, 0x12, 0xc0, - 0x0e, 0x19, 0x10, 0x70, 0xc8, 0x80, - 0x33, 0x14, 0x51, 0x98, 0xa2, 0x80, - 0x10, 0xc3, 0x28, 0x86, 0x19, 0x40, - 0x45, 0x68, 0x4a, 0x2b, 0x42, 0x40, - 0x88, 0x84, 0xac, 0x44, 0x25, 0x40, - 0xe0, 0x22, 0x97, 0x01, 0x14, 0x80, - 0x4d, 0xd0, 0xc2, 0x6e, 0x86, 0x00, - 0xf5, 0xdd, 0x0d, 0x58, 0xeb, 0x00 -}; - -const uint8_t kMaskRandom42_31[186] = { - 0x46, 0x11, 0x92, 0x30, 0x8c, 0x80, - 0x33, 0x0c, 0xc9, 0x98, 0x66, 0x40, - 0x10, 0xe4, 0x60, 0x87, 0x23, 0x00, - 0x0c, 0x69, 0x08, 0x63, 0x48, 0x40, - 0x28, 0x94, 0x29, 0x44, 0xa1, 0x40, - 0x94, 0x21, 0x34, 0xa1, 0x09, 0x80, - 0xc1, 0x02, 0x5e, 0x08, 0x12, 0xc0, - 0x2c, 0x03, 0x21, 0x60, 0x19, 0x00, - 0x81, 0xa0, 0x1c, 0x0d, 0x00, 0xc0, - 0xa0, 0x68, 0x25, 0x03, 0x41, 0x00, - 0x05, 0x41, 0x50, 0x2a, 0x0a, 0x80, - 0x18, 0x90, 0xc0, 0xc4, 0x86, 0x00, - 0xc2, 0x06, 0x86, 0x10, 0x34, 0x00, - 0x22, 0x98, 0x09, 0x14, 0xc0, 0x40, - 0x50, 0x45, 0x0a, 0x82, 0x28, 0x40, - 0x2c, 0x03, 0x21, 0x60, 0x19, 0x00, - 0x81, 0xa0, 0x1c, 0x0d, 0x00, 0xc0, - 0xa0, 0x68, 0x25, 0x03, 0x41, 0x00, - 0x05, 0x41, 0x50, 0x2a, 0x0a, 0x80, - 0x18, 0x90, 0xc0, 0xc4, 0x86, 0x00, - 0xc2, 0x06, 0x86, 0x10, 0x34, 0x00, - 0x22, 0x98, 0x09, 0x14, 0xc0, 0x40, - 0x50, 0x45, 0x0a, 0x82, 0x28, 0x40, - 0x46, 0x11, 0x92, 0x30, 0x8c, 0x80, - 0x33, 0x0c, 0xc9, 0x98, 0x66, 0x40, - 0x10, 0xe4, 0x60, 0x87, 0x23, 0x00, - 0x0c, 0x69, 0x08, 0x63, 0x48, 0x40, - 0x28, 0x94, 0x29, 0x44, 0xa1, 0x40, - 0x94, 0x21, 0x34, 0xa1, 0x09, 0x80, - 0xc1, 0x02, 0x5e, 0x08, 0x12, 0xc0, - 0x3b, 0xf5, 0x39, 0xdf, 0xa9, 0xc0 -}; - -const uint8_t kMaskRandom42_32[192] = { - 0x2c, 0x03, 0x21, 0x60, 0x19, 0x00, - 0x81, 0xa0, 0x1c, 0x0d, 0x00, 0xc0, - 0xa0, 0x68, 0x25, 0x03, 0x41, 0x00, - 0x05, 0x41, 0x50, 0x2a, 0x0a, 0x80, - 0x18, 0x90, 0xc0, 0xc4, 0x86, 0x00, - 0xc2, 0x06, 0x86, 0x10, 0x34, 0x00, - 0x22, 0x98, 0x09, 0x14, 0xc0, 0x40, - 0x50, 0x45, 0x0a, 0x82, 0x28, 0x40, - 0x46, 0x11, 0x92, 0x30, 0x8c, 0x80, - 0x33, 0x0c, 0xc9, 0x98, 0x66, 0x40, - 0x10, 0xe4, 0x60, 0x87, 0x23, 0x00, - 0x0c, 0x69, 0x08, 0x63, 0x48, 0x40, - 0x28, 0x94, 0x29, 0x44, 0xa1, 0x40, - 0x94, 0x21, 0x34, 0xa1, 0x09, 0x80, - 0xc1, 0x02, 0x5e, 0x08, 0x12, 0xc0, - 0x3b, 0xf5, 0x39, 0xdf, 0xa9, 0xc0, - 0x46, 0x11, 0x92, 0x30, 0x8c, 0x80, - 0x33, 0x0c, 0xc9, 0x98, 0x66, 0x40, - 0x10, 0xe4, 0x60, 0x87, 0x23, 0x00, - 0x0c, 0x69, 0x08, 0x63, 0x48, 0x40, - 0x28, 0x94, 0x29, 0x44, 0xa1, 0x40, - 0x94, 0x21, 0x34, 0xa1, 0x09, 0x80, - 0xc1, 0x02, 0x5e, 0x08, 0x12, 0xc0, - 0x2c, 0x03, 0x21, 0x60, 0x19, 0x00, - 0x81, 0xa0, 0x1c, 0x0d, 0x00, 0xc0, - 0xa0, 0x68, 0x25, 0x03, 0x41, 0x00, - 0x05, 0x41, 0x50, 0x2a, 0x0a, 0x80, - 0x18, 0x90, 0xc0, 0xc4, 0x86, 0x00, - 0xc2, 0x06, 0x86, 0x10, 0x34, 0x00, - 0x22, 0x98, 0x09, 0x14, 0xc0, 0x40, - 0x50, 0x45, 0x0a, 0x82, 0x28, 0x40, - 0xf9, 0x1f, 0xb6, 0xe1, 0x09, 0xc0 -}; - -const uint8_t kMaskRandom42_33[198] = { - 0x2c, 0x03, 0x21, 0x60, 0x19, 0x00, - 0x81, 0xa0, 0x1c, 0x0d, 0x00, 0xc0, - 0xa0, 0x68, 0x25, 0x03, 0x41, 0x00, - 0x05, 0x41, 0x50, 0x2a, 0x0a, 0x80, - 0x18, 0x90, 0xc0, 0xc4, 0x86, 0x00, - 0xc2, 0x06, 0x86, 0x10, 0x34, 0x00, - 0x22, 0x98, 0x09, 0x14, 0xc0, 0x40, - 0x50, 0x45, 0x0a, 0x82, 0x28, 0x40, - 0x46, 0x11, 0x92, 0x30, 0x8c, 0x80, - 0x33, 0x0c, 0xc9, 0x98, 0x66, 0x40, - 0x10, 0xe4, 0x60, 0x87, 0x23, 0x00, - 0x0c, 0x69, 0x08, 0x63, 0x48, 0x40, - 0x28, 0x94, 0x29, 0x44, 0xa1, 0x40, - 0x94, 0x21, 0x34, 0xa1, 0x09, 0x80, - 0xc1, 0x02, 0x5e, 0x08, 0x12, 0xc0, - 0x3b, 0xf5, 0x39, 0xdf, 0xa9, 0xc0, - 0x2c, 0x03, 0x21, 0x60, 0x19, 0x00, - 0x81, 0xa0, 0x1c, 0x0d, 0x00, 0xc0, - 0xa0, 0x68, 0x25, 0x03, 0x41, 0x00, - 0x05, 0x41, 0x50, 0x2a, 0x0a, 0x80, - 0x18, 0x90, 0xc0, 0xc4, 0x86, 0x00, - 0xc2, 0x06, 0x86, 0x10, 0x34, 0x00, - 0x22, 0x98, 0x09, 0x14, 0xc0, 0x40, - 0x50, 0x45, 0x0a, 0x82, 0x28, 0x40, - 0x4e, 0x11, 0x92, 0x70, 0x8c, 0x80, - 0xe3, 0x18, 0x9f, 0x18, 0xc4, 0xc0, - 0x81, 0xe3, 0x04, 0x0f, 0x18, 0x00, - 0x21, 0x40, 0x59, 0x0a, 0x02, 0xc0, - 0x52, 0x81, 0xe2, 0x94, 0x0f, 0x00, - 0xb4, 0x28, 0x25, 0xa1, 0x41, 0x00, - 0x26, 0x86, 0x29, 0x34, 0x31, 0x40, - 0x58, 0x64, 0x42, 0xc3, 0x22, 0x00, - 0x19, 0x9e, 0x00, 0xcc, 0xf0, 0x00 -}; - -const uint8_t kMaskRandom42_34[204] = { - 0x2c, 0x03, 0x21, 0x60, 0x19, 0x00, - 0x81, 0xa0, 0x1c, 0x0d, 0x00, 0xc0, - 0xa0, 0x68, 0x25, 0x03, 0x41, 0x00, - 0x05, 0x41, 0x50, 0x2a, 0x0a, 0x80, - 0x18, 0x90, 0xc0, 0xc4, 0x86, 0x00, - 0xc2, 0x06, 0x86, 0x10, 0x34, 0x00, - 0x22, 0x98, 0x09, 0x14, 0xc0, 0x40, - 0x50, 0x45, 0x0a, 0x82, 0x28, 0x40, - 0x4e, 0x11, 0x92, 0x70, 0x8c, 0x80, - 0xe3, 0x18, 0x9f, 0x18, 0xc4, 0xc0, - 0x81, 0xe3, 0x04, 0x0f, 0x18, 0x00, - 0x21, 0x40, 0x59, 0x0a, 0x02, 0xc0, - 0x52, 0x81, 0xe2, 0x94, 0x0f, 0x00, - 0xb4, 0x28, 0x25, 0xa1, 0x41, 0x00, - 0x26, 0x86, 0x29, 0x34, 0x31, 0x40, - 0x58, 0x64, 0x42, 0xc3, 0x22, 0x00, - 0x19, 0x9e, 0x00, 0xcc, 0xf0, 0x00, - 0x2c, 0x03, 0x21, 0x60, 0x19, 0x00, - 0x81, 0xa0, 0x1c, 0x0d, 0x00, 0xc0, - 0xa0, 0x68, 0x25, 0x03, 0x41, 0x00, - 0x05, 0x41, 0x50, 0x2a, 0x0a, 0x80, - 0x18, 0x90, 0xc0, 0xc4, 0x86, 0x00, - 0xc2, 0x06, 0x86, 0x10, 0x34, 0x00, - 0x22, 0x98, 0x09, 0x14, 0xc0, 0x40, - 0x50, 0x45, 0x0a, 0x82, 0x28, 0x40, - 0x46, 0x11, 0x92, 0x30, 0x8c, 0x80, - 0x33, 0x0c, 0xc9, 0x98, 0x66, 0x40, - 0x10, 0xe4, 0x60, 0x87, 0x23, 0x00, - 0x0c, 0x69, 0x08, 0x63, 0x48, 0x40, - 0x28, 0x94, 0x29, 0x44, 0xa1, 0x40, - 0x94, 0x21, 0x34, 0xa1, 0x09, 0x80, - 0xc1, 0x02, 0x5e, 0x08, 0x12, 0xc0, - 0x3b, 0xf5, 0x39, 0xdf, 0xa9, 0xc0, - 0xf8, 0xbf, 0xf6, 0x76, 0x1b, 0x80 -}; - -const uint8_t kMaskRandom42_35[210] = { - 0x2c, 0x03, 0x21, 0x60, 0x19, 0x00, - 0x81, 0xa0, 0x1c, 0x0d, 0x00, 0xc0, - 0xa0, 0x68, 0x25, 0x03, 0x41, 0x00, - 0x05, 0x41, 0x50, 0x2a, 0x0a, 0x80, - 0x18, 0x90, 0xc0, 0xc4, 0x86, 0x00, - 0xc2, 0x06, 0x86, 0x10, 0x34, 0x00, - 0x22, 0x98, 0x09, 0x14, 0xc0, 0x40, - 0x50, 0x45, 0x0a, 0x82, 0x28, 0x40, - 0x4e, 0x11, 0x92, 0x70, 0x8c, 0x80, - 0xe3, 0x18, 0x9f, 0x18, 0xc4, 0xc0, - 0x81, 0xe3, 0x04, 0x0f, 0x18, 0x00, - 0x21, 0x40, 0x59, 0x0a, 0x02, 0xc0, - 0x52, 0x81, 0xe2, 0x94, 0x0f, 0x00, - 0xb4, 0x28, 0x25, 0xa1, 0x41, 0x00, - 0x26, 0x86, 0x29, 0x34, 0x31, 0x40, - 0x58, 0x64, 0x42, 0xc3, 0x22, 0x00, - 0x19, 0x9e, 0x00, 0xcc, 0xf0, 0x00, - 0x4e, 0x11, 0x92, 0x70, 0x8c, 0x80, - 0xe3, 0x18, 0x9f, 0x18, 0xc4, 0xc0, - 0x81, 0xe3, 0x04, 0x0f, 0x18, 0x00, - 0x21, 0x40, 0x59, 0x0a, 0x02, 0xc0, - 0x52, 0x81, 0xe2, 0x94, 0x0f, 0x00, - 0xb4, 0x28, 0x25, 0xa1, 0x41, 0x00, - 0x26, 0x86, 0x29, 0x34, 0x31, 0x40, - 0x58, 0x64, 0x42, 0xc3, 0x22, 0x00, - 0x19, 0x9e, 0x00, 0xcc, 0xf0, 0x00, - 0x2c, 0x03, 0x21, 0x60, 0x19, 0x00, - 0x81, 0xa0, 0x1c, 0x0d, 0x00, 0xc0, - 0xa0, 0x68, 0x25, 0x03, 0x41, 0x00, - 0x05, 0x41, 0x50, 0x2a, 0x0a, 0x80, - 0x18, 0x90, 0xc0, 0xc4, 0x86, 0x00, - 0xc2, 0x06, 0x86, 0x10, 0x34, 0x00, - 0x22, 0x98, 0x09, 0x14, 0xc0, 0x40, - 0x50, 0x45, 0x0a, 0x82, 0x28, 0x40, - 0x5a, 0x56, 0x5a, 0xd2, 0xb2, 0xc0 -}; - -const uint8_t kMaskRandom42_36[216] = { - 0x4e, 0x11, 0x92, 0x70, 0x8c, 0x80, - 0xe3, 0x18, 0x9f, 0x18, 0xc4, 0xc0, - 0x81, 0xe3, 0x04, 0x0f, 0x18, 0x00, - 0x21, 0x40, 0x59, 0x0a, 0x02, 0xc0, - 0x52, 0x81, 0xe2, 0x94, 0x0f, 0x00, - 0xb4, 0x28, 0x25, 0xa1, 0x41, 0x00, - 0x26, 0x86, 0x29, 0x34, 0x31, 0x40, - 0x58, 0x64, 0x42, 0xc3, 0x22, 0x00, - 0x19, 0x9e, 0x00, 0xcc, 0xf0, 0x00, - 0x2c, 0x03, 0x21, 0x60, 0x19, 0x00, - 0x81, 0xa0, 0x1c, 0x0d, 0x00, 0xc0, - 0xa0, 0x68, 0x25, 0x03, 0x41, 0x00, - 0x05, 0x41, 0x50, 0x2a, 0x0a, 0x80, - 0x18, 0x90, 0xc0, 0xc4, 0x86, 0x00, - 0xc2, 0x06, 0x86, 0x10, 0x34, 0x00, - 0x22, 0x98, 0x09, 0x14, 0xc0, 0x40, - 0x50, 0x45, 0x0a, 0x82, 0x28, 0x40, - 0x5a, 0x56, 0x5a, 0xd2, 0xb2, 0xc0, - 0x2c, 0x03, 0x21, 0x60, 0x19, 0x00, - 0x81, 0xa0, 0x1c, 0x0d, 0x00, 0xc0, - 0xa0, 0x68, 0x25, 0x03, 0x41, 0x00, - 0x05, 0x41, 0x50, 0x2a, 0x0a, 0x80, - 0x18, 0x90, 0xc0, 0xc4, 0x86, 0x00, - 0xc2, 0x06, 0x86, 0x10, 0x34, 0x00, - 0x22, 0x98, 0x09, 0x14, 0xc0, 0x40, - 0x50, 0x45, 0x0a, 0x82, 0x28, 0x40, - 0x4e, 0x11, 0x92, 0x70, 0x8c, 0x80, - 0xe3, 0x18, 0x9f, 0x18, 0xc4, 0xc0, - 0x81, 0xe3, 0x04, 0x0f, 0x18, 0x00, - 0x21, 0x40, 0x59, 0x0a, 0x02, 0xc0, - 0x52, 0x81, 0xe2, 0x94, 0x0f, 0x00, - 0xb4, 0x28, 0x25, 0xa1, 0x41, 0x00, - 0x26, 0x86, 0x29, 0x34, 0x31, 0x40, - 0x58, 0x64, 0x42, 0xc3, 0x22, 0x00, - 0x19, 0x9e, 0x00, 0xcc, 0xf0, 0x00, - 0x57, 0xc7, 0x03, 0xf9, 0xc6, 0x00 -}; - -const uint8_t kMaskRandom42_37[222] = { - 0x4e, 0x11, 0x92, 0x70, 0x8c, 0x80, - 0xe3, 0x18, 0x9f, 0x18, 0xc4, 0xc0, - 0x81, 0xe3, 0x04, 0x0f, 0x18, 0x00, - 0x21, 0x40, 0x59, 0x0a, 0x02, 0xc0, - 0x52, 0x81, 0xe2, 0x94, 0x0f, 0x00, - 0xb4, 0x28, 0x25, 0xa1, 0x41, 0x00, - 0x26, 0x86, 0x29, 0x34, 0x31, 0x40, - 0x58, 0x64, 0x42, 0xc3, 0x22, 0x00, - 0x19, 0x9e, 0x00, 0xcc, 0xf0, 0x00, - 0x2c, 0x03, 0x21, 0x60, 0x19, 0x00, - 0x81, 0xa0, 0x1c, 0x0d, 0x00, 0xc0, - 0xa0, 0x68, 0x25, 0x03, 0x41, 0x00, - 0x05, 0x41, 0x50, 0x2a, 0x0a, 0x80, - 0x18, 0x90, 0xc0, 0xc4, 0x86, 0x00, - 0xc2, 0x06, 0x86, 0x10, 0x34, 0x00, - 0x22, 0x98, 0x09, 0x14, 0xc0, 0x40, - 0x50, 0x45, 0x0a, 0x82, 0x28, 0x40, - 0x5a, 0x56, 0x5a, 0xd2, 0xb2, 0xc0, - 0x4e, 0x11, 0x92, 0x70, 0x8c, 0x80, - 0xe3, 0x18, 0x9f, 0x18, 0xc4, 0xc0, - 0x81, 0xe3, 0x04, 0x0f, 0x18, 0x00, - 0x21, 0x40, 0x59, 0x0a, 0x02, 0xc0, - 0x52, 0x81, 0xe2, 0x94, 0x0f, 0x00, - 0xb4, 0x28, 0x25, 0xa1, 0x41, 0x00, - 0x26, 0x86, 0x29, 0x34, 0x31, 0x40, - 0x58, 0x64, 0x42, 0xc3, 0x22, 0x00, - 0x19, 0x9e, 0x00, 0xcc, 0xf0, 0x00, - 0x4c, 0x19, 0x12, 0x60, 0xc8, 0x80, - 0x51, 0x14, 0x52, 0x88, 0xa2, 0x80, - 0xa0, 0x6a, 0x45, 0x03, 0x52, 0x00, - 0x04, 0xc1, 0x30, 0x26, 0x09, 0x80, - 0x03, 0xb4, 0x00, 0x1d, 0xa0, 0x00, - 0x86, 0x20, 0x94, 0x31, 0x04, 0x80, - 0x29, 0x08, 0x49, 0x48, 0x42, 0x40, - 0x42, 0x43, 0x0a, 0x12, 0x18, 0x40, - 0x98, 0x12, 0x84, 0xc0, 0x94, 0x00, - 0x30, 0x84, 0xa9, 0x84, 0x25, 0x40 -}; - -const uint8_t kMaskRandom42_38[228] = { - 0x4e, 0x11, 0x92, 0x70, 0x8c, 0x80, - 0xe3, 0x18, 0x9f, 0x18, 0xc4, 0xc0, - 0x81, 0xe3, 0x04, 0x0f, 0x18, 0x00, - 0x21, 0x40, 0x59, 0x0a, 0x02, 0xc0, - 0x52, 0x81, 0xe2, 0x94, 0x0f, 0x00, - 0xb4, 0x28, 0x25, 0xa1, 0x41, 0x00, - 0x26, 0x86, 0x29, 0x34, 0x31, 0x40, - 0x58, 0x64, 0x42, 0xc3, 0x22, 0x00, - 0x19, 0x9e, 0x00, 0xcc, 0xf0, 0x00, - 0x4c, 0x19, 0x12, 0x60, 0xc8, 0x80, - 0x51, 0x14, 0x52, 0x88, 0xa2, 0x80, - 0xa0, 0x6a, 0x45, 0x03, 0x52, 0x00, - 0x04, 0xc1, 0x30, 0x26, 0x09, 0x80, - 0x03, 0xb4, 0x00, 0x1d, 0xa0, 0x00, - 0x86, 0x20, 0x94, 0x31, 0x04, 0x80, - 0x29, 0x08, 0x49, 0x48, 0x42, 0x40, - 0x42, 0x43, 0x0a, 0x12, 0x18, 0x40, - 0x98, 0x12, 0x84, 0xc0, 0x94, 0x00, - 0x30, 0x84, 0xa9, 0x84, 0x25, 0x40, - 0x4e, 0x11, 0x92, 0x70, 0x8c, 0x80, - 0xe3, 0x18, 0x9f, 0x18, 0xc4, 0xc0, - 0x81, 0xe3, 0x04, 0x0f, 0x18, 0x00, - 0x21, 0x40, 0x59, 0x0a, 0x02, 0xc0, - 0x52, 0x81, 0xe2, 0x94, 0x0f, 0x00, - 0xb4, 0x28, 0x25, 0xa1, 0x41, 0x00, - 0x26, 0x86, 0x29, 0x34, 0x31, 0x40, - 0x58, 0x64, 0x42, 0xc3, 0x22, 0x00, - 0x19, 0x9e, 0x00, 0xcc, 0xf0, 0x00, - 0x2c, 0x03, 0x21, 0x60, 0x19, 0x00, - 0x81, 0xa0, 0x1c, 0x0d, 0x00, 0xc0, - 0xa0, 0x68, 0x25, 0x03, 0x41, 0x00, - 0x05, 0x41, 0x50, 0x2a, 0x0a, 0x80, - 0x18, 0x90, 0xc0, 0xc4, 0x86, 0x00, - 0xc2, 0x06, 0x86, 0x10, 0x34, 0x00, - 0x22, 0x98, 0x09, 0x14, 0xc0, 0x40, - 0x50, 0x45, 0x0a, 0x82, 0x28, 0x40, - 0x5a, 0x56, 0x5a, 0xd2, 0xb2, 0xc0, - 0x05, 0x19, 0x55, 0xee, 0xe2, 0xc0 -}; - -const uint8_t kMaskRandom42_39[234] = { - 0x4e, 0x11, 0x92, 0x70, 0x8c, 0x80, - 0xe3, 0x18, 0x9f, 0x18, 0xc4, 0xc0, - 0x81, 0xe3, 0x04, 0x0f, 0x18, 0x00, - 0x21, 0x40, 0x59, 0x0a, 0x02, 0xc0, - 0x52, 0x81, 0xe2, 0x94, 0x0f, 0x00, - 0xb4, 0x28, 0x25, 0xa1, 0x41, 0x00, - 0x26, 0x86, 0x29, 0x34, 0x31, 0x40, - 0x58, 0x64, 0x42, 0xc3, 0x22, 0x00, - 0x19, 0x9e, 0x00, 0xcc, 0xf0, 0x00, - 0x4c, 0x19, 0x12, 0x60, 0xc8, 0x80, - 0x51, 0x14, 0x52, 0x88, 0xa2, 0x80, - 0xa0, 0x6a, 0x45, 0x03, 0x52, 0x00, - 0x04, 0xc1, 0x30, 0x26, 0x09, 0x80, - 0x03, 0xb4, 0x00, 0x1d, 0xa0, 0x00, - 0x86, 0x20, 0x94, 0x31, 0x04, 0x80, - 0x29, 0x08, 0x49, 0x48, 0x42, 0x40, - 0x42, 0x43, 0x0a, 0x12, 0x18, 0x40, - 0x98, 0x12, 0x84, 0xc0, 0x94, 0x00, - 0x30, 0x84, 0xa9, 0x84, 0x25, 0x40, - 0x4c, 0x19, 0x12, 0x60, 0xc8, 0x80, - 0x51, 0x14, 0x52, 0x88, 0xa2, 0x80, - 0xa0, 0x6a, 0x45, 0x03, 0x52, 0x00, - 0x04, 0xc1, 0x30, 0x26, 0x09, 0x80, - 0x03, 0xb4, 0x00, 0x1d, 0xa0, 0x00, - 0x86, 0x20, 0x94, 0x31, 0x04, 0x80, - 0x29, 0x08, 0x49, 0x48, 0x42, 0x40, - 0x42, 0x43, 0x0a, 0x12, 0x18, 0x40, - 0x98, 0x12, 0x84, 0xc0, 0x94, 0x00, - 0x30, 0x84, 0xa9, 0x84, 0x25, 0x40, - 0x4e, 0x11, 0x92, 0x70, 0x8c, 0x80, - 0xe3, 0x18, 0x9f, 0x18, 0xc4, 0xc0, - 0x81, 0xe3, 0x04, 0x0f, 0x18, 0x00, - 0x21, 0x40, 0x59, 0x0a, 0x02, 0xc0, - 0x52, 0x81, 0xe2, 0x94, 0x0f, 0x00, - 0xb4, 0x28, 0x25, 0xa1, 0x41, 0x00, - 0x26, 0x86, 0x29, 0x34, 0x31, 0x40, - 0x58, 0x64, 0x42, 0xc3, 0x22, 0x00, - 0x19, 0x9e, 0x00, 0xcc, 0xf0, 0x00, - 0x2a, 0x03, 0x31, 0x50, 0x19, 0x80 -}; - -const uint8_t kMaskRandom42_4[24] = { - 0xe6, 0x31, 0x37, 0x31, 0x89, 0x80, - 0x33, 0x8c, 0x59, 0x9c, 0x62, 0xc0, - 0x98, 0xd2, 0xcc, 0xc6, 0x96, 0x40, - 0x2d, 0x4b, 0x29, 0x6a, 0x59, 0x40 -}; - -const uint8_t kMaskRandom42_40[240] = { - 0x4c, 0x19, 0x12, 0x60, 0xc8, 0x80, - 0x51, 0x14, 0x52, 0x88, 0xa2, 0x80, - 0xa0, 0x6a, 0x45, 0x03, 0x52, 0x00, - 0x04, 0xc1, 0x30, 0x26, 0x09, 0x80, - 0x03, 0xb4, 0x00, 0x1d, 0xa0, 0x00, - 0x86, 0x20, 0x94, 0x31, 0x04, 0x80, - 0x29, 0x08, 0x49, 0x48, 0x42, 0x40, - 0x42, 0x43, 0x0a, 0x12, 0x18, 0x40, - 0x98, 0x12, 0x84, 0xc0, 0x94, 0x00, - 0x30, 0x84, 0xa9, 0x84, 0x25, 0x40, - 0x4e, 0x11, 0x92, 0x70, 0x8c, 0x80, - 0xe3, 0x18, 0x9f, 0x18, 0xc4, 0xc0, - 0x81, 0xe3, 0x04, 0x0f, 0x18, 0x00, - 0x21, 0x40, 0x59, 0x0a, 0x02, 0xc0, - 0x52, 0x81, 0xe2, 0x94, 0x0f, 0x00, - 0xb4, 0x28, 0x25, 0xa1, 0x41, 0x00, - 0x26, 0x86, 0x29, 0x34, 0x31, 0x40, - 0x58, 0x64, 0x42, 0xc3, 0x22, 0x00, - 0x19, 0x9e, 0x00, 0xcc, 0xf0, 0x00, - 0x2a, 0x03, 0x31, 0x50, 0x19, 0x80, - 0x4e, 0x11, 0x92, 0x70, 0x8c, 0x80, - 0xe3, 0x18, 0x9f, 0x18, 0xc4, 0xc0, - 0x81, 0xe3, 0x04, 0x0f, 0x18, 0x00, - 0x21, 0x40, 0x59, 0x0a, 0x02, 0xc0, - 0x52, 0x81, 0xe2, 0x94, 0x0f, 0x00, - 0xb4, 0x28, 0x25, 0xa1, 0x41, 0x00, - 0x26, 0x86, 0x29, 0x34, 0x31, 0x40, - 0x58, 0x64, 0x42, 0xc3, 0x22, 0x00, - 0x19, 0x9e, 0x00, 0xcc, 0xf0, 0x00, - 0x4c, 0x19, 0x12, 0x60, 0xc8, 0x80, - 0x51, 0x14, 0x52, 0x88, 0xa2, 0x80, - 0xa0, 0x6a, 0x45, 0x03, 0x52, 0x00, - 0x04, 0xc1, 0x30, 0x26, 0x09, 0x80, - 0x03, 0xb4, 0x00, 0x1d, 0xa0, 0x00, - 0x86, 0x20, 0x94, 0x31, 0x04, 0x80, - 0x29, 0x08, 0x49, 0x48, 0x42, 0x40, - 0x42, 0x43, 0x0a, 0x12, 0x18, 0x40, - 0x98, 0x12, 0x84, 0xc0, 0x94, 0x00, - 0x30, 0x84, 0xa9, 0x84, 0x25, 0x40, - 0xf9, 0xdb, 0x5d, 0x7a, 0xd4, 0x40 -}; - -const uint8_t kMaskRandom42_41[246] = { - 0x4c, 0x19, 0x12, 0x60, 0xc8, 0x80, - 0x51, 0x14, 0x52, 0x88, 0xa2, 0x80, - 0xa0, 0x6a, 0x45, 0x03, 0x52, 0x00, - 0x04, 0xc1, 0x30, 0x26, 0x09, 0x80, - 0x03, 0xb4, 0x00, 0x1d, 0xa0, 0x00, - 0x86, 0x20, 0x94, 0x31, 0x04, 0x80, - 0x29, 0x08, 0x49, 0x48, 0x42, 0x40, - 0x42, 0x43, 0x0a, 0x12, 0x18, 0x40, - 0x98, 0x12, 0x84, 0xc0, 0x94, 0x00, - 0x30, 0x84, 0xa9, 0x84, 0x25, 0x40, - 0x4e, 0x11, 0x92, 0x70, 0x8c, 0x80, - 0xe3, 0x18, 0x9f, 0x18, 0xc4, 0xc0, - 0x81, 0xe3, 0x04, 0x0f, 0x18, 0x00, - 0x21, 0x40, 0x59, 0x0a, 0x02, 0xc0, - 0x52, 0x81, 0xe2, 0x94, 0x0f, 0x00, - 0xb4, 0x28, 0x25, 0xa1, 0x41, 0x00, - 0x26, 0x86, 0x29, 0x34, 0x31, 0x40, - 0x58, 0x64, 0x42, 0xc3, 0x22, 0x00, - 0x19, 0x9e, 0x00, 0xcc, 0xf0, 0x00, - 0x2a, 0x03, 0x31, 0x50, 0x19, 0x80, - 0x4c, 0x19, 0x12, 0x60, 0xc8, 0x80, - 0x51, 0x14, 0x52, 0x88, 0xa2, 0x80, - 0xa0, 0x6a, 0x45, 0x03, 0x52, 0x00, - 0x04, 0xc1, 0x30, 0x26, 0x09, 0x80, - 0x03, 0xb4, 0x00, 0x1d, 0xa0, 0x00, - 0x86, 0x20, 0x94, 0x31, 0x04, 0x80, - 0x29, 0x08, 0x49, 0x48, 0x42, 0x40, - 0x42, 0x43, 0x0a, 0x12, 0x18, 0x40, - 0x98, 0x12, 0x84, 0xc0, 0x94, 0x00, - 0x30, 0x84, 0xa9, 0x84, 0x25, 0x40, - 0x4c, 0x11, 0x92, 0x60, 0x8c, 0x80, - 0x51, 0x0c, 0xca, 0x88, 0x66, 0x40, - 0xa0, 0x66, 0x45, 0x03, 0x32, 0x00, - 0x04, 0xc1, 0x60, 0x26, 0x0b, 0x00, - 0x03, 0xa0, 0x28, 0x1d, 0x01, 0x40, - 0x86, 0x21, 0x14, 0x31, 0x08, 0x80, - 0x29, 0x10, 0x19, 0x48, 0x80, 0xc0, - 0x42, 0x42, 0xa2, 0x12, 0x15, 0x00, - 0x98, 0x1a, 0x04, 0xc0, 0xd0, 0x00, - 0x30, 0x84, 0x09, 0x84, 0x20, 0x40, - 0xdf, 0x4c, 0x16, 0xfa, 0x60, 0x80 -}; - -const uint8_t kMaskRandom42_42[252] = { - 0x4c, 0x19, 0x12, 0x60, 0xc8, 0x80, - 0x51, 0x14, 0x52, 0x88, 0xa2, 0x80, - 0xa0, 0x6a, 0x45, 0x03, 0x52, 0x00, - 0x04, 0xc1, 0x30, 0x26, 0x09, 0x80, - 0x03, 0xb4, 0x00, 0x1d, 0xa0, 0x00, - 0x86, 0x20, 0x94, 0x31, 0x04, 0x80, - 0x29, 0x08, 0x49, 0x48, 0x42, 0x40, - 0x42, 0x43, 0x0a, 0x12, 0x18, 0x40, - 0x98, 0x12, 0x84, 0xc0, 0x94, 0x00, - 0x30, 0x84, 0xa9, 0x84, 0x25, 0x40, - 0x4c, 0x11, 0x92, 0x60, 0x8c, 0x80, - 0x51, 0x0c, 0xca, 0x88, 0x66, 0x40, - 0xa0, 0x66, 0x45, 0x03, 0x32, 0x00, - 0x04, 0xc1, 0x60, 0x26, 0x0b, 0x00, - 0x03, 0xa0, 0x28, 0x1d, 0x01, 0x40, - 0x86, 0x21, 0x14, 0x31, 0x08, 0x80, - 0x29, 0x10, 0x19, 0x48, 0x80, 0xc0, - 0x42, 0x42, 0xa2, 0x12, 0x15, 0x00, - 0x98, 0x1a, 0x04, 0xc0, 0xd0, 0x00, - 0x30, 0x84, 0x09, 0x84, 0x20, 0x40, - 0xdf, 0x4c, 0x16, 0xfa, 0x60, 0x80, - 0x4c, 0x19, 0x12, 0x60, 0xc8, 0x80, - 0x51, 0x14, 0x52, 0x88, 0xa2, 0x80, - 0xa0, 0x6a, 0x45, 0x03, 0x52, 0x00, - 0x04, 0xc1, 0x30, 0x26, 0x09, 0x80, - 0x03, 0xb4, 0x00, 0x1d, 0xa0, 0x00, - 0x86, 0x20, 0x94, 0x31, 0x04, 0x80, - 0x29, 0x08, 0x49, 0x48, 0x42, 0x40, - 0x42, 0x43, 0x0a, 0x12, 0x18, 0x40, - 0x98, 0x12, 0x84, 0xc0, 0x94, 0x00, - 0x30, 0x84, 0xa9, 0x84, 0x25, 0x40, - 0x4e, 0x11, 0x92, 0x70, 0x8c, 0x80, - 0xe3, 0x18, 0x9f, 0x18, 0xc4, 0xc0, - 0x81, 0xe3, 0x04, 0x0f, 0x18, 0x00, - 0x21, 0x40, 0x59, 0x0a, 0x02, 0xc0, - 0x52, 0x81, 0xe2, 0x94, 0x0f, 0x00, - 0xb4, 0x28, 0x25, 0xa1, 0x41, 0x00, - 0x26, 0x86, 0x29, 0x34, 0x31, 0x40, - 0x58, 0x64, 0x42, 0xc3, 0x22, 0x00, - 0x19, 0x9e, 0x00, 0xcc, 0xf0, 0x00, - 0x2a, 0x03, 0x31, 0x50, 0x19, 0x80, - 0xea, 0x9e, 0x23, 0xb3, 0x65, 0x00 -}; - -const uint8_t kMaskRandom42_5[30] = { - 0xce, 0x31, 0xb6, 0x71, 0x8d, 0x80, - 0x63, 0x98, 0xdb, 0x1c, 0xc6, 0xc0, - 0x98, 0xc7, 0x6c, 0xc6, 0x3b, 0x40, - 0x4d, 0x6b, 0x52, 0x6b, 0x5a, 0x80, - 0xb2, 0x6c, 0xad, 0x93, 0x65, 0x40 -}; - -const uint8_t kMaskRandom42_6[36] = { - 0x4c, 0x19, 0x12, 0x60, 0xc8, 0x80, - 0x51, 0x14, 0x52, 0x88, 0xa2, 0x80, - 0x20, 0xea, 0x09, 0x07, 0x50, 0x40, - 0x85, 0x41, 0x2c, 0x2a, 0x09, 0x40, - 0x06, 0x80, 0xd8, 0x34, 0x06, 0xc0, - 0x8a, 0x24, 0x34, 0x51, 0x21, 0x80 -}; - -const uint8_t kMaskRandom42_7[42] = { - 0xc6, 0x11, 0x96, 0x30, 0x8c, 0x80, - 0x33, 0x04, 0xc9, 0x98, 0x26, 0x40, - 0x18, 0x67, 0x40, 0xc3, 0x3a, 0x00, - 0x45, 0x42, 0xd2, 0x2a, 0x16, 0x80, - 0x12, 0xd4, 0x28, 0x96, 0xa1, 0x40, - 0xb4, 0x28, 0x35, 0xa1, 0x41, 0x80, - 0x29, 0x92, 0x19, 0x4c, 0x90, 0xc0 -}; - -const uint8_t kMaskRandom42_8[48] = { - 0x07, 0x0a, 0x70, 0x38, 0x53, 0x80, - 0x49, 0xa8, 0x2a, 0x4d, 0x41, 0x40, - 0xb0, 0x7a, 0x05, 0x83, 0xd0, 0x00, - 0x24, 0xc5, 0xc1, 0x26, 0x2e, 0x00, - 0x52, 0x80, 0xea, 0x94, 0x07, 0x40, - 0xc6, 0x31, 0x86, 0x31, 0x8c, 0x00, - 0x31, 0x94, 0x19, 0x8c, 0xa0, 0xc0, - 0x18, 0xc7, 0x08, 0xc6, 0x38, 0x40 -}; - -const uint8_t kMaskRandom42_9[54] = { - 0x4e, 0x11, 0x12, 0x70, 0x88, 0x80, - 0x62, 0x1a, 0x0b, 0x10, 0xd0, 0x40, - 0x80, 0xe9, 0x44, 0x07, 0x4a, 0x00, - 0xa1, 0x50, 0x55, 0x0a, 0x82, 0x80, - 0x53, 0x00, 0x6a, 0x98, 0x03, 0x40, - 0xa4, 0x24, 0x35, 0x21, 0x21, 0x80, - 0x16, 0xa0, 0x88, 0xb5, 0x04, 0x40, - 0x58, 0x45, 0x22, 0xc2, 0x29, 0x00, - 0x29, 0x86, 0x81, 0x4c, 0x34, 0x00 -}; - -const uint8_t kMaskRandom43_1[6] = { - 0xff, 0xff, 0xff, 0xff, 0xff, 0xe0 -}; - -const uint8_t kMaskRandom43_10[60] = { - 0x4c, 0x19, 0x16, 0x01, 0xc4, 0x40, - 0x51, 0x14, 0x51, 0x80, 0x71, 0x40, - 0xa0, 0x6a, 0x47, 0x40, 0x38, 0x00, - 0x04, 0xc1, 0x34, 0x28, 0x45, 0x40, - 0x03, 0xb4, 0x06, 0x84, 0x90, 0x80, - 0x86, 0x20, 0x94, 0x32, 0x82, 0x40, - 0x29, 0x08, 0x4a, 0x53, 0x40, 0x60, - 0x42, 0x43, 0x08, 0x0d, 0x03, 0xa0, - 0x98, 0x12, 0x82, 0x64, 0x0c, 0x80, - 0x30, 0x84, 0xab, 0x11, 0x20, 0x20 -}; - -const uint8_t kMaskRandom43_11[66] = { - 0xc6, 0x21, 0xa2, 0x32, 0x46, 0x40, - 0x23, 0x88, 0xc9, 0x99, 0x33, 0x20, - 0x1a, 0x45, 0x8c, 0xc8, 0x99, 0x00, - 0x24, 0xd3, 0x08, 0x2c, 0x05, 0x80, - 0x71, 0x10, 0x74, 0x05, 0x80, 0xa0, - 0x0e, 0x19, 0x14, 0x22, 0x84, 0x40, - 0x33, 0x14, 0x52, 0x03, 0x40, 0x60, - 0x10, 0xc3, 0x28, 0x54, 0x0a, 0x80, - 0x45, 0x68, 0x4b, 0x40, 0x68, 0x00, - 0x88, 0x84, 0xa8, 0x81, 0x10, 0x20, - 0xe0, 0x22, 0x91, 0x82, 0x30, 0x40 -}; - -const uint8_t kMaskRandom43_12[72] = { - 0x0e, 0x19, 0x13, 0x22, 0x64, 0x40, - 0x33, 0x14, 0x52, 0x8a, 0x51, 0x40, - 0x10, 0xc3, 0x28, 0x65, 0x0c, 0xa0, - 0x45, 0x68, 0x4d, 0x09, 0xa1, 0x20, - 0x88, 0x84, 0xa8, 0x95, 0x12, 0xa0, - 0xe0, 0x22, 0x94, 0x52, 0x8a, 0x40, - 0xc6, 0x21, 0xa4, 0x34, 0x86, 0x80, - 0x23, 0x88, 0xc9, 0x19, 0x23, 0x20, - 0x1a, 0x45, 0x88, 0xb1, 0x16, 0x20, - 0x24, 0xd3, 0x0a, 0x61, 0x4c, 0x20, - 0x71, 0x10, 0x72, 0x0e, 0x41, 0xc0, - 0xa0, 0x65, 0x1f, 0xa0, 0xc4, 0xe0 -}; - -const uint8_t kMaskRandom43_13[78] = { - 0x0e, 0x19, 0x13, 0x22, 0x64, 0x40, - 0x33, 0x14, 0x52, 0x8a, 0x51, 0x40, - 0x10, 0xc3, 0x28, 0x65, 0x0c, 0xa0, - 0x45, 0x68, 0x4d, 0x09, 0xa1, 0x20, - 0x88, 0x84, 0xa8, 0x95, 0x12, 0xa0, - 0xe0, 0x22, 0x94, 0x52, 0x8a, 0x40, - 0x46, 0x11, 0x92, 0x32, 0x46, 0x40, - 0x33, 0x0c, 0xc9, 0x99, 0x33, 0x20, - 0x10, 0xe4, 0x64, 0x8c, 0x91, 0x80, - 0x0c, 0x69, 0x0d, 0x21, 0xa4, 0x20, - 0x28, 0x94, 0x2a, 0x85, 0x50, 0xa0, - 0x94, 0x21, 0x34, 0x26, 0x84, 0xc0, - 0xc1, 0x02, 0x58, 0x4b, 0x09, 0x60 -}; - -const uint8_t kMaskRandom43_14[84] = { - 0x46, 0x11, 0x92, 0x32, 0x46, 0x40, - 0x33, 0x0c, 0xc9, 0x99, 0x33, 0x20, - 0x10, 0xe4, 0x64, 0x8c, 0x91, 0x80, - 0x0c, 0x69, 0x0d, 0x21, 0xa4, 0x20, - 0x28, 0x94, 0x2a, 0x85, 0x50, 0xa0, - 0x94, 0x21, 0x34, 0x26, 0x84, 0xc0, - 0xc1, 0x02, 0x58, 0x4b, 0x09, 0x60, - 0x0e, 0x19, 0x13, 0x22, 0x64, 0x40, - 0x33, 0x14, 0x52, 0x8a, 0x51, 0x40, - 0x10, 0xc3, 0x28, 0x65, 0x0c, 0xa0, - 0x45, 0x68, 0x4d, 0x09, 0xa1, 0x20, - 0x88, 0x84, 0xa8, 0x95, 0x12, 0xa0, - 0xe0, 0x22, 0x94, 0x52, 0x8a, 0x40, - 0x4d, 0xd0, 0xc6, 0x36, 0x57, 0x40 -}; - -const uint8_t kMaskRandom43_15[90] = { - 0x46, 0x11, 0x92, 0x32, 0x46, 0x40, - 0x33, 0x0c, 0xc9, 0x99, 0x33, 0x20, - 0x10, 0xe4, 0x64, 0x8c, 0x91, 0x80, - 0x0c, 0x69, 0x0d, 0x21, 0xa4, 0x20, - 0x28, 0x94, 0x2a, 0x85, 0x50, 0xa0, - 0x94, 0x21, 0x34, 0x26, 0x84, 0xc0, - 0xc1, 0x02, 0x58, 0x4b, 0x09, 0x60, - 0x2c, 0x03, 0x20, 0x64, 0x0c, 0x80, - 0x81, 0xa0, 0x1c, 0x03, 0x80, 0x60, - 0xa0, 0x68, 0x25, 0x04, 0xa0, 0x80, - 0x05, 0x41, 0x50, 0x2a, 0x05, 0x40, - 0x18, 0x90, 0xc2, 0x18, 0x43, 0x00, - 0xc2, 0x06, 0x80, 0xd0, 0x1a, 0x00, - 0x22, 0x98, 0x0b, 0x01, 0x60, 0x20, - 0x50, 0x45, 0x08, 0xa1, 0x14, 0x20 -}; - -const uint8_t kMaskRandom43_16[96] = { - 0x2c, 0x03, 0x20, 0x64, 0x0c, 0x80, - 0x81, 0xa0, 0x1c, 0x03, 0x80, 0x60, - 0xa0, 0x68, 0x25, 0x04, 0xa0, 0x80, - 0x05, 0x41, 0x50, 0x2a, 0x05, 0x40, - 0x18, 0x90, 0xc2, 0x18, 0x43, 0x00, - 0xc2, 0x06, 0x80, 0xd0, 0x1a, 0x00, - 0x22, 0x98, 0x0b, 0x01, 0x60, 0x20, - 0x50, 0x45, 0x08, 0xa1, 0x14, 0x20, - 0x46, 0x11, 0x92, 0x32, 0x46, 0x40, - 0x33, 0x0c, 0xc9, 0x99, 0x33, 0x20, - 0x10, 0xe4, 0x64, 0x8c, 0x91, 0x80, - 0x0c, 0x69, 0x0d, 0x21, 0xa4, 0x20, - 0x28, 0x94, 0x2a, 0x85, 0x50, 0xa0, - 0x94, 0x21, 0x34, 0x26, 0x84, 0xc0, - 0xc1, 0x02, 0x58, 0x4b, 0x09, 0x60, - 0x3b, 0xf5, 0x3c, 0x36, 0x0a, 0x20 -}; - -const uint8_t kMaskRandom43_17[102] = { - 0x2c, 0x03, 0x20, 0x64, 0x0c, 0x80, - 0x81, 0xa0, 0x1c, 0x03, 0x80, 0x60, - 0xa0, 0x68, 0x25, 0x04, 0xa0, 0x80, - 0x05, 0x41, 0x50, 0x2a, 0x05, 0x40, - 0x18, 0x90, 0xc2, 0x18, 0x43, 0x00, - 0xc2, 0x06, 0x80, 0xd0, 0x1a, 0x00, - 0x22, 0x98, 0x0b, 0x01, 0x60, 0x20, - 0x50, 0x45, 0x08, 0xa1, 0x14, 0x20, - 0x4e, 0x11, 0x92, 0x32, 0x46, 0x40, - 0xe3, 0x18, 0x9b, 0x13, 0x62, 0x60, - 0x81, 0xe3, 0x04, 0x60, 0x8c, 0x00, - 0x21, 0x40, 0x58, 0x0b, 0x01, 0x60, - 0x52, 0x81, 0xe0, 0x3c, 0x07, 0x80, - 0xb4, 0x28, 0x25, 0x04, 0xa0, 0x80, - 0x26, 0x86, 0x28, 0xc5, 0x18, 0xa0, - 0x58, 0x64, 0x44, 0x88, 0x91, 0x00, - 0x19, 0x9e, 0x03, 0xc0, 0x78, 0x00 -}; - -const uint8_t kMaskRandom43_18[108] = { - 0x4e, 0x11, 0x92, 0x32, 0x46, 0x40, - 0xe3, 0x18, 0x9b, 0x13, 0x62, 0x60, - 0x81, 0xe3, 0x04, 0x60, 0x8c, 0x00, - 0x21, 0x40, 0x58, 0x0b, 0x01, 0x60, - 0x52, 0x81, 0xe0, 0x3c, 0x07, 0x80, - 0xb4, 0x28, 0x25, 0x04, 0xa0, 0x80, - 0x26, 0x86, 0x28, 0xc5, 0x18, 0xa0, - 0x58, 0x64, 0x44, 0x88, 0x91, 0x00, - 0x19, 0x9e, 0x03, 0xc0, 0x78, 0x00, - 0x2c, 0x03, 0x20, 0x64, 0x0c, 0x80, - 0x81, 0xa0, 0x1c, 0x03, 0x80, 0x60, - 0xa0, 0x68, 0x25, 0x04, 0xa0, 0x80, - 0x05, 0x41, 0x50, 0x2a, 0x05, 0x40, - 0x18, 0x90, 0xc2, 0x18, 0x43, 0x00, - 0xc2, 0x06, 0x80, 0xd0, 0x1a, 0x00, - 0x22, 0x98, 0x0b, 0x01, 0x60, 0x20, - 0x50, 0x45, 0x08, 0xa1, 0x14, 0x20, - 0x5a, 0x56, 0x5f, 0x26, 0xa3, 0x60 -}; - -const uint8_t kMaskRandom43_19[114] = { - 0x4e, 0x11, 0x92, 0x32, 0x46, 0x40, - 0xe3, 0x18, 0x9b, 0x13, 0x62, 0x60, - 0x81, 0xe3, 0x04, 0x60, 0x8c, 0x00, - 0x21, 0x40, 0x58, 0x0b, 0x01, 0x60, - 0x52, 0x81, 0xe0, 0x3c, 0x07, 0x80, - 0xb4, 0x28, 0x25, 0x04, 0xa0, 0x80, - 0x26, 0x86, 0x28, 0xc5, 0x18, 0xa0, - 0x58, 0x64, 0x44, 0x88, 0x91, 0x00, - 0x19, 0x9e, 0x03, 0xc0, 0x78, 0x00, - 0x4c, 0x19, 0x13, 0x22, 0x64, 0x40, - 0x51, 0x14, 0x52, 0x8a, 0x51, 0x40, - 0xa0, 0x6a, 0x45, 0x48, 0xa9, 0x00, - 0x04, 0xc1, 0x30, 0x26, 0x04, 0xc0, - 0x03, 0xb4, 0x06, 0x80, 0xd0, 0x00, - 0x86, 0x20, 0x94, 0x12, 0x82, 0x40, - 0x29, 0x08, 0x49, 0x09, 0x21, 0x20, - 0x42, 0x43, 0x08, 0x61, 0x0c, 0x20, - 0x98, 0x12, 0x82, 0x50, 0x4a, 0x00, - 0x30, 0x84, 0xa8, 0x95, 0x12, 0xa0 -}; - -const uint8_t kMaskRandom43_2[12] = { - 0xee, 0x3b, 0x37, 0x66, 0xec, 0xc0, - 0x99, 0xe6, 0xec, 0xdd, 0x9b, 0xa0 -}; - -const uint8_t kMaskRandom43_20[120] = { - 0x4c, 0x19, 0x13, 0x22, 0x64, 0x40, - 0x51, 0x14, 0x52, 0x8a, 0x51, 0x40, - 0xa0, 0x6a, 0x45, 0x48, 0xa9, 0x00, - 0x04, 0xc1, 0x30, 0x26, 0x04, 0xc0, - 0x03, 0xb4, 0x06, 0x80, 0xd0, 0x00, - 0x86, 0x20, 0x94, 0x12, 0x82, 0x40, - 0x29, 0x08, 0x49, 0x09, 0x21, 0x20, - 0x42, 0x43, 0x08, 0x61, 0x0c, 0x20, - 0x98, 0x12, 0x82, 0x50, 0x4a, 0x00, - 0x30, 0x84, 0xa8, 0x95, 0x12, 0xa0, - 0x4e, 0x11, 0x92, 0x32, 0x46, 0x40, - 0xe3, 0x18, 0x9b, 0x13, 0x62, 0x60, - 0x81, 0xe3, 0x04, 0x60, 0x8c, 0x00, - 0x21, 0x40, 0x58, 0x0b, 0x01, 0x60, - 0x52, 0x81, 0xe0, 0x3c, 0x07, 0x80, - 0xb4, 0x28, 0x25, 0x04, 0xa0, 0x80, - 0x26, 0x86, 0x28, 0xc5, 0x18, 0xa0, - 0x58, 0x64, 0x44, 0x88, 0x91, 0x00, - 0x19, 0x9e, 0x03, 0xc0, 0x78, 0x00, - 0x2a, 0x03, 0x31, 0xda, 0x46, 0x20 -}; - -const uint8_t kMaskRandom43_21[126] = { - 0x4c, 0x19, 0x13, 0x22, 0x64, 0x40, - 0x51, 0x14, 0x52, 0x8a, 0x51, 0x40, - 0xa0, 0x6a, 0x45, 0x48, 0xa9, 0x00, - 0x04, 0xc1, 0x30, 0x26, 0x04, 0xc0, - 0x03, 0xb4, 0x06, 0x80, 0xd0, 0x00, - 0x86, 0x20, 0x94, 0x12, 0x82, 0x40, - 0x29, 0x08, 0x49, 0x09, 0x21, 0x20, - 0x42, 0x43, 0x08, 0x61, 0x0c, 0x20, - 0x98, 0x12, 0x82, 0x50, 0x4a, 0x00, - 0x30, 0x84, 0xa8, 0x95, 0x12, 0xa0, - 0x4c, 0x11, 0x92, 0x32, 0x46, 0x40, - 0x51, 0x0c, 0xc9, 0x99, 0x33, 0x20, - 0xa0, 0x66, 0x44, 0xc8, 0x99, 0x00, - 0x04, 0xc1, 0x60, 0x2c, 0x05, 0x80, - 0x03, 0xa0, 0x2c, 0x05, 0x80, 0xa0, - 0x86, 0x21, 0x14, 0x22, 0x84, 0x40, - 0x29, 0x10, 0x1a, 0x03, 0x40, 0x60, - 0x42, 0x42, 0xa0, 0x54, 0x0a, 0x80, - 0x98, 0x1a, 0x03, 0x40, 0x68, 0x00, - 0x30, 0x84, 0x08, 0x81, 0x10, 0x20, - 0xdf, 0x4c, 0x11, 0x82, 0x30, 0x40 -}; - -const uint8_t kMaskRandom43_22[132] = { - 0xc6, 0x21, 0xa2, 0x32, 0x46, 0x40, - 0x23, 0x88, 0xc9, 0x99, 0x33, 0x20, - 0x1a, 0x45, 0x8c, 0xc8, 0x99, 0x00, - 0x24, 0xd3, 0x08, 0x2c, 0x05, 0x80, - 0x71, 0x10, 0x74, 0x05, 0x80, 0xa0, - 0x0e, 0x19, 0x14, 0x22, 0x84, 0x40, - 0x33, 0x14, 0x52, 0x03, 0x40, 0x60, - 0x10, 0xc3, 0x28, 0x54, 0x0a, 0x80, - 0x45, 0x68, 0x4b, 0x40, 0x68, 0x00, - 0x88, 0x84, 0xa8, 0x81, 0x10, 0x20, - 0xe0, 0x22, 0x91, 0x82, 0x30, 0x40, - 0x4c, 0x19, 0x16, 0x01, 0xc4, 0x40, - 0x51, 0x14, 0x51, 0x80, 0x71, 0x40, - 0xa0, 0x6a, 0x47, 0x40, 0x38, 0x00, - 0x04, 0xc1, 0x34, 0x28, 0x45, 0x40, - 0x03, 0xb4, 0x06, 0x84, 0x90, 0x80, - 0x86, 0x20, 0x94, 0x32, 0x82, 0x40, - 0x29, 0x08, 0x4a, 0x53, 0x40, 0x60, - 0x42, 0x43, 0x08, 0x0d, 0x03, 0xa0, - 0x98, 0x12, 0x82, 0x64, 0x0c, 0x80, - 0x30, 0x84, 0xab, 0x11, 0x20, 0x20, - 0xfe, 0x2c, 0x85, 0xcc, 0x24, 0x80 -}; - -const uint8_t kMaskRandom43_23[138] = { - 0xc6, 0x21, 0xa2, 0x32, 0x46, 0x40, - 0x23, 0x88, 0xc9, 0x99, 0x33, 0x20, - 0x1a, 0x45, 0x8c, 0xc8, 0x99, 0x00, - 0x24, 0xd3, 0x08, 0x2c, 0x05, 0x80, - 0x71, 0x10, 0x74, 0x05, 0x80, 0xa0, - 0x0e, 0x19, 0x14, 0x22, 0x84, 0x40, - 0x33, 0x14, 0x52, 0x03, 0x40, 0x60, - 0x10, 0xc3, 0x28, 0x54, 0x0a, 0x80, - 0x45, 0x68, 0x4b, 0x40, 0x68, 0x00, - 0x88, 0x84, 0xa8, 0x81, 0x10, 0x20, - 0xe0, 0x22, 0x91, 0x82, 0x30, 0x40, - 0x0e, 0x19, 0x13, 0x22, 0x64, 0x40, - 0x33, 0x14, 0x52, 0x8a, 0x51, 0x40, - 0x10, 0xc3, 0x28, 0x65, 0x0c, 0xa0, - 0x45, 0x68, 0x4d, 0x09, 0xa1, 0x20, - 0x88, 0x84, 0xa8, 0x95, 0x12, 0xa0, - 0xe0, 0x22, 0x94, 0x52, 0x8a, 0x40, - 0xc6, 0x21, 0xa4, 0x34, 0x86, 0x80, - 0x23, 0x88, 0xc9, 0x19, 0x23, 0x20, - 0x1a, 0x45, 0x88, 0xb1, 0x16, 0x20, - 0x24, 0xd3, 0x0a, 0x61, 0x4c, 0x20, - 0x71, 0x10, 0x72, 0x0e, 0x41, 0xc0, - 0xa0, 0x65, 0x1f, 0xa0, 0xc4, 0xe0 -}; - -const uint8_t kMaskRandom43_24[144] = { - 0x0e, 0x19, 0x13, 0x22, 0x64, 0x40, - 0x33, 0x14, 0x52, 0x8a, 0x51, 0x40, - 0x10, 0xc3, 0x28, 0x65, 0x0c, 0xa0, - 0x45, 0x68, 0x4d, 0x09, 0xa1, 0x20, - 0x88, 0x84, 0xa8, 0x95, 0x12, 0xa0, - 0xe0, 0x22, 0x94, 0x52, 0x8a, 0x40, - 0xc6, 0x21, 0xa4, 0x34, 0x86, 0x80, - 0x23, 0x88, 0xc9, 0x19, 0x23, 0x20, - 0x1a, 0x45, 0x88, 0xb1, 0x16, 0x20, - 0x24, 0xd3, 0x0a, 0x61, 0x4c, 0x20, - 0x71, 0x10, 0x72, 0x0e, 0x41, 0xc0, - 0xa0, 0x65, 0x1f, 0xa0, 0xc4, 0xe0, - 0xc6, 0x21, 0xa2, 0x32, 0x46, 0x40, - 0x23, 0x88, 0xc9, 0x99, 0x33, 0x20, - 0x1a, 0x45, 0x8c, 0xc8, 0x99, 0x00, - 0x24, 0xd3, 0x08, 0x2c, 0x05, 0x80, - 0x71, 0x10, 0x74, 0x05, 0x80, 0xa0, - 0x0e, 0x19, 0x14, 0x22, 0x84, 0x40, - 0x33, 0x14, 0x52, 0x03, 0x40, 0x60, - 0x10, 0xc3, 0x28, 0x54, 0x0a, 0x80, - 0x45, 0x68, 0x4b, 0x40, 0x68, 0x00, - 0x88, 0x84, 0xa8, 0x81, 0x10, 0x20, - 0xe0, 0x22, 0x91, 0x82, 0x30, 0x40, - 0xf9, 0xb1, 0x26, 0x6c, 0x51, 0xe0 -}; - -const uint8_t kMaskRandom43_25[150] = { - 0x0e, 0x19, 0x13, 0x22, 0x64, 0x40, - 0x33, 0x14, 0x52, 0x8a, 0x51, 0x40, - 0x10, 0xc3, 0x28, 0x65, 0x0c, 0xa0, - 0x45, 0x68, 0x4d, 0x09, 0xa1, 0x20, - 0x88, 0x84, 0xa8, 0x95, 0x12, 0xa0, - 0xe0, 0x22, 0x94, 0x52, 0x8a, 0x40, - 0xc6, 0x21, 0xa4, 0x34, 0x86, 0x80, - 0x23, 0x88, 0xc9, 0x19, 0x23, 0x20, - 0x1a, 0x45, 0x88, 0xb1, 0x16, 0x20, - 0x24, 0xd3, 0x0a, 0x61, 0x4c, 0x20, - 0x71, 0x10, 0x72, 0x0e, 0x41, 0xc0, - 0xa0, 0x65, 0x1f, 0xa0, 0xc4, 0xe0, - 0x0e, 0x19, 0x13, 0x22, 0x64, 0x40, - 0x33, 0x14, 0x52, 0x8a, 0x51, 0x40, - 0x10, 0xc3, 0x28, 0x65, 0x0c, 0xa0, - 0x45, 0x68, 0x4d, 0x09, 0xa1, 0x20, - 0x88, 0x84, 0xa8, 0x95, 0x12, 0xa0, - 0xe0, 0x22, 0x94, 0x52, 0x8a, 0x40, - 0x46, 0x11, 0x92, 0x32, 0x46, 0x40, - 0x33, 0x0c, 0xc9, 0x99, 0x33, 0x20, - 0x10, 0xe4, 0x64, 0x8c, 0x91, 0x80, - 0x0c, 0x69, 0x0d, 0x21, 0xa4, 0x20, - 0x28, 0x94, 0x2a, 0x85, 0x50, 0xa0, - 0x94, 0x21, 0x34, 0x26, 0x84, 0xc0, - 0xc1, 0x02, 0x58, 0x4b, 0x09, 0x60 -}; - -const uint8_t kMaskRandom43_26[156] = { - 0x0e, 0x19, 0x13, 0x22, 0x64, 0x40, - 0x33, 0x14, 0x52, 0x8a, 0x51, 0x40, - 0x10, 0xc3, 0x28, 0x65, 0x0c, 0xa0, - 0x45, 0x68, 0x4d, 0x09, 0xa1, 0x20, - 0x88, 0x84, 0xa8, 0x95, 0x12, 0xa0, - 0xe0, 0x22, 0x94, 0x52, 0x8a, 0x40, - 0x46, 0x11, 0x92, 0x32, 0x46, 0x40, - 0x33, 0x0c, 0xc9, 0x99, 0x33, 0x20, - 0x10, 0xe4, 0x64, 0x8c, 0x91, 0x80, - 0x0c, 0x69, 0x0d, 0x21, 0xa4, 0x20, - 0x28, 0x94, 0x2a, 0x85, 0x50, 0xa0, - 0x94, 0x21, 0x34, 0x26, 0x84, 0xc0, - 0xc1, 0x02, 0x58, 0x4b, 0x09, 0x60, - 0x0e, 0x19, 0x13, 0x22, 0x64, 0x40, - 0x33, 0x14, 0x52, 0x8a, 0x51, 0x40, - 0x10, 0xc3, 0x28, 0x65, 0x0c, 0xa0, - 0x45, 0x68, 0x4d, 0x09, 0xa1, 0x20, - 0x88, 0x84, 0xa8, 0x95, 0x12, 0xa0, - 0xe0, 0x22, 0x94, 0x52, 0x8a, 0x40, - 0xc6, 0x21, 0xa4, 0x34, 0x86, 0x80, - 0x23, 0x88, 0xc9, 0x19, 0x23, 0x20, - 0x1a, 0x45, 0x88, 0xb1, 0x16, 0x20, - 0x24, 0xd3, 0x0a, 0x61, 0x4c, 0x20, - 0x71, 0x10, 0x72, 0x0e, 0x41, 0xc0, - 0xa0, 0x65, 0x1f, 0xa0, 0xc4, 0xe0, - 0xef, 0x84, 0x77, 0xca, 0x0d, 0x40 -}; - -const uint8_t kMaskRandom43_27[162] = { - 0x0e, 0x19, 0x13, 0x22, 0x64, 0x40, - 0x33, 0x14, 0x52, 0x8a, 0x51, 0x40, - 0x10, 0xc3, 0x28, 0x65, 0x0c, 0xa0, - 0x45, 0x68, 0x4d, 0x09, 0xa1, 0x20, - 0x88, 0x84, 0xa8, 0x95, 0x12, 0xa0, - 0xe0, 0x22, 0x94, 0x52, 0x8a, 0x40, - 0x46, 0x11, 0x92, 0x32, 0x46, 0x40, - 0x33, 0x0c, 0xc9, 0x99, 0x33, 0x20, - 0x10, 0xe4, 0x64, 0x8c, 0x91, 0x80, - 0x0c, 0x69, 0x0d, 0x21, 0xa4, 0x20, - 0x28, 0x94, 0x2a, 0x85, 0x50, 0xa0, - 0x94, 0x21, 0x34, 0x26, 0x84, 0xc0, - 0xc1, 0x02, 0x58, 0x4b, 0x09, 0x60, - 0x46, 0x11, 0x92, 0x32, 0x46, 0x40, - 0x33, 0x0c, 0xc9, 0x99, 0x33, 0x20, - 0x10, 0xe4, 0x64, 0x8c, 0x91, 0x80, - 0x0c, 0x69, 0x0d, 0x21, 0xa4, 0x20, - 0x28, 0x94, 0x2a, 0x85, 0x50, 0xa0, - 0x94, 0x21, 0x34, 0x26, 0x84, 0xc0, - 0xc1, 0x02, 0x58, 0x4b, 0x09, 0x60, - 0x0e, 0x19, 0x13, 0x22, 0x64, 0x40, - 0x33, 0x14, 0x52, 0x8a, 0x51, 0x40, - 0x10, 0xc3, 0x28, 0x65, 0x0c, 0xa0, - 0x45, 0x68, 0x4d, 0x09, 0xa1, 0x20, - 0x88, 0x84, 0xa8, 0x95, 0x12, 0xa0, - 0xe0, 0x22, 0x94, 0x52, 0x8a, 0x40, - 0x4d, 0xd0, 0xc6, 0x36, 0x57, 0x40 -}; - -const uint8_t kMaskRandom43_28[168] = { - 0x46, 0x11, 0x92, 0x32, 0x46, 0x40, - 0x33, 0x0c, 0xc9, 0x99, 0x33, 0x20, - 0x10, 0xe4, 0x64, 0x8c, 0x91, 0x80, - 0x0c, 0x69, 0x0d, 0x21, 0xa4, 0x20, - 0x28, 0x94, 0x2a, 0x85, 0x50, 0xa0, - 0x94, 0x21, 0x34, 0x26, 0x84, 0xc0, - 0xc1, 0x02, 0x58, 0x4b, 0x09, 0x60, - 0x0e, 0x19, 0x13, 0x22, 0x64, 0x40, - 0x33, 0x14, 0x52, 0x8a, 0x51, 0x40, - 0x10, 0xc3, 0x28, 0x65, 0x0c, 0xa0, - 0x45, 0x68, 0x4d, 0x09, 0xa1, 0x20, - 0x88, 0x84, 0xa8, 0x95, 0x12, 0xa0, - 0xe0, 0x22, 0x94, 0x52, 0x8a, 0x40, - 0x4d, 0xd0, 0xc6, 0x36, 0x57, 0x40, - 0x0e, 0x19, 0x13, 0x22, 0x64, 0x40, - 0x33, 0x14, 0x52, 0x8a, 0x51, 0x40, - 0x10, 0xc3, 0x28, 0x65, 0x0c, 0xa0, - 0x45, 0x68, 0x4d, 0x09, 0xa1, 0x20, - 0x88, 0x84, 0xa8, 0x95, 0x12, 0xa0, - 0xe0, 0x22, 0x94, 0x52, 0x8a, 0x40, - 0x46, 0x11, 0x92, 0x32, 0x46, 0x40, - 0x33, 0x0c, 0xc9, 0x99, 0x33, 0x20, - 0x10, 0xe4, 0x64, 0x8c, 0x91, 0x80, - 0x0c, 0x69, 0x0d, 0x21, 0xa4, 0x20, - 0x28, 0x94, 0x2a, 0x85, 0x50, 0xa0, - 0x94, 0x21, 0x34, 0x26, 0x84, 0xc0, - 0xc1, 0x02, 0x58, 0x4b, 0x09, 0x60, - 0x16, 0xc9, 0x53, 0x1e, 0xc4, 0x00 -}; - -const uint8_t kMaskRandom43_29[174] = { - 0x46, 0x11, 0x92, 0x32, 0x46, 0x40, - 0x33, 0x0c, 0xc9, 0x99, 0x33, 0x20, - 0x10, 0xe4, 0x64, 0x8c, 0x91, 0x80, - 0x0c, 0x69, 0x0d, 0x21, 0xa4, 0x20, - 0x28, 0x94, 0x2a, 0x85, 0x50, 0xa0, - 0x94, 0x21, 0x34, 0x26, 0x84, 0xc0, - 0xc1, 0x02, 0x58, 0x4b, 0x09, 0x60, - 0x0e, 0x19, 0x13, 0x22, 0x64, 0x40, - 0x33, 0x14, 0x52, 0x8a, 0x51, 0x40, - 0x10, 0xc3, 0x28, 0x65, 0x0c, 0xa0, - 0x45, 0x68, 0x4d, 0x09, 0xa1, 0x20, - 0x88, 0x84, 0xa8, 0x95, 0x12, 0xa0, - 0xe0, 0x22, 0x94, 0x52, 0x8a, 0x40, - 0x4d, 0xd0, 0xc6, 0x36, 0x57, 0x40, - 0x46, 0x11, 0x92, 0x32, 0x46, 0x40, - 0x33, 0x0c, 0xc9, 0x99, 0x33, 0x20, - 0x10, 0xe4, 0x64, 0x8c, 0x91, 0x80, - 0x0c, 0x69, 0x0d, 0x21, 0xa4, 0x20, - 0x28, 0x94, 0x2a, 0x85, 0x50, 0xa0, - 0x94, 0x21, 0x34, 0x26, 0x84, 0xc0, - 0xc1, 0x02, 0x58, 0x4b, 0x09, 0x60, - 0x2c, 0x03, 0x20, 0x64, 0x0c, 0x80, - 0x81, 0xa0, 0x1c, 0x03, 0x80, 0x60, - 0xa0, 0x68, 0x25, 0x04, 0xa0, 0x80, - 0x05, 0x41, 0x50, 0x2a, 0x05, 0x40, - 0x18, 0x90, 0xc2, 0x18, 0x43, 0x00, - 0xc2, 0x06, 0x80, 0xd0, 0x1a, 0x00, - 0x22, 0x98, 0x0b, 0x01, 0x60, 0x20, - 0x50, 0x45, 0x08, 0xa1, 0x14, 0x20 -}; - -const uint8_t kMaskRandom43_3[18] = { - 0xce, 0x32, 0xb6, 0x56, 0xca, 0xc0, - 0x55, 0xdc, 0x57, 0x8a, 0xf1, 0x40, - 0xa8, 0xed, 0x8d, 0xb1, 0xae, 0x20 -}; - -const uint8_t kMaskRandom43_30[180] = { - 0x46, 0x11, 0x92, 0x32, 0x46, 0x40, - 0x33, 0x0c, 0xc9, 0x99, 0x33, 0x20, - 0x10, 0xe4, 0x64, 0x8c, 0x91, 0x80, - 0x0c, 0x69, 0x0d, 0x21, 0xa4, 0x20, - 0x28, 0x94, 0x2a, 0x85, 0x50, 0xa0, - 0x94, 0x21, 0x34, 0x26, 0x84, 0xc0, - 0xc1, 0x02, 0x58, 0x4b, 0x09, 0x60, - 0x2c, 0x03, 0x20, 0x64, 0x0c, 0x80, - 0x81, 0xa0, 0x1c, 0x03, 0x80, 0x60, - 0xa0, 0x68, 0x25, 0x04, 0xa0, 0x80, - 0x05, 0x41, 0x50, 0x2a, 0x05, 0x40, - 0x18, 0x90, 0xc2, 0x18, 0x43, 0x00, - 0xc2, 0x06, 0x80, 0xd0, 0x1a, 0x00, - 0x22, 0x98, 0x0b, 0x01, 0x60, 0x20, - 0x50, 0x45, 0x08, 0xa1, 0x14, 0x20, - 0x46, 0x11, 0x92, 0x32, 0x46, 0x40, - 0x33, 0x0c, 0xc9, 0x99, 0x33, 0x20, - 0x10, 0xe4, 0x64, 0x8c, 0x91, 0x80, - 0x0c, 0x69, 0x0d, 0x21, 0xa4, 0x20, - 0x28, 0x94, 0x2a, 0x85, 0x50, 0xa0, - 0x94, 0x21, 0x34, 0x26, 0x84, 0xc0, - 0xc1, 0x02, 0x58, 0x4b, 0x09, 0x60, - 0x0e, 0x19, 0x13, 0x22, 0x64, 0x40, - 0x33, 0x14, 0x52, 0x8a, 0x51, 0x40, - 0x10, 0xc3, 0x28, 0x65, 0x0c, 0xa0, - 0x45, 0x68, 0x4d, 0x09, 0xa1, 0x20, - 0x88, 0x84, 0xa8, 0x95, 0x12, 0xa0, - 0xe0, 0x22, 0x94, 0x52, 0x8a, 0x40, - 0x4d, 0xd0, 0xc6, 0x36, 0x57, 0x40, - 0x79, 0x4a, 0x8f, 0x42, 0x79, 0x40 -}; - -const uint8_t kMaskRandom43_31[186] = { - 0x46, 0x11, 0x92, 0x32, 0x46, 0x40, - 0x33, 0x0c, 0xc9, 0x99, 0x33, 0x20, - 0x10, 0xe4, 0x64, 0x8c, 0x91, 0x80, - 0x0c, 0x69, 0x0d, 0x21, 0xa4, 0x20, - 0x28, 0x94, 0x2a, 0x85, 0x50, 0xa0, - 0x94, 0x21, 0x34, 0x26, 0x84, 0xc0, - 0xc1, 0x02, 0x58, 0x4b, 0x09, 0x60, - 0x2c, 0x03, 0x20, 0x64, 0x0c, 0x80, - 0x81, 0xa0, 0x1c, 0x03, 0x80, 0x60, - 0xa0, 0x68, 0x25, 0x04, 0xa0, 0x80, - 0x05, 0x41, 0x50, 0x2a, 0x05, 0x40, - 0x18, 0x90, 0xc2, 0x18, 0x43, 0x00, - 0xc2, 0x06, 0x80, 0xd0, 0x1a, 0x00, - 0x22, 0x98, 0x0b, 0x01, 0x60, 0x20, - 0x50, 0x45, 0x08, 0xa1, 0x14, 0x20, - 0x2c, 0x03, 0x20, 0x64, 0x0c, 0x80, - 0x81, 0xa0, 0x1c, 0x03, 0x80, 0x60, - 0xa0, 0x68, 0x25, 0x04, 0xa0, 0x80, - 0x05, 0x41, 0x50, 0x2a, 0x05, 0x40, - 0x18, 0x90, 0xc2, 0x18, 0x43, 0x00, - 0xc2, 0x06, 0x80, 0xd0, 0x1a, 0x00, - 0x22, 0x98, 0x0b, 0x01, 0x60, 0x20, - 0x50, 0x45, 0x08, 0xa1, 0x14, 0x20, - 0x46, 0x11, 0x92, 0x32, 0x46, 0x40, - 0x33, 0x0c, 0xc9, 0x99, 0x33, 0x20, - 0x10, 0xe4, 0x64, 0x8c, 0x91, 0x80, - 0x0c, 0x69, 0x0d, 0x21, 0xa4, 0x20, - 0x28, 0x94, 0x2a, 0x85, 0x50, 0xa0, - 0x94, 0x21, 0x34, 0x26, 0x84, 0xc0, - 0xc1, 0x02, 0x58, 0x4b, 0x09, 0x60, - 0x3b, 0xf5, 0x3c, 0x36, 0x0a, 0x20 -}; - -const uint8_t kMaskRandom43_32[192] = { - 0x2c, 0x03, 0x20, 0x64, 0x0c, 0x80, - 0x81, 0xa0, 0x1c, 0x03, 0x80, 0x60, - 0xa0, 0x68, 0x25, 0x04, 0xa0, 0x80, - 0x05, 0x41, 0x50, 0x2a, 0x05, 0x40, - 0x18, 0x90, 0xc2, 0x18, 0x43, 0x00, - 0xc2, 0x06, 0x80, 0xd0, 0x1a, 0x00, - 0x22, 0x98, 0x0b, 0x01, 0x60, 0x20, - 0x50, 0x45, 0x08, 0xa1, 0x14, 0x20, - 0x46, 0x11, 0x92, 0x32, 0x46, 0x40, - 0x33, 0x0c, 0xc9, 0x99, 0x33, 0x20, - 0x10, 0xe4, 0x64, 0x8c, 0x91, 0x80, - 0x0c, 0x69, 0x0d, 0x21, 0xa4, 0x20, - 0x28, 0x94, 0x2a, 0x85, 0x50, 0xa0, - 0x94, 0x21, 0x34, 0x26, 0x84, 0xc0, - 0xc1, 0x02, 0x58, 0x4b, 0x09, 0x60, - 0x3b, 0xf5, 0x3c, 0x36, 0x0a, 0x20, - 0x46, 0x11, 0x92, 0x32, 0x46, 0x40, - 0x33, 0x0c, 0xc9, 0x99, 0x33, 0x20, - 0x10, 0xe4, 0x64, 0x8c, 0x91, 0x80, - 0x0c, 0x69, 0x0d, 0x21, 0xa4, 0x20, - 0x28, 0x94, 0x2a, 0x85, 0x50, 0xa0, - 0x94, 0x21, 0x34, 0x26, 0x84, 0xc0, - 0xc1, 0x02, 0x58, 0x4b, 0x09, 0x60, - 0x2c, 0x03, 0x20, 0x64, 0x0c, 0x80, - 0x81, 0xa0, 0x1c, 0x03, 0x80, 0x60, - 0xa0, 0x68, 0x25, 0x04, 0xa0, 0x80, - 0x05, 0x41, 0x50, 0x2a, 0x05, 0x40, - 0x18, 0x90, 0xc2, 0x18, 0x43, 0x00, - 0xc2, 0x06, 0x80, 0xd0, 0x1a, 0x00, - 0x22, 0x98, 0x0b, 0x01, 0x60, 0x20, - 0x50, 0x45, 0x08, 0xa1, 0x14, 0x20, - 0xd1, 0xd1, 0x11, 0xa4, 0xed, 0xc0 -}; - -const uint8_t kMaskRandom43_33[198] = { - 0x2c, 0x03, 0x20, 0x64, 0x0c, 0x80, - 0x81, 0xa0, 0x1c, 0x03, 0x80, 0x60, - 0xa0, 0x68, 0x25, 0x04, 0xa0, 0x80, - 0x05, 0x41, 0x50, 0x2a, 0x05, 0x40, - 0x18, 0x90, 0xc2, 0x18, 0x43, 0x00, - 0xc2, 0x06, 0x80, 0xd0, 0x1a, 0x00, - 0x22, 0x98, 0x0b, 0x01, 0x60, 0x20, - 0x50, 0x45, 0x08, 0xa1, 0x14, 0x20, - 0x46, 0x11, 0x92, 0x32, 0x46, 0x40, - 0x33, 0x0c, 0xc9, 0x99, 0x33, 0x20, - 0x10, 0xe4, 0x64, 0x8c, 0x91, 0x80, - 0x0c, 0x69, 0x0d, 0x21, 0xa4, 0x20, - 0x28, 0x94, 0x2a, 0x85, 0x50, 0xa0, - 0x94, 0x21, 0x34, 0x26, 0x84, 0xc0, - 0xc1, 0x02, 0x58, 0x4b, 0x09, 0x60, - 0x3b, 0xf5, 0x3c, 0x36, 0x0a, 0x20, - 0x2c, 0x03, 0x20, 0x64, 0x0c, 0x80, - 0x81, 0xa0, 0x1c, 0x03, 0x80, 0x60, - 0xa0, 0x68, 0x25, 0x04, 0xa0, 0x80, - 0x05, 0x41, 0x50, 0x2a, 0x05, 0x40, - 0x18, 0x90, 0xc2, 0x18, 0x43, 0x00, - 0xc2, 0x06, 0x80, 0xd0, 0x1a, 0x00, - 0x22, 0x98, 0x0b, 0x01, 0x60, 0x20, - 0x50, 0x45, 0x08, 0xa1, 0x14, 0x20, - 0x4e, 0x11, 0x92, 0x32, 0x46, 0x40, - 0xe3, 0x18, 0x9b, 0x13, 0x62, 0x60, - 0x81, 0xe3, 0x04, 0x60, 0x8c, 0x00, - 0x21, 0x40, 0x58, 0x0b, 0x01, 0x60, - 0x52, 0x81, 0xe0, 0x3c, 0x07, 0x80, - 0xb4, 0x28, 0x25, 0x04, 0xa0, 0x80, - 0x26, 0x86, 0x28, 0xc5, 0x18, 0xa0, - 0x58, 0x64, 0x44, 0x88, 0x91, 0x00, - 0x19, 0x9e, 0x03, 0xc0, 0x78, 0x00 -}; - -const uint8_t kMaskRandom43_34[204] = { - 0x2c, 0x03, 0x20, 0x64, 0x0c, 0x80, - 0x81, 0xa0, 0x1c, 0x03, 0x80, 0x60, - 0xa0, 0x68, 0x25, 0x04, 0xa0, 0x80, - 0x05, 0x41, 0x50, 0x2a, 0x05, 0x40, - 0x18, 0x90, 0xc2, 0x18, 0x43, 0x00, - 0xc2, 0x06, 0x80, 0xd0, 0x1a, 0x00, - 0x22, 0x98, 0x0b, 0x01, 0x60, 0x20, - 0x50, 0x45, 0x08, 0xa1, 0x14, 0x20, - 0x4e, 0x11, 0x92, 0x32, 0x46, 0x40, - 0xe3, 0x18, 0x9b, 0x13, 0x62, 0x60, - 0x81, 0xe3, 0x04, 0x60, 0x8c, 0x00, - 0x21, 0x40, 0x58, 0x0b, 0x01, 0x60, - 0x52, 0x81, 0xe0, 0x3c, 0x07, 0x80, - 0xb4, 0x28, 0x25, 0x04, 0xa0, 0x80, - 0x26, 0x86, 0x28, 0xc5, 0x18, 0xa0, - 0x58, 0x64, 0x44, 0x88, 0x91, 0x00, - 0x19, 0x9e, 0x03, 0xc0, 0x78, 0x00, - 0x2c, 0x03, 0x20, 0x64, 0x0c, 0x80, - 0x81, 0xa0, 0x1c, 0x03, 0x80, 0x60, - 0xa0, 0x68, 0x25, 0x04, 0xa0, 0x80, - 0x05, 0x41, 0x50, 0x2a, 0x05, 0x40, - 0x18, 0x90, 0xc2, 0x18, 0x43, 0x00, - 0xc2, 0x06, 0x80, 0xd0, 0x1a, 0x00, - 0x22, 0x98, 0x0b, 0x01, 0x60, 0x20, - 0x50, 0x45, 0x08, 0xa1, 0x14, 0x20, - 0x46, 0x11, 0x92, 0x32, 0x46, 0x40, - 0x33, 0x0c, 0xc9, 0x99, 0x33, 0x20, - 0x10, 0xe4, 0x64, 0x8c, 0x91, 0x80, - 0x0c, 0x69, 0x0d, 0x21, 0xa4, 0x20, - 0x28, 0x94, 0x2a, 0x85, 0x50, 0xa0, - 0x94, 0x21, 0x34, 0x26, 0x84, 0xc0, - 0xc1, 0x02, 0x58, 0x4b, 0x09, 0x60, - 0x3b, 0xf5, 0x3c, 0x36, 0x0a, 0x20, - 0x76, 0x81, 0x4d, 0x33, 0x66, 0x00 -}; - -const uint8_t kMaskRandom43_35[210] = { - 0x2c, 0x03, 0x20, 0x64, 0x0c, 0x80, - 0x81, 0xa0, 0x1c, 0x03, 0x80, 0x60, - 0xa0, 0x68, 0x25, 0x04, 0xa0, 0x80, - 0x05, 0x41, 0x50, 0x2a, 0x05, 0x40, - 0x18, 0x90, 0xc2, 0x18, 0x43, 0x00, - 0xc2, 0x06, 0x80, 0xd0, 0x1a, 0x00, - 0x22, 0x98, 0x0b, 0x01, 0x60, 0x20, - 0x50, 0x45, 0x08, 0xa1, 0x14, 0x20, - 0x4e, 0x11, 0x92, 0x32, 0x46, 0x40, - 0xe3, 0x18, 0x9b, 0x13, 0x62, 0x60, - 0x81, 0xe3, 0x04, 0x60, 0x8c, 0x00, - 0x21, 0x40, 0x58, 0x0b, 0x01, 0x60, - 0x52, 0x81, 0xe0, 0x3c, 0x07, 0x80, - 0xb4, 0x28, 0x25, 0x04, 0xa0, 0x80, - 0x26, 0x86, 0x28, 0xc5, 0x18, 0xa0, - 0x58, 0x64, 0x44, 0x88, 0x91, 0x00, - 0x19, 0x9e, 0x03, 0xc0, 0x78, 0x00, - 0x4e, 0x11, 0x92, 0x32, 0x46, 0x40, - 0xe3, 0x18, 0x9b, 0x13, 0x62, 0x60, - 0x81, 0xe3, 0x04, 0x60, 0x8c, 0x00, - 0x21, 0x40, 0x58, 0x0b, 0x01, 0x60, - 0x52, 0x81, 0xe0, 0x3c, 0x07, 0x80, - 0xb4, 0x28, 0x25, 0x04, 0xa0, 0x80, - 0x26, 0x86, 0x28, 0xc5, 0x18, 0xa0, - 0x58, 0x64, 0x44, 0x88, 0x91, 0x00, - 0x19, 0x9e, 0x03, 0xc0, 0x78, 0x00, - 0x2c, 0x03, 0x20, 0x64, 0x0c, 0x80, - 0x81, 0xa0, 0x1c, 0x03, 0x80, 0x60, - 0xa0, 0x68, 0x25, 0x04, 0xa0, 0x80, - 0x05, 0x41, 0x50, 0x2a, 0x05, 0x40, - 0x18, 0x90, 0xc2, 0x18, 0x43, 0x00, - 0xc2, 0x06, 0x80, 0xd0, 0x1a, 0x00, - 0x22, 0x98, 0x0b, 0x01, 0x60, 0x20, - 0x50, 0x45, 0x08, 0xa1, 0x14, 0x20, - 0x5a, 0x56, 0x5f, 0x26, 0xa3, 0x60 -}; - -const uint8_t kMaskRandom43_36[216] = { - 0x4e, 0x11, 0x92, 0x32, 0x46, 0x40, - 0xe3, 0x18, 0x9b, 0x13, 0x62, 0x60, - 0x81, 0xe3, 0x04, 0x60, 0x8c, 0x00, - 0x21, 0x40, 0x58, 0x0b, 0x01, 0x60, - 0x52, 0x81, 0xe0, 0x3c, 0x07, 0x80, - 0xb4, 0x28, 0x25, 0x04, 0xa0, 0x80, - 0x26, 0x86, 0x28, 0xc5, 0x18, 0xa0, - 0x58, 0x64, 0x44, 0x88, 0x91, 0x00, - 0x19, 0x9e, 0x03, 0xc0, 0x78, 0x00, - 0x2c, 0x03, 0x20, 0x64, 0x0c, 0x80, - 0x81, 0xa0, 0x1c, 0x03, 0x80, 0x60, - 0xa0, 0x68, 0x25, 0x04, 0xa0, 0x80, - 0x05, 0x41, 0x50, 0x2a, 0x05, 0x40, - 0x18, 0x90, 0xc2, 0x18, 0x43, 0x00, - 0xc2, 0x06, 0x80, 0xd0, 0x1a, 0x00, - 0x22, 0x98, 0x0b, 0x01, 0x60, 0x20, - 0x50, 0x45, 0x08, 0xa1, 0x14, 0x20, - 0x5a, 0x56, 0x5f, 0x26, 0xa3, 0x60, - 0x2c, 0x03, 0x20, 0x64, 0x0c, 0x80, - 0x81, 0xa0, 0x1c, 0x03, 0x80, 0x60, - 0xa0, 0x68, 0x25, 0x04, 0xa0, 0x80, - 0x05, 0x41, 0x50, 0x2a, 0x05, 0x40, - 0x18, 0x90, 0xc2, 0x18, 0x43, 0x00, - 0xc2, 0x06, 0x80, 0xd0, 0x1a, 0x00, - 0x22, 0x98, 0x0b, 0x01, 0x60, 0x20, - 0x50, 0x45, 0x08, 0xa1, 0x14, 0x20, - 0x4e, 0x11, 0x92, 0x32, 0x46, 0x40, - 0xe3, 0x18, 0x9b, 0x13, 0x62, 0x60, - 0x81, 0xe3, 0x04, 0x60, 0x8c, 0x00, - 0x21, 0x40, 0x58, 0x0b, 0x01, 0x60, - 0x52, 0x81, 0xe0, 0x3c, 0x07, 0x80, - 0xb4, 0x28, 0x25, 0x04, 0xa0, 0x80, - 0x26, 0x86, 0x28, 0xc5, 0x18, 0xa0, - 0x58, 0x64, 0x44, 0x88, 0x91, 0x00, - 0x19, 0x9e, 0x03, 0xc0, 0x78, 0x00, - 0xa3, 0x85, 0x0a, 0xb5, 0x11, 0x60 -}; - -const uint8_t kMaskRandom43_37[222] = { - 0x4e, 0x11, 0x92, 0x32, 0x46, 0x40, - 0xe3, 0x18, 0x9b, 0x13, 0x62, 0x60, - 0x81, 0xe3, 0x04, 0x60, 0x8c, 0x00, - 0x21, 0x40, 0x58, 0x0b, 0x01, 0x60, - 0x52, 0x81, 0xe0, 0x3c, 0x07, 0x80, - 0xb4, 0x28, 0x25, 0x04, 0xa0, 0x80, - 0x26, 0x86, 0x28, 0xc5, 0x18, 0xa0, - 0x58, 0x64, 0x44, 0x88, 0x91, 0x00, - 0x19, 0x9e, 0x03, 0xc0, 0x78, 0x00, - 0x2c, 0x03, 0x20, 0x64, 0x0c, 0x80, - 0x81, 0xa0, 0x1c, 0x03, 0x80, 0x60, - 0xa0, 0x68, 0x25, 0x04, 0xa0, 0x80, - 0x05, 0x41, 0x50, 0x2a, 0x05, 0x40, - 0x18, 0x90, 0xc2, 0x18, 0x43, 0x00, - 0xc2, 0x06, 0x80, 0xd0, 0x1a, 0x00, - 0x22, 0x98, 0x0b, 0x01, 0x60, 0x20, - 0x50, 0x45, 0x08, 0xa1, 0x14, 0x20, - 0x5a, 0x56, 0x5f, 0x26, 0xa3, 0x60, - 0x4e, 0x11, 0x92, 0x32, 0x46, 0x40, - 0xe3, 0x18, 0x9b, 0x13, 0x62, 0x60, - 0x81, 0xe3, 0x04, 0x60, 0x8c, 0x00, - 0x21, 0x40, 0x58, 0x0b, 0x01, 0x60, - 0x52, 0x81, 0xe0, 0x3c, 0x07, 0x80, - 0xb4, 0x28, 0x25, 0x04, 0xa0, 0x80, - 0x26, 0x86, 0x28, 0xc5, 0x18, 0xa0, - 0x58, 0x64, 0x44, 0x88, 0x91, 0x00, - 0x19, 0x9e, 0x03, 0xc0, 0x78, 0x00, - 0x4c, 0x19, 0x13, 0x22, 0x64, 0x40, - 0x51, 0x14, 0x52, 0x8a, 0x51, 0x40, - 0xa0, 0x6a, 0x45, 0x48, 0xa9, 0x00, - 0x04, 0xc1, 0x30, 0x26, 0x04, 0xc0, - 0x03, 0xb4, 0x06, 0x80, 0xd0, 0x00, - 0x86, 0x20, 0x94, 0x12, 0x82, 0x40, - 0x29, 0x08, 0x49, 0x09, 0x21, 0x20, - 0x42, 0x43, 0x08, 0x61, 0x0c, 0x20, - 0x98, 0x12, 0x82, 0x50, 0x4a, 0x00, - 0x30, 0x84, 0xa8, 0x95, 0x12, 0xa0 -}; - -const uint8_t kMaskRandom43_38[228] = { - 0x4e, 0x11, 0x92, 0x32, 0x46, 0x40, - 0xe3, 0x18, 0x9b, 0x13, 0x62, 0x60, - 0x81, 0xe3, 0x04, 0x60, 0x8c, 0x00, - 0x21, 0x40, 0x58, 0x0b, 0x01, 0x60, - 0x52, 0x81, 0xe0, 0x3c, 0x07, 0x80, - 0xb4, 0x28, 0x25, 0x04, 0xa0, 0x80, - 0x26, 0x86, 0x28, 0xc5, 0x18, 0xa0, - 0x58, 0x64, 0x44, 0x88, 0x91, 0x00, - 0x19, 0x9e, 0x03, 0xc0, 0x78, 0x00, - 0x4c, 0x19, 0x13, 0x22, 0x64, 0x40, - 0x51, 0x14, 0x52, 0x8a, 0x51, 0x40, - 0xa0, 0x6a, 0x45, 0x48, 0xa9, 0x00, - 0x04, 0xc1, 0x30, 0x26, 0x04, 0xc0, - 0x03, 0xb4, 0x06, 0x80, 0xd0, 0x00, - 0x86, 0x20, 0x94, 0x12, 0x82, 0x40, - 0x29, 0x08, 0x49, 0x09, 0x21, 0x20, - 0x42, 0x43, 0x08, 0x61, 0x0c, 0x20, - 0x98, 0x12, 0x82, 0x50, 0x4a, 0x00, - 0x30, 0x84, 0xa8, 0x95, 0x12, 0xa0, - 0x4e, 0x11, 0x92, 0x32, 0x46, 0x40, - 0xe3, 0x18, 0x9b, 0x13, 0x62, 0x60, - 0x81, 0xe3, 0x04, 0x60, 0x8c, 0x00, - 0x21, 0x40, 0x58, 0x0b, 0x01, 0x60, - 0x52, 0x81, 0xe0, 0x3c, 0x07, 0x80, - 0xb4, 0x28, 0x25, 0x04, 0xa0, 0x80, - 0x26, 0x86, 0x28, 0xc5, 0x18, 0xa0, - 0x58, 0x64, 0x44, 0x88, 0x91, 0x00, - 0x19, 0x9e, 0x03, 0xc0, 0x78, 0x00, - 0x2c, 0x03, 0x20, 0x64, 0x0c, 0x80, - 0x81, 0xa0, 0x1c, 0x03, 0x80, 0x60, - 0xa0, 0x68, 0x25, 0x04, 0xa0, 0x80, - 0x05, 0x41, 0x50, 0x2a, 0x05, 0x40, - 0x18, 0x90, 0xc2, 0x18, 0x43, 0x00, - 0xc2, 0x06, 0x80, 0xd0, 0x1a, 0x00, - 0x22, 0x98, 0x0b, 0x01, 0x60, 0x20, - 0x50, 0x45, 0x08, 0xa1, 0x14, 0x20, - 0x5a, 0x56, 0x5f, 0x26, 0xa3, 0x60, - 0x9a, 0x16, 0x97, 0x21, 0xb9, 0x80 -}; - -const uint8_t kMaskRandom43_39[234] = { - 0x4e, 0x11, 0x92, 0x32, 0x46, 0x40, - 0xe3, 0x18, 0x9b, 0x13, 0x62, 0x60, - 0x81, 0xe3, 0x04, 0x60, 0x8c, 0x00, - 0x21, 0x40, 0x58, 0x0b, 0x01, 0x60, - 0x52, 0x81, 0xe0, 0x3c, 0x07, 0x80, - 0xb4, 0x28, 0x25, 0x04, 0xa0, 0x80, - 0x26, 0x86, 0x28, 0xc5, 0x18, 0xa0, - 0x58, 0x64, 0x44, 0x88, 0x91, 0x00, - 0x19, 0x9e, 0x03, 0xc0, 0x78, 0x00, - 0x4c, 0x19, 0x13, 0x22, 0x64, 0x40, - 0x51, 0x14, 0x52, 0x8a, 0x51, 0x40, - 0xa0, 0x6a, 0x45, 0x48, 0xa9, 0x00, - 0x04, 0xc1, 0x30, 0x26, 0x04, 0xc0, - 0x03, 0xb4, 0x06, 0x80, 0xd0, 0x00, - 0x86, 0x20, 0x94, 0x12, 0x82, 0x40, - 0x29, 0x08, 0x49, 0x09, 0x21, 0x20, - 0x42, 0x43, 0x08, 0x61, 0x0c, 0x20, - 0x98, 0x12, 0x82, 0x50, 0x4a, 0x00, - 0x30, 0x84, 0xa8, 0x95, 0x12, 0xa0, - 0x4c, 0x19, 0x13, 0x22, 0x64, 0x40, - 0x51, 0x14, 0x52, 0x8a, 0x51, 0x40, - 0xa0, 0x6a, 0x45, 0x48, 0xa9, 0x00, - 0x04, 0xc1, 0x30, 0x26, 0x04, 0xc0, - 0x03, 0xb4, 0x06, 0x80, 0xd0, 0x00, - 0x86, 0x20, 0x94, 0x12, 0x82, 0x40, - 0x29, 0x08, 0x49, 0x09, 0x21, 0x20, - 0x42, 0x43, 0x08, 0x61, 0x0c, 0x20, - 0x98, 0x12, 0x82, 0x50, 0x4a, 0x00, - 0x30, 0x84, 0xa8, 0x95, 0x12, 0xa0, - 0x4e, 0x11, 0x92, 0x32, 0x46, 0x40, - 0xe3, 0x18, 0x9b, 0x13, 0x62, 0x60, - 0x81, 0xe3, 0x04, 0x60, 0x8c, 0x00, - 0x21, 0x40, 0x58, 0x0b, 0x01, 0x60, - 0x52, 0x81, 0xe0, 0x3c, 0x07, 0x80, - 0xb4, 0x28, 0x25, 0x04, 0xa0, 0x80, - 0x26, 0x86, 0x28, 0xc5, 0x18, 0xa0, - 0x58, 0x64, 0x44, 0x88, 0x91, 0x00, - 0x19, 0x9e, 0x03, 0xc0, 0x78, 0x00, - 0x2a, 0x03, 0x31, 0xda, 0x46, 0x20 -}; - -const uint8_t kMaskRandom43_4[24] = { - 0xe6, 0x31, 0x36, 0x26, 0xc4, 0xc0, - 0x33, 0x8c, 0x59, 0x8b, 0x31, 0x60, - 0x98, 0xd2, 0xca, 0x59, 0x4b, 0x20, - 0x2d, 0x4b, 0x29, 0x65, 0x2c, 0xa0 -}; - -const uint8_t kMaskRandom43_40[240] = { - 0x4c, 0x19, 0x13, 0x22, 0x64, 0x40, - 0x51, 0x14, 0x52, 0x8a, 0x51, 0x40, - 0xa0, 0x6a, 0x45, 0x48, 0xa9, 0x00, - 0x04, 0xc1, 0x30, 0x26, 0x04, 0xc0, - 0x03, 0xb4, 0x06, 0x80, 0xd0, 0x00, - 0x86, 0x20, 0x94, 0x12, 0x82, 0x40, - 0x29, 0x08, 0x49, 0x09, 0x21, 0x20, - 0x42, 0x43, 0x08, 0x61, 0x0c, 0x20, - 0x98, 0x12, 0x82, 0x50, 0x4a, 0x00, - 0x30, 0x84, 0xa8, 0x95, 0x12, 0xa0, - 0x4e, 0x11, 0x92, 0x32, 0x46, 0x40, - 0xe3, 0x18, 0x9b, 0x13, 0x62, 0x60, - 0x81, 0xe3, 0x04, 0x60, 0x8c, 0x00, - 0x21, 0x40, 0x58, 0x0b, 0x01, 0x60, - 0x52, 0x81, 0xe0, 0x3c, 0x07, 0x80, - 0xb4, 0x28, 0x25, 0x04, 0xa0, 0x80, - 0x26, 0x86, 0x28, 0xc5, 0x18, 0xa0, - 0x58, 0x64, 0x44, 0x88, 0x91, 0x00, - 0x19, 0x9e, 0x03, 0xc0, 0x78, 0x00, - 0x2a, 0x03, 0x31, 0xda, 0x46, 0x20, - 0x4e, 0x11, 0x92, 0x32, 0x46, 0x40, - 0xe3, 0x18, 0x9b, 0x13, 0x62, 0x60, - 0x81, 0xe3, 0x04, 0x60, 0x8c, 0x00, - 0x21, 0x40, 0x58, 0x0b, 0x01, 0x60, - 0x52, 0x81, 0xe0, 0x3c, 0x07, 0x80, - 0xb4, 0x28, 0x25, 0x04, 0xa0, 0x80, - 0x26, 0x86, 0x28, 0xc5, 0x18, 0xa0, - 0x58, 0x64, 0x44, 0x88, 0x91, 0x00, - 0x19, 0x9e, 0x03, 0xc0, 0x78, 0x00, - 0x4c, 0x19, 0x13, 0x22, 0x64, 0x40, - 0x51, 0x14, 0x52, 0x8a, 0x51, 0x40, - 0xa0, 0x6a, 0x45, 0x48, 0xa9, 0x00, - 0x04, 0xc1, 0x30, 0x26, 0x04, 0xc0, - 0x03, 0xb4, 0x06, 0x80, 0xd0, 0x00, - 0x86, 0x20, 0x94, 0x12, 0x82, 0x40, - 0x29, 0x08, 0x49, 0x09, 0x21, 0x20, - 0x42, 0x43, 0x08, 0x61, 0x0c, 0x20, - 0x98, 0x12, 0x82, 0x50, 0x4a, 0x00, - 0x30, 0x84, 0xa8, 0x95, 0x12, 0xa0, - 0x3a, 0xab, 0x77, 0x63, 0xef, 0x60 -}; - -const uint8_t kMaskRandom43_41[246] = { - 0x4c, 0x19, 0x13, 0x22, 0x64, 0x40, - 0x51, 0x14, 0x52, 0x8a, 0x51, 0x40, - 0xa0, 0x6a, 0x45, 0x48, 0xa9, 0x00, - 0x04, 0xc1, 0x30, 0x26, 0x04, 0xc0, - 0x03, 0xb4, 0x06, 0x80, 0xd0, 0x00, - 0x86, 0x20, 0x94, 0x12, 0x82, 0x40, - 0x29, 0x08, 0x49, 0x09, 0x21, 0x20, - 0x42, 0x43, 0x08, 0x61, 0x0c, 0x20, - 0x98, 0x12, 0x82, 0x50, 0x4a, 0x00, - 0x30, 0x84, 0xa8, 0x95, 0x12, 0xa0, - 0x4e, 0x11, 0x92, 0x32, 0x46, 0x40, - 0xe3, 0x18, 0x9b, 0x13, 0x62, 0x60, - 0x81, 0xe3, 0x04, 0x60, 0x8c, 0x00, - 0x21, 0x40, 0x58, 0x0b, 0x01, 0x60, - 0x52, 0x81, 0xe0, 0x3c, 0x07, 0x80, - 0xb4, 0x28, 0x25, 0x04, 0xa0, 0x80, - 0x26, 0x86, 0x28, 0xc5, 0x18, 0xa0, - 0x58, 0x64, 0x44, 0x88, 0x91, 0x00, - 0x19, 0x9e, 0x03, 0xc0, 0x78, 0x00, - 0x2a, 0x03, 0x31, 0xda, 0x46, 0x20, - 0x4c, 0x19, 0x13, 0x22, 0x64, 0x40, - 0x51, 0x14, 0x52, 0x8a, 0x51, 0x40, - 0xa0, 0x6a, 0x45, 0x48, 0xa9, 0x00, - 0x04, 0xc1, 0x30, 0x26, 0x04, 0xc0, - 0x03, 0xb4, 0x06, 0x80, 0xd0, 0x00, - 0x86, 0x20, 0x94, 0x12, 0x82, 0x40, - 0x29, 0x08, 0x49, 0x09, 0x21, 0x20, - 0x42, 0x43, 0x08, 0x61, 0x0c, 0x20, - 0x98, 0x12, 0x82, 0x50, 0x4a, 0x00, - 0x30, 0x84, 0xa8, 0x95, 0x12, 0xa0, - 0x4c, 0x11, 0x92, 0x32, 0x46, 0x40, - 0x51, 0x0c, 0xc9, 0x99, 0x33, 0x20, - 0xa0, 0x66, 0x44, 0xc8, 0x99, 0x00, - 0x04, 0xc1, 0x60, 0x2c, 0x05, 0x80, - 0x03, 0xa0, 0x2c, 0x05, 0x80, 0xa0, - 0x86, 0x21, 0x14, 0x22, 0x84, 0x40, - 0x29, 0x10, 0x1a, 0x03, 0x40, 0x60, - 0x42, 0x42, 0xa0, 0x54, 0x0a, 0x80, - 0x98, 0x1a, 0x03, 0x40, 0x68, 0x00, - 0x30, 0x84, 0x08, 0x81, 0x10, 0x20, - 0xdf, 0x4c, 0x11, 0x82, 0x30, 0x40 -}; - -const uint8_t kMaskRandom43_42[252] = { - 0x4c, 0x19, 0x13, 0x22, 0x64, 0x40, - 0x51, 0x14, 0x52, 0x8a, 0x51, 0x40, - 0xa0, 0x6a, 0x45, 0x48, 0xa9, 0x00, - 0x04, 0xc1, 0x30, 0x26, 0x04, 0xc0, - 0x03, 0xb4, 0x06, 0x80, 0xd0, 0x00, - 0x86, 0x20, 0x94, 0x12, 0x82, 0x40, - 0x29, 0x08, 0x49, 0x09, 0x21, 0x20, - 0x42, 0x43, 0x08, 0x61, 0x0c, 0x20, - 0x98, 0x12, 0x82, 0x50, 0x4a, 0x00, - 0x30, 0x84, 0xa8, 0x95, 0x12, 0xa0, - 0x4c, 0x11, 0x92, 0x32, 0x46, 0x40, - 0x51, 0x0c, 0xc9, 0x99, 0x33, 0x20, - 0xa0, 0x66, 0x44, 0xc8, 0x99, 0x00, - 0x04, 0xc1, 0x60, 0x2c, 0x05, 0x80, - 0x03, 0xa0, 0x2c, 0x05, 0x80, 0xa0, - 0x86, 0x21, 0x14, 0x22, 0x84, 0x40, - 0x29, 0x10, 0x1a, 0x03, 0x40, 0x60, - 0x42, 0x42, 0xa0, 0x54, 0x0a, 0x80, - 0x98, 0x1a, 0x03, 0x40, 0x68, 0x00, - 0x30, 0x84, 0x08, 0x81, 0x10, 0x20, - 0xdf, 0x4c, 0x11, 0x82, 0x30, 0x40, - 0x4c, 0x19, 0x13, 0x22, 0x64, 0x40, - 0x51, 0x14, 0x52, 0x8a, 0x51, 0x40, - 0xa0, 0x6a, 0x45, 0x48, 0xa9, 0x00, - 0x04, 0xc1, 0x30, 0x26, 0x04, 0xc0, - 0x03, 0xb4, 0x06, 0x80, 0xd0, 0x00, - 0x86, 0x20, 0x94, 0x12, 0x82, 0x40, - 0x29, 0x08, 0x49, 0x09, 0x21, 0x20, - 0x42, 0x43, 0x08, 0x61, 0x0c, 0x20, - 0x98, 0x12, 0x82, 0x50, 0x4a, 0x00, - 0x30, 0x84, 0xa8, 0x95, 0x12, 0xa0, - 0x4e, 0x11, 0x92, 0x32, 0x46, 0x40, - 0xe3, 0x18, 0x9b, 0x13, 0x62, 0x60, - 0x81, 0xe3, 0x04, 0x60, 0x8c, 0x00, - 0x21, 0x40, 0x58, 0x0b, 0x01, 0x60, - 0x52, 0x81, 0xe0, 0x3c, 0x07, 0x80, - 0xb4, 0x28, 0x25, 0x04, 0xa0, 0x80, - 0x26, 0x86, 0x28, 0xc5, 0x18, 0xa0, - 0x58, 0x64, 0x44, 0x88, 0x91, 0x00, - 0x19, 0x9e, 0x03, 0xc0, 0x78, 0x00, - 0x2a, 0x03, 0x31, 0xda, 0x46, 0x20, - 0x26, 0x84, 0x10, 0xcd, 0xf7, 0x60 -}; - -const uint8_t kMaskRandom43_43[258] = { - 0x4c, 0x19, 0x13, 0x22, 0x64, 0x40, - 0x51, 0x14, 0x52, 0x8a, 0x51, 0x40, - 0xa0, 0x6a, 0x45, 0x48, 0xa9, 0x00, - 0x04, 0xc1, 0x30, 0x26, 0x04, 0xc0, - 0x03, 0xb4, 0x06, 0x80, 0xd0, 0x00, - 0x86, 0x20, 0x94, 0x12, 0x82, 0x40, - 0x29, 0x08, 0x49, 0x09, 0x21, 0x20, - 0x42, 0x43, 0x08, 0x61, 0x0c, 0x20, - 0x98, 0x12, 0x82, 0x50, 0x4a, 0x00, - 0x30, 0x84, 0xa8, 0x95, 0x12, 0xa0, - 0x4c, 0x11, 0x92, 0x32, 0x46, 0x40, - 0x51, 0x0c, 0xc9, 0x99, 0x33, 0x20, - 0xa0, 0x66, 0x44, 0xc8, 0x99, 0x00, - 0x04, 0xc1, 0x60, 0x2c, 0x05, 0x80, - 0x03, 0xa0, 0x2c, 0x05, 0x80, 0xa0, - 0x86, 0x21, 0x14, 0x22, 0x84, 0x40, - 0x29, 0x10, 0x1a, 0x03, 0x40, 0x60, - 0x42, 0x42, 0xa0, 0x54, 0x0a, 0x80, - 0x98, 0x1a, 0x03, 0x40, 0x68, 0x00, - 0x30, 0x84, 0x08, 0x81, 0x10, 0x20, - 0xdf, 0x4c, 0x11, 0x82, 0x30, 0x40, - 0x4c, 0x19, 0x12, 0x32, 0x46, 0x40, - 0x51, 0x14, 0x51, 0x99, 0x33, 0x20, - 0xa0, 0x6a, 0x44, 0xc8, 0x99, 0x00, - 0x04, 0xc1, 0x30, 0x2c, 0x05, 0x80, - 0x03, 0xb4, 0x04, 0x05, 0x80, 0xa0, - 0x86, 0x20, 0x94, 0x22, 0x84, 0x40, - 0x29, 0x08, 0x4a, 0x03, 0x40, 0x60, - 0x42, 0x43, 0x08, 0x54, 0x0a, 0x80, - 0x98, 0x12, 0x83, 0x40, 0x68, 0x00, - 0x30, 0x84, 0xa8, 0x81, 0x10, 0x20, - 0x4c, 0x11, 0x91, 0x82, 0x30, 0x40, - 0x51, 0x0c, 0xcb, 0x22, 0x64, 0x40, - 0xa0, 0x66, 0x42, 0x8a, 0x51, 0x40, - 0x04, 0xc1, 0x65, 0x48, 0xa9, 0x00, - 0x03, 0xa0, 0x28, 0x26, 0x04, 0xc0, - 0x86, 0x21, 0x16, 0x80, 0xd0, 0x00, - 0x29, 0x10, 0x1c, 0x12, 0x82, 0x40, - 0x42, 0x42, 0xa1, 0x09, 0x21, 0x20, - 0x98, 0x1a, 0x00, 0x61, 0x0c, 0x20, - 0x30, 0x84, 0x0a, 0x50, 0x4a, 0x00, - 0xdf, 0x4c, 0x10, 0x95, 0x12, 0xa0, - 0x72, 0x06, 0x94, 0xf6, 0x74, 0x40 -}; - -const uint8_t kMaskRandom43_5[30] = { - 0xce, 0x31, 0xb6, 0x36, 0xc6, 0xc0, - 0x63, 0x98, 0xdb, 0x1b, 0x63, 0x60, - 0x98, 0xc7, 0x68, 0xed, 0x1d, 0xa0, - 0x4d, 0x6b, 0x55, 0x6a, 0xad, 0x40, - 0xb2, 0x6c, 0xad, 0x95, 0xb2, 0xa0 -}; - -const uint8_t kMaskRandom43_6[36] = { - 0x4c, 0x19, 0x13, 0x22, 0x64, 0x40, - 0x51, 0x14, 0x52, 0x8a, 0x51, 0x40, - 0x20, 0xea, 0x0d, 0x41, 0xa8, 0x20, - 0x85, 0x41, 0x2e, 0x25, 0x04, 0xa0, - 0x06, 0x80, 0xd8, 0x1b, 0x03, 0x60, - 0x8a, 0x24, 0x34, 0x86, 0x90, 0xc0 -}; - -const uint8_t kMaskRandom43_7[42] = { - 0xc6, 0x11, 0x96, 0x32, 0x46, 0x40, - 0x33, 0x04, 0xc8, 0x99, 0x33, 0x20, - 0x18, 0x67, 0x44, 0x68, 0x9d, 0x00, - 0x45, 0x42, 0xd4, 0x5a, 0x0b, 0x40, - 0x12, 0xd4, 0x2a, 0x95, 0x50, 0xa0, - 0xb4, 0x28, 0x35, 0x16, 0xa0, 0xc0, - 0x29, 0x92, 0x1b, 0x0d, 0x41, 0x60 -}; - -const uint8_t kMaskRandom43_8[48] = { - 0x07, 0x0a, 0x71, 0x44, 0x29, 0xc0, - 0x49, 0xa8, 0x29, 0x0f, 0xa0, 0x20, - 0xb0, 0x7a, 0x07, 0x48, 0xe8, 0x00, - 0x24, 0xc5, 0xc0, 0xb8, 0x17, 0x00, - 0x52, 0x80, 0xec, 0x1d, 0x02, 0xa0, - 0xc6, 0x31, 0x82, 0x30, 0xc7, 0x40, - 0x31, 0x94, 0x1a, 0x83, 0x50, 0x60, - 0x18, 0xc7, 0x08, 0xe1, 0x1c, 0x20 -}; - -const uint8_t kMaskRandom43_9[54] = { - 0x4e, 0x11, 0x12, 0x22, 0x46, 0x40, - 0x62, 0x1a, 0x09, 0x41, 0x68, 0x60, - 0x80, 0xe9, 0x41, 0x28, 0xa5, 0x00, - 0xa1, 0x50, 0x52, 0xc8, 0x51, 0x00, - 0x53, 0x00, 0x68, 0x1d, 0x01, 0xa0, - 0xa4, 0x24, 0x36, 0x06, 0x80, 0xc0, - 0x16, 0xa0, 0x8d, 0x11, 0x82, 0x20, - 0x58, 0x45, 0x20, 0xa4, 0x16, 0x80, - 0x29, 0x86, 0x84, 0xd0, 0x1c, 0x00 -}; - -const uint8_t kMaskRandom44_1[6] = { - 0xff, 0xff, 0xff, 0xff, 0xff, 0xf0 -}; - -const uint8_t kMaskRandom44_10[60] = { - 0xc0, 0x38, 0x8b, 0x00, 0xe2, 0x20, - 0x30, 0x0e, 0x28, 0xc0, 0x38, 0xa0, - 0xe8, 0x07, 0x03, 0xa0, 0x1c, 0x00, - 0x85, 0x08, 0xaa, 0x14, 0x22, 0xa0, - 0xd0, 0x92, 0x13, 0x42, 0x48, 0x40, - 0x86, 0x50, 0x4a, 0x19, 0x41, 0x20, - 0x4a, 0x68, 0x0d, 0x29, 0xa0, 0x30, - 0x01, 0xa0, 0x74, 0x06, 0x81, 0xd0, - 0x4c, 0x81, 0x91, 0x32, 0x06, 0x40, - 0x62, 0x24, 0x05, 0x88, 0x90, 0x10 -}; - -const uint8_t kMaskRandom44_11[66] = { - 0x46, 0x48, 0xc9, 0x19, 0x23, 0x20, - 0x33, 0x26, 0x64, 0xcc, 0x99, 0x90, - 0x99, 0x13, 0x22, 0x64, 0x4c, 0x80, - 0x05, 0x80, 0xb0, 0x16, 0x02, 0xc0, - 0x80, 0xb0, 0x16, 0x02, 0xc0, 0x50, - 0x84, 0x50, 0x8a, 0x11, 0x42, 0x20, - 0x40, 0x68, 0x0d, 0x01, 0xa0, 0x30, - 0x0a, 0x81, 0x50, 0x2a, 0x05, 0x40, - 0x68, 0x0d, 0x01, 0xa0, 0x34, 0x00, - 0x10, 0x22, 0x04, 0x40, 0x88, 0x10, - 0x30, 0x46, 0x08, 0xc1, 0x18, 0x20 -}; - -const uint8_t kMaskRandom44_12[72] = { - 0x64, 0x4c, 0x89, 0x91, 0x32, 0x20, - 0x51, 0x4a, 0x29, 0x45, 0x28, 0xa0, - 0x0c, 0xa1, 0x94, 0x32, 0x86, 0x50, - 0xa1, 0x34, 0x26, 0x84, 0xd0, 0x90, - 0x12, 0xa2, 0x54, 0x4a, 0x89, 0x50, - 0x8a, 0x51, 0x4a, 0x29, 0x45, 0x20, - 0x86, 0x90, 0xd2, 0x1a, 0x43, 0x40, - 0x23, 0x24, 0x64, 0x8c, 0x91, 0x90, - 0x16, 0x22, 0xc4, 0x58, 0x8b, 0x10, - 0x4c, 0x29, 0x85, 0x30, 0xa6, 0x10, - 0x41, 0xc8, 0x39, 0x07, 0x20, 0xe0, - 0xf4, 0x18, 0x9f, 0xd0, 0x62, 0x70 -}; - -const uint8_t kMaskRandom44_13[78] = { - 0x64, 0x4c, 0x89, 0x91, 0x32, 0x20, - 0x51, 0x4a, 0x29, 0x45, 0x28, 0xa0, - 0x0c, 0xa1, 0x94, 0x32, 0x86, 0x50, - 0xa1, 0x34, 0x26, 0x84, 0xd0, 0x90, - 0x12, 0xa2, 0x54, 0x4a, 0x89, 0x50, - 0x8a, 0x51, 0x4a, 0x29, 0x45, 0x20, - 0x46, 0x48, 0xc9, 0x19, 0x23, 0x20, - 0x33, 0x26, 0x64, 0xcc, 0x99, 0x90, - 0x91, 0x92, 0x32, 0x46, 0x48, 0xc0, - 0xa4, 0x34, 0x86, 0x90, 0xd2, 0x10, - 0x50, 0xaa, 0x15, 0x42, 0xa8, 0x50, - 0x84, 0xd0, 0x9a, 0x13, 0x42, 0x60, - 0x09, 0x61, 0x2c, 0x25, 0x84, 0xb0 -}; - -const uint8_t kMaskRandom44_14[84] = { - 0x46, 0x48, 0xc9, 0x19, 0x23, 0x20, - 0x33, 0x26, 0x64, 0xcc, 0x99, 0x90, - 0x91, 0x92, 0x32, 0x46, 0x48, 0xc0, - 0xa4, 0x34, 0x86, 0x90, 0xd2, 0x10, - 0x50, 0xaa, 0x15, 0x42, 0xa8, 0x50, - 0x84, 0xd0, 0x9a, 0x13, 0x42, 0x60, - 0x09, 0x61, 0x2c, 0x25, 0x84, 0xb0, - 0x64, 0x4c, 0x89, 0x91, 0x32, 0x20, - 0x51, 0x4a, 0x29, 0x45, 0x28, 0xa0, - 0x0c, 0xa1, 0x94, 0x32, 0x86, 0x50, - 0xa1, 0x34, 0x26, 0x84, 0xd0, 0x90, - 0x12, 0xa2, 0x54, 0x4a, 0x89, 0x50, - 0x8a, 0x51, 0x4a, 0x29, 0x45, 0x20, - 0xc6, 0xca, 0xeb, 0x1b, 0x2b, 0xa0 -}; - -const uint8_t kMaskRandom44_15[90] = { - 0x46, 0x48, 0xc9, 0x19, 0x23, 0x20, - 0x33, 0x26, 0x64, 0xcc, 0x99, 0x90, - 0x91, 0x92, 0x32, 0x46, 0x48, 0xc0, - 0xa4, 0x34, 0x86, 0x90, 0xd2, 0x10, - 0x50, 0xaa, 0x15, 0x42, 0xa8, 0x50, - 0x84, 0xd0, 0x9a, 0x13, 0x42, 0x60, - 0x09, 0x61, 0x2c, 0x25, 0x84, 0xb0, - 0x0c, 0x81, 0x90, 0x32, 0x06, 0x40, - 0x80, 0x70, 0x0e, 0x01, 0xc0, 0x30, - 0xa0, 0x94, 0x12, 0x82, 0x50, 0x40, - 0x05, 0x40, 0xa8, 0x15, 0x02, 0xa0, - 0x43, 0x08, 0x61, 0x0c, 0x21, 0x80, - 0x1a, 0x03, 0x40, 0x68, 0x0d, 0x00, - 0x60, 0x2c, 0x05, 0x80, 0xb0, 0x10, - 0x14, 0x22, 0x84, 0x50, 0x8a, 0x10 -}; - -const uint8_t kMaskRandom44_16[96] = { - 0x0c, 0x81, 0x90, 0x32, 0x06, 0x40, - 0x80, 0x70, 0x0e, 0x01, 0xc0, 0x30, - 0xa0, 0x94, 0x12, 0x82, 0x50, 0x40, - 0x05, 0x40, 0xa8, 0x15, 0x02, 0xa0, - 0x43, 0x08, 0x61, 0x0c, 0x21, 0x80, - 0x1a, 0x03, 0x40, 0x68, 0x0d, 0x00, - 0x60, 0x2c, 0x05, 0x80, 0xb0, 0x10, - 0x14, 0x22, 0x84, 0x50, 0x8a, 0x10, - 0x46, 0x48, 0xc9, 0x19, 0x23, 0x20, - 0x33, 0x26, 0x64, 0xcc, 0x99, 0x90, - 0x91, 0x92, 0x32, 0x46, 0x48, 0xc0, - 0xa4, 0x34, 0x86, 0x90, 0xd2, 0x10, - 0x50, 0xaa, 0x15, 0x42, 0xa8, 0x50, - 0x84, 0xd0, 0x9a, 0x13, 0x42, 0x60, - 0x09, 0x61, 0x2c, 0x25, 0x84, 0xb0, - 0x86, 0xc1, 0x46, 0x1b, 0x05, 0x10 -}; - -const uint8_t kMaskRandom44_17[102] = { - 0x0c, 0x81, 0x90, 0x32, 0x06, 0x40, - 0x80, 0x70, 0x0e, 0x01, 0xc0, 0x30, - 0xa0, 0x94, 0x12, 0x82, 0x50, 0x40, - 0x05, 0x40, 0xa8, 0x15, 0x02, 0xa0, - 0x43, 0x08, 0x61, 0x0c, 0x21, 0x80, - 0x1a, 0x03, 0x40, 0x68, 0x0d, 0x00, - 0x60, 0x2c, 0x05, 0x80, 0xb0, 0x10, - 0x14, 0x22, 0x84, 0x50, 0x8a, 0x10, - 0x46, 0x48, 0xc9, 0x19, 0x23, 0x20, - 0x62, 0x6c, 0x4d, 0x89, 0xb1, 0x30, - 0x8c, 0x11, 0x82, 0x30, 0x46, 0x00, - 0x01, 0x60, 0x2c, 0x05, 0x80, 0xb0, - 0x07, 0x80, 0xf0, 0x1e, 0x03, 0xc0, - 0xa0, 0x94, 0x12, 0x82, 0x50, 0x40, - 0x18, 0xa3, 0x14, 0x62, 0x8c, 0x50, - 0x91, 0x12, 0x22, 0x44, 0x48, 0x80, - 0x78, 0x0f, 0x01, 0xe0, 0x3c, 0x00 -}; - -const uint8_t kMaskRandom44_18[108] = { - 0x46, 0x48, 0xc9, 0x19, 0x23, 0x20, - 0x62, 0x6c, 0x4d, 0x89, 0xb1, 0x30, - 0x8c, 0x11, 0x82, 0x30, 0x46, 0x00, - 0x01, 0x60, 0x2c, 0x05, 0x80, 0xb0, - 0x07, 0x80, 0xf0, 0x1e, 0x03, 0xc0, - 0xa0, 0x94, 0x12, 0x82, 0x50, 0x40, - 0x18, 0xa3, 0x14, 0x62, 0x8c, 0x50, - 0x91, 0x12, 0x22, 0x44, 0x48, 0x80, - 0x78, 0x0f, 0x01, 0xe0, 0x3c, 0x00, - 0x0c, 0x81, 0x90, 0x32, 0x06, 0x40, - 0x80, 0x70, 0x0e, 0x01, 0xc0, 0x30, - 0xa0, 0x94, 0x12, 0x82, 0x50, 0x40, - 0x05, 0x40, 0xa8, 0x15, 0x02, 0xa0, - 0x43, 0x08, 0x61, 0x0c, 0x21, 0x80, - 0x1a, 0x03, 0x40, 0x68, 0x0d, 0x00, - 0x60, 0x2c, 0x05, 0x80, 0xb0, 0x10, - 0x14, 0x22, 0x84, 0x50, 0x8a, 0x10, - 0xe4, 0xd4, 0x6f, 0x93, 0x51, 0xb0 -}; - -const uint8_t kMaskRandom44_19[114] = { - 0x46, 0x48, 0xc9, 0x19, 0x23, 0x20, - 0x62, 0x6c, 0x4d, 0x89, 0xb1, 0x30, - 0x8c, 0x11, 0x82, 0x30, 0x46, 0x00, - 0x01, 0x60, 0x2c, 0x05, 0x80, 0xb0, - 0x07, 0x80, 0xf0, 0x1e, 0x03, 0xc0, - 0xa0, 0x94, 0x12, 0x82, 0x50, 0x40, - 0x18, 0xa3, 0x14, 0x62, 0x8c, 0x50, - 0x91, 0x12, 0x22, 0x44, 0x48, 0x80, - 0x78, 0x0f, 0x01, 0xe0, 0x3c, 0x00, - 0x64, 0x4c, 0x89, 0x91, 0x32, 0x20, - 0x51, 0x4a, 0x29, 0x45, 0x28, 0xa0, - 0xa9, 0x15, 0x22, 0xa4, 0x54, 0x80, - 0x04, 0xc0, 0x98, 0x13, 0x02, 0x60, - 0xd0, 0x1a, 0x03, 0x40, 0x68, 0x00, - 0x82, 0x50, 0x4a, 0x09, 0x41, 0x20, - 0x21, 0x24, 0x24, 0x84, 0x90, 0x90, - 0x0c, 0x21, 0x84, 0x30, 0x86, 0x10, - 0x4a, 0x09, 0x41, 0x28, 0x25, 0x00, - 0x12, 0xa2, 0x54, 0x4a, 0x89, 0x50 -}; - -const uint8_t kMaskRandom44_2[12] = { - 0xec, 0xdd, 0x9b, 0xb3, 0x76, 0x60, - 0x9b, 0xb3, 0x76, 0x6e, 0xcd, 0xd0 -}; - -const uint8_t kMaskRandom44_20[120] = { - 0x64, 0x4c, 0x89, 0x91, 0x32, 0x20, - 0x51, 0x4a, 0x29, 0x45, 0x28, 0xa0, - 0xa9, 0x15, 0x22, 0xa4, 0x54, 0x80, - 0x04, 0xc0, 0x98, 0x13, 0x02, 0x60, - 0xd0, 0x1a, 0x03, 0x40, 0x68, 0x00, - 0x82, 0x50, 0x4a, 0x09, 0x41, 0x20, - 0x21, 0x24, 0x24, 0x84, 0x90, 0x90, - 0x0c, 0x21, 0x84, 0x30, 0x86, 0x10, - 0x4a, 0x09, 0x41, 0x28, 0x25, 0x00, - 0x12, 0xa2, 0x54, 0x4a, 0x89, 0x50, - 0x46, 0x48, 0xc9, 0x19, 0x23, 0x20, - 0x62, 0x6c, 0x4d, 0x89, 0xb1, 0x30, - 0x8c, 0x11, 0x82, 0x30, 0x46, 0x00, - 0x01, 0x60, 0x2c, 0x05, 0x80, 0xb0, - 0x07, 0x80, 0xf0, 0x1e, 0x03, 0xc0, - 0xa0, 0x94, 0x12, 0x82, 0x50, 0x40, - 0x18, 0xa3, 0x14, 0x62, 0x8c, 0x50, - 0x91, 0x12, 0x22, 0x44, 0x48, 0x80, - 0x78, 0x0f, 0x01, 0xe0, 0x3c, 0x00, - 0x3b, 0x48, 0xc4, 0xed, 0x23, 0x10 -}; - -const uint8_t kMaskRandom44_21[126] = { - 0x64, 0x4c, 0x89, 0x91, 0x32, 0x20, - 0x51, 0x4a, 0x29, 0x45, 0x28, 0xa0, - 0xa9, 0x15, 0x22, 0xa4, 0x54, 0x80, - 0x04, 0xc0, 0x98, 0x13, 0x02, 0x60, - 0xd0, 0x1a, 0x03, 0x40, 0x68, 0x00, - 0x82, 0x50, 0x4a, 0x09, 0x41, 0x20, - 0x21, 0x24, 0x24, 0x84, 0x90, 0x90, - 0x0c, 0x21, 0x84, 0x30, 0x86, 0x10, - 0x4a, 0x09, 0x41, 0x28, 0x25, 0x00, - 0x12, 0xa2, 0x54, 0x4a, 0x89, 0x50, - 0x46, 0x48, 0xc9, 0x19, 0x23, 0x20, - 0x33, 0x26, 0x64, 0xcc, 0x99, 0x90, - 0x99, 0x13, 0x22, 0x64, 0x4c, 0x80, - 0x05, 0x80, 0xb0, 0x16, 0x02, 0xc0, - 0x80, 0xb0, 0x16, 0x02, 0xc0, 0x50, - 0x84, 0x50, 0x8a, 0x11, 0x42, 0x20, - 0x40, 0x68, 0x0d, 0x01, 0xa0, 0x30, - 0x0a, 0x81, 0x50, 0x2a, 0x05, 0x40, - 0x68, 0x0d, 0x01, 0xa0, 0x34, 0x00, - 0x10, 0x22, 0x04, 0x40, 0x88, 0x10, - 0x30, 0x46, 0x08, 0xc1, 0x18, 0x20 -}; - -const uint8_t kMaskRandom44_22[132] = { - 0x46, 0x48, 0xc9, 0x19, 0x23, 0x20, - 0x33, 0x26, 0x64, 0xcc, 0x99, 0x90, - 0x99, 0x13, 0x22, 0x64, 0x4c, 0x80, - 0x05, 0x80, 0xb0, 0x16, 0x02, 0xc0, - 0x80, 0xb0, 0x16, 0x02, 0xc0, 0x50, - 0x84, 0x50, 0x8a, 0x11, 0x42, 0x20, - 0x40, 0x68, 0x0d, 0x01, 0xa0, 0x30, - 0x0a, 0x81, 0x50, 0x2a, 0x05, 0x40, - 0x68, 0x0d, 0x01, 0xa0, 0x34, 0x00, - 0x10, 0x22, 0x04, 0x40, 0x88, 0x10, - 0x30, 0x46, 0x08, 0xc1, 0x18, 0x20, - 0x64, 0x4c, 0x89, 0x91, 0x32, 0x20, - 0x51, 0x4a, 0x29, 0x45, 0x28, 0xa0, - 0xa9, 0x15, 0x22, 0xa4, 0x54, 0x80, - 0x04, 0xc0, 0x98, 0x13, 0x02, 0x60, - 0xd0, 0x1a, 0x03, 0x40, 0x68, 0x00, - 0x82, 0x50, 0x4a, 0x09, 0x41, 0x20, - 0x21, 0x24, 0x24, 0x84, 0x90, 0x90, - 0x0c, 0x21, 0x84, 0x30, 0x86, 0x10, - 0x4a, 0x09, 0x41, 0x28, 0x25, 0x00, - 0x12, 0xa2, 0x54, 0x4a, 0x89, 0x50, - 0x9e, 0xce, 0x8a, 0x7b, 0x3a, 0x20 -}; - -const uint8_t kMaskRandom44_23[138] = { - 0x46, 0x48, 0xc9, 0x19, 0x23, 0x20, - 0x33, 0x26, 0x64, 0xcc, 0x99, 0x90, - 0x99, 0x13, 0x22, 0x64, 0x4c, 0x80, - 0x05, 0x80, 0xb0, 0x16, 0x02, 0xc0, - 0x80, 0xb0, 0x16, 0x02, 0xc0, 0x50, - 0x84, 0x50, 0x8a, 0x11, 0x42, 0x20, - 0x40, 0x68, 0x0d, 0x01, 0xa0, 0x30, - 0x0a, 0x81, 0x50, 0x2a, 0x05, 0x40, - 0x68, 0x0d, 0x01, 0xa0, 0x34, 0x00, - 0x10, 0x22, 0x04, 0x40, 0x88, 0x10, - 0x30, 0x46, 0x08, 0xc1, 0x18, 0x20, - 0x64, 0x4c, 0x89, 0x91, 0x32, 0x20, - 0x51, 0x4a, 0x29, 0x45, 0x28, 0xa0, - 0x0c, 0xa1, 0x94, 0x32, 0x86, 0x50, - 0xa1, 0x34, 0x26, 0x84, 0xd0, 0x90, - 0x12, 0xa2, 0x54, 0x4a, 0x89, 0x50, - 0x8a, 0x51, 0x4a, 0x29, 0x45, 0x20, - 0x86, 0x90, 0xd2, 0x1a, 0x43, 0x40, - 0x23, 0x24, 0x64, 0x8c, 0x91, 0x90, - 0x16, 0x22, 0xc4, 0x58, 0x8b, 0x10, - 0x4c, 0x29, 0x85, 0x30, 0xa6, 0x10, - 0x41, 0xc8, 0x39, 0x07, 0x20, 0xe0, - 0xf4, 0x18, 0x9f, 0xd0, 0x62, 0x70 -}; - -const uint8_t kMaskRandom44_24[144] = { - 0x64, 0x4c, 0x89, 0x91, 0x32, 0x20, - 0x51, 0x4a, 0x29, 0x45, 0x28, 0xa0, - 0x0c, 0xa1, 0x94, 0x32, 0x86, 0x50, - 0xa1, 0x34, 0x26, 0x84, 0xd0, 0x90, - 0x12, 0xa2, 0x54, 0x4a, 0x89, 0x50, - 0x8a, 0x51, 0x4a, 0x29, 0x45, 0x20, - 0x86, 0x90, 0xd2, 0x1a, 0x43, 0x40, - 0x23, 0x24, 0x64, 0x8c, 0x91, 0x90, - 0x16, 0x22, 0xc4, 0x58, 0x8b, 0x10, - 0x4c, 0x29, 0x85, 0x30, 0xa6, 0x10, - 0x41, 0xc8, 0x39, 0x07, 0x20, 0xe0, - 0xf4, 0x18, 0x9f, 0xd0, 0x62, 0x70, - 0x46, 0x48, 0xc9, 0x19, 0x23, 0x20, - 0x33, 0x26, 0x64, 0xcc, 0x99, 0x90, - 0x99, 0x13, 0x22, 0x64, 0x4c, 0x80, - 0x05, 0x80, 0xb0, 0x16, 0x02, 0xc0, - 0x80, 0xb0, 0x16, 0x02, 0xc0, 0x50, - 0x84, 0x50, 0x8a, 0x11, 0x42, 0x20, - 0x40, 0x68, 0x0d, 0x01, 0xa0, 0x30, - 0x0a, 0x81, 0x50, 0x2a, 0x05, 0x40, - 0x68, 0x0d, 0x01, 0xa0, 0x34, 0x00, - 0x10, 0x22, 0x04, 0x40, 0x88, 0x10, - 0x30, 0x46, 0x08, 0xc1, 0x18, 0x20, - 0x15, 0x0f, 0x44, 0x6d, 0x9d, 0xa0 -}; - -const uint8_t kMaskRandom44_25[150] = { - 0x64, 0x4c, 0x89, 0x91, 0x32, 0x20, - 0x51, 0x4a, 0x29, 0x45, 0x28, 0xa0, - 0x0c, 0xa1, 0x94, 0x32, 0x86, 0x50, - 0xa1, 0x34, 0x26, 0x84, 0xd0, 0x90, - 0x12, 0xa2, 0x54, 0x4a, 0x89, 0x50, - 0x8a, 0x51, 0x4a, 0x29, 0x45, 0x20, - 0x86, 0x90, 0xd2, 0x1a, 0x43, 0x40, - 0x23, 0x24, 0x64, 0x8c, 0x91, 0x90, - 0x16, 0x22, 0xc4, 0x58, 0x8b, 0x10, - 0x4c, 0x29, 0x85, 0x30, 0xa6, 0x10, - 0x41, 0xc8, 0x39, 0x07, 0x20, 0xe0, - 0xf4, 0x18, 0x9f, 0xd0, 0x62, 0x70, - 0x64, 0x4c, 0x89, 0x91, 0x32, 0x20, - 0x51, 0x4a, 0x29, 0x45, 0x28, 0xa0, - 0x0c, 0xa1, 0x94, 0x32, 0x86, 0x50, - 0xa1, 0x34, 0x26, 0x84, 0xd0, 0x90, - 0x12, 0xa2, 0x54, 0x4a, 0x89, 0x50, - 0x8a, 0x51, 0x4a, 0x29, 0x45, 0x20, - 0x46, 0x48, 0xc9, 0x19, 0x23, 0x20, - 0x33, 0x26, 0x64, 0xcc, 0x99, 0x90, - 0x91, 0x92, 0x32, 0x46, 0x48, 0xc0, - 0xa4, 0x34, 0x86, 0x90, 0xd2, 0x10, - 0x50, 0xaa, 0x15, 0x42, 0xa8, 0x50, - 0x84, 0xd0, 0x9a, 0x13, 0x42, 0x60, - 0x09, 0x61, 0x2c, 0x25, 0x84, 0xb0 -}; - -const uint8_t kMaskRandom44_26[156] = { - 0x64, 0x4c, 0x89, 0x91, 0x32, 0x20, - 0x51, 0x4a, 0x29, 0x45, 0x28, 0xa0, - 0x0c, 0xa1, 0x94, 0x32, 0x86, 0x50, - 0xa1, 0x34, 0x26, 0x84, 0xd0, 0x90, - 0x12, 0xa2, 0x54, 0x4a, 0x89, 0x50, - 0x8a, 0x51, 0x4a, 0x29, 0x45, 0x20, - 0x46, 0x48, 0xc9, 0x19, 0x23, 0x20, - 0x33, 0x26, 0x64, 0xcc, 0x99, 0x90, - 0x91, 0x92, 0x32, 0x46, 0x48, 0xc0, - 0xa4, 0x34, 0x86, 0x90, 0xd2, 0x10, - 0x50, 0xaa, 0x15, 0x42, 0xa8, 0x50, - 0x84, 0xd0, 0x9a, 0x13, 0x42, 0x60, - 0x09, 0x61, 0x2c, 0x25, 0x84, 0xb0, - 0x64, 0x4c, 0x89, 0x91, 0x32, 0x20, - 0x51, 0x4a, 0x29, 0x45, 0x28, 0xa0, - 0x0c, 0xa1, 0x94, 0x32, 0x86, 0x50, - 0xa1, 0x34, 0x26, 0x84, 0xd0, 0x90, - 0x12, 0xa2, 0x54, 0x4a, 0x89, 0x50, - 0x8a, 0x51, 0x4a, 0x29, 0x45, 0x20, - 0x86, 0x90, 0xd2, 0x1a, 0x43, 0x40, - 0x23, 0x24, 0x64, 0x8c, 0x91, 0x90, - 0x16, 0x22, 0xc4, 0x58, 0x8b, 0x10, - 0x4c, 0x29, 0x85, 0x30, 0xa6, 0x10, - 0x41, 0xc8, 0x39, 0x07, 0x20, 0xe0, - 0xf4, 0x18, 0x9f, 0xd0, 0x62, 0x70, - 0x02, 0xcb, 0x64, 0xb8, 0x55, 0x80 -}; - -const uint8_t kMaskRandom44_27[162] = { - 0x64, 0x4c, 0x89, 0x91, 0x32, 0x20, - 0x51, 0x4a, 0x29, 0x45, 0x28, 0xa0, - 0x0c, 0xa1, 0x94, 0x32, 0x86, 0x50, - 0xa1, 0x34, 0x26, 0x84, 0xd0, 0x90, - 0x12, 0xa2, 0x54, 0x4a, 0x89, 0x50, - 0x8a, 0x51, 0x4a, 0x29, 0x45, 0x20, - 0x46, 0x48, 0xc9, 0x19, 0x23, 0x20, - 0x33, 0x26, 0x64, 0xcc, 0x99, 0x90, - 0x91, 0x92, 0x32, 0x46, 0x48, 0xc0, - 0xa4, 0x34, 0x86, 0x90, 0xd2, 0x10, - 0x50, 0xaa, 0x15, 0x42, 0xa8, 0x50, - 0x84, 0xd0, 0x9a, 0x13, 0x42, 0x60, - 0x09, 0x61, 0x2c, 0x25, 0x84, 0xb0, - 0x46, 0x48, 0xc9, 0x19, 0x23, 0x20, - 0x33, 0x26, 0x64, 0xcc, 0x99, 0x90, - 0x91, 0x92, 0x32, 0x46, 0x48, 0xc0, - 0xa4, 0x34, 0x86, 0x90, 0xd2, 0x10, - 0x50, 0xaa, 0x15, 0x42, 0xa8, 0x50, - 0x84, 0xd0, 0x9a, 0x13, 0x42, 0x60, - 0x09, 0x61, 0x2c, 0x25, 0x84, 0xb0, - 0x64, 0x4c, 0x89, 0x91, 0x32, 0x20, - 0x51, 0x4a, 0x29, 0x45, 0x28, 0xa0, - 0x0c, 0xa1, 0x94, 0x32, 0x86, 0x50, - 0xa1, 0x34, 0x26, 0x84, 0xd0, 0x90, - 0x12, 0xa2, 0x54, 0x4a, 0x89, 0x50, - 0x8a, 0x51, 0x4a, 0x29, 0x45, 0x20, - 0xc6, 0xca, 0xeb, 0x1b, 0x2b, 0xa0 -}; - -const uint8_t kMaskRandom44_28[168] = { - 0x46, 0x48, 0xc9, 0x19, 0x23, 0x20, - 0x33, 0x26, 0x64, 0xcc, 0x99, 0x90, - 0x91, 0x92, 0x32, 0x46, 0x48, 0xc0, - 0xa4, 0x34, 0x86, 0x90, 0xd2, 0x10, - 0x50, 0xaa, 0x15, 0x42, 0xa8, 0x50, - 0x84, 0xd0, 0x9a, 0x13, 0x42, 0x60, - 0x09, 0x61, 0x2c, 0x25, 0x84, 0xb0, - 0x64, 0x4c, 0x89, 0x91, 0x32, 0x20, - 0x51, 0x4a, 0x29, 0x45, 0x28, 0xa0, - 0x0c, 0xa1, 0x94, 0x32, 0x86, 0x50, - 0xa1, 0x34, 0x26, 0x84, 0xd0, 0x90, - 0x12, 0xa2, 0x54, 0x4a, 0x89, 0x50, - 0x8a, 0x51, 0x4a, 0x29, 0x45, 0x20, - 0xc6, 0xca, 0xeb, 0x1b, 0x2b, 0xa0, - 0x64, 0x4c, 0x89, 0x91, 0x32, 0x20, - 0x51, 0x4a, 0x29, 0x45, 0x28, 0xa0, - 0x0c, 0xa1, 0x94, 0x32, 0x86, 0x50, - 0xa1, 0x34, 0x26, 0x84, 0xd0, 0x90, - 0x12, 0xa2, 0x54, 0x4a, 0x89, 0x50, - 0x8a, 0x51, 0x4a, 0x29, 0x45, 0x20, - 0x46, 0x48, 0xc9, 0x19, 0x23, 0x20, - 0x33, 0x26, 0x64, 0xcc, 0x99, 0x90, - 0x91, 0x92, 0x32, 0x46, 0x48, 0xc0, - 0xa4, 0x34, 0x86, 0x90, 0xd2, 0x10, - 0x50, 0xaa, 0x15, 0x42, 0xa8, 0x50, - 0x84, 0xd0, 0x9a, 0x13, 0x42, 0x60, - 0x09, 0x61, 0x2c, 0x25, 0x84, 0xb0, - 0x66, 0x26, 0x6c, 0x91, 0xc7, 0x20 -}; - -const uint8_t kMaskRandom44_29[174] = { - 0x46, 0x48, 0xc9, 0x19, 0x23, 0x20, - 0x33, 0x26, 0x64, 0xcc, 0x99, 0x90, - 0x91, 0x92, 0x32, 0x46, 0x48, 0xc0, - 0xa4, 0x34, 0x86, 0x90, 0xd2, 0x10, - 0x50, 0xaa, 0x15, 0x42, 0xa8, 0x50, - 0x84, 0xd0, 0x9a, 0x13, 0x42, 0x60, - 0x09, 0x61, 0x2c, 0x25, 0x84, 0xb0, - 0x64, 0x4c, 0x89, 0x91, 0x32, 0x20, - 0x51, 0x4a, 0x29, 0x45, 0x28, 0xa0, - 0x0c, 0xa1, 0x94, 0x32, 0x86, 0x50, - 0xa1, 0x34, 0x26, 0x84, 0xd0, 0x90, - 0x12, 0xa2, 0x54, 0x4a, 0x89, 0x50, - 0x8a, 0x51, 0x4a, 0x29, 0x45, 0x20, - 0xc6, 0xca, 0xeb, 0x1b, 0x2b, 0xa0, - 0x46, 0x48, 0xc9, 0x19, 0x23, 0x20, - 0x33, 0x26, 0x64, 0xcc, 0x99, 0x90, - 0x91, 0x92, 0x32, 0x46, 0x48, 0xc0, - 0xa4, 0x34, 0x86, 0x90, 0xd2, 0x10, - 0x50, 0xaa, 0x15, 0x42, 0xa8, 0x50, - 0x84, 0xd0, 0x9a, 0x13, 0x42, 0x60, - 0x09, 0x61, 0x2c, 0x25, 0x84, 0xb0, - 0x0c, 0x81, 0x90, 0x32, 0x06, 0x40, - 0x80, 0x70, 0x0e, 0x01, 0xc0, 0x30, - 0xa0, 0x94, 0x12, 0x82, 0x50, 0x40, - 0x05, 0x40, 0xa8, 0x15, 0x02, 0xa0, - 0x43, 0x08, 0x61, 0x0c, 0x21, 0x80, - 0x1a, 0x03, 0x40, 0x68, 0x0d, 0x00, - 0x60, 0x2c, 0x05, 0x80, 0xb0, 0x10, - 0x14, 0x22, 0x84, 0x50, 0x8a, 0x10 -}; - -const uint8_t kMaskRandom44_3[18] = { - 0xca, 0xd9, 0x5b, 0x2b, 0x65, 0x60, - 0xf1, 0x5e, 0x2b, 0xc5, 0x78, 0xa0, - 0xb6, 0x35, 0xc6, 0xd8, 0xd7, 0x10 -}; - -const uint8_t kMaskRandom44_30[180] = { - 0x46, 0x48, 0xc9, 0x19, 0x23, 0x20, - 0x33, 0x26, 0x64, 0xcc, 0x99, 0x90, - 0x91, 0x92, 0x32, 0x46, 0x48, 0xc0, - 0xa4, 0x34, 0x86, 0x90, 0xd2, 0x10, - 0x50, 0xaa, 0x15, 0x42, 0xa8, 0x50, - 0x84, 0xd0, 0x9a, 0x13, 0x42, 0x60, - 0x09, 0x61, 0x2c, 0x25, 0x84, 0xb0, - 0x0c, 0x81, 0x90, 0x32, 0x06, 0x40, - 0x80, 0x70, 0x0e, 0x01, 0xc0, 0x30, - 0xa0, 0x94, 0x12, 0x82, 0x50, 0x40, - 0x05, 0x40, 0xa8, 0x15, 0x02, 0xa0, - 0x43, 0x08, 0x61, 0x0c, 0x21, 0x80, - 0x1a, 0x03, 0x40, 0x68, 0x0d, 0x00, - 0x60, 0x2c, 0x05, 0x80, 0xb0, 0x10, - 0x14, 0x22, 0x84, 0x50, 0x8a, 0x10, - 0x46, 0x48, 0xc9, 0x19, 0x23, 0x20, - 0x33, 0x26, 0x64, 0xcc, 0x99, 0x90, - 0x91, 0x92, 0x32, 0x46, 0x48, 0xc0, - 0xa4, 0x34, 0x86, 0x90, 0xd2, 0x10, - 0x50, 0xaa, 0x15, 0x42, 0xa8, 0x50, - 0x84, 0xd0, 0x9a, 0x13, 0x42, 0x60, - 0x09, 0x61, 0x2c, 0x25, 0x84, 0xb0, - 0x64, 0x4c, 0x89, 0x91, 0x32, 0x20, - 0x51, 0x4a, 0x29, 0x45, 0x28, 0xa0, - 0x0c, 0xa1, 0x94, 0x32, 0x86, 0x50, - 0xa1, 0x34, 0x26, 0x84, 0xd0, 0x90, - 0x12, 0xa2, 0x54, 0x4a, 0x89, 0x50, - 0x8a, 0x51, 0x4a, 0x29, 0x45, 0x20, - 0xc6, 0xca, 0xeb, 0x1b, 0x2b, 0xa0, - 0x60, 0xf4, 0x75, 0x84, 0x90, 0xc0 -}; - -const uint8_t kMaskRandom44_31[186] = { - 0x46, 0x48, 0xc9, 0x19, 0x23, 0x20, - 0x33, 0x26, 0x64, 0xcc, 0x99, 0x90, - 0x91, 0x92, 0x32, 0x46, 0x48, 0xc0, - 0xa4, 0x34, 0x86, 0x90, 0xd2, 0x10, - 0x50, 0xaa, 0x15, 0x42, 0xa8, 0x50, - 0x84, 0xd0, 0x9a, 0x13, 0x42, 0x60, - 0x09, 0x61, 0x2c, 0x25, 0x84, 0xb0, - 0x0c, 0x81, 0x90, 0x32, 0x06, 0x40, - 0x80, 0x70, 0x0e, 0x01, 0xc0, 0x30, - 0xa0, 0x94, 0x12, 0x82, 0x50, 0x40, - 0x05, 0x40, 0xa8, 0x15, 0x02, 0xa0, - 0x43, 0x08, 0x61, 0x0c, 0x21, 0x80, - 0x1a, 0x03, 0x40, 0x68, 0x0d, 0x00, - 0x60, 0x2c, 0x05, 0x80, 0xb0, 0x10, - 0x14, 0x22, 0x84, 0x50, 0x8a, 0x10, - 0x0c, 0x81, 0x90, 0x32, 0x06, 0x40, - 0x80, 0x70, 0x0e, 0x01, 0xc0, 0x30, - 0xa0, 0x94, 0x12, 0x82, 0x50, 0x40, - 0x05, 0x40, 0xa8, 0x15, 0x02, 0xa0, - 0x43, 0x08, 0x61, 0x0c, 0x21, 0x80, - 0x1a, 0x03, 0x40, 0x68, 0x0d, 0x00, - 0x60, 0x2c, 0x05, 0x80, 0xb0, 0x10, - 0x14, 0x22, 0x84, 0x50, 0x8a, 0x10, - 0x46, 0x48, 0xc9, 0x19, 0x23, 0x20, - 0x33, 0x26, 0x64, 0xcc, 0x99, 0x90, - 0x91, 0x92, 0x32, 0x46, 0x48, 0xc0, - 0xa4, 0x34, 0x86, 0x90, 0xd2, 0x10, - 0x50, 0xaa, 0x15, 0x42, 0xa8, 0x50, - 0x84, 0xd0, 0x9a, 0x13, 0x42, 0x60, - 0x09, 0x61, 0x2c, 0x25, 0x84, 0xb0, - 0x86, 0xc1, 0x46, 0x1b, 0x05, 0x10 -}; - -const uint8_t kMaskRandom44_32[192] = { - 0x0c, 0x81, 0x90, 0x32, 0x06, 0x40, - 0x80, 0x70, 0x0e, 0x01, 0xc0, 0x30, - 0xa0, 0x94, 0x12, 0x82, 0x50, 0x40, - 0x05, 0x40, 0xa8, 0x15, 0x02, 0xa0, - 0x43, 0x08, 0x61, 0x0c, 0x21, 0x80, - 0x1a, 0x03, 0x40, 0x68, 0x0d, 0x00, - 0x60, 0x2c, 0x05, 0x80, 0xb0, 0x10, - 0x14, 0x22, 0x84, 0x50, 0x8a, 0x10, - 0x46, 0x48, 0xc9, 0x19, 0x23, 0x20, - 0x33, 0x26, 0x64, 0xcc, 0x99, 0x90, - 0x91, 0x92, 0x32, 0x46, 0x48, 0xc0, - 0xa4, 0x34, 0x86, 0x90, 0xd2, 0x10, - 0x50, 0xaa, 0x15, 0x42, 0xa8, 0x50, - 0x84, 0xd0, 0x9a, 0x13, 0x42, 0x60, - 0x09, 0x61, 0x2c, 0x25, 0x84, 0xb0, - 0x86, 0xc1, 0x46, 0x1b, 0x05, 0x10, - 0x46, 0x48, 0xc9, 0x19, 0x23, 0x20, - 0x33, 0x26, 0x64, 0xcc, 0x99, 0x90, - 0x91, 0x92, 0x32, 0x46, 0x48, 0xc0, - 0xa4, 0x34, 0x86, 0x90, 0xd2, 0x10, - 0x50, 0xaa, 0x15, 0x42, 0xa8, 0x50, - 0x84, 0xd0, 0x9a, 0x13, 0x42, 0x60, - 0x09, 0x61, 0x2c, 0x25, 0x84, 0xb0, - 0x0c, 0x81, 0x90, 0x32, 0x06, 0x40, - 0x80, 0x70, 0x0e, 0x01, 0xc0, 0x30, - 0xa0, 0x94, 0x12, 0x82, 0x50, 0x40, - 0x05, 0x40, 0xa8, 0x15, 0x02, 0xa0, - 0x43, 0x08, 0x61, 0x0c, 0x21, 0x80, - 0x1a, 0x03, 0x40, 0x68, 0x0d, 0x00, - 0x60, 0x2c, 0x05, 0x80, 0xb0, 0x10, - 0x14, 0x22, 0x84, 0x50, 0x8a, 0x10, - 0x3e, 0x39, 0x86, 0x5c, 0xd9, 0xd0 -}; - -const uint8_t kMaskRandom44_33[198] = { - 0x0c, 0x81, 0x90, 0x32, 0x06, 0x40, - 0x80, 0x70, 0x0e, 0x01, 0xc0, 0x30, - 0xa0, 0x94, 0x12, 0x82, 0x50, 0x40, - 0x05, 0x40, 0xa8, 0x15, 0x02, 0xa0, - 0x43, 0x08, 0x61, 0x0c, 0x21, 0x80, - 0x1a, 0x03, 0x40, 0x68, 0x0d, 0x00, - 0x60, 0x2c, 0x05, 0x80, 0xb0, 0x10, - 0x14, 0x22, 0x84, 0x50, 0x8a, 0x10, - 0x46, 0x48, 0xc9, 0x19, 0x23, 0x20, - 0x33, 0x26, 0x64, 0xcc, 0x99, 0x90, - 0x91, 0x92, 0x32, 0x46, 0x48, 0xc0, - 0xa4, 0x34, 0x86, 0x90, 0xd2, 0x10, - 0x50, 0xaa, 0x15, 0x42, 0xa8, 0x50, - 0x84, 0xd0, 0x9a, 0x13, 0x42, 0x60, - 0x09, 0x61, 0x2c, 0x25, 0x84, 0xb0, - 0x86, 0xc1, 0x46, 0x1b, 0x05, 0x10, - 0x0c, 0x81, 0x90, 0x32, 0x06, 0x40, - 0x80, 0x70, 0x0e, 0x01, 0xc0, 0x30, - 0xa0, 0x94, 0x12, 0x82, 0x50, 0x40, - 0x05, 0x40, 0xa8, 0x15, 0x02, 0xa0, - 0x43, 0x08, 0x61, 0x0c, 0x21, 0x80, - 0x1a, 0x03, 0x40, 0x68, 0x0d, 0x00, - 0x60, 0x2c, 0x05, 0x80, 0xb0, 0x10, - 0x14, 0x22, 0x84, 0x50, 0x8a, 0x10, - 0x46, 0x48, 0xc9, 0x19, 0x23, 0x20, - 0x62, 0x6c, 0x4d, 0x89, 0xb1, 0x30, - 0x8c, 0x11, 0x82, 0x30, 0x46, 0x00, - 0x01, 0x60, 0x2c, 0x05, 0x80, 0xb0, - 0x07, 0x80, 0xf0, 0x1e, 0x03, 0xc0, - 0xa0, 0x94, 0x12, 0x82, 0x50, 0x40, - 0x18, 0xa3, 0x14, 0x62, 0x8c, 0x50, - 0x91, 0x12, 0x22, 0x44, 0x48, 0x80, - 0x78, 0x0f, 0x01, 0xe0, 0x3c, 0x00 -}; - -const uint8_t kMaskRandom44_34[204] = { - 0x0c, 0x81, 0x90, 0x32, 0x06, 0x40, - 0x80, 0x70, 0x0e, 0x01, 0xc0, 0x30, - 0xa0, 0x94, 0x12, 0x82, 0x50, 0x40, - 0x05, 0x40, 0xa8, 0x15, 0x02, 0xa0, - 0x43, 0x08, 0x61, 0x0c, 0x21, 0x80, - 0x1a, 0x03, 0x40, 0x68, 0x0d, 0x00, - 0x60, 0x2c, 0x05, 0x80, 0xb0, 0x10, - 0x14, 0x22, 0x84, 0x50, 0x8a, 0x10, - 0x46, 0x48, 0xc9, 0x19, 0x23, 0x20, - 0x62, 0x6c, 0x4d, 0x89, 0xb1, 0x30, - 0x8c, 0x11, 0x82, 0x30, 0x46, 0x00, - 0x01, 0x60, 0x2c, 0x05, 0x80, 0xb0, - 0x07, 0x80, 0xf0, 0x1e, 0x03, 0xc0, - 0xa0, 0x94, 0x12, 0x82, 0x50, 0x40, - 0x18, 0xa3, 0x14, 0x62, 0x8c, 0x50, - 0x91, 0x12, 0x22, 0x44, 0x48, 0x80, - 0x78, 0x0f, 0x01, 0xe0, 0x3c, 0x00, - 0x0c, 0x81, 0x90, 0x32, 0x06, 0x40, - 0x80, 0x70, 0x0e, 0x01, 0xc0, 0x30, - 0xa0, 0x94, 0x12, 0x82, 0x50, 0x40, - 0x05, 0x40, 0xa8, 0x15, 0x02, 0xa0, - 0x43, 0x08, 0x61, 0x0c, 0x21, 0x80, - 0x1a, 0x03, 0x40, 0x68, 0x0d, 0x00, - 0x60, 0x2c, 0x05, 0x80, 0xb0, 0x10, - 0x14, 0x22, 0x84, 0x50, 0x8a, 0x10, - 0x46, 0x48, 0xc9, 0x19, 0x23, 0x20, - 0x33, 0x26, 0x64, 0xcc, 0x99, 0x90, - 0x91, 0x92, 0x32, 0x46, 0x48, 0xc0, - 0xa4, 0x34, 0x86, 0x90, 0xd2, 0x10, - 0x50, 0xaa, 0x15, 0x42, 0xa8, 0x50, - 0x84, 0xd0, 0x9a, 0x13, 0x42, 0x60, - 0x09, 0x61, 0x2c, 0x25, 0x84, 0xb0, - 0x86, 0xc1, 0x46, 0x1b, 0x05, 0x10, - 0xb5, 0xc7, 0xe8, 0x0c, 0xb9, 0x90 -}; - -const uint8_t kMaskRandom44_35[210] = { - 0x0c, 0x81, 0x90, 0x32, 0x06, 0x40, - 0x80, 0x70, 0x0e, 0x01, 0xc0, 0x30, - 0xa0, 0x94, 0x12, 0x82, 0x50, 0x40, - 0x05, 0x40, 0xa8, 0x15, 0x02, 0xa0, - 0x43, 0x08, 0x61, 0x0c, 0x21, 0x80, - 0x1a, 0x03, 0x40, 0x68, 0x0d, 0x00, - 0x60, 0x2c, 0x05, 0x80, 0xb0, 0x10, - 0x14, 0x22, 0x84, 0x50, 0x8a, 0x10, - 0x46, 0x48, 0xc9, 0x19, 0x23, 0x20, - 0x62, 0x6c, 0x4d, 0x89, 0xb1, 0x30, - 0x8c, 0x11, 0x82, 0x30, 0x46, 0x00, - 0x01, 0x60, 0x2c, 0x05, 0x80, 0xb0, - 0x07, 0x80, 0xf0, 0x1e, 0x03, 0xc0, - 0xa0, 0x94, 0x12, 0x82, 0x50, 0x40, - 0x18, 0xa3, 0x14, 0x62, 0x8c, 0x50, - 0x91, 0x12, 0x22, 0x44, 0x48, 0x80, - 0x78, 0x0f, 0x01, 0xe0, 0x3c, 0x00, - 0x46, 0x48, 0xc9, 0x19, 0x23, 0x20, - 0x62, 0x6c, 0x4d, 0x89, 0xb1, 0x30, - 0x8c, 0x11, 0x82, 0x30, 0x46, 0x00, - 0x01, 0x60, 0x2c, 0x05, 0x80, 0xb0, - 0x07, 0x80, 0xf0, 0x1e, 0x03, 0xc0, - 0xa0, 0x94, 0x12, 0x82, 0x50, 0x40, - 0x18, 0xa3, 0x14, 0x62, 0x8c, 0x50, - 0x91, 0x12, 0x22, 0x44, 0x48, 0x80, - 0x78, 0x0f, 0x01, 0xe0, 0x3c, 0x00, - 0x0c, 0x81, 0x90, 0x32, 0x06, 0x40, - 0x80, 0x70, 0x0e, 0x01, 0xc0, 0x30, - 0xa0, 0x94, 0x12, 0x82, 0x50, 0x40, - 0x05, 0x40, 0xa8, 0x15, 0x02, 0xa0, - 0x43, 0x08, 0x61, 0x0c, 0x21, 0x80, - 0x1a, 0x03, 0x40, 0x68, 0x0d, 0x00, - 0x60, 0x2c, 0x05, 0x80, 0xb0, 0x10, - 0x14, 0x22, 0x84, 0x50, 0x8a, 0x10, - 0xe4, 0xd4, 0x6f, 0x93, 0x51, 0xb0 -}; - -const uint8_t kMaskRandom44_36[216] = { - 0x46, 0x48, 0xc9, 0x19, 0x23, 0x20, - 0x62, 0x6c, 0x4d, 0x89, 0xb1, 0x30, - 0x8c, 0x11, 0x82, 0x30, 0x46, 0x00, - 0x01, 0x60, 0x2c, 0x05, 0x80, 0xb0, - 0x07, 0x80, 0xf0, 0x1e, 0x03, 0xc0, - 0xa0, 0x94, 0x12, 0x82, 0x50, 0x40, - 0x18, 0xa3, 0x14, 0x62, 0x8c, 0x50, - 0x91, 0x12, 0x22, 0x44, 0x48, 0x80, - 0x78, 0x0f, 0x01, 0xe0, 0x3c, 0x00, - 0x0c, 0x81, 0x90, 0x32, 0x06, 0x40, - 0x80, 0x70, 0x0e, 0x01, 0xc0, 0x30, - 0xa0, 0x94, 0x12, 0x82, 0x50, 0x40, - 0x05, 0x40, 0xa8, 0x15, 0x02, 0xa0, - 0x43, 0x08, 0x61, 0x0c, 0x21, 0x80, - 0x1a, 0x03, 0x40, 0x68, 0x0d, 0x00, - 0x60, 0x2c, 0x05, 0x80, 0xb0, 0x10, - 0x14, 0x22, 0x84, 0x50, 0x8a, 0x10, - 0xe4, 0xd4, 0x6f, 0x93, 0x51, 0xb0, - 0x0c, 0x81, 0x90, 0x32, 0x06, 0x40, - 0x80, 0x70, 0x0e, 0x01, 0xc0, 0x30, - 0xa0, 0x94, 0x12, 0x82, 0x50, 0x40, - 0x05, 0x40, 0xa8, 0x15, 0x02, 0xa0, - 0x43, 0x08, 0x61, 0x0c, 0x21, 0x80, - 0x1a, 0x03, 0x40, 0x68, 0x0d, 0x00, - 0x60, 0x2c, 0x05, 0x80, 0xb0, 0x10, - 0x14, 0x22, 0x84, 0x50, 0x8a, 0x10, - 0x46, 0x48, 0xc9, 0x19, 0x23, 0x20, - 0x62, 0x6c, 0x4d, 0x89, 0xb1, 0x30, - 0x8c, 0x11, 0x82, 0x30, 0x46, 0x00, - 0x01, 0x60, 0x2c, 0x05, 0x80, 0xb0, - 0x07, 0x80, 0xf0, 0x1e, 0x03, 0xc0, - 0xa0, 0x94, 0x12, 0x82, 0x50, 0x40, - 0x18, 0xa3, 0x14, 0x62, 0x8c, 0x50, - 0x91, 0x12, 0x22, 0x44, 0x48, 0x80, - 0x78, 0x0f, 0x01, 0xe0, 0x3c, 0x00, - 0xa6, 0x92, 0x01, 0x65, 0x91, 0x20 -}; - -const uint8_t kMaskRandom44_37[222] = { - 0x46, 0x48, 0xc9, 0x19, 0x23, 0x20, - 0x62, 0x6c, 0x4d, 0x89, 0xb1, 0x30, - 0x8c, 0x11, 0x82, 0x30, 0x46, 0x00, - 0x01, 0x60, 0x2c, 0x05, 0x80, 0xb0, - 0x07, 0x80, 0xf0, 0x1e, 0x03, 0xc0, - 0xa0, 0x94, 0x12, 0x82, 0x50, 0x40, - 0x18, 0xa3, 0x14, 0x62, 0x8c, 0x50, - 0x91, 0x12, 0x22, 0x44, 0x48, 0x80, - 0x78, 0x0f, 0x01, 0xe0, 0x3c, 0x00, - 0x0c, 0x81, 0x90, 0x32, 0x06, 0x40, - 0x80, 0x70, 0x0e, 0x01, 0xc0, 0x30, - 0xa0, 0x94, 0x12, 0x82, 0x50, 0x40, - 0x05, 0x40, 0xa8, 0x15, 0x02, 0xa0, - 0x43, 0x08, 0x61, 0x0c, 0x21, 0x80, - 0x1a, 0x03, 0x40, 0x68, 0x0d, 0x00, - 0x60, 0x2c, 0x05, 0x80, 0xb0, 0x10, - 0x14, 0x22, 0x84, 0x50, 0x8a, 0x10, - 0xe4, 0xd4, 0x6f, 0x93, 0x51, 0xb0, - 0x46, 0x48, 0xc9, 0x19, 0x23, 0x20, - 0x62, 0x6c, 0x4d, 0x89, 0xb1, 0x30, - 0x8c, 0x11, 0x82, 0x30, 0x46, 0x00, - 0x01, 0x60, 0x2c, 0x05, 0x80, 0xb0, - 0x07, 0x80, 0xf0, 0x1e, 0x03, 0xc0, - 0xa0, 0x94, 0x12, 0x82, 0x50, 0x40, - 0x18, 0xa3, 0x14, 0x62, 0x8c, 0x50, - 0x91, 0x12, 0x22, 0x44, 0x48, 0x80, - 0x78, 0x0f, 0x01, 0xe0, 0x3c, 0x00, - 0x64, 0x4c, 0x89, 0x91, 0x32, 0x20, - 0x51, 0x4a, 0x29, 0x45, 0x28, 0xa0, - 0xa9, 0x15, 0x22, 0xa4, 0x54, 0x80, - 0x04, 0xc0, 0x98, 0x13, 0x02, 0x60, - 0xd0, 0x1a, 0x03, 0x40, 0x68, 0x00, - 0x82, 0x50, 0x4a, 0x09, 0x41, 0x20, - 0x21, 0x24, 0x24, 0x84, 0x90, 0x90, - 0x0c, 0x21, 0x84, 0x30, 0x86, 0x10, - 0x4a, 0x09, 0x41, 0x28, 0x25, 0x00, - 0x12, 0xa2, 0x54, 0x4a, 0x89, 0x50 -}; - -const uint8_t kMaskRandom44_38[228] = { - 0x46, 0x48, 0xc9, 0x19, 0x23, 0x20, - 0x62, 0x6c, 0x4d, 0x89, 0xb1, 0x30, - 0x8c, 0x11, 0x82, 0x30, 0x46, 0x00, - 0x01, 0x60, 0x2c, 0x05, 0x80, 0xb0, - 0x07, 0x80, 0xf0, 0x1e, 0x03, 0xc0, - 0xa0, 0x94, 0x12, 0x82, 0x50, 0x40, - 0x18, 0xa3, 0x14, 0x62, 0x8c, 0x50, - 0x91, 0x12, 0x22, 0x44, 0x48, 0x80, - 0x78, 0x0f, 0x01, 0xe0, 0x3c, 0x00, - 0x64, 0x4c, 0x89, 0x91, 0x32, 0x20, - 0x51, 0x4a, 0x29, 0x45, 0x28, 0xa0, - 0xa9, 0x15, 0x22, 0xa4, 0x54, 0x80, - 0x04, 0xc0, 0x98, 0x13, 0x02, 0x60, - 0xd0, 0x1a, 0x03, 0x40, 0x68, 0x00, - 0x82, 0x50, 0x4a, 0x09, 0x41, 0x20, - 0x21, 0x24, 0x24, 0x84, 0x90, 0x90, - 0x0c, 0x21, 0x84, 0x30, 0x86, 0x10, - 0x4a, 0x09, 0x41, 0x28, 0x25, 0x00, - 0x12, 0xa2, 0x54, 0x4a, 0x89, 0x50, - 0x46, 0x48, 0xc9, 0x19, 0x23, 0x20, - 0x62, 0x6c, 0x4d, 0x89, 0xb1, 0x30, - 0x8c, 0x11, 0x82, 0x30, 0x46, 0x00, - 0x01, 0x60, 0x2c, 0x05, 0x80, 0xb0, - 0x07, 0x80, 0xf0, 0x1e, 0x03, 0xc0, - 0xa0, 0x94, 0x12, 0x82, 0x50, 0x40, - 0x18, 0xa3, 0x14, 0x62, 0x8c, 0x50, - 0x91, 0x12, 0x22, 0x44, 0x48, 0x80, - 0x78, 0x0f, 0x01, 0xe0, 0x3c, 0x00, - 0x0c, 0x81, 0x90, 0x32, 0x06, 0x40, - 0x80, 0x70, 0x0e, 0x01, 0xc0, 0x30, - 0xa0, 0x94, 0x12, 0x82, 0x50, 0x40, - 0x05, 0x40, 0xa8, 0x15, 0x02, 0xa0, - 0x43, 0x08, 0x61, 0x0c, 0x21, 0x80, - 0x1a, 0x03, 0x40, 0x68, 0x0d, 0x00, - 0x60, 0x2c, 0x05, 0x80, 0xb0, 0x10, - 0x14, 0x22, 0x84, 0x50, 0x8a, 0x10, - 0xe4, 0xd4, 0x6f, 0x93, 0x51, 0xb0, - 0x43, 0x64, 0xf2, 0xe5, 0x5d, 0x10 -}; - -const uint8_t kMaskRandom44_39[234] = { - 0x46, 0x48, 0xc9, 0x19, 0x23, 0x20, - 0x62, 0x6c, 0x4d, 0x89, 0xb1, 0x30, - 0x8c, 0x11, 0x82, 0x30, 0x46, 0x00, - 0x01, 0x60, 0x2c, 0x05, 0x80, 0xb0, - 0x07, 0x80, 0xf0, 0x1e, 0x03, 0xc0, - 0xa0, 0x94, 0x12, 0x82, 0x50, 0x40, - 0x18, 0xa3, 0x14, 0x62, 0x8c, 0x50, - 0x91, 0x12, 0x22, 0x44, 0x48, 0x80, - 0x78, 0x0f, 0x01, 0xe0, 0x3c, 0x00, - 0x64, 0x4c, 0x89, 0x91, 0x32, 0x20, - 0x51, 0x4a, 0x29, 0x45, 0x28, 0xa0, - 0xa9, 0x15, 0x22, 0xa4, 0x54, 0x80, - 0x04, 0xc0, 0x98, 0x13, 0x02, 0x60, - 0xd0, 0x1a, 0x03, 0x40, 0x68, 0x00, - 0x82, 0x50, 0x4a, 0x09, 0x41, 0x20, - 0x21, 0x24, 0x24, 0x84, 0x90, 0x90, - 0x0c, 0x21, 0x84, 0x30, 0x86, 0x10, - 0x4a, 0x09, 0x41, 0x28, 0x25, 0x00, - 0x12, 0xa2, 0x54, 0x4a, 0x89, 0x50, - 0x64, 0x4c, 0x89, 0x91, 0x32, 0x20, - 0x51, 0x4a, 0x29, 0x45, 0x28, 0xa0, - 0xa9, 0x15, 0x22, 0xa4, 0x54, 0x80, - 0x04, 0xc0, 0x98, 0x13, 0x02, 0x60, - 0xd0, 0x1a, 0x03, 0x40, 0x68, 0x00, - 0x82, 0x50, 0x4a, 0x09, 0x41, 0x20, - 0x21, 0x24, 0x24, 0x84, 0x90, 0x90, - 0x0c, 0x21, 0x84, 0x30, 0x86, 0x10, - 0x4a, 0x09, 0x41, 0x28, 0x25, 0x00, - 0x12, 0xa2, 0x54, 0x4a, 0x89, 0x50, - 0x46, 0x48, 0xc9, 0x19, 0x23, 0x20, - 0x62, 0x6c, 0x4d, 0x89, 0xb1, 0x30, - 0x8c, 0x11, 0x82, 0x30, 0x46, 0x00, - 0x01, 0x60, 0x2c, 0x05, 0x80, 0xb0, - 0x07, 0x80, 0xf0, 0x1e, 0x03, 0xc0, - 0xa0, 0x94, 0x12, 0x82, 0x50, 0x40, - 0x18, 0xa3, 0x14, 0x62, 0x8c, 0x50, - 0x91, 0x12, 0x22, 0x44, 0x48, 0x80, - 0x78, 0x0f, 0x01, 0xe0, 0x3c, 0x00, - 0x3b, 0x48, 0xc4, 0xed, 0x23, 0x10 -}; - -const uint8_t kMaskRandom44_4[24] = { - 0xc4, 0xd8, 0x9b, 0x13, 0x62, 0x60, - 0x31, 0x66, 0x2c, 0xc5, 0x98, 0xb0, - 0x4b, 0x29, 0x65, 0x2c, 0xa5, 0x90, - 0x2c, 0xa5, 0x94, 0xb2, 0x96, 0x50 -}; - -const uint8_t kMaskRandom44_40[240] = { - 0x64, 0x4c, 0x89, 0x91, 0x32, 0x20, - 0x51, 0x4a, 0x29, 0x45, 0x28, 0xa0, - 0xa9, 0x15, 0x22, 0xa4, 0x54, 0x80, - 0x04, 0xc0, 0x98, 0x13, 0x02, 0x60, - 0xd0, 0x1a, 0x03, 0x40, 0x68, 0x00, - 0x82, 0x50, 0x4a, 0x09, 0x41, 0x20, - 0x21, 0x24, 0x24, 0x84, 0x90, 0x90, - 0x0c, 0x21, 0x84, 0x30, 0x86, 0x10, - 0x4a, 0x09, 0x41, 0x28, 0x25, 0x00, - 0x12, 0xa2, 0x54, 0x4a, 0x89, 0x50, - 0x46, 0x48, 0xc9, 0x19, 0x23, 0x20, - 0x62, 0x6c, 0x4d, 0x89, 0xb1, 0x30, - 0x8c, 0x11, 0x82, 0x30, 0x46, 0x00, - 0x01, 0x60, 0x2c, 0x05, 0x80, 0xb0, - 0x07, 0x80, 0xf0, 0x1e, 0x03, 0xc0, - 0xa0, 0x94, 0x12, 0x82, 0x50, 0x40, - 0x18, 0xa3, 0x14, 0x62, 0x8c, 0x50, - 0x91, 0x12, 0x22, 0x44, 0x48, 0x80, - 0x78, 0x0f, 0x01, 0xe0, 0x3c, 0x00, - 0x3b, 0x48, 0xc4, 0xed, 0x23, 0x10, - 0x46, 0x48, 0xc9, 0x19, 0x23, 0x20, - 0x62, 0x6c, 0x4d, 0x89, 0xb1, 0x30, - 0x8c, 0x11, 0x82, 0x30, 0x46, 0x00, - 0x01, 0x60, 0x2c, 0x05, 0x80, 0xb0, - 0x07, 0x80, 0xf0, 0x1e, 0x03, 0xc0, - 0xa0, 0x94, 0x12, 0x82, 0x50, 0x40, - 0x18, 0xa3, 0x14, 0x62, 0x8c, 0x50, - 0x91, 0x12, 0x22, 0x44, 0x48, 0x80, - 0x78, 0x0f, 0x01, 0xe0, 0x3c, 0x00, - 0x64, 0x4c, 0x89, 0x91, 0x32, 0x20, - 0x51, 0x4a, 0x29, 0x45, 0x28, 0xa0, - 0xa9, 0x15, 0x22, 0xa4, 0x54, 0x80, - 0x04, 0xc0, 0x98, 0x13, 0x02, 0x60, - 0xd0, 0x1a, 0x03, 0x40, 0x68, 0x00, - 0x82, 0x50, 0x4a, 0x09, 0x41, 0x20, - 0x21, 0x24, 0x24, 0x84, 0x90, 0x90, - 0x0c, 0x21, 0x84, 0x30, 0x86, 0x10, - 0x4a, 0x09, 0x41, 0x28, 0x25, 0x00, - 0x12, 0xa2, 0x54, 0x4a, 0x89, 0x50, - 0xd8, 0x2a, 0x16, 0x26, 0x51, 0x40 -}; - -const uint8_t kMaskRandom44_41[246] = { - 0x64, 0x4c, 0x89, 0x91, 0x32, 0x20, - 0x51, 0x4a, 0x29, 0x45, 0x28, 0xa0, - 0xa9, 0x15, 0x22, 0xa4, 0x54, 0x80, - 0x04, 0xc0, 0x98, 0x13, 0x02, 0x60, - 0xd0, 0x1a, 0x03, 0x40, 0x68, 0x00, - 0x82, 0x50, 0x4a, 0x09, 0x41, 0x20, - 0x21, 0x24, 0x24, 0x84, 0x90, 0x90, - 0x0c, 0x21, 0x84, 0x30, 0x86, 0x10, - 0x4a, 0x09, 0x41, 0x28, 0x25, 0x00, - 0x12, 0xa2, 0x54, 0x4a, 0x89, 0x50, - 0x46, 0x48, 0xc9, 0x19, 0x23, 0x20, - 0x62, 0x6c, 0x4d, 0x89, 0xb1, 0x30, - 0x8c, 0x11, 0x82, 0x30, 0x46, 0x00, - 0x01, 0x60, 0x2c, 0x05, 0x80, 0xb0, - 0x07, 0x80, 0xf0, 0x1e, 0x03, 0xc0, - 0xa0, 0x94, 0x12, 0x82, 0x50, 0x40, - 0x18, 0xa3, 0x14, 0x62, 0x8c, 0x50, - 0x91, 0x12, 0x22, 0x44, 0x48, 0x80, - 0x78, 0x0f, 0x01, 0xe0, 0x3c, 0x00, - 0x3b, 0x48, 0xc4, 0xed, 0x23, 0x10, - 0x64, 0x4c, 0x89, 0x91, 0x32, 0x20, - 0x51, 0x4a, 0x29, 0x45, 0x28, 0xa0, - 0xa9, 0x15, 0x22, 0xa4, 0x54, 0x80, - 0x04, 0xc0, 0x98, 0x13, 0x02, 0x60, - 0xd0, 0x1a, 0x03, 0x40, 0x68, 0x00, - 0x82, 0x50, 0x4a, 0x09, 0x41, 0x20, - 0x21, 0x24, 0x24, 0x84, 0x90, 0x90, - 0x0c, 0x21, 0x84, 0x30, 0x86, 0x10, - 0x4a, 0x09, 0x41, 0x28, 0x25, 0x00, - 0x12, 0xa2, 0x54, 0x4a, 0x89, 0x50, - 0x46, 0x48, 0xc9, 0x19, 0x23, 0x20, - 0x33, 0x26, 0x64, 0xcc, 0x99, 0x90, - 0x99, 0x13, 0x22, 0x64, 0x4c, 0x80, - 0x05, 0x80, 0xb0, 0x16, 0x02, 0xc0, - 0x80, 0xb0, 0x16, 0x02, 0xc0, 0x50, - 0x84, 0x50, 0x8a, 0x11, 0x42, 0x20, - 0x40, 0x68, 0x0d, 0x01, 0xa0, 0x30, - 0x0a, 0x81, 0x50, 0x2a, 0x05, 0x40, - 0x68, 0x0d, 0x01, 0xa0, 0x34, 0x00, - 0x10, 0x22, 0x04, 0x40, 0x88, 0x10, - 0x30, 0x46, 0x08, 0xc1, 0x18, 0x20 -}; - -const uint8_t kMaskRandom44_42[252] = { - 0x64, 0x4c, 0x89, 0x91, 0x32, 0x20, - 0x51, 0x4a, 0x29, 0x45, 0x28, 0xa0, - 0xa9, 0x15, 0x22, 0xa4, 0x54, 0x80, - 0x04, 0xc0, 0x98, 0x13, 0x02, 0x60, - 0xd0, 0x1a, 0x03, 0x40, 0x68, 0x00, - 0x82, 0x50, 0x4a, 0x09, 0x41, 0x20, - 0x21, 0x24, 0x24, 0x84, 0x90, 0x90, - 0x0c, 0x21, 0x84, 0x30, 0x86, 0x10, - 0x4a, 0x09, 0x41, 0x28, 0x25, 0x00, - 0x12, 0xa2, 0x54, 0x4a, 0x89, 0x50, - 0x46, 0x48, 0xc9, 0x19, 0x23, 0x20, - 0x33, 0x26, 0x64, 0xcc, 0x99, 0x90, - 0x99, 0x13, 0x22, 0x64, 0x4c, 0x80, - 0x05, 0x80, 0xb0, 0x16, 0x02, 0xc0, - 0x80, 0xb0, 0x16, 0x02, 0xc0, 0x50, - 0x84, 0x50, 0x8a, 0x11, 0x42, 0x20, - 0x40, 0x68, 0x0d, 0x01, 0xa0, 0x30, - 0x0a, 0x81, 0x50, 0x2a, 0x05, 0x40, - 0x68, 0x0d, 0x01, 0xa0, 0x34, 0x00, - 0x10, 0x22, 0x04, 0x40, 0x88, 0x10, - 0x30, 0x46, 0x08, 0xc1, 0x18, 0x20, - 0x64, 0x4c, 0x89, 0x91, 0x32, 0x20, - 0x51, 0x4a, 0x29, 0x45, 0x28, 0xa0, - 0xa9, 0x15, 0x22, 0xa4, 0x54, 0x80, - 0x04, 0xc0, 0x98, 0x13, 0x02, 0x60, - 0xd0, 0x1a, 0x03, 0x40, 0x68, 0x00, - 0x82, 0x50, 0x4a, 0x09, 0x41, 0x20, - 0x21, 0x24, 0x24, 0x84, 0x90, 0x90, - 0x0c, 0x21, 0x84, 0x30, 0x86, 0x10, - 0x4a, 0x09, 0x41, 0x28, 0x25, 0x00, - 0x12, 0xa2, 0x54, 0x4a, 0x89, 0x50, - 0x46, 0x48, 0xc9, 0x19, 0x23, 0x20, - 0x62, 0x6c, 0x4d, 0x89, 0xb1, 0x30, - 0x8c, 0x11, 0x82, 0x30, 0x46, 0x00, - 0x01, 0x60, 0x2c, 0x05, 0x80, 0xb0, - 0x07, 0x80, 0xf0, 0x1e, 0x03, 0xc0, - 0xa0, 0x94, 0x12, 0x82, 0x50, 0x40, - 0x18, 0xa3, 0x14, 0x62, 0x8c, 0x50, - 0x91, 0x12, 0x22, 0x44, 0x48, 0x80, - 0x78, 0x0f, 0x01, 0xe0, 0x3c, 0x00, - 0x3b, 0x48, 0xc4, 0xed, 0x23, 0x10, - 0xd9, 0xc1, 0x6f, 0xa8, 0x1c, 0x90 -}; - -const uint8_t kMaskRandom44_43[258] = { - 0x64, 0x4c, 0x89, 0x91, 0x32, 0x20, - 0x51, 0x4a, 0x29, 0x45, 0x28, 0xa0, - 0xa9, 0x15, 0x22, 0xa4, 0x54, 0x80, - 0x04, 0xc0, 0x98, 0x13, 0x02, 0x60, - 0xd0, 0x1a, 0x03, 0x40, 0x68, 0x00, - 0x82, 0x50, 0x4a, 0x09, 0x41, 0x20, - 0x21, 0x24, 0x24, 0x84, 0x90, 0x90, - 0x0c, 0x21, 0x84, 0x30, 0x86, 0x10, - 0x4a, 0x09, 0x41, 0x28, 0x25, 0x00, - 0x12, 0xa2, 0x54, 0x4a, 0x89, 0x50, - 0x46, 0x48, 0xc9, 0x19, 0x23, 0x20, - 0x33, 0x26, 0x64, 0xcc, 0x99, 0x90, - 0x99, 0x13, 0x22, 0x64, 0x4c, 0x80, - 0x05, 0x80, 0xb0, 0x16, 0x02, 0xc0, - 0x80, 0xb0, 0x16, 0x02, 0xc0, 0x50, - 0x84, 0x50, 0x8a, 0x11, 0x42, 0x20, - 0x40, 0x68, 0x0d, 0x01, 0xa0, 0x30, - 0x0a, 0x81, 0x50, 0x2a, 0x05, 0x40, - 0x68, 0x0d, 0x01, 0xa0, 0x34, 0x00, - 0x10, 0x22, 0x04, 0x40, 0x88, 0x10, - 0x30, 0x46, 0x08, 0xc1, 0x18, 0x20, - 0x46, 0x48, 0xc9, 0x19, 0x23, 0x20, - 0x33, 0x26, 0x64, 0xcc, 0x99, 0x90, - 0x99, 0x13, 0x22, 0x64, 0x4c, 0x80, - 0x05, 0x80, 0xb0, 0x16, 0x02, 0xc0, - 0x80, 0xb0, 0x16, 0x02, 0xc0, 0x50, - 0x84, 0x50, 0x8a, 0x11, 0x42, 0x20, - 0x40, 0x68, 0x0d, 0x01, 0xa0, 0x30, - 0x0a, 0x81, 0x50, 0x2a, 0x05, 0x40, - 0x68, 0x0d, 0x01, 0xa0, 0x34, 0x00, - 0x10, 0x22, 0x04, 0x40, 0x88, 0x10, - 0x30, 0x46, 0x08, 0xc1, 0x18, 0x20, - 0x64, 0x4c, 0x89, 0x91, 0x32, 0x20, - 0x51, 0x4a, 0x29, 0x45, 0x28, 0xa0, - 0xa9, 0x15, 0x22, 0xa4, 0x54, 0x80, - 0x04, 0xc0, 0x98, 0x13, 0x02, 0x60, - 0xd0, 0x1a, 0x03, 0x40, 0x68, 0x00, - 0x82, 0x50, 0x4a, 0x09, 0x41, 0x20, - 0x21, 0x24, 0x24, 0x84, 0x90, 0x90, - 0x0c, 0x21, 0x84, 0x30, 0x86, 0x10, - 0x4a, 0x09, 0x41, 0x28, 0x25, 0x00, - 0x12, 0xa2, 0x54, 0x4a, 0x89, 0x50, - 0x9e, 0xce, 0x8a, 0x7b, 0x3a, 0x20 -}; - -const uint8_t kMaskRandom44_44[264] = { - 0x46, 0x48, 0xc9, 0x19, 0x23, 0x20, - 0x33, 0x26, 0x64, 0xcc, 0x99, 0x90, - 0x99, 0x13, 0x22, 0x64, 0x4c, 0x80, - 0x05, 0x80, 0xb0, 0x16, 0x02, 0xc0, - 0x80, 0xb0, 0x16, 0x02, 0xc0, 0x50, - 0x84, 0x50, 0x8a, 0x11, 0x42, 0x20, - 0x40, 0x68, 0x0d, 0x01, 0xa0, 0x30, - 0x0a, 0x81, 0x50, 0x2a, 0x05, 0x40, - 0x68, 0x0d, 0x01, 0xa0, 0x34, 0x00, - 0x10, 0x22, 0x04, 0x40, 0x88, 0x10, - 0x30, 0x46, 0x08, 0xc1, 0x18, 0x20, - 0x64, 0x4c, 0x89, 0x91, 0x32, 0x20, - 0x51, 0x4a, 0x29, 0x45, 0x28, 0xa0, - 0xa9, 0x15, 0x22, 0xa4, 0x54, 0x80, - 0x04, 0xc0, 0x98, 0x13, 0x02, 0x60, - 0xd0, 0x1a, 0x03, 0x40, 0x68, 0x00, - 0x82, 0x50, 0x4a, 0x09, 0x41, 0x20, - 0x21, 0x24, 0x24, 0x84, 0x90, 0x90, - 0x0c, 0x21, 0x84, 0x30, 0x86, 0x10, - 0x4a, 0x09, 0x41, 0x28, 0x25, 0x00, - 0x12, 0xa2, 0x54, 0x4a, 0x89, 0x50, - 0x9e, 0xce, 0x8a, 0x7b, 0x3a, 0x20, - 0x64, 0x4c, 0x89, 0x91, 0x32, 0x20, - 0x51, 0x4a, 0x29, 0x45, 0x28, 0xa0, - 0xa9, 0x15, 0x22, 0xa4, 0x54, 0x80, - 0x04, 0xc0, 0x98, 0x13, 0x02, 0x60, - 0xd0, 0x1a, 0x03, 0x40, 0x68, 0x00, - 0x82, 0x50, 0x4a, 0x09, 0x41, 0x20, - 0x21, 0x24, 0x24, 0x84, 0x90, 0x90, - 0x0c, 0x21, 0x84, 0x30, 0x86, 0x10, - 0x4a, 0x09, 0x41, 0x28, 0x25, 0x00, - 0x12, 0xa2, 0x54, 0x4a, 0x89, 0x50, - 0x46, 0x48, 0xc9, 0x19, 0x23, 0x20, - 0x33, 0x26, 0x64, 0xcc, 0x99, 0x90, - 0x99, 0x13, 0x22, 0x64, 0x4c, 0x80, - 0x05, 0x80, 0xb0, 0x16, 0x02, 0xc0, - 0x80, 0xb0, 0x16, 0x02, 0xc0, 0x50, - 0x84, 0x50, 0x8a, 0x11, 0x42, 0x20, - 0x40, 0x68, 0x0d, 0x01, 0xa0, 0x30, - 0x0a, 0x81, 0x50, 0x2a, 0x05, 0x40, - 0x68, 0x0d, 0x01, 0xa0, 0x34, 0x00, - 0x10, 0x22, 0x04, 0x40, 0x88, 0x10, - 0x30, 0x46, 0x08, 0xc1, 0x18, 0x20, - 0xb5, 0x1c, 0x1c, 0x21, 0xac, 0xa0 -}; - -const uint8_t kMaskRandom44_5[30] = { - 0xc6, 0xd8, 0xdb, 0x1b, 0x63, 0x60, - 0x63, 0x6c, 0x6d, 0x8d, 0xb1, 0xb0, - 0x1d, 0xa3, 0xb4, 0x76, 0x8e, 0xd0, - 0xad, 0x55, 0xaa, 0xb5, 0x56, 0xa0, - 0xb2, 0xb6, 0x56, 0xca, 0xd9, 0x50 -}; - -const uint8_t kMaskRandom44_6[36] = { - 0x64, 0x4c, 0x89, 0x91, 0x32, 0x20, - 0x51, 0x4a, 0x29, 0x45, 0x28, 0xa0, - 0xa8, 0x35, 0x06, 0xa0, 0xd4, 0x10, - 0xc4, 0xa0, 0x97, 0x12, 0x82, 0x50, - 0x03, 0x60, 0x6c, 0x0d, 0x81, 0xb0, - 0x90, 0xd2, 0x1a, 0x43, 0x48, 0x60 -}; - -const uint8_t kMaskRandom44_7[42] = { - 0xc6, 0x48, 0xcb, 0x19, 0x23, 0x20, - 0x13, 0x26, 0x64, 0x4c, 0x99, 0x90, - 0x8d, 0x13, 0xa2, 0x34, 0x4e, 0x80, - 0x8b, 0x41, 0x6a, 0x2d, 0x05, 0xa0, - 0x52, 0xaa, 0x15, 0x4a, 0xa8, 0x50, - 0xa2, 0xd4, 0x1a, 0x8b, 0x50, 0x60, - 0x61, 0xa8, 0x2d, 0x86, 0xa0, 0xb0 -}; - -const uint8_t kMaskRandom44_8[48] = { - 0x28, 0x85, 0x38, 0xa2, 0x14, 0xe0, - 0x21, 0xf4, 0x04, 0x87, 0xd0, 0x10, - 0xe9, 0x1d, 0x03, 0xa4, 0x74, 0x00, - 0x17, 0x02, 0xe0, 0x5c, 0x0b, 0x80, - 0x83, 0xa0, 0x56, 0x0e, 0x81, 0x50, - 0x46, 0x18, 0xe9, 0x18, 0x63, 0xa0, - 0x50, 0x6a, 0x0d, 0x41, 0xa8, 0x30, - 0x1c, 0x23, 0x84, 0x70, 0x8e, 0x10 -}; - -const uint8_t kMaskRandom44_9[54] = { - 0x44, 0x48, 0xc9, 0x11, 0x23, 0x20, - 0x28, 0x2d, 0x0c, 0xa0, 0xb4, 0x30, - 0x25, 0x14, 0xa0, 0x94, 0x52, 0x80, - 0x59, 0x0a, 0x21, 0x64, 0x28, 0x80, - 0x03, 0xa0, 0x34, 0x0e, 0x80, 0xd0, - 0xc0, 0xd0, 0x1b, 0x03, 0x40, 0x60, - 0xa2, 0x30, 0x46, 0x88, 0xc1, 0x10, - 0x14, 0x82, 0xd0, 0x52, 0x0b, 0x40, - 0x9a, 0x03, 0x82, 0x68, 0x0e, 0x00 -}; - -const uint8_t kMaskRandom45_1[6] = { - 0xff, 0xff, 0xff, 0xff, 0xff, 0xf8 -}; - -const uint8_t kMaskRandom45_10[60] = { - 0xc0, 0x38, 0x89, 0x91, 0x28, 0xa0, - 0x30, 0x0e, 0x29, 0x45, 0x22, 0x88, - 0xe8, 0x07, 0x02, 0xa4, 0x40, 0x68, - 0x85, 0x08, 0xa8, 0x13, 0x12, 0x10, - 0xd0, 0x92, 0x13, 0x40, 0x05, 0x10, - 0x86, 0x50, 0x4a, 0x09, 0x00, 0x70, - 0x4a, 0x68, 0x0c, 0x84, 0xdc, 0x00, - 0x01, 0xa0, 0x74, 0x30, 0x84, 0x88, - 0x4c, 0x81, 0x91, 0x28, 0x2b, 0x00, - 0x62, 0x24, 0x04, 0x4a, 0xd1, 0x40 -}; - -const uint8_t kMaskRandom45_11[66] = { - 0x46, 0x48, 0xc9, 0x19, 0x29, 0xb0, - 0x33, 0x26, 0x64, 0xcc, 0x90, 0x98, - 0x99, 0x13, 0x22, 0x64, 0x08, 0x48, - 0x05, 0x80, 0xb0, 0x16, 0x00, 0x38, - 0x80, 0xb0, 0x16, 0x02, 0x86, 0x08, - 0x84, 0x50, 0x8a, 0x11, 0x20, 0x60, - 0x40, 0x68, 0x0d, 0x01, 0xb5, 0x00, - 0x0a, 0x81, 0x50, 0x2a, 0x43, 0x00, - 0x68, 0x0d, 0x01, 0xa0, 0x12, 0x40, - 0x10, 0x22, 0x04, 0x40, 0xc4, 0x80, - 0x30, 0x46, 0x08, 0xc1, 0x60, 0x10 -}; - -const uint8_t kMaskRandom45_12[72] = { - 0x64, 0x4c, 0x89, 0x91, 0x28, 0xa0, - 0x51, 0x4a, 0x29, 0x45, 0x62, 0x88, - 0x0c, 0xa1, 0x94, 0x32, 0x90, 0xc0, - 0xa1, 0x34, 0x26, 0x84, 0x89, 0x18, - 0x12, 0xa2, 0x54, 0x4a, 0x84, 0x70, - 0x8a, 0x51, 0x4a, 0x29, 0x17, 0x00, - 0x86, 0x90, 0xd2, 0x1a, 0x29, 0xb0, - 0x23, 0x24, 0x64, 0x8c, 0xb2, 0x10, - 0x16, 0x22, 0xc4, 0x58, 0x86, 0x60, - 0x4c, 0x29, 0x85, 0x30, 0xc1, 0x50, - 0x41, 0xc8, 0x39, 0x07, 0x04, 0x98, - 0xf4, 0x18, 0x9c, 0x65, 0x5b, 0x90 -}; - -const uint8_t kMaskRandom45_13[78] = { - 0x64, 0x4c, 0x89, 0x91, 0x28, 0xa0, - 0x51, 0x4a, 0x29, 0x45, 0x62, 0x88, - 0x0c, 0xa1, 0x94, 0x32, 0x90, 0xc0, - 0xa1, 0x34, 0x26, 0x84, 0x89, 0x18, - 0x12, 0xa2, 0x54, 0x4a, 0x84, 0x70, - 0x8a, 0x51, 0x4a, 0x29, 0x17, 0x00, - 0x46, 0x48, 0xc9, 0x19, 0x29, 0xb0, - 0x33, 0x26, 0x64, 0xcc, 0x90, 0x98, - 0x91, 0x92, 0x32, 0x46, 0x48, 0x48, - 0xa4, 0x34, 0x86, 0x90, 0x81, 0x28, - 0x50, 0xaa, 0x15, 0x42, 0x83, 0x50, - 0x84, 0xd0, 0x9a, 0x13, 0x16, 0x00, - 0x09, 0x61, 0x2c, 0x25, 0xc4, 0x30 -}; - -const uint8_t kMaskRandom45_14[84] = { - 0x46, 0x48, 0xc9, 0x19, 0x29, 0xb0, - 0x33, 0x26, 0x64, 0xcc, 0x90, 0x98, - 0x91, 0x92, 0x32, 0x46, 0x48, 0x48, - 0xa4, 0x34, 0x86, 0x90, 0x81, 0x28, - 0x50, 0xaa, 0x15, 0x42, 0x83, 0x50, - 0x84, 0xd0, 0x9a, 0x13, 0x16, 0x00, - 0x09, 0x61, 0x2c, 0x25, 0xc4, 0x30, - 0x64, 0x4c, 0x89, 0x91, 0x28, 0xa0, - 0x51, 0x4a, 0x29, 0x45, 0x62, 0x88, - 0x0c, 0xa1, 0x94, 0x32, 0x90, 0xc0, - 0xa1, 0x34, 0x26, 0x84, 0x89, 0x18, - 0x12, 0xa2, 0x54, 0x4a, 0x84, 0x70, - 0x8a, 0x51, 0x4a, 0x29, 0x17, 0x00, - 0xc6, 0xca, 0xea, 0x70, 0xfe, 0xc8 -}; - -const uint8_t kMaskRandom45_15[90] = { - 0x46, 0x48, 0xc9, 0x19, 0x29, 0xb0, - 0x33, 0x26, 0x64, 0xcc, 0x90, 0x98, - 0x91, 0x92, 0x32, 0x46, 0x48, 0x48, - 0xa4, 0x34, 0x86, 0x90, 0x81, 0x28, - 0x50, 0xaa, 0x15, 0x42, 0x83, 0x50, - 0x84, 0xd0, 0x9a, 0x13, 0x16, 0x00, - 0x09, 0x61, 0x2c, 0x25, 0xc4, 0x30, - 0x0c, 0x81, 0x90, 0x32, 0x10, 0x30, - 0x80, 0x70, 0x0e, 0x01, 0xc0, 0x18, - 0xa0, 0x94, 0x12, 0x82, 0x21, 0x20, - 0x05, 0x40, 0xa8, 0x15, 0x00, 0xc8, - 0x43, 0x08, 0x61, 0x0c, 0x0a, 0x08, - 0x1a, 0x03, 0x40, 0x68, 0x05, 0x40, - 0x60, 0x2c, 0x05, 0x80, 0x9c, 0x00, - 0x14, 0x22, 0x84, 0x50, 0xe2, 0x80 -}; - -const uint8_t kMaskRandom45_16[96] = { - 0x0c, 0x81, 0x90, 0x32, 0x10, 0x30, - 0x80, 0x70, 0x0e, 0x01, 0xc0, 0x18, - 0xa0, 0x94, 0x12, 0x82, 0x21, 0x20, - 0x05, 0x40, 0xa8, 0x15, 0x00, 0xc8, - 0x43, 0x08, 0x61, 0x0c, 0x0a, 0x08, - 0x1a, 0x03, 0x40, 0x68, 0x05, 0x40, - 0x60, 0x2c, 0x05, 0x80, 0x9c, 0x00, - 0x14, 0x22, 0x84, 0x50, 0xe2, 0x80, - 0x46, 0x48, 0xc9, 0x19, 0x29, 0xb0, - 0x33, 0x26, 0x64, 0xcc, 0x90, 0x98, - 0x91, 0x92, 0x32, 0x46, 0x48, 0x48, - 0xa4, 0x34, 0x86, 0x90, 0x81, 0x28, - 0x50, 0xaa, 0x15, 0x42, 0x83, 0x50, - 0x84, 0xd0, 0x9a, 0x13, 0x16, 0x00, - 0x09, 0x61, 0x2c, 0x25, 0xc4, 0x30, - 0x86, 0xc1, 0x47, 0xeb, 0x67, 0xd0 -}; - -const uint8_t kMaskRandom45_17[102] = { - 0x0c, 0x81, 0x90, 0x32, 0x10, 0x30, - 0x80, 0x70, 0x0e, 0x01, 0xc0, 0x18, - 0xa0, 0x94, 0x12, 0x82, 0x21, 0x20, - 0x05, 0x40, 0xa8, 0x15, 0x00, 0xc8, - 0x43, 0x08, 0x61, 0x0c, 0x0a, 0x08, - 0x1a, 0x03, 0x40, 0x68, 0x05, 0x40, - 0x60, 0x2c, 0x05, 0x80, 0x9c, 0x00, - 0x14, 0x22, 0x84, 0x50, 0xe2, 0x80, - 0x46, 0x48, 0xc9, 0x19, 0x29, 0xb0, - 0x62, 0x6c, 0x4d, 0x89, 0xf2, 0x10, - 0x8c, 0x11, 0x82, 0x30, 0x12, 0x20, - 0x01, 0x60, 0x2c, 0x05, 0xd0, 0x88, - 0x07, 0x80, 0xf0, 0x1e, 0x0c, 0x18, - 0xa0, 0x94, 0x12, 0x82, 0x01, 0xc8, - 0x18, 0xa3, 0x14, 0x62, 0xc5, 0x08, - 0x91, 0x12, 0x22, 0x44, 0x02, 0x48, - 0x78, 0x0f, 0x01, 0xe0, 0x00, 0x70 -}; - -const uint8_t kMaskRandom45_18[108] = { - 0x46, 0x48, 0xc9, 0x19, 0x29, 0xb0, - 0x62, 0x6c, 0x4d, 0x89, 0xf2, 0x10, - 0x8c, 0x11, 0x82, 0x30, 0x12, 0x20, - 0x01, 0x60, 0x2c, 0x05, 0xd0, 0x88, - 0x07, 0x80, 0xf0, 0x1e, 0x0c, 0x18, - 0xa0, 0x94, 0x12, 0x82, 0x01, 0xc8, - 0x18, 0xa3, 0x14, 0x62, 0xc5, 0x08, - 0x91, 0x12, 0x22, 0x44, 0x02, 0x48, - 0x78, 0x0f, 0x01, 0xe0, 0x00, 0x70, - 0x0c, 0x81, 0x90, 0x32, 0x10, 0x30, - 0x80, 0x70, 0x0e, 0x01, 0xc0, 0x18, - 0xa0, 0x94, 0x12, 0x82, 0x21, 0x20, - 0x05, 0x40, 0xa8, 0x15, 0x00, 0xc8, - 0x43, 0x08, 0x61, 0x0c, 0x0a, 0x08, - 0x1a, 0x03, 0x40, 0x68, 0x05, 0x40, - 0x60, 0x2c, 0x05, 0x80, 0x9c, 0x00, - 0x14, 0x22, 0x84, 0x50, 0xe2, 0x80, - 0xe4, 0xd4, 0x6e, 0x08, 0xc9, 0x58 -}; - -const uint8_t kMaskRandom45_19[114] = { - 0x46, 0x48, 0xc9, 0x19, 0x29, 0xb0, - 0x62, 0x6c, 0x4d, 0x89, 0xf2, 0x10, - 0x8c, 0x11, 0x82, 0x30, 0x12, 0x20, - 0x01, 0x60, 0x2c, 0x05, 0xd0, 0x88, - 0x07, 0x80, 0xf0, 0x1e, 0x0c, 0x18, - 0xa0, 0x94, 0x12, 0x82, 0x01, 0xc8, - 0x18, 0xa3, 0x14, 0x62, 0xc5, 0x08, - 0x91, 0x12, 0x22, 0x44, 0x02, 0x48, - 0x78, 0x0f, 0x01, 0xe0, 0x00, 0x70, - 0x64, 0x4c, 0x89, 0x91, 0x28, 0xa0, - 0x51, 0x4a, 0x29, 0x45, 0x22, 0x88, - 0xa9, 0x15, 0x22, 0xa4, 0x40, 0x68, - 0x04, 0xc0, 0x98, 0x13, 0x12, 0x10, - 0xd0, 0x1a, 0x03, 0x40, 0x05, 0x10, - 0x82, 0x50, 0x4a, 0x09, 0x00, 0x70, - 0x21, 0x24, 0x24, 0x84, 0xdc, 0x00, - 0x0c, 0x21, 0x84, 0x30, 0x84, 0x88, - 0x4a, 0x09, 0x41, 0x28, 0x2b, 0x00, - 0x12, 0xa2, 0x54, 0x4a, 0xd1, 0x40 -}; - -const uint8_t kMaskRandom45_2[12] = { - 0xec, 0xdd, 0x9b, 0xb3, 0x76, 0x60, - 0x9b, 0xb3, 0x76, 0x6e, 0xc9, 0xd8 -}; - -const uint8_t kMaskRandom45_20[120] = { - 0x64, 0x4c, 0x89, 0x91, 0x28, 0xa0, - 0x51, 0x4a, 0x29, 0x45, 0x22, 0x88, - 0xa9, 0x15, 0x22, 0xa4, 0x40, 0x68, - 0x04, 0xc0, 0x98, 0x13, 0x12, 0x10, - 0xd0, 0x1a, 0x03, 0x40, 0x05, 0x10, - 0x82, 0x50, 0x4a, 0x09, 0x00, 0x70, - 0x21, 0x24, 0x24, 0x84, 0xdc, 0x00, - 0x0c, 0x21, 0x84, 0x30, 0x84, 0x88, - 0x4a, 0x09, 0x41, 0x28, 0x2b, 0x00, - 0x12, 0xa2, 0x54, 0x4a, 0xd1, 0x40, - 0x46, 0x48, 0xc9, 0x19, 0x29, 0xb0, - 0x62, 0x6c, 0x4d, 0x89, 0xf2, 0x10, - 0x8c, 0x11, 0x82, 0x30, 0x12, 0x20, - 0x01, 0x60, 0x2c, 0x05, 0xd0, 0x88, - 0x07, 0x80, 0xf0, 0x1e, 0x0c, 0x18, - 0xa0, 0x94, 0x12, 0x82, 0x01, 0xc8, - 0x18, 0xa3, 0x14, 0x62, 0xc5, 0x08, - 0x91, 0x12, 0x22, 0x44, 0x02, 0x48, - 0x78, 0x0f, 0x01, 0xe0, 0x00, 0x70, - 0x3b, 0x48, 0xc7, 0x6d, 0x29, 0xe8 -}; - -const uint8_t kMaskRandom45_21[126] = { - 0x64, 0x4c, 0x89, 0x91, 0x28, 0xa0, - 0x51, 0x4a, 0x29, 0x45, 0x22, 0x88, - 0xa9, 0x15, 0x22, 0xa4, 0x40, 0x68, - 0x04, 0xc0, 0x98, 0x13, 0x12, 0x10, - 0xd0, 0x1a, 0x03, 0x40, 0x05, 0x10, - 0x82, 0x50, 0x4a, 0x09, 0x00, 0x70, - 0x21, 0x24, 0x24, 0x84, 0xdc, 0x00, - 0x0c, 0x21, 0x84, 0x30, 0x84, 0x88, - 0x4a, 0x09, 0x41, 0x28, 0x2b, 0x00, - 0x12, 0xa2, 0x54, 0x4a, 0xd1, 0x40, - 0x46, 0x48, 0xc9, 0x19, 0x29, 0xb0, - 0x33, 0x26, 0x64, 0xcc, 0x90, 0x98, - 0x99, 0x13, 0x22, 0x64, 0x08, 0x48, - 0x05, 0x80, 0xb0, 0x16, 0x00, 0x38, - 0x80, 0xb0, 0x16, 0x02, 0x86, 0x08, - 0x84, 0x50, 0x8a, 0x11, 0x20, 0x60, - 0x40, 0x68, 0x0d, 0x01, 0xb5, 0x00, - 0x0a, 0x81, 0x50, 0x2a, 0x43, 0x00, - 0x68, 0x0d, 0x01, 0xa0, 0x12, 0x40, - 0x10, 0x22, 0x04, 0x40, 0xc4, 0x80, - 0x30, 0x46, 0x08, 0xc1, 0x60, 0x10 -}; - -const uint8_t kMaskRandom45_22[132] = { - 0x46, 0x48, 0xc9, 0x19, 0x29, 0xb0, - 0x33, 0x26, 0x64, 0xcc, 0x90, 0x98, - 0x99, 0x13, 0x22, 0x64, 0x08, 0x48, - 0x05, 0x80, 0xb0, 0x16, 0x00, 0x38, - 0x80, 0xb0, 0x16, 0x02, 0x86, 0x08, - 0x84, 0x50, 0x8a, 0x11, 0x20, 0x60, - 0x40, 0x68, 0x0d, 0x01, 0xb5, 0x00, - 0x0a, 0x81, 0x50, 0x2a, 0x43, 0x00, - 0x68, 0x0d, 0x01, 0xa0, 0x12, 0x40, - 0x10, 0x22, 0x04, 0x40, 0xc4, 0x80, - 0x30, 0x46, 0x08, 0xc1, 0x60, 0x10, - 0x64, 0x4c, 0x89, 0x91, 0x28, 0xa0, - 0x51, 0x4a, 0x29, 0x45, 0x22, 0x88, - 0xa9, 0x15, 0x22, 0xa4, 0x40, 0x68, - 0x04, 0xc0, 0x98, 0x13, 0x12, 0x10, - 0xd0, 0x1a, 0x03, 0x40, 0x05, 0x10, - 0x82, 0x50, 0x4a, 0x09, 0x00, 0x70, - 0x21, 0x24, 0x24, 0x84, 0xdc, 0x00, - 0x0c, 0x21, 0x84, 0x30, 0x84, 0x88, - 0x4a, 0x09, 0x41, 0x28, 0x2b, 0x00, - 0x12, 0xa2, 0x54, 0x4a, 0xd1, 0x40, - 0x9e, 0xce, 0x8b, 0xaa, 0x34, 0x68 -}; - -const uint8_t kMaskRandom45_23[138] = { - 0x46, 0x48, 0xc9, 0x19, 0x29, 0xb0, - 0x33, 0x26, 0x64, 0xcc, 0x90, 0x98, - 0x99, 0x13, 0x22, 0x64, 0x08, 0x48, - 0x05, 0x80, 0xb0, 0x16, 0x00, 0x38, - 0x80, 0xb0, 0x16, 0x02, 0x86, 0x08, - 0x84, 0x50, 0x8a, 0x11, 0x20, 0x60, - 0x40, 0x68, 0x0d, 0x01, 0xb5, 0x00, - 0x0a, 0x81, 0x50, 0x2a, 0x43, 0x00, - 0x68, 0x0d, 0x01, 0xa0, 0x12, 0x40, - 0x10, 0x22, 0x04, 0x40, 0xc4, 0x80, - 0x30, 0x46, 0x08, 0xc1, 0x60, 0x10, - 0x64, 0x4c, 0x89, 0x91, 0x28, 0xa0, - 0x51, 0x4a, 0x29, 0x45, 0x62, 0x88, - 0x0c, 0xa1, 0x94, 0x32, 0x90, 0xc0, - 0xa1, 0x34, 0x26, 0x84, 0x89, 0x18, - 0x12, 0xa2, 0x54, 0x4a, 0x84, 0x70, - 0x8a, 0x51, 0x4a, 0x29, 0x17, 0x00, - 0x86, 0x90, 0xd2, 0x1a, 0x29, 0xb0, - 0x23, 0x24, 0x64, 0x8c, 0xb2, 0x10, - 0x16, 0x22, 0xc4, 0x58, 0x86, 0x60, - 0x4c, 0x29, 0x85, 0x30, 0xc1, 0x50, - 0x41, 0xc8, 0x39, 0x07, 0x04, 0x98, - 0xf4, 0x18, 0x9c, 0x65, 0x5b, 0x90 -}; - -const uint8_t kMaskRandom45_24[144] = { - 0x64, 0x4c, 0x89, 0x91, 0x28, 0xa0, - 0x51, 0x4a, 0x29, 0x45, 0x62, 0x88, - 0x0c, 0xa1, 0x94, 0x32, 0x90, 0xc0, - 0xa1, 0x34, 0x26, 0x84, 0x89, 0x18, - 0x12, 0xa2, 0x54, 0x4a, 0x84, 0x70, - 0x8a, 0x51, 0x4a, 0x29, 0x17, 0x00, - 0x86, 0x90, 0xd2, 0x1a, 0x29, 0xb0, - 0x23, 0x24, 0x64, 0x8c, 0xb2, 0x10, - 0x16, 0x22, 0xc4, 0x58, 0x86, 0x60, - 0x4c, 0x29, 0x85, 0x30, 0xc1, 0x50, - 0x41, 0xc8, 0x39, 0x07, 0x04, 0x98, - 0xf4, 0x18, 0x9c, 0x65, 0x5b, 0x90, - 0x46, 0x48, 0xc9, 0x19, 0x29, 0xb0, - 0x33, 0x26, 0x64, 0xcc, 0x90, 0x98, - 0x99, 0x13, 0x22, 0x64, 0x08, 0x48, - 0x05, 0x80, 0xb0, 0x16, 0x00, 0x38, - 0x80, 0xb0, 0x16, 0x02, 0x86, 0x08, - 0x84, 0x50, 0x8a, 0x11, 0x20, 0x60, - 0x40, 0x68, 0x0d, 0x01, 0xb5, 0x00, - 0x0a, 0x81, 0x50, 0x2a, 0x43, 0x00, - 0x68, 0x0d, 0x01, 0xa0, 0x12, 0x40, - 0x10, 0x22, 0x04, 0x40, 0xc4, 0x80, - 0x30, 0x46, 0x08, 0xc1, 0x60, 0x10, - 0x95, 0x91, 0xad, 0xd9, 0x86, 0x98 -}; - -const uint8_t kMaskRandom45_25[150] = { - 0x64, 0x4c, 0x89, 0x91, 0x28, 0xa0, - 0x51, 0x4a, 0x29, 0x45, 0x62, 0x88, - 0x0c, 0xa1, 0x94, 0x32, 0x90, 0xc0, - 0xa1, 0x34, 0x26, 0x84, 0x89, 0x18, - 0x12, 0xa2, 0x54, 0x4a, 0x84, 0x70, - 0x8a, 0x51, 0x4a, 0x29, 0x17, 0x00, - 0x86, 0x90, 0xd2, 0x1a, 0x29, 0xb0, - 0x23, 0x24, 0x64, 0x8c, 0xb2, 0x10, - 0x16, 0x22, 0xc4, 0x58, 0x86, 0x60, - 0x4c, 0x29, 0x85, 0x30, 0xc1, 0x50, - 0x41, 0xc8, 0x39, 0x07, 0x04, 0x98, - 0xf4, 0x18, 0x9c, 0x65, 0x5b, 0x90, - 0x64, 0x4c, 0x89, 0x91, 0x28, 0xa0, - 0x51, 0x4a, 0x29, 0x45, 0x62, 0x88, - 0x0c, 0xa1, 0x94, 0x32, 0x90, 0xc0, - 0xa1, 0x34, 0x26, 0x84, 0x89, 0x18, - 0x12, 0xa2, 0x54, 0x4a, 0x84, 0x70, - 0x8a, 0x51, 0x4a, 0x29, 0x17, 0x00, - 0x46, 0x48, 0xc9, 0x19, 0x29, 0xb0, - 0x33, 0x26, 0x64, 0xcc, 0x90, 0x98, - 0x91, 0x92, 0x32, 0x46, 0x48, 0x48, - 0xa4, 0x34, 0x86, 0x90, 0x81, 0x28, - 0x50, 0xaa, 0x15, 0x42, 0x83, 0x50, - 0x84, 0xd0, 0x9a, 0x13, 0x16, 0x00, - 0x09, 0x61, 0x2c, 0x25, 0xc4, 0x30 -}; - -const uint8_t kMaskRandom45_26[156] = { - 0x64, 0x4c, 0x89, 0x91, 0x28, 0xa0, - 0x51, 0x4a, 0x29, 0x45, 0x62, 0x88, - 0x0c, 0xa1, 0x94, 0x32, 0x90, 0xc0, - 0xa1, 0x34, 0x26, 0x84, 0x89, 0x18, - 0x12, 0xa2, 0x54, 0x4a, 0x84, 0x70, - 0x8a, 0x51, 0x4a, 0x29, 0x17, 0x00, - 0x46, 0x48, 0xc9, 0x19, 0x29, 0xb0, - 0x33, 0x26, 0x64, 0xcc, 0x90, 0x98, - 0x91, 0x92, 0x32, 0x46, 0x48, 0x48, - 0xa4, 0x34, 0x86, 0x90, 0x81, 0x28, - 0x50, 0xaa, 0x15, 0x42, 0x83, 0x50, - 0x84, 0xd0, 0x9a, 0x13, 0x16, 0x00, - 0x09, 0x61, 0x2c, 0x25, 0xc4, 0x30, - 0x64, 0x4c, 0x89, 0x91, 0x28, 0xa0, - 0x51, 0x4a, 0x29, 0x45, 0x62, 0x88, - 0x0c, 0xa1, 0x94, 0x32, 0x90, 0xc0, - 0xa1, 0x34, 0x26, 0x84, 0x89, 0x18, - 0x12, 0xa2, 0x54, 0x4a, 0x84, 0x70, - 0x8a, 0x51, 0x4a, 0x29, 0x17, 0x00, - 0x86, 0x90, 0xd2, 0x1a, 0x29, 0xb0, - 0x23, 0x24, 0x64, 0x8c, 0xb2, 0x10, - 0x16, 0x22, 0xc4, 0x58, 0x86, 0x60, - 0x4c, 0x29, 0x85, 0x30, 0xc1, 0x50, - 0x41, 0xc8, 0x39, 0x07, 0x04, 0x98, - 0xf4, 0x18, 0x9c, 0x65, 0x5b, 0x90, - 0xb0, 0xfd, 0xb2, 0xf3, 0x8a, 0xc0 -}; - -const uint8_t kMaskRandom45_27[162] = { - 0x64, 0x4c, 0x89, 0x91, 0x28, 0xa0, - 0x51, 0x4a, 0x29, 0x45, 0x62, 0x88, - 0x0c, 0xa1, 0x94, 0x32, 0x90, 0xc0, - 0xa1, 0x34, 0x26, 0x84, 0x89, 0x18, - 0x12, 0xa2, 0x54, 0x4a, 0x84, 0x70, - 0x8a, 0x51, 0x4a, 0x29, 0x17, 0x00, - 0x46, 0x48, 0xc9, 0x19, 0x29, 0xb0, - 0x33, 0x26, 0x64, 0xcc, 0x90, 0x98, - 0x91, 0x92, 0x32, 0x46, 0x48, 0x48, - 0xa4, 0x34, 0x86, 0x90, 0x81, 0x28, - 0x50, 0xaa, 0x15, 0x42, 0x83, 0x50, - 0x84, 0xd0, 0x9a, 0x13, 0x16, 0x00, - 0x09, 0x61, 0x2c, 0x25, 0xc4, 0x30, - 0x46, 0x48, 0xc9, 0x19, 0x29, 0xb0, - 0x33, 0x26, 0x64, 0xcc, 0x90, 0x98, - 0x91, 0x92, 0x32, 0x46, 0x48, 0x48, - 0xa4, 0x34, 0x86, 0x90, 0x81, 0x28, - 0x50, 0xaa, 0x15, 0x42, 0x83, 0x50, - 0x84, 0xd0, 0x9a, 0x13, 0x16, 0x00, - 0x09, 0x61, 0x2c, 0x25, 0xc4, 0x30, - 0x64, 0x4c, 0x89, 0x91, 0x28, 0xa0, - 0x51, 0x4a, 0x29, 0x45, 0x62, 0x88, - 0x0c, 0xa1, 0x94, 0x32, 0x90, 0xc0, - 0xa1, 0x34, 0x26, 0x84, 0x89, 0x18, - 0x12, 0xa2, 0x54, 0x4a, 0x84, 0x70, - 0x8a, 0x51, 0x4a, 0x29, 0x17, 0x00, - 0xc6, 0xca, 0xea, 0x70, 0xfe, 0xc8 -}; - -const uint8_t kMaskRandom45_28[168] = { - 0x46, 0x48, 0xc9, 0x19, 0x29, 0xb0, - 0x33, 0x26, 0x64, 0xcc, 0x90, 0x98, - 0x91, 0x92, 0x32, 0x46, 0x48, 0x48, - 0xa4, 0x34, 0x86, 0x90, 0x81, 0x28, - 0x50, 0xaa, 0x15, 0x42, 0x83, 0x50, - 0x84, 0xd0, 0x9a, 0x13, 0x16, 0x00, - 0x09, 0x61, 0x2c, 0x25, 0xc4, 0x30, - 0x64, 0x4c, 0x89, 0x91, 0x28, 0xa0, - 0x51, 0x4a, 0x29, 0x45, 0x62, 0x88, - 0x0c, 0xa1, 0x94, 0x32, 0x90, 0xc0, - 0xa1, 0x34, 0x26, 0x84, 0x89, 0x18, - 0x12, 0xa2, 0x54, 0x4a, 0x84, 0x70, - 0x8a, 0x51, 0x4a, 0x29, 0x17, 0x00, - 0xc6, 0xca, 0xea, 0x70, 0xfe, 0xc8, - 0x64, 0x4c, 0x89, 0x91, 0x28, 0xa0, - 0x51, 0x4a, 0x29, 0x45, 0x62, 0x88, - 0x0c, 0xa1, 0x94, 0x32, 0x90, 0xc0, - 0xa1, 0x34, 0x26, 0x84, 0x89, 0x18, - 0x12, 0xa2, 0x54, 0x4a, 0x84, 0x70, - 0x8a, 0x51, 0x4a, 0x29, 0x17, 0x00, - 0x46, 0x48, 0xc9, 0x19, 0x29, 0xb0, - 0x33, 0x26, 0x64, 0xcc, 0x90, 0x98, - 0x91, 0x92, 0x32, 0x46, 0x48, 0x48, - 0xa4, 0x34, 0x86, 0x90, 0x81, 0x28, - 0x50, 0xaa, 0x15, 0x42, 0x83, 0x50, - 0x84, 0xd0, 0x9a, 0x13, 0x16, 0x00, - 0x09, 0x61, 0x2c, 0x25, 0xc4, 0x30, - 0x44, 0x46, 0x28, 0xfb, 0x66, 0x80 -}; - -const uint8_t kMaskRandom45_29[174] = { - 0x46, 0x48, 0xc9, 0x19, 0x29, 0xb0, - 0x33, 0x26, 0x64, 0xcc, 0x90, 0x98, - 0x91, 0x92, 0x32, 0x46, 0x48, 0x48, - 0xa4, 0x34, 0x86, 0x90, 0x81, 0x28, - 0x50, 0xaa, 0x15, 0x42, 0x83, 0x50, - 0x84, 0xd0, 0x9a, 0x13, 0x16, 0x00, - 0x09, 0x61, 0x2c, 0x25, 0xc4, 0x30, - 0x64, 0x4c, 0x89, 0x91, 0x28, 0xa0, - 0x51, 0x4a, 0x29, 0x45, 0x62, 0x88, - 0x0c, 0xa1, 0x94, 0x32, 0x90, 0xc0, - 0xa1, 0x34, 0x26, 0x84, 0x89, 0x18, - 0x12, 0xa2, 0x54, 0x4a, 0x84, 0x70, - 0x8a, 0x51, 0x4a, 0x29, 0x17, 0x00, - 0xc6, 0xca, 0xea, 0x70, 0xfe, 0xc8, - 0x46, 0x48, 0xc9, 0x19, 0x29, 0xb0, - 0x33, 0x26, 0x64, 0xcc, 0x90, 0x98, - 0x91, 0x92, 0x32, 0x46, 0x48, 0x48, - 0xa4, 0x34, 0x86, 0x90, 0x81, 0x28, - 0x50, 0xaa, 0x15, 0x42, 0x83, 0x50, - 0x84, 0xd0, 0x9a, 0x13, 0x16, 0x00, - 0x09, 0x61, 0x2c, 0x25, 0xc4, 0x30, - 0x0c, 0x81, 0x90, 0x32, 0x10, 0x30, - 0x80, 0x70, 0x0e, 0x01, 0xc0, 0x18, - 0xa0, 0x94, 0x12, 0x82, 0x21, 0x20, - 0x05, 0x40, 0xa8, 0x15, 0x00, 0xc8, - 0x43, 0x08, 0x61, 0x0c, 0x0a, 0x08, - 0x1a, 0x03, 0x40, 0x68, 0x05, 0x40, - 0x60, 0x2c, 0x05, 0x80, 0x9c, 0x00, - 0x14, 0x22, 0x84, 0x50, 0xe2, 0x80 -}; - -const uint8_t kMaskRandom45_3[18] = { - 0xca, 0xd9, 0x5b, 0x2b, 0x4d, 0x90, - 0xf1, 0x5e, 0x2b, 0xc5, 0x24, 0xe8, - 0xb6, 0x35, 0xc5, 0xd8, 0x9f, 0x40 -}; - -const uint8_t kMaskRandom45_30[180] = { - 0x46, 0x48, 0xc9, 0x19, 0x29, 0xb0, - 0x33, 0x26, 0x64, 0xcc, 0x90, 0x98, - 0x91, 0x92, 0x32, 0x46, 0x48, 0x48, - 0xa4, 0x34, 0x86, 0x90, 0x81, 0x28, - 0x50, 0xaa, 0x15, 0x42, 0x83, 0x50, - 0x84, 0xd0, 0x9a, 0x13, 0x16, 0x00, - 0x09, 0x61, 0x2c, 0x25, 0xc4, 0x30, - 0x0c, 0x81, 0x90, 0x32, 0x10, 0x30, - 0x80, 0x70, 0x0e, 0x01, 0xc0, 0x18, - 0xa0, 0x94, 0x12, 0x82, 0x21, 0x20, - 0x05, 0x40, 0xa8, 0x15, 0x00, 0xc8, - 0x43, 0x08, 0x61, 0x0c, 0x0a, 0x08, - 0x1a, 0x03, 0x40, 0x68, 0x05, 0x40, - 0x60, 0x2c, 0x05, 0x80, 0x9c, 0x00, - 0x14, 0x22, 0x84, 0x50, 0xe2, 0x80, - 0x46, 0x48, 0xc9, 0x19, 0x29, 0xb0, - 0x33, 0x26, 0x64, 0xcc, 0x90, 0x98, - 0x91, 0x92, 0x32, 0x46, 0x48, 0x48, - 0xa4, 0x34, 0x86, 0x90, 0x81, 0x28, - 0x50, 0xaa, 0x15, 0x42, 0x83, 0x50, - 0x84, 0xd0, 0x9a, 0x13, 0x16, 0x00, - 0x09, 0x61, 0x2c, 0x25, 0xc4, 0x30, - 0x64, 0x4c, 0x89, 0x91, 0x28, 0xa0, - 0x51, 0x4a, 0x29, 0x45, 0x62, 0x88, - 0x0c, 0xa1, 0x94, 0x32, 0x90, 0xc0, - 0xa1, 0x34, 0x26, 0x84, 0x89, 0x18, - 0x12, 0xa2, 0x54, 0x4a, 0x84, 0x70, - 0x8a, 0x51, 0x4a, 0x29, 0x17, 0x00, - 0xc6, 0xca, 0xea, 0x70, 0xfe, 0xc8, - 0x1c, 0xc9, 0x43, 0x25, 0xa7, 0x00 -}; - -const uint8_t kMaskRandom45_31[186] = { - 0x46, 0x48, 0xc9, 0x19, 0x29, 0xb0, - 0x33, 0x26, 0x64, 0xcc, 0x90, 0x98, - 0x91, 0x92, 0x32, 0x46, 0x48, 0x48, - 0xa4, 0x34, 0x86, 0x90, 0x81, 0x28, - 0x50, 0xaa, 0x15, 0x42, 0x83, 0x50, - 0x84, 0xd0, 0x9a, 0x13, 0x16, 0x00, - 0x09, 0x61, 0x2c, 0x25, 0xc4, 0x30, - 0x0c, 0x81, 0x90, 0x32, 0x10, 0x30, - 0x80, 0x70, 0x0e, 0x01, 0xc0, 0x18, - 0xa0, 0x94, 0x12, 0x82, 0x21, 0x20, - 0x05, 0x40, 0xa8, 0x15, 0x00, 0xc8, - 0x43, 0x08, 0x61, 0x0c, 0x0a, 0x08, - 0x1a, 0x03, 0x40, 0x68, 0x05, 0x40, - 0x60, 0x2c, 0x05, 0x80, 0x9c, 0x00, - 0x14, 0x22, 0x84, 0x50, 0xe2, 0x80, - 0x0c, 0x81, 0x90, 0x32, 0x10, 0x30, - 0x80, 0x70, 0x0e, 0x01, 0xc0, 0x18, - 0xa0, 0x94, 0x12, 0x82, 0x21, 0x20, - 0x05, 0x40, 0xa8, 0x15, 0x00, 0xc8, - 0x43, 0x08, 0x61, 0x0c, 0x0a, 0x08, - 0x1a, 0x03, 0x40, 0x68, 0x05, 0x40, - 0x60, 0x2c, 0x05, 0x80, 0x9c, 0x00, - 0x14, 0x22, 0x84, 0x50, 0xe2, 0x80, - 0x46, 0x48, 0xc9, 0x19, 0x29, 0xb0, - 0x33, 0x26, 0x64, 0xcc, 0x90, 0x98, - 0x91, 0x92, 0x32, 0x46, 0x48, 0x48, - 0xa4, 0x34, 0x86, 0x90, 0x81, 0x28, - 0x50, 0xaa, 0x15, 0x42, 0x83, 0x50, - 0x84, 0xd0, 0x9a, 0x13, 0x16, 0x00, - 0x09, 0x61, 0x2c, 0x25, 0xc4, 0x30, - 0x86, 0xc1, 0x47, 0xeb, 0x67, 0xd0 -}; - -const uint8_t kMaskRandom45_32[192] = { - 0x0c, 0x81, 0x90, 0x32, 0x10, 0x30, - 0x80, 0x70, 0x0e, 0x01, 0xc0, 0x18, - 0xa0, 0x94, 0x12, 0x82, 0x21, 0x20, - 0x05, 0x40, 0xa8, 0x15, 0x00, 0xc8, - 0x43, 0x08, 0x61, 0x0c, 0x0a, 0x08, - 0x1a, 0x03, 0x40, 0x68, 0x05, 0x40, - 0x60, 0x2c, 0x05, 0x80, 0x9c, 0x00, - 0x14, 0x22, 0x84, 0x50, 0xe2, 0x80, - 0x46, 0x48, 0xc9, 0x19, 0x29, 0xb0, - 0x33, 0x26, 0x64, 0xcc, 0x90, 0x98, - 0x91, 0x92, 0x32, 0x46, 0x48, 0x48, - 0xa4, 0x34, 0x86, 0x90, 0x81, 0x28, - 0x50, 0xaa, 0x15, 0x42, 0x83, 0x50, - 0x84, 0xd0, 0x9a, 0x13, 0x16, 0x00, - 0x09, 0x61, 0x2c, 0x25, 0xc4, 0x30, - 0x86, 0xc1, 0x47, 0xeb, 0x67, 0xd0, - 0x46, 0x48, 0xc9, 0x19, 0x29, 0xb0, - 0x33, 0x26, 0x64, 0xcc, 0x90, 0x98, - 0x91, 0x92, 0x32, 0x46, 0x48, 0x48, - 0xa4, 0x34, 0x86, 0x90, 0x81, 0x28, - 0x50, 0xaa, 0x15, 0x42, 0x83, 0x50, - 0x84, 0xd0, 0x9a, 0x13, 0x16, 0x00, - 0x09, 0x61, 0x2c, 0x25, 0xc4, 0x30, - 0x0c, 0x81, 0x90, 0x32, 0x10, 0x30, - 0x80, 0x70, 0x0e, 0x01, 0xc0, 0x18, - 0xa0, 0x94, 0x12, 0x82, 0x21, 0x20, - 0x05, 0x40, 0xa8, 0x15, 0x00, 0xc8, - 0x43, 0x08, 0x61, 0x0c, 0x0a, 0x08, - 0x1a, 0x03, 0x40, 0x68, 0x05, 0x40, - 0x60, 0x2c, 0x05, 0x80, 0x9c, 0x00, - 0x14, 0x22, 0x84, 0x50, 0xe2, 0x80, - 0x40, 0x7e, 0xc1, 0x30, 0x29, 0x50 -}; - -const uint8_t kMaskRandom45_33[198] = { - 0x0c, 0x81, 0x90, 0x32, 0x10, 0x30, - 0x80, 0x70, 0x0e, 0x01, 0xc0, 0x18, - 0xa0, 0x94, 0x12, 0x82, 0x21, 0x20, - 0x05, 0x40, 0xa8, 0x15, 0x00, 0xc8, - 0x43, 0x08, 0x61, 0x0c, 0x0a, 0x08, - 0x1a, 0x03, 0x40, 0x68, 0x05, 0x40, - 0x60, 0x2c, 0x05, 0x80, 0x9c, 0x00, - 0x14, 0x22, 0x84, 0x50, 0xe2, 0x80, - 0x46, 0x48, 0xc9, 0x19, 0x29, 0xb0, - 0x33, 0x26, 0x64, 0xcc, 0x90, 0x98, - 0x91, 0x92, 0x32, 0x46, 0x48, 0x48, - 0xa4, 0x34, 0x86, 0x90, 0x81, 0x28, - 0x50, 0xaa, 0x15, 0x42, 0x83, 0x50, - 0x84, 0xd0, 0x9a, 0x13, 0x16, 0x00, - 0x09, 0x61, 0x2c, 0x25, 0xc4, 0x30, - 0x86, 0xc1, 0x47, 0xeb, 0x67, 0xd0, - 0x0c, 0x81, 0x90, 0x32, 0x10, 0x30, - 0x80, 0x70, 0x0e, 0x01, 0xc0, 0x18, - 0xa0, 0x94, 0x12, 0x82, 0x21, 0x20, - 0x05, 0x40, 0xa8, 0x15, 0x00, 0xc8, - 0x43, 0x08, 0x61, 0x0c, 0x0a, 0x08, - 0x1a, 0x03, 0x40, 0x68, 0x05, 0x40, - 0x60, 0x2c, 0x05, 0x80, 0x9c, 0x00, - 0x14, 0x22, 0x84, 0x50, 0xe2, 0x80, - 0x46, 0x48, 0xc9, 0x19, 0x29, 0xb0, - 0x62, 0x6c, 0x4d, 0x89, 0xf2, 0x10, - 0x8c, 0x11, 0x82, 0x30, 0x12, 0x20, - 0x01, 0x60, 0x2c, 0x05, 0xd0, 0x88, - 0x07, 0x80, 0xf0, 0x1e, 0x0c, 0x18, - 0xa0, 0x94, 0x12, 0x82, 0x01, 0xc8, - 0x18, 0xa3, 0x14, 0x62, 0xc5, 0x08, - 0x91, 0x12, 0x22, 0x44, 0x02, 0x48, - 0x78, 0x0f, 0x01, 0xe0, 0x00, 0x70 -}; - -const uint8_t kMaskRandom45_34[204] = { - 0x0c, 0x81, 0x90, 0x32, 0x10, 0x30, - 0x80, 0x70, 0x0e, 0x01, 0xc0, 0x18, - 0xa0, 0x94, 0x12, 0x82, 0x21, 0x20, - 0x05, 0x40, 0xa8, 0x15, 0x00, 0xc8, - 0x43, 0x08, 0x61, 0x0c, 0x0a, 0x08, - 0x1a, 0x03, 0x40, 0x68, 0x05, 0x40, - 0x60, 0x2c, 0x05, 0x80, 0x9c, 0x00, - 0x14, 0x22, 0x84, 0x50, 0xe2, 0x80, - 0x46, 0x48, 0xc9, 0x19, 0x29, 0xb0, - 0x62, 0x6c, 0x4d, 0x89, 0xf2, 0x10, - 0x8c, 0x11, 0x82, 0x30, 0x12, 0x20, - 0x01, 0x60, 0x2c, 0x05, 0xd0, 0x88, - 0x07, 0x80, 0xf0, 0x1e, 0x0c, 0x18, - 0xa0, 0x94, 0x12, 0x82, 0x01, 0xc8, - 0x18, 0xa3, 0x14, 0x62, 0xc5, 0x08, - 0x91, 0x12, 0x22, 0x44, 0x02, 0x48, - 0x78, 0x0f, 0x01, 0xe0, 0x00, 0x70, - 0x0c, 0x81, 0x90, 0x32, 0x10, 0x30, - 0x80, 0x70, 0x0e, 0x01, 0xc0, 0x18, - 0xa0, 0x94, 0x12, 0x82, 0x21, 0x20, - 0x05, 0x40, 0xa8, 0x15, 0x00, 0xc8, - 0x43, 0x08, 0x61, 0x0c, 0x0a, 0x08, - 0x1a, 0x03, 0x40, 0x68, 0x05, 0x40, - 0x60, 0x2c, 0x05, 0x80, 0x9c, 0x00, - 0x14, 0x22, 0x84, 0x50, 0xe2, 0x80, - 0x46, 0x48, 0xc9, 0x19, 0x29, 0xb0, - 0x33, 0x26, 0x64, 0xcc, 0x90, 0x98, - 0x91, 0x92, 0x32, 0x46, 0x48, 0x48, - 0xa4, 0x34, 0x86, 0x90, 0x81, 0x28, - 0x50, 0xaa, 0x15, 0x42, 0x83, 0x50, - 0x84, 0xd0, 0x9a, 0x13, 0x16, 0x00, - 0x09, 0x61, 0x2c, 0x25, 0xc4, 0x30, - 0x86, 0xc1, 0x47, 0xeb, 0x67, 0xd0, - 0x1f, 0x78, 0x45, 0x5e, 0x46, 0x50 -}; - -const uint8_t kMaskRandom45_35[210] = { - 0x0c, 0x81, 0x90, 0x32, 0x10, 0x30, - 0x80, 0x70, 0x0e, 0x01, 0xc0, 0x18, - 0xa0, 0x94, 0x12, 0x82, 0x21, 0x20, - 0x05, 0x40, 0xa8, 0x15, 0x00, 0xc8, - 0x43, 0x08, 0x61, 0x0c, 0x0a, 0x08, - 0x1a, 0x03, 0x40, 0x68, 0x05, 0x40, - 0x60, 0x2c, 0x05, 0x80, 0x9c, 0x00, - 0x14, 0x22, 0x84, 0x50, 0xe2, 0x80, - 0x46, 0x48, 0xc9, 0x19, 0x29, 0xb0, - 0x62, 0x6c, 0x4d, 0x89, 0xf2, 0x10, - 0x8c, 0x11, 0x82, 0x30, 0x12, 0x20, - 0x01, 0x60, 0x2c, 0x05, 0xd0, 0x88, - 0x07, 0x80, 0xf0, 0x1e, 0x0c, 0x18, - 0xa0, 0x94, 0x12, 0x82, 0x01, 0xc8, - 0x18, 0xa3, 0x14, 0x62, 0xc5, 0x08, - 0x91, 0x12, 0x22, 0x44, 0x02, 0x48, - 0x78, 0x0f, 0x01, 0xe0, 0x00, 0x70, - 0x46, 0x48, 0xc9, 0x19, 0x29, 0xb0, - 0x62, 0x6c, 0x4d, 0x89, 0xf2, 0x10, - 0x8c, 0x11, 0x82, 0x30, 0x12, 0x20, - 0x01, 0x60, 0x2c, 0x05, 0xd0, 0x88, - 0x07, 0x80, 0xf0, 0x1e, 0x0c, 0x18, - 0xa0, 0x94, 0x12, 0x82, 0x01, 0xc8, - 0x18, 0xa3, 0x14, 0x62, 0xc5, 0x08, - 0x91, 0x12, 0x22, 0x44, 0x02, 0x48, - 0x78, 0x0f, 0x01, 0xe0, 0x00, 0x70, - 0x0c, 0x81, 0x90, 0x32, 0x10, 0x30, - 0x80, 0x70, 0x0e, 0x01, 0xc0, 0x18, - 0xa0, 0x94, 0x12, 0x82, 0x21, 0x20, - 0x05, 0x40, 0xa8, 0x15, 0x00, 0xc8, - 0x43, 0x08, 0x61, 0x0c, 0x0a, 0x08, - 0x1a, 0x03, 0x40, 0x68, 0x05, 0x40, - 0x60, 0x2c, 0x05, 0x80, 0x9c, 0x00, - 0x14, 0x22, 0x84, 0x50, 0xe2, 0x80, - 0xe4, 0xd4, 0x6e, 0x08, 0xc9, 0x58 -}; - -const uint8_t kMaskRandom45_36[216] = { - 0x46, 0x48, 0xc9, 0x19, 0x29, 0xb0, - 0x62, 0x6c, 0x4d, 0x89, 0xf2, 0x10, - 0x8c, 0x11, 0x82, 0x30, 0x12, 0x20, - 0x01, 0x60, 0x2c, 0x05, 0xd0, 0x88, - 0x07, 0x80, 0xf0, 0x1e, 0x0c, 0x18, - 0xa0, 0x94, 0x12, 0x82, 0x01, 0xc8, - 0x18, 0xa3, 0x14, 0x62, 0xc5, 0x08, - 0x91, 0x12, 0x22, 0x44, 0x02, 0x48, - 0x78, 0x0f, 0x01, 0xe0, 0x00, 0x70, - 0x0c, 0x81, 0x90, 0x32, 0x10, 0x30, - 0x80, 0x70, 0x0e, 0x01, 0xc0, 0x18, - 0xa0, 0x94, 0x12, 0x82, 0x21, 0x20, - 0x05, 0x40, 0xa8, 0x15, 0x00, 0xc8, - 0x43, 0x08, 0x61, 0x0c, 0x0a, 0x08, - 0x1a, 0x03, 0x40, 0x68, 0x05, 0x40, - 0x60, 0x2c, 0x05, 0x80, 0x9c, 0x00, - 0x14, 0x22, 0x84, 0x50, 0xe2, 0x80, - 0xe4, 0xd4, 0x6e, 0x08, 0xc9, 0x58, - 0x0c, 0x81, 0x90, 0x32, 0x10, 0x30, - 0x80, 0x70, 0x0e, 0x01, 0xc0, 0x18, - 0xa0, 0x94, 0x12, 0x82, 0x21, 0x20, - 0x05, 0x40, 0xa8, 0x15, 0x00, 0xc8, - 0x43, 0x08, 0x61, 0x0c, 0x0a, 0x08, - 0x1a, 0x03, 0x40, 0x68, 0x05, 0x40, - 0x60, 0x2c, 0x05, 0x80, 0x9c, 0x00, - 0x14, 0x22, 0x84, 0x50, 0xe2, 0x80, - 0x46, 0x48, 0xc9, 0x19, 0x29, 0xb0, - 0x62, 0x6c, 0x4d, 0x89, 0xf2, 0x10, - 0x8c, 0x11, 0x82, 0x30, 0x12, 0x20, - 0x01, 0x60, 0x2c, 0x05, 0xd0, 0x88, - 0x07, 0x80, 0xf0, 0x1e, 0x0c, 0x18, - 0xa0, 0x94, 0x12, 0x82, 0x01, 0xc8, - 0x18, 0xa3, 0x14, 0x62, 0xc5, 0x08, - 0x91, 0x12, 0x22, 0x44, 0x02, 0x48, - 0x78, 0x0f, 0x01, 0xe0, 0x00, 0x70, - 0xd0, 0x1a, 0xf0, 0x14, 0xf0, 0xe8 -}; - -const uint8_t kMaskRandom45_37[222] = { - 0x46, 0x48, 0xc9, 0x19, 0x29, 0xb0, - 0x62, 0x6c, 0x4d, 0x89, 0xf2, 0x10, - 0x8c, 0x11, 0x82, 0x30, 0x12, 0x20, - 0x01, 0x60, 0x2c, 0x05, 0xd0, 0x88, - 0x07, 0x80, 0xf0, 0x1e, 0x0c, 0x18, - 0xa0, 0x94, 0x12, 0x82, 0x01, 0xc8, - 0x18, 0xa3, 0x14, 0x62, 0xc5, 0x08, - 0x91, 0x12, 0x22, 0x44, 0x02, 0x48, - 0x78, 0x0f, 0x01, 0xe0, 0x00, 0x70, - 0x0c, 0x81, 0x90, 0x32, 0x10, 0x30, - 0x80, 0x70, 0x0e, 0x01, 0xc0, 0x18, - 0xa0, 0x94, 0x12, 0x82, 0x21, 0x20, - 0x05, 0x40, 0xa8, 0x15, 0x00, 0xc8, - 0x43, 0x08, 0x61, 0x0c, 0x0a, 0x08, - 0x1a, 0x03, 0x40, 0x68, 0x05, 0x40, - 0x60, 0x2c, 0x05, 0x80, 0x9c, 0x00, - 0x14, 0x22, 0x84, 0x50, 0xe2, 0x80, - 0xe4, 0xd4, 0x6e, 0x08, 0xc9, 0x58, - 0x46, 0x48, 0xc9, 0x19, 0x29, 0xb0, - 0x62, 0x6c, 0x4d, 0x89, 0xf2, 0x10, - 0x8c, 0x11, 0x82, 0x30, 0x12, 0x20, - 0x01, 0x60, 0x2c, 0x05, 0xd0, 0x88, - 0x07, 0x80, 0xf0, 0x1e, 0x0c, 0x18, - 0xa0, 0x94, 0x12, 0x82, 0x01, 0xc8, - 0x18, 0xa3, 0x14, 0x62, 0xc5, 0x08, - 0x91, 0x12, 0x22, 0x44, 0x02, 0x48, - 0x78, 0x0f, 0x01, 0xe0, 0x00, 0x70, - 0x64, 0x4c, 0x89, 0x91, 0x28, 0xa0, - 0x51, 0x4a, 0x29, 0x45, 0x22, 0x88, - 0xa9, 0x15, 0x22, 0xa4, 0x40, 0x68, - 0x04, 0xc0, 0x98, 0x13, 0x12, 0x10, - 0xd0, 0x1a, 0x03, 0x40, 0x05, 0x10, - 0x82, 0x50, 0x4a, 0x09, 0x00, 0x70, - 0x21, 0x24, 0x24, 0x84, 0xdc, 0x00, - 0x0c, 0x21, 0x84, 0x30, 0x84, 0x88, - 0x4a, 0x09, 0x41, 0x28, 0x2b, 0x00, - 0x12, 0xa2, 0x54, 0x4a, 0xd1, 0x40 -}; - -const uint8_t kMaskRandom45_38[228] = { - 0x46, 0x48, 0xc9, 0x19, 0x29, 0xb0, - 0x62, 0x6c, 0x4d, 0x89, 0xf2, 0x10, - 0x8c, 0x11, 0x82, 0x30, 0x12, 0x20, - 0x01, 0x60, 0x2c, 0x05, 0xd0, 0x88, - 0x07, 0x80, 0xf0, 0x1e, 0x0c, 0x18, - 0xa0, 0x94, 0x12, 0x82, 0x01, 0xc8, - 0x18, 0xa3, 0x14, 0x62, 0xc5, 0x08, - 0x91, 0x12, 0x22, 0x44, 0x02, 0x48, - 0x78, 0x0f, 0x01, 0xe0, 0x00, 0x70, - 0x64, 0x4c, 0x89, 0x91, 0x28, 0xa0, - 0x51, 0x4a, 0x29, 0x45, 0x22, 0x88, - 0xa9, 0x15, 0x22, 0xa4, 0x40, 0x68, - 0x04, 0xc0, 0x98, 0x13, 0x12, 0x10, - 0xd0, 0x1a, 0x03, 0x40, 0x05, 0x10, - 0x82, 0x50, 0x4a, 0x09, 0x00, 0x70, - 0x21, 0x24, 0x24, 0x84, 0xdc, 0x00, - 0x0c, 0x21, 0x84, 0x30, 0x84, 0x88, - 0x4a, 0x09, 0x41, 0x28, 0x2b, 0x00, - 0x12, 0xa2, 0x54, 0x4a, 0xd1, 0x40, - 0x46, 0x48, 0xc9, 0x19, 0x29, 0xb0, - 0x62, 0x6c, 0x4d, 0x89, 0xf2, 0x10, - 0x8c, 0x11, 0x82, 0x30, 0x12, 0x20, - 0x01, 0x60, 0x2c, 0x05, 0xd0, 0x88, - 0x07, 0x80, 0xf0, 0x1e, 0x0c, 0x18, - 0xa0, 0x94, 0x12, 0x82, 0x01, 0xc8, - 0x18, 0xa3, 0x14, 0x62, 0xc5, 0x08, - 0x91, 0x12, 0x22, 0x44, 0x02, 0x48, - 0x78, 0x0f, 0x01, 0xe0, 0x00, 0x70, - 0x0c, 0x81, 0x90, 0x32, 0x10, 0x30, - 0x80, 0x70, 0x0e, 0x01, 0xc0, 0x18, - 0xa0, 0x94, 0x12, 0x82, 0x21, 0x20, - 0x05, 0x40, 0xa8, 0x15, 0x00, 0xc8, - 0x43, 0x08, 0x61, 0x0c, 0x0a, 0x08, - 0x1a, 0x03, 0x40, 0x68, 0x05, 0x40, - 0x60, 0x2c, 0x05, 0x80, 0x9c, 0x00, - 0x14, 0x22, 0x84, 0x50, 0xe2, 0x80, - 0xe4, 0xd4, 0x6e, 0x08, 0xc9, 0x58, - 0x04, 0x67, 0x1b, 0xba, 0x1d, 0xa0 -}; - -const uint8_t kMaskRandom45_39[234] = { - 0x46, 0x48, 0xc9, 0x19, 0x29, 0xb0, - 0x62, 0x6c, 0x4d, 0x89, 0xf2, 0x10, - 0x8c, 0x11, 0x82, 0x30, 0x12, 0x20, - 0x01, 0x60, 0x2c, 0x05, 0xd0, 0x88, - 0x07, 0x80, 0xf0, 0x1e, 0x0c, 0x18, - 0xa0, 0x94, 0x12, 0x82, 0x01, 0xc8, - 0x18, 0xa3, 0x14, 0x62, 0xc5, 0x08, - 0x91, 0x12, 0x22, 0x44, 0x02, 0x48, - 0x78, 0x0f, 0x01, 0xe0, 0x00, 0x70, - 0x64, 0x4c, 0x89, 0x91, 0x28, 0xa0, - 0x51, 0x4a, 0x29, 0x45, 0x22, 0x88, - 0xa9, 0x15, 0x22, 0xa4, 0x40, 0x68, - 0x04, 0xc0, 0x98, 0x13, 0x12, 0x10, - 0xd0, 0x1a, 0x03, 0x40, 0x05, 0x10, - 0x82, 0x50, 0x4a, 0x09, 0x00, 0x70, - 0x21, 0x24, 0x24, 0x84, 0xdc, 0x00, - 0x0c, 0x21, 0x84, 0x30, 0x84, 0x88, - 0x4a, 0x09, 0x41, 0x28, 0x2b, 0x00, - 0x12, 0xa2, 0x54, 0x4a, 0xd1, 0x40, - 0x64, 0x4c, 0x89, 0x91, 0x28, 0xa0, - 0x51, 0x4a, 0x29, 0x45, 0x22, 0x88, - 0xa9, 0x15, 0x22, 0xa4, 0x40, 0x68, - 0x04, 0xc0, 0x98, 0x13, 0x12, 0x10, - 0xd0, 0x1a, 0x03, 0x40, 0x05, 0x10, - 0x82, 0x50, 0x4a, 0x09, 0x00, 0x70, - 0x21, 0x24, 0x24, 0x84, 0xdc, 0x00, - 0x0c, 0x21, 0x84, 0x30, 0x84, 0x88, - 0x4a, 0x09, 0x41, 0x28, 0x2b, 0x00, - 0x12, 0xa2, 0x54, 0x4a, 0xd1, 0x40, - 0x46, 0x48, 0xc9, 0x19, 0x29, 0xb0, - 0x62, 0x6c, 0x4d, 0x89, 0xf2, 0x10, - 0x8c, 0x11, 0x82, 0x30, 0x12, 0x20, - 0x01, 0x60, 0x2c, 0x05, 0xd0, 0x88, - 0x07, 0x80, 0xf0, 0x1e, 0x0c, 0x18, - 0xa0, 0x94, 0x12, 0x82, 0x01, 0xc8, - 0x18, 0xa3, 0x14, 0x62, 0xc5, 0x08, - 0x91, 0x12, 0x22, 0x44, 0x02, 0x48, - 0x78, 0x0f, 0x01, 0xe0, 0x00, 0x70, - 0x3b, 0x48, 0xc7, 0x6d, 0x29, 0xe8 -}; - -const uint8_t kMaskRandom45_4[24] = { - 0xc4, 0xd8, 0x9b, 0x13, 0x45, 0x90, - 0x31, 0x66, 0x2c, 0xc5, 0x8a, 0x58, - 0x4b, 0x29, 0x65, 0x2c, 0x91, 0x68, - 0x2c, 0xa5, 0x94, 0xb2, 0xa2, 0xa8 -}; - -const uint8_t kMaskRandom45_40[240] = { - 0x64, 0x4c, 0x89, 0x91, 0x28, 0xa0, - 0x51, 0x4a, 0x29, 0x45, 0x22, 0x88, - 0xa9, 0x15, 0x22, 0xa4, 0x40, 0x68, - 0x04, 0xc0, 0x98, 0x13, 0x12, 0x10, - 0xd0, 0x1a, 0x03, 0x40, 0x05, 0x10, - 0x82, 0x50, 0x4a, 0x09, 0x00, 0x70, - 0x21, 0x24, 0x24, 0x84, 0xdc, 0x00, - 0x0c, 0x21, 0x84, 0x30, 0x84, 0x88, - 0x4a, 0x09, 0x41, 0x28, 0x2b, 0x00, - 0x12, 0xa2, 0x54, 0x4a, 0xd1, 0x40, - 0x46, 0x48, 0xc9, 0x19, 0x29, 0xb0, - 0x62, 0x6c, 0x4d, 0x89, 0xf2, 0x10, - 0x8c, 0x11, 0x82, 0x30, 0x12, 0x20, - 0x01, 0x60, 0x2c, 0x05, 0xd0, 0x88, - 0x07, 0x80, 0xf0, 0x1e, 0x0c, 0x18, - 0xa0, 0x94, 0x12, 0x82, 0x01, 0xc8, - 0x18, 0xa3, 0x14, 0x62, 0xc5, 0x08, - 0x91, 0x12, 0x22, 0x44, 0x02, 0x48, - 0x78, 0x0f, 0x01, 0xe0, 0x00, 0x70, - 0x3b, 0x48, 0xc7, 0x6d, 0x29, 0xe8, - 0x46, 0x48, 0xc9, 0x19, 0x29, 0xb0, - 0x62, 0x6c, 0x4d, 0x89, 0xf2, 0x10, - 0x8c, 0x11, 0x82, 0x30, 0x12, 0x20, - 0x01, 0x60, 0x2c, 0x05, 0xd0, 0x88, - 0x07, 0x80, 0xf0, 0x1e, 0x0c, 0x18, - 0xa0, 0x94, 0x12, 0x82, 0x01, 0xc8, - 0x18, 0xa3, 0x14, 0x62, 0xc5, 0x08, - 0x91, 0x12, 0x22, 0x44, 0x02, 0x48, - 0x78, 0x0f, 0x01, 0xe0, 0x00, 0x70, - 0x64, 0x4c, 0x89, 0x91, 0x28, 0xa0, - 0x51, 0x4a, 0x29, 0x45, 0x22, 0x88, - 0xa9, 0x15, 0x22, 0xa4, 0x40, 0x68, - 0x04, 0xc0, 0x98, 0x13, 0x12, 0x10, - 0xd0, 0x1a, 0x03, 0x40, 0x05, 0x10, - 0x82, 0x50, 0x4a, 0x09, 0x00, 0x70, - 0x21, 0x24, 0x24, 0x84, 0xdc, 0x00, - 0x0c, 0x21, 0x84, 0x30, 0x84, 0x88, - 0x4a, 0x09, 0x41, 0x28, 0x2b, 0x00, - 0x12, 0xa2, 0x54, 0x4a, 0xd1, 0x40, - 0xd9, 0x40, 0x46, 0xe6, 0x4f, 0xd8 -}; - -const uint8_t kMaskRandom45_41[246] = { - 0x64, 0x4c, 0x89, 0x91, 0x28, 0xa0, - 0x51, 0x4a, 0x29, 0x45, 0x22, 0x88, - 0xa9, 0x15, 0x22, 0xa4, 0x40, 0x68, - 0x04, 0xc0, 0x98, 0x13, 0x12, 0x10, - 0xd0, 0x1a, 0x03, 0x40, 0x05, 0x10, - 0x82, 0x50, 0x4a, 0x09, 0x00, 0x70, - 0x21, 0x24, 0x24, 0x84, 0xdc, 0x00, - 0x0c, 0x21, 0x84, 0x30, 0x84, 0x88, - 0x4a, 0x09, 0x41, 0x28, 0x2b, 0x00, - 0x12, 0xa2, 0x54, 0x4a, 0xd1, 0x40, - 0x46, 0x48, 0xc9, 0x19, 0x29, 0xb0, - 0x62, 0x6c, 0x4d, 0x89, 0xf2, 0x10, - 0x8c, 0x11, 0x82, 0x30, 0x12, 0x20, - 0x01, 0x60, 0x2c, 0x05, 0xd0, 0x88, - 0x07, 0x80, 0xf0, 0x1e, 0x0c, 0x18, - 0xa0, 0x94, 0x12, 0x82, 0x01, 0xc8, - 0x18, 0xa3, 0x14, 0x62, 0xc5, 0x08, - 0x91, 0x12, 0x22, 0x44, 0x02, 0x48, - 0x78, 0x0f, 0x01, 0xe0, 0x00, 0x70, - 0x3b, 0x48, 0xc7, 0x6d, 0x29, 0xe8, - 0x64, 0x4c, 0x89, 0x91, 0x28, 0xa0, - 0x51, 0x4a, 0x29, 0x45, 0x22, 0x88, - 0xa9, 0x15, 0x22, 0xa4, 0x40, 0x68, - 0x04, 0xc0, 0x98, 0x13, 0x12, 0x10, - 0xd0, 0x1a, 0x03, 0x40, 0x05, 0x10, - 0x82, 0x50, 0x4a, 0x09, 0x00, 0x70, - 0x21, 0x24, 0x24, 0x84, 0xdc, 0x00, - 0x0c, 0x21, 0x84, 0x30, 0x84, 0x88, - 0x4a, 0x09, 0x41, 0x28, 0x2b, 0x00, - 0x12, 0xa2, 0x54, 0x4a, 0xd1, 0x40, - 0x46, 0x48, 0xc9, 0x19, 0x29, 0xb0, - 0x33, 0x26, 0x64, 0xcc, 0x90, 0x98, - 0x99, 0x13, 0x22, 0x64, 0x08, 0x48, - 0x05, 0x80, 0xb0, 0x16, 0x00, 0x38, - 0x80, 0xb0, 0x16, 0x02, 0x86, 0x08, - 0x84, 0x50, 0x8a, 0x11, 0x20, 0x60, - 0x40, 0x68, 0x0d, 0x01, 0xb5, 0x00, - 0x0a, 0x81, 0x50, 0x2a, 0x43, 0x00, - 0x68, 0x0d, 0x01, 0xa0, 0x12, 0x40, - 0x10, 0x22, 0x04, 0x40, 0xc4, 0x80, - 0x30, 0x46, 0x08, 0xc1, 0x60, 0x10 -}; - -const uint8_t kMaskRandom45_42[252] = { - 0x64, 0x4c, 0x89, 0x91, 0x28, 0xa0, - 0x51, 0x4a, 0x29, 0x45, 0x22, 0x88, - 0xa9, 0x15, 0x22, 0xa4, 0x40, 0x68, - 0x04, 0xc0, 0x98, 0x13, 0x12, 0x10, - 0xd0, 0x1a, 0x03, 0x40, 0x05, 0x10, - 0x82, 0x50, 0x4a, 0x09, 0x00, 0x70, - 0x21, 0x24, 0x24, 0x84, 0xdc, 0x00, - 0x0c, 0x21, 0x84, 0x30, 0x84, 0x88, - 0x4a, 0x09, 0x41, 0x28, 0x2b, 0x00, - 0x12, 0xa2, 0x54, 0x4a, 0xd1, 0x40, - 0x46, 0x48, 0xc9, 0x19, 0x29, 0xb0, - 0x33, 0x26, 0x64, 0xcc, 0x90, 0x98, - 0x99, 0x13, 0x22, 0x64, 0x08, 0x48, - 0x05, 0x80, 0xb0, 0x16, 0x00, 0x38, - 0x80, 0xb0, 0x16, 0x02, 0x86, 0x08, - 0x84, 0x50, 0x8a, 0x11, 0x20, 0x60, - 0x40, 0x68, 0x0d, 0x01, 0xb5, 0x00, - 0x0a, 0x81, 0x50, 0x2a, 0x43, 0x00, - 0x68, 0x0d, 0x01, 0xa0, 0x12, 0x40, - 0x10, 0x22, 0x04, 0x40, 0xc4, 0x80, - 0x30, 0x46, 0x08, 0xc1, 0x60, 0x10, - 0x64, 0x4c, 0x89, 0x91, 0x28, 0xa0, - 0x51, 0x4a, 0x29, 0x45, 0x22, 0x88, - 0xa9, 0x15, 0x22, 0xa4, 0x40, 0x68, - 0x04, 0xc0, 0x98, 0x13, 0x12, 0x10, - 0xd0, 0x1a, 0x03, 0x40, 0x05, 0x10, - 0x82, 0x50, 0x4a, 0x09, 0x00, 0x70, - 0x21, 0x24, 0x24, 0x84, 0xdc, 0x00, - 0x0c, 0x21, 0x84, 0x30, 0x84, 0x88, - 0x4a, 0x09, 0x41, 0x28, 0x2b, 0x00, - 0x12, 0xa2, 0x54, 0x4a, 0xd1, 0x40, - 0x46, 0x48, 0xc9, 0x19, 0x29, 0xb0, - 0x62, 0x6c, 0x4d, 0x89, 0xf2, 0x10, - 0x8c, 0x11, 0x82, 0x30, 0x12, 0x20, - 0x01, 0x60, 0x2c, 0x05, 0xd0, 0x88, - 0x07, 0x80, 0xf0, 0x1e, 0x0c, 0x18, - 0xa0, 0x94, 0x12, 0x82, 0x01, 0xc8, - 0x18, 0xa3, 0x14, 0x62, 0xc5, 0x08, - 0x91, 0x12, 0x22, 0x44, 0x02, 0x48, - 0x78, 0x0f, 0x01, 0xe0, 0x00, 0x70, - 0x3b, 0x48, 0xc7, 0x6d, 0x29, 0xe8, - 0xac, 0xcc, 0x04, 0x41, 0x97, 0x30 -}; - -const uint8_t kMaskRandom45_43[258] = { - 0x64, 0x4c, 0x89, 0x91, 0x28, 0xa0, - 0x51, 0x4a, 0x29, 0x45, 0x22, 0x88, - 0xa9, 0x15, 0x22, 0xa4, 0x40, 0x68, - 0x04, 0xc0, 0x98, 0x13, 0x12, 0x10, - 0xd0, 0x1a, 0x03, 0x40, 0x05, 0x10, - 0x82, 0x50, 0x4a, 0x09, 0x00, 0x70, - 0x21, 0x24, 0x24, 0x84, 0xdc, 0x00, - 0x0c, 0x21, 0x84, 0x30, 0x84, 0x88, - 0x4a, 0x09, 0x41, 0x28, 0x2b, 0x00, - 0x12, 0xa2, 0x54, 0x4a, 0xd1, 0x40, - 0x46, 0x48, 0xc9, 0x19, 0x29, 0xb0, - 0x33, 0x26, 0x64, 0xcc, 0x90, 0x98, - 0x99, 0x13, 0x22, 0x64, 0x08, 0x48, - 0x05, 0x80, 0xb0, 0x16, 0x00, 0x38, - 0x80, 0xb0, 0x16, 0x02, 0x86, 0x08, - 0x84, 0x50, 0x8a, 0x11, 0x20, 0x60, - 0x40, 0x68, 0x0d, 0x01, 0xb5, 0x00, - 0x0a, 0x81, 0x50, 0x2a, 0x43, 0x00, - 0x68, 0x0d, 0x01, 0xa0, 0x12, 0x40, - 0x10, 0x22, 0x04, 0x40, 0xc4, 0x80, - 0x30, 0x46, 0x08, 0xc1, 0x60, 0x10, - 0x46, 0x48, 0xc9, 0x19, 0x29, 0xb0, - 0x33, 0x26, 0x64, 0xcc, 0x90, 0x98, - 0x99, 0x13, 0x22, 0x64, 0x08, 0x48, - 0x05, 0x80, 0xb0, 0x16, 0x00, 0x38, - 0x80, 0xb0, 0x16, 0x02, 0x86, 0x08, - 0x84, 0x50, 0x8a, 0x11, 0x20, 0x60, - 0x40, 0x68, 0x0d, 0x01, 0xb5, 0x00, - 0x0a, 0x81, 0x50, 0x2a, 0x43, 0x00, - 0x68, 0x0d, 0x01, 0xa0, 0x12, 0x40, - 0x10, 0x22, 0x04, 0x40, 0xc4, 0x80, - 0x30, 0x46, 0x08, 0xc1, 0x60, 0x10, - 0x64, 0x4c, 0x89, 0x91, 0x28, 0xa0, - 0x51, 0x4a, 0x29, 0x45, 0x22, 0x88, - 0xa9, 0x15, 0x22, 0xa4, 0x40, 0x68, - 0x04, 0xc0, 0x98, 0x13, 0x12, 0x10, - 0xd0, 0x1a, 0x03, 0x40, 0x05, 0x10, - 0x82, 0x50, 0x4a, 0x09, 0x00, 0x70, - 0x21, 0x24, 0x24, 0x84, 0xdc, 0x00, - 0x0c, 0x21, 0x84, 0x30, 0x84, 0x88, - 0x4a, 0x09, 0x41, 0x28, 0x2b, 0x00, - 0x12, 0xa2, 0x54, 0x4a, 0xd1, 0x40, - 0x9e, 0xce, 0x8b, 0xaa, 0x34, 0x68 -}; - -const uint8_t kMaskRandom45_44[264] = { - 0x46, 0x48, 0xc9, 0x19, 0x29, 0xb0, - 0x33, 0x26, 0x64, 0xcc, 0x90, 0x98, - 0x99, 0x13, 0x22, 0x64, 0x08, 0x48, - 0x05, 0x80, 0xb0, 0x16, 0x00, 0x38, - 0x80, 0xb0, 0x16, 0x02, 0x86, 0x08, - 0x84, 0x50, 0x8a, 0x11, 0x20, 0x60, - 0x40, 0x68, 0x0d, 0x01, 0xb5, 0x00, - 0x0a, 0x81, 0x50, 0x2a, 0x43, 0x00, - 0x68, 0x0d, 0x01, 0xa0, 0x12, 0x40, - 0x10, 0x22, 0x04, 0x40, 0xc4, 0x80, - 0x30, 0x46, 0x08, 0xc1, 0x60, 0x10, - 0x64, 0x4c, 0x89, 0x91, 0x28, 0xa0, - 0x51, 0x4a, 0x29, 0x45, 0x22, 0x88, - 0xa9, 0x15, 0x22, 0xa4, 0x40, 0x68, - 0x04, 0xc0, 0x98, 0x13, 0x12, 0x10, - 0xd0, 0x1a, 0x03, 0x40, 0x05, 0x10, - 0x82, 0x50, 0x4a, 0x09, 0x00, 0x70, - 0x21, 0x24, 0x24, 0x84, 0xdc, 0x00, - 0x0c, 0x21, 0x84, 0x30, 0x84, 0x88, - 0x4a, 0x09, 0x41, 0x28, 0x2b, 0x00, - 0x12, 0xa2, 0x54, 0x4a, 0xd1, 0x40, - 0x9e, 0xce, 0x8b, 0xaa, 0x34, 0x68, - 0x64, 0x4c, 0x89, 0x91, 0x28, 0xa0, - 0x51, 0x4a, 0x29, 0x45, 0x22, 0x88, - 0xa9, 0x15, 0x22, 0xa4, 0x40, 0x68, - 0x04, 0xc0, 0x98, 0x13, 0x12, 0x10, - 0xd0, 0x1a, 0x03, 0x40, 0x05, 0x10, - 0x82, 0x50, 0x4a, 0x09, 0x00, 0x70, - 0x21, 0x24, 0x24, 0x84, 0xdc, 0x00, - 0x0c, 0x21, 0x84, 0x30, 0x84, 0x88, - 0x4a, 0x09, 0x41, 0x28, 0x2b, 0x00, - 0x12, 0xa2, 0x54, 0x4a, 0xd1, 0x40, - 0x46, 0x48, 0xc9, 0x19, 0x29, 0xb0, - 0x33, 0x26, 0x64, 0xcc, 0x90, 0x98, - 0x99, 0x13, 0x22, 0x64, 0x08, 0x48, - 0x05, 0x80, 0xb0, 0x16, 0x00, 0x38, - 0x80, 0xb0, 0x16, 0x02, 0x86, 0x08, - 0x84, 0x50, 0x8a, 0x11, 0x20, 0x60, - 0x40, 0x68, 0x0d, 0x01, 0xb5, 0x00, - 0x0a, 0x81, 0x50, 0x2a, 0x43, 0x00, - 0x68, 0x0d, 0x01, 0xa0, 0x12, 0x40, - 0x10, 0x22, 0x04, 0x40, 0xc4, 0x80, - 0x30, 0x46, 0x08, 0xc1, 0x60, 0x10, - 0xf8, 0x40, 0xe3, 0x2e, 0x16, 0x00 -}; - -const uint8_t kMaskRandom45_45[270] = { - 0x46, 0x48, 0xc9, 0x19, 0x29, 0xb0, - 0x33, 0x26, 0x64, 0xcc, 0x90, 0x98, - 0x99, 0x13, 0x22, 0x64, 0x08, 0x48, - 0x05, 0x80, 0xb0, 0x16, 0x00, 0x38, - 0x80, 0xb0, 0x16, 0x02, 0x86, 0x08, - 0x84, 0x50, 0x8a, 0x11, 0x20, 0x60, - 0x40, 0x68, 0x0d, 0x01, 0xb5, 0x00, - 0x0a, 0x81, 0x50, 0x2a, 0x43, 0x00, - 0x68, 0x0d, 0x01, 0xa0, 0x12, 0x40, - 0x10, 0x22, 0x04, 0x40, 0xc4, 0x80, - 0x30, 0x46, 0x08, 0xc1, 0x60, 0x10, - 0x64, 0x4c, 0x89, 0x91, 0x28, 0xa0, - 0x51, 0x4a, 0x29, 0x45, 0x22, 0x88, - 0xa9, 0x15, 0x22, 0xa4, 0x40, 0x68, - 0x04, 0xc0, 0x98, 0x13, 0x12, 0x10, - 0xd0, 0x1a, 0x03, 0x40, 0x05, 0x10, - 0x82, 0x50, 0x4a, 0x09, 0x00, 0x70, - 0x21, 0x24, 0x24, 0x84, 0xdc, 0x00, - 0x0c, 0x21, 0x84, 0x30, 0x84, 0x88, - 0x4a, 0x09, 0x41, 0x28, 0x2b, 0x00, - 0x12, 0xa2, 0x54, 0x4a, 0xd1, 0x40, - 0x9e, 0xce, 0x8b, 0xaa, 0x34, 0x68, - 0x46, 0x48, 0xc9, 0x19, 0x29, 0xb0, - 0x33, 0x26, 0x64, 0xcc, 0x90, 0x98, - 0x99, 0x13, 0x22, 0x64, 0x08, 0x48, - 0x05, 0x80, 0xb0, 0x16, 0x00, 0x38, - 0x80, 0xb0, 0x16, 0x02, 0x86, 0x08, - 0x84, 0x50, 0x8a, 0x11, 0x20, 0x60, - 0x40, 0x68, 0x0d, 0x01, 0xb5, 0x00, - 0x0a, 0x81, 0x50, 0x2a, 0x43, 0x00, - 0x68, 0x0d, 0x01, 0xa0, 0x12, 0x40, - 0x10, 0x22, 0x04, 0x40, 0xc4, 0x80, - 0x30, 0x46, 0x08, 0xc1, 0x60, 0x10, - 0x64, 0x4c, 0x89, 0x19, 0x08, 0x30, - 0x51, 0x4a, 0x28, 0xcc, 0x81, 0x18, - 0xa9, 0x15, 0x22, 0x64, 0x20, 0x28, - 0x04, 0xc0, 0x98, 0x16, 0x10, 0xc0, - 0xd0, 0x1a, 0x02, 0x02, 0xc0, 0x88, - 0x82, 0x50, 0x4a, 0x11, 0x0a, 0x40, - 0x21, 0x24, 0x25, 0x01, 0xcc, 0x00, - 0x0c, 0x21, 0x84, 0x2a, 0x04, 0x48, - 0x4a, 0x09, 0x41, 0xa0, 0x31, 0x00, - 0x12, 0xa2, 0x54, 0x40, 0x92, 0x10, - 0x9e, 0xce, 0x88, 0xc1, 0x45, 0x00, - 0xfb, 0x97, 0x5d, 0x7d, 0x42, 0x20 -}; - -const uint8_t kMaskRandom45_5[30] = { - 0xc6, 0xd8, 0xdb, 0x1b, 0x29, 0xb0, - 0x63, 0x6c, 0x6d, 0x8d, 0xb2, 0x58, - 0x1d, 0xa3, 0xb4, 0x76, 0x87, 0x70, - 0xad, 0x55, 0xaa, 0xb5, 0x54, 0xe0, - 0xb2, 0xb6, 0x56, 0xca, 0xdc, 0x18 -}; - -const uint8_t kMaskRandom45_6[36] = { - 0x64, 0x4c, 0x89, 0x91, 0x28, 0xa0, - 0x51, 0x4a, 0x29, 0x45, 0x62, 0x88, - 0xa8, 0x35, 0x04, 0x32, 0x90, 0xc0, - 0xc4, 0xa0, 0x96, 0x84, 0x89, 0x18, - 0x03, 0x60, 0x6c, 0x4a, 0x84, 0x70, - 0x90, 0xd2, 0x1a, 0x29, 0x17, 0x00 -}; - -const uint8_t kMaskRandom45_7[42] = { - 0xc6, 0x48, 0xc9, 0x19, 0x29, 0xb0, - 0x13, 0x26, 0x64, 0xcc, 0x90, 0x98, - 0x8d, 0x13, 0xa2, 0x46, 0x48, 0x48, - 0x8b, 0x41, 0x6a, 0x90, 0x81, 0x28, - 0x52, 0xaa, 0x15, 0x42, 0x83, 0x50, - 0xa2, 0xd4, 0x1a, 0x13, 0x16, 0x00, - 0x61, 0xa8, 0x2c, 0x25, 0xc4, 0x30 -}; - -const uint8_t kMaskRandom45_8[48] = { - 0x28, 0x85, 0x38, 0x32, 0x10, 0x30, - 0x21, 0xf4, 0x06, 0x01, 0xc0, 0x18, - 0xe9, 0x1d, 0x02, 0x82, 0x21, 0x20, - 0x17, 0x02, 0xe0, 0x15, 0x00, 0xc8, - 0x83, 0xa0, 0x55, 0x0c, 0x0a, 0x08, - 0x46, 0x18, 0xe8, 0x68, 0x05, 0x40, - 0x50, 0x6a, 0x0d, 0x80, 0x9c, 0x00, - 0x1c, 0x23, 0x84, 0x50, 0xe2, 0x80 -}; - -const uint8_t kMaskRandom45_9[54] = { - 0x44, 0x48, 0xc9, 0x19, 0x29, 0xb0, - 0x28, 0x2d, 0x0d, 0x89, 0xf2, 0x10, - 0x25, 0x14, 0xa2, 0x30, 0x12, 0x20, - 0x59, 0x0a, 0x20, 0x05, 0xd0, 0x88, - 0x03, 0xa0, 0x34, 0x1e, 0x0c, 0x18, - 0xc0, 0xd0, 0x1a, 0x82, 0x01, 0xc8, - 0xa2, 0x30, 0x44, 0x62, 0xc5, 0x08, - 0x14, 0x82, 0xd2, 0x44, 0x02, 0x48, - 0x9a, 0x03, 0x81, 0xe0, 0x00, 0x70 -}; - -const uint8_t kMaskRandom46_1[6] = { - 0xff, 0xff, 0xff, 0xff, 0xff, 0xfc -}; - -const uint8_t kMaskRandom46_10[60] = { - 0x64, 0x4a, 0x28, 0xc8, 0x94, 0x50, - 0x51, 0x48, 0xa2, 0xa2, 0x91, 0x44, - 0xa9, 0x10, 0x1b, 0x52, 0x20, 0x34, - 0x04, 0xc4, 0x84, 0x09, 0x89, 0x08, - 0xd0, 0x01, 0x45, 0xa0, 0x02, 0x88, - 0x82, 0x40, 0x1d, 0x04, 0x80, 0x38, - 0x21, 0x37, 0x00, 0x42, 0x6e, 0x00, - 0x0c, 0x21, 0x22, 0x18, 0x42, 0x44, - 0x4a, 0x0a, 0xc0, 0x94, 0x15, 0x80, - 0x12, 0xb4, 0x50, 0x25, 0x68, 0xa0 -}; - -const uint8_t kMaskRandom46_11[66] = { - 0x46, 0x4a, 0x6c, 0x8c, 0x94, 0xd8, - 0x33, 0x24, 0x26, 0x66, 0x48, 0x4c, - 0x99, 0x02, 0x13, 0x32, 0x04, 0x24, - 0x05, 0x80, 0x0e, 0x0b, 0x00, 0x1c, - 0x80, 0xa1, 0x83, 0x01, 0x43, 0x04, - 0x84, 0x48, 0x19, 0x08, 0x90, 0x30, - 0x40, 0x6d, 0x40, 0x80, 0xda, 0x80, - 0x0a, 0x90, 0xc0, 0x15, 0x21, 0x80, - 0x68, 0x04, 0x90, 0xd0, 0x09, 0x20, - 0x10, 0x31, 0x20, 0x20, 0x62, 0x40, - 0x30, 0x58, 0x04, 0x60, 0xb0, 0x08 -}; - -const uint8_t kMaskRandom46_12[72] = { - 0x64, 0x4a, 0x28, 0xc8, 0x94, 0x50, - 0x51, 0x58, 0xa2, 0xa2, 0xb1, 0x44, - 0x0c, 0xa4, 0x30, 0x19, 0x48, 0x60, - 0xa1, 0x22, 0x47, 0x42, 0x44, 0x8c, - 0x12, 0xa1, 0x1c, 0x25, 0x42, 0x38, - 0x8a, 0x45, 0xc1, 0x14, 0x8b, 0x80, - 0x86, 0x8a, 0x6d, 0x0d, 0x14, 0xd8, - 0x23, 0x2c, 0x84, 0x46, 0x59, 0x08, - 0x16, 0x21, 0x98, 0x2c, 0x43, 0x30, - 0x4c, 0x30, 0x54, 0x98, 0x60, 0xa8, - 0x41, 0xc1, 0x26, 0x83, 0x82, 0x4c, - 0x19, 0x56, 0xe4, 0x32, 0xad, 0xc8 -}; - -const uint8_t kMaskRandom46_13[78] = { - 0x64, 0x4a, 0x28, 0xc8, 0x94, 0x50, - 0x51, 0x58, 0xa2, 0xa2, 0xb1, 0x44, - 0x0c, 0xa4, 0x30, 0x19, 0x48, 0x60, - 0xa1, 0x22, 0x47, 0x42, 0x44, 0x8c, - 0x12, 0xa1, 0x1c, 0x25, 0x42, 0x38, - 0x8a, 0x45, 0xc1, 0x14, 0x8b, 0x80, - 0x46, 0x4a, 0x6c, 0x8c, 0x94, 0xd8, - 0x33, 0x24, 0x26, 0x66, 0x48, 0x4c, - 0x91, 0x92, 0x13, 0x23, 0x24, 0x24, - 0xa4, 0x20, 0x4b, 0x48, 0x40, 0x94, - 0x50, 0xa0, 0xd4, 0xa1, 0x41, 0xa8, - 0x84, 0xc5, 0x81, 0x09, 0x8b, 0x00, - 0x09, 0x71, 0x0c, 0x12, 0xe2, 0x18 -}; - -const uint8_t kMaskRandom46_14[84] = { - 0x46, 0x4a, 0x6c, 0x8c, 0x94, 0xd8, - 0x33, 0x24, 0x26, 0x66, 0x48, 0x4c, - 0x91, 0x92, 0x13, 0x23, 0x24, 0x24, - 0xa4, 0x20, 0x4b, 0x48, 0x40, 0x94, - 0x50, 0xa0, 0xd4, 0xa1, 0x41, 0xa8, - 0x84, 0xc5, 0x81, 0x09, 0x8b, 0x00, - 0x09, 0x71, 0x0c, 0x12, 0xe2, 0x18, - 0x64, 0x4a, 0x28, 0xc8, 0x94, 0x50, - 0x51, 0x58, 0xa2, 0xa2, 0xb1, 0x44, - 0x0c, 0xa4, 0x30, 0x19, 0x48, 0x60, - 0xa1, 0x22, 0x47, 0x42, 0x44, 0x8c, - 0x12, 0xa1, 0x1c, 0x25, 0x42, 0x38, - 0x8a, 0x45, 0xc1, 0x14, 0x8b, 0x80, - 0x9c, 0x3f, 0xb3, 0x38, 0x7f, 0x64 -}; - -const uint8_t kMaskRandom46_15[90] = { - 0x46, 0x4a, 0x6c, 0x8c, 0x94, 0xd8, - 0x33, 0x24, 0x26, 0x66, 0x48, 0x4c, - 0x91, 0x92, 0x13, 0x23, 0x24, 0x24, - 0xa4, 0x20, 0x4b, 0x48, 0x40, 0x94, - 0x50, 0xa0, 0xd4, 0xa1, 0x41, 0xa8, - 0x84, 0xc5, 0x81, 0x09, 0x8b, 0x00, - 0x09, 0x71, 0x0c, 0x12, 0xe2, 0x18, - 0x0c, 0x84, 0x0c, 0x19, 0x08, 0x18, - 0x80, 0x70, 0x07, 0x00, 0xe0, 0x0c, - 0xa0, 0x88, 0x49, 0x41, 0x10, 0x90, - 0x05, 0x40, 0x32, 0x0a, 0x80, 0x64, - 0x43, 0x02, 0x82, 0x86, 0x05, 0x04, - 0x1a, 0x01, 0x50, 0x34, 0x02, 0xa0, - 0x60, 0x27, 0x00, 0xc0, 0x4e, 0x00, - 0x14, 0x38, 0xa0, 0x28, 0x71, 0x40 -}; - -const uint8_t kMaskRandom46_16[96] = { - 0x0c, 0x84, 0x0c, 0x19, 0x08, 0x18, - 0x80, 0x70, 0x07, 0x00, 0xe0, 0x0c, - 0xa0, 0x88, 0x49, 0x41, 0x10, 0x90, - 0x05, 0x40, 0x32, 0x0a, 0x80, 0x64, - 0x43, 0x02, 0x82, 0x86, 0x05, 0x04, - 0x1a, 0x01, 0x50, 0x34, 0x02, 0xa0, - 0x60, 0x27, 0x00, 0xc0, 0x4e, 0x00, - 0x14, 0x38, 0xa0, 0x28, 0x71, 0x40, - 0x46, 0x4a, 0x6c, 0x8c, 0x94, 0xd8, - 0x33, 0x24, 0x26, 0x66, 0x48, 0x4c, - 0x91, 0x92, 0x13, 0x23, 0x24, 0x24, - 0xa4, 0x20, 0x4b, 0x48, 0x40, 0x94, - 0x50, 0xa0, 0xd4, 0xa1, 0x41, 0xa8, - 0x84, 0xc5, 0x81, 0x09, 0x8b, 0x00, - 0x09, 0x71, 0x0c, 0x12, 0xe2, 0x18, - 0xfa, 0xd9, 0xf5, 0xf5, 0xb3, 0xe8 -}; - -const uint8_t kMaskRandom46_17[102] = { - 0x0c, 0x84, 0x0c, 0x19, 0x08, 0x18, - 0x80, 0x70, 0x07, 0x00, 0xe0, 0x0c, - 0xa0, 0x88, 0x49, 0x41, 0x10, 0x90, - 0x05, 0x40, 0x32, 0x0a, 0x80, 0x64, - 0x43, 0x02, 0x82, 0x86, 0x05, 0x04, - 0x1a, 0x01, 0x50, 0x34, 0x02, 0xa0, - 0x60, 0x27, 0x00, 0xc0, 0x4e, 0x00, - 0x14, 0x38, 0xa0, 0x28, 0x71, 0x40, - 0x46, 0x4a, 0x6c, 0x8c, 0x94, 0xd8, - 0x62, 0x7c, 0x84, 0xc4, 0xf9, 0x08, - 0x8c, 0x04, 0x89, 0x18, 0x09, 0x10, - 0x01, 0x74, 0x22, 0x02, 0xe8, 0x44, - 0x07, 0x83, 0x06, 0x0f, 0x06, 0x0c, - 0xa0, 0x80, 0x73, 0x41, 0x00, 0xe4, - 0x18, 0xb1, 0x42, 0x31, 0x62, 0x84, - 0x91, 0x00, 0x93, 0x22, 0x01, 0x24, - 0x78, 0x00, 0x1c, 0xf0, 0x00, 0x38 -}; - -const uint8_t kMaskRandom46_18[108] = { - 0x46, 0x4a, 0x6c, 0x8c, 0x94, 0xd8, - 0x62, 0x7c, 0x84, 0xc4, 0xf9, 0x08, - 0x8c, 0x04, 0x89, 0x18, 0x09, 0x10, - 0x01, 0x74, 0x22, 0x02, 0xe8, 0x44, - 0x07, 0x83, 0x06, 0x0f, 0x06, 0x0c, - 0xa0, 0x80, 0x73, 0x41, 0x00, 0xe4, - 0x18, 0xb1, 0x42, 0x31, 0x62, 0x84, - 0x91, 0x00, 0x93, 0x22, 0x01, 0x24, - 0x78, 0x00, 0x1c, 0xf0, 0x00, 0x38, - 0x0c, 0x84, 0x0c, 0x19, 0x08, 0x18, - 0x80, 0x70, 0x07, 0x00, 0xe0, 0x0c, - 0xa0, 0x88, 0x49, 0x41, 0x10, 0x90, - 0x05, 0x40, 0x32, 0x0a, 0x80, 0x64, - 0x43, 0x02, 0x82, 0x86, 0x05, 0x04, - 0x1a, 0x01, 0x50, 0x34, 0x02, 0xa0, - 0x60, 0x27, 0x00, 0xc0, 0x4e, 0x00, - 0x14, 0x38, 0xa0, 0x28, 0x71, 0x40, - 0x82, 0x32, 0x57, 0x04, 0x64, 0xac -}; - -const uint8_t kMaskRandom46_19[114] = { - 0x46, 0x4a, 0x6c, 0x8c, 0x94, 0xd8, - 0x62, 0x7c, 0x84, 0xc4, 0xf9, 0x08, - 0x8c, 0x04, 0x89, 0x18, 0x09, 0x10, - 0x01, 0x74, 0x22, 0x02, 0xe8, 0x44, - 0x07, 0x83, 0x06, 0x0f, 0x06, 0x0c, - 0xa0, 0x80, 0x73, 0x41, 0x00, 0xe4, - 0x18, 0xb1, 0x42, 0x31, 0x62, 0x84, - 0x91, 0x00, 0x93, 0x22, 0x01, 0x24, - 0x78, 0x00, 0x1c, 0xf0, 0x00, 0x38, - 0x64, 0x4a, 0x28, 0xc8, 0x94, 0x50, - 0x51, 0x48, 0xa2, 0xa2, 0x91, 0x44, - 0xa9, 0x10, 0x1b, 0x52, 0x20, 0x34, - 0x04, 0xc4, 0x84, 0x09, 0x89, 0x08, - 0xd0, 0x01, 0x45, 0xa0, 0x02, 0x88, - 0x82, 0x40, 0x1d, 0x04, 0x80, 0x38, - 0x21, 0x37, 0x00, 0x42, 0x6e, 0x00, - 0x0c, 0x21, 0x22, 0x18, 0x42, 0x44, - 0x4a, 0x0a, 0xc0, 0x94, 0x15, 0x80, - 0x12, 0xb4, 0x50, 0x25, 0x68, 0xa0 -}; - -const uint8_t kMaskRandom46_2[12] = { - 0xec, 0xdd, 0x99, 0xd9, 0xbb, 0x30, - 0x9b, 0xb2, 0x77, 0x37, 0x64, 0xec -}; - -const uint8_t kMaskRandom46_20[120] = { - 0x64, 0x4a, 0x28, 0xc8, 0x94, 0x50, - 0x51, 0x48, 0xa2, 0xa2, 0x91, 0x44, - 0xa9, 0x10, 0x1b, 0x52, 0x20, 0x34, - 0x04, 0xc4, 0x84, 0x09, 0x89, 0x08, - 0xd0, 0x01, 0x45, 0xa0, 0x02, 0x88, - 0x82, 0x40, 0x1d, 0x04, 0x80, 0x38, - 0x21, 0x37, 0x00, 0x42, 0x6e, 0x00, - 0x0c, 0x21, 0x22, 0x18, 0x42, 0x44, - 0x4a, 0x0a, 0xc0, 0x94, 0x15, 0x80, - 0x12, 0xb4, 0x50, 0x25, 0x68, 0xa0, - 0x46, 0x4a, 0x6c, 0x8c, 0x94, 0xd8, - 0x62, 0x7c, 0x84, 0xc4, 0xf9, 0x08, - 0x8c, 0x04, 0x89, 0x18, 0x09, 0x10, - 0x01, 0x74, 0x22, 0x02, 0xe8, 0x44, - 0x07, 0x83, 0x06, 0x0f, 0x06, 0x0c, - 0xa0, 0x80, 0x73, 0x41, 0x00, 0xe4, - 0x18, 0xb1, 0x42, 0x31, 0x62, 0x84, - 0x91, 0x00, 0x93, 0x22, 0x01, 0x24, - 0x78, 0x00, 0x1c, 0xf0, 0x00, 0x38, - 0xdb, 0x4a, 0x7b, 0xb6, 0x94, 0xf4 -}; - -const uint8_t kMaskRandom46_21[126] = { - 0x64, 0x4a, 0x28, 0xc8, 0x94, 0x50, - 0x51, 0x48, 0xa2, 0xa2, 0x91, 0x44, - 0xa9, 0x10, 0x1b, 0x52, 0x20, 0x34, - 0x04, 0xc4, 0x84, 0x09, 0x89, 0x08, - 0xd0, 0x01, 0x45, 0xa0, 0x02, 0x88, - 0x82, 0x40, 0x1d, 0x04, 0x80, 0x38, - 0x21, 0x37, 0x00, 0x42, 0x6e, 0x00, - 0x0c, 0x21, 0x22, 0x18, 0x42, 0x44, - 0x4a, 0x0a, 0xc0, 0x94, 0x15, 0x80, - 0x12, 0xb4, 0x50, 0x25, 0x68, 0xa0, - 0x46, 0x4a, 0x6c, 0x8c, 0x94, 0xd8, - 0x33, 0x24, 0x26, 0x66, 0x48, 0x4c, - 0x99, 0x02, 0x13, 0x32, 0x04, 0x24, - 0x05, 0x80, 0x0e, 0x0b, 0x00, 0x1c, - 0x80, 0xa1, 0x83, 0x01, 0x43, 0x04, - 0x84, 0x48, 0x19, 0x08, 0x90, 0x30, - 0x40, 0x6d, 0x40, 0x80, 0xda, 0x80, - 0x0a, 0x90, 0xc0, 0x15, 0x21, 0x80, - 0x68, 0x04, 0x90, 0xd0, 0x09, 0x20, - 0x10, 0x31, 0x20, 0x20, 0x62, 0x40, - 0x30, 0x58, 0x04, 0x60, 0xb0, 0x08 -}; - -const uint8_t kMaskRandom46_22[132] = { - 0x46, 0x4a, 0x6c, 0x8c, 0x94, 0xd8, - 0x33, 0x24, 0x26, 0x66, 0x48, 0x4c, - 0x99, 0x02, 0x13, 0x32, 0x04, 0x24, - 0x05, 0x80, 0x0e, 0x0b, 0x00, 0x1c, - 0x80, 0xa1, 0x83, 0x01, 0x43, 0x04, - 0x84, 0x48, 0x19, 0x08, 0x90, 0x30, - 0x40, 0x6d, 0x40, 0x80, 0xda, 0x80, - 0x0a, 0x90, 0xc0, 0x15, 0x21, 0x80, - 0x68, 0x04, 0x90, 0xd0, 0x09, 0x20, - 0x10, 0x31, 0x20, 0x20, 0x62, 0x40, - 0x30, 0x58, 0x04, 0x60, 0xb0, 0x08, - 0x64, 0x4a, 0x28, 0xc8, 0x94, 0x50, - 0x51, 0x48, 0xa2, 0xa2, 0x91, 0x44, - 0xa9, 0x10, 0x1b, 0x52, 0x20, 0x34, - 0x04, 0xc4, 0x84, 0x09, 0x89, 0x08, - 0xd0, 0x01, 0x45, 0xa0, 0x02, 0x88, - 0x82, 0x40, 0x1d, 0x04, 0x80, 0x38, - 0x21, 0x37, 0x00, 0x42, 0x6e, 0x00, - 0x0c, 0x21, 0x22, 0x18, 0x42, 0x44, - 0x4a, 0x0a, 0xc0, 0x94, 0x15, 0x80, - 0x12, 0xb4, 0x50, 0x25, 0x68, 0xa0, - 0xea, 0x8d, 0x1b, 0xd5, 0x1a, 0x34 -}; - -const uint8_t kMaskRandom46_23[138] = { - 0x46, 0x4a, 0x6c, 0x8c, 0x94, 0xd8, - 0x33, 0x24, 0x26, 0x66, 0x48, 0x4c, - 0x99, 0x02, 0x13, 0x32, 0x04, 0x24, - 0x05, 0x80, 0x0e, 0x0b, 0x00, 0x1c, - 0x80, 0xa1, 0x83, 0x01, 0x43, 0x04, - 0x84, 0x48, 0x19, 0x08, 0x90, 0x30, - 0x40, 0x6d, 0x40, 0x80, 0xda, 0x80, - 0x0a, 0x90, 0xc0, 0x15, 0x21, 0x80, - 0x68, 0x04, 0x90, 0xd0, 0x09, 0x20, - 0x10, 0x31, 0x20, 0x20, 0x62, 0x40, - 0x30, 0x58, 0x04, 0x60, 0xb0, 0x08, - 0x46, 0x42, 0x0c, 0x8c, 0x84, 0x18, - 0x33, 0x20, 0x46, 0x66, 0x40, 0x8c, - 0x99, 0x08, 0x0b, 0x32, 0x10, 0x14, - 0x05, 0x84, 0x30, 0x0b, 0x08, 0x60, - 0x80, 0xb0, 0x23, 0x01, 0x60, 0x44, - 0x84, 0x42, 0x91, 0x08, 0x85, 0x20, - 0x40, 0x73, 0x00, 0x80, 0xe6, 0x00, - 0x0a, 0x81, 0x12, 0x15, 0x02, 0x24, - 0x68, 0x0c, 0x40, 0xd0, 0x18, 0x80, - 0x10, 0x24, 0x84, 0x20, 0x49, 0x08, - 0x30, 0x51, 0x40, 0x60, 0xa2, 0x80, - 0x5f, 0x50, 0x88, 0xbe, 0xa1, 0x10 -}; - -const uint8_t kMaskRandom46_24[144] = { - 0x64, 0x4a, 0x28, 0xc8, 0x94, 0x50, - 0x51, 0x58, 0xa2, 0xa2, 0xb1, 0x44, - 0x0c, 0xa4, 0x30, 0x19, 0x48, 0x60, - 0xa1, 0x22, 0x47, 0x42, 0x44, 0x8c, - 0x12, 0xa1, 0x1c, 0x25, 0x42, 0x38, - 0x8a, 0x45, 0xc1, 0x14, 0x8b, 0x80, - 0x86, 0x8a, 0x6d, 0x0d, 0x14, 0xd8, - 0x23, 0x2c, 0x84, 0x46, 0x59, 0x08, - 0x16, 0x21, 0x98, 0x2c, 0x43, 0x30, - 0x4c, 0x30, 0x54, 0x98, 0x60, 0xa8, - 0x41, 0xc1, 0x26, 0x83, 0x82, 0x4c, - 0x19, 0x56, 0xe4, 0x32, 0xad, 0xc8, - 0x46, 0x4a, 0x6c, 0x8c, 0x94, 0xd8, - 0x33, 0x24, 0x26, 0x66, 0x48, 0x4c, - 0x99, 0x02, 0x13, 0x32, 0x04, 0x24, - 0x05, 0x80, 0x0e, 0x0b, 0x00, 0x1c, - 0x80, 0xa1, 0x83, 0x01, 0x43, 0x04, - 0x84, 0x48, 0x19, 0x08, 0x90, 0x30, - 0x40, 0x6d, 0x40, 0x80, 0xda, 0x80, - 0x0a, 0x90, 0xc0, 0x15, 0x21, 0x80, - 0x68, 0x04, 0x90, 0xd0, 0x09, 0x20, - 0x10, 0x31, 0x20, 0x20, 0x62, 0x40, - 0x30, 0x58, 0x04, 0x60, 0xb0, 0x08, - 0x18, 0x8b, 0x03, 0xb4, 0x3b, 0x10 -}; - -const uint8_t kMaskRandom46_25[150] = { - 0x64, 0x4a, 0x28, 0xc8, 0x94, 0x50, - 0x51, 0x58, 0xa2, 0xa2, 0xb1, 0x44, - 0x0c, 0xa4, 0x30, 0x19, 0x48, 0x60, - 0xa1, 0x22, 0x47, 0x42, 0x44, 0x8c, - 0x12, 0xa1, 0x1c, 0x25, 0x42, 0x38, - 0x8a, 0x45, 0xc1, 0x14, 0x8b, 0x80, - 0x86, 0x8a, 0x6d, 0x0d, 0x14, 0xd8, - 0x23, 0x2c, 0x84, 0x46, 0x59, 0x08, - 0x16, 0x21, 0x98, 0x2c, 0x43, 0x30, - 0x4c, 0x30, 0x54, 0x98, 0x60, 0xa8, - 0x41, 0xc1, 0x26, 0x83, 0x82, 0x4c, - 0x19, 0x56, 0xe4, 0x32, 0xad, 0xc8, - 0x64, 0x4a, 0x28, 0xc8, 0x94, 0x50, - 0x51, 0x58, 0xa2, 0xa2, 0xb1, 0x44, - 0x0c, 0xa4, 0x30, 0x19, 0x48, 0x60, - 0xa1, 0x22, 0x47, 0x42, 0x44, 0x8c, - 0x12, 0xa1, 0x1c, 0x25, 0x42, 0x38, - 0x8a, 0x45, 0xc1, 0x14, 0x8b, 0x80, - 0x46, 0x4a, 0x6c, 0x8c, 0x94, 0xd8, - 0x33, 0x24, 0x26, 0x66, 0x48, 0x4c, - 0x91, 0x92, 0x13, 0x23, 0x24, 0x24, - 0xa4, 0x20, 0x4b, 0x48, 0x40, 0x94, - 0x50, 0xa0, 0xd4, 0xa1, 0x41, 0xa8, - 0x84, 0xc5, 0x81, 0x09, 0x8b, 0x00, - 0x09, 0x71, 0x0c, 0x12, 0xe2, 0x18 -}; - -const uint8_t kMaskRandom46_26[156] = { - 0x64, 0x4a, 0x28, 0xc8, 0x94, 0x50, - 0x51, 0x58, 0xa2, 0xa2, 0xb1, 0x44, - 0x0c, 0xa4, 0x30, 0x19, 0x48, 0x60, - 0xa1, 0x22, 0x47, 0x42, 0x44, 0x8c, - 0x12, 0xa1, 0x1c, 0x25, 0x42, 0x38, - 0x8a, 0x45, 0xc1, 0x14, 0x8b, 0x80, - 0x46, 0x4a, 0x6c, 0x8c, 0x94, 0xd8, - 0x33, 0x24, 0x26, 0x66, 0x48, 0x4c, - 0x91, 0x92, 0x13, 0x23, 0x24, 0x24, - 0xa4, 0x20, 0x4b, 0x48, 0x40, 0x94, - 0x50, 0xa0, 0xd4, 0xa1, 0x41, 0xa8, - 0x84, 0xc5, 0x81, 0x09, 0x8b, 0x00, - 0x09, 0x71, 0x0c, 0x12, 0xe2, 0x18, - 0x64, 0x4a, 0x28, 0xc8, 0x94, 0x50, - 0x51, 0x58, 0xa2, 0xa2, 0xb1, 0x44, - 0x0c, 0xa4, 0x30, 0x19, 0x48, 0x60, - 0xa1, 0x22, 0x47, 0x42, 0x44, 0x8c, - 0x12, 0xa1, 0x1c, 0x25, 0x42, 0x38, - 0x8a, 0x45, 0xc1, 0x14, 0x8b, 0x80, - 0x86, 0x8a, 0x6d, 0x0d, 0x14, 0xd8, - 0x23, 0x2c, 0x84, 0x46, 0x59, 0x08, - 0x16, 0x21, 0x98, 0x2c, 0x43, 0x30, - 0x4c, 0x30, 0x54, 0x98, 0x60, 0xa8, - 0x41, 0xc1, 0x26, 0x83, 0x82, 0x4c, - 0x19, 0x56, 0xe4, 0x32, 0xad, 0xc8, - 0x2d, 0x6d, 0xd2, 0x57, 0xd6, 0x2c -}; - -const uint8_t kMaskRandom46_27[162] = { - 0x64, 0x4a, 0x28, 0xc8, 0x94, 0x50, - 0x51, 0x58, 0xa2, 0xa2, 0xb1, 0x44, - 0x0c, 0xa4, 0x30, 0x19, 0x48, 0x60, - 0xa1, 0x22, 0x47, 0x42, 0x44, 0x8c, - 0x12, 0xa1, 0x1c, 0x25, 0x42, 0x38, - 0x8a, 0x45, 0xc1, 0x14, 0x8b, 0x80, - 0x46, 0x4a, 0x6c, 0x8c, 0x94, 0xd8, - 0x33, 0x24, 0x26, 0x66, 0x48, 0x4c, - 0x91, 0x92, 0x13, 0x23, 0x24, 0x24, - 0xa4, 0x20, 0x4b, 0x48, 0x40, 0x94, - 0x50, 0xa0, 0xd4, 0xa1, 0x41, 0xa8, - 0x84, 0xc5, 0x81, 0x09, 0x8b, 0x00, - 0x09, 0x71, 0x0c, 0x12, 0xe2, 0x18, - 0x46, 0x4a, 0x6c, 0x8c, 0x94, 0xd8, - 0x33, 0x24, 0x26, 0x66, 0x48, 0x4c, - 0x91, 0x92, 0x13, 0x23, 0x24, 0x24, - 0xa4, 0x20, 0x4b, 0x48, 0x40, 0x94, - 0x50, 0xa0, 0xd4, 0xa1, 0x41, 0xa8, - 0x84, 0xc5, 0x81, 0x09, 0x8b, 0x00, - 0x09, 0x71, 0x0c, 0x12, 0xe2, 0x18, - 0x64, 0x4a, 0x28, 0xc8, 0x94, 0x50, - 0x51, 0x58, 0xa2, 0xa2, 0xb1, 0x44, - 0x0c, 0xa4, 0x30, 0x19, 0x48, 0x60, - 0xa1, 0x22, 0x47, 0x42, 0x44, 0x8c, - 0x12, 0xa1, 0x1c, 0x25, 0x42, 0x38, - 0x8a, 0x45, 0xc1, 0x14, 0x8b, 0x80, - 0x9c, 0x3f, 0xb3, 0x38, 0x7f, 0x64 -}; - -const uint8_t kMaskRandom46_28[168] = { - 0x46, 0x4a, 0x6c, 0x8c, 0x94, 0xd8, - 0x33, 0x24, 0x26, 0x66, 0x48, 0x4c, - 0x91, 0x92, 0x13, 0x23, 0x24, 0x24, - 0xa4, 0x20, 0x4b, 0x48, 0x40, 0x94, - 0x50, 0xa0, 0xd4, 0xa1, 0x41, 0xa8, - 0x84, 0xc5, 0x81, 0x09, 0x8b, 0x00, - 0x09, 0x71, 0x0c, 0x12, 0xe2, 0x18, - 0x64, 0x4a, 0x28, 0xc8, 0x94, 0x50, - 0x51, 0x58, 0xa2, 0xa2, 0xb1, 0x44, - 0x0c, 0xa4, 0x30, 0x19, 0x48, 0x60, - 0xa1, 0x22, 0x47, 0x42, 0x44, 0x8c, - 0x12, 0xa1, 0x1c, 0x25, 0x42, 0x38, - 0x8a, 0x45, 0xc1, 0x14, 0x8b, 0x80, - 0x9c, 0x3f, 0xb3, 0x38, 0x7f, 0x64, - 0x64, 0x4a, 0x28, 0xc8, 0x94, 0x50, - 0x51, 0x58, 0xa2, 0xa2, 0xb1, 0x44, - 0x0c, 0xa4, 0x30, 0x19, 0x48, 0x60, - 0xa1, 0x22, 0x47, 0x42, 0x44, 0x8c, - 0x12, 0xa1, 0x1c, 0x25, 0x42, 0x38, - 0x8a, 0x45, 0xc1, 0x14, 0x8b, 0x80, - 0x46, 0x4a, 0x6c, 0x8c, 0x94, 0xd8, - 0x33, 0x24, 0x26, 0x66, 0x48, 0x4c, - 0x91, 0x92, 0x13, 0x23, 0x24, 0x24, - 0xa4, 0x20, 0x4b, 0x48, 0x40, 0x94, - 0x50, 0xa0, 0xd4, 0xa1, 0x41, 0xa8, - 0x84, 0xc5, 0x81, 0x09, 0x8b, 0x00, - 0x09, 0x71, 0x0c, 0x12, 0xe2, 0x18, - 0xfa, 0x52, 0xf9, 0x72, 0xd9, 0x68 -}; - -const uint8_t kMaskRandom46_29[174] = { - 0x46, 0x4a, 0x6c, 0x8c, 0x94, 0xd8, - 0x33, 0x24, 0x26, 0x66, 0x48, 0x4c, - 0x91, 0x92, 0x13, 0x23, 0x24, 0x24, - 0xa4, 0x20, 0x4b, 0x48, 0x40, 0x94, - 0x50, 0xa0, 0xd4, 0xa1, 0x41, 0xa8, - 0x84, 0xc5, 0x81, 0x09, 0x8b, 0x00, - 0x09, 0x71, 0x0c, 0x12, 0xe2, 0x18, - 0x64, 0x4a, 0x28, 0xc8, 0x94, 0x50, - 0x51, 0x58, 0xa2, 0xa2, 0xb1, 0x44, - 0x0c, 0xa4, 0x30, 0x19, 0x48, 0x60, - 0xa1, 0x22, 0x47, 0x42, 0x44, 0x8c, - 0x12, 0xa1, 0x1c, 0x25, 0x42, 0x38, - 0x8a, 0x45, 0xc1, 0x14, 0x8b, 0x80, - 0x9c, 0x3f, 0xb3, 0x38, 0x7f, 0x64, - 0x46, 0x4a, 0x6c, 0x8c, 0x94, 0xd8, - 0x33, 0x24, 0x26, 0x66, 0x48, 0x4c, - 0x91, 0x92, 0x13, 0x23, 0x24, 0x24, - 0xa4, 0x20, 0x4b, 0x48, 0x40, 0x94, - 0x50, 0xa0, 0xd4, 0xa1, 0x41, 0xa8, - 0x84, 0xc5, 0x81, 0x09, 0x8b, 0x00, - 0x09, 0x71, 0x0c, 0x12, 0xe2, 0x18, - 0x0c, 0x84, 0x0c, 0x19, 0x08, 0x18, - 0x80, 0x70, 0x07, 0x00, 0xe0, 0x0c, - 0xa0, 0x88, 0x49, 0x41, 0x10, 0x90, - 0x05, 0x40, 0x32, 0x0a, 0x80, 0x64, - 0x43, 0x02, 0x82, 0x86, 0x05, 0x04, - 0x1a, 0x01, 0x50, 0x34, 0x02, 0xa0, - 0x60, 0x27, 0x00, 0xc0, 0x4e, 0x00, - 0x14, 0x38, 0xa0, 0x28, 0x71, 0x40 -}; - -const uint8_t kMaskRandom46_3[18] = { - 0xca, 0xd3, 0x65, 0x95, 0xa6, 0xc8, - 0xf1, 0x49, 0x3b, 0xe2, 0x92, 0x74, - 0x76, 0x27, 0xd0, 0xec, 0x4f, 0xa0 -}; - -const uint8_t kMaskRandom46_30[180] = { - 0x46, 0x4a, 0x6c, 0x8c, 0x94, 0xd8, - 0x33, 0x24, 0x26, 0x66, 0x48, 0x4c, - 0x91, 0x92, 0x13, 0x23, 0x24, 0x24, - 0xa4, 0x20, 0x4b, 0x48, 0x40, 0x94, - 0x50, 0xa0, 0xd4, 0xa1, 0x41, 0xa8, - 0x84, 0xc5, 0x81, 0x09, 0x8b, 0x00, - 0x09, 0x71, 0x0c, 0x12, 0xe2, 0x18, - 0x0c, 0x84, 0x0c, 0x19, 0x08, 0x18, - 0x80, 0x70, 0x07, 0x00, 0xe0, 0x0c, - 0xa0, 0x88, 0x49, 0x41, 0x10, 0x90, - 0x05, 0x40, 0x32, 0x0a, 0x80, 0x64, - 0x43, 0x02, 0x82, 0x86, 0x05, 0x04, - 0x1a, 0x01, 0x50, 0x34, 0x02, 0xa0, - 0x60, 0x27, 0x00, 0xc0, 0x4e, 0x00, - 0x14, 0x38, 0xa0, 0x28, 0x71, 0x40, - 0x46, 0x4a, 0x6c, 0x8c, 0x94, 0xd8, - 0x33, 0x24, 0x26, 0x66, 0x48, 0x4c, - 0x91, 0x92, 0x13, 0x23, 0x24, 0x24, - 0xa4, 0x20, 0x4b, 0x48, 0x40, 0x94, - 0x50, 0xa0, 0xd4, 0xa1, 0x41, 0xa8, - 0x84, 0xc5, 0x81, 0x09, 0x8b, 0x00, - 0x09, 0x71, 0x0c, 0x12, 0xe2, 0x18, - 0x64, 0x4a, 0x28, 0xc8, 0x94, 0x50, - 0x51, 0x58, 0xa2, 0xa2, 0xb1, 0x44, - 0x0c, 0xa4, 0x30, 0x19, 0x48, 0x60, - 0xa1, 0x22, 0x47, 0x42, 0x44, 0x8c, - 0x12, 0xa1, 0x1c, 0x25, 0x42, 0x38, - 0x8a, 0x45, 0xc1, 0x14, 0x8b, 0x80, - 0x9c, 0x3f, 0xb3, 0x38, 0x7f, 0x64, - 0x99, 0xf6, 0x0a, 0xdd, 0x16, 0xb0 -}; - -const uint8_t kMaskRandom46_31[186] = { - 0x46, 0x4a, 0x6c, 0x8c, 0x94, 0xd8, - 0x33, 0x24, 0x26, 0x66, 0x48, 0x4c, - 0x91, 0x92, 0x13, 0x23, 0x24, 0x24, - 0xa4, 0x20, 0x4b, 0x48, 0x40, 0x94, - 0x50, 0xa0, 0xd4, 0xa1, 0x41, 0xa8, - 0x84, 0xc5, 0x81, 0x09, 0x8b, 0x00, - 0x09, 0x71, 0x0c, 0x12, 0xe2, 0x18, - 0x0c, 0x84, 0x0c, 0x19, 0x08, 0x18, - 0x80, 0x70, 0x07, 0x00, 0xe0, 0x0c, - 0xa0, 0x88, 0x49, 0x41, 0x10, 0x90, - 0x05, 0x40, 0x32, 0x0a, 0x80, 0x64, - 0x43, 0x02, 0x82, 0x86, 0x05, 0x04, - 0x1a, 0x01, 0x50, 0x34, 0x02, 0xa0, - 0x60, 0x27, 0x00, 0xc0, 0x4e, 0x00, - 0x14, 0x38, 0xa0, 0x28, 0x71, 0x40, - 0x0c, 0x84, 0x0c, 0x19, 0x08, 0x18, - 0x80, 0x70, 0x07, 0x00, 0xe0, 0x0c, - 0xa0, 0x88, 0x49, 0x41, 0x10, 0x90, - 0x05, 0x40, 0x32, 0x0a, 0x80, 0x64, - 0x43, 0x02, 0x82, 0x86, 0x05, 0x04, - 0x1a, 0x01, 0x50, 0x34, 0x02, 0xa0, - 0x60, 0x27, 0x00, 0xc0, 0x4e, 0x00, - 0x14, 0x38, 0xa0, 0x28, 0x71, 0x40, - 0x46, 0x4a, 0x6c, 0x8c, 0x94, 0xd8, - 0x33, 0x24, 0x26, 0x66, 0x48, 0x4c, - 0x91, 0x92, 0x13, 0x23, 0x24, 0x24, - 0xa4, 0x20, 0x4b, 0x48, 0x40, 0x94, - 0x50, 0xa0, 0xd4, 0xa1, 0x41, 0xa8, - 0x84, 0xc5, 0x81, 0x09, 0x8b, 0x00, - 0x09, 0x71, 0x0c, 0x12, 0xe2, 0x18, - 0xfa, 0xd9, 0xf5, 0xf5, 0xb3, 0xe8 -}; - -const uint8_t kMaskRandom46_32[192] = { - 0x0c, 0x84, 0x0c, 0x19, 0x08, 0x18, - 0x80, 0x70, 0x07, 0x00, 0xe0, 0x0c, - 0xa0, 0x88, 0x49, 0x41, 0x10, 0x90, - 0x05, 0x40, 0x32, 0x0a, 0x80, 0x64, - 0x43, 0x02, 0x82, 0x86, 0x05, 0x04, - 0x1a, 0x01, 0x50, 0x34, 0x02, 0xa0, - 0x60, 0x27, 0x00, 0xc0, 0x4e, 0x00, - 0x14, 0x38, 0xa0, 0x28, 0x71, 0x40, - 0x46, 0x4a, 0x6c, 0x8c, 0x94, 0xd8, - 0x33, 0x24, 0x26, 0x66, 0x48, 0x4c, - 0x91, 0x92, 0x13, 0x23, 0x24, 0x24, - 0xa4, 0x20, 0x4b, 0x48, 0x40, 0x94, - 0x50, 0xa0, 0xd4, 0xa1, 0x41, 0xa8, - 0x84, 0xc5, 0x81, 0x09, 0x8b, 0x00, - 0x09, 0x71, 0x0c, 0x12, 0xe2, 0x18, - 0xfa, 0xd9, 0xf5, 0xf5, 0xb3, 0xe8, - 0x46, 0x4a, 0x6c, 0x8c, 0x94, 0xd8, - 0x33, 0x24, 0x26, 0x66, 0x48, 0x4c, - 0x91, 0x92, 0x13, 0x23, 0x24, 0x24, - 0xa4, 0x20, 0x4b, 0x48, 0x40, 0x94, - 0x50, 0xa0, 0xd4, 0xa1, 0x41, 0xa8, - 0x84, 0xc5, 0x81, 0x09, 0x8b, 0x00, - 0x09, 0x71, 0x0c, 0x12, 0xe2, 0x18, - 0x0c, 0x84, 0x0c, 0x19, 0x08, 0x18, - 0x80, 0x70, 0x07, 0x00, 0xe0, 0x0c, - 0xa0, 0x88, 0x49, 0x41, 0x10, 0x90, - 0x05, 0x40, 0x32, 0x0a, 0x80, 0x64, - 0x43, 0x02, 0x82, 0x86, 0x05, 0x04, - 0x1a, 0x01, 0x50, 0x34, 0x02, 0xa0, - 0x60, 0x27, 0x00, 0xc0, 0x4e, 0x00, - 0x14, 0x38, 0xa0, 0x28, 0x71, 0x40, - 0x69, 0xcd, 0xeb, 0x51, 0xc9, 0xa8 -}; - -const uint8_t kMaskRandom46_33[198] = { - 0x0c, 0x84, 0x0c, 0x19, 0x08, 0x18, - 0x80, 0x70, 0x07, 0x00, 0xe0, 0x0c, - 0xa0, 0x88, 0x49, 0x41, 0x10, 0x90, - 0x05, 0x40, 0x32, 0x0a, 0x80, 0x64, - 0x43, 0x02, 0x82, 0x86, 0x05, 0x04, - 0x1a, 0x01, 0x50, 0x34, 0x02, 0xa0, - 0x60, 0x27, 0x00, 0xc0, 0x4e, 0x00, - 0x14, 0x38, 0xa0, 0x28, 0x71, 0x40, - 0x46, 0x4a, 0x6c, 0x8c, 0x94, 0xd8, - 0x33, 0x24, 0x26, 0x66, 0x48, 0x4c, - 0x91, 0x92, 0x13, 0x23, 0x24, 0x24, - 0xa4, 0x20, 0x4b, 0x48, 0x40, 0x94, - 0x50, 0xa0, 0xd4, 0xa1, 0x41, 0xa8, - 0x84, 0xc5, 0x81, 0x09, 0x8b, 0x00, - 0x09, 0x71, 0x0c, 0x12, 0xe2, 0x18, - 0xfa, 0xd9, 0xf5, 0xf5, 0xb3, 0xe8, - 0x0c, 0x84, 0x0c, 0x19, 0x08, 0x18, - 0x80, 0x70, 0x07, 0x00, 0xe0, 0x0c, - 0xa0, 0x88, 0x49, 0x41, 0x10, 0x90, - 0x05, 0x40, 0x32, 0x0a, 0x80, 0x64, - 0x43, 0x02, 0x82, 0x86, 0x05, 0x04, - 0x1a, 0x01, 0x50, 0x34, 0x02, 0xa0, - 0x60, 0x27, 0x00, 0xc0, 0x4e, 0x00, - 0x14, 0x38, 0xa0, 0x28, 0x71, 0x40, - 0x46, 0x4a, 0x6c, 0x8c, 0x94, 0xd8, - 0x62, 0x7c, 0x84, 0xc4, 0xf9, 0x08, - 0x8c, 0x04, 0x89, 0x18, 0x09, 0x10, - 0x01, 0x74, 0x22, 0x02, 0xe8, 0x44, - 0x07, 0x83, 0x06, 0x0f, 0x06, 0x0c, - 0xa0, 0x80, 0x73, 0x41, 0x00, 0xe4, - 0x18, 0xb1, 0x42, 0x31, 0x62, 0x84, - 0x91, 0x00, 0x93, 0x22, 0x01, 0x24, - 0x78, 0x00, 0x1c, 0xf0, 0x00, 0x38 -}; - -const uint8_t kMaskRandom46_34[204] = { - 0x0c, 0x84, 0x0c, 0x19, 0x08, 0x18, - 0x80, 0x70, 0x07, 0x00, 0xe0, 0x0c, - 0xa0, 0x88, 0x49, 0x41, 0x10, 0x90, - 0x05, 0x40, 0x32, 0x0a, 0x80, 0x64, - 0x43, 0x02, 0x82, 0x86, 0x05, 0x04, - 0x1a, 0x01, 0x50, 0x34, 0x02, 0xa0, - 0x60, 0x27, 0x00, 0xc0, 0x4e, 0x00, - 0x14, 0x38, 0xa0, 0x28, 0x71, 0x40, - 0x46, 0x4a, 0x6c, 0x8c, 0x94, 0xd8, - 0x62, 0x7c, 0x84, 0xc4, 0xf9, 0x08, - 0x8c, 0x04, 0x89, 0x18, 0x09, 0x10, - 0x01, 0x74, 0x22, 0x02, 0xe8, 0x44, - 0x07, 0x83, 0x06, 0x0f, 0x06, 0x0c, - 0xa0, 0x80, 0x73, 0x41, 0x00, 0xe4, - 0x18, 0xb1, 0x42, 0x31, 0x62, 0x84, - 0x91, 0x00, 0x93, 0x22, 0x01, 0x24, - 0x78, 0x00, 0x1c, 0xf0, 0x00, 0x38, - 0x0c, 0x84, 0x0c, 0x19, 0x08, 0x18, - 0x80, 0x70, 0x07, 0x00, 0xe0, 0x0c, - 0xa0, 0x88, 0x49, 0x41, 0x10, 0x90, - 0x05, 0x40, 0x32, 0x0a, 0x80, 0x64, - 0x43, 0x02, 0x82, 0x86, 0x05, 0x04, - 0x1a, 0x01, 0x50, 0x34, 0x02, 0xa0, - 0x60, 0x27, 0x00, 0xc0, 0x4e, 0x00, - 0x14, 0x38, 0xa0, 0x28, 0x71, 0x40, - 0x46, 0x4a, 0x6c, 0x8c, 0x94, 0xd8, - 0x33, 0x24, 0x26, 0x66, 0x48, 0x4c, - 0x91, 0x92, 0x13, 0x23, 0x24, 0x24, - 0xa4, 0x20, 0x4b, 0x48, 0x40, 0x94, - 0x50, 0xa0, 0xd4, 0xa1, 0x41, 0xa8, - 0x84, 0xc5, 0x81, 0x09, 0x8b, 0x00, - 0x09, 0x71, 0x0c, 0x12, 0xe2, 0x18, - 0xfa, 0xd9, 0xf5, 0xf5, 0xb3, 0xe8, - 0x60, 0xf0, 0x13, 0xf0, 0x4d, 0xe0 -}; - -const uint8_t kMaskRandom46_35[210] = { - 0x0c, 0x84, 0x0c, 0x19, 0x08, 0x18, - 0x80, 0x70, 0x07, 0x00, 0xe0, 0x0c, - 0xa0, 0x88, 0x49, 0x41, 0x10, 0x90, - 0x05, 0x40, 0x32, 0x0a, 0x80, 0x64, - 0x43, 0x02, 0x82, 0x86, 0x05, 0x04, - 0x1a, 0x01, 0x50, 0x34, 0x02, 0xa0, - 0x60, 0x27, 0x00, 0xc0, 0x4e, 0x00, - 0x14, 0x38, 0xa0, 0x28, 0x71, 0x40, - 0x46, 0x4a, 0x6c, 0x8c, 0x94, 0xd8, - 0x62, 0x7c, 0x84, 0xc4, 0xf9, 0x08, - 0x8c, 0x04, 0x89, 0x18, 0x09, 0x10, - 0x01, 0x74, 0x22, 0x02, 0xe8, 0x44, - 0x07, 0x83, 0x06, 0x0f, 0x06, 0x0c, - 0xa0, 0x80, 0x73, 0x41, 0x00, 0xe4, - 0x18, 0xb1, 0x42, 0x31, 0x62, 0x84, - 0x91, 0x00, 0x93, 0x22, 0x01, 0x24, - 0x78, 0x00, 0x1c, 0xf0, 0x00, 0x38, - 0x46, 0x4a, 0x6c, 0x8c, 0x94, 0xd8, - 0x62, 0x7c, 0x84, 0xc4, 0xf9, 0x08, - 0x8c, 0x04, 0x89, 0x18, 0x09, 0x10, - 0x01, 0x74, 0x22, 0x02, 0xe8, 0x44, - 0x07, 0x83, 0x06, 0x0f, 0x06, 0x0c, - 0xa0, 0x80, 0x73, 0x41, 0x00, 0xe4, - 0x18, 0xb1, 0x42, 0x31, 0x62, 0x84, - 0x91, 0x00, 0x93, 0x22, 0x01, 0x24, - 0x78, 0x00, 0x1c, 0xf0, 0x00, 0x38, - 0x0c, 0x84, 0x0c, 0x19, 0x08, 0x18, - 0x80, 0x70, 0x07, 0x00, 0xe0, 0x0c, - 0xa0, 0x88, 0x49, 0x41, 0x10, 0x90, - 0x05, 0x40, 0x32, 0x0a, 0x80, 0x64, - 0x43, 0x02, 0x82, 0x86, 0x05, 0x04, - 0x1a, 0x01, 0x50, 0x34, 0x02, 0xa0, - 0x60, 0x27, 0x00, 0xc0, 0x4e, 0x00, - 0x14, 0x38, 0xa0, 0x28, 0x71, 0x40, - 0x82, 0x32, 0x57, 0x04, 0x64, 0xac -}; - -const uint8_t kMaskRandom46_36[216] = { - 0x46, 0x4a, 0x6c, 0x8c, 0x94, 0xd8, - 0x62, 0x7c, 0x84, 0xc4, 0xf9, 0x08, - 0x8c, 0x04, 0x89, 0x18, 0x09, 0x10, - 0x01, 0x74, 0x22, 0x02, 0xe8, 0x44, - 0x07, 0x83, 0x06, 0x0f, 0x06, 0x0c, - 0xa0, 0x80, 0x73, 0x41, 0x00, 0xe4, - 0x18, 0xb1, 0x42, 0x31, 0x62, 0x84, - 0x91, 0x00, 0x93, 0x22, 0x01, 0x24, - 0x78, 0x00, 0x1c, 0xf0, 0x00, 0x38, - 0x0c, 0x84, 0x0c, 0x19, 0x08, 0x18, - 0x80, 0x70, 0x07, 0x00, 0xe0, 0x0c, - 0xa0, 0x88, 0x49, 0x41, 0x10, 0x90, - 0x05, 0x40, 0x32, 0x0a, 0x80, 0x64, - 0x43, 0x02, 0x82, 0x86, 0x05, 0x04, - 0x1a, 0x01, 0x50, 0x34, 0x02, 0xa0, - 0x60, 0x27, 0x00, 0xc0, 0x4e, 0x00, - 0x14, 0x38, 0xa0, 0x28, 0x71, 0x40, - 0x82, 0x32, 0x57, 0x04, 0x64, 0xac, - 0x0c, 0x84, 0x0c, 0x19, 0x08, 0x18, - 0x80, 0x70, 0x07, 0x00, 0xe0, 0x0c, - 0xa0, 0x88, 0x49, 0x41, 0x10, 0x90, - 0x05, 0x40, 0x32, 0x0a, 0x80, 0x64, - 0x43, 0x02, 0x82, 0x86, 0x05, 0x04, - 0x1a, 0x01, 0x50, 0x34, 0x02, 0xa0, - 0x60, 0x27, 0x00, 0xc0, 0x4e, 0x00, - 0x14, 0x38, 0xa0, 0x28, 0x71, 0x40, - 0x46, 0x4a, 0x6c, 0x8c, 0x94, 0xd8, - 0x62, 0x7c, 0x84, 0xc4, 0xf9, 0x08, - 0x8c, 0x04, 0x89, 0x18, 0x09, 0x10, - 0x01, 0x74, 0x22, 0x02, 0xe8, 0x44, - 0x07, 0x83, 0x06, 0x0f, 0x06, 0x0c, - 0xa0, 0x80, 0x73, 0x41, 0x00, 0xe4, - 0x18, 0xb1, 0x42, 0x31, 0x62, 0x84, - 0x91, 0x00, 0x93, 0x22, 0x01, 0x24, - 0x78, 0x00, 0x1c, 0xf0, 0x00, 0x38, - 0x6c, 0x3a, 0x45, 0x70, 0xd7, 0x00 -}; - -const uint8_t kMaskRandom46_37[222] = { - 0x46, 0x4a, 0x6c, 0x8c, 0x94, 0xd8, - 0x62, 0x7c, 0x84, 0xc4, 0xf9, 0x08, - 0x8c, 0x04, 0x89, 0x18, 0x09, 0x10, - 0x01, 0x74, 0x22, 0x02, 0xe8, 0x44, - 0x07, 0x83, 0x06, 0x0f, 0x06, 0x0c, - 0xa0, 0x80, 0x73, 0x41, 0x00, 0xe4, - 0x18, 0xb1, 0x42, 0x31, 0x62, 0x84, - 0x91, 0x00, 0x93, 0x22, 0x01, 0x24, - 0x78, 0x00, 0x1c, 0xf0, 0x00, 0x38, - 0x0c, 0x84, 0x0c, 0x19, 0x08, 0x18, - 0x80, 0x70, 0x07, 0x00, 0xe0, 0x0c, - 0xa0, 0x88, 0x49, 0x41, 0x10, 0x90, - 0x05, 0x40, 0x32, 0x0a, 0x80, 0x64, - 0x43, 0x02, 0x82, 0x86, 0x05, 0x04, - 0x1a, 0x01, 0x50, 0x34, 0x02, 0xa0, - 0x60, 0x27, 0x00, 0xc0, 0x4e, 0x00, - 0x14, 0x38, 0xa0, 0x28, 0x71, 0x40, - 0x82, 0x32, 0x57, 0x04, 0x64, 0xac, - 0x46, 0x4a, 0x6c, 0x8c, 0x94, 0xd8, - 0x62, 0x7c, 0x84, 0xc4, 0xf9, 0x08, - 0x8c, 0x04, 0x89, 0x18, 0x09, 0x10, - 0x01, 0x74, 0x22, 0x02, 0xe8, 0x44, - 0x07, 0x83, 0x06, 0x0f, 0x06, 0x0c, - 0xa0, 0x80, 0x73, 0x41, 0x00, 0xe4, - 0x18, 0xb1, 0x42, 0x31, 0x62, 0x84, - 0x91, 0x00, 0x93, 0x22, 0x01, 0x24, - 0x78, 0x00, 0x1c, 0xf0, 0x00, 0x38, - 0x64, 0x4a, 0x28, 0xc8, 0x94, 0x50, - 0x51, 0x48, 0xa2, 0xa2, 0x91, 0x44, - 0xa9, 0x10, 0x1b, 0x52, 0x20, 0x34, - 0x04, 0xc4, 0x84, 0x09, 0x89, 0x08, - 0xd0, 0x01, 0x45, 0xa0, 0x02, 0x88, - 0x82, 0x40, 0x1d, 0x04, 0x80, 0x38, - 0x21, 0x37, 0x00, 0x42, 0x6e, 0x00, - 0x0c, 0x21, 0x22, 0x18, 0x42, 0x44, - 0x4a, 0x0a, 0xc0, 0x94, 0x15, 0x80, - 0x12, 0xb4, 0x50, 0x25, 0x68, 0xa0 -}; - -const uint8_t kMaskRandom46_38[228] = { - 0x46, 0x4a, 0x6c, 0x8c, 0x94, 0xd8, - 0x62, 0x7c, 0x84, 0xc4, 0xf9, 0x08, - 0x8c, 0x04, 0x89, 0x18, 0x09, 0x10, - 0x01, 0x74, 0x22, 0x02, 0xe8, 0x44, - 0x07, 0x83, 0x06, 0x0f, 0x06, 0x0c, - 0xa0, 0x80, 0x73, 0x41, 0x00, 0xe4, - 0x18, 0xb1, 0x42, 0x31, 0x62, 0x84, - 0x91, 0x00, 0x93, 0x22, 0x01, 0x24, - 0x78, 0x00, 0x1c, 0xf0, 0x00, 0x38, - 0x64, 0x4a, 0x28, 0xc8, 0x94, 0x50, - 0x51, 0x48, 0xa2, 0xa2, 0x91, 0x44, - 0xa9, 0x10, 0x1b, 0x52, 0x20, 0x34, - 0x04, 0xc4, 0x84, 0x09, 0x89, 0x08, - 0xd0, 0x01, 0x45, 0xa0, 0x02, 0x88, - 0x82, 0x40, 0x1d, 0x04, 0x80, 0x38, - 0x21, 0x37, 0x00, 0x42, 0x6e, 0x00, - 0x0c, 0x21, 0x22, 0x18, 0x42, 0x44, - 0x4a, 0x0a, 0xc0, 0x94, 0x15, 0x80, - 0x12, 0xb4, 0x50, 0x25, 0x68, 0xa0, - 0x46, 0x4a, 0x6c, 0x8c, 0x94, 0xd8, - 0x62, 0x7c, 0x84, 0xc4, 0xf9, 0x08, - 0x8c, 0x04, 0x89, 0x18, 0x09, 0x10, - 0x01, 0x74, 0x22, 0x02, 0xe8, 0x44, - 0x07, 0x83, 0x06, 0x0f, 0x06, 0x0c, - 0xa0, 0x80, 0x73, 0x41, 0x00, 0xe4, - 0x18, 0xb1, 0x42, 0x31, 0x62, 0x84, - 0x91, 0x00, 0x93, 0x22, 0x01, 0x24, - 0x78, 0x00, 0x1c, 0xf0, 0x00, 0x38, - 0x0c, 0x84, 0x0c, 0x19, 0x08, 0x18, - 0x80, 0x70, 0x07, 0x00, 0xe0, 0x0c, - 0xa0, 0x88, 0x49, 0x41, 0x10, 0x90, - 0x05, 0x40, 0x32, 0x0a, 0x80, 0x64, - 0x43, 0x02, 0x82, 0x86, 0x05, 0x04, - 0x1a, 0x01, 0x50, 0x34, 0x02, 0xa0, - 0x60, 0x27, 0x00, 0xc0, 0x4e, 0x00, - 0x14, 0x38, 0xa0, 0x28, 0x71, 0x40, - 0x82, 0x32, 0x57, 0x04, 0x64, 0xac, - 0x72, 0x2b, 0xa5, 0xd4, 0xb9, 0x30 -}; - -const uint8_t kMaskRandom46_39[234] = { - 0x46, 0x4a, 0x6c, 0x8c, 0x94, 0xd8, - 0x62, 0x7c, 0x84, 0xc4, 0xf9, 0x08, - 0x8c, 0x04, 0x89, 0x18, 0x09, 0x10, - 0x01, 0x74, 0x22, 0x02, 0xe8, 0x44, - 0x07, 0x83, 0x06, 0x0f, 0x06, 0x0c, - 0xa0, 0x80, 0x73, 0x41, 0x00, 0xe4, - 0x18, 0xb1, 0x42, 0x31, 0x62, 0x84, - 0x91, 0x00, 0x93, 0x22, 0x01, 0x24, - 0x78, 0x00, 0x1c, 0xf0, 0x00, 0x38, - 0x64, 0x4a, 0x28, 0xc8, 0x94, 0x50, - 0x51, 0x48, 0xa2, 0xa2, 0x91, 0x44, - 0xa9, 0x10, 0x1b, 0x52, 0x20, 0x34, - 0x04, 0xc4, 0x84, 0x09, 0x89, 0x08, - 0xd0, 0x01, 0x45, 0xa0, 0x02, 0x88, - 0x82, 0x40, 0x1d, 0x04, 0x80, 0x38, - 0x21, 0x37, 0x00, 0x42, 0x6e, 0x00, - 0x0c, 0x21, 0x22, 0x18, 0x42, 0x44, - 0x4a, 0x0a, 0xc0, 0x94, 0x15, 0x80, - 0x12, 0xb4, 0x50, 0x25, 0x68, 0xa0, - 0x64, 0x4a, 0x28, 0xc8, 0x94, 0x50, - 0x51, 0x48, 0xa2, 0xa2, 0x91, 0x44, - 0xa9, 0x10, 0x1b, 0x52, 0x20, 0x34, - 0x04, 0xc4, 0x84, 0x09, 0x89, 0x08, - 0xd0, 0x01, 0x45, 0xa0, 0x02, 0x88, - 0x82, 0x40, 0x1d, 0x04, 0x80, 0x38, - 0x21, 0x37, 0x00, 0x42, 0x6e, 0x00, - 0x0c, 0x21, 0x22, 0x18, 0x42, 0x44, - 0x4a, 0x0a, 0xc0, 0x94, 0x15, 0x80, - 0x12, 0xb4, 0x50, 0x25, 0x68, 0xa0, - 0x46, 0x4a, 0x6c, 0x8c, 0x94, 0xd8, - 0x62, 0x7c, 0x84, 0xc4, 0xf9, 0x08, - 0x8c, 0x04, 0x89, 0x18, 0x09, 0x10, - 0x01, 0x74, 0x22, 0x02, 0xe8, 0x44, - 0x07, 0x83, 0x06, 0x0f, 0x06, 0x0c, - 0xa0, 0x80, 0x73, 0x41, 0x00, 0xe4, - 0x18, 0xb1, 0x42, 0x31, 0x62, 0x84, - 0x91, 0x00, 0x93, 0x22, 0x01, 0x24, - 0x78, 0x00, 0x1c, 0xf0, 0x00, 0x38, - 0xdb, 0x4a, 0x7b, 0xb6, 0x94, 0xf4 -}; - -const uint8_t kMaskRandom46_4[24] = { - 0xc4, 0xd1, 0x65, 0x89, 0xa2, 0xc8, - 0x31, 0x62, 0x96, 0x62, 0xc5, 0x2c, - 0x4b, 0x24, 0x5a, 0x96, 0x48, 0xb4, - 0x2c, 0xa8, 0xaa, 0x59, 0x51, 0x54 -}; - -const uint8_t kMaskRandom46_40[240] = { - 0x64, 0x4a, 0x28, 0xc8, 0x94, 0x50, - 0x51, 0x48, 0xa2, 0xa2, 0x91, 0x44, - 0xa9, 0x10, 0x1b, 0x52, 0x20, 0x34, - 0x04, 0xc4, 0x84, 0x09, 0x89, 0x08, - 0xd0, 0x01, 0x45, 0xa0, 0x02, 0x88, - 0x82, 0x40, 0x1d, 0x04, 0x80, 0x38, - 0x21, 0x37, 0x00, 0x42, 0x6e, 0x00, - 0x0c, 0x21, 0x22, 0x18, 0x42, 0x44, - 0x4a, 0x0a, 0xc0, 0x94, 0x15, 0x80, - 0x12, 0xb4, 0x50, 0x25, 0x68, 0xa0, - 0x46, 0x4a, 0x6c, 0x8c, 0x94, 0xd8, - 0x62, 0x7c, 0x84, 0xc4, 0xf9, 0x08, - 0x8c, 0x04, 0x89, 0x18, 0x09, 0x10, - 0x01, 0x74, 0x22, 0x02, 0xe8, 0x44, - 0x07, 0x83, 0x06, 0x0f, 0x06, 0x0c, - 0xa0, 0x80, 0x73, 0x41, 0x00, 0xe4, - 0x18, 0xb1, 0x42, 0x31, 0x62, 0x84, - 0x91, 0x00, 0x93, 0x22, 0x01, 0x24, - 0x78, 0x00, 0x1c, 0xf0, 0x00, 0x38, - 0xdb, 0x4a, 0x7b, 0xb6, 0x94, 0xf4, - 0x46, 0x4a, 0x6c, 0x8c, 0x94, 0xd8, - 0x62, 0x7c, 0x84, 0xc4, 0xf9, 0x08, - 0x8c, 0x04, 0x89, 0x18, 0x09, 0x10, - 0x01, 0x74, 0x22, 0x02, 0xe8, 0x44, - 0x07, 0x83, 0x06, 0x0f, 0x06, 0x0c, - 0xa0, 0x80, 0x73, 0x41, 0x00, 0xe4, - 0x18, 0xb1, 0x42, 0x31, 0x62, 0x84, - 0x91, 0x00, 0x93, 0x22, 0x01, 0x24, - 0x78, 0x00, 0x1c, 0xf0, 0x00, 0x38, - 0x64, 0x4a, 0x28, 0xc8, 0x94, 0x50, - 0x51, 0x48, 0xa2, 0xa2, 0x91, 0x44, - 0xa9, 0x10, 0x1b, 0x52, 0x20, 0x34, - 0x04, 0xc4, 0x84, 0x09, 0x89, 0x08, - 0xd0, 0x01, 0x45, 0xa0, 0x02, 0x88, - 0x82, 0x40, 0x1d, 0x04, 0x80, 0x38, - 0x21, 0x37, 0x00, 0x42, 0x6e, 0x00, - 0x0c, 0x21, 0x22, 0x18, 0x42, 0x44, - 0x4a, 0x0a, 0xc0, 0x94, 0x15, 0x80, - 0x12, 0xb4, 0x50, 0x25, 0x68, 0xa0, - 0x7c, 0xc8, 0x93, 0x63, 0x3c, 0x80 -}; - -const uint8_t kMaskRandom46_41[246] = { - 0x64, 0x4a, 0x28, 0xc8, 0x94, 0x50, - 0x51, 0x48, 0xa2, 0xa2, 0x91, 0x44, - 0xa9, 0x10, 0x1b, 0x52, 0x20, 0x34, - 0x04, 0xc4, 0x84, 0x09, 0x89, 0x08, - 0xd0, 0x01, 0x45, 0xa0, 0x02, 0x88, - 0x82, 0x40, 0x1d, 0x04, 0x80, 0x38, - 0x21, 0x37, 0x00, 0x42, 0x6e, 0x00, - 0x0c, 0x21, 0x22, 0x18, 0x42, 0x44, - 0x4a, 0x0a, 0xc0, 0x94, 0x15, 0x80, - 0x12, 0xb4, 0x50, 0x25, 0x68, 0xa0, - 0x46, 0x4a, 0x6c, 0x8c, 0x94, 0xd8, - 0x62, 0x7c, 0x84, 0xc4, 0xf9, 0x08, - 0x8c, 0x04, 0x89, 0x18, 0x09, 0x10, - 0x01, 0x74, 0x22, 0x02, 0xe8, 0x44, - 0x07, 0x83, 0x06, 0x0f, 0x06, 0x0c, - 0xa0, 0x80, 0x73, 0x41, 0x00, 0xe4, - 0x18, 0xb1, 0x42, 0x31, 0x62, 0x84, - 0x91, 0x00, 0x93, 0x22, 0x01, 0x24, - 0x78, 0x00, 0x1c, 0xf0, 0x00, 0x38, - 0xdb, 0x4a, 0x7b, 0xb6, 0x94, 0xf4, - 0x64, 0x4a, 0x28, 0xc8, 0x94, 0x50, - 0x51, 0x48, 0xa2, 0xa2, 0x91, 0x44, - 0xa9, 0x10, 0x1b, 0x52, 0x20, 0x34, - 0x04, 0xc4, 0x84, 0x09, 0x89, 0x08, - 0xd0, 0x01, 0x45, 0xa0, 0x02, 0x88, - 0x82, 0x40, 0x1d, 0x04, 0x80, 0x38, - 0x21, 0x37, 0x00, 0x42, 0x6e, 0x00, - 0x0c, 0x21, 0x22, 0x18, 0x42, 0x44, - 0x4a, 0x0a, 0xc0, 0x94, 0x15, 0x80, - 0x12, 0xb4, 0x50, 0x25, 0x68, 0xa0, - 0x46, 0x4a, 0x6c, 0x8c, 0x94, 0xd8, - 0x33, 0x24, 0x26, 0x66, 0x48, 0x4c, - 0x99, 0x02, 0x13, 0x32, 0x04, 0x24, - 0x05, 0x80, 0x0e, 0x0b, 0x00, 0x1c, - 0x80, 0xa1, 0x83, 0x01, 0x43, 0x04, - 0x84, 0x48, 0x19, 0x08, 0x90, 0x30, - 0x40, 0x6d, 0x40, 0x80, 0xda, 0x80, - 0x0a, 0x90, 0xc0, 0x15, 0x21, 0x80, - 0x68, 0x04, 0x90, 0xd0, 0x09, 0x20, - 0x10, 0x31, 0x20, 0x20, 0x62, 0x40, - 0x30, 0x58, 0x04, 0x60, 0xb0, 0x08 -}; - -const uint8_t kMaskRandom46_42[252] = { - 0x64, 0x4a, 0x28, 0xc8, 0x94, 0x50, - 0x51, 0x48, 0xa2, 0xa2, 0x91, 0x44, - 0xa9, 0x10, 0x1b, 0x52, 0x20, 0x34, - 0x04, 0xc4, 0x84, 0x09, 0x89, 0x08, - 0xd0, 0x01, 0x45, 0xa0, 0x02, 0x88, - 0x82, 0x40, 0x1d, 0x04, 0x80, 0x38, - 0x21, 0x37, 0x00, 0x42, 0x6e, 0x00, - 0x0c, 0x21, 0x22, 0x18, 0x42, 0x44, - 0x4a, 0x0a, 0xc0, 0x94, 0x15, 0x80, - 0x12, 0xb4, 0x50, 0x25, 0x68, 0xa0, - 0x46, 0x4a, 0x6c, 0x8c, 0x94, 0xd8, - 0x33, 0x24, 0x26, 0x66, 0x48, 0x4c, - 0x99, 0x02, 0x13, 0x32, 0x04, 0x24, - 0x05, 0x80, 0x0e, 0x0b, 0x00, 0x1c, - 0x80, 0xa1, 0x83, 0x01, 0x43, 0x04, - 0x84, 0x48, 0x19, 0x08, 0x90, 0x30, - 0x40, 0x6d, 0x40, 0x80, 0xda, 0x80, - 0x0a, 0x90, 0xc0, 0x15, 0x21, 0x80, - 0x68, 0x04, 0x90, 0xd0, 0x09, 0x20, - 0x10, 0x31, 0x20, 0x20, 0x62, 0x40, - 0x30, 0x58, 0x04, 0x60, 0xb0, 0x08, - 0x64, 0x4a, 0x28, 0xc8, 0x94, 0x50, - 0x51, 0x48, 0xa2, 0xa2, 0x91, 0x44, - 0xa9, 0x10, 0x1b, 0x52, 0x20, 0x34, - 0x04, 0xc4, 0x84, 0x09, 0x89, 0x08, - 0xd0, 0x01, 0x45, 0xa0, 0x02, 0x88, - 0x82, 0x40, 0x1d, 0x04, 0x80, 0x38, - 0x21, 0x37, 0x00, 0x42, 0x6e, 0x00, - 0x0c, 0x21, 0x22, 0x18, 0x42, 0x44, - 0x4a, 0x0a, 0xc0, 0x94, 0x15, 0x80, - 0x12, 0xb4, 0x50, 0x25, 0x68, 0xa0, - 0x46, 0x4a, 0x6c, 0x8c, 0x94, 0xd8, - 0x62, 0x7c, 0x84, 0xc4, 0xf9, 0x08, - 0x8c, 0x04, 0x89, 0x18, 0x09, 0x10, - 0x01, 0x74, 0x22, 0x02, 0xe8, 0x44, - 0x07, 0x83, 0x06, 0x0f, 0x06, 0x0c, - 0xa0, 0x80, 0x73, 0x41, 0x00, 0xe4, - 0x18, 0xb1, 0x42, 0x31, 0x62, 0x84, - 0x91, 0x00, 0x93, 0x22, 0x01, 0x24, - 0x78, 0x00, 0x1c, 0xf0, 0x00, 0x38, - 0xdb, 0x4a, 0x7b, 0xb6, 0x94, 0xf4, - 0xfc, 0x6e, 0x89, 0x54, 0x4f, 0x00 -}; - -const uint8_t kMaskRandom46_43[258] = { - 0x64, 0x4a, 0x28, 0xc8, 0x94, 0x50, - 0x51, 0x48, 0xa2, 0xa2, 0x91, 0x44, - 0xa9, 0x10, 0x1b, 0x52, 0x20, 0x34, - 0x04, 0xc4, 0x84, 0x09, 0x89, 0x08, - 0xd0, 0x01, 0x45, 0xa0, 0x02, 0x88, - 0x82, 0x40, 0x1d, 0x04, 0x80, 0x38, - 0x21, 0x37, 0x00, 0x42, 0x6e, 0x00, - 0x0c, 0x21, 0x22, 0x18, 0x42, 0x44, - 0x4a, 0x0a, 0xc0, 0x94, 0x15, 0x80, - 0x12, 0xb4, 0x50, 0x25, 0x68, 0xa0, - 0x46, 0x4a, 0x6c, 0x8c, 0x94, 0xd8, - 0x33, 0x24, 0x26, 0x66, 0x48, 0x4c, - 0x99, 0x02, 0x13, 0x32, 0x04, 0x24, - 0x05, 0x80, 0x0e, 0x0b, 0x00, 0x1c, - 0x80, 0xa1, 0x83, 0x01, 0x43, 0x04, - 0x84, 0x48, 0x19, 0x08, 0x90, 0x30, - 0x40, 0x6d, 0x40, 0x80, 0xda, 0x80, - 0x0a, 0x90, 0xc0, 0x15, 0x21, 0x80, - 0x68, 0x04, 0x90, 0xd0, 0x09, 0x20, - 0x10, 0x31, 0x20, 0x20, 0x62, 0x40, - 0x30, 0x58, 0x04, 0x60, 0xb0, 0x08, - 0x46, 0x4a, 0x6c, 0x8c, 0x94, 0xd8, - 0x33, 0x24, 0x26, 0x66, 0x48, 0x4c, - 0x99, 0x02, 0x13, 0x32, 0x04, 0x24, - 0x05, 0x80, 0x0e, 0x0b, 0x00, 0x1c, - 0x80, 0xa1, 0x83, 0x01, 0x43, 0x04, - 0x84, 0x48, 0x19, 0x08, 0x90, 0x30, - 0x40, 0x6d, 0x40, 0x80, 0xda, 0x80, - 0x0a, 0x90, 0xc0, 0x15, 0x21, 0x80, - 0x68, 0x04, 0x90, 0xd0, 0x09, 0x20, - 0x10, 0x31, 0x20, 0x20, 0x62, 0x40, - 0x30, 0x58, 0x04, 0x60, 0xb0, 0x08, - 0x64, 0x4a, 0x28, 0xc8, 0x94, 0x50, - 0x51, 0x48, 0xa2, 0xa2, 0x91, 0x44, - 0xa9, 0x10, 0x1b, 0x52, 0x20, 0x34, - 0x04, 0xc4, 0x84, 0x09, 0x89, 0x08, - 0xd0, 0x01, 0x45, 0xa0, 0x02, 0x88, - 0x82, 0x40, 0x1d, 0x04, 0x80, 0x38, - 0x21, 0x37, 0x00, 0x42, 0x6e, 0x00, - 0x0c, 0x21, 0x22, 0x18, 0x42, 0x44, - 0x4a, 0x0a, 0xc0, 0x94, 0x15, 0x80, - 0x12, 0xb4, 0x50, 0x25, 0x68, 0xa0, - 0xea, 0x8d, 0x1b, 0xd5, 0x1a, 0x34 -}; - -const uint8_t kMaskRandom46_44[264] = { - 0x46, 0x4a, 0x6c, 0x8c, 0x94, 0xd8, - 0x33, 0x24, 0x26, 0x66, 0x48, 0x4c, - 0x99, 0x02, 0x13, 0x32, 0x04, 0x24, - 0x05, 0x80, 0x0e, 0x0b, 0x00, 0x1c, - 0x80, 0xa1, 0x83, 0x01, 0x43, 0x04, - 0x84, 0x48, 0x19, 0x08, 0x90, 0x30, - 0x40, 0x6d, 0x40, 0x80, 0xda, 0x80, - 0x0a, 0x90, 0xc0, 0x15, 0x21, 0x80, - 0x68, 0x04, 0x90, 0xd0, 0x09, 0x20, - 0x10, 0x31, 0x20, 0x20, 0x62, 0x40, - 0x30, 0x58, 0x04, 0x60, 0xb0, 0x08, - 0x64, 0x4a, 0x28, 0xc8, 0x94, 0x50, - 0x51, 0x48, 0xa2, 0xa2, 0x91, 0x44, - 0xa9, 0x10, 0x1b, 0x52, 0x20, 0x34, - 0x04, 0xc4, 0x84, 0x09, 0x89, 0x08, - 0xd0, 0x01, 0x45, 0xa0, 0x02, 0x88, - 0x82, 0x40, 0x1d, 0x04, 0x80, 0x38, - 0x21, 0x37, 0x00, 0x42, 0x6e, 0x00, - 0x0c, 0x21, 0x22, 0x18, 0x42, 0x44, - 0x4a, 0x0a, 0xc0, 0x94, 0x15, 0x80, - 0x12, 0xb4, 0x50, 0x25, 0x68, 0xa0, - 0xea, 0x8d, 0x1b, 0xd5, 0x1a, 0x34, - 0x64, 0x4a, 0x28, 0xc8, 0x94, 0x50, - 0x51, 0x48, 0xa2, 0xa2, 0x91, 0x44, - 0xa9, 0x10, 0x1b, 0x52, 0x20, 0x34, - 0x04, 0xc4, 0x84, 0x09, 0x89, 0x08, - 0xd0, 0x01, 0x45, 0xa0, 0x02, 0x88, - 0x82, 0x40, 0x1d, 0x04, 0x80, 0x38, - 0x21, 0x37, 0x00, 0x42, 0x6e, 0x00, - 0x0c, 0x21, 0x22, 0x18, 0x42, 0x44, - 0x4a, 0x0a, 0xc0, 0x94, 0x15, 0x80, - 0x12, 0xb4, 0x50, 0x25, 0x68, 0xa0, - 0x46, 0x4a, 0x6c, 0x8c, 0x94, 0xd8, - 0x33, 0x24, 0x26, 0x66, 0x48, 0x4c, - 0x99, 0x02, 0x13, 0x32, 0x04, 0x24, - 0x05, 0x80, 0x0e, 0x0b, 0x00, 0x1c, - 0x80, 0xa1, 0x83, 0x01, 0x43, 0x04, - 0x84, 0x48, 0x19, 0x08, 0x90, 0x30, - 0x40, 0x6d, 0x40, 0x80, 0xda, 0x80, - 0x0a, 0x90, 0xc0, 0x15, 0x21, 0x80, - 0x68, 0x04, 0x90, 0xd0, 0x09, 0x20, - 0x10, 0x31, 0x20, 0x20, 0x62, 0x40, - 0x30, 0x58, 0x04, 0x60, 0xb0, 0x08, - 0x1a, 0x8a, 0x00, 0x1c, 0x89, 0x54 -}; - -const uint8_t kMaskRandom46_45[270] = { - 0x46, 0x4a, 0x6c, 0x8c, 0x94, 0xd8, - 0x33, 0x24, 0x26, 0x66, 0x48, 0x4c, - 0x99, 0x02, 0x13, 0x32, 0x04, 0x24, - 0x05, 0x80, 0x0e, 0x0b, 0x00, 0x1c, - 0x80, 0xa1, 0x83, 0x01, 0x43, 0x04, - 0x84, 0x48, 0x19, 0x08, 0x90, 0x30, - 0x40, 0x6d, 0x40, 0x80, 0xda, 0x80, - 0x0a, 0x90, 0xc0, 0x15, 0x21, 0x80, - 0x68, 0x04, 0x90, 0xd0, 0x09, 0x20, - 0x10, 0x31, 0x20, 0x20, 0x62, 0x40, - 0x30, 0x58, 0x04, 0x60, 0xb0, 0x08, - 0x64, 0x4a, 0x28, 0xc8, 0x94, 0x50, - 0x51, 0x48, 0xa2, 0xa2, 0x91, 0x44, - 0xa9, 0x10, 0x1b, 0x52, 0x20, 0x34, - 0x04, 0xc4, 0x84, 0x09, 0x89, 0x08, - 0xd0, 0x01, 0x45, 0xa0, 0x02, 0x88, - 0x82, 0x40, 0x1d, 0x04, 0x80, 0x38, - 0x21, 0x37, 0x00, 0x42, 0x6e, 0x00, - 0x0c, 0x21, 0x22, 0x18, 0x42, 0x44, - 0x4a, 0x0a, 0xc0, 0x94, 0x15, 0x80, - 0x12, 0xb4, 0x50, 0x25, 0x68, 0xa0, - 0xea, 0x8d, 0x1b, 0xd5, 0x1a, 0x34, - 0x46, 0x4a, 0x6c, 0x8c, 0x94, 0xd8, - 0x33, 0x24, 0x26, 0x66, 0x48, 0x4c, - 0x99, 0x02, 0x13, 0x32, 0x04, 0x24, - 0x05, 0x80, 0x0e, 0x0b, 0x00, 0x1c, - 0x80, 0xa1, 0x83, 0x01, 0x43, 0x04, - 0x84, 0x48, 0x19, 0x08, 0x90, 0x30, - 0x40, 0x6d, 0x40, 0x80, 0xda, 0x80, - 0x0a, 0x90, 0xc0, 0x15, 0x21, 0x80, - 0x68, 0x04, 0x90, 0xd0, 0x09, 0x20, - 0x10, 0x31, 0x20, 0x20, 0x62, 0x40, - 0x30, 0x58, 0x04, 0x60, 0xb0, 0x08, - 0x46, 0x42, 0x0c, 0x8c, 0x84, 0x18, - 0x33, 0x20, 0x46, 0x66, 0x40, 0x8c, - 0x99, 0x08, 0x0b, 0x32, 0x10, 0x14, - 0x05, 0x84, 0x30, 0x0b, 0x08, 0x60, - 0x80, 0xb0, 0x23, 0x01, 0x60, 0x44, - 0x84, 0x42, 0x91, 0x08, 0x85, 0x20, - 0x40, 0x73, 0x00, 0x80, 0xe6, 0x00, - 0x0a, 0x81, 0x12, 0x15, 0x02, 0x24, - 0x68, 0x0c, 0x40, 0xd0, 0x18, 0x80, - 0x10, 0x24, 0x84, 0x20, 0x49, 0x08, - 0x30, 0x51, 0x40, 0x60, 0xa2, 0x80, - 0x5f, 0x50, 0x88, 0xbe, 0xa1, 0x10 -}; - -const uint8_t kMaskRandom46_46[276] = { - 0x46, 0x4a, 0x6c, 0x8c, 0x94, 0xd8, - 0x33, 0x24, 0x26, 0x66, 0x48, 0x4c, - 0x99, 0x02, 0x13, 0x32, 0x04, 0x24, - 0x05, 0x80, 0x0e, 0x0b, 0x00, 0x1c, - 0x80, 0xa1, 0x83, 0x01, 0x43, 0x04, - 0x84, 0x48, 0x19, 0x08, 0x90, 0x30, - 0x40, 0x6d, 0x40, 0x80, 0xda, 0x80, - 0x0a, 0x90, 0xc0, 0x15, 0x21, 0x80, - 0x68, 0x04, 0x90, 0xd0, 0x09, 0x20, - 0x10, 0x31, 0x20, 0x20, 0x62, 0x40, - 0x30, 0x58, 0x04, 0x60, 0xb0, 0x08, - 0x46, 0x42, 0x0c, 0x8c, 0x84, 0x18, - 0x33, 0x20, 0x46, 0x66, 0x40, 0x8c, - 0x99, 0x08, 0x0b, 0x32, 0x10, 0x14, - 0x05, 0x84, 0x30, 0x0b, 0x08, 0x60, - 0x80, 0xb0, 0x23, 0x01, 0x60, 0x44, - 0x84, 0x42, 0x91, 0x08, 0x85, 0x20, - 0x40, 0x73, 0x00, 0x80, 0xe6, 0x00, - 0x0a, 0x81, 0x12, 0x15, 0x02, 0x24, - 0x68, 0x0c, 0x40, 0xd0, 0x18, 0x80, - 0x10, 0x24, 0x84, 0x20, 0x49, 0x08, - 0x30, 0x51, 0x40, 0x60, 0xa2, 0x80, - 0x5f, 0x50, 0x88, 0xbe, 0xa1, 0x10, - 0x46, 0x4a, 0x6c, 0x8c, 0x94, 0xd8, - 0x33, 0x24, 0x26, 0x66, 0x48, 0x4c, - 0x99, 0x02, 0x13, 0x32, 0x04, 0x24, - 0x05, 0x80, 0x0e, 0x0b, 0x00, 0x1c, - 0x80, 0xa1, 0x83, 0x01, 0x43, 0x04, - 0x84, 0x48, 0x19, 0x08, 0x90, 0x30, - 0x40, 0x6d, 0x40, 0x80, 0xda, 0x80, - 0x0a, 0x90, 0xc0, 0x15, 0x21, 0x80, - 0x68, 0x04, 0x90, 0xd0, 0x09, 0x20, - 0x10, 0x31, 0x20, 0x20, 0x62, 0x40, - 0x30, 0x58, 0x04, 0x60, 0xb0, 0x08, - 0x64, 0x4a, 0x28, 0xc8, 0x94, 0x50, - 0x51, 0x48, 0xa2, 0xa2, 0x91, 0x44, - 0xa9, 0x10, 0x1b, 0x52, 0x20, 0x34, - 0x04, 0xc4, 0x84, 0x09, 0x89, 0x08, - 0xd0, 0x01, 0x45, 0xa0, 0x02, 0x88, - 0x82, 0x40, 0x1d, 0x04, 0x80, 0x38, - 0x21, 0x37, 0x00, 0x42, 0x6e, 0x00, - 0x0c, 0x21, 0x22, 0x18, 0x42, 0x44, - 0x4a, 0x0a, 0xc0, 0x94, 0x15, 0x80, - 0x12, 0xb4, 0x50, 0x25, 0x68, 0xa0, - 0xea, 0x8d, 0x1b, 0xd5, 0x1a, 0x34, - 0xd5, 0xdf, 0x59, 0xb9, 0xba, 0x10 -}; - -const uint8_t kMaskRandom46_5[30] = { - 0xc6, 0xca, 0x6d, 0x8d, 0x94, 0xd8, - 0x63, 0x6c, 0x96, 0xc6, 0xd9, 0x2c, - 0x1d, 0xa1, 0xdc, 0x3b, 0x43, 0xb8, - 0xad, 0x55, 0x39, 0x5a, 0xaa, 0x70, - 0xb2, 0xb7, 0x07, 0x65, 0x6e, 0x0c -}; - -const uint8_t kMaskRandom46_6[36] = { - 0x64, 0x4a, 0x28, 0xc8, 0x94, 0x50, - 0x51, 0x58, 0xa2, 0xa2, 0xb1, 0x44, - 0x0c, 0xa4, 0x30, 0x19, 0x48, 0x60, - 0xa1, 0x22, 0x47, 0x42, 0x44, 0x8c, - 0x12, 0xa1, 0x1c, 0x25, 0x42, 0x38, - 0x8a, 0x45, 0xc1, 0x14, 0x8b, 0x80 -}; - -const uint8_t kMaskRandom46_7[42] = { - 0x46, 0x4a, 0x6c, 0x8c, 0x94, 0xd8, - 0x33, 0x24, 0x26, 0x66, 0x48, 0x4c, - 0x91, 0x92, 0x13, 0x23, 0x24, 0x24, - 0xa4, 0x20, 0x4b, 0x48, 0x40, 0x94, - 0x50, 0xa0, 0xd4, 0xa1, 0x41, 0xa8, - 0x84, 0xc5, 0x81, 0x09, 0x8b, 0x00, - 0x09, 0x71, 0x0c, 0x12, 0xe2, 0x18 -}; - -const uint8_t kMaskRandom46_8[48] = { - 0x0c, 0x84, 0x0c, 0x19, 0x08, 0x18, - 0x80, 0x70, 0x07, 0x00, 0xe0, 0x0c, - 0xa0, 0x88, 0x49, 0x41, 0x10, 0x90, - 0x05, 0x40, 0x32, 0x0a, 0x80, 0x64, - 0x43, 0x02, 0x82, 0x86, 0x05, 0x04, - 0x1a, 0x01, 0x50, 0x34, 0x02, 0xa0, - 0x60, 0x27, 0x00, 0xc0, 0x4e, 0x00, - 0x14, 0x38, 0xa0, 0x28, 0x71, 0x40 -}; - -const uint8_t kMaskRandom46_9[54] = { - 0x46, 0x4a, 0x6c, 0x8c, 0x94, 0xd8, - 0x62, 0x7c, 0x84, 0xc4, 0xf9, 0x08, - 0x8c, 0x04, 0x89, 0x18, 0x09, 0x10, - 0x01, 0x74, 0x22, 0x02, 0xe8, 0x44, - 0x07, 0x83, 0x06, 0x0f, 0x06, 0x0c, - 0xa0, 0x80, 0x73, 0x41, 0x00, 0xe4, - 0x18, 0xb1, 0x42, 0x31, 0x62, 0x84, - 0x91, 0x00, 0x93, 0x22, 0x01, 0x24, - 0x78, 0x00, 0x1c, 0xf0, 0x00, 0x38 -}; - -const uint8_t kMaskRandom47_1[6] = { - 0xff, 0xff, 0xff, 0xff, 0xff, 0xfe -}; - -const uint8_t kMaskRandom47_10[60] = { - 0x64, 0x4a, 0x28, 0x22, 0x8a, 0x28, - 0x51, 0x48, 0xa2, 0x8a, 0x68, 0xa6, - 0xa9, 0x10, 0x1a, 0x00, 0x90, 0x0a, - 0x04, 0xc4, 0x84, 0x21, 0x06, 0x12, - 0xd0, 0x01, 0x44, 0x94, 0x29, 0x42, - 0x82, 0x40, 0x1c, 0x81, 0x48, 0x14, - 0x21, 0x37, 0x01, 0x40, 0xd4, 0x04, - 0x0c, 0x21, 0x23, 0x11, 0x01, 0x18, - 0x4a, 0x0a, 0xc1, 0x0c, 0x10, 0xc0, - 0x12, 0xb4, 0x50, 0xa8, 0x1a, 0x80 -}; - -const uint8_t kMaskRandom47_11[66] = { - 0x46, 0x4a, 0x6c, 0xa6, 0xca, 0x68, - 0x33, 0x24, 0x27, 0x40, 0x64, 0x22, - 0x99, 0x02, 0x12, 0x2a, 0x22, 0x82, - 0x05, 0x80, 0x0e, 0x06, 0xa0, 0x2a, - 0x80, 0xa1, 0x83, 0x19, 0x11, 0x90, - 0x84, 0x48, 0x18, 0x51, 0x05, 0x10, - 0x40, 0x6d, 0x40, 0x10, 0x91, 0x08, - 0x0a, 0x90, 0xc1, 0x32, 0x03, 0x20, - 0x68, 0x04, 0x90, 0x45, 0x24, 0x52, - 0x10, 0x31, 0x20, 0x8c, 0x08, 0xc0, - 0x30, 0x58, 0x05, 0x18, 0x58, 0x04 -}; - -const uint8_t kMaskRandom47_12[72] = { - 0x64, 0x4a, 0x28, 0x20, 0xc2, 0x0c, - 0x51, 0x58, 0xa2, 0x04, 0x60, 0x46, - 0x0c, 0xa4, 0x30, 0x80, 0xa8, 0x0a, - 0xa1, 0x22, 0x46, 0x43, 0x04, 0x30, - 0x12, 0xa1, 0x1d, 0x02, 0x30, 0x22, - 0x8a, 0x45, 0xc0, 0x29, 0x02, 0x90, - 0x86, 0x8a, 0x6d, 0x30, 0x13, 0x00, - 0x23, 0x2c, 0x84, 0x11, 0x21, 0x12, - 0x16, 0x21, 0x98, 0xc4, 0x0c, 0x40, - 0x4c, 0x30, 0x54, 0x48, 0x44, 0x84, - 0x41, 0xc1, 0x27, 0x14, 0x11, 0x40, - 0x19, 0x56, 0xe5, 0x08, 0x90, 0x88 -}; - -const uint8_t kMaskRandom47_13[78] = { - 0x64, 0x4a, 0x28, 0xa2, 0x8a, 0x28, - 0x51, 0x58, 0xa3, 0x8a, 0x38, 0xa2, - 0x0c, 0xa4, 0x30, 0x43, 0x04, 0x30, - 0xa1, 0x22, 0x46, 0x24, 0x62, 0x46, - 0x12, 0xa1, 0x1c, 0x11, 0xc1, 0x1c, - 0x8a, 0x45, 0xc0, 0x5c, 0x05, 0xc0, - 0x46, 0x4a, 0x6c, 0xa6, 0xca, 0x6c, - 0x33, 0x24, 0x26, 0x42, 0x64, 0x26, - 0x91, 0x92, 0x13, 0x21, 0x32, 0x12, - 0xa4, 0x20, 0x4a, 0x04, 0xa0, 0x4a, - 0x50, 0xa0, 0xd4, 0x0d, 0x40, 0xd4, - 0x84, 0xc5, 0x80, 0x58, 0x05, 0x80, - 0x09, 0x71, 0x0d, 0x10, 0xd1, 0x0c -}; - -const uint8_t kMaskRandom47_14[84] = { - 0x46, 0x4a, 0x6c, 0xa6, 0xca, 0x6c, - 0x33, 0x24, 0x26, 0x42, 0x64, 0x26, - 0x91, 0x92, 0x13, 0x21, 0x32, 0x12, - 0xa4, 0x20, 0x4a, 0x04, 0xa0, 0x4a, - 0x50, 0xa0, 0xd4, 0x0d, 0x40, 0xd4, - 0x84, 0xc5, 0x80, 0x58, 0x05, 0x80, - 0x09, 0x71, 0x0d, 0x10, 0xd1, 0x0c, - 0x64, 0x4a, 0x28, 0xa2, 0x8a, 0x28, - 0x51, 0x58, 0xa3, 0x8a, 0x38, 0xa2, - 0x0c, 0xa4, 0x30, 0x43, 0x04, 0x30, - 0xa1, 0x22, 0x46, 0x24, 0x62, 0x46, - 0x12, 0xa1, 0x1c, 0x11, 0xc1, 0x1c, - 0x8a, 0x45, 0xc0, 0x5c, 0x05, 0xc0, - 0x9c, 0x3f, 0xb3, 0xe5, 0xad, 0x1c -}; - -const uint8_t kMaskRandom47_15[90] = { - 0x46, 0x4a, 0x6c, 0xa6, 0xca, 0x6c, - 0x33, 0x24, 0x26, 0x42, 0x64, 0x26, - 0x91, 0x92, 0x13, 0x21, 0x32, 0x12, - 0xa4, 0x20, 0x4a, 0x04, 0xa0, 0x4a, - 0x50, 0xa0, 0xd4, 0x0d, 0x40, 0xd4, - 0x84, 0xc5, 0x80, 0x58, 0x05, 0x80, - 0x09, 0x71, 0x0d, 0x10, 0xd1, 0x0c, - 0x0c, 0x84, 0x0c, 0x40, 0xc4, 0x0c, - 0x80, 0x70, 0x07, 0x00, 0x70, 0x06, - 0xa0, 0x88, 0x48, 0x84, 0x88, 0x48, - 0x05, 0x40, 0x32, 0x03, 0x20, 0x32, - 0x43, 0x02, 0x82, 0x28, 0x22, 0x82, - 0x1a, 0x01, 0x50, 0x15, 0x01, 0x50, - 0x60, 0x27, 0x00, 0x70, 0x07, 0x00, - 0x14, 0x38, 0xa1, 0x8a, 0x18, 0xa0 -}; - -const uint8_t kMaskRandom47_16[96] = { - 0x0c, 0x84, 0x0c, 0x40, 0xc4, 0x0c, - 0x80, 0x70, 0x07, 0x00, 0x70, 0x06, - 0xa0, 0x88, 0x48, 0x84, 0x88, 0x48, - 0x05, 0x40, 0x32, 0x03, 0x20, 0x32, - 0x43, 0x02, 0x82, 0x28, 0x22, 0x82, - 0x1a, 0x01, 0x50, 0x15, 0x01, 0x50, - 0x60, 0x27, 0x00, 0x70, 0x07, 0x00, - 0x14, 0x38, 0xa1, 0x8a, 0x18, 0xa0, - 0x46, 0x4a, 0x6c, 0xa6, 0xca, 0x6c, - 0x33, 0x24, 0x26, 0x42, 0x64, 0x26, - 0x91, 0x92, 0x13, 0x21, 0x32, 0x12, - 0xa4, 0x20, 0x4a, 0x04, 0xa0, 0x4a, - 0x50, 0xa0, 0xd4, 0x0d, 0x40, 0xd4, - 0x84, 0xc5, 0x80, 0x58, 0x05, 0x80, - 0x09, 0x71, 0x0d, 0x10, 0xd1, 0x0c, - 0xfa, 0xd9, 0xf5, 0xfe, 0xdc, 0x14 -}; - -const uint8_t kMaskRandom47_17[102] = { - 0x0c, 0x84, 0x0c, 0x40, 0xc4, 0x0c, - 0x80, 0x70, 0x07, 0x00, 0x70, 0x06, - 0xa0, 0x88, 0x48, 0x84, 0x88, 0x48, - 0x05, 0x40, 0x32, 0x03, 0x20, 0x32, - 0x43, 0x02, 0x82, 0x28, 0x22, 0x82, - 0x1a, 0x01, 0x50, 0x15, 0x01, 0x50, - 0x60, 0x27, 0x00, 0x70, 0x07, 0x00, - 0x14, 0x38, 0xa1, 0x8a, 0x18, 0xa0, - 0x46, 0x4a, 0x6c, 0xa6, 0xca, 0x6c, - 0x62, 0x7c, 0x85, 0xc8, 0x5c, 0x84, - 0x8c, 0x04, 0x88, 0x48, 0x84, 0x88, - 0x01, 0x74, 0x23, 0x42, 0x34, 0x22, - 0x07, 0x83, 0x06, 0x30, 0x63, 0x06, - 0xa0, 0x80, 0x72, 0x07, 0x20, 0x72, - 0x18, 0xb1, 0x43, 0x14, 0x31, 0x42, - 0x91, 0x00, 0x92, 0x09, 0x20, 0x92, - 0x78, 0x00, 0x1c, 0x01, 0xc0, 0x1c -}; - -const uint8_t kMaskRandom47_18[108] = { - 0x46, 0x4a, 0x6c, 0xa6, 0xca, 0x6c, - 0x62, 0x7c, 0x85, 0xc8, 0x5c, 0x84, - 0x8c, 0x04, 0x88, 0x48, 0x84, 0x88, - 0x01, 0x74, 0x23, 0x42, 0x34, 0x22, - 0x07, 0x83, 0x06, 0x30, 0x63, 0x06, - 0xa0, 0x80, 0x72, 0x07, 0x20, 0x72, - 0x18, 0xb1, 0x43, 0x14, 0x31, 0x42, - 0x91, 0x00, 0x92, 0x09, 0x20, 0x92, - 0x78, 0x00, 0x1c, 0x01, 0xc0, 0x1c, - 0x0c, 0x84, 0x0c, 0x40, 0xc4, 0x0c, - 0x80, 0x70, 0x07, 0x00, 0x70, 0x06, - 0xa0, 0x88, 0x48, 0x84, 0x88, 0x48, - 0x05, 0x40, 0x32, 0x03, 0x20, 0x32, - 0x43, 0x02, 0x82, 0x28, 0x22, 0x82, - 0x1a, 0x01, 0x50, 0x15, 0x01, 0x50, - 0x60, 0x27, 0x00, 0x70, 0x07, 0x00, - 0x14, 0x38, 0xa1, 0x8a, 0x18, 0xa0, - 0x82, 0x32, 0x56, 0x68, 0xa1, 0x5c -}; - -const uint8_t kMaskRandom47_19[114] = { - 0x46, 0x4a, 0x6c, 0xa6, 0xca, 0x6c, - 0x62, 0x7c, 0x85, 0xc8, 0x5c, 0x84, - 0x8c, 0x04, 0x88, 0x48, 0x84, 0x88, - 0x01, 0x74, 0x23, 0x42, 0x34, 0x22, - 0x07, 0x83, 0x06, 0x30, 0x63, 0x06, - 0xa0, 0x80, 0x72, 0x07, 0x20, 0x72, - 0x18, 0xb1, 0x43, 0x14, 0x31, 0x42, - 0x91, 0x00, 0x92, 0x09, 0x20, 0x92, - 0x78, 0x00, 0x1c, 0x01, 0xc0, 0x1c, - 0x64, 0x4a, 0x28, 0xa2, 0x8a, 0x28, - 0x51, 0x48, 0xa2, 0x8a, 0x28, 0xa2, - 0xa9, 0x10, 0x1b, 0x01, 0xb0, 0x1a, - 0x04, 0xc4, 0x84, 0x48, 0x44, 0x84, - 0xd0, 0x01, 0x44, 0x14, 0x41, 0x44, - 0x82, 0x40, 0x1c, 0x01, 0xc0, 0x1c, - 0x21, 0x37, 0x01, 0x70, 0x17, 0x00, - 0x0c, 0x21, 0x22, 0x12, 0x21, 0x22, - 0x4a, 0x0a, 0xc0, 0xac, 0x0a, 0xc0, - 0x12, 0xb4, 0x51, 0x45, 0x14, 0x50 -}; - -const uint8_t kMaskRandom47_2[12] = { - 0xec, 0xdd, 0x99, 0xd9, 0x9d, 0x98, - 0x9b, 0xb2, 0x77, 0x27, 0x72, 0x76 -}; - -const uint8_t kMaskRandom47_20[120] = { - 0x64, 0x4a, 0x28, 0xa2, 0x8a, 0x28, - 0x51, 0x48, 0xa2, 0x8a, 0x28, 0xa2, - 0xa9, 0x10, 0x1b, 0x01, 0xb0, 0x1a, - 0x04, 0xc4, 0x84, 0x48, 0x44, 0x84, - 0xd0, 0x01, 0x44, 0x14, 0x41, 0x44, - 0x82, 0x40, 0x1c, 0x01, 0xc0, 0x1c, - 0x21, 0x37, 0x01, 0x70, 0x17, 0x00, - 0x0c, 0x21, 0x22, 0x12, 0x21, 0x22, - 0x4a, 0x0a, 0xc0, 0xac, 0x0a, 0xc0, - 0x12, 0xb4, 0x51, 0x45, 0x14, 0x50, - 0x46, 0x4a, 0x6c, 0xa6, 0xca, 0x6c, - 0x62, 0x7c, 0x85, 0xc8, 0x5c, 0x84, - 0x8c, 0x04, 0x88, 0x48, 0x84, 0x88, - 0x01, 0x74, 0x23, 0x42, 0x34, 0x22, - 0x07, 0x83, 0x06, 0x30, 0x63, 0x06, - 0xa0, 0x80, 0x72, 0x07, 0x20, 0x72, - 0x18, 0xb1, 0x43, 0x14, 0x31, 0x42, - 0x91, 0x00, 0x92, 0x09, 0x20, 0x92, - 0x78, 0x00, 0x1c, 0x01, 0xc0, 0x1c, - 0xdb, 0x4a, 0x7b, 0x31, 0x45, 0x2a -}; - -const uint8_t kMaskRandom47_21[126] = { - 0x64, 0x4a, 0x28, 0xa2, 0x8a, 0x28, - 0x51, 0x48, 0xa2, 0x8a, 0x28, 0xa2, - 0xa9, 0x10, 0x1b, 0x01, 0xb0, 0x1a, - 0x04, 0xc4, 0x84, 0x48, 0x44, 0x84, - 0xd0, 0x01, 0x44, 0x14, 0x41, 0x44, - 0x82, 0x40, 0x1c, 0x01, 0xc0, 0x1c, - 0x21, 0x37, 0x01, 0x70, 0x17, 0x00, - 0x0c, 0x21, 0x22, 0x12, 0x21, 0x22, - 0x4a, 0x0a, 0xc0, 0xac, 0x0a, 0xc0, - 0x12, 0xb4, 0x51, 0x45, 0x14, 0x50, - 0x46, 0x4a, 0x6c, 0xa6, 0xca, 0x6c, - 0x33, 0x24, 0x26, 0x42, 0x64, 0x26, - 0x99, 0x02, 0x12, 0x21, 0x22, 0x12, - 0x05, 0x80, 0x0e, 0x00, 0xe0, 0x0e, - 0x80, 0xa1, 0x82, 0x18, 0x21, 0x82, - 0x84, 0x48, 0x18, 0x81, 0x88, 0x18, - 0x40, 0x6d, 0x40, 0xd4, 0x0d, 0x40, - 0x0a, 0x90, 0xc1, 0x0c, 0x10, 0xc0, - 0x68, 0x04, 0x90, 0x49, 0x04, 0x90, - 0x10, 0x31, 0x21, 0x12, 0x11, 0x20, - 0x30, 0x58, 0x05, 0x80, 0x58, 0x04 -}; - -const uint8_t kMaskRandom47_22[132] = { - 0x46, 0x4a, 0x6c, 0xa6, 0xca, 0x6c, - 0x33, 0x24, 0x26, 0x42, 0x64, 0x26, - 0x99, 0x02, 0x12, 0x21, 0x22, 0x12, - 0x05, 0x80, 0x0e, 0x00, 0xe0, 0x0e, - 0x80, 0xa1, 0x82, 0x18, 0x21, 0x82, - 0x84, 0x48, 0x18, 0x81, 0x88, 0x18, - 0x40, 0x6d, 0x40, 0xd4, 0x0d, 0x40, - 0x0a, 0x90, 0xc1, 0x0c, 0x10, 0xc0, - 0x68, 0x04, 0x90, 0x49, 0x04, 0x90, - 0x10, 0x31, 0x21, 0x12, 0x11, 0x20, - 0x30, 0x58, 0x05, 0x80, 0x58, 0x04, - 0x64, 0x4a, 0x28, 0xa2, 0x8a, 0x28, - 0x51, 0x48, 0xa2, 0x8a, 0x28, 0xa2, - 0xa9, 0x10, 0x1b, 0x01, 0xb0, 0x1a, - 0x04, 0xc4, 0x84, 0x48, 0x44, 0x84, - 0xd0, 0x01, 0x44, 0x14, 0x41, 0x44, - 0x82, 0x40, 0x1c, 0x01, 0xc0, 0x1c, - 0x21, 0x37, 0x01, 0x70, 0x17, 0x00, - 0x0c, 0x21, 0x22, 0x12, 0x21, 0x22, - 0x4a, 0x0a, 0xc0, 0xac, 0x0a, 0xc0, - 0x12, 0xb4, 0x51, 0x45, 0x14, 0x50, - 0xea, 0x8d, 0x1a, 0x35, 0x55, 0xdc -}; - -const uint8_t kMaskRandom47_23[138] = { - 0x46, 0x4a, 0x6c, 0xa6, 0xca, 0x6c, - 0x33, 0x24, 0x26, 0x42, 0x64, 0x26, - 0x99, 0x02, 0x12, 0x21, 0x22, 0x12, - 0x05, 0x80, 0x0e, 0x00, 0xe0, 0x0e, - 0x80, 0xa1, 0x82, 0x18, 0x21, 0x82, - 0x84, 0x48, 0x18, 0x81, 0x88, 0x18, - 0x40, 0x6d, 0x40, 0xd4, 0x0d, 0x40, - 0x0a, 0x90, 0xc1, 0x0c, 0x10, 0xc0, - 0x68, 0x04, 0x90, 0x49, 0x04, 0x90, - 0x10, 0x31, 0x21, 0x12, 0x11, 0x20, - 0x30, 0x58, 0x05, 0x80, 0x58, 0x04, - 0x46, 0x42, 0x0c, 0x20, 0xc2, 0x0c, - 0x33, 0x20, 0x46, 0x04, 0x60, 0x46, - 0x99, 0x08, 0x0a, 0x80, 0xa8, 0x0a, - 0x05, 0x84, 0x30, 0x43, 0x04, 0x30, - 0x80, 0xb0, 0x23, 0x02, 0x30, 0x22, - 0x84, 0x42, 0x90, 0x29, 0x02, 0x90, - 0x40, 0x73, 0x01, 0x30, 0x13, 0x00, - 0x0a, 0x81, 0x12, 0x11, 0x21, 0x12, - 0x68, 0x0c, 0x40, 0xc4, 0x0c, 0x40, - 0x10, 0x24, 0x84, 0x48, 0x44, 0x84, - 0x30, 0x51, 0x41, 0x14, 0x11, 0x40, - 0x5f, 0x50, 0x89, 0x08, 0x90, 0x88 -}; - -const uint8_t kMaskRandom47_24[144] = { - 0x64, 0x4a, 0x28, 0x20, 0xc2, 0x0c, - 0x51, 0x58, 0xa2, 0x04, 0x60, 0x46, - 0x0c, 0xa4, 0x30, 0x80, 0xa8, 0x0a, - 0xa1, 0x22, 0x46, 0x43, 0x04, 0x30, - 0x12, 0xa1, 0x1d, 0x02, 0x30, 0x22, - 0x8a, 0x45, 0xc0, 0x29, 0x02, 0x90, - 0x86, 0x8a, 0x6d, 0x30, 0x13, 0x00, - 0x23, 0x2c, 0x84, 0x11, 0x21, 0x12, - 0x16, 0x21, 0x98, 0xc4, 0x0c, 0x40, - 0x4c, 0x30, 0x54, 0x48, 0x44, 0x84, - 0x41, 0xc1, 0x27, 0x14, 0x11, 0x40, - 0x19, 0x56, 0xe5, 0x08, 0x90, 0x88, - 0x46, 0x4a, 0x6c, 0xa6, 0xca, 0x68, - 0x33, 0x24, 0x27, 0x40, 0x64, 0x22, - 0x99, 0x02, 0x12, 0x2a, 0x22, 0x82, - 0x05, 0x80, 0x0e, 0x06, 0xa0, 0x2a, - 0x80, 0xa1, 0x83, 0x19, 0x11, 0x90, - 0x84, 0x48, 0x18, 0x51, 0x05, 0x10, - 0x40, 0x6d, 0x40, 0x10, 0x91, 0x08, - 0x0a, 0x90, 0xc1, 0x32, 0x03, 0x20, - 0x68, 0x04, 0x90, 0x45, 0x24, 0x52, - 0x10, 0x31, 0x20, 0x8c, 0x08, 0xc0, - 0x30, 0x58, 0x05, 0x18, 0x58, 0x04, - 0x27, 0x41, 0x35, 0x57, 0x7e, 0x6a -}; - -const uint8_t kMaskRandom47_25[150] = { - 0x64, 0x4a, 0x28, 0x20, 0xc2, 0x0c, - 0x51, 0x58, 0xa2, 0x04, 0x60, 0x46, - 0x0c, 0xa4, 0x30, 0x80, 0xa8, 0x0a, - 0xa1, 0x22, 0x46, 0x43, 0x04, 0x30, - 0x12, 0xa1, 0x1d, 0x02, 0x30, 0x22, - 0x8a, 0x45, 0xc0, 0x29, 0x02, 0x90, - 0x86, 0x8a, 0x6d, 0x30, 0x13, 0x00, - 0x23, 0x2c, 0x84, 0x11, 0x21, 0x12, - 0x16, 0x21, 0x98, 0xc4, 0x0c, 0x40, - 0x4c, 0x30, 0x54, 0x48, 0x44, 0x84, - 0x41, 0xc1, 0x27, 0x14, 0x11, 0x40, - 0x19, 0x56, 0xe5, 0x08, 0x90, 0x88, - 0x64, 0x4a, 0x28, 0xa2, 0x8a, 0x28, - 0x51, 0x58, 0xa3, 0x8a, 0x38, 0xa2, - 0x0c, 0xa4, 0x30, 0x43, 0x04, 0x30, - 0xa1, 0x22, 0x46, 0x24, 0x62, 0x46, - 0x12, 0xa1, 0x1c, 0x11, 0xc1, 0x1c, - 0x8a, 0x45, 0xc0, 0x5c, 0x05, 0xc0, - 0x46, 0x4a, 0x6c, 0xa6, 0xca, 0x6c, - 0x33, 0x24, 0x26, 0x42, 0x64, 0x26, - 0x91, 0x92, 0x13, 0x21, 0x32, 0x12, - 0xa4, 0x20, 0x4a, 0x04, 0xa0, 0x4a, - 0x50, 0xa0, 0xd4, 0x0d, 0x40, 0xd4, - 0x84, 0xc5, 0x80, 0x58, 0x05, 0x80, - 0x09, 0x71, 0x0d, 0x10, 0xd1, 0x0c -}; - -const uint8_t kMaskRandom47_26[156] = { - 0x64, 0x4a, 0x28, 0xa2, 0x8a, 0x28, - 0x51, 0x58, 0xa3, 0x8a, 0x38, 0xa2, - 0x0c, 0xa4, 0x30, 0x43, 0x04, 0x30, - 0xa1, 0x22, 0x46, 0x24, 0x62, 0x46, - 0x12, 0xa1, 0x1c, 0x11, 0xc1, 0x1c, - 0x8a, 0x45, 0xc0, 0x5c, 0x05, 0xc0, - 0x46, 0x4a, 0x6c, 0xa6, 0xca, 0x6c, - 0x33, 0x24, 0x26, 0x42, 0x64, 0x26, - 0x91, 0x92, 0x13, 0x21, 0x32, 0x12, - 0xa4, 0x20, 0x4a, 0x04, 0xa0, 0x4a, - 0x50, 0xa0, 0xd4, 0x0d, 0x40, 0xd4, - 0x84, 0xc5, 0x80, 0x58, 0x05, 0x80, - 0x09, 0x71, 0x0d, 0x10, 0xd1, 0x0c, - 0x64, 0x4a, 0x28, 0x20, 0xc2, 0x0c, - 0x51, 0x58, 0xa2, 0x04, 0x60, 0x46, - 0x0c, 0xa4, 0x30, 0x80, 0xa8, 0x0a, - 0xa1, 0x22, 0x46, 0x43, 0x04, 0x30, - 0x12, 0xa1, 0x1d, 0x02, 0x30, 0x22, - 0x8a, 0x45, 0xc0, 0x29, 0x02, 0x90, - 0x86, 0x8a, 0x6d, 0x30, 0x13, 0x00, - 0x23, 0x2c, 0x84, 0x11, 0x21, 0x12, - 0x16, 0x21, 0x98, 0xc4, 0x0c, 0x40, - 0x4c, 0x30, 0x54, 0x48, 0x44, 0x84, - 0x41, 0xc1, 0x27, 0x14, 0x11, 0x40, - 0x19, 0x56, 0xe5, 0x08, 0x90, 0x88, - 0x6c, 0xea, 0xc4, 0x42, 0x20, 0x9e -}; - -const uint8_t kMaskRandom47_27[162] = { - 0x64, 0x4a, 0x28, 0xa2, 0x8a, 0x28, - 0x51, 0x58, 0xa3, 0x8a, 0x38, 0xa2, - 0x0c, 0xa4, 0x30, 0x43, 0x04, 0x30, - 0xa1, 0x22, 0x46, 0x24, 0x62, 0x46, - 0x12, 0xa1, 0x1c, 0x11, 0xc1, 0x1c, - 0x8a, 0x45, 0xc0, 0x5c, 0x05, 0xc0, - 0x46, 0x4a, 0x6c, 0xa6, 0xca, 0x6c, - 0x33, 0x24, 0x26, 0x42, 0x64, 0x26, - 0x91, 0x92, 0x13, 0x21, 0x32, 0x12, - 0xa4, 0x20, 0x4a, 0x04, 0xa0, 0x4a, - 0x50, 0xa0, 0xd4, 0x0d, 0x40, 0xd4, - 0x84, 0xc5, 0x80, 0x58, 0x05, 0x80, - 0x09, 0x71, 0x0d, 0x10, 0xd1, 0x0c, - 0x46, 0x4a, 0x6c, 0xa6, 0xca, 0x6c, - 0x33, 0x24, 0x26, 0x42, 0x64, 0x26, - 0x91, 0x92, 0x13, 0x21, 0x32, 0x12, - 0xa4, 0x20, 0x4a, 0x04, 0xa0, 0x4a, - 0x50, 0xa0, 0xd4, 0x0d, 0x40, 0xd4, - 0x84, 0xc5, 0x80, 0x58, 0x05, 0x80, - 0x09, 0x71, 0x0d, 0x10, 0xd1, 0x0c, - 0x64, 0x4a, 0x28, 0xa2, 0x8a, 0x28, - 0x51, 0x58, 0xa3, 0x8a, 0x38, 0xa2, - 0x0c, 0xa4, 0x30, 0x43, 0x04, 0x30, - 0xa1, 0x22, 0x46, 0x24, 0x62, 0x46, - 0x12, 0xa1, 0x1c, 0x11, 0xc1, 0x1c, - 0x8a, 0x45, 0xc0, 0x5c, 0x05, 0xc0, - 0x9c, 0x3f, 0xb3, 0xe5, 0xad, 0x1c -}; - -const uint8_t kMaskRandom47_28[168] = { - 0x46, 0x4a, 0x6c, 0xa6, 0xca, 0x6c, - 0x33, 0x24, 0x26, 0x42, 0x64, 0x26, - 0x91, 0x92, 0x13, 0x21, 0x32, 0x12, - 0xa4, 0x20, 0x4a, 0x04, 0xa0, 0x4a, - 0x50, 0xa0, 0xd4, 0x0d, 0x40, 0xd4, - 0x84, 0xc5, 0x80, 0x58, 0x05, 0x80, - 0x09, 0x71, 0x0d, 0x10, 0xd1, 0x0c, - 0x64, 0x4a, 0x28, 0xa2, 0x8a, 0x28, - 0x51, 0x58, 0xa3, 0x8a, 0x38, 0xa2, - 0x0c, 0xa4, 0x30, 0x43, 0x04, 0x30, - 0xa1, 0x22, 0x46, 0x24, 0x62, 0x46, - 0x12, 0xa1, 0x1c, 0x11, 0xc1, 0x1c, - 0x8a, 0x45, 0xc0, 0x5c, 0x05, 0xc0, - 0x9c, 0x3f, 0xb3, 0xe5, 0xad, 0x1c, - 0x64, 0x4a, 0x28, 0xa2, 0x8a, 0x28, - 0x51, 0x58, 0xa3, 0x8a, 0x38, 0xa2, - 0x0c, 0xa4, 0x30, 0x43, 0x04, 0x30, - 0xa1, 0x22, 0x46, 0x24, 0x62, 0x46, - 0x12, 0xa1, 0x1c, 0x11, 0xc1, 0x1c, - 0x8a, 0x45, 0xc0, 0x5c, 0x05, 0xc0, - 0x46, 0x4a, 0x6c, 0xa6, 0xca, 0x6c, - 0x33, 0x24, 0x26, 0x42, 0x64, 0x26, - 0x91, 0x92, 0x13, 0x21, 0x32, 0x12, - 0xa4, 0x20, 0x4a, 0x04, 0xa0, 0x4a, - 0x50, 0xa0, 0xd4, 0x0d, 0x40, 0xd4, - 0x84, 0xc5, 0x80, 0x58, 0x05, 0x80, - 0x09, 0x71, 0x0d, 0x10, 0xd1, 0x0c, - 0x86, 0x1e, 0xa6, 0xaf, 0x3d, 0x04 -}; - -const uint8_t kMaskRandom47_29[174] = { - 0x46, 0x4a, 0x6c, 0xa6, 0xca, 0x6c, - 0x33, 0x24, 0x26, 0x42, 0x64, 0x26, - 0x91, 0x92, 0x13, 0x21, 0x32, 0x12, - 0xa4, 0x20, 0x4a, 0x04, 0xa0, 0x4a, - 0x50, 0xa0, 0xd4, 0x0d, 0x40, 0xd4, - 0x84, 0xc5, 0x80, 0x58, 0x05, 0x80, - 0x09, 0x71, 0x0d, 0x10, 0xd1, 0x0c, - 0x64, 0x4a, 0x28, 0xa2, 0x8a, 0x28, - 0x51, 0x58, 0xa3, 0x8a, 0x38, 0xa2, - 0x0c, 0xa4, 0x30, 0x43, 0x04, 0x30, - 0xa1, 0x22, 0x46, 0x24, 0x62, 0x46, - 0x12, 0xa1, 0x1c, 0x11, 0xc1, 0x1c, - 0x8a, 0x45, 0xc0, 0x5c, 0x05, 0xc0, - 0x9c, 0x3f, 0xb3, 0xe5, 0xad, 0x1c, - 0x46, 0x4a, 0x6c, 0xa6, 0xca, 0x6c, - 0x33, 0x24, 0x26, 0x42, 0x64, 0x26, - 0x91, 0x92, 0x13, 0x21, 0x32, 0x12, - 0xa4, 0x20, 0x4a, 0x04, 0xa0, 0x4a, - 0x50, 0xa0, 0xd4, 0x0d, 0x40, 0xd4, - 0x84, 0xc5, 0x80, 0x58, 0x05, 0x80, - 0x09, 0x71, 0x0d, 0x10, 0xd1, 0x0c, - 0x0c, 0x84, 0x0c, 0x40, 0xc4, 0x0c, - 0x80, 0x70, 0x07, 0x00, 0x70, 0x06, - 0xa0, 0x88, 0x48, 0x84, 0x88, 0x48, - 0x05, 0x40, 0x32, 0x03, 0x20, 0x32, - 0x43, 0x02, 0x82, 0x28, 0x22, 0x82, - 0x1a, 0x01, 0x50, 0x15, 0x01, 0x50, - 0x60, 0x27, 0x00, 0x70, 0x07, 0x00, - 0x14, 0x38, 0xa1, 0x8a, 0x18, 0xa0 -}; - -const uint8_t kMaskRandom47_3[18] = { - 0xca, 0xd3, 0x65, 0x36, 0x53, 0x64, - 0xf1, 0x49, 0x3a, 0x93, 0xa9, 0x3a, - 0x76, 0x27, 0xd0, 0x7d, 0x07, 0xd0 -}; - -const uint8_t kMaskRandom47_30[180] = { - 0x46, 0x4a, 0x6c, 0xa6, 0xca, 0x6c, - 0x33, 0x24, 0x26, 0x42, 0x64, 0x26, - 0x91, 0x92, 0x13, 0x21, 0x32, 0x12, - 0xa4, 0x20, 0x4a, 0x04, 0xa0, 0x4a, - 0x50, 0xa0, 0xd4, 0x0d, 0x40, 0xd4, - 0x84, 0xc5, 0x80, 0x58, 0x05, 0x80, - 0x09, 0x71, 0x0d, 0x10, 0xd1, 0x0c, - 0x0c, 0x84, 0x0c, 0x40, 0xc4, 0x0c, - 0x80, 0x70, 0x07, 0x00, 0x70, 0x06, - 0xa0, 0x88, 0x48, 0x84, 0x88, 0x48, - 0x05, 0x40, 0x32, 0x03, 0x20, 0x32, - 0x43, 0x02, 0x82, 0x28, 0x22, 0x82, - 0x1a, 0x01, 0x50, 0x15, 0x01, 0x50, - 0x60, 0x27, 0x00, 0x70, 0x07, 0x00, - 0x14, 0x38, 0xa1, 0x8a, 0x18, 0xa0, - 0x46, 0x4a, 0x6c, 0xa6, 0xca, 0x6c, - 0x33, 0x24, 0x26, 0x42, 0x64, 0x26, - 0x91, 0x92, 0x13, 0x21, 0x32, 0x12, - 0xa4, 0x20, 0x4a, 0x04, 0xa0, 0x4a, - 0x50, 0xa0, 0xd4, 0x0d, 0x40, 0xd4, - 0x84, 0xc5, 0x80, 0x58, 0x05, 0x80, - 0x09, 0x71, 0x0d, 0x10, 0xd1, 0x0c, - 0x64, 0x4a, 0x28, 0xa2, 0x8a, 0x28, - 0x51, 0x58, 0xa3, 0x8a, 0x38, 0xa2, - 0x0c, 0xa4, 0x30, 0x43, 0x04, 0x30, - 0xa1, 0x22, 0x46, 0x24, 0x62, 0x46, - 0x12, 0xa1, 0x1c, 0x11, 0xc1, 0x1c, - 0x8a, 0x45, 0xc0, 0x5c, 0x05, 0xc0, - 0x9c, 0x3f, 0xb3, 0xe5, 0xad, 0x1c, - 0x97, 0x43, 0x63, 0xc6, 0x09, 0x9c -}; - -const uint8_t kMaskRandom47_31[186] = { - 0x46, 0x4a, 0x6c, 0xa6, 0xca, 0x6c, - 0x33, 0x24, 0x26, 0x42, 0x64, 0x26, - 0x91, 0x92, 0x13, 0x21, 0x32, 0x12, - 0xa4, 0x20, 0x4a, 0x04, 0xa0, 0x4a, - 0x50, 0xa0, 0xd4, 0x0d, 0x40, 0xd4, - 0x84, 0xc5, 0x80, 0x58, 0x05, 0x80, - 0x09, 0x71, 0x0d, 0x10, 0xd1, 0x0c, - 0x0c, 0x84, 0x0c, 0x40, 0xc4, 0x0c, - 0x80, 0x70, 0x07, 0x00, 0x70, 0x06, - 0xa0, 0x88, 0x48, 0x84, 0x88, 0x48, - 0x05, 0x40, 0x32, 0x03, 0x20, 0x32, - 0x43, 0x02, 0x82, 0x28, 0x22, 0x82, - 0x1a, 0x01, 0x50, 0x15, 0x01, 0x50, - 0x60, 0x27, 0x00, 0x70, 0x07, 0x00, - 0x14, 0x38, 0xa1, 0x8a, 0x18, 0xa0, - 0x0c, 0x84, 0x0c, 0x40, 0xc4, 0x0c, - 0x80, 0x70, 0x07, 0x00, 0x70, 0x06, - 0xa0, 0x88, 0x48, 0x84, 0x88, 0x48, - 0x05, 0x40, 0x32, 0x03, 0x20, 0x32, - 0x43, 0x02, 0x82, 0x28, 0x22, 0x82, - 0x1a, 0x01, 0x50, 0x15, 0x01, 0x50, - 0x60, 0x27, 0x00, 0x70, 0x07, 0x00, - 0x14, 0x38, 0xa1, 0x8a, 0x18, 0xa0, - 0x46, 0x4a, 0x6c, 0xa6, 0xca, 0x6c, - 0x33, 0x24, 0x26, 0x42, 0x64, 0x26, - 0x91, 0x92, 0x13, 0x21, 0x32, 0x12, - 0xa4, 0x20, 0x4a, 0x04, 0xa0, 0x4a, - 0x50, 0xa0, 0xd4, 0x0d, 0x40, 0xd4, - 0x84, 0xc5, 0x80, 0x58, 0x05, 0x80, - 0x09, 0x71, 0x0d, 0x10, 0xd1, 0x0c, - 0xfa, 0xd9, 0xf5, 0xfe, 0xdc, 0x14 -}; - -const uint8_t kMaskRandom47_32[192] = { - 0x0c, 0x84, 0x0c, 0x40, 0xc4, 0x0c, - 0x80, 0x70, 0x07, 0x00, 0x70, 0x06, - 0xa0, 0x88, 0x48, 0x84, 0x88, 0x48, - 0x05, 0x40, 0x32, 0x03, 0x20, 0x32, - 0x43, 0x02, 0x82, 0x28, 0x22, 0x82, - 0x1a, 0x01, 0x50, 0x15, 0x01, 0x50, - 0x60, 0x27, 0x00, 0x70, 0x07, 0x00, - 0x14, 0x38, 0xa1, 0x8a, 0x18, 0xa0, - 0x46, 0x4a, 0x6c, 0xa6, 0xca, 0x6c, - 0x33, 0x24, 0x26, 0x42, 0x64, 0x26, - 0x91, 0x92, 0x13, 0x21, 0x32, 0x12, - 0xa4, 0x20, 0x4a, 0x04, 0xa0, 0x4a, - 0x50, 0xa0, 0xd4, 0x0d, 0x40, 0xd4, - 0x84, 0xc5, 0x80, 0x58, 0x05, 0x80, - 0x09, 0x71, 0x0d, 0x10, 0xd1, 0x0c, - 0xfa, 0xd9, 0xf5, 0xfe, 0xdc, 0x14, - 0x46, 0x4a, 0x6c, 0xa6, 0xca, 0x6c, - 0x33, 0x24, 0x26, 0x42, 0x64, 0x26, - 0x91, 0x92, 0x13, 0x21, 0x32, 0x12, - 0xa4, 0x20, 0x4a, 0x04, 0xa0, 0x4a, - 0x50, 0xa0, 0xd4, 0x0d, 0x40, 0xd4, - 0x84, 0xc5, 0x80, 0x58, 0x05, 0x80, - 0x09, 0x71, 0x0d, 0x10, 0xd1, 0x0c, - 0x0c, 0x84, 0x0c, 0x40, 0xc4, 0x0c, - 0x80, 0x70, 0x07, 0x00, 0x70, 0x06, - 0xa0, 0x88, 0x48, 0x84, 0x88, 0x48, - 0x05, 0x40, 0x32, 0x03, 0x20, 0x32, - 0x43, 0x02, 0x82, 0x28, 0x22, 0x82, - 0x1a, 0x01, 0x50, 0x15, 0x01, 0x50, - 0x60, 0x27, 0x00, 0x70, 0x07, 0x00, - 0x14, 0x38, 0xa1, 0x8a, 0x18, 0xa0, - 0xe5, 0x50, 0x45, 0x63, 0xc2, 0xf4 -}; - -const uint8_t kMaskRandom47_33[198] = { - 0x0c, 0x84, 0x0c, 0x40, 0xc4, 0x0c, - 0x80, 0x70, 0x07, 0x00, 0x70, 0x06, - 0xa0, 0x88, 0x48, 0x84, 0x88, 0x48, - 0x05, 0x40, 0x32, 0x03, 0x20, 0x32, - 0x43, 0x02, 0x82, 0x28, 0x22, 0x82, - 0x1a, 0x01, 0x50, 0x15, 0x01, 0x50, - 0x60, 0x27, 0x00, 0x70, 0x07, 0x00, - 0x14, 0x38, 0xa1, 0x8a, 0x18, 0xa0, - 0x46, 0x4a, 0x6c, 0xa6, 0xca, 0x6c, - 0x33, 0x24, 0x26, 0x42, 0x64, 0x26, - 0x91, 0x92, 0x13, 0x21, 0x32, 0x12, - 0xa4, 0x20, 0x4a, 0x04, 0xa0, 0x4a, - 0x50, 0xa0, 0xd4, 0x0d, 0x40, 0xd4, - 0x84, 0xc5, 0x80, 0x58, 0x05, 0x80, - 0x09, 0x71, 0x0d, 0x10, 0xd1, 0x0c, - 0xfa, 0xd9, 0xf5, 0xfe, 0xdc, 0x14, - 0x0c, 0x84, 0x0c, 0x40, 0xc4, 0x0c, - 0x80, 0x70, 0x07, 0x00, 0x70, 0x06, - 0xa0, 0x88, 0x48, 0x84, 0x88, 0x48, - 0x05, 0x40, 0x32, 0x03, 0x20, 0x32, - 0x43, 0x02, 0x82, 0x28, 0x22, 0x82, - 0x1a, 0x01, 0x50, 0x15, 0x01, 0x50, - 0x60, 0x27, 0x00, 0x70, 0x07, 0x00, - 0x14, 0x38, 0xa1, 0x8a, 0x18, 0xa0, - 0x46, 0x4a, 0x6c, 0xa6, 0xca, 0x6c, - 0x62, 0x7c, 0x85, 0xc8, 0x5c, 0x84, - 0x8c, 0x04, 0x88, 0x48, 0x84, 0x88, - 0x01, 0x74, 0x23, 0x42, 0x34, 0x22, - 0x07, 0x83, 0x06, 0x30, 0x63, 0x06, - 0xa0, 0x80, 0x72, 0x07, 0x20, 0x72, - 0x18, 0xb1, 0x43, 0x14, 0x31, 0x42, - 0x91, 0x00, 0x92, 0x09, 0x20, 0x92, - 0x78, 0x00, 0x1c, 0x01, 0xc0, 0x1c -}; - -const uint8_t kMaskRandom47_34[204] = { - 0x0c, 0x84, 0x0c, 0x40, 0xc4, 0x0c, - 0x80, 0x70, 0x07, 0x00, 0x70, 0x06, - 0xa0, 0x88, 0x48, 0x84, 0x88, 0x48, - 0x05, 0x40, 0x32, 0x03, 0x20, 0x32, - 0x43, 0x02, 0x82, 0x28, 0x22, 0x82, - 0x1a, 0x01, 0x50, 0x15, 0x01, 0x50, - 0x60, 0x27, 0x00, 0x70, 0x07, 0x00, - 0x14, 0x38, 0xa1, 0x8a, 0x18, 0xa0, - 0x46, 0x4a, 0x6c, 0xa6, 0xca, 0x6c, - 0x62, 0x7c, 0x85, 0xc8, 0x5c, 0x84, - 0x8c, 0x04, 0x88, 0x48, 0x84, 0x88, - 0x01, 0x74, 0x23, 0x42, 0x34, 0x22, - 0x07, 0x83, 0x06, 0x30, 0x63, 0x06, - 0xa0, 0x80, 0x72, 0x07, 0x20, 0x72, - 0x18, 0xb1, 0x43, 0x14, 0x31, 0x42, - 0x91, 0x00, 0x92, 0x09, 0x20, 0x92, - 0x78, 0x00, 0x1c, 0x01, 0xc0, 0x1c, - 0x0c, 0x84, 0x0c, 0x40, 0xc4, 0x0c, - 0x80, 0x70, 0x07, 0x00, 0x70, 0x06, - 0xa0, 0x88, 0x48, 0x84, 0x88, 0x48, - 0x05, 0x40, 0x32, 0x03, 0x20, 0x32, - 0x43, 0x02, 0x82, 0x28, 0x22, 0x82, - 0x1a, 0x01, 0x50, 0x15, 0x01, 0x50, - 0x60, 0x27, 0x00, 0x70, 0x07, 0x00, - 0x14, 0x38, 0xa1, 0x8a, 0x18, 0xa0, - 0x46, 0x4a, 0x6c, 0xa6, 0xca, 0x6c, - 0x33, 0x24, 0x26, 0x42, 0x64, 0x26, - 0x91, 0x92, 0x13, 0x21, 0x32, 0x12, - 0xa4, 0x20, 0x4a, 0x04, 0xa0, 0x4a, - 0x50, 0xa0, 0xd4, 0x0d, 0x40, 0xd4, - 0x84, 0xc5, 0x80, 0x58, 0x05, 0x80, - 0x09, 0x71, 0x0d, 0x10, 0xd1, 0x0c, - 0xfa, 0xd9, 0xf5, 0xfe, 0xdc, 0x14, - 0xef, 0xbb, 0xa6, 0x23, 0x5c, 0xbe -}; - -const uint8_t kMaskRandom47_35[210] = { - 0x0c, 0x84, 0x0c, 0x40, 0xc4, 0x0c, - 0x80, 0x70, 0x07, 0x00, 0x70, 0x06, - 0xa0, 0x88, 0x48, 0x84, 0x88, 0x48, - 0x05, 0x40, 0x32, 0x03, 0x20, 0x32, - 0x43, 0x02, 0x82, 0x28, 0x22, 0x82, - 0x1a, 0x01, 0x50, 0x15, 0x01, 0x50, - 0x60, 0x27, 0x00, 0x70, 0x07, 0x00, - 0x14, 0x38, 0xa1, 0x8a, 0x18, 0xa0, - 0x46, 0x4a, 0x6c, 0xa6, 0xca, 0x6c, - 0x62, 0x7c, 0x85, 0xc8, 0x5c, 0x84, - 0x8c, 0x04, 0x88, 0x48, 0x84, 0x88, - 0x01, 0x74, 0x23, 0x42, 0x34, 0x22, - 0x07, 0x83, 0x06, 0x30, 0x63, 0x06, - 0xa0, 0x80, 0x72, 0x07, 0x20, 0x72, - 0x18, 0xb1, 0x43, 0x14, 0x31, 0x42, - 0x91, 0x00, 0x92, 0x09, 0x20, 0x92, - 0x78, 0x00, 0x1c, 0x01, 0xc0, 0x1c, - 0x46, 0x4a, 0x6c, 0xa6, 0xca, 0x6c, - 0x62, 0x7c, 0x85, 0xc8, 0x5c, 0x84, - 0x8c, 0x04, 0x88, 0x48, 0x84, 0x88, - 0x01, 0x74, 0x23, 0x42, 0x34, 0x22, - 0x07, 0x83, 0x06, 0x30, 0x63, 0x06, - 0xa0, 0x80, 0x72, 0x07, 0x20, 0x72, - 0x18, 0xb1, 0x43, 0x14, 0x31, 0x42, - 0x91, 0x00, 0x92, 0x09, 0x20, 0x92, - 0x78, 0x00, 0x1c, 0x01, 0xc0, 0x1c, - 0x0c, 0x84, 0x0c, 0x40, 0xc4, 0x0c, - 0x80, 0x70, 0x07, 0x00, 0x70, 0x06, - 0xa0, 0x88, 0x48, 0x84, 0x88, 0x48, - 0x05, 0x40, 0x32, 0x03, 0x20, 0x32, - 0x43, 0x02, 0x82, 0x28, 0x22, 0x82, - 0x1a, 0x01, 0x50, 0x15, 0x01, 0x50, - 0x60, 0x27, 0x00, 0x70, 0x07, 0x00, - 0x14, 0x38, 0xa1, 0x8a, 0x18, 0xa0, - 0x82, 0x32, 0x56, 0x68, 0xa1, 0x5c -}; - -const uint8_t kMaskRandom47_36[216] = { - 0x46, 0x4a, 0x6c, 0xa6, 0xca, 0x6c, - 0x62, 0x7c, 0x85, 0xc8, 0x5c, 0x84, - 0x8c, 0x04, 0x88, 0x48, 0x84, 0x88, - 0x01, 0x74, 0x23, 0x42, 0x34, 0x22, - 0x07, 0x83, 0x06, 0x30, 0x63, 0x06, - 0xa0, 0x80, 0x72, 0x07, 0x20, 0x72, - 0x18, 0xb1, 0x43, 0x14, 0x31, 0x42, - 0x91, 0x00, 0x92, 0x09, 0x20, 0x92, - 0x78, 0x00, 0x1c, 0x01, 0xc0, 0x1c, - 0x0c, 0x84, 0x0c, 0x40, 0xc4, 0x0c, - 0x80, 0x70, 0x07, 0x00, 0x70, 0x06, - 0xa0, 0x88, 0x48, 0x84, 0x88, 0x48, - 0x05, 0x40, 0x32, 0x03, 0x20, 0x32, - 0x43, 0x02, 0x82, 0x28, 0x22, 0x82, - 0x1a, 0x01, 0x50, 0x15, 0x01, 0x50, - 0x60, 0x27, 0x00, 0x70, 0x07, 0x00, - 0x14, 0x38, 0xa1, 0x8a, 0x18, 0xa0, - 0x82, 0x32, 0x56, 0x68, 0xa1, 0x5c, - 0x0c, 0x84, 0x0c, 0x40, 0xc4, 0x0c, - 0x80, 0x70, 0x07, 0x00, 0x70, 0x06, - 0xa0, 0x88, 0x48, 0x84, 0x88, 0x48, - 0x05, 0x40, 0x32, 0x03, 0x20, 0x32, - 0x43, 0x02, 0x82, 0x28, 0x22, 0x82, - 0x1a, 0x01, 0x50, 0x15, 0x01, 0x50, - 0x60, 0x27, 0x00, 0x70, 0x07, 0x00, - 0x14, 0x38, 0xa1, 0x8a, 0x18, 0xa0, - 0x46, 0x4a, 0x6c, 0xa6, 0xca, 0x6c, - 0x62, 0x7c, 0x85, 0xc8, 0x5c, 0x84, - 0x8c, 0x04, 0x88, 0x48, 0x84, 0x88, - 0x01, 0x74, 0x23, 0x42, 0x34, 0x22, - 0x07, 0x83, 0x06, 0x30, 0x63, 0x06, - 0xa0, 0x80, 0x72, 0x07, 0x20, 0x72, - 0x18, 0xb1, 0x43, 0x14, 0x31, 0x42, - 0x91, 0x00, 0x92, 0x09, 0x20, 0x92, - 0x78, 0x00, 0x1c, 0x01, 0xc0, 0x1c, - 0x0e, 0xd7, 0x38, 0x20, 0x87, 0x66 -}; - -const uint8_t kMaskRandom47_37[222] = { - 0x46, 0x4a, 0x6c, 0xa6, 0xca, 0x6c, - 0x62, 0x7c, 0x85, 0xc8, 0x5c, 0x84, - 0x8c, 0x04, 0x88, 0x48, 0x84, 0x88, - 0x01, 0x74, 0x23, 0x42, 0x34, 0x22, - 0x07, 0x83, 0x06, 0x30, 0x63, 0x06, - 0xa0, 0x80, 0x72, 0x07, 0x20, 0x72, - 0x18, 0xb1, 0x43, 0x14, 0x31, 0x42, - 0x91, 0x00, 0x92, 0x09, 0x20, 0x92, - 0x78, 0x00, 0x1c, 0x01, 0xc0, 0x1c, - 0x0c, 0x84, 0x0c, 0x40, 0xc4, 0x0c, - 0x80, 0x70, 0x07, 0x00, 0x70, 0x06, - 0xa0, 0x88, 0x48, 0x84, 0x88, 0x48, - 0x05, 0x40, 0x32, 0x03, 0x20, 0x32, - 0x43, 0x02, 0x82, 0x28, 0x22, 0x82, - 0x1a, 0x01, 0x50, 0x15, 0x01, 0x50, - 0x60, 0x27, 0x00, 0x70, 0x07, 0x00, - 0x14, 0x38, 0xa1, 0x8a, 0x18, 0xa0, - 0x82, 0x32, 0x56, 0x68, 0xa1, 0x5c, - 0x46, 0x4a, 0x6c, 0xa6, 0xca, 0x6c, - 0x62, 0x7c, 0x85, 0xc8, 0x5c, 0x84, - 0x8c, 0x04, 0x88, 0x48, 0x84, 0x88, - 0x01, 0x74, 0x23, 0x42, 0x34, 0x22, - 0x07, 0x83, 0x06, 0x30, 0x63, 0x06, - 0xa0, 0x80, 0x72, 0x07, 0x20, 0x72, - 0x18, 0xb1, 0x43, 0x14, 0x31, 0x42, - 0x91, 0x00, 0x92, 0x09, 0x20, 0x92, - 0x78, 0x00, 0x1c, 0x01, 0xc0, 0x1c, - 0x64, 0x4a, 0x28, 0xa2, 0x8a, 0x28, - 0x51, 0x48, 0xa2, 0x8a, 0x28, 0xa2, - 0xa9, 0x10, 0x1b, 0x01, 0xb0, 0x1a, - 0x04, 0xc4, 0x84, 0x48, 0x44, 0x84, - 0xd0, 0x01, 0x44, 0x14, 0x41, 0x44, - 0x82, 0x40, 0x1c, 0x01, 0xc0, 0x1c, - 0x21, 0x37, 0x01, 0x70, 0x17, 0x00, - 0x0c, 0x21, 0x22, 0x12, 0x21, 0x22, - 0x4a, 0x0a, 0xc0, 0xac, 0x0a, 0xc0, - 0x12, 0xb4, 0x51, 0x45, 0x14, 0x50 -}; - -const uint8_t kMaskRandom47_38[228] = { - 0x46, 0x4a, 0x6c, 0xa6, 0xca, 0x6c, - 0x62, 0x7c, 0x85, 0xc8, 0x5c, 0x84, - 0x8c, 0x04, 0x88, 0x48, 0x84, 0x88, - 0x01, 0x74, 0x23, 0x42, 0x34, 0x22, - 0x07, 0x83, 0x06, 0x30, 0x63, 0x06, - 0xa0, 0x80, 0x72, 0x07, 0x20, 0x72, - 0x18, 0xb1, 0x43, 0x14, 0x31, 0x42, - 0x91, 0x00, 0x92, 0x09, 0x20, 0x92, - 0x78, 0x00, 0x1c, 0x01, 0xc0, 0x1c, - 0x64, 0x4a, 0x28, 0xa2, 0x8a, 0x28, - 0x51, 0x48, 0xa2, 0x8a, 0x28, 0xa2, - 0xa9, 0x10, 0x1b, 0x01, 0xb0, 0x1a, - 0x04, 0xc4, 0x84, 0x48, 0x44, 0x84, - 0xd0, 0x01, 0x44, 0x14, 0x41, 0x44, - 0x82, 0x40, 0x1c, 0x01, 0xc0, 0x1c, - 0x21, 0x37, 0x01, 0x70, 0x17, 0x00, - 0x0c, 0x21, 0x22, 0x12, 0x21, 0x22, - 0x4a, 0x0a, 0xc0, 0xac, 0x0a, 0xc0, - 0x12, 0xb4, 0x51, 0x45, 0x14, 0x50, - 0x46, 0x4a, 0x6c, 0xa6, 0xca, 0x6c, - 0x62, 0x7c, 0x85, 0xc8, 0x5c, 0x84, - 0x8c, 0x04, 0x88, 0x48, 0x84, 0x88, - 0x01, 0x74, 0x23, 0x42, 0x34, 0x22, - 0x07, 0x83, 0x06, 0x30, 0x63, 0x06, - 0xa0, 0x80, 0x72, 0x07, 0x20, 0x72, - 0x18, 0xb1, 0x43, 0x14, 0x31, 0x42, - 0x91, 0x00, 0x92, 0x09, 0x20, 0x92, - 0x78, 0x00, 0x1c, 0x01, 0xc0, 0x1c, - 0x0c, 0x84, 0x0c, 0x40, 0xc4, 0x0c, - 0x80, 0x70, 0x07, 0x00, 0x70, 0x06, - 0xa0, 0x88, 0x48, 0x84, 0x88, 0x48, - 0x05, 0x40, 0x32, 0x03, 0x20, 0x32, - 0x43, 0x02, 0x82, 0x28, 0x22, 0x82, - 0x1a, 0x01, 0x50, 0x15, 0x01, 0x50, - 0x60, 0x27, 0x00, 0x70, 0x07, 0x00, - 0x14, 0x38, 0xa1, 0x8a, 0x18, 0xa0, - 0x82, 0x32, 0x56, 0x68, 0xa1, 0x5c, - 0x7b, 0x47, 0xa5, 0xde, 0x9a, 0xd4 -}; - -const uint8_t kMaskRandom47_39[234] = { - 0x46, 0x4a, 0x6c, 0xa6, 0xca, 0x6c, - 0x62, 0x7c, 0x85, 0xc8, 0x5c, 0x84, - 0x8c, 0x04, 0x88, 0x48, 0x84, 0x88, - 0x01, 0x74, 0x23, 0x42, 0x34, 0x22, - 0x07, 0x83, 0x06, 0x30, 0x63, 0x06, - 0xa0, 0x80, 0x72, 0x07, 0x20, 0x72, - 0x18, 0xb1, 0x43, 0x14, 0x31, 0x42, - 0x91, 0x00, 0x92, 0x09, 0x20, 0x92, - 0x78, 0x00, 0x1c, 0x01, 0xc0, 0x1c, - 0x64, 0x4a, 0x28, 0xa2, 0x8a, 0x28, - 0x51, 0x48, 0xa2, 0x8a, 0x28, 0xa2, - 0xa9, 0x10, 0x1b, 0x01, 0xb0, 0x1a, - 0x04, 0xc4, 0x84, 0x48, 0x44, 0x84, - 0xd0, 0x01, 0x44, 0x14, 0x41, 0x44, - 0x82, 0x40, 0x1c, 0x01, 0xc0, 0x1c, - 0x21, 0x37, 0x01, 0x70, 0x17, 0x00, - 0x0c, 0x21, 0x22, 0x12, 0x21, 0x22, - 0x4a, 0x0a, 0xc0, 0xac, 0x0a, 0xc0, - 0x12, 0xb4, 0x51, 0x45, 0x14, 0x50, - 0x64, 0x4a, 0x28, 0xa2, 0x8a, 0x28, - 0x51, 0x48, 0xa2, 0x8a, 0x28, 0xa2, - 0xa9, 0x10, 0x1b, 0x01, 0xb0, 0x1a, - 0x04, 0xc4, 0x84, 0x48, 0x44, 0x84, - 0xd0, 0x01, 0x44, 0x14, 0x41, 0x44, - 0x82, 0x40, 0x1c, 0x01, 0xc0, 0x1c, - 0x21, 0x37, 0x01, 0x70, 0x17, 0x00, - 0x0c, 0x21, 0x22, 0x12, 0x21, 0x22, - 0x4a, 0x0a, 0xc0, 0xac, 0x0a, 0xc0, - 0x12, 0xb4, 0x51, 0x45, 0x14, 0x50, - 0x46, 0x4a, 0x6c, 0xa6, 0xca, 0x6c, - 0x62, 0x7c, 0x85, 0xc8, 0x5c, 0x84, - 0x8c, 0x04, 0x88, 0x48, 0x84, 0x88, - 0x01, 0x74, 0x23, 0x42, 0x34, 0x22, - 0x07, 0x83, 0x06, 0x30, 0x63, 0x06, - 0xa0, 0x80, 0x72, 0x07, 0x20, 0x72, - 0x18, 0xb1, 0x43, 0x14, 0x31, 0x42, - 0x91, 0x00, 0x92, 0x09, 0x20, 0x92, - 0x78, 0x00, 0x1c, 0x01, 0xc0, 0x1c, - 0xdb, 0x4a, 0x7b, 0x31, 0x45, 0x2a -}; - -const uint8_t kMaskRandom47_4[24] = { - 0xc4, 0xd1, 0x65, 0x16, 0x51, 0x64, - 0x31, 0x62, 0x96, 0x29, 0x62, 0x96, - 0x4b, 0x24, 0x5a, 0x45, 0xa4, 0x5a, - 0x2c, 0xa8, 0xaa, 0x8a, 0xa8, 0xaa -}; - -const uint8_t kMaskRandom47_40[240] = { - 0x64, 0x4a, 0x28, 0xa2, 0x8a, 0x28, - 0x51, 0x48, 0xa2, 0x8a, 0x28, 0xa2, - 0xa9, 0x10, 0x1b, 0x01, 0xb0, 0x1a, - 0x04, 0xc4, 0x84, 0x48, 0x44, 0x84, - 0xd0, 0x01, 0x44, 0x14, 0x41, 0x44, - 0x82, 0x40, 0x1c, 0x01, 0xc0, 0x1c, - 0x21, 0x37, 0x01, 0x70, 0x17, 0x00, - 0x0c, 0x21, 0x22, 0x12, 0x21, 0x22, - 0x4a, 0x0a, 0xc0, 0xac, 0x0a, 0xc0, - 0x12, 0xb4, 0x51, 0x45, 0x14, 0x50, - 0x46, 0x4a, 0x6c, 0xa6, 0xca, 0x6c, - 0x62, 0x7c, 0x85, 0xc8, 0x5c, 0x84, - 0x8c, 0x04, 0x88, 0x48, 0x84, 0x88, - 0x01, 0x74, 0x23, 0x42, 0x34, 0x22, - 0x07, 0x83, 0x06, 0x30, 0x63, 0x06, - 0xa0, 0x80, 0x72, 0x07, 0x20, 0x72, - 0x18, 0xb1, 0x43, 0x14, 0x31, 0x42, - 0x91, 0x00, 0x92, 0x09, 0x20, 0x92, - 0x78, 0x00, 0x1c, 0x01, 0xc0, 0x1c, - 0xdb, 0x4a, 0x7b, 0x31, 0x45, 0x2a, - 0x46, 0x4a, 0x6c, 0xa6, 0xca, 0x6c, - 0x62, 0x7c, 0x85, 0xc8, 0x5c, 0x84, - 0x8c, 0x04, 0x88, 0x48, 0x84, 0x88, - 0x01, 0x74, 0x23, 0x42, 0x34, 0x22, - 0x07, 0x83, 0x06, 0x30, 0x63, 0x06, - 0xa0, 0x80, 0x72, 0x07, 0x20, 0x72, - 0x18, 0xb1, 0x43, 0x14, 0x31, 0x42, - 0x91, 0x00, 0x92, 0x09, 0x20, 0x92, - 0x78, 0x00, 0x1c, 0x01, 0xc0, 0x1c, - 0x64, 0x4a, 0x28, 0xa2, 0x8a, 0x28, - 0x51, 0x48, 0xa2, 0x8a, 0x28, 0xa2, - 0xa9, 0x10, 0x1b, 0x01, 0xb0, 0x1a, - 0x04, 0xc4, 0x84, 0x48, 0x44, 0x84, - 0xd0, 0x01, 0x44, 0x14, 0x41, 0x44, - 0x82, 0x40, 0x1c, 0x01, 0xc0, 0x1c, - 0x21, 0x37, 0x01, 0x70, 0x17, 0x00, - 0x0c, 0x21, 0x22, 0x12, 0x21, 0x22, - 0x4a, 0x0a, 0xc0, 0xac, 0x0a, 0xc0, - 0x12, 0xb4, 0x51, 0x45, 0x14, 0x50, - 0xc4, 0xae, 0x5e, 0x33, 0xf5, 0x1a -}; - -const uint8_t kMaskRandom47_41[246] = { - 0x64, 0x4a, 0x28, 0xa2, 0x8a, 0x28, - 0x51, 0x48, 0xa2, 0x8a, 0x28, 0xa2, - 0xa9, 0x10, 0x1b, 0x01, 0xb0, 0x1a, - 0x04, 0xc4, 0x84, 0x48, 0x44, 0x84, - 0xd0, 0x01, 0x44, 0x14, 0x41, 0x44, - 0x82, 0x40, 0x1c, 0x01, 0xc0, 0x1c, - 0x21, 0x37, 0x01, 0x70, 0x17, 0x00, - 0x0c, 0x21, 0x22, 0x12, 0x21, 0x22, - 0x4a, 0x0a, 0xc0, 0xac, 0x0a, 0xc0, - 0x12, 0xb4, 0x51, 0x45, 0x14, 0x50, - 0x46, 0x4a, 0x6c, 0xa6, 0xca, 0x6c, - 0x62, 0x7c, 0x85, 0xc8, 0x5c, 0x84, - 0x8c, 0x04, 0x88, 0x48, 0x84, 0x88, - 0x01, 0x74, 0x23, 0x42, 0x34, 0x22, - 0x07, 0x83, 0x06, 0x30, 0x63, 0x06, - 0xa0, 0x80, 0x72, 0x07, 0x20, 0x72, - 0x18, 0xb1, 0x43, 0x14, 0x31, 0x42, - 0x91, 0x00, 0x92, 0x09, 0x20, 0x92, - 0x78, 0x00, 0x1c, 0x01, 0xc0, 0x1c, - 0xdb, 0x4a, 0x7b, 0x31, 0x45, 0x2a, - 0x64, 0x4a, 0x28, 0xa2, 0x8a, 0x28, - 0x51, 0x48, 0xa2, 0x8a, 0x28, 0xa2, - 0xa9, 0x10, 0x1b, 0x01, 0xb0, 0x1a, - 0x04, 0xc4, 0x84, 0x48, 0x44, 0x84, - 0xd0, 0x01, 0x44, 0x14, 0x41, 0x44, - 0x82, 0x40, 0x1c, 0x01, 0xc0, 0x1c, - 0x21, 0x37, 0x01, 0x70, 0x17, 0x00, - 0x0c, 0x21, 0x22, 0x12, 0x21, 0x22, - 0x4a, 0x0a, 0xc0, 0xac, 0x0a, 0xc0, - 0x12, 0xb4, 0x51, 0x45, 0x14, 0x50, - 0x46, 0x4a, 0x6c, 0xa6, 0xca, 0x6c, - 0x33, 0x24, 0x26, 0x42, 0x64, 0x26, - 0x99, 0x02, 0x12, 0x21, 0x22, 0x12, - 0x05, 0x80, 0x0e, 0x00, 0xe0, 0x0e, - 0x80, 0xa1, 0x82, 0x18, 0x21, 0x82, - 0x84, 0x48, 0x18, 0x81, 0x88, 0x18, - 0x40, 0x6d, 0x40, 0xd4, 0x0d, 0x40, - 0x0a, 0x90, 0xc1, 0x0c, 0x10, 0xc0, - 0x68, 0x04, 0x90, 0x49, 0x04, 0x90, - 0x10, 0x31, 0x21, 0x12, 0x11, 0x20, - 0x30, 0x58, 0x05, 0x80, 0x58, 0x04 -}; - -const uint8_t kMaskRandom47_42[252] = { - 0x64, 0x4a, 0x28, 0xa2, 0x8a, 0x28, - 0x51, 0x48, 0xa2, 0x8a, 0x28, 0xa2, - 0xa9, 0x10, 0x1b, 0x01, 0xb0, 0x1a, - 0x04, 0xc4, 0x84, 0x48, 0x44, 0x84, - 0xd0, 0x01, 0x44, 0x14, 0x41, 0x44, - 0x82, 0x40, 0x1c, 0x01, 0xc0, 0x1c, - 0x21, 0x37, 0x01, 0x70, 0x17, 0x00, - 0x0c, 0x21, 0x22, 0x12, 0x21, 0x22, - 0x4a, 0x0a, 0xc0, 0xac, 0x0a, 0xc0, - 0x12, 0xb4, 0x51, 0x45, 0x14, 0x50, - 0x46, 0x4a, 0x6c, 0xa6, 0xca, 0x6c, - 0x33, 0x24, 0x26, 0x42, 0x64, 0x26, - 0x99, 0x02, 0x12, 0x21, 0x22, 0x12, - 0x05, 0x80, 0x0e, 0x00, 0xe0, 0x0e, - 0x80, 0xa1, 0x82, 0x18, 0x21, 0x82, - 0x84, 0x48, 0x18, 0x81, 0x88, 0x18, - 0x40, 0x6d, 0x40, 0xd4, 0x0d, 0x40, - 0x0a, 0x90, 0xc1, 0x0c, 0x10, 0xc0, - 0x68, 0x04, 0x90, 0x49, 0x04, 0x90, - 0x10, 0x31, 0x21, 0x12, 0x11, 0x20, - 0x30, 0x58, 0x05, 0x80, 0x58, 0x04, - 0x64, 0x4a, 0x28, 0xa2, 0x8a, 0x28, - 0x51, 0x48, 0xa2, 0x8a, 0x28, 0xa2, - 0xa9, 0x10, 0x1b, 0x01, 0xb0, 0x1a, - 0x04, 0xc4, 0x84, 0x48, 0x44, 0x84, - 0xd0, 0x01, 0x44, 0x14, 0x41, 0x44, - 0x82, 0x40, 0x1c, 0x01, 0xc0, 0x1c, - 0x21, 0x37, 0x01, 0x70, 0x17, 0x00, - 0x0c, 0x21, 0x22, 0x12, 0x21, 0x22, - 0x4a, 0x0a, 0xc0, 0xac, 0x0a, 0xc0, - 0x12, 0xb4, 0x51, 0x45, 0x14, 0x50, - 0x46, 0x4a, 0x6c, 0xa6, 0xca, 0x6c, - 0x62, 0x7c, 0x85, 0xc8, 0x5c, 0x84, - 0x8c, 0x04, 0x88, 0x48, 0x84, 0x88, - 0x01, 0x74, 0x23, 0x42, 0x34, 0x22, - 0x07, 0x83, 0x06, 0x30, 0x63, 0x06, - 0xa0, 0x80, 0x72, 0x07, 0x20, 0x72, - 0x18, 0xb1, 0x43, 0x14, 0x31, 0x42, - 0x91, 0x00, 0x92, 0x09, 0x20, 0x92, - 0x78, 0x00, 0x1c, 0x01, 0xc0, 0x1c, - 0xdb, 0x4a, 0x7b, 0x31, 0x45, 0x2a, - 0x3c, 0xb0, 0x36, 0x3b, 0x14, 0xa2 -}; - -const uint8_t kMaskRandom47_43[258] = { - 0x64, 0x4a, 0x28, 0xa2, 0x8a, 0x28, - 0x51, 0x48, 0xa2, 0x8a, 0x28, 0xa2, - 0xa9, 0x10, 0x1b, 0x01, 0xb0, 0x1a, - 0x04, 0xc4, 0x84, 0x48, 0x44, 0x84, - 0xd0, 0x01, 0x44, 0x14, 0x41, 0x44, - 0x82, 0x40, 0x1c, 0x01, 0xc0, 0x1c, - 0x21, 0x37, 0x01, 0x70, 0x17, 0x00, - 0x0c, 0x21, 0x22, 0x12, 0x21, 0x22, - 0x4a, 0x0a, 0xc0, 0xac, 0x0a, 0xc0, - 0x12, 0xb4, 0x51, 0x45, 0x14, 0x50, - 0x46, 0x4a, 0x6c, 0xa6, 0xca, 0x6c, - 0x33, 0x24, 0x26, 0x42, 0x64, 0x26, - 0x99, 0x02, 0x12, 0x21, 0x22, 0x12, - 0x05, 0x80, 0x0e, 0x00, 0xe0, 0x0e, - 0x80, 0xa1, 0x82, 0x18, 0x21, 0x82, - 0x84, 0x48, 0x18, 0x81, 0x88, 0x18, - 0x40, 0x6d, 0x40, 0xd4, 0x0d, 0x40, - 0x0a, 0x90, 0xc1, 0x0c, 0x10, 0xc0, - 0x68, 0x04, 0x90, 0x49, 0x04, 0x90, - 0x10, 0x31, 0x21, 0x12, 0x11, 0x20, - 0x30, 0x58, 0x05, 0x80, 0x58, 0x04, - 0x46, 0x4a, 0x6c, 0xa6, 0xca, 0x6c, - 0x33, 0x24, 0x26, 0x42, 0x64, 0x26, - 0x99, 0x02, 0x12, 0x21, 0x22, 0x12, - 0x05, 0x80, 0x0e, 0x00, 0xe0, 0x0e, - 0x80, 0xa1, 0x82, 0x18, 0x21, 0x82, - 0x84, 0x48, 0x18, 0x81, 0x88, 0x18, - 0x40, 0x6d, 0x40, 0xd4, 0x0d, 0x40, - 0x0a, 0x90, 0xc1, 0x0c, 0x10, 0xc0, - 0x68, 0x04, 0x90, 0x49, 0x04, 0x90, - 0x10, 0x31, 0x21, 0x12, 0x11, 0x20, - 0x30, 0x58, 0x05, 0x80, 0x58, 0x04, - 0x64, 0x4a, 0x28, 0xa2, 0x8a, 0x28, - 0x51, 0x48, 0xa2, 0x8a, 0x28, 0xa2, - 0xa9, 0x10, 0x1b, 0x01, 0xb0, 0x1a, - 0x04, 0xc4, 0x84, 0x48, 0x44, 0x84, - 0xd0, 0x01, 0x44, 0x14, 0x41, 0x44, - 0x82, 0x40, 0x1c, 0x01, 0xc0, 0x1c, - 0x21, 0x37, 0x01, 0x70, 0x17, 0x00, - 0x0c, 0x21, 0x22, 0x12, 0x21, 0x22, - 0x4a, 0x0a, 0xc0, 0xac, 0x0a, 0xc0, - 0x12, 0xb4, 0x51, 0x45, 0x14, 0x50, - 0xea, 0x8d, 0x1a, 0x35, 0x55, 0xdc -}; - -const uint8_t kMaskRandom47_44[264] = { - 0x46, 0x4a, 0x6c, 0xa6, 0xca, 0x6c, - 0x33, 0x24, 0x26, 0x42, 0x64, 0x26, - 0x99, 0x02, 0x12, 0x21, 0x22, 0x12, - 0x05, 0x80, 0x0e, 0x00, 0xe0, 0x0e, - 0x80, 0xa1, 0x82, 0x18, 0x21, 0x82, - 0x84, 0x48, 0x18, 0x81, 0x88, 0x18, - 0x40, 0x6d, 0x40, 0xd4, 0x0d, 0x40, - 0x0a, 0x90, 0xc1, 0x0c, 0x10, 0xc0, - 0x68, 0x04, 0x90, 0x49, 0x04, 0x90, - 0x10, 0x31, 0x21, 0x12, 0x11, 0x20, - 0x30, 0x58, 0x05, 0x80, 0x58, 0x04, - 0x64, 0x4a, 0x28, 0xa2, 0x8a, 0x28, - 0x51, 0x48, 0xa2, 0x8a, 0x28, 0xa2, - 0xa9, 0x10, 0x1b, 0x01, 0xb0, 0x1a, - 0x04, 0xc4, 0x84, 0x48, 0x44, 0x84, - 0xd0, 0x01, 0x44, 0x14, 0x41, 0x44, - 0x82, 0x40, 0x1c, 0x01, 0xc0, 0x1c, - 0x21, 0x37, 0x01, 0x70, 0x17, 0x00, - 0x0c, 0x21, 0x22, 0x12, 0x21, 0x22, - 0x4a, 0x0a, 0xc0, 0xac, 0x0a, 0xc0, - 0x12, 0xb4, 0x51, 0x45, 0x14, 0x50, - 0xea, 0x8d, 0x1a, 0x35, 0x55, 0xdc, - 0x64, 0x4a, 0x28, 0xa2, 0x8a, 0x28, - 0x51, 0x48, 0xa2, 0x8a, 0x28, 0xa2, - 0xa9, 0x10, 0x1b, 0x01, 0xb0, 0x1a, - 0x04, 0xc4, 0x84, 0x48, 0x44, 0x84, - 0xd0, 0x01, 0x44, 0x14, 0x41, 0x44, - 0x82, 0x40, 0x1c, 0x01, 0xc0, 0x1c, - 0x21, 0x37, 0x01, 0x70, 0x17, 0x00, - 0x0c, 0x21, 0x22, 0x12, 0x21, 0x22, - 0x4a, 0x0a, 0xc0, 0xac, 0x0a, 0xc0, - 0x12, 0xb4, 0x51, 0x45, 0x14, 0x50, - 0x46, 0x4a, 0x6c, 0xa6, 0xca, 0x6c, - 0x33, 0x24, 0x26, 0x42, 0x64, 0x26, - 0x99, 0x02, 0x12, 0x21, 0x22, 0x12, - 0x05, 0x80, 0x0e, 0x00, 0xe0, 0x0e, - 0x80, 0xa1, 0x82, 0x18, 0x21, 0x82, - 0x84, 0x48, 0x18, 0x81, 0x88, 0x18, - 0x40, 0x6d, 0x40, 0xd4, 0x0d, 0x40, - 0x0a, 0x90, 0xc1, 0x0c, 0x10, 0xc0, - 0x68, 0x04, 0x90, 0x49, 0x04, 0x90, - 0x10, 0x31, 0x21, 0x12, 0x11, 0x20, - 0x30, 0x58, 0x05, 0x80, 0x58, 0x04, - 0xd4, 0x8a, 0xd4, 0xd3, 0x3f, 0xe6 -}; - -const uint8_t kMaskRandom47_45[270] = { - 0x46, 0x4a, 0x6c, 0xa6, 0xca, 0x6c, - 0x33, 0x24, 0x26, 0x42, 0x64, 0x26, - 0x99, 0x02, 0x12, 0x21, 0x22, 0x12, - 0x05, 0x80, 0x0e, 0x00, 0xe0, 0x0e, - 0x80, 0xa1, 0x82, 0x18, 0x21, 0x82, - 0x84, 0x48, 0x18, 0x81, 0x88, 0x18, - 0x40, 0x6d, 0x40, 0xd4, 0x0d, 0x40, - 0x0a, 0x90, 0xc1, 0x0c, 0x10, 0xc0, - 0x68, 0x04, 0x90, 0x49, 0x04, 0x90, - 0x10, 0x31, 0x21, 0x12, 0x11, 0x20, - 0x30, 0x58, 0x05, 0x80, 0x58, 0x04, - 0x64, 0x4a, 0x28, 0xa2, 0x8a, 0x28, - 0x51, 0x48, 0xa2, 0x8a, 0x28, 0xa2, - 0xa9, 0x10, 0x1b, 0x01, 0xb0, 0x1a, - 0x04, 0xc4, 0x84, 0x48, 0x44, 0x84, - 0xd0, 0x01, 0x44, 0x14, 0x41, 0x44, - 0x82, 0x40, 0x1c, 0x01, 0xc0, 0x1c, - 0x21, 0x37, 0x01, 0x70, 0x17, 0x00, - 0x0c, 0x21, 0x22, 0x12, 0x21, 0x22, - 0x4a, 0x0a, 0xc0, 0xac, 0x0a, 0xc0, - 0x12, 0xb4, 0x51, 0x45, 0x14, 0x50, - 0xea, 0x8d, 0x1a, 0x35, 0x55, 0xdc, - 0x46, 0x4a, 0x6c, 0xa6, 0xca, 0x6c, - 0x33, 0x24, 0x26, 0x42, 0x64, 0x26, - 0x99, 0x02, 0x12, 0x21, 0x22, 0x12, - 0x05, 0x80, 0x0e, 0x00, 0xe0, 0x0e, - 0x80, 0xa1, 0x82, 0x18, 0x21, 0x82, - 0x84, 0x48, 0x18, 0x81, 0x88, 0x18, - 0x40, 0x6d, 0x40, 0xd4, 0x0d, 0x40, - 0x0a, 0x90, 0xc1, 0x0c, 0x10, 0xc0, - 0x68, 0x04, 0x90, 0x49, 0x04, 0x90, - 0x10, 0x31, 0x21, 0x12, 0x11, 0x20, - 0x30, 0x58, 0x05, 0x80, 0x58, 0x04, - 0x46, 0x42, 0x0c, 0x20, 0xc2, 0x0c, - 0x33, 0x20, 0x46, 0x04, 0x60, 0x46, - 0x99, 0x08, 0x0a, 0x80, 0xa8, 0x0a, - 0x05, 0x84, 0x30, 0x43, 0x04, 0x30, - 0x80, 0xb0, 0x23, 0x02, 0x30, 0x22, - 0x84, 0x42, 0x90, 0x29, 0x02, 0x90, - 0x40, 0x73, 0x01, 0x30, 0x13, 0x00, - 0x0a, 0x81, 0x12, 0x11, 0x21, 0x12, - 0x68, 0x0c, 0x40, 0xc4, 0x0c, 0x40, - 0x10, 0x24, 0x84, 0x48, 0x44, 0x84, - 0x30, 0x51, 0x41, 0x14, 0x11, 0x40, - 0x5f, 0x50, 0x89, 0x08, 0x90, 0x88 -}; - -const uint8_t kMaskRandom47_46[276] = { - 0x46, 0x4a, 0x6c, 0xa6, 0xca, 0x6c, - 0x33, 0x24, 0x26, 0x42, 0x64, 0x26, - 0x99, 0x02, 0x12, 0x21, 0x22, 0x12, - 0x05, 0x80, 0x0e, 0x00, 0xe0, 0x0e, - 0x80, 0xa1, 0x82, 0x18, 0x21, 0x82, - 0x84, 0x48, 0x18, 0x81, 0x88, 0x18, - 0x40, 0x6d, 0x40, 0xd4, 0x0d, 0x40, - 0x0a, 0x90, 0xc1, 0x0c, 0x10, 0xc0, - 0x68, 0x04, 0x90, 0x49, 0x04, 0x90, - 0x10, 0x31, 0x21, 0x12, 0x11, 0x20, - 0x30, 0x58, 0x05, 0x80, 0x58, 0x04, - 0x46, 0x42, 0x0c, 0x20, 0xc2, 0x0c, - 0x33, 0x20, 0x46, 0x04, 0x60, 0x46, - 0x99, 0x08, 0x0a, 0x80, 0xa8, 0x0a, - 0x05, 0x84, 0x30, 0x43, 0x04, 0x30, - 0x80, 0xb0, 0x23, 0x02, 0x30, 0x22, - 0x84, 0x42, 0x90, 0x29, 0x02, 0x90, - 0x40, 0x73, 0x01, 0x30, 0x13, 0x00, - 0x0a, 0x81, 0x12, 0x11, 0x21, 0x12, - 0x68, 0x0c, 0x40, 0xc4, 0x0c, 0x40, - 0x10, 0x24, 0x84, 0x48, 0x44, 0x84, - 0x30, 0x51, 0x41, 0x14, 0x11, 0x40, - 0x5f, 0x50, 0x89, 0x08, 0x90, 0x88, - 0x46, 0x4a, 0x6c, 0xa6, 0xca, 0x6c, - 0x33, 0x24, 0x26, 0x42, 0x64, 0x26, - 0x99, 0x02, 0x12, 0x21, 0x22, 0x12, - 0x05, 0x80, 0x0e, 0x00, 0xe0, 0x0e, - 0x80, 0xa1, 0x82, 0x18, 0x21, 0x82, - 0x84, 0x48, 0x18, 0x81, 0x88, 0x18, - 0x40, 0x6d, 0x40, 0xd4, 0x0d, 0x40, - 0x0a, 0x90, 0xc1, 0x0c, 0x10, 0xc0, - 0x68, 0x04, 0x90, 0x49, 0x04, 0x90, - 0x10, 0x31, 0x21, 0x12, 0x11, 0x20, - 0x30, 0x58, 0x05, 0x80, 0x58, 0x04, - 0x64, 0x4a, 0x28, 0xa2, 0x8a, 0x28, - 0x51, 0x48, 0xa2, 0x8a, 0x28, 0xa2, - 0xa9, 0x10, 0x1b, 0x01, 0xb0, 0x1a, - 0x04, 0xc4, 0x84, 0x48, 0x44, 0x84, - 0xd0, 0x01, 0x44, 0x14, 0x41, 0x44, - 0x82, 0x40, 0x1c, 0x01, 0xc0, 0x1c, - 0x21, 0x37, 0x01, 0x70, 0x17, 0x00, - 0x0c, 0x21, 0x22, 0x12, 0x21, 0x22, - 0x4a, 0x0a, 0xc0, 0xac, 0x0a, 0xc0, - 0x12, 0xb4, 0x51, 0x45, 0x14, 0x50, - 0xea, 0x8d, 0x1a, 0x35, 0x55, 0xdc, - 0x37, 0x9d, 0xcf, 0xe0, 0xe4, 0x20 -}; - -const uint8_t kMaskRandom47_47[282] = { - 0x46, 0x4a, 0x6c, 0xa6, 0xca, 0x6c, - 0x33, 0x24, 0x26, 0x42, 0x64, 0x26, - 0x99, 0x02, 0x12, 0x21, 0x22, 0x12, - 0x05, 0x80, 0x0e, 0x00, 0xe0, 0x0e, - 0x80, 0xa1, 0x82, 0x18, 0x21, 0x82, - 0x84, 0x48, 0x18, 0x81, 0x88, 0x18, - 0x40, 0x6d, 0x40, 0xd4, 0x0d, 0x40, - 0x0a, 0x90, 0xc1, 0x0c, 0x10, 0xc0, - 0x68, 0x04, 0x90, 0x49, 0x04, 0x90, - 0x10, 0x31, 0x21, 0x12, 0x11, 0x20, - 0x30, 0x58, 0x05, 0x80, 0x58, 0x04, - 0x46, 0x42, 0x0c, 0x20, 0xc2, 0x0c, - 0x33, 0x20, 0x46, 0x04, 0x60, 0x46, - 0x99, 0x08, 0x0a, 0x80, 0xa8, 0x0a, - 0x05, 0x84, 0x30, 0x43, 0x04, 0x30, - 0x80, 0xb0, 0x23, 0x02, 0x30, 0x22, - 0x84, 0x42, 0x90, 0x29, 0x02, 0x90, - 0x40, 0x73, 0x01, 0x30, 0x13, 0x00, - 0x0a, 0x81, 0x12, 0x11, 0x21, 0x12, - 0x68, 0x0c, 0x40, 0xc4, 0x0c, 0x40, - 0x10, 0x24, 0x84, 0x48, 0x44, 0x84, - 0x30, 0x51, 0x41, 0x14, 0x11, 0x40, - 0x5f, 0x50, 0x89, 0x08, 0x90, 0x88, - 0x46, 0x4a, 0x6c, 0x20, 0xc2, 0x0c, - 0x33, 0x24, 0x26, 0x04, 0x60, 0x46, - 0x99, 0x02, 0x12, 0x80, 0xa8, 0x0a, - 0x05, 0x80, 0x0e, 0x43, 0x04, 0x30, - 0x80, 0xa1, 0x83, 0x02, 0x30, 0x22, - 0x84, 0x48, 0x18, 0x29, 0x02, 0x90, - 0x40, 0x6d, 0x41, 0x30, 0x13, 0x00, - 0x0a, 0x90, 0xc0, 0x11, 0x21, 0x12, - 0x68, 0x04, 0x90, 0xc4, 0x0c, 0x40, - 0x10, 0x31, 0x20, 0x48, 0x44, 0x84, - 0x30, 0x58, 0x05, 0x14, 0x11, 0x40, - 0x46, 0x42, 0x0d, 0x08, 0x90, 0x88, - 0x33, 0x20, 0x46, 0xa6, 0xca, 0x6c, - 0x99, 0x08, 0x0a, 0x42, 0x64, 0x26, - 0x05, 0x84, 0x30, 0x21, 0x22, 0x12, - 0x80, 0xb0, 0x22, 0x00, 0xe0, 0x0e, - 0x84, 0x42, 0x90, 0x18, 0x21, 0x82, - 0x40, 0x73, 0x00, 0x81, 0x88, 0x18, - 0x0a, 0x81, 0x12, 0xd4, 0x0d, 0x40, - 0x68, 0x0c, 0x41, 0x0c, 0x10, 0xc0, - 0x10, 0x24, 0x84, 0x49, 0x04, 0x90, - 0x30, 0x51, 0x41, 0x12, 0x11, 0x20, - 0x5f, 0x50, 0x89, 0x80, 0x58, 0x04, - 0x1f, 0x2f, 0x63, 0x10, 0x64, 0xb2 -}; - -const uint8_t kMaskRandom47_5[30] = { - 0xc6, 0xca, 0x6c, 0xa6, 0xca, 0x6c, - 0x63, 0x6c, 0x96, 0xc9, 0x6c, 0x96, - 0x1d, 0xa1, 0xdc, 0x1d, 0xc1, 0xdc, - 0xad, 0x55, 0x39, 0x53, 0x95, 0x38, - 0xb2, 0xb7, 0x07, 0x70, 0x77, 0x06 -}; - -const uint8_t kMaskRandom47_6[36] = { - 0x64, 0x4a, 0x29, 0xa2, 0x9a, 0x28, - 0x51, 0x58, 0xa2, 0x8a, 0x68, 0xa6, - 0x0c, 0xa4, 0x30, 0x45, 0xa4, 0x5a, - 0xa1, 0x22, 0x46, 0x2d, 0x82, 0xd8, - 0x12, 0xa1, 0x1c, 0x17, 0x41, 0x74, - 0x8a, 0x45, 0xc1, 0xd1, 0x1d, 0x10 -}; - -const uint8_t kMaskRandom47_7[42] = { - 0x46, 0x4a, 0x6d, 0xa6, 0xca, 0x6c, - 0x33, 0x24, 0x26, 0x4a, 0x64, 0xa6, - 0x91, 0x92, 0x12, 0x61, 0xa6, 0x0a, - 0xa4, 0x20, 0x4a, 0x0c, 0x90, 0xd8, - 0x50, 0xa0, 0xd5, 0x81, 0x70, 0x36, - 0x84, 0xc5, 0x80, 0x55, 0x45, 0x54, - 0x09, 0x71, 0x0d, 0x50, 0x9d, 0x08 -}; - -const uint8_t kMaskRandom47_8[48] = { - 0x0c, 0x84, 0x0d, 0x02, 0xc0, 0x2c, - 0x80, 0x70, 0x06, 0x80, 0x78, 0x06, - 0xa0, 0x88, 0x48, 0x21, 0x22, 0x12, - 0x05, 0x40, 0x32, 0x0c, 0xa0, 0xca, - 0x43, 0x02, 0x82, 0x40, 0x95, 0x08, - 0x1a, 0x01, 0x51, 0x15, 0x41, 0x54, - 0x60, 0x27, 0x00, 0x66, 0x06, 0x60, - 0x14, 0x38, 0xa0, 0x99, 0x09, 0x90 -}; - -const uint8_t kMaskRandom47_9[54] = { - 0x46, 0x4a, 0x6d, 0xa6, 0xca, 0x6c, - 0x62, 0x7c, 0x84, 0xc8, 0x4c, 0x84, - 0x8c, 0x04, 0x88, 0x30, 0x83, 0x88, - 0x01, 0x74, 0x23, 0x40, 0x94, 0x08, - 0x07, 0x83, 0x07, 0x02, 0x70, 0x26, - 0xa0, 0x80, 0x72, 0x45, 0x44, 0x54, - 0x18, 0xb1, 0x42, 0x10, 0xe1, 0x0e, - 0x91, 0x00, 0x92, 0x09, 0x20, 0x92, - 0x78, 0x00, 0x1c, 0x03, 0x80, 0x38 -}; - -const uint8_t kMaskRandom48_1[6] = { - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff -}; - -const uint8_t kMaskRandom48_10[60] = { - 0x11, 0x45, 0x14, 0x11, 0x45, 0x14, - 0x45, 0x34, 0x53, 0x45, 0x34, 0x53, - 0x00, 0x48, 0x05, 0x00, 0x48, 0x05, - 0x10, 0x83, 0x09, 0x10, 0x83, 0x09, - 0x4a, 0x14, 0xa1, 0x4a, 0x14, 0xa1, - 0x40, 0xa4, 0x0a, 0x40, 0xa4, 0x0a, - 0xa0, 0x6a, 0x02, 0xa0, 0x6a, 0x02, - 0x88, 0x80, 0x8c, 0x88, 0x80, 0x8c, - 0x86, 0x08, 0x60, 0x86, 0x08, 0x60, - 0x54, 0x0d, 0x40, 0x54, 0x0d, 0x40 -}; - -const uint8_t kMaskRandom48_11[66] = { - 0x53, 0x65, 0x34, 0x53, 0x65, 0x34, - 0xa0, 0x32, 0x11, 0xa0, 0x32, 0x11, - 0x15, 0x11, 0x41, 0x15, 0x11, 0x41, - 0x03, 0x50, 0x15, 0x03, 0x50, 0x15, - 0x8c, 0x88, 0xc8, 0x8c, 0x88, 0xc8, - 0x28, 0x82, 0x88, 0x28, 0x82, 0x88, - 0x08, 0x48, 0x84, 0x08, 0x48, 0x84, - 0x99, 0x01, 0x90, 0x99, 0x01, 0x90, - 0x22, 0x92, 0x29, 0x22, 0x92, 0x29, - 0x46, 0x04, 0x60, 0x46, 0x04, 0x60, - 0x8c, 0x2c, 0x02, 0x8c, 0x2c, 0x02 -}; - -const uint8_t kMaskRandom48_12[72] = { - 0x10, 0x61, 0x06, 0x10, 0x61, 0x06, - 0x02, 0x30, 0x23, 0x02, 0x30, 0x23, - 0x40, 0x54, 0x05, 0x40, 0x54, 0x05, - 0x21, 0x82, 0x18, 0x21, 0x82, 0x18, - 0x81, 0x18, 0x11, 0x81, 0x18, 0x11, - 0x14, 0x81, 0x48, 0x14, 0x81, 0x48, - 0x98, 0x09, 0x80, 0x98, 0x09, 0x80, - 0x08, 0x90, 0x89, 0x08, 0x90, 0x89, - 0x62, 0x06, 0x20, 0x62, 0x06, 0x20, - 0x24, 0x22, 0x42, 0x24, 0x22, 0x42, - 0x8a, 0x08, 0xa0, 0x8a, 0x08, 0xa0, - 0x84, 0x48, 0x44, 0x84, 0x48, 0x44 -}; - -const uint8_t kMaskRandom48_13[78] = { - 0x51, 0x45, 0x14, 0x51, 0x45, 0x14, - 0xc5, 0x1c, 0x51, 0xc5, 0x1c, 0x51, - 0x21, 0x82, 0x18, 0x21, 0x82, 0x18, - 0x12, 0x31, 0x23, 0x12, 0x31, 0x23, - 0x08, 0xe0, 0x8e, 0x08, 0xe0, 0x8e, - 0x2e, 0x02, 0xe0, 0x2e, 0x02, 0xe0, - 0x53, 0x65, 0x36, 0x53, 0x65, 0x36, - 0x21, 0x32, 0x13, 0x21, 0x32, 0x13, - 0x90, 0x99, 0x09, 0x90, 0x99, 0x09, - 0x02, 0x50, 0x25, 0x02, 0x50, 0x25, - 0x06, 0xa0, 0x6a, 0x06, 0xa0, 0x6a, - 0x2c, 0x02, 0xc0, 0x2c, 0x02, 0xc0, - 0x88, 0x68, 0x86, 0x88, 0x68, 0x86 -}; - -const uint8_t kMaskRandom48_14[84] = { - 0x53, 0x65, 0x36, 0x53, 0x65, 0x36, - 0x21, 0x32, 0x13, 0x21, 0x32, 0x13, - 0x90, 0x99, 0x09, 0x90, 0x99, 0x09, - 0x02, 0x50, 0x25, 0x02, 0x50, 0x25, - 0x06, 0xa0, 0x6a, 0x06, 0xa0, 0x6a, - 0x2c, 0x02, 0xc0, 0x2c, 0x02, 0xc0, - 0x88, 0x68, 0x86, 0x88, 0x68, 0x86, - 0x51, 0x45, 0x14, 0x51, 0x45, 0x14, - 0xc5, 0x1c, 0x51, 0xc5, 0x1c, 0x51, - 0x21, 0x82, 0x18, 0x21, 0x82, 0x18, - 0x12, 0x31, 0x23, 0x12, 0x31, 0x23, - 0x08, 0xe0, 0x8e, 0x08, 0xe0, 0x8e, - 0x2e, 0x02, 0xe0, 0x2e, 0x02, 0xe0, - 0xf2, 0xd6, 0x8e, 0xf2, 0xd6, 0x8e -}; - -const uint8_t kMaskRandom48_15[90] = { - 0x53, 0x65, 0x36, 0x53, 0x65, 0x36, - 0x21, 0x32, 0x13, 0x21, 0x32, 0x13, - 0x90, 0x99, 0x09, 0x90, 0x99, 0x09, - 0x02, 0x50, 0x25, 0x02, 0x50, 0x25, - 0x06, 0xa0, 0x6a, 0x06, 0xa0, 0x6a, - 0x2c, 0x02, 0xc0, 0x2c, 0x02, 0xc0, - 0x88, 0x68, 0x86, 0x88, 0x68, 0x86, - 0x20, 0x62, 0x06, 0x20, 0x62, 0x06, - 0x80, 0x38, 0x03, 0x80, 0x38, 0x03, - 0x42, 0x44, 0x24, 0x42, 0x44, 0x24, - 0x01, 0x90, 0x19, 0x01, 0x90, 0x19, - 0x14, 0x11, 0x41, 0x14, 0x11, 0x41, - 0x0a, 0x80, 0xa8, 0x0a, 0x80, 0xa8, - 0x38, 0x03, 0x80, 0x38, 0x03, 0x80, - 0xc5, 0x0c, 0x50, 0xc5, 0x0c, 0x50 -}; - -const uint8_t kMaskRandom48_16[96] = { - 0x20, 0x62, 0x06, 0x20, 0x62, 0x06, - 0x80, 0x38, 0x03, 0x80, 0x38, 0x03, - 0x42, 0x44, 0x24, 0x42, 0x44, 0x24, - 0x01, 0x90, 0x19, 0x01, 0x90, 0x19, - 0x14, 0x11, 0x41, 0x14, 0x11, 0x41, - 0x0a, 0x80, 0xa8, 0x0a, 0x80, 0xa8, - 0x38, 0x03, 0x80, 0x38, 0x03, 0x80, - 0xc5, 0x0c, 0x50, 0xc5, 0x0c, 0x50, - 0x53, 0x65, 0x36, 0x53, 0x65, 0x36, - 0x21, 0x32, 0x13, 0x21, 0x32, 0x13, - 0x90, 0x99, 0x09, 0x90, 0x99, 0x09, - 0x02, 0x50, 0x25, 0x02, 0x50, 0x25, - 0x06, 0xa0, 0x6a, 0x06, 0xa0, 0x6a, - 0x2c, 0x02, 0xc0, 0x2c, 0x02, 0xc0, - 0x88, 0x68, 0x86, 0x88, 0x68, 0x86, - 0xff, 0x6e, 0x0a, 0xff, 0x6e, 0x0a -}; - -const uint8_t kMaskRandom48_17[102] = { - 0x20, 0x62, 0x06, 0x20, 0x62, 0x06, - 0x80, 0x38, 0x03, 0x80, 0x38, 0x03, - 0x42, 0x44, 0x24, 0x42, 0x44, 0x24, - 0x01, 0x90, 0x19, 0x01, 0x90, 0x19, - 0x14, 0x11, 0x41, 0x14, 0x11, 0x41, - 0x0a, 0x80, 0xa8, 0x0a, 0x80, 0xa8, - 0x38, 0x03, 0x80, 0x38, 0x03, 0x80, - 0xc5, 0x0c, 0x50, 0xc5, 0x0c, 0x50, - 0x53, 0x65, 0x36, 0x53, 0x65, 0x36, - 0xe4, 0x2e, 0x42, 0xe4, 0x2e, 0x42, - 0x24, 0x42, 0x44, 0x24, 0x42, 0x44, - 0xa1, 0x1a, 0x11, 0xa1, 0x1a, 0x11, - 0x18, 0x31, 0x83, 0x18, 0x31, 0x83, - 0x03, 0x90, 0x39, 0x03, 0x90, 0x39, - 0x8a, 0x18, 0xa1, 0x8a, 0x18, 0xa1, - 0x04, 0x90, 0x49, 0x04, 0x90, 0x49, - 0x00, 0xe0, 0x0e, 0x00, 0xe0, 0x0e -}; - -const uint8_t kMaskRandom48_18[108] = { - 0x53, 0x65, 0x36, 0x53, 0x65, 0x36, - 0xe4, 0x2e, 0x42, 0xe4, 0x2e, 0x42, - 0x24, 0x42, 0x44, 0x24, 0x42, 0x44, - 0xa1, 0x1a, 0x11, 0xa1, 0x1a, 0x11, - 0x18, 0x31, 0x83, 0x18, 0x31, 0x83, - 0x03, 0x90, 0x39, 0x03, 0x90, 0x39, - 0x8a, 0x18, 0xa1, 0x8a, 0x18, 0xa1, - 0x04, 0x90, 0x49, 0x04, 0x90, 0x49, - 0x00, 0xe0, 0x0e, 0x00, 0xe0, 0x0e, - 0x20, 0x62, 0x06, 0x20, 0x62, 0x06, - 0x80, 0x38, 0x03, 0x80, 0x38, 0x03, - 0x42, 0x44, 0x24, 0x42, 0x44, 0x24, - 0x01, 0x90, 0x19, 0x01, 0x90, 0x19, - 0x14, 0x11, 0x41, 0x14, 0x11, 0x41, - 0x0a, 0x80, 0xa8, 0x0a, 0x80, 0xa8, - 0x38, 0x03, 0x80, 0x38, 0x03, 0x80, - 0xc5, 0x0c, 0x50, 0xc5, 0x0c, 0x50, - 0x34, 0x50, 0xae, 0x34, 0x50, 0xae -}; - -const uint8_t kMaskRandom48_19[114] = { - 0x53, 0x65, 0x36, 0x53, 0x65, 0x36, - 0xe4, 0x2e, 0x42, 0xe4, 0x2e, 0x42, - 0x24, 0x42, 0x44, 0x24, 0x42, 0x44, - 0xa1, 0x1a, 0x11, 0xa1, 0x1a, 0x11, - 0x18, 0x31, 0x83, 0x18, 0x31, 0x83, - 0x03, 0x90, 0x39, 0x03, 0x90, 0x39, - 0x8a, 0x18, 0xa1, 0x8a, 0x18, 0xa1, - 0x04, 0x90, 0x49, 0x04, 0x90, 0x49, - 0x00, 0xe0, 0x0e, 0x00, 0xe0, 0x0e, - 0x51, 0x45, 0x14, 0x51, 0x45, 0x14, - 0x45, 0x14, 0x51, 0x45, 0x14, 0x51, - 0x80, 0xd8, 0x0d, 0x80, 0xd8, 0x0d, - 0x24, 0x22, 0x42, 0x24, 0x22, 0x42, - 0x0a, 0x20, 0xa2, 0x0a, 0x20, 0xa2, - 0x00, 0xe0, 0x0e, 0x00, 0xe0, 0x0e, - 0xb8, 0x0b, 0x80, 0xb8, 0x0b, 0x80, - 0x09, 0x10, 0x91, 0x09, 0x10, 0x91, - 0x56, 0x05, 0x60, 0x56, 0x05, 0x60, - 0xa2, 0x8a, 0x28, 0xa2, 0x8a, 0x28 -}; - -const uint8_t kMaskRandom48_2[12] = { - 0xec, 0xce, 0xcc, 0xec, 0xce, 0xcc, - 0x93, 0xb9, 0x3b, 0x93, 0xb9, 0x3b -}; - -const uint8_t kMaskRandom48_20[120] = { - 0x51, 0x45, 0x14, 0x51, 0x45, 0x14, - 0x45, 0x14, 0x51, 0x45, 0x14, 0x51, - 0x80, 0xd8, 0x0d, 0x80, 0xd8, 0x0d, - 0x24, 0x22, 0x42, 0x24, 0x22, 0x42, - 0x0a, 0x20, 0xa2, 0x0a, 0x20, 0xa2, - 0x00, 0xe0, 0x0e, 0x00, 0xe0, 0x0e, - 0xb8, 0x0b, 0x80, 0xb8, 0x0b, 0x80, - 0x09, 0x10, 0x91, 0x09, 0x10, 0x91, - 0x56, 0x05, 0x60, 0x56, 0x05, 0x60, - 0xa2, 0x8a, 0x28, 0xa2, 0x8a, 0x28, - 0x53, 0x65, 0x36, 0x53, 0x65, 0x36, - 0xe4, 0x2e, 0x42, 0xe4, 0x2e, 0x42, - 0x24, 0x42, 0x44, 0x24, 0x42, 0x44, - 0xa1, 0x1a, 0x11, 0xa1, 0x1a, 0x11, - 0x18, 0x31, 0x83, 0x18, 0x31, 0x83, - 0x03, 0x90, 0x39, 0x03, 0x90, 0x39, - 0x8a, 0x18, 0xa1, 0x8a, 0x18, 0xa1, - 0x04, 0x90, 0x49, 0x04, 0x90, 0x49, - 0x00, 0xe0, 0x0e, 0x00, 0xe0, 0x0e, - 0x98, 0xa2, 0x95, 0x98, 0xa2, 0x95 -}; - -const uint8_t kMaskRandom48_21[126] = { - 0x51, 0x45, 0x14, 0x51, 0x45, 0x14, - 0x45, 0x14, 0x51, 0x45, 0x14, 0x51, - 0x80, 0xd8, 0x0d, 0x80, 0xd8, 0x0d, - 0x24, 0x22, 0x42, 0x24, 0x22, 0x42, - 0x0a, 0x20, 0xa2, 0x0a, 0x20, 0xa2, - 0x00, 0xe0, 0x0e, 0x00, 0xe0, 0x0e, - 0xb8, 0x0b, 0x80, 0xb8, 0x0b, 0x80, - 0x09, 0x10, 0x91, 0x09, 0x10, 0x91, - 0x56, 0x05, 0x60, 0x56, 0x05, 0x60, - 0xa2, 0x8a, 0x28, 0xa2, 0x8a, 0x28, - 0x53, 0x65, 0x36, 0x53, 0x65, 0x36, - 0x21, 0x32, 0x13, 0x21, 0x32, 0x13, - 0x10, 0x91, 0x09, 0x10, 0x91, 0x09, - 0x00, 0x70, 0x07, 0x00, 0x70, 0x07, - 0x0c, 0x10, 0xc1, 0x0c, 0x10, 0xc1, - 0x40, 0xc4, 0x0c, 0x40, 0xc4, 0x0c, - 0x6a, 0x06, 0xa0, 0x6a, 0x06, 0xa0, - 0x86, 0x08, 0x60, 0x86, 0x08, 0x60, - 0x24, 0x82, 0x48, 0x24, 0x82, 0x48, - 0x89, 0x08, 0x90, 0x89, 0x08, 0x90, - 0xc0, 0x2c, 0x02, 0xc0, 0x2c, 0x02 -}; - -const uint8_t kMaskRandom48_22[132] = { - 0x53, 0x65, 0x36, 0x53, 0x65, 0x36, - 0x21, 0x32, 0x13, 0x21, 0x32, 0x13, - 0x10, 0x91, 0x09, 0x10, 0x91, 0x09, - 0x00, 0x70, 0x07, 0x00, 0x70, 0x07, - 0x0c, 0x10, 0xc1, 0x0c, 0x10, 0xc1, - 0x40, 0xc4, 0x0c, 0x40, 0xc4, 0x0c, - 0x6a, 0x06, 0xa0, 0x6a, 0x06, 0xa0, - 0x86, 0x08, 0x60, 0x86, 0x08, 0x60, - 0x24, 0x82, 0x48, 0x24, 0x82, 0x48, - 0x89, 0x08, 0x90, 0x89, 0x08, 0x90, - 0xc0, 0x2c, 0x02, 0xc0, 0x2c, 0x02, - 0x51, 0x45, 0x14, 0x51, 0x45, 0x14, - 0x45, 0x14, 0x51, 0x45, 0x14, 0x51, - 0x80, 0xd8, 0x0d, 0x80, 0xd8, 0x0d, - 0x24, 0x22, 0x42, 0x24, 0x22, 0x42, - 0x0a, 0x20, 0xa2, 0x0a, 0x20, 0xa2, - 0x00, 0xe0, 0x0e, 0x00, 0xe0, 0x0e, - 0xb8, 0x0b, 0x80, 0xb8, 0x0b, 0x80, - 0x09, 0x10, 0x91, 0x09, 0x10, 0x91, - 0x56, 0x05, 0x60, 0x56, 0x05, 0x60, - 0xa2, 0x8a, 0x28, 0xa2, 0x8a, 0x28, - 0x1a, 0xaa, 0xee, 0x1a, 0xaa, 0xee -}; - -const uint8_t kMaskRandom48_23[138] = { - 0x53, 0x65, 0x36, 0x53, 0x65, 0x36, - 0x21, 0x32, 0x13, 0x21, 0x32, 0x13, - 0x10, 0x91, 0x09, 0x10, 0x91, 0x09, - 0x00, 0x70, 0x07, 0x00, 0x70, 0x07, - 0x0c, 0x10, 0xc1, 0x0c, 0x10, 0xc1, - 0x40, 0xc4, 0x0c, 0x40, 0xc4, 0x0c, - 0x6a, 0x06, 0xa0, 0x6a, 0x06, 0xa0, - 0x86, 0x08, 0x60, 0x86, 0x08, 0x60, - 0x24, 0x82, 0x48, 0x24, 0x82, 0x48, - 0x89, 0x08, 0x90, 0x89, 0x08, 0x90, - 0xc0, 0x2c, 0x02, 0xc0, 0x2c, 0x02, - 0x10, 0x61, 0x06, 0x10, 0x61, 0x06, - 0x02, 0x30, 0x23, 0x02, 0x30, 0x23, - 0x40, 0x54, 0x05, 0x40, 0x54, 0x05, - 0x21, 0x82, 0x18, 0x21, 0x82, 0x18, - 0x81, 0x18, 0x11, 0x81, 0x18, 0x11, - 0x14, 0x81, 0x48, 0x14, 0x81, 0x48, - 0x98, 0x09, 0x80, 0x98, 0x09, 0x80, - 0x08, 0x90, 0x89, 0x08, 0x90, 0x89, - 0x62, 0x06, 0x20, 0x62, 0x06, 0x20, - 0x24, 0x22, 0x42, 0x24, 0x22, 0x42, - 0x8a, 0x08, 0xa0, 0x8a, 0x08, 0xa0, - 0x84, 0x48, 0x44, 0x84, 0x48, 0x44 -}; - -const uint8_t kMaskRandom48_24[144] = { - 0x10, 0x61, 0x06, 0x10, 0x61, 0x06, - 0x02, 0x30, 0x23, 0x02, 0x30, 0x23, - 0x40, 0x54, 0x05, 0x40, 0x54, 0x05, - 0x21, 0x82, 0x18, 0x21, 0x82, 0x18, - 0x81, 0x18, 0x11, 0x81, 0x18, 0x11, - 0x14, 0x81, 0x48, 0x14, 0x81, 0x48, - 0x98, 0x09, 0x80, 0x98, 0x09, 0x80, - 0x08, 0x90, 0x89, 0x08, 0x90, 0x89, - 0x62, 0x06, 0x20, 0x62, 0x06, 0x20, - 0x24, 0x22, 0x42, 0x24, 0x22, 0x42, - 0x8a, 0x08, 0xa0, 0x8a, 0x08, 0xa0, - 0x84, 0x48, 0x44, 0x84, 0x48, 0x44, - 0x53, 0x65, 0x36, 0x53, 0x65, 0x36, - 0x21, 0x32, 0x13, 0x21, 0x32, 0x13, - 0x10, 0x91, 0x09, 0x10, 0x91, 0x09, - 0x00, 0x70, 0x07, 0x00, 0x70, 0x07, - 0x0c, 0x10, 0xc1, 0x0c, 0x10, 0xc1, - 0x40, 0xc4, 0x0c, 0x40, 0xc4, 0x0c, - 0x6a, 0x06, 0xa0, 0x6a, 0x06, 0xa0, - 0x86, 0x08, 0x60, 0x86, 0x08, 0x60, - 0x24, 0x82, 0x48, 0x24, 0x82, 0x48, - 0x89, 0x08, 0x90, 0x89, 0x08, 0x90, - 0xc0, 0x2c, 0x02, 0xc0, 0x2c, 0x02, - 0x88, 0x32, 0x59, 0x88, 0x32, 0x59 -}; - -const uint8_t kMaskRandom48_25[150] = { - 0x10, 0x61, 0x06, 0x10, 0x61, 0x06, - 0x02, 0x30, 0x23, 0x02, 0x30, 0x23, - 0x40, 0x54, 0x05, 0x40, 0x54, 0x05, - 0x21, 0x82, 0x18, 0x21, 0x82, 0x18, - 0x81, 0x18, 0x11, 0x81, 0x18, 0x11, - 0x14, 0x81, 0x48, 0x14, 0x81, 0x48, - 0x98, 0x09, 0x80, 0x98, 0x09, 0x80, - 0x08, 0x90, 0x89, 0x08, 0x90, 0x89, - 0x62, 0x06, 0x20, 0x62, 0x06, 0x20, - 0x24, 0x22, 0x42, 0x24, 0x22, 0x42, - 0x8a, 0x08, 0xa0, 0x8a, 0x08, 0xa0, - 0x84, 0x48, 0x44, 0x84, 0x48, 0x44, - 0x51, 0x45, 0x14, 0x51, 0x45, 0x14, - 0xc5, 0x1c, 0x51, 0xc5, 0x1c, 0x51, - 0x21, 0x82, 0x18, 0x21, 0x82, 0x18, - 0x12, 0x31, 0x23, 0x12, 0x31, 0x23, - 0x08, 0xe0, 0x8e, 0x08, 0xe0, 0x8e, - 0x2e, 0x02, 0xe0, 0x2e, 0x02, 0xe0, - 0x53, 0x65, 0x36, 0x53, 0x65, 0x36, - 0x21, 0x32, 0x13, 0x21, 0x32, 0x13, - 0x90, 0x99, 0x09, 0x90, 0x99, 0x09, - 0x02, 0x50, 0x25, 0x02, 0x50, 0x25, - 0x06, 0xa0, 0x6a, 0x06, 0xa0, 0x6a, - 0x2c, 0x02, 0xc0, 0x2c, 0x02, 0xc0, - 0x88, 0x68, 0x86, 0x88, 0x68, 0x86 -}; - -const uint8_t kMaskRandom48_26[156] = { - 0x51, 0x45, 0x14, 0x51, 0x45, 0x14, - 0xc5, 0x1c, 0x51, 0xc5, 0x1c, 0x51, - 0x21, 0x82, 0x18, 0x21, 0x82, 0x18, - 0x12, 0x31, 0x23, 0x12, 0x31, 0x23, - 0x08, 0xe0, 0x8e, 0x08, 0xe0, 0x8e, - 0x2e, 0x02, 0xe0, 0x2e, 0x02, 0xe0, - 0x53, 0x65, 0x36, 0x53, 0x65, 0x36, - 0x21, 0x32, 0x13, 0x21, 0x32, 0x13, - 0x90, 0x99, 0x09, 0x90, 0x99, 0x09, - 0x02, 0x50, 0x25, 0x02, 0x50, 0x25, - 0x06, 0xa0, 0x6a, 0x06, 0xa0, 0x6a, - 0x2c, 0x02, 0xc0, 0x2c, 0x02, 0xc0, - 0x88, 0x68, 0x86, 0x88, 0x68, 0x86, - 0x10, 0x61, 0x06, 0x10, 0x61, 0x06, - 0x02, 0x30, 0x23, 0x02, 0x30, 0x23, - 0x40, 0x54, 0x05, 0x40, 0x54, 0x05, - 0x21, 0x82, 0x18, 0x21, 0x82, 0x18, - 0x81, 0x18, 0x11, 0x81, 0x18, 0x11, - 0x14, 0x81, 0x48, 0x14, 0x81, 0x48, - 0x98, 0x09, 0x80, 0x98, 0x09, 0x80, - 0x08, 0x90, 0x89, 0x08, 0x90, 0x89, - 0x62, 0x06, 0x20, 0x62, 0x06, 0x20, - 0x24, 0x22, 0x42, 0x24, 0x22, 0x42, - 0x8a, 0x08, 0xa0, 0x8a, 0x08, 0xa0, - 0x84, 0x48, 0x44, 0x84, 0x48, 0x44, - 0x3e, 0x20, 0x79, 0xe5, 0x55, 0x70 -}; - -const uint8_t kMaskRandom48_27[162] = { - 0x51, 0x45, 0x14, 0x51, 0x45, 0x14, - 0xc5, 0x1c, 0x51, 0xc5, 0x1c, 0x51, - 0x21, 0x82, 0x18, 0x21, 0x82, 0x18, - 0x12, 0x31, 0x23, 0x12, 0x31, 0x23, - 0x08, 0xe0, 0x8e, 0x08, 0xe0, 0x8e, - 0x2e, 0x02, 0xe0, 0x2e, 0x02, 0xe0, - 0x53, 0x65, 0x36, 0x53, 0x65, 0x36, - 0x21, 0x32, 0x13, 0x21, 0x32, 0x13, - 0x90, 0x99, 0x09, 0x90, 0x99, 0x09, - 0x02, 0x50, 0x25, 0x02, 0x50, 0x25, - 0x06, 0xa0, 0x6a, 0x06, 0xa0, 0x6a, - 0x2c, 0x02, 0xc0, 0x2c, 0x02, 0xc0, - 0x88, 0x68, 0x86, 0x88, 0x68, 0x86, - 0x53, 0x65, 0x36, 0x53, 0x65, 0x36, - 0x21, 0x32, 0x13, 0x21, 0x32, 0x13, - 0x90, 0x99, 0x09, 0x90, 0x99, 0x09, - 0x02, 0x50, 0x25, 0x02, 0x50, 0x25, - 0x06, 0xa0, 0x6a, 0x06, 0xa0, 0x6a, - 0x2c, 0x02, 0xc0, 0x2c, 0x02, 0xc0, - 0x88, 0x68, 0x86, 0x88, 0x68, 0x86, - 0x51, 0x45, 0x14, 0x51, 0x45, 0x14, - 0xc5, 0x1c, 0x51, 0xc5, 0x1c, 0x51, - 0x21, 0x82, 0x18, 0x21, 0x82, 0x18, - 0x12, 0x31, 0x23, 0x12, 0x31, 0x23, - 0x08, 0xe0, 0x8e, 0x08, 0xe0, 0x8e, - 0x2e, 0x02, 0xe0, 0x2e, 0x02, 0xe0, - 0xf2, 0xd6, 0x8e, 0xf2, 0xd6, 0x8e -}; - -const uint8_t kMaskRandom48_28[168] = { - 0x53, 0x65, 0x36, 0x53, 0x65, 0x36, - 0x21, 0x32, 0x13, 0x21, 0x32, 0x13, - 0x90, 0x99, 0x09, 0x90, 0x99, 0x09, - 0x02, 0x50, 0x25, 0x02, 0x50, 0x25, - 0x06, 0xa0, 0x6a, 0x06, 0xa0, 0x6a, - 0x2c, 0x02, 0xc0, 0x2c, 0x02, 0xc0, - 0x88, 0x68, 0x86, 0x88, 0x68, 0x86, - 0x51, 0x45, 0x14, 0x51, 0x45, 0x14, - 0xc5, 0x1c, 0x51, 0xc5, 0x1c, 0x51, - 0x21, 0x82, 0x18, 0x21, 0x82, 0x18, - 0x12, 0x31, 0x23, 0x12, 0x31, 0x23, - 0x08, 0xe0, 0x8e, 0x08, 0xe0, 0x8e, - 0x2e, 0x02, 0xe0, 0x2e, 0x02, 0xe0, - 0xf2, 0xd6, 0x8e, 0xf2, 0xd6, 0x8e, - 0x51, 0x45, 0x14, 0x51, 0x45, 0x14, - 0xc5, 0x1c, 0x51, 0xc5, 0x1c, 0x51, - 0x21, 0x82, 0x18, 0x21, 0x82, 0x18, - 0x12, 0x31, 0x23, 0x12, 0x31, 0x23, - 0x08, 0xe0, 0x8e, 0x08, 0xe0, 0x8e, - 0x2e, 0x02, 0xe0, 0x2e, 0x02, 0xe0, - 0x53, 0x65, 0x36, 0x53, 0x65, 0x36, - 0x21, 0x32, 0x13, 0x21, 0x32, 0x13, - 0x90, 0x99, 0x09, 0x90, 0x99, 0x09, - 0x02, 0x50, 0x25, 0x02, 0x50, 0x25, - 0x06, 0xa0, 0x6a, 0x06, 0xa0, 0x6a, - 0x2c, 0x02, 0xc0, 0x2c, 0x02, 0xc0, - 0x88, 0x68, 0x86, 0x88, 0x68, 0x86, - 0x32, 0xe3, 0xc0, 0x4a, 0xf2, 0x2a -}; - -const uint8_t kMaskRandom48_29[174] = { - 0x53, 0x65, 0x36, 0x53, 0x65, 0x36, - 0x21, 0x32, 0x13, 0x21, 0x32, 0x13, - 0x90, 0x99, 0x09, 0x90, 0x99, 0x09, - 0x02, 0x50, 0x25, 0x02, 0x50, 0x25, - 0x06, 0xa0, 0x6a, 0x06, 0xa0, 0x6a, - 0x2c, 0x02, 0xc0, 0x2c, 0x02, 0xc0, - 0x88, 0x68, 0x86, 0x88, 0x68, 0x86, - 0x51, 0x45, 0x14, 0x51, 0x45, 0x14, - 0xc5, 0x1c, 0x51, 0xc5, 0x1c, 0x51, - 0x21, 0x82, 0x18, 0x21, 0x82, 0x18, - 0x12, 0x31, 0x23, 0x12, 0x31, 0x23, - 0x08, 0xe0, 0x8e, 0x08, 0xe0, 0x8e, - 0x2e, 0x02, 0xe0, 0x2e, 0x02, 0xe0, - 0xf2, 0xd6, 0x8e, 0xf2, 0xd6, 0x8e, - 0x53, 0x65, 0x36, 0x53, 0x65, 0x36, - 0x21, 0x32, 0x13, 0x21, 0x32, 0x13, - 0x90, 0x99, 0x09, 0x90, 0x99, 0x09, - 0x02, 0x50, 0x25, 0x02, 0x50, 0x25, - 0x06, 0xa0, 0x6a, 0x06, 0xa0, 0x6a, - 0x2c, 0x02, 0xc0, 0x2c, 0x02, 0xc0, - 0x88, 0x68, 0x86, 0x88, 0x68, 0x86, - 0x20, 0x62, 0x06, 0x20, 0x62, 0x06, - 0x80, 0x38, 0x03, 0x80, 0x38, 0x03, - 0x42, 0x44, 0x24, 0x42, 0x44, 0x24, - 0x01, 0x90, 0x19, 0x01, 0x90, 0x19, - 0x14, 0x11, 0x41, 0x14, 0x11, 0x41, - 0x0a, 0x80, 0xa8, 0x0a, 0x80, 0xa8, - 0x38, 0x03, 0x80, 0x38, 0x03, 0x80, - 0xc5, 0x0c, 0x50, 0xc5, 0x0c, 0x50 -}; - -const uint8_t kMaskRandom48_3[18] = { - 0x9b, 0x29, 0xb2, 0x9b, 0x29, 0xb2, - 0x49, 0xd4, 0x9d, 0x49, 0xd4, 0x9d, - 0x3e, 0x83, 0xe8, 0x3e, 0x83, 0xe8 -}; - -const uint8_t kMaskRandom48_30[180] = { - 0x53, 0x65, 0x36, 0x53, 0x65, 0x36, - 0x21, 0x32, 0x13, 0x21, 0x32, 0x13, - 0x90, 0x99, 0x09, 0x90, 0x99, 0x09, - 0x02, 0x50, 0x25, 0x02, 0x50, 0x25, - 0x06, 0xa0, 0x6a, 0x06, 0xa0, 0x6a, - 0x2c, 0x02, 0xc0, 0x2c, 0x02, 0xc0, - 0x88, 0x68, 0x86, 0x88, 0x68, 0x86, - 0x20, 0x62, 0x06, 0x20, 0x62, 0x06, - 0x80, 0x38, 0x03, 0x80, 0x38, 0x03, - 0x42, 0x44, 0x24, 0x42, 0x44, 0x24, - 0x01, 0x90, 0x19, 0x01, 0x90, 0x19, - 0x14, 0x11, 0x41, 0x14, 0x11, 0x41, - 0x0a, 0x80, 0xa8, 0x0a, 0x80, 0xa8, - 0x38, 0x03, 0x80, 0x38, 0x03, 0x80, - 0xc5, 0x0c, 0x50, 0xc5, 0x0c, 0x50, - 0x53, 0x65, 0x36, 0x53, 0x65, 0x36, - 0x21, 0x32, 0x13, 0x21, 0x32, 0x13, - 0x90, 0x99, 0x09, 0x90, 0x99, 0x09, - 0x02, 0x50, 0x25, 0x02, 0x50, 0x25, - 0x06, 0xa0, 0x6a, 0x06, 0xa0, 0x6a, - 0x2c, 0x02, 0xc0, 0x2c, 0x02, 0xc0, - 0x88, 0x68, 0x86, 0x88, 0x68, 0x86, - 0x51, 0x45, 0x14, 0x51, 0x45, 0x14, - 0xc5, 0x1c, 0x51, 0xc5, 0x1c, 0x51, - 0x21, 0x82, 0x18, 0x21, 0x82, 0x18, - 0x12, 0x31, 0x23, 0x12, 0x31, 0x23, - 0x08, 0xe0, 0x8e, 0x08, 0xe0, 0x8e, - 0x2e, 0x02, 0xe0, 0x2e, 0x02, 0xe0, - 0xf2, 0xd6, 0x8e, 0xf2, 0xd6, 0x8e, - 0x66, 0xf3, 0x9a, 0xdd, 0x68, 0x93 -}; - -const uint8_t kMaskRandom48_31[186] = { - 0x53, 0x65, 0x36, 0x53, 0x65, 0x36, - 0x21, 0x32, 0x13, 0x21, 0x32, 0x13, - 0x90, 0x99, 0x09, 0x90, 0x99, 0x09, - 0x02, 0x50, 0x25, 0x02, 0x50, 0x25, - 0x06, 0xa0, 0x6a, 0x06, 0xa0, 0x6a, - 0x2c, 0x02, 0xc0, 0x2c, 0x02, 0xc0, - 0x88, 0x68, 0x86, 0x88, 0x68, 0x86, - 0x20, 0x62, 0x06, 0x20, 0x62, 0x06, - 0x80, 0x38, 0x03, 0x80, 0x38, 0x03, - 0x42, 0x44, 0x24, 0x42, 0x44, 0x24, - 0x01, 0x90, 0x19, 0x01, 0x90, 0x19, - 0x14, 0x11, 0x41, 0x14, 0x11, 0x41, - 0x0a, 0x80, 0xa8, 0x0a, 0x80, 0xa8, - 0x38, 0x03, 0x80, 0x38, 0x03, 0x80, - 0xc5, 0x0c, 0x50, 0xc5, 0x0c, 0x50, - 0x20, 0x62, 0x06, 0x20, 0x62, 0x06, - 0x80, 0x38, 0x03, 0x80, 0x38, 0x03, - 0x42, 0x44, 0x24, 0x42, 0x44, 0x24, - 0x01, 0x90, 0x19, 0x01, 0x90, 0x19, - 0x14, 0x11, 0x41, 0x14, 0x11, 0x41, - 0x0a, 0x80, 0xa8, 0x0a, 0x80, 0xa8, - 0x38, 0x03, 0x80, 0x38, 0x03, 0x80, - 0xc5, 0x0c, 0x50, 0xc5, 0x0c, 0x50, - 0x53, 0x65, 0x36, 0x53, 0x65, 0x36, - 0x21, 0x32, 0x13, 0x21, 0x32, 0x13, - 0x90, 0x99, 0x09, 0x90, 0x99, 0x09, - 0x02, 0x50, 0x25, 0x02, 0x50, 0x25, - 0x06, 0xa0, 0x6a, 0x06, 0xa0, 0x6a, - 0x2c, 0x02, 0xc0, 0x2c, 0x02, 0xc0, - 0x88, 0x68, 0x86, 0x88, 0x68, 0x86, - 0xff, 0x6e, 0x0a, 0xff, 0x6e, 0x0a -}; - -const uint8_t kMaskRandom48_32[192] = { - 0x20, 0x62, 0x06, 0x20, 0x62, 0x06, - 0x80, 0x38, 0x03, 0x80, 0x38, 0x03, - 0x42, 0x44, 0x24, 0x42, 0x44, 0x24, - 0x01, 0x90, 0x19, 0x01, 0x90, 0x19, - 0x14, 0x11, 0x41, 0x14, 0x11, 0x41, - 0x0a, 0x80, 0xa8, 0x0a, 0x80, 0xa8, - 0x38, 0x03, 0x80, 0x38, 0x03, 0x80, - 0xc5, 0x0c, 0x50, 0xc5, 0x0c, 0x50, - 0x53, 0x65, 0x36, 0x53, 0x65, 0x36, - 0x21, 0x32, 0x13, 0x21, 0x32, 0x13, - 0x90, 0x99, 0x09, 0x90, 0x99, 0x09, - 0x02, 0x50, 0x25, 0x02, 0x50, 0x25, - 0x06, 0xa0, 0x6a, 0x06, 0xa0, 0x6a, - 0x2c, 0x02, 0xc0, 0x2c, 0x02, 0xc0, - 0x88, 0x68, 0x86, 0x88, 0x68, 0x86, - 0xff, 0x6e, 0x0a, 0xff, 0x6e, 0x0a, - 0x53, 0x65, 0x36, 0x53, 0x65, 0x36, - 0x21, 0x32, 0x13, 0x21, 0x32, 0x13, - 0x90, 0x99, 0x09, 0x90, 0x99, 0x09, - 0x02, 0x50, 0x25, 0x02, 0x50, 0x25, - 0x06, 0xa0, 0x6a, 0x06, 0xa0, 0x6a, - 0x2c, 0x02, 0xc0, 0x2c, 0x02, 0xc0, - 0x88, 0x68, 0x86, 0x88, 0x68, 0x86, - 0x20, 0x62, 0x06, 0x20, 0x62, 0x06, - 0x80, 0x38, 0x03, 0x80, 0x38, 0x03, - 0x42, 0x44, 0x24, 0x42, 0x44, 0x24, - 0x01, 0x90, 0x19, 0x01, 0x90, 0x19, - 0x14, 0x11, 0x41, 0x14, 0x11, 0x41, - 0x0a, 0x80, 0xa8, 0x0a, 0x80, 0xa8, - 0x38, 0x03, 0x80, 0x38, 0x03, 0x80, - 0xc5, 0x0c, 0x50, 0xc5, 0x0c, 0x50, - 0xd5, 0x4a, 0x4f, 0x48, 0xb5, 0x31 -}; - -const uint8_t kMaskRandom48_33[198] = { - 0x20, 0x62, 0x06, 0x20, 0x62, 0x06, - 0x80, 0x38, 0x03, 0x80, 0x38, 0x03, - 0x42, 0x44, 0x24, 0x42, 0x44, 0x24, - 0x01, 0x90, 0x19, 0x01, 0x90, 0x19, - 0x14, 0x11, 0x41, 0x14, 0x11, 0x41, - 0x0a, 0x80, 0xa8, 0x0a, 0x80, 0xa8, - 0x38, 0x03, 0x80, 0x38, 0x03, 0x80, - 0xc5, 0x0c, 0x50, 0xc5, 0x0c, 0x50, - 0x53, 0x65, 0x36, 0x53, 0x65, 0x36, - 0x21, 0x32, 0x13, 0x21, 0x32, 0x13, - 0x90, 0x99, 0x09, 0x90, 0x99, 0x09, - 0x02, 0x50, 0x25, 0x02, 0x50, 0x25, - 0x06, 0xa0, 0x6a, 0x06, 0xa0, 0x6a, - 0x2c, 0x02, 0xc0, 0x2c, 0x02, 0xc0, - 0x88, 0x68, 0x86, 0x88, 0x68, 0x86, - 0xff, 0x6e, 0x0a, 0xff, 0x6e, 0x0a, - 0x20, 0x62, 0x06, 0x20, 0x62, 0x06, - 0x80, 0x38, 0x03, 0x80, 0x38, 0x03, - 0x42, 0x44, 0x24, 0x42, 0x44, 0x24, - 0x01, 0x90, 0x19, 0x01, 0x90, 0x19, - 0x14, 0x11, 0x41, 0x14, 0x11, 0x41, - 0x0a, 0x80, 0xa8, 0x0a, 0x80, 0xa8, - 0x38, 0x03, 0x80, 0x38, 0x03, 0x80, - 0xc5, 0x0c, 0x50, 0xc5, 0x0c, 0x50, - 0x53, 0x65, 0x36, 0x53, 0x65, 0x36, - 0xe4, 0x2e, 0x42, 0xe4, 0x2e, 0x42, - 0x24, 0x42, 0x44, 0x24, 0x42, 0x44, - 0xa1, 0x1a, 0x11, 0xa1, 0x1a, 0x11, - 0x18, 0x31, 0x83, 0x18, 0x31, 0x83, - 0x03, 0x90, 0x39, 0x03, 0x90, 0x39, - 0x8a, 0x18, 0xa1, 0x8a, 0x18, 0xa1, - 0x04, 0x90, 0x49, 0x04, 0x90, 0x49, - 0x00, 0xe0, 0x0e, 0x00, 0xe0, 0x0e -}; - -const uint8_t kMaskRandom48_34[204] = { - 0x20, 0x62, 0x06, 0x20, 0x62, 0x06, - 0x80, 0x38, 0x03, 0x80, 0x38, 0x03, - 0x42, 0x44, 0x24, 0x42, 0x44, 0x24, - 0x01, 0x90, 0x19, 0x01, 0x90, 0x19, - 0x14, 0x11, 0x41, 0x14, 0x11, 0x41, - 0x0a, 0x80, 0xa8, 0x0a, 0x80, 0xa8, - 0x38, 0x03, 0x80, 0x38, 0x03, 0x80, - 0xc5, 0x0c, 0x50, 0xc5, 0x0c, 0x50, - 0x53, 0x65, 0x36, 0x53, 0x65, 0x36, - 0xe4, 0x2e, 0x42, 0xe4, 0x2e, 0x42, - 0x24, 0x42, 0x44, 0x24, 0x42, 0x44, - 0xa1, 0x1a, 0x11, 0xa1, 0x1a, 0x11, - 0x18, 0x31, 0x83, 0x18, 0x31, 0x83, - 0x03, 0x90, 0x39, 0x03, 0x90, 0x39, - 0x8a, 0x18, 0xa1, 0x8a, 0x18, 0xa1, - 0x04, 0x90, 0x49, 0x04, 0x90, 0x49, - 0x00, 0xe0, 0x0e, 0x00, 0xe0, 0x0e, - 0x20, 0x62, 0x06, 0x20, 0x62, 0x06, - 0x80, 0x38, 0x03, 0x80, 0x38, 0x03, - 0x42, 0x44, 0x24, 0x42, 0x44, 0x24, - 0x01, 0x90, 0x19, 0x01, 0x90, 0x19, - 0x14, 0x11, 0x41, 0x14, 0x11, 0x41, - 0x0a, 0x80, 0xa8, 0x0a, 0x80, 0xa8, - 0x38, 0x03, 0x80, 0x38, 0x03, 0x80, - 0xc5, 0x0c, 0x50, 0xc5, 0x0c, 0x50, - 0x53, 0x65, 0x36, 0x53, 0x65, 0x36, - 0x21, 0x32, 0x13, 0x21, 0x32, 0x13, - 0x90, 0x99, 0x09, 0x90, 0x99, 0x09, - 0x02, 0x50, 0x25, 0x02, 0x50, 0x25, - 0x06, 0xa0, 0x6a, 0x06, 0xa0, 0x6a, - 0x2c, 0x02, 0xc0, 0x2c, 0x02, 0xc0, - 0x88, 0x68, 0x86, 0x88, 0x68, 0x86, - 0xff, 0x6e, 0x0a, 0xff, 0x6e, 0x0a, - 0x40, 0x72, 0x4c, 0xe8, 0xf2, 0x42 -}; - -const uint8_t kMaskRandom48_35[210] = { - 0x20, 0x62, 0x06, 0x20, 0x62, 0x06, - 0x80, 0x38, 0x03, 0x80, 0x38, 0x03, - 0x42, 0x44, 0x24, 0x42, 0x44, 0x24, - 0x01, 0x90, 0x19, 0x01, 0x90, 0x19, - 0x14, 0x11, 0x41, 0x14, 0x11, 0x41, - 0x0a, 0x80, 0xa8, 0x0a, 0x80, 0xa8, - 0x38, 0x03, 0x80, 0x38, 0x03, 0x80, - 0xc5, 0x0c, 0x50, 0xc5, 0x0c, 0x50, - 0x53, 0x65, 0x36, 0x53, 0x65, 0x36, - 0xe4, 0x2e, 0x42, 0xe4, 0x2e, 0x42, - 0x24, 0x42, 0x44, 0x24, 0x42, 0x44, - 0xa1, 0x1a, 0x11, 0xa1, 0x1a, 0x11, - 0x18, 0x31, 0x83, 0x18, 0x31, 0x83, - 0x03, 0x90, 0x39, 0x03, 0x90, 0x39, - 0x8a, 0x18, 0xa1, 0x8a, 0x18, 0xa1, - 0x04, 0x90, 0x49, 0x04, 0x90, 0x49, - 0x00, 0xe0, 0x0e, 0x00, 0xe0, 0x0e, - 0x53, 0x65, 0x36, 0x53, 0x65, 0x36, - 0xe4, 0x2e, 0x42, 0xe4, 0x2e, 0x42, - 0x24, 0x42, 0x44, 0x24, 0x42, 0x44, - 0xa1, 0x1a, 0x11, 0xa1, 0x1a, 0x11, - 0x18, 0x31, 0x83, 0x18, 0x31, 0x83, - 0x03, 0x90, 0x39, 0x03, 0x90, 0x39, - 0x8a, 0x18, 0xa1, 0x8a, 0x18, 0xa1, - 0x04, 0x90, 0x49, 0x04, 0x90, 0x49, - 0x00, 0xe0, 0x0e, 0x00, 0xe0, 0x0e, - 0x20, 0x62, 0x06, 0x20, 0x62, 0x06, - 0x80, 0x38, 0x03, 0x80, 0x38, 0x03, - 0x42, 0x44, 0x24, 0x42, 0x44, 0x24, - 0x01, 0x90, 0x19, 0x01, 0x90, 0x19, - 0x14, 0x11, 0x41, 0x14, 0x11, 0x41, - 0x0a, 0x80, 0xa8, 0x0a, 0x80, 0xa8, - 0x38, 0x03, 0x80, 0x38, 0x03, 0x80, - 0xc5, 0x0c, 0x50, 0xc5, 0x0c, 0x50, - 0x34, 0x50, 0xae, 0x34, 0x50, 0xae -}; - -const uint8_t kMaskRandom48_36[216] = { - 0x53, 0x65, 0x36, 0x53, 0x65, 0x36, - 0xe4, 0x2e, 0x42, 0xe4, 0x2e, 0x42, - 0x24, 0x42, 0x44, 0x24, 0x42, 0x44, - 0xa1, 0x1a, 0x11, 0xa1, 0x1a, 0x11, - 0x18, 0x31, 0x83, 0x18, 0x31, 0x83, - 0x03, 0x90, 0x39, 0x03, 0x90, 0x39, - 0x8a, 0x18, 0xa1, 0x8a, 0x18, 0xa1, - 0x04, 0x90, 0x49, 0x04, 0x90, 0x49, - 0x00, 0xe0, 0x0e, 0x00, 0xe0, 0x0e, - 0x20, 0x62, 0x06, 0x20, 0x62, 0x06, - 0x80, 0x38, 0x03, 0x80, 0x38, 0x03, - 0x42, 0x44, 0x24, 0x42, 0x44, 0x24, - 0x01, 0x90, 0x19, 0x01, 0x90, 0x19, - 0x14, 0x11, 0x41, 0x14, 0x11, 0x41, - 0x0a, 0x80, 0xa8, 0x0a, 0x80, 0xa8, - 0x38, 0x03, 0x80, 0x38, 0x03, 0x80, - 0xc5, 0x0c, 0x50, 0xc5, 0x0c, 0x50, - 0x34, 0x50, 0xae, 0x34, 0x50, 0xae, - 0x20, 0x62, 0x06, 0x20, 0x62, 0x06, - 0x80, 0x38, 0x03, 0x80, 0x38, 0x03, - 0x42, 0x44, 0x24, 0x42, 0x44, 0x24, - 0x01, 0x90, 0x19, 0x01, 0x90, 0x19, - 0x14, 0x11, 0x41, 0x14, 0x11, 0x41, - 0x0a, 0x80, 0xa8, 0x0a, 0x80, 0xa8, - 0x38, 0x03, 0x80, 0x38, 0x03, 0x80, - 0xc5, 0x0c, 0x50, 0xc5, 0x0c, 0x50, - 0x53, 0x65, 0x36, 0x53, 0x65, 0x36, - 0xe4, 0x2e, 0x42, 0xe4, 0x2e, 0x42, - 0x24, 0x42, 0x44, 0x24, 0x42, 0x44, - 0xa1, 0x1a, 0x11, 0xa1, 0x1a, 0x11, - 0x18, 0x31, 0x83, 0x18, 0x31, 0x83, - 0x03, 0x90, 0x39, 0x03, 0x90, 0x39, - 0x8a, 0x18, 0xa1, 0x8a, 0x18, 0xa1, - 0x04, 0x90, 0x49, 0x04, 0x90, 0x49, - 0x00, 0xe0, 0x0e, 0x00, 0xe0, 0x0e, - 0x71, 0xba, 0x8b, 0xf3, 0xfa, 0x9d -}; - -const uint8_t kMaskRandom48_37[222] = { - 0x53, 0x65, 0x36, 0x53, 0x65, 0x36, - 0xe4, 0x2e, 0x42, 0xe4, 0x2e, 0x42, - 0x24, 0x42, 0x44, 0x24, 0x42, 0x44, - 0xa1, 0x1a, 0x11, 0xa1, 0x1a, 0x11, - 0x18, 0x31, 0x83, 0x18, 0x31, 0x83, - 0x03, 0x90, 0x39, 0x03, 0x90, 0x39, - 0x8a, 0x18, 0xa1, 0x8a, 0x18, 0xa1, - 0x04, 0x90, 0x49, 0x04, 0x90, 0x49, - 0x00, 0xe0, 0x0e, 0x00, 0xe0, 0x0e, - 0x20, 0x62, 0x06, 0x20, 0x62, 0x06, - 0x80, 0x38, 0x03, 0x80, 0x38, 0x03, - 0x42, 0x44, 0x24, 0x42, 0x44, 0x24, - 0x01, 0x90, 0x19, 0x01, 0x90, 0x19, - 0x14, 0x11, 0x41, 0x14, 0x11, 0x41, - 0x0a, 0x80, 0xa8, 0x0a, 0x80, 0xa8, - 0x38, 0x03, 0x80, 0x38, 0x03, 0x80, - 0xc5, 0x0c, 0x50, 0xc5, 0x0c, 0x50, - 0x34, 0x50, 0xae, 0x34, 0x50, 0xae, - 0x53, 0x65, 0x36, 0x53, 0x65, 0x36, - 0xe4, 0x2e, 0x42, 0xe4, 0x2e, 0x42, - 0x24, 0x42, 0x44, 0x24, 0x42, 0x44, - 0xa1, 0x1a, 0x11, 0xa1, 0x1a, 0x11, - 0x18, 0x31, 0x83, 0x18, 0x31, 0x83, - 0x03, 0x90, 0x39, 0x03, 0x90, 0x39, - 0x8a, 0x18, 0xa1, 0x8a, 0x18, 0xa1, - 0x04, 0x90, 0x49, 0x04, 0x90, 0x49, - 0x00, 0xe0, 0x0e, 0x00, 0xe0, 0x0e, - 0x51, 0x45, 0x14, 0x51, 0x45, 0x14, - 0x45, 0x14, 0x51, 0x45, 0x14, 0x51, - 0x80, 0xd8, 0x0d, 0x80, 0xd8, 0x0d, - 0x24, 0x22, 0x42, 0x24, 0x22, 0x42, - 0x0a, 0x20, 0xa2, 0x0a, 0x20, 0xa2, - 0x00, 0xe0, 0x0e, 0x00, 0xe0, 0x0e, - 0xb8, 0x0b, 0x80, 0xb8, 0x0b, 0x80, - 0x09, 0x10, 0x91, 0x09, 0x10, 0x91, - 0x56, 0x05, 0x60, 0x56, 0x05, 0x60, - 0xa2, 0x8a, 0x28, 0xa2, 0x8a, 0x28 -}; - -const uint8_t kMaskRandom48_38[228] = { - 0x53, 0x65, 0x36, 0x53, 0x65, 0x36, - 0xe4, 0x2e, 0x42, 0xe4, 0x2e, 0x42, - 0x24, 0x42, 0x44, 0x24, 0x42, 0x44, - 0xa1, 0x1a, 0x11, 0xa1, 0x1a, 0x11, - 0x18, 0x31, 0x83, 0x18, 0x31, 0x83, - 0x03, 0x90, 0x39, 0x03, 0x90, 0x39, - 0x8a, 0x18, 0xa1, 0x8a, 0x18, 0xa1, - 0x04, 0x90, 0x49, 0x04, 0x90, 0x49, - 0x00, 0xe0, 0x0e, 0x00, 0xe0, 0x0e, - 0x51, 0x45, 0x14, 0x51, 0x45, 0x14, - 0x45, 0x14, 0x51, 0x45, 0x14, 0x51, - 0x80, 0xd8, 0x0d, 0x80, 0xd8, 0x0d, - 0x24, 0x22, 0x42, 0x24, 0x22, 0x42, - 0x0a, 0x20, 0xa2, 0x0a, 0x20, 0xa2, - 0x00, 0xe0, 0x0e, 0x00, 0xe0, 0x0e, - 0xb8, 0x0b, 0x80, 0xb8, 0x0b, 0x80, - 0x09, 0x10, 0x91, 0x09, 0x10, 0x91, - 0x56, 0x05, 0x60, 0x56, 0x05, 0x60, - 0xa2, 0x8a, 0x28, 0xa2, 0x8a, 0x28, - 0x53, 0x65, 0x36, 0x53, 0x65, 0x36, - 0xe4, 0x2e, 0x42, 0xe4, 0x2e, 0x42, - 0x24, 0x42, 0x44, 0x24, 0x42, 0x44, - 0xa1, 0x1a, 0x11, 0xa1, 0x1a, 0x11, - 0x18, 0x31, 0x83, 0x18, 0x31, 0x83, - 0x03, 0x90, 0x39, 0x03, 0x90, 0x39, - 0x8a, 0x18, 0xa1, 0x8a, 0x18, 0xa1, - 0x04, 0x90, 0x49, 0x04, 0x90, 0x49, - 0x00, 0xe0, 0x0e, 0x00, 0xe0, 0x0e, - 0x20, 0x62, 0x06, 0x20, 0x62, 0x06, - 0x80, 0x38, 0x03, 0x80, 0x38, 0x03, - 0x42, 0x44, 0x24, 0x42, 0x44, 0x24, - 0x01, 0x90, 0x19, 0x01, 0x90, 0x19, - 0x14, 0x11, 0x41, 0x14, 0x11, 0x41, - 0x0a, 0x80, 0xa8, 0x0a, 0x80, 0xa8, - 0x38, 0x03, 0x80, 0x38, 0x03, 0x80, - 0xc5, 0x0c, 0x50, 0xc5, 0x0c, 0x50, - 0x34, 0x50, 0xae, 0x34, 0x50, 0xae, - 0x2a, 0x7a, 0xf6, 0x8c, 0xde, 0x51 -}; - -const uint8_t kMaskRandom48_39[234] = { - 0x53, 0x65, 0x36, 0x53, 0x65, 0x36, - 0xe4, 0x2e, 0x42, 0xe4, 0x2e, 0x42, - 0x24, 0x42, 0x44, 0x24, 0x42, 0x44, - 0xa1, 0x1a, 0x11, 0xa1, 0x1a, 0x11, - 0x18, 0x31, 0x83, 0x18, 0x31, 0x83, - 0x03, 0x90, 0x39, 0x03, 0x90, 0x39, - 0x8a, 0x18, 0xa1, 0x8a, 0x18, 0xa1, - 0x04, 0x90, 0x49, 0x04, 0x90, 0x49, - 0x00, 0xe0, 0x0e, 0x00, 0xe0, 0x0e, - 0x51, 0x45, 0x14, 0x51, 0x45, 0x14, - 0x45, 0x14, 0x51, 0x45, 0x14, 0x51, - 0x80, 0xd8, 0x0d, 0x80, 0xd8, 0x0d, - 0x24, 0x22, 0x42, 0x24, 0x22, 0x42, - 0x0a, 0x20, 0xa2, 0x0a, 0x20, 0xa2, - 0x00, 0xe0, 0x0e, 0x00, 0xe0, 0x0e, - 0xb8, 0x0b, 0x80, 0xb8, 0x0b, 0x80, - 0x09, 0x10, 0x91, 0x09, 0x10, 0x91, - 0x56, 0x05, 0x60, 0x56, 0x05, 0x60, - 0xa2, 0x8a, 0x28, 0xa2, 0x8a, 0x28, - 0x51, 0x45, 0x14, 0x51, 0x45, 0x14, - 0x45, 0x14, 0x51, 0x45, 0x14, 0x51, - 0x80, 0xd8, 0x0d, 0x80, 0xd8, 0x0d, - 0x24, 0x22, 0x42, 0x24, 0x22, 0x42, - 0x0a, 0x20, 0xa2, 0x0a, 0x20, 0xa2, - 0x00, 0xe0, 0x0e, 0x00, 0xe0, 0x0e, - 0xb8, 0x0b, 0x80, 0xb8, 0x0b, 0x80, - 0x09, 0x10, 0x91, 0x09, 0x10, 0x91, - 0x56, 0x05, 0x60, 0x56, 0x05, 0x60, - 0xa2, 0x8a, 0x28, 0xa2, 0x8a, 0x28, - 0x53, 0x65, 0x36, 0x53, 0x65, 0x36, - 0xe4, 0x2e, 0x42, 0xe4, 0x2e, 0x42, - 0x24, 0x42, 0x44, 0x24, 0x42, 0x44, - 0xa1, 0x1a, 0x11, 0xa1, 0x1a, 0x11, - 0x18, 0x31, 0x83, 0x18, 0x31, 0x83, - 0x03, 0x90, 0x39, 0x03, 0x90, 0x39, - 0x8a, 0x18, 0xa1, 0x8a, 0x18, 0xa1, - 0x04, 0x90, 0x49, 0x04, 0x90, 0x49, - 0x00, 0xe0, 0x0e, 0x00, 0xe0, 0x0e, - 0x98, 0xa2, 0x95, 0x98, 0xa2, 0x95 -}; - -const uint8_t kMaskRandom48_4[24] = { - 0x8b, 0x28, 0xb2, 0x8b, 0x28, 0xb2, - 0x14, 0xb1, 0x4b, 0x14, 0xb1, 0x4b, - 0x22, 0xd2, 0x2d, 0x22, 0xd2, 0x2d, - 0x45, 0x54, 0x55, 0x45, 0x54, 0x55 -}; - -const uint8_t kMaskRandom48_40[240] = { - 0x51, 0x45, 0x14, 0x51, 0x45, 0x14, - 0x45, 0x14, 0x51, 0x45, 0x14, 0x51, - 0x80, 0xd8, 0x0d, 0x80, 0xd8, 0x0d, - 0x24, 0x22, 0x42, 0x24, 0x22, 0x42, - 0x0a, 0x20, 0xa2, 0x0a, 0x20, 0xa2, - 0x00, 0xe0, 0x0e, 0x00, 0xe0, 0x0e, - 0xb8, 0x0b, 0x80, 0xb8, 0x0b, 0x80, - 0x09, 0x10, 0x91, 0x09, 0x10, 0x91, - 0x56, 0x05, 0x60, 0x56, 0x05, 0x60, - 0xa2, 0x8a, 0x28, 0xa2, 0x8a, 0x28, - 0x53, 0x65, 0x36, 0x53, 0x65, 0x36, - 0xe4, 0x2e, 0x42, 0xe4, 0x2e, 0x42, - 0x24, 0x42, 0x44, 0x24, 0x42, 0x44, - 0xa1, 0x1a, 0x11, 0xa1, 0x1a, 0x11, - 0x18, 0x31, 0x83, 0x18, 0x31, 0x83, - 0x03, 0x90, 0x39, 0x03, 0x90, 0x39, - 0x8a, 0x18, 0xa1, 0x8a, 0x18, 0xa1, - 0x04, 0x90, 0x49, 0x04, 0x90, 0x49, - 0x00, 0xe0, 0x0e, 0x00, 0xe0, 0x0e, - 0x98, 0xa2, 0x95, 0x98, 0xa2, 0x95, - 0x53, 0x65, 0x36, 0x53, 0x65, 0x36, - 0xe4, 0x2e, 0x42, 0xe4, 0x2e, 0x42, - 0x24, 0x42, 0x44, 0x24, 0x42, 0x44, - 0xa1, 0x1a, 0x11, 0xa1, 0x1a, 0x11, - 0x18, 0x31, 0x83, 0x18, 0x31, 0x83, - 0x03, 0x90, 0x39, 0x03, 0x90, 0x39, - 0x8a, 0x18, 0xa1, 0x8a, 0x18, 0xa1, - 0x04, 0x90, 0x49, 0x04, 0x90, 0x49, - 0x00, 0xe0, 0x0e, 0x00, 0xe0, 0x0e, - 0x51, 0x45, 0x14, 0x51, 0x45, 0x14, - 0x45, 0x14, 0x51, 0x45, 0x14, 0x51, - 0x80, 0xd8, 0x0d, 0x80, 0xd8, 0x0d, - 0x24, 0x22, 0x42, 0x24, 0x22, 0x42, - 0x0a, 0x20, 0xa2, 0x0a, 0x20, 0xa2, - 0x00, 0xe0, 0x0e, 0x00, 0xe0, 0x0e, - 0xb8, 0x0b, 0x80, 0xb8, 0x0b, 0x80, - 0x09, 0x10, 0x91, 0x09, 0x10, 0x91, - 0x56, 0x05, 0x60, 0x56, 0x05, 0x60, - 0xa2, 0x8a, 0x28, 0xa2, 0x8a, 0x28, - 0x20, 0x5f, 0x68, 0xd5, 0xa2, 0x1b -}; - -const uint8_t kMaskRandom48_41[246] = { - 0x51, 0x45, 0x14, 0x51, 0x45, 0x14, - 0x45, 0x14, 0x51, 0x45, 0x14, 0x51, - 0x80, 0xd8, 0x0d, 0x80, 0xd8, 0x0d, - 0x24, 0x22, 0x42, 0x24, 0x22, 0x42, - 0x0a, 0x20, 0xa2, 0x0a, 0x20, 0xa2, - 0x00, 0xe0, 0x0e, 0x00, 0xe0, 0x0e, - 0xb8, 0x0b, 0x80, 0xb8, 0x0b, 0x80, - 0x09, 0x10, 0x91, 0x09, 0x10, 0x91, - 0x56, 0x05, 0x60, 0x56, 0x05, 0x60, - 0xa2, 0x8a, 0x28, 0xa2, 0x8a, 0x28, - 0x53, 0x65, 0x36, 0x53, 0x65, 0x36, - 0xe4, 0x2e, 0x42, 0xe4, 0x2e, 0x42, - 0x24, 0x42, 0x44, 0x24, 0x42, 0x44, - 0xa1, 0x1a, 0x11, 0xa1, 0x1a, 0x11, - 0x18, 0x31, 0x83, 0x18, 0x31, 0x83, - 0x03, 0x90, 0x39, 0x03, 0x90, 0x39, - 0x8a, 0x18, 0xa1, 0x8a, 0x18, 0xa1, - 0x04, 0x90, 0x49, 0x04, 0x90, 0x49, - 0x00, 0xe0, 0x0e, 0x00, 0xe0, 0x0e, - 0x98, 0xa2, 0x95, 0x98, 0xa2, 0x95, - 0x51, 0x45, 0x14, 0x51, 0x45, 0x14, - 0x45, 0x14, 0x51, 0x45, 0x14, 0x51, - 0x80, 0xd8, 0x0d, 0x80, 0xd8, 0x0d, - 0x24, 0x22, 0x42, 0x24, 0x22, 0x42, - 0x0a, 0x20, 0xa2, 0x0a, 0x20, 0xa2, - 0x00, 0xe0, 0x0e, 0x00, 0xe0, 0x0e, - 0xb8, 0x0b, 0x80, 0xb8, 0x0b, 0x80, - 0x09, 0x10, 0x91, 0x09, 0x10, 0x91, - 0x56, 0x05, 0x60, 0x56, 0x05, 0x60, - 0xa2, 0x8a, 0x28, 0xa2, 0x8a, 0x28, - 0x53, 0x65, 0x36, 0x53, 0x65, 0x36, - 0x21, 0x32, 0x13, 0x21, 0x32, 0x13, - 0x10, 0x91, 0x09, 0x10, 0x91, 0x09, - 0x00, 0x70, 0x07, 0x00, 0x70, 0x07, - 0x0c, 0x10, 0xc1, 0x0c, 0x10, 0xc1, - 0x40, 0xc4, 0x0c, 0x40, 0xc4, 0x0c, - 0x6a, 0x06, 0xa0, 0x6a, 0x06, 0xa0, - 0x86, 0x08, 0x60, 0x86, 0x08, 0x60, - 0x24, 0x82, 0x48, 0x24, 0x82, 0x48, - 0x89, 0x08, 0x90, 0x89, 0x08, 0x90, - 0xc0, 0x2c, 0x02, 0xc0, 0x2c, 0x02 -}; - -const uint8_t kMaskRandom48_42[252] = { - 0x51, 0x45, 0x14, 0x51, 0x45, 0x14, - 0x45, 0x14, 0x51, 0x45, 0x14, 0x51, - 0x80, 0xd8, 0x0d, 0x80, 0xd8, 0x0d, - 0x24, 0x22, 0x42, 0x24, 0x22, 0x42, - 0x0a, 0x20, 0xa2, 0x0a, 0x20, 0xa2, - 0x00, 0xe0, 0x0e, 0x00, 0xe0, 0x0e, - 0xb8, 0x0b, 0x80, 0xb8, 0x0b, 0x80, - 0x09, 0x10, 0x91, 0x09, 0x10, 0x91, - 0x56, 0x05, 0x60, 0x56, 0x05, 0x60, - 0xa2, 0x8a, 0x28, 0xa2, 0x8a, 0x28, - 0x53, 0x65, 0x36, 0x53, 0x65, 0x36, - 0x21, 0x32, 0x13, 0x21, 0x32, 0x13, - 0x10, 0x91, 0x09, 0x10, 0x91, 0x09, - 0x00, 0x70, 0x07, 0x00, 0x70, 0x07, - 0x0c, 0x10, 0xc1, 0x0c, 0x10, 0xc1, - 0x40, 0xc4, 0x0c, 0x40, 0xc4, 0x0c, - 0x6a, 0x06, 0xa0, 0x6a, 0x06, 0xa0, - 0x86, 0x08, 0x60, 0x86, 0x08, 0x60, - 0x24, 0x82, 0x48, 0x24, 0x82, 0x48, - 0x89, 0x08, 0x90, 0x89, 0x08, 0x90, - 0xc0, 0x2c, 0x02, 0xc0, 0x2c, 0x02, - 0x51, 0x45, 0x14, 0x51, 0x45, 0x14, - 0x45, 0x14, 0x51, 0x45, 0x14, 0x51, - 0x80, 0xd8, 0x0d, 0x80, 0xd8, 0x0d, - 0x24, 0x22, 0x42, 0x24, 0x22, 0x42, - 0x0a, 0x20, 0xa2, 0x0a, 0x20, 0xa2, - 0x00, 0xe0, 0x0e, 0x00, 0xe0, 0x0e, - 0xb8, 0x0b, 0x80, 0xb8, 0x0b, 0x80, - 0x09, 0x10, 0x91, 0x09, 0x10, 0x91, - 0x56, 0x05, 0x60, 0x56, 0x05, 0x60, - 0xa2, 0x8a, 0x28, 0xa2, 0x8a, 0x28, - 0x53, 0x65, 0x36, 0x53, 0x65, 0x36, - 0xe4, 0x2e, 0x42, 0xe4, 0x2e, 0x42, - 0x24, 0x42, 0x44, 0x24, 0x42, 0x44, - 0xa1, 0x1a, 0x11, 0xa1, 0x1a, 0x11, - 0x18, 0x31, 0x83, 0x18, 0x31, 0x83, - 0x03, 0x90, 0x39, 0x03, 0x90, 0x39, - 0x8a, 0x18, 0xa1, 0x8a, 0x18, 0xa1, - 0x04, 0x90, 0x49, 0x04, 0x90, 0x49, - 0x00, 0xe0, 0x0e, 0x00, 0xe0, 0x0e, - 0x98, 0xa2, 0x95, 0x98, 0xa2, 0x95, - 0x66, 0xcf, 0xa3, 0x47, 0x69, 0x00 -}; - -const uint8_t kMaskRandom48_43[258] = { - 0x51, 0x45, 0x14, 0x51, 0x45, 0x14, - 0x45, 0x14, 0x51, 0x45, 0x14, 0x51, - 0x80, 0xd8, 0x0d, 0x80, 0xd8, 0x0d, - 0x24, 0x22, 0x42, 0x24, 0x22, 0x42, - 0x0a, 0x20, 0xa2, 0x0a, 0x20, 0xa2, - 0x00, 0xe0, 0x0e, 0x00, 0xe0, 0x0e, - 0xb8, 0x0b, 0x80, 0xb8, 0x0b, 0x80, - 0x09, 0x10, 0x91, 0x09, 0x10, 0x91, - 0x56, 0x05, 0x60, 0x56, 0x05, 0x60, - 0xa2, 0x8a, 0x28, 0xa2, 0x8a, 0x28, - 0x53, 0x65, 0x36, 0x53, 0x65, 0x36, - 0x21, 0x32, 0x13, 0x21, 0x32, 0x13, - 0x10, 0x91, 0x09, 0x10, 0x91, 0x09, - 0x00, 0x70, 0x07, 0x00, 0x70, 0x07, - 0x0c, 0x10, 0xc1, 0x0c, 0x10, 0xc1, - 0x40, 0xc4, 0x0c, 0x40, 0xc4, 0x0c, - 0x6a, 0x06, 0xa0, 0x6a, 0x06, 0xa0, - 0x86, 0x08, 0x60, 0x86, 0x08, 0x60, - 0x24, 0x82, 0x48, 0x24, 0x82, 0x48, - 0x89, 0x08, 0x90, 0x89, 0x08, 0x90, - 0xc0, 0x2c, 0x02, 0xc0, 0x2c, 0x02, - 0x53, 0x65, 0x36, 0x53, 0x65, 0x36, - 0x21, 0x32, 0x13, 0x21, 0x32, 0x13, - 0x10, 0x91, 0x09, 0x10, 0x91, 0x09, - 0x00, 0x70, 0x07, 0x00, 0x70, 0x07, - 0x0c, 0x10, 0xc1, 0x0c, 0x10, 0xc1, - 0x40, 0xc4, 0x0c, 0x40, 0xc4, 0x0c, - 0x6a, 0x06, 0xa0, 0x6a, 0x06, 0xa0, - 0x86, 0x08, 0x60, 0x86, 0x08, 0x60, - 0x24, 0x82, 0x48, 0x24, 0x82, 0x48, - 0x89, 0x08, 0x90, 0x89, 0x08, 0x90, - 0xc0, 0x2c, 0x02, 0xc0, 0x2c, 0x02, - 0x51, 0x45, 0x14, 0x51, 0x45, 0x14, - 0x45, 0x14, 0x51, 0x45, 0x14, 0x51, - 0x80, 0xd8, 0x0d, 0x80, 0xd8, 0x0d, - 0x24, 0x22, 0x42, 0x24, 0x22, 0x42, - 0x0a, 0x20, 0xa2, 0x0a, 0x20, 0xa2, - 0x00, 0xe0, 0x0e, 0x00, 0xe0, 0x0e, - 0xb8, 0x0b, 0x80, 0xb8, 0x0b, 0x80, - 0x09, 0x10, 0x91, 0x09, 0x10, 0x91, - 0x56, 0x05, 0x60, 0x56, 0x05, 0x60, - 0xa2, 0x8a, 0x28, 0xa2, 0x8a, 0x28, - 0x1a, 0xaa, 0xee, 0x1a, 0xaa, 0xee -}; - -const uint8_t kMaskRandom48_44[264] = { - 0x53, 0x65, 0x36, 0x53, 0x65, 0x36, - 0x21, 0x32, 0x13, 0x21, 0x32, 0x13, - 0x10, 0x91, 0x09, 0x10, 0x91, 0x09, - 0x00, 0x70, 0x07, 0x00, 0x70, 0x07, - 0x0c, 0x10, 0xc1, 0x0c, 0x10, 0xc1, - 0x40, 0xc4, 0x0c, 0x40, 0xc4, 0x0c, - 0x6a, 0x06, 0xa0, 0x6a, 0x06, 0xa0, - 0x86, 0x08, 0x60, 0x86, 0x08, 0x60, - 0x24, 0x82, 0x48, 0x24, 0x82, 0x48, - 0x89, 0x08, 0x90, 0x89, 0x08, 0x90, - 0xc0, 0x2c, 0x02, 0xc0, 0x2c, 0x02, - 0x51, 0x45, 0x14, 0x51, 0x45, 0x14, - 0x45, 0x14, 0x51, 0x45, 0x14, 0x51, - 0x80, 0xd8, 0x0d, 0x80, 0xd8, 0x0d, - 0x24, 0x22, 0x42, 0x24, 0x22, 0x42, - 0x0a, 0x20, 0xa2, 0x0a, 0x20, 0xa2, - 0x00, 0xe0, 0x0e, 0x00, 0xe0, 0x0e, - 0xb8, 0x0b, 0x80, 0xb8, 0x0b, 0x80, - 0x09, 0x10, 0x91, 0x09, 0x10, 0x91, - 0x56, 0x05, 0x60, 0x56, 0x05, 0x60, - 0xa2, 0x8a, 0x28, 0xa2, 0x8a, 0x28, - 0x1a, 0xaa, 0xee, 0x1a, 0xaa, 0xee, - 0x51, 0x45, 0x14, 0x51, 0x45, 0x14, - 0x45, 0x14, 0x51, 0x45, 0x14, 0x51, - 0x80, 0xd8, 0x0d, 0x80, 0xd8, 0x0d, - 0x24, 0x22, 0x42, 0x24, 0x22, 0x42, - 0x0a, 0x20, 0xa2, 0x0a, 0x20, 0xa2, - 0x00, 0xe0, 0x0e, 0x00, 0xe0, 0x0e, - 0xb8, 0x0b, 0x80, 0xb8, 0x0b, 0x80, - 0x09, 0x10, 0x91, 0x09, 0x10, 0x91, - 0x56, 0x05, 0x60, 0x56, 0x05, 0x60, - 0xa2, 0x8a, 0x28, 0xa2, 0x8a, 0x28, - 0x53, 0x65, 0x36, 0x53, 0x65, 0x36, - 0x21, 0x32, 0x13, 0x21, 0x32, 0x13, - 0x10, 0x91, 0x09, 0x10, 0x91, 0x09, - 0x00, 0x70, 0x07, 0x00, 0x70, 0x07, - 0x0c, 0x10, 0xc1, 0x0c, 0x10, 0xc1, - 0x40, 0xc4, 0x0c, 0x40, 0xc4, 0x0c, - 0x6a, 0x06, 0xa0, 0x6a, 0x06, 0xa0, - 0x86, 0x08, 0x60, 0x86, 0x08, 0x60, - 0x24, 0x82, 0x48, 0x24, 0x82, 0x48, - 0x89, 0x08, 0x90, 0x89, 0x08, 0x90, - 0xc0, 0x2c, 0x02, 0xc0, 0x2c, 0x02, - 0xc6, 0x40, 0x1f, 0x57, 0xc6, 0xe6 -}; - -const uint8_t kMaskRandom48_45[270] = { - 0x53, 0x65, 0x36, 0x53, 0x65, 0x36, - 0x21, 0x32, 0x13, 0x21, 0x32, 0x13, - 0x10, 0x91, 0x09, 0x10, 0x91, 0x09, - 0x00, 0x70, 0x07, 0x00, 0x70, 0x07, - 0x0c, 0x10, 0xc1, 0x0c, 0x10, 0xc1, - 0x40, 0xc4, 0x0c, 0x40, 0xc4, 0x0c, - 0x6a, 0x06, 0xa0, 0x6a, 0x06, 0xa0, - 0x86, 0x08, 0x60, 0x86, 0x08, 0x60, - 0x24, 0x82, 0x48, 0x24, 0x82, 0x48, - 0x89, 0x08, 0x90, 0x89, 0x08, 0x90, - 0xc0, 0x2c, 0x02, 0xc0, 0x2c, 0x02, - 0x51, 0x45, 0x14, 0x51, 0x45, 0x14, - 0x45, 0x14, 0x51, 0x45, 0x14, 0x51, - 0x80, 0xd8, 0x0d, 0x80, 0xd8, 0x0d, - 0x24, 0x22, 0x42, 0x24, 0x22, 0x42, - 0x0a, 0x20, 0xa2, 0x0a, 0x20, 0xa2, - 0x00, 0xe0, 0x0e, 0x00, 0xe0, 0x0e, - 0xb8, 0x0b, 0x80, 0xb8, 0x0b, 0x80, - 0x09, 0x10, 0x91, 0x09, 0x10, 0x91, - 0x56, 0x05, 0x60, 0x56, 0x05, 0x60, - 0xa2, 0x8a, 0x28, 0xa2, 0x8a, 0x28, - 0x1a, 0xaa, 0xee, 0x1a, 0xaa, 0xee, - 0x53, 0x65, 0x36, 0x53, 0x65, 0x36, - 0x21, 0x32, 0x13, 0x21, 0x32, 0x13, - 0x10, 0x91, 0x09, 0x10, 0x91, 0x09, - 0x00, 0x70, 0x07, 0x00, 0x70, 0x07, - 0x0c, 0x10, 0xc1, 0x0c, 0x10, 0xc1, - 0x40, 0xc4, 0x0c, 0x40, 0xc4, 0x0c, - 0x6a, 0x06, 0xa0, 0x6a, 0x06, 0xa0, - 0x86, 0x08, 0x60, 0x86, 0x08, 0x60, - 0x24, 0x82, 0x48, 0x24, 0x82, 0x48, - 0x89, 0x08, 0x90, 0x89, 0x08, 0x90, - 0xc0, 0x2c, 0x02, 0xc0, 0x2c, 0x02, - 0x10, 0x61, 0x06, 0x10, 0x61, 0x06, - 0x02, 0x30, 0x23, 0x02, 0x30, 0x23, - 0x40, 0x54, 0x05, 0x40, 0x54, 0x05, - 0x21, 0x82, 0x18, 0x21, 0x82, 0x18, - 0x81, 0x18, 0x11, 0x81, 0x18, 0x11, - 0x14, 0x81, 0x48, 0x14, 0x81, 0x48, - 0x98, 0x09, 0x80, 0x98, 0x09, 0x80, - 0x08, 0x90, 0x89, 0x08, 0x90, 0x89, - 0x62, 0x06, 0x20, 0x62, 0x06, 0x20, - 0x24, 0x22, 0x42, 0x24, 0x22, 0x42, - 0x8a, 0x08, 0xa0, 0x8a, 0x08, 0xa0, - 0x84, 0x48, 0x44, 0x84, 0x48, 0x44 -}; - -const uint8_t kMaskRandom48_46[276] = { - 0x53, 0x65, 0x36, 0x53, 0x65, 0x36, - 0x21, 0x32, 0x13, 0x21, 0x32, 0x13, - 0x10, 0x91, 0x09, 0x10, 0x91, 0x09, - 0x00, 0x70, 0x07, 0x00, 0x70, 0x07, - 0x0c, 0x10, 0xc1, 0x0c, 0x10, 0xc1, - 0x40, 0xc4, 0x0c, 0x40, 0xc4, 0x0c, - 0x6a, 0x06, 0xa0, 0x6a, 0x06, 0xa0, - 0x86, 0x08, 0x60, 0x86, 0x08, 0x60, - 0x24, 0x82, 0x48, 0x24, 0x82, 0x48, - 0x89, 0x08, 0x90, 0x89, 0x08, 0x90, - 0xc0, 0x2c, 0x02, 0xc0, 0x2c, 0x02, - 0x10, 0x61, 0x06, 0x10, 0x61, 0x06, - 0x02, 0x30, 0x23, 0x02, 0x30, 0x23, - 0x40, 0x54, 0x05, 0x40, 0x54, 0x05, - 0x21, 0x82, 0x18, 0x21, 0x82, 0x18, - 0x81, 0x18, 0x11, 0x81, 0x18, 0x11, - 0x14, 0x81, 0x48, 0x14, 0x81, 0x48, - 0x98, 0x09, 0x80, 0x98, 0x09, 0x80, - 0x08, 0x90, 0x89, 0x08, 0x90, 0x89, - 0x62, 0x06, 0x20, 0x62, 0x06, 0x20, - 0x24, 0x22, 0x42, 0x24, 0x22, 0x42, - 0x8a, 0x08, 0xa0, 0x8a, 0x08, 0xa0, - 0x84, 0x48, 0x44, 0x84, 0x48, 0x44, - 0x53, 0x65, 0x36, 0x53, 0x65, 0x36, - 0x21, 0x32, 0x13, 0x21, 0x32, 0x13, - 0x10, 0x91, 0x09, 0x10, 0x91, 0x09, - 0x00, 0x70, 0x07, 0x00, 0x70, 0x07, - 0x0c, 0x10, 0xc1, 0x0c, 0x10, 0xc1, - 0x40, 0xc4, 0x0c, 0x40, 0xc4, 0x0c, - 0x6a, 0x06, 0xa0, 0x6a, 0x06, 0xa0, - 0x86, 0x08, 0x60, 0x86, 0x08, 0x60, - 0x24, 0x82, 0x48, 0x24, 0x82, 0x48, - 0x89, 0x08, 0x90, 0x89, 0x08, 0x90, - 0xc0, 0x2c, 0x02, 0xc0, 0x2c, 0x02, - 0x51, 0x45, 0x14, 0x51, 0x45, 0x14, - 0x45, 0x14, 0x51, 0x45, 0x14, 0x51, - 0x80, 0xd8, 0x0d, 0x80, 0xd8, 0x0d, - 0x24, 0x22, 0x42, 0x24, 0x22, 0x42, - 0x0a, 0x20, 0xa2, 0x0a, 0x20, 0xa2, - 0x00, 0xe0, 0x0e, 0x00, 0xe0, 0x0e, - 0xb8, 0x0b, 0x80, 0xb8, 0x0b, 0x80, - 0x09, 0x10, 0x91, 0x09, 0x10, 0x91, - 0x56, 0x05, 0x60, 0x56, 0x05, 0x60, - 0xa2, 0x8a, 0x28, 0xa2, 0x8a, 0x28, - 0x1a, 0xaa, 0xee, 0x1a, 0xaa, 0xee, - 0x10, 0xf9, 0xab, 0x12, 0x14, 0xef -}; - -const uint8_t kMaskRandom48_47[282] = { - 0x53, 0x65, 0x36, 0x53, 0x65, 0x36, - 0x21, 0x32, 0x13, 0x21, 0x32, 0x13, - 0x10, 0x91, 0x09, 0x10, 0x91, 0x09, - 0x00, 0x70, 0x07, 0x00, 0x70, 0x07, - 0x0c, 0x10, 0xc1, 0x0c, 0x10, 0xc1, - 0x40, 0xc4, 0x0c, 0x40, 0xc4, 0x0c, - 0x6a, 0x06, 0xa0, 0x6a, 0x06, 0xa0, - 0x86, 0x08, 0x60, 0x86, 0x08, 0x60, - 0x24, 0x82, 0x48, 0x24, 0x82, 0x48, - 0x89, 0x08, 0x90, 0x89, 0x08, 0x90, - 0xc0, 0x2c, 0x02, 0xc0, 0x2c, 0x02, - 0x10, 0x61, 0x06, 0x10, 0x61, 0x06, - 0x02, 0x30, 0x23, 0x02, 0x30, 0x23, - 0x40, 0x54, 0x05, 0x40, 0x54, 0x05, - 0x21, 0x82, 0x18, 0x21, 0x82, 0x18, - 0x81, 0x18, 0x11, 0x81, 0x18, 0x11, - 0x14, 0x81, 0x48, 0x14, 0x81, 0x48, - 0x98, 0x09, 0x80, 0x98, 0x09, 0x80, - 0x08, 0x90, 0x89, 0x08, 0x90, 0x89, - 0x62, 0x06, 0x20, 0x62, 0x06, 0x20, - 0x24, 0x22, 0x42, 0x24, 0x22, 0x42, - 0x8a, 0x08, 0xa0, 0x8a, 0x08, 0xa0, - 0x84, 0x48, 0x44, 0x84, 0x48, 0x44, - 0x10, 0x61, 0x06, 0x10, 0x61, 0x06, - 0x02, 0x30, 0x23, 0x02, 0x30, 0x23, - 0x40, 0x54, 0x05, 0x40, 0x54, 0x05, - 0x21, 0x82, 0x18, 0x21, 0x82, 0x18, - 0x81, 0x18, 0x11, 0x81, 0x18, 0x11, - 0x14, 0x81, 0x48, 0x14, 0x81, 0x48, - 0x98, 0x09, 0x80, 0x98, 0x09, 0x80, - 0x08, 0x90, 0x89, 0x08, 0x90, 0x89, - 0x62, 0x06, 0x20, 0x62, 0x06, 0x20, - 0x24, 0x22, 0x42, 0x24, 0x22, 0x42, - 0x8a, 0x08, 0xa0, 0x8a, 0x08, 0xa0, - 0x84, 0x48, 0x44, 0x84, 0x48, 0x44, - 0x53, 0x65, 0x36, 0x53, 0x65, 0x36, - 0x21, 0x32, 0x13, 0x21, 0x32, 0x13, - 0x10, 0x91, 0x09, 0x10, 0x91, 0x09, - 0x00, 0x70, 0x07, 0x00, 0x70, 0x07, - 0x0c, 0x10, 0xc1, 0x0c, 0x10, 0xc1, - 0x40, 0xc4, 0x0c, 0x40, 0xc4, 0x0c, - 0x6a, 0x06, 0xa0, 0x6a, 0x06, 0xa0, - 0x86, 0x08, 0x60, 0x86, 0x08, 0x60, - 0x24, 0x82, 0x48, 0x24, 0x82, 0x48, - 0x89, 0x08, 0x90, 0x89, 0x08, 0x90, - 0xc0, 0x2c, 0x02, 0xc0, 0x2c, 0x02, - 0x88, 0x32, 0x59, 0x88, 0x32, 0x59 -}; - -const uint8_t kMaskRandom48_48[288] = { - 0x10, 0x61, 0x06, 0x10, 0x61, 0x06, - 0x02, 0x30, 0x23, 0x02, 0x30, 0x23, - 0x40, 0x54, 0x05, 0x40, 0x54, 0x05, - 0x21, 0x82, 0x18, 0x21, 0x82, 0x18, - 0x81, 0x18, 0x11, 0x81, 0x18, 0x11, - 0x14, 0x81, 0x48, 0x14, 0x81, 0x48, - 0x98, 0x09, 0x80, 0x98, 0x09, 0x80, - 0x08, 0x90, 0x89, 0x08, 0x90, 0x89, - 0x62, 0x06, 0x20, 0x62, 0x06, 0x20, - 0x24, 0x22, 0x42, 0x24, 0x22, 0x42, - 0x8a, 0x08, 0xa0, 0x8a, 0x08, 0xa0, - 0x84, 0x48, 0x44, 0x84, 0x48, 0x44, - 0x53, 0x65, 0x36, 0x53, 0x65, 0x36, - 0x21, 0x32, 0x13, 0x21, 0x32, 0x13, - 0x10, 0x91, 0x09, 0x10, 0x91, 0x09, - 0x00, 0x70, 0x07, 0x00, 0x70, 0x07, - 0x0c, 0x10, 0xc1, 0x0c, 0x10, 0xc1, - 0x40, 0xc4, 0x0c, 0x40, 0xc4, 0x0c, - 0x6a, 0x06, 0xa0, 0x6a, 0x06, 0xa0, - 0x86, 0x08, 0x60, 0x86, 0x08, 0x60, - 0x24, 0x82, 0x48, 0x24, 0x82, 0x48, - 0x89, 0x08, 0x90, 0x89, 0x08, 0x90, - 0xc0, 0x2c, 0x02, 0xc0, 0x2c, 0x02, - 0x88, 0x32, 0x59, 0x88, 0x32, 0x59, - 0x53, 0x65, 0x36, 0x53, 0x65, 0x36, - 0x21, 0x32, 0x13, 0x21, 0x32, 0x13, - 0x10, 0x91, 0x09, 0x10, 0x91, 0x09, - 0x00, 0x70, 0x07, 0x00, 0x70, 0x07, - 0x0c, 0x10, 0xc1, 0x0c, 0x10, 0xc1, - 0x40, 0xc4, 0x0c, 0x40, 0xc4, 0x0c, - 0x6a, 0x06, 0xa0, 0x6a, 0x06, 0xa0, - 0x86, 0x08, 0x60, 0x86, 0x08, 0x60, - 0x24, 0x82, 0x48, 0x24, 0x82, 0x48, - 0x89, 0x08, 0x90, 0x89, 0x08, 0x90, - 0xc0, 0x2c, 0x02, 0xc0, 0x2c, 0x02, - 0x10, 0x61, 0x06, 0x10, 0x61, 0x06, - 0x02, 0x30, 0x23, 0x02, 0x30, 0x23, - 0x40, 0x54, 0x05, 0x40, 0x54, 0x05, - 0x21, 0x82, 0x18, 0x21, 0x82, 0x18, - 0x81, 0x18, 0x11, 0x81, 0x18, 0x11, - 0x14, 0x81, 0x48, 0x14, 0x81, 0x48, - 0x98, 0x09, 0x80, 0x98, 0x09, 0x80, - 0x08, 0x90, 0x89, 0x08, 0x90, 0x89, - 0x62, 0x06, 0x20, 0x62, 0x06, 0x20, - 0x24, 0x22, 0x42, 0x24, 0x22, 0x42, - 0x8a, 0x08, 0xa0, 0x8a, 0x08, 0xa0, - 0x84, 0x48, 0x44, 0x84, 0x48, 0x44, - 0xff, 0x9b, 0xdf, 0xec, 0xae, 0x0e -}; - -const uint8_t kMaskRandom48_5[30] = { - 0x53, 0x65, 0x36, 0x53, 0x65, 0x36, - 0x64, 0xb6, 0x4b, 0x64, 0xb6, 0x4b, - 0x0e, 0xe0, 0xee, 0x0e, 0xe0, 0xee, - 0xa9, 0xca, 0x9c, 0xa9, 0xca, 0x9c, - 0xb8, 0x3b, 0x83, 0xb8, 0x3b, 0x83 -}; - -const uint8_t kMaskRandom48_6[36] = { - 0xd1, 0x4d, 0x14, 0xd1, 0x4d, 0x14, - 0x45, 0x34, 0x53, 0x45, 0x34, 0x53, - 0x22, 0xd2, 0x2d, 0x22, 0xd2, 0x2d, - 0x16, 0xc1, 0x6c, 0x16, 0xc1, 0x6c, - 0x0b, 0xa0, 0xba, 0x0b, 0xa0, 0xba, - 0xe8, 0x8e, 0x88, 0xe8, 0x8e, 0x88 -}; - -const uint8_t kMaskRandom48_7[42] = { - 0xd3, 0x65, 0x36, 0xd3, 0x65, 0x36, - 0x25, 0x32, 0x53, 0x25, 0x32, 0x53, - 0x30, 0xd3, 0x05, 0x30, 0xd3, 0x05, - 0x06, 0x48, 0x6c, 0x06, 0x48, 0x6c, - 0xc0, 0xb8, 0x1b, 0xc0, 0xb8, 0x1b, - 0x2a, 0xa2, 0xaa, 0x2a, 0xa2, 0xaa, - 0xa8, 0x4e, 0x84, 0xa8, 0x4e, 0x84 -}; - -const uint8_t kMaskRandom48_8[48] = { - 0x81, 0x60, 0x16, 0x81, 0x60, 0x16, - 0x40, 0x3c, 0x03, 0x40, 0x3c, 0x03, - 0x10, 0x91, 0x09, 0x10, 0x91, 0x09, - 0x06, 0x50, 0x65, 0x06, 0x50, 0x65, - 0x20, 0x4a, 0x84, 0x20, 0x4a, 0x84, - 0x8a, 0xa0, 0xaa, 0x8a, 0xa0, 0xaa, - 0x33, 0x03, 0x30, 0x33, 0x03, 0x30, - 0x4c, 0x84, 0xc8, 0x4c, 0x84, 0xc8 -}; - -const uint8_t kMaskRandom48_9[54] = { - 0xd3, 0x65, 0x36, 0xd3, 0x65, 0x36, - 0x64, 0x26, 0x42, 0x64, 0x26, 0x42, - 0x18, 0x41, 0xc4, 0x18, 0x41, 0xc4, - 0xa0, 0x4a, 0x04, 0xa0, 0x4a, 0x04, - 0x81, 0x38, 0x13, 0x81, 0x38, 0x13, - 0x22, 0xa2, 0x2a, 0x22, 0xa2, 0x2a, - 0x08, 0x70, 0x87, 0x08, 0x70, 0x87, - 0x04, 0x90, 0x49, 0x04, 0x90, 0x49, - 0x01, 0xc0, 0x1c, 0x01, 0xc0, 0x1c -}; - -const uint8_t kMaskRandom4_1[2] = { - 0xf0, 0x00 -}; - -const uint8_t kMaskRandom4_2[4] = { - 0xc0, 0x00, - 0xb0, 0x00 -}; - -const uint8_t kMaskRandom4_3[6] = { - 0xc0, 0x00, - 0xb0, 0x00, - 0x60, 0x00 -}; - -const uint8_t kMaskRandom4_4[8] = { - 0xc0, 0x00, - 0xa0, 0x00, - 0x30, 0x00, - 0x50, 0x00 -}; - -const uint8_t kMaskRandom5_1[2] = { - 0xf8, 0x00 -}; - -const uint8_t kMaskRandom5_2[4] = { - 0xa8, 0x00, - 0xd0, 0x00 -}; - -const uint8_t kMaskRandom5_3[6] = { - 0xb0, 0x00, - 0xc8, 0x00, - 0x50, 0x00 -}; - -const uint8_t kMaskRandom5_4[8] = { - 0xc8, 0x00, - 0xb0, 0x00, - 0x50, 0x00, - 0x28, 0x00 -}; - -const uint8_t kMaskRandom5_5[10] = { - 0xc0, 0x00, - 0x30, 0x00, - 0x18, 0x00, - 0xa0, 0x00, - 0x48, 0x00 -}; - -const uint8_t kMaskRandom6_1[2] = { - 0xfc, 0x00 -}; - -const uint8_t kMaskRandom6_2[4] = { - 0xa8, 0x00, - 0xd4, 0x00 -}; - -const uint8_t kMaskRandom6_3[6] = { - 0xd0, 0x00, - 0x68, 0x00, - 0xa4, 0x00 -}; - -const uint8_t kMaskRandom6_4[8] = { - 0xa8, 0x00, - 0x58, 0x00, - 0x64, 0x00, - 0x94, 0x00 -}; - -const uint8_t kMaskRandom6_5[10] = { - 0xa8, 0x00, - 0x84, 0x00, - 0x64, 0x00, - 0x90, 0x00, - 0x58, 0x00 -}; - -const uint8_t kMaskRandom6_6[12] = { - 0x98, 0x00, - 0x64, 0x00, - 0x50, 0x00, - 0x14, 0x00, - 0xa8, 0x00, - 0xe0, 0x00 -}; - -const uint8_t kMaskRandom7_1[2] = { - 0xfe, 0x00 -}; - -const uint8_t kMaskRandom7_2[4] = { - 0xd4, 0x00, - 0xaa, 0x00 -}; - -const uint8_t kMaskRandom7_3[6] = { - 0xd0, 0x00, - 0xaa, 0x00, - 0x64, 0x00 -}; - -const uint8_t kMaskRandom7_4[8] = { - 0xd0, 0x00, - 0xaa, 0x00, - 0x64, 0x00, - 0x1c, 0x00 -}; - -const uint8_t kMaskRandom7_5[10] = { - 0x0c, 0x00, - 0xb0, 0x00, - 0x1a, 0x00, - 0xc4, 0x00, - 0x62, 0x00 -}; - -const uint8_t kMaskRandom7_6[12] = { - 0x8c, 0x00, - 0x4a, 0x00, - 0x64, 0x00, - 0xd0, 0x00, - 0xa0, 0x00, - 0x32, 0x00 -}; - -const uint8_t kMaskRandom7_7[14] = { - 0x4a, 0x00, - 0x94, 0x00, - 0x1a, 0x00, - 0xc4, 0x00, - 0x28, 0x00, - 0xc2, 0x00, - 0x34, 0x00 -}; - -const uint8_t kMaskRandom8_1[2] = { - 0xff, 0x00 -}; - -const uint8_t kMaskRandom8_2[4] = { - 0xaa, 0x00, - 0xd5, 0x00 -}; - -const uint8_t kMaskRandom8_3[6] = { - 0xc5, 0x00, - 0x92, 0x00, - 0x6a, 0x00 -}; - -const uint8_t kMaskRandom8_4[8] = { - 0x45, 0x00, - 0xb4, 0x00, - 0x6a, 0x00, - 0x89, 0x00 -}; - -const uint8_t kMaskRandom8_5[10] = { - 0x8c, 0x00, - 0x92, 0x00, - 0x2b, 0x00, - 0x51, 0x00, - 0x64, 0x00 -}; - -const uint8_t kMaskRandom8_6[12] = { - 0xa1, 0x00, - 0x52, 0x00, - 0x91, 0x00, - 0x2a, 0x00, - 0xc4, 0x00, - 0x4c, 0x00 -}; - -const uint8_t kMaskRandom8_7[14] = { - 0x15, 0x00, - 0xc2, 0x00, - 0x25, 0x00, - 0x62, 0x00, - 0x58, 0x00, - 0x8c, 0x00, - 0xa3, 0x00 -}; - -const uint8_t kMaskRandom8_8[16] = { - 0x25, 0x00, - 0x8a, 0x00, - 0x91, 0x00, - 0x68, 0x00, - 0x32, 0x00, - 0x43, 0x00, - 0xc4, 0x00, - 0x1c, 0x00 -}; - -const uint8_t kMaskRandom9_1[2] = { - 0xff, 0x80 -}; - -const uint8_t kMaskRandom9_2[4] = { - 0xaa, 0x80, - 0xd5, 0x00 -}; - -const uint8_t kMaskRandom9_3[6] = { - 0xa5, 0x00, - 0xc8, 0x00, - 0x52, 0x80 -}; - -const uint8_t kMaskRandom9_4[8] = { - 0xa2, 0x00, - 0xc9, 0x00, - 0x52, 0x80, - 0x24, 0x80 -}; - -const uint8_t kMaskRandom9_5[10] = { - 0x8c, 0x00, - 0x25, 0x00, - 0x92, 0x80, - 0x41, 0x80, - 0x58, 0x00 -}; - -const uint8_t kMaskRandom9_6[12] = { - 0x84, 0x80, - 0x27, 0x00, - 0x51, 0x80, - 0x1a, 0x00, - 0x68, 0x00, - 0x89, 0x00 -}; - -const uint8_t kMaskRandom9_7[14] = { - 0x8c, 0x00, - 0x47, 0x00, - 0x81, 0x80, - 0x12, 0x80, - 0x58, 0x00, - 0x28, 0x80, - 0xb4, 0x00 -}; - -const uint8_t kMaskRandom9_8[16] = { - 0x2c, 0x00, - 0x91, 0x00, - 0x40, 0x80, - 0x06, 0x80, - 0xc8, 0x00, - 0x45, 0x00, - 0x30, 0x80, - 0xa2, 0x00 -}; - -const uint8_t kMaskRandom9_9[18] = { - 0x4c, 0x00, - 0x62, 0x00, - 0x91, 0x00, - 0x42, 0x80, - 0xa4, 0x00, - 0x13, 0x00, - 0x30, 0x80, - 0x88, 0x80, - 0x09, 0x00 -}; - -const uint8_t* kPacketMaskRandom1[1] = { - kMaskRandom1_1 -}; - -const uint8_t* kPacketMaskRandom2[2] = { - kMaskRandom2_1, - kMaskRandom2_2 -}; - -const uint8_t* kPacketMaskRandom3[3] = { - kMaskRandom3_1, - kMaskRandom3_2, - kMaskRandom3_3 -}; - -const uint8_t* kPacketMaskRandom4[4] = { - kMaskRandom4_1, - kMaskRandom4_2, - kMaskRandom4_3, - kMaskRandom4_4 -}; - -const uint8_t* kPacketMaskRandom5[5] = { - kMaskRandom5_1, - kMaskRandom5_2, - kMaskRandom5_3, - kMaskRandom5_4, - kMaskRandom5_5 -}; - -const uint8_t* kPacketMaskRandom6[6] = { - kMaskRandom6_1, - kMaskRandom6_2, - kMaskRandom6_3, - kMaskRandom6_4, - kMaskRandom6_5, - kMaskRandom6_6 -}; - -const uint8_t* kPacketMaskRandom7[7] = { - kMaskRandom7_1, - kMaskRandom7_2, - kMaskRandom7_3, - kMaskRandom7_4, - kMaskRandom7_5, - kMaskRandom7_6, - kMaskRandom7_7 -}; - -const uint8_t* kPacketMaskRandom8[8] = { - kMaskRandom8_1, - kMaskRandom8_2, - kMaskRandom8_3, - kMaskRandom8_4, - kMaskRandom8_5, - kMaskRandom8_6, - kMaskRandom8_7, - kMaskRandom8_8 -}; - -const uint8_t* kPacketMaskRandom9[9] = { - kMaskRandom9_1, - kMaskRandom9_2, - kMaskRandom9_3, - kMaskRandom9_4, - kMaskRandom9_5, - kMaskRandom9_6, - kMaskRandom9_7, - kMaskRandom9_8, - kMaskRandom9_9 -}; - -const uint8_t* kPacketMaskRandom10[10] = { - kMaskRandom10_1, - kMaskRandom10_2, - kMaskRandom10_3, - kMaskRandom10_4, - kMaskRandom10_5, - kMaskRandom10_6, - kMaskRandom10_7, - kMaskRandom10_8, - kMaskRandom10_9, - kMaskRandom10_10 -}; - -const uint8_t* kPacketMaskRandom11[11] = { - kMaskRandom11_1, - kMaskRandom11_2, - kMaskRandom11_3, - kMaskRandom11_4, - kMaskRandom11_5, - kMaskRandom11_6, - kMaskRandom11_7, - kMaskRandom11_8, - kMaskRandom11_9, - kMaskRandom11_10, - kMaskRandom11_11 -}; - -const uint8_t* kPacketMaskRandom12[12] = { - kMaskRandom12_1, - kMaskRandom12_2, - kMaskRandom12_3, - kMaskRandom12_4, - kMaskRandom12_5, - kMaskRandom12_6, - kMaskRandom12_7, - kMaskRandom12_8, - kMaskRandom12_9, - kMaskRandom12_10, - kMaskRandom12_11, - kMaskRandom12_12 -}; - -const uint8_t* kPacketMaskRandom13[13] = { - kMaskRandom13_1, - kMaskRandom13_2, - kMaskRandom13_3, - kMaskRandom13_4, - kMaskRandom13_5, - kMaskRandom13_6, - kMaskRandom13_7, - kMaskRandom13_8, - kMaskRandom13_9, - kMaskRandom13_10, - kMaskRandom13_11, - kMaskRandom13_12, - kMaskRandom13_13 -}; - -const uint8_t* kPacketMaskRandom14[14] = { - kMaskRandom14_1, - kMaskRandom14_2, - kMaskRandom14_3, - kMaskRandom14_4, - kMaskRandom14_5, - kMaskRandom14_6, - kMaskRandom14_7, - kMaskRandom14_8, - kMaskRandom14_9, - kMaskRandom14_10, - kMaskRandom14_11, - kMaskRandom14_12, - kMaskRandom14_13, - kMaskRandom14_14 -}; - -const uint8_t* kPacketMaskRandom15[15] = { - kMaskRandom15_1, - kMaskRandom15_2, - kMaskRandom15_3, - kMaskRandom15_4, - kMaskRandom15_5, - kMaskRandom15_6, - kMaskRandom15_7, - kMaskRandom15_8, - kMaskRandom15_9, - kMaskRandom15_10, - kMaskRandom15_11, - kMaskRandom15_12, - kMaskRandom15_13, - kMaskRandom15_14, - kMaskRandom15_15 -}; - -const uint8_t* kPacketMaskRandom16[16] = { - kMaskRandom16_1, - kMaskRandom16_2, - kMaskRandom16_3, - kMaskRandom16_4, - kMaskRandom16_5, - kMaskRandom16_6, - kMaskRandom16_7, - kMaskRandom16_8, - kMaskRandom16_9, - kMaskRandom16_10, - kMaskRandom16_11, - kMaskRandom16_12, - kMaskRandom16_13, - kMaskRandom16_14, - kMaskRandom16_15, - kMaskRandom16_16 -}; - -const uint8_t* kPacketMaskRandom17[17] = { - kMaskRandom17_1, - kMaskRandom17_2, - kMaskRandom17_3, - kMaskRandom17_4, - kMaskRandom17_5, - kMaskRandom17_6, - kMaskRandom17_7, - kMaskRandom17_8, - kMaskRandom17_9, - kMaskRandom17_10, - kMaskRandom17_11, - kMaskRandom17_12, - kMaskRandom17_13, - kMaskRandom17_14, - kMaskRandom17_15, - kMaskRandom17_16, - kMaskRandom17_17 -}; - -const uint8_t* kPacketMaskRandom18[18] = { - kMaskRandom18_1, - kMaskRandom18_2, - kMaskRandom18_3, - kMaskRandom18_4, - kMaskRandom18_5, - kMaskRandom18_6, - kMaskRandom18_7, - kMaskRandom18_8, - kMaskRandom18_9, - kMaskRandom18_10, - kMaskRandom18_11, - kMaskRandom18_12, - kMaskRandom18_13, - kMaskRandom18_14, - kMaskRandom18_15, - kMaskRandom18_16, - kMaskRandom18_17, - kMaskRandom18_18 -}; - -const uint8_t* kPacketMaskRandom19[19] = { - kMaskRandom19_1, - kMaskRandom19_2, - kMaskRandom19_3, - kMaskRandom19_4, - kMaskRandom19_5, - kMaskRandom19_6, - kMaskRandom19_7, - kMaskRandom19_8, - kMaskRandom19_9, - kMaskRandom19_10, - kMaskRandom19_11, - kMaskRandom19_12, - kMaskRandom19_13, - kMaskRandom19_14, - kMaskRandom19_15, - kMaskRandom19_16, - kMaskRandom19_17, - kMaskRandom19_18, - kMaskRandom19_19 -}; - -const uint8_t* kPacketMaskRandom20[20] = { - kMaskRandom20_1, - kMaskRandom20_2, - kMaskRandom20_3, - kMaskRandom20_4, - kMaskRandom20_5, - kMaskRandom20_6, - kMaskRandom20_7, - kMaskRandom20_8, - kMaskRandom20_9, - kMaskRandom20_10, - kMaskRandom20_11, - kMaskRandom20_12, - kMaskRandom20_13, - kMaskRandom20_14, - kMaskRandom20_15, - kMaskRandom20_16, - kMaskRandom20_17, - kMaskRandom20_18, - kMaskRandom20_19, - kMaskRandom20_20 -}; - -const uint8_t* kPacketMaskRandom21[21] = { - kMaskRandom21_1, - kMaskRandom21_2, - kMaskRandom21_3, - kMaskRandom21_4, - kMaskRandom21_5, - kMaskRandom21_6, - kMaskRandom21_7, - kMaskRandom21_8, - kMaskRandom21_9, - kMaskRandom21_10, - kMaskRandom21_11, - kMaskRandom21_12, - kMaskRandom21_13, - kMaskRandom21_14, - kMaskRandom21_15, - kMaskRandom21_16, - kMaskRandom21_17, - kMaskRandom21_18, - kMaskRandom21_19, - kMaskRandom21_20, - kMaskRandom21_21 -}; - -const uint8_t* kPacketMaskRandom22[22] = { - kMaskRandom22_1, - kMaskRandom22_2, - kMaskRandom22_3, - kMaskRandom22_4, - kMaskRandom22_5, - kMaskRandom22_6, - kMaskRandom22_7, - kMaskRandom22_8, - kMaskRandom22_9, - kMaskRandom22_10, - kMaskRandom22_11, - kMaskRandom22_12, - kMaskRandom22_13, - kMaskRandom22_14, - kMaskRandom22_15, - kMaskRandom22_16, - kMaskRandom22_17, - kMaskRandom22_18, - kMaskRandom22_19, - kMaskRandom22_20, - kMaskRandom22_21, - kMaskRandom22_22 -}; - -const uint8_t* kPacketMaskRandom23[23] = { - kMaskRandom23_1, - kMaskRandom23_2, - kMaskRandom23_3, - kMaskRandom23_4, - kMaskRandom23_5, - kMaskRandom23_6, - kMaskRandom23_7, - kMaskRandom23_8, - kMaskRandom23_9, - kMaskRandom23_10, - kMaskRandom23_11, - kMaskRandom23_12, - kMaskRandom23_13, - kMaskRandom23_14, - kMaskRandom23_15, - kMaskRandom23_16, - kMaskRandom23_17, - kMaskRandom23_18, - kMaskRandom23_19, - kMaskRandom23_20, - kMaskRandom23_21, - kMaskRandom23_22, - kMaskRandom23_23 -}; - -const uint8_t* kPacketMaskRandom24[24] = { - kMaskRandom24_1, - kMaskRandom24_2, - kMaskRandom24_3, - kMaskRandom24_4, - kMaskRandom24_5, - kMaskRandom24_6, - kMaskRandom24_7, - kMaskRandom24_8, - kMaskRandom24_9, - kMaskRandom24_10, - kMaskRandom24_11, - kMaskRandom24_12, - kMaskRandom24_13, - kMaskRandom24_14, - kMaskRandom24_15, - kMaskRandom24_16, - kMaskRandom24_17, - kMaskRandom24_18, - kMaskRandom24_19, - kMaskRandom24_20, - kMaskRandom24_21, - kMaskRandom24_22, - kMaskRandom24_23, - kMaskRandom24_24 -}; - -const uint8_t* kPacketMaskRandom25[25] = { - kMaskRandom25_1, - kMaskRandom25_2, - kMaskRandom25_3, - kMaskRandom25_4, - kMaskRandom25_5, - kMaskRandom25_6, - kMaskRandom25_7, - kMaskRandom25_8, - kMaskRandom25_9, - kMaskRandom25_10, - kMaskRandom25_11, - kMaskRandom25_12, - kMaskRandom25_13, - kMaskRandom25_14, - kMaskRandom25_15, - kMaskRandom25_16, - kMaskRandom25_17, - kMaskRandom25_18, - kMaskRandom25_19, - kMaskRandom25_20, - kMaskRandom25_21, - kMaskRandom25_22, - kMaskRandom25_23, - kMaskRandom25_24, - kMaskRandom25_25 -}; - -const uint8_t* kPacketMaskRandom26[26] = { - kMaskRandom26_1, - kMaskRandom26_2, - kMaskRandom26_3, - kMaskRandom26_4, - kMaskRandom26_5, - kMaskRandom26_6, - kMaskRandom26_7, - kMaskRandom26_8, - kMaskRandom26_9, - kMaskRandom26_10, - kMaskRandom26_11, - kMaskRandom26_12, - kMaskRandom26_13, - kMaskRandom26_14, - kMaskRandom26_15, - kMaskRandom26_16, - kMaskRandom26_17, - kMaskRandom26_18, - kMaskRandom26_19, - kMaskRandom26_20, - kMaskRandom26_21, - kMaskRandom26_22, - kMaskRandom26_23, - kMaskRandom26_24, - kMaskRandom26_25, - kMaskRandom26_26 -}; - -const uint8_t* kPacketMaskRandom27[27] = { - kMaskRandom27_1, - kMaskRandom27_2, - kMaskRandom27_3, - kMaskRandom27_4, - kMaskRandom27_5, - kMaskRandom27_6, - kMaskRandom27_7, - kMaskRandom27_8, - kMaskRandom27_9, - kMaskRandom27_10, - kMaskRandom27_11, - kMaskRandom27_12, - kMaskRandom27_13, - kMaskRandom27_14, - kMaskRandom27_15, - kMaskRandom27_16, - kMaskRandom27_17, - kMaskRandom27_18, - kMaskRandom27_19, - kMaskRandom27_20, - kMaskRandom27_21, - kMaskRandom27_22, - kMaskRandom27_23, - kMaskRandom27_24, - kMaskRandom27_25, - kMaskRandom27_26, - kMaskRandom27_27 -}; - -const uint8_t* kPacketMaskRandom28[28] = { - kMaskRandom28_1, - kMaskRandom28_2, - kMaskRandom28_3, - kMaskRandom28_4, - kMaskRandom28_5, - kMaskRandom28_6, - kMaskRandom28_7, - kMaskRandom28_8, - kMaskRandom28_9, - kMaskRandom28_10, - kMaskRandom28_11, - kMaskRandom28_12, - kMaskRandom28_13, - kMaskRandom28_14, - kMaskRandom28_15, - kMaskRandom28_16, - kMaskRandom28_17, - kMaskRandom28_18, - kMaskRandom28_19, - kMaskRandom28_20, - kMaskRandom28_21, - kMaskRandom28_22, - kMaskRandom28_23, - kMaskRandom28_24, - kMaskRandom28_25, - kMaskRandom28_26, - kMaskRandom28_27, - kMaskRandom28_28 -}; - -const uint8_t* kPacketMaskRandom29[29] = { - kMaskRandom29_1, - kMaskRandom29_2, - kMaskRandom29_3, - kMaskRandom29_4, - kMaskRandom29_5, - kMaskRandom29_6, - kMaskRandom29_7, - kMaskRandom29_8, - kMaskRandom29_9, - kMaskRandom29_10, - kMaskRandom29_11, - kMaskRandom29_12, - kMaskRandom29_13, - kMaskRandom29_14, - kMaskRandom29_15, - kMaskRandom29_16, - kMaskRandom29_17, - kMaskRandom29_18, - kMaskRandom29_19, - kMaskRandom29_20, - kMaskRandom29_21, - kMaskRandom29_22, - kMaskRandom29_23, - kMaskRandom29_24, - kMaskRandom29_25, - kMaskRandom29_26, - kMaskRandom29_27, - kMaskRandom29_28, - kMaskRandom29_29 -}; - -const uint8_t* kPacketMaskRandom30[30] = { - kMaskRandom30_1, - kMaskRandom30_2, - kMaskRandom30_3, - kMaskRandom30_4, - kMaskRandom30_5, - kMaskRandom30_6, - kMaskRandom30_7, - kMaskRandom30_8, - kMaskRandom30_9, - kMaskRandom30_10, - kMaskRandom30_11, - kMaskRandom30_12, - kMaskRandom30_13, - kMaskRandom30_14, - kMaskRandom30_15, - kMaskRandom30_16, - kMaskRandom30_17, - kMaskRandom30_18, - kMaskRandom30_19, - kMaskRandom30_20, - kMaskRandom30_21, - kMaskRandom30_22, - kMaskRandom30_23, - kMaskRandom30_24, - kMaskRandom30_25, - kMaskRandom30_26, - kMaskRandom30_27, - kMaskRandom30_28, - kMaskRandom30_29, - kMaskRandom30_30 -}; - -const uint8_t* kPacketMaskRandom31[31] = { - kMaskRandom31_1, - kMaskRandom31_2, - kMaskRandom31_3, - kMaskRandom31_4, - kMaskRandom31_5, - kMaskRandom31_6, - kMaskRandom31_7, - kMaskRandom31_8, - kMaskRandom31_9, - kMaskRandom31_10, - kMaskRandom31_11, - kMaskRandom31_12, - kMaskRandom31_13, - kMaskRandom31_14, - kMaskRandom31_15, - kMaskRandom31_16, - kMaskRandom31_17, - kMaskRandom31_18, - kMaskRandom31_19, - kMaskRandom31_20, - kMaskRandom31_21, - kMaskRandom31_22, - kMaskRandom31_23, - kMaskRandom31_24, - kMaskRandom31_25, - kMaskRandom31_26, - kMaskRandom31_27, - kMaskRandom31_28, - kMaskRandom31_29, - kMaskRandom31_30, - kMaskRandom31_31 -}; - -const uint8_t* kPacketMaskRandom32[32] = { - kMaskRandom32_1, - kMaskRandom32_2, - kMaskRandom32_3, - kMaskRandom32_4, - kMaskRandom32_5, - kMaskRandom32_6, - kMaskRandom32_7, - kMaskRandom32_8, - kMaskRandom32_9, - kMaskRandom32_10, - kMaskRandom32_11, - kMaskRandom32_12, - kMaskRandom32_13, - kMaskRandom32_14, - kMaskRandom32_15, - kMaskRandom32_16, - kMaskRandom32_17, - kMaskRandom32_18, - kMaskRandom32_19, - kMaskRandom32_20, - kMaskRandom32_21, - kMaskRandom32_22, - kMaskRandom32_23, - kMaskRandom32_24, - kMaskRandom32_25, - kMaskRandom32_26, - kMaskRandom32_27, - kMaskRandom32_28, - kMaskRandom32_29, - kMaskRandom32_30, - kMaskRandom32_31, - kMaskRandom32_32 -}; - -const uint8_t* kPacketMaskRandom33[33] = { - kMaskRandom33_1, - kMaskRandom33_2, - kMaskRandom33_3, - kMaskRandom33_4, - kMaskRandom33_5, - kMaskRandom33_6, - kMaskRandom33_7, - kMaskRandom33_8, - kMaskRandom33_9, - kMaskRandom33_10, - kMaskRandom33_11, - kMaskRandom33_12, - kMaskRandom33_13, - kMaskRandom33_14, - kMaskRandom33_15, - kMaskRandom33_16, - kMaskRandom33_17, - kMaskRandom33_18, - kMaskRandom33_19, - kMaskRandom33_20, - kMaskRandom33_21, - kMaskRandom33_22, - kMaskRandom33_23, - kMaskRandom33_24, - kMaskRandom33_25, - kMaskRandom33_26, - kMaskRandom33_27, - kMaskRandom33_28, - kMaskRandom33_29, - kMaskRandom33_30, - kMaskRandom33_31, - kMaskRandom33_32, - kMaskRandom33_33 -}; - -const uint8_t* kPacketMaskRandom34[34] = { - kMaskRandom34_1, - kMaskRandom34_2, - kMaskRandom34_3, - kMaskRandom34_4, - kMaskRandom34_5, - kMaskRandom34_6, - kMaskRandom34_7, - kMaskRandom34_8, - kMaskRandom34_9, - kMaskRandom34_10, - kMaskRandom34_11, - kMaskRandom34_12, - kMaskRandom34_13, - kMaskRandom34_14, - kMaskRandom34_15, - kMaskRandom34_16, - kMaskRandom34_17, - kMaskRandom34_18, - kMaskRandom34_19, - kMaskRandom34_20, - kMaskRandom34_21, - kMaskRandom34_22, - kMaskRandom34_23, - kMaskRandom34_24, - kMaskRandom34_25, - kMaskRandom34_26, - kMaskRandom34_27, - kMaskRandom34_28, - kMaskRandom34_29, - kMaskRandom34_30, - kMaskRandom34_31, - kMaskRandom34_32, - kMaskRandom34_33, - kMaskRandom34_34 -}; - -const uint8_t* kPacketMaskRandom35[35] = { - kMaskRandom35_1, - kMaskRandom35_2, - kMaskRandom35_3, - kMaskRandom35_4, - kMaskRandom35_5, - kMaskRandom35_6, - kMaskRandom35_7, - kMaskRandom35_8, - kMaskRandom35_9, - kMaskRandom35_10, - kMaskRandom35_11, - kMaskRandom35_12, - kMaskRandom35_13, - kMaskRandom35_14, - kMaskRandom35_15, - kMaskRandom35_16, - kMaskRandom35_17, - kMaskRandom35_18, - kMaskRandom35_19, - kMaskRandom35_20, - kMaskRandom35_21, - kMaskRandom35_22, - kMaskRandom35_23, - kMaskRandom35_24, - kMaskRandom35_25, - kMaskRandom35_26, - kMaskRandom35_27, - kMaskRandom35_28, - kMaskRandom35_29, - kMaskRandom35_30, - kMaskRandom35_31, - kMaskRandom35_32, - kMaskRandom35_33, - kMaskRandom35_34, - kMaskRandom35_35 -}; - -const uint8_t* kPacketMaskRandom36[36] = { - kMaskRandom36_1, - kMaskRandom36_2, - kMaskRandom36_3, - kMaskRandom36_4, - kMaskRandom36_5, - kMaskRandom36_6, - kMaskRandom36_7, - kMaskRandom36_8, - kMaskRandom36_9, - kMaskRandom36_10, - kMaskRandom36_11, - kMaskRandom36_12, - kMaskRandom36_13, - kMaskRandom36_14, - kMaskRandom36_15, - kMaskRandom36_16, - kMaskRandom36_17, - kMaskRandom36_18, - kMaskRandom36_19, - kMaskRandom36_20, - kMaskRandom36_21, - kMaskRandom36_22, - kMaskRandom36_23, - kMaskRandom36_24, - kMaskRandom36_25, - kMaskRandom36_26, - kMaskRandom36_27, - kMaskRandom36_28, - kMaskRandom36_29, - kMaskRandom36_30, - kMaskRandom36_31, - kMaskRandom36_32, - kMaskRandom36_33, - kMaskRandom36_34, - kMaskRandom36_35, - kMaskRandom36_36 -}; - -const uint8_t* kPacketMaskRandom37[37] = { - kMaskRandom37_1, - kMaskRandom37_2, - kMaskRandom37_3, - kMaskRandom37_4, - kMaskRandom37_5, - kMaskRandom37_6, - kMaskRandom37_7, - kMaskRandom37_8, - kMaskRandom37_9, - kMaskRandom37_10, - kMaskRandom37_11, - kMaskRandom37_12, - kMaskRandom37_13, - kMaskRandom37_14, - kMaskRandom37_15, - kMaskRandom37_16, - kMaskRandom37_17, - kMaskRandom37_18, - kMaskRandom37_19, - kMaskRandom37_20, - kMaskRandom37_21, - kMaskRandom37_22, - kMaskRandom37_23, - kMaskRandom37_24, - kMaskRandom37_25, - kMaskRandom37_26, - kMaskRandom37_27, - kMaskRandom37_28, - kMaskRandom37_29, - kMaskRandom37_30, - kMaskRandom37_31, - kMaskRandom37_32, - kMaskRandom37_33, - kMaskRandom37_34, - kMaskRandom37_35, - kMaskRandom37_36, - kMaskRandom37_37 -}; - -const uint8_t* kPacketMaskRandom38[38] = { - kMaskRandom38_1, - kMaskRandom38_2, - kMaskRandom38_3, - kMaskRandom38_4, - kMaskRandom38_5, - kMaskRandom38_6, - kMaskRandom38_7, - kMaskRandom38_8, - kMaskRandom38_9, - kMaskRandom38_10, - kMaskRandom38_11, - kMaskRandom38_12, - kMaskRandom38_13, - kMaskRandom38_14, - kMaskRandom38_15, - kMaskRandom38_16, - kMaskRandom38_17, - kMaskRandom38_18, - kMaskRandom38_19, - kMaskRandom38_20, - kMaskRandom38_21, - kMaskRandom38_22, - kMaskRandom38_23, - kMaskRandom38_24, - kMaskRandom38_25, - kMaskRandom38_26, - kMaskRandom38_27, - kMaskRandom38_28, - kMaskRandom38_29, - kMaskRandom38_30, - kMaskRandom38_31, - kMaskRandom38_32, - kMaskRandom38_33, - kMaskRandom38_34, - kMaskRandom38_35, - kMaskRandom38_36, - kMaskRandom38_37, - kMaskRandom38_38 -}; - -const uint8_t* kPacketMaskRandom39[39] = { - kMaskRandom39_1, - kMaskRandom39_2, - kMaskRandom39_3, - kMaskRandom39_4, - kMaskRandom39_5, - kMaskRandom39_6, - kMaskRandom39_7, - kMaskRandom39_8, - kMaskRandom39_9, - kMaskRandom39_10, - kMaskRandom39_11, - kMaskRandom39_12, - kMaskRandom39_13, - kMaskRandom39_14, - kMaskRandom39_15, - kMaskRandom39_16, - kMaskRandom39_17, - kMaskRandom39_18, - kMaskRandom39_19, - kMaskRandom39_20, - kMaskRandom39_21, - kMaskRandom39_22, - kMaskRandom39_23, - kMaskRandom39_24, - kMaskRandom39_25, - kMaskRandom39_26, - kMaskRandom39_27, - kMaskRandom39_28, - kMaskRandom39_29, - kMaskRandom39_30, - kMaskRandom39_31, - kMaskRandom39_32, - kMaskRandom39_33, - kMaskRandom39_34, - kMaskRandom39_35, - kMaskRandom39_36, - kMaskRandom39_37, - kMaskRandom39_38, - kMaskRandom39_39 -}; - -const uint8_t* kPacketMaskRandom40[40] = { - kMaskRandom40_1, - kMaskRandom40_2, - kMaskRandom40_3, - kMaskRandom40_4, - kMaskRandom40_5, - kMaskRandom40_6, - kMaskRandom40_7, - kMaskRandom40_8, - kMaskRandom40_9, - kMaskRandom40_10, - kMaskRandom40_11, - kMaskRandom40_12, - kMaskRandom40_13, - kMaskRandom40_14, - kMaskRandom40_15, - kMaskRandom40_16, - kMaskRandom40_17, - kMaskRandom40_18, - kMaskRandom40_19, - kMaskRandom40_20, - kMaskRandom40_21, - kMaskRandom40_22, - kMaskRandom40_23, - kMaskRandom40_24, - kMaskRandom40_25, - kMaskRandom40_26, - kMaskRandom40_27, - kMaskRandom40_28, - kMaskRandom40_29, - kMaskRandom40_30, - kMaskRandom40_31, - kMaskRandom40_32, - kMaskRandom40_33, - kMaskRandom40_34, - kMaskRandom40_35, - kMaskRandom40_36, - kMaskRandom40_37, - kMaskRandom40_38, - kMaskRandom40_39, - kMaskRandom40_40 -}; - -const uint8_t* kPacketMaskRandom41[41] = { - kMaskRandom41_1, - kMaskRandom41_2, - kMaskRandom41_3, - kMaskRandom41_4, - kMaskRandom41_5, - kMaskRandom41_6, - kMaskRandom41_7, - kMaskRandom41_8, - kMaskRandom41_9, - kMaskRandom41_10, - kMaskRandom41_11, - kMaskRandom41_12, - kMaskRandom41_13, - kMaskRandom41_14, - kMaskRandom41_15, - kMaskRandom41_16, - kMaskRandom41_17, - kMaskRandom41_18, - kMaskRandom41_19, - kMaskRandom41_20, - kMaskRandom41_21, - kMaskRandom41_22, - kMaskRandom41_23, - kMaskRandom41_24, - kMaskRandom41_25, - kMaskRandom41_26, - kMaskRandom41_27, - kMaskRandom41_28, - kMaskRandom41_29, - kMaskRandom41_30, - kMaskRandom41_31, - kMaskRandom41_32, - kMaskRandom41_33, - kMaskRandom41_34, - kMaskRandom41_35, - kMaskRandom41_36, - kMaskRandom41_37, - kMaskRandom41_38, - kMaskRandom41_39, - kMaskRandom41_40, - kMaskRandom41_41 -}; - -const uint8_t* kPacketMaskRandom42[42] = { - kMaskRandom42_1, - kMaskRandom42_2, - kMaskRandom42_3, - kMaskRandom42_4, - kMaskRandom42_5, - kMaskRandom42_6, - kMaskRandom42_7, - kMaskRandom42_8, - kMaskRandom42_9, - kMaskRandom42_10, - kMaskRandom42_11, - kMaskRandom42_12, - kMaskRandom42_13, - kMaskRandom42_14, - kMaskRandom42_15, - kMaskRandom42_16, - kMaskRandom42_17, - kMaskRandom42_18, - kMaskRandom42_19, - kMaskRandom42_20, - kMaskRandom42_21, - kMaskRandom42_22, - kMaskRandom42_23, - kMaskRandom42_24, - kMaskRandom42_25, - kMaskRandom42_26, - kMaskRandom42_27, - kMaskRandom42_28, - kMaskRandom42_29, - kMaskRandom42_30, - kMaskRandom42_31, - kMaskRandom42_32, - kMaskRandom42_33, - kMaskRandom42_34, - kMaskRandom42_35, - kMaskRandom42_36, - kMaskRandom42_37, - kMaskRandom42_38, - kMaskRandom42_39, - kMaskRandom42_40, - kMaskRandom42_41, - kMaskRandom42_42 -}; - -const uint8_t* kPacketMaskRandom43[43] = { - kMaskRandom43_1, - kMaskRandom43_2, - kMaskRandom43_3, - kMaskRandom43_4, - kMaskRandom43_5, - kMaskRandom43_6, - kMaskRandom43_7, - kMaskRandom43_8, - kMaskRandom43_9, - kMaskRandom43_10, - kMaskRandom43_11, - kMaskRandom43_12, - kMaskRandom43_13, - kMaskRandom43_14, - kMaskRandom43_15, - kMaskRandom43_16, - kMaskRandom43_17, - kMaskRandom43_18, - kMaskRandom43_19, - kMaskRandom43_20, - kMaskRandom43_21, - kMaskRandom43_22, - kMaskRandom43_23, - kMaskRandom43_24, - kMaskRandom43_25, - kMaskRandom43_26, - kMaskRandom43_27, - kMaskRandom43_28, - kMaskRandom43_29, - kMaskRandom43_30, - kMaskRandom43_31, - kMaskRandom43_32, - kMaskRandom43_33, - kMaskRandom43_34, - kMaskRandom43_35, - kMaskRandom43_36, - kMaskRandom43_37, - kMaskRandom43_38, - kMaskRandom43_39, - kMaskRandom43_40, - kMaskRandom43_41, - kMaskRandom43_42, - kMaskRandom43_43 -}; - -const uint8_t* kPacketMaskRandom44[44] = { - kMaskRandom44_1, - kMaskRandom44_2, - kMaskRandom44_3, - kMaskRandom44_4, - kMaskRandom44_5, - kMaskRandom44_6, - kMaskRandom44_7, - kMaskRandom44_8, - kMaskRandom44_9, - kMaskRandom44_10, - kMaskRandom44_11, - kMaskRandom44_12, - kMaskRandom44_13, - kMaskRandom44_14, - kMaskRandom44_15, - kMaskRandom44_16, - kMaskRandom44_17, - kMaskRandom44_18, - kMaskRandom44_19, - kMaskRandom44_20, - kMaskRandom44_21, - kMaskRandom44_22, - kMaskRandom44_23, - kMaskRandom44_24, - kMaskRandom44_25, - kMaskRandom44_26, - kMaskRandom44_27, - kMaskRandom44_28, - kMaskRandom44_29, - kMaskRandom44_30, - kMaskRandom44_31, - kMaskRandom44_32, - kMaskRandom44_33, - kMaskRandom44_34, - kMaskRandom44_35, - kMaskRandom44_36, - kMaskRandom44_37, - kMaskRandom44_38, - kMaskRandom44_39, - kMaskRandom44_40, - kMaskRandom44_41, - kMaskRandom44_42, - kMaskRandom44_43, - kMaskRandom44_44 -}; - -const uint8_t* kPacketMaskRandom45[45] = { - kMaskRandom45_1, - kMaskRandom45_2, - kMaskRandom45_3, - kMaskRandom45_4, - kMaskRandom45_5, - kMaskRandom45_6, - kMaskRandom45_7, - kMaskRandom45_8, - kMaskRandom45_9, - kMaskRandom45_10, - kMaskRandom45_11, - kMaskRandom45_12, - kMaskRandom45_13, - kMaskRandom45_14, - kMaskRandom45_15, - kMaskRandom45_16, - kMaskRandom45_17, - kMaskRandom45_18, - kMaskRandom45_19, - kMaskRandom45_20, - kMaskRandom45_21, - kMaskRandom45_22, - kMaskRandom45_23, - kMaskRandom45_24, - kMaskRandom45_25, - kMaskRandom45_26, - kMaskRandom45_27, - kMaskRandom45_28, - kMaskRandom45_29, - kMaskRandom45_30, - kMaskRandom45_31, - kMaskRandom45_32, - kMaskRandom45_33, - kMaskRandom45_34, - kMaskRandom45_35, - kMaskRandom45_36, - kMaskRandom45_37, - kMaskRandom45_38, - kMaskRandom45_39, - kMaskRandom45_40, - kMaskRandom45_41, - kMaskRandom45_42, - kMaskRandom45_43, - kMaskRandom45_44, - kMaskRandom45_45 -}; - -const uint8_t* kPacketMaskRandom46[46] = { - kMaskRandom46_1, - kMaskRandom46_2, - kMaskRandom46_3, - kMaskRandom46_4, - kMaskRandom46_5, - kMaskRandom46_6, - kMaskRandom46_7, - kMaskRandom46_8, - kMaskRandom46_9, - kMaskRandom46_10, - kMaskRandom46_11, - kMaskRandom46_12, - kMaskRandom46_13, - kMaskRandom46_14, - kMaskRandom46_15, - kMaskRandom46_16, - kMaskRandom46_17, - kMaskRandom46_18, - kMaskRandom46_19, - kMaskRandom46_20, - kMaskRandom46_21, - kMaskRandom46_22, - kMaskRandom46_23, - kMaskRandom46_24, - kMaskRandom46_25, - kMaskRandom46_26, - kMaskRandom46_27, - kMaskRandom46_28, - kMaskRandom46_29, - kMaskRandom46_30, - kMaskRandom46_31, - kMaskRandom46_32, - kMaskRandom46_33, - kMaskRandom46_34, - kMaskRandom46_35, - kMaskRandom46_36, - kMaskRandom46_37, - kMaskRandom46_38, - kMaskRandom46_39, - kMaskRandom46_40, - kMaskRandom46_41, - kMaskRandom46_42, - kMaskRandom46_43, - kMaskRandom46_44, - kMaskRandom46_45, - kMaskRandom46_46 -}; - -const uint8_t* kPacketMaskRandom47[47] = { - kMaskRandom47_1, - kMaskRandom47_2, - kMaskRandom47_3, - kMaskRandom47_4, - kMaskRandom47_5, - kMaskRandom47_6, - kMaskRandom47_7, - kMaskRandom47_8, - kMaskRandom47_9, - kMaskRandom47_10, - kMaskRandom47_11, - kMaskRandom47_12, - kMaskRandom47_13, - kMaskRandom47_14, - kMaskRandom47_15, - kMaskRandom47_16, - kMaskRandom47_17, - kMaskRandom47_18, - kMaskRandom47_19, - kMaskRandom47_20, - kMaskRandom47_21, - kMaskRandom47_22, - kMaskRandom47_23, - kMaskRandom47_24, - kMaskRandom47_25, - kMaskRandom47_26, - kMaskRandom47_27, - kMaskRandom47_28, - kMaskRandom47_29, - kMaskRandom47_30, - kMaskRandom47_31, - kMaskRandom47_32, - kMaskRandom47_33, - kMaskRandom47_34, - kMaskRandom47_35, - kMaskRandom47_36, - kMaskRandom47_37, - kMaskRandom47_38, - kMaskRandom47_39, - kMaskRandom47_40, - kMaskRandom47_41, - kMaskRandom47_42, - kMaskRandom47_43, - kMaskRandom47_44, - kMaskRandom47_45, - kMaskRandom47_46, - kMaskRandom47_47 -}; - -const uint8_t* kPacketMaskRandom48[48] = { - kMaskRandom48_1, - kMaskRandom48_2, - kMaskRandom48_3, - kMaskRandom48_4, - kMaskRandom48_5, - kMaskRandom48_6, - kMaskRandom48_7, - kMaskRandom48_8, - kMaskRandom48_9, - kMaskRandom48_10, - kMaskRandom48_11, - kMaskRandom48_12, - kMaskRandom48_13, - kMaskRandom48_14, - kMaskRandom48_15, - kMaskRandom48_16, - kMaskRandom48_17, - kMaskRandom48_18, - kMaskRandom48_19, - kMaskRandom48_20, - kMaskRandom48_21, - kMaskRandom48_22, - kMaskRandom48_23, - kMaskRandom48_24, - kMaskRandom48_25, - kMaskRandom48_26, - kMaskRandom48_27, - kMaskRandom48_28, - kMaskRandom48_29, - kMaskRandom48_30, - kMaskRandom48_31, - kMaskRandom48_32, - kMaskRandom48_33, - kMaskRandom48_34, - kMaskRandom48_35, - kMaskRandom48_36, - kMaskRandom48_37, - kMaskRandom48_38, - kMaskRandom48_39, - kMaskRandom48_40, - kMaskRandom48_41, - kMaskRandom48_42, - kMaskRandom48_43, - kMaskRandom48_44, - kMaskRandom48_45, - kMaskRandom48_46, - kMaskRandom48_47, - kMaskRandom48_48 -}; - -const uint8_t** kPacketMaskRandomTbl[48] = { - kPacketMaskRandom1, - kPacketMaskRandom2, - kPacketMaskRandom3, - kPacketMaskRandom4, - kPacketMaskRandom5, - kPacketMaskRandom6, - kPacketMaskRandom7, - kPacketMaskRandom8, - kPacketMaskRandom9, - kPacketMaskRandom10, - kPacketMaskRandom11, - kPacketMaskRandom12, - kPacketMaskRandom13, - kPacketMaskRandom14, - kPacketMaskRandom15, - kPacketMaskRandom16, - kPacketMaskRandom17, - kPacketMaskRandom18, - kPacketMaskRandom19, - kPacketMaskRandom20, - kPacketMaskRandom21, - kPacketMaskRandom22, - kPacketMaskRandom23, - kPacketMaskRandom24, - kPacketMaskRandom25, - kPacketMaskRandom26, - kPacketMaskRandom27, - kPacketMaskRandom28, - kPacketMaskRandom29, - kPacketMaskRandom30, - kPacketMaskRandom31, - kPacketMaskRandom32, - kPacketMaskRandom33, - kPacketMaskRandom34, - kPacketMaskRandom35, - kPacketMaskRandom36, - kPacketMaskRandom37, - kPacketMaskRandom38, - kPacketMaskRandom39, - kPacketMaskRandom40, - kPacketMaskRandom41, - kPacketMaskRandom42, - kPacketMaskRandom43, - kPacketMaskRandom44, - kPacketMaskRandom45, - kPacketMaskRandom46, - kPacketMaskRandom47, - kPacketMaskRandom48 -}; - -} // namespace fec_private_tables -} // namespace webrtc -#endif // WEBRTC_MODULES_RTP_RTCP_SOURCE_FEC_PRIVATE_TABLES_RANDOM_H_ diff --git a/WebRtc.NET/include/webrtc/modules/rtp_rtcp/source/forward_error_correction_internal.h b/WebRtc.NET/include/webrtc/modules/rtp_rtcp/source/forward_error_correction_internal.h deleted file mode 100644 index c61aea87..00000000 --- a/WebRtc.NET/include/webrtc/modules/rtp_rtcp/source/forward_error_correction_internal.h +++ /dev/null @@ -1,108 +0,0 @@ -/* - * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MODULES_RTP_RTCP_SOURCE_FORWARD_ERROR_CORRECTION_INTERNAL_H_ -#define WEBRTC_MODULES_RTP_RTCP_SOURCE_FORWARD_ERROR_CORRECTION_INTERNAL_H_ - -#include "webrtc/modules/include/module_common_types.h" -#include "webrtc/typedefs.h" - -namespace webrtc { - -// Maximum number of media packets that can be protected -// by these packet masks. -constexpr size_t kUlpfecMaxMediaPackets = 48; - -// Packet mask size in bytes (given L bit). -constexpr size_t kUlpfecPacketMaskSizeLBitClear = 2; -constexpr size_t kUlpfecPacketMaskSizeLBitSet = 6; - -// Convenience constants. -constexpr size_t kUlpfecMinPacketMaskSize = kUlpfecPacketMaskSizeLBitClear; -constexpr size_t kUlpfecMaxPacketMaskSize = kUlpfecPacketMaskSizeLBitSet; - -namespace internal { - -class PacketMaskTable { - public: - PacketMaskTable(FecMaskType fec_mask_type, int num_media_packets); - ~PacketMaskTable() {} - FecMaskType fec_mask_type() const { return fec_mask_type_; } - const uint8_t*** fec_packet_mask_table() const { - return fec_packet_mask_table_; - } - - private: - FecMaskType InitMaskType(FecMaskType fec_mask_type, int num_media_packets); - const uint8_t*** InitMaskTable(FecMaskType fec_mask_type_); - const FecMaskType fec_mask_type_; - const uint8_t*** fec_packet_mask_table_; -}; - -// Returns an array of packet masks. The mask of a single FEC packet -// corresponds to a number of mask bytes. The mask indicates which -// media packets should be protected by the FEC packet. - -// \param[in] num_media_packets The number of media packets to protect. -// [1, max_media_packets]. -// \param[in] num_fec_packets The number of FEC packets which will -// be generated. [1, num_media_packets]. -// \param[in] num_imp_packets The number of important packets. -// [0, num_media_packets]. -// num_imp_packets = 0 is the equal -// protection scenario. -// \param[in] use_unequal_protection Enables unequal protection: allocates -// more protection to the num_imp_packets. -// \param[in] mask_table An instance of the |PacketMaskTable| -// class, which contains the type of FEC -// packet mask used, and a pointer to the -// corresponding packet masks. -// \param[out] packet_mask A pointer to hold the packet mask array, -// of size: num_fec_packets * -// "number of mask bytes". -void GeneratePacketMasks(int num_media_packets, int num_fec_packets, - int num_imp_packets, bool use_unequal_protection, - const PacketMaskTable& mask_table, - uint8_t* packet_mask); - -// Returns the required packet mask size, given the number of sequence numbers -// that will be covered. -size_t PacketMaskSize(size_t num_sequence_numbers); - -// Inserts |num_zeros| zero columns into |new_mask| at position -// |new_bit_index|. If the current byte of |new_mask| can't fit all zeros, the -// byte will be filled with zeros from |new_bit_index|, but the next byte will -// be untouched. -void InsertZeroColumns(int num_zeros, - uint8_t* new_mask, - int new_mask_bytes, - int num_fec_packets, - int new_bit_index); - -// Copies the left most bit column from the byte pointed to by -// |old_bit_index| in |old_mask| to the right most column of the byte pointed -// to by |new_bit_index| in |new_mask|. |old_mask_bytes| and |new_mask_bytes| -// represent the number of bytes used per row for each mask. |num_fec_packets| -// represent the number of rows of the masks. -// The copied bit is shifted out from |old_mask| and is shifted one step to -// the left in |new_mask|. |new_mask| will contain "xxxx xxn0" after this -// operation, where x are previously inserted bits and n is the new bit. -void CopyColumn(uint8_t* new_mask, - int new_mask_bytes, - uint8_t* old_mask, - int old_mask_bytes, - int num_fec_packets, - int new_bit_index, - int old_bit_index); - -} // namespace internal -} // namespace webrtc - -#endif // WEBRTC_MODULES_RTP_RTCP_SOURCE_FORWARD_ERROR_CORRECTION_INTERNAL_H_ diff --git a/WebRtc.NET/include/webrtc/modules/rtp_rtcp/source/receive_statistics_impl.h b/WebRtc.NET/include/webrtc/modules/rtp_rtcp/source/receive_statistics_impl.h deleted file mode 100644 index 913f3b50..00000000 --- a/WebRtc.NET/include/webrtc/modules/rtp_rtcp/source/receive_statistics_impl.h +++ /dev/null @@ -1,133 +0,0 @@ -/* - * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MODULES_RTP_RTCP_SOURCE_RECEIVE_STATISTICS_IMPL_H_ -#define WEBRTC_MODULES_RTP_RTCP_SOURCE_RECEIVE_STATISTICS_IMPL_H_ - -#include "webrtc/modules/rtp_rtcp/include/receive_statistics.h" - -#include -#include - -#include "webrtc/base/criticalsection.h" -#include "webrtc/base/rate_statistics.h" -#include "webrtc/system_wrappers/include/ntp_time.h" - -namespace webrtc { - -class StreamStatisticianImpl : public StreamStatistician { - public: - StreamStatisticianImpl(Clock* clock, - RtcpStatisticsCallback* rtcp_callback, - StreamDataCountersCallback* rtp_callback); - virtual ~StreamStatisticianImpl() {} - - bool GetStatistics(RtcpStatistics* statistics, bool reset) override; - void GetDataCounters(size_t* bytes_received, - uint32_t* packets_received) const override; - void GetReceiveStreamDataCounters( - StreamDataCounters* data_counters) const override; - uint32_t BitrateReceived() const override; - bool IsRetransmitOfOldPacket(const RTPHeader& header, - int64_t min_rtt) const override; - bool IsPacketInOrder(uint16_t sequence_number) const override; - - void IncomingPacket(const RTPHeader& rtp_header, - size_t packet_length, - bool retransmitted); - void FecPacketReceived(const RTPHeader& header, size_t packet_length); - void SetMaxReorderingThreshold(int max_reordering_threshold); - virtual void LastReceiveTimeNtp(uint32_t* secs, uint32_t* frac) const; - - private: - bool InOrderPacketInternal(uint16_t sequence_number) const; - RtcpStatistics CalculateRtcpStatistics(); - void UpdateJitter(const RTPHeader& header, NtpTime receive_time); - void UpdateCounters(const RTPHeader& rtp_header, - size_t packet_length, - bool retransmitted); - void NotifyRtpCallback() LOCKS_EXCLUDED(stream_lock_); - void NotifyRtcpCallback() LOCKS_EXCLUDED(stream_lock_); - - Clock* const clock_; - rtc::CriticalSection stream_lock_; - RateStatistics incoming_bitrate_; - uint32_t ssrc_; - int max_reordering_threshold_; // In number of packets or sequence numbers. - - // Stats on received RTP packets. - uint32_t jitter_q4_; - uint32_t cumulative_loss_; - uint32_t jitter_q4_transmission_time_offset_; - - int64_t last_receive_time_ms_; - NtpTime last_receive_time_ntp_; - uint32_t last_received_timestamp_; - int32_t last_received_transmission_time_offset_; - uint16_t received_seq_first_; - uint16_t received_seq_max_; - uint16_t received_seq_wraps_; - - // Current counter values. - size_t received_packet_overhead_; - StreamDataCounters receive_counters_; - - // Counter values when we sent the last report. - uint32_t last_report_inorder_packets_; - uint32_t last_report_old_packets_; - uint16_t last_report_seq_max_; - RtcpStatistics last_reported_statistics_; - - RtcpStatisticsCallback* const rtcp_callback_; - StreamDataCountersCallback* const rtp_callback_; -}; - -class ReceiveStatisticsImpl : public ReceiveStatistics, - public RtcpStatisticsCallback, - public StreamDataCountersCallback { - public: - explicit ReceiveStatisticsImpl(Clock* clock); - - ~ReceiveStatisticsImpl(); - - // Implement ReceiveStatistics. - void IncomingPacket(const RTPHeader& header, - size_t packet_length, - bool retransmitted) override; - void FecPacketReceived(const RTPHeader& header, - size_t packet_length) override; - StatisticianMap GetActiveStatisticians() const override; - StreamStatistician* GetStatistician(uint32_t ssrc) const override; - void SetMaxReorderingThreshold(int max_reordering_threshold) override; - - void RegisterRtcpStatisticsCallback( - RtcpStatisticsCallback* callback) override; - - void RegisterRtpStatisticsCallback( - StreamDataCountersCallback* callback) override; - - private: - void StatisticsUpdated(const RtcpStatistics& statistics, - uint32_t ssrc) override; - void CNameChanged(const char* cname, uint32_t ssrc) override; - void DataCountersUpdated(const StreamDataCounters& counters, - uint32_t ssrc) override; - - typedef std::map StatisticianImplMap; - - Clock* const clock_; - rtc::CriticalSection receive_statistics_lock_; - StatisticianImplMap statisticians_; - - RtcpStatisticsCallback* rtcp_stats_callback_; - StreamDataCountersCallback* rtp_stats_callback_; -}; -} // namespace webrtc -#endif // WEBRTC_MODULES_RTP_RTCP_SOURCE_RECEIVE_STATISTICS_IMPL_H_ diff --git a/WebRtc.NET/include/webrtc/modules/rtp_rtcp/source/rtcp_packet/app.h b/WebRtc.NET/include/webrtc/modules/rtp_rtcp/source/rtcp_packet/app.h deleted file mode 100644 index 0b233b31..00000000 --- a/WebRtc.NET/include/webrtc/modules/rtp_rtcp/source/rtcp_packet/app.h +++ /dev/null @@ -1,65 +0,0 @@ -/* - * Copyright (c) 2015 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MODULES_RTP_RTCP_SOURCE_RTCP_PACKET_APP_H_ -#define WEBRTC_MODULES_RTP_RTCP_SOURCE_RTCP_PACKET_APP_H_ - -#include "webrtc/base/buffer.h" -#include "webrtc/base/constructormagic.h" -#include "webrtc/modules/rtp_rtcp/source/rtcp_packet.h" - -namespace webrtc { -namespace rtcp { -class CommonHeader; - -class App : public RtcpPacket { - public: - static constexpr uint8_t kPacketType = 204; - App() : sub_type_(0), ssrc_(0), name_(0) {} - ~App() override {} - - // Parse assumes header is already parsed and validated. - bool Parse(const CommonHeader& packet); - - void SetSsrc(uint32_t ssrc) { ssrc_ = ssrc; } - void SetSubType(uint8_t subtype); - void SetName(uint32_t name) { name_ = name; } - void SetData(const uint8_t* data, size_t data_length); - - uint8_t sub_type() const { return sub_type_; } - uint32_t ssrc() const { return ssrc_; } - uint32_t name() const { return name_; } - size_t data_size() const { return data_.size(); } - const uint8_t* data() const { return data_.data(); } - - protected: - bool Create(uint8_t* packet, - size_t* index, - size_t max_length, - RtcpPacket::PacketReadyCallback* callback) const override; - - private: - static constexpr size_t kAppBaseLength = 8; // Ssrc and Name. - static constexpr size_t kMaxDataSize = 0xffff * 4 - kAppBaseLength; - size_t BlockLength() const override { - return kHeaderLength + kAppBaseLength + data_.size(); - } - - uint8_t sub_type_; - uint32_t ssrc_; - uint32_t name_; - rtc::Buffer data_; - - RTC_DISALLOW_COPY_AND_ASSIGN(App); -}; - -} // namespace rtcp -} // namespace webrtc -#endif // WEBRTC_MODULES_RTP_RTCP_SOURCE_RTCP_PACKET_APP_H_ diff --git a/WebRtc.NET/include/webrtc/modules/rtp_rtcp/source/rtcp_packet/compound_packet.h b/WebRtc.NET/include/webrtc/modules/rtp_rtcp/source/rtcp_packet/compound_packet.h deleted file mode 100644 index 06b67c37..00000000 --- a/WebRtc.NET/include/webrtc/modules/rtp_rtcp/source/rtcp_packet/compound_packet.h +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - * - */ - -#ifndef WEBRTC_MODULES_RTP_RTCP_SOURCE_RTCP_PACKET_COMPOUND_PACKET_H_ -#define WEBRTC_MODULES_RTP_RTCP_SOURCE_RTCP_PACKET_COMPOUND_PACKET_H_ - -#include - -#include "webrtc/base/basictypes.h" -#include "webrtc/base/constructormagic.h" -#include "webrtc/modules/rtp_rtcp/source/rtcp_packet.h" - -namespace webrtc { -namespace rtcp { - -class CompoundPacket : public RtcpPacket { - public: - CompoundPacket() {} - ~CompoundPacket() override {} - - void Append(RtcpPacket* packet); - - // Size of this packet in bytes (i.e. total size of nested packets). - size_t BlockLength() const override; - // Returns true if all calls to Create succeeded. - bool Create(uint8_t* packet, - size_t* index, - size_t max_length, - RtcpPacket::PacketReadyCallback* callback) const override; - - protected: - std::vector appended_packets_; - - private: - RTC_DISALLOW_COPY_AND_ASSIGN(CompoundPacket); -}; - -} // namespace rtcp -} // namespace webrtc -#endif // WEBRTC_MODULES_RTP_RTCP_SOURCE_RTCP_PACKET_COMPOUND_PACKET_H_ diff --git a/WebRtc.NET/include/webrtc/modules/rtp_rtcp/source/rtcp_packet/extended_jitter_report.h b/WebRtc.NET/include/webrtc/modules/rtp_rtcp/source/rtcp_packet/extended_jitter_report.h deleted file mode 100644 index b26dc46b..00000000 --- a/WebRtc.NET/include/webrtc/modules/rtp_rtcp/source/rtcp_packet/extended_jitter_report.h +++ /dev/null @@ -1,60 +0,0 @@ -/* - * Copyright (c) 2015 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MODULES_RTP_RTCP_SOURCE_RTCP_PACKET_EXTENDED_JITTER_REPORT_H_ -#define WEBRTC_MODULES_RTP_RTCP_SOURCE_RTCP_PACKET_EXTENDED_JITTER_REPORT_H_ - -#include - -#include "webrtc/base/constructormagic.h" -#include "webrtc/modules/rtp_rtcp/source/rtcp_packet.h" - -namespace webrtc { -namespace rtcp { -class CommonHeader; - -class ExtendedJitterReport : public RtcpPacket { - public: - static constexpr uint8_t kPacketType = 195; - static constexpr size_t kMaxNumberOfJitterValues = 0x1f; - - ExtendedJitterReport() {} - ~ExtendedJitterReport() override {} - - // Parse assumes header is already parsed and validated. - bool Parse(const CommonHeader& packet); - - bool SetJitterValues(std::vector jitter_values); - - const std::vector& jitter_values() { - return inter_arrival_jitters_; - } - - protected: - bool Create(uint8_t* packet, - size_t* index, - size_t max_length, - RtcpPacket::PacketReadyCallback* callback) const override; - - private: - static constexpr size_t kJitterSizeBytes = 4; - - size_t BlockLength() const override { - return kHeaderLength + kJitterSizeBytes * inter_arrival_jitters_.size(); - } - - std::vector inter_arrival_jitters_; - - RTC_DISALLOW_COPY_AND_ASSIGN(ExtendedJitterReport); -}; - -} // namespace rtcp -} // namespace webrtc -#endif // WEBRTC_MODULES_RTP_RTCP_SOURCE_RTCP_PACKET_EXTENDED_JITTER_REPORT_H_ diff --git a/WebRtc.NET/include/webrtc/modules/rtp_rtcp/source/rtcp_packet/extended_reports.h b/WebRtc.NET/include/webrtc/modules/rtp_rtcp/source/rtcp_packet/extended_reports.h deleted file mode 100644 index 592ac3fe..00000000 --- a/WebRtc.NET/include/webrtc/modules/rtp_rtcp/source/rtcp_packet/extended_reports.h +++ /dev/null @@ -1,92 +0,0 @@ -/* - * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MODULES_RTP_RTCP_SOURCE_RTCP_PACKET_EXTENDED_REPORTS_H_ -#define WEBRTC_MODULES_RTP_RTCP_SOURCE_RTCP_PACKET_EXTENDED_REPORTS_H_ - -#include - -#include "webrtc/base/constructormagic.h" -#include "webrtc/base/optional.h" -#include "webrtc/modules/rtp_rtcp/source/rtcp_packet.h" -#include "webrtc/modules/rtp_rtcp/source/rtcp_packet/dlrr.h" -#include "webrtc/modules/rtp_rtcp/source/rtcp_packet/rrtr.h" -#include "webrtc/modules/rtp_rtcp/source/rtcp_packet/target_bitrate.h" -#include "webrtc/modules/rtp_rtcp/source/rtcp_packet/voip_metric.h" - -namespace webrtc { -namespace rtcp { -class CommonHeader; - -// From RFC 3611: RTP Control Protocol Extended Reports (RTCP XR). -class ExtendedReports : public RtcpPacket { - public: - static constexpr uint8_t kPacketType = 207; - - ExtendedReports(); - ~ExtendedReports() override; - - // Parse assumes header is already parsed and validated. - bool Parse(const CommonHeader& packet); - - void SetSenderSsrc(uint32_t ssrc) { sender_ssrc_ = ssrc; } - - void SetRrtr(const Rrtr& rrtr); - void AddDlrrItem(const ReceiveTimeInfo& time_info); - void SetVoipMetric(const VoipMetric& voip_metric); - void SetTargetBitrate(const TargetBitrate& target_bitrate); - - uint32_t sender_ssrc() const { return sender_ssrc_; } - const rtc::Optional& rrtr() const { return rrtr_block_; } - const Dlrr& dlrr() const { return dlrr_block_; } - const rtc::Optional& voip_metric() const { - return voip_metric_block_; - } - const rtc::Optional& target_bitrate() { - return target_bitrate_; - } - - protected: - bool Create(uint8_t* packet, - size_t* index, - size_t max_length, - RtcpPacket::PacketReadyCallback* callback) const override; - - private: - static constexpr size_t kXrBaseLength = 4; - - size_t BlockLength() const override { - return kHeaderLength + kXrBaseLength + RrtrLength() + DlrrLength() + - VoipMetricLength() + TargetBitrateLength(); - } - - size_t RrtrLength() const { return rrtr_block_ ? Rrtr::kLength : 0; } - size_t DlrrLength() const { return dlrr_block_.BlockLength(); } - size_t VoipMetricLength() const { - return voip_metric_block_ ? VoipMetric::kLength : 0; - } - size_t TargetBitrateLength() const; - - void ParseRrtrBlock(const uint8_t* block, uint16_t block_length); - void ParseDlrrBlock(const uint8_t* block, uint16_t block_length); - void ParseVoipMetricBlock(const uint8_t* block, uint16_t block_length); - void ParseTargetBitrateBlock(const uint8_t* block, uint16_t block_length); - - uint32_t sender_ssrc_; - rtc::Optional rrtr_block_; - Dlrr dlrr_block_; // Dlrr without items treated same as no dlrr block. - rtc::Optional voip_metric_block_; - rtc::Optional target_bitrate_; - - RTC_DISALLOW_COPY_AND_ASSIGN(ExtendedReports); -}; -} // namespace rtcp -} // namespace webrtc -#endif // WEBRTC_MODULES_RTP_RTCP_SOURCE_RTCP_PACKET_EXTENDED_REPORTS_H_ diff --git a/WebRtc.NET/include/webrtc/modules/rtp_rtcp/source/rtcp_packet/fir.h b/WebRtc.NET/include/webrtc/modules/rtp_rtcp/source/rtcp_packet/fir.h deleted file mode 100644 index 59f3b617..00000000 --- a/WebRtc.NET/include/webrtc/modules/rtp_rtcp/source/rtcp_packet/fir.h +++ /dev/null @@ -1,63 +0,0 @@ -/* - * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MODULES_RTP_RTCP_SOURCE_RTCP_PACKET_FIR_H_ -#define WEBRTC_MODULES_RTP_RTCP_SOURCE_RTCP_PACKET_FIR_H_ - -#include - -#include "webrtc/base/basictypes.h" -#include "webrtc/modules/rtp_rtcp/source/rtcp_packet/psfb.h" - -namespace webrtc { -namespace rtcp { -class CommonHeader; -// Full intra request (FIR) (RFC 5104). -class Fir : public Psfb { - public: - static constexpr uint8_t kFeedbackMessageType = 4; - struct Request { - Request() : ssrc(0), seq_nr(0) {} - Request(uint32_t ssrc, uint8_t seq_nr) : ssrc(ssrc), seq_nr(seq_nr) {} - uint32_t ssrc; - uint8_t seq_nr; - }; - - Fir() {} - ~Fir() override {} - - // Parse assumes header is already parsed and validated. - bool Parse(const CommonHeader& packet); - - void AddRequestTo(uint32_t ssrc, uint8_t seq_num) { - items_.emplace_back(ssrc, seq_num); - } - const std::vector& requests() const { return items_; } - - protected: - bool Create(uint8_t* packet, - size_t* index, - size_t max_length, - RtcpPacket::PacketReadyCallback* callback) const override; - - private: - static constexpr size_t kFciLength = 8; - size_t BlockLength() const override { - return kHeaderLength + kCommonFeedbackLength + kFciLength * items_.size(); - } - // SSRC of media source is not used in FIR packet. Shadow base functions. - void SetMediaSsrc(uint32_t ssrc); - uint32_t media_ssrc() const; - - std::vector items_; -}; -} // namespace rtcp -} // namespace webrtc -#endif // WEBRTC_MODULES_RTP_RTCP_SOURCE_RTCP_PACKET_FIR_H_ diff --git a/WebRtc.NET/include/webrtc/modules/rtp_rtcp/source/rtcp_packet/pli.h b/WebRtc.NET/include/webrtc/modules/rtp_rtcp/source/rtcp_packet/pli.h deleted file mode 100644 index 2ed6cd73..00000000 --- a/WebRtc.NET/include/webrtc/modules/rtp_rtcp/source/rtcp_packet/pli.h +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright (c) 2015 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ -#ifndef WEBRTC_MODULES_RTP_RTCP_SOURCE_RTCP_PACKET_PLI_H_ -#define WEBRTC_MODULES_RTP_RTCP_SOURCE_RTCP_PACKET_PLI_H_ - -#include "webrtc/base/basictypes.h" -#include "webrtc/base/constructormagic.h" -#include "webrtc/modules/rtp_rtcp/source/rtcp_packet/psfb.h" - -namespace webrtc { -namespace rtcp { -class CommonHeader; -// Picture loss indication (PLI) (RFC 4585). -class Pli : public Psfb { - public: - static constexpr uint8_t kFeedbackMessageType = 1; - - Pli() {} - ~Pli() override {} - - bool Parse(const CommonHeader& packet); - - protected: - bool Create(uint8_t* packet, - size_t* index, - size_t max_length, - RtcpPacket::PacketReadyCallback* callback) const override; - - private: - size_t BlockLength() const override { - return kHeaderLength + kCommonFeedbackLength; - } - - RTC_DISALLOW_COPY_AND_ASSIGN(Pli); -}; - -} // namespace rtcp -} // namespace webrtc -#endif // WEBRTC_MODULES_RTP_RTCP_SOURCE_RTCP_PACKET_PLI_H_ diff --git a/WebRtc.NET/include/webrtc/modules/rtp_rtcp/source/rtcp_packet/rapid_resync_request.h b/WebRtc.NET/include/webrtc/modules/rtp_rtcp/source/rtcp_packet/rapid_resync_request.h deleted file mode 100644 index 7e2be322..00000000 --- a/WebRtc.NET/include/webrtc/modules/rtp_rtcp/source/rtcp_packet/rapid_resync_request.h +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MODULES_RTP_RTCP_SOURCE_RTCP_PACKET_RAPID_RESYNC_REQUEST_H_ -#define WEBRTC_MODULES_RTP_RTCP_SOURCE_RTCP_PACKET_RAPID_RESYNC_REQUEST_H_ - -#include "webrtc/base/basictypes.h" -#include "webrtc/base/constructormagic.h" -#include "webrtc/modules/rtp_rtcp/source/rtcp_packet/rtpfb.h" - -namespace webrtc { -namespace rtcp { -class CommonHeader; - -// draft-perkins-avt-rapid-rtp-sync-03 -class RapidResyncRequest : public Rtpfb { - public: - static constexpr uint8_t kFeedbackMessageType = 5; - - RapidResyncRequest() {} - ~RapidResyncRequest() override {} - - // Parse assumes header is already parsed and validated. - bool Parse(const CommonHeader& header); - - protected: - bool Create(uint8_t* packet, - size_t* index, - size_t max_length, - RtcpPacket::PacketReadyCallback* callback) const override; - - private: - size_t BlockLength() const override { - return kHeaderLength + kCommonFeedbackLength; - } - - RTC_DISALLOW_COPY_AND_ASSIGN(RapidResyncRequest); -}; -} // namespace rtcp -} // namespace webrtc -#endif // WEBRTC_MODULES_RTP_RTCP_SOURCE_RTCP_PACKET_RAPID_RESYNC_REQUEST_H_ diff --git a/WebRtc.NET/include/webrtc/modules/rtp_rtcp/source/rtcp_packet/receiver_report.h b/WebRtc.NET/include/webrtc/modules/rtp_rtcp/source/rtcp_packet/receiver_report.h deleted file mode 100644 index c900d9c8..00000000 --- a/WebRtc.NET/include/webrtc/modules/rtp_rtcp/source/rtcp_packet/receiver_report.h +++ /dev/null @@ -1,65 +0,0 @@ -/* - * Copyright (c) 2015 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MODULES_RTP_RTCP_SOURCE_RTCP_PACKET_RECEIVER_REPORT_H_ -#define WEBRTC_MODULES_RTP_RTCP_SOURCE_RTCP_PACKET_RECEIVER_REPORT_H_ - -#include - -#include "webrtc/base/basictypes.h" -#include "webrtc/base/constructormagic.h" -#include "webrtc/modules/rtp_rtcp/source/rtcp_packet.h" -#include "webrtc/modules/rtp_rtcp/source/rtcp_packet/report_block.h" - -namespace webrtc { -namespace rtcp { -class CommonHeader; - -class ReceiverReport : public RtcpPacket { - public: - static constexpr uint8_t kPacketType = 201; - ReceiverReport() : sender_ssrc_(0) {} - ~ReceiverReport() override {} - - // Parse assumes header is already parsed and validated. - bool Parse(const CommonHeader& packet); - - void SetSenderSsrc(uint32_t ssrc) { sender_ssrc_ = ssrc; } - bool AddReportBlock(const ReportBlock& block); - - uint32_t sender_ssrc() const { return sender_ssrc_; } - const std::vector& report_blocks() const { - return report_blocks_; - } - - protected: - bool Create(uint8_t* packet, - size_t* index, - size_t max_length, - RtcpPacket::PacketReadyCallback* callback) const override; - - private: - static const size_t kRrBaseLength = 4; - static const size_t kMaxNumberOfReportBlocks = 0x1F; - - size_t BlockLength() const override { - return kHeaderLength + kRrBaseLength + - report_blocks_.size() * ReportBlock::kLength; - } - - uint32_t sender_ssrc_; - std::vector report_blocks_; - - RTC_DISALLOW_COPY_AND_ASSIGN(ReceiverReport); -}; - -} // namespace rtcp -} // namespace webrtc -#endif // WEBRTC_MODULES_RTP_RTCP_SOURCE_RTCP_PACKET_RECEIVER_REPORT_H_ diff --git a/WebRtc.NET/include/webrtc/modules/rtp_rtcp/source/rtcp_packet/remb.h b/WebRtc.NET/include/webrtc/modules/rtp_rtcp/source/rtcp_packet/remb.h deleted file mode 100644 index 5cc00a29..00000000 --- a/WebRtc.NET/include/webrtc/modules/rtp_rtcp/source/rtcp_packet/remb.h +++ /dev/null @@ -1,66 +0,0 @@ -/* - * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MODULES_RTP_RTCP_SOURCE_RTCP_PACKET_REMB_H_ -#define WEBRTC_MODULES_RTP_RTCP_SOURCE_RTCP_PACKET_REMB_H_ - -#include - -#include "webrtc/base/basictypes.h" -#include "webrtc/base/constructormagic.h" -#include "webrtc/modules/rtp_rtcp/source/rtcp_packet/psfb.h" - -namespace webrtc { -namespace rtcp { -class CommonHeader; - -// Receiver Estimated Max Bitrate (REMB) (draft-alvestrand-rmcat-remb). -class Remb : public Psfb { - public: - static constexpr uint8_t kFeedbackMessageType = 15; - static constexpr size_t kMaxNumberOfSsrcs = 0xff; - - Remb() : bitrate_bps_(0) {} - ~Remb() override {} - - // Parse assumes header is already parsed and validated. - bool Parse(const CommonHeader& packet); - - bool SetSsrcs(std::vector ssrcs); - void SetBitrateBps(uint64_t bitrate_bps) { bitrate_bps_ = bitrate_bps; } - - uint64_t bitrate_bps() const { return bitrate_bps_; } - const std::vector& ssrcs() const { return ssrcs_; } - - protected: - bool Create(uint8_t* packet, - size_t* index, - size_t max_length, - RtcpPacket::PacketReadyCallback* callback) const override; - - size_t BlockLength() const override { - return kHeaderLength + kCommonFeedbackLength + (2 + ssrcs_.size()) * 4; - } - - private: - static constexpr uint32_t kUniqueIdentifier = 0x52454D42; // 'R' 'E' 'M' 'B'. - - // Media ssrc is unused, shadow base class setter and getter. - void SetMediaSsrc(uint32_t); - uint32_t media_ssrc() const; - - uint64_t bitrate_bps_; - std::vector ssrcs_; - - RTC_DISALLOW_COPY_AND_ASSIGN(Remb); -}; -} // namespace rtcp -} // namespace webrtc -#endif // WEBRTC_MODULES_RTP_RTCP_SOURCE_RTCP_PACKET_REMB_H_ diff --git a/WebRtc.NET/include/webrtc/modules/rtp_rtcp/source/rtcp_packet/report_block.h b/WebRtc.NET/include/webrtc/modules/rtp_rtcp/source/rtcp_packet/report_block.h deleted file mode 100644 index bdc3cbcd..00000000 --- a/WebRtc.NET/include/webrtc/modules/rtp_rtcp/source/rtcp_packet/report_block.h +++ /dev/null @@ -1,67 +0,0 @@ -/* - * Copyright (c) 2015 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - * - */ - -#ifndef WEBRTC_MODULES_RTP_RTCP_SOURCE_RTCP_PACKET_REPORT_BLOCK_H_ -#define WEBRTC_MODULES_RTP_RTCP_SOURCE_RTCP_PACKET_REPORT_BLOCK_H_ - -#include "webrtc/base/basictypes.h" - -namespace webrtc { -namespace rtcp { - -class ReportBlock { - public: - static const size_t kLength = 24; - - ReportBlock(); - ~ReportBlock() {} - - bool Parse(const uint8_t* buffer, size_t length); - - // Fills buffer with the ReportBlock. - // Consumes ReportBlock::kLength bytes. - void Create(uint8_t* buffer) const; - - void SetMediaSsrc(uint32_t ssrc) { source_ssrc_ = ssrc; } - void SetFractionLost(uint8_t fraction_lost) { - fraction_lost_ = fraction_lost; - } - bool SetCumulativeLost(uint32_t cumulative_lost); - void SetExtHighestSeqNum(uint32_t ext_highest_seq_num) { - extended_high_seq_num_ = ext_highest_seq_num; - } - void SetJitter(uint32_t jitter) { jitter_ = jitter; } - void SetLastSr(uint32_t last_sr) { last_sr_ = last_sr; } - void SetDelayLastSr(uint32_t delay_last_sr) { - delay_since_last_sr_ = delay_last_sr; - } - - uint32_t source_ssrc() const { return source_ssrc_; } - uint8_t fraction_lost() const { return fraction_lost_; } - uint32_t cumulative_lost() const { return cumulative_lost_; } - uint32_t extended_high_seq_num() const { return extended_high_seq_num_; } - uint32_t jitter() const { return jitter_; } - uint32_t last_sr() const { return last_sr_; } - uint32_t delay_since_last_sr() const { return delay_since_last_sr_; } - - private: - uint32_t source_ssrc_; - uint8_t fraction_lost_; - uint32_t cumulative_lost_; - uint32_t extended_high_seq_num_; - uint32_t jitter_; - uint32_t last_sr_; - uint32_t delay_since_last_sr_; -}; - -} // namespace rtcp -} // namespace webrtc -#endif // WEBRTC_MODULES_RTP_RTCP_SOURCE_RTCP_PACKET_REPORT_BLOCK_H_ diff --git a/WebRtc.NET/include/webrtc/modules/rtp_rtcp/source/rtcp_packet/rpsi.h b/WebRtc.NET/include/webrtc/modules/rtp_rtcp/source/rtcp_packet/rpsi.h deleted file mode 100644 index 79b6acec..00000000 --- a/WebRtc.NET/include/webrtc/modules/rtp_rtcp/source/rtcp_packet/rpsi.h +++ /dev/null @@ -1,57 +0,0 @@ -/* - * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MODULES_RTP_RTCP_SOURCE_RTCP_PACKET_RPSI_H_ -#define WEBRTC_MODULES_RTP_RTCP_SOURCE_RTCP_PACKET_RPSI_H_ - -#include "webrtc/base/basictypes.h" -#include "webrtc/base/constructormagic.h" -#include "webrtc/modules/rtp_rtcp/source/rtcp_packet/psfb.h" - -namespace webrtc { -namespace rtcp { -class CommonHeader; - -// Reference picture selection indication (RPSI) (RFC 4585). -// Assumes native bit string stores PictureId (VP8, VP9). -class Rpsi : public Psfb { - public: - static constexpr uint8_t kFeedbackMessageType = 3; - Rpsi(); - ~Rpsi() override {} - - // Parse assumes header is already parsed and validated. - bool Parse(const CommonHeader& packet); - - void SetPayloadType(uint8_t payload); - void SetPictureId(uint64_t picture_id); - - uint8_t payload_type() const { return payload_type_; } - uint64_t picture_id() const { return picture_id_; } - - protected: - bool Create(uint8_t* packet, - size_t* index, - size_t max_length, - RtcpPacket::PacketReadyCallback* callback) const override; - - private: - size_t BlockLength() const override { return block_length_; } - static size_t CalculateBlockLength(uint8_t bitstring_size_bytes); - - uint8_t payload_type_; - uint64_t picture_id_; - size_t block_length_; - - RTC_DISALLOW_COPY_AND_ASSIGN(Rpsi); -}; -} // namespace rtcp -} // namespace webrtc -#endif // WEBRTC_MODULES_RTP_RTCP_SOURCE_RTCP_PACKET_RPSI_H_ diff --git a/WebRtc.NET/include/webrtc/modules/rtp_rtcp/source/rtcp_packet/sdes.h b/WebRtc.NET/include/webrtc/modules/rtp_rtcp/source/rtcp_packet/sdes.h deleted file mode 100644 index 3e5abfea..00000000 --- a/WebRtc.NET/include/webrtc/modules/rtp_rtcp/source/rtcp_packet/sdes.h +++ /dev/null @@ -1,61 +0,0 @@ -/* - * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MODULES_RTP_RTCP_SOURCE_RTCP_PACKET_SDES_H_ -#define WEBRTC_MODULES_RTP_RTCP_SOURCE_RTCP_PACKET_SDES_H_ - -#include -#include - -#include "webrtc/base/basictypes.h" -#include "webrtc/base/constructormagic.h" -#include "webrtc/modules/rtp_rtcp/source/rtcp_packet.h" - -namespace webrtc { -namespace rtcp { -class CommonHeader; -// Source Description (SDES) (RFC 3550). -class Sdes : public RtcpPacket { - public: - struct Chunk { - uint32_t ssrc; - std::string cname; - }; - static constexpr uint8_t kPacketType = 202; - - Sdes(); - ~Sdes() override; - - // Parse assumes header is already parsed and validated. - bool Parse(const CommonHeader& packet); - - bool AddCName(uint32_t ssrc, std::string cname); - - const std::vector& chunks() const { return chunks_; } - - size_t BlockLength() const override { return block_length_; } - - protected: - bool Create(uint8_t* packet, - size_t* index, - size_t max_length, - RtcpPacket::PacketReadyCallback* callback) const override; - - private: - static const size_t kMaxNumberOfChunks = 0x1f; - - std::vector chunks_; - size_t block_length_; - - RTC_DISALLOW_COPY_AND_ASSIGN(Sdes); -}; -} // namespace rtcp -} // namespace webrtc -#endif // WEBRTC_MODULES_RTP_RTCP_SOURCE_RTCP_PACKET_SDES_H_ diff --git a/WebRtc.NET/include/webrtc/modules/rtp_rtcp/source/rtcp_packet/sender_report.h b/WebRtc.NET/include/webrtc/modules/rtp_rtcp/source/rtcp_packet/sender_report.h deleted file mode 100644 index 4064595d..00000000 --- a/WebRtc.NET/include/webrtc/modules/rtp_rtcp/source/rtcp_packet/sender_report.h +++ /dev/null @@ -1,86 +0,0 @@ -/* - * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MODULES_RTP_RTCP_SOURCE_RTCP_PACKET_SENDER_REPORT_H_ -#define WEBRTC_MODULES_RTP_RTCP_SOURCE_RTCP_PACKET_SENDER_REPORT_H_ - -#include - -#include "webrtc/base/constructormagic.h" -#include "webrtc/modules/rtp_rtcp/source/rtcp_packet.h" -#include "webrtc/modules/rtp_rtcp/source/rtcp_packet/report_block.h" -#include "webrtc/system_wrappers/include/ntp_time.h" - -namespace webrtc { -namespace rtcp { -class CommonHeader; - -class SenderReport : public RtcpPacket { - public: - static constexpr uint8_t kPacketType = 200; - - SenderReport(); - ~SenderReport() override {} - - // Parse assumes header is already parsed and validated. - bool Parse(const CommonHeader& packet); - - void SetSenderSsrc(uint32_t ssrc) { sender_ssrc_ = ssrc; } - void SetNtp(NtpTime ntp) { ntp_ = ntp; } - void SetRtpTimestamp(uint32_t rtp_timestamp) { - rtp_timestamp_ = rtp_timestamp; - } - void SetPacketCount(uint32_t packet_count) { - sender_packet_count_ = packet_count; - } - void SetOctetCount(uint32_t octet_count) { - sender_octet_count_ = octet_count; - } - bool AddReportBlock(const ReportBlock& block); - void ClearReportBlocks() { report_blocks_.clear(); } - - uint32_t sender_ssrc() const { return sender_ssrc_; } - NtpTime ntp() const { return ntp_; } - uint32_t rtp_timestamp() const { return rtp_timestamp_; } - uint32_t sender_packet_count() const { return sender_packet_count_; } - uint32_t sender_octet_count() const { return sender_octet_count_; } - - const std::vector& report_blocks() const { - return report_blocks_; - } - - protected: - bool Create(uint8_t* packet, - size_t* index, - size_t max_length, - RtcpPacket::PacketReadyCallback* callback) const override; - - private: - static const size_t kMaxNumberOfReportBlocks = 0x1f; - const size_t kSenderBaseLength = 24; - - size_t BlockLength() const override { - return kHeaderLength + kSenderBaseLength + - report_blocks_.size() * ReportBlock::kLength; - } - - uint32_t sender_ssrc_; - NtpTime ntp_; - uint32_t rtp_timestamp_; - uint32_t sender_packet_count_; - uint32_t sender_octet_count_; - std::vector report_blocks_; - - RTC_DISALLOW_COPY_AND_ASSIGN(SenderReport); -}; - -} // namespace rtcp -} // namespace webrtc -#endif // WEBRTC_MODULES_RTP_RTCP_SOURCE_RTCP_PACKET_SENDER_REPORT_H_ diff --git a/WebRtc.NET/include/webrtc/modules/rtp_rtcp/source/rtcp_packet/sli.h b/WebRtc.NET/include/webrtc/modules/rtp_rtcp/source/rtcp_packet/sli.h deleted file mode 100644 index 3214b96d..00000000 --- a/WebRtc.NET/include/webrtc/modules/rtp_rtcp/source/rtcp_packet/sli.h +++ /dev/null @@ -1,82 +0,0 @@ -/* - * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - * - */ -#ifndef WEBRTC_MODULES_RTP_RTCP_SOURCE_RTCP_PACKET_SLI_H_ -#define WEBRTC_MODULES_RTP_RTCP_SOURCE_RTCP_PACKET_SLI_H_ - -#include - -#include "webrtc/base/basictypes.h" -#include "webrtc/base/constructormagic.h" -#include "webrtc/modules/rtp_rtcp/source/rtcp_packet/psfb.h" - -namespace webrtc { -namespace rtcp { -class CommonHeader; - -// Slice loss indication (SLI) (RFC 4585). -class Sli : public Psfb { - public: - static constexpr uint8_t kFeedbackMessageType = 2; - class Macroblocks { - public: - static constexpr size_t kLength = 4; - Macroblocks() : item_(0) {} - Macroblocks(uint8_t picture_id, uint16_t first, uint16_t number); - ~Macroblocks() {} - - void Parse(const uint8_t* buffer); - void Create(uint8_t* buffer) const; - - uint16_t first() const { return item_ >> 19; } - uint16_t number() const { return (item_ >> 6) & 0x1fff; } - uint8_t picture_id() const { return (item_ & 0x3f); } - - private: - uint32_t item_; - }; - - Sli() {} - ~Sli() override {} - - // Parse assumes header is already parsed and validated. - bool Parse(const CommonHeader& packet); - - void AddPictureId(uint8_t picture_id) { - items_.emplace_back(picture_id, 0, 0x1fff); - } - void AddPictureId(uint8_t picture_id, - uint16_t first_macroblock, - uint16_t number_macroblocks) { - items_.emplace_back(picture_id, first_macroblock, number_macroblocks); - } - - const std::vector& macroblocks() const { return items_; } - - protected: - bool Create(uint8_t* packet, - size_t* index, - size_t max_length, - RtcpPacket::PacketReadyCallback* callback) const override; - - private: - size_t BlockLength() const override { - return RtcpPacket::kHeaderLength + Psfb::kCommonFeedbackLength + - items_.size() * Macroblocks::kLength; - } - - std::vector items_; - - RTC_DISALLOW_COPY_AND_ASSIGN(Sli); -}; - -} // namespace rtcp -} // namespace webrtc -#endif // WEBRTC_MODULES_RTP_RTCP_SOURCE_RTCP_PACKET_SLI_H_ diff --git a/WebRtc.NET/include/webrtc/modules/rtp_rtcp/source/rtcp_packet/tmmbn.h b/WebRtc.NET/include/webrtc/modules/rtp_rtcp/source/rtcp_packet/tmmbn.h deleted file mode 100644 index 23db484e..00000000 --- a/WebRtc.NET/include/webrtc/modules/rtp_rtcp/source/rtcp_packet/tmmbn.h +++ /dev/null @@ -1,63 +0,0 @@ -/* - * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MODULES_RTP_RTCP_SOURCE_RTCP_PACKET_TMMBN_H_ -#define WEBRTC_MODULES_RTP_RTCP_SOURCE_RTCP_PACKET_TMMBN_H_ - -#include - -#include "webrtc/base/basictypes.h" -#include "webrtc/base/constructormagic.h" -#include "webrtc/modules/rtp_rtcp/source/rtcp_packet/rtpfb.h" -#include "webrtc/modules/rtp_rtcp/source/rtcp_packet/tmmb_item.h" - -namespace webrtc { -namespace rtcp { -class CommonHeader; - -// Temporary Maximum Media Stream Bit Rate Notification (TMMBN). -// RFC 5104, Section 4.2.2. -class Tmmbn : public Rtpfb { - public: - static constexpr uint8_t kFeedbackMessageType = 4; - - Tmmbn() {} - ~Tmmbn() override {} - - // Parse assumes header is already parsed and validated. - bool Parse(const CommonHeader& packet); - - void AddTmmbr(const TmmbItem& item); - - const std::vector& items() const { return items_; } - - protected: - bool Create(uint8_t* packet, - size_t* index, - size_t max_length, - RtcpPacket::PacketReadyCallback* callback) const override; - - private: - size_t BlockLength() const override { - return kHeaderLength + kCommonFeedbackLength + - TmmbItem::kLength * items_.size(); - } - - // Media ssrc is unused, shadow base class setter and getter. - void SetMediaSsrc(uint32_t ssrc); - uint32_t media_ssrc() const; - - std::vector items_; - - RTC_DISALLOW_COPY_AND_ASSIGN(Tmmbn); -}; -} // namespace rtcp -} // namespace webrtc -#endif // WEBRTC_MODULES_RTP_RTCP_SOURCE_RTCP_PACKET_TMMBN_H_ diff --git a/WebRtc.NET/include/webrtc/modules/rtp_rtcp/source/rtcp_packet/tmmbr.h b/WebRtc.NET/include/webrtc/modules/rtp_rtcp/source/rtcp_packet/tmmbr.h deleted file mode 100644 index 1db99f46..00000000 --- a/WebRtc.NET/include/webrtc/modules/rtp_rtcp/source/rtcp_packet/tmmbr.h +++ /dev/null @@ -1,62 +0,0 @@ -/* - * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MODULES_RTP_RTCP_SOURCE_RTCP_PACKET_TMMBR_H_ -#define WEBRTC_MODULES_RTP_RTCP_SOURCE_RTCP_PACKET_TMMBR_H_ - -#include - -#include "webrtc/base/basictypes.h" -#include "webrtc/base/constructormagic.h" -#include "webrtc/modules/rtp_rtcp/source/rtcp_packet/rtpfb.h" -#include "webrtc/modules/rtp_rtcp/source/rtcp_packet/tmmb_item.h" - -namespace webrtc { -namespace rtcp { -class CommonHeader; - -// Temporary Maximum Media Stream Bit Rate Request (TMMBR). -// RFC 5104, Section 4.2.1. -class Tmmbr : public Rtpfb { - public: - static constexpr uint8_t kFeedbackMessageType = 3; - - Tmmbr() {} - ~Tmmbr() override {} - - // Parse assumes header is already parsed and validated. - bool Parse(const CommonHeader& packet); - - void AddTmmbr(const TmmbItem& item); - - const std::vector& requests() const { return items_; } - - protected: - bool Create(uint8_t* packet, - size_t* index, - size_t max_length, - RtcpPacket::PacketReadyCallback* callback) const override; - - private: - size_t BlockLength() const override { - return kHeaderLength + kCommonFeedbackLength + - TmmbItem::kLength * items_.size(); - } - - // Media ssrc is unused, shadow base class setter. - void SetMediaSsrc(uint32_t ssrc); - - std::vector items_; - - RTC_DISALLOW_COPY_AND_ASSIGN(Tmmbr); -}; -} // namespace rtcp -} // namespace webrtc -#endif // WEBRTC_MODULES_RTP_RTCP_SOURCE_RTCP_PACKET_TMMBR_H_ diff --git a/WebRtc.NET/include/webrtc/modules/rtp_rtcp/source/rtcp_packet/transport_feedback.h b/WebRtc.NET/include/webrtc/modules/rtp_rtcp/source/rtcp_packet/transport_feedback.h deleted file mode 100644 index 9f207117..00000000 --- a/WebRtc.NET/include/webrtc/modules/rtp_rtcp/source/rtcp_packet/transport_feedback.h +++ /dev/null @@ -1,118 +0,0 @@ -/* - * Copyright (c) 2015 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MODULES_RTP_RTCP_SOURCE_RTCP_PACKET_TRANSPORT_FEEDBACK_H_ -#define WEBRTC_MODULES_RTP_RTCP_SOURCE_RTCP_PACKET_TRANSPORT_FEEDBACK_H_ - -#include -#include - -#include "webrtc/base/constructormagic.h" -#include "webrtc/modules/rtp_rtcp/source/rtcp_packet/rtpfb.h" - -namespace webrtc { -namespace rtcp { -class CommonHeader; - -class TransportFeedback : public Rtpfb { - public: - class ReceivedPacket { - public: - ReceivedPacket(uint16_t sequence_number, int16_t delta_ticks) - : sequence_number_(sequence_number), delta_ticks_(delta_ticks) {} - ReceivedPacket(const ReceivedPacket&) = default; - ReceivedPacket& operator=(const ReceivedPacket&) = default; - - uint16_t sequence_number() const { return sequence_number_; } - int16_t delta_ticks() const { return delta_ticks_; } - int32_t delta_us() const { return delta_ticks_ * kDeltaScaleFactor; } - - private: - uint16_t sequence_number_; - int16_t delta_ticks_; - }; - // TODO(sprang): IANA reg? - static constexpr uint8_t kFeedbackMessageType = 15; - // Convert to multiples of 0.25ms. - static constexpr int kDeltaScaleFactor = 250; - // Maximum number of packets (including missing) TransportFeedback can report. - static constexpr size_t kMaxReportedPackets = 0xffff; - - TransportFeedback(); - ~TransportFeedback() override; - - void SetBase(uint16_t base_sequence, // Seq# of first packet in this msg. - int64_t ref_timestamp_us); // Reference timestamp for this msg. - void SetFeedbackSequenceNumber(uint8_t feedback_sequence); - // NOTE: This method requires increasing sequence numbers (excepting wraps). - bool AddReceivedPacket(uint16_t sequence_number, int64_t timestamp_us); - const std::vector& GetReceivedPackets() const; - - enum class StatusSymbol { - kNotReceived, - kReceivedSmallDelta, - kReceivedLargeDelta, - }; - - uint16_t GetBaseSequence() const; - std::vector GetStatusVector() const; - std::vector GetReceiveDeltas() const; - - // Get the reference time in microseconds, including any precision loss. - int64_t GetBaseTimeUs() const; - // Convenience method for getting all deltas as microseconds. The first delta - // is relative the base time. - std::vector GetReceiveDeltasUs() const; - - bool Parse(const CommonHeader& packet); - static std::unique_ptr ParseFrom(const uint8_t* buffer, - size_t length); - // Pre and postcondition for all public methods. Should always return true. - // This function is for tests. - bool IsConsistent() const; - - protected: - bool Create(uint8_t* packet, - size_t* position, - size_t max_length, - PacketReadyCallback* callback) const override; - - size_t BlockLength() const override; - - private: - // Size in bytes of a delta time in rtcp packet. - // Valid values are 0 (packet wasn't received), 1 or 2. - using DeltaSize = uint8_t; - // Keeps DeltaSizes that can be encoded into single chunk if it is last chunk. - class LastChunk; - - // Reset packet to consistent empty state. - void Clear(); - - bool AddDeltaSize(DeltaSize delta_size); - - uint16_t base_seq_no_; - uint16_t num_seq_no_; - int32_t base_time_ticks_; - uint8_t feedback_seq_; - - int64_t last_timestamp_us_; - std::vector packets_; - // All but last encoded packet chunks. - std::vector encoded_chunks_; - const std::unique_ptr last_chunk_; - size_t size_bytes_; - - RTC_DISALLOW_COPY_AND_ASSIGN(TransportFeedback); -}; - -} // namespace rtcp -} // namespace webrtc -#endif // WEBRTC_MODULES_RTP_RTCP_SOURCE_RTCP_PACKET_TRANSPORT_FEEDBACK_H_ diff --git a/WebRtc.NET/include/webrtc/modules/rtp_rtcp/source/rtcp_receiver.h b/WebRtc.NET/include/webrtc/modules/rtp_rtcp/source/rtcp_receiver.h deleted file mode 100644 index b67d07fa..00000000 --- a/WebRtc.NET/include/webrtc/modules/rtp_rtcp/source/rtcp_receiver.h +++ /dev/null @@ -1,268 +0,0 @@ -/* - * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MODULES_RTP_RTCP_SOURCE_RTCP_RECEIVER_H_ -#define WEBRTC_MODULES_RTP_RTCP_SOURCE_RTCP_RECEIVER_H_ - -#include -#include -#include -#include - -#include "webrtc/base/criticalsection.h" -#include "webrtc/base/thread_annotations.h" -#include "webrtc/modules/rtp_rtcp/include/rtp_rtcp_defines.h" -#include "webrtc/modules/rtp_rtcp/source/rtcp_packet/dlrr.h" -#include "webrtc/modules/rtp_rtcp/source/rtcp_utility.h" -#include "webrtc/system_wrappers/include/ntp_time.h" -#include "webrtc/typedefs.h" - -namespace webrtc { -class VideoBitrateAllocationObserver; -namespace rtcp { -class CommonHeader; -class ReportBlock; -class Rrtr; -class TargetBitrate; -class TmmbItem; -} // namespace rtcp - -class RTCPReceiver { - public: - class ModuleRtpRtcp { - public: - virtual void SetTmmbn(std::vector bounding_set) = 0; - virtual void OnRequestSendReport() = 0; - virtual void OnReceivedNack( - const std::vector& nack_sequence_numbers) = 0; - virtual void OnReceivedRtcpReportBlocks( - const ReportBlockList& report_blocks) = 0; - - protected: - virtual ~ModuleRtpRtcp() = default; - }; - - RTCPReceiver(Clock* clock, - bool receiver_only, - RtcpPacketTypeCounterObserver* packet_type_counter_observer, - RtcpBandwidthObserver* rtcp_bandwidth_observer, - RtcpIntraFrameObserver* rtcp_intra_frame_observer, - TransportFeedbackObserver* transport_feedback_observer, - VideoBitrateAllocationObserver* bitrate_allocation_observer, - ModuleRtpRtcp* owner); - virtual ~RTCPReceiver(); - - bool IncomingPacket(const uint8_t* packet, size_t packet_size); - - int64_t LastReceivedReceiverReport() const; - - void SetSsrcs(uint32_t main_ssrc, const std::set& registered_ssrcs); - void SetRemoteSSRC(uint32_t ssrc); - uint32_t RemoteSSRC() const; - - // Get received cname. - int32_t CNAME(uint32_t remote_ssrc, char cname[RTCP_CNAME_SIZE]) const; - - // Get received NTP. - bool NTP(uint32_t* received_ntp_secs, - uint32_t* received_ntp_frac, - uint32_t* rtcp_arrival_time_secs, - uint32_t* rtcp_arrival_time_frac, - uint32_t* rtcp_timestamp) const; - - bool LastReceivedXrReferenceTimeInfo(rtcp::ReceiveTimeInfo* info) const; - - // Get rtt. - int32_t RTT(uint32_t remote_ssrc, - int64_t* last_rtt_ms, - int64_t* avg_rtt_ms, - int64_t* min_rtt_ms, - int64_t* max_rtt_ms) const; - - int32_t SenderInfoReceived(RTCPSenderInfo* sender_info) const; - - void SetRtcpXrRrtrStatus(bool enable); - bool GetAndResetXrRrRtt(int64_t* rtt_ms); - - // Get statistics. - int32_t StatisticsReceived(std::vector* receiveBlocks) const; - - // Returns true if we haven't received an RTCP RR for several RTCP - // intervals, but only triggers true once. - bool RtcpRrTimeout(int64_t rtcp_interval_ms); - - // Returns true if we haven't received an RTCP RR telling the receive side - // has not received RTP packets for too long, i.e. extended highest sequence - // number hasn't increased for several RTCP intervals. The function only - // returns true once until a new RR is received. - bool RtcpRrSequenceNumberTimeout(int64_t rtcp_interval_ms); - - std::vector TmmbrReceived(); - - bool UpdateRTCPReceiveInformationTimers(); - - std::vector BoundingSet(bool* tmmbr_owner); - - void UpdateTmmbr(); - - void RegisterRtcpStatisticsCallback(RtcpStatisticsCallback* callback); - RtcpStatisticsCallback* GetRtcpStatisticsCallback(); - - private: - struct PacketInformation; - struct ReceiveInformation; - struct ReportBlockWithRtt; - // Mapped by remote ssrc. - using ReceivedInfoMap = std::map; - // RTCP report blocks mapped by remote SSRC. - using ReportBlockInfoMap = std::map; - // RTCP report blocks map mapped by source SSRC. - using ReportBlockMap = std::map; - - bool ParseCompoundPacket(const uint8_t* packet_begin, - const uint8_t* packet_end, - PacketInformation* packet_information); - - void TriggerCallbacksFromRtcpPacket( - const PacketInformation& packet_information); - - void CreateReceiveInformation(uint32_t remote_ssrc) - EXCLUSIVE_LOCKS_REQUIRED(rtcp_receiver_lock_); - ReceiveInformation* GetReceiveInformation(uint32_t remote_ssrc) - EXCLUSIVE_LOCKS_REQUIRED(rtcp_receiver_lock_); - - void HandleSenderReport(const rtcp::CommonHeader& rtcp_block, - PacketInformation* packet_information) - EXCLUSIVE_LOCKS_REQUIRED(rtcp_receiver_lock_); - - void HandleReceiverReport(const rtcp::CommonHeader& rtcp_block, - PacketInformation* packet_information) - EXCLUSIVE_LOCKS_REQUIRED(rtcp_receiver_lock_); - - void HandleReportBlock(const rtcp::ReportBlock& report_block, - PacketInformation* packet_information, - uint32_t remote_ssrc) - EXCLUSIVE_LOCKS_REQUIRED(rtcp_receiver_lock_); - - void HandleSdes(const rtcp::CommonHeader& rtcp_block, - PacketInformation* packet_information) - EXCLUSIVE_LOCKS_REQUIRED(rtcp_receiver_lock_); - - void HandleXr(const rtcp::CommonHeader& rtcp_block, - PacketInformation* packet_information) - EXCLUSIVE_LOCKS_REQUIRED(rtcp_receiver_lock_); - - void HandleXrReceiveReferenceTime(uint32_t sender_ssrc, - const rtcp::Rrtr& rrtr) - EXCLUSIVE_LOCKS_REQUIRED(rtcp_receiver_lock_); - - void HandleXrDlrrReportBlock(const rtcp::ReceiveTimeInfo& rti) - EXCLUSIVE_LOCKS_REQUIRED(rtcp_receiver_lock_); - - void HandleXrTargetBitrate(const rtcp::TargetBitrate& target_bitrate, - PacketInformation* packet_information) - EXCLUSIVE_LOCKS_REQUIRED(rtcp_receiver_lock_); - - void HandleNack(const rtcp::CommonHeader& rtcp_block, - PacketInformation* packet_information) - EXCLUSIVE_LOCKS_REQUIRED(rtcp_receiver_lock_); - - void HandleBye(const rtcp::CommonHeader& rtcp_block) - EXCLUSIVE_LOCKS_REQUIRED(rtcp_receiver_lock_); - - void HandlePli(const rtcp::CommonHeader& rtcp_block, - PacketInformation* packet_information) - EXCLUSIVE_LOCKS_REQUIRED(rtcp_receiver_lock_); - - void HandleSli(const rtcp::CommonHeader& rtcp_block, - PacketInformation* packet_information) - EXCLUSIVE_LOCKS_REQUIRED(rtcp_receiver_lock_); - - void HandleRpsi(const rtcp::CommonHeader& rtcp_block, - PacketInformation* packet_information) - EXCLUSIVE_LOCKS_REQUIRED(rtcp_receiver_lock_); - - void HandlePsfbApp(const rtcp::CommonHeader& rtcp_block, - PacketInformation* packet_information) - EXCLUSIVE_LOCKS_REQUIRED(rtcp_receiver_lock_); - - void HandleTmmbr(const rtcp::CommonHeader& rtcp_block, - PacketInformation* packet_information) - EXCLUSIVE_LOCKS_REQUIRED(rtcp_receiver_lock_); - - void HandleTmmbn(const rtcp::CommonHeader& rtcp_block, - PacketInformation* packet_information) - EXCLUSIVE_LOCKS_REQUIRED(rtcp_receiver_lock_); - - void HandleSrReq(const rtcp::CommonHeader& rtcp_block, - PacketInformation* packet_information) - EXCLUSIVE_LOCKS_REQUIRED(rtcp_receiver_lock_); - - void HandleFir(const rtcp::CommonHeader& rtcp_block, - PacketInformation* packet_information) - EXCLUSIVE_LOCKS_REQUIRED(rtcp_receiver_lock_); - - void HandleTransportFeedback(const rtcp::CommonHeader& rtcp_block, - PacketInformation* packet_information) - EXCLUSIVE_LOCKS_REQUIRED(rtcp_receiver_lock_); - - Clock* const clock_; - const bool receiver_only_; - ModuleRtpRtcp* const rtp_rtcp_; - - rtc::CriticalSection feedbacks_lock_; - RtcpBandwidthObserver* const rtcp_bandwidth_observer_; - RtcpIntraFrameObserver* const rtcp_intra_frame_observer_; - TransportFeedbackObserver* const transport_feedback_observer_; - VideoBitrateAllocationObserver* const bitrate_allocation_observer_; - - rtc::CriticalSection rtcp_receiver_lock_; - uint32_t main_ssrc_ GUARDED_BY(rtcp_receiver_lock_); - uint32_t remote_ssrc_ GUARDED_BY(rtcp_receiver_lock_); - std::set registered_ssrcs_ GUARDED_BY(rtcp_receiver_lock_); - - // Received sender report. - RTCPSenderInfo remote_sender_info_; - // When did we receive the last send report. - NtpTime last_received_sr_ntp_; - - // Received XR receive time report. - rtcp::ReceiveTimeInfo remote_time_info_; - // Time when the report was received. - NtpTime last_received_xr_ntp_; - // Estimated rtt, zero when there is no valid estimate. - bool xr_rrtr_status_ GUARDED_BY(rtcp_receiver_lock_); - int64_t xr_rr_rtt_ms_; - - // Received report blocks. - ReportBlockMap received_report_blocks_ GUARDED_BY(rtcp_receiver_lock_); - ReceivedInfoMap received_infos_ GUARDED_BY(rtcp_receiver_lock_); - std::map received_cnames_ - GUARDED_BY(rtcp_receiver_lock_); - - // The last time we received an RTCP RR. - int64_t last_received_rr_ms_; - - // The time we last received an RTCP RR telling we have successfully - // delivered RTP packet to the remote side. - int64_t last_increased_sequence_number_ms_; - - RtcpStatisticsCallback* stats_callback_ GUARDED_BY(feedbacks_lock_); - - RtcpPacketTypeCounterObserver* const packet_type_counter_observer_; - RtcpPacketTypeCounter packet_type_counter_; - - RTCPUtility::NackStats nack_stats_; - - size_t num_skipped_packets_; - int64_t last_skipped_packets_warning_ms_; -}; -} // namespace webrtc -#endif // WEBRTC_MODULES_RTP_RTCP_SOURCE_RTCP_RECEIVER_H_ diff --git a/WebRtc.NET/include/webrtc/modules/rtp_rtcp/source/rtcp_sender.h b/WebRtc.NET/include/webrtc/modules/rtp_rtcp/source/rtcp_sender.h deleted file mode 100644 index 96a49a72..00000000 --- a/WebRtc.NET/include/webrtc/modules/rtp_rtcp/source/rtcp_sender.h +++ /dev/null @@ -1,299 +0,0 @@ -/* - * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MODULES_RTP_RTCP_SOURCE_RTCP_SENDER_H_ -#define WEBRTC_MODULES_RTP_RTCP_SOURCE_RTCP_SENDER_H_ - -#include -#include -#include -#include -#include -#include - -#include "webrtc/api/call/transport.h" -#include "webrtc/base/constructormagic.h" -#include "webrtc/base/criticalsection.h" -#include "webrtc/base/optional.h" -#include "webrtc/base/random.h" -#include "webrtc/base/thread_annotations.h" -#include "webrtc/modules/remote_bitrate_estimator/include/bwe_defines.h" -#include "webrtc/modules/remote_bitrate_estimator/include/remote_bitrate_estimator.h" -#include "webrtc/modules/rtp_rtcp/include/receive_statistics.h" -#include "webrtc/modules/rtp_rtcp/include/rtp_rtcp_defines.h" -#include "webrtc/modules/rtp_rtcp/source/rtcp_packet.h" -#include "webrtc/modules/rtp_rtcp/source/rtcp_packet/dlrr.h" -#include "webrtc/modules/rtp_rtcp/source/rtcp_packet/report_block.h" -#include "webrtc/modules/rtp_rtcp/source/rtcp_packet/tmmb_item.h" -#include "webrtc/modules/rtp_rtcp/source/rtcp_utility.h" -#include "webrtc/typedefs.h" - -namespace webrtc { - -class ModuleRtpRtcpImpl; -class RtcEventLog; - -class NACKStringBuilder { - public: - NACKStringBuilder(); - ~NACKStringBuilder(); - - void PushNACK(uint16_t nack); - std::string GetResult(); - - private: - std::ostringstream stream_; - int count_; - uint16_t prevNack_; - bool consecutive_; -}; - -class RTCPSender { - public: - struct FeedbackState { - FeedbackState(); - - uint8_t send_payload_type; - uint32_t packets_sent; - size_t media_bytes_sent; - uint32_t send_bitrate; - - uint32_t last_rr_ntp_secs; - uint32_t last_rr_ntp_frac; - uint32_t remote_sr; - - bool has_last_xr_rr; - rtcp::ReceiveTimeInfo last_xr_rr; - - // Used when generating TMMBR. - ModuleRtpRtcpImpl* module; - }; - - RTCPSender(bool audio, - Clock* clock, - ReceiveStatistics* receive_statistics, - RtcpPacketTypeCounterObserver* packet_type_counter_observer, - RtcEventLog* event_log, - Transport* outgoing_transport); - virtual ~RTCPSender(); - - RtcpMode Status() const; - void SetRTCPStatus(RtcpMode method); - - bool Sending() const; - int32_t SetSendingStatus(const FeedbackState& feedback_state, - bool enabled); // combine the functions - - int32_t SetNackStatus(bool enable); - - void SetTimestampOffset(uint32_t timestamp_offset); - - void SetLastRtpTime(uint32_t rtp_timestamp, int64_t capture_time_ms); - - void SetSSRC(uint32_t ssrc); - - void SetRemoteSSRC(uint32_t ssrc); - - int32_t SetCNAME(const char* cName); - - int32_t AddMixedCNAME(uint32_t SSRC, const char* c_name); - - int32_t RemoveMixedCNAME(uint32_t SSRC); - - bool TimeToSendRTCPReport(bool sendKeyframeBeforeRTP = false) const; - - int32_t SendRTCP(const FeedbackState& feedback_state, - RTCPPacketType packetType, - int32_t nackSize = 0, - const uint16_t* nackList = 0, - bool repeat = false, - uint64_t pictureID = 0); - - int32_t SendCompoundRTCP(const FeedbackState& feedback_state, - const std::set& packetTypes, - int32_t nackSize = 0, - const uint16_t* nackList = 0, - bool repeat = false, - uint64_t pictureID = 0); - - bool REMB() const; - - void SetREMBStatus(bool enable); - - void SetREMBData(uint32_t bitrate, const std::vector& ssrcs); - - bool TMMBR() const; - - void SetTMMBRStatus(bool enable); - - void SetMaxRtpPacketSize(size_t max_packet_size); - - void SetTmmbn(std::vector bounding_set); - - int32_t SetApplicationSpecificData(uint8_t subType, - uint32_t name, - const uint8_t* data, - uint16_t length); - int32_t SetRTCPVoIPMetrics(const RTCPVoIPMetric* VoIPMetric); - - void SendRtcpXrReceiverReferenceTime(bool enable); - - bool RtcpXrReceiverReferenceTime() const; - - void SetCsrcs(const std::vector& csrcs); - - void SetTargetBitrate(unsigned int target_bitrate); - void SetVideoBitrateAllocation(const BitrateAllocation& bitrate); - bool SendFeedbackPacket(const rtcp::TransportFeedback& packet); - - private: - class RtcpContext; - - // Determine which RTCP messages should be sent and setup flags. - void PrepareReport(const FeedbackState& feedback_state) - EXCLUSIVE_LOCKS_REQUIRED(critical_section_rtcp_sender_); - - bool AddReportBlock(const FeedbackState& feedback_state, - uint32_t ssrc, - StreamStatistician* statistician) - EXCLUSIVE_LOCKS_REQUIRED(critical_section_rtcp_sender_); - - std::unique_ptr BuildSR(const RtcpContext& context) - EXCLUSIVE_LOCKS_REQUIRED(critical_section_rtcp_sender_); - std::unique_ptr BuildRR(const RtcpContext& context) - EXCLUSIVE_LOCKS_REQUIRED(critical_section_rtcp_sender_); - std::unique_ptr BuildSDES(const RtcpContext& context) - EXCLUSIVE_LOCKS_REQUIRED(critical_section_rtcp_sender_); - std::unique_ptr BuildPLI(const RtcpContext& context) - EXCLUSIVE_LOCKS_REQUIRED(critical_section_rtcp_sender_); - std::unique_ptr BuildREMB(const RtcpContext& context) - EXCLUSIVE_LOCKS_REQUIRED(critical_section_rtcp_sender_); - std::unique_ptr BuildTMMBR(const RtcpContext& context) - EXCLUSIVE_LOCKS_REQUIRED(critical_section_rtcp_sender_); - std::unique_ptr BuildTMMBN(const RtcpContext& context) - EXCLUSIVE_LOCKS_REQUIRED(critical_section_rtcp_sender_); - std::unique_ptr BuildAPP(const RtcpContext& context) - EXCLUSIVE_LOCKS_REQUIRED(critical_section_rtcp_sender_); - std::unique_ptr BuildExtendedReports( - const RtcpContext& context) - EXCLUSIVE_LOCKS_REQUIRED(critical_section_rtcp_sender_); - std::unique_ptr BuildBYE(const RtcpContext& context) - EXCLUSIVE_LOCKS_REQUIRED(critical_section_rtcp_sender_); - std::unique_ptr BuildFIR(const RtcpContext& context) - EXCLUSIVE_LOCKS_REQUIRED(critical_section_rtcp_sender_); - std::unique_ptr BuildSLI(const RtcpContext& context) - EXCLUSIVE_LOCKS_REQUIRED(critical_section_rtcp_sender_); - std::unique_ptr BuildRPSI(const RtcpContext& context) - EXCLUSIVE_LOCKS_REQUIRED(critical_section_rtcp_sender_); - std::unique_ptr BuildNACK(const RtcpContext& context) - EXCLUSIVE_LOCKS_REQUIRED(critical_section_rtcp_sender_); - - private: - const bool audio_; - Clock* const clock_; - Random random_ GUARDED_BY(critical_section_rtcp_sender_); - RtcpMode method_ GUARDED_BY(critical_section_rtcp_sender_); - - RtcEventLog* const event_log_; - Transport* const transport_; - - rtc::CriticalSection critical_section_rtcp_sender_; - bool using_nack_ GUARDED_BY(critical_section_rtcp_sender_); - bool sending_ GUARDED_BY(critical_section_rtcp_sender_); - bool remb_enabled_ GUARDED_BY(critical_section_rtcp_sender_); - - int64_t next_time_to_send_rtcp_ GUARDED_BY(critical_section_rtcp_sender_); - - uint32_t timestamp_offset_ GUARDED_BY(critical_section_rtcp_sender_); - uint32_t last_rtp_timestamp_ GUARDED_BY(critical_section_rtcp_sender_); - int64_t last_frame_capture_time_ms_ GUARDED_BY(critical_section_rtcp_sender_); - uint32_t ssrc_ GUARDED_BY(critical_section_rtcp_sender_); - // SSRC that we receive on our RTP channel - uint32_t remote_ssrc_ GUARDED_BY(critical_section_rtcp_sender_); - std::string cname_ GUARDED_BY(critical_section_rtcp_sender_); - - ReceiveStatistics* receive_statistics_ - GUARDED_BY(critical_section_rtcp_sender_); - std::map report_blocks_ - GUARDED_BY(critical_section_rtcp_sender_); - std::map csrc_cnames_ - GUARDED_BY(critical_section_rtcp_sender_); - - // send CSRCs - std::vector csrcs_ GUARDED_BY(critical_section_rtcp_sender_); - - // Full intra request - uint8_t sequence_number_fir_ GUARDED_BY(critical_section_rtcp_sender_); - - // REMB - uint32_t remb_bitrate_ GUARDED_BY(critical_section_rtcp_sender_); - std::vector remb_ssrcs_ GUARDED_BY(critical_section_rtcp_sender_); - - std::vector tmmbn_to_send_ - GUARDED_BY(critical_section_rtcp_sender_); - uint32_t tmmbr_send_bps_ GUARDED_BY(critical_section_rtcp_sender_); - uint32_t packet_oh_send_ GUARDED_BY(critical_section_rtcp_sender_); - size_t max_packet_size_; - - // APP - uint8_t app_sub_type_ GUARDED_BY(critical_section_rtcp_sender_); - uint32_t app_name_ GUARDED_BY(critical_section_rtcp_sender_); - std::unique_ptr app_data_ - GUARDED_BY(critical_section_rtcp_sender_); - uint16_t app_length_ GUARDED_BY(critical_section_rtcp_sender_); - - // True if sending of XR Receiver reference time report is enabled. - bool xr_send_receiver_reference_time_enabled_ - GUARDED_BY(critical_section_rtcp_sender_); - - // XR VoIP metric - rtc::Optional xr_voip_metric_ - GUARDED_BY(critical_section_rtcp_sender_); - - RtcpPacketTypeCounterObserver* const packet_type_counter_observer_; - RtcpPacketTypeCounter packet_type_counter_ - GUARDED_BY(critical_section_rtcp_sender_); - - RTCPUtility::NackStats nack_stats_ GUARDED_BY(critical_section_rtcp_sender_); - - rtc::Optional video_bitrate_allocation_ - GUARDED_BY(critical_section_rtcp_sender_); - - void SetFlag(uint32_t type, bool is_volatile) - EXCLUSIVE_LOCKS_REQUIRED(critical_section_rtcp_sender_); - void SetFlags(const std::set& types, bool is_volatile) - EXCLUSIVE_LOCKS_REQUIRED(critical_section_rtcp_sender_); - bool IsFlagPresent(uint32_t type) const - EXCLUSIVE_LOCKS_REQUIRED(critical_section_rtcp_sender_); - bool ConsumeFlag(uint32_t type, bool forced = false) - EXCLUSIVE_LOCKS_REQUIRED(critical_section_rtcp_sender_); - bool AllVolatileFlagsConsumed() const - EXCLUSIVE_LOCKS_REQUIRED(critical_section_rtcp_sender_); - struct ReportFlag { - ReportFlag(uint32_t type, bool is_volatile) - : type(type), is_volatile(is_volatile) {} - bool operator<(const ReportFlag& flag) const { return type < flag.type; } - bool operator==(const ReportFlag& flag) const { return type == flag.type; } - const uint32_t type; - const bool is_volatile; - }; - - std::set report_flags_ GUARDED_BY(critical_section_rtcp_sender_); - - typedef std::unique_ptr (RTCPSender::*BuilderFunc)( - const RtcpContext&); - // Map from RTCPPacketType to builder. - std::map builders_; - - RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(RTCPSender); -}; -} // namespace webrtc - -#endif // WEBRTC_MODULES_RTP_RTCP_SOURCE_RTCP_SENDER_H_ diff --git a/WebRtc.NET/include/webrtc/modules/rtp_rtcp/source/rtcp_utility.h b/WebRtc.NET/include/webrtc/modules/rtp_rtcp/source/rtcp_utility.h deleted file mode 100644 index 86fee8ea..00000000 --- a/WebRtc.NET/include/webrtc/modules/rtp_rtcp/source/rtcp_utility.h +++ /dev/null @@ -1,490 +0,0 @@ -/* -* Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. -* -* Use of this source code is governed by a BSD-style license -* that can be found in the LICENSE file in the root of the source -* tree. An additional intellectual property rights grant can be found -* in the file PATENTS. All contributing project authors may -* be found in the AUTHORS file in the root of the source tree. -*/ - -#ifndef WEBRTC_MODULES_RTP_RTCP_SOURCE_RTCP_UTILITY_H_ -#define WEBRTC_MODULES_RTP_RTCP_SOURCE_RTCP_UTILITY_H_ - -#include // size_t, ptrdiff_t - -#include - -#include "webrtc/modules/rtp_rtcp/include/rtp_rtcp_defines.h" -#include "webrtc/modules/rtp_rtcp/source/rtp_rtcp_config.h" -#include "webrtc/typedefs.h" - -namespace webrtc { -namespace rtcp { -class RtcpPacket; -} -namespace RTCPUtility { - -class NackStats { - public: - NackStats(); - ~NackStats(); - - // Updates stats with requested sequence number. - // This function should be called for each NACK request to calculate the - // number of unique NACKed RTP packets. - void ReportRequest(uint16_t sequence_number); - - // Gets the number of NACKed RTP packets. - uint32_t requests() const { return requests_; } - - // Gets the number of unique NACKed RTP packets. - uint32_t unique_requests() const { return unique_requests_; } - - private: - uint16_t max_sequence_number_; - uint32_t requests_; - uint32_t unique_requests_; -}; - -uint32_t MidNtp(uint32_t ntp_sec, uint32_t ntp_frac); - -struct RTCPPacketRR { - uint32_t SenderSSRC; - uint8_t NumberOfReportBlocks; -}; -struct RTCPPacketSR { - uint32_t SenderSSRC; - uint8_t NumberOfReportBlocks; - - // sender info - uint32_t NTPMostSignificant; - uint32_t NTPLeastSignificant; - uint32_t RTPTimestamp; - uint32_t SenderPacketCount; - uint32_t SenderOctetCount; -}; -struct RTCPPacketReportBlockItem { - // report block - uint32_t SSRC; - uint8_t FractionLost; - uint32_t CumulativeNumOfPacketsLost; - uint32_t ExtendedHighestSequenceNumber; - uint32_t Jitter; - uint32_t LastSR; - uint32_t DelayLastSR; -}; -struct RTCPPacketSDESCName { - // RFC3550 - uint32_t SenderSSRC; - char CName[RTCP_CNAME_SIZE]; -}; - -struct RTCPPacketExtendedJitterReportItem { - // RFC 5450 - uint32_t Jitter; -}; - -struct RTCPPacketBYE { - uint32_t SenderSSRC; -}; -struct RTCPPacketXR { - // RFC 3611 - uint32_t OriginatorSSRC; -}; -struct RTCPPacketXRReceiverReferenceTimeItem { - // RFC 3611 4.4 - uint32_t NTPMostSignificant; - uint32_t NTPLeastSignificant; -}; -struct RTCPPacketXRDLRRReportBlockItem { - // RFC 3611 4.5 - uint32_t SSRC; - uint32_t LastRR; - uint32_t DelayLastRR; -}; -struct RTCPPacketXRVOIPMetricItem { - // RFC 3611 4.7 - uint32_t SSRC; - uint8_t lossRate; - uint8_t discardRate; - uint8_t burstDensity; - uint8_t gapDensity; - uint16_t burstDuration; - uint16_t gapDuration; - uint16_t roundTripDelay; - uint16_t endSystemDelay; - uint8_t signalLevel; - uint8_t noiseLevel; - uint8_t RERL; - uint8_t Gmin; - uint8_t Rfactor; - uint8_t extRfactor; - uint8_t MOSLQ; - uint8_t MOSCQ; - uint8_t RXconfig; - uint16_t JBnominal; - uint16_t JBmax; - uint16_t JBabsMax; -}; - -struct RTCPPacketRTPFBNACK { - uint32_t SenderSSRC; - uint32_t MediaSSRC; -}; -struct RTCPPacketRTPFBNACKItem { - // RFC4585 - uint16_t PacketID; - uint16_t BitMask; -}; - -struct RTCPPacketRTPFBTMMBR { - uint32_t SenderSSRC; - uint32_t MediaSSRC; // zero! -}; -struct RTCPPacketRTPFBTMMBRItem { - // RFC5104 - uint32_t SSRC; - uint32_t MaxTotalMediaBitRate; // In Kbit/s - uint32_t MeasuredOverhead; -}; - -struct RTCPPacketRTPFBTMMBN { - uint32_t SenderSSRC; - uint32_t MediaSSRC; // zero! -}; -struct RTCPPacketRTPFBTMMBNItem { - // RFC5104 - uint32_t SSRC; // "Owner" - uint32_t MaxTotalMediaBitRate; - uint32_t MeasuredOverhead; -}; - -struct RTCPPacketPSFBFIR { - uint32_t SenderSSRC; - uint32_t MediaSSRC; // zero! -}; -struct RTCPPacketPSFBFIRItem { - // RFC5104 - uint32_t SSRC; - uint8_t CommandSequenceNumber; -}; - -struct RTCPPacketPSFBPLI { - // RFC4585 - uint32_t SenderSSRC; - uint32_t MediaSSRC; -}; - -struct RTCPPacketPSFBSLI { - // RFC4585 - uint32_t SenderSSRC; - uint32_t MediaSSRC; -}; -struct RTCPPacketPSFBSLIItem { - // RFC4585 - uint16_t FirstMB; - uint16_t NumberOfMB; - uint8_t PictureId; -}; -struct RTCPPacketPSFBRPSI { - // RFC4585 - uint32_t SenderSSRC; - uint32_t MediaSSRC; - uint8_t PayloadType; - uint16_t NumberOfValidBits; - uint8_t NativeBitString[RTCP_RPSI_DATA_SIZE]; -}; -struct RTCPPacketPSFBAPP { - uint32_t SenderSSRC; - uint32_t MediaSSRC; -}; -struct RTCPPacketPSFBREMBItem { - uint32_t BitRate; - uint8_t NumberOfSSRCs; - uint32_t SSRCs[MAX_NUMBER_OF_REMB_FEEDBACK_SSRCS]; -}; -// generic name APP -struct RTCPPacketAPP { - uint8_t SubType; - uint32_t Name; - uint8_t Data[kRtcpAppCode_DATA_SIZE]; - uint16_t Size; -}; - -union RTCPPacket { - RTCPPacketRR RR; - RTCPPacketSR SR; - RTCPPacketReportBlockItem ReportBlockItem; - - RTCPPacketSDESCName CName; - RTCPPacketBYE BYE; - - RTCPPacketExtendedJitterReportItem ExtendedJitterReportItem; - - RTCPPacketRTPFBNACK NACK; - RTCPPacketRTPFBNACKItem NACKItem; - - RTCPPacketPSFBPLI PLI; - RTCPPacketPSFBSLI SLI; - RTCPPacketPSFBSLIItem SLIItem; - RTCPPacketPSFBRPSI RPSI; - RTCPPacketPSFBAPP PSFBAPP; - RTCPPacketPSFBREMBItem REMBItem; - - RTCPPacketRTPFBTMMBR TMMBR; - RTCPPacketRTPFBTMMBRItem TMMBRItem; - RTCPPacketRTPFBTMMBN TMMBN; - RTCPPacketRTPFBTMMBNItem TMMBNItem; - RTCPPacketPSFBFIR FIR; - RTCPPacketPSFBFIRItem FIRItem; - - RTCPPacketXR XR; - RTCPPacketXRReceiverReferenceTimeItem XRReceiverReferenceTimeItem; - RTCPPacketXRDLRRReportBlockItem XRDLRRReportBlockItem; - RTCPPacketXRVOIPMetricItem XRVOIPMetricItem; - - RTCPPacketAPP APP; -}; - -enum class RTCPPacketTypes { - kInvalid, - - // RFC3550 - kRr, - kSr, - kReportBlockItem, - - kSdes, - kSdesChunk, - kBye, - - // RFC5450 - kExtendedIj, - kExtendedIjItem, - - // RFC4585 - kRtpfbNack, - kRtpfbNackItem, - - kPsfbPli, - kPsfbRpsi, - kPsfbRpsiItem, - kPsfbSli, - kPsfbSliItem, - kPsfbApp, - kPsfbRemb, - kPsfbRembItem, - - // RFC5104 - kRtpfbTmmbr, - kRtpfbTmmbrItem, - kRtpfbTmmbn, - kRtpfbTmmbnItem, - kPsfbFir, - kPsfbFirItem, - - // draft-perkins-avt-rapid-rtp-sync - kRtpfbSrReq, - - // RFC 3611 - kXrHeader, - kXrReceiverReferenceTime, - kXrDlrrReportBlock, - kXrDlrrReportBlockItem, - kXrVoipMetric, - - kApp, - kAppItem, - - // draft-holmer-rmcat-transport-wide-cc-extensions - kTransportFeedback, -}; - -struct RTCPRawPacket { - const uint8_t* _ptrPacketBegin; - const uint8_t* _ptrPacketEnd; -}; - -struct RTCPModRawPacket { - uint8_t* _ptrPacketBegin; - uint8_t* _ptrPacketEnd; -}; - -struct RtcpCommonHeader { - static const uint8_t kHeaderSizeBytes = 4; - RtcpCommonHeader() - : version(2), - count_or_format(0), - packet_type(0), - payload_size_bytes(0), - padding_bytes(0) {} - - uint32_t BlockSize() const { - return kHeaderSizeBytes + payload_size_bytes + padding_bytes; - } - - uint8_t version; - uint8_t count_or_format; - uint8_t packet_type; - uint32_t payload_size_bytes; - uint8_t padding_bytes; -}; - -enum RTCPPT : uint8_t { - PT_IJ = 195, - PT_SR = 200, - PT_RR = 201, - PT_SDES = 202, - PT_BYE = 203, - PT_APP = 204, - PT_RTPFB = 205, - PT_PSFB = 206, - PT_XR = 207 -}; - -// Extended report blocks, RFC 3611. -enum RtcpXrBlockType : uint8_t { - kBtReceiverReferenceTime = 4, - kBtDlrr = 5, - kBtVoipMetric = 7 -}; - -bool RtcpParseCommonHeader(const uint8_t* buffer, - size_t size_bytes, - RtcpCommonHeader* parsed_header); - -class RTCPParserV2 { - public: - RTCPParserV2( - const uint8_t* rtcpData, - size_t rtcpDataLength, - bool rtcpReducedSizeEnable); // Set to true, to allow non-compound RTCP! - ~RTCPParserV2(); - - RTCPPacketTypes PacketType() const; - const RTCPPacket& Packet() const; - rtcp::RtcpPacket* ReleaseRtcpPacket(); - const RTCPRawPacket& RawPacket() const; - ptrdiff_t LengthLeft() const; - - bool IsValid() const; - size_t NumSkippedBlocks() const; - - RTCPPacketTypes Begin(); - RTCPPacketTypes Iterate(); - - private: - enum class ParseState { - State_TopLevel, // Top level packet - State_ReportBlockItem, // SR/RR report block - State_SDESChunk, // SDES chunk - State_BYEItem, // BYE item - State_ExtendedJitterItem, // Extended jitter report item - State_RTPFB_NACKItem, // NACK FCI item - State_RTPFB_TMMBRItem, // TMMBR FCI item - State_RTPFB_TMMBNItem, // TMMBN FCI item - State_PSFB_SLIItem, // SLI FCI item - State_PSFB_RPSIItem, // RPSI FCI item - State_PSFB_FIRItem, // FIR FCI item - State_PSFB_AppItem, // Application specific FCI item - State_PSFB_REMBItem, // Application specific REMB item - State_XRItem, - State_XR_DLLRItem, - State_AppItem - }; - - private: - void IterateTopLevel(); - void IterateReportBlockItem(); - void IterateSDESChunk(); - void IterateBYEItem(); - void IterateExtendedJitterItem(); - void IterateNACKItem(); - void IterateTMMBRItem(); - void IterateTMMBNItem(); - void IterateSLIItem(); - void IterateRPSIItem(); - void IterateFIRItem(); - void IteratePsfbAppItem(); - void IteratePsfbREMBItem(); - void IterateAppItem(); - void IterateXrItem(); - void IterateXrDlrrItem(); - - void Validate(); - void EndCurrentBlock(); - - bool ParseRR(); - bool ParseSR(); - bool ParseReportBlockItem(); - - bool ParseSDES(); - bool ParseSDESChunk(); - bool ParseSDESItem(); - - bool ParseBYE(); - bool ParseBYEItem(); - - bool ParseIJ(); - bool ParseIJItem(); - - bool ParseXr(); - bool ParseXrItem(); - bool ParseXrReceiverReferenceTimeItem(int block_length_4bytes); - bool ParseXrDlrr(int block_length_4bytes); - bool ParseXrDlrrItem(); - bool ParseXrVoipMetricItem(int block_length_4bytes); - bool ParseXrUnsupportedBlockType(int block_length_4bytes); - - bool ParseFBCommon(const RtcpCommonHeader& header); - bool ParseNACKItem(); - bool ParseTMMBRItem(); - bool ParseTMMBNItem(); - bool ParseSLIItem(); - bool ParseRPSIItem(); - bool ParseFIRItem(); - bool ParsePsfbAppItem(); - bool ParsePsfbREMBItem(); - - bool ParseAPP(const RtcpCommonHeader& header); - bool ParseAPPItem(); - - private: - const uint8_t* const _ptrRTCPDataBegin; - const bool _RTCPReducedSizeEnable; - const uint8_t* const _ptrRTCPDataEnd; - - bool _validPacket; - const uint8_t* _ptrRTCPData; - const uint8_t* _ptrRTCPBlockEnd; - - ParseState _state; - uint8_t _numberOfBlocks; - size_t num_skipped_blocks_; - - RTCPPacketTypes _packetType; - RTCPPacket _packet; - std::unique_ptr rtcp_packet_; -}; - -class RTCPPacketIterator { - public: - RTCPPacketIterator(uint8_t* rtcpData, size_t rtcpDataLength); - ~RTCPPacketIterator(); - - const RtcpCommonHeader* Begin(); - const RtcpCommonHeader* Iterate(); - const RtcpCommonHeader* Current(); - - private: - uint8_t* const _ptrBegin; - uint8_t* const _ptrEnd; - - uint8_t* _ptrBlock; - - RtcpCommonHeader _header; -}; -} // namespace RTCPUtility -} // namespace webrtc -#endif // WEBRTC_MODULES_RTP_RTCP_SOURCE_RTCP_UTILITY_H_ diff --git a/WebRtc.NET/include/webrtc/modules/rtp_rtcp/source/rtp_format.h b/WebRtc.NET/include/webrtc/modules/rtp_rtcp/source/rtp_format.h deleted file mode 100644 index 3b6004b9..00000000 --- a/WebRtc.NET/include/webrtc/modules/rtp_rtcp/source/rtp_format.h +++ /dev/null @@ -1,73 +0,0 @@ -/* - * Copyright (c) 2014 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MODULES_RTP_RTCP_SOURCE_RTP_FORMAT_H_ -#define WEBRTC_MODULES_RTP_RTCP_SOURCE_RTP_FORMAT_H_ - -#include - -#include "webrtc/base/constructormagic.h" -#include "webrtc/modules/include/module_common_types.h" -#include "webrtc/modules/rtp_rtcp/include/rtp_rtcp_defines.h" - -namespace webrtc { -class RtpPacketToSend; - -class RtpPacketizer { - public: - static RtpPacketizer* Create(RtpVideoCodecTypes type, - size_t max_payload_len, - const RTPVideoTypeHeader* rtp_type_header, - FrameType frame_type); - - virtual ~RtpPacketizer() {} - - virtual void SetPayloadData(const uint8_t* payload_data, - size_t payload_size, - const RTPFragmentationHeader* fragmentation) = 0; - - // Get the next payload with payload header. - // Write payload and set marker bit of the |packet|. - // The parameter |last_packet| is true for the last packet of the frame, false - // otherwise (i.e., call the function again to get the next packet). - // Returns true on success, false otherwise. - virtual bool NextPacket(RtpPacketToSend* packet, bool* last_packet) = 0; - - virtual ProtectionType GetProtectionType() = 0; - - virtual StorageType GetStorageType(uint32_t retransmission_settings) = 0; - - virtual std::string ToString() = 0; -}; - -// TODO(sprang): Update the depacketizer to return a std::unqie_ptr with a copy -// of the parsed payload, rather than just a pointer into the incoming buffer. -// This way we can move some parsing out from the jitter buffer into here, and -// the jitter buffer can just store that pointer rather than doing a copy there. -class RtpDepacketizer { - public: - struct ParsedPayload { - const uint8_t* payload; - size_t payload_length; - FrameType frame_type; - RTPTypeHeader type; - }; - - static RtpDepacketizer* Create(RtpVideoCodecTypes type); - - virtual ~RtpDepacketizer() {} - - // Parses the RTP payload, parsed result will be saved in |parsed_payload|. - virtual bool Parse(ParsedPayload* parsed_payload, - const uint8_t* payload_data, - size_t payload_data_length) = 0; -}; -} // namespace webrtc -#endif // WEBRTC_MODULES_RTP_RTCP_SOURCE_RTP_FORMAT_H_ diff --git a/WebRtc.NET/include/webrtc/modules/rtp_rtcp/source/rtp_format_video_generic.h b/WebRtc.NET/include/webrtc/modules/rtp_rtcp/source/rtp_format_video_generic.h deleted file mode 100644 index 118166fb..00000000 --- a/WebRtc.NET/include/webrtc/modules/rtp_rtcp/source/rtp_format_video_generic.h +++ /dev/null @@ -1,72 +0,0 @@ -/* - * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ -#ifndef WEBRTC_MODULES_RTP_RTCP_SOURCE_RTP_FORMAT_VIDEO_GENERIC_H_ -#define WEBRTC_MODULES_RTP_RTCP_SOURCE_RTP_FORMAT_VIDEO_GENERIC_H_ - -#include - -#include "webrtc/base/constructormagic.h" -#include "webrtc/common_types.h" -#include "webrtc/modules/rtp_rtcp/source/rtp_format.h" -#include "webrtc/typedefs.h" - -namespace webrtc { -namespace RtpFormatVideoGeneric { -static const uint8_t kKeyFrameBit = 0x01; -static const uint8_t kFirstPacketBit = 0x02; -} // namespace RtpFormatVideoGeneric - -class RtpPacketizerGeneric : public RtpPacketizer { - public: - // Initialize with payload from encoder. - // The payload_data must be exactly one encoded generic frame. - RtpPacketizerGeneric(FrameType frametype, size_t max_payload_len); - - virtual ~RtpPacketizerGeneric(); - - void SetPayloadData(const uint8_t* payload_data, - size_t payload_size, - const RTPFragmentationHeader* fragmentation) override; - - // Get the next payload with generic payload header. - // Write payload and set marker bit of the |packet|. - // The parameter |last_packet| is true for the last packet of the frame, false - // otherwise (i.e., call the function again to get the next packet). - // Returns true on success, false otherwise. - bool NextPacket(RtpPacketToSend* packet, bool* last_packet) override; - - ProtectionType GetProtectionType() override; - - StorageType GetStorageType(uint32_t retransmission_settings) override; - - std::string ToString() override; - - private: - const uint8_t* payload_data_; - size_t payload_size_; - const size_t max_payload_len_; - FrameType frame_type_; - size_t payload_length_; - uint8_t generic_header_; - - RTC_DISALLOW_COPY_AND_ASSIGN(RtpPacketizerGeneric); -}; - -// Depacketizer for generic codec. -class RtpDepacketizerGeneric : public RtpDepacketizer { - public: - virtual ~RtpDepacketizerGeneric() {} - - bool Parse(ParsedPayload* parsed_payload, - const uint8_t* payload_data, - size_t payload_data_length) override; -}; -} // namespace webrtc -#endif // WEBRTC_MODULES_RTP_RTCP_SOURCE_RTP_FORMAT_VIDEO_GENERIC_H_ diff --git a/WebRtc.NET/include/webrtc/modules/rtp_rtcp/source/rtp_format_vp8.h b/WebRtc.NET/include/webrtc/modules/rtp_rtcp/source/rtp_format_vp8.h deleted file mode 100644 index cddf51f0..00000000 --- a/WebRtc.NET/include/webrtc/modules/rtp_rtcp/source/rtp_format_vp8.h +++ /dev/null @@ -1,220 +0,0 @@ -/* - * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -/* - * This file contains the declaration of the VP8 packetizer class. - * A packetizer object is created for each encoded video frame. The - * constructor is called with the payload data and size, - * together with the fragmentation information and a packetizer mode - * of choice. Alternatively, if no fragmentation info is available, the - * second constructor can be used with only payload data and size; in that - * case the mode kEqualSize is used. - * - * After creating the packetizer, the method NextPacket is called - * repeatedly to get all packets for the frame. The method returns - * false as long as there are more packets left to fetch. - */ - -#ifndef WEBRTC_MODULES_RTP_RTCP_SOURCE_RTP_FORMAT_VP8_H_ -#define WEBRTC_MODULES_RTP_RTCP_SOURCE_RTP_FORMAT_VP8_H_ - -#include -#include -#include - -#include "webrtc/base/constructormagic.h" -#include "webrtc/modules/include/module_common_types.h" -#include "webrtc/modules/rtp_rtcp/source/rtp_format.h" -#include "webrtc/typedefs.h" - -namespace webrtc { - -enum VP8PacketizerMode { - kStrict = 0, // Split partitions if too large; - // never aggregate, balance size. - kAggregate, // Split partitions if too large; aggregate whole partitions. - kEqualSize, // Split entire payload without considering partition limits. - // This will produce equal size packets for the whole frame. - kNumModes, -}; - -// Packetizer for VP8. -class RtpPacketizerVp8 : public RtpPacketizer { - public: - // Initialize with payload from encoder and fragmentation info. - // The payload_data must be exactly one encoded VP8 frame. - RtpPacketizerVp8(const RTPVideoHeaderVP8& hdr_info, - size_t max_payload_len, - VP8PacketizerMode mode); - - // Initialize without fragmentation info. Mode kEqualSize will be used. - // The payload_data must be exactly one encoded VP8 frame. - RtpPacketizerVp8(const RTPVideoHeaderVP8& hdr_info, size_t max_payload_len); - - virtual ~RtpPacketizerVp8(); - - void SetPayloadData(const uint8_t* payload_data, - size_t payload_size, - const RTPFragmentationHeader* fragmentation) override; - - // Get the next payload with VP8 payload header. - // Write payload and set marker bit of the |packet|. - // The parameter |last_packet| is true for the last packet of the frame, false - // otherwise (i.e., call the function again to get the next packet). - // Returns true on success, false otherwise. - bool NextPacket(RtpPacketToSend* packet, bool* last_packet) override; - - ProtectionType GetProtectionType() override; - - StorageType GetStorageType(uint32_t retransmission_settings) override; - - std::string ToString() override; - - private: - typedef struct { - size_t payload_start_pos; - size_t size; - bool first_fragment; - size_t first_partition_ix; - } InfoStruct; - typedef std::queue InfoQueue; - enum AggregationMode { - kAggrNone = 0, // No aggregation. - kAggrPartitions, // Aggregate intact partitions. - kAggrFragments // Aggregate intact and fragmented partitions. - }; - - static const AggregationMode aggr_modes_[kNumModes]; - static const bool balance_modes_[kNumModes]; - static const bool separate_first_modes_[kNumModes]; - static const int kXBit = 0x80; - static const int kNBit = 0x20; - static const int kSBit = 0x10; - static const int kPartIdField = 0x0F; - static const int kKeyIdxField = 0x1F; - static const int kIBit = 0x80; - static const int kLBit = 0x40; - static const int kTBit = 0x20; - static const int kKBit = 0x10; - static const int kYBit = 0x20; - - // Calculate size of next chunk to send. Returns 0 if none can be sent. - size_t CalcNextSize(size_t max_payload_len, - size_t remaining_bytes, - bool split_payload) const; - - // Calculate all packet sizes and load to packet info queue. - int GeneratePackets(); - - // Calculate all packet sizes using Vp8PartitionAggregator and load to packet - // info queue. - int GeneratePacketsBalancedAggregates(); - - // Helper function to GeneratePacketsBalancedAggregates(). Find all - // continuous sets of partitions smaller than the max payload size (not - // max_size), and aggregate them into balanced packets. The result is written - // to partition_vec, which is of the same length as the number of partitions. - // A value of -1 indicates that the partition is too large and must be split. - // Aggregates are numbered 0, 1, 2, etc. For each set of small partitions, - // the aggregate numbers restart at 0. Output values min_size and max_size - // will hold the smallest and largest resulting aggregates (i.e., not counting - // those that must be split). - void AggregateSmallPartitions(std::vector* partition_vec, - int* min_size, - int* max_size); - - // Insert packet into packet queue. - void QueuePacket(size_t start_pos, - size_t packet_size, - size_t first_partition_in_packet, - bool start_on_new_fragment); - - // Write the payload header and copy the payload to the buffer. - // The info in packet_info determines which part of the payload is written - // and what to write in the header fields. - int WriteHeaderAndPayload(const InfoStruct& packet_info, - uint8_t* buffer, - size_t buffer_length) const; - - // Write the X field and the appropriate extension fields to buffer. - // The function returns the extension length (including X field), or -1 - // on error. - int WriteExtensionFields(uint8_t* buffer, size_t buffer_length) const; - - // Set the I bit in the x_field, and write PictureID to the appropriate - // position in buffer. The function returns 0 on success, -1 otherwise. - int WritePictureIDFields(uint8_t* x_field, - uint8_t* buffer, - size_t buffer_length, - size_t* extension_length) const; - - // Set the L bit in the x_field, and write Tl0PicIdx to the appropriate - // position in buffer. The function returns 0 on success, -1 otherwise. - int WriteTl0PicIdxFields(uint8_t* x_field, - uint8_t* buffer, - size_t buffer_length, - size_t* extension_length) const; - - // Set the T and K bits in the x_field, and write TID, Y and KeyIdx to the - // appropriate position in buffer. The function returns 0 on success, - // -1 otherwise. - int WriteTIDAndKeyIdxFields(uint8_t* x_field, - uint8_t* buffer, - size_t buffer_length, - size_t* extension_length) const; - - // Write the PictureID from codec_specific_info_ to buffer. One or two - // bytes are written, depending on magnitude of PictureID. The function - // returns the number of bytes written. - int WritePictureID(uint8_t* buffer, size_t buffer_length) const; - - // Calculate and return length (octets) of the variable header fields in - // the next header (i.e., header length in addition to vp8_header_bytes_). - size_t PayloadDescriptorExtraLength() const; - - // Calculate and return length (octets) of PictureID field in the next - // header. Can be 0, 1, or 2. - size_t PictureIdLength() const; - - // Check whether each of the optional fields will be included in the header. - bool XFieldPresent() const; - bool TIDFieldPresent() const; - bool KeyIdxFieldPresent() const; - bool TL0PicIdxFieldPresent() const; - bool PictureIdPresent() const { return (PictureIdLength() > 0); } - - const uint8_t* payload_data_; - size_t payload_size_; - RTPFragmentationHeader part_info_; - const size_t vp8_fixed_payload_descriptor_bytes_; // Length of VP8 payload - // descriptors' fixed part. - const AggregationMode aggr_mode_; - const bool balance_; - const bool separate_first_; - const RTPVideoHeaderVP8 hdr_info_; - size_t num_partitions_; - const size_t max_payload_len_; - InfoQueue packets_; - bool packets_calculated_; - - RTC_DISALLOW_COPY_AND_ASSIGN(RtpPacketizerVp8); -}; - -// Depacketizer for VP8. -class RtpDepacketizerVp8 : public RtpDepacketizer { - public: - virtual ~RtpDepacketizerVp8() {} - - bool Parse(ParsedPayload* parsed_payload, - const uint8_t* payload_data, - size_t payload_data_length) override; -}; -} // namespace webrtc -#endif // WEBRTC_MODULES_RTP_RTCP_SOURCE_RTP_FORMAT_VP8_H_ diff --git a/WebRtc.NET/include/webrtc/modules/rtp_rtcp/source/rtp_format_vp9.h b/WebRtc.NET/include/webrtc/modules/rtp_rtcp/source/rtp_format_vp9.h deleted file mode 100644 index 2036ce49..00000000 --- a/WebRtc.NET/include/webrtc/modules/rtp_rtcp/source/rtp_format_vp9.h +++ /dev/null @@ -1,103 +0,0 @@ -/* - * Copyright (c) 2015 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -// -// This file contains the declaration of the VP9 packetizer class. -// A packetizer object is created for each encoded video frame. The -// constructor is called with the payload data and size. -// -// After creating the packetizer, the method NextPacket is called -// repeatedly to get all packets for the frame. The method returns -// false as long as there are more packets left to fetch. -// - -#ifndef WEBRTC_MODULES_RTP_RTCP_SOURCE_RTP_FORMAT_VP9_H_ -#define WEBRTC_MODULES_RTP_RTCP_SOURCE_RTP_FORMAT_VP9_H_ - -#include -#include - -#include "webrtc/base/constructormagic.h" -#include "webrtc/modules/include/module_common_types.h" -#include "webrtc/modules/rtp_rtcp/source/rtp_format.h" -#include "webrtc/typedefs.h" - -namespace webrtc { - -class RtpPacketizerVp9 : public RtpPacketizer { - public: - RtpPacketizerVp9(const RTPVideoHeaderVP9& hdr, size_t max_payload_length); - - virtual ~RtpPacketizerVp9(); - - ProtectionType GetProtectionType() override; - - StorageType GetStorageType(uint32_t retransmission_settings) override; - - std::string ToString() override; - - // The payload data must be one encoded VP9 frame. - void SetPayloadData(const uint8_t* payload, - size_t payload_size, - const RTPFragmentationHeader* fragmentation) override; - - // Gets the next payload with VP9 payload header. - // Write payload and set marker bit of the |packet|. - // The parameter |last_packet| is true for the last packet of the frame, false - // otherwise (i.e., call the function again to get the next packet). - // Returns true on success, false otherwise. - bool NextPacket(RtpPacketToSend* packet, bool* last_packet) override; - - typedef struct { - size_t payload_start_pos; - size_t size; - bool layer_begin; - bool layer_end; - } PacketInfo; - typedef std::queue PacketInfoQueue; - - private: - // Calculates all packet sizes and loads info to packet queue. - void GeneratePackets(); - - // Writes the payload descriptor header and copies payload to the |buffer|. - // |packet_info| determines which part of the payload to write. - // |bytes_to_send| contains the number of written bytes to the buffer. - // Returns true on success, false otherwise. - bool WriteHeaderAndPayload(const PacketInfo& packet_info, - RtpPacketToSend* packet) const; - - // Writes payload descriptor header to |buffer|. - // Returns true on success, false otherwise. - bool WriteHeader(const PacketInfo& packet_info, - uint8_t* buffer, - size_t* header_length) const; - - const RTPVideoHeaderVP9 hdr_; - const size_t max_payload_length_; // The max length in bytes of one packet. - const uint8_t* payload_; // The payload data to be packetized. - size_t payload_size_; // The size in bytes of the payload data. - PacketInfoQueue packets_; - - RTC_DISALLOW_COPY_AND_ASSIGN(RtpPacketizerVp9); -}; - - -class RtpDepacketizerVp9 : public RtpDepacketizer { - public: - virtual ~RtpDepacketizerVp9() {} - - bool Parse(ParsedPayload* parsed_payload, - const uint8_t* payload, - size_t payload_length) override; -}; - -} // namespace webrtc -#endif // WEBRTC_MODULES_RTP_RTCP_SOURCE_RTP_FORMAT_VP9_H_ diff --git a/WebRtc.NET/include/webrtc/modules/rtp_rtcp/source/rtp_header_extension.h b/WebRtc.NET/include/webrtc/modules/rtp_rtcp/source/rtp_header_extension.h deleted file mode 100644 index 777155b3..00000000 --- a/WebRtc.NET/include/webrtc/modules/rtp_rtcp/source/rtp_header_extension.h +++ /dev/null @@ -1,97 +0,0 @@ -/* - * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MODULES_RTP_RTCP_SOURCE_RTP_HEADER_EXTENSION_H_ -#define WEBRTC_MODULES_RTP_RTCP_SOURCE_RTP_HEADER_EXTENSION_H_ - -#include - -#include "webrtc/base/array_view.h" -#include "webrtc/base/basictypes.h" -#include "webrtc/base/checks.h" -#include "webrtc/config.h" -#include "webrtc/modules/rtp_rtcp/include/rtp_rtcp_defines.h" - -namespace webrtc { - -const uint16_t kRtpOneByteHeaderExtensionId = 0xBEDE; - -const size_t kRtpOneByteHeaderLength = 4; -const size_t kTransmissionTimeOffsetLength = 4; -const size_t kAudioLevelLength = 2; -const size_t kAbsoluteSendTimeLength = 4; -const size_t kVideoRotationLength = 2; -const size_t kTransportSequenceNumberLength = 3; -const size_t kPlayoutDelayLength = 4; - -// Playout delay in milliseconds. A playout delay limit (min or max) -// has 12 bits allocated. This allows a range of 0-4095 values which translates -// to a range of 0-40950 in milliseconds. -const int kPlayoutDelayGranularityMs = 10; -// Maximum playout delay value in milliseconds. -const int kPlayoutDelayMaxMs = 40950; - -class RtpHeaderExtensionMap { - public: - static constexpr RTPExtensionType kInvalidType = kRtpExtensionNone; - static constexpr uint8_t kInvalidId = 0; - - RtpHeaderExtensionMap(); - explicit RtpHeaderExtensionMap(rtc::ArrayView extensions); - - template - bool Register(uint8_t id) { - return Register(id, Extension::kId, Extension::kValueSizeBytes, - Extension::kUri); - } - bool RegisterByType(uint8_t id, RTPExtensionType type); - bool RegisterByUri(uint8_t id, const std::string& uri); - - bool IsRegistered(RTPExtensionType type) const { - return GetId(type) != kInvalidId; - } - // Return kInvalidType if not found. - RTPExtensionType GetType(uint8_t id) const { - RTC_DCHECK_GE(id, kMinId); - RTC_DCHECK_LE(id, kMaxId); - return types_[id]; - } - // Return kInvalidId if not found. - uint8_t GetId(RTPExtensionType type) const { - RTC_DCHECK_GT(type, kRtpExtensionNone); - RTC_DCHECK_LT(type, kRtpExtensionNumberOfExtensions); - return ids_[type]; - } - - size_t GetTotalLengthInBytes() const; - - // TODO(danilchap): Remove use of the functions below. - int32_t Register(RTPExtensionType type, uint8_t id) { - return RegisterByType(id, type) ? 0 : -1; - } - int32_t Deregister(RTPExtensionType type); - - private: - static constexpr uint8_t kMinId = 1; - static constexpr uint8_t kMaxId = 14; - bool Register(uint8_t id, - RTPExtensionType type, - size_t value_size, - const char* uri); - - size_t total_values_size_bytes_ = 0; - RTPExtensionType types_[kMaxId + 1]; - uint8_t ids_[kRtpExtensionNumberOfExtensions]; -}; - -} // namespace webrtc - -#endif // WEBRTC_MODULES_RTP_RTCP_SOURCE_RTP_HEADER_EXTENSION_H_ - diff --git a/WebRtc.NET/include/webrtc/modules/rtp_rtcp/source/rtp_header_extensions.h b/WebRtc.NET/include/webrtc/modules/rtp_rtcp/source/rtp_header_extensions.h deleted file mode 100644 index ea6f9dbc..00000000 --- a/WebRtc.NET/include/webrtc/modules/rtp_rtcp/source/rtp_header_extensions.h +++ /dev/null @@ -1,100 +0,0 @@ -/* - * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ -#ifndef WEBRTC_MODULES_RTP_RTCP_SOURCE_RTP_HEADER_EXTENSIONS_H_ -#define WEBRTC_MODULES_RTP_RTCP_SOURCE_RTP_HEADER_EXTENSIONS_H_ - -#include - -#include "webrtc/api/video/video_rotation.h" -#include "webrtc/modules/rtp_rtcp/include/rtp_rtcp_defines.h" - -namespace webrtc { - -class AbsoluteSendTime { - public: - static constexpr RTPExtensionType kId = kRtpExtensionAbsoluteSendTime; - static constexpr uint8_t kValueSizeBytes = 3; - static constexpr const char* kUri = - "http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time"; - - static bool Parse(const uint8_t* data, uint32_t* time_24bits); - static bool Write(uint8_t* data, int64_t time_ms); - - static constexpr uint32_t MsTo24Bits(int64_t time_ms) { - return static_cast(((time_ms << 18) + 500) / 1000) & 0x00FFFFFF; - } -}; - -class AudioLevel { - public: - static constexpr RTPExtensionType kId = kRtpExtensionAudioLevel; - static constexpr uint8_t kValueSizeBytes = 1; - static constexpr const char* kUri = - "urn:ietf:params:rtp-hdrext:ssrc-audio-level"; - - static bool Parse(const uint8_t* data, - bool* voice_activity, - uint8_t* audio_level); - static bool Write(uint8_t* data, bool voice_activity, uint8_t audio_level); -}; - -class TransmissionOffset { - public: - static constexpr RTPExtensionType kId = kRtpExtensionTransmissionTimeOffset; - static constexpr uint8_t kValueSizeBytes = 3; - static constexpr const char* kUri = "urn:ietf:params:rtp-hdrext:toffset"; - - static bool Parse(const uint8_t* data, int32_t* rtp_time); - static bool Write(uint8_t* data, int32_t rtp_time); -}; - -class TransportSequenceNumber { - public: - static constexpr RTPExtensionType kId = kRtpExtensionTransportSequenceNumber; - static constexpr uint8_t kValueSizeBytes = 2; - static constexpr const char* kUri = - "http://www.ietf.org/id/" - "draft-holmer-rmcat-transport-wide-cc-extensions-01"; - static bool Parse(const uint8_t* data, uint16_t* value); - static bool Write(uint8_t* data, uint16_t value); -}; - -class VideoOrientation { - public: - static constexpr RTPExtensionType kId = kRtpExtensionVideoRotation; - static constexpr uint8_t kValueSizeBytes = 1; - static constexpr const char* kUri = "urn:3gpp:video-orientation"; - - static bool Parse(const uint8_t* data, VideoRotation* value); - static bool Write(uint8_t* data, VideoRotation value); - static bool Parse(const uint8_t* data, uint8_t* value); - static bool Write(uint8_t* data, uint8_t value); -}; - -class PlayoutDelayLimits { - public: - static constexpr RTPExtensionType kId = kRtpExtensionPlayoutDelay; - static constexpr uint8_t kValueSizeBytes = 3; - static constexpr const char* kUri = - "http://www.webrtc.org/experiments/rtp-hdrext/playout-delay"; - - // Playout delay in milliseconds. A playout delay limit (min or max) - // has 12 bits allocated. This allows a range of 0-4095 values which - // translates to a range of 0-40950 in milliseconds. - static constexpr int kGranularityMs = 10; - // Maximum playout delay value in milliseconds. - static constexpr int kMaxMs = 0xfff * kGranularityMs; // 40950. - - static bool Parse(const uint8_t* data, PlayoutDelay* playout_delay); - static bool Write(uint8_t* data, const PlayoutDelay& playout_delay); -}; - -} // namespace webrtc -#endif // WEBRTC_MODULES_RTP_RTCP_SOURCE_RTP_HEADER_EXTENSIONS_H_ diff --git a/WebRtc.NET/include/webrtc/modules/rtp_rtcp/source/rtp_packet.h b/WebRtc.NET/include/webrtc/modules/rtp_rtcp/source/rtp_packet.h deleted file mode 100644 index 3c02125e..00000000 --- a/WebRtc.NET/include/webrtc/modules/rtp_rtcp/source/rtp_packet.h +++ /dev/null @@ -1,195 +0,0 @@ -/* - * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ -#ifndef WEBRTC_MODULES_RTP_RTCP_SOURCE_RTP_PACKET_H_ -#define WEBRTC_MODULES_RTP_RTCP_SOURCE_RTP_PACKET_H_ - -#include - -#include "webrtc/base/array_view.h" -#include "webrtc/base/basictypes.h" -#include "webrtc/base/copyonwritebuffer.h" -#include "webrtc/modules/rtp_rtcp/include/rtp_rtcp_defines.h" - -namespace webrtc { -struct RTPHeader; -class RtpHeaderExtensionMap; -class Random; - -namespace rtp { -class Packet { - public: - using ExtensionType = RTPExtensionType; - using ExtensionManager = RtpHeaderExtensionMap; - static constexpr size_t kMaxExtensionHeaders = 14; - - // Parse and copy given buffer into Packet. - bool Parse(const uint8_t* buffer, size_t size); - bool Parse(rtc::ArrayView packet); - - // Parse and move given buffer into Packet. - bool Parse(rtc::CopyOnWriteBuffer packet); - - // Maps extensions id to their types. - void IdentifyExtensions(const ExtensionManager& extensions); - - // Header. - bool Marker() const; - uint8_t PayloadType() const; - uint16_t SequenceNumber() const; - uint32_t Timestamp() const; - uint32_t Ssrc() const; - std::vector Csrcs() const; - - // TODO(danilchap): Remove this function when all code update to use RtpPacket - // directly. Function is there just for easier backward compatibilty. - void GetHeader(RTPHeader* header) const; - - size_t headers_size() const; - - // Payload. - size_t payload_size() const; - size_t padding_size() const; - rtc::ArrayView payload() const; - - // Buffer. - rtc::CopyOnWriteBuffer Buffer() const; - size_t capacity() const; - size_t size() const; - const uint8_t* data() const; - size_t FreeCapacity() const; - size_t MaxPayloadSize() const; - - // Reset fields and buffer. - void Clear(); - - // Header setters. - void CopyHeaderFrom(const Packet& packet); - void SetMarker(bool marker_bit); - void SetPayloadType(uint8_t payload_type); - void SetSequenceNumber(uint16_t seq_no); - void SetTimestamp(uint32_t timestamp); - void SetSsrc(uint32_t ssrc); - - // Writes csrc list. Assumes: - // a) There is enough room left in buffer. - // b) Extension headers, payload or padding data has not already been added. - void SetCsrcs(const std::vector& csrcs); - - // Header extensions. - template - bool HasExtension() const; - - template - bool GetExtension(Values...) const; - - template - bool SetExtension(Values...); - - template - bool ReserveExtension(); - - // Reserve size_bytes for payload. Returns nullptr on failure. - uint8_t* AllocatePayload(size_t size_bytes); - void SetPayloadSize(size_t size_bytes); - bool SetPadding(uint8_t size_bytes, Random* random); - - protected: - // |extensions| required for SetExtension/ReserveExtension functions during - // packet creating and used if available in Parse function. - // Adding and getting extensions will fail until |extensions| is - // provided via constructor or IdentifyExtensions function. - Packet(); - explicit Packet(const ExtensionManager* extensions); - Packet(const Packet&) = default; - Packet(const ExtensionManager* extensions, size_t capacity); - virtual ~Packet(); - - Packet& operator=(const Packet&) = default; - - private: - struct ExtensionInfo { - ExtensionType type; - uint16_t offset; - uint8_t length; - }; - - // Helper function for Parse. Fill header fields using data in given buffer, - // but does not touch packet own buffer, leaving packet in invalid state. - bool ParseBuffer(const uint8_t* buffer, size_t size); - - // Find an extension based on the type field of the parameter. - // If found, length field would be validated, the offset field will be set - // and true returned, - // otherwise the parameter will be unchanged and false is returned. - bool FindExtension(ExtensionType type, - uint8_t length, - uint16_t* offset) const; - - // Find or allocate an extension, based on the type field of the parameter. - // If found, the length field be checked against what is already registered - // and the offset field will be set, then true is returned. If allocated, the - // length field will be used for allocation and the offset update to indicate - // position, the true is returned. - // If not found and allocations fails, false is returned and parameter remains - // unchanged. - bool AllocateExtension(ExtensionType type, uint8_t length, uint16_t* offset); - - uint8_t* WriteAt(size_t offset); - void WriteAt(size_t offset, uint8_t byte); - - // Header. - bool marker_; - uint8_t payload_type_; - uint8_t padding_size_; - uint16_t sequence_number_; - uint32_t timestamp_; - uint32_t ssrc_; - size_t payload_offset_; // Match header size with csrcs and extensions. - size_t payload_size_; - - ExtensionInfo extension_entries_[kMaxExtensionHeaders]; - uint16_t extensions_size_ = 0; // Unaligned. - rtc::CopyOnWriteBuffer buffer_; -}; - -template -bool Packet::HasExtension() const { - uint16_t offset = 0; - return FindExtension(Extension::kId, Extension::kValueSizeBytes, &offset); -} - -template -bool Packet::GetExtension(Values... values) const { - uint16_t offset = 0; - if (!FindExtension(Extension::kId, Extension::kValueSizeBytes, &offset)) - return false; - return Extension::Parse(data() + offset, values...); -} - -template -bool Packet::SetExtension(Values... values) { - uint16_t offset = 0; - if (!AllocateExtension(Extension::kId, Extension::kValueSizeBytes, &offset)) - return false; - return Extension::Write(WriteAt(offset), values...); -} - -template -bool Packet::ReserveExtension() { - uint16_t offset = 0; - if (!AllocateExtension(Extension::kId, Extension::kValueSizeBytes, &offset)) - return false; - memset(WriteAt(offset), 0, Extension::kValueSizeBytes); - return true; -} -} // namespace rtp -} // namespace webrtc - -#endif // WEBRTC_MODULES_RTP_RTCP_SOURCE_RTP_PACKET_H_ diff --git a/WebRtc.NET/include/webrtc/modules/rtp_rtcp/source/rtp_packet_history.h b/WebRtc.NET/include/webrtc/modules/rtp_rtcp/source/rtp_packet_history.h deleted file mode 100644 index dc2b35a3..00000000 --- a/WebRtc.NET/include/webrtc/modules/rtp_rtcp/source/rtp_packet_history.h +++ /dev/null @@ -1,85 +0,0 @@ -/* - * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MODULES_RTP_RTCP_SOURCE_RTP_PACKET_HISTORY_H_ -#define WEBRTC_MODULES_RTP_RTCP_SOURCE_RTP_PACKET_HISTORY_H_ - -#include -#include - -#include "webrtc/base/constructormagic.h" -#include "webrtc/base/criticalsection.h" -#include "webrtc/base/thread_annotations.h" -#include "webrtc/modules/rtp_rtcp/include/rtp_rtcp_defines.h" -#include "webrtc/typedefs.h" - -namespace webrtc { - -class Clock; -class RtpPacketToSend; - -class RtpPacketHistory { - public: - static constexpr size_t kMaxCapacity = 9600; - explicit RtpPacketHistory(Clock* clock); - ~RtpPacketHistory(); - - void SetStorePacketsStatus(bool enable, uint16_t number_to_store); - bool StorePackets() const; - - void PutRtpPacket(std::unique_ptr packet, - StorageType type, - bool sent); - - // Gets stored RTP packet corresponding to the input |sequence number|. - // Returns nullptr if packet is not found. - // |min_elapsed_time_ms| is the minimum time that must have elapsed since - // the last time the packet was resent (parameter is ignored if set to zero). - // If the packet is found but the minimum time has not elapsed, returns - // nullptr. - std::unique_ptr GetPacketAndSetSendTime( - uint16_t sequence_number, - int64_t min_elapsed_time_ms, - bool retransmit); - - std::unique_ptr GetBestFittingPacket( - size_t packet_size) const; - - bool HasRtpPacket(uint16_t sequence_number) const; - - private: - struct StoredPacket { - uint16_t sequence_number = 0; - int64_t send_time = 0; - StorageType storage_type = kDontRetransmit; - bool has_been_retransmitted = false; - - std::unique_ptr packet; - }; - - std::unique_ptr GetPacket(int index) const - EXCLUSIVE_LOCKS_REQUIRED(critsect_); - void Allocate(size_t number_to_store) EXCLUSIVE_LOCKS_REQUIRED(critsect_); - void Free() EXCLUSIVE_LOCKS_REQUIRED(critsect_); - bool FindSeqNum(uint16_t sequence_number, int* index) const - EXCLUSIVE_LOCKS_REQUIRED(critsect_); - int FindBestFittingPacket(size_t size) const - EXCLUSIVE_LOCKS_REQUIRED(critsect_); - - Clock* clock_; - rtc::CriticalSection critsect_; - bool store_ GUARDED_BY(critsect_); - uint32_t prev_index_ GUARDED_BY(critsect_); - std::vector stored_packets_ GUARDED_BY(critsect_); - - RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(RtpPacketHistory); -}; -} // namespace webrtc -#endif // WEBRTC_MODULES_RTP_RTCP_SOURCE_RTP_PACKET_HISTORY_H_ diff --git a/WebRtc.NET/include/webrtc/modules/rtp_rtcp/source/rtp_packet_received.h b/WebRtc.NET/include/webrtc/modules/rtp_rtcp/source/rtp_packet_received.h deleted file mode 100644 index 95674cf8..00000000 --- a/WebRtc.NET/include/webrtc/modules/rtp_rtcp/source/rtp_packet_received.h +++ /dev/null @@ -1,56 +0,0 @@ -/* - * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ -#ifndef WEBRTC_MODULES_RTP_RTCP_SOURCE_RTP_PACKET_RECEIVED_H_ -#define WEBRTC_MODULES_RTP_RTCP_SOURCE_RTP_PACKET_RECEIVED_H_ - -#include "webrtc/common_types.h" -#include "webrtc/modules/rtp_rtcp/source/rtp_packet.h" -#include "webrtc/system_wrappers/include/ntp_time.h" - -namespace webrtc { -// Class to hold rtp packet with metadata for receiver side. -class RtpPacketReceived : public rtp::Packet { - public: - RtpPacketReceived() = default; - explicit RtpPacketReceived(const ExtensionManager* extensions) - : Packet(extensions) {} - - void GetHeader(RTPHeader* header) const { - Packet::GetHeader(header); - header->payload_type_frequency = payload_type_frequency(); - } - - // Time in local time base as close as it can to packet arrived on the - // network. - int64_t arrival_time_ms() const { return arrival_time_ms_; } - void set_arrival_time_ms(int64_t time) { arrival_time_ms_ = time; } - - // Estimated from Timestamp() using rtcp Sender Reports. - NtpTime capture_ntp_time() const { return capture_time_; } - void set_capture_ntp_time(NtpTime time) { capture_time_ = time; } - - // Flag if packet arrived via rtx. - bool retransmit() const { return retransmit_; } - void set_retransmit(bool value) { retransmit_ = value; } - - int payload_type_frequency() const { return payload_type_frequency_; } - void set_payload_type_frequency(int value) { - payload_type_frequency_ = value; - } - - private: - NtpTime capture_time_; - int64_t arrival_time_ms_ = 0; - int payload_type_frequency_ = 0; - bool retransmit_ = false; -}; - -} // namespace webrtc -#endif // WEBRTC_MODULES_RTP_RTCP_SOURCE_RTP_PACKET_RECEIVED_H_ diff --git a/WebRtc.NET/include/webrtc/modules/rtp_rtcp/source/rtp_packet_to_send.h b/WebRtc.NET/include/webrtc/modules/rtp_rtcp/source/rtp_packet_to_send.h deleted file mode 100644 index f2ddc8a5..00000000 --- a/WebRtc.NET/include/webrtc/modules/rtp_rtcp/source/rtp_packet_to_send.h +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ -#ifndef WEBRTC_MODULES_RTP_RTCP_SOURCE_RTP_PACKET_TO_SEND_H_ -#define WEBRTC_MODULES_RTP_RTCP_SOURCE_RTP_PACKET_TO_SEND_H_ - -#include "webrtc/modules/rtp_rtcp/source/rtp_packet.h" - -namespace webrtc { -// Class to hold rtp packet with metadata for sender side. -class RtpPacketToSend : public rtp::Packet { - public: - explicit RtpPacketToSend(const ExtensionManager* extensions) - : Packet(extensions) {} - RtpPacketToSend(const RtpPacketToSend& packet) = default; - RtpPacketToSend(const ExtensionManager* extensions, size_t capacity) - : Packet(extensions, capacity) {} - - RtpPacketToSend& operator=(const RtpPacketToSend& packet) = default; - // Time in local time base as close as it can to frame capture time. - int64_t capture_time_ms() const { return capture_time_ms_; } - void set_capture_time_ms(int64_t time) { capture_time_ms_ = time; } - - private: - int64_t capture_time_ms_ = 0; -}; - -} // namespace webrtc -#endif // WEBRTC_MODULES_RTP_RTCP_SOURCE_RTP_PACKET_TO_SEND_H_ diff --git a/WebRtc.NET/include/webrtc/modules/rtp_rtcp/source/rtp_receiver_audio.h b/WebRtc.NET/include/webrtc/modules/rtp_rtcp/source/rtp_receiver_audio.h deleted file mode 100644 index 5fbf738b..00000000 --- a/WebRtc.NET/include/webrtc/modules/rtp_rtcp/source/rtp_receiver_audio.h +++ /dev/null @@ -1,98 +0,0 @@ -/* - * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MODULES_RTP_RTCP_SOURCE_RTP_RECEIVER_AUDIO_H_ -#define WEBRTC_MODULES_RTP_RTCP_SOURCE_RTP_RECEIVER_AUDIO_H_ - -#include - -#include "webrtc/base/onetimeevent.h" -#include "webrtc/modules/rtp_rtcp/include/rtp_receiver.h" -#include "webrtc/modules/rtp_rtcp/include/rtp_rtcp_defines.h" -#include "webrtc/modules/rtp_rtcp/source/rtp_receiver_strategy.h" -#include "webrtc/modules/rtp_rtcp/source/rtp_utility.h" -#include "webrtc/typedefs.h" - -namespace webrtc { - -// Handles audio RTP packets. This class is thread-safe. -class RTPReceiverAudio : public RTPReceiverStrategy, - public TelephoneEventHandler { - public: - explicit RTPReceiverAudio(RtpData* data_callback); - virtual ~RTPReceiverAudio() {} - - // The following three methods implement the TelephoneEventHandler interface. - // Forward DTMFs to decoder for playout. - void SetTelephoneEventForwardToDecoder(bool forward_to_decoder) override; - - // Is forwarding of outband telephone events turned on/off? - bool TelephoneEventForwardToDecoder() const override; - - // Is TelephoneEvent configured with |payload_type|. - bool TelephoneEventPayloadType(const int8_t payload_type) const override; - - TelephoneEventHandler* GetTelephoneEventHandler() override { return this; } - - // Returns true if CNG is configured with |payload_type|. - bool CNGPayloadType(const int8_t payload_type); - - int32_t ParseRtpPacket(WebRtcRTPHeader* rtp_header, - const PayloadUnion& specific_payload, - bool is_red, - const uint8_t* packet, - size_t payload_length, - int64_t timestamp_ms, - bool is_first_packet) override; - - RTPAliveType ProcessDeadOrAlive(uint16_t last_payload_length) const override; - - bool ShouldReportCsrcChanges(uint8_t payload_type) const override; - - int32_t OnNewPayloadTypeCreated(const CodecInst& audio_codec) override; - - int32_t InvokeOnInitializeDecoder( - RtpFeedback* callback, - int8_t payload_type, - const char payload_name[RTP_PAYLOAD_NAME_SIZE], - const PayloadUnion& specific_payload) const override; - - // We need to look out for special payload types here and sometimes reset - // statistics. In addition we sometimes need to tweak the frequency. - void CheckPayloadChanged(int8_t payload_type, - PayloadUnion* specific_payload, - bool* should_discard_changes) override; - - int Energy(uint8_t array_of_energy[kRtpCsrcSize]) const override; - - private: - int32_t ParseAudioCodecSpecific(WebRtcRTPHeader* rtp_header, - const uint8_t* payload_data, - size_t payload_length, - const AudioPayload& audio_specific, - bool is_red); - - bool telephone_event_forward_to_decoder_; - int8_t telephone_event_payload_type_; - std::set telephone_event_reported_; - - int8_t cng_nb_payload_type_; - int8_t cng_wb_payload_type_; - int8_t cng_swb_payload_type_; - int8_t cng_fb_payload_type_; - - uint8_t num_energy_; - uint8_t current_remote_energy_[kRtpCsrcSize]; - - ThreadUnsafeOneTimeEvent first_packet_received_; -}; -} // namespace webrtc - -#endif // WEBRTC_MODULES_RTP_RTCP_SOURCE_RTP_RECEIVER_AUDIO_H_ diff --git a/WebRtc.NET/include/webrtc/modules/rtp_rtcp/source/rtp_receiver_impl.h b/WebRtc.NET/include/webrtc/modules/rtp_rtcp/source/rtp_receiver_impl.h deleted file mode 100644 index 4b552487..00000000 --- a/WebRtc.NET/include/webrtc/modules/rtp_rtcp/source/rtp_receiver_impl.h +++ /dev/null @@ -1,89 +0,0 @@ -/* - * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MODULES_RTP_RTCP_SOURCE_RTP_RECEIVER_IMPL_H_ -#define WEBRTC_MODULES_RTP_RTCP_SOURCE_RTP_RECEIVER_IMPL_H_ - -#include - -#include "webrtc/base/criticalsection.h" -#include "webrtc/modules/rtp_rtcp/include/rtp_receiver.h" -#include "webrtc/modules/rtp_rtcp/include/rtp_rtcp_defines.h" -#include "webrtc/modules/rtp_rtcp/source/rtp_receiver_strategy.h" -#include "webrtc/typedefs.h" - -namespace webrtc { - -class RtpReceiverImpl : public RtpReceiver { - public: - // Callbacks passed in here may not be NULL (use Null Object callbacks if you - // want callbacks to do nothing). This class takes ownership of the media - // receiver but nothing else. - RtpReceiverImpl(Clock* clock, - RtpFeedback* incoming_messages_callback, - RTPPayloadRegistry* rtp_payload_registry, - RTPReceiverStrategy* rtp_media_receiver); - - virtual ~RtpReceiverImpl(); - - int32_t RegisterReceivePayload(const CodecInst& audio_codec) override; - int32_t RegisterReceivePayload(const VideoCodec& video_codec) override; - - int32_t DeRegisterReceivePayload(const int8_t payload_type) override; - - bool IncomingRtpPacket(const RTPHeader& rtp_header, - const uint8_t* payload, - size_t payload_length, - PayloadUnion payload_specific, - bool in_order) override; - - // Returns the last received timestamp. - bool Timestamp(uint32_t* timestamp) const override; - bool LastReceivedTimeMs(int64_t* receive_time_ms) const override; - - uint32_t SSRC() const override; - - int32_t CSRCs(uint32_t array_of_csrc[kRtpCsrcSize]) const override; - - int32_t Energy(uint8_t array_of_energy[kRtpCsrcSize]) const override; - - TelephoneEventHandler* GetTelephoneEventHandler() override; - - private: - bool HaveReceivedFrame() const; - - void CheckSSRCChanged(const RTPHeader& rtp_header); - void CheckCSRC(const WebRtcRTPHeader& rtp_header); - int32_t CheckPayloadChanged(const RTPHeader& rtp_header, - const int8_t first_payload_byte, - bool* is_red, - PayloadUnion* payload); - - Clock* clock_; - RTPPayloadRegistry* rtp_payload_registry_; - std::unique_ptr rtp_media_receiver_; - - RtpFeedback* cb_rtp_feedback_; - - rtc::CriticalSection critical_section_rtp_receiver_; - int64_t last_receive_time_; - size_t last_received_payload_length_; - - // SSRCs. - uint32_t ssrc_; - uint8_t num_csrcs_; - uint32_t current_remote_csrc_[kRtpCsrcSize]; - - uint32_t last_received_timestamp_; - int64_t last_received_frame_time_ms_; - uint16_t last_received_sequence_number_; -}; -} // namespace webrtc -#endif // WEBRTC_MODULES_RTP_RTCP_SOURCE_RTP_RECEIVER_IMPL_H_ diff --git a/WebRtc.NET/include/webrtc/modules/rtp_rtcp/source/rtp_receiver_strategy.h b/WebRtc.NET/include/webrtc/modules/rtp_rtcp/source/rtp_receiver_strategy.h deleted file mode 100644 index 490b4c59..00000000 --- a/WebRtc.NET/include/webrtc/modules/rtp_rtcp/source/rtp_receiver_strategy.h +++ /dev/null @@ -1,99 +0,0 @@ -/* - * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MODULES_RTP_RTCP_SOURCE_RTP_RECEIVER_STRATEGY_H_ -#define WEBRTC_MODULES_RTP_RTCP_SOURCE_RTP_RECEIVER_STRATEGY_H_ - -#include "webrtc/base/criticalsection.h" -#include "webrtc/modules/rtp_rtcp/include/rtp_rtcp.h" -#include "webrtc/modules/rtp_rtcp/include/rtp_rtcp_defines.h" -#include "webrtc/modules/rtp_rtcp/source/rtp_utility.h" -#include "webrtc/typedefs.h" - -namespace webrtc { - -struct CodecInst; - -class TelephoneEventHandler; - -// This strategy deals with media-specific RTP packet processing. -// This class is not thread-safe and must be protected by its caller. -class RTPReceiverStrategy { - public: - static RTPReceiverStrategy* CreateVideoStrategy(RtpData* data_callback); - static RTPReceiverStrategy* CreateAudioStrategy(RtpData* data_callback); - - virtual ~RTPReceiverStrategy() {} - - // Parses the RTP packet and calls the data callback with the payload data. - // Implementations are encouraged to use the provided packet buffer and RTP - // header as arguments to the callback; implementations are also allowed to - // make changes in the data as necessary. The specific_payload argument - // provides audio or video-specific data. The is_first_packet argument is true - // if this packet is either the first packet ever or the first in its frame. - virtual int32_t ParseRtpPacket(WebRtcRTPHeader* rtp_header, - const PayloadUnion& specific_payload, - bool is_red, - const uint8_t* payload, - size_t payload_length, - int64_t timestamp_ms, - bool is_first_packet) = 0; - - virtual TelephoneEventHandler* GetTelephoneEventHandler() = 0; - - // Computes the current dead-or-alive state. - virtual RTPAliveType ProcessDeadOrAlive( - uint16_t last_payload_length) const = 0; - - // Returns true if we should report CSRC changes for this payload type. - // TODO(phoglund): should move out of here along with other payload stuff. - virtual bool ShouldReportCsrcChanges(uint8_t payload_type) const = 0; - - // Notifies the strategy that we have created a new non-RED audio payload type - // in the payload registry. - virtual int32_t OnNewPayloadTypeCreated(const CodecInst& audio_codec) = 0; - - // Invokes the OnInitializeDecoder callback in a media-specific way. - virtual int32_t InvokeOnInitializeDecoder( - RtpFeedback* callback, - int8_t payload_type, - const char payload_name[RTP_PAYLOAD_NAME_SIZE], - const PayloadUnion& specific_payload) const = 0; - - // Checks if the payload type has changed, and returns whether we should - // reset statistics and/or discard this packet. - virtual void CheckPayloadChanged(int8_t payload_type, - PayloadUnion* specific_payload, - bool* should_discard_changes); - - virtual int Energy(uint8_t array_of_energy[kRtpCsrcSize]) const; - - // Stores / retrieves the last media specific payload for later reference. - void GetLastMediaSpecificPayload(PayloadUnion* payload) const; - void SetLastMediaSpecificPayload(const PayloadUnion& payload); - - protected: - // The data callback is where we should send received payload data. - // See ParseRtpPacket. This class does not claim ownership of the callback. - // Implementations must NOT hold any critical sections while calling the - // callback. - // - // Note: Implementations may call the callback for other reasons than calls - // to ParseRtpPacket, for instance if the implementation somehow recovers a - // packet. - explicit RTPReceiverStrategy(RtpData* data_callback); - - rtc::CriticalSection crit_sect_; - PayloadUnion last_payload_; - RtpData* data_callback_; -}; -} // namespace webrtc - -#endif // WEBRTC_MODULES_RTP_RTCP_SOURCE_RTP_RECEIVER_STRATEGY_H_ diff --git a/WebRtc.NET/include/webrtc/modules/rtp_rtcp/source/rtp_receiver_video.h b/WebRtc.NET/include/webrtc/modules/rtp_rtcp/source/rtp_receiver_video.h deleted file mode 100644 index c27fe45c..00000000 --- a/WebRtc.NET/include/webrtc/modules/rtp_rtcp/source/rtp_receiver_video.h +++ /dev/null @@ -1,57 +0,0 @@ -/* - * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MODULES_RTP_RTCP_SOURCE_RTP_RECEIVER_VIDEO_H_ -#define WEBRTC_MODULES_RTP_RTCP_SOURCE_RTP_RECEIVER_VIDEO_H_ - -#include "webrtc/base/onetimeevent.h" -#include "webrtc/modules/rtp_rtcp/include/rtp_rtcp_defines.h" -#include "webrtc/modules/rtp_rtcp/source/rtp_receiver_strategy.h" -#include "webrtc/modules/rtp_rtcp/source/rtp_utility.h" -#include "webrtc/typedefs.h" - -namespace webrtc { - -class RTPReceiverVideo : public RTPReceiverStrategy { - public: - explicit RTPReceiverVideo(RtpData* data_callback); - - virtual ~RTPReceiverVideo(); - - int32_t ParseRtpPacket(WebRtcRTPHeader* rtp_header, - const PayloadUnion& specific_payload, - bool is_red, - const uint8_t* packet, - size_t packet_length, - int64_t timestamp, - bool is_first_packet) override; - - TelephoneEventHandler* GetTelephoneEventHandler() override { return NULL; } - - RTPAliveType ProcessDeadOrAlive(uint16_t last_payload_length) const override; - - bool ShouldReportCsrcChanges(uint8_t payload_type) const override; - - int32_t OnNewPayloadTypeCreated(const CodecInst& audio_codec) override; - - int32_t InvokeOnInitializeDecoder( - RtpFeedback* callback, - int8_t payload_type, - const char payload_name[RTP_PAYLOAD_NAME_SIZE], - const PayloadUnion& specific_payload) const override; - - void SetPacketOverHead(uint16_t packet_over_head); - - private: - OneTimeEvent first_packet_received_; -}; -} // namespace webrtc - -#endif // WEBRTC_MODULES_RTP_RTCP_SOURCE_RTP_RECEIVER_VIDEO_H_ diff --git a/WebRtc.NET/include/webrtc/modules/rtp_rtcp/source/rtp_sender.h b/WebRtc.NET/include/webrtc/modules/rtp_rtcp/source/rtp_sender.h deleted file mode 100644 index b70b6885..00000000 --- a/WebRtc.NET/include/webrtc/modules/rtp_rtcp/source/rtp_sender.h +++ /dev/null @@ -1,335 +0,0 @@ -/* - * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MODULES_RTP_RTCP_SOURCE_RTP_SENDER_H_ -#define WEBRTC_MODULES_RTP_RTCP_SOURCE_RTP_SENDER_H_ - -#include -#include -#include -#include - -#include "webrtc/api/call/transport.h" -#include "webrtc/base/constructormagic.h" -#include "webrtc/base/criticalsection.h" -#include "webrtc/base/deprecation.h" -#include "webrtc/base/optional.h" -#include "webrtc/base/random.h" -#include "webrtc/base/rate_statistics.h" -#include "webrtc/base/thread_annotations.h" -#include "webrtc/common_types.h" -#include "webrtc/modules/rtp_rtcp/include/flexfec_sender.h" -#include "webrtc/modules/rtp_rtcp/include/rtp_rtcp_defines.h" -#include "webrtc/modules/rtp_rtcp/source/playout_delay_oracle.h" -#include "webrtc/modules/rtp_rtcp/source/rtp_header_extension.h" -#include "webrtc/modules/rtp_rtcp/source/rtp_packet_history.h" -#include "webrtc/modules/rtp_rtcp/source/rtp_rtcp_config.h" -#include "webrtc/modules/rtp_rtcp/source/rtp_utility.h" -#include "webrtc/modules/rtp_rtcp/source/ssrc_database.h" - -namespace webrtc { - -class OverheadObserver; -class RateLimiter; -class RtcEventLog; -class RtpPacketToSend; -class RTPSenderAudio; -class RTPSenderVideo; - -class RTPSender { - public: - RTPSender(bool audio, - Clock* clock, - Transport* transport, - RtpPacketSender* paced_sender, - // TODO(brandtr): Remove |flexfec_sender| when that is hooked up - // to PacedSender instead. - FlexfecSender* flexfec_sender, - TransportSequenceNumberAllocator* sequence_number_allocator, - TransportFeedbackObserver* transport_feedback_callback, - BitrateStatisticsObserver* bitrate_callback, - FrameCountObserver* frame_count_observer, - SendSideDelayObserver* send_side_delay_observer, - RtcEventLog* event_log, - SendPacketObserver* send_packet_observer, - RateLimiter* nack_rate_limiter, - OverheadObserver* overhead_observer); - - ~RTPSender(); - - void ProcessBitrate(); - - uint16_t ActualSendBitrateKbit() const; - - uint32_t VideoBitrateSent() const; - uint32_t FecOverheadRate() const; - uint32_t NackOverheadRate() const; - - // Excluding size of RTP and FEC headers. - size_t MaxPayloadSize() const; - - int32_t RegisterPayload(const char* payload_name, - const int8_t payload_type, - const uint32_t frequency, - const size_t channels, - const uint32_t rate); - - int32_t DeRegisterSendPayload(const int8_t payload_type); - - void SetSendPayloadType(int8_t payload_type); - - int8_t SendPayloadType() const; - - void SetSendingStatus(bool enabled); - - void SetSendingMediaStatus(bool enabled); - bool SendingMedia() const; - - void GetDataCounters(StreamDataCounters* rtp_stats, - StreamDataCounters* rtx_stats) const; - - uint32_t TimestampOffset() const; - void SetTimestampOffset(uint32_t timestamp); - - uint32_t GenerateNewSSRC(); - void SetSSRC(uint32_t ssrc); - - uint16_t SequenceNumber() const; - void SetSequenceNumber(uint16_t seq); - - void SetCsrcs(const std::vector& csrcs); - - void SetMaxRtpPacketSize(size_t max_packet_size); - - bool SendOutgoingData(FrameType frame_type, - int8_t payload_type, - uint32_t timestamp, - int64_t capture_time_ms, - const uint8_t* payload_data, - size_t payload_size, - const RTPFragmentationHeader* fragmentation, - const RTPVideoHeader* rtp_header, - uint32_t* transport_frame_id_out); - - // RTP header extension - int32_t RegisterRtpHeaderExtension(RTPExtensionType type, uint8_t id); - bool IsRtpHeaderExtensionRegistered(RTPExtensionType type); - int32_t DeregisterRtpHeaderExtension(RTPExtensionType type); - - bool TimeToSendPacket(uint32_t ssrc, - uint16_t sequence_number, - int64_t capture_time_ms, - bool retransmission, - int probe_cluster_id); - size_t TimeToSendPadding(size_t bytes, int probe_cluster_id); - - // NACK. - int SelectiveRetransmissions() const; - int SetSelectiveRetransmissions(uint8_t settings); - void OnReceivedNack(const std::vector& nack_sequence_numbers, - int64_t avg_rtt); - - void SetStorePacketsStatus(bool enable, uint16_t number_to_store); - - bool StorePackets() const; - - int32_t ReSendPacket(uint16_t packet_id, int64_t min_resend_time = 0); - - // Feedback to decide when to stop sending playout delay. - void OnReceivedRtcpReportBlocks(const ReportBlockList& report_blocks); - - // RTX. - void SetRtxStatus(int mode); - int RtxStatus() const; - - uint32_t RtxSsrc() const; - void SetRtxSsrc(uint32_t ssrc); - - void SetRtxPayloadType(int payload_type, int associated_payload_type); - - // Create empty packet, fills ssrc, csrcs and reserve place for header - // extensions RtpSender updates before sending. - std::unique_ptr AllocatePacket() const; - // Allocate sequence number for provided packet. - // Save packet's fields to generate padding that doesn't break media stream. - // Return false if sending was turned off. - bool AssignSequenceNumber(RtpPacketToSend* packet); - - size_t RtpHeaderLength() const; - uint16_t AllocateSequenceNumber(uint16_t packets_to_send); - // Including RTP headers. - size_t MaxRtpPacketSize() const; - - uint32_t SSRC() const; - - rtc::Optional FlexfecSsrc() const; - - bool SendToNetwork(std::unique_ptr packet, - StorageType storage, - RtpPacketSender::Priority priority); - - // Audio. - - // Send a DTMF tone using RFC 2833 (4733). - int32_t SendTelephoneEvent(uint8_t key, uint16_t time_ms, uint8_t level); - - // This function is deprecated. It was previously used to determine when it - // was time to send a DTMF packet in silence (CNG). - RTC_DEPRECATED int32_t SetAudioPacketSize(uint16_t packet_size_samples); - - // Store the audio level in d_bov for - // header-extension-for-audio-level-indication. - int32_t SetAudioLevel(uint8_t level_d_bov); - - RtpVideoCodecTypes VideoCodecType() const; - - uint32_t MaxConfiguredBitrateVideo() const; - - // ULPFEC. - void SetUlpfecConfig(int red_payload_type, int ulpfec_payload_type); - - bool SetFecParameters(const FecProtectionParams& delta_params, - const FecProtectionParams& key_params); - - // Called on update of RTP statistics. - void RegisterRtpStatisticsCallback(StreamDataCountersCallback* callback); - StreamDataCountersCallback* GetRtpStatisticsCallback() const; - - uint32_t BitrateSent() const; - - void SetRtpState(const RtpState& rtp_state); - RtpState GetRtpState() const; - void SetRtxRtpState(const RtpState& rtp_state); - RtpState GetRtxRtpState() const; - - protected: - int32_t CheckPayloadType(int8_t payload_type, RtpVideoCodecTypes* video_type); - - private: - // Maps capture time in milliseconds to send-side delay in milliseconds. - // Send-side delay is the difference between transmission time and capture - // time. - typedef std::map SendDelayMap; - - size_t SendPadData(size_t bytes, int probe_cluster_id); - - bool PrepareAndSendPacket(std::unique_ptr packet, - bool send_over_rtx, - bool is_retransmit, - int probe_cluster_id); - - // Return the number of bytes sent. Note that both of these functions may - // return a larger value that their argument. - size_t TrySendRedundantPayloads(size_t bytes, int probe_cluster_id); - - std::unique_ptr BuildRtxPacket( - const RtpPacketToSend& packet); - - bool SendPacketToNetwork(const RtpPacketToSend& packet, - const PacketOptions& options); - - void UpdateDelayStatistics(int64_t capture_time_ms, int64_t now_ms); - void UpdateOnSendPacket(int packet_id, - int64_t capture_time_ms, - uint32_t ssrc); - - bool UpdateTransportSequenceNumber(RtpPacketToSend* packet, - int* packet_id) const; - - void UpdateRtpStats(const RtpPacketToSend& packet, - bool is_rtx, - bool is_retransmit); - bool IsFecPacket(const RtpPacketToSend& packet) const; - - void AddPacketToTransportFeedback(uint16_t packet_id, - const RtpPacketToSend& packet, - int probe_cluster_id); - - void UpdateRtpOverhead(const RtpPacketToSend& packet); - - Clock* const clock_; - const int64_t clock_delta_ms_; - Random random_ GUARDED_BY(send_critsect_); - - const bool audio_configured_; - const std::unique_ptr audio_; - const std::unique_ptr video_; - - RtpPacketSender* const paced_sender_; - TransportSequenceNumberAllocator* const transport_sequence_number_allocator_; - TransportFeedbackObserver* const transport_feedback_observer_; - int64_t last_capture_time_ms_sent_; - rtc::CriticalSection send_critsect_; - - Transport* transport_; - bool sending_media_ GUARDED_BY(send_critsect_); - - size_t max_packet_size_; - - int8_t payload_type_ GUARDED_BY(send_critsect_); - std::map payload_type_map_; - - RtpHeaderExtensionMap rtp_header_extension_map_ GUARDED_BY(send_critsect_); - - // Tracks the current request for playout delay limits from application - // and decides whether the current RTP frame should include the playout - // delay extension on header. - PlayoutDelayOracle playout_delay_oracle_; - - RtpPacketHistory packet_history_; - // TODO(brandtr): Remove |flexfec_packet_history_| when the FlexfecSender - // is hooked up to the PacedSender. - RtpPacketHistory flexfec_packet_history_; - - // Statistics - rtc::CriticalSection statistics_crit_; - SendDelayMap send_delays_ GUARDED_BY(statistics_crit_); - FrameCounts frame_counts_ GUARDED_BY(statistics_crit_); - StreamDataCounters rtp_stats_ GUARDED_BY(statistics_crit_); - StreamDataCounters rtx_rtp_stats_ GUARDED_BY(statistics_crit_); - StreamDataCountersCallback* rtp_stats_callback_ GUARDED_BY(statistics_crit_); - RateStatistics total_bitrate_sent_ GUARDED_BY(statistics_crit_); - RateStatistics nack_bitrate_sent_ GUARDED_BY(statistics_crit_); - FrameCountObserver* const frame_count_observer_; - SendSideDelayObserver* const send_side_delay_observer_; - RtcEventLog* const event_log_; - SendPacketObserver* const send_packet_observer_; - BitrateStatisticsObserver* const bitrate_callback_; - - // RTP variables - uint32_t timestamp_offset_ GUARDED_BY(send_critsect_); - SSRCDatabase* const ssrc_db_; - uint32_t remote_ssrc_ GUARDED_BY(send_critsect_); - bool sequence_number_forced_ GUARDED_BY(send_critsect_); - uint16_t sequence_number_ GUARDED_BY(send_critsect_); - uint16_t sequence_number_rtx_ GUARDED_BY(send_critsect_); - bool ssrc_forced_ GUARDED_BY(send_critsect_); - uint32_t ssrc_ GUARDED_BY(send_critsect_); - uint32_t last_rtp_timestamp_ GUARDED_BY(send_critsect_); - int64_t capture_time_ms_ GUARDED_BY(send_critsect_); - int64_t last_timestamp_time_ms_ GUARDED_BY(send_critsect_); - bool media_has_been_sent_ GUARDED_BY(send_critsect_); - bool last_packet_marker_bit_ GUARDED_BY(send_critsect_); - std::vector csrcs_ GUARDED_BY(send_critsect_); - int rtx_ GUARDED_BY(send_critsect_); - uint32_t ssrc_rtx_ GUARDED_BY(send_critsect_); - // Mapping rtx_payload_type_map_[associated] = rtx. - std::map rtx_payload_type_map_ GUARDED_BY(send_critsect_); - size_t rtp_overhead_bytes_per_packet_ GUARDED_BY(send_critsect_); - - RateLimiter* const retransmission_rate_limiter_; - OverheadObserver* overhead_observer_; - - RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(RTPSender); -}; - -} // namespace webrtc - -#endif // WEBRTC_MODULES_RTP_RTCP_SOURCE_RTP_SENDER_H_ diff --git a/WebRtc.NET/include/webrtc/modules/rtp_rtcp/source/rtp_sender_audio.h b/WebRtc.NET/include/webrtc/modules/rtp_rtcp/source/rtp_sender_audio.h deleted file mode 100644 index cf79120b..00000000 --- a/WebRtc.NET/include/webrtc/modules/rtp_rtcp/source/rtp_sender_audio.h +++ /dev/null @@ -1,98 +0,0 @@ -/* - * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MODULES_RTP_RTCP_SOURCE_RTP_SENDER_AUDIO_H_ -#define WEBRTC_MODULES_RTP_RTCP_SOURCE_RTP_SENDER_AUDIO_H_ - -#include "webrtc/common_types.h" -#include "webrtc/base/constructormagic.h" -#include "webrtc/base/criticalsection.h" -#include "webrtc/base/onetimeevent.h" -#include "webrtc/modules/rtp_rtcp/source/dtmf_queue.h" -#include "webrtc/modules/rtp_rtcp/source/rtp_rtcp_config.h" -#include "webrtc/modules/rtp_rtcp/source/rtp_sender.h" -#include "webrtc/modules/rtp_rtcp/source/rtp_utility.h" -#include "webrtc/typedefs.h" - -namespace webrtc { - -class RTPSenderAudio { - public: - RTPSenderAudio(Clock* clock, RTPSender* rtp_sender); - ~RTPSenderAudio(); - - int32_t RegisterAudioPayload(const char payloadName[RTP_PAYLOAD_NAME_SIZE], - int8_t payload_type, - uint32_t frequency, - size_t channels, - uint32_t rate, - RtpUtility::Payload** payload); - - bool SendAudio(FrameType frame_type, - int8_t payload_type, - uint32_t capture_timestamp, - const uint8_t* payload_data, - size_t payload_size, - const RTPFragmentationHeader* fragmentation); - - // Store the audio level in dBov for - // header-extension-for-audio-level-indication. - // Valid range is [0,100]. Actual value is negative. - int32_t SetAudioLevel(uint8_t level_dbov); - - // Send a DTMF tone using RFC 2833 (4733) - int32_t SendTelephoneEvent(uint8_t key, uint16_t time_ms, uint8_t level); - - protected: - bool SendTelephoneEventPacket( - bool ended, - uint32_t dtmf_timestamp, - uint16_t duration, - bool marker_bit); // set on first packet in talk burst - - bool MarkerBit(FrameType frame_type, int8_t payload_type); - - private: - Clock* const clock_ = nullptr; - RTPSender* const rtp_sender_ = nullptr; - - rtc::CriticalSection send_audio_critsect_; - - // DTMF. - bool dtmf_event_is_on_ = false; - bool dtmf_event_first_packet_sent_ = false; - int8_t dtmf_payload_type_ GUARDED_BY(send_audio_critsect_) = -1; - uint32_t dtmf_payload_freq_ GUARDED_BY(send_audio_critsect_) = 8000; - uint32_t dtmf_timestamp_ = 0; - uint32_t dtmf_length_samples_ = 0; - int64_t dtmf_time_last_sent_ = 0; - uint32_t dtmf_timestamp_last_sent_ = 0; - DtmfQueue::Event dtmf_current_event_; - DtmfQueue dtmf_queue_; - - // VAD detection, used for marker bit. - bool inband_vad_active_ GUARDED_BY(send_audio_critsect_) = false; - int8_t cngnb_payload_type_ GUARDED_BY(send_audio_critsect_) = -1; - int8_t cngwb_payload_type_ GUARDED_BY(send_audio_critsect_) = -1; - int8_t cngswb_payload_type_ GUARDED_BY(send_audio_critsect_) = -1; - int8_t cngfb_payload_type_ GUARDED_BY(send_audio_critsect_) = -1; - int8_t last_payload_type_ GUARDED_BY(send_audio_critsect_) = -1; - - // Audio level indication. - // (https://datatracker.ietf.org/doc/draft-lennox-avt-rtp-audio-level-exthdr/) - uint8_t audio_level_dbov_ GUARDED_BY(send_audio_critsect_) = 0; - OneTimeEvent first_packet_sent_; - - RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(RTPSenderAudio); -}; - -} // namespace webrtc - -#endif // WEBRTC_MODULES_RTP_RTCP_SOURCE_RTP_SENDER_AUDIO_H_ diff --git a/WebRtc.NET/include/webrtc/modules/rtp_rtcp/source/rtp_sender_video.h b/WebRtc.NET/include/webrtc/modules/rtp_rtcp/source/rtp_sender_video.h deleted file mode 100644 index 23a4082a..00000000 --- a/WebRtc.NET/include/webrtc/modules/rtp_rtcp/source/rtp_sender_video.h +++ /dev/null @@ -1,144 +0,0 @@ -/* - * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MODULES_RTP_RTCP_SOURCE_RTP_SENDER_VIDEO_H_ -#define WEBRTC_MODULES_RTP_RTCP_SOURCE_RTP_SENDER_VIDEO_H_ - -#include -#include -#include - -#include "webrtc/base/criticalsection.h" -#include "webrtc/base/onetimeevent.h" -#include "webrtc/base/optional.h" -#include "webrtc/base/rate_statistics.h" -#include "webrtc/base/sequenced_task_checker.h" -#include "webrtc/base/thread_annotations.h" -#include "webrtc/common_types.h" -#include "webrtc/modules/rtp_rtcp/include/flexfec_sender.h" -#include "webrtc/modules/rtp_rtcp/include/rtp_rtcp_defines.h" -#include "webrtc/modules/rtp_rtcp/source/rtp_rtcp_config.h" -#include "webrtc/modules/rtp_rtcp/source/rtp_sender.h" -#include "webrtc/modules/rtp_rtcp/source/rtp_utility.h" -#include "webrtc/modules/rtp_rtcp/source/ulpfec_generator.h" -#include "webrtc/modules/rtp_rtcp/source/video_codec_information.h" -#include "webrtc/typedefs.h" - -namespace webrtc { -class RtpPacketToSend; - -class RTPSenderVideo { - public: - RTPSenderVideo(Clock* clock, - RTPSender* rtpSender, - FlexfecSender* flexfec_sender); - virtual ~RTPSenderVideo(); - - virtual RtpVideoCodecTypes VideoCodecType() const; - - size_t FecPacketOverhead() const { - rtc::CritScope cs(&crit_); - return CalculateFecPacketOverhead(); - } - - static RtpUtility::Payload* CreateVideoPayload( - const char payload_name[RTP_PAYLOAD_NAME_SIZE], - int8_t payload_type); - - bool SendVideo(RtpVideoCodecTypes video_type, - FrameType frame_type, - int8_t payload_type, - uint32_t capture_timestamp, - int64_t capture_time_ms, - const uint8_t* payload_data, - size_t payload_size, - const RTPFragmentationHeader* fragmentation, - const RTPVideoHeader* video_header); - - void SetVideoCodecType(RtpVideoCodecTypes type); - - // ULPFEC. - void SetUlpfecConfig(int red_payload_type, int ulpfec_payload_type); - void GetUlpfecConfig(int* red_payload_type, int* ulpfec_payload_type) const; - - // FlexFEC/ULPFEC. - void SetFecParameters(const FecProtectionParams& delta_params, - const FecProtectionParams& key_params); - - // FlexFEC. - rtc::Optional FlexfecSsrc() const; - - uint32_t VideoBitrateSent() const; - uint32_t FecOverheadRate() const; - - int SelectiveRetransmissions() const; - void SetSelectiveRetransmissions(uint8_t settings); - - private: - size_t CalculateFecPacketOverhead() const EXCLUSIVE_LOCKS_REQUIRED(crit_); - - void SendVideoPacket(std::unique_ptr packet, - StorageType storage); - - void SendVideoPacketAsRedMaybeWithUlpfec( - std::unique_ptr media_packet, - StorageType media_packet_storage, - bool protect_media_packet); - - // TODO(brandtr): Remove the FlexFEC functions when FlexfecSender has been - // moved to PacedSender. - void SendVideoPacketWithFlexfec(std::unique_ptr media_packet, - StorageType media_packet_storage, - bool protect_media_packet); - - bool red_enabled() const EXCLUSIVE_LOCKS_REQUIRED(crit_) { - return red_payload_type_ >= 0; - } - - bool ulpfec_enabled() const EXCLUSIVE_LOCKS_REQUIRED(crit_) { - return ulpfec_payload_type_ >= 0; - } - - bool flexfec_enabled() const { return flexfec_sender_ != nullptr; } - - RTPSender* const rtp_sender_; - Clock* const clock_; - - // Should never be held when calling out of this class. - rtc::CriticalSection crit_; - - RtpVideoCodecTypes video_type_; - int32_t retransmission_settings_ GUARDED_BY(crit_); - VideoRotation last_rotation_ GUARDED_BY(crit_); - - // RED/ULPFEC. - int red_payload_type_ GUARDED_BY(crit_); - int ulpfec_payload_type_ GUARDED_BY(crit_); - UlpfecGenerator ulpfec_generator_ GUARDED_BY(crit_); - - // FlexFEC. - FlexfecSender* const flexfec_sender_; - - // FEC parameters, applicable to either ULPFEC or FlexFEC. - FecProtectionParams delta_fec_params_ GUARDED_BY(crit_); - FecProtectionParams key_fec_params_ GUARDED_BY(crit_); - - rtc::CriticalSection stats_crit_; - // Bitrate used for FEC payload, RED headers, RTP headers for FEC packets - // and any padding overhead. - RateStatistics fec_bitrate_ GUARDED_BY(stats_crit_); - // Bitrate used for video payload and RTP headers. - RateStatistics video_bitrate_ GUARDED_BY(stats_crit_); - OneTimeEvent first_frame_sent_; -}; - -} // namespace webrtc - -#endif // WEBRTC_MODULES_RTP_RTCP_SOURCE_RTP_SENDER_VIDEO_H_ diff --git a/WebRtc.NET/include/webrtc/modules/rtp_rtcp/source/rtp_utility.h b/WebRtc.NET/include/webrtc/modules/rtp_rtcp/source/rtp_utility.h deleted file mode 100644 index 0e1d6610..00000000 --- a/WebRtc.NET/include/webrtc/modules/rtp_rtcp/source/rtp_utility.h +++ /dev/null @@ -1,66 +0,0 @@ -/* - * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MODULES_RTP_RTCP_SOURCE_RTP_UTILITY_H_ -#define WEBRTC_MODULES_RTP_RTCP_SOURCE_RTP_UTILITY_H_ - -#include - -#include "webrtc/base/deprecation.h" -#include "webrtc/modules/rtp_rtcp/include/receive_statistics.h" -#include "webrtc/modules/rtp_rtcp/include/rtp_rtcp_defines.h" -#include "webrtc/modules/rtp_rtcp/source/rtp_header_extension.h" -#include "webrtc/modules/rtp_rtcp/source/rtp_rtcp_config.h" -#include "webrtc/typedefs.h" - -namespace webrtc { - -const uint8_t kRtpMarkerBitMask = 0x80; - -RtpData* NullObjectRtpData(); -RtpFeedback* NullObjectRtpFeedback(); -ReceiveStatistics* NullObjectReceiveStatistics(); - -namespace RtpUtility { - -struct Payload { - char name[RTP_PAYLOAD_NAME_SIZE]; - bool audio; - PayloadUnion typeSpecific; -}; - -bool StringCompare(const char* str1, const char* str2, const uint32_t length); - -// Round up to the nearest size that is a multiple of 4. -size_t Word32Align(size_t size); - -class RtpHeaderParser { - public: - RtpHeaderParser(const uint8_t* rtpData, size_t rtpDataLength); - ~RtpHeaderParser(); - - bool RTCP() const; - bool ParseRtcp(RTPHeader* header) const; - bool Parse(RTPHeader* parsedPacket, - RtpHeaderExtensionMap* ptrExtensionMap = nullptr) const; - - private: - void ParseOneByteExtensionHeader(RTPHeader* parsedPacket, - const RtpHeaderExtensionMap* ptrExtensionMap, - const uint8_t* ptrRTPDataExtensionEnd, - const uint8_t* ptr) const; - - const uint8_t* const _ptrRTPDataBegin; - const uint8_t* const _ptrRTPDataEnd; -}; -} // namespace RtpUtility -} // namespace webrtc - -#endif // WEBRTC_MODULES_RTP_RTCP_SOURCE_RTP_UTILITY_H_ diff --git a/WebRtc.NET/include/webrtc/modules/rtp_rtcp/source/ssrc_database.h b/WebRtc.NET/include/webrtc/modules/rtp_rtcp/source/ssrc_database.h deleted file mode 100644 index 2f6357ae..00000000 --- a/WebRtc.NET/include/webrtc/modules/rtp_rtcp/source/ssrc_database.h +++ /dev/null @@ -1,62 +0,0 @@ -/* - * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MODULES_RTP_RTCP_SOURCE_SSRC_DATABASE_H_ -#define WEBRTC_MODULES_RTP_RTCP_SOURCE_SSRC_DATABASE_H_ - -#include - -#include "webrtc/base/criticalsection.h" -#include "webrtc/base/random.h" -#include "webrtc/base/thread_annotations.h" -#include "webrtc/system_wrappers/include/static_instance.h" -#include "webrtc/typedefs.h" - -namespace webrtc { - -// TODO(tommi, holmer): Look into whether we can eliminate locking in this -// class or the class itself completely once voice engine doesn't rely on it. -// At the moment voe_auto_test requires locking, but it's not clear if that's -// an issue with the test code or if it reflects real world usage or if that's -// the best design performance wise. -// If we do decide to keep the class, we should at least get rid of using -// StaticInstance. -class SSRCDatabase { - public: - static SSRCDatabase* GetSSRCDatabase(); - static void ReturnSSRCDatabase(); - - uint32_t CreateSSRC(); - void RegisterSSRC(uint32_t ssrc); - void ReturnSSRC(uint32_t ssrc); - - protected: - SSRCDatabase(); - ~SSRCDatabase(); - - static SSRCDatabase* CreateInstance() { return new SSRCDatabase(); } - - // Friend function to allow the SSRC destructor to be accessed from the - // template class. - friend SSRCDatabase* GetStaticInstance( - CountOperation count_operation); - - private: - rtc::CriticalSection crit_; - Random random_ GUARDED_BY(crit_); - std::set ssrcs_ GUARDED_BY(crit_); - // TODO(tommi): Use a thread checker to ensure the object is created and - // deleted on the same thread. At the moment this isn't possible due to - // voe::ChannelOwner in voice engine. To reproduce, run: - // voe_auto_test --automated --gtest_filter=*MixManyChannelsForStressOpus -}; -} // namespace webrtc - -#endif // WEBRTC_MODULES_RTP_RTCP_SOURCE_SSRC_DATABASE_H_ diff --git a/WebRtc.NET/include/webrtc/modules/rtp_rtcp/source/time_util.h b/WebRtc.NET/include/webrtc/modules/rtp_rtcp/source/time_util.h deleted file mode 100644 index 7bac5268..00000000 --- a/WebRtc.NET/include/webrtc/modules/rtp_rtcp/source/time_util.h +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Copyright (c) 2015 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MODULES_RTP_RTCP_SOURCE_TIME_UTIL_H_ -#define WEBRTC_MODULES_RTP_RTCP_SOURCE_TIME_UTIL_H_ - -#include - -#include "webrtc/system_wrappers/include/ntp_time.h" - -namespace webrtc { - -// Converts NTP timestamp to RTP timestamp. -inline uint32_t NtpToRtp(NtpTime ntp, uint32_t freq) { - uint32_t tmp = (static_cast(ntp.fractions()) * freq) >> 32; - return ntp.seconds() * freq + tmp; -} -// Return the current RTP timestamp from the NTP timestamp -// returned by the specified clock. -inline uint32_t CurrentRtp(const Clock& clock, uint32_t freq) { - return NtpToRtp(NtpTime(clock), freq); -} - -// Helper function for compact ntp representation: -// RFC 3550, Section 4. Time Format. -// Wallclock time is represented using the timestamp format of -// the Network Time Protocol (NTP). -// ... -// In some fields where a more compact representation is -// appropriate, only the middle 32 bits are used; that is, the low 16 -// bits of the integer part and the high 16 bits of the fractional part. -inline uint32_t CompactNtp(NtpTime ntp) { - return (ntp.seconds() << 16) | (ntp.fractions() >> 16); -} -// Converts interval between compact ntp timestamps to milliseconds. -// This interval can be up to ~9.1 hours (2^15 seconds). -// Values close to 2^16 seconds consider negative and result in minimum rtt = 1. -int64_t CompactNtpRttToMs(uint32_t compact_ntp_interval); - -} // namespace webrtc -#endif // WEBRTC_MODULES_RTP_RTCP_SOURCE_TIME_UTIL_H_ diff --git a/WebRtc.NET/include/webrtc/modules/rtp_rtcp/source/ulpfec_receiver_impl.h b/WebRtc.NET/include/webrtc/modules/rtp_rtcp/source/ulpfec_receiver_impl.h deleted file mode 100644 index 8dbc8af6..00000000 --- a/WebRtc.NET/include/webrtc/modules/rtp_rtcp/source/ulpfec_receiver_impl.h +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MODULES_RTP_RTCP_SOURCE_ULPFEC_RECEIVER_IMPL_H_ -#define WEBRTC_MODULES_RTP_RTCP_SOURCE_ULPFEC_RECEIVER_IMPL_H_ - -#include - -#include "webrtc/base/criticalsection.h" -#include "webrtc/modules/rtp_rtcp/include/rtp_rtcp_defines.h" -#include "webrtc/modules/rtp_rtcp/include/ulpfec_receiver.h" -#include "webrtc/modules/rtp_rtcp/source/forward_error_correction.h" -#include "webrtc/typedefs.h" - -namespace webrtc { - -class UlpfecReceiverImpl : public UlpfecReceiver { - public: - explicit UlpfecReceiverImpl(RtpData* callback); - virtual ~UlpfecReceiverImpl(); - - int32_t AddReceivedRedPacket(const RTPHeader& rtp_header, - const uint8_t* incoming_rtp_packet, - size_t packet_length, - uint8_t ulpfec_payload_type) override; - - int32_t ProcessReceivedFec() override; - - FecPacketCounter GetPacketCounter() const override; - - private: - rtc::CriticalSection crit_sect_; - RtpData* recovered_packet_callback_; - std::unique_ptr fec_; - // TODO(holmer): In the current version |received_packets_| is never more - // than one packet, since we process FEC every time a new packet - // arrives. We should remove the list. - ForwardErrorCorrection::ReceivedPacketList received_packets_; - ForwardErrorCorrection::RecoveredPacketList recovered_packets_; - FecPacketCounter packet_counter_; -}; - -} // namespace webrtc - -#endif // WEBRTC_MODULES_RTP_RTCP_SOURCE_ULPFEC_RECEIVER_IMPL_H_ diff --git a/WebRtc.NET/include/webrtc/modules/rtp_rtcp/source/video_codec_information.h b/WebRtc.NET/include/webrtc/modules/rtp_rtcp/source/video_codec_information.h deleted file mode 100644 index 7b819d06..00000000 --- a/WebRtc.NET/include/webrtc/modules/rtp_rtcp/source/video_codec_information.h +++ /dev/null @@ -1,27 +0,0 @@ -/* - * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MODULES_RTP_RTCP_SOURCE_VIDEO_CODEC_INFORMATION_H_ -#define WEBRTC_MODULES_RTP_RTCP_SOURCE_VIDEO_CODEC_INFORMATION_H_ - -#include "webrtc/modules/rtp_rtcp/source/rtp_rtcp_config.h" -#include "webrtc/modules/rtp_rtcp/source/rtp_utility.h" - -namespace webrtc { -class VideoCodecInformation { - public: - virtual void Reset() = 0; - - virtual RtpVideoCodecTypes Type() = 0; - virtual ~VideoCodecInformation() {} -}; -} // namespace webrtc - -#endif // WEBRTC_MODULES_RTP_RTCP_SOURCE_VIDEO_CODEC_INFORMATION_H_ diff --git a/WebRtc.NET/include/webrtc/modules/rtp_rtcp/source/vp8_partition_aggregator.h b/WebRtc.NET/include/webrtc/modules/rtp_rtcp/source/vp8_partition_aggregator.h deleted file mode 100644 index ccd22e5b..00000000 --- a/WebRtc.NET/include/webrtc/modules/rtp_rtcp/source/vp8_partition_aggregator.h +++ /dev/null @@ -1,137 +0,0 @@ -/* - * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MODULES_RTP_RTCP_SOURCE_VP8_PARTITION_AGGREGATOR_H_ -#define WEBRTC_MODULES_RTP_RTCP_SOURCE_VP8_PARTITION_AGGREGATOR_H_ - -#include - -#include "webrtc/base/constructormagic.h" -#include "webrtc/modules/include/module_common_types.h" -#include "webrtc/typedefs.h" - -namespace webrtc { - -// Class used to solve the VP8 aggregation problem. -class PartitionTreeNode { - public: - // Create a tree node. - PartitionTreeNode(PartitionTreeNode* parent, - const size_t* size_vector, - size_t num_partitions, - size_t this_size); - - // Create a root node. - static PartitionTreeNode* CreateRootNode(const size_t* size_vector, - size_t num_partitions); - - ~PartitionTreeNode(); - - // Calculate the cost for the node. If the node is a solution node, the cost - // will be the actual cost associated with that solution. If not, the cost - // will be the cost accumulated so far along the current branch (which is a - // lower bound for any solution along the branch). - int Cost(size_t penalty); - - // Create the two children for this node. - bool CreateChildren(size_t max_size); - - // Get the number of packets for the configuration that this node represents. - size_t NumPackets(); - - // Find the optimal solution given a maximum packet size and a per-packet - // penalty. The method will be recursively called while the solver is - // probing down the tree of nodes. - PartitionTreeNode* GetOptimalNode(size_t max_size, size_t penalty); - - // Setters and getters. - void set_max_parent_size(int size) { max_parent_size_ = size; } - void set_min_parent_size(int size) { min_parent_size_ = size; } - PartitionTreeNode* parent() const { return parent_; } - PartitionTreeNode* left_child() const { return children_[kLeftChild]; } - PartitionTreeNode* right_child() const { return children_[kRightChild]; } - size_t this_size() const { return this_size_; } - bool packet_start() const { return packet_start_; } - - private: - enum Children { - kLeftChild = 0, - kRightChild = 1 - }; - - int this_size_int() const { return static_cast(this_size_); } - void set_packet_start(bool value) { packet_start_ = value; } - - PartitionTreeNode* parent_; - PartitionTreeNode* children_[2]; - size_t this_size_; - const size_t* size_vector_; - size_t num_partitions_; - int max_parent_size_; - int min_parent_size_; - bool packet_start_; - - RTC_DISALLOW_COPY_AND_ASSIGN(PartitionTreeNode); -}; - -// Class that calculates the optimal aggregation of VP8 partitions smaller than -// the maximum packet size. -class Vp8PartitionAggregator { - public: - typedef std::vector ConfigVec; - - // Constructor. All partitions in the fragmentation header from index - // first_partition_idx to last_partition_idx must be smaller than - // maximum packet size to be used in FindOptimalConfiguration. - Vp8PartitionAggregator(const RTPFragmentationHeader& fragmentation, - size_t first_partition_idx, - size_t last_partition_idx); - - ~Vp8PartitionAggregator(); - - // Set the smallest and largest payload sizes produces so far. - void SetPriorMinMax(int min_size, int max_size); - - // Find the aggregation of VP8 partitions that produces the smallest cost. - // The result is given as a vector of the same length as the number of - // partitions given to the constructor (i.e., last_partition_idx - - // first_partition_idx + 1), where each element indicates the packet index - // for that partition. Thus, the output vector starts at 0 and is increasing - // up to the number of packets - 1. - ConfigVec FindOptimalConfiguration(size_t max_size, size_t penalty); - - // Calculate minimum and maximum packet sizes for a given aggregation config. - // The extreme packet sizes of the given aggregation are compared with the - // values given in min_size and max_size, and if either of these are exceeded, - // the new extreme value will be written to the corresponding variable. - void CalcMinMax(const ConfigVec& config, int* min_size, int* max_size) const; - - // Calculate the number of fragments to divide a large partition into. - // The large partition is of size large_partition_size. The payload must not - // be larger than max_payload_size. Each fragment comes at an overhead cost - // of penalty bytes. If the size of the fragments fall outside the range - // [min_size, max_size], an extra cost is inflicted. - static size_t CalcNumberOfFragments(size_t large_partition_size, - size_t max_payload_size, - size_t penalty, - int min_size, - int max_size); - - private: - PartitionTreeNode* root_; - size_t num_partitions_; - size_t* size_vector_; - size_t largest_partition_size_; - - RTC_DISALLOW_COPY_AND_ASSIGN(Vp8PartitionAggregator); -}; -} // namespace webrtc - -#endif // WEBRTC_MODULES_RTP_RTCP_SOURCE_VP8_PARTITION_AGGREGATOR_H_ diff --git a/WebRtc.NET/include/webrtc/modules/rtp_rtcp/test/testAPI/test_api.h b/WebRtc.NET/include/webrtc/modules/rtp_rtcp/test/testAPI/test_api.h deleted file mode 100644 index 74548258..00000000 --- a/WebRtc.NET/include/webrtc/modules/rtp_rtcp/test/testAPI/test_api.h +++ /dev/null @@ -1,72 +0,0 @@ -/* - * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ -#ifndef WEBRTC_MODULES_RTP_RTCP_TEST_TESTAPI_TEST_API_H_ -#define WEBRTC_MODULES_RTP_RTCP_TEST_TESTAPI_TEST_API_H_ - -#include "webrtc/api/call/transport.h" -#include "webrtc/common_types.h" -#include "webrtc/modules/rtp_rtcp/include/receive_statistics.h" -#include "webrtc/modules/rtp_rtcp/include/rtp_header_parser.h" -#include "webrtc/modules/rtp_rtcp/include/rtp_payload_registry.h" -#include "webrtc/modules/rtp_rtcp/include/rtp_receiver.h" -#include "webrtc/modules/rtp_rtcp/include/rtp_rtcp.h" -#include "webrtc/modules/rtp_rtcp/include/rtp_rtcp_defines.h" -#include "webrtc/test/gtest.h" - -namespace webrtc { - -// This class sends all its packet straight to the provided RtpRtcp module. -// with optional packet loss. -class LoopBackTransport : public Transport { - public: - LoopBackTransport() - : count_(0), - packet_loss_(0), - rtp_payload_registry_(NULL), - rtp_receiver_(NULL), - rtp_rtcp_module_(NULL) {} - void SetSendModule(RtpRtcp* rtp_rtcp_module, - RTPPayloadRegistry* payload_registry, - RtpReceiver* receiver, - ReceiveStatistics* receive_statistics); - void DropEveryNthPacket(int n); - bool SendRtp(const uint8_t* data, - size_t len, - const PacketOptions& options) override; - bool SendRtcp(const uint8_t* data, size_t len) override; - - private: - int count_; - int packet_loss_; - ReceiveStatistics* receive_statistics_; - RTPPayloadRegistry* rtp_payload_registry_; - RtpReceiver* rtp_receiver_; - RtpRtcp* rtp_rtcp_module_; -}; - -class TestRtpReceiver : public NullRtpData { - public: - int32_t OnReceivedPayloadData( - const uint8_t* payload_data, - size_t payload_size, - const webrtc::WebRtcRTPHeader* rtp_header) override; - - const uint8_t* payload_data() const { return payload_data_; } - size_t payload_size() const { return payload_size_; } - webrtc::WebRtcRTPHeader rtp_header() const { return rtp_header_; } - - private: - uint8_t payload_data_[1500]; - size_t payload_size_; - webrtc::WebRtcRTPHeader rtp_header_; -}; - -} // namespace webrtc -#endif // WEBRTC_MODULES_RTP_RTCP_TEST_TESTAPI_TEST_API_H_ diff --git a/WebRtc.NET/include/webrtc/modules/rtp_rtcp/test/testFec/average_residual_loss_xor_codes.h b/WebRtc.NET/include/webrtc/modules/rtp_rtcp/test/testFec/average_residual_loss_xor_codes.h deleted file mode 100644 index 6c233bba..00000000 --- a/WebRtc.NET/include/webrtc/modules/rtp_rtcp/test/testFec/average_residual_loss_xor_codes.h +++ /dev/null @@ -1,191 +0,0 @@ -/* - * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ -#ifndef WEBRTC_MODULES_RTP_RTCP_TEST_TESTFEC_AVERAGE_RESIDUAL_LOSS_XOR_CODES_H_ -#define WEBRTC_MODULES_RTP_RTCP_TEST_TESTFEC_AVERAGE_RESIDUAL_LOSS_XOR_CODES_H_ - -namespace webrtc { - -// Maximum number of media packets allowed in this test. The burst mask types -// are currently defined up to (kMaxMediaPacketsTest, kMaxMediaPacketsTest). -const int kMaxMediaPacketsTest = 12; - -// Maximum number of FEC codes considered in this test. -const int kNumberCodes = kMaxMediaPacketsTest * (kMaxMediaPacketsTest + 1) / 2; - -// For the random mask type: reference level for the maximum average residual -// loss expected for each code size up to: -// (kMaxMediaPacketsTest, kMaxMediaPacketsTest). -const float kMaxResidualLossRandomMask[kNumberCodes] = { - 0.009463f, - 0.022436f, - 0.007376f, - 0.033895f, - 0.012423f, - 0.004644f, - 0.043438f, - 0.019937f, - 0.008820f, - 0.003438f, - 0.051282f, - 0.025795f, - 0.012872f, - 0.006458f, - 0.003195f, - 0.057728f, - 0.032146f, - 0.016708f, - 0.009242f, - 0.005054f, - 0.003078f, - 0.063050f, - 0.037261f, - 0.021767f, - 0.012447f, - 0.007099f, - 0.003826f, - 0.002504f, - 0.067476f, - 0.042348f, - 0.026169f, - 0.015695f, - 0.009478f, - 0.005887f, - 0.003568f, - 0.001689f, - 0.071187f, - 0.046575f, - 0.031697f, - 0.019797f, - 0.012433f, - 0.007027f, - 0.004845f, - 0.002777f, - 0.001753f, - 0.074326f, - 0.050628f, - 0.034978f, - 0.021955f, - 0.014821f, - 0.009462f, - 0.006393f, - 0.004181f, - 0.003105f, - 0.001231f, - 0.077008f, - 0.054226f, - 0.038407f, - 0.026251f, - 0.018634f, - 0.011568f, - 0.008130f, - 0.004957f, - 0.003334f, - 0.002069f, - 0.001304f, - 0.079318f, - 0.057180f, - 0.041268f, - 0.028842f, - 0.020033f, - 0.014061f, - 0.009636f, - 0.006411f, - 0.004583f, - 0.002817f, - 0.001770f, - 0.001258f -}; - -// For the bursty mask type: reference level for the maximum average residual -// loss expected for each code size up to: -// (kMaxMediaPacketsTestf, kMaxMediaPacketsTest). -const float kMaxResidualLossBurstyMask[kNumberCodes] = { - 0.033236f, - 0.053344f, - 0.026616f, - 0.064129f, - 0.036589f, - 0.021892f, - 0.071055f, - 0.043890f, - 0.028009f, - 0.018524f, - 0.075968f, - 0.049828f, - 0.033288f, - 0.022791f, - 0.016088f, - 0.079672f, - 0.054586f, - 0.037872f, - 0.026679f, - 0.019326f, - 0.014293f, - 0.082582f, - 0.058719f, - 0.042045f, - 0.030504f, - 0.022391f, - 0.016894f, - 0.012946f, - 0.084935f, - 0.062169f, - 0.045620f, - 0.033713f, - 0.025570f, - 0.019439f, - 0.015121f, - 0.011920f, - 0.086881f, - 0.065267f, - 0.048721f, - 0.037613f, - 0.028278f, - 0.022152f, - 0.017314f, - 0.013791f, - 0.011130f, - 0.088516f, - 0.067911f, - 0.051709f, - 0.040819f, - 0.030777f, - 0.024547f, - 0.019689f, - 0.015877f, - 0.012773f, - 0.010516f, - 0.089909f, - 0.070332f, - 0.054402f, - 0.043210f, - 0.034096f, - 0.026625f, - 0.021823f, - 0.017648f, - 0.014649f, - 0.011982f, - 0.010035f, - 0.091109f, - 0.072428f, - 0.056775f, - 0.045418f, - 0.036679f, - 0.028599f, - 0.023693f, - 0.019966f, - 0.016603f, - 0.013690f, - 0.011359f, - 0.009657f -}; - -} // namespace webrtc -#endif // WEBRTC_MODULES_RTP_RTCP_TEST_TESTFEC_AVERAGE_RESIDUAL_LOSS_XOR_CODES_H_ diff --git a/WebRtc.NET/include/webrtc/modules/utility/include/audio_frame_operations.h b/WebRtc.NET/include/webrtc/modules/utility/include/audio_frame_operations.h deleted file mode 100644 index 4bf73df6..00000000 --- a/WebRtc.NET/include/webrtc/modules/utility/include/audio_frame_operations.h +++ /dev/null @@ -1,20 +0,0 @@ -/* - * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MODULES_UTILITY_INCLUDE_AUDIO_FRAME_OPERATIONS_H_ -#define WEBRTC_MODULES_UTILITY_INCLUDE_AUDIO_FRAME_OPERATIONS_H_ -// The contents of this file have moved to -// //webrtc/audio/utility. This file is deprecated. - -// TODO(aleloi): Remove this file when clients have updated their -// includes. See bugs.webrtc.org/6548. -#include "webrtc/audio/utility/audio_frame_operations.h" - -#endif // #ifndef WEBRTC_MODULES_UTILITY_INCLUDE_AUDIO_FRAME_OPERATIONS_H_ diff --git a/WebRtc.NET/include/webrtc/modules/utility/include/helpers_android.h b/WebRtc.NET/include/webrtc/modules/utility/include/helpers_android.h deleted file mode 100644 index 2840ca96..00000000 --- a/WebRtc.NET/include/webrtc/modules/utility/include/helpers_android.h +++ /dev/null @@ -1,87 +0,0 @@ -/* - * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MODULES_UTILITY_INCLUDE_HELPERS_ANDROID_H_ -#define WEBRTC_MODULES_UTILITY_INCLUDE_HELPERS_ANDROID_H_ - -#include -#include - -// Abort the process if |jni| has a Java exception pending. -// TODO(henrika): merge with CHECK_JNI_EXCEPTION() in jni_helpers.h. -#define CHECK_EXCEPTION(jni) \ - RTC_CHECK(!jni->ExceptionCheck()) \ - << (jni->ExceptionDescribe(), jni->ExceptionClear(), "") - -namespace webrtc { - -// Return a |JNIEnv*| usable on this thread or NULL if this thread is detached. -JNIEnv* GetEnv(JavaVM* jvm); - -// Return a |jlong| that will correctly convert back to |ptr|. This is needed -// because the alternative (of silently passing a 32-bit pointer to a vararg -// function expecting a 64-bit param) picks up garbage in the high 32 bits. -jlong PointerTojlong(void* ptr); - -// JNIEnv-helper methods that wraps the API which uses the JNI interface -// pointer (JNIEnv*). It allows us to RTC_CHECK success and that no Java -// exception is thrown while calling the method. -jmethodID GetMethodID( - JNIEnv* jni, jclass c, const char* name, const char* signature); - -jmethodID GetStaticMethodID( - JNIEnv* jni, jclass c, const char* name, const char* signature); - -jclass FindClass(JNIEnv* jni, const char* name); - -jobject NewGlobalRef(JNIEnv* jni, jobject o); - -void DeleteGlobalRef(JNIEnv* jni, jobject o); - -// Return thread ID as a string. -std::string GetThreadId(); - -// Return thread ID as string suitable for debug logging. -std::string GetThreadInfo(); - -// Attach thread to JVM if necessary and detach at scope end if originally -// attached. -class AttachThreadScoped { - public: - explicit AttachThreadScoped(JavaVM* jvm); - ~AttachThreadScoped(); - JNIEnv* env(); - - private: - bool attached_; - JavaVM* jvm_; - JNIEnv* env_; -}; - -// Scoped holder for global Java refs. -template // T is jclass, jobject, jintArray, etc. -class ScopedGlobalRef { - public: - ScopedGlobalRef(JNIEnv* jni, T obj) - : jni_(jni), obj_(static_cast(NewGlobalRef(jni, obj))) {} - ~ScopedGlobalRef() { - DeleteGlobalRef(jni_, obj_); - } - T operator*() const { - return obj_; - } - private: - JNIEnv* jni_; - T obj_; -}; - -} // namespace webrtc - -#endif // WEBRTC_MODULES_UTILITY_INCLUDE_HELPERS_ANDROID_H_ diff --git a/WebRtc.NET/include/webrtc/modules/utility/source/process_thread_impl.h b/WebRtc.NET/include/webrtc/modules/utility/source/process_thread_impl.h deleted file mode 100644 index 510ab52d..00000000 --- a/WebRtc.NET/include/webrtc/modules/utility/source/process_thread_impl.h +++ /dev/null @@ -1,85 +0,0 @@ -/* - * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MODULES_UTILITY_SOURCE_PROCESS_THREAD_IMPL_H_ -#define WEBRTC_MODULES_UTILITY_SOURCE_PROCESS_THREAD_IMPL_H_ - -#include -#include -#include - -#include "webrtc/base/criticalsection.h" -#include "webrtc/base/platform_thread.h" -#include "webrtc/base/thread_checker.h" -#include "webrtc/modules/utility/include/process_thread.h" -#include "webrtc/system_wrappers/include/event_wrapper.h" -#include "webrtc/typedefs.h" - -namespace webrtc { - -class ProcessThreadImpl : public ProcessThread { - public: - explicit ProcessThreadImpl(const char* thread_name); - ~ProcessThreadImpl() override; - - void Start() override; - void Stop() override; - - void WakeUp(Module* module) override; - void PostTask(std::unique_ptr task) override; - - void RegisterModule(Module* module) override; - void DeRegisterModule(Module* module) override; - - protected: - static bool Run(void* obj); - bool Process(); - - private: - struct ModuleCallback { - ModuleCallback() : module(nullptr), next_callback(0) {} - ModuleCallback(const ModuleCallback& cb) - : module(cb.module), next_callback(cb.next_callback) {} - ModuleCallback(Module* module) : module(module), next_callback(0) {} - bool operator==(const ModuleCallback& cb) const { - return cb.module == module; - } - - Module* const module; - int64_t next_callback; // Absolute timestamp. - - private: - ModuleCallback& operator=(ModuleCallback&); - }; - - typedef std::list ModuleList; - - // Warning: For some reason, if |lock_| comes immediately before |modules_| - // with the current class layout, we will start to have mysterious crashes - // on Mac 10.9 debug. I (Tommi) suspect we're hitting some obscure alignemnt - // issues, but I haven't figured out what they are, if there are alignment - // requirements for mutexes on Mac or if there's something else to it. - // So be careful with changing the layout. - rtc::CriticalSection lock_; // Used to guard modules_, tasks_ and stop_. - - rtc::ThreadChecker thread_checker_; - const std::unique_ptr wake_up_; - // TODO(pbos): Remove unique_ptr and stop recreating the thread. - std::unique_ptr thread_; - - ModuleList modules_; - std::queue queue_; - bool stop_; - const char* thread_name_; -}; - -} // namespace webrtc - -#endif // WEBRTC_MODULES_UTILITY_SOURCE_PROCESS_THREAD_IMPL_H_ diff --git a/WebRtc.NET/include/webrtc/modules/video_capture/device_info_impl.h b/WebRtc.NET/include/webrtc/modules/video_capture/device_info_impl.h deleted file mode 100644 index 247a7f4b..00000000 --- a/WebRtc.NET/include/webrtc/modules/video_capture/device_info_impl.h +++ /dev/null @@ -1,67 +0,0 @@ -/* - * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MODULES_VIDEO_CAPTURE_MAIN_SOURCE_DEVICE_INFO_IMPL_H_ -#define WEBRTC_MODULES_VIDEO_CAPTURE_MAIN_SOURCE_DEVICE_INFO_IMPL_H_ - -#include - -#include "webrtc/modules/video_capture/video_capture.h" -#include "webrtc/modules/video_capture/video_capture_delay.h" -#include "webrtc/system_wrappers/include/rw_lock_wrapper.h" - -namespace webrtc -{ -namespace videocapturemodule -{ -class DeviceInfoImpl: public VideoCaptureModule::DeviceInfo -{ -public: - DeviceInfoImpl(); - virtual ~DeviceInfoImpl(void); - virtual int32_t NumberOfCapabilities(const char* deviceUniqueIdUTF8); - virtual int32_t GetCapability( - const char* deviceUniqueIdUTF8, - const uint32_t deviceCapabilityNumber, - VideoCaptureCapability& capability); - - virtual int32_t GetBestMatchedCapability( - const char* deviceUniqueIdUTF8, - const VideoCaptureCapability& requested, - VideoCaptureCapability& resulting); - virtual int32_t GetOrientation(const char* deviceUniqueIdUTF8, - VideoRotation& orientation); - -protected: - /* Initialize this object*/ - - virtual int32_t Init()=0; - /* - * Fills the member variable _captureCapabilities with capabilities for the given device name. - */ - virtual int32_t CreateCapabilityMap(const char* deviceUniqueIdUTF8)=0; - - /* Returns the expected Capture delay*/ - int32_t GetExpectedCaptureDelay(const DelayValues delayValues[], - const uint32_t sizeOfDelayValues, - const char* productId, - const uint32_t width, - const uint32_t height); -protected: - // Data members - typedef std::vector VideoCaptureCapabilities; - VideoCaptureCapabilities _captureCapabilities; - RWLockWrapper& _apiLock; - char* _lastUsedDeviceName; - uint32_t _lastUsedDeviceNameLength; -}; -} // namespace videocapturemodule -} // namespace webrtc -#endif // WEBRTC_MODULES_VIDEO_CAPTURE_MAIN_SOURCE_DEVICE_INFO_IMPL_H_ diff --git a/WebRtc.NET/include/webrtc/modules/video_capture/linux/device_info_linux.h b/WebRtc.NET/include/webrtc/modules/video_capture/linux/device_info_linux.h deleted file mode 100644 index 80a8e778..00000000 --- a/WebRtc.NET/include/webrtc/modules/video_capture/linux/device_info_linux.h +++ /dev/null @@ -1,53 +0,0 @@ -/* - * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MODULES_VIDEO_CAPTURE_MAIN_SOURCE_LINUX_DEVICE_INFO_LINUX_H_ -#define WEBRTC_MODULES_VIDEO_CAPTURE_MAIN_SOURCE_LINUX_DEVICE_INFO_LINUX_H_ - -#include "webrtc/modules/video_capture/device_info_impl.h" -#include "webrtc/modules/video_capture/video_capture_impl.h" - -namespace webrtc -{ -namespace videocapturemodule -{ -class DeviceInfoLinux: public DeviceInfoImpl -{ -public: - DeviceInfoLinux(); - virtual ~DeviceInfoLinux(); - virtual uint32_t NumberOfDevices(); - virtual int32_t GetDeviceName( - uint32_t deviceNumber, - char* deviceNameUTF8, - uint32_t deviceNameLength, - char* deviceUniqueIdUTF8, - uint32_t deviceUniqueIdUTF8Length, - char* productUniqueIdUTF8=0, - uint32_t productUniqueIdUTF8Length=0); - /* - * Fills the membervariable _captureCapabilities with capabilites for the given device name. - */ - virtual int32_t CreateCapabilityMap (const char* deviceUniqueIdUTF8); - virtual int32_t DisplayCaptureSettingsDialogBox( - const char* /*deviceUniqueIdUTF8*/, - const char* /*dialogTitleUTF8*/, - void* /*parentWindow*/, - uint32_t /*positionX*/, - uint32_t /*positionY*/) { return -1;} - int32_t FillCapabilities(int fd); - int32_t Init(); -private: - - bool IsDeviceNameMatches(const char* name, const char* deviceUniqueIdUTF8); -}; -} // namespace videocapturemodule -} // namespace webrtc -#endif // WEBRTC_MODULES_VIDEO_CAPTURE_MAIN_SOURCE_LINUX_DEVICE_INFO_LINUX_H_ diff --git a/WebRtc.NET/include/webrtc/modules/video_capture/linux/video_capture_linux.h b/WebRtc.NET/include/webrtc/modules/video_capture/linux/video_capture_linux.h deleted file mode 100644 index e048e88d..00000000 --- a/WebRtc.NET/include/webrtc/modules/video_capture/linux/video_capture_linux.h +++ /dev/null @@ -1,67 +0,0 @@ -/* - * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MODULES_VIDEO_CAPTURE_MAIN_SOURCE_LINUX_VIDEO_CAPTURE_LINUX_H_ -#define WEBRTC_MODULES_VIDEO_CAPTURE_MAIN_SOURCE_LINUX_VIDEO_CAPTURE_LINUX_H_ - -#include - -#include "webrtc/base/platform_thread.h" -#include "webrtc/common_types.h" -#include "webrtc/modules/video_capture/video_capture_impl.h" - -namespace webrtc -{ -class CriticalSectionWrapper; -namespace videocapturemodule -{ -class VideoCaptureModuleV4L2: public VideoCaptureImpl -{ -public: - VideoCaptureModuleV4L2(); - virtual ~VideoCaptureModuleV4L2(); - virtual int32_t Init(const char* deviceUniqueId); - virtual int32_t StartCapture(const VideoCaptureCapability& capability); - virtual int32_t StopCapture(); - virtual bool CaptureStarted(); - virtual int32_t CaptureSettings(VideoCaptureCapability& settings); - -private: - enum {kNoOfV4L2Bufffers=4}; - - static bool CaptureThread(void*); - bool CaptureProcess(); - bool AllocateVideoBuffers(); - bool DeAllocateVideoBuffers(); - - // TODO(pbos): Stop using unique_ptr and resetting the thread. - std::unique_ptr _captureThread; - CriticalSectionWrapper* _captureCritSect; - - int32_t _deviceId; - int32_t _deviceFd; - - int32_t _buffersAllocatedByDevice; - int32_t _currentWidth; - int32_t _currentHeight; - int32_t _currentFrameRate; - bool _captureStarted; - RawVideoType _captureVideoType; - struct Buffer - { - void *start; - size_t length; - }; - Buffer *_pool; -}; -} // namespace videocapturemodule -} // namespace webrtc - -#endif // WEBRTC_MODULES_VIDEO_CAPTURE_MAIN_SOURCE_LINUX_VIDEO_CAPTURE_LINUX_H_ diff --git a/WebRtc.NET/include/webrtc/modules/video_capture/objc/video_capture.h b/WebRtc.NET/include/webrtc/modules/video_capture/objc/video_capture.h deleted file mode 100644 index 325d5117..00000000 --- a/WebRtc.NET/include/webrtc/modules/video_capture/objc/video_capture.h +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MODULES_VIDEO_CAPTURE_OBJC_VIDEO_CAPTURE_H_ -#define WEBRTC_MODULES_VIDEO_CAPTURE_OBJC_VIDEO_CAPTURE_H_ - -#include "webrtc/base/scoped_ref_ptr.h" -#include "webrtc/modules/video_capture/video_capture_impl.h" - -@class RTCVideoCaptureIosObjC; - -namespace webrtc { -namespace videocapturemodule { -class VideoCaptureIos : public VideoCaptureImpl { - public: - VideoCaptureIos(); - virtual ~VideoCaptureIos(); - - static rtc::scoped_refptr Create( - const char* device_unique_id_utf8); - - // Implementation of VideoCaptureImpl. - int32_t StartCapture(const VideoCaptureCapability& capability) override; - int32_t StopCapture() override; - bool CaptureStarted() override; - int32_t CaptureSettings(VideoCaptureCapability& settings) override; - - private: - RTCVideoCaptureIosObjC* capture_device_; - bool is_capturing_; - VideoCaptureCapability capability_; -}; - -} // namespace videocapturemodule -} // namespace webrtc - -#endif // WEBRTC_MODULES_VIDEO_CAPTURE_OBJC_VIDEO_CAPTURE_H_ diff --git a/WebRtc.NET/include/webrtc/modules/video_capture/video_capture.h b/WebRtc.NET/include/webrtc/modules/video_capture/video_capture.h deleted file mode 100644 index 884953b5..00000000 --- a/WebRtc.NET/include/webrtc/modules/video_capture/video_capture.h +++ /dev/null @@ -1,121 +0,0 @@ -/* - * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MODULES_VIDEO_CAPTURE_VIDEO_CAPTURE_H_ -#define WEBRTC_MODULES_VIDEO_CAPTURE_VIDEO_CAPTURE_H_ - -#include "webrtc/api/video/video_rotation.h" -#include "webrtc/media/base/videosinkinterface.h" -#include "webrtc/modules/include/module.h" -#include "webrtc/modules/video_capture/video_capture_defines.h" - -namespace webrtc { - -class VideoCaptureModule: public rtc::RefCountInterface { - public: - // Interface for receiving information about available camera devices. - class DeviceInfo { - public: - virtual uint32_t NumberOfDevices() = 0; - - // Returns the available capture devices. - // deviceNumber - Index of capture device. - // deviceNameUTF8 - Friendly name of the capture device. - // deviceUniqueIdUTF8 - Unique name of the capture device if it exist. - // Otherwise same as deviceNameUTF8. - // productUniqueIdUTF8 - Unique product id if it exist. - // Null terminated otherwise. - virtual int32_t GetDeviceName( - uint32_t deviceNumber, - char* deviceNameUTF8, - uint32_t deviceNameLength, - char* deviceUniqueIdUTF8, - uint32_t deviceUniqueIdUTF8Length, - char* productUniqueIdUTF8 = 0, - uint32_t productUniqueIdUTF8Length = 0) = 0; - - - // Returns the number of capabilities this device. - virtual int32_t NumberOfCapabilities( - const char* deviceUniqueIdUTF8) = 0; - - // Gets the capabilities of the named device. - virtual int32_t GetCapability( - const char* deviceUniqueIdUTF8, - const uint32_t deviceCapabilityNumber, - VideoCaptureCapability& capability) = 0; - - // Gets clockwise angle the captured frames should be rotated in order - // to be displayed correctly on a normally rotated display. - virtual int32_t GetOrientation(const char* deviceUniqueIdUTF8, - VideoRotation& orientation) = 0; - - // Gets the capability that best matches the requested width, height and - // frame rate. - // Returns the deviceCapabilityNumber on success. - virtual int32_t GetBestMatchedCapability( - const char* deviceUniqueIdUTF8, - const VideoCaptureCapability& requested, - VideoCaptureCapability& resulting) = 0; - - // Display OS /capture device specific settings dialog - virtual int32_t DisplayCaptureSettingsDialogBox( - const char* deviceUniqueIdUTF8, - const char* dialogTitleUTF8, - void* parentWindow, - uint32_t positionX, - uint32_t positionY) = 0; - - virtual ~DeviceInfo() {} - }; - - // Register capture data callback - virtual void RegisterCaptureDataCallback( - rtc::VideoSinkInterface *dataCallback) = 0; - - // Remove capture data callback - virtual void DeRegisterCaptureDataCallback() = 0; - - // Start capture device - virtual int32_t StartCapture( - const VideoCaptureCapability& capability) = 0; - - virtual int32_t StopCapture() = 0; - - // Returns the name of the device used by this module. - virtual const char* CurrentDeviceName() const = 0; - - // Returns true if the capture device is running - virtual bool CaptureStarted() = 0; - - // Gets the current configuration. - virtual int32_t CaptureSettings(VideoCaptureCapability& settings) = 0; - - // Set the rotation of the captured frames. - // If the rotation is set to the same as returned by - // DeviceInfo::GetOrientation the captured frames are - // displayed correctly if rendered. - virtual int32_t SetCaptureRotation(VideoRotation rotation) = 0; - - // Tells the capture module whether to apply the pending rotation. By default, - // the rotation is applied and the generated frame is up right. When set to - // false, generated frames will carry the rotation information from - // SetCaptureRotation. Return value indicates whether this operation succeeds. - virtual bool SetApplyRotation(bool enable) = 0; - - // Return whether the rotation is applied or left pending. - virtual bool GetApplyRotation() = 0; - -protected: - virtual ~VideoCaptureModule() {}; -}; - -} // namespace webrtc -#endif // WEBRTC_MODULES_VIDEO_CAPTURE_VIDEO_CAPTURE_H_ diff --git a/WebRtc.NET/include/webrtc/modules/video_capture/video_capture_config.h b/WebRtc.NET/include/webrtc/modules/video_capture/video_capture_config.h deleted file mode 100644 index 829a6bea..00000000 --- a/WebRtc.NET/include/webrtc/modules/video_capture/video_capture_config.h +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MODULES_VIDEO_CAPTURE_MAIN_SOURCE_VIDEO_CAPTURE_CONFIG_H_ -#define WEBRTC_MODULES_VIDEO_CAPTURE_MAIN_SOURCE_VIDEO_CAPTURE_CONFIG_H_ - -namespace webrtc -{ -namespace videocapturemodule -{ -enum {kDefaultWidth = 640}; // Start width -enum {kDefaultHeight = 480}; // Start heigt -enum {kDefaultFrameRate = 30}; // Start frame rate - -enum {kMaxFrameRate =60}; // Max allowed frame rate of the start image - -enum {kDefaultCaptureDelay = 120}; -enum {kMaxCaptureDelay = 270}; // Max capture delay allowed in the precompiled capture delay values. - -enum {kFrameRateCallbackInterval = 1000}; -enum {kFrameRateCountHistorySize = 90}; -enum {kFrameRateHistoryWindowMs = 2000}; -} // namespace videocapturemodule -} // namespace webrtc - -#endif // WEBRTC_MODULES_VIDEO_CAPTURE_MAIN_SOURCE_VIDEO_CAPTURE_CONFIG_H_ diff --git a/WebRtc.NET/include/webrtc/modules/video_capture/video_capture_defines.h b/WebRtc.NET/include/webrtc/modules/video_capture/video_capture_defines.h deleted file mode 100644 index 261ee677..00000000 --- a/WebRtc.NET/include/webrtc/modules/video_capture/video_capture_defines.h +++ /dev/null @@ -1,89 +0,0 @@ -/* - * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MODULES_VIDEO_CAPTURE_VIDEO_CAPTURE_DEFINES_H_ -#define WEBRTC_MODULES_VIDEO_CAPTURE_VIDEO_CAPTURE_DEFINES_H_ - -#include "webrtc/api/video/video_frame.h" -#include "webrtc/modules/include/module_common_types.h" -#include "webrtc/typedefs.h" - -namespace webrtc -{ -// Defines -#ifndef NULL - #define NULL 0 -#endif - -enum {kVideoCaptureUniqueNameLength =1024}; //Max unique capture device name lenght -enum {kVideoCaptureDeviceNameLength =256}; //Max capture device name lenght -enum {kVideoCaptureProductIdLength =128}; //Max product id length - -struct VideoCaptureCapability -{ - int32_t width; - int32_t height; - int32_t maxFPS; - int32_t expectedCaptureDelay; - RawVideoType rawType; - VideoCodecType codecType; - bool interlaced; - - VideoCaptureCapability() - { - width = 0; - height = 0; - maxFPS = 0; - expectedCaptureDelay = 0; - rawType = kVideoUnknown; - codecType = kVideoCodecUnknown; - interlaced = false; - } - ; - bool operator!=(const VideoCaptureCapability &other) const - { - if (width != other.width) - return true; - if (height != other.height) - return true; - if (maxFPS != other.maxFPS) - return true; - if (rawType != other.rawType) - return true; - if (codecType != other.codecType) - return true; - if (interlaced != other.interlaced) - return true; - return false; - } - bool operator==(const VideoCaptureCapability &other) const - { - return !operator!=(other); - } -}; - -/* External Capture interface. Returned by Create - and implemented by the capture module. - */ -class VideoCaptureExternal -{ -public: - // |capture_time| must be specified in the NTP time format in milliseconds. - virtual int32_t IncomingFrame(uint8_t* videoFrame, - size_t videoFrameLength, - const VideoCaptureCapability& frameInfo, - int64_t captureTime = 0) = 0; -protected: - ~VideoCaptureExternal() {} -}; - -} // namespace webrtc - -#endif // WEBRTC_MODULES_VIDEO_CAPTURE_VIDEO_CAPTURE_DEFINES_H_ diff --git a/WebRtc.NET/include/webrtc/modules/video_capture/video_capture_delay.h b/WebRtc.NET/include/webrtc/modules/video_capture/video_capture_delay.h deleted file mode 100644 index f8924e25..00000000 --- a/WebRtc.NET/include/webrtc/modules/video_capture/video_capture_delay.h +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MODULES_VIDEO_CAPTURE_MAIN_SOURCE_VIDEO_CAPTURE_DELAY_H_ -#define WEBRTC_MODULES_VIDEO_CAPTURE_MAIN_SOURCE_VIDEO_CAPTURE_DELAY_H_ - -namespace webrtc -{ -namespace videocapturemodule -{ - -struct DelayValue -{ - int32_t width; - int32_t height; - int32_t delay; -}; - -enum { NoOfDelayValues = 40 }; -struct DelayValues -{ - char * deviceName; - char* productId; - DelayValue delayValues[NoOfDelayValues]; -}; - -} // namespace videocapturemodule -} // namespace webrtc -#endif // WEBRTC_MODULES_VIDEO_CAPTURE_MAIN_SOURCE_VIDEO_CAPTURE_DELAY_H_ diff --git a/WebRtc.NET/include/webrtc/modules/video_capture/video_capture_impl.h b/WebRtc.NET/include/webrtc/modules/video_capture/video_capture_impl.h deleted file mode 100644 index 6083726a..00000000 --- a/WebRtc.NET/include/webrtc/modules/video_capture/video_capture_impl.h +++ /dev/null @@ -1,121 +0,0 @@ -/* - * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MODULES_VIDEO_CAPTURE_MAIN_SOURCE_VIDEO_CAPTURE_IMPL_H_ -#define WEBRTC_MODULES_VIDEO_CAPTURE_MAIN_SOURCE_VIDEO_CAPTURE_IMPL_H_ - -/* - * video_capture_impl.h - */ - -#include "webrtc/api/video/video_frame.h" -#include "webrtc/base/scoped_ref_ptr.h" -#include "webrtc/common_video/libyuv/include/webrtc_libyuv.h" -#include "webrtc/modules/video_capture/video_capture.h" -#include "webrtc/modules/video_capture/video_capture_config.h" - -namespace webrtc -{ -class CriticalSectionWrapper; - -namespace videocapturemodule { -// Class definitions -class VideoCaptureImpl: public VideoCaptureModule, public VideoCaptureExternal -{ -public: - - /* - * Create a video capture module object - * - * id - unique identifier of this video capture module object - * deviceUniqueIdUTF8 - name of the device. Available names can be found by using GetDeviceName - */ - static rtc::scoped_refptr Create( - const char* deviceUniqueIdUTF8); - - /* - * Create a video capture module object used for external capture. - * - * id - unique identifier of this video capture module object - * externalCapture - [out] interface to call when a new frame is captured. - */ - static rtc::scoped_refptr Create( - VideoCaptureExternal*& externalCapture); - - static DeviceInfo* CreateDeviceInfo(); - - // Helpers for converting between (integral) degrees and - // VideoRotation values. Return 0 on success. - static int32_t RotationFromDegrees(int degrees, VideoRotation* rotation); - static int32_t RotationInDegrees(VideoRotation rotation, int* degrees); - - //Call backs - void RegisterCaptureDataCallback( - rtc::VideoSinkInterface* dataCallback) override; - void DeRegisterCaptureDataCallback() override; - - int32_t SetCaptureRotation(VideoRotation rotation) override; - bool SetApplyRotation(bool enable) override; - bool GetApplyRotation() override { - return apply_rotation_; - } - - const char* CurrentDeviceName() const override; - - // Implement VideoCaptureExternal - // |capture_time| must be specified in NTP time format in milliseconds. - int32_t IncomingFrame(uint8_t* videoFrame, - size_t videoFrameLength, - const VideoCaptureCapability& frameInfo, - int64_t captureTime = 0) override; - - // Platform dependent - int32_t StartCapture(const VideoCaptureCapability& capability) override - { - _requestedCapability = capability; - return -1; - } - int32_t StopCapture() override { return -1; } - bool CaptureStarted() override {return false; } - int32_t CaptureSettings(VideoCaptureCapability& /*settings*/) override - { return -1; } - -protected: - VideoCaptureImpl(); - virtual ~VideoCaptureImpl(); - int32_t DeliverCapturedFrame(VideoFrame& captureFrame); - - char* _deviceUniqueId; // current Device unique name; - CriticalSectionWrapper& _apiCs; - int32_t _captureDelay; // Current capture delay. May be changed of platform dependent parts. - VideoCaptureCapability _requestedCapability; // Should be set by platform dependent code in StartCapture. -private: - void UpdateFrameCount(); - uint32_t CalculateFrameRate(int64_t now_ns); - - // last time the module process function was called. - int64_t _lastProcessTimeNanos; - // last time the frame rate callback function was called. - int64_t _lastFrameRateCallbackTimeNanos; - - rtc::VideoSinkInterface* _dataCallBack; - - int64_t _lastProcessFrameTimeNanos; - // timestamp for local captured frames - int64_t _incomingFrameTimesNanos[kFrameRateCountHistorySize]; - VideoRotation _rotateFrame; // Set if the frame should be rotated by the - // capture module. - - // Indicate whether rotation should be applied before delivered externally. - bool apply_rotation_; -}; -} // namespace videocapturemodule -} // namespace webrtc -#endif // WEBRTC_MODULES_VIDEO_CAPTURE_MAIN_SOURCE_VIDEO_CAPTURE_IMPL_H_ diff --git a/WebRtc.NET/include/webrtc/modules/video_capture/windows/device_info_ds.h b/WebRtc.NET/include/webrtc/modules/video_capture/windows/device_info_ds.h deleted file mode 100644 index 0f711965..00000000 --- a/WebRtc.NET/include/webrtc/modules/video_capture/windows/device_info_ds.h +++ /dev/null @@ -1,106 +0,0 @@ -/* - * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MODULES_VIDEO_CAPTURE_MAIN_SOURCE_WINDOWS_DEVICE_INFO_DS_H_ -#define WEBRTC_MODULES_VIDEO_CAPTURE_MAIN_SOURCE_WINDOWS_DEVICE_INFO_DS_H_ - -#include "webrtc/modules/video_capture/device_info_impl.h" -#include "webrtc/modules/video_capture/video_capture_impl.h" - -#include - -namespace webrtc -{ -namespace videocapturemodule -{ -struct VideoCaptureCapabilityWindows: public VideoCaptureCapability -{ - uint32_t directShowCapabilityIndex; - bool supportFrameRateControl; - VideoCaptureCapabilityWindows() - { - directShowCapabilityIndex = 0; - supportFrameRateControl = false; - } -}; - -class DeviceInfoDS: public DeviceInfoImpl -{ -public: - // Factory function. - static DeviceInfoDS* Create(); - - DeviceInfoDS(); - virtual ~DeviceInfoDS(); - - int32_t Init(); - virtual uint32_t NumberOfDevices(); - - /* - * Returns the available capture devices. - */ - virtual int32_t - GetDeviceName(uint32_t deviceNumber, - char* deviceNameUTF8, - uint32_t deviceNameLength, - char* deviceUniqueIdUTF8, - uint32_t deviceUniqueIdUTF8Length, - char* productUniqueIdUTF8, - uint32_t productUniqueIdUTF8Length); - - /* - * Display OS /capture device specific settings dialog - */ - virtual int32_t - DisplayCaptureSettingsDialogBox( - const char* deviceUniqueIdUTF8, - const char* dialogTitleUTF8, - void* parentWindow, - uint32_t positionX, - uint32_t positionY); - - // Windows specific - - /* Gets a capture device filter - The user of this API is responsible for releasing the filter when it not needed. - */ - IBaseFilter * GetDeviceFilter(const char* deviceUniqueIdUTF8, - char* productUniqueIdUTF8 = NULL, - uint32_t productUniqueIdUTF8Length = 0); - - int32_t - GetWindowsCapability(const int32_t capabilityIndex, - VideoCaptureCapabilityWindows& windowsCapability); - - static void GetProductId(const char* devicePath, - char* productUniqueIdUTF8, - uint32_t productUniqueIdUTF8Length); - -protected: - int32_t GetDeviceInfo(uint32_t deviceNumber, - char* deviceNameUTF8, - uint32_t deviceNameLength, - char* deviceUniqueIdUTF8, - uint32_t deviceUniqueIdUTF8Length, - char* productUniqueIdUTF8, - uint32_t productUniqueIdUTF8Length); - - virtual int32_t - CreateCapabilityMap(const char* deviceUniqueIdUTF8); - -private: - ICreateDevEnum* _dsDevEnum; - IEnumMoniker* _dsMonikerDevEnum; - bool _CoUninitializeIsRequired; - std::vector _captureCapabilitiesWindows; -}; -} // namespace videocapturemodule -} // namespace webrtc -#endif // WEBRTC_MODULES_VIDEO_CAPTURE_MAIN_SOURCE_WINDOWS_DEVICE_INFO_DS_H_ diff --git a/WebRtc.NET/include/webrtc/modules/video_capture/windows/device_info_mf.h b/WebRtc.NET/include/webrtc/modules/video_capture/windows/device_info_mf.h deleted file mode 100644 index 7512277c..00000000 --- a/WebRtc.NET/include/webrtc/modules/video_capture/windows/device_info_mf.h +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MODULES_VIDEO_CAPTURE_WINDOWS_DEVICE_INFO_MF_H_ -#define WEBRTC_MODULES_VIDEO_CAPTURE_WINDOWS_DEVICE_INFO_MF_H_ - -#include "webrtc/modules/video_capture/device_info_impl.h" - -namespace webrtc { -namespace videocapturemodule { - -// Provides video capture device information using the Media Foundation API. -class DeviceInfoMF : public DeviceInfoImpl { - public: - DeviceInfoMF(); - virtual ~DeviceInfoMF(); - - int32_t Init(); - virtual uint32_t NumberOfDevices(); - - virtual int32_t GetDeviceName(uint32_t deviceNumber, char* deviceNameUTF8, - uint32_t deviceNameLength, - char* deviceUniqueIdUTF8, - uint32_t deviceUniqueIdUTF8Length, - char* productUniqueIdUTF8, - uint32_t productUniqueIdUTF8Length); - - virtual int32_t DisplayCaptureSettingsDialogBox( - const char* deviceUniqueIdUTF8, const char* dialogTitleUTF8, - void* parentWindow, uint32_t positionX, uint32_t positionY); -}; - -} // namespace videocapturemodule -} // namespace webrtc - -#endif // WEBRTC_MODULES_VIDEO_CAPTURE_WINDOWS_DEVICE_INFO_MF_H_ diff --git a/WebRtc.NET/include/webrtc/modules/video_capture/windows/help_functions_ds.h b/WebRtc.NET/include/webrtc/modules/video_capture/windows/help_functions_ds.h deleted file mode 100644 index d675f929..00000000 --- a/WebRtc.NET/include/webrtc/modules/video_capture/windows/help_functions_ds.h +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MODULES_VIDEO_CAPTURE_MAIN_SOURCE_WINDOWS_HELP_FUNCTIONS_DS_H_ -#define WEBRTC_MODULES_VIDEO_CAPTURE_MAIN_SOURCE_WINDOWS_HELP_FUNCTIONS_DS_H_ - -#include - -DEFINE_GUID(MEDIASUBTYPE_I420, 0x30323449, 0x0000, 0x0010, 0x80, 0x00, 0x00, - 0xAA, 0x00, 0x38, 0x9B, 0x71); -DEFINE_GUID(MEDIASUBTYPE_HDYC, 0x43594448, 0x0000, 0x0010, 0x80, 0x00, 0x00, - 0xAA, 0x00, 0x38, 0x9B, 0x71); - -#define RELEASE_AND_CLEAR(p) if (p) { (p) -> Release () ; (p) = NULL ; } - -namespace webrtc -{ -namespace videocapturemodule -{ -LONGLONG GetMaxOfFrameArray(LONGLONG *maxFps, long size); - -IPin* GetInputPin(IBaseFilter* filter); -IPin* GetOutputPin(IBaseFilter* filter, REFGUID Category); -BOOL PinMatchesCategory(IPin *pPin, REFGUID Category); - -} // namespace videocapturemodule -} // namespace webrtc -#endif // WEBRTC_MODULES_VIDEO_CAPTURE_MAIN_SOURCE_WINDOWS_HELP_FUNCTIONS_DS_H_ diff --git a/WebRtc.NET/include/webrtc/modules/video_capture/windows/sink_filter_ds.h b/WebRtc.NET/include/webrtc/modules/video_capture/windows/sink_filter_ds.h deleted file mode 100644 index f065f91e..00000000 --- a/WebRtc.NET/include/webrtc/modules/video_capture/windows/sink_filter_ds.h +++ /dev/null @@ -1,95 +0,0 @@ -/* - * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MODULES_VIDEO_CAPTURE_MAIN_SOURCE_WINDOWS_SINK_FILTER_DS_H_ -#define WEBRTC_MODULES_VIDEO_CAPTURE_MAIN_SOURCE_WINDOWS_SINK_FILTER_DS_H_ - -#include // Include base DS filter header files - -#include "webrtc/modules/video_capture/video_capture_defines.h" - -namespace webrtc -{ -namespace videocapturemodule -{ -//forward declaration - -class CaptureSinkFilter; -/** - * input pin for camera input - * - */ -class CaptureInputPin: public CBaseInputPin -{ -public: - VideoCaptureCapability _requestedCapability; - VideoCaptureCapability _resultingCapability; - HANDLE _threadHandle; - - CaptureInputPin(IN TCHAR* szName, - IN CaptureSinkFilter* pFilter, - IN CCritSec * pLock, - OUT HRESULT * pHr, - IN LPCWSTR pszName); - virtual ~CaptureInputPin(); - - HRESULT GetMediaType (IN int iPos, OUT CMediaType * pmt); - HRESULT CheckMediaType (IN const CMediaType * pmt); - STDMETHODIMP Receive (IN IMediaSample *); - HRESULT SetMatchingMediaType(const VideoCaptureCapability& capability); -}; - -class CaptureSinkFilter: public CBaseFilter -{ - -public: - CaptureSinkFilter(IN TCHAR * tszName, - IN LPUNKNOWN punk, - OUT HRESULT * phr, - VideoCaptureExternal& captureObserver); - virtual ~CaptureSinkFilter(); - - // -------------------------------------------------------------------- - // class methods - - void ProcessCapturedFrame(unsigned char* pBuffer, size_t length, - const VideoCaptureCapability& frameInfo); - // explicit receiver lock aquisition and release - void LockReceive() { m_crtRecv.Lock();} - void UnlockReceive() {m_crtRecv.Unlock();} - // explicit filter lock aquisition and release - void LockFilter() {m_crtFilter.Lock();} - void UnlockFilter() { m_crtFilter.Unlock(); } - void SetFilterGraph(IGraphBuilder* graph); // Used if EVR - - // -------------------------------------------------------------------- - // COM interfaces -DECLARE_IUNKNOWN ; - STDMETHODIMP SetMatchingMediaType(const VideoCaptureCapability& capability); - - // -------------------------------------------------------------------- - // CBaseFilter methods - int GetPinCount (); - CBasePin * GetPin ( IN int Index); - STDMETHODIMP Pause (); - STDMETHODIMP Stop (); - STDMETHODIMP GetClassID ( OUT CLSID * pCLSID); - // -------------------------------------------------------------------- - // class factory calls this - static CUnknown * CreateInstance (IN LPUNKNOWN punk, OUT HRESULT * phr); -private: - CCritSec m_crtFilter; // filter lock - CCritSec m_crtRecv; // receiver lock; always acquire before filter lock - CaptureInputPin * m_pInput; - VideoCaptureExternal& _captureObserver; -}; -} // namespace videocapturemodule -} // namespace webrtc -#endif // WEBRTC_MODULES_VIDEO_CAPTURE_MAIN_SOURCE_WINDOWS_SINK_FILTER_DS_H_ diff --git a/WebRtc.NET/include/webrtc/modules/video_capture/windows/video_capture_ds.h b/WebRtc.NET/include/webrtc/modules/video_capture/windows/video_capture_ds.h deleted file mode 100644 index 7e63e56c..00000000 --- a/WebRtc.NET/include/webrtc/modules/video_capture/windows/video_capture_ds.h +++ /dev/null @@ -1,79 +0,0 @@ -/* - * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MODULES_VIDEO_CAPTURE_MAIN_SOURCE_WINDOWS_VIDEO_CAPTURE_DS_H_ -#define WEBRTC_MODULES_VIDEO_CAPTURE_MAIN_SOURCE_WINDOWS_VIDEO_CAPTURE_DS_H_ - -#include "webrtc/modules/video_capture/video_capture_impl.h" -#include "webrtc/modules/video_capture/windows/device_info_ds.h" - -#define CAPTURE_FILTER_NAME L"VideoCaptureFilter" -#define SINK_FILTER_NAME L"SinkFilter" - -namespace webrtc -{ -namespace videocapturemodule -{ -// Forward declaraion -class CaptureSinkFilter; - -class VideoCaptureDS: public VideoCaptureImpl -{ -public: - VideoCaptureDS(); - - virtual int32_t Init(const char* deviceUniqueIdUTF8); - - /************************************************************************* - * - * Start/Stop - * - *************************************************************************/ - virtual int32_t - StartCapture(const VideoCaptureCapability& capability); - virtual int32_t StopCapture(); - - /************************************************************************** - * - * Properties of the set device - * - **************************************************************************/ - - virtual bool CaptureStarted(); - virtual int32_t CaptureSettings(VideoCaptureCapability& settings); - -protected: - virtual ~VideoCaptureDS(); - - // Help functions - - int32_t - SetCameraOutput(const VideoCaptureCapability& requestedCapability); - int32_t DisconnectGraph(); - HRESULT VideoCaptureDS::ConnectDVCamera(); - - DeviceInfoDS _dsInfo; - - IBaseFilter* _captureFilter; - IGraphBuilder* _graphBuilder; - IMediaControl* _mediaControl; - CaptureSinkFilter* _sinkFilter; - IPin* _inputSendPin; - IPin* _outputCapturePin; - - // Microsoft DV interface (external DV cameras) - IBaseFilter* _dvFilter; - IPin* _inputDvPin; - IPin* _outputDvPin; - -}; -} // namespace videocapturemodule -} // namespace webrtc -#endif // WEBRTC_MODULES_VIDEO_CAPTURE_MAIN_SOURCE_WINDOWS_VIDEO_CAPTURE_DS_H_ diff --git a/WebRtc.NET/include/webrtc/modules/video_coding/codec_database.h b/WebRtc.NET/include/webrtc/modules/video_coding/codec_database.h deleted file mode 100644 index 5a7e8756..00000000 --- a/WebRtc.NET/include/webrtc/modules/video_coding/codec_database.h +++ /dev/null @@ -1,165 +0,0 @@ -/* - * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MODULES_VIDEO_CODING_CODEC_DATABASE_H_ -#define WEBRTC_MODULES_VIDEO_CODING_CODEC_DATABASE_H_ - -#include -#include - -#include "webrtc/modules/video_coding/include/video_codec_interface.h" -#include "webrtc/modules/video_coding/include/video_coding.h" -#include "webrtc/modules/video_coding/generic_decoder.h" -#include "webrtc/modules/video_coding/generic_encoder.h" -#include "webrtc/typedefs.h" - -namespace webrtc { - -struct VCMDecoderMapItem { - public: - VCMDecoderMapItem(VideoCodec* settings, - int number_of_cores, - bool require_key_frame); - - std::unique_ptr settings; - int number_of_cores; - bool require_key_frame; -}; - -struct VCMExtDecoderMapItem { - public: - VCMExtDecoderMapItem(VideoDecoder* external_decoder_instance, - uint8_t payload_type); - - uint8_t payload_type; - VideoDecoder* external_decoder_instance; -}; - -class VCMCodecDataBase { - public: - explicit VCMCodecDataBase(VCMEncodedFrameCallback* encoded_frame_callback); - ~VCMCodecDataBase(); - - // Sender Side - // Returns the default settings for the codec with type |codec_type|. - static void Codec(VideoCodecType codec_type, VideoCodec* settings); - - // Sets the sender side codec and initiates the desired codec given the - // VideoCodec struct. - // Returns true if the codec was successfully registered, false otherwise. - bool SetSendCodec(const VideoCodec* send_codec, - int number_of_cores, - size_t max_payload_size); - - // Gets the current send codec. Relevant for internal codecs only. - // Returns true if there is a send codec, false otherwise. - bool SendCodec(VideoCodec* current_send_codec) const; - - // Gets current send side codec type. Relevant for internal codecs only. - // Returns kVideoCodecUnknown if there is no send codec. - VideoCodecType SendCodec() const; - - // Registers and initializes an external encoder object. - // |internal_source| should be set to true if the codec has an internal - // video source and doesn't need the user to provide it with frames via - // the Encode() method. - void RegisterExternalEncoder(VideoEncoder* external_encoder, - uint8_t payload_type, - bool internal_source); - - // Deregisters an external encoder. Returns true if the encoder was - // found and deregistered, false otherwise. |was_send_codec| is set to true - // if the external encoder was the send codec before being deregistered. - bool DeregisterExternalEncoder(uint8_t payload_type, bool* was_send_codec); - - VCMGenericEncoder* GetEncoder(); - - bool SetPeriodicKeyFrames(bool enable); - - // Deregisters an external decoder object specified by |payload_type|. - bool DeregisterExternalDecoder(uint8_t payload_type); - - // Registers an external decoder object to the payload type |payload_type|. - void RegisterExternalDecoder(VideoDecoder* external_decoder, - uint8_t payload_type); - - bool DecoderRegistered() const; - - bool RegisterReceiveCodec(const VideoCodec* receive_codec, - int number_of_cores, - bool require_key_frame); - - bool DeregisterReceiveCodec(uint8_t payload_type); - - // Get current receive side codec. Relevant for internal codecs only. - bool ReceiveCodec(VideoCodec* current_receive_codec) const; - - // Get current receive side codec type. Relevant for internal codecs only. - VideoCodecType ReceiveCodec() const; - - // Returns a decoder specified by |payload_type|. The decoded frame callback - // of the encoder is set to |decoded_frame_callback|. If no such decoder - // already exists an instance will be created and initialized. - // NULL is returned if no encoder with the specified payload type was found - // and the function failed to create one. - VCMGenericDecoder* GetDecoder( - const VCMEncodedFrame& frame, - VCMDecodedFrameCallback* decoded_frame_callback); - - // Deletes the memory of the decoder instance |decoder|. Used to delete - // deep copies returned by CreateDecoderCopy(). - void ReleaseDecoder(VCMGenericDecoder* decoder) const; - - // Returns true if the currently active decoder prefer to decode frames late. - // That means that frames must be decoded near the render times stamp. - bool PrefersLateDecoding() const; - - bool MatchesCurrentResolution(int width, int height) const; - - private: - typedef std::map DecoderMap; - typedef std::map ExternalDecoderMap; - - VCMGenericDecoder* CreateAndInitDecoder(const VCMEncodedFrame& frame, - VideoCodec* new_codec) const; - - // Determines whether a new codec has to be created or not. - // Checks every setting apart from maxFramerate and startBitrate. - bool RequiresEncoderReset(const VideoCodec& send_codec); - - void DeleteEncoder(); - - // Create an internal Decoder given a codec type - VCMGenericDecoder* CreateDecoder(VideoCodecType type) const; - - const VCMDecoderMapItem* FindDecoderItem(uint8_t payload_type) const; - - const VCMExtDecoderMapItem* FindExternalDecoderItem( - uint8_t payload_type) const; - - int number_of_cores_; - size_t max_payload_size_; - bool periodic_key_frames_; - bool pending_encoder_reset_; - VideoCodec send_codec_; - VideoCodec receive_codec_; - uint8_t encoder_payload_type_; - VideoEncoder* external_encoder_; - bool internal_source_; - VCMEncodedFrameCallback* const encoded_frame_callback_; - std::unique_ptr ptr_encoder_; - VCMGenericDecoder* ptr_decoder_; - DecoderMap dec_map_; - ExternalDecoderMap dec_external_map_; -}; // VCMCodecDataBase - -} // namespace webrtc - -#endif // WEBRTC_MODULES_VIDEO_CODING_CODEC_DATABASE_H_ diff --git a/WebRtc.NET/include/webrtc/modules/video_coding/codecs/h264/h264_encoder_impl.h b/WebRtc.NET/include/webrtc/modules/video_coding/codecs/h264/h264_encoder_impl.h deleted file mode 100644 index a455259b..00000000 --- a/WebRtc.NET/include/webrtc/modules/video_coding/codecs/h264/h264_encoder_impl.h +++ /dev/null @@ -1,104 +0,0 @@ -/* - * Copyright (c) 2015 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - * - */ - -#ifndef WEBRTC_MODULES_VIDEO_CODING_CODECS_H264_H264_ENCODER_IMPL_H_ -#define WEBRTC_MODULES_VIDEO_CODING_CODECS_H264_H264_ENCODER_IMPL_H_ - -#include -#include - -#include "webrtc/common_video/h264/h264_bitstream_parser.h" -#include "webrtc/modules/video_coding/codecs/h264/include/h264.h" -#include "webrtc/modules/video_coding/utility/quality_scaler.h" - -#include "third_party/openh264/src/codec/api/svc/codec_app_def.h" - -class ISVCEncoder; - -namespace webrtc { - -class H264EncoderImpl : public H264Encoder { - public: - explicit H264EncoderImpl(const cricket::VideoCodec& codec); - ~H264EncoderImpl() override; - - // |max_payload_size| is ignored. - // The following members of |codec_settings| are used. The rest are ignored. - // - codecType (must be kVideoCodecH264) - // - targetBitrate - // - maxFramerate - // - width - // - height - int32_t InitEncode(const VideoCodec* codec_settings, - int32_t number_of_cores, - size_t max_payload_size) override; - int32_t Release() override; - - int32_t RegisterEncodeCompleteCallback( - EncodedImageCallback* callback) override; - int32_t SetRateAllocation(const BitrateAllocation& bitrate_allocation, - uint32_t framerate) override; - - // The result of encoding - an EncodedImage and RTPFragmentationHeader - are - // passed to the encode complete callback. - int32_t Encode(const VideoFrame& frame, - const CodecSpecificInfo* codec_specific_info, - const std::vector* frame_types) override; - - const char* ImplementationName() const override; - - VideoEncoder::ScalingSettings GetScalingSettings() const override; - - // Unsupported / Do nothing. - int32_t SetChannelParameters(uint32_t packet_loss, int64_t rtt) override; - int32_t SetPeriodicKeyFrames(bool enable) override; - - // Exposed for testing. - H264PacketizationMode PacketizationModeForTesting() const { - return packetization_mode_; - } - - private: - bool IsInitialized() const; - SEncParamExt CreateEncoderParams() const; - - webrtc::H264BitstreamParser h264_bitstream_parser_; - // Reports statistics with histograms. - void ReportInit(); - void ReportError(); - - ISVCEncoder* openh264_encoder_; - // Settings that are used by this encoder. - int width_; - int height_; - float max_frame_rate_; - uint32_t target_bps_; - uint32_t max_bps_; - VideoCodecMode mode_; - // H.264 specifc parameters - bool frame_dropping_on_; - int key_frame_interval_; - H264PacketizationMode packetization_mode_; - - size_t max_payload_size_; - int32_t number_of_cores_; - - EncodedImage encoded_image_; - std::unique_ptr encoded_image_buffer_; - EncodedImageCallback* encoded_image_callback_; - - bool has_reported_init_; - bool has_reported_error_; -}; - -} // namespace webrtc - -#endif // WEBRTC_MODULES_VIDEO_CODING_CODECS_H264_H264_ENCODER_IMPL_H_ diff --git a/WebRtc.NET/include/webrtc/modules/video_coding/codecs/h264/include/h264.h b/WebRtc.NET/include/webrtc/modules/video_coding/codecs/h264/include/h264.h deleted file mode 100644 index 2d92473a..00000000 --- a/WebRtc.NET/include/webrtc/modules/video_coding/codecs/h264/include/h264.h +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) 2015 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - * - */ - -#ifndef WEBRTC_MODULES_VIDEO_CODING_CODECS_H264_INCLUDE_H264_H_ -#define WEBRTC_MODULES_VIDEO_CODING_CODECS_H264_INCLUDE_H264_H_ - -#include "webrtc/media/base/codec.h" -#include "webrtc/modules/video_coding/include/video_codec_interface.h" - -namespace webrtc { - -// Set to disable the H.264 encoder/decoder implementations that are provided if -// |rtc_use_h264| build flag is true (if false, this function does nothing). -// This function should only be called before or during WebRTC initialization -// and is not thread-safe. -void DisableRtcUseH264(); - -class H264Encoder : public VideoEncoder { - public: - static H264Encoder* Create(const cricket::VideoCodec& codec); - // If H.264 is supported (any implementation). - static bool IsSupported(); - - ~H264Encoder() override {} -}; - -class H264Decoder : public VideoDecoder { - public: - static H264Decoder* Create(); - static bool IsSupported(); - - ~H264Decoder() override {} -}; - -} // namespace webrtc - -#endif // WEBRTC_MODULES_VIDEO_CODING_CODECS_H264_INCLUDE_H264_H_ diff --git a/WebRtc.NET/include/webrtc/modules/video_coding/codecs/interface/mock/mock_video_codec_interface.h b/WebRtc.NET/include/webrtc/modules/video_coding/codecs/interface/mock/mock_video_codec_interface.h deleted file mode 100644 index e58da792..00000000 --- a/WebRtc.NET/include/webrtc/modules/video_coding/codecs/interface/mock/mock_video_codec_interface.h +++ /dev/null @@ -1,81 +0,0 @@ -/* - * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MODULES_VIDEO_CODING_CODECS_INTERFACE_MOCK_MOCK_VIDEO_CODEC_INTERFACE_H_ -#define WEBRTC_MODULES_VIDEO_CODING_CODECS_INTERFACE_MOCK_MOCK_VIDEO_CODEC_INTERFACE_H_ - -#pragma message("WARNING: video_coding/codecs/interface is DEPRECATED; " - "use video_coding/include") -#include -#include - -#include "webrtc/modules/video_coding/include/video_codec_interface.h" -#include "webrtc/test/gmock.h" -#include "webrtc/typedefs.h" - -namespace webrtc { - -class MockEncodedImageCallback : public EncodedImageCallback { - public: - MOCK_METHOD3(Encoded, - int32_t(const EncodedImage& encodedImage, - const CodecSpecificInfo* codecSpecificInfo, - const RTPFragmentationHeader* fragmentation)); -}; - -class MockVideoEncoder : public VideoEncoder { - public: - MOCK_CONST_METHOD2(Version, int32_t(int8_t* version, int32_t length)); - MOCK_METHOD3(InitEncode, - int32_t(const VideoCodec* codecSettings, - int32_t numberOfCores, - size_t maxPayloadSize)); - MOCK_METHOD3(Encode, - int32_t(const VideoFrame& inputImage, - const CodecSpecificInfo* codecSpecificInfo, - const std::vector* frame_types)); - MOCK_METHOD1(RegisterEncodeCompleteCallback, - int32_t(EncodedImageCallback* callback)); - MOCK_METHOD0(Release, int32_t()); - MOCK_METHOD0(Reset, int32_t()); - MOCK_METHOD2(SetChannelParameters, int32_t(uint32_t packetLoss, int64_t rtt)); - MOCK_METHOD2(SetRates, int32_t(uint32_t newBitRate, uint32_t frameRate)); - MOCK_METHOD1(SetPeriodicKeyFrames, int32_t(bool enable)); -}; - -class MockDecodedImageCallback : public DecodedImageCallback { - public: - MOCK_METHOD1(Decoded, int32_t(const VideoFrame& decodedImage)); - MOCK_METHOD2(Decoded, - int32_t(const VideoFrame& decodedImage, int64_t decode_time_ms)); - MOCK_METHOD1(ReceivedDecodedReferenceFrame, - int32_t(const uint64_t pictureId)); - MOCK_METHOD1(ReceivedDecodedFrame, int32_t(const uint64_t pictureId)); -}; - -class MockVideoDecoder : public VideoDecoder { - public: - MOCK_METHOD2(InitDecode, - int32_t(const VideoCodec* codecSettings, int32_t numberOfCores)); - MOCK_METHOD5(Decode, - int32_t(const EncodedImage& inputImage, - bool missingFrames, - const RTPFragmentationHeader* fragmentation, - const CodecSpecificInfo* codecSpecificInfo, - int64_t renderTimeMs)); - MOCK_METHOD1(RegisterDecodeCompleteCallback, - int32_t(DecodedImageCallback* callback)); - MOCK_METHOD0(Release, int32_t()); - MOCK_METHOD0(Copy, VideoDecoder*()); -}; - -} // namespace webrtc - -#endif // WEBRTC_MODULES_VIDEO_CODING_CODECS_INTERFACE_MOCK_MOCK_VIDEO_CODEC_INTERFACE_H_ diff --git a/WebRtc.NET/include/webrtc/modules/video_coding/codecs/interface/video_codec_interface.h b/WebRtc.NET/include/webrtc/modules/video_coding/codecs/interface/video_codec_interface.h deleted file mode 100644 index 98b50404..00000000 --- a/WebRtc.NET/include/webrtc/modules/video_coding/codecs/interface/video_codec_interface.h +++ /dev/null @@ -1,101 +0,0 @@ -/* - * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MODULES_VIDEO_CODING_CODECS_INTERFACE_VIDEO_CODEC_INTERFACE_H_ -#define WEBRTC_MODULES_VIDEO_CODING_CODECS_INTERFACE_VIDEO_CODEC_INTERFACE_H_ - -#pragma message("WARNING: video_coding/codecs/interface is DEPRECATED; " - "use video_coding/include") -#include - -#include "webrtc/api/video/video_frame.h" -#include "webrtc/common_types.h" -#include "webrtc/modules/include/module_common_types.h" -#include "webrtc/modules/video_coding/include/video_error_codes.h" -#include "webrtc/typedefs.h" -#include "webrtc/video_decoder.h" -#include "webrtc/video_encoder.h" - -namespace webrtc { - -class RTPFragmentationHeader; // forward declaration - -// Note: if any pointers are added to this struct, it must be fitted -// with a copy-constructor. See below. -struct CodecSpecificInfoVP8 { - bool hasReceivedSLI; - uint8_t pictureIdSLI; - bool hasReceivedRPSI; - uint64_t pictureIdRPSI; - int16_t pictureId; // Negative value to skip pictureId. - bool nonReference; - uint8_t simulcastIdx; - uint8_t temporalIdx; - bool layerSync; - int tl0PicIdx; // Negative value to skip tl0PicIdx. - int8_t keyIdx; // Negative value to skip keyIdx. -}; - -struct CodecSpecificInfoVP9 { - bool has_received_sli; - uint8_t picture_id_sli; - bool has_received_rpsi; - uint64_t picture_id_rpsi; - int16_t picture_id; // Negative value to skip pictureId. - - bool inter_pic_predicted; // This layer frame is dependent on previously - // coded frame(s). - bool flexible_mode; - bool ss_data_available; - - int tl0_pic_idx; // Negative value to skip tl0PicIdx. - uint8_t temporal_idx; - uint8_t spatial_idx; - bool temporal_up_switch; - bool inter_layer_predicted; // Frame is dependent on directly lower spatial - // layer frame. - uint8_t gof_idx; - - // SS data. - size_t num_spatial_layers; // Always populated. - bool spatial_layer_resolution_present; - uint16_t width[kMaxVp9NumberOfSpatialLayers]; - uint16_t height[kMaxVp9NumberOfSpatialLayers]; - GofInfoVP9 gof; - - // Frame reference data. - uint8_t num_ref_pics; - uint8_t p_diff[kMaxVp9RefPics]; -}; - -struct CodecSpecificInfoGeneric { - uint8_t simulcast_idx; -}; - -struct CodecSpecificInfoH264 {}; - -union CodecSpecificInfoUnion { - CodecSpecificInfoGeneric generic; - CodecSpecificInfoVP8 VP8; - CodecSpecificInfoVP9 VP9; - CodecSpecificInfoH264 H264; -}; - -// Note: if any pointers are added to this struct or its sub-structs, it -// must be fitted with a copy-constructor. This is because it is copied -// in the copy-constructor of VCMEncodedFrame. -struct CodecSpecificInfo { - VideoCodecType codecType; - CodecSpecificInfoUnion codecSpecific; -}; - -} // namespace webrtc - -#endif // WEBRTC_MODULES_VIDEO_CODING_CODECS_INTERFACE_VIDEO_CODEC_INTERFACE_H_ diff --git a/WebRtc.NET/include/webrtc/modules/video_coding/codecs/interface/video_error_codes.h b/WebRtc.NET/include/webrtc/modules/video_coding/codecs/interface/video_error_codes.h deleted file mode 100644 index ea8829df..00000000 --- a/WebRtc.NET/include/webrtc/modules/video_coding/codecs/interface/video_error_codes.h +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MODULES_VIDEO_CODING_CODECS_INTERFACE_VIDEO_ERROR_CODES_H_ -#define WEBRTC_MODULES_VIDEO_CODING_CODECS_INTERFACE_VIDEO_ERROR_CODES_H_ - -#pragma message("WARNING: video_coding/codecs/interface is DEPRECATED; " - "use video_coding/include") - -// NOTE: in sync with video_coding_module_defines.h - -// Define return values - -#define WEBRTC_VIDEO_CODEC_REQUEST_SLI 2 -#define WEBRTC_VIDEO_CODEC_NO_OUTPUT 1 -#define WEBRTC_VIDEO_CODEC_OK 0 -#define WEBRTC_VIDEO_CODEC_ERROR -1 -#define WEBRTC_VIDEO_CODEC_LEVEL_EXCEEDED -2 -#define WEBRTC_VIDEO_CODEC_MEMORY -3 -#define WEBRTC_VIDEO_CODEC_ERR_PARAMETER -4 -#define WEBRTC_VIDEO_CODEC_ERR_SIZE -5 -#define WEBRTC_VIDEO_CODEC_TIMEOUT -6 -#define WEBRTC_VIDEO_CODEC_UNINITIALIZED -7 -#define WEBRTC_VIDEO_CODEC_ERR_REQUEST_SLI -12 -#define WEBRTC_VIDEO_CODEC_FALLBACK_SOFTWARE -13 -#define WEBRTC_VIDEO_CODEC_TARGET_BITRATE_OVERSHOOT -14 - -#endif // WEBRTC_MODULES_VIDEO_CODING_CODECS_INTERFACE_VIDEO_ERROR_CODES_H_ diff --git a/WebRtc.NET/include/webrtc/modules/video_coding/codecs/test/mock/mock_packet_manipulator.h b/WebRtc.NET/include/webrtc/modules/video_coding/codecs/test/mock/mock_packet_manipulator.h deleted file mode 100644 index 4096a932..00000000 --- a/WebRtc.NET/include/webrtc/modules/video_coding/codecs/test/mock/mock_packet_manipulator.h +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MODULES_VIDEO_CODING_CODECS_TEST_MOCK_MOCK_PACKET_MANIPULATOR_H_ -#define WEBRTC_MODULES_VIDEO_CODING_CODECS_TEST_MOCK_MOCK_PACKET_MANIPULATOR_H_ - -#include "webrtc/modules/video_coding/codecs/test/packet_manipulator.h" - -#include - -#include "webrtc/test/gmock.h" -#include "webrtc/typedefs.h" -#include "webrtc/video_frame.h" - -namespace webrtc { -namespace test { - -class MockPacketManipulator : public PacketManipulator { - public: - MOCK_METHOD1(ManipulatePackets, int(webrtc::EncodedImage* encoded_image)); -}; - -} // namespace test -} // namespace webrtc - -#endif // WEBRTC_MODULES_VIDEO_CODING_CODECS_TEST_MOCK_MOCK_PACKET_MANIPULATOR_H_ diff --git a/WebRtc.NET/include/webrtc/modules/video_coding/codecs/test/packet_manipulator.h b/WebRtc.NET/include/webrtc/modules/video_coding/codecs/test/packet_manipulator.h deleted file mode 100644 index 3334be07..00000000 --- a/WebRtc.NET/include/webrtc/modules/video_coding/codecs/test/packet_manipulator.h +++ /dev/null @@ -1,115 +0,0 @@ -/* - * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MODULES_VIDEO_CODING_CODECS_TEST_PACKET_MANIPULATOR_H_ -#define WEBRTC_MODULES_VIDEO_CODING_CODECS_TEST_PACKET_MANIPULATOR_H_ - -#include - -#include "webrtc/modules/video_coding/include/video_codec_interface.h" -#include "webrtc/system_wrappers/include/critical_section_wrapper.h" -#include "webrtc/test/testsupport/packet_reader.h" - -namespace webrtc { -namespace test { - -// Which mode the packet loss shall be performed according to. -enum PacketLossMode { - // Drops packets with a configured probability independently for each packet - kUniform, - // Drops packets similar to uniform but when a packet is being dropped, - // the number of lost packets in a row is equal to the configured burst - // length. - kBurst -}; -// Returns a string representation of the enum value. -const char* PacketLossModeToStr(PacketLossMode e); - -// Contains configurations related to networking and simulation of -// scenarios caused by network interference. -struct NetworkingConfig { - NetworkingConfig() - : packet_size_in_bytes(1500), - max_payload_size_in_bytes(1440), - packet_loss_mode(kUniform), - packet_loss_probability(0.0), - packet_loss_burst_length(1) {} - - // Packet size in bytes. Default: 1500 bytes. - size_t packet_size_in_bytes; - - // Encoder specific setting of maximum size in bytes of each payload. - // Default: 1440 bytes. - size_t max_payload_size_in_bytes; - - // Packet loss mode. Two different packet loss models are supported: - // uniform or burst. This setting has no effect unless - // packet_loss_probability is >0. - // Default: uniform. - PacketLossMode packet_loss_mode; - - // Packet loss probability. A value between 0.0 and 1.0 that defines the - // probability of a packet being lost. 0.1 means 10% and so on. - // Default: 0 (no loss). - double packet_loss_probability; - - // Packet loss burst length. Defines how many packets will be lost in a burst - // when a packet has been decided to be lost. Must be >=1. Default: 1. - int packet_loss_burst_length; -}; - -// Class for simulating packet loss on the encoded frame data. -// When a packet loss has occurred in a frame, the remaining data in that -// frame is lost (even if burst length is only a single packet). -// TODO(kjellander): Support discarding only individual packets in the frame -// when CL 172001 has been submitted. This also requires a correct -// fragmentation header to be passed to the decoder. -// -// To get a repeatable packet drop pattern, re-initialize the random seed -// using InitializeRandomSeed before each test run. -class PacketManipulator { - public: - virtual ~PacketManipulator() {} - - // Manipulates the data of the encoded_image to simulate parts being lost - // during transport. - // If packets are dropped from frame data, the completedFrame field will be - // set to false. - // Returns the number of packets being dropped. - virtual int ManipulatePackets(webrtc::EncodedImage* encoded_image) = 0; -}; - -class PacketManipulatorImpl : public PacketManipulator { - public: - PacketManipulatorImpl(PacketReader* packet_reader, - const NetworkingConfig& config, - bool verbose); - virtual ~PacketManipulatorImpl(); - int ManipulatePackets(webrtc::EncodedImage* encoded_image) override; - virtual void InitializeRandomSeed(unsigned int seed); - - protected: - // Returns a uniformly distributed random value between 0.0 and 1.0 - virtual double RandomUniform(); - - private: - PacketReader* packet_reader_; - const NetworkingConfig& config_; - // Used to simulate a burst over several frames. - int active_burst_packets_; - CriticalSectionWrapper* critsect_; - unsigned int random_seed_; - bool verbose_; -}; - -} // namespace test -} // namespace webrtc - -#endif // WEBRTC_MODULES_VIDEO_CODING_CODECS_TEST_PACKET_MANIPULATOR_H_ diff --git a/WebRtc.NET/include/webrtc/modules/video_coding/codecs/test/predictive_packet_manipulator.h b/WebRtc.NET/include/webrtc/modules/video_coding/codecs/test/predictive_packet_manipulator.h deleted file mode 100644 index 45c7848c..00000000 --- a/WebRtc.NET/include/webrtc/modules/video_coding/codecs/test/predictive_packet_manipulator.h +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MODULES_VIDEO_CODING_CODECS_TEST_PREDICTIVE_PACKET_MANIPULATOR_H_ -#define WEBRTC_MODULES_VIDEO_CODING_CODECS_TEST_PREDICTIVE_PACKET_MANIPULATOR_H_ - -#include - -#include "webrtc/modules/video_coding/codecs/test/packet_manipulator.h" -#include "webrtc/test/testsupport/packet_reader.h" - -namespace webrtc { -namespace test { - -// Predictive packet manipulator that allows for setup of the result of -// the random invocations. -class PredictivePacketManipulator : public PacketManipulatorImpl { - public: - PredictivePacketManipulator(PacketReader* packet_reader, - const NetworkingConfig& config); - virtual ~PredictivePacketManipulator(); - // Adds a result. You must add at least the same number of results as the - // expected calls to the RandomUniform method. The results are added to a - // FIFO queue so they will be returned in the same order they were added. - // Result parameter must be 0.0 to 1.0. - void AddRandomResult(double result); - - protected: - // Returns a uniformly distributed random value between 0.0 and 1.0 - double RandomUniform() override; - - private: - std::queue random_results_; -}; - -} // namespace test -} // namespace webrtc - -#endif // WEBRTC_MODULES_VIDEO_CODING_CODECS_TEST_PREDICTIVE_PACKET_MANIPULATOR_H_ diff --git a/WebRtc.NET/include/webrtc/modules/video_coding/codecs/test/stats.h b/WebRtc.NET/include/webrtc/modules/video_coding/codecs/test/stats.h deleted file mode 100644 index 9092631c..00000000 --- a/WebRtc.NET/include/webrtc/modules/video_coding/codecs/test/stats.h +++ /dev/null @@ -1,70 +0,0 @@ -/* - * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MODULES_VIDEO_CODING_CODECS_TEST_STATS_H_ -#define WEBRTC_MODULES_VIDEO_CODING_CODECS_TEST_STATS_H_ - -#include - -#include "webrtc/common_video/include/video_image.h" - -namespace webrtc { -namespace test { - -// Contains statistics of a single frame that has been processed. -struct FrameStatistic { - FrameStatistic(); - - bool encoding_successful; - bool decoding_successful; - int encode_return_code; - int decode_return_code; - int encode_time_in_us; - int decode_time_in_us; - int frame_number; - // How many packets were discarded of the encoded frame data (if any). - int packets_dropped; - size_t total_packets; - - // Current bit rate. Calculated out of the size divided with the time - // interval per frame. - int bit_rate_in_kbps; - - // Copied from EncodedImage - size_t encoded_frame_length_in_bytes; - webrtc::FrameType frame_type; -}; - -// Handles statistics from a single video processing run. -// Contains calculation methods for interesting metrics from these stats. -class Stats { - public: - typedef std::vector::iterator FrameStatisticsIterator; - - Stats(); - virtual ~Stats(); - - // Add a new statistic data object. - // The frame number must be incrementing and start at zero in order to use - // it as an index for the frame_statistics_ vector. - // Returns the newly created statistic object. - FrameStatistic& NewFrame(int frame_number); - - // Prints a summary of all the statistics that have been gathered during the - // processing - void PrintSummary(); - - std::vector stats_; -}; - -} // namespace test -} // namespace webrtc - -#endif // WEBRTC_MODULES_VIDEO_CODING_CODECS_TEST_STATS_H_ diff --git a/WebRtc.NET/include/webrtc/modules/video_coding/codecs/test/videoprocessor.h b/WebRtc.NET/include/webrtc/modules/video_coding/codecs/test/videoprocessor.h deleted file mode 100644 index a217b113..00000000 --- a/WebRtc.NET/include/webrtc/modules/video_coding/codecs/test/videoprocessor.h +++ /dev/null @@ -1,262 +0,0 @@ -/* - * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MODULES_VIDEO_CODING_CODECS_TEST_VIDEOPROCESSOR_H_ -#define WEBRTC_MODULES_VIDEO_CODING_CODECS_TEST_VIDEOPROCESSOR_H_ - -#include -#include - -#include "webrtc/api/video/video_frame.h" -#include "webrtc/base/checks.h" -#include "webrtc/common_video/libyuv/include/webrtc_libyuv.h" -#include "webrtc/modules/video_coding/include/video_codec_interface.h" -#include "webrtc/modules/video_coding/codecs/test/packet_manipulator.h" -#include "webrtc/modules/video_coding/codecs/test/stats.h" -#include "webrtc/test/testsupport/frame_reader.h" -#include "webrtc/test/testsupport/frame_writer.h" - -namespace webrtc { - -class VideoBitrateAllocator; - -namespace test { - -// Defines which frame types shall be excluded from packet loss and when. -enum ExcludeFrameTypes { - // Will exclude the first keyframe in the video sequence from packet loss. - // Following keyframes will be targeted for packet loss. - kExcludeOnlyFirstKeyFrame, - // Exclude all keyframes from packet loss, no matter where in the video - // sequence they occur. - kExcludeAllKeyFrames -}; -// Returns a string representation of the enum value. -const char* ExcludeFrameTypesToStr(ExcludeFrameTypes e); - -// Test configuration for a test run -struct TestConfig { - TestConfig(); - ~TestConfig(); - - // Name of the test. This is purely metadata and does not affect - // the test in any way. - std::string name; - - // More detailed description of the test. This is purely metadata and does - // not affect the test in any way. - std::string description; - - // Number of this test. Useful if multiple runs of the same test with - // different configurations shall be managed. - int test_number; - - // File to process for the test. This must be a video file in the YUV format. - std::string input_filename; - - // File to write to during processing for the test. Will be a video file - // in the YUV format. - std::string output_filename; - - // Path to the directory where encoded files will be put - // (absolute or relative to the executable). Default: "out". - std::string output_dir; - - // Configurations related to networking. - NetworkingConfig networking_config; - - // Decides how the packet loss simulations shall exclude certain frames - // from packet loss. Default: kExcludeOnlyFirstKeyFrame. - ExcludeFrameTypes exclude_frame_types; - - // The length of a single frame of the input video file. This value is - // calculated out of the width and height according to the video format - // specification. Must be set before processing. - size_t frame_length_in_bytes; - - // Force the encoder and decoder to use a single core for processing. - // Using a single core is necessary to get a deterministic behavior for the - // encoded frames - using multiple cores will produce different encoded frames - // since multiple cores are competing to consume the byte budget for each - // frame in parallel. - // If set to false, the maximum number of available cores will be used. - // Default: false. - bool use_single_core; - - // If set to a value >0 this setting forces the encoder to create a keyframe - // every Nth frame. Note that the encoder may create a keyframe in other - // locations in addition to the interval that is set using this parameter. - // Forcing key frames may also affect encoder planning optimizations in - // a negative way, since it will suddenly be forced to produce an expensive - // key frame. - // Default: 0. - int keyframe_interval; - - // The codec settings to use for the test (target bitrate, video size, - // framerate and so on). This struct must be created and filled in using - // the VideoCodingModule::Codec() method. - webrtc::VideoCodec* codec_settings; - - // If printing of information to stdout shall be performed during processing. - bool verbose; -}; - -// Handles encoding/decoding of video using the VideoEncoder/VideoDecoder -// interfaces. This is done in a sequential manner in order to be able to -// measure times properly. -// The class processes a frame at the time for the configured input file. -// It maintains state of where in the source input file the processing is at. -// -// Regarding packet loss: Note that keyframes are excluded (first or all -// depending on the ExcludeFrameTypes setting). This is because if key frames -// would be altered, all the following delta frames would be pretty much -// worthless. VP8 has an error-resilience feature that makes it able to handle -// packet loss in key non-first keyframes, which is why only the first is -// excluded by default. -// Packet loss in such important frames is handled on a higher level in the -// Video Engine, where signaling would request a retransmit of the lost packets, -// since they're so important. -// -// Note this class is not thread safe in any way and is meant for simple testing -// purposes. -class VideoProcessor { - public: - virtual ~VideoProcessor() {} - - // Performs initial calculations about frame size, sets up callbacks etc. - // Returns false if an error has occurred, in addition to printing to stderr. - virtual bool Init() = 0; - - // Processes a single frame. Returns true as long as there's more frames - // available in the source clip. - // Frame number must be an integer >=0. - virtual bool ProcessFrame(int frame_number) = 0; - - // Updates the encoder with the target bit rate and the frame rate. - virtual void SetRates(int bit_rate, int frame_rate) = 0; - - // Return the size of the encoded frame in bytes. Dropped frames by the - // encoder are regarded as zero size. - virtual size_t EncodedFrameSize() = 0; - - // Return the encoded frame type (key or delta). - virtual FrameType EncodedFrameType() = 0; - - // Return the number of dropped frames. - virtual int NumberDroppedFrames() = 0; - - // Return the number of spatial resizes. - virtual int NumberSpatialResizes() = 0; -}; - -class VideoProcessorImpl : public VideoProcessor { - public: - VideoProcessorImpl(webrtc::VideoEncoder* encoder, - webrtc::VideoDecoder* decoder, - FrameReader* frame_reader, - FrameWriter* frame_writer, - PacketManipulator* packet_manipulator, - const TestConfig& config, - Stats* stats); - virtual ~VideoProcessorImpl(); - bool Init() override; - bool ProcessFrame(int frame_number) override; - - private: - // Invoked by the callback when a frame has completed encoding. - void FrameEncoded(webrtc::VideoCodecType codec, - const webrtc::EncodedImage& encodedImage, - const webrtc::RTPFragmentationHeader* fragmentation); - // Invoked by the callback when a frame has completed decoding. - void FrameDecoded(const webrtc::VideoFrame& image); - // Used for getting a 32-bit integer representing time - // (checks the size is within signed 32-bit bounds before casting it) - int GetElapsedTimeMicroseconds(int64_t start, int64_t stop); - // Updates the encoder with the target bit rate and the frame rate. - void SetRates(int bit_rate, int frame_rate) override; - // Return the size of the encoded frame in bytes. - size_t EncodedFrameSize() override; - // Return the encoded frame type (key or delta). - FrameType EncodedFrameType() override; - // Return the number of dropped frames. - int NumberDroppedFrames() override; - // Return the number of spatial resizes. - int NumberSpatialResizes() override; - - webrtc::VideoEncoder* encoder_; - webrtc::VideoDecoder* decoder_; - std::unique_ptr bitrate_allocator_; - FrameReader* frame_reader_; - FrameWriter* frame_writer_; - PacketManipulator* packet_manipulator_; - const TestConfig& config_; - Stats* stats_; - - EncodedImageCallback* encode_callback_; - DecodedImageCallback* decode_callback_; - // Keep track of the last successful frame, since we need to write that - // when decoding fails: - uint8_t* last_successful_frame_buffer_; - // To keep track of if we have excluded the first key frame from packet loss: - bool first_key_frame_has_been_excluded_; - // To tell the decoder previous frame have been dropped due to packet loss: - bool last_frame_missing_; - // If Init() has executed successfully. - bool initialized_; - size_t encoded_frame_size_; - FrameType encoded_frame_type_; - int prev_time_stamp_; - int num_dropped_frames_; - int num_spatial_resizes_; - int last_encoder_frame_width_; - int last_encoder_frame_height_; - - // Statistics - double bit_rate_factor_; // multiply frame length with this to get bit rate - int64_t encode_start_ns_; - int64_t decode_start_ns_; - - // Callback class required to implement according to the VideoEncoder API. - class VideoProcessorEncodeCompleteCallback - : public webrtc::EncodedImageCallback { - public: - explicit VideoProcessorEncodeCompleteCallback(VideoProcessorImpl* vp) - : video_processor_(vp) {} - Result OnEncodedImage( - const webrtc::EncodedImage& encoded_image, - const webrtc::CodecSpecificInfo* codec_specific_info, - const webrtc::RTPFragmentationHeader* fragmentation) override; - - private: - VideoProcessorImpl* video_processor_; - }; - - // Callback class required to implement according to the VideoDecoder API. - class VideoProcessorDecodeCompleteCallback - : public webrtc::DecodedImageCallback { - public: - explicit VideoProcessorDecodeCompleteCallback(VideoProcessorImpl* vp) - : video_processor_(vp) {} - int32_t Decoded(webrtc::VideoFrame& image) override; - int32_t Decoded(webrtc::VideoFrame& image, - int64_t decode_time_ms) override { - RTC_NOTREACHED(); - return -1; - } - - private: - VideoProcessorImpl* video_processor_; - }; -}; - -} // namespace test -} // namespace webrtc - -#endif // WEBRTC_MODULES_VIDEO_CODING_CODECS_TEST_VIDEOPROCESSOR_H_ diff --git a/WebRtc.NET/include/webrtc/modules/video_coding/codecs/vp8/default_temporal_layers.h b/WebRtc.NET/include/webrtc/modules/video_coding/codecs/vp8/default_temporal_layers.h deleted file mode 100644 index 0cd0b064..00000000 --- a/WebRtc.NET/include/webrtc/modules/video_coding/codecs/vp8/default_temporal_layers.h +++ /dev/null @@ -1,98 +0,0 @@ -/* Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. -* -* Use of this source code is governed by a BSD-style license -* that can be found in the LICENSE file in the root of the source -* tree. An additional intellectual property rights grant can be found -* in the file PATENTS. All contributing project authors may -* be found in the AUTHORS file in the root of the source tree. -*/ -/* -* This file defines classes for doing temporal layers with VP8. -*/ -#ifndef WEBRTC_MODULES_VIDEO_CODING_CODECS_VP8_DEFAULT_TEMPORAL_LAYERS_H_ -#define WEBRTC_MODULES_VIDEO_CODING_CODECS_VP8_DEFAULT_TEMPORAL_LAYERS_H_ - -#include - -#include "webrtc/modules/video_coding/codecs/vp8/temporal_layers.h" - -#include "webrtc/base/optional.h" - -namespace webrtc { - -class DefaultTemporalLayers : public TemporalLayers { - public: - DefaultTemporalLayers(int number_of_temporal_layers, - uint8_t initial_tl0_pic_idx); - virtual ~DefaultTemporalLayers() {} - - // Returns the recommended VP8 encode flags needed. May refresh the decoder - // and/or update the reference buffers. - int EncodeFlags(uint32_t timestamp) override; - - // Update state based on new bitrate target and incoming framerate. - // Returns the bitrate allocation for the active temporal layers. - std::vector OnRatesUpdated(int bitrate_kbps, - int max_bitrate_kbps, - int framerate) override; - - bool UpdateConfiguration(vpx_codec_enc_cfg_t* cfg) override; - - void PopulateCodecSpecific(bool base_layer_sync, - CodecSpecificInfoVP8* vp8_info, - uint32_t timestamp) override; - - void FrameEncoded(unsigned int size, uint32_t timestamp, int qp) override {} - - int CurrentLayerId() const override; - - private: - enum TemporalReferences { - // For 1 layer case: reference all (last, golden, and alt ref), but only - // update last. - kTemporalUpdateLastRefAll = 12, - // First base layer frame for 3 temporal layers, which updates last and - // golden with alt ref dependency. - kTemporalUpdateLastAndGoldenRefAltRef = 11, - // First enhancement layer with alt ref dependency. - kTemporalUpdateGoldenRefAltRef = 10, - // First enhancement layer with alt ref dependency. - kTemporalUpdateGoldenWithoutDependencyRefAltRef = 9, - // Base layer with alt ref dependency. - kTemporalUpdateLastRefAltRef = 8, - // Highest enhacement layer without dependency on golden with alt ref - // dependency. - kTemporalUpdateNoneNoRefGoldenRefAltRef = 7, - // Second layer and last frame in cycle, for 2 layers. - kTemporalUpdateNoneNoRefAltref = 6, - // Highest enhancement layer. - kTemporalUpdateNone = 5, - // Second enhancement layer. - kTemporalUpdateAltref = 4, - // Second enhancement layer without dependency on previous frames in - // the second enhancement layer. - kTemporalUpdateAltrefWithoutDependency = 3, - // First enhancement layer. - kTemporalUpdateGolden = 2, - // First enhancement layer without dependency on previous frames in - // the first enhancement layer. - kTemporalUpdateGoldenWithoutDependency = 1, - // Base layer. - kTemporalUpdateLast = 0, - }; - enum { kMaxTemporalPattern = 16 }; - - const int number_of_temporal_layers_; - int temporal_ids_length_; - int temporal_ids_[kMaxTemporalPattern]; - int temporal_pattern_length_; - TemporalReferences temporal_pattern_[kMaxTemporalPattern]; - uint8_t tl0_pic_idx_; - uint8_t pattern_idx_; - uint32_t timestamp_; - bool last_base_layer_sync_; - rtc::Optional> new_bitrates_kbps_; -}; - -} // namespace webrtc -#endif // WEBRTC_MODULES_VIDEO_CODING_CODECS_VP8_DEFAULT_TEMPORAL_LAYERS_H_ diff --git a/WebRtc.NET/include/webrtc/modules/video_coding/codecs/vp8/include/vp8.h b/WebRtc.NET/include/webrtc/modules/video_coding/codecs/vp8/include/vp8.h deleted file mode 100644 index dd351423..00000000 --- a/WebRtc.NET/include/webrtc/modules/video_coding/codecs/vp8/include/vp8.h +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - * - * WEBRTC VP8 wrapper interface - */ - -#ifndef WEBRTC_MODULES_VIDEO_CODING_CODECS_VP8_INCLUDE_VP8_H_ -#define WEBRTC_MODULES_VIDEO_CODING_CODECS_VP8_INCLUDE_VP8_H_ - -#include "webrtc/modules/video_coding/include/video_codec_interface.h" - -namespace webrtc { - -class VP8Encoder : public VideoEncoder { - public: - static VP8Encoder* Create(); - - virtual ~VP8Encoder() {} -}; // end of VP8Encoder class - -class VP8Decoder : public VideoDecoder { - public: - static VP8Decoder* Create(); - - virtual ~VP8Decoder() {} -}; // end of VP8Decoder class -} // namespace webrtc - -#endif // WEBRTC_MODULES_VIDEO_CODING_CODECS_VP8_INCLUDE_VP8_H_ diff --git a/WebRtc.NET/include/webrtc/modules/video_coding/codecs/vp8/include/vp8_common_types.h b/WebRtc.NET/include/webrtc/modules/video_coding/codecs/vp8/include/vp8_common_types.h deleted file mode 100644 index 7a27e442..00000000 --- a/WebRtc.NET/include/webrtc/modules/video_coding/codecs/vp8/include/vp8_common_types.h +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MODULES_VIDEO_CODING_CODECS_VP8_INCLUDE_VP8_COMMON_TYPES_H_ -#define WEBRTC_MODULES_VIDEO_CODING_CODECS_VP8_INCLUDE_VP8_COMMON_TYPES_H_ - -#include "webrtc/common_types.h" - -namespace webrtc { - -// Ratio allocation between temporal streams: -// Values as required for the VP8 codec (accumulating). -static const float - kVp8LayerRateAlloction[kMaxTemporalStreams][kMaxTemporalStreams] = { - {1.0f, 1.0f, 1.0f, 1.0f}, // 1 layer - {0.6f, 1.0f, 1.0f, 1.0f}, // 2 layers {60%, 40%} - {0.4f, 0.6f, 1.0f, 1.0f}, // 3 layers {40%, 20%, 40%} - {0.25f, 0.4f, 0.6f, 1.0f} // 4 layers {25%, 15%, 20%, 40%} -}; - -} // namespace webrtc -#endif // WEBRTC_MODULES_VIDEO_CODING_CODECS_VP8_INCLUDE_VP8_COMMON_TYPES_H_ diff --git a/WebRtc.NET/include/webrtc/modules/video_coding/codecs/vp8/reference_picture_selection.h b/WebRtc.NET/include/webrtc/modules/video_coding/codecs/vp8/reference_picture_selection.h deleted file mode 100644 index 51acc4c1..00000000 --- a/WebRtc.NET/include/webrtc/modules/video_coding/codecs/vp8/reference_picture_selection.h +++ /dev/null @@ -1,76 +0,0 @@ -/* - * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -/* - * This file defines classes for doing reference picture selection, primarily - * with VP8. - */ - -#ifndef WEBRTC_MODULES_VIDEO_CODING_CODECS_REFERENCE_PICTURE_SELECTION_H_ -#define WEBRTC_MODULES_VIDEO_CODING_CODECS_REFERENCE_PICTURE_SELECTION_H_ - -#include "webrtc/typedefs.h" - -namespace webrtc { - -class ReferencePictureSelection { - public: - ReferencePictureSelection(); - void Init(); - - // Report a received reference picture selection indication. This will - // introduce a new established reference if the received RPSI isn't too late. - void ReceivedRPSI(int rpsi_picture_id); - - // Report a received slice loss indication. Returns true if a refresh frame - // must be sent to the receiver, which is accomplished by only predicting - // from the established reference. - // |now_ts| is the RTP timestamp corresponding to the current time. Typically - // the capture timestamp of the frame currently being processed. - // Returns true if it's time to encode a decoder refresh, otherwise false. - bool ReceivedSLI(uint32_t now_ts); - - // Returns the recommended VP8 encode flags needed. May refresh the decoder - // and/or update the reference buffers. - // |picture_id| picture id of the frame to be encoded. - // |send_refresh| should be set to true if a decoder refresh should be - // encoded, otherwise false. - // |now_ts| is the RTP timestamp corresponding to the current time. Typically - // the capture timestamp of the frame currently being processed. - // Returns the flags to be given to the libvpx encoder when encoding the next - // frame. - int EncodeFlags(int picture_id, bool send_refresh, uint32_t now_ts); - - // Notify the RPS that the frame with picture id |picture_id| was encoded as - // a key frame, effectively updating all reference buffers. - void EncodedKeyFrame(int picture_id); - - // Set the round-trip time between the sender and the receiver to |rtt| - // milliseconds. - void SetRtt(int64_t rtt); - - private: - static int64_t TimestampDiff(uint32_t new_ts, uint32_t old_ts); - - const double kRttConfidence; - - bool update_golden_next_; - bool established_golden_; - bool received_ack_; - int last_sent_ref_picture_id_; - uint32_t last_sent_ref_update_time_; - int established_ref_picture_id_; - uint32_t last_refresh_time_; - int64_t rtt_; -}; - -} // namespace webrtc - -#endif // WEBRTC_MODULES_VIDEO_CODING_CODECS_REFERENCE_PICTURE_SELECTION_H_ diff --git a/WebRtc.NET/include/webrtc/modules/video_coding/codecs/vp8/screenshare_layers.h b/WebRtc.NET/include/webrtc/modules/video_coding/codecs/vp8/screenshare_layers.h deleted file mode 100644 index de7665ca..00000000 --- a/WebRtc.NET/include/webrtc/modules/video_coding/codecs/vp8/screenshare_layers.h +++ /dev/null @@ -1,127 +0,0 @@ -/* Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. -* -* Use of this source code is governed by a BSD-style license -* that can be found in the LICENSE file in the root of the source -* tree. An additional intellectual property rights grant can be found -* in the file PATENTS. All contributing project authors may -* be found in the AUTHORS file in the root of the source tree. -*/ -#ifndef WEBRTC_MODULES_VIDEO_CODING_CODECS_VP8_SCREENSHARE_LAYERS_H_ -#define WEBRTC_MODULES_VIDEO_CODING_CODECS_VP8_SCREENSHARE_LAYERS_H_ - -#include - -#include "webrtc/base/rate_statistics.h" -#include "webrtc/base/timeutils.h" -#include "webrtc/modules/video_coding/codecs/vp8/temporal_layers.h" -#include "webrtc/modules/video_coding/utility/frame_dropper.h" -#include "webrtc/typedefs.h" - -namespace webrtc { - -struct CodecSpecificInfoVP8; -class Clock; - -class ScreenshareLayers : public TemporalLayers { - public: - static const double kMaxTL0FpsReduction; - static const double kAcceptableTargetOvershoot; - static const int kTl0Flags; - static const int kTl1Flags; - static const int kTl1SyncFlags; - static const int kMaxFrameIntervalMs; - - ScreenshareLayers(int num_temporal_layers, - uint8_t initial_tl0_pic_idx, - Clock* clock); - virtual ~ScreenshareLayers(); - - // Returns the recommended VP8 encode flags needed. May refresh the decoder - // and/or update the reference buffers. - int EncodeFlags(uint32_t timestamp) override; - - // Update state based on new bitrate target and incoming framerate. - // Returns the bitrate allocation for the active temporal layers. - std::vector OnRatesUpdated(int bitrate_kbps, - int max_bitrate_kbps, - int framerate) override; - - // Update the encoder configuration with target bitrates or other parameters. - // Returns true iff the configuration was actually modified. - bool UpdateConfiguration(vpx_codec_enc_cfg_t* cfg) override; - - void PopulateCodecSpecific(bool base_layer_sync, - CodecSpecificInfoVP8* vp8_info, - uint32_t timestamp) override; - - void FrameEncoded(unsigned int size, uint32_t timestamp, int qp) override; - - int CurrentLayerId() const override; - - private: - bool TimeToSync(int64_t timestamp) const; - uint32_t GetCodecTargetBitrateKbps() const; - - Clock* const clock_; - - int number_of_temporal_layers_; - bool last_base_layer_sync_; - uint8_t tl0_pic_idx_; - int active_layer_; - int64_t last_timestamp_; - int64_t last_sync_timestamp_; - int64_t last_emitted_tl0_timestamp_; - rtc::TimestampWrapAroundHandler time_wrap_handler_; - int min_qp_; - int max_qp_; - uint32_t max_debt_bytes_; - - // Configured max framerate. - rtc::Optional target_framerate_; - // Incoming framerate from capturer. - rtc::Optional capture_framerate_; - // Tracks what framerate we actually encode, and drops frames on overshoot. - RateStatistics encode_framerate_; - bool bitrate_updated_; - - static const int kMaxNumTemporalLayers = 2; - struct TemporalLayer { - TemporalLayer() - : state(State::kNormal), - enhanced_max_qp(-1), - last_qp(-1), - debt_bytes_(0), - target_rate_kbps_(0) {} - - enum class State { - kNormal, - kDropped, - kReencoded, - kQualityBoost, - } state; - - int enhanced_max_qp; - int last_qp; - uint32_t debt_bytes_; - uint32_t target_rate_kbps_; - - void UpdateDebt(int64_t delta_ms); - } layers_[kMaxNumTemporalLayers]; - - void UpdateHistograms(); - // Data for histogram statistics. - struct Stats { - int64_t first_frame_time_ms_ = -1; - int64_t num_tl0_frames_ = 0; - int64_t num_tl1_frames_ = 0; - int64_t num_dropped_frames_ = 0; - int64_t num_overshoots_ = 0; - int64_t tl0_qp_sum_ = 0; - int64_t tl1_qp_sum_ = 0; - int64_t tl0_target_bitrate_sum_ = 0; - int64_t tl1_target_bitrate_sum_ = 0; - } stats_; -}; -} // namespace webrtc - -#endif // WEBRTC_MODULES_VIDEO_CODING_CODECS_VP8_SCREENSHARE_LAYERS_H_ diff --git a/WebRtc.NET/include/webrtc/modules/video_coding/codecs/vp8/simulcast_encoder_adapter.h b/WebRtc.NET/include/webrtc/modules/video_coding/codecs/vp8/simulcast_encoder_adapter.h deleted file mode 100644 index 2be8779d..00000000 --- a/WebRtc.NET/include/webrtc/modules/video_coding/codecs/vp8/simulcast_encoder_adapter.h +++ /dev/null @@ -1,115 +0,0 @@ -/* - * Copyright (c) 2014 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - * - */ - -#ifndef WEBRTC_MODULES_VIDEO_CODING_CODECS_VP8_SIMULCAST_ENCODER_ADAPTER_H_ -#define WEBRTC_MODULES_VIDEO_CODING_CODECS_VP8_SIMULCAST_ENCODER_ADAPTER_H_ - -#include -#include -#include - -#include "webrtc/modules/video_coding/codecs/vp8/include/vp8.h" - -namespace webrtc { - -class SimulcastRateAllocator; - -class VideoEncoderFactory { - public: - virtual VideoEncoder* Create() = 0; - virtual void Destroy(VideoEncoder* encoder) = 0; - virtual ~VideoEncoderFactory() {} -}; - -// SimulcastEncoderAdapter implements simulcast support by creating multiple -// webrtc::VideoEncoder instances with the given VideoEncoderFactory. -// All the public interfaces are expected to be called from the same thread, -// e.g the encoder thread. -class SimulcastEncoderAdapter : public VP8Encoder { - public: - explicit SimulcastEncoderAdapter(VideoEncoderFactory* factory); - virtual ~SimulcastEncoderAdapter(); - - // Implements VideoEncoder - int Release() override; - int InitEncode(const VideoCodec* inst, - int number_of_cores, - size_t max_payload_size) override; - int Encode(const VideoFrame& input_image, - const CodecSpecificInfo* codec_specific_info, - const std::vector* frame_types) override; - int RegisterEncodeCompleteCallback(EncodedImageCallback* callback) override; - int SetChannelParameters(uint32_t packet_loss, int64_t rtt) override; - int SetRateAllocation(const BitrateAllocation& bitrate, - uint32_t new_framerate) override; - - // Eventual handler for the contained encoders' EncodedImageCallbacks, but - // called from an internal helper that also knows the correct stream - // index. - EncodedImageCallback::Result OnEncodedImage( - size_t stream_idx, - const EncodedImage& encoded_image, - const CodecSpecificInfo* codec_specific_info, - const RTPFragmentationHeader* fragmentation); - - VideoEncoder::ScalingSettings GetScalingSettings() const override; - - bool SupportsNativeHandle() const override; - const char* ImplementationName() const override; - - private: - struct StreamInfo { - StreamInfo() - : encoder(NULL), - callback(NULL), - width(0), - height(0), - key_frame_request(false), - send_stream(true) {} - StreamInfo(VideoEncoder* encoder, - EncodedImageCallback* callback, - uint16_t width, - uint16_t height, - bool send_stream) - : encoder(encoder), - callback(callback), - width(width), - height(height), - key_frame_request(false), - send_stream(send_stream) {} - // Deleted by SimulcastEncoderAdapter::Release(). - VideoEncoder* encoder; - EncodedImageCallback* callback; - uint16_t width; - uint16_t height; - bool key_frame_request; - bool send_stream; - }; - - // Populate the codec settings for each stream. - void PopulateStreamCodec(const webrtc::VideoCodec* inst, - int stream_index, - uint32_t start_bitrate_kbps, - bool highest_resolution_stream, - webrtc::VideoCodec* stream_codec); - - bool Initialized() const; - - std::unique_ptr factory_; - VideoCodec codec_; - std::vector streaminfos_; - EncodedImageCallback* encoded_complete_callback_; - std::string implementation_name_; -}; - -} // namespace webrtc - -#endif // WEBRTC_MODULES_VIDEO_CODING_CODECS_VP8_SIMULCAST_ENCODER_ADAPTER_H_ diff --git a/WebRtc.NET/include/webrtc/modules/video_coding/codecs/vp8/simulcast_unittest.h b/WebRtc.NET/include/webrtc/modules/video_coding/codecs/vp8/simulcast_unittest.h deleted file mode 100644 index d140b0a5..00000000 --- a/WebRtc.NET/include/webrtc/modules/video_coding/codecs/vp8/simulcast_unittest.h +++ /dev/null @@ -1,894 +0,0 @@ -/* - * Copyright (c) 2014 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MODULES_VIDEO_CODING_CODECS_VP8_SIMULCAST_UNITTEST_H_ -#define WEBRTC_MODULES_VIDEO_CODING_CODECS_VP8_SIMULCAST_UNITTEST_H_ - -#include -#include -#include -#include - -#include "webrtc/api/video/i420_buffer.h" -#include "webrtc/api/video/video_frame.h" -#include "webrtc/base/checks.h" -#include "webrtc/common_video/libyuv/include/webrtc_libyuv.h" -#include "webrtc/modules/video_coding/codecs/vp8/include/vp8.h" -#include "webrtc/modules/video_coding/codecs/vp8/temporal_layers.h" -#include "webrtc/modules/video_coding/include/mock/mock_video_codec_interface.h" -#include "webrtc/modules/video_coding/utility/simulcast_rate_allocator.h" -#include "webrtc/test/gtest.h" -#include "webrtc/video_frame.h" - -using ::testing::_; -using ::testing::AllOf; -using ::testing::Field; -using ::testing::Return; - -namespace webrtc { -namespace testing { - -const int kDefaultWidth = 1280; -const int kDefaultHeight = 720; -const int kNumberOfSimulcastStreams = 3; -const int kColorY = 66; -const int kColorU = 22; -const int kColorV = 33; -const int kMaxBitrates[kNumberOfSimulcastStreams] = {150, 600, 1200}; -const int kMinBitrates[kNumberOfSimulcastStreams] = {50, 150, 600}; -const int kTargetBitrates[kNumberOfSimulcastStreams] = {100, 450, 1000}; -const int kDefaultTemporalLayerProfile[3] = {3, 3, 3}; - -template -void SetExpectedValues3(T value0, T value1, T value2, T* expected_values) { - expected_values[0] = value0; - expected_values[1] = value1; - expected_values[2] = value2; -} - -enum PlaneType { - kYPlane = 0, - kUPlane = 1, - kVPlane = 2, - kNumOfPlanes = 3, -}; - -class Vp8TestEncodedImageCallback : public EncodedImageCallback { - public: - Vp8TestEncodedImageCallback() : picture_id_(-1) { - memset(temporal_layer_, -1, sizeof(temporal_layer_)); - memset(layer_sync_, false, sizeof(layer_sync_)); - } - - ~Vp8TestEncodedImageCallback() { - delete[] encoded_key_frame_._buffer; - delete[] encoded_frame_._buffer; - } - - virtual Result OnEncodedImage(const EncodedImage& encoded_image, - const CodecSpecificInfo* codec_specific_info, - const RTPFragmentationHeader* fragmentation) { - // Only store the base layer. - if (codec_specific_info->codecSpecific.VP8.simulcastIdx == 0) { - if (encoded_image._frameType == kVideoFrameKey) { - delete[] encoded_key_frame_._buffer; - encoded_key_frame_._buffer = new uint8_t[encoded_image._size]; - encoded_key_frame_._size = encoded_image._size; - encoded_key_frame_._length = encoded_image._length; - encoded_key_frame_._frameType = kVideoFrameKey; - encoded_key_frame_._completeFrame = encoded_image._completeFrame; - memcpy(encoded_key_frame_._buffer, encoded_image._buffer, - encoded_image._length); - } else { - delete[] encoded_frame_._buffer; - encoded_frame_._buffer = new uint8_t[encoded_image._size]; - encoded_frame_._size = encoded_image._size; - encoded_frame_._length = encoded_image._length; - memcpy(encoded_frame_._buffer, encoded_image._buffer, - encoded_image._length); - } - } - picture_id_ = codec_specific_info->codecSpecific.VP8.pictureId; - layer_sync_[codec_specific_info->codecSpecific.VP8.simulcastIdx] = - codec_specific_info->codecSpecific.VP8.layerSync; - temporal_layer_[codec_specific_info->codecSpecific.VP8.simulcastIdx] = - codec_specific_info->codecSpecific.VP8.temporalIdx; - return Result(Result::OK, encoded_image._timeStamp); - } - void GetLastEncodedFrameInfo(int* picture_id, - int* temporal_layer, - bool* layer_sync, - int stream) { - *picture_id = picture_id_; - *temporal_layer = temporal_layer_[stream]; - *layer_sync = layer_sync_[stream]; - } - void GetLastEncodedKeyFrame(EncodedImage* encoded_key_frame) { - *encoded_key_frame = encoded_key_frame_; - } - void GetLastEncodedFrame(EncodedImage* encoded_frame) { - *encoded_frame = encoded_frame_; - } - - private: - EncodedImage encoded_key_frame_; - EncodedImage encoded_frame_; - int picture_id_; - int temporal_layer_[kNumberOfSimulcastStreams]; - bool layer_sync_[kNumberOfSimulcastStreams]; -}; - -class Vp8TestDecodedImageCallback : public DecodedImageCallback { - public: - Vp8TestDecodedImageCallback() : decoded_frames_(0) {} - int32_t Decoded(VideoFrame& decoded_image) override { - for (int i = 0; i < decoded_image.width(); ++i) { - EXPECT_NEAR(kColorY, decoded_image.video_frame_buffer()->DataY()[i], 1); - } - - // TODO(mikhal): Verify the difference between U,V and the original. - for (int i = 0; i < ((decoded_image.width() + 1) / 2); ++i) { - EXPECT_NEAR(kColorU, decoded_image.video_frame_buffer()->DataU()[i], 4); - EXPECT_NEAR(kColorV, decoded_image.video_frame_buffer()->DataV()[i], 4); - } - decoded_frames_++; - return 0; - } - int32_t Decoded(VideoFrame& decoded_image, int64_t decode_time_ms) override { - RTC_NOTREACHED(); - return -1; - } - int DecodedFrames() { return decoded_frames_; } - - private: - int decoded_frames_; -}; - -class TestVp8Simulcast : public ::testing::Test { - public: - TestVp8Simulcast(VP8Encoder* encoder, VP8Decoder* decoder) - : encoder_(encoder), decoder_(decoder) {} - - static void SetPlane(uint8_t* data, - uint8_t value, - int width, - int height, - int stride) { - for (int i = 0; i < height; i++, data += stride) { - // Setting allocated area to zero - setting only image size to - // requested values - will make it easier to distinguish between image - // size and frame size (accounting for stride). - memset(data, value, width); - memset(data + width, 0, stride - width); - } - } - - // Fills in an I420Buffer from |plane_colors|. - static void CreateImage(const rtc::scoped_refptr& buffer, - int plane_colors[kNumOfPlanes]) { - int width = buffer->width(); - int height = buffer->height(); - int chroma_width = (width + 1) / 2; - int chroma_height = (height + 1) / 2; - - SetPlane(buffer->MutableDataY(), plane_colors[0], - width, height, buffer->StrideY()); - - SetPlane(buffer->MutableDataU(), plane_colors[1], - chroma_width, chroma_height, - buffer->StrideU()); - - SetPlane(buffer->MutableDataV(), plane_colors[2], - chroma_width, chroma_height, - buffer->StrideV()); - } - - static void DefaultSettings(VideoCodec* settings, - const int* temporal_layer_profile) { - RTC_CHECK(settings); - memset(settings, 0, sizeof(VideoCodec)); - strncpy(settings->plName, "VP8", 4); - settings->codecType = kVideoCodecVP8; - // 96 to 127 dynamic payload types for video codecs - settings->plType = 120; - settings->startBitrate = 300; - settings->minBitrate = 30; - settings->maxBitrate = 0; - settings->maxFramerate = 30; - settings->width = kDefaultWidth; - settings->height = kDefaultHeight; - settings->numberOfSimulcastStreams = kNumberOfSimulcastStreams; - ASSERT_EQ(3, kNumberOfSimulcastStreams); - ConfigureStream(kDefaultWidth / 4, kDefaultHeight / 4, kMaxBitrates[0], - kMinBitrates[0], kTargetBitrates[0], - &settings->simulcastStream[0], temporal_layer_profile[0]); - ConfigureStream(kDefaultWidth / 2, kDefaultHeight / 2, kMaxBitrates[1], - kMinBitrates[1], kTargetBitrates[1], - &settings->simulcastStream[1], temporal_layer_profile[1]); - ConfigureStream(kDefaultWidth, kDefaultHeight, kMaxBitrates[2], - kMinBitrates[2], kTargetBitrates[2], - &settings->simulcastStream[2], temporal_layer_profile[2]); - settings->VP8()->resilience = kResilientStream; - settings->VP8()->denoisingOn = true; - settings->VP8()->errorConcealmentOn = false; - settings->VP8()->automaticResizeOn = false; - settings->VP8()->feedbackModeOn = false; - settings->VP8()->frameDroppingOn = true; - settings->VP8()->keyFrameInterval = 3000; - } - - static void ConfigureStream(int width, - int height, - int max_bitrate, - int min_bitrate, - int target_bitrate, - SimulcastStream* stream, - int num_temporal_layers) { - assert(stream); - stream->width = width; - stream->height = height; - stream->maxBitrate = max_bitrate; - stream->minBitrate = min_bitrate; - stream->targetBitrate = target_bitrate; - stream->numberOfTemporalLayers = num_temporal_layers; - stream->qpMax = 45; - } - - protected: - void SetUp() override { SetUpCodec(kDefaultTemporalLayerProfile); } - - void TearDown() override { - encoder_->Release(); - decoder_->Release(); - } - - void SetUpCodec(const int* temporal_layer_profile) { - encoder_->RegisterEncodeCompleteCallback(&encoder_callback_); - decoder_->RegisterDecodeCompleteCallback(&decoder_callback_); - DefaultSettings(&settings_, temporal_layer_profile); - SetUpRateAllocator(); - EXPECT_EQ(0, encoder_->InitEncode(&settings_, 1, 1200)); - EXPECT_EQ(0, decoder_->InitDecode(&settings_, 1)); - int half_width = (kDefaultWidth + 1) / 2; - input_buffer_ = I420Buffer::Create(kDefaultWidth, kDefaultHeight, - kDefaultWidth, half_width, half_width); - input_buffer_->InitializeData(); - input_frame_.reset( - new VideoFrame(input_buffer_, 0, 0, webrtc::kVideoRotation_0)); - } - - void SetUpRateAllocator() { - TemporalLayersFactory* tl_factory = new TemporalLayersFactory(); - rate_allocator_.reset(new SimulcastRateAllocator( - settings_, std::unique_ptr(tl_factory))); - settings_.VP8()->tl_factory = tl_factory; - } - - void SetRates(uint32_t bitrate_kbps, uint32_t fps) { - encoder_->SetRateAllocation( - rate_allocator_->GetAllocation(bitrate_kbps * 1000, fps), fps); - } - - void ExpectStreams(FrameType frame_type, int expected_video_streams) { - ASSERT_GE(expected_video_streams, 0); - ASSERT_LE(expected_video_streams, kNumberOfSimulcastStreams); - if (expected_video_streams >= 1) { - EXPECT_CALL( - encoder_callback_, - OnEncodedImage( - AllOf(Field(&EncodedImage::_frameType, frame_type), - Field(&EncodedImage::_encodedWidth, kDefaultWidth / 4), - Field(&EncodedImage::_encodedHeight, kDefaultHeight / 4)), - _, _)) - .Times(1) - .WillRepeatedly(Return(EncodedImageCallback::Result( - EncodedImageCallback::Result::OK, 0))); - } - if (expected_video_streams >= 2) { - EXPECT_CALL( - encoder_callback_, - OnEncodedImage( - AllOf(Field(&EncodedImage::_frameType, frame_type), - Field(&EncodedImage::_encodedWidth, kDefaultWidth / 2), - Field(&EncodedImage::_encodedHeight, kDefaultHeight / 2)), - _, _)) - .Times(1) - .WillRepeatedly(Return(EncodedImageCallback::Result( - EncodedImageCallback::Result::OK, 0))); - } - if (expected_video_streams >= 3) { - EXPECT_CALL( - encoder_callback_, - OnEncodedImage( - AllOf(Field(&EncodedImage::_frameType, frame_type), - Field(&EncodedImage::_encodedWidth, kDefaultWidth), - Field(&EncodedImage::_encodedHeight, kDefaultHeight)), - _, _)) - .Times(1) - .WillRepeatedly(Return(EncodedImageCallback::Result( - EncodedImageCallback::Result::OK, 0))); - } - } - - void VerifyTemporalIdxAndSyncForAllSpatialLayers( - Vp8TestEncodedImageCallback* encoder_callback, - const int* expected_temporal_idx, - const bool* expected_layer_sync, - int num_spatial_layers) { - int picture_id = -1; - int temporal_layer = -1; - bool layer_sync = false; - for (int i = 0; i < num_spatial_layers; i++) { - encoder_callback->GetLastEncodedFrameInfo(&picture_id, &temporal_layer, - &layer_sync, i); - EXPECT_EQ(expected_temporal_idx[i], temporal_layer); - EXPECT_EQ(expected_layer_sync[i], layer_sync); - } - } - - // We currently expect all active streams to generate a key frame even though - // a key frame was only requested for some of them. - void TestKeyFrameRequestsOnAllStreams() { - SetRates(kMaxBitrates[2], 30); // To get all three streams. - std::vector frame_types(kNumberOfSimulcastStreams, - kVideoFrameDelta); - ExpectStreams(kVideoFrameKey, kNumberOfSimulcastStreams); - EXPECT_EQ(0, encoder_->Encode(*input_frame_, NULL, &frame_types)); - - ExpectStreams(kVideoFrameDelta, kNumberOfSimulcastStreams); - input_frame_->set_timestamp(input_frame_->timestamp() + 3000); - EXPECT_EQ(0, encoder_->Encode(*input_frame_, NULL, &frame_types)); - - frame_types[0] = kVideoFrameKey; - ExpectStreams(kVideoFrameKey, kNumberOfSimulcastStreams); - input_frame_->set_timestamp(input_frame_->timestamp() + 3000); - EXPECT_EQ(0, encoder_->Encode(*input_frame_, NULL, &frame_types)); - - std::fill(frame_types.begin(), frame_types.end(), kVideoFrameDelta); - frame_types[1] = kVideoFrameKey; - ExpectStreams(kVideoFrameKey, kNumberOfSimulcastStreams); - input_frame_->set_timestamp(input_frame_->timestamp() + 3000); - EXPECT_EQ(0, encoder_->Encode(*input_frame_, NULL, &frame_types)); - - std::fill(frame_types.begin(), frame_types.end(), kVideoFrameDelta); - frame_types[2] = kVideoFrameKey; - ExpectStreams(kVideoFrameKey, kNumberOfSimulcastStreams); - input_frame_->set_timestamp(input_frame_->timestamp() + 3000); - EXPECT_EQ(0, encoder_->Encode(*input_frame_, NULL, &frame_types)); - - std::fill(frame_types.begin(), frame_types.end(), kVideoFrameDelta); - ExpectStreams(kVideoFrameDelta, kNumberOfSimulcastStreams); - input_frame_->set_timestamp(input_frame_->timestamp() + 3000); - EXPECT_EQ(0, encoder_->Encode(*input_frame_, NULL, &frame_types)); - } - - void TestPaddingAllStreams() { - // We should always encode the base layer. - SetRates(kMinBitrates[0] - 1, 30); - std::vector frame_types(kNumberOfSimulcastStreams, - kVideoFrameDelta); - ExpectStreams(kVideoFrameKey, 1); - EXPECT_EQ(0, encoder_->Encode(*input_frame_, NULL, &frame_types)); - - ExpectStreams(kVideoFrameDelta, 1); - input_frame_->set_timestamp(input_frame_->timestamp() + 3000); - EXPECT_EQ(0, encoder_->Encode(*input_frame_, NULL, &frame_types)); - } - - void TestPaddingTwoStreams() { - // We have just enough to get only the first stream and padding for two. - SetRates(kMinBitrates[0], 30); - std::vector frame_types(kNumberOfSimulcastStreams, - kVideoFrameDelta); - ExpectStreams(kVideoFrameKey, 1); - EXPECT_EQ(0, encoder_->Encode(*input_frame_, NULL, &frame_types)); - - ExpectStreams(kVideoFrameDelta, 1); - input_frame_->set_timestamp(input_frame_->timestamp() + 3000); - EXPECT_EQ(0, encoder_->Encode(*input_frame_, NULL, &frame_types)); - } - - void TestPaddingTwoStreamsOneMaxedOut() { - // We are just below limit of sending second stream, so we should get - // the first stream maxed out (at |maxBitrate|), and padding for two. - SetRates(kTargetBitrates[0] + kMinBitrates[1] - 1, 30); - std::vector frame_types(kNumberOfSimulcastStreams, - kVideoFrameDelta); - ExpectStreams(kVideoFrameKey, 1); - EXPECT_EQ(0, encoder_->Encode(*input_frame_, NULL, &frame_types)); - - ExpectStreams(kVideoFrameDelta, 1); - input_frame_->set_timestamp(input_frame_->timestamp() + 3000); - EXPECT_EQ(0, encoder_->Encode(*input_frame_, NULL, &frame_types)); - } - - void TestPaddingOneStream() { - // We have just enough to send two streams, so padding for one stream. - SetRates(kTargetBitrates[0] + kMinBitrates[1], 30); - std::vector frame_types(kNumberOfSimulcastStreams, - kVideoFrameDelta); - ExpectStreams(kVideoFrameKey, 2); - EXPECT_EQ(0, encoder_->Encode(*input_frame_, NULL, &frame_types)); - - ExpectStreams(kVideoFrameDelta, 2); - input_frame_->set_timestamp(input_frame_->timestamp() + 3000); - EXPECT_EQ(0, encoder_->Encode(*input_frame_, NULL, &frame_types)); - } - - void TestPaddingOneStreamTwoMaxedOut() { - // We are just below limit of sending third stream, so we should get - // first stream's rate maxed out at |targetBitrate|, second at |maxBitrate|. - SetRates(kTargetBitrates[0] + kTargetBitrates[1] + kMinBitrates[2] - 1, 30); - std::vector frame_types(kNumberOfSimulcastStreams, - kVideoFrameDelta); - ExpectStreams(kVideoFrameKey, 2); - EXPECT_EQ(0, encoder_->Encode(*input_frame_, NULL, &frame_types)); - - ExpectStreams(kVideoFrameDelta, 2); - input_frame_->set_timestamp(input_frame_->timestamp() + 3000); - EXPECT_EQ(0, encoder_->Encode(*input_frame_, NULL, &frame_types)); - } - - void TestSendAllStreams() { - // We have just enough to send all streams. - SetRates(kTargetBitrates[0] + kTargetBitrates[1] + kMinBitrates[2], 30); - std::vector frame_types(kNumberOfSimulcastStreams, - kVideoFrameDelta); - ExpectStreams(kVideoFrameKey, 3); - EXPECT_EQ(0, encoder_->Encode(*input_frame_, NULL, &frame_types)); - - ExpectStreams(kVideoFrameDelta, 3); - input_frame_->set_timestamp(input_frame_->timestamp() + 3000); - EXPECT_EQ(0, encoder_->Encode(*input_frame_, NULL, &frame_types)); - } - - void TestDisablingStreams() { - // We should get three media streams. - SetRates(kMaxBitrates[0] + kMaxBitrates[1] + kMaxBitrates[2], 30); - std::vector frame_types(kNumberOfSimulcastStreams, - kVideoFrameDelta); - ExpectStreams(kVideoFrameKey, 3); - EXPECT_EQ(0, encoder_->Encode(*input_frame_, NULL, &frame_types)); - - ExpectStreams(kVideoFrameDelta, 3); - input_frame_->set_timestamp(input_frame_->timestamp() + 3000); - EXPECT_EQ(0, encoder_->Encode(*input_frame_, NULL, &frame_types)); - - // We should only get two streams and padding for one. - SetRates(kTargetBitrates[0] + kTargetBitrates[1] + kMinBitrates[2] / 2, 30); - ExpectStreams(kVideoFrameDelta, 2); - input_frame_->set_timestamp(input_frame_->timestamp() + 3000); - EXPECT_EQ(0, encoder_->Encode(*input_frame_, NULL, &frame_types)); - - // We should only get the first stream and padding for two. - SetRates(kTargetBitrates[0] + kMinBitrates[1] / 2, 30); - ExpectStreams(kVideoFrameDelta, 1); - input_frame_->set_timestamp(input_frame_->timestamp() + 3000); - EXPECT_EQ(0, encoder_->Encode(*input_frame_, NULL, &frame_types)); - - // We don't have enough bitrate for the thumbnail stream, but we should get - // it anyway with current configuration. - SetRates(kTargetBitrates[0] - 1, 30); - ExpectStreams(kVideoFrameDelta, 1); - input_frame_->set_timestamp(input_frame_->timestamp() + 3000); - EXPECT_EQ(0, encoder_->Encode(*input_frame_, NULL, &frame_types)); - - // We should only get two streams and padding for one. - SetRates(kTargetBitrates[0] + kTargetBitrates[1] + kMinBitrates[2] / 2, 30); - // We get a key frame because a new stream is being enabled. - ExpectStreams(kVideoFrameKey, 2); - input_frame_->set_timestamp(input_frame_->timestamp() + 3000); - EXPECT_EQ(0, encoder_->Encode(*input_frame_, NULL, &frame_types)); - - // We should get all three streams. - SetRates(kTargetBitrates[0] + kTargetBitrates[1] + kTargetBitrates[2], 30); - // We get a key frame because a new stream is being enabled. - ExpectStreams(kVideoFrameKey, 3); - input_frame_->set_timestamp(input_frame_->timestamp() + 3000); - EXPECT_EQ(0, encoder_->Encode(*input_frame_, NULL, &frame_types)); - } - - void SwitchingToOneStream(int width, int height) { - // Disable all streams except the last and set the bitrate of the last to - // 100 kbps. This verifies the way GTP switches to screenshare mode. - settings_.VP8()->numberOfTemporalLayers = 1; - settings_.maxBitrate = 100; - settings_.startBitrate = 100; - settings_.width = width; - settings_.height = height; - for (int i = 0; i < settings_.numberOfSimulcastStreams - 1; ++i) { - settings_.simulcastStream[i].maxBitrate = 0; - settings_.simulcastStream[i].width = settings_.width; - settings_.simulcastStream[i].height = settings_.height; - } - // Setting input image to new resolution. - int half_width = (settings_.width + 1) / 2; - input_buffer_ = I420Buffer::Create(settings_.width, settings_.height, - settings_.width, half_width, half_width); - input_buffer_->InitializeData(); - - input_frame_.reset( - new VideoFrame(input_buffer_, 0, 0, webrtc::kVideoRotation_0)); - - // The for loop above did not set the bitrate of the highest layer. - settings_.simulcastStream[settings_.numberOfSimulcastStreams - 1] - .maxBitrate = 0; - // The highest layer has to correspond to the non-simulcast resolution. - settings_.simulcastStream[settings_.numberOfSimulcastStreams - 1].width = - settings_.width; - settings_.simulcastStream[settings_.numberOfSimulcastStreams - 1].height = - settings_.height; - SetUpRateAllocator(); - EXPECT_EQ(0, encoder_->InitEncode(&settings_, 1, 1200)); - - // Encode one frame and verify. - SetRates(kMaxBitrates[0] + kMaxBitrates[1], 30); - std::vector frame_types(kNumberOfSimulcastStreams, - kVideoFrameDelta); - EXPECT_CALL( - encoder_callback_, - OnEncodedImage(AllOf(Field(&EncodedImage::_frameType, kVideoFrameKey), - Field(&EncodedImage::_encodedWidth, width), - Field(&EncodedImage::_encodedHeight, height)), - _, _)) - .Times(1) - .WillRepeatedly(Return( - EncodedImageCallback::Result(EncodedImageCallback::Result::OK, 0))); - EXPECT_EQ(0, encoder_->Encode(*input_frame_, NULL, &frame_types)); - - // Switch back. - DefaultSettings(&settings_, kDefaultTemporalLayerProfile); - // Start at the lowest bitrate for enabling base stream. - settings_.startBitrate = kMinBitrates[0]; - SetUpRateAllocator(); - EXPECT_EQ(0, encoder_->InitEncode(&settings_, 1, 1200)); - SetRates(settings_.startBitrate, 30); - ExpectStreams(kVideoFrameKey, 1); - // Resize |input_frame_| to the new resolution. - half_width = (settings_.width + 1) / 2; - input_buffer_ = I420Buffer::Create(settings_.width, settings_.height, - settings_.width, half_width, half_width); - input_buffer_->InitializeData(); - input_frame_.reset( - new VideoFrame(input_buffer_, 0, 0, webrtc::kVideoRotation_0)); - EXPECT_EQ(0, encoder_->Encode(*input_frame_, NULL, &frame_types)); - } - - void TestSwitchingToOneStream() { SwitchingToOneStream(1024, 768); } - - void TestSwitchingToOneOddStream() { SwitchingToOneStream(1023, 769); } - - void TestSwitchingToOneSmallStream() { SwitchingToOneStream(4, 4); } - - void TestRPSIEncoder() { - Vp8TestEncodedImageCallback encoder_callback; - encoder_->RegisterEncodeCompleteCallback(&encoder_callback); - - SetRates(kMaxBitrates[2], 30); // To get all three streams. - - EXPECT_EQ(0, encoder_->Encode(*input_frame_, NULL, NULL)); - int picture_id = -1; - int temporal_layer = -1; - bool layer_sync = false; - encoder_callback.GetLastEncodedFrameInfo(&picture_id, &temporal_layer, - &layer_sync, 0); - EXPECT_EQ(0, temporal_layer); - EXPECT_TRUE(layer_sync); - int key_frame_picture_id = picture_id; - - input_frame_->set_timestamp(input_frame_->timestamp() + 3000); - EXPECT_EQ(0, encoder_->Encode(*input_frame_, NULL, NULL)); - encoder_callback.GetLastEncodedFrameInfo(&picture_id, &temporal_layer, - &layer_sync, 0); - EXPECT_EQ(2, temporal_layer); - EXPECT_TRUE(layer_sync); - - input_frame_->set_timestamp(input_frame_->timestamp() + 3000); - EXPECT_EQ(0, encoder_->Encode(*input_frame_, NULL, NULL)); - encoder_callback.GetLastEncodedFrameInfo(&picture_id, &temporal_layer, - &layer_sync, 0); - EXPECT_EQ(1, temporal_layer); - EXPECT_TRUE(layer_sync); - - input_frame_->set_timestamp(input_frame_->timestamp() + 3000); - EXPECT_EQ(0, encoder_->Encode(*input_frame_, NULL, NULL)); - encoder_callback.GetLastEncodedFrameInfo(&picture_id, &temporal_layer, - &layer_sync, 0); - EXPECT_EQ(2, temporal_layer); - EXPECT_FALSE(layer_sync); - - CodecSpecificInfo codec_specific; - codec_specific.codecType = kVideoCodecVP8; - codec_specific.codecSpecific.VP8.hasReceivedRPSI = true; - - // Must match last key frame to trigger. - codec_specific.codecSpecific.VP8.pictureIdRPSI = key_frame_picture_id; - - input_frame_->set_timestamp(input_frame_->timestamp() + 3000); - EXPECT_EQ(0, encoder_->Encode(*input_frame_, &codec_specific, NULL)); - encoder_callback.GetLastEncodedFrameInfo(&picture_id, &temporal_layer, - &layer_sync, 0); - - EXPECT_EQ(0, temporal_layer); - EXPECT_TRUE(layer_sync); - - // Must match last key frame to trigger, test bad id. - codec_specific.codecSpecific.VP8.pictureIdRPSI = key_frame_picture_id + 17; - - input_frame_->set_timestamp(input_frame_->timestamp() + 3000); - EXPECT_EQ(0, encoder_->Encode(*input_frame_, &codec_specific, NULL)); - encoder_callback.GetLastEncodedFrameInfo(&picture_id, &temporal_layer, - &layer_sync, 0); - - EXPECT_EQ(2, temporal_layer); - // The previous frame was a base layer sync (since it was a frame that - // only predicts from key frame and hence resets the temporal pattern), - // so this frame (the next one) must have |layer_sync| set to true. - EXPECT_TRUE(layer_sync); - } - - void TestRPSIEncodeDecode() { - Vp8TestEncodedImageCallback encoder_callback; - Vp8TestDecodedImageCallback decoder_callback; - encoder_->RegisterEncodeCompleteCallback(&encoder_callback); - decoder_->RegisterDecodeCompleteCallback(&decoder_callback); - - SetRates(kMaxBitrates[2], 30); // To get all three streams. - - // Set color. - int plane_offset[kNumOfPlanes]; - plane_offset[kYPlane] = kColorY; - plane_offset[kUPlane] = kColorU; - plane_offset[kVPlane] = kColorV; - CreateImage(input_buffer_, plane_offset); - - EXPECT_EQ(0, encoder_->Encode(*input_frame_, NULL, NULL)); - int picture_id = -1; - int temporal_layer = -1; - bool layer_sync = false; - encoder_callback.GetLastEncodedFrameInfo(&picture_id, &temporal_layer, - &layer_sync, 0); - EXPECT_EQ(0, temporal_layer); - EXPECT_TRUE(layer_sync); - int key_frame_picture_id = picture_id; - - // Change color. - plane_offset[kYPlane] += 1; - plane_offset[kUPlane] += 1; - plane_offset[kVPlane] += 1; - CreateImage(input_buffer_, plane_offset); - input_frame_->set_timestamp(input_frame_->timestamp() + 3000); - EXPECT_EQ(0, encoder_->Encode(*input_frame_, NULL, NULL)); - - // Change color. - plane_offset[kYPlane] += 1; - plane_offset[kUPlane] += 1; - plane_offset[kVPlane] += 1; - CreateImage(input_buffer_, plane_offset); - - input_frame_->set_timestamp(input_frame_->timestamp() + 3000); - EXPECT_EQ(0, encoder_->Encode(*input_frame_, NULL, NULL)); - - // Change color. - plane_offset[kYPlane] += 1; - plane_offset[kUPlane] += 1; - plane_offset[kVPlane] += 1; - CreateImage(input_buffer_, plane_offset); - - input_frame_->set_timestamp(input_frame_->timestamp() + 3000); - EXPECT_EQ(0, encoder_->Encode(*input_frame_, NULL, NULL)); - - CodecSpecificInfo codec_specific; - codec_specific.codecType = kVideoCodecVP8; - codec_specific.codecSpecific.VP8.hasReceivedRPSI = true; - // Must match last key frame to trigger. - codec_specific.codecSpecific.VP8.pictureIdRPSI = key_frame_picture_id; - - // Change color back to original. - plane_offset[kYPlane] = kColorY; - plane_offset[kUPlane] = kColorU; - plane_offset[kVPlane] = kColorV; - CreateImage(input_buffer_, plane_offset); - - input_frame_->set_timestamp(input_frame_->timestamp() + 3000); - EXPECT_EQ(0, encoder_->Encode(*input_frame_, &codec_specific, NULL)); - - EncodedImage encoded_frame; - encoder_callback.GetLastEncodedKeyFrame(&encoded_frame); - decoder_->Decode(encoded_frame, false, NULL); - encoder_callback.GetLastEncodedFrame(&encoded_frame); - decoder_->Decode(encoded_frame, false, NULL); - EXPECT_EQ(2, decoder_callback.DecodedFrames()); - } - - // Test the layer pattern and sync flag for various spatial-temporal patterns. - // 3-3-3 pattern: 3 temporal layers for all spatial streams, so same - // temporal_layer id and layer_sync is expected for all streams. - void TestSaptioTemporalLayers333PatternEncoder() { - Vp8TestEncodedImageCallback encoder_callback; - encoder_->RegisterEncodeCompleteCallback(&encoder_callback); - SetRates(kMaxBitrates[2], 30); // To get all three streams. - - int expected_temporal_idx[3] = {-1, -1, -1}; - bool expected_layer_sync[3] = {false, false, false}; - - // First frame: #0. - EXPECT_EQ(0, encoder_->Encode(*input_frame_, NULL, NULL)); - SetExpectedValues3(0, 0, 0, expected_temporal_idx); - SetExpectedValues3(true, true, true, expected_layer_sync); - VerifyTemporalIdxAndSyncForAllSpatialLayers( - &encoder_callback, expected_temporal_idx, expected_layer_sync, 3); - - // Next frame: #1. - input_frame_->set_timestamp(input_frame_->timestamp() + 3000); - EXPECT_EQ(0, encoder_->Encode(*input_frame_, NULL, NULL)); - SetExpectedValues3(2, 2, 2, expected_temporal_idx); - SetExpectedValues3(true, true, true, expected_layer_sync); - VerifyTemporalIdxAndSyncForAllSpatialLayers( - &encoder_callback, expected_temporal_idx, expected_layer_sync, 3); - - // Next frame: #2. - input_frame_->set_timestamp(input_frame_->timestamp() + 3000); - EXPECT_EQ(0, encoder_->Encode(*input_frame_, NULL, NULL)); - SetExpectedValues3(1, 1, 1, expected_temporal_idx); - SetExpectedValues3(true, true, true, expected_layer_sync); - VerifyTemporalIdxAndSyncForAllSpatialLayers( - &encoder_callback, expected_temporal_idx, expected_layer_sync, 3); - - // Next frame: #3. - input_frame_->set_timestamp(input_frame_->timestamp() + 3000); - EXPECT_EQ(0, encoder_->Encode(*input_frame_, NULL, NULL)); - SetExpectedValues3(2, 2, 2, expected_temporal_idx); - SetExpectedValues3(false, false, false, expected_layer_sync); - VerifyTemporalIdxAndSyncForAllSpatialLayers( - &encoder_callback, expected_temporal_idx, expected_layer_sync, 3); - - // Next frame: #4. - input_frame_->set_timestamp(input_frame_->timestamp() + 3000); - EXPECT_EQ(0, encoder_->Encode(*input_frame_, NULL, NULL)); - SetExpectedValues3(0, 0, 0, expected_temporal_idx); - SetExpectedValues3(false, false, false, expected_layer_sync); - VerifyTemporalIdxAndSyncForAllSpatialLayers( - &encoder_callback, expected_temporal_idx, expected_layer_sync, 3); - - // Next frame: #5. - input_frame_->set_timestamp(input_frame_->timestamp() + 3000); - EXPECT_EQ(0, encoder_->Encode(*input_frame_, NULL, NULL)); - SetExpectedValues3(2, 2, 2, expected_temporal_idx); - SetExpectedValues3(false, false, false, expected_layer_sync); - VerifyTemporalIdxAndSyncForAllSpatialLayers( - &encoder_callback, expected_temporal_idx, expected_layer_sync, 3); - } - - // Test the layer pattern and sync flag for various spatial-temporal patterns. - // 3-2-1 pattern: 3 temporal layers for lowest resolution, 2 for middle, and - // 1 temporal layer for highest resolution. - // For this profile, we expect the temporal index pattern to be: - // 1st stream: 0, 2, 1, 2, .... - // 2nd stream: 0, 1, 0, 1, ... - // 3rd stream: -1, -1, -1, -1, .... - // Regarding the 3rd stream, note that a stream/encoder with 1 temporal layer - // should always have temporal layer idx set to kNoTemporalIdx = -1. - // Since CodecSpecificInfoVP8.temporalIdx is uint8_t, this will wrap to 255. - // TODO(marpan): Although this seems safe for now, we should fix this. - void TestSpatioTemporalLayers321PatternEncoder() { - int temporal_layer_profile[3] = {3, 2, 1}; - SetUpCodec(temporal_layer_profile); - Vp8TestEncodedImageCallback encoder_callback; - encoder_->RegisterEncodeCompleteCallback(&encoder_callback); - SetRates(kMaxBitrates[2], 30); // To get all three streams. - - int expected_temporal_idx[3] = {-1, -1, -1}; - bool expected_layer_sync[3] = {false, false, false}; - - // First frame: #0. - EXPECT_EQ(0, encoder_->Encode(*input_frame_, NULL, NULL)); - SetExpectedValues3(0, 0, 255, expected_temporal_idx); - SetExpectedValues3(true, true, false, expected_layer_sync); - VerifyTemporalIdxAndSyncForAllSpatialLayers( - &encoder_callback, expected_temporal_idx, expected_layer_sync, 3); - - // Next frame: #1. - input_frame_->set_timestamp(input_frame_->timestamp() + 3000); - EXPECT_EQ(0, encoder_->Encode(*input_frame_, NULL, NULL)); - SetExpectedValues3(2, 1, 255, expected_temporal_idx); - SetExpectedValues3(true, true, false, expected_layer_sync); - VerifyTemporalIdxAndSyncForAllSpatialLayers( - &encoder_callback, expected_temporal_idx, expected_layer_sync, 3); - - // Next frame: #2. - input_frame_->set_timestamp(input_frame_->timestamp() + 3000); - EXPECT_EQ(0, encoder_->Encode(*input_frame_, NULL, NULL)); - SetExpectedValues3(1, 0, 255, expected_temporal_idx); - SetExpectedValues3(true, false, false, expected_layer_sync); - VerifyTemporalIdxAndSyncForAllSpatialLayers( - &encoder_callback, expected_temporal_idx, expected_layer_sync, 3); - - // Next frame: #3. - input_frame_->set_timestamp(input_frame_->timestamp() + 3000); - EXPECT_EQ(0, encoder_->Encode(*input_frame_, NULL, NULL)); - SetExpectedValues3(2, 1, 255, expected_temporal_idx); - SetExpectedValues3(false, false, false, expected_layer_sync); - VerifyTemporalIdxAndSyncForAllSpatialLayers( - &encoder_callback, expected_temporal_idx, expected_layer_sync, 3); - - // Next frame: #4. - input_frame_->set_timestamp(input_frame_->timestamp() + 3000); - EXPECT_EQ(0, encoder_->Encode(*input_frame_, NULL, NULL)); - SetExpectedValues3(0, 0, 255, expected_temporal_idx); - SetExpectedValues3(false, false, false, expected_layer_sync); - VerifyTemporalIdxAndSyncForAllSpatialLayers( - &encoder_callback, expected_temporal_idx, expected_layer_sync, 3); - - // Next frame: #5. - input_frame_->set_timestamp(input_frame_->timestamp() + 3000); - EXPECT_EQ(0, encoder_->Encode(*input_frame_, NULL, NULL)); - SetExpectedValues3(2, 1, 255, expected_temporal_idx); - SetExpectedValues3(false, false, false, expected_layer_sync); - VerifyTemporalIdxAndSyncForAllSpatialLayers( - &encoder_callback, expected_temporal_idx, expected_layer_sync, 3); - } - - void TestStrideEncodeDecode() { - Vp8TestEncodedImageCallback encoder_callback; - Vp8TestDecodedImageCallback decoder_callback; - encoder_->RegisterEncodeCompleteCallback(&encoder_callback); - decoder_->RegisterDecodeCompleteCallback(&decoder_callback); - - SetRates(kMaxBitrates[2], 30); // To get all three streams. - // Setting two (possibly) problematic use cases for stride: - // 1. stride > width 2. stride_y != stride_uv/2 - int stride_y = kDefaultWidth + 20; - int stride_uv = ((kDefaultWidth + 1) / 2) + 5; - input_buffer_ = I420Buffer::Create(kDefaultWidth, kDefaultHeight, stride_y, - stride_uv, stride_uv); - input_frame_.reset( - new VideoFrame(input_buffer_, 0, 0, webrtc::kVideoRotation_0)); - - // Set color. - int plane_offset[kNumOfPlanes]; - plane_offset[kYPlane] = kColorY; - plane_offset[kUPlane] = kColorU; - plane_offset[kVPlane] = kColorV; - CreateImage(input_buffer_, plane_offset); - - EXPECT_EQ(0, encoder_->Encode(*input_frame_, NULL, NULL)); - - // Change color. - plane_offset[kYPlane] += 1; - plane_offset[kUPlane] += 1; - plane_offset[kVPlane] += 1; - CreateImage(input_buffer_, plane_offset); - input_frame_->set_timestamp(input_frame_->timestamp() + 3000); - EXPECT_EQ(0, encoder_->Encode(*input_frame_, NULL, NULL)); - - EncodedImage encoded_frame; - // Only encoding one frame - so will be a key frame. - encoder_callback.GetLastEncodedKeyFrame(&encoded_frame); - EXPECT_EQ(0, decoder_->Decode(encoded_frame, false, NULL)); - encoder_callback.GetLastEncodedFrame(&encoded_frame); - decoder_->Decode(encoded_frame, false, NULL); - EXPECT_EQ(2, decoder_callback.DecodedFrames()); - } - - std::unique_ptr encoder_; - MockEncodedImageCallback encoder_callback_; - std::unique_ptr decoder_; - MockDecodedImageCallback decoder_callback_; - VideoCodec settings_; - rtc::scoped_refptr input_buffer_; - std::unique_ptr input_frame_; - std::unique_ptr rate_allocator_; -}; - -} // namespace testing -} // namespace webrtc - -#endif // WEBRTC_MODULES_VIDEO_CODING_CODECS_VP8_SIMULCAST_UNITTEST_H_ diff --git a/WebRtc.NET/include/webrtc/modules/video_coding/codecs/vp8/temporal_layers.h b/WebRtc.NET/include/webrtc/modules/video_coding/codecs/vp8/temporal_layers.h deleted file mode 100644 index ad3a205c..00000000 --- a/WebRtc.NET/include/webrtc/modules/video_coding/codecs/vp8/temporal_layers.h +++ /dev/null @@ -1,102 +0,0 @@ -/* Copyright (c) 2011 The WebRTC project authors. All Rights Reserved. -* -* Use of this source code is governed by a BSD-style license -* that can be found in the LICENSE file in the root of the source -* tree. An additional intellectual property rights grant can be found -* in the file PATENTS. All contributing project authors may -* be found in the AUTHORS file in the root of the source tree. -*/ -/* -* This file defines the interface for doing temporal layers with VP8. -*/ -#ifndef WEBRTC_MODULES_VIDEO_CODING_CODECS_VP8_TEMPORAL_LAYERS_H_ -#define WEBRTC_MODULES_VIDEO_CODING_CODECS_VP8_TEMPORAL_LAYERS_H_ - -#include - -#include "webrtc/common_video/include/video_image.h" -#include "webrtc/typedefs.h" - -struct vpx_codec_enc_cfg; -typedef struct vpx_codec_enc_cfg vpx_codec_enc_cfg_t; - -namespace webrtc { - -struct CodecSpecificInfoVP8; - -class TemporalLayers { - public: - // Factory for TemporalLayer strategy. Default behavior is a fixed pattern - // of temporal layers. See default_temporal_layers.cc - virtual ~TemporalLayers() {} - - // Returns the recommended VP8 encode flags needed. May refresh the decoder - // and/or update the reference buffers. - virtual int EncodeFlags(uint32_t timestamp) = 0; - - // Update state based on new bitrate target and incoming framerate. - // Returns the bitrate allocation for the active temporal layers. - virtual std::vector OnRatesUpdated(int bitrate_kbps, - int max_bitrate_kbps, - int framerate) = 0; - - // Update the encoder configuration with target bitrates or other parameters. - // Returns true iff the configuration was actually modified. - virtual bool UpdateConfiguration(vpx_codec_enc_cfg_t* cfg) = 0; - - virtual void PopulateCodecSpecific(bool base_layer_sync, - CodecSpecificInfoVP8* vp8_info, - uint32_t timestamp) = 0; - - virtual void FrameEncoded(unsigned int size, uint32_t timestamp, int qp) = 0; - - virtual int CurrentLayerId() const = 0; -}; - -class TemporalLayersListener; -class TemporalLayersFactory { - public: - TemporalLayersFactory() : listener_(nullptr) {} - virtual ~TemporalLayersFactory() {} - virtual TemporalLayers* Create(int simulcast_id, - int temporal_layers, - uint8_t initial_tl0_pic_idx) const; - void SetListener(TemporalLayersListener* listener); - - protected: - TemporalLayersListener* listener_; -}; - -class ScreenshareTemporalLayersFactory : public webrtc::TemporalLayersFactory { - public: - ScreenshareTemporalLayersFactory() {} - virtual ~ScreenshareTemporalLayersFactory() {} - - webrtc::TemporalLayers* Create(int simulcast_id, - int num_temporal_layers, - uint8_t initial_tl0_pic_idx) const override; -}; - -// Factory for a temporal layers strategy that adaptively changes the number of -// layers based on input frame rate so that the base layer has an acceptable -// frame rate. See realtime_temporal_layers.cc -class RealTimeTemporalLayersFactory : public TemporalLayersFactory { - public: - RealTimeTemporalLayersFactory() {} - ~RealTimeTemporalLayersFactory() override {} - TemporalLayers* Create(int simulcast_id, - int num_temporal_layers, - uint8_t initial_tl0_pic_idx) const override; -}; - -class TemporalLayersListener { - public: - TemporalLayersListener() {} - virtual ~TemporalLayersListener() {} - - virtual void OnTemporalLayersCreated(int simulcast_id, - TemporalLayers* layers) = 0; -}; - -} // namespace webrtc -#endif // WEBRTC_MODULES_VIDEO_CODING_CODECS_VP8_TEMPORAL_LAYERS_H_ diff --git a/WebRtc.NET/include/webrtc/modules/video_coding/codecs/vp8/vp8_impl.h b/WebRtc.NET/include/webrtc/modules/video_coding/codecs/vp8/vp8_impl.h deleted file mode 100644 index d24dfa36..00000000 --- a/WebRtc.NET/include/webrtc/modules/video_coding/codecs/vp8/vp8_impl.h +++ /dev/null @@ -1,169 +0,0 @@ -/* - * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - * - * WEBRTC VP8 wrapper interface - */ - -#ifndef WEBRTC_MODULES_VIDEO_CODING_CODECS_VP8_VP8_IMPL_H_ -#define WEBRTC_MODULES_VIDEO_CODING_CODECS_VP8_VP8_IMPL_H_ - -#include -#include - -// NOTE: This include order must remain to avoid compile errors, even though -// it breaks the style guide. -#include "vpx/vpx_encoder.h" -#include "vpx/vpx_decoder.h" -#include "vpx/vp8cx.h" -#include "vpx/vp8dx.h" - -#include "webrtc/api/video/video_frame.h" -#include "webrtc/common_video/include/i420_buffer_pool.h" -#include "webrtc/modules/video_coding/include/video_codec_interface.h" -#include "webrtc/modules/video_coding/codecs/vp8/include/vp8.h" -#include "webrtc/modules/video_coding/codecs/vp8/reference_picture_selection.h" -#include "webrtc/modules/video_coding/utility/quality_scaler.h" -#include "webrtc/video_frame.h" - -namespace webrtc { - -class TemporalLayers; - -class VP8EncoderImpl : public VP8Encoder { - public: - VP8EncoderImpl(); - - virtual ~VP8EncoderImpl(); - - int Release() override; - - int InitEncode(const VideoCodec* codec_settings, - int number_of_cores, - size_t max_payload_size) override; - - int Encode(const VideoFrame& input_image, - const CodecSpecificInfo* codec_specific_info, - const std::vector* frame_types) override; - - int RegisterEncodeCompleteCallback(EncodedImageCallback* callback) override; - - int SetChannelParameters(uint32_t packet_loss, int64_t rtt) override; - - int SetRateAllocation(const BitrateAllocation& bitrate, - uint32_t new_framerate) override; - - ScalingSettings GetScalingSettings() const override; - - const char* ImplementationName() const override; - - private: - void SetupTemporalLayers(int num_streams, - int num_temporal_layers, - const VideoCodec& codec); - - // Set the cpu_speed setting for encoder based on resolution and/or platform. - int SetCpuSpeed(int width, int height); - - // Determine number of encoder threads to use. - int NumberOfThreads(int width, int height, int number_of_cores); - - // Call encoder initialize function and set control settings. - int InitAndSetControlSettings(); - - // Update frame size for codec. - int UpdateCodecFrameSize(int width, int height); - - void PopulateCodecSpecific(CodecSpecificInfo* codec_specific, - const vpx_codec_cx_pkt& pkt, - int stream_idx, - uint32_t timestamp, - bool only_predicting_from_key_frame); - - int GetEncodedPartitions(const VideoFrame& input_image, - bool only_predicting_from_key_frame); - - // Set the stream state for stream |stream_idx|. - void SetStreamState(bool send_stream, int stream_idx); - - uint32_t MaxIntraTarget(uint32_t optimal_buffer_size); - - EncodedImageCallback* encoded_complete_callback_; - VideoCodec codec_; - bool inited_; - int64_t timestamp_; - bool feedback_mode_; - int qp_max_; - int cpu_speed_default_; - int number_of_cores_; - uint32_t rc_max_intra_target_; - int token_partitions_; - ReferencePictureSelection rps_; - std::vector temporal_layers_; - bool down_scale_requested_; - uint32_t down_scale_bitrate_; - std::vector picture_id_; - std::vector last_key_frame_picture_id_; - std::vector key_frame_request_; - std::vector send_stream_; - std::vector cpu_speed_; - std::vector raw_images_; - std::vector encoded_images_; - std::vector encoders_; - std::vector configurations_; - std::vector downsampling_factors_; -}; // end of VP8EncoderImpl class - -class VP8DecoderImpl : public VP8Decoder { - public: - VP8DecoderImpl(); - - virtual ~VP8DecoderImpl(); - - int InitDecode(const VideoCodec* inst, int number_of_cores) override; - - int Decode(const EncodedImage& input_image, - bool missing_frames, - const RTPFragmentationHeader* fragmentation, - const CodecSpecificInfo* codec_specific_info, - int64_t /*render_time_ms*/) override; - - int RegisterDecodeCompleteCallback(DecodedImageCallback* callback) override; - int Release() override; - - const char* ImplementationName() const override; - - private: - // Copy reference image from this _decoder to the _decoder in copyTo. Set - // which frame type to copy in _refFrame->frame_type before the call to - // this function. - int CopyReference(VP8DecoderImpl* copy); - - int DecodePartitions(const EncodedImage& input_image, - const RTPFragmentationHeader* fragmentation); - - int ReturnFrame(const vpx_image_t* img, - uint32_t timeStamp, - int64_t ntp_time_ms); - - I420BufferPool buffer_pool_; - DecodedImageCallback* decode_complete_callback_; - bool inited_; - bool feedback_mode_; - vpx_codec_ctx_t* decoder_; - VideoCodec codec_; - int image_format_; - vpx_ref_frame_t* ref_frame_; - int propagation_cnt_; - int last_frame_width_; - int last_frame_height_; - bool key_frame_required_; -}; // end of VP8DecoderImpl class -} // namespace webrtc - -#endif // WEBRTC_MODULES_VIDEO_CODING_CODECS_VP8_VP8_IMPL_H_ diff --git a/WebRtc.NET/include/webrtc/modules/video_coding/codecs/vp9/include/vp9.h b/WebRtc.NET/include/webrtc/modules/video_coding/codecs/vp9/include/vp9.h deleted file mode 100644 index 3b726a0c..00000000 --- a/WebRtc.NET/include/webrtc/modules/video_coding/codecs/vp9/include/vp9.h +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright (c) 2014 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - * - */ - -#ifndef WEBRTC_MODULES_VIDEO_CODING_CODECS_VP9_INCLUDE_VP9_H_ -#define WEBRTC_MODULES_VIDEO_CODING_CODECS_VP9_INCLUDE_VP9_H_ - -#include "webrtc/modules/video_coding/include/video_codec_interface.h" - -namespace webrtc { - -class VP9Encoder : public VideoEncoder { - public: - static bool IsSupported(); - static VP9Encoder* Create(); - - virtual ~VP9Encoder() {} -}; - -class VP9Decoder : public VideoDecoder { - public: - static bool IsSupported(); - static VP9Decoder* Create(); - - virtual ~VP9Decoder() {} -}; -} // namespace webrtc - -#endif // WEBRTC_MODULES_VIDEO_CODING_CODECS_VP9_INCLUDE_VP9_H_ diff --git a/WebRtc.NET/include/webrtc/modules/video_coding/codecs/vp9/screenshare_layers.h b/WebRtc.NET/include/webrtc/modules/video_coding/codecs/vp9/screenshare_layers.h deleted file mode 100644 index 5a901ae3..00000000 --- a/WebRtc.NET/include/webrtc/modules/video_coding/codecs/vp9/screenshare_layers.h +++ /dev/null @@ -1,66 +0,0 @@ -/* Copyright (c) 2015 The WebRTC project authors. All Rights Reserved. -* -* Use of this source code is governed by a BSD-style license -* that can be found in the LICENSE file in the root of the source -* tree. An additional intellectual property rights grant can be found -* in the file PATENTS. All contributing project authors may -* be found in the AUTHORS file in the root of the source tree. -*/ - -#ifndef WEBRTC_MODULES_VIDEO_CODING_CODECS_VP9_SCREENSHARE_LAYERS_H_ -#define WEBRTC_MODULES_VIDEO_CODING_CODECS_VP9_SCREENSHARE_LAYERS_H_ - -#include "webrtc/modules/video_coding/codecs/vp9/vp9_impl.h" - -namespace webrtc { - -class ScreenshareLayersVP9 { - public: - explicit ScreenshareLayersVP9(uint8_t num_layers); - - // The target bitrate for layer with id layer_id. - void ConfigureBitrate(int threshold_kbps, uint8_t layer_id); - - // The current start layer. - uint8_t GetStartLayer() const; - - // Update the layer with the size of the layer frame. - void LayerFrameEncoded(unsigned int size_bytes, uint8_t layer_id); - - // Get the layer settings for the next superframe. - // - // In short, each time the GetSuperFrameSettings is called the - // bitrate of every layer is calculated and if the cummulative - // bitrate exceeds the configured cummulative bitrates - // (ConfigureBitrate to configure) up to and including that - // layer then the resulting encoding settings for the - // superframe will only encode layers above that layer. - VP9EncoderImpl::SuperFrameRefSettings GetSuperFrameSettings( - uint32_t timestamp, - bool is_keyframe); - - private: - // How many layers that are used. - uint8_t num_layers_; - - // The index of the first layer to encode. - uint8_t start_layer_; - - // Cummulative target kbps for the different layers. - float threshold_kbps_[kMaxVp9NumberOfSpatialLayers - 1]; - - // How many bits that has been used for a certain layer. Increased in - // FrameEncoded() by the size of the encoded frame and decreased in - // GetSuperFrameSettings() depending on the time between frames. - float bits_used_[kMaxVp9NumberOfSpatialLayers]; - - // Timestamp of last frame. - uint32_t last_timestamp_; - - // If the last_timestamp_ has been set. - bool timestamp_initialized_; -}; - -} // namespace webrtc - -#endif // WEBRTC_MODULES_VIDEO_CODING_CODECS_VP9_SCREENSHARE_LAYERS_H_ diff --git a/WebRtc.NET/include/webrtc/modules/video_coding/codecs/vp9/vp9_impl.h b/WebRtc.NET/include/webrtc/modules/video_coding/codecs/vp9/vp9_impl.h deleted file mode 100644 index 7078c50a..00000000 --- a/WebRtc.NET/include/webrtc/modules/video_coding/codecs/vp9/vp9_impl.h +++ /dev/null @@ -1,169 +0,0 @@ -/* - * Copyright (c) 2014 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - * - */ - -#ifndef WEBRTC_MODULES_VIDEO_CODING_CODECS_VP9_VP9_IMPL_H_ -#define WEBRTC_MODULES_VIDEO_CODING_CODECS_VP9_VP9_IMPL_H_ - -#include -#include - -#include "webrtc/modules/video_coding/codecs/vp9/include/vp9.h" -#include "webrtc/modules/video_coding/codecs/vp9/vp9_frame_buffer_pool.h" - -#include "vpx/svc_context.h" -#include "vpx/vpx_decoder.h" -#include "vpx/vpx_encoder.h" - -namespace webrtc { - -class ScreenshareLayersVP9; - -class VP9EncoderImpl : public VP9Encoder { - public: - VP9EncoderImpl(); - - virtual ~VP9EncoderImpl(); - - int Release() override; - - int InitEncode(const VideoCodec* codec_settings, - int number_of_cores, - size_t max_payload_size) override; - - int Encode(const VideoFrame& input_image, - const CodecSpecificInfo* codec_specific_info, - const std::vector* frame_types) override; - - int RegisterEncodeCompleteCallback(EncodedImageCallback* callback) override; - - int SetChannelParameters(uint32_t packet_loss, int64_t rtt) override; - - int SetRateAllocation(const BitrateAllocation& bitrate_allocation, - uint32_t frame_rate) override; - - const char* ImplementationName() const override; - - struct LayerFrameRefSettings { - int8_t upd_buf = -1; // -1 - no update, 0..7 - update buffer 0..7 - int8_t ref_buf1 = -1; // -1 - no reference, 0..7 - reference buffer 0..7 - int8_t ref_buf2 = -1; // -1 - no reference, 0..7 - reference buffer 0..7 - int8_t ref_buf3 = -1; // -1 - no reference, 0..7 - reference buffer 0..7 - }; - - struct SuperFrameRefSettings { - LayerFrameRefSettings layer[kMaxVp9NumberOfSpatialLayers]; - uint8_t start_layer = 0; // The first spatial layer to be encoded. - uint8_t stop_layer = 0; // The last spatial layer to be encoded. - bool is_keyframe = false; - }; - - private: - // Determine number of encoder threads to use. - int NumberOfThreads(int width, int height, int number_of_cores); - - // Call encoder initialize function and set control settings. - int InitAndSetControlSettings(const VideoCodec* inst); - - void PopulateCodecSpecific(CodecSpecificInfo* codec_specific, - const vpx_codec_cx_pkt& pkt, - uint32_t timestamp); - - bool ExplicitlyConfiguredSpatialLayers() const; - bool SetSvcRates(); - - // Used for flexible mode to set the flags and buffer references used - // by the encoder. Also calculates the references used by the RTP - // packetizer. - // - // Has to be called for every frame (keyframes included) to update the - // state used to calculate references. - vpx_svc_ref_frame_config GenerateRefsAndFlags( - const SuperFrameRefSettings& settings); - - virtual int GetEncodedLayerFrame(const vpx_codec_cx_pkt* pkt); - - // Callback function for outputting packets per spatial layer. - static void EncoderOutputCodedPacketCallback(vpx_codec_cx_pkt* pkt, - void* user_data); - - // Determine maximum target for Intra frames - // - // Input: - // - optimal_buffer_size : Optimal buffer size - // Return Value : Max target size for Intra frames represented as - // percentage of the per frame bandwidth - uint32_t MaxIntraTarget(uint32_t optimal_buffer_size); - - EncodedImage encoded_image_; - EncodedImageCallback* encoded_complete_callback_; - VideoCodec codec_; - bool inited_; - int64_t timestamp_; - uint16_t picture_id_; - int cpu_speed_; - uint32_t rc_max_intra_target_; - vpx_codec_ctx_t* encoder_; - vpx_codec_enc_cfg_t* config_; - vpx_image_t* raw_; - SvcInternal_t svc_internal_; - const VideoFrame* input_image_; - GofInfoVP9 gof_; // Contains each frame's temporal information for - // non-flexible mode. - uint8_t tl0_pic_idx_; // Only used in non-flexible mode. - size_t frames_since_kf_; - uint8_t num_temporal_layers_; - uint8_t num_spatial_layers_; - - // Used for flexible mode. - bool is_flexible_mode_; - int64_t buffer_updated_at_frame_[kNumVp9Buffers]; - int64_t frames_encoded_; - uint8_t num_ref_pics_[kMaxVp9NumberOfSpatialLayers]; - uint8_t p_diff_[kMaxVp9NumberOfSpatialLayers][kMaxVp9RefPics]; - std::unique_ptr spatial_layer_; -}; - -class VP9DecoderImpl : public VP9Decoder { - public: - VP9DecoderImpl(); - - virtual ~VP9DecoderImpl(); - - int InitDecode(const VideoCodec* inst, int number_of_cores) override; - - int Decode(const EncodedImage& input_image, - bool missing_frames, - const RTPFragmentationHeader* fragmentation, - const CodecSpecificInfo* codec_specific_info, - int64_t /*render_time_ms*/) override; - - int RegisterDecodeCompleteCallback(DecodedImageCallback* callback) override; - - int Release() override; - - const char* ImplementationName() const override; - - private: - int ReturnFrame(const vpx_image_t* img, - uint32_t timestamp, - int64_t ntp_time_ms); - - // Memory pool used to share buffers between libvpx and webrtc. - Vp9FrameBufferPool frame_buffer_pool_; - DecodedImageCallback* decode_complete_callback_; - bool inited_; - vpx_codec_ctx_t* decoder_; - VideoCodec codec_; - bool key_frame_required_; -}; -} // namespace webrtc - -#endif // WEBRTC_MODULES_VIDEO_CODING_CODECS_VP9_VP9_IMPL_H_ diff --git a/WebRtc.NET/include/webrtc/modules/video_coding/encoded_frame.h b/WebRtc.NET/include/webrtc/modules/video_coding/encoded_frame.h deleted file mode 100644 index 840cd205..00000000 --- a/WebRtc.NET/include/webrtc/modules/video_coding/encoded_frame.h +++ /dev/null @@ -1,128 +0,0 @@ -/* - * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MODULES_VIDEO_CODING_ENCODED_FRAME_H_ -#define WEBRTC_MODULES_VIDEO_CODING_ENCODED_FRAME_H_ - -#include - -#include "webrtc/common_types.h" -#include "webrtc/common_video/include/video_image.h" -#include "webrtc/modules/include/module_common_types.h" -#include "webrtc/modules/video_coding/include/video_codec_interface.h" -#include "webrtc/modules/video_coding/include/video_coding_defines.h" - -namespace webrtc { - -class VCMEncodedFrame : protected EncodedImage { - public: - VCMEncodedFrame(); - explicit VCMEncodedFrame(const webrtc::EncodedImage& rhs); - VCMEncodedFrame(const VCMEncodedFrame& rhs); - - ~VCMEncodedFrame(); - /** - * Delete VideoFrame and resets members to zero - */ - void Free(); - /** - * Set render time in milliseconds - */ - void SetRenderTime(const int64_t renderTimeMs) { - _renderTimeMs = renderTimeMs; - } - - /** - * Set the encoded frame size - */ - void SetEncodedSize(uint32_t width, uint32_t height) { - _encodedWidth = width; - _encodedHeight = height; - } - /** - * Get the encoded image - */ - const webrtc::EncodedImage& EncodedImage() const { - return static_cast(*this); - } - /** - * Get pointer to frame buffer - */ - const uint8_t* Buffer() const { return _buffer; } - /** - * Get frame length - */ - size_t Length() const { return _length; } - /** - * Get frame timestamp (90kHz) - */ - uint32_t TimeStamp() const { return _timeStamp; } - /** - * Get render time in milliseconds - */ - int64_t RenderTimeMs() const { return _renderTimeMs; } - /** - * Get frame type - */ - webrtc::FrameType FrameType() const { return _frameType; } - /** - * Get frame rotation - */ - VideoRotation rotation() const { return rotation_; } - /** - * True if this frame is complete, false otherwise - */ - bool Complete() const { return _completeFrame; } - /** - * True if there's a frame missing before this frame - */ - bool MissingFrame() const { return _missingFrame; } - /** - * Payload type of the encoded payload - */ - uint8_t PayloadType() const { return _payloadType; } - /** - * Get codec specific info. - * The returned pointer is only valid as long as the VCMEncodedFrame - * is valid. Also, VCMEncodedFrame owns the pointer and will delete - * the object. - */ - const CodecSpecificInfo* CodecSpecific() const { return &_codecSpecificInfo; } - - protected: - /** - * Verifies that current allocated buffer size is larger than or equal to the - * input size. - * If the current buffer size is smaller, a new allocation is made and the old - * buffer data - * is copied to the new buffer. - * Buffer size is updated to minimumSize. - */ - void VerifyAndAllocate(size_t minimumSize); - - void Reset(); - - void CopyCodecSpecific(const RTPVideoHeader* header); - - int64_t _renderTimeMs; - uint8_t _payloadType; - bool _missingFrame; - CodecSpecificInfo _codecSpecificInfo; - webrtc::VideoCodecType _codec; - - // Video rotation is only set along with the last packet for each frame - // (same as marker bit). This |_rotation_set| is only for debugging purpose - // to ensure we don't set it twice for a frame. - bool _rotation_set; -}; - -} // namespace webrtc - -#endif // WEBRTC_MODULES_VIDEO_CODING_ENCODED_FRAME_H_ diff --git a/WebRtc.NET/include/webrtc/modules/video_coding/frame_buffer.h b/WebRtc.NET/include/webrtc/modules/video_coding/frame_buffer.h deleted file mode 100644 index 95c59853..00000000 --- a/WebRtc.NET/include/webrtc/modules/video_coding/frame_buffer.h +++ /dev/null @@ -1,96 +0,0 @@ -/* - * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MODULES_VIDEO_CODING_FRAME_BUFFER_H_ -#define WEBRTC_MODULES_VIDEO_CODING_FRAME_BUFFER_H_ - -#include - -#include "webrtc/modules/include/module_common_types.h" -#include "webrtc/modules/video_coding/include/video_coding.h" -#include "webrtc/modules/video_coding/encoded_frame.h" -#include "webrtc/modules/video_coding/jitter_buffer_common.h" -#include "webrtc/modules/video_coding/session_info.h" -#include "webrtc/typedefs.h" - -namespace webrtc { - -class VCMFrameBuffer : public VCMEncodedFrame { - public: - VCMFrameBuffer(); - virtual ~VCMFrameBuffer(); - - VCMFrameBuffer(const VCMFrameBuffer& rhs); - - virtual void Reset(); - - VCMFrameBufferEnum InsertPacket(const VCMPacket& packet, - int64_t timeInMs, - VCMDecodeErrorMode decode_error_mode, - const FrameData& frame_data); - - // State - // Get current state of frame - VCMFrameBufferStateEnum GetState() const; - // Get current state and timestamp of frame - VCMFrameBufferStateEnum GetState(uint32_t& timeStamp) const; - void PrepareForDecode(bool continuous); - - bool IsRetransmitted() const; - bool IsSessionComplete() const; - bool HaveFirstPacket() const; - bool HaveLastPacket() const; - int NumPackets() const; - // Makes sure the session contain a decodable stream. - void MakeSessionDecodable(); - - // Sequence numbers - // Get lowest packet sequence number in frame - int32_t GetLowSeqNum() const; - // Get highest packet sequence number in frame - int32_t GetHighSeqNum() const; - - int PictureId() const; - int TemporalId() const; - bool LayerSync() const; - int Tl0PicId() const; - bool NonReference() const; - - std::vector GetNaluInfos() const; - - void SetGofInfo(const GofInfoVP9& gof_info, size_t idx); - - // Increments a counter to keep track of the number of packets of this frame - // which were NACKed before they arrived. - void IncrementNackCount(); - // Returns the number of packets of this frame which were NACKed before they - // arrived. - int16_t GetNackCount() const; - - int64_t LatestPacketTimeMs() const; - - webrtc::FrameType FrameType() const; - void SetPreviousFrameLoss(); - - // The number of packets discarded because the decoder can't make use of them. - int NotDecodablePackets() const; - - private: - void SetState(VCMFrameBufferStateEnum state); // Set state of frame - - VCMFrameBufferStateEnum _state; // Current state of the frame - VCMSessionInfo _sessionInfo; - uint16_t _nackCount; - int64_t _latestPacketTimeMs; -}; - -} // namespace webrtc - -#endif // WEBRTC_MODULES_VIDEO_CODING_FRAME_BUFFER_H_ diff --git a/WebRtc.NET/include/webrtc/modules/video_coding/frame_buffer2.h b/WebRtc.NET/include/webrtc/modules/video_coding/frame_buffer2.h deleted file mode 100644 index f667fd53..00000000 --- a/WebRtc.NET/include/webrtc/modules/video_coding/frame_buffer2.h +++ /dev/null @@ -1,178 +0,0 @@ -/* - * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MODULES_VIDEO_CODING_FRAME_BUFFER2_H_ -#define WEBRTC_MODULES_VIDEO_CODING_FRAME_BUFFER2_H_ - -#include -#include -#include -#include - -#include "webrtc/base/constructormagic.h" -#include "webrtc/base/criticalsection.h" -#include "webrtc/base/event.h" -#include "webrtc/base/thread_annotations.h" -#include "webrtc/modules/video_coding/frame_object.h" -#include "webrtc/modules/video_coding/include/video_coding_defines.h" -#include "webrtc/modules/video_coding/inter_frame_delay.h" -#include "webrtc/modules/video_coding/sequence_number_util.h" - -namespace webrtc { - -class Clock; -class VCMJitterEstimator; -class VCMTiming; - -namespace video_coding { - -class FrameBuffer { - public: - enum ReturnReason { kFrameFound, kTimeout, kStopped }; - - FrameBuffer(Clock* clock, - VCMJitterEstimator* jitter_estimator, - VCMTiming* timing); - - virtual ~FrameBuffer(); - - // Insert a frame into the frame buffer. Returns the picture id - // of the last continuous frame or -1 if there is no continuous frame. - int InsertFrame(std::unique_ptr frame); - - // Get the next frame for decoding. Will return at latest after - // |max_wait_time_ms|. - // - If a frame is available within |max_wait_time_ms| it will return - // kFrameFound and set |frame_out| to the resulting frame. - // - If no frame is available after |max_wait_time_ms| it will return - // kTimeout. - // - If the FrameBuffer is stopped then it will return kStopped. - ReturnReason NextFrame(int64_t max_wait_time_ms, - std::unique_ptr* frame_out); - - // Tells the FrameBuffer which protection mode that is in use. Affects - // the frame timing. - // TODO(philipel): Remove this when new timing calculations has been - // implemented. - void SetProtectionMode(VCMVideoProtection mode); - - // Start the frame buffer, has no effect if the frame buffer is started. - // The frame buffer is started upon construction. - void Start(); - - // Stop the frame buffer, causing any sleeping thread in NextFrame to - // return immediately. - void Stop(); - - private: - struct FrameKey { - FrameKey() : picture_id(0), spatial_layer(0) {} - FrameKey(uint16_t picture_id, uint8_t spatial_layer) - : picture_id(picture_id), spatial_layer(spatial_layer) {} - - bool operator<(const FrameKey& rhs) const { - if (picture_id == rhs.picture_id) - return spatial_layer < rhs.spatial_layer; - return AheadOf(rhs.picture_id, picture_id); - } - - bool operator<=(const FrameKey& rhs) const { return !(rhs < *this); } - - uint16_t picture_id; - uint8_t spatial_layer; - }; - - struct FrameInfo { - // The maximum number of frames that can depend on this frame. - static constexpr size_t kMaxNumDependentFrames = 8; - - // Which other frames that have direct unfulfilled dependencies - // on this frame. - FrameKey dependent_frames[kMaxNumDependentFrames]; - size_t num_dependent_frames = 0; - - // A frame is continiuous if it has all its referenced/indirectly - // referenced frames. - // - // How many unfulfilled frames this frame have until it becomes continuous. - size_t num_missing_continuous = 0; - - // A frame is decodable if all its referenced frames have been decoded. - // - // How many unfulfilled frames this frame have until it becomes decodable. - size_t num_missing_decodable = 0; - - // If this frame is continuous or not. - bool continuous = false; - - // The actual FrameObject. - std::unique_ptr frame; - }; - - using FrameMap = std::map; - - // Update all directly dependent and indirectly dependent frames and mark - // them as continuous if all their references has been fulfilled. - void PropagateContinuity(FrameMap::iterator start) - EXCLUSIVE_LOCKS_REQUIRED(crit_); - - // Marks the frame as decoded and updates all directly dependent frames. - void PropagateDecodability(const FrameInfo& info) - EXCLUSIVE_LOCKS_REQUIRED(crit_); - - // Advances |last_decoded_frame_it_| to |decoded| and removes old - // frame info. - void AdvanceLastDecodedFrame(FrameMap::iterator decoded) - EXCLUSIVE_LOCKS_REQUIRED(crit_); - - // Update the corresponding FrameInfo of |frame| and all FrameInfos that - // |frame| references. - // Return false if |frame| will never be decodable, true otherwise. - bool UpdateFrameInfoWithIncomingFrame(const FrameObject& frame, - FrameMap::iterator info) - EXCLUSIVE_LOCKS_REQUIRED(crit_); - - void UpdateJitterDelay() EXCLUSIVE_LOCKS_REQUIRED(crit_); - - void UpdateHistograms() const; - - void ClearFramesAndHistory() EXCLUSIVE_LOCKS_REQUIRED(crit_); - - FrameMap frames_ GUARDED_BY(crit_); - - rtc::CriticalSection crit_; - Clock* const clock_; - rtc::Event new_countinuous_frame_event_; - VCMJitterEstimator* const jitter_estimator_ GUARDED_BY(crit_); - VCMTiming* const timing_ GUARDED_BY(crit_); - VCMInterFrameDelay inter_frame_delay_ GUARDED_BY(crit_); - uint32_t last_decoded_frame_timestamp_ GUARDED_BY(crit_); - FrameMap::iterator last_decoded_frame_it_ GUARDED_BY(crit_); - FrameMap::iterator last_continuous_frame_it_ GUARDED_BY(crit_); - int num_frames_history_ GUARDED_BY(crit_); - int num_frames_buffered_ GUARDED_BY(crit_); - bool stopped_ GUARDED_BY(crit_); - VCMVideoProtection protection_mode_ GUARDED_BY(crit_); - - RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(FrameBuffer); - - // For WebRTC.Video.JitterBufferDelayInMs metric. - int64_t accumulated_delay_ = 0; - int64_t accumulated_delay_samples_ = 0; - - // For WebRTC.Video.KeyFramesReceivedInPermille metric. - int64_t num_total_frames_ = 0; - int64_t num_key_frames_ = 0; -}; - -} // namespace video_coding -} // namespace webrtc - -#endif // WEBRTC_MODULES_VIDEO_CODING_FRAME_BUFFER2_H_ diff --git a/WebRtc.NET/include/webrtc/modules/video_coding/frame_object.h b/WebRtc.NET/include/webrtc/modules/video_coding/frame_object.h deleted file mode 100644 index 915224ed..00000000 --- a/WebRtc.NET/include/webrtc/modules/video_coding/frame_object.h +++ /dev/null @@ -1,94 +0,0 @@ -/* - * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MODULES_VIDEO_CODING_FRAME_OBJECT_H_ -#define WEBRTC_MODULES_VIDEO_CODING_FRAME_OBJECT_H_ - -#include "webrtc/base/optional.h" -#include "webrtc/common_types.h" -#include "webrtc/modules/include/module_common_types.h" -#include "webrtc/modules/video_coding/encoded_frame.h" - -namespace webrtc { -namespace video_coding { - -class FrameObject : public webrtc::VCMEncodedFrame { - public: - static const uint8_t kMaxFrameReferences = 5; - - FrameObject(); - virtual ~FrameObject() {} - - virtual bool GetBitstream(uint8_t* destination) const = 0; - - // The capture timestamp of this frame. - virtual uint32_t Timestamp() const = 0; - - // When this frame was received. - virtual int64_t ReceivedTime() const = 0; - - // When this frame should be rendered. - virtual int64_t RenderTime() const = 0; - - size_t size() { return _length; } - - // The tuple (|picture_id|, |spatial_layer|) uniquely identifies a frame - // object. For codec types that don't necessarily have picture ids they - // have to be constructed from the header data relevant to that codec. - uint16_t picture_id; - uint8_t spatial_layer; - uint32_t timestamp; - - size_t num_references; - uint16_t references[kMaxFrameReferences]; - bool inter_layer_predicted; -}; - -class PacketBuffer; - -class RtpFrameObject : public FrameObject { - public: - RtpFrameObject(PacketBuffer* packet_buffer, - uint16_t first_seq_num, - uint16_t last_seq_num, - size_t frame_size, - int times_nacked, - int64_t received_time); - - ~RtpFrameObject(); - uint16_t first_seq_num() const; - uint16_t last_seq_num() const; - int times_nacked() const; - enum FrameType frame_type() const; - VideoCodecType codec_type() const; - bool GetBitstream(uint8_t* destination) const override; - uint32_t Timestamp() const override; - int64_t ReceivedTime() const override; - int64_t RenderTime() const override; - rtc::Optional GetCodecHeader() const; - - private: - rtc::scoped_refptr packet_buffer_; - enum FrameType frame_type_; - VideoCodecType codec_type_; - uint16_t first_seq_num_; - uint16_t last_seq_num_; - uint32_t timestamp_; - int64_t received_time_; - - // Equal to times nacked of the packet with the highet times nacked - // belonging to this frame. - int times_nacked_; -}; - -} // namespace video_coding -} // namespace webrtc - -#endif // WEBRTC_MODULES_VIDEO_CODING_FRAME_OBJECT_H_ diff --git a/WebRtc.NET/include/webrtc/modules/video_coding/generic_decoder.h b/WebRtc.NET/include/webrtc/modules/video_coding/generic_decoder.h deleted file mode 100644 index 2d0007be..00000000 --- a/WebRtc.NET/include/webrtc/modules/video_coding/generic_decoder.h +++ /dev/null @@ -1,106 +0,0 @@ -/* - * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MODULES_VIDEO_CODING_GENERIC_DECODER_H_ -#define WEBRTC_MODULES_VIDEO_CODING_GENERIC_DECODER_H_ - -#include "webrtc/modules/include/module_common_types.h" -#include "webrtc/modules/video_coding/include/video_codec_interface.h" -#include "webrtc/modules/video_coding/encoded_frame.h" -#include "webrtc/modules/video_coding/timestamp_map.h" -#include "webrtc/modules/video_coding/timing.h" - -namespace webrtc { - -class VCMReceiveCallback; - -enum { kDecoderFrameMemoryLength = 10 }; - -struct VCMFrameInformation { - int64_t renderTimeMs; - int64_t decodeStartTimeMs; - void* userData; - VideoRotation rotation; -}; - -class VCMDecodedFrameCallback : public DecodedImageCallback { - public: - VCMDecodedFrameCallback(VCMTiming* timing, Clock* clock); - virtual ~VCMDecodedFrameCallback(); - void SetUserReceiveCallback(VCMReceiveCallback* receiveCallback); - VCMReceiveCallback* UserReceiveCallback(); - - virtual int32_t Decoded(VideoFrame& decodedImage); // NOLINT - virtual int32_t Decoded(VideoFrame& decodedImage, // NOLINT - int64_t decode_time_ms); - virtual int32_t ReceivedDecodedReferenceFrame(const uint64_t pictureId); - virtual int32_t ReceivedDecodedFrame(const uint64_t pictureId); - - uint64_t LastReceivedPictureID() const; - void OnDecoderImplementationName(const char* implementation_name); - - void Map(uint32_t timestamp, VCMFrameInformation* frameInfo); - int32_t Pop(uint32_t timestamp); - - private: - // Protect |_receiveCallback| and |_timestampMap|. - CriticalSectionWrapper* _critSect; - Clock* _clock; - VCMReceiveCallback* _receiveCallback GUARDED_BY(_critSect); - VCMTiming* _timing; - VCMTimestampMap _timestampMap GUARDED_BY(_critSect); - uint64_t _lastReceivedPictureID; -}; - -class VCMGenericDecoder { - friend class VCMCodecDataBase; - - public: - explicit VCMGenericDecoder(VideoDecoder* decoder, bool isExternal = false); - ~VCMGenericDecoder(); - - /** - * Initialize the decoder with the information from the VideoCodec - */ - int32_t InitDecode(const VideoCodec* settings, int32_t numberOfCores); - - /** - * Decode to a raw I420 frame, - * - * inputVideoBuffer reference to encoded video frame - */ - int32_t Decode(const VCMEncodedFrame& inputFrame, int64_t nowMs); - - /** - * Free the decoder memory - */ - int32_t Release(); - - /** - * Set decode callback. Deregistering while decoding is illegal. - */ - int32_t RegisterDecodeCompleteCallback(VCMDecodedFrameCallback* callback); - - bool External() const; - bool PrefersLateDecoding() const; - - private: - VCMDecodedFrameCallback* _callback; - VCMFrameInformation _frameInfos[kDecoderFrameMemoryLength]; - uint32_t _nextFrameInfoIdx; - VideoDecoder* const _decoder; - VideoCodecType _codecType; - bool _isExternal; - bool _keyFrameDecoded; -}; - -} // namespace webrtc - -#endif // WEBRTC_MODULES_VIDEO_CODING_GENERIC_DECODER_H_ diff --git a/WebRtc.NET/include/webrtc/modules/video_coding/generic_encoder.h b/WebRtc.NET/include/webrtc/modules/video_coding/generic_encoder.h deleted file mode 100644 index 4d2ea2f3..00000000 --- a/WebRtc.NET/include/webrtc/modules/video_coding/generic_encoder.h +++ /dev/null @@ -1,96 +0,0 @@ -/* - * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MODULES_VIDEO_CODING_GENERIC_ENCODER_H_ -#define WEBRTC_MODULES_VIDEO_CODING_GENERIC_ENCODER_H_ - -#include -#include - -#include "webrtc/modules/video_coding/include/video_codec_interface.h" -#include "webrtc/modules/video_coding/include/video_coding_defines.h" - -#include "webrtc/base/criticalsection.h" -#include "webrtc/base/race_checker.h" - -namespace webrtc { -class CriticalSectionWrapper; - -namespace media_optimization { -class MediaOptimization; -} // namespace media_optimization - -struct EncoderParameters { - BitrateAllocation target_bitrate; - uint8_t loss_rate; - int64_t rtt; - uint32_t input_frame_rate; -}; - -class VCMEncodedFrameCallback : public EncodedImageCallback { - public: - VCMEncodedFrameCallback(EncodedImageCallback* post_encode_callback, - media_optimization::MediaOptimization* media_opt); - virtual ~VCMEncodedFrameCallback(); - - // Implements EncodedImageCallback. - EncodedImageCallback::Result OnEncodedImage( - const EncodedImage& encoded_image, - const CodecSpecificInfo* codec_specific_info, - const RTPFragmentationHeader* fragmentation) override; - void SetInternalSource(bool internal_source) { - internal_source_ = internal_source; - } - - private: - bool internal_source_; - EncodedImageCallback* const post_encode_callback_; - media_optimization::MediaOptimization* const media_opt_; -}; - -class VCMGenericEncoder { - friend class VCMCodecDataBase; - - public: - VCMGenericEncoder(VideoEncoder* encoder, - VCMEncodedFrameCallback* encoded_frame_callback, - bool internal_source); - ~VCMGenericEncoder(); - int32_t Release(); - int32_t InitEncode(const VideoCodec* settings, - int32_t number_of_cores, - size_t max_payload_size); - int32_t Encode(const VideoFrame& frame, - const CodecSpecificInfo* codec_specific, - const std::vector& frame_types); - - void SetEncoderParameters(const EncoderParameters& params); - EncoderParameters GetEncoderParameters() const; - - int32_t SetPeriodicKeyFrames(bool enable); - int32_t RequestFrame(const std::vector& frame_types); - bool InternalSource() const; - void OnDroppedFrame(); - bool SupportsNativeHandle() const; - - private: - rtc::RaceChecker race_checker_; - - VideoEncoder* const encoder_ GUARDED_BY(race_checker_); - VCMEncodedFrameCallback* const vcm_encoded_frame_callback_; - const bool internal_source_; - rtc::CriticalSection params_lock_; - EncoderParameters encoder_params_ GUARDED_BY(params_lock_); - bool is_screenshare_; -}; - -} // namespace webrtc - -#endif // WEBRTC_MODULES_VIDEO_CODING_GENERIC_ENCODER_H_ diff --git a/WebRtc.NET/include/webrtc/modules/video_coding/h264_sps_pps_tracker.h b/WebRtc.NET/include/webrtc/modules/video_coding/h264_sps_pps_tracker.h deleted file mode 100644 index db44ea5f..00000000 --- a/WebRtc.NET/include/webrtc/modules/video_coding/h264_sps_pps_tracker.h +++ /dev/null @@ -1,54 +0,0 @@ -/* - * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MODULES_VIDEO_CODING_H264_SPS_PPS_TRACKER_H_ -#define WEBRTC_MODULES_VIDEO_CODING_H264_SPS_PPS_TRACKER_H_ - -#include -#include -#include -#include - -#include "webrtc/modules/include/module_common_types.h" - -namespace webrtc { - -class VCMPacket; - -namespace video_coding { - -class H264SpsPpsTracker { - public: - enum PacketAction { kInsert, kDrop, kRequestKeyframe }; - - PacketAction CopyAndFixBitstream(VCMPacket* packet); - void InsertSpsPps(const std::vector& sps, - const std::vector& pps); - - private: - struct PpsInfo { - int sps_id = -1; - size_t size = 0; - std::unique_ptr data; - }; - - struct SpsInfo { - size_t size = 0; - std::unique_ptr data; - }; - - std::map pps_data_; - std::map sps_data_; -}; - -} // namespace video_coding -} // namespace webrtc - -#endif // WEBRTC_MODULES_VIDEO_CODING_H264_SPS_PPS_TRACKER_H_ diff --git a/WebRtc.NET/include/webrtc/modules/video_coding/histogram.h b/WebRtc.NET/include/webrtc/modules/video_coding/histogram.h deleted file mode 100644 index 7a99a1c0..00000000 --- a/WebRtc.NET/include/webrtc/modules/video_coding/histogram.h +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MODULES_VIDEO_CODING_HISTOGRAM_H_ -#define WEBRTC_MODULES_VIDEO_CODING_HISTOGRAM_H_ - -#include -#include - -namespace webrtc { -namespace video_coding { -class Histogram { - public: - // A discrete histogram where every bucket with range [0, num_buckets). - // Values greater or equal to num_buckets will be placed in the last bucket. - Histogram(size_t num_buckets, size_t max_num_values); - - // Add a value to the histogram. If there already is max_num_values in the - // histogram then the oldest value will be replaced with the new value. - void Add(size_t value); - - // Calculates how many buckets have to be summed in order to accumulate at - // least the given probability. - size_t InverseCdf(float probability) const; - - // How many values that make up this histogram. - size_t NumValues() const; - - private: - // A circular buffer that holds the values that make up the histogram. - std::vector values_; - std::vector buckets_; - size_t index_; -}; - -} // namespace video_coding -} // namespace webrtc - -#endif // WEBRTC_MODULES_VIDEO_CODING_HISTOGRAM_H_ diff --git a/WebRtc.NET/include/webrtc/modules/video_coding/include/mock/mock_vcm_callbacks.h b/WebRtc.NET/include/webrtc/modules/video_coding/include/mock/mock_vcm_callbacks.h deleted file mode 100644 index 35362b96..00000000 --- a/WebRtc.NET/include/webrtc/modules/video_coding/include/mock/mock_vcm_callbacks.h +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MODULES_VIDEO_CODING_INCLUDE_MOCK_MOCK_VCM_CALLBACKS_H_ -#define WEBRTC_MODULES_VIDEO_CODING_INCLUDE_MOCK_MOCK_VCM_CALLBACKS_H_ - -#include "webrtc/modules/video_coding/include/video_coding_defines.h" -#include "webrtc/test/gmock.h" -#include "webrtc/typedefs.h" - -namespace webrtc { - -class MockVCMFrameTypeCallback : public VCMFrameTypeCallback { - public: - MOCK_METHOD0(RequestKeyFrame, int32_t()); - MOCK_METHOD1(SliceLossIndicationRequest, int32_t(const uint64_t pictureId)); -}; - -class MockPacketRequestCallback : public VCMPacketRequestCallback { - public: - MOCK_METHOD2(ResendPackets, - int32_t(const uint16_t* sequenceNumbers, uint16_t length)); -}; - -} // namespace webrtc - -#endif // WEBRTC_MODULES_VIDEO_CODING_INCLUDE_MOCK_MOCK_VCM_CALLBACKS_H_ diff --git a/WebRtc.NET/include/webrtc/modules/video_coding/include/mock/mock_video_codec_interface.h b/WebRtc.NET/include/webrtc/modules/video_coding/include/mock/mock_video_codec_interface.h deleted file mode 100644 index 7e2076cc..00000000 --- a/WebRtc.NET/include/webrtc/modules/video_coding/include/mock/mock_video_codec_interface.h +++ /dev/null @@ -1,83 +0,0 @@ -/* - * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MODULES_VIDEO_CODING_INCLUDE_MOCK_MOCK_VIDEO_CODEC_INTERFACE_H_ -#define WEBRTC_MODULES_VIDEO_CODING_INCLUDE_MOCK_MOCK_VIDEO_CODEC_INTERFACE_H_ - -#include -#include - -#include "webrtc/modules/video_coding/include/video_codec_interface.h" -#include "webrtc/test/gmock.h" -#include "webrtc/typedefs.h" - -namespace webrtc { - -class MockEncodedImageCallback : public EncodedImageCallback { - public: - MOCK_METHOD3(OnEncodedImage, - Result(const EncodedImage& encodedImage, - const CodecSpecificInfo* codecSpecificInfo, - const RTPFragmentationHeader* fragmentation)); -}; - -class MockVideoEncoder : public VideoEncoder { - public: - MOCK_CONST_METHOD2(Version, int32_t(int8_t* version, int32_t length)); - MOCK_METHOD3(InitEncode, - int32_t(const VideoCodec* codecSettings, - int32_t numberOfCores, - size_t maxPayloadSize)); - MOCK_METHOD3(Encode, - int32_t(const VideoFrame& inputImage, - const CodecSpecificInfo* codecSpecificInfo, - const std::vector* frame_types)); - MOCK_METHOD1(RegisterEncodeCompleteCallback, - int32_t(EncodedImageCallback* callback)); - MOCK_METHOD0(Release, int32_t()); - MOCK_METHOD0(Reset, int32_t()); - MOCK_METHOD2(SetChannelParameters, int32_t(uint32_t packetLoss, int64_t rtt)); - MOCK_METHOD2(SetRates, int32_t(uint32_t newBitRate, uint32_t frameRate)); - MOCK_METHOD2(SetRateAllocation, - int32_t(const BitrateAllocation& newBitRate, - uint32_t frameRate)); - MOCK_METHOD1(SetPeriodicKeyFrames, int32_t(bool enable)); -}; - -class MockDecodedImageCallback : public DecodedImageCallback { - public: - MOCK_METHOD1(Decoded, int32_t(VideoFrame& decodedImage)); // NOLINT - MOCK_METHOD2(Decoded, - int32_t(VideoFrame& decodedImage, // NOLINT - int64_t decode_time_ms)); - MOCK_METHOD1(ReceivedDecodedReferenceFrame, - int32_t(const uint64_t pictureId)); - MOCK_METHOD1(ReceivedDecodedFrame, int32_t(const uint64_t pictureId)); -}; - -class MockVideoDecoder : public VideoDecoder { - public: - MOCK_METHOD2(InitDecode, - int32_t(const VideoCodec* codecSettings, int32_t numberOfCores)); - MOCK_METHOD5(Decode, - int32_t(const EncodedImage& inputImage, - bool missingFrames, - const RTPFragmentationHeader* fragmentation, - const CodecSpecificInfo* codecSpecificInfo, - int64_t renderTimeMs)); - MOCK_METHOD1(RegisterDecodeCompleteCallback, - int32_t(DecodedImageCallback* callback)); - MOCK_METHOD0(Release, int32_t()); - MOCK_METHOD0(Copy, VideoDecoder*()); -}; - -} // namespace webrtc - -#endif // WEBRTC_MODULES_VIDEO_CODING_INCLUDE_MOCK_MOCK_VIDEO_CODEC_INTERFACE_H_ diff --git a/WebRtc.NET/include/webrtc/modules/video_coding/include/video_codec_initializer.h b/WebRtc.NET/include/webrtc/modules/video_coding/include/video_codec_initializer.h deleted file mode 100644 index 159218d5..00000000 --- a/WebRtc.NET/include/webrtc/modules/video_coding/include/video_codec_initializer.h +++ /dev/null @@ -1,61 +0,0 @@ -/* - * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MODULES_VIDEO_CODING_INCLUDE_VIDEO_CODEC_INITIALIZER_H_ -#define WEBRTC_MODULES_VIDEO_CODING_INCLUDE_VIDEO_CODEC_INITIALIZER_H_ - -#include -#include -#include - -#include "webrtc/video_send_stream.h" - -namespace webrtc { - -class TemporalLayersFactory; -class VideoBitrateAllocator; -class VideoCodec; -class VideoEncoderConfig; - -class VideoCodecInitializer { - public: - // Takes an EncoderSettings, a VideoEncoderConfig and the VideoStream - // configuration and translated them into the old school VideoCodec type. - // It also creates a VideoBitrateAllocator instance, suitable for the codec - // type used. For instance, VP8 will create an allocator than can handle - // simulcast and temporal layering. - // GetBitrateAllocator is called implicitly from here, no need to call again. - static bool SetupCodec( - const VideoEncoderConfig& config, - const VideoSendStream::Config::EncoderSettings settings, - const std::vector& streams, - bool nack_enabled, - VideoCodec* codec, - std::unique_ptr* bitrate_allocator); - - // Create a bitrate allocator for the specified codec. |tl_factory| is - // optional, if it is populated, ownership of that instance will be - // transferred to the VideoBitrateAllocator instance. - static std::unique_ptr CreateBitrateAllocator( - const VideoCodec& codec, - std::unique_ptr tl_factory); - - private: - static VideoCodec VideoEncoderConfigToVideoCodec( - const VideoEncoderConfig& config, - const std::vector& streams, - const std::string& payload_name, - int payload_type, - bool nack_enabled); -}; - -} // namespace webrtc - -#endif // WEBRTC_MODULES_VIDEO_CODING_INCLUDE_VIDEO_CODEC_INITIALIZER_H_ diff --git a/WebRtc.NET/include/webrtc/modules/video_coding/include/video_codec_interface.h b/WebRtc.NET/include/webrtc/modules/video_coding/include/video_codec_interface.h deleted file mode 100644 index 306fbef6..00000000 --- a/WebRtc.NET/include/webrtc/modules/video_coding/include/video_codec_interface.h +++ /dev/null @@ -1,103 +0,0 @@ -/* - * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MODULES_VIDEO_CODING_INCLUDE_VIDEO_CODEC_INTERFACE_H_ -#define WEBRTC_MODULES_VIDEO_CODING_INCLUDE_VIDEO_CODEC_INTERFACE_H_ - -#include - -#include "webrtc/api/video/video_frame.h" -#include "webrtc/common_types.h" -#include "webrtc/modules/include/module_common_types.h" -#include "webrtc/modules/video_coding/include/video_error_codes.h" -#include "webrtc/typedefs.h" -#include "webrtc/video_decoder.h" -#include "webrtc/video_encoder.h" - -namespace webrtc { - -class RTPFragmentationHeader; // forward declaration - -// Note: if any pointers are added to this struct, it must be fitted -// with a copy-constructor. See below. -struct CodecSpecificInfoVP8 { - bool hasReceivedSLI; - uint8_t pictureIdSLI; - bool hasReceivedRPSI; - uint64_t pictureIdRPSI; - int16_t pictureId; // Negative value to skip pictureId. - bool nonReference; - uint8_t simulcastIdx; - uint8_t temporalIdx; - bool layerSync; - int tl0PicIdx; // Negative value to skip tl0PicIdx. - int8_t keyIdx; // Negative value to skip keyIdx. -}; - -struct CodecSpecificInfoVP9 { - bool has_received_sli; - uint8_t picture_id_sli; - bool has_received_rpsi; - uint64_t picture_id_rpsi; - int16_t picture_id; // Negative value to skip pictureId. - - bool inter_pic_predicted; // This layer frame is dependent on previously - // coded frame(s). - bool flexible_mode; - bool ss_data_available; - - int tl0_pic_idx; // Negative value to skip tl0PicIdx. - uint8_t temporal_idx; - uint8_t spatial_idx; - bool temporal_up_switch; - bool inter_layer_predicted; // Frame is dependent on directly lower spatial - // layer frame. - uint8_t gof_idx; - - // SS data. - size_t num_spatial_layers; // Always populated. - bool spatial_layer_resolution_present; - uint16_t width[kMaxVp9NumberOfSpatialLayers]; - uint16_t height[kMaxVp9NumberOfSpatialLayers]; - GofInfoVP9 gof; - - // Frame reference data. - uint8_t num_ref_pics; - uint8_t p_diff[kMaxVp9RefPics]; -}; - -struct CodecSpecificInfoGeneric { - uint8_t simulcast_idx; -}; - -struct CodecSpecificInfoH264 { - H264PacketizationMode packetization_mode; -}; - -union CodecSpecificInfoUnion { - CodecSpecificInfoGeneric generic; - CodecSpecificInfoVP8 VP8; - CodecSpecificInfoVP9 VP9; - CodecSpecificInfoH264 H264; -}; - -// Note: if any pointers are added to this struct or its sub-structs, it -// must be fitted with a copy-constructor. This is because it is copied -// in the copy-constructor of VCMEncodedFrame. -struct CodecSpecificInfo { - CodecSpecificInfo() : codecType(kVideoCodecUnknown), codec_name(nullptr) {} - VideoCodecType codecType; - const char* codec_name; - CodecSpecificInfoUnion codecSpecific; -}; - -} // namespace webrtc - -#endif // WEBRTC_MODULES_VIDEO_CODING_INCLUDE_VIDEO_CODEC_INTERFACE_H_ diff --git a/WebRtc.NET/include/webrtc/modules/video_coding/include/video_coding.h b/WebRtc.NET/include/webrtc/modules/video_coding/include/video_coding.h deleted file mode 100644 index f7f66a72..00000000 --- a/WebRtc.NET/include/webrtc/modules/video_coding/include/video_coding.h +++ /dev/null @@ -1,478 +0,0 @@ -/* - * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MODULES_VIDEO_CODING_INCLUDE_VIDEO_CODING_H_ -#define WEBRTC_MODULES_VIDEO_CODING_INCLUDE_VIDEO_CODING_H_ - -#if defined(WEBRTC_WIN) -// This is a workaround on Windows due to the fact that some Windows -// headers define CreateEvent as a macro to either CreateEventW or CreateEventA. -// This can cause problems since we use that name as well and could -// declare them as one thing here whereas in another place a windows header -// may have been included and then implementing CreateEvent() causes compilation -// errors. So for consistency, we include the main windows header here. -#include -#endif - -#include "webrtc/api/video/video_frame.h" -#include "webrtc/modules/include/module.h" -#include "webrtc/modules/include/module_common_types.h" -#include "webrtc/modules/video_coding/include/video_coding_defines.h" -#include "webrtc/system_wrappers/include/event_wrapper.h" - -namespace webrtc { - -class Clock; -class EncodedImageCallback; -// TODO(pbos): Remove VCMQMSettingsCallback completely. This might be done by -// removing the VCM and use VideoSender/VideoReceiver as a public interface -// directly. -class VCMQMSettingsCallback; -class VideoBitrateAllocator; -class VideoEncoder; -class VideoDecoder; -struct CodecSpecificInfo; - -class EventFactory { - public: - virtual ~EventFactory() {} - - virtual EventWrapper* CreateEvent() = 0; -}; - -class EventFactoryImpl : public EventFactory { - public: - virtual ~EventFactoryImpl() {} - - virtual EventWrapper* CreateEvent() { return EventWrapper::Create(); } -}; - -// Used to indicate which decode with errors mode should be used. -enum VCMDecodeErrorMode { - kNoErrors, // Never decode with errors. Video will freeze - // if nack is disabled. - kSelectiveErrors, // Frames that are determined decodable in - // VCMSessionInfo may be decoded with missing - // packets. As not all incomplete frames will be - // decodable, video will freeze if nack is disabled. - kWithErrors // Release frames as needed. Errors may be - // introduced as some encoded frames may not be - // complete. -}; - -class VideoCodingModule : public Module { - public: - enum SenderNackMode { kNackNone, kNackAll, kNackSelective }; - - enum ReceiverRobustness { kNone, kHardNack, kSoftNack, kReferenceSelection }; - - static VideoCodingModule* Create(Clock* clock, EventFactory* event_factory); - - static VideoCodingModule* Create( - Clock* clock, - VCMQMSettingsCallback* qm_settings_callback, - NackSender* nack_sender, - KeyFrameRequestSender* keyframe_request_sender, - EncodedImageCallback* pre_decode_image_callback); - - static VideoCodingModule* Create( - Clock* clock, - EventFactory* event_factory, - NackSender* nack_sender, - KeyFrameRequestSender* keyframe_request_sender); - - // Get supported codec settings using codec type - // - // Input: - // - codecType : The codec type to get settings for - // - codec : Memory where the codec settings will be stored - // - // Return value : VCM_OK, on success - // VCM_PARAMETER_ERROR if codec not supported - static void Codec(VideoCodecType codecType, VideoCodec* codec); - - /* - * Sender - */ - - // Registers a codec to be used for encoding. Calling this - // API multiple times overwrites any previously registered codecs. - // - // NOTE: Must be called on the thread that constructed the VCM instance. - // - // Input: - // - sendCodec : Settings for the codec to be registered. - // - numberOfCores : The number of cores the codec is allowed - // to use. - // - maxPayloadSize : The maximum size each payload is allowed - // to have. Usually MTU - overhead. - // - // Return value : VCM_OK, on success. - // < 0, on error. - virtual int32_t RegisterSendCodec(const VideoCodec* sendCodec, - uint32_t numberOfCores, - uint32_t maxPayloadSize) = 0; - - // Register an external encoder object. This can not be used together with - // external decoder callbacks. - // - // Input: - // - externalEncoder : Encoder object to be used for encoding frames - // inserted - // with the AddVideoFrame API. - // - payloadType : The payload type bound which this encoder is bound - // to. - // - // Return value : VCM_OK, on success. - // < 0, on error. - // TODO(pbos): Remove return type when unused elsewhere. - virtual int32_t RegisterExternalEncoder(VideoEncoder* externalEncoder, - uint8_t payloadType, - bool internalSource = false) = 0; - - // API to get currently configured encoder target bitrate in bits/s. - // - // Return value : 0, on success. - // < 0, on error. - virtual int Bitrate(unsigned int* bitrate) const = 0; - - // API to get currently configured encoder target frame rate. - // - // Return value : 0, on success. - // < 0, on error. - virtual int FrameRate(unsigned int* framerate) const = 0; - - // Sets the parameters describing the send channel. These parameters are - // inputs to the - // Media Optimization inside the VCM and also specifies the target bit rate - // for the - // encoder. Bit rate used by NACK should already be compensated for by the - // user. - // - // Input: - // - target_bitrate : The target bitrate for VCM in bits/s. - // - lossRate : Fractions of lost packets the past second. - // (loss rate in percent = 100 * packetLoss / - // 255) - // - rtt : Current round-trip time in ms. - // - // Return value : VCM_OK, on success. - // < 0, on error. - virtual int32_t SetChannelParameters(uint32_t target_bitrate, - uint8_t lossRate, - int64_t rtt) = 0; - - // Sets the parameters describing the receive channel. These parameters are - // inputs to the - // Media Optimization inside the VCM. - // - // Input: - // - rtt : Current round-trip time in ms. - // with the most amount available bandwidth in - // a conference - // scenario - // - // Return value : VCM_OK, on success. - // < 0, on error. - virtual int32_t SetReceiveChannelParameters(int64_t rtt) = 0; - - // Deprecated: This method currently does not have any effect. - // Register a video protection callback which will be called to deliver - // the requested FEC rate and NACK status (on/off). - // TODO(perkj): Remove once no projects use it. - virtual int32_t RegisterProtectionCallback( - VCMProtectionCallback* protection) = 0; - - // Enable or disable a video protection method. - // - // Input: - // - videoProtection : The method to enable or disable. - // - enable : True if the method should be enabled, false if - // it should be disabled. - // - // Return value : VCM_OK, on success. - // < 0, on error. - virtual int32_t SetVideoProtection(VCMVideoProtection videoProtection, - bool enable) = 0; - - // Add one raw video frame to the encoder. This function does all the - // necessary - // processing, then decides what frame type to encode, or if the frame should - // be - // dropped. If the frame should be encoded it passes the frame to the encoder - // before it returns. - // - // Input: - // - videoFrame : Video frame to encode. - // - codecSpecificInfo : Extra codec information, e.g., pre-parsed - // in-band signaling. - // - // Return value : VCM_OK, on success. - // < 0, on error. - virtual int32_t AddVideoFrame( - const VideoFrame& videoFrame, - const CodecSpecificInfo* codecSpecificInfo = NULL) = 0; - - // Next frame encoded should be an intra frame (keyframe). - // - // Return value : VCM_OK, on success. - // < 0, on error. - virtual int32_t IntraFrameRequest(size_t stream_index) = 0; - - // Frame Dropper enable. Can be used to disable the frame dropping when the - // encoder - // over-uses its bit rate. This API is designed to be used when the encoded - // frames - // are supposed to be stored to an AVI file, or when the I420 codec is used - // and the - // target bit rate shouldn't affect the frame rate. - // - // Input: - // - enable : True to enable the setting, false to disable it. - // - // Return value : VCM_OK, on success. - // < 0, on error. - virtual int32_t EnableFrameDropper(bool enable) = 0; - - /* - * Receiver - */ - - // Register possible receive codecs, can be called multiple times for - // different codecs. - // The module will automatically switch between registered codecs depending on - // the - // payload type of incoming frames. The actual decoder will be created when - // needed. - // - // Input: - // - receiveCodec : Settings for the codec to be registered. - // - numberOfCores : Number of CPU cores that the decoder is allowed - // to use. - // - requireKeyFrame : Set this to true if you don't want any delta - // frames - // to be decoded until the first key frame has been - // decoded. - // - // Return value : VCM_OK, on success. - // < 0, on error. - virtual int32_t RegisterReceiveCodec(const VideoCodec* receiveCodec, - int32_t numberOfCores, - bool requireKeyFrame = false) = 0; - - // Register an externally defined decoder/renderer object. Can be a decoder - // only or a - // decoder coupled with a renderer. Note that RegisterReceiveCodec must be - // called to - // be used for decoding incoming streams. - // - // Input: - // - externalDecoder : The external decoder/renderer object. - // - payloadType : The payload type which this decoder should - // be - // registered to. - // - virtual void RegisterExternalDecoder(VideoDecoder* externalDecoder, - uint8_t payloadType) = 0; - - // Register a receive callback. Will be called whenever there is a new frame - // ready - // for rendering. - // - // Input: - // - receiveCallback : The callback object to be used by the - // module when a - // frame is ready for rendering. - // De-register with a NULL pointer. - // - // Return value : VCM_OK, on success. - // < 0, on error. - virtual int32_t RegisterReceiveCallback( - VCMReceiveCallback* receiveCallback) = 0; - - // Register a receive statistics callback which will be called to deliver - // information - // about the video stream received by the receiving side of the VCM, for - // instance the - // average frame rate and bit rate. - // - // Input: - // - receiveStats : The callback object to register. - // - // Return value : VCM_OK, on success. - // < 0, on error. - virtual int32_t RegisterReceiveStatisticsCallback( - VCMReceiveStatisticsCallback* receiveStats) = 0; - - // Register a decoder timing callback which will be called to deliver - // information about the timing of the decoder in the receiving side of the - // VCM, for instance the current and maximum frame decode latency. - // - // Input: - // - decoderTiming : The callback object to register. - // - // Return value : VCM_OK, on success. - // < 0, on error. - virtual int32_t RegisterDecoderTimingCallback( - VCMDecoderTimingCallback* decoderTiming) = 0; - - // Register a frame type request callback. This callback will be called when - // the - // module needs to request specific frame types from the send side. - // - // Input: - // - frameTypeCallback : The callback object to be used by the - // module when - // requesting a specific type of frame from - // the send side. - // De-register with a NULL pointer. - // - // Return value : VCM_OK, on success. - // < 0, on error. - virtual int32_t RegisterFrameTypeCallback( - VCMFrameTypeCallback* frameTypeCallback) = 0; - - // Registers a callback which is called whenever the receive side of the VCM - // encounters holes in the packet sequence and needs packets to be - // retransmitted. - // - // Input: - // - callback : The callback to be registered in the VCM. - // - // Return value : VCM_OK, on success. - // <0, on error. - virtual int32_t RegisterPacketRequestCallback( - VCMPacketRequestCallback* callback) = 0; - - // Waits for the next frame in the jitter buffer to become complete - // (waits no longer than maxWaitTimeMs), then passes it to the decoder for - // decoding. - // Should be called as often as possible to get the most out of the decoder. - // - // Return value : VCM_OK, on success. - // < 0, on error. - virtual int32_t Decode(uint16_t maxWaitTimeMs = 200) = 0; - - // API to get the codec which is currently used for decoding by the module. - // - // Input: - // - currentReceiveCodec : Settings for the codec to be registered. - // - // Return value : VCM_OK, on success. - // < 0, on error. - virtual int32_t ReceiveCodec(VideoCodec* currentReceiveCodec) const = 0; - - // API to get the codec type currently used for decoding by the module. - // - // Return value : codecy type, on success. - // kVideoCodecUnknown, on error or if no receive codec is - // registered - virtual VideoCodecType ReceiveCodec() const = 0; - - // Insert a parsed packet into the receiver side of the module. Will be placed - // in the - // jitter buffer waiting for the frame to become complete. Returns as soon as - // the packet - // has been placed in the jitter buffer. - // - // Input: - // - incomingPayload : Payload of the packet. - // - payloadLength : Length of the payload. - // - rtpInfo : The parsed header. - // - // Return value : VCM_OK, on success. - // < 0, on error. - virtual int32_t IncomingPacket(const uint8_t* incomingPayload, - size_t payloadLength, - const WebRtcRTPHeader& rtpInfo) = 0; - - // Minimum playout delay (Used for lip-sync). This is the minimum delay - // required - // to sync with audio. Not included in VideoCodingModule::Delay() - // Defaults to 0 ms. - // - // Input: - // - minPlayoutDelayMs : Additional delay in ms. - // - // Return value : VCM_OK, on success. - // < 0, on error. - virtual int32_t SetMinimumPlayoutDelay(uint32_t minPlayoutDelayMs) = 0; - - // Set the time required by the renderer to render a frame. - // - // Input: - // - timeMS : The time in ms required by the renderer to render a - // frame. - // - // Return value : VCM_OK, on success. - // < 0, on error. - virtual int32_t SetRenderDelay(uint32_t timeMS) = 0; - - // The total delay desired by the VCM. Can be less than the minimum - // delay set with SetMinimumPlayoutDelay. - // - // Return value : Total delay in ms, on success. - // < 0, on error. - virtual int32_t Delay() const = 0; - - // Returns the number of packets discarded by the jitter buffer due to being - // too late. This can include duplicated packets which arrived after the - // frame was sent to the decoder. Therefore packets which were prematurely - // NACKed will be counted. - virtual uint32_t DiscardedPackets() const = 0; - - // Robustness APIs - - // Set the receiver robustness mode. The mode decides how the receiver - // responds to losses in the stream. The type of counter-measure (soft or - // hard NACK, dual decoder, RPS, etc.) is selected through the - // robustnessMode parameter. The errorMode parameter decides if it is - // allowed to display frames corrupted by losses. Note that not all - // combinations of the two parameters are feasible. An error will be - // returned for invalid combinations. - // Input: - // - robustnessMode : selected robustness mode. - // - errorMode : selected error mode. - // - // Return value : VCM_OK, on success; - // < 0, on error. - virtual int SetReceiverRobustnessMode(ReceiverRobustness robustnessMode, - VCMDecodeErrorMode errorMode) = 0; - - // Set the decode error mode. The mode decides which errors (if any) are - // allowed in decodable frames. Note that setting decode_error_mode to - // anything other than kWithErrors without enabling nack will cause - // long-term freezes (resulting from frequent key frame requests) if - // packet loss occurs. - virtual void SetDecodeErrorMode(VCMDecodeErrorMode decode_error_mode) = 0; - - // Sets the maximum number of sequence numbers that we are allowed to NACK - // and the oldest sequence number that we will consider to NACK. If a - // sequence number older than |max_packet_age_to_nack| is missing - // a key frame will be requested. A key frame will also be requested if the - // time of incomplete or non-continuous frames in the jitter buffer is above - // |max_incomplete_time_ms|. - virtual void SetNackSettings(size_t max_nack_list_size, - int max_packet_age_to_nack, - int max_incomplete_time_ms) = 0; - - // Setting a desired delay to the VCM receiver. Video rendering will be - // delayed by at least desired_delay_ms. - virtual int SetMinReceiverDelay(int desired_delay_ms) = 0; - - virtual void RegisterPostEncodeImageCallback( - EncodedImageCallback* post_encode_callback) = 0; - // Releases pending decode calls, permitting faster thread shutdown. - virtual void TriggerDecoderShutdown() = 0; -}; - -} // namespace webrtc - -#endif // WEBRTC_MODULES_VIDEO_CODING_INCLUDE_VIDEO_CODING_H_ diff --git a/WebRtc.NET/include/webrtc/modules/video_coding/include/video_coding_defines.h b/WebRtc.NET/include/webrtc/modules/video_coding/include/video_coding_defines.h deleted file mode 100644 index 122ddc63..00000000 --- a/WebRtc.NET/include/webrtc/modules/video_coding/include/video_coding_defines.h +++ /dev/null @@ -1,175 +0,0 @@ -/* - * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MODULES_VIDEO_CODING_INCLUDE_VIDEO_CODING_DEFINES_H_ -#define WEBRTC_MODULES_VIDEO_CODING_INCLUDE_VIDEO_CODING_DEFINES_H_ - -#include -#include - -#include "webrtc/api/video/video_frame.h" -#include "webrtc/modules/include/module_common_types.h" -#include "webrtc/typedefs.h" -// For EncodedImage -#include "webrtc/video_frame.h" - -namespace webrtc { - -// Error codes -#define VCM_FRAME_NOT_READY 3 -#define VCM_REQUEST_SLI 2 -#define VCM_MISSING_CALLBACK 1 -#define VCM_OK 0 -#define VCM_GENERAL_ERROR -1 -#define VCM_LEVEL_EXCEEDED -2 -#define VCM_MEMORY -3 -#define VCM_PARAMETER_ERROR -4 -#define VCM_UNKNOWN_PAYLOAD -5 -#define VCM_CODEC_ERROR -6 -#define VCM_UNINITIALIZED -7 -#define VCM_NO_CODEC_REGISTERED -8 -#define VCM_JITTER_BUFFER_ERROR -9 -#define VCM_OLD_PACKET_ERROR -10 -#define VCM_NO_FRAME_DECODED -11 -#define VCM_ERROR_REQUEST_SLI -12 -#define VCM_NOT_IMPLEMENTED -20 - -enum { kDefaultStartBitrateKbps = 300 }; - -enum VCMVideoProtection { - kProtectionNone, - kProtectionNack, - kProtectionFEC, - kProtectionNackFEC, -}; - -enum VCMTemporalDecimation { - kBitrateOverUseDecimation, -}; - -struct VCMFrameCount { - uint32_t numKeyFrames; - uint32_t numDeltaFrames; -}; - -// Callback class used for passing decoded frames which are ready to be -// rendered. -class VCMReceiveCallback { - public: - virtual int32_t FrameToRender(VideoFrame& videoFrame) = 0; // NOLINT - virtual int32_t ReceivedDecodedReferenceFrame(const uint64_t pictureId) { - return -1; - } - // Called when the current receive codec changes. - virtual void OnIncomingPayloadType(int payload_type) {} - virtual void OnDecoderImplementationName(const char* implementation_name) {} - - protected: - virtual ~VCMReceiveCallback() {} -}; - -// Callback class used for informing the user of the bit rate and frame rate, -// and the name of the encoder. -class VCMSendStatisticsCallback { - public: - virtual void SendStatistics(uint32_t bitRate, uint32_t frameRate) = 0; - - protected: - virtual ~VCMSendStatisticsCallback() {} -}; - -// Callback class used for informing the user of the incoming bit rate and frame -// rate. -class VCMReceiveStatisticsCallback { - public: - virtual void OnReceiveRatesUpdated(uint32_t bitRate, uint32_t frameRate) = 0; - virtual void OnDiscardedPacketsUpdated(int discarded_packets) = 0; - virtual void OnFrameCountsUpdated(const FrameCounts& frame_counts) = 0; - - protected: - virtual ~VCMReceiveStatisticsCallback() {} -}; - -// Callback class used for informing the user of decode timing info. -class VCMDecoderTimingCallback { - public: - virtual void OnDecoderTiming(int decode_ms, - int max_decode_ms, - int current_delay_ms, - int target_delay_ms, - int jitter_buffer_ms, - int min_playout_delay_ms, - int render_delay_ms) = 0; - - protected: - virtual ~VCMDecoderTimingCallback() {} -}; - -// Callback class used for telling the user about how to configure the FEC, -// and the rates sent the last second is returned to the VCM. -class VCMProtectionCallback { - public: - virtual int ProtectionRequest(const FecProtectionParams* delta_params, - const FecProtectionParams* key_params, - uint32_t* sent_video_rate_bps, - uint32_t* sent_nack_rate_bps, - uint32_t* sent_fec_rate_bps) = 0; - - protected: - virtual ~VCMProtectionCallback() {} -}; - -// Callback class used for telling the user about what frame type needed to -// continue decoding. -// Typically a key frame when the stream has been corrupted in some way. -class VCMFrameTypeCallback { - public: - virtual int32_t RequestKeyFrame() = 0; - virtual int32_t SliceLossIndicationRequest(const uint64_t pictureId) { - return -1; - } - - protected: - virtual ~VCMFrameTypeCallback() {} -}; - -// Callback class used for telling the user about which packet sequence numbers -// are currently -// missing and need to be resent. -// TODO(philipel): Deprecate VCMPacketRequestCallback -// and use NackSender instead. -class VCMPacketRequestCallback { - public: - virtual int32_t ResendPackets(const uint16_t* sequenceNumbers, - uint16_t length) = 0; - - protected: - virtual ~VCMPacketRequestCallback() {} -}; - -class NackSender { - public: - virtual void SendNack(const std::vector& sequence_numbers) = 0; - - protected: - virtual ~NackSender() {} -}; - -class KeyFrameRequestSender { - public: - virtual void RequestKeyFrame() = 0; - - protected: - virtual ~KeyFrameRequestSender() {} -}; - -} // namespace webrtc - -#endif // WEBRTC_MODULES_VIDEO_CODING_INCLUDE_VIDEO_CODING_DEFINES_H_ diff --git a/WebRtc.NET/include/webrtc/modules/video_coding/include/video_error_codes.h b/WebRtc.NET/include/webrtc/modules/video_coding/include/video_error_codes.h deleted file mode 100644 index 360aa877..00000000 --- a/WebRtc.NET/include/webrtc/modules/video_coding/include/video_error_codes.h +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MODULES_VIDEO_CODING_INCLUDE_VIDEO_ERROR_CODES_H_ -#define WEBRTC_MODULES_VIDEO_CODING_INCLUDE_VIDEO_ERROR_CODES_H_ - -// NOTE: in sync with video_coding_module_defines.h - -// Define return values - -#define WEBRTC_VIDEO_CODEC_REQUEST_SLI 2 -#define WEBRTC_VIDEO_CODEC_NO_OUTPUT 1 -#define WEBRTC_VIDEO_CODEC_OK 0 -#define WEBRTC_VIDEO_CODEC_ERROR -1 -#define WEBRTC_VIDEO_CODEC_LEVEL_EXCEEDED -2 -#define WEBRTC_VIDEO_CODEC_MEMORY -3 -#define WEBRTC_VIDEO_CODEC_ERR_PARAMETER -4 -#define WEBRTC_VIDEO_CODEC_ERR_SIZE -5 -#define WEBRTC_VIDEO_CODEC_TIMEOUT -6 -#define WEBRTC_VIDEO_CODEC_UNINITIALIZED -7 -#define WEBRTC_VIDEO_CODEC_ERR_REQUEST_SLI -12 -#define WEBRTC_VIDEO_CODEC_FALLBACK_SOFTWARE -13 -#define WEBRTC_VIDEO_CODEC_TARGET_BITRATE_OVERSHOOT -14 - -#endif // WEBRTC_MODULES_VIDEO_CODING_INCLUDE_VIDEO_ERROR_CODES_H_ diff --git a/WebRtc.NET/include/webrtc/modules/video_coding/media_optimization.h b/WebRtc.NET/include/webrtc/modules/video_coding/media_optimization.h deleted file mode 100644 index 290636fd..00000000 --- a/WebRtc.NET/include/webrtc/modules/video_coding/media_optimization.h +++ /dev/null @@ -1,126 +0,0 @@ -/* - * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MODULES_VIDEO_CODING_MEDIA_OPTIMIZATION_H_ -#define WEBRTC_MODULES_VIDEO_CODING_MEDIA_OPTIMIZATION_H_ - -#include -#include - -#include "webrtc/modules/include/module_common_types.h" -#include "webrtc/modules/video_coding/include/video_coding.h" -#include "webrtc/modules/video_coding/media_opt_util.h" -#include "webrtc/system_wrappers/include/critical_section_wrapper.h" - -namespace webrtc { - -// Forward declarations. -class Clock; -class FrameDropper; -class VCMContentMetricsProcessing; - -namespace media_optimization { - -class MediaOptimization { - public: - explicit MediaOptimization(Clock* clock); - ~MediaOptimization(); - - // TODO(andresp): Can Reset and SetEncodingData be done at construction time - // only? - void Reset(); - - // Informs media optimization of initial encoding state. - // TODO(perkj): Deprecate SetEncodingData once its not used for stats in - // VieEncoder. - void SetEncodingData(int32_t max_bit_rate, - uint32_t bit_rate, - uint16_t width, - uint16_t height, - uint32_t frame_rate, - int num_temporal_layers, - int32_t mtu); - - // Sets target rates for the encoder given the channel parameters. - // Input: target bitrate - the encoder target bitrate in bits/s. - uint32_t SetTargetRates(uint32_t target_bitrate); - - void EnableFrameDropper(bool enable); - bool DropFrame(); - - // Informs Media Optimization of encoded output. - // TODO(perkj): Deprecate SetEncodingData once its not used for stats in - // VieEncoder. - int32_t UpdateWithEncodedData(const EncodedImage& encoded_image); - - // InputFrameRate 0 = no frame rate estimate available. - uint32_t InputFrameRate(); - uint32_t SentFrameRate(); - uint32_t SentBitRate(); - - private: - enum { kFrameCountHistorySize = 90 }; - enum { kFrameHistoryWinMs = 2000 }; - enum { kBitrateAverageWinMs = 1000 }; - - struct EncodedFrameSample; - typedef std::list FrameSampleList; - - void UpdateIncomingFrameRate() EXCLUSIVE_LOCKS_REQUIRED(crit_sect_); - void PurgeOldFrameSamples(int64_t now_ms) - EXCLUSIVE_LOCKS_REQUIRED(crit_sect_); - void UpdateSentBitrate(int64_t now_ms) EXCLUSIVE_LOCKS_REQUIRED(crit_sect_); - void UpdateSentFramerate() EXCLUSIVE_LOCKS_REQUIRED(crit_sect_); - - void ProcessIncomingFrameRate(int64_t now) - EXCLUSIVE_LOCKS_REQUIRED(crit_sect_); - - // Checks conditions for suspending the video. The method compares - // |video_target_bitrate_| with the threshold values for suspension, and - // changes the state of |video_suspended_| accordingly. - void CheckSuspendConditions() EXCLUSIVE_LOCKS_REQUIRED(crit_sect_); - - void SetEncodingDataInternal(int32_t max_bit_rate, - uint32_t frame_rate, - uint32_t bit_rate, - uint16_t width, - uint16_t height, - int num_temporal_layers, - int32_t mtu) - EXCLUSIVE_LOCKS_REQUIRED(crit_sect_); - - uint32_t InputFrameRateInternal() EXCLUSIVE_LOCKS_REQUIRED(crit_sect_); - - uint32_t SentFrameRateInternal() EXCLUSIVE_LOCKS_REQUIRED(crit_sect_); - - // Protect all members. - std::unique_ptr crit_sect_; - - Clock* clock_ GUARDED_BY(crit_sect_); - int32_t max_bit_rate_ GUARDED_BY(crit_sect_); - uint16_t codec_width_ GUARDED_BY(crit_sect_); - uint16_t codec_height_ GUARDED_BY(crit_sect_); - float user_frame_rate_ GUARDED_BY(crit_sect_); - std::unique_ptr frame_dropper_ GUARDED_BY(crit_sect_); - uint32_t send_statistics_[4] GUARDED_BY(crit_sect_); - uint32_t send_statistics_zero_encode_ GUARDED_BY(crit_sect_); - int32_t max_payload_size_ GUARDED_BY(crit_sect_); - int video_target_bitrate_ GUARDED_BY(crit_sect_); - float incoming_frame_rate_ GUARDED_BY(crit_sect_); - int64_t incoming_frame_times_[kFrameCountHistorySize] GUARDED_BY(crit_sect_); - std::list encoded_frame_samples_ GUARDED_BY(crit_sect_); - uint32_t avg_sent_bit_rate_bps_ GUARDED_BY(crit_sect_); - uint32_t avg_sent_framerate_ GUARDED_BY(crit_sect_); - int num_layers_ GUARDED_BY(crit_sect_); -}; -} // namespace media_optimization -} // namespace webrtc - -#endif // WEBRTC_MODULES_VIDEO_CODING_MEDIA_OPTIMIZATION_H_ diff --git a/WebRtc.NET/include/webrtc/modules/video_coding/nack_module.h b/WebRtc.NET/include/webrtc/modules/video_coding/nack_module.h deleted file mode 100644 index 58d6cfa9..00000000 --- a/WebRtc.NET/include/webrtc/modules/video_coding/nack_module.h +++ /dev/null @@ -1,99 +0,0 @@ -/* - * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MODULES_VIDEO_CODING_NACK_MODULE_H_ -#define WEBRTC_MODULES_VIDEO_CODING_NACK_MODULE_H_ - -#include -#include -#include - -#include "webrtc/base/criticalsection.h" -#include "webrtc/base/thread_annotations.h" -#include "webrtc/modules/include/module.h" -#include "webrtc/modules/video_coding/include/video_coding_defines.h" -#include "webrtc/modules/video_coding/packet.h" -#include "webrtc/modules/video_coding/histogram.h" -#include "webrtc/modules/video_coding/sequence_number_util.h" -#include "webrtc/system_wrappers/include/clock.h" - -namespace webrtc { - -class NackModule : public Module { - public: - NackModule(Clock* clock, - NackSender* nack_sender, - KeyFrameRequestSender* keyframe_request_sender); - - int OnReceivedPacket(const VCMPacket& packet); - void ClearUpTo(uint16_t seq_num); - void UpdateRtt(int64_t rtt_ms); - void Clear(); - void Stop(); - - // Module implementation - int64_t TimeUntilNextProcess() override; - void Process() override; - - private: - // Which fields to consider when deciding which packet to nack in - // GetNackBatch. - enum NackFilterOptions { kSeqNumOnly, kTimeOnly, kSeqNumAndTime }; - - // This class holds the sequence number of the packet that is in the nack list - // as well as the meta data about when it should be nacked and how many times - // we have tried to nack this packet. - struct NackInfo { - NackInfo(); - NackInfo(uint16_t seq_num, uint16_t send_at_seq_num); - - uint16_t seq_num; - uint16_t send_at_seq_num; - int64_t sent_at_time; - int retries; - }; - void AddPacketsToNack(uint16_t seq_num_start, uint16_t seq_num_end) - EXCLUSIVE_LOCKS_REQUIRED(crit_); - - // Removes packets from the nack list until the next keyframe. Returns true - // if packets were removed. - bool RemovePacketsUntilKeyFrame() EXCLUSIVE_LOCKS_REQUIRED(crit_); - std::vector GetNackBatch(NackFilterOptions options) - EXCLUSIVE_LOCKS_REQUIRED(crit_); - - // Update the reordering distribution. - void UpdateReorderingStatistics(uint16_t seq_num) - EXCLUSIVE_LOCKS_REQUIRED(crit_); - - // Returns how many packets we have to wait in order to receive the packet - // with probability |probabilty| or higher. - int WaitNumberOfPackets(float probability) const - EXCLUSIVE_LOCKS_REQUIRED(crit_); - - rtc::CriticalSection crit_; - Clock* const clock_; - NackSender* const nack_sender_; - KeyFrameRequestSender* const keyframe_request_sender_; - - std::map> nack_list_ - GUARDED_BY(crit_); - std::set> keyframe_list_ - GUARDED_BY(crit_); - video_coding::Histogram reordering_histogram_ GUARDED_BY(crit_); - bool running_ GUARDED_BY(crit_); - bool initialized_ GUARDED_BY(crit_); - int64_t rtt_ms_ GUARDED_BY(crit_); - uint16_t newest_seq_num_ GUARDED_BY(crit_); - int64_t next_process_time_ms_ GUARDED_BY(crit_); -}; - -} // namespace webrtc - -#endif // WEBRTC_MODULES_VIDEO_CODING_NACK_MODULE_H_ diff --git a/WebRtc.NET/include/webrtc/modules/video_coding/packet.h b/WebRtc.NET/include/webrtc/modules/video_coding/packet.h deleted file mode 100644 index 488c058a..00000000 --- a/WebRtc.NET/include/webrtc/modules/video_coding/packet.h +++ /dev/null @@ -1,59 +0,0 @@ -/* - * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MODULES_VIDEO_CODING_PACKET_H_ -#define WEBRTC_MODULES_VIDEO_CODING_PACKET_H_ - -#include "webrtc/base/deprecation.h" -#include "webrtc/modules/include/module_common_types.h" -#include "webrtc/modules/video_coding/jitter_buffer_common.h" -#include "webrtc/typedefs.h" - -namespace webrtc { - -class VCMPacket { - public: - VCMPacket(); - VCMPacket(const uint8_t* ptr, - const size_t size, - const WebRtcRTPHeader& rtpHeader); - - void Reset(); - - uint8_t payloadType; - uint32_t timestamp; - // NTP time of the capture time in local timebase in milliseconds. - int64_t ntp_time_ms_; - uint16_t seqNum; - const uint8_t* dataPtr; - size_t sizeBytes; - bool markerBit; - int timesNacked; - - FrameType frameType; - VideoCodecType codec; - - union { - RTC_DEPRECATED bool isFirstPacket; // Is this first packet in a frame. - bool is_first_packet_in_frame; - }; - VCMNaluCompleteness completeNALU; // Default is kNaluIncomplete. - bool insertStartCode; // True if a start code should be inserted before this - // packet. - int width; - int height; - RTPVideoHeader video_header; - - protected: - void CopyCodecSpecifics(const RTPVideoHeader& videoHeader); -}; - -} // namespace webrtc -#endif // WEBRTC_MODULES_VIDEO_CODING_PACKET_H_ diff --git a/WebRtc.NET/include/webrtc/modules/video_coding/packet_buffer.h b/WebRtc.NET/include/webrtc/modules/video_coding/packet_buffer.h deleted file mode 100644 index 001f8bd8..00000000 --- a/WebRtc.NET/include/webrtc/modules/video_coding/packet_buffer.h +++ /dev/null @@ -1,151 +0,0 @@ -/* - * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MODULES_VIDEO_CODING_PACKET_BUFFER_H_ -#define WEBRTC_MODULES_VIDEO_CODING_PACKET_BUFFER_H_ - -#include -#include - -#include "webrtc/base/criticalsection.h" -#include "webrtc/base/scoped_ref_ptr.h" -#include "webrtc/base/thread_annotations.h" -#include "webrtc/modules/include/module_common_types.h" -#include "webrtc/modules/video_coding/packet.h" -#include "webrtc/modules/video_coding/rtp_frame_reference_finder.h" -#include "webrtc/modules/video_coding/sequence_number_util.h" - -namespace webrtc { - -class Clock; - -namespace video_coding { - -class FrameObject; -class RtpFrameObject; - -// A received frame is a frame which has received all its packets. -class OnReceivedFrameCallback { - public: - virtual ~OnReceivedFrameCallback() {} - virtual void OnReceivedFrame(std::unique_ptr frame) = 0; -}; - -class PacketBuffer { - public: - static rtc::scoped_refptr Create( - Clock* clock, - size_t start_buffer_size, - size_t max_buffer_size, - OnReceivedFrameCallback* frame_callback); - - virtual ~PacketBuffer(); - - // Returns true if |packet| is inserted into the packet buffer, false - // otherwise. The PacketBuffer will always take ownership of the - // |packet.dataPtr| when this function is called. Made virtual for testing. - virtual bool InsertPacket(VCMPacket* packet); - void ClearTo(uint16_t seq_num); - void Clear(); - - int AddRef() const; - int Release() const; - - protected: - // Both |start_buffer_size| and |max_buffer_size| must be a power of 2. - PacketBuffer(Clock* clock, - size_t start_buffer_size, - size_t max_buffer_size, - OnReceivedFrameCallback* frame_callback); - - private: - friend RtpFrameObject; - // Since we want the packet buffer to be as packet type agnostic - // as possible we extract only the information needed in order - // to determine whether a sequence of packets is continuous or not. - struct ContinuityInfo { - // The sequence number of the packet. - uint16_t seq_num = 0; - - // If this is the first packet of the frame. - bool frame_begin = false; - - // If this is the last packet of the frame. - bool frame_end = false; - - // If this slot is currently used. - bool used = false; - - // If all its previous packets have been inserted into the packet buffer. - bool continuous = false; - - // If this packet has been used to create a frame already. - bool frame_created = false; - }; - - Clock* const clock_; - - // Tries to expand the buffer. - bool ExpandBufferSize() EXCLUSIVE_LOCKS_REQUIRED(crit_); - - // Test if all previous packets has arrived for the given sequence number. - bool PotentialNewFrame(uint16_t seq_num) const - EXCLUSIVE_LOCKS_REQUIRED(crit_); - - // Test if all packets of a frame has arrived, and if so, creates a frame. - // Returns a vector of received frames. - std::vector> FindFrames(uint16_t seq_num) - EXCLUSIVE_LOCKS_REQUIRED(crit_); - - // Copy the bitstream for |frame| to |destination|. - // Virtual for testing. - virtual bool GetBitstream(const RtpFrameObject& frame, uint8_t* destination); - - // Get the packet with sequence number |seq_num|. - // Virtual for testing. - virtual VCMPacket* GetPacket(uint16_t seq_num) - EXCLUSIVE_LOCKS_REQUIRED(crit_); - - // Mark all slots used by |frame| as not used. - // Virtual for testing. - virtual void ReturnFrame(RtpFrameObject* frame); - - rtc::CriticalSection crit_; - - // Buffer size_ and max_size_ must always be a power of two. - size_t size_ GUARDED_BY(crit_); - const size_t max_size_; - - // The fist sequence number currently in the buffer. - uint16_t first_seq_num_ GUARDED_BY(crit_); - - // If the packet buffer has received its first packet. - bool first_packet_received_ GUARDED_BY(crit_); - - // If the buffer is cleared to |first_seq_num_|. - bool is_cleared_to_first_seq_num_ GUARDED_BY(crit_); - - // Buffer that holds the inserted packets. - std::vector data_buffer_ GUARDED_BY(crit_); - - // Buffer that holds the information about which slot that is currently in use - // and information needed to determine the continuity between packets. - std::vector sequence_buffer_ GUARDED_BY(crit_); - - // Called when a received frame is found. - OnReceivedFrameCallback* const received_frame_callback_; - - mutable volatile int ref_count_ = 0; -}; - -} // namespace video_coding -} // namespace webrtc - -#endif // WEBRTC_MODULES_VIDEO_CODING_PACKET_BUFFER_H_ diff --git a/WebRtc.NET/include/webrtc/modules/video_coding/protection_bitrate_calculator.h b/WebRtc.NET/include/webrtc/modules/video_coding/protection_bitrate_calculator.h deleted file mode 100644 index a12dcfc6..00000000 --- a/WebRtc.NET/include/webrtc/modules/video_coding/protection_bitrate_calculator.h +++ /dev/null @@ -1,79 +0,0 @@ -/* - * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MODULES_VIDEO_CODING_PROTECTION_BITRATE_CALCULATOR_H_ -#define WEBRTC_MODULES_VIDEO_CODING_PROTECTION_BITRATE_CALCULATOR_H_ - -#include -#include - -#include "webrtc/base/criticalsection.h" -#include "webrtc/modules/include/module_common_types.h" -#include "webrtc/modules/video_coding/include/video_coding.h" -#include "webrtc/modules/video_coding/media_opt_util.h" -#include "webrtc/system_wrappers/include/clock.h" - -namespace webrtc { - -// ProtectionBitrateCalculator calculates how much of the allocated network -// capacity that can be used by an encoder and how much that -// is needed for redundant packets such as FEC and NACK. It uses an -// implementation of |VCMProtectionCallback| to set new FEC parameters and get -// the bitrate currently used for FEC and NACK. -// Usage: -// Setup by calling SetProtectionMethod and SetEncodingData. -// For each encoded image, call UpdateWithEncodedData. -// Each time the bandwidth estimate change, call SetTargetRates. SetTargetRates -// will return the bitrate that can be used by an encoder. -// A lock is used to protect internal states, so methods can be called on an -// arbitrary thread. -class ProtectionBitrateCalculator { - public: - ProtectionBitrateCalculator(Clock* clock, - VCMProtectionCallback* protection_callback); - ~ProtectionBitrateCalculator(); - - void SetProtectionMethod(bool enable_fec, bool enable_nack); - - // Informs media optimization of initial encoding state. - void SetEncodingData(size_t width, - size_t height, - size_t num_temporal_layers, - size_t max_payload_size); - - // Returns target rate for the encoder given the channel parameters. - // Inputs: estimated_bitrate_bps - the estimated network bitrate in bits/s. - // actual_framerate - encoder frame rate. - // fraction_lost - packet loss rate in % in the network. - // round_trip_time_ms - round trip time in milliseconds. - uint32_t SetTargetRates(uint32_t estimated_bitrate_bps, - int actual_framerate, - uint8_t fraction_lost, - int64_t round_trip_time_ms); - // Informs of encoded output. - void UpdateWithEncodedData(const EncodedImage& encoded_image); - - private: - struct EncodedFrameSample; - enum { kBitrateAverageWinMs = 1000 }; - - Clock* const clock_; - VCMProtectionCallback* const protection_callback_; - - rtc::CriticalSection crit_sect_; - std::unique_ptr loss_prot_logic_ - GUARDED_BY(crit_sect_); - size_t max_payload_size_ GUARDED_BY(crit_sect_); - - RTC_DISALLOW_COPY_AND_ASSIGN(ProtectionBitrateCalculator); -}; - -} // namespace webrtc -#endif // WEBRTC_MODULES_VIDEO_CODING_PROTECTION_BITRATE_CALCULATOR_H_ diff --git a/WebRtc.NET/include/webrtc/modules/video_coding/rtp_frame_reference_finder.h b/WebRtc.NET/include/webrtc/modules/video_coding/rtp_frame_reference_finder.h deleted file mode 100644 index db1ddf80..00000000 --- a/WebRtc.NET/include/webrtc/modules/video_coding/rtp_frame_reference_finder.h +++ /dev/null @@ -1,231 +0,0 @@ -/* - * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MODULES_VIDEO_CODING_RTP_FRAME_REFERENCE_FINDER_H_ -#define WEBRTC_MODULES_VIDEO_CODING_RTP_FRAME_REFERENCE_FINDER_H_ - -#include -#include -#include -#include -#include -#include - -#include "webrtc/base/criticalsection.h" -#include "webrtc/base/thread_annotations.h" -#include "webrtc/modules/include/module_common_types.h" -#include "webrtc/modules/video_coding/sequence_number_util.h" - -namespace webrtc { -namespace video_coding { - -class FrameObject; -class RtpFrameObject; - -// A complete frame is a frame which has received all its packets and all its -// references are known. -class OnCompleteFrameCallback { - public: - virtual ~OnCompleteFrameCallback() {} - virtual void OnCompleteFrame(std::unique_ptr frame) = 0; -}; - -class RtpFrameReferenceFinder { - public: - explicit RtpFrameReferenceFinder(OnCompleteFrameCallback* frame_callback); - - // Manage this frame until: - // - We have all information needed to determine its references, after - // which |frame_callback_| is called with the completed frame, or - // - We have too many stashed frames (determined by |kMaxStashedFrames) - // so we drop this frame, or - // - It gets cleared by ClearTo, which also means we drop it. - void ManageFrame(std::unique_ptr frame); - - // Notifies that padding has been received, which the reference finder - // might need to calculate the references of a frame. - void PaddingReceived(uint16_t seq_num); - - // Clear all stashed frames that include packets older than |seq_num|. - void ClearTo(uint16_t seq_num); - - private: - static const uint16_t kPicIdLength = 1 << 15; - static const uint8_t kMaxTemporalLayers = 5; - static const int kMaxLayerInfo = 50; - static const int kMaxStashedFrames = 50; - static const int kMaxNotYetReceivedFrames = 100; - static const int kMaxGofSaved = 50; - static const int kMaxPaddingAge = 100; - - - struct GofInfo { - GofInfo(GofInfoVP9* gof, uint16_t last_picture_id) - : gof(gof), last_picture_id(last_picture_id) {} - GofInfoVP9* gof; - uint16_t last_picture_id; - }; - - rtc::CriticalSection crit_; - - // Find the relevant group of pictures and update its "last-picture-id-with - // padding" sequence number. - void UpdateLastPictureIdWithPadding(uint16_t seq_num) - EXCLUSIVE_LOCKS_REQUIRED(crit_); - - // Retry finding references for all frames that previously didn't have - // all information needed. - void RetryStashedFrames() EXCLUSIVE_LOCKS_REQUIRED(crit_); - - // Find references for generic frames. If |picture_id| is unspecified - // then packet sequence numbers will be used to determine the references - // of the frames. - void ManageFrameGeneric(std::unique_ptr frame, - int picture_id) EXCLUSIVE_LOCKS_REQUIRED(crit_); - - // Find references for Vp8 frames - void ManageFrameVp8(std::unique_ptr frame) - EXCLUSIVE_LOCKS_REQUIRED(crit_); - - // Updates all necessary state used to determine frame references - // for Vp8 and then calls the |frame_callback| callback with the - // completed frame. - void CompletedFrameVp8(std::unique_ptr frame) - EXCLUSIVE_LOCKS_REQUIRED(crit_); - - // Find references for Vp9 frames - void ManageFrameVp9(std::unique_ptr frame) - EXCLUSIVE_LOCKS_REQUIRED(crit_); - - // Unwrap the picture id and the frame references and then call the - // |frame_callback| callback with the completed frame. - void CompletedFrameVp9(std::unique_ptr frame) - EXCLUSIVE_LOCKS_REQUIRED(crit_); - - // Check if we are missing a frame necessary to determine the references - // for this frame. - bool MissingRequiredFrameVp9(uint16_t picture_id, const GofInfo& info) - EXCLUSIVE_LOCKS_REQUIRED(crit_); - - // Updates which frames that have been received. If there is a gap, - // missing frames will be added to |missing_frames_for_layer_| or - // if this is an already missing frame then it will be removed. - void FrameReceivedVp9(uint16_t picture_id, GofInfo* info) - EXCLUSIVE_LOCKS_REQUIRED(crit_); - - // Check if there is a frame with the up-switch flag set in the interval - // (|pid_ref|, |picture_id|) with temporal layer smaller than |temporal_idx|. - bool UpSwitchInIntervalVp9(uint16_t picture_id, - uint8_t temporal_idx, - uint16_t pid_ref) EXCLUSIVE_LOCKS_REQUIRED(crit_); - - // All picture ids are unwrapped to 16 bits. - uint16_t UnwrapPictureId(uint16_t picture_id) EXCLUSIVE_LOCKS_REQUIRED(crit_); - - // Returns true if the frame is old and should be dropped. - // TODO(philipel): Remove when VP9 PID/TL0 does not jump mid-stream (should be - // around M59). - bool Vp9PidTl0Fix(const RtpFrameObject& frame, - int16_t* picture_id, - int16_t* tl0_pic_idx) EXCLUSIVE_LOCKS_REQUIRED(crit_); - - // TODO(philipel): Remove when VP9 PID/TL0 does not jump mid-stream (should be - // around M59). - bool DetectVp9PicIdJump(int fixed_pid, - int fixed_tl0, - uint32_t timestamp) const - EXCLUSIVE_LOCKS_REQUIRED(crit_); - - // TODO(philipel): Remove when VP9 PID/TL0 does not jump mid-stream (should be - // around M59). - bool DetectVp9Tl0PicIdxJump(int fixed_tl0, uint32_t timestamp) const - EXCLUSIVE_LOCKS_REQUIRED(crit_); - - // For every group of pictures, hold two sequence numbers. The first being - // the sequence number of the last packet of the last completed frame, and - // the second being the sequence number of the last packet of the last - // completed frame advanced by any potential continuous packets of padding. - std::map, - DescendingSeqNumComp> - last_seq_num_gop_ GUARDED_BY(crit_); - - // Save the last picture id in order to detect when there is a gap in frames - // that have not yet been fully received. - int last_picture_id_ GUARDED_BY(crit_); - - // Padding packets that have been received but that are not yet continuous - // with any group of pictures. - std::set> stashed_padding_ - GUARDED_BY(crit_); - - // The last unwrapped picture id. Used to unwrap the picture id from a length - // of |kPicIdLength| to 16 bits. - int last_unwrap_ GUARDED_BY(crit_); - - // Frames earlier than the last received frame that have not yet been - // fully received. - std::set> - not_yet_received_frames_ GUARDED_BY(crit_); - - // Frames that have been fully received but didn't have all the information - // needed to determine their references. - std::deque> stashed_frames_ GUARDED_BY(crit_); - - // Holds the information about the last completed frame for a given temporal - // layer given a Tl0 picture index. - std::map, - DescendingSeqNumComp> - layer_info_ GUARDED_BY(crit_); - - // Where the current scalability structure is in the - // |scalability_structures_| array. - uint8_t current_ss_idx_; - - // Holds received scalability structures. - std::array scalability_structures_ - GUARDED_BY(crit_); - - // Holds the the Gof information for a given TL0 picture index. - std::map> gof_info_ - GUARDED_BY(crit_); - - // Keep track of which picture id and which temporal layer that had the - // up switch flag set. - std::map> - up_switch_ GUARDED_BY(crit_); - - // For every temporal layer, keep a set of which frames that are missing. - std::array>, - kMaxTemporalLayers> - missing_frames_for_layer_ GUARDED_BY(crit_); - - // How far frames have been cleared by sequence number. A frame will be - // cleared if it contains a packet with a sequence number older than - // |cleared_to_seq_num_|. - int cleared_to_seq_num_ GUARDED_BY(crit_); - - OnCompleteFrameCallback* frame_callback_; - - // Vp9PidFix variables - // TODO(philipel): Remove when VP9 PID does not jump mid-stream. - int vp9_fix_last_timestamp_ = -1; - int vp9_fix_jump_timestamp_ = -1; - int vp9_fix_last_picture_id_ = -1; - int vp9_fix_pid_offset_ = 0; - int vp9_fix_last_tl0_pic_idx_ = -1; - int vp9_fix_tl0_pic_idx_offset_ = 0; -}; - -} // namespace video_coding -} // namespace webrtc - -#endif // WEBRTC_MODULES_VIDEO_CODING_RTP_FRAME_REFERENCE_FINDER_H_ diff --git a/WebRtc.NET/include/webrtc/modules/video_coding/sequence_number_util.h b/WebRtc.NET/include/webrtc/modules/video_coding/sequence_number_util.h deleted file mode 100644 index 828e68a7..00000000 --- a/WebRtc.NET/include/webrtc/modules/video_coding/sequence_number_util.h +++ /dev/null @@ -1,110 +0,0 @@ -/* - * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MODULES_VIDEO_CODING_SEQUENCE_NUMBER_UTIL_H_ -#define WEBRTC_MODULES_VIDEO_CODING_SEQUENCE_NUMBER_UTIL_H_ - -#include -#include - -#include "webrtc/base/mod_ops.h" - -namespace webrtc { - -// Test if the sequence number |a| is ahead or at sequence number |b|. -// -// If |M| is an even number and the two sequence numbers are at max distance -// from each other, then the sequence number with the highest value is -// considered to be ahead. -template -inline bool AheadOrAt(T a, T b) { - static_assert(std::is_unsigned::value, - "Type must be an unsigned integer."); - const T maxDist = M / 2; - if (!(M & 1) && MinDiff(a, b) == maxDist) - return b < a; - return ForwardDiff(b, a) <= maxDist; -} - -template -inline bool AheadOrAt(T a, T b) { - static_assert(std::is_unsigned::value, - "Type must be an unsigned integer."); - const T maxDist = std::numeric_limits::max() / 2 + T(1); - if (a - b == maxDist) - return b < a; - return ForwardDiff(b, a) < maxDist; -} - -// Test if the sequence number |a| is ahead of sequence number |b|. -// -// If |M| is an even number and the two sequence numbers are at max distance -// from each other, then the sequence number with the highest value is -// considered to be ahead. -template -inline bool AheadOf(T a, T b) { - static_assert(std::is_unsigned::value, - "Type must be an unsigned integer."); - return a != b && AheadOrAt(a, b); -} - -template -inline bool AheadOf(T a, T b) { - static_assert(std::is_unsigned::value, - "Type must be an unsigned integer."); - return a != b && AheadOrAt(a, b); -} - -namespace internal { - -template -struct SeqNumComp; - -template -struct SeqNumComp> { - bool operator()(T a, T b) const { return AheadOf(a, b); } -}; - -template -struct SeqNumComp> { - bool operator()(T a, T b) const { return AheadOf(a, b); } -}; - -} // namespace internal - -// Comparator used to compare sequence numbers in a continuous fashion. -// -// WARNING! If used to sort sequence numbers of length M then the interval -// covered by the sequence numbers may not be larger than floor(M/2). -template -struct AscendingSeqNumComp - : private internal::SeqNumComp> { - bool operator()(T a, T b) const { - return internal::SeqNumComp>::operator()(a, - b); - } -}; - -// Comparator used to compare sequence numbers in a continuous fashion. -// -// WARNING! If used to sort sequence numbers of length M then the interval -// covered by the sequence numbers may not be larger than floor(M/2). -template -struct DescendingSeqNumComp - : private internal::SeqNumComp> { - bool operator()(T a, T b) const { - return internal::SeqNumComp>::operator()(b, - a); - } -}; - -} // namespace webrtc - -#endif // WEBRTC_MODULES_VIDEO_CODING_SEQUENCE_NUMBER_UTIL_H_ diff --git a/WebRtc.NET/include/webrtc/modules/video_coding/test/receiver_tests.h b/WebRtc.NET/include/webrtc/modules/video_coding/test/receiver_tests.h deleted file mode 100644 index e2429e75..00000000 --- a/WebRtc.NET/include/webrtc/modules/video_coding/test/receiver_tests.h +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MODULES_VIDEO_CODING_TEST_RECEIVER_TESTS_H_ -#define WEBRTC_MODULES_VIDEO_CODING_TEST_RECEIVER_TESTS_H_ - -#include -#include - -#include "webrtc/common_types.h" -#include "webrtc/modules/include/module_common_types.h" -#include "webrtc/modules/rtp_rtcp/include/rtp_rtcp.h" -#include "webrtc/modules/video_coding/include/video_coding.h" -#include "webrtc/modules/video_coding/test/test_util.h" -#include "webrtc/typedefs.h" - -class RtpDataCallback : public webrtc::NullRtpData { - public: - explicit RtpDataCallback(webrtc::VideoCodingModule* vcm) : vcm_(vcm) {} - virtual ~RtpDataCallback() {} - - int32_t OnReceivedPayloadData( - const uint8_t* payload_data, - size_t payload_size, - const webrtc::WebRtcRTPHeader* rtp_header) override { - return vcm_->IncomingPacket(payload_data, payload_size, *rtp_header); - } - - private: - webrtc::VideoCodingModule* vcm_; -}; - -int RtpPlay(const CmdArgs& args); - -#endif // WEBRTC_MODULES_VIDEO_CODING_TEST_RECEIVER_TESTS_H_ diff --git a/WebRtc.NET/include/webrtc/modules/video_coding/test/rtp_player.h b/WebRtc.NET/include/webrtc/modules/video_coding/test/rtp_player.h deleted file mode 100644 index e50fb9ac..00000000 --- a/WebRtc.NET/include/webrtc/modules/video_coding/test/rtp_player.h +++ /dev/null @@ -1,100 +0,0 @@ -/* - * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MODULES_VIDEO_CODING_TEST_RTP_PLAYER_H_ -#define WEBRTC_MODULES_VIDEO_CODING_TEST_RTP_PLAYER_H_ - -#include -#include - -#include "webrtc/modules/rtp_rtcp/include/rtp_rtcp_defines.h" -#include "webrtc/modules/video_coding/include/video_coding_defines.h" - -namespace webrtc { -class Clock; - -namespace rtpplayer { - -class PayloadCodecTuple { - public: - PayloadCodecTuple(uint8_t payload_type, - const std::string& codec_name, - VideoCodecType codec_type) - : name_(codec_name), - payload_type_(payload_type), - codec_type_(codec_type) {} - - const std::string& name() const { return name_; } - uint8_t payload_type() const { return payload_type_; } - VideoCodecType codec_type() const { return codec_type_; } - - private: - std::string name_; - uint8_t payload_type_; - VideoCodecType codec_type_; -}; - -typedef std::vector PayloadTypes; -typedef std::vector::const_iterator PayloadTypesIterator; - -// Implemented by RtpPlayer and given to client as a means to retrieve -// information about a specific RTP stream. -class RtpStreamInterface { - public: - virtual ~RtpStreamInterface() {} - - // Ask for missing packets to be resent. - virtual void ResendPackets(const uint16_t* sequence_numbers, - uint16_t length) = 0; - - virtual uint32_t ssrc() const = 0; - virtual const PayloadTypes& payload_types() const = 0; -}; - -// Implemented by a sink. Wraps RtpData because its d-tor is protected. -class PayloadSinkInterface : public RtpData { - public: - virtual ~PayloadSinkInterface() {} -}; - -// Implemented to provide a sink for RTP data, such as hooking up a VCM to -// the incoming RTP stream. -class PayloadSinkFactoryInterface { - public: - virtual ~PayloadSinkFactoryInterface() {} - - // Return NULL if failed to create sink. 'stream' is guaranteed to be - // around for as long as the RtpData. The returned object is owned by - // the caller (RtpPlayer). - virtual PayloadSinkInterface* Create(RtpStreamInterface* stream) = 0; -}; - -// The client's view of an RtpPlayer. -class RtpPlayerInterface { - public: - virtual ~RtpPlayerInterface() {} - - virtual int NextPacket(int64_t timeNow) = 0; - virtual uint32_t TimeUntilNextPacket() const = 0; - virtual void Print() const = 0; -}; - -RtpPlayerInterface* Create(const std::string& inputFilename, - PayloadSinkFactoryInterface* payloadSinkFactory, - Clock* clock, - const PayloadTypes& payload_types, - float lossRate, - int64_t rttMs, - bool reordering); - -} // namespace rtpplayer -} // namespace webrtc - -#endif // WEBRTC_MODULES_VIDEO_CODING_TEST_RTP_PLAYER_H_ diff --git a/WebRtc.NET/include/webrtc/modules/video_coding/test/test_util.h b/WebRtc.NET/include/webrtc/modules/video_coding/test/test_util.h deleted file mode 100644 index 45b88b9b..00000000 --- a/WebRtc.NET/include/webrtc/modules/video_coding/test/test_util.h +++ /dev/null @@ -1,86 +0,0 @@ -/* - * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MODULES_VIDEO_CODING_TEST_TEST_UTIL_H_ -#define WEBRTC_MODULES_VIDEO_CODING_TEST_TEST_UTIL_H_ - -/* - * General declarations used through out VCM offline tests. - */ - -#include - -#include "webrtc/base/constructormagic.h" -#include "webrtc/modules/include/module_common_types.h" -#include "webrtc/modules/video_coding/include/video_coding.h" -#include "webrtc/system_wrappers/include/event_wrapper.h" - -enum { kMaxNackListSize = 250 }; -enum { kMaxPacketAgeToNack = 450 }; - -class NullEvent : public webrtc::EventWrapper { - public: - virtual ~NullEvent() {} - - virtual bool Set() { return true; } - - virtual bool Reset() { return true; } - - virtual webrtc::EventTypeWrapper Wait(unsigned long max_time) { // NOLINT - return webrtc::kEventTimeout; - } - - virtual bool StartTimer(bool periodic, unsigned long time) { // NOLINT - return true; - } - - virtual bool StopTimer() { return true; } -}; - -class NullEventFactory : public webrtc::EventFactory { - public: - virtual ~NullEventFactory() {} - - virtual webrtc::EventWrapper* CreateEvent() { return new NullEvent; } -}; - -class FileOutputFrameReceiver : public webrtc::VCMReceiveCallback { - public: - FileOutputFrameReceiver(const std::string& base_out_filename, uint32_t ssrc); - virtual ~FileOutputFrameReceiver(); - - // VCMReceiveCallback - virtual int32_t FrameToRender(webrtc::VideoFrame& video_frame); // NOLINT - - private: - std::string out_filename_; - FILE* out_file_; - FILE* timing_file_; - int width_; - int height_; - int count_; - - RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(FileOutputFrameReceiver); -}; - -class CmdArgs { - public: - CmdArgs(); - - std::string codecName; - webrtc::VideoCodecType codecType; - int width; - int height; - int rtt; - std::string inputFile; - std::string outputFile; -}; - -#endif // WEBRTC_MODULES_VIDEO_CODING_TEST_TEST_UTIL_H_ diff --git a/WebRtc.NET/include/webrtc/modules/video_coding/test/vcm_payload_sink_factory.h b/WebRtc.NET/include/webrtc/modules/video_coding/test/vcm_payload_sink_factory.h deleted file mode 100644 index 8d6eb6ea..00000000 --- a/WebRtc.NET/include/webrtc/modules/video_coding/test/vcm_payload_sink_factory.h +++ /dev/null @@ -1,70 +0,0 @@ -/* - * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MODULES_VIDEO_CODING_TEST_VCM_PAYLOAD_SINK_FACTORY_H_ -#define WEBRTC_MODULES_VIDEO_CODING_TEST_VCM_PAYLOAD_SINK_FACTORY_H_ - -#include -#include -#include - -#include "webrtc/base/constructormagic.h" -#include "webrtc/modules/video_coding/include/video_coding_defines.h" -#include "webrtc/modules/video_coding/test/rtp_player.h" - -class NullEventFactory; - -namespace webrtc { -class Clock; -class CriticalSectionWrapper; - -namespace rtpplayer { -class VcmPayloadSinkFactory : public PayloadSinkFactoryInterface { - public: - VcmPayloadSinkFactory(const std::string& base_out_filename, - Clock* clock, - bool protection_enabled, - VCMVideoProtection protection_method, - int64_t rtt_ms, - uint32_t render_delay_ms, - uint32_t min_playout_delay_ms); - virtual ~VcmPayloadSinkFactory(); - - // PayloadSinkFactoryInterface - virtual PayloadSinkInterface* Create(RtpStreamInterface* stream); - - int DecodeAndProcessAll(bool decode_dual_frame); - bool ProcessAll(); - bool DecodeAll(); - - private: - class VcmPayloadSink; - friend class VcmPayloadSink; - typedef std::vector Sinks; - - void Remove(VcmPayloadSink* sink); - - std::string base_out_filename_; - Clock* clock_; - bool protection_enabled_; - VCMVideoProtection protection_method_; - int64_t rtt_ms_; - uint32_t render_delay_ms_; - uint32_t min_playout_delay_ms_; - std::unique_ptr null_event_factory_; - std::unique_ptr crit_sect_; - Sinks sinks_; - - RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(VcmPayloadSinkFactory); -}; -} // namespace rtpplayer -} // namespace webrtc - -#endif // WEBRTC_MODULES_VIDEO_CODING_TEST_VCM_PAYLOAD_SINK_FACTORY_H_ diff --git a/WebRtc.NET/include/webrtc/modules/video_coding/timing.h b/WebRtc.NET/include/webrtc/modules/video_coding/timing.h deleted file mode 100644 index e7d2b1ff..00000000 --- a/WebRtc.NET/include/webrtc/modules/video_coding/timing.h +++ /dev/null @@ -1,143 +0,0 @@ -/* - * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MODULES_VIDEO_CODING_TIMING_H_ -#define WEBRTC_MODULES_VIDEO_CODING_TIMING_H_ - -#include - -#include "webrtc/base/thread_annotations.h" -#include "webrtc/modules/video_coding/codec_timer.h" -#include "webrtc/system_wrappers/include/critical_section_wrapper.h" -#include "webrtc/typedefs.h" - -namespace webrtc { - -class Clock; -class TimestampExtrapolator; - -class VCMTiming { - public: - // The primary timing component should be passed - // if this is the dual timing component. - explicit VCMTiming(Clock* clock, VCMTiming* master_timing = NULL); - virtual ~VCMTiming(); - - // Resets the timing to the initial state. - void Reset(); - void ResetDecodeTime(); - - // Set the amount of time needed to render an image. Defaults to 10 ms. - void set_render_delay(int render_delay_ms); - - // Set the minimum time the video must be delayed on the receiver to - // get the desired jitter buffer level. - void SetJitterDelay(int required_delay_ms); - - // Set the minimum playout delay from capture to render in ms. - void set_min_playout_delay(int min_playout_delay_ms); - - // Returns the minimum playout delay from capture to render in ms. - int min_playout_delay(); - - // Set the maximum playout delay from capture to render in ms. - void set_max_playout_delay(int max_playout_delay_ms); - - // Returns the maximum playout delay from capture to render in ms. - int max_playout_delay(); - - // Increases or decreases the current delay to get closer to the target delay. - // Calculates how long it has been since the previous call to this function, - // and increases/decreases the delay in proportion to the time difference. - void UpdateCurrentDelay(uint32_t frame_timestamp); - - // Increases or decreases the current delay to get closer to the target delay. - // Given the actual decode time in ms and the render time in ms for a frame, - // this function calculates how late the frame is and increases the delay - // accordingly. - void UpdateCurrentDelay(int64_t render_time_ms, - int64_t actual_decode_time_ms); - - // Stops the decoder timer, should be called when the decoder returns a frame - // or when the decoded frame callback is called. - int32_t StopDecodeTimer(uint32_t time_stamp, - int32_t decode_time_ms, - int64_t now_ms, - int64_t render_time_ms); - - // Used to report that a frame is passed to decoding. Updates the timestamp - // filter which is used to map between timestamps and receiver system time. - void IncomingTimestamp(uint32_t time_stamp, int64_t last_packet_time_ms); - // Returns the receiver system time when the frame with timestamp - // frame_timestamp should be rendered, assuming that the system time currently - // is now_ms. - virtual int64_t RenderTimeMs(uint32_t frame_timestamp, int64_t now_ms) const; - - // Returns the maximum time in ms that we can wait for a frame to become - // complete before we must pass it to the decoder. - virtual uint32_t MaxWaitingTime(int64_t render_time_ms, int64_t now_ms) const; - - // Returns the current target delay which is required delay + decode time + - // render delay. - int TargetVideoDelay() const; - - // Calculates whether or not there is enough time to decode a frame given a - // certain amount of processing time. - bool EnoughTimeToDecode(uint32_t available_processing_time_ms) const; - - // Return current timing information. Returns true if the first frame has been - // decoded, false otherwise. - bool GetTimings(int* decode_ms, - int* max_decode_ms, - int* current_delay_ms, - int* target_delay_ms, - int* jitter_buffer_ms, - int* min_playout_delay_ms, - int* render_delay_ms) const; - - enum { kDefaultRenderDelayMs = 10 }; - enum { kDelayMaxChangeMsPerS = 100 }; - - protected: - int RequiredDecodeTimeMs() const EXCLUSIVE_LOCKS_REQUIRED(crit_sect_); - int64_t RenderTimeMsInternal(uint32_t frame_timestamp, int64_t now_ms) const - EXCLUSIVE_LOCKS_REQUIRED(crit_sect_); - int TargetDelayInternal() const EXCLUSIVE_LOCKS_REQUIRED(crit_sect_); - - private: - void UpdateHistograms() const; - - CriticalSectionWrapper* crit_sect_; - Clock* const clock_; - bool master_ GUARDED_BY(crit_sect_); - TimestampExtrapolator* ts_extrapolator_ GUARDED_BY(crit_sect_); - std::unique_ptr codec_timer_ GUARDED_BY(crit_sect_); - int render_delay_ms_ GUARDED_BY(crit_sect_); - // Best-effort playout delay range for frames from capture to render. - // The receiver tries to keep the delay between |min_playout_delay_ms_| - // and |max_playout_delay_ms_| taking the network jitter into account. - // A special case is where min_playout_delay_ms_ = max_playout_delay_ms_ = 0, - // in which case the receiver tries to play the frames as they arrive. - int min_playout_delay_ms_ GUARDED_BY(crit_sect_); - int max_playout_delay_ms_ GUARDED_BY(crit_sect_); - int jitter_delay_ms_ GUARDED_BY(crit_sect_); - int current_delay_ms_ GUARDED_BY(crit_sect_); - int last_decode_ms_ GUARDED_BY(crit_sect_); - uint32_t prev_frame_timestamp_ GUARDED_BY(crit_sect_); - - // Statistics. - size_t num_decoded_frames_ GUARDED_BY(crit_sect_); - size_t num_delayed_decoded_frames_ GUARDED_BY(crit_sect_); - int64_t first_decoded_frame_ms_ GUARDED_BY(crit_sect_); - uint64_t sum_missed_render_deadline_ms_ GUARDED_BY(crit_sect_); -}; -} // namespace webrtc - -#endif // WEBRTC_MODULES_VIDEO_CODING_TIMING_H_ diff --git a/WebRtc.NET/include/webrtc/modules/video_coding/utility/default_video_bitrate_allocator.h b/WebRtc.NET/include/webrtc/modules/video_coding/utility/default_video_bitrate_allocator.h deleted file mode 100644 index f254e8d4..00000000 --- a/WebRtc.NET/include/webrtc/modules/video_coding/utility/default_video_bitrate_allocator.h +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MODULES_VIDEO_CODING_UTILITY_DEFAULT_VIDEO_BITRATE_ALLOCATOR_H_ -#define WEBRTC_MODULES_VIDEO_CODING_UTILITY_DEFAULT_VIDEO_BITRATE_ALLOCATOR_H_ - -#include "webrtc/common_video/include/video_bitrate_allocator.h" - -namespace webrtc { - -class DefaultVideoBitrateAllocator : public VideoBitrateAllocator { - public: - explicit DefaultVideoBitrateAllocator(const VideoCodec& codec); - ~DefaultVideoBitrateAllocator() override; - - BitrateAllocation GetAllocation(uint32_t total_bitrate, - uint32_t framerate) override; - uint32_t GetPreferredBitrateBps(uint32_t framerate) override; - - private: - const VideoCodec codec_; -}; - -} // namespace webrtc - -#endif // WEBRTC_MODULES_VIDEO_CODING_UTILITY_DEFAULT_VIDEO_BITRATE_ALLOCATOR_H_ diff --git a/WebRtc.NET/include/webrtc/modules/video_coding/utility/frame_dropper.h b/WebRtc.NET/include/webrtc/modules/video_coding/utility/frame_dropper.h deleted file mode 100644 index 71ff93da..00000000 --- a/WebRtc.NET/include/webrtc/modules/video_coding/utility/frame_dropper.h +++ /dev/null @@ -1,99 +0,0 @@ -/* - * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MODULES_VIDEO_CODING_UTILITY_FRAME_DROPPER_H_ -#define WEBRTC_MODULES_VIDEO_CODING_UTILITY_FRAME_DROPPER_H_ - -#include - -#include "webrtc/base/numerics/exp_filter.h" -#include "webrtc/typedefs.h" - -namespace webrtc { - -// The Frame Dropper implements a variant of the leaky bucket algorithm -// for keeping track of when to drop frames to avoid bit rate -// over use when the encoder can't keep its bit rate. -class FrameDropper { - public: - FrameDropper(); - explicit FrameDropper(float max_time_drops); - virtual ~FrameDropper() {} - - // Resets the FrameDropper to its initial state. - // This means that the frameRateWeight is set to its - // default value as well. - virtual void Reset(); - - virtual void Enable(bool enable); - // Answers the question if it's time to drop a frame - // if we want to reach a given frame rate. Must be - // called for every frame. - // - // Return value : True if we should drop the current frame - virtual bool DropFrame(); - // Updates the FrameDropper with the size of the latest encoded - // frame. The FrameDropper calculates a new drop ratio (can be - // seen as the probability to drop a frame) and updates its - // internal statistics. - // - // Input: - // - frameSizeBytes : The size of the latest frame - // returned from the encoder. - // - deltaFrame : True if the encoder returned - // a key frame. - virtual void Fill(size_t frameSizeBytes, bool deltaFrame); - - virtual void Leak(uint32_t inputFrameRate); - - // Sets the target bit rate and the frame rate produced by - // the camera. - // - // Input: - // - bitRate : The target bit rate - virtual void SetRates(float bitRate, float incoming_frame_rate); - - private: - void UpdateRatio(); - void CapAccumulator(); - - rtc::ExpFilter key_frame_ratio_; - rtc::ExpFilter delta_frame_size_avg_kbits_; - - // Key frames and large delta frames are not immediately accumulated in the - // bucket since they can immediately overflow the bucket leading to large - // drops on the following packets that may be much smaller. Instead these - // large frames are accumulated over several frames when the bucket leaks. - - // |large_frame_accumulation_spread_| represents the number of frames over - // which a large frame is accumulated. - float large_frame_accumulation_spread_; - // |large_frame_accumulation_count_| represents the number of frames left - // to finish accumulating a large frame. - int large_frame_accumulation_count_; - // |large_frame_accumulation_chunk_size_| represents the size of a single - // chunk for large frame accumulation. - float large_frame_accumulation_chunk_size_; - - float accumulator_; - float accumulator_max_; - float target_bitrate_; - bool drop_next_; - rtc::ExpFilter drop_ratio_; - int drop_count_; - float incoming_frame_rate_; - bool was_below_max_; - bool enabled_; - const float max_drop_duration_secs_; -}; - -} // namespace webrtc - -#endif // WEBRTC_MODULES_VIDEO_CODING_UTILITY_FRAME_DROPPER_H_ diff --git a/WebRtc.NET/include/webrtc/modules/video_coding/utility/mock/mock_frame_dropper.h b/WebRtc.NET/include/webrtc/modules/video_coding/utility/mock/mock_frame_dropper.h deleted file mode 100644 index c5521b88..00000000 --- a/WebRtc.NET/include/webrtc/modules/video_coding/utility/mock/mock_frame_dropper.h +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ -#ifndef WEBRTC_MODULES_VIDEO_CODING_UTILITY_MOCK_MOCK_FRAME_DROPPER_H_ -#define WEBRTC_MODULES_VIDEO_CODING_UTILITY_MOCK_MOCK_FRAME_DROPPER_H_ - -#include - -#include "webrtc/modules/video_coding/utility/frame_dropper.h" -#include "webrtc/test/gmock.h" -#include "webrtc/typedefs.h" - -namespace webrtc { - -class MockFrameDropper : public FrameDropper { - public: - MOCK_METHOD0(Reset, void()); - MOCK_METHOD1(Enable, void(bool enable)); - MOCK_METHOD0(DropFrame, bool()); - MOCK_METHOD2(Fill, void(size_t frameSizeBytes, bool deltaFrame)); - MOCK_METHOD1(Leak, void(uint32_t inputFrameRate)); - MOCK_METHOD2(SetRates, void(float bitRate, float incoming_frame_rate)); - MOCK_CONST_METHOD1(ActualFrameRate, float(uint32_t inputFrameRate)); -}; - -} // namespace webrtc - -#endif // WEBRTC_MODULES_VIDEO_CODING_UTILITY_MOCK_MOCK_FRAME_DROPPER_H_ diff --git a/WebRtc.NET/include/webrtc/modules/video_coding/utility/moving_average.h b/WebRtc.NET/include/webrtc/modules/video_coding/utility/moving_average.h deleted file mode 100644 index dd423850..00000000 --- a/WebRtc.NET/include/webrtc/modules/video_coding/utility/moving_average.h +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright (c) 2015 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MODULES_VIDEO_CODING_UTILITY_MOVING_AVERAGE_H_ -#define WEBRTC_MODULES_VIDEO_CODING_UTILITY_MOVING_AVERAGE_H_ - -#include - -#include "webrtc/base/optional.h" - -namespace webrtc { -class MovingAverage { - public: - explicit MovingAverage(size_t s); - void AddSample(int sample); - rtc::Optional GetAverage() const; - rtc::Optional GetAverage(size_t num_samples) const; - void Reset(); - size_t size() const; - - private: - size_t count_ = 0; - int sum_ = 0; - std::vector sum_history_; -}; -} // namespace webrtc - -#endif // WEBRTC_MODULES_VIDEO_CODING_UTILITY_MOVING_AVERAGE_H_ diff --git a/WebRtc.NET/include/webrtc/modules/video_coding/utility/qp_parser.h b/WebRtc.NET/include/webrtc/modules/video_coding/utility/qp_parser.h deleted file mode 100644 index 0b644ef6..00000000 --- a/WebRtc.NET/include/webrtc/modules/video_coding/utility/qp_parser.h +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright (c) 2015 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MODULES_VIDEO_CODING_UTILITY_QP_PARSER_H_ -#define WEBRTC_MODULES_VIDEO_CODING_UTILITY_QP_PARSER_H_ - -#include "webrtc/modules/video_coding/encoded_frame.h" - -namespace webrtc { - -class QpParser { - public: - QpParser() {} - ~QpParser() {} - - // Parses an encoded |frame| and extracts the |qp|. - // Returns true on success, false otherwise. - bool GetQp(const VCMEncodedFrame& frame, int* qp); -}; - -} // namespace webrtc - -#endif // WEBRTC_MODULES_VIDEO_CODING_UTILITY_QP_PARSER_H_ diff --git a/WebRtc.NET/include/webrtc/modules/video_coding/utility/quality_scaler.h b/WebRtc.NET/include/webrtc/modules/video_coding/utility/quality_scaler.h deleted file mode 100644 index 5734e664..00000000 --- a/WebRtc.NET/include/webrtc/modules/video_coding/utility/quality_scaler.h +++ /dev/null @@ -1,83 +0,0 @@ -/* - * Copyright (c) 2014 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MODULES_VIDEO_CODING_UTILITY_QUALITY_SCALER_H_ -#define WEBRTC_MODULES_VIDEO_CODING_UTILITY_QUALITY_SCALER_H_ - -#include - -#include "webrtc/common_types.h" -#include "webrtc/video_encoder.h" -#include "webrtc/base/optional.h" -#include "webrtc/base/sequenced_task_checker.h" -#include "webrtc/modules/video_coding/utility/moving_average.h" - -namespace webrtc { - -// An interface for a class that receives scale up/down requests. -class ScalingObserverInterface { - public: - enum ScaleReason : size_t { kQuality = 0, kCpu = 1 }; - static const size_t kScaleReasonSize = 2; - // Called to signal that we can handle larger frames. - virtual void ScaleUp(ScaleReason reason) = 0; - // Called to signal that encoder to scale down. - virtual void ScaleDown(ScaleReason reason) = 0; - - protected: - virtual ~ScalingObserverInterface() {} -}; - -// QualityScaler runs asynchronously and monitors QP values of encoded frames. -// It holds a reference to a ScalingObserverInterface implementation to signal -// an intent to scale up or down. -class QualityScaler { - public: - // Construct a QualityScaler with a given |observer|. - // This starts the quality scaler periodically checking what the average QP - // has been recently. - QualityScaler(ScalingObserverInterface* observer, VideoCodecType codec_type); - // If specific thresholds are desired these can be supplied as |thresholds|. - QualityScaler(ScalingObserverInterface* observer, - VideoEncoder::QpThresholds thresholds); - virtual ~QualityScaler(); - // Should be called each time the encoder drops a frame - void ReportDroppedFrame(); - // Inform the QualityScaler of the last seen QP. - void ReportQP(int qp); - - // The following members declared protected for testing purposes - protected: - QualityScaler(ScalingObserverInterface* observer, - VideoEncoder::QpThresholds thresholds, - int64_t sampling_period); - - private: - class CheckQPTask; - void CheckQP(); - void ClearSamples(); - void ReportQPLow(); - void ReportQPHigh(); - int64_t GetSamplingPeriodMs() const; - - CheckQPTask* check_qp_task_ GUARDED_BY(&task_checker_); - ScalingObserverInterface* const observer_ GUARDED_BY(&task_checker_); - rtc::SequencedTaskChecker task_checker_; - - const int64_t sampling_period_ms_; - bool fast_rampup_ GUARDED_BY(&task_checker_); - MovingAverage average_qp_ GUARDED_BY(&task_checker_); - MovingAverage framedrop_percent_ GUARDED_BY(&task_checker_); - - VideoEncoder::QpThresholds thresholds_ GUARDED_BY(&task_checker_); -}; -} // namespace webrtc - -#endif // WEBRTC_MODULES_VIDEO_CODING_UTILITY_QUALITY_SCALER_H_ diff --git a/WebRtc.NET/include/webrtc/modules/video_coding/utility/simulcast_rate_allocator.h b/WebRtc.NET/include/webrtc/modules/video_coding/utility/simulcast_rate_allocator.h deleted file mode 100644 index 7f54f5cd..00000000 --- a/WebRtc.NET/include/webrtc/modules/video_coding/utility/simulcast_rate_allocator.h +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MODULES_VIDEO_CODING_UTILITY_SIMULCAST_RATE_ALLOCATOR_H_ -#define WEBRTC_MODULES_VIDEO_CODING_UTILITY_SIMULCAST_RATE_ALLOCATOR_H_ - -#include - -#include -#include - -#include "webrtc/base/constructormagic.h" -#include "webrtc/common_video/include/video_bitrate_allocator.h" -#include "webrtc/modules/video_coding/codecs/vp8/temporal_layers.h" -#include "webrtc/video_encoder.h" - -namespace webrtc { - -class SimulcastRateAllocator : public VideoBitrateAllocator, - public TemporalLayersListener { - public: - explicit SimulcastRateAllocator( - const VideoCodec& codec, - std::unique_ptr tl_factory); - - void OnTemporalLayersCreated(int simulcast_id, - TemporalLayers* layers) override; - - BitrateAllocation GetAllocation(uint32_t total_bitrate_bps, - uint32_t framerate) override; - uint32_t GetPreferredBitrateBps(uint32_t framerate) override; - const VideoCodec& GetCodec() const; - - private: - const VideoCodec codec_; - std::map temporal_layers_; - std::unique_ptr tl_factory_; - - RTC_DISALLOW_COPY_AND_ASSIGN(SimulcastRateAllocator); -}; - -} // namespace webrtc - -#endif // WEBRTC_MODULES_VIDEO_CODING_UTILITY_SIMULCAST_RATE_ALLOCATOR_H_ diff --git a/WebRtc.NET/include/webrtc/modules/video_coding/video_coding_impl.h b/WebRtc.NET/include/webrtc/modules/video_coding/video_coding_impl.h deleted file mode 100644 index e4fff1e1..00000000 --- a/WebRtc.NET/include/webrtc/modules/video_coding/video_coding_impl.h +++ /dev/null @@ -1,238 +0,0 @@ -/* - * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MODULES_VIDEO_CODING_VIDEO_CODING_IMPL_H_ -#define WEBRTC_MODULES_VIDEO_CODING_VIDEO_CODING_IMPL_H_ - -#include "webrtc/modules/video_coding/include/video_coding.h" - -#include -#include -#include - -#include "webrtc/base/onetimeevent.h" -#include "webrtc/base/thread_annotations.h" -#include "webrtc/base/sequenced_task_checker.h" -#include "webrtc/common_video/include/frame_callback.h" -#include "webrtc/modules/video_coding/codec_database.h" -#include "webrtc/modules/video_coding/frame_buffer.h" -#include "webrtc/modules/video_coding/generic_decoder.h" -#include "webrtc/modules/video_coding/generic_encoder.h" -#include "webrtc/modules/video_coding/jitter_buffer.h" -#include "webrtc/modules/video_coding/media_optimization.h" -#include "webrtc/modules/video_coding/receiver.h" -#include "webrtc/modules/video_coding/timing.h" -#include "webrtc/modules/video_coding/utility/qp_parser.h" -#include "webrtc/system_wrappers/include/clock.h" - -namespace webrtc { - -class VideoBitrateAllocator; -class VideoBitrateAllocationObserver; - -namespace vcm { - -class VCMProcessTimer { - public: - static const int64_t kDefaultProcessIntervalMs = 1000; - - VCMProcessTimer(int64_t periodMs, Clock* clock) - : _clock(clock), - _periodMs(periodMs), - _latestMs(_clock->TimeInMilliseconds()) {} - int64_t Period() const; - int64_t TimeUntilProcess() const; - void Processed(); - - private: - Clock* _clock; - int64_t _periodMs; - int64_t _latestMs; -}; - -class VideoSender : public Module { - public: - typedef VideoCodingModule::SenderNackMode SenderNackMode; - - VideoSender(Clock* clock, - EncodedImageCallback* post_encode_callback, - VCMSendStatisticsCallback* send_stats_callback); - - ~VideoSender(); - - // Register the send codec to be used. - // This method must be called on the construction thread. - int32_t RegisterSendCodec(const VideoCodec* sendCodec, - uint32_t numberOfCores, - uint32_t maxPayloadSize); - - void RegisterExternalEncoder(VideoEncoder* externalEncoder, - uint8_t payloadType, - bool internalSource); - - int Bitrate(unsigned int* bitrate) const; - int FrameRate(unsigned int* framerate) const; - - // Update the channel parameters based on new rates and rtt. This will also - // cause an immediate call to VideoEncoder::SetRateAllocation(). - int32_t SetChannelParameters( - uint32_t target_bitrate_bps, - uint8_t loss_rate, - int64_t rtt, - VideoBitrateAllocator* bitrate_allocator, - VideoBitrateAllocationObserver* bitrate_updated_callback); - - // Updates the channel parameters with a new bitrate allocation, but using the - // current targit_bitrate, loss rate and rtt. That is, the distribution or - // caps may be updated to a change to a new VideoCodec or allocation mode. - // The new parameters will be stored as pending EncoderParameters, and the - // encoder will only be updated on the next frame. - void UpdateChannelParemeters( - VideoBitrateAllocator* bitrate_allocator, - VideoBitrateAllocationObserver* bitrate_updated_callback); - - // Deprecated: - // TODO(perkj): Remove once no projects use it. - int32_t RegisterProtectionCallback(VCMProtectionCallback* protection); - - int32_t AddVideoFrame(const VideoFrame& videoFrame, - const CodecSpecificInfo* codecSpecificInfo); - - int32_t IntraFrameRequest(size_t stream_index); - int32_t EnableFrameDropper(bool enable); - - int64_t TimeUntilNextProcess() override; - void Process() override; - - private: - EncoderParameters UpdateEncoderParameters( - const EncoderParameters& params, - VideoBitrateAllocator* bitrate_allocator, - uint32_t target_bitrate_bps); - void SetEncoderParameters(EncoderParameters params, bool has_internal_source) - EXCLUSIVE_LOCKS_REQUIRED(encoder_crit_); - - Clock* const clock_; - - rtc::CriticalSection encoder_crit_; - VCMGenericEncoder* _encoder; - media_optimization::MediaOptimization _mediaOpt; - VCMEncodedFrameCallback _encodedFrameCallback GUARDED_BY(encoder_crit_); - EncodedImageCallback* const post_encode_callback_; - VCMSendStatisticsCallback* const send_stats_callback_; - VCMCodecDataBase _codecDataBase GUARDED_BY(encoder_crit_); - bool frame_dropper_enabled_ GUARDED_BY(encoder_crit_); - VCMProcessTimer _sendStatsTimer; - - // Must be accessed on the construction thread of VideoSender. - VideoCodec current_codec_; - rtc::SequencedTaskChecker sequenced_checker_; - - rtc::CriticalSection params_crit_; - EncoderParameters encoder_params_ GUARDED_BY(params_crit_); - bool encoder_has_internal_source_ GUARDED_BY(params_crit_); - std::vector next_frame_types_ GUARDED_BY(params_crit_); -}; - -class VideoReceiver : public Module { - public: - typedef VideoCodingModule::ReceiverRobustness ReceiverRobustness; - - VideoReceiver(Clock* clock, - EventFactory* event_factory, - EncodedImageCallback* pre_decode_image_callback, - VCMTiming* timing, - NackSender* nack_sender = nullptr, - KeyFrameRequestSender* keyframe_request_sender = nullptr); - ~VideoReceiver(); - - int32_t RegisterReceiveCodec(const VideoCodec* receiveCodec, - int32_t numberOfCores, - bool requireKeyFrame); - - void RegisterExternalDecoder(VideoDecoder* externalDecoder, - uint8_t payloadType); - int32_t RegisterReceiveCallback(VCMReceiveCallback* receiveCallback); - int32_t RegisterReceiveStatisticsCallback( - VCMReceiveStatisticsCallback* receiveStats); - int32_t RegisterDecoderTimingCallback( - VCMDecoderTimingCallback* decoderTiming); - int32_t RegisterFrameTypeCallback(VCMFrameTypeCallback* frameTypeCallback); - int32_t RegisterPacketRequestCallback(VCMPacketRequestCallback* callback); - - int32_t Decode(uint16_t maxWaitTimeMs); - - int32_t Decode(const webrtc::VCMEncodedFrame* frame); - - int32_t ReceiveCodec(VideoCodec* currentReceiveCodec) const; - VideoCodecType ReceiveCodec() const; - - int32_t IncomingPacket(const uint8_t* incomingPayload, - size_t payloadLength, - const WebRtcRTPHeader& rtpInfo); - int32_t SetMinimumPlayoutDelay(uint32_t minPlayoutDelayMs); - int32_t SetRenderDelay(uint32_t timeMS); - int32_t Delay() const; - uint32_t DiscardedPackets() const; - - int SetReceiverRobustnessMode(ReceiverRobustness robustnessMode, - VCMDecodeErrorMode errorMode); - void SetNackSettings(size_t max_nack_list_size, - int max_packet_age_to_nack, - int max_incomplete_time_ms); - - void SetDecodeErrorMode(VCMDecodeErrorMode decode_error_mode); - int SetMinReceiverDelay(int desired_delay_ms); - - int32_t SetReceiveChannelParameters(int64_t rtt); - int32_t SetVideoProtection(VCMVideoProtection videoProtection, bool enable); - - int64_t TimeUntilNextProcess() override; - void Process() override; - - void TriggerDecoderShutdown(); - - protected: - int32_t Decode(const webrtc::VCMEncodedFrame& frame) - EXCLUSIVE_LOCKS_REQUIRED(receive_crit_); - int32_t RequestKeyFrame(); - int32_t RequestSliceLossIndication(const uint64_t pictureID) const; - - private: - Clock* const clock_; - rtc::CriticalSection process_crit_; - rtc::CriticalSection receive_crit_; - VCMTiming* _timing; - VCMReceiver _receiver; - VCMDecodedFrameCallback _decodedFrameCallback; - VCMFrameTypeCallback* _frameTypeCallback GUARDED_BY(process_crit_); - VCMReceiveStatisticsCallback* _receiveStatsCallback GUARDED_BY(process_crit_); - VCMDecoderTimingCallback* _decoderTimingCallback GUARDED_BY(process_crit_); - VCMPacketRequestCallback* _packetRequestCallback GUARDED_BY(process_crit_); - VCMGenericDecoder* _decoder; - - VCMFrameBuffer _frameFromFile; - bool _scheduleKeyRequest GUARDED_BY(process_crit_); - bool drop_frames_until_keyframe_ GUARDED_BY(process_crit_); - size_t max_nack_list_size_ GUARDED_BY(process_crit_); - - VCMCodecDataBase _codecDataBase GUARDED_BY(receive_crit_); - EncodedImageCallback* pre_decode_image_callback_; - - VCMProcessTimer _receiveStatsTimer; - VCMProcessTimer _retransmissionTimer; - VCMProcessTimer _keyRequestTimer; - QpParser qp_parser_; - ThreadUnsafeOneTimeEvent first_frame_received_; -}; - -} // namespace vcm -} // namespace webrtc -#endif // WEBRTC_MODULES_VIDEO_CODING_VIDEO_CODING_IMPL_H_ diff --git a/WebRtc.NET/include/webrtc/modules/video_processing/util/skin_detection.h b/WebRtc.NET/include/webrtc/modules/video_processing/util/skin_detection.h deleted file mode 100644 index f925d33d..00000000 --- a/WebRtc.NET/include/webrtc/modules/video_processing/util/skin_detection.h +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright (c) 2015 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MODULES_VIDEO_PROCESSING_UTIL_SKIN_DETECTION_H_ -#define WEBRTC_MODULES_VIDEO_PROCESSING_UTIL_SKIN_DETECTION_H_ - -namespace webrtc { - -#define MODEL_MODE 0 - -typedef unsigned char uint8_t; -bool MbHasSkinColor(const uint8_t* y_src, - const uint8_t* u_src, - const uint8_t* v_src, - const int stride_y, - const int stride_u, - const int stride_v, - const int mb_row, - const int mb_col); - -} // namespace webrtc - -#endif // WEBRTC_MODULES_VIDEO_PROCESSING_UTIL_SKIN_DETECTION_H_ diff --git a/WebRtc.NET/include/webrtc/p2p/base/asyncstuntcpsocket.h b/WebRtc.NET/include/webrtc/p2p/base/asyncstuntcpsocket.h deleted file mode 100644 index 065b4c25..00000000 --- a/WebRtc.NET/include/webrtc/p2p/base/asyncstuntcpsocket.h +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Copyright 2013 The WebRTC Project Authors. All rights reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_P2P_BASE_ASYNCSTUNTCPSOCKET_H_ -#define WEBRTC_P2P_BASE_ASYNCSTUNTCPSOCKET_H_ - -#include "webrtc/base/asynctcpsocket.h" -#include "webrtc/base/constructormagic.h" -#include "webrtc/base/socketfactory.h" - -namespace cricket { - -class AsyncStunTCPSocket : public rtc::AsyncTCPSocketBase { - public: - // Binds and connects |socket| and creates AsyncTCPSocket for - // it. Takes ownership of |socket|. Returns NULL if bind() or - // connect() fail (|socket| is destroyed in that case). - static AsyncStunTCPSocket* Create( - rtc::AsyncSocket* socket, - const rtc::SocketAddress& bind_address, - const rtc::SocketAddress& remote_address); - - AsyncStunTCPSocket(rtc::AsyncSocket* socket, bool listen); - virtual ~AsyncStunTCPSocket() {} - - virtual int Send(const void* pv, size_t cb, - const rtc::PacketOptions& options); - virtual void ProcessInput(char* data, size_t* len); - virtual void HandleIncomingConnection(rtc::AsyncSocket* socket); - - private: - // This method returns the message hdr + length written in the header. - // This method also returns the number of padding bytes needed/added to the - // turn message. |pad_bytes| should be used only when |is_turn| is true. - size_t GetExpectedLength(const void* data, size_t len, - int* pad_bytes); - - RTC_DISALLOW_COPY_AND_ASSIGN(AsyncStunTCPSocket); -}; - -} // namespace cricket - -#endif // WEBRTC_P2P_BASE_ASYNCSTUNTCPSOCKET_H_ diff --git a/WebRtc.NET/include/webrtc/p2p/base/candidate.h b/WebRtc.NET/include/webrtc/p2p/base/candidate.h deleted file mode 100644 index 992f4926..00000000 --- a/WebRtc.NET/include/webrtc/p2p/base/candidate.h +++ /dev/null @@ -1,303 +0,0 @@ -/* - * Copyright 2004 The WebRTC Project Authors. All rights reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_P2P_BASE_CANDIDATE_H_ -#define WEBRTC_P2P_BASE_CANDIDATE_H_ - -#include -#include -#include - -#include -#include -#include -#include - -#include "webrtc/p2p/base/p2pconstants.h" -#include "webrtc/base/checks.h" -#include "webrtc/base/helpers.h" -#include "webrtc/base/network.h" -#include "webrtc/base/socketaddress.h" - -namespace cricket { - -// Candidate for ICE based connection discovery. - -class Candidate { - public: - // TODO: Match the ordering and param list as per RFC 5245 - // candidate-attribute syntax. http://tools.ietf.org/html/rfc5245#section-15.1 - Candidate() - : id_(rtc::CreateRandomString(8)), - component_(0), - priority_(0), - network_type_(rtc::ADAPTER_TYPE_UNKNOWN), - generation_(0), - network_id_(0), - network_cost_(0) {} - - Candidate(int component, - const std::string& protocol, - const rtc::SocketAddress& address, - uint32_t priority, - const std::string& username, - const std::string& password, - const std::string& type, - uint32_t generation, - const std::string& foundation, - uint16_t network_id = 0, - uint16_t network_cost = 0) - : id_(rtc::CreateRandomString(8)), - component_(component), - protocol_(protocol), - address_(address), - priority_(priority), - username_(username), - password_(password), - type_(type), - network_type_(rtc::ADAPTER_TYPE_UNKNOWN), - generation_(generation), - foundation_(foundation), - network_id_(network_id), - network_cost_(network_cost) {} - - const std::string & id() const { return id_; } - void set_id(const std::string & id) { id_ = id; } - - int component() const { return component_; } - void set_component(int component) { component_ = component; } - - const std::string & protocol() const { return protocol_; } - void set_protocol(const std::string & protocol) { protocol_ = protocol; } - - // The protocol used to talk to relay. - const std::string& relay_protocol() const { return relay_protocol_; } - void set_relay_protocol(const std::string& protocol) { - relay_protocol_ = protocol; - } - - const rtc::SocketAddress & address() const { return address_; } - void set_address(const rtc::SocketAddress & address) { - address_ = address; - } - - uint32_t priority() const { return priority_; } - void set_priority(const uint32_t priority) { priority_ = priority; } - - // TODO(pthatcher): Remove once Chromium's jingle/glue/utils.cc - // doesn't use it. - // Maps old preference (which was 0.0-1.0) to match priority (which - // is 0-2^32-1) to to match RFC 5245, section 4.1.2.1. Also see - // https://docs.google.com/a/google.com/document/d/ - // 1iNQDiwDKMh0NQOrCqbj3DKKRT0Dn5_5UJYhmZO-t7Uc/edit - float preference() const { - // The preference value is clamped to two decimal precision. - return static_cast(((priority_ >> 24) * 100 / 127) / 100.0); - } - - // TODO(pthatcher): Remove once Chromium's jingle/glue/utils.cc - // doesn't use it. - void set_preference(float preference) { - // Limiting priority to UINT_MAX when value exceeds uint32_t max. - // This can happen for e.g. when preference = 3. - uint64_t prio_val = static_cast(preference * 127) << 24; - priority_ = static_cast( - std::min(prio_val, static_cast(UINT_MAX))); - } - - // TODO(honghaiz): Change to usernameFragment or ufrag. - const std::string & username() const { return username_; } - void set_username(const std::string & username) { username_ = username; } - - const std::string & password() const { return password_; } - void set_password(const std::string & password) { password_ = password; } - - const std::string & type() const { return type_; } - void set_type(const std::string & type) { type_ = type; } - - const std::string & network_name() const { return network_name_; } - void set_network_name(const std::string & network_name) { - network_name_ = network_name; - } - - rtc::AdapterType network_type() const { return network_type_; } - void set_network_type(rtc::AdapterType network_type) { - network_type_ = network_type; - } - - // Candidates in a new generation replace those in the old generation. - uint32_t generation() const { return generation_; } - void set_generation(uint32_t generation) { generation_ = generation; } - const std::string generation_str() const { - std::ostringstream ost; - ost << generation_; - return ost.str(); - } - void set_generation_str(const std::string& str) { - std::istringstream ist(str); - ist >> generation_; - } - - // |network_cost| measures the cost/penalty of using this candidate. A network - // cost of 0 indicates this candidate can be used freely. A value of - // rtc::kNetworkCostMax indicates it should be used only as the last resort. - void set_network_cost(uint16_t network_cost) { - RTC_DCHECK(network_cost <= rtc::kNetworkCostMax); - network_cost_ = network_cost; - } - uint16_t network_cost() const { return network_cost_; } - - // An ID assigned to the network hosting the candidate. - uint16_t network_id() const { return network_id_; } - void set_network_id(uint16_t network_id) { network_id_ = network_id; } - - const std::string& foundation() const { - return foundation_; - } - - void set_foundation(const std::string& foundation) { - foundation_ = foundation; - } - - const rtc::SocketAddress & related_address() const { - return related_address_; - } - void set_related_address( - const rtc::SocketAddress & related_address) { - related_address_ = related_address; - } - const std::string& tcptype() const { return tcptype_; } - void set_tcptype(const std::string& tcptype){ - tcptype_ = tcptype; - } - - // The name of the transport channel of this candidate. - const std::string& transport_name() const { return transport_name_; } - void set_transport_name(const std::string& transport_name) { - transport_name_ = transport_name; - } - - // Determines whether this candidate is equivalent to the given one. - bool IsEquivalent(const Candidate& c) const { - // We ignore the network name, since that is just debug information, and - // the priority and the network cost, since they should be the same if the - // rest are. - return (component_ == c.component_) && (protocol_ == c.protocol_) && - (address_ == c.address_) && (username_ == c.username_) && - (password_ == c.password_) && (type_ == c.type_) && - (generation_ == c.generation_) && (foundation_ == c.foundation_) && - (related_address_ == c.related_address_) && - (network_id_ == c.network_id_); - } - - // Determines whether this candidate can be considered equivalent to the - // given one when looking for a matching candidate to remove. - bool MatchesForRemoval(const Candidate& c) const { - return component_ == c.component_ && protocol_ == c.protocol_ && - address_ == c.address_; - } - - std::string ToString() const { - return ToStringInternal(false); - } - - std::string ToSensitiveString() const { - return ToStringInternal(true); - } - - uint32_t GetPriority(uint32_t type_preference, - int network_adapter_preference, - int relay_preference) const { - // RFC 5245 - 4.1.2.1. - // priority = (2^24)*(type preference) + - // (2^8)*(local preference) + - // (2^0)*(256 - component ID) - - // |local_preference| length is 2 bytes, 0-65535 inclusive. - // In our implemenation we will partion local_preference into - // 0 1 - // 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 - // +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ - // | NIC Pref | Addr Pref | - // +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ - // NIC Type - Type of the network adapter e.g. 3G/Wifi/Wired. - // Addr Pref - Address preference value as per RFC 3484. - // local preference = (NIC Type << 8 | Addr_Pref) - relay preference. - - int addr_pref = IPAddressPrecedence(address_.ipaddr()); - int local_preference = ((network_adapter_preference << 8) | addr_pref) + - relay_preference; - - return (type_preference << 24) | - (local_preference << 8) | - (256 - component_); - } - - bool operator==(const Candidate& o) const { - return id_ == o.id_ && component_ == o.component_ && - protocol_ == o.protocol_ && relay_protocol_ == o.relay_protocol_ && - address_ == o.address_ && priority_ == o.priority_ && - username_ == o.username_ && password_ == o.password_ && - type_ == o.type_ && network_name_ == o.network_name_ && - network_type_ == o.network_type_ && generation_ == o.generation_ && - foundation_ == o.foundation_ && - related_address_ == o.related_address_ && tcptype_ == o.tcptype_ && - transport_name_ == o.transport_name_ && network_id_ == o.network_id_; - } - bool operator!=(const Candidate& o) const { return !(*this == o); } - - private: - std::string ToStringInternal(bool sensitive) const { - std::ostringstream ost; - std::string address = sensitive ? address_.ToSensitiveString() : - address_.ToString(); - ost << "Cand[" << transport_name_ << ":" << foundation_ << ":" << component_ - << ":" << protocol_ << ":" << priority_ << ":" << address << ":" - << type_ << ":" << related_address_ << ":" << username_ << ":" - << password_ << ":" << network_id_ << ":" << network_cost_ << ":" - << generation_ << "]"; - return ost.str(); - } - - std::string id_; - int component_; - std::string protocol_; - std::string relay_protocol_; - rtc::SocketAddress address_; - uint32_t priority_; - std::string username_; - std::string password_; - std::string type_; - std::string network_name_; - rtc::AdapterType network_type_; - uint32_t generation_; - std::string foundation_; - rtc::SocketAddress related_address_; - std::string tcptype_; - std::string transport_name_; - uint16_t network_id_; - uint16_t network_cost_; -}; - -// Used during parsing and writing to map component to channel name -// and back. This is primarily for converting old G-ICE candidate -// signalling to new ICE candidate classes. -class CandidateTranslator { - public: - virtual ~CandidateTranslator() {} - virtual bool GetChannelNameFromComponent( - int component, std::string* channel_name) const = 0; - virtual bool GetComponentFromChannelName( - const std::string& channel_name, int* component) const = 0; -}; - -} // namespace cricket - -#endif // WEBRTC_P2P_BASE_CANDIDATE_H_ diff --git a/WebRtc.NET/include/webrtc/p2p/base/common.h b/WebRtc.NET/include/webrtc/p2p/base/common.h deleted file mode 100644 index 8a3178c8..00000000 --- a/WebRtc.NET/include/webrtc/p2p/base/common.h +++ /dev/null @@ -1,20 +0,0 @@ -/* - * Copyright 2004 The WebRTC Project Authors. All rights reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_P2P_BASE_COMMON_H_ -#define WEBRTC_P2P_BASE_COMMON_H_ - -#include "webrtc/base/logging.h" - -// Common log description format for jingle messages -#define LOG_J(sev, obj) LOG(sev) << "Jingle:" << obj->ToString() << ": " -#define LOG_JV(sev, obj) LOG_V(sev) << "Jingle:" << obj->ToString() << ": " - -#endif // WEBRTC_P2P_BASE_COMMON_H_ diff --git a/WebRtc.NET/include/webrtc/p2p/base/dtlstransportchannel.h b/WebRtc.NET/include/webrtc/p2p/base/dtlstransportchannel.h deleted file mode 100644 index 0ab9a927..00000000 --- a/WebRtc.NET/include/webrtc/p2p/base/dtlstransportchannel.h +++ /dev/null @@ -1,246 +0,0 @@ -/* - * Copyright 2011 The WebRTC Project Authors. All rights reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_P2P_BASE_DTLSTRANSPORTCHANNEL_H_ -#define WEBRTC_P2P_BASE_DTLSTRANSPORTCHANNEL_H_ - -#include -#include -#include - -#include "webrtc/base/buffer.h" -#include "webrtc/base/bufferqueue.h" -#include "webrtc/base/constructormagic.h" -#include "webrtc/base/sslstreamadapter.h" -#include "webrtc/base/stream.h" -#include "webrtc/p2p/base/dtlstransportinternal.h" -#include "webrtc/p2p/base/icetransportinternal.h" - -namespace rtc { -class PacketTransportInterface; -} - -namespace cricket { - -// A bridge between a packet-oriented/transport-type interface on -// the bottom and a StreamInterface on the top. -class StreamInterfaceChannel : public rtc::StreamInterface { - public: - explicit StreamInterfaceChannel(IceTransportInternal* ice_transport); - - // Push in a packet; this gets pulled out from Read(). - bool OnPacketReceived(const char* data, size_t size); - - // Implementations of StreamInterface - rtc::StreamState GetState() const override { return state_; } - void Close() override; - rtc::StreamResult Read(void* buffer, - size_t buffer_len, - size_t* read, - int* error) override; - rtc::StreamResult Write(const void* data, - size_t data_len, - size_t* written, - int* error) override; - - private: - IceTransportInternal* ice_transport_; // owned by DtlsTransport - rtc::StreamState state_; - rtc::BufferQueue packets_; - - RTC_DISALLOW_COPY_AND_ASSIGN(StreamInterfaceChannel); -}; - - -// This class provides a DTLS SSLStreamAdapter inside a TransportChannel-style -// packet-based interface, wrapping an existing TransportChannel instance -// (e.g a P2PTransportChannel) -// Here's the way this works: -// -// DtlsTransport { -// SSLStreamAdapter* dtls_ { -// StreamInterfaceChannel downward_ { -// IceTransportInternal* ice_transport_; -// } -// } -// } -// -// - Data which comes into DtlsTransport from the underlying -// ice_transport_ via OnReadPacket() is checked for whether it is DTLS -// or not, and if it is, is passed to DtlsTransport::HandleDtlsPacket, -// which pushes it into to downward_. dtls_ is listening for events on -// downward_, so it immediately calls downward_->Read(). -// -// - Data written to DtlsTransport is passed either to downward_ or directly -// to ice_transport_, depending on whether DTLS is negotiated and whether -// the flags include PF_SRTP_BYPASS -// -// - The SSLStreamAdapter writes to downward_->Write() which translates it -// into packet writes on ice_transport_. -class DtlsTransport : public DtlsTransportInternal { - public: - // The parameters here is: - // ice_transport -- the ice transport we are wrapping - explicit DtlsTransport(IceTransportInternal* ice_transport); - ~DtlsTransport() override; - - DtlsTransportState dtls_state() const override { return dtls_state_; } - - const std::string& transport_name() const override { return transport_name_; } - - int component() const override { return component_; } - - // Returns false if no local certificate was set, or if the peer doesn't - // support DTLS. - bool IsDtlsActive() const override { return dtls_active_; } - - bool SetLocalCertificate( - const rtc::scoped_refptr& certificate) override; - rtc::scoped_refptr GetLocalCertificate() const override; - - bool SetRemoteFingerprint(const std::string& digest_alg, - const uint8_t* digest, - size_t digest_len) override; - - - // Called to send a packet (via DTLS, if turned on). - int SendPacket(const char* data, - size_t size, - const rtc::PacketOptions& options, - int flags) override; - - bool GetOption(rtc::Socket::Option opt, int* value) override { - return ice_transport_->GetOption(opt, value); - } - - virtual bool SetSslMaxProtocolVersion(rtc::SSLProtocolVersion version); - - // Set up the ciphers to use for DTLS-SRTP. If this method is not called - // before DTLS starts, or |ciphers| is empty, SRTP keys won't be negotiated. - // This method should be called before SetupDtls. - bool SetSrtpCryptoSuites(const std::vector& ciphers) override; - - // Find out which DTLS-SRTP cipher was negotiated - bool GetSrtpCryptoSuite(int* cipher) override; - - bool GetSslRole(rtc::SSLRole* role) const override; - bool SetSslRole(rtc::SSLRole role) override; - - // Find out which DTLS cipher was negotiated - bool GetSslCipherSuite(int* cipher) override; - - // Once DTLS has been established, this method retrieves the certificate in - // use by the remote peer, for use in external identity verification. - std::unique_ptr GetRemoteSSLCertificate() const override; - - // Once DTLS has established (i.e., this ice_transport is writable), this - // method extracts the keys negotiated during the DTLS handshake, for use in - // external encryption. DTLS-SRTP uses this to extract the needed SRTP keys. - // See the SSLStreamAdapter documentation for info on the specific parameters. - bool ExportKeyingMaterial(const std::string& label, - const uint8_t* context, - size_t context_len, - bool use_context, - uint8_t* result, - size_t result_len) override { - return (dtls_.get()) ? dtls_->ExportKeyingMaterial(label, context, - context_len, - use_context, - result, result_len) - : false; - } - - IceTransportInternal* ice_transport() override { return ice_transport_; } - - // For informational purposes. Tells if the DTLS handshake has finished. - // This may be true even if writable() is false, if the remote fingerprint - // has not yet been verified. - bool IsDtlsConnected(); - - bool receiving() const override { return receiving_; } - - bool writable() const override { return writable_; } - - int GetError() override { return ice_transport_->GetError(); } - - int SetOption(rtc::Socket::Option opt, int value) override { - return ice_transport_->SetOption(opt, value); - } - - bool SetSrtpCiphers(const std::vector& ciphers) override { - std::vector crypto_suites; - for (const auto cipher : ciphers) { - crypto_suites.push_back(rtc::SrtpCryptoSuiteFromName(cipher)); - } - return SetSrtpCryptoSuites(crypto_suites); - } - - std::string ToString() const { - const char RECEIVING_ABBREV[2] = {'_', 'R'}; - const char WRITABLE_ABBREV[2] = {'_', 'W'}; - std::stringstream ss; - ss << "DtlsTransport[" << transport_name_ << "|" << component_ << "|" - << RECEIVING_ABBREV[receiving()] << WRITABLE_ABBREV[writable()] << "]"; - return ss.str(); - } - - private: - void OnWritableState(rtc::PacketTransportInterface* transport); - void OnReadPacket(rtc::PacketTransportInterface* transport, - const char* data, - size_t size, - const rtc::PacketTime& packet_time, - int flags); - void OnSentPacket(rtc::PacketTransportInterface* transport, - const rtc::SentPacket& sent_packet); - void OnReadyToSend(rtc::PacketTransportInterface* transport); - void OnReceivingState(rtc::PacketTransportInterface* transport); - void OnDtlsEvent(rtc::StreamInterface* stream_, int sig, int err); - bool SetupDtls(); - void MaybeStartDtls(); - bool HandleDtlsPacket(const char* data, size_t size); - void OnDtlsHandshakeError(rtc::SSLHandshakeError error); - - void set_receiving(bool receiving); - void set_writable(bool writable); - // Sets the DTLS state, signaling if necessary. - void set_dtls_state(DtlsTransportState state); - - std::string transport_name_; - int component_; - DtlsTransportState dtls_state_ = DTLS_TRANSPORT_NEW; - rtc::Thread* network_thread_; // Everything should occur on this thread. - // Underlying ice_transport, not owned by this class. - IceTransportInternal* const ice_transport_; - std::unique_ptr dtls_; // The DTLS stream - StreamInterfaceChannel* - downward_; // Wrapper for ice_transport_, owned by dtls_. - std::vector srtp_ciphers_; // SRTP ciphers to use with DTLS. - bool dtls_active_ = false; - rtc::scoped_refptr local_certificate_; - rtc::SSLRole ssl_role_; - rtc::SSLProtocolVersion ssl_max_version_; - rtc::Buffer remote_fingerprint_value_; - std::string remote_fingerprint_algorithm_; - - // Cached DTLS ClientHello packet that was received before we started the - // DTLS handshake. This could happen if the hello was received before the - // ice transport became writable, or before a remote fingerprint was received. - rtc::Buffer cached_client_hello_; - - bool receiving_ = false; - bool writable_ = false; - - RTC_DISALLOW_COPY_AND_ASSIGN(DtlsTransport); -}; - -} // namespace cricket - -#endif // WEBRTC_P2P_BASE_DTLSTRANSPORTCHANNEL_H_ diff --git a/WebRtc.NET/include/webrtc/p2p/base/dtlstransportinternal.h b/WebRtc.NET/include/webrtc/p2p/base/dtlstransportinternal.h deleted file mode 100644 index 74fdd6df..00000000 --- a/WebRtc.NET/include/webrtc/p2p/base/dtlstransportinternal.h +++ /dev/null @@ -1,112 +0,0 @@ -/* - * Copyright 2016 The WebRTC Project Authors. All rights reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_P2P_BASE_DTLSTRANSPORTINTERNAL_H_ -#define WEBRTC_P2P_BASE_DTLSTRANSPORTINTERNAL_H_ - -#include -#include -#include - -#include "webrtc/base/sslstreamadapter.h" -#include "webrtc/p2p/base/icetransportinternal.h" -#include "webrtc/p2p/base/jseptransport.h" -#include "webrtc/p2p/base/packettransportinterface.h" - -namespace cricket { - -enum PacketFlags { - PF_NORMAL = 0x00, // A normal packet. - PF_SRTP_BYPASS = 0x01, // An encrypted SRTP packet; bypass any additional - // crypto provided by the transport (e.g. DTLS) -}; - -// DtlsTransportInternal is an internal interface that does DTLS. -// Once the public interface is supported, -// (https://www.w3.org/TR/webrtc/#rtcdtlstransport-interface) -// the DtlsTransportInterface will be split from this class. -class DtlsTransportInternal : public rtc::PacketTransportInterface { - public: - virtual ~DtlsTransportInternal() {} - - virtual DtlsTransportState dtls_state() const = 0; - - virtual const std::string& transport_name() const = 0; - - virtual int component() const = 0; - - virtual bool IsDtlsActive() const = 0; - - virtual bool GetSslRole(rtc::SSLRole* role) const = 0; - - virtual bool SetSslRole(rtc::SSLRole role) = 0; - - // Sets up the ciphers to use for DTLS-SRTP. - virtual bool SetSrtpCryptoSuites(const std::vector& ciphers) = 0; - - // Keep the original one for backward compatibility until all dependencies - // move away. TODO(zhihuang): Remove this function. - virtual bool SetSrtpCiphers(const std::vector& ciphers) = 0; - - // Finds out which DTLS-SRTP cipher was negotiated. - // TODO(zhihuang): Remove this once all dependencies implement this. - virtual bool GetSrtpCryptoSuite(int* cipher) = 0; - - // Finds out which DTLS cipher was negotiated. - // TODO(zhihuang): Remove this once all dependencies implement this. - virtual bool GetSslCipherSuite(int* cipher) = 0; - - // Gets the local RTCCertificate used for DTLS. - virtual rtc::scoped_refptr GetLocalCertificate() - const = 0; - - virtual bool SetLocalCertificate( - const rtc::scoped_refptr& certificate) = 0; - - // Gets a copy of the remote side's SSL certificate. - virtual std::unique_ptr GetRemoteSSLCertificate() - const = 0; - - // Allows key material to be extracted for external encryption. - virtual bool ExportKeyingMaterial(const std::string& label, - const uint8_t* context, - size_t context_len, - bool use_context, - uint8_t* result, - size_t result_len) = 0; - - // Set DTLS remote fingerprint. Must be after local identity set. - virtual bool SetRemoteFingerprint(const std::string& digest_alg, - const uint8_t* digest, - size_t digest_len) = 0; - - // Expose the underneath IceTransport. - virtual IceTransportInternal* ice_transport() = 0; - - sigslot::signal2 SignalDtlsState; - - // Emitted whenever the Dtls handshake failed on some transport channel. - sigslot::signal1 SignalDtlsHandshakeError; - - // Debugging description of this transport. - std::string debug_name() const override { - return transport_name() + " " + std::to_string(component()); - } - - protected: - DtlsTransportInternal() {} - - private: - RTC_DISALLOW_COPY_AND_ASSIGN(DtlsTransportInternal); -}; - -} // namespace cricket - -#endif // WEBRTC_P2P_BASE_DTLSTRANSPORTINTERNAL_H_ diff --git a/WebRtc.NET/include/webrtc/p2p/base/faketransportcontroller.h b/WebRtc.NET/include/webrtc/p2p/base/faketransportcontroller.h deleted file mode 100644 index 76ed3706..00000000 --- a/WebRtc.NET/include/webrtc/p2p/base/faketransportcontroller.h +++ /dev/null @@ -1,706 +0,0 @@ -/* - * Copyright 2009 The WebRTC Project Authors. All rights reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_P2P_BASE_FAKETRANSPORTCONTROLLER_H_ -#define WEBRTC_P2P_BASE_FAKETRANSPORTCONTROLLER_H_ - -#include -#include -#include -#include - -#include "webrtc/base/bind.h" -#include "webrtc/base/buffer.h" -#include "webrtc/base/fakesslidentity.h" -#include "webrtc/base/messagequeue.h" -#include "webrtc/base/sigslot.h" -#include "webrtc/base/sslfingerprint.h" -#include "webrtc/base/thread.h" -#include "webrtc/p2p/base/candidatepairinterface.h" -#include "webrtc/p2p/base/dtlstransportinternal.h" -#include "webrtc/p2p/base/icetransportinternal.h" - -#include "webrtc/p2p/base/transportcontroller.h" - -#ifdef HAVE_QUIC -#include "webrtc/p2p/quic/quictransport.h" -#endif - -namespace cricket { - -namespace { -struct PacketMessageData : public rtc::MessageData { - PacketMessageData(const char* data, size_t len) : packet(data, len) {} - rtc::Buffer packet; -}; -} // namespace - -class FakeIceTransport : public IceTransportInternal, - public rtc::MessageHandler { - public: - explicit FakeIceTransport(const std::string& name, int component) - : name_(name), component_(component) {} - ~FakeIceTransport() { Reset(); } - - const std::string& transport_name() const override { return name_; } - int component() const override { return component_; } - uint64_t IceTiebreaker() const { return tiebreaker_; } - IceMode remote_ice_mode() const { return remote_ice_mode_; } - const std::string& ice_ufrag() const { return ice_ufrag_; } - const std::string& ice_pwd() const { return ice_pwd_; } - const std::string& remote_ice_ufrag() const { return remote_ice_ufrag_; } - const std::string& remote_ice_pwd() const { return remote_ice_pwd_; } - - // If async, will send packets by "Post"-ing to message queue instead of - // synchronously "Send"-ing. - void SetAsync(bool async) { async_ = async; } - void SetAsyncDelay(int delay_ms) { async_delay_ms_ = delay_ms; } - - IceTransportState GetState() const override { - if (connection_count_ == 0) { - return had_connection_ ? IceTransportState::STATE_FAILED - : IceTransportState::STATE_INIT; - } - - if (connection_count_ == 1) { - return IceTransportState::STATE_COMPLETED; - } - - return IceTransportState::STATE_CONNECTING; - } - - void SetIceRole(IceRole role) override { role_ = role; } - IceRole GetIceRole() const override { return role_; } - void SetIceTiebreaker(uint64_t tiebreaker) override { - tiebreaker_ = tiebreaker; - } - void SetIceParameters(const IceParameters& ice_params) override { - ice_ufrag_ = ice_params.ufrag; - ice_pwd_ = ice_params.pwd; - } - void SetRemoteIceParameters(const IceParameters& params) override { - remote_ice_ufrag_ = params.ufrag; - remote_ice_pwd_ = params.pwd; - } - - void SetRemoteIceMode(IceMode mode) override { remote_ice_mode_ = mode; } - - void MaybeStartGathering() override { - if (gathering_state_ == kIceGatheringNew) { - gathering_state_ = kIceGatheringGathering; - SignalGatheringState(this); - } - } - - IceGatheringState gathering_state() const override { - return gathering_state_; - } - - void Reset() { - if (state_ != STATE_INIT) { - state_ = STATE_INIT; - if (dest_) { - dest_->state_ = STATE_INIT; - dest_->dest_ = nullptr; - dest_ = nullptr; - } - } - } - - void SetWritable(bool writable) { set_writable(writable); } - - void set_writable(bool writable) { - if (writable_ == writable) { - return; - } - LOG(INFO) << "set_writable from:" << writable_ << " to " << writable; - writable_ = writable; - if (writable_) { - SignalReadyToSend(this); - } - SignalWritableState(this); - } - bool writable() const override { return writable_; } - - // Simulates the two transports connecting to each other. - // If |asymmetric| is true this method only affects this FakeIceTransport. - // If false, it affects |dest| as well. - void SetDestination(FakeIceTransport* dest, bool asymmetric = false) { - if (state_ == STATE_INIT && dest) { - // This simulates the delivery of candidates. - dest_ = dest; - state_ = STATE_CONNECTED; - set_writable(true); - if (!asymmetric) { - dest->SetDestination(this, true); - } - } else if (state_ == STATE_CONNECTED && !dest) { - // Simulates loss of connectivity, by asymmetrically forgetting dest_. - dest_ = nullptr; - state_ = STATE_INIT; - set_writable(false); - } - } - - void SetConnectionCount(size_t connection_count) { - size_t old_connection_count = connection_count_; - connection_count_ = connection_count; - if (connection_count) - had_connection_ = true; - // In this fake transport channel, |connection_count_| determines the - // transport channel state. - if (connection_count_ < old_connection_count) - SignalStateChanged(this); - } - - void SetCandidatesGatheringComplete() { - if (gathering_state_ != kIceGatheringComplete) { - gathering_state_ = kIceGatheringComplete; - SignalGatheringState(this); - } - } - - void SetReceiving(bool receiving) { set_receiving(receiving); } - - void set_receiving(bool receiving) { - if (receiving_ == receiving) { - return; - } - receiving_ = receiving; - SignalReceivingState(this); - } - bool receiving() const override { return receiving_; } - - void SetIceConfig(const IceConfig& config) override { ice_config_ = config; } - - int receiving_timeout() const { return ice_config_.receiving_timeout; } - bool gather_continually() const { return ice_config_.gather_continually(); } - - int SendPacket(const char* data, - size_t len, - const rtc::PacketOptions& options, - int flags) override { - if (state_ != STATE_CONNECTED) { - return -1; - } - - if (flags != PF_SRTP_BYPASS && flags != 0) { - return -1; - } - - PacketMessageData* packet = new PacketMessageData(data, len); - if (async_) { - if (async_delay_ms_) { - rtc::Thread::Current()->PostDelayed(RTC_FROM_HERE, async_delay_ms_, - this, 0, packet); - } else { - rtc::Thread::Current()->Post(RTC_FROM_HERE, this, 0, packet); - } - } else { - rtc::Thread::Current()->Send(RTC_FROM_HERE, this, 0, packet); - } - rtc::SentPacket sent_packet(options.packet_id, rtc::TimeMillis()); - SignalSentPacket(this, sent_packet); - return static_cast(len); - } - int SetOption(rtc::Socket::Option opt, int value) override { return true; } - bool GetOption(rtc::Socket::Option opt, int* value) override { return true; } - int GetError() override { return 0; } - - void AddRemoteCandidate(const Candidate& candidate) override { - remote_candidates_.push_back(candidate); - } - - void RemoveRemoteCandidate(const Candidate& candidate) override {} - - const Candidates& remote_candidates() const { return remote_candidates_; } - - void OnMessage(rtc::Message* msg) override { - PacketMessageData* data = static_cast(msg->pdata); - dest_->SignalReadPacket(dest_, data->packet.data(), - data->packet.size(), rtc::CreatePacketTime(0), 0); - delete data; - } - - bool GetStats(ConnectionInfos* infos) override { - ConnectionInfo info; - infos->clear(); - infos->push_back(info); - return true; - } - - void SetMetricsObserver(webrtc::MetricsObserverInterface* observer) override { - } - - private: - std::string name_; - int component_; - enum State { STATE_INIT, STATE_CONNECTED }; - FakeIceTransport* dest_ = nullptr; - State state_ = STATE_INIT; - bool async_ = false; - int async_delay_ms_ = 0; - Candidates remote_candidates_; - IceConfig ice_config_; - IceRole role_ = ICEROLE_UNKNOWN; - uint64_t tiebreaker_ = 0; - std::string ice_ufrag_; - std::string ice_pwd_; - std::string remote_ice_ufrag_; - std::string remote_ice_pwd_; - IceMode remote_ice_mode_ = ICEMODE_FULL; - size_t connection_count_ = 0; - IceGatheringState gathering_state_ = kIceGatheringNew; - bool had_connection_ = false; - bool writable_ = false; - bool receiving_ = false; -}; - -class FakeDtlsTransport : public DtlsTransportInternal { - public: - explicit FakeDtlsTransport(FakeIceTransport* ice_transport) - : ice_transport_(ice_transport), - transport_name_(ice_transport->transport_name()), - component_(ice_transport->component()), - dtls_fingerprint_("", nullptr, 0) { - ice_transport_->SignalReadPacket.connect( - this, &FakeDtlsTransport::OnIceTransportReadPacket); - } - - // If this constructor is called, a new fake ice transport will be created, - // and this FakeDtlsTransport will take the ownership. - explicit FakeDtlsTransport(const std::string& name, int component) - : owned_ice_transport_(new FakeIceTransport(name, component)), - transport_name_(owned_ice_transport_->transport_name()), - component_(owned_ice_transport_->component()), - dtls_fingerprint_("", nullptr, 0) { - ice_transport_ = owned_ice_transport_.get(); - ice_transport_->SignalReadPacket.connect( - this, &FakeDtlsTransport::OnIceTransportReadPacket); - } - - ~FakeDtlsTransport() override { Reset(); } - - uint64_t IceTiebreaker() const { return ice_transport_->IceTiebreaker(); } - IceMode remote_ice_mode() const { return ice_transport_->remote_ice_mode(); } - const std::string& ice_ufrag() const { return ice_transport_->ice_ufrag(); } - const std::string& ice_pwd() const { return ice_transport_->ice_pwd(); } - const std::string& remote_ice_ufrag() const { - return ice_transport_->remote_ice_ufrag(); - } - const std::string& remote_ice_pwd() const { - return ice_transport_->remote_ice_pwd(); - } - - DtlsTransportState dtls_state() const override { return dtls_state_; } - - const std::string& transport_name() const override { return transport_name_; } - - int component() const override { return component_; } - - const rtc::SSLFingerprint& dtls_fingerprint() const { - return dtls_fingerprint_; - } - - // If async, will send packets by "Post"-ing to message queue instead of - // synchronously "Send"-ing. - void SetAsync(bool async) { ice_transport_->SetAsync(async); } - void SetAsyncDelay(int delay_ms) { ice_transport_->SetAsyncDelay(delay_ms); } - - IceRole GetIceRole() const { return ice_transport_->GetIceRole(); } - - bool SetRemoteFingerprint(const std::string& alg, - const uint8_t* digest, - size_t digest_len) override { - dtls_fingerprint_ = rtc::SSLFingerprint(alg, digest, digest_len); - return true; - } - - bool SetSslRole(rtc::SSLRole role) override { - ssl_role_ = role; - return true; - } - - bool GetSslRole(rtc::SSLRole* role) const override { - *role = ssl_role_; - return true; - } - - IceGatheringState gathering_state() const { - return ice_transport_->gathering_state(); - } - - void Reset() { - if (state_ != STATE_INIT) { - state_ = STATE_INIT; - if (dest_) { - dest_->state_ = STATE_INIT; - dest_->dest_ = nullptr; - dest_ = nullptr; - } - } - } - - void SetWritable(bool writable) { set_writable(writable); } - - // Simulates the two transport channels connecting to each other. - // If |asymmetric| is true this method only affects this FakeDtlsTransport. - // If false, it affects |dest| as well. - void SetDestination(FakeDtlsTransport* dest, bool asymmetric = false) { - if (state_ == STATE_INIT && dest) { - // This simulates the delivery of candidates. - dest_ = dest; - if (local_cert_ && dest_->local_cert_) { - do_dtls_ = true; - NegotiateSrtpCiphers(); - } - state_ = STATE_CONNECTED; - SetWritable(true); - if (!asymmetric) { - dest->SetDestination(this, true); - } - ice_transport_->SetDestination( - static_cast(dest->ice_transport()), asymmetric); - } else if (state_ == STATE_CONNECTED && !dest) { - // Simulates loss of connectivity, by asymmetrically forgetting dest_. - dest_ = nullptr; - state_ = STATE_INIT; - SetWritable(false); - ice_transport_->SetDestination(nullptr, asymmetric); - } - } - - void SetConnectionCount(size_t connection_count) { - ice_transport_->SetConnectionCount(connection_count); - } - - void SetCandidatesGatheringComplete() { - ice_transport_->SetCandidatesGatheringComplete(); - } - - void SetReceiving(bool receiving) { - ice_transport_->SetReceiving(receiving); - set_receiving(receiving); - } - - int receiving_timeout() const { return ice_transport_->receiving_timeout(); } - bool gather_continually() const { - return ice_transport_->gather_continually(); - } - - int SendPacket(const char* data, - size_t len, - const rtc::PacketOptions& options, - int flags) override { - return ice_transport_->SendPacket(data, len, options, flags); - } - - bool GetOption(rtc::Socket::Option opt, int* value) override { return true; } - - const Candidates& remote_candidates() const { - return ice_transport_->remote_candidates(); - } - - void OnIceTransportReadPacket(PacketTransportInterface* ice_, - const char* data, - size_t len, - const rtc::PacketTime& time, - int flags) { - SignalReadPacket(this, data, len, time, flags); - } - - bool SetLocalCertificate( - const rtc::scoped_refptr& certificate) override { - local_cert_ = certificate; - return true; - } - - void SetRemoteSSLCertificate(rtc::FakeSSLCertificate* cert) { - remote_cert_ = cert; - } - - bool IsDtlsActive() const override { return do_dtls_; } - - bool SetSrtpCryptoSuites(const std::vector& ciphers) override { - srtp_ciphers_ = ciphers; - return true; - } - - bool GetSrtpCryptoSuite(int* crypto_suite) override { - if (chosen_crypto_suite_ != rtc::SRTP_INVALID_CRYPTO_SUITE) { - *crypto_suite = chosen_crypto_suite_; - return true; - } - return false; - } - - bool GetSslCipherSuite(int* cipher_suite) override { return false; } - - rtc::scoped_refptr GetLocalCertificate() const override { - return local_cert_; - } - - std::unique_ptr GetRemoteSSLCertificate() - const override { - return remote_cert_ ? std::unique_ptr( - remote_cert_->GetReference()) - : nullptr; - } - - bool ExportKeyingMaterial(const std::string& label, - const uint8_t* context, - size_t context_len, - bool use_context, - uint8_t* result, - size_t result_len) override { - if (chosen_crypto_suite_ != rtc::SRTP_INVALID_CRYPTO_SUITE) { - memset(result, 0xff, result_len); - return true; - } - - return false; - } - - void set_ssl_max_protocol_version(rtc::SSLProtocolVersion version) { - ssl_max_version_ = version; - } - rtc::SSLProtocolVersion ssl_max_protocol_version() const { - return ssl_max_version_; - } - - IceTransportInternal* ice_transport() override { return ice_transport_; } - - bool writable() const override { return writable_; } - - bool receiving() const override { return receiving_; } - - int GetError() override { return ice_transport_->GetError(); } - - int SetOption(rtc::Socket::Option opt, int value) override { - return ice_transport_->SetOption(opt, value); - } - - bool SetSrtpCiphers(const std::vector& ciphers) override { - std::vector crypto_suites; - for (const auto cipher : ciphers) { - crypto_suites.push_back(rtc::SrtpCryptoSuiteFromName(cipher)); - } - return SetSrtpCryptoSuites(crypto_suites); - } - - private: - void NegotiateSrtpCiphers() { - for (std::vector::const_iterator it1 = srtp_ciphers_.begin(); - it1 != srtp_ciphers_.end(); ++it1) { - for (std::vector::const_iterator it2 = dest_->srtp_ciphers_.begin(); - it2 != dest_->srtp_ciphers_.end(); ++it2) { - if (*it1 == *it2) { - chosen_crypto_suite_ = *it1; - return; - } - } - } - } - - void set_receiving(bool receiving) { - if (receiving_ == receiving) { - return; - } - receiving_ = receiving; - SignalReceivingState(this); - } - - void set_writable(bool writable) { - if (writable_ == writable) { - return; - } - writable_ = writable; - if (writable_) { - SignalReadyToSend(this); - } - SignalWritableState(this); - } - - enum State { STATE_INIT, STATE_CONNECTED }; - FakeIceTransport* ice_transport_; - std::unique_ptr owned_ice_transport_; - std::string transport_name_; - int component_; - FakeDtlsTransport* dest_ = nullptr; - State state_ = STATE_INIT; - Candidates remote_candidates_; - rtc::scoped_refptr local_cert_; - rtc::FakeSSLCertificate* remote_cert_ = nullptr; - bool do_dtls_ = false; - std::vector srtp_ciphers_; - int chosen_crypto_suite_ = rtc::SRTP_INVALID_CRYPTO_SUITE; - rtc::SSLProtocolVersion ssl_max_version_ = rtc::SSL_PROTOCOL_DTLS_12; - rtc::SSLFingerprint dtls_fingerprint_; - rtc::SSLRole ssl_role_ = rtc::SSL_CLIENT; - - DtlsTransportState dtls_state_ = DTLS_TRANSPORT_NEW; - - bool receiving_ = false; - bool writable_ = false; -}; - -// Fake candidate pair class, which can be passed to BaseChannel for testing -// purposes. -class FakeCandidatePair : public CandidatePairInterface { - public: - FakeCandidatePair(const Candidate& local_candidate, - const Candidate& remote_candidate) - : local_candidate_(local_candidate), - remote_candidate_(remote_candidate) {} - const Candidate& local_candidate() const override { return local_candidate_; } - const Candidate& remote_candidate() const override { - return remote_candidate_; - } - - private: - Candidate local_candidate_; - Candidate remote_candidate_; -}; - -// Fake TransportController class, which can be passed into a BaseChannel object -// for test purposes. Can be connected to other FakeTransportControllers via -// Connect(). -// -// This fake is unusual in that for the most part, it's implemented with the -// real TransportController code, but with fake TransportChannels underneath. -class FakeTransportController : public TransportController { - public: - FakeTransportController() - : TransportController(rtc::Thread::Current(), - rtc::Thread::Current(), - nullptr) {} - - explicit FakeTransportController(bool redetermine_role_on_ice_restart) - : TransportController(rtc::Thread::Current(), - rtc::Thread::Current(), - nullptr, - redetermine_role_on_ice_restart) {} - - explicit FakeTransportController(IceRole role) - : TransportController(rtc::Thread::Current(), - rtc::Thread::Current(), - nullptr) { - SetIceRole(role); - } - - explicit FakeTransportController(rtc::Thread* network_thread) - : TransportController(rtc::Thread::Current(), network_thread, nullptr) {} - - FakeTransportController(rtc::Thread* network_thread, IceRole role) - : TransportController(rtc::Thread::Current(), network_thread, nullptr) { - SetIceRole(role); - } - - FakeDtlsTransport* GetFakeDtlsTransport_n(const std::string& transport_name, - int component) { - return static_cast( - get_channel_for_testing(transport_name, component)); - } - - // Simulate the exchange of transport descriptions, and the gathering and - // exchange of ICE candidates. - void Connect(FakeTransportController* dest) { - for (const std::string& transport_name : transport_names_for_testing()) { - std::unique_ptr local_fingerprint; - std::unique_ptr remote_fingerprint; - if (certificate_for_testing()) { - local_fingerprint.reset(rtc::SSLFingerprint::CreateFromCertificate( - certificate_for_testing())); - } - if (dest->certificate_for_testing()) { - remote_fingerprint.reset(rtc::SSLFingerprint::CreateFromCertificate( - dest->certificate_for_testing())); - } - TransportDescription local_desc( - std::vector(), - rtc::CreateRandomString(cricket::ICE_UFRAG_LENGTH), - rtc::CreateRandomString(cricket::ICE_PWD_LENGTH), - cricket::ICEMODE_FULL, cricket::CONNECTIONROLE_NONE, - local_fingerprint.get()); - TransportDescription remote_desc( - std::vector(), - rtc::CreateRandomString(cricket::ICE_UFRAG_LENGTH), - rtc::CreateRandomString(cricket::ICE_PWD_LENGTH), - cricket::ICEMODE_FULL, cricket::CONNECTIONROLE_NONE, - remote_fingerprint.get()); - std::string err; - SetLocalTransportDescription(transport_name, local_desc, - cricket::CA_OFFER, &err); - dest->SetRemoteTransportDescription(transport_name, local_desc, - cricket::CA_OFFER, &err); - dest->SetLocalTransportDescription(transport_name, remote_desc, - cricket::CA_ANSWER, &err); - SetRemoteTransportDescription(transport_name, remote_desc, - cricket::CA_ANSWER, &err); - } - MaybeStartGathering(); - dest->MaybeStartGathering(); - network_thread()->Invoke( - RTC_FROM_HERE, - rtc::Bind(&FakeTransportController::SetChannelDestinations_n, this, - dest)); - } - - FakeCandidatePair* CreateFakeCandidatePair( - const rtc::SocketAddress& local_address, - int16_t local_network_id, - const rtc::SocketAddress& remote_address, - int16_t remote_network_id) { - Candidate local_candidate(0, "udp", local_address, 0u, "", "", "local", 0, - "foundation", local_network_id, 0); - Candidate remote_candidate(0, "udp", remote_address, 0u, "", "", "local", 0, - "foundation", remote_network_id, 0); - return new FakeCandidatePair(local_candidate, remote_candidate); - } - - void DestroyRtcpTransport(const std::string& transport_name) { - DestroyDtlsTransport_n(transport_name, - cricket::ICE_CANDIDATE_COMPONENT_RTCP); - } - - protected: - // The ICE channel is never actually used by TransportController directly, - // since (currently) the DTLS channel pretends to be both ICE + DTLS. This - // will change when we get rid of TransportChannelImpl. - IceTransportInternal* CreateIceTransportChannel_n( - const std::string& transport_name, - int component) override { - return new FakeIceTransport(transport_name, component); - } - - DtlsTransportInternal* CreateDtlsTransportChannel_n( - const std::string& transport_name, - int component, - IceTransportInternal* ice) override { - return new FakeDtlsTransport(static_cast(ice)); - } - - private: - void SetChannelDestinations_n(FakeTransportController* dest) { - for (DtlsTransportInternal* tc : channels_for_testing()) { - FakeDtlsTransport* local = static_cast(tc); - FakeDtlsTransport* remote = dest->GetFakeDtlsTransport_n( - local->transport_name(), local->component()); - if (remote) { - bool asymmetric = false; - local->SetDestination(remote, asymmetric); - } - } - } -}; - -} // namespace cricket - -#endif // WEBRTC_P2P_BASE_FAKETRANSPORTCONTROLLER_H_ diff --git a/WebRtc.NET/include/webrtc/p2p/base/icetransportinternal.h b/WebRtc.NET/include/webrtc/p2p/base/icetransportinternal.h deleted file mode 100644 index 0ac7974f..00000000 --- a/WebRtc.NET/include/webrtc/p2p/base/icetransportinternal.h +++ /dev/null @@ -1,148 +0,0 @@ -/* - * Copyright 2016 The WebRTC Project Authors. All rights reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_P2P_BASE_ICETRANSPORTINTERNAL_H_ -#define WEBRTC_P2P_BASE_ICETRANSPORTINTERNAL_H_ - -#include - -#include "webrtc/p2p/base/candidate.h" -#include "webrtc/p2p/base/candidatepairinterface.h" -#include "webrtc/p2p/base/jseptransport.h" -#include "webrtc/p2p/base/packettransportinterface.h" -#include "webrtc/p2p/base/transportdescription.h" - -namespace webrtc { -class MetricsObserverInterface; -} - -namespace cricket { - -class IceTransportInternal; -typedef IceTransportInternal IceTransportInternal2; - -// TODO(zhihuang): Replace this with -// PeerConnectionInterface::IceConnectionState. -enum class IceTransportState { - STATE_INIT, - STATE_CONNECTING, // Will enter this state once a connection is created - STATE_COMPLETED, - STATE_FAILED -}; - -// TODO(zhihuang): Remove this once it's no longer used in -// remoting/protocol/libjingle_transport_factory.cc -enum IceProtocolType { - ICEPROTO_RFC5245 // Standard RFC 5245 version of ICE. -}; - -// IceTransportInternal is an internal abstract class that does ICE. -// Once the public interface is supported, -// (https://www.w3.org/TR/webrtc/#rtcicetransport-interface) -// the IceTransportInterface will be split from this class. -class IceTransportInternal : public rtc::PacketTransportInterface { - public: - virtual ~IceTransportInternal(){}; - - virtual IceTransportState GetState() const = 0; - - virtual const std::string& transport_name() const = 0; - - virtual int component() const = 0; - - virtual IceRole GetIceRole() const = 0; - - virtual void SetIceRole(IceRole role) = 0; - - virtual void SetIceTiebreaker(uint64_t tiebreaker) = 0; - - // TODO(zhihuang): Remove this once it's no longer called in - // remoting/protocol/libjingle_transport_factory.cc - virtual void SetIceProtocolType(IceProtocolType type) {} - - virtual void SetIceCredentials(const std::string& ice_ufrag, - const std::string& ice_pwd) { - SetIceParameters(IceParameters(ice_ufrag, ice_pwd, false)); - } - - virtual void SetRemoteIceCredentials(const std::string& ice_ufrag, - const std::string& ice_pwd) { - SetRemoteIceParameters(IceParameters(ice_ufrag, ice_pwd, false)); - } - - // The ufrag and pwd in |ice_params| must be set - // before candidate gathering can start. - virtual void SetIceParameters(const IceParameters& ice_params) = 0; - - virtual void SetRemoteIceParameters(const IceParameters& ice_params) = 0; - - virtual void SetRemoteIceMode(IceMode mode) = 0; - - virtual void SetIceConfig(const IceConfig& config) = 0; - - // Start gathering candidates if not already started, or if an ICE restart - // occurred. - virtual void MaybeStartGathering() = 0; - - virtual void SetMetricsObserver( - webrtc::MetricsObserverInterface* observer) = 0; - - virtual void AddRemoteCandidate(const Candidate& candidate) = 0; - - virtual void RemoveRemoteCandidate(const Candidate& candidate) = 0; - - virtual IceGatheringState gathering_state() const = 0; - - // Returns the current stats for this connection. - virtual bool GetStats(ConnectionInfos* infos) = 0; - - sigslot::signal1 SignalGatheringState; - - // Handles sending and receiving of candidates. - sigslot::signal2 - SignalCandidateGathered; - - sigslot::signal2 - SignalCandidatesRemoved; - - // Deprecated by SignalSelectedCandidatePairChanged - // This signal occurs when there is a change in the way that packets are - // being routed, i.e. to a different remote location. The candidate - // indicates where and how we are currently sending media. - sigslot::signal2 SignalRouteChange; - - // Signalled when the current selected candidate pair has changed. - // The first parameter is the transport that signals the event. - // The second parameter is the new selected candidate pair. The third - // parameter is the last packet id sent on the previous candidate pair. - // The fourth parameter is a boolean which is true if the Transport - // is ready to send with this candidate pair. - sigslot::signal4 - SignalSelectedCandidatePairChanged; - - // Invoked when there is conflict in the ICE role between local and remote - // agents. - sigslot::signal1 SignalRoleConflict; - - // Emitted whenever the transport state changed. - sigslot::signal1 SignalStateChanged; - - // Invoked when the transport is being destroyed. - sigslot::signal1 SignalDestroyed; - - // Debugging description of this transport. - std::string debug_name() const override { - return transport_name() + " " + std::to_string(component()); - } -}; - -} // namespace cricket - -#endif // WEBRTC_P2P_BASE_ICETRANSPORTINTERNAL_H_ diff --git a/WebRtc.NET/include/webrtc/p2p/base/jseptransport.h b/WebRtc.NET/include/webrtc/p2p/base/jseptransport.h deleted file mode 100644 index c7998ba0..00000000 --- a/WebRtc.NET/include/webrtc/p2p/base/jseptransport.h +++ /dev/null @@ -1,367 +0,0 @@ -/* - * Copyright 2004 The WebRTC Project Authors. All rights reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_P2P_BASE_JSEPTRANSPORT_H_ -#define WEBRTC_P2P_BASE_JSEPTRANSPORT_H_ - -#include -#include -#include -#include - -#include "webrtc/base/constructormagic.h" -#include "webrtc/base/messagequeue.h" -#include "webrtc/base/optional.h" -#include "webrtc/base/rtccertificate.h" -#include "webrtc/base/sigslot.h" -#include "webrtc/base/sslstreamadapter.h" -#include "webrtc/p2p/base/candidate.h" -#include "webrtc/p2p/base/p2pconstants.h" -#include "webrtc/p2p/base/sessiondescription.h" -#include "webrtc/p2p/base/transportinfo.h" - -namespace cricket { - -class DtlsTransportInternal; -enum class IceCandidatePairState; - -typedef std::vector Candidates; - -// TODO(deadbeef): Move all of these enums, POD types and utility methods to -// another header file. - -// TODO(deadbeef): Unify with PeerConnectionInterface::IceConnectionState -// once /talk/ and /webrtc/ are combined, and also switch to ENUM_NAME naming -// style. -enum IceConnectionState { - kIceConnectionConnecting = 0, - kIceConnectionFailed, - kIceConnectionConnected, // Writable, but still checking one or more - // connections - kIceConnectionCompleted, -}; - -enum DtlsTransportState { - // Haven't started negotiating. - DTLS_TRANSPORT_NEW = 0, - // Have started negotiating. - DTLS_TRANSPORT_CONNECTING, - // Negotiated, and has a secure connection. - DTLS_TRANSPORT_CONNECTED, - // Transport is closed. - DTLS_TRANSPORT_CLOSED, - // Failed due to some error in the handshake process. - DTLS_TRANSPORT_FAILED, -}; - -// TODO(deadbeef): Unify with PeerConnectionInterface::IceConnectionState -// once /talk/ and /webrtc/ are combined, and also switch to ENUM_NAME naming -// style. -enum IceGatheringState { - kIceGatheringNew = 0, - kIceGatheringGathering, - kIceGatheringComplete, -}; - -enum ContinualGatheringPolicy { - // All port allocator sessions will stop after a writable connection is found. - GATHER_ONCE = 0, - // The most recent port allocator session will keep on running. - GATHER_CONTINUALLY, - // The most recent port allocator session will keep on running, and it will - // try to recover connectivity if the channel becomes disconnected. - GATHER_CONTINUALLY_AND_RECOVER, -}; - -// Stats that we can return about the connections for a transport channel. -// TODO(hta): Rename to ConnectionStats -struct ConnectionInfo { - ConnectionInfo(); - - bool best_connection; // Is this the best connection we have? - bool writable; // Has this connection received a STUN response? - bool receiving; // Has this connection received anything? - bool timeout; // Has this connection timed out? - bool new_connection; // Is this a newly created connection? - size_t rtt; // The STUN RTT for this connection. - size_t sent_total_bytes; // Total bytes sent on this connection. - size_t sent_bytes_second; // Bps over the last measurement interval. - size_t sent_discarded_packets; // Number of outgoing packets discarded due to - // socket errors. - size_t sent_total_packets; // Number of total outgoing packets attempted for - // sending. - size_t sent_ping_requests_total; // Number of STUN ping request sent. - size_t sent_ping_requests_before_first_response; // Number of STUN ping - // sent before receiving the first response. - size_t sent_ping_responses; // Number of STUN ping response sent. - - size_t recv_total_bytes; // Total bytes received on this connection. - size_t recv_bytes_second; // Bps over the last measurement interval. - size_t recv_ping_requests; // Number of STUN ping request received. - size_t recv_ping_responses; // Number of STUN ping response received. - Candidate local_candidate; // The local candidate for this connection. - Candidate remote_candidate; // The remote candidate for this connection. - void* key; // A static value that identifies this conn. - // https://w3c.github.io/webrtc-stats/#dom-rtcicecandidatepairstats-state - IceCandidatePairState state; - // https://w3c.github.io/webrtc-stats/#dom-rtcicecandidatepairstats-priority - uint64_t priority; -}; - -// Information about all the connections of a channel. -typedef std::vector ConnectionInfos; - -// Information about a specific channel -struct TransportChannelStats { - int component = 0; - ConnectionInfos connection_infos; - int srtp_crypto_suite = rtc::SRTP_INVALID_CRYPTO_SUITE; - int ssl_cipher_suite = rtc::TLS_NULL_WITH_NULL_NULL; - DtlsTransportState dtls_state = DTLS_TRANSPORT_NEW; -}; - -// Information about all the channels of a transport. -// TODO(hta): Consider if a simple vector is as good as a map. -typedef std::vector TransportChannelStatsList; - -// Information about the stats of a transport. -struct TransportStats { - std::string transport_name; - TransportChannelStatsList channel_stats; -}; - -// ICE Nomination mode. -enum class NominationMode { - REGULAR, // Nominate once per ICE restart (Not implemented yet). - AGGRESSIVE, // Nominate every connection except that it will behave as if - // REGULAR when the remote is an ICE-LITE endpoint. - SEMI_AGGRESSIVE // Our current implementation of the nomination algorithm. - // The details are described in P2PTransportChannel. -}; - -// Information about ICE configuration. -// TODO(deadbeef): Use rtc::Optional to represent unset values, instead of -// -1. -struct IceConfig { - // The ICE connection receiving timeout value in milliseconds. - int receiving_timeout = -1; - // Time interval in milliseconds to ping a backup connection when the ICE - // channel is strongly connected. - int backup_connection_ping_interval = -1; - - ContinualGatheringPolicy continual_gathering_policy = GATHER_ONCE; - - bool gather_continually() const { - return continual_gathering_policy == GATHER_CONTINUALLY || - continual_gathering_policy == GATHER_CONTINUALLY_AND_RECOVER; - } - - // Whether we should prioritize Relay/Relay candidate when nothing - // is writable yet. - bool prioritize_most_likely_candidate_pairs = false; - - // Writable connections are pinged at a slower rate once stablized. - int stable_writable_connection_ping_interval = -1; - - // If set to true, this means the ICE transport should presume TURN-to-TURN - // candidate pairs will succeed, even before a binding response is received. - bool presume_writable_when_fully_relayed = false; - - // Interval to check on all networks and to perform ICE regathering on any - // active network having no connection on it. - rtc::Optional regather_on_failed_networks_interval; - - // The time period in which we will not switch the selected connection - // when a new connection becomes receiving but the selected connection is not - // in case that the selected connection may become receiving soon. - rtc::Optional receiving_switching_delay; - - // TODO(honghaiz): Change the default to regular nomination. - // Default nomination mode if the remote does not support renomination. - NominationMode default_nomination_mode = NominationMode::SEMI_AGGRESSIVE; - - IceConfig() {} - IceConfig(int receiving_timeout_ms, - int backup_connection_ping_interval, - ContinualGatheringPolicy gathering_policy, - bool prioritize_most_likely_candidate_pairs, - int stable_writable_connection_ping_interval_ms, - bool presume_writable_when_fully_relayed, - int regather_on_failed_networks_interval_ms, - int receiving_switching_delay_ms) - : receiving_timeout(receiving_timeout_ms), - backup_connection_ping_interval(backup_connection_ping_interval), - continual_gathering_policy(gathering_policy), - prioritize_most_likely_candidate_pairs( - prioritize_most_likely_candidate_pairs), - stable_writable_connection_ping_interval( - stable_writable_connection_ping_interval_ms), - presume_writable_when_fully_relayed( - presume_writable_when_fully_relayed), - regather_on_failed_networks_interval( - regather_on_failed_networks_interval_ms), - receiving_switching_delay(receiving_switching_delay_ms) {} -}; - -bool BadTransportDescription(const std::string& desc, std::string* err_desc); - -bool IceCredentialsChanged(const std::string& old_ufrag, - const std::string& old_pwd, - const std::string& new_ufrag, - const std::string& new_pwd); - -// If a candidate is not acceptable, returns false and sets error. -bool VerifyCandidate(const Candidate& candidate, std::string* error); -bool VerifyCandidates(const Candidates& candidates, std::string* error); - -// Helper class used by TransportController that processes -// TransportDescriptions. A TransportDescription represents the -// transport-specific properties of an SDP m= section, processed according to -// JSEP. Each transport consists of DTLS and ICE transport channels for RTP -// (and possibly RTCP, if rtcp-mux isn't used). -// -// On Threading: Transport performs work solely on the network thread, and so -// its methods should only be called on the network thread. -// -// TODO(deadbeef): Move this into /pc/ and out of /p2p/base/, since it's -// PeerConnection-specific. -class JsepTransport : public sigslot::has_slots<> { - public: - // |mid| is just used for log statements in order to identify the Transport. - // Note that |certificate| is allowed to be null since a remote description - // may be set before a local certificate is generated. - JsepTransport(const std::string& mid, - const rtc::scoped_refptr& certificate); - - // Returns the MID of this transport. - const std::string& mid() const { return mid_; } - - // Add or remove channel that is affected when a local/remote transport - // description is set on this transport. Need to add all channels before - // setting a transport description. - bool AddChannel(DtlsTransportInternal* dtls, int component); - bool RemoveChannel(int component); - bool HasChannels() const; - - bool ready_for_remote_candidates() const { - return local_description_set_ && remote_description_set_; - } - - // Must be called before applying local session description. - // Needed in order to verify the local fingerprint. - void SetLocalCertificate( - const rtc::scoped_refptr& certificate); - - // Get a copy of the local certificate provided by SetLocalCertificate. - bool GetLocalCertificate( - rtc::scoped_refptr* certificate) const; - - // Set the local TransportDescription to be used by DTLS and ICE channels - // that are part of this Transport. - bool SetLocalTransportDescription(const TransportDescription& description, - ContentAction action, - std::string* error_desc); - - // Set the remote TransportDescription to be used by DTLS and ICE channels - // that are part of this Transport. - bool SetRemoteTransportDescription(const TransportDescription& description, - ContentAction action, - std::string* error_desc); - - // Set the "needs-ice-restart" flag as described in JSEP. After the flag is - // set, offers should generate new ufrags/passwords until an ICE restart - // occurs. - // - // This and the below method can be called safely from any thread as long as - // SetXTransportDescription is not in progress. - void SetNeedsIceRestartFlag(); - // Returns true if the ICE restart flag above was set, and no ICE restart has - // occurred yet for this transport (by applying a local description with - // changed ufrag/password). - bool NeedsIceRestart() const; - - void GetSslRole(rtc::SSLRole* ssl_role) const; - - // TODO(deadbeef): Make this const. See comment in transportcontroller.h. - bool GetStats(TransportStats* stats); - - // The current local transport description, possibly used - // by the transport controller. - const TransportDescription* local_description() const { - return local_description_.get(); - } - - // The current remote transport description, possibly used - // by the transport controller. - const TransportDescription* remote_description() const { - return remote_description_.get(); - } - - // TODO(deadbeef): The methods below are only public for testing. Should make - // them utility functions or objects so they can be tested independently from - // this class. - - // Returns false if the certificate's identity does not match the fingerprint, - // or either is NULL. - bool VerifyCertificateFingerprint(const rtc::RTCCertificate* certificate, - const rtc::SSLFingerprint* fingerprint, - std::string* error_desc) const; - - // Negotiates the SSL role based off the offer and answer as specified by - // RFC 4145, section-4.1. Returns false if the SSL role cannot be determined - // from the local description and remote description. - bool NegotiateRole(ContentAction local_role, - rtc::SSLRole* ssl_role, - std::string* error_desc) const; - - private: - // Negotiates the transport parameters based on the current local and remote - // transport description, such as the ICE role to use, and whether DTLS - // should be activated. - // - // Called when an answer TransportDescription is applied. - bool NegotiateTransportDescription(ContentAction local_role, - std::string* error_desc); - - // Pushes down the transport parameters from the local description, such - // as the ICE ufrag and pwd. - bool ApplyLocalTransportDescription(DtlsTransportInternal* dtls_transport, - std::string* error_desc); - - // Pushes down the transport parameters from the remote description to the - // transport channel. - bool ApplyRemoteTransportDescription(DtlsTransportInternal* dtls_transport, - std::string* error_desc); - - // Pushes down the transport parameters obtained via negotiation. - bool ApplyNegotiatedTransportDescription( - DtlsTransportInternal* dtls_transport, - std::string* error_desc); - - const std::string mid_; - // needs-ice-restart bit as described in JSEP. - bool needs_ice_restart_ = false; - rtc::scoped_refptr certificate_; - rtc::SSLRole secure_role_ = rtc::SSL_CLIENT; - std::unique_ptr remote_fingerprint_; - std::unique_ptr local_description_; - std::unique_ptr remote_description_; - bool local_description_set_ = false; - bool remote_description_set_ = false; - - // Candidate component => DTLS channel - std::map channels_; - - RTC_DISALLOW_COPY_AND_ASSIGN(JsepTransport); -}; - -} // namespace cricket - -#endif // WEBRTC_P2P_BASE_JSEPTRANSPORT_H_ diff --git a/WebRtc.NET/include/webrtc/p2p/base/p2pconstants.h b/WebRtc.NET/include/webrtc/p2p/base/p2pconstants.h deleted file mode 100644 index a36cd889..00000000 --- a/WebRtc.NET/include/webrtc/p2p/base/p2pconstants.h +++ /dev/null @@ -1,53 +0,0 @@ -/* - * Copyright 2004 The WebRTC Project Authors. All rights reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_P2P_BASE_P2PCONSTANTS_H_ -#define WEBRTC_P2P_BASE_P2PCONSTANTS_H_ - -#include - -namespace cricket { - -// CN_ == "content name". When we initiate a session, we choose the -// name, and when we receive a Gingle session, we provide default -// names (since Gingle has no content names). But when we receive a -// Jingle call, the content name can be anything, so don't rely on -// these values being the same as the ones received. -extern const char CN_AUDIO[]; -extern const char CN_VIDEO[]; -extern const char CN_DATA[]; -extern const char CN_OTHER[]; - -// GN stands for group name -extern const char GROUP_TYPE_BUNDLE[]; - -extern const int ICE_UFRAG_LENGTH; -extern const int ICE_PWD_LENGTH; -extern const size_t ICE_UFRAG_MIN_LENGTH; -extern const size_t ICE_PWD_MIN_LENGTH; -extern const size_t ICE_UFRAG_MAX_LENGTH; -extern const size_t ICE_PWD_MAX_LENGTH; - -extern const int ICE_CANDIDATE_COMPONENT_RTP; -extern const int ICE_CANDIDATE_COMPONENT_RTCP; -extern const int ICE_CANDIDATE_COMPONENT_DEFAULT; - -extern const char NS_JINGLE_RTP[]; -extern const char NS_JINGLE_DRAFT_SCTP[]; - -// RFC 4145, SDP setup attribute values. -extern const char CONNECTIONROLE_ACTIVE_STR[]; -extern const char CONNECTIONROLE_PASSIVE_STR[]; -extern const char CONNECTIONROLE_ACTPASS_STR[]; -extern const char CONNECTIONROLE_HOLDCONN_STR[]; - -} // namespace cricket - -#endif // WEBRTC_P2P_BASE_P2PCONSTANTS_H_ diff --git a/WebRtc.NET/include/webrtc/p2p/base/packetsocketfactory.h b/WebRtc.NET/include/webrtc/p2p/base/packetsocketfactory.h deleted file mode 100644 index c3b24175..00000000 --- a/WebRtc.NET/include/webrtc/p2p/base/packetsocketfactory.h +++ /dev/null @@ -1,65 +0,0 @@ -/* - * Copyright 2011 The WebRTC Project Authors. All rights reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_P2P_BASE_PACKETSOCKETFACTORY_H_ -#define WEBRTC_P2P_BASE_PACKETSOCKETFACTORY_H_ - -#include "webrtc/base/constructormagic.h" -#include "webrtc/base/proxyinfo.h" - -namespace rtc { - -class AsyncPacketSocket; -class AsyncResolverInterface; - -class PacketSocketFactory { - public: - enum Options { - OPT_STUN = 0x04, - - // The TLS options below are mutually exclusive. - OPT_TLS = 0x02, // Real and secure TLS. - OPT_TLS_FAKE = 0x01, // Fake TLS with a dummy SSL handshake. - OPT_TLS_INSECURE = 0x08, // Insecure TLS without certificate validation. - - // Deprecated, use OPT_TLS_FAKE. - OPT_SSLTCP = OPT_TLS_FAKE, - }; - - PacketSocketFactory() { } - virtual ~PacketSocketFactory() { } - - virtual AsyncPacketSocket* CreateUdpSocket(const SocketAddress& address, - uint16_t min_port, - uint16_t max_port) = 0; - virtual AsyncPacketSocket* CreateServerTcpSocket( - const SocketAddress& local_address, - uint16_t min_port, - uint16_t max_port, - int opts) = 0; - - // TODO: |proxy_info| and |user_agent| should be set - // per-factory and not when socket is created. - virtual AsyncPacketSocket* CreateClientTcpSocket( - const SocketAddress& local_address, - const SocketAddress& remote_address, - const ProxyInfo& proxy_info, - const std::string& user_agent, - int opts) = 0; - - virtual AsyncResolverInterface* CreateAsyncResolver() = 0; - - private: - RTC_DISALLOW_COPY_AND_ASSIGN(PacketSocketFactory); -}; - -} // namespace rtc - -#endif // WEBRTC_P2P_BASE_PACKETSOCKETFACTORY_H_ diff --git a/WebRtc.NET/include/webrtc/p2p/base/packettransportinterface.h b/WebRtc.NET/include/webrtc/p2p/base/packettransportinterface.h deleted file mode 100644 index 04130ef0..00000000 --- a/WebRtc.NET/include/webrtc/p2p/base/packettransportinterface.h +++ /dev/null @@ -1,97 +0,0 @@ -/* - * Copyright 2016 The WebRTC Project Authors. All rights reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_P2P_BASE_PACKETTRANSPORTINTERFACE_H_ -#define WEBRTC_P2P_BASE_PACKETTRANSPORTINTERFACE_H_ - -#include -#include - -// This is included for PacketOptions. -#include "webrtc/base/asyncpacketsocket.h" -#include "webrtc/base/sigslot.h" -#include "webrtc/base/socket.h" - -namespace cricket { -class TransportChannel; -} - -namespace rtc { -struct PacketOptions; -struct PacketTime; -struct SentPacket; - -class PacketTransportInterface : public sigslot::has_slots<> { - public: - virtual ~PacketTransportInterface() {} - - // Identify the object for logging and debug purpose. - virtual std::string debug_name() const = 0; - - // The transport has been established. - virtual bool writable() const = 0; - - // The transport has received a packet in the last X milliseconds, here X is - // configured by each implementation. - virtual bool receiving() const = 0; - - // Attempts to send the given packet. - // The return value is < 0 on failure. The return value in failure case is not - // descriptive. Depending on failure cause and implementation details - // GetError() returns an descriptive errno.h error value. - // This mimics posix socket send() or sendto() behavior. - // TODO(johan): Reliable, meaningful, consistent error codes for all - // implementations would be nice. - // TODO(johan): Remove the default argument once channel code is updated. - virtual int SendPacket(const char* data, - size_t len, - const rtc::PacketOptions& options, - int flags = 0) = 0; - - // Sets a socket option. Note that not all options are - // supported by all transport types. - virtual int SetOption(rtc::Socket::Option opt, int value) = 0; - - // TODO(pthatcher): Once Chrome's MockPacketTransportInterface implements - // this, remove the default implementation. - virtual bool GetOption(rtc::Socket::Option opt, int* value) { return false; } - - // Returns the most recent error that occurred on this channel. - virtual int GetError() = 0; - - // Emitted when the writable state, represented by |writable()|, changes. - sigslot::signal1 SignalWritableState; - - // Emitted when the PacketTransportInterface is ready to send packets. "Ready - // to send" is more sensitive than the writable state; a transport may be - // writable, but temporarily not able to send packets. For example, the - // underlying transport's socket buffer may be full, as indicated by - // SendPacket's return code and/or GetError. - sigslot::signal1 SignalReadyToSend; - - // Emitted when receiving state changes to true. - sigslot::signal1 SignalReceivingState; - - // Signalled each time a packet is received on this channel. - sigslot::signal5 - SignalReadPacket; - - // Signalled each time a packet is sent on this channel. - sigslot::signal2 - SignalSentPacket; -}; - -} // namespace rtc - -#endif // WEBRTC_P2P_BASE_PACKETTRANSPORTINTERFACE_H_ diff --git a/WebRtc.NET/include/webrtc/p2p/base/port.h b/WebRtc.NET/include/webrtc/p2p/base/port.h deleted file mode 100644 index 72b0e117..00000000 --- a/WebRtc.NET/include/webrtc/p2p/base/port.h +++ /dev/null @@ -1,720 +0,0 @@ -/* - * Copyright 2004 The WebRTC Project Authors. All rights reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_P2P_BASE_PORT_H_ -#define WEBRTC_P2P_BASE_PORT_H_ - -#include -#include -#include -#include -#include - -#include "webrtc/p2p/base/candidate.h" -#include "webrtc/p2p/base/candidatepairinterface.h" -#include "webrtc/p2p/base/jseptransport.h" -#include "webrtc/p2p/base/packetsocketfactory.h" -#include "webrtc/p2p/base/portinterface.h" -#include "webrtc/p2p/base/stun.h" -#include "webrtc/p2p/base/stunrequest.h" -#include "webrtc/base/asyncpacketsocket.h" -#include "webrtc/base/checks.h" -#include "webrtc/base/network.h" -#include "webrtc/base/proxyinfo.h" -#include "webrtc/base/ratetracker.h" -#include "webrtc/base/sigslot.h" -#include "webrtc/base/socketaddress.h" -#include "webrtc/base/thread.h" - -namespace cricket { - -class Connection; -class ConnectionRequest; - -extern const char LOCAL_PORT_TYPE[]; -extern const char STUN_PORT_TYPE[]; -extern const char PRFLX_PORT_TYPE[]; -extern const char RELAY_PORT_TYPE[]; - -extern const char UDP_PROTOCOL_NAME[]; -extern const char TCP_PROTOCOL_NAME[]; -extern const char SSLTCP_PROTOCOL_NAME[]; -extern const char TLS_PROTOCOL_NAME[]; - -// RFC 6544, TCP candidate encoding rules. -extern const int DISCARD_PORT; -extern const char TCPTYPE_ACTIVE_STR[]; -extern const char TCPTYPE_PASSIVE_STR[]; -extern const char TCPTYPE_SIMOPEN_STR[]; - -// The minimum time we will wait before destroying a connection after creating -// it. -static const int MIN_CONNECTION_LIFETIME = 10 * 1000; // 10 seconds. - -// A connection will be declared dead if it has not received anything for this -// long. -static const int DEAD_CONNECTION_RECEIVE_TIMEOUT = 30 * 1000; // 30 seconds. - -// The timeout duration when a connection does not receive anything. -static const int WEAK_CONNECTION_RECEIVE_TIMEOUT = 2500; // 2.5 seconds - -// The length of time we wait before timing out writability on a connection. -static const int CONNECTION_WRITE_TIMEOUT = 15 * 1000; // 15 seconds - -// The length of time we wait before we become unwritable. -static const int CONNECTION_WRITE_CONNECT_TIMEOUT = 5 * 1000; // 5 seconds - -// This is the length of time that we wait for a ping response to come back. -static const int CONNECTION_RESPONSE_TIMEOUT = 5 * 1000; // 5 seconds - -// The number of pings that must fail to respond before we become unwritable. -static const uint32_t CONNECTION_WRITE_CONNECT_FAILURES = 5; - -enum RelayType { - RELAY_GTURN, // Legacy google relay service. - RELAY_TURN // Standard (TURN) relay service. -}; - -enum IcePriorityValue { - ICE_TYPE_PREFERENCE_RELAY_TLS = 0, - ICE_TYPE_PREFERENCE_RELAY_TCP = 1, - ICE_TYPE_PREFERENCE_RELAY_UDP = 2, - ICE_TYPE_PREFERENCE_PRFLX_TCP = 80, - ICE_TYPE_PREFERENCE_HOST_TCP = 90, - ICE_TYPE_PREFERENCE_SRFLX = 100, - ICE_TYPE_PREFERENCE_PRFLX = 110, - ICE_TYPE_PREFERENCE_HOST = 126 -}; - -// States are from RFC 5245. http://tools.ietf.org/html/rfc5245#section-5.7.4 -enum class IceCandidatePairState { - WAITING = 0, // Check has not been performed, Waiting pair on CL. - IN_PROGRESS, // Check has been sent, transaction is in progress. - SUCCEEDED, // Check already done, produced a successful result. - FAILED, // Check for this connection failed. - // According to spec there should also be a frozen state, but nothing is ever - // frozen because we have not implemented ICE freezing logic. -}; - -const char* ProtoToString(ProtocolType proto); -bool StringToProto(const char* value, ProtocolType* proto); - -struct ProtocolAddress { - rtc::SocketAddress address; - ProtocolType proto; - - ProtocolAddress(const rtc::SocketAddress& a, ProtocolType p) - : address(a), proto(p) {} - - bool operator==(const ProtocolAddress& o) const { - return address == o.address && proto == o.proto; - } - bool operator!=(const ProtocolAddress& o) const { return !(*this == o); } -}; - -typedef std::set ServerAddresses; - -// Represents a local communication mechanism that can be used to create -// connections to similar mechanisms of the other client. Subclasses of this -// one add support for specific mechanisms like local UDP ports. -class Port : public PortInterface, public rtc::MessageHandler, - public sigslot::has_slots<> { - public: - // INIT: The state when a port is just created. - // KEEP_ALIVE_UNTIL_PRUNED: A port should not be destroyed even if no - // connection is using it. - // PRUNED: It will be destroyed if no connection is using it for a period of - // 30 seconds. - enum class State { INIT, KEEP_ALIVE_UNTIL_PRUNED, PRUNED }; - Port(rtc::Thread* thread, - const std::string& type, - rtc::PacketSocketFactory* factory, - rtc::Network* network, - const rtc::IPAddress& ip, - const std::string& username_fragment, - const std::string& password); - Port(rtc::Thread* thread, - const std::string& type, - rtc::PacketSocketFactory* factory, - rtc::Network* network, - const rtc::IPAddress& ip, - uint16_t min_port, - uint16_t max_port, - const std::string& username_fragment, - const std::string& password); - virtual ~Port(); - - virtual const std::string& Type() const { return type_; } - virtual rtc::Network* Network() const { return network_; } - - // Methods to set/get ICE role and tiebreaker values. - IceRole GetIceRole() const { return ice_role_; } - void SetIceRole(IceRole role) { ice_role_ = role; } - - void SetIceTiebreaker(uint64_t tiebreaker) { tiebreaker_ = tiebreaker; } - uint64_t IceTiebreaker() const { return tiebreaker_; } - - virtual bool SharedSocket() const { return shared_socket_; } - void ResetSharedSocket() { shared_socket_ = false; } - - // Should not destroy the port even if no connection is using it. Called when - // a port is ready to use. - void KeepAliveUntilPruned(); - // Allows a port to be destroyed if no connection is using it. - void Prune(); - - // The thread on which this port performs its I/O. - rtc::Thread* thread() { return thread_; } - - // The factory used to create the sockets of this port. - rtc::PacketSocketFactory* socket_factory() const { return factory_; } - void set_socket_factory(rtc::PacketSocketFactory* factory) { - factory_ = factory; - } - - // For debugging purposes. - const std::string& content_name() const { return content_name_; } - void set_content_name(const std::string& content_name) { - content_name_ = content_name; - } - - int component() const { return component_; } - void set_component(int component) { component_ = component; } - - bool send_retransmit_count_attribute() const { - return send_retransmit_count_attribute_; - } - void set_send_retransmit_count_attribute(bool enable) { - send_retransmit_count_attribute_ = enable; - } - - // Identifies the generation that this port was created in. - uint32_t generation() const { return generation_; } - void set_generation(uint32_t generation) { generation_ = generation; } - - const std::string username_fragment() const; - const std::string& password() const { return password_; } - - // May be called when this port was initially created by a pooled - // PortAllocatorSession, and is now being assigned to an ICE transport. - // Updates the information for candidates as well. - void SetIceParameters(int component, - const std::string& username_fragment, - const std::string& password); - - // Fired when candidates are discovered by the port. When all candidates - // are discovered that belong to port SignalAddressReady is fired. - sigslot::signal2 SignalCandidateReady; - - // Provides all of the above information in one handy object. - virtual const std::vector& Candidates() const { - return candidates_; - } - - // SignalPortComplete is sent when port completes the task of candidates - // allocation. - sigslot::signal1 SignalPortComplete; - // This signal sent when port fails to allocate candidates and this port - // can't be used in establishing the connections. When port is in shared mode - // and port fails to allocate one of the candidates, port shouldn't send - // this signal as other candidates might be usefull in establishing the - // connection. - sigslot::signal1 SignalPortError; - - // Returns a map containing all of the connections of this port, keyed by the - // remote address. - typedef std::map AddressMap; - const AddressMap& connections() { return connections_; } - - // Returns the connection to the given address or NULL if none exists. - virtual Connection* GetConnection( - const rtc::SocketAddress& remote_addr); - - // Called each time a connection is created. - sigslot::signal2 SignalConnectionCreated; - - // In a shared socket mode each port which shares the socket will decide - // to accept the packet based on the |remote_addr|. Currently only UDP - // port implemented this method. - // TODO(mallinath) - Make it pure virtual. - virtual bool HandleIncomingPacket( - rtc::AsyncPacketSocket* socket, const char* data, size_t size, - const rtc::SocketAddress& remote_addr, - const rtc::PacketTime& packet_time) { - RTC_NOTREACHED(); - return false; - } - - // Sends a response message (normal or error) to the given request. One of - // these methods should be called as a response to SignalUnknownAddress. - // NOTE: You MUST call CreateConnection BEFORE SendBindingResponse. - virtual void SendBindingResponse(StunMessage* request, - const rtc::SocketAddress& addr); - virtual void SendBindingErrorResponse( - StunMessage* request, const rtc::SocketAddress& addr, - int error_code, const std::string& reason); - - void set_proxy(const std::string& user_agent, - const rtc::ProxyInfo& proxy) { - user_agent_ = user_agent; - proxy_ = proxy; - } - const std::string& user_agent() { return user_agent_; } - const rtc::ProxyInfo& proxy() { return proxy_; } - - virtual void EnablePortPackets(); - - // Called if the port has no connections and is no longer useful. - void Destroy(); - - virtual void OnMessage(rtc::Message *pmsg); - - // Debugging description of this port - virtual std::string ToString() const; - const rtc::IPAddress& ip() const { return ip_; } - uint16_t min_port() { return min_port_; } - uint16_t max_port() { return max_port_; } - - // Timeout shortening function to speed up unit tests. - void set_timeout_delay(int delay) { timeout_delay_ = delay; } - - // This method will return local and remote username fragements from the - // stun username attribute if present. - bool ParseStunUsername(const StunMessage* stun_msg, - std::string* local_username, - std::string* remote_username) const; - void CreateStunUsername(const std::string& remote_username, - std::string* stun_username_attr_str) const; - - bool MaybeIceRoleConflict(const rtc::SocketAddress& addr, - IceMessage* stun_msg, - const std::string& remote_ufrag); - - // Called when a packet has been sent to the socket. - // This is made pure virtual to notify subclasses of Port that they MUST - // listen to AsyncPacketSocket::SignalSentPacket and then call - // PortInterface::OnSentPacket. - virtual void OnSentPacket(rtc::AsyncPacketSocket* socket, - const rtc::SentPacket& sent_packet) = 0; - - // Called when the socket is currently able to send. - void OnReadyToSend(); - - // Called when the Connection discovers a local peer reflexive candidate. - // Returns the index of the new local candidate. - size_t AddPrflxCandidate(const Candidate& local); - - int16_t network_cost() const { return network_cost_; } - - protected: - enum { MSG_DESTROY_IF_DEAD = 0, MSG_FIRST_AVAILABLE }; - - virtual void UpdateNetworkCost(); - - void set_type(const std::string& type) { type_ = type; } - - void AddAddress(const rtc::SocketAddress& address, - const rtc::SocketAddress& base_address, - const rtc::SocketAddress& related_address, - const std::string& protocol, - const std::string& relay_protocol, - const std::string& tcptype, - const std::string& type, - uint32_t type_preference, - uint32_t relay_preference, - bool final); - - // Adds the given connection to the map keyed by the remote candidate address. - // If an existing connection has the same address, the existing one will be - // replaced and destroyed. - void AddOrReplaceConnection(Connection* conn); - - // Called when a packet is received from an unknown address that is not - // currently a connection. If this is an authenticated STUN binding request, - // then we will signal the client. - void OnReadPacket(const char* data, size_t size, - const rtc::SocketAddress& addr, - ProtocolType proto); - - // If the given data comprises a complete and correct STUN message then the - // return value is true, otherwise false. If the message username corresponds - // with this port's username fragment, msg will contain the parsed STUN - // message. Otherwise, the function may send a STUN response internally. - // remote_username contains the remote fragment of the STUN username. - bool GetStunMessage(const char* data, - size_t size, - const rtc::SocketAddress& addr, - std::unique_ptr* out_msg, - std::string* out_username); - - // Checks if the address in addr is compatible with the port's ip. - bool IsCompatibleAddress(const rtc::SocketAddress& addr); - - // Returns default DSCP value. - rtc::DiffServCodePoint DefaultDscpValue() const { - // No change from what MediaChannel set. - return rtc::DSCP_NO_CHANGE; - } - - // Extra work to be done in subclasses when a connection is destroyed. - virtual void HandleConnectionDestroyed(Connection* conn) {} - - private: - void Construct(); - // Called when one of our connections deletes itself. - void OnConnectionDestroyed(Connection* conn); - - void OnNetworkTypeChanged(const rtc::Network* network); - - rtc::Thread* thread_; - rtc::PacketSocketFactory* factory_; - std::string type_; - bool send_retransmit_count_attribute_; - rtc::Network* network_; - rtc::IPAddress ip_; - uint16_t min_port_; - uint16_t max_port_; - std::string content_name_; - int component_; - uint32_t generation_; - // In order to establish a connection to this Port (so that real data can be - // sent through), the other side must send us a STUN binding request that is - // authenticated with this username_fragment and password. - // PortAllocatorSession will provide these username_fragment and password. - // - // Note: we should always use username_fragment() instead of using - // |ice_username_fragment_| directly. For the details see the comment on - // username_fragment(). - std::string ice_username_fragment_; - std::string password_; - std::vector candidates_; - AddressMap connections_; - int timeout_delay_; - bool enable_port_packets_; - IceRole ice_role_; - uint64_t tiebreaker_; - bool shared_socket_; - // Information to use when going through a proxy. - std::string user_agent_; - rtc::ProxyInfo proxy_; - - // A virtual cost perceived by the user, usually based on the network type - // (WiFi. vs. Cellular). It takes precedence over the priority when - // comparing two connections. - uint16_t network_cost_; - State state_ = State::INIT; - int64_t last_time_all_connections_removed_ = 0; - - friend class Connection; -}; - -// Represents a communication link between a port on the local client and a -// port on the remote client. -class Connection : public CandidatePairInterface, - public rtc::MessageHandler, - public sigslot::has_slots<> { - public: - struct SentPing { - SentPing(const std::string id, int64_t sent_time, uint32_t nomination) - : id(id), sent_time(sent_time), nomination(nomination) {} - - std::string id; - int64_t sent_time; - uint32_t nomination; - }; - - virtual ~Connection(); - - // The local port where this connection sends and receives packets. - Port* port() { return port_; } - const Port* port() const { return port_; } - - // Implementation of virtual methods in CandidatePairInterface. - // Returns the description of the local port - virtual const Candidate& local_candidate() const; - // Returns the description of the remote port to which we communicate. - virtual const Candidate& remote_candidate() const; - - // Returns the pair priority. - uint64_t priority() const; - - enum WriteState { - STATE_WRITABLE = 0, // we have received ping responses recently - STATE_WRITE_UNRELIABLE = 1, // we have had a few ping failures - STATE_WRITE_INIT = 2, // we have yet to receive a ping response - STATE_WRITE_TIMEOUT = 3, // we have had a large number of ping failures - }; - - WriteState write_state() const { return write_state_; } - bool writable() const { return write_state_ == STATE_WRITABLE; } - bool receiving() const { return receiving_; } - - // Determines whether the connection has finished connecting. This can only - // be false for TCP connections. - bool connected() const { return connected_; } - bool weak() const { return !(writable() && receiving() && connected()); } - bool active() const { - return write_state_ != STATE_WRITE_TIMEOUT; - } - - // A connection is dead if it can be safely deleted. - bool dead(int64_t now) const; - - // Estimate of the round-trip time over this connection. - int rtt() const { return rtt_; } - - // Gets the |ConnectionInfo| stats, where |best_connection| has not been - // populated (default value false). - ConnectionInfo stats(); - - sigslot::signal1 SignalStateChange; - - // Sent when the connection has decided that it is no longer of value. It - // will delete itself immediately after this call. - sigslot::signal1 SignalDestroyed; - - // The connection can send and receive packets asynchronously. This matches - // the interface of AsyncPacketSocket, which may use UDP or TCP under the - // covers. - virtual int Send(const void* data, size_t size, - const rtc::PacketOptions& options) = 0; - - // Error if Send() returns < 0 - virtual int GetError() = 0; - - sigslot::signal4 - SignalReadPacket; - - sigslot::signal1 SignalReadyToSend; - - // Called when a packet is received on this connection. - void OnReadPacket(const char* data, size_t size, - const rtc::PacketTime& packet_time); - - // Called when the socket is currently able to send. - void OnReadyToSend(); - - // Called when a connection is determined to be no longer useful to us. We - // still keep it around in case the other side wants to use it. But we can - // safely stop pinging on it and we can allow it to time out if the other - // side stops using it as well. - bool pruned() const { return pruned_; } - void Prune(); - - bool use_candidate_attr() const { return use_candidate_attr_; } - void set_use_candidate_attr(bool enable); - - void set_nomination(uint32_t value) { nomination_ = value; } - - uint32_t remote_nomination() const { return remote_nomination_; } - bool nominated() const { return remote_nomination_ > 0; } - // Public for unit tests. - void set_remote_nomination(uint32_t remote_nomination) { - remote_nomination_ = remote_nomination; - } - // Public for unit tests. - uint32_t acked_nomination() const { return acked_nomination_; } - - void set_remote_ice_mode(IceMode mode) { - remote_ice_mode_ = mode; - } - - void set_receiving_timeout(int receiving_timeout_ms) { - receiving_timeout_ = receiving_timeout_ms; - } - - // Makes the connection go away. - void Destroy(); - - // Makes the connection go away, in a failed state. - void FailAndDestroy(); - - // Prunes the connection and sets its state to STATE_FAILED, - // It will not be used or send pings although it can still receive packets. - void FailAndPrune(); - - // Checks that the state of this connection is up-to-date. The argument is - // the current time, which is compared against various timeouts. - void UpdateState(int64_t now); - - // Called when this connection should try checking writability again. - int64_t last_ping_sent() const { return last_ping_sent_; } - void Ping(int64_t now); - void ReceivedPingResponse(int rtt, const std::string& request_id); - int64_t last_ping_response_received() const { - return last_ping_response_received_; - } - // Used to check if any STUN ping response has been received. - int rtt_samples() const { return rtt_samples_; } - - // Called whenever a valid ping is received on this connection. This is - // public because the connection intercepts the first ping for us. - int64_t last_ping_received() const { return last_ping_received_; } - void ReceivedPing(); - // Handles the binding request; sends a response if this is a valid request. - void HandleBindingRequest(IceMessage* msg); - - int64_t last_data_received() const { return last_data_received_; } - - // Debugging description of this connection - std::string ToDebugId() const; - std::string ToString() const; - std::string ToSensitiveString() const; - // Prints pings_since_last_response_ into a string. - void PrintPingsSinceLastResponse(std::string* pings, size_t max); - - bool reported() const { return reported_; } - void set_reported(bool reported) { reported_ = reported;} - - // This signal will be fired if this connection is nominated by the - // controlling side. - sigslot::signal1 SignalNominated; - - // Invoked when Connection receives STUN error response with 487 code. - void HandleRoleConflictFromPeer(); - - IceCandidatePairState state() const { return state_; } - - int num_pings_sent() const { return num_pings_sent_; } - - IceMode remote_ice_mode() const { return remote_ice_mode_; } - - uint32_t ComputeNetworkCost() const; - - // Update the ICE password and/or generation of the remote candidate if the - // ufrag in |params| matches the candidate's ufrag, and the - // candidate's password and/or ufrag has not been set. - void MaybeSetRemoteIceParametersAndGeneration(const IceParameters& params, - int generation); - - // If |remote_candidate_| is peer reflexive and is equivalent to - // |new_candidate| except the type, update |remote_candidate_| to - // |new_candidate|. - void MaybeUpdatePeerReflexiveCandidate(const Candidate& new_candidate); - - // Returns the last received time of any data, stun request, or stun - // response in milliseconds - int64_t last_received() const; - // Returns the last time when the connection changed its receiving state. - int64_t receiving_unchanged_since() const { - return receiving_unchanged_since_; - } - - bool stable(int64_t now) const; - - protected: - enum { MSG_DELETE = 0, MSG_FIRST_AVAILABLE }; - - // Constructs a new connection to the given remote port. - Connection(Port* port, size_t index, const Candidate& candidate); - - // Called back when StunRequestManager has a stun packet to send - void OnSendStunPacket(const void* data, size_t size, StunRequest* req); - - // Callbacks from ConnectionRequest - virtual void OnConnectionRequestResponse(ConnectionRequest* req, - StunMessage* response); - void OnConnectionRequestErrorResponse(ConnectionRequest* req, - StunMessage* response); - void OnConnectionRequestTimeout(ConnectionRequest* req); - void OnConnectionRequestSent(ConnectionRequest* req); - - bool rtt_converged() const; - - // If the response is not received within 2 * RTT, the response is assumed to - // be missing. - bool missing_responses(int64_t now) const; - - // Changes the state and signals if necessary. - void set_write_state(WriteState value); - void UpdateReceiving(int64_t now); - void set_state(IceCandidatePairState state); - void set_connected(bool value); - - uint32_t nomination() const { return nomination_; } - - void OnMessage(rtc::Message *pmsg); - - Port* port_; - size_t local_candidate_index_; - Candidate remote_candidate_; - - ConnectionInfo stats_; - rtc::RateTracker recv_rate_tracker_; - rtc::RateTracker send_rate_tracker_; - - private: - // Update the local candidate based on the mapped address attribute. - // If the local candidate changed, fires SignalStateChange. - void MaybeUpdateLocalCandidate(ConnectionRequest* request, - StunMessage* response); - - WriteState write_state_; - bool receiving_; - bool connected_; - bool pruned_; - // By default |use_candidate_attr_| flag will be true, - // as we will be using aggressive nomination. - // But when peer is ice-lite, this flag "must" be initialized to false and - // turn on when connection becomes "best connection". - bool use_candidate_attr_; - // Used by the controlling side to indicate that this connection will be - // selected for transmission if the peer supports ICE-renomination when this - // value is positive. A larger-value indicates that a connection is nominated - // later and should be selected by the controlled side with higher precedence. - // A zero-value indicates not nominating this connection. - uint32_t nomination_ = 0; - // The last nomination that has been acknowledged. - uint32_t acked_nomination_ = 0; - // Used by the controlled side to remember the nomination value received from - // the controlling side. When the peer does not support ICE re-nomination, - // its value will be 1 if the connection has been nominated. - uint32_t remote_nomination_ = 0; - - IceMode remote_ice_mode_; - StunRequestManager requests_; - int rtt_; - int rtt_samples_ = 0; - int64_t last_ping_sent_; // last time we sent a ping to the other side - int64_t last_ping_received_; // last time we received a ping from the other - // side - int64_t last_data_received_; - int64_t last_ping_response_received_; - int64_t receiving_unchanged_since_ = 0; - std::vector pings_since_last_response_; - - bool reported_; - IceCandidatePairState state_; - // Time duration to switch from receiving to not receiving. - int receiving_timeout_; - int64_t time_created_ms_; - int num_pings_sent_ = 0; - - friend class Port; - friend class ConnectionRequest; -}; - -// ProxyConnection defers all the interesting work to the port. -class ProxyConnection : public Connection { - public: - ProxyConnection(Port* port, size_t index, const Candidate& remote_candidate); - - int Send(const void* data, - size_t size, - const rtc::PacketOptions& options) override; - int GetError() override { return error_; } - - private: - int error_ = 0; -}; - -} // namespace cricket - -#endif // WEBRTC_P2P_BASE_PORT_H_ diff --git a/WebRtc.NET/include/webrtc/p2p/base/portallocator.h b/WebRtc.NET/include/webrtc/p2p/base/portallocator.h deleted file mode 100644 index 51474297..00000000 --- a/WebRtc.NET/include/webrtc/p2p/base/portallocator.h +++ /dev/null @@ -1,449 +0,0 @@ -/* - * Copyright 2004 The WebRTC Project Authors. All rights reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_P2P_BASE_PORTALLOCATOR_H_ -#define WEBRTC_P2P_BASE_PORTALLOCATOR_H_ - -#include -#include -#include -#include - -#include "webrtc/p2p/base/port.h" -#include "webrtc/p2p/base/portinterface.h" -#include "webrtc/base/helpers.h" -#include "webrtc/base/proxyinfo.h" -#include "webrtc/base/sigslot.h" -#include "webrtc/base/thread.h" - -namespace webrtc { -class MetricsObserverInterface; -} - -namespace cricket { - -// PortAllocator is responsible for allocating Port types for a given -// P2PSocket. It also handles port freeing. -// -// Clients can override this class to control port allocation, including -// what kinds of ports are allocated. - -enum { - // Disable local UDP ports. This doesn't impact how we connect to relay - // servers. - PORTALLOCATOR_DISABLE_UDP = 0x01, - PORTALLOCATOR_DISABLE_STUN = 0x02, - PORTALLOCATOR_DISABLE_RELAY = 0x04, - // Disable local TCP ports. This doesn't impact how we connect to relay - // servers. - PORTALLOCATOR_DISABLE_TCP = 0x08, - PORTALLOCATOR_ENABLE_IPV6 = 0x40, - // TODO(pthatcher): Remove this once it's no longer used in: - // remoting/client/plugin/pepper_port_allocator.cc - // remoting/protocol/chromium_port_allocator.cc - // remoting/test/fake_port_allocator.cc - // It's a no-op and is no longer needed. - PORTALLOCATOR_ENABLE_SHARED_UFRAG = 0x80, - PORTALLOCATOR_ENABLE_SHARED_SOCKET = 0x100, - PORTALLOCATOR_ENABLE_STUN_RETRANSMIT_ATTRIBUTE = 0x200, - // When specified, we'll only allocate the STUN candidate for the public - // interface as seen by regular http traffic and the HOST candidate associated - // with the default local interface. - PORTALLOCATOR_DISABLE_ADAPTER_ENUMERATION = 0x400, - // When specified along with PORTALLOCATOR_DISABLE_ADAPTER_ENUMERATION, the - // default local candidate mentioned above will not be allocated. Only the - // STUN candidate will be. - PORTALLOCATOR_DISABLE_DEFAULT_LOCAL_CANDIDATE = 0x800, - // Disallow use of UDP when connecting to a relay server. Since proxy servers - // usually don't handle UDP, using UDP will leak the IP address. - PORTALLOCATOR_DISABLE_UDP_RELAY = 0x1000, - - // When multiple networks exist, do not gather candidates on the ones with - // high cost. So if both Wi-Fi and cellular networks exist, gather only on the - // Wi-Fi network. If a network type is "unknown", it has a cost lower than - // cellular but higher than Wi-Fi/Ethernet. So if an unknown network exists, - // cellular networks will not be used to gather candidates and if a Wi-Fi - // network is present, "unknown" networks will not be usd to gather - // candidates. Doing so ensures that even if a cellular network type was not - // detected initially, it would not be used if a Wi-Fi network is present. - PORTALLOCATOR_DISABLE_COSTLY_NETWORKS = 0x2000, -}; - -// Defines various reasons that have caused ICE regathering. -enum class IceRegatheringReason { NETWORK_CHANGE, NETWORK_FAILURE, MAX_VALUE }; - -const uint32_t kDefaultPortAllocatorFlags = 0; - -const uint32_t kDefaultStepDelay = 1000; // 1 sec step delay. -// As per RFC 5245 Appendix B.1, STUN transactions need to be paced at certain -// internal. Less than 20ms is not acceptable. We choose 50ms as our default. -const uint32_t kMinimumStepDelay = 50; - -// CF = CANDIDATE FILTER -enum { - CF_NONE = 0x0, - CF_HOST = 0x1, - CF_REFLEXIVE = 0x2, - CF_RELAY = 0x4, - CF_ALL = 0x7, -}; - -// TLS certificate policy. -enum class TlsCertPolicy { - // For TLS based protocols, ensure the connection is secure by not - // circumventing certificate validation. - TLS_CERT_POLICY_SECURE, - // For TLS based protocols, disregard security completely by skipping - // certificate validation. This is insecure and should never be used unless - // security is irrelevant in that particular context. - TLS_CERT_POLICY_INSECURE_NO_CHECK, -}; - -// TODO(deadbeef): Rename to TurnCredentials (and username to ufrag). -struct RelayCredentials { - RelayCredentials() {} - RelayCredentials(const std::string& username, const std::string& password) - : username(username), password(password) {} - - bool operator==(const RelayCredentials& o) const { - return username == o.username && password == o.password; - } - bool operator!=(const RelayCredentials& o) const { return !(*this == o); } - - std::string username; - std::string password; -}; - -typedef std::vector PortList; -// TODO(deadbeef): Rename to TurnServerConfig. -struct RelayServerConfig { - RelayServerConfig(RelayType type) : type(type) {} - - RelayServerConfig(const std::string& address, - int port, - const std::string& username, - const std::string& password, - ProtocolType proto) - : type(RELAY_TURN), credentials(username, password) { - ports.push_back(ProtocolAddress(rtc::SocketAddress(address, port), proto)); - } - - // Legacy constructor where "secure" and PROTO_TCP implies PROTO_TLS. - RelayServerConfig(const std::string& address, - int port, - const std::string& username, - const std::string& password, - ProtocolType proto, - bool secure) - : RelayServerConfig(address, - port, - username, - password, - (proto == PROTO_TCP && secure ? PROTO_TLS : proto)) {} - - bool operator==(const RelayServerConfig& o) const { - return type == o.type && ports == o.ports && credentials == o.credentials && - priority == o.priority; - } - bool operator!=(const RelayServerConfig& o) const { return !(*this == o); } - - RelayType type; - PortList ports; - RelayCredentials credentials; - int priority = 0; - TlsCertPolicy tls_cert_policy = TlsCertPolicy::TLS_CERT_POLICY_SECURE; -}; - -class PortAllocatorSession : public sigslot::has_slots<> { - public: - // Content name passed in mostly for logging and debugging. - PortAllocatorSession(const std::string& content_name, - int component, - const std::string& ice_ufrag, - const std::string& ice_pwd, - uint32_t flags); - - // Subclasses should clean up any ports created. - virtual ~PortAllocatorSession() {} - - uint32_t flags() const { return flags_; } - void set_flags(uint32_t flags) { flags_ = flags; } - std::string content_name() const { return content_name_; } - int component() const { return component_; } - const std::string& ice_ufrag() const { return ice_ufrag_; } - const std::string& ice_pwd() const { return ice_pwd_; } - bool pooled() const { return ice_ufrag_.empty(); } - - // Setting this filter should affect not only candidates gathered in the - // future, but candidates already gathered and ports already "ready", - // which would be returned by ReadyCandidates() and ReadyPorts(). - // - // Default filter should be CF_ALL. - virtual void SetCandidateFilter(uint32_t filter) = 0; - - // Starts gathering ports and ICE candidates. - virtual void StartGettingPorts() = 0; - // Completely stops gathering. Will not gather again unless StartGettingPorts - // is called again. - virtual void StopGettingPorts() = 0; - // Whether the session is actively getting ports. - virtual bool IsGettingPorts() = 0; - - // - // NOTE: The group of methods below is only used for continual gathering. - // - - // ClearGettingPorts should have the same immediate effect as - // StopGettingPorts, but if the implementation supports continual gathering, - // ClearGettingPorts allows additional ports/candidates to be gathered if the - // network conditions change. - virtual void ClearGettingPorts() = 0; - // Whether it is in the state where the existing gathering process is stopped, - // but new ones may be started (basically after calling ClearGettingPorts). - virtual bool IsCleared() const { return false; } - // Whether the session has completely stopped. - virtual bool IsStopped() const { return false; } - // Re-gathers candidates on networks that do not have any connections. More - // precisely, a network interface may have more than one IP addresses (e.g., - // IPv4 and IPv6 addresses). Each address subnet will be used to create a - // network. Only if all networks of an interface have no connection, the - // implementation should start re-gathering on all networks of that interface. - virtual void RegatherOnFailedNetworks() {} - // Re-gathers candidates on all networks. - // TODO(honghaiz): Implement this in BasicPortAllocator. - virtual void RegatherOnAllNetworks() {} - - // Another way of getting the information provided by the signals below. - // - // Ports and candidates are not guaranteed to be in the same order as the - // signals were emitted in. - virtual std::vector ReadyPorts() const = 0; - virtual std::vector ReadyCandidates() const = 0; - virtual bool CandidatesAllocationDone() const = 0; - // Marks all ports in the current session as "pruned" so that they may be - // destroyed if no connection is using them. - virtual void PruneAllPorts() {} - - sigslot::signal2 SignalPortReady; - // Fires this signal when the network of the ports failed (either because the - // interface is down, or because there is no connection on the interface), - // or when TURN ports are pruned because a higher-priority TURN port becomes - // ready(pairable). - sigslot::signal2&> - SignalPortsPruned; - sigslot::signal2&> SignalCandidatesReady; - // Candidates should be signaled to be removed when the port that generated - // the candidates is removed. - sigslot::signal2&> - SignalCandidatesRemoved; - sigslot::signal1 SignalCandidatesAllocationDone; - - sigslot::signal2 - SignalIceRegathering; - - virtual uint32_t generation() { return generation_; } - virtual void set_generation(uint32_t generation) { generation_ = generation; } - sigslot::signal1 SignalDestroyed; - - protected: - // This method is called when a pooled session (which doesn't have these - // properties initially) is returned by PortAllocator::TakePooledSession, - // and the content name, component, and ICE ufrag/pwd are updated. - // - // A subclass may need to override this method to perform additional actions, - // such as applying the updated information to ports and candidates. - virtual void UpdateIceParametersInternal() {} - - // TODO(deadbeef): Get rid of these when everyone switches to ice_ufrag and - // ice_pwd. - const std::string& username() const { return ice_ufrag_; } - const std::string& password() const { return ice_pwd_; } - - private: - void SetIceParameters(const std::string& content_name, - int component, - const std::string& ice_ufrag, - const std::string& ice_pwd) { - content_name_ = content_name; - component_ = component; - ice_ufrag_ = ice_ufrag; - ice_pwd_ = ice_pwd; - UpdateIceParametersInternal(); - } - - uint32_t flags_; - uint32_t generation_; - std::string content_name_; - int component_; - std::string ice_ufrag_; - std::string ice_pwd_; - - // SetIceParameters is an implementation detail which only PortAllocator - // should be able to call. - friend class PortAllocator; -}; - -// Every method of PortAllocator (including the destructor) must be called on -// the same thread, except for the constructor which may be called on any -// thread. -// -// This allows constructing a PortAllocator subclass on one thread and -// passing it into an object that uses it on a different thread. -class PortAllocator : public sigslot::has_slots<> { - public: - PortAllocator() : - flags_(kDefaultPortAllocatorFlags), - min_port_(0), - max_port_(0), - step_delay_(kDefaultStepDelay), - allow_tcp_listen_(true), - candidate_filter_(CF_ALL) { - } - virtual ~PortAllocator() {} - - // This should be called on the PortAllocator's thread before the - // PortAllocator is used. Subclasses may override this if necessary. - virtual void Initialize() {} - - // Set STUN and TURN servers to be used in future sessions, and set - // candidate pool size, as described in JSEP. - // - // If the servers are changing and the candidate pool size is nonzero, - // existing pooled sessions will be destroyed and new ones created. - // - // If the servers are not changing but the candidate pool size is, - // pooled sessions will be either created or destroyed as necessary. - // - // Returns true if the configuration could successfully be changed. - bool SetConfiguration(const ServerAddresses& stun_servers, - const std::vector& turn_servers, - int candidate_pool_size, - bool prune_turn_ports); - - const ServerAddresses& stun_servers() const { return stun_servers_; } - - const std::vector& turn_servers() const { - return turn_servers_; - } - - int candidate_pool_size() const { return candidate_pool_size_; } - - // Sets the network types to ignore. - // Values are defined by the AdapterType enum. - // For instance, calling this with - // ADAPTER_TYPE_ETHERNET | ADAPTER_TYPE_LOOPBACK will ignore Ethernet and - // loopback interfaces. - virtual void SetNetworkIgnoreMask(int network_ignore_mask) = 0; - - std::unique_ptr CreateSession( - const std::string& content_name, - int component, - const std::string& ice_ufrag, - const std::string& ice_pwd); - - // Get an available pooled session and set the transport information on it. - // - // Caller takes ownership of the returned session. - // - // If no pooled sessions are available, returns null. - std::unique_ptr TakePooledSession( - const std::string& content_name, - int component, - const std::string& ice_ufrag, - const std::string& ice_pwd); - - // Returns the next session that would be returned by TakePooledSession. - const PortAllocatorSession* GetPooledSession() const; - - uint32_t flags() const { return flags_; } - void set_flags(uint32_t flags) { flags_ = flags; } - - const std::string& user_agent() const { return agent_; } - const rtc::ProxyInfo& proxy() const { return proxy_; } - void set_proxy(const std::string& agent, const rtc::ProxyInfo& proxy) { - agent_ = agent; - proxy_ = proxy; - } - - // Gets/Sets the port range to use when choosing client ports. - int min_port() const { return min_port_; } - int max_port() const { return max_port_; } - bool SetPortRange(int min_port, int max_port) { - if (min_port > max_port) { - return false; - } - - min_port_ = min_port; - max_port_ = max_port; - return true; - } - - uint32_t step_delay() const { return step_delay_; } - void set_step_delay(uint32_t delay) { step_delay_ = delay; } - - bool allow_tcp_listen() const { return allow_tcp_listen_; } - void set_allow_tcp_listen(bool allow_tcp_listen) { - allow_tcp_listen_ = allow_tcp_listen; - } - - uint32_t candidate_filter() { return candidate_filter_; } - void set_candidate_filter(uint32_t filter) { - candidate_filter_ = filter; - } - - bool prune_turn_ports() const { return prune_turn_ports_; } - - // Gets/Sets the Origin value used for WebRTC STUN requests. - const std::string& origin() const { return origin_; } - void set_origin(const std::string& origin) { origin_ = origin; } - - void SetMetricsObserver(webrtc::MetricsObserverInterface* observer) { - metrics_observer_ = observer; - } - - protected: - virtual PortAllocatorSession* CreateSessionInternal( - const std::string& content_name, - int component, - const std::string& ice_ufrag, - const std::string& ice_pwd) = 0; - - webrtc::MetricsObserverInterface* metrics_observer() { - return metrics_observer_; - } - - const std::deque>& pooled_sessions() { - return pooled_sessions_; - } - - uint32_t flags_; - std::string agent_; - rtc::ProxyInfo proxy_; - int min_port_; - int max_port_; - uint32_t step_delay_; - bool allow_tcp_listen_; - uint32_t candidate_filter_; - std::string origin_; - - private: - ServerAddresses stun_servers_; - std::vector turn_servers_; - int candidate_pool_size_ = 0; // Last value passed into SetConfiguration. - std::deque> pooled_sessions_; - bool prune_turn_ports_ = false; - - webrtc::MetricsObserverInterface* metrics_observer_ = nullptr; -}; - -} // namespace cricket - -#endif // WEBRTC_P2P_BASE_PORTALLOCATOR_H_ diff --git a/WebRtc.NET/include/webrtc/p2p/base/portinterface.h b/WebRtc.NET/include/webrtc/p2p/base/portinterface.h deleted file mode 100644 index 4a6e9007..00000000 --- a/WebRtc.NET/include/webrtc/p2p/base/portinterface.h +++ /dev/null @@ -1,132 +0,0 @@ -/* - * Copyright 2012 The WebRTC Project Authors. All rights reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_P2P_BASE_PORTINTERFACE_H_ -#define WEBRTC_P2P_BASE_PORTINTERFACE_H_ - -#include - -#include "webrtc/base/asyncpacketsocket.h" -#include "webrtc/base/socketaddress.h" -#include "webrtc/p2p/base/jseptransport.h" - -namespace rtc { -class Network; -struct PacketOptions; -} - -namespace cricket { -class Connection; -class IceMessage; -class StunMessage; - -enum ProtocolType { - PROTO_UDP, - PROTO_TCP, - PROTO_SSLTCP, // Pseudo-TLS. - PROTO_TLS, - PROTO_LAST = PROTO_TLS -}; - -// Defines the interface for a port, which represents a local communication -// mechanism that can be used to create connections to similar mechanisms of -// the other client. Various types of ports will implement this interface. -class PortInterface { - public: - virtual ~PortInterface() {} - - virtual const std::string& Type() const = 0; - virtual rtc::Network* Network() const = 0; - - // Methods to set/get ICE role and tiebreaker values. - virtual void SetIceRole(IceRole role) = 0; - virtual IceRole GetIceRole() const = 0; - - virtual void SetIceTiebreaker(uint64_t tiebreaker) = 0; - virtual uint64_t IceTiebreaker() const = 0; - - virtual bool SharedSocket() const = 0; - - virtual bool SupportsProtocol(const std::string& protocol) const = 0; - - // PrepareAddress will attempt to get an address for this port that other - // clients can send to. It may take some time before the address is ready. - // Once it is ready, we will send SignalAddressReady. If errors are - // preventing the port from getting an address, it may send - // SignalAddressError. - virtual void PrepareAddress() = 0; - - // Returns the connection to the given address or NULL if none exists. - virtual Connection* GetConnection( - const rtc::SocketAddress& remote_addr) = 0; - - // Creates a new connection to the given address. - enum CandidateOrigin { ORIGIN_THIS_PORT, ORIGIN_OTHER_PORT, ORIGIN_MESSAGE }; - virtual Connection* CreateConnection( - const Candidate& remote_candidate, CandidateOrigin origin) = 0; - - // Functions on the underlying socket(s). - virtual int SetOption(rtc::Socket::Option opt, int value) = 0; - virtual int GetOption(rtc::Socket::Option opt, int* value) = 0; - virtual int GetError() = 0; - - virtual ProtocolType GetProtocol() const = 0; - - virtual const std::vector& Candidates() const = 0; - - // Sends the given packet to the given address, provided that the address is - // that of a connection or an address that has sent to us already. - virtual int SendTo(const void* data, size_t size, - const rtc::SocketAddress& addr, - const rtc::PacketOptions& options, bool payload) = 0; - - // Indicates that we received a successful STUN binding request from an - // address that doesn't correspond to any current connection. To turn this - // into a real connection, call CreateConnection. - sigslot::signal6 SignalUnknownAddress; - - // Sends a response message (normal or error) to the given request. One of - // these methods should be called as a response to SignalUnknownAddress. - // NOTE: You MUST call CreateConnection BEFORE SendBindingResponse. - virtual void SendBindingResponse(StunMessage* request, - const rtc::SocketAddress& addr) = 0; - virtual void SendBindingErrorResponse( - StunMessage* request, const rtc::SocketAddress& addr, - int error_code, const std::string& reason) = 0; - - // Signaled when this port decides to delete itself because it no longer has - // any usefulness. - sigslot::signal1 SignalDestroyed; - - // Signaled when Port discovers ice role conflict with the peer. - sigslot::signal1 SignalRoleConflict; - - // Normally, packets arrive through a connection (or they result signaling of - // unknown address). Calling this method turns off delivery of packets - // through their respective connection and instead delivers every packet - // through this port. - virtual void EnablePortPackets() = 0; - sigslot::signal4 SignalReadPacket; - - // Emitted each time a packet is sent on this port. - sigslot::signal1 SignalSentPacket; - - virtual std::string ToString() const = 0; - - protected: - PortInterface() {} -}; - -} // namespace cricket - -#endif // WEBRTC_P2P_BASE_PORTINTERFACE_H_ diff --git a/WebRtc.NET/include/webrtc/p2p/base/session.h b/WebRtc.NET/include/webrtc/p2p/base/session.h deleted file mode 100644 index a98a5efe..00000000 --- a/WebRtc.NET/include/webrtc/p2p/base/session.h +++ /dev/null @@ -1,13 +0,0 @@ -/* - * Copyright 2004 The WebRTC Project Authors. All rights reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -// TODO(deadbeef): Remove this file when Chrome build files no longer reference -// it. -#error "DONT INCLUDE THIS" diff --git a/WebRtc.NET/include/webrtc/p2p/base/sessiondescription.h b/WebRtc.NET/include/webrtc/p2p/base/sessiondescription.h deleted file mode 100644 index a20f7b71..00000000 --- a/WebRtc.NET/include/webrtc/p2p/base/sessiondescription.h +++ /dev/null @@ -1,206 +0,0 @@ -/* - * Copyright 2004 The WebRTC Project Authors. All rights reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_P2P_BASE_SESSIONDESCRIPTION_H_ -#define WEBRTC_P2P_BASE_SESSIONDESCRIPTION_H_ - -#include -#include - -#include "webrtc/p2p/base/transportinfo.h" -#include "webrtc/base/constructormagic.h" - -namespace cricket { - -// Describes a session content. Individual content types inherit from -// this class. Analagous to a or -// . -class ContentDescription { - public: - virtual ~ContentDescription() {} - virtual ContentDescription* Copy() const = 0; -}; - -// Analagous to a or . -// name = name of -// type = xmlns of -struct ContentInfo { - ContentInfo() {} - ContentInfo(const std::string& name, - const std::string& type, - ContentDescription* description) - : name(name), type(type), description(description) {} - ContentInfo(const std::string& name, - const std::string& type, - bool rejected, - ContentDescription* description) : - name(name), type(type), rejected(rejected), description(description) {} - ContentInfo(const std::string& name, - const std::string& type, - bool rejected, - bool bundle_only, - ContentDescription* description) - : name(name), - type(type), - rejected(rejected), - bundle_only(bundle_only), - description(description) {} - std::string name; - std::string type; - bool rejected = false; - bool bundle_only = false; - ContentDescription* description = nullptr; -}; - -typedef std::vector ContentNames; - -// This class provides a mechanism to aggregate different media contents into a -// group. This group can also be shared with the peers in a pre-defined format. -// GroupInfo should be populated only with the |content_name| of the -// MediaDescription. -class ContentGroup { - public: - explicit ContentGroup(const std::string& semantics) : - semantics_(semantics) {} - - const std::string& semantics() const { return semantics_; } - const ContentNames& content_names() const { return content_names_; } - - const std::string* FirstContentName() const; - bool HasContentName(const std::string& content_name) const; - void AddContentName(const std::string& content_name); - bool RemoveContentName(const std::string& content_name); - - private: - std::string semantics_; - ContentNames content_names_; -}; - -typedef std::vector ContentInfos; -typedef std::vector ContentGroups; - -const ContentInfo* FindContentInfoByName( - const ContentInfos& contents, const std::string& name); -const ContentInfo* FindContentInfoByType( - const ContentInfos& contents, const std::string& type); - -// Describes a collection of contents, each with its own name and -// type. Analogous to a or stanza. Assumes that -// contents are unique be name, but doesn't enforce that. -class SessionDescription { - public: - SessionDescription() {} - explicit SessionDescription(const ContentInfos& contents) : - contents_(contents) {} - SessionDescription(const ContentInfos& contents, - const ContentGroups& groups) : - contents_(contents), - content_groups_(groups) {} - SessionDescription(const ContentInfos& contents, - const TransportInfos& transports, - const ContentGroups& groups) : - contents_(contents), - transport_infos_(transports), - content_groups_(groups) {} - ~SessionDescription() { - for (ContentInfos::iterator content = contents_.begin(); - content != contents_.end(); ++content) { - delete content->description; - } - } - - SessionDescription* Copy() const; - - // Content accessors. - const ContentInfos& contents() const { return contents_; } - ContentInfos& contents() { return contents_; } - const ContentInfo* GetContentByName(const std::string& name) const; - ContentInfo* GetContentByName(const std::string& name); - const ContentDescription* GetContentDescriptionByName( - const std::string& name) const; - ContentDescription* GetContentDescriptionByName(const std::string& name); - const ContentInfo* FirstContentByType(const std::string& type) const; - const ContentInfo* FirstContent() const; - - // Content mutators. - // Adds a content to this description. Takes ownership of ContentDescription*. - void AddContent(const std::string& name, - const std::string& type, - ContentDescription* description); - void AddContent(const std::string& name, - const std::string& type, - bool rejected, - ContentDescription* description); - void AddContent(const std::string& name, - const std::string& type, - bool rejected, - bool bundle_only, - ContentDescription* description); - bool RemoveContentByName(const std::string& name); - - // Transport accessors. - const TransportInfos& transport_infos() const { return transport_infos_; } - TransportInfos& transport_infos() { return transport_infos_; } - const TransportInfo* GetTransportInfoByName( - const std::string& name) const; - TransportInfo* GetTransportInfoByName(const std::string& name); - const TransportDescription* GetTransportDescriptionByName( - const std::string& name) const { - const TransportInfo* tinfo = GetTransportInfoByName(name); - return tinfo ? &tinfo->description : NULL; - } - - // Transport mutators. - void set_transport_infos(const TransportInfos& transport_infos) { - transport_infos_ = transport_infos; - } - // Adds a TransportInfo to this description. - // Returns false if a TransportInfo with the same name already exists. - bool AddTransportInfo(const TransportInfo& transport_info); - bool RemoveTransportInfoByName(const std::string& name); - - // Group accessors. - const ContentGroups& groups() const { return content_groups_; } - const ContentGroup* GetGroupByName(const std::string& name) const; - bool HasGroup(const std::string& name) const; - - // Group mutators. - void AddGroup(const ContentGroup& group) { content_groups_.push_back(group); } - // Remove the first group with the same semantics specified by |name|. - void RemoveGroupByName(const std::string& name); - - // Global attributes. - void set_msid_supported(bool supported) { msid_supported_ = supported; } - bool msid_supported() const { return msid_supported_; } - - private: - ContentInfos contents_; - TransportInfos transport_infos_; - ContentGroups content_groups_; - bool msid_supported_ = true; -}; - -// Indicates whether a ContentDescription was an offer or an answer, as -// described in http://www.ietf.org/rfc/rfc3264.txt. CA_UPDATE -// indicates a jingle update message which contains a subset of a full -// session description -enum ContentAction { - CA_OFFER, CA_PRANSWER, CA_ANSWER, CA_UPDATE -}; - -// Indicates whether a ContentDescription was sent by the local client -// or received from the remote client. -enum ContentSource { - CS_LOCAL, CS_REMOTE -}; - -} // namespace cricket - -#endif // WEBRTC_P2P_BASE_SESSIONDESCRIPTION_H_ diff --git a/WebRtc.NET/include/webrtc/p2p/base/stun.h b/WebRtc.NET/include/webrtc/p2p/base/stun.h deleted file mode 100644 index 153f63dc..00000000 --- a/WebRtc.NET/include/webrtc/p2p/base/stun.h +++ /dev/null @@ -1,641 +0,0 @@ -/* - * Copyright 2004 The WebRTC Project Authors. All rights reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_P2P_BASE_STUN_H_ -#define WEBRTC_P2P_BASE_STUN_H_ - -// This file contains classes for dealing with the STUN protocol, as specified -// in RFC 5389, and its descendants. - -#include -#include - -#include "webrtc/base/basictypes.h" -#include "webrtc/base/bytebuffer.h" -#include "webrtc/base/socketaddress.h" - -namespace cricket { - -// These are the types of STUN messages defined in RFC 5389. -enum StunMessageType { - STUN_BINDING_REQUEST = 0x0001, - STUN_BINDING_INDICATION = 0x0011, - STUN_BINDING_RESPONSE = 0x0101, - STUN_BINDING_ERROR_RESPONSE = 0x0111, -}; - -// These are all known STUN attributes, defined in RFC 5389 and elsewhere. -// Next to each is the name of the class (T is StunTAttribute) that implements -// that type. -// RETRANSMIT_COUNT is the number of outstanding pings without a response at -// the time the packet is generated. -enum StunAttributeType { - STUN_ATTR_MAPPED_ADDRESS = 0x0001, // Address - STUN_ATTR_USERNAME = 0x0006, // ByteString - STUN_ATTR_MESSAGE_INTEGRITY = 0x0008, // ByteString, 20 bytes - STUN_ATTR_ERROR_CODE = 0x0009, // ErrorCode - STUN_ATTR_UNKNOWN_ATTRIBUTES = 0x000a, // UInt16List - STUN_ATTR_REALM = 0x0014, // ByteString - STUN_ATTR_NONCE = 0x0015, // ByteString - STUN_ATTR_XOR_MAPPED_ADDRESS = 0x0020, // XorAddress - STUN_ATTR_SOFTWARE = 0x8022, // ByteString - STUN_ATTR_ALTERNATE_SERVER = 0x8023, // Address - STUN_ATTR_FINGERPRINT = 0x8028, // UInt32 - STUN_ATTR_ORIGIN = 0x802F, // ByteString - STUN_ATTR_RETRANSMIT_COUNT = 0xFF00 // UInt32 -}; - -// These are the types of the values associated with the attributes above. -// This allows us to perform some basic validation when reading or adding -// attributes. Note that these values are for our own use, and not defined in -// RFC 5389. -enum StunAttributeValueType { - STUN_VALUE_UNKNOWN = 0, - STUN_VALUE_ADDRESS = 1, - STUN_VALUE_XOR_ADDRESS = 2, - STUN_VALUE_UINT32 = 3, - STUN_VALUE_UINT64 = 4, - STUN_VALUE_BYTE_STRING = 5, - STUN_VALUE_ERROR_CODE = 6, - STUN_VALUE_UINT16_LIST = 7 -}; - -// These are the types of STUN addresses defined in RFC 5389. -enum StunAddressFamily { - // NB: UNDEF is not part of the STUN spec. - STUN_ADDRESS_UNDEF = 0, - STUN_ADDRESS_IPV4 = 1, - STUN_ADDRESS_IPV6 = 2 -}; - -// These are the types of STUN error codes defined in RFC 5389. -enum StunErrorCode { - STUN_ERROR_TRY_ALTERNATE = 300, - STUN_ERROR_BAD_REQUEST = 400, - STUN_ERROR_UNAUTHORIZED = 401, - STUN_ERROR_UNKNOWN_ATTRIBUTE = 420, - STUN_ERROR_STALE_CREDENTIALS = 430, // GICE only - STUN_ERROR_STALE_NONCE = 438, - STUN_ERROR_SERVER_ERROR = 500, - STUN_ERROR_GLOBAL_FAILURE = 600 -}; - -// Strings for the error codes above. -extern const char STUN_ERROR_REASON_TRY_ALTERNATE_SERVER[]; -extern const char STUN_ERROR_REASON_BAD_REQUEST[]; -extern const char STUN_ERROR_REASON_UNAUTHORIZED[]; -extern const char STUN_ERROR_REASON_UNKNOWN_ATTRIBUTE[]; -extern const char STUN_ERROR_REASON_STALE_CREDENTIALS[]; -extern const char STUN_ERROR_REASON_STALE_NONCE[]; -extern const char STUN_ERROR_REASON_SERVER_ERROR[]; - -// The mask used to determine whether a STUN message is a request/response etc. -const uint32_t kStunTypeMask = 0x0110; - -// STUN Attribute header length. -const size_t kStunAttributeHeaderSize = 4; - -// Following values correspond to RFC5389. -const size_t kStunHeaderSize = 20; -const size_t kStunTransactionIdOffset = 8; -const size_t kStunTransactionIdLength = 12; -const uint32_t kStunMagicCookie = 0x2112A442; -const size_t kStunMagicCookieLength = sizeof(kStunMagicCookie); - -// Following value corresponds to an earlier version of STUN from -// RFC3489. -const size_t kStunLegacyTransactionIdLength = 16; - -// STUN Message Integrity HMAC length. -const size_t kStunMessageIntegritySize = 20; - -class StunAttribute; -class StunAddressAttribute; -class StunXorAddressAttribute; -class StunUInt32Attribute; -class StunUInt64Attribute; -class StunByteStringAttribute; -class StunErrorCodeAttribute; -class StunUInt16ListAttribute; - -// Records a complete STUN/TURN message. Each message consists of a type and -// any number of attributes. Each attribute is parsed into an instance of an -// appropriate class (see above). The Get* methods will return instances of -// that attribute class. -class StunMessage { - public: - StunMessage(); - virtual ~StunMessage(); - - int type() const { return type_; } - size_t length() const { return length_; } - const std::string& transaction_id() const { return transaction_id_; } - - // Returns true if the message confirms to RFC3489 rather than - // RFC5389. The main difference between two version of the STUN - // protocol is the presence of the magic cookie and different length - // of transaction ID. For outgoing packets version of the protocol - // is determined by the lengths of the transaction ID. - bool IsLegacy() const; - - void SetType(int type) { type_ = static_cast(type); } - bool SetTransactionID(const std::string& str); - - // Gets the desired attribute value, or NULL if no such attribute type exists. - const StunAddressAttribute* GetAddress(int type) const; - const StunUInt32Attribute* GetUInt32(int type) const; - const StunUInt64Attribute* GetUInt64(int type) const; - const StunByteStringAttribute* GetByteString(int type) const; - - // Gets these specific attribute values. - const StunErrorCodeAttribute* GetErrorCode() const; - const StunUInt16ListAttribute* GetUnknownAttributes() const; - - // Takes ownership of the specified attribute, verifies it is of the correct - // type, and adds it to the message. The return value indicates whether this - // was successful. - bool AddAttribute(StunAttribute* attr); - - // Validates that a raw STUN message has a correct MESSAGE-INTEGRITY value. - // This can't currently be done on a StunMessage, since it is affected by - // padding data (which we discard when reading a StunMessage). - static bool ValidateMessageIntegrity(const char* data, size_t size, - const std::string& password); - // Adds a MESSAGE-INTEGRITY attribute that is valid for the current message. - bool AddMessageIntegrity(const std::string& password); - bool AddMessageIntegrity(const char* key, size_t keylen); - - // Verifies that a given buffer is STUN by checking for a correct FINGERPRINT. - static bool ValidateFingerprint(const char* data, size_t size); - - // Adds a FINGERPRINT attribute that is valid for the current message. - bool AddFingerprint(); - - // Parses the STUN packet in the given buffer and records it here. The - // return value indicates whether this was successful. - bool Read(rtc::ByteBufferReader* buf); - - // Writes this object into a STUN packet. The return value indicates whether - // this was successful. - bool Write(rtc::ByteBufferWriter* buf) const; - - // Creates an empty message. Overridable by derived classes. - virtual StunMessage* CreateNew() const { return new StunMessage(); } - - protected: - // Verifies that the given attribute is allowed for this message. - virtual StunAttributeValueType GetAttributeValueType(int type) const; - - private: - StunAttribute* CreateAttribute(int type, size_t length) /* const*/; - const StunAttribute* GetAttribute(int type) const; - static bool IsValidTransactionId(const std::string& transaction_id); - - uint16_t type_; - uint16_t length_; - std::string transaction_id_; - std::vector* attrs_; -}; - -// Base class for all STUN/TURN attributes. -class StunAttribute { - public: - virtual ~StunAttribute() { - } - - int type() const { return type_; } - size_t length() const { return length_; } - - // Return the type of this attribute. - virtual StunAttributeValueType value_type() const = 0; - - // Only XorAddressAttribute needs this so far. - virtual void SetOwner(StunMessage* owner) {} - - // Reads the body (not the type or length) for this type of attribute from - // the given buffer. Return value is true if successful. - virtual bool Read(rtc::ByteBufferReader* buf) = 0; - - // Writes the body (not the type or length) to the given buffer. Return - // value is true if successful. - virtual bool Write(rtc::ByteBufferWriter* buf) const = 0; - - // Creates an attribute object with the given type and smallest length. - static StunAttribute* Create(StunAttributeValueType value_type, - uint16_t type, - uint16_t length, - StunMessage* owner); - // TODO: Allow these create functions to take parameters, to reduce - // the amount of work callers need to do to initialize attributes. - static StunAddressAttribute* CreateAddress(uint16_t type); - static StunXorAddressAttribute* CreateXorAddress(uint16_t type); - static StunUInt32Attribute* CreateUInt32(uint16_t type); - static StunUInt64Attribute* CreateUInt64(uint16_t type); - static StunByteStringAttribute* CreateByteString(uint16_t type); - static StunErrorCodeAttribute* CreateErrorCode(); - static StunUInt16ListAttribute* CreateUnknownAttributes(); - - protected: - StunAttribute(uint16_t type, uint16_t length); - void SetLength(uint16_t length) { length_ = length; } - void WritePadding(rtc::ByteBufferWriter* buf) const; - void ConsumePadding(rtc::ByteBufferReader* buf) const; - - private: - uint16_t type_; - uint16_t length_; -}; - -// Implements STUN attributes that record an Internet address. -class StunAddressAttribute : public StunAttribute { - public: - static const uint16_t SIZE_UNDEF = 0; - static const uint16_t SIZE_IP4 = 8; - static const uint16_t SIZE_IP6 = 20; - StunAddressAttribute(uint16_t type, const rtc::SocketAddress& addr); - StunAddressAttribute(uint16_t type, uint16_t length); - - virtual StunAttributeValueType value_type() const { - return STUN_VALUE_ADDRESS; - } - - StunAddressFamily family() const { - switch (address_.ipaddr().family()) { - case AF_INET: - return STUN_ADDRESS_IPV4; - case AF_INET6: - return STUN_ADDRESS_IPV6; - } - return STUN_ADDRESS_UNDEF; - } - - const rtc::SocketAddress& GetAddress() const { return address_; } - const rtc::IPAddress& ipaddr() const { return address_.ipaddr(); } - uint16_t port() const { return address_.port(); } - - void SetAddress(const rtc::SocketAddress& addr) { - address_ = addr; - EnsureAddressLength(); - } - void SetIP(const rtc::IPAddress& ip) { - address_.SetIP(ip); - EnsureAddressLength(); - } - void SetPort(uint16_t port) { address_.SetPort(port); } - - virtual bool Read(rtc::ByteBufferReader* buf); - virtual bool Write(rtc::ByteBufferWriter* buf) const; - - private: - void EnsureAddressLength() { - switch (family()) { - case STUN_ADDRESS_IPV4: { - SetLength(SIZE_IP4); - break; - } - case STUN_ADDRESS_IPV6: { - SetLength(SIZE_IP6); - break; - } - default: { - SetLength(SIZE_UNDEF); - break; - } - } - } - rtc::SocketAddress address_; -}; - -// Implements STUN attributes that record an Internet address. When encoded -// in a STUN message, the address contained in this attribute is XORed with the -// transaction ID of the message. -class StunXorAddressAttribute : public StunAddressAttribute { - public: - StunXorAddressAttribute(uint16_t type, const rtc::SocketAddress& addr); - StunXorAddressAttribute(uint16_t type, uint16_t length, StunMessage* owner); - - virtual StunAttributeValueType value_type() const { - return STUN_VALUE_XOR_ADDRESS; - } - virtual void SetOwner(StunMessage* owner) { - owner_ = owner; - } - virtual bool Read(rtc::ByteBufferReader* buf); - virtual bool Write(rtc::ByteBufferWriter* buf) const; - - private: - rtc::IPAddress GetXoredIP() const; - StunMessage* owner_; -}; - -// Implements STUN attributes that record a 32-bit integer. -class StunUInt32Attribute : public StunAttribute { - public: - static const uint16_t SIZE = 4; - StunUInt32Attribute(uint16_t type, uint32_t value); - explicit StunUInt32Attribute(uint16_t type); - - virtual StunAttributeValueType value_type() const { - return STUN_VALUE_UINT32; - } - - uint32_t value() const { return bits_; } - void SetValue(uint32_t bits) { bits_ = bits; } - - bool GetBit(size_t index) const; - void SetBit(size_t index, bool value); - - virtual bool Read(rtc::ByteBufferReader* buf); - virtual bool Write(rtc::ByteBufferWriter* buf) const; - - private: - uint32_t bits_; -}; - -class StunUInt64Attribute : public StunAttribute { - public: - static const uint16_t SIZE = 8; - StunUInt64Attribute(uint16_t type, uint64_t value); - explicit StunUInt64Attribute(uint16_t type); - - virtual StunAttributeValueType value_type() const { - return STUN_VALUE_UINT64; - } - - uint64_t value() const { return bits_; } - void SetValue(uint64_t bits) { bits_ = bits; } - - virtual bool Read(rtc::ByteBufferReader* buf); - virtual bool Write(rtc::ByteBufferWriter* buf) const; - - private: - uint64_t bits_; -}; - -// Implements STUN attributes that record an arbitrary byte string. -class StunByteStringAttribute : public StunAttribute { - public: - explicit StunByteStringAttribute(uint16_t type); - StunByteStringAttribute(uint16_t type, const std::string& str); - StunByteStringAttribute(uint16_t type, const void* bytes, size_t length); - StunByteStringAttribute(uint16_t type, uint16_t length); - ~StunByteStringAttribute(); - - virtual StunAttributeValueType value_type() const { - return STUN_VALUE_BYTE_STRING; - } - - const char* bytes() const { return bytes_; } - std::string GetString() const { return std::string(bytes_, length()); } - - void CopyBytes(const char* bytes); // uses strlen - void CopyBytes(const void* bytes, size_t length); - - uint8_t GetByte(size_t index) const; - void SetByte(size_t index, uint8_t value); - - virtual bool Read(rtc::ByteBufferReader* buf); - virtual bool Write(rtc::ByteBufferWriter* buf) const; - - private: - void SetBytes(char* bytes, size_t length); - - char* bytes_; -}; - -// Implements STUN attributes that record an error code. -class StunErrorCodeAttribute : public StunAttribute { - public: - static const uint16_t MIN_SIZE = 4; - StunErrorCodeAttribute(uint16_t type, int code, const std::string& reason); - StunErrorCodeAttribute(uint16_t type, uint16_t length); - ~StunErrorCodeAttribute(); - - virtual StunAttributeValueType value_type() const { - return STUN_VALUE_ERROR_CODE; - } - - // The combined error and class, e.g. 0x400. - int code() const; - void SetCode(int code); - - // The individual error components. - int eclass() const { return class_; } - int number() const { return number_; } - const std::string& reason() const { return reason_; } - void SetClass(uint8_t eclass) { class_ = eclass; } - void SetNumber(uint8_t number) { number_ = number; } - void SetReason(const std::string& reason); - - bool Read(rtc::ByteBufferReader* buf); - bool Write(rtc::ByteBufferWriter* buf) const; - - private: - uint8_t class_; - uint8_t number_; - std::string reason_; -}; - -// Implements STUN attributes that record a list of attribute names. -class StunUInt16ListAttribute : public StunAttribute { - public: - StunUInt16ListAttribute(uint16_t type, uint16_t length); - ~StunUInt16ListAttribute(); - - virtual StunAttributeValueType value_type() const { - return STUN_VALUE_UINT16_LIST; - } - - size_t Size() const; - uint16_t GetType(int index) const; - void SetType(int index, uint16_t value); - void AddType(uint16_t value); - - bool Read(rtc::ByteBufferReader* buf); - bool Write(rtc::ByteBufferWriter* buf) const; - - private: - std::vector* attr_types_; -}; - -// Returns the (successful) response type for the given request type. -// Returns -1 if |request_type| is not a valid request type. -int GetStunSuccessResponseType(int request_type); - -// Returns the error response type for the given request type. -// Returns -1 if |request_type| is not a valid request type. -int GetStunErrorResponseType(int request_type); - -// Returns whether a given message is a request type. -bool IsStunRequestType(int msg_type); - -// Returns whether a given message is an indication type. -bool IsStunIndicationType(int msg_type); - -// Returns whether a given response is a success type. -bool IsStunSuccessResponseType(int msg_type); - -// Returns whether a given response is an error type. -bool IsStunErrorResponseType(int msg_type); - -// Computes the STUN long-term credential hash. -bool ComputeStunCredentialHash(const std::string& username, - const std::string& realm, const std::string& password, std::string* hash); - -// TODO: Move the TURN/ICE stuff below out to separate files. -extern const char TURN_MAGIC_COOKIE_VALUE[4]; - -// "GTURN" STUN methods. -// TODO: Rename these methods to GTURN_ to make it clear they aren't -// part of standard STUN/TURN. -enum RelayMessageType { - // For now, using the same defs from TurnMessageType below. - // STUN_ALLOCATE_REQUEST = 0x0003, - // STUN_ALLOCATE_RESPONSE = 0x0103, - // STUN_ALLOCATE_ERROR_RESPONSE = 0x0113, - STUN_SEND_REQUEST = 0x0004, - STUN_SEND_RESPONSE = 0x0104, - STUN_SEND_ERROR_RESPONSE = 0x0114, - STUN_DATA_INDICATION = 0x0115, -}; - -// "GTURN"-specific STUN attributes. -// TODO: Rename these attributes to GTURN_ to avoid conflicts. -enum RelayAttributeType { - STUN_ATTR_LIFETIME = 0x000d, // UInt32 - STUN_ATTR_MAGIC_COOKIE = 0x000f, // ByteString, 4 bytes - STUN_ATTR_BANDWIDTH = 0x0010, // UInt32 - STUN_ATTR_DESTINATION_ADDRESS = 0x0011, // Address - STUN_ATTR_SOURCE_ADDRESS2 = 0x0012, // Address - STUN_ATTR_DATA = 0x0013, // ByteString - STUN_ATTR_OPTIONS = 0x8001, // UInt32 -}; - -// A "GTURN" STUN message. -class RelayMessage : public StunMessage { - protected: - virtual StunAttributeValueType GetAttributeValueType(int type) const { - switch (type) { - case STUN_ATTR_LIFETIME: return STUN_VALUE_UINT32; - case STUN_ATTR_MAGIC_COOKIE: return STUN_VALUE_BYTE_STRING; - case STUN_ATTR_BANDWIDTH: return STUN_VALUE_UINT32; - case STUN_ATTR_DESTINATION_ADDRESS: return STUN_VALUE_ADDRESS; - case STUN_ATTR_SOURCE_ADDRESS2: return STUN_VALUE_ADDRESS; - case STUN_ATTR_DATA: return STUN_VALUE_BYTE_STRING; - case STUN_ATTR_OPTIONS: return STUN_VALUE_UINT32; - default: return StunMessage::GetAttributeValueType(type); - } - } - virtual StunMessage* CreateNew() const { return new RelayMessage(); } -}; - -// Defined in TURN RFC 5766. -enum TurnMessageType { - STUN_ALLOCATE_REQUEST = 0x0003, - STUN_ALLOCATE_RESPONSE = 0x0103, - STUN_ALLOCATE_ERROR_RESPONSE = 0x0113, - TURN_REFRESH_REQUEST = 0x0004, - TURN_REFRESH_RESPONSE = 0x0104, - TURN_REFRESH_ERROR_RESPONSE = 0x0114, - TURN_SEND_INDICATION = 0x0016, - TURN_DATA_INDICATION = 0x0017, - TURN_CREATE_PERMISSION_REQUEST = 0x0008, - TURN_CREATE_PERMISSION_RESPONSE = 0x0108, - TURN_CREATE_PERMISSION_ERROR_RESPONSE = 0x0118, - TURN_CHANNEL_BIND_REQUEST = 0x0009, - TURN_CHANNEL_BIND_RESPONSE = 0x0109, - TURN_CHANNEL_BIND_ERROR_RESPONSE = 0x0119, -}; - -enum TurnAttributeType { - STUN_ATTR_CHANNEL_NUMBER = 0x000C, // UInt32 - STUN_ATTR_TURN_LIFETIME = 0x000d, // UInt32 - STUN_ATTR_XOR_PEER_ADDRESS = 0x0012, // XorAddress - // TODO(mallinath) - Uncomment after RelayAttributes are renamed. - // STUN_ATTR_DATA = 0x0013, // ByteString - STUN_ATTR_XOR_RELAYED_ADDRESS = 0x0016, // XorAddress - STUN_ATTR_EVEN_PORT = 0x0018, // ByteString, 1 byte. - STUN_ATTR_REQUESTED_TRANSPORT = 0x0019, // UInt32 - STUN_ATTR_DONT_FRAGMENT = 0x001A, // No content, Length = 0 - STUN_ATTR_RESERVATION_TOKEN = 0x0022, // ByteString, 8 bytes. - // TODO(mallinath) - Rename STUN_ATTR_TURN_LIFETIME to STUN_ATTR_LIFETIME and - // STUN_ATTR_TURN_DATA to STUN_ATTR_DATA. Also rename RelayMessage attributes - // by appending G to attribute name. -}; - -// RFC 5766-defined errors. -enum TurnErrorType { - STUN_ERROR_FORBIDDEN = 403, - STUN_ERROR_ALLOCATION_MISMATCH = 437, - STUN_ERROR_WRONG_CREDENTIALS = 441, - STUN_ERROR_UNSUPPORTED_PROTOCOL = 442 -}; -extern const char STUN_ERROR_REASON_FORBIDDEN[]; -extern const char STUN_ERROR_REASON_ALLOCATION_MISMATCH[]; -extern const char STUN_ERROR_REASON_WRONG_CREDENTIALS[]; -extern const char STUN_ERROR_REASON_UNSUPPORTED_PROTOCOL[]; -class TurnMessage : public StunMessage { - protected: - virtual StunAttributeValueType GetAttributeValueType(int type) const { - switch (type) { - case STUN_ATTR_CHANNEL_NUMBER: return STUN_VALUE_UINT32; - case STUN_ATTR_TURN_LIFETIME: return STUN_VALUE_UINT32; - case STUN_ATTR_XOR_PEER_ADDRESS: return STUN_VALUE_XOR_ADDRESS; - case STUN_ATTR_DATA: return STUN_VALUE_BYTE_STRING; - case STUN_ATTR_XOR_RELAYED_ADDRESS: return STUN_VALUE_XOR_ADDRESS; - case STUN_ATTR_EVEN_PORT: return STUN_VALUE_BYTE_STRING; - case STUN_ATTR_REQUESTED_TRANSPORT: return STUN_VALUE_UINT32; - case STUN_ATTR_DONT_FRAGMENT: return STUN_VALUE_BYTE_STRING; - case STUN_ATTR_RESERVATION_TOKEN: return STUN_VALUE_BYTE_STRING; - default: return StunMessage::GetAttributeValueType(type); - } - } - virtual StunMessage* CreateNew() const { return new TurnMessage(); } -}; - -// RFC 5245 ICE STUN attributes. -enum IceAttributeType { - STUN_ATTR_PRIORITY = 0x0024, // UInt32 - STUN_ATTR_USE_CANDIDATE = 0x0025, // No content, Length = 0 - STUN_ATTR_ICE_CONTROLLED = 0x8029, // UInt64 - STUN_ATTR_ICE_CONTROLLING = 0x802A, // UInt64 - STUN_ATTR_NOMINATION = 0xC001, // UInt32 - // UInt32. The higher 16 bits are the network ID. The lower 16 bits are the - // network cost. - STUN_ATTR_NETWORK_INFO = 0xC057 -}; - -// RFC 5245-defined errors. -enum IceErrorCode { - STUN_ERROR_ROLE_CONFLICT = 487, -}; -extern const char STUN_ERROR_REASON_ROLE_CONFLICT[]; - -// A RFC 5245 ICE STUN message. -class IceMessage : public StunMessage { - protected: - virtual StunAttributeValueType GetAttributeValueType(int type) const { - switch (type) { - case STUN_ATTR_PRIORITY: - case STUN_ATTR_NETWORK_INFO: - case STUN_ATTR_NOMINATION: - return STUN_VALUE_UINT32; - case STUN_ATTR_USE_CANDIDATE: return STUN_VALUE_BYTE_STRING; - case STUN_ATTR_ICE_CONTROLLED: return STUN_VALUE_UINT64; - case STUN_ATTR_ICE_CONTROLLING: return STUN_VALUE_UINT64; - default: return StunMessage::GetAttributeValueType(type); - } - } - virtual StunMessage* CreateNew() const { return new IceMessage(); } -}; - -} // namespace cricket - -#endif // WEBRTC_P2P_BASE_STUN_H_ diff --git a/WebRtc.NET/include/webrtc/p2p/base/stunport.h b/WebRtc.NET/include/webrtc/p2p/base/stunport.h deleted file mode 100644 index 1bbe25f0..00000000 --- a/WebRtc.NET/include/webrtc/p2p/base/stunport.h +++ /dev/null @@ -1,315 +0,0 @@ -/* - * Copyright 2004 The WebRTC Project Authors. All rights reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_P2P_BASE_STUNPORT_H_ -#define WEBRTC_P2P_BASE_STUNPORT_H_ - -#include -#include - -#include "webrtc/p2p/base/port.h" -#include "webrtc/p2p/base/stunrequest.h" -#include "webrtc/base/asyncpacketsocket.h" - -// TODO(mallinath) - Rename stunport.cc|h to udpport.cc|h. -namespace rtc { -class AsyncResolver; -class SignalThread; -} - -namespace cricket { - -// Lifetime chosen for STUN ports on low-cost networks. -static const int INFINITE_LIFETIME = -1; -// Lifetime for STUN ports on high-cost networks: 2 minutes -static const int HIGH_COST_PORT_KEEPALIVE_LIFETIME = 2 * 60 * 1000; - -// Communicates using the address on the outside of a NAT. -class UDPPort : public Port { - public: - static UDPPort* Create(rtc::Thread* thread, - rtc::PacketSocketFactory* factory, - rtc::Network* network, - rtc::AsyncPacketSocket* socket, - const std::string& username, - const std::string& password, - const std::string& origin, - bool emit_local_for_anyaddress) { - UDPPort* port = new UDPPort(thread, factory, network, socket, username, - password, origin, emit_local_for_anyaddress); - if (!port->Init()) { - delete port; - port = NULL; - } - return port; - } - - static UDPPort* Create(rtc::Thread* thread, - rtc::PacketSocketFactory* factory, - rtc::Network* network, - const rtc::IPAddress& ip, - uint16_t min_port, - uint16_t max_port, - const std::string& username, - const std::string& password, - const std::string& origin, - bool emit_local_for_anyaddress) { - UDPPort* port = - new UDPPort(thread, factory, network, ip, min_port, max_port, username, - password, origin, emit_local_for_anyaddress); - if (!port->Init()) { - delete port; - port = NULL; - } - return port; - } - - virtual ~UDPPort(); - - rtc::SocketAddress GetLocalAddress() const { - return socket_->GetLocalAddress(); - } - - const ServerAddresses& server_addresses() const { - return server_addresses_; - } - void set_server_addresses(const ServerAddresses& addresses) { - server_addresses_ = addresses; - } - - virtual void PrepareAddress(); - - virtual Connection* CreateConnection(const Candidate& address, - CandidateOrigin origin); - virtual int SetOption(rtc::Socket::Option opt, int value); - virtual int GetOption(rtc::Socket::Option opt, int* value); - virtual int GetError(); - - virtual bool HandleIncomingPacket( - rtc::AsyncPacketSocket* socket, const char* data, size_t size, - const rtc::SocketAddress& remote_addr, - const rtc::PacketTime& packet_time) { - // All packets given to UDP port will be consumed. - OnReadPacket(socket, data, size, remote_addr, packet_time); - return true; - } - virtual bool SupportsProtocol(const std::string& protocol) const { - return protocol == UDP_PROTOCOL_NAME; - } - - virtual ProtocolType GetProtocol() const { return PROTO_UDP; } - - void set_stun_keepalive_delay(int delay) { - stun_keepalive_delay_ = delay; - } - int stun_keepalive_delay() const { - return stun_keepalive_delay_; - } - - // Visible for testing. - int stun_keepalive_lifetime() const { return stun_keepalive_lifetime_; } - void set_stun_keepalive_lifetime(int lifetime) { - stun_keepalive_lifetime_ = lifetime; - } - // Returns true if there is a pending request with type |msg_type|. - bool HasPendingRequest(int msg_type) { - return requests_.HasRequest(msg_type); - } - - protected: - UDPPort(rtc::Thread* thread, - rtc::PacketSocketFactory* factory, - rtc::Network* network, - const rtc::IPAddress& ip, - uint16_t min_port, - uint16_t max_port, - const std::string& username, - const std::string& password, - const std::string& origin, - bool emit_local_for_anyaddress); - - UDPPort(rtc::Thread* thread, - rtc::PacketSocketFactory* factory, - rtc::Network* network, - rtc::AsyncPacketSocket* socket, - const std::string& username, - const std::string& password, - const std::string& origin, - bool emit_local_for_anyaddress); - - bool Init(); - - virtual int SendTo(const void* data, size_t size, - const rtc::SocketAddress& addr, - const rtc::PacketOptions& options, - bool payload); - - virtual void UpdateNetworkCost(); - - void OnLocalAddressReady(rtc::AsyncPacketSocket* socket, - const rtc::SocketAddress& address); - void OnReadPacket(rtc::AsyncPacketSocket* socket, - const char* data, size_t size, - const rtc::SocketAddress& remote_addr, - const rtc::PacketTime& packet_time); - - void OnSentPacket(rtc::AsyncPacketSocket* socket, - const rtc::SentPacket& sent_packet); - - void OnReadyToSend(rtc::AsyncPacketSocket* socket); - - // This method will send STUN binding request if STUN server address is set. - void MaybePrepareStunCandidate(); - - void SendStunBindingRequests(); - - // Helper function which will set |addr|'s IP to the default local address if - // |addr| is the "any" address and |emit_local_for_anyaddress_| is true. When - // returning false, it indicates that the operation has failed and the - // address shouldn't be used by any candidate. - bool MaybeSetDefaultLocalAddress(rtc::SocketAddress* addr) const; - - private: - // A helper class which can be called repeatedly to resolve multiple - // addresses, as opposed to rtc::AsyncResolverInterface, which can only - // resolve one address per instance. - class AddressResolver : public sigslot::has_slots<> { - public: - explicit AddressResolver(rtc::PacketSocketFactory* factory); - ~AddressResolver(); - - void Resolve(const rtc::SocketAddress& address); - bool GetResolvedAddress(const rtc::SocketAddress& input, - int family, - rtc::SocketAddress* output) const; - - // The signal is sent when resolving the specified address is finished. The - // first argument is the input address, the second argument is the error - // or 0 if it succeeded. - sigslot::signal2 SignalDone; - - private: - typedef std::map ResolverMap; - - void OnResolveResult(rtc::AsyncResolverInterface* resolver); - - rtc::PacketSocketFactory* socket_factory_; - ResolverMap resolvers_; - }; - - // DNS resolution of the STUN server. - void ResolveStunAddress(const rtc::SocketAddress& stun_addr); - void OnResolveResult(const rtc::SocketAddress& input, int error); - - void SendStunBindingRequest(const rtc::SocketAddress& stun_addr); - - // Below methods handles binding request responses. - void OnStunBindingRequestSucceeded( - const rtc::SocketAddress& stun_server_addr, - const rtc::SocketAddress& stun_reflected_addr); - void OnStunBindingOrResolveRequestFailed( - const rtc::SocketAddress& stun_server_addr); - - // Sends STUN requests to the server. - void OnSendPacket(const void* data, size_t size, StunRequest* req); - - // TODO(mallinaht) - Move this up to cricket::Port when SignalAddressReady is - // changed to SignalPortReady. - void MaybeSetPortCompleteOrError(); - - bool HasCandidateWithAddress(const rtc::SocketAddress& addr) const; - - // If this is a low-cost network, it will keep on sending STUN binding - // requests indefinitely to keep the NAT binding alive. Otherwise, stop - // sending STUN binding requests after HIGH_COST_PORT_KEEPALIVE_LIFETIME. - int GetStunKeepaliveLifetime() { - return (network_cost() >= rtc::kNetworkCostHigh) - ? HIGH_COST_PORT_KEEPALIVE_LIFETIME - : INFINITE_LIFETIME; - } - - ServerAddresses server_addresses_; - ServerAddresses bind_request_succeeded_servers_; - ServerAddresses bind_request_failed_servers_; - StunRequestManager requests_; - rtc::AsyncPacketSocket* socket_; - int error_; - std::unique_ptr resolver_; - bool ready_; - int stun_keepalive_delay_; - int stun_keepalive_lifetime_ = INFINITE_LIFETIME; - - // This is true by default and false when - // PORTALLOCATOR_DISABLE_DEFAULT_LOCAL_CANDIDATE is specified. - bool emit_local_for_anyaddress_; - - friend class StunBindingRequest; -}; - -class StunPort : public UDPPort { - public: - static StunPort* Create(rtc::Thread* thread, - rtc::PacketSocketFactory* factory, - rtc::Network* network, - const rtc::IPAddress& ip, - uint16_t min_port, - uint16_t max_port, - const std::string& username, - const std::string& password, - const ServerAddresses& servers, - const std::string& origin) { - StunPort* port = new StunPort(thread, factory, network, - ip, min_port, max_port, - username, password, servers, - origin); - if (!port->Init()) { - delete port; - port = NULL; - } - return port; - } - - virtual ~StunPort() {} - - virtual void PrepareAddress() { - SendStunBindingRequests(); - } - - protected: - StunPort(rtc::Thread* thread, - rtc::PacketSocketFactory* factory, - rtc::Network* network, - const rtc::IPAddress& ip, - uint16_t min_port, - uint16_t max_port, - const std::string& username, - const std::string& password, - const ServerAddresses& servers, - const std::string& origin) - : UDPPort(thread, - factory, - network, - ip, - min_port, - max_port, - username, - password, - origin, - false) { - // UDPPort will set these to local udp, updating these to STUN. - set_type(STUN_PORT_TYPE); - set_server_addresses(servers); - } -}; - -} // namespace cricket - -#endif // WEBRTC_P2P_BASE_STUNPORT_H_ diff --git a/WebRtc.NET/include/webrtc/p2p/base/stunserver.h b/WebRtc.NET/include/webrtc/p2p/base/stunserver.h deleted file mode 100644 index 9d1c169a..00000000 --- a/WebRtc.NET/include/webrtc/p2p/base/stunserver.h +++ /dev/null @@ -1,67 +0,0 @@ -/* - * Copyright 2004 The WebRTC Project Authors. All rights reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_P2P_BASE_STUNSERVER_H_ -#define WEBRTC_P2P_BASE_STUNSERVER_H_ - -#include - -#include "webrtc/p2p/base/stun.h" -#include "webrtc/base/asyncudpsocket.h" - -namespace cricket { - -const int STUN_SERVER_PORT = 3478; - -class StunServer : public sigslot::has_slots<> { - public: - // Creates a STUN server, which will listen on the given socket. - explicit StunServer(rtc::AsyncUDPSocket* socket); - // Removes the STUN server from the socket and deletes the socket. - ~StunServer(); - - protected: - // Slot for AsyncSocket.PacketRead: - void OnPacket( - rtc::AsyncPacketSocket* socket, const char* buf, size_t size, - const rtc::SocketAddress& remote_addr, - const rtc::PacketTime& packet_time); - - // Handlers for the different types of STUN/TURN requests: - virtual void OnBindingRequest(StunMessage* msg, - const rtc::SocketAddress& addr); - void OnAllocateRequest(StunMessage* msg, - const rtc::SocketAddress& addr); - void OnSharedSecretRequest(StunMessage* msg, - const rtc::SocketAddress& addr); - void OnSendRequest(StunMessage* msg, - const rtc::SocketAddress& addr); - - // Sends an error response to the given message back to the user. - void SendErrorResponse( - const StunMessage& msg, const rtc::SocketAddress& addr, - int error_code, const char* error_desc); - - // Sends the given message to the appropriate destination. - void SendResponse(const StunMessage& msg, - const rtc::SocketAddress& addr); - - // A helper method to compose a STUN binding response. - void GetStunBindReqponse(StunMessage* request, - const rtc::SocketAddress& remote_addr, - StunMessage* response) const; - - private: - std::unique_ptr socket_; -}; - -} // namespace cricket - -#endif // WEBRTC_P2P_BASE_STUNSERVER_H_ diff --git a/WebRtc.NET/include/webrtc/p2p/base/testrelayserver.h b/WebRtc.NET/include/webrtc/p2p/base/testrelayserver.h deleted file mode 100644 index 7bc0beea..00000000 --- a/WebRtc.NET/include/webrtc/p2p/base/testrelayserver.h +++ /dev/null @@ -1,102 +0,0 @@ -/* - * Copyright 2008 The WebRTC Project Authors. All rights reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_P2P_BASE_TESTRELAYSERVER_H_ -#define WEBRTC_P2P_BASE_TESTRELAYSERVER_H_ - -#include - -#include "webrtc/p2p/base/relayserver.h" -#include "webrtc/base/asynctcpsocket.h" -#include "webrtc/base/sigslot.h" -#include "webrtc/base/socketadapters.h" -#include "webrtc/base/thread.h" - -namespace cricket { - -// A test relay server. Useful for unit tests. -class TestRelayServer : public sigslot::has_slots<> { - public: - TestRelayServer(rtc::Thread* thread, - const rtc::SocketAddress& udp_int_addr, - const rtc::SocketAddress& udp_ext_addr, - const rtc::SocketAddress& tcp_int_addr, - const rtc::SocketAddress& tcp_ext_addr, - const rtc::SocketAddress& ssl_int_addr, - const rtc::SocketAddress& ssl_ext_addr) - : server_(thread) { - server_.AddInternalSocket(rtc::AsyncUDPSocket::Create( - thread->socketserver(), udp_int_addr)); - server_.AddExternalSocket(rtc::AsyncUDPSocket::Create( - thread->socketserver(), udp_ext_addr)); - - tcp_int_socket_.reset(CreateListenSocket(thread, tcp_int_addr)); - tcp_ext_socket_.reset(CreateListenSocket(thread, tcp_ext_addr)); - ssl_int_socket_.reset(CreateListenSocket(thread, ssl_int_addr)); - ssl_ext_socket_.reset(CreateListenSocket(thread, ssl_ext_addr)); - } - int GetConnectionCount() const { - return server_.GetConnectionCount(); - } - rtc::SocketAddressPair GetConnection(int connection) const { - return server_.GetConnection(connection); - } - bool HasConnection(const rtc::SocketAddress& address) const { - return server_.HasConnection(address); - } - - private: - rtc::AsyncSocket* CreateListenSocket(rtc::Thread* thread, - const rtc::SocketAddress& addr) { - rtc::AsyncSocket* socket = - thread->socketserver()->CreateAsyncSocket(addr.family(), SOCK_STREAM); - socket->Bind(addr); - socket->Listen(5); - socket->SignalReadEvent.connect(this, &TestRelayServer::OnAccept); - return socket; - } - void OnAccept(rtc::AsyncSocket* socket) { - bool external = (socket == tcp_ext_socket_.get() || - socket == ssl_ext_socket_.get()); - bool ssl = (socket == ssl_int_socket_.get() || - socket == ssl_ext_socket_.get()); - rtc::AsyncSocket* raw_socket = socket->Accept(NULL); - if (raw_socket) { - rtc::AsyncTCPSocket* packet_socket = new rtc::AsyncTCPSocket( - (!ssl) ? raw_socket : - new rtc::AsyncSSLServerSocket(raw_socket), false); - if (!external) { - packet_socket->SignalClose.connect(this, - &TestRelayServer::OnInternalClose); - server_.AddInternalSocket(packet_socket); - } else { - packet_socket->SignalClose.connect(this, - &TestRelayServer::OnExternalClose); - server_.AddExternalSocket(packet_socket); - } - } - } - void OnInternalClose(rtc::AsyncPacketSocket* socket, int error) { - server_.RemoveInternalSocket(socket); - } - void OnExternalClose(rtc::AsyncPacketSocket* socket, int error) { - server_.RemoveExternalSocket(socket); - } - private: - cricket::RelayServer server_; - std::unique_ptr tcp_int_socket_; - std::unique_ptr tcp_ext_socket_; - std::unique_ptr ssl_int_socket_; - std::unique_ptr ssl_ext_socket_; -}; - -} // namespace cricket - -#endif // WEBRTC_P2P_BASE_TESTRELAYSERVER_H_ diff --git a/WebRtc.NET/include/webrtc/p2p/base/teststunserver.h b/WebRtc.NET/include/webrtc/p2p/base/teststunserver.h deleted file mode 100644 index 1911a0b7..00000000 --- a/WebRtc.NET/include/webrtc/p2p/base/teststunserver.h +++ /dev/null @@ -1,58 +0,0 @@ -/* - * Copyright 2008 The WebRTC Project Authors. All rights reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_P2P_BASE_TESTSTUNSERVER_H_ -#define WEBRTC_P2P_BASE_TESTSTUNSERVER_H_ - -#include "webrtc/p2p/base/stunserver.h" -#include "webrtc/base/socketaddress.h" -#include "webrtc/base/thread.h" - -namespace cricket { - -// A test STUN server. Useful for unit tests. -class TestStunServer : StunServer { - public: - static TestStunServer* Create(rtc::Thread* thread, - const rtc::SocketAddress& addr) { - rtc::AsyncSocket* socket = - thread->socketserver()->CreateAsyncSocket(addr.family(), SOCK_DGRAM); - rtc::AsyncUDPSocket* udp_socket = - rtc::AsyncUDPSocket::Create(socket, addr); - - return new TestStunServer(udp_socket); - } - - // Set a fake STUN address to return to the client. - void set_fake_stun_addr(const rtc::SocketAddress& addr) { - fake_stun_addr_ = addr; - } - - private: - explicit TestStunServer(rtc::AsyncUDPSocket* socket) : StunServer(socket) {} - - void OnBindingRequest(StunMessage* msg, - const rtc::SocketAddress& remote_addr) override { - if (fake_stun_addr_.IsNil()) { - StunServer::OnBindingRequest(msg, remote_addr); - } else { - StunMessage response; - GetStunBindReqponse(msg, fake_stun_addr_, &response); - SendResponse(response, remote_addr); - } - } - - private: - rtc::SocketAddress fake_stun_addr_; -}; - -} // namespace cricket - -#endif // WEBRTC_P2P_BASE_TESTSTUNSERVER_H_ diff --git a/WebRtc.NET/include/webrtc/p2p/base/testturnserver.h b/WebRtc.NET/include/webrtc/p2p/base/testturnserver.h deleted file mode 100644 index 9cd82037..00000000 --- a/WebRtc.NET/include/webrtc/p2p/base/testturnserver.h +++ /dev/null @@ -1,122 +0,0 @@ -/* - * Copyright 2012 The WebRTC Project Authors. All rights reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_P2P_BASE_TESTTURNSERVER_H_ -#define WEBRTC_P2P_BASE_TESTTURNSERVER_H_ - -#include -#include - -#include "webrtc/p2p/base/basicpacketsocketfactory.h" -#include "webrtc/p2p/base/stun.h" -#include "webrtc/p2p/base/turnserver.h" -#include "webrtc/base/asyncudpsocket.h" -#include "webrtc/base/thread.h" - -namespace cricket { - -static const char kTestRealm[] = "example.org"; -static const char kTestSoftware[] = "TestTurnServer"; - -class TestTurnRedirector : public TurnRedirectInterface { - public: - explicit TestTurnRedirector(const std::vector& addresses) - : alternate_server_addresses_(addresses), - iter_(alternate_server_addresses_.begin()) { - } - - virtual bool ShouldRedirect(const rtc::SocketAddress&, - rtc::SocketAddress* out) { - if (!out || iter_ == alternate_server_addresses_.end()) { - return false; - } - *out = *iter_++; - return true; - } - - private: - const std::vector& alternate_server_addresses_; - std::vector::const_iterator iter_; -}; - -class TestTurnServer : public TurnAuthInterface { - public: - TestTurnServer(rtc::Thread* thread, - const rtc::SocketAddress& int_addr, - const rtc::SocketAddress& udp_ext_addr, - ProtocolType int_protocol = PROTO_UDP) - : server_(thread), thread_(thread) { - AddInternalSocket(int_addr, int_protocol); - server_.SetExternalSocketFactory(new rtc::BasicPacketSocketFactory(thread), - udp_ext_addr); - server_.set_realm(kTestRealm); - server_.set_software(kTestSoftware); - server_.set_auth_hook(this); - } - - void set_enable_otu_nonce(bool enable) { - server_.set_enable_otu_nonce(enable); - } - - TurnServer* server() { return &server_; } - - void set_redirect_hook(TurnRedirectInterface* redirect_hook) { - server_.set_redirect_hook(redirect_hook); - } - - void set_enable_permission_checks(bool enable) { - server_.set_enable_permission_checks(enable); - } - - void AddInternalSocket(const rtc::SocketAddress& int_addr, - ProtocolType proto) { - if (proto == cricket::PROTO_UDP) { - server_.AddInternalSocket( - rtc::AsyncUDPSocket::Create(thread_->socketserver(), int_addr), - proto); - } else if (proto == cricket::PROTO_TCP) { - // For TCP we need to create a server socket which can listen for incoming - // new connections. - rtc::AsyncSocket* socket = - thread_->socketserver()->CreateAsyncSocket(SOCK_STREAM); - socket->Bind(int_addr); - socket->Listen(5); - server_.AddInternalServerSocket(socket, proto); - } - } - - // Finds the first allocation in the server allocation map with a source - // ip and port matching the socket address provided. - TurnServerAllocation* FindAllocation(const rtc::SocketAddress& src) { - const TurnServer::AllocationMap& map = server_.allocations(); - for (TurnServer::AllocationMap::const_iterator it = map.begin(); - it != map.end(); ++it) { - if (src == it->first.src()) { - return it->second.get(); - } - } - return NULL; - } - - private: - // For this test server, succeed if the password is the same as the username. - // Obviously, do not use this in a production environment. - virtual bool GetKey(const std::string& username, const std::string& realm, - std::string* key) { - return ComputeStunCredentialHash(username, realm, username, key); - } - - TurnServer server_; - rtc::Thread* thread_; -}; - -} // namespace cricket - -#endif // WEBRTC_P2P_BASE_TESTTURNSERVER_H_ diff --git a/WebRtc.NET/include/webrtc/p2p/base/transport.h b/WebRtc.NET/include/webrtc/p2p/base/transport.h deleted file mode 100644 index 0921a41a..00000000 --- a/WebRtc.NET/include/webrtc/p2p/base/transport.h +++ /dev/null @@ -1,19 +0,0 @@ -/* - * Copyright 2016 The WebRTC Project Authors. All rights reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -// Most of the contents of this header have moved to jseptransport.h. -// TODO(deadbeef): Delete this file when downstream dependents are updated. - -#ifndef WEBRTC_P2P_BASE_TRANSPORT_H_ -#define WEBRTC_P2P_BASE_TRANSPORT_H_ - -#include "webrtc/p2p/base/transport.h" - -#endif // WEBRTC_P2P_BASE_TRANSPORT_H_ diff --git a/WebRtc.NET/include/webrtc/p2p/base/transportchannelimpl.h b/WebRtc.NET/include/webrtc/p2p/base/transportchannelimpl.h deleted file mode 100644 index f72cb2d1..00000000 --- a/WebRtc.NET/include/webrtc/p2p/base/transportchannelimpl.h +++ /dev/null @@ -1,123 +0,0 @@ -/* - * Copyright 2004 The WebRTC Project Authors. All rights reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_P2P_BASE_TRANSPORTCHANNELIMPL_H_ -#define WEBRTC_P2P_BASE_TRANSPORTCHANNELIMPL_H_ - -#include - -#include "webrtc/base/constructormagic.h" -#include "webrtc/p2p/base/icetransportinternal.h" -#include "webrtc/p2p/base/transportchannel.h" - -namespace webrtc { -class MetricsObserverInterface; -} - -namespace cricket { - -class Candidate; - -// Base class for real implementations of TransportChannel. This includes some -// methods called only by Transport, which do not need to be exposed to the -// client. -class TransportChannelImpl : public TransportChannel { - public: - explicit TransportChannelImpl(const std::string& transport_name, - int component) - : TransportChannel(transport_name, component) {} - - // For ICE channels. - virtual IceRole GetIceRole() const = 0; - virtual void SetIceRole(IceRole role) = 0; - virtual void SetIceTiebreaker(uint64_t tiebreaker) = 0; - // TODO(pthatcher): Remove this once it's no longer called in - // remoting/protocol/libjingle_transport_factory.cc - virtual void SetIceProtocolType(IceProtocolType type) {} - // TODO(honghaiz): Remove this once the call in chromoting is removed. - virtual void SetIceCredentials(const std::string& ice_ufrag, - const std::string& ice_pwd) { - SetIceParameters(IceParameters(ice_ufrag, ice_pwd, false)); - } - // TODO(honghaiz): Remove this once the call in chromoting is removed. - virtual void SetRemoteIceCredentials(const std::string& ice_ufrag, - const std::string& ice_pwd) { - SetRemoteIceParameters(IceParameters(ice_ufrag, ice_pwd, false)); - } - - // SetIceParameters only needs to be implemented by the ICE transport - // channels. Non-ICE transport channels should pass them down to the inner - // ICE transport channel. The ufrag and pwd in |ice_params| must be set - // before candidate gathering can start. - virtual void SetIceParameters(const IceParameters& ice_params) = 0; - // SetRemoteIceParameters only needs to be implemented by the ICE transport - // channels. Non-ICE transport channels should pass them down to the inner - // ICE transport channel. - virtual void SetRemoteIceParameters(const IceParameters& ice_params) = 0; - - // SetRemoteIceMode must be implemented only by the ICE transport channels. - virtual void SetRemoteIceMode(IceMode mode) = 0; - - virtual void SetIceConfig(const IceConfig& config) = 0; - - // Start gathering candidates if not already started, or if an ICE restart - // occurred. - virtual void MaybeStartGathering() = 0; - - virtual void SetMetricsObserver( - webrtc::MetricsObserverInterface* observer) = 0; - - sigslot::signal1 SignalGatheringState; - - // Handles sending and receiving of candidates. The Transport - // receives the candidates and may forward them to the relevant - // channel. - // - // Note: Since candidates are delivered asynchronously to the - // channel, they cannot return an error if the message is invalid. - // It is assumed that the Transport will have checked validity - // before forwarding. - sigslot::signal2 - SignalCandidateGathered; - sigslot::signal2 - SignalCandidatesRemoved; - virtual void AddRemoteCandidate(const Candidate& candidate) = 0; - virtual void RemoveRemoteCandidate(const Candidate& candidate) = 0; - - virtual IceGatheringState gathering_state() const = 0; - - // DTLS methods - virtual bool SetLocalCertificate( - const rtc::scoped_refptr& certificate) = 0; - - // Set DTLS Remote fingerprint. Must be after local identity set. - virtual bool SetRemoteFingerprint(const std::string& digest_alg, - const uint8_t* digest, - size_t digest_len) = 0; - - virtual bool SetSslRole(rtc::SSLRole role) = 0; - - // Invoked when there is conflict in the ICE role between local and remote - // agents. - sigslot::signal1 SignalRoleConflict; - - // Emitted whenever the transport channel state changed. - sigslot::signal1 SignalStateChanged; - - // Emitted whenever the Dtls handshake failed on some transport channel. - sigslot::signal1 SignalDtlsHandshakeError; - - private: - RTC_DISALLOW_COPY_AND_ASSIGN(TransportChannelImpl); -}; - -} // namespace cricket - -#endif // WEBRTC_P2P_BASE_TRANSPORTCHANNELIMPL_H_ diff --git a/WebRtc.NET/include/webrtc/p2p/base/transportcontroller.h b/WebRtc.NET/include/webrtc/p2p/base/transportcontroller.h deleted file mode 100644 index 33306c71..00000000 --- a/WebRtc.NET/include/webrtc/p2p/base/transportcontroller.h +++ /dev/null @@ -1,278 +0,0 @@ -/* - * Copyright 2015 The WebRTC Project Authors. All rights reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_P2P_BASE_TRANSPORTCONTROLLER_H_ -#define WEBRTC_P2P_BASE_TRANSPORTCONTROLLER_H_ - -#include -#include -#include -#include - -#include "webrtc/base/asyncinvoker.h" -#include "webrtc/base/constructormagic.h" -#include "webrtc/base/refcountedobject.h" -#include "webrtc/base/sigslot.h" -#include "webrtc/base/sslstreamadapter.h" -#include "webrtc/p2p/base/candidate.h" -#include "webrtc/p2p/base/dtlstransportchannel.h" -#include "webrtc/p2p/base/jseptransport.h" -#include "webrtc/p2p/base/p2ptransportchannel.h" - -namespace rtc { -class Thread; -class PacketTransportInterface; -} -namespace webrtc { -class MetricsObserverInterface; -} - -namespace cricket { - -class TransportController : public sigslot::has_slots<>, - public rtc::MessageHandler { - public: - // If |redetermine_role_on_ice_restart| is true, ICE role is redetermined - // upon setting a local transport description that indicates an ICE restart. - // For the constructor that doesn't take this parameter, it defaults to true. - TransportController(rtc::Thread* signaling_thread, - rtc::Thread* network_thread, - PortAllocator* port_allocator, - bool redetermine_role_on_ice_restart); - - TransportController(rtc::Thread* signaling_thread, - rtc::Thread* network_thread, - PortAllocator* port_allocator); - - virtual ~TransportController(); - - rtc::Thread* signaling_thread() const { return signaling_thread_; } - rtc::Thread* network_thread() const { return network_thread_; } - - PortAllocator* port_allocator() const { return port_allocator_; } - - // Can only be set before transports are created. - // TODO(deadbeef): Make this an argument to the constructor once BaseSession - // and WebRtcSession are combined - bool SetSslMaxProtocolVersion(rtc::SSLProtocolVersion version); - - void SetIceConfig(const IceConfig& config); - void SetIceRole(IceRole ice_role); - - // Set the "needs-ice-restart" flag as described in JSEP. After the flag is - // set, offers should generate new ufrags/passwords until an ICE restart - // occurs. - void SetNeedsIceRestartFlag(); - // Returns true if the ICE restart flag above was set, and no ICE restart has - // occurred yet for this transport (by applying a local description with - // changed ufrag/password). If the transport has been deleted as a result of - // bundling, returns false. - bool NeedsIceRestart(const std::string& transport_name) const; - - bool GetSslRole(const std::string& transport_name, rtc::SSLRole* role) const; - - // Specifies the identity to use in this session. - // Can only be called once. - bool SetLocalCertificate( - const rtc::scoped_refptr& certificate); - bool GetLocalCertificate( - const std::string& transport_name, - rtc::scoped_refptr* certificate) const; - // Caller owns returned certificate. This method mainly exists for stats - // reporting. - std::unique_ptr GetRemoteSSLCertificate( - const std::string& transport_name) const; - bool SetLocalTransportDescription(const std::string& transport_name, - const TransportDescription& tdesc, - ContentAction action, - std::string* err); - bool SetRemoteTransportDescription(const std::string& transport_name, - const TransportDescription& tdesc, - ContentAction action, - std::string* err); - // Start gathering candidates for any new transports, or transports doing an - // ICE restart. - void MaybeStartGathering(); - bool AddRemoteCandidates(const std::string& transport_name, - const Candidates& candidates, - std::string* err); - bool RemoveRemoteCandidates(const Candidates& candidates, std::string* err); - bool ReadyForRemoteCandidates(const std::string& transport_name) const; - // TODO(deadbeef): GetStats isn't const because all the way down to - // OpenSSLStreamAdapter, - // GetSslCipherSuite and GetDtlsSrtpCryptoSuite are not const. Fix this. - bool GetStats(const std::string& transport_name, TransportStats* stats); - void SetMetricsObserver(webrtc::MetricsObserverInterface* metrics_observer); - - // Creates a channel if it doesn't exist. Otherwise, increments a reference - // count and returns an existing channel. - DtlsTransportInternal* CreateDtlsTransport(const std::string& transport_name, - int component); - virtual DtlsTransportInternal* CreateDtlsTransport_n( - const std::string& transport_name, - int component); - - // Decrements a channel's reference count, and destroys the channel if - // nothing is referencing it. - virtual void DestroyDtlsTransport(const std::string& transport_name, - int component); - virtual void DestroyDtlsTransport_n(const std::string& transport_name, - int component); - - void use_quic() { quic_ = true; } - bool quic() const { return quic_; } - - // TODO(deadbeef): Remove all for_testing methods! - const rtc::scoped_refptr& certificate_for_testing() - const { - return certificate_; - } - std::vector transport_names_for_testing(); - std::vector channels_for_testing(); - DtlsTransportInternal* get_channel_for_testing( - const std::string& transport_name, - int component); - - // All of these signals are fired on the signalling thread. - - // If any transport failed => failed, - // Else if all completed => completed, - // Else if all connected => connected, - // Else => connecting - sigslot::signal1 SignalConnectionState; - - // Receiving if any transport is receiving - sigslot::signal1 SignalReceiving; - - // If all transports done gathering => complete, - // Else if any are gathering => gathering, - // Else => new - sigslot::signal1 SignalGatheringState; - - // (transport_name, candidates) - sigslot::signal2 - SignalCandidatesGathered; - - sigslot::signal1 SignalCandidatesRemoved; - - sigslot::signal1 SignalDtlsHandshakeError; - - protected: - // TODO(deadbeef): Get rid of these virtual methods. Used by - // FakeTransportController currently, but FakeTransportController shouldn't - // even be functioning by subclassing TransportController. - virtual IceTransportInternal* CreateIceTransportChannel_n( - const std::string& transport_name, - int component); - virtual DtlsTransportInternal* CreateDtlsTransportChannel_n( - const std::string& transport_name, - int component, - IceTransportInternal* ice); - - private: - void OnMessage(rtc::Message* pmsg) override; - - class ChannelPair; - typedef rtc::RefCountedObject RefCountedChannel; - - // Helper functions to get a channel or transport, or iterator to it (in case - // it needs to be erased). - std::vector::iterator GetChannelIterator_n( - const std::string& transport_name, - int component); - std::vector::const_iterator GetChannelIterator_n( - const std::string& transport_name, - int component) const; - const JsepTransport* GetJsepTransport( - const std::string& transport_name) const; - JsepTransport* GetJsepTransport(const std::string& transport_name); - const RefCountedChannel* GetChannel_n(const std::string& transport_name, - int component) const; - RefCountedChannel* GetChannel_n(const std::string& transport_name, - int component); - - JsepTransport* GetOrCreateJsepTransport(const std::string& transport_name); - void DestroyAllChannels_n(); - - bool SetSslMaxProtocolVersion_n(rtc::SSLProtocolVersion version); - void SetIceConfig_n(const IceConfig& config); - void SetIceRole_n(IceRole ice_role); - bool GetSslRole_n(const std::string& transport_name, - rtc::SSLRole* role) const; - bool SetLocalCertificate_n( - const rtc::scoped_refptr& certificate); - bool GetLocalCertificate_n( - const std::string& transport_name, - rtc::scoped_refptr* certificate) const; - std::unique_ptr GetRemoteSSLCertificate_n( - const std::string& transport_name) const; - bool SetLocalTransportDescription_n(const std::string& transport_name, - const TransportDescription& tdesc, - ContentAction action, - std::string* err); - bool SetRemoteTransportDescription_n(const std::string& transport_name, - const TransportDescription& tdesc, - ContentAction action, - std::string* err); - void MaybeStartGathering_n(); - bool AddRemoteCandidates_n(const std::string& transport_name, - const Candidates& candidates, - std::string* err); - bool RemoveRemoteCandidates_n(const Candidates& candidates, std::string* err); - bool ReadyForRemoteCandidates_n(const std::string& transport_name) const; - bool GetStats_n(const std::string& transport_name, TransportStats* stats); - void SetMetricsObserver_n(webrtc::MetricsObserverInterface* metrics_observer); - - // Handlers for signals from Transport. - void OnChannelWritableState_n(rtc::PacketTransportInterface* transport); - void OnChannelReceivingState_n(rtc::PacketTransportInterface* transport); - void OnChannelGatheringState_n(IceTransportInternal* channel); - void OnChannelCandidateGathered_n(IceTransportInternal* channel, - const Candidate& candidate); - void OnChannelCandidatesRemoved(const Candidates& candidates); - void OnChannelCandidatesRemoved_n(IceTransportInternal* channel, - const Candidates& candidates); - void OnChannelRoleConflict_n(IceTransportInternal* channel); - void OnChannelStateChanged_n(IceTransportInternal* channel); - - void UpdateAggregateStates_n(); - - void OnDtlsHandshakeError(rtc::SSLHandshakeError error); - - rtc::Thread* const signaling_thread_ = nullptr; - rtc::Thread* const network_thread_ = nullptr; - PortAllocator* const port_allocator_ = nullptr; - - std::map> transports_; - std::vector channels_; - - // Aggregate state for TransportChannelImpls. - IceConnectionState connection_state_ = kIceConnectionConnecting; - bool receiving_ = false; - IceGatheringState gathering_state_ = kIceGatheringNew; - - IceConfig ice_config_; - IceRole ice_role_ = ICEROLE_CONTROLLING; - bool redetermine_role_on_ice_restart_; - uint64_t ice_tiebreaker_ = rtc::CreateRandomId64(); - rtc::SSLProtocolVersion ssl_max_version_ = rtc::SSL_PROTOCOL_DTLS_12; - rtc::scoped_refptr certificate_; - rtc::AsyncInvoker invoker_; - // True if QUIC is used instead of DTLS. - bool quic_ = false; - - webrtc::MetricsObserverInterface* metrics_observer_ = nullptr; - - RTC_DISALLOW_COPY_AND_ASSIGN(TransportController); -}; - -} // namespace cricket - -#endif // WEBRTC_P2P_BASE_TRANSPORTCONTROLLER_H_ diff --git a/WebRtc.NET/include/webrtc/p2p/base/transportdescription.h b/WebRtc.NET/include/webrtc/p2p/base/transportdescription.h deleted file mode 100644 index e7f9263b..00000000 --- a/WebRtc.NET/include/webrtc/p2p/base/transportdescription.h +++ /dev/null @@ -1,175 +0,0 @@ -/* - * Copyright 2012 The WebRTC Project Authors. All rights reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_P2P_BASE_TRANSPORTDESCRIPTION_H_ -#define WEBRTC_P2P_BASE_TRANSPORTDESCRIPTION_H_ - -#include -#include -#include -#include - -#include "webrtc/p2p/base/p2pconstants.h" -#include "webrtc/base/sslfingerprint.h" - -namespace cricket { - -// SEC_ENABLED and SEC_REQUIRED should only be used if the session -// was negotiated over TLS, to protect the inline crypto material -// exchange. -// SEC_DISABLED: No crypto in outgoing offer, ignore any supplied crypto. -// SEC_ENABLED: Crypto in outgoing offer and answer (if supplied in offer). -// SEC_REQUIRED: Crypto in outgoing offer and answer. Fail any offer with absent -// or unsupported crypto. -// TODO(deadbeef): Remove this or rename it to something more appropriate, like -// SdesPolicy. -enum SecurePolicy { - SEC_DISABLED, - SEC_ENABLED, - SEC_REQUIRED -}; - -// Whether our side of the call is driving the negotiation, or the other side. -enum IceRole { - ICEROLE_CONTROLLING = 0, - ICEROLE_CONTROLLED, - ICEROLE_UNKNOWN -}; - -// ICE RFC 5245 implementation type. -enum IceMode { - ICEMODE_FULL, // As defined in http://tools.ietf.org/html/rfc5245#section-4.1 - ICEMODE_LITE // As defined in http://tools.ietf.org/html/rfc5245#section-4.2 -}; - -// RFC 4145 - http://tools.ietf.org/html/rfc4145#section-4 -// 'active': The endpoint will initiate an outgoing connection. -// 'passive': The endpoint will accept an incoming connection. -// 'actpass': The endpoint is willing to accept an incoming -// connection or to initiate an outgoing connection. -enum ConnectionRole { - CONNECTIONROLE_NONE = 0, - CONNECTIONROLE_ACTIVE, - CONNECTIONROLE_PASSIVE, - CONNECTIONROLE_ACTPASS, - CONNECTIONROLE_HOLDCONN, -}; - -struct IceParameters { - // TODO(honghaiz): Include ICE mode in this structure to match the ORTC - // struct: - // http://ortc.org/wp-content/uploads/2016/03/ortc.html#idl-def-RTCIceParameters - std::string ufrag; - std::string pwd; - bool renomination = false; - IceParameters() = default; - IceParameters(const std::string& ice_ufrag, - const std::string& ice_pwd, - bool ice_renomination) - : ufrag(ice_ufrag), pwd(ice_pwd), renomination(ice_renomination) {} - - bool operator==(const IceParameters& other) { - return ufrag == other.ufrag && pwd == other.pwd && - renomination == other.renomination; - } - bool operator!=(const IceParameters& other) { return !(*this == other); } -}; - -extern const char CONNECTIONROLE_ACTIVE_STR[]; -extern const char CONNECTIONROLE_PASSIVE_STR[]; -extern const char CONNECTIONROLE_ACTPASS_STR[]; -extern const char CONNECTIONROLE_HOLDCONN_STR[]; - -constexpr auto ICE_RENOMINATION_STR = "renomination"; - -bool StringToConnectionRole(const std::string& role_str, ConnectionRole* role); -bool ConnectionRoleToString(const ConnectionRole& role, std::string* role_str); - -struct TransportDescription { - TransportDescription() - : ice_mode(ICEMODE_FULL), - connection_role(CONNECTIONROLE_NONE) {} - - TransportDescription(const std::vector& transport_options, - const std::string& ice_ufrag, - const std::string& ice_pwd, - IceMode ice_mode, - ConnectionRole role, - const rtc::SSLFingerprint* identity_fingerprint) - : transport_options(transport_options), - ice_ufrag(ice_ufrag), - ice_pwd(ice_pwd), - ice_mode(ice_mode), - connection_role(role), - identity_fingerprint(CopyFingerprint(identity_fingerprint)) {} - TransportDescription(const std::string& ice_ufrag, - const std::string& ice_pwd) - : ice_ufrag(ice_ufrag), - ice_pwd(ice_pwd), - ice_mode(ICEMODE_FULL), - connection_role(CONNECTIONROLE_NONE) {} - TransportDescription(const TransportDescription& from) - : transport_options(from.transport_options), - ice_ufrag(from.ice_ufrag), - ice_pwd(from.ice_pwd), - ice_mode(from.ice_mode), - connection_role(from.connection_role), - identity_fingerprint(CopyFingerprint(from.identity_fingerprint.get())) { - } - - TransportDescription& operator=(const TransportDescription& from) { - // Self-assignment - if (this == &from) - return *this; - - transport_options = from.transport_options; - ice_ufrag = from.ice_ufrag; - ice_pwd = from.ice_pwd; - ice_mode = from.ice_mode; - connection_role = from.connection_role; - - identity_fingerprint.reset(CopyFingerprint( - from.identity_fingerprint.get())); - return *this; - } - - bool HasOption(const std::string& option) const { - return (std::find(transport_options.begin(), transport_options.end(), - option) != transport_options.end()); - } - void AddOption(const std::string& option) { - transport_options.push_back(option); - } - bool secure() const { return identity_fingerprint != NULL; } - - IceParameters GetIceParameters() { - return IceParameters(ice_ufrag, ice_pwd, HasOption(ICE_RENOMINATION_STR)); - } - - static rtc::SSLFingerprint* CopyFingerprint( - const rtc::SSLFingerprint* from) { - if (!from) - return NULL; - - return new rtc::SSLFingerprint(*from); - } - - std::vector transport_options; - std::string ice_ufrag; - std::string ice_pwd; - IceMode ice_mode; - ConnectionRole connection_role; - - std::unique_ptr identity_fingerprint; -}; - -} // namespace cricket - -#endif // WEBRTC_P2P_BASE_TRANSPORTDESCRIPTION_H_ diff --git a/WebRtc.NET/include/webrtc/p2p/base/transportdescriptionfactory.h b/WebRtc.NET/include/webrtc/p2p/base/transportdescriptionfactory.h deleted file mode 100644 index 2dde5b12..00000000 --- a/WebRtc.NET/include/webrtc/p2p/base/transportdescriptionfactory.h +++ /dev/null @@ -1,71 +0,0 @@ -/* - * Copyright 2012 The WebRTC Project Authors. All rights reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_P2P_BASE_TRANSPORTDESCRIPTIONFACTORY_H_ -#define WEBRTC_P2P_BASE_TRANSPORTDESCRIPTIONFACTORY_H_ - -#include "webrtc/base/rtccertificate.h" -#include "webrtc/p2p/base/transportdescription.h" - -namespace rtc { -class SSLIdentity; -} - -namespace cricket { - -struct TransportOptions { - bool ice_restart = false; - bool prefer_passive_role = false; - // If true, ICE renomination is supported and will be used if it is also - // supported by the remote side. - bool enable_ice_renomination = false; -}; - -// Creates transport descriptions according to the supplied configuration. -// When creating answers, performs the appropriate negotiation -// of the various fields to determine the proper result. -class TransportDescriptionFactory { - public: - // Default ctor; use methods below to set configuration. - TransportDescriptionFactory(); - SecurePolicy secure() const { return secure_; } - // The certificate to use when setting up DTLS. - const rtc::scoped_refptr& certificate() const { - return certificate_; - } - - // Specifies the transport security policy to use. - void set_secure(SecurePolicy s) { secure_ = s; } - // Specifies the certificate to use (only used when secure != SEC_DISABLED). - void set_certificate( - const rtc::scoped_refptr& certificate) { - certificate_ = certificate; - } - - // Creates a transport description suitable for use in an offer. - TransportDescription* CreateOffer(const TransportOptions& options, - const TransportDescription* current_description) const; - // Create a transport description that is a response to an offer. - TransportDescription* CreateAnswer( - const TransportDescription* offer, - const TransportOptions& options, - const TransportDescription* current_description) const; - - private: - bool SetSecurityInfo(TransportDescription* description, - ConnectionRole role) const; - - SecurePolicy secure_; - rtc::scoped_refptr certificate_; -}; - -} // namespace cricket - -#endif // WEBRTC_P2P_BASE_TRANSPORTDESCRIPTIONFACTORY_H_ diff --git a/WebRtc.NET/include/webrtc/p2p/base/transportinfo.h b/WebRtc.NET/include/webrtc/p2p/base/transportinfo.h deleted file mode 100644 index 504eb23b..00000000 --- a/WebRtc.NET/include/webrtc/p2p/base/transportinfo.h +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright 2012 The WebRTC Project Authors. All rights reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_P2P_BASE_TRANSPORTINFO_H_ -#define WEBRTC_P2P_BASE_TRANSPORTINFO_H_ - -#include -#include - -#include "webrtc/p2p/base/candidate.h" -#include "webrtc/p2p/base/p2pconstants.h" -#include "webrtc/p2p/base/transportdescription.h" -#include "webrtc/base/helpers.h" - -namespace cricket { - -// A TransportInfo is NOT a transport-info message. It is comparable -// to a "ContentInfo". A transport-infos message is basically just a -// collection of TransportInfos. -struct TransportInfo { - TransportInfo() {} - - TransportInfo(const std::string& content_name, - const TransportDescription& description) - : content_name(content_name), - description(description) {} - - std::string content_name; - TransportDescription description; -}; - -typedef std::vector TransportInfos; - -} // namespace cricket - -#endif // WEBRTC_P2P_BASE_TRANSPORTINFO_H_ diff --git a/WebRtc.NET/include/webrtc/p2p/base/turnport.h b/WebRtc.NET/include/webrtc/p2p/base/turnport.h deleted file mode 100644 index b4214536..00000000 --- a/WebRtc.NET/include/webrtc/p2p/base/turnport.h +++ /dev/null @@ -1,300 +0,0 @@ -/* - * Copyright 2012 The WebRTC Project Authors. All rights reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_P2P_BASE_TURNPORT_H_ -#define WEBRTC_P2P_BASE_TURNPORT_H_ - -#include -#include -#include -#include - -#include "webrtc/base/asyncinvoker.h" -#include "webrtc/base/asyncpacketsocket.h" -#include "webrtc/p2p/base/port.h" -#include "webrtc/p2p/client/basicportallocator.h" - -namespace rtc { -class AsyncResolver; -class SignalThread; -} - -namespace cricket { - -extern const char TURN_PORT_TYPE[]; -class TurnAllocateRequest; -class TurnEntry; - -class TurnPort : public Port { - public: - enum PortState { - STATE_CONNECTING, // Initial state, cannot send any packets. - STATE_CONNECTED, // Socket connected, ready to send stun requests. - STATE_READY, // Received allocate success, can send any packets. - STATE_RECEIVEONLY, // Had REFRESH_REQUEST error, cannot send any packets. - STATE_DISCONNECTED, // TCP connection died, cannot send/receive any - // packets. - }; - static TurnPort* Create(rtc::Thread* thread, - rtc::PacketSocketFactory* factory, - rtc::Network* network, - rtc::AsyncPacketSocket* socket, - const std::string& username, // ice username. - const std::string& password, // ice password. - const ProtocolAddress& server_address, - const RelayCredentials& credentials, - int server_priority, - const std::string& origin) { - return new TurnPort(thread, factory, network, socket, username, password, - server_address, credentials, server_priority, origin); - } - - static TurnPort* Create(rtc::Thread* thread, - rtc::PacketSocketFactory* factory, - rtc::Network* network, - const rtc::IPAddress& ip, - uint16_t min_port, - uint16_t max_port, - const std::string& username, // ice username. - const std::string& password, // ice password. - const ProtocolAddress& server_address, - const RelayCredentials& credentials, - int server_priority, - const std::string& origin) { - return new TurnPort(thread, factory, network, ip, min_port, max_port, - username, password, server_address, credentials, - server_priority, origin); - } - - virtual ~TurnPort(); - - const ProtocolAddress& server_address() const { return server_address_; } - // Returns an empty address if the local address has not been assigned. - rtc::SocketAddress GetLocalAddress() const; - - bool ready() const { return state_ == STATE_READY; } - bool connected() const { - return state_ == STATE_READY || state_ == STATE_CONNECTED; - } - const RelayCredentials& credentials() const { return credentials_; } - - virtual ProtocolType GetProtocol() const { return server_address_.proto; } - - virtual TlsCertPolicy GetTlsCertPolicy() const { return tls_cert_policy_; } - - virtual void SetTlsCertPolicy(TlsCertPolicy tls_cert_policy) { - tls_cert_policy_ = tls_cert_policy; - } - - virtual void PrepareAddress(); - virtual Connection* CreateConnection( - const Candidate& c, PortInterface::CandidateOrigin origin); - virtual int SendTo(const void* data, size_t size, - const rtc::SocketAddress& addr, - const rtc::PacketOptions& options, - bool payload); - virtual int SetOption(rtc::Socket::Option opt, int value); - virtual int GetOption(rtc::Socket::Option opt, int* value); - virtual int GetError(); - - virtual bool HandleIncomingPacket(rtc::AsyncPacketSocket* socket, - const char* data, size_t size, - const rtc::SocketAddress& remote_addr, - const rtc::PacketTime& packet_time); - virtual void OnReadPacket(rtc::AsyncPacketSocket* socket, - const char* data, size_t size, - const rtc::SocketAddress& remote_addr, - const rtc::PacketTime& packet_time); - - virtual void OnSentPacket(rtc::AsyncPacketSocket* socket, - const rtc::SentPacket& sent_packet); - virtual void OnReadyToSend(rtc::AsyncPacketSocket* socket); - virtual bool SupportsProtocol(const std::string& protocol) const { - // Turn port only connects to UDP candidates. - return protocol == UDP_PROTOCOL_NAME; - } - - void OnSocketConnect(rtc::AsyncPacketSocket* socket); - void OnSocketClose(rtc::AsyncPacketSocket* socket, int error); - - - const std::string& hash() const { return hash_; } - const std::string& nonce() const { return nonce_; } - - int error() const { return error_; } - - void OnAllocateMismatch(); - - rtc::AsyncPacketSocket* socket() const { - return socket_; - } - - // For testing only. - rtc::AsyncInvoker* invoker() { return &invoker_; } - - // Signal with resolved server address. - // Parameters are port, server address and resolved server address. - // This signal will be sent only if server address is resolved successfully. - sigslot::signal3 SignalResolvedServerAddress; - - // All public methods/signals below are for testing only. - sigslot::signal2 SignalTurnRefreshResult; - sigslot::signal3 - SignalCreatePermissionResult; - void FlushRequests(int msg_type) { request_manager_.Flush(msg_type); } - bool HasRequests() { return !request_manager_.empty(); } - void set_credentials(RelayCredentials& credentials) { - credentials_ = credentials; - } - // Finds the turn entry with |address| and sets its channel id. - // Returns true if the entry is found. - bool SetEntryChannelId(const rtc::SocketAddress& address, int channel_id); - // Visible for testing. - // Shuts down the turn port, usually because of some fatal errors. - void Close(); - - protected: - TurnPort(rtc::Thread* thread, - rtc::PacketSocketFactory* factory, - rtc::Network* network, - rtc::AsyncPacketSocket* socket, - const std::string& username, - const std::string& password, - const ProtocolAddress& server_address, - const RelayCredentials& credentials, - int server_priority, - const std::string& origin); - - TurnPort(rtc::Thread* thread, - rtc::PacketSocketFactory* factory, - rtc::Network* network, - const rtc::IPAddress& ip, - uint16_t min_port, - uint16_t max_port, - const std::string& username, - const std::string& password, - const ProtocolAddress& server_address, - const RelayCredentials& credentials, - int server_priority, - const std::string& origin); - - private: - enum { - MSG_ALLOCATE_ERROR = MSG_FIRST_AVAILABLE, - MSG_ALLOCATE_MISMATCH, - MSG_TRY_ALTERNATE_SERVER, - MSG_REFRESH_ERROR - }; - - typedef std::list EntryList; - typedef std::map SocketOptionsMap; - typedef std::set AttemptedServerSet; - - virtual void OnMessage(rtc::Message* pmsg); - virtual void HandleConnectionDestroyed(Connection* conn); - - bool CreateTurnClientSocket(); - - void set_nonce(const std::string& nonce) { nonce_ = nonce; } - void set_realm(const std::string& realm) { - if (realm != realm_) { - realm_ = realm; - UpdateHash(); - } - } - - void OnRefreshError(); - void HandleRefreshError(); - bool SetAlternateServer(const rtc::SocketAddress& address); - void ResolveTurnAddress(const rtc::SocketAddress& address); - void OnResolveResult(rtc::AsyncResolverInterface* resolver); - - void AddRequestAuthInfo(StunMessage* msg); - void OnSendStunPacket(const void* data, size_t size, StunRequest* request); - // Stun address from allocate success response. - // Currently used only for testing. - void OnStunAddress(const rtc::SocketAddress& address); - void OnAllocateSuccess(const rtc::SocketAddress& address, - const rtc::SocketAddress& stun_address); - void OnAllocateError(); - void OnAllocateRequestTimeout(); - - void HandleDataIndication(const char* data, size_t size, - const rtc::PacketTime& packet_time); - void HandleChannelData(int channel_id, const char* data, size_t size, - const rtc::PacketTime& packet_time); - void DispatchPacket(const char* data, size_t size, - const rtc::SocketAddress& remote_addr, - ProtocolType proto, const rtc::PacketTime& packet_time); - - bool ScheduleRefresh(int lifetime); - void SendRequest(StunRequest* request, int delay); - int Send(const void* data, size_t size, - const rtc::PacketOptions& options); - void UpdateHash(); - bool UpdateNonce(StunMessage* response); - void ResetNonce(); - - bool HasPermission(const rtc::IPAddress& ipaddr) const; - TurnEntry* FindEntry(const rtc::SocketAddress& address) const; - TurnEntry* FindEntry(int channel_id) const; - bool EntryExists(TurnEntry* e); - void CreateOrRefreshEntry(const rtc::SocketAddress& address); - void DestroyEntry(TurnEntry* entry); - // Destroys the entry only if |timestamp| matches the destruction timestamp - // in |entry|. - void DestroyEntryIfNotCancelled(TurnEntry* entry, int64_t timestamp); - void ScheduleEntryDestruction(TurnEntry* entry); - void CancelEntryDestruction(TurnEntry* entry); - - // Marks the connection with remote address |address| failed and - // pruned (a.k.a. write-timed-out). Returns true if a connection is found. - bool FailAndPruneConnection(const rtc::SocketAddress& address); - - ProtocolAddress server_address_; - TlsCertPolicy tls_cert_policy_ = TlsCertPolicy::TLS_CERT_POLICY_SECURE; - RelayCredentials credentials_; - AttemptedServerSet attempted_server_addresses_; - - rtc::AsyncPacketSocket* socket_; - SocketOptionsMap socket_options_; - rtc::AsyncResolverInterface* resolver_; - int error_; - - StunRequestManager request_manager_; - std::string realm_; // From 401/438 response message. - std::string nonce_; // From 401/438 response message. - std::string hash_; // Digest of username:realm:password - - int next_channel_number_; - EntryList entries_; - - PortState state_; - // By default the value will be set to 0. This value will be used in - // calculating the candidate priority. - int server_priority_; - - // The number of retries made due to allocate mismatch error. - size_t allocate_mismatch_retries_; - - rtc::AsyncInvoker invoker_; - - friend class TurnEntry; - friend class TurnAllocateRequest; - friend class TurnRefreshRequest; - friend class TurnCreatePermissionRequest; - friend class TurnChannelBindRequest; -}; - -} // namespace cricket - -#endif // WEBRTC_P2P_BASE_TURNPORT_H_ diff --git a/WebRtc.NET/include/webrtc/p2p/base/udptransport.h b/WebRtc.NET/include/webrtc/p2p/base/udptransport.h deleted file mode 100644 index 126e9e2b..00000000 --- a/WebRtc.NET/include/webrtc/p2p/base/udptransport.h +++ /dev/null @@ -1,85 +0,0 @@ -/* - * Copyright 2016 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_P2P_BASE_UDPTRANSPORT_H_ -#define WEBRTC_P2P_BASE_UDPTRANSPORT_H_ - -#include -#include - -#include "webrtc/api/udptransportinterface.h" -#include "webrtc/base/asyncpacketsocket.h" // For PacketOptions. -#include "webrtc/base/optional.h" -#include "webrtc/base/thread_checker.h" -#include "webrtc/p2p/base/packettransportinterface.h" - -namespace rtc { -class AsyncPacketSocket; -struct PacketTime; -struct SentPacket; -class SocketAddress; -} - -namespace cricket { - -// Implementation of UdpTransportInterface. -// Used by OrtcFactory. -class UdpTransport : public webrtc::UdpTransportInterface, - public rtc::PacketTransportInterface { - public: - // |transport_name| is only used for identification/logging. - // |socket| must be non-null. - UdpTransport(const std::string& transport_name, - std::unique_ptr socket); - ~UdpTransport(); - - // Overrides of UdpTransportInterface, used by the API consumer. - rtc::SocketAddress GetLocalAddress() const override; - bool SetRemoteAddress(const rtc::SocketAddress& addr) override; - rtc::SocketAddress GetRemoteAddress() const override; - - // Overrides of PacketTransportInterface, used by webrtc internally. - std::string debug_name() const override { return transport_name_; } - - bool receiving() const override { - // TODO(johan): Implement method and signal. - return true; - } - - bool writable() const override; - - int SendPacket(const char* data, - size_t len, - const rtc::PacketOptions& options, - int flags) override; - - int SetOption(rtc::Socket::Option opt, int value) override { return 0; } - - int GetError() override { return send_error_; } - - private: - void OnSocketReadPacket(rtc::AsyncPacketSocket* socket, - const char* data, - size_t len, - const rtc::SocketAddress& remote_addr, - const rtc::PacketTime& packet_time); - void OnSocketSentPacket(rtc::AsyncPacketSocket* socket, - const rtc::SentPacket& packet); - bool IsLocalConsistent(); - std::string transport_name_; - int send_error_ = 0; - std::unique_ptr socket_; - // If not set, will be an "nil" address ("IsNil" returns true). - rtc::SocketAddress remote_address_; - rtc::ThreadChecker network_thread_checker_; -}; -} // namespace cricket - -#endif // WEBRTC_P2P_BASE_UDPTRANSPORT_H_ diff --git a/WebRtc.NET/include/webrtc/p2p/client/socketmonitor.h b/WebRtc.NET/include/webrtc/p2p/client/socketmonitor.h deleted file mode 100644 index b13be747..00000000 --- a/WebRtc.NET/include/webrtc/p2p/client/socketmonitor.h +++ /dev/null @@ -1,62 +0,0 @@ -/* - * Copyright 2004 The WebRTC Project Authors. All rights reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_P2P_CLIENT_SOCKETMONITOR_H_ -#define WEBRTC_P2P_CLIENT_SOCKETMONITOR_H_ - -#include - -#include "webrtc/base/criticalsection.h" -#include "webrtc/base/sigslot.h" -#include "webrtc/base/thread.h" -#include "webrtc/p2p/base/jseptransport.h" // for ConnectionInfos - -// TODO(pthatcher): Move these to connectionmonitor.h and -// connectionmonitor.cc, or just move them into channel.cc - -namespace cricket { - -class ConnectionStatsGetter { - public: - virtual ~ConnectionStatsGetter() {} - virtual bool GetConnectionStats(ConnectionInfos* infos) = 0; -}; - -class ConnectionMonitor : public rtc::MessageHandler, - public sigslot::has_slots<> { -public: - ConnectionMonitor(ConnectionStatsGetter* stats_getter, - rtc::Thread* network_thread, - rtc::Thread* monitoring_thread); - ~ConnectionMonitor(); - - void Start(int cms); - void Stop(); - - sigslot::signal2&> SignalUpdate; - - protected: - void OnMessage(rtc::Message* message); - private: - void PollConnectionStats_w(); - - std::vector connection_infos_; - ConnectionStatsGetter* stats_getter_; - rtc::Thread* network_thread_; - rtc::Thread* monitoring_thread_; - rtc::CriticalSection crit_; - uint32_t rate_; - bool monitoring_; -}; - -} // namespace cricket - -#endif // WEBRTC_P2P_CLIENT_SOCKETMONITOR_H_ diff --git a/WebRtc.NET/include/webrtc/p2p/quic/quicconnectionhelper.h b/WebRtc.NET/include/webrtc/p2p/quic/quicconnectionhelper.h deleted file mode 100644 index 3588ad42..00000000 --- a/WebRtc.NET/include/webrtc/p2p/quic/quicconnectionhelper.h +++ /dev/null @@ -1,72 +0,0 @@ -/* - * Copyright 2016 The WebRTC Project Authors. All rights reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_P2P_QUIC_QUICCONNECTIONHELPER_H_ -#define WEBRTC_P2P_QUIC_QUICCONNECTIONHELPER_H_ - -#include "net/quic/crypto/quic_random.h" -#include "net/quic/quic_alarm.h" -#include "net/quic/quic_clock.h" -#include "net/quic/quic_connection.h" -#include "net/quic/quic_simple_buffer_allocator.h" -#include "webrtc/base/thread.h" - -namespace cricket { - -// An alarm which will go off at a scheduled time, and execute the |OnAlarm| -// method of the delegate. -class QuicAlarm : public net::QuicAlarm, public rtc::MessageHandler { - public: - QuicAlarm(const net::QuicClock* clock, - rtc::Thread* thread, - net::QuicArenaScopedPtr delegate); - - ~QuicAlarm() override; - - // rtc::MessageHandler override. - void OnMessage(rtc::Message* msg) override; - - // Helper method to get the delay in ms for posting task. - int64_t GetDelay() const; - - protected: - // net::QuicAlarm overrides. - void SetImpl() override; - void CancelImpl() override; - - private: - const net::QuicClock* clock_; - rtc::Thread* thread_; -}; - -// Helper methods for QuicConnection timing and random number generation. -class QuicConnectionHelper : public net::QuicConnectionHelperInterface { - public: - explicit QuicConnectionHelper(rtc::Thread* thread); - ~QuicConnectionHelper() override; - - // QuicConnectionHelperInterface overrides. - const net::QuicClock* GetClock() const override; - net::QuicRandom* GetRandomGenerator() override; - QuicAlarm* CreateAlarm(net::QuicAlarm::Delegate* delegate) override; - net::QuicArenaScopedPtr CreateAlarm( - net::QuicArenaScopedPtr delegate, - net::QuicConnectionArena* arena) override; - net::QuicBufferAllocator* GetBufferAllocator() override; - - private: - net::QuicClock clock_; - net::SimpleBufferAllocator buffer_allocator_; - rtc::Thread* thread_; -}; - -} // namespace cricket - -#endif // WEBRTC_P2P_QUIC_QUICCONNECTIONHELPER_H_ diff --git a/WebRtc.NET/include/webrtc/p2p/quic/quicsession.h b/WebRtc.NET/include/webrtc/p2p/quic/quicsession.h deleted file mode 100644 index f8b27e05..00000000 --- a/WebRtc.NET/include/webrtc/p2p/quic/quicsession.h +++ /dev/null @@ -1,97 +0,0 @@ -/* - * Copyright 2016 The WebRTC Project Authors. All rights reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_P2P_QUIC_QUICSESSION_H_ -#define WEBRTC_P2P_QUIC_QUICSESSION_H_ - -#include -#include - -#include "net/quic/quic_crypto_client_stream.h" -#include "net/quic/quic_crypto_server_stream.h" -#include "net/quic/quic_crypto_stream.h" -#include "net/quic/quic_session.h" -#include "webrtc/base/constructormagic.h" -#include "webrtc/base/sigslot.h" -#include "webrtc/base/sslidentity.h" -#include "webrtc/p2p/quic/reliablequicstream.h" - -namespace cricket { - -// This class provides a QUIC session over peer-to-peer transport that -// negotiates the crypto handshake (using QuicCryptoHandshake) and provides -// reading/writing of data using QUIC packets. -class QuicSession : public net::QuicSession, public sigslot::has_slots<> { - public: - QuicSession(std::unique_ptr connection, - const net::QuicConfig& config); - ~QuicSession() override; - - // Initiates client crypto handshake by sending client hello. - void StartClientHandshake(net::QuicCryptoClientStream* crypto_stream); - - // Responds to a client who has inititated the crypto handshake. - void StartServerHandshake(net::QuicCryptoServerStream* crypto_stream); - - // QuicSession overrides. - net::QuicCryptoStream* GetCryptoStream() override { - return crypto_stream_.get(); - } - ReliableQuicStream* CreateOutgoingDynamicStream( - net::SpdyPriority priority) override; - - // QuicSession optional overrides. - void OnCryptoHandshakeEvent(CryptoHandshakeEvent event) override; - void CloseStream(net::QuicStreamId stream_id) override; - - // QuicConnectionVisitorInterface overrides. - void OnConnectionClosed(net::QuicErrorCode error, - const std::string& error_details, - net::ConnectionCloseSource source) override; - - // Exports keying material for SRTP. - bool ExportKeyingMaterial(base::StringPiece label, - base::StringPiece context, - size_t result_len, - std::string* result); - - // Decrypts an incoming QUIC packet to a data stream. - bool OnReadPacket(const char* data, size_t data_len); - - // Called when peers have established forward-secure encryption - sigslot::signal0<> SignalHandshakeComplete; - // Called when connection closes locally, or remotely by peer. - sigslot::signal2 SignalConnectionClosed; - // Called when an incoming QUIC stream is created so we can process data - // from it by registering a listener to - // ReliableQuicStream::SignalDataReceived. - sigslot::signal1 SignalIncomingStream; - - protected: - // Sets the QUIC crypto stream and takes ownership of it. - void SetCryptoStream(net::QuicCryptoStream* crypto_stream); - - // QuicSession override. - ReliableQuicStream* CreateIncomingDynamicStream( - net::QuicStreamId id) override; - - virtual ReliableQuicStream* CreateDataStream(net::QuicStreamId id, - net::SpdyPriority priority); - - private: - std::unique_ptr crypto_stream_; - net::QuicClock clock_; // For recording packet receipt time - - RTC_DISALLOW_COPY_AND_ASSIGN(QuicSession); -}; - -} // namespace cricket - -#endif // WEBRTC_P2P_QUIC_QUICSESSION_H_ diff --git a/WebRtc.NET/include/webrtc/p2p/quic/quictransport.h b/WebRtc.NET/include/webrtc/p2p/quic/quictransport.h deleted file mode 100644 index 5e834e02..00000000 --- a/WebRtc.NET/include/webrtc/p2p/quic/quictransport.h +++ /dev/null @@ -1,68 +0,0 @@ -/* - * Copyright 2016 The WebRTC Project Authors. All rights reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_P2P_QUIC_QUICTRANSPORT_H_ -#define WEBRTC_P2P_QUIC_QUICTRANSPORT_H_ - -#include -#include -#include - -#include "webrtc/p2p/base/jseptransport.h" -#include "webrtc/p2p/quic/quictransportchannel.h" - -namespace cricket { - -class P2PTransportChannel; -class PortAllocator; - -// TODO(deadbeef): To get QUIC working with TransportController again, would -// need to merge this class with Transport (or make separate DTLS/QUIC -// subclasses). The only difference between the two (as of typing this) is that -// the QUIC channel *requires* a fingerprint, whereas the DTLS channel can -// operate in a passthrough mode when SDES is used. -class QuicTransport : public Transport { - public: - QuicTransport(const std::string& name, - PortAllocator* allocator, - const rtc::scoped_refptr& certificate); - - ~QuicTransport() override; - - // Transport overrides. - void SetLocalCertificate( - const rtc::scoped_refptr& certificate) override; - bool GetLocalCertificate( - rtc::scoped_refptr* certificate) override; - bool SetSslMaxProtocolVersion(rtc::SSLProtocolVersion version) override { - return true; // Not needed by QUIC - } - bool GetSslRole(rtc::SSLRole* ssl_role) const override; - - protected: - // Transport overrides. - QuicTransportChannel* CreateTransportChannel(int component) override; - void DestroyTransportChannel(TransportChannelImpl* channel) override; - bool ApplyLocalTransportDescription(TransportChannelImpl* channel, - std::string* error_desc) override; - bool NegotiateTransportDescription(ContentAction action, - std::string* error_desc) override; - bool ApplyNegotiatedTransportDescription(TransportChannelImpl* channel, - std::string* error_desc) override; - - private: - rtc::scoped_refptr local_certificate_; - rtc::SSLRole local_role_ = rtc::SSL_CLIENT; - std::unique_ptr remote_fingerprint_; -}; - -} // namespace cricket - -#endif // WEBRTC_P2P_QUIC_QUICTRANSPORT_H_ diff --git a/WebRtc.NET/include/webrtc/p2p/quic/quictransportchannel.h b/WebRtc.NET/include/webrtc/p2p/quic/quictransportchannel.h deleted file mode 100644 index 0e5af88e..00000000 --- a/WebRtc.NET/include/webrtc/p2p/quic/quictransportchannel.h +++ /dev/null @@ -1,308 +0,0 @@ -/* - * Copyright 2016 The WebRTC Project Authors. All rights reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_P2P_QUIC_QUICTRANSPORTCHANNEL_H_ -#define WEBRTC_P2P_QUIC_QUICTRANSPORTCHANNEL_H_ - -#include -#include -#include - -#include "net/quic/quic_crypto_client_stream.h" -#include "net/quic/quic_packet_writer.h" -#include "webrtc/base/constructormagic.h" -#include "webrtc/base/optional.h" -#include "webrtc/p2p/base/transportchannelimpl.h" -#include "webrtc/p2p/quic/quicconnectionhelper.h" -#include "webrtc/p2p/quic/quicsession.h" - -namespace cricket { - -enum QuicTransportState { - // Haven't started QUIC handshake. - QUIC_TRANSPORT_NEW = 0, - // Started QUIC handshake. - QUIC_TRANSPORT_CONNECTING, - // Negotiated, and has an encrypted connection. - QUIC_TRANSPORT_CONNECTED, - // QUIC connection closed due to handshake failure or explicit shutdown. - QUIC_TRANSPORT_CLOSED, -}; - -// QuicTransportChannel uses the QUIC protocol to establish encryption with -// another peer, wrapping an existing TransportChannelImpl instance -// (e.g a P2PTransportChannel) responsible for connecting peers. -// Once the wrapped transport channel is connected, QuicTransportChannel -// negotiates the crypto handshake and establishes SRTP keying material. -// -// How it works: -// -// QuicTransportChannel { -// QuicSession* quic_; -// TransportChannelImpl* channel_; -// } -// -// - Data written to SendPacket() is passed directly to |channel_| if it is -// an SRTP packet with the PF_SRTP_BYPASS flag. -// -// - |quic_| passes outgoing packets to WritePacket(), which transfers them -// to |channel_| to be sent across the network. -// -// - Data which comes into QuicTransportChannel::OnReadPacket is checked to -// see if it is QUIC, and if it is, passed to |quic_|. SRTP packets are -// signaled upwards as bypass packets. -// -// - When the QUIC handshake is completed, quic_state() returns -// QUIC_TRANSPORT_CONNECTED and SRTP keying material can be exported. -// -// - CreateQuicStream() creates an outgoing QUIC stream. Once the local peer -// sends data from this stream, the remote peer emits SignalIncomingStream -// with a QUIC stream of the same id to handle received data. -// -// TODO(mikescarlett): Implement secure QUIC handshake and 0-RTT handshakes. -class QuicTransportChannel : public TransportChannelImpl, - public net::QuicPacketWriter, - public net::QuicCryptoClientStream::ProofHandler { - public: - // |channel| - the TransportChannelImpl we are wrapping. - explicit QuicTransportChannel(TransportChannelImpl* channel); - ~QuicTransportChannel() override; - - // TransportChannel overrides. - // TODO(mikescarlett): Implement certificate authentication. - bool SetLocalCertificate( - const rtc::scoped_refptr& certificate) override; - rtc::scoped_refptr GetLocalCertificate() const override; - // TODO(mikescarlett): Implement fingerprint authentication. - bool SetRemoteFingerprint(const std::string& digest_alg, - const uint8_t* digest, - size_t digest_len) override; - // TODO(mikescarlett): Remove this DTLS-specific method when TransportChannel - // does not require defining it. - bool IsDtlsActive() const override { return true; } - // Sends a RTP packet if the PF_SRTP_BYPASS flag is set. - int SendPacket(const char* data, - size_t size, - const rtc::PacketOptions& options, - int flags) override; - // Sets up the ciphers to use for SRTP. - // TODO(mikescarlett): Use SRTP ciphers for negotiation. - bool SetSrtpCryptoSuites(const std::vector& ciphers) override { - return true; - } - // Determines which SRTP cipher was negotiated. - // TODO(mikescarlett): Implement QUIC cipher negotiation. This currently - // returns SRTP_AES128_CM_SHA1_80. - bool GetSrtpCryptoSuite(int* cipher) override; - bool SetSslRole(rtc::SSLRole role) override; - bool GetSslRole(rtc::SSLRole* role) const override; - // Determines which SSL cipher was negotiated. - // TODO(mikescarlett): Implement QUIC cipher negotiation. - bool GetSslCipherSuite(int* cipher) override { return false; } - // Once QUIC is established (i.e., |quic_state_| is QUIC_TRANSPORT_CONNECTED), - // this extracts the keys negotiated during the QUIC handshake, for use - // in external encryption such as for extracting SRTP keys. - bool ExportKeyingMaterial(const std::string& label, - const uint8_t* context, - size_t context_len, - bool use_context, - uint8_t* result, - size_t result_len) override; - // TODO(mikescarlett): Remove this method once TransportChannel does not - // require defining it. - std::unique_ptr GetRemoteSSLCertificate() - const override { - return nullptr; - } - - // TransportChannelImpl overrides that we forward to the wrapped transport. - void SetIceRole(IceRole role) override { channel_->SetIceRole(role); } - IceRole GetIceRole() const override { return channel_->GetIceRole(); } - int SetOption(rtc::Socket::Option opt, int value) override { - return channel_->SetOption(opt, value); - } - bool GetOption(rtc::Socket::Option opt, int* value) override { - return channel_->GetOption(opt, value); - } - int GetError() override { return channel_->GetError(); } - bool GetStats(ConnectionInfos* infos) override { - return channel_->GetStats(infos); - } - const std::string SessionId() const override { return channel_->SessionId(); } - TransportChannelState GetState() const override { - return channel_->GetState(); - } - void SetIceTiebreaker(uint64_t tiebreaker) override { - channel_->SetIceTiebreaker(tiebreaker); - } - void SetIceParameters(const IceParameters& ice_params) override { - channel_->SetIceParameters(ice_params); - } - void SetRemoteIceParameters(const IceParameters& ice_params) override { - channel_->SetRemoteIceParameters(ice_params); - } - void SetRemoteIceMode(IceMode mode) override { - channel_->SetRemoteIceMode(mode); - } - void MaybeStartGathering() override { channel_->MaybeStartGathering(); } - IceGatheringState gathering_state() const override { - return channel_->gathering_state(); - } - void AddRemoteCandidate(const Candidate& candidate) override { - channel_->AddRemoteCandidate(candidate); - } - void RemoveRemoteCandidate(const Candidate& candidate) override { - channel_->RemoveRemoteCandidate(candidate); - } - void SetIceConfig(const IceConfig& config) override { - channel_->SetIceConfig(config); - } - - // QuicPacketWriter overrides. - // Called from net::QuicConnection when |quic_| has packets to write. - net::WriteResult WritePacket(const char* buffer, - size_t buf_len, - const net::IPAddress& self_address, - const net::IPEndPoint& peer_address, - net::PerPacketOptions* options) override; - // Whether QuicTransportChannel buffers data when unable to write. If this is - // set to false, then net::QuicConnection buffers unsent packets. - bool IsWriteBlockedDataBuffered() const override { return false; } - // Whether QuicTransportChannel is write blocked. If this returns true, - // outgoing QUIC packets are queued by net::QuicConnection until - // QuicTransportChannel::OnCanWrite() is called. - bool IsWriteBlocked() const override; - // Maximum size of the QUIC packet which can be written. - net::QuicByteCount GetMaxPacketSize( - const net::IPEndPoint& peer_address) const override { - return net::kMaxPacketSize; - } - // This method is not used -- call set_writable(bool writable) instead. - // TODO(miekscarlett): Remove this method once QuicPacketWriter does not - // require defining it. - void SetWritable() override {} - - // QuicCryptoClientStream::ProofHandler overrides. - // Called by client crypto handshake when cached proof is marked valid. - void OnProofValid( - const net::QuicCryptoClientConfig::CachedState& cached) override; - // Called by the client crypto handshake when proof verification details - // become available, either because proof verification is complete, or when - // cached details are used. - void OnProofVerifyDetailsAvailable( - const net::ProofVerifyDetails& verify_details) override; - - void SetMetricsObserver(webrtc::MetricsObserverInterface* observer) override { - channel_->SetMetricsObserver(observer); - } - - // Returns true if |quic_| has queued data which wasn't written due - // to |channel_| being write blocked. - bool HasDataToWrite() const; - // Writes queued data for |quic_| when |channel_| is no longer write blocked. - void OnCanWrite(); - // Connectivity state of QuicTransportChannel. - QuicTransportState quic_state() const { return quic_state_; } - // Creates a new QUIC stream that can send data. - ReliableQuicStream* CreateQuicStream(); - - TransportChannelImpl* ice_transport_channel() { return channel_.get(); } - - // Emitted when |quic_| creates a QUIC stream to receive data from the remote - // peer, when the stream did not exist previously. - sigslot::signal1 SignalIncomingStream; - // Emitted when the QuicTransportChannel state becomes QUIC_TRANSPORT_CLOSED. - sigslot::signal0<> SignalClosed; - - private: - // Fingerprint of remote peer. - struct RemoteFingerprint { - std::string value; - std::string algorithm; - }; - - // Callbacks for |channel_|. - void OnReadableState(TransportChannel* channel); - void OnWritableState(TransportChannel* channel); - void OnReadPacket(TransportChannel* channel, - const char* data, - size_t size, - const rtc::PacketTime& packet_time, - int flags); - void OnSentPacket(TransportChannel* channel, - const rtc::SentPacket& sent_packet); - void OnReadyToSend(TransportChannel* channel); - void OnReceivingState(TransportChannel* channel); - void OnGatheringState(TransportChannelImpl* channel); - void OnCandidateGathered(TransportChannelImpl* channel, const Candidate& c); - void OnRoleConflict(TransportChannelImpl* channel); - void OnRouteChange(TransportChannel* channel, const Candidate& candidate); - void OnSelectedCandidatePairChanged( - TransportChannel* channel, - CandidatePairInterface* selected_candidate_pair, - int last_sent_packet_id, - bool ready_to_send); - void OnChannelStateChanged(TransportChannelImpl* channel); - - // Callbacks for |quic_|. - // Called when |quic_| has established the crypto handshake. - void OnHandshakeComplete(); - // Called when |quic_| has closed the connection. - void OnConnectionClosed(net::QuicErrorCode error, bool from_peer); - // Called when |quic_| has created a new QUIC stream for incoming data. - void OnIncomingStream(ReliableQuicStream* stream); - - // Called by OnReadPacket() when a QUIC packet is received. - bool HandleQuicPacket(const char* data, size_t size); - // Sets up the QUIC handshake. - bool MaybeStartQuic(); - // Creates the QUIC connection and |quic_|. - bool CreateQuicSession(); - // Creates the crypto stream and initializes the handshake. - bool StartQuicHandshake(); - // Sets the QuicTransportChannel connectivity state. - void set_quic_state(QuicTransportState state); - - // Everything should occur on this thread. - rtc::Thread* network_thread_; - // Underlying channel which is responsible for connecting with the remote peer - // and sending/receiving packets across the network. - std::unique_ptr channel_; - // Connectivity state of QuicTransportChannel. - QuicTransportState quic_state_ = QUIC_TRANSPORT_NEW; - // QUIC session which establishes the crypto handshake and converts data - // to/from QUIC packets. - std::unique_ptr quic_; - // Non-crypto config for |quic_|. - net::QuicConfig config_; - // Helper for net::QuicConnection that provides timing and - // random number generation. - QuicConnectionHelper helper_; - // This peer's role in the QUIC crypto handshake. SSL_CLIENT implies this peer - // initiates the handshake, while SSL_SERVER implies the remote peer initiates - // the handshake. This must be set before we start QUIC. - rtc::Optional ssl_role_; - // Config for QUIC crypto client stream, used when |ssl_role_| is SSL_CLIENT. - std::unique_ptr quic_crypto_client_config_; - // Config for QUIC crypto server stream, used when |ssl_role_| is SSL_SERVER. - std::unique_ptr quic_crypto_server_config_; - // Used by QUIC crypto server stream to track most recently compressed certs. - std::unique_ptr quic_compressed_certs_cache_; - // This peer's certificate. - rtc::scoped_refptr local_certificate_; - // Fingerprint of the remote peer. This must be set before we start QUIC. - rtc::Optional remote_fingerprint_; - - RTC_DISALLOW_COPY_AND_ASSIGN(QuicTransportChannel); -}; - -} // namespace cricket - -#endif // WEBRTC_P2P_QUIC_QUICTRANSPORTCHANNEL_H_ diff --git a/WebRtc.NET/include/webrtc/p2p/quic/reliablequicstream.h b/WebRtc.NET/include/webrtc/p2p/quic/reliablequicstream.h deleted file mode 100644 index 9493a3fc..00000000 --- a/WebRtc.NET/include/webrtc/p2p/quic/reliablequicstream.h +++ /dev/null @@ -1,56 +0,0 @@ -/* - * Copyright 2016 The WebRTC Project Authors. All rights reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_P2P_QUIC_RELIABLEQUICSTREAM_H_ -#define WEBRTC_P2P_QUIC_RELIABLEQUICSTREAM_H_ - -#include "net/quic/reliable_quic_stream.h" -#include "webrtc/base/constructormagic.h" -#include "webrtc/base/sigslot.h" -#include "webrtc/base/stream.h" - -namespace cricket { - -// Streams created by QuicSession. -class ReliableQuicStream : public net::ReliableQuicStream, - public sigslot::has_slots<> { - public: - ReliableQuicStream(net::QuicStreamId id, net::QuicSession* session); - - ~ReliableQuicStream() override; - - // ReliableQuicStream overrides. - void OnDataAvailable() override; - void OnClose() override; - void OnCanWrite() override; - - // Process decrypted data into encrypted QUIC packets, which get sent to the - // QuicPacketWriter. rtc::SR_BLOCK is returned if the operation blocks instead - // of writing, in which case the data is queued until OnCanWrite() is called. - // If |fin| == true, then this stream closes after sending data. - rtc::StreamResult Write(const char* data, size_t len, bool fin = false); - // Removes this stream from the QuicSession's stream map. - void Close(); - - // Called when decrypted data is ready to be read. - sigslot::signal3 SignalDataReceived; - // Called when the stream is closed. - sigslot::signal2 SignalClosed; - // Emits the number of queued bytes that were written by OnCanWrite(), after - // the stream was previously write blocked. - sigslot::signal2 SignalQueuedBytesWritten; - - private: - RTC_DISALLOW_COPY_AND_ASSIGN(ReliableQuicStream); -}; - -} // namespace cricket - -#endif // WEBRTC_P2P_QUIC_RELIABLEQUICSTREAM_H_ diff --git a/WebRtc.NET/include/webrtc/pc/audiomonitor.h b/WebRtc.NET/include/webrtc/pc/audiomonitor.h deleted file mode 100644 index 885c60f0..00000000 --- a/WebRtc.NET/include/webrtc/pc/audiomonitor.h +++ /dev/null @@ -1,60 +0,0 @@ -/* - * Copyright 2004 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_PC_AUDIOMONITOR_H_ -#define WEBRTC_PC_AUDIOMONITOR_H_ - -#include -#include - -#include "webrtc/base/sigslot.h" -#include "webrtc/base/thread.h" -#include "webrtc/p2p/base/port.h" - -namespace cricket { - -class VoiceChannel; - -struct AudioInfo { - int input_level; - int output_level; - typedef std::vector > StreamList; - StreamList active_streams; // ssrcs contributing to output_level -}; - -class AudioMonitor : public rtc::MessageHandler, - public sigslot::has_slots<> { - public: - AudioMonitor(VoiceChannel* voice_channel, rtc::Thread *monitor_thread); - ~AudioMonitor(); - - void Start(int cms); - void Stop(); - - VoiceChannel* voice_channel(); - rtc::Thread *monitor_thread(); - - sigslot::signal2 SignalUpdate; - - protected: - void OnMessage(rtc::Message *message); - void PollVoiceChannel(); - - AudioInfo audio_info_; - VoiceChannel* voice_channel_; - rtc::Thread* monitoring_thread_; - rtc::CriticalSection crit_; - uint32_t rate_; - bool monitoring_; -}; - -} // namespace cricket - -#endif // WEBRTC_PC_AUDIOMONITOR_H_ diff --git a/WebRtc.NET/include/webrtc/pc/channel.h b/WebRtc.NET/include/webrtc/pc/channel.h deleted file mode 100644 index e4848b23..00000000 --- a/WebRtc.NET/include/webrtc/pc/channel.h +++ /dev/null @@ -1,738 +0,0 @@ -/* - * Copyright 2004 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_PC_CHANNEL_H_ -#define WEBRTC_PC_CHANNEL_H_ - -#include -#include -#include -#include -#include -#include - -#include "webrtc/api/call/audio_sink.h" -#include "webrtc/base/asyncinvoker.h" -#include "webrtc/base/asyncudpsocket.h" -#include "webrtc/base/criticalsection.h" -#include "webrtc/base/network.h" -#include "webrtc/base/sigslot.h" -#include "webrtc/base/window.h" -#include "webrtc/media/base/mediachannel.h" -#include "webrtc/media/base/mediaengine.h" -#include "webrtc/media/base/streamparams.h" -#include "webrtc/media/base/videosinkinterface.h" -#include "webrtc/media/base/videosourceinterface.h" -#include "webrtc/p2p/base/transportcontroller.h" -#include "webrtc/p2p/client/socketmonitor.h" -#include "webrtc/pc/audiomonitor.h" -#include "webrtc/pc/bundlefilter.h" -#include "webrtc/pc/mediamonitor.h" -#include "webrtc/pc/mediasession.h" -#include "webrtc/pc/rtcpmuxfilter.h" -#include "webrtc/pc/srtpfilter.h" - -namespace rtc { -class PacketTransportInterface; -} - -namespace webrtc { -class AudioSinkInterface; -} // namespace webrtc - -namespace cricket { - -struct CryptoParams; -class MediaContentDescription; - -// BaseChannel contains logic common to voice and video, including enable, -// marshaling calls to a worker and network threads, and connection and media -// monitors. -// -// BaseChannel assumes signaling and other threads are allowed to make -// synchronous calls to the worker thread, the worker thread makes synchronous -// calls only to the network thread, and the network thread can't be blocked by -// other threads. -// All methods with _n suffix must be called on network thread, -// methods with _w suffix on worker thread -// and methods with _s suffix on signaling thread. -// Network and worker threads may be the same thread. -// -// WARNING! SUBCLASSES MUST CALL Deinit() IN THEIR DESTRUCTORS! -// This is required to avoid a data race between the destructor modifying the -// vtable, and the media channel's thread using BaseChannel as the -// NetworkInterface. - -class BaseChannel - : public rtc::MessageHandler, public sigslot::has_slots<>, - public MediaChannel::NetworkInterface, - public ConnectionStatsGetter { - public: - // |rtcp| represents whether or not this channel uses RTCP. - // If |srtp_required| is true, the channel will not send or receive any - // RTP/RTCP packets without using SRTP (either using SDES or DTLS-SRTP). - BaseChannel(rtc::Thread* worker_thread, - rtc::Thread* network_thread, - rtc::Thread* signaling_thread, - MediaChannel* channel, - const std::string& content_name, - bool rtcp_mux_required, - bool srtp_required); - virtual ~BaseChannel(); - bool Init_w(DtlsTransportInternal* rtp_dtls_transport, - DtlsTransportInternal* rtcp_dtls_transport); - // Deinit may be called multiple times and is simply ignored if it's already - // done. - void Deinit(); - - rtc::Thread* worker_thread() const { return worker_thread_; } - rtc::Thread* network_thread() const { return network_thread_; } - const std::string& content_name() const { return content_name_; } - const std::string& transport_name() const { return transport_name_; } - bool enabled() const { return enabled_; } - - // This function returns true if we are using SRTP. - bool secure() const { return srtp_filter_.IsActive(); } - // The following function returns true if we are using - // DTLS-based keying. If you turned off SRTP later, however - // you could have secure() == false and dtls_secure() == true. - bool secure_dtls() const { return dtls_keyed_; } - - bool writable() const { return writable_; } - - // Set the transport(s), and update writability and "ready-to-send" state. - // |rtp_transport| must be non-null. - // |rtcp_transport| must be supplied if NeedsRtcpTransport() is true (meaning - // RTCP muxing is not fully active yet). - // |rtp_transport| and |rtcp_transport| must share the same transport name as - // well. - void SetTransports(DtlsTransportInternal* rtp_dtls_transport, - DtlsTransportInternal* rtcp_dtls_transport); - bool PushdownLocalDescription(const SessionDescription* local_desc, - ContentAction action, - std::string* error_desc); - bool PushdownRemoteDescription(const SessionDescription* remote_desc, - ContentAction action, - std::string* error_desc); - // Channel control - bool SetLocalContent(const MediaContentDescription* content, - ContentAction action, - std::string* error_desc); - bool SetRemoteContent(const MediaContentDescription* content, - ContentAction action, - std::string* error_desc); - - bool Enable(bool enable); - - // Multiplexing - bool AddRecvStream(const StreamParams& sp); - bool RemoveRecvStream(uint32_t ssrc); - bool AddSendStream(const StreamParams& sp); - bool RemoveSendStream(uint32_t ssrc); - - // Monitoring - void StartConnectionMonitor(int cms); - void StopConnectionMonitor(); - // For ConnectionStatsGetter, used by ConnectionMonitor - bool GetConnectionStats(ConnectionInfos* infos) override; - - BundleFilter* bundle_filter() { return &bundle_filter_; } - - const std::vector& local_streams() const { - return local_streams_; - } - const std::vector& remote_streams() const { - return remote_streams_; - } - - sigslot::signal2 SignalDtlsSrtpSetupFailure; - void SignalDtlsSrtpSetupFailure_n(bool rtcp); - void SignalDtlsSrtpSetupFailure_s(bool rtcp); - - // Used for latency measurements. - sigslot::signal1 SignalFirstPacketReceived; - - // Forward SignalSentPacket to worker thread. - sigslot::signal1 SignalSentPacket; - - // Emitted whenever rtcp-mux is fully negotiated and the rtcp-transport can - // be destroyed. - // Fired on the network thread. - sigslot::signal1 SignalRtcpMuxFullyActive; - - // Only public for unit tests. Otherwise, consider private. - DtlsTransportInternal* rtp_dtls_transport() const { - return rtp_dtls_transport_; - } - DtlsTransportInternal* rtcp_dtls_transport() const { - return rtcp_dtls_transport_; - } - - bool NeedsRtcpTransport(); - - // Made public for easier testing. - // - // Updates "ready to send" for an individual channel, and informs the media - // channel that the transport is ready to send if each channel (in use) is - // ready to send. This is more specific than just "writable"; it means the - // last send didn't return ENOTCONN. - // - // This should be called whenever a channel's ready-to-send state changes, - // or when RTCP muxing becomes active/inactive. - void SetTransportChannelReadyToSend(bool rtcp, bool ready); - - // Only public for unit tests. Otherwise, consider protected. - int SetOption(SocketType type, rtc::Socket::Option o, int val) - override; - int SetOption_n(SocketType type, rtc::Socket::Option o, int val); - - SrtpFilter* srtp_filter() { return &srtp_filter_; } - - virtual cricket::MediaType media_type() = 0; - - bool SetCryptoOptions(const rtc::CryptoOptions& crypto_options); - - // This function returns true if we require SRTP for call setup. - bool srtp_required_for_testing() const { return srtp_required_; } - - protected: - virtual MediaChannel* media_channel() const { return media_channel_; } - - void SetTransports_n(DtlsTransportInternal* rtp_dtls_transport, - DtlsTransportInternal* rtcp_dtls_transport); - - // This does not update writability or "ready-to-send" state; it just - // disconnects from the old channel and connects to the new one. - void SetTransport_n(bool rtcp, DtlsTransportInternal* new_transport); - - bool was_ever_writable() const { return was_ever_writable_; } - void set_local_content_direction(MediaContentDirection direction) { - local_content_direction_ = direction; - } - void set_remote_content_direction(MediaContentDirection direction) { - remote_content_direction_ = direction; - } - // These methods verify that: - // * The required content description directions have been set. - // * The channel is enabled. - // * And for sending: - // - The SRTP filter is active if it's needed. - // - The transport has been writable before, meaning it should be at least - // possible to succeed in sending a packet. - // - // When any of these properties change, UpdateMediaSendRecvState_w should be - // called. - bool IsReadyToReceiveMedia_w() const; - bool IsReadyToSendMedia_w() const; - rtc::Thread* signaling_thread() { return signaling_thread_; } - - void ConnectToTransport(DtlsTransportInternal* transport); - void DisconnectFromTransport(DtlsTransportInternal* transport); - - void FlushRtcpMessages_n(); - - // NetworkInterface implementation, called by MediaEngine - bool SendPacket(rtc::CopyOnWriteBuffer* packet, - const rtc::PacketOptions& options) override; - bool SendRtcp(rtc::CopyOnWriteBuffer* packet, - const rtc::PacketOptions& options) override; - - // From TransportChannel - void OnWritableState(rtc::PacketTransportInterface* transport); - virtual void OnPacketRead(rtc::PacketTransportInterface* transport, - const char* data, - size_t len, - const rtc::PacketTime& packet_time, - int flags); - void OnReadyToSend(rtc::PacketTransportInterface* transport); - - void OnDtlsState(DtlsTransportInternal* transport, DtlsTransportState state); - - void OnSelectedCandidatePairChanged( - IceTransportInternal* ice_transport, - CandidatePairInterface* selected_candidate_pair, - int last_sent_packet_id, - bool ready_to_send); - - bool PacketIsRtcp(const rtc::PacketTransportInterface* transport, - const char* data, - size_t len); - bool SendPacket(bool rtcp, - rtc::CopyOnWriteBuffer* packet, - const rtc::PacketOptions& options); - - bool WantsPacket(bool rtcp, const rtc::CopyOnWriteBuffer* packet); - void HandlePacket(bool rtcp, rtc::CopyOnWriteBuffer* packet, - const rtc::PacketTime& packet_time); - void OnPacketReceived(bool rtcp, - const rtc::CopyOnWriteBuffer& packet, - const rtc::PacketTime& packet_time); - - void EnableMedia_w(); - void DisableMedia_w(); - - // Performs actions if the RTP/RTCP writable state changed. This should - // be called whenever a channel's writable state changes or when RTCP muxing - // becomes active/inactive. - void UpdateWritableState_n(); - void ChannelWritable_n(); - void ChannelNotWritable_n(); - - bool AddRecvStream_w(const StreamParams& sp); - bool RemoveRecvStream_w(uint32_t ssrc); - bool AddSendStream_w(const StreamParams& sp); - bool RemoveSendStream_w(uint32_t ssrc); - bool ShouldSetupDtlsSrtp_n() const; - // Do the DTLS key expansion and impose it on the SRTP/SRTCP filters. - // |rtcp_channel| indicates whether to set up the RTP or RTCP filter. - bool SetupDtlsSrtp_n(bool rtcp); - void MaybeSetupDtlsSrtp_n(); - // Set the DTLS-SRTP cipher policy on this channel as appropriate. - bool SetDtlsSrtpCryptoSuites_n(DtlsTransportInternal* transport, bool rtcp); - - // Should be called whenever the conditions for - // IsReadyToReceiveMedia/IsReadyToSendMedia are satisfied (or unsatisfied). - // Updates the send/recv state of the media channel. - void UpdateMediaSendRecvState(); - virtual void UpdateMediaSendRecvState_w() = 0; - - // Gets the content info appropriate to the channel (audio or video). - virtual const ContentInfo* GetFirstContent( - const SessionDescription* sdesc) = 0; - bool UpdateLocalStreams_w(const std::vector& streams, - ContentAction action, - std::string* error_desc); - bool UpdateRemoteStreams_w(const std::vector& streams, - ContentAction action, - std::string* error_desc); - virtual bool SetLocalContent_w(const MediaContentDescription* content, - ContentAction action, - std::string* error_desc) = 0; - virtual bool SetRemoteContent_w(const MediaContentDescription* content, - ContentAction action, - std::string* error_desc) = 0; - bool SetRtpTransportParameters(const MediaContentDescription* content, - ContentAction action, - ContentSource src, - std::string* error_desc); - bool SetRtpTransportParameters_n(const MediaContentDescription* content, - ContentAction action, - ContentSource src, - std::string* error_desc); - - // Helper method to get RTP Absoulute SendTime extension header id if - // present in remote supported extensions list. - void MaybeCacheRtpAbsSendTimeHeaderExtension_w( - const std::vector& extensions); - - bool CheckSrtpConfig_n(const std::vector& cryptos, - bool* dtls, - std::string* error_desc); - bool SetSrtp_n(const std::vector& params, - ContentAction action, - ContentSource src, - std::string* error_desc); - bool SetRtcpMux_n(bool enable, - ContentAction action, - ContentSource src, - std::string* error_desc); - - // From MessageHandler - void OnMessage(rtc::Message* pmsg) override; - - const rtc::CryptoOptions& crypto_options() const { - return crypto_options_; - } - - // Handled in derived classes - // Get the SRTP crypto suites to use for RTP media - virtual void GetSrtpCryptoSuites_n(std::vector* crypto_suites) const = 0; - virtual void OnConnectionMonitorUpdate(ConnectionMonitor* monitor, - const std::vector& infos) = 0; - - // Helper function for invoking bool-returning methods on the worker thread. - template - bool InvokeOnWorker(const rtc::Location& posted_from, - const FunctorT& functor) { - return worker_thread_->Invoke(posted_from, functor); - } - - private: - bool InitNetwork_n(DtlsTransportInternal* rtp_dtls_transport, - DtlsTransportInternal* rtcp_dtls_transport); - void DisconnectTransportChannels_n(); - void SignalSentPacket_n(rtc::PacketTransportInterface* transport, - const rtc::SentPacket& sent_packet); - void SignalSentPacket_w(const rtc::SentPacket& sent_packet); - bool IsReadyToSendMedia_n() const; - void CacheRtpAbsSendTimeHeaderExtension_n(int rtp_abs_sendtime_extn_id); - int GetTransportOverheadPerPacket() const; - void UpdateTransportOverhead(); - - rtc::Thread* const worker_thread_; - rtc::Thread* const network_thread_; - rtc::Thread* const signaling_thread_; - rtc::AsyncInvoker invoker_; - - const std::string content_name_; - std::unique_ptr connection_monitor_; - - std::string transport_name_; - // True if RTCP-multiplexing is required. In other words, no standalone RTCP - // transport will ever be used for this channel. - const bool rtcp_mux_required_; - - DtlsTransportInternal* rtp_dtls_transport_ = nullptr; - std::vector > socket_options_; - DtlsTransportInternal* rtcp_dtls_transport_ = nullptr; - std::vector > rtcp_socket_options_; - SrtpFilter srtp_filter_; - RtcpMuxFilter rtcp_mux_filter_; - BundleFilter bundle_filter_; - bool rtp_ready_to_send_ = false; - bool rtcp_ready_to_send_ = false; - bool writable_ = false; - bool was_ever_writable_ = false; - bool has_received_packet_ = false; - bool dtls_keyed_ = false; - const bool srtp_required_ = true; - rtc::CryptoOptions crypto_options_; - int rtp_abs_sendtime_extn_id_ = -1; - - // MediaChannel related members that should be accessed from the worker - // thread. - MediaChannel* const media_channel_; - // Currently the |enabled_| flag is accessed from the signaling thread as - // well, but it can be changed only when signaling thread does a synchronous - // call to the worker thread, so it should be safe. - bool enabled_ = false; - std::vector local_streams_; - std::vector remote_streams_; - MediaContentDirection local_content_direction_ = MD_INACTIVE; - MediaContentDirection remote_content_direction_ = MD_INACTIVE; - CandidatePairInterface* selected_candidate_pair_; -}; - -// VoiceChannel is a specialization that adds support for early media, DTMF, -// and input/output level monitoring. -class VoiceChannel : public BaseChannel { - public: - VoiceChannel(rtc::Thread* worker_thread, - rtc::Thread* network_thread, - rtc::Thread* signaling_thread, - MediaEngineInterface* media_engine, - VoiceMediaChannel* channel, - const std::string& content_name, - bool rtcp_mux_required, - bool srtp_required); - ~VoiceChannel(); - bool Init_w(DtlsTransportInternal* rtp_dtls_transport, - DtlsTransportInternal* rtcp_dtls_transport); - - // Configure sending media on the stream with SSRC |ssrc| - // If there is only one sending stream SSRC 0 can be used. - bool SetAudioSend(uint32_t ssrc, - bool enable, - const AudioOptions* options, - AudioSource* source); - - // downcasts a MediaChannel - VoiceMediaChannel* media_channel() const override { - return static_cast(BaseChannel::media_channel()); - } - - void SetEarlyMedia(bool enable); - // This signal is emitted when we have gone a period of time without - // receiving early media. When received, a UI should start playing its - // own ringing sound - sigslot::signal1 SignalEarlyMediaTimeout; - - // Returns if the telephone-event has been negotiated. - bool CanInsertDtmf(); - // Send and/or play a DTMF |event| according to the |flags|. - // The DTMF out-of-band signal will be used on sending. - // The |ssrc| should be either 0 or a valid send stream ssrc. - // The valid value for the |event| are 0 which corresponding to DTMF - // event 0-9, *, #, A-D. - bool InsertDtmf(uint32_t ssrc, int event_code, int duration); - bool SetOutputVolume(uint32_t ssrc, double volume); - void SetRawAudioSink(uint32_t ssrc, - std::unique_ptr sink); - webrtc::RtpParameters GetRtpSendParameters(uint32_t ssrc) const; - bool SetRtpSendParameters(uint32_t ssrc, - const webrtc::RtpParameters& parameters); - webrtc::RtpParameters GetRtpReceiveParameters(uint32_t ssrc) const; - bool SetRtpReceiveParameters(uint32_t ssrc, - const webrtc::RtpParameters& parameters); - - // Get statistics about the current media session. - bool GetStats(VoiceMediaInfo* stats); - - // Monitoring functions - sigslot::signal2&> - SignalConnectionMonitor; - - void StartMediaMonitor(int cms); - void StopMediaMonitor(); - sigslot::signal2 SignalMediaMonitor; - - void StartAudioMonitor(int cms); - void StopAudioMonitor(); - bool IsAudioMonitorRunning() const; - sigslot::signal2 SignalAudioMonitor; - - int GetInputLevel_w(); - int GetOutputLevel_w(); - void GetActiveStreams_w(AudioInfo::StreamList* actives); - webrtc::RtpParameters GetRtpSendParameters_w(uint32_t ssrc) const; - bool SetRtpSendParameters_w(uint32_t ssrc, webrtc::RtpParameters parameters); - webrtc::RtpParameters GetRtpReceiveParameters_w(uint32_t ssrc) const; - bool SetRtpReceiveParameters_w(uint32_t ssrc, - webrtc::RtpParameters parameters); - cricket::MediaType media_type() override { return cricket::MEDIA_TYPE_AUDIO; } - - private: - // overrides from BaseChannel - void OnPacketRead(rtc::PacketTransportInterface* transport, - const char* data, - size_t len, - const rtc::PacketTime& packet_time, - int flags) override; - void UpdateMediaSendRecvState_w() override; - const ContentInfo* GetFirstContent(const SessionDescription* sdesc) override; - bool SetLocalContent_w(const MediaContentDescription* content, - ContentAction action, - std::string* error_desc) override; - bool SetRemoteContent_w(const MediaContentDescription* content, - ContentAction action, - std::string* error_desc) override; - void HandleEarlyMediaTimeout(); - bool InsertDtmf_w(uint32_t ssrc, int event, int duration); - bool SetOutputVolume_w(uint32_t ssrc, double volume); - bool GetStats_w(VoiceMediaInfo* stats); - - void OnMessage(rtc::Message* pmsg) override; - void GetSrtpCryptoSuites_n(std::vector* crypto_suites) const override; - void OnConnectionMonitorUpdate( - ConnectionMonitor* monitor, - const std::vector& infos) override; - void OnMediaMonitorUpdate(VoiceMediaChannel* media_channel, - const VoiceMediaInfo& info); - void OnAudioMonitorUpdate(AudioMonitor* monitor, const AudioInfo& info); - - static const int kEarlyMediaTimeout = 1000; - MediaEngineInterface* media_engine_; - bool received_media_; - std::unique_ptr media_monitor_; - std::unique_ptr audio_monitor_; - - // Last AudioSendParameters sent down to the media_channel() via - // SetSendParameters. - AudioSendParameters last_send_params_; - // Last AudioRecvParameters sent down to the media_channel() via - // SetRecvParameters. - AudioRecvParameters last_recv_params_; -}; - -// VideoChannel is a specialization for video. -class VideoChannel : public BaseChannel { - public: - VideoChannel(rtc::Thread* worker_thread, - rtc::Thread* network_thread, - rtc::Thread* signaling_thread, - VideoMediaChannel* channel, - const std::string& content_name, - bool rtcp_mux_required, - bool srtp_required); - ~VideoChannel(); - bool Init_w(DtlsTransportInternal* rtp_dtls_transport, - DtlsTransportInternal* rtcp_dtls_transport); - - // downcasts a MediaChannel - VideoMediaChannel* media_channel() const override { - return static_cast(BaseChannel::media_channel()); - } - - bool SetSink(uint32_t ssrc, - rtc::VideoSinkInterface* sink); - // Get statistics about the current media session. - bool GetStats(VideoMediaInfo* stats); - - sigslot::signal2&> - SignalConnectionMonitor; - - void StartMediaMonitor(int cms); - void StopMediaMonitor(); - sigslot::signal2 SignalMediaMonitor; - - // Register a source and set options. - // The |ssrc| must correspond to a registered send stream. - bool SetVideoSend(uint32_t ssrc, - bool enable, - const VideoOptions* options, - rtc::VideoSourceInterface* source); - webrtc::RtpParameters GetRtpSendParameters(uint32_t ssrc) const; - bool SetRtpSendParameters(uint32_t ssrc, - const webrtc::RtpParameters& parameters); - webrtc::RtpParameters GetRtpReceiveParameters(uint32_t ssrc) const; - bool SetRtpReceiveParameters(uint32_t ssrc, - const webrtc::RtpParameters& parameters); - cricket::MediaType media_type() override { return cricket::MEDIA_TYPE_VIDEO; } - - private: - // overrides from BaseChannel - void UpdateMediaSendRecvState_w() override; - const ContentInfo* GetFirstContent(const SessionDescription* sdesc) override; - bool SetLocalContent_w(const MediaContentDescription* content, - ContentAction action, - std::string* error_desc) override; - bool SetRemoteContent_w(const MediaContentDescription* content, - ContentAction action, - std::string* error_desc) override; - bool GetStats_w(VideoMediaInfo* stats); - webrtc::RtpParameters GetRtpSendParameters_w(uint32_t ssrc) const; - bool SetRtpSendParameters_w(uint32_t ssrc, webrtc::RtpParameters parameters); - webrtc::RtpParameters GetRtpReceiveParameters_w(uint32_t ssrc) const; - bool SetRtpReceiveParameters_w(uint32_t ssrc, - webrtc::RtpParameters parameters); - - void OnMessage(rtc::Message* pmsg) override; - void GetSrtpCryptoSuites_n(std::vector* crypto_suites) const override; - void OnConnectionMonitorUpdate( - ConnectionMonitor* monitor, - const std::vector& infos) override; - void OnMediaMonitorUpdate(VideoMediaChannel* media_channel, - const VideoMediaInfo& info); - - std::unique_ptr media_monitor_; - - // Last VideoSendParameters sent down to the media_channel() via - // SetSendParameters. - VideoSendParameters last_send_params_; - // Last VideoRecvParameters sent down to the media_channel() via - // SetRecvParameters. - VideoRecvParameters last_recv_params_; -}; - -// RtpDataChannel is a specialization for data. -class RtpDataChannel : public BaseChannel { - public: - RtpDataChannel(rtc::Thread* worker_thread, - rtc::Thread* network_thread, - rtc::Thread* signaling_thread, - DataMediaChannel* channel, - const std::string& content_name, - bool rtcp_mux_required, - bool srtp_required); - ~RtpDataChannel(); - bool Init_w(DtlsTransportInternal* rtp_dtls_transport, - DtlsTransportInternal* rtcp_dtls_transport); - - virtual bool SendData(const SendDataParams& params, - const rtc::CopyOnWriteBuffer& payload, - SendDataResult* result); - - void StartMediaMonitor(int cms); - void StopMediaMonitor(); - - // Should be called on the signaling thread only. - bool ready_to_send_data() const { - return ready_to_send_data_; - } - - sigslot::signal2 SignalMediaMonitor; - sigslot::signal2&> - SignalConnectionMonitor; - - sigslot::signal2 - SignalDataReceived; - // Signal for notifying when the channel becomes ready to send data. - // That occurs when the channel is enabled, the transport is writable, - // both local and remote descriptions are set, and the channel is unblocked. - sigslot::signal1 SignalReadyToSendData; - cricket::MediaType media_type() override { return cricket::MEDIA_TYPE_DATA; } - - protected: - // downcasts a MediaChannel. - DataMediaChannel* media_channel() const override { - return static_cast(BaseChannel::media_channel()); - } - - private: - struct SendDataMessageData : public rtc::MessageData { - SendDataMessageData(const SendDataParams& params, - const rtc::CopyOnWriteBuffer* payload, - SendDataResult* result) - : params(params), - payload(payload), - result(result), - succeeded(false) { - } - - const SendDataParams& params; - const rtc::CopyOnWriteBuffer* payload; - SendDataResult* result; - bool succeeded; - }; - - struct DataReceivedMessageData : public rtc::MessageData { - // We copy the data because the data will become invalid after we - // handle DataMediaChannel::SignalDataReceived but before we fire - // SignalDataReceived. - DataReceivedMessageData( - const ReceiveDataParams& params, const char* data, size_t len) - : params(params), - payload(data, len) { - } - const ReceiveDataParams params; - const rtc::CopyOnWriteBuffer payload; - }; - - typedef rtc::TypedMessageData DataChannelReadyToSendMessageData; - - // overrides from BaseChannel - const ContentInfo* GetFirstContent(const SessionDescription* sdesc) override; - // Checks that data channel type is RTP. - bool CheckDataChannelTypeFromContent(const DataContentDescription* content, - std::string* error_desc); - bool SetLocalContent_w(const MediaContentDescription* content, - ContentAction action, - std::string* error_desc) override; - bool SetRemoteContent_w(const MediaContentDescription* content, - ContentAction action, - std::string* error_desc) override; - void UpdateMediaSendRecvState_w() override; - - void OnMessage(rtc::Message* pmsg) override; - void GetSrtpCryptoSuites_n(std::vector* crypto_suites) const override; - void OnConnectionMonitorUpdate( - ConnectionMonitor* monitor, - const std::vector& infos) override; - void OnMediaMonitorUpdate(DataMediaChannel* media_channel, - const DataMediaInfo& info); - void OnDataReceived( - const ReceiveDataParams& params, const char* data, size_t len); - void OnDataChannelError(uint32_t ssrc, DataMediaChannel::Error error); - void OnDataChannelReadyToSend(bool writable); - - std::unique_ptr media_monitor_; - bool ready_to_send_data_ = false; - - // Last DataSendParameters sent down to the media_channel() via - // SetSendParameters. - DataSendParameters last_send_params_; - // Last DataRecvParameters sent down to the media_channel() via - // SetRecvParameters. - DataRecvParameters last_recv_params_; -}; - -} // namespace cricket - -#endif // WEBRTC_PC_CHANNEL_H_ diff --git a/WebRtc.NET/include/webrtc/pc/channelmanager.h b/WebRtc.NET/include/webrtc/pc/channelmanager.h deleted file mode 100644 index 879ea4d3..00000000 --- a/WebRtc.NET/include/webrtc/pc/channelmanager.h +++ /dev/null @@ -1,220 +0,0 @@ -/* - * Copyright 2004 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_PC_CHANNELMANAGER_H_ -#define WEBRTC_PC_CHANNELMANAGER_H_ - -#include -#include -#include - -#include "webrtc/base/fileutils.h" -#include "webrtc/base/thread.h" -#include "webrtc/media/base/mediaengine.h" -#include "webrtc/pc/voicechannel.h" - -namespace webrtc { -class MediaControllerInterface; -} -namespace cricket { - -class VoiceChannel; - -// ChannelManager allows the MediaEngine to run on a separate thread, and takes -// care of marshalling calls between threads. It also creates and keeps track of -// voice and video channels; by doing so, it can temporarily pause all the -// channels when a new audio or video device is chosen. The voice and video -// channels are stored in separate vectors, to easily allow operations on just -// voice or just video channels. -// ChannelManager also allows the application to discover what devices it has -// using device manager. -class ChannelManager { - public: - // For testing purposes. Allows the media engine and data media - // engine and dev manager to be mocks. The ChannelManager takes - // ownership of these objects. - ChannelManager(MediaEngineInterface* me, - DataEngineInterface* dme, - rtc::Thread* worker_and_network); - // Same as above, but gives an easier default DataEngine. - ChannelManager(MediaEngineInterface* me, - rtc::Thread* worker, - rtc::Thread* network); - ~ChannelManager(); - - // Accessors for the worker thread, allowing it to be set after construction, - // but before Init. set_worker_thread will return false if called after Init. - rtc::Thread* worker_thread() const { return worker_thread_; } - bool set_worker_thread(rtc::Thread* thread) { - if (initialized_) { - return false; - } - worker_thread_ = thread; - return true; - } - rtc::Thread* network_thread() const { return network_thread_; } - bool set_network_thread(rtc::Thread* thread) { - if (initialized_) { - return false; - } - network_thread_ = thread; - return true; - } - - MediaEngineInterface* media_engine() { return media_engine_.get(); } - - // Retrieves the list of supported audio & video codec types. - // Can be called before starting the media engine. - void GetSupportedAudioSendCodecs(std::vector* codecs) const; - void GetSupportedAudioReceiveCodecs(std::vector* codecs) const; - void GetSupportedAudioRtpHeaderExtensions(RtpHeaderExtensions* ext) const; - void GetSupportedVideoCodecs(std::vector* codecs) const; - void GetSupportedVideoRtpHeaderExtensions(RtpHeaderExtensions* ext) const; - void GetSupportedDataCodecs(std::vector* codecs) const; - - // Indicates whether the media engine is started. - bool initialized() const { return initialized_; } - // Starts up the media engine. - bool Init(); - // Shuts down the media engine. - void Terminate(); - - // The operations below all occur on the worker thread. - // Creates a voice channel, to be associated with the specified session. - VoiceChannel* CreateVoiceChannel( - webrtc::MediaControllerInterface* media_controller, - DtlsTransportInternal* rtp_transport, - DtlsTransportInternal* rtcp_transport, - rtc::Thread* signaling_thread, - const std::string& content_name, - const std::string* bundle_transport_name, - bool rtcp_mux_required, - bool srtp_required, - const AudioOptions& options); - // Destroys a voice channel created with the Create API. - void DestroyVoiceChannel(VoiceChannel* voice_channel); - // Creates a video channel, synced with the specified voice channel, and - // associated with the specified session. - VideoChannel* CreateVideoChannel( - webrtc::MediaControllerInterface* media_controller, - DtlsTransportInternal* rtp_transport, - DtlsTransportInternal* rtcp_transport, - rtc::Thread* signaling_thread, - const std::string& content_name, - const std::string* bundle_transport_name, - bool rtcp_mux_required, - bool srtp_required, - const VideoOptions& options); - // Destroys a video channel created with the Create API. - void DestroyVideoChannel(VideoChannel* video_channel); - RtpDataChannel* CreateRtpDataChannel( - webrtc::MediaControllerInterface* media_controller, - DtlsTransportInternal* rtp_transport, - DtlsTransportInternal* rtcp_transport, - rtc::Thread* signaling_thread, - const std::string& content_name, - const std::string* bundle_transport_name, - bool rtcp_mux_required, - bool srtp_required); - // Destroys a data channel created with the Create API. - void DestroyRtpDataChannel(RtpDataChannel* data_channel); - - // Indicates whether any channels exist. - bool has_channels() const { - return (!voice_channels_.empty() || !video_channels_.empty()); - } - - // RTX will be enabled/disabled in engines that support it. The supporting - // engines will start offering an RTX codec. Must be called before Init(). - bool SetVideoRtxEnabled(bool enable); - - // Define crypto options to set on newly created channels. Doesn't change - // options on already created channels. - bool SetCryptoOptions(const rtc::CryptoOptions& crypto_options); - - // Starts/stops the local microphone and enables polling of the input level. - bool capturing() const { return capturing_; } - - // The operations below occur on the main thread. - - // Starts AEC dump using existing file, with a specified maximum file size in - // bytes. When the limit is reached, logging will stop and the file will be - // closed. If max_size_bytes is set to <= 0, no limit will be used. - bool StartAecDump(rtc::PlatformFile file, int64_t max_size_bytes); - - // Stops recording AEC dump. - void StopAecDump(); - - private: - typedef std::vector VoiceChannels; - typedef std::vector VideoChannels; - typedef std::vector RtpDataChannels; - - void Construct(MediaEngineInterface* me, - DataEngineInterface* dme, - rtc::Thread* worker_thread, - rtc::Thread* network_thread); - bool InitMediaEngine_w(); - void DestructorDeletes_w(); - void Terminate_w(); - bool SetCryptoOptions_w(const rtc::CryptoOptions& crypto_options); - VoiceChannel* CreateVoiceChannel_w( - webrtc::MediaControllerInterface* media_controller, - DtlsTransportInternal* rtp_transport, - DtlsTransportInternal* rtcp_transport, - rtc::Thread* signaling_thread, - const std::string& content_name, - const std::string* bundle_transport_name, - bool rtcp_mux_required, - bool srtp_required, - const AudioOptions& options); - void DestroyVoiceChannel_w(VoiceChannel* voice_channel); - VideoChannel* CreateVideoChannel_w( - webrtc::MediaControllerInterface* media_controller, - DtlsTransportInternal* rtp_transport, - DtlsTransportInternal* rtcp_transport, - rtc::Thread* signaling_thread, - const std::string& content_name, - const std::string* bundle_transport_name, - bool rtcp_mux_required, - bool srtp_required, - const VideoOptions& options); - void DestroyVideoChannel_w(VideoChannel* video_channel); - RtpDataChannel* CreateRtpDataChannel_w( - webrtc::MediaControllerInterface* media_controller, - DtlsTransportInternal* rtp_transport, - DtlsTransportInternal* rtcp_transport, - rtc::Thread* signaling_thread, - const std::string& content_name, - const std::string* bundle_transport_name, - bool rtcp_mux_required, - bool srtp_required); - void DestroyRtpDataChannel_w(RtpDataChannel* data_channel); - - std::unique_ptr media_engine_; - std::unique_ptr data_media_engine_; - bool initialized_; - rtc::Thread* main_thread_; - rtc::Thread* worker_thread_; - rtc::Thread* network_thread_; - - VoiceChannels voice_channels_; - VideoChannels video_channels_; - RtpDataChannels data_channels_; - - bool enable_rtx_; - rtc::CryptoOptions crypto_options_; - - bool capturing_; -}; - -} // namespace cricket - -#endif // WEBRTC_PC_CHANNELMANAGER_H_ diff --git a/WebRtc.NET/include/webrtc/pc/currentspeakermonitor.h b/WebRtc.NET/include/webrtc/pc/currentspeakermonitor.h deleted file mode 100644 index 14ed8762..00000000 --- a/WebRtc.NET/include/webrtc/pc/currentspeakermonitor.h +++ /dev/null @@ -1,96 +0,0 @@ -/* - * Copyright 2011 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -// CurrentSpeakerMonitor monitors the audio levels for a session and determines -// which participant is currently speaking. - -#ifndef WEBRTC_PC_CURRENTSPEAKERMONITOR_H_ -#define WEBRTC_PC_CURRENTSPEAKERMONITOR_H_ - -#include - -#include - -#include "webrtc/base/sigslot.h" - -namespace cricket { - -struct AudioInfo; -struct MediaStreams; - -class AudioSourceContext { - public: - sigslot::signal2 - SignalAudioMonitor; - sigslot::signal1 SignalMediaStreamsReset; - sigslot::signal3 SignalMediaStreamsUpdate; -}; - -// CurrentSpeakerMonitor can be used to monitor the audio-levels from -// many audio-sources and report on changes in the loudest audio-source. -// Its a generic type and relies on an AudioSourceContext which is aware of -// the audio-sources. AudioSourceContext needs to provide two signals namely -// SignalAudioInfoMonitor - provides audio info of the all current speakers. -// SignalMediaSourcesUpdated - provides updates when a speaker leaves or joins. -// Note that the AudioSourceContext's audio monitor must be started -// before this is started. -// It's recommended that the audio monitor be started with a 100 ms period. -class CurrentSpeakerMonitor : public sigslot::has_slots<> { - public: - explicit CurrentSpeakerMonitor(AudioSourceContext* audio_source_context); - ~CurrentSpeakerMonitor(); - - void Start(); - void Stop(); - - // Used by tests. Note that the actual minimum time between switches - // enforced by the monitor will be the given value plus or minus the - // resolution of the system clock. - void set_min_time_between_switches(int min_time_between_switches); - - // This is fired when the current speaker changes, and provides his audio - // SSRC. This only fires after the audio monitor on the underlying - // AudioSourceContext has been started. - sigslot::signal2 SignalUpdate; - - private: - void OnAudioMonitor(AudioSourceContext* audio_source_context, - const AudioInfo& info); - void OnMediaStreamsUpdate(AudioSourceContext* audio_source_context, - const MediaStreams& added, - const MediaStreams& removed); - void OnMediaStreamsReset(AudioSourceContext* audio_source_context); - - // These are states that a participant will pass through so that we gradually - // recognize that they have started and stopped speaking. This avoids - // "twitchiness". - enum SpeakingState { - SS_NOT_SPEAKING, - SS_MIGHT_BE_SPEAKING, - SS_SPEAKING, - SS_WAS_SPEAKING_RECENTLY1, - SS_WAS_SPEAKING_RECENTLY2 - }; - - bool started_; - AudioSourceContext* audio_source_context_; - std::map ssrc_to_speaking_state_map_; - uint32_t current_speaker_ssrc_; - // To prevent overswitching, switching is disabled for some time after a - // switch is made. This gives us the earliest time a switch is permitted. - int64_t earliest_permitted_switch_time_; - int min_time_between_switches_; -}; - -} // namespace cricket - -#endif // WEBRTC_PC_CURRENTSPEAKERMONITOR_H_ diff --git a/WebRtc.NET/include/webrtc/pc/mediamonitor.h b/WebRtc.NET/include/webrtc/pc/mediamonitor.h deleted file mode 100644 index d294cf13..00000000 --- a/WebRtc.NET/include/webrtc/pc/mediamonitor.h +++ /dev/null @@ -1,82 +0,0 @@ -/* - * Copyright 2005 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -// Class to collect statistics from a media channel - -#ifndef WEBRTC_PC_MEDIAMONITOR_H_ -#define WEBRTC_PC_MEDIAMONITOR_H_ - -#include "webrtc/base/criticalsection.h" -#include "webrtc/base/sigslot.h" -#include "webrtc/base/thread.h" -#include "webrtc/base/thread_annotations.h" -#include "webrtc/media/base/mediachannel.h" - -namespace cricket { - -// The base MediaMonitor class, independent of voice and video. -class MediaMonitor : public rtc::MessageHandler, - public sigslot::has_slots<> { - public: - MediaMonitor(rtc::Thread* worker_thread, - rtc::Thread* monitor_thread); - ~MediaMonitor(); - - void Start(uint32_t milliseconds); - void Stop(); - - protected: - void OnMessage(rtc::Message *message); - void PollMediaChannel(); - virtual void GetStats() = 0; - virtual void Update() = 0; - - rtc::CriticalSection crit_; - rtc::Thread* worker_thread_; - rtc::Thread* monitor_thread_; - bool monitoring_; - uint32_t rate_; -}; - -// Templatized MediaMonitor that can deal with different kinds of media. -template -class MediaMonitorT : public MediaMonitor { - public: - MediaMonitorT(MC* media_channel, rtc::Thread* worker_thread, - rtc::Thread* monitor_thread) - : MediaMonitor(worker_thread, monitor_thread), - media_channel_(media_channel) {} - sigslot::signal2 SignalUpdate; - - protected: - // These routines assume the crit_ lock is held by the calling thread. - virtual void GetStats() { - media_info_.Clear(); - media_channel_->GetStats(&media_info_); - } - virtual void Update() EXCLUSIVE_LOCKS_REQUIRED(crit_) { - MI stats(media_info_); - crit_.Leave(); - SignalUpdate(media_channel_, stats); - crit_.Enter(); - } - - private: - MC* media_channel_; - MI media_info_; -}; - -typedef MediaMonitorT VoiceMediaMonitor; -typedef MediaMonitorT VideoMediaMonitor; -typedef MediaMonitorT DataMediaMonitor; - -} // namespace cricket - -#endif // WEBRTC_PC_MEDIAMONITOR_H_ diff --git a/WebRtc.NET/include/webrtc/pc/mediasession.h b/WebRtc.NET/include/webrtc/pc/mediasession.h deleted file mode 100644 index ee2126d9..00000000 --- a/WebRtc.NET/include/webrtc/pc/mediasession.h +++ /dev/null @@ -1,618 +0,0 @@ -/* - * Copyright 2004 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -// Types and classes used in media session descriptions. - -#ifndef WEBRTC_PC_MEDIASESSION_H_ -#define WEBRTC_PC_MEDIASESSION_H_ - -#include -#include -#include -#include - -#include "webrtc/media/base/codec.h" -#include "webrtc/media/base/cryptoparams.h" -#include "webrtc/media/base/mediachannel.h" -#include "webrtc/media/base/mediaconstants.h" -#include "webrtc/media/base/mediaengine.h" // For DataChannelType -#include "webrtc/media/base/streamparams.h" -#include "webrtc/p2p/base/sessiondescription.h" -#include "webrtc/p2p/base/jseptransport.h" -#include "webrtc/p2p/base/transportdescriptionfactory.h" - -namespace cricket { - -class ChannelManager; -typedef std::vector AudioCodecs; -typedef std::vector VideoCodecs; -typedef std::vector DataCodecs; -typedef std::vector CryptoParamsVec; -typedef std::vector RtpHeaderExtensions; - -enum MediaType { - MEDIA_TYPE_AUDIO, - MEDIA_TYPE_VIDEO, - MEDIA_TYPE_DATA -}; - -std::string MediaTypeToString(MediaType type); - -enum MediaContentDirection { - MD_INACTIVE, - MD_SENDONLY, - MD_RECVONLY, - MD_SENDRECV -}; - -std::string MediaContentDirectionToString(MediaContentDirection direction); - -enum CryptoType { - CT_NONE, - CT_SDES, - CT_DTLS -}; - -// RTC4585 RTP/AVPF -extern const char kMediaProtocolAvpf[]; -// RFC5124 RTP/SAVPF -extern const char kMediaProtocolSavpf[]; - -extern const char kMediaProtocolDtlsSavpf[]; - -extern const char kMediaProtocolRtpPrefix[]; - -extern const char kMediaProtocolSctp[]; -extern const char kMediaProtocolDtlsSctp[]; -extern const char kMediaProtocolUdpDtlsSctp[]; -extern const char kMediaProtocolTcpDtlsSctp[]; - -// Options to control how session descriptions are generated. -const int kAutoBandwidth = -1; -const int kBufferedModeDisabled = 0; - -// Default RTCP CNAME for unit tests. -const char kDefaultRtcpCname[] = "DefaultRtcpCname"; - -struct RtpTransceiverDirection { - bool send; - bool recv; - - RtpTransceiverDirection(bool send, bool recv) : send(send), recv(recv) {} - - bool operator==(const RtpTransceiverDirection& o) const { - return send == o.send && recv == o.recv; - } - - bool operator!=(const RtpTransceiverDirection& o) const { - return !(*this == o); - } - - static RtpTransceiverDirection FromMediaContentDirection( - MediaContentDirection md); - - MediaContentDirection ToMediaContentDirection() const; -}; - -RtpTransceiverDirection -NegotiateRtpTransceiverDirection(RtpTransceiverDirection offer, - RtpTransceiverDirection wants); - -struct MediaSessionOptions { - MediaSessionOptions() - : recv_audio(true), - recv_video(false), - data_channel_type(DCT_NONE), - is_muc(false), - vad_enabled(true), // When disabled, removes all CN codecs from SDP. - rtcp_mux_enabled(true), - bundle_enabled(false), - video_bandwidth(kAutoBandwidth), - data_bandwidth(kDataMaxBandwidth), - rtcp_cname(kDefaultRtcpCname) {} - - bool has_audio() const { - return recv_audio || HasSendMediaStream(MEDIA_TYPE_AUDIO); - } - bool has_video() const { - return recv_video || HasSendMediaStream(MEDIA_TYPE_VIDEO); - } - bool has_data() const { return data_channel_type != DCT_NONE; } - - // Add a stream with MediaType type and id. - // All streams with the same sync_label will get the same CNAME. - // All ids must be unique. - void AddSendStream(MediaType type, - const std::string& id, - const std::string& sync_label); - void AddSendVideoStream(const std::string& id, - const std::string& sync_label, - int num_sim_layers); - void RemoveSendStream(MediaType type, const std::string& id); - - - // Helper function. - void AddSendStreamInternal(MediaType type, - const std::string& id, - const std::string& sync_label, - int num_sim_layers); - - bool HasSendMediaStream(MediaType type) const; - - // TODO(deadbeef): Put all the audio/video/data-specific options into a map - // structure (content name -> options). - // MediaSessionDescriptionFactory assumes there will never be more than one - // audio/video/data content, but this will change with unified plan. - bool recv_audio; - bool recv_video; - DataChannelType data_channel_type; - bool is_muc; - bool vad_enabled; - bool rtcp_mux_enabled; - bool bundle_enabled; - // bps. -1 == auto. - int video_bandwidth; - int data_bandwidth; - bool enable_ice_renomination = false; - // content name ("mid") => options. - std::map transport_options; - std::string rtcp_cname; - rtc::CryptoOptions crypto_options; - - struct Stream { - Stream(MediaType type, - const std::string& id, - const std::string& sync_label, - int num_sim_layers) - : type(type), id(id), sync_label(sync_label), - num_sim_layers(num_sim_layers) { - } - MediaType type; - std::string id; - std::string sync_label; - int num_sim_layers; - }; - - typedef std::vector Streams; - Streams streams; -}; - -// "content" (as used in XEP-0166) descriptions for voice and video. -class MediaContentDescription : public ContentDescription { - public: - MediaContentDescription() {} - - virtual MediaType type() const = 0; - virtual bool has_codecs() const = 0; - - // |protocol| is the expected media transport protocol, such as RTP/AVPF, - // RTP/SAVPF or SCTP/DTLS. - std::string protocol() const { return protocol_; } - void set_protocol(const std::string& protocol) { protocol_ = protocol; } - - MediaContentDirection direction() const { return direction_; } - void set_direction(MediaContentDirection direction) { - direction_ = direction; - } - - bool rtcp_mux() const { return rtcp_mux_; } - void set_rtcp_mux(bool mux) { rtcp_mux_ = mux; } - - bool rtcp_reduced_size() const { return rtcp_reduced_size_; } - void set_rtcp_reduced_size(bool reduced_size) { - rtcp_reduced_size_ = reduced_size; - } - - int bandwidth() const { return bandwidth_; } - void set_bandwidth(int bandwidth) { bandwidth_ = bandwidth; } - - const std::vector& cryptos() const { return cryptos_; } - void AddCrypto(const CryptoParams& params) { - cryptos_.push_back(params); - } - void set_cryptos(const std::vector& cryptos) { - cryptos_ = cryptos; - } - - CryptoType crypto_required() const { return crypto_required_; } - void set_crypto_required(CryptoType type) { - crypto_required_ = type; - } - - const RtpHeaderExtensions& rtp_header_extensions() const { - return rtp_header_extensions_; - } - void set_rtp_header_extensions(const RtpHeaderExtensions& extensions) { - rtp_header_extensions_ = extensions; - rtp_header_extensions_set_ = true; - } - void AddRtpHeaderExtension(const webrtc::RtpExtension& ext) { - rtp_header_extensions_.push_back(ext); - rtp_header_extensions_set_ = true; - } - void AddRtpHeaderExtension(const cricket::RtpHeaderExtension& ext) { - webrtc::RtpExtension webrtc_extension; - webrtc_extension.uri = ext.uri; - webrtc_extension.id = ext.id; - rtp_header_extensions_.push_back(webrtc_extension); - rtp_header_extensions_set_ = true; - } - void ClearRtpHeaderExtensions() { - rtp_header_extensions_.clear(); - rtp_header_extensions_set_ = true; - } - // We can't always tell if an empty list of header extensions is - // because the other side doesn't support them, or just isn't hooked up to - // signal them. For now we assume an empty list means no signaling, but - // provide the ClearRtpHeaderExtensions method to allow "no support" to be - // clearly indicated (i.e. when derived from other information). - bool rtp_header_extensions_set() const { - return rtp_header_extensions_set_; - } - // True iff the client supports multiple streams. - void set_multistream(bool multistream) { multistream_ = multistream; } - bool multistream() const { return multistream_; } - const StreamParamsVec& streams() const { - return streams_; - } - // TODO(pthatcher): Remove this by giving mediamessage.cc access - // to MediaContentDescription - StreamParamsVec& mutable_streams() { - return streams_; - } - void AddStream(const StreamParams& stream) { - streams_.push_back(stream); - } - // Legacy streams have an ssrc, but nothing else. - void AddLegacyStream(uint32_t ssrc) { - streams_.push_back(StreamParams::CreateLegacy(ssrc)); - } - void AddLegacyStream(uint32_t ssrc, uint32_t fid_ssrc) { - StreamParams sp = StreamParams::CreateLegacy(ssrc); - sp.AddFidSsrc(ssrc, fid_ssrc); - streams_.push_back(sp); - } - // Sets the CNAME of all StreamParams if it have not been set. - // This can be used to set the CNAME of legacy streams. - void SetCnameIfEmpty(const std::string& cname) { - for (cricket::StreamParamsVec::iterator it = streams_.begin(); - it != streams_.end(); ++it) { - if (it->cname.empty()) - it->cname = cname; - } - } - uint32_t first_ssrc() const { - if (streams_.empty()) { - return 0; - } - return streams_[0].first_ssrc(); - } - bool has_ssrcs() const { - if (streams_.empty()) { - return false; - } - return streams_[0].has_ssrcs(); - } - - void set_conference_mode(bool enable) { conference_mode_ = enable; } - bool conference_mode() const { return conference_mode_; } - - void set_partial(bool partial) { partial_ = partial; } - bool partial() const { return partial_; } - - void set_buffered_mode_latency(int latency) { - buffered_mode_latency_ = latency; - } - int buffered_mode_latency() const { return buffered_mode_latency_; } - - protected: - bool rtcp_mux_ = false; - bool rtcp_reduced_size_ = false; - int bandwidth_ = kAutoBandwidth; - std::string protocol_; - std::vector cryptos_; - CryptoType crypto_required_ = CT_NONE; - std::vector rtp_header_extensions_; - bool rtp_header_extensions_set_ = false; - bool multistream_ = false; - StreamParamsVec streams_; - bool conference_mode_ = false; - bool partial_ = false; - int buffered_mode_latency_ = kBufferedModeDisabled; - MediaContentDirection direction_ = MD_SENDRECV; -}; - -template -class MediaContentDescriptionImpl : public MediaContentDescription { - public: - typedef C CodecType; - - // Codecs should be in preference order (most preferred codec first). - const std::vector& codecs() const { return codecs_; } - void set_codecs(const std::vector& codecs) { codecs_ = codecs; } - virtual bool has_codecs() const { return !codecs_.empty(); } - bool HasCodec(int id) { - bool found = false; - for (typename std::vector::iterator iter = codecs_.begin(); - iter != codecs_.end(); ++iter) { - if (iter->id == id) { - found = true; - break; - } - } - return found; - } - void AddCodec(const C& codec) { - codecs_.push_back(codec); - } - void AddOrReplaceCodec(const C& codec) { - for (typename std::vector::iterator iter = codecs_.begin(); - iter != codecs_.end(); ++iter) { - if (iter->id == codec.id) { - *iter = codec; - return; - } - } - AddCodec(codec); - } - void AddCodecs(const std::vector& codecs) { - typename std::vector::const_iterator codec; - for (codec = codecs.begin(); codec != codecs.end(); ++codec) { - AddCodec(*codec); - } - } - - private: - std::vector codecs_; -}; - -class AudioContentDescription : public MediaContentDescriptionImpl { - public: - AudioContentDescription() : - agc_minus_10db_(false) {} - - virtual ContentDescription* Copy() const { - return new AudioContentDescription(*this); - } - virtual MediaType type() const { return MEDIA_TYPE_AUDIO; } - - const std::string &lang() const { return lang_; } - void set_lang(const std::string &lang) { lang_ = lang; } - - bool agc_minus_10db() const { return agc_minus_10db_; } - void set_agc_minus_10db(bool enable) { - agc_minus_10db_ = enable; - } - - private: - bool agc_minus_10db_; - - private: - std::string lang_; -}; - -class VideoContentDescription : public MediaContentDescriptionImpl { - public: - virtual ContentDescription* Copy() const { - return new VideoContentDescription(*this); - } - virtual MediaType type() const { return MEDIA_TYPE_VIDEO; } -}; - -class DataContentDescription : public MediaContentDescriptionImpl { - public: - virtual ContentDescription* Copy() const { - return new DataContentDescription(*this); - } - virtual MediaType type() const { return MEDIA_TYPE_DATA; } -}; - -// Creates media session descriptions according to the supplied codecs and -// other fields, as well as the supplied per-call options. -// When creating answers, performs the appropriate negotiation -// of the various fields to determine the proper result. -class MediaSessionDescriptionFactory { - public: - // Default ctor; use methods below to set configuration. - // The TransportDescriptionFactory is not owned by MediaSessionDescFactory, - // so it must be kept alive by the user of this class. - explicit MediaSessionDescriptionFactory( - const TransportDescriptionFactory* factory); - // This helper automatically sets up the factory to get its configuration - // from the specified ChannelManager. - MediaSessionDescriptionFactory(ChannelManager* cmanager, - const TransportDescriptionFactory* factory); - - const AudioCodecs& audio_sendrecv_codecs() const; - const AudioCodecs& audio_send_codecs() const; - const AudioCodecs& audio_recv_codecs() const; - void set_audio_codecs(const AudioCodecs& send_codecs, - const AudioCodecs& recv_codecs); - void set_audio_rtp_header_extensions(const RtpHeaderExtensions& extensions) { - audio_rtp_extensions_ = extensions; - } - const RtpHeaderExtensions& audio_rtp_header_extensions() const { - return audio_rtp_extensions_; - } - const VideoCodecs& video_codecs() const { return video_codecs_; } - void set_video_codecs(const VideoCodecs& codecs) { video_codecs_ = codecs; } - void set_video_rtp_header_extensions(const RtpHeaderExtensions& extensions) { - video_rtp_extensions_ = extensions; - } - const RtpHeaderExtensions& video_rtp_header_extensions() const { - return video_rtp_extensions_; - } - const DataCodecs& data_codecs() const { return data_codecs_; } - void set_data_codecs(const DataCodecs& codecs) { data_codecs_ = codecs; } - SecurePolicy secure() const { return secure_; } - void set_secure(SecurePolicy s) { secure_ = s; } - // Decides if a StreamParams shall be added to the audio and video media - // content in SessionDescription when CreateOffer and CreateAnswer is called - // even if |options| don't include a Stream. This is needed to support legacy - // applications. |add_legacy_| is true per default. - void set_add_legacy_streams(bool add_legacy) { add_legacy_ = add_legacy; } - - SessionDescription* CreateOffer( - const MediaSessionOptions& options, - const SessionDescription* current_description) const; - SessionDescription* CreateAnswer( - const SessionDescription* offer, - const MediaSessionOptions& options, - const SessionDescription* current_description) const; - - private: - const AudioCodecs& GetAudioCodecsForOffer( - const RtpTransceiverDirection& direction) const; - const AudioCodecs& GetAudioCodecsForAnswer( - const RtpTransceiverDirection& offer, - const RtpTransceiverDirection& answer) const; - void GetCodecsToOffer(const SessionDescription* current_description, - const AudioCodecs& supported_audio_codecs, - const VideoCodecs& supported_video_codecs, - const DataCodecs& supported_data_codecs, - AudioCodecs* audio_codecs, - VideoCodecs* video_codecs, - DataCodecs* data_codecs) const; - void GetRtpHdrExtsToOffer(const SessionDescription* current_description, - RtpHeaderExtensions* audio_extensions, - RtpHeaderExtensions* video_extensions) const; - bool AddTransportOffer( - const std::string& content_name, - const TransportOptions& transport_options, - const SessionDescription* current_desc, - SessionDescription* offer) const; - - TransportDescription* CreateTransportAnswer( - const std::string& content_name, - const SessionDescription* offer_desc, - const TransportOptions& transport_options, - const SessionDescription* current_desc) const; - - bool AddTransportAnswer( - const std::string& content_name, - const TransportDescription& transport_desc, - SessionDescription* answer_desc) const; - - // Helpers for adding media contents to the SessionDescription. Returns true - // it succeeds or the media content is not needed, or false if there is any - // error. - - bool AddAudioContentForOffer( - const MediaSessionOptions& options, - const SessionDescription* current_description, - const RtpHeaderExtensions& audio_rtp_extensions, - const AudioCodecs& audio_codecs, - StreamParamsVec* current_streams, - SessionDescription* desc) const; - - bool AddVideoContentForOffer( - const MediaSessionOptions& options, - const SessionDescription* current_description, - const RtpHeaderExtensions& video_rtp_extensions, - const VideoCodecs& video_codecs, - StreamParamsVec* current_streams, - SessionDescription* desc) const; - - bool AddDataContentForOffer( - const MediaSessionOptions& options, - const SessionDescription* current_description, - DataCodecs* data_codecs, - StreamParamsVec* current_streams, - SessionDescription* desc) const; - - bool AddAudioContentForAnswer( - const SessionDescription* offer, - const MediaSessionOptions& options, - const SessionDescription* current_description, - StreamParamsVec* current_streams, - SessionDescription* answer) const; - - bool AddVideoContentForAnswer( - const SessionDescription* offer, - const MediaSessionOptions& options, - const SessionDescription* current_description, - StreamParamsVec* current_streams, - SessionDescription* answer) const; - - bool AddDataContentForAnswer( - const SessionDescription* offer, - const MediaSessionOptions& options, - const SessionDescription* current_description, - StreamParamsVec* current_streams, - SessionDescription* answer) const; - - AudioCodecs audio_send_codecs_; - AudioCodecs audio_recv_codecs_; - AudioCodecs audio_sendrecv_codecs_; - RtpHeaderExtensions audio_rtp_extensions_; - VideoCodecs video_codecs_; - RtpHeaderExtensions video_rtp_extensions_; - DataCodecs data_codecs_; - SecurePolicy secure_; - bool add_legacy_; - std::string lang_; - const TransportDescriptionFactory* transport_desc_factory_; -}; - -// Convenience functions. -bool IsMediaContent(const ContentInfo* content); -bool IsAudioContent(const ContentInfo* content); -bool IsVideoContent(const ContentInfo* content); -bool IsDataContent(const ContentInfo* content); -const ContentInfo* GetFirstMediaContent(const ContentInfos& contents, - MediaType media_type); -const ContentInfo* GetFirstAudioContent(const ContentInfos& contents); -const ContentInfo* GetFirstVideoContent(const ContentInfos& contents); -const ContentInfo* GetFirstDataContent(const ContentInfos& contents); -const ContentInfo* GetFirstAudioContent(const SessionDescription* sdesc); -const ContentInfo* GetFirstVideoContent(const SessionDescription* sdesc); -const ContentInfo* GetFirstDataContent(const SessionDescription* sdesc); -const AudioContentDescription* GetFirstAudioContentDescription( - const SessionDescription* sdesc); -const VideoContentDescription* GetFirstVideoContentDescription( - const SessionDescription* sdesc); -const DataContentDescription* GetFirstDataContentDescription( - const SessionDescription* sdesc); -// Non-const versions of the above functions. -// Useful when modifying an existing description. -ContentInfo* GetFirstMediaContent(ContentInfos& contents, MediaType media_type); -ContentInfo* GetFirstAudioContent(ContentInfos& contents); -ContentInfo* GetFirstVideoContent(ContentInfos& contents); -ContentInfo* GetFirstDataContent(ContentInfos& contents); -ContentInfo* GetFirstAudioContent(SessionDescription* sdesc); -ContentInfo* GetFirstVideoContent(SessionDescription* sdesc); -ContentInfo* GetFirstDataContent(SessionDescription* sdesc); -AudioContentDescription* GetFirstAudioContentDescription( - SessionDescription* sdesc); -VideoContentDescription* GetFirstVideoContentDescription( - SessionDescription* sdesc); -DataContentDescription* GetFirstDataContentDescription( - SessionDescription* sdesc); - -void GetSupportedAudioCryptoSuites(const rtc::CryptoOptions& crypto_options, - std::vector* crypto_suites); -void GetSupportedVideoCryptoSuites(const rtc::CryptoOptions& crypto_options, - std::vector* crypto_suites); -void GetSupportedDataCryptoSuites(const rtc::CryptoOptions& crypto_options, - std::vector* crypto_suites); -void GetDefaultSrtpCryptoSuites(const rtc::CryptoOptions& crypto_options, - std::vector* crypto_suites); -void GetSupportedAudioCryptoSuiteNames(const rtc::CryptoOptions& crypto_options, - std::vector* crypto_suite_names); -void GetSupportedVideoCryptoSuiteNames(const rtc::CryptoOptions& crypto_options, - std::vector* crypto_suite_names); -void GetSupportedDataCryptoSuiteNames(const rtc::CryptoOptions& crypto_options, - std::vector* crypto_suite_names); -void GetDefaultSrtpCryptoSuiteNames(const rtc::CryptoOptions& crypto_options, - std::vector* crypto_suite_names); - -} // namespace cricket - -#endif // WEBRTC_PC_MEDIASESSION_H_ diff --git a/WebRtc.NET/include/webrtc/pc/srtpfilter.h b/WebRtc.NET/include/webrtc/pc/srtpfilter.h deleted file mode 100644 index 06edddf8..00000000 --- a/WebRtc.NET/include/webrtc/pc/srtpfilter.h +++ /dev/null @@ -1,312 +0,0 @@ -/* - * Copyright 2009 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_PC_SRTPFILTER_H_ -#define WEBRTC_PC_SRTPFILTER_H_ - -#include -#include -#include -#include -#include - -#include "webrtc/base/basictypes.h" -#include "webrtc/base/constructormagic.h" -#include "webrtc/base/criticalsection.h" -#include "webrtc/base/sigslotrepeater.h" -#include "webrtc/base/sslstreamadapter.h" -#include "webrtc/base/thread_checker.h" -#include "webrtc/media/base/cryptoparams.h" -#include "webrtc/p2p/base/sessiondescription.h" - -// Forward declaration to avoid pulling in libsrtp headers here -struct srtp_event_data_t; -struct srtp_ctx_t_; - -namespace cricket { - -class SrtpSession; -class SrtpStat; - -void ShutdownSrtp(); - -// Class to transform SRTP to/from RTP. -// Initialize by calling SetSend with the local security params, then call -// SetRecv once the remote security params are received. At that point -// Protect/UnprotectRt(c)p can be called to encrypt/decrypt data. -// TODO: Figure out concurrency policy for SrtpFilter. -class SrtpFilter { - public: - enum Mode { - PROTECT, - UNPROTECT - }; - enum Error { - ERROR_NONE, - ERROR_FAIL, - ERROR_AUTH, - ERROR_REPLAY, - }; - - SrtpFilter(); - ~SrtpFilter(); - - // Whether the filter is active (i.e. crypto has been properly negotiated). - bool IsActive() const; - - // Indicates which crypto algorithms and keys were contained in the offer. - // offer_params should contain a list of available parameters to use, or none, - // if crypto is not desired. This must be called before SetAnswer. - bool SetOffer(const std::vector& offer_params, - ContentSource source); - // Same as SetAnwer. But multiple calls are allowed to SetProvisionalAnswer - // after a call to SetOffer. - bool SetProvisionalAnswer(const std::vector& answer_params, - ContentSource source); - // Indicates which crypto algorithms and keys were contained in the answer. - // answer_params should contain the negotiated parameters, which may be none, - // if crypto was not desired or could not be negotiated (and not required). - // This must be called after SetOffer. If crypto negotiation completes - // successfully, this will advance the filter to the active state. - bool SetAnswer(const std::vector& answer_params, - ContentSource source); - - // Just set up both sets of keys directly. - // Used with DTLS-SRTP. - bool SetRtpParams(int send_cs, - const uint8_t* send_key, - int send_key_len, - int recv_cs, - const uint8_t* recv_key, - int recv_key_len); - bool SetRtcpParams(int send_cs, - const uint8_t* send_key, - int send_key_len, - int recv_cs, - const uint8_t* recv_key, - int recv_key_len); - - // Encrypts/signs an individual RTP/RTCP packet, in-place. - // If an HMAC is used, this will increase the packet size. - bool ProtectRtp(void* data, int in_len, int max_len, int* out_len); - // Overloaded version, outputs packet index. - bool ProtectRtp(void* data, - int in_len, - int max_len, - int* out_len, - int64_t* index); - bool ProtectRtcp(void* data, int in_len, int max_len, int* out_len); - // Decrypts/verifies an invidiual RTP/RTCP packet. - // If an HMAC is used, this will decrease the packet size. - bool UnprotectRtp(void* data, int in_len, int* out_len); - bool UnprotectRtcp(void* data, int in_len, int* out_len); - - // Returns rtp auth params from srtp context. - bool GetRtpAuthParams(uint8_t** key, int* key_len, int* tag_len); - - // Returns srtp overhead for rtp packets. - bool GetSrtpOverhead(int* srtp_overhead) const; - - // Update the silent threshold (in ms) for signaling errors. - void set_signal_silent_time(int signal_silent_time_in_ms); - - bool ResetParams(); - - sigslot::repeater3 SignalSrtpError; - - protected: - bool ExpectOffer(ContentSource source); - bool StoreParams(const std::vector& params, - ContentSource source); - bool ExpectAnswer(ContentSource source); - bool DoSetAnswer(const std::vector& answer_params, - ContentSource source, - bool final); - void CreateSrtpSessions(); - bool NegotiateParams(const std::vector& answer_params, - CryptoParams* selected_params); - bool ApplyParams(const CryptoParams& send_params, - const CryptoParams& recv_params); - static bool ParseKeyParams(const std::string& params, - uint8_t* key, - size_t len); - - private: - enum State { - ST_INIT, // SRTP filter unused. - ST_SENTOFFER, // Offer with SRTP parameters sent. - ST_RECEIVEDOFFER, // Offer with SRTP parameters received. - ST_SENTPRANSWER_NO_CRYPTO, // Sent provisional answer without crypto. - // Received provisional answer without crypto. - ST_RECEIVEDPRANSWER_NO_CRYPTO, - ST_ACTIVE, // Offer and answer set. - // SRTP filter is active but new parameters are offered. - // When the answer is set, the state transitions to ST_ACTIVE or ST_INIT. - ST_SENTUPDATEDOFFER, - // SRTP filter is active but new parameters are received. - // When the answer is set, the state transitions back to ST_ACTIVE. - ST_RECEIVEDUPDATEDOFFER, - // SRTP filter is active but the sent answer is only provisional. - // When the final answer is set, the state transitions to ST_ACTIVE or - // ST_INIT. - ST_SENTPRANSWER, - // SRTP filter is active but the received answer is only provisional. - // When the final answer is set, the state transitions to ST_ACTIVE or - // ST_INIT. - ST_RECEIVEDPRANSWER - }; - State state_; - int signal_silent_time_in_ms_; - std::vector offer_params_; - std::unique_ptr send_session_; - std::unique_ptr recv_session_; - std::unique_ptr send_rtcp_session_; - std::unique_ptr recv_rtcp_session_; - CryptoParams applied_send_params_; - CryptoParams applied_recv_params_; -}; - -// Class that wraps a libSRTP session. -class SrtpSession { - public: - SrtpSession(); - ~SrtpSession(); - - // Configures the session for sending data using the specified - // cipher-suite and key. Receiving must be done by a separate session. - bool SetSend(int cs, const uint8_t* key, size_t len); - // Configures the session for receiving data using the specified - // cipher-suite and key. Sending must be done by a separate session. - bool SetRecv(int cs, const uint8_t* key, size_t len); - - // Encrypts/signs an individual RTP/RTCP packet, in-place. - // If an HMAC is used, this will increase the packet size. - bool ProtectRtp(void* data, int in_len, int max_len, int* out_len); - // Overloaded version, outputs packet index. - bool ProtectRtp(void* data, - int in_len, - int max_len, - int* out_len, - int64_t* index); - bool ProtectRtcp(void* data, int in_len, int max_len, int* out_len); - // Decrypts/verifies an invidiual RTP/RTCP packet. - // If an HMAC is used, this will decrease the packet size. - bool UnprotectRtp(void* data, int in_len, int* out_len); - bool UnprotectRtcp(void* data, int in_len, int* out_len); - - // Helper method to get authentication params. - bool GetRtpAuthParams(uint8_t** key, int* key_len, int* tag_len); - - int GetSrtpOverhead() const; - - // Update the silent threshold (in ms) for signaling errors. - void set_signal_silent_time(int signal_silent_time_in_ms); - - // Calls srtp_shutdown if it's initialized. - static void Terminate(); - - sigslot::repeater3 - SignalSrtpError; - - private: - bool SetKey(int type, int cs, const uint8_t* key, size_t len); - // Returns send stream current packet index from srtp db. - bool GetSendStreamPacketIndex(void* data, int in_len, int64_t* index); - - static bool Init(); - void HandleEvent(const srtp_event_data_t* ev); - static void HandleEventThunk(srtp_event_data_t* ev); - - rtc::ThreadChecker thread_checker_; - srtp_ctx_t_* session_; - int rtp_auth_tag_len_; - int rtcp_auth_tag_len_; - std::unique_ptr srtp_stat_; - static bool inited_; - static rtc::GlobalLockPod lock_; - int last_send_seq_num_; - RTC_DISALLOW_COPY_AND_ASSIGN(SrtpSession); -}; - -// Class that collects failures of SRTP. -class SrtpStat { - public: - SrtpStat(); - - // Report RTP protection results to the handler. - void AddProtectRtpResult(uint32_t ssrc, int result); - // Report RTP unprotection results to the handler. - void AddUnprotectRtpResult(uint32_t ssrc, int result); - // Report RTCP protection results to the handler. - void AddProtectRtcpResult(int result); - // Report RTCP unprotection results to the handler. - void AddUnprotectRtcpResult(int result); - - // Get silent time (in ms) for SRTP statistics handler. - int signal_silent_time() const { return signal_silent_time_; } - // Set silent time (in ms) for SRTP statistics handler. - void set_signal_silent_time(int signal_silent_time) { - signal_silent_time_ = signal_silent_time; - } - - // Sigslot for reporting errors. - sigslot::signal3 - SignalSrtpError; - - private: - // For each different ssrc and error, we collect statistics separately. - struct FailureKey { - FailureKey() - : ssrc(0), - mode(SrtpFilter::PROTECT), - error(SrtpFilter::ERROR_NONE) { - } - FailureKey(uint32_t in_ssrc, - SrtpFilter::Mode in_mode, - SrtpFilter::Error in_error) - : ssrc(in_ssrc), mode(in_mode), error(in_error) {} - bool operator <(const FailureKey& key) const { - return - (ssrc < key.ssrc) || - (ssrc == key.ssrc && mode < key.mode) || - (ssrc == key.ssrc && mode == key.mode && error < key.error); - } - uint32_t ssrc; - SrtpFilter::Mode mode; - SrtpFilter::Error error; - }; - // For tracing conditions for signaling, currently we only use - // last_signal_time. Wrap this as a struct so that later on, if we need any - // other improvements, it will be easier. - struct FailureStat { - FailureStat() - : last_signal_time(0) { - } - explicit FailureStat(uint32_t in_last_signal_time) - : last_signal_time(in_last_signal_time) {} - void Reset() { - last_signal_time = 0; - } - int64_t last_signal_time; - }; - - // Inspect SRTP result and signal error if needed. - void HandleSrtpResult(const FailureKey& key); - - std::map failures_; - // Threshold in ms to silent the signaling errors. - int signal_silent_time_; - - RTC_DISALLOW_COPY_AND_ASSIGN(SrtpStat); -}; - -} // namespace cricket - -#endif // WEBRTC_PC_SRTPFILTER_H_ diff --git a/WebRtc.NET/include/webrtc/pc/voicechannel.h b/WebRtc.NET/include/webrtc/pc/voicechannel.h deleted file mode 100644 index 78524ab5..00000000 --- a/WebRtc.NET/include/webrtc/pc/voicechannel.h +++ /dev/null @@ -1,16 +0,0 @@ -/* - * Copyright 2004 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_PC_VOICECHANNEL_H_ -#define WEBRTC_PC_VOICECHANNEL_H_ - -#include "webrtc/pc/channel.h" - -#endif // WEBRTC_PC_VOICECHANNEL_H_ diff --git a/WebRtc.NET/include/webrtc/sdk/android/src/jni/androidmediadecoder_jni.h b/WebRtc.NET/include/webrtc/sdk/android/src/jni/androidmediadecoder_jni.h deleted file mode 100644 index be536fae..00000000 --- a/WebRtc.NET/include/webrtc/sdk/android/src/jni/androidmediadecoder_jni.h +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright 2015 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_SDK_ANDROID_SRC_JNI_ANDROIDMEDIADECODER_JNI_H_ -#define WEBRTC_SDK_ANDROID_SRC_JNI_ANDROIDMEDIADECODER_JNI_H_ - -#include "webrtc/sdk/android/src/jni/jni_helpers.h" -#include "webrtc/media/engine/webrtcvideodecoderfactory.h" - -namespace webrtc_jni { - -// Implementation of Android MediaCodec based decoder factory. -class MediaCodecVideoDecoderFactory - : public cricket::WebRtcVideoDecoderFactory { - public: - MediaCodecVideoDecoderFactory(); - virtual ~MediaCodecVideoDecoderFactory(); - - void SetEGLContext(JNIEnv* jni, jobject render_egl_context); - - // WebRtcVideoDecoderFactory implementation. - webrtc::VideoDecoder* CreateVideoDecoder(webrtc::VideoCodecType type) - override; - - void DestroyVideoDecoder(webrtc::VideoDecoder* decoder) override; - - private: - jobject egl_context_; - std::vector supported_codec_types_; -}; - -} // namespace webrtc_jni - -#endif // WEBRTC_SDK_ANDROID_SRC_JNI_ANDROIDMEDIADECODER_JNI_H_ diff --git a/WebRtc.NET/include/webrtc/sdk/android/src/jni/androidmediaencoder_jni.h b/WebRtc.NET/include/webrtc/sdk/android/src/jni/androidmediaencoder_jni.h deleted file mode 100644 index 76834ba9..00000000 --- a/WebRtc.NET/include/webrtc/sdk/android/src/jni/androidmediaencoder_jni.h +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Copyright 2015 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_SDK_ANDROID_SRC_JNI_ANDROIDMEDIAENCODER_JNI_H_ -#define WEBRTC_SDK_ANDROID_SRC_JNI_ANDROIDMEDIAENCODER_JNI_H_ - -#include - -#include "webrtc/sdk/android/src/jni/jni_helpers.h" -#include "webrtc/media/engine/webrtcvideoencoderfactory.h" - -namespace webrtc_jni { - -// Implementation of Android MediaCodec based encoder factory. -class MediaCodecVideoEncoderFactory - : public cricket::WebRtcVideoEncoderFactory { - public: - MediaCodecVideoEncoderFactory(); - virtual ~MediaCodecVideoEncoderFactory(); - - void SetEGLContext(JNIEnv* jni, jobject egl_context); - - // WebRtcVideoEncoderFactory implementation. - webrtc::VideoEncoder* CreateVideoEncoder( - const cricket::VideoCodec& codec) override; - const std::vector& supported_codecs() const override; - void DestroyVideoEncoder(webrtc::VideoEncoder* encoder) override; - - private: - // Disable overloaded virtual function warning. TODO(magjed): Remove once - // http://crbug/webrtc/6402 is fixed. - using cricket::WebRtcVideoEncoderFactory::CreateVideoEncoder; - - jobject egl_context_; - - // Empty if platform support is lacking, const after ctor returns. - std::vector supported_codecs_; -}; - -} // namespace webrtc_jni - -#endif // WEBRTC_SDK_ANDROID_SRC_JNI_ANDROIDMEDIAENCODER_JNI_H_ diff --git a/WebRtc.NET/include/webrtc/sdk/android/src/jni/androidnetworkmonitor_jni.h b/WebRtc.NET/include/webrtc/sdk/android/src/jni/androidnetworkmonitor_jni.h deleted file mode 100644 index 8df778e1..00000000 --- a/WebRtc.NET/include/webrtc/sdk/android/src/jni/androidnetworkmonitor_jni.h +++ /dev/null @@ -1,94 +0,0 @@ -/* - * Copyright 2015 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_SDK_ANDROID_SRC_JNI_ANDROIDNETWORKMONITOR_JNI_H_ -#define WEBRTC_SDK_ANDROID_SRC_JNI_ANDROIDNETWORKMONITOR_JNI_H_ - -#include "webrtc/base/networkmonitor.h" - -#include - -#include - -#include "webrtc/sdk/android/src/jni/jni_helpers.h" -#include "webrtc/base/thread_checker.h" - -namespace webrtc_jni { - -typedef int64_t NetworkHandle; - -// c++ equivalent of java NetworkMonitorAutoDetect.ConnectionType. -enum NetworkType { - NETWORK_UNKNOWN, - NETWORK_ETHERNET, - NETWORK_WIFI, - NETWORK_4G, - NETWORK_3G, - NETWORK_2G, - NETWORK_UNKNOWN_CELLULAR, - NETWORK_BLUETOOTH, - NETWORK_NONE -}; - -// The information is collected from Android OS so that the native code can get -// the network type and handle (Android network ID) for each interface. -struct NetworkInformation { - std::string interface_name; - NetworkHandle handle; - NetworkType type; - std::vector ip_addresses; - - std::string ToString() const; -}; - -class AndroidNetworkMonitor : public rtc::NetworkMonitorBase, - public rtc::NetworkBinderInterface { - public: - AndroidNetworkMonitor(); - - static void SetAndroidContext(JNIEnv* jni, jobject context); - - void Start() override; - void Stop() override; - - int BindSocketToNetwork(int socket_fd, - const rtc::IPAddress& address) override; - rtc::AdapterType GetAdapterType(const std::string& if_name) override; - void OnNetworkConnected(const NetworkInformation& network_info); - void OnNetworkDisconnected(NetworkHandle network_handle); - void SetNetworkInfos(const std::vector& network_infos); - - private: - static jobject application_context_; - static int android_sdk_int_; - JNIEnv* jni() { return AttachCurrentThreadIfNeeded(); } - - void OnNetworkConnected_w(const NetworkInformation& network_info); - void OnNetworkDisconnected_w(NetworkHandle network_handle); - - ScopedGlobalRef j_network_monitor_class_; - ScopedGlobalRef j_network_monitor_; - rtc::ThreadChecker thread_checker_; - bool started_ = false; - std::map adapter_type_by_name_; - std::map network_handle_by_address_; - std::map network_info_by_handle_; -}; - -class AndroidNetworkMonitorFactory : public rtc::NetworkMonitorFactory { - public: - AndroidNetworkMonitorFactory() {} - - rtc::NetworkMonitorInterface* CreateNetworkMonitor() override; -}; - -} // namespace webrtc_jni - -#endif // WEBRTC_SDK_ANDROID_SRC_JNI_ANDROIDNETWORKMONITOR_JNI_H_ diff --git a/WebRtc.NET/include/webrtc/sdk/android/src/jni/androidvideotracksource.h b/WebRtc.NET/include/webrtc/sdk/android/src/jni/androidvideotracksource.h deleted file mode 100644 index ae34c8d5..00000000 --- a/WebRtc.NET/include/webrtc/sdk/android/src/jni/androidvideotracksource.h +++ /dev/null @@ -1,84 +0,0 @@ -/* - * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_API_ANDROID_JNI_ANDROIDVIDEOTRACKSOURCE_H_ -#define WEBRTC_API_ANDROID_JNI_ANDROIDVIDEOTRACKSOURCE_H_ - -#include "webrtc/sdk/android/src/jni/native_handle_impl.h" -#include "webrtc/sdk/android/src/jni/surfacetexturehelper_jni.h" -#include "webrtc/base/asyncinvoker.h" -#include "webrtc/base/checks.h" -#include "webrtc/base/thread_checker.h" -#include "webrtc/base/timestampaligner.h" -#include "webrtc/common_video/include/i420_buffer_pool.h" -#include "webrtc/common_video/libyuv/include/webrtc_libyuv.h" -#include "webrtc/media/base/adaptedvideotracksource.h" - -namespace webrtc { - -class AndroidVideoTrackSource : public rtc::AdaptedVideoTrackSource { - public: - AndroidVideoTrackSource(rtc::Thread* signaling_thread, - JNIEnv* jni, - jobject j_egl_context, - bool is_screencast = false); - - bool is_screencast() const override { return is_screencast_; } - - // Indicates that the encoder should denoise video before encoding it. - // If it is not set, the default configuration is used which is different - // depending on video codec. - rtc::Optional needs_denoising() const override { - return rtc::Optional(false); - } - - // Called by the native capture observer - void SetState(SourceState state); - - SourceState state() const override { return state_; } - - bool remote() const override { return false; } - - void OnByteBufferFrameCaptured(const void* frame_data, - int length, - int width, - int height, - int rotation, - int64_t timestamp_ns); - - void OnTextureFrameCaptured(int width, - int height, - int rotation, - int64_t timestamp_ns, - const webrtc_jni::NativeHandleImpl& handle); - - void OnOutputFormatRequest(int width, int height, int fps); - - rtc::scoped_refptr - surface_texture_helper() { - return surface_texture_helper_; - } - - private: - rtc::Thread* signaling_thread_; - rtc::AsyncInvoker invoker_; - rtc::ThreadChecker camera_thread_checker_; - SourceState state_; - rtc::VideoBroadcaster broadcaster_; - rtc::TimestampAligner timestamp_aligner_; - webrtc::NV12ToI420Scaler nv12toi420_scaler_; - webrtc::I420BufferPool buffer_pool_; - rtc::scoped_refptr surface_texture_helper_; - const bool is_screencast_; -}; - -} // namespace webrtc - -#endif // WEBRTC_API_ANDROID_JNI_ANDROIDVIDEOTRACKSOURCE_H_ diff --git a/WebRtc.NET/include/webrtc/sdk/android/src/jni/classreferenceholder.h b/WebRtc.NET/include/webrtc/sdk/android/src/jni/classreferenceholder.h deleted file mode 100644 index 4859bcfb..00000000 --- a/WebRtc.NET/include/webrtc/sdk/android/src/jni/classreferenceholder.h +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright 2015 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -// Android's FindClass() is trickier than usual because the app-specific -// ClassLoader is not consulted when there is no app-specific frame on the -// stack. Consequently, we only look up all classes once in app/webrtc. -// http://developer.android.com/training/articles/perf-jni.html#faq_FindClass - -#ifndef WEBRTC_SDK_ANDROID_SRC_JNI_CLASSREFERENCEHOLDER_H_ -#define WEBRTC_SDK_ANDROID_SRC_JNI_CLASSREFERENCEHOLDER_H_ - -#include -#include -#include - -namespace webrtc_jni { - -// LoadGlobalClassReferenceHolder must be called in JNI_OnLoad. -void LoadGlobalClassReferenceHolder(); -// FreeGlobalClassReferenceHolder must be called in JNI_UnLoad. -void FreeGlobalClassReferenceHolder(); - -// Returns a global reference guaranteed to be valid for the lifetime of the -// process. -jclass FindClass(JNIEnv* jni, const char* name); - -// Convenience macro defining JNI-accessible methods in the org.webrtc package. -// Eliminates unnecessary boilerplate and line-wraps, reducing visual clutter. -#define JOW(rettype, name) \ - extern "C" JNIEXPORT rettype JNICALL Java_org_webrtc_##name - -} // namespace webrtc_jni - -#endif // WEBRTC_SDK_ANDROID_SRC_JNI_CLASSREFERENCEHOLDER_H_ diff --git a/WebRtc.NET/include/webrtc/sdk/android/src/jni/jni_helpers.h b/WebRtc.NET/include/webrtc/sdk/android/src/jni/jni_helpers.h deleted file mode 100644 index bed56838..00000000 --- a/WebRtc.NET/include/webrtc/sdk/android/src/jni/jni_helpers.h +++ /dev/null @@ -1,198 +0,0 @@ -/* - * Copyright 2015 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -// This file contain convenience functions and classes for JNI. -// Before using any of the methods, InitGlobalJniVariables must be called. - -#ifndef WEBRTC_SDK_ANDROID_SRC_JNI_JNI_HELPERS_H_ -#define WEBRTC_SDK_ANDROID_SRC_JNI_JNI_HELPERS_H_ - -#include -#include - -#include "webrtc/base/constructormagic.h" -#include "webrtc/base/checks.h" -#include "webrtc/base/thread_checker.h" - -// Abort the process if |jni| has a Java exception pending. -// This macros uses the comma operator to execute ExceptionDescribe -// and ExceptionClear ignoring their return values and sending "" -// to the error stream. -#define CHECK_EXCEPTION(jni) \ - RTC_CHECK(!jni->ExceptionCheck()) \ - << (jni->ExceptionDescribe(), jni->ExceptionClear(), "") - -// Helper that calls ptr->Release() and aborts the process with a useful -// message if that didn't actually delete *ptr because of extra refcounts. -#define CHECK_RELEASE(ptr) \ - RTC_CHECK_EQ(0, (ptr)->Release()) << "Unexpected refcount." - -namespace webrtc_jni { - -jint InitGlobalJniVariables(JavaVM *jvm); - -// Return a |JNIEnv*| usable on this thread or NULL if this thread is detached. -JNIEnv* GetEnv(); - -JavaVM *GetJVM(); - -// Return a |JNIEnv*| usable on this thread. Attaches to |g_jvm| if necessary. -JNIEnv* AttachCurrentThreadIfNeeded(); - -// Return a |jlong| that will correctly convert back to |ptr|. This is needed -// because the alternative (of silently passing a 32-bit pointer to a vararg -// function expecting a 64-bit param) picks up garbage in the high 32 bits. -jlong jlongFromPointer(void* ptr); - -// JNIEnv-helper methods that RTC_CHECK success: no Java exception thrown and -// found object/class/method/field is non-null. -jmethodID GetMethodID( - JNIEnv* jni, jclass c, const std::string& name, const char* signature); - -jmethodID GetStaticMethodID( - JNIEnv* jni, jclass c, const char* name, const char* signature); - -jfieldID GetFieldID(JNIEnv* jni, jclass c, const char* name, - const char* signature); - -jfieldID GetStaticFieldID(JNIEnv* jni, - jclass c, - const char* name, - const char* signature); - -jclass GetObjectClass(JNIEnv* jni, jobject object); - -// Throws an exception if the object field is null. -jobject GetObjectField(JNIEnv* jni, jobject object, jfieldID id); - -jobject GetStaticObjectField(JNIEnv* jni, jclass c, jfieldID id); - -jobject GetNullableObjectField(JNIEnv* jni, jobject object, jfieldID id); - -jstring GetStringField(JNIEnv* jni, jobject object, jfieldID id); - -jlong GetLongField(JNIEnv* jni, jobject object, jfieldID id); - -jint GetIntField(JNIEnv* jni, jobject object, jfieldID id); - -bool GetBooleanField(JNIEnv* jni, jobject object, jfieldID id); - -// Returns true if |obj| == null in Java. -bool IsNull(JNIEnv* jni, jobject obj); - -// Given a UTF-8 encoded |native| string return a new (UTF-16) jstring. -jstring JavaStringFromStdString(JNIEnv* jni, const std::string& native); - -// Given a (UTF-16) jstring return a new UTF-8 native string. -std::string JavaToStdString(JNIEnv* jni, const jstring& j_string); - -// Return the (singleton) Java Enum object corresponding to |index|; -jobject JavaEnumFromIndex(JNIEnv* jni, jclass state_class, - const std::string& state_class_name, int index); - -// Returns the name of a Java enum. -std::string GetJavaEnumName(JNIEnv* jni, - const std::string& className, - jobject j_enum); - -jobject NewGlobalRef(JNIEnv* jni, jobject o); - -void DeleteGlobalRef(JNIEnv* jni, jobject o); - -// Scope Java local references to the lifetime of this object. Use in all C++ -// callbacks (i.e. entry points that don't originate in a Java callstack -// through a "native" method call). -class ScopedLocalRefFrame { - public: - explicit ScopedLocalRefFrame(JNIEnv* jni); - ~ScopedLocalRefFrame(); - - private: - JNIEnv* jni_; -}; - -// Scoped holder for global Java refs. -template // T is jclass, jobject, jintArray, etc. -class ScopedGlobalRef { - public: - ScopedGlobalRef(JNIEnv* jni, T obj) - : obj_(static_cast(jni->NewGlobalRef(obj))) {} - ~ScopedGlobalRef() { - DeleteGlobalRef(AttachCurrentThreadIfNeeded(), obj_); - } - T operator*() const { - return obj_; - } - private: - T obj_; -}; - -// Provides a convenient way to iterate over a Java Iterable using the -// C++ range-for loop. -// E.g. for (jobject value : Iterable(jni, j_iterable)) { ... } -// Note: Since Java iterators cannot be duplicated, the iterator class is not -// copyable to prevent creating multiple C++ iterators that refer to the same -// Java iterator. -class Iterable { - public: - Iterable(JNIEnv* jni, jobject iterable) : jni_(jni), iterable_(iterable) {} - - class Iterator { - public: - // Creates an iterator representing the end of any collection. - Iterator(); - // Creates an iterator pointing to the beginning of the specified - // collection. - Iterator(JNIEnv* jni, jobject iterable); - - // Move constructor - necessary to be able to return iterator types from - // functions. - Iterator(Iterator&& other); - - // Move assignment should not be used. - Iterator& operator=(Iterator&&) = delete; - - // Advances the iterator one step. - Iterator& operator++(); - - // Provides a way to compare the iterator with itself and with the end - // iterator. - // Note: all other comparison results are undefined, just like for C++ input - // iterators. - bool operator==(const Iterator& other); - bool operator!=(const Iterator& other) { return !(*this == other); } - jobject operator*(); - - private: - bool AtEnd() const; - - JNIEnv* jni_ = nullptr; - jobject iterator_ = nullptr; - jobject value_ = nullptr; - jmethodID has_next_id_ = nullptr; - jmethodID next_id_ = nullptr; - rtc::ThreadChecker thread_checker_; - - RTC_DISALLOW_COPY_AND_ASSIGN(Iterator); - }; - - Iterable::Iterator begin() { return Iterable::Iterator(jni_, iterable_); } - Iterable::Iterator end() { return Iterable::Iterator(); } - - private: - JNIEnv* jni_; - jobject iterable_; - - RTC_DISALLOW_COPY_AND_ASSIGN(Iterable); -}; - -} // namespace webrtc_jni - -#endif // WEBRTC_SDK_ANDROID_SRC_JNI_JNI_HELPERS_H_ diff --git a/WebRtc.NET/include/webrtc/sdk/android/src/jni/native_handle_impl.h b/WebRtc.NET/include/webrtc/sdk/android/src/jni/native_handle_impl.h deleted file mode 100644 index 6829b7ba..00000000 --- a/WebRtc.NET/include/webrtc/sdk/android/src/jni/native_handle_impl.h +++ /dev/null @@ -1,87 +0,0 @@ -/* - * Copyright 2015 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_SDK_ANDROID_SRC_JNI_NATIVE_HANDLE_IMPL_H_ -#define WEBRTC_SDK_ANDROID_SRC_JNI_NATIVE_HANDLE_IMPL_H_ - -#include - -#include "webrtc/api/video/video_rotation.h" -#include "webrtc/common_video/include/video_frame_buffer.h" - -namespace webrtc_jni { - -// Open gl texture matrix, in column-major order. Operations are -// in-place. -class Matrix { - public: - Matrix(JNIEnv* jni, jfloatArray a); - - jfloatArray ToJava(JNIEnv* jni); - - // Crop arguments are relative to original size. - void Crop(float cropped_width, - float cropped_height, - float crop_x, - float crop_y); - - void Rotate(webrtc::VideoRotation rotation); - - private: - static void Multiply(const float a[16], const float b[16], float result[16]); - float elem_[16]; -}; - -// Wrapper for texture object. -struct NativeHandleImpl { - NativeHandleImpl(JNIEnv* jni, - jint j_oes_texture_id, - jfloatArray j_transform_matrix); - - NativeHandleImpl(int id, const Matrix& matrix); - - const int oes_texture_id; - Matrix sampling_matrix; -}; - -class AndroidTextureBuffer : public webrtc::NativeHandleBuffer { - public: - AndroidTextureBuffer(int width, - int height, - const NativeHandleImpl& native_handle, - jobject surface_texture_helper, - const rtc::Callback0& no_longer_used); - ~AndroidTextureBuffer(); - rtc::scoped_refptr NativeToI420Buffer() override; - - // First crop, then scale to dst resolution, and then rotate. - rtc::scoped_refptr CropScaleAndRotate( - int cropped_width, - int cropped_height, - int crop_x, - int crop_y, - int dst_width, - int dst_height, - webrtc::VideoRotation rotation); - - private: - NativeHandleImpl native_handle_; - // Raw object pointer, relying on the caller, i.e., - // AndroidVideoCapturerJni or the C++ SurfaceTextureHelper, to keep - // a global reference. TODO(nisse): Make this a reference to the C++ - // SurfaceTextureHelper instead, but that requires some refactoring - // of AndroidVideoCapturerJni. - jobject surface_texture_helper_; - rtc::Callback0 no_longer_used_cb_; -}; - -} // namespace webrtc_jni - -#endif // WEBRTC_SDK_ANDROID_SRC_JNI_NATIVE_HANDLE_IMPL_H_ diff --git a/WebRtc.NET/include/webrtc/sdk/android/src/jni/surfacetexturehelper_jni.h b/WebRtc.NET/include/webrtc/sdk/android/src/jni/surfacetexturehelper_jni.h deleted file mode 100644 index 07d65c01..00000000 --- a/WebRtc.NET/include/webrtc/sdk/android/src/jni/surfacetexturehelper_jni.h +++ /dev/null @@ -1,68 +0,0 @@ -/* - * Copyright 2015 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_SDK_ANDROID_SRC_JNI_SURFACETEXTUREHELPER_JNI_H_ -#define WEBRTC_SDK_ANDROID_SRC_JNI_SURFACETEXTUREHELPER_JNI_H_ - -#include - -#include "webrtc/sdk/android/src/jni/jni_helpers.h" -#include "webrtc/sdk/android/src/jni/native_handle_impl.h" -#include "webrtc/api/video/video_frame_buffer.h" -#include "webrtc/base/refcount.h" -#include "webrtc/base/scoped_ref_ptr.h" - -namespace webrtc_jni { - -// Helper class to create and synchronize access to an Android SurfaceTexture. -// It is used for creating webrtc::VideoFrameBuffers from a SurfaceTexture when -// the SurfaceTexture has been updated. -// When the VideoFrameBuffer is released, this class returns the buffer to the -// java SurfaceTextureHelper so it can be updated safely. The VideoFrameBuffer -// can be released on an arbitrary thread. -// SurfaceTextureHelper is reference counted to make sure that it is not -// destroyed while a VideoFrameBuffer is in use. -// This class is the C++ counterpart of the java class SurfaceTextureHelper. -// It owns the corresponding java object, and calls the java dispose -// method when destroyed. -// Usage: -// 1. Create an instance of this class. -// 2. Get the Java SurfaceTextureHelper with GetJavaSurfaceTextureHelper(). -// 3. Register a listener to the Java SurfaceListener and start producing -// new buffers. -// 4. Call CreateTextureFrame to wrap the Java texture in a VideoFrameBuffer. -class SurfaceTextureHelper : public rtc::RefCountInterface { - public: - // Might return null if creating the Java SurfaceTextureHelper fails. - static rtc::scoped_refptr create( - JNIEnv* jni, const char* thread_name, jobject j_egl_context); - - jobject GetJavaSurfaceTextureHelper() const; - - rtc::scoped_refptr CreateTextureFrame( - int width, - int height, - const NativeHandleImpl& native_handle); - - // May be called on arbitrary thread. - void ReturnTextureFrame() const; - - protected: - ~SurfaceTextureHelper(); - SurfaceTextureHelper(JNIEnv* jni, jobject j_surface_texture_helper); - - private: - const ScopedGlobalRef j_surface_texture_helper_; - const jmethodID j_return_texture_method_; -}; - -} // namespace webrtc_jni - -#endif // WEBRTC_SDK_ANDROID_SRC_JNI_SURFACETEXTUREHELPER_JNI_H_ diff --git a/WebRtc.NET/include/webrtc/sdk/objc/Framework/Classes/RTCAVFoundationVideoCapturerInternal.h b/WebRtc.NET/include/webrtc/sdk/objc/Framework/Classes/RTCAVFoundationVideoCapturerInternal.h deleted file mode 100644 index 8b73a808..00000000 --- a/WebRtc.NET/include/webrtc/sdk/objc/Framework/Classes/RTCAVFoundationVideoCapturerInternal.h +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Copyright 2016 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#import -#import - -#ifdef __cplusplus -#include "avfoundationvideocapturer.h" -#endif - -NS_ASSUME_NONNULL_BEGIN -// This class is an implementation detail of AVFoundationVideoCapturer and handles -// the ObjC integration with the AVFoundation APIs. -// It is meant to be owned by an instance of AVFoundationVideoCapturer. -// The reason for this is because other webrtc objects own cricket::VideoCapturer, which is not -// ref counted. To prevent bad behavior we do not expose this class directly. -@interface RTCAVFoundationVideoCapturerInternal - : NSObject - -@property(nonatomic, readonly) AVCaptureSession *captureSession; -@property(nonatomic, readonly) dispatch_queue_t frameQueue; -@property(nonatomic, readonly) BOOL canUseBackCamera; -@property(nonatomic, assign) BOOL useBackCamera; // Defaults to NO. -@property(atomic, assign) BOOL isRunning; // Whether the capture session is running. -@property(atomic, assign) BOOL hasStarted; // Whether we have an unmatched start. - -// We keep a pointer back to AVFoundationVideoCapturer to make callbacks on it -// when we receive frames. This is safe because this object should be owned by -// it. -- (instancetype)initWithCapturer:(webrtc::AVFoundationVideoCapturer *)capturer; -- (AVCaptureDevice *)getActiveCaptureDevice; - -- (nullable AVCaptureDevice *)frontCaptureDevice; -- (nullable AVCaptureDevice *)backCaptureDevice; - -// Starts and stops the capture session asynchronously. We cannot do this -// synchronously without blocking a WebRTC thread. -- (void)start; -- (void)stop; - -@end -NS_ASSUME_NONNULL_END diff --git a/WebRtc.NET/include/webrtc/sdk/objc/Framework/Classes/RTCAVFoundationVideoSource+Private.h b/WebRtc.NET/include/webrtc/sdk/objc/Framework/Classes/RTCAVFoundationVideoSource+Private.h deleted file mode 100644 index 7a4de082..00000000 --- a/WebRtc.NET/include/webrtc/sdk/objc/Framework/Classes/RTCAVFoundationVideoSource+Private.h +++ /dev/null @@ -1,27 +0,0 @@ -/* - * Copyright 2015 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#import "WebRTC/RTCAVFoundationVideoSource.h" - -#include "avfoundationvideocapturer.h" - -NS_ASSUME_NONNULL_BEGIN - -@interface RTCAVFoundationVideoSource () - -@property(nonatomic, readonly) webrtc::AVFoundationVideoCapturer *capturer; - -/** Initialize an RTCAVFoundationVideoSource with constraints. */ -- (instancetype)initWithFactory:(RTCPeerConnectionFactory *)factory - constraints:(nullable RTCMediaConstraints *)constraints; - -@end - -NS_ASSUME_NONNULL_END diff --git a/WebRtc.NET/include/webrtc/sdk/objc/Framework/Classes/RTCAudioSource+Private.h b/WebRtc.NET/include/webrtc/sdk/objc/Framework/Classes/RTCAudioSource+Private.h deleted file mode 100644 index 43aff026..00000000 --- a/WebRtc.NET/include/webrtc/sdk/objc/Framework/Classes/RTCAudioSource+Private.h +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Copyright 2016 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#import "WebRTC/RTCAudioSource.h" - -#import "RTCMediaSource+Private.h" - -@interface RTCAudioSource () - -/** - * The AudioSourceInterface object passed to this RTCAudioSource during - * construction. - */ -@property(nonatomic, readonly) rtc::scoped_refptr nativeAudioSource; - -/** Initialize an RTCAudioSource from a native AudioSourceInterface. */ -- (instancetype)initWithNativeAudioSource: - (rtc::scoped_refptr)nativeAudioSource - NS_DESIGNATED_INITIALIZER; - -- (instancetype)initWithNativeMediaSource: - (rtc::scoped_refptr)nativeMediaSource - type:(RTCMediaSourceType)type NS_UNAVAILABLE; - -@end diff --git a/WebRtc.NET/include/webrtc/sdk/objc/Framework/Classes/RTCConfiguration+Private.h b/WebRtc.NET/include/webrtc/sdk/objc/Framework/Classes/RTCConfiguration+Private.h deleted file mode 100644 index f20cdc5c..00000000 --- a/WebRtc.NET/include/webrtc/sdk/objc/Framework/Classes/RTCConfiguration+Private.h +++ /dev/null @@ -1,70 +0,0 @@ -/* - * Copyright 2015 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#import "WebRTC/RTCConfiguration.h" - -#include "webrtc/api/peerconnectioninterface.h" - -NS_ASSUME_NONNULL_BEGIN - -@interface RTCConfiguration () - -+ (webrtc::PeerConnectionInterface::IceTransportsType) - nativeTransportsTypeForTransportPolicy:(RTCIceTransportPolicy)policy; - -+ (RTCIceTransportPolicy)transportPolicyForTransportsType: - (webrtc::PeerConnectionInterface::IceTransportsType)nativeType; - -+ (NSString *)stringForTransportPolicy:(RTCIceTransportPolicy)policy; - -+ (webrtc::PeerConnectionInterface::BundlePolicy)nativeBundlePolicyForPolicy: - (RTCBundlePolicy)policy; - -+ (RTCBundlePolicy)bundlePolicyForNativePolicy: - (webrtc::PeerConnectionInterface::BundlePolicy)nativePolicy; - -+ (NSString *)stringForBundlePolicy:(RTCBundlePolicy)policy; - -+ (webrtc::PeerConnectionInterface::RtcpMuxPolicy)nativeRtcpMuxPolicyForPolicy: - (RTCRtcpMuxPolicy)policy; - -+ (RTCRtcpMuxPolicy)rtcpMuxPolicyForNativePolicy: - (webrtc::PeerConnectionInterface::RtcpMuxPolicy)nativePolicy; - -+ (NSString *)stringForRtcpMuxPolicy:(RTCRtcpMuxPolicy)policy; - -+ (webrtc::PeerConnectionInterface::TcpCandidatePolicy) - nativeTcpCandidatePolicyForPolicy:(RTCTcpCandidatePolicy)policy; - -+ (RTCTcpCandidatePolicy)tcpCandidatePolicyForNativePolicy: - (webrtc::PeerConnectionInterface::TcpCandidatePolicy)nativePolicy; - -+ (NSString *)stringForTcpCandidatePolicy:(RTCTcpCandidatePolicy)policy; - -+ (webrtc::PeerConnectionInterface::CandidateNetworkPolicy) - nativeCandidateNetworkPolicyForPolicy:(RTCCandidateNetworkPolicy)policy; - -+ (RTCCandidateNetworkPolicy)candidateNetworkPolicyForNativePolicy: - (webrtc::PeerConnectionInterface::CandidateNetworkPolicy)nativePolicy; - -+ (NSString *)stringForCandidateNetworkPolicy:(RTCCandidateNetworkPolicy)policy; - -+ (rtc::KeyType)nativeEncryptionKeyTypeForKeyType:(RTCEncryptionKeyType)keyType; - -/** - * RTCConfiguration struct representation of this RTCConfiguration. This is - * needed to pass to the underlying C++ APIs. - */ -- (webrtc::PeerConnectionInterface::RTCConfiguration *) - createNativeConfiguration; - -@end - -NS_ASSUME_NONNULL_END diff --git a/WebRtc.NET/include/webrtc/sdk/objc/Framework/Classes/RTCDataChannel+Private.h b/WebRtc.NET/include/webrtc/sdk/objc/Framework/Classes/RTCDataChannel+Private.h deleted file mode 100644 index 82e132fa..00000000 --- a/WebRtc.NET/include/webrtc/sdk/objc/Framework/Classes/RTCDataChannel+Private.h +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Copyright 2015 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#import "WebRTC/RTCDataChannel.h" - -#include "webrtc/api/datachannelinterface.h" -#include "webrtc/base/scoped_ref_ptr.h" - -NS_ASSUME_NONNULL_BEGIN - -@interface RTCDataBuffer () - -/** - * The native DataBuffer representation of this RTCDatabuffer object. This is - * needed to pass to the underlying C++ APIs. - */ -@property(nonatomic, readonly) const webrtc::DataBuffer *nativeDataBuffer; - -/** Initialize an RTCDataBuffer from a native DataBuffer. */ -- (instancetype)initWithNativeBuffer:(const webrtc::DataBuffer&)nativeBuffer; - -@end - - -@interface RTCDataChannel () - -/** Initialize an RTCDataChannel from a native DataChannelInterface. */ -- (instancetype)initWithNativeDataChannel: - (rtc::scoped_refptr)nativeDataChannel - NS_DESIGNATED_INITIALIZER; - -+ (webrtc::DataChannelInterface::DataState) - nativeDataChannelStateForState:(RTCDataChannelState)state; - -+ (RTCDataChannelState)dataChannelStateForNativeState: - (webrtc::DataChannelInterface::DataState)nativeState; - -+ (NSString *)stringForState:(RTCDataChannelState)state; - -@end - -NS_ASSUME_NONNULL_END diff --git a/WebRtc.NET/include/webrtc/sdk/objc/Framework/Classes/RTCIceServer+Private.h b/WebRtc.NET/include/webrtc/sdk/objc/Framework/Classes/RTCIceServer+Private.h deleted file mode 100644 index 7efeda41..00000000 --- a/WebRtc.NET/include/webrtc/sdk/objc/Framework/Classes/RTCIceServer+Private.h +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Copyright 2015 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#import "WebRTC/RTCIceServer.h" - -#include "webrtc/api/peerconnectioninterface.h" - -NS_ASSUME_NONNULL_BEGIN - -@interface RTCIceServer () - -/** - * IceServer struct representation of this RTCIceServer object's data. - * This is needed to pass to the underlying C++ APIs. - */ -@property(nonatomic, readonly) - webrtc::PeerConnectionInterface::IceServer nativeServer; - -/** Initialize an RTCIceServer from a native IceServer. */ -- (instancetype)initWithNativeServer: - (webrtc::PeerConnectionInterface::IceServer)nativeServer; - -@end - -NS_ASSUME_NONNULL_END diff --git a/WebRtc.NET/include/webrtc/sdk/objc/Framework/Classes/RTCMediaConstraints+Private.h b/WebRtc.NET/include/webrtc/sdk/objc/Framework/Classes/RTCMediaConstraints+Private.h deleted file mode 100644 index 606a132d..00000000 --- a/WebRtc.NET/include/webrtc/sdk/objc/Framework/Classes/RTCMediaConstraints+Private.h +++ /dev/null @@ -1,54 +0,0 @@ -/* - * Copyright 2015 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#import "WebRTC/RTCMediaConstraints.h" - -#include - -#include "webrtc/api/mediaconstraintsinterface.h" - -namespace webrtc { - -class MediaConstraints : public MediaConstraintsInterface { - public: - virtual ~MediaConstraints(); - MediaConstraints(); - MediaConstraints( - const MediaConstraintsInterface::Constraints& mandatory, - const MediaConstraintsInterface::Constraints& optional); - virtual const Constraints& GetMandatory() const; - virtual const Constraints& GetOptional() const; - - private: - MediaConstraintsInterface::Constraints mandatory_; - MediaConstraintsInterface::Constraints optional_; -}; - -} // namespace webrtc - - -NS_ASSUME_NONNULL_BEGIN - -@interface RTCMediaConstraints () - -/** - * A MediaConstraints representation of this RTCMediaConstraints object. This is - * needed to pass to the underlying C++ APIs. - */ -- (std::unique_ptr)nativeConstraints; - -/** Return a native Constraints object representing these constraints */ -+ (webrtc::MediaConstraintsInterface::Constraints) - nativeConstraintsForConstraints: - (NSDictionary *)constraints; - -@end - -NS_ASSUME_NONNULL_END diff --git a/WebRtc.NET/include/webrtc/sdk/objc/Framework/Classes/RTCMediaSource+Private.h b/WebRtc.NET/include/webrtc/sdk/objc/Framework/Classes/RTCMediaSource+Private.h deleted file mode 100644 index 55d268a4..00000000 --- a/WebRtc.NET/include/webrtc/sdk/objc/Framework/Classes/RTCMediaSource+Private.h +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright 2016 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#import "WebRTC/RTCMediaSource.h" - -#include "webrtc/api/mediastreaminterface.h" - -NS_ASSUME_NONNULL_BEGIN - -typedef NS_ENUM(NSInteger, RTCMediaSourceType) { - RTCMediaSourceTypeAudio, - RTCMediaSourceTypeVideo, -}; - -@interface RTCMediaSource () - -@property(nonatomic, readonly) - rtc::scoped_refptr nativeMediaSource; - -- (instancetype)initWithNativeMediaSource: - (rtc::scoped_refptr)nativeMediaSource - type:(RTCMediaSourceType)type - NS_DESIGNATED_INITIALIZER; - -+ (webrtc::MediaSourceInterface::SourceState)nativeSourceStateForState: - (RTCSourceState)state; - -+ (RTCSourceState)sourceStateForNativeState: - (webrtc::MediaSourceInterface::SourceState)nativeState; - -+ (NSString *)stringForState:(RTCSourceState)state; - -@end - -NS_ASSUME_NONNULL_END diff --git a/WebRtc.NET/include/webrtc/sdk/objc/Framework/Classes/RTCMediaStream+Private.h b/WebRtc.NET/include/webrtc/sdk/objc/Framework/Classes/RTCMediaStream+Private.h deleted file mode 100644 index 7f870722..00000000 --- a/WebRtc.NET/include/webrtc/sdk/objc/Framework/Classes/RTCMediaStream+Private.h +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright 2015 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#import "WebRTC/RTCMediaStream.h" - -#include "webrtc/api/mediastreaminterface.h" - -NS_ASSUME_NONNULL_BEGIN - -@interface RTCMediaStream () - -/** - * MediaStreamInterface representation of this RTCMediaStream object. This is - * needed to pass to the underlying C++ APIs. - */ -@property(nonatomic, readonly) - rtc::scoped_refptr nativeMediaStream; - -/** Initialize an RTCMediaStream with an id. */ -- (instancetype)initWithFactory:(RTCPeerConnectionFactory *)factory - streamId:(NSString *)streamId; - -/** Initialize an RTCMediaStream from a native MediaStreamInterface. */ -- (instancetype)initWithNativeMediaStream: - (rtc::scoped_refptr)nativeMediaStream; - -@end - -NS_ASSUME_NONNULL_END diff --git a/WebRtc.NET/include/webrtc/sdk/objc/Framework/Classes/RTCMediaStreamTrack+Private.h b/WebRtc.NET/include/webrtc/sdk/objc/Framework/Classes/RTCMediaStreamTrack+Private.h deleted file mode 100644 index d5261266..00000000 --- a/WebRtc.NET/include/webrtc/sdk/objc/Framework/Classes/RTCMediaStreamTrack+Private.h +++ /dev/null @@ -1,54 +0,0 @@ -/* - * Copyright 2015 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#import "WebRTC/RTCMediaStreamTrack.h" - -#include "webrtc/api/mediastreaminterface.h" - -typedef NS_ENUM(NSInteger, RTCMediaStreamTrackType) { - RTCMediaStreamTrackTypeAudio, - RTCMediaStreamTrackTypeVideo, -}; - -NS_ASSUME_NONNULL_BEGIN - -@interface RTCMediaStreamTrack () - -/** - * The native MediaStreamTrackInterface passed in or created during - * construction. - */ -@property(nonatomic, readonly) - rtc::scoped_refptr nativeTrack; - -/** - * Initialize an RTCMediaStreamTrack from a native MediaStreamTrackInterface. - */ -- (instancetype)initWithNativeTrack: - (rtc::scoped_refptr)nativeTrack - type:(RTCMediaStreamTrackType)type - NS_DESIGNATED_INITIALIZER; - -- (instancetype)initWithNativeTrack: - (rtc::scoped_refptr)nativeTrack; - -- (BOOL)isEqualToTrack:(RTCMediaStreamTrack *)track; - -+ (webrtc::MediaStreamTrackInterface::TrackState)nativeTrackStateForState: - (RTCMediaStreamTrackState)state; - -+ (RTCMediaStreamTrackState)trackStateForNativeState: - (webrtc::MediaStreamTrackInterface::TrackState)nativeState; - -+ (NSString *)stringForState:(RTCMediaStreamTrackState)state; - -@end - -NS_ASSUME_NONNULL_END diff --git a/WebRtc.NET/include/webrtc/sdk/objc/Framework/Classes/RTCMetricsSampleInfo+Private.h b/WebRtc.NET/include/webrtc/sdk/objc/Framework/Classes/RTCMetricsSampleInfo+Private.h deleted file mode 100644 index 00d3fa69..00000000 --- a/WebRtc.NET/include/webrtc/sdk/objc/Framework/Classes/RTCMetricsSampleInfo+Private.h +++ /dev/null @@ -1,25 +0,0 @@ -/* - * Copyright 2016 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#import "WebRTC/RTCMetricsSampleInfo.h" - -#include "webrtc/system_wrappers/include/metrics_default.h" - -NS_ASSUME_NONNULL_BEGIN - -@interface RTCMetricsSampleInfo () - -/** Initialize an RTCMetricsSampleInfo object from native SampleInfo. */ -- (instancetype)initWithNativeSampleInfo: - (const webrtc::metrics::SampleInfo &)info; - -@end - -NS_ASSUME_NONNULL_END diff --git a/WebRtc.NET/include/webrtc/sdk/objc/Framework/Classes/RTCOpenGLVideoRenderer.h b/WebRtc.NET/include/webrtc/sdk/objc/Framework/Classes/RTCOpenGLVideoRenderer.h deleted file mode 100644 index 70418610..00000000 --- a/WebRtc.NET/include/webrtc/sdk/objc/Framework/Classes/RTCOpenGLVideoRenderer.h +++ /dev/null @@ -1,61 +0,0 @@ -/* - * Copyright 2015 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#import -#if TARGET_OS_IPHONE -#import -#else -#import -#endif - -#import "WebRTC/RTCMacros.h" - -NS_ASSUME_NONNULL_BEGIN - -@class RTCVideoFrame; - -// RTCOpenGLVideoRenderer issues appropriate OpenGL commands to draw a frame to -// the currently bound framebuffer. Supports OpenGL 3.2 and OpenGLES 2.0. OpenGL -// framebuffer creation and management should be handled elsewhere using the -// same context used to initialize this class. -RTC_EXPORT -@interface RTCOpenGLVideoRenderer : NSObject - -// The last successfully drawn frame. Used to avoid drawing frames unnecessarily -// hence saving battery life by reducing load. -@property(nonatomic, readonly) RTCVideoFrame *lastDrawnFrame; - -#if TARGET_OS_IPHONE -- (instancetype)initWithContext:(EAGLContext *)context - NS_DESIGNATED_INITIALIZER; -#else -- (instancetype)initWithContext:(NSOpenGLContext *)context - NS_DESIGNATED_INITIALIZER; -#endif - -// Draws |frame| onto the currently bound OpenGL framebuffer. |setupGL| must be -// called before this function will succeed. -- (BOOL)drawFrame:(RTCVideoFrame *)frame; - -// The following methods are used to manage OpenGL resources. On iOS -// applications should release resources when placed in background for use in -// the foreground application. In fact, attempting to call OpenGLES commands -// while in background will result in application termination. - -// Sets up the OpenGL state needed for rendering. -- (void)setupGL; -// Tears down the OpenGL state created by |setupGL|. -- (void)teardownGL; - -- (instancetype)init NS_UNAVAILABLE; - -@end - -NS_ASSUME_NONNULL_END diff --git a/WebRtc.NET/include/webrtc/sdk/objc/Framework/Classes/RTCPeerConnection+Private.h b/WebRtc.NET/include/webrtc/sdk/objc/Framework/Classes/RTCPeerConnection+Private.h deleted file mode 100644 index 60ab868a..00000000 --- a/WebRtc.NET/include/webrtc/sdk/objc/Framework/Classes/RTCPeerConnection+Private.h +++ /dev/null @@ -1,107 +0,0 @@ -/* - * Copyright 2015 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#import "WebRTC/RTCPeerConnection.h" - -#include "webrtc/api/peerconnectioninterface.h" - -NS_ASSUME_NONNULL_BEGIN - -namespace webrtc { - -/** - * These objects are created by RTCPeerConnectionFactory to wrap an - * id and call methods on that interface. - */ -class PeerConnectionDelegateAdapter : public PeerConnectionObserver { - - public: - PeerConnectionDelegateAdapter(RTCPeerConnection *peerConnection); - virtual ~PeerConnectionDelegateAdapter(); - - void OnSignalingChange( - PeerConnectionInterface::SignalingState new_state) override; - - void OnAddStream(rtc::scoped_refptr stream) override; - - void OnRemoveStream(rtc::scoped_refptr stream) override; - - void OnDataChannel( - rtc::scoped_refptr data_channel) override; - - void OnRenegotiationNeeded() override; - - void OnIceConnectionChange( - PeerConnectionInterface::IceConnectionState new_state) override; - - void OnIceGatheringChange( - PeerConnectionInterface::IceGatheringState new_state) override; - - void OnIceCandidate(const IceCandidateInterface *candidate) override; - - void OnIceCandidatesRemoved( - const std::vector& candidates) override; - - private: - __weak RTCPeerConnection *peer_connection_; -}; - -} // namespace webrtc - - -@interface RTCPeerConnection () - -/** The native PeerConnectionInterface created during construction. */ -@property(nonatomic, readonly) - rtc::scoped_refptr nativePeerConnection; - -/** Initialize an RTCPeerConnection with a configuration, constraints, and - * delegate. - */ -- (instancetype)initWithFactory: - (RTCPeerConnectionFactory *)factory - configuration: - (RTCConfiguration *)configuration - constraints: - (RTCMediaConstraints *)constraints - delegate: - (nullable id)delegate - NS_DESIGNATED_INITIALIZER; - -+ (webrtc::PeerConnectionInterface::SignalingState)nativeSignalingStateForState: - (RTCSignalingState)state; - -+ (RTCSignalingState)signalingStateForNativeState: - (webrtc::PeerConnectionInterface::SignalingState)nativeState; - -+ (NSString *)stringForSignalingState:(RTCSignalingState)state; - -+ (webrtc::PeerConnectionInterface::IceConnectionState) - nativeIceConnectionStateForState:(RTCIceConnectionState)state; - -+ (RTCIceConnectionState)iceConnectionStateForNativeState: - (webrtc::PeerConnectionInterface::IceConnectionState)nativeState; - -+ (NSString *)stringForIceConnectionState:(RTCIceConnectionState)state; - -+ (webrtc::PeerConnectionInterface::IceGatheringState) - nativeIceGatheringStateForState:(RTCIceGatheringState)state; - -+ (RTCIceGatheringState)iceGatheringStateForNativeState: - (webrtc::PeerConnectionInterface::IceGatheringState)nativeState; - -+ (NSString *)stringForIceGatheringState:(RTCIceGatheringState)state; - -+ (webrtc::PeerConnectionInterface::StatsOutputLevel) - nativeStatsOutputLevelForLevel:(RTCStatsOutputLevel)level; - -@end - -NS_ASSUME_NONNULL_END diff --git a/WebRtc.NET/include/webrtc/sdk/objc/Framework/Classes/RTCRtpReceiver+Private.h b/WebRtc.NET/include/webrtc/sdk/objc/Framework/Classes/RTCRtpReceiver+Private.h deleted file mode 100644 index 14b68fa0..00000000 --- a/WebRtc.NET/include/webrtc/sdk/objc/Framework/Classes/RTCRtpReceiver+Private.h +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Copyright 2016 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#import "WebRTC/RTCRtpReceiver.h" - -#include "webrtc/api/rtpreceiverinterface.h" - -NS_ASSUME_NONNULL_BEGIN - -@interface RTCRtpReceiver () - -@property(nonatomic, readonly) - rtc::scoped_refptr nativeRtpReceiver; - -/** Initialize an RTCRtpReceiver with a native RtpReceiverInterface. */ -- (instancetype)initWithNativeRtpReceiver: - (rtc::scoped_refptr)nativeRtpReceiver - NS_DESIGNATED_INITIALIZER; - -@end - -NS_ASSUME_NONNULL_END diff --git a/WebRtc.NET/include/webrtc/sdk/objc/Framework/Classes/RTCRtpSender+Private.h b/WebRtc.NET/include/webrtc/sdk/objc/Framework/Classes/RTCRtpSender+Private.h deleted file mode 100644 index e372c523..00000000 --- a/WebRtc.NET/include/webrtc/sdk/objc/Framework/Classes/RTCRtpSender+Private.h +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Copyright 2016 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#import "WebRTC/RTCRtpSender.h" - -#include "webrtc/api/rtpsenderinterface.h" - -NS_ASSUME_NONNULL_BEGIN - -@interface RTCRtpSender () - -@property(nonatomic, readonly) - rtc::scoped_refptr nativeRtpSender; - -/** Initialize an RTCRtpSender with a native RtpSenderInterface. */ -- (instancetype)initWithNativeRtpSender: - (rtc::scoped_refptr)nativeRtpSender - NS_DESIGNATED_INITIALIZER; - -@end - -NS_ASSUME_NONNULL_END diff --git a/WebRtc.NET/include/webrtc/sdk/objc/Framework/Classes/RTCShader+Private.h b/WebRtc.NET/include/webrtc/sdk/objc/Framework/Classes/RTCShader+Private.h deleted file mode 100644 index ea0f787f..00000000 --- a/WebRtc.NET/include/webrtc/sdk/objc/Framework/Classes/RTCShader+Private.h +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright 2016 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#import "RTCShader.h" - -#import "WebRTC/RTCMacros.h" - -#if TARGET_OS_IPHONE -#import -#else -#import -#endif - -#include "webrtc/api/video/video_rotation.h" - -RTC_EXTERN const char kRTCVertexShaderSource[]; - -RTC_EXTERN GLuint RTCCreateShader(GLenum type, const GLchar *source); -RTC_EXTERN GLuint RTCCreateProgram(GLuint vertexShader, GLuint fragmentShader); -RTC_EXTERN GLuint RTCCreateProgramFromFragmentSource(const char fragmentShaderSource[]); -RTC_EXTERN BOOL RTCSetupVerticesForProgram( - GLuint program, GLuint* vertexBuffer, GLuint* vertexArray); -RTC_EXTERN void RTCSetVertexData(webrtc::VideoRotation rotation); diff --git a/WebRtc.NET/include/webrtc/sdk/objc/Framework/Classes/RTCShader.h b/WebRtc.NET/include/webrtc/sdk/objc/Framework/Classes/RTCShader.h deleted file mode 100644 index c35a528b..00000000 --- a/WebRtc.NET/include/webrtc/sdk/objc/Framework/Classes/RTCShader.h +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright 2016 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#import - -#import "RTCOpenGLDefines.h" - -@class RTCVideoFrame; - -@protocol RTCShader - -- (BOOL)drawFrame:(RTCVideoFrame *)frame; - -@end - -// Shader for non-native I420 frames. -@interface RTCI420Shader : NSObject - -- (instancetype)init NS_UNAVAILABLE; -- (instancetype)initWithContext:(GlContextType *)context NS_DESIGNATED_INITIALIZER; -- (BOOL)drawFrame:(RTCVideoFrame *)frame; - -@end - -// Native CVPixelBufferRef rendering is only supported on iPhone because it -// depends on CVOpenGLESTextureCacheCreate. -#if TARGET_OS_IPHONE - -// Shader for native NV12 frames. -@interface RTCNativeNV12Shader : NSObject - -- (instancetype)init NS_UNAVAILABLE; -- (instancetype)initWithContext:(GlContextType *)context NS_DESIGNATED_INITIALIZER; -- (BOOL)drawFrame:(RTCVideoFrame *)frame; - -@end - -#endif // TARGET_OS_IPHONE diff --git a/WebRtc.NET/include/webrtc/sdk/objc/Framework/Classes/RTCUIApplication.h b/WebRtc.NET/include/webrtc/sdk/objc/Framework/Classes/RTCUIApplication.h deleted file mode 100644 index fb11edef..00000000 --- a/WebRtc.NET/include/webrtc/sdk/objc/Framework/Classes/RTCUIApplication.h +++ /dev/null @@ -1,21 +0,0 @@ -/* - * Copyright 2016 The WebRTC Project Authors. All rights reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_BASE_OBJC_RTC_UI_APPLICATION_H_ -#define WEBRTC_BASE_OBJC_RTC_UI_APPLICATION_H_ - -#include "WebRTC/RTCMacros.h" - -#if defined(WEBRTC_IOS) -/** Convenience function to get UIApplicationState from C++. */ -RTC_EXTERN bool RTCIsUIApplicationActive(); -#endif // WEBRTC_IOS - -#endif // WEBRTC_BASE_OBJC_RTC_UI_APPLICATION_H_ diff --git a/WebRtc.NET/include/webrtc/sdk/objc/Framework/Classes/RTCVideoFrame+Private.h b/WebRtc.NET/include/webrtc/sdk/objc/Framework/Classes/RTCVideoFrame+Private.h deleted file mode 100644 index e844d647..00000000 --- a/WebRtc.NET/include/webrtc/sdk/objc/Framework/Classes/RTCVideoFrame+Private.h +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright 2015 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#import "WebRTC/RTCVideoFrame.h" - -#include "webrtc/api/video/video_frame_buffer.h" -#include "webrtc/api/video/video_rotation.h" - -NS_ASSUME_NONNULL_BEGIN - -@interface RTCVideoFrame () - -@property(nonatomic, readonly) - rtc::scoped_refptr i420Buffer; - -- (instancetype)initWithVideoBuffer: - (rtc::scoped_refptr)videoBuffer - rotation:(webrtc::VideoRotation)rotation - timeStampNs:(int64_t)timeStampNs - NS_DESIGNATED_INITIALIZER; - -@end - -NS_ASSUME_NONNULL_END diff --git a/WebRtc.NET/include/webrtc/sdk/objc/Framework/Classes/RTCVideoSource+Private.h b/WebRtc.NET/include/webrtc/sdk/objc/Framework/Classes/RTCVideoSource+Private.h deleted file mode 100644 index f6e202cd..00000000 --- a/WebRtc.NET/include/webrtc/sdk/objc/Framework/Classes/RTCVideoSource+Private.h +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright 2015 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#import "WebRTC/RTCVideoSource.h" - -#import "RTCMediaSource+Private.h" - -#include "webrtc/api/mediastreaminterface.h" - -NS_ASSUME_NONNULL_BEGIN - -@interface RTCVideoSource () - -/** - * The VideoTrackSourceInterface object passed to this RTCVideoSource during - * construction. - */ -@property(nonatomic, readonly) - rtc::scoped_refptr - nativeVideoSource; - -/** Initialize an RTCVideoSource from a native VideoTrackSourceInterface. */ -- (instancetype)initWithNativeVideoSource: - (rtc::scoped_refptr)nativeVideoSource - NS_DESIGNATED_INITIALIZER; - -- (instancetype)initWithNativeMediaSource: - (rtc::scoped_refptr)nativeMediaSource - type:(RTCMediaSourceType)type NS_UNAVAILABLE; - -@end - -NS_ASSUME_NONNULL_END diff --git a/WebRtc.NET/include/webrtc/sdk/objc/Framework/Classes/avfoundationformatmapper.h b/WebRtc.NET/include/webrtc/sdk/objc/Framework/Classes/avfoundationformatmapper.h deleted file mode 100644 index 0f357a06..00000000 --- a/WebRtc.NET/include/webrtc/sdk/objc/Framework/Classes/avfoundationformatmapper.h +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Copyright 2016 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#include - -#import -#import - -#include "webrtc/media/base/videocapturer.h" - -namespace webrtc { -// Mapping from AVCaptureDeviceFormat to cricket::VideoFormat for given input -// device. -std::set GetSupportedVideoFormatsForDevice( - AVCaptureDevice* device); - -// Sets device format for the provided capture device. Returns YES/NO depending -// on success. -bool SetFormatForCaptureDevice(AVCaptureDevice* device, - AVCaptureSession* session, - const cricket::VideoFormat& format); -} diff --git a/WebRtc.NET/include/webrtc/sdk/objc/Framework/Classes/avfoundationvideocapturer.h b/WebRtc.NET/include/webrtc/sdk/objc/Framework/Classes/avfoundationvideocapturer.h deleted file mode 100644 index 6253405a..00000000 --- a/WebRtc.NET/include/webrtc/sdk/objc/Framework/Classes/avfoundationvideocapturer.h +++ /dev/null @@ -1,72 +0,0 @@ -/* - * Copyright 2015 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_API_OBJC_AVFOUNDATION_VIDEO_CAPTURER_H_ -#define WEBRTC_API_OBJC_AVFOUNDATION_VIDEO_CAPTURER_H_ - -#import - -#include "webrtc/api/video/video_frame.h" -#include "webrtc/common_video/include/i420_buffer_pool.h" -#include "webrtc/media/base/videocapturer.h" - -@class RTCAVFoundationVideoCapturerInternal; - -namespace rtc { -class Thread; -} // namespace rtc - -namespace webrtc { - -class AVFoundationVideoCapturer : public cricket::VideoCapturer { - public: - AVFoundationVideoCapturer(); - ~AVFoundationVideoCapturer(); - - cricket::CaptureState Start(const cricket::VideoFormat& format) override; - void Stop() override; - bool IsRunning() override; - bool IsScreencast() const override { - return false; - } - bool GetPreferredFourccs(std::vector *fourccs) override { - fourccs->push_back(cricket::FOURCC_NV12); - return true; - } - - // Returns the active capture session. Calls to the capture session should - // occur on the RTCDispatcherTypeCaptureSession queue in RTCDispatcher. - AVCaptureSession* GetCaptureSession(); - - // Returns whether the rear-facing camera can be used. - // e.g. It can't be used because it doesn't exist. - bool CanUseBackCamera() const; - - // Switches the camera being used (either front or back). - void SetUseBackCamera(bool useBackCamera); - bool GetUseBackCamera() const; - - // Converts the sample buffer into a cricket::CapturedFrame and signals the - // frame for capture. - void CaptureSampleBuffer(CMSampleBufferRef sample_buffer, - webrtc::VideoRotation rotation); - - // Called to adjust the size of output frames to supplied |width| and - // |height|. Also drops frames to make the output match |fps|. - void AdaptOutputFormat(int width, int height, int fps); - - private: - RTCAVFoundationVideoCapturerInternal *_capturer; - webrtc::I420BufferPool _buffer_pool; -}; // AVFoundationVideoCapturer - -} // namespace webrtc - -#endif // WEBRTC_API_OBJC_AVFOUNDATION_VIDEO_CAPTURER_H_ diff --git a/WebRtc.NET/include/webrtc/sdk/objc/Framework/Classes/h264_video_toolbox_decoder.h b/WebRtc.NET/include/webrtc/sdk/objc/Framework/Classes/h264_video_toolbox_decoder.h deleted file mode 100644 index d81c1121..00000000 --- a/WebRtc.NET/include/webrtc/sdk/objc/Framework/Classes/h264_video_toolbox_decoder.h +++ /dev/null @@ -1,59 +0,0 @@ -/* - * Copyright (c) 2015 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - * - */ - -#ifndef WEBRTC_SDK_OBJC_FRAMEWORK_CLASSES_H264_VIDEO_TOOLBOX_DECODER_H_ -#define WEBRTC_SDK_OBJC_FRAMEWORK_CLASSES_H264_VIDEO_TOOLBOX_DECODER_H_ - -#include "webrtc/modules/video_coding/codecs/h264/include/h264.h" - -#include - -// This file provides a H264 encoder implementation using the VideoToolbox -// APIs. Since documentation is almost non-existent, this is largely based on -// the information in the VideoToolbox header files, a talk from WWDC 2014 and -// experimentation. - -namespace webrtc { - -class H264VideoToolboxDecoder : public H264Decoder { - public: - H264VideoToolboxDecoder(); - - ~H264VideoToolboxDecoder() override; - - int InitDecode(const VideoCodec* video_codec, int number_of_cores) override; - - int Decode(const EncodedImage& input_image, - bool missing_frames, - const RTPFragmentationHeader* fragmentation, - const CodecSpecificInfo* codec_specific_info, - int64_t render_time_ms) override; - - int RegisterDecodeCompleteCallback(DecodedImageCallback* callback) override; - - int Release() override; - - const char* ImplementationName() const override; - - private: - int ResetDecompressionSession(); - void ConfigureDecompressionSession(); - void DestroyDecompressionSession(); - void SetVideoFormat(CMVideoFormatDescriptionRef video_format); - - DecodedImageCallback* callback_; - CMVideoFormatDescriptionRef video_format_; - VTDecompressionSessionRef decompression_session_; -}; // H264VideoToolboxDecoder - -} // namespace webrtc - -#endif // WEBRTC_SDK_OBJC_FRAMEWORK_CLASSES_H264_VIDEO_TOOLBOX_DECODER_H_ diff --git a/WebRtc.NET/include/webrtc/sdk/objc/Framework/Classes/h264_video_toolbox_encoder.h b/WebRtc.NET/include/webrtc/sdk/objc/Framework/Classes/h264_video_toolbox_encoder.h deleted file mode 100644 index 5de9a242..00000000 --- a/WebRtc.NET/include/webrtc/sdk/objc/Framework/Classes/h264_video_toolbox_encoder.h +++ /dev/null @@ -1,96 +0,0 @@ -/* - * Copyright (c) 2015 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - * - */ - -#ifndef WEBRTC_SDK_OBJC_FRAMEWORK_CLASSES_H264_VIDEO_TOOLBOX_ENCODER_H_ -#define WEBRTC_SDK_OBJC_FRAMEWORK_CLASSES_H264_VIDEO_TOOLBOX_ENCODER_H_ - -#include "webrtc/api/video/video_rotation.h" -#include "webrtc/base/criticalsection.h" -#include "webrtc/common_video/h264/h264_bitstream_parser.h" -#include "webrtc/common_video/include/bitrate_adjuster.h" -#include "webrtc/media/base/codec.h" -#include "webrtc/modules/video_coding/codecs/h264/include/h264.h" -#include "webrtc/modules/video_coding/utility/quality_scaler.h" - -#include -#include - -// This file provides a H264 encoder implementation using the VideoToolbox -// APIs. Since documentation is almost non-existent, this is largely based on -// the information in the VideoToolbox header files, a talk from WWDC 2014 and -// experimentation. - -namespace webrtc { - -class H264VideoToolboxEncoder : public H264Encoder { - public: - explicit H264VideoToolboxEncoder(const cricket::VideoCodec& codec); - - ~H264VideoToolboxEncoder() override; - - int InitEncode(const VideoCodec* codec_settings, - int number_of_cores, - size_t max_payload_size) override; - - int Encode(const VideoFrame& input_image, - const CodecSpecificInfo* codec_specific_info, - const std::vector* frame_types) override; - - int RegisterEncodeCompleteCallback(EncodedImageCallback* callback) override; - - int SetChannelParameters(uint32_t packet_loss, int64_t rtt) override; - - int SetRates(uint32_t new_bitrate_kbit, uint32_t frame_rate) override; - - int Release() override; - - const char* ImplementationName() const override; - - bool SupportsNativeHandle() const override; - - void OnEncodedFrame(OSStatus status, - VTEncodeInfoFlags info_flags, - CMSampleBufferRef sample_buffer, - CodecSpecificInfo codec_specific_info, - int32_t width, - int32_t height, - int64_t render_time_ms, - uint32_t timestamp, - VideoRotation rotation); - - ScalingSettings GetScalingSettings() const override; - - private: - int ResetCompressionSession(); - void ConfigureCompressionSession(); - void DestroyCompressionSession(); - rtc::scoped_refptr GetScaledBufferOnEncode( - const rtc::scoped_refptr& frame); - void SetBitrateBps(uint32_t bitrate_bps); - void SetEncoderBitrateBps(uint32_t bitrate_bps); - - EncodedImageCallback* callback_; - VTCompressionSessionRef compression_session_; - BitrateAdjuster bitrate_adjuster_; - H264PacketizationMode packetization_mode_; - uint32_t target_bitrate_bps_; - uint32_t encoder_bitrate_bps_; - int32_t width_; - int32_t height_; - const CFStringRef profile_; - - H264BitstreamParser h264_bitstream_parser_; - std::vector nv12_scale_buffer_; -}; // H264VideoToolboxEncoder - -} // namespace webrtc - -#endif // WEBRTC_SDK_OBJC_FRAMEWORK_CLASSES_H264_VIDEO_TOOLBOX_ENCODER_H_ diff --git a/WebRtc.NET/include/webrtc/sdk/objc/Framework/Classes/h264_video_toolbox_nalu.h b/WebRtc.NET/include/webrtc/sdk/objc/Framework/Classes/h264_video_toolbox_nalu.h deleted file mode 100644 index 23e9f7f7..00000000 --- a/WebRtc.NET/include/webrtc/sdk/objc/Framework/Classes/h264_video_toolbox_nalu.h +++ /dev/null @@ -1,112 +0,0 @@ -/* - * Copyright (c) 2015 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - * - */ - -#ifndef WEBRTC_SDK_OBJC_FRAMEWORK_CLASSES_H264_VIDEO_TOOLBOX_NALU_H_ -#define WEBRTC_SDK_OBJC_FRAMEWORK_CLASSES_H264_VIDEO_TOOLBOX_NALU_H_ - -#include "webrtc/modules/video_coding/codecs/h264/include/h264.h" - -#include -#include - -#include "webrtc/base/buffer.h" -#include "webrtc/common_video/h264/h264_common.h" -#include "webrtc/modules/include/module_common_types.h" - -using webrtc::H264::NaluIndex; - -namespace webrtc { - -// Converts a sample buffer emitted from the VideoToolbox encoder into a buffer -// suitable for RTP. The sample buffer is in avcc format whereas the rtp buffer -// needs to be in Annex B format. Data is written directly to |annexb_buffer| -// and a new RTPFragmentationHeader is returned in |out_header|. -bool H264CMSampleBufferToAnnexBBuffer( - CMSampleBufferRef avcc_sample_buffer, - bool is_keyframe, - rtc::Buffer* annexb_buffer, - webrtc::RTPFragmentationHeader** out_header); - -// Converts a buffer received from RTP into a sample buffer suitable for the -// VideoToolbox decoder. The RTP buffer is in annex b format whereas the sample -// buffer is in avcc format. -// If |is_keyframe| is true then |video_format| is ignored since the format will -// be read from the buffer. Otherwise |video_format| must be provided. -// Caller is responsible for releasing the created sample buffer. -bool H264AnnexBBufferToCMSampleBuffer(const uint8_t* annexb_buffer, - size_t annexb_buffer_size, - CMVideoFormatDescriptionRef video_format, - CMSampleBufferRef* out_sample_buffer); - -// Returns true if the type of the first NALU in the supplied Annex B buffer is -// the SPS type. -bool H264AnnexBBufferHasVideoFormatDescription(const uint8_t* annexb_buffer, - size_t annexb_buffer_size); - -// Returns a video format description created from the sps/pps information in -// the Annex B buffer. If there is no such information, nullptr is returned. -// The caller is responsible for releasing the description. -CMVideoFormatDescriptionRef CreateVideoFormatDescription( - const uint8_t* annexb_buffer, - size_t annexb_buffer_size); - -// Helper class for reading NALUs from an RTP Annex B buffer. -class AnnexBBufferReader final { - public: - AnnexBBufferReader(const uint8_t* annexb_buffer, size_t length); - ~AnnexBBufferReader() {} - AnnexBBufferReader(const AnnexBBufferReader& other) = delete; - void operator=(const AnnexBBufferReader& other) = delete; - - // Returns a pointer to the beginning of the next NALU slice without the - // header bytes and its length. Returns false if no more slices remain. - bool ReadNalu(const uint8_t** out_nalu, size_t* out_length); - - // Returns the number of unread NALU bytes, including the size of the header. - // If the buffer has no remaining NALUs this will return zero. - size_t BytesRemaining() const; - - private: - // Returns the the next offset that contains NALU data. - size_t FindNextNaluHeader(const uint8_t* start, - size_t length, - size_t offset) const; - - const uint8_t* const start_; - std::vector offsets_; - std::vector::iterator offset_; - const size_t length_; -}; - -// Helper class for writing NALUs using avcc format into a buffer. -class AvccBufferWriter final { - public: - AvccBufferWriter(uint8_t* const avcc_buffer, size_t length); - ~AvccBufferWriter() {} - AvccBufferWriter(const AvccBufferWriter& other) = delete; - void operator=(const AvccBufferWriter& other) = delete; - - // Writes the data slice into the buffer. Returns false if there isn't - // enough space left. - bool WriteNalu(const uint8_t* data, size_t data_size); - - // Returns the unused bytes in the buffer. - size_t BytesRemaining() const; - - private: - uint8_t* const start_; - size_t offset_; - const size_t length_; -}; - -} // namespace webrtc - -#endif // WEBRTC_SDK_OBJC_FRAMEWORK_CLASSES_H264_VIDEO_TOOLBOX_NALU_H_ diff --git a/WebRtc.NET/include/webrtc/sdk/objc/Framework/Classes/helpers.h b/WebRtc.NET/include/webrtc/sdk/objc/Framework/Classes/helpers.h deleted file mode 100644 index 35a228f5..00000000 --- a/WebRtc.NET/include/webrtc/sdk/objc/Framework/Classes/helpers.h +++ /dev/null @@ -1,78 +0,0 @@ -/* - * Copyright (c) 2015 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_SDK_OBJC_FRAMEWORK_CLASSES_HELPERS_H_ -#define WEBRTC_SDK_OBJC_FRAMEWORK_CLASSES_HELPERS_H_ - -#if defined(WEBRTC_IOS) - -#include - -namespace webrtc { -namespace ios { - -bool CheckAndLogError(BOOL success, NSError* error); - -NSString *NSStringFromStdString(const std::string& stdString); -std::string StdStringFromNSString(NSString* nsString); - -// Return thread ID as a string. -std::string GetThreadId(); - -// Return thread ID as string suitable for debug logging. -std::string GetThreadInfo(); - -// Returns [NSThread currentThread] description as string. -// Example: {number = 1, name = main} -std::string GetCurrentThreadDescription(); - -std::string GetAudioSessionCategory(); - -// Returns the current name of the operating system. -std::string GetSystemName(); - -// Returns the current version of the operating system as a string. -std::string GetSystemVersionAsString(); - -// Returns the version of the operating system in double representation. -// Uses a cached value of the system version. -double GetSystemVersion(); - -// Returns the device type. -// Examples: ”iPhone” and ”iPod touch”. -std::string GetDeviceType(); - -// Returns a more detailed device name. -// Examples: "iPhone 5s (GSM)" and "iPhone 6 Plus". -std::string GetDeviceName(); - -// Returns the name of the process. Does not uniquely identify the process. -std::string GetProcessName(); - -// Returns the identifier of the process (often called process ID). -int GetProcessID(); - -// Returns a string containing the version of the operating system on which the -// process is executing. The string is string is human readable, localized, and -// is appropriate for displaying to the user. -std::string GetOSVersionString(); - -// Returns the number of processing cores available on the device. -int GetProcessorCount(); - -// Indicates whether Low Power Mode is enabled on the iOS device. -bool GetLowPowerModeEnabled(); - -} // namespace ios -} // namespace webrtc - -#endif // defined(WEBRTC_IOS) - -#endif // WEBRTC_SDK_OBJC_FRAMEWORK_CLASSES_HELPERS_H_ diff --git a/WebRtc.NET/include/webrtc/sdk/objc/Framework/Classes/videotoolboxvideocodecfactory.h b/WebRtc.NET/include/webrtc/sdk/objc/Framework/Classes/videotoolboxvideocodecfactory.h deleted file mode 100644 index 8acd9dd5..00000000 --- a/WebRtc.NET/include/webrtc/sdk/objc/Framework/Classes/videotoolboxvideocodecfactory.h +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - * - */ -#ifndef WEBRTC_SDK_OBJC_FRAMEWORK_CLASSES_VIDEOTOOLBOXVIDEOCODECFACTORY_H_ -#define WEBRTC_SDK_OBJC_FRAMEWORK_CLASSES_VIDEOTOOLBOXVIDEOCODECFACTORY_H_ - -#include "webrtc/media/engine/webrtcvideoencoderfactory.h" -#include "webrtc/media/engine/webrtcvideodecoderfactory.h" - -namespace webrtc { - -class VideoToolboxVideoEncoderFactory - : public cricket::WebRtcVideoEncoderFactory { - public: - VideoToolboxVideoEncoderFactory(); - ~VideoToolboxVideoEncoderFactory(); - - // WebRtcVideoEncoderFactory implementation. - VideoEncoder* CreateVideoEncoder(const cricket::VideoCodec& codec) override; - void DestroyVideoEncoder(VideoEncoder* encoder) override; - const std::vector& supported_codecs() const override; - - private: - // TODO(magjed): Mutable because it depends on a field trial and it is - // recalculated every call to supported_codecs(). - mutable std::vector supported_codecs_; -}; - -class VideoToolboxVideoDecoderFactory - : public cricket::WebRtcVideoDecoderFactory { - public: - VideoToolboxVideoDecoderFactory(); - ~VideoToolboxVideoDecoderFactory(); - - // WebRtcVideoDecoderFactory implementation. - VideoDecoder* CreateVideoDecoder(VideoCodecType type) override; - void DestroyVideoDecoder(VideoDecoder* decoder) override; - - private: - std::vector supported_codecs_; -}; - -} // namespace webrtc - -#endif // WEBRTC_SDK_OBJC_FRAMEWORK_CLASSES_VIDEOTOOLBOXVIDEOCODECFACTORY_H_ diff --git a/WebRtc.NET/include/webrtc/sdk/objc/Framework/Headers/WebRTC/RTCAVFoundationVideoSource.h b/WebRtc.NET/include/webrtc/sdk/objc/Framework/Headers/WebRTC/RTCAVFoundationVideoSource.h deleted file mode 100644 index 254196d9..00000000 --- a/WebRtc.NET/include/webrtc/sdk/objc/Framework/Headers/WebRTC/RTCAVFoundationVideoSource.h +++ /dev/null @@ -1,53 +0,0 @@ -/* - * Copyright 2015 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#import -#import - -@class AVCaptureSession; -@class RTCMediaConstraints; -@class RTCPeerConnectionFactory; - -NS_ASSUME_NONNULL_BEGIN - -/** - * RTCAVFoundationVideoSource is a video source that uses - * webrtc::AVFoundationVideoCapturer. We do not currently provide a wrapper for - * that capturer because cricket::VideoCapturer is not ref counted and we cannot - * guarantee its lifetime. Instead, we expose its properties through the ref - * counted video source interface. - */ -RTC_EXPORT -@interface RTCAVFoundationVideoSource : RTCVideoSource - -- (instancetype)init NS_UNAVAILABLE; - -/** - * Calling this function will cause frames to be scaled down to the - * requested resolution. Also, frames will be cropped to match the - * requested aspect ratio, and frames will be dropped to match the - * requested fps. The requested aspect ratio is orientation agnostic and - * will be adjusted to maintain the input orientation, so it doesn't - * matter if e.g. 1280x720 or 720x1280 is requested. - */ -- (void)adaptOutputFormatToWidth:(int)width height:(int)height fps:(int)fps; - -/** Returns whether rear-facing camera is available for use. */ -@property(nonatomic, readonly) BOOL canUseBackCamera; - -/** Switches the camera being used (either front or back). */ -@property(nonatomic, assign) BOOL useBackCamera; - -/** Returns the active capture session. */ -@property(nonatomic, readonly) AVCaptureSession *captureSession; - -@end - -NS_ASSUME_NONNULL_END diff --git a/WebRtc.NET/include/webrtc/sdk/objc/Framework/Headers/WebRTC/RTCAudioSource.h b/WebRtc.NET/include/webrtc/sdk/objc/Framework/Headers/WebRTC/RTCAudioSource.h deleted file mode 100644 index a86f42bb..00000000 --- a/WebRtc.NET/include/webrtc/sdk/objc/Framework/Headers/WebRTC/RTCAudioSource.h +++ /dev/null @@ -1,25 +0,0 @@ -/* - * Copyright 2016 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#import - -#import -#import - -NS_ASSUME_NONNULL_BEGIN - -RTC_EXPORT -@interface RTCAudioSource : RTCMediaSource - -- (instancetype)init NS_UNAVAILABLE; - -@end - -NS_ASSUME_NONNULL_END diff --git a/WebRtc.NET/include/webrtc/sdk/objc/Framework/Headers/WebRTC/RTCConfiguration.h b/WebRtc.NET/include/webrtc/sdk/objc/Framework/Headers/WebRTC/RTCConfiguration.h deleted file mode 100644 index b7290804..00000000 --- a/WebRtc.NET/include/webrtc/sdk/objc/Framework/Headers/WebRTC/RTCConfiguration.h +++ /dev/null @@ -1,111 +0,0 @@ -/* - * Copyright 2015 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#import - -#import - -@class RTCIceServer; - -/** - * Represents the ice transport policy. This exposes the same states in C++, - * which include one more state than what exists in the W3C spec. - */ -typedef NS_ENUM(NSInteger, RTCIceTransportPolicy) { - RTCIceTransportPolicyNone, - RTCIceTransportPolicyRelay, - RTCIceTransportPolicyNoHost, - RTCIceTransportPolicyAll -}; - -/** Represents the bundle policy. */ -typedef NS_ENUM(NSInteger, RTCBundlePolicy) { - RTCBundlePolicyBalanced, - RTCBundlePolicyMaxCompat, - RTCBundlePolicyMaxBundle -}; - -/** Represents the rtcp mux policy. */ -typedef NS_ENUM(NSInteger, RTCRtcpMuxPolicy) { - RTCRtcpMuxPolicyNegotiate, - RTCRtcpMuxPolicyRequire -}; - -/** Represents the tcp candidate policy. */ -typedef NS_ENUM(NSInteger, RTCTcpCandidatePolicy) { - RTCTcpCandidatePolicyEnabled, - RTCTcpCandidatePolicyDisabled -}; - -/** Represents the candidate network policy. */ -typedef NS_ENUM(NSInteger, RTCCandidateNetworkPolicy) { - RTCCandidateNetworkPolicyAll, - RTCCandidateNetworkPolicyLowCost -}; - -/** Represents the continual gathering policy. */ -typedef NS_ENUM(NSInteger, RTCContinualGatheringPolicy) { - RTCContinualGatheringPolicyGatherOnce, - RTCContinualGatheringPolicyGatherContinually -}; - -/** Represents the encryption key type. */ -typedef NS_ENUM(NSInteger, RTCEncryptionKeyType) { - RTCEncryptionKeyTypeRSA, - RTCEncryptionKeyTypeECDSA, -}; - -NS_ASSUME_NONNULL_BEGIN - -RTC_EXPORT -@interface RTCConfiguration : NSObject - -/** An array of Ice Servers available to be used by ICE. */ -@property(nonatomic, copy) NSArray *iceServers; - -/** Which candidates the ICE agent is allowed to use. The W3C calls it - * |iceTransportPolicy|, while in C++ it is called |type|. */ -@property(nonatomic, assign) RTCIceTransportPolicy iceTransportPolicy; - -/** The media-bundling policy to use when gathering ICE candidates. */ -@property(nonatomic, assign) RTCBundlePolicy bundlePolicy; - -/** The rtcp-mux policy to use when gathering ICE candidates. */ -@property(nonatomic, assign) RTCRtcpMuxPolicy rtcpMuxPolicy; -@property(nonatomic, assign) RTCTcpCandidatePolicy tcpCandidatePolicy; -@property(nonatomic, assign) RTCCandidateNetworkPolicy candidateNetworkPolicy; -@property(nonatomic, assign) - RTCContinualGatheringPolicy continualGatheringPolicy; -@property(nonatomic, assign) int audioJitterBufferMaxPackets; -@property(nonatomic, assign) BOOL audioJitterBufferFastAccelerate; -@property(nonatomic, assign) int iceConnectionReceivingTimeout; -@property(nonatomic, assign) int iceBackupCandidatePairPingInterval; - -/** Key type used to generate SSL identity. Default is ECDSA. */ -@property(nonatomic, assign) RTCEncryptionKeyType keyType; - -/** ICE candidate pool size as defined in JSEP. Default is 0. */ -@property(nonatomic, assign) int iceCandidatePoolSize; - -/** Prune turn ports on the same network to the same turn server. - * Default is NO. - */ -@property(nonatomic, assign) BOOL shouldPruneTurnPorts; - -/** If set to YES, this means the ICE transport should presume TURN-to-TURN - * candidate pairs will succeed, even before a binding response is received. - */ -@property(nonatomic, assign) BOOL shouldPresumeWritableWhenFullyRelayed; - -- (instancetype)init NS_DESIGNATED_INITIALIZER; - -@end - -NS_ASSUME_NONNULL_END diff --git a/WebRtc.NET/include/webrtc/sdk/objc/Framework/Headers/WebRTC/RTCEAGLVideoView.h b/WebRtc.NET/include/webrtc/sdk/objc/Framework/Headers/WebRTC/RTCEAGLVideoView.h deleted file mode 100644 index 5f8d73bc..00000000 --- a/WebRtc.NET/include/webrtc/sdk/objc/Framework/Headers/WebRTC/RTCEAGLVideoView.h +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright 2015 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#import -#import - -#import -#import - -NS_ASSUME_NONNULL_BEGIN - -@class RTCEAGLVideoView; -RTC_EXPORT -@protocol RTCEAGLVideoViewDelegate - -- (void)videoView:(RTCEAGLVideoView *)videoView didChangeVideoSize:(CGSize)size; - -@end - -/** - * RTCEAGLVideoView is an RTCVideoRenderer which renders video frames in its - * bounds using OpenGLES 2.0. - */ -RTC_EXPORT -@interface RTCEAGLVideoView : UIView - -@property(nonatomic, weak) id delegate; - -@end - -NS_ASSUME_NONNULL_END diff --git a/WebRtc.NET/include/webrtc/sdk/objc/Framework/Headers/WebRTC/RTCFieldTrials.h b/WebRtc.NET/include/webrtc/sdk/objc/Framework/Headers/WebRTC/RTCFieldTrials.h deleted file mode 100644 index 60c51d8a..00000000 --- a/WebRtc.NET/include/webrtc/sdk/objc/Framework/Headers/WebRTC/RTCFieldTrials.h +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright 2016 The WebRTC Project Authors. All rights reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#import - -#import - -/** The only valid value for the following if set is kRTCFieldTrialEnabledValue. */ -RTC_EXTERN NSString * const kRTCFieldTrialAudioSendSideBweKey; -RTC_EXTERN NSString * const kRTCFieldTrialFlexFec03Key; -RTC_EXTERN NSString * const kRTCFieldTrialImprovedBitrateEstimateKey; -RTC_EXTERN NSString * const kRTCFieldTrialH264HighProfileKey; - -/** The valid value for field trials above. */ -RTC_EXTERN NSString * const kRTCFieldTrialEnabledValue; - -/** Use a string returned by RTCFieldTrialTrendlineFilterValue as the value. */ -RTC_EXTERN NSString * const kRTCFieldTrialTrendlineFilterKey; -/** Returns a valid value for kRTCFieldTrialTrendlineFilterKey. */ -RTC_EXTERN NSString *RTCFieldTrialTrendlineFilterValue( - size_t windowSize, double smoothingCoeff, double thresholdGain); - -/** Initialize field trials using a dictionary mapping field trial keys to their values. See above - * for valid keys and values. - * Must be called before any other call into WebRTC. See: - * webrtc/system_wrappers/include/field_trial_default.h - */ -RTC_EXTERN void RTCInitFieldTrialDictionary(NSDictionary *fieldTrials); diff --git a/WebRtc.NET/include/webrtc/sdk/objc/Framework/Headers/WebRTC/RTCIceServer.h b/WebRtc.NET/include/webrtc/sdk/objc/Framework/Headers/WebRTC/RTCIceServer.h deleted file mode 100644 index ff5489cb..00000000 --- a/WebRtc.NET/include/webrtc/sdk/objc/Framework/Headers/WebRTC/RTCIceServer.h +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright 2015 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#import - -#import - -NS_ASSUME_NONNULL_BEGIN - -RTC_EXPORT -@interface RTCIceServer : NSObject - -/** URI(s) for this server represented as NSStrings. */ -@property(nonatomic, readonly) NSArray *urlStrings; - -/** Username to use if this RTCIceServer object is a TURN server. */ -@property(nonatomic, readonly, nullable) NSString *username; - -/** Credential to use if this RTCIceServer object is a TURN server. */ -@property(nonatomic, readonly, nullable) NSString *credential; - -- (nonnull instancetype)init NS_UNAVAILABLE; - -/** Convenience initializer for a server with no authentication (e.g. STUN). */ -- (instancetype)initWithURLStrings:(NSArray *)urlStrings; - -/** - * Initialize an RTCIceServer with its associated URLs, optional username, - * optional credential, and credentialType. - */ -- (instancetype)initWithURLStrings:(NSArray *)urlStrings - username:(nullable NSString *)username - credential:(nullable NSString *)credential - NS_DESIGNATED_INITIALIZER; - -@end - -NS_ASSUME_NONNULL_END diff --git a/WebRtc.NET/include/webrtc/sdk/objc/Framework/Headers/WebRTC/RTCLogging.h b/WebRtc.NET/include/webrtc/sdk/objc/Framework/Headers/WebRTC/RTCLogging.h deleted file mode 100644 index e4f19203..00000000 --- a/WebRtc.NET/include/webrtc/sdk/objc/Framework/Headers/WebRTC/RTCLogging.h +++ /dev/null @@ -1,69 +0,0 @@ -/* - * Copyright 2015 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#import - -#import - -// Subset of rtc::LoggingSeverity. -typedef NS_ENUM(NSInteger, RTCLoggingSeverity) { - RTCLoggingSeverityVerbose, - RTCLoggingSeverityInfo, - RTCLoggingSeverityWarning, - RTCLoggingSeverityError, -}; - -// Wrapper for C++ LOG(sev) macros. -// Logs the log string to the webrtc logstream for the given severity. -RTC_EXTERN void RTCLogEx(RTCLoggingSeverity severity, NSString* log_string); - -// Wrapper for rtc::LogMessage::LogToDebug. -// Sets the minimum severity to be logged to console. -RTC_EXTERN void RTCSetMinDebugLogLevel(RTCLoggingSeverity severity); - -// Returns the filename with the path prefix removed. -RTC_EXTERN NSString* RTCFileName(const char* filePath); - -// Some convenience macros. - -#define RTCLogString(format, ...) \ - [NSString stringWithFormat:@"(%@:%d %s): " format, \ - RTCFileName(__FILE__), \ - __LINE__, \ - __FUNCTION__, \ - ##__VA_ARGS__] - -#define RTCLogFormat(severity, format, ...) \ - do { \ - NSString* log_string = RTCLogString(format, ##__VA_ARGS__); \ - RTCLogEx(severity, log_string); \ - } while (false) - -#define RTCLogVerbose(format, ...) \ - RTCLogFormat(RTCLoggingSeverityVerbose, format, ##__VA_ARGS__) \ - -#define RTCLogInfo(format, ...) \ - RTCLogFormat(RTCLoggingSeverityInfo, format, ##__VA_ARGS__) \ - -#define RTCLogWarning(format, ...) \ - RTCLogFormat(RTCLoggingSeverityWarning, format, ##__VA_ARGS__) \ - -#define RTCLogError(format, ...) \ - RTCLogFormat(RTCLoggingSeverityError, format, ##__VA_ARGS__) \ - -#if !defined(NDEBUG) -#define RTCLogDebug(format, ...) RTCLogInfo(format, ##__VA_ARGS__) -#else -#define RTCLogDebug(format, ...) \ - do { \ - } while (false) -#endif - -#define RTCLog(format, ...) RTCLogInfo(format, ##__VA_ARGS__) diff --git a/WebRtc.NET/include/webrtc/sdk/objc/Framework/Headers/WebRTC/RTCMediaConstraints.h b/WebRtc.NET/include/webrtc/sdk/objc/Framework/Headers/WebRTC/RTCMediaConstraints.h deleted file mode 100644 index b58fa3e7..00000000 --- a/WebRtc.NET/include/webrtc/sdk/objc/Framework/Headers/WebRTC/RTCMediaConstraints.h +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright 2015 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#import - -#import - -NS_ASSUME_NONNULL_BEGIN - -RTC_EXTERN NSString * const kRTCMediaConstraintsMinAspectRatio; -RTC_EXTERN NSString * const kRTCMediaConstraintsMaxAspectRatio; -RTC_EXTERN NSString * const kRTCMediaConstraintsMaxWidth; -RTC_EXTERN NSString * const kRTCMediaConstraintsMinWidth; -RTC_EXTERN NSString * const kRTCMediaConstraintsMaxHeight; -RTC_EXTERN NSString * const kRTCMediaConstraintsMinHeight; -RTC_EXTERN NSString * const kRTCMediaConstraintsMaxFrameRate; -RTC_EXTERN NSString * const kRTCMediaConstraintsMinFrameRate; -RTC_EXTERN NSString * const kRTCMediaConstraintsLevelControl; - -RTC_EXTERN NSString * const kRTCMediaConstraintsValueTrue; -RTC_EXTERN NSString * const kRTCMediaConstraintsValueFalse; - -RTC_EXPORT -@interface RTCMediaConstraints : NSObject - -- (instancetype)init NS_UNAVAILABLE; - -/** Initialize with mandatory and/or optional constraints. */ -- (instancetype)initWithMandatoryConstraints: - (nullable NSDictionary *)mandatory - optionalConstraints: - (nullable NSDictionary *)optional - NS_DESIGNATED_INITIALIZER; - -@end - -NS_ASSUME_NONNULL_END diff --git a/WebRtc.NET/include/webrtc/sdk/objc/Framework/Headers/WebRTC/RTCNSGLVideoView.h b/WebRtc.NET/include/webrtc/sdk/objc/Framework/Headers/WebRTC/RTCNSGLVideoView.h deleted file mode 100644 index 34588dbe..00000000 --- a/WebRtc.NET/include/webrtc/sdk/objc/Framework/Headers/WebRTC/RTCNSGLVideoView.h +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright 2015 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#import - -#if !TARGET_OS_IPHONE - -#import - -#import - -NS_ASSUME_NONNULL_BEGIN - -@class RTCNSGLVideoView; -@protocol RTCNSGLVideoViewDelegate - -- (void)videoView:(RTCNSGLVideoView *)videoView didChangeVideoSize:(CGSize)size; - -@end - -@interface RTCNSGLVideoView : NSOpenGLView - -@property(nonatomic, weak) id delegate; - -@end - -NS_ASSUME_NONNULL_END - -#endif diff --git a/WebRtc.NET/include/webrtc/sdk/objc/Framework/Headers/WebRTC/RTCPeerConnection.h b/WebRtc.NET/include/webrtc/sdk/objc/Framework/Headers/WebRTC/RTCPeerConnection.h deleted file mode 100644 index 4438eb28..00000000 --- a/WebRtc.NET/include/webrtc/sdk/objc/Framework/Headers/WebRTC/RTCPeerConnection.h +++ /dev/null @@ -1,224 +0,0 @@ -/* - * Copyright 2015 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#import - -#import - -@class RTCConfiguration; -@class RTCDataChannel; -@class RTCDataChannelConfiguration; -@class RTCIceCandidate; -@class RTCMediaConstraints; -@class RTCMediaStream; -@class RTCMediaStreamTrack; -@class RTCPeerConnectionFactory; -@class RTCRtpReceiver; -@class RTCRtpSender; -@class RTCSessionDescription; -@class RTCLegacyStatsReport; - -NS_ASSUME_NONNULL_BEGIN - -extern NSString * const kRTCPeerConnectionErrorDomain; -extern int const kRTCSessionDescriptionErrorCode; - -/** Represents the signaling state of the peer connection. */ -typedef NS_ENUM(NSInteger, RTCSignalingState) { - RTCSignalingStateStable, - RTCSignalingStateHaveLocalOffer, - RTCSignalingStateHaveLocalPrAnswer, - RTCSignalingStateHaveRemoteOffer, - RTCSignalingStateHaveRemotePrAnswer, - // Not an actual state, represents the total number of states. - RTCSignalingStateClosed, -}; - -/** Represents the ice connection state of the peer connection. */ -typedef NS_ENUM(NSInteger, RTCIceConnectionState) { - RTCIceConnectionStateNew, - RTCIceConnectionStateChecking, - RTCIceConnectionStateConnected, - RTCIceConnectionStateCompleted, - RTCIceConnectionStateFailed, - RTCIceConnectionStateDisconnected, - RTCIceConnectionStateClosed, - RTCIceConnectionStateCount, -}; - -/** Represents the ice gathering state of the peer connection. */ -typedef NS_ENUM(NSInteger, RTCIceGatheringState) { - RTCIceGatheringStateNew, - RTCIceGatheringStateGathering, - RTCIceGatheringStateComplete, -}; - -/** Represents the stats output level. */ -typedef NS_ENUM(NSInteger, RTCStatsOutputLevel) { - RTCStatsOutputLevelStandard, - RTCStatsOutputLevelDebug, -}; - -@class RTCPeerConnection; - -RTC_EXPORT -@protocol RTCPeerConnectionDelegate - -/** Called when the SignalingState changed. */ -- (void)peerConnection:(RTCPeerConnection *)peerConnection - didChangeSignalingState:(RTCSignalingState)stateChanged; - -/** Called when media is received on a new stream from remote peer. */ -- (void)peerConnection:(RTCPeerConnection *)peerConnection - didAddStream:(RTCMediaStream *)stream; - -/** Called when a remote peer closes a stream. */ -- (void)peerConnection:(RTCPeerConnection *)peerConnection - didRemoveStream:(RTCMediaStream *)stream; - -/** Called when negotiation is needed, for example ICE has restarted. */ -- (void)peerConnectionShouldNegotiate:(RTCPeerConnection *)peerConnection; - -/** Called any time the IceConnectionState changes. */ -- (void)peerConnection:(RTCPeerConnection *)peerConnection - didChangeIceConnectionState:(RTCIceConnectionState)newState; - -/** Called any time the IceGatheringState changes. */ -- (void)peerConnection:(RTCPeerConnection *)peerConnection - didChangeIceGatheringState:(RTCIceGatheringState)newState; - -/** New ice candidate has been found. */ -- (void)peerConnection:(RTCPeerConnection *)peerConnection - didGenerateIceCandidate:(RTCIceCandidate *)candidate; - -/** Called when a group of local Ice candidates have been removed. */ -- (void)peerConnection:(RTCPeerConnection *)peerConnection - didRemoveIceCandidates:(NSArray *)candidates; - -/** New data channel has been opened. */ -- (void)peerConnection:(RTCPeerConnection *)peerConnection - didOpenDataChannel:(RTCDataChannel *)dataChannel; - -@end - -RTC_EXPORT -@interface RTCPeerConnection : NSObject - -/** The object that will be notifed about events such as state changes and - * streams being added or removed. - */ -@property(nonatomic, weak, nullable) id delegate; -@property(nonatomic, readonly) NSArray *localStreams; -@property(nonatomic, readonly, nullable) - RTCSessionDescription *localDescription; -@property(nonatomic, readonly, nullable) - RTCSessionDescription *remoteDescription; -@property(nonatomic, readonly) RTCSignalingState signalingState; -@property(nonatomic, readonly) RTCIceConnectionState iceConnectionState; -@property(nonatomic, readonly) RTCIceGatheringState iceGatheringState; - -/** Gets all RTCRtpSenders associated with this peer connection. - * Note: reading this property returns different instances of RTCRtpSender. - * Use isEqual: instead of == to compare RTCRtpSender instances. - */ -@property(nonatomic, readonly) NSArray *senders; - -/** Gets all RTCRtpReceivers associated with this peer connection. - * Note: reading this property returns different instances of RTCRtpReceiver. - * Use isEqual: instead of == to compare RTCRtpReceiver instances. - */ -@property(nonatomic, readonly) NSArray *receivers; - -- (instancetype)init NS_UNAVAILABLE; - -/** Sets the PeerConnection's global configuration to |configuration|. - * Any changes to STUN/TURN servers or ICE candidate policy will affect the - * next gathering phase, and cause the next call to createOffer to generate - * new ICE credentials. Note that the BUNDLE and RTCP-multiplexing policies - * cannot be changed with this method. - */ -- (BOOL)setConfiguration:(RTCConfiguration *)configuration; - -/** Terminate all media and close the transport. */ -- (void)close; - -/** Provide a remote candidate to the ICE Agent. */ -- (void)addIceCandidate:(RTCIceCandidate *)candidate; - -/** Remove a group of remote candidates from the ICE Agent. */ -- (void)removeIceCandidates:(NSArray *)candidates; - -/** Add a new media stream to be sent on this peer connection. */ -- (void)addStream:(RTCMediaStream *)stream; - -/** Remove the given media stream from this peer connection. */ -- (void)removeStream:(RTCMediaStream *)stream; - -/** Generate an SDP offer. */ -- (void)offerForConstraints:(RTCMediaConstraints *)constraints - completionHandler:(nullable void (^) - (RTCSessionDescription * _Nullable sdp, - NSError * _Nullable error))completionHandler; - -/** Generate an SDP answer. */ -- (void)answerForConstraints:(RTCMediaConstraints *)constraints - completionHandler:(nullable void (^) - (RTCSessionDescription * _Nullable sdp, - NSError * _Nullable error))completionHandler; - -/** Apply the supplied RTCSessionDescription as the local description. */ -- (void)setLocalDescription:(RTCSessionDescription *)sdp - completionHandler: - (nullable void (^)(NSError * _Nullable error))completionHandler; - -/** Apply the supplied RTCSessionDescription as the remote description. */ -- (void)setRemoteDescription:(RTCSessionDescription *)sdp - completionHandler: - (nullable void (^)(NSError * _Nullable error))completionHandler; - -/** Start or stop recording an Rtc EventLog. */ -- (BOOL)startRtcEventLogWithFilePath:(NSString *)filePath - maxSizeInBytes:(int64_t)maxSizeInBytes; -- (void)stopRtcEventLog; - -@end - -@interface RTCPeerConnection (Media) - -/** - * Create an RTCRtpSender with the specified kind and media stream ID. - * See RTCMediaStreamTrack.h for available kinds. - */ -- (RTCRtpSender *)senderWithKind:(NSString *)kind streamId:(NSString *)streamId; - -@end - -@interface RTCPeerConnection (DataChannel) - -/** Create a new data channel with the given label and configuration. */ -- (RTCDataChannel *)dataChannelForLabel:(NSString *)label - configuration:(RTCDataChannelConfiguration *)configuration; - -@end - -@interface RTCPeerConnection (Stats) - -/** Gather stats for the given RTCMediaStreamTrack. If |mediaStreamTrack| is nil - * statistics are gathered for all tracks. - */ -- (void)statsForTrack: - (nullable RTCMediaStreamTrack *)mediaStreamTrack - statsOutputLevel:(RTCStatsOutputLevel)statsOutputLevel - completionHandler: - (nullable void (^)(NSArray *stats))completionHandler; - -@end - -NS_ASSUME_NONNULL_END diff --git a/WebRtc.NET/include/webrtc/sdk/objc/Framework/Headers/WebRTC/RTCPeerConnectionFactory.h b/WebRtc.NET/include/webrtc/sdk/objc/Framework/Headers/WebRTC/RTCPeerConnectionFactory.h deleted file mode 100644 index 2088163e..00000000 --- a/WebRtc.NET/include/webrtc/sdk/objc/Framework/Headers/WebRTC/RTCPeerConnectionFactory.h +++ /dev/null @@ -1,75 +0,0 @@ -/* - * Copyright 2015 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#import - -#import - -NS_ASSUME_NONNULL_BEGIN - -@class RTCAVFoundationVideoSource; -@class RTCAudioSource; -@class RTCAudioTrack; -@class RTCConfiguration; -@class RTCMediaConstraints; -@class RTCMediaStream; -@class RTCPeerConnection; -@class RTCVideoSource; -@class RTCVideoTrack; -@protocol RTCPeerConnectionDelegate; - -RTC_EXPORT -@interface RTCPeerConnectionFactory : NSObject - -- (instancetype)init NS_DESIGNATED_INITIALIZER; - -/** Initialize an RTCAudioSource with constraints. */ -- (RTCAudioSource *)audioSourceWithConstraints:(nullable RTCMediaConstraints *)constraints; - -/** Initialize an RTCAudioTrack with an id. Convenience ctor to use an audio source with no - * constraints. - */ -- (RTCAudioTrack *)audioTrackWithTrackId:(NSString *)trackId; - -/** Initialize an RTCAudioTrack with a source and an id. */ -- (RTCAudioTrack *)audioTrackWithSource:(RTCAudioSource *)source - trackId:(NSString *)trackId; - -/** Initialize an RTCAVFoundationVideoSource with constraints. */ -- (RTCAVFoundationVideoSource *)avFoundationVideoSourceWithConstraints: - (nullable RTCMediaConstraints *)constraints; - -/** Initialize an RTCVideoTrack with a source and an id. */ -- (RTCVideoTrack *)videoTrackWithSource:(RTCVideoSource *)source - trackId:(NSString *)trackId; - -/** Initialize an RTCMediaStream with an id. */ -- (RTCMediaStream *)mediaStreamWithStreamId:(NSString *)streamId; - -/** Initialize an RTCPeerConnection with a configuration, constraints, and - * delegate. - */ -- (RTCPeerConnection *)peerConnectionWithConfiguration: - (RTCConfiguration *)configuration - constraints: - (RTCMediaConstraints *)constraints - delegate: - (nullable id)delegate; - -/** Start an AecDump recording. This API call will likely change in the future. */ -- (BOOL)startAecDumpWithFilePath:(NSString *)filePath - maxSizeInBytes:(int64_t)maxSizeInBytes; - -/* Stop an active AecDump recording */ -- (void)stopAecDump; - -@end - -NS_ASSUME_NONNULL_END diff --git a/WebRtc.NET/include/webrtc/sdk/objc/Framework/Headers/WebRTC/RTCRtpCodecParameters.h b/WebRtc.NET/include/webrtc/sdk/objc/Framework/Headers/WebRTC/RTCRtpCodecParameters.h deleted file mode 100644 index a3156bb9..00000000 --- a/WebRtc.NET/include/webrtc/sdk/objc/Framework/Headers/WebRTC/RTCRtpCodecParameters.h +++ /dev/null @@ -1,59 +0,0 @@ -/* - * Copyright 2016 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#import - -#import - -NS_ASSUME_NONNULL_BEGIN - -RTC_EXTERN const NSString * const kRTCRtxCodecMimeType; -RTC_EXTERN const NSString * const kRTCRedCodecMimeType; -RTC_EXTERN const NSString * const kRTCUlpfecCodecMimeType; -RTC_EXTERN const NSString * const kRTCFlexfecCodecMimeType; -RTC_EXTERN const NSString * const kRTCOpusCodecMimeType; -RTC_EXTERN const NSString * const kRTCIsacCodecMimeType; -RTC_EXTERN const NSString * const kRTCL16CodecMimeType; -RTC_EXTERN const NSString * const kRTCG722CodecMimeType; -RTC_EXTERN const NSString * const kRTCIlbcCodecMimeType; -RTC_EXTERN const NSString * const kRTCPcmuCodecMimeType; -RTC_EXTERN const NSString * const kRTCPcmaCodecMimeType; -RTC_EXTERN const NSString * const kRTCDtmfCodecMimeType; -RTC_EXTERN const NSString * const kRTCComfortNoiseCodecMimeType; -RTC_EXTERN const NSString * const kRTCVp8CodecMimeType; -RTC_EXTERN const NSString * const kRTCVp9CodecMimeType; -RTC_EXTERN const NSString * const kRTCH264CodecMimeType; - -/** Defined in http://w3c.github.io/webrtc-pc/#idl-def-RTCRtpCodecParameters */ -RTC_EXPORT -@interface RTCRtpCodecParameters : NSObject - -/** The RTP payload type. */ -@property(nonatomic, assign) int payloadType; - -/** - * The codec MIME type. Valid types are listed in: - * http://www.iana.org/assignments/rtp-parameters/rtp-parameters.xhtml#rtp-parameters-2 - * - * Several supported types are represented by the constants above. - */ -@property(nonatomic, nonnull) NSString *mimeType; - -/** The codec clock rate expressed in Hertz. */ -@property(nonatomic, assign) int clockRate; - -/** The number of channels (mono=1, stereo=2). */ -@property(nonatomic, assign) int channels; - -- (instancetype)init NS_DESIGNATED_INITIALIZER; - -@end - -NS_ASSUME_NONNULL_END diff --git a/WebRtc.NET/include/webrtc/sdk/objc/Framework/Headers/WebRTC/RTCRtpParameters.h b/WebRtc.NET/include/webrtc/sdk/objc/Framework/Headers/WebRTC/RTCRtpParameters.h deleted file mode 100644 index bdebf848..00000000 --- a/WebRtc.NET/include/webrtc/sdk/objc/Framework/Headers/WebRTC/RTCRtpParameters.h +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Copyright 2016 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#import - -#import -#import -#import - -NS_ASSUME_NONNULL_BEGIN - -RTC_EXPORT -@interface RTCRtpParameters : NSObject - -/** The currently active encodings in the order of preference. */ -@property(nonatomic, copy) NSArray *encodings; - -/** The negotiated set of send codecs in order of preference. */ -@property(nonatomic, copy) NSArray *codecs; - -- (instancetype)init NS_DESIGNATED_INITIALIZER; - -@end - -NS_ASSUME_NONNULL_END diff --git a/WebRtc.NET/include/webrtc/sdk/objc/Framework/Headers/WebRTC/RTCRtpReceiver.h b/WebRtc.NET/include/webrtc/sdk/objc/Framework/Headers/WebRTC/RTCRtpReceiver.h deleted file mode 100644 index e98a8f3b..00000000 --- a/WebRtc.NET/include/webrtc/sdk/objc/Framework/Headers/WebRTC/RTCRtpReceiver.h +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Copyright 2016 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#import - -#import -#import -#import - -NS_ASSUME_NONNULL_BEGIN - -RTC_EXPORT -@protocol RTCRtpReceiver - -/** A unique identifier for this receiver. */ -@property(nonatomic, readonly) NSString *receiverId; - -/** The currently active RTCRtpParameters, as defined in - * https://www.w3.org/TR/webrtc/#idl-def-RTCRtpParameters. - * - * The WebRTC specification only defines RTCRtpParameters in terms of senders, - * but this API also applies them to receivers, similar to ORTC: - * http://ortc.org/wp-content/uploads/2016/03/ortc.html#rtcrtpparameters*. - */ -@property(nonatomic, readonly) RTCRtpParameters *parameters; - -/** The RTCMediaStreamTrack associated with the receiver. - * Note: reading this property returns a new instance of - * RTCMediaStreamTrack. Use isEqual: instead of == to compare - * RTCMediaStreamTrack instances. - */ -@property(nonatomic, readonly) RTCMediaStreamTrack *track; - -@end - -RTC_EXPORT -@interface RTCRtpReceiver : NSObject - -- (instancetype)init NS_UNAVAILABLE; - -@end - -NS_ASSUME_NONNULL_END diff --git a/WebRtc.NET/include/webrtc/sdk/objc/Framework/Headers/WebRTC/RTCTracing.h b/WebRtc.NET/include/webrtc/sdk/objc/Framework/Headers/WebRTC/RTCTracing.h deleted file mode 100644 index 13647911..00000000 --- a/WebRtc.NET/include/webrtc/sdk/objc/Framework/Headers/WebRTC/RTCTracing.h +++ /dev/null @@ -1,21 +0,0 @@ -/* - * Copyright 2016 The WebRTC Project Authors. All rights reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#import - -#import - -RTC_EXTERN void RTCSetupInternalTracer(); -/** Starts capture to specified file. Must be a valid writable path. - * Returns YES if capture starts. - */ -RTC_EXTERN BOOL RTCStartInternalCapture(NSString *filePath); -RTC_EXTERN void RTCStopInternalCapture(); -RTC_EXTERN void RTCShutdownInternalTracer(); diff --git a/WebRtc.NET/include/webrtc/sdk/objc/Framework/Headers/WebRTC/RTCVideoFrame.h b/WebRtc.NET/include/webrtc/sdk/objc/Framework/Headers/WebRTC/RTCVideoFrame.h deleted file mode 100644 index bfad6088..00000000 --- a/WebRtc.NET/include/webrtc/sdk/objc/Framework/Headers/WebRTC/RTCVideoFrame.h +++ /dev/null @@ -1,53 +0,0 @@ -/* - * Copyright 2015 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#import -#import - -#import - -NS_ASSUME_NONNULL_BEGIN - -// RTCVideoFrame is an ObjectiveC version of webrtc::VideoFrame. -RTC_EXPORT -@interface RTCVideoFrame : NSObject - -/** Width without rotation applied. */ -@property(nonatomic, readonly) size_t width; - -/** Height without rotation applied. */ -@property(nonatomic, readonly) size_t height; -@property(nonatomic, readonly) int rotation; -@property(nonatomic, readonly) size_t chromaWidth; -@property(nonatomic, readonly) size_t chromaHeight; -// These can return NULL if the object is not backed by a buffer. -@property(nonatomic, readonly, nullable) const uint8_t *yPlane; -@property(nonatomic, readonly, nullable) const uint8_t *uPlane; -@property(nonatomic, readonly, nullable) const uint8_t *vPlane; -@property(nonatomic, readonly) int32_t yPitch; -@property(nonatomic, readonly) int32_t uPitch; -@property(nonatomic, readonly) int32_t vPitch; - -/** Timestamp in nanoseconds. */ -@property(nonatomic, readonly) int64_t timeStampNs; - -/** The native handle should be a pixel buffer on iOS. */ -@property(nonatomic, readonly) CVPixelBufferRef nativeHandle; - -- (instancetype)init NS_UNAVAILABLE; - -/** If the frame is backed by a CVPixelBuffer, creates a backing i420 frame. - * Calling the yuv plane properties will call this method if needed. - */ -- (void)convertBufferIfNeeded; - -@end - -NS_ASSUME_NONNULL_END diff --git a/WebRtc.NET/include/webrtc/sdk/objc/Framework/Headers/WebRTC/RTCVideoSource.h b/WebRtc.NET/include/webrtc/sdk/objc/Framework/Headers/WebRTC/RTCVideoSource.h deleted file mode 100644 index 96bb6f36..00000000 --- a/WebRtc.NET/include/webrtc/sdk/objc/Framework/Headers/WebRTC/RTCVideoSource.h +++ /dev/null @@ -1,25 +0,0 @@ -/* - * Copyright 2015 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#import - -#import -#import - -NS_ASSUME_NONNULL_BEGIN - -RTC_EXPORT -@interface RTCVideoSource : RTCMediaSource - -- (instancetype)init NS_UNAVAILABLE; - -@end - -NS_ASSUME_NONNULL_END diff --git a/WebRtc.NET/include/webrtc/sdk/objc/Framework/Headers/WebRTC/WebRTC.h b/WebRtc.NET/include/webrtc/sdk/objc/Framework/Headers/WebRTC/WebRTC.h deleted file mode 100644 index 8082d02a..00000000 --- a/WebRtc.NET/include/webrtc/sdk/objc/Framework/Headers/WebRTC/WebRTC.h +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright 2016 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import diff --git a/WebRtc.NET/include/webrtc/system_wrappers/include/aligned_array.h b/WebRtc.NET/include/webrtc/system_wrappers/include/aligned_array.h deleted file mode 100644 index 71fefea7..00000000 --- a/WebRtc.NET/include/webrtc/system_wrappers/include/aligned_array.h +++ /dev/null @@ -1,86 +0,0 @@ -/* - * Copyright (c) 2014 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_SYSTEM_WRAPPERS_INCLUDE_ALIGNED_ARRAY_ -#define WEBRTC_SYSTEM_WRAPPERS_INCLUDE_ALIGNED_ARRAY_ - -#include "webrtc/base/checks.h" -#include "webrtc/system_wrappers/include/aligned_malloc.h" - -namespace webrtc { - -// Wrapper class for aligned arrays. Every row (and the first dimension) are -// aligned to the given byte alignment. -template class AlignedArray { - public: - AlignedArray(size_t rows, size_t cols, size_t alignment) - : rows_(rows), - cols_(cols) { - RTC_CHECK_GT(alignment, 0); - head_row_ = static_cast(AlignedMalloc(rows_ * sizeof(*head_row_), - alignment)); - for (size_t i = 0; i < rows_; ++i) { - head_row_[i] = static_cast(AlignedMalloc(cols_ * sizeof(**head_row_), - alignment)); - } - } - - ~AlignedArray() { - for (size_t i = 0; i < rows_; ++i) { - AlignedFree(head_row_[i]); - } - AlignedFree(head_row_); - } - - T* const* Array() { - return head_row_; - } - - const T* const* Array() const { - return head_row_; - } - - T* Row(size_t row) { - RTC_CHECK_LE(row, rows_); - return head_row_[row]; - } - - const T* Row(size_t row) const { - RTC_CHECK_LE(row, rows_); - return head_row_[row]; - } - - T& At(size_t row, size_t col) { - RTC_CHECK_LE(col, cols_); - return Row(row)[col]; - } - - const T& At(size_t row, size_t col) const { - RTC_CHECK_LE(col, cols_); - return Row(row)[col]; - } - - size_t rows() const { - return rows_; - } - - size_t cols() const { - return cols_; - } - - private: - size_t rows_; - size_t cols_; - T** head_row_; -}; - -} // namespace webrtc - -#endif // WEBRTC_SYSTEM_WRAPPERS_INCLUDE_ALIGNED_ARRAY_ diff --git a/WebRtc.NET/include/webrtc/system_wrappers/include/atomic32.h b/WebRtc.NET/include/webrtc/system_wrappers/include/atomic32.h deleted file mode 100644 index 78e649d8..00000000 --- a/WebRtc.NET/include/webrtc/system_wrappers/include/atomic32.h +++ /dev/null @@ -1,66 +0,0 @@ -/* - * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -// Atomic, system independent 32-bit integer. Unless you know what you're -// doing, use locks instead! :-) -// -// Note: assumes 32-bit (or higher) system -#ifndef WEBRTC_SYSTEM_WRAPPERS_INCLUDE_ATOMIC32_H_ -#define WEBRTC_SYSTEM_WRAPPERS_INCLUDE_ATOMIC32_H_ - -#include - -#include "webrtc/base/constructormagic.h" -#include "webrtc/common_types.h" - -namespace webrtc { - -// 32 bit atomic variable. Note that this class relies on the compiler to -// align the 32 bit value correctly (on a 32 bit boundary), so as long as you're -// not doing things like reinterpret_cast over some custom allocated memory -// without being careful with alignment, you should be fine. -class Atomic32 { - public: - Atomic32(int32_t initial_value = 0); - ~Atomic32(); - - // Prefix operator! - int32_t operator++(); - int32_t operator--(); - - int32_t operator+=(int32_t value); - int32_t operator-=(int32_t value); - - // Sets the value atomically to new_value if the value equals compare value. - // The function returns true if the exchange happened. - bool CompareExchange(int32_t new_value, int32_t compare_value); - int32_t Value() { - return *this += 0; - } - - private: - // Disable the + and - operator since it's unclear what these operations - // should do. - Atomic32 operator+(const Atomic32& other); - Atomic32 operator-(const Atomic32& other); - - // Checks if |_value| is 32bit aligned. - inline bool Is32bitAligned() const { - return (reinterpret_cast(&value_) & 3) == 0; - } - - RTC_DISALLOW_COPY_AND_ASSIGN(Atomic32); - - int32_t value_; -}; - -} // namespace webrtc - -#endif // WEBRTC_SYSTEM_WRAPPERS_INCLUDE_ATOMIC32_H_ diff --git a/WebRtc.NET/include/webrtc/system_wrappers/include/clock.h b/WebRtc.NET/include/webrtc/system_wrappers/include/clock.h deleted file mode 100644 index a2097702..00000000 --- a/WebRtc.NET/include/webrtc/system_wrappers/include/clock.h +++ /dev/null @@ -1,85 +0,0 @@ -/* - * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_SYSTEM_WRAPPERS_INCLUDE_CLOCK_H_ -#define WEBRTC_SYSTEM_WRAPPERS_INCLUDE_CLOCK_H_ - -#include - -#include "webrtc/system_wrappers/include/rw_lock_wrapper.h" -#include "webrtc/typedefs.h" - -namespace webrtc { - -// January 1970, in NTP seconds. -const uint32_t kNtpJan1970 = 2208988800UL; - -// Magic NTP fractional unit. -const double kMagicNtpFractionalUnit = 4.294967296E+9; - -// A clock interface that allows reading of absolute and relative timestamps. -class Clock { - public: - virtual ~Clock() {} - - // Return a timestamp in milliseconds relative to some arbitrary source; the - // source is fixed for this clock. - virtual int64_t TimeInMilliseconds() const = 0; - - // Return a timestamp in microseconds relative to some arbitrary source; the - // source is fixed for this clock. - virtual int64_t TimeInMicroseconds() const = 0; - - // Retrieve an NTP absolute timestamp in seconds and fractions of a second. - virtual void CurrentNtp(uint32_t& seconds, uint32_t& fractions) const = 0; - - // Retrieve an NTP absolute timestamp in milliseconds. - virtual int64_t CurrentNtpInMilliseconds() const = 0; - - // Converts an NTP timestamp to a millisecond timestamp. - static int64_t NtpToMs(uint32_t seconds, uint32_t fractions); - - // Returns an instance of the real-time system clock implementation. - static Clock* GetRealTimeClock(); -}; - -class SimulatedClock : public Clock { - public: - explicit SimulatedClock(int64_t initial_time_us); - - ~SimulatedClock() override; - - // Return a timestamp in milliseconds relative to some arbitrary source; the - // source is fixed for this clock. - int64_t TimeInMilliseconds() const override; - - // Return a timestamp in microseconds relative to some arbitrary source; the - // source is fixed for this clock. - int64_t TimeInMicroseconds() const override; - - // Retrieve an NTP absolute timestamp in milliseconds. - void CurrentNtp(uint32_t& seconds, uint32_t& fractions) const override; - - // Converts an NTP timestamp to a millisecond timestamp. - int64_t CurrentNtpInMilliseconds() const override; - - // Advance the simulated clock with a given number of milliseconds or - // microseconds. - void AdvanceTimeMilliseconds(int64_t milliseconds); - void AdvanceTimeMicroseconds(int64_t microseconds); - - private: - int64_t time_us_; - std::unique_ptr lock_; -}; - -}; // namespace webrtc - -#endif // WEBRTC_SYSTEM_WRAPPERS_INCLUDE_CLOCK_H_ diff --git a/WebRtc.NET/include/webrtc/system_wrappers/include/compile_assert_c.h b/WebRtc.NET/include/webrtc/system_wrappers/include/compile_assert_c.h deleted file mode 100644 index 00f6306e..00000000 --- a/WebRtc.NET/include/webrtc/system_wrappers/include/compile_assert_c.h +++ /dev/null @@ -1,21 +0,0 @@ -/* - * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_SYSTEM_WRAPPERS_INCLUDE_COMPILE_ASSERT_H_ -#define WEBRTC_SYSTEM_WRAPPERS_INCLUDE_COMPILE_ASSERT_H_ - -// Use this macro to verify at compile time that certain restrictions are met. -// The argument is the boolean expression to evaluate. -// Example: -// COMPILE_ASSERT(sizeof(foo) < 128); -// Note: In C++, use static_assert instead! -#define COMPILE_ASSERT(expression) switch (0) {case 0: case expression:;} - -#endif // WEBRTC_SYSTEM_WRAPPERS_INCLUDE_COMPILE_ASSERT_H_ diff --git a/WebRtc.NET/include/webrtc/system_wrappers/include/cpu_features_wrapper.h b/WebRtc.NET/include/webrtc/system_wrappers/include/cpu_features_wrapper.h deleted file mode 100644 index 9838d94e..00000000 --- a/WebRtc.NET/include/webrtc/system_wrappers/include/cpu_features_wrapper.h +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_SYSTEM_WRAPPERS_INCLUDE_CPU_FEATURES_WRAPPER_H_ -#define WEBRTC_SYSTEM_WRAPPERS_INCLUDE_CPU_FEATURES_WRAPPER_H_ - -#if defined(__cplusplus) || defined(c_plusplus) -extern "C" { -#endif - -#include "webrtc/typedefs.h" - -// List of features in x86. -typedef enum { - kSSE2, - kSSE3 -} CPUFeature; - -// List of features in ARM. -enum { - kCPUFeatureARMv7 = (1 << 0), - kCPUFeatureVFPv3 = (1 << 1), - kCPUFeatureNEON = (1 << 2), - kCPUFeatureLDREXSTREX = (1 << 3) -}; - -typedef int (*WebRtc_CPUInfo)(CPUFeature feature); - -// Returns true if the CPU supports the feature. -extern WebRtc_CPUInfo WebRtc_GetCPUInfo; - -// No CPU feature is available => straight C path. -extern WebRtc_CPUInfo WebRtc_GetCPUInfoNoASM; - -// Return the features in an ARM device. -// It detects the features in the hardware platform, and returns supported -// values in the above enum definition as a bitmask. -extern uint64_t WebRtc_GetCPUFeaturesARM(void); - -#if defined(__cplusplus) || defined(c_plusplus) -} // extern "C" -#endif - -#endif // WEBRTC_SYSTEM_WRAPPERS_INCLUDE_CPU_FEATURES_WRAPPER_H_ diff --git a/WebRtc.NET/include/webrtc/system_wrappers/include/critical_section_wrapper.h b/WebRtc.NET/include/webrtc/system_wrappers/include/critical_section_wrapper.h deleted file mode 100644 index 0858b4f6..00000000 --- a/WebRtc.NET/include/webrtc/system_wrappers/include/critical_section_wrapper.h +++ /dev/null @@ -1,61 +0,0 @@ -/* - * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_SYSTEM_WRAPPERS_INCLUDE_CRITICAL_SECTION_WRAPPER_H_ -#define WEBRTC_SYSTEM_WRAPPERS_INCLUDE_CRITICAL_SECTION_WRAPPER_H_ - -#include "webrtc/base/criticalsection.h" -#include "webrtc/base/thread_annotations.h" -#include "webrtc/common_types.h" - -namespace webrtc { - -class LOCKABLE CriticalSectionWrapper { - public: - // Legacy factory method, being deprecated. Please use the constructor. - // TODO(tommi): Remove the CriticalSectionWrapper class and move users over - // to using rtc::CriticalSection. - static CriticalSectionWrapper* CreateCriticalSection() { - return new CriticalSectionWrapper(); - } - - CriticalSectionWrapper() {} - ~CriticalSectionWrapper() {} - - // Tries to grab lock, beginning of a critical section. Will wait for the - // lock to become available if the grab failed. - void Enter() EXCLUSIVE_LOCK_FUNCTION() { lock_.Enter(); } - - // Returns a grabbed lock, end of critical section. - void Leave() UNLOCK_FUNCTION() { lock_.Leave(); } - - private: - rtc::CriticalSection lock_; -}; - -// RAII extension of the critical section. Prevents Enter/Leave mismatches and -// provides more compact critical section syntax. -class SCOPED_LOCKABLE CriticalSectionScoped { - public: - explicit CriticalSectionScoped(CriticalSectionWrapper* critsec) - EXCLUSIVE_LOCK_FUNCTION(critsec) - : ptr_crit_sec_(critsec) { - ptr_crit_sec_->Enter(); - } - - ~CriticalSectionScoped() UNLOCK_FUNCTION() { ptr_crit_sec_->Leave(); } - - private: - CriticalSectionWrapper* ptr_crit_sec_; -}; - -} // namespace webrtc - -#endif // WEBRTC_SYSTEM_WRAPPERS_INCLUDE_CRITICAL_SECTION_WRAPPER_H_ diff --git a/WebRtc.NET/include/webrtc/system_wrappers/include/field_trial.h b/WebRtc.NET/include/webrtc/system_wrappers/include/field_trial.h deleted file mode 100644 index 62fbfd1a..00000000 --- a/WebRtc.NET/include/webrtc/system_wrappers/include/field_trial.h +++ /dev/null @@ -1,68 +0,0 @@ -// -// Copyright (c) 2014 The WebRTC project authors. All Rights Reserved. -// -// Use of this source code is governed by a BSD-style license -// that can be found in the LICENSE file in the root of the source -// tree. An additional intellectual property rights grant can be found -// in the file PATENTS. All contributing project authors may -// be found in the AUTHORS file in the root of the source tree. -// - -#ifndef WEBRTC_SYSTEM_WRAPPERS_INCLUDE_FIELD_TRIAL_H_ -#define WEBRTC_SYSTEM_WRAPPERS_INCLUDE_FIELD_TRIAL_H_ - -#include - -// Field trials allow webrtc clients (such as Chrome) to turn on feature code -// in binaries out in the field and gather information with that. -// -// WebRTC clients MUST provide an implementation of: -// -// std::string webrtc::field_trial::FindFullName(const std::string& trial). -// -// Or link with a default one provided in: -// -// system_wrappers/system_wrappers.gyp:field_trial_default -// -// -// They are designed to wire up directly to chrome field trials and to speed up -// developers by reducing the need to wire APIs to control whether a feature is -// on/off. E.g. to experiment with a new method that could lead to a different -// trade-off between CPU/bandwidth: -// -// 1 - Develop the feature with default behaviour off: -// -// if (FieldTrial::FindFullName("WebRTCExperimenMethod2") == "Enabled") -// method2(); -// else -// method1(); -// -// 2 - Once the changes are rolled to chrome, the new code path can be -// controlled as normal chrome field trials. -// -// 3 - Evaluate the new feature and clean the code paths. -// -// Notes: -// - NOT every feature is a candidate to be controlled by this mechanism as -// it may require negotation between involved parties (e.g. SDP). -// -// TODO(andresp): since chrome --force-fieldtrials does not marks the trial -// as active it does not gets propaged to renderer process. For now one -// needs to push a config with start_active:true or run a local finch -// server. -// -// TODO(andresp): find out how to get bots to run tests with trials enabled. - -namespace webrtc { -namespace field_trial { - -// Returns the group name chosen for the named trial, or the empty string -// if the trial does not exists. -// -// Note: To keep things tidy append all the trial names with WebRTC. -std::string FindFullName(const std::string& name); - -} // namespace field_trial -} // namespace webrtc - -#endif // WEBRTC_SYSTEM_WRAPPERS_INCLUDE_FIELD_TRIAL_H_ diff --git a/WebRtc.NET/include/webrtc/system_wrappers/include/fix_interlocked_exchange_pointer_win.h b/WebRtc.NET/include/webrtc/system_wrappers/include/fix_interlocked_exchange_pointer_win.h deleted file mode 100644 index 8fb32efa..00000000 --- a/WebRtc.NET/include/webrtc/system_wrappers/include/fix_interlocked_exchange_pointer_win.h +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -// Various inline functions and macros to fix compilation of 32 bit target -// on MSVC with /Wp64 flag enabled. - -// The original code can be found here: -// http://src.chromium.org/svn/trunk/src/base/fix_wp64.h - -#ifndef WEBRTC_SYSTEM_WRAPPERS_SOURCE_FIX_INTERLOCKED_EXCHANGE_POINTER_WINDOWS_H_ -#define WEBRTC_SYSTEM_WRAPPERS_SOURCE_FIX_INTERLOCKED_EXCHANGE_POINTER_WINDOWS_H_ - -#include - -// Platform SDK fixes when building with /Wp64 for a 32 bits target. -#if !defined(_WIN64) && defined(_Wp64) - -#ifdef InterlockedExchangePointer -#undef InterlockedExchangePointer -// The problem is that the macro provided for InterlockedExchangePointer() is -// doing a (LONG) C-style cast that triggers invariably the warning C4312 when -// building on 32 bits. -inline void* InterlockedExchangePointer(void* volatile* target, void* value) { - return reinterpret_cast(static_cast(InterlockedExchange( - reinterpret_cast(target), - static_cast(reinterpret_cast(value))))); -} -#endif // #ifdef InterlockedExchangePointer - -#endif // #if !defined(_WIN64) && defined(_Wp64) - -#endif // WEBRTC_SYSTEM_WRAPPERS_SOURCE_FIX_INTERLOCKED_EXCHANGE_POINTER_WINDOWS_H_ diff --git a/WebRtc.NET/include/webrtc/system_wrappers/include/logcat_trace_context.h b/WebRtc.NET/include/webrtc/system_wrappers/include/logcat_trace_context.h deleted file mode 100644 index fc36386c..00000000 --- a/WebRtc.NET/include/webrtc/system_wrappers/include/logcat_trace_context.h +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_SYSTEM_WRAPPERS_INCLUDE_LOGCAT_TRACE_CONTEXT_H_ -#define WEBRTC_SYSTEM_WRAPPERS_INCLUDE_LOGCAT_TRACE_CONTEXT_H_ - -#include "webrtc/system_wrappers/include/trace.h" - -#ifndef ANDROID -#error This file only makes sense to include on Android! -#endif - -namespace webrtc { - -// Scoped helper class for directing Traces to Android's logcat facility. While -// this object lives, Trace output will be sent to logcat. -class LogcatTraceContext : public webrtc::TraceCallback { - public: - LogcatTraceContext(); - ~LogcatTraceContext() override; - - // TraceCallback impl. - void Print(TraceLevel level, const char* message, int length) override; -}; - -} // namespace webrtc - -#endif // WEBRTC_SYSTEM_WRAPPERS_INCLUDE_LOGCAT_TRACE_CONTEXT_H_ diff --git a/WebRtc.NET/include/webrtc/system_wrappers/include/logging.h b/WebRtc.NET/include/webrtc/system_wrappers/include/logging.h deleted file mode 100644 index 0089841d..00000000 --- a/WebRtc.NET/include/webrtc/system_wrappers/include/logging.h +++ /dev/null @@ -1,132 +0,0 @@ -/* - * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -// This is a highly stripped-down version of libjingle's talk/base/logging.h. -// It is a thin wrapper around WEBRTC_TRACE, maintaining the libjingle log -// semantics to ease a transition to that format. - -// NOTE: LS_INFO maps to a new trace level which should be reserved for -// infrequent, non-verbose logs. The other levels below kTraceWarning have been -// rendered essentially useless due to their verbosity. Carefully consider the -// impact of adding a new LS_INFO log. If it will be logged at anything -// approaching a frame or packet frequency, use LS_VERBOSE if necessary, or -// preferably, do not log at all. - -// LOG(...) an ostream target that can be used to send formatted -// output to a variety of logging targets, such as debugger console, stderr, -// file, or any StreamInterface. -// The severity level passed as the first argument to the LOGging -// functions is used as a filter, to limit the verbosity of the logging. -// Static members of LogMessage documented below are used to control the -// verbosity and target of the output. -// There are several variations on the LOG macro which facilitate logging -// of common error conditions, detailed below. - -// LOG(sev) logs the given stream at severity "sev", which must be a -// compile-time constant of the LoggingSeverity type, without the namespace -// prefix. -// LOG_V(sev) Like LOG(), but sev is a run-time variable of the LoggingSeverity -// type (basically, it just doesn't prepend the namespace). -// LOG_F(sev) Like LOG(), but includes the name of the current function. - -#ifndef WEBRTC_SYSTEM_WRAPPERS_INCLUDE_LOGGING_H_ -#define WEBRTC_SYSTEM_WRAPPERS_INCLUDE_LOGGING_H_ - -#include - -namespace webrtc { - -////////////////////////////////////////////////////////////////////// - -// Note that the non-standard LoggingSeverity aliases exist because they are -// still in broad use. The meanings of the levels are: -// LS_SENSITIVE: Information which should only be logged with the consent -// of the user, due to privacy concerns. -// LS_VERBOSE: This level is for data which we do not want to appear in the -// normal debug log, but should appear in diagnostic logs. -// LS_INFO: Chatty level used in debugging for all sorts of things, the default -// in debug builds. -// LS_WARNING: Something that may warrant investigation. -// LS_ERROR: Something that should not have occurred. -enum LoggingSeverity { - LS_SENSITIVE, LS_VERBOSE, LS_INFO, LS_WARNING, LS_ERROR -}; - -class LogMessage { - public: - LogMessage(const char* file, int line, LoggingSeverity sev); - ~LogMessage(); - - static bool Loggable(LoggingSeverity sev); - std::ostream& stream() { return print_stream_; } - - private: - // The ostream that buffers the formatted message before output - std::ostringstream print_stream_; - - // The severity level of this message - LoggingSeverity severity_; -}; - -////////////////////////////////////////////////////////////////////// -// Macros which automatically disable logging when WEBRTC_LOGGING == 0 -////////////////////////////////////////////////////////////////////// - -#ifndef LOG -// The following non-obvious technique for implementation of a -// conditional log stream was stolen from google3/base/logging.h. - -// This class is used to explicitly ignore values in the conditional -// logging macros. This avoids compiler warnings like "value computed -// is not used" and "statement has no effect". - -class LogMessageVoidify { - public: - LogMessageVoidify() { } - // This has to be an operator with a precedence lower than << but - // higher than ?: - void operator&(std::ostream&) { } -}; - -#if defined(WEBRTC_RESTRICT_LOGGING) -// This should compile away logs matching the following condition. -#define RESTRICT_LOGGING_PRECONDITION(sev) \ - sev < webrtc::LS_INFO ? (void) 0 : -#else -#define RESTRICT_LOGGING_PRECONDITION(sev) -#endif - -#define LOG_SEVERITY_PRECONDITION(sev) \ - RESTRICT_LOGGING_PRECONDITION(sev) !(webrtc::LogMessage::Loggable(sev)) \ - ? (void) 0 \ - : webrtc::LogMessageVoidify() & - -#define LOG(sev) \ - LOG_SEVERITY_PRECONDITION(webrtc::sev) \ - webrtc::LogMessage(__FILE__, __LINE__, webrtc::sev).stream() - -// The _V version is for when a variable is passed in. It doesn't do the -// namespace concatination. -#define LOG_V(sev) \ - LOG_SEVERITY_PRECONDITION(sev) \ - webrtc::LogMessage(__FILE__, __LINE__, sev).stream() - -// The _F version prefixes the message with the current function name. -#if (defined(__GNUC__) && !defined(NDEBUG)) || defined(WANT_PRETTY_LOG_F) -#define LOG_F(sev) LOG(sev) << __PRETTY_FUNCTION__ << ": " -#else -#define LOG_F(sev) LOG(sev) << __FUNCTION__ << ": " -#endif - -#endif // LOG - -} // namespace webrtc - -#endif // WEBRTC_SYSTEM_WRAPPERS_INCLUDE_LOGGING_H_ diff --git a/WebRtc.NET/include/webrtc/system_wrappers/include/metrics.h b/WebRtc.NET/include/webrtc/system_wrappers/include/metrics.h deleted file mode 100644 index e84e8ecd..00000000 --- a/WebRtc.NET/include/webrtc/system_wrappers/include/metrics.h +++ /dev/null @@ -1,245 +0,0 @@ -// -// Copyright (c) 2014 The WebRTC project authors. All Rights Reserved. -// -// Use of this source code is governed by a BSD-style license -// that can be found in the LICENSE file in the root of the source -// tree. An additional intellectual property rights grant can be found -// in the file PATENTS. All contributing project authors may -// be found in the AUTHORS file in the root of the source tree. -// - -#ifndef WEBRTC_SYSTEM_WRAPPERS_INCLUDE_METRICS_H_ -#define WEBRTC_SYSTEM_WRAPPERS_INCLUDE_METRICS_H_ - -#include - -#include "webrtc/base/atomicops.h" -#include "webrtc/base/checks.h" -#include "webrtc/common_types.h" -#include "webrtc/system_wrappers/include/logging.h" - -// Macros for allowing WebRTC clients (e.g. Chrome) to gather and aggregate -// statistics. -// -// Histogram for counters. -// RTC_HISTOGRAM_COUNTS(name, sample, min, max, bucket_count); -// -// Histogram for enumerators. -// The boundary should be above the max enumerator sample. -// RTC_HISTOGRAM_ENUMERATION(name, sample, boundary); -// -// -// The macros use the methods HistogramFactoryGetCounts, -// HistogramFactoryGetEnumeration and HistogramAdd. -// -// Therefore, WebRTC clients must either: -// -// - provide implementations of -// Histogram* webrtc::metrics::HistogramFactoryGetCounts( -// const std::string& name, int sample, int min, int max, -// int bucket_count); -// Histogram* webrtc::metrics::HistogramFactoryGetEnumeration( -// const std::string& name, int sample, int boundary); -// void webrtc::metrics::HistogramAdd( -// Histogram* histogram_pointer, const std::string& name, int sample); -// -// - or link with the default implementations (i.e. -// system_wrappers/system_wrappers.gyp:metrics_default). -// -// -// Example usage: -// -// RTC_HISTOGRAM_COUNTS("WebRTC.Video.NacksSent", nacks_sent, 1, 100000, 100); -// -// enum Types { -// kTypeX, -// kTypeY, -// kBoundary, -// }; -// -// RTC_HISTOGRAM_ENUMERATION("WebRTC.Types", kTypeX, kBoundary); -// -// NOTE: It is recommended to do the Chromium review for modifications to -// histograms.xml before new metrics are committed to WebRTC. - - -// Macros for adding samples to a named histogram. - -// Histogram for counters (exponentially spaced buckets). -#define RTC_HISTOGRAM_COUNTS_100(name, sample) \ - RTC_HISTOGRAM_COUNTS(name, sample, 1, 100, 50) - -#define RTC_HISTOGRAM_COUNTS_200(name, sample) \ - RTC_HISTOGRAM_COUNTS(name, sample, 1, 200, 50) - -#define RTC_HISTOGRAM_COUNTS_500(name, sample) \ - RTC_HISTOGRAM_COUNTS(name, sample, 1, 500, 50) - -#define RTC_HISTOGRAM_COUNTS_1000(name, sample) \ - RTC_HISTOGRAM_COUNTS(name, sample, 1, 1000, 50) - -#define RTC_HISTOGRAM_COUNTS_10000(name, sample) \ - RTC_HISTOGRAM_COUNTS(name, sample, 1, 10000, 50) - -#define RTC_HISTOGRAM_COUNTS_100000(name, sample) \ - RTC_HISTOGRAM_COUNTS(name, sample, 1, 100000, 50) - -#define RTC_HISTOGRAM_COUNTS(name, sample, min, max, bucket_count) \ - RTC_HISTOGRAM_COMMON_BLOCK(name, sample, \ - webrtc::metrics::HistogramFactoryGetCounts(name, min, max, bucket_count)) - -#define RTC_HISTOGRAM_COUNTS_LINEAR(name, sample, min, max, bucket_count) \ - RTC_HISTOGRAM_COMMON_BLOCK(name, sample, \ - webrtc::metrics::HistogramFactoryGetCountsLinear( \ - name, min, max, bucket_count)) - -// Deprecated. -// TODO(asapersson): Remove. -#define RTC_HISTOGRAM_COUNTS_SPARSE_100(name, sample) \ - RTC_HISTOGRAM_COUNTS_SPARSE(name, sample, 1, 100, 50) - -#define RTC_HISTOGRAM_COUNTS_SPARSE(name, sample, min, max, bucket_count) \ - RTC_HISTOGRAM_COMMON_BLOCK_SLOW(name, sample, \ - webrtc::metrics::HistogramFactoryGetCounts(name, min, max, bucket_count)) - -// Histogram for percentage (evenly spaced buckets). -#define RTC_HISTOGRAM_PERCENTAGE(name, sample) \ - RTC_HISTOGRAM_ENUMERATION(name, sample, 101) - -// Histogram for booleans. -#define RTC_HISTOGRAM_BOOLEAN(name, sample) \ - RTC_HISTOGRAM_ENUMERATION(name, sample, 2) - -// Histogram for enumerators (evenly spaced buckets). -// |boundary| should be above the max enumerator sample. -#define RTC_HISTOGRAM_ENUMERATION(name, sample, boundary) \ - RTC_HISTOGRAM_COMMON_BLOCK(name, sample, \ - webrtc::metrics::HistogramFactoryGetEnumeration(name, boundary)) - -// The name of the histogram should not vary. -// TODO(asapersson): Consider changing string to const char*. -#define RTC_HISTOGRAM_COMMON_BLOCK(constant_name, sample, \ - factory_get_invocation) \ - do { \ - static webrtc::metrics::Histogram* atomic_histogram_pointer = nullptr; \ - webrtc::metrics::Histogram* histogram_pointer = \ - rtc::AtomicOps::AcquireLoadPtr(&atomic_histogram_pointer); \ - if (!histogram_pointer) { \ - histogram_pointer = factory_get_invocation; \ - webrtc::metrics::Histogram* prev_pointer = \ - rtc::AtomicOps::CompareAndSwapPtr( \ - &atomic_histogram_pointer, \ - static_cast(nullptr), \ - histogram_pointer); \ - RTC_DCHECK(prev_pointer == nullptr || \ - prev_pointer == histogram_pointer); \ - } \ - if (histogram_pointer) { \ - RTC_DCHECK_EQ(constant_name, \ - webrtc::metrics::GetHistogramName(histogram_pointer)) \ - << "The name should not vary."; \ - webrtc::metrics::HistogramAdd(histogram_pointer, sample); \ - } \ - } while (0) - -// Deprecated. -// The histogram is constructed/found for each call. -// May be used for histograms with infrequent updates.` -#define RTC_HISTOGRAM_COMMON_BLOCK_SLOW(name, sample, factory_get_invocation) \ - do { \ - webrtc::metrics::Histogram* histogram_pointer = factory_get_invocation; \ - if (histogram_pointer) { \ - webrtc::metrics::HistogramAdd(histogram_pointer, sample); \ - } \ - } while (0) - -// Helper macros. -// Macros for calling a histogram with varying name (e.g. when using a metric -// in different modes such as real-time vs screenshare). -#define RTC_HISTOGRAMS_COUNTS_100(index, name, sample) \ - RTC_HISTOGRAMS_COMMON(index, name, sample, \ - RTC_HISTOGRAM_COUNTS(name, sample, 1, 100, 50)) - -#define RTC_HISTOGRAMS_COUNTS_200(index, name, sample) \ - RTC_HISTOGRAMS_COMMON(index, name, sample, \ - RTC_HISTOGRAM_COUNTS(name, sample, 1, 200, 50)) - -#define RTC_HISTOGRAMS_COUNTS_500(index, name, sample) \ - RTC_HISTOGRAMS_COMMON(index, name, sample, \ - RTC_HISTOGRAM_COUNTS(name, sample, 1, 500, 50)) - -#define RTC_HISTOGRAMS_COUNTS_1000(index, name, sample) \ - RTC_HISTOGRAMS_COMMON(index, name, sample, \ - RTC_HISTOGRAM_COUNTS(name, sample, 1, 1000, 50)) - -#define RTC_HISTOGRAMS_COUNTS_10000(index, name, sample) \ - RTC_HISTOGRAMS_COMMON(index, name, sample, \ - RTC_HISTOGRAM_COUNTS(name, sample, 1, 10000, 50)) - -#define RTC_HISTOGRAMS_COUNTS_100000(index, name, sample) \ - RTC_HISTOGRAMS_COMMON(index, name, sample, \ - RTC_HISTOGRAM_COUNTS(name, sample, 1, 100000, 50)) - -#define RTC_HISTOGRAMS_ENUMERATION(index, name, sample, boundary) \ - RTC_HISTOGRAMS_COMMON(index, name, sample, \ - RTC_HISTOGRAM_ENUMERATION(name, sample, boundary)) - -#define RTC_HISTOGRAMS_PERCENTAGE(index, name, sample) \ - RTC_HISTOGRAMS_COMMON(index, name, sample, \ - RTC_HISTOGRAM_PERCENTAGE(name, sample)) - -#define RTC_HISTOGRAMS_COMMON(index, name, sample, macro_invocation) \ - do { \ - switch (index) { \ - case 0: \ - macro_invocation; \ - break; \ - case 1: \ - macro_invocation; \ - break; \ - case 2: \ - macro_invocation; \ - break; \ - default: \ - RTC_NOTREACHED(); \ - } \ - } while (0) - - -namespace webrtc { -namespace metrics { - -// Time that should have elapsed for stats that are gathered once per call. -enum { kMinRunTimeInSeconds = 10 }; - -class Histogram; - -// Functions for getting pointer to histogram (constructs or finds the named -// histogram). - -// Get histogram for counters. -Histogram* HistogramFactoryGetCounts( - const std::string& name, int min, int max, int bucket_count); - -// Get histogram for counters with linear bucket spacing. -Histogram* HistogramFactoryGetCountsLinear(const std::string& name, - int min, - int max, - int bucket_count); - -// Get histogram for enumerators. -// |boundary| should be above the max enumerator sample. -Histogram* HistogramFactoryGetEnumeration( - const std::string& name, int boundary); - -// Returns name of the histogram. -const std::string& GetHistogramName(Histogram* histogram_pointer); - -// Function for adding a |sample| to a histogram. -void HistogramAdd(Histogram* histogram_pointer, int sample); - -} // namespace metrics -} // namespace webrtc - -#endif // WEBRTC_SYSTEM_WRAPPERS_INCLUDE_METRICS_H_ - diff --git a/WebRtc.NET/include/webrtc/system_wrappers/include/ntp_time.h b/WebRtc.NET/include/webrtc/system_wrappers/include/ntp_time.h deleted file mode 100644 index 9c554197..00000000 --- a/WebRtc.NET/include/webrtc/system_wrappers/include/ntp_time.h +++ /dev/null @@ -1,64 +0,0 @@ -/* -* Copyright (c) 2015 The WebRTC project authors. All Rights Reserved. -* -* Use of this source code is governed by a BSD-style license -* that can be found in the LICENSE file in the root of the source -* tree. An additional intellectual property rights grant can be found -* in the file PATENTS. All contributing project authors may -* be found in the AUTHORS file in the root of the source tree. -*/ -#ifndef WEBRTC_SYSTEM_WRAPPERS_INCLUDE_NTP_TIME_H_ -#define WEBRTC_SYSTEM_WRAPPERS_INCLUDE_NTP_TIME_H_ - -#include - -#include "webrtc/system_wrappers/include/clock.h" - -namespace webrtc { - -class NtpTime { - public: - NtpTime() : seconds_(0), fractions_(0) {} - explicit NtpTime(const Clock& clock) { - clock.CurrentNtp(seconds_, fractions_); - } - NtpTime(uint32_t seconds, uint32_t fractions) - : seconds_(seconds), fractions_(fractions) {} - - NtpTime(const NtpTime&) = default; - NtpTime& operator=(const NtpTime&) = default; - - void SetCurrent(const Clock& clock) { - clock.CurrentNtp(seconds_, fractions_); - } - void Set(uint32_t seconds, uint32_t fractions) { - seconds_ = seconds; - fractions_ = fractions; - } - void Reset() { - seconds_ = 0; - fractions_ = 0; - } - - int64_t ToMs() const { return Clock::NtpToMs(seconds_, fractions_); } - - // NTP standard (RFC1305, section 3.1) explicitly state value 0/0 is invalid. - bool Valid() const { return !(seconds_ == 0 && fractions_ == 0); } - - uint32_t seconds() const { return seconds_; } - uint32_t fractions() const { return fractions_; } - - private: - uint32_t seconds_; - uint32_t fractions_; -}; - -inline bool operator==(const NtpTime& n1, const NtpTime& n2) { - return n1.seconds() == n2.seconds() && n1.fractions() == n2.fractions(); -} -inline bool operator!=(const NtpTime& n1, const NtpTime& n2) { - return !(n1 == n2); -} - -} // namespace webrtc -#endif // WEBRTC_SYSTEM_WRAPPERS_INCLUDE_NTP_TIME_H_ diff --git a/WebRtc.NET/include/webrtc/system_wrappers/include/rtp_to_ntp_estimator.h b/WebRtc.NET/include/webrtc/system_wrappers/include/rtp_to_ntp_estimator.h deleted file mode 100644 index a17428bf..00000000 --- a/WebRtc.NET/include/webrtc/system_wrappers/include/rtp_to_ntp_estimator.h +++ /dev/null @@ -1,72 +0,0 @@ -/* - * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_SYSTEM_WRAPPERS_INCLUDE_RTP_TO_NTP_ESTIMATOR_H_ -#define WEBRTC_SYSTEM_WRAPPERS_INCLUDE_RTP_TO_NTP_ESTIMATOR_H_ - -#include - -#include "webrtc/system_wrappers/include/ntp_time.h" -#include "webrtc/typedefs.h" - -namespace webrtc { -// Class for converting an RTP timestamp to the NTP domain in milliseconds. -// The class needs to be trained with (at least 2) RTP/NTP timestamp pairs from -// RTCP sender reports before the convertion can be done. -class RtpToNtpEstimator { - public: - RtpToNtpEstimator(); - ~RtpToNtpEstimator(); - - // RTP and NTP timestamp pair from a RTCP SR report. - struct RtcpMeasurement { - RtcpMeasurement(uint32_t ntp_secs, uint32_t ntp_frac, uint32_t timestamp); - bool IsEqual(const RtcpMeasurement& other) const; - - NtpTime ntp_time; - uint32_t rtp_timestamp; - }; - - // Estimated parameters from RTP and NTP timestamp pairs in |measurements_|. - struct Parameters { - double frequency_khz = 0.0; - double offset_ms = 0.0; - bool calculated = false; - }; - - // Updates measurements with RTP/NTP timestamp pair from a RTCP sender report. - // |new_rtcp_sr| is set to true if a new report is added. - bool UpdateMeasurements(uint32_t ntp_secs, - uint32_t ntp_frac, - uint32_t rtp_timestamp, - bool* new_rtcp_sr); - - // Converts an RTP timestamp to the NTP domain in milliseconds. - // Returns true on success, false otherwise. - bool Estimate(int64_t rtp_timestamp, int64_t* rtp_timestamp_ms) const; - - const Parameters& params() const { return params_; } - - private: - void UpdateParameters(); - - std::list measurements_; - Parameters params_; -}; - -// Returns: -// 1: forward wrap around. -// 0: no wrap around. -// -1: backwards wrap around (i.e. reordering). -int CheckForWrapArounds(uint32_t new_timestamp, uint32_t old_timestamp); - -} // namespace webrtc - -#endif // WEBRTC_SYSTEM_WRAPPERS_INCLUDE_RTP_TO_NTP_ESTIMATOR_H_ diff --git a/WebRtc.NET/include/webrtc/system_wrappers/include/rw_lock_wrapper.h b/WebRtc.NET/include/webrtc/system_wrappers/include/rw_lock_wrapper.h deleted file mode 100644 index 751b6a1d..00000000 --- a/WebRtc.NET/include/webrtc/system_wrappers/include/rw_lock_wrapper.h +++ /dev/null @@ -1,68 +0,0 @@ -/* - * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_SYSTEM_WRAPPERS_INCLUDE_RW_LOCK_WRAPPER_H_ -#define WEBRTC_SYSTEM_WRAPPERS_INCLUDE_RW_LOCK_WRAPPER_H_ - -#include "webrtc/base/thread_annotations.h" - -// Note, Windows pre-Vista version of RW locks are not supported natively. For -// these OSs regular critical sections have been used to approximate RW lock -// functionality and will therefore have worse performance. - -namespace webrtc { - -class LOCKABLE RWLockWrapper { - public: - static RWLockWrapper* CreateRWLock(); - virtual ~RWLockWrapper() {} - - virtual void AcquireLockExclusive() EXCLUSIVE_LOCK_FUNCTION() = 0; - virtual void ReleaseLockExclusive() UNLOCK_FUNCTION() = 0; - - virtual void AcquireLockShared() SHARED_LOCK_FUNCTION() = 0; - virtual void ReleaseLockShared() UNLOCK_FUNCTION() = 0; -}; - -// RAII extensions of the RW lock. Prevents Acquire/Release missmatches and -// provides more compact locking syntax. -class SCOPED_LOCKABLE ReadLockScoped { - public: - ReadLockScoped(RWLockWrapper& rw_lock) SHARED_LOCK_FUNCTION(rw_lock) - : rw_lock_(rw_lock) { - rw_lock_.AcquireLockShared(); - } - - ~ReadLockScoped() UNLOCK_FUNCTION() { - rw_lock_.ReleaseLockShared(); - } - - private: - RWLockWrapper& rw_lock_; -}; - -class SCOPED_LOCKABLE WriteLockScoped { - public: - WriteLockScoped(RWLockWrapper& rw_lock) EXCLUSIVE_LOCK_FUNCTION(rw_lock) - : rw_lock_(rw_lock) { - rw_lock_.AcquireLockExclusive(); - } - - ~WriteLockScoped() UNLOCK_FUNCTION() { - rw_lock_.ReleaseLockExclusive(); - } - - private: - RWLockWrapper& rw_lock_; -}; - -} // namespace webrtc - -#endif // WEBRTC_SYSTEM_WRAPPERS_INCLUDE_RW_LOCK_WRAPPER_H_ diff --git a/WebRtc.NET/include/webrtc/system_wrappers/include/sleep.h b/WebRtc.NET/include/webrtc/system_wrappers/include/sleep.h deleted file mode 100644 index e7ed8b32..00000000 --- a/WebRtc.NET/include/webrtc/system_wrappers/include/sleep.h +++ /dev/null @@ -1,24 +0,0 @@ -/* - * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ -// An OS-independent sleep function. - -#ifndef WEBRTC_SYSTEM_WRAPPERS_INCLUDE_SLEEP_H_ -#define WEBRTC_SYSTEM_WRAPPERS_INCLUDE_SLEEP_H_ - -namespace webrtc { - -// This function sleeps for the specified number of milliseconds. -// It may return early if the thread is woken by some other event, -// such as the delivery of a signal on Unix. -void SleepMs(int msecs); - -} // namespace webrtc - -#endif // WEBRTC_SYSTEM_WRAPPERS_INCLUDE_SLEEP_H_ diff --git a/WebRtc.NET/include/webrtc/system_wrappers/include/static_instance.h b/WebRtc.NET/include/webrtc/system_wrappers/include/static_instance.h deleted file mode 100644 index 41946d92..00000000 --- a/WebRtc.NET/include/webrtc/system_wrappers/include/static_instance.h +++ /dev/null @@ -1,153 +0,0 @@ -/* - * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_SYSTEM_WRAPPERS_INCLUDE_STATIC_INSTANCE_H_ -#define WEBRTC_SYSTEM_WRAPPERS_INCLUDE_STATIC_INSTANCE_H_ - -#include - -#include "webrtc/system_wrappers/include/critical_section_wrapper.h" -#ifdef _WIN32 -#include "webrtc/system_wrappers/include/fix_interlocked_exchange_pointer_win.h" -#endif - -namespace webrtc { - -enum CountOperation { - kRelease, - kAddRef, - kAddRefNoCreate -}; -enum CreateOperation { - kInstanceExists, - kCreate, - kDestroy -}; - -template -// Construct On First Use idiom. Avoids -// "static initialization order fiasco". -static T* GetStaticInstance(CountOperation count_operation) { - // TODO (hellner): use atomic wrapper instead. - static volatile long instance_count = 0; - static T* volatile instance = NULL; - CreateOperation state = kInstanceExists; -#ifndef _WIN32 - // This memory is staticly allocated once. The application does not try to - // free this memory. This approach is taken to avoid issues with - // destruction order for statically allocated memory. The memory will be - // reclaimed by the OS and memory leak tools will not recognize memory - // reachable from statics leaked so no noise is added by doing this. - static CriticalSectionWrapper* crit_sect( - CriticalSectionWrapper::CreateCriticalSection()); - CriticalSectionScoped lock(crit_sect); - - if (count_operation == - kAddRefNoCreate && instance_count == 0) { - return NULL; - } - if (count_operation == - kAddRef || - count_operation == kAddRefNoCreate) { - instance_count++; - if (instance_count == 1) { - state = kCreate; - } - } else { - instance_count--; - if (instance_count == 0) { - state = kDestroy; - } - } - if (state == kCreate) { - instance = T::CreateInstance(); - } else if (state == kDestroy) { - T* old_instance = instance; - instance = NULL; - // The state will not change past this point. Release the critical - // section while deleting the object in case it would be blocking on - // access back to this object. (This is the case for the tracing class - // since the thread owned by the tracing class also traces). - // TODO(hellner): this is a bit out of place but here goes, de-couple - // thread implementation with trace implementation. - crit_sect->Leave(); - if (old_instance) { - delete old_instance; - } - // Re-acquire the lock since the scoped critical section will release - // it. - crit_sect->Enter(); - return NULL; - } -#else // _WIN32 - if (count_operation == - kAddRefNoCreate && instance_count == 0) { - return NULL; - } - if (count_operation == kAddRefNoCreate) { - if (1 == InterlockedIncrement(&instance_count)) { - // The instance has been destroyed by some other thread. Rollback. - InterlockedDecrement(&instance_count); - assert(false); - return NULL; - } - // Sanity to catch corrupt state. - if (instance == NULL) { - assert(false); - InterlockedDecrement(&instance_count); - return NULL; - } - } else if (count_operation == kAddRef) { - if (instance_count == 0) { - state = kCreate; - } else { - if (1 == InterlockedIncrement(&instance_count)) { - // InterlockedDecrement because reference count should not be - // updated just yet (that's done when the instance is created). - InterlockedDecrement(&instance_count); - state = kCreate; - } - } - } else { - int new_value = InterlockedDecrement(&instance_count); - if (new_value == 0) { - state = kDestroy; - } - } - - if (state == kCreate) { - // Create instance and let whichever thread finishes first assign its - // local copy to the global instance. All other threads reclaim their - // local copy. - T* new_instance = T::CreateInstance(); - if (1 == InterlockedIncrement(&instance_count)) { - InterlockedExchangePointer(reinterpret_cast(&instance), - new_instance); - } else { - InterlockedDecrement(&instance_count); - if (new_instance) { - delete static_cast(new_instance); - } - } - } else if (state == kDestroy) { - T* old_value = static_cast(InterlockedExchangePointer( - reinterpret_cast(&instance), NULL)); - if (old_value) { - delete static_cast(old_value); - } - return NULL; - } -#endif // #ifndef _WIN32 - return instance; -} - -} // namspace webrtc - -#endif // WEBRTC_SYSTEM_WRAPPERS_INCLUDE_STATIC_INSTANCE_H_ diff --git a/WebRtc.NET/include/webrtc/system_wrappers/include/stringize_macros.h b/WebRtc.NET/include/webrtc/system_wrappers/include/stringize_macros.h deleted file mode 100644 index 9c8e7e91..00000000 --- a/WebRtc.NET/include/webrtc/system_wrappers/include/stringize_macros.h +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -// Modified from the Chromium original: -// src/base/strings/stringize_macros.h - -// This file defines preprocessor macros for stringizing preprocessor -// symbols (or their output) and manipulating preprocessor symbols -// that define strings. - -#ifndef WEBRTC_SYSTEM_WRAPPERS_INCLUDE_STRINGIZE_MACROS_H_ -#define WEBRTC_SYSTEM_WRAPPERS_INCLUDE_STRINGIZE_MACROS_H_ - -// This is not very useful as it does not expand defined symbols if -// called directly. Use its counterpart without the _NO_EXPANSION -// suffix, below. -#define STRINGIZE_NO_EXPANSION(x) #x - -// Use this to quote the provided parameter, first expanding it if it -// is a preprocessor symbol. -// -// For example, if: -// #define A FOO -// #define B(x) myobj->FunctionCall(x) -// -// Then: -// STRINGIZE(A) produces "FOO" -// STRINGIZE(B(y)) produces "myobj->FunctionCall(y)" -#define STRINGIZE(x) STRINGIZE_NO_EXPANSION(x) - -#endif // WEBRTC_SYSTEM_WRAPPERS_INCLUDE_STRINGIZE_MACROS_H_ diff --git a/WebRtc.NET/include/webrtc/system_wrappers/include/timestamp_extrapolator.h b/WebRtc.NET/include/webrtc/system_wrappers/include/timestamp_extrapolator.h deleted file mode 100644 index d9c5c6fb..00000000 --- a/WebRtc.NET/include/webrtc/system_wrappers/include/timestamp_extrapolator.h +++ /dev/null @@ -1,56 +0,0 @@ -/* - * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef SYSTEM_WRAPPERS_INCLUDE_TIMESTAMP_EXTRAPOLATOR_H_ -#define SYSTEM_WRAPPERS_INCLUDE_TIMESTAMP_EXTRAPOLATOR_H_ - -#include "webrtc/system_wrappers/include/rw_lock_wrapper.h" -#include "webrtc/typedefs.h" - -namespace webrtc -{ - -class TimestampExtrapolator -{ -public: - explicit TimestampExtrapolator(int64_t start_ms); - ~TimestampExtrapolator(); - void Update(int64_t tMs, uint32_t ts90khz); - int64_t ExtrapolateLocalTime(uint32_t timestamp90khz); - void Reset(int64_t start_ms); - -private: - void CheckForWrapArounds(uint32_t ts90khz); - bool DelayChangeDetection(double error); - RWLockWrapper* _rwLock; - double _w[2]; - double _pP[2][2]; - int64_t _startMs; - int64_t _prevMs; - uint32_t _firstTimestamp; - int32_t _wrapArounds; - int64_t _prevUnwrappedTimestamp; - int64_t _prevWrapTimestamp; - const double _lambda; - bool _firstAfterReset; - uint32_t _packetCount; - const uint32_t _startUpFilterDelayInPackets; - - double _detectorAccumulatorPos; - double _detectorAccumulatorNeg; - const double _alarmThreshold; - const double _accDrift; - const double _accMaxError; - const double _pP11; -}; - -} // namespace webrtc - -#endif // SYSTEM_WRAPPERS_INCLUDE_TIMESTAMP_EXTRAPOLATOR_H_ diff --git a/WebRtc.NET/include/webrtc/system_wrappers/include/trace.h b/WebRtc.NET/include/webrtc/system_wrappers/include/trace.h deleted file mode 100644 index e3ca3c68..00000000 --- a/WebRtc.NET/include/webrtc/system_wrappers/include/trace.h +++ /dev/null @@ -1,89 +0,0 @@ -/* - * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - * - * System independent wrapper for logging runtime information to file. - * Note: All log messages will be written to the same trace file. - * Note: If too many messages are written to file there will be a build up of - * messages. Apply filtering to avoid that. - */ - -#ifndef WEBRTC_SYSTEM_WRAPPERS_INCLUDE_TRACE_H_ -#define WEBRTC_SYSTEM_WRAPPERS_INCLUDE_TRACE_H_ - -#include "webrtc/common_types.h" -#include "webrtc/typedefs.h" - -namespace webrtc { - -#if defined(WEBRTC_RESTRICT_LOGGING) -// Disable all TRACE macros. The LOG macro is still functional. -#define WEBRTC_TRACE true ? (void) 0 : Trace::Add -#else -#define WEBRTC_TRACE Trace::Add -#endif - -class Trace { - public: - // The length of the trace text preceeding the log message. - static const int kBoilerplateLength; - // The position of the timestamp text within a trace. - static const int kTimestampPosition; - // The length of the timestamp (without "delta" field). - static const int kTimestampLength; - - // Increments the reference count to the trace. - static void CreateTrace(); - // Decrements the reference count to the trace. - static void ReturnTrace(); - // Note: any instance that writes to the trace file should increment and - // decrement the reference count on construction and destruction, - // respectively. - - // Specifies what type of messages should be written to the trace file. The - // filter parameter is a bitmask where each message type is enumerated by the - // TraceLevel enumerator. TODO(hellner): why is the TraceLevel enumerator not - // defined in this file? - static void set_level_filter(int filter); - - // Returns what type of messages are written to the trace file. - static int level_filter(); - - // Sets the file name. If add_file_counter is false the same file will be - // reused when it fills up. If it's true a new file with incremented name - // will be used. - static int32_t SetTraceFile(const char* file_name, - const bool add_file_counter = false); - - // Registers callback to receive trace messages. - // TODO(hellner): Why not use OutStream instead? Why is TraceCallback not - // defined in this file? - static int32_t SetTraceCallback(TraceCallback* callback); - - // Adds a trace message for writing to file. The message is put in a queue - // for writing to file whenever possible for performance reasons. I.e. there - // is a crash it is possible that the last, vital logs are not logged yet. - // level is the type of message to log. If that type of messages is - // filtered it will not be written to file. module is an identifier for what - // part of the code the message is coming. - // id is an identifier that should be unique for that set of classes that - // are associated (e.g. all instances owned by an engine). - // msg and the ellipsis are the same as e.g. sprintf. - // TODO(hellner) Why is TraceModule not defined in this file? - static void Add(const TraceLevel level, - const TraceModule module, - const int32_t id, - const char* msg, ...); - - private: - static volatile int level_filter_; -}; - -} // namespace webrtc - -#endif // WEBRTC_SYSTEM_WRAPPERS_INCLUDE_TRACE_H_ diff --git a/WebRtc.NET/include/webrtc/system_wrappers/include/utf_util_win.h b/WebRtc.NET/include/webrtc/system_wrappers/include/utf_util_win.h deleted file mode 100644 index ac91fe30..00000000 --- a/WebRtc.NET/include/webrtc/system_wrappers/include/utf_util_win.h +++ /dev/null @@ -1,58 +0,0 @@ -/* - * Copyright (c) 2014 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -// Conversion functions for UTF-8 and UTF-16 strings on Windows. -// Duplicated from talk/base/win32.h. -#ifndef WEBRTC_SYSTEM_WRAPPERS_INCLUDE_UTF_UTIL_H_ -#define WEBRTC_SYSTEM_WRAPPERS_INCLUDE_UTF_UTIL_H_ - -#ifdef WIN32 -#include - -#include -#include - - -namespace webrtc { - -inline std::wstring ToUtf16(const char* utf8, size_t len) { - int len16 = ::MultiByteToWideChar(CP_UTF8, 0, utf8, static_cast(len), - NULL, 0); - std::unique_ptr ws(new wchar_t[len16]); - ::MultiByteToWideChar(CP_UTF8, 0, utf8, static_cast(len), ws.get(), - len16); - return std::wstring(ws.get(), len16); -} - -inline std::wstring ToUtf16(const std::string& str) { - return ToUtf16(str.data(), str.length()); -} - -inline std::string ToUtf8(const wchar_t* wide, size_t len) { - int len8 = ::WideCharToMultiByte(CP_UTF8, 0, wide, static_cast(len), - NULL, 0, NULL, NULL); - std::unique_ptr ns(new char[len8]); - ::WideCharToMultiByte(CP_UTF8, 0, wide, static_cast(len), ns.get(), len8, - NULL, NULL); - return std::string(ns.get(), len8); -} - -inline std::string ToUtf8(const wchar_t* wide) { - return ToUtf8(wide, wcslen(wide)); -} - -inline std::string ToUtf8(const std::wstring& wstr) { - return ToUtf8(wstr.data(), wstr.length()); -} - -} // namespace webrtc - -#endif // WIN32 -#endif // WEBRTC_SYSTEM_WRAPPERS_INCLUDE_UTF_UTIL_H_ diff --git a/WebRtc.NET/include/webrtc/system_wrappers/source/condition_variable_event_win.h b/WebRtc.NET/include/webrtc/system_wrappers/source/condition_variable_event_win.h deleted file mode 100644 index 8099ad5f..00000000 --- a/WebRtc.NET/include/webrtc/system_wrappers/source/condition_variable_event_win.h +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_SYSTEM_WRAPPERS_SOURCE_CONDITION_VARIABLE_EVENT_WIN_H_ -#define WEBRTC_SYSTEM_WRAPPERS_SOURCE_CONDITION_VARIABLE_EVENT_WIN_H_ - -#include - -namespace webrtc { - -class ConditionVariableEventWin { - public: - ConditionVariableEventWin(); - ~ConditionVariableEventWin(); - - void SleepCS(CRITICAL_SECTION* crit_sect); - bool SleepCS(CRITICAL_SECTION* crit_sect, unsigned long max_time_inMS); - void Wake(); - void WakeAll(); - - private: - enum EventWakeUpType { - WAKEALL_0 = 0, - WAKEALL_1 = 1, - WAKE = 2, - EVENT_COUNT = 3 - }; - - unsigned int num_waiters_[2]; - EventWakeUpType eventID_; - CRITICAL_SECTION num_waiters_crit_sect_; - HANDLE events_[EVENT_COUNT]; -}; - -} // namespace webrtc - -#endif // WEBRTC_SYSTEM_WRAPPERS_SOURCE_CONDITION_VARIABLE_EVENT_WIN_H_ diff --git a/WebRtc.NET/include/webrtc/system_wrappers/source/event_timer_win.h b/WebRtc.NET/include/webrtc/system_wrappers/source/event_timer_win.h deleted file mode 100644 index 163cdded..00000000 --- a/WebRtc.NET/include/webrtc/system_wrappers/source/event_timer_win.h +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_SYSTEM_WRAPPERS_SOURCE_EVENT_WIN_H_ -#define WEBRTC_SYSTEM_WRAPPERS_SOURCE_EVENT_WIN_H_ - -#include - -#include "webrtc/system_wrappers/include/event_wrapper.h" - -#include "webrtc/typedefs.h" - -namespace webrtc { - -class EventTimerWin : public EventTimerWrapper { - public: - EventTimerWin(); - virtual ~EventTimerWin(); - - virtual EventTypeWrapper Wait(unsigned long max_time); - virtual bool Set(); - - virtual bool StartTimer(bool periodic, unsigned long time); - virtual bool StopTimer(); - - private: - HANDLE event_; - uint32_t timerID_; -}; - -} // namespace webrtc - -#endif // WEBRTC_SYSTEM_WRAPPERS_SOURCE_EVENT_WIN_H_ diff --git a/WebRtc.NET/include/webrtc/system_wrappers/source/rw_lock_win.h b/WebRtc.NET/include/webrtc/system_wrappers/source/rw_lock_win.h deleted file mode 100644 index c279eaba..00000000 --- a/WebRtc.NET/include/webrtc/system_wrappers/source/rw_lock_win.h +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_SYSTEM_WRAPPERS_SOURCE_RW_LOCK_WIN_H_ -#define WEBRTC_SYSTEM_WRAPPERS_SOURCE_RW_LOCK_WIN_H_ - -#include "webrtc/system_wrappers/include/rw_lock_wrapper.h" - -#include - -namespace webrtc { - -class RWLockWin : public RWLockWrapper { - public: - static RWLockWin* Create(); - ~RWLockWin() {} - - virtual void AcquireLockExclusive(); - virtual void ReleaseLockExclusive(); - - virtual void AcquireLockShared(); - virtual void ReleaseLockShared(); - - private: - RWLockWin(); - static bool LoadModule(); - - SRWLOCK lock_; -}; - -} // namespace webrtc - -#endif // WEBRTC_SYSTEM_WRAPPERS_SOURCE_RW_LOCK_WIN_H_ diff --git a/WebRtc.NET/include/webrtc/system_wrappers/source/rw_lock_winxp_win.h b/WebRtc.NET/include/webrtc/system_wrappers/source/rw_lock_winxp_win.h deleted file mode 100644 index 5c884482..00000000 --- a/WebRtc.NET/include/webrtc/system_wrappers/source/rw_lock_winxp_win.h +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_SYSTEM_WRAPPERS_SOURCE_RW_LOCK_WINXP_WIN_H_ -#define WEBRTC_SYSTEM_WRAPPERS_SOURCE_RW_LOCK_WINXP_WIN_H_ - -#include "webrtc/system_wrappers/include/rw_lock_wrapper.h" -#include "webrtc/system_wrappers/source/condition_variable_event_win.h" -#include "webrtc/typedefs.h" - -namespace webrtc { - -class RWLockWinXP : public RWLockWrapper { - public: - RWLockWinXP(); - ~RWLockWinXP() override; - - void AcquireLockExclusive() override; - void ReleaseLockExclusive() override; - - void AcquireLockShared() override; - void ReleaseLockShared() override; - - private: - CRITICAL_SECTION critical_section_; - ConditionVariableEventWin read_condition_; - ConditionVariableEventWin write_condition_; - - int readers_active_ = 0; - bool writer_active_ = false; - int readers_waiting_ = 0; - int writers_waiting_ = 0; -}; - -} // namespace webrtc - -#endif // WEBRTC_SYSTEM_WRAPPERS_SOURCE_RW_LOCK_WINXP_WIN_H_ diff --git a/WebRtc.NET/include/webrtc/system_wrappers/source/trace_impl.h b/WebRtc.NET/include/webrtc/system_wrappers/source/trace_impl.h deleted file mode 100644 index 045b3cd5..00000000 --- a/WebRtc.NET/include/webrtc/system_wrappers/source/trace_impl.h +++ /dev/null @@ -1,105 +0,0 @@ -/* - * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_SYSTEM_WRAPPERS_SOURCE_TRACE_IMPL_H_ -#define WEBRTC_SYSTEM_WRAPPERS_SOURCE_TRACE_IMPL_H_ - -#include - -#include "webrtc/base/criticalsection.h" -#include "webrtc/system_wrappers/include/event_wrapper.h" -#include "webrtc/system_wrappers/include/file_wrapper.h" -#include "webrtc/system_wrappers/include/static_instance.h" -#include "webrtc/base/platform_thread.h" -#include "webrtc/system_wrappers/include/trace.h" - -namespace webrtc { - -#define WEBRTC_TRACE_MAX_MESSAGE_SIZE 1024 -// Total buffer size is WEBRTC_TRACE_NUM_ARRAY (number of buffer partitions) * -// WEBRTC_TRACE_MAX_QUEUE (number of lines per buffer partition) * -// WEBRTC_TRACE_MAX_MESSAGE_SIZE (number of 1 byte charachters per line) = -// 1 or 4 Mbyte. - -#define WEBRTC_TRACE_MAX_FILE_SIZE 100*1000 -// Number of rows that may be written to file. On average 110 bytes per row (max -// 256 bytes per row). So on average 110*100*1000 = 11 Mbyte, max 256*100*1000 = -// 25.6 Mbyte - -class TraceImpl : public Trace { - public: - virtual ~TraceImpl(); - - static TraceImpl* CreateInstance(); - static TraceImpl* GetTrace(const TraceLevel level = kTraceAll); - - int32_t SetTraceFileImpl(const char* file_name, const bool add_file_counter); - int32_t SetTraceCallbackImpl(TraceCallback* callback); - - void AddImpl(const TraceLevel level, const TraceModule module, - const int32_t id, const char* msg); - - bool TraceCheck(const TraceLevel level) const; - - protected: - TraceImpl(); - - static TraceImpl* StaticInstance(CountOperation count_operation, - const TraceLevel level = kTraceAll); - - int32_t AddThreadId(char* trace_message) const; - - // OS specific implementations. - virtual int32_t AddTime(char* trace_message, - const TraceLevel level) const = 0; - - virtual int32_t AddDateTimeInfo(char* trace_message) const = 0; - - private: - friend class Trace; - - int32_t AddLevel(char* sz_message, const TraceLevel level) const; - - int32_t AddModuleAndId(char* trace_message, const TraceModule module, - const int32_t id) const; - - int32_t AddMessage(char* trace_message, - const char msg[WEBRTC_TRACE_MAX_MESSAGE_SIZE], - const uint16_t written_so_far) const; - - void AddMessageToList( - const char trace_message[WEBRTC_TRACE_MAX_MESSAGE_SIZE], - const uint16_t length, - const TraceLevel level); - - bool UpdateFileName( - char file_name_with_counter_utf8[FileWrapper::kMaxFileNameSize], - const uint32_t new_count) const EXCLUSIVE_LOCKS_REQUIRED(crit_); - - bool CreateFileName( - const char file_name_utf8[FileWrapper::kMaxFileNameSize], - char file_name_with_counter_utf8[FileWrapper::kMaxFileNameSize], - const uint32_t new_count) const; - - void WriteToFile(const char* msg, uint16_t length) - EXCLUSIVE_LOCKS_REQUIRED(crit_); - - TraceCallback* callback_ GUARDED_BY(crit_); - uint32_t row_count_text_ GUARDED_BY(crit_); - uint32_t file_count_text_ GUARDED_BY(crit_); - - const std::unique_ptr trace_file_ GUARDED_BY(crit_); - std::string trace_file_path_ GUARDED_BY(crit_); - rtc::CriticalSection crit_; -}; - -} // namespace webrtc - -#endif // WEBRTC_SYSTEM_WRAPPERS_SOURCE_TRACE_IMPL_H_ diff --git a/WebRtc.NET/include/webrtc/system_wrappers/source/trace_posix.h b/WebRtc.NET/include/webrtc/system_wrappers/source/trace_posix.h deleted file mode 100644 index 25dfeec0..00000000 --- a/WebRtc.NET/include/webrtc/system_wrappers/source/trace_posix.h +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_SYSTEM_WRAPPERS_SOURCE_TRACE_POSIX_H_ -#define WEBRTC_SYSTEM_WRAPPERS_SOURCE_TRACE_POSIX_H_ - -#include "webrtc/system_wrappers/include/critical_section_wrapper.h" -#include "webrtc/system_wrappers/source/trace_impl.h" - -namespace webrtc { - -class TracePosix : public TraceImpl { - public: - TracePosix(); - ~TracePosix() override; - - // This method can be called on several different threads different from - // the creating thread. - int32_t AddTime(char* trace_message, const TraceLevel level) const override; - - int32_t AddDateTimeInfo(char* trace_message) const override; - - private: - volatile mutable uint32_t prev_api_tick_count_; - volatile mutable uint32_t prev_tick_count_; - - CriticalSectionWrapper& crit_sect_; -}; - -} // namespace webrtc - -#endif // WEBRTC_SYSTEM_WRAPPERS_SOURCE_TRACE_POSIX_H_ diff --git a/WebRtc.NET/include/webrtc/system_wrappers/source/trace_win.h b/WebRtc.NET/include/webrtc/system_wrappers/source/trace_win.h deleted file mode 100644 index 1311b23c..00000000 --- a/WebRtc.NET/include/webrtc/system_wrappers/source/trace_win.h +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_SYSTEM_WRAPPERS_SOURCE_TRACE_WIN_H_ -#define WEBRTC_SYSTEM_WRAPPERS_SOURCE_TRACE_WIN_H_ - -#include -#include - -#include "webrtc/system_wrappers/source/trace_impl.h" - -namespace webrtc { - -class TraceWindows : public TraceImpl { - public: - TraceWindows(); - virtual ~TraceWindows(); - - virtual int32_t AddTime(char* trace_message, const TraceLevel level) const; - - virtual int32_t AddDateTimeInfo(char* trace_message) const; - private: - volatile mutable uint32_t prev_api_tick_count_; - volatile mutable uint32_t prev_tick_count_; -}; - -} // namespace webrtc - -#endif // WEBRTC_SYSTEM_WRAPPERS_SOURCE_TRACE_WIN_H_ diff --git a/WebRtc.NET/include/webrtc/test/call_test.h b/WebRtc.NET/include/webrtc/test/call_test.h deleted file mode 100644 index b4101a4c..00000000 --- a/WebRtc.NET/include/webrtc/test/call_test.h +++ /dev/null @@ -1,215 +0,0 @@ -/* - * Copyright (c) 2014 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ -#ifndef WEBRTC_TEST_CALL_TEST_H_ -#define WEBRTC_TEST_CALL_TEST_H_ - -#include -#include - -#include "webrtc/call/call.h" -#include "webrtc/logging/rtc_event_log/rtc_event_log.h" -#include "webrtc/test/encoder_settings.h" -#include "webrtc/test/fake_audio_device.h" -#include "webrtc/test/fake_decoder.h" -#include "webrtc/test/fake_encoder.h" -#include "webrtc/test/fake_videorenderer.h" -#include "webrtc/test/frame_generator_capturer.h" -#include "webrtc/test/rtp_rtcp_observer.h" - -namespace webrtc { - -class VoEBase; - -namespace test { - -class BaseTest; - -class CallTest : public ::testing::Test { - public: - CallTest(); - virtual ~CallTest(); - - static const size_t kNumSsrcs = 3; - static const int kDefaultWidth = 320; - static const int kDefaultHeight = 180; - static const int kDefaultFramerate = 30; - static const int kDefaultTimeoutMs; - static const int kLongTimeoutMs; - static const uint8_t kVideoSendPayloadType; - static const uint8_t kSendRtxPayloadType; - static const uint8_t kFakeVideoSendPayloadType; - static const uint8_t kRedPayloadType; - static const uint8_t kRtxRedPayloadType; - static const uint8_t kUlpfecPayloadType; - static const uint8_t kFlexfecPayloadType; - static const uint8_t kAudioSendPayloadType; - static const uint32_t kSendRtxSsrcs[kNumSsrcs]; - static const uint32_t kVideoSendSsrcs[kNumSsrcs]; - static const uint32_t kAudioSendSsrc; - static const uint32_t kFlexfecSendSsrc; - static const uint32_t kReceiverLocalVideoSsrc; - static const uint32_t kReceiverLocalAudioSsrc; - static const int kNackRtpHistoryMs; - - protected: - // RunBaseTest overwrites the audio_state and the voice_engine of the send and - // receive Call configs to simplify test code and avoid having old VoiceEngine - // APIs in the tests. - void RunBaseTest(BaseTest* test); - - void CreateCalls(const Call::Config& sender_config, - const Call::Config& receiver_config); - void CreateSenderCall(const Call::Config& config); - void CreateReceiverCall(const Call::Config& config); - void DestroyCalls(); - - void CreateSendConfig(size_t num_video_streams, - size_t num_audio_streams, - size_t num_flexfec_streams, - Transport* send_transport); - void CreateMatchingReceiveConfigs(Transport* rtcp_send_transport); - - void CreateFrameGeneratorCapturerWithDrift(Clock* drift_clock, - float speed, - int framerate, - int width, - int height); - void CreateFrameGeneratorCapturer(int framerate, int width, int height); - void CreateFakeAudioDevices(); - - void CreateVideoStreams(); - void CreateAudioStreams(); - void CreateFlexfecStreams(); - void Start(); - void Stop(); - void DestroyStreams(); - void SetFakeVideoCaptureRotation(VideoRotation rotation); - - Clock* const clock_; - - webrtc::RtcEventLogNullImpl event_log_; - std::unique_ptr sender_call_; - std::unique_ptr send_transport_; - VideoSendStream::Config video_send_config_; - VideoEncoderConfig video_encoder_config_; - VideoSendStream* video_send_stream_; - AudioSendStream::Config audio_send_config_; - AudioSendStream* audio_send_stream_; - - std::unique_ptr receiver_call_; - std::unique_ptr receive_transport_; - std::vector video_receive_configs_; - std::vector video_receive_streams_; - std::vector audio_receive_configs_; - std::vector audio_receive_streams_; - std::vector flexfec_receive_configs_; - std::vector flexfec_receive_streams_; - - std::unique_ptr frame_generator_capturer_; - test::FakeEncoder fake_encoder_; - std::vector> allocated_decoders_; - size_t num_video_streams_; - size_t num_audio_streams_; - size_t num_flexfec_streams_; - rtc::scoped_refptr decoder_factory_; - test::FakeVideoRenderer fake_renderer_; - - private: - // TODO(holmer): Remove once VoiceEngine is fully refactored to the new API. - // These methods are used to set up legacy voice engines and channels which is - // necessary while voice engine is being refactored to the new stream API. - struct VoiceEngineState { - VoiceEngineState() - : voice_engine(nullptr), - base(nullptr), - channel_id(-1) {} - - VoiceEngine* voice_engine; - VoEBase* base; - int channel_id; - }; - - void CreateVoiceEngines(); - void DestroyVoiceEngines(); - - VoiceEngineState voe_send_; - VoiceEngineState voe_recv_; - - // The audio devices must outlive the voice engines. - std::unique_ptr fake_send_audio_device_; - std::unique_ptr fake_recv_audio_device_; -}; - -class BaseTest : public RtpRtcpObserver { - public: - explicit BaseTest(unsigned int timeout_ms); - virtual ~BaseTest(); - - virtual void PerformTest() = 0; - virtual bool ShouldCreateReceivers() const = 0; - - virtual size_t GetNumVideoStreams() const; - virtual size_t GetNumAudioStreams() const; - virtual size_t GetNumFlexfecStreams() const; - - virtual Call::Config GetSenderCallConfig(); - virtual Call::Config GetReceiverCallConfig(); - virtual void OnCallsCreated(Call* sender_call, Call* receiver_call); - - virtual test::PacketTransport* CreateSendTransport(Call* sender_call); - virtual test::PacketTransport* CreateReceiveTransport(); - - virtual void ModifyVideoConfigs( - VideoSendStream::Config* send_config, - std::vector* receive_configs, - VideoEncoderConfig* encoder_config); - virtual void ModifyVideoCaptureStartResolution(int* width, - int* heigt, - int* frame_rate); - virtual void OnVideoStreamsCreated( - VideoSendStream* send_stream, - const std::vector& receive_streams); - - virtual void ModifyAudioConfigs( - AudioSendStream::Config* send_config, - std::vector* receive_configs); - virtual void OnAudioStreamsCreated( - AudioSendStream* send_stream, - const std::vector& receive_streams); - - virtual void ModifyFlexfecConfigs( - std::vector* receive_configs); - virtual void OnFlexfecStreamsCreated( - const std::vector& receive_streams); - - virtual void OnFrameGeneratorCapturerCreated( - FrameGeneratorCapturer* frame_generator_capturer); - - webrtc::RtcEventLogNullImpl event_log_; -}; - -class SendTest : public BaseTest { - public: - explicit SendTest(unsigned int timeout_ms); - - bool ShouldCreateReceivers() const override; -}; - -class EndToEndTest : public BaseTest { - public: - explicit EndToEndTest(unsigned int timeout_ms); - - bool ShouldCreateReceivers() const override; -}; - -} // namespace test -} // namespace webrtc - -#endif // WEBRTC_TEST_CALL_TEST_H_ diff --git a/WebRtc.NET/include/webrtc/test/constants.h b/WebRtc.NET/include/webrtc/test/constants.h deleted file mode 100644 index 1b5b0cb1..00000000 --- a/WebRtc.NET/include/webrtc/test/constants.h +++ /dev/null @@ -1,19 +0,0 @@ -/* - * Copyright (c) 2015 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -namespace webrtc { -namespace test { - -extern const int kTOffsetExtensionId; -extern const int kAbsSendTimeExtensionId; -extern const int kTransportSequenceNumberExtensionId; -extern const int kVideoRotationExtensionId; -} // namespace test -} // namespace webrtc diff --git a/WebRtc.NET/include/webrtc/test/direct_transport.h b/WebRtc.NET/include/webrtc/test/direct_transport.h deleted file mode 100644 index eb552c57..00000000 --- a/WebRtc.NET/include/webrtc/test/direct_transport.h +++ /dev/null @@ -1,67 +0,0 @@ -/* - * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ -#ifndef WEBRTC_TEST_DIRECT_TRANSPORT_H_ -#define WEBRTC_TEST_DIRECT_TRANSPORT_H_ - -#include - -#include - -#include "webrtc/api/call/transport.h" -#include "webrtc/base/criticalsection.h" -#include "webrtc/base/event.h" -#include "webrtc/base/platform_thread.h" -#include "webrtc/test/fake_network_pipe.h" - -namespace webrtc { - -class Call; -class Clock; -class PacketReceiver; - -namespace test { - -class DirectTransport : public Transport { - public: - explicit DirectTransport(Call* send_call); - DirectTransport(const FakeNetworkPipe::Config& config, Call* send_call); - ~DirectTransport(); - - void SetConfig(const FakeNetworkPipe::Config& config); - - virtual void StopSending(); - // TODO(holmer): Look into moving this to the constructor. - virtual void SetReceiver(PacketReceiver* receiver); - - bool SendRtp(const uint8_t* data, - size_t length, - const PacketOptions& options) override; - bool SendRtcp(const uint8_t* data, size_t length) override; - - int GetAverageDelayMs(); - - private: - static bool NetworkProcess(void* transport); - bool SendPackets(); - - rtc::CriticalSection lock_; - Call* const send_call_; - rtc::Event packet_event_; - rtc::PlatformThread thread_; - Clock* const clock_; - - bool shutting_down_; - - FakeNetworkPipe fake_network_; -}; -} // namespace test -} // namespace webrtc - -#endif // WEBRTC_TEST_DIRECT_TRANSPORT_H_ diff --git a/WebRtc.NET/include/webrtc/test/fake_audio_device.h b/WebRtc.NET/include/webrtc/test/fake_audio_device.h deleted file mode 100644 index 77a74bac..00000000 --- a/WebRtc.NET/include/webrtc/test/fake_audio_device.h +++ /dev/null @@ -1,71 +0,0 @@ -/* - * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ -#ifndef WEBRTC_TEST_FAKE_AUDIO_DEVICE_H_ -#define WEBRTC_TEST_FAKE_AUDIO_DEVICE_H_ - -#include -#include - -#include "webrtc/base/criticalsection.h" -#include "webrtc/base/platform_thread.h" -#include "webrtc/modules/audio_device/include/fake_audio_device.h" -#include "webrtc/test/drifting_clock.h" -#include "webrtc/typedefs.h" - -namespace webrtc { - -class Clock; -class EventTimerWrapper; -class FileWrapper; -class ModuleFileUtility; - -namespace test { - -class FakeAudioDevice : public FakeAudioDeviceModule { - public: - FakeAudioDevice(Clock* clock, const std::string& filename, float speed); - - virtual ~FakeAudioDevice(); - - int32_t Init() override; - int32_t RegisterAudioCallback(AudioTransport* callback) override; - - bool Playing() const override; - int32_t PlayoutDelay(uint16_t* delay_ms) const override; - bool Recording() const override; - - void Start(); - void Stop(); - - private: - static bool Run(void* obj); - void CaptureAudio(); - - static const uint32_t kFrequencyHz = 16000; - static const size_t kBufferSizeBytes = 2 * kFrequencyHz; - - AudioTransport* audio_callback_; - bool capturing_; - int8_t captured_audio_[kBufferSizeBytes]; - int8_t playout_buffer_[kBufferSizeBytes]; - const float speed_; - int64_t last_playout_ms_; - - DriftingClock clock_; - std::unique_ptr tick_; - rtc::CriticalSection lock_; - rtc::PlatformThread thread_; - std::unique_ptr file_utility_; - std::unique_ptr input_stream_; -}; -} // namespace test -} // namespace webrtc - -#endif // WEBRTC_TEST_FAKE_AUDIO_DEVICE_H_ diff --git a/WebRtc.NET/include/webrtc/test/fake_decoder.h b/WebRtc.NET/include/webrtc/test/fake_decoder.h deleted file mode 100644 index b3120a02..00000000 --- a/WebRtc.NET/include/webrtc/test/fake_decoder.h +++ /dev/null @@ -1,76 +0,0 @@ -/* - * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_TEST_FAKE_DECODER_H_ -#define WEBRTC_TEST_FAKE_DECODER_H_ - -#include - -#include "webrtc/modules/video_coding/include/video_codec_interface.h" -#include "webrtc/system_wrappers/include/clock.h" - -namespace webrtc { -namespace test { - -class FakeDecoder : public VideoDecoder { - public: - FakeDecoder(); - virtual ~FakeDecoder() {} - - int32_t InitDecode(const VideoCodec* config, - int32_t number_of_cores) override; - - int32_t Decode(const EncodedImage& input, - bool missing_frames, - const RTPFragmentationHeader* fragmentation, - const CodecSpecificInfo* codec_specific_info, - int64_t render_time_ms) override; - - int32_t RegisterDecodeCompleteCallback( - DecodedImageCallback* callback) override; - - int32_t Release() override; - - const char* ImplementationName() const override; - - static const char* kImplementationName; - - private: - VideoCodec config_; - DecodedImageCallback* callback_; -}; - -class FakeH264Decoder : public FakeDecoder { - public: - virtual ~FakeH264Decoder() {} - - int32_t Decode(const EncodedImage& input, - bool missing_frames, - const RTPFragmentationHeader* fragmentation, - const CodecSpecificInfo* codec_specific_info, - int64_t render_time_ms) override; -}; - -class FakeNullDecoder : public FakeDecoder { - public: - virtual ~FakeNullDecoder() {} - - int32_t Decode(const EncodedImage& input, - bool missing_frames, - const RTPFragmentationHeader* fragmentation, - const CodecSpecificInfo* codec_specific_info, - int64_t render_time_ms) override { - return 0; - } -}; -} // namespace test -} // namespace webrtc - -#endif // WEBRTC_TEST_FAKE_DECODER_H_ diff --git a/WebRtc.NET/include/webrtc/test/fake_encoder.h b/WebRtc.NET/include/webrtc/test/fake_encoder.h deleted file mode 100644 index 39c3e3e6..00000000 --- a/WebRtc.NET/include/webrtc/test/fake_encoder.h +++ /dev/null @@ -1,120 +0,0 @@ -/* - * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_TEST_FAKE_ENCODER_H_ -#define WEBRTC_TEST_FAKE_ENCODER_H_ - -#include - -#include "webrtc/base/criticalsection.h" -#include "webrtc/base/task_queue.h" -#include "webrtc/common_types.h" -#include "webrtc/system_wrappers/include/clock.h" -#include "webrtc/video_encoder.h" - -namespace webrtc { -namespace test { - -class FakeEncoder : public VideoEncoder { - public: - explicit FakeEncoder(Clock* clock); - virtual ~FakeEncoder(); - - // Sets max bitrate. Not thread-safe, call before registering the encoder. - void SetMaxBitrate(int max_kbps); - - int32_t InitEncode(const VideoCodec* config, - int32_t number_of_cores, - size_t max_payload_size) override; - int32_t Encode(const VideoFrame& input_image, - const CodecSpecificInfo* codec_specific_info, - const std::vector* frame_types) override; - int32_t RegisterEncodeCompleteCallback( - EncodedImageCallback* callback) override; - int32_t Release() override; - int32_t SetChannelParameters(uint32_t packet_loss, int64_t rtt) override; - int32_t SetRateAllocation(const BitrateAllocation& rate_allocation, - uint32_t framerate) override; - const char* ImplementationName() const override; - - static const char* kImplementationName; - - protected: - rtc::CriticalSection crit_sect_; - Clock* const clock_; - VideoCodec config_ GUARDED_BY(crit_sect_); - EncodedImageCallback* callback_ GUARDED_BY(crit_sect_); - BitrateAllocation target_bitrate_ GUARDED_BY(crit_sect_); - int max_target_bitrate_kbps_ GUARDED_BY(crit_sect_); - int64_t last_encode_time_ms_ GUARDED_BY(crit_sect_); - uint8_t encoded_buffer_[100000]; -}; - -class FakeH264Encoder : public FakeEncoder, public EncodedImageCallback { - public: - explicit FakeH264Encoder(Clock* clock); - virtual ~FakeH264Encoder() {} - - int32_t RegisterEncodeCompleteCallback( - EncodedImageCallback* callback) override; - - Result OnEncodedImage(const EncodedImage& encodedImage, - const CodecSpecificInfo* codecSpecificInfo, - const RTPFragmentationHeader* fragments) override; - - private: - rtc::CriticalSection local_crit_sect_; - EncodedImageCallback* callback_ GUARDED_BY(local_crit_sect_); - int idr_counter_ GUARDED_BY(local_crit_sect_); -}; - -class DelayedEncoder : public test::FakeEncoder { - public: - DelayedEncoder(Clock* clock, int delay_ms); - virtual ~DelayedEncoder() {} - - void SetDelay(int delay_ms); - int32_t Encode(const VideoFrame& input_image, - const CodecSpecificInfo* codec_specific_info, - const std::vector* frame_types) override; - - private: - rtc::CriticalSection local_crit_sect_; - int delay_ms_ GUARDED_BY(&local_crit_sect_); -}; - -// This class implements a multi-threaded fake encoder by posting -// FakeH264Encoder::Encode(.) tasks to |queue1_| and |queue2_|, in an -// alternating fashion. -class MultithreadedFakeH264Encoder : public test::FakeH264Encoder { - public: - explicit MultithreadedFakeH264Encoder(Clock* clock); - virtual ~MultithreadedFakeH264Encoder() override; - - int32_t Encode(const VideoFrame& input_image, - const CodecSpecificInfo* codec_specific_info, - const std::vector* frame_types) override; - - int32_t EncodeCallback(const VideoFrame& input_image, - const CodecSpecificInfo* codec_specific_info, - const std::vector* frame_types); - - protected: - class EncodeTask; - - int current_queue_; - rtc::TaskQueue queue1_; - rtc::TaskQueue queue2_; -}; - -} // namespace test -} // namespace webrtc - -#endif // WEBRTC_TEST_FAKE_ENCODER_H_ diff --git a/WebRtc.NET/include/webrtc/test/fake_network_pipe.h b/WebRtc.NET/include/webrtc/test/fake_network_pipe.h deleted file mode 100644 index b0c10c07..00000000 --- a/WebRtc.NET/include/webrtc/test/fake_network_pipe.h +++ /dev/null @@ -1,154 +0,0 @@ -/* - * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_TEST_FAKE_NETWORK_PIPE_H_ -#define WEBRTC_TEST_FAKE_NETWORK_PIPE_H_ - -#include -#include -#include -#include - -#include "webrtc/base/constructormagic.h" -#include "webrtc/base/criticalsection.h" -#include "webrtc/base/random.h" -#include "webrtc/typedefs.h" - -namespace webrtc { - -class Clock; -class CriticalSectionWrapper; -class PacketReceiver; - -class NetworkPacket { - public: - NetworkPacket(const uint8_t* data, - size_t length, - int64_t send_time, - int64_t arrival_time) - : data_(new uint8_t[length]), - data_length_(length), - send_time_(send_time), - arrival_time_(arrival_time) { - memcpy(data_.get(), data, length); - } - - uint8_t* data() const { return data_.get(); } - size_t data_length() const { return data_length_; } - int64_t send_time() const { return send_time_; } - int64_t arrival_time() const { return arrival_time_; } - void IncrementArrivalTime(int64_t extra_delay) { - arrival_time_ += extra_delay; - } - - private: - // The packet data. - std::unique_ptr data_; - // Length of data_. - size_t data_length_; - // The time the packet was sent out on the network. - const int64_t send_time_; - // The time the packet should arrive at the receiver. - int64_t arrival_time_; -}; - -// Class faking a network link. This is a simple and naive solution just faking -// capacity and adding an extra transport delay in addition to the capacity -// introduced delay. - -class FakeNetworkPipe { - public: - struct Config { - Config() {} - // Queue length in number of packets. - size_t queue_length_packets = 0; - // Delay in addition to capacity induced delay. - int queue_delay_ms = 0; - // Standard deviation of the extra delay. - int delay_standard_deviation_ms = 0; - // Link capacity in kbps. - int link_capacity_kbps = 0; - // Random packet loss. - int loss_percent = 0; - // If packets are allowed to be reordered. - bool allow_reordering = false; - // The average length of a burst of lost packets. - int avg_burst_loss_length = -1; - }; - - FakeNetworkPipe(Clock* clock, const FakeNetworkPipe::Config& config); - FakeNetworkPipe(Clock* clock, - const FakeNetworkPipe::Config& config, - uint64_t seed); - ~FakeNetworkPipe(); - - // Must not be called in parallel with SendPacket or Process. - void SetReceiver(PacketReceiver* receiver); - - // Sets a new configuration. This won't affect packets already in the pipe. - void SetConfig(const FakeNetworkPipe::Config& config); - - // Sends a new packet to the link. - void SendPacket(const uint8_t* packet, size_t packet_length); - - // Processes the network queues and trigger PacketReceiver::IncomingPacket for - // packets ready to be delivered. - void Process(); - int64_t TimeUntilNextProcess() const; - - // Get statistics. - float PercentageLoss(); - int AverageDelay(); - size_t dropped_packets() { return dropped_packets_; } - size_t sent_packets() { return sent_packets_; } - - private: - Clock* const clock_; - rtc::CriticalSection lock_; - PacketReceiver* packet_receiver_; - std::queue capacity_link_; - Random random_; - - // Since we need to access both the packet with the earliest and latest - // arrival time we need to use a multiset to keep all packets sorted, - // hence, we cannot use a priority queue. - struct PacketArrivalTimeComparator { - bool operator()(const NetworkPacket* p1, const NetworkPacket* p2) { - return p1->arrival_time() < p2->arrival_time(); - } - }; - std::multiset delay_link_; - - // Link configuration. - Config config_; - - // Statistics. - size_t dropped_packets_; - size_t sent_packets_; - int64_t total_packet_delay_; - - // Are we currently dropping a burst of packets? - bool bursting_; - - // The probability to drop the packet if we are currently dropping a - // burst of packet - double prob_loss_bursting_; - - // The probability to drop a burst of packets. - double prob_start_bursting_; - - int64_t next_process_time_; - - RTC_DISALLOW_COPY_AND_ASSIGN(FakeNetworkPipe); -}; - -} // namespace webrtc - -#endif // WEBRTC_TEST_FAKE_NETWORK_PIPE_H_ diff --git a/WebRtc.NET/include/webrtc/test/fake_texture_frame.h b/WebRtc.NET/include/webrtc/test/fake_texture_frame.h deleted file mode 100644 index c857f483..00000000 --- a/WebRtc.NET/include/webrtc/test/fake_texture_frame.h +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Copyright (c) 2015 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ -#ifndef WEBRTC_TEST_FAKE_TEXTURE_FRAME_H_ -#define WEBRTC_TEST_FAKE_TEXTURE_FRAME_H_ - -#include "webrtc/api/video/video_frame.h" -#include "webrtc/base/checks.h" -#include "webrtc/common_video/include/video_frame_buffer.h" - -namespace webrtc { -namespace test { - -class FakeNativeHandle { - public: - static VideoFrame CreateFrame(FakeNativeHandle* native_handle, - int width, - int height, - uint32_t timestamp, - int64_t render_time_ms, - VideoRotation rotation); -}; - -class FakeNativeHandleBuffer : public NativeHandleBuffer { - public: - FakeNativeHandleBuffer(void* native_handle, int width, int height) - : NativeHandleBuffer(native_handle, width, height) {} - - ~FakeNativeHandleBuffer() { - delete reinterpret_cast(native_handle_); - } - - private: - rtc::scoped_refptr NativeToI420Buffer() override { - rtc::scoped_refptr buffer = I420Buffer::Create(width_, height_); - I420Buffer::SetBlack(buffer); - return buffer; - } -}; - -} // namespace test -} // namespace webrtc -#endif // WEBRTC_TEST_FAKE_TEXTURE_FRAME_H_ diff --git a/WebRtc.NET/include/webrtc/test/fake_videorenderer.h b/WebRtc.NET/include/webrtc/test/fake_videorenderer.h deleted file mode 100644 index 6a4015de..00000000 --- a/WebRtc.NET/include/webrtc/test/fake_videorenderer.h +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_TEST_FAKE_VIDEORENDERER_H_ -#define WEBRTC_TEST_FAKE_VIDEORENDERER_H_ - -#include "webrtc/api/video/video_frame.h" -#include "webrtc/media/base/videosinkinterface.h" - -namespace webrtc { -namespace test { - -class FakeVideoRenderer : public rtc::VideoSinkInterface { - public: - void OnFrame(const webrtc::VideoFrame& frame) override {} -}; - -} // namespace test -} // namespace webrtc - -#endif // WEBRTC_TEST_FAKE_VIDEORENDERER_H_ diff --git a/WebRtc.NET/include/webrtc/test/field_trial.h b/WebRtc.NET/include/webrtc/test/field_trial.h deleted file mode 100644 index 735aa1f8..00000000 --- a/WebRtc.NET/include/webrtc/test/field_trial.h +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Copyright (c) 2014 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_TEST_FIELD_TRIAL_H_ -#define WEBRTC_TEST_FIELD_TRIAL_H_ - -#include -#include - -namespace webrtc { -namespace test { - -// Parses enabled field trials from a string config, such as the one passed -// to chrome's argument --force-fieldtrials and initializes webrtc::field_trial -// with such a config. -// E.g.: -// "WebRTC-experimentFoo/Enabled/WebRTC-experimentBar/Enabled100kbps/" -// Assigns the process to group "Enabled" on WebRTCExperimentFoo trial -// and to group "Enabled100kbps" on WebRTCExperimentBar. -// -// E.g. invalid config: -// "WebRTC-experiment1/Enabled" (note missing / separator at the end). -// -// Note: This method crashes with an error message if an invalid config is -// passed to it. That can be used to find out if a binary is parsing the flags. -void InitFieldTrialsFromString(const std::string& config); - -// This class is used to override field-trial configs within specific tests. -// After this class goes out of scope previous field trials will be restored. -class ScopedFieldTrials { - public: - explicit ScopedFieldTrials(const std::string& config); - ~ScopedFieldTrials(); - private: - std::string current_field_trials_; - const char* previous_field_trials_; -}; - -} // namespace test -} // namespace webrtc - -#endif // WEBRTC_TEST_FIELD_TRIAL_H_ diff --git a/WebRtc.NET/include/webrtc/test/frame_generator.h b/WebRtc.NET/include/webrtc/test/frame_generator.h deleted file mode 100644 index cea3dda1..00000000 --- a/WebRtc.NET/include/webrtc/test/frame_generator.h +++ /dev/null @@ -1,93 +0,0 @@ -/* - * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ -#ifndef WEBRTC_TEST_FRAME_GENERATOR_H_ -#define WEBRTC_TEST_FRAME_GENERATOR_H_ - -#include -#include - -#include "webrtc/api/video/video_frame.h" -#include "webrtc/base/criticalsection.h" -#include "webrtc/media/base/videosourceinterface.h" -#include "webrtc/typedefs.h" - -namespace webrtc { -class Clock; -namespace test { - -// FrameForwarder can be used as an implementation -// of rtc::VideoSourceInterface where the caller controls when -// a frame should be forwarded to its sink. -// Currently this implementation only support one sink. -class FrameForwarder : public rtc::VideoSourceInterface { - public: - FrameForwarder(); - // Forwards |video_frame| to the registered |sink_|. - void IncomingCapturedFrame(const VideoFrame& video_frame); - rtc::VideoSinkWants sink_wants() const; - bool has_sinks() const; - - private: - void AddOrUpdateSink(rtc::VideoSinkInterface* sink, - const rtc::VideoSinkWants& wants) override; - void RemoveSink(rtc::VideoSinkInterface* sink) override; - - rtc::CriticalSection crit_; - rtc::VideoSinkInterface* sink_ GUARDED_BY(crit_); - rtc::VideoSinkWants sink_wants_ GUARDED_BY(crit_); -}; - -class FrameGenerator { - public: - FrameGenerator() {} - virtual ~FrameGenerator() {} - - // Returns video frame that remains valid until next call. - virtual VideoFrame* NextFrame() = 0; - - // Change the capture resolution. - virtual void ChangeResolution(size_t width, size_t height) { - RTC_NOTREACHED(); - } - - // Creates a test frame generator that creates fully saturated frames with - // varying U, V values over time. - static FrameGenerator* CreateChromaGenerator(size_t width, size_t height); - - // Creates a frame generator that repeatedly plays a set of yuv files. - // The frame_repeat_count determines how many times each frame is shown, - // with 1 = show each frame once, etc. - static FrameGenerator* CreateFromYuvFile(std::vector files, - size_t width, - size_t height, - int frame_repeat_count); - - // Creates a frame generator which takes a set of yuv files (wrapping a - // frame generator created by CreateFromYuvFile() above), but outputs frames - // that have been cropped to specified resolution: source_width/source_height - // is the size of the source images, target_width/target_height is the size of - // the cropped output. For each source image read, the cropped viewport will - // be scrolled top to bottom/left to right for scroll_tim_ms milliseconds. - // After that the image will stay in place for pause_time_ms milliseconds, - // and then this will be repeated with the next file from the input set. - static FrameGenerator* CreateScrollingInputFromYuvFiles( - Clock* clock, - std::vector filenames, - size_t source_width, - size_t source_height, - size_t target_width, - size_t target_height, - int64_t scroll_time_ms, - int64_t pause_time_ms); -}; -} // namespace test -} // namespace webrtc - -#endif // WEBRTC_TEST_FRAME_GENERATOR_H_ diff --git a/WebRtc.NET/include/webrtc/test/frame_generator_capturer.h b/WebRtc.NET/include/webrtc/test/frame_generator_capturer.h deleted file mode 100644 index 3a1b6c91..00000000 --- a/WebRtc.NET/include/webrtc/test/frame_generator_capturer.h +++ /dev/null @@ -1,98 +0,0 @@ -/* - * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ -#ifndef WEBRTC_TEST_FRAME_GENERATOR_CAPTURER_H_ -#define WEBRTC_TEST_FRAME_GENERATOR_CAPTURER_H_ - -#include -#include - -#include "webrtc/api/video/video_frame.h" -#include "webrtc/base/criticalsection.h" -#include "webrtc/base/platform_thread.h" -#include "webrtc/test/video_capturer.h" -#include "webrtc/typedefs.h" - -namespace webrtc { - -class CriticalSectionWrapper; -class EventTimerWrapper; - -namespace test { - -class FrameGenerator; - -class FrameGeneratorCapturer : public VideoCapturer { - public: - class SinkWantsObserver { - public: - // OnSinkWantsChanged is called when FrameGeneratorCapturer::AddOrUpdateSink - // is called. - virtual void OnSinkWantsChanged(rtc::VideoSinkInterface* sink, - const rtc::VideoSinkWants& wants) = 0; - - protected: - virtual ~SinkWantsObserver() {} - }; - - static FrameGeneratorCapturer* Create(size_t width, - size_t height, - int target_fps, - Clock* clock); - - static FrameGeneratorCapturer* CreateFromYuvFile(const std::string& file_name, - size_t width, - size_t height, - int target_fps, - Clock* clock); - virtual ~FrameGeneratorCapturer(); - - void Start() override; - void Stop() override; - void ChangeResolution(size_t width, size_t height); - - void SetSinkWantsObserver(SinkWantsObserver* observer); - - void AddOrUpdateSink(rtc::VideoSinkInterface* sink, - const rtc::VideoSinkWants& wants) override; - void RemoveSink(rtc::VideoSinkInterface* sink) override; - - void ForceFrame(); - void SetFakeRotation(VideoRotation rotation); - - int64_t first_frame_capture_time() const { return first_frame_capture_time_; } - - FrameGeneratorCapturer(Clock* clock, - FrameGenerator* frame_generator, - int target_fps); - bool Init(); - - private: - void InsertFrame(); - static bool Run(void* obj); - - Clock* const clock_; - bool sending_; - rtc::VideoSinkInterface* sink_ GUARDED_BY(&lock_); - SinkWantsObserver* sink_wants_observer_ GUARDED_BY(&lock_); - - std::unique_ptr tick_; - rtc::CriticalSection lock_; - rtc::PlatformThread thread_; - std::unique_ptr frame_generator_; - - int target_fps_; - VideoRotation fake_rotation_ = kVideoRotation_0; - - int64_t first_frame_capture_time_; -}; -} // test -} // webrtc - -#endif // WEBRTC_TEST_FRAME_GENERATOR_CAPTURER_H_ diff --git a/WebRtc.NET/include/webrtc/test/gmock.h b/WebRtc.NET/include/webrtc/test/gmock.h deleted file mode 100644 index bc12fb91..00000000 --- a/WebRtc.NET/include/webrtc/test/gmock.h +++ /dev/null @@ -1,20 +0,0 @@ -/* - * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_TEST_GMOCK_H_ -#define WEBRTC_TEST_GMOCK_H_ - -#include "webrtc/base/ignore_wundef.h" - -RTC_PUSH_IGNORING_WUNDEF() -#include "testing/gmock/include/gmock/gmock.h" -RTC_POP_IGNORING_WUNDEF() - -#endif // WEBRTC_TEST_GMOCK_H_ diff --git a/WebRtc.NET/include/webrtc/test/gtest.h b/WebRtc.NET/include/webrtc/test/gtest.h deleted file mode 100644 index 2d222cc2..00000000 --- a/WebRtc.NET/include/webrtc/test/gtest.h +++ /dev/null @@ -1,27 +0,0 @@ -/* - * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_TEST_GTEST_H_ -#define WEBRTC_TEST_GTEST_H_ - -#include "webrtc/base/ignore_wundef.h" - -RTC_PUSH_IGNORING_WUNDEF() -#include "testing/gtest/include/gtest/gtest.h" -RTC_POP_IGNORING_WUNDEF() - -// GTEST_HAS_DEATH_TEST is set to 1 when death tests are supported, but appears -// to be left unset if they're not supported. Rather than depend on this, we -// set it to 0 ourselves here. -#ifndef GTEST_HAS_DEATH_TEST -#define GTEST_HAS_DEATH_TEST 0 -#endif - -#endif // WEBRTC_TEST_GTEST_H_ diff --git a/WebRtc.NET/include/webrtc/test/layer_filtering_transport.h b/WebRtc.NET/include/webrtc/test/layer_filtering_transport.h deleted file mode 100644 index 8f8cc2e3..00000000 --- a/WebRtc.NET/include/webrtc/test/layer_filtering_transport.h +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Copyright (c) 2015 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ -#ifndef WEBRTC_TEST_LAYER_FILTERING_TRANSPORT_H_ -#define WEBRTC_TEST_LAYER_FILTERING_TRANSPORT_H_ - -#include "webrtc/call/call.h" -#include "webrtc/test/direct_transport.h" -#include "webrtc/test/fake_network_pipe.h" - -#include - -namespace webrtc { - -namespace test { - -class LayerFilteringTransport : public test::DirectTransport { - public: - LayerFilteringTransport(const FakeNetworkPipe::Config& config, - Call* send_call, - uint8_t vp8_video_payload_type, - uint8_t vp9_video_payload_type, - int selected_tl, - int selected_sl); - bool DiscardedLastPacket() const; - bool SendRtp(const uint8_t* data, - size_t length, - const PacketOptions& options) override; - - private: - // Used to distinguish between VP8 and VP9. - const uint8_t vp8_video_payload_type_; - const uint8_t vp9_video_payload_type_; - // Discard or invalidate all temporal/spatial layers with id greater than the - // selected one. -1 to disable filtering. - const int selected_tl_; - const int selected_sl_; - bool discarded_last_packet_; -}; - -} // namespace test -} // namespace webrtc - -#endif // WEBRTC_TEST_LAYER_FILTERING_TRANSPORT_H_ diff --git a/WebRtc.NET/include/webrtc/test/mock_voe_channel_proxy.h b/WebRtc.NET/include/webrtc/test/mock_voe_channel_proxy.h deleted file mode 100644 index 44f3c7cb..00000000 --- a/WebRtc.NET/include/webrtc/test/mock_voe_channel_proxy.h +++ /dev/null @@ -1,80 +0,0 @@ -/* - * Copyright (c) 2015 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_TEST_MOCK_VOE_CHANNEL_PROXY_H_ -#define WEBRTC_TEST_MOCK_VOE_CHANNEL_PROXY_H_ - -#include - -#include "webrtc/test/gmock.h" -#include "webrtc/voice_engine/channel_proxy.h" - -namespace webrtc { -namespace test { - -class MockVoEChannelProxy : public voe::ChannelProxy { - public: - MOCK_METHOD1(SetRTCPStatus, void(bool enable)); - MOCK_METHOD1(SetLocalSSRC, void(uint32_t ssrc)); - MOCK_METHOD1(SetRTCP_CNAME, void(const std::string& c_name)); - MOCK_METHOD2(SetNACKStatus, void(bool enable, int max_packets)); - MOCK_METHOD2(SetSendAudioLevelIndicationStatus, void(bool enable, int id)); - MOCK_METHOD2(SetReceiveAudioLevelIndicationStatus, void(bool enable, int id)); - MOCK_METHOD1(EnableSendTransportSequenceNumber, void(int id)); - MOCK_METHOD1(EnableReceiveTransportSequenceNumber, void(int id)); - MOCK_METHOD3(RegisterSenderCongestionControlObjects, - void(RtpPacketSender* rtp_packet_sender, - TransportFeedbackObserver* transport_feedback_observer, - PacketRouter* packet_router)); - MOCK_METHOD1(RegisterReceiverCongestionControlObjects, - void(PacketRouter* packet_router)); - MOCK_METHOD0(ResetCongestionControlObjects, void()); - MOCK_CONST_METHOD0(GetRTCPStatistics, CallStatistics()); - MOCK_CONST_METHOD0(GetRemoteRTCPReportBlocks, std::vector()); - MOCK_CONST_METHOD0(GetNetworkStatistics, NetworkStatistics()); - MOCK_CONST_METHOD0(GetDecodingCallStatistics, AudioDecodingCallStats()); - MOCK_CONST_METHOD0(GetSpeechOutputLevelFullRange, int32_t()); - MOCK_CONST_METHOD0(GetDelayEstimate, uint32_t()); - MOCK_METHOD2(SetSendTelephoneEventPayloadType, bool(int payload_type, - int payload_frequency)); - MOCK_METHOD2(SendTelephoneEventOutband, bool(int event, int duration_ms)); - MOCK_METHOD2(SetBitrate, void(int bitrate_bps, int64_t probing_interval_ms)); - // TODO(solenberg): Talk the compiler into accepting this mock method: - // MOCK_METHOD1(SetSink, void(std::unique_ptr sink)); - MOCK_METHOD1(SetInputMute, void(bool muted)); - MOCK_METHOD1(RegisterExternalTransport, void(Transport* transport)); - MOCK_METHOD0(DeRegisterExternalTransport, void()); - MOCK_METHOD3(ReceivedRTPPacket, bool(const uint8_t* packet, - size_t length, - const PacketTime& packet_time)); - MOCK_METHOD2(ReceivedRTCPPacket, bool(const uint8_t* packet, size_t length)); - MOCK_CONST_METHOD0(GetAudioDecoderFactory, - const rtc::scoped_refptr&()); - MOCK_METHOD1(SetChannelOutputVolumeScaling, void(float scaling)); - MOCK_METHOD1(SetRtcEventLog, void(RtcEventLog* event_log)); - MOCK_METHOD1(SetRtcpRttStats, void(RtcpRttStats* rtcp_rtt_stats)); - MOCK_METHOD1(EnableAudioNetworkAdaptor, - void(const std::string& config_string)); - MOCK_METHOD0(DisableAudioNetworkAdaptor, void()); - MOCK_METHOD2(SetReceiverFrameLengthRange, - void(int min_frame_length_ms, int max_frame_length_ms)); - MOCK_METHOD2(GetAudioFrameWithInfo, - AudioMixer::Source::AudioFrameInfo(int sample_rate_hz, - AudioFrame* audio_frame)); - MOCK_CONST_METHOD0(NeededFrequency, int()); - MOCK_METHOD1(SetTransportOverhead, void(int transport_overhead_per_packet)); - MOCK_METHOD1(AssociateSendChannel, - void(const ChannelProxy& send_channel_proxy)); - MOCK_METHOD0(DisassociateSendChannel, void()); -}; -} // namespace test -} // namespace webrtc - -#endif // WEBRTC_TEST_MOCK_VOE_CHANNEL_PROXY_H_ diff --git a/WebRtc.NET/include/webrtc/test/mock_voice_engine.h b/WebRtc.NET/include/webrtc/test/mock_voice_engine.h deleted file mode 100644 index ced07512..00000000 --- a/WebRtc.NET/include/webrtc/test/mock_voice_engine.h +++ /dev/null @@ -1,352 +0,0 @@ -/* - * Copyright (c) 2015 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_AUDIO_MOCK_VOICE_ENGINE_H_ -#define WEBRTC_AUDIO_MOCK_VOICE_ENGINE_H_ - -#include - -#include "webrtc/modules/audio_device/include/mock_audio_device.h" -#include "webrtc/modules/audio_device/include/mock_audio_transport.h" -#include "webrtc/modules/audio_processing/include/mock_audio_processing.h" -#include "webrtc/test/gmock.h" -#include "webrtc/test/mock_voe_channel_proxy.h" -#include "webrtc/voice_engine/voice_engine_impl.h" - -namespace webrtc { -namespace test { - -// NOTE: This class inherits from VoiceEngineImpl so that its clients will be -// able to get the various interfaces as usual, via T::GetInterface(). -class MockVoiceEngine : public VoiceEngineImpl { - public: - // TODO(nisse): Valid overrides commented out, because the gmock - // methods don't use any override declarations, and we want to avoid - // warnings from -Winconsistent-missing-override. See - // http://crbug.com/428099. - MockVoiceEngine( - rtc::scoped_refptr decoder_factory = nullptr) - : decoder_factory_(decoder_factory) { - // Increase ref count so this object isn't automatically deleted whenever - // interfaces are Release():d. - ++_ref_count; - // We add this default behavior to make the mock easier to use in tests. It - // will create a NiceMock of a voe::ChannelProxy. - // TODO(ossu): As long as AudioReceiveStream is implemented as a wrapper - // around Channel, we need to make sure ChannelProxy returns the same - // decoder factory as the one passed in when creating an AudioReceiveStream. - ON_CALL(*this, ChannelProxyFactory(testing::_)) - .WillByDefault(testing::Invoke([this](int channel_id) { - auto* proxy = - new testing::NiceMock(); - EXPECT_CALL(*proxy, GetAudioDecoderFactory()) - .WillRepeatedly(testing::ReturnRef(decoder_factory_)); - return proxy; - })); - - ON_CALL(*this, audio_device_module()) - .WillByDefault(testing::Return(&mock_audio_device_)); - ON_CALL(*this, audio_processing()) - .WillByDefault(testing::Return(&mock_audio_processing_)); - ON_CALL(*this, audio_transport()) - .WillByDefault(testing::Return(&mock_audio_transport_)); - } - virtual ~MockVoiceEngine() /* override */ { - // Decrease ref count before base class d-tor is called; otherwise it will - // trigger an assertion. - --_ref_count; - } - // Allows injecting a ChannelProxy factory. - MOCK_METHOD1(ChannelProxyFactory, voe::ChannelProxy*(int channel_id)); - - // VoiceEngineImpl - virtual std::unique_ptr GetChannelProxy( - int channel_id) /* override */ { - return std::unique_ptr(ChannelProxyFactory(channel_id)); - } - - // VoEAudioProcessing - MOCK_METHOD2(SetNsStatus, int(bool enable, NsModes mode)); - MOCK_METHOD2(GetNsStatus, int(bool& enabled, NsModes& mode)); - MOCK_METHOD2(SetAgcStatus, int(bool enable, AgcModes mode)); - MOCK_METHOD2(GetAgcStatus, int(bool& enabled, AgcModes& mode)); - MOCK_METHOD1(SetAgcConfig, int(AgcConfig config)); - MOCK_METHOD1(GetAgcConfig, int(AgcConfig& config)); - MOCK_METHOD2(SetEcStatus, int(bool enable, EcModes mode)); - MOCK_METHOD2(GetEcStatus, int(bool& enabled, EcModes& mode)); - MOCK_METHOD1(EnableDriftCompensation, int(bool enable)); - MOCK_METHOD0(DriftCompensationEnabled, bool()); - MOCK_METHOD1(SetDelayOffsetMs, void(int offset)); - MOCK_METHOD0(DelayOffsetMs, int()); - MOCK_METHOD2(SetAecmMode, int(AecmModes mode, bool enableCNG)); - MOCK_METHOD2(GetAecmMode, int(AecmModes& mode, bool& enabledCNG)); - MOCK_METHOD1(EnableHighPassFilter, int(bool enable)); - MOCK_METHOD0(IsHighPassFilterEnabled, bool()); - MOCK_METHOD1(VoiceActivityIndicator, int(int channel)); - MOCK_METHOD1(SetEcMetricsStatus, int(bool enable)); - MOCK_METHOD1(GetEcMetricsStatus, int(bool& enabled)); - MOCK_METHOD4(GetEchoMetrics, int(int& ERL, int& ERLE, int& RERL, int& A_NLP)); - MOCK_METHOD3(GetEcDelayMetrics, - int(int& delay_median, - int& delay_std, - float& fraction_poor_delays)); - MOCK_METHOD1(StartDebugRecording, int(const char* fileNameUTF8)); - MOCK_METHOD1(StartDebugRecording, int(FILE* file_handle)); - MOCK_METHOD0(StopDebugRecording, int()); - MOCK_METHOD1(SetTypingDetectionStatus, int(bool enable)); - MOCK_METHOD1(GetTypingDetectionStatus, int(bool& enabled)); - MOCK_METHOD1(TimeSinceLastTyping, int(int& seconds)); - MOCK_METHOD5(SetTypingDetectionParameters, - int(int timeWindow, - int costPerTyping, - int reportingThreshold, - int penaltyDecay, - int typeEventDelay)); - MOCK_METHOD1(EnableStereoChannelSwapping, void(bool enable)); - MOCK_METHOD0(IsStereoChannelSwappingEnabled, bool()); - - // VoEBase - MOCK_METHOD1(RegisterVoiceEngineObserver, int(VoiceEngineObserver& observer)); - MOCK_METHOD0(DeRegisterVoiceEngineObserver, int()); - MOCK_METHOD3( - Init, - int(AudioDeviceModule* external_adm, - AudioProcessing* audioproc, - const rtc::scoped_refptr& decoder_factory)); - MOCK_METHOD0(audio_processing, AudioProcessing*()); - MOCK_METHOD0(audio_device_module, AudioDeviceModule*()); - MOCK_METHOD0(Terminate, int()); - MOCK_METHOD0(CreateChannel, int()); - MOCK_METHOD1(CreateChannel, int(const ChannelConfig& config)); - MOCK_METHOD1(DeleteChannel, int(int channel)); - MOCK_METHOD1(StartReceive, int(int channel)); - MOCK_METHOD1(StopReceive, int(int channel)); - MOCK_METHOD1(StartPlayout, int(int channel)); - MOCK_METHOD1(StopPlayout, int(int channel)); - MOCK_METHOD1(StartSend, int(int channel)); - MOCK_METHOD1(StopSend, int(int channel)); - MOCK_METHOD1(GetVersion, int(char version[1024])); - MOCK_METHOD0(LastError, int()); - MOCK_METHOD0(audio_transport, AudioTransport*()); - MOCK_METHOD2(AssociateSendChannel, - int(int channel, int accociate_send_channel)); - - // VoECodec - MOCK_METHOD0(NumOfCodecs, int()); - MOCK_METHOD2(GetCodec, int(int index, CodecInst& codec)); - MOCK_METHOD2(SetSendCodec, int(int channel, const CodecInst& codec)); - MOCK_METHOD2(GetSendCodec, int(int channel, CodecInst& codec)); - MOCK_METHOD2(SetBitRate, int(int channel, int bitrate_bps)); - MOCK_METHOD2(GetRecCodec, int(int channel, CodecInst& codec)); - MOCK_METHOD2(SetRecPayloadType, int(int channel, const CodecInst& codec)); - MOCK_METHOD2(GetRecPayloadType, int(int channel, CodecInst& codec)); - MOCK_METHOD3(SetSendCNPayloadType, - int(int channel, int type, PayloadFrequencies frequency)); - MOCK_METHOD2(SetFECStatus, int(int channel, bool enable)); - MOCK_METHOD2(GetFECStatus, int(int channel, bool& enabled)); - MOCK_METHOD4(SetVADStatus, - int(int channel, bool enable, VadModes mode, bool disableDTX)); - MOCK_METHOD4( - GetVADStatus, - int(int channel, bool& enabled, VadModes& mode, bool& disabledDTX)); - MOCK_METHOD2(SetOpusMaxPlaybackRate, int(int channel, int frequency_hz)); - MOCK_METHOD2(SetOpusDtx, int(int channel, bool enable_dtx)); - - // VoEExternalMedia - MOCK_METHOD3(RegisterExternalMediaProcessing, - int(int channel, - ProcessingTypes type, - VoEMediaProcess& processObject)); - MOCK_METHOD2(DeRegisterExternalMediaProcessing, - int(int channel, ProcessingTypes type)); - MOCK_METHOD3(GetAudioFrame, - int(int channel, int desired_sample_rate_hz, AudioFrame* frame)); - MOCK_METHOD2(SetExternalMixing, int(int channel, bool enable)); - - // VoEFile - MOCK_METHOD7(StartPlayingFileLocally, - int(int channel, - const char fileNameUTF8[1024], - bool loop, - FileFormats format, - float volumeScaling, - int startPointMs, - int stopPointMs)); - MOCK_METHOD6(StartPlayingFileLocally, - int(int channel, - InStream* stream, - FileFormats format, - float volumeScaling, - int startPointMs, - int stopPointMs)); - MOCK_METHOD1(StopPlayingFileLocally, int(int channel)); - MOCK_METHOD1(IsPlayingFileLocally, int(int channel)); - MOCK_METHOD6(StartPlayingFileAsMicrophone, - int(int channel, - const char fileNameUTF8[1024], - bool loop, - bool mixWithMicrophone, - FileFormats format, - float volumeScaling)); - MOCK_METHOD5(StartPlayingFileAsMicrophone, - int(int channel, - InStream* stream, - bool mixWithMicrophone, - FileFormats format, - float volumeScaling)); - MOCK_METHOD1(StopPlayingFileAsMicrophone, int(int channel)); - MOCK_METHOD1(IsPlayingFileAsMicrophone, int(int channel)); - MOCK_METHOD4(StartRecordingPlayout, - int(int channel, - const char* fileNameUTF8, - CodecInst* compression, - int maxSizeBytes)); - MOCK_METHOD1(StopRecordingPlayout, int(int channel)); - MOCK_METHOD3(StartRecordingPlayout, - int(int channel, OutStream* stream, CodecInst* compression)); - MOCK_METHOD3(StartRecordingMicrophone, - int(const char* fileNameUTF8, - CodecInst* compression, - int maxSizeBytes)); - MOCK_METHOD2(StartRecordingMicrophone, - int(OutStream* stream, CodecInst* compression)); - MOCK_METHOD0(StopRecordingMicrophone, int()); - - // VoEHardware - MOCK_METHOD1(GetNumOfRecordingDevices, int(int& devices)); - MOCK_METHOD1(GetNumOfPlayoutDevices, int(int& devices)); - MOCK_METHOD3(GetRecordingDeviceName, - int(int index, char strNameUTF8[128], char strGuidUTF8[128])); - MOCK_METHOD3(GetPlayoutDeviceName, - int(int index, char strNameUTF8[128], char strGuidUTF8[128])); - MOCK_METHOD2(SetRecordingDevice, - int(int index, StereoChannel recordingChannel)); - MOCK_METHOD1(SetPlayoutDevice, int(int index)); - MOCK_METHOD1(SetAudioDeviceLayer, int(AudioLayers audioLayer)); - MOCK_METHOD1(GetAudioDeviceLayer, int(AudioLayers& audioLayer)); - MOCK_METHOD1(SetRecordingSampleRate, int(unsigned int samples_per_sec)); - MOCK_CONST_METHOD1(RecordingSampleRate, int(unsigned int* samples_per_sec)); - MOCK_METHOD1(SetPlayoutSampleRate, int(unsigned int samples_per_sec)); - MOCK_CONST_METHOD1(PlayoutSampleRate, int(unsigned int* samples_per_sec)); - MOCK_CONST_METHOD0(BuiltInAECIsAvailable, bool()); - MOCK_METHOD1(EnableBuiltInAEC, int(bool enable)); - MOCK_CONST_METHOD0(BuiltInAGCIsAvailable, bool()); - MOCK_METHOD1(EnableBuiltInAGC, int(bool enable)); - MOCK_CONST_METHOD0(BuiltInNSIsAvailable, bool()); - MOCK_METHOD1(EnableBuiltInNS, int(bool enable)); - - // VoENetEqStats - MOCK_METHOD2(GetNetworkStatistics, - int(int channel, NetworkStatistics& stats)); - MOCK_CONST_METHOD2(GetDecodingCallStatistics, - int(int channel, AudioDecodingCallStats* stats)); - - // VoENetwork - MOCK_METHOD2(RegisterExternalTransport, - int(int channel, Transport& transport)); - MOCK_METHOD1(DeRegisterExternalTransport, int(int channel)); - MOCK_METHOD3(ReceivedRTPPacket, - int(int channel, const void* data, size_t length)); - MOCK_METHOD4(ReceivedRTPPacket, - int(int channel, - const void* data, - size_t length, - const PacketTime& packet_time)); - MOCK_METHOD3(ReceivedRTCPPacket, - int(int channel, const void* data, size_t length)); - - // VoERTP_RTCP - MOCK_METHOD2(SetLocalSSRC, int(int channel, unsigned int ssrc)); - MOCK_METHOD2(GetLocalSSRC, int(int channel, unsigned int& ssrc)); - MOCK_METHOD2(GetRemoteSSRC, int(int channel, unsigned int& ssrc)); - MOCK_METHOD3(SetSendAudioLevelIndicationStatus, - int(int channel, bool enable, unsigned char id)); - MOCK_METHOD3(SetReceiveAudioLevelIndicationStatus, - int(int channel, bool enable, unsigned char id)); - MOCK_METHOD3(SetSendAbsoluteSenderTimeStatus, - int(int channel, bool enable, unsigned char id)); - MOCK_METHOD3(SetReceiveAbsoluteSenderTimeStatus, - int(int channel, bool enable, unsigned char id)); - MOCK_METHOD2(SetRTCPStatus, int(int channel, bool enable)); - MOCK_METHOD2(GetRTCPStatus, int(int channel, bool& enabled)); - MOCK_METHOD2(SetRTCP_CNAME, int(int channel, const char cName[256])); - MOCK_METHOD2(GetRTCP_CNAME, int(int channel, char cName[256])); - MOCK_METHOD2(GetRemoteRTCP_CNAME, int(int channel, char cName[256])); - MOCK_METHOD7(GetRemoteRTCPData, - int(int channel, - unsigned int& NTPHigh, - unsigned int& NTPLow, - unsigned int& timestamp, - unsigned int& playoutTimestamp, - unsigned int* jitter, - unsigned short* fractionLost)); - MOCK_METHOD4(GetRTPStatistics, - int(int channel, - unsigned int& averageJitterMs, - unsigned int& maxJitterMs, - unsigned int& discardedPackets)); - MOCK_METHOD2(GetRTCPStatistics, int(int channel, CallStatistics& stats)); - MOCK_METHOD2(GetRemoteRTCPReportBlocks, - int(int channel, std::vector* receive_blocks)); - MOCK_METHOD3(SetREDStatus, int(int channel, bool enable, int redPayloadtype)); - MOCK_METHOD3(GetREDStatus, - int(int channel, bool& enable, int& redPayloadtype)); - MOCK_METHOD3(SetNACKStatus, int(int channel, bool enable, int maxNoPackets)); - - // VoEVideoSync - MOCK_METHOD1(GetPlayoutBufferSize, int(int& buffer_ms)); - MOCK_METHOD2(SetMinimumPlayoutDelay, int(int channel, int delay_ms)); - MOCK_METHOD3(GetDelayEstimate, - int(int channel, - int* jitter_buffer_delay_ms, - int* playout_buffer_delay_ms)); - MOCK_CONST_METHOD1(GetLeastRequiredDelayMs, int(int channel)); - MOCK_METHOD2(SetInitTimestamp, int(int channel, unsigned int timestamp)); - MOCK_METHOD2(SetInitSequenceNumber, int(int channel, short sequenceNumber)); - MOCK_METHOD2(GetPlayoutTimestamp, int(int channel, unsigned int& timestamp)); - MOCK_METHOD3(GetRtpRtcp, - int(int channel, - RtpRtcp** rtpRtcpModule, - RtpReceiver** rtp_receiver)); - - // VoEVolumeControl - MOCK_METHOD1(SetSpeakerVolume, int(unsigned int volume)); - MOCK_METHOD1(GetSpeakerVolume, int(unsigned int& volume)); - MOCK_METHOD1(SetMicVolume, int(unsigned int volume)); - MOCK_METHOD1(GetMicVolume, int(unsigned int& volume)); - MOCK_METHOD2(SetInputMute, int(int channel, bool enable)); - MOCK_METHOD2(GetInputMute, int(int channel, bool& enabled)); - MOCK_METHOD1(GetSpeechInputLevel, int(unsigned int& level)); - MOCK_METHOD2(GetSpeechOutputLevel, int(int channel, unsigned int& level)); - MOCK_METHOD1(GetSpeechInputLevelFullRange, int(unsigned int& level)); - MOCK_METHOD2(GetSpeechOutputLevelFullRange, - int(int channel, unsigned& level)); - MOCK_METHOD2(SetChannelOutputVolumeScaling, int(int channel, float scaling)); - MOCK_METHOD2(GetChannelOutputVolumeScaling, int(int channel, float& scaling)); - MOCK_METHOD3(SetOutputVolumePan, int(int channel, float left, float right)); - MOCK_METHOD3(GetOutputVolumePan, int(int channel, float& left, float& right)); - - private: - // TODO(ossu): I'm not particularly happy about keeping the decoder factory - // here, but due to how gmock is implemented, I cannot just keep it in the - // functor implementing the default version of ChannelProxyFactory, above. - // GMock creates an unfortunate copy of the functor, which would cause us to - // return a dangling reference. Fortunately, this should go away once - // voe::Channel does. - rtc::scoped_refptr decoder_factory_; - - MockAudioDeviceModule mock_audio_device_; - MockAudioProcessing mock_audio_processing_; - MockAudioTransport mock_audio_transport_; -}; -} // namespace test -} // namespace webrtc - -#endif // WEBRTC_AUDIO_MOCK_VOICE_ENGINE_H_ diff --git a/WebRtc.NET/include/webrtc/test/rtcp_packet_parser.h b/WebRtc.NET/include/webrtc/test/rtcp_packet_parser.h deleted file mode 100644 index ef1fab82..00000000 --- a/WebRtc.NET/include/webrtc/test/rtcp_packet_parser.h +++ /dev/null @@ -1,127 +0,0 @@ -/* - * Copyright (c) 2014 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - * - */ - -#ifndef WEBRTC_TEST_RTCP_PACKET_PARSER_H_ -#define WEBRTC_TEST_RTCP_PACKET_PARSER_H_ - -#include "webrtc/base/array_view.h" -#include "webrtc/base/checks.h" -#include "webrtc/modules/rtp_rtcp/source/rtcp_packet/app.h" -#include "webrtc/modules/rtp_rtcp/source/rtcp_packet/bye.h" -#include "webrtc/modules/rtp_rtcp/source/rtcp_packet/common_header.h" -#include "webrtc/modules/rtp_rtcp/source/rtcp_packet/extended_jitter_report.h" -#include "webrtc/modules/rtp_rtcp/source/rtcp_packet/extended_reports.h" -#include "webrtc/modules/rtp_rtcp/source/rtcp_packet/fir.h" -#include "webrtc/modules/rtp_rtcp/source/rtcp_packet/nack.h" -#include "webrtc/modules/rtp_rtcp/source/rtcp_packet/pli.h" -#include "webrtc/modules/rtp_rtcp/source/rtcp_packet/rapid_resync_request.h" -#include "webrtc/modules/rtp_rtcp/source/rtcp_packet/receiver_report.h" -#include "webrtc/modules/rtp_rtcp/source/rtcp_packet/remb.h" -#include "webrtc/modules/rtp_rtcp/source/rtcp_packet/rpsi.h" -#include "webrtc/modules/rtp_rtcp/source/rtcp_packet/sdes.h" -#include "webrtc/modules/rtp_rtcp/source/rtcp_packet/sender_report.h" -#include "webrtc/modules/rtp_rtcp/source/rtcp_packet/sli.h" -#include "webrtc/modules/rtp_rtcp/source/rtcp_packet/tmmbn.h" -#include "webrtc/modules/rtp_rtcp/source/rtcp_packet/tmmbr.h" -#include "webrtc/modules/rtp_rtcp/source/rtcp_packet/transport_feedback.h" - -namespace webrtc { -namespace test { -// Parse RTCP packet of given type. Assumes RTCP header is valid and that there -// is excatly one packet of correct type in the buffer. -template -bool ParseSinglePacket(const uint8_t* buffer, size_t size, Packet* packet) { - rtcp::CommonHeader header; - RTC_CHECK(header.Parse(buffer, size)); - RTC_CHECK_EQ(size, header.NextPacket() - buffer); - return packet->Parse(header); -} -// Same function, but takes raw buffer as single argument instead of pair. -template -bool ParseSinglePacket(rtc::ArrayView buffer, Packet* packet) { - return ParseSinglePacket(buffer.data(), buffer.size(), packet); -} - -class RtcpPacketParser { - public: - // Keeps last parsed packet, count number of parsed packets of given type. - template - class PacketCounter : public TypedRtcpPacket { - public: - int num_packets() const { return num_packets_; } - void Parse(const rtcp::CommonHeader& header) { - if (TypedRtcpPacket::Parse(header)) - ++num_packets_; - } - void Parse(const rtcp::CommonHeader& header, uint32_t* sender_ssrc) { - if (TypedRtcpPacket::Parse(header)) { - ++num_packets_; - if (*sender_ssrc == 0) // Use first sender ssrc in compound packet. - *sender_ssrc = TypedRtcpPacket::sender_ssrc(); - } - } - - private: - int num_packets_ = 0; - }; - - RtcpPacketParser(); - ~RtcpPacketParser(); - - bool Parse(const void* packet, size_t packet_len); - - PacketCounter* app() { return &app_; } - PacketCounter* bye() { return &bye_; } - PacketCounter* ij() { return &ij_; } - PacketCounter* xr() { return &xr_; } - PacketCounter* fir() { return &fir_; } - PacketCounter* nack() { return &nack_; } - PacketCounter* pli() { return &pli_; } - PacketCounter* rrr() { return &rrr_; } - PacketCounter* receiver_report() { - return &receiver_report_; - } - PacketCounter* remb() { return &remb_; } - PacketCounter* rpsi() { return &rpsi_; } - PacketCounter* sdes() { return &sdes_; } - PacketCounter* sender_report() { return &sender_report_; } - PacketCounter* sli() { return &sli_; } - PacketCounter* tmmbn() { return &tmmbn_; } - PacketCounter* tmmbr() { return &tmmbr_; } - PacketCounter* transport_feedback() { - return &transport_feedback_; - } - uint32_t sender_ssrc() const { return sender_ssrc_; } - - private: - PacketCounter app_; - PacketCounter bye_; - PacketCounter ij_; - PacketCounter xr_; - PacketCounter fir_; - PacketCounter nack_; - PacketCounter pli_; - PacketCounter rrr_; - PacketCounter receiver_report_; - PacketCounter remb_; - PacketCounter rpsi_; - PacketCounter sdes_; - PacketCounter sender_report_; - PacketCounter sli_; - PacketCounter tmmbn_; - PacketCounter tmmbr_; - PacketCounter transport_feedback_; - uint32_t sender_ssrc_ = 0; -}; - -} // namespace test -} // namespace webrtc -#endif // WEBRTC_TEST_RTCP_PACKET_PARSER_H_ diff --git a/WebRtc.NET/include/webrtc/test/rtp_rtcp_observer.h b/WebRtc.NET/include/webrtc/test/rtp_rtcp_observer.h deleted file mode 100644 index 63e97be4..00000000 --- a/WebRtc.NET/include/webrtc/test/rtp_rtcp_observer.h +++ /dev/null @@ -1,139 +0,0 @@ -/* - * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ -#ifndef WEBRTC_TEST_RTP_RTCP_OBSERVER_H_ -#define WEBRTC_TEST_RTP_RTCP_OBSERVER_H_ - -#include -#include -#include - -#include "webrtc/base/criticalsection.h" -#include "webrtc/base/event.h" -#include "webrtc/modules/rtp_rtcp/include/rtp_header_parser.h" -#include "webrtc/test/constants.h" -#include "webrtc/test/direct_transport.h" -#include "webrtc/test/gtest.h" -#include "webrtc/typedefs.h" -#include "webrtc/video_send_stream.h" - -namespace webrtc { -namespace test { - -class PacketTransport; - -class RtpRtcpObserver { - public: - enum Action { - SEND_PACKET, - DROP_PACKET, - }; - - virtual ~RtpRtcpObserver() {} - - virtual bool Wait() { return observation_complete_.Wait(timeout_ms_); } - - virtual Action OnSendRtp(const uint8_t* packet, size_t length) { - return SEND_PACKET; - } - - virtual Action OnSendRtcp(const uint8_t* packet, size_t length) { - return SEND_PACKET; - } - - virtual Action OnReceiveRtp(const uint8_t* packet, size_t length) { - return SEND_PACKET; - } - - virtual Action OnReceiveRtcp(const uint8_t* packet, size_t length) { - return SEND_PACKET; - } - - protected: - explicit RtpRtcpObserver(int event_timeout_ms) - : observation_complete_(false, false), - parser_(RtpHeaderParser::Create()), - timeout_ms_(event_timeout_ms) { - parser_->RegisterRtpHeaderExtension(kRtpExtensionTransmissionTimeOffset, - kTOffsetExtensionId); - parser_->RegisterRtpHeaderExtension(kRtpExtensionAbsoluteSendTime, - kAbsSendTimeExtensionId); - parser_->RegisterRtpHeaderExtension(kRtpExtensionTransportSequenceNumber, - kTransportSequenceNumberExtensionId); - } - - rtc::Event observation_complete_; - const std::unique_ptr parser_; - - private: - const int timeout_ms_; -}; - -class PacketTransport : public test::DirectTransport { - public: - enum TransportType { kReceiver, kSender }; - - PacketTransport(Call* send_call, - RtpRtcpObserver* observer, - TransportType transport_type, - const FakeNetworkPipe::Config& configuration) - : test::DirectTransport(configuration, send_call), - observer_(observer), - transport_type_(transport_type) {} - - private: - bool SendRtp(const uint8_t* packet, - size_t length, - const PacketOptions& options) override { - EXPECT_FALSE(RtpHeaderParser::IsRtcp(packet, length)); - RtpRtcpObserver::Action action; - { - if (transport_type_ == kSender) { - action = observer_->OnSendRtp(packet, length); - } else { - action = observer_->OnReceiveRtp(packet, length); - } - } - switch (action) { - case RtpRtcpObserver::DROP_PACKET: - // Drop packet silently. - return true; - case RtpRtcpObserver::SEND_PACKET: - return test::DirectTransport::SendRtp(packet, length, options); - } - return true; // Will never happen, makes compiler happy. - } - - bool SendRtcp(const uint8_t* packet, size_t length) override { - EXPECT_TRUE(RtpHeaderParser::IsRtcp(packet, length)); - RtpRtcpObserver::Action action; - { - if (transport_type_ == kSender) { - action = observer_->OnSendRtcp(packet, length); - } else { - action = observer_->OnReceiveRtcp(packet, length); - } - } - switch (action) { - case RtpRtcpObserver::DROP_PACKET: - // Drop packet silently. - return true; - case RtpRtcpObserver::SEND_PACKET: - return test::DirectTransport::SendRtcp(packet, length); - } - return true; // Will never happen, makes compiler happy. - } - - RtpRtcpObserver* const observer_; - TransportType transport_type_; -}; -} // namespace test -} // namespace webrtc - -#endif // WEBRTC_TEST_RTP_RTCP_OBSERVER_H_ diff --git a/WebRtc.NET/include/webrtc/test/run_loop.h b/WebRtc.NET/include/webrtc/test/run_loop.h deleted file mode 100644 index 238e2dc2..00000000 --- a/WebRtc.NET/include/webrtc/test/run_loop.h +++ /dev/null @@ -1,22 +0,0 @@ -/* - * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ -#ifndef WEBRTC_TEST_RUN_LOOP_H_ -#define WEBRTC_TEST_RUN_LOOP_H_ - -namespace webrtc { -namespace test { - -// Blocks until the user presses enter. -void PressEnterToContinue(); - -} // namespace test -} // namespace webrtc - -#endif // WEBRTC_TEST_RUN_LOOP_H_ diff --git a/WebRtc.NET/include/webrtc/test/statistics.h b/WebRtc.NET/include/webrtc/test/statistics.h deleted file mode 100644 index d4a111e0..00000000 --- a/WebRtc.NET/include/webrtc/test/statistics.h +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ -#ifndef WEBRTC_TEST_STATISTICS_H_ -#define WEBRTC_TEST_STATISTICS_H_ - -#include "webrtc/typedefs.h" - -namespace webrtc { -namespace test { - -class Statistics { - public: - Statistics(); - - void AddSample(double sample); - - double Mean() const; - double Variance() const; - double StandardDeviation() const; - - private: - double sum_; - double sum_squared_; - uint64_t count_; -}; -} // namespace test -} // namespace webrtc - -#endif // WEBRTC_TEST_STATISTICS_H_ diff --git a/WebRtc.NET/include/webrtc/test/testsupport/fileutils.h b/WebRtc.NET/include/webrtc/test/testsupport/fileutils.h deleted file mode 100644 index 2467f0c8..00000000 --- a/WebRtc.NET/include/webrtc/test/testsupport/fileutils.h +++ /dev/null @@ -1,91 +0,0 @@ -/* - * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#include - -#ifndef WEBRTC_TEST_TESTSUPPORT_FILEUTILS_H_ -#define WEBRTC_TEST_TESTSUPPORT_FILEUTILS_H_ - -#include - -namespace webrtc { -namespace test { - -// This is the "directory" returned if the ProjectPath() function fails -// to find the project root. -extern const char* kCannotFindProjectRootDir; - -// Creates and returns the absolute path to the output directory where log files -// and other test artifacts should be put. The output directory is generally a -// directory named "out" at the top-level of the project, i.e. a subfolder to -// the path returned by ProjectRootPath(). The exception is Android where we use -// /sdcard/ instead. -// -// If symbolic links occur in the path they will be resolved and the actual -// directory will be returned. -// -// Returns the path WITH a trailing path delimiter. If the project root is not -// found, the current working directory ("./") is returned as a fallback. -std::string OutputPath(); - -// Generates an empty file with a unique name in the specified directory and -// returns the file name and path. -std::string TempFilename(const std::string &dir, const std::string &prefix); - -// Returns a path to a resource file for the currently executing platform. -// Adapts to what filenames are currently present in the -// [project-root]/resources/ dir. -// Returns an absolute path according to this priority list (the directory -// part of the path is left out for readability): -// 1. [name]_[platform]_[architecture].[extension] -// 2. [name]_[platform].[extension] -// 3. [name]_[architecture].[extension] -// 4. [name].[extension] -// Where -// * platform is either of "win", "mac" or "linux". -// * architecture is either of "32" or "64". -// -// Arguments: -// name - Name of the resource file. If a plain filename (no directory path) -// is supplied, the file is assumed to be located in resources/ -// If a directory path is prepended to the filename, a subdirectory -// hierarchy reflecting that path is assumed to be present. -// extension - File extension, without the dot, i.e. "bmp" or "yuv". -std::string ResourcePath(std::string name, std::string extension); - -// Gets the current working directory for the executing program. -// Returns "./" if for some reason it is not possible to find the working -// directory. -std::string WorkingDir(); - -// Creates a directory if it not already exists. -// Returns true if successful. Will print an error message to stderr and return -// false if a file with the same name already exists. -bool CreateDir(std::string directory_name); - -// Checks if a file exists. -bool FileExists(std::string& file_name); - -// File size of the supplied file in bytes. Will return 0 if the file is -// empty or if the file does not exist/is readable. -size_t GetFileSize(std::string filename); - -// Sets the executable path, i.e. the path to the executable that is being used -// when launching it. This is usually the path relative to the working directory -// but can also be an absolute path. The intention with this function is to pass -// the argv[0] being sent into the main function to make it possible for -// fileutils.h to find the correct project paths even when the working directory -// is outside the project tree (which happens in some cases). -void SetExecutablePath(const std::string& path_to_executable); - -} // namespace test -} // namespace webrtc - -#endif // WEBRTC_TEST_TESTSUPPORT_FILEUTILS_H_ diff --git a/WebRtc.NET/include/webrtc/test/testsupport/frame_writer.h b/WebRtc.NET/include/webrtc/test/testsupport/frame_writer.h deleted file mode 100644 index 8a6b1c21..00000000 --- a/WebRtc.NET/include/webrtc/test/testsupport/frame_writer.h +++ /dev/null @@ -1,70 +0,0 @@ -/* - * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_TEST_TESTSUPPORT_FRAME_WRITER_H_ -#define WEBRTC_TEST_TESTSUPPORT_FRAME_WRITER_H_ - -#include - -#include - -#include "webrtc/typedefs.h" - -namespace webrtc { -namespace test { - -// Handles writing of video files. -class FrameWriter { - public: - virtual ~FrameWriter() {} - - // Initializes the file handler, i.e. opens the input and output files etc. - // This must be called before reading or writing frames has started. - // Returns false if an error has occurred, in addition to printing to stderr. - virtual bool Init() = 0; - - // Writes a frame of the configured frame length to the output file. - // Returns true if the write was successful, false otherwise. - virtual bool WriteFrame(uint8_t* frame_buffer) = 0; - - // Closes the output file if open. Essentially makes this class impossible - // to use anymore. Will also be invoked by the destructor. - virtual void Close() = 0; - - // Frame length in bytes of a single frame image. - virtual size_t FrameLength() = 0; -}; - -class FrameWriterImpl : public FrameWriter { - public: - // Creates a file handler. The input file is assumed to exist and be readable - // and the output file must be writable. - // Parameters: - // output_filename The file to write. Will be overwritten if already - // existing. - // frame_length_in_bytes The size of each frame. - // For YUV: 3*width*height/2 - FrameWriterImpl(std::string output_filename, size_t frame_length_in_bytes); - ~FrameWriterImpl() override; - bool Init() override; - bool WriteFrame(uint8_t* frame_buffer) override; - void Close() override; - size_t FrameLength() override; - - private: - std::string output_filename_; - size_t frame_length_in_bytes_; - FILE* output_file_; -}; - -} // namespace test -} // namespace webrtc - -#endif // WEBRTC_TEST_TESTSUPPORT_FRAME_WRITER_H_ diff --git a/WebRtc.NET/include/webrtc/test/testsupport/isolated_output.h b/WebRtc.NET/include/webrtc/test/testsupport/isolated_output.h deleted file mode 100644 index f4e96951..00000000 --- a/WebRtc.NET/include/webrtc/test/testsupport/isolated_output.h +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_TEST_TESTSUPPORT_ISOLATED_OUTPUT_H_ -#define WEBRTC_TEST_TESTSUPPORT_ISOLATED_OUTPUT_H_ - -#include - -#include - -namespace webrtc { -namespace test { - -// Writes a |length| bytes array |buffer| to |filename| in isolated output -// directory defined by swarming. If the file is existing, content will be -// appended. Otherwise a new file will be created. This function returns false -// if isolated output directory has not been defined, or |filename| indicates an -// invalid or non-writable file, or underlying file system errors. -bool WriteIsolatedOutput(const char* filename, - const uint8_t* buffer, - size_t length); - -bool WriteIsolatedOutput(const char* filename, const std::string& content); - -} // namespace test -} // namespace webrtc - -#endif // WEBRTC_TEST_TESTSUPPORT_ISOLATED_OUTPUT_H_ diff --git a/WebRtc.NET/include/webrtc/test/testsupport/metrics/video_metrics.h b/WebRtc.NET/include/webrtc/test/testsupport/metrics/video_metrics.h deleted file mode 100644 index 8448ccfd..00000000 --- a/WebRtc.NET/include/webrtc/test/testsupport/metrics/video_metrics.h +++ /dev/null @@ -1,121 +0,0 @@ -/* - * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_TESTSUPPORT_METRICS_VIDEO_METRICS_H_ -#define WEBRTC_TESTSUPPORT_METRICS_VIDEO_METRICS_H_ - -#include -#include - -namespace webrtc { -namespace test { - -// The highest PSNR value our algorithms will return. -extern double kMetricsPerfectPSNR; - -// Contains video quality metrics result for a single frame. -struct FrameResult { - int frame_number; - double value; -}; - -// Result from a PSNR/SSIM calculation operation. -// The frames in this data structure are 0-indexed. -struct QualityMetricsResult { - QualityMetricsResult() : - average(0.0), - min(std::numeric_limits::max()), - max(std::numeric_limits::min()), - min_frame_number(-1), - max_frame_number(-1) - {}; - double average; - double min; - double max; - int min_frame_number; - int max_frame_number; - std::vector frames; -}; - -// Calculates PSNR and SSIM values for the reference and test video files -// (must be in I420 format). All calculated values are filled into the -// QualityMetricsResult structs. -// -// PSNR values have the unit decibel (dB) where a high value means the test file -// is similar to the reference file. The higher value, the more similar. The -// maximum PSNR value is kMetricsInfinitePSNR. For more info about PSNR, see -// http://en.wikipedia.org/wiki/PSNR. -// -// SSIM values range between -1.0 and 1.0, where 1.0 means the files are -// identical. For more info about SSIM, see http://en.wikipedia.org/wiki/SSIM -// This function only compares video frames up to the point when the shortest -// video ends. -// Return value: -// 0 if successful, negative on errors: -// -1 if the source file cannot be opened -// -2 if the test file cannot be opened -// -3 if any of the files are empty -// -4 if any arguments are invalid. -int I420MetricsFromFiles(const char* ref_filename, - const char* test_filename, - int width, - int height, - QualityMetricsResult* psnr_result, - QualityMetricsResult* ssim_result); - -// Calculates PSNR values for the reference and test video files (must be in -// I420 format). All calculated values are filled into the QualityMetricsResult -// struct. -// -// PSNR values have the unit decibel (dB) where a high value means the test file -// is similar to the reference file. The higher value, the more similar. The -// maximum PSNR value is kMetricsInfinitePSNR. For more info about PSNR, see -// http://en.wikipedia.org/wiki/PSNR. -// -// This function only compares video frames up to the point when the shortest -// video ends. -// -// Return value: -// 0 if successful, negative on errors: -// -1 if the source file cannot be opened -// -2 if the test file cannot be opened -// -3 if any of the files are empty -// -4 if any arguments are invalid. -int I420PSNRFromFiles(const char* ref_filename, - const char* test_filename, - int width, - int height, - QualityMetricsResult* result); - -// Calculates SSIM values for the reference and test video files (must be in -// I420 format). All calculated values are filled into the QualityMetricsResult -// struct. -// SSIM values range between -1.0 and 1.0, where 1.0 means the files are -// identical. -// This function only compares video frames up to the point when the shortest -// video ends. -// For more info about SSIM, see http://en.wikipedia.org/wiki/SSIM -// -// Return value: -// 0 if successful, negative on errors: -// -1 if the source file cannot be opened -// -2 if the test file cannot be opened -// -3 if any of the files are empty -// -4 if any arguments are invalid. -int I420SSIMFromFiles(const char* ref_filename, - const char* test_filename, - int width, - int height, - QualityMetricsResult* result); - -} // namespace test -} // namespace webrtc - -#endif // WEBRTC_TESTSUPPORT_METRICS_VIDEO_METRICS_H_ diff --git a/WebRtc.NET/include/webrtc/test/testsupport/mock/mock_frame_reader.h b/WebRtc.NET/include/webrtc/test/testsupport/mock/mock_frame_reader.h deleted file mode 100644 index 5fd28737..00000000 --- a/WebRtc.NET/include/webrtc/test/testsupport/mock/mock_frame_reader.h +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_TEST_TESTSUPPORT_MOCK_MOCK_FRAME_READER_H_ -#define WEBRTC_TEST_TESTSUPPORT_MOCK_MOCK_FRAME_READER_H_ - -#include "webrtc/test/testsupport/frame_reader.h" - -#include "webrtc/test/gmock.h" - -namespace webrtc { -namespace test { - -class MockFrameReader : public FrameReader { - public: - MOCK_METHOD0(Init, bool()); - MOCK_METHOD0(ReadFrame, rtc::scoped_refptr()); - MOCK_METHOD0(Close, void()); - MOCK_METHOD0(FrameLength, size_t()); - MOCK_METHOD0(NumberOfFrames, int()); -}; - -} // namespace test -} // namespace webrtc - -#endif // WEBRTC_TEST_TESTSUPPORT_MOCK_MOCK_FRAME_READER_H_ diff --git a/WebRtc.NET/include/webrtc/test/testsupport/mock/mock_frame_writer.h b/WebRtc.NET/include/webrtc/test/testsupport/mock/mock_frame_writer.h deleted file mode 100644 index 8ba96bcf..00000000 --- a/WebRtc.NET/include/webrtc/test/testsupport/mock/mock_frame_writer.h +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_TEST_TESTSUPPORT_MOCK_MOCK_FRAME_WRITER_H_ -#define WEBRTC_TEST_TESTSUPPORT_MOCK_MOCK_FRAME_WRITER_H_ - -#include "webrtc/test/testsupport/frame_writer.h" - -#include "webrtc/test/gmock.h" - -namespace webrtc { -namespace test { - -class MockFrameWriter : public FrameWriter { - public: - MOCK_METHOD0(Init, bool()); - MOCK_METHOD1(WriteFrame, bool(uint8_t* frame_buffer)); - MOCK_METHOD0(Close, void()); - MOCK_METHOD0(FrameLength, size_t()); -}; - -} // namespace test -} // namespace webrtc - -#endif // WEBRTC_TEST_TESTSUPPORT_MOCK_MOCK_FRAME_WRITER_H_ diff --git a/WebRtc.NET/include/webrtc/test/testsupport/packet_reader.h b/WebRtc.NET/include/webrtc/test/testsupport/packet_reader.h deleted file mode 100644 index b58db4d0..00000000 --- a/WebRtc.NET/include/webrtc/test/testsupport/packet_reader.h +++ /dev/null @@ -1,54 +0,0 @@ -/* - * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_TEST_TESTSUPPORT_PACKET_READER_H_ -#define WEBRTC_TEST_TESTSUPPORT_PACKET_READER_H_ - -#include -#include "webrtc/typedefs.h" - -namespace webrtc { -namespace test { - -// Reads chunks of data to simulate network packets from a byte array. -class PacketReader { - public: - PacketReader(); - virtual ~PacketReader(); - - // Inizializes a new reading operation. Must be done before invoking the - // NextPacket method. - // * data_length_in_bytes is the length of the data byte array. - // 0 length will result in no packets are read. - // * packet_size_in_bytes is the number of bytes to read in each NextPacket - // method call. Must be > 0 - virtual void InitializeReading(uint8_t* data, size_t data_length_in_bytes, - size_t packet_size_in_bytes); - - // Moves the supplied pointer to the beginning of the next packet. - // Returns: - // * The size of the packet ready to read (lower than the packet size for - // the last packet) - // * 0 if there are no more packets to read - // * -1 if InitializeReading has not been called (also prints to stderr). - virtual int NextPacket(uint8_t** packet_pointer); - - private: - uint8_t* data_; - size_t data_length_; - size_t packet_size_; - size_t currentIndex_; - bool initialized_; -}; - -} // namespace test -} // namespace webrtc - -#endif // WEBRTC_TEST_TESTSUPPORT_PACKET_READER_H_ diff --git a/WebRtc.NET/include/webrtc/test/testsupport/perf_test.h b/WebRtc.NET/include/webrtc/test/testsupport/perf_test.h deleted file mode 100644 index 6e49ac90..00000000 --- a/WebRtc.NET/include/webrtc/test/testsupport/perf_test.h +++ /dev/null @@ -1,140 +0,0 @@ -/* - * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -// A stripped-down version of Chromium's chrome/test/perf/perf_test.h. -// Several functions have been removed; the prototypes of the remainder have -// not been changed. - -#ifndef WEBRTC_TEST_TESTSUPPORT_PERF_TEST_H_ -#define WEBRTC_TEST_TESTSUPPORT_PERF_TEST_H_ - -#include -#include - -namespace webrtc { -namespace test { - -// Prints numerical information to stdout in a controlled format, for -// post-processing. |measurement| is a description of the quantity being -// measured, e.g. "vm_peak"; |modifier| is provided as a convenience and -// will be appended directly to the name of the |measurement|, e.g. -// "_browser"; |trace| is a description of the particular data point, e.g. -// "reference"; |value| is the measured value; and |units| is a description -// of the units of measure, e.g. "bytes". If |important| is true, the output -// line will be specially marked, to notify the post-processor. The strings -// may be empty. They should not contain any colons (:) or equals signs (=). -// A typical post-processing step would be to produce graphs of the data -// produced for various builds, using the combined |measurement| + |modifier| -// string to specify a particular graph and the |trace| to identify a trace -// (i.e., data series) on that graph. -void PrintResult(const std::string& measurement, - const std::string& modifier, - const std::string& trace, - size_t value, - const std::string& units, - bool important); - -void AppendResult(std::string& output, - const std::string& measurement, - const std::string& modifier, - const std::string& trace, - size_t value, - const std::string& units, - bool important); - -// Like the above version of PrintResult(), but takes a std::string value -// instead of a size_t. -void PrintResult(const std::string& measurement, - const std::string& modifier, - const std::string& trace, - const std::string& value, - const std::string& units, - bool important); - -void AppendResult(std::string& output, - const std::string& measurement, - const std::string& modifier, - const std::string& trace, - const std::string& value, - const std::string& units, - bool important); - -// Like PrintResult(), but prints a (mean, standard deviation) result pair. -// The || should be two comma-separated numbers, the mean and -// standard deviation (or other error metric) of the measurement. -void PrintResultMeanAndError(const std::string& measurement, - const std::string& modifier, - const std::string& trace, - const std::string& mean_and_error, - const std::string& units, - bool important); - -void AppendResultMeanAndError(std::string& output, - const std::string& measurement, - const std::string& modifier, - const std::string& trace, - const std::string& mean_and_error, - const std::string& units, - bool important); - -// Like PrintResult(), but prints an entire list of results. The |values| -// will generally be a list of comma-separated numbers. A typical -// post-processing step might produce plots of their mean and standard -// deviation. -void PrintResultList(const std::string& measurement, - const std::string& modifier, - const std::string& trace, - const std::string& values, - const std::string& units, - bool important); - -void AppendResultList(std::string& output, - const std::string& measurement, - const std::string& modifier, - const std::string& trace, - const std::string& values, - const std::string& units, - bool important); - -// Prints memory commit charge stats for use by perf graphs. -void PrintSystemCommitCharge(const std::string& test_name, - size_t charge, - bool important); - -void PrintSystemCommitCharge(FILE* target, - const std::string& test_name, - size_t charge, - bool important); - -std::string SystemCommitChargeToString(const std::string& test_name, - size_t charge, - bool important); - -// Converts list of values into comma-separated string for PrintResultList. -template -std::string ValuesToString(const Container& container) { - if (container.empty()) - return ""; - - std::stringstream ss; - auto it = container.begin(); - while (true) { - ss << *it; - if (++it == container.end()) - break; - ss << ','; - } - return ss.str(); -} - -} // namespace test -} // namespace webrtc - -#endif // WEBRTC_TEST_TESTSUPPORT_PERF_TEST_H_ diff --git a/WebRtc.NET/include/webrtc/test/testsupport/trace_to_stderr.h b/WebRtc.NET/include/webrtc/test/testsupport/trace_to_stderr.h deleted file mode 100644 index a713b798..00000000 --- a/WebRtc.NET/include/webrtc/test/testsupport/trace_to_stderr.h +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_TEST_TEST_SUPPORT_TRACE_TO_STDERR_H_ -#define WEBRTC_TEST_TEST_SUPPORT_TRACE_TO_STDERR_H_ - -#include "webrtc/system_wrappers/include/trace.h" - -namespace webrtc { -namespace test { - -// Upon constructing an instance of this class, all traces will be redirected -// to stderr. At destruction, redirection is halted. -class TraceToStderr : public TraceCallback { - public: - TraceToStderr(); - // Set |override_time| to true to control the time printed with each trace - // through SetTimeSeconds(). Otherwise, the trace's usual wallclock time is - // used. - // - // This is useful for offline test tools, where the file time is much more - // informative than the real time. - explicit TraceToStderr(bool override_time); - ~TraceToStderr() override; - - // Every subsequent trace printout will use |time|. Has no effect if - // |override_time| in the constructor was set to false. - // - // No attempt is made to ensure thread-safety between the trace writing and - // time updating. In tests, since traces will normally be triggered by the - // main thread doing the time updating, this should be of no concern. - virtual void SetTimeSeconds(float time); - - // Implements TraceCallback. - void Print(TraceLevel level, const char* msg_array, int length) override; - - private: - bool override_time_; - float time_seconds_; -}; - -} // namespace test -} // namespace webrtc - -#endif // WEBRTC_TEST_TEST_SUPPORT_TRACE_TO_STDERR_H_ diff --git a/WebRtc.NET/include/webrtc/test/testsupport/unittest_utils.h b/WebRtc.NET/include/webrtc/test/testsupport/unittest_utils.h deleted file mode 100644 index ba6db988..00000000 --- a/WebRtc.NET/include/webrtc/test/testsupport/unittest_utils.h +++ /dev/null @@ -1,56 +0,0 @@ -/* - * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_TEST_TESTSUPPORT_UNITTEST_UTILS_H_ -#define WEBRTC_TEST_TESTSUPPORT_UNITTEST_UTILS_H_ - -namespace webrtc { -namespace test { - -const size_t kPacketSizeInBytes = 1500; -const size_t kPacketDataLength = kPacketSizeInBytes * 2 + 1; -const int kPacketDataNumberOfPackets = 3; - -// A base test fixture for packet related tests. Contains -// two full prepared packets with 1s, 2s in their data and a third packet with -// a single 3 in it (size=1). -// A packet data structure is also available, that contains these three packets -// in order. -class PacketRelatedTest: public testing::Test { - protected: - // Tree packet byte arrays with data used for verification: - uint8_t packet1_[kPacketSizeInBytes]; - uint8_t packet2_[kPacketSizeInBytes]; - uint8_t packet3_[1]; - // Construct a data structure containing these packets - uint8_t packet_data_[kPacketDataLength]; - uint8_t* packet_data_pointer_; - - PacketRelatedTest() { - packet_data_pointer_ = packet_data_; - - memset(packet1_, 1, kPacketSizeInBytes); - memset(packet2_, 2, kPacketSizeInBytes); - memset(packet3_, 3, 1); - // Fill the packet_data: - memcpy(packet_data_pointer_, packet1_, kPacketSizeInBytes); - memcpy(packet_data_pointer_ + kPacketSizeInBytes, packet2_, - kPacketSizeInBytes); - memcpy(packet_data_pointer_ + kPacketSizeInBytes * 2, packet3_, 1); - } - virtual ~PacketRelatedTest() {} - void SetUp() {} - void TearDown() {} -}; - -} // namespace test -} // namespace webrtc - -#endif // WEBRTC_TEST_TESTSUPPORT_UNITTEST_UTILS_H_ diff --git a/WebRtc.NET/include/webrtc/test/vcm_capturer.h b/WebRtc.NET/include/webrtc/test/vcm_capturer.h deleted file mode 100644 index c4dae655..00000000 --- a/WebRtc.NET/include/webrtc/test/vcm_capturer.h +++ /dev/null @@ -1,53 +0,0 @@ -/* - * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ -#ifndef WEBRTC_TEST_VCM_CAPTURER_H_ -#define WEBRTC_TEST_VCM_CAPTURER_H_ - -#include "webrtc/base/criticalsection.h" -#include "webrtc/base/scoped_ref_ptr.h" -#include "webrtc/common_types.h" -#include "webrtc/common_video/libyuv/include/webrtc_libyuv.h" -#include "webrtc/modules/video_capture/video_capture.h" -#include "webrtc/test/video_capturer.h" - -namespace webrtc { -namespace test { - -class VcmCapturer - : public VideoCapturer, - public rtc::VideoSinkInterface { - public: - static VcmCapturer* Create(size_t width, size_t height, size_t target_fps); - virtual ~VcmCapturer(); - - void Start() override; - void Stop() override; - void AddOrUpdateSink(rtc::VideoSinkInterface* sink, - const rtc::VideoSinkWants& wants) override; - void RemoveSink(rtc::VideoSinkInterface* sink) override; - - void OnFrame(const VideoFrame& frame) override; - - private: - VcmCapturer(); - bool Init(size_t width, size_t height, size_t target_fps); - void Destroy(); - - rtc::CriticalSection crit_; - bool started_ GUARDED_BY(crit_); - rtc::VideoSinkInterface* sink_ GUARDED_BY(crit_); - rtc::scoped_refptr vcm_; - VideoCaptureCapability capability_; -}; - -} // test -} // webrtc - -#endif // WEBRTC_TEST_VCM_CAPTURER_H_ diff --git a/WebRtc.NET/include/webrtc/test/video_capturer.h b/WebRtc.NET/include/webrtc/test/video_capturer.h deleted file mode 100644 index 111f9866..00000000 --- a/WebRtc.NET/include/webrtc/test/video_capturer.h +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ -#ifndef WEBRTC_TEST_VIDEO_CAPTURER_H_ -#define WEBRTC_TEST_VIDEO_CAPTURER_H_ - -#include - -#include "webrtc/api/video/video_frame.h" -#include "webrtc/media/base/videosourceinterface.h" - -namespace webrtc { - -class Clock; - -namespace test { - -class VideoCapturer : public rtc::VideoSourceInterface { - public: - virtual ~VideoCapturer() {} - - virtual void Start() = 0; - virtual void Stop() = 0; -}; -} // test -} // webrtc - -#endif // WEBRTC_TEST_VIDEO_CAPTURER_H_ diff --git a/WebRtc.NET/include/webrtc/test/video_renderer.h b/WebRtc.NET/include/webrtc/test/video_renderer.h deleted file mode 100644 index 49d2fa3d..00000000 --- a/WebRtc.NET/include/webrtc/test/video_renderer.h +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ -#ifndef WEBRTC_TEST_VIDEO_RENDERER_H_ -#define WEBRTC_TEST_VIDEO_RENDERER_H_ - -#include - -#include "webrtc/media/base/videosinkinterface.h" - -namespace webrtc { -class VideoFrame; - -namespace test { -class VideoRenderer : public rtc::VideoSinkInterface { - public: - // Creates a platform-specific renderer if possible, or a null implementation - // if failing. - static VideoRenderer* Create(const char* window_title, size_t width, - size_t height); - // Returns a renderer rendering to a platform specific window if possible, - // NULL if none can be created. - // Creates a platform-specific renderer if possible, returns NULL if a - // platform renderer could not be created. This occurs, for instance, when - // running without an X environment on Linux. - static VideoRenderer* CreatePlatformRenderer(const char* window_title, - size_t width, size_t height); - virtual ~VideoRenderer() {} - protected: - VideoRenderer() {} -}; -} // namespace test -} // namespace webrtc - -#endif // WEBRTC_TEST_VIDEO_RENDERER_H_ diff --git a/WebRtc.NET/include/webrtc/test/win/d3d_renderer.h b/WebRtc.NET/include/webrtc/test/win/d3d_renderer.h deleted file mode 100644 index 575d9c7f..00000000 --- a/WebRtc.NET/include/webrtc/test/win/d3d_renderer.h +++ /dev/null @@ -1,53 +0,0 @@ -/* - * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ -#ifndef WEBRTC_TEST_WIN_D3D_RENDERER_H_ -#define WEBRTC_TEST_WIN_D3D_RENDERER_H_ - -#include -#include -#pragma comment(lib, "d3d9.lib") // located in DirectX SDK - -#include "webrtc/base/scoped_ref_ptr.h" -#include "webrtc/test/video_renderer.h" -#include "webrtc/typedefs.h" - -namespace webrtc { -namespace test { - -class D3dRenderer : public VideoRenderer { - public: - static D3dRenderer* Create(const char* window_title, size_t width, - size_t height); - virtual ~D3dRenderer(); - - void OnFrame(const webrtc::VideoFrame& frame) override; - - private: - D3dRenderer(size_t width, size_t height); - - static LRESULT WINAPI WindowProc(HWND hwnd, UINT msg, WPARAM wparam, - LPARAM lparam); - bool Init(const char* window_title); - void Resize(size_t width, size_t height); - void Destroy(); - - size_t width_, height_; - - HWND hwnd_; - rtc::scoped_refptr d3d_; - rtc::scoped_refptr d3d_device_; - - rtc::scoped_refptr texture_; - rtc::scoped_refptr vertex_buffer_; -}; -} // namespace test -} // namespace webrtc - -#endif // WEBRTC_TEST_WIN_D3D_RENDERER_H_ diff --git a/WebRtc.NET/include/webrtc/tools/converter/converter.h b/WebRtc.NET/include/webrtc/tools/converter/converter.h deleted file mode 100644 index f7641ff6..00000000 --- a/WebRtc.NET/include/webrtc/tools/converter/converter.h +++ /dev/null @@ -1,109 +0,0 @@ -/* - * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_TOOLS_CONVERTER_CONVERTER_H_ -#define WEBRTC_TOOLS_CONVERTER_CONVERTER_H_ - -#include - -#include "libyuv/compare.h" // NOLINT -#include "libyuv/convert.h" // NOLINT - -namespace webrtc { -namespace test { - -// Handles a conversion between a set of RGBA frames to a YUV (I420) video. -class Converter { - public: - Converter(int width, int height); - - // Converts RGBA to YUV video. If the delete_frames argument is true, the - // method will delete the input frames after conversion. - bool ConvertRGBAToI420Video(std::string frames_dir, - std::string output_file_name, bool delete_frames); - - private: - int width_; // Width of the video (respectively of the RGBA frames). - int height_; // Height of the video (respectively of the RGBA frames). - - // Returns the size of the Y plane in bytes. - int YPlaneSize() const { - return width_*height_; - } - - // Returns the size of the U plane in bytes. - int UPlaneSize() const { - return ((width_+1)/2)*((height_)/2); - } - - // Returns the size of the V plane in bytes. - int VPlaneSize() const { - return ((width_+1)/2)*((height_)/2); - } - - // Returns the number of bytes per row in the RGBA frame. - int SrcStrideFrame() const { - return width_*4; - } - - // Returns the number of bytes in the Y plane. - int DstStrideY() const { - return width_; - } - - // Returns the number of bytes in the U plane. - int DstStrideU() const { - return (width_+1)/2; - } - - // Returns the number of bytes in the V plane. - int DstStrideV() const { - return (width_+1)/2; - } - - // Returns the size in bytes of the input RGBA frames. - int InputFrameSize() const { - return width_*height_*4; - } - - // Writes the Y, U and V (in this order) planes to the file, thus adding a - // raw YUV frame to the file. - bool AddYUVToFile(uint8_t* y_plane, - int y_plane_size, - uint8_t* u_plane, - int u_plane_size, - uint8_t* v_plane, - int v_plane_size, - FILE* output_file); - - // Adds the Y, U or V plane to the file. - bool AddYUVPlaneToFile(uint8_t* yuv_plane, int yuv_plane_size, FILE* file); - - // Reads a RGBA frame from input_file_name with input_frame_size size in bytes - // into the buffer. - bool ReadRGBAFrame(const char* input_file_name, int input_frame_size, - unsigned char* buffer); - - // Finds the full path name of the file - concatenates the directory and file - // names. - std::string FindFullFileName(std::string dir_name, std::string file_name); - - // Checks if a file exists. - bool FileExists(std::string file_name_to_check); - - // Returns the name of the file in the form frame_, where is - // 4 zero padded (i.e. frame_0000, frame_0001, etc.). - std::string FormFrameName(int width, int number); -}; - -} // namespace test -} // namespace webrtc - -#endif // WEBRTC_TOOLS_CONVERTER_CONVERTER_H_ diff --git a/WebRtc.NET/include/webrtc/tools/event_log_visualizer/analyzer.h b/WebRtc.NET/include/webrtc/tools/event_log_visualizer/analyzer.h deleted file mode 100644 index 1a82dcca..00000000 --- a/WebRtc.NET/include/webrtc/tools/event_log_visualizer/analyzer.h +++ /dev/null @@ -1,172 +0,0 @@ -/* - * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_TOOLS_EVENT_LOG_VISUALIZER_ANALYZER_H_ -#define WEBRTC_TOOLS_EVENT_LOG_VISUALIZER_ANALYZER_H_ - -#include -#include -#include -#include -#include -#include - -#include "webrtc/logging/rtc_event_log/rtc_event_log_parser.h" -#include "webrtc/modules/rtp_rtcp/include/rtp_rtcp_defines.h" -#include "webrtc/modules/rtp_rtcp/source/rtcp_packet.h" -#include "webrtc/tools/event_log_visualizer/plot_base.h" - -namespace webrtc { -namespace plotting { - -struct LoggedRtpPacket { - LoggedRtpPacket(uint64_t timestamp, RTPHeader header, size_t total_length) - : timestamp(timestamp), header(header), total_length(total_length) {} - uint64_t timestamp; - // TODO(terelius): This allocates space for 15 CSRCs even if none are used. - RTPHeader header; - size_t total_length; -}; - -struct LoggedRtcpPacket { - LoggedRtcpPacket(uint64_t timestamp, - RTCPPacketType rtcp_type, - std::unique_ptr rtcp_packet) - : timestamp(timestamp), type(rtcp_type), packet(std::move(rtcp_packet)) {} - uint64_t timestamp; - RTCPPacketType type; - std::unique_ptr packet; -}; - -struct BwePacketLossEvent { - uint64_t timestamp; - int32_t new_bitrate; - uint8_t fraction_loss; - int32_t expected_packets; -}; - -class EventLogAnalyzer { - public: - // The EventLogAnalyzer keeps a reference to the ParsedRtcEventLog for the - // duration of its lifetime. The ParsedRtcEventLog must not be destroyed or - // modified while the EventLogAnalyzer is being used. - explicit EventLogAnalyzer(const ParsedRtcEventLog& log); - - void CreatePacketGraph(PacketDirection desired_direction, Plot* plot); - - void CreateAccumulatedPacketsGraph(PacketDirection desired_direction, - Plot* plot); - - void CreatePlayoutGraph(Plot* plot); - - void CreateAudioLevelGraph(Plot* plot); - - void CreateSequenceNumberGraph(Plot* plot); - - void CreateIncomingPacketLossGraph(Plot* plot); - - void CreateDelayChangeGraph(Plot* plot); - - void CreateAccumulatedDelayChangeGraph(Plot* plot); - - void CreateFractionLossGraph(Plot* plot); - - void CreateTotalBitrateGraph(PacketDirection desired_direction, Plot* plot); - - void CreateStreamBitrateGraph(PacketDirection desired_direction, Plot* plot); - - void CreateBweSimulationGraph(Plot* plot); - - void CreateNetworkDelayFeedbackGraph(Plot* plot); - - // Returns a vector of capture and arrival timestamps for the video frames - // of the stream with the most number of frames. - std::vector> GetFrameTimestamps() const; - - private: - class StreamId { - public: - StreamId(uint32_t ssrc, webrtc::PacketDirection direction) - : ssrc_(ssrc), direction_(direction) {} - bool operator<(const StreamId& other) const { - return std::tie(ssrc_, direction_) < - std::tie(other.ssrc_, other.direction_); - } - bool operator==(const StreamId& other) const { - return std::tie(ssrc_, direction_) == - std::tie(other.ssrc_, other.direction_); - } - uint32_t GetSsrc() const { return ssrc_; } - webrtc::PacketDirection GetDirection() const { return direction_; } - - private: - uint32_t ssrc_; - webrtc::PacketDirection direction_; - }; - - template - void CreateAccumulatedPacketsTimeSeries( - PacketDirection desired_direction, - Plot* plot, - const std::map>& packets, - const std::string& label_prefix); - - bool IsRtxSsrc(StreamId stream_id) const; - - bool IsVideoSsrc(StreamId stream_id) const; - - bool IsAudioSsrc(StreamId stream_id) const; - - std::string GetStreamName(StreamId) const; - - const ParsedRtcEventLog& parsed_log_; - - // A list of SSRCs we are interested in analysing. - // If left empty, all SSRCs will be considered relevant. - std::vector desired_ssrc_; - - // Tracks what each stream is configured for. Note that a single SSRC can be - // in several sets. For example, the SSRC used for sending video over RTX - // will appear in both video_ssrcs_ and rtx_ssrcs_. In the unlikely case that - // an SSRC is reconfigured to a different media type mid-call, it will also - // appear in multiple sets. - std::set rtx_ssrcs_; - std::set video_ssrcs_; - std::set audio_ssrcs_; - - // Maps a stream identifier consisting of ssrc and direction to the parsed - // RTP headers in that stream. Header extensions are parsed if the stream - // has been configured. - std::map> rtp_packets_; - - std::map> rtcp_packets_; - - // A list of all updates from the send-side loss-based bandwidth estimator. - std::vector bwe_loss_updates_; - - // Window and step size used for calculating moving averages, e.g. bitrate. - // The generated data points will be |step_| microseconds apart. - // Only events occuring at most |window_duration_| microseconds before the - // current data point will be part of the average. - uint64_t window_duration_; - uint64_t step_; - - // First and last events of the log. - uint64_t begin_time_; - uint64_t end_time_; - - // Duration (in seconds) of log file. - float call_duration_s_; -}; - -} // namespace plotting -} // namespace webrtc - -#endif // WEBRTC_TOOLS_EVENT_LOG_VISUALIZER_ANALYZER_H_ diff --git a/WebRtc.NET/include/webrtc/tools/event_log_visualizer/plot_base.h b/WebRtc.NET/include/webrtc/tools/event_log_visualizer/plot_base.h deleted file mode 100644 index 55462711..00000000 --- a/WebRtc.NET/include/webrtc/tools/event_log_visualizer/plot_base.h +++ /dev/null @@ -1,125 +0,0 @@ -/* - * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ -#ifndef WEBRTC_TOOLS_EVENT_LOG_VISUALIZER_PLOT_BASE_H_ -#define WEBRTC_TOOLS_EVENT_LOG_VISUALIZER_PLOT_BASE_H_ - -#include -#include -#include -#include - -namespace webrtc { -namespace plotting { - -enum PlotStyle { LINE_GRAPH, LINE_DOT_GRAPH, BAR_GRAPH }; - -struct TimeSeriesPoint { - TimeSeriesPoint(float x, float y) : x(x), y(y) {} - float x; - float y; -}; - -struct TimeSeries { - TimeSeries() = default; - TimeSeries(TimeSeries&& other) - : label(std::move(other.label)), - style(other.style), - points(std::move(other.points)) {} - TimeSeries& operator=(TimeSeries&& other) { - label = std::move(other.label); - style = other.style; - points = std::move(other.points); - return *this; - } - - std::string label; - PlotStyle style; - std::vector points; -}; - -// A container that represents a general graph, with axes, title and one or -// more data series. A subclass should define the output format by overriding -// the Draw() method. -class Plot { - public: - virtual ~Plot() {} - - // Overloaded to draw the plot. - virtual void Draw() = 0; - - // Sets the lower x-axis limit to min_value (if left_margin == 0). - // Sets the upper x-axis limit to max_value (if right_margin == 0). - // The margins are measured as fractions of the interval - // (max_value - min_value) and are added to either side of the plot. - void SetXAxis(float min_value, - float max_value, - std::string label, - float left_margin = 0, - float right_margin = 0); - - // Sets the lower and upper x-axis limits based on min_value and max_value, - // but modified such that all points in the data series can be represented - // on the x-axis. The margins are measured as fractions of the range of - // x-values and are added to either side of the plot. - void SetSuggestedXAxis(float min_value, - float max_value, - std::string label, - float left_margin = 0, - float right_margin = 0); - - // Sets the lower y-axis limit to min_value (if bottom_margin == 0). - // Sets the upper y-axis limit to max_value (if top_margin == 0). - // The margins are measured as fractions of the interval - // (max_value - min_value) and are added to either side of the plot. - void SetYAxis(float min_value, - float max_value, - std::string label, - float bottom_margin = 0, - float top_margin = 0); - - // Sets the lower and upper y-axis limits based on min_value and max_value, - // but modified such that all points in the data series can be represented - // on the y-axis. The margins are measured as fractions of the range of - // y-values and are added to either side of the plot. - void SetSuggestedYAxis(float min_value, - float max_value, - std::string label, - float bottom_margin = 0, - float top_margin = 0); - - // Sets the title of the plot. - void SetTitle(std::string title); - - std::vector series_list_; - - protected: - float xaxis_min_; - float xaxis_max_; - std::string xaxis_label_; - float yaxis_min_; - float yaxis_max_; - std::string yaxis_label_; - std::string title_; -}; - -class PlotCollection { - public: - virtual ~PlotCollection() {} - virtual void Draw() = 0; - virtual Plot* AppendNewPlot() = 0; - - protected: - std::vector > plots_; -}; - -} // namespace plotting -} // namespace webrtc - -#endif // WEBRTC_TOOLS_EVENT_LOG_VISUALIZER_PLOT_BASE_H_ diff --git a/WebRtc.NET/include/webrtc/tools/event_log_visualizer/plot_protobuf.h b/WebRtc.NET/include/webrtc/tools/event_log_visualizer/plot_protobuf.h deleted file mode 100644 index f80ff49e..00000000 --- a/WebRtc.NET/include/webrtc/tools/event_log_visualizer/plot_protobuf.h +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ -#ifndef WEBRTC_TOOLS_EVENT_LOG_VISUALIZER_PLOT_PROTOBUF_H_ -#define WEBRTC_TOOLS_EVENT_LOG_VISUALIZER_PLOT_PROTOBUF_H_ - -#include "webrtc/base/ignore_wundef.h" -RTC_PUSH_IGNORING_WUNDEF() -#include "webrtc/tools/event_log_visualizer/chart.pb.h" -RTC_POP_IGNORING_WUNDEF() -#include "webrtc/tools/event_log_visualizer/plot_base.h" - -namespace webrtc { -namespace plotting { - -class ProtobufPlot final : public Plot { - public: - ProtobufPlot(); - ~ProtobufPlot() override; - void Draw() override; - void ExportProtobuf(webrtc::analytics::Chart* chart); -}; - -class ProtobufPlotCollection final : public PlotCollection { - public: - ProtobufPlotCollection(); - ~ProtobufPlotCollection() override; - void Draw() override; - Plot* AppendNewPlot() override; - void ExportProtobuf(webrtc::analytics::ChartCollection* collection); -}; - -} // namespace plotting -} // namespace webrtc - -#endif // WEBRTC_TOOLS_EVENT_LOG_VISUALIZER_PLOT_PROTOBUF_H_ diff --git a/WebRtc.NET/include/webrtc/tools/event_log_visualizer/plot_python.h b/WebRtc.NET/include/webrtc/tools/event_log_visualizer/plot_python.h deleted file mode 100644 index 2bf445a4..00000000 --- a/WebRtc.NET/include/webrtc/tools/event_log_visualizer/plot_python.h +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ -#ifndef WEBRTC_TOOLS_EVENT_LOG_VISUALIZER_PLOT_PYTHON_H_ -#define WEBRTC_TOOLS_EVENT_LOG_VISUALIZER_PLOT_PYTHON_H_ - -#include "webrtc/tools/event_log_visualizer/plot_base.h" - -namespace webrtc { -namespace plotting { - -class PythonPlot final : public Plot { - public: - PythonPlot(); - ~PythonPlot() override; - void Draw() override; -}; - -class PythonPlotCollection final : public PlotCollection { - public: - PythonPlotCollection(); - ~PythonPlotCollection() override; - void Draw() override; - Plot* AppendNewPlot() override; -}; - -} // namespace plotting -} // namespace webrtc - -#endif // WEBRTC_TOOLS_EVENT_LOG_VISUALIZER_PLOT_PYTHON_H_ diff --git a/WebRtc.NET/include/webrtc/tools/frame_analyzer/video_quality_analysis.h b/WebRtc.NET/include/webrtc/tools/frame_analyzer/video_quality_analysis.h deleted file mode 100644 index 93d36054..00000000 --- a/WebRtc.NET/include/webrtc/tools/frame_analyzer/video_quality_analysis.h +++ /dev/null @@ -1,132 +0,0 @@ -/* - * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_TOOLS_FRAME_ANALYZER_VIDEO_QUALITY_ANALYSIS_H_ -#define WEBRTC_TOOLS_FRAME_ANALYZER_VIDEO_QUALITY_ANALYSIS_H_ - -#include -#include - -#include "libyuv/compare.h" // NOLINT -#include "libyuv/convert.h" // NOLINT - -namespace webrtc { -namespace test { - -struct AnalysisResult { - AnalysisResult() {} - AnalysisResult(int frame_number, double psnr_value, double ssim_value) - : frame_number(frame_number), - psnr_value(psnr_value), - ssim_value(ssim_value) {} - int frame_number; - double psnr_value; - double ssim_value; -}; - -struct ResultsContainer { - ResultsContainer(); - ~ResultsContainer(); - - std::vector frames; -}; - -enum VideoAnalysisMetricsType {kPSNR, kSSIM}; - -// A function to run the PSNR and SSIM analysis on the test file. The test file -// comprises the frames that were captured during the quality measurement test. -// There may be missing or duplicate frames. Also the frames start at a random -// position in the original video. We should provide a statistics file along -// with the test video. The stats file contains the connection between the -// actual frames in the test file and their bar code number. There is one file -// for the reference video and one for the test video. The stats file should -// be in the form 'frame_xxxx yyyy', where xxxx is the consecutive -// number of the frame in the test video, and yyyy is the barcode number. -// The stats file could be produced by -// tools/barcode_tools/barcode_decoder.py. This script decodes the barcodes -// integrated in every video and generates the stats file. If three was some -// problem with the decoding there would be 'Barcode error' instead of yyyy. -// The stat files are used to compare the right frames with each other and -// to calculate statistics. -void RunAnalysis(const char* reference_file_name, - const char* test_file_name, - const char* stats_file_reference_name, - const char* stats_file_test_name, - int width, - int height, - ResultsContainer* results); - -// Compute PSNR or SSIM for an I420 frame (all planes). When we are calculating -// PSNR values, the max return value (in the case where the test and reference -// frames are exactly the same) will be 48. In the case of SSIM the max return -// value will be 1. -double CalculateMetrics(VideoAnalysisMetricsType video_metrics_type, - const uint8_t* ref_frame, - const uint8_t* test_frame, - int width, - int height); - -// Prints the result from the analysis in Chromium performance -// numbers compatible format to stdout. If the results object contains no frames -// no output will be written. -void PrintAnalysisResults(const std::string& label, ResultsContainer* results); - -// Similar to the above, but will print to the specified file handle. -void PrintAnalysisResults(FILE* output, const std::string& label, - ResultsContainer* results); - -// Calculates max repeated and skipped frames and prints them to stdout in a -// format that is compatible with Chromium performance numbers. -void PrintMaxRepeatedAndSkippedFrames(const std::string& label, - const std::string& stats_file_ref_name, - const std::string& stats_file_test_name); - -// Similar to the above, but will print to the specified file handle. -void PrintMaxRepeatedAndSkippedFrames(FILE* output, - const std::string& label, - const std::string& stats_file_ref_name, - const std::string& stats_file_test_name); - -// Gets the next line from an open stats file. -bool GetNextStatsLine(FILE* stats_file, char* line); - -// Calculates the size of a I420 frame if given the width and height. -int GetI420FrameSize(int width, int height); - -// Extract the sequence of the frame in the video. I.e. if line is -// frame_0023 0284, we will get 23. -int ExtractFrameSequenceNumber(std::string line); - -// Checks if there is 'Barcode error' for the given line. -bool IsThereBarcodeError(std::string line); - -// Extract the frame number in the reference video. I.e. if line is -// frame_0023 0284, we will get 284. -int ExtractDecodedFrameNumber(std::string line); - -// Extracts an I420 frame at position frame_number from the raw YUV file. -bool ExtractFrameFromYuvFile(const char* i420_file_name, - int width, - int height, - int frame_number, - uint8_t* result_frame); - -// Extracts an I420 frame at position frame_number from the Y4M file. The first -// frame has corresponded |frame_number| 0. -bool ExtractFrameFromY4mFile(const char* i420_file_name, - int width, - int height, - int frame_number, - uint8_t* result_frame); - -} // namespace test -} // namespace webrtc - -#endif // WEBRTC_TOOLS_FRAME_ANALYZER_VIDEO_QUALITY_ANALYSIS_H_ diff --git a/WebRtc.NET/include/webrtc/typedefs.h b/WebRtc.NET/include/webrtc/typedefs.h deleted file mode 100644 index 65aa1ade..00000000 --- a/WebRtc.NET/include/webrtc/typedefs.h +++ /dev/null @@ -1,110 +0,0 @@ -/* - * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -// This file contains platform-specific typedefs and defines. -// Much of it is derived from Chromium's build/build_config.h. - -#ifndef WEBRTC_TYPEDEFS_H_ -#define WEBRTC_TYPEDEFS_H_ - -// Processor architecture detection. For more info on what's defined, see: -// http://msdn.microsoft.com/en-us/library/b0084kay.aspx -// http://www.agner.org/optimize/calling_conventions.pdf -// or with gcc, run: "echo | gcc -E -dM -" -#if defined(_M_X64) || defined(__x86_64__) -#define WEBRTC_ARCH_X86_FAMILY -#define WEBRTC_ARCH_X86_64 -#define WEBRTC_ARCH_64_BITS -#define WEBRTC_ARCH_LITTLE_ENDIAN -#elif defined(__aarch64__) -#define WEBRTC_ARCH_ARM_FAMILY -#define WEBRTC_ARCH_64_BITS -#define WEBRTC_ARCH_LITTLE_ENDIAN -#elif defined(_M_IX86) || defined(__i386__) -#define WEBRTC_ARCH_X86_FAMILY -#define WEBRTC_ARCH_X86 -#define WEBRTC_ARCH_32_BITS -#define WEBRTC_ARCH_LITTLE_ENDIAN -#elif defined(__ARMEL__) -#define WEBRTC_ARCH_ARM_FAMILY -#define WEBRTC_ARCH_32_BITS -#define WEBRTC_ARCH_LITTLE_ENDIAN -#elif defined(__MIPSEL__) -#define WEBRTC_ARCH_MIPS_FAMILY -#if defined(__LP64__) -#define WEBRTC_ARCH_64_BITS -#else -#define WEBRTC_ARCH_32_BITS -#endif -#define WEBRTC_ARCH_LITTLE_ENDIAN -#elif defined(__pnacl__) -#define WEBRTC_ARCH_32_BITS -#define WEBRTC_ARCH_LITTLE_ENDIAN -#else -#error Please add support for your architecture in typedefs.h -#endif - -#if !(defined(WEBRTC_ARCH_LITTLE_ENDIAN) ^ defined(WEBRTC_ARCH_BIG_ENDIAN)) -#error Define either WEBRTC_ARCH_LITTLE_ENDIAN or WEBRTC_ARCH_BIG_ENDIAN -#endif - -// TODO(zhongwei.yao): WEBRTC_CPU_DETECTION is only used in one place; we should -// probably just remove it. -#if (defined(WEBRTC_ARCH_X86_FAMILY) && !defined(__SSE2__)) -#define WEBRTC_CPU_DETECTION -#endif - -#include - -// Annotate a function indicating the caller must examine the return value. -// Use like: -// int foo() WARN_UNUSED_RESULT; -// To explicitly ignore a result, see |ignore_result()| in . -// TODO(ajm): Hack to avoid multiple definitions until the base/ of webrtc and -// libjingle are merged. -#if !defined(WARN_UNUSED_RESULT) -#if defined(__GNUC__) || defined(__clang__) -#define WARN_UNUSED_RESULT __attribute__ ((__warn_unused_result__)) -#else -#define WARN_UNUSED_RESULT -#endif -#endif // WARN_UNUSED_RESULT - -// Put after a variable that might not be used, to prevent compiler warnings: -// int result ATTRIBUTE_UNUSED = DoSomething(); -// assert(result == 17); -#ifndef ATTRIBUTE_UNUSED -#if defined(__GNUC__) || defined(__clang__) -#define ATTRIBUTE_UNUSED __attribute__ ((__unused__)) -#else -#define ATTRIBUTE_UNUSED -#endif -#endif - -// Macro to be used for switch-case fallthrough (required for enabling -// -Wimplicit-fallthrough warning on Clang). -#ifndef FALLTHROUGH -#if defined(__clang__) -#define FALLTHROUGH() [[clang::fallthrough]] -#else -#define FALLTHROUGH() do { } while (0) -#endif -#endif - -// Annotate a function that will not return control flow to the caller. -#if defined(_MSC_VER) -#define NO_RETURN __declspec(noreturn) -#elif defined(__GNUC__) -#define NO_RETURN __attribute__ ((__noreturn__)) -#else -#define NO_RETURN -#endif - -#endif // WEBRTC_TYPEDEFS_H_ diff --git a/WebRtc.NET/include/webrtc/video/call_stats.h b/WebRtc.NET/include/webrtc/video/call_stats.h deleted file mode 100644 index 9a5967e6..00000000 --- a/WebRtc.NET/include/webrtc/video/call_stats.h +++ /dev/null @@ -1,88 +0,0 @@ -/* - * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_VIDEO_CALL_STATS_H_ -#define WEBRTC_VIDEO_CALL_STATS_H_ - -#include -#include - -#include "webrtc/base/constructormagic.h" -#include "webrtc/base/criticalsection.h" -#include "webrtc/modules/include/module.h" -#include "webrtc/system_wrappers/include/clock.h" - -namespace webrtc { - -class CallStatsObserver; -class RtcpRttStats; - -// CallStats keeps track of statistics for a call. -class CallStats : public Module { - public: - friend class RtcpObserver; - - explicit CallStats(Clock* clock); - ~CallStats(); - - // Implements Module, to use the process thread. - int64_t TimeUntilNextProcess() override; - void Process() override; - - // Returns a RtcpRttStats to register at a statistics provider. The object - // has the same lifetime as the CallStats instance. - RtcpRttStats* rtcp_rtt_stats() const; - - // Registers/deregisters a new observer to receive statistics updates. - void RegisterStatsObserver(CallStatsObserver* observer); - void DeregisterStatsObserver(CallStatsObserver* observer); - - // Helper struct keeping track of the time a rtt value is reported. - struct RttTime { - RttTime(int64_t new_rtt, int64_t rtt_time) - : rtt(new_rtt), time(rtt_time) {} - const int64_t rtt; - const int64_t time; - }; - - protected: - void OnRttUpdate(int64_t rtt); - - int64_t avg_rtt_ms() const; - - private: - void UpdateHistograms(); - - Clock* const clock_; - // Protecting all members. - rtc::CriticalSection crit_; - // Observer receiving statistics updates. - std::unique_ptr rtcp_rtt_stats_; - // The last time 'Process' resulted in statistic update. - int64_t last_process_time_; - // The last RTT in the statistics update (zero if there is no valid estimate). - int64_t max_rtt_ms_; - int64_t avg_rtt_ms_; - int64_t sum_avg_rtt_ms_ GUARDED_BY(crit_); - int64_t num_avg_rtt_ GUARDED_BY(crit_); - int64_t time_of_first_rtt_ms_ GUARDED_BY(crit_); - - // All Rtt reports within valid time interval, oldest first. - std::list reports_; - - // Observers getting stats reports. - std::list observers_; - - RTC_DISALLOW_COPY_AND_ASSIGN(CallStats); -}; - -} // namespace webrtc - -#endif // WEBRTC_VIDEO_CALL_STATS_H_ diff --git a/WebRtc.NET/include/webrtc/video/encoder_rtcp_feedback.h b/WebRtc.NET/include/webrtc/video/encoder_rtcp_feedback.h deleted file mode 100644 index 4afdcf4c..00000000 --- a/WebRtc.NET/include/webrtc/video/encoder_rtcp_feedback.h +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ -#ifndef WEBRTC_VIDEO_ENCODER_RTCP_FEEDBACK_H_ -#define WEBRTC_VIDEO_ENCODER_RTCP_FEEDBACK_H_ - -#include - -#include "webrtc/base/criticalsection.h" -#include "webrtc/modules/rtp_rtcp/include/rtp_rtcp_defines.h" -#include "webrtc/system_wrappers/include/clock.h" -#include "webrtc/typedefs.h" - -namespace webrtc { - -class ViEEncoder; - -class EncoderRtcpFeedback : public RtcpIntraFrameObserver { - public: - EncoderRtcpFeedback(Clock* clock, - const std::vector& ssrcs, - ViEEncoder* encoder); - void OnReceivedIntraFrameRequest(uint32_t ssrc) override; - void OnReceivedSLI(uint32_t ssrc, uint8_t picture_id) override; - void OnReceivedRPSI(uint32_t ssrc, uint64_t picture_id) override; - - private: - bool HasSsrc(uint32_t ssrc); - size_t GetStreamIndex(uint32_t ssrc); - - Clock* const clock_; - const std::vector ssrcs_; - ViEEncoder* const vie_encoder_; - - rtc::CriticalSection crit_; - std::vector time_last_intra_request_ms_ GUARDED_BY(crit_); -}; - -} // namespace webrtc - -#endif // WEBRTC_VIDEO_ENCODER_RTCP_FEEDBACK_H_ diff --git a/WebRtc.NET/include/webrtc/video/overuse_frame_detector.h b/WebRtc.NET/include/webrtc/video/overuse_frame_detector.h deleted file mode 100644 index 551e0e17..00000000 --- a/WebRtc.NET/include/webrtc/video/overuse_frame_detector.h +++ /dev/null @@ -1,151 +0,0 @@ -/* - * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_VIDEO_OVERUSE_FRAME_DETECTOR_H_ -#define WEBRTC_VIDEO_OVERUSE_FRAME_DETECTOR_H_ - -#include -#include - -#include "webrtc/base/constructormagic.h" -#include "webrtc/base/numerics/exp_filter.h" -#include "webrtc/base/optional.h" -#include "webrtc/base/sequenced_task_checker.h" -#include "webrtc/base/task_queue.h" -#include "webrtc/base/thread_annotations.h" -#include "webrtc/modules/video_coding/utility/quality_scaler.h" - -namespace webrtc { - -class EncodedFrameObserver; -class VideoFrame; - -struct CpuOveruseOptions { - CpuOveruseOptions(); - - int low_encode_usage_threshold_percent; // Threshold for triggering underuse. - int high_encode_usage_threshold_percent; // Threshold for triggering overuse. - // General settings. - int frame_timeout_interval_ms; // The maximum allowed interval between two - // frames before resetting estimations. - int min_frame_samples; // The minimum number of frames required. - int min_process_count; // The number of initial process times required before - // triggering an overuse/underuse. - int high_threshold_consecutive_count; // The number of consecutive checks - // above the high threshold before - // triggering an overuse. -}; - -struct CpuOveruseMetrics { - CpuOveruseMetrics() : encode_usage_percent(-1) {} - - int encode_usage_percent; // Average encode time divided by the average time - // difference between incoming captured frames. -}; - -class CpuOveruseMetricsObserver { - public: - virtual ~CpuOveruseMetricsObserver() {} - virtual void OnEncodedFrameTimeMeasured(int encode_duration_ms, - const CpuOveruseMetrics& metrics) = 0; -}; - -// Use to detect system overuse based on the send-side processing time of -// incoming frames. All methods must be called on a single task queue but it can -// be created and destroyed on an arbitrary thread. -// OveruseFrameDetector::StartCheckForOveruse must be called to periodically -// check for overuse. -class OveruseFrameDetector { - public: - OveruseFrameDetector(const CpuOveruseOptions& options, - ScalingObserverInterface* overuse_observer, - EncodedFrameObserver* encoder_timing_, - CpuOveruseMetricsObserver* metrics_observer); - ~OveruseFrameDetector(); - - // Start to periodically check for overuse. - void StartCheckForOveruse(); - - // StopCheckForOveruse must be called before destruction if - // StartCheckForOveruse has been called. - void StopCheckForOveruse(); - - // Called for each captured frame. - void FrameCaptured(const VideoFrame& frame, int64_t time_when_first_seen_us); - - // Called for each sent frame. - void FrameSent(uint32_t timestamp, int64_t time_sent_in_us); - - protected: - void CheckForOveruse(); // Protected for test purposes. - - private: - class SendProcessingUsage; - class CheckOveruseTask; - struct FrameTiming { - FrameTiming(int64_t capture_time_us, uint32_t timestamp, int64_t now) - : capture_time_us(capture_time_us), - timestamp(timestamp), - capture_us(now), - last_send_us(-1) {} - int64_t capture_time_us; - uint32_t timestamp; - int64_t capture_us; - int64_t last_send_us; - }; - - void EncodedFrameTimeMeasured(int encode_duration_ms); - bool IsOverusing(const CpuOveruseMetrics& metrics); - bool IsUnderusing(const CpuOveruseMetrics& metrics, int64_t time_now); - - bool FrameTimeoutDetected(int64_t now) const; - bool FrameSizeChanged(int num_pixels) const; - - void ResetAll(int num_pixels); - - rtc::SequencedTaskChecker task_checker_; - // Owned by the task queue from where StartCheckForOveruse is called. - CheckOveruseTask* check_overuse_task_; - - const CpuOveruseOptions options_; - - // Observer getting overuse reports. - ScalingObserverInterface* const observer_; - EncodedFrameObserver* const encoder_timing_; - - // Stats metrics. - CpuOveruseMetricsObserver* const metrics_observer_; - rtc::Optional metrics_ GUARDED_BY(task_checker_); - - int64_t num_process_times_ GUARDED_BY(task_checker_); - - int64_t last_capture_time_us_ GUARDED_BY(task_checker_); - int64_t last_processed_capture_time_us_ GUARDED_BY(task_checker_); - - // Number of pixels of last captured frame. - int num_pixels_ GUARDED_BY(task_checker_); - int64_t last_overuse_time_ms_ GUARDED_BY(task_checker_); - int checks_above_threshold_ GUARDED_BY(task_checker_); - int num_overuse_detections_ GUARDED_BY(task_checker_); - int64_t last_rampup_time_ms_ GUARDED_BY(task_checker_); - bool in_quick_rampup_ GUARDED_BY(task_checker_); - int current_rampup_delay_ms_ GUARDED_BY(task_checker_); - - // TODO(asapersson): Can these be regular members (avoid separate heap - // allocs)? - const std::unique_ptr usage_ GUARDED_BY(task_checker_); - std::list frame_timing_ GUARDED_BY(task_checker_); - - RTC_DISALLOW_COPY_AND_ASSIGN(OveruseFrameDetector); -}; - -} // namespace webrtc - -#endif // WEBRTC_VIDEO_OVERUSE_FRAME_DETECTOR_H_ diff --git a/WebRtc.NET/include/webrtc/video/payload_router.h b/WebRtc.NET/include/webrtc/video/payload_router.h deleted file mode 100644 index f2d138dc..00000000 --- a/WebRtc.NET/include/webrtc/video/payload_router.h +++ /dev/null @@ -1,68 +0,0 @@ -/* - * Copyright (c) 2015 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_VIDEO_PAYLOAD_ROUTER_H_ -#define WEBRTC_VIDEO_PAYLOAD_ROUTER_H_ - -#include - -#include "webrtc/base/constructormagic.h" -#include "webrtc/base/criticalsection.h" -#include "webrtc/base/thread_annotations.h" -#include "webrtc/common_types.h" -#include "webrtc/config.h" -#include "webrtc/video_encoder.h" -#include "webrtc/system_wrappers/include/atomic32.h" - -namespace webrtc { - -class RTPFragmentationHeader; -class RtpRtcp; -struct RTPVideoHeader; - -// PayloadRouter routes outgoing data to the correct sending RTP module, based -// on the simulcast layer in RTPVideoHeader. -class PayloadRouter : public EncodedImageCallback { - public: - // Rtp modules are assumed to be sorted in simulcast index order. - PayloadRouter(const std::vector& rtp_modules, - int payload_type); - ~PayloadRouter(); - - // PayloadRouter will only route packets if being active, all packets will be - // dropped otherwise. - void SetActive(bool active); - bool IsActive(); - - // Implements EncodedImageCallback. - // Returns 0 if the packet was routed / sent, -1 otherwise. - EncodedImageCallback::Result OnEncodedImage( - const EncodedImage& encoded_image, - const CodecSpecificInfo* codec_specific_info, - const RTPFragmentationHeader* fragmentation) override; - - void OnBitrateAllocationUpdated(const BitrateAllocation& bitrate); - - private: - void UpdateModuleSendingState() EXCLUSIVE_LOCKS_REQUIRED(crit_); - - rtc::CriticalSection crit_; - bool active_ GUARDED_BY(crit_); - - // Rtp modules are assumed to be sorted in simulcast index order. Not owned. - const std::vector rtp_modules_; - const int payload_type_; - - RTC_DISALLOW_COPY_AND_ASSIGN(PayloadRouter); -}; - -} // namespace webrtc - -#endif // WEBRTC_VIDEO_PAYLOAD_ROUTER_H_ diff --git a/WebRtc.NET/include/webrtc/video/receive_statistics_proxy.h b/WebRtc.NET/include/webrtc/video/receive_statistics_proxy.h deleted file mode 100644 index e54f53aa..00000000 --- a/WebRtc.NET/include/webrtc/video/receive_statistics_proxy.h +++ /dev/null @@ -1,144 +0,0 @@ -/* - * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_VIDEO_RECEIVE_STATISTICS_PROXY_H_ -#define WEBRTC_VIDEO_RECEIVE_STATISTICS_PROXY_H_ - -#include -#include - -#include "webrtc/base/criticalsection.h" -#include "webrtc/base/rate_statistics.h" -#include "webrtc/base/ratetracker.h" -#include "webrtc/base/thread_annotations.h" -#include "webrtc/common_types.h" -#include "webrtc/common_video/include/frame_callback.h" -#include "webrtc/modules/video_coding/include/video_coding_defines.h" -#include "webrtc/video/quality_threshold.h" -#include "webrtc/video/report_block_stats.h" -#include "webrtc/video/stats_counter.h" -#include "webrtc/video/video_stream_decoder.h" -#include "webrtc/video_receive_stream.h" - -namespace webrtc { - -class Clock; -class ViECodec; -class ViEDecoderObserver; -struct CodecSpecificInfo; - -class ReceiveStatisticsProxy : public VCMReceiveStatisticsCallback, - public RtcpStatisticsCallback, - public RtcpPacketTypeCounterObserver, - public StreamDataCountersCallback { - public: - ReceiveStatisticsProxy(const VideoReceiveStream::Config* config, - Clock* clock); - virtual ~ReceiveStatisticsProxy(); - - VideoReceiveStream::Stats GetStats() const; - - void OnDecodedFrame(); - void OnSyncOffsetUpdated(int64_t sync_offset_ms, double estimated_freq_khz); - void OnRenderedFrame(const VideoFrame& frame); - void OnIncomingPayloadType(int payload_type); - void OnDecoderImplementationName(const char* implementation_name); - void OnIncomingRate(unsigned int framerate, unsigned int bitrate_bps); - void OnDecoderTiming(int decode_ms, - int max_decode_ms, - int current_delay_ms, - int target_delay_ms, - int jitter_buffer_ms, - int min_playout_delay_ms, - int render_delay_ms, - int64_t rtt_ms); - - void OnPreDecode(const EncodedImage& encoded_image, - const CodecSpecificInfo* codec_specific_info); - - // Overrides VCMReceiveStatisticsCallback. - void OnReceiveRatesUpdated(uint32_t bitRate, uint32_t frameRate) override; - void OnFrameCountsUpdated(const FrameCounts& frame_counts) override; - void OnDiscardedPacketsUpdated(int discarded_packets) override; - - // Overrides RtcpStatisticsCallback. - void StatisticsUpdated(const webrtc::RtcpStatistics& statistics, - uint32_t ssrc) override; - void CNameChanged(const char* cname, uint32_t ssrc) override; - - // Overrides RtcpPacketTypeCounterObserver. - void RtcpPacketTypesCounterUpdated( - uint32_t ssrc, - const RtcpPacketTypeCounter& packet_counter) override; - // Overrides StreamDataCountersCallback. - void DataCountersUpdated(const webrtc::StreamDataCounters& counters, - uint32_t ssrc) override; - - private: - struct SampleCounter { - SampleCounter() : sum(0), num_samples(0) {} - void Add(int sample); - int Avg(int64_t min_required_samples) const; - void Reset(); - - private: - int64_t sum; - int64_t num_samples; - }; - struct QpCounters { - SampleCounter vp8; - }; - - void UpdateHistograms() EXCLUSIVE_LOCKS_REQUIRED(crit_); - - void QualitySample() EXCLUSIVE_LOCKS_REQUIRED(crit_); - - Clock* const clock_; - // Ownership of this object lies with the owner of the ReceiveStatisticsProxy - // instance. Lifetime is guaranteed to outlive |this|. - // TODO(tommi): In practice the config_ reference is only used for accessing - // config_.rtp.ulpfec.ulpfec_payload_type. Instead of holding a pointer back, - // we could just store the value of ulpfec_payload_type and change the - // ReceiveStatisticsProxy() ctor to accept a const& of Config (since we'll - // then no longer store a pointer to the object). - const VideoReceiveStream::Config& config_; - const int64_t start_ms_; - - rtc::CriticalSection crit_; - int64_t last_sample_time_ GUARDED_BY(crit_); - QualityThreshold fps_threshold_ GUARDED_BY(crit_); - QualityThreshold qp_threshold_ GUARDED_BY(crit_); - QualityThreshold variance_threshold_ GUARDED_BY(crit_); - SampleCounter qp_sample_ GUARDED_BY(crit_); - int num_bad_states_ GUARDED_BY(crit_); - int num_certain_states_ GUARDED_BY(crit_); - VideoReceiveStream::Stats stats_ GUARDED_BY(crit_); - RateStatistics decode_fps_estimator_ GUARDED_BY(crit_); - RateStatistics renders_fps_estimator_ GUARDED_BY(crit_); - rtc::RateTracker render_fps_tracker_ GUARDED_BY(crit_); - rtc::RateTracker render_pixel_tracker_ GUARDED_BY(crit_); - SampleCounter render_width_counter_ GUARDED_BY(crit_); - SampleCounter render_height_counter_ GUARDED_BY(crit_); - SampleCounter sync_offset_counter_ GUARDED_BY(crit_); - SampleCounter decode_time_counter_ GUARDED_BY(crit_); - SampleCounter jitter_buffer_delay_counter_ GUARDED_BY(crit_); - SampleCounter target_delay_counter_ GUARDED_BY(crit_); - SampleCounter current_delay_counter_ GUARDED_BY(crit_); - SampleCounter delay_counter_ GUARDED_BY(crit_); - SampleCounter e2e_delay_counter_ GUARDED_BY(crit_); - MaxCounter freq_offset_counter_ GUARDED_BY(crit_); - int64_t first_report_block_time_ms_ GUARDED_BY(crit_); - ReportBlockStats report_block_stats_ GUARDED_BY(crit_); - QpCounters qp_counters_; // Only accessed on the decoding thread. - std::map rtx_stats_ GUARDED_BY(crit_); -}; - -} // namespace webrtc -#endif // WEBRTC_VIDEO_RECEIVE_STATISTICS_PROXY_H_ diff --git a/WebRtc.NET/include/webrtc/video/rtp_stream_receiver.h b/WebRtc.NET/include/webrtc/video/rtp_stream_receiver.h deleted file mode 100644 index b1e1db4b..00000000 --- a/WebRtc.NET/include/webrtc/video/rtp_stream_receiver.h +++ /dev/null @@ -1,212 +0,0 @@ -/* - * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_VIDEO_RTP_STREAM_RECEIVER_H_ -#define WEBRTC_VIDEO_RTP_STREAM_RECEIVER_H_ - -#include -#include -#include -#include -#include - -#include "webrtc/base/constructormagic.h" -#include "webrtc/base/criticalsection.h" -#include "webrtc/modules/include/module_common_types.h" -#include "webrtc/modules/rtp_rtcp/include/receive_statistics.h" -#include "webrtc/modules/rtp_rtcp/include/remote_ntp_time_estimator.h" -#include "webrtc/modules/rtp_rtcp/include/rtp_payload_registry.h" -#include "webrtc/modules/rtp_rtcp/include/rtp_rtcp.h" -#include "webrtc/modules/rtp_rtcp/include/rtp_rtcp_defines.h" -#include "webrtc/modules/video_coding/h264_sps_pps_tracker.h" -#include "webrtc/modules/video_coding/include/video_coding_defines.h" -#include "webrtc/modules/video_coding/packet_buffer.h" -#include "webrtc/modules/video_coding/rtp_frame_reference_finder.h" -#include "webrtc/modules/video_coding/sequence_number_util.h" -#include "webrtc/typedefs.h" -#include "webrtc/video_receive_stream.h" - -namespace webrtc { - -class NackModule; -class PacedSender; -class PacketRouter; -class ProcessThread; -class ReceiveStatistics; -class ReceiveStatisticsProxy; -class RemoteBitrateEstimator; -class RemoteNtpTimeEstimator; -class RtcpRttStats; -class RtpHeaderParser; -class RTPPayloadRegistry; -class RtpReceiver; -class Transport; -class UlpfecReceiver; -class VCMTiming; -class VieRemb; - -namespace vcm { -class VideoReceiver; -} // namespace vcm - -class RtpStreamReceiver : public RtpData, - public RtpFeedback, - public VCMFrameTypeCallback, - public VCMPacketRequestCallback, - public video_coding::OnReceivedFrameCallback, - public video_coding::OnCompleteFrameCallback, - public CallStatsObserver { - public: - RtpStreamReceiver( - vcm::VideoReceiver* video_receiver, - RemoteBitrateEstimator* remote_bitrate_estimator, - Transport* transport, - RtcpRttStats* rtt_stats, - PacedSender* paced_sender, - PacketRouter* packet_router, - VieRemb* remb, - const VideoReceiveStream::Config* config, - ReceiveStatisticsProxy* receive_stats_proxy, - ProcessThread* process_thread, - RateLimiter* retransmission_rate_limiter, - NackSender* nack_sender, - KeyFrameRequestSender* keyframe_request_sender, - video_coding::OnCompleteFrameCallback* complete_frame_callback, - VCMTiming* timing); - ~RtpStreamReceiver(); - - bool AddReceiveCodec(const VideoCodec& video_codec, - const std::map& codec_params); - - bool AddReceiveCodec(const VideoCodec& video_codec); - - uint32_t GetRemoteSsrc() const; - int GetCsrcs(uint32_t* csrcs) const; - - RtpReceiver* GetRtpReceiver() const; - RtpRtcp* rtp_rtcp() const { return rtp_rtcp_.get(); } - - void StartReceive(); - void StopReceive(); - - bool DeliverRtp(const uint8_t* rtp_packet, - size_t rtp_packet_length, - const PacketTime& packet_time); - bool DeliverRtcp(const uint8_t* rtcp_packet, size_t rtcp_packet_length); - - void FrameContinuous(uint16_t seq_num); - - void FrameDecoded(uint16_t seq_num); - - void SignalNetworkState(NetworkState state); - - // Implements RtpData. - int32_t OnReceivedPayloadData(const uint8_t* payload_data, - size_t payload_size, - const WebRtcRTPHeader* rtp_header) override; - bool OnRecoveredPacket(const uint8_t* packet, size_t packet_length) override; - - // Implements RtpFeedback. - int32_t OnInitializeDecoder(int8_t payload_type, - const char payload_name[RTP_PAYLOAD_NAME_SIZE], - int frequency, - size_t channels, - uint32_t rate) override; - void OnIncomingSSRCChanged(uint32_t ssrc) override; - void OnIncomingCSRCChanged(uint32_t CSRC, bool added) override {} - - // Implements VCMFrameTypeCallback. - int32_t RequestKeyFrame() override; - int32_t SliceLossIndicationRequest(const uint64_t picture_id) override; - - bool IsUlpfecEnabled() const; - bool IsRetransmissionsEnabled() const; - // Don't use, still experimental. - void RequestPacketRetransmit(const std::vector& sequence_numbers); - - // Implements VCMPacketRequestCallback. - int32_t ResendPackets(const uint16_t* sequenceNumbers, - uint16_t length) override; - - // Implements OnReceivedFrameCallback. - void OnReceivedFrame( - std::unique_ptr frame) override; - - // Implements OnCompleteFrameCallback. - void OnCompleteFrame( - std::unique_ptr frame) override; - - void OnRttUpdate(int64_t avg_rtt_ms, int64_t max_rtt_ms) override; - - private: - bool ReceivePacket(const uint8_t* packet, - size_t packet_length, - const RTPHeader& header, - bool in_order); - // Parses and handles for instance RTX and RED headers. - // This function assumes that it's being called from only one thread. - bool ParseAndHandleEncapsulatingHeader(const uint8_t* packet, - size_t packet_length, - const RTPHeader& header); - void NotifyReceiverOfFecPacket(const RTPHeader& header); - bool IsPacketInOrder(const RTPHeader& header) const; - bool IsPacketRetransmitted(const RTPHeader& header, bool in_order) const; - void UpdateHistograms(); - void EnableReceiveRtpHeaderExtension(const std::string& extension, int id); - bool IsRedEnabled() const; - void InsertSpsPpsIntoTracker(uint8_t payload_type); - - Clock* const clock_; - // Ownership of this object lies with VideoReceiveStream, which owns |this|. - const VideoReceiveStream::Config& config_; - vcm::VideoReceiver* const video_receiver_; - RemoteBitrateEstimator* const remote_bitrate_estimator_; - PacketRouter* const packet_router_; - VieRemb* const remb_; - ProcessThread* const process_thread_; - - RemoteNtpTimeEstimator ntp_estimator_; - RTPPayloadRegistry rtp_payload_registry_; - - const std::unique_ptr rtp_header_parser_; - const std::unique_ptr rtp_receiver_; - const std::unique_ptr rtp_receive_statistics_; - std::unique_ptr ulpfec_receiver_; - - rtc::CriticalSection receive_cs_; - bool receiving_ GUARDED_BY(receive_cs_); - uint8_t restored_packet_[IP_PACKET_SIZE] GUARDED_BY(receive_cs_); - bool restored_packet_in_use_ GUARDED_BY(receive_cs_); - int64_t last_packet_log_ms_ GUARDED_BY(receive_cs_); - - const std::unique_ptr rtp_rtcp_; - - // Members for the new jitter buffer experiment. - bool jitter_buffer_experiment_; - video_coding::OnCompleteFrameCallback* complete_frame_callback_; - KeyFrameRequestSender* keyframe_request_sender_; - VCMTiming* timing_; - std::unique_ptr nack_module_; - rtc::scoped_refptr packet_buffer_; - std::unique_ptr reference_finder_; - rtc::CriticalSection last_seq_num_cs_; - std::map> - last_seq_num_for_pic_id_ GUARDED_BY(last_seq_num_cs_); - video_coding::H264SpsPpsTracker tracker_; - // TODO(johan): Remove pt_codec_params_ once - // https://bugs.chromium.org/p/webrtc/issues/detail?id=6883 is resolved. - // Maps a payload type to a map of out-of-band supplied codec parameters. - std::map> pt_codec_params_; - int16_t last_payload_type_ = -1; -}; - -} // namespace webrtc - -#endif // WEBRTC_VIDEO_RTP_STREAM_RECEIVER_H_ diff --git a/WebRtc.NET/include/webrtc/video/rtp_streams_synchronizer.h b/WebRtc.NET/include/webrtc/video/rtp_streams_synchronizer.h deleted file mode 100644 index bc24d6f8..00000000 --- a/WebRtc.NET/include/webrtc/video/rtp_streams_synchronizer.h +++ /dev/null @@ -1,76 +0,0 @@ -/* - * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -// RtpStreamsSynchronizer is responsible for synchronization audio and video for -// a given voice engine channel and video receive stream. - -#ifndef WEBRTC_VIDEO_RTP_STREAMS_SYNCHRONIZER_H_ -#define WEBRTC_VIDEO_RTP_STREAMS_SYNCHRONIZER_H_ - -#include - -#include "webrtc/base/criticalsection.h" -#include "webrtc/base/thread_checker.h" -#include "webrtc/modules/include/module.h" -#include "webrtc/video/rtp_stream_receiver.h" -#include "webrtc/video/stream_synchronization.h" - -namespace webrtc { - -class Clock; -class VideoFrame; -class VoEVideoSync; - -namespace vcm { -class VideoReceiver; -} // namespace vcm - -class RtpStreamsSynchronizer : public Module { - public: - RtpStreamsSynchronizer(vcm::VideoReceiver* vcm, - RtpStreamReceiver* rtp_stream_receiver); - - void ConfigureSync(int voe_channel_id, - VoEVideoSync* voe_sync_interface); - - // Implements Module. - int64_t TimeUntilNextProcess() override; - void Process() override; - - // Gets the sync offset between the current played out audio frame and the - // video |frame|. Returns true on success, false otherwise. - // The estimated frequency is the frequency used in the RTP to NTP timestamp - // conversion. - bool GetStreamSyncOffsetInMs(const VideoFrame& frame, - int64_t* stream_offset_ms, - double* estimated_freq_khz) const; - - private: - Clock* const clock_; - vcm::VideoReceiver* const video_receiver_; - RtpReceiver* const video_rtp_receiver_; - RtpRtcp* const video_rtp_rtcp_; - - rtc::CriticalSection crit_; - int voe_channel_id_ GUARDED_BY(crit_); - VoEVideoSync* voe_sync_interface_ GUARDED_BY(crit_); - RtpReceiver* audio_rtp_receiver_ GUARDED_BY(crit_); - RtpRtcp* audio_rtp_rtcp_ GUARDED_BY(crit_); - std::unique_ptr sync_ GUARDED_BY(crit_); - StreamSynchronization::Measurements audio_measurement_ GUARDED_BY(crit_); - StreamSynchronization::Measurements video_measurement_ GUARDED_BY(crit_); - - rtc::ThreadChecker process_thread_checker_; - int64_t last_sync_time_ ACCESS_ON(&process_thread_checker_); -}; - -} // namespace webrtc - -#endif // WEBRTC_VIDEO_RTP_STREAMS_SYNCHRONIZER_H_ diff --git a/WebRtc.NET/include/webrtc/video/send_delay_stats.h b/WebRtc.NET/include/webrtc/video/send_delay_stats.h deleted file mode 100644 index 8cac1234..00000000 --- a/WebRtc.NET/include/webrtc/video/send_delay_stats.h +++ /dev/null @@ -1,86 +0,0 @@ -/* - * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_VIDEO_SEND_DELAY_STATS_H_ -#define WEBRTC_VIDEO_SEND_DELAY_STATS_H_ - -#include -#include -#include - -#include "webrtc/base/criticalsection.h" -#include "webrtc/base/thread_annotations.h" -#include "webrtc/common_types.h" -#include "webrtc/modules/include/module_common_types.h" -#include "webrtc/system_wrappers/include/clock.h" -#include "webrtc/video/stats_counter.h" -#include "webrtc/video_send_stream.h" - -namespace webrtc { - -class SendDelayStats : public SendPacketObserver { - public: - explicit SendDelayStats(Clock* clock); - virtual ~SendDelayStats(); - - // Adds the configured ssrcs for the rtp streams. - // Stats will be calculated for these streams. - void AddSsrcs(const VideoSendStream::Config& config); - - // Called when a packet is sent (leaving socket). - bool OnSentPacket(int packet_id, int64_t time_ms); - - protected: - // From SendPacketObserver. - // Called when a packet is sent to the transport. - void OnSendPacket(uint16_t packet_id, - int64_t capture_time_ms, - uint32_t ssrc) override; - - private: - // Map holding sent packets (mapped by sequence number). - struct SequenceNumberOlderThan { - bool operator()(uint16_t seq1, uint16_t seq2) const { - return IsNewerSequenceNumber(seq2, seq1); - } - }; - struct Packet { - Packet(uint32_t ssrc, int64_t capture_time_ms, int64_t send_time_ms) - : ssrc(ssrc), - capture_time_ms(capture_time_ms), - send_time_ms(send_time_ms) {} - uint32_t ssrc; - int64_t capture_time_ms; - int64_t send_time_ms; - }; - typedef std::map PacketMap; - - void UpdateHistograms(); - void RemoveOld(int64_t now, PacketMap* packets) - EXCLUSIVE_LOCKS_REQUIRED(crit_); - AvgCounter* GetSendDelayCounter(uint32_t ssrc) - EXCLUSIVE_LOCKS_REQUIRED(crit_); - - Clock* const clock_; - rtc::CriticalSection crit_; - - PacketMap packets_ GUARDED_BY(crit_); - size_t num_old_packets_ GUARDED_BY(crit_); - size_t num_skipped_packets_ GUARDED_BY(crit_); - - std::set ssrcs_ GUARDED_BY(crit_); - - // Mapped by SSRC. - std::map> send_delay_counters_ - GUARDED_BY(crit_); -}; - -} // namespace webrtc -#endif // WEBRTC_VIDEO_SEND_DELAY_STATS_H_ diff --git a/WebRtc.NET/include/webrtc/video/send_statistics_proxy.h b/WebRtc.NET/include/webrtc/video/send_statistics_proxy.h deleted file mode 100644 index f4bb8055..00000000 --- a/WebRtc.NET/include/webrtc/video/send_statistics_proxy.h +++ /dev/null @@ -1,215 +0,0 @@ -/* - * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_VIDEO_SEND_STATISTICS_PROXY_H_ -#define WEBRTC_VIDEO_SEND_STATISTICS_PROXY_H_ - -#include -#include -#include -#include - -#include "webrtc/base/criticalsection.h" -#include "webrtc/base/numerics/exp_filter.h" -#include "webrtc/base/ratetracker.h" -#include "webrtc/base/thread_annotations.h" -#include "webrtc/common_types.h" -#include "webrtc/modules/video_coding/include/video_codec_interface.h" -#include "webrtc/modules/video_coding/include/video_coding_defines.h" -#include "webrtc/system_wrappers/include/clock.h" -#include "webrtc/video/overuse_frame_detector.h" -#include "webrtc/video/report_block_stats.h" -#include "webrtc/video/stats_counter.h" -#include "webrtc/video/vie_encoder.h" -#include "webrtc/video_send_stream.h" - -namespace webrtc { - -class SendStatisticsProxy : public CpuOveruseMetricsObserver, - public RtcpStatisticsCallback, - public RtcpPacketTypeCounterObserver, - public StreamDataCountersCallback, - public BitrateStatisticsObserver, - public FrameCountObserver, - public SendSideDelayObserver { - public: - static const int kStatsTimeoutMs; - // Number of required samples to be collected before a metric is added - // to a rtc histogram. - static const int kMinRequiredMetricsSamples = 200; - - SendStatisticsProxy(Clock* clock, - const VideoSendStream::Config& config, - VideoEncoderConfig::ContentType content_type); - virtual ~SendStatisticsProxy(); - - VideoSendStream::Stats GetStats(); - - virtual void OnSendEncodedImage(const EncodedImage& encoded_image, - const CodecSpecificInfo* codec_info); - // Used to update incoming frame rate. - void OnIncomingFrame(int width, int height); - - void OnCpuRestrictedResolutionChanged(bool cpu_restricted_resolution); - void OnQualityRestrictedResolutionChanged(int num_quality_downscales); - void SetResolutionRestrictionStats(bool scaling_enabled, - bool cpu_restricted, - int num_quality_downscales); - - void OnEncoderStatsUpdate(uint32_t framerate, uint32_t bitrate); - void OnSuspendChange(bool is_suspended); - void OnInactiveSsrc(uint32_t ssrc); - - // Used to indicate change in content type, which may require a change in - // how stats are collected and set the configured preferred media bitrate. - void OnEncoderReconfigured(const VideoEncoderConfig& encoder_config, - uint32_t preferred_bitrate_bps); - - // Used to update the encoder target rate. - void OnSetEncoderTargetRate(uint32_t bitrate_bps); - - // Implements CpuOveruseMetricsObserver. - void OnEncodedFrameTimeMeasured(int encode_time_ms, - const CpuOveruseMetrics& metrics) override; - - int GetSendFrameRate() const; - - protected: - // From RtcpStatisticsCallback. - void StatisticsUpdated(const RtcpStatistics& statistics, - uint32_t ssrc) override; - void CNameChanged(const char* cname, uint32_t ssrc) override; - // From RtcpPacketTypeCounterObserver. - void RtcpPacketTypesCounterUpdated( - uint32_t ssrc, - const RtcpPacketTypeCounter& packet_counter) override; - // From StreamDataCountersCallback. - void DataCountersUpdated(const StreamDataCounters& counters, - uint32_t ssrc) override; - - // From BitrateStatisticsObserver. - void Notify(uint32_t total_bitrate_bps, - uint32_t retransmit_bitrate_bps, - uint32_t ssrc) override; - - // From FrameCountObserver. - void FrameCountUpdated(const FrameCounts& frame_counts, - uint32_t ssrc) override; - - void SendSideDelayUpdated(int avg_delay_ms, - int max_delay_ms, - uint32_t ssrc) override; - - private: - class SampleCounter { - public: - SampleCounter() : sum(0), num_samples(0) {} - ~SampleCounter() {} - void Add(int sample); - int Avg(int64_t min_required_samples) const; - - private: - int64_t sum; - int64_t num_samples; - }; - class BoolSampleCounter { - public: - BoolSampleCounter() : sum(0), num_samples(0) {} - ~BoolSampleCounter() {} - void Add(bool sample); - void Add(bool sample, int64_t count); - int Percent(int64_t min_required_samples) const; - int Permille(int64_t min_required_samples) const; - - private: - int Fraction(int64_t min_required_samples, float multiplier) const; - int64_t sum; - int64_t num_samples; - }; - struct StatsUpdateTimes { - StatsUpdateTimes() : resolution_update_ms(0), bitrate_update_ms(0) {} - int64_t resolution_update_ms; - int64_t bitrate_update_ms; - }; - struct TargetRateUpdates { - TargetRateUpdates() - : pause_resume_events(0), last_paused_or_resumed(false), last_ms(-1) {} - int pause_resume_events; - bool last_paused_or_resumed; - int64_t last_ms; - }; - struct QpCounters { - SampleCounter vp8; // QP range: 0-127 - SampleCounter vp9; // QP range: 0-255 - SampleCounter h264; // QP range: 0-51 - }; - void PurgeOldStats() EXCLUSIVE_LOCKS_REQUIRED(crit_); - VideoSendStream::StreamStats* GetStatsEntry(uint32_t ssrc) - EXCLUSIVE_LOCKS_REQUIRED(crit_); - - Clock* const clock_; - const std::string payload_name_; - const VideoSendStream::Config::Rtp rtp_config_; - rtc::CriticalSection crit_; - VideoEncoderConfig::ContentType content_type_ GUARDED_BY(crit_); - const int64_t start_ms_; - VideoSendStream::Stats stats_ GUARDED_BY(crit_); - uint32_t last_sent_frame_timestamp_ GUARDED_BY(crit_); - std::map update_times_ GUARDED_BY(crit_); - rtc::ExpFilter encode_time_ GUARDED_BY(crit_); - int quality_downscales_ GUARDED_BY(crit_) = 0; - - // Contains stats used for UMA histograms. These stats will be reset if - // content type changes between real-time video and screenshare, since these - // will be reported separately. - struct UmaSamplesContainer { - UmaSamplesContainer(const char* prefix, - const VideoSendStream::Stats& start_stats, - Clock* clock); - ~UmaSamplesContainer(); - - void UpdateHistograms(const VideoSendStream::Config::Rtp& rtp_config, - const VideoSendStream::Stats& current_stats); - - const std::string uma_prefix_; - Clock* const clock_; - int max_sent_width_per_timestamp_; - int max_sent_height_per_timestamp_; - SampleCounter input_width_counter_; - SampleCounter input_height_counter_; - SampleCounter sent_width_counter_; - SampleCounter sent_height_counter_; - SampleCounter encode_time_counter_; - BoolSampleCounter key_frame_counter_; - BoolSampleCounter quality_limited_frame_counter_; - SampleCounter quality_downscales_counter_; - BoolSampleCounter cpu_limited_frame_counter_; - BoolSampleCounter bw_limited_frame_counter_; - SampleCounter bw_resolutions_disabled_counter_; - SampleCounter delay_counter_; - SampleCounter max_delay_counter_; - rtc::RateTracker input_frame_rate_tracker_; - RateCounter input_fps_counter_; - RateCounter sent_fps_counter_; - int64_t first_rtcp_stats_time_ms_; - int64_t first_rtp_stats_time_ms_; - BoolSampleCounter paused_time_counter_; - TargetRateUpdates target_rate_updates_; - ReportBlockStats report_block_stats_; - const VideoSendStream::Stats start_stats_; - std::map - qp_counters_; // QP counters mapped by spatial idx. - }; - - std::unique_ptr uma_container_ GUARDED_BY(crit_); -}; - -} // namespace webrtc -#endif // WEBRTC_VIDEO_SEND_STATISTICS_PROXY_H_ diff --git a/WebRtc.NET/include/webrtc/video/transport_adapter.h b/WebRtc.NET/include/webrtc/video/transport_adapter.h deleted file mode 100644 index 3312094b..00000000 --- a/WebRtc.NET/include/webrtc/video/transport_adapter.h +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ -#ifndef WEBRTC_VIDEO_TRANSPORT_ADAPTER_H_ -#define WEBRTC_VIDEO_TRANSPORT_ADAPTER_H_ - -#include "webrtc/api/call/transport.h" -#include "webrtc/common_types.h" -#include "webrtc/system_wrappers/include/atomic32.h" - -namespace webrtc { -namespace internal { - -class TransportAdapter : public Transport { - public: - explicit TransportAdapter(Transport* transport); - - bool SendRtp(const uint8_t* packet, - size_t length, - const PacketOptions& options) override; - bool SendRtcp(const uint8_t* packet, size_t length) override; - - void Enable(); - void Disable(); - - private: - Transport *transport_; - Atomic32 enabled_; -}; -} // namespace internal -} // namespace webrtc - -#endif // WEBRTC_VIDEO_TRANSPORT_ADAPTER_H_ diff --git a/WebRtc.NET/include/webrtc/video/video_quality_test.h b/WebRtc.NET/include/webrtc/video/video_quality_test.h deleted file mode 100644 index b741ad33..00000000 --- a/WebRtc.NET/include/webrtc/video/video_quality_test.h +++ /dev/null @@ -1,139 +0,0 @@ -/* - * Copyright (c) 2015 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ -#ifndef WEBRTC_VIDEO_VIDEO_QUALITY_TEST_H_ -#define WEBRTC_VIDEO_VIDEO_QUALITY_TEST_H_ - -#include -#include -#include - -#include "webrtc/test/call_test.h" -#include "webrtc/test/frame_generator.h" -#include "webrtc/test/testsupport/trace_to_stderr.h" - -namespace webrtc { - -class VideoQualityTest : public test::CallTest { - public: - // Parameters are grouped into smaller structs to make it easier to set - // the desired elements and skip unused, using aggregate initialization. - // Unfortunately, C++11 (as opposed to C11) doesn't support unnamed structs, - // which makes the implementation of VideoQualityTest a bit uglier. - struct Params { - Params(); - ~Params(); - struct { - bool send_side_bwe; - Call::Config::BitrateConfig call_bitrate_config; - } call; - struct { - bool enabled; - size_t width; - size_t height; - int32_t fps; - int min_bitrate_bps; - int target_bitrate_bps; - int max_bitrate_bps; - bool suspend_below_min_bitrate; - std::string codec; - int num_temporal_layers; - int selected_tl; - int min_transmit_bps; - bool ulpfec; - bool flexfec; - std::string encoded_frame_base_path; - std::string clip_name; - } video; - struct { - bool enabled; - bool sync_video; - } audio; - struct { - bool enabled; - int32_t slide_change_interval; - int32_t scroll_duration; - } screenshare; - struct { - std::string test_label; - double avg_psnr_threshold; // (*) - double avg_ssim_threshold; // (*) - int test_durations_secs; - std::string graph_data_output_filename; - std::string graph_title; - } analyzer; - FakeNetworkPipe::Config pipe; - bool logs; - struct { // Spatial scalability. - std::vector streams; // If empty, one stream is assumed. - size_t selected_stream; - int num_spatial_layers; - int selected_sl; - // If empty, bitrates are generated in VP9Impl automatically. - std::vector spatial_layers; - } ss; - }; - // (*) Set to -1.1 if generating graph data for simulcast or SVC and the - // selected stream/layer doesn't have the same resolution as the largest - // stream/layer (to ignore the PSNR and SSIM calculation errors). - - VideoQualityTest(); - void RunWithAnalyzer(const Params& params); - void RunWithRenderers(const Params& params); - - static void FillScalabilitySettings( - Params* params, - const std::vector& stream_descriptors, - size_t selected_stream, - int num_spatial_layers, - int selected_sl, - const std::vector& sl_descriptors); - - protected: - // No-op implementation to be able to instantiate this class from non-TEST_F - // locations. - void TestBody() override; - - // Helper methods accessing only params_. - std::string GenerateGraphTitle() const; - void CheckParams(); - - // Helper static methods. - static VideoStream DefaultVideoStream(const Params& params); - static std::vector ParseCSV(const std::string& str); - - // Helper methods for setting up the call. - void CreateCapturer(); - void SetupVideo(Transport* send_transport, Transport* recv_transport); - void SetupScreenshare(); - void SetupAudio(int send_channel_id, - int receive_channel_id, - Call* call, - Transport* transport, - AudioReceiveStream** audio_receive_stream); - - void StartEncodedFrameLogs(VideoSendStream* stream); - void StartEncodedFrameLogs(VideoReceiveStream* stream); - - // We need a more general capturer than the FrameGeneratorCapturer. - std::unique_ptr video_capturer_; - std::unique_ptr trace_to_stderr_; - std::unique_ptr frame_generator_; - std::unique_ptr video_encoder_; - Clock* const clock_; - - int receive_logs_; - int send_logs_; - - Params params_; -}; - -} // namespace webrtc - -#endif // WEBRTC_VIDEO_VIDEO_QUALITY_TEST_H_ diff --git a/WebRtc.NET/include/webrtc/video/video_receive_stream.h b/WebRtc.NET/include/webrtc/video/video_receive_stream.h deleted file mode 100644 index ab9fe4ea..00000000 --- a/WebRtc.NET/include/webrtc/video/video_receive_stream.h +++ /dev/null @@ -1,140 +0,0 @@ -/* - * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_VIDEO_VIDEO_RECEIVE_STREAM_H_ -#define WEBRTC_VIDEO_VIDEO_RECEIVE_STREAM_H_ - -#include -#include - -#include "webrtc/common_video/include/incoming_video_stream.h" -#include "webrtc/common_video/libyuv/include/webrtc_libyuv.h" -#include "webrtc/modules/rtp_rtcp/include/flexfec_receiver.h" -#include "webrtc/modules/video_coding/frame_buffer2.h" -#include "webrtc/modules/video_coding/video_coding_impl.h" -#include "webrtc/system_wrappers/include/clock.h" -#include "webrtc/video/receive_statistics_proxy.h" -#include "webrtc/video/rtp_stream_receiver.h" -#include "webrtc/video/rtp_streams_synchronizer.h" -#include "webrtc/video/transport_adapter.h" -#include "webrtc/video/video_stream_decoder.h" -#include "webrtc/video_receive_stream.h" - -namespace webrtc { - -class CallStats; -class CongestionController; -class IvfFileWriter; -class ProcessThread; -class RTPFragmentationHeader; -class VoiceEngine; -class VieRemb; -class VCMTiming; -class VCMJitterEstimator; - -namespace internal { - -class VideoReceiveStream : public webrtc::VideoReceiveStream, - public rtc::VideoSinkInterface, - public EncodedImageCallback, - public NackSender, - public KeyFrameRequestSender, - public video_coding::OnCompleteFrameCallback { - public: - VideoReceiveStream(int num_cpu_cores, - CongestionController* congestion_controller, - PacketRouter* packet_router, - VideoReceiveStream::Config config, - webrtc::VoiceEngine* voice_engine, - ProcessThread* process_thread, - CallStats* call_stats, - VieRemb* remb); - ~VideoReceiveStream() override; - - void SignalNetworkState(NetworkState state); - bool DeliverRtcp(const uint8_t* packet, size_t length); - bool DeliverRtp(const uint8_t* packet, - size_t length, - const PacketTime& packet_time); - - bool OnRecoveredPacket(const uint8_t* packet, size_t length); - - // webrtc::VideoReceiveStream implementation. - void Start() override; - void Stop() override; - - webrtc::VideoReceiveStream::Stats GetStats() const override; - - // Overrides rtc::VideoSinkInterface. - void OnFrame(const VideoFrame& video_frame) override; - - // Implements video_coding::OnCompleteFrameCallback. - void OnCompleteFrame( - std::unique_ptr frame) override; - - // Overrides EncodedImageCallback. - EncodedImageCallback::Result OnEncodedImage( - const EncodedImage& encoded_image, - const CodecSpecificInfo* codec_specific_info, - const RTPFragmentationHeader* fragmentation) override; - - const Config& config() const { return config_; } - - void SetSyncChannel(VoiceEngine* voice_engine, int audio_channel_id); - - // Implements NackSender. - void SendNack(const std::vector& sequence_numbers) override; - - // Implements KeyFrameRequestSender. - void RequestKeyFrame() override; - - // Takes ownership of the file, is responsible for closing it later. - // Calling this method will close and finalize any current log. - // Giving rtc::kInvalidPlatformFileValue disables logging. - // If a frame to be written would make the log too large the write fails and - // the log is closed and finalized. A |byte_limit| of 0 means no limit. - void EnableEncodedFrameRecording(rtc::PlatformFile file, - size_t byte_limit) override; - - private: - static bool DecodeThreadFunction(void* ptr); - void Decode(); - - TransportAdapter transport_adapter_; - const VideoReceiveStream::Config config_; - const int num_cpu_cores_; - ProcessThread* const process_thread_; - Clock* const clock_; - - rtc::PlatformThread decode_thread_; - - CongestionController* const congestion_controller_; - CallStats* const call_stats_; - - std::unique_ptr timing_; // Jitter buffer experiment. - vcm::VideoReceiver video_receiver_; - std::unique_ptr> incoming_video_stream_; - ReceiveStatisticsProxy stats_proxy_; - RtpStreamReceiver rtp_stream_receiver_; - std::unique_ptr video_stream_decoder_; - RtpStreamsSynchronizer rtp_stream_sync_; - - rtc::CriticalSection ivf_writer_lock_; - std::unique_ptr ivf_writer_ GUARDED_BY(ivf_writer_lock_); - - // Members for the new jitter buffer experiment. - const bool jitter_buffer_experiment_; - std::unique_ptr jitter_estimator_; - std::unique_ptr frame_buffer_; -}; -} // namespace internal -} // namespace webrtc - -#endif // WEBRTC_VIDEO_VIDEO_RECEIVE_STREAM_H_ diff --git a/WebRtc.NET/include/webrtc/video/video_send_stream.h b/WebRtc.NET/include/webrtc/video/video_send_stream.h deleted file mode 100644 index be62a2ea..00000000 --- a/WebRtc.NET/include/webrtc/video/video_send_stream.h +++ /dev/null @@ -1,114 +0,0 @@ -/* - * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_VIDEO_VIDEO_SEND_STREAM_H_ -#define WEBRTC_VIDEO_VIDEO_SEND_STREAM_H_ - -#include -#include -#include - -#include "webrtc/call/bitrate_allocator.h" -#include "webrtc/base/criticalsection.h" -#include "webrtc/base/event.h" -#include "webrtc/base/task_queue.h" -#include "webrtc/common_video/libyuv/include/webrtc_libyuv.h" -#include "webrtc/modules/video_coding/protection_bitrate_calculator.h" -#include "webrtc/video/encoder_rtcp_feedback.h" -#include "webrtc/video/payload_router.h" -#include "webrtc/video/send_delay_stats.h" -#include "webrtc/video/send_statistics_proxy.h" -#include "webrtc/video/vie_encoder.h" -#include "webrtc/video_receive_stream.h" -#include "webrtc/video_send_stream.h" - -namespace webrtc { - -class BitrateAllocator; -class CallStats; -class CongestionController; -class IvfFileWriter; -class PacketRouter; -class ProcessThread; -class RtpRtcp; -class VieRemb; -class RtcEventLog; - -namespace internal { - -class VideoSendStreamImpl; - -// VideoSendStream implements webrtc::VideoSendStream. -// Internally, it delegates all public methods to VideoSendStreamImpl and / or -// VieEncoder. VideoSendStreamInternal is created and deleted on |worker_queue|. -class VideoSendStream : public webrtc::VideoSendStream { - public: - VideoSendStream(int num_cpu_cores, - ProcessThread* module_process_thread, - rtc::TaskQueue* worker_queue, - CallStats* call_stats, - CongestionController* congestion_controller, - PacketRouter* packet_router, - BitrateAllocator* bitrate_allocator, - SendDelayStats* send_delay_stats, - VieRemb* remb, - RtcEventLog* event_log, - VideoSendStream::Config config, - VideoEncoderConfig encoder_config, - const std::map& suspended_ssrcs); - - ~VideoSendStream() override; - - void SignalNetworkState(NetworkState state); - bool DeliverRtcp(const uint8_t* packet, size_t length); - - // webrtc::VideoSendStream implementation. - void Start() override; - void Stop() override; - - void SetSource(rtc::VideoSourceInterface* source, - const DegradationPreference& degradation_preference) override; - - void ReconfigureVideoEncoder(VideoEncoderConfig) override; - Stats GetStats() override; - - typedef std::map RtpStateMap; - - // Takes ownership of each file, is responsible for closing them later. - // Calling this method will close and finalize any current logs. - // Giving rtc::kInvalidPlatformFileValue in any position disables logging - // for the corresponding stream. - // If a frame to be written would make the log too large the write fails and - // the log is closed and finalized. A |byte_limit| of 0 means no limit. - void EnableEncodedFrameRecording(const std::vector& files, - size_t byte_limit) override; - - RtpStateMap StopPermanentlyAndGetRtpStates(); - - void SetTransportOverhead(size_t transport_overhead_per_packet); - - private: - class ConstructionTask; - class DestructAndGetRtpStateTask; - - rtc::ThreadChecker thread_checker_; - rtc::TaskQueue* const worker_queue_; - rtc::Event thread_sync_event_; - - SendStatisticsProxy stats_proxy_; - const VideoSendStream::Config config_; - std::unique_ptr send_stream_; - std::unique_ptr vie_encoder_; -}; - -} // namespace internal -} // namespace webrtc - -#endif // WEBRTC_VIDEO_VIDEO_SEND_STREAM_H_ diff --git a/WebRtc.NET/include/webrtc/video/video_stream_decoder.h b/WebRtc.NET/include/webrtc/video/video_stream_decoder.h deleted file mode 100644 index ad355570..00000000 --- a/WebRtc.NET/include/webrtc/video/video_stream_decoder.h +++ /dev/null @@ -1,106 +0,0 @@ -/* - * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_VIDEO_VIDEO_STREAM_DECODER_H_ -#define WEBRTC_VIDEO_VIDEO_STREAM_DECODER_H_ - -#include -#include -#include -#include - -#include "webrtc/base/criticalsection.h" -#include "webrtc/base/platform_thread.h" -#include "webrtc/base/scoped_ref_ptr.h" -#include "webrtc/media/base/videosinkinterface.h" -#include "webrtc/modules/remote_bitrate_estimator/include/remote_bitrate_estimator.h" -#include "webrtc/modules/video_coding/include/video_coding_defines.h" -#include "webrtc/typedefs.h" - -namespace webrtc { - -class CallStatsObserver; -class ChannelStatsObserver; -class EncodedImageCallback; -class I420FrameCallback; -class ReceiveStatisticsProxy; -class VideoRenderCallback; - -namespace vcm { -class VideoReceiver; -} // namespace vcm - -enum StreamType { - kViEStreamTypeNormal = 0, // Normal media stream - kViEStreamTypeRtx = 1 // Retransmission media stream -}; - -class VideoStreamDecoder : public VCMReceiveCallback, - public VCMReceiveStatisticsCallback, - public VCMDecoderTimingCallback, - public CallStatsObserver { - public: - friend class ChannelStatsObserver; - - VideoStreamDecoder(vcm::VideoReceiver* video_receiver, - VCMFrameTypeCallback* vcm_frame_type_callback, - VCMPacketRequestCallback* vcm_packet_request_callback, - bool enable_nack, - bool enable_fec, - ReceiveStatisticsProxy* receive_statistics_proxy, - rtc::VideoSinkInterface* incoming_video_stream, - I420FrameCallback* pre_render_callback); - ~VideoStreamDecoder(); - - // Implements VCMReceiveCallback. - int32_t FrameToRender(VideoFrame& video_frame) override; // NOLINT - int32_t ReceivedDecodedReferenceFrame(const uint64_t picture_id) override; - void OnIncomingPayloadType(int payload_type) override; - void OnDecoderImplementationName(const char* implementation_name) override; - - // Implements VCMReceiveStatisticsCallback. - void OnReceiveRatesUpdated(uint32_t bit_rate, uint32_t frame_rate) override; - void OnDiscardedPacketsUpdated(int discarded_packets) override; - void OnFrameCountsUpdated(const FrameCounts& frame_counts) override; - - // Implements VCMDecoderTimingCallback. - void OnDecoderTiming(int decode_ms, - int max_decode_ms, - int current_delay_ms, - int target_delay_ms, - int jitter_buffer_ms, - int min_playout_delay_ms, - int render_delay_ms) override; - - void RegisterReceiveStatisticsProxy( - ReceiveStatisticsProxy* receive_statistics_proxy); - - // Implements StatsObserver. - void OnRttUpdate(int64_t avg_rtt_ms, int64_t max_rtt_ms) override; - - private: - // Used for all registered callbacks except rendering. - rtc::CriticalSection crit_; - - vcm::VideoReceiver* const video_receiver_; - - ReceiveStatisticsProxy* const receive_stats_callback_; - rtc::VideoSinkInterface* const incoming_video_stream_; - - // TODO(tommi): This callback is basically the same thing as the one above. - // We shouldn't need to support both. - I420FrameCallback* const pre_render_callback_; - - int64_t last_rtt_ms_ GUARDED_BY(crit_); -}; - -} // namespace webrtc - -#endif // WEBRTC_VIDEO_VIDEO_STREAM_DECODER_H_ diff --git a/WebRtc.NET/include/webrtc/video/vie_encoder.h b/WebRtc.NET/include/webrtc/video/vie_encoder.h deleted file mode 100644 index 4a2ca1f3..00000000 --- a/WebRtc.NET/include/webrtc/video/vie_encoder.h +++ /dev/null @@ -1,249 +0,0 @@ -/* - * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_VIDEO_VIE_ENCODER_H_ -#define WEBRTC_VIDEO_VIE_ENCODER_H_ - -#include -#include -#include - -#include "webrtc/api/video/video_rotation.h" -#include "webrtc/base/criticalsection.h" -#include "webrtc/base/event.h" -#include "webrtc/base/sequenced_task_checker.h" -#include "webrtc/base/task_queue.h" -#include "webrtc/call/call.h" -#include "webrtc/common_types.h" -#include "webrtc/common_video/include/video_bitrate_allocator.h" -#include "webrtc/media/base/videosinkinterface.h" -#include "webrtc/modules/video_coding/include/video_coding_defines.h" -#include "webrtc/modules/video_coding/utility/quality_scaler.h" -#include "webrtc/modules/video_coding/video_coding_impl.h" -#include "webrtc/system_wrappers/include/atomic32.h" -#include "webrtc/typedefs.h" -#include "webrtc/video/overuse_frame_detector.h" -#include "webrtc/video_encoder.h" -#include "webrtc/video_send_stream.h" - -namespace webrtc { - -class ProcessThread; -class SendStatisticsProxy; -class VideoBitrateAllocationObserver; - -// VieEncoder represent a video encoder that accepts raw video frames as input -// and produces an encoded bit stream. -// Usage: -// Instantiate. -// Call SetSink. -// Call SetSource. -// Call ConfigureEncoder with the codec settings. -// Call Stop() when done. -class ViEEncoder : public rtc::VideoSinkInterface, - public EncodedImageCallback, - public VCMSendStatisticsCallback, - public ScalingObserverInterface { - public: - // Interface for receiving encoded video frames and notifications about - // configuration changes. - class EncoderSink : public EncodedImageCallback { - public: - virtual void OnEncoderConfigurationChanged( - std::vector streams, - int min_transmit_bitrate_bps) = 0; - }; - - // Downscale resolution at most 2 times for CPU reasons. - static const int kMaxCpuDowngrades = 2; - - ViEEncoder(uint32_t number_of_cores, - SendStatisticsProxy* stats_proxy, - const VideoSendStream::Config::EncoderSettings& settings, - rtc::VideoSinkInterface* pre_encode_callback, - EncodedFrameObserver* encoder_timing); - ~ViEEncoder(); - // RegisterProcessThread register |module_process_thread| with those objects - // that use it. Registration has to happen on the thread where - // |module_process_thread| was created (libjingle's worker thread). - // TODO(perkj): Replace the use of |module_process_thread| with a TaskQueue. - void RegisterProcessThread(ProcessThread* module_process_thread); - void DeRegisterProcessThread(); - - // Sets the source that will provide I420 video frames. - // |degradation_preference| control whether or not resolution or frame rate - // may be reduced. - void SetSource( - rtc::VideoSourceInterface* source, - const VideoSendStream::DegradationPreference& degradation_preference); - - // Sets the |sink| that gets the encoded frames. |rotation_applied| means - // that the source must support rotation. Only set |rotation_applied| if the - // remote side does not support the rotation extension. - void SetSink(EncoderSink* sink, bool rotation_applied); - - // TODO(perkj): Can we remove VideoCodec.startBitrate ? - void SetStartBitrate(int start_bitrate_bps); - - void SetBitrateObserver(VideoBitrateAllocationObserver* bitrate_observer); - - void ConfigureEncoder(VideoEncoderConfig config, - size_t max_data_payload_length, - bool nack_enabled); - - // Permanently stop encoding. After this method has returned, it is - // guaranteed that no encoded frames will be delivered to the sink. - void Stop(); - - void SendKeyFrame(); - - // virtual to test EncoderStateFeedback with mocks. - virtual void OnReceivedIntraFrameRequest(size_t stream_index); - virtual void OnReceivedSLI(uint8_t picture_id); - virtual void OnReceivedRPSI(uint64_t picture_id); - - void OnBitrateUpdated(uint32_t bitrate_bps, - uint8_t fraction_lost, - int64_t round_trip_time_ms); - - protected: - // Used for testing. For example the |ScalingObserverInterface| methods must - // be called on |encoder_queue_|. - rtc::TaskQueue* encoder_queue() { return &encoder_queue_; } - - // webrtc::ScalingObserverInterface implementation. - // These methods are protected for easier testing. - void ScaleUp(ScaleReason reason) override; - void ScaleDown(ScaleReason reason) override; - - private: - class ConfigureEncoderTask; - class EncodeTask; - class VideoSourceProxy; - - class VideoFrameInfo { - public: - VideoFrameInfo(int width, - int height, - VideoRotation rotation, - bool is_texture) - : width(width), - height(height), - rotation(rotation), - is_texture(is_texture) {} - int width; - int height; - VideoRotation rotation; - bool is_texture; - int pixel_count() const { return width * height; } - }; - - void ConfigureEncoderOnTaskQueue(VideoEncoderConfig config, - size_t max_data_payload_length, - bool nack_enabled); - void ReconfigureEncoder(); - - // Implements VideoSinkInterface. - void OnFrame(const VideoFrame& video_frame) override; - - // Implements VideoSendStatisticsCallback. - void SendStatistics(uint32_t bit_rate, - uint32_t frame_rate) override; - - void EncodeVideoFrame(const VideoFrame& frame, - int64_t time_when_posted_in_ms); - - // Implements EncodedImageCallback. - EncodedImageCallback::Result OnEncodedImage( - const EncodedImage& encoded_image, - const CodecSpecificInfo* codec_specific_info, - const RTPFragmentationHeader* fragmentation) override; - - void OnDroppedFrame() override; - - bool EncoderPaused() const; - void TraceFrameDropStart(); - void TraceFrameDropEnd(); - - rtc::Event shutdown_event_; - - const uint32_t number_of_cores_; - - const std::unique_ptr source_proxy_; - EncoderSink* sink_; - const VideoSendStream::Config::EncoderSettings settings_; - const VideoCodecType codec_type_; - - vcm::VideoSender video_sender_ ACCESS_ON(&encoder_queue_); - OveruseFrameDetector overuse_detector_ ACCESS_ON(&encoder_queue_); - std::unique_ptr quality_scaler_ ACCESS_ON(&encoder_queue_); - - SendStatisticsProxy* const stats_proxy_; - rtc::VideoSinkInterface* const pre_encode_callback_; - ProcessThread* module_process_thread_; - rtc::ThreadChecker module_process_thread_checker_; - // |thread_checker_| checks that public methods that are related to lifetime - // of ViEEncoder are called on the same thread. - rtc::ThreadChecker thread_checker_; - - VideoEncoderConfig encoder_config_ ACCESS_ON(&encoder_queue_); - std::unique_ptr rate_allocator_ - ACCESS_ON(&encoder_queue_); - - // Set when ConfigureEncoder has been called in order to lazy reconfigure the - // encoder on the next frame. - bool pending_encoder_reconfiguration_ ACCESS_ON(&encoder_queue_); - rtc::Optional last_frame_info_ ACCESS_ON(&encoder_queue_); - uint32_t encoder_start_bitrate_bps_ ACCESS_ON(&encoder_queue_); - size_t max_data_payload_length_ ACCESS_ON(&encoder_queue_); - bool nack_enabled_ ACCESS_ON(&encoder_queue_); - uint32_t last_observed_bitrate_bps_ ACCESS_ON(&encoder_queue_); - bool encoder_paused_and_dropped_frame_ ACCESS_ON(&encoder_queue_); - bool has_received_sli_ ACCESS_ON(&encoder_queue_); - uint8_t picture_id_sli_ ACCESS_ON(&encoder_queue_); - bool has_received_rpsi_ ACCESS_ON(&encoder_queue_); - uint64_t picture_id_rpsi_ ACCESS_ON(&encoder_queue_); - Clock* const clock_; - // Counters used for deciding if the video resolution is currently - // restricted, and if so, why. - std::vector scale_counter_ ACCESS_ON(&encoder_queue_); - // Set depending on degradation preferences - bool scaling_enabled_ ACCESS_ON(&encoder_queue_) = false; - - // Pixel count last time the resolution was requested to be changed down. - rtc::Optional max_pixel_count_ ACCESS_ON(&encoder_queue_); - // Pixel count last time the resolution was requested to be changed up. - rtc::Optional max_pixel_count_step_up_ ACCESS_ON(&encoder_queue_); - - rtc::RaceChecker incoming_frame_race_checker_ - GUARDED_BY(incoming_frame_race_checker_); - Atomic32 posted_frames_waiting_for_encode_; - // Used to make sure incoming time stamp is increasing for every frame. - int64_t last_captured_timestamp_ GUARDED_BY(incoming_frame_race_checker_); - // Delta used for translating between NTP and internal timestamps. - const int64_t delta_ntp_internal_ms_ GUARDED_BY(incoming_frame_race_checker_); - - int64_t last_frame_log_ms_ GUARDED_BY(incoming_frame_race_checker_); - int captured_frame_count_ ACCESS_ON(&encoder_queue_); - int dropped_frame_count_ ACCESS_ON(&encoder_queue_); - - VideoBitrateAllocationObserver* bitrate_observer_ ACCESS_ON(&encoder_queue_); - rtc::Optional last_parameters_update_ms_ ACCESS_ON(&encoder_queue_); - - // All public methods are proxied to |encoder_queue_|. It must must be - // destroyed first to make sure no tasks are run that use other members. - rtc::TaskQueue encoder_queue_; - - RTC_DISALLOW_COPY_AND_ASSIGN(ViEEncoder); -}; - -} // namespace webrtc - -#endif // WEBRTC_VIDEO_VIE_ENCODER_H_ diff --git a/WebRtc.NET/include/webrtc/video/vie_remb.h b/WebRtc.NET/include/webrtc/video/vie_remb.h deleted file mode 100644 index d2c60dbe..00000000 --- a/WebRtc.NET/include/webrtc/video/vie_remb.h +++ /dev/null @@ -1,78 +0,0 @@ -/* - * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_VIDEO_VIE_REMB_H_ -#define WEBRTC_VIDEO_VIE_REMB_H_ - -#include -#include -#include - -#include "webrtc/base/criticalsection.h" -#include "webrtc/modules/include/module.h" -#include "webrtc/modules/remote_bitrate_estimator/include/remote_bitrate_estimator.h" -#include "webrtc/modules/rtp_rtcp/include/rtp_rtcp_defines.h" - -namespace webrtc { - -class ProcessThread; -class RtpRtcp; - -class VieRemb : public RemoteBitrateObserver { - public: - explicit VieRemb(Clock* clock); - ~VieRemb(); - - // Called to add a receive channel to include in the REMB packet. - void AddReceiveChannel(RtpRtcp* rtp_rtcp); - - // Removes the specified channel from REMB estimate. - void RemoveReceiveChannel(RtpRtcp* rtp_rtcp); - - // Called to add a module that can generate and send REMB RTCP. - void AddRembSender(RtpRtcp* rtp_rtcp); - - // Removes a REMB RTCP sender. - void RemoveRembSender(RtpRtcp* rtp_rtcp); - - // Returns true if the instance is in use, false otherwise. - bool InUse() const; - - // Called every time there is a new bitrate estimate for a receive channel - // group. This call will trigger a new RTCP REMB packet if the bitrate - // estimate has decreased or if no RTCP REMB packet has been sent for - // a certain time interval. - // Implements RtpReceiveBitrateUpdate. - virtual void OnReceiveBitrateChanged(const std::vector& ssrcs, - uint32_t bitrate); - - private: - typedef std::list RtpModules; - - Clock* const clock_; - rtc::CriticalSection list_crit_; - - // The last time a REMB was sent. - int64_t last_remb_time_; - uint32_t last_send_bitrate_; - - // All RtpRtcp modules to include in the REMB packet. - RtpModules receive_modules_; - - // All modules that can send REMB RTCP. - RtpModules rtcp_sender_; - - // The last bitrate update. - uint32_t bitrate_; -}; - -} // namespace webrtc - -#endif // WEBRTC_VIDEO_VIE_REMB_H_ diff --git a/WebRtc.NET/include/webrtc/video_decoder.h b/WebRtc.NET/include/webrtc/video_decoder.h deleted file mode 100644 index b8d2c96b..00000000 --- a/WebRtc.NET/include/webrtc/video_decoder.h +++ /dev/null @@ -1,79 +0,0 @@ -/* - * Copyright (c) 2014 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_VIDEO_DECODER_H_ -#define WEBRTC_VIDEO_DECODER_H_ - -#include -#include -#include - -#include "webrtc/common_types.h" -#include "webrtc/typedefs.h" -#include "webrtc/video_frame.h" - -namespace webrtc { - -class RTPFragmentationHeader; -// TODO(pbos): Expose these through a public (root) header or change these APIs. -struct CodecSpecificInfo; -class VideoCodec; - -class DecodedImageCallback { - public: - virtual ~DecodedImageCallback() {} - - virtual int32_t Decoded(VideoFrame& decodedImage) = 0; - // Provides an alternative interface that allows the decoder to specify the - // decode time excluding waiting time for any previous pending frame to - // return. This is necessary for breaking positive feedback in the delay - // estimation when the decoder has a single output buffer. - // TODO(perkj): Remove default implementation when chromium has been updated. - virtual int32_t Decoded(VideoFrame& decodedImage, int64_t decode_time_ms) { - // The default implementation ignores custom decode time value. - return Decoded(decodedImage); - } - - virtual int32_t ReceivedDecodedReferenceFrame(const uint64_t pictureId) { - return -1; - } - - virtual int32_t ReceivedDecodedFrame(const uint64_t pictureId) { return -1; } -}; - -class VideoDecoder { - public: - virtual ~VideoDecoder() {} - - virtual int32_t InitDecode(const VideoCodec* codec_settings, - int32_t number_of_cores) = 0; - - virtual int32_t Decode(const EncodedImage& input_image, - bool missing_frames, - const RTPFragmentationHeader* fragmentation, - const CodecSpecificInfo* codec_specific_info = NULL, - int64_t render_time_ms = -1) = 0; - - virtual int32_t RegisterDecodeCompleteCallback( - DecodedImageCallback* callback) = 0; - - virtual int32_t Release() = 0; - - // Returns true if the decoder prefer to decode frames late. - // That is, it can not decode infinite number of frames before the decoded - // frame is consumed. - virtual bool PrefersLateDecoding() const { return true; } - - virtual const char* ImplementationName() const { return "unknown"; } -}; - -} // namespace webrtc - -#endif // WEBRTC_VIDEO_DECODER_H_ diff --git a/WebRtc.NET/include/webrtc/video_encoder.h b/WebRtc.NET/include/webrtc/video_encoder.h deleted file mode 100644 index 0a21fa34..00000000 --- a/WebRtc.NET/include/webrtc/video_encoder.h +++ /dev/null @@ -1,192 +0,0 @@ -/* - * Copyright (c) 2014 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_VIDEO_ENCODER_H_ -#define WEBRTC_VIDEO_ENCODER_H_ - -#include -#include -#include - -#include "webrtc/base/checks.h" -#include "webrtc/common_types.h" -#include "webrtc/typedefs.h" -#include "webrtc/video_frame.h" -#include "webrtc/base/optional.h" - -namespace webrtc { - -class RTPFragmentationHeader; -// TODO(pbos): Expose these through a public (root) header or change these APIs. -struct CodecSpecificInfo; -class VideoCodec; - -class EncodedImageCallback { - public: - virtual ~EncodedImageCallback() {} - - struct Result { - enum Error { - OK, - - // Failed to send the packet. - ERROR_SEND_FAILED, - }; - - Result(Error error) : error(error) {} - Result(Error error, uint32_t frame_id) : error(error), frame_id(frame_id) {} - - Error error; - - // Frame ID assigned to the frame. The frame ID should be the same as the ID - // seen by the receiver for this frame. RTP timestamp of the frame is used - // as frame ID when RTP is used to send video. Must be used only when - // error=OK. - uint32_t frame_id = 0; - - // Tells the encoder that the next frame is should be dropped. - bool drop_next_frame = false; - }; - - // Callback function which is called when an image has been encoded. - virtual Result OnEncodedImage( - const EncodedImage& encoded_image, - const CodecSpecificInfo* codec_specific_info, - const RTPFragmentationHeader* fragmentation) = 0; - - virtual void OnDroppedFrame() {} -}; - -class VideoEncoder { - public: - enum EncoderType { - kH264, - kVp8, - kVp9, - kUnsupportedCodec, - }; - struct QpThresholds { - QpThresholds(int l, int h) : low(l), high(h) {} - QpThresholds() : low(-1), high(-1) {} - int low; - int high; - }; - struct ScalingSettings { - ScalingSettings(bool on, int low, int high) - : enabled(on), - thresholds(rtc::Optional(QpThresholds(low, high))) {} - explicit ScalingSettings(bool on) : enabled(on) {} - const bool enabled; - const rtc::Optional thresholds; - }; - static VideoEncoder* Create(EncoderType codec_type); - // Returns true if this type of encoder can be created using - // VideoEncoder::Create. - static bool IsSupportedSoftware(EncoderType codec_type); - static EncoderType CodecToEncoderType(VideoCodecType codec_type); - - static VideoCodecVP8 GetDefaultVp8Settings(); - static VideoCodecVP9 GetDefaultVp9Settings(); - static VideoCodecH264 GetDefaultH264Settings(); - - virtual ~VideoEncoder() {} - - // Initialize the encoder with the information from the codecSettings - // - // Input: - // - codec_settings : Codec settings - // - number_of_cores : Number of cores available for the encoder - // - max_payload_size : The maximum size each payload is allowed - // to have. Usually MTU - overhead. - // - // Return value : Set bit rate if OK - // <0 - Errors: - // WEBRTC_VIDEO_CODEC_ERR_PARAMETER - // WEBRTC_VIDEO_CODEC_ERR_SIZE - // WEBRTC_VIDEO_CODEC_LEVEL_EXCEEDED - // WEBRTC_VIDEO_CODEC_MEMORY - // WEBRTC_VIDEO_CODEC_ERROR - virtual int32_t InitEncode(const VideoCodec* codec_settings, - int32_t number_of_cores, - size_t max_payload_size) = 0; - - // Register an encode complete callback object. - // - // Input: - // - callback : Callback object which handles encoded images. - // - // Return value : WEBRTC_VIDEO_CODEC_OK if OK, < 0 otherwise. - virtual int32_t RegisterEncodeCompleteCallback( - EncodedImageCallback* callback) = 0; - - // Free encoder memory. - // Return value : WEBRTC_VIDEO_CODEC_OK if OK, < 0 otherwise. - virtual int32_t Release() = 0; - - // Encode an I420 image (as a part of a video stream). The encoded image - // will be returned to the user through the encode complete callback. - // - // Input: - // - frame : Image to be encoded - // - frame_types : Frame type to be generated by the encoder. - // - // Return value : WEBRTC_VIDEO_CODEC_OK if OK - // <0 - Errors: - // WEBRTC_VIDEO_CODEC_ERR_PARAMETER - // WEBRTC_VIDEO_CODEC_MEMORY - // WEBRTC_VIDEO_CODEC_ERROR - // WEBRTC_VIDEO_CODEC_TIMEOUT - virtual int32_t Encode(const VideoFrame& frame, - const CodecSpecificInfo* codec_specific_info, - const std::vector* frame_types) = 0; - - // Inform the encoder of the new packet loss rate and the round-trip time of - // the network. - // - // Input: - // - packet_loss : Fraction lost - // (loss rate in percent = 100 * packetLoss / 255) - // - rtt : Round-trip time in milliseconds - // Return value : WEBRTC_VIDEO_CODEC_OK if OK - // <0 - Errors: WEBRTC_VIDEO_CODEC_ERROR - virtual int32_t SetChannelParameters(uint32_t packet_loss, int64_t rtt) = 0; - - // Inform the encoder about the new target bit rate. - // - // Input: - // - bitrate : New target bit rate - // - framerate : The target frame rate - // - // Return value : WEBRTC_VIDEO_CODEC_OK if OK, < 0 otherwise. - virtual int32_t SetRates(uint32_t bitrate, uint32_t framerate) { - RTC_NOTREACHED() << "SetRate(uint32_t, uint32_t) is deprecated."; - return -1; - } - - // Default fallback: Just use the sum of bitrates as the single target rate. - // TODO(sprang): Remove this default implementation when we remove SetRates(). - virtual int32_t SetRateAllocation(const BitrateAllocation& allocation, - uint32_t framerate) { - return SetRates(allocation.get_sum_kbps(), framerate); - } - - // Any encoder implementation wishing to use the WebRTC provided - // quality scaler must implement this method. - virtual ScalingSettings GetScalingSettings() const { - return ScalingSettings(false); - } - - virtual int32_t SetPeriodicKeyFrames(bool enable) { return -1; } - virtual bool SupportsNativeHandle() const { return false; } - virtual const char* ImplementationName() const { return "unknown"; } -}; - -} // namespace webrtc -#endif // WEBRTC_VIDEO_ENCODER_H_ diff --git a/WebRtc.NET/include/webrtc/video_frame.h b/WebRtc.NET/include/webrtc/video_frame.h deleted file mode 100644 index 3b0c16c1..00000000 --- a/WebRtc.NET/include/webrtc/video_frame.h +++ /dev/null @@ -1,71 +0,0 @@ -/* - * Copyright (c) 2014 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_VIDEO_FRAME_H_ -#define WEBRTC_VIDEO_FRAME_H_ - -// TODO(nisse): This header file should eventually be deleted. For -// declarations of classes related to unencoded video frame, use the -// headers under api/video instead. The EncodedImage class stays in -// this file until we have figured out how to refactor and clean up -// related interfaces. - -#include "webrtc/api/video/video_frame.h" -#include "webrtc/api/video/i420_buffer.h" -#include "webrtc/common_types.h" -#include "webrtc/typedefs.h" - -namespace webrtc { - -// TODO(pbos): Rename EncodedFrame and reformat this class' members. -class EncodedImage { - public: - static const size_t kBufferPaddingBytesH264; - - // Some decoders require encoded image buffers to be padded with a small - // number of additional bytes (due to over-reading byte readers). - static size_t GetBufferPaddingBytes(VideoCodecType codec_type); - - EncodedImage() : EncodedImage(nullptr, 0, 0) {} - - EncodedImage(uint8_t* buffer, size_t length, size_t size) - : _buffer(buffer), _length(length), _size(size) {} - - // TODO(kthelgason): get rid of this struct as it only has a single member - // remaining. - struct AdaptReason { - AdaptReason() : bw_resolutions_disabled(-1) {} - int bw_resolutions_disabled; // Number of resolutions that are not sent - // due to bandwidth for this frame. - // Or -1 if information is not provided. - }; - uint32_t _encodedWidth = 0; - uint32_t _encodedHeight = 0; - uint32_t _timeStamp = 0; - // NTP time of the capture time in local timebase in milliseconds. - int64_t ntp_time_ms_ = 0; - int64_t capture_time_ms_ = 0; - FrameType _frameType = kVideoFrameDelta; - uint8_t* _buffer; - size_t _length; - size_t _size; - VideoRotation rotation_ = kVideoRotation_0; - bool _completeFrame = false; - AdaptReason adapt_reason_; - int qp_ = -1; // Quantizer value. - - // When an application indicates non-zero values here, it is taken as an - // indication that all future frames will be constrained with those limits - // until the application indicates a change again. - PlayoutDelay playout_delay_ = {-1, -1}; -}; - -} // namespace webrtc -#endif // WEBRTC_VIDEO_FRAME_H_ diff --git a/WebRtc.NET/include/webrtc/video_receive_stream.h b/WebRtc.NET/include/webrtc/video_receive_stream.h deleted file mode 100644 index 3a0c358b..00000000 --- a/WebRtc.NET/include/webrtc/video_receive_stream.h +++ /dev/null @@ -1,227 +0,0 @@ -/* - * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_VIDEO_RECEIVE_STREAM_H_ -#define WEBRTC_VIDEO_RECEIVE_STREAM_H_ - -#include -#include -#include -#include - -#include "webrtc/api/call/transport.h" -#include "webrtc/base/platform_file.h" -#include "webrtc/common_types.h" -#include "webrtc/common_video/include/frame_callback.h" -#include "webrtc/config.h" -#include "webrtc/media/base/videosinkinterface.h" - -namespace webrtc { - -class VideoDecoder; - -class VideoReceiveStream { - public: - // TODO(mflodman) Move all these settings to VideoDecoder and move the - // declaration to common_types.h. - struct Decoder { - std::string ToString() const; - - // The actual decoder instance. - VideoDecoder* decoder = nullptr; - - // Received RTP packets with this payload type will be sent to this decoder - // instance. - int payload_type = 0; - - // Name of the decoded payload (such as VP8). Maps back to the depacketizer - // used to unpack incoming packets. - std::string payload_name; - - // This map contains the codec specific parameters from SDP, i.e. the "fmtp" - // parameters. It is the same as cricket::CodecParameterMap used in - // cricket::VideoCodec. - std::map codec_params; - }; - - struct Stats { - std::string ToString(int64_t time_ms) const; - - int network_frame_rate = 0; - int decode_frame_rate = 0; - int render_frame_rate = 0; - - // Decoder stats. - std::string decoder_implementation_name = "unknown"; - FrameCounts frame_counts; - int decode_ms = 0; - int max_decode_ms = 0; - int current_delay_ms = 0; - int target_delay_ms = 0; - int jitter_buffer_ms = 0; - int min_playout_delay_ms = 0; - int render_delay_ms = 10; - uint32_t frames_decoded = 0; - - int current_payload_type = -1; - - int total_bitrate_bps = 0; - int discarded_packets = 0; - - int width = 0; - int height = 0; - - int sync_offset_ms = std::numeric_limits::max(); - - uint32_t ssrc = 0; - std::string c_name; - StreamDataCounters rtp_stats; - RtcpPacketTypeCounter rtcp_packet_type_counts; - RtcpStatistics rtcp_stats; - }; - - struct Config { - private: - // Access to the copy constructor is private to force use of the Copy() - // method for those exceptional cases where we do use it. - Config(const Config&) = default; - - public: - Config() = delete; - Config(Config&&) = default; - explicit Config(Transport* rtcp_send_transport) - : rtcp_send_transport(rtcp_send_transport) {} - - Config& operator=(Config&&) = default; - Config& operator=(const Config&) = delete; - - // Mostly used by tests. Avoid creating copies if you can. - Config Copy() const { return Config(*this); } - - std::string ToString() const; - - // Decoders for every payload that we can receive. - std::vector decoders; - - // Receive-stream specific RTP settings. - struct Rtp { - std::string ToString() const; - - // Synchronization source (stream identifier) to be received. - uint32_t remote_ssrc = 0; - // Sender SSRC used for sending RTCP (such as receiver reports). - uint32_t local_ssrc = 0; - - // See RtcpMode for description. - RtcpMode rtcp_mode = RtcpMode::kCompound; - - // Extended RTCP settings. - struct RtcpXr { - // True if RTCP Receiver Reference Time Report Block extension - // (RFC 3611) should be enabled. - bool receiver_reference_time_report = false; - } rtcp_xr; - - // See draft-alvestrand-rmcat-remb for information. - bool remb = false; - - // See draft-holmer-rmcat-transport-wide-cc-extensions for details. - bool transport_cc = false; - - // See NackConfig for description. - NackConfig nack; - - // See UlpfecConfig for description. - UlpfecConfig ulpfec; - - // RTX settings for incoming video payloads that may be received. RTX is - // disabled if there's no config present. - struct Rtx { - // SSRCs to use for the RTX streams. - uint32_t ssrc = 0; - - // Payload type to use for the RTX stream. - int payload_type = 0; - }; - - // Map from video RTP payload type -> RTX config. - typedef std::map RtxMap; - RtxMap rtx; - - // RTP header extensions used for the received stream. - std::vector extensions; - } rtp; - - // Transport for outgoing packets (RTCP). - Transport* rtcp_send_transport = nullptr; - - // Must not be 'nullptr' when the stream is started. - rtc::VideoSinkInterface* renderer = nullptr; - - // Expected delay needed by the renderer, i.e. the frame will be delivered - // this many milliseconds, if possible, earlier than the ideal render time. - // Only valid if 'renderer' is set. - int render_delay_ms = 10; - - // If set, pass frames on to the renderer as soon as they are - // available. - bool disable_prerenderer_smoothing = false; - - // Identifier for an A/V synchronization group. Empty string to disable. - // TODO(pbos): Synchronize streams in a sync group, not just video streams - // to one of the audio streams. - std::string sync_group; - - // Called for each incoming video frame, i.e. in encoded state. E.g. used - // when - // saving the stream to a file. 'nullptr' disables the callback. - EncodedFrameObserver* pre_decode_callback = nullptr; - - // Called for each decoded frame. E.g. used when adding effects to the - // decoded - // stream. 'nullptr' disables the callback. - // TODO(tommi): This seems to be only used by a test or two. Consider - // removing it (and use an appropriate alternative in the tests) as well - // as the associated code in VideoStreamDecoder. - I420FrameCallback* pre_render_callback = nullptr; - - // Target delay in milliseconds. A positive value indicates this stream is - // used for streaming instead of a real-time call. - int target_delay_ms = 0; - }; - - // Starts stream activity. - // When a stream is active, it can receive, process and deliver packets. - virtual void Start() = 0; - // Stops stream activity. - // When a stream is stopped, it can't receive, process or deliver packets. - virtual void Stop() = 0; - - // TODO(pbos): Add info on currently-received codec to Stats. - virtual Stats GetStats() const = 0; - - // Takes ownership of the file, is responsible for closing it later. - // Calling this method will close and finalize any current log. - // Giving rtc::kInvalidPlatformFileValue disables logging. - // If a frame to be written would make the log too large the write fails and - // the log is closed and finalized. A |byte_limit| of 0 means no limit. - virtual void EnableEncodedFrameRecording(rtc::PlatformFile file, - size_t byte_limit) = 0; - inline void DisableEncodedFrameRecording() { - EnableEncodedFrameRecording(rtc::kInvalidPlatformFileValue, 0); - } - - protected: - virtual ~VideoReceiveStream() {} -}; - -} // namespace webrtc - -#endif // WEBRTC_VIDEO_RECEIVE_STREAM_H_ diff --git a/WebRtc.NET/include/webrtc/video_send_stream.h b/WebRtc.NET/include/webrtc/video_send_stream.h deleted file mode 100644 index 680eb02b..00000000 --- a/WebRtc.NET/include/webrtc/video_send_stream.h +++ /dev/null @@ -1,256 +0,0 @@ -/* - * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_VIDEO_SEND_STREAM_H_ -#define WEBRTC_VIDEO_SEND_STREAM_H_ - -#include -#include -#include -#include -#include - -#include "webrtc/api/call/transport.h" -#include "webrtc/base/platform_file.h" -#include "webrtc/common_types.h" -#include "webrtc/common_video/include/frame_callback.h" -#include "webrtc/config.h" -#include "webrtc/media/base/videosinkinterface.h" -#include "webrtc/media/base/videosourceinterface.h" - -namespace webrtc { - -class VideoEncoder; - -class VideoSendStream { - public: - struct StreamStats { - std::string ToString() const; - - FrameCounts frame_counts; - bool is_rtx = false; - bool is_flexfec = false; - int width = 0; - int height = 0; - // TODO(holmer): Move bitrate_bps out to the webrtc::Call layer. - int total_bitrate_bps = 0; - int retransmit_bitrate_bps = 0; - int avg_delay_ms = 0; - int max_delay_ms = 0; - StreamDataCounters rtp_stats; - RtcpPacketTypeCounter rtcp_packet_type_counts; - RtcpStatistics rtcp_stats; - }; - - struct Stats { - std::string ToString(int64_t time_ms) const; - std::string encoder_implementation_name = "unknown"; - int input_frame_rate = 0; - int encode_frame_rate = 0; - int avg_encode_time_ms = 0; - int encode_usage_percent = 0; - uint32_t frames_encoded = 0; - rtc::Optional qp_sum; - // Bitrate the encoder is currently configured to use due to bandwidth - // limitations. - int target_media_bitrate_bps = 0; - // Bitrate the encoder is actually producing. - int media_bitrate_bps = 0; - // Media bitrate this VideoSendStream is configured to prefer if there are - // no bandwidth limitations. - int preferred_media_bitrate_bps = 0; - bool suspended = false; - bool bw_limited_resolution = false; - bool cpu_limited_resolution = false; - // Total number of times resolution as been requested to be changed due to - // CPU adaptation. - int number_of_cpu_adapt_changes = 0; - std::map substreams; - }; - - struct Config { - public: - Config() = delete; - Config(Config&&) = default; - explicit Config(Transport* send_transport) - : send_transport(send_transport) {} - - Config& operator=(Config&&) = default; - Config& operator=(const Config&) = delete; - - // Mostly used by tests. Avoid creating copies if you can. - Config Copy() const { return Config(*this); } - - std::string ToString() const; - - struct EncoderSettings { - EncoderSettings() = default; - EncoderSettings(std::string payload_name, - int payload_type, - VideoEncoder* encoder) - : payload_name(std::move(payload_name)), - payload_type(payload_type), - encoder(encoder) {} - std::string ToString() const; - - std::string payload_name; - int payload_type = -1; - - // TODO(sophiechang): Delete this field when no one is using internal - // sources anymore. - bool internal_source = false; - - // Allow 100% encoder utilization. Used for HW encoders where CPU isn't - // expected to be the limiting factor, but a chip could be running at - // 30fps (for example) exactly. - bool full_overuse_time = false; - - // Uninitialized VideoEncoder instance to be used for encoding. Will be - // initialized from inside the VideoSendStream. - VideoEncoder* encoder = nullptr; - } encoder_settings; - - static const size_t kDefaultMaxPacketSize = 1500 - 40; // TCP over IPv4. - struct Rtp { - std::string ToString() const; - - std::vector ssrcs; - - // See RtcpMode for description. - RtcpMode rtcp_mode = RtcpMode::kCompound; - - // Max RTP packet size delivered to send transport from VideoEngine. - size_t max_packet_size = kDefaultMaxPacketSize; - - // RTP header extensions to use for this send stream. - std::vector extensions; - - // See NackConfig for description. - NackConfig nack; - - // See UlpfecConfig for description. - UlpfecConfig ulpfec; - - struct Flexfec { - // Payload type of FlexFEC. Set to -1 to disable sending FlexFEC. - int payload_type = -1; - - // SSRC of FlexFEC stream. - uint32_t ssrc = 0; - - // Vector containing a single element, corresponding to the SSRC of the - // media stream being protected by this FlexFEC stream. - // The vector MUST have size 1. - // - // TODO(brandtr): Update comment above when we support - // multistream protection. - std::vector protected_media_ssrcs; - } flexfec; - - // Settings for RTP retransmission payload format, see RFC 4588 for - // details. - struct Rtx { - std::string ToString() const; - // SSRCs to use for the RTX streams. - std::vector ssrcs; - - // Payload type to use for the RTX stream. - int payload_type = -1; - } rtx; - - // RTCP CNAME, see RFC 3550. - std::string c_name; - } rtp; - - // Transport for outgoing packets. - Transport* send_transport = nullptr; - - // Called for each I420 frame before encoding the frame. Can be used for - // effects, snapshots etc. 'nullptr' disables the callback. - rtc::VideoSinkInterface* pre_encode_callback = nullptr; - - // Called for each encoded frame, e.g. used for file storage. 'nullptr' - // disables the callback. Also measures timing and passes the time - // spent on encoding. This timing will not fire if encoding takes longer - // than the measuring window, since the sample data will have been dropped. - EncodedFrameObserver* post_encode_callback = nullptr; - - // Expected delay needed by the renderer, i.e. the frame will be delivered - // this many milliseconds, if possible, earlier than expected render time. - // Only valid if |local_renderer| is set. - int render_delay_ms = 0; - - // Target delay in milliseconds. A positive value indicates this stream is - // used for streaming instead of a real-time call. - int target_delay_ms = 0; - - // True if the stream should be suspended when the available bitrate fall - // below the minimum configured bitrate. If this variable is false, the - // stream may send at a rate higher than the estimated available bitrate. - bool suspend_below_min_bitrate = false; - - // Enables periodic bandwidth probing in application-limited region. - bool periodic_alr_bandwidth_probing = false; - - private: - // Access to the copy constructor is private to force use of the Copy() - // method for those exceptional cases where we do use it. - Config(const Config&) = default; - }; - - // Starts stream activity. - // When a stream is active, it can receive, process and deliver packets. - virtual void Start() = 0; - // Stops stream activity. - // When a stream is stopped, it can't receive, process or deliver packets. - virtual void Stop() = 0; - - // Based on the spec in - // https://w3c.github.io/webrtc-pc/#idl-def-rtcdegradationpreference. - enum class DegradationPreference { - kMaintainResolution, - // TODO(perkj): Implement kMaintainFrameRate. kBalanced will drop frames - // if the encoder overshoots or the encoder can not encode fast enough. - kBalanced, - }; - virtual void SetSource( - rtc::VideoSourceInterface* source, - const DegradationPreference& degradation_preference) = 0; - - // Set which streams to send. Must have at least as many SSRCs as configured - // in the config. Encoder settings are passed on to the encoder instance along - // with the VideoStream settings. - virtual void ReconfigureVideoEncoder(VideoEncoderConfig config) = 0; - - virtual Stats GetStats() = 0; - - // Takes ownership of each file, is responsible for closing them later. - // Calling this method will close and finalize any current logs. - // Some codecs produce multiple streams (VP8 only at present), each of these - // streams will log to a separate file. kMaxSimulcastStreams in common_types.h - // gives the max number of such streams. If there is no file for a stream, or - // the file is rtc::kInvalidPlatformFileValue, frames from that stream will - // not be logged. - // If a frame to be written would make the log too large the write fails and - // the log is closed and finalized. A |byte_limit| of 0 means no limit. - virtual void EnableEncodedFrameRecording( - const std::vector& files, - size_t byte_limit) = 0; - inline void DisableEncodedFrameRecording() { - EnableEncodedFrameRecording(std::vector(), 0); - } - - protected: - virtual ~VideoSendStream() {} -}; - -} // namespace webrtc - -#endif // WEBRTC_VIDEO_SEND_STREAM_H_ diff --git a/WebRtc.NET/include/webrtc/voice_engine/channel.h b/WebRtc.NET/include/webrtc/voice_engine/channel.h deleted file mode 100644 index 62adc5bd..00000000 --- a/WebRtc.NET/include/webrtc/voice_engine/channel.h +++ /dev/null @@ -1,562 +0,0 @@ -/* - * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_VOICE_ENGINE_CHANNEL_H_ -#define WEBRTC_VOICE_ENGINE_CHANNEL_H_ - -#include - -#include "webrtc/api/audio/audio_mixer.h" -#include "webrtc/api/call/audio_sink.h" -#include "webrtc/base/criticalsection.h" -#include "webrtc/base/optional.h" -#include "webrtc/common_audio/resampler/include/push_resampler.h" -#include "webrtc/common_types.h" -#include "webrtc/modules/audio_coding/acm2/codec_manager.h" -#include "webrtc/modules/audio_coding/acm2/rent_a_codec.h" -#include "webrtc/modules/audio_coding/include/audio_coding_module.h" -#include "webrtc/modules/audio_conference_mixer/include/audio_conference_mixer_defines.h" -#include "webrtc/modules/audio_processing/rms_level.h" -#include "webrtc/modules/rtp_rtcp/include/remote_ntp_time_estimator.h" -#include "webrtc/modules/rtp_rtcp/include/rtp_header_parser.h" -#include "webrtc/modules/rtp_rtcp/include/rtp_rtcp.h" -#include "webrtc/voice_engine/file_player.h" -#include "webrtc/voice_engine/file_recorder.h" -#include "webrtc/voice_engine/include/voe_audio_processing.h" -#include "webrtc/voice_engine/include/voe_base.h" -#include "webrtc/voice_engine/include/voe_network.h" -#include "webrtc/voice_engine/level_indicator.h" -#include "webrtc/voice_engine/shared_data.h" -#include "webrtc/voice_engine/voice_engine_defines.h" - -namespace rtc { -class TimestampWrapAroundHandler; -} - -namespace webrtc { - -class AudioDeviceModule; -class FileWrapper; -class PacketRouter; -class ProcessThread; -class RateLimiter; -class ReceiveStatistics; -class RemoteNtpTimeEstimator; -class RtcEventLog; -class RTPPayloadRegistry; -class RtpReceiver; -class RTPReceiverAudio; -class RtpRtcp; -class TelephoneEventHandler; -class VoEMediaProcess; -class VoERTPObserver; -class VoiceEngineObserver; - -struct CallStatistics; -struct ReportBlock; -struct SenderInfo; - -namespace voe { - -class OutputMixer; -class RtcEventLogProxy; -class RtcpRttStatsProxy; -class RtpPacketSenderProxy; -class Statistics; -class StatisticsProxy; -class TransportFeedbackProxy; -class TransmitMixer; -class TransportSequenceNumberProxy; -class VoERtcpObserver; - -// Helper class to simplify locking scheme for members that are accessed from -// multiple threads. -// Example: a member can be set on thread T1 and read by an internal audio -// thread T2. Accessing the member via this class ensures that we are -// safe and also avoid TSan v2 warnings. -class ChannelState { - public: - struct State { - bool input_external_media = false; - bool output_file_playing = false; - bool input_file_playing = false; - bool playing = false; - bool sending = false; - }; - - ChannelState() {} - virtual ~ChannelState() {} - - void Reset() { - rtc::CritScope lock(&lock_); - state_ = State(); - } - - State Get() const { - rtc::CritScope lock(&lock_); - return state_; - } - - void SetInputExternalMedia(bool enable) { - rtc::CritScope lock(&lock_); - state_.input_external_media = enable; - } - - void SetOutputFilePlaying(bool enable) { - rtc::CritScope lock(&lock_); - state_.output_file_playing = enable; - } - - void SetInputFilePlaying(bool enable) { - rtc::CritScope lock(&lock_); - state_.input_file_playing = enable; - } - - void SetPlaying(bool enable) { - rtc::CritScope lock(&lock_); - state_.playing = enable; - } - - void SetSending(bool enable) { - rtc::CritScope lock(&lock_); - state_.sending = enable; - } - - private: - rtc::CriticalSection lock_; - State state_; -}; - -class Channel - : public RtpData, - public RtpFeedback, - public FileCallback, // receiving notification from file player & - // recorder - public Transport, - public AudioPacketizationCallback, // receive encoded packets from the - // ACM - public ACMVADCallback, // receive voice activity from the ACM - public MixerParticipant, // supplies output mixer with audio frames - public OverheadObserver { - public: - friend class VoERtcpObserver; - - enum { KNumSocketThreads = 1 }; - enum { KNumberOfSocketBuffers = 8 }; - virtual ~Channel(); - static int32_t CreateChannel( - Channel*& channel, - int32_t channelId, - uint32_t instanceId, - const VoEBase::ChannelConfig& config); - Channel(int32_t channelId, - uint32_t instanceId, - const VoEBase::ChannelConfig& config); - int32_t Init(); - int32_t SetEngineInformation(Statistics& engineStatistics, - OutputMixer& outputMixer, - TransmitMixer& transmitMixer, - ProcessThread& moduleProcessThread, - AudioDeviceModule& audioDeviceModule, - VoiceEngineObserver* voiceEngineObserver, - rtc::CriticalSection* callbackCritSect); - int32_t UpdateLocalTimeStamp(); - - void SetSink(std::unique_ptr sink); - - // TODO(ossu): Don't use! It's only here to confirm that the decoder factory - // passed into AudioReceiveStream is the same as the one set when creating the - // ADM. Once Channel creation is moved into Audio{Send,Receive}Stream this can - // go. - const rtc::scoped_refptr& GetAudioDecoderFactory() const; - - // API methods - - // VoEBase - int32_t StartPlayout(); - int32_t StopPlayout(); - int32_t StartSend(); - int32_t StopSend(); - void ResetDiscardedPacketCount(); - int32_t RegisterVoiceEngineObserver(VoiceEngineObserver& observer); - int32_t DeRegisterVoiceEngineObserver(); - - // VoECodec - int32_t GetSendCodec(CodecInst& codec); - int32_t GetRecCodec(CodecInst& codec); - int32_t SetSendCodec(const CodecInst& codec); - void SetBitRate(int bitrate_bps, int64_t probing_interval_ms); - int32_t SetVADStatus(bool enableVAD, ACMVADMode mode, bool disableDTX); - int32_t GetVADStatus(bool& enabledVAD, ACMVADMode& mode, bool& disabledDTX); - int32_t SetRecPayloadType(const CodecInst& codec); - int32_t SetRecPayloadType(int payload_type, const SdpAudioFormat& format); - int32_t GetRecPayloadType(CodecInst& codec); - int32_t SetSendCNPayloadType(int type, PayloadFrequencies frequency); - int SetOpusMaxPlaybackRate(int frequency_hz); - int SetOpusDtx(bool enable_dtx); - int GetOpusDtx(bool* enabled); - bool EnableAudioNetworkAdaptor(const std::string& config_string); - void DisableAudioNetworkAdaptor(); - void SetReceiverFrameLengthRange(int min_frame_length_ms, - int max_frame_length_ms); - - // VoENetwork - int32_t RegisterExternalTransport(Transport* transport); - int32_t DeRegisterExternalTransport(); - int32_t ReceivedRTPPacket(const uint8_t* received_packet, - size_t length, - const PacketTime& packet_time); - int32_t ReceivedRTCPPacket(const uint8_t* data, size_t length); - - // VoEFile - int StartPlayingFileLocally(const char* fileName, - bool loop, - FileFormats format, - int startPosition, - float volumeScaling, - int stopPosition, - const CodecInst* codecInst); - int StartPlayingFileLocally(InStream* stream, - FileFormats format, - int startPosition, - float volumeScaling, - int stopPosition, - const CodecInst* codecInst); - int StopPlayingFileLocally(); - int IsPlayingFileLocally() const; - int RegisterFilePlayingToMixer(); - int StartPlayingFileAsMicrophone(const char* fileName, - bool loop, - FileFormats format, - int startPosition, - float volumeScaling, - int stopPosition, - const CodecInst* codecInst); - int StartPlayingFileAsMicrophone(InStream* stream, - FileFormats format, - int startPosition, - float volumeScaling, - int stopPosition, - const CodecInst* codecInst); - int StopPlayingFileAsMicrophone(); - int IsPlayingFileAsMicrophone() const; - int StartRecordingPlayout(const char* fileName, const CodecInst* codecInst); - int StartRecordingPlayout(OutStream* stream, const CodecInst* codecInst); - int StopRecordingPlayout(); - - void SetMixWithMicStatus(bool mix); - - // VoEExternalMediaProcessing - int RegisterExternalMediaProcessing(ProcessingTypes type, - VoEMediaProcess& processObject); - int DeRegisterExternalMediaProcessing(ProcessingTypes type); - int SetExternalMixing(bool enabled); - - // VoEVolumeControl - int GetSpeechOutputLevel(uint32_t& level) const; - int GetSpeechOutputLevelFullRange(uint32_t& level) const; - int SetInputMute(bool enable); - bool InputMute() const; - int SetOutputVolumePan(float left, float right); - int GetOutputVolumePan(float& left, float& right) const; - int SetChannelOutputVolumeScaling(float scaling); - int GetChannelOutputVolumeScaling(float& scaling) const; - - // VoENetEqStats - int GetNetworkStatistics(NetworkStatistics& stats); - void GetDecodingCallStatistics(AudioDecodingCallStats* stats) const; - - // VoEVideoSync - bool GetDelayEstimate(int* jitter_buffer_delay_ms, - int* playout_buffer_delay_ms) const; - uint32_t GetDelayEstimate() const; - int LeastRequiredDelayMs() const; - int SetMinimumPlayoutDelay(int delayMs); - int GetPlayoutTimestamp(unsigned int& timestamp); - int SetInitTimestamp(unsigned int timestamp); - int SetInitSequenceNumber(short sequenceNumber); - - // VoEVideoSyncExtended - int GetRtpRtcp(RtpRtcp** rtpRtcpModule, RtpReceiver** rtp_receiver) const; - - // DTMF - int SendTelephoneEventOutband(int event, int duration_ms); - int SetSendTelephoneEventPayloadType(int payload_type, int payload_frequency); - - // VoEAudioProcessingImpl - int VoiceActivityIndicator(int& activity); - - // VoERTP_RTCP - int SetLocalSSRC(unsigned int ssrc); - int GetLocalSSRC(unsigned int& ssrc); - int GetRemoteSSRC(unsigned int& ssrc); - int SetSendAudioLevelIndicationStatus(bool enable, unsigned char id); - int SetReceiveAudioLevelIndicationStatus(bool enable, unsigned char id); - int SetSendAbsoluteSenderTimeStatus(bool enable, unsigned char id); - int SetReceiveAbsoluteSenderTimeStatus(bool enable, unsigned char id); - void EnableSendTransportSequenceNumber(int id); - void EnableReceiveTransportSequenceNumber(int id); - - void RegisterSenderCongestionControlObjects( - RtpPacketSender* rtp_packet_sender, - TransportFeedbackObserver* transport_feedback_observer, - PacketRouter* packet_router); - void RegisterReceiverCongestionControlObjects(PacketRouter* packet_router); - void ResetCongestionControlObjects(); - - void SetRTCPStatus(bool enable); - int GetRTCPStatus(bool& enabled); - int SetRTCP_CNAME(const char cName[256]); - int GetRemoteRTCP_CNAME(char cName[256]); - int GetRemoteRTCPData(unsigned int& NTPHigh, - unsigned int& NTPLow, - unsigned int& timestamp, - unsigned int& playoutTimestamp, - unsigned int* jitter, - unsigned short* fractionLost); - int SendApplicationDefinedRTCPPacket(unsigned char subType, - unsigned int name, - const char* data, - unsigned short dataLengthInBytes); - int GetRTPStatistics(unsigned int& averageJitterMs, - unsigned int& maxJitterMs, - unsigned int& discardedPackets); - int GetRemoteRTCPReportBlocks(std::vector* report_blocks); - int GetRTPStatistics(CallStatistics& stats); - int SetCodecFECStatus(bool enable); - bool GetCodecFECStatus(); - void SetNACKStatus(bool enable, int maxNumberOfPackets); - - // From AudioPacketizationCallback in the ACM - int32_t SendData(FrameType frameType, - uint8_t payloadType, - uint32_t timeStamp, - const uint8_t* payloadData, - size_t payloadSize, - const RTPFragmentationHeader* fragmentation) override; - - // From ACMVADCallback in the ACM - int32_t InFrameType(FrameType frame_type) override; - - // From RtpData in the RTP/RTCP module - int32_t OnReceivedPayloadData(const uint8_t* payloadData, - size_t payloadSize, - const WebRtcRTPHeader* rtpHeader) override; - bool OnRecoveredPacket(const uint8_t* packet, size_t packet_length) override; - - // From RtpFeedback in the RTP/RTCP module - int32_t OnInitializeDecoder(int8_t payloadType, - const char payloadName[RTP_PAYLOAD_NAME_SIZE], - int frequency, - size_t channels, - uint32_t rate) override; - void OnIncomingSSRCChanged(uint32_t ssrc) override; - void OnIncomingCSRCChanged(uint32_t CSRC, bool added) override; - - // From Transport (called by the RTP/RTCP module) - bool SendRtp(const uint8_t* data, - size_t len, - const PacketOptions& packet_options) override; - bool SendRtcp(const uint8_t* data, size_t len) override; - - // From MixerParticipant - MixerParticipant::AudioFrameInfo GetAudioFrameWithMuted( - int32_t id, - AudioFrame* audioFrame) override; - int32_t NeededFrequency(int32_t id) const override; - - // From AudioMixer::Source. - AudioMixer::Source::AudioFrameInfo GetAudioFrameWithInfo( - int sample_rate_hz, - AudioFrame* audio_frame); - - // From FileCallback - void PlayNotification(int32_t id, uint32_t durationMs) override; - void RecordNotification(int32_t id, uint32_t durationMs) override; - void PlayFileEnded(int32_t id) override; - void RecordFileEnded(int32_t id) override; - - uint32_t InstanceId() const { return _instanceId; } - int32_t ChannelId() const { return _channelId; } - bool Playing() const { return channel_state_.Get().playing; } - bool Sending() const { return channel_state_.Get().sending; } - bool ExternalTransport() const { - rtc::CritScope cs(&_callbackCritSect); - return _externalTransport; - } - bool ExternalMixing() const { return _externalMixing; } - RtpRtcp* RtpRtcpModulePtr() const { return _rtpRtcpModule.get(); } - int8_t OutputEnergyLevel() const { return _outputAudioLevel.Level(); } - uint32_t Demultiplex(const AudioFrame& audioFrame); - // Demultiplex the data to the channel's |_audioFrame|. The difference - // between this method and the overloaded method above is that |audio_data| - // does not go through transmit_mixer and APM. - void Demultiplex(const int16_t* audio_data, - int sample_rate, - size_t number_of_frames, - size_t number_of_channels); - uint32_t PrepareEncodeAndSend(int mixingFrequency); - uint32_t EncodeAndSend(); - - // Associate to a send channel. - // Used for obtaining RTT for a receive-only channel. - void set_associate_send_channel(const ChannelOwner& channel); - // Disassociate a send channel if it was associated. - void DisassociateSendChannel(int channel_id); - - // Set a RtcEventLog logging object. - void SetRtcEventLog(RtcEventLog* event_log); - - void SetRtcpRttStats(RtcpRttStats* rtcp_rtt_stats); - void SetTransportOverhead(size_t transport_overhead_per_packet); - - // From OverheadObserver in the RTP/RTCP module - void OnOverheadChanged(size_t overhead_bytes_per_packet) override; - - protected: - void OnIncomingFractionLoss(int fraction_lost); - - private: - bool ReceivePacket(const uint8_t* packet, - size_t packet_length, - const RTPHeader& header, - bool in_order); - bool HandleRtxPacket(const uint8_t* packet, - size_t packet_length, - const RTPHeader& header); - bool IsPacketInOrder(const RTPHeader& header) const; - bool IsPacketRetransmitted(const RTPHeader& header, bool in_order) const; - int ResendPackets(const uint16_t* sequence_numbers, int length); - int32_t MixOrReplaceAudioWithFile(int mixingFrequency); - int32_t MixAudioWithFile(AudioFrame& audioFrame, int mixingFrequency); - void UpdatePlayoutTimestamp(bool rtcp); - void RegisterReceiveCodecsToRTPModule(); - - int SetSendRtpHeaderExtension(bool enable, - RTPExtensionType type, - unsigned char id); - - void UpdateOverheadForEncoder(); - - int GetRtpTimestampRateHz() const; - int64_t GetRTT(bool allow_associate_channel) const; - - rtc::CriticalSection _fileCritSect; - rtc::CriticalSection _callbackCritSect; - rtc::CriticalSection volume_settings_critsect_; - uint32_t _instanceId; - int32_t _channelId; - - ChannelState channel_state_; - - std::unique_ptr event_log_proxy_; - std::unique_ptr rtcp_rtt_stats_proxy_; - - std::unique_ptr rtp_header_parser_; - std::unique_ptr rtp_payload_registry_; - std::unique_ptr rtp_receive_statistics_; - std::unique_ptr statistics_proxy_; - std::unique_ptr rtp_receiver_; - TelephoneEventHandler* telephone_event_handler_; - std::unique_ptr _rtpRtcpModule; - std::unique_ptr audio_coding_; - acm2::CodecManager codec_manager_; - acm2::RentACodec rent_a_codec_; - std::unique_ptr audio_sink_; - AudioLevel _outputAudioLevel; - bool _externalTransport; - AudioFrame _audioFrame; - // Downsamples to the codec rate if necessary. - PushResampler input_resampler_; - std::unique_ptr input_file_player_; - std::unique_ptr output_file_player_; - std::unique_ptr output_file_recorder_; - int _inputFilePlayerId; - int _outputFilePlayerId; - int _outputFileRecorderId; - bool _outputFileRecording; - bool _outputExternalMedia; - VoEMediaProcess* _inputExternalMediaCallbackPtr; - VoEMediaProcess* _outputExternalMediaCallbackPtr; - uint32_t _timeStamp; - - RemoteNtpTimeEstimator ntp_estimator_ GUARDED_BY(ts_stats_lock_); - - // Timestamp of the audio pulled from NetEq. - rtc::Optional jitter_buffer_playout_timestamp_; - uint32_t playout_timestamp_rtp_ GUARDED_BY(video_sync_lock_); - uint32_t playout_timestamp_rtcp_; - uint32_t playout_delay_ms_ GUARDED_BY(video_sync_lock_); - uint32_t _numberOfDiscardedPackets; - uint16_t send_sequence_number_; - uint8_t restored_packet_[kVoiceEngineMaxIpPacketSizeBytes]; - - rtc::CriticalSection ts_stats_lock_; - - std::unique_ptr rtp_ts_wraparound_handler_; - // The rtp timestamp of the first played out audio frame. - int64_t capture_start_rtp_time_stamp_; - // The capture ntp time (in local timebase) of the first played out audio - // frame. - int64_t capture_start_ntp_time_ms_ GUARDED_BY(ts_stats_lock_); - - // uses - Statistics* _engineStatisticsPtr; - OutputMixer* _outputMixerPtr; - TransmitMixer* _transmitMixerPtr; - ProcessThread* _moduleProcessThreadPtr; - AudioDeviceModule* _audioDeviceModulePtr; - VoiceEngineObserver* _voiceEngineObserverPtr; // owned by base - rtc::CriticalSection* _callbackCritSectPtr; // owned by base - Transport* _transportPtr; // WebRtc socket or external transport - RmsLevel rms_level_; - int32_t _sendFrameType; // Send data is voice, 1-voice, 0-otherwise - // VoEBase - bool _externalMixing; - bool _mixFileWithMicrophone; - // VoEVolumeControl - bool input_mute_ GUARDED_BY(volume_settings_critsect_); - bool previous_frame_muted_; // Only accessed from PrepareEncodeAndSend(). - float _panLeft GUARDED_BY(volume_settings_critsect_); - float _panRight GUARDED_BY(volume_settings_critsect_); - float _outputGain GUARDED_BY(volume_settings_critsect_); - // VoeRTP_RTCP - uint32_t _lastLocalTimeStamp; - int8_t _lastPayloadType; - bool _includeAudioLevelIndication; - size_t transport_overhead_per_packet_; - size_t rtp_overhead_per_packet_; - // VoENetwork - AudioFrame::SpeechType _outputSpeechType; - // VoEVideoSync - rtc::CriticalSection video_sync_lock_; - // VoEAudioProcessing - bool restored_packet_in_use_; - // RtcpBandwidthObserver - std::unique_ptr rtcp_observer_; - // An associated send channel. - rtc::CriticalSection assoc_send_channel_lock_; - ChannelOwner associate_send_channel_ GUARDED_BY(assoc_send_channel_lock_); - - bool pacing_enabled_; - PacketRouter* packet_router_ = nullptr; - std::unique_ptr feedback_observer_proxy_; - std::unique_ptr seq_num_allocator_proxy_; - std::unique_ptr rtp_packet_sender_proxy_; - std::unique_ptr retransmission_rate_limiter_; - - // TODO(ossu): Remove once GetAudioDecoderFactory() is no longer needed. - rtc::scoped_refptr decoder_factory_; -}; - -} // namespace voe -} // namespace webrtc - -#endif // WEBRTC_VOICE_ENGINE_CHANNEL_H_ diff --git a/WebRtc.NET/include/webrtc/voice_engine/channel_manager.h b/WebRtc.NET/include/webrtc/voice_engine/channel_manager.h deleted file mode 100644 index ae16aca2..00000000 --- a/WebRtc.NET/include/webrtc/voice_engine/channel_manager.h +++ /dev/null @@ -1,124 +0,0 @@ -/* - * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_VOICE_ENGINE_CHANNEL_MANAGER_H -#define WEBRTC_VOICE_ENGINE_CHANNEL_MANAGER_H - -#include -#include - -#include "webrtc/base/constructormagic.h" -#include "webrtc/base/criticalsection.h" -#include "webrtc/base/scoped_ref_ptr.h" -#include "webrtc/system_wrappers/include/atomic32.h" -#include "webrtc/typedefs.h" -#include "webrtc/voice_engine/include/voe_base.h" - -namespace webrtc { - -class AudioDecoderFactory; - -namespace voe { - -class Channel; - -// Shared-pointer implementation for keeping track of Channels. The underlying -// shared instance will be dropped when no more ChannelOwners point to it. -// -// One common source of ChannelOwner instances are -// ChannelManager::CreateChannel() and ChannelManager::GetChannel(...). -// It has a similar use case to shared_ptr in C++11. Should this move to C++11 -// in the future, this class should be replaced by exactly that. -// -// To access the underlying Channel, use .channel(). -// IsValid() implements a convenience method as an alternative for checking -// whether the underlying pointer is NULL or not. -// -// Channel channel_owner = channel_manager.GetChannel(channel_id); -// if (channel_owner.IsValid()) -// channel_owner.channel()->...; -// -class ChannelOwner { - public: - explicit ChannelOwner(Channel* channel); - ChannelOwner(const ChannelOwner& channel_owner); - - ~ChannelOwner(); - - ChannelOwner& operator=(const ChannelOwner& other); - - Channel* channel() const { return channel_ref_->channel.get(); } - bool IsValid() { return channel_ref_->channel.get() != NULL; } - int use_count() const { return channel_ref_->ref_count.Value(); } - private: - // Shared instance of a Channel. Copying ChannelOwners increase the reference - // count and destroying ChannelOwners decrease references. Channels are - // deleted when no references to them are held. - struct ChannelRef { - ChannelRef(Channel* channel); - const std::unique_ptr channel; - Atomic32 ref_count; - }; - - ChannelRef* channel_ref_; -}; - -class ChannelManager { - public: - ChannelManager(uint32_t instance_id); - - // Upon construction of an Iterator it will grab a copy of the channel list of - // the ChannelManager. The iteration will then occur over this state, not the - // current one of the ChannelManager. As the Iterator holds its own references - // to the Channels, they will remain valid even if they are removed from the - // ChannelManager. - class Iterator { - public: - explicit Iterator(ChannelManager* channel_manager); - - Channel* GetChannel(); - bool IsValid(); - - void Increment(); - - private: - size_t iterator_pos_; - std::vector channels_; - - RTC_DISALLOW_COPY_AND_ASSIGN(Iterator); - }; - - // CreateChannel will always return a valid ChannelOwner instance. - ChannelOwner CreateChannel(const VoEBase::ChannelConfig& config); - - // ChannelOwner.channel() will be NULL if channel_id is invalid or no longer - // exists. This should be checked with ChannelOwner::IsValid(). - ChannelOwner GetChannel(int32_t channel_id); - void GetAllChannels(std::vector* channels); - - void DestroyChannel(int32_t channel_id); - void DestroyAllChannels(); - - size_t NumOfChannels() const; - - private: - uint32_t instance_id_; - - Atomic32 last_channel_id_; - - rtc::CriticalSection lock_; - std::vector channels_; - - RTC_DISALLOW_COPY_AND_ASSIGN(ChannelManager); -}; -} // namespace voe -} // namespace webrtc - -#endif // WEBRTC_VOICE_ENGINE_CHANNEL_MANAGER_H diff --git a/WebRtc.NET/include/webrtc/voice_engine/channel_proxy.h b/WebRtc.NET/include/webrtc/voice_engine/channel_proxy.h deleted file mode 100644 index 4bd76a4b..00000000 --- a/WebRtc.NET/include/webrtc/voice_engine/channel_proxy.h +++ /dev/null @@ -1,117 +0,0 @@ -/* - * Copyright (c) 2015 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_VOICE_ENGINE_CHANNEL_PROXY_H_ -#define WEBRTC_VOICE_ENGINE_CHANNEL_PROXY_H_ - -#include "webrtc/api/audio/audio_mixer.h" -#include "webrtc/base/constructormagic.h" -#include "webrtc/base/race_checker.h" -#include "webrtc/base/thread_checker.h" -#include "webrtc/voice_engine/channel_manager.h" -#include "webrtc/voice_engine/include/voe_rtp_rtcp.h" - -#include -#include -#include - -namespace webrtc { - -class AudioSinkInterface; -class PacketRouter; -class RtcEventLog; -class RtcpRttStats; -class RtpPacketSender; -class Transport; -class TransportFeedbackObserver; - -namespace voe { - -class Channel; - -// This class provides the "view" of a voe::Channel that we need to implement -// webrtc::AudioSendStream and webrtc::AudioReceiveStream. It serves two -// purposes: -// 1. Allow mocking just the interfaces used, instead of the entire -// voe::Channel class. -// 2. Provide a refined interface for the stream classes, including assumptions -// on return values and input adaptation. -class ChannelProxy { - public: - ChannelProxy(); - explicit ChannelProxy(const ChannelOwner& channel_owner); - virtual ~ChannelProxy(); - - virtual void SetRTCPStatus(bool enable); - virtual void SetLocalSSRC(uint32_t ssrc); - virtual void SetRTCP_CNAME(const std::string& c_name); - virtual void SetNACKStatus(bool enable, int max_packets); - virtual void SetSendAudioLevelIndicationStatus(bool enable, int id); - virtual void SetReceiveAudioLevelIndicationStatus(bool enable, int id); - virtual void EnableSendTransportSequenceNumber(int id); - virtual void EnableReceiveTransportSequenceNumber(int id); - virtual void RegisterSenderCongestionControlObjects( - RtpPacketSender* rtp_packet_sender, - TransportFeedbackObserver* transport_feedback_observer, - PacketRouter* packet_router); - virtual void RegisterReceiverCongestionControlObjects( - PacketRouter* packet_router); - virtual void ResetCongestionControlObjects(); - virtual CallStatistics GetRTCPStatistics() const; - virtual std::vector GetRemoteRTCPReportBlocks() const; - virtual NetworkStatistics GetNetworkStatistics() const; - virtual AudioDecodingCallStats GetDecodingCallStatistics() const; - virtual int32_t GetSpeechOutputLevelFullRange() const; - virtual uint32_t GetDelayEstimate() const; - virtual bool SetSendTelephoneEventPayloadType(int payload_type, - int payload_frequency); - virtual bool SendTelephoneEventOutband(int event, int duration_ms); - virtual void SetBitrate(int bitrate_bps, int64_t probing_interval_ms); - virtual void SetRecPayloadType(int payload_type, - const SdpAudioFormat& format); - virtual void SetSink(std::unique_ptr sink); - virtual void SetInputMute(bool muted); - virtual void RegisterExternalTransport(Transport* transport); - virtual void DeRegisterExternalTransport(); - virtual bool ReceivedRTPPacket(const uint8_t* packet, - size_t length, - const PacketTime& packet_time); - virtual bool ReceivedRTCPPacket(const uint8_t* packet, size_t length); - virtual const rtc::scoped_refptr& - GetAudioDecoderFactory() const; - virtual void SetChannelOutputVolumeScaling(float scaling); - virtual void SetRtcEventLog(RtcEventLog* event_log); - virtual void EnableAudioNetworkAdaptor(const std::string& config_string); - virtual void DisableAudioNetworkAdaptor(); - virtual void SetReceiverFrameLengthRange(int min_frame_length_ms, - int max_frame_length_ms); - virtual AudioMixer::Source::AudioFrameInfo GetAudioFrameWithInfo( - int sample_rate_hz, - AudioFrame* audio_frame); - virtual int NeededFrequency() const; - virtual void SetTransportOverhead(int transport_overhead_per_packet); - virtual void AssociateSendChannel(const ChannelProxy& send_channel_proxy); - virtual void DisassociateSendChannel(); - - virtual void SetRtcpRttStats(RtcpRttStats* rtcp_rtt_stats); - - private: - Channel* channel() const; - - rtc::ThreadChecker thread_checker_; - rtc::RaceChecker race_checker_; - ChannelOwner channel_owner_; - - RTC_DISALLOW_COPY_AND_ASSIGN(ChannelProxy); -}; -} // namespace voe -} // namespace webrtc - -#endif // WEBRTC_VOICE_ENGINE_CHANNEL_PROXY_H_ diff --git a/WebRtc.NET/include/webrtc/voice_engine/coder.h b/WebRtc.NET/include/webrtc/voice_engine/coder.h deleted file mode 100644 index 5e16b0af..00000000 --- a/WebRtc.NET/include/webrtc/voice_engine/coder.h +++ /dev/null @@ -1,68 +0,0 @@ -/* - * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_VOICE_ENGINE_CODER_H_ -#define WEBRTC_VOICE_ENGINE_CODER_H_ - -#include - -#include "webrtc/common_types.h" -#include "webrtc/modules/audio_coding/acm2/codec_manager.h" -#include "webrtc/modules/audio_coding/acm2/rent_a_codec.h" -#include "webrtc/modules/audio_coding/include/audio_coding_module.h" -#include "webrtc/typedefs.h" - -namespace webrtc { -class AudioFrame; - -class AudioCoder : public AudioPacketizationCallback { - public: - explicit AudioCoder(uint32_t instance_id); - ~AudioCoder(); - - int32_t SetEncodeCodec(const CodecInst& codec_inst); - - int32_t SetDecodeCodec(const CodecInst& codec_inst); - - int32_t Decode(AudioFrame* decoded_audio, - uint32_t samp_freq_hz, - const int8_t* incoming_payload, - size_t payload_length); - - int32_t PlayoutData(AudioFrame* decoded_audio, uint16_t samp_freq_hz); - - int32_t Encode(const AudioFrame& audio, - int8_t* encoded_data, - size_t* encoded_length_in_bytes); - - protected: - int32_t SendData(FrameType frame_type, - uint8_t payload_type, - uint32_t time_stamp, - const uint8_t* payload_data, - size_t payload_size, - const RTPFragmentationHeader* fragmentation) override; - - private: - std::unique_ptr acm_; - acm2::CodecManager codec_manager_; - acm2::RentACodec rent_a_codec_; - - CodecInst receive_codec_; - - uint32_t encode_timestamp_; - int8_t* encoded_data_; - size_t encoded_length_in_bytes_; - - uint32_t decode_timestamp_; -}; -} // namespace webrtc - -#endif // WEBRTC_VOICE_ENGINE_CODER_H_ diff --git a/WebRtc.NET/include/webrtc/voice_engine/file_player.h b/WebRtc.NET/include/webrtc/voice_engine/file_player.h deleted file mode 100644 index 956016f0..00000000 --- a/WebRtc.NET/include/webrtc/voice_engine/file_player.h +++ /dev/null @@ -1,80 +0,0 @@ -/* - * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_VOICE_ENGINE_FILE_PLAYER_H_ -#define WEBRTC_VOICE_ENGINE_FILE_PLAYER_H_ - -#include - -#include "webrtc/common_types.h" -#include "webrtc/modules/include/module_common_types.h" -#include "webrtc/typedefs.h" - -namespace webrtc { - -class FileCallback; - -class FilePlayer { - public: - // The largest decoded frame size in samples (60ms with 32kHz sample rate). - enum { MAX_AUDIO_BUFFER_IN_SAMPLES = 60 * 32 }; - enum { MAX_AUDIO_BUFFER_IN_BYTES = MAX_AUDIO_BUFFER_IN_SAMPLES * 2 }; - - // Note: will return NULL for unsupported formats. - static std::unique_ptr CreateFilePlayer( - const uint32_t instanceID, - const FileFormats fileFormat); - - virtual ~FilePlayer() = default; - - // Read 10 ms of audio at |frequencyInHz| to |outBuffer|. |lengthInSamples| - // will be set to the number of samples read (not the number of samples per - // channel). - virtual int Get10msAudioFromFile(int16_t* outBuffer, - size_t* lengthInSamples, - int frequencyInHz) = 0; - - // Register callback for receiving file playing notifications. - virtual int32_t RegisterModuleFileCallback(FileCallback* callback) = 0; - - // API for playing audio from fileName to channel. - // Note: codecInst is used for pre-encoded files. - virtual int32_t StartPlayingFile(const char* fileName, - bool loop, - uint32_t startPosition, - float volumeScaling, - uint32_t notification, - uint32_t stopPosition, - const CodecInst* codecInst) = 0; - - // Note: codecInst is used for pre-encoded files. - virtual int32_t StartPlayingFile(InStream* sourceStream, - uint32_t startPosition, - float volumeScaling, - uint32_t notification, - uint32_t stopPosition, - const CodecInst* codecInst) = 0; - - virtual int32_t StopPlayingFile() = 0; - - virtual bool IsPlayingFile() const = 0; - - virtual int32_t GetPlayoutPosition(uint32_t* durationMs) = 0; - - // Set audioCodec to the currently used audio codec. - virtual int32_t AudioCodec(CodecInst* audioCodec) const = 0; - - virtual int32_t Frequency() const = 0; - - // Note: scaleFactor is in the range [0.0 - 2.0] - virtual int32_t SetAudioScaling(float scaleFactor) = 0; -}; -} // namespace webrtc -#endif // WEBRTC_VOICE_ENGINE_FILE_PLAYER_H_ diff --git a/WebRtc.NET/include/webrtc/voice_engine/file_recorder.h b/WebRtc.NET/include/webrtc/voice_engine/file_recorder.h deleted file mode 100644 index c4195d0e..00000000 --- a/WebRtc.NET/include/webrtc/voice_engine/file_recorder.h +++ /dev/null @@ -1,57 +0,0 @@ -/* - * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_VOICE_ENGINE_FILE_RECORDER_H_ -#define WEBRTC_VOICE_ENGINE_FILE_RECORDER_H_ - -#include - -#include "webrtc/common_types.h" -#include "webrtc/modules/include/module_common_types.h" -#include "webrtc/modules/media_file/media_file_defines.h" -#include "webrtc/typedefs.h" - -namespace webrtc { - -class FileRecorder { - public: - // Note: will return NULL for unsupported formats. - static std::unique_ptr CreateFileRecorder( - const uint32_t instanceID, - const FileFormats fileFormat); - - virtual ~FileRecorder() = default; - - virtual int32_t RegisterModuleFileCallback(FileCallback* callback) = 0; - - virtual FileFormats RecordingFileFormat() const = 0; - - virtual int32_t StartRecordingAudioFile(const char* fileName, - const CodecInst& codecInst, - uint32_t notification) = 0; - - virtual int32_t StartRecordingAudioFile(OutStream* destStream, - const CodecInst& codecInst, - uint32_t notification) = 0; - - // Stop recording. - virtual int32_t StopRecording() = 0; - - // Return true if recording. - virtual bool IsRecording() const = 0; - - virtual int32_t codec_info(CodecInst* codecInst) const = 0; - - // Write frame to file. Frame should contain 10ms of un-ecoded audio data. - virtual int32_t RecordAudioToFile(const AudioFrame& frame) = 0; -}; - -} // namespace webrtc -#endif // WEBRTC_VOICE_ENGINE_FILE_RECORDER_H_ diff --git a/WebRtc.NET/include/webrtc/voice_engine/include/voe_audio_processing.h b/WebRtc.NET/include/webrtc/voice_engine/include/voe_audio_processing.h deleted file mode 100644 index 343cea99..00000000 --- a/WebRtc.NET/include/webrtc/voice_engine/include/voe_audio_processing.h +++ /dev/null @@ -1,195 +0,0 @@ -/* - * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -// This sub-API supports the following functionalities: -// -// - Noise Suppression (NS). -// - Automatic Gain Control (AGC). -// - Echo Control (EC). -// - Receiving side VAD, NS and AGC. -// - Measurements of instantaneous speech, noise and echo levels. -// - Generation of AP debug recordings. -// - Detection of keyboard typing which can disrupt a voice conversation. -// -// Usage example, omitting error checking: -// -// using namespace webrtc; -// VoiceEngine* voe = VoiceEngine::Create(); -// VoEBase* base = VoEBase::GetInterface(); -// VoEAudioProcessing* ap = VoEAudioProcessing::GetInterface(voe); -// base->Init(); -// ap->SetEcStatus(true, kAgcAdaptiveAnalog); -// ... -// base->Terminate(); -// base->Release(); -// ap->Release(); -// VoiceEngine::Delete(voe); -// -#ifndef WEBRTC_VOICE_ENGINE_VOE_AUDIO_PROCESSING_H -#define WEBRTC_VOICE_ENGINE_VOE_AUDIO_PROCESSING_H - -#include - -#include "webrtc/common_types.h" - -namespace webrtc { - -class VoiceEngine; - -// VoEAudioProcessing -class WEBRTC_DLLEXPORT VoEAudioProcessing { - public: - // Factory for the VoEAudioProcessing sub-API. Increases an internal - // reference counter if successful. Returns NULL if the API is not - // supported or if construction fails. - static VoEAudioProcessing* GetInterface(VoiceEngine* voiceEngine); - - // Releases the VoEAudioProcessing sub-API and decreases an internal - // reference counter. Returns the new reference count. This value should - // be zero for all sub-API:s before the VoiceEngine object can be safely - // deleted. - virtual int Release() = 0; - - // Sets Noise Suppression (NS) status and mode. - // The NS reduces noise in the microphone signal. - virtual int SetNsStatus(bool enable, NsModes mode = kNsUnchanged) = 0; - - // Gets the NS status and mode. - virtual int GetNsStatus(bool& enabled, NsModes& mode) = 0; - - // Sets the Automatic Gain Control (AGC) status and mode. - // The AGC adjusts the microphone signal to an appropriate level. - virtual int SetAgcStatus(bool enable, AgcModes mode = kAgcUnchanged) = 0; - - // Gets the AGC status and mode. - virtual int GetAgcStatus(bool& enabled, AgcModes& mode) = 0; - - // Sets the AGC configuration. - // Should only be used in situations where the working environment - // is well known. - virtual int SetAgcConfig(AgcConfig config) = 0; - - // Gets the AGC configuration. - virtual int GetAgcConfig(AgcConfig& config) = 0; - - // Sets the Echo Control (EC) status and mode. - // The EC mitigates acoustic echo where a user can hear their own - // speech repeated back due to an acoustic coupling between the - // speaker and the microphone at the remote end. - virtual int SetEcStatus(bool enable, EcModes mode = kEcUnchanged) = 0; - - // Gets the EC status and mode. - virtual int GetEcStatus(bool& enabled, EcModes& mode) = 0; - - // Enables the compensation of clock drift between the capture and render - // streams by the echo canceller (i.e. only using EcMode==kEcAec). It will - // only be enabled if supported on the current platform; otherwise an error - // will be returned. Check if the platform is supported by calling - // |DriftCompensationSupported()|. - virtual int EnableDriftCompensation(bool enable) = 0; - virtual bool DriftCompensationEnabled() = 0; - static bool DriftCompensationSupported(); - - // Sets a delay |offset| in ms to add to the system delay reported by the - // OS, which is used by the AEC to synchronize far- and near-end streams. - // In some cases a system may introduce a delay which goes unreported by the - // OS, but which is known to the user. This method can be used to compensate - // for the unreported delay. - virtual void SetDelayOffsetMs(int offset) = 0; - virtual int DelayOffsetMs() = 0; - - // Modifies settings for the AEC designed for mobile devices (AECM). - virtual int SetAecmMode(AecmModes mode = kAecmSpeakerphone, - bool enableCNG = true) = 0; - - // Gets settings for the AECM. - virtual int GetAecmMode(AecmModes& mode, bool& enabledCNG) = 0; - - // Enables a high pass filter on the capture signal. This removes DC bias - // and low-frequency noise. Recommended to be enabled. - virtual int EnableHighPassFilter(bool enable) = 0; - virtual bool IsHighPassFilterEnabled() = 0; - - // Gets the VAD/DTX activity for the specified |channel|. - // The returned value is 1 if frames of audio contains speech - // and 0 if silence. The output is always 1 if VAD is disabled. - virtual int VoiceActivityIndicator(int channel) = 0; - - // Enables or disables the possibility to retrieve echo metrics and delay - // logging values during an active call. The metrics are only supported in - // AEC. - virtual int SetEcMetricsStatus(bool enable) = 0; - - // Gets the current EC metric status. - virtual int GetEcMetricsStatus(bool& enabled) = 0; - - // Gets the instantaneous echo level metrics. - virtual int GetEchoMetrics(int& ERL, int& ERLE, int& RERL, int& A_NLP) = 0; - - // Gets the EC internal |delay_median| and |delay_std| in ms between - // near-end and far-end. The metric |fraction_poor_delays| is the amount of - // delay values that potentially can break the EC. The values are aggregated - // over one second and the last updated metrics are returned. - virtual int GetEcDelayMetrics(int& delay_median, - int& delay_std, - float& fraction_poor_delays) = 0; - - // Enables recording of Audio Processing (AP) debugging information. - // The file can later be used for off-line analysis of the AP performance. - virtual int StartDebugRecording(const char* fileNameUTF8) = 0; - - // Same as above but sets and uses an existing file handle. Takes ownership - // of |file_handle| and passes it on to the audio processing module. - virtual int StartDebugRecording(FILE* file_handle) = 0; - - // Disables recording of AP debugging information. - virtual int StopDebugRecording() = 0; - - // Enables or disables detection of disturbing keyboard typing. - // An error notification will be given as a callback upon detection. - virtual int SetTypingDetectionStatus(bool enable) = 0; - - // Gets the current typing detection status. - virtual int GetTypingDetectionStatus(bool& enabled) = 0; - - // Reports the lower of: - // * Time in seconds since the last typing event. - // * Time in seconds since the typing detection was enabled. - // Returns error if typing detection is disabled. - virtual int TimeSinceLastTyping(int& seconds) = 0; - - // Optional setting of typing detection parameters - // Parameter with value == 0 will be ignored - // and left with default config. - // TODO(niklase) Remove default argument as soon as libJingle is updated! - virtual int SetTypingDetectionParameters(int timeWindow, - int costPerTyping, - int reportingThreshold, - int penaltyDecay, - int typeEventDelay = 0) = 0; - - // Swaps the capture-side left and right audio channels when enabled. It - // only has an effect when using a stereo send codec. The setting is - // persistent; it will be applied whenever a stereo send codec is enabled. - // - // The swap is applied only to the captured audio, and not mixed files. The - // swap will appear in file recordings and when accessing audio through the - // external media interface. - virtual void EnableStereoChannelSwapping(bool enable) = 0; - virtual bool IsStereoChannelSwappingEnabled() = 0; - - protected: - VoEAudioProcessing() {} - virtual ~VoEAudioProcessing() {} -}; - -} // namespace webrtc - -#endif // WEBRTC_VOICE_ENGINE_VOE_AUDIO_PROCESSING_H diff --git a/WebRtc.NET/include/webrtc/voice_engine/include/voe_base.h b/WebRtc.NET/include/webrtc/voice_engine/include/voe_base.h deleted file mode 100644 index bdc1a260..00000000 --- a/WebRtc.NET/include/webrtc/voice_engine/include/voe_base.h +++ /dev/null @@ -1,208 +0,0 @@ -/* - * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -// This sub-API supports the following functionalities: -// -// - Enables full duplex VoIP sessions via RTP using G.711 (mu-Law or A-Law). -// - Initialization and termination. -// - Trace information on text files or via callbacks. -// - Multi-channel support (mixing, sending to multiple destinations etc.). -// -// To support other codecs than G.711, the VoECodec sub-API must be utilized. -// -// Usage example, omitting error checking: -// -// using namespace webrtc; -// VoiceEngine* voe = VoiceEngine::Create(); -// VoEBase* base = VoEBase::GetInterface(voe); -// base->Init(); -// int ch = base->CreateChannel(); -// base->StartPlayout(ch); -// ... -// base->DeleteChannel(ch); -// base->Terminate(); -// base->Release(); -// VoiceEngine::Delete(voe); -// -#ifndef WEBRTC_VOICE_ENGINE_VOE_BASE_H -#define WEBRTC_VOICE_ENGINE_VOE_BASE_H - -#include "webrtc/base/scoped_ref_ptr.h" -#include "webrtc/modules/audio_coding/codecs/audio_decoder_factory.h" -#include "webrtc/modules/audio_coding/include/audio_coding_module.h" -#include "webrtc/common_types.h" - -namespace webrtc { - -class AudioDeviceModule; -class AudioProcessing; -class AudioTransport; - -// VoiceEngineObserver -class WEBRTC_DLLEXPORT VoiceEngineObserver { - public: - // This method will be called after the occurrence of any runtime error - // code, or warning notification, when the observer interface has been - // installed using VoEBase::RegisterVoiceEngineObserver(). - virtual void CallbackOnError(int channel, int errCode) = 0; - - protected: - virtual ~VoiceEngineObserver() {} -}; - -// VoiceEngine -class WEBRTC_DLLEXPORT VoiceEngine { - public: - // Creates a VoiceEngine object, which can then be used to acquire - // sub-APIs. Returns NULL on failure. - static VoiceEngine* Create(); - - // Deletes a created VoiceEngine object and releases the utilized resources. - // Note that if there are outstanding references held via other interfaces, - // the voice engine instance will not actually be deleted until those - // references have been released. - static bool Delete(VoiceEngine*& voiceEngine); - - // Specifies the amount and type of trace information which will be - // created by the VoiceEngine. - static int SetTraceFilter(unsigned int filter); - - // Sets the name of the trace file and enables non-encrypted trace messages. - static int SetTraceFile(const char* fileNameUTF8, - bool addFileCounter = false); - - // Installs the TraceCallback implementation to ensure that the user - // receives callbacks for generated trace messages. - static int SetTraceCallback(TraceCallback* callback); - -#if !defined(WEBRTC_CHROMIUM_BUILD) - static int SetAndroidObjects(void* javaVM, void* context); -#endif - - static std::string GetVersionString(); - - protected: - VoiceEngine() {} - ~VoiceEngine() {} -}; - -// VoEBase -class WEBRTC_DLLEXPORT VoEBase { - public: - struct ChannelConfig { - AudioCodingModule::Config acm_config; - bool enable_voice_pacing = false; - }; - - // Factory for the VoEBase sub-API. Increases an internal reference - // counter if successful. Returns NULL if the API is not supported or if - // construction fails. - static VoEBase* GetInterface(VoiceEngine* voiceEngine); - - // Releases the VoEBase sub-API and decreases an internal reference - // counter. Returns the new reference count. This value should be zero - // for all sub-APIs before the VoiceEngine object can be safely deleted. - virtual int Release() = 0; - - // Installs the observer class to enable runtime error control and - // warning notifications. Returns -1 in case of an error, 0 otherwise. - virtual int RegisterVoiceEngineObserver(VoiceEngineObserver& observer) = 0; - - // Removes and disables the observer class for runtime error control - // and warning notifications. Returns 0. - virtual int DeRegisterVoiceEngineObserver() = 0; - - // Initializes all common parts of the VoiceEngine; e.g. all - // encoders/decoders, the sound card and core receiving components. - // This method also makes it possible to install some user-defined external - // modules: - // - The Audio Device Module (ADM) which implements all the audio layer - // functionality in a separate (reference counted) module. - // - The AudioProcessing module handles capture-side processing. VoiceEngine - // takes ownership of this object. - // - An AudioDecoderFactory - used to create audio decoders. - // If NULL is passed for any of these, VoiceEngine will create its own. - // Returns -1 in case of an error, 0 otherwise. - // TODO(ajm): Remove default NULLs. - virtual int Init(AudioDeviceModule* external_adm = NULL, - AudioProcessing* audioproc = NULL, - const rtc::scoped_refptr& - decoder_factory = nullptr) = 0; - - // Returns NULL before Init() is called. - virtual AudioProcessing* audio_processing() = 0; - - // This method is WIP - DO NOT USE! - // Returns NULL before Init() is called. - virtual AudioDeviceModule* audio_device_module() = 0; - - // Terminates all VoiceEngine functions and releases allocated resources. - // Returns 0. - virtual int Terminate() = 0; - - // Creates a new channel and allocates the required resources for it. - // The second version accepts a |config| struct which includes an Audio Coding - // Module config and an option to enable voice pacing. Note that the - // decoder_factory member of the ACM config will be ignored (the decoder - // factory set through Init() will always be used). - // Returns channel ID or -1 in case of an error. - virtual int CreateChannel() = 0; - virtual int CreateChannel(const ChannelConfig& config) = 0; - - // Deletes an existing channel and releases the utilized resources. - // Returns -1 in case of an error, 0 otherwise. - virtual int DeleteChannel(int channel) = 0; - - // Prepares and initiates the VoiceEngine for reception of - // incoming RTP/RTCP packets on the specified |channel|. - virtual int StartReceive(int channel) = 0; - - // Stops receiving incoming RTP/RTCP packets on the specified |channel|. - virtual int StopReceive(int channel) { return 0; } - - // Starts forwarding the packets to the mixer/soundcard for a - // specified |channel|. - virtual int StartPlayout(int channel) = 0; - - // Stops forwarding the packets to the mixer/soundcard for a - // specified |channel|. - virtual int StopPlayout(int channel) = 0; - - // Starts sending packets to an already specified IP address and - // port number for a specified |channel|. - virtual int StartSend(int channel) = 0; - - // Stops sending packets from a specified |channel|. - virtual int StopSend(int channel) = 0; - - // Gets the version information for VoiceEngine and its components. - virtual int GetVersion(char version[1024]) = 0; - - // Gets the last VoiceEngine error code. - virtual int LastError() = 0; - - // TODO(xians): Make the interface pure virtual after libjingle - // implements the interface in its FakeWebRtcVoiceEngine. - virtual AudioTransport* audio_transport() { return NULL; } - - // Associate a send channel to a receive channel. - // Used for obtaining RTT for a receive-only channel. - // One should be careful not to crate a circular association, e.g., - // 1 <- 2 <- 1. - virtual int AssociateSendChannel(int channel, int accociate_send_channel) = 0; - - protected: - VoEBase() {} - virtual ~VoEBase() {} -}; - -} // namespace webrtc - -#endif // WEBRTC_VOICE_ENGINE_VOE_BASE_H diff --git a/WebRtc.NET/include/webrtc/voice_engine/include/voe_codec.h b/WebRtc.NET/include/webrtc/voice_engine/include/voe_codec.h deleted file mode 100644 index cedf47d6..00000000 --- a/WebRtc.NET/include/webrtc/voice_engine/include/voe_codec.h +++ /dev/null @@ -1,147 +0,0 @@ -/* - * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -// This sub-API supports the following functionalities: -// -// - Support of non-default codecs (e.g. iLBC, iSAC, etc.). -// - Voice Activity Detection (VAD) on a per channel basis. -// - Possibility to specify how to map received payload types to codecs. -// -// Usage example, omitting error checking: -// -// using namespace webrtc; -// VoiceEngine* voe = VoiceEngine::Create(); -// VoEBase* base = VoEBase::GetInterface(voe); -// VoECodec* codec = VoECodec::GetInterface(voe); -// base->Init(); -// int num_of_codecs = codec->NumOfCodecs() -// ... -// base->Terminate(); -// base->Release(); -// codec->Release(); -// VoiceEngine::Delete(voe); -// -#ifndef WEBRTC_VOICE_ENGINE_VOE_CODEC_H -#define WEBRTC_VOICE_ENGINE_VOE_CODEC_H - -#include "webrtc/common_types.h" - -namespace webrtc { - -class VoiceEngine; - -class WEBRTC_DLLEXPORT VoECodec { - public: - // Factory for the VoECodec sub-API. Increases an internal - // reference counter if successful. Returns NULL if the API is not - // supported or if construction fails. - static VoECodec* GetInterface(VoiceEngine* voiceEngine); - - // Releases the VoECodec sub-API and decreases an internal - // reference counter. Returns the new reference count. This value should - // be zero for all sub-API:s before the VoiceEngine object can be safely - // deleted. - virtual int Release() = 0; - - // Gets the number of supported codecs. - virtual int NumOfCodecs() = 0; - - // Get the |codec| information for a specified list |index|. - virtual int GetCodec(int index, CodecInst& codec) = 0; - - // Sets the |codec| for the |channel| to be used for sending. - virtual int SetSendCodec(int channel, const CodecInst& codec) = 0; - - // Gets the |codec| parameters for the sending codec on a specified - // |channel|. - virtual int GetSendCodec(int channel, CodecInst& codec) = 0; - - // Sets the bitrate on a specified |channel| to the specified value - // (in bits/sec). If the value is not supported by the codec, the codec will - // choose an appropriate value. - // Returns -1 on failure and 0 on success. - virtual int SetBitRate(int channel, int bitrate_bps) = 0; - - // Gets the currently received |codec| for a specific |channel|. - virtual int GetRecCodec(int channel, CodecInst& codec) = 0; - - // Sets the dynamic payload type number for a particular |codec| or - // disables (ignores) a codec for receiving. For instance, when receiving - // an invite from a SIP-based client, this function can be used to change - // the dynamic payload type number to match that in the INVITE SDP- - // message. The utilized parameters in the |codec| structure are: - // plname, plfreq, pltype and channels. - virtual int SetRecPayloadType(int channel, const CodecInst& codec) = 0; - - // Gets the actual payload type that is set for receiving a |codec| on a - // |channel|. The value it retrieves will either be the default payload - // type, or a value earlier set with SetRecPayloadType(). - virtual int GetRecPayloadType(int channel, CodecInst& codec) = 0; - - // Sets the payload |type| for the sending of SID-frames with background - // noise estimation during silence periods detected by the VAD. - virtual int SetSendCNPayloadType( - int channel, - int type, - PayloadFrequencies frequency = kFreq16000Hz) = 0; - - // Sets the codec internal FEC (forward error correction) status for a - // specified |channel|. Returns 0 if success, and -1 if failed. - // TODO(minyue): Make SetFECStatus() pure virtual when fakewebrtcvoiceengine - // in talk is ready. - virtual int SetFECStatus(int channel, bool enable) { return -1; } - - // Gets the codec internal FEC status for a specified |channel|. Returns 0 - // with the status stored in |enabled| if success, and -1 if encountered - // error. - // TODO(minyue): Make GetFECStatus() pure virtual when fakewebrtcvoiceengine - // in talk is ready. - virtual int GetFECStatus(int channel, bool& enabled) { return -1; } - - // Sets the VAD/DTX (silence suppression) status and |mode| for a - // specified |channel|. Disabling VAD (through |enable|) will also disable - // DTX; it is not necessary to explictly set |disableDTX| in this case. - virtual int SetVADStatus(int channel, - bool enable, - VadModes mode = kVadConventional, - bool disableDTX = false) = 0; - - // Gets the VAD/DTX status and |mode| for a specified |channel|. - virtual int GetVADStatus(int channel, - bool& enabled, - VadModes& mode, - bool& disabledDTX) = 0; - - // If send codec is Opus on a specified |channel|, sets the maximum playback - // rate the receiver will render: |frequency_hz| (in Hz). - // TODO(minyue): Make SetOpusMaxPlaybackRate() pure virtual when - // fakewebrtcvoiceengine in talk is ready. - virtual int SetOpusMaxPlaybackRate(int channel, int frequency_hz) { - return -1; - } - - // If send codec is Opus on a specified |channel|, set its DTX. Returns 0 if - // success, and -1 if failed. - virtual int SetOpusDtx(int channel, bool enable_dtx) = 0; - - // If send codec is Opus on a specified |channel|, return its DTX status. - // Returns 0 on success, and -1 if failed. - // TODO(ivoc): Make GetOpusDtxStatus() pure virtual when all deriving classes - // are updated. - virtual int GetOpusDtxStatus(int channel, bool* enabled) { return -1; } - - protected: - VoECodec() {} - virtual ~VoECodec() {} -}; - -} // namespace webrtc - -#endif // WEBRTC_VOICE_ENGINE_VOE_CODEC_H diff --git a/WebRtc.NET/include/webrtc/voice_engine/include/voe_errors.h b/WebRtc.NET/include/webrtc/voice_engine/include/voe_errors.h deleted file mode 100644 index 645774de..00000000 --- a/WebRtc.NET/include/webrtc/voice_engine/include/voe_errors.h +++ /dev/null @@ -1,166 +0,0 @@ -/* - * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_VOICE_ENGINE_VOE_ERRORS_H -#define WEBRTC_VOICE_ENGINE_VOE_ERRORS_H - -// Warnings -#define VE_PORT_NOT_DEFINED 8001 -#define VE_CHANNEL_NOT_VALID 8002 -#define VE_FUNC_NOT_SUPPORTED 8003 -#define VE_INVALID_LISTNR 8004 -#define VE_INVALID_ARGUMENT 8005 -#define VE_INVALID_PORT_NMBR 8006 -#define VE_INVALID_PLNAME 8007 -#define VE_INVALID_PLFREQ 8008 -#define VE_INVALID_PLTYPE 8009 -#define VE_INVALID_PACSIZE 8010 -#define VE_NOT_SUPPORTED 8011 -#define VE_ALREADY_LISTENING 8012 -#define VE_CHANNEL_NOT_CREATED 8013 -#define VE_MAX_ACTIVE_CHANNELS_REACHED 8014 -#define VE_REC_CANNOT_PREPARE_HEADER 8015 -#define VE_REC_CANNOT_ADD_BUFFER 8016 -#define VE_PLAY_CANNOT_PREPARE_HEADER 8017 -#define VE_ALREADY_SENDING 8018 -#define VE_INVALID_IP_ADDRESS 8019 -#define VE_ALREADY_PLAYING 8020 -#define VE_NOT_ALL_VERSION_INFO 8021 -// 8022 is not used -#define VE_INVALID_CHANNELS 8023 -#define VE_SET_PLTYPE_FAILED 8024 -// 8025 is not used -#define VE_NOT_INITED 8026 -#define VE_NOT_SENDING 8027 -#define VE_EXT_TRANSPORT_NOT_SUPPORTED 8028 -#define VE_EXTERNAL_TRANSPORT_ENABLED 8029 -#define VE_STOP_RECORDING_FAILED 8030 -#define VE_INVALID_RATE 8031 -#define VE_INVALID_PACKET 8032 -#define VE_NO_GQOS 8033 -#define VE_INVALID_TIMESTAMP 8034 -#define VE_RECEIVE_PACKET_TIMEOUT 8035 -// 8036 is not used -#define VE_INIT_FAILED_WRONG_EXPIRY 8037 -#define VE_SENDING 8038 -#define VE_ENABLE_IPV6_FAILED 8039 -#define VE_FUNC_NO_STEREO 8040 -// Range 8041-8080 is not used -#define VE_FW_TRAVERSAL_ALREADY_INITIALIZED 8081 -#define VE_PACKET_RECEIPT_RESTARTED 8082 -#define VE_NOT_ALL_INFO 8083 -#define VE_CANNOT_SET_SEND_CODEC 8084 -#define VE_CODEC_ERROR 8085 -#define VE_NETEQ_ERROR 8086 -#define VE_RTCP_ERROR 8087 -#define VE_INVALID_OPERATION 8088 -#define VE_CPU_INFO_ERROR 8089 -#define VE_SOUNDCARD_ERROR 8090 -#define VE_SPEECH_LEVEL_ERROR 8091 -#define VE_SEND_ERROR 8092 -#define VE_CANNOT_REMOVE_CONF_CHANNEL 8093 -#define VE_PLTYPE_ERROR 8094 -#define VE_SET_RED_FAILED 8095 -#define VE_CANNOT_GET_PLAY_DATA 8096 -#define VE_APM_ERROR 8097 -#define VE_RUNTIME_PLAY_WARNING 8098 -#define VE_RUNTIME_REC_WARNING 8099 -#define VE_NOT_PLAYING 8100 -#define VE_SOCKETS_NOT_INITED 8101 -#define VE_CANNOT_GET_SOCKET_INFO 8102 -#define VE_INVALID_MULTICAST_ADDRESS 8103 -#define VE_DESTINATION_NOT_INITED 8104 -#define VE_RECEIVE_SOCKETS_CONFLICT 8105 -#define VE_SEND_SOCKETS_CONFLICT 8106 -#define VE_TYPING_NOISE_WARNING 8107 -#define VE_SATURATION_WARNING 8108 -#define VE_NOISE_WARNING 8109 -#define VE_CANNOT_GET_SEND_CODEC 8110 -#define VE_CANNOT_GET_REC_CODEC 8111 -#define VE_ALREADY_INITED 8112 -#define VE_CANNOT_SET_SECONDARY_SEND_CODEC 8113 -#define VE_CANNOT_GET_SECONDARY_SEND_CODEC 8114 -#define VE_CANNOT_REMOVE_SECONDARY_SEND_CODEC 8115 -#define VE_TYPING_NOISE_OFF_WARNING 8116 - -// Errors causing limited functionality -#define VE_RTCP_SOCKET_ERROR 9001 -#define VE_MIC_VOL_ERROR 9002 -#define VE_SPEAKER_VOL_ERROR 9003 -#define VE_CANNOT_ACCESS_MIC_VOL 9004 -#define VE_CANNOT_ACCESS_SPEAKER_VOL 9005 -#define VE_GET_MIC_VOL_ERROR 9006 -#define VE_GET_SPEAKER_VOL_ERROR 9007 -#define VE_THREAD_RTCP_ERROR 9008 -#define VE_CANNOT_INIT_APM 9009 -#define VE_SEND_SOCKET_TOS_ERROR 9010 -#define VE_CANNOT_RETRIEVE_DEVICE_NAME 9013 -#define VE_SRTP_ERROR 9014 -// 9015 is not used -#define VE_INTERFACE_NOT_FOUND 9016 -#define VE_TOS_GQOS_CONFLICT 9017 -#define VE_CANNOT_ADD_CONF_CHANNEL 9018 -#define VE_BUFFER_TOO_SMALL 9019 -#define VE_CANNOT_EXECUTE_SETTING 9020 -#define VE_CANNOT_RETRIEVE_SETTING 9021 -// 9022 is not used -#define VE_RTP_KEEPALIVE_FAILED 9023 -#define VE_SEND_DTMF_FAILED 9024 -#define VE_CANNOT_RETRIEVE_CNAME 9025 -// 9026 is not used -// 9027 is not used -#define VE_CANNOT_RETRIEVE_RTP_STAT 9028 -#define VE_GQOS_ERROR 9029 -#define VE_BINDING_SOCKET_TO_LOCAL_ADDRESS_FAILED 9030 -#define VE_TOS_INVALID 9031 -#define VE_TOS_ERROR 9032 -#define VE_CANNOT_RETRIEVE_VALUE 9033 - -// Critical errors that stops voice functionality -#define VE_PLAY_UNDEFINED_SC_ERR 10001 -#define VE_REC_CANNOT_OPEN_SC 10002 -#define VE_SOCKET_ERROR 10003 -#define VE_MMSYSERR_INVALHANDLE 10004 -#define VE_MMSYSERR_NODRIVER 10005 -#define VE_MMSYSERR_NOMEM 10006 -#define VE_WAVERR_UNPREPARED 10007 -#define VE_WAVERR_STILLPLAYING 10008 -#define VE_UNDEFINED_SC_ERR 10009 -#define VE_UNDEFINED_SC_REC_ERR 10010 -#define VE_THREAD_ERROR 10011 -#define VE_CANNOT_START_RECORDING 10012 -#define VE_PLAY_CANNOT_OPEN_SC 10013 -#define VE_NO_WINSOCK_2 10014 -#define VE_SEND_SOCKET_ERROR 10015 -#define VE_BAD_FILE 10016 -#define VE_EXPIRED_COPY 10017 -#define VE_NOT_AUTHORISED 10018 -#define VE_RUNTIME_PLAY_ERROR 10019 -#define VE_RUNTIME_REC_ERROR 10020 -#define VE_BAD_ARGUMENT 10021 -#define VE_LINUX_API_ONLY 10022 -#define VE_REC_DEVICE_REMOVED 10023 -#define VE_NO_MEMORY 10024 -#define VE_BAD_HANDLE 10025 -#define VE_RTP_RTCP_MODULE_ERROR 10026 -#define VE_AUDIO_CODING_MODULE_ERROR 10027 -#define VE_AUDIO_DEVICE_MODULE_ERROR 10028 -#define VE_CANNOT_START_PLAYOUT 10029 -#define VE_CANNOT_STOP_RECORDING 10030 -#define VE_CANNOT_STOP_PLAYOUT 10031 -#define VE_CANNOT_INIT_CHANNEL 10032 -#define VE_RECV_SOCKET_ERROR 10033 -#define VE_SOCKET_TRANSPORT_MODULE_ERROR 10034 -#define VE_AUDIO_CONF_MIX_MODULE_ERROR 10035 - -// Warnings for other platforms (reserved range 8061-8080) -#define VE_IGNORED_FUNCTION 8061 - -#endif // WEBRTC_VOICE_ENGINE_VOE_ERRORS_H diff --git a/WebRtc.NET/include/webrtc/voice_engine/include/voe_external_media.h b/WebRtc.NET/include/webrtc/voice_engine/include/voe_external_media.h deleted file mode 100644 index 2c451e47..00000000 --- a/WebRtc.NET/include/webrtc/voice_engine/include/voe_external_media.h +++ /dev/null @@ -1,85 +0,0 @@ -/* - * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ -#ifndef WEBRTC_VOICE_ENGINE_VOE_EXTERNAL_MEDIA_H -#define WEBRTC_VOICE_ENGINE_VOE_EXTERNAL_MEDIA_H - -#include "webrtc/common_types.h" - -namespace webrtc { - -class VoiceEngine; -class AudioFrame; - -class WEBRTC_DLLEXPORT VoEMediaProcess { - public: - // The VoiceEngine user should override the Process() method in a - // derived class. Process() will be called when audio is ready to - // be processed. The audio can be accessed in several different modes - // given by the |type| parameter. The function should modify the - // original data and ensure that it is copied back to the |audio10ms| - // array. The number of samples in the frame cannot be changed. - // The sampling frequency will depend upon the codec used. - // If |isStereo| is true, audio10ms will contain 16-bit PCM data - // samples in interleaved stereo format (L0,R0,L1,R1,...). - virtual void Process(int channel, - ProcessingTypes type, - int16_t audio10ms[], - size_t length, - int samplingFreq, - bool isStereo) = 0; - - protected: - virtual ~VoEMediaProcess() {} -}; - -class WEBRTC_DLLEXPORT VoEExternalMedia { - public: - // Factory for the VoEExternalMedia sub-API. Increases an internal - // reference counter if successful. Returns NULL if the API is not - // supported or if construction fails. - static VoEExternalMedia* GetInterface(VoiceEngine* voiceEngine); - - // Releases the VoEExternalMedia sub-API and decreases an internal - // reference counter. Returns the new reference count. This value should - // be zero for all sub-API:s before the VoiceEngine object can be safely - // deleted. - virtual int Release() = 0; - - // Installs a VoEMediaProcess derived instance and activates external - // media for the specified |channel| and |type|. - virtual int RegisterExternalMediaProcessing( - int channel, - ProcessingTypes type, - VoEMediaProcess& processObject) = 0; - - // Removes the VoEMediaProcess derived instance and deactivates external - // media for the specified |channel| and |type|. - virtual int DeRegisterExternalMediaProcessing(int channel, - ProcessingTypes type) = 0; - - // Pulls an audio frame from the specified |channel| for external mixing. - // If the |desired_sample_rate_hz| is 0, the signal will be returned with - // its native frequency, otherwise it will be resampled. Valid frequencies - // are 16, 22, 32, 44 or 48 kHz. - virtual int GetAudioFrame(int channel, - int desired_sample_rate_hz, - AudioFrame* frame) = 0; - - // Sets the state of external mixing. Cannot be changed during playback. - virtual int SetExternalMixing(int channel, bool enable) = 0; - - protected: - VoEExternalMedia() {} - virtual ~VoEExternalMedia() {} -}; - -} // namespace webrtc - -#endif // WEBRTC_VOICE_ENGINE_VOE_EXTERNAL_MEDIA_H diff --git a/WebRtc.NET/include/webrtc/voice_engine/include/voe_file.h b/WebRtc.NET/include/webrtc/voice_engine/include/voe_file.h deleted file mode 100644 index f3a3a1f5..00000000 --- a/WebRtc.NET/include/webrtc/voice_engine/include/voe_file.h +++ /dev/null @@ -1,144 +0,0 @@ -/* - * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -// This sub-API supports the following functionalities: -// -// - File playback. -// - File recording. -// - File conversion. -// -// Usage example, omitting error checking: -// -// using namespace webrtc; -// VoiceEngine* voe = VoiceEngine::Create(); -// VoEBase* base = VoEBase::GetInterface(voe); -// VoEFile* file = VoEFile::GetInterface(voe); -// base->Init(); -// int ch = base->CreateChannel(); -// ... -// base->StartPlayout(ch); -// file->StartPlayingFileAsMicrophone(ch, "data_file_16kHz.pcm", true); -// ... -// file->StopPlayingFileAsMicrophone(ch); -// base->StopPlayout(ch); -// ... -// base->DeleteChannel(ch); -// base->Terminate(); -// base->Release(); -// file->Release(); -// VoiceEngine::Delete(voe); -// -#ifndef WEBRTC_VOICE_ENGINE_VOE_FILE_H -#define WEBRTC_VOICE_ENGINE_VOE_FILE_H - -#include "webrtc/common_types.h" - -namespace webrtc { - -class VoiceEngine; - -class WEBRTC_DLLEXPORT VoEFile { - public: - // Factory for the VoEFile sub-API. Increases an internal - // reference counter if successful. Returns NULL if the API is not - // supported or if construction fails. - static VoEFile* GetInterface(VoiceEngine* voiceEngine); - - // Releases the VoEFile sub-API and decreases an internal - // reference counter. Returns the new reference count. This value should - // be zero for all sub-API:s before the VoiceEngine object can be safely - // deleted. - virtual int Release() = 0; - - // Starts playing and mixing files with the local speaker signal for - // playout. - virtual int StartPlayingFileLocally( - int channel, - const char fileNameUTF8[1024], - bool loop = false, - FileFormats format = kFileFormatPcm16kHzFile, - float volumeScaling = 1.0, - int startPointMs = 0, - int stopPointMs = 0) = 0; - - // Starts playing and mixing streams with the local speaker signal for - // playout. - virtual int StartPlayingFileLocally( - int channel, - InStream* stream, - FileFormats format = kFileFormatPcm16kHzFile, - float volumeScaling = 1.0, - int startPointMs = 0, - int stopPointMs = 0) = 0; - - // Stops playback of a file on a specific |channel|. - virtual int StopPlayingFileLocally(int channel) = 0; - - // Returns the current file playing state for a specific |channel|. - virtual int IsPlayingFileLocally(int channel) = 0; - - // Starts reading data from a file and transmits the data either - // mixed with or instead of the microphone signal. - virtual int StartPlayingFileAsMicrophone( - int channel, - const char fileNameUTF8[1024], - bool loop = false, - bool mixWithMicrophone = false, - FileFormats format = kFileFormatPcm16kHzFile, - float volumeScaling = 1.0) = 0; - - // Starts reading data from a stream and transmits the data either - // mixed with or instead of the microphone signal. - virtual int StartPlayingFileAsMicrophone( - int channel, - InStream* stream, - bool mixWithMicrophone = false, - FileFormats format = kFileFormatPcm16kHzFile, - float volumeScaling = 1.0) = 0; - - // Stops playing of a file as microphone signal for a specific |channel|. - virtual int StopPlayingFileAsMicrophone(int channel) = 0; - - // Returns whether the |channel| is currently playing a file as microphone. - virtual int IsPlayingFileAsMicrophone(int channel) = 0; - - // Starts recording the mixed playout audio. - virtual int StartRecordingPlayout(int channel, - const char* fileNameUTF8, - CodecInst* compression = NULL, - int maxSizeBytes = -1) = 0; - - // Stops recording the mixed playout audio. - virtual int StopRecordingPlayout(int channel) = 0; - - virtual int StartRecordingPlayout(int channel, - OutStream* stream, - CodecInst* compression = NULL) = 0; - - // Starts recording the microphone signal to a file. - virtual int StartRecordingMicrophone(const char* fileNameUTF8, - CodecInst* compression = NULL, - int maxSizeBytes = -1) = 0; - - // Starts recording the microphone signal to a stream. - virtual int StartRecordingMicrophone(OutStream* stream, - CodecInst* compression = NULL) = 0; - - // Stops recording the microphone signal. - virtual int StopRecordingMicrophone() = 0; - - protected: - VoEFile() {} - virtual ~VoEFile() {} -}; - -} // namespace webrtc - -#endif // WEBRTC_VOICE_ENGINE_VOE_FILE_H diff --git a/WebRtc.NET/include/webrtc/voice_engine/include/voe_hardware.h b/WebRtc.NET/include/webrtc/voice_engine/include/voe_hardware.h deleted file mode 100644 index fcf009dc..00000000 --- a/WebRtc.NET/include/webrtc/voice_engine/include/voe_hardware.h +++ /dev/null @@ -1,109 +0,0 @@ -/* - * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -// This sub-API supports the following functionalities: -// -// - Audio device handling. -// - Device information. -// - CPU load monitoring. -// -// Usage example, omitting error checking: -// -// using namespace webrtc; -// VoiceEngine* voe = VoiceEngine::Create(); -// VoEBase* base = VoEBase::GetInterface(voe); -// VoEHardware* hardware = VoEHardware::GetInterface(voe); -// base->Init(); -// ... -// int n_devices = hardware->GetNumOfPlayoutDevices(); -// ... -// base->Terminate(); -// base->Release(); -// hardware->Release(); -// VoiceEngine::Delete(voe); -// -#ifndef WEBRTC_VOICE_ENGINE_VOE_HARDWARE_H -#define WEBRTC_VOICE_ENGINE_VOE_HARDWARE_H - -#include "webrtc/common_types.h" - -namespace webrtc { - -class VoiceEngine; - -class WEBRTC_DLLEXPORT VoEHardware { - public: - // Factory for the VoEHardware sub-API. Increases an internal - // reference counter if successful. Returns NULL if the API is not - // supported or if construction fails. - static VoEHardware* GetInterface(VoiceEngine* voiceEngine); - - // Releases the VoEHardware sub-API and decreases an internal - // reference counter. Returns the new reference count. This value should - // be zero for all sub-API:s before the VoiceEngine object can be safely - // deleted. - virtual int Release() = 0; - - // Gets the number of audio devices available for recording. - virtual int GetNumOfRecordingDevices(int& devices) = 0; - - // Gets the number of audio devices available for playout. - virtual int GetNumOfPlayoutDevices(int& devices) = 0; - - // Gets the name of a specific recording device given by an |index|. - // On Windows Vista/7, it also retrieves an additional unique ID - // (GUID) for the recording device. - virtual int GetRecordingDeviceName(int index, - char strNameUTF8[128], - char strGuidUTF8[128]) = 0; - - // Gets the name of a specific playout device given by an |index|. - // On Windows Vista/7, it also retrieves an additional unique ID - // (GUID) for the playout device. - virtual int GetPlayoutDeviceName(int index, - char strNameUTF8[128], - char strGuidUTF8[128]) = 0; - - // Sets the audio device used for recording. - virtual int SetRecordingDevice( - int index, - StereoChannel recordingChannel = kStereoBoth) = 0; - - // Sets the audio device used for playout. - virtual int SetPlayoutDevice(int index) = 0; - - // Sets the type of audio device layer to use. - virtual int SetAudioDeviceLayer(AudioLayers audioLayer) = 0; - - // Gets the currently used (active) audio device layer. - virtual int GetAudioDeviceLayer(AudioLayers& audioLayer) = 0; - - // Native sample rate controls (samples/sec) - virtual int SetRecordingSampleRate(unsigned int samples_per_sec) = 0; - virtual int RecordingSampleRate(unsigned int* samples_per_sec) const = 0; - virtual int SetPlayoutSampleRate(unsigned int samples_per_sec) = 0; - virtual int PlayoutSampleRate(unsigned int* samples_per_sec) const = 0; - - // Queries and controls platform audio effects on Android devices. - virtual bool BuiltInAECIsAvailable() const = 0; - virtual int EnableBuiltInAEC(bool enable) = 0; - virtual bool BuiltInAGCIsAvailable() const = 0; - virtual int EnableBuiltInAGC(bool enable) = 0; - virtual bool BuiltInNSIsAvailable() const = 0; - virtual int EnableBuiltInNS(bool enable) = 0; - - protected: - VoEHardware() {} - virtual ~VoEHardware() {} -}; - -} // namespace webrtc - -#endif // WEBRTC_VOICE_ENGINE_VOE_HARDWARE_H diff --git a/WebRtc.NET/include/webrtc/voice_engine/include/voe_neteq_stats.h b/WebRtc.NET/include/webrtc/voice_engine/include/voe_neteq_stats.h deleted file mode 100644 index fb70cae1..00000000 --- a/WebRtc.NET/include/webrtc/voice_engine/include/voe_neteq_stats.h +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_VOICE_ENGINE_VOE_NETEQ_STATS_H -#define WEBRTC_VOICE_ENGINE_VOE_NETEQ_STATS_H - -#include "webrtc/common_types.h" - -namespace webrtc { - -class VoiceEngine; - -class WEBRTC_DLLEXPORT VoENetEqStats { - public: - // Factory for the VoENetEqStats sub-API. Increases an internal - // reference counter if successful. Returns NULL if the API is not - // supported or if construction fails. - static VoENetEqStats* GetInterface(VoiceEngine* voiceEngine); - - // Releases the VoENetEqStats sub-API and decreases an internal - // reference counter. Returns the new reference count. This value should - // be zero for all sub-API:s before the VoiceEngine object can be safely - // deleted. - virtual int Release() = 0; - - // Get the "in-call" statistics from NetEQ. - // The statistics are reset after the query. - virtual int GetNetworkStatistics(int channel, NetworkStatistics& stats) = 0; - - // Get statistics of calls to AudioCodingModule::PlayoutData10Ms(). - virtual int GetDecodingCallStatistics( - int channel, - AudioDecodingCallStats* stats) const = 0; - - protected: - VoENetEqStats() {} - virtual ~VoENetEqStats() {} -}; - -} // namespace webrtc - -#endif // #ifndef WEBRTC_VOICE_ENGINE_VOE_NETEQ_STATS_H diff --git a/WebRtc.NET/include/webrtc/voice_engine/include/voe_network.h b/WebRtc.NET/include/webrtc/voice_engine/include/voe_network.h deleted file mode 100644 index e659394f..00000000 --- a/WebRtc.NET/include/webrtc/voice_engine/include/voe_network.h +++ /dev/null @@ -1,95 +0,0 @@ -/* - * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -// This sub-API supports the following functionalities: -// -// - External protocol support. -// - Packet timeout notification. -// - Dead-or-Alive connection observations. -// -// Usage example, omitting error checking: -// -// using namespace webrtc; -// VoiceEngine* voe = VoiceEngine::Create(); -// VoEBase* base = VoEBase::GetInterface(voe); -// VoENetwork* netw = VoENetwork::GetInterface(voe); -// base->Init(); -// int ch = base->CreateChannel(); -// ... -// netw->SetPeriodicDeadOrAliveStatus(ch, true); -// ... -// base->DeleteChannel(ch); -// base->Terminate(); -// base->Release(); -// netw->Release(); -// VoiceEngine::Delete(voe); -// -#ifndef WEBRTC_VOICE_ENGINE_VOE_NETWORK_H -#define WEBRTC_VOICE_ENGINE_VOE_NETWORK_H - -#include "webrtc/api/call/transport.h" -#include "webrtc/common_types.h" - -namespace webrtc { - -class VoiceEngine; - -// VoENetwork -class WEBRTC_DLLEXPORT VoENetwork { - public: - // Factory for the VoENetwork sub-API. Increases an internal - // reference counter if successful. Returns NULL if the API is not - // supported or if construction fails. - static VoENetwork* GetInterface(VoiceEngine* voiceEngine); - - // Releases the VoENetwork sub-API and decreases an internal - // reference counter. Returns the new reference count. This value should - // be zero for all sub-API:s before the VoiceEngine object can be safely - // deleted. - virtual int Release() = 0; - - // Installs and enables a user-defined external transport protocol for a - // specified |channel|. Returns -1 in case of an error, 0 otherwise. - virtual int RegisterExternalTransport(int channel, Transport& transport) = 0; - - // Removes and disables a user-defined external transport protocol for a - // specified |channel|. Returns -1 in case of an error, 0 otherwise. - virtual int DeRegisterExternalTransport(int channel) = 0; - - // The packets received from the network should be passed to this - // function when external transport is enabled. Note that the data - // including the RTP-header must also be given to the VoiceEngine. - // Returns -1 in case of an error, 0 otherwise. - virtual int ReceivedRTPPacket(int channel, - const void* data, - size_t length) = 0; - virtual int ReceivedRTPPacket(int channel, - const void* data, - size_t length, - const PacketTime& packet_time) { - return 0; - } - - // The packets received from the network should be passed to this - // function when external transport is enabled. Note that the data - // including the RTCP-header must also be given to the VoiceEngine. - // Returns -1 in case of an error, 0 otherwise. - virtual int ReceivedRTCPPacket(int channel, - const void* data, - size_t length) = 0; - - protected: - VoENetwork() {} - virtual ~VoENetwork() {} -}; - -} // namespace webrtc - -#endif // WEBRTC_VOICE_ENGINE_VOE_NETWORK_H diff --git a/WebRtc.NET/include/webrtc/voice_engine/include/voe_rtp_rtcp.h b/WebRtc.NET/include/webrtc/voice_engine/include/voe_rtp_rtcp.h deleted file mode 100644 index 716566de..00000000 --- a/WebRtc.NET/include/webrtc/voice_engine/include/voe_rtp_rtcp.h +++ /dev/null @@ -1,193 +0,0 @@ -/* - * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -// This sub-API supports the following functionalities: -// -// - Callbacks for RTP and RTCP events such as modified SSRC or CSRC. -// - SSRC handling. -// - Transmission of RTCP sender reports. -// - Obtaining RTCP data from incoming RTCP sender reports. -// - RTP and RTCP statistics (jitter, packet loss, RTT etc.). -// - Redundant Coding (RED) -// - Writing RTP and RTCP packets to binary files for off-line analysis of -// the call quality. -// -// Usage example, omitting error checking: -// -// using namespace webrtc; -// VoiceEngine* voe = VoiceEngine::Create(); -// VoEBase* base = VoEBase::GetInterface(voe); -// VoERTP_RTCP* rtp_rtcp = VoERTP_RTCP::GetInterface(voe); -// base->Init(); -// int ch = base->CreateChannel(); -// ... -// rtp_rtcp->SetLocalSSRC(ch, 12345); -// ... -// base->DeleteChannel(ch); -// base->Terminate(); -// base->Release(); -// rtp_rtcp->Release(); -// VoiceEngine::Delete(voe); -// -#ifndef WEBRTC_VOICE_ENGINE_VOE_RTP_RTCP_H -#define WEBRTC_VOICE_ENGINE_VOE_RTP_RTCP_H - -#include -#include "webrtc/common_types.h" - -namespace webrtc { - -class VoiceEngine; - -// VoERTPObserver -class WEBRTC_DLLEXPORT VoERTPObserver { - public: - virtual void OnIncomingCSRCChanged(int channel, - unsigned int CSRC, - bool added) = 0; - - virtual void OnIncomingSSRCChanged(int channel, unsigned int SSRC) = 0; - - protected: - virtual ~VoERTPObserver() {} -}; - -// CallStatistics -struct CallStatistics { - unsigned short fractionLost; - unsigned int cumulativeLost; - unsigned int extendedMax; - unsigned int jitterSamples; - int64_t rttMs; - size_t bytesSent; - int packetsSent; - size_t bytesReceived; - int packetsReceived; - // The capture ntp time (in local timebase) of the first played out audio - // frame. - int64_t capture_start_ntp_time_ms_; -}; - -// See section 6.4.1 in http://www.ietf.org/rfc/rfc3550.txt for details. -struct SenderInfo { - uint32_t NTP_timestamp_high; - uint32_t NTP_timestamp_low; - uint32_t RTP_timestamp; - uint32_t sender_packet_count; - uint32_t sender_octet_count; -}; - -// See section 6.4.2 in http://www.ietf.org/rfc/rfc3550.txt for details. -struct ReportBlock { - uint32_t sender_SSRC; // SSRC of sender - uint32_t source_SSRC; - uint8_t fraction_lost; - uint32_t cumulative_num_packets_lost; - uint32_t extended_highest_sequence_number; - uint32_t interarrival_jitter; - uint32_t last_SR_timestamp; - uint32_t delay_since_last_SR; -}; - -// VoERTP_RTCP -class WEBRTC_DLLEXPORT VoERTP_RTCP { - public: - // Factory for the VoERTP_RTCP sub-API. Increases an internal - // reference counter if successful. Returns NULL if the API is not - // supported or if construction fails. - static VoERTP_RTCP* GetInterface(VoiceEngine* voiceEngine); - - // Releases the VoERTP_RTCP sub-API and decreases an internal - // reference counter. Returns the new reference count. This value should - // be zero for all sub-API:s before the VoiceEngine object can be safely - // deleted. - virtual int Release() = 0; - - // Sets the local RTP synchronization source identifier (SSRC) explicitly. - virtual int SetLocalSSRC(int channel, unsigned int ssrc) = 0; - - // Gets the local RTP SSRC of a specified |channel|. - virtual int GetLocalSSRC(int channel, unsigned int& ssrc) = 0; - - // Gets the SSRC of the incoming RTP packets. - virtual int GetRemoteSSRC(int channel, unsigned int& ssrc) = 0; - - // Sets the status of rtp-audio-level-indication on a specific |channel|. - virtual int SetSendAudioLevelIndicationStatus(int channel, - bool enable, - unsigned char id = 1) = 0; - - // Sets the status of receiving rtp-audio-level-indication on a specific - // |channel|. - virtual int SetReceiveAudioLevelIndicationStatus(int channel, - bool enable, - unsigned char id = 1) { - // TODO(wu): Remove default implementation once talk is updated. - return 0; - } - - // Sets the RTCP status on a specific |channel|. - virtual int SetRTCPStatus(int channel, bool enable) = 0; - - // Gets the RTCP status on a specific |channel|. - virtual int GetRTCPStatus(int channel, bool& enabled) = 0; - - // Sets the canonical name (CNAME) parameter for RTCP reports on a - // specific |channel|. - virtual int SetRTCP_CNAME(int channel, const char cName[256]) = 0; - - // TODO(holmer): Remove this API once it has been removed from - // fakewebrtcvoiceengine.h. - virtual int GetRTCP_CNAME(int channel, char cName[256]) { return -1; } - - // Gets the canonical name (CNAME) parameter for incoming RTCP reports - // on a specific channel. - virtual int GetRemoteRTCP_CNAME(int channel, char cName[256]) = 0; - - // Gets RTCP data from incoming RTCP Sender Reports. - virtual int GetRemoteRTCPData(int channel, - unsigned int& NTPHigh, - unsigned int& NTPLow, - unsigned int& timestamp, - unsigned int& playoutTimestamp, - unsigned int* jitter = NULL, - unsigned short* fractionLost = NULL) = 0; - - // Gets RTP statistics for a specific |channel|. - virtual int GetRTPStatistics(int channel, - unsigned int& averageJitterMs, - unsigned int& maxJitterMs, - unsigned int& discardedPackets) = 0; - - // Gets RTCP statistics for a specific |channel|. - virtual int GetRTCPStatistics(int channel, CallStatistics& stats) = 0; - - // Gets the report block parts of the last received RTCP Sender Report (SR), - // or RTCP Receiver Report (RR) on a specified |channel|. Each vector - // element also contains the SSRC of the sender in addition to a report - // block. - virtual int GetRemoteRTCPReportBlocks( - int channel, - std::vector* receive_blocks) = 0; - - // This function enables Negative Acknowledgment (NACK) using RTCP, - // implemented based on RFC 4585. NACK retransmits RTP packets if lost on - // the network. This creates a lossless transport at the expense of delay. - // If using NACK, NACK should be enabled on both endpoints in a call. - virtual int SetNACKStatus(int channel, bool enable, int maxNoPackets) = 0; - - protected: - VoERTP_RTCP() {} - virtual ~VoERTP_RTCP() {} -}; - -} // namespace webrtc - -#endif // #ifndef WEBRTC_VOICE_ENGINE_VOE_RTP_RTCP_H diff --git a/WebRtc.NET/include/webrtc/voice_engine/include/voe_video_sync.h b/WebRtc.NET/include/webrtc/voice_engine/include/voe_video_sync.h deleted file mode 100644 index 655ba635..00000000 --- a/WebRtc.NET/include/webrtc/voice_engine/include/voe_video_sync.h +++ /dev/null @@ -1,99 +0,0 @@ -/* - * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -// This sub-API supports the following functionalities: -// -// - RTP header modification (time stamp and sequence number fields). -// - Playout delay tuning to synchronize the voice with video. -// - Playout delay monitoring. -// -// Usage example, omitting error checking: -// -// using namespace webrtc; -// VoiceEngine* voe = VoiceEngine::Create(); -// VoEBase* base = VoEBase::GetInterface(voe); -// VoEVideoSync* vsync = VoEVideoSync::GetInterface(voe); -// base->Init(); -// ... -// int buffer_ms(0); -// vsync->GetPlayoutBufferSize(buffer_ms); -// ... -// base->Terminate(); -// base->Release(); -// vsync->Release(); -// VoiceEngine::Delete(voe); -// -#ifndef WEBRTC_VOICE_ENGINE_VOE_VIDEO_SYNC_H -#define WEBRTC_VOICE_ENGINE_VOE_VIDEO_SYNC_H - -#include "webrtc/common_types.h" - -namespace webrtc { - -class RtpReceiver; -class RtpRtcp; -class VoiceEngine; - -class WEBRTC_DLLEXPORT VoEVideoSync { - public: - // Factory for the VoEVideoSync sub-API. Increases an internal - // reference counter if successful. Returns NULL if the API is not - // supported or if construction fails. - static VoEVideoSync* GetInterface(VoiceEngine* voiceEngine); - - // Releases the VoEVideoSync sub-API and decreases an internal - // reference counter. Returns the new reference count. This value should - // be zero for all sub-API:s before the VoiceEngine object can be safely - // deleted. - virtual int Release() = 0; - - // Gets the current sound card buffer size (playout delay). - virtual int GetPlayoutBufferSize(int& buffer_ms) = 0; - - // Sets a minimum target delay for the jitter buffer. This delay is - // maintained by the jitter buffer, unless channel condition (jitter in - // inter-arrival times) dictates a higher required delay. The overall - // jitter buffer delay is max of |delay_ms| and the latency that NetEq - // computes based on inter-arrival times and its playout mode. - virtual int SetMinimumPlayoutDelay(int channel, int delay_ms) = 0; - - // Gets the |jitter_buffer_delay_ms| (including the algorithmic delay), and - // the |playout_buffer_delay_ms| for a specified |channel|. - virtual int GetDelayEstimate(int channel, - int* jitter_buffer_delay_ms, - int* playout_buffer_delay_ms) = 0; - - // Returns the least required jitter buffer delay. This is computed by the - // the jitter buffer based on the inter-arrival time of RTP packets and - // playout mode. NetEq maintains this latency unless a higher value is - // requested by calling SetMinimumPlayoutDelay(). - virtual int GetLeastRequiredDelayMs(int channel) const = 0; - - // Manual initialization of the RTP timestamp. - virtual int SetInitTimestamp(int channel, unsigned int timestamp) = 0; - - // Manual initialization of the RTP sequence number. - virtual int SetInitSequenceNumber(int channel, short sequenceNumber) = 0; - - // Get the received RTP timestamp - virtual int GetPlayoutTimestamp(int channel, unsigned int& timestamp) = 0; - - virtual int GetRtpRtcp(int channel, - RtpRtcp** rtpRtcpModule, - RtpReceiver** rtp_receiver) = 0; - - protected: - VoEVideoSync() {} - virtual ~VoEVideoSync() {} -}; - -} // namespace webrtc - -#endif // #ifndef WEBRTC_VOICE_ENGINE_VOE_VIDEO_SYNC_H diff --git a/WebRtc.NET/include/webrtc/voice_engine/include/voe_volume_control.h b/WebRtc.NET/include/webrtc/voice_engine/include/voe_volume_control.h deleted file mode 100644 index 240ab935..00000000 --- a/WebRtc.NET/include/webrtc/voice_engine/include/voe_volume_control.h +++ /dev/null @@ -1,114 +0,0 @@ -/* - * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -// This sub-API supports the following functionalities: -// -// - Speaker volume controls. -// - Microphone volume control. -// - Non-linear speech level control. -// - Mute functions. -// - Additional stereo scaling methods. -// -// Usage example, omitting error checking: -// -// using namespace webrtc; -// VoiceEngine* voe = VoiceEngine::Create(); -// VoEBase* base = VoEBase::GetInterface(voe); -// VoEVolumeControl* volume = VoEVolumeControl::GetInterface(voe); -// base->Init(); -// int ch = base->CreateChannel(); -// ... -// volume->SetInputMute(ch, true); -// ... -// base->DeleteChannel(ch); -// base->Terminate(); -// base->Release(); -// volume->Release(); -// VoiceEngine::Delete(voe); -// -#ifndef WEBRTC_VOICE_ENGINE_VOE_VOLUME_CONTROL_H -#define WEBRTC_VOICE_ENGINE_VOE_VOLUME_CONTROL_H - -#include "webrtc/common_types.h" - -namespace webrtc { - -class VoiceEngine; - -class WEBRTC_DLLEXPORT VoEVolumeControl { - public: - // Factory for the VoEVolumeControl sub-API. Increases an internal - // reference counter if successful. Returns NULL if the API is not - // supported or if construction fails. - static VoEVolumeControl* GetInterface(VoiceEngine* voiceEngine); - - // Releases the VoEVolumeControl sub-API and decreases an internal - // reference counter. Returns the new reference count. This value should - // be zero for all sub-API:s before the VoiceEngine object can be safely - // deleted. - virtual int Release() = 0; - - // Sets the speaker |volume| level. Valid range is [0,255]. - virtual int SetSpeakerVolume(unsigned int volume) = 0; - - // Gets the speaker |volume| level. - virtual int GetSpeakerVolume(unsigned int& volume) = 0; - - // Sets the microphone volume level. Valid range is [0,255]. - virtual int SetMicVolume(unsigned int volume) = 0; - - // Gets the microphone volume level. - virtual int GetMicVolume(unsigned int& volume) = 0; - - // Mutes the microphone input signal completely without affecting - // the audio device volume. - virtual int SetInputMute(int channel, bool enable) = 0; - - // Gets the current microphone input mute state. - virtual int GetInputMute(int channel, bool& enabled) = 0; - - // Gets the microphone speech |level|, mapped non-linearly to the range - // [0,9]. - virtual int GetSpeechInputLevel(unsigned int& level) = 0; - - // Gets the speaker speech |level|, mapped non-linearly to the range - // [0,9]. - virtual int GetSpeechOutputLevel(int channel, unsigned int& level) = 0; - - // Gets the microphone speech |level|, mapped linearly to the range - // [0,32768]. - virtual int GetSpeechInputLevelFullRange(unsigned int& level) = 0; - - // Gets the speaker speech |level|, mapped linearly to the range [0,32768]. - virtual int GetSpeechOutputLevelFullRange(int channel, - unsigned int& level) = 0; - - // Sets a volume |scaling| applied to the outgoing signal of a specific - // channel. Valid scale range is [0.0, 10.0]. - virtual int SetChannelOutputVolumeScaling(int channel, float scaling) = 0; - - // Gets the current volume scaling for a specified |channel|. - virtual int GetChannelOutputVolumeScaling(int channel, float& scaling) = 0; - - // Scales volume of the |left| and |right| channels independently. - // Valid scale range is [0.0, 1.0]. - virtual int SetOutputVolumePan(int channel, float left, float right) = 0; - - // Gets the current left and right scaling factors. - virtual int GetOutputVolumePan(int channel, float& left, float& right) = 0; - - protected: - VoEVolumeControl(){}; - virtual ~VoEVolumeControl(){}; -}; - -} // namespace webrtc - -#endif // #ifndef WEBRTC_VOICE_ENGINE_VOE_VOLUME_CONTROL_H diff --git a/WebRtc.NET/include/webrtc/voice_engine/level_indicator.h b/WebRtc.NET/include/webrtc/voice_engine/level_indicator.h deleted file mode 100644 index cde077df..00000000 --- a/WebRtc.NET/include/webrtc/voice_engine/level_indicator.h +++ /dev/null @@ -1,54 +0,0 @@ -/* - * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_VOICE_ENGINE_LEVEL_INDICATOR_H -#define WEBRTC_VOICE_ENGINE_LEVEL_INDICATOR_H - -#include "webrtc/base/criticalsection.h" -#include "webrtc/typedefs.h" - -namespace webrtc { - -class AudioFrame; -namespace voe { - -class AudioLevel -{ -public: - AudioLevel(); - virtual ~AudioLevel(); - - // Called on "API thread(s)" from APIs like VoEBase::CreateChannel(), - // VoEBase::StopSend(), VoEVolumeControl::GetSpeechOutputLevel(). - int8_t Level() const; - int16_t LevelFullRange() const; - void Clear(); - - // Called on a native capture audio thread (platform dependent) from the - // AudioTransport::RecordedDataIsAvailable() callback. - // In Chrome, this method is called on the AudioInputDevice thread. - void ComputeLevel(const AudioFrame& audioFrame); - -private: - enum { kUpdateFrequency = 10}; - - rtc::CriticalSection _critSect; - - int16_t _absMax; - int16_t _count; - int8_t _currentLevel; - int16_t _currentLevelFullRange; -}; - -} // namespace voe - -} // namespace webrtc - -#endif // WEBRTC_VOICE_ENGINE_LEVEL_INDICATOR_H diff --git a/WebRtc.NET/include/webrtc/voice_engine/mock/mock_voe_observer.h b/WebRtc.NET/include/webrtc/voice_engine/mock/mock_voe_observer.h deleted file mode 100644 index 9abc2eb1..00000000 --- a/WebRtc.NET/include/webrtc/voice_engine/mock/mock_voe_observer.h +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_VOICE_ENGINE_MOCK_VOE_OBSERVER_H_ -#define WEBRTC_VOICE_ENGINE_MOCK_VOE_OBSERVER_H_ - -#include "webrtc/test/gmock.h" -#include "webrtc/voice_engine/include/voe_base.h" - -namespace webrtc { - -class MockVoEObserver: public VoiceEngineObserver { - public: - MockVoEObserver() {} - virtual ~MockVoEObserver() {} - - MOCK_METHOD2(CallbackOnError, void(int channel, int error_code)); -}; - -} - -#endif // WEBRTC_VOICE_ENGINE_MOCK_VOE_OBSERVER_H_ diff --git a/WebRtc.NET/include/webrtc/voice_engine/monitor_module.h b/WebRtc.NET/include/webrtc/voice_engine/monitor_module.h deleted file mode 100644 index f026f725..00000000 --- a/WebRtc.NET/include/webrtc/voice_engine/monitor_module.h +++ /dev/null @@ -1,57 +0,0 @@ -/* - * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_VOICE_ENGINE_MONITOR_MODULE_H -#define WEBRTC_VOICE_ENGINE_MONITOR_MODULE_H - -#include "webrtc/base/criticalsection.h" -#include "webrtc/base/thread_annotations.h" -#include "webrtc/modules/include/module.h" -#include "webrtc/typedefs.h" -#include "webrtc/voice_engine/voice_engine_defines.h" - -class MonitorObserver -{ -public: - virtual void OnPeriodicProcess() = 0; -protected: - virtual ~MonitorObserver() {} -}; - - -namespace webrtc { -namespace voe { - -class MonitorModule : public Module -{ -public: - int32_t RegisterObserver(MonitorObserver& observer); - - int32_t DeRegisterObserver(); - - MonitorModule(); - - virtual ~MonitorModule(); -public: // module - int64_t TimeUntilNextProcess() override; - - void Process() override; - -private: - rtc::CriticalSection _callbackCritSect; - MonitorObserver* _observerPtr GUARDED_BY(_callbackCritSect); - int64_t _lastProcessTime; -}; - -} // namespace voe - -} // namespace webrtc - -#endif // VOICE_ENGINE_MONITOR_MODULE diff --git a/WebRtc.NET/include/webrtc/voice_engine/output_mixer.h b/WebRtc.NET/include/webrtc/voice_engine/output_mixer.h deleted file mode 100644 index 5e3e2e70..00000000 --- a/WebRtc.NET/include/webrtc/voice_engine/output_mixer.h +++ /dev/null @@ -1,132 +0,0 @@ -/* - * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_VOICE_ENGINE_OUTPUT_MIXER_H_ -#define WEBRTC_VOICE_ENGINE_OUTPUT_MIXER_H_ - -#include - -#include "webrtc/base/criticalsection.h" -#include "webrtc/common_audio/resampler/include/push_resampler.h" -#include "webrtc/common_types.h" -#include "webrtc/modules/audio_conference_mixer/include/audio_conference_mixer.h" -#include "webrtc/modules/audio_conference_mixer/include/audio_conference_mixer_defines.h" -#include "webrtc/voice_engine/file_recorder.h" -#include "webrtc/voice_engine/level_indicator.h" -#include "webrtc/voice_engine/voice_engine_defines.h" - -namespace webrtc { - -class AudioProcessing; -class FileWrapper; -class VoEMediaProcess; - -namespace voe { - -class Statistics; - -class OutputMixer : public AudioMixerOutputReceiver, - public FileCallback -{ -public: - static int32_t Create(OutputMixer*& mixer, uint32_t instanceId); - - static void Destroy(OutputMixer*& mixer); - - int32_t SetEngineInformation(Statistics& engineStatistics); - - int32_t SetAudioProcessingModule( - AudioProcessing* audioProcessingModule); - - // VoEExternalMedia - int RegisterExternalMediaProcessing( - VoEMediaProcess& proccess_object); - - int DeRegisterExternalMediaProcessing(); - - int32_t MixActiveChannels(); - - int32_t DoOperationsOnCombinedSignal(bool feed_data_to_apm); - - int32_t SetMixabilityStatus(MixerParticipant& participant, - bool mixable); - - int32_t SetAnonymousMixabilityStatus(MixerParticipant& participant, - bool mixable); - - int GetMixedAudio(int sample_rate_hz, size_t num_channels, - AudioFrame* audioFrame); - - // VoEVolumeControl - int GetSpeechOutputLevel(uint32_t& level); - - int GetSpeechOutputLevelFullRange(uint32_t& level); - - int SetOutputVolumePan(float left, float right); - - int GetOutputVolumePan(float& left, float& right); - - // VoEFile - int StartRecordingPlayout(const char* fileName, - const CodecInst* codecInst); - - int StartRecordingPlayout(OutStream* stream, - const CodecInst* codecInst); - int StopRecordingPlayout(); - - virtual ~OutputMixer(); - - // from AudioMixerOutputReceiver - virtual void NewMixedAudio( - int32_t id, - const AudioFrame& generalAudioFrame, - const AudioFrame** uniqueAudioFrames, - uint32_t size); - - // For file recording - void PlayNotification(int32_t id, uint32_t durationMs); - - void RecordNotification(int32_t id, uint32_t durationMs); - - void PlayFileEnded(int32_t id); - void RecordFileEnded(int32_t id); - -private: - OutputMixer(uint32_t instanceId); - - // uses - Statistics* _engineStatisticsPtr; - AudioProcessing* _audioProcessingModulePtr; - - rtc::CriticalSection _callbackCritSect; - // Protects output_file_recorder_ and _outputFileRecording. - rtc::CriticalSection _fileCritSect; - AudioConferenceMixer& _mixerModule; - AudioFrame _audioFrame; - // Converts mixed audio to the audio device output rate. - PushResampler resampler_; - // Converts mixed audio to the audio processing rate. - PushResampler audioproc_resampler_; - AudioLevel _audioLevel; // measures audio level for the combined signal - int _instanceId; - VoEMediaProcess* _externalMediaCallbackPtr; - bool _externalMedia; - float _panLeft; - float _panRight; - int _mixingFrequencyHz; - std::unique_ptr output_file_recorder_; - bool _outputFileRecording; -}; - -} // namespace voe - -} // namespace werbtc - -#endif // VOICE_ENGINE_OUTPUT_MIXER_H_ diff --git a/WebRtc.NET/include/webrtc/voice_engine/shared_data.h b/WebRtc.NET/include/webrtc/voice_engine/shared_data.h deleted file mode 100644 index 0e57f9d2..00000000 --- a/WebRtc.NET/include/webrtc/voice_engine/shared_data.h +++ /dev/null @@ -1,84 +0,0 @@ -/* - * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_VOICE_ENGINE_SHARED_DATA_H -#define WEBRTC_VOICE_ENGINE_SHARED_DATA_H - -#include - -#include "webrtc/base/criticalsection.h" -#include "webrtc/base/scoped_ref_ptr.h" -#include "webrtc/modules/audio_device/include/audio_device.h" -#include "webrtc/modules/audio_processing/include/audio_processing.h" -#include "webrtc/modules/utility/include/process_thread.h" -#include "webrtc/voice_engine/channel_manager.h" -#include "webrtc/voice_engine/statistics.h" -#include "webrtc/voice_engine/voice_engine_defines.h" - -class ProcessThread; - -namespace webrtc { -namespace voe { - -class TransmitMixer; -class OutputMixer; - -class SharedData -{ -public: - // Public accessors. - uint32_t instance_id() const { return _instanceId; } - Statistics& statistics() { return _engineStatistics; } - ChannelManager& channel_manager() { return _channelManager; } - AudioDeviceModule* audio_device() { return _audioDevicePtr.get(); } - void set_audio_device( - const rtc::scoped_refptr& audio_device); - AudioProcessing* audio_processing() { return audioproc_.get(); } - void set_audio_processing(AudioProcessing* audio_processing); - TransmitMixer* transmit_mixer() { return _transmitMixerPtr; } - OutputMixer* output_mixer() { return _outputMixerPtr; } - rtc::CriticalSection* crit_sec() { return &_apiCritPtr; } - ProcessThread* process_thread() { return _moduleProcessThreadPtr.get(); } - AudioDeviceModule::AudioLayer audio_device_layer() const { - return _audioDeviceLayer; - } - void set_audio_device_layer(AudioDeviceModule::AudioLayer layer) { - _audioDeviceLayer = layer; - } - - int NumOfSendingChannels(); - int NumOfPlayingChannels(); - - // Convenience methods for calling statistics().SetLastError(). - void SetLastError(int32_t error) const; - void SetLastError(int32_t error, TraceLevel level) const; - void SetLastError(int32_t error, TraceLevel level, - const char* msg) const; - -protected: - const uint32_t _instanceId; - rtc::CriticalSection _apiCritPtr; - ChannelManager _channelManager; - Statistics _engineStatistics; - rtc::scoped_refptr _audioDevicePtr; - OutputMixer* _outputMixerPtr; - TransmitMixer* _transmitMixerPtr; - std::unique_ptr audioproc_; - std::unique_ptr _moduleProcessThreadPtr; - - AudioDeviceModule::AudioLayer _audioDeviceLayer; - - SharedData(); - virtual ~SharedData(); -}; - -} // namespace voe -} // namespace webrtc -#endif // WEBRTC_VOICE_ENGINE_SHARED_DATA_H diff --git a/WebRtc.NET/include/webrtc/voice_engine/statistics.h b/WebRtc.NET/include/webrtc/voice_engine/statistics.h deleted file mode 100644 index 785fe14e..00000000 --- a/WebRtc.NET/include/webrtc/voice_engine/statistics.h +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_VOICE_ENGINE_STATISTICS_H -#define WEBRTC_VOICE_ENGINE_STATISTICS_H - -#include "webrtc/base/criticalsection.h" -#include "webrtc/common_types.h" -#include "webrtc/typedefs.h" -#include "webrtc/voice_engine/include/voe_errors.h" -#include "webrtc/voice_engine/voice_engine_defines.h" - -namespace webrtc { -namespace voe { - -class Statistics -{ - public: - enum {KTraceMaxMessageSize = 256}; - public: - Statistics(uint32_t instanceId); - ~Statistics(); - - int32_t SetInitialized(); - int32_t SetUnInitialized(); - bool Initialized() const; - int32_t SetLastError(int32_t error) const; - int32_t SetLastError(int32_t error, TraceLevel level) const; - int32_t SetLastError(int32_t error, - TraceLevel level, - const char* msg) const; - int32_t LastError() const; - - private: - rtc::CriticalSection lock_; - const uint32_t _instanceId; - mutable int32_t _lastError; - bool _isInitialized; -}; - -} // namespace voe - -} // namespace webrtc - -#endif // WEBRTC_VOICE_ENGINE_STATISTICS_H diff --git a/WebRtc.NET/include/webrtc/voice_engine/test/auto_test/automated_mode.h b/WebRtc.NET/include/webrtc/voice_engine/test/auto_test/automated_mode.h deleted file mode 100644 index 599f021a..00000000 --- a/WebRtc.NET/include/webrtc/voice_engine/test/auto_test/automated_mode.h +++ /dev/null @@ -1,17 +0,0 @@ -/* - * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef SRC_VOICE_ENGINE_MAIN_TEST_AUTO_TEST_AUTOMATED_MODE_H_ -#define SRC_VOICE_ENGINE_MAIN_TEST_AUTO_TEST_AUTOMATED_MODE_H_ - -void InitializeGoogleTest(int* argc, char** argv); -int RunInAutomatedMode(); - -#endif // SRC_VOICE_ENGINE_MAIN_TEST_AUTO_TEST_AUTOMATED_MODE_H_ diff --git a/WebRtc.NET/include/webrtc/voice_engine/test/auto_test/fakes/conference_transport.h b/WebRtc.NET/include/webrtc/voice_engine/test/auto_test/fakes/conference_transport.h deleted file mode 100644 index d8a5a49b..00000000 --- a/WebRtc.NET/include/webrtc/voice_engine/test/auto_test/fakes/conference_transport.h +++ /dev/null @@ -1,163 +0,0 @@ -/* - * Copyright (c) 2015 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_VOICE_ENGINE_TEST_AUTO_TEST_FAKES_CONFERENCE_TRANSPORT_H_ -#define WEBRTC_VOICE_ENGINE_TEST_AUTO_TEST_FAKES_CONFERENCE_TRANSPORT_H_ - -#include -#include -#include -#include - -#include "webrtc/base/basictypes.h" -#include "webrtc/base/criticalsection.h" -#include "webrtc/base/platform_thread.h" -#include "webrtc/common_types.h" -#include "webrtc/modules/rtp_rtcp/include/rtp_header_parser.h" -#include "webrtc/system_wrappers/include/event_wrapper.h" -#include "webrtc/test/gtest.h" -#include "webrtc/voice_engine/include/voe_base.h" -#include "webrtc/voice_engine/include/voe_codec.h" -#include "webrtc/voice_engine/include/voe_file.h" -#include "webrtc/voice_engine/include/voe_network.h" -#include "webrtc/voice_engine/include/voe_rtp_rtcp.h" -#include "webrtc/voice_engine/test/auto_test/fakes/loudest_filter.h" - -static const size_t kMaxPacketSizeByte = 1500; - -namespace voetest { - -// This class is to simulate a conference call. There are two Voice Engines, one -// for local channels and the other for remote channels. There is a simulated -// reflector, which exchanges RTCP with local channels. For simplicity, it -// also uses the Voice Engine for remote channels. One can add streams by -// calling AddStream(), which creates a remote sender channel and a local -// receive channel. The remote sender channel plays a file as microphone in a -// looped fashion. Received streams are mixed and played. - -class ConferenceTransport: public webrtc::Transport { - public: - ConferenceTransport(); - virtual ~ConferenceTransport(); - - /* SetRtt() - * Set RTT between local channels and reflector. - * - * Input: - * rtt_ms : RTT in milliseconds. - */ - void SetRtt(unsigned int rtt_ms); - - /* AddStream() - * Adds a stream in the conference. - * - * Input: - * file_name : name of the file to be added as microphone input. - * format : format of the input file. - * - * Returns stream id. - */ - unsigned int AddStream(std::string file_name, webrtc::FileFormats format); - - /* RemoveStream() - * Removes a stream with specified ID from the conference. - * - * Input: - * id : stream id. - * - * Returns false if the specified stream does not exist, true if succeeds. - */ - bool RemoveStream(unsigned int id); - - /* StartPlayout() - * Starts playing out the stream with specified ID, using the default device. - * - * Input: - * id : stream id. - * - * Returns false if the specified stream does not exist, true if succeeds. - */ - bool StartPlayout(unsigned int id); - - /* GetReceiverStatistics() - * Gets RTCP statistics of the stream with specified ID. - * - * Input: - * id : stream id; - * stats : pointer to a CallStatistics to store the result. - * - * Returns false if the specified stream does not exist, true if succeeds. - */ - bool GetReceiverStatistics(unsigned int id, webrtc::CallStatistics* stats); - - // Inherit from class webrtc::Transport. - bool SendRtp(const uint8_t* data, - size_t len, - const webrtc::PacketOptions& options) override; - bool SendRtcp(const uint8_t *data, size_t len) override; - - private: - struct Packet { - enum Type { Rtp, Rtcp, } type_; - - Packet() : len_(0) {} - Packet(Type type, const void* data, size_t len, int64_t time_ms) - : type_(type), len_(len), send_time_ms_(time_ms) { - EXPECT_LE(len_, kMaxPacketSizeByte); - memcpy(data_, data, len_); - } - - uint8_t data_[kMaxPacketSizeByte]; - size_t len_; - int64_t send_time_ms_; - }; - - static bool Run(void* transport) { - return static_cast(transport)->DispatchPackets(); - } - - int GetReceiverChannelForSsrc(unsigned int sender_ssrc) const; - void StorePacket(Packet::Type type, const void* data, size_t len); - void SendPacket(const Packet& packet); - bool DispatchPackets(); - - rtc::CriticalSection pq_crit_; - rtc::CriticalSection stream_crit_; - const std::unique_ptr packet_event_; - rtc::PlatformThread thread_; - - unsigned int rtt_ms_; - unsigned int stream_count_; - - std::map> streams_ GUARDED_BY(stream_crit_); - std::deque packet_queue_ GUARDED_BY(pq_crit_); - - int local_sender_; // Channel Id of local sender - int reflector_; - - webrtc::VoiceEngine* local_voe_; - webrtc::VoEBase* local_base_; - webrtc::VoERTP_RTCP* local_rtp_rtcp_; - webrtc::VoENetwork* local_network_; - - webrtc::VoiceEngine* remote_voe_; - webrtc::VoEBase* remote_base_; - webrtc::VoECodec* remote_codec_; - webrtc::VoERTP_RTCP* remote_rtp_rtcp_; - webrtc::VoENetwork* remote_network_; - webrtc::VoEFile* remote_file_; - - LoudestFilter loudest_filter_; - - const std::unique_ptr rtp_header_parser_; -}; -} // namespace voetest - -#endif // WEBRTC_VOICE_ENGINE_TEST_AUTO_TEST_FAKES_CONFERENCE_TRANSPORT_H_ diff --git a/WebRtc.NET/include/webrtc/voice_engine/test/auto_test/fakes/fake_media_process.h b/WebRtc.NET/include/webrtc/voice_engine/test/auto_test/fakes/fake_media_process.h deleted file mode 100644 index 9e82fbc0..00000000 --- a/WebRtc.NET/include/webrtc/voice_engine/test/auto_test/fakes/fake_media_process.h +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ -#ifndef VOICE_ENGINE_MAIN_TEST_AUTO_TEST_FAKE_MEDIA_PROCESS_H_ -#define VOICE_ENGINE_MAIN_TEST_AUTO_TEST_FAKE_MEDIA_PROCESS_H_ - -#include - -class FakeMediaProcess : public webrtc::VoEMediaProcess { - public: - FakeMediaProcess() : frequency(0) {} - virtual void Process(int channel, - const webrtc::ProcessingTypes type, - int16_t audio_10ms[], - size_t length, - int sampling_freq_hz, - bool stereo) { - for (size_t i = 0; i < length; i++) { - if (!stereo) { - audio_10ms[i] = static_cast(audio_10ms[i] * - sin(2.0 * 3.14 * frequency * 400.0 / sampling_freq_hz)); - } else { - // Interleaved stereo. - audio_10ms[2 * i] = static_cast ( - audio_10ms[2 * i] * sin(2.0 * 3.14 * - frequency * 400.0 / sampling_freq_hz)); - audio_10ms[2 * i + 1] = static_cast ( - audio_10ms[2 * i + 1] * sin(2.0 * 3.14 * - frequency * 400.0 / sampling_freq_hz)); - } - frequency++; - } - } - - private: - int frequency; -}; - -#endif // VOICE_ENGINE_MAIN_TEST_AUTO_TEST_FAKE_MEDIA_PROCESS_H_ diff --git a/WebRtc.NET/include/webrtc/voice_engine/test/auto_test/fakes/loudest_filter.h b/WebRtc.NET/include/webrtc/voice_engine/test/auto_test/fakes/loudest_filter.h deleted file mode 100644 index f862c818..00000000 --- a/WebRtc.NET/include/webrtc/voice_engine/test/auto_test/fakes/loudest_filter.h +++ /dev/null @@ -1,54 +0,0 @@ -/* - * Copyright (c) 2015 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_VOICE_ENGINE_TEST_AUTO_TEST_FAKES_LOUDEST_FILTER_H_ -#define WEBRTC_VOICE_ENGINE_TEST_AUTO_TEST_FAKES_LOUDEST_FILTER_H_ - -#include -#include "webrtc/base/timeutils.h" -#include "webrtc/common_types.h" - -namespace voetest { - -class LoudestFilter { - public: - /* ForwardThisPacket() - * Decide whether to forward a RTP packet, given its header. - * - * Input: - * rtp_header : Header of the RTP packet of interest. - */ - bool ForwardThisPacket(const webrtc::RTPHeader& rtp_header); - - private: - struct Status { - void Set(int audio_level, int64_t last_time_ms) { - this->audio_level = audio_level; - this->last_time_ms = last_time_ms; - } - int audio_level; - int64_t last_time_ms; - }; - - void RemoveTimeoutStreams(int64_t time_ms); - unsigned int FindQuietestStream(); - - // Keeps the streams being forwarded in pair. - std::map stream_levels_; - - const int32_t kStreamTimeOutMs = 5000; - const size_t kMaxMixSize = 3; - const int kInvalidAudioLevel = 128; -}; - - -} // namespace voetest - -#endif // WEBRTC_VOICE_ENGINE_TEST_AUTO_TEST_FAKES_LOUDEST_FILTER_H_ diff --git a/WebRtc.NET/include/webrtc/voice_engine/test/auto_test/fixtures/after_initialization_fixture.h b/WebRtc.NET/include/webrtc/voice_engine/test/auto_test/fixtures/after_initialization_fixture.h deleted file mode 100644 index 66086695..00000000 --- a/WebRtc.NET/include/webrtc/voice_engine/test/auto_test/fixtures/after_initialization_fixture.h +++ /dev/null @@ -1,169 +0,0 @@ -/* - * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef SRC_VOICE_ENGINE_MAIN_TEST_AUTO_TEST_STANDARD_TEST_BASE_AFTER_INIT_H_ -#define SRC_VOICE_ENGINE_MAIN_TEST_AUTO_TEST_STANDARD_TEST_BASE_AFTER_INIT_H_ - -#include -#include - -#include "webrtc/base/criticalsection.h" -#include "webrtc/base/platform_thread.h" -#include "webrtc/common_types.h" -#include "webrtc/modules/rtp_rtcp/source/byte_io.h" -#include "webrtc/system_wrappers/include/atomic32.h" -#include "webrtc/system_wrappers/include/event_wrapper.h" -#include "webrtc/system_wrappers/include/sleep.h" -#include "webrtc/voice_engine/test/auto_test/fixtures/before_initialization_fixture.h" - -class TestErrorObserver; - -class LoopBackTransport : public webrtc::Transport { - public: - LoopBackTransport(webrtc::VoENetwork* voe_network, int channel) - : packet_event_(webrtc::EventWrapper::Create()), - thread_(NetworkProcess, this, "LoopBackTransport"), - channel_(channel), - voe_network_(voe_network), - transmitted_packets_(0) { - thread_.Start(); - } - - ~LoopBackTransport() { thread_.Stop(); } - - bool SendRtp(const uint8_t* data, - size_t len, - const webrtc::PacketOptions& options) override { - StorePacket(Packet::Rtp, data, len); - return true; - } - - bool SendRtcp(const uint8_t* data, size_t len) override { - StorePacket(Packet::Rtcp, data, len); - return true; - } - - void WaitForTransmittedPackets(int32_t packet_count) { - enum { - kSleepIntervalMs = 10 - }; - int32_t limit = transmitted_packets_.Value() + packet_count; - while (transmitted_packets_.Value() < limit) { - webrtc::SleepMs(kSleepIntervalMs); - } - } - - void AddChannel(uint32_t ssrc, int channel) { - rtc::CritScope lock(&crit_); - channels_[ssrc] = channel; - } - - private: - struct Packet { - enum Type { Rtp, Rtcp, } type; - - Packet() : len(0) {} - Packet(Type type, const void* data, size_t len) - : type(type), len(len) { - assert(len <= 1500); - memcpy(this->data, data, len); - } - - uint8_t data[1500]; - size_t len; - }; - - void StorePacket(Packet::Type type, - const void* data, - size_t len) { - { - rtc::CritScope lock(&crit_); - packet_queue_.push_back(Packet(type, data, len)); - } - packet_event_->Set(); - } - - static bool NetworkProcess(void* transport) { - return static_cast(transport)->SendPackets(); - } - - bool SendPackets() { - switch (packet_event_->Wait(10)) { - case webrtc::kEventSignaled: - break; - case webrtc::kEventTimeout: - break; - case webrtc::kEventError: - // TODO(pbos): Log a warning here? - return true; - } - - while (true) { - Packet p; - int channel = channel_; - { - rtc::CritScope lock(&crit_); - if (packet_queue_.empty()) - break; - p = packet_queue_.front(); - packet_queue_.pop_front(); - - if (p.type == Packet::Rtp) { - uint32_t ssrc = - webrtc::ByteReader::ReadBigEndian(&p.data[8]); - if (channels_[ssrc] != 0) - channel = channels_[ssrc]; - } - // TODO(pbos): Add RTCP SSRC muxing/demuxing if anything requires it. - } - - // Minimum RTP header size. - if (p.len < 12) - continue; - - switch (p.type) { - case Packet::Rtp: - voe_network_->ReceivedRTPPacket(channel, p.data, p.len, - webrtc::PacketTime()); - break; - case Packet::Rtcp: - voe_network_->ReceivedRTCPPacket(channel, p.data, p.len); - break; - } - ++transmitted_packets_; - } - return true; - } - - rtc::CriticalSection crit_; - const std::unique_ptr packet_event_; - rtc::PlatformThread thread_; - std::deque packet_queue_ GUARDED_BY(crit_); - const int channel_; - std::map channels_ GUARDED_BY(crit_); - webrtc::VoENetwork* const voe_network_; - webrtc::Atomic32 transmitted_packets_; -}; - -// This fixture initializes the voice engine in addition to the work -// done by the before-initialization fixture. It also registers an error -// observer which will fail tests on error callbacks. This fixture is -// useful to tests that want to run before we have started any form of -// streaming through the voice engine. -class AfterInitializationFixture : public BeforeInitializationFixture { - public: - AfterInitializationFixture(); - virtual ~AfterInitializationFixture(); - - protected: - std::unique_ptr error_observer_; -}; - -#endif // SRC_VOICE_ENGINE_MAIN_TEST_AUTO_TEST_STANDARD_TEST_BASE_AFTER_INIT_H_ diff --git a/WebRtc.NET/include/webrtc/voice_engine/test/auto_test/fixtures/after_streaming_fixture.h b/WebRtc.NET/include/webrtc/voice_engine/test/auto_test/fixtures/after_streaming_fixture.h deleted file mode 100644 index 1762e01e..00000000 --- a/WebRtc.NET/include/webrtc/voice_engine/test/auto_test/fixtures/after_streaming_fixture.h +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef SRC_VOICE_ENGINE_MAIN_TEST_AUTO_TEST_STANDARD_AFTER_STREAMING_H_ -#define SRC_VOICE_ENGINE_MAIN_TEST_AUTO_TEST_STANDARD_AFTER_STREAMING_H_ - -#include - -#include "webrtc/voice_engine/channel_proxy.h" -#include "webrtc/voice_engine/test/auto_test/fixtures/before_streaming_fixture.h" - -// This fixture will, in addition to the work done by its superclasses, -// start play back on construction. -class AfterStreamingFixture : public BeforeStreamingFixture { - public: - AfterStreamingFixture(); - virtual ~AfterStreamingFixture() {} - - protected: - std::unique_ptr channel_proxy_; -}; - -#endif // SRC_VOICE_ENGINE_MAIN_TEST_AUTO_TEST_STANDARD_AFTER_STREAMING_H_ diff --git a/WebRtc.NET/include/webrtc/voice_engine/test/auto_test/fixtures/before_initialization_fixture.h b/WebRtc.NET/include/webrtc/voice_engine/test/auto_test/fixtures/before_initialization_fixture.h deleted file mode 100644 index 205f8aa5..00000000 --- a/WebRtc.NET/include/webrtc/voice_engine/test/auto_test/fixtures/before_initialization_fixture.h +++ /dev/null @@ -1,66 +0,0 @@ -/* - * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef SRC_VOICE_ENGINE_MAIN_TEST_AUTO_TEST_STANDARD_TEST_BASE_H_ -#define SRC_VOICE_ENGINE_MAIN_TEST_AUTO_TEST_STANDARD_TEST_BASE_H_ - -#include "webrtc/common_types.h" -#include "webrtc/test/gmock.h" -#include "webrtc/test/gtest.h" -#include "webrtc/typedefs.h" -#include "webrtc/voice_engine/include/voe_audio_processing.h" -#include "webrtc/voice_engine/include/voe_base.h" -#include "webrtc/voice_engine/include/voe_codec.h" -#include "webrtc/voice_engine/include/voe_errors.h" -#include "webrtc/voice_engine/include/voe_external_media.h" -#include "webrtc/voice_engine/include/voe_file.h" -#include "webrtc/voice_engine/include/voe_hardware.h" -#include "webrtc/voice_engine/include/voe_neteq_stats.h" -#include "webrtc/voice_engine/include/voe_network.h" -#include "webrtc/voice_engine/include/voe_rtp_rtcp.h" -#include "webrtc/voice_engine/include/voe_video_sync.h" -#include "webrtc/voice_engine/include/voe_volume_control.h" -#include "webrtc/voice_engine/test/auto_test/voe_test_common.h" - -// This convenient fixture sets up all voice engine interfaces automatically for -// use by testing subclasses. It allocates each interface and releases it once -// which means that if a tests allocates additional interfaces from the voice -// engine and forgets to release it, this test will fail in the destructor. -// It will not call any init methods. -// -// Implementation note: -// The interface fetching is done in the constructor and not SetUp() since -// this relieves our subclasses from calling SetUp in the superclass if they -// choose to override SetUp() themselves. This is fine as googletest will -// construct new test objects for each method. -class BeforeInitializationFixture : public testing::Test { - public: - BeforeInitializationFixture(); - virtual ~BeforeInitializationFixture(); - - protected: - // Use this sleep function to sleep in tests. - void Sleep(long milliseconds); - - webrtc::VoiceEngine* voice_engine_; - webrtc::VoEBase* voe_base_; - webrtc::VoECodec* voe_codec_; - webrtc::VoEVolumeControl* voe_volume_control_; - webrtc::VoERTP_RTCP* voe_rtp_rtcp_; - webrtc::VoEAudioProcessing* voe_apm_; - webrtc::VoENetwork* voe_network_; - webrtc::VoEFile* voe_file_; - webrtc::VoEVideoSync* voe_vsync_; - webrtc::VoEHardware* voe_hardware_; - webrtc::VoEExternalMedia* voe_xmedia_; - webrtc::VoENetEqStats* voe_neteq_stats_; -}; - -#endif // SRC_VOICE_ENGINE_MAIN_TEST_AUTO_TEST_STANDARD_TEST_BASE_H_ diff --git a/WebRtc.NET/include/webrtc/voice_engine/test/auto_test/fixtures/before_streaming_fixture.h b/WebRtc.NET/include/webrtc/voice_engine/test/auto_test/fixtures/before_streaming_fixture.h deleted file mode 100644 index 0ff4a06e..00000000 --- a/WebRtc.NET/include/webrtc/voice_engine/test/auto_test/fixtures/before_streaming_fixture.h +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Copyright (c) 2014 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef SRC_VOICE_ENGINE_MAIN_TEST_AUTO_TEST_STANDARD_BEFORE_STREAMING_H_ -#define SRC_VOICE_ENGINE_MAIN_TEST_AUTO_TEST_STANDARD_BEFORE_STREAMING_H_ - -#include -#include "webrtc/voice_engine/test/auto_test/fixtures/after_initialization_fixture.h" - -// This fixture will, in addition to the work done by its superclasses, -// create a channel and prepare playing a file through the fake microphone -// to simulate microphone input. The purpose is to make it convenient -// to write tests that require microphone input. -class BeforeStreamingFixture : public AfterInitializationFixture { - public: - BeforeStreamingFixture(); - virtual ~BeforeStreamingFixture(); - - protected: - int channel_; - std::string fake_microphone_input_file_; - - // Shuts off the fake microphone for this test. - void SwitchToManualMicrophone(); - - // Restarts the fake microphone if it's been shut off earlier. - void RestartFakeMicrophone(); - - // Stops all sending and playout. - void PausePlaying(); - - // Resumes all sending and playout. - void ResumePlaying(); - - // Waits until packet_count packetes have been processed by recipient. - void WaitForTransmittedPackets(int32_t packet_count); - - private: - void SetUpLocalPlayback(); - - LoopBackTransport* transport_; -}; - - -#endif // SRC_VOICE_ENGINE_MAIN_TEST_AUTO_TEST_STANDARD_BEFORE_STREAMING_H_ diff --git a/WebRtc.NET/include/webrtc/voice_engine/test/auto_test/voe_cpu_test.h b/WebRtc.NET/include/webrtc/voice_engine/test/auto_test/voe_cpu_test.h deleted file mode 100644 index 74ba3e92..00000000 --- a/WebRtc.NET/include/webrtc/voice_engine/test/auto_test/voe_cpu_test.h +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_VOICE_ENGINE_VOE_CPU_TEST_H -#define WEBRTC_VOICE_ENGINE_VOE_CPU_TEST_H - -#include "webrtc/voice_engine/test/auto_test/voe_standard_test.h" - -namespace voetest { - -class VoETestManager; - -class VoECpuTest { - public: - VoECpuTest(VoETestManager& mgr); - ~VoECpuTest() {} - int DoTest(); - private: - VoETestManager& _mgr; -}; - -} // namespace voetest - -#endif // WEBRTC_VOICE_ENGINE_VOE_CPU_TEST_H diff --git a/WebRtc.NET/include/webrtc/voice_engine/test/auto_test/voe_standard_test.h b/WebRtc.NET/include/webrtc/voice_engine/test/auto_test/voe_standard_test.h deleted file mode 100644 index 6801877c..00000000 --- a/WebRtc.NET/include/webrtc/voice_engine/test/auto_test/voe_standard_test.h +++ /dev/null @@ -1,158 +0,0 @@ -/* - * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_VOICE_ENGINE_VOE_STANDARD_TEST_H -#define WEBRTC_VOICE_ENGINE_VOE_STANDARD_TEST_H - -#include -#include - -#include "gflags/gflags.h" -#include "webrtc/test/testsupport/fileutils.h" -#include "webrtc/voice_engine/include/voe_audio_processing.h" -#include "webrtc/voice_engine/include/voe_base.h" -#include "webrtc/voice_engine/include/voe_errors.h" -#include "webrtc/voice_engine/include/voe_file.h" -#include "webrtc/voice_engine/include/voe_rtp_rtcp.h" -#include "webrtc/voice_engine/test/auto_test/voe_test_common.h" -#include "webrtc/voice_engine/test/auto_test/voe_test_interface.h" -#include "webrtc/voice_engine/include/voe_codec.h" -#include "webrtc/voice_engine/include/voe_external_media.h" -#include "webrtc/voice_engine/include/voe_hardware.h" -#include "webrtc/voice_engine/include/voe_network.h" -#include "webrtc/voice_engine/include/voe_video_sync.h" -#include "webrtc/voice_engine/include/voe_volume_control.h" - -namespace webrtc { -class VoENetEqStats; -} - -#if defined(WEBRTC_ANDROID) -extern char mobileLogMsg[640]; -#endif - -DECLARE_bool(include_timing_dependent_tests); - -namespace voetest { - -class SubAPIManager { - public: - SubAPIManager() - : _base(true), - _codec(false), - _externalMedia(false), - _file(false), - _hardware(false), - _netEqStats(false), - _network(false), - _rtp_rtcp(false), - _videoSync(false), - _volumeControl(false), - _apm(false) { - _codec = true; - _externalMedia = true; - _file = true; - _hardware = true; - _netEqStats = true; - _network = true; - _rtp_rtcp = true; - _videoSync = true; - _volumeControl = true; - _apm = true; - } - - void DisplayStatus() const; - - private: - bool _base, _codec; - bool _externalMedia, _file, _hardware; - bool _netEqStats, _network, _rtp_rtcp, _videoSync, _volumeControl, _apm; -}; - -class VoETestManager { - public: - VoETestManager(); - ~VoETestManager(); - - // Must be called after construction. - bool Init(); - - void GetInterfaces(); - int ReleaseInterfaces(); - - const char* AudioFilename() const { - const std::string& result = - webrtc::test::ResourcePath("voice_engine/audio_long16", "pcm"); - return result.c_str(); - } - - VoiceEngine* VoiceEnginePtr() const { - return voice_engine_; - } - VoEBase* BasePtr() const { - return voe_base_; - } - VoECodec* CodecPtr() const { - return voe_codec_; - } - VoEVolumeControl* VolumeControlPtr() const { - return voe_volume_control_; - } - VoERTP_RTCP* RTP_RTCPPtr() const { - return voe_rtp_rtcp_; - } - VoEAudioProcessing* APMPtr() const { - return voe_apm_; - } - - VoENetwork* NetworkPtr() const { - return voe_network_; - } - - VoEFile* FilePtr() const { - return voe_file_; - } - - VoEHardware* HardwarePtr() const { - return voe_hardware_; - } - - VoEVideoSync* VideoSyncPtr() const { - return voe_vsync_; - } - - VoEExternalMedia* ExternalMediaPtr() const { - return voe_xmedia_; - } - - VoENetEqStats* NetEqStatsPtr() const { - return voe_neteq_stats_; - } - - private: - bool initialized_; - - VoiceEngine* voice_engine_; - VoEBase* voe_base_; - VoECodec* voe_codec_; - VoEExternalMedia* voe_xmedia_; - VoEFile* voe_file_; - VoEHardware* voe_hardware_; - VoENetwork* voe_network_; - VoENetEqStats* voe_neteq_stats_; - VoERTP_RTCP* voe_rtp_rtcp_; - VoEVideoSync* voe_vsync_; - VoEVolumeControl* voe_volume_control_; - VoEAudioProcessing* voe_apm_; -}; - -} // namespace voetest - -#endif // WEBRTC_VOICE_ENGINE_VOE_STANDARD_TEST_H diff --git a/WebRtc.NET/include/webrtc/voice_engine/test/auto_test/voe_stress_test.h b/WebRtc.NET/include/webrtc/voice_engine/test/auto_test/voe_stress_test.h deleted file mode 100644 index 1c913068..00000000 --- a/WebRtc.NET/include/webrtc/voice_engine/test/auto_test/voe_stress_test.h +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_VOICE_ENGINE_VOE_STRESS_TEST_H -#define WEBRTC_VOICE_ENGINE_VOE_STRESS_TEST_H - -#include - -#include "webrtc/base/platform_thread.h" - -namespace voetest { - -class VoETestManager; - -class VoEStressTest { - public: - VoEStressTest(VoETestManager& mgr) : _mgr(mgr) { - } - ~VoEStressTest() { - } - int DoTest(); - - private: - int MenuSelection(); - int StartStopTest(); - int CreateDeleteChannelsTest(); - int MultipleThreadsTest(); - - static bool RunExtraApi(void* ptr); - bool ProcessExtraApi(); - - VoETestManager& _mgr; - - // TODO(pbos): Remove unique_ptr and use PlatformThread directly. - std::unique_ptr _ptrExtraApiThread; -}; - -} // namespace voetest - -#endif // WEBRTC_VOICE_ENGINE_VOE_STRESS_TEST_H diff --git a/WebRtc.NET/include/webrtc/voice_engine/test/auto_test/voe_test_common.h b/WebRtc.NET/include/webrtc/voice_engine/test/auto_test/voe_test_common.h deleted file mode 100644 index 67478ffc..00000000 --- a/WebRtc.NET/include/webrtc/voice_engine/test/auto_test/voe_test_common.h +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_VOICE_ENGINE_VOE_TEST_COMMON_H_ -#define WEBRTC_VOICE_ENGINE_VOE_TEST_COMMON_H_ - -#ifdef WEBRTC_ANDROID -#include -#define ANDROID_LOG_TAG "VoiceEngine Auto Test" -#define TEST_LOG(...) \ - __android_log_print(ANDROID_LOG_DEBUG, ANDROID_LOG_TAG, __VA_ARGS__) -#define TEST_LOG_ERROR(...) \ - __android_log_print(ANDROID_LOG_ERROR, ANDROID_LOG_TAG, __VA_ARGS__) -#define TEST_LOG_FLUSH -#else -#define TEST_LOG printf -#define TEST_LOG_ERROR printf -#define TEST_LOG_FLUSH fflush(NULL) -#endif - -// Time in ms to test each packet size for each codec -#define CODEC_TEST_TIME 400 - -#endif // WEBRTC_VOICE_ENGINE_VOE_TEST_COMMON_H_ diff --git a/WebRtc.NET/include/webrtc/voice_engine/test/auto_test/voe_test_defines.h b/WebRtc.NET/include/webrtc/voice_engine/test/auto_test/voe_test_defines.h deleted file mode 100644 index 4e24d1ac..00000000 --- a/WebRtc.NET/include/webrtc/voice_engine/test/auto_test/voe_test_defines.h +++ /dev/null @@ -1,125 +0,0 @@ -/* - * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_VOICE_ENGINE_VOE_TEST_DEFINES_H -#define WEBRTC_VOICE_ENGINE_VOE_TEST_DEFINES_H - -#include "webrtc/voice_engine/test/auto_test/voe_test_common.h" - -// Select the tests to execute, list order below is same as they will be -// executed. Note that, all settings below will be overriden by sub-API -// settings in voice_engine_configurations.h. -#define _TEST_BASE_ -#define _TEST_RTP_RTCP_ -#define _TEST_HARDWARE_ -#define _TEST_CODEC_ -#define _TEST_VOLUME_ -#define _TEST_AUDIO_PROCESSING_ -#define _TEST_FILE_ -#define _TEST_NETWORK_ -#define _TEST_VIDEO_SYNC_ -#define _TEST_NETEQ_STATS_ -#define _TEST_XMEDIA_ - -#define TESTED_AUDIO_LAYER kAudioPlatformDefault -//#define TESTED_AUDIO_LAYER kAudioLinuxPulse - -// #define _ENABLE_VISUAL_LEAK_DETECTOR_ // Enables VLD to find memory leaks -// #define _ENABLE_IPV6_TESTS_ // Enables IPv6 tests in network xtest -// #define _USE_EXTENDED_TRACE_ // Adds unique trace files for extended test -// #define _MEMORY_TEST_ - -// Enable this when running instrumentation of some kind to exclude tests -// that will not pass due to slowed down execution. -// #define _INSTRUMENTATION_TESTING_ - -// Some parts can cause problems while running Insure -#ifdef __INSURE__ -#define _INSTRUMENTATION_TESTING_ -#endif - -#define MARK() TEST_LOG("."); fflush(NULL); // Add test marker -#define ANL() TEST_LOG("\n") // Add New Line -#define AOK() TEST_LOG("[Test is OK]"); fflush(NULL); // Add OK -#if defined(_WIN32) -#define PAUSE \ - { \ - TEST_LOG("Press any key to continue..."); \ - _getch(); \ - TEST_LOG("\n"); \ - } -#else -#define PAUSE \ - { \ - TEST_LOG("Continuing (pause not supported)\n"); \ - } -#endif - -#define TEST(s) \ - { \ - TEST_LOG("Testing: %s", #s); \ - } \ - -#ifdef _INSTRUMENTATION_TESTING_ -// Don't stop execution if error occurs -#define TEST_MUSTPASS(expr) \ - { \ - if ((expr)) \ - { \ - TEST_LOG_ERROR("Error at line:%i, %s \n",__LINE__, #expr); \ - TEST_LOG_ERROR("Error code: %i\n",voe_base_->LastError()); \ - } \ - } -#define TEST_ERROR(code) \ - { \ - int err = voe_base_->LastError(); \ - if (err != code) \ - { \ - TEST_LOG_ERROR("Invalid error code (%d, should be %d) at line %d\n", - code, err, __LINE__); -} -} -#else -#define ASSERT_TRUE(expr) TEST_MUSTPASS(!(expr)) -#define ASSERT_FALSE(expr) TEST_MUSTPASS(expr) -#define TEST_MUSTFAIL(expr) TEST_MUSTPASS(!((expr) == -1)) -#define TEST_MUSTPASS(expr) \ - { \ - if ((expr)) \ - { \ - TEST_LOG_ERROR("\nError at line:%i, %s \n",__LINE__, #expr); \ - TEST_LOG_ERROR("Error code: %i\n", voe_base_->LastError()); \ - PAUSE \ - return -1; \ - } \ - } -#define TEST_ERROR(code) \ - { \ - int err = voe_base_->LastError(); \ - if (err != code) \ - { \ - TEST_LOG_ERROR("Invalid error code (%d, should be %d) at line %d\n", \ - err, code, __LINE__); \ - PAUSE \ - return -1; \ - } \ - } -#endif // #ifdef _INSTRUMENTATION_TESTING_ -#define EXCLUDE() \ - { \ - TEST_LOG("\n>>> Excluding test at line: %i <<<\n\n",__LINE__); \ - } - -#define INCOMPLETE() \ - { \ - TEST_LOG("\n>>> Incomplete test at line: %i <<<\n\n",__LINE__); \ - } - -#endif // WEBRTC_VOICE_ENGINE_VOE_TEST_DEFINES_H diff --git a/WebRtc.NET/include/webrtc/voice_engine/test/auto_test/voe_test_interface.h b/WebRtc.NET/include/webrtc/voice_engine/test/auto_test/voe_test_interface.h deleted file mode 100644 index aea55a49..00000000 --- a/WebRtc.NET/include/webrtc/voice_engine/test/auto_test/voe_test_interface.h +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -/* - * Interface for starting test - */ - -#ifndef WEBRTC_VOICE_ENGINE_VOE_TEST_INTERFACE_H -#define WEBRTC_VOICE_ENGINE_VOE_TEST_INTERFACE_H - -#include "webrtc/common_types.h" - -namespace voetest { -// TODO(andrew): Using directives not permitted. -using namespace webrtc; - -// TestType enumerator -enum TestType { - Invalid = -1, - Standard = 0, - - Stress = 2, - - CPU = 4 -}; - -// Main test function -int runAutoTest(TestType testType); - -} // namespace voetest -#endif // WEBRTC_VOICE_ENGINE_VOE_TEST_INTERFACE_H diff --git a/WebRtc.NET/include/webrtc/voice_engine/test/channel_transport/channel_transport.h b/WebRtc.NET/include/webrtc/voice_engine/test/channel_transport/channel_transport.h deleted file mode 100644 index 9604b512..00000000 --- a/WebRtc.NET/include/webrtc/voice_engine/test/channel_transport/channel_transport.h +++ /dev/null @@ -1,56 +0,0 @@ -/* - * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_VOICE_ENGINE_TEST_CHANNEL_TRANSPORT_CHANNEL_TRANSPORT_H_ -#define WEBRTC_VOICE_ENGINE_TEST_CHANNEL_TRANSPORT_CHANNEL_TRANSPORT_H_ - -#include "webrtc/voice_engine/test/channel_transport/udp_transport.h" - -namespace webrtc { - -class VoENetwork; - -namespace test { - -// Helper class for VoiceEngine tests. -class VoiceChannelTransport : public UdpTransportData { - public: - VoiceChannelTransport(VoENetwork* voe_network, int channel); - - virtual ~VoiceChannelTransport(); - - // Start implementation of UdpTransportData. - void IncomingRTPPacket(const int8_t* incoming_rtp_packet, - const size_t packet_length, - const char* /*from_ip*/, - const uint16_t /*from_port*/) override; - - void IncomingRTCPPacket(const int8_t* incoming_rtcp_packet, - const size_t packet_length, - const char* /*from_ip*/, - const uint16_t /*from_port*/) override; - // End implementation of UdpTransportData. - - // Specifies the ports to receive RTP packets on. - int SetLocalReceiver(uint16_t rtp_port); - - // Specifies the destination port and IP address for a specified channel. - int SetSendDestination(const char* ip_address, uint16_t rtp_port); - - private: - int channel_; - VoENetwork* voe_network_; - UdpTransport* socket_transport_; -}; - -} // namespace test -} // namespace webrtc - -#endif // WEBRTC_VOICE_ENGINE_TEST_CHANNEL_TRANSPORT_CHANNEL_TRANSPORT_H_ diff --git a/WebRtc.NET/include/webrtc/voice_engine/test/channel_transport/traffic_control_win.h b/WebRtc.NET/include/webrtc/voice_engine/test/channel_transport/traffic_control_win.h deleted file mode 100644 index 21019c5a..00000000 --- a/WebRtc.NET/include/webrtc/voice_engine/test/channel_transport/traffic_control_win.h +++ /dev/null @@ -1,99 +0,0 @@ -/* - * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_VOICE_ENGINE_TEST_CHANNEL_TRANSPORT_TRAFFIC_CONTROL_WINDOWS_H_ -#define WEBRTC_VOICE_ENGINE_TEST_CHANNEL_TRANSPORT_TRAFFIC_CONTROL_WINDOWS_H_ - -#ifndef WIN32_LEAN_AND_MEAN -#define WIN32_LEAN_AND_MEAN -#endif - -// Disable deprication warning from traffic.h -#pragma warning(disable : 4995) - -#include -#include -#include -#include - -#include "webrtc/system_wrappers/include/trace.h" - -namespace webrtc { -namespace test { -void MyClNotifyHandler(HANDLE ClRegCtx, HANDLE ClIfcCtx, ULONG Event, - HANDLE SubCode, ULONG BufSize, PVOID Buffer); - - -typedef ULONG (WINAPI *registerFn)(ULONG, HANDLE, PTCI_CLIENT_FUNC_LIST, - PHANDLE); -typedef ULONG (WINAPI *deregisterFn)(HANDLE); -typedef ULONG (WINAPI *enumerateFn)(HANDLE, PULONG, PTC_IFC_DESCRIPTOR); -typedef ULONG (WINAPI *openInterfaceFn)(LPWSTR, HANDLE, HANDLE, PHANDLE); -typedef ULONG (WINAPI *closeInterfaceFn)(HANDLE); -typedef ULONG (WINAPI *flowAddFn)(HANDLE, HANDLE, ULONG, PTC_GEN_FLOW, PHANDLE); -typedef ULONG (WINAPI *filterAddFn)(HANDLE, PTC_GEN_FILTER, PHANDLE); -typedef ULONG (WINAPI *flowDeleteFn)(HANDLE); -typedef ULONG (WINAPI *filterDeleteFn)(HANDLE); - -class TrafficControlWindows -{ - public: - // Factory method. Constructor disabled. - static TrafficControlWindows* GetInstance(const int32_t id); - static void Release(TrafficControlWindows* gtc); - - ULONG TcRegisterClient(ULONG TciVersion, HANDLE ClRegCtx, - PTCI_CLIENT_FUNC_LIST ClientHandlerList, - PHANDLE pClientHandle); - - ULONG TcDeregisterClient(HANDLE clientHandle); - - ULONG TcEnumerateInterfaces(HANDLE ClientHandle, PULONG pBufferSize, - PTC_IFC_DESCRIPTOR interfaceBuffer); - - ULONG TcOpenInterfaceW(LPWSTR pInterfaceName, HANDLE ClientHandle, - HANDLE ClIfcCtx, PHANDLE pIfcHandle); - - ULONG TcCloseInterface(HANDLE IfcHandle); - - ULONG TcAddFlow(HANDLE IfcHandle, HANDLE ClFlowCtx, ULONG Flags, - PTC_GEN_FLOW pGenericFlow, PHANDLE pFlowHandle); - - ULONG TcAddFilter(HANDLE FlowHandle, PTC_GEN_FILTER pGenericFilter, - PHANDLE pFilterHandle); - - ULONG TcDeleteFlow(HANDLE FlowHandle); - ULONG TcDeleteFilter(HANDLE FilterHandle); -private: - TrafficControlWindows(const int32_t id); - TCI_CLIENT_FUNC_LIST QoSFunctions; - - static TrafficControlWindows* instance; - - registerFn tcRegister; - deregisterFn tcDeregister; - - enumerateFn tcEnumerate; - openInterfaceFn tcOpenInterface; - closeInterfaceFn tcCloseInterface; - - flowAddFn tcAddFlow; - flowDeleteFn tcDeleteFlow; - - filterAddFn tcAddFilter; - filterDeleteFn tcDeleteFilter; - - static uint32_t refCounter; -}; - -} // namespace test -} // namespace webrtc - -#endif // WEBRTC_VOICE_ENGINE_TEST_CHANNEL_TRANSPORT_TRAFFIC_CONTROL_WINDOWS_H_ diff --git a/WebRtc.NET/include/webrtc/voice_engine/test/channel_transport/udp_socket2_manager_win.h b/WebRtc.NET/include/webrtc/voice_engine/test/channel_transport/udp_socket2_manager_win.h deleted file mode 100644 index ceba9c99..00000000 --- a/WebRtc.NET/include/webrtc/voice_engine/test/channel_transport/udp_socket2_manager_win.h +++ /dev/null @@ -1,162 +0,0 @@ -/* - * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_VOICE_ENGINE_TEST_CHANNEL_TRANSPORT_UDP_SOCKET2_MANAGER_WINDOWS_H_ -#define WEBRTC_VOICE_ENGINE_TEST_CHANNEL_TRANSPORT_UDP_SOCKET2_MANAGER_WINDOWS_H_ - -#include -#include - -#include "webrtc/system_wrappers/include/atomic32.h" -#include "webrtc/system_wrappers/include/critical_section_wrapper.h" -#include "webrtc/system_wrappers/include/event_wrapper.h" -#include "webrtc/base/platform_thread.h" -#include "webrtc/voice_engine/test/channel_transport/udp_socket2_win.h" -#include "webrtc/voice_engine/test/channel_transport/udp_socket_manager_wrapper.h" -#include "webrtc/voice_engine/test/channel_transport/udp_transport.h" - -#define MAX_IO_BUFF_SIZE 1600 - -namespace webrtc { -namespace test { - -enum IO_OPERATION { - OP_READ, - OP_WRITE -}; - -class UdpSocket2Windows; - -// Struct used for all socket I/O operations. -struct PerIoContext { - WSAOVERLAPPED overlapped; - char buffer[MAX_IO_BUFF_SIZE]; - WSABUF wsabuf; - size_t nTotalBytes; - int nSentBytes; - int bytes; - IO_OPERATION ioOperation; - SocketAddress from; - int fromLen; - // Should be set to true if the I/O context was passed to the system by - // a thread not controlled by the socket implementation. - bool ioInitiatedByPlatformThread; - // TODO (hellner): Not used. Delete it. - PerIoContext* pNextFree; -}; - -struct IoContextPoolItem; -struct IoContextPoolItemPayload -{ - PerIoContext ioContext; - IoContextPoolItem* base; -}; - -struct IoContextPoolItem -{ - // Atomic single linked list entry header. - SLIST_ENTRY itemEntry; - // Atomic single linked list payload - IoContextPoolItemPayload payload; -}; - -class IoContextPool -{ -public: - IoContextPool(); - virtual ~IoContextPool(); - virtual int32_t Init(uint32_t increaseSize = 128); - // Re-use an old unused IO context or create a new one. - virtual PerIoContext* PopIoContext(); - virtual int32_t PushIoContext(PerIoContext* pIoContext); - virtual inline int32_t GetSize(uint32_t* inUse = 0) - {return _size.Value();} - virtual int32_t Free(); -private: - // Sample code for use of msfts single linked atomic list can be found here: - // http://msdn.microsoft.com/en-us/library/ms686962(VS.85).aspx - - // Atomic single linked list head. - PSLIST_HEADER _pListHead; - - bool _init; - Atomic32 _size; - Atomic32 _inUse; -}; - -class UdpSocket2WorkerWindows -{ -public: - UdpSocket2WorkerWindows(HANDLE ioCompletionHandle); - virtual ~UdpSocket2WorkerWindows(); - - virtual bool Start(); - virtual bool Stop(); - virtual int32_t Init(); -protected: - static bool Run(void* obj); - bool Process(); -private: - HANDLE _ioCompletionHandle; - rtc::PlatformThread _pThread; - static int32_t _numOfWorkers; - int32_t _workerNumber; - volatile bool _stop; - bool _init; -}; - -class UdpSocket2ManagerWindows : public UdpSocketManager -{ -public: - UdpSocket2ManagerWindows(); - virtual ~UdpSocket2ManagerWindows(); - - virtual bool Init(int32_t id, uint8_t& numOfWorkThreads); - - virtual bool Start(); - virtual bool Stop(); - - virtual inline bool AddSocket(UdpSocketWrapper* s) - {if(s) return AddSocketPrv(reinterpret_cast(s)); - return false;} - virtual bool RemoveSocket(UdpSocketWrapper* s) - {if(s) return RemoveSocketPrv(reinterpret_cast(s)); - return false;} - - PerIoContext* PopIoContext(void); - int32_t PushIoContext(PerIoContext* pIoContext); - -private: - typedef std::list WorkerList; - bool StopWorkerThreads(); - bool StartWorkerThreads(); - bool AddSocketPrv(UdpSocket2Windows* s); - bool RemoveSocketPrv(UdpSocket2Windows* s); - - static uint32_t _numOfActiveManagers; - static bool _wsaInit; - - int32_t _id; - CriticalSectionWrapper* _pCrit; - int32_t _managerNumber; - volatile bool _stopped; - bool _init; - int32_t _numActiveSockets; - WorkerList _workerThreadsList; - EventWrapper* _event; - - HANDLE _ioCompletionHandle; - IoContextPool _ioContextPool; -}; - -} // namespace test -} // namespace webrtc - -#endif // WEBRTC_VOICE_ENGINE_TEST_CHANNEL_TRANSPORT_UDP_SOCKET2_MANAGER_WINDOWS_H_ diff --git a/WebRtc.NET/include/webrtc/voice_engine/test/channel_transport/udp_socket2_win.h b/WebRtc.NET/include/webrtc/voice_engine/test/channel_transport/udp_socket2_win.h deleted file mode 100644 index dd1aed80..00000000 --- a/WebRtc.NET/include/webrtc/voice_engine/test/channel_transport/udp_socket2_win.h +++ /dev/null @@ -1,174 +0,0 @@ -/* - * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_VOICE_ENGINE_TEST_CHANNEL_TRANSPORT_UDP_SOCKET2_WINDOWS_H_ -#define WEBRTC_VOICE_ENGINE_TEST_CHANNEL_TRANSPORT_UDP_SOCKET2_WINDOWS_H_ - -// Disable deprication warning from traffic.h -#pragma warning(disable : 4995) - -// Don't change include order for these header files. -#include -#include -#include - -#include "webrtc/base/event.h" -#include "webrtc/system_wrappers/include/atomic32.h" -#include "webrtc/system_wrappers/include/event_wrapper.h" -#include "webrtc/system_wrappers/include/rw_lock_wrapper.h" -#include "webrtc/system_wrappers/include/trace.h" -#include "webrtc/voice_engine/test/channel_transport/udp_socket2_manager_win.h" -#include "webrtc/voice_engine/test/channel_transport/udp_socket_wrapper.h" - -namespace webrtc { -namespace test { - -class UdpSocket2ManagerWindows; -class TrafficControlWindows; -struct PerIoContext; - -class UdpSocket2Windows : public UdpSocketWrapper -{ -public: - UdpSocket2Windows(const int32_t id, UdpSocketManager* mgr, - bool ipV6Enable = false, bool disableGQOS = false); - virtual ~UdpSocket2Windows(); - - bool ValidHandle() override; - - bool SetCallback(CallbackObj, IncomingSocketCallback) override; - - bool Bind(const SocketAddress& name) override; - bool SetSockopt(int32_t level, - int32_t optname, - const int8_t* optval, - int32_t optlen) override; - - bool StartReceiving(const uint32_t receiveBuffers) override; - inline bool StartReceiving() override { return StartReceiving(8); } - bool StopReceiving() override; - - int32_t SendTo(const int8_t* buf, - size_t len, - const SocketAddress& to) override; - - void CloseBlocking() override; - - SOCKET GetFd() { return _socket;} - - bool SetQos(int32_t serviceType, - int32_t tokenRate, - int32_t bucketSize, - int32_t peekBandwith, - int32_t minPolicedSize, - int32_t maxSduSize, - const SocketAddress& stRemName, - int32_t overrideDSCP = 0) override; - - int32_t SetTOS(const int32_t serviceType) override; - int32_t SetPCP(const int32_t pcp) override; - - uint32_t ReceiveBuffers() override { return _receiveBuffers.Value(); } - -protected: - void IOCompleted(PerIoContext* pIOContext, uint32_t ioSize, uint32_t error); - - int32_t PostRecv(); - // Use pIoContext to post a new WSARecvFrom(..). - int32_t PostRecv(PerIoContext* pIoContext); - -private: - friend class UdpSocket2WorkerWindows; - - // Set traffic control (TC) flow adding it the interface that matches this - // sockets address. - // A filter is created and added to the flow. - // The flow consists of: - // (1) QoS send and receive information (flow specifications). - // (2) A DS object (for specifying exact DSCP value). - // (3) Possibly a traffic object (for specifying exact 802.1p priority (PCP) - // value). - // - // dscp values: - // -1 don't change the current dscp value. - // 0 don't add any flow to TC, unless pcp is specified. - // 1-63 Add a flow to TC with the specified dscp value. - // pcp values: - // -2 Don't add pcp info to the flow, (3) will not be added. - // -1 Don't change the current value. - // 0-7 Add pcp info to the flow with the specified value, - // (3) will be added. - // - // If both dscp and pcp are -1 no flow will be created or added to TC. - // If dscp is 0 and pcp is 0-7 (1), (2) and (3) will be created. - // Note: input parameter values are assumed to be in valid range, checks - // must be done by caller. - int32_t SetTrafficControl(int32_t dscp, int32_t pcp, - const struct sockaddr_in* name, - FLOWSPEC* send = NULL, - FLOWSPEC* recv = NULL); - int32_t CreateFlowSpec(int32_t serviceType, - int32_t tokenRate, - int32_t bucketSize, - int32_t peekBandwith, - int32_t minPolicedSize, - int32_t maxSduSize, FLOWSPEC *f); - - int32_t _id; - RWLockWrapper* _ptrCbRWLock; - IncomingSocketCallback _incomingCb; - CallbackObj _obj; - bool _qos; - - SocketAddress _remoteAddr; - SOCKET _socket; - int32_t _iProtocol; - UdpSocket2ManagerWindows* _mgr; - - Atomic32 _outstandingCalls; - Atomic32 _outstandingCallComplete; - volatile bool _terminate; - volatile bool _addedToMgr; - - rtc::Event delete_event_; - - RWLockWrapper* _ptrDestRWLock; - bool _outstandingCallsDisabled; - bool NewOutstandingCall(); - void OutstandingCallCompleted(); - void DisableNewOutstandingCalls(); - - void RemoveSocketFromManager(); - - // RWLockWrapper is used as a reference counter for the socket. Write lock - // is used for creating and deleting socket. Read lock is used for - // accessing the socket. - RWLockWrapper* _ptrSocketRWLock; - bool AquireSocket(); - void ReleaseSocket(); - bool InvalidateSocket(); - - // Traffic control handles and structure pointers. - HANDLE _clientHandle; - HANDLE _flowHandle; - HANDLE _filterHandle; - PTC_GEN_FLOW _flow; - // TrafficControlWindows implements TOS and PCP. - TrafficControlWindows* _gtc; - // Holds the current pcp value. Can be -2 or 0 - 7. - int _pcp; - - Atomic32 _receiveBuffers; -}; - -} // namespace test -} // namespace webrtc - -#endif // WEBRTC_VOICE_ENGINE_TEST_CHANNEL_TRANSPORT_UDP_SOCKET2_WINDOWS_H_ diff --git a/WebRtc.NET/include/webrtc/voice_engine/test/channel_transport/udp_socket_manager_posix.h b/WebRtc.NET/include/webrtc/voice_engine/test/channel_transport/udp_socket_manager_posix.h deleted file mode 100644 index fe32cf01..00000000 --- a/WebRtc.NET/include/webrtc/voice_engine/test/channel_transport/udp_socket_manager_posix.h +++ /dev/null @@ -1,88 +0,0 @@ -/* - * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_VOICE_ENGINE_TEST_CHANNEL_TRANSPORT_UDP_SOCKET_MANAGER_POSIX_H_ -#define WEBRTC_VOICE_ENGINE_TEST_CHANNEL_TRANSPORT_UDP_SOCKET_MANAGER_POSIX_H_ - -#include -#include - -#include -#include - -#include "webrtc/base/platform_thread.h" -#include "webrtc/system_wrappers/include/critical_section_wrapper.h" -#include "webrtc/voice_engine/test/channel_transport/udp_socket_manager_wrapper.h" -#include "webrtc/voice_engine/test/channel_transport/udp_socket_wrapper.h" - -namespace webrtc { -namespace test { - -class UdpSocketPosix; -class UdpSocketManagerPosixImpl; -#define MAX_NUMBER_OF_SOCKET_MANAGERS_LINUX 8 - -class UdpSocketManagerPosix : public UdpSocketManager -{ -public: - UdpSocketManagerPosix(); - virtual ~UdpSocketManagerPosix(); - - bool Init(int32_t id, uint8_t& numOfWorkThreads) override; - - bool Start() override; - bool Stop() override; - - bool AddSocket(UdpSocketWrapper* s) override; - bool RemoveSocket(UdpSocketWrapper* s) override; - -private: - int32_t _id; - CriticalSectionWrapper* _critSect; - uint8_t _numberOfSocketMgr; - uint8_t _incSocketMgrNextTime; - uint8_t _nextSocketMgrToAssign; - UdpSocketManagerPosixImpl* _socketMgr[MAX_NUMBER_OF_SOCKET_MANAGERS_LINUX]; -}; - -class UdpSocketManagerPosixImpl -{ -public: - UdpSocketManagerPosixImpl(); - virtual ~UdpSocketManagerPosixImpl(); - - virtual bool Start(); - virtual bool Stop(); - - virtual bool AddSocket(UdpSocketWrapper* s); - virtual bool RemoveSocket(UdpSocketWrapper* s); - -protected: - static bool Run(void* obj); - bool Process(); - void UpdateSocketMap(); - -private: - typedef std::list SocketList; - typedef std::list FdList; - rtc::PlatformThread _thread; - CriticalSectionWrapper* _critSectList; - - fd_set _readFds; - - std::map _socketMap; - SocketList _addList; - FdList _removeList; -}; - -} // namespace test -} // namespace webrtc - -#endif // WEBRTC_VOICE_ENGINE_TEST_CHANNEL_TRANSPORT_UDP_SOCKET_MANAGER_POSIX_H_ diff --git a/WebRtc.NET/include/webrtc/voice_engine/test/channel_transport/udp_socket_manager_wrapper.h b/WebRtc.NET/include/webrtc/voice_engine/test/channel_transport/udp_socket_manager_wrapper.h deleted file mode 100644 index 6484a72a..00000000 --- a/WebRtc.NET/include/webrtc/voice_engine/test/channel_transport/udp_socket_manager_wrapper.h +++ /dev/null @@ -1,70 +0,0 @@ -/* - * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_VOICE_ENGINE_TEST_CHANNEL_TRANSPORT_UDP_SOCKET_MANAGER_WRAPPER_H_ -#define WEBRTC_VOICE_ENGINE_TEST_CHANNEL_TRANSPORT_UDP_SOCKET_MANAGER_WRAPPER_H_ - -#include "webrtc/system_wrappers/include/static_instance.h" -#include "webrtc/typedefs.h" - -namespace webrtc { -namespace test { - -class UdpSocketWrapper; - -class UdpSocketManager -{ -public: - static UdpSocketManager* Create(const int32_t id, - uint8_t& numOfWorkThreads); - static void Return(); - - // Initializes the socket manager. Returns true if the manager wasn't - // already initialized. - virtual bool Init(int32_t id, uint8_t& numOfWorkThreads) = 0; - - // Start listening to sockets that have been registered via the - // AddSocket(..) API. - virtual bool Start() = 0; - // Stop listening to sockets. - virtual bool Stop() = 0; - - virtual uint8_t WorkThreads() const; - - // Register a socket with the socket manager. - virtual bool AddSocket(UdpSocketWrapper* s) = 0; - // Unregister a socket from the manager. - virtual bool RemoveSocket(UdpSocketWrapper* s) = 0; - -protected: - UdpSocketManager(); - virtual ~UdpSocketManager() {} - - uint8_t _numOfWorkThreads; - - // Factory method. - static UdpSocketManager* CreateInstance(); - -private: - // Friend function to allow the UDP destructor to be accessed from the - // instance template. - friend UdpSocketManager* webrtc::GetStaticInstance( - CountOperation count_operation); - - static UdpSocketManager* StaticInstance( - CountOperation count_operation, - const int32_t id, - uint8_t& numOfWorkThreads); -}; - -} // namespace test -} // namespace webrtc - -#endif // WEBRTC_VOICE_ENGINE_TEST_CHANNEL_TRANSPORT_UDP_SOCKET_MANAGER_WRAPPER_H_ diff --git a/WebRtc.NET/include/webrtc/voice_engine/test/channel_transport/udp_socket_posix.h b/WebRtc.NET/include/webrtc/voice_engine/test/channel_transport/udp_socket_posix.h deleted file mode 100644 index 98301330..00000000 --- a/WebRtc.NET/include/webrtc/voice_engine/test/channel_transport/udp_socket_posix.h +++ /dev/null @@ -1,94 +0,0 @@ -/* - * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_VOICE_ENGINE_TEST_CHANNEL_TRANSPORT_UDP_SOCKET_POSIX_H_ -#define WEBRTC_VOICE_ENGINE_TEST_CHANNEL_TRANSPORT_UDP_SOCKET_POSIX_H_ - -#include -#include -#include -#include - -#include "webrtc/base/event.h" -#include "webrtc/base/criticalsection.h" -#include "webrtc/voice_engine/test/channel_transport/udp_socket_wrapper.h" - -namespace webrtc { -namespace test { - -#define SOCKET_ERROR -1 - -class UdpSocketPosix : public UdpSocketWrapper -{ -public: - UdpSocketPosix(const int32_t id, UdpSocketManager* mgr, - bool ipV6Enable = false); - - virtual ~UdpSocketPosix(); - - bool SetCallback(CallbackObj obj, IncomingSocketCallback cb) override; - - bool Bind(const SocketAddress& name) override; - - bool SetSockopt(int32_t level, - int32_t optname, - const int8_t* optval, - int32_t optlen) override; - - int32_t SetTOS(const int32_t serviceType) override; - - int32_t SendTo(const int8_t* buf, - size_t len, - const SocketAddress& to) override; - - // Deletes socket in addition to closing it. - // TODO (hellner): make destructor protected. - void CloseBlocking() override; - - SOCKET GetFd(); - - bool ValidHandle() override; - - bool SetQos(int32_t /*serviceType*/, - int32_t /*tokenRate*/, - int32_t /*bucketSize*/, - int32_t /*peekBandwith*/, - int32_t /*minPolicedSize*/, - int32_t /*maxSduSize*/, - const SocketAddress& /*stRemName*/, - int32_t /*overrideDSCP*/) override; - - bool CleanUp(); - void HasIncoming(); - bool WantsIncoming(); - void ReadyForDeletion(); -private: - friend class UdpSocketManagerPosix; - - const int32_t _id; - IncomingSocketCallback _incomingCb; - CallbackObj _obj; - - SOCKET _socket; - UdpSocketManager* _mgr; - rtc::Event _closeBlockingCompletedCond; - rtc::Event _readyForDeletionCond; - - bool _closeBlockingActive; - bool _closeBlockingCompleted; - bool _readyForDeletion; - - rtc::CriticalSection _cs; -}; - -} // namespace test -} // namespace webrtc - -#endif // WEBRTC_VOICE_ENGINE_TEST_CHANNEL_TRANSPORT_UDP_SOCKET_POSIX_H_ diff --git a/WebRtc.NET/include/webrtc/voice_engine/test/channel_transport/udp_socket_wrapper.h b/WebRtc.NET/include/webrtc/voice_engine/test/channel_transport/udp_socket_wrapper.h deleted file mode 100644 index 57f391cb..00000000 --- a/WebRtc.NET/include/webrtc/voice_engine/test/channel_transport/udp_socket_wrapper.h +++ /dev/null @@ -1,112 +0,0 @@ -/* - * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_VOICE_ENGINE_TEST_CHANNEL_TRANSPORT_UDP_SOCKET_WRAPPER_H_ -#define WEBRTC_VOICE_ENGINE_TEST_CHANNEL_TRANSPORT_UDP_SOCKET_WRAPPER_H_ - -#include "webrtc/voice_engine/test/channel_transport/udp_transport.h" - -namespace webrtc { - -class EventWrapper; - -namespace test { - -class UdpSocketManager; - -#define SOCKET_ERROR_NO_QOS -1000 - -#ifndef _WIN32 -typedef int SOCKET; -#endif - -#ifndef INVALID_SOCKET -#define INVALID_SOCKET (SOCKET)(~0) - -#ifndef AF_INET -#define AF_INET 2 -#endif - -#endif - -typedef void* CallbackObj; -typedef void(*IncomingSocketCallback)(CallbackObj obj, const int8_t* buf, - size_t len, const SocketAddress* from); - -class UdpSocketWrapper -{ -public: - static UdpSocketWrapper* CreateSocket(const int32_t id, - UdpSocketManager* mgr, - CallbackObj obj, - IncomingSocketCallback cb, - bool ipV6Enable = false, - bool disableGQOS = false); - - // Register cb for receiving callbacks when there are incoming packets. - // Register obj so that it will be passed in calls to cb. - virtual bool SetCallback(CallbackObj obj, IncomingSocketCallback cb) = 0; - - // Socket to local address specified by name. - virtual bool Bind(const SocketAddress& name) = 0; - - // Start receiving UDP data. - virtual bool StartReceiving(); - virtual bool StartReceiving(const uint32_t /*receiveBuffers*/); - // Stop receiving UDP data. - virtual bool StopReceiving(); - - virtual bool ValidHandle() = 0; - - // Set socket options. - virtual bool SetSockopt(int32_t level, int32_t optname, - const int8_t* optval, int32_t optlen) = 0; - - // Set TOS for outgoing packets. - virtual int32_t SetTOS(const int32_t serviceType) = 0; - - // Set 802.1Q PCP field (802.1p) for outgoing VLAN traffic. - virtual int32_t SetPCP(const int32_t /*pcp*/); - - // Send buf of length len to the address specified by to. - virtual int32_t SendTo(const int8_t* buf, size_t len, - const SocketAddress& to) = 0; - - virtual void SetEventToNull(); - - // Close socket and don't return until completed. - virtual void CloseBlocking() {} - - // tokenRate is in bit/s. peakBandwidt is in byte/s - virtual bool SetQos(int32_t serviceType, int32_t tokenRate, - int32_t bucketSize, int32_t peekBandwith, - int32_t minPolicedSize, int32_t maxSduSize, - const SocketAddress &stRemName, - int32_t overrideDSCP = 0) = 0; - - virtual uint32_t ReceiveBuffers(); - -protected: - // Creating the socket is done via CreateSocket(). - UdpSocketWrapper(); - // Destroying the socket is done via CloseBlocking(). - virtual ~UdpSocketWrapper(); - - bool _wantsIncoming; - EventWrapper* _deleteEvent; - -private: - static bool _initiated; -}; - -} // namespac test -} // namespace webrtc - -#endif // WEBRTC_VOICE_ENGINE_TEST_CHANNEL_TRANSPORT_UDP_SOCKET_WRAPPER_H_ diff --git a/WebRtc.NET/include/webrtc/voice_engine/test/channel_transport/udp_transport.h b/WebRtc.NET/include/webrtc/voice_engine/test/channel_transport/udp_transport.h deleted file mode 100644 index 4b9e67db..00000000 --- a/WebRtc.NET/include/webrtc/voice_engine/test/channel_transport/udp_transport.h +++ /dev/null @@ -1,381 +0,0 @@ -/* - * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_VOICE_ENGINE_TEST_CHANNEL_TRANSPORT_UDP_TRANSPORT_H_ -#define WEBRTC_VOICE_ENGINE_TEST_CHANNEL_TRANSPORT_UDP_TRANSPORT_H_ - -#include "webrtc/api/call/transport.h" -#include "webrtc/common_types.h" -#include "webrtc/typedefs.h" - -/* - * WARNING - * This code is not use in production/testing and might have security issues - * for example: http://code.google.com/p/webrtc/issues/detail?id=1028 - * - */ - -#define SS_MAXSIZE 128 -#define SS_ALIGNSIZE (sizeof (uint64_t)) -#define SS_PAD1SIZE (SS_ALIGNSIZE - sizeof(int16_t)) -#define SS_PAD2SIZE (SS_MAXSIZE - (sizeof(int16_t) + SS_PAD1SIZE +\ - SS_ALIGNSIZE)) - -// BSD requires use of HAVE_STRUCT_SOCKADDR_SA_LEN -namespace webrtc { -namespace test { - -struct SocketAddressIn { - // sin_family should be either AF_INET (IPv4) or AF_INET6 (IPv6) -#ifdef HAVE_STRUCT_SOCKADDR_SA_LEN - int8_t sin_length; - int8_t sin_family; -#else - int16_t sin_family; -#endif - uint16_t sin_port; - uint32_t sin_addr; - int8_t sin_zero[8]; -}; - -struct Version6InAddress { - union { - uint8_t _s6_u8[16]; - uint32_t _s6_u32[4]; - uint64_t _s6_u64[2]; - } Version6AddressUnion; -}; - -struct SocketAddressInVersion6 { - // sin_family should be either AF_INET (IPv4) or AF_INET6 (IPv6) -#ifdef HAVE_STRUCT_SOCKADDR_SA_LEN - int8_t sin_length; - int8_t sin_family; -#else - int16_t sin_family; -#endif - // Transport layer port number. - uint16_t sin6_port; - // IPv6 traffic class and flow info or ip4 address. - uint32_t sin6_flowinfo; - // IPv6 address - struct Version6InAddress sin6_addr; - // Set of interfaces for a scope. - uint32_t sin6_scope_id; -}; - -struct SocketAddressStorage { - // sin_family should be either AF_INET (IPv4) or AF_INET6 (IPv6) -#ifdef HAVE_STRUCT_SOCKADDR_SA_LEN - int8_t sin_length; - int8_t sin_family; -#else - int16_t sin_family; -#endif - int8_t __ss_pad1[SS_PAD1SIZE]; - uint64_t __ss_align; - int8_t __ss_pad2[SS_PAD2SIZE]; -}; - -struct SocketAddress { - union { - struct SocketAddressIn _sockaddr_in; - struct SocketAddressInVersion6 _sockaddr_in6; - struct SocketAddressStorage _sockaddr_storage; - }; -}; - -// Callback class that receives packets from UdpTransport. -class UdpTransportData { - public: - virtual ~UdpTransportData() {}; - - virtual void IncomingRTPPacket(const int8_t* incomingRtpPacket, - const size_t rtpPacketLength, - const char* fromIP, - const uint16_t fromPort) = 0; - - virtual void IncomingRTCPPacket(const int8_t* incomingRtcpPacket, - const size_t rtcpPacketLength, - const char* fromIP, - const uint16_t fromPort) = 0; -}; - -class UdpTransport : public Transport { - public: - enum - { - kIpAddressVersion6Length = 64, - kIpAddressVersion4Length = 16 - }; - enum ErrorCode - { - kNoSocketError = 0, - kFailedToBindPort = 1, - kIpAddressInvalid = 2, - kAddressInvalid = 3, - kSocketInvalid = 4, - kPortInvalid = 5, - kTosInvalid = 6, - kMulticastAddressInvalid = 7, - kQosError = 8, - kSocketAlreadyInitialized = 9, - kIpVersion6Error = 10, - FILTER_ERROR = 11, - kStartReceiveError = 12, - kStopReceiveError = 13, - kCannotFindLocalIp = 14, - kTosError = 16, - kNotInitialized = 17, - kPcpError = 18 - }; - - // Factory method. Constructor disabled. - static UdpTransport* Create(const int32_t id, uint8_t& numSocketThreads); - static void Destroy(UdpTransport* module); - - // Prepares the class for sending RTP packets to ipAddr:rtpPort and RTCP - // packets to ipAddr:rtpPort+1 if rtcpPort is zero. Otherwise to - // ipAddr:rtcpPort. - virtual int32_t InitializeSendSockets(const char* ipAddr, - const uint16_t rtpPort, - const uint16_t rtcpPort = 0) = 0; - - // Register packetCallback for receiving incoming packets. Set the local - // RTP port to rtpPort. Bind local IP address to ipAddr. If ipAddr is NULL - // bind to local IP ANY. Set the local rtcp port to rtcpPort or rtpPort + 1 - // if rtcpPort is 0. - virtual int32_t InitializeReceiveSockets( - UdpTransportData* const packetCallback, - const uint16_t rtpPort, - const char* ipAddr = NULL, - const char* multicastIpAddr = NULL, - const uint16_t rtcpPort = 0) = 0; - - // Set local RTP port to rtpPort and RTCP port to rtcpPort or rtpPort + 1 if - // rtcpPort is 0. These ports will be used for sending instead of the local - // ports set by InitializeReceiveSockets(..). - virtual int32_t InitializeSourcePorts(const uint16_t rtpPort, - const uint16_t rtcpPort = 0) = 0; - - // Retrieve local ports used for sending if other than the ports specified - // by InitializeReceiveSockets(..). rtpPort is set to the RTP port. - // rtcpPort is set to the RTCP port. - virtual int32_t SourcePorts(uint16_t& rtpPort, - uint16_t& rtcpPort) const = 0; - - // Set ipAddr to the IP address that is currently being listened on. rtpPort - // to the RTP port listened to. rtcpPort to the RTCP port listened on. - // multicastIpAddr to the multicast IP address group joined (the address - // is NULL terminated). - virtual int32_t ReceiveSocketInformation( - char ipAddr[kIpAddressVersion6Length], - uint16_t& rtpPort, - uint16_t& rtcpPort, - char multicastIpAddr[kIpAddressVersion6Length]) const = 0; - - // Set ipAddr to the IP address being sent from. rtpPort to the local RTP - // port used for sending and rtcpPort to the local RTCP port used for - // sending. - virtual int32_t SendSocketInformation(char ipAddr[kIpAddressVersion6Length], - uint16_t& rtpPort, - uint16_t& rtcpPort) const = 0; - - // Put the IP address, RTP port and RTCP port from the last received packet - // into ipAddr, rtpPort and rtcpPort respectively. - virtual int32_t RemoteSocketInformation( - char ipAddr[kIpAddressVersion6Length], - uint16_t& rtpPort, - uint16_t& rtcpPort) const = 0; - - // Enable/disable quality of service if QoS is true or false respectively. - // Set the type of service to serviceType, max bitrate in kbit/s to - // maxBitrate and override DSCP if overrideDSCP is not 0. - // Note: Must be called both InitializeSendSockets() and - // InitializeReceiveSockets() has been called. - virtual int32_t SetQoS(const bool QoS, - const int32_t serviceType, - const uint32_t maxBitrate = 0, - const int32_t overrideDSCP = 0, - const bool audio = false) = 0; - - // Set QoS to true if quality of service has been turned on. If QoS is true, - // also set serviceType to type of service and overrideDSCP to override - // DSCP. - virtual int32_t QoS(bool& QoS, - int32_t& serviceType, - int32_t& overrideDSCP) const = 0; - - // Set type of service. - virtual int32_t SetToS(const int32_t DSCP, - const bool useSetSockOpt = false) = 0; - - // Get type of service configuration. - virtual int32_t ToS(int32_t& DSCP, - bool& useSetSockOpt) const = 0; - - // Set Priority Code Point (IEEE 802.1Q) - // Note: for Linux this function will set the priority for the socket, - // which then can be mapped to a PCP value with vconfig. - virtual int32_t SetPCP(const int32_t PCP) = 0; - - // Get Priority Code Point - virtual int32_t PCP(int32_t& PCP) const = 0; - - // Enable IPv6. - // Note: this API must be called before any call to - // InitializeReceiveSockets() or InitializeSendSockets(). It is not - // possible to go back to IPv4 (default) after this call. - virtual int32_t EnableIpV6() = 0; - - // Return true if IPv6 has been enabled. - virtual bool IpV6Enabled() const = 0; - - // Only allow packets received from filterIPAddress to be processed. - // Note: must be called after EnableIPv6(), if IPv6 is used. - virtual int32_t SetFilterIP( - const char filterIPAddress[kIpAddressVersion6Length]) = 0; - - // Write the filter IP address (if any) to filterIPAddress. - virtual int32_t FilterIP( - char filterIPAddress[kIpAddressVersion6Length]) const = 0; - - // Only allow RTP packets from rtpFilterPort and RTCP packets from - // rtcpFilterPort be processed. - // Note: must be called after EnableIPv6(), if IPv6 is used. - virtual int32_t SetFilterPorts(const uint16_t rtpFilterPort, - const uint16_t rtcpFilterPort) = 0; - - // Set rtpFilterPort to the filter RTP port and rtcpFilterPort to the - // filter RTCP port (if filtering based on port is enabled). - virtual int32_t FilterPorts(uint16_t& rtpFilterPort, - uint16_t& rtcpFilterPort) const = 0; - - // Set the number of buffers that the socket implementation may use for - // receiving packets to numberOfSocketBuffers. I.e. the number of packets - // that can be received in parallell. - // Note: this API only has effect on Windows. - virtual int32_t StartReceiving(const uint32_t numberOfSocketBuffers) = 0; - - // Stop receive incoming packets. - virtual int32_t StopReceiving() = 0; - - // Return true incoming packets are received. - virtual bool Receiving() const = 0; - - // Return true if send sockets have been initialized. - virtual bool SendSocketsInitialized() const = 0; - - // Return true if local ports for sending has been set. - virtual bool SourcePortsInitialized() const = 0; - - // Return true if receive sockets have been initialized. - virtual bool ReceiveSocketsInitialized() const = 0; - - // Send data with size length to ip:portnr. The same port as the set - // with InitializeSendSockets(..) is used if portnr is 0. The same IP - // address as set with InitializeSendSockets(..) is used if ip is NULL. - // If isRTCP is true the port used will be the RTCP port. - virtual int32_t SendRaw(const int8_t* data, - size_t length, - int32_t isRTCP, - uint16_t portnr = 0, - const char* ip = NULL) = 0; - - // Send RTP data with size length to the address specified by to. - virtual int32_t SendRTPPacketTo(const int8_t* data, - size_t length, - const SocketAddress& to) = 0; - - - // Send RTCP data with size length to the address specified by to. - virtual int32_t SendRTCPPacketTo(const int8_t* data, - size_t length, - const SocketAddress& to) = 0; - - // Send RTP data with size length to ip:rtpPort where ip is the ip set by - // the InitializeSendSockets(..) call. - virtual int32_t SendRTPPacketTo(const int8_t* data, - size_t length, - uint16_t rtpPort) = 0; - - - // Send RTCP data with size length to ip:rtcpPort where ip is the ip set by - // the InitializeSendSockets(..) call. - virtual int32_t SendRTCPPacketTo(const int8_t* data, - size_t length, - uint16_t rtcpPort) = 0; - - // Set the IP address to which packets are sent to ipaddr. - virtual int32_t SetSendIP( - const char ipaddr[kIpAddressVersion6Length]) = 0; - - // Set the send RTP and RTCP port to rtpPort and rtcpPort respectively. - virtual int32_t SetSendPorts(const uint16_t rtpPort, - const uint16_t rtcpPort = 0) = 0; - - // Retreive the last registered error code. - virtual ErrorCode LastError() const = 0; - - // Put the local IPv4 address in localIP. - // Note: this API is for IPv4 only. - static int32_t LocalHostAddress(uint32_t& localIP); - - // Put the local IP6 address in localIP. - // Note: this API is for IPv6 only. - static int32_t LocalHostAddressIPV6(char localIP[16]); - - // Return a copy of hostOrder (host order) in network order. - static uint16_t Htons(uint16_t hostOrder); - - // Return a copy of hostOrder (host order) in network order. - static uint32_t Htonl(uint32_t hostOrder); - - // Return IPv4 address in ip as 32 bit integer. - static uint32_t InetAddrIPV4(const char* ip); - - // Convert the character string src into a network address structure in - // the af address family and put it in dst. - // Note: same functionality as inet_pton(..) - static int32_t InetPresentationToNumeric(int32_t af, - const char* src, - void* dst); - - // Set ip and sourcePort according to address. As input parameter ipSize - // is the length of ip. As output parameter it's the number of characters - // written to ip (not counting the '\0' character). - // Note: this API is only implemented on Windows and Linux. - static int32_t IPAddress(const SocketAddress& address, - char* ip, - uint32_t& ipSize, - uint16_t& sourcePort); - - // Set ip and sourcePort according to address. As input parameter ipSize - // is the length of ip. As output parameter it's the number of characters - // written to ip (not counting the '\0' character). - // Note: this API is only implemented on Windows and Linux. - // Additional note: this API caches the address of the last call to it. If - // address is likley to be the same for multiple calls it may be beneficial - // to call this API instead of IPAddress(). - virtual int32_t IPAddressCached(const SocketAddress& address, - char* ip, - uint32_t& ipSize, - uint16_t& sourcePort) = 0; - - // Return true if ipaddr is a valid IP address. - // If ipV6 is false ipaddr is interpreted as an IPv4 address otherwise it - // is interptreted as IPv6. - static bool IsIpAddressValid(const char* ipaddr, const bool ipV6); -}; - -} // namespace test -} // namespace webrtc - -#endif // WEBRTC_VOICE_ENGINE_TEST_CHANNEL_TRANSPORT_UDP_TRANSPORT_H_ diff --git a/WebRtc.NET/include/webrtc/voice_engine/test/channel_transport/udp_transport_impl.h b/WebRtc.NET/include/webrtc/voice_engine/test/channel_transport/udp_transport_impl.h deleted file mode 100644 index 236ff53f..00000000 --- a/WebRtc.NET/include/webrtc/voice_engine/test/channel_transport/udp_transport_impl.h +++ /dev/null @@ -1,259 +0,0 @@ -/* - * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_VOICE_ENGINE_TEST_CHANNEL_TRANSPORT_UDP_TRANSPORT_IMPL_H_ -#define WEBRTC_VOICE_ENGINE_TEST_CHANNEL_TRANSPORT_UDP_TRANSPORT_IMPL_H_ - -#include "webrtc/voice_engine/test/channel_transport/udp_socket_wrapper.h" -#include "webrtc/voice_engine/test/channel_transport/udp_transport.h" - -namespace webrtc { - -class CriticalSectionWrapper; -class RWLockWrapper; - -namespace test { - -class UdpSocketManager; - -class UdpTransportImpl : public UdpTransport -{ -public: - // A factory that returns a wrapped UDP socket or equivalent. - class SocketFactoryInterface { - public: - virtual ~SocketFactoryInterface() {} - virtual UdpSocketWrapper* CreateSocket(const int32_t id, - UdpSocketManager* mgr, - CallbackObj obj, - IncomingSocketCallback cb, - bool ipV6Enable, - bool disableGQOS) = 0; - }; - - // Constructor, only called by UdpTransport::Create and tests. - // The constructor takes ownership of the "maker". - // The constructor does not take ownership of socket_manager. - UdpTransportImpl(const int32_t id, - SocketFactoryInterface* maker, - UdpSocketManager* socket_manager); - virtual ~UdpTransportImpl(); - - // UdpTransport functions - int32_t InitializeSendSockets(const char* ipAddr, - const uint16_t rtpPort, - const uint16_t rtcpPort = 0) override; - int32_t InitializeReceiveSockets(UdpTransportData* const packetCallback, - const uint16_t rtpPort, - const char* ipAddr = NULL, - const char* multicastIpAddr = NULL, - const uint16_t rtcpPort = 0) override; - int32_t InitializeSourcePorts(const uint16_t rtpPort, - const uint16_t rtcpPort = 0) override; - int32_t SourcePorts(uint16_t& rtpPort, uint16_t& rtcpPort) const override; - int32_t ReceiveSocketInformation( - char ipAddr[kIpAddressVersion6Length], - uint16_t& rtpPort, - uint16_t& rtcpPort, - char multicastIpAddr[kIpAddressVersion6Length]) const override; - int32_t SendSocketInformation(char ipAddr[kIpAddressVersion6Length], - uint16_t& rtpPort, - uint16_t& rtcpPort) const override; - int32_t RemoteSocketInformation(char ipAddr[kIpAddressVersion6Length], - uint16_t& rtpPort, - uint16_t& rtcpPort) const override; - int32_t SetQoS(const bool QoS, - const int32_t serviceType, - const uint32_t maxBitrate = 0, - const int32_t overrideDSCP = 0, - const bool audio = false) override; - int32_t QoS(bool& QoS, - int32_t& serviceType, - int32_t& overrideDSCP) const override; - int32_t SetToS(const int32_t DSCP, - const bool useSetSockOpt = false) override; - int32_t ToS(int32_t& DSCP, bool& useSetSockOpt) const override; - int32_t SetPCP(const int32_t PCP) override; - int32_t PCP(int32_t& PCP) const override; - int32_t EnableIpV6() override; - bool IpV6Enabled() const override; - int32_t SetFilterIP( - const char filterIPAddress[kIpAddressVersion6Length]) override; - int32_t FilterIP( - char filterIPAddress[kIpAddressVersion6Length]) const override; - int32_t SetFilterPorts(const uint16_t rtpFilterPort, - const uint16_t rtcpFilterPort) override; - int32_t FilterPorts(uint16_t& rtpFilterPort, - uint16_t& rtcpFilterPort) const override; - int32_t StartReceiving(const uint32_t numberOfSocketBuffers) override; - int32_t StopReceiving() override; - bool Receiving() const override; - bool SendSocketsInitialized() const override; - bool SourcePortsInitialized() const override; - bool ReceiveSocketsInitialized() const override; - int32_t SendRaw(const int8_t* data, - size_t length, - int32_t isRTCP, - uint16_t portnr = 0, - const char* ip = NULL) override; - int32_t SendRTPPacketTo(const int8_t* data, - size_t length, - const SocketAddress& to) override; - int32_t SendRTCPPacketTo(const int8_t* data, - size_t length, - const SocketAddress& to) override; - int32_t SendRTPPacketTo(const int8_t* data, - size_t length, - uint16_t rtpPort) override; - int32_t SendRTCPPacketTo(const int8_t* data, - size_t length, - uint16_t rtcpPort) override; - // Transport functions - bool SendRtp(const uint8_t* data, - size_t length, - const PacketOptions& packet_options) override; - bool SendRtcp(const uint8_t* data, size_t length) override; - - // UdpTransport functions continue. - int32_t SetSendIP(const char* ipaddr) override; - int32_t SetSendPorts(const uint16_t rtpPort, - const uint16_t rtcpPort = 0) override; - - ErrorCode LastError() const override; - - int32_t IPAddressCached(const SocketAddress& address, - char* ip, - uint32_t& ipSize, - uint16_t& sourcePort) override; - - int32_t Id() const {return _id;} -protected: - // IncomingSocketCallback signature functions for receiving callbacks from - // UdpSocketWrapper. - static void IncomingRTPCallback(CallbackObj obj, - const int8_t* rtpPacket, - size_t rtpPacketLength, - const SocketAddress* from); - static void IncomingRTCPCallback(CallbackObj obj, - const int8_t* rtcpPacket, - size_t rtcpPacketLength, - const SocketAddress* from); - - void CloseSendSockets(); - void CloseReceiveSockets(); - - // Update _remoteRTPAddr according to _destPort and _destIP - void BuildRemoteRTPAddr(); - // Update _remoteRTCPAddr according to _destPortRTCP and _destIP - void BuildRemoteRTCPAddr(); - - void BuildSockaddrIn(uint16_t portnr, const char* ip, - SocketAddress& remoteAddr) const; - - ErrorCode BindLocalRTPSocket(); - ErrorCode BindLocalRTCPSocket(); - - ErrorCode BindRTPSendSocket(); - ErrorCode BindRTCPSendSocket(); - - void IncomingRTPFunction(const int8_t* rtpPacket, - size_t rtpPacketLength, - const SocketAddress* from); - void IncomingRTCPFunction(const int8_t* rtcpPacket, - size_t rtcpPacketLength, - const SocketAddress* from); - - bool FilterIPAddress(const SocketAddress* fromAddress); - - bool SetSockOptUsed(); - - int32_t EnableQoS(int32_t serviceType, bool audio, - uint32_t maxBitrate, int32_t overrideDSCP); - - int32_t DisableQoS(); - -private: - void GetCachedAddress(char* ip, uint32_t& ipSize, - uint16_t& sourcePort); - - int32_t _id; - SocketFactoryInterface* _socket_creator; - // Protects the sockets from being re-configured while receiving packets. - CriticalSectionWrapper* _crit; - CriticalSectionWrapper* _critFilter; - // _packetCallback's critical section. - CriticalSectionWrapper* _critPacketCallback; - UdpSocketManager* _mgr; - ErrorCode _lastError; - - // Remote RTP and RTCP ports. - uint16_t _destPort; - uint16_t _destPortRTCP; - - // Local RTP and RTCP ports. - uint16_t _localPort; - uint16_t _localPortRTCP; - - // Local port number when the local port for receiving and local port number - // for sending are not the same. - uint16_t _srcPort; - uint16_t _srcPortRTCP; - - // Remote port from which last received packet was sent. - uint16_t _fromPort; - uint16_t _fromPortRTCP; - - char _fromIP[kIpAddressVersion6Length]; - char _destIP[kIpAddressVersion6Length]; - char _localIP[kIpAddressVersion6Length]; - char _localMulticastIP[kIpAddressVersion6Length]; - - UdpSocketWrapper* _ptrRtpSocket; - UdpSocketWrapper* _ptrRtcpSocket; - - // Local port when the local port for receiving and local port for sending - // are not the same. - UdpSocketWrapper* _ptrSendRtpSocket; - UdpSocketWrapper* _ptrSendRtcpSocket; - - SocketAddress _remoteRTPAddr; - SocketAddress _remoteRTCPAddr; - - SocketAddress _localRTPAddr; - SocketAddress _localRTCPAddr; - - int32_t _tos; - bool _receiving; - bool _useSetSockOpt; - bool _qos; - int32_t _pcp; - bool _ipV6Enabled; - int32_t _serviceType; - int32_t _overrideDSCP; - uint32_t _maxBitrate; - - // Cache used by GetCachedAddress(..). - RWLockWrapper* _cachLock; - SocketAddress _previousAddress; - char _previousIP[kIpAddressVersion6Length]; - uint32_t _previousIPSize; - uint16_t _previousSourcePort; - - SocketAddress _filterIPAddress; - uint16_t _rtpFilterPort; - uint16_t _rtcpFilterPort; - - UdpTransportData* _packetCallback; -}; - -} // namespace test -} // namespace webrtc - -#endif // WEBRTC_VOICE_ENGINE_TEST_CHANNEL_TRANSPORT_UDP_TRANSPORT_IMPL_H_ diff --git a/WebRtc.NET/include/webrtc/voice_engine/transmit_mixer.h b/WebRtc.NET/include/webrtc/voice_engine/transmit_mixer.h deleted file mode 100644 index 13ddaa54..00000000 --- a/WebRtc.NET/include/webrtc/voice_engine/transmit_mixer.h +++ /dev/null @@ -1,242 +0,0 @@ -/* - * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_VOICE_ENGINE_TRANSMIT_MIXER_H -#define WEBRTC_VOICE_ENGINE_TRANSMIT_MIXER_H - -#include - -#include "webrtc/base/criticalsection.h" -#include "webrtc/common_audio/resampler/include/push_resampler.h" -#include "webrtc/common_types.h" -#include "webrtc/modules/audio_processing/typing_detection.h" -#include "webrtc/modules/include/module_common_types.h" -#include "webrtc/voice_engine/file_player.h" -#include "webrtc/voice_engine/file_recorder.h" -#include "webrtc/voice_engine/include/voe_base.h" -#include "webrtc/voice_engine/level_indicator.h" -#include "webrtc/voice_engine/monitor_module.h" -#include "webrtc/voice_engine/voice_engine_defines.h" - -#if !defined(WEBRTC_ANDROID) && !defined(WEBRTC_IOS) -#define WEBRTC_VOICE_ENGINE_TYPING_DETECTION 1 -#else -#define WEBRTC_VOICE_ENGINE_TYPING_DETECTION 0 -#endif - -namespace webrtc { - -class AudioProcessing; -class ProcessThread; -class VoEExternalMedia; -class VoEMediaProcess; - -namespace voe { - -class ChannelManager; -class MixedAudio; -class Statistics; - -class TransmitMixer : public MonitorObserver, - public FileCallback { -public: - static int32_t Create(TransmitMixer*& mixer, uint32_t instanceId); - - static void Destroy(TransmitMixer*& mixer); - - int32_t SetEngineInformation(ProcessThread& processThread, - Statistics& engineStatistics, - ChannelManager& channelManager); - - int32_t SetAudioProcessingModule( - AudioProcessing* audioProcessingModule); - - int32_t PrepareDemux(const void* audioSamples, - size_t nSamples, - size_t nChannels, - uint32_t samplesPerSec, - uint16_t totalDelayMS, - int32_t clockDrift, - uint16_t currentMicLevel, - bool keyPressed); - - - int32_t DemuxAndMix(); - // Used by the Chrome to pass the recording data to the specific VoE - // channels for demux. - void DemuxAndMix(const int voe_channels[], size_t number_of_voe_channels); - - int32_t EncodeAndSend(); - // Used by the Chrome to pass the recording data to the specific VoE - // channels for encoding and sending to the network. - void EncodeAndSend(const int voe_channels[], size_t number_of_voe_channels); - - // Must be called on the same thread as PrepareDemux(). - uint32_t CaptureLevel() const; - - int32_t StopSend(); - - // VoEExternalMedia - int RegisterExternalMediaProcessing(VoEMediaProcess* object, - ProcessingTypes type); - int DeRegisterExternalMediaProcessing(ProcessingTypes type); - - int GetMixingFrequency(); - - // VoEVolumeControl - int SetMute(bool enable); - - bool Mute() const; - - int8_t AudioLevel() const; - - int16_t AudioLevelFullRange() const; - - bool IsRecordingCall(); - - bool IsRecordingMic(); - - int StartPlayingFileAsMicrophone(const char* fileName, - bool loop, - FileFormats format, - int startPosition, - float volumeScaling, - int stopPosition, - const CodecInst* codecInst); - - int StartPlayingFileAsMicrophone(InStream* stream, - FileFormats format, - int startPosition, - float volumeScaling, - int stopPosition, - const CodecInst* codecInst); - - int StopPlayingFileAsMicrophone(); - - int IsPlayingFileAsMicrophone() const; - - int StartRecordingMicrophone(const char* fileName, - const CodecInst* codecInst); - - int StartRecordingMicrophone(OutStream* stream, - const CodecInst* codecInst); - - int StopRecordingMicrophone(); - - int StartRecordingCall(const char* fileName, const CodecInst* codecInst); - - int StartRecordingCall(OutStream* stream, const CodecInst* codecInst); - - int StopRecordingCall(); - - void SetMixWithMicStatus(bool mix); - - int32_t RegisterVoiceEngineObserver(VoiceEngineObserver& observer); - - virtual ~TransmitMixer(); - - // MonitorObserver - void OnPeriodicProcess(); - - - // FileCallback - void PlayNotification(int32_t id, - uint32_t durationMs); - - void RecordNotification(int32_t id, - uint32_t durationMs); - - void PlayFileEnded(int32_t id); - - void RecordFileEnded(int32_t id); - -#if WEBRTC_VOICE_ENGINE_TYPING_DETECTION - // Typing detection - int TimeSinceLastTyping(int &seconds); - int SetTypingDetectionParameters(int timeWindow, - int costPerTyping, - int reportingThreshold, - int penaltyDecay, - int typeEventDelay); -#endif - - void EnableStereoChannelSwapping(bool enable); - bool IsStereoChannelSwappingEnabled(); - -private: - TransmitMixer(uint32_t instanceId); - - // Gets the maximum sample rate and number of channels over all currently - // sending codecs. - void GetSendCodecInfo(int* max_sample_rate, size_t* max_channels); - - void GenerateAudioFrame(const int16_t audioSamples[], - size_t nSamples, - size_t nChannels, - int samplesPerSec); - int32_t RecordAudioToFile(uint32_t mixingFrequency); - - int32_t MixOrReplaceAudioWithFile( - int mixingFrequency); - - void ProcessAudio(int delay_ms, int clock_drift, int current_mic_level, - bool key_pressed); - -#if WEBRTC_VOICE_ENGINE_TYPING_DETECTION - void TypingDetection(bool keyPressed); -#endif - - // uses - Statistics* _engineStatisticsPtr; - ChannelManager* _channelManagerPtr; - AudioProcessing* audioproc_; - VoiceEngineObserver* _voiceEngineObserverPtr; - ProcessThread* _processThreadPtr; - - // owns - MonitorModule _monitorModule; - AudioFrame _audioFrame; - PushResampler resampler_; // ADM sample rate -> mixing rate - std::unique_ptr file_player_; - std::unique_ptr file_recorder_; - std::unique_ptr file_call_recorder_; - int _filePlayerId; - int _fileRecorderId; - int _fileCallRecorderId; - bool _filePlaying; - bool _fileRecording; - bool _fileCallRecording; - voe::AudioLevel _audioLevel; - // protect file instances and their variables in MixedParticipants() - rtc::CriticalSection _critSect; - rtc::CriticalSection _callbackCritSect; - -#if WEBRTC_VOICE_ENGINE_TYPING_DETECTION - webrtc::TypingDetection _typingDetection; - bool _typingNoiseWarningPending; - bool _typingNoiseDetected; -#endif - bool _saturationWarning; - - int _instanceId; - bool _mixFileWithMicrophone; - uint32_t _captureLevel; - VoEMediaProcess* external_postproc_ptr_; - VoEMediaProcess* external_preproc_ptr_; - bool _mute; - bool stereo_codec_; - bool swap_stereo_channels_; -}; - -} // namespace voe - -} // namespace webrtc - -#endif // WEBRTC_VOICE_ENGINE_TRANSMIT_MIXER_H diff --git a/WebRtc.NET/include/webrtc/voice_engine/utility.h b/WebRtc.NET/include/webrtc/voice_engine/utility.h deleted file mode 100644 index 4139f05c..00000000 --- a/WebRtc.NET/include/webrtc/voice_engine/utility.h +++ /dev/null @@ -1,57 +0,0 @@ -/* - * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -/* - * Contains functions often used by different parts of VoiceEngine. - */ - -#ifndef WEBRTC_VOICE_ENGINE_UTILITY_H_ -#define WEBRTC_VOICE_ENGINE_UTILITY_H_ - -#include "webrtc/common_audio/resampler/include/push_resampler.h" -#include "webrtc/typedefs.h" - -namespace webrtc { - -class AudioFrame; - -namespace voe { - -// Upmix or downmix and resample the audio to |dst_frame|. Expects |dst_frame| -// to have its sample rate and channels members set to the desired values. -// Updates the |samples_per_channel_| member accordingly. -// -// This version has an AudioFrame |src_frame| as input and sets the output -// |timestamp_|, |elapsed_time_ms_| and |ntp_time_ms_| members equals to the -// input ones. -void RemixAndResample(const AudioFrame& src_frame, - PushResampler* resampler, - AudioFrame* dst_frame); - -// This version has a pointer to the samples |src_data| as input and receives -// |samples_per_channel|, |num_channels| and |sample_rate_hz| of the data as -// parameters. -void RemixAndResample(const int16_t* src_data, - size_t samples_per_channel, - size_t num_channels, - int sample_rate_hz, - PushResampler* resampler, - AudioFrame* dst_frame); - -void MixWithSat(int16_t target[], - size_t target_channel, - const int16_t source[], - size_t source_channel, - size_t source_len); - -} // namespace voe -} // namespace webrtc - -#endif // WEBRTC_VOICE_ENGINE_UTILITY_H_ diff --git a/WebRtc.NET/include/webrtc/voice_engine/voe_audio_processing_impl.h b/WebRtc.NET/include/webrtc/voice_engine/voe_audio_processing_impl.h deleted file mode 100644 index 9ffc4d12..00000000 --- a/WebRtc.NET/include/webrtc/voice_engine/voe_audio_processing_impl.h +++ /dev/null @@ -1,94 +0,0 @@ -/* - * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_VOICE_ENGINE_VOE_AUDIO_PROCESSING_IMPL_H -#define WEBRTC_VOICE_ENGINE_VOE_AUDIO_PROCESSING_IMPL_H - -#include "webrtc/voice_engine/include/voe_audio_processing.h" - -#include "webrtc/voice_engine/shared_data.h" - -namespace webrtc { - -class VoEAudioProcessingImpl : public VoEAudioProcessing { - public: - int SetNsStatus(bool enable, NsModes mode = kNsUnchanged) override; - - int GetNsStatus(bool& enabled, NsModes& mode) override; - - int SetAgcStatus(bool enable, AgcModes mode = kAgcUnchanged) override; - - int GetAgcStatus(bool& enabled, AgcModes& mode) override; - - int SetAgcConfig(AgcConfig config) override; - - int GetAgcConfig(AgcConfig& config) override; - - int SetEcStatus(bool enable, EcModes mode = kEcUnchanged) override; - int GetEcStatus(bool& enabled, EcModes& mode) override; - int EnableDriftCompensation(bool enable) override; - bool DriftCompensationEnabled() override; - - void SetDelayOffsetMs(int offset) override; - int DelayOffsetMs() override; - - int SetAecmMode(AecmModes mode = kAecmSpeakerphone, - bool enableCNG = true) override; - - int GetAecmMode(AecmModes& mode, bool& enabledCNG) override; - - int EnableHighPassFilter(bool enable) override; - bool IsHighPassFilterEnabled() override; - - int VoiceActivityIndicator(int channel) override; - - int SetEcMetricsStatus(bool enable) override; - - int GetEcMetricsStatus(bool& enabled) override; - - int GetEchoMetrics(int& ERL, int& ERLE, int& RERL, int& A_NLP) override; - - int GetEcDelayMetrics(int& delay_median, - int& delay_std, - float& fraction_poor_delays) override; - - int StartDebugRecording(const char* fileNameUTF8) override; - int StartDebugRecording(FILE* file_handle) override; - - int StopDebugRecording() override; - - int SetTypingDetectionStatus(bool enable) override; - - int GetTypingDetectionStatus(bool& enabled) override; - - int TimeSinceLastTyping(int& seconds) override; - - // TODO(niklase) Remove default argument as soon as libJingle is updated! - int SetTypingDetectionParameters(int timeWindow, - int costPerTyping, - int reportingThreshold, - int penaltyDecay, - int typeEventDelay = 0) override; - - void EnableStereoChannelSwapping(bool enable) override; - bool IsStereoChannelSwappingEnabled() override; - - protected: - VoEAudioProcessingImpl(voe::SharedData* shared); - ~VoEAudioProcessingImpl() override; - - private: - bool _isAecMode; - voe::SharedData* _shared; -}; - -} // namespace webrtc - -#endif // WEBRTC_VOICE_ENGINE_VOE_AUDIO_PROCESSING_IMPL_H diff --git a/WebRtc.NET/include/webrtc/voice_engine/voe_base_impl.h b/WebRtc.NET/include/webrtc/voice_engine/voe_base_impl.h deleted file mode 100644 index a9f06e41..00000000 --- a/WebRtc.NET/include/webrtc/voice_engine/voe_base_impl.h +++ /dev/null @@ -1,139 +0,0 @@ -/* - * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_VOICE_ENGINE_VOE_BASE_IMPL_H -#define WEBRTC_VOICE_ENGINE_VOE_BASE_IMPL_H - -#include "webrtc/voice_engine/include/voe_base.h" - -#include "webrtc/base/criticalsection.h" -#include "webrtc/modules/include/module_common_types.h" -#include "webrtc/voice_engine/shared_data.h" - -namespace webrtc { - -class ProcessThread; - -class VoEBaseImpl : public VoEBase, - public AudioTransport, - public AudioDeviceObserver { - public: - int RegisterVoiceEngineObserver(VoiceEngineObserver& observer) override; - int DeRegisterVoiceEngineObserver() override; - - int Init(AudioDeviceModule* external_adm = nullptr, - AudioProcessing* audioproc = nullptr, - const rtc::scoped_refptr& decoder_factory = - nullptr) override; - AudioProcessing* audio_processing() override { - return shared_->audio_processing(); - } - AudioDeviceModule* audio_device_module() override { - return shared_->audio_device(); - } - int Terminate() override; - - int CreateChannel() override; - int CreateChannel(const ChannelConfig& config) override; - int DeleteChannel(int channel) override; - - int StartReceive(int channel) override; - int StartPlayout(int channel) override; - int StartSend(int channel) override; - int StopPlayout(int channel) override; - int StopSend(int channel) override; - - int GetVersion(char version[1024]) override; - - int LastError() override; - - AudioTransport* audio_transport() override { return this; } - - int AssociateSendChannel(int channel, int accociate_send_channel) override; - - // AudioTransport - int32_t RecordedDataIsAvailable(const void* audioSamples, - const size_t nSamples, - const size_t nBytesPerSample, - const size_t nChannels, - const uint32_t samplesPerSec, - const uint32_t totalDelayMS, - const int32_t clockDrift, - const uint32_t currentMicLevel, - const bool keyPressed, - uint32_t& newMicLevel) override; - int32_t NeedMorePlayData(const size_t nSamples, - const size_t nBytesPerSample, - const size_t nChannels, - const uint32_t samplesPerSec, - void* audioSamples, - size_t& nSamplesOut, - int64_t* elapsed_time_ms, - int64_t* ntp_time_ms) override; - void PushCaptureData(int voe_channel, - const void* audio_data, - int bits_per_sample, - int sample_rate, - size_t number_of_channels, - size_t number_of_frames) override; - void PullRenderData(int bits_per_sample, - int sample_rate, - size_t number_of_channels, - size_t number_of_frames, - void* audio_data, - int64_t* elapsed_time_ms, - int64_t* ntp_time_ms) override; - - // AudioDeviceObserver - void OnErrorIsReported(const ErrorCode error) override; - void OnWarningIsReported(const WarningCode warning) override; - - protected: - VoEBaseImpl(voe::SharedData* shared); - ~VoEBaseImpl() override; - - private: - int32_t StartPlayout(); - int32_t StopPlayout(); - int32_t StartSend(); - int32_t StopSend(); - int32_t TerminateInternal(); - - // Helper function to process the recorded data with AudioProcessing Module, - // demultiplex the data to specific voe channels, encode and send to the - // network. When |number_of_VoE_channels| is 0, it will demultiplex the - // data to all the existing VoE channels. - // It returns new AGC microphone volume or 0 if no volume changes - // should be done. - int ProcessRecordedDataWithAPM( - const int voe_channels[], size_t number_of_voe_channels, - const void* audio_data, uint32_t sample_rate, size_t number_of_channels, - size_t number_of_frames, uint32_t audio_delay_milliseconds, - int32_t clock_drift, uint32_t volume, bool key_pressed); - - void GetPlayoutData(int sample_rate, size_t number_of_channels, - size_t number_of_frames, bool feed_data_to_apm, - void* audio_data, int64_t* elapsed_time_ms, - int64_t* ntp_time_ms); - - // Initialize channel by setting Engine Information then initializing - // channel. - int InitializeChannel(voe::ChannelOwner* channel_owner); - VoiceEngineObserver* voiceEngineObserverPtr_; - rtc::CriticalSection callbackCritSect_; - rtc::scoped_refptr decoder_factory_; - - AudioFrame audioFrame_; - voe::SharedData* shared_; -}; - -} // namespace webrtc - -#endif // WEBRTC_VOICE_ENGINE_VOE_BASE_IMPL_H diff --git a/WebRtc.NET/include/webrtc/voice_engine/voe_codec_impl.h b/WebRtc.NET/include/webrtc/voice_engine/voe_codec_impl.h deleted file mode 100644 index d24bbac2..00000000 --- a/WebRtc.NET/include/webrtc/voice_engine/voe_codec_impl.h +++ /dev/null @@ -1,73 +0,0 @@ -/* - * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_VOICE_ENGINE_VOE_CODEC_IMPL_H -#define WEBRTC_VOICE_ENGINE_VOE_CODEC_IMPL_H - -#include "webrtc/voice_engine/include/voe_codec.h" - -#include "webrtc/voice_engine/shared_data.h" - -namespace webrtc { - -class VoECodecImpl : public VoECodec { - public: - int NumOfCodecs() override; - - int GetCodec(int index, CodecInst& codec) override; - - int SetSendCodec(int channel, const CodecInst& codec) override; - - int GetSendCodec(int channel, CodecInst& codec) override; - - int SetBitRate(int channel, int bitrate_bps) override; - - int GetRecCodec(int channel, CodecInst& codec) override; - - int SetSendCNPayloadType( - int channel, - int type, - PayloadFrequencies frequency = kFreq16000Hz) override; - - int SetRecPayloadType(int channel, const CodecInst& codec) override; - - int GetRecPayloadType(int channel, CodecInst& codec) override; - - int SetFECStatus(int channel, bool enable) override; - - int GetFECStatus(int channel, bool& enabled) override; - - int SetVADStatus(int channel, - bool enable, - VadModes mode = kVadConventional, - bool disableDTX = false) override; - - int GetVADStatus(int channel, - bool& enabled, - VadModes& mode, - bool& disabledDTX) override; - - int SetOpusMaxPlaybackRate(int channel, int frequency_hz) override; - - int SetOpusDtx(int channel, bool enable_dtx) override; - - int GetOpusDtxStatus(int channel, bool* enabled) override; - - protected: - VoECodecImpl(voe::SharedData* shared); - ~VoECodecImpl() override; - - private: - voe::SharedData* _shared; -}; - -} // namespace webrtc - -#endif // WEBRTC_VOICE_ENGINE_VOE_CODEC_IMPL_H diff --git a/WebRtc.NET/include/webrtc/voice_engine/voe_external_media_impl.h b/WebRtc.NET/include/webrtc/voice_engine/voe_external_media_impl.h deleted file mode 100644 index 22e963b7..00000000 --- a/WebRtc.NET/include/webrtc/voice_engine/voe_external_media_impl.h +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_VOICE_ENGINE_VOE_EXTERNAL_MEDIA_IMPL_H -#define WEBRTC_VOICE_ENGINE_VOE_EXTERNAL_MEDIA_IMPL_H - -#include "webrtc/voice_engine/include/voe_external_media.h" - -#include "webrtc/voice_engine/shared_data.h" - -namespace webrtc { - -class VoEExternalMediaImpl : public VoEExternalMedia { - public: - int RegisterExternalMediaProcessing(int channel, - ProcessingTypes type, - VoEMediaProcess& processObject) override; - - int DeRegisterExternalMediaProcessing(int channel, - ProcessingTypes type) override; - - int GetAudioFrame(int channel, - int desired_sample_rate_hz, - AudioFrame* frame) override; - - int SetExternalMixing(int channel, bool enable) override; - - protected: - VoEExternalMediaImpl(voe::SharedData* shared); - ~VoEExternalMediaImpl() override; - - private: - voe::SharedData* shared_; -}; - -} // namespace webrtc - -#endif // WEBRTC_VOICE_ENGINE_VOE_EXTERNAL_MEDIA_IMPL_H diff --git a/WebRtc.NET/include/webrtc/voice_engine/voe_file_impl.h b/WebRtc.NET/include/webrtc/voice_engine/voe_file_impl.h deleted file mode 100644 index 5d28947e..00000000 --- a/WebRtc.NET/include/webrtc/voice_engine/voe_file_impl.h +++ /dev/null @@ -1,95 +0,0 @@ -/* - * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_VOICE_ENGINE_VOE_FILE_IMPL_H -#define WEBRTC_VOICE_ENGINE_VOE_FILE_IMPL_H - -#include "webrtc/voice_engine/include/voe_file.h" -#include "webrtc/voice_engine/shared_data.h" - -namespace webrtc { - -class VoEFileImpl : public VoEFile { - public: - // Playout file locally - - int StartPlayingFileLocally(int channel, - const char fileNameUTF8[1024], - bool loop = false, - FileFormats format = kFileFormatPcm16kHzFile, - float volumeScaling = 1.0, - int startPointMs = 0, - int stopPointMs = 0) override; - - int StartPlayingFileLocally(int channel, - InStream* stream, - FileFormats format = kFileFormatPcm16kHzFile, - float volumeScaling = 1.0, - int startPointMs = 0, - int stopPointMs = 0) override; - - int StopPlayingFileLocally(int channel) override; - - int IsPlayingFileLocally(int channel) override; - - // Use file as microphone input - - int StartPlayingFileAsMicrophone(int channel, - const char fileNameUTF8[1024], - bool loop = false, - bool mixWithMicrophone = false, - FileFormats format = kFileFormatPcm16kHzFile, - float volumeScaling = 1.0) override; - - int StartPlayingFileAsMicrophone(int channel, - InStream* stream, - bool mixWithMicrophone = false, - FileFormats format = kFileFormatPcm16kHzFile, - float volumeScaling = 1.0) override; - - int StopPlayingFileAsMicrophone(int channel) override; - - int IsPlayingFileAsMicrophone(int channel) override; - - // Record speaker signal to file - - int StartRecordingPlayout(int channel, - const char* fileNameUTF8, - CodecInst* compression = NULL, - int maxSizeBytes = -1) override; - - int StartRecordingPlayout(int channel, - OutStream* stream, - CodecInst* compression = NULL) override; - - int StopRecordingPlayout(int channel) override; - - // Record microphone signal to file - - int StartRecordingMicrophone(const char* fileNameUTF8, - CodecInst* compression = NULL, - int maxSizeBytes = -1) override; - - int StartRecordingMicrophone(OutStream* stream, - CodecInst* compression = NULL) override; - - int StopRecordingMicrophone() override; - - protected: - VoEFileImpl(voe::SharedData* shared); - ~VoEFileImpl() override; - - private: - voe::SharedData* _shared; -}; - -} // namespace webrtc - -#endif // WEBRTC_VOICE_ENGINE_VOE_FILE_IMPL_H diff --git a/WebRtc.NET/include/webrtc/voice_engine/voe_hardware_impl.h b/WebRtc.NET/include/webrtc/voice_engine/voe_hardware_impl.h deleted file mode 100644 index 1ec1c903..00000000 --- a/WebRtc.NET/include/webrtc/voice_engine/voe_hardware_impl.h +++ /dev/null @@ -1,65 +0,0 @@ -/* - * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_VOICE_ENGINE_VOE_HARDWARE_IMPL_H -#define WEBRTC_VOICE_ENGINE_VOE_HARDWARE_IMPL_H - -#include "webrtc/voice_engine/include/voe_hardware.h" - -#include "webrtc/voice_engine/shared_data.h" - -namespace webrtc { - -class VoEHardwareImpl : public VoEHardware { - public: - int GetNumOfRecordingDevices(int& devices) override; - - int GetNumOfPlayoutDevices(int& devices) override; - - int GetRecordingDeviceName(int index, - char strNameUTF8[128], - char strGuidUTF8[128]) override; - - int GetPlayoutDeviceName(int index, - char strNameUTF8[128], - char strGuidUTF8[128]) override; - - int SetRecordingDevice(int index, - StereoChannel recordingChannel = kStereoBoth) override; - - int SetPlayoutDevice(int index) override; - - int SetAudioDeviceLayer(AudioLayers audioLayer) override; - - int GetAudioDeviceLayer(AudioLayers& audioLayer) override; - - int SetRecordingSampleRate(unsigned int samples_per_sec) override; - int RecordingSampleRate(unsigned int* samples_per_sec) const override; - int SetPlayoutSampleRate(unsigned int samples_per_sec) override; - int PlayoutSampleRate(unsigned int* samples_per_sec) const override; - - bool BuiltInAECIsAvailable() const override; - int EnableBuiltInAEC(bool enable) override; - bool BuiltInAGCIsAvailable() const override; - int EnableBuiltInAGC(bool enable) override; - bool BuiltInNSIsAvailable() const override; - int EnableBuiltInNS(bool enable) override; - - protected: - VoEHardwareImpl(voe::SharedData* shared); - ~VoEHardwareImpl() override; - - private: - voe::SharedData* _shared; -}; - -} // namespace webrtc - -#endif // WEBRTC_VOICE_ENGINE_VOE_HARDWARE_IMPL_H diff --git a/WebRtc.NET/include/webrtc/voice_engine/voe_neteq_stats_impl.h b/WebRtc.NET/include/webrtc/voice_engine/voe_neteq_stats_impl.h deleted file mode 100644 index d441e826..00000000 --- a/WebRtc.NET/include/webrtc/voice_engine/voe_neteq_stats_impl.h +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_VOICE_ENGINE_VOE_NETEQ_STATS_IMPL_H -#define WEBRTC_VOICE_ENGINE_VOE_NETEQ_STATS_IMPL_H - -#include "webrtc/voice_engine/include/voe_neteq_stats.h" - -#include "webrtc/common_types.h" -#include "webrtc/voice_engine/shared_data.h" - -namespace webrtc { - -class VoENetEqStatsImpl : public VoENetEqStats { - public: - int GetNetworkStatistics(int channel, NetworkStatistics& stats) override; - - int GetDecodingCallStatistics(int channel, - AudioDecodingCallStats* stats) const override; - - protected: - VoENetEqStatsImpl(voe::SharedData* shared); - ~VoENetEqStatsImpl() override; - - private: - voe::SharedData* _shared; -}; - -} // namespace webrtc - -#endif // WEBRTC_VOICE_ENGINE_VOE_NETEQ_STATS_IMPL_H diff --git a/WebRtc.NET/include/webrtc/voice_engine/voe_network_impl.h b/WebRtc.NET/include/webrtc/voice_engine/voe_network_impl.h deleted file mode 100644 index d3601e30..00000000 --- a/WebRtc.NET/include/webrtc/voice_engine/voe_network_impl.h +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_VOICE_ENGINE_VOE_NETWORK_IMPL_H -#define WEBRTC_VOICE_ENGINE_VOE_NETWORK_IMPL_H - -#include "webrtc/voice_engine/include/voe_network.h" - -#include "webrtc/voice_engine/shared_data.h" - -namespace webrtc { - -class VoENetworkImpl : public VoENetwork { - public: - int RegisterExternalTransport(int channel, Transport& transport) override; - int DeRegisterExternalTransport(int channel) override; - - int ReceivedRTPPacket(int channel, const void* data, size_t length) override; - int ReceivedRTPPacket(int channel, - const void* data, - size_t length, - const PacketTime& packet_time) override; - - int ReceivedRTCPPacket(int channel, const void* data, size_t length) override; - - protected: - VoENetworkImpl(voe::SharedData* shared); - ~VoENetworkImpl() override; - - private: - voe::SharedData* _shared; -}; - -} // namespace webrtc - -#endif // WEBRTC_VOICE_ENGINE_VOE_NETWORK_IMPL_H diff --git a/WebRtc.NET/include/webrtc/voice_engine/voe_rtp_rtcp_impl.h b/WebRtc.NET/include/webrtc/voice_engine/voe_rtp_rtcp_impl.h deleted file mode 100644 index dcf28410..00000000 --- a/WebRtc.NET/include/webrtc/voice_engine/voe_rtp_rtcp_impl.h +++ /dev/null @@ -1,79 +0,0 @@ -/* - * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_VOICE_ENGINE_VOE_RTP_RTCP_IMPL_H -#define WEBRTC_VOICE_ENGINE_VOE_RTP_RTCP_IMPL_H - -#include "webrtc/voice_engine/include/voe_rtp_rtcp.h" - -#include "webrtc/voice_engine/shared_data.h" - -namespace webrtc { - -class VoERTP_RTCPImpl : public VoERTP_RTCP { - public: - // RTCP - int SetRTCPStatus(int channel, bool enable) override; - - int GetRTCPStatus(int channel, bool& enabled) override; - - int SetRTCP_CNAME(int channel, const char cName[256]) override; - - int GetRemoteRTCP_CNAME(int channel, char cName[256]) override; - - int GetRemoteRTCPData(int channel, - unsigned int& NTPHigh, - unsigned int& NTPLow, - unsigned int& timestamp, - unsigned int& playoutTimestamp, - unsigned int* jitter = NULL, - unsigned short* fractionLost = NULL) override; - - // SSRC - int SetLocalSSRC(int channel, unsigned int ssrc) override; - - int GetLocalSSRC(int channel, unsigned int& ssrc) override; - - int GetRemoteSSRC(int channel, unsigned int& ssrc) override; - - // RTP Header Extension for Client-to-Mixer Audio Level Indication - int SetSendAudioLevelIndicationStatus(int channel, - bool enable, - unsigned char id) override; - int SetReceiveAudioLevelIndicationStatus(int channel, - bool enable, - unsigned char id) override; - - // Statistics - int GetRTPStatistics(int channel, - unsigned int& averageJitterMs, - unsigned int& maxJitterMs, - unsigned int& discardedPackets) override; - - int GetRTCPStatistics(int channel, CallStatistics& stats) override; - - int GetRemoteRTCPReportBlocks( - int channel, - std::vector* report_blocks) override; - - // NACK - int SetNACKStatus(int channel, bool enable, int maxNoPackets) override; - - protected: - VoERTP_RTCPImpl(voe::SharedData* shared); - ~VoERTP_RTCPImpl() override; - - private: - voe::SharedData* _shared; -}; - -} // namespace webrtc - -#endif // WEBRTC_VOICE_ENGINE_VOE_RTP_RTCP_IMPL_H diff --git a/WebRtc.NET/include/webrtc/voice_engine/voe_video_sync_impl.h b/WebRtc.NET/include/webrtc/voice_engine/voe_video_sync_impl.h deleted file mode 100644 index 8b367eea..00000000 --- a/WebRtc.NET/include/webrtc/voice_engine/voe_video_sync_impl.h +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_VOICE_ENGINE_VOE_VIDEO_SYNC_IMPL_H -#define WEBRTC_VOICE_ENGINE_VOE_VIDEO_SYNC_IMPL_H - -#include "webrtc/voice_engine/include/voe_video_sync.h" - -#include "webrtc/voice_engine/shared_data.h" - -namespace webrtc { - -class VoEVideoSyncImpl : public VoEVideoSync { - public: - int GetPlayoutBufferSize(int& bufferMs) override; - - int SetMinimumPlayoutDelay(int channel, int delayMs) override; - - int GetDelayEstimate(int channel, - int* jitter_buffer_delay_ms, - int* playout_buffer_delay_ms) override; - - int GetLeastRequiredDelayMs(int channel) const override; - - int SetInitTimestamp(int channel, unsigned int timestamp) override; - - int SetInitSequenceNumber(int channel, short sequenceNumber) override; - - int GetPlayoutTimestamp(int channel, unsigned int& timestamp) override; - - int GetRtpRtcp(int channel, - RtpRtcp** rtpRtcpModule, - RtpReceiver** rtp_receiver) override; - - protected: - VoEVideoSyncImpl(voe::SharedData* shared); - ~VoEVideoSyncImpl() override; - - private: - voe::SharedData* _shared; -}; - -} // namespace webrtc - -#endif // WEBRTC_VOICE_ENGINE_VOE_VIDEO_SYNC_IMPL_H diff --git a/WebRtc.NET/include/webrtc/voice_engine/voe_volume_control_impl.h b/WebRtc.NET/include/webrtc/voice_engine/voe_volume_control_impl.h deleted file mode 100644 index 16c9c7df..00000000 --- a/WebRtc.NET/include/webrtc/voice_engine/voe_volume_control_impl.h +++ /dev/null @@ -1,60 +0,0 @@ -/* - * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_VOICE_ENGINE_VOE_VOLUME_CONTROL_IMPL_H -#define WEBRTC_VOICE_ENGINE_VOE_VOLUME_CONTROL_IMPL_H - -#include "webrtc/voice_engine/include/voe_volume_control.h" - -#include "webrtc/voice_engine/shared_data.h" - -namespace webrtc { - -class VoEVolumeControlImpl : public VoEVolumeControl { - public: - int SetSpeakerVolume(unsigned int volume) override; - - int GetSpeakerVolume(unsigned int& volume) override; - - int SetMicVolume(unsigned int volume) override; - - int GetMicVolume(unsigned int& volume) override; - - int SetInputMute(int channel, bool enable) override; - - int GetInputMute(int channel, bool& enabled) override; - - int GetSpeechInputLevel(unsigned int& level) override; - - int GetSpeechOutputLevel(int channel, unsigned int& level) override; - - int GetSpeechInputLevelFullRange(unsigned int& level) override; - - int GetSpeechOutputLevelFullRange(int channel, unsigned int& level) override; - - int SetChannelOutputVolumeScaling(int channel, float scaling) override; - - int GetChannelOutputVolumeScaling(int channel, float& scaling) override; - - int SetOutputVolumePan(int channel, float left, float right) override; - - int GetOutputVolumePan(int channel, float& left, float& right) override; - - protected: - VoEVolumeControlImpl(voe::SharedData* shared); - ~VoEVolumeControlImpl() override; - - private: - voe::SharedData* _shared; -}; - -} // namespace webrtc - -#endif // WEBRTC_VOICE_ENGINE_VOE_VOLUME_CONTROL_IMPL_H diff --git a/WebRtc.NET/include/webrtc/voice_engine/voice_engine_defines.h b/WebRtc.NET/include/webrtc/voice_engine/voice_engine_defines.h deleted file mode 100644 index 295f2098..00000000 --- a/WebRtc.NET/include/webrtc/voice_engine/voice_engine_defines.h +++ /dev/null @@ -1,317 +0,0 @@ -/* - * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -/* - * This file contains common constants for VoiceEngine, as well as - * platform specific settings and include files. - */ - -#ifndef WEBRTC_VOICE_ENGINE_VOICE_ENGINE_DEFINES_H -#define WEBRTC_VOICE_ENGINE_VOICE_ENGINE_DEFINES_H - -#include "webrtc/common_types.h" -#include "webrtc/modules/audio_processing/include/audio_processing.h" -#include "webrtc/typedefs.h" - -// ---------------------------------------------------------------------------- -// Enumerators -// ---------------------------------------------------------------------------- - -namespace webrtc { - -// Internal buffer size required for mono audio, based on the highest sample -// rate voice engine supports (10 ms of audio at 192 kHz). -static const size_t kMaxMonoDataSizeSamples = 1920; - -// VolumeControl -enum { kMinVolumeLevel = 0 }; -enum { kMaxVolumeLevel = 255 }; -// Min scale factor for per-channel volume scaling -const float kMinOutputVolumeScaling = 0.0f; -// Max scale factor for per-channel volume scaling -const float kMaxOutputVolumeScaling = 10.0f; -// Min scale factor for output volume panning -const float kMinOutputVolumePanning = 0.0f; -// Max scale factor for output volume panning -const float kMaxOutputVolumePanning = 1.0f; - -// DTMF -enum { kMinDtmfEventCode = 0 }; // DTMF digit "0" -enum { kMaxDtmfEventCode = 15 }; // DTMF digit "D" -enum { kMinTelephoneEventCode = 0 }; // RFC4733 (Section 2.3.1) -enum { kMaxTelephoneEventCode = 255 }; // RFC4733 (Section 2.3.1) -enum { kMinTelephoneEventDuration = 100 }; -enum { kMaxTelephoneEventDuration = 60000 }; // Actual limit is 2^16 -enum { kMinTelephoneEventAttenuation = 0 }; // 0 dBm0 -enum { kMaxTelephoneEventAttenuation = 36 }; // -36 dBm0 -enum { kMinTelephoneEventSeparationMs = 100 }; // Min delta time between two - // telephone events -enum { kVoiceEngineMaxIpPacketSizeBytes = 1500 }; // assumes Ethernet - -enum { kVoiceEngineMaxModuleVersionSize = 960 }; - -// Audio processing -const NoiseSuppression::Level kDefaultNsMode = NoiseSuppression::kModerate; -const GainControl::Mode kDefaultAgcMode = -#if defined(WEBRTC_ANDROID) || defined(WEBRTC_IOS) - GainControl::kAdaptiveDigital; -#else - GainControl::kAdaptiveAnalog; -#endif -const bool kDefaultAgcState = -#if defined(WEBRTC_ANDROID) || defined(WEBRTC_IOS) - false; -#else - true; -#endif -const GainControl::Mode kDefaultRxAgcMode = GainControl::kAdaptiveDigital; - -// Codec -// Min init target rate for iSAC-wb -enum { kVoiceEngineMinIsacInitTargetRateBpsWb = 10000 }; -// Max init target rate for iSAC-wb -enum { kVoiceEngineMaxIsacInitTargetRateBpsWb = 32000 }; -// Min init target rate for iSAC-swb -enum { kVoiceEngineMinIsacInitTargetRateBpsSwb = 10000 }; -// Max init target rate for iSAC-swb -enum { kVoiceEngineMaxIsacInitTargetRateBpsSwb = 56000 }; -// Lowest max rate for iSAC-wb -enum { kVoiceEngineMinIsacMaxRateBpsWb = 32000 }; -// Highest max rate for iSAC-wb -enum { kVoiceEngineMaxIsacMaxRateBpsWb = 53400 }; -// Lowest max rate for iSAC-swb -enum { kVoiceEngineMinIsacMaxRateBpsSwb = 32000 }; -// Highest max rate for iSAC-swb -enum { kVoiceEngineMaxIsacMaxRateBpsSwb = 107000 }; -// Lowest max payload size for iSAC-wb -enum { kVoiceEngineMinIsacMaxPayloadSizeBytesWb = 120 }; -// Highest max payload size for iSAC-wb -enum { kVoiceEngineMaxIsacMaxPayloadSizeBytesWb = 400 }; -// Lowest max payload size for iSAC-swb -enum { kVoiceEngineMinIsacMaxPayloadSizeBytesSwb = 120 }; -// Highest max payload size for iSAC-swb -enum { kVoiceEngineMaxIsacMaxPayloadSizeBytesSwb = 600 }; - -// VideoSync -// Lowest minimum playout delay -enum { kVoiceEngineMinMinPlayoutDelayMs = 0 }; -// Highest minimum playout delay -enum { kVoiceEngineMaxMinPlayoutDelayMs = 10000 }; - -// Network -// Min packet-timeout time for received RTP packets -enum { kVoiceEngineMinPacketTimeoutSec = 1 }; -// Max packet-timeout time for received RTP packets -enum { kVoiceEngineMaxPacketTimeoutSec = 150 }; -// Min sample time for dead-or-alive detection -enum { kVoiceEngineMinSampleTimeSec = 1 }; -// Max sample time for dead-or-alive detection -enum { kVoiceEngineMaxSampleTimeSec = 150 }; - -// RTP/RTCP -// Min 4-bit ID for RTP extension (see section 4.2 in RFC 5285) -enum { kVoiceEngineMinRtpExtensionId = 1 }; -// Max 4-bit ID for RTP extension -enum { kVoiceEngineMaxRtpExtensionId = 14 }; - -} // namespace webrtc - -// ---------------------------------------------------------------------------- -// Macros -// ---------------------------------------------------------------------------- - -#define NOT_SUPPORTED(stat) \ - LOG_F(LS_ERROR) << "not supported"; \ - stat.SetLastError(VE_FUNC_NOT_SUPPORTED); \ - return -1; - -#if (!defined(NDEBUG) && defined(_WIN32) && (_MSC_VER >= 1400)) -#include -#include -#define DEBUG_PRINT(...) \ - { \ - char msg[256]; \ - sprintf(msg, __VA_ARGS__); \ - OutputDebugStringA(msg); \ - } -#else -// special fix for visual 2003 -#define DEBUG_PRINT(exp) ((void)0) -#endif // !defined(NDEBUG) && defined(_WIN32) - -#define CHECK_CHANNEL(channel) \ - if (CheckChannel(channel) == -1) \ - return -1; - -// ---------------------------------------------------------------------------- -// Inline functions -// ---------------------------------------------------------------------------- - -namespace webrtc { - -inline int VoEId(int veId, int chId) { - if (chId == -1) { - const int dummyChannel(99); - return (int)((veId << 16) + dummyChannel); - } - return (int)((veId << 16) + chId); -} - -inline int VoEModuleId(int veId, int chId) { - return (int)((veId << 16) + chId); -} - -// Convert module ID to internal VoE channel ID -inline int VoEChannelId(int moduleId) { - return (int)(moduleId & 0xffff); -} - -} // namespace webrtc - -// ---------------------------------------------------------------------------- -// Platform settings -// ---------------------------------------------------------------------------- - -// *** WINDOWS *** - -#if defined(_WIN32) - -#include - -#pragma comment(lib, "winmm.lib") - -#ifndef WEBRTC_EXTERNAL_TRANSPORT -#pragma comment(lib, "ws2_32.lib") -#endif - -// ---------------------------------------------------------------------------- -// Defines -// ---------------------------------------------------------------------------- - -// Default device for Windows PC -#define WEBRTC_VOICE_ENGINE_DEFAULT_DEVICE \ - AudioDeviceModule::kDefaultCommunicationDevice - -#endif // #if (defined(_WIN32) - -// *** LINUX *** - -#ifdef WEBRTC_LINUX - -#include -#include -#include -#include -#include -#ifndef QNX -#include -#ifndef ANDROID -#include -#endif // ANDROID -#endif // QNX -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#define DWORD unsigned long int -#define WINAPI -#define LPVOID void * -#define FALSE 0 -#define TRUE 1 -#define UINT unsigned int -#define UCHAR unsigned char -#define TCHAR char -#ifdef QNX -#define _stricmp stricmp -#else -#define _stricmp strcasecmp -#endif -#define GetLastError() errno -#define WSAGetLastError() errno -#define LPCTSTR const char * -#define LPCSTR const char * -#define wsprintf sprintf -#define TEXT(a) a -#define _ftprintf fprintf -#define _tcslen strlen -#define FAR -#define __cdecl -#define LPSOCKADDR struct sockaddr * - -// Default device for Linux and Android -#define WEBRTC_VOICE_ENGINE_DEFAULT_DEVICE 0 - -#endif // #ifdef WEBRTC_LINUX - -// *** WEBRTC_MAC *** -// including iPhone - -#ifdef WEBRTC_MAC - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#if !defined(WEBRTC_IOS) -#include -#include -#include -#include -#include -#endif - -#define DWORD unsigned long int -#define WINAPI -#define LPVOID void * -#define FALSE 0 -#define TRUE 1 -#define SOCKADDR_IN struct sockaddr_in -#define UINT unsigned int -#define UCHAR unsigned char -#define TCHAR char -#define _stricmp strcasecmp -#define GetLastError() errno -#define WSAGetLastError() errno -#define LPCTSTR const char * -#define wsprintf sprintf -#define TEXT(a) a -#define _ftprintf fprintf -#define _tcslen strlen -#define FAR -#define __cdecl -#define LPSOCKADDR struct sockaddr * -#define LPCSTR const char * -#define ULONG unsigned long - -// Default device for Mac and iPhone -#define WEBRTC_VOICE_ENGINE_DEFAULT_DEVICE 0 -#endif // #ifdef WEBRTC_MAC - -#endif // WEBRTC_VOICE_ENGINE_VOICE_ENGINE_DEFINES_H diff --git a/WebRtc.NET/include/webrtc/voice_engine/voice_engine_fixture.h b/WebRtc.NET/include/webrtc/voice_engine/voice_engine_fixture.h deleted file mode 100644 index 4f4eaa86..00000000 --- a/WebRtc.NET/include/webrtc/voice_engine/voice_engine_fixture.h +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright (c) 2015 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#include "webrtc/modules/audio_device/include/fake_audio_device.h" -#include "webrtc/test/gtest.h" -#include "webrtc/test/mock_transport.h" -#include "webrtc/voice_engine/include/voe_base.h" -#include "webrtc/voice_engine/include/voe_network.h" -#include "webrtc/voice_engine/mock/mock_voe_observer.h" - -namespace webrtc { - -class VoiceEngineFixture : public ::testing::Test { - protected: - VoiceEngineFixture(); - ~VoiceEngineFixture(); - - VoiceEngine* voe_; - VoEBase* base_; - VoENetwork* network_; - MockVoEObserver observer_; - FakeAudioDeviceModule adm_; - MockTransport transport_; -}; - -} // namespace webrtc diff --git a/WebRtc.NET/include/webrtc/voice_engine/voice_engine_impl.h b/WebRtc.NET/include/webrtc/voice_engine/voice_engine_impl.h deleted file mode 100644 index 1528379f..00000000 --- a/WebRtc.NET/include/webrtc/voice_engine/voice_engine_impl.h +++ /dev/null @@ -1,82 +0,0 @@ -/* - * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_VOICE_ENGINE_VOICE_ENGINE_IMPL_H -#define WEBRTC_VOICE_ENGINE_VOICE_ENGINE_IMPL_H - -#include - -#include "webrtc/system_wrappers/include/atomic32.h" -#include "webrtc/typedefs.h" -#include "webrtc/voice_engine/voe_base_impl.h" -#include "webrtc/voice_engine/voe_audio_processing_impl.h" -#include "webrtc/voice_engine/voe_codec_impl.h" -#include "webrtc/voice_engine/voe_external_media_impl.h" -#include "webrtc/voice_engine/voe_file_impl.h" -#include "webrtc/voice_engine/voe_hardware_impl.h" -#include "webrtc/voice_engine/voe_neteq_stats_impl.h" -#include "webrtc/voice_engine/voe_network_impl.h" -#include "webrtc/voice_engine/voe_rtp_rtcp_impl.h" -#include "webrtc/voice_engine/voe_video_sync_impl.h" -#include "webrtc/voice_engine/voe_volume_control_impl.h" - -namespace webrtc { -namespace voe { -class ChannelProxy; -} // namespace voe - -class VoiceEngineImpl : public voe::SharedData, // Must be the first base class - public VoiceEngine, - public VoEAudioProcessingImpl, - public VoECodecImpl, - public VoEExternalMediaImpl, - public VoEFileImpl, - public VoEHardwareImpl, - public VoENetEqStatsImpl, - public VoENetworkImpl, - public VoERTP_RTCPImpl, - public VoEVideoSyncImpl, - public VoEVolumeControlImpl, - public VoEBaseImpl { - public: - VoiceEngineImpl() - : SharedData(), - VoEAudioProcessingImpl(this), - VoECodecImpl(this), - VoEExternalMediaImpl(this), - VoEFileImpl(this), - VoEHardwareImpl(this), - VoENetEqStatsImpl(this), - VoENetworkImpl(this), - VoERTP_RTCPImpl(this), - VoEVideoSyncImpl(this), - VoEVolumeControlImpl(this), - VoEBaseImpl(this), - _ref_count(0) {} - ~VoiceEngineImpl() override { assert(_ref_count.Value() == 0); } - - int AddRef(); - - // This implements the Release() method for all the inherited interfaces. - int Release() override; - - // Backdoor to access a voe::Channel object without a channel ID. This is only - // to be used while refactoring the VoE API! - virtual std::unique_ptr GetChannelProxy(int channel_id); - - // This is *protected* so that FakeVoiceEngine can inherit from the class and - // manipulate the reference count. See: fake_voice_engine.h. - protected: - Atomic32 _ref_count; -}; - -} // namespace webrtc - -#endif // WEBRTC_VOICE_ENGINE_VOICE_ENGINE_IMPL_H diff --git a/WebRtc.NET/internals.h b/WebRtc.NET/internals.h deleted file mode 100644 index cdacbf1c..00000000 --- a/WebRtc.NET/internals.h +++ /dev/null @@ -1,25 +0,0 @@ - -#pragma once - -#ifndef WEBRTC_NET_INTERNALS_H_ -#define WEBRTC_NET_INTERNALS_H_ - -// enable webrtc::DesktopCapturer -#define DESKTOP_CAPTURE 0 - -namespace Internal -{ - void Encode(unsigned char * data, unsigned int size, int part_idx, bool keyFrame); -} - -namespace Native -{ - extern bool CFG_quality_scaler_enabled_; - - void InitializeSSL(); - void CleanupSSL(); -} - -#endif // WEBRTC_NET_INTERNALS_H_ - - diff --git a/WebRtc.NET/lib.7z b/WebRtc.NET/lib.7z deleted file mode 100644 index f3e7fbd8..00000000 Binary files a/WebRtc.NET/lib.7z and /dev/null differ diff --git a/WebRtc.NET/lib_x64.7z b/WebRtc.NET/lib_x64.7z deleted file mode 100644 index 62a2068d..00000000 Binary files a/WebRtc.NET/lib_x64.7z and /dev/null differ diff --git a/WebRtc.NET/libd.7z b/WebRtc.NET/libd.7z deleted file mode 100644 index ac54f2e7..00000000 Binary files a/WebRtc.NET/libd.7z and /dev/null differ diff --git a/WebRtc.NET/libd_x64.7z b/WebRtc.NET/libd_x64.7z deleted file mode 100644 index 88df3c0a..00000000 Binary files a/WebRtc.NET/libd_x64.7z and /dev/null differ diff --git a/WebRtc.NET/src/conductor.cc b/WebRtc.NET/src/conductor.cc deleted file mode 100644 index aeeed5f2..00000000 --- a/WebRtc.NET/src/conductor.cc +++ /dev/null @@ -1,564 +0,0 @@ - -#include "defaults.h" -#include "conductor.h" - -#include "webrtc/api/test/fakeconstraints.h" -#include "webrtc/video_encoder.h" -#include "webrtc/modules/video_coding/codecs/vp8/simulcast_encoder_adapter.h" -#include "webrtc/modules/video_coding/codecs/vp8/include/vp8.h" -#include "webrtc/modules/video_capture/video_capture_factory.h" -#include "webrtc/media/engine/webrtcvideocapturerfactory.h" - -// for servers -#include "webrtc/p2p/base/relayserver.h" -#include "webrtc/p2p/base/stunserver.h" -#include "webrtc/p2p/base/basicpacketsocketfactory.h" -#include "webrtc/p2p/base/turnserver.h" -#include "webrtc/base/asyncudpsocket.h" -#include "webrtc/base/optionsfile.h" -#include "webrtc/base/stringencode.h" -#include "webrtc/base/thread.h" - -namespace Native -{ - const char kAudioLabel[] = "audio_label"; - const char kVideoLabel[] = "video_label"; - const char kStreamLabel[] = "stream_label"; - const char kSoftware[] = "libjingle TurnServer"; - - class TurnFileAuth : public cricket::TurnAuthInterface - { - public: - explicit TurnFileAuth(const std::string& path) : file_(path) - { - } - - bool Load() - { - return file_.Load(); - } - - virtual bool GetKey(const std::string& username, const std::string& realm, std::string* key) - { - // File is stored as lines of =. - // Generate HA1 via "echo -n "::" | md5sum" - std::string hex; - bool ret = file_.GetStringValue(username, &hex); - if (ret) - { - char buf[32]; - size_t len = rtc::hex_decode(buf, sizeof(buf), hex); - *key = std::string(buf, len); - } - return ret; - } - private: - rtc::OptionsFile file_; - }; - - Conductor::Conductor() - { - onError = nullptr; - onSuccess = nullptr; - onFailure = nullptr; - onIceCandidate = nullptr; - - width_ = 640; - height_ = 360; - caputureFps = 5; - audioEnabled = false; - - barcodeEnabled = false; - - turnServer = nullptr; - data_channel = nullptr; - onDataMessage = nullptr; - capturer_internal = nullptr; - capturer = nullptr; - } - - Conductor::~Conductor() - { - DeletePeerConnection(); - ASSERT(peer_connection_ == nullptr); - - if (turnServer) - { - turnServer->disconnect_all(); - } - - if (stunServer) - { - stunServer->disconnect_all(); - } - - if (turnServer || stunServer) - { - rtc::Thread::Current()->Quit(); - } - } - - void Conductor::DeletePeerConnection() - { - if (peer_connection_.get()) - { - local_video.reset(); - - for (auto it = active_streams_.begin(); it != active_streams_.end(); ++it) - { - peer_connection_->RemoveStream(it->second); - } - active_streams_.clear(); - - peer_connection_->Close(); - peer_connection_ = nullptr; - } - - pc_factory_ = nullptr; - - if (data_channel) - { - data_channel->UnregisterObserver(); - data_channel = nullptr; - } - serverConfigs.clear(); - - capturer_internal = nullptr; - capturer = nullptr; - } - - bool Conductor::InitializePeerConnection() - { - ASSERT(pc_factory_ == nullptr); - ASSERT(peer_connection_ == nullptr); - - pc_factory_ = webrtc::CreatePeerConnectionFactory(); - - if (!pc_factory_) - { - DeletePeerConnection(); - return false; - } - - webrtc::PeerConnectionFactoryInterface::Options opt; - { - //opt.disable_encryption = true; - //opt.disable_network_monitor = true; - //opt.disable_sctp_data_channels = true; - pc_factory_->SetOptions(opt); - } - - if (!CreatePeerConnection(true)) - { - DeletePeerConnection(); - return false; - } - AddStreams(); - return peer_connection_ != nullptr; - } - - bool Conductor::CreatePeerConnection(bool dtls) - { - ASSERT(pc_factory_ != nullptr); - ASSERT(peer_connection_ == nullptr); - - webrtc::PeerConnectionInterface::RTCConfiguration config; - config.tcp_candidate_policy = webrtc::PeerConnectionInterface::kTcpCandidatePolicyDisabled; - config.disable_ipv6 = true; - config.enable_dtls_srtp = rtc::Optional(dtls); - config.rtcp_mux_policy = webrtc::PeerConnectionInterface::kRtcpMuxPolicyRequire; - - for each (auto server in serverConfigs) - { - config.servers.push_back(server); - } - - webrtc::FakeConstraints constraints; - constraints.SetAllowDtlsSctpDataChannels(); - constraints.SetMandatoryReceiveVideo(false); - constraints.SetMandatoryReceiveAudio(false); - constraints.SetMandatoryIceRestart(true); - constraints.SetMandatoryUseRtpMux(true); - constraints.AddMandatory(webrtc::MediaConstraintsInterface::kVoiceActivityDetection, "false"); - constraints.AddMandatory(webrtc::MediaConstraintsInterface::kEnableIPv6, "false"); - - peer_connection_ = pc_factory_->CreatePeerConnection(config, &constraints, NULL, NULL, this); - return peer_connection_ != nullptr; - } - - void Conductor::AddServerConfig(std::string uri, std::string username, std::string password) - { - webrtc::PeerConnectionInterface::IceServer server; - server.uri = uri; - server.username = username; - server.password = password; - - serverConfigs.push_back(server); - } - - void Conductor::CreateOffer() - { - if (!peer_connection_) - return; - - peer_connection_->CreateOffer(this, nullptr); - } - - void Conductor::OnOfferReply(std::string type, std::string sdp) - { - if (!peer_connection_) - return; - - webrtc::SdpParseError error; - webrtc::SessionDescriptionInterface* session_description(webrtc::CreateSessionDescription(type, sdp, &error)); - if (!session_description) - { - LOG(WARNING) << "Can't parse received session description message. " << "SdpParseError was: " << error.description; - return; - } - peer_connection_->SetRemoteDescription(this, session_description); - } - - void Conductor::OnOfferRequest(std::string sdp) - { - if (!peer_connection_) - return; - - webrtc::SdpParseError error; - webrtc::SessionDescriptionInterface* session_description(webrtc::CreateSessionDescription("offer", sdp, &error)); - if (!session_description) - { - LOG(WARNING) << "Can't parse received session description message. " << "SdpParseError was: " << error.description; - return; - } - peer_connection_->SetRemoteDescription(this, session_description); - - webrtc::PeerConnectionInterface::RTCOfferAnswerOptions o; - { - o.voice_activity_detection = false; - o.offer_to_receive_audio = false; - o.offer_to_receive_video = webrtc::PeerConnectionInterface::RTCOfferAnswerOptions::kOfferToReceiveMediaTrue; - } - peer_connection_->CreateAnswer(this, o); - } - - bool Conductor::AddIceCandidate(std::string sdp_mid, int sdp_mlineindex, std::string sdp) - { - webrtc::SdpParseError error; - webrtc::IceCandidateInterface * candidate = webrtc::CreateIceCandidate(sdp_mid, sdp_mlineindex, sdp, &error); - if (!candidate) - { - LOG(WARNING) << "Can't parse received candidate message. " - << "SdpParseError was: " << error.description; - return false; - } - - if (!peer_connection_) - return false; - - if (!peer_connection_->AddIceCandidate(candidate)) - { - LOG(WARNING) << "Failed to apply the received candidate"; - return false; - } - return true; - } - - // ... - - std::vector Conductor::GetVideoDevices() - { - std::vector device_names; - { - std::unique_ptr info(webrtc::VideoCaptureFactory::CreateDeviceInfo()); - if (info) - { - int num_devices = info->NumberOfDevices(); - for (int i = 0; i < num_devices; ++i) - { - const uint32_t kSize = 256; - char name[kSize] = { 0 }; - char id[kSize] = { 0 }; - if (info->GetDeviceName(i, name, kSize, id, kSize) != -1) - { - device_names.push_back(name); - } - } - } - } - return device_names; - } - - bool Conductor::OpenVideoCaptureDevice(std::string & name) - { - if (!capturer_internal) - { - cricket::WebRtcVideoDeviceCapturerFactory factory; - capturer_internal = factory.Create(cricket::Device(name, 0)); - if (capturer_internal) - { - LOG(LS_ERROR) << "Capturer != NULL!"; - return true; - } - } - return false; - } - - void Conductor::AddStreams() - { - if (active_streams_.find(kStreamLabel) != active_streams_.end()) - return; // Already added. - - cricket::VideoCapturer * vc = nullptr; - if (capturer_internal) - { - vc = capturer_internal; - } - else - { - vc = capturer = new Native::YuvFramesCapturer2(*this); - } - - auto v = pc_factory_->CreateVideoSource(vc); - auto video_track = pc_factory_->CreateVideoTrack(kVideoLabel, v); - if (onRenderLocal) - { - local_video.reset(new VideoRenderer(*this, false, video_track)); - } - - auto stream = pc_factory_->CreateLocalMediaStream(kStreamLabel); - { - if (audioEnabled) - { - auto a = pc_factory_->CreateAudioSource(NULL); - auto audio_track = pc_factory_->CreateAudioTrack(kAudioLabel, a); - stream->AddTrack(audio_track); - } - stream->AddTrack(video_track); - - if (!peer_connection_->AddStream(stream)) - { - LOG(LS_ERROR) << "Adding stream to PeerConnection failed"; - } - typedef std::pair > MediaStreamPair; - active_streams_.insert(MediaStreamPair(stream->label(), stream)); - } - } - - // Called when a remote stream is added - void Conductor::OnAddStream(rtc::scoped_refptr stream) - { - LOG(INFO) << __FUNCTION__ << " " << stream->label(); - - if (onRenderRemote) - { - webrtc::VideoTrackVector tracks = stream->GetVideoTracks(); - if (!tracks.empty()) - { - webrtc::VideoTrackInterface* track = tracks[0]; - remote_video.reset(new Native::VideoRenderer(*this, true, track)); - } - } - - if (audioEnabled) - { - webrtc::AudioTrackVector atracks = stream->GetAudioTracks(); - if (!atracks.empty()) - { - webrtc::AudioTrackInterface* track = atracks[0]; - remote_audio.reset(new Native::AudioRenderer(*this, true, track)); - } - } - } - - void Conductor::OnRemoveStream(rtc::scoped_refptr stream) - { - LOG(INFO) << __FUNCTION__ << " " << stream->label(); - remote_video.reset(nullptr); - remote_audio.reset(nullptr); - - // lost ownership, do not delete - capturer = nullptr; - capturer_internal = nullptr; - } - - void Conductor::OnIceCandidate(const webrtc::IceCandidateInterface* candidate) - { - LOG(INFO) << __FUNCTION__ << " " << candidate->sdp_mline_index(); - - std::string sdp; - if (!candidate->ToString(&sdp)) - { - LOG(LS_ERROR) << "Failed to serialize candidate"; - return; - } - - if (onIceCandidate != nullptr) - { - onIceCandidate(candidate->sdp_mid().c_str(), candidate->sdp_mline_index(), sdp.c_str()); - } - } - - void Conductor::OnSuccess(webrtc::SessionDescriptionInterface* desc) - { - if (!peer_connection_) - return; - - peer_connection_->SetLocalDescription(this, desc); - - std::string sdp; - desc->ToString(&sdp); - - if (onSuccess != nullptr) - { - onSuccess(desc->type().c_str(), sdp.c_str()); - } - } - - void Conductor::OnFailure(const std::string& error) - { - LOG(LERROR) << error; - - if (onFailure != nullptr) - { - onFailure(error.c_str()); - } - } - - void Conductor::OnError() - { - if (onError != nullptr) - { - onError(); - } - } - - void Conductor::CreateDataChannel(const std::string & label) - { - if (!peer_connection_) - return; - - webrtc::DataChannelInit dc_options; - //dc_options.id = 1; - dc_options.maxRetransmits = 1; - dc_options.negotiated = false; - dc_options.ordered = false; - - data_channel = peer_connection_->CreateDataChannel(label, &dc_options); - data_channel->RegisterObserver(this); - } - - void Conductor::OnDataChannel(rtc::scoped_refptr channel) - { - LOG(INFO) << __FUNCTION__ << " " << channel->label(); - - data_channel = channel.get(); - data_channel->RegisterObserver(this); - } - - void Conductor::DataChannelSendText(const std::string & text) - { - data_channel->Send(webrtc::DataBuffer(text)); - } - - void Conductor::DataChannelSendData(const webrtc::DataBuffer & data) - { - data_channel->Send(data); - } - - // A data buffer was successfully received. - void Conductor::OnMessage(const webrtc::DataBuffer& buffer) - { - LOG(INFO) << __FUNCTION__; - - if (buffer.binary) - { - if (onDataBinaryMessage != nullptr) - { - auto * data = buffer.data.data(); - onDataBinaryMessage(data, buffer.size()); - } - } - else - { - if (onDataMessage != nullptr) - { - std::string msg(buffer.data.data(), buffer.size()); - onDataMessage(msg.c_str()); - } - } - } - - bool Conductor::RunStunServer(const std::string & bindIp) - { - rtc::SocketAddress server_addr; - if (!server_addr.FromString(bindIp)) - { - LOG(LERROR) << "Unable to parse IP address: " << bindIp; - return false; - } - - rtc::Thread * main = rtc::Thread::Current(); - - rtc::AsyncUDPSocket* server_socket = rtc::AsyncUDPSocket::Create(main->socketserver(), server_addr); - if (!server_socket) - { - LOG(LERROR) << "Failed to create a UDP socket" << std::endl; - return false; - } - - stunServer.reset(new cricket::StunServer(server_socket)); - - LOG(INFO) << "Listening at " << server_addr.ToString() << std::endl; - - return true; - } - - bool Conductor::RunTurnServer(const std::string & bindIp, const std::string & ip, - const std::string & realm, const std::string & authFile) - { - rtc::SocketAddress int_addr; - if (!int_addr.FromString(bindIp)) - { - LOG(LERROR) << "Unable to parse IP address: " << bindIp << std::endl; - return false; - } - - rtc::IPAddress ext_addr; - if (!IPFromString(ip, &ext_addr)) - { - LOG(LERROR) << "Unable to parse IP address: " << ip << std::endl; - return false; - } - - rtc::Thread* main = rtc::Thread::Current(); - rtc::AsyncUDPSocket * int_socket = rtc::AsyncUDPSocket::Create(main->socketserver(), int_addr); - if (!int_socket) - { - LOG(LERROR) << "Failed to create a UDP socket bound at" << int_addr.ToString() << std::endl; - return false; - } - - TurnFileAuth * auth = new TurnFileAuth(authFile); - if (!auth->Load()) - { - LOG(LERROR) << "Failed to load auth file " << authFile << std::endl; - return false; - } - - - auto t = new cricket::TurnServer(main); - turnServer.reset(t); - - t->set_realm(realm); - t->set_software(kSoftware); - t->set_auth_hook(auth); - t->AddInternalSocket(int_socket, cricket::PROTO_UDP); - t->SetExternalSocketFactory(new rtc::BasicPacketSocketFactory(), - rtc::SocketAddress(ext_addr, 0)); - - LOG(INFO) << "Listening internally at " << int_addr.ToString() << std::endl; - - return true; - } -} \ No newline at end of file diff --git a/WebRtc.NET/src/conductor.h b/WebRtc.NET/src/conductor.h deleted file mode 100644 index a62c316a..00000000 --- a/WebRtc.NET/src/conductor.h +++ /dev/null @@ -1,232 +0,0 @@ - -#ifndef WEBRTC_NET_CONDUCTOR_H_ -#define WEBRTC_NET_CONDUCTOR_H_ -#pragma once - -#include "webrtc/api/mediastreaminterface.h" -#include "webrtc/api/peerconnectioninterface.h" - -#include "internals.h" - -namespace cricket -{ - class TurnServer; - class StunServer; -} - -namespace Native -{ - typedef void(__stdcall *OnErrorCallbackNative)(); - typedef void(__stdcall *OnSuccessCallbackNative)(const char * type, const char * sdp); - typedef void(__stdcall *OnFailureCallbackNative)(const char * error); - typedef void(__stdcall *OnIceCandidateCallbackNative)(const char * sdp_mid, int sdp_mline_index, const char * sdp); - typedef void(__stdcall *OnRenderCallbackNative)(uint8_t * frame_buffer, uint32_t w, uint32_t h); - typedef void(__stdcall *OnDataMessageCallbackNative)(const char * msg); - typedef void(__stdcall *OnDataBinaryMessageCallbackNative)(const uint8_t * msg, uint32_t size); - - class Conductor : public webrtc::PeerConnectionObserver, - public webrtc::CreateSessionDescriptionObserver, - public webrtc::SetSessionDescriptionObserver, - public webrtc::DataChannelObserver - { - public: - - Conductor(); - ~Conductor(); - - bool InitializePeerConnection(); - void CreateOffer(); - void OnOfferReply(std::string type, std::string sdp); - void OnOfferRequest(std::string sdp); - bool AddIceCandidate(std::string sdp_mid, int sdp_mlineindex, std::string sdp); - - bool ProcessMessages(int delay) - { - return rtc::Thread::Current()->ProcessMessages(delay); - } - - static std::vector GetVideoDevices(); - bool OpenVideoCaptureDevice(std::string & name); - void AddServerConfig(std::string uri, std::string username, std::string password); - - uint8_t * VideoCapturerI420Buffer() - { - if (capturer) - { - return (uint8_t*)capturer->video_buffer->DataY(); - } - return nullptr; - } - - void PushFrame() - { - if (capturer) - { - capturer->PushFrame(); - } - } - -#if DESKTOP_CAPTURE - void DesktopCapturerSize(int & w, int & h) - { - if (capturer && capturer->desktop_frame) - { - webrtc::DesktopSize s = capturer->desktop_frame->size(); - w = s.width(); - h = s.height(); - } - } - - uint8_t * DesktopCapturerRGBAbuffer() - { - if (capturer && capturer->desktop_frame) - { - return capturer->desktop_frame->data(); - } - return nullptr; - } - - void CaptureFrame() - { - if (capturer) - { - capturer->CaptureFrame(); - } - } -#endif - void CreateDataChannel(const std::string & label); - void DataChannelSendText(const std::string & text); - void DataChannelSendData(const webrtc::DataBuffer & data); - - OnErrorCallbackNative onError; - OnSuccessCallbackNative onSuccess; - OnFailureCallbackNative onFailure; - OnIceCandidateCallbackNative onIceCandidate; - OnRenderCallbackNative onRenderLocal; - OnRenderCallbackNative onRenderRemote; - OnDataMessageCallbackNative onDataMessage; - OnDataBinaryMessageCallbackNative onDataBinaryMessage; - - bool RunStunServer(const std::string & bindIp); - bool RunTurnServer(const std::string & bindIp, const std::string & ip, - const std::string & realm, const std::string & authFile); - - protected: - -#pragma region -- SetSessionDescriptionObserver -- - - virtual void webrtc::SetSessionDescriptionObserver::OnSuccess() - { - LOG(INFO) << __FUNCTION__; - } - -#pragma endregion - -#pragma region -- CreateSessionDescriptionObserver -- - - virtual void webrtc::CreateSessionDescriptionObserver::OnSuccess(webrtc::SessionDescriptionInterface* desc); - virtual void OnFailure(const std::string& error); - -#pragma endregion - -#pragma region -- PeerConnectionObserver -- - - virtual void OnAddStream(rtc::scoped_refptr stream); - virtual void OnRemoveStream(rtc::scoped_refptr stream); - virtual void OnError(); - virtual void OnIceCandidate(const webrtc::IceCandidateInterface* candidate); - - virtual void OnIceChange() - { - LOG(INFO) << __FUNCTION__ << " "; - } - - virtual void OnSignalingChange(webrtc::PeerConnectionInterface::SignalingState state) - { - LOG(INFO) << __FUNCTION__ << " " << state; - } - - virtual void OnIceConnectionChange(webrtc::PeerConnectionInterface::IceConnectionState state) - { - LOG(INFO) << __FUNCTION__ << " " << state; - } - - virtual void OnIceGatheringChange(webrtc::PeerConnectionInterface::IceGatheringState state) - { - LOG(INFO) << __FUNCTION__ << " " << state; - } - - virtual void OnStateChange(webrtc::PeerConnectionObserver::StateType state_changed) - { - LOG(INFO) << __FUNCTION__ << " " << state_changed; - } - - virtual void OnRenegotiationNeeded() - { - LOG(INFO) << __FUNCTION__ << " "; - } - -#pragma endregion - -#pragma region -- DataChannelObserver -- - - virtual void OnDataChannel(rtc::scoped_refptr channel); - - // The data channel state have changed. - virtual void OnStateChange() - { - LOG(INFO) << __FUNCTION__; - } - - // A data buffer was successfully received. - virtual void OnMessage(const webrtc::DataBuffer& buffer); - - // The data channel's buffered_amount has changed. - virtual void OnBufferedAmountChange(uint64_t previous_amount) - { - LOG(INFO) << __FUNCTION__; - } - -#pragma endregion - - int AddRef() const - { - return 0; - }; - int Release() const - { - return 0; - }; - - private: - - bool CreatePeerConnection(bool dtls); - void DeletePeerConnection(); - void AddStreams(); - - rtc::scoped_refptr peer_connection_; - rtc::scoped_refptr pc_factory_; - std::map> active_streams_; - rtc::scoped_refptr data_channel; - std::vector serverConfigs; - - YuvFramesCapturer2 * capturer; - cricket::VideoCapturer * capturer_internal; - - std::unique_ptr local_video; - std::unique_ptr remote_video; - std::unique_ptr remote_audio; - - std::unique_ptr turnServer; - std::unique_ptr stunServer; - - public: - int caputureFps; - bool audioEnabled; - bool barcodeEnabled; - - int width_; - int height_; - }; -} -#endif // WEBRTC_NET_CONDUCTOR_H_ diff --git a/WebRtc.NET/src/defaults.cc b/WebRtc.NET/src/defaults.cc deleted file mode 100644 index c66e8600..00000000 --- a/WebRtc.NET/src/defaults.cc +++ /dev/null @@ -1,196 +0,0 @@ - -#include "defaults.h" -#include "internals.h" -#include "conductor.h" - - -#include "webrtc/modules/desktop_capture/desktop_capture_options.h" - -namespace Native -{ - int I420DataSize(int height, int stride_y, int stride_u, int stride_v) - { - return stride_y * height + (stride_u + stride_v) * ((height + 1) / 2); - } - - YuvFramesCapturer2::YuvFramesCapturer2(Conductor & c) : - barcode_interval_(1), - frame_generator_(nullptr), -#if DESKTOP_CAPTURE - desktop_capturer(nullptr), -#endif - run(false), - con(&c) - { - video_buffer = webrtc::I420Buffer::Create(con->width_, con->height_); - frame_data_size_ = I420DataSize(con->height_, video_buffer->StrideY(), video_buffer->StrideU(), video_buffer->StrideV()); - - video_frame = new webrtc::VideoFrame(video_buffer, 0, 0, webrtc::VideoRotation::kVideoRotation_0); - - // Enumerate the supported formats. We have only one supported format. - cricket::VideoFormat format(con->width_, con->height_, cricket::VideoFormat::FpsToInterval(con->caputureFps), cricket::FOURCC_IYUV); - std::vector supported; - supported.push_back(format); - SetSupportedFormats(supported); - - set_enable_video_adapter(false); - //set_square_pixel_aspect_ratio(false); - } - - YuvFramesCapturer2::~YuvFramesCapturer2() - { - if (video_frame) - { - delete video_frame; - video_frame = nullptr; - } - - if (frame_generator_) - { - delete frame_generator_; - } - Stop(); - } - - cricket::CaptureState YuvFramesCapturer2::Start(const cricket::VideoFormat& capture_format) - { - if (IsRunning()) - { - LOG(LS_ERROR) << "Yuv Frame Generator is already running"; - return cricket::CS_FAILED; - } - SetCaptureFormat(&capture_format); - - barcode_reference_timestamp_millis_ = rtc::TimeNanos(); - run = true; - -#if DESKTOP_CAPTURE - { - webrtc::DesktopCaptureOptions co; - co.set_allow_directx_capturer(true); - desktop_capturer = webrtc::DesktopCapturer::CreateScreenCapturer(co); - - desktop_capturer->GetSourceList(&desktop_screens); - for each(auto & s in desktop_screens) - { - LOG(INFO) << "screen: " << s.id << " -> " << s.title; - } - desktop_capturer->SelectSource(desktop_screens[0].id); - desktop_capturer->Start(this); - } -#endif - - LOG(LS_INFO) << "Yuv Frame Generator started"; - return cricket::CS_RUNNING; - } - - bool YuvFramesCapturer2::IsRunning() - { - return run; - } - - void YuvFramesCapturer2::Stop() - { - run = false; - SetCaptureFormat(nullptr); - } - - bool YuvFramesCapturer2::GetPreferredFourccs(std::vector* fourccs) - { - if (!fourccs) - { - return false; - } - fourccs->push_back(GetSupportedFormats()->at(0).fourcc); - return true; - } - - void YuvFramesCapturer2::PushFrame() - { - int64_t camera_time_us = rtc::TimeMicros(); - int64_t system_time_us = camera_time_us; - int out_width; - int out_height; - int crop_width; - int crop_height; - int crop_x; - int crop_y; - int64_t translated_camera_time_us; - - if (AdaptFrame(con->width_, - con->height_, - camera_time_us, - system_time_us, - &out_width, - &out_height, - &crop_width, - &crop_height, - &crop_x, - &crop_y, - &translated_camera_time_us)) - { - if (con->barcodeEnabled) - { - if (frame_generator_ == nullptr) - { - frame_generator_ = new cricket::YuvFrameGenerator(con->width_, con->height_, true); - } - frame_generator_->GenerateNextFrame((uint8_t*)video_buffer->DataY(), static_cast(rtc::TimeNanos() - barcode_reference_timestamp_millis_)); - } - - video_frame->set_timestamp_us(translated_camera_time_us); - - OnFrame(*video_frame, con->width_, con->height_); - } - } - -#if DESKTOP_CAPTURE - void YuvFramesCapturer2::CaptureFrame() - { - if (desktop_capturer) - { - desktop_capturer->CaptureFrame(); - } - } - - // webrtc::DesktopCapturer::Callback implementation - void YuvFramesCapturer2::OnCaptureResult(webrtc::DesktopCapturer::Result result, std::unique_ptr frame) - { - if (desktop_capturer) - { - desktop_frame.reset(frame.release()); - } - } -#endif - - // VideoSinkInterface implementation - void VideoRenderer::OnFrame(const webrtc::VideoFrame& frame) - { - if (remote && con->onRenderRemote) - { - auto b = frame.video_frame_buffer(); - con->onRenderRemote((uint8_t*)b->DataY(), b->width(), b->height()); - } - else if (con->onRenderLocal) - { - auto b = frame.video_frame_buffer(); - con->onRenderLocal((uint8_t*)b->DataY(), b->width(), b->height()); - } - } - - // AudioTrackSinkInterface implementation - void AudioRenderer::OnData(const void* audio_data, - int bits_per_sample, - int sample_rate, - size_t number_of_channels, - size_t number_of_frames) - { - std::stringstream s; - s << "AudioRenderer::OnData, bps: " << bits_per_sample - << ", rate: " << sample_rate - << ", channels: " << number_of_channels - << ", frames: " << number_of_frames; - - ::OutputDebugStringA(s.str().c_str()); - } -} \ No newline at end of file diff --git a/WebRtc.NET/src/defaults.h b/WebRtc.NET/src/defaults.h deleted file mode 100644 index e6346fe6..00000000 --- a/WebRtc.NET/src/defaults.h +++ /dev/null @@ -1,115 +0,0 @@ - -#ifndef WEBRTC_NET_DEFAULTS_H_ -#define WEBRTC_NET_DEFAULTS_H_ -#pragma once - -#include "webrtc/media/base/videocapturer.h" -#include "webrtc/media/base/yuvframegenerator.h" -#include "webrtc/api/mediastreaminterface.h" -#include "webrtc/modules/desktop_capture/desktop_capturer.h" - -#include "internals.h" - -namespace Native -{ - class Conductor; - - class YuvFramesCapturer2 : public cricket::VideoCapturer -#if DESKTOP_CAPTURE - , webrtc::DesktopCapturer::Callback -#endif - { - public: - YuvFramesCapturer2(Conductor & c); - virtual ~YuvFramesCapturer2(); - - // Override virtual methods of parent class VideoCapturer. - virtual cricket::CaptureState Start(const cricket::VideoFormat& capture_format); - virtual void Stop(); - virtual bool IsRunning(); - virtual bool IsScreencast() const - { - return false; - } - - void PushFrame(); - -#if DESKTOP_CAPTURE - void CaptureFrame(); - virtual void OnCaptureResult(webrtc::DesktopCapturer::Result result, std::unique_ptr frame); - std::unique_ptr desktop_frame; - webrtc::DesktopCapturer::SourceList desktop_screens; -#endif - rtc::scoped_refptr video_buffer; - uint32_t frame_data_size_; - - protected: - - virtual bool GetPreferredFourccs(std::vector* fourccs); - - private: - - Conductor * con; - cricket::YuvFrameGenerator* frame_generator_; - webrtc::VideoFrame * video_frame; - - int64_t barcode_reference_timestamp_millis_; - int32_t barcode_interval_; - bool run; - -#if DESKTOP_CAPTURE - std::unique_ptr desktop_capturer; -#endif - }; - - class VideoRenderer : public rtc::VideoSinkInterface - { - public: - VideoRenderer(Conductor & c, bool remote, webrtc::VideoTrackInterface * track_to_render) : - rendered_track_(track_to_render), con(&c), remote(remote) - { - rendered_track_->AddOrUpdateSink(this, rtc::VideoSinkWants()); - } - virtual ~VideoRenderer() - { - if(rendered_track_.get()) - rendered_track_->RemoveSink(this); - } - - // VideoSinkInterface implementation - void OnFrame(const webrtc::VideoFrame& frame) override; - - protected: - - bool remote; - Conductor * con; - rtc::scoped_refptr rendered_track_; - }; - - class AudioRenderer : public webrtc::AudioTrackSinkInterface - { - public: - AudioRenderer(Conductor & c, bool remote, webrtc::AudioTrackInterface * track_to_render) : - audio_track_(track_to_render), con(&c), remote(remote) - { - audio_track_->AddSink(this); - } - virtual ~AudioRenderer() - { - audio_track_->RemoveSink(this); - } - - virtual void OnData(const void* audio_data, - int bits_per_sample, - int sample_rate, - size_t number_of_channels, - size_t number_of_frames) override; - - protected: - - bool remote; - Conductor * con; - rtc::scoped_refptr audio_track_; - }; -} -#endif // WEBRTC_NET_DEFAULTS_H_ diff --git a/WebRtc.NET/src/internals/vp8_impl.cc b/WebRtc.NET/src/internals/vp8_impl.cc deleted file mode 100644 index f1e4c30e..00000000 --- a/WebRtc.NET/src/internals/vp8_impl.cc +++ /dev/null @@ -1,1495 +0,0 @@ -/* -* Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. -* -* Use of this source code is governed by a BSD-style license -* that can be found in the LICENSE file in the root of the source -* tree. An additional intellectual property rights grant can be found -* in the file PATENTS. All contributing project authors may -* be found in the AUTHORS file in the root of the source tree. -*/ - -#include "webrtc/modules/video_coding/codecs/vp8/vp8_impl.h" - -#include -#include -#include -#include - -// NOTE(ajm): Path provided by gyp. -#include "libyuv/scale.h" // NOLINT -#include "libyuv/convert.h" // NOLINT - -#include "webrtc/base/checks.h" -#include "webrtc/base/timeutils.h" -#include "webrtc/base/trace_event.h" -#include "webrtc/common_types.h" -#include "webrtc/common_video/libyuv/include/webrtc_libyuv.h" -#include "webrtc/modules/include/module_common_types.h" -#include "webrtc/modules/video_coding/include/video_codec_interface.h" -#include "webrtc/modules/video_coding/codecs/vp8/include/vp8_common_types.h" -#include "webrtc/modules/video_coding/codecs/vp8/screenshare_layers.h" -#include "webrtc/modules/video_coding/codecs/vp8/temporal_layers.h" -#include "webrtc/modules/video_coding/utility/simulcast_rate_allocator.h" -#include "webrtc/system_wrappers/include/clock.h" -#include "webrtc/system_wrappers/include/metrics.h" - -#include "internals.h" - -namespace webrtc -{ - namespace - { - - enum - { - kVp8ErrorPropagationTh = 30 - }; - enum - { - kVp832ByteAlign = 32 - }; - - // VP8 denoiser states. - enum denoiserState - { - kDenoiserOff, - kDenoiserOnYOnly, - kDenoiserOnYUV, - kDenoiserOnYUVAggressive, - // Adaptive mode defaults to kDenoiserOnYUV on key frame, but may switch - // to kDenoiserOnYUVAggressive based on a computed noise metric. - kDenoiserOnAdaptive - }; - - // Greatest common divisior - int GCD(int a, int b) - { - int c = a % b; - while (c != 0) - { - a = b; - b = c; - c = a % b; - } - return b; - } - - uint32_t SumStreamMaxBitrate(int streams, const VideoCodec& codec) - { - uint32_t bitrate_sum = 0; - for (int i = 0; i < streams; ++i) - { - bitrate_sum += codec.simulcastStream[i].maxBitrate; - } - return bitrate_sum; - } - - int NumberOfStreams(const VideoCodec& codec) - { - int streams = - codec.numberOfSimulcastStreams < 1 ? 1 : codec.numberOfSimulcastStreams; - uint32_t simulcast_max_bitrate = SumStreamMaxBitrate(streams, codec); - if (simulcast_max_bitrate == 0) - { - streams = 1; - } - return streams; - } - - bool ValidSimulcastResolutions(const VideoCodec& codec, int num_streams) - { - if (codec.width != codec.simulcastStream[num_streams - 1].width || - codec.height != codec.simulcastStream[num_streams - 1].height) - { - return false; - } - for (int i = 0; i < num_streams; ++i) - { - if (codec.width * codec.simulcastStream[i].height != - codec.height * codec.simulcastStream[i].width) - { - return false; - } - } - return true; - } - - int NumStreamsDisabled(const std::vector& streams) - { - int num_disabled = 0; - for (bool stream : streams) - { - if (!stream) - ++num_disabled; - } - return num_disabled; - } - } // namespace - - VP8Encoder* VP8Encoder::Create() - { - return new VP8EncoderImpl(); - } - - VP8Decoder* VP8Decoder::Create() - { - return new VP8DecoderImpl(); - } - - VP8EncoderImpl::VP8EncoderImpl() - : encoded_complete_callback_(nullptr), - inited_(false), - timestamp_(0), - feedback_mode_(false), - qp_max_(56), // Setting for max quantizer. - cpu_speed_default_(-6), - number_of_cores_(0), - rc_max_intra_target_(0), - token_partitions_(VP8_ONE_TOKENPARTITION), - down_scale_requested_(false), - down_scale_bitrate_(0), - key_frame_request_(kMaxSimulcastStreams, false) - { - uint32_t seed = rtc::Time32(); - srand(seed); - - picture_id_.reserve(kMaxSimulcastStreams); - last_key_frame_picture_id_.reserve(kMaxSimulcastStreams); - temporal_layers_.reserve(kMaxSimulcastStreams); - raw_images_.reserve(kMaxSimulcastStreams); - encoded_images_.reserve(kMaxSimulcastStreams); - send_stream_.reserve(kMaxSimulcastStreams); - cpu_speed_.assign(kMaxSimulcastStreams, -6); // Set default to -6. - encoders_.reserve(kMaxSimulcastStreams); - configurations_.reserve(kMaxSimulcastStreams); - downsampling_factors_.reserve(kMaxSimulcastStreams); - } - - VP8EncoderImpl::~VP8EncoderImpl() - { - Release(); - } - - int VP8EncoderImpl::Release() - { - int ret_val = WEBRTC_VIDEO_CODEC_OK; - - while (!encoded_images_.empty()) - { - EncodedImage& image = encoded_images_.back(); - delete[] image._buffer; - encoded_images_.pop_back(); - } - while (!encoders_.empty()) - { - vpx_codec_ctx_t& encoder = encoders_.back(); - if (vpx_codec_destroy(&encoder)) - { - ret_val = WEBRTC_VIDEO_CODEC_MEMORY; - } - encoders_.pop_back(); - } - configurations_.clear(); - send_stream_.clear(); - cpu_speed_.clear(); - while (!raw_images_.empty()) - { - vpx_img_free(&raw_images_.back()); - raw_images_.pop_back(); - } - while (!temporal_layers_.empty()) - { - delete temporal_layers_.back(); - temporal_layers_.pop_back(); - } - inited_ = false; - return ret_val; - } - - int VP8EncoderImpl::SetRateAllocation(const BitrateAllocation& bitrate, - uint32_t new_framerate) - { - if (!inited_) - return WEBRTC_VIDEO_CODEC_UNINITIALIZED; - - if (encoders_[0].err) - return WEBRTC_VIDEO_CODEC_ERROR; - - if (new_framerate < 1) - return WEBRTC_VIDEO_CODEC_ERR_PARAMETER; - - if (bitrate.get_sum_bps() == 0) - { - // Encoder paused, turn off all encoding. - const int num_streams = static_cast(encoders_.size()); - for (int i = 0; i < num_streams; ++i) - SetStreamState(false, i); - return WEBRTC_VIDEO_CODEC_OK; - } - - // At this point, bitrate allocation should already match codec settings. - if (codec_.maxBitrate > 0) - RTC_DCHECK_LE(bitrate.get_sum_kbps(), codec_.maxBitrate); - RTC_DCHECK_GE(bitrate.get_sum_kbps(), codec_.minBitrate); - if (codec_.numberOfSimulcastStreams > 0) - RTC_DCHECK_GE(bitrate.get_sum_kbps(), codec_.simulcastStream[0].minBitrate); - - codec_.maxFramerate = new_framerate; - - if (encoders_.size() == 1) - { - // 1:1. - // Calculate a rough limit for when to trigger a potental down scale. - uint32_t k_pixels_per_frame = codec_.width * codec_.height / 1000; - // TODO(pwestin): we currently lack CAMA, this is a temporary fix to work - // around the current limitations. - // Only trigger keyframes if we are allowed to scale down. - if (configurations_[0].rc_resize_allowed) - { - if (!down_scale_requested_) - { - if (k_pixels_per_frame > bitrate.get_sum_kbps()) - { - down_scale_requested_ = true; - down_scale_bitrate_ = bitrate.get_sum_kbps(); - key_frame_request_[0] = true; - } - } - else - { - if (bitrate.get_sum_kbps() > (2 * down_scale_bitrate_) || - bitrate.get_sum_kbps() < (down_scale_bitrate_ / 2)) - { - down_scale_requested_ = false; - } - } - } - } - else - { - // If we have more than 1 stream, reduce the qp_max for the low resolution - // stream if frame rate is not too low. The trade-off with lower qp_max is - // possibly more dropped frames, so we only do this if the frame rate is - // above some threshold (base temporal layer is down to 1/4 for 3 layers). - // We may want to condition this on bitrate later. - if (new_framerate > 20) - { - configurations_[encoders_.size() - 1].rc_max_quantizer = 45; - } - else - { - // Go back to default value set in InitEncode. - configurations_[encoders_.size() - 1].rc_max_quantizer = qp_max_; - } - } - - size_t stream_idx = encoders_.size() - 1; - for (size_t i = 0; i < encoders_.size(); ++i, --stream_idx) - { - unsigned int target_bitrate_kbps = - bitrate.GetSpatialLayerSum(stream_idx) / 1000; - - bool send_stream = target_bitrate_kbps > 0; - if (send_stream || encoders_.size() > 1) - SetStreamState(send_stream, stream_idx); - - configurations_[i].rc_target_bitrate = target_bitrate_kbps; - temporal_layers_[stream_idx]->UpdateConfiguration(&configurations_[i]); - - if (vpx_codec_enc_config_set(&encoders_[i], &configurations_[i])) - { - return WEBRTC_VIDEO_CODEC_ERROR; - } - } - return WEBRTC_VIDEO_CODEC_OK; - } - - const char* VP8EncoderImpl::ImplementationName() const - { - return "libvpx"; - } - - void VP8EncoderImpl::SetStreamState(bool send_stream, - int stream_idx) - { - if (send_stream && !send_stream_[stream_idx]) - { - // Need a key frame if we have not sent this stream before. - key_frame_request_[stream_idx] = true; - } - send_stream_[stream_idx] = send_stream; - } - - void VP8EncoderImpl::SetupTemporalLayers(int num_streams, - int num_temporal_layers, - const VideoCodec& codec) - { - RTC_DCHECK(codec.VP8().tl_factory != nullptr); - const TemporalLayersFactory* tl_factory = codec.VP8().tl_factory; - if (num_streams == 1) - { - temporal_layers_.push_back( - tl_factory->Create(0, num_temporal_layers, rand())); - } - else - { - for (int i = 0; i < num_streams; ++i) - { - RTC_CHECK_GT(num_temporal_layers, 0); - int layers = std::max(static_cast(1), - codec.simulcastStream[i].numberOfTemporalLayers); - temporal_layers_.push_back(tl_factory->Create(i, layers, rand())); - } - } - } - - int VP8EncoderImpl::InitEncode(const VideoCodec* inst, - int number_of_cores, - size_t /*maxPayloadSize */) - { - if (inst == NULL) - { - return WEBRTC_VIDEO_CODEC_ERR_PARAMETER; - } - if (inst->maxFramerate < 1) - { - return WEBRTC_VIDEO_CODEC_ERR_PARAMETER; - } - // allow zero to represent an unspecified maxBitRate - if (inst->maxBitrate > 0 && inst->startBitrate > inst->maxBitrate) - { - return WEBRTC_VIDEO_CODEC_ERR_PARAMETER; - } - if (inst->width <= 1 || inst->height <= 1) - { - return WEBRTC_VIDEO_CODEC_ERR_PARAMETER; - } - if (number_of_cores < 1) - { - return WEBRTC_VIDEO_CODEC_ERR_PARAMETER; - } - if (inst->VP8().feedbackModeOn && inst->numberOfSimulcastStreams > 1) - { - return WEBRTC_VIDEO_CODEC_ERR_PARAMETER; - } - if (inst->VP8().automaticResizeOn && inst->numberOfSimulcastStreams > 1) - { - return WEBRTC_VIDEO_CODEC_ERR_PARAMETER; - } - int retVal = Release(); - if (retVal < 0) - { - return retVal; - } - - int number_of_streams = NumberOfStreams(*inst); - bool doing_simulcast = (number_of_streams > 1); - - if (doing_simulcast && !ValidSimulcastResolutions(*inst, number_of_streams)) - { - return WEBRTC_VIDEO_CODEC_ERR_PARAMETER; - } - - int num_temporal_layers = - doing_simulcast ? inst->simulcastStream[0].numberOfTemporalLayers - : inst->VP8().numberOfTemporalLayers; - RTC_DCHECK_GT(num_temporal_layers, 0); - - SetupTemporalLayers(number_of_streams, num_temporal_layers, *inst); - - feedback_mode_ = inst->VP8().feedbackModeOn; - - number_of_cores_ = number_of_cores; - timestamp_ = 0; - codec_ = *inst; - - // Code expects simulcastStream resolutions to be correct, make sure they are - // filled even when there are no simulcast layers. - if (codec_.numberOfSimulcastStreams == 0) - { - codec_.simulcastStream[0].width = codec_.width; - codec_.simulcastStream[0].height = codec_.height; - } - - picture_id_.resize(number_of_streams); - last_key_frame_picture_id_.resize(number_of_streams); - encoded_images_.resize(number_of_streams); - encoders_.resize(number_of_streams); - configurations_.resize(number_of_streams); - downsampling_factors_.resize(number_of_streams); - raw_images_.resize(number_of_streams); - send_stream_.resize(number_of_streams); - send_stream_[0] = true; // For non-simulcast case. - cpu_speed_.resize(number_of_streams); - std::fill(key_frame_request_.begin(), key_frame_request_.end(), false); - - int idx = number_of_streams - 1; - for (int i = 0; i < (number_of_streams - 1); ++i, --idx) - { - int gcd = GCD(inst->simulcastStream[idx].width, - inst->simulcastStream[idx - 1].width); - downsampling_factors_[i].num = inst->simulcastStream[idx].width / gcd; - downsampling_factors_[i].den = inst->simulcastStream[idx - 1].width / gcd; - send_stream_[i] = false; - } - if (number_of_streams > 1) - { - send_stream_[number_of_streams - 1] = false; - downsampling_factors_[number_of_streams - 1].num = 1; - downsampling_factors_[number_of_streams - 1].den = 1; - } - for (int i = 0; i < number_of_streams; ++i) - { - // Random start, 16 bits is enough. - picture_id_[i] = static_cast(rand()) & 0x7FFF; // NOLINT - last_key_frame_picture_id_[i] = -1; - // allocate memory for encoded image - if (encoded_images_[i]._buffer != NULL) - { - delete[] encoded_images_[i]._buffer; - } - encoded_images_[i]._size = - CalcBufferSize(kI420, codec_.width, codec_.height); - encoded_images_[i]._buffer = new uint8_t[encoded_images_[i]._size]; - encoded_images_[i]._completeFrame = true; - } - // populate encoder configuration with default values - if (vpx_codec_enc_config_default(vpx_codec_vp8_cx(), &configurations_[0], - 0)) - { - return WEBRTC_VIDEO_CODEC_ERROR; - } - // setting the time base of the codec - configurations_[0].g_timebase.num = 1; - configurations_[0].g_timebase.den = 90000; - configurations_[0].g_lag_in_frames = 0; // 0- no frame lagging - - // Set the error resilience mode according to user settings. - switch (inst->VP8().resilience) - { - case kResilienceOff: - configurations_[0].g_error_resilient = 0; - break; - case kResilientStream: - configurations_[0].g_error_resilient = 1; // TODO(holmer): Replace with - // VPX_ERROR_RESILIENT_DEFAULT when we - // drop support for libvpx 9.6.0. - break; - case kResilientFrames: - return WEBRTC_VIDEO_CODEC_ERR_PARAMETER; // Not supported - } - - // rate control settings - configurations_[0].rc_dropframe_thresh = inst->VP8().frameDroppingOn ? 30 : 0; - configurations_[0].rc_end_usage = VPX_CBR; - configurations_[0].g_pass = VPX_RC_ONE_PASS; - // TODO(hellner): investigate why the following two lines produce - // automaticResizeOn value of 3 when running - // WebRtcVideoMediaChannelTest.GetStatsMultipleSendStreams inside the talk - // framework. - // configurations_[0].rc_resize_allowed = - // inst->codecSpecific.VP8.automaticResizeOn ? 1 : 0; - configurations_[0].rc_resize_allowed = 0; - // Handle resizing outside of libvpx when doing single-stream. - if (inst->VP8().automaticResizeOn && number_of_streams > 1) - { - configurations_[0].rc_resize_allowed = 1; - } - configurations_[0].rc_min_quantizer = 2; - if (inst->qpMax >= configurations_[0].rc_min_quantizer) - { - qp_max_ = inst->qpMax; - } - configurations_[0].rc_max_quantizer = qp_max_; - configurations_[0].rc_undershoot_pct = 100; - configurations_[0].rc_overshoot_pct = 15; - configurations_[0].rc_buf_initial_sz = 500; - configurations_[0].rc_buf_optimal_sz = 600; - configurations_[0].rc_buf_sz = 1000; - - // Set the maximum target size of any key-frame. - rc_max_intra_target_ = MaxIntraTarget(configurations_[0].rc_buf_optimal_sz); - - if (feedback_mode_) - { - // Disable periodic key frames if we get feedback from the decoder - // through SLI and RPSI. - configurations_[0].kf_mode = VPX_KF_DISABLED; - } - else if (inst->VP8().keyFrameInterval > 0) - { - configurations_[0].kf_mode = VPX_KF_AUTO; - configurations_[0].kf_max_dist = inst->VP8().keyFrameInterval; - } - else - { - configurations_[0].kf_mode = VPX_KF_DISABLED; - } - - // Allow the user to set the complexity for the base stream. - switch (inst->VP8().complexity) - { - case kComplexityHigh: - cpu_speed_[0] = -5; - break; - case kComplexityHigher: - cpu_speed_[0] = -4; - break; - case kComplexityMax: - cpu_speed_[0] = -3; - break; - default: - cpu_speed_[0] = -6; - break; - } - cpu_speed_default_ = cpu_speed_[0]; - // Set encoding complexity (cpu_speed) based on resolution and/or platform. - cpu_speed_[0] = SetCpuSpeed(inst->width, inst->height); - for (int i = 1; i < number_of_streams; ++i) - { - cpu_speed_[i] = - SetCpuSpeed(inst->simulcastStream[number_of_streams - 1 - i].width, - inst->simulcastStream[number_of_streams - 1 - i].height); - } - configurations_[0].g_w = inst->width; - configurations_[0].g_h = inst->height; - - // Determine number of threads based on the image size and #cores. - // TODO(fbarchard): Consider number of Simulcast layers. - configurations_[0].g_threads = NumberOfThreads( - configurations_[0].g_w, configurations_[0].g_h, number_of_cores); - - // Creating a wrapper to the image - setting image data to NULL. - // Actual pointer will be set in encode. Setting align to 1, as it - // is meaningless (no memory allocation is done here). - vpx_img_wrap(&raw_images_[0], VPX_IMG_FMT_I420, inst->width, inst->height, 1, - NULL); - - // Note the order we use is different from webm, we have lowest resolution - // at position 0 and they have highest resolution at position 0. - int stream_idx = encoders_.size() - 1; - SimulcastRateAllocator init_allocator(codec_, nullptr); - BitrateAllocation allocation = init_allocator.GetAllocation( - inst->startBitrate * 1000, inst->maxFramerate); - std::vector stream_bitrates; - for (int i = 0; i == 0 || i < inst->numberOfSimulcastStreams; ++i) - { - uint32_t bitrate = allocation.GetSpatialLayerSum(i) / 1000; - stream_bitrates.push_back(bitrate); - } - - configurations_[0].rc_target_bitrate = stream_bitrates[stream_idx]; - temporal_layers_[stream_idx]->OnRatesUpdated( - stream_bitrates[stream_idx], inst->maxBitrate, inst->maxFramerate); - temporal_layers_[stream_idx]->UpdateConfiguration(&configurations_[0]); - --stream_idx; - for (size_t i = 1; i < encoders_.size(); ++i, --stream_idx) - { - memcpy(&configurations_[i], &configurations_[0], - sizeof(configurations_[0])); - - configurations_[i].g_w = inst->simulcastStream[stream_idx].width; - configurations_[i].g_h = inst->simulcastStream[stream_idx].height; - - // Use 1 thread for lower resolutions. - configurations_[i].g_threads = 1; - - // Setting alignment to 32 - as that ensures at least 16 for all - // planes (32 for Y, 16 for U,V). Libvpx sets the requested stride for - // the y plane, but only half of it to the u and v planes. - vpx_img_alloc(&raw_images_[i], VPX_IMG_FMT_I420, - inst->simulcastStream[stream_idx].width, - inst->simulcastStream[stream_idx].height, kVp832ByteAlign); - SetStreamState(stream_bitrates[stream_idx] > 0, stream_idx); - configurations_[i].rc_target_bitrate = stream_bitrates[stream_idx]; - temporal_layers_[stream_idx]->OnRatesUpdated( - stream_bitrates[stream_idx], inst->maxBitrate, inst->maxFramerate); - temporal_layers_[stream_idx]->UpdateConfiguration(&configurations_[i]); - } - - rps_.Init(); - - return InitAndSetControlSettings(); - } - - int VP8EncoderImpl::SetCpuSpeed(int width, int height) - { -#if defined(WEBRTC_ARCH_ARM) || defined(WEBRTC_ARCH_ARM64) || defined(ANDROID) - // On mobile platform, use a lower speed setting for lower resolutions for - // CPUs with 4 or more cores. - RTC_DCHECK_GT(number_of_cores_, 0); - if (number_of_cores_ <= 3) - return -12; - - if (width * height <= 352 * 288) - return -8; - else if (width * height <= 640 * 480) - return -10; - else - return -12; -#else - // For non-ARM, increase encoding complexity (i.e., use lower speed setting) - // if resolution is below CIF. Otherwise, keep the default/user setting - // (|cpu_speed_default_|) set on InitEncode via VP8().complexity. - if (width * height < 352 * 288) - return (cpu_speed_default_ < -4) ? -4 : cpu_speed_default_; - else - return cpu_speed_default_; -#endif - } - - int VP8EncoderImpl::NumberOfThreads(int width, int height, int cpus) - { -#if defined(ANDROID) - if (width * height >= 320 * 180) - { - if (cpus >= 4) - { - // 3 threads for CPUs with 4 and more cores since most of times only 4 - // cores will be active. - return 3; - } - else if (cpus == 3 || cpus == 2) - { - return 2; - } - else - { - return 1; - } - } - return 1; -#else - if (width * height >= 1920 * 1080 && cpus > 8) - { - return 8; // 8 threads for 1080p on high perf machines. - } - else if (width * height > 1280 * 960 && cpus >= 6) - { - // 3 threads for 1080p. - return 3; - } - else if (width * height > 640 * 480 && cpus >= 3) - { - // 2 threads for qHD/HD. - return 2; - } - else - { - // 1 thread for VGA or less. - return 1; - } -#endif - } - - int VP8EncoderImpl::InitAndSetControlSettings() - { - vpx_codec_flags_t flags = 0; - flags |= VPX_CODEC_USE_OUTPUT_PARTITION; - - if (encoders_.size() > 1) - { - int error = vpx_codec_enc_init_multi(&encoders_[0], vpx_codec_vp8_cx(), - &configurations_[0], encoders_.size(), - flags, &downsampling_factors_[0]); - if (error) - { - return WEBRTC_VIDEO_CODEC_UNINITIALIZED; - } - } - else - { - if (vpx_codec_enc_init(&encoders_[0], vpx_codec_vp8_cx(), - &configurations_[0], flags)) - { - return WEBRTC_VIDEO_CODEC_UNINITIALIZED; - } - } - // Enable denoising for the highest resolution stream, and for - // the second highest resolution if we are doing more than 2 - // spatial layers/streams. - // TODO(holmer): Investigate possibility of adding a libvpx API - // for getting the denoised frame from the encoder and using that - // when encoding lower resolution streams. Would it work with the - // multi-res encoding feature? - denoiserState denoiser_state = kDenoiserOnYOnly; -#if defined(WEBRTC_ARCH_ARM) || defined(WEBRTC_ARCH_ARM64) || defined(ANDROID) - denoiser_state = kDenoiserOnYOnly; -#else - denoiser_state = kDenoiserOnAdaptive; -#endif - vpx_codec_control(&encoders_[0], VP8E_SET_NOISE_SENSITIVITY, - codec_.VP8()->denoisingOn ? denoiser_state : kDenoiserOff); - if (encoders_.size() > 2) - { - vpx_codec_control( - &encoders_[1], VP8E_SET_NOISE_SENSITIVITY, - codec_.VP8()->denoisingOn ? denoiser_state : kDenoiserOff); - } - for (size_t i = 0; i < encoders_.size(); ++i) - { - // Allow more screen content to be detected as static. - vpx_codec_control(&(encoders_[i]), VP8E_SET_STATIC_THRESHOLD, - codec_.mode == kScreensharing ? 300 : 1); - vpx_codec_control(&(encoders_[i]), VP8E_SET_CPUUSED, cpu_speed_[i]); - vpx_codec_control(&(encoders_[i]), VP8E_SET_TOKEN_PARTITIONS, - static_cast(token_partitions_)); - vpx_codec_control(&(encoders_[i]), VP8E_SET_MAX_INTRA_BITRATE_PCT, - rc_max_intra_target_); - // VP8E_SET_SCREEN_CONTENT_MODE 2 = screen content with more aggressive - // rate control (drop frames on large target bitrate overshoot) - vpx_codec_control(&(encoders_[i]), VP8E_SET_SCREEN_CONTENT_MODE, - codec_.mode == kScreensharing ? 2 : 0); - } - inited_ = true; - return WEBRTC_VIDEO_CODEC_OK; - } - - uint32_t VP8EncoderImpl::MaxIntraTarget(uint32_t optimalBuffersize) - { - // Set max to the optimal buffer level (normalized by target BR), - // and scaled by a scalePar. - // Max target size = scalePar * optimalBufferSize * targetBR[Kbps]. - // This values is presented in percentage of perFrameBw: - // perFrameBw = targetBR[Kbps] * 1000 / frameRate. - // The target in % is as follows: - - float scalePar = 0.5; - uint32_t targetPct = optimalBuffersize * scalePar * codec_.maxFramerate / 10; - - // Don't go below 3 times the per frame bandwidth. - const uint32_t minIntraTh = 300; - return (targetPct < minIntraTh) ? minIntraTh : targetPct; - } - - int VP8EncoderImpl::Encode(const VideoFrame& frame, - const CodecSpecificInfo* codec_specific_info, - const std::vector* frame_types) - { - RTC_DCHECK_EQ(frame.width(), codec_.width); - RTC_DCHECK_EQ(frame.height(), codec_.height); - - if (!inited_) - return WEBRTC_VIDEO_CODEC_UNINITIALIZED; - if (encoded_complete_callback_ == NULL) - return WEBRTC_VIDEO_CODEC_UNINITIALIZED; - - rtc::scoped_refptr input_image = frame.video_frame_buffer(); - // Since we are extracting raw pointers from |input_image| to - // |raw_images_[0]|, the resolution of these frames must match. Note that - // |input_image| might be scaled from |frame|. In that case, the resolution of - // |raw_images_[0]| should have been updated in UpdateCodecFrameSize. - RTC_DCHECK_EQ(input_image->width(), raw_images_[0].d_w); - RTC_DCHECK_EQ(input_image->height(), raw_images_[0].d_h); - - // Image in vpx_image_t format. - // Input image is const. VP8's raw image is not defined as const. - raw_images_[0].planes[VPX_PLANE_Y] = - const_cast(input_image->DataY()); - raw_images_[0].planes[VPX_PLANE_U] = - const_cast(input_image->DataU()); - raw_images_[0].planes[VPX_PLANE_V] = - const_cast(input_image->DataV()); - - raw_images_[0].stride[VPX_PLANE_Y] = input_image->StrideY(); - raw_images_[0].stride[VPX_PLANE_U] = input_image->StrideU(); - raw_images_[0].stride[VPX_PLANE_V] = input_image->StrideV(); - - for (size_t i = 1; i < encoders_.size(); ++i) - { - // Scale the image down a number of times by downsampling factor - libyuv::I420Scale( - raw_images_[i - 1].planes[VPX_PLANE_Y], - raw_images_[i - 1].stride[VPX_PLANE_Y], - raw_images_[i - 1].planes[VPX_PLANE_U], - raw_images_[i - 1].stride[VPX_PLANE_U], - raw_images_[i - 1].planes[VPX_PLANE_V], - raw_images_[i - 1].stride[VPX_PLANE_V], raw_images_[i - 1].d_w, - raw_images_[i - 1].d_h, raw_images_[i].planes[VPX_PLANE_Y], - raw_images_[i].stride[VPX_PLANE_Y], raw_images_[i].planes[VPX_PLANE_U], - raw_images_[i].stride[VPX_PLANE_U], raw_images_[i].planes[VPX_PLANE_V], - raw_images_[i].stride[VPX_PLANE_V], raw_images_[i].d_w, - raw_images_[i].d_h, libyuv::kFilterBilinear); - } - vpx_enc_frame_flags_t flags[kMaxSimulcastStreams]; - for (size_t i = 0; i < encoders_.size(); ++i) - { - int ret = temporal_layers_[i]->EncodeFlags(frame.timestamp()); - if (ret < 0) - { - // Drop this frame. - return WEBRTC_VIDEO_CODEC_OK; - } - flags[i] = ret; - } - bool send_key_frame = false; - for (size_t i = 0; i < key_frame_request_.size() && i < send_stream_.size(); - ++i) - { - if (key_frame_request_[i] && send_stream_[i]) - { - send_key_frame = true; - break; - } - } - if (!send_key_frame && frame_types) - { - for (size_t i = 0; i < frame_types->size() && i < send_stream_.size(); - ++i) - { - if ((*frame_types)[i] == kVideoFrameKey && send_stream_[i]) - { - send_key_frame = true; - break; - } - } - } - // The flag modification below (due to forced key frame, RPS, etc.,) for now - // will be the same for all encoders/spatial layers. - // TODO(marpan/holmer): Allow for key frame request to be set per encoder. - bool only_predict_from_key_frame = false; - if (send_key_frame) - { - // Adapt the size of the key frame when in screenshare with 1 temporal - // layer. - if (encoders_.size() == 1 && codec_.mode == kScreensharing && - codec_.VP8()->numberOfTemporalLayers <= 1) - { - const uint32_t forceKeyFrameIntraTh = 100; - vpx_codec_control(&(encoders_[0]), VP8E_SET_MAX_INTRA_BITRATE_PCT, - forceKeyFrameIntraTh); - } - // Key frame request from caller. - // Will update both golden and alt-ref. - for (size_t i = 0; i < encoders_.size(); ++i) - { - flags[i] = VPX_EFLAG_FORCE_KF; - } - std::fill(key_frame_request_.begin(), key_frame_request_.end(), false); - } - else if (codec_specific_info && - codec_specific_info->codecType == kVideoCodecVP8) - { - if (feedback_mode_) - { - // Handle RPSI and SLI messages and set up the appropriate encode flags. - bool sendRefresh = false; - if (codec_specific_info->codecSpecific.VP8.hasReceivedRPSI) - { - rps_.ReceivedRPSI(codec_specific_info->codecSpecific.VP8.pictureIdRPSI); - } - if (codec_specific_info->codecSpecific.VP8.hasReceivedSLI) - { - sendRefresh = rps_.ReceivedSLI(frame.timestamp()); - } - for (size_t i = 0; i < encoders_.size(); ++i) - { - flags[i] = rps_.EncodeFlags(picture_id_[i], sendRefresh, - frame.timestamp()); - } - } - else - { - if (codec_specific_info->codecSpecific.VP8.hasReceivedRPSI) - { - // Is this our last key frame? If not ignore. - // |picture_id_| is defined per spatial stream/layer, so check that - // |RPSI| matches the last key frame from any of the spatial streams. - // If so, then all spatial streams for this encoding will predict from - // its long-term reference (last key frame). - int RPSI = codec_specific_info->codecSpecific.VP8.pictureIdRPSI; - for (size_t i = 0; i < encoders_.size(); ++i) - { - if (last_key_frame_picture_id_[i] == RPSI) - { - // Request for a long term reference frame. - // Note 1: overwrites any temporal settings. - // Note 2: VP8_EFLAG_NO_UPD_ENTROPY is not needed as that flag is - // set by error_resilient mode. - for (size_t j = 0; j < encoders_.size(); ++j) - { - flags[j] = VP8_EFLAG_NO_UPD_ARF; - flags[j] |= VP8_EFLAG_NO_REF_GF; - flags[j] |= VP8_EFLAG_NO_REF_LAST; - } - only_predict_from_key_frame = true; - break; - } - } - } - } - } - // Set the encoder frame flags and temporal layer_id for each spatial stream. - // Note that |temporal_layers_| are defined starting from lowest resolution at - // position 0 to highest resolution at position |encoders_.size() - 1|, - // whereas |encoder_| is from highest to lowest resolution. - size_t stream_idx = encoders_.size() - 1; - for (size_t i = 0; i < encoders_.size(); ++i, --stream_idx) - { - // Allow the layers adapter to temporarily modify the configuration. This - // change isn't stored in configurations_ so change will be discarded at - // the next update. - vpx_codec_enc_cfg_t temp_config; - memcpy(&temp_config, &configurations_[i], sizeof(vpx_codec_enc_cfg_t)); - if (temporal_layers_[stream_idx]->UpdateConfiguration(&temp_config)) - { - if (vpx_codec_enc_config_set(&encoders_[i], &temp_config)) - return WEBRTC_VIDEO_CODEC_ERROR; - } - - vpx_codec_control(&encoders_[i], VP8E_SET_FRAME_FLAGS, flags[stream_idx]); - vpx_codec_control(&encoders_[i], VP8E_SET_TEMPORAL_LAYER_ID, - temporal_layers_[stream_idx]->CurrentLayerId()); - } - // TODO(holmer): Ideally the duration should be the timestamp diff of this - // frame and the next frame to be encoded, which we don't have. Instead we - // would like to use the duration of the previous frame. Unfortunately the - // rate control seems to be off with that setup. Using the average input - // frame rate to calculate an average duration for now. - assert(codec_.maxFramerate > 0); - uint32_t duration = 90000 / codec_.maxFramerate; - - // Note we must pass 0 for |flags| field in encode call below since they are - // set above in |vpx_codec_control| function for each encoder/spatial layer. - int error = vpx_codec_encode(&encoders_[0], &raw_images_[0], timestamp_, - duration, 0, VPX_DL_REALTIME); - // Reset specific intra frame thresholds, following the key frame. - if (send_key_frame) - { - vpx_codec_control(&(encoders_[0]), VP8E_SET_MAX_INTRA_BITRATE_PCT, - rc_max_intra_target_); - } - if (error) - return WEBRTC_VIDEO_CODEC_ERROR; - timestamp_ += duration; - // Examines frame timestamps only. - return GetEncodedPartitions(frame, only_predict_from_key_frame); - } - - // TODO(pbos): Make sure this works for properly for >1 encoders. - int VP8EncoderImpl::UpdateCodecFrameSize(int width, int height) - { - codec_.width = width; - codec_.height = height; - if (codec_.numberOfSimulcastStreams <= 1) - { - // For now scaling is only used for single-layer streams. - codec_.simulcastStream[0].width = width; - codec_.simulcastStream[0].height = height; - } - // Update the cpu_speed setting for resolution change. - vpx_codec_control(&(encoders_[0]), VP8E_SET_CPUUSED, - SetCpuSpeed(codec_.width, codec_.height)); - raw_images_[0].w = codec_.width; - raw_images_[0].h = codec_.height; - raw_images_[0].d_w = codec_.width; - raw_images_[0].d_h = codec_.height; - vpx_img_set_rect(&raw_images_[0], 0, 0, codec_.width, codec_.height); - - // Update encoder context for new frame size. - // Change of frame size will automatically trigger a key frame. - configurations_[0].g_w = codec_.width; - configurations_[0].g_h = codec_.height; - if (vpx_codec_enc_config_set(&encoders_[0], &configurations_[0])) - { - return WEBRTC_VIDEO_CODEC_ERROR; - } - return WEBRTC_VIDEO_CODEC_OK; - } - - void VP8EncoderImpl::PopulateCodecSpecific( - CodecSpecificInfo* codec_specific, - const vpx_codec_cx_pkt_t& pkt, - int stream_idx, - uint32_t timestamp, - bool only_predicting_from_key_frame) - { - assert(codec_specific != NULL); - codec_specific->codecType = kVideoCodecVP8; - codec_specific->codec_name = ImplementationName(); - CodecSpecificInfoVP8* vp8Info = &(codec_specific->codecSpecific.VP8); - vp8Info->pictureId = picture_id_[stream_idx]; - if (pkt.data.frame.flags & VPX_FRAME_IS_KEY) - { - last_key_frame_picture_id_[stream_idx] = picture_id_[stream_idx]; - } - vp8Info->simulcastIdx = stream_idx; - vp8Info->keyIdx = kNoKeyIdx; // TODO(hlundin) populate this - vp8Info->nonReference = - (pkt.data.frame.flags & VPX_FRAME_IS_DROPPABLE) ? true : false; - bool base_layer_sync_point = (pkt.data.frame.flags & VPX_FRAME_IS_KEY) || - only_predicting_from_key_frame; - temporal_layers_[stream_idx]->PopulateCodecSpecific(base_layer_sync_point, - vp8Info, timestamp); - // Prepare next. - picture_id_[stream_idx] = (picture_id_[stream_idx] + 1) & 0x7FFF; - } - - int VP8EncoderImpl::GetEncodedPartitions(const VideoFrame& input_image, - bool only_predicting_from_key_frame) - { - int bw_resolutions_disabled = - (encoders_.size() > 1) ? NumStreamsDisabled(send_stream_) : -1; - - int stream_idx = static_cast(encoders_.size()) - 1; - int result = WEBRTC_VIDEO_CODEC_OK; - for (size_t encoder_idx = 0; encoder_idx < encoders_.size(); - ++encoder_idx, --stream_idx) - { - vpx_codec_iter_t iter = NULL; - int part_idx = 0; - encoded_images_[encoder_idx]._length = 0; - encoded_images_[encoder_idx]._frameType = kVideoFrameDelta; - RTPFragmentationHeader frag_info; - // token_partitions_ is number of bits used. - frag_info.VerifyAndAllocateFragmentationHeader((1 << token_partitions_) + - 1); - CodecSpecificInfo codec_specific; - const vpx_codec_cx_pkt_t* pkt = NULL; - while ((pkt = vpx_codec_get_cx_data(&encoders_[encoder_idx], &iter)) != - NULL) - { - switch (pkt->kind) - { - case VPX_CODEC_CX_FRAME_PKT: - { - size_t length = encoded_images_[encoder_idx]._length; - if (pkt->data.frame.sz + length > - encoded_images_[encoder_idx]._size) - { - uint8_t* buffer = new uint8_t[pkt->data.frame.sz + length]; - memcpy(buffer, encoded_images_[encoder_idx]._buffer, length); - delete[] encoded_images_[encoder_idx]._buffer; - encoded_images_[encoder_idx]._buffer = buffer; - encoded_images_[encoder_idx]._size = pkt->data.frame.sz + length; - } - memcpy(&encoded_images_[encoder_idx]._buffer[length], - pkt->data.frame.buf, pkt->data.frame.sz); - frag_info.fragmentationOffset[part_idx] = length; - frag_info.fragmentationLength[part_idx] = pkt->data.frame.sz; - frag_info.fragmentationPlType[part_idx] = 0; // not known here - frag_info.fragmentationTimeDiff[part_idx] = 0; - encoded_images_[encoder_idx]._length += pkt->data.frame.sz; - assert(length <= encoded_images_[encoder_idx]._size); - ++part_idx; - break; - } - default: - break; - } - // End of frame - if ((pkt->data.frame.flags & VPX_FRAME_IS_FRAGMENT) == 0) - { - //_EncodeInternal(encoded_images_[encoder_idx]._buffer, encoded_images_[encoder_idx]._length); - - // check if encoded frame is a key frame - if (pkt->data.frame.flags & VPX_FRAME_IS_KEY) - { - encoded_images_[encoder_idx]._frameType = kVideoFrameKey; - rps_.EncodedKeyFrame(picture_id_[stream_idx]); - } - PopulateCodecSpecific(&codec_specific, *pkt, stream_idx, - input_image.timestamp(), - only_predicting_from_key_frame); - break; - } - } - encoded_images_[encoder_idx]._timeStamp = input_image.timestamp(); - encoded_images_[encoder_idx].capture_time_ms_ = - input_image.render_time_ms(); - encoded_images_[encoder_idx].rotation_ = input_image.rotation(); - - int qp = -1; - vpx_codec_control(&encoders_[encoder_idx], VP8E_GET_LAST_QUANTIZER_64, &qp); - temporal_layers_[stream_idx]->FrameEncoded( - encoded_images_[encoder_idx]._length, - encoded_images_[encoder_idx]._timeStamp, qp); - if (send_stream_[stream_idx]) - { - if (encoded_images_[encoder_idx]._length > 0) - { - TRACE_COUNTER_ID1("webrtc", "EncodedFrameSize", encoder_idx, - encoded_images_[encoder_idx]._length); - encoded_images_[encoder_idx]._encodedHeight = - codec_.simulcastStream[stream_idx].height; - encoded_images_[encoder_idx]._encodedWidth = - codec_.simulcastStream[stream_idx].width; - // Report once per frame (lowest stream always sent). - encoded_images_[encoder_idx].adapt_reason_.bw_resolutions_disabled = - (stream_idx == 0) ? bw_resolutions_disabled : -1; - int qp_128 = -1; - vpx_codec_control(&encoders_[encoder_idx], VP8E_GET_LAST_QUANTIZER, - &qp_128); - encoded_images_[encoder_idx].qp_ = qp_128; - encoded_complete_callback_->OnEncodedImage(encoded_images_[encoder_idx], - &codec_specific, &frag_info); - } - else if (codec_.mode == kScreensharing) - { - result = WEBRTC_VIDEO_CODEC_TARGET_BITRATE_OVERSHOOT; - } - } - } - return result; - } - - VideoEncoder::ScalingSettings VP8EncoderImpl::GetScalingSettings() const - { - const bool enable_scaling = encoders_.size() == 1 && - configurations_[0].rc_dropframe_thresh > 0 && - codec_.VP8().automaticResizeOn; - - return VideoEncoder::ScalingSettings(enable_scaling && Native::CFG_quality_scaler_enabled_); - } - - int VP8EncoderImpl::SetChannelParameters(uint32_t packetLoss, int64_t rtt) - { - rps_.SetRtt(rtt); - return WEBRTC_VIDEO_CODEC_OK; - } - - int VP8EncoderImpl::RegisterEncodeCompleteCallback( - EncodedImageCallback* callback) - { - encoded_complete_callback_ = callback; - return WEBRTC_VIDEO_CODEC_OK; - } - - VP8DecoderImpl::VP8DecoderImpl() - : buffer_pool_(false, 300 /* max_number_of_buffers*/), - decode_complete_callback_(NULL), - inited_(false), - feedback_mode_(false), - decoder_(NULL), - image_format_(VPX_IMG_FMT_NONE), - ref_frame_(NULL), - propagation_cnt_(-1), - last_frame_width_(0), - last_frame_height_(0), - key_frame_required_(true) - { - } - - VP8DecoderImpl::~VP8DecoderImpl() - { - inited_ = true; // in order to do the actual release - Release(); - } - - int VP8DecoderImpl::InitDecode(const VideoCodec* inst, int number_of_cores) - { - int ret_val = Release(); - if (ret_val < 0) - { - return ret_val; - } - if (decoder_ == NULL) - { - decoder_ = new vpx_codec_ctx_t; - memset(decoder_, 0, sizeof(*decoder_)); - } - if (inst && inst->codecType == kVideoCodecVP8) - { - feedback_mode_ = inst->VP8().feedbackModeOn; - } - vpx_codec_dec_cfg_t cfg; - // Setting number of threads to a constant value (1) - cfg.threads = 1; - cfg.h = cfg.w = 0; // set after decode - - vpx_codec_flags_t flags = 0; -#if !defined(WEBRTC_ARCH_ARM) && !defined(WEBRTC_ARCH_ARM64) && \ - !defined(ANDROID) - flags = VPX_CODEC_USE_POSTPROC; -#endif - - if (vpx_codec_dec_init(decoder_, vpx_codec_vp8_dx(), &cfg, flags)) - { - delete decoder_; - decoder_ = nullptr; - return WEBRTC_VIDEO_CODEC_MEMORY; - } - - // Save VideoCodec instance for later; mainly for duplicating the decoder. - if (&codec_ != inst) - codec_ = *inst; - propagation_cnt_ = -1; - - inited_ = true; - - // Always start with a complete key frame. - key_frame_required_ = true; - return WEBRTC_VIDEO_CODEC_OK; - } - - int VP8DecoderImpl::Decode(const EncodedImage& input_image, - bool missing_frames, - const RTPFragmentationHeader* fragmentation, - const CodecSpecificInfo* codec_specific_info, - int64_t /*render_time_ms*/) - { - if (!inited_) - { - return WEBRTC_VIDEO_CODEC_UNINITIALIZED; - } - if (decode_complete_callback_ == NULL) - { - return WEBRTC_VIDEO_CODEC_UNINITIALIZED; - } - if (input_image._buffer == NULL && input_image._length > 0) - { - // Reset to avoid requesting key frames too often. - if (propagation_cnt_ > 0) - propagation_cnt_ = 0; - return WEBRTC_VIDEO_CODEC_ERR_PARAMETER; - } - -#if !defined(WEBRTC_ARCH_ARM) && !defined(WEBRTC_ARCH_ARM64) && \ - !defined(ANDROID) - vp8_postproc_cfg_t ppcfg; - // MFQE enabled to reduce key frame popping. - ppcfg.post_proc_flag = VP8_MFQE | VP8_DEBLOCK; - // For VGA resolutions and lower, enable the demacroblocker postproc. - if (last_frame_width_ * last_frame_height_ <= 640 * 360) - { - ppcfg.post_proc_flag |= VP8_DEMACROBLOCK; - } - // Strength of deblocking filter. Valid range:[0,16] - ppcfg.deblocking_level = 3; - vpx_codec_control(decoder_, VP8_SET_POSTPROC, &ppcfg); -#endif - - // Always start with a complete key frame. - if (key_frame_required_) - { - if (input_image._frameType != kVideoFrameKey) - return WEBRTC_VIDEO_CODEC_ERROR; - // We have a key frame - is it complete? - if (input_image._completeFrame) - { - key_frame_required_ = false; - } - else - { - return WEBRTC_VIDEO_CODEC_ERROR; - } - } - // Restrict error propagation using key frame requests. Disabled when - // the feedback mode is enabled (RPS). - // Reset on a key frame refresh. - if (!feedback_mode_) - { - if (input_image._frameType == kVideoFrameKey && - input_image._completeFrame) - { - propagation_cnt_ = -1; - // Start count on first loss. - } - else if ((!input_image._completeFrame || missing_frames) && - propagation_cnt_ == -1) - { - propagation_cnt_ = 0; - } - if (propagation_cnt_ >= 0) - { - propagation_cnt_++; - } - } - - vpx_codec_iter_t iter = NULL; - vpx_image_t* img; - int ret; - - // Check for missing frames. - if (missing_frames) - { - // Call decoder with zero data length to signal missing frames. - if (vpx_codec_decode(decoder_, NULL, 0, 0, VPX_DL_REALTIME)) - { - // Reset to avoid requesting key frames too often. - if (propagation_cnt_ > 0) - propagation_cnt_ = 0; - return WEBRTC_VIDEO_CODEC_ERROR; - } - img = vpx_codec_get_frame(decoder_, &iter); - iter = NULL; - } - - uint8_t* buffer = input_image._buffer; - if (input_image._length == 0) - { - buffer = NULL; // Triggers full frame concealment. - } - if (vpx_codec_decode(decoder_, buffer, input_image._length, 0, - VPX_DL_REALTIME)) - { - // Reset to avoid requesting key frames too often. - if (propagation_cnt_ > 0) - { - propagation_cnt_ = 0; - } - return WEBRTC_VIDEO_CODEC_ERROR; - } - - img = vpx_codec_get_frame(decoder_, &iter); - ret = ReturnFrame(img, input_image._timeStamp, input_image.ntp_time_ms_); - if (ret != 0) - { - // Reset to avoid requesting key frames too often. - if (ret < 0 && propagation_cnt_ > 0) - propagation_cnt_ = 0; - return ret; - } - if (feedback_mode_) - { - // Whenever we receive an incomplete key frame all reference buffers will - // be corrupt. If that happens we must request new key frames until we - // decode a complete key frame. - if (input_image._frameType == kVideoFrameKey && !input_image._completeFrame) - return WEBRTC_VIDEO_CODEC_ERROR; - // Check for reference updates and last reference buffer corruption and - // signal successful reference propagation or frame corruption to the - // encoder. - int reference_updates = 0; - if (vpx_codec_control(decoder_, VP8D_GET_LAST_REF_UPDATES, - &reference_updates)) - { - // Reset to avoid requesting key frames too often. - if (propagation_cnt_ > 0) - { - propagation_cnt_ = 0; - } - return WEBRTC_VIDEO_CODEC_ERROR; - } - int corrupted = 0; - if (vpx_codec_control(decoder_, VP8D_GET_FRAME_CORRUPTED, &corrupted)) - { - // Reset to avoid requesting key frames too often. - if (propagation_cnt_ > 0) - propagation_cnt_ = 0; - return WEBRTC_VIDEO_CODEC_ERROR; - } - int16_t picture_id = -1; - if (codec_specific_info) - { - picture_id = codec_specific_info->codecSpecific.VP8.pictureId; - } - if (picture_id > -1) - { - if (((reference_updates & VP8_GOLD_FRAME) || - (reference_updates & VP8_ALTR_FRAME)) && - !corrupted) - { - decode_complete_callback_->ReceivedDecodedReferenceFrame(picture_id); - } - decode_complete_callback_->ReceivedDecodedFrame(picture_id); - } - if (corrupted) - { - // we can decode but with artifacts - return WEBRTC_VIDEO_CODEC_REQUEST_SLI; - } - } - // Check Vs. threshold - if (propagation_cnt_ > kVp8ErrorPropagationTh) - { - // Reset to avoid requesting key frames too often. - propagation_cnt_ = 0; - return WEBRTC_VIDEO_CODEC_ERROR; - } - return WEBRTC_VIDEO_CODEC_OK; - } - - int VP8DecoderImpl::ReturnFrame(const vpx_image_t* img, - uint32_t timestamp, - int64_t ntp_time_ms) - { - if (img == NULL) - { - // Decoder OK and NULL image => No show frame - return WEBRTC_VIDEO_CODEC_NO_OUTPUT; - } - last_frame_width_ = img->d_w; - last_frame_height_ = img->d_h; - // Allocate memory for decoded image. - rtc::scoped_refptr buffer = - buffer_pool_.CreateBuffer(img->d_w, img->d_h); - if (!buffer.get()) - { - // Pool has too many pending frames. - RTC_HISTOGRAM_BOOLEAN("WebRTC.Video.VP8DecoderImpl.TooManyPendingFrames", - 1); - return WEBRTC_VIDEO_CODEC_NO_OUTPUT; - } - - libyuv::I420Copy(img->planes[VPX_PLANE_Y], img->stride[VPX_PLANE_Y], - img->planes[VPX_PLANE_U], img->stride[VPX_PLANE_U], - img->planes[VPX_PLANE_V], img->stride[VPX_PLANE_V], - buffer->MutableDataY(), buffer->StrideY(), - buffer->MutableDataU(), buffer->StrideU(), - buffer->MutableDataV(), buffer->StrideV(), - img->d_w, img->d_h); - - VideoFrame decoded_image(buffer, timestamp, 0, kVideoRotation_0); - decoded_image.set_ntp_time_ms(ntp_time_ms); - int ret = decode_complete_callback_->Decoded(decoded_image); - if (ret != 0) - return ret; - - // Remember image format for later - image_format_ = img->fmt; - return WEBRTC_VIDEO_CODEC_OK; - } - - int VP8DecoderImpl::RegisterDecodeCompleteCallback( - DecodedImageCallback* callback) - { - decode_complete_callback_ = callback; - return WEBRTC_VIDEO_CODEC_OK; - } - - int VP8DecoderImpl::Release() - { - if (decoder_ != NULL) - { - if (vpx_codec_destroy(decoder_)) - { - return WEBRTC_VIDEO_CODEC_MEMORY; - } - delete decoder_; - decoder_ = NULL; - } - if (ref_frame_ != NULL) - { - vpx_img_free(&ref_frame_->img); - delete ref_frame_; - ref_frame_ = NULL; - } - buffer_pool_.Release(); - inited_ = false; - return WEBRTC_VIDEO_CODEC_OK; - } - - const char* VP8DecoderImpl::ImplementationName() const - { - return "libvpx"; - } - - int VP8DecoderImpl::CopyReference(VP8DecoderImpl* copy) - { - // The type of frame to copy should be set in ref_frame_->frame_type - // before the call to this function. - if (vpx_codec_control(decoder_, VP8_COPY_REFERENCE, ref_frame_) != - VPX_CODEC_OK) - { - return -1; - } - if (vpx_codec_control(copy->decoder_, VP8_SET_REFERENCE, ref_frame_) != - VPX_CODEC_OK) - { - return -1; - } - return 0; - } - -} // namespace webrtc diff --git a/WebRtc.NET/src/internals/yuvframegenerator.cc b/WebRtc.NET/src/internals/yuvframegenerator.cc deleted file mode 100644 index 4ebdcbd3..00000000 --- a/WebRtc.NET/src/internals/yuvframegenerator.cc +++ /dev/null @@ -1,312 +0,0 @@ - -#include "webrtc/media/base/yuvframegenerator.h" - -#include -#include - -#include "webrtc/base/basictypes.h" -#include "webrtc/base/common.h" - -namespace cricket -{ - - // These values were figured out by trial and error. If you change any - // basic parameters e.g. unit-bar size or bars-x-offset, you may need to change - // background-width/background-height. - const int kBarcodeBackgroundWidth = 160; - const int kBarcodeBackgroundHeight = 100; - const int kBarsXOffset = 12; - const int kBarsYOffset = 4; - const int kUnitBarSize = 2; - const int kBarcodeNormalBarHeight = 80; - const int kBarcodeGuardBarHeight = 96; - const int kBarcodeMaxEncodableDigits = 7; - - YuvFrameGenerator::YuvFrameGenerator(int width, int height, - bool enable_barcode) - { - width_ = width; - height_ = height; - frame_index_ = 0; - int size = width_ * height_; - int qsize = size / 4; - frame_data_size_ = size + 2 * qsize; - y_data_ = new uint8_t[size]; - u_data_ = new uint8_t[qsize]; - v_data_ = new uint8_t[qsize]; - if (enable_barcode) - { - ASSERT(width_ >= kBarcodeBackgroundWidth); - ASSERT(height_ >= kBarcodeBackgroundHeight); - barcode_start_x_ = 0; - barcode_start_y_ = height_ - kBarcodeBackgroundHeight; - } - else - { - barcode_start_x_ = -1; - barcode_start_y_ = -1; - } - } - - YuvFrameGenerator::~YuvFrameGenerator() - { - delete y_data_; - delete u_data_; - delete v_data_; - } - - void YuvFrameGenerator::GenerateNextFrame(uint8_t* frame_buffer, - int32_t barcode_value) - { - int size = width_ * height_; - int qsize = size / 4; - memset(y_data_, 0, size); - memset(u_data_, 0, qsize); - memset(v_data_, 0, qsize); - - DrawLandscape(y_data_, width_, height_); - DrawGradientX(u_data_, width_ / 2, height_ / 2); - DrawGradientY(v_data_, width_ / 2, height_ / 2); - DrawMovingLineX(u_data_, width_ / 2, height_ / 2, frame_index_); - DrawMovingLineY(v_data_, width_ / 2, height_ / 2, frame_index_); - DrawBouncingCube(y_data_, width_, height_, frame_index_); - - if (barcode_value >= 0) - { - ASSERT(barcode_start_x_ != -1); - DrawBarcode(barcode_value); - } - - memcpy(frame_buffer, y_data_, size); - frame_buffer += size; - memcpy(frame_buffer, u_data_, qsize); - frame_buffer += qsize; - memcpy(frame_buffer, v_data_, qsize); - - frame_index_ = (frame_index_ + 1) & 0x0000FFFF; - } - - void YuvFrameGenerator::DrawLandscape(uint8_t* p, int w, int h) - { - int x, y; - for (y = 0; y < h; y++) - { - for (x = 0; x < w; x++) - { - p[x + y * w] = x % (y + 1); - if (((x > w / 2 - (w / 32)) && (x < w / 2 + (w / 32))) || - ((y > h / 2 - (h / 32)) && (y < h / 2 + (h / 32)))) - { - p[x + y * w] = (((x + y) / 8 % 2)) ? 255 : 0; - } - } - } - } - - void YuvFrameGenerator::DrawGradientX(uint8_t* p, int w, int h) - { - int x, y; - for (y = 0; y < h; y++) - { - for (x = 0; x < w; x++) - { - p[x + y * w] = (x << 8) / w; - } - } - } - - void YuvFrameGenerator::DrawGradientY(uint8_t* p, int w, int h) - { - int x, y; - for (y = 0; y < h; y++) - { - for (x = 0; x < w; x++) - { - p[x + y * w] = (y << 8) / h; - } - } - } - - void YuvFrameGenerator::DrawMovingLineX(uint8_t* p, int w, int h, int n) - { - int x, y; - x = n % (w * 2); - if (x >= w) x = w + w - x - 1; - for (y = 0; y < h; y++) - { - p[x + y * w] = 255; - } - } - - void YuvFrameGenerator::DrawMovingLineY(uint8_t* p, int w, int h, int n) - { - int x, y; - y = n % (h * 2); - if (y >= h) y = h + h - y - 1; - for (x = 0; x < w; x++) - { - p[x + y * w] = 255; - } - } - - void YuvFrameGenerator::DrawBouncingCube(uint8_t* p, int w, int h, int n) - { - int x, y, pw, ph, px, py; - pw = w / 16; - ph = h / 16; - px = n % (w * 2); - py = n % (h * 2); - if (px >= w) px = w + w - px - 1; - if (py >= h) py = h + h - py - 1; - for (y = py - ph; y < py + ph; y++) - { - if (y >= 0 && y < h) - { - for (x = px - pw; x < px + pw; x++) - { - if (x >= 0 && x < w) - { - p[x + y * w] = 255; - } - } - } - } - } - - void YuvFrameGenerator::GetBarcodeBounds(int* top, int* left, - int* width, int* height) - { - ASSERT(barcode_start_x_ != -1); - *top = barcode_start_y_; - *left = barcode_start_x_; - *width = kBarcodeBackgroundWidth; - *height = kBarcodeBackgroundHeight; - } - - static void ComputeBarcodeDigits(uint32_t value, std::stringstream* result) - { - // Serialize |value| as 7-char string, padded with 0's to the left. - result->width(kBarcodeMaxEncodableDigits); - result->fill('0'); - *result << value; - - // Compute check-digit and append to result. Steps described here: - // http://en.wikipedia.org/wiki/European_Article_Number#Calculation_of_checksum_digit - int sum = 0; - for (int pos = 1; pos <= kBarcodeMaxEncodableDigits; pos++) - { - char next_char; - result->get(next_char); - uint8_t digit = next_char - '0'; - sum += digit * (pos % 2 ? 3 : 1); - } - uint8_t check_digit = sum % 10; - if (check_digit != 0) - { - check_digit = 10 - check_digit; - } - - *result << static_cast(check_digit); - result->seekg(0); - } - - void YuvFrameGenerator::DrawBarcode(uint32_t value) - { - std::stringstream value_str_stream; - ComputeBarcodeDigits(value, &value_str_stream); - - // Draw white filled rectangle as background to barcode. - DrawBlockRectangle(y_data_, barcode_start_x_, barcode_start_y_, - kBarcodeBackgroundWidth, kBarcodeBackgroundHeight, - width_, 255); - DrawBlockRectangle(u_data_, barcode_start_x_ / 2, barcode_start_y_ / 2, - kBarcodeBackgroundWidth / 2, kBarcodeBackgroundHeight / 2, - width_ / 2, 128); - DrawBlockRectangle(v_data_, barcode_start_x_ / 2, barcode_start_y_ / 2, - kBarcodeBackgroundWidth / 2, kBarcodeBackgroundHeight / 2, - width_ / 2, 128); - - // Scan through chars (digits) and draw black bars. - int x = barcode_start_x_ + kBarsXOffset; - int y = barcode_start_y_ + kBarsYOffset; - int pos = 0; - x = DrawSideGuardBars(x, y, kBarcodeGuardBarHeight); - while (true) - { - char next_char; - value_str_stream.get(next_char); - if (!value_str_stream.good()) - { - break; - } - if (pos++ == 4) - { - x = DrawMiddleGuardBars(x, y, kBarcodeGuardBarHeight); - } - uint8_t digit = next_char - '0'; - x = DrawEanEncodedDigit(digit, x, y, kBarcodeNormalBarHeight, pos > 4); - } - x = DrawSideGuardBars(x, y, kBarcodeGuardBarHeight); - } - - int YuvFrameGenerator::DrawMiddleGuardBars(int x, int y, int height) - { - x += kUnitBarSize; - DrawBlockRectangle(y_data_, x, y, kUnitBarSize, height, width_, 0); - x += (kUnitBarSize * 2); - DrawBlockRectangle(y_data_, x, y, kUnitBarSize, height, width_, 0); - return x + (kUnitBarSize * 2); - } - - int YuvFrameGenerator::DrawSideGuardBars(int x, int y, int height) - { - DrawBlockRectangle(y_data_, x, y, kUnitBarSize, height, width_, 0); - x += (kUnitBarSize * 2); - DrawBlockRectangle(y_data_, x, y, kUnitBarSize, height, width_, 0); - return x + kUnitBarSize; - } - - // For each digit: 0-9, |kEanEncodings| contains a bit-mask indicating - // which bars are black (1) and which are blank (0). These are for the L-code - // only. R-code values are bitwise negation of these. Reference: - // http://en.wikipedia.org/wiki/European_Article_Number#Binary_encoding_of_data_digits_into_EAN-13_barcode // NOLINT - const uint8_t kEanEncodings[] = { 13, 25, 19, 61, 35, 49, 47, 59, 55, 11 }; - - int YuvFrameGenerator::DrawEanEncodedDigit(int digit, int x, int y, - int height, bool flip) - { - uint8_t ean_encoding = kEanEncodings[digit]; - if (flip) - { - ean_encoding = ~ean_encoding; - } - uint8_t mask = 0x40; - for (int i = 6; i >= 0; i--, mask >>= 1) - { - if (ean_encoding & mask) - { - DrawBlockRectangle(y_data_, x, y, kUnitBarSize, height, width_, 0); - } - x += kUnitBarSize; - } - return x; - } - - void YuvFrameGenerator::DrawBlockRectangle(uint8_t* p, - int x_start, - int y_start, - int width, - int height, - int pitch, - uint8_t value) - { - for (int x = x_start; x < x_start + width; x++) - { - for (int y = y_start; y < y_start + height; y++) - { - p[x + y * pitch] = value; - } - } - } - -} // namespace cricket \ No newline at end of file diff --git a/WebRtc.NET/src/main.cc b/WebRtc.NET/src/main.cc deleted file mode 100644 index 6f828e4c..00000000 --- a/WebRtc.NET/src/main.cc +++ /dev/null @@ -1,219 +0,0 @@ - -#pragma comment(lib,"crypt32.lib") -#pragma comment(lib,"iphlpapi.lib") -#pragma comment(lib,"secur32.lib") -#pragma comment(lib,"winmm.lib") -#pragma comment(lib,"dmoguids.lib") -#pragma comment(lib,"wmcodecdspuuid.lib") -#pragma comment(lib,"amstrmid.lib") -#pragma comment(lib,"msdmo.lib") -#pragma comment(lib,"Strmiids.lib") - -// common -#pragma comment(lib,"wininet.lib") -#pragma comment(lib,"dnsapi.lib") -#pragma comment(lib,"version.lib") -#pragma comment(lib,"msimg32.lib") -#pragma comment(lib,"ws2_32.lib") -#pragma comment(lib,"usp10.lib") -#pragma comment(lib,"psapi.lib") -#pragma comment(lib,"dbghelp.lib") -#pragma comment(lib,"shlwapi.lib") -#pragma comment(lib,"kernel32.lib") -#pragma comment(lib,"gdi32.lib") -#pragma comment(lib,"winspool.lib") -#pragma comment(lib,"comdlg32.lib") -#pragma comment(lib,"advapi32.lib") -#pragma comment(lib,"shell32.lib") -#pragma comment(lib,"ole32.lib") -#pragma comment(lib,"oleaut32.lib") -#pragma comment(lib,"user32.lib") -#pragma comment(lib,"uuid.lib") -#pragma comment(lib,"odbc32.lib") -#pragma comment(lib,"odbccp32.lib") -#pragma comment(lib,"delayimp.lib") -#pragma comment(lib,"credui.lib") -#pragma comment(lib,"netapi32.lib") - -// internal -#pragma comment(lib,"liblept168.lib") -#pragma comment(lib,"turbojpeg-static.lib") - -// not generated by gn default -//#pragma comment(lib,"directshow_baseclasses.lib") -//#pragma comment(lib,"genperf_libs.lib") -//#pragma comment(lib,"openmax_dl.lib") -//#pragma comment(lib,"paced_sender.lib") -//#pragma comment(lib,"video_capture_module_internal_impl.lib") -//#pragma comment(lib,"webrtc.lib") -//#pragma comment(lib,"webrtc_utility.lib") -//#pragma comment(lib,"webrtc_video_coding.lib") -//#pragma comment(lib,"audio_coding_module.lib") -//#pragma comment(lib,"usrsctplib.lib") - -// optional -//#pragma comment(lib,"protoc_lib.lib") -//#pragma comment(lib,"yasm_utils.lib") -//#pragma comment(lib,"expat.lib") -//#pragma comment(lib,"jsoncpp.lib") - -// unknown -#pragma comment(lib,"builtin_audio_decoder_factory.lib") -#pragma comment(lib,"field_trial_default.lib") -#pragma comment(lib,"metrics_default.lib") -#pragma comment(lib,"neteq.lib") -#pragma comment(lib,"opus.lib") -#pragma comment(lib,"red.lib") -#pragma comment(lib,"rent_a_codec.lib") -#pragma comment(lib,"level_indicator.lib") -#pragma comment(lib,"cng.lib") -#pragma comment(lib,"ana_config_proto.lib") -#pragma comment(lib,"ana_debug_dump_proto.lib") - -#pragma comment(lib,"g711.lib") -#pragma comment(lib,"g711_c.lib") -#pragma comment(lib,"g722.lib") -#pragma comment(lib,"g722_c.lib") -#pragma comment(lib,"ilbc.lib") -#pragma comment(lib,"ilbc_c.lib") -#pragma comment(lib,"isac.lib") -#pragma comment(lib,"isac_c.lib") -#pragma comment(lib,"isac_common.lib") -#pragma comment(lib,"isac_fix.lib") -#pragma comment(lib,"isac_fix_c.lib") -#pragma comment(lib,"pcm16b.lib") -#pragma comment(lib,"pcm16b_c.lib") - -// etc -#pragma comment(lib,"protobuf_lite.lib") -#pragma comment(lib,"winsdk_samples.lib") -#pragma comment(lib,"dl.lib") -#pragma comment(lib,"simd.lib") -//#pragma comment(lib,"simd_asm.lib") -#pragma comment(lib,"file_player.lib") -#pragma comment(lib,"file_recorder.lib") - -#pragma comment(lib,"rtc_base.lib") -#pragma comment(lib,"rtc_base_approved.lib") -#pragma comment(lib,"rtc_event_log_impl.lib") //old -#pragma comment(lib,"rtc_event_log_proto.lib") -#pragma comment(lib,"rtc_media.lib") -#pragma comment(lib,"rtc_p2p.lib") -#pragma comment(lib,"rtc_pc.lib") -//#pragma comment(lib,"rtc_xmllite.lib")//old -//#pragma comment(lib,"rtc_xmpp.lib")//old -#pragma comment(lib,"rtp_rtcp.lib") -#pragma comment(lib,"rtc_task_queue.lib") -#pragma comment(lib,"rtc_stats.lib") -//#pragma comment(lib,"rtc_analytics.lib")//old -#pragma comment(lib,"rtc_media_base.lib") -#pragma comment(lib,"rtc_numerics.lib") - -#pragma comment(lib,"audio.lib") -#pragma comment(lib,"audio_coding.lib") -#pragma comment(lib,"audio_conference_mixer.lib") -#pragma comment(lib,"audio_format.lib") -#pragma comment(lib,"audio_format_conversion.lib") -#pragma comment(lib,"audio_network_adaptor.lib") -#pragma comment(lib,"audio_decoder_interface.lib") -#pragma comment(lib,"audio_device.lib") -#pragma comment(lib,"audio_encoder_interface.lib") -#pragma comment(lib,"audio_processing.lib") -#pragma comment(lib,"audio_processing_c.lib") -#pragma comment(lib,"audio_processing_sse2.lib") -#pragma comment(lib,"audioproc_debug_proto.lib") -#pragma comment(lib,"audio_coder.lib") -#pragma comment(lib,"audio_frame_operations.lib") -#pragma comment(lib,"audio_mixer_impl.lib") -#pragma comment(lib,"audio_frame_manipulator.lib") - -#pragma comment(lib,"video.lib") -#pragma comment(lib,"video_capture_internal_impl.lib") -#pragma comment(lib,"video_coding.lib") -#pragma comment(lib,"video_capture_module.lib") -#pragma comment(lib,"video_coding_utility.lib") -#pragma comment(lib,"video_processing.lib") -#pragma comment(lib,"video_processing_sse2.lib") -#pragma comment(lib,"video_frame_api.lib") - -#pragma comment(lib,"webrtc_common.lib") -#pragma comment(lib,"webrtc_h264.lib") -#pragma comment(lib,"webrtc_i420.lib") -#pragma comment(lib,"webrtc_opus.lib") -#pragma comment(lib,"webrtc_opus_c.lib") -#pragma comment(lib,"webrtc_vp9.lib") - -#pragma comment(lib,"libjingle_peerconnection.lib") -#pragma comment(lib,"system_wrappers.lib") -#pragma comment(lib,"voice_engine.lib") -#pragma comment(lib,"call.lib") -#pragma comment(lib,"call_interfaces.lib") - -// modules -#pragma comment(lib,"pacing.lib") -#pragma comment(lib,"utility.lib") -#pragma comment(lib,"media_file.lib") -#pragma comment(lib,"remote_bitrate_estimator.lib") -#pragma comment(lib,"common_audio.lib") -#pragma comment(lib,"common_audio_c.lib") -#pragma comment(lib,"common_audio_sse2.lib") -#pragma comment(lib,"common_video.lib") -#pragma comment(lib,"congestion_controller.lib") -#pragma comment(lib,"bitrate_controller.lib") - -#pragma comment(lib,"boringssl.lib") -#pragma comment(lib,"boringssl_asm.lib") -#pragma comment(lib,"usrsctp.lib") -#pragma comment(lib,"libyuv.lib") -#pragma comment(lib,"libjpeg.lib") -#pragma comment(lib,"libsrtp.lib") -#pragma comment(lib,"libstunprober.lib") - -#pragma comment(lib,"libvpx.lib") -#pragma comment(lib,"libvpx_intrinsics_avx.lib") -#pragma comment(lib,"libvpx_intrinsics_avx2.lib") -#pragma comment(lib,"libvpx_intrinsics_mmx.lib") -#pragma comment(lib,"libvpx_intrinsics_sse2.lib") -#pragma comment(lib,"libvpx_intrinsics_sse4_1.lib") -#pragma comment(lib,"libvpx_intrinsics_ssse3.lib") -#pragma comment(lib,"libvpx_yasm.lib") - -//#pragma comment(lib,"webrtc_vp8.lib") // original -#pragma comment(lib,"webrtc_vp8_no_impl.lib") // for hacking vp8_impl.cc - -#include "stdafx.h" - -#if DESKTOP_CAPTURE -#pragma comment(lib,"desktop_capture.lib") -#pragma comment(lib,"desktop_capture_differ_sse2.lib") -#pragma comment(lib,"primitives.lib") -#pragma comment(lib,"dxgi.lib") -#pragma comment(lib,"d3d11.lib") -#endif - -#include "webrtc/base/ssladapter.h" -#include "webrtc/base/win32socketinit.h" -#include "webrtc/base/win32socketserver.h" - -namespace Native -{ - bool CFG_quality_scaler_enabled_ = false; - - void InitializeSSL() - { - rtc::EnsureWinsockInit(); - rtc::InitializeSSL(NULL); - } - - void CleanupSSL() - { - rtc::CleanupSSL(); - } -} - -FILE _iob[] = { *stdin, *stdout, *stderr }; - -extern "C" FILE * __cdecl __iob_func(void) -{ - return _iob; -} \ No newline at end of file diff --git a/WebRtc.NET/stdafx.cpp b/WebRtc.NET/stdafx.cpp deleted file mode 100644 index a935eaf0..00000000 --- a/WebRtc.NET/stdafx.cpp +++ /dev/null @@ -1,8 +0,0 @@ -// stdafx.cpp : source file that includes just the standard includes -// WebRtcLibDemo.pch will be the pre-compiled header -// stdafx.obj will contain the pre-compiled type information - -#include "stdafx.h" - -// TODO: reference any additional headers you need in STDAFX.H -// and not in this file diff --git a/WebRtc.NET/stdafx.h b/WebRtc.NET/stdafx.h deleted file mode 100644 index 530105e0..00000000 --- a/WebRtc.NET/stdafx.h +++ /dev/null @@ -1,25 +0,0 @@ -// stdafx.h : include file for standard system include files, -// or project specific include files that are used frequently, but -// are changed infrequently -// - -#pragma once - -#include "targetver.h" -#include "webrtc/base/win32.h" - -// C RunTime Header Files -//#include -//#include -//#include -//#include - -//#include -//#include -//#include -//#include - -// TODO: reference additional headers your program requires here - -#include "internals.h" - diff --git a/WebRtc.NET/targetver.h b/WebRtc.NET/targetver.h deleted file mode 100644 index de88166d..00000000 --- a/WebRtc.NET/targetver.h +++ /dev/null @@ -1,13 +0,0 @@ -#pragma once - -// Including SDKDDKVer.h defines the highest available Windows platform. - -// If you wish to build your application for a previous Windows platform, include WinSDKVer.h and -// set the _WIN32_WINNT macro to the platform you wish to support before including SDKDDKVer.h. - -#include -#define _WIN32_WINNT _WIN32_WINNT_WIN7 // Windows 7 or later -#include - - - diff --git a/WebRtc.NET/WebRtc.NET.vcxproj.filters b/WebRtcNative/WebRtc.NET.vcxproj.filters similarity index 84% rename from WebRtc.NET/WebRtc.NET.vcxproj.filters rename to WebRtcNative/WebRtc.NET.vcxproj.filters index cf3333bc..0cb20b8c 100644 --- a/WebRtc.NET/WebRtc.NET.vcxproj.filters +++ b/WebRtcNative/WebRtc.NET.vcxproj.filters @@ -1,72 +1,63 @@ - - - - - {4FC737F1-C7A5-4376-A066-2A32D752A2FF} - cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx - - - {93995380-89BD-4b04-88EB-625FBE52EBFB} - h;hh;hpp;hxx;hm;inl;inc;xsd - - - {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} - rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms - - - {978ab500-b617-4999-8a9d-4c1134f8528a} - - - {2d8f0fc9-d125-449b-a0a0-103d2815d93d} - - - {48379b9e-12bc-4938-bfbb-2ace3b99771d} - - - - - Header Files - - - Header Files - - - Header Files\src - - - Header Files\src - - - Header Files - - - Header Files\src - - - - - Source Files - - - Source Files\src - - - Source Files\src - - - Source Files\src - - - Source Files\src - - - Source Files\src - - - Source Files\src\internals - - - Source Files\src\internals - - + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hh;hpp;hxx;hm;inl;inc;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms + + + {978ab500-b617-4999-8a9d-4c1134f8528a} + + + {2d8f0fc9-d125-449b-a0a0-103d2815d93d} + + + {48379b9e-12bc-4938-bfbb-2ace3b99771d} + + + + + Header Files + + + Header Files + + + Header Files\src + + + Header Files\src + + + Header Files + + + + + Source Files + + + Source Files\src + + + Source Files\src + + + Source Files\src + + + Source Files\src\internals + + + Source Files\src\internals + + \ No newline at end of file diff --git a/WebRtcNative/WebRtcNative.vcxproj b/WebRtcNative/WebRtcNative.vcxproj new file mode 100644 index 00000000..9fbd5aae --- /dev/null +++ b/WebRtcNative/WebRtcNative.vcxproj @@ -0,0 +1,226 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + Debug + x64 + + + Release + x64 + + + + {A07E6CB4-0132-4EB1-9A38-C8C057884DC2} + Win32Proj + WebRtc + 8.1 + WebRtcNative + + + + DynamicLibrary + true + v141 + Unicode + + + DynamicLibrary + false + v141 + true + Unicode + + + DynamicLibrary + true + v141 + Unicode + + + DynamicLibrary + false + v141 + true + Unicode + + + + + + + + + + + + + + + + + + + + + true + $(Configuration)\ + $(Configuration)\obj\ + C:\Users\mark\Source\Repos\WebRtc.NET\WebRtcNative\include\webrtc;C:\Users\mark\Source\Repos\WebRtc.NET\WebRtcNative\include\webrtc\third_party\abseil-cpp;$(IncludePath) + C:\Users\mark\Source\Repos\WebRtc.NET\WebRtcNative\lib\x86\Debug;$(LibraryPath) + $(ProjectName)-x86 + + + true + $(Configuration)_$(Platform)\ + $(Configuration)_$(Platform)\obj\ + .dll + C:\Users\mark\Source\Repos\WebRtc.NET\WebRtcNative\include\webrtc\third_party\abseil-cpp;C:\Users\mark\Source\Repos\WebRtc.NET\WebRtcNative\include\webrtc;$(IncludePath) + C:\Users\mark\Source\Repos\WebRtc.NET\WebRtcNative\lib\x64\Debug;$(LibraryPath) + $(ProjectName)-$(Platform) + + + false + $(Configuration)\ + $(Configuration)\obj\ + $(ProjectName)-$(PlatformShortName) + C:\Users\mark\Source\Repos\WebRtc.NET\WebRtcNative\include\webrtc;C:\Users\mark\Source\Repos\WebRtc.NET\WebRtcNative\include\webrtc\third_party\abseil-cpp;$(IncludePath) + C:\Users\mark\Source\Repos\WebRtc.NET\WebRtcNative\lib\x86\Release;$(LibraryPath) + + + false + $(Configuration)_$(Platform)\ + $(Configuration)_$(Platform)\obj\ + $(ProjectName)-$(Platform) + C:\Users\mark\Source\Repos\WebRtc.NET\WebRtcNative\include\webrtc;C:\Users\mark\Source\Repos\WebRtc.NET\WebRtcNative\include\webrtc\third_party\abseil-cpp;$(IncludePath) + C:\Users\mark\Source\Repos\WebRtc.NET\WebRtcNative\lib\x64\Release;$(LibraryPath) + + + + NotUsing + Level3 + Disabled + _HAS_ITERATOR_DEBUGGING=0;_ITERATOR_DEBUG_LEVEL=0;DEBUG;_DEBUG;WIN32;_CRT_SECURE_NO_WARNINGS;UNICODE;V8_DEPRECATION_WARNINGS;_WINDOWS;NOMINMAX;PSAPI_VERSION=1;_CRT_RAND_S;CERT_CHAIN_PARA_HAS_EXTRA_FIELDS;WIN32_LEAN_AND_MEAN;_ATL_NO_OPENGL;_SECURE_ATL;_HAS_EXCEPTIONS=0;_WINSOCK_DEPRECATED_NO_WARNINGS;CHROMIUM_BUILD;CR_CLANG_REVISION=274369-1;COMPONENT_BUILD;USE_AURA=1;USE_DEFAULT_RENDER_THEME=1;USE_LIBJPEG_TURBO=1;ENABLE_WEBRTC=1;ENABLE_MEDIA_ROUTER=1;ENABLE_PEPPER_CDMS;ENABLE_NOTIFICATIONS;FIELDTRIAL_TESTING_ENABLED;NO_TCMALLOC;__STD_C;_CRT_SECURE_NO_DEPRECATE;_SCL_SECURE_NO_DEPRECATE;NTDDI_VERSION=0x0A000000;_USING_V110_SDK71_;ENABLE_TASK_MANAGER=1;ENABLE_EXTENSIONS=1;ENABLE_PDF=1;ENABLE_PLUGIN_INSTALLATION=1;ENABLE_PLUGINS=1;ENABLE_SESSION_SERVICE=1;ENABLE_THEMES=1;ENABLE_PRINTING=1;ENABLE_BASIC_PRINTING=1;ENABLE_PRINT_PREVIEW=1;ENABLE_SPELLCHECK=1;ENABLE_CAPTIVE_PORTAL_DETECTION=1;ENABLE_SUPERVISED_USERS=1;ENABLE_MDNS=1;ENABLE_SERVICE_DISCOVERY=1;V8_USE_EXTERNAL_STARTUP_DATA;FULL_SAFE_BROWSING;SAFE_BROWSING_CSD;SAFE_BROWSING_DB_LOCAL;WEBRTC_WIN;USE_LIBPCI=1;_CRT_NONSTDC_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;DYNAMIC_ANNOTATIONS_ENABLED=1;WTF_USE_DYNAMIC_ANNOTATIONS=1 + true + include\third_party\libyuv\include;include\third_party\libvpx\source\libvpx;src;.\;include;%(AdditionalIncludeDirectories) + ProgramDatabase + false + Default + MultiThreadedDebug + /Zc:threadSafeInit- %(AdditionalOptions) + + + true + libd;%(AdditionalLibraryDirectories) + LIBCPMTD.LIB + Windows + 5.01 + + + REM corflags /32bit+ $(OutDir)$(TargetName)$(TargetExt) + + + + + NotUsing + Level3 + Disabled + _HAS_ITERATOR_DEBUGGING=0;_ITERATOR_DEBUG_LEVEL=0;_DEBUG;_WINDOWSNDEBUG;WIN64;_CRT_SECURE_NO_WARNINGS;UNICODE;V8_DEPRECATION_WARNINGS;_WINDOWS;NOMINMAX;PSAPI_VERSION=1;_CRT_RAND_S;CERT_CHAIN_PARA_HAS_EXTRA_FIELDS;WIN32_LEAN_AND_MEAN;_ATL_NO_OPENGL;_SECURE_ATL;_HAS_EXCEPTIONS=0;_WINSOCK_DEPRECATED_NO_WARNINGS;CHROMIUM_BUILD;CR_CLANG_REVISION=274369-1;COMPONENT_BUILD;USE_AURA=1;USE_DEFAULT_RENDER_THEME=1;USE_LIBJPEG_TURBO=1;ENABLE_WEBRTC=1;ENABLE_MEDIA_ROUTER=1;ENABLE_PEPPER_CDMS;ENABLE_NOTIFICATIONS;FIELDTRIAL_TESTING_ENABLED;NO_TCMALLOC;__STD_C;_CRT_SECURE_NO_DEPRECATE;_SCL_SECURE_NO_DEPRECATE;NTDDI_VERSION=0x0A000000;_USING_V110_SDK71_;ENABLE_TASK_MANAGER=1;ENABLE_EXTENSIONS=1;ENABLE_PDF=1;ENABLE_PLUGIN_INSTALLATION=1;ENABLE_PLUGINS=1;ENABLE_SESSION_SERVICE=1;ENABLE_THEMES=1;ENABLE_PRINTING=1;ENABLE_BASIC_PRINTING=1;ENABLE_PRINT_PREVIEW=1;ENABLE_SPELLCHECK=1;ENABLE_CAPTIVE_PORTAL_DETECTION=1;ENABLE_SUPERVISED_USERS=1;ENABLE_MDNS=1;ENABLE_SERVICE_DISCOVERY=1;V8_USE_EXTERNAL_STARTUP_DATA;FULL_SAFE_BROWSING;SAFE_BROWSING_CSD;SAFE_BROWSING_DB_LOCAL;WEBRTC_WIN;USE_LIBPCI=1;_CRT_NONSTDC_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;DYNAMIC_ANNOTATIONS_ENABLED=1;WTF_USE_DYNAMIC_ANNOTATIONS=1;%(PreprocessorDefinitions) + true + include\third_party\libyuv\include;include\third_party\libvpx\source\libvpx;src;.\;include;%(AdditionalIncludeDirectories) + ProgramDatabase + false + Default + MultiThreadedDebug + /Zc:threadSafeInit- %(AdditionalOptions) + + + true + LIBCPMTD.LIB + libd_x64 + Windows + 5.01 + + + + + Level3 + NotUsing + MaxSpeed + true + true + _HAS_ITERATOR_DEBUGGING=0;_ITERATOR_DEBUG_LEVEL=0;NDEBUG;WIN32;_CRT_SECURE_NO_WARNINGS;UNICODE;V8_DEPRECATION_WARNINGS;_WINDOWS;NOMINMAX;PSAPI_VERSION=1;_CRT_RAND_S;CERT_CHAIN_PARA_HAS_EXTRA_FIELDS;WIN32_LEAN_AND_MEAN;_ATL_NO_OPENGL;_SECURE_ATL;_HAS_EXCEPTIONS=0;_WINSOCK_DEPRECATED_NO_WARNINGS;CHROMIUM_BUILD;CR_CLANG_REVISION=274369-1;COMPONENT_BUILD;USE_AURA=1;USE_DEFAULT_RENDER_THEME=1;USE_LIBJPEG_TURBO=1;ENABLE_WEBRTC=1;ENABLE_MEDIA_ROUTER=1;ENABLE_PEPPER_CDMS;ENABLE_NOTIFICATIONS;FIELDTRIAL_TESTING_ENABLED;NO_TCMALLOC;__STD_C;_CRT_SECURE_NO_DEPRECATE;_SCL_SECURE_NO_DEPRECATE;NTDDI_VERSION=0x0A000000;ENABLE_TASK_MANAGER=1;ENABLE_EXTENSIONS=1;ENABLE_PDF=1;ENABLE_PLUGIN_INSTALLATION=1;ENABLE_PLUGINS=1;ENABLE_SESSION_SERVICE=1;ENABLE_THEMES=1;ENABLE_PRINTING=1;ENABLE_BASIC_PRINTING=1;ENABLE_PRINT_PREVIEW=1;ENABLE_SPELLCHECK=1;ENABLE_CAPTIVE_PORTAL_DETECTION=1;ENABLE_SUPERVISED_USERS=1;ENABLE_MDNS=1;ENABLE_SERVICE_DISCOVERY=1;V8_USE_EXTERNAL_STARTUP_DATA;FULL_SAFE_BROWSING;SAFE_BROWSING_CSD;SAFE_BROWSING_DB_LOCAL;USE_LIBPCI=1;_CRT_NONSTDC_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;DYNAMIC_ANNOTATIONS_ENABLED=1;WTF_USE_DYNAMIC_ANNOTATIONS=1;NTDDI_VERSION=NTDDI_WINXPSP3;_WIN32_WINNT=_WIN32_WINNT_WINXP;WINVER=_WIN32_WINNT_WINXP;_ATL_XP_TARGETING;WEBRTC_WIN;INCL_EXTRA_HTON_FUNCTIONS + true + include\third_party\boringssl\src\include;include\third_party\libyuv\include;include\third_party\libvpx\source\libvpx;src;.\;include;%(AdditionalIncludeDirectories) + + + ProgramDatabase + Speed + /Zc:threadSafeInit- %(AdditionalOptions) + MultiThreaded + + + true + true + true + lib;%(AdditionalLibraryDirectories) + kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies) + + + Windows + 5.01 + + + + + + + + + Level3 + NotUsing + MaxSpeed + true + true + _HAS_ITERATOR_DEBUGGING=0;_ITERATOR_DEBUG_LEVEL=0;NDEBUG;WIN64;_CRT_SECURE_NO_WARNINGS;UNICODE;V8_DEPRECATION_WARNINGS;_WINDOWS;NOMINMAX;PSAPI_VERSION=1;_CRT_RAND_S;CERT_CHAIN_PARA_HAS_EXTRA_FIELDS;WIN32_LEAN_AND_MEAN;_ATL_NO_OPENGL;_SECURE_ATL;_HAS_EXCEPTIONS=0;_WINSOCK_DEPRECATED_NO_WARNINGS;CHROMIUM_BUILD;CR_CLANG_REVISION=274369-1;COMPONENT_BUILD;USE_AURA=1;USE_DEFAULT_RENDER_THEME=1;USE_LIBJPEG_TURBO=1;ENABLE_WEBRTC=1;ENABLE_MEDIA_ROUTER=1;ENABLE_PEPPER_CDMS;ENABLE_NOTIFICATIONS;FIELDTRIAL_TESTING_ENABLED;NO_TCMALLOC;__STD_C;_CRT_SECURE_NO_DEPRECATE;_SCL_SECURE_NO_DEPRECATE;NTDDI_VERSION=0x0A000000;ENABLE_TASK_MANAGER=1;ENABLE_EXTENSIONS=1;ENABLE_PDF=1;ENABLE_PLUGIN_INSTALLATION=1;ENABLE_PLUGINS=1;ENABLE_SESSION_SERVICE=1;ENABLE_THEMES=1;ENABLE_PRINTING=1;ENABLE_BASIC_PRINTING=1;ENABLE_PRINT_PREVIEW=1;ENABLE_SPELLCHECK=1;ENABLE_CAPTIVE_PORTAL_DETECTION=1;ENABLE_SUPERVISED_USERS=1;ENABLE_MDNS=1;ENABLE_SERVICE_DISCOVERY=1;V8_USE_EXTERNAL_STARTUP_DATA;FULL_SAFE_BROWSING;SAFE_BROWSING_CSD;SAFE_BROWSING_DB_LOCAL;USE_LIBPCI=1;_CRT_NONSTDC_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;DYNAMIC_ANNOTATIONS_ENABLED=1;WTF_USE_DYNAMIC_ANNOTATIONS=1;NTDDI_VERSION=NTDDI_WINXPSP3;_WIN32_WINNT=_WIN32_WINNT_WINXP;WINVER=_WIN32_WINNT_WINXP;_ATL_XP_TARGETING;WEBRTC_WIN;INCL_EXTRA_HTON_FUNCTIONS;%(PreprocessorDefinitions) + true + include\third_party\boringssl\src\include;include\third_party\libyuv\include;include\third_party\libvpx\source\libvpx;src;.\;include;%(AdditionalIncludeDirectories) + /Zc:threadSafeInit- %(AdditionalOptions) + MultiThreaded + + + true + true + true + lib_x64;%(AdditionalLibraryDirectories) + + + Windows + 5.02 + + + + + + + + + + NotUsing + + + NotUsing + + + + + + \ No newline at end of file diff --git a/WebRtcNative/WebRtcNative.vcxproj.filters b/WebRtcNative/WebRtcNative.vcxproj.filters new file mode 100644 index 00000000..6337f2a7 --- /dev/null +++ b/WebRtcNative/WebRtcNative.vcxproj.filters @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + {972f3b3a-9d2d-481e-956d-7393afa7e059} + + + \ No newline at end of file diff --git a/WebRtc.NET/cmd/genDebug.bat b/WebRtcNative/cmd/genDebug.bat similarity index 100% rename from WebRtc.NET/cmd/genDebug.bat rename to WebRtcNative/cmd/genDebug.bat diff --git a/WebRtc.NET/cmd/genDebugX64.bat b/WebRtcNative/cmd/genDebugX64.bat similarity index 100% rename from WebRtc.NET/cmd/genDebugX64.bat rename to WebRtcNative/cmd/genDebugX64.bat diff --git a/WebRtcNative/cmd/genRelease.bat b/WebRtcNative/cmd/genRelease.bat new file mode 100644 index 00000000..a441e342 --- /dev/null +++ b/WebRtcNative/cmd/genRelease.bat @@ -0,0 +1,9 @@ +d: + +cd D:\webrtc-checkout\src + +set DEPOT_TOOLS_WIN_TOOLCHAIN=0 + +gn gen out/ReleaseX86 --ide="vs2015" --args="is_debug=false target_cpu=\"x86\" is_component_build=false" + +pause diff --git a/WebRtc.NET/cmd/genReleaseX64.bat b/WebRtcNative/cmd/genReleaseX64.bat similarity index 100% rename from WebRtc.NET/cmd/genReleaseX64.bat rename to WebRtcNative/cmd/genReleaseX64.bat diff --git a/WebRtcNative/cmd/linkRelease.bat b/WebRtcNative/cmd/linkRelease.bat new file mode 100644 index 00000000..570f2e3b --- /dev/null +++ b/WebRtcNative/cmd/linkRelease.bat @@ -0,0 +1,10 @@ +z: +cd Z:\Coding\WebRtc.NET\WebRtcNative\lib + +call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\Tools\VsDevCmd.bat" + +del link\protobuf_full.lib + +lib /out:webrtc-all.lib link\*.lib + +pause \ No newline at end of file diff --git a/WebRtcNative/cmd/linkReleaseX64.bat b/WebRtcNative/cmd/linkReleaseX64.bat new file mode 100644 index 00000000..035bb53e --- /dev/null +++ b/WebRtcNative/cmd/linkReleaseX64.bat @@ -0,0 +1,10 @@ +z: +cd Z:\Coding\WebRtc.NET\WebRtcNative\lib_x64 + +call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\Tools\VsDevCmd.bat" + +del link\protobuf_full.lib + +lib /out:webrtc-all.lib link\*.lib + +pause \ No newline at end of file diff --git a/WebRtc.NET/cmd/syncWebRtc.bat b/WebRtcNative/cmd/syncWebRtc.bat similarity index 100% rename from WebRtc.NET/cmd/syncWebRtc.bat rename to WebRtcNative/cmd/syncWebRtc.bat diff --git a/WebRtc.NET/cmd/update_include.bat b/WebRtcNative/cmd/update_include.bat similarity index 78% rename from WebRtc.NET/cmd/update_include.bat rename to WebRtcNative/cmd/update_include.bat index 63ec0496..801c93de 100644 --- a/WebRtc.NET/cmd/update_include.bat +++ b/WebRtcNative/cmd/update_include.bat @@ -1,11 +1,15 @@ -xcopy /s D:\webrtc-checkout\src\webrtc\*.h Z:\Coding\WebRtc.NET\WebRtc.NET\include\webrtc\ -pause - -xcopy /s D:\webrtc-checkout\src\third_party\libvpx\*.h Z:\Coding\WebRtc.NET\WebRtc.NET\include\third_party\libvpx\ -pause - -xcopy /s D:\webrtc-checkout\src\third_party\libyuv\include\*.h Z:\Coding\WebRtc.NET\WebRtc.NET\include\third_party\libyuv\include\ -pause - -xcopy /s D:\webrtc-checkout\src\third_party\jsoncpp\*.h Z:\Coding\WebRtc.NET\WebRtc.NET\include\third_party\jsoncpp\ +xcopy /s D:\webrtc-checkout\src\webrtc\*.h Z:\Coding\WebRtc.NET\WebRtc.NET\include\webrtc\ +pause + +xcopy /s D:\webrtc-checkout\src\third_party\libvpx\*.h Z:\Coding\WebRtc.NET\WebRtc.NET\include\third_party\libvpx\ +pause + +xcopy /s D:\webrtc-checkout\src\third_party\libyuv\include\*.h Z:\Coding\WebRtc.NET\WebRtc.NET\include\third_party\libyuv\include\ +pause + +xcopy /s D:\webrtc-checkout\src\third_party\jsoncpp\*.h Z:\Coding\WebRtc.NET\WebRtc.NET\include\third_party\jsoncpp\ +pause + +xcopy /s D:\webrtc-checkout\src\third_party\boringssl\*.h Z:\Coding\WebRtc.NET\WebRtc.NET\include\third_party\boringssl\ + pause \ No newline at end of file diff --git a/WebRtcNative/gn/build/config/win/BUILD.gn b/WebRtcNative/gn/build/config/win/BUILD.gn new file mode 100644 index 00000000..5806ee3a --- /dev/null +++ b/WebRtcNative/gn/build/config/win/BUILD.gn @@ -0,0 +1,416 @@ +# Copyright (c) 2013 The Chromium Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +import("//build/config/clang/clang.gni") +import("//build/config/compiler/compiler.gni") +import("//build/config/sanitizers/sanitizers.gni") +import("//build/config/win/visual_studio_version.gni") +import("//build/toolchain/toolchain.gni") + +assert(is_win) + +declare_args() { + # Set this to true to enable static analysis through Visual Studio's + # /analyze. This dramatically slows compiles and reports thousands of + # warnings, so normally this is done on a build machine and only the new + # warnings are examined. + use_vs_code_analysis = false + + # Turn this on to have the linker output extra timing information. + win_linker_timing = false +} + +# This is included by reference in the //build/config/compiler config that +# is applied to all targets. It is here to separate out the logic that is +# Windows-only. +config("compiler") { + if (current_cpu == "x86") { + asmflags = [ + # When /safeseh is specified, the linker will only produce an image if it + # can also produce a table of the image's safe exception handlers. This + # table specifies for the operating system which exception handlers are + # valid for the image. Note that /SAFESEH isn't accepted on the command + # line, only /safeseh. This is only accepted by ml.exe, not ml64.exe. + "/safeseh", + ] + } + + cflags = [ + "/Gy", # Enable function-level linking. + "/FS", # Preserve previous PDB behavior. + "/bigobj", # Some of our files are bigger than the regular limits. + ] + + # Force C/C++ mode for the given GN detected file type. This is necessary + # for precompiled headers where the same source file is compiled in both + # modes. + cflags_c = [ "/TC" ] + cflags_cc = [ "/TP" ] + + cflags += [ + # Tell the compiler to crash on failures. This is undocumented + # and unsupported but very handy. + "/d2FastFail", + + # Work around crbug.com/526851, bug in VS 2015 RTM compiler. + "/Zc:sizedDealloc-", + + # thread-safe statics disabled + "/Zc:threadSafeInit-", + ] + + # Building with Clang on Windows is a work in progress and very + # experimental. See crbug.com/82385. + if (is_clang) { + cflags += [ "-fmsc-version=1900" ] + + if (current_cpu == "x86") { + cflags += [ "-m32" ] + } else { + cflags += [ "-m64" ] + } + + if (exec_script("//build/win/use_ansi_codes.py", [], "trim string") == + "True") { + cflags += [ + # cmd.exe doesn't understand ANSI escape codes by default, + # so only enable them if something emulating them is around. + "-fansi-escape-codes", + ] + } + + # Clang runtime libraries, such as the sanitizer runtimes, live here. + lib_dirs = [ "$clang_base_path/lib/clang/$clang_version/lib/windows" ] + } + + # /PROFILE ensures that the PDB file contains FIXUP information (growing the + # PDB file by about 5%) but does not otherwise alter the output binary. This + # information is used by the Syzygy optimization tool when decomposing the + # release image. It is enabled for syzyasan builds and opportunistically for + # other builds where it is not prohibited (not supported when incrementally + # linking, or using /debug:fastlink). + if (is_syzyasan) { + assert(!is_win_fastlink) + ldflags = [ "/PROFILE" ] + } else { + if (!is_debug && !is_component_build) { + if (is_win_fastlink) { + # /PROFILE implies the following linker flags. Therefore if we are + # skipping /PROFILE because it is incompatible with /DEBUG:FASTLINK + # we should explicitly add these flags in order to avoid unintended + # consequences such as larger binaries. + ldflags = [ + "/OPT:REF", + "/OPT:ICF", + "/INCREMENTAL:NO", + "/FIXED:NO", + ] + } else { + ldflags = [ "/PROFILE" ] + } + } + } + + # arflags apply only to static_libraries. The normal linker configs are only + # set for executable and shared library targets so arflags must be set + # elsewhere. Since this is relatively contained, we just apply them in this + # more general config and they will only have an effect on static libraries. + arflags = [ + # "No public symbols found; archive member will be inaccessible." This + # means that one or more object files in the library can never be + # pulled in to targets that link to this library. It's just a warning that + # the source file is a no-op. + "/ignore:4221", + ] +} + +config("vs_code_analysis") { + if (use_vs_code_analysis && !is_clang) { + # When use_vs_code_analysis is specified add the /analyze switch to enable + # static analysis. Specifying /analyze:WX- says that /analyze warnings + # should not be treated as errors. + cflags = [ "/analyze:WX-" ] + + # Also, disable various noisy warnings that have low value. + cflags += [ + "/wd6011", # Dereferencing NULL pointer + + # C6285 is ~16% of raw warnings and has low value + "/wd6285", # non-zero constant || non-zero constant + "/wd6308", # realloc might return null pointer + + # Possible infinite loop: use of the constant + # EXCEPTION_CONTINUE_EXECUTION in the exception-filter + "/wd6312", + + "/wd6322", # Empty _except block + "/wd6330", # 'char' used instead of 'unsigned char' for istype() call + + # C6334 is ~80% of raw warnings and has low value + "/wd6334", # sizeof applied to an expression with an operator + "/wd6326", # Potential comparison of constant with constant + "/wd6340", # Sign mismatch in function parameter + "/wd28159", # Consider using 'GetTickCount64' + "/wd28196", # The precondition is not satisfied + "/wd28204", # Inconsistent SAL annotations + "/wd28251", # Inconsistent SAL annotations + "/wd28252", # Inconsistent SAL annotations + "/wd28253", # Inconsistent SAL annotations + "/wd28278", # Function appears with no prototype in scope + "/wd28285", # syntax error in SAL annotation (in algorithm) + "/wd28301", # Inconsistent SAL annotations + "/wd28182", # Dereferencing NULL pointer + ] + } +} + +# This is included by reference in the //build/config/compiler:runtime_library +# config that is applied to all targets. It is here to separate out the logic +# that is Windows-only. Please see that target for advice on what should go in +# :runtime_library vs. :compiler. +config("runtime_library") { + cflags = [] + + # Defines that set up the CRT. + defines = [ + "__STD_C", + "_CRT_RAND_S", + "_CRT_SECURE_NO_DEPRECATE", + "_HAS_EXCEPTIONS=0", + "_SCL_SECURE_NO_DEPRECATE", + ] + + # Defines that set up the Windows SDK. + defines += [ + "_ATL_NO_OPENGL", + "_WINDOWS", + "CERT_CHAIN_PARA_HAS_EXTRA_FIELDS", + "PSAPI_VERSION=1", + "WIN32", + "_SECURE_ATL", + "_ATL_XP_TARGETING", + "INCL_EXTRA_HTON_FUNCTIONS" + ] + + if (!use_vs_code_analysis) { + # This is required for ATL to use XP-safe versions of its functions. + # However it is prohibited when using /analyze + # defines += [ "_USING_V110_SDK71_" ] + } +} + +# Sets the default Windows build version. This is separated because some +# targets need to manually override it for their compiles. +config("winver") { + defines = [ + "NTDDI_VERSION=0x05010300", + "_WIN32_WINNT=0x0501", + "WINVER=0x0501", + ] +} + +# Linker flags for Windows SDK setup, this is applied only to EXEs and DLLs. +config("sdk_link") { + if (current_cpu == "x64") { + ldflags = [ "/MACHINE:X64" ] + lib_dirs = [ + "$windows_sdk_path\Lib\winv6.3\um\x64", + "$visual_studio_path\VC\lib\amd64", + "$visual_studio_path\VC\atlmfc\lib\amd64", + ] + } else { + ldflags = [ + "/MACHINE:X86", + "/SAFESEH", # Not compatible with x64 so use only for x86. + "/largeaddressaware", + ] + lib_dirs = [ + "$windows_sdk_path\Lib\winv6.3\um\x86", + "$visual_studio_path\VC\lib", + "$visual_studio_path\VC\atlmfc\lib", + ] + } +} + +# This default linker setup is provided separately from the SDK setup so +# targets who want different library configurations can remove this and specify +# their own. +config("common_linker_setup") { + ldflags = [ + "/fastfail", + "/FIXED:NO", + "/ignore:4199", + "/ignore:4221", + "/NXCOMPAT", + ] + + # ASLR makes debugging with windbg difficult because Chrome.exe and + # Chrome.dll share the same base name. As result, windbg will name the + # Chrome.dll module like chrome_, where + # typically changes with each launch. This in turn means that breakpoints in + # Chrome.dll don't stick from one launch to the next. For this reason, we + # turn ASLR off in debug builds. + if (is_debug) { + ldflags += [ "/DYNAMICBASE:NO" ] + } else { + ldflags += [ "/DYNAMICBASE" ] + } + + if (win_linker_timing) { + ldflags += [ + "/time", + "/verbose:incr", + ] + } +} + +config("cfi_linker") { + # Control Flow Guard (CFG) + # https://msdn.microsoft.com/en-us/library/windows/desktop/mt637065.aspx + # /DYNAMICBASE (ASLR) is turned off in debug builds, therefore CFG can’t be + # turned on either. + # TODO(thakis): Turn this on with lld once supported, https://crbug.com/693709 + if (!is_debug && !use_lld) { + # Turn on CFG in msvc linker, regardless of compiler used. + ldflags = [ "/guard:cf" ] + } +} + +# CRT -------------------------------------------------------------------------- + +# Configures how the runtime library (CRT) is going to be used. +# See https://msdn.microsoft.com/en-us/library/2kzt1wy3.aspx for a reference of +# what each value does. +config("default_crt") { + configs = [ ":dynamic_crt" ] +} + +config("dynamic_crt") { + if (is_debug) { + cflags = [ "/MDd" ] + } else { + cflags = [ "/MD" ] + } +} + +config("static_crt") { + if (is_debug) { + cflags = [ "/MDd" ] + } else { + cflags = [ "/MD" ] + } +} + +# Subsystem -------------------------------------------------------------------- + +# This is appended to the subsystem to specify a minimum version. +if (current_cpu == "x64") { + # The number after the comma is the minimum required OS version. + # 5.02 = Windows Server 2003. + subsystem_version_suffix = ",5.02" +} else { + # 5.01 = Windows XP. + subsystem_version_suffix = ",5.01" +} + +config("console") { + ldflags = [ "/SUBSYSTEM:CONSOLE$subsystem_version_suffix" ] +} +config("windowed") { + ldflags = [ "/SUBSYSTEM:WINDOWS$subsystem_version_suffix" ] +} + +# Incremental linking ---------------------------------------------------------- + +incremental_linking_on_switch = [ "/INCREMENTAL" ] +incremental_linking_off_switch = [ "/INCREMENTAL:NO" ] + +# Disable incremental linking for syzyasan, enable for debug builds and all +# component builds - any builds where performance is not job one. +if ((is_debug || is_component_build) && !is_syzyasan) { + default_incremental_linking_switch = incremental_linking_on_switch +} else { + default_incremental_linking_switch = incremental_linking_off_switch +} + +# Applies incremental linking or not depending on the current configuration. +config("default_incremental_linking") { + ldflags = default_incremental_linking_switch +} + +# Explicitly on or off incremental linking +config("incremental_linking") { + ldflags = incremental_linking_on_switch +} +config("no_incremental_linking") { + ldflags = incremental_linking_off_switch +} + +# Some large modules can't handle incremental linking in some situations. This +# config should be applied to large modules to turn off incremental linking +# when it won't work. +config("default_large_module_incremental_linking") { + if (symbol_level > 0 && (current_cpu == "x86" || !is_component_build)) { + # When symbols are on, things get so large that the tools fail due to the + # size of the .ilk files. + ldflags = incremental_linking_off_switch + } else { + # Otherwise just do the default incremental linking for this build type. + ldflags = default_incremental_linking_switch + } +} + +# Character set ---------------------------------------------------------------- + +# Not including this config means "ansi" (8-bit system codepage). +config("unicode") { + defines = [ + "_UNICODE", + "UNICODE", + ] +} + +# Lean and mean ---------------------------------------------------------------- + +# Some third party code might not compile with WIN32_LEAN_AND_MEAN so we have +# to have a separate config for it. Remove this config from your target to +# get the "bloaty and accomodating" version of windows.h. +config("lean_and_mean") { + defines = [ "WIN32_LEAN_AND_MEAN" ] +} + +# Nominmax -------------------------------------------------------------------- + +# Some third party code defines NOMINMAX before including windows.h, which +# then causes warnings when it's been previously defined on the command line. +# For such targets, this config can be removed. + +config("nominmax") { + defines = [ "NOMINMAX" ] +} + +# Target WinRT ---------------------------------------------------------------- + +# When targeting Windows Runtime, certain compiler/linker flags are necessary. + +config("target_winrt") { + defines = [ + "WINRT", + "WINAPI_FAMILY=WINAPI_FAMILY_PC_APP", + ] + cflags_cc = [ + "/ZW", + "/EHsc", + ] +} + +# Internal stuff -------------------------------------------------------------- + +# Config used by the MIDL template to disable warnings. +config("midl_warnings") { + if (is_clang) { + # MIDL generates code like "#endif !_MIDL_USE_GUIDDEF_". + cflags = [ "-Wno-extra-tokens" ] + } +} diff --git a/WebRtcNative/gn/third_party/libvpx/BUILD.gn b/WebRtcNative/gn/third_party/libvpx/BUILD.gn new file mode 100644 index 00000000..24653ba8 --- /dev/null +++ b/WebRtcNative/gn/third_party/libvpx/BUILD.gn @@ -0,0 +1,346 @@ +# Copyright 2014 The Chromium Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +import("//build/config/arm.gni") +import("//build/config/android/config.gni") +import("//build/config/sanitizers/sanitizers.gni") +import("//third_party/libvpx/libvpx_srcs.gni") +import("//third_party/yasm/yasm_assemble.gni") + +# Sets the architecture name for building libvpx. +if (current_cpu == "x86") { + cpu_arch_full = "ia32" +} else if (current_cpu == "x64") { + if (is_msan) { + cpu_arch_full = "generic" + } else { + cpu_arch_full = "x64" + } +} else if (current_cpu == "arm") { + if (arm_use_neon) { + cpu_arch_full = "arm-neon" + } else if (is_android) { + cpu_arch_full = "arm-neon-cpu-detect" + } else { + cpu_arch_full = "arm" + } +} else { + cpu_arch_full = current_cpu +} + +if (is_nacl) { + platform_include_dir = "//third_party/libvpx/source/config/nacl" +} else { + # The mac configurations are currently a relic. They were useful when + # x86inc.asm did not work for MACH_O but now the build is identical to the + # linux config. iOS for arm on the other hand needs an apple-specific twist in + # vpx_config.asm + if (is_ios && current_cpu == "arm") { + os_category = current_os + } else if (is_posix) { # Should cover linux, mac, and the ios simulator. + os_category = "linux" + } else { # This should only match windows. + os_category = current_os + } + platform_include_dir = + "//third_party/libvpx/source/config/$os_category/$cpu_arch_full" +} + +config("libvpx_config") { + include_dirs = [ + "//third_party/libvpx/source/config", + platform_include_dir, + "//third_party/libvpx/source/libvpx", + "$root_gen_dir/third_party/libvpx", # Provides vpx_rtcd.h. + ] +} + +# gn orders flags on a target before flags from configs. The default config +# adds -Wall, and these flags have to be after -Wall -- so they need to come +# from a config and can't be on the target directly. +config("libvpx_warnings") { + if (is_clang) { + cflags = [ + # libvpx heavily relies on implicit enum casting. + "-Wno-conversion", + + # libvpx does `if ((a == b))` in some places. + "-Wno-parentheses-equality", + + # libvpx has many static functions in header, which trigger this warning. + "-Wno-unused-function", + ] + + # Fixes a mac link error for vpx_scaled_2d: + # Undefined symbols for architecture x86_64: + # "_vpx_scaled_2d", referenced from: + # _vp9_scale_and_extend_frame_c in libvpx.a(vp9_frame_scale.o) + # (maybe you meant: _vpx_scaled_2d_ssse3) + # ld: symbol(s) not found for architecture x86_64 + if (is_mac) { + cflags += [ "-fno-common" ] + } + } else if (!is_win) { + cflags = [ + "-Wno-unused-function", + "-Wno-sign-compare", + ] + } +} + +# This config is applied to targets that depend on libvpx. +config("libvpx_external_config") { + include_dirs = [ "//third_party/libvpx/source/libvpx" ] +} + +if (current_cpu == "x86" || (current_cpu == "x64" && !is_msan)) { + yasm_assemble("libvpx_yasm") { + if (current_cpu == "x86") { + sources = libvpx_srcs_x86_assembly + } else if (current_cpu == "x64") { + sources = libvpx_srcs_x86_64_assembly + } + + defines = [ "CHROMIUM" ] + if (is_android) { + # On Android, define __ANDROID__ to use alternative standard library + # functions. + defines += [ "__ANDROID__" ] + } + include_dirs = [ + platform_include_dir, + "//third_party/libvpx/source/config", + "//third_party/libvpx/source/libvpx", + target_gen_dir, + ] + } +} + +if (current_cpu == "x86" || (current_cpu == "x64" && !is_msan)) { + # The following targets are deliberately source_set rather than + # static_library. The :libvpx target exposes these intrinsic implementations + # via global function pointer symbols, which hides the object dependency at + # link time. On Mac, this results in undefined references to the intrinsic + # symbols. + + static_library("libvpx_intrinsics_mmx") { + configs += [ ":libvpx_config" ] + configs -= [ "//build/config/compiler:chromium_code" ] + configs += [ "//build/config/compiler:no_chromium_code" ] + configs += [ ":libvpx_warnings" ] + if (!is_win) { + cflags = [ "-mmmx" ] + } + if (current_cpu == "x86") { + sources = libvpx_srcs_x86_mmx + } else if (current_cpu == "x64") { + sources = libvpx_srcs_x86_64_mmx + } + } + + static_library("libvpx_intrinsics_sse2") { + configs += [ ":libvpx_config" ] + configs -= [ "//build/config/compiler:chromium_code" ] + configs += [ "//build/config/compiler:no_chromium_code" ] + configs += [ ":libvpx_warnings" ] + if (!is_win || is_clang) { + cflags = [ "-msse2" ] + } + if (current_cpu == "x86") { + sources = libvpx_srcs_x86_sse2 + } else if (current_cpu == "x64") { + sources = libvpx_srcs_x86_64_sse2 + } + } + + static_library("libvpx_intrinsics_ssse3") { + configs += [ ":libvpx_config" ] + configs -= [ "//build/config/compiler:chromium_code" ] + configs += [ "//build/config/compiler:no_chromium_code" ] + configs += [ ":libvpx_warnings" ] + if (!is_win || is_clang) { + cflags = [ "-mssse3" ] + } + if (current_cpu == "x86") { + sources = libvpx_srcs_x86_ssse3 + } else if (current_cpu == "x64") { + sources = libvpx_srcs_x86_64_ssse3 + } + } + + static_library("libvpx_intrinsics_sse4_1") { + configs += [ ":libvpx_config" ] + configs -= [ "//build/config/compiler:chromium_code" ] + configs += [ "//build/config/compiler:no_chromium_code" ] + configs += [ ":libvpx_warnings" ] + if (!is_win || is_clang) { + cflags = [ "-msse4.1" ] + } + if (current_cpu == "x86") { + sources = libvpx_srcs_x86_sse4_1 + } else if (current_cpu == "x64") { + sources = libvpx_srcs_x86_64_sse4_1 + } + } + + static_library("libvpx_intrinsics_avx") { + configs += [ ":libvpx_config" ] + configs -= [ "//build/config/compiler:chromium_code" ] + configs += [ "//build/config/compiler:no_chromium_code" ] + configs += [ ":libvpx_warnings" ] + if (is_win) { + cflags = [ "/arch:AVX" ] + } else { + cflags = [ "-mavx" ] + } + if (current_cpu == "x86") { + sources = libvpx_srcs_x86_avx + } else if (current_cpu == "x64") { + sources = libvpx_srcs_x86_64_avx + } + } + + static_library("libvpx_intrinsics_avx2") { + configs += [ ":libvpx_config" ] + configs -= [ "//build/config/compiler:chromium_code" ] + configs += [ "//build/config/compiler:no_chromium_code" ] + configs += [ ":libvpx_warnings" ] + if (is_win) { + cflags = [ "/arch:AVX2" ] + } else { + cflags = [ "-mavx2" ] + } + if (current_cpu == "x86") { + sources = libvpx_srcs_x86_avx2 + } else if (current_cpu == "x64") { + sources = libvpx_srcs_x86_64_avx2 + } + } +} + +if (cpu_arch_full == "arm-neon-cpu-detect") { + static_library("libvpx_intrinsics_neon") { + configs -= [ "//build/config/compiler:compiler_arm_fpu" ] + configs += [ ":libvpx_config" ] + configs += [ ":libvpx_warnings" ] + cflags = [ "-mfpu=neon" ] + sources = libvpx_srcs_arm_neon_cpu_detect_neon + } +} + +if (current_cpu == "arm") { + if (cpu_arch_full == "arm-neon") { + arm_assembly_sources = libvpx_srcs_arm_neon_assembly + } else if (cpu_arch_full == "arm-neon-cpu-detect") { + arm_assembly_sources = libvpx_srcs_arm_neon_cpu_detect_assembly + } else { + arm_assembly_sources = libvpx_srcs_arm_assembly + } +} + +# Converts ARM assembly files to GAS style. +if (current_cpu == "arm" && arm_assembly_sources != []) { + action_foreach("convert_arm_assembly") { + script = "//third_party/libvpx/run_perl.py" + sources = arm_assembly_sources + gen_file = + get_label_info("//third_party/libvpx/source/libvpx", "root_gen_dir") + + "/{{source_root_relative_dir}}/{{source_file_part}}.S" + outputs = [ + gen_file, + ] + if (is_ios) { + ads2gas_script = + "//third_party/libvpx/source/libvpx/build/make/ads2gas_apple.pl" + } else { + ads2gas_script = + "//third_party/libvpx/source/libvpx/build/make/ads2gas.pl" + } + args = [ + "-s", + rebase_path(ads2gas_script, root_build_dir), + "-i", + "{{source}}", + "-o", + rebase_path(gen_file), + ] + } + + static_library("libvpx_assembly_arm") { + sources = get_target_outputs(":convert_arm_assembly") + configs -= [ "//build/config/compiler:compiler_arm_fpu" ] + configs += [ ":libvpx_config" ] + configs += [ ":libvpx_warnings" ] + if (cpu_arch_full == "arm-neon" || cpu_arch_full == "arm-neon-cpu-detect") { + asmflags = [ "-mfpu=neon" ] + + # allow asm files to include generated sources which match the source + # tree layout, e.g., vpx_dsp/arm/... + include_dirs = [ get_label_info("//third_party/libvpx/source/libvpx", + "target_gen_dir") ] + } + deps = [ + ":convert_arm_assembly", + ] + } +} + +static_library("libvpx") { + if (!is_debug && is_win) { + configs -= [ "//build/config/compiler:default_optimization" ] + configs += [ "//build/config/compiler:optimize_max" ] + } + + if (is_nacl) { + sources = libvpx_srcs_generic + } else if (current_cpu == "x86") { + sources = libvpx_srcs_x86 + } else if (current_cpu == "x64") { + if (is_msan) { + sources = libvpx_srcs_generic + } else { + sources = libvpx_srcs_x86_64 + } + } else if (current_cpu == "mipsel" || current_cpu == "mips64el") { + sources = libvpx_srcs_mips + } else if (current_cpu == "arm") { + if (arm_use_neon) { + sources = libvpx_srcs_arm_neon + } else if (is_android) { + sources = libvpx_srcs_arm_neon_cpu_detect + } else { + sources = libvpx_srcs_arm + } + } else if (current_cpu == "arm64") { + sources = libvpx_srcs_arm64 + } + + configs += [ ":libvpx_config" ] + configs -= [ "//build/config/compiler:chromium_code" ] + configs += [ "//build/config/compiler:no_chromium_code" ] + configs += [ ":libvpx_warnings" ] + deps = [] + if (current_cpu == "x86" || (current_cpu == "x64" && !is_msan)) { + deps += [ + ":libvpx_intrinsics_avx", + ":libvpx_intrinsics_avx2", + ":libvpx_intrinsics_mmx", + ":libvpx_intrinsics_sse2", + ":libvpx_intrinsics_sse4_1", + ":libvpx_intrinsics_ssse3", + ":libvpx_yasm", + ] + } + if (cpu_arch_full == "arm-neon-cpu-detect") { + deps += [ ":libvpx_intrinsics_neon" ] + } + if (is_android) { + deps += [ "//third_party/android_tools:cpu_features" ] + } + if (current_cpu == "arm" && arm_assembly_sources != []) { + deps += [ ":libvpx_assembly_arm" ] + } + + public_configs = [ ":libvpx_external_config" ] +} diff --git a/WebRtcNative/gn/webrtc/api/BUILD.gn b/WebRtcNative/gn/webrtc/api/BUILD.gn new file mode 100644 index 00000000..9df60c8b --- /dev/null +++ b/WebRtcNative/gn/webrtc/api/BUILD.gn @@ -0,0 +1,271 @@ +# Copyright (c) 2015 The WebRTC project authors. All Rights Reserved. +# +# Use of this source code is governed by a BSD-style license +# that can be found in the LICENSE file in the root of the source +# tree. An additional intellectual property rights grant can be found +# in the file PATENTS. All contributing project authors may +# be found in the AUTHORS file in the root of the source tree. + +import("../webrtc.gni") +if (is_android) { + import("//build/config/android/config.gni") + import("//build/config/android/rules.gni") +} + +group("api") { + public_deps = [ + ":libjingle_peerconnection_api", + ] +} + +rtc_source_set("call_api") { + sources = [ + "call/audio_sink.h", + ] + + deps = [ + # TODO(kjellander): Add remaining dependencies when webrtc:4243 is done. + ":audio_mixer_api", + ":transport_api", + "..:webrtc_common", + "../base:rtc_base_approved", + "../modules/audio_coding:audio_encoder_interface", + "audio_codecs:audio_codecs_api", + ] +} + +rtc_static_library("libjingle_peerconnection_api") { + # Cannot have GN check enabled since that would introduce dependency cycles + # TODO(kjellander): Remove (bugs.webrtc.org/7504) + check_includes = false + cflags = [] + sources = [ + "datachannel.h", + "datachannelinterface.h", + "dtmfsenderinterface.h", + "jsep.h", + "jsepicecandidate.h", + "jsepsessiondescription.h", + "mediaconstraintsinterface.cc", + "mediaconstraintsinterface.h", + "mediacontroller.h", + "mediastream.h", + "mediastreaminterface.cc", + "mediastreaminterface.h", + "mediastreamproxy.h", + "mediastreamtrack.h", + "mediastreamtrackproxy.h", + "mediatypes.cc", + "mediatypes.h", + "notifier.h", + "peerconnectionfactoryproxy.h", + "peerconnectioninterface.h", + "peerconnectionproxy.h", + "proxy.h", + "rtcerror.cc", + "rtcerror.h", + "rtpparameters.h", + "rtpreceiverinterface.h", + "rtpsender.h", + "rtpsenderinterface.h", + "statstypes.cc", + "statstypes.h", + "streamcollection.h", + "umametrics.h", + "videosourceproxy.h", + "videotracksource.h", + "webrtcsdp.h", + ] + + if (!build_with_chromium && is_clang) { + # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). + suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] + } + + deps = [ + ":rtc_stats_api", + "..:webrtc_common", + "../base:rtc_base", + "../base:rtc_base_approved", + "audio_codecs:audio_codecs_api", + ] + + # This is needed until bugs.webrtc.org/7504 is removed so this target can + # properly depend on ../media:rtc_media_base + # TODO(kjellander): Remove this dependency. + if (is_nacl) { + deps += [ "//native_client_sdk/src/libraries/nacl_io" ] + } +} + +rtc_source_set("ortc_api") { + check_includes = false # TODO(deadbeef): Remove (bugs.webrtc.org/6828) + sources = [ + "ortc/mediadescription.cc", + "ortc/mediadescription.h", + "ortc/ortcfactoryinterface.h", + "ortc/ortcrtpreceiverinterface.h", + "ortc/ortcrtpsenderinterface.h", + "ortc/packettransportinterface.h", + "ortc/rtptransportcontrollerinterface.h", + "ortc/rtptransportinterface.h", + "ortc/sessiondescription.cc", + "ortc/sessiondescription.h", + "ortc/srtptransportinterface.h", + "ortc/udptransportinterface.h", + ] + + # For mediastreaminterface.h, etc. + # TODO(deadbeef): Create a separate target for the common things ORTC and + # PeerConnection code shares, so that ortc_api can depend on that instead of + # libjingle_peerconnection_api. + public_deps = [ + ":libjingle_peerconnection_api", + ] + if (!build_with_chromium && is_clang) { + # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). + suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] + } +} + +# TODO(ossu): Remove once downstream projects have updated. +rtc_source_set("libjingle_peerconnection") { + public_deps = [ + "../pc:libjingle_peerconnection", + ] +} + +rtc_source_set("rtc_stats_api") { + cflags = [] + sources = [ + "stats/rtcstats.h", + "stats/rtcstats_objects.h", + "stats/rtcstatscollectorcallback.h", + "stats/rtcstatsreport.h", + ] + + deps = [ + "../base:rtc_base_approved", + ] +} + +rtc_source_set("audio_mixer_api") { + sources = [ + "audio/audio_mixer.h", + ] + + deps = [ + "../base:rtc_base_approved", + "../modules:module_api", + ] +} + +rtc_source_set("transport_api") { + sources = [ + "call/transport.h", + ] +} + +rtc_static_library("video_frame_api") { + sources = [ + "video/i420_buffer.cc", + "video/i420_buffer.h", + "video/video_frame.cc", + "video/video_frame.h", + "video/video_frame_buffer.h", + "video/video_rotation.h", + ] + + deps = [ + "../base:rtc_base_approved", + "../system_wrappers", + ] + + # TODO(nisse): This logic is duplicated in multiple places. + # Define in a single place. + if (rtc_build_libyuv) { + deps += [ "$rtc_libyuv_dir" ] + public_deps = [ + "$rtc_libyuv_dir", + ] + } else { + # Need to add a directory normally exported by libyuv. + include_dirs = [ "$rtc_libyuv_dir/include" ] + } +} + +rtc_source_set("libjingle_peerconnection_test_api") { + testonly = true + sources = [ + "test/fakeconstraints.h", + ] + + public_deps = [ + ":libjingle_peerconnection_api", + ] + + deps = [ + "../base:rtc_base_approved", + ] +} + +if (rtc_include_tests) { + rtc_source_set("mock_audio_mixer") { + testonly = true + sources = [ + "test/mock_audio_mixer.h", + ] + + public_deps = [ + ":audio_mixer_api", + ] + + deps = [ + "//testing/gmock", + "//webrtc/test:test_support", + ] + } + + rtc_source_set("fakemetricsobserver") { + testonly = true + sources = [ + "fakemetricsobserver.cc", + "fakemetricsobserver.h", + ] + deps = [ + ":libjingle_peerconnection_api", + "../base:rtc_base_approved", + ] + if (!build_with_chromium && is_clang) { + # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). + suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] + } + } + + rtc_source_set("rtc_api_unittests") { + testonly = true + + # Skip restricting visibility on mobile platforms since the tests on those + # gets additional generated targets which would require many lines here to + # cover (which would be confusing to read and hard to maintain). + if (!is_android && !is_ios) { + visibility = [ "//webrtc:rtc_unittests" ] + } + sources = [ + "ortc/mediadescription_unittest.cc", + "ortc/sessiondescription_unittest.cc", + "rtcerror_unittest.cc", + ] + + if (!build_with_chromium && is_clang) { + # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). + suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] + } + + deps = [ + ":libjingle_peerconnection_api", + ":ortc_api", + "//webrtc/test:test_support", + ] + } +} diff --git a/WebRtcNative/gn/webrtc/api/audio_codecs/BUILD.gn b/WebRtcNative/gn/webrtc/api/audio_codecs/BUILD.gn new file mode 100644 index 00000000..c05cccd5 --- /dev/null +++ b/WebRtcNative/gn/webrtc/api/audio_codecs/BUILD.gn @@ -0,0 +1,39 @@ +# Copyright (c) 2017 The WebRTC project authors. All Rights Reserved. +# +# Use of this source code is governed by a BSD-style license +# that can be found in the LICENSE file in the root of the source +# tree. An additional intellectual property rights grant can be found +# in the file PATENTS. All contributing project authors may +# be found in the AUTHORS file in the root of the source tree. + +import("../../webrtc.gni") +if (is_android) { + import("//build/config/android/config.gni") + import("//build/config/android/rules.gni") +} + +rtc_static_library("audio_codecs_api") { + sources = [ + "audio_decoder.cc", + "audio_decoder.h", + "audio_decoder_factory.h", + "audio_format.cc", + "audio_format.h", + ] + deps = [ + "../..:webrtc_common", + "../../base:rtc_base_approved", + ] +} + +rtc_static_library("builtin_audio_decoder_factory") { + sources = [ + "builtin_audio_decoder_factory.cc", + "builtin_audio_decoder_factory.h", + ] + deps = [ + ":audio_codecs_api", + "../../base:rtc_base_approved", + "../../modules/audio_coding:builtin_audio_decoder_factory_internal", + ] +} diff --git a/WebRtcNative/gn/webrtc/call/BUILD.gn b/WebRtcNative/gn/webrtc/call/BUILD.gn new file mode 100644 index 00000000..c66af682 --- /dev/null +++ b/WebRtcNative/gn/webrtc/call/BUILD.gn @@ -0,0 +1,155 @@ +# Copyright (c) 2015 The WebRTC project authors. All Rights Reserved. +# +# Use of this source code is governed by a BSD-style license +# that can be found in the LICENSE file in the root of the source +# tree. An additional intellectual property rights grant can be found +# in the file PATENTS. All contributing project authors may +# be found in the AUTHORS file in the root of the source tree. + +import("../webrtc.gni") + +rtc_static_library("call_interfaces") { + sources = [ + "audio_receive_stream.h", + "audio_send_stream.cc", + "audio_send_stream.h", + "audio_state.h", + "call.h", + "flexfec_receive_stream.h", + "rtp_transport_controller_send_interface.h", + "syncable.cc", + "syncable.h", + ] + deps = [ + "..:video_stream_api", + "..:webrtc_common", + "../api:audio_mixer_api", + "../api:libjingle_peerconnection_api", + "../api:transport_api", + "../api/audio_codecs:audio_codecs_api", + "../base:rtc_base", + "../base:rtc_base_approved", + "../modules/audio_coding:audio_encoder_factory_interface", + "../modules/audio_coding:audio_encoder_interface", + ] +} + +rtc_static_library("call") { + sources = [ + "bitrate_allocator.cc", + "call.cc", + "flexfec_receive_stream_impl.cc", + "flexfec_receive_stream_impl.h", + "rtp_transport_controller_send.cc", + "rtp_transport_controller_send.h", + ] + + if (!build_with_chromium && is_clang) { + # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). + suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] + } + + public_deps = [ + ":call_interfaces", + "../api:call_api", + ] + + deps = [ + ":call_interfaces", + "..:webrtc_common", + "../api:transport_api", + "../audio", + "../base:rtc_task_queue", + "../logging:rtc_event_log_api", + "../logging:rtc_event_log_impl", + "../modules/bitrate_controller", + "../modules/congestion_controller", + "../modules/pacing", + "../modules/rtp_rtcp", + "../modules/utility", + "../system_wrappers", + "../video", + ] +} + +if (rtc_include_tests) { + rtc_source_set("call_tests") { + testonly = true + + # Skip restricting visibility on mobile platforms since the tests on those + # gets additional generated targets which would require many lines here to + # cover (which would be confusing to read and hard to maintain). + if (!is_android && !is_ios) { + visibility = [ "//webrtc:video_engine_tests" ] + } + sources = [ + "bitrate_allocator_unittest.cc", + "bitrate_estimator_tests.cc", + "call_unittest.cc", + "flexfec_receive_stream_unittest.cc", + ] + deps = [ + ":call", + "../base:rtc_base_approved", + "../logging:rtc_event_log_api", + "../modules/audio_device:mock_audio_device", + "../modules/audio_mixer", + "../modules/bitrate_controller", + "../modules/pacing", + "../modules/rtp_rtcp", + "../system_wrappers", + "../test:audio_codec_mocks", + "../test:direct_transport", + "../test:test_common", + "../test:test_support", + "../test:video_test_common", + "//testing/gmock", + "//testing/gtest", + ] + if (!build_with_chromium && is_clang) { + # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). + suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] + } + } + + rtc_source_set("call_perf_tests") { + testonly = true + + # Skip restricting visibility on mobile platforms since the tests on those + # gets additional generated targets which would require many lines here to + # cover (which would be confusing to read and hard to maintain). + if (!is_android && !is_ios) { + visibility = [ "//webrtc:webrtc_perf_tests" ] + } + sources = [ + "call_perf_tests.cc", + "rampup_tests.cc", + "rampup_tests.h", + ] + deps = [ + ":call_interfaces", + "..:webrtc_common", + "../base:rtc_base_approved", + "../logging:rtc_event_log_api", + "../modules/audio_coding", + "../modules/audio_coding:builtin_audio_encoder_factory", + "../modules/audio_mixer:audio_mixer_impl", + "../modules/rtp_rtcp", + "../system_wrappers", + "../system_wrappers:metrics_default", + "../test:direct_transport", + "../test:fake_audio_device", + "../test:test_support", + "../test:video_test_common", + "../video", + "../voice_engine", + "//testing/gtest", + "//webrtc/test:field_trial", + "//webrtc/test:test_common", + ] + if (!build_with_chromium && is_clang) { + # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). + suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] + } + } +} diff --git a/WebRtcNative/gn/webrtc/common_audio/BUILD.gn b/WebRtcNative/gn/webrtc/common_audio/BUILD.gn new file mode 100644 index 00000000..94edcbbc --- /dev/null +++ b/WebRtcNative/gn/webrtc/common_audio/BUILD.gn @@ -0,0 +1,412 @@ +# Copyright (c) 2014 The WebRTC project authors. All Rights Reserved. +# +# Use of this source code is governed by a BSD-style license +# that can be found in the LICENSE file in the root of the source +# tree. An additional intellectual property rights grant can be found +# in the file PATENTS. All contributing project authors may +# be found in the AUTHORS file in the root of the source tree. + +import("//build/config/arm.gni") +import("../webrtc.gni") + +config("common_audio_config") { + include_dirs = [ + "resampler/include", + "signal_processing/include", + "vad/include", + ] +} + +rtc_static_library("common_audio") { + sources = [ + "audio_converter.cc", + "audio_converter.h", + "audio_ring_buffer.cc", + "audio_ring_buffer.h", + "audio_util.cc", + "blocker.cc", + "blocker.h", + "channel_buffer.cc", + "channel_buffer.h", + "fir_filter.cc", + "fir_filter.h", + "fir_filter_neon.h", + "fir_filter_sse.h", + "include/audio_util.h", + "lapped_transform.cc", + "lapped_transform.h", + "real_fourier.cc", + "real_fourier.h", + "real_fourier_ooura.cc", + "real_fourier_ooura.h", + "resampler/include/push_resampler.h", + "resampler/include/resampler.h", + "resampler/push_resampler.cc", + "resampler/push_sinc_resampler.cc", + "resampler/push_sinc_resampler.h", + "resampler/resampler.cc", + "resampler/sinc_resampler.cc", + "smoothing_filter.cc", + "smoothing_filter.h", + "sparse_fir_filter.cc", + "sparse_fir_filter.h", + "vad/include/vad.h", + "vad/vad.cc", + "wav_file.cc", + "wav_file.h", + "wav_header.cc", + "wav_header.h", + "window_generator.cc", + "window_generator.h", + ] + + deps = [ + ":sinc_resampler", + "..:webrtc_common", + "../base:gtest_prod", + "../base:rtc_base_approved", + "../system_wrappers", + ] + public_deps = [ + ":common_audio_c", + ] + + defines = [] + if (rtc_use_openmax_dl) { + sources += [ + "real_fourier_openmax.cc", + "real_fourier_openmax.h", + ] + defines += [ "RTC_USE_OPENMAX_DL" ] + if (rtc_build_openmax_dl) { + deps += [ "//third_party/openmax_dl/dl" ] + } + } + + if (rtc_build_with_neon) { + deps += [ ":common_audio_neon" ] + } + + if (is_win) { + cflags = [ "/wd4334" ] # Ignore warning on shift operator promotion. + } + + public_configs = [ ":common_audio_config" ] + + if (!build_with_chromium && is_clang) { + # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). + suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] + } + + if (current_cpu == "x86" || current_cpu == "x64") { + deps += [ ":common_audio_sse2" ] + } +} + +rtc_static_library("common_audio_c") { + visibility = [ ":*" ] # Only targets in this file can depend on this. + sources = [ + "fft4g.c", + "fft4g.h", + "ring_buffer.c", + "ring_buffer.h", + "signal_processing/auto_corr_to_refl_coef.c", + "signal_processing/auto_correlation.c", + "signal_processing/complex_fft_tables.h", + "signal_processing/copy_set_operations.c", + "signal_processing/cross_correlation.c", + "signal_processing/division_operations.c", + "signal_processing/downsample_fast.c", + "signal_processing/energy.c", + "signal_processing/filter_ar.c", + "signal_processing/filter_ma_fast_q12.c", + "signal_processing/get_hanning_window.c", + "signal_processing/get_scaling_square.c", + "signal_processing/ilbc_specific_functions.c", + "signal_processing/include/real_fft.h", + "signal_processing/include/signal_processing_library.h", + "signal_processing/include/spl_inl.h", + "signal_processing/levinson_durbin.c", + "signal_processing/lpc_to_refl_coef.c", + "signal_processing/min_max_operations.c", + "signal_processing/randomization_functions.c", + "signal_processing/real_fft.c", + "signal_processing/refl_coef_to_lpc.c", + "signal_processing/resample.c", + "signal_processing/resample_48khz.c", + "signal_processing/resample_by_2.c", + "signal_processing/resample_by_2_internal.c", + "signal_processing/resample_by_2_internal.h", + "signal_processing/resample_fractional.c", + "signal_processing/spl_init.c", + "signal_processing/spl_inl.c", + "signal_processing/spl_sqrt.c", + "signal_processing/splitting_filter.c", + "signal_processing/sqrt_of_one_minus_x_squared.c", + "signal_processing/vector_scaling_operations.c", + "vad/include/webrtc_vad.h", + "vad/vad_core.c", + "vad/vad_core.h", + "vad/vad_filterbank.c", + "vad/vad_filterbank.h", + "vad/vad_gmm.c", + "vad/vad_gmm.h", + "vad/vad_sp.c", + "vad/vad_sp.h", + "vad/webrtc_vad.c", + ] + + if (current_cpu == "arm") { + sources += [ + "signal_processing/complex_bit_reverse_arm.S", + "signal_processing/spl_sqrt_floor_arm.S", + ] + + if (arm_version >= 7) { + sources += [ "signal_processing/filter_ar_fast_q12_armv7.S" ] + } else { + sources += [ "signal_processing/filter_ar_fast_q12.c" ] + } + } + + if (current_cpu == "mipsel") { + sources += [ + "signal_processing/complex_bit_reverse_mips.c", + "signal_processing/complex_fft_mips.c", + "signal_processing/cross_correlation_mips.c", + "signal_processing/downsample_fast_mips.c", + "signal_processing/filter_ar_fast_q12_mips.c", + "signal_processing/include/spl_inl_mips.h", + "signal_processing/min_max_operations_mips.c", + "signal_processing/resample_by_2_mips.c", + "signal_processing/spl_sqrt_floor_mips.c", + ] + if (mips_dsp_rev > 0) { + sources += [ "signal_processing/vector_scaling_operations_mips.c" ] + } + } else { + sources += [ "signal_processing/complex_fft.c" ] + } + + if (current_cpu != "arm" && current_cpu != "mipsel") { + sources += [ + "signal_processing/complex_bit_reverse.c", + "signal_processing/filter_ar_fast_q12.c", + "signal_processing/spl_sqrt_floor.c", + ] + } + + if (is_win) { + cflags = [ "/wd4334" ] # Ignore warning on shift operator promotion. + } + + public_configs = [ ":common_audio_config" ] + deps = [ + ":common_audio_cc", + "..:webrtc_common", + "../base:rtc_base_approved", + "../system_wrappers:system_wrappers", + ] +} + +rtc_static_library("common_audio_cc") { + visibility = [ ":*" ] # Only targets in this file can depend on this. + sources = [ + "signal_processing/dot_product_with_scale.cc", + "signal_processing/dot_product_with_scale.h", + ] + + public_configs = [ ":common_audio_config" ] + deps = [ + "..:webrtc_common", + "../base:rtc_base_approved", + "../system_wrappers:system_wrappers", + ] +} + +rtc_source_set("sinc_resampler") { + sources = [ + "resampler/sinc_resampler.h", + ] + deps = [ + "..:webrtc_common", + "../base:gtest_prod", + "../base:rtc_base_approved", + "../system_wrappers", + ] +} + +if (current_cpu == "x86" || current_cpu == "x64") { + rtc_static_library("common_audio_sse2") { + # TODO(kjellander): Remove (bugs.webrtc.org/6828) + # Enabling GN check triggers dependency cycle: + # //webrtc/common_audio:common_audio -> + # //webrtc/common_audio:common_audio_sse2 -> + # //webrtc/common_audio:common_audio + check_includes = false + sources = [ + "fir_filter_sse.cc", + "resampler/sinc_resampler_sse.cc", + ] + + if (is_posix) { + cflags = [ "-msse2" ] + } + + if (!build_with_chromium && is_clang) { + # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). + suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] + } + deps = [ + ":sinc_resampler", + ] + } +} + +if (rtc_build_with_neon) { + rtc_static_library("common_audio_neon") { + # TODO(kjellander): Remove (bugs.webrtc.org/6828) + # Enabling GN check triggers dependency cycle: + # //webrtc/common_audio:common_audio -> + # //webrtc/common_audio:common_audio_neon -> + # //webrtc/common_audio:common_audio + check_includes = false + sources = [ + "fir_filter_neon.cc", + "resampler/sinc_resampler_neon.cc", + ] + + if (current_cpu != "arm64") { + # Enable compilation for the NEON instruction set. This is needed + # since //build/config/arm.gni only enables NEON for iOS, not Android. + # This provides the same functionality as webrtc/build/arm_neon.gypi. + suppressed_configs += [ "//build/config/compiler:compiler_arm_fpu" ] + cflags = [ "-mfpu=neon" ] + } + + # Disable LTO on NEON targets due to compiler bug. + # TODO(fdegans): Enable this. See crbug.com/408997. + if (rtc_use_lto) { + cflags -= [ + "-flto", + "-ffat-lto-objects", + ] + } + + if (!build_with_chromium && is_clang) { + # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). + suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] + } + + deps = [ + ":sinc_resampler", + ] + + public_deps = [ + ":common_audio_neon_c", + ] + } + + rtc_source_set("common_audio_neon_c") { + visibility = [ ":*" ] # Only targets in this file can depend on this. + sources = [ + "signal_processing/cross_correlation_neon.c", + "signal_processing/downsample_fast_neon.c", + "signal_processing/min_max_operations_neon.c", + ] + + if (current_cpu != "arm64") { + # Enable compilation for the NEON instruction set. This is needed + # since //build/config/arm.gni only enables NEON for iOS, not Android. + # This provides the same functionality as webrtc/build/arm_neon.gypi. + suppressed_configs += [ "//build/config/compiler:compiler_arm_fpu" ] + cflags = [ "-mfpu=neon" ] + } + + # Disable LTO on NEON targets due to compiler bug. + # TODO(fdegans): Enable this. See crbug.com/408997. + if (rtc_use_lto) { + cflags -= [ + "-flto", + "-ffat-lto-objects", + ] + } + + if (!build_with_chromium && is_clang) { + # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). + suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] + } + deps = [ + ":common_audio_c", + "../base:rtc_base_approved", + ] + } +} + +if (rtc_include_tests) { + rtc_test("common_audio_unittests") { + testonly = true + + sources = [ + "audio_converter_unittest.cc", + "audio_ring_buffer_unittest.cc", + "audio_util_unittest.cc", + "blocker_unittest.cc", + "channel_buffer_unittest.cc", + "fir_filter_unittest.cc", + "lapped_transform_unittest.cc", + "real_fourier_unittest.cc", + "resampler/push_resampler_unittest.cc", + "resampler/push_sinc_resampler_unittest.cc", + "resampler/resampler_unittest.cc", + "resampler/sinusoidal_linear_chirp_source.cc", + "resampler/sinusoidal_linear_chirp_source.h", + "ring_buffer_unittest.cc", + "signal_processing/real_fft_unittest.cc", + "signal_processing/signal_processing_unittest.cc", + "smoothing_filter_unittest.cc", + "sparse_fir_filter_unittest.cc", + "vad/vad_core_unittest.cc", + "vad/vad_filterbank_unittest.cc", + "vad/vad_gmm_unittest.cc", + "vad/vad_sp_unittest.cc", + "vad/vad_unittest.cc", + "vad/vad_unittest.h", + "wav_file_unittest.cc", + "wav_header_unittest.cc", + "window_generator_unittest.cc", + ] + + # Does not compile on iOS for arm: webrtc:5544. + if (!is_ios || target_cpu != "arm") { + sources += [ "resampler/sinc_resampler_unittest.cc" ] + } + + if (rtc_use_openmax_dl) { + defines = [ "RTC_USE_OPENMAX_DL" ] + } + + if (!build_with_chromium && is_clang) { + # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). + suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] + } + + deps = [ + ":common_audio", + ":sinc_resampler", + "..:webrtc_common", + "../base:rtc_base_approved", + "../base:rtc_base_tests_utils", + "../system_wrappers", + "../test:test_main", + "//testing/gmock", + "//testing/gtest", + ] + + if (is_android) { + deps += [ "//testing/android/native_test:native_test_support" ] + + shard_timeout = 900 + } + } +} diff --git a/WebRtcNative/gn/webrtc/modules/audio_coding/BUILD.gn b/WebRtcNative/gn/webrtc/modules/audio_coding/BUILD.gn new file mode 100644 index 00000000..acc1e3c8 --- /dev/null +++ b/WebRtcNative/gn/webrtc/modules/audio_coding/BUILD.gn @@ -0,0 +1,2234 @@ +# Copyright (c) 2014 The WebRTC project authors. All Rights Reserved. +# +# Use of this source code is governed by a BSD-style license +# that can be found in the LICENSE file in the root of the source +# tree. An additional intellectual property rights grant can be found +# in the file PATENTS. All contributing project authors may +# be found in the AUTHORS file in the root of the source tree. + +import("../../webrtc.gni") +import("audio_coding.gni") +import("//build/config/arm.gni") +import("//third_party/protobuf/proto_library.gni") + +audio_codec_deps = [ + ":cng", + ":g711", + ":pcm16b", +] +if (rtc_include_ilbc) { + audio_codec_deps += [ ":ilbc" ] +} +if (rtc_include_opus) { + audio_codec_deps += [ ":webrtc_opus" ] +} +if (!build_with_mozilla) { + if (current_cpu == "arm") { + audio_codec_deps += [ ":isac_fix" ] + } else { + audio_codec_deps += [ ":isac" ] + } + audio_codec_deps += [ ":g722" ] +} +if (!build_with_mozilla && !build_with_chromium) { + audio_codec_deps += [ ":red" ] +} +audio_coding_deps = audio_codec_deps + [ + "../..:webrtc_common", + "../../common_audio", + "../../system_wrappers", + ] + +rtc_static_library("audio_format_conversion") { + sources = [ + "codecs/audio_format_conversion.cc", + "codecs/audio_format_conversion.h", + ] + deps = [ + "../..:webrtc_common", + "../../api/audio_codecs:audio_codecs_api", + "../../base:rtc_base_approved", + ] +} + +rtc_source_set("audio_encoder_factory_interface") { + sources = [ + "codecs/audio_encoder_factory.h", + ] + deps = [ + ":audio_encoder_interface", + "../../api/audio_codecs:audio_codecs_api", + "../../base:rtc_base_approved", + ] +} + +rtc_static_library("builtin_audio_encoder_factory") { + # TODO(kjellander): Remove (bugs.webrtc.org/6828) + # Errors on cyclic dependency with :isac_fix if enabled. + check_includes = false + sources = [ + "codecs/builtin_audio_encoder_factory.cc", + "codecs/builtin_audio_encoder_factory.h", + ] + deps = [ + "../..:webrtc_common", + "../../base:protobuf_utils", + "../../base:rtc_base_approved", + ":audio_encoder_factory_interface", + ] + audio_codec_deps + defines = audio_codec_defines +} + +rtc_static_library("builtin_audio_decoder_factory_internal") { + sources = [ + "codecs/builtin_audio_decoder_factory_internal.cc", + "codecs/builtin_audio_decoder_factory_internal.h", + ] + deps = [ + "../..:webrtc_common", + "../../base:rtc_base_approved", + "../../api/audio_codecs:audio_codecs_api", + ] + audio_codec_deps + defines = audio_codec_defines +} + +rtc_static_library("rent_a_codec") { + sources = [ + "acm2/acm_codec_database.cc", + "acm2/acm_codec_database.h", + "acm2/rent_a_codec.cc", + "acm2/rent_a_codec.h", + ] + deps = [ + "../../api/audio_codecs:audio_codecs_api", + "../..:webrtc_common", + "../../base:protobuf_utils", + "../../base:rtc_base_approved", + "../../system_wrappers", + ":audio_coding_module_typedefs", + ":audio_encoder_interface", + ":isac_common", + ":isac_fix_c", + ":neteq_decoder_enum", + ] + audio_codec_deps + + defines = audio_codec_defines +} + +config("audio_coding_config") { + include_dirs = [ + "include", + "../include", + ] +} + +rtc_source_set("audio_coding_module_typedefs") { + sources = [ + "include/audio_coding_module_typedefs.h", + ] + deps = [ + "..:module_api", + "../..:webrtc_common", + ] +} + +rtc_static_library("audio_coding") { + sources = [ + "acm2/acm_receiver.cc", + "acm2/acm_receiver.h", + "acm2/acm_resampler.cc", + "acm2/acm_resampler.h", + "acm2/audio_coding_module.cc", + "acm2/call_statistics.cc", + "acm2/call_statistics.h", + "acm2/codec_manager.cc", + "acm2/codec_manager.h", + "include/audio_coding_module.h", + ] + + defines = [] + + public_configs = [ ":audio_coding_config" ] + + if (rtc_include_opus) { + public_deps = [ + ":webrtc_opus", + ] + } + + if (is_win) { + cflags = [ + # TODO(kjellander): Bug 261: fix this warning. + "/wd4373", # virtual function override. + ] + } + + deps = audio_coding_deps + [ + "..:module_api", + "../../api/audio_codecs:audio_codecs_api", + "../../api/audio_codecs:builtin_audio_decoder_factory", + ":audio_coding_module_typedefs", + ":audio_encoder_interface", + ":neteq", + ":rent_a_codec", + "../../base:rtc_base_approved", + "../../logging:rtc_event_log_api", + ] + defines = audio_coding_defines +} + +rtc_static_library("legacy_encoded_audio_frame") { + sources = [ + "codecs/legacy_encoded_audio_frame.cc", + "codecs/legacy_encoded_audio_frame.h", + ] + deps = [ + "../../api/audio_codecs:audio_codecs_api", + "../../base:rtc_base_approved", + ] +} + +rtc_static_library("audio_encoder_interface") { + sources = [ + "codecs/audio_encoder.cc", + "codecs/audio_encoder.h", + ] + deps = [ + "../..:webrtc_common", + "../../base:rtc_base_approved", + ] +} + +config("cng_config") { + include_dirs = [ + "../../..", + "codecs/cng/include", + ] +} + +rtc_static_library("cng") { + sources = [ + "codecs/cng/audio_encoder_cng.cc", + "codecs/cng/audio_encoder_cng.h", + "codecs/cng/webrtc_cng.cc", + "codecs/cng/webrtc_cng.h", + ] + + public_configs = [ ":cng_config" ] + + deps = [ + ":audio_encoder_interface", + "../..:webrtc_common", + "../../base:rtc_base_approved", + "../../common_audio", + ] +} + +config("red_config") { + include_dirs = [ "codecs/red" ] +} + +rtc_static_library("red") { + sources = [ + "codecs/red/audio_encoder_copy_red.cc", + "codecs/red/audio_encoder_copy_red.h", + ] + + public_configs = [ ":red_config" ] + + deps = [ + ":audio_encoder_interface", + "../../base:rtc_base_approved", + "../../common_audio", + ] +} + +config("g711_config") { + include_dirs = [ + "../../..", + "codecs/g711/include", + ] +} + +rtc_static_library("g711") { + sources = [ + "codecs/g711/audio_decoder_pcm.cc", + "codecs/g711/audio_decoder_pcm.h", + "codecs/g711/audio_encoder_pcm.cc", + "codecs/g711/audio_encoder_pcm.h", + ] + + public_configs = [ ":g711_config" ] + + deps = [ + ":audio_encoder_interface", + ":legacy_encoded_audio_frame", + "../..:webrtc_common", + "../../api/audio_codecs:audio_codecs_api", + "../../base:rtc_base_approved", + ] + public_deps = [ + ":g711_c", + ] +} + +rtc_static_library("g711_c") { + visibility = [ ":*" ] # Only targets in this file can depend on this. + sources = [ + "codecs/g711/g711.c", + "codecs/g711/g711.h", + "codecs/g711/g711_interface.c", + "codecs/g711/g711_interface.h", + ] + deps = [ + "../..:webrtc_common", + ] +} + +config("g722_config") { + include_dirs = [ + "../../..", + "codecs/g722/include", + ] +} + +rtc_static_library("g722") { + sources = [ + "codecs/g722/audio_decoder_g722.cc", + "codecs/g722/audio_decoder_g722.h", + "codecs/g722/audio_encoder_g722.cc", + "codecs/g722/audio_encoder_g722.h", + ] + + public_configs = [ ":g722_config" ] + + deps = [ + ":audio_encoder_interface", + ":legacy_encoded_audio_frame", + "../..:webrtc_common", + "../../api/audio_codecs:audio_codecs_api", + "../../base:rtc_base_approved", + ] + public_deps = [ + ":g722_c", + ] +} + +rtc_static_library("g722_c") { + visibility = [ ":*" ] # Only targets in this file can depend on this. + sources = [ + "codecs/g722/g722_decode.c", + "codecs/g722/g722_enc_dec.h", + "codecs/g722/g722_encode.c", + "codecs/g722/g722_interface.c", + "codecs/g722/g722_interface.h", + ] + deps = [ + "../..:webrtc_common", + ] +} + +config("ilbc_config") { + include_dirs = [ + "../../..", + "codecs/ilbc/include", + ] +} + +rtc_static_library("ilbc") { + sources = [ + "codecs/ilbc/audio_decoder_ilbc.cc", + "codecs/ilbc/audio_decoder_ilbc.h", + "codecs/ilbc/audio_encoder_ilbc.cc", + "codecs/ilbc/audio_encoder_ilbc.h", + ] + + public_configs = [ ":ilbc_config" ] + + deps = [ + ":audio_encoder_interface", + ":legacy_encoded_audio_frame", + "../..:webrtc_common", + "../../api/audio_codecs:audio_codecs_api", + "../../base:rtc_base_approved", + "../../common_audio", + ] + public_deps = [ + ":ilbc_c", + ] +} + +rtc_static_library("ilbc_c") { + visibility = [ ":*" ] # Only targets in this file can depend on this. + sources = [ + "codecs/ilbc/abs_quant.c", + "codecs/ilbc/abs_quant.h", + "codecs/ilbc/abs_quant_loop.c", + "codecs/ilbc/abs_quant_loop.h", + "codecs/ilbc/augmented_cb_corr.c", + "codecs/ilbc/augmented_cb_corr.h", + "codecs/ilbc/bw_expand.c", + "codecs/ilbc/bw_expand.h", + "codecs/ilbc/cb_construct.c", + "codecs/ilbc/cb_construct.h", + "codecs/ilbc/cb_mem_energy.c", + "codecs/ilbc/cb_mem_energy.h", + "codecs/ilbc/cb_mem_energy_augmentation.c", + "codecs/ilbc/cb_mem_energy_augmentation.h", + "codecs/ilbc/cb_mem_energy_calc.c", + "codecs/ilbc/cb_mem_energy_calc.h", + "codecs/ilbc/cb_search.c", + "codecs/ilbc/cb_search.h", + "codecs/ilbc/cb_search_core.c", + "codecs/ilbc/cb_search_core.h", + "codecs/ilbc/cb_update_best_index.c", + "codecs/ilbc/cb_update_best_index.h", + "codecs/ilbc/chebyshev.c", + "codecs/ilbc/chebyshev.h", + "codecs/ilbc/comp_corr.c", + "codecs/ilbc/comp_corr.h", + "codecs/ilbc/constants.c", + "codecs/ilbc/constants.h", + "codecs/ilbc/create_augmented_vec.c", + "codecs/ilbc/create_augmented_vec.h", + "codecs/ilbc/decode.c", + "codecs/ilbc/decode.h", + "codecs/ilbc/decode_residual.c", + "codecs/ilbc/decode_residual.h", + "codecs/ilbc/decoder_interpolate_lsf.c", + "codecs/ilbc/decoder_interpolate_lsf.h", + "codecs/ilbc/defines.h", + "codecs/ilbc/do_plc.c", + "codecs/ilbc/do_plc.h", + "codecs/ilbc/encode.c", + "codecs/ilbc/encode.h", + "codecs/ilbc/energy_inverse.c", + "codecs/ilbc/energy_inverse.h", + "codecs/ilbc/enh_upsample.c", + "codecs/ilbc/enh_upsample.h", + "codecs/ilbc/enhancer.c", + "codecs/ilbc/enhancer.h", + "codecs/ilbc/enhancer_interface.c", + "codecs/ilbc/enhancer_interface.h", + "codecs/ilbc/filtered_cb_vecs.c", + "codecs/ilbc/filtered_cb_vecs.h", + "codecs/ilbc/frame_classify.c", + "codecs/ilbc/frame_classify.h", + "codecs/ilbc/gain_dequant.c", + "codecs/ilbc/gain_dequant.h", + "codecs/ilbc/gain_quant.c", + "codecs/ilbc/gain_quant.h", + "codecs/ilbc/get_cd_vec.c", + "codecs/ilbc/get_cd_vec.h", + "codecs/ilbc/get_lsp_poly.c", + "codecs/ilbc/get_lsp_poly.h", + "codecs/ilbc/get_sync_seq.c", + "codecs/ilbc/get_sync_seq.h", + "codecs/ilbc/hp_input.c", + "codecs/ilbc/hp_input.h", + "codecs/ilbc/hp_output.c", + "codecs/ilbc/hp_output.h", + "codecs/ilbc/ilbc.c", + "codecs/ilbc/ilbc.h", + "codecs/ilbc/index_conv_dec.c", + "codecs/ilbc/index_conv_dec.h", + "codecs/ilbc/index_conv_enc.c", + "codecs/ilbc/index_conv_enc.h", + "codecs/ilbc/init_decode.c", + "codecs/ilbc/init_decode.h", + "codecs/ilbc/init_encode.c", + "codecs/ilbc/init_encode.h", + "codecs/ilbc/interpolate.c", + "codecs/ilbc/interpolate.h", + "codecs/ilbc/interpolate_samples.c", + "codecs/ilbc/interpolate_samples.h", + "codecs/ilbc/lpc_encode.c", + "codecs/ilbc/lpc_encode.h", + "codecs/ilbc/lsf_check.c", + "codecs/ilbc/lsf_check.h", + "codecs/ilbc/lsf_interpolate_to_poly_dec.c", + "codecs/ilbc/lsf_interpolate_to_poly_dec.h", + "codecs/ilbc/lsf_interpolate_to_poly_enc.c", + "codecs/ilbc/lsf_interpolate_to_poly_enc.h", + "codecs/ilbc/lsf_to_lsp.c", + "codecs/ilbc/lsf_to_lsp.h", + "codecs/ilbc/lsf_to_poly.c", + "codecs/ilbc/lsf_to_poly.h", + "codecs/ilbc/lsp_to_lsf.c", + "codecs/ilbc/lsp_to_lsf.h", + "codecs/ilbc/my_corr.c", + "codecs/ilbc/my_corr.h", + "codecs/ilbc/nearest_neighbor.c", + "codecs/ilbc/nearest_neighbor.h", + "codecs/ilbc/pack_bits.c", + "codecs/ilbc/pack_bits.h", + "codecs/ilbc/poly_to_lsf.c", + "codecs/ilbc/poly_to_lsf.h", + "codecs/ilbc/poly_to_lsp.c", + "codecs/ilbc/poly_to_lsp.h", + "codecs/ilbc/refiner.c", + "codecs/ilbc/refiner.h", + "codecs/ilbc/simple_interpolate_lsf.c", + "codecs/ilbc/simple_interpolate_lsf.h", + "codecs/ilbc/simple_lpc_analysis.c", + "codecs/ilbc/simple_lpc_analysis.h", + "codecs/ilbc/simple_lsf_dequant.c", + "codecs/ilbc/simple_lsf_dequant.h", + "codecs/ilbc/simple_lsf_quant.c", + "codecs/ilbc/simple_lsf_quant.h", + "codecs/ilbc/smooth.c", + "codecs/ilbc/smooth.h", + "codecs/ilbc/smooth_out_data.c", + "codecs/ilbc/smooth_out_data.h", + "codecs/ilbc/sort_sq.c", + "codecs/ilbc/sort_sq.h", + "codecs/ilbc/split_vq.c", + "codecs/ilbc/split_vq.h", + "codecs/ilbc/state_construct.c", + "codecs/ilbc/state_construct.h", + "codecs/ilbc/state_search.c", + "codecs/ilbc/state_search.h", + "codecs/ilbc/swap_bytes.c", + "codecs/ilbc/swap_bytes.h", + "codecs/ilbc/unpack_bits.c", + "codecs/ilbc/unpack_bits.h", + "codecs/ilbc/vq3.c", + "codecs/ilbc/vq3.h", + "codecs/ilbc/vq4.c", + "codecs/ilbc/vq4.h", + "codecs/ilbc/window32_w32.c", + "codecs/ilbc/window32_w32.h", + "codecs/ilbc/xcorr_coef.c", + "codecs/ilbc/xcorr_coef.h", + ] + + public_configs = [ ":ilbc_config" ] + + deps = [ + ":audio_encoder_interface", + "../..:webrtc_common", + "../../api/audio_codecs:audio_codecs_api", + "../../base:rtc_base_approved", + "../../common_audio", + ] +} + +rtc_static_library("isac_common") { + sources = [ + "codecs/isac/audio_encoder_isac_t.h", + "codecs/isac/audio_encoder_isac_t_impl.h", + "codecs/isac/locked_bandwidth_info.cc", + "codecs/isac/locked_bandwidth_info.h", + ] + deps = [ + ":audio_encoder_interface", + "../..:webrtc_common", + "../../api/audio_codecs:audio_codecs_api", + "../../base:rtc_base_approved", + ] +} + +config("isac_config") { + include_dirs = [ + "../../..", + "codecs/isac/main/include", + ] +} + +rtc_static_library("isac") { + sources = [ + "codecs/isac/main/include/audio_decoder_isac.h", + "codecs/isac/main/include/audio_encoder_isac.h", + "codecs/isac/main/source/audio_decoder_isac.cc", + "codecs/isac/main/source/audio_encoder_isac.cc", + ] + + deps = [ + ":audio_encoder_interface", + ":isac_common", + "../../api/audio_codecs:audio_codecs_api", + ] + public_deps = [ + ":isac_c", + ] +} + +rtc_static_library("isac_c") { + visibility = [ ":*" ] # Only targets in this file can depend on this. + sources = [ + "codecs/isac/main/include/isac.h", + "codecs/isac/main/source/arith_routines.c", + "codecs/isac/main/source/arith_routines.h", + "codecs/isac/main/source/arith_routines_hist.c", + "codecs/isac/main/source/arith_routines_logist.c", + "codecs/isac/main/source/bandwidth_estimator.c", + "codecs/isac/main/source/bandwidth_estimator.h", + "codecs/isac/main/source/codec.h", + "codecs/isac/main/source/crc.c", + "codecs/isac/main/source/crc.h", + "codecs/isac/main/source/decode.c", + "codecs/isac/main/source/decode_bwe.c", + "codecs/isac/main/source/encode.c", + "codecs/isac/main/source/encode_lpc_swb.c", + "codecs/isac/main/source/encode_lpc_swb.h", + "codecs/isac/main/source/entropy_coding.c", + "codecs/isac/main/source/entropy_coding.h", + "codecs/isac/main/source/fft.c", + "codecs/isac/main/source/fft.h", + "codecs/isac/main/source/filter_functions.c", + "codecs/isac/main/source/filterbank_tables.c", + "codecs/isac/main/source/filterbank_tables.h", + "codecs/isac/main/source/filterbanks.c", + "codecs/isac/main/source/intialize.c", + "codecs/isac/main/source/isac.c", + "codecs/isac/main/source/isac_float_type.h", + "codecs/isac/main/source/lattice.c", + "codecs/isac/main/source/lpc_analysis.c", + "codecs/isac/main/source/lpc_analysis.h", + "codecs/isac/main/source/lpc_gain_swb_tables.c", + "codecs/isac/main/source/lpc_gain_swb_tables.h", + "codecs/isac/main/source/lpc_shape_swb12_tables.c", + "codecs/isac/main/source/lpc_shape_swb12_tables.h", + "codecs/isac/main/source/lpc_shape_swb16_tables.c", + "codecs/isac/main/source/lpc_shape_swb16_tables.h", + "codecs/isac/main/source/lpc_tables.c", + "codecs/isac/main/source/lpc_tables.h", + "codecs/isac/main/source/os_specific_inline.h", + "codecs/isac/main/source/pitch_estimator.c", + "codecs/isac/main/source/pitch_estimator.h", + "codecs/isac/main/source/pitch_filter.c", + "codecs/isac/main/source/pitch_gain_tables.c", + "codecs/isac/main/source/pitch_gain_tables.h", + "codecs/isac/main/source/pitch_lag_tables.c", + "codecs/isac/main/source/pitch_lag_tables.h", + "codecs/isac/main/source/settings.h", + "codecs/isac/main/source/spectrum_ar_model_tables.c", + "codecs/isac/main/source/spectrum_ar_model_tables.h", + "codecs/isac/main/source/structs.h", + "codecs/isac/main/source/transform.c", + ] + + if (is_linux) { + libs = [ "m" ] + } + + public_configs = [ ":isac_config" ] + + deps = [ + ":isac_common", + "../..:webrtc_common", + "../../base:rtc_base_approved", + "../../common_audio", + ] +} + +config("isac_fix_config") { + include_dirs = [ + "../../..", + "codecs/isac/fix/include", + ] +} + +rtc_static_library("isac_fix") { + sources = [ + "codecs/isac/fix/source/audio_decoder_isacfix.cc", + "codecs/isac/fix/source/audio_encoder_isacfix.cc", + ] + + public_configs = [ ":isac_fix_config" ] + + deps = [ + ":audio_encoder_interface", + ":isac_common", + "../../api/audio_codecs:audio_codecs_api", + "../../common_audio", + "../../system_wrappers", + ] + public_deps = [ + ":isac_fix_c", + ] + + if (rtc_build_with_neon) { + deps += [ ":isac_neon" ] + } +} + +rtc_static_library("isac_fix_common") { + visibility = [ ":*" ] # Only targets in this file can depend on this. + sources = [ + "codecs/isac/fix/source/codec.h", + "codecs/isac/fix/source/fft.c", + "codecs/isac/fix/source/fft.h", + "codecs/isac/fix/source/settings.h", + ] + public_configs = [ ":isac_fix_config" ] +} + +rtc_static_library("isac_fix_c") { + visibility = [ ":*" ] # Only targets in this file can depend on this. + sources = [ + "codecs/isac/fix/include/audio_decoder_isacfix.h", + "codecs/isac/fix/include/audio_encoder_isacfix.h", + "codecs/isac/fix/include/isacfix.h", + "codecs/isac/fix/source/arith_routines.c", + "codecs/isac/fix/source/arith_routines_hist.c", + "codecs/isac/fix/source/arith_routines_logist.c", + "codecs/isac/fix/source/arith_routins.h", + "codecs/isac/fix/source/bandwidth_estimator.c", + "codecs/isac/fix/source/bandwidth_estimator.h", + "codecs/isac/fix/source/decode.c", + "codecs/isac/fix/source/decode_bwe.c", + "codecs/isac/fix/source/decode_plc.c", + "codecs/isac/fix/source/encode.c", + "codecs/isac/fix/source/entropy_coding.c", + "codecs/isac/fix/source/entropy_coding.h", + "codecs/isac/fix/source/filterbank_tables.c", + "codecs/isac/fix/source/filterbank_tables.h", + "codecs/isac/fix/source/filterbanks.c", + "codecs/isac/fix/source/filters.c", + "codecs/isac/fix/source/initialize.c", + "codecs/isac/fix/source/isac_fix_type.h", + "codecs/isac/fix/source/isacfix.c", + "codecs/isac/fix/source/lattice.c", + "codecs/isac/fix/source/lattice_c.c", + "codecs/isac/fix/source/lpc_masking_model.c", + "codecs/isac/fix/source/lpc_masking_model.h", + "codecs/isac/fix/source/lpc_tables.c", + "codecs/isac/fix/source/lpc_tables.h", + "codecs/isac/fix/source/pitch_estimator.c", + "codecs/isac/fix/source/pitch_estimator.h", + "codecs/isac/fix/source/pitch_estimator_c.c", + "codecs/isac/fix/source/pitch_filter.c", + "codecs/isac/fix/source/pitch_filter_c.c", + "codecs/isac/fix/source/pitch_gain_tables.c", + "codecs/isac/fix/source/pitch_gain_tables.h", + "codecs/isac/fix/source/pitch_lag_tables.c", + "codecs/isac/fix/source/pitch_lag_tables.h", + "codecs/isac/fix/source/spectrum_ar_model_tables.c", + "codecs/isac/fix/source/spectrum_ar_model_tables.h", + "codecs/isac/fix/source/structs.h", + "codecs/isac/fix/source/transform.c", + "codecs/isac/fix/source/transform_tables.c", + ] + + public_configs = [ ":isac_fix_config" ] + + deps = [ + ":audio_encoder_interface", + ":isac_common", + "../..:webrtc_common", + "../../api/audio_codecs:audio_codecs_api", + "../../base:rtc_base_approved", + "../../common_audio", + "../../system_wrappers", + ] + + public_deps = [ + ":isac_fix_common", + ] + + if (rtc_build_with_neon) { + deps += [ ":isac_neon" ] + } + + if (current_cpu == "arm" && arm_version >= 7) { + sources += [ + "codecs/isac/fix/source/lattice_armv7.S", + "codecs/isac/fix/source/pitch_filter_armv6.S", + ] + sources -= [ + "codecs/isac/fix/source/lattice_c.c", + "codecs/isac/fix/source/pitch_filter_c.c", + ] + } + + if (current_cpu == "mipsel") { + sources += [ + "codecs/isac/fix/source/entropy_coding_mips.c", + "codecs/isac/fix/source/filters_mips.c", + "codecs/isac/fix/source/lattice_mips.c", + "codecs/isac/fix/source/pitch_estimator_mips.c", + "codecs/isac/fix/source/transform_mips.c", + ] + sources -= [ + "codecs/isac/fix/source/lattice_c.c", + "codecs/isac/fix/source/pitch_estimator_c.c", + ] + if (mips_dsp_rev > 0) { + sources += [ "codecs/isac/fix/source/filterbanks_mips.c" ] + } + if (mips_dsp_rev > 1) { + sources += [ + "codecs/isac/fix/source/lpc_masking_model_mips.c", + "codecs/isac/fix/source/pitch_filter_mips.c", + ] + sources -= [ "codecs/isac/fix/source/pitch_filter_c.c" ] + } + } +} + +if (rtc_build_with_neon) { + rtc_static_library("isac_neon") { + sources = [ + "codecs/isac/fix/source/entropy_coding_neon.c", + "codecs/isac/fix/source/filterbanks_neon.c", + "codecs/isac/fix/source/filters_neon.c", + "codecs/isac/fix/source/lattice_neon.c", + "codecs/isac/fix/source/transform_neon.c", + ] + + if (current_cpu != "arm64") { + # Enable compilation for the NEON instruction set. This is needed + # since //build/config/arm.gni only enables NEON for iOS, not Android. + # This provides the same functionality as webrtc/build/arm_neon.gypi. + suppressed_configs += [ "//build/config/compiler:compiler_arm_fpu" ] + cflags = [ "-mfpu=neon" ] + } + + # Disable LTO on NEON targets due to compiler bug. + # TODO(fdegans): Enable this. See crbug.com/408997. + if (rtc_use_lto) { + cflags -= [ + "-flto", + "-ffat-lto-objects", + ] + } + + deps = [ + ":isac_fix_common", + "../../base:rtc_base_approved", + "../../common_audio", + ] + } +} + +config("pcm16b_config") { + include_dirs = [ + "../../..", + "codecs/pcm16b/include", + ] +} + +rtc_static_library("pcm16b") { + sources = [ + "codecs/pcm16b/audio_decoder_pcm16b.cc", + "codecs/pcm16b/audio_decoder_pcm16b.h", + "codecs/pcm16b/audio_encoder_pcm16b.cc", + "codecs/pcm16b/audio_encoder_pcm16b.h", + ] + + deps = [ + ":audio_encoder_interface", + ":g711", + ":legacy_encoded_audio_frame", + "../..:webrtc_common", + "../../api/audio_codecs:audio_codecs_api", + "../../base:rtc_base_approved", + ] + public_deps = [ + ":pcm16b_c", + ] + public_configs = [ ":pcm16b_config" ] +} + +rtc_static_library("pcm16b_c") { + visibility = [ ":*" ] # Only targets in this file can depend on this. + sources = [ + "codecs/pcm16b/pcm16b.c", + "codecs/pcm16b/pcm16b.h", + ] + + public_configs = [ ":pcm16b_config" ] + deps = [ + "../..:webrtc_common", + ] +} + +config("opus_config") { + include_dirs = [ "../../.." ] +} + +rtc_static_library("webrtc_opus") { + sources = [ + "codecs/opus/audio_decoder_opus.cc", + "codecs/opus/audio_decoder_opus.h", + "codecs/opus/audio_encoder_opus.cc", + "codecs/opus/audio_encoder_opus.h", + ] + + deps = [ + ":audio_encoder_interface", + ":audio_network_adaptor", + "../..:webrtc_common", + "../../api/audio_codecs:audio_codecs_api", + "../../base:protobuf_utils", + "../../base:rtc_base_approved", + "../../base:rtc_numerics", + "../../common_audio", + "../../system_wrappers", + ] + public_deps = [ + ":webrtc_opus_c", + ] + + defines = audio_codec_defines + if (rtc_opus_variable_complexity) { + defines += [ "WEBRTC_OPUS_VARIABLE_COMPLEXITY=1" ] + } else { + defines += [ "WEBRTC_OPUS_VARIABLE_COMPLEXITY=0" ] + } + + if (rtc_build_opus) { + public_deps += [ rtc_opus_dir ] + } else if (build_with_mozilla) { + include_dirs = [ getenv("DIST") + "/include/opus" ] + } +} + +rtc_static_library("webrtc_opus_c") { + visibility = [ ":*" ] # Only targets in this file can depend on this. + sources = [ + "codecs/opus/opus_inst.h", + "codecs/opus/opus_interface.c", + "codecs/opus/opus_interface.h", + ] + + defines = audio_coding_defines + + if (rtc_build_opus) { + public_deps = [ + rtc_opus_dir, + ] + } else if (build_with_mozilla) { + include_dirs = [ getenv("DIST") + "/include/opus" ] + } + + deps = [ + "../..:webrtc_common", + "../../base:rtc_base_approved", + ] +} + +if (rtc_enable_protobuf) { + proto_library("ana_debug_dump_proto") { + sources = [ + "audio_network_adaptor/debug_dump.proto", + ] + proto_out_dir = "webrtc/modules/audio_coding/audio_network_adaptor" + } + proto_library("ana_config_proto") { + sources = [ + "audio_network_adaptor/config.proto", + ] + proto_out_dir = "webrtc/modules/audio_coding/audio_network_adaptor" + } +} + +rtc_static_library("audio_network_adaptor") { + sources = [ + "audio_network_adaptor/audio_network_adaptor.cc", + "audio_network_adaptor/audio_network_adaptor_impl.cc", + "audio_network_adaptor/audio_network_adaptor_impl.h", + "audio_network_adaptor/bitrate_controller.cc", + "audio_network_adaptor/bitrate_controller.h", + "audio_network_adaptor/channel_controller.cc", + "audio_network_adaptor/channel_controller.h", + "audio_network_adaptor/controller.cc", + "audio_network_adaptor/controller.h", + "audio_network_adaptor/controller_manager.cc", + "audio_network_adaptor/controller_manager.h", + "audio_network_adaptor/debug_dump_writer.cc", + "audio_network_adaptor/debug_dump_writer.h", + "audio_network_adaptor/dtx_controller.cc", + "audio_network_adaptor/dtx_controller.h", + "audio_network_adaptor/event_log_writer.cc", + "audio_network_adaptor/event_log_writer.h", + "audio_network_adaptor/fec_controller_plr_based.cc", + "audio_network_adaptor/fec_controller_plr_based.h", + "audio_network_adaptor/fec_controller_rplr_based.cc", + "audio_network_adaptor/fec_controller_rplr_based.h", + "audio_network_adaptor/frame_length_controller.cc", + "audio_network_adaptor/frame_length_controller.h", + "audio_network_adaptor/include/audio_network_adaptor.h", + "audio_network_adaptor/util/threshold_curve.h", + ] + + deps = [ + "../..:webrtc_common", + "../../base:protobuf_utils", + "../../base:rtc_base_approved", + "../../common_audio", + "../../logging:rtc_event_log_api", + "../../system_wrappers", + ] + + if (rtc_enable_protobuf) { + deps += [ + ":ana_config_proto", + ":ana_debug_dump_proto", + ] + defines = [ "WEBRTC_AUDIO_NETWORK_ADAPTOR_DEBUG_DUMP" ] + } + + if (!build_with_chromium && is_clang) { + # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). + suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] +} +} + +rtc_static_library("neteq_decoder_enum") { + sources = [ + "neteq/neteq_decoder_enum.cc", + "neteq/neteq_decoder_enum.h", + ] + deps = [ + "../../api/audio_codecs:audio_codecs_api", + "../../base:rtc_base_approved", + ] +} + +rtc_static_library("neteq") { + sources = [ + "neteq/accelerate.cc", + "neteq/accelerate.h", + "neteq/audio_decoder_impl.cc", + "neteq/audio_decoder_impl.h", + "neteq/audio_multi_vector.cc", + "neteq/audio_multi_vector.h", + "neteq/audio_vector.cc", + "neteq/audio_vector.h", + "neteq/background_noise.cc", + "neteq/background_noise.h", + "neteq/buffer_level_filter.cc", + "neteq/buffer_level_filter.h", + "neteq/comfort_noise.cc", + "neteq/comfort_noise.h", + "neteq/cross_correlation.cc", + "neteq/cross_correlation.h", + "neteq/decision_logic.cc", + "neteq/decision_logic.h", + "neteq/decision_logic_fax.cc", + "neteq/decision_logic_fax.h", + "neteq/decision_logic_normal.cc", + "neteq/decision_logic_normal.h", + "neteq/decoder_database.cc", + "neteq/decoder_database.h", + "neteq/defines.h", + "neteq/delay_manager.cc", + "neteq/delay_manager.h", + "neteq/delay_peak_detector.cc", + "neteq/delay_peak_detector.h", + "neteq/dsp_helper.cc", + "neteq/dsp_helper.h", + "neteq/dtmf_buffer.cc", + "neteq/dtmf_buffer.h", + "neteq/dtmf_tone_generator.cc", + "neteq/dtmf_tone_generator.h", + "neteq/expand.cc", + "neteq/expand.h", + "neteq/include/neteq.h", + "neteq/merge.cc", + "neteq/merge.h", + "neteq/nack_tracker.cc", + "neteq/nack_tracker.h", + "neteq/neteq.cc", + "neteq/neteq_impl.cc", + "neteq/neteq_impl.h", + "neteq/normal.cc", + "neteq/normal.h", + "neteq/packet.cc", + "neteq/packet.h", + "neteq/packet_buffer.cc", + "neteq/packet_buffer.h", + "neteq/post_decode_vad.cc", + "neteq/post_decode_vad.h", + "neteq/preemptive_expand.cc", + "neteq/preemptive_expand.h", + "neteq/random_vector.cc", + "neteq/random_vector.h", + "neteq/red_payload_splitter.cc", + "neteq/red_payload_splitter.h", + "neteq/rtcp.cc", + "neteq/rtcp.h", + "neteq/statistics_calculator.cc", + "neteq/statistics_calculator.h", + "neteq/sync_buffer.cc", + "neteq/sync_buffer.h", + "neteq/tick_timer.cc", + "neteq/tick_timer.h", + "neteq/time_stretch.cc", + "neteq/time_stretch.h", + "neteq/timestamp_scaler.cc", + "neteq/timestamp_scaler.h", + ] + + deps = [ + ":audio_coding_module_typedefs", + ":cng", + ":g711", + ":isac_fix", + ":neteq_decoder_enum", + ":pcm16b", + "..:module_api", + "../..:webrtc_common", + "../../api/audio_codecs:audio_codecs_api", + "../../base:gtest_prod", + "../../base:rtc_base_approved", + "../../common_audio", + "../../system_wrappers", + ] + + defines = [] + + if (rtc_include_ilbc) { + defines += [ "WEBRTC_CODEC_ILBC" ] + deps += [ ":ilbc" ] + } + if (rtc_include_opus) { + defines += [ "WEBRTC_CODEC_OPUS" ] + deps += [ ":webrtc_opus" ] + } + if (!build_with_mozilla) { + if (current_cpu == "arm") { + defines += [ "WEBRTC_CODEC_ISACFX" ] + deps += [ ":isac_fix" ] + } else { + defines += [ "WEBRTC_CODEC_ISAC" ] + deps += [ ":isac" ] + } + defines += [ "WEBRTC_CODEC_G722" ] + deps += [ ":g722" ] + } +} + +# Although providing only test support, this target must be outside of the +# rtc_include_tests conditional. The reason is that it supports fuzzer tests +# that ultimately are built and run as a part of the Chromium ecosystem, which +# does not set the rtc_include_tests flag. +rtc_source_set("neteq_tools_minimal") { + sources = [ + "neteq/tools/audio_sink.cc", + "neteq/tools/audio_sink.h", + "neteq/tools/encode_neteq_input.cc", + "neteq/tools/encode_neteq_input.h", + "neteq/tools/neteq_input.cc", + "neteq/tools/neteq_input.h", + "neteq/tools/neteq_test.cc", + "neteq/tools/neteq_test.h", + "neteq/tools/packet.cc", + "neteq/tools/packet.h", + "neteq/tools/packet_source.cc", + "neteq/tools/packet_source.h", + ] + + if (!build_with_chromium && is_clang) { + # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). + suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] + } + + deps = [ + ":audio_encoder_interface", + ":neteq", + "..:module_api", + "../..:webrtc_common", + "../../api/audio_codecs:builtin_audio_decoder_factory", + "../../base:rtc_base_approved", + "../rtp_rtcp", + ] +} + +if (rtc_include_tests) { + group("audio_coding_tests") { + testonly = true + public_deps = [ + ":RTPchange", + ":RTPencode", + ":RTPjitter", + ":RTPtimeshift", + ":acm_receive_test", + ":acm_send_test", + ":audio_codec_speed_tests", + ":audio_decoder_unittests", + ":audio_decoder_unittests", + ":delay_test", + ":g711_test", + ":g722_test", + ":ilbc_test", + ":insert_packet_with_timing", + ":isac_api_test", + ":isac_fix_test", + ":isac_switch_samprate_test", + ":isac_test", + ":neteq_ilbc_quality_test", + ":neteq_isac_quality_test", + ":neteq_opus_quality_test", + ":neteq_pcmu_quality_test", + ":neteq_speed_test", + ":rtp_analyze", + ":rtpcat", + ":webrtc_opus_fec_test", + ] + if (rtc_enable_protobuf) { + public_deps += [ ":neteq_rtpplay" ] + } + } + + rtc_source_set("audio_coding_modules_tests") { + testonly = true + + # Skip restricting visibility on mobile platforms since the tests on those + # gets additional generated targets which would require many lines here to + # cover (which would be confusing to read and hard to maintain). + if (!is_android && !is_ios) { + visibility = [ "//webrtc/modules:modules_tests" ] + } + sources = [ + "test/APITest.cc", + "test/Channel.cc", + "test/EncodeDecodeTest.cc", + "test/PCMFile.cc", + "test/PacketLossTest.cc", + "test/RTPFile.cc", + "test/TestAllCodecs.cc", + "test/TestRedFec.cc", + "test/TestStereo.cc", + "test/TestVADDTX.cc", + "test/Tester.cc", + "test/TwoWayCommunication.cc", + "test/iSACTest.cc", + "test/opus_test.cc", + "test/target_delay_unittest.cc", + "test/utility.cc", + ] + deps = [ + ":audio_coding", + ":audio_coding_module_typedefs", + ":audio_format_conversion", + ":pcm16b_c", + "..:module_api", + "../..:webrtc_common", + "../../api/audio_codecs:builtin_audio_decoder_factory", + "../../base:rtc_base_approved", + "../../system_wrappers:system_wrappers", + "../../test:test_support", + ] + defines = audio_coding_defines + if (is_win) { + cflags = [ + # TODO(kjellander): bugs.webrtc.org/261: Fix this warning. + "/wd4373", # virtual function override. + ] + } + if (!build_with_chromium && is_clang) { + # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). + suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] + } + } + + rtc_source_set("audio_coding_perf_tests") { + testonly = true + + # Skip restricting visibility on mobile platforms since the tests on those + # gets additional generated targets which would require many lines here to + # cover (which would be confusing to read and hard to maintain). + if (!is_android && !is_ios) { + visibility = [ "//webrtc:webrtc_perf_tests" ] + } + sources = [ + "codecs/opus/opus_complexity_unittest.cc", + "neteq/test/neteq_performance_unittest.cc", + ] + deps = [ + ":neteq_test_support", + ":neteq_test_tools", + ":webrtc_opus", + "../..:webrtc_common", + "../../base:protobuf_utils", + "../../base:rtc_base_approved", + "../../system_wrappers:system_wrappers", + "../../test:test_support", + ] + + if (!build_with_chromium && is_clang) { + # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). + suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] + } + } + + rtc_source_set("acm_receive_test") { + testonly = true + sources = [ + "acm2/acm_receive_test.cc", + "acm2/acm_receive_test.h", + ] + + defines = audio_coding_defines + + deps = audio_coding_deps + [ + ":audio_coding", + ":audio_format_conversion", + "../../api/audio_codecs:audio_codecs_api", + "../../api/audio_codecs:builtin_audio_decoder_factory", + ":neteq_tools", + "../../base:rtc_base_approved", + "../../test:test_support", + "//testing/gtest", + ] + } + + rtc_source_set("acm_send_test") { + testonly = true + sources = [ + "acm2/acm_send_test.cc", + "acm2/acm_send_test.h", + ] + + defines = audio_coding_defines + + deps = audio_coding_deps + [ + ":audio_coding", + "../../api/audio_codecs:audio_codecs_api", + ":audio_encoder_interface", + ":neteq_tools", + "../../base:rtc_base_approved", + "../../test:test_support", + "//testing/gtest", + ] + } + + rtc_executable("delay_test") { + testonly = true + sources = [ + "test/Channel.cc", + "test/PCMFile.cc", + "test/delay_test.cc", + "test/utility.cc", + ] + + deps = [ + ":audio_coding", + ":audio_coding_module_typedefs", + ":audio_format_conversion", + "..:module_api", + "../../:webrtc_common", + "../../base:rtc_base_approved", + "../../system_wrappers", + "../../system_wrappers:system_wrappers_default", + "../../test:test_support", + "../rtp_rtcp", + "//testing/gtest", + "//third_party/gflags:gflags", + ] + } # delay_test + + rtc_executable("insert_packet_with_timing") { + testonly = true + sources = [ + "test/Channel.cc", + "test/PCMFile.cc", + "test/insert_packet_with_timing.cc", + ] + + if (!build_with_chromium && is_clang) { + # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). + suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] + } + + deps = [ + ":audio_coding", + ":audio_format_conversion", + "..:module_api", + "../../:webrtc_common", + "../../base:rtc_base_approved", + "../../system_wrappers", + "../../system_wrappers:system_wrappers_default", + "../../test:test_support", + "../rtp_rtcp", + "//testing/gtest", + "//third_party/gflags:gflags", + ] + } # insert_packet_with_timing + + audio_decoder_unittests_resources = + [ "//resources/audio_coding/testfile32kHz.pcm" ] + + if (is_ios) { + bundle_data("audio_decoder_unittests_bundle_data") { + testonly = true + sources = audio_decoder_unittests_resources + outputs = [ + "{{bundle_resources_dir}}/{{source_file_part}}", + ] + } + } + + rtc_test("audio_decoder_unittests") { + testonly = true + sources = [ + "neteq/audio_decoder_unittest.cc", + ] + + if (!build_with_chromium && is_clang) { + # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). + suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] + } + + deps = [] + + defines = neteq_defines + + deps += audio_coding_deps + deps += [ + ":ilbc", + ":isac", + ":isac_fix", + ":neteq", + ":neteq_tools", + "../../api/audio_codecs:audio_codecs_api", + "../../base:protobuf_utils", + "../../common_audio", + "../../test:test_main", + "//testing/gtest", + ] + + data = audio_decoder_unittests_resources + + if (is_android) { + deps += [ "//testing/android/native_test:native_test_native_code" ] + shard_timeout = 900 + } + if (is_ios) { + deps += [ ":audio_decoder_unittests_bundle_data" ] + } + } # audio_decoder_unittests + + if (rtc_enable_protobuf) { + proto_library("neteq_unittest_proto") { + sources = [ + "neteq/neteq_unittest.proto", + ] + proto_out_dir = "webrtc/modules/audio_coding/neteq" + } + + rtc_static_library("rtc_event_log_source") { + testonly = true + + # TODO(kjellander): Remove (bugs.webrtc.org/6828) + # Needs call.h to be moved to webrtc/api first. + check_includes = false + + sources = [ + "neteq/tools/rtc_event_log_source.cc", + "neteq/tools/rtc_event_log_source.h", + ] + + if (!build_with_chromium && is_clang) { + # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). + suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] + } + + deps = [ + "../../base:rtc_base_approved", + "../../logging:rtc_event_log_parser", + ] + public_deps = [ + "../../logging:rtc_event_log_proto", + ] + } + + rtc_test("neteq_rtpplay") { + testonly = true + defines = [] + deps = [ + "..:module_api", + ] + sources = [ + "neteq/tools/neteq_rtpplay.cc", + ] + + if (!build_with_chromium && is_clang) { + # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). + suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] + } + + if (is_win) { + cflags = [ + # TODO(kjellander): bugs.webrtc.org/261: Fix this warning. + "/wd4373", # virtual function override. + ] + } + + deps += [ + ":neteq", + ":neteq_test_tools", + "../..:webrtc_common", + "../../base:rtc_base_approved", + "../../system_wrappers:system_wrappers_default", + "../../test:test_support", + "//third_party/gflags", + ] + } + } + + rtc_test("audio_codec_speed_tests") { + testonly = true + defines = [] + deps = [] + sources = [ + "codecs/isac/fix/test/isac_speed_test.cc", + "codecs/opus/opus_speed_test.cc", + "codecs/tools/audio_codec_speed_test.cc", + "codecs/tools/audio_codec_speed_test.h", + ] + + if (!build_with_chromium && is_clang) { + # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). + suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] + } + + if (is_android) { + deps += [ "//testing/android/native_test:native_test_native_code" ] + shard_timeout = 900 + } + + deps += [ + ":isac_fix", + ":webrtc_opus", + "../..:webrtc_common", + "../../base:rtc_base_approved", + "../../system_wrappers:system_wrappers_default", + "../../test:test_main", + "../audio_processing", + "//testing/gtest", + ] + } + + rtc_source_set("neteq_test_support") { + testonly = true + sources = [ + "neteq/tools/neteq_external_decoder_test.cc", + "neteq/tools/neteq_external_decoder_test.h", + "neteq/tools/neteq_performance_test.cc", + "neteq/tools/neteq_performance_test.h", + ] + + if (!build_with_chromium && is_clang) { + # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). + suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] + } + + deps = [ + ":neteq", + ":neteq_test_tools", + ":pcm16b", + "..:module_api", + "../..:webrtc_common", + "../../api/audio_codecs:audio_codecs_api", + "../../api/audio_codecs:builtin_audio_decoder_factory", + "../../base:rtc_base_approved", + "../../system_wrappers", + "../../test:test_support", + "//testing/gtest", + ] + } + + rtc_source_set("neteq_quality_test_support") { + testonly = true + sources = [ + "neteq/tools/neteq_quality_test.cc", + "neteq/tools/neteq_quality_test.h", + ] + + if (!build_with_chromium && is_clang) { + # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). + suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] + } + + deps = [ + ":neteq", + ":neteq_test_tools", + "..:module_api", + "../..:webrtc_common", + "../../api/audio_codecs:builtin_audio_decoder_factory", + "../../base:rtc_base_approved", + "../../test:test_support", + "//testing/gtest", + "//third_party/gflags", + ] + } + + config("neteq_tools_config") { + include_dirs = [ "tools" ] + } + + rtc_source_set("neteq_tools") { + sources = [ + "neteq/tools/fake_decode_from_file.cc", + "neteq/tools/fake_decode_from_file.h", + "neteq/tools/input_audio_file.cc", + "neteq/tools/input_audio_file.h", + "neteq/tools/neteq_replacement_input.cc", + "neteq/tools/neteq_replacement_input.h", + "neteq/tools/resample_input_audio_file.cc", + "neteq/tools/resample_input_audio_file.h", + ] + + public_configs = [ ":neteq_tools_config" ] + + if (!build_with_chromium && is_clang) { + # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). + suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] + } + + deps = [ + "../..:webrtc_common", + "../../api/audio_codecs:audio_codecs_api", + "../../base:rtc_base_approved", + "../../common_audio", + "../rtp_rtcp", + ] + + public_deps = [ + ":neteq_tools_minimal", + ] + } + + rtc_source_set("neteq_test_tools") { + testonly = true + sources = [ + "neteq/tools/audio_checksum.h", + "neteq/tools/audio_loop.cc", + "neteq/tools/audio_loop.h", + "neteq/tools/constant_pcm_packet_source.cc", + "neteq/tools/constant_pcm_packet_source.h", + "neteq/tools/output_audio_file.h", + "neteq/tools/output_wav_file.h", + "neteq/tools/rtp_file_source.cc", + "neteq/tools/rtp_file_source.h", + "neteq/tools/rtp_generator.cc", + "neteq/tools/rtp_generator.h", + ] + + public_configs = [ ":neteq_tools_config" ] + + if (!build_with_chromium && is_clang) { + # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). + suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] + } + + deps = [ + ":pcm16b", + "..:module_api", + "../..:webrtc_common", + "../../base:rtc_base_approved", + "../../base:rtc_base_tests_utils", + "../../common_audio", + "../../test:rtp_test_utils", + "../rtp_rtcp", + ] + + public_deps = [ + ":neteq_tools", + ":neteq_tools_minimal", + ] + + if (rtc_enable_protobuf) { + sources += [ + "neteq/tools/neteq_packet_source_input.cc", + "neteq/tools/neteq_packet_source_input.h", + ] + deps += [ ":rtc_event_log_source" ] + } + } + + rtc_source_set("neteq_test_tools_deprecated") { + testonly = true + sources = [ + "neteq/test/NETEQTEST_DummyRTPpacket.cc", + "neteq/test/NETEQTEST_DummyRTPpacket.h", + "neteq/test/NETEQTEST_RTPpacket.cc", + "neteq/test/NETEQTEST_RTPpacket.h", + ] + + deps = [ + ":cng", + ":g711", + ":g722", + ":ilbc", + ":isac", + ":pcm16b", + "..:module_api", + "../..:webrtc_common", + "//testing/gtest", + ] + + include_dirs = [ + "neteq/include", + "neteq/test", + "../../", + ] + + if (is_win) { + cflags = [ + # Disable warnings to enable Win64 build, issue 1323. + "/wd4267", # size_t to int truncation + ] + } + } + + config("RTPencode_config") { + defines = [ + "CODEC_ILBC", + "CODEC_PCM16B", + "CODEC_G711", + "CODEC_G722", + "CODEC_ISAC", + "CODEC_PCM16B_WB", + "CODEC_ISAC_SWB", + "CODEC_PCM16B_32KHZ", + "CODEC_PCM16B_48KHZ", + "CODEC_CNGCODEC8", + "CODEC_CNGCODEC16", + "CODEC_CNGCODEC32", + "CODEC_ATEVENT_DECODE", + "CODEC_RED", + "CODEC_OPUS", + ] + } + + rtc_executable("RTPencode") { + testonly = true + + deps = [ + # TODO(hlundin): Make RTPencode use ACM to encode files. + ":cng", + ":g711", + ":g722", + ":ilbc", + ":isac", + ":neteq", + ":neteq_test_tools_deprecated", + ":pcm16b", + ":webrtc_opus", + "../..:webrtc_common", + "../../base:rtc_base_approved", + "../../common_audio", + ] + + configs += [ ":RTPencode_config" ] + + sources = [ + "neteq/test/RTPencode.cc", + ] + + include_dirs = [ + "neteq/include", + "neteq/test", + ] + + if (is_win) { + cflags = [ + # Disable warnings to enable Win64 build, issue 1323. + "/wd4267", # size_t to int truncation + ] + } + } + + rtc_executable("RTPchange") { + testonly = true + + sources = [ + "neteq/test/RTPchange.cc", + ] + + deps = [ + ":neteq_test_tools_deprecated", + ] + } + + rtc_executable("rtpcat") { + testonly = true + + sources = [ + "neteq/tools/rtpcat.cc", + ] + + deps = [ + "../../base:rtc_base_approved", + "../../system_wrappers:system_wrappers_default", + "../../test:rtp_test_utils", + "//testing/gtest", + ] + } + + rtc_executable("RTPtimeshift") { + testonly = true + + sources = [ + "neteq/test/RTPtimeshift.cc", + ] + + deps = [ + ":neteq_test_tools_deprecated", + "../../test:test_support", + "//testing/gtest", + ] + } + + rtc_executable("RTPjitter") { + testonly = true + deps = [ + "../..:webrtc_common", + "../../base:rtc_base_approved", + "../../test:test_support", + "//testing/gtest", + ] + sources = [ + "neteq/test/RTPjitter.cc", + ] + } + + rtc_executable("rtp_analyze") { + testonly = true + + sources = [ + "neteq/tools/rtp_analyze.cc", + ] + + deps = [ + ":neteq", + ":neteq_test_tools", + ":pcm16b", + "../../system_wrappers:system_wrappers_default", + "//testing/gtest", + "//third_party/gflags:gflags", + ] + + if (!build_with_chromium && is_clang) { + # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). + suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] + } + } + + rtc_executable("neteq_opus_quality_test") { + testonly = true + + sources = [ + "neteq/test/neteq_opus_quality_test.cc", + ] + + deps = [ + ":neteq", + ":neteq_quality_test_support", + ":neteq_tools", + ":webrtc_opus", + "../../test:test_main", + "//testing/gtest", + "//third_party/gflags", + ] + } + + rtc_executable("neteq_speed_test") { + testonly = true + + sources = [ + "neteq/test/neteq_speed_test.cc", + ] + + deps = [ + ":neteq", + ":neteq_test_support", + "../..:webrtc_common", + "../../system_wrappers:system_wrappers_default", + "../../test:test_support", + "//third_party/gflags", + ] + } + + rtc_executable("neteq_ilbc_quality_test") { + testonly = true + + sources = [ + "neteq/test/neteq_ilbc_quality_test.cc", + ] + + deps = [ + ":ilbc", + ":neteq", + ":neteq_quality_test_support", + ":neteq_tools", + "../..:webrtc_common", + "../../base:rtc_base_approved", + "../../system_wrappers:system_wrappers_default", + "../../test:test_main", + "//testing/gtest", + "//third_party/gflags", + ] + } + + rtc_executable("neteq_isac_quality_test") { + testonly = true + + sources = [ + "neteq/test/neteq_isac_quality_test.cc", + ] + + deps = [ + ":isac_fix", + ":neteq", + ":neteq_quality_test_support", + "../../base:rtc_base_approved", + "../../test:test_main", + "//testing/gtest", + "//third_party/gflags", + ] + } + + rtc_executable("neteq_pcmu_quality_test") { + testonly = true + + sources = [ + "neteq/test/neteq_pcmu_quality_test.cc", + ] + + deps = [ + ":g711", + ":neteq", + ":neteq_quality_test_support", + "../../base:rtc_base_approved", + "../../test:test_main", + "//testing/gtest", + "//third_party/gflags", + ] + } + + rtc_executable("isac_fix_test") { + testonly = true + + sources = [ + "codecs/isac/fix/test/kenny.cc", + ] + + deps = [ + ":isac_fix", + "../../test:test_support", + ] + + if (is_win) { + cflags = [ + # Disable warnings to enable Win64 build, issue 1323. + "/wd4267", # size_t to int truncation + ] + } + } + + config("isac_test_warnings_config") { + if (is_win && is_clang) { + cflags = [ + # Disable warnings failing when compiling with Clang on Windows. + # https://bugs.chromium.org/p/webrtc/issues/detail?id=5366 + "-Wno-format", + ] + } + } + + rtc_source_set("isac_test_util") { + testonly = true + sources = [ + "codecs/isac/main/util/utility.c", + ] + } + + rtc_executable("isac_test") { + testonly = true + + sources = [ + "codecs/isac/main/test/simpleKenny.c", + ] + + include_dirs = [ + "codecs/isac/main/include", + "codecs/isac/main/test", + "codecs/isac/main/util", + ] + + deps = [ + ":isac", + ":isac_test_util", + "../../base:rtc_base_approved", + ] + + configs += [ ":isac_test_warnings_config" ] + } + + rtc_executable("g711_test") { + testonly = true + + sources = [ + "codecs/g711/test/testG711.cc", + ] + + deps = [ + ":g711", + ] + } + + rtc_executable("g722_test") { + testonly = true + + sources = [ + "codecs/g722/test/testG722.cc", + ] + + deps = [ + ":g722", + "../..:webrtc_common", + ] + } + + rtc_executable("isac_api_test") { + testonly = true + + sources = [ + "codecs/isac/main/test/ReleaseTest-API/ReleaseTest-API.cc", + ] + + deps = [ + ":isac", + ":isac_test_util", + "../../base:rtc_base_approved", + ] + + include_dirs = [ + "codecs/isac/main/include", + "codecs/isac/main/test", + "codecs/isac/main/util", + ] + } + + rtc_executable("isac_switch_samprate_test") { + testonly = true + + sources = [ + "codecs/isac/main/test/SwitchingSampRate/SwitchingSampRate.cc", + ] + + deps = [ + ":isac", + ":isac_test_util", + ] + + include_dirs = [ + "codecs/isac/main/include", + "codecs/isac/main/test", + "codecs/isac/main/util", + "../../common_audio/signal_processing/include", + ] + } + + rtc_executable("ilbc_test") { + testonly = true + + sources = [ + "codecs/ilbc/test/iLBC_test.c", + ] + + deps = [ + ":ilbc", + ] + } + + rtc_executable("webrtc_opus_fec_test") { + testonly = true + + sources = [ + "codecs/opus/opus_fec_test.cc", + ] + + deps = [ + ":webrtc_opus", + "../../base:rtc_base_approved", + "../../common_audio", + "../../test:test_main", + "//testing/gtest", + ] + + if (!build_with_chromium && is_clang) { + # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). + suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] + } + } + + rtc_source_set("audio_coding_unittests") { + testonly = true + + # Skip restricting visibility on mobile platforms since the tests on those + # gets additional generated targets which would require many lines here to + # cover (which would be confusing to read and hard to maintain). + if (!is_android && !is_ios) { + visibility = [ "//webrtc/modules:modules_unittests" ] + } + sources = [ + "acm2/acm_receiver_unittest.cc", + "acm2/audio_coding_module_unittest.cc", + "acm2/call_statistics_unittest.cc", + "acm2/codec_manager_unittest.cc", + "acm2/rent_a_codec_unittest.cc", + "audio_network_adaptor/audio_network_adaptor_impl_unittest.cc", + "audio_network_adaptor/bitrate_controller_unittest.cc", + "audio_network_adaptor/channel_controller_unittest.cc", + "audio_network_adaptor/controller_manager_unittest.cc", + "audio_network_adaptor/dtx_controller_unittest.cc", + "audio_network_adaptor/event_log_writer_unittest.cc", + "audio_network_adaptor/fec_controller_plr_based_unittest.cc", + "audio_network_adaptor/fec_controller_rplr_based_unittest.cc", + "audio_network_adaptor/frame_length_controller_unittest.cc", + "audio_network_adaptor/mock/mock_controller.h", + "audio_network_adaptor/mock/mock_controller_manager.h", + "audio_network_adaptor/util/threshold_curve_unittest.cc", + "codecs/builtin_audio_decoder_factory_unittest.cc", + "codecs/builtin_audio_encoder_factory_unittest.cc", + "codecs/cng/audio_encoder_cng_unittest.cc", + "codecs/cng/cng_unittest.cc", + "codecs/ilbc/ilbc_unittest.cc", + "codecs/isac/fix/source/filterbanks_unittest.cc", + "codecs/isac/fix/source/filters_unittest.cc", + "codecs/isac/fix/source/lpc_masking_model_unittest.cc", + "codecs/isac/fix/source/transform_unittest.cc", + "codecs/isac/main/source/audio_encoder_isac_unittest.cc", + "codecs/isac/main/source/isac_unittest.cc", + "codecs/isac/unittest.cc", + "codecs/legacy_encoded_audio_frame_unittest.cc", + "codecs/mock/mock_audio_encoder.cc", + "codecs/opus/audio_encoder_opus_unittest.cc", + "codecs/opus/opus_unittest.cc", + "codecs/red/audio_encoder_copy_red_unittest.cc", + "neteq/audio_multi_vector_unittest.cc", + "neteq/audio_vector_unittest.cc", + "neteq/background_noise_unittest.cc", + "neteq/buffer_level_filter_unittest.cc", + "neteq/comfort_noise_unittest.cc", + "neteq/decision_logic_unittest.cc", + "neteq/decoder_database_unittest.cc", + "neteq/delay_manager_unittest.cc", + "neteq/delay_peak_detector_unittest.cc", + "neteq/dsp_helper_unittest.cc", + "neteq/dtmf_buffer_unittest.cc", + "neteq/dtmf_tone_generator_unittest.cc", + "neteq/expand_unittest.cc", + "neteq/merge_unittest.cc", + "neteq/mock/mock_buffer_level_filter.h", + "neteq/mock/mock_decoder_database.h", + "neteq/mock/mock_delay_manager.h", + "neteq/mock/mock_delay_peak_detector.h", + "neteq/mock/mock_dtmf_buffer.h", + "neteq/mock/mock_dtmf_tone_generator.h", + "neteq/mock/mock_expand.h", + "neteq/mock/mock_external_decoder_pcm16b.h", + "neteq/mock/mock_packet_buffer.h", + "neteq/mock/mock_red_payload_splitter.h", + "neteq/nack_tracker_unittest.cc", + "neteq/neteq_external_decoder_unittest.cc", + "neteq/neteq_impl_unittest.cc", + "neteq/neteq_network_stats_unittest.cc", + "neteq/neteq_stereo_unittest.cc", + "neteq/neteq_unittest.cc", + "neteq/normal_unittest.cc", + "neteq/packet_buffer_unittest.cc", + "neteq/post_decode_vad_unittest.cc", + "neteq/random_vector_unittest.cc", + "neteq/red_payload_splitter_unittest.cc", + "neteq/sync_buffer_unittest.cc", + "neteq/tick_timer_unittest.cc", + "neteq/time_stretch_unittest.cc", + "neteq/timestamp_scaler_unittest.cc", + "neteq/tools/input_audio_file_unittest.cc", + "neteq/tools/packet_unittest.cc", + ] + + deps = [ + ":acm_receive_test", + ":acm_send_test", + ":audio_coding", + ":audio_coding_module_typedefs", + ":audio_encoder_interface", + ":audio_format_conversion", + ":audio_network_adaptor", + ":builtin_audio_encoder_factory", + ":cng", + ":g711", + ":ilbc", + ":isac", + ":isac_c", + ":isac_fix", + ":legacy_encoded_audio_frame", + ":neteq", + ":neteq_test_support", + ":neteq_test_tools", + ":pcm16b", + ":red", + ":rent_a_codec", + ":webrtc_opus", + "..:module_api", + "../..:webrtc_common", + "../../api/audio_codecs:audio_codecs_api", + "../../api/audio_codecs:builtin_audio_decoder_factory", + "../../base:protobuf_utils", + "../../base:rtc_base", + "../../base:rtc_base_approved", + "../../base:rtc_base_tests_utils", + "../../common_audio", + "../../system_wrappers:system_wrappers", + "../../test:audio_codec_mocks", + "../../test:field_trial", + "../../test:rtp_test_utils", + "../../test:test_common", + "../../test:test_support", + "//testing/gmock", + "//testing/gtest", + "//third_party/gflags", + ] + + defines = audio_coding_defines + + if (rtc_enable_protobuf) { + defines += [ + "WEBRTC_AUDIO_NETWORK_ADAPTOR_DEBUG_DUMP", + "WEBRTC_NETEQ_UNITTEST_BITEXACT", + ] + deps += [ + ":ana_config_proto", + ":neteq_unittest_proto", + ] + } + + if (!build_with_chromium && is_clang) { + # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). + suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] + } + } +} + +# For backwards compatibility only! Use +# webrtc/api/audio_codecs:audio_codecs_api instead. +# TODO(kwiberg): Remove this. +rtc_source_set("audio_decoder_interface") { + sources = [ + "codecs/audio_decoder.h", + ] + deps = [ + "../../api/audio_codecs:audio_codecs_api", + ] +} + +# For backwards compatibility only! Use +# webrtc/api/audio_codecs:builtin_audio_decoder_factory instead. +# TODO(kwiberg): Remove this. +rtc_source_set("builtin_audio_decoder_factory") { + sources = [ + "codecs/builtin_audio_decoder_factory.h", + ] + deps = [ + "../../api/audio_codecs:builtin_audio_decoder_factory", + ] +} diff --git a/WebRtcNative/gn/webrtc/modules/audio_processing/BUILD.gn b/WebRtcNative/gn/webrtc/modules/audio_processing/BUILD.gn new file mode 100644 index 00000000..1c274be5 --- /dev/null +++ b/WebRtcNative/gn/webrtc/modules/audio_processing/BUILD.gn @@ -0,0 +1,850 @@ +# Copyright (c) 2014 The WebRTC project authors. All Rights Reserved. +# +# Use of this source code is governed by a BSD-style license +# that can be found in the LICENSE file in the root of the source +# tree. An additional intellectual property rights grant can be found +# in the file PATENTS. All contributing project authors may +# be found in the AUTHORS file in the root of the source tree. + +import("//build/config/arm.gni") +import("//third_party/protobuf/proto_library.gni") +import("../../webrtc.gni") + +declare_args() { + # Disables the usual mode where we trust the reported system delay + # values the AEC receives. The corresponding define is set appropriately + # in the code, but it can be force-enabled here for testing. + aec_untrusted_delay_for_testing = false +} + +rtc_static_library("audio_processing") { + sources = [ + "aec/aec_core.cc", + "aec/aec_core.h", + "aec/aec_core_optimized_methods.h", + "aec/aec_resampler.cc", + "aec/aec_resampler.h", + "aec/echo_cancellation.cc", + "aec/echo_cancellation.h", + "aec3/adaptive_fir_filter.cc", + "aec3/adaptive_fir_filter.h", + "aec3/aec3_common.cc", + "aec3/aec3_common.h", + "aec3/aec3_fft.cc", + "aec3/aec3_fft.h", + "aec3/aec_state.cc", + "aec3/aec_state.h", + "aec3/block_framer.cc", + "aec3/block_framer.h", + "aec3/block_processor.cc", + "aec3/block_processor.h", + "aec3/block_processor_metrics.cc", + "aec3/block_processor_metrics.h", + "aec3/cascaded_biquad_filter.cc", + "aec3/cascaded_biquad_filter.h", + "aec3/comfort_noise_generator.cc", + "aec3/comfort_noise_generator.h", + "aec3/decimator_by_4.cc", + "aec3/decimator_by_4.h", + "aec3/downsampled_render_buffer.cc", + "aec3/downsampled_render_buffer.h", + "aec3/echo_canceller3.cc", + "aec3/echo_canceller3.h", + "aec3/echo_path_delay_estimator.cc", + "aec3/echo_path_delay_estimator.h", + "aec3/echo_path_variability.cc", + "aec3/echo_path_variability.h", + "aec3/echo_remover.cc", + "aec3/echo_remover.h", + "aec3/echo_remover_metrics.cc", + "aec3/echo_remover_metrics.h", + "aec3/erl_estimator.cc", + "aec3/erl_estimator.h", + "aec3/erle_estimator.cc", + "aec3/erle_estimator.h", + "aec3/fft_data.h", + "aec3/frame_blocker.cc", + "aec3/frame_blocker.h", + "aec3/main_filter_update_gain.cc", + "aec3/main_filter_update_gain.h", + "aec3/matched_filter.cc", + "aec3/matched_filter.h", + "aec3/matched_filter_lag_aggregator.cc", + "aec3/matched_filter_lag_aggregator.h", + "aec3/output_selector.cc", + "aec3/output_selector.h", + "aec3/render_buffer.cc", + "aec3/render_buffer.h", + "aec3/render_delay_buffer.cc", + "aec3/render_delay_buffer.h", + "aec3/render_delay_controller.cc", + "aec3/render_delay_controller.h", + "aec3/render_delay_controller_metrics.cc", + "aec3/render_delay_controller_metrics.h", + "aec3/render_signal_analyzer.cc", + "aec3/render_signal_analyzer.h", + "aec3/residual_echo_estimator.cc", + "aec3/residual_echo_estimator.h", + "aec3/shadow_filter_update_gain.cc", + "aec3/shadow_filter_update_gain.h", + "aec3/subtractor.cc", + "aec3/subtractor.h", + "aec3/subtractor_output.h", + "aec3/suppression_filter.cc", + "aec3/suppression_filter.h", + "aec3/suppression_gain.cc", + "aec3/suppression_gain.h", + "aec3/vector_math.h", + "aecm/aecm_core.cc", + "aecm/aecm_core.h", + "aecm/echo_control_mobile.cc", + "aecm/echo_control_mobile.h", + "agc/agc.cc", + "agc/agc.h", + "agc/agc_manager_direct.cc", + "agc/agc_manager_direct.h", + "agc/gain_map_internal.h", + "agc/loudness_histogram.cc", + "agc/loudness_histogram.h", + "agc/utility.cc", + "agc/utility.h", + "audio_buffer.cc", + "audio_buffer.h", + "audio_processing_impl.cc", + "audio_processing_impl.h", + "beamformer/array_util.cc", + "beamformer/array_util.h", + "beamformer/complex_matrix.h", + "beamformer/covariance_matrix_generator.cc", + "beamformer/covariance_matrix_generator.h", + "beamformer/matrix.h", + "beamformer/nonlinear_beamformer.cc", + "beamformer/nonlinear_beamformer.h", + "common.h", + "echo_cancellation_impl.cc", + "echo_cancellation_impl.h", + "echo_control_mobile_impl.cc", + "echo_control_mobile_impl.h", + "echo_detector/circular_buffer.cc", + "echo_detector/circular_buffer.h", + "echo_detector/mean_variance_estimator.cc", + "echo_detector/mean_variance_estimator.h", + "echo_detector/moving_max.cc", + "echo_detector/moving_max.h", + "echo_detector/normalized_covariance_estimator.cc", + "echo_detector/normalized_covariance_estimator.h", + "gain_control_for_experimental_agc.cc", + "gain_control_for_experimental_agc.h", + "gain_control_impl.cc", + "gain_control_impl.h", + "include/audio_processing.cc", + "include/audio_processing.h", + "include/config.cc", + "include/config.h", + "level_controller/biquad_filter.cc", + "level_controller/biquad_filter.h", + "level_controller/down_sampler.cc", + "level_controller/down_sampler.h", + "level_controller/gain_applier.cc", + "level_controller/gain_applier.h", + "level_controller/gain_selector.cc", + "level_controller/gain_selector.h", + "level_controller/level_controller.cc", + "level_controller/level_controller.h", + "level_controller/level_controller_constants.h", + "level_controller/noise_level_estimator.cc", + "level_controller/noise_level_estimator.h", + "level_controller/noise_spectrum_estimator.cc", + "level_controller/noise_spectrum_estimator.h", + "level_controller/peak_level_estimator.cc", + "level_controller/peak_level_estimator.h", + "level_controller/saturating_gain_estimator.cc", + "level_controller/saturating_gain_estimator.h", + "level_controller/signal_classifier.cc", + "level_controller/signal_classifier.h", + "level_estimator_impl.cc", + "level_estimator_impl.h", + "logging/apm_data_dumper.cc", + "logging/apm_data_dumper.h", + "low_cut_filter.cc", + "low_cut_filter.h", + "noise_suppression_impl.cc", + "noise_suppression_impl.h", + "render_queue_item_verifier.h", + "residual_echo_detector.cc", + "residual_echo_detector.h", + "rms_level.cc", + "rms_level.h", + "splitting_filter.cc", + "splitting_filter.h", + "three_band_filter_bank.cc", + "three_band_filter_bank.h", + "transient/common.h", + "transient/daubechies_8_wavelet_coeffs.h", + "transient/dyadic_decimator.h", + "transient/moving_moments.cc", + "transient/moving_moments.h", + "transient/transient_detector.cc", + "transient/transient_detector.h", + "transient/transient_suppressor.cc", + "transient/transient_suppressor.h", + "transient/wpd_node.cc", + "transient/wpd_node.h", + "transient/wpd_tree.cc", + "transient/wpd_tree.h", + "typing_detection.cc", + "typing_detection.h", + "utility/block_mean_calculator.cc", + "utility/block_mean_calculator.h", + "utility/delay_estimator.cc", + "utility/delay_estimator.h", + "utility/delay_estimator_internal.h", + "utility/delay_estimator_wrapper.cc", + "utility/delay_estimator_wrapper.h", + "utility/ooura_fft.cc", + "utility/ooura_fft.h", + "utility/ooura_fft_tables_common.h", + "vad/common.h", + "vad/gmm.cc", + "vad/gmm.h", + "vad/noise_gmm_tables.h", + "vad/pitch_based_vad.cc", + "vad/pitch_based_vad.h", + "vad/pitch_internal.cc", + "vad/pitch_internal.h", + "vad/pole_zero_filter.cc", + "vad/pole_zero_filter.h", + "vad/standalone_vad.cc", + "vad/standalone_vad.h", + "vad/vad_audio_proc.cc", + "vad/vad_audio_proc.h", + "vad/vad_audio_proc_internal.h", + "vad/vad_circular_buffer.cc", + "vad/vad_circular_buffer.h", + "vad/voice_activity_detector.cc", + "vad/voice_activity_detector.h", + "vad/voice_gmm_tables.h", + "voice_detection_impl.cc", + "voice_detection_impl.h", + ] + + defines = [] + deps = [ + "..:module_api", + "../..:webrtc_common", + "../../audio/utility:audio_frame_operations", + "../../base:gtest_prod", + "../../base:protobuf_utils", + "../audio_coding:isac", + ] + public_deps = [ + ":audio_processing_c", + ] + + if (apm_debug_dump) { + defines += [ "WEBRTC_APM_DEBUG_DUMP=1" ] + } else { + defines += [ "WEBRTC_APM_DEBUG_DUMP=0" ] + } + + if (aec_untrusted_delay_for_testing) { + defines += [ "WEBRTC_UNTRUSTED_DELAY" ] + } + + if (rtc_enable_protobuf) { + defines += [ "WEBRTC_AUDIOPROC_DEBUG_DUMP" ] + deps += [ ":audioproc_debug_proto" ] + } + + if (rtc_enable_intelligibility_enhancer) { + defines += [ "WEBRTC_INTELLIGIBILITY_ENHANCER=1" ] + sources += [ + "intelligibility/intelligibility_enhancer.cc", + "intelligibility/intelligibility_enhancer.h", + "intelligibility/intelligibility_utils.cc", + "intelligibility/intelligibility_utils.h", + ] + } else { + defines += [ "WEBRTC_INTELLIGIBILITY_ENHANCER=0" ] + } + + if (rtc_prefer_fixed_point) { + defines += [ "WEBRTC_NS_FIXED" ] + } else { + defines += [ "WEBRTC_NS_FLOAT" ] + } + + if (current_cpu == "x86" || current_cpu == "x64") { + deps += [ ":audio_processing_sse2" ] + } + + if (rtc_build_with_neon) { + deps += [ ":audio_processing_neon" ] + } + + if (current_cpu == "mipsel") { + sources += [ "aecm/aecm_core_mips.cc" ] + if (mips_float_abi == "hard") { + sources += [ + "aec/aec_core_mips.cc", + "utility/ooura_fft_mips.cc", + ] + } + } else { + sources += [ "aecm/aecm_core_c.cc" ] + } + + # TODO(jschuh): Bug 1348: fix this warning. + configs += [ "//build/config/compiler:no_size_t_to_int_warning" ] + + deps += [ + "../../base:rtc_base_approved", + "../../common_audio", + "../../system_wrappers", + ] +} + +rtc_static_library("audio_processing_c") { + visibility = [ ":*" ] # Only targets in this file can depend on this. + sources = [ + "agc/legacy/analog_agc.c", + "agc/legacy/analog_agc.h", + "agc/legacy/digital_agc.c", + "agc/legacy/digital_agc.h", + "agc/legacy/gain_control.h", + ] + + if (rtc_prefer_fixed_point) { + sources += [ + "ns/noise_suppression_x.c", + "ns/noise_suppression_x.h", + "ns/nsx_core.c", + "ns/nsx_core.h", + "ns/nsx_defines.h", + ] + if (current_cpu == "mipsel") { + sources += [ "ns/nsx_core_mips.c" ] + } else { + sources += [ "ns/nsx_core_c.c" ] + } + } else { + sources += [ + "ns/defines.h", + "ns/noise_suppression.c", + "ns/noise_suppression.h", + "ns/ns_core.c", + "ns/ns_core.h", + "ns/windows_private.h", + ] + } + + deps = [ + "../..:webrtc_common", + "../../base:rtc_base_approved", + "../../common_audio", + "../../system_wrappers", + ] + + if (rtc_build_with_neon) { + deps += [ ":audio_processing_neon_c" ] + } +} + +if (rtc_enable_protobuf) { + proto_library("audioproc_debug_proto") { + sources = [ + "debug.proto", + ] + + proto_out_dir = "webrtc/modules/audio_processing" + } +} + +if (current_cpu == "x86" || current_cpu == "x64") { + rtc_static_library("audio_processing_sse2") { + # TODO(ehmaldonado): Remove (bugs.webrtc.org/6828) + # Errors on cyclic dependency with :audio_processing if enabled. + check_includes = false + + sources = [ + "aec/aec_core_sse2.cc", + "utility/ooura_fft_sse2.cc", + "utility/ooura_fft_tables_neon_sse2.h", + ] + + if (is_posix) { + cflags = [ "-msse2" ] + } + + if (apm_debug_dump) { + defines = [ "WEBRTC_APM_DEBUG_DUMP=1" ] + } else { + defines = [ "WEBRTC_APM_DEBUG_DUMP=0" ] + } + } +} + +if (rtc_build_with_neon) { + rtc_static_library("audio_processing_neon") { + # TODO(ehmaldonado): Remove (bugs.webrtc.org/6828) + # Errors on cyclic dependency with :audio_processing if enabled. + check_includes = false + + sources = [ + "aec/aec_core_neon.cc", + "aecm/aecm_core_neon.cc", + "utility/ooura_fft_neon.cc", + "utility/ooura_fft_tables_neon_sse2.h", + ] + + if (current_cpu != "arm64") { + # Enable compilation for the NEON instruction set. This is needed + # since //build/config/arm.gni only enables NEON for iOS, not Android. + # This provides the same functionality as webrtc/build/arm_neon.gypi. + suppressed_configs += [ "//build/config/compiler:compiler_arm_fpu" ] + cflags = [ "-mfpu=neon" ] + } + + # Disable LTO on NEON targets due to compiler bug. + # TODO(fdegans): Enable this. See crbug.com/408997. + if (rtc_use_lto) { + cflags -= [ + "-flto", + "-ffat-lto-objects", + ] + } + + deps = [ + "../../common_audio", + ] + public_deps = [ + ":audio_processing_neon_c", + ] + + if (apm_debug_dump) { + defines = [ "WEBRTC_APM_DEBUG_DUMP=1" ] + } else { + defines = [ "WEBRTC_APM_DEBUG_DUMP=0" ] + } + } + + rtc_static_library("audio_processing_neon_c") { + # TODO(mbonadei): Remove (bugs.webrtc.org/6828) + # Errors on cyclic dependency with :audio_processing_c if enabled. + check_includes = false + + sources = [ + "ns/nsx_core_neon.c", + ] + + if (current_cpu != "arm64") { + # Enable compilation for the NEON instruction set. This is needed + # since //build/config/arm.gni only enables NEON for iOS, not Android. + # This provides the same functionality as webrtc/build/arm_neon.gypi. + suppressed_configs += [ "//build/config/compiler:compiler_arm_fpu" ] + cflags = [ "-mfpu=neon" ] + } + + # Disable LTO on NEON targets due to compiler bug. + # TODO(fdegans): Enable this. See crbug.com/408997. + if (rtc_use_lto) { + cflags -= [ + "-flto", + "-ffat-lto-objects", + ] + } + deps = [ + "../../base:rtc_base_approved", + ] + } +} + +if (rtc_include_tests) { + group("audio_processing_tests") { + testonly = true + public_deps = [ + ":audioproc_test_utils", + ":click_annotate", + ":nonlinear_beamformer_test", + ":transient_suppression_test", + ] + + if (rtc_enable_intelligibility_enhancer) { + public_deps += [ ":intelligibility_proc" ] + } + + if (rtc_enable_protobuf) { + public_deps += [ + ":audioproc_f", + ":audioproc_unittest_proto", + ":unpack_aecdump", + "test/conversational_speech", + "test/py_quality_assessment", + ] + } + } + + rtc_source_set("audio_processing_unittests") { + testonly = true + + # Skip restricting visibility on mobile platforms since the tests on those + # gets additional generated targets which would require many lines here to + # cover (which would be confusing to read and hard to maintain). + if (!is_android && !is_ios) { + visibility = [ "//webrtc/modules:modules_unittests" ] + } + sources = [ + "aec/echo_cancellation_unittest.cc", + "aec/system_delay_unittest.cc", + "agc/agc_manager_direct_unittest.cc", + "agc/loudness_histogram_unittest.cc", + "agc/mock_agc.h", + "audio_buffer_unittest.cc", + "beamformer/array_util_unittest.cc", + "beamformer/complex_matrix_unittest.cc", + "beamformer/covariance_matrix_generator_unittest.cc", + "beamformer/matrix_unittest.cc", + "beamformer/mock_nonlinear_beamformer.h", + "config_unittest.cc", + "echo_cancellation_impl_unittest.cc", + "splitting_filter_unittest.cc", + "transient/dyadic_decimator_unittest.cc", + "transient/file_utils.cc", + "transient/file_utils.h", + "transient/file_utils_unittest.cc", + "transient/moving_moments_unittest.cc", + "transient/transient_detector_unittest.cc", + "transient/transient_suppressor_unittest.cc", + "transient/wpd_node_unittest.cc", + "transient/wpd_tree_unittest.cc", + "utility/block_mean_calculator_unittest.cc", + "utility/delay_estimator_unittest.cc", + "vad/gmm_unittest.cc", + "vad/pitch_based_vad_unittest.cc", + "vad/pitch_internal_unittest.cc", + "vad/pole_zero_filter_unittest.cc", + "vad/standalone_vad_unittest.cc", + "vad/vad_audio_proc_unittest.cc", + "vad/vad_circular_buffer_unittest.cc", + "vad/voice_activity_detector_unittest.cc", + ] + + deps = [ + ":audio_processing", + ":audioproc_test_utils", + "..:module_api", + "../..:webrtc_common", + "../../base:gtest_prod", + "../../base:protobuf_utils", + "../../base:rtc_base", + "../../base:rtc_base_approved", + "../../common_audio:common_audio", + "../../system_wrappers:system_wrappers", + "../../test:test_support", + "../audio_coding:neteq_tools", + "test/conversational_speech:unittest", + "//testing/gmock", + "//testing/gtest", + ] + + defines = [] + + if (apm_debug_dump) { + defines += [ "WEBRTC_APM_DEBUG_DUMP=1" ] + } else { + defines += [ "WEBRTC_APM_DEBUG_DUMP=0" ] + } + + if (rtc_enable_intelligibility_enhancer) { + defines += [ "WEBRTC_INTELLIGIBILITY_ENHANCER=1" ] + sources += [ + "intelligibility/intelligibility_enhancer_unittest.cc", + "intelligibility/intelligibility_utils_unittest.cc", + ] + } else { + defines += [ "WEBRTC_INTELLIGIBILITY_ENHANCER=0" ] + } + + if (rtc_prefer_fixed_point) { + defines += [ "WEBRTC_AUDIOPROC_FIXED_PROFILE" ] + } else { + defines += [ "WEBRTC_AUDIOPROC_FLOAT_PROFILE" ] + } + + if (rtc_enable_protobuf) { + defines += [ "WEBRTC_AUDIOPROC_DEBUG_DUMP" ] + deps += [ + ":audioproc_debug_proto", + ":audioproc_protobuf_utils", + ":audioproc_unittest_proto", + ] + sources += [ + "aec3/adaptive_fir_filter_unittest.cc", + "aec3/aec3_fft_unittest.cc", + "aec3/aec_state_unittest.cc", + "aec3/block_framer_unittest.cc", + "aec3/block_processor_metrics_unittest.cc", + "aec3/block_processor_unittest.cc", + "aec3/cascaded_biquad_filter_unittest.cc", + "aec3/comfort_noise_generator_unittest.cc", + "aec3/decimator_by_4_unittest.cc", + "aec3/echo_canceller3_unittest.cc", + "aec3/echo_path_delay_estimator_unittest.cc", + "aec3/echo_path_variability_unittest.cc", + "aec3/echo_remover_metrics_unittest.cc", + "aec3/echo_remover_unittest.cc", + "aec3/erl_estimator_unittest.cc", + "aec3/erle_estimator_unittest.cc", + "aec3/fft_data_unittest.cc", + "aec3/frame_blocker_unittest.cc", + "aec3/main_filter_update_gain_unittest.cc", + "aec3/matched_filter_lag_aggregator_unittest.cc", + "aec3/matched_filter_unittest.cc", + "aec3/output_selector_unittest.cc", + "aec3/render_buffer_unittest.cc", + "aec3/render_delay_buffer_unittest.cc", + "aec3/render_delay_controller_metrics_unittest.cc", + "aec3/render_delay_controller_unittest.cc", + "aec3/render_signal_analyzer_unittest.cc", + "aec3/residual_echo_estimator_unittest.cc", + "aec3/shadow_filter_update_gain_unittest.cc", + "aec3/subtractor_unittest.cc", + "aec3/suppression_filter_unittest.cc", + "aec3/suppression_gain_unittest.cc", + "aec3/vector_math_unittest.cc", + "audio_processing_impl_locking_unittest.cc", + "audio_processing_impl_unittest.cc", + "audio_processing_unittest.cc", + "beamformer/nonlinear_beamformer_unittest.cc", + "echo_cancellation_bit_exact_unittest.cc", + "echo_control_mobile_unittest.cc", + "echo_detector/circular_buffer_unittest.cc", + "echo_detector/mean_variance_estimator_unittest.cc", + "echo_detector/moving_max_unittest.cc", + "echo_detector/normalized_covariance_estimator_unittest.cc", + "gain_control_unittest.cc", + "level_controller/level_controller_unittest.cc", + "level_estimator_unittest.cc", + "low_cut_filter_unittest.cc", + "noise_suppression_unittest.cc", + "residual_echo_detector_unittest.cc", + "rms_level_unittest.cc", + "test/bitexactness_tools.cc", + "test/bitexactness_tools.h", + "test/debug_dump_replayer.cc", + "test/debug_dump_replayer.h", + "test/debug_dump_test.cc", + "test/echo_canceller_test_tools.cc", + "test/echo_canceller_test_tools.h", + "test/echo_canceller_test_tools_unittest.cc", + "test/test_utils.h", + "voice_detection_unittest.cc", + ] + } + + if ((!build_with_chromium || is_win) && is_clang) { + # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). + suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] + } + } + + rtc_source_set("audio_processing_perf_tests") { + # Has problems with autogenerated targets on Android and iOS + # Dependency chain (there may also be others): + # //webrtc/modules/audio_processing:audio_processing_perf_tests --> + # //webrtc/modules:modules_unittests --[private]--> + # //webrtc/modules:modules_unittests_apk --> + # //webrtc/modules:modules_unittests_apk__create --> + # //webrtc/modules:modules_unittests_apk__create__finalize --> + # //webrtc/modules:modules_unittests_apk__create__package --[private]--> + # //webrtc/modules:_modules_unittests__library + check_includes = false + testonly = true + + # Skip restricting visibility on mobile platforms since the tests on those + # gets additional generated targets which would require many lines here to + # cover (which would be confusing to read and hard to maintain). + if (!is_android && !is_ios) { + visibility = [ "//webrtc:webrtc_perf_tests" ] + } + sources = [ + "audio_processing_performance_unittest.cc", + "level_controller/level_controller_complexity_unittest.cc", + "residual_echo_detector_complexity_unittest.cc", + ] + deps = [ + ":audio_processing", + ":audioproc_test_utils", + "../../base:protobuf_utils", + "//testing/gtest", + ] + + if (rtc_enable_intelligibility_enhancer) { + defines = [ "WEBRTC_INTELLIGIBILITY_ENHANCER=1" ] + } else { + defines = [ "WEBRTC_INTELLIGIBILITY_ENHANCER=0" ] + } + } + + if (rtc_enable_protobuf) { + rtc_executable("unpack_aecdump") { + testonly = true + sources = [ + "test/unpack.cc", + ] + + deps = [ + ":audio_processing", + ":audioproc_debug_proto", + ":audioproc_protobuf_utils", + ":audioproc_test_utils", + "../..:webrtc_common", + "../../base:protobuf_utils", + "../../base:rtc_base_approved", + "../../common_audio", + "../../system_wrappers:system_wrappers_default", + "//third_party/gflags:gflags", + ] + } # unpack_aecdump + + rtc_executable("audioproc_f") { + testonly = true + sources = [ + "test/aec_dump_based_simulator.cc", + "test/aec_dump_based_simulator.h", + "test/audio_processing_simulator.cc", + "test/audio_processing_simulator.h", + "test/audioproc_float.cc", + "test/wav_based_simulator.cc", + "test/wav_based_simulator.h", + ] + + deps = [ + ":audio_processing", + ":audioproc_debug_proto", + ":audioproc_protobuf_utils", + ":audioproc_test_utils", + "../../base:protobuf_utils", + "../../base:rtc_base_approved", + "../../common_audio:common_audio", + "../../system_wrappers", + "../../system_wrappers:system_wrappers_default", + "../../test:test_support", + "//testing/gtest", + "//third_party/gflags:gflags", + ] + } # audioproc_f + } + + rtc_source_set("audioproc_test_utils") { + testonly = true + sources = [ + "test/audio_buffer_tools.cc", + "test/audio_buffer_tools.h", + "test/performance_timer.cc", + "test/performance_timer.h", + "test/simulator_buffers.cc", + "test/simulator_buffers.h", + "test/test_utils.cc", + "test/test_utils.h", + ] + + deps = [ + ":audio_processing", + "..:module_api", + "../../base:rtc_base_approved", + "../../common_audio", + "../../system_wrappers:system_wrappers", + ] + } + + rtc_executable("transient_suppression_test") { + testonly = true + sources = [ + "transient/file_utils.cc", + "transient/file_utils.h", + "transient/transient_suppression_test.cc", + ] + deps = [ + ":audio_processing", + "..:module_api", + "../..:webrtc_common", + "../../common_audio:common_audio", + "../../system_wrappers:metrics_default", + "../../system_wrappers:system_wrappers", + "../../test:test_support", + "//testing/gtest", + "//third_party/gflags", + ] + } + + rtc_executable("click_annotate") { + testonly = true + sources = [ + "transient/click_annotate.cc", + "transient/file_utils.cc", + "transient/file_utils.h", + ] + deps = [ + ":audio_processing", + "../..:webrtc_common", + "../../system_wrappers:metrics_default", + "../../system_wrappers:system_wrappers", + ] + } + + rtc_executable("nonlinear_beamformer_test") { + testonly = true + sources = [ + "beamformer/nonlinear_beamformer_test.cc", + ] + deps = [ + ":audio_processing", + ":audioproc_test_utils", + "../../base:rtc_base_approved", + "../../common_audio:common_audio", + "../../system_wrappers:metrics_default", + "//third_party/gflags", + ] + } + + if (rtc_enable_intelligibility_enhancer) { + rtc_executable("intelligibility_proc") { + testonly = true + sources = [ + "intelligibility/test/intelligibility_proc.cc", + ] + deps = [ + ":audio_processing", + ":audioproc_test_utils", + "../../system_wrappers:metrics_default", + "../../test:test_support", + "//testing/gtest", + "//third_party/gflags", + ] + } + } + + if (rtc_enable_protobuf) { + proto_library("audioproc_unittest_proto") { + sources = [ + "test/unittest.proto", + ] + proto_out_dir = "webrtc/modules/audio_processing/test" + } + + rtc_static_library("audioproc_protobuf_utils") { + sources = [ + "test/protobuf_utils.cc", + "test/protobuf_utils.h", + ] + + deps = [ + ":audioproc_debug_proto", + "../..:webrtc_common", + "../../base:protobuf_utils", + "../../base:rtc_base_approved", + ] + } + } +} diff --git a/WebRtcNative/gn/webrtc/modules/desktop_capture/BUILD.gn b/WebRtcNative/gn/webrtc/modules/desktop_capture/BUILD.gn new file mode 100644 index 00000000..dff3028c --- /dev/null +++ b/WebRtcNative/gn/webrtc/modules/desktop_capture/BUILD.gn @@ -0,0 +1,325 @@ +# Copyright (c) 2014 The WebRTC project authors. All Rights Reserved. +# +# Use of this source code is governed by a BSD-style license +# that can be found in the LICENSE file in the root of the source +# tree. An additional intellectual property rights grant can be found +# in the file PATENTS. All contributing project authors may +# be found in the AUTHORS file in the root of the source tree. + +import("//build/config/ui.gni") +import("../../webrtc.gni") + +use_desktop_capture_differ_sse2 = current_cpu == "x86" || current_cpu == "x64" + +rtc_static_library("primitives") { + sources = [ + "desktop_capture_types.h", + "desktop_frame.cc", + "desktop_frame.h", + "desktop_geometry.cc", + "desktop_geometry.h", + "desktop_region.cc", + "desktop_region.h", + "shared_desktop_frame.cc", + "shared_desktop_frame.h", + "shared_memory.cc", + "shared_memory.h", + ] + + deps = [ + "../..:webrtc_common", + "../../base:rtc_base", # TODO(kjellander): Cleanup in bugs.webrtc.org/3806. + ] +} + +if (rtc_include_tests) { + rtc_source_set("desktop_capture_modules_tests") { + testonly = true + + # Skip restricting visibility on mobile platforms since the tests on those + # gets additional generated targets which would require many lines here to + # cover (which would be confusing to read and hard to maintain). + if (!is_android && !is_ios) { + visibility = [ "//webrtc/modules:modules_tests" ] + } + sources = [] + deps = [] + if (rtc_desktop_capture_supported) { + deps += [ + ":desktop_capture_mock", + ":primitives", + ":screen_drawer", + "../../base:rtc_base", + "../../base:rtc_base_approved", + "../../system_wrappers", + "../../test:test_support", + "../../test:video_test_support", + ] + sources += [ + "screen_capturer_integration_test.cc", + "screen_drawer_unittest.cc", + ] + } + } + + rtc_source_set("desktop_capture_unittests") { + testonly = true + + # Skip restricting visibility on mobile platforms since the tests on those + # gets additional generated targets which would require many lines here to + # cover (which would be confusing to read and hard to maintain). + if (!is_android && !is_ios) { + visibility = [ "//webrtc/modules:modules_unittests" ] + } + sources = [ + "blank_detector_desktop_capturer_wrapper_unittest.cc", + "desktop_and_cursor_composer_unittest.cc", + "desktop_capturer_differ_wrapper_unittest.cc", + "desktop_frame_rotation_unittest.cc", + "desktop_region_unittest.cc", + "differ_block_unittest.cc", + "fallback_desktop_capturer_wrapper_unittest.cc", + "mouse_cursor_monitor_unittest.cc", + "rgba_color_unittest.cc", + "test_utils.cc", + "test_utils.h", + "test_utils_unittest.cc", + "win/cursor_unittest.cc", + "win/cursor_unittest_resources.h", + "win/cursor_unittest_resources.rc", + ] + deps = [ + ":desktop_capture", + ":desktop_capture_mock", + ":primitives", + "../..:webrtc_common", + "../../base:rtc_base_approved", + "../../system_wrappers", + "../../test:test_support", + "//testing/gmock", + ] + if (rtc_desktop_capture_supported) { + sources += [ + "screen_capturer_helper_unittest.cc", + "screen_capturer_mac_unittest.cc", + "screen_capturer_unittest.cc", + "window_capturer_unittest.cc", + ] + deps += [ ":desktop_capture_mock" ] + } + if (!build_with_chromium && is_clang) { + # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). + suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] + } + } + + source_set("screen_drawer") { + testonly = true + + public_deps = [ + ":desktop_capture", + ] + + sources = [ + "screen_drawer.cc", + "screen_drawer.h", + "screen_drawer_linux.cc", + "screen_drawer_mac.cc", + "screen_drawer_win.cc", + ] + + deps = [ + ":primitives", + "../../base:rtc_base_approved", + "../../system_wrappers", + ] + } + + source_set("desktop_capture_mock") { + testonly = true + + public_deps = [ + ":desktop_capture", + "//testing/gmock", + ] + + sources = [ + "desktop_frame_generator.cc", + "desktop_frame_generator.h", + "fake_desktop_capturer.cc", + "fake_desktop_capturer.h", + "mock_desktop_capturer_callback.cc", + "mock_desktop_capturer_callback.h", + ] + + deps = [ + ":primitives", + "../../base:rtc_base_approved", + "../../test:test_support", + ] + } +} + +config("desktop_capture_winver") { + defines = [ + "NTDDI_VERSION=0x06000000", + "_WIN32_WINNT=0x0600", + "WINVER=0x0600", + ] +} + +rtc_static_library("desktop_capture") { + sources = [ + "blank_detector_desktop_capturer_wrapper.cc", + "blank_detector_desktop_capturer_wrapper.h", + "cropped_desktop_frame.cc", + "cropped_desktop_frame.h", + "cropping_window_capturer.cc", + "cropping_window_capturer.h", + "cropping_window_capturer_win.cc", + "desktop_and_cursor_composer.cc", + "desktop_and_cursor_composer.h", + "desktop_capture_options.cc", + "desktop_capture_options.h", + "desktop_capturer.cc", + "desktop_capturer.h", + "desktop_capturer_differ_wrapper.cc", + "desktop_capturer_differ_wrapper.h", + "desktop_frame_rotation.cc", + "desktop_frame_rotation.h", + "desktop_frame_win.cc", + "desktop_frame_win.h", + "differ_block.cc", + "differ_block.h", + "fallback_desktop_capturer_wrapper.cc", + "fallback_desktop_capturer_wrapper.h", + "mac/desktop_configuration.h", + "mac/desktop_configuration.mm", + "mac/desktop_configuration_monitor.cc", + "mac/desktop_configuration_monitor.h", + "mac/full_screen_chrome_window_detector.cc", + "mac/full_screen_chrome_window_detector.h", + "mac/scoped_pixel_buffer_object.cc", + "mac/scoped_pixel_buffer_object.h", + "mac/window_list_utils.cc", + "mac/window_list_utils.h", + "mouse_cursor.cc", + "mouse_cursor.h", + "mouse_cursor_monitor.h", + "mouse_cursor_monitor_mac.mm", + "mouse_cursor_monitor_win.cc", + "resolution_change_detector.cc", + "resolution_change_detector.h", + "rgba_color.cc", + "rgba_color.h", + "screen_capture_frame_queue.h", + "screen_capturer_helper.cc", + "screen_capturer_helper.h", + "screen_capturer_mac.mm", + "screen_capturer_win.cc", + "win/cursor.cc", + "win/cursor.h", + "win/d3d_device.cc", + "win/d3d_device.h", + "win/desktop.cc", + "win/desktop.h", + "win/dxgi_adapter_duplicator.cc", + "win/dxgi_adapter_duplicator.h", + "win/dxgi_context.cc", + "win/dxgi_context.h", + "win/dxgi_duplicator_controller.cc", + "win/dxgi_duplicator_controller.h", + "win/dxgi_frame.cc", + "win/dxgi_frame.h", + "win/dxgi_output_duplicator.cc", + "win/dxgi_output_duplicator.h", + "win/dxgi_texture.cc", + "win/dxgi_texture.h", + "win/dxgi_texture_mapping.cc", + "win/dxgi_texture_mapping.h", + "win/dxgi_texture_staging.cc", + "win/dxgi_texture_staging.h", + "win/scoped_gdi_object.h", + "win/scoped_thread_desktop.cc", + "win/scoped_thread_desktop.h", + "win/screen_capture_utils.cc", + "win/screen_capture_utils.h", + "win/screen_capturer_win_directx.cc", + "win/screen_capturer_win_directx.h", + "win/screen_capturer_win_gdi.cc", + "win/screen_capturer_win_gdi.h", + "win/screen_capturer_win_magnifier.cc", + "win/screen_capturer_win_magnifier.h", + "win/window_capture_utils.cc", + "win/window_capture_utils.h", + "window_capturer_mac.mm", + "window_capturer_win.cc", + ] + + if (use_x11) { + sources += [ + "mouse_cursor_monitor_x11.cc", + "screen_capturer_x11.cc", + "window_capturer_x11.cc", + "x11/shared_x_display.cc", + "x11/shared_x_display.h", + "x11/x_error_trap.cc", + "x11/x_error_trap.h", + "x11/x_server_pixel_buffer.cc", + "x11/x_server_pixel_buffer.h", + ] + configs += [ "//build/config/linux:x11" ] + } + + if (!is_win && !is_mac && !use_x11) { + sources += [ + "mouse_cursor_monitor_null.cc", + "screen_capturer_null.cc", + "window_capturer_null.cc", + ] + } + + if (is_mac) { + libs = [ + "AppKit.framework", + "IOKit.framework", + "OpenGL.framework", + ] + } + + if (is_win) { + libs = [ + "d3d11.lib", + "dxgi.lib", + ] + configs += [":desktop_capture_winver"] + } + + deps = [ + ":primitives", + "../..:webrtc_common", + "../../base:rtc_base", # TODO(kjellander): Cleanup in bugs.webrtc.org/3806. + "../../system_wrappers", + "//third_party/libyuv", + ] + + if (use_desktop_capture_differ_sse2) { + deps += [ ":desktop_capture_differ_sse2" ] + } +} + +if (use_desktop_capture_differ_sse2) { + # Have to be compiled as a separate target because it needs to be compiled + # with SSE2 enabled. + rtc_static_library("desktop_capture_differ_sse2") { + visibility = [ ":*" ] + sources = [ + "differ_vector_sse2.cc", + "differ_vector_sse2.h", + ] + + if (is_posix) { + cflags = [ "-msse2" ] + } + } +} diff --git a/WebRtcNative/gn/webrtc/modules/desktop_capture/mouse_cursor_monitor.h b/WebRtcNative/gn/webrtc/modules/desktop_capture/mouse_cursor_monitor.h new file mode 100644 index 00000000..63747497 --- /dev/null +++ b/WebRtcNative/gn/webrtc/modules/desktop_capture/mouse_cursor_monitor.h @@ -0,0 +1,92 @@ +/* + * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + +#ifndef WEBRTC_MODULES_DESKTOP_CAPTURE_MOUSE_CURSOR_MONITOR_H_ +#define WEBRTC_MODULES_DESKTOP_CAPTURE_MOUSE_CURSOR_MONITOR_H_ + +#include "webrtc/modules/desktop_capture/desktop_capture_types.h" +#include "webrtc/modules/desktop_capture/desktop_geometry.h" +#include "webrtc/typedefs.h" + +#define CURSOR_SUPPRESSED 0x00000002 + +namespace webrtc { + +class DesktopCaptureOptions; +class DesktopFrame; +class MouseCursor; + +// Captures mouse shape and position. +class MouseCursorMonitor { + public: + enum CursorState { + // Cursor on top of the window including window decorations. + INSIDE, + + // Cursor is outside of the window. + OUTSIDE, + }; + + enum Mode { + // Capture only shape of the mouse cursor, but not position. + SHAPE_ONLY, + + // Capture both, mouse cursor shape and position. + SHAPE_AND_POSITION, + }; + + // Callback interface used to pass current mouse cursor position and shape. + class Callback { + public: + // Called in response to Capture() when the cursor shape has changed. Must + // take ownership of |cursor|. + virtual void OnMouseCursor(MouseCursor* cursor) = 0; + + // Called in response to Capture(). |position| indicates cursor position + // relative to the |window| specified in the constructor. + virtual void OnMouseCursorPosition(CursorState state, + const DesktopVector& position) = 0; + + protected: + virtual ~Callback() {} + }; + + virtual ~MouseCursorMonitor() {} + + // Creates a capturer that notifies of mouse cursor events while the cursor is + // over the specified window. + static MouseCursorMonitor* CreateForWindow( + const DesktopCaptureOptions& options, + WindowId window); + + // Creates a capturer that monitors the mouse cursor shape and position across + // the entire desktop. + // + // TODO(sergeyu): Provide a way to select a specific screen. + static MouseCursorMonitor* CreateForScreen( + const DesktopCaptureOptions& options, + ScreenId screen); + + // Initializes the monitor with the |callback|, which must remain valid until + // capturer is destroyed. + virtual void Init(Callback* callback, Mode mode) = 0; + + // Captures current cursor shape and position (depending on the |mode| passed + // to Init()). Calls Callback::OnMouseCursor() if cursor shape has + // changed since the last call (or when Capture() is called for the first + // time) and then Callback::OnMouseCursorPosition() if mode is set to + // SHAPE_AND_POSITION. + virtual void Capture() = 0; +}; + +} // namespace webrtc + +#endif // WEBRTC_MODULES_DESKTOP_CAPTURE_MOUSE_CURSOR_MONITOR_H_ + diff --git a/WebRtcNative/include/webrtc/api/array_view.h b/WebRtcNative/include/webrtc/api/array_view.h new file mode 100644 index 00000000..efc642d6 --- /dev/null +++ b/WebRtcNative/include/webrtc/api/array_view.h @@ -0,0 +1,284 @@ +/* + * Copyright 2015 The WebRTC Project Authors. All rights reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + +#ifndef API_ARRAY_VIEW_H_ +#define API_ARRAY_VIEW_H_ + +#include +#include +#include + +#include "rtc_base/checks.h" +#include "rtc_base/type_traits.h" + +namespace rtc { + +// tl;dr: rtc::ArrayView is the same thing as gsl::span from the Guideline +// Support Library. +// +// Many functions read from or write to arrays. The obvious way to do this is +// to use two arguments, a pointer to the first element and an element count: +// +// bool Contains17(const int* arr, size_t size) { +// for (size_t i = 0; i < size; ++i) { +// if (arr[i] == 17) +// return true; +// } +// return false; +// } +// +// This is flexible, since it doesn't matter how the array is stored (C array, +// std::vector, rtc::Buffer, ...), but it's error-prone because the caller has +// to correctly specify the array length: +// +// Contains17(arr, arraysize(arr)); // C array +// Contains17(arr.data(), arr.size()); // std::vector +// Contains17(arr, size); // pointer + size +// ... +// +// It's also kind of messy to have two separate arguments for what is +// conceptually a single thing. +// +// Enter rtc::ArrayView. It contains a T pointer (to an array it doesn't +// own) and a count, and supports the basic things you'd expect, such as +// indexing and iteration. It allows us to write our function like this: +// +// bool Contains17(rtc::ArrayView arr) { +// for (auto e : arr) { +// if (e == 17) +// return true; +// } +// return false; +// } +// +// And even better, because a bunch of things will implicitly convert to +// ArrayView, we can call it like this: +// +// Contains17(arr); // C array +// Contains17(arr); // std::vector +// Contains17(rtc::ArrayView(arr, size)); // pointer + size +// Contains17(nullptr); // nullptr -> empty ArrayView +// ... +// +// ArrayView stores both a pointer and a size, but you may also use +// ArrayView, which has a size that's fixed at compile time (which means +// it only has to store the pointer). +// +// One important point is that ArrayView and ArrayView are +// different types, which allow and don't allow mutation of the array elements, +// respectively. The implicit conversions work just like you'd hope, so that +// e.g. vector will convert to either ArrayView or ArrayView, but const vector will convert only to ArrayView. +// (ArrayView itself can be the source type in such conversions, so +// ArrayView will convert to ArrayView.) +// +// Note: ArrayView is tiny (just a pointer and a count if variable-sized, just +// a pointer if fix-sized) and trivially copyable, so it's probably cheaper to +// pass it by value than by const reference. + +namespace impl { + +// Magic constant for indicating that the size of an ArrayView is variable +// instead of fixed. +enum : std::ptrdiff_t { kArrayViewVarSize = -4711 }; + +// Base class for ArrayViews of fixed nonzero size. +template +class ArrayViewBase { + static_assert(Size > 0, "ArrayView size must be variable or non-negative"); + + public: + ArrayViewBase(T* data, size_t size) : data_(data) {} + + static constexpr size_t size() { return Size; } + static constexpr bool empty() { return false; } + T* data() const { return data_; } + + protected: + static constexpr bool fixed_size() { return true; } + + private: + T* data_; +}; + +// Specialized base class for ArrayViews of fixed zero size. +template +class ArrayViewBase { + public: + explicit ArrayViewBase(T* data, size_t size) {} + + static constexpr size_t size() { return 0; } + static constexpr bool empty() { return true; } + T* data() const { return nullptr; } + + protected: + static constexpr bool fixed_size() { return true; } +}; + +// Specialized base class for ArrayViews of variable size. +template +class ArrayViewBase { + public: + ArrayViewBase(T* data, size_t size) + : data_(size == 0 ? nullptr : data), size_(size) {} + + size_t size() const { return size_; } + bool empty() const { return size_ == 0; } + T* data() const { return data_; } + + protected: + static constexpr bool fixed_size() { return false; } + + private: + T* data_; + size_t size_; +}; + +} // namespace impl + +template +class ArrayView final : public impl::ArrayViewBase { + public: + using value_type = T; + using const_iterator = const T*; + + // Construct an ArrayView from a pointer and a length. + template + ArrayView(U* data, size_t size) + : impl::ArrayViewBase::ArrayViewBase(data, size) { + RTC_DCHECK_EQ(size == 0 ? nullptr : data, this->data()); + RTC_DCHECK_EQ(size, this->size()); + RTC_DCHECK_EQ(!this->data(), + this->size() == 0); // data is null iff size == 0. + } + + // Construct an empty ArrayView. Note that fixed-size ArrayViews of size > 0 + // cannot be empty. + ArrayView() : ArrayView(nullptr, 0) {} + ArrayView(std::nullptr_t) // NOLINT + : ArrayView() {} + ArrayView(std::nullptr_t, size_t size) + : ArrayView(static_cast(nullptr), size) { + static_assert(Size == 0 || Size == impl::kArrayViewVarSize, ""); + RTC_DCHECK_EQ(0, size); + } + + // Construct an ArrayView from a C-style array. + template + ArrayView(U (&array)[N]) // NOLINT + : ArrayView(array, N) { + static_assert(Size == N || Size == impl::kArrayViewVarSize, + "Array size must match ArrayView size"); + } + + // (Only if size is fixed.) Construct a fixed size ArrayView from a + // non-const std::array instance. For an ArrayView with variable size, the + // used ctor is ArrayView(U& u) instead. + template (N)>::type* = nullptr> + ArrayView(std::array& u) // NOLINT + : ArrayView(u.data(), u.size()) {} + + // (Only if size is fixed.) Construct a fixed size ArrayView where T is + // const from a const(expr) std::array instance. For an ArrayView with + // variable size, the used ctor is ArrayView(U& u) instead. + template (N)>::type* = nullptr> + ArrayView(const std::array& u) // NOLINT + : ArrayView(u.data(), u.size()) {} + + // (Only if size is fixed.) Construct an ArrayView from any type U that has a + // static constexpr size() method whose return value is equal to Size, and a + // data() method whose return value converts implicitly to T*. In particular, + // this means we allow conversion from ArrayView to ArrayView, but not the other way around. We also don't allow conversion from + // ArrayView to ArrayView, or from ArrayView to ArrayView when M != N. + template < + typename U, + typename std::enable_if::value>::type* = nullptr> + ArrayView(U& u) // NOLINT + : ArrayView(u.data(), u.size()) { + static_assert(U::size() == Size, "Sizes must match exactly"); + } + + // (Only if size is variable.) Construct an ArrayView from any type U that + // has a size() method whose return value converts implicitly to size_t, and + // a data() method whose return value converts implicitly to T*. In + // particular, this means we allow conversion from ArrayView to + // ArrayView, but not the other way around. Other allowed + // conversions include + // ArrayView to ArrayView or ArrayView, + // std::vector to ArrayView or ArrayView, + // const std::vector to ArrayView, + // rtc::Buffer to ArrayView or ArrayView, and + // const rtc::Buffer to ArrayView. + template < + typename U, + typename std::enable_if::value>::type* = nullptr> + ArrayView(U& u) // NOLINT + : ArrayView(u.data(), u.size()) {} + + // Indexing and iteration. These allow mutation even if the ArrayView is + // const, because the ArrayView doesn't own the array. (To prevent mutation, + // use a const element type.) + T& operator[](size_t idx) const { + RTC_DCHECK_LT(idx, this->size()); + RTC_DCHECK(this->data()); + return this->data()[idx]; + } + T* begin() const { return this->data(); } + T* end() const { return this->data() + this->size(); } + const T* cbegin() const { return this->data(); } + const T* cend() const { return this->data() + this->size(); } + + ArrayView subview(size_t offset, size_t size) const { + return offset < this->size() + ? ArrayView(this->data() + offset, + std::min(size, this->size() - offset)) + : ArrayView(); + } + ArrayView subview(size_t offset) const { + return subview(offset, this->size()); + } +}; + +// Comparing two ArrayViews compares their (pointer,size) pairs; it does *not* +// dereference the pointers. +template +bool operator==(const ArrayView& a, const ArrayView& b) { + return a.data() == b.data() && a.size() == b.size(); +} +template +bool operator!=(const ArrayView& a, const ArrayView& b) { + return !(a == b); +} + +// Variable-size ArrayViews are the size of two pointers; fixed-size ArrayViews +// are the size of one pointer. (And as a special case, fixed-size ArrayViews +// of size 0 require no storage.) +static_assert(sizeof(ArrayView) == 2 * sizeof(int*), ""); +static_assert(sizeof(ArrayView) == sizeof(int*), ""); +static_assert(std::is_empty>::value, ""); + +template +inline ArrayView MakeArrayView(T* data, size_t size) { + return ArrayView(data, size); +} + +} // namespace rtc + +#endif // API_ARRAY_VIEW_H_ diff --git a/WebRtcNative/include/webrtc/api/audio/audio_frame.h b/WebRtcNative/include/webrtc/api/audio/audio_frame.h new file mode 100644 index 00000000..cc078771 --- /dev/null +++ b/WebRtcNative/include/webrtc/api/audio/audio_frame.h @@ -0,0 +1,131 @@ +/* + * Copyright (c) 2018 The WebRTC project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + +#ifndef API_AUDIO_AUDIO_FRAME_H_ +#define API_AUDIO_AUDIO_FRAME_H_ + +#include +#include + +#include "rtc_base/constructormagic.h" + +namespace webrtc { + +/* This class holds up to 60 ms of super-wideband (32 kHz) stereo audio. It + * allows for adding and subtracting frames while keeping track of the resulting + * states. + * + * Notes + * - This is a de-facto api, not designed for external use. The AudioFrame class + * is in need of overhaul or even replacement, and anyone depending on it + * should be prepared for that. + * - The total number of samples is samples_per_channel_ * num_channels_. + * - Stereo data is interleaved starting with the left channel. + */ +class AudioFrame { + public: + // Using constexpr here causes linker errors unless the variable also has an + // out-of-class definition, which is impractical in this header-only class. + // (This makes no sense because it compiles as an enum value, which we most + // certainly cannot take the address of, just fine.) C++17 introduces inline + // variables which should allow us to switch to constexpr and keep this a + // header-only class. + enum : size_t { + // Stereo, 32 kHz, 60 ms (2 * 32 * 60) + kMaxDataSizeSamples = 3840, + kMaxDataSizeBytes = kMaxDataSizeSamples * sizeof(int16_t), + }; + + enum VADActivity { kVadActive = 0, kVadPassive = 1, kVadUnknown = 2 }; + enum SpeechType { + kNormalSpeech = 0, + kPLC = 1, + kCNG = 2, + kPLCCNG = 3, + kUndefined = 4 + }; + + AudioFrame(); + + // Resets all members to their default state. + void Reset(); + // Same as Reset(), but leaves mute state unchanged. Muting a frame requires + // the buffer to be zeroed on the next call to mutable_data(). Callers + // intending to write to the buffer immediately after Reset() can instead use + // ResetWithoutMuting() to skip this wasteful zeroing. + void ResetWithoutMuting(); + + void UpdateFrame(uint32_t timestamp, + const int16_t* data, + size_t samples_per_channel, + int sample_rate_hz, + SpeechType speech_type, + VADActivity vad_activity, + size_t num_channels = 1); + + void CopyFrom(const AudioFrame& src); + + // Sets a wall-time clock timestamp in milliseconds to be used for profiling + // of time between two points in the audio chain. + // Example: + // t0: UpdateProfileTimeStamp() + // t1: ElapsedProfileTimeMs() => t1 - t0 [msec] + void UpdateProfileTimeStamp(); + // Returns the time difference between now and when UpdateProfileTimeStamp() + // was last called. Returns -1 if UpdateProfileTimeStamp() has not yet been + // called. + int64_t ElapsedProfileTimeMs() const; + + // data() returns a zeroed static buffer if the frame is muted. + // mutable_frame() always returns a non-static buffer; the first call to + // mutable_frame() zeros the non-static buffer and marks the frame unmuted. + const int16_t* data() const; + int16_t* mutable_data(); + + // Prefer to mute frames using AudioFrameOperations::Mute. + void Mute(); + // Frame is muted by default. + bool muted() const; + + // RTP timestamp of the first sample in the AudioFrame. + uint32_t timestamp_ = 0; + // Time since the first frame in milliseconds. + // -1 represents an uninitialized value. + int64_t elapsed_time_ms_ = -1; + // NTP time of the estimated capture time in local timebase in milliseconds. + // -1 represents an uninitialized value. + int64_t ntp_time_ms_ = -1; + size_t samples_per_channel_ = 0; + int sample_rate_hz_ = 0; + size_t num_channels_ = 0; + SpeechType speech_type_ = kUndefined; + VADActivity vad_activity_ = kVadUnknown; + // Monotonically increasing timestamp intended for profiling of audio frames. + // Typically used for measuring elapsed time between two different points in + // the audio path. No lock is used to save resources and we are thread safe + // by design. Also, absl::optional is not used since it will cause a "complex + // class/struct needs an explicit out-of-line destructor" build error. + int64_t profile_timestamp_ms_ = 0; + + private: + // A permamently zeroed out buffer to represent muted frames. This is a + // header-only class, so the only way to avoid creating a separate empty + // buffer per translation unit is to wrap a static in an inline function. + static const int16_t* empty_data(); + + int16_t data_[kMaxDataSizeSamples]; + bool muted_ = true; + + RTC_DISALLOW_COPY_AND_ASSIGN(AudioFrame); +}; + +} // namespace webrtc + +#endif // API_AUDIO_AUDIO_FRAME_H_ diff --git a/WebRtc.NET/include/webrtc/api/audio/audio_mixer.h b/WebRtcNative/include/webrtc/api/audio/audio_mixer.h similarity index 93% rename from WebRtc.NET/include/webrtc/api/audio/audio_mixer.h rename to WebRtcNative/include/webrtc/api/audio/audio_mixer.h index 931f20ea..14eefc17 100644 --- a/WebRtc.NET/include/webrtc/api/audio/audio_mixer.h +++ b/WebRtcNative/include/webrtc/api/audio/audio_mixer.h @@ -8,13 +8,13 @@ * be found in the AUTHORS file in the root of the source tree. */ -#ifndef WEBRTC_API_AUDIO_AUDIO_MIXER_H_ -#define WEBRTC_API_AUDIO_AUDIO_MIXER_H_ +#ifndef API_AUDIO_AUDIO_MIXER_H_ +#define API_AUDIO_AUDIO_MIXER_H_ #include -#include "webrtc/base/refcount.h" -#include "webrtc/modules/include/module_common_types.h" +#include "api/audio/audio_frame.h" +#include "rtc_base/refcount.h" namespace webrtc { @@ -77,4 +77,4 @@ class AudioMixer : public rtc::RefCountInterface { }; } // namespace webrtc -#endif // WEBRTC_API_AUDIO_AUDIO_MIXER_H_ +#endif // API_AUDIO_AUDIO_MIXER_H_ diff --git a/WebRtcNative/include/webrtc/api/audio/echo_canceller3_config.h b/WebRtcNative/include/webrtc/api/audio/echo_canceller3_config.h new file mode 100644 index 00000000..d633d047 --- /dev/null +++ b/WebRtcNative/include/webrtc/api/audio/echo_canceller3_config.h @@ -0,0 +1,173 @@ +/* + * Copyright (c) 2018 The WebRTC project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + +#ifndef API_AUDIO_ECHO_CANCELLER3_CONFIG_H_ +#define API_AUDIO_ECHO_CANCELLER3_CONFIG_H_ + +#include // size_t + +namespace webrtc { + +// Configuration struct for EchoCanceller3 +struct EchoCanceller3Config { + EchoCanceller3Config(); + EchoCanceller3Config(const EchoCanceller3Config& e); + struct Delay { + size_t default_delay = 5; + size_t down_sampling_factor = 4; + size_t num_filters = 6; + size_t api_call_jitter_blocks = 26; + size_t min_echo_path_delay_blocks = 0; + size_t delay_headroom_blocks = 2; + size_t hysteresis_limit_1_blocks = 1; + size_t hysteresis_limit_2_blocks = 1; + size_t skew_hysteresis_blocks = 3; + } delay; + + struct Filter { + struct MainConfiguration { + size_t length_blocks; + float leakage_converged; + float leakage_diverged; + float error_floor; + float noise_gate; + }; + + struct ShadowConfiguration { + size_t length_blocks; + float rate; + float noise_gate; + }; + + MainConfiguration main = {13, 0.00005f, 0.01f, 0.1f, 20075344.f}; + ShadowConfiguration shadow = {13, 0.7f, 20075344.f}; + + MainConfiguration main_initial = {12, 0.005f, 0.5f, 0.001f, 20075344.f}; + ShadowConfiguration shadow_initial = {12, 0.9f, 20075344.f}; + + size_t config_change_duration_blocks = 250; + } filter; + + struct Erle { + float min = 1.f; + float max_l = 4.f; + float max_h = 1.5f; + } erle; + + struct EpStrength { + float lf = 1.f; + float mf = 1.f; + float hf = 1.f; + float default_len = 0.88f; + bool reverb_based_on_render = true; + bool echo_can_saturate = true; + bool bounded_erl = false; + } ep_strength; + + struct Mask { + Mask(); + Mask(const Mask& m); + float m0 = 0.1f; + float m1 = 0.01f; + float m2 = 0.0001f; + float m3 = 0.01f; + float m5 = 0.01f; + float m6 = 0.0001f; + float m7 = 0.01f; + float m8 = 0.0001f; + float m9 = 0.1f; + + float gain_curve_offset = 1.45f; + float gain_curve_slope = 5.f; + float temporal_masking_lf = 0.9f; + float temporal_masking_hf = 0.6f; + size_t temporal_masking_lf_bands = 3; + } gain_mask; + + struct EchoAudibility { + float low_render_limit = 4 * 64.f; + float normal_render_limit = 64.f; + float floor_power = 2 * 64.f; + float audibility_threshold_lf = 10; + float audibility_threshold_mf = 10; + float audibility_threshold_hf = 10; + bool use_stationary_properties = true; + } echo_audibility; + + struct RenderLevels { + float active_render_limit = 100.f; + float poor_excitation_render_limit = 150.f; + float poor_excitation_render_limit_ds8 = 20.f; + } render_levels; + + struct GainUpdates { + struct GainChanges { + float max_inc; + float max_dec; + float rate_inc; + float rate_dec; + float min_inc; + float min_dec; + }; + + GainChanges low_noise = {2.f, 2.f, 1.4f, 1.4f, 1.1f, 1.1f}; + GainChanges initial = {2.f, 2.f, 1.5f, 1.5f, 1.2f, 1.2f}; + GainChanges normal = {2.f, 2.f, 1.5f, 1.5f, 1.2f, 1.2f}; + GainChanges saturation = {1.2f, 1.2f, 1.5f, 1.5f, 1.f, 1.f}; + GainChanges nonlinear = {1.5f, 1.5f, 1.2f, 1.2f, 1.1f, 1.1f}; + + float max_inc_factor = 2.0f; + float max_dec_factor_lf = 0.25f; + float floor_first_increase = 0.00001f; + } gain_updates; + + struct EchoRemovalControl { + struct GainRampup { + float initial_gain = 0.0f; + float first_non_zero_gain = 0.001f; + int non_zero_gain_blocks = 187; + int full_gain_blocks = 312; + } gain_rampup; + bool has_clock_drift = false; + bool linear_and_stable_echo_path = false; + } echo_removal_control; + + struct EchoModel { + EchoModel(); + EchoModel(const EchoModel& e); + size_t noise_floor_hold = 50; + float min_noise_floor_power = 1638400.f; + float stationary_gate_slope = 10.f; + float noise_gate_power = 27509.42f; + float noise_gate_slope = 0.3f; + size_t render_pre_window_size = 1; + size_t render_post_window_size = 1; + size_t render_pre_window_size_init = 10; + size_t render_post_window_size_init = 10; + float nonlinear_hold = 1; + float nonlinear_release = 0.001f; + } echo_model; + + struct Suppressor { + size_t bands_with_reliable_coherence = 5; + size_t nearend_average_blocks = 4; + + struct MaskingThresholds { + float enr_transparent; + float enr_suppress; + float emr_transparent; + }; + MaskingThresholds mask_lf = {.2f, .3f, .3f}; + MaskingThresholds mask_hf = {.07f, .1f, .3f}; + } suppressor; +}; +} // namespace webrtc + +#endif // API_AUDIO_ECHO_CANCELLER3_CONFIG_H_ diff --git a/WebRtcNative/include/webrtc/api/audio/echo_canceller3_factory.h b/WebRtcNative/include/webrtc/api/audio/echo_canceller3_factory.h new file mode 100644 index 00000000..f6db1168 --- /dev/null +++ b/WebRtcNative/include/webrtc/api/audio/echo_canceller3_factory.h @@ -0,0 +1,38 @@ +/* + * Copyright (c) 2018 The WebRTC project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + +#ifndef API_AUDIO_ECHO_CANCELLER3_FACTORY_H_ +#define API_AUDIO_ECHO_CANCELLER3_FACTORY_H_ + +#include + +#include "api/audio/echo_canceller3_config.h" +#include "api/audio/echo_control.h" + +namespace webrtc { + +class EchoCanceller3Factory : public EchoControlFactory { + public: + // Factory producing EchoCanceller3 instances with the default configuration. + EchoCanceller3Factory(); + + // Factory producing EchoCanceller3 instances with the specified + // configuration. + explicit EchoCanceller3Factory(const EchoCanceller3Config& config); + + // Creates an EchoCanceller3 running at the specified sampling rate. + std::unique_ptr Create(int sample_rate_hz) override; + + private: + const EchoCanceller3Config config_; +}; +} // namespace webrtc + +#endif // API_AUDIO_ECHO_CANCELLER3_FACTORY_H_ diff --git a/WebRtcNative/include/webrtc/api/audio/echo_control.h b/WebRtcNative/include/webrtc/api/audio/echo_control.h new file mode 100644 index 00000000..f549f40f --- /dev/null +++ b/WebRtcNative/include/webrtc/api/audio/echo_control.h @@ -0,0 +1,55 @@ +/* + * Copyright (c) 2018 The WebRTC project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + +#ifndef API_AUDIO_ECHO_CONTROL_H_ +#define API_AUDIO_ECHO_CONTROL_H_ + +#include + +namespace webrtc { + +class AudioBuffer; + +// Interface for an acoustic echo cancellation (AEC) submodule. +class EchoControl { + public: + // Analysis (not changing) of the render signal. + virtual void AnalyzeRender(AudioBuffer* render) = 0; + + // Analysis (not changing) of the capture signal. + virtual void AnalyzeCapture(AudioBuffer* capture) = 0; + + // Processes the capture signal in order to remove the echo. + virtual void ProcessCapture(AudioBuffer* capture, bool echo_path_change) = 0; + + struct Metrics { + double echo_return_loss; + double echo_return_loss_enhancement; + int delay_ms; + }; + + // Collect current metrics from the echo controller. + virtual Metrics GetMetrics() const = 0; + + // Provides an optional external estimate of the audio buffer delay. + virtual void SetAudioBufferDelay(size_t delay_ms) = 0; + + virtual ~EchoControl() {} +}; + +// Interface for a factory that creates EchoControllers. +class EchoControlFactory { + public: + virtual std::unique_ptr Create(int sample_rate_hz) = 0; + virtual ~EchoControlFactory() = default; +}; +} // namespace webrtc + +#endif // API_AUDIO_ECHO_CONTROL_H_ diff --git a/WebRtcNative/include/webrtc/api/audio_codecs/L16/audio_decoder_L16.h b/WebRtcNative/include/webrtc/api/audio_codecs/L16/audio_decoder_L16.h new file mode 100644 index 00000000..184ec24e --- /dev/null +++ b/WebRtcNative/include/webrtc/api/audio_codecs/L16/audio_decoder_L16.h @@ -0,0 +1,47 @@ +/* + * Copyright (c) 2017 The WebRTC project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + +#ifndef API_AUDIO_CODECS_L16_AUDIO_DECODER_L16_H_ +#define API_AUDIO_CODECS_L16_AUDIO_DECODER_L16_H_ + +#include +#include + +#include "absl/types/optional.h" +#include "api/audio_codecs/audio_codec_pair_id.h" +#include "api/audio_codecs/audio_decoder.h" +#include "api/audio_codecs/audio_format.h" + +namespace webrtc { + +// L16 decoder API for use as a template parameter to +// CreateAudioDecoderFactory<...>(). +// +// NOTE: This struct is still under development and may change without notice. +struct AudioDecoderL16 { + struct Config { + bool IsOk() const { + return (sample_rate_hz == 8000 || sample_rate_hz == 16000 || + sample_rate_hz == 32000 || sample_rate_hz == 48000) && + num_channels >= 1; + } + int sample_rate_hz = 8000; + int num_channels = 1; + }; + static absl::optional SdpToConfig(const SdpAudioFormat& audio_format); + static void AppendSupportedDecoders(std::vector* specs); + static std::unique_ptr MakeAudioDecoder( + const Config& config, + absl::optional codec_pair_id = absl::nullopt); +}; + +} // namespace webrtc + +#endif // API_AUDIO_CODECS_L16_AUDIO_DECODER_L16_H_ diff --git a/WebRtcNative/include/webrtc/api/audio_codecs/L16/audio_encoder_L16.h b/WebRtcNative/include/webrtc/api/audio_codecs/L16/audio_encoder_L16.h new file mode 100644 index 00000000..340e3af4 --- /dev/null +++ b/WebRtcNative/include/webrtc/api/audio_codecs/L16/audio_encoder_L16.h @@ -0,0 +1,51 @@ +/* + * Copyright (c) 2017 The WebRTC project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + +#ifndef API_AUDIO_CODECS_L16_AUDIO_ENCODER_L16_H_ +#define API_AUDIO_CODECS_L16_AUDIO_ENCODER_L16_H_ + +#include +#include + +#include "absl/types/optional.h" +#include "api/audio_codecs/audio_codec_pair_id.h" +#include "api/audio_codecs/audio_encoder.h" +#include "api/audio_codecs/audio_format.h" + +namespace webrtc { + +// L16 encoder API for use as a template parameter to +// CreateAudioEncoderFactory<...>(). +// +// NOTE: This struct is still under development and may change without notice. +struct AudioEncoderL16 { + struct Config { + bool IsOk() const { + return (sample_rate_hz == 8000 || sample_rate_hz == 16000 || + sample_rate_hz == 32000 || sample_rate_hz == 48000) && + num_channels >= 1 && frame_size_ms > 0 && frame_size_ms <= 120 && + frame_size_ms % 10 == 0; + } + int sample_rate_hz = 8000; + int num_channels = 1; + int frame_size_ms = 10; + }; + static absl::optional SdpToConfig(const SdpAudioFormat& audio_format); + static void AppendSupportedEncoders(std::vector* specs); + static AudioCodecInfo QueryAudioEncoder(const Config& config); + static std::unique_ptr MakeAudioEncoder( + const Config& config, + int payload_type, + absl::optional codec_pair_id = absl::nullopt); +}; + +} // namespace webrtc + +#endif // API_AUDIO_CODECS_L16_AUDIO_ENCODER_L16_H_ diff --git a/WebRtcNative/include/webrtc/api/audio_codecs/audio_codec_pair_id.h b/WebRtcNative/include/webrtc/api/audio_codecs/audio_codec_pair_id.h new file mode 100644 index 00000000..b10f14ea --- /dev/null +++ b/WebRtcNative/include/webrtc/api/audio_codecs/audio_codec_pair_id.h @@ -0,0 +1,74 @@ +/* + * Copyright (c) 2018 The WebRTC project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + +#ifndef API_AUDIO_CODECS_AUDIO_CODEC_PAIR_ID_H_ +#define API_AUDIO_CODECS_AUDIO_CODEC_PAIR_ID_H_ + +#include + +#include + +namespace webrtc { + +class AudioCodecPairId final { + public: + // Copyable, but not default constructible. + AudioCodecPairId() = delete; + AudioCodecPairId(const AudioCodecPairId&) = default; + AudioCodecPairId(AudioCodecPairId&&) = default; + AudioCodecPairId& operator=(const AudioCodecPairId&) = default; + AudioCodecPairId& operator=(AudioCodecPairId&&) = default; + + friend void swap(AudioCodecPairId& a, AudioCodecPairId& b) { + using std::swap; + swap(a.id_, b.id_); + } + + // Creates a new ID, unequal to any previously created ID. + static AudioCodecPairId Create(); + + // IDs can be tested for equality. + friend bool operator==(AudioCodecPairId a, AudioCodecPairId b) { + return a.id_ == b.id_; + } + friend bool operator!=(AudioCodecPairId a, AudioCodecPairId b) { + return a.id_ != b.id_; + } + + // Comparisons. The ordering of ID values is completely arbitrary, but + // stable, so it's useful e.g. if you want to use IDs as keys in an ordered + // map. + friend bool operator<(AudioCodecPairId a, AudioCodecPairId b) { + return a.id_ < b.id_; + } + friend bool operator<=(AudioCodecPairId a, AudioCodecPairId b) { + return a.id_ <= b.id_; + } + friend bool operator>=(AudioCodecPairId a, AudioCodecPairId b) { + return a.id_ >= b.id_; + } + friend bool operator>(AudioCodecPairId a, AudioCodecPairId b) { + return a.id_ > b.id_; + } + + // Returns a numeric representation of the ID. The numeric values are + // completely arbitrary, but stable, collision-free, and reasonably evenly + // distributed, so they are e.g. useful as hash values in unordered maps. + uint64_t NumericRepresentation() const { return id_; } + + private: + explicit AudioCodecPairId(uint64_t id) : id_(id) {} + + uint64_t id_; +}; + +} // namespace webrtc + +#endif // API_AUDIO_CODECS_AUDIO_CODEC_PAIR_ID_H_ diff --git a/WebRtcNative/include/webrtc/api/audio_codecs/audio_decoder.h b/WebRtcNative/include/webrtc/api/audio_codecs/audio_decoder.h new file mode 100644 index 00000000..9a955a6e --- /dev/null +++ b/WebRtcNative/include/webrtc/api/audio_codecs/audio_decoder.h @@ -0,0 +1,179 @@ +/* + * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + +#ifndef API_AUDIO_CODECS_AUDIO_DECODER_H_ +#define API_AUDIO_CODECS_AUDIO_DECODER_H_ + +#include +#include + +#include "absl/types/optional.h" +#include "api/array_view.h" +#include "rtc_base/buffer.h" +#include "rtc_base/constructormagic.h" + +namespace webrtc { + +class AudioDecoder { + public: + enum SpeechType { + kSpeech = 1, + kComfortNoise = 2, + }; + + // Used by PacketDuration below. Save the value -1 for errors. + enum { kNotImplemented = -2 }; + + AudioDecoder() = default; + virtual ~AudioDecoder() = default; + + class EncodedAudioFrame { + public: + struct DecodeResult { + size_t num_decoded_samples; + SpeechType speech_type; + }; + + virtual ~EncodedAudioFrame() = default; + + // Returns the duration in samples-per-channel of this audio frame. + // If no duration can be ascertained, returns zero. + virtual size_t Duration() const = 0; + + // Returns true if this packet contains DTX. + virtual bool IsDtxPacket() const; + + // Decodes this frame of audio and writes the result in |decoded|. + // |decoded| must be large enough to store as many samples as indicated by a + // call to Duration() . On success, returns an absl::optional containing the + // total number of samples across all channels, as well as whether the + // decoder produced comfort noise or speech. On failure, returns an empty + // absl::optional. Decode may be called at most once per frame object. + virtual absl::optional Decode( + rtc::ArrayView decoded) const = 0; + }; + + struct ParseResult { + ParseResult(); + ParseResult(uint32_t timestamp, + int priority, + std::unique_ptr frame); + ParseResult(ParseResult&& b); + ~ParseResult(); + + ParseResult& operator=(ParseResult&& b); + + // The timestamp of the frame is in samples per channel. + uint32_t timestamp; + // The relative priority of the frame compared to other frames of the same + // payload and the same timeframe. A higher value means a lower priority. + // The highest priority is zero - negative values are not allowed. + int priority; + std::unique_ptr frame; + }; + + // Let the decoder parse this payload and prepare zero or more decodable + // frames. Each frame must be between 10 ms and 120 ms long. The caller must + // ensure that the AudioDecoder object outlives any frame objects returned by + // this call. The decoder is free to swap or move the data from the |payload| + // buffer. |timestamp| is the input timestamp, in samples, corresponding to + // the start of the payload. + virtual std::vector ParsePayload(rtc::Buffer&& payload, + uint32_t timestamp); + + // Decodes |encode_len| bytes from |encoded| and writes the result in + // |decoded|. The maximum bytes allowed to be written into |decoded| is + // |max_decoded_bytes|. Returns the total number of samples across all + // channels. If the decoder produced comfort noise, |speech_type| + // is set to kComfortNoise, otherwise it is kSpeech. The desired output + // sample rate is provided in |sample_rate_hz|, which must be valid for the + // codec at hand. + int Decode(const uint8_t* encoded, + size_t encoded_len, + int sample_rate_hz, + size_t max_decoded_bytes, + int16_t* decoded, + SpeechType* speech_type); + + // Same as Decode(), but interfaces to the decoders redundant decode function. + // The default implementation simply calls the regular Decode() method. + int DecodeRedundant(const uint8_t* encoded, + size_t encoded_len, + int sample_rate_hz, + size_t max_decoded_bytes, + int16_t* decoded, + SpeechType* speech_type); + + // Indicates if the decoder implements the DecodePlc method. + virtual bool HasDecodePlc() const; + + // Calls the packet-loss concealment of the decoder to update the state after + // one or several lost packets. The caller has to make sure that the + // memory allocated in |decoded| should accommodate |num_frames| frames. + virtual size_t DecodePlc(size_t num_frames, int16_t* decoded); + + // Resets the decoder state (empty buffers etc.). + virtual void Reset() = 0; + + // Notifies the decoder of an incoming packet to NetEQ. + virtual int IncomingPacket(const uint8_t* payload, + size_t payload_len, + uint16_t rtp_sequence_number, + uint32_t rtp_timestamp, + uint32_t arrival_timestamp); + + // Returns the last error code from the decoder. + virtual int ErrorCode(); + + // Returns the duration in samples-per-channel of the payload in |encoded| + // which is |encoded_len| bytes long. Returns kNotImplemented if no duration + // estimate is available, or -1 in case of an error. + virtual int PacketDuration(const uint8_t* encoded, size_t encoded_len) const; + + // Returns the duration in samples-per-channel of the redandant payload in + // |encoded| which is |encoded_len| bytes long. Returns kNotImplemented if no + // duration estimate is available, or -1 in case of an error. + virtual int PacketDurationRedundant(const uint8_t* encoded, + size_t encoded_len) const; + + // Detects whether a packet has forward error correction. The packet is + // comprised of the samples in |encoded| which is |encoded_len| bytes long. + // Returns true if the packet has FEC and false otherwise. + virtual bool PacketHasFec(const uint8_t* encoded, size_t encoded_len) const; + + // Returns the actual sample rate of the decoder's output. This value may not + // change during the lifetime of the decoder. + virtual int SampleRateHz() const = 0; + + // The number of channels in the decoder's output. This value may not change + // during the lifetime of the decoder. + virtual size_t Channels() const = 0; + + protected: + static SpeechType ConvertSpeechType(int16_t type); + + virtual int DecodeInternal(const uint8_t* encoded, + size_t encoded_len, + int sample_rate_hz, + int16_t* decoded, + SpeechType* speech_type) = 0; + + virtual int DecodeRedundantInternal(const uint8_t* encoded, + size_t encoded_len, + int sample_rate_hz, + int16_t* decoded, + SpeechType* speech_type); + + private: + RTC_DISALLOW_COPY_AND_ASSIGN(AudioDecoder); +}; + +} // namespace webrtc +#endif // API_AUDIO_CODECS_AUDIO_DECODER_H_ diff --git a/WebRtcNative/include/webrtc/api/audio_codecs/audio_decoder_factory.h b/WebRtcNative/include/webrtc/api/audio_codecs/audio_decoder_factory.h new file mode 100644 index 00000000..90f93f0c --- /dev/null +++ b/WebRtcNative/include/webrtc/api/audio_codecs/audio_decoder_factory.h @@ -0,0 +1,49 @@ +/* + * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + +#ifndef API_AUDIO_CODECS_AUDIO_DECODER_FACTORY_H_ +#define API_AUDIO_CODECS_AUDIO_DECODER_FACTORY_H_ + +#include +#include + +#include "absl/types/optional.h" +#include "api/audio_codecs/audio_codec_pair_id.h" +#include "api/audio_codecs/audio_decoder.h" +#include "api/audio_codecs/audio_format.h" +#include "rtc_base/refcount.h" + +namespace webrtc { + +// A factory that creates AudioDecoders. +// NOTE: This class is still under development and may change without notice. +class AudioDecoderFactory : public rtc::RefCountInterface { + public: + virtual std::vector GetSupportedDecoders() = 0; + + virtual bool IsSupportedDecoder(const SdpAudioFormat& format) = 0; + + // Create a new decoder instance. The `codec_pair_id` argument is used to + // link encoders and decoders that talk to the same remote entity; if a + // MakeAudioEncoder() and a MakeAudioDecoder() call receive non-null IDs that + // compare equal, the factory implementations may assume that the encoder and + // decoder form a pair. + // + // Note: Implementations need to be robust against combinations other than + // one encoder, one decoder getting the same ID; such decoders must still + // work. + virtual std::unique_ptr MakeAudioDecoder( + const SdpAudioFormat& format, + absl::optional codec_pair_id) = 0; +}; + +} // namespace webrtc + +#endif // API_AUDIO_CODECS_AUDIO_DECODER_FACTORY_H_ diff --git a/WebRtcNative/include/webrtc/api/audio_codecs/audio_decoder_factory_template.h b/WebRtcNative/include/webrtc/api/audio_codecs/audio_decoder_factory_template.h new file mode 100644 index 00000000..cdbe8bde --- /dev/null +++ b/WebRtcNative/include/webrtc/api/audio_codecs/audio_decoder_factory_template.h @@ -0,0 +1,135 @@ +/* + * Copyright (c) 2017 The WebRTC project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + +#ifndef API_AUDIO_CODECS_AUDIO_DECODER_FACTORY_TEMPLATE_H_ +#define API_AUDIO_CODECS_AUDIO_DECODER_FACTORY_TEMPLATE_H_ + +#include +#include + +#include "api/audio_codecs/audio_decoder_factory.h" +#include "rtc_base/refcountedobject.h" +#include "rtc_base/scoped_ref_ptr.h" + +namespace webrtc { + +namespace audio_decoder_factory_template_impl { + +template +struct Helper; + +// Base case: 0 template parameters. +template <> +struct Helper<> { + static void AppendSupportedDecoders(std::vector* specs) {} + static bool IsSupportedDecoder(const SdpAudioFormat& format) { return false; } + static std::unique_ptr MakeAudioDecoder( + const SdpAudioFormat& format, + absl::optional codec_pair_id) { + return nullptr; + } +}; + +// Inductive case: Called with n + 1 template parameters; calls subroutines +// with n template parameters. +template +struct Helper { + static void AppendSupportedDecoders(std::vector* specs) { + T::AppendSupportedDecoders(specs); + Helper::AppendSupportedDecoders(specs); + } + static bool IsSupportedDecoder(const SdpAudioFormat& format) { + auto opt_config = T::SdpToConfig(format); + static_assert(std::is_same>::value, + "T::SdpToConfig() must return a value of type " + "absl::optional"); + return opt_config ? true : Helper::IsSupportedDecoder(format); + } + static std::unique_ptr MakeAudioDecoder( + const SdpAudioFormat& format, + absl::optional codec_pair_id) { + auto opt_config = T::SdpToConfig(format); + return opt_config ? T::MakeAudioDecoder(*opt_config, codec_pair_id) + : Helper::MakeAudioDecoder(format, codec_pair_id); + } +}; + +template +class AudioDecoderFactoryT : public AudioDecoderFactory { + public: + std::vector GetSupportedDecoders() override { + std::vector specs; + Helper::AppendSupportedDecoders(&specs); + return specs; + } + + bool IsSupportedDecoder(const SdpAudioFormat& format) override { + return Helper::IsSupportedDecoder(format); + } + + std::unique_ptr MakeAudioDecoder( + const SdpAudioFormat& format, + absl::optional codec_pair_id) override { + return Helper::MakeAudioDecoder(format, codec_pair_id); + } +}; + +} // namespace audio_decoder_factory_template_impl + +// Make an AudioDecoderFactory that can create instances of the given decoders. +// +// Each decoder type is given as a template argument to the function; it should +// be a struct with the following static member functions: +// +// // Converts |audio_format| to a ConfigType instance. Returns an empty +// // optional if |audio_format| doesn't correctly specify an decoder of our +// // type. +// absl::optional SdpToConfig(const SdpAudioFormat& audio_format); +// +// // Appends zero or more AudioCodecSpecs to the list that will be returned +// // by AudioDecoderFactory::GetSupportedDecoders(). +// void AppendSupportedDecoders(std::vector* specs); +// +// // Creates an AudioDecoder for the specified format. Used to implement +// // AudioDecoderFactory::MakeAudioDecoder(). +// std::unique_ptr MakeAudioDecoder( +// const ConfigType& config, +// absl::optional codec_pair_id); +// +// ConfigType should be a type that encapsulates all the settings needed to +// create an AudioDecoder. T::Config (where T is the decoder struct) should +// either be the config type, or an alias for it. +// +// Whenever it tries to do something, the new factory will try each of the +// decoder types in the order they were specified in the template argument +// list, stopping at the first one that claims to be able to do the job. +// +// NOTE: This function is still under development and may change without notice. +// +// TODO(kwiberg): Point at CreateBuiltinAudioDecoderFactory() for an example of +// how it is used. +template +rtc::scoped_refptr CreateAudioDecoderFactory() { + // There's no technical reason we couldn't allow zero template parameters, + // but such a factory couldn't create any decoders, and callers can do this + // by mistake by simply forgetting the <> altogether. So we forbid it in + // order to prevent caller foot-shooting. + static_assert(sizeof...(Ts) >= 1, + "Caller must give at least one template parameter"); + + return rtc::scoped_refptr( + new rtc::RefCountedObject< + audio_decoder_factory_template_impl::AudioDecoderFactoryT>()); +} + +} // namespace webrtc + +#endif // API_AUDIO_CODECS_AUDIO_DECODER_FACTORY_TEMPLATE_H_ diff --git a/WebRtcNative/include/webrtc/api/audio_codecs/audio_encoder.h b/WebRtcNative/include/webrtc/api/audio_codecs/audio_encoder.h new file mode 100644 index 00000000..6a1f6534 --- /dev/null +++ b/WebRtcNative/include/webrtc/api/audio_codecs/audio_encoder.h @@ -0,0 +1,248 @@ +/* + * Copyright (c) 2014 The WebRTC project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + +#ifndef API_AUDIO_CODECS_AUDIO_ENCODER_H_ +#define API_AUDIO_CODECS_AUDIO_ENCODER_H_ + +#include +#include +#include +#include + +#include "absl/types/optional.h" +#include "api/array_view.h" +#include "rtc_base/buffer.h" +#include "rtc_base/deprecation.h" + +namespace webrtc { + +class RtcEventLog; + +// Statistics related to Audio Network Adaptation. +struct ANAStats { + ANAStats(); + ANAStats(const ANAStats&); + ~ANAStats(); + // Number of actions taken by the ANA bitrate controller since the start of + // the call. If this value is not set, it indicates that the bitrate + // controller is disabled. + absl::optional bitrate_action_counter; + // Number of actions taken by the ANA channel controller since the start of + // the call. If this value is not set, it indicates that the channel + // controller is disabled. + absl::optional channel_action_counter; + // Number of actions taken by the ANA DTX controller since the start of the + // call. If this value is not set, it indicates that the DTX controller is + // disabled. + absl::optional dtx_action_counter; + // Number of actions taken by the ANA FEC controller since the start of the + // call. If this value is not set, it indicates that the FEC controller is + // disabled. + absl::optional fec_action_counter; + // Number of times the ANA frame length controller decided to increase the + // frame length since the start of the call. If this value is not set, it + // indicates that the frame length controller is disabled. + absl::optional frame_length_increase_counter; + // Number of times the ANA frame length controller decided to decrease the + // frame length since the start of the call. If this value is not set, it + // indicates that the frame length controller is disabled. + absl::optional frame_length_decrease_counter; + // The uplink packet loss fractions as set by the ANA FEC controller. If this + // value is not set, it indicates that the ANA FEC controller is not active. + absl::optional uplink_packet_loss_fraction; +}; + +// This is the interface class for encoders in AudioCoding module. Each codec +// type must have an implementation of this class. +class AudioEncoder { + public: + // Used for UMA logging of codec usage. The same codecs, with the + // same values, must be listed in + // src/tools/metrics/histograms/histograms.xml in chromium to log + // correct values. + enum class CodecType { + kOther = 0, // Codec not specified, and/or not listed in this enum + kOpus = 1, + kIsac = 2, + kPcmA = 3, + kPcmU = 4, + kG722 = 5, + kIlbc = 6, + + // Number of histogram bins in the UMA logging of codec types. The + // total number of different codecs that are logged cannot exceed this + // number. + kMaxLoggedAudioCodecTypes + }; + + struct EncodedInfoLeaf { + size_t encoded_bytes = 0; + uint32_t encoded_timestamp = 0; + int payload_type = 0; + bool send_even_if_empty = false; + bool speech = true; + CodecType encoder_type = CodecType::kOther; + }; + + // This is the main struct for auxiliary encoding information. Each encoded + // packet should be accompanied by one EncodedInfo struct, containing the + // total number of |encoded_bytes|, the |encoded_timestamp| and the + // |payload_type|. If the packet contains redundant encodings, the |redundant| + // vector will be populated with EncodedInfoLeaf structs. Each struct in the + // vector represents one encoding; the order of structs in the vector is the + // same as the order in which the actual payloads are written to the byte + // stream. When EncoderInfoLeaf structs are present in the vector, the main + // struct's |encoded_bytes| will be the sum of all the |encoded_bytes| in the + // vector. + struct EncodedInfo : public EncodedInfoLeaf { + EncodedInfo(); + EncodedInfo(const EncodedInfo&); + EncodedInfo(EncodedInfo&&); + ~EncodedInfo(); + EncodedInfo& operator=(const EncodedInfo&); + EncodedInfo& operator=(EncodedInfo&&); + + std::vector redundant; + }; + + virtual ~AudioEncoder() = default; + + // Returns the input sample rate in Hz and the number of input channels. + // These are constants set at instantiation time. + virtual int SampleRateHz() const = 0; + virtual size_t NumChannels() const = 0; + + // Returns the rate at which the RTP timestamps are updated. The default + // implementation returns SampleRateHz(). + virtual int RtpTimestampRateHz() const; + + // Returns the number of 10 ms frames the encoder will put in the next + // packet. This value may only change when Encode() outputs a packet; i.e., + // the encoder may vary the number of 10 ms frames from packet to packet, but + // it must decide the length of the next packet no later than when outputting + // the preceding packet. + virtual size_t Num10MsFramesInNextPacket() const = 0; + + // Returns the maximum value that can be returned by + // Num10MsFramesInNextPacket(). + virtual size_t Max10MsFramesInAPacket() const = 0; + + // Returns the current target bitrate in bits/s. The value -1 means that the + // codec adapts the target automatically, and a current target cannot be + // provided. + virtual int GetTargetBitrate() const = 0; + + // Accepts one 10 ms block of input audio (i.e., SampleRateHz() / 100 * + // NumChannels() samples). Multi-channel audio must be sample-interleaved. + // The encoder appends zero or more bytes of output to |encoded| and returns + // additional encoding information. Encode() checks some preconditions, calls + // EncodeImpl() which does the actual work, and then checks some + // postconditions. + EncodedInfo Encode(uint32_t rtp_timestamp, + rtc::ArrayView audio, + rtc::Buffer* encoded); + + // Resets the encoder to its starting state, discarding any input that has + // been fed to the encoder but not yet emitted in a packet. + virtual void Reset() = 0; + + // Enables or disables codec-internal FEC (forward error correction). Returns + // true if the codec was able to comply. The default implementation returns + // true when asked to disable FEC and false when asked to enable it (meaning + // that FEC isn't supported). + virtual bool SetFec(bool enable); + + // Enables or disables codec-internal VAD/DTX. Returns true if the codec was + // able to comply. The default implementation returns true when asked to + // disable DTX and false when asked to enable it (meaning that DTX isn't + // supported). + virtual bool SetDtx(bool enable); + + // Returns the status of codec-internal DTX. The default implementation always + // returns false. + virtual bool GetDtx() const; + + // Sets the application mode. Returns true if the codec was able to comply. + // The default implementation just returns false. + enum class Application { kSpeech, kAudio }; + virtual bool SetApplication(Application application); + + // Tells the encoder about the highest sample rate the decoder is expected to + // use when decoding the bitstream. The encoder would typically use this + // information to adjust the quality of the encoding. The default + // implementation does nothing. + virtual void SetMaxPlaybackRate(int frequency_hz); + + // This is to be deprecated. Please use |OnReceivedTargetAudioBitrate| + // instead. + // Tells the encoder what average bitrate we'd like it to produce. The + // encoder is free to adjust or disregard the given bitrate (the default + // implementation does the latter). + RTC_DEPRECATED virtual void SetTargetBitrate(int target_bps); + + // Causes this encoder to let go of any other encoders it contains, and + // returns a pointer to an array where they are stored (which is required to + // live as long as this encoder). Unless the returned array is empty, you may + // not call any methods on this encoder afterwards, except for the + // destructor. The default implementation just returns an empty array. + // NOTE: This method is subject to change. Do not call or override it. + virtual rtc::ArrayView> + ReclaimContainedEncoders(); + + // Enables audio network adaptor. Returns true if successful. + virtual bool EnableAudioNetworkAdaptor(const std::string& config_string, + RtcEventLog* event_log); + + // Disables audio network adaptor. + virtual void DisableAudioNetworkAdaptor(); + + // Provides uplink packet loss fraction to this encoder to allow it to adapt. + // |uplink_packet_loss_fraction| is in the range [0.0, 1.0]. + virtual void OnReceivedUplinkPacketLossFraction( + float uplink_packet_loss_fraction); + + // Provides 1st-order-FEC-recoverable uplink packet loss rate to this encoder + // to allow it to adapt. + // |uplink_recoverable_packet_loss_fraction| is in the range [0.0, 1.0]. + virtual void OnReceivedUplinkRecoverablePacketLossFraction( + float uplink_recoverable_packet_loss_fraction); + + // Provides target audio bitrate to this encoder to allow it to adapt. + virtual void OnReceivedTargetAudioBitrate(int target_bps); + + // Provides target audio bitrate and corresponding probing interval of + // the bandwidth estimator to this encoder to allow it to adapt. + virtual void OnReceivedUplinkBandwidth(int target_audio_bitrate_bps, + absl::optional bwe_period_ms); + + // Provides RTT to this encoder to allow it to adapt. + virtual void OnReceivedRtt(int rtt_ms); + + // Provides overhead to this encoder to adapt. The overhead is the number of + // bytes that will be added to each packet the encoder generates. + virtual void OnReceivedOverhead(size_t overhead_bytes_per_packet); + + // To allow encoder to adapt its frame length, it must be provided the frame + // length range that receivers can accept. + virtual void SetReceiverFrameLengthRange(int min_frame_length_ms, + int max_frame_length_ms); + + // Get statistics related to audio network adaptation. + virtual ANAStats GetANAStats() const; + + protected: + // Subclasses implement this to perform the actual encoding. Called by + // Encode(). + virtual EncodedInfo EncodeImpl(uint32_t rtp_timestamp, + rtc::ArrayView audio, + rtc::Buffer* encoded) = 0; +}; +} // namespace webrtc +#endif // API_AUDIO_CODECS_AUDIO_ENCODER_H_ diff --git a/WebRtcNative/include/webrtc/api/audio_codecs/audio_encoder_factory.h b/WebRtcNative/include/webrtc/api/audio_codecs/audio_encoder_factory.h new file mode 100644 index 00000000..fb4e23ff --- /dev/null +++ b/WebRtcNative/include/webrtc/api/audio_codecs/audio_encoder_factory.h @@ -0,0 +1,58 @@ +/* + * Copyright (c) 2017 The WebRTC project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + +#ifndef API_AUDIO_CODECS_AUDIO_ENCODER_FACTORY_H_ +#define API_AUDIO_CODECS_AUDIO_ENCODER_FACTORY_H_ + +#include +#include + +#include "absl/types/optional.h" +#include "api/audio_codecs/audio_codec_pair_id.h" +#include "api/audio_codecs/audio_encoder.h" +#include "api/audio_codecs/audio_format.h" +#include "rtc_base/refcount.h" + +namespace webrtc { + +// A factory that creates AudioEncoders. +// NOTE: This class is still under development and may change without notice. +class AudioEncoderFactory : public rtc::RefCountInterface { + public: + // Returns a prioritized list of audio codecs, to use for signaling etc. + virtual std::vector GetSupportedEncoders() = 0; + + // Returns information about how this format would be encoded, provided it's + // supported. More format and format variations may be supported than those + // returned by GetSupportedEncoders(). + virtual absl::optional QueryAudioEncoder( + const SdpAudioFormat& format) = 0; + + // Creates an AudioEncoder for the specified format. The encoder will tags + // its payloads with the specified payload type. The `codec_pair_id` argument + // is used to link encoders and decoders that talk to the same remote entity; + // if a MakeAudioEncoder() and a MakeAudioDecoder() call receive non-null IDs + // that compare equal, the factory implementations may assume that the + // encoder and decoder form a pair. + // + // Note: Implementations need to be robust against combinations other than + // one encoder, one decoder getting the same ID; such encoders must still + // work. + // + // TODO(ossu): Try to avoid audio encoders having to know their payload type. + virtual std::unique_ptr MakeAudioEncoder( + int payload_type, + const SdpAudioFormat& format, + absl::optional codec_pair_id) = 0; +}; + +} // namespace webrtc + +#endif // API_AUDIO_CODECS_AUDIO_ENCODER_FACTORY_H_ diff --git a/WebRtcNative/include/webrtc/api/audio_codecs/audio_encoder_factory_template.h b/WebRtcNative/include/webrtc/api/audio_codecs/audio_encoder_factory_template.h new file mode 100644 index 00000000..376b39e4 --- /dev/null +++ b/WebRtcNative/include/webrtc/api/audio_codecs/audio_encoder_factory_template.h @@ -0,0 +1,154 @@ +/* + * Copyright (c) 2017 The WebRTC project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + +#ifndef API_AUDIO_CODECS_AUDIO_ENCODER_FACTORY_TEMPLATE_H_ +#define API_AUDIO_CODECS_AUDIO_ENCODER_FACTORY_TEMPLATE_H_ + +#include +#include + +#include "api/audio_codecs/audio_encoder_factory.h" +#include "rtc_base/refcountedobject.h" +#include "rtc_base/scoped_ref_ptr.h" + +namespace webrtc { + +namespace audio_encoder_factory_template_impl { + +template +struct Helper; + +// Base case: 0 template parameters. +template <> +struct Helper<> { + static void AppendSupportedEncoders(std::vector* specs) {} + static absl::optional QueryAudioEncoder( + const SdpAudioFormat& format) { + return absl::nullopt; + } + static std::unique_ptr MakeAudioEncoder( + int payload_type, + const SdpAudioFormat& format, + absl::optional codec_pair_id) { + return nullptr; + } +}; + +// Inductive case: Called with n + 1 template parameters; calls subroutines +// with n template parameters. +template +struct Helper { + static void AppendSupportedEncoders(std::vector* specs) { + T::AppendSupportedEncoders(specs); + Helper::AppendSupportedEncoders(specs); + } + static absl::optional QueryAudioEncoder( + const SdpAudioFormat& format) { + auto opt_config = T::SdpToConfig(format); + static_assert(std::is_same>::value, + "T::SdpToConfig() must return a value of type " + "absl::optional"); + return opt_config ? absl::optional( + T::QueryAudioEncoder(*opt_config)) + : Helper::QueryAudioEncoder(format); + } + static std::unique_ptr MakeAudioEncoder( + int payload_type, + const SdpAudioFormat& format, + absl::optional codec_pair_id) { + auto opt_config = T::SdpToConfig(format); + if (opt_config) { + return T::MakeAudioEncoder(*opt_config, payload_type, codec_pair_id); + } else { + return Helper::MakeAudioEncoder(payload_type, format, + codec_pair_id); + } + } +}; + +template +class AudioEncoderFactoryT : public AudioEncoderFactory { + public: + std::vector GetSupportedEncoders() override { + std::vector specs; + Helper::AppendSupportedEncoders(&specs); + return specs; + } + + absl::optional QueryAudioEncoder( + const SdpAudioFormat& format) override { + return Helper::QueryAudioEncoder(format); + } + + std::unique_ptr MakeAudioEncoder( + int payload_type, + const SdpAudioFormat& format, + absl::optional codec_pair_id) override { + return Helper::MakeAudioEncoder(payload_type, format, codec_pair_id); + } +}; + +} // namespace audio_encoder_factory_template_impl + +// Make an AudioEncoderFactory that can create instances of the given encoders. +// +// Each encoder type is given as a template argument to the function; it should +// be a struct with the following static member functions: +// +// // Converts |audio_format| to a ConfigType instance. Returns an empty +// // optional if |audio_format| doesn't correctly specify an encoder of our +// // type. +// absl::optional SdpToConfig(const SdpAudioFormat& audio_format); +// +// // Appends zero or more AudioCodecSpecs to the list that will be returned +// // by AudioEncoderFactory::GetSupportedEncoders(). +// void AppendSupportedEncoders(std::vector* specs); +// +// // Returns information about how this format would be encoded. Used to +// // implement AudioEncoderFactory::QueryAudioEncoder(). +// AudioCodecInfo QueryAudioEncoder(const ConfigType& config); +// +// // Creates an AudioEncoder for the specified format. Used to implement +// // AudioEncoderFactory::MakeAudioEncoder(). +// std::unique_ptr MakeAudioEncoder( +// const ConfigType& config, +// int payload_type, +// absl::optional codec_pair_id); +// +// ConfigType should be a type that encapsulates all the settings needed to +// create an AudioEncoder. T::Config (where T is the encoder struct) should +// either be the config type, or an alias for it. +// +// Whenever it tries to do something, the new factory will try each of the +// encoders in the order they were specified in the template argument list, +// stopping at the first one that claims to be able to do the job. +// +// NOTE: This function is still under development and may change without notice. +// +// TODO(kwiberg): Point at CreateBuiltinAudioEncoderFactory() for an example of +// how it is used. +template +rtc::scoped_refptr CreateAudioEncoderFactory() { + // There's no technical reason we couldn't allow zero template parameters, + // but such a factory couldn't create any encoders, and callers can do this + // by mistake by simply forgetting the <> altogether. So we forbid it in + // order to prevent caller foot-shooting. + static_assert(sizeof...(Ts) >= 1, + "Caller must give at least one template parameter"); + + return rtc::scoped_refptr( + new rtc::RefCountedObject< + audio_encoder_factory_template_impl::AudioEncoderFactoryT>()); +} + +} // namespace webrtc + +#endif // API_AUDIO_CODECS_AUDIO_ENCODER_FACTORY_TEMPLATE_H_ diff --git a/WebRtcNative/include/webrtc/api/audio_codecs/audio_format.h b/WebRtcNative/include/webrtc/api/audio_codecs/audio_format.h new file mode 100644 index 00000000..d132067d --- /dev/null +++ b/WebRtcNative/include/webrtc/api/audio_codecs/audio_format.h @@ -0,0 +1,137 @@ +/* + * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + +#ifndef API_AUDIO_CODECS_AUDIO_FORMAT_H_ +#define API_AUDIO_CODECS_AUDIO_FORMAT_H_ + +#include +#include +#include + +#include "absl/types/optional.h" +#include "rtc_base/checks.h" + +namespace webrtc { + +// SDP specification for a single audio codec. +// NOTE: This class is still under development and may change without notice. +struct SdpAudioFormat { + using Parameters = std::map; + + SdpAudioFormat(const SdpAudioFormat&); + SdpAudioFormat(SdpAudioFormat&&); + SdpAudioFormat(const char* name, int clockrate_hz, size_t num_channels); + SdpAudioFormat(const std::string& name, + int clockrate_hz, + size_t num_channels); + SdpAudioFormat(const char* name, + int clockrate_hz, + size_t num_channels, + const Parameters& param); + SdpAudioFormat(const std::string& name, + int clockrate_hz, + size_t num_channels, + const Parameters& param); + ~SdpAudioFormat(); + + // Returns true if this format is compatible with |o|. In SDP terminology: + // would it represent the same codec between an offer and an answer? As + // opposed to operator==, this method disregards codec parameters. + bool Matches(const SdpAudioFormat& o) const; + + SdpAudioFormat& operator=(const SdpAudioFormat&); + SdpAudioFormat& operator=(SdpAudioFormat&&); + + friend bool operator==(const SdpAudioFormat& a, const SdpAudioFormat& b); + friend bool operator!=(const SdpAudioFormat& a, const SdpAudioFormat& b) { + return !(a == b); + } + + std::string name; + int clockrate_hz; + size_t num_channels; + Parameters parameters; +}; + +void swap(SdpAudioFormat& a, SdpAudioFormat& b); + +// Information about how an audio format is treated by the codec implementation. +// Contains basic information, such as sample rate and number of channels, which +// isn't uniformly presented by SDP. Also contains flags indicating support for +// integrating with other parts of WebRTC, like external VAD and comfort noise +// level calculation. +// +// To avoid API breakage, and make the code clearer, AudioCodecInfo should not +// be directly initializable with any flags indicating optional support. If it +// were, these initializers would break any time a new flag was added. It's also +// more difficult to understand: +// AudioCodecInfo info{16000, 1, 32000, true, false, false, true, true}; +// than +// AudioCodecInfo info(16000, 1, 32000); +// info.allow_comfort_noise = true; +// info.future_flag_b = true; +// info.future_flag_c = true; +struct AudioCodecInfo { + AudioCodecInfo(int sample_rate_hz, size_t num_channels, int bitrate_bps); + AudioCodecInfo(int sample_rate_hz, + size_t num_channels, + int default_bitrate_bps, + int min_bitrate_bps, + int max_bitrate_bps); + AudioCodecInfo(const AudioCodecInfo& b) = default; + ~AudioCodecInfo() = default; + + bool operator==(const AudioCodecInfo& b) const { + return sample_rate_hz == b.sample_rate_hz && + num_channels == b.num_channels && + default_bitrate_bps == b.default_bitrate_bps && + min_bitrate_bps == b.min_bitrate_bps && + max_bitrate_bps == b.max_bitrate_bps && + allow_comfort_noise == b.allow_comfort_noise && + supports_network_adaption == b.supports_network_adaption; + } + + bool operator!=(const AudioCodecInfo& b) const { return !(*this == b); } + + bool HasFixedBitrate() const { + RTC_DCHECK_GE(min_bitrate_bps, 0); + RTC_DCHECK_LE(min_bitrate_bps, default_bitrate_bps); + RTC_DCHECK_GE(max_bitrate_bps, default_bitrate_bps); + return min_bitrate_bps == max_bitrate_bps; + } + + int sample_rate_hz; + size_t num_channels; + int default_bitrate_bps; + int min_bitrate_bps; + int max_bitrate_bps; + + bool allow_comfort_noise = true; // This codec can be used with an external + // comfort noise generator. + bool supports_network_adaption = false; // This codec can adapt to varying + // network conditions. +}; + +// AudioCodecSpec ties an audio format to specific information about the codec +// and its implementation. +struct AudioCodecSpec { + bool operator==(const AudioCodecSpec& b) const { + return format == b.format && info == b.info; + } + + bool operator!=(const AudioCodecSpec& b) const { return !(*this == b); } + + SdpAudioFormat format; + AudioCodecInfo info; +}; + +} // namespace webrtc + +#endif // API_AUDIO_CODECS_AUDIO_FORMAT_H_ diff --git a/WebRtcNative/include/webrtc/api/audio_codecs/builtin_audio_decoder_factory.h b/WebRtcNative/include/webrtc/api/audio_codecs/builtin_audio_decoder_factory.h new file mode 100644 index 00000000..3127403e --- /dev/null +++ b/WebRtcNative/include/webrtc/api/audio_codecs/builtin_audio_decoder_factory.h @@ -0,0 +1,25 @@ +/* + * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + +#ifndef API_AUDIO_CODECS_BUILTIN_AUDIO_DECODER_FACTORY_H_ +#define API_AUDIO_CODECS_BUILTIN_AUDIO_DECODER_FACTORY_H_ + +#include "api/audio_codecs/audio_decoder_factory.h" +#include "rtc_base/scoped_ref_ptr.h" + +namespace webrtc { + +// Creates a new factory that can create the built-in types of audio decoders. +// NOTE: This function is still under development and may change without notice. +rtc::scoped_refptr CreateBuiltinAudioDecoderFactory(); + +} // namespace webrtc + +#endif // API_AUDIO_CODECS_BUILTIN_AUDIO_DECODER_FACTORY_H_ diff --git a/WebRtcNative/include/webrtc/api/audio_codecs/builtin_audio_encoder_factory.h b/WebRtcNative/include/webrtc/api/audio_codecs/builtin_audio_encoder_factory.h new file mode 100644 index 00000000..d37ff257 --- /dev/null +++ b/WebRtcNative/include/webrtc/api/audio_codecs/builtin_audio_encoder_factory.h @@ -0,0 +1,25 @@ +/* + * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + +#ifndef API_AUDIO_CODECS_BUILTIN_AUDIO_ENCODER_FACTORY_H_ +#define API_AUDIO_CODECS_BUILTIN_AUDIO_ENCODER_FACTORY_H_ + +#include "api/audio_codecs/audio_encoder_factory.h" +#include "rtc_base/scoped_ref_ptr.h" + +namespace webrtc { + +// Creates a new factory that can create the built-in types of audio encoders. +// NOTE: This function is still under development and may change without notice. +rtc::scoped_refptr CreateBuiltinAudioEncoderFactory(); + +} // namespace webrtc + +#endif // API_AUDIO_CODECS_BUILTIN_AUDIO_ENCODER_FACTORY_H_ diff --git a/WebRtcNative/include/webrtc/api/audio_codecs/g711/audio_decoder_g711.h b/WebRtcNative/include/webrtc/api/audio_codecs/g711/audio_decoder_g711.h new file mode 100644 index 00000000..8275a8c7 --- /dev/null +++ b/WebRtcNative/include/webrtc/api/audio_codecs/g711/audio_decoder_g711.h @@ -0,0 +1,46 @@ +/* + * Copyright (c) 2017 The WebRTC project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + +#ifndef API_AUDIO_CODECS_G711_AUDIO_DECODER_G711_H_ +#define API_AUDIO_CODECS_G711_AUDIO_DECODER_G711_H_ + +#include +#include + +#include "absl/types/optional.h" +#include "api/audio_codecs/audio_codec_pair_id.h" +#include "api/audio_codecs/audio_decoder.h" +#include "api/audio_codecs/audio_format.h" + +namespace webrtc { + +// G711 decoder API for use as a template parameter to +// CreateAudioDecoderFactory<...>(). +// +// NOTE: This struct is still under development and may change without notice. +struct AudioDecoderG711 { + struct Config { + enum class Type { kPcmU, kPcmA }; + bool IsOk() const { + return (type == Type::kPcmU || type == Type::kPcmA) && num_channels >= 1; + } + Type type; + int num_channels; + }; + static absl::optional SdpToConfig(const SdpAudioFormat& audio_format); + static void AppendSupportedDecoders(std::vector* specs); + static std::unique_ptr MakeAudioDecoder( + const Config& config, + absl::optional codec_pair_id = absl::nullopt); +}; + +} // namespace webrtc + +#endif // API_AUDIO_CODECS_G711_AUDIO_DECODER_G711_H_ diff --git a/WebRtcNative/include/webrtc/api/audio_codecs/g711/audio_encoder_g711.h b/WebRtcNative/include/webrtc/api/audio_codecs/g711/audio_encoder_g711.h new file mode 100644 index 00000000..6b6eb5fc --- /dev/null +++ b/WebRtcNative/include/webrtc/api/audio_codecs/g711/audio_encoder_g711.h @@ -0,0 +1,51 @@ +/* + * Copyright (c) 2017 The WebRTC project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + +#ifndef API_AUDIO_CODECS_G711_AUDIO_ENCODER_G711_H_ +#define API_AUDIO_CODECS_G711_AUDIO_ENCODER_G711_H_ + +#include +#include + +#include "absl/types/optional.h" +#include "api/audio_codecs/audio_codec_pair_id.h" +#include "api/audio_codecs/audio_encoder.h" +#include "api/audio_codecs/audio_format.h" + +namespace webrtc { + +// G711 encoder API for use as a template parameter to +// CreateAudioEncoderFactory<...>(). +// +// NOTE: This struct is still under development and may change without notice. +struct AudioEncoderG711 { + struct Config { + enum class Type { kPcmU, kPcmA }; + bool IsOk() const { + return (type == Type::kPcmU || type == Type::kPcmA) && + frame_size_ms > 0 && frame_size_ms % 10 == 0 && num_channels >= 1; + } + Type type = Type::kPcmU; + int num_channels = 1; + int frame_size_ms = 20; + }; + static absl::optional SdpToConfig( + const SdpAudioFormat& audio_format); + static void AppendSupportedEncoders(std::vector* specs); + static AudioCodecInfo QueryAudioEncoder(const Config& config); + static std::unique_ptr MakeAudioEncoder( + const Config& config, + int payload_type, + absl::optional codec_pair_id = absl::nullopt); +}; + +} // namespace webrtc + +#endif // API_AUDIO_CODECS_G711_AUDIO_ENCODER_G711_H_ diff --git a/WebRtcNative/include/webrtc/api/audio_codecs/g722/audio_decoder_g722.h b/WebRtcNative/include/webrtc/api/audio_codecs/g722/audio_decoder_g722.h new file mode 100644 index 00000000..b7bb0893 --- /dev/null +++ b/WebRtcNative/include/webrtc/api/audio_codecs/g722/audio_decoder_g722.h @@ -0,0 +1,42 @@ +/* + * Copyright (c) 2017 The WebRTC project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + +#ifndef API_AUDIO_CODECS_G722_AUDIO_DECODER_G722_H_ +#define API_AUDIO_CODECS_G722_AUDIO_DECODER_G722_H_ + +#include +#include + +#include "absl/types/optional.h" +#include "api/audio_codecs/audio_codec_pair_id.h" +#include "api/audio_codecs/audio_decoder.h" +#include "api/audio_codecs/audio_format.h" + +namespace webrtc { + +// G722 decoder API for use as a template parameter to +// CreateAudioDecoderFactory<...>(). +// +// NOTE: This struct is still under development and may change without notice. +struct AudioDecoderG722 { + struct Config { + bool IsOk() const { return num_channels == 1 || num_channels == 2; } + int num_channels; + }; + static absl::optional SdpToConfig(const SdpAudioFormat& audio_format); + static void AppendSupportedDecoders(std::vector* specs); + static std::unique_ptr MakeAudioDecoder( + Config config, + absl::optional codec_pair_id = absl::nullopt); +}; + +} // namespace webrtc + +#endif // API_AUDIO_CODECS_G722_AUDIO_DECODER_G722_H_ diff --git a/WebRtcNative/include/webrtc/api/audio_codecs/g722/audio_encoder_g722.h b/WebRtcNative/include/webrtc/api/audio_codecs/g722/audio_encoder_g722.h new file mode 100644 index 00000000..b97fe1b1 --- /dev/null +++ b/WebRtcNative/include/webrtc/api/audio_codecs/g722/audio_encoder_g722.h @@ -0,0 +1,43 @@ +/* + * Copyright (c) 2017 The WebRTC project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + +#ifndef API_AUDIO_CODECS_G722_AUDIO_ENCODER_G722_H_ +#define API_AUDIO_CODECS_G722_AUDIO_ENCODER_G722_H_ + +#include +#include + +#include "absl/types/optional.h" +#include "api/audio_codecs/audio_codec_pair_id.h" +#include "api/audio_codecs/audio_encoder.h" +#include "api/audio_codecs/audio_format.h" +#include "api/audio_codecs/g722/audio_encoder_g722_config.h" + +namespace webrtc { + +// G722 encoder API for use as a template parameter to +// CreateAudioEncoderFactory<...>(). +// +// NOTE: This struct is still under development and may change without notice. +struct AudioEncoderG722 { + using Config = AudioEncoderG722Config; + static absl::optional SdpToConfig( + const SdpAudioFormat& audio_format); + static void AppendSupportedEncoders(std::vector* specs); + static AudioCodecInfo QueryAudioEncoder(const AudioEncoderG722Config& config); + static std::unique_ptr MakeAudioEncoder( + const AudioEncoderG722Config& config, + int payload_type, + absl::optional codec_pair_id = absl::nullopt); +}; + +} // namespace webrtc + +#endif // API_AUDIO_CODECS_G722_AUDIO_ENCODER_G722_H_ diff --git a/WebRtcNative/include/webrtc/api/audio_codecs/g722/audio_encoder_g722_config.h b/WebRtcNative/include/webrtc/api/audio_codecs/g722/audio_encoder_g722_config.h new file mode 100644 index 00000000..773e430c --- /dev/null +++ b/WebRtcNative/include/webrtc/api/audio_codecs/g722/audio_encoder_g722_config.h @@ -0,0 +1,27 @@ +/* + * Copyright (c) 2017 The WebRTC project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + +#ifndef API_AUDIO_CODECS_G722_AUDIO_ENCODER_G722_CONFIG_H_ +#define API_AUDIO_CODECS_G722_AUDIO_ENCODER_G722_CONFIG_H_ + +namespace webrtc { + +// NOTE: This struct is still under development and may change without notice. +struct AudioEncoderG722Config { + bool IsOk() const { + return frame_size_ms > 0 && frame_size_ms % 10 == 0 && num_channels >= 1; + } + int frame_size_ms = 20; + int num_channels = 1; +}; + +} // namespace webrtc + +#endif // API_AUDIO_CODECS_G722_AUDIO_ENCODER_G722_CONFIG_H_ diff --git a/WebRtcNative/include/webrtc/api/audio_codecs/ilbc/audio_decoder_ilbc.h b/WebRtcNative/include/webrtc/api/audio_codecs/ilbc/audio_decoder_ilbc.h new file mode 100644 index 00000000..20f6ffd2 --- /dev/null +++ b/WebRtcNative/include/webrtc/api/audio_codecs/ilbc/audio_decoder_ilbc.h @@ -0,0 +1,39 @@ +/* + * Copyright (c) 2017 The WebRTC project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + +#ifndef API_AUDIO_CODECS_ILBC_AUDIO_DECODER_ILBC_H_ +#define API_AUDIO_CODECS_ILBC_AUDIO_DECODER_ILBC_H_ + +#include +#include + +#include "absl/types/optional.h" +#include "api/audio_codecs/audio_codec_pair_id.h" +#include "api/audio_codecs/audio_decoder.h" +#include "api/audio_codecs/audio_format.h" + +namespace webrtc { + +// ILBC decoder API for use as a template parameter to +// CreateAudioDecoderFactory<...>(). +// +// NOTE: This struct is still under development and may change without notice. +struct AudioDecoderIlbc { + struct Config {}; // Empty---no config values needed! + static absl::optional SdpToConfig(const SdpAudioFormat& audio_format); + static void AppendSupportedDecoders(std::vector* specs); + static std::unique_ptr MakeAudioDecoder( + Config config, + absl::optional codec_pair_id = absl::nullopt); +}; + +} // namespace webrtc + +#endif // API_AUDIO_CODECS_ILBC_AUDIO_DECODER_ILBC_H_ diff --git a/WebRtcNative/include/webrtc/api/audio_codecs/ilbc/audio_encoder_ilbc.h b/WebRtcNative/include/webrtc/api/audio_codecs/ilbc/audio_encoder_ilbc.h new file mode 100644 index 00000000..0a86b162 --- /dev/null +++ b/WebRtcNative/include/webrtc/api/audio_codecs/ilbc/audio_encoder_ilbc.h @@ -0,0 +1,43 @@ +/* + * Copyright (c) 2017 The WebRTC project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + +#ifndef API_AUDIO_CODECS_ILBC_AUDIO_ENCODER_ILBC_H_ +#define API_AUDIO_CODECS_ILBC_AUDIO_ENCODER_ILBC_H_ + +#include +#include + +#include "absl/types/optional.h" +#include "api/audio_codecs/audio_codec_pair_id.h" +#include "api/audio_codecs/audio_encoder.h" +#include "api/audio_codecs/audio_format.h" +#include "api/audio_codecs/ilbc/audio_encoder_ilbc_config.h" + +namespace webrtc { + +// ILBC encoder API for use as a template parameter to +// CreateAudioEncoderFactory<...>(). +// +// NOTE: This struct is still under development and may change without notice. +struct AudioEncoderIlbc { + using Config = AudioEncoderIlbcConfig; + static absl::optional SdpToConfig( + const SdpAudioFormat& audio_format); + static void AppendSupportedEncoders(std::vector* specs); + static AudioCodecInfo QueryAudioEncoder(const AudioEncoderIlbcConfig& config); + static std::unique_ptr MakeAudioEncoder( + const AudioEncoderIlbcConfig& config, + int payload_type, + absl::optional codec_pair_id = absl::nullopt); +}; + +} // namespace webrtc + +#endif // API_AUDIO_CODECS_ILBC_AUDIO_ENCODER_ILBC_H_ diff --git a/WebRtcNative/include/webrtc/api/audio_codecs/ilbc/audio_encoder_ilbc_config.h b/WebRtcNative/include/webrtc/api/audio_codecs/ilbc/audio_encoder_ilbc_config.h new file mode 100644 index 00000000..22909a95 --- /dev/null +++ b/WebRtcNative/include/webrtc/api/audio_codecs/ilbc/audio_encoder_ilbc_config.h @@ -0,0 +1,29 @@ +/* + * Copyright (c) 2017 The WebRTC project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + +#ifndef API_AUDIO_CODECS_ILBC_AUDIO_ENCODER_ILBC_CONFIG_H_ +#define API_AUDIO_CODECS_ILBC_AUDIO_ENCODER_ILBC_CONFIG_H_ + +namespace webrtc { + +// NOTE: This struct is still under development and may change without notice. +struct AudioEncoderIlbcConfig { + bool IsOk() const { + return (frame_size_ms == 20 || frame_size_ms == 30 || frame_size_ms == 40 || + frame_size_ms == 60); + } + int frame_size_ms = 30; // Valid values are 20, 30, 40, and 60 ms. + // Note that frame size 40 ms produces encodings with two 20 ms frames in + // them, and frame size 60 ms consists of two 30 ms frames. +}; + +} // namespace webrtc + +#endif // API_AUDIO_CODECS_ILBC_AUDIO_ENCODER_ILBC_CONFIG_H_ diff --git a/WebRtcNative/include/webrtc/api/audio_codecs/isac/audio_decoder_isac.h b/WebRtcNative/include/webrtc/api/audio_codecs/isac/audio_decoder_isac.h new file mode 100644 index 00000000..f4e93312 --- /dev/null +++ b/WebRtcNative/include/webrtc/api/audio_codecs/isac/audio_decoder_isac.h @@ -0,0 +1,32 @@ +/* + * Copyright (c) 2017 The WebRTC project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + +#ifndef API_AUDIO_CODECS_ISAC_AUDIO_DECODER_ISAC_H_ +#define API_AUDIO_CODECS_ISAC_AUDIO_DECODER_ISAC_H_ + +#if WEBRTC_USE_BUILTIN_ISAC_FIX && !WEBRTC_USE_BUILTIN_ISAC_FLOAT +#include "api/audio_codecs/isac/audio_decoder_isac_fix.h" // nogncheck +#elif WEBRTC_USE_BUILTIN_ISAC_FLOAT && !WEBRTC_USE_BUILTIN_ISAC_FIX +#include "api/audio_codecs/isac/audio_decoder_isac_float.h" // nogncheck +#else +#error "Must choose either fix or float" +#endif + +namespace webrtc { + +#if WEBRTC_USE_BUILTIN_ISAC_FIX +using AudioDecoderIsac = AudioDecoderIsacFix; +#elif WEBRTC_USE_BUILTIN_ISAC_FLOAT +using AudioDecoderIsac = AudioDecoderIsacFloat; +#endif + +} // namespace webrtc + +#endif // API_AUDIO_CODECS_ISAC_AUDIO_DECODER_ISAC_H_ diff --git a/WebRtcNative/include/webrtc/api/audio_codecs/isac/audio_decoder_isac_fix.h b/WebRtcNative/include/webrtc/api/audio_codecs/isac/audio_decoder_isac_fix.h new file mode 100644 index 00000000..a4ce6858 --- /dev/null +++ b/WebRtcNative/include/webrtc/api/audio_codecs/isac/audio_decoder_isac_fix.h @@ -0,0 +1,39 @@ +/* + * Copyright (c) 2017 The WebRTC project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + +#ifndef API_AUDIO_CODECS_ISAC_AUDIO_DECODER_ISAC_FIX_H_ +#define API_AUDIO_CODECS_ISAC_AUDIO_DECODER_ISAC_FIX_H_ + +#include +#include + +#include "absl/types/optional.h" +#include "api/audio_codecs/audio_codec_pair_id.h" +#include "api/audio_codecs/audio_decoder.h" +#include "api/audio_codecs/audio_format.h" + +namespace webrtc { + +// iSAC decoder API (fixed-point implementation) for use as a template +// parameter to CreateAudioDecoderFactory<...>(). +// +// NOTE: This struct is still under development and may change without notice. +struct AudioDecoderIsacFix { + struct Config {}; // Empty---no config values needed! + static absl::optional SdpToConfig(const SdpAudioFormat& audio_format); + static void AppendSupportedDecoders(std::vector* specs); + static std::unique_ptr MakeAudioDecoder( + Config config, + absl::optional codec_pair_id = absl::nullopt); +}; + +} // namespace webrtc + +#endif // API_AUDIO_CODECS_ISAC_AUDIO_DECODER_ISAC_FIX_H_ diff --git a/WebRtcNative/include/webrtc/api/audio_codecs/isac/audio_decoder_isac_float.h b/WebRtcNative/include/webrtc/api/audio_codecs/isac/audio_decoder_isac_float.h new file mode 100644 index 00000000..cc139634 --- /dev/null +++ b/WebRtcNative/include/webrtc/api/audio_codecs/isac/audio_decoder_isac_float.h @@ -0,0 +1,44 @@ +/* + * Copyright (c) 2017 The WebRTC project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + +#ifndef API_AUDIO_CODECS_ISAC_AUDIO_DECODER_ISAC_FLOAT_H_ +#define API_AUDIO_CODECS_ISAC_AUDIO_DECODER_ISAC_FLOAT_H_ + +#include +#include + +#include "absl/types/optional.h" +#include "api/audio_codecs/audio_codec_pair_id.h" +#include "api/audio_codecs/audio_decoder.h" +#include "api/audio_codecs/audio_format.h" + +namespace webrtc { + +// iSAC decoder API (floating-point implementation) for use as a template +// parameter to CreateAudioDecoderFactory<...>(). +// +// NOTE: This struct is still under development and may change without notice. +struct AudioDecoderIsacFloat { + struct Config { + bool IsOk() const { + return sample_rate_hz == 16000 || sample_rate_hz == 32000; + } + int sample_rate_hz = 16000; + }; + static absl::optional SdpToConfig(const SdpAudioFormat& audio_format); + static void AppendSupportedDecoders(std::vector* specs); + static std::unique_ptr MakeAudioDecoder( + Config config, + absl::optional codec_pair_id = absl::nullopt); +}; + +} // namespace webrtc + +#endif // API_AUDIO_CODECS_ISAC_AUDIO_DECODER_ISAC_FLOAT_H_ diff --git a/WebRtcNative/include/webrtc/api/audio_codecs/isac/audio_encoder_isac.h b/WebRtcNative/include/webrtc/api/audio_codecs/isac/audio_encoder_isac.h new file mode 100644 index 00000000..3cb0a1f0 --- /dev/null +++ b/WebRtcNative/include/webrtc/api/audio_codecs/isac/audio_encoder_isac.h @@ -0,0 +1,32 @@ +/* + * Copyright (c) 2017 The WebRTC project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + +#ifndef API_AUDIO_CODECS_ISAC_AUDIO_ENCODER_ISAC_H_ +#define API_AUDIO_CODECS_ISAC_AUDIO_ENCODER_ISAC_H_ + +#if WEBRTC_USE_BUILTIN_ISAC_FIX && !WEBRTC_USE_BUILTIN_ISAC_FLOAT +#include "api/audio_codecs/isac/audio_encoder_isac_fix.h" // nogncheck +#elif WEBRTC_USE_BUILTIN_ISAC_FLOAT && !WEBRTC_USE_BUILTIN_ISAC_FIX +#include "api/audio_codecs/isac/audio_encoder_isac_float.h" // nogncheck +#else +#error "Must choose either fix or float" +#endif + +namespace webrtc { + +#if WEBRTC_USE_BUILTIN_ISAC_FIX +using AudioEncoderIsac = AudioEncoderIsacFix; +#elif WEBRTC_USE_BUILTIN_ISAC_FLOAT +using AudioEncoderIsac = AudioEncoderIsacFloat; +#endif + +} // namespace webrtc + +#endif // API_AUDIO_CODECS_ISAC_AUDIO_ENCODER_ISAC_H_ diff --git a/WebRtcNative/include/webrtc/api/audio_codecs/isac/audio_encoder_isac_fix.h b/WebRtcNative/include/webrtc/api/audio_codecs/isac/audio_encoder_isac_fix.h new file mode 100644 index 00000000..731e48d0 --- /dev/null +++ b/WebRtcNative/include/webrtc/api/audio_codecs/isac/audio_encoder_isac_fix.h @@ -0,0 +1,44 @@ +/* + * Copyright (c) 2017 The WebRTC project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + +#ifndef API_AUDIO_CODECS_ISAC_AUDIO_ENCODER_ISAC_FIX_H_ +#define API_AUDIO_CODECS_ISAC_AUDIO_ENCODER_ISAC_FIX_H_ + +#include +#include + +#include "absl/types/optional.h" +#include "api/audio_codecs/audio_codec_pair_id.h" +#include "api/audio_codecs/audio_encoder.h" +#include "api/audio_codecs/audio_format.h" + +namespace webrtc { + +// iSAC encoder API (fixed-point implementation) for use as a template +// parameter to CreateAudioEncoderFactory<...>(). +// +// NOTE: This struct is still under development and may change without notice. +struct AudioEncoderIsacFix { + struct Config { + bool IsOk() const { return frame_size_ms == 30 || frame_size_ms == 60; } + int frame_size_ms = 30; + }; + static absl::optional SdpToConfig(const SdpAudioFormat& audio_format); + static void AppendSupportedEncoders(std::vector* specs); + static AudioCodecInfo QueryAudioEncoder(Config config); + static std::unique_ptr MakeAudioEncoder( + Config config, + int payload_type, + absl::optional codec_pair_id = absl::nullopt); +}; + +} // namespace webrtc + +#endif // API_AUDIO_CODECS_ISAC_AUDIO_ENCODER_ISAC_FIX_H_ diff --git a/WebRtcNative/include/webrtc/api/audio_codecs/isac/audio_encoder_isac_float.h b/WebRtcNative/include/webrtc/api/audio_codecs/isac/audio_encoder_isac_float.h new file mode 100644 index 00000000..6d98bf99 --- /dev/null +++ b/WebRtcNative/include/webrtc/api/audio_codecs/isac/audio_encoder_isac_float.h @@ -0,0 +1,49 @@ +/* + * Copyright (c) 2017 The WebRTC project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + +#ifndef API_AUDIO_CODECS_ISAC_AUDIO_ENCODER_ISAC_FLOAT_H_ +#define API_AUDIO_CODECS_ISAC_AUDIO_ENCODER_ISAC_FLOAT_H_ + +#include +#include + +#include "absl/types/optional.h" +#include "api/audio_codecs/audio_codec_pair_id.h" +#include "api/audio_codecs/audio_encoder.h" +#include "api/audio_codecs/audio_format.h" + +namespace webrtc { + +// iSAC encoder API (floating-point implementation) for use as a template +// parameter to CreateAudioEncoderFactory<...>(). +// +// NOTE: This struct is still under development and may change without notice. +struct AudioEncoderIsacFloat { + struct Config { + bool IsOk() const { + return (sample_rate_hz == 16000 && + (frame_size_ms == 30 || frame_size_ms == 60)) || + (sample_rate_hz == 32000 && frame_size_ms == 30); + } + int sample_rate_hz = 16000; + int frame_size_ms = 30; + }; + static absl::optional SdpToConfig(const SdpAudioFormat& audio_format); + static void AppendSupportedEncoders(std::vector* specs); + static AudioCodecInfo QueryAudioEncoder(const Config& config); + static std::unique_ptr MakeAudioEncoder( + const Config& config, + int payload_type, + absl::optional codec_pair_id = absl::nullopt); +}; + +} // namespace webrtc + +#endif // API_AUDIO_CODECS_ISAC_AUDIO_ENCODER_ISAC_FLOAT_H_ diff --git a/WebRtcNative/include/webrtc/api/audio_codecs/opus/audio_decoder_opus.h b/WebRtcNative/include/webrtc/api/audio_codecs/opus/audio_decoder_opus.h new file mode 100644 index 00000000..de26026b --- /dev/null +++ b/WebRtcNative/include/webrtc/api/audio_codecs/opus/audio_decoder_opus.h @@ -0,0 +1,41 @@ +/* + * Copyright (c) 2017 The WebRTC project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + +#ifndef API_AUDIO_CODECS_OPUS_AUDIO_DECODER_OPUS_H_ +#define API_AUDIO_CODECS_OPUS_AUDIO_DECODER_OPUS_H_ + +#include +#include + +#include "absl/types/optional.h" +#include "api/audio_codecs/audio_codec_pair_id.h" +#include "api/audio_codecs/audio_decoder.h" +#include "api/audio_codecs/audio_format.h" + +namespace webrtc { + +// Opus decoder API for use as a template parameter to +// CreateAudioDecoderFactory<...>(). +// +// NOTE: This struct is still under development and may change without notice. +struct AudioDecoderOpus { + struct Config { + int num_channels; + }; + static absl::optional SdpToConfig(const SdpAudioFormat& audio_format); + static void AppendSupportedDecoders(std::vector* specs); + static std::unique_ptr MakeAudioDecoder( + Config config, + absl::optional codec_pair_id = absl::nullopt); +}; + +} // namespace webrtc + +#endif // API_AUDIO_CODECS_OPUS_AUDIO_DECODER_OPUS_H_ diff --git a/WebRtcNative/include/webrtc/api/audio_codecs/opus/audio_encoder_opus.h b/WebRtcNative/include/webrtc/api/audio_codecs/opus/audio_encoder_opus.h new file mode 100644 index 00000000..20aaaf72 --- /dev/null +++ b/WebRtcNative/include/webrtc/api/audio_codecs/opus/audio_encoder_opus.h @@ -0,0 +1,43 @@ +/* + * Copyright (c) 2017 The WebRTC project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + +#ifndef API_AUDIO_CODECS_OPUS_AUDIO_ENCODER_OPUS_H_ +#define API_AUDIO_CODECS_OPUS_AUDIO_ENCODER_OPUS_H_ + +#include +#include + +#include "absl/types/optional.h" +#include "api/audio_codecs/audio_codec_pair_id.h" +#include "api/audio_codecs/audio_encoder.h" +#include "api/audio_codecs/audio_format.h" +#include "api/audio_codecs/opus/audio_encoder_opus_config.h" + +namespace webrtc { + +// Opus encoder API for use as a template parameter to +// CreateAudioEncoderFactory<...>(). +// +// NOTE: This struct is still under development and may change without notice. +struct AudioEncoderOpus { + using Config = AudioEncoderOpusConfig; + static absl::optional SdpToConfig( + const SdpAudioFormat& audio_format); + static void AppendSupportedEncoders(std::vector* specs); + static AudioCodecInfo QueryAudioEncoder(const AudioEncoderOpusConfig& config); + static std::unique_ptr MakeAudioEncoder( + const AudioEncoderOpusConfig& config, + int payload_type, + absl::optional codec_pair_id = absl::nullopt); +}; + +} // namespace webrtc + +#endif // API_AUDIO_CODECS_OPUS_AUDIO_ENCODER_OPUS_H_ diff --git a/WebRtcNative/include/webrtc/api/audio_codecs/opus/audio_encoder_opus_config.h b/WebRtcNative/include/webrtc/api/audio_codecs/opus/audio_encoder_opus_config.h new file mode 100644 index 00000000..c7067bb1 --- /dev/null +++ b/WebRtcNative/include/webrtc/api/audio_codecs/opus/audio_encoder_opus_config.h @@ -0,0 +1,73 @@ +/* + * Copyright (c) 2017 The WebRTC project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + +#ifndef API_AUDIO_CODECS_OPUS_AUDIO_ENCODER_OPUS_CONFIG_H_ +#define API_AUDIO_CODECS_OPUS_AUDIO_ENCODER_OPUS_CONFIG_H_ + +#include + +#include + +#include "absl/types/optional.h" + +namespace webrtc { + +// NOTE: This struct is still under development and may change without notice. +struct AudioEncoderOpusConfig { + static constexpr int kDefaultFrameSizeMs = 20; + + // Opus API allows a min bitrate of 500bps, but Opus documentation suggests + // bitrate should be in the range of 6000 to 510000, inclusive. + static constexpr int kMinBitrateBps = 6000; + static constexpr int kMaxBitrateBps = 510000; + + AudioEncoderOpusConfig(); + AudioEncoderOpusConfig(const AudioEncoderOpusConfig&); + ~AudioEncoderOpusConfig(); + AudioEncoderOpusConfig& operator=(const AudioEncoderOpusConfig&); + + bool IsOk() const; // Checks if the values are currently OK. + + int frame_size_ms; + size_t num_channels; + enum class ApplicationMode { kVoip, kAudio }; + ApplicationMode application; + + // NOTE: This member must always be set. + // TODO(kwiberg): Turn it into just an int. + absl::optional bitrate_bps; + + bool fec_enabled; + bool cbr_enabled; + int max_playback_rate_hz; + + // |complexity| is used when the bitrate goes above + // |complexity_threshold_bps| + |complexity_threshold_window_bps|; + // |low_rate_complexity| is used when the bitrate falls below + // |complexity_threshold_bps| - |complexity_threshold_window_bps|. In the + // interval in the middle, we keep using the most recent of the two + // complexity settings. + int complexity; + int low_rate_complexity; + int complexity_threshold_bps; + int complexity_threshold_window_bps; + + bool dtx_enabled; + std::vector supported_frame_lengths_ms; + int uplink_bandwidth_update_interval_ms; + + // NOTE: This member isn't necessary, and will soon go away. See + // https://bugs.chromium.org/p/webrtc/issues/detail?id=7847 + int payload_type; +}; + +} // namespace webrtc + +#endif // API_AUDIO_CODECS_OPUS_AUDIO_ENCODER_OPUS_CONFIG_H_ diff --git a/WebRtcNative/include/webrtc/api/audio_options.h b/WebRtcNative/include/webrtc/api/audio_options.h new file mode 100644 index 00000000..df66d360 --- /dev/null +++ b/WebRtcNative/include/webrtc/api/audio_options.h @@ -0,0 +1,196 @@ +/* + * Copyright (c) 2018 The WebRTC project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + +#ifndef API_AUDIO_OPTIONS_H_ +#define API_AUDIO_OPTIONS_H_ + +#include + +#include "absl/types/optional.h" +#include "rtc_base/stringencode.h" + +namespace cricket { + +// Options that can be applied to a VoiceMediaChannel or a VoiceMediaEngine. +// Used to be flags, but that makes it hard to selectively apply options. +// We are moving all of the setting of options to structs like this, +// but some things currently still use flags. +struct AudioOptions { + AudioOptions(); + ~AudioOptions(); + void SetAll(const AudioOptions& change) { + SetFrom(&echo_cancellation, change.echo_cancellation); +#if defined(WEBRTC_IOS) + SetFrom(&ios_force_software_aec_HACK, change.ios_force_software_aec_HACK); +#endif + SetFrom(&auto_gain_control, change.auto_gain_control); + SetFrom(&noise_suppression, change.noise_suppression); + SetFrom(&highpass_filter, change.highpass_filter); + SetFrom(&stereo_swapping, change.stereo_swapping); + SetFrom(&audio_jitter_buffer_max_packets, + change.audio_jitter_buffer_max_packets); + SetFrom(&audio_jitter_buffer_fast_accelerate, + change.audio_jitter_buffer_fast_accelerate); + SetFrom(&typing_detection, change.typing_detection); + SetFrom(&aecm_generate_comfort_noise, change.aecm_generate_comfort_noise); + SetFrom(&experimental_agc, change.experimental_agc); + SetFrom(&extended_filter_aec, change.extended_filter_aec); + SetFrom(&delay_agnostic_aec, change.delay_agnostic_aec); + SetFrom(&experimental_ns, change.experimental_ns); + SetFrom(&intelligibility_enhancer, change.intelligibility_enhancer); + SetFrom(&residual_echo_detector, change.residual_echo_detector); + SetFrom(&tx_agc_target_dbov, change.tx_agc_target_dbov); + SetFrom(&tx_agc_digital_compression_gain, + change.tx_agc_digital_compression_gain); + SetFrom(&tx_agc_limiter, change.tx_agc_limiter); + SetFrom(&combined_audio_video_bwe, change.combined_audio_video_bwe); + SetFrom(&audio_network_adaptor, change.audio_network_adaptor); + SetFrom(&audio_network_adaptor_config, change.audio_network_adaptor_config); + } + + bool operator==(const AudioOptions& o) const { + return echo_cancellation == o.echo_cancellation && +#if defined(WEBRTC_IOS) + ios_force_software_aec_HACK == o.ios_force_software_aec_HACK && +#endif + auto_gain_control == o.auto_gain_control && + noise_suppression == o.noise_suppression && + highpass_filter == o.highpass_filter && + stereo_swapping == o.stereo_swapping && + audio_jitter_buffer_max_packets == + o.audio_jitter_buffer_max_packets && + audio_jitter_buffer_fast_accelerate == + o.audio_jitter_buffer_fast_accelerate && + typing_detection == o.typing_detection && + aecm_generate_comfort_noise == o.aecm_generate_comfort_noise && + experimental_agc == o.experimental_agc && + extended_filter_aec == o.extended_filter_aec && + delay_agnostic_aec == o.delay_agnostic_aec && + experimental_ns == o.experimental_ns && + intelligibility_enhancer == o.intelligibility_enhancer && + residual_echo_detector == o.residual_echo_detector && + tx_agc_target_dbov == o.tx_agc_target_dbov && + tx_agc_digital_compression_gain == + o.tx_agc_digital_compression_gain && + tx_agc_limiter == o.tx_agc_limiter && + combined_audio_video_bwe == o.combined_audio_video_bwe && + audio_network_adaptor == o.audio_network_adaptor && + audio_network_adaptor_config == o.audio_network_adaptor_config; + } + bool operator!=(const AudioOptions& o) const { return !(*this == o); } + + std::string ToString() const { + std::ostringstream ost; + ost << "AudioOptions {"; + ost << ToStringIfSet("aec", echo_cancellation); +#if defined(WEBRTC_IOS) + ost << ToStringIfSet("ios_force_software_aec_HACK", + ios_force_software_aec_HACK); +#endif + ost << ToStringIfSet("agc", auto_gain_control); + ost << ToStringIfSet("ns", noise_suppression); + ost << ToStringIfSet("hf", highpass_filter); + ost << ToStringIfSet("swap", stereo_swapping); + ost << ToStringIfSet("audio_jitter_buffer_max_packets", + audio_jitter_buffer_max_packets); + ost << ToStringIfSet("audio_jitter_buffer_fast_accelerate", + audio_jitter_buffer_fast_accelerate); + ost << ToStringIfSet("typing", typing_detection); + ost << ToStringIfSet("comfort_noise", aecm_generate_comfort_noise); + ost << ToStringIfSet("experimental_agc", experimental_agc); + ost << ToStringIfSet("extended_filter_aec", extended_filter_aec); + ost << ToStringIfSet("delay_agnostic_aec", delay_agnostic_aec); + ost << ToStringIfSet("experimental_ns", experimental_ns); + ost << ToStringIfSet("intelligibility_enhancer", intelligibility_enhancer); + ost << ToStringIfSet("residual_echo_detector", residual_echo_detector); + ost << ToStringIfSet("tx_agc_target_dbov", tx_agc_target_dbov); + ost << ToStringIfSet("tx_agc_digital_compression_gain", + tx_agc_digital_compression_gain); + ost << ToStringIfSet("tx_agc_limiter", tx_agc_limiter); + ost << ToStringIfSet("combined_audio_video_bwe", combined_audio_video_bwe); + ost << ToStringIfSet("audio_network_adaptor", audio_network_adaptor); + // The adaptor config is a serialized proto buffer and therefore not human + // readable. So we comment out the following line. + // ost << ToStringIfSet("audio_network_adaptor_config", + // audio_network_adaptor_config); + ost << "}"; + return ost.str(); + } + + // Audio processing that attempts to filter away the output signal from + // later inbound pickup. + absl::optional echo_cancellation; +#if defined(WEBRTC_IOS) + // Forces software echo cancellation on iOS. This is a temporary workaround + // (until Apple fixes the bug) for a device with non-functioning AEC. May + // improve performance on that particular device, but will cause unpredictable + // behavior in all other cases. See http://bugs.webrtc.org/8682. + absl::optional ios_force_software_aec_HACK; +#endif + // Audio processing to adjust the sensitivity of the local mic dynamically. + absl::optional auto_gain_control; + // Audio processing to filter out background noise. + absl::optional noise_suppression; + // Audio processing to remove background noise of lower frequencies. + absl::optional highpass_filter; + // Audio processing to swap the left and right channels. + absl::optional stereo_swapping; + // Audio receiver jitter buffer (NetEq) max capacity in number of packets. + absl::optional audio_jitter_buffer_max_packets; + // Audio receiver jitter buffer (NetEq) fast accelerate mode. + absl::optional audio_jitter_buffer_fast_accelerate; + // Audio processing to detect typing. + absl::optional typing_detection; + absl::optional aecm_generate_comfort_noise; + absl::optional experimental_agc; + absl::optional extended_filter_aec; + absl::optional delay_agnostic_aec; + absl::optional experimental_ns; + absl::optional intelligibility_enhancer; + // Note that tx_agc_* only applies to non-experimental AGC. + absl::optional residual_echo_detector; + absl::optional tx_agc_target_dbov; + absl::optional tx_agc_digital_compression_gain; + absl::optional tx_agc_limiter; + // Enable combined audio+bandwidth BWE. + // TODO(pthatcher): This flag is set from the + // "googCombinedAudioVideoBwe", but not used anywhere. So delete it, + // and check if any other AudioOptions members are unused. + absl::optional combined_audio_video_bwe; + // Enable audio network adaptor. + absl::optional audio_network_adaptor; + // Config string for audio network adaptor. + absl::optional audio_network_adaptor_config; + + private: + template + static std::string ToStringIfSet(const char* key, + const absl::optional& val) { + std::string str; + if (val) { + str = key; + str += ": "; + str += val ? rtc::ToString(*val) : ""; + str += ", "; + } + return str; + } + + template + static void SetFrom(absl::optional* s, const absl::optional& o) { + if (o) { + *s = o; + } + } +}; + +} // namespace cricket + +#endif // API_AUDIO_OPTIONS_H_ diff --git a/WebRtcNative/include/webrtc/api/bitrate_constraints.h b/WebRtcNative/include/webrtc/api/bitrate_constraints.h new file mode 100644 index 00000000..98e89c08 --- /dev/null +++ b/WebRtcNative/include/webrtc/api/bitrate_constraints.h @@ -0,0 +1,41 @@ +/* + * Copyright (c) 2018 The WebRTC project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + +#ifndef API_BITRATE_CONSTRAINTS_H_ +#define API_BITRATE_CONSTRAINTS_H_ + +#include + +namespace webrtc { +// TODO(srte): BitrateConstraints and BitrateSettings should be merged. +// Both represent the same kind data, but are using different default +// initializer and representation of unset values. +struct BitrateConstraints { + int min_bitrate_bps = 0; + int start_bitrate_bps = kDefaultStartBitrateBps; + int max_bitrate_bps = -1; + + private: + static constexpr int kDefaultStartBitrateBps = 300000; +}; + +// Like std::min, but considers non-positive values to be unset. +template +static T MinPositive(T a, T b) { + if (a <= 0) { + return b; + } + if (b <= 0) { + return a; + } + return std::min(a, b); +} +} // namespace webrtc +#endif // API_BITRATE_CONSTRAINTS_H_ diff --git a/WebRtcNative/include/webrtc/api/call/audio_sink.h b/WebRtcNative/include/webrtc/api/call/audio_sink.h new file mode 100644 index 00000000..fa4c3f68 --- /dev/null +++ b/WebRtcNative/include/webrtc/api/call/audio_sink.h @@ -0,0 +1,53 @@ +/* + * Copyright (c) 2015 The WebRTC project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + +#ifndef API_CALL_AUDIO_SINK_H_ +#define API_CALL_AUDIO_SINK_H_ + +#if defined(WEBRTC_POSIX) && !defined(__STDC_FORMAT_MACROS) +// Avoid conflict with format_macros.h. +#define __STDC_FORMAT_MACROS +#endif + +#include +#include + +namespace webrtc { + +// Represents a simple push audio sink. +class AudioSinkInterface { + public: + virtual ~AudioSinkInterface() {} + + struct Data { + Data(const int16_t* data, + size_t samples_per_channel, + int sample_rate, + size_t channels, + uint32_t timestamp) + : data(data), + samples_per_channel(samples_per_channel), + sample_rate(sample_rate), + channels(channels), + timestamp(timestamp) {} + + const int16_t* data; // The actual 16bit audio data. + size_t samples_per_channel; // Number of frames in the buffer. + int sample_rate; // Sample rate in Hz. + size_t channels; // Number of channels in the audio data. + uint32_t timestamp; // The RTP timestamp of the first sample. + }; + + virtual void OnData(const Data& audio) = 0; +}; + +} // namespace webrtc + +#endif // API_CALL_AUDIO_SINK_H_ diff --git a/WebRtcNative/include/webrtc/api/call/callfactoryinterface.h b/WebRtcNative/include/webrtc/api/call/callfactoryinterface.h new file mode 100644 index 00000000..a7f32453 --- /dev/null +++ b/WebRtcNative/include/webrtc/api/call/callfactoryinterface.h @@ -0,0 +1,36 @@ +/* + * Copyright 2017 The WebRTC project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + +#ifndef API_CALL_CALLFACTORYINTERFACE_H_ +#define API_CALL_CALLFACTORYINTERFACE_H_ + +#include + +namespace webrtc { + +// These classes are not part of the API, and are treated as opaque pointers. +class Call; +struct CallConfig; + +// This interface exists to allow webrtc to be optionally built without media +// support (i.e., if only being used for data channels). PeerConnectionFactory +// is constructed with a CallFactoryInterface, which may or may not be null. +class CallFactoryInterface { + public: + virtual ~CallFactoryInterface() {} + + virtual Call* CreateCall(const CallConfig& config) = 0; +}; + +std::unique_ptr CreateCallFactory(); + +} // namespace webrtc + +#endif // API_CALL_CALLFACTORYINTERFACE_H_ diff --git a/WebRtcNative/include/webrtc/api/call/transport.h b/WebRtcNative/include/webrtc/api/call/transport.h new file mode 100644 index 00000000..18d22705 --- /dev/null +++ b/WebRtcNative/include/webrtc/api/call/transport.h @@ -0,0 +1,50 @@ +/* + * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + +#ifndef API_CALL_TRANSPORT_H_ +#define API_CALL_TRANSPORT_H_ + +#include +#include +#include + +namespace webrtc { + +// TODO(holmer): Look into unifying this with the PacketOptions in +// asyncpacketsocket.h. +struct PacketOptions { + PacketOptions(); + PacketOptions(const PacketOptions&); + ~PacketOptions(); + + // A 16 bits positive id. Negative ids are invalid and should be interpreted + // as packet_id not being set. + int packet_id = -1; + // Additional data bound to the RTP packet for use in application code, + // outside of WebRTC. + std::vector application_data; + // Whether this is a retransmission of an earlier packet. + bool is_retransmit = false; +}; + +class Transport { + public: + virtual bool SendRtp(const uint8_t* packet, + size_t length, + const PacketOptions& options) = 0; + virtual bool SendRtcp(const uint8_t* packet, size_t length) = 0; + + protected: + virtual ~Transport() {} +}; + +} // namespace webrtc + +#endif // API_CALL_TRANSPORT_H_ diff --git a/WebRtcNative/include/webrtc/api/candidate.h b/WebRtcNative/include/webrtc/api/candidate.h new file mode 100644 index 00000000..6e0547b5 --- /dev/null +++ b/WebRtcNative/include/webrtc/api/candidate.h @@ -0,0 +1,195 @@ +/* + * Copyright 2004 The WebRTC Project Authors. All rights reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + +#ifndef API_CANDIDATE_H_ +#define API_CANDIDATE_H_ + +#include +#include + +#include +#include + +#include "rtc_base/checks.h" +#include "rtc_base/helpers.h" +#include "rtc_base/network_constants.h" +#include "rtc_base/socketaddress.h" + +namespace cricket { + +// Candidate for ICE based connection discovery. +// TODO(phoglund): remove things in here that are not needed in the public API. + +class Candidate { + public: + Candidate(); + // TODO(pthatcher): Match the ordering and param list as per RFC 5245 + // candidate-attribute syntax. http://tools.ietf.org/html/rfc5245#section-15.1 + Candidate(int component, + const std::string& protocol, + const rtc::SocketAddress& address, + uint32_t priority, + const std::string& username, + const std::string& password, + const std::string& type, + uint32_t generation, + const std::string& foundation, + uint16_t network_id = 0, + uint16_t network_cost = 0); + Candidate(const Candidate&); + ~Candidate(); + + const std::string& id() const { return id_; } + void set_id(const std::string& id) { id_ = id; } + + int component() const { return component_; } + void set_component(int component) { component_ = component; } + + const std::string& protocol() const { return protocol_; } + void set_protocol(const std::string& protocol) { protocol_ = protocol; } + + // The protocol used to talk to relay. + const std::string& relay_protocol() const { return relay_protocol_; } + void set_relay_protocol(const std::string& protocol) { + relay_protocol_ = protocol; + } + + const rtc::SocketAddress& address() const { return address_; } + void set_address(const rtc::SocketAddress& address) { address_ = address; } + + uint32_t priority() const { return priority_; } + void set_priority(const uint32_t priority) { priority_ = priority; } + + // TODO(pthatcher): Remove once Chromium's jingle/glue/utils.cc + // doesn't use it. + // Maps old preference (which was 0.0-1.0) to match priority (which + // is 0-2^32-1) to to match RFC 5245, section 4.1.2.1. Also see + // https://docs.google.com/a/google.com/document/d/ + // 1iNQDiwDKMh0NQOrCqbj3DKKRT0Dn5_5UJYhmZO-t7Uc/edit + float preference() const { + // The preference value is clamped to two decimal precision. + return static_cast(((priority_ >> 24) * 100 / 127) / 100.0); + } + + // TODO(pthatcher): Remove once Chromium's jingle/glue/utils.cc + // doesn't use it. + void set_preference(float preference) { + // Limiting priority to UINT_MAX when value exceeds uint32_t max. + // This can happen for e.g. when preference = 3. + uint64_t prio_val = static_cast(preference * 127) << 24; + priority_ = static_cast( + std::min(prio_val, static_cast(UINT_MAX))); + } + + // TODO(honghaiz): Change to usernameFragment or ufrag. + const std::string& username() const { return username_; } + void set_username(const std::string& username) { username_ = username; } + + const std::string& password() const { return password_; } + void set_password(const std::string& password) { password_ = password; } + + const std::string& type() const { return type_; } + void set_type(const std::string& type) { type_ = type; } + + const std::string& network_name() const { return network_name_; } + void set_network_name(const std::string& network_name) { + network_name_ = network_name; + } + + rtc::AdapterType network_type() const { return network_type_; } + void set_network_type(rtc::AdapterType network_type) { + network_type_ = network_type; + } + + // Candidates in a new generation replace those in the old generation. + uint32_t generation() const { return generation_; } + void set_generation(uint32_t generation) { generation_ = generation; } + + // |network_cost| measures the cost/penalty of using this candidate. A network + // cost of 0 indicates this candidate can be used freely. A value of + // rtc::kNetworkCostMax indicates it should be used only as the last resort. + void set_network_cost(uint16_t network_cost) { + RTC_DCHECK_LE(network_cost, rtc::kNetworkCostMax); + network_cost_ = network_cost; + } + uint16_t network_cost() const { return network_cost_; } + + // An ID assigned to the network hosting the candidate. + uint16_t network_id() const { return network_id_; } + void set_network_id(uint16_t network_id) { network_id_ = network_id; } + + const std::string& foundation() const { return foundation_; } + void set_foundation(const std::string& foundation) { + foundation_ = foundation; + } + + const rtc::SocketAddress& related_address() const { return related_address_; } + void set_related_address(const rtc::SocketAddress& related_address) { + related_address_ = related_address; + } + const std::string& tcptype() const { return tcptype_; } + void set_tcptype(const std::string& tcptype) { tcptype_ = tcptype; } + + // The name of the transport channel of this candidate. + // TODO(phoglund): remove. + const std::string& transport_name() const { return transport_name_; } + void set_transport_name(const std::string& transport_name) { + transport_name_ = transport_name; + } + + // The URL of the ICE server which this candidate is gathered from. + const std::string& url() const { return url_; } + void set_url(const std::string& url) { url_ = url; } + + // Determines whether this candidate is equivalent to the given one. + bool IsEquivalent(const Candidate& c) const; + + // Determines whether this candidate can be considered equivalent to the + // given one when looking for a matching candidate to remove. + bool MatchesForRemoval(const Candidate& c) const; + + std::string ToString() const { return ToStringInternal(false); } + + std::string ToSensitiveString() const { return ToStringInternal(true); } + + uint32_t GetPriority(uint32_t type_preference, + int network_adapter_preference, + int relay_preference) const; + + bool operator==(const Candidate& o) const; + bool operator!=(const Candidate& o) const; + + private: + std::string ToStringInternal(bool sensitive) const; + + std::string id_; + int component_; + std::string protocol_; + std::string relay_protocol_; + rtc::SocketAddress address_; + uint32_t priority_; + std::string username_; + std::string password_; + std::string type_; + std::string network_name_; + rtc::AdapterType network_type_; + uint32_t generation_; + std::string foundation_; + rtc::SocketAddress related_address_; + std::string tcptype_; + std::string transport_name_; + uint16_t network_id_; + uint16_t network_cost_; + std::string url_; +}; + +} // namespace cricket + +#endif // API_CANDIDATE_H_ diff --git a/WebRtcNative/include/webrtc/api/cryptoparams.h b/WebRtcNative/include/webrtc/api/cryptoparams.h new file mode 100644 index 00000000..23505283 --- /dev/null +++ b/WebRtcNative/include/webrtc/api/cryptoparams.h @@ -0,0 +1,39 @@ +/* + * Copyright (c) 2004 The WebRTC project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + +#ifndef API_CRYPTOPARAMS_H_ +#define API_CRYPTOPARAMS_H_ + +#include + +namespace cricket { + +// Parameters for SRTP negotiation, as described in RFC 4568. +struct CryptoParams { + CryptoParams() : tag(0) {} + CryptoParams(int t, + const std::string& cs, + const std::string& kp, + const std::string& sp) + : tag(t), cipher_suite(cs), key_params(kp), session_params(sp) {} + + bool Matches(const CryptoParams& params) const { + return (tag == params.tag && cipher_suite == params.cipher_suite); + } + + int tag; + std::string cipher_suite; + std::string key_params; + std::string session_params; +}; + +} // namespace cricket + +#endif // API_CRYPTOPARAMS_H_ diff --git a/WebRtcNative/include/webrtc/api/datachannelinterface.h b/WebRtcNative/include/webrtc/api/datachannelinterface.h new file mode 100644 index 00000000..a0d2b3b5 --- /dev/null +++ b/WebRtcNative/include/webrtc/api/datachannelinterface.h @@ -0,0 +1,178 @@ +/* + * Copyright 2012 The WebRTC project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + +// This file contains interfaces for DataChannels +// http://dev.w3.org/2011/webrtc/editor/webrtc.html#rtcdatachannel + +#ifndef API_DATACHANNELINTERFACE_H_ +#define API_DATACHANNELINTERFACE_H_ + +#include + +#include "rtc_base/checks.h" +#include "rtc_base/copyonwritebuffer.h" +#include "rtc_base/refcount.h" + +namespace webrtc { + +// C++ version of: https://www.w3.org/TR/webrtc/#idl-def-rtcdatachannelinit +// TODO(deadbeef): Use absl::optional for the "-1 if unset" things. +struct DataChannelInit { + // Deprecated. Reliability is assumed, and channel will be unreliable if + // maxRetransmitTime or MaxRetransmits is set. + bool reliable = false; + + // True if ordered delivery is required. + bool ordered = true; + + // The max period of time in milliseconds in which retransmissions will be + // sent. After this time, no more retransmissions will be sent. -1 if unset. + // + // Cannot be set along with |maxRetransmits|. + int maxRetransmitTime = -1; + + // The max number of retransmissions. -1 if unset. + // + // Cannot be set along with |maxRetransmitTime|. + int maxRetransmits = -1; + + // This is set by the application and opaque to the WebRTC implementation. + std::string protocol; + + // True if the channel has been externally negotiated and we do not send an + // in-band signalling in the form of an "open" message. If this is true, |id| + // below must be set; otherwise it should be unset and will be negotiated + // in-band. + bool negotiated = false; + + // The stream id, or SID, for SCTP data channels. -1 if unset (see above). + int id = -1; +}; + +// At the JavaScript level, data can be passed in as a string or a blob, so +// this structure's |binary| flag tells whether the data should be interpreted +// as binary or text. +struct DataBuffer { + DataBuffer(const rtc::CopyOnWriteBuffer& data, bool binary) + : data(data), binary(binary) {} + // For convenience for unit tests. + explicit DataBuffer(const std::string& text) + : data(text.data(), text.length()), binary(false) {} + size_t size() const { return data.size(); } + + rtc::CopyOnWriteBuffer data; + // Indicates if the received data contains UTF-8 or binary data. + // Note that the upper layers are left to verify the UTF-8 encoding. + // TODO(jiayl): prefer to use an enum instead of a bool. + bool binary; +}; + +// Used to implement RTCDataChannel events. +// +// The code responding to these callbacks should unwind the stack before +// using any other webrtc APIs; re-entrancy is not supported. +class DataChannelObserver { + public: + // The data channel state have changed. + virtual void OnStateChange() = 0; + // A data buffer was successfully received. + virtual void OnMessage(const DataBuffer& buffer) = 0; + // The data channel's buffered_amount has changed. + virtual void OnBufferedAmountChange(uint64_t previous_amount) {} + + protected: + virtual ~DataChannelObserver() = default; +}; + +class DataChannelInterface : public rtc::RefCountInterface { + public: + // C++ version of: https://www.w3.org/TR/webrtc/#idl-def-rtcdatachannelstate + // Unlikely to change, but keep in sync with DataChannel.java:State and + // RTCDataChannel.h:RTCDataChannelState. + enum DataState { + kConnecting, + kOpen, // The DataChannel is ready to send data. + kClosing, + kClosed + }; + + static const char* DataStateString(DataState state) { + switch (state) { + case kConnecting: + return "connecting"; + case kOpen: + return "open"; + case kClosing: + return "closing"; + case kClosed: + return "closed"; + } + RTC_CHECK(false) << "Unknown DataChannel state: " << state; + return ""; + } + + // Used to receive events from the data channel. Only one observer can be + // registered at a time. UnregisterObserver should be called before the + // observer object is destroyed. + virtual void RegisterObserver(DataChannelObserver* observer) = 0; + virtual void UnregisterObserver() = 0; + + // The label attribute represents a label that can be used to distinguish this + // DataChannel object from other DataChannel objects. + virtual std::string label() const = 0; + + // The accessors below simply return the properties from the DataChannelInit + // the data channel was constructed with. + virtual bool reliable() const = 0; + // TODO(deadbeef): Remove these dummy implementations when all classes have + // implemented these APIs. They should all just return the values the + // DataChannel was created with. + virtual bool ordered() const; + virtual uint16_t maxRetransmitTime() const; + virtual uint16_t maxRetransmits() const; + virtual std::string protocol() const; + virtual bool negotiated() const; + + // Returns the ID from the DataChannelInit, if it was negotiated out-of-band. + // If negotiated in-band, this ID will be populated once the DTLS role is + // determined, and until then this will return -1. + virtual int id() const = 0; + virtual DataState state() const = 0; + virtual uint32_t messages_sent() const = 0; + virtual uint64_t bytes_sent() const = 0; + virtual uint32_t messages_received() const = 0; + virtual uint64_t bytes_received() const = 0; + + // Returns the number of bytes of application data (UTF-8 text and binary + // data) that have been queued using Send but have not yet been processed at + // the SCTP level. See comment above Send below. + virtual uint64_t buffered_amount() const = 0; + + // Begins the graceful data channel closing procedure. See: + // https://tools.ietf.org/html/draft-ietf-rtcweb-data-channel-13#section-6.7 + virtual void Close() = 0; + + // Sends |data| to the remote peer. If the data can't be sent at the SCTP + // level (due to congestion control), it's buffered at the data channel level, + // up to a maximum of 16MB. If Send is called while this buffer is full, the + // data channel will be closed abruptly. + // + // So, it's important to use buffered_amount() and OnBufferedAmountChange to + // ensure the data channel is used efficiently but without filling this + // buffer. + virtual bool Send(const DataBuffer& buffer) = 0; + + protected: + ~DataChannelInterface() override = default; +}; + +} // namespace webrtc + +#endif // API_DATACHANNELINTERFACE_H_ diff --git a/WebRtcNative/include/webrtc/api/dtmfsenderinterface.h b/WebRtcNative/include/webrtc/api/dtmfsenderinterface.h new file mode 100644 index 00000000..b79bb318 --- /dev/null +++ b/WebRtcNative/include/webrtc/api/dtmfsenderinterface.h @@ -0,0 +1,93 @@ +/* + * Copyright 2012 The WebRTC project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + +#ifndef API_DTMFSENDERINTERFACE_H_ +#define API_DTMFSENDERINTERFACE_H_ + +#include + +#include "api/mediastreaminterface.h" +#include "rtc_base/refcount.h" + +namespace webrtc { + +// DtmfSender callback interface, used to implement RTCDtmfSender events. +// Applications should implement this interface to get notifications from the +// DtmfSender. +class DtmfSenderObserverInterface { + public: + // Triggered when DTMF |tone| is sent. + // If |tone| is empty that means the DtmfSender has sent out all the given + // tones. + virtual void OnToneChange(const std::string& tone) = 0; + + protected: + virtual ~DtmfSenderObserverInterface() = default; +}; + +// The interface of native implementation of the RTCDTMFSender defined by the +// WebRTC W3C Editor's Draft. +// See: https://www.w3.org/TR/webrtc/#peer-to-peer-dtmf +class DtmfSenderInterface : public rtc::RefCountInterface { + public: + // Used to receive events from the DTMF sender. Only one observer can be + // registered at a time. UnregisterObserver should be called before the + // observer object is destroyed. + virtual void RegisterObserver(DtmfSenderObserverInterface* observer) = 0; + virtual void UnregisterObserver() = 0; + + // Returns true if this DtmfSender is capable of sending DTMF. Otherwise + // returns false. To be able to send DTMF, the associated RtpSender must be + // able to send packets, and a "telephone-event" codec must be negotiated. + virtual bool CanInsertDtmf() = 0; + + // Queues a task that sends the DTMF |tones|. The |tones| parameter is treated + // as a series of characters. The characters 0 through 9, A through D, #, and + // * generate the associated DTMF tones. The characters a to d are equivalent + // to A to D. The character ',' indicates a delay of 2 seconds before + // processing the next character in the tones parameter. + // + // Unrecognized characters are ignored. + // + // The |duration| parameter indicates the duration in ms to use for each + // character passed in the |tones| parameter. The duration cannot be more + // than 6000 or less than 70. + // + // The |inter_tone_gap| parameter indicates the gap between tones in ms. The + // |inter_tone_gap| must be at least 50 ms but should be as short as + // possible. + // + // If InsertDtmf is called on the same object while an existing task for this + // object to generate DTMF is still running, the previous task is canceled. + // Returns true on success and false on failure. + virtual bool InsertDtmf(const std::string& tones, + int duration, + int inter_tone_gap) = 0; + + // Returns the tones remaining to be played out. + virtual std::string tones() const = 0; + + // Returns the current tone duration value in ms. + // This value will be the value last set via the InsertDtmf() method, or the + // default value of 100 ms if InsertDtmf() was never called. + virtual int duration() const = 0; + + // Returns the current value of the between-tone gap in ms. + // This value will be the value last set via the InsertDtmf() method, or the + // default value of 50 ms if InsertDtmf() was never called. + virtual int inter_tone_gap() const = 0; + + protected: + ~DtmfSenderInterface() override = default; +}; + +} // namespace webrtc + +#endif // API_DTMFSENDERINTERFACE_H_ diff --git a/WebRtcNative/include/webrtc/api/fec_controller.h b/WebRtcNative/include/webrtc/api/fec_controller.h new file mode 100644 index 00000000..59e86cce --- /dev/null +++ b/WebRtcNative/include/webrtc/api/fec_controller.h @@ -0,0 +1,91 @@ +/* + * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + +#ifndef API_FEC_CONTROLLER_H_ +#define API_FEC_CONTROLLER_H_ + +#include +#include + +#include "common_types.h" // NOLINT(build/include) +#include "modules/include/module_fec_types.h" + +namespace webrtc { +// TODO(yinwa): work in progress. API in class FecController should not be +// used by other users until this comment is removed. + +// Callback class used for telling the user about how to configure the FEC, +// and the rates sent the last second is returned to the VCM. +class VCMProtectionCallback { + public: + virtual int ProtectionRequest(const FecProtectionParams* delta_params, + const FecProtectionParams* key_params, + uint32_t* sent_video_rate_bps, + uint32_t* sent_nack_rate_bps, + uint32_t* sent_fec_rate_bps) = 0; + + protected: + virtual ~VCMProtectionCallback() {} +}; + +// FecController calculates how much of the allocated network +// capacity that can be used by an encoder and how much that +// is needed for redundant packets such as FEC and NACK. It uses an +// implementation of |VCMProtectionCallback| to set new FEC parameters and get +// the bitrate currently used for FEC and NACK. +// Usage: +// Setup by calling SetProtectionMethod and SetEncodingData. +// For each encoded image, call UpdateWithEncodedData. +// Each time the bandwidth estimate change, call UpdateFecRates. UpdateFecRates +// will return the bitrate that can be used by an encoder. +// A lock is used to protect internal states, so methods can be called on an +// arbitrary thread. +class FecController { + public: + virtual ~FecController() {} + + virtual void SetProtectionCallback( + VCMProtectionCallback* protection_callback) = 0; + virtual void SetProtectionMethod(bool enable_fec, bool enable_nack) = 0; + + // Informs loss protectoin logic of initial encoding state. + virtual void SetEncodingData(size_t width, + size_t height, + size_t num_temporal_layers, + size_t max_payload_size) = 0; + + // Returns target rate for the encoder given the channel parameters. + // Inputs: estimated_bitrate_bps - the estimated network bitrate in bits/s. + // actual_framerate - encoder frame rate. + // fraction_lost - packet loss rate in % in the network. + // loss_mask_vector - packet loss mask since last time this method + // was called. round_trip_time_ms - round trip time in milliseconds. + virtual uint32_t UpdateFecRates(uint32_t estimated_bitrate_bps, + int actual_framerate, + uint8_t fraction_lost, + std::vector loss_mask_vector, + int64_t round_trip_time_ms) = 0; + + // Informs of encoded output. + virtual void UpdateWithEncodedData(size_t encoded_image_length, + FrameType encoded_image_frametype) = 0; + + // Returns whether this FEC Controller needs Loss Vector Mask as input. + virtual bool UseLossVectorMask() = 0; +}; + +class FecControllerFactoryInterface { + public: + virtual std::unique_ptr CreateFecController() = 0; + virtual ~FecControllerFactoryInterface() = default; +}; + +} // namespace webrtc +#endif // API_FEC_CONTROLLER_H_ diff --git a/WebRtcNative/include/webrtc/api/jsep.h b/WebRtcNative/include/webrtc/api/jsep.h new file mode 100644 index 00000000..4d4bcc0b --- /dev/null +++ b/WebRtcNative/include/webrtc/api/jsep.h @@ -0,0 +1,244 @@ +/* + * Copyright 2012 The WebRTC project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + +// This file contains declarations of interfaces that wrap SDP-related +// constructs; session descriptions and ICE candidates. The inner "cricket::" +// objects shouldn't be accessed directly; the intention is that an application +// using the PeerConnection API only creates these objects from strings, and +// them passes them into the PeerConnection. +// +// Though in the future, we're planning to provide an SDP parsing API, with a +// structure more friendly than cricket::SessionDescription. + +#ifndef API_JSEP_H_ +#define API_JSEP_H_ + +#include + +#include +#include +#include + +#include "absl/types/optional.h" +#include "api/rtcerror.h" +#include "rtc_base/refcount.h" + +namespace cricket { +class Candidate; +class SessionDescription; +} // namespace cricket + +namespace webrtc { + +struct SdpParseError { + public: + // The sdp line that causes the error. + std::string line; + // Explains the error. + std::string description; +}; + +// Class representation of an ICE candidate. +// +// An instance of this interface is supposed to be owned by one class at +// a time and is therefore not expected to be thread safe. +// +// An instance can be created by CreateIceCandidate. +class IceCandidateInterface { + public: + virtual ~IceCandidateInterface() {} + // If present, this is the value of the "a=mid" attribute of the candidate's + // m= section in SDP, which identifies the m= section. + virtual std::string sdp_mid() const = 0; + // This indicates the index (starting at zero) of m= section this candidate + // is associated with. Needed when an endpoint doesn't support MIDs. + virtual int sdp_mline_index() const = 0; + // Only for use internally. + virtual const cricket::Candidate& candidate() const = 0; + // The URL of the ICE server which this candidate was gathered from. + // TODO(zhihuang): Remove the default implementation once the subclasses + // implement this method. + virtual std::string server_url() const; + // Creates a SDP-ized form of this candidate. + virtual bool ToString(std::string* out) const = 0; +}; + +// Creates a IceCandidateInterface based on SDP string. +// Returns null if the sdp string can't be parsed. +// |error| may be null. +IceCandidateInterface* CreateIceCandidate(const std::string& sdp_mid, + int sdp_mline_index, + const std::string& sdp, + SdpParseError* error); + +// Creates an IceCandidateInterface based on a parsed candidate structure. +std::unique_ptr CreateIceCandidate( + const std::string& sdp_mid, + int sdp_mline_index, + const cricket::Candidate& candidate); + +// This class represents a collection of candidates for a specific m= section. +// Used in SessionDescriptionInterface. +class IceCandidateCollection { + public: + virtual ~IceCandidateCollection() {} + virtual size_t count() const = 0; + // Returns true if an equivalent |candidate| exist in the collection. + virtual bool HasCandidate(const IceCandidateInterface* candidate) const = 0; + virtual const IceCandidateInterface* at(size_t index) const = 0; +}; + +// Enum that describes the type of the SessionDescriptionInterface. +// Corresponds to RTCSdpType in the WebRTC specification. +// https://w3c.github.io/webrtc-pc/#dom-rtcsdptype +enum class SdpType { + kOffer, // Description must be treated as an SDP offer. + kPrAnswer, // Description must be treated as an SDP answer, but not a final + // answer. + kAnswer // Description must be treated as an SDP final answer, and the offer- + // answer exchange must be considered complete after receiving this. +}; + +// Returns the string form of the given SDP type. String forms are defined in +// SessionDescriptionInterface. +const char* SdpTypeToString(SdpType type); + +// Returns the SdpType from its string form. The string form can be one of the +// constants defined in SessionDescriptionInterface. Passing in any other string +// results in nullopt. +absl::optional SdpTypeFromString(const std::string& type_str); + +// Class representation of an SDP session description. +// +// An instance of this interface is supposed to be owned by one class at a time +// and is therefore not expected to be thread safe. +// +// An instance can be created by CreateSessionDescription. +class SessionDescriptionInterface { + public: + // String representations of the supported SDP types. + static const char kOffer[]; + static const char kPrAnswer[]; + static const char kAnswer[]; + + virtual ~SessionDescriptionInterface() {} + + // Only for use internally. + virtual cricket::SessionDescription* description() = 0; + virtual const cricket::SessionDescription* description() const = 0; + + // Get the session id and session version, which are defined based on + // RFC 4566 for the SDP o= line. + virtual std::string session_id() const = 0; + virtual std::string session_version() const = 0; + + // Returns the type of this session description as an SdpType. Descriptions of + // the various types are found in the SdpType documentation. + // TODO(steveanton): Remove default implementation once Chromium has been + // updated. + virtual SdpType GetType() const; + + // kOffer/kPrAnswer/kAnswer + // TODO(steveanton): Remove this in favor of |GetType| that returns SdpType. + virtual std::string type() const = 0; + + // Adds the specified candidate to the description. + // + // Ownership is not transferred. + // + // Returns false if the session description does not have a media section + // that corresponds to |candidate.sdp_mid()| or + // |candidate.sdp_mline_index()|. + virtual bool AddCandidate(const IceCandidateInterface* candidate) = 0; + + // Removes the candidates from the description, if found. + // + // Returns the number of candidates removed. + virtual size_t RemoveCandidates( + const std::vector& candidates); + + // Returns the number of m= sections in the session description. + virtual size_t number_of_mediasections() const = 0; + + // Returns a collection of all candidates that belong to a certain m= + // section. + virtual const IceCandidateCollection* candidates( + size_t mediasection_index) const = 0; + + // Serializes the description to SDP. + virtual bool ToString(std::string* out) const = 0; +}; + +// Creates a SessionDescriptionInterface based on the SDP string and the type. +// Returns null if the sdp string can't be parsed or the type is unsupported. +// |error| may be null. +// TODO(steveanton): This function is deprecated. Please use the functions below +// which take an SdpType enum instead. Remove this once it is no longer used. +SessionDescriptionInterface* CreateSessionDescription(const std::string& type, + const std::string& sdp, + SdpParseError* error); + +// Creates a SessionDescriptionInterface based on the SDP string and the type. +// Returns null if the SDP string cannot be parsed. +// If using the signature with |error_out|, details of the parsing error may be +// written to |error_out| if it is not null. +std::unique_ptr CreateSessionDescription( + SdpType type, + const std::string& sdp); +std::unique_ptr CreateSessionDescription( + SdpType type, + const std::string& sdp, + SdpParseError* error_out); + +// Creates a SessionDescriptionInterface based on a parsed SDP structure and the +// given type, ID and version. +std::unique_ptr CreateSessionDescription( + SdpType type, + const std::string& session_id, + const std::string& session_version, + std::unique_ptr description); + +// CreateOffer and CreateAnswer callback interface. +class CreateSessionDescriptionObserver : public rtc::RefCountInterface { + public: + // This callback transfers the ownership of the |desc|. + // TODO(deadbeef): Make this take an std::unique_ptr<> to avoid confusion + // around ownership. + virtual void OnSuccess(SessionDescriptionInterface* desc) = 0; + // The OnFailure callback takes an RTCError, which consists of an + // error code and a string. + // RTCError is non-copyable, so it must be passed using std::move. + // Earlier versions of the API used a string argument. This version + // is deprecated; in order to let clients remove the old version, it has a + // default implementation. If both versions are unimplemented, the + // result will be a runtime error (stack overflow). This is intentional. + virtual void OnFailure(RTCError error); + virtual void OnFailure(const std::string& error); + + protected: + ~CreateSessionDescriptionObserver() override = default; +}; + +// SetLocalDescription and SetRemoteDescription callback interface. +class SetSessionDescriptionObserver : public rtc::RefCountInterface { + public: + virtual void OnSuccess() = 0; + // See description in CreateSessionDescriptionObserver for OnFailure. + virtual void OnFailure(RTCError error); + + virtual void OnFailure(const std::string& error); + + protected: + ~SetSessionDescriptionObserver() override = default; +}; + +} // namespace webrtc + +#endif // API_JSEP_H_ diff --git a/WebRtcNative/include/webrtc/api/jsepicecandidate.h b/WebRtcNative/include/webrtc/api/jsepicecandidate.h new file mode 100644 index 00000000..50520fe7 --- /dev/null +++ b/WebRtcNative/include/webrtc/api/jsepicecandidate.h @@ -0,0 +1,85 @@ +/* + * Copyright 2012 The WebRTC project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + +// TODO(deadbeef): Move this out of api/; it's an implementation detail and +// shouldn't be used externally. + +#ifndef API_JSEPICECANDIDATE_H_ +#define API_JSEPICECANDIDATE_H_ + +#include +#include +#include + +#include "api/candidate.h" +#include "api/jsep.h" +#include "rtc_base/constructormagic.h" + +namespace webrtc { + +// Implementation of IceCandidateInterface. +class JsepIceCandidate : public IceCandidateInterface { + public: + JsepIceCandidate(const std::string& sdp_mid, int sdp_mline_index); + JsepIceCandidate(const std::string& sdp_mid, + int sdp_mline_index, + const cricket::Candidate& candidate); + ~JsepIceCandidate() override; + // |err| may be null. + bool Initialize(const std::string& sdp, SdpParseError* err); + void SetCandidate(const cricket::Candidate& candidate) { + candidate_ = candidate; + } + + std::string sdp_mid() const override; + int sdp_mline_index() const override; + const cricket::Candidate& candidate() const override; + + std::string server_url() const override; + + bool ToString(std::string* out) const override; + + private: + std::string sdp_mid_; + int sdp_mline_index_; + cricket::Candidate candidate_; + + RTC_DISALLOW_COPY_AND_ASSIGN(JsepIceCandidate); +}; + +// Implementation of IceCandidateCollection which stores JsepIceCandidates. +class JsepCandidateCollection : public IceCandidateCollection { + public: + JsepCandidateCollection(); + // Move constructor is defined so that a vector of JsepCandidateCollections + // can be resized. + JsepCandidateCollection(JsepCandidateCollection&& o); + ~JsepCandidateCollection() override; + size_t count() const override; + bool HasCandidate(const IceCandidateInterface* candidate) const override; + // Adds and takes ownership of the JsepIceCandidate. + // TODO(deadbeef): Make this use an std::unique_ptr<>, so ownership logic is + // more clear. + virtual void add(JsepIceCandidate* candidate); + const IceCandidateInterface* at(size_t index) const override; + // Removes the candidate that has a matching address and protocol. + // + // Returns the number of candidates that were removed. + size_t remove(const cricket::Candidate& candidate); + + private: + std::vector candidates_; + + RTC_DISALLOW_COPY_AND_ASSIGN(JsepCandidateCollection); +}; + +} // namespace webrtc + +#endif // API_JSEPICECANDIDATE_H_ diff --git a/WebRtcNative/include/webrtc/api/jsepsessiondescription.h b/WebRtcNative/include/webrtc/api/jsepsessiondescription.h new file mode 100644 index 00000000..d70829e0 --- /dev/null +++ b/WebRtcNative/include/webrtc/api/jsepsessiondescription.h @@ -0,0 +1,85 @@ +/* + * Copyright 2012 The WebRTC project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + +// TODO(deadbeef): Move this out of api/; it's an implementation detail and +// shouldn't be used externally. + +#ifndef API_JSEPSESSIONDESCRIPTION_H_ +#define API_JSEPSESSIONDESCRIPTION_H_ + +#include +#include +#include + +#include "api/candidate.h" +#include "api/jsep.h" +#include "api/jsepicecandidate.h" +#include "rtc_base/constructormagic.h" + +namespace cricket { +class SessionDescription; +} + +namespace webrtc { + +// Implementation of SessionDescriptionInterface. +class JsepSessionDescription : public SessionDescriptionInterface { + public: + explicit JsepSessionDescription(SdpType type); + // TODO(steveanton): Remove this once callers have switched to SdpType. + explicit JsepSessionDescription(const std::string& type); + virtual ~JsepSessionDescription(); + + // Takes ownership of |description|. + // TODO(deadbeef): Make this use an std::unique_ptr<>, so ownership logic is + // more clear. + bool Initialize(cricket::SessionDescription* description, + const std::string& session_id, + const std::string& session_version); + + virtual cricket::SessionDescription* description() { + return description_.get(); + } + virtual const cricket::SessionDescription* description() const { + return description_.get(); + } + virtual std::string session_id() const { return session_id_; } + virtual std::string session_version() const { return session_version_; } + virtual SdpType GetType() const { return type_; } + virtual std::string type() const { return SdpTypeToString(type_); } + // Allows changing the type. Used for testing. + virtual bool AddCandidate(const IceCandidateInterface* candidate); + virtual size_t RemoveCandidates( + const std::vector& candidates); + virtual size_t number_of_mediasections() const; + virtual const IceCandidateCollection* candidates( + size_t mediasection_index) const; + virtual bool ToString(std::string* out) const; + + static const int kDefaultVideoCodecId; + static const char kDefaultVideoCodecName[]; + + private: + std::unique_ptr description_; + std::string session_id_; + std::string session_version_; + SdpType type_; + std::vector candidate_collection_; + + bool GetMediasectionIndex(const IceCandidateInterface* candidate, + size_t* index); + int GetMediasectionIndex(const cricket::Candidate& candidate); + + RTC_DISALLOW_COPY_AND_ASSIGN(JsepSessionDescription); +}; + +} // namespace webrtc + +#endif // API_JSEPSESSIONDESCRIPTION_H_ diff --git a/WebRtcNative/include/webrtc/api/mediaconstraintsinterface.h b/WebRtcNative/include/webrtc/api/mediaconstraintsinterface.h new file mode 100644 index 00000000..54ab7067 --- /dev/null +++ b/WebRtcNative/include/webrtc/api/mediaconstraintsinterface.h @@ -0,0 +1,149 @@ +/* + * Copyright 2013 The WebRTC project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + +// This file contains the interface for MediaConstraints, corresponding to +// the definition at +// http://www.w3.org/TR/mediacapture-streams/#mediastreamconstraints and also +// used in WebRTC: http://dev.w3.org/2011/webrtc/editor/webrtc.html#constraints. + +// This interface is being deprecated in Chrome, and may be removed +// from WebRTC too. +// https://bugs.chromium.org/p/webrtc/issues/detail?id=5617 + +#ifndef API_MEDIACONSTRAINTSINTERFACE_H_ +#define API_MEDIACONSTRAINTSINTERFACE_H_ + +#include +#include + +#include "absl/types/optional.h" +#include "api/peerconnectioninterface.h" + +namespace webrtc { + +// Interface used for passing arguments about media constraints +// to the MediaStream and PeerConnection implementation. +// +// Constraints may be either "mandatory", which means that unless satisfied, +// the method taking the constraints should fail, or "optional", which means +// they may not be satisfied.. +class MediaConstraintsInterface { + public: + struct Constraint { + Constraint() {} + Constraint(const std::string& key, const std::string value) + : key(key), value(value) {} + std::string key; + std::string value; + }; + + class Constraints : public std::vector { + public: + bool FindFirst(const std::string& key, std::string* value) const; + }; + + // Constraint keys used by a local video source. + // Specified by draft-alvestrand-constraints-resolution-00b + static const char kMinAspectRatio[]; // minAspectRatio + static const char kMaxAspectRatio[]; // maxAspectRatio + static const char kMaxWidth[]; // maxWidth + static const char kMinWidth[]; // minWidth + static const char kMaxHeight[]; // maxHeight + static const char kMinHeight[]; // minHeight + static const char kMaxFrameRate[]; // maxFrameRate + static const char kMinFrameRate[]; // minFrameRate + + // Constraint keys used by a local audio source. + static const char kEchoCancellation[]; // echoCancellation + + // These keys are google specific. + static const char kGoogEchoCancellation[]; // googEchoCancellation + + static const char kExtendedFilterEchoCancellation[]; // googEchoCancellation2 + static const char kDAEchoCancellation[]; // googDAEchoCancellation + static const char kAutoGainControl[]; // googAutoGainControl + static const char kExperimentalAutoGainControl[]; // googAutoGainControl2 + static const char kNoiseSuppression[]; // googNoiseSuppression + static const char kExperimentalNoiseSuppression[]; // googNoiseSuppression2 + static const char kIntelligibilityEnhancer[]; // intelligibilityEnhancer + static const char kHighpassFilter[]; // googHighpassFilter + static const char kTypingNoiseDetection[]; // googTypingNoiseDetection + static const char kAudioMirroring[]; // googAudioMirroring + static const char + kAudioNetworkAdaptorConfig[]; // goodAudioNetworkAdaptorConfig + + // Google-specific constraint keys for a local video source + static const char kNoiseReduction[]; // googNoiseReduction + + // Constraint keys for CreateOffer / CreateAnswer + // Specified by the W3C PeerConnection spec + static const char kOfferToReceiveVideo[]; // OfferToReceiveVideo + static const char kOfferToReceiveAudio[]; // OfferToReceiveAudio + static const char kVoiceActivityDetection[]; // VoiceActivityDetection + static const char kIceRestart[]; // IceRestart + // These keys are google specific. + static const char kUseRtpMux[]; // googUseRtpMUX + + // Constraints values. + static const char kValueTrue[]; // true + static const char kValueFalse[]; // false + + // PeerConnection constraint keys. + // Temporary pseudo-constraints used to enable DTLS-SRTP + static const char kEnableDtlsSrtp[]; // Enable DTLS-SRTP + // Temporary pseudo-constraints used to enable DataChannels + static const char kEnableRtpDataChannels[]; // Enable RTP DataChannels + // Google-specific constraint keys. + // Temporary pseudo-constraint for enabling DSCP through JS. + static const char kEnableDscp[]; // googDscp + // Constraint to enable IPv6 through JS. + static const char kEnableIPv6[]; // googIPv6 + // Temporary constraint to enable suspend below min bitrate feature. + static const char kEnableVideoSuspendBelowMinBitrate[]; + // googSuspendBelowMinBitrate + // Constraint to enable combined audio+video bandwidth estimation. + static const char kCombinedAudioVideoBwe[]; // googCombinedAudioVideoBwe + static const char kScreencastMinBitrate[]; // googScreencastMinBitrate + static const char kCpuOveruseDetection[]; // googCpuOveruseDetection + static const char kPayloadPadding[]; // googPayloadPadding + + // The prefix of internal-only constraints whose JS set values should be + // stripped by Chrome before passed down to Libjingle. + static const char kInternalConstraintPrefix[]; + + virtual ~MediaConstraintsInterface() = default; + + virtual const Constraints& GetMandatory() const = 0; + virtual const Constraints& GetOptional() const = 0; +}; + +bool FindConstraint(const MediaConstraintsInterface* constraints, + const std::string& key, + bool* value, + size_t* mandatory_constraints); + +bool FindConstraint(const MediaConstraintsInterface* constraints, + const std::string& key, + int* value, + size_t* mandatory_constraints); + +// Copy all relevant constraints into an RTCConfiguration object. +void CopyConstraintsIntoRtcConfiguration( + const MediaConstraintsInterface* constraints, + PeerConnectionInterface::RTCConfiguration* configuration); + +// Copy all relevant constraints into an AudioOptions object. +void CopyConstraintsIntoAudioOptions( + const MediaConstraintsInterface* constraints, + cricket::AudioOptions* options); + +} // namespace webrtc + +#endif // API_MEDIACONSTRAINTSINTERFACE_H_ diff --git a/WebRtcNative/include/webrtc/api/mediastreaminterface.h b/WebRtcNative/include/webrtc/api/mediastreaminterface.h new file mode 100644 index 00000000..b661351e --- /dev/null +++ b/WebRtcNative/include/webrtc/api/mediastreaminterface.h @@ -0,0 +1,327 @@ +/* + * Copyright 2012 The WebRTC project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + +// This file contains interfaces for MediaStream, MediaTrack and MediaSource. +// These interfaces are used for implementing MediaStream and MediaTrack as +// defined in http://dev.w3.org/2011/webrtc/editor/webrtc.html#stream-api. These +// interfaces must be used only with PeerConnection. PeerConnectionManager +// interface provides the factory methods to create MediaStream and MediaTracks. + +#ifndef API_MEDIASTREAMINTERFACE_H_ +#define API_MEDIASTREAMINTERFACE_H_ + +#include + +#include +#include + +#include "absl/types/optional.h" +#include "api/video/video_frame.h" +// TODO(zhihuang): Remove unrelated headers once downstream applications stop +// relying on them; they were previously transitively included by +// mediachannel.h, which is no longer a dependency of this file. +#include "api/video/video_sink_interface.h" +#include "api/video/video_source_interface.h" +#include "modules/audio_processing/include/audio_processing_statistics.h" +#include "rtc_base/ratetracker.h" +#include "rtc_base/refcount.h" +#include "rtc_base/scoped_ref_ptr.h" +#include "rtc_base/thread.h" +#include "rtc_base/timeutils.h" + +namespace webrtc { + +// Generic observer interface. +class ObserverInterface { + public: + virtual void OnChanged() = 0; + + protected: + virtual ~ObserverInterface() {} +}; + +class NotifierInterface { + public: + virtual void RegisterObserver(ObserverInterface* observer) = 0; + virtual void UnregisterObserver(ObserverInterface* observer) = 0; + + virtual ~NotifierInterface() {} +}; + +// Base class for sources. A MediaStreamTrack has an underlying source that +// provides media. A source can be shared by multiple tracks. +class MediaSourceInterface : public rtc::RefCountInterface, + public NotifierInterface { + public: + enum SourceState { kInitializing, kLive, kEnded, kMuted }; + + virtual SourceState state() const = 0; + + virtual bool remote() const = 0; + + protected: + ~MediaSourceInterface() override = default; +}; + +// C++ version of MediaStreamTrack. +// See: https://www.w3.org/TR/mediacapture-streams/#mediastreamtrack +class MediaStreamTrackInterface : public rtc::RefCountInterface, + public NotifierInterface { + public: + enum TrackState { + kLive, + kEnded, + }; + + static const char kAudioKind[]; + static const char kVideoKind[]; + + // The kind() method must return kAudioKind only if the object is a + // subclass of AudioTrackInterface, and kVideoKind only if the + // object is a subclass of VideoTrackInterface. It is typically used + // to protect a static_cast<> to the corresponding subclass. + virtual std::string kind() const = 0; + + // Track identifier. + virtual std::string id() const = 0; + + // A disabled track will produce silence (if audio) or black frames (if + // video). Can be disabled and re-enabled. + virtual bool enabled() const = 0; + virtual bool set_enabled(bool enable) = 0; + + // Live or ended. A track will never be live again after becoming ended. + virtual TrackState state() const = 0; + + protected: + ~MediaStreamTrackInterface() override = default; +}; + +// VideoTrackSourceInterface is a reference counted source used for +// VideoTracks. The same source can be used by multiple VideoTracks. +// VideoTrackSourceInterface is designed to be invoked on the signaling thread +// except for rtc::VideoSourceInterface methods that will be invoked +// on the worker thread via a VideoTrack. A custom implementation of a source +// can inherit AdaptedVideoTrackSource instead of directly implementing this +// interface. +class VideoTrackSourceInterface : public MediaSourceInterface, + public rtc::VideoSourceInterface { + public: + struct Stats { + // Original size of captured frame, before video adaptation. + int input_width; + int input_height; + }; + + // Indicates that parameters suitable for screencasts should be automatically + // applied to RtpSenders. + // TODO(perkj): Remove these once all known applications have moved to + // explicitly setting suitable parameters for screencasts and don't need this + // implicit behavior. + virtual bool is_screencast() const = 0; + + // Indicates that the encoder should denoise video before encoding it. + // If it is not set, the default configuration is used which is different + // depending on video codec. + // TODO(perkj): Remove this once denoising is done by the source, and not by + // the encoder. + virtual absl::optional needs_denoising() const = 0; + + // Returns false if no stats are available, e.g, for a remote source, or a + // source which has not seen its first frame yet. + // + // Implementation should avoid blocking. + virtual bool GetStats(Stats* stats) = 0; + + protected: + ~VideoTrackSourceInterface() override = default; +}; + +// VideoTrackInterface is designed to be invoked on the signaling thread except +// for rtc::VideoSourceInterface methods that must be invoked +// on the worker thread. +// PeerConnectionFactory::CreateVideoTrack can be used for creating a VideoTrack +// that ensures thread safety and that all methods are called on the right +// thread. +class VideoTrackInterface : public MediaStreamTrackInterface, + public rtc::VideoSourceInterface { + public: + // Video track content hint, used to override the source is_screencast + // property. + // See https://crbug.com/653531 and https://w3c.github.io/mst-content-hint. + enum class ContentHint { kNone, kFluid, kDetailed, kText }; + + // Register a video sink for this track. Used to connect the track to the + // underlying video engine. + void AddOrUpdateSink(rtc::VideoSinkInterface* sink, + const rtc::VideoSinkWants& wants) override {} + void RemoveSink(rtc::VideoSinkInterface* sink) override {} + + virtual VideoTrackSourceInterface* GetSource() const = 0; + + virtual ContentHint content_hint() const; + virtual void set_content_hint(ContentHint hint) {} + + protected: + ~VideoTrackInterface() override = default; +}; + +// Interface for receiving audio data from a AudioTrack. +class AudioTrackSinkInterface { + public: + virtual void OnData(const void* audio_data, + int bits_per_sample, + int sample_rate, + size_t number_of_channels, + size_t number_of_frames) = 0; + + protected: + virtual ~AudioTrackSinkInterface() {} +}; + +// AudioSourceInterface is a reference counted source used for AudioTracks. +// The same source can be used by multiple AudioTracks. +class AudioSourceInterface : public MediaSourceInterface { + public: + class AudioObserver { + public: + virtual void OnSetVolume(double volume) = 0; + + protected: + virtual ~AudioObserver() {} + }; + + // TODO(deadbeef): Makes all the interfaces pure virtual after they're + // implemented in chromium. + + // Sets the volume of the source. |volume| is in the range of [0, 10]. + // TODO(tommi): This method should be on the track and ideally volume should + // be applied in the track in a way that does not affect clones of the track. + virtual void SetVolume(double volume) {} + + // Registers/unregisters observers to the audio source. + virtual void RegisterAudioObserver(AudioObserver* observer) {} + virtual void UnregisterAudioObserver(AudioObserver* observer) {} + + // TODO(tommi): Make pure virtual. + virtual void AddSink(AudioTrackSinkInterface* sink) {} + virtual void RemoveSink(AudioTrackSinkInterface* sink) {} +}; + +// Interface of the audio processor used by the audio track to collect +// statistics. +class AudioProcessorInterface : public rtc::RefCountInterface { + public: + // Deprecated, use AudioProcessorStatistics instead. + // TODO(ivoc): Remove this when all implementations have switched to the new + // GetStats function. See b/67926135. + struct AudioProcessorStats { + AudioProcessorStats() + : typing_noise_detected(false), + echo_return_loss(0), + echo_return_loss_enhancement(0), + echo_delay_median_ms(0), + echo_delay_std_ms(0), + residual_echo_likelihood(0.0f), + residual_echo_likelihood_recent_max(0.0f), + aec_divergent_filter_fraction(0.0) {} + ~AudioProcessorStats() {} + + bool typing_noise_detected; + int echo_return_loss; + int echo_return_loss_enhancement; + int echo_delay_median_ms; + int echo_delay_std_ms; + float residual_echo_likelihood; + float residual_echo_likelihood_recent_max; + float aec_divergent_filter_fraction; + }; + // This struct maintains the optionality of the stats, and will replace the + // regular stats struct when all users have been updated. + struct AudioProcessorStatistics { + bool typing_noise_detected = false; + AudioProcessingStats apm_statistics; + }; + + // Get audio processor statistics. + virtual void GetStats(AudioProcessorStats* stats); + + // Get audio processor statistics. The |has_remote_tracks| argument should be + // set if there are active remote tracks (this would usually be true during + // a call). If there are no remote tracks some of the stats will not be set by + // the AudioProcessor, because they only make sense if there is at least one + // remote track. + // TODO(ivoc): Make pure virtual when all implementions are updated. + virtual AudioProcessorStatistics GetStats(bool has_remote_tracks); + + protected: + ~AudioProcessorInterface() override = default; +}; + +class AudioTrackInterface : public MediaStreamTrackInterface { + public: + // TODO(deadbeef): Figure out if the following interface should be const or + // not. + virtual AudioSourceInterface* GetSource() const = 0; + + // Add/Remove a sink that will receive the audio data from the track. + virtual void AddSink(AudioTrackSinkInterface* sink) = 0; + virtual void RemoveSink(AudioTrackSinkInterface* sink) = 0; + + // Get the signal level from the audio track. + // Return true on success, otherwise false. + // TODO(deadbeef): Change the interface to int GetSignalLevel() and pure + // virtual after it's implemented in chromium. + virtual bool GetSignalLevel(int* level); + + // Get the audio processor used by the audio track. Return null if the track + // does not have any processor. + // TODO(deadbeef): Make the interface pure virtual. + virtual rtc::scoped_refptr GetAudioProcessor(); + + protected: + ~AudioTrackInterface() override = default; +}; + +typedef std::vector > AudioTrackVector; +typedef std::vector > VideoTrackVector; + +// C++ version of https://www.w3.org/TR/mediacapture-streams/#mediastream. +// +// A major difference is that remote audio/video tracks (received by a +// PeerConnection/RtpReceiver) are not synchronized simply by adding them to +// the same stream; a session description with the correct "a=msid" attributes +// must be pushed down. +// +// Thus, this interface acts as simply a container for tracks. +class MediaStreamInterface : public rtc::RefCountInterface, + public NotifierInterface { + public: + virtual std::string id() const = 0; + + virtual AudioTrackVector GetAudioTracks() = 0; + virtual VideoTrackVector GetVideoTracks() = 0; + virtual rtc::scoped_refptr FindAudioTrack( + const std::string& track_id) = 0; + virtual rtc::scoped_refptr FindVideoTrack( + const std::string& track_id) = 0; + + virtual bool AddTrack(AudioTrackInterface* track) = 0; + virtual bool AddTrack(VideoTrackInterface* track) = 0; + virtual bool RemoveTrack(AudioTrackInterface* track) = 0; + virtual bool RemoveTrack(VideoTrackInterface* track) = 0; + + protected: + ~MediaStreamInterface() override = default; +}; + +} // namespace webrtc + +#endif // API_MEDIASTREAMINTERFACE_H_ diff --git a/WebRtcNative/include/webrtc/api/mediastreamproxy.h b/WebRtcNative/include/webrtc/api/mediastreamproxy.h new file mode 100644 index 00000000..4c544595 --- /dev/null +++ b/WebRtcNative/include/webrtc/api/mediastreamproxy.h @@ -0,0 +1,44 @@ +/* + * Copyright 2011 The WebRTC project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + +#ifndef API_MEDIASTREAMPROXY_H_ +#define API_MEDIASTREAMPROXY_H_ + +#include + +#include "api/mediastreaminterface.h" +#include "api/proxy.h" + +namespace webrtc { + +// TODO(deadbeef): Move this to .cc file and out of api/. What threads methods +// are called on is an implementation detail. +BEGIN_SIGNALING_PROXY_MAP(MediaStream) +PROXY_SIGNALING_THREAD_DESTRUCTOR() +PROXY_CONSTMETHOD0(std::string, id) +PROXY_METHOD0(AudioTrackVector, GetAudioTracks) +PROXY_METHOD0(VideoTrackVector, GetVideoTracks) +PROXY_METHOD1(rtc::scoped_refptr, + FindAudioTrack, + const std::string&) +PROXY_METHOD1(rtc::scoped_refptr, + FindVideoTrack, + const std::string&) +PROXY_METHOD1(bool, AddTrack, AudioTrackInterface*) +PROXY_METHOD1(bool, AddTrack, VideoTrackInterface*) +PROXY_METHOD1(bool, RemoveTrack, AudioTrackInterface*) +PROXY_METHOD1(bool, RemoveTrack, VideoTrackInterface*) +PROXY_METHOD1(void, RegisterObserver, ObserverInterface*) +PROXY_METHOD1(void, UnregisterObserver, ObserverInterface*) +END_PROXY_MAP() + +} // namespace webrtc + +#endif // API_MEDIASTREAMPROXY_H_ diff --git a/WebRtcNative/include/webrtc/api/mediastreamtrackproxy.h b/WebRtcNative/include/webrtc/api/mediastreamtrackproxy.h new file mode 100644 index 00000000..77b7bad9 --- /dev/null +++ b/WebRtcNative/include/webrtc/api/mediastreamtrackproxy.h @@ -0,0 +1,65 @@ +/* + * Copyright 2011 The WebRTC project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + +// This file includes proxy classes for tracks. The purpose is +// to make sure tracks are only accessed from the signaling thread. + +#ifndef API_MEDIASTREAMTRACKPROXY_H_ +#define API_MEDIASTREAMTRACKPROXY_H_ + +#include + +#include "api/mediastreaminterface.h" +#include "api/proxy.h" + +namespace webrtc { + +// TODO(deadbeef): Move this to .cc file and out of api/. What threads methods +// are called on is an implementation detail. + +BEGIN_SIGNALING_PROXY_MAP(AudioTrack) +PROXY_SIGNALING_THREAD_DESTRUCTOR() +PROXY_CONSTMETHOD0(std::string, kind) +PROXY_CONSTMETHOD0(std::string, id) +PROXY_CONSTMETHOD0(TrackState, state) +PROXY_CONSTMETHOD0(bool, enabled) +PROXY_CONSTMETHOD0(AudioSourceInterface*, GetSource) +PROXY_METHOD1(void, AddSink, AudioTrackSinkInterface*) +PROXY_METHOD1(void, RemoveSink, AudioTrackSinkInterface*) +PROXY_METHOD1(bool, GetSignalLevel, int*) +PROXY_METHOD0(rtc::scoped_refptr, GetAudioProcessor) +PROXY_METHOD1(bool, set_enabled, bool) +PROXY_METHOD1(void, RegisterObserver, ObserverInterface*) +PROXY_METHOD1(void, UnregisterObserver, ObserverInterface*) +END_PROXY_MAP() + +BEGIN_PROXY_MAP(VideoTrack) +PROXY_SIGNALING_THREAD_DESTRUCTOR() +PROXY_CONSTMETHOD0(std::string, kind) +PROXY_CONSTMETHOD0(std::string, id) +PROXY_CONSTMETHOD0(TrackState, state) +PROXY_CONSTMETHOD0(bool, enabled) +PROXY_METHOD1(bool, set_enabled, bool) +PROXY_CONSTMETHOD0(ContentHint, content_hint) +PROXY_METHOD1(void, set_content_hint, ContentHint) +PROXY_WORKER_METHOD2(void, + AddOrUpdateSink, + rtc::VideoSinkInterface*, + const rtc::VideoSinkWants&) +PROXY_WORKER_METHOD1(void, RemoveSink, rtc::VideoSinkInterface*) +PROXY_CONSTMETHOD0(VideoTrackSourceInterface*, GetSource) + +PROXY_METHOD1(void, RegisterObserver, ObserverInterface*) +PROXY_METHOD1(void, UnregisterObserver, ObserverInterface*) +END_PROXY_MAP() + +} // namespace webrtc + +#endif // API_MEDIASTREAMTRACKPROXY_H_ diff --git a/WebRtcNative/include/webrtc/api/mediatypes.h b/WebRtcNative/include/webrtc/api/mediatypes.h new file mode 100644 index 00000000..f2812760 --- /dev/null +++ b/WebRtcNative/include/webrtc/api/mediatypes.h @@ -0,0 +1,36 @@ +/* + * Copyright 2016 The WebRTC project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + +#ifndef API_MEDIATYPES_H_ +#define API_MEDIATYPES_H_ + +#include + +// The cricket and webrtc have separate definitions for what a media type is. +// They're not compatible. Watch out for this. + +namespace cricket { + +enum MediaType { MEDIA_TYPE_AUDIO, MEDIA_TYPE_VIDEO, MEDIA_TYPE_DATA }; + +std::string MediaTypeToString(MediaType type); +// Aborts on invalid string. Only expected to be used on strings that are +// guaranteed to be valid, such as MediaStreamTrackInterface::kind(). +MediaType MediaTypeFromString(const std::string& type_str); + +} // namespace cricket + +namespace webrtc { + +enum class MediaType { ANY, AUDIO, VIDEO, DATA }; + +} // namespace webrtc + +#endif // API_MEDIATYPES_H_ diff --git a/WebRtc.NET/include/webrtc/api/notifier.h b/WebRtcNative/include/webrtc/api/notifier.h similarity index 81% rename from WebRtc.NET/include/webrtc/api/notifier.h rename to WebRtcNative/include/webrtc/api/notifier.h index 69a86976..e5c61c96 100644 --- a/WebRtc.NET/include/webrtc/api/notifier.h +++ b/WebRtcNative/include/webrtc/api/notifier.h @@ -8,26 +8,25 @@ * be found in the AUTHORS file in the root of the source tree. */ -#ifndef WEBRTC_API_NOTIFIER_H_ -#define WEBRTC_API_NOTIFIER_H_ +#ifndef API_NOTIFIER_H_ +#define API_NOTIFIER_H_ #include -#include "webrtc/api/mediastreaminterface.h" -#include "webrtc/base/checks.h" -#include "webrtc/base/common.h" +#include "api/mediastreaminterface.h" +#include "rtc_base/checks.h" namespace webrtc { -// Implement a template version of a notifier. +// Implements a template version of a notifier. +// TODO(deadbeef): This is an implementation detail; move out of api/. template class Notifier : public T { public: - Notifier() { - } + Notifier() {} virtual void RegisterObserver(ObserverInterface* observer) { - RTC_DCHECK(observer != NULL); + RTC_DCHECK(observer != nullptr); observers_.push_back(observer); } @@ -58,4 +57,4 @@ class Notifier : public T { } // namespace webrtc -#endif // WEBRTC_API_NOTIFIER_H_ +#endif // API_NOTIFIER_H_ diff --git a/WebRtcNative/include/webrtc/api/ortc/mediadescription.h b/WebRtcNative/include/webrtc/api/ortc/mediadescription.h new file mode 100644 index 00000000..5cf1d1a6 --- /dev/null +++ b/WebRtcNative/include/webrtc/api/ortc/mediadescription.h @@ -0,0 +1,53 @@ +/* + * Copyright 2017 The WebRTC project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + +#ifndef API_ORTC_MEDIADESCRIPTION_H_ +#define API_ORTC_MEDIADESCRIPTION_H_ + +#include +#include +#include + +#include "absl/types/optional.h" +#include "api/cryptoparams.h" + +namespace webrtc { + +// A structured representation of a media description within an SDP session +// description. +class MediaDescription { + public: + explicit MediaDescription(std::string mid) : mid_(std::move(mid)) {} + + ~MediaDescription() {} + + // The mid(media stream identification) is used for identifying media streams + // within a session description. + // https://tools.ietf.org/html/rfc5888#section-6 + absl::optional mid() const { return mid_; } + void set_mid(std::string mid) { mid_.emplace(std::move(mid)); } + + // Security keys and parameters for this media stream. Can be used to + // negotiate parameters for SRTP. + // https://tools.ietf.org/html/rfc4568#page-5 + std::vector& sdes_params() { return sdes_params_; } + const std::vector& sdes_params() const { + return sdes_params_; + } + + private: + absl::optional mid_; + + std::vector sdes_params_; +}; + +} // namespace webrtc + +#endif // API_ORTC_MEDIADESCRIPTION_H_ diff --git a/WebRtcNative/include/webrtc/api/ortc/ortcfactoryinterface.h b/WebRtcNative/include/webrtc/api/ortc/ortcfactoryinterface.h new file mode 100644 index 00000000..ea25c8a3 --- /dev/null +++ b/WebRtcNative/include/webrtc/api/ortc/ortcfactoryinterface.h @@ -0,0 +1,232 @@ +/* + * Copyright 2017 The WebRTC project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + +#ifndef API_ORTC_ORTCFACTORYINTERFACE_H_ +#define API_ORTC_ORTCFACTORYINTERFACE_H_ + +#include +#include +#include // For std::move. + +#include "api/mediaconstraintsinterface.h" +#include "api/mediastreaminterface.h" +#include "api/mediatypes.h" +#include "api/ortc/ortcrtpreceiverinterface.h" +#include "api/ortc/ortcrtpsenderinterface.h" +#include "api/ortc/packettransportinterface.h" +#include "api/ortc/rtptransportcontrollerinterface.h" +#include "api/ortc/rtptransportinterface.h" +#include "api/ortc/srtptransportinterface.h" +#include "api/ortc/udptransportinterface.h" +#include "api/rtcerror.h" +#include "api/rtpparameters.h" +#include "rtc_base/network.h" +#include "rtc_base/scoped_ref_ptr.h" +#include "rtc_base/thread.h" + +namespace webrtc { + +// TODO(deadbeef): This should be part of /api/, but currently it's not and +// including its header violates checkdeps rules. +class AudioDeviceModule; + +// WARNING: This is experimental/under development, so use at your own risk; no +// guarantee about API stability is guaranteed here yet. +// +// This class is the ORTC analog of PeerConnectionFactory. It acts as a factory +// for ORTC objects that can be connected to each other. +// +// Some of these objects may not be represented by the ORTC specification, but +// follow the same general principles. +// +// If one of the factory methods takes another object as an argument, it MUST +// have been created by the same OrtcFactory. +// +// On object lifetimes: objects should be destroyed in this order: +// 1. Objects created by the factory. +// 2. The factory itself. +// 3. Objects passed into OrtcFactoryInterface::Create. +class OrtcFactoryInterface { + public: + // |network_thread| is the thread on which packets are sent and received. + // If null, a new rtc::Thread with a default socket server is created. + // + // |signaling_thread| is used for callbacks to the consumer of the API. If + // null, the current thread will be used, which assumes that the API consumer + // is running a message loop on this thread (either using an existing + // rtc::Thread, or by calling rtc::Thread::Current()->ProcessMessages). + // + // |network_manager| is used to determine which network interfaces are + // available. This is used for ICE, for example. If null, a default + // implementation will be used. Only accessed on |network_thread|. + // + // |socket_factory| is used (on the network thread) for creating sockets. If + // it's null, a default implementation will be used, which assumes + // |network_thread| is a normal rtc::Thread. + // + // |adm| is optional, and allows a different audio device implementation to + // be injected; otherwise a platform-specific module will be used that will + // use the default audio input. + // + // |audio_encoder_factory| and |audio_decoder_factory| are used to + // instantiate audio codecs; they determine what codecs are supported. + // + // Note that the OrtcFactoryInterface does not take ownership of any of the + // objects passed in by raw pointer, and as previously stated, these objects + // can't be destroyed before the factory is. + static RTCErrorOr> Create( + rtc::Thread* network_thread, + rtc::Thread* signaling_thread, + rtc::NetworkManager* network_manager, + rtc::PacketSocketFactory* socket_factory, + AudioDeviceModule* adm, + rtc::scoped_refptr audio_encoder_factory, + rtc::scoped_refptr audio_decoder_factory); + + // Constructor for convenience which uses default implementations where + // possible (though does still require that the current thread runs a message + // loop; see above). + static RTCErrorOr> Create( + rtc::scoped_refptr audio_encoder_factory, + rtc::scoped_refptr audio_decoder_factory) { + return Create(nullptr, nullptr, nullptr, nullptr, nullptr, + audio_encoder_factory, audio_decoder_factory); + } + + virtual ~OrtcFactoryInterface() {} + + // Creates an RTP transport controller, which is used in calls to + // CreateRtpTransport methods. If your application has some notion of a + // "call", you should create one transport controller per call. + // + // However, if you only are using one RtpTransport object, this doesn't need + // to be called explicitly; CreateRtpTransport will create one automatically + // if |rtp_transport_controller| is null. See below. + // + // TODO(deadbeef): Add MediaConfig and RtcEventLog arguments? + virtual RTCErrorOr> + CreateRtpTransportController() = 0; + + // Creates an RTP transport using the provided packet transports and + // transport controller. + // + // |rtp| will be used for sending RTP packets, and |rtcp| for RTCP packets. + // + // |rtp| can't be null. |rtcp| must be non-null if and only if + // |rtp_parameters.rtcp.mux| is false, indicating that RTCP muxing isn't used. + // Note that if RTCP muxing isn't enabled initially, it can still enabled + // later through SetParameters. + // + // If |transport_controller| is null, one will automatically be created, and + // its lifetime managed by the returned RtpTransport. This should only be + // done if a single RtpTransport is being used to communicate with the remote + // endpoint. + virtual RTCErrorOr> CreateRtpTransport( + const RtpTransportParameters& rtp_parameters, + PacketTransportInterface* rtp, + PacketTransportInterface* rtcp, + RtpTransportControllerInterface* transport_controller) = 0; + + // Creates an SrtpTransport which is an RTP transport that uses SRTP. + virtual RTCErrorOr> + CreateSrtpTransport( + const RtpTransportParameters& rtp_parameters, + PacketTransportInterface* rtp, + PacketTransportInterface* rtcp, + RtpTransportControllerInterface* transport_controller) = 0; + + // Returns the capabilities of an RTP sender of type |kind|. These + // capabilities can be used to determine what RtpParameters to use to create + // an RtpSender. + // + // If for some reason you pass in MEDIA_TYPE_DATA, returns an empty structure. + virtual RtpCapabilities GetRtpSenderCapabilities( + cricket::MediaType kind) const = 0; + + // Creates an RTP sender with |track|. Will not start sending until Send is + // called. This is provided as a convenience; it's equivalent to calling + // CreateRtpSender with a kind (see below), followed by SetTrack. + // + // |track| and |transport| must not be null. + virtual RTCErrorOr> CreateRtpSender( + rtc::scoped_refptr track, + RtpTransportInterface* transport) = 0; + + // Overload of CreateRtpSender allows creating the sender without a track. + // + // |kind| must be MEDIA_TYPE_AUDIO or MEDIA_TYPE_VIDEO. + virtual RTCErrorOr> CreateRtpSender( + cricket::MediaType kind, + RtpTransportInterface* transport) = 0; + + // Returns the capabilities of an RTP receiver of type |kind|. These + // capabilities can be used to determine what RtpParameters to use to create + // an RtpReceiver. + // + // If for some reason you pass in MEDIA_TYPE_DATA, returns an empty structure. + virtual RtpCapabilities GetRtpReceiverCapabilities( + cricket::MediaType kind) const = 0; + + // Creates an RTP receiver of type |kind|. Will not start receiving media + // until Receive is called. + // + // |kind| must be MEDIA_TYPE_AUDIO or MEDIA_TYPE_VIDEO. + // + // |transport| must not be null. + virtual RTCErrorOr> + CreateRtpReceiver(cricket::MediaType kind, + RtpTransportInterface* transport) = 0; + + // Create a UDP transport with IP address family |family|, using a port + // within the specified range. + // + // |family| must be AF_INET or AF_INET6. + // + // |min_port|/|max_port| values of 0 indicate no range restriction. + // + // Returns an error if the transport wasn't successfully created. + virtual RTCErrorOr> + CreateUdpTransport(int family, uint16_t min_port, uint16_t max_port) = 0; + + // Method for convenience that has no port range restrictions. + RTCErrorOr> CreateUdpTransport( + int family) { + return CreateUdpTransport(family, 0, 0); + } + + // NOTE: The methods below to create tracks/sources return scoped_refptrs + // rather than unique_ptrs, because these interfaces are also used with + // PeerConnection, where everything is ref-counted. + + // Creates a audio source representing the default microphone input. + // |options| decides audio processing settings. + virtual rtc::scoped_refptr CreateAudioSource( + const cricket::AudioOptions& options) = 0; + + // Version of the above method that uses default options. + rtc::scoped_refptr CreateAudioSource() { + return CreateAudioSource(cricket::AudioOptions()); + } + + // Creates a new local video track wrapping |source|. The same |source| can + // be used in several tracks. + virtual rtc::scoped_refptr CreateVideoTrack( + const std::string& id, + VideoTrackSourceInterface* source) = 0; + + // Creates an new local audio track wrapping |source|. + virtual rtc::scoped_refptr CreateAudioTrack( + const std::string& id, + AudioSourceInterface* source) = 0; +}; + +} // namespace webrtc + +#endif // API_ORTC_ORTCFACTORYINTERFACE_H_ diff --git a/WebRtcNative/include/webrtc/api/ortc/ortcrtpreceiverinterface.h b/WebRtcNative/include/webrtc/api/ortc/ortcrtpreceiverinterface.h new file mode 100644 index 00000000..59ff9776 --- /dev/null +++ b/WebRtcNative/include/webrtc/api/ortc/ortcrtpreceiverinterface.h @@ -0,0 +1,84 @@ +/* + * Copyright 2017 The WebRTC project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + +// This file contains interfaces for RtpReceivers: +// http://publications.ortc.org/2016/20161202/#rtcrtpreceiver* +// +// However, underneath the RtpReceiver is an RtpTransport, rather than a +// DtlsTransport. This is to allow different types of RTP transports (besides +// DTLS-SRTP) to be used. + +#ifndef API_ORTC_ORTCRTPRECEIVERINTERFACE_H_ +#define API_ORTC_ORTCRTPRECEIVERINTERFACE_H_ + +#include "api/mediastreaminterface.h" +#include "api/mediatypes.h" +#include "api/ortc/rtptransportinterface.h" +#include "api/rtcerror.h" +#include "api/rtpparameters.h" + +namespace webrtc { + +// Note: Since receiver capabilities may depend on how the OrtcFactory was +// created, instead of a static "GetCapabilities" method on this interface, +// there is a "GetRtpReceiverCapabilities" method on the OrtcFactory. +class OrtcRtpReceiverInterface { + public: + virtual ~OrtcRtpReceiverInterface() {} + + // Returns a track representing the media received by this receiver. + // + // Currently, this will return null until Receive has been successfully + // called. Also, a new track will be created every time the primary SSRC + // changes. + // + // If encodings are removed, GetTrack will return null. Though deactivating + // an encoding (setting |active| to false) will not do this. + // + // In the future, these limitations will be fixed, and GetTrack will return + // the same track for the lifetime of the RtpReceiver. So it's not + // recommended to write code that depends on this non-standard behavior. + virtual rtc::scoped_refptr GetTrack() const = 0; + + // Once supported, will switch to receiving media on a new transport. + // However, this is not currently supported and will always return an error. + virtual RTCError SetTransport(RtpTransportInterface* transport) = 0; + // Returns previously set (or constructed-with) transport. + virtual RtpTransportInterface* GetTransport() const = 0; + + // Start receiving media with |parameters| (if |parameters| contains an + // active encoding). + // + // There are no limitations to how the parameters can be changed after the + // initial call to Receive, as long as they're valid (for example, they can't + // use the same payload type for two codecs). + virtual RTCError Receive(const RtpParameters& parameters) = 0; + // Returns parameters that were last successfully passed into Receive, or + // empty parameters if that hasn't yet occurred. + // + // Note that for parameters that are described as having an "implementation + // default" value chosen, GetParameters() will return those chosen defaults, + // with the exception of SSRCs which have special behavior. See + // rtpparameters.h for more details. + virtual RtpParameters GetParameters() const = 0; + + // Audio or video receiver? + // + // Once GetTrack() starts always returning a track, this method will be + // redundant, as one can call "GetTrack()->kind()". However, it's still a + // nice convenience, and is symmetric with OrtcRtpSenderInterface::GetKind. + virtual cricket::MediaType GetKind() const = 0; + + // TODO(deadbeef): GetContributingSources +}; + +} // namespace webrtc + +#endif // API_ORTC_ORTCRTPRECEIVERINTERFACE_H_ diff --git a/WebRtcNative/include/webrtc/api/ortc/ortcrtpsenderinterface.h b/WebRtcNative/include/webrtc/api/ortc/ortcrtpsenderinterface.h new file mode 100644 index 00000000..fd4dfaa7 --- /dev/null +++ b/WebRtcNative/include/webrtc/api/ortc/ortcrtpsenderinterface.h @@ -0,0 +1,77 @@ +/* + * Copyright 2017 The WebRTC project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + +// This file contains interfaces for RtpSenders: +// http://publications.ortc.org/2016/20161202/#rtcrtpsender* +// +// However, underneath the RtpSender is an RtpTransport, rather than a +// DtlsTransport. This is to allow different types of RTP transports (besides +// DTLS-SRTP) to be used. + +#ifndef API_ORTC_ORTCRTPSENDERINTERFACE_H_ +#define API_ORTC_ORTCRTPSENDERINTERFACE_H_ + +#include "api/mediastreaminterface.h" +#include "api/mediatypes.h" +#include "api/ortc/rtptransportinterface.h" +#include "api/rtcerror.h" +#include "api/rtpparameters.h" + +namespace webrtc { + +// Note: Since sender capabilities may depend on how the OrtcFactory was +// created, instead of a static "GetCapabilities" method on this interface, +// there is a "GetRtpSenderCapabilities" method on the OrtcFactory. +class OrtcRtpSenderInterface { + public: + virtual ~OrtcRtpSenderInterface() {} + + // Sets the source of media that will be sent by this sender. + // + // If Send has already been called, will immediately switch to sending this + // track. If |track| is null, will stop sending media. + // + // Returns INVALID_PARAMETER error if an audio track is set on a video + // RtpSender, or vice-versa. + virtual RTCError SetTrack(MediaStreamTrackInterface* track) = 0; + // Returns previously set (or constructed-with) track. + virtual rtc::scoped_refptr GetTrack() const = 0; + + // Once supported, will switch to sending media on a new transport. However, + // this is not currently supported and will always return an error. + virtual RTCError SetTransport(RtpTransportInterface* transport) = 0; + // Returns previously set (or constructed-with) transport. + virtual RtpTransportInterface* GetTransport() const = 0; + + // Start sending media with |parameters| (if |parameters| contains an active + // encoding). + // + // There are no limitations to how the parameters can be changed after the + // initial call to Send, as long as they're valid (for example, they can't + // use the same payload type for two codecs). + virtual RTCError Send(const RtpParameters& parameters) = 0; + // Returns parameters that were last successfully passed into Send, or empty + // parameters if that hasn't yet occurred. + // + // Note that for parameters that are described as having an "implementation + // default" value chosen, GetParameters() will return those chosen defaults, + // with the exception of SSRCs which have special behavior. See + // rtpparameters.h for more details. + virtual RtpParameters GetParameters() const = 0; + + // Audio or video sender? + virtual cricket::MediaType GetKind() const = 0; + + // TODO(deadbeef): SSRC conflict signal. +}; + +} // namespace webrtc + +#endif // API_ORTC_ORTCRTPSENDERINTERFACE_H_ diff --git a/WebRtcNative/include/webrtc/api/ortc/packettransportinterface.h b/WebRtcNative/include/webrtc/api/ortc/packettransportinterface.h new file mode 100644 index 00000000..f357f8af --- /dev/null +++ b/WebRtcNative/include/webrtc/api/ortc/packettransportinterface.h @@ -0,0 +1,39 @@ +/* + * Copyright 2017 The WebRTC project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + +#ifndef API_ORTC_PACKETTRANSPORTINTERFACE_H_ +#define API_ORTC_PACKETTRANSPORTINTERFACE_H_ + +namespace rtc { + +class PacketTransportInternal; + +} // namespace rtc + +namespace webrtc { + +// Base class for different packet-based transports. +class PacketTransportInterface { + public: + virtual ~PacketTransportInterface() {} + + protected: + // Only for internal use. Returns a pointer to an internal interface, for use + // by the implementation. + virtual rtc::PacketTransportInternal* GetInternal() = 0; + + // Classes that can use this internal interface. + friend class RtpTransportControllerAdapter; + friend class RtpTransportAdapter; +}; + +} // namespace webrtc + +#endif // API_ORTC_PACKETTRANSPORTINTERFACE_H_ diff --git a/WebRtcNative/include/webrtc/api/ortc/rtptransportcontrollerinterface.h b/WebRtcNative/include/webrtc/api/ortc/rtptransportcontrollerinterface.h new file mode 100644 index 00000000..85f37fa7 --- /dev/null +++ b/WebRtcNative/include/webrtc/api/ortc/rtptransportcontrollerinterface.h @@ -0,0 +1,57 @@ +/* + * Copyright 2017 The WebRTC project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + +#ifndef API_ORTC_RTPTRANSPORTCONTROLLERINTERFACE_H_ +#define API_ORTC_RTPTRANSPORTCONTROLLERINTERFACE_H_ + +#include + +#include "api/ortc/rtptransportinterface.h" + +namespace webrtc { + +class RtpTransportControllerAdapter; + +// Used to group RTP transports between a local endpoint and the same remote +// endpoint, for the purpose of sharing bandwidth estimation and other things. +// +// Comparing this to the PeerConnection model, non-budled audio/video would use +// two RtpTransports with a single RtpTransportController, whereas bundled +// media would use a single RtpTransport, and two PeerConnections would use +// independent RtpTransportControllers. +// +// RtpTransports are associated with this controller when they're created, by +// passing the controller into OrtcFactory's relevant "CreateRtpTransport" +// method. When a transport is destroyed, it's automatically disassociated. +// GetTransports returns all currently associated transports. +// +// This is the RTP equivalent of "IceTransportController" in ORTC; RtpTransport +// is to RtpTransportController as IceTransport is to IceTransportController. +class RtpTransportControllerInterface { + public: + virtual ~RtpTransportControllerInterface() {} + + // Returns all transports associated with this controller (see explanation + // above). No ordering is guaranteed. + virtual std::vector GetTransports() const = 0; + + protected: + // Only for internal use. Returns a pointer to an internal interface, for use + // by the implementation. + virtual RtpTransportControllerAdapter* GetInternal() = 0; + + // Classes that can use this internal interface. + friend class OrtcFactory; + friend class RtpTransportAdapter; +}; + +} // namespace webrtc + +#endif // API_ORTC_RTPTRANSPORTCONTROLLERINTERFACE_H_ diff --git a/WebRtcNative/include/webrtc/api/ortc/rtptransportinterface.h b/WebRtcNative/include/webrtc/api/ortc/rtptransportinterface.h new file mode 100644 index 00000000..b0d30e85 --- /dev/null +++ b/WebRtcNative/include/webrtc/api/ortc/rtptransportinterface.h @@ -0,0 +1,95 @@ +/* + * Copyright 2017 The WebRTC project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + +#ifndef API_ORTC_RTPTRANSPORTINTERFACE_H_ +#define API_ORTC_RTPTRANSPORTINTERFACE_H_ + +#include + +#include "absl/types/optional.h" +#include "api/ortc/packettransportinterface.h" +#include "api/rtcerror.h" +#include "api/rtp_headers.h" +#include "api/rtpparameters.h" +#include "common_types.h" // NOLINT(build/include) + +namespace webrtc { + +class RtpTransportAdapter; + +struct RtpTransportParameters final { + RtcpParameters rtcp; + + // Enabled periodic sending of keep-alive packets, that help prevent timeouts + // on the network level, such as NAT bindings. See RFC6263 section 4.6. + RtpKeepAliveConfig keepalive; + + bool operator==(const RtpTransportParameters& o) const { + return rtcp == o.rtcp && keepalive == o.keepalive; + } + bool operator!=(const RtpTransportParameters& o) const { + return !(*this == o); + } +}; + +// Base class for different types of RTP transports that can be created by an +// OrtcFactory. Used by RtpSenders/RtpReceivers. +// +// This is not present in the standard ORTC API, but exists here for a few +// reasons. Firstly, it allows different types of RTP transports to be used: +// DTLS-SRTP (which is required for the web), but also SDES-SRTP and +// unencrypted RTP. It also simplifies the handling of RTCP muxing, and +// provides a better API point for it. +// +// Note that Edge's implementation of ORTC provides a similar API point, called +// RTCSrtpSdesTransport: +// https://msdn.microsoft.com/en-us/library/mt502527(v=vs.85).aspx +class RtpTransportInterface { + public: + virtual ~RtpTransportInterface() {} + + // Returns packet transport that's used to send RTP packets. + virtual PacketTransportInterface* GetRtpPacketTransport() const = 0; + + // Returns separate packet transport that's used to send RTCP packets. If + // RTCP multiplexing is being used, returns null. + virtual PacketTransportInterface* GetRtcpPacketTransport() const = 0; + + // Set/get RTP/RTCP transport params. Can be used to enable RTCP muxing or + // reduced-size RTCP if initially not enabled. + // + // Changing |mux| from "true" to "false" is not allowed, and changing the + // CNAME is currently unsupported. + // RTP keep-alive settings need to be set before before an RtpSender has + // started sending, altering the payload type or timeout interval after this + // point is not supported. The parameters must also match across all RTP + // transports for a given RTP transport controller. + virtual RTCError SetParameters(const RtpTransportParameters& parameters) = 0; + // Returns last set or constructed-with parameters. If |cname| was empty in + // construction, the generated CNAME will be present in the returned + // parameters (see above). + virtual RtpTransportParameters GetParameters() const = 0; + + protected: + // Only for internal use. Returns a pointer to an internal interface, for use + // by the implementation. + virtual RtpTransportAdapter* GetInternal() = 0; + + // Classes that can use this internal interface. + friend class OrtcFactory; + friend class OrtcRtpSenderAdapter; + friend class OrtcRtpReceiverAdapter; + friend class RtpTransportControllerAdapter; + friend class RtpTransportAdapter; +}; + +} // namespace webrtc + +#endif // API_ORTC_RTPTRANSPORTINTERFACE_H_ diff --git a/WebRtcNative/include/webrtc/api/ortc/sessiondescription.h b/WebRtcNative/include/webrtc/api/ortc/sessiondescription.h new file mode 100644 index 00000000..ebbaa27d --- /dev/null +++ b/WebRtcNative/include/webrtc/api/ortc/sessiondescription.h @@ -0,0 +1,45 @@ +/* + * Copyright 2017 The WebRTC project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + +#ifndef API_ORTC_SESSIONDESCRIPTION_H_ +#define API_ORTC_SESSIONDESCRIPTION_H_ + +#include +#include + +namespace webrtc { + +// A structured representation of an SDP session description. +class SessionDescription { + public: + SessionDescription(int64_t session_id, std::string session_version) + : session_id_(session_id), session_version_(std::move(session_version)) {} + + // https://tools.ietf.org/html/rfc4566#section-5.2 + // o= + // + // session_id_ is the "sess-id" field. + // session_version_ is the "sess-version" field. + int64_t session_id() { return session_id_; } + void set_session_id(int64_t session_id) { session_id_ = session_id; } + + const std::string& session_version() const { return session_version_; } + void set_session_version(std::string session_version) { + session_version_ = std::move(session_version); + } + + private: + int64_t session_id_; + std::string session_version_; +}; + +} // namespace webrtc + +#endif // API_ORTC_SESSIONDESCRIPTION_H_ diff --git a/WebRtcNative/include/webrtc/api/ortc/srtptransportinterface.h b/WebRtcNative/include/webrtc/api/ortc/srtptransportinterface.h new file mode 100644 index 00000000..4b757e40 --- /dev/null +++ b/WebRtcNative/include/webrtc/api/ortc/srtptransportinterface.h @@ -0,0 +1,48 @@ +/* + * Copyright 2017 The WebRTC project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + +#ifndef API_ORTC_SRTPTRANSPORTINTERFACE_H_ +#define API_ORTC_SRTPTRANSPORTINTERFACE_H_ + +#include "api/cryptoparams.h" +#include "api/ortc/rtptransportinterface.h" +#include "api/rtcerror.h" + +namespace webrtc { + +// The subclass of the RtpTransport which uses SRTP. The keying information +// is explicitly passed in from the application. +// +// If using SDP and SDES (RFC4568) for signaling, then after applying the +// answer, the negotiated keying information from the offer and answer would be +// set and the SRTP would be active. +// +// Note that Edge's implementation of ORTC provides a similar API point, called +// RTCSrtpSdesTransport: +// https://msdn.microsoft.com/en-us/library/mt502527(v=vs.85).aspx +class SrtpTransportInterface : public RtpTransportInterface { + public: + virtual ~SrtpTransportInterface() {} + + // There are some limitations of the current implementation: + // 1. Send and receive keys must use the same crypto suite. + // 2. The keys can't be changed after initially set. + // 3. The keys must be set before creating a sender/receiver using the SRTP + // transport. + // Set the SRTP keying material for sending RTP and RTCP. + virtual RTCError SetSrtpSendKey(const cricket::CryptoParams& params) = 0; + + // Set the SRTP keying material for receiving RTP and RTCP. + virtual RTCError SetSrtpReceiveKey(const cricket::CryptoParams& params) = 0; +}; + +} // namespace webrtc + +#endif // API_ORTC_SRTPTRANSPORTINTERFACE_H_ diff --git a/WebRtcNative/include/webrtc/api/ortc/udptransportinterface.h b/WebRtcNative/include/webrtc/api/ortc/udptransportinterface.h new file mode 100644 index 00000000..f246a25e --- /dev/null +++ b/WebRtcNative/include/webrtc/api/ortc/udptransportinterface.h @@ -0,0 +1,49 @@ +/* + * Copyright 2017 The WebRTC project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + +#ifndef API_ORTC_UDPTRANSPORTINTERFACE_H_ +#define API_ORTC_UDPTRANSPORTINTERFACE_H_ + +#include "api/ortc/packettransportinterface.h" +#include "api/proxy.h" +#include "rtc_base/socketaddress.h" + +namespace webrtc { + +// Interface for a raw UDP transport (not using ICE), meaning a combination of +// a local/remote IP address/port. +// +// An instance can be instantiated using OrtcFactory. +// +// Each instance reserves a UDP port, which will be freed when the +// UdpTransportInterface destructor is called. +// +// Calling SetRemoteAddress sets the destination of outgoing packets; without a +// destination, packets can't be sent, but they can be received. +class UdpTransportInterface : public virtual PacketTransportInterface { + public: + // Get the address of the socket allocated for this transport. + virtual rtc::SocketAddress GetLocalAddress() const = 0; + + // Sets the address to which packets will be delivered. + // + // Calling with a "nil" (default-constructed) address is legal, and unsets + // any previously set destination. + // + // However, calling with an incomplete address (port or IP not set) will + // fail. + virtual bool SetRemoteAddress(const rtc::SocketAddress& dest) = 0; + // Simple getter. If never set, returns nil address. + virtual rtc::SocketAddress GetRemoteAddress() const = 0; +}; + +} // namespace webrtc + +#endif // API_ORTC_UDPTRANSPORTINTERFACE_H_ diff --git a/WebRtcNative/include/webrtc/api/peerconnectionfactoryproxy.h b/WebRtcNative/include/webrtc/api/peerconnectionfactoryproxy.h new file mode 100644 index 00000000..db520835 --- /dev/null +++ b/WebRtcNative/include/webrtc/api/peerconnectionfactoryproxy.h @@ -0,0 +1,84 @@ +/* + * Copyright 2014 The WebRTC project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + +#ifndef API_PEERCONNECTIONFACTORYPROXY_H_ +#define API_PEERCONNECTIONFACTORYPROXY_H_ + +#include +#include +#include + +#include "api/peerconnectioninterface.h" +#include "api/proxy.h" +#include "rtc_base/bind.h" + +namespace webrtc { + +// TODO(deadbeef): Move this to .cc file and out of api/. What threads methods +// are called on is an implementation detail. +BEGIN_SIGNALING_PROXY_MAP(PeerConnectionFactory) +PROXY_SIGNALING_THREAD_DESTRUCTOR() +// Use the overloads of CreateVideoSource that take raw VideoCapturer +// pointers from PeerConnectionFactoryInterface. +// TODO(deadbeef): Remove this using statement once those overloads are +// removed. +using PeerConnectionFactoryInterface::CreateVideoSource; +PROXY_METHOD1(void, SetOptions, const Options&) +PROXY_METHOD5(rtc::scoped_refptr, + CreatePeerConnection, + const PeerConnectionInterface::RTCConfiguration&, + const MediaConstraintsInterface*, + std::unique_ptr, + std::unique_ptr, + PeerConnectionObserver*); +PROXY_METHOD4(rtc::scoped_refptr, + CreatePeerConnection, + const PeerConnectionInterface::RTCConfiguration&, + std::unique_ptr, + std::unique_ptr, + PeerConnectionObserver*); +PROXY_METHOD2(rtc::scoped_refptr, + CreatePeerConnection, + const PeerConnectionInterface::RTCConfiguration&, + PeerConnectionDependencies); +PROXY_CONSTMETHOD1(webrtc::RtpCapabilities, + GetRtpSenderCapabilities, + cricket::MediaType); +PROXY_CONSTMETHOD1(webrtc::RtpCapabilities, + GetRtpReceiverCapabilities, + cricket::MediaType); +PROXY_METHOD1(rtc::scoped_refptr, + CreateLocalMediaStream, + const std::string&) +PROXY_METHOD1(rtc::scoped_refptr, + CreateAudioSource, + const cricket::AudioOptions&) +PROXY_METHOD2(rtc::scoped_refptr, + CreateVideoSource, + std::unique_ptr, + const MediaConstraintsInterface*) +PROXY_METHOD1(rtc::scoped_refptr, + CreateVideoSource, + std::unique_ptr) +PROXY_METHOD2(rtc::scoped_refptr, + CreateVideoTrack, + const std::string&, + VideoTrackSourceInterface*) +PROXY_METHOD2(rtc::scoped_refptr, + CreateAudioTrack, + const std::string&, + AudioSourceInterface*) +PROXY_METHOD2(bool, StartAecDump, rtc::PlatformFile, int64_t) +PROXY_METHOD0(void, StopAecDump) +END_PROXY_MAP() + +} // namespace webrtc + +#endif // API_PEERCONNECTIONFACTORYPROXY_H_ diff --git a/WebRtcNative/include/webrtc/api/peerconnectioninterface.h b/WebRtcNative/include/webrtc/api/peerconnectioninterface.h new file mode 100644 index 00000000..edac135c --- /dev/null +++ b/WebRtcNative/include/webrtc/api/peerconnectioninterface.h @@ -0,0 +1,1514 @@ +/* + * Copyright 2012 The WebRTC project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + +// This file contains the PeerConnection interface as defined in +// https://w3c.github.io/webrtc-pc/#peer-to-peer-connections +// +// The PeerConnectionFactory class provides factory methods to create +// PeerConnection, MediaStream and MediaStreamTrack objects. +// +// The following steps are needed to setup a typical call using WebRTC: +// +// 1. Create a PeerConnectionFactoryInterface. Check constructors for more +// information about input parameters. +// +// 2. Create a PeerConnection object. Provide a configuration struct which +// points to STUN and/or TURN servers used to generate ICE candidates, and +// provide an object that implements the PeerConnectionObserver interface, +// which is used to receive callbacks from the PeerConnection. +// +// 3. Create local MediaStreamTracks using the PeerConnectionFactory and add +// them to PeerConnection by calling AddTrack (or legacy method, AddStream). +// +// 4. Create an offer, call SetLocalDescription with it, serialize it, and send +// it to the remote peer +// +// 5. Once an ICE candidate has been gathered, the PeerConnection will call the +// observer function OnIceCandidate. The candidates must also be serialized and +// sent to the remote peer. +// +// 6. Once an answer is received from the remote peer, call +// SetRemoteDescription with the remote answer. +// +// 7. Once a remote candidate is received from the remote peer, provide it to +// the PeerConnection by calling AddIceCandidate. +// +// The receiver of a call (assuming the application is "call"-based) can decide +// to accept or reject the call; this decision will be taken by the application, +// not the PeerConnection. +// +// If the application decides to accept the call, it should: +// +// 1. Create PeerConnectionFactoryInterface if it doesn't exist. +// +// 2. Create a new PeerConnection. +// +// 3. Provide the remote offer to the new PeerConnection object by calling +// SetRemoteDescription. +// +// 4. Generate an answer to the remote offer by calling CreateAnswer and send it +// back to the remote peer. +// +// 5. Provide the local answer to the new PeerConnection by calling +// SetLocalDescription with the answer. +// +// 6. Provide the remote ICE candidates by calling AddIceCandidate. +// +// 7. Once a candidate has been gathered, the PeerConnection will call the +// observer function OnIceCandidate. Send these candidates to the remote peer. + +#ifndef API_PEERCONNECTIONINTERFACE_H_ +#define API_PEERCONNECTIONINTERFACE_H_ + +#include +#include +#include +#include + +#include "api/audio/audio_mixer.h" +#include "api/audio_codecs/audio_decoder_factory.h" +#include "api/audio_codecs/audio_encoder_factory.h" +#include "api/audio_options.h" +#include "api/call/callfactoryinterface.h" +#include "api/datachannelinterface.h" +#include "api/dtmfsenderinterface.h" +#include "api/fec_controller.h" +#include "api/jsep.h" +#include "api/mediastreaminterface.h" +#include "api/rtcerror.h" +#include "api/rtceventlogoutput.h" +#include "api/rtpreceiverinterface.h" +#include "api/rtpsenderinterface.h" +#include "api/rtptransceiverinterface.h" +#include "api/setremotedescriptionobserverinterface.h" +#include "api/stats/rtcstatscollectorcallback.h" +#include "api/statstypes.h" +#include "api/transport/bitrate_settings.h" +#include "api/transport/network_control.h" +#include "api/turncustomizer.h" +#include "api/umametrics.h" +#include "logging/rtc_event_log/rtc_event_log_factory_interface.h" +#include "media/base/mediaconfig.h" +// TODO(bugs.webrtc.org/6353): cricket::VideoCapturer is deprecated and should +// be deleted from the PeerConnection api. +#include "media/base/videocapturer.h" // nogncheck +// TODO(bugs.webrtc.org/7447): We plan to provide a way to let applications +// inject a PacketSocketFactory and/or NetworkManager, and not expose +// PortAllocator in the PeerConnection api. +#include "media/base/mediaengine.h" // nogncheck +#include "p2p/base/portallocator.h" // nogncheck +// TODO(nisse): The interface for bitrate allocation strategy belongs in api/. +#include "rtc_base/bitrateallocationstrategy.h" +#include "rtc_base/network.h" +#include "rtc_base/platform_file.h" +#include "rtc_base/rtccertificate.h" +#include "rtc_base/rtccertificategenerator.h" +#include "rtc_base/socketaddress.h" +#include "rtc_base/sslcertificate.h" +#include "rtc_base/sslstreamadapter.h" + +namespace rtc { +class SSLIdentity; +class Thread; +} // namespace rtc + +namespace cricket { +class WebRtcVideoDecoderFactory; +class WebRtcVideoEncoderFactory; +} // namespace cricket + +namespace webrtc { +class AudioDeviceModule; +class AudioMixer; +class AudioProcessing; +class MediaConstraintsInterface; +class VideoDecoderFactory; +class VideoEncoderFactory; + +// MediaStream container interface. +class StreamCollectionInterface : public rtc::RefCountInterface { + public: + // TODO(ronghuawu): Update the function names to c++ style, e.g. find -> Find. + virtual size_t count() = 0; + virtual MediaStreamInterface* at(size_t index) = 0; + virtual MediaStreamInterface* find(const std::string& label) = 0; + virtual MediaStreamTrackInterface* FindAudioTrack(const std::string& id) = 0; + virtual MediaStreamTrackInterface* FindVideoTrack(const std::string& id) = 0; + + protected: + // Dtor protected as objects shouldn't be deleted via this interface. + ~StreamCollectionInterface() override = default; +}; + +class StatsObserver : public rtc::RefCountInterface { + public: + virtual void OnComplete(const StatsReports& reports) = 0; + + protected: + ~StatsObserver() override = default; +}; + +enum class SdpSemantics { kPlanB, kUnifiedPlan }; + +class PeerConnectionInterface : public rtc::RefCountInterface { + public: + // See https://w3c.github.io/webrtc-pc/#state-definitions + enum SignalingState { + kStable, + kHaveLocalOffer, + kHaveLocalPrAnswer, + kHaveRemoteOffer, + kHaveRemotePrAnswer, + kClosed, + }; + + enum IceGatheringState { + kIceGatheringNew, + kIceGatheringGathering, + kIceGatheringComplete + }; + + enum IceConnectionState { + kIceConnectionNew, + kIceConnectionChecking, + kIceConnectionConnected, + kIceConnectionCompleted, + kIceConnectionFailed, + kIceConnectionDisconnected, + kIceConnectionClosed, + kIceConnectionMax, + }; + + // TLS certificate policy. + enum TlsCertPolicy { + // For TLS based protocols, ensure the connection is secure by not + // circumventing certificate validation. + kTlsCertPolicySecure, + // For TLS based protocols, disregard security completely by skipping + // certificate validation. This is insecure and should never be used unless + // security is irrelevant in that particular context. + kTlsCertPolicyInsecureNoCheck, + }; + + struct IceServer { + IceServer(); + IceServer(const IceServer&); + ~IceServer(); + + // TODO(jbauch): Remove uri when all code using it has switched to urls. + // List of URIs associated with this server. Valid formats are described + // in RFC7064 and RFC7065, and more may be added in the future. The "host" + // part of the URI may contain either an IP address or a hostname. + std::string uri; + std::vector urls; + std::string username; + std::string password; + TlsCertPolicy tls_cert_policy = kTlsCertPolicySecure; + // If the URIs in |urls| only contain IP addresses, this field can be used + // to indicate the hostname, which may be necessary for TLS (using the SNI + // extension). If |urls| itself contains the hostname, this isn't + // necessary. + std::string hostname; + // List of protocols to be used in the TLS ALPN extension. + std::vector tls_alpn_protocols; + // List of elliptic curves to be used in the TLS elliptic curves extension. + std::vector tls_elliptic_curves; + + bool operator==(const IceServer& o) const { + return uri == o.uri && urls == o.urls && username == o.username && + password == o.password && tls_cert_policy == o.tls_cert_policy && + hostname == o.hostname && + tls_alpn_protocols == o.tls_alpn_protocols && + tls_elliptic_curves == o.tls_elliptic_curves; + } + bool operator!=(const IceServer& o) const { return !(*this == o); } + }; + typedef std::vector IceServers; + + enum IceTransportsType { + // TODO(pthatcher): Rename these kTransporTypeXXX, but update + // Chromium at the same time. + kNone, + kRelay, + kNoHost, + kAll + }; + + // https://tools.ietf.org/html/draft-ietf-rtcweb-jsep-24#section-4.1.1 + enum BundlePolicy { + kBundlePolicyBalanced, + kBundlePolicyMaxBundle, + kBundlePolicyMaxCompat + }; + + // https://tools.ietf.org/html/draft-ietf-rtcweb-jsep-24#section-4.1.1 + enum RtcpMuxPolicy { + kRtcpMuxPolicyNegotiate, + kRtcpMuxPolicyRequire, + }; + + enum TcpCandidatePolicy { + kTcpCandidatePolicyEnabled, + kTcpCandidatePolicyDisabled + }; + + enum CandidateNetworkPolicy { + kCandidateNetworkPolicyAll, + kCandidateNetworkPolicyLowCost + }; + + enum ContinualGatheringPolicy { GATHER_ONCE, GATHER_CONTINUALLY }; + + enum class RTCConfigurationType { + // A configuration that is safer to use, despite not having the best + // performance. Currently this is the default configuration. + kSafe, + // An aggressive configuration that has better performance, although it + // may be riskier and may need extra support in the application. + kAggressive + }; + + // TODO(hbos): Change into class with private data and public getters. + // TODO(nisse): In particular, accessing fields directly from an + // application is brittle, since the organization mirrors the + // organization of the implementation, which isn't stable. So we + // need getters and setters at least for fields which applications + // are interested in. + struct RTCConfiguration { + // This struct is subject to reorganization, both for naming + // consistency, and to group settings to match where they are used + // in the implementation. To do that, we need getter and setter + // methods for all settings which are of interest to applications, + // Chrome in particular. + + RTCConfiguration(); + RTCConfiguration(const RTCConfiguration&); + explicit RTCConfiguration(RTCConfigurationType type); + ~RTCConfiguration(); + + bool operator==(const RTCConfiguration& o) const; + bool operator!=(const RTCConfiguration& o) const; + + bool dscp() const { return media_config.enable_dscp; } + void set_dscp(bool enable) { media_config.enable_dscp = enable; } + + bool cpu_adaptation() const { + return media_config.video.enable_cpu_adaptation; + } + void set_cpu_adaptation(bool enable) { + media_config.video.enable_cpu_adaptation = enable; + } + + bool suspend_below_min_bitrate() const { + return media_config.video.suspend_below_min_bitrate; + } + void set_suspend_below_min_bitrate(bool enable) { + media_config.video.suspend_below_min_bitrate = enable; + } + + bool prerenderer_smoothing() const { + return media_config.video.enable_prerenderer_smoothing; + } + void set_prerenderer_smoothing(bool enable) { + media_config.video.enable_prerenderer_smoothing = enable; + } + + bool experiment_cpu_load_estimator() const { + return media_config.video.experiment_cpu_load_estimator; + } + void set_experiment_cpu_load_estimator(bool enable) { + media_config.video.experiment_cpu_load_estimator = enable; + } + + static const int kUndefined = -1; + // Default maximum number of packets in the audio jitter buffer. + static const int kAudioJitterBufferMaxPackets = 50; + // ICE connection receiving timeout for aggressive configuration. + static const int kAggressiveIceConnectionReceivingTimeout = 1000; + + //////////////////////////////////////////////////////////////////////// + // The below few fields mirror the standard RTCConfiguration dictionary: + // https://w3c.github.io/webrtc-pc/#rtcconfiguration-dictionary + //////////////////////////////////////////////////////////////////////// + + // TODO(pthatcher): Rename this ice_servers, but update Chromium + // at the same time. + IceServers servers; + // TODO(pthatcher): Rename this ice_transport_type, but update + // Chromium at the same time. + IceTransportsType type = kAll; + BundlePolicy bundle_policy = kBundlePolicyBalanced; + RtcpMuxPolicy rtcp_mux_policy = kRtcpMuxPolicyRequire; + std::vector> certificates; + int ice_candidate_pool_size = 0; + + ////////////////////////////////////////////////////////////////////////// + // The below fields correspond to constraints from the deprecated + // constraints interface for constructing a PeerConnection. + // + // absl::optional fields can be "missing", in which case the implementation + // default will be used. + ////////////////////////////////////////////////////////////////////////// + + // If set to true, don't gather IPv6 ICE candidates. + // TODO(deadbeef): Remove this? IPv6 support has long stopped being + // experimental + bool disable_ipv6 = false; + + // If set to true, don't gather IPv6 ICE candidates on Wi-Fi. + // Only intended to be used on specific devices. Certain phones disable IPv6 + // when the screen is turned off and it would be better to just disable the + // IPv6 ICE candidates on Wi-Fi in those cases. + bool disable_ipv6_on_wifi = false; + + // By default, the PeerConnection will use a limited number of IPv6 network + // interfaces, in order to avoid too many ICE candidate pairs being created + // and delaying ICE completion. + // + // Can be set to INT_MAX to effectively disable the limit. + int max_ipv6_networks = cricket::kDefaultMaxIPv6Networks; + + // Exclude link-local network interfaces + // from considertaion for gathering ICE candidates. + bool disable_link_local_networks = false; + + // If set to true, use RTP data channels instead of SCTP. + // TODO(deadbeef): Remove this. We no longer commit to supporting RTP data + // channels, though some applications are still working on moving off of + // them. + bool enable_rtp_data_channel = false; + + // Minimum bitrate at which screencast video tracks will be encoded at. + // This means adding padding bits up to this bitrate, which can help + // when switching from a static scene to one with motion. + absl::optional screencast_min_bitrate; + + // Use new combined audio/video bandwidth estimation? + absl::optional combined_audio_video_bwe; + + // Can be used to disable DTLS-SRTP. This should never be done, but can be + // useful for testing purposes, for example in setting up a loopback call + // with a single PeerConnection. + absl::optional enable_dtls_srtp; + + ///////////////////////////////////////////////// + // The below fields are not part of the standard. + ///////////////////////////////////////////////// + + // Can be used to disable TCP candidate generation. + TcpCandidatePolicy tcp_candidate_policy = kTcpCandidatePolicyEnabled; + + // Can be used to avoid gathering candidates for a "higher cost" network, + // if a lower cost one exists. For example, if both Wi-Fi and cellular + // interfaces are available, this could be used to avoid using the cellular + // interface. + CandidateNetworkPolicy candidate_network_policy = + kCandidateNetworkPolicyAll; + + // The maximum number of packets that can be stored in the NetEq audio + // jitter buffer. Can be reduced to lower tolerated audio latency. + int audio_jitter_buffer_max_packets = kAudioJitterBufferMaxPackets; + + // Whether to use the NetEq "fast mode" which will accelerate audio quicker + // if it falls behind. + bool audio_jitter_buffer_fast_accelerate = false; + + // Timeout in milliseconds before an ICE candidate pair is considered to be + // "not receiving", after which a lower priority candidate pair may be + // selected. + int ice_connection_receiving_timeout = kUndefined; + + // Interval in milliseconds at which an ICE "backup" candidate pair will be + // pinged. This is a candidate pair which is not actively in use, but may + // be switched to if the active candidate pair becomes unusable. + // + // This is relevant mainly to Wi-Fi/cell handoff; the application may not + // want this backup cellular candidate pair pinged frequently, since it + // consumes data/battery. + int ice_backup_candidate_pair_ping_interval = kUndefined; + + // Can be used to enable continual gathering, which means new candidates + // will be gathered as network interfaces change. Note that if continual + // gathering is used, the candidate removal API should also be used, to + // avoid an ever-growing list of candidates. + ContinualGatheringPolicy continual_gathering_policy = GATHER_ONCE; + + // If set to true, candidate pairs will be pinged in order of most likely + // to work (which means using a TURN server, generally), rather than in + // standard priority order. + bool prioritize_most_likely_ice_candidate_pairs = false; + + // Implementation defined settings. A public member only for the benefit of + // the implementation. Applications must not access it directly, and should + // instead use provided accessor methods, e.g., set_cpu_adaptation. + struct cricket::MediaConfig media_config; + + // If set to true, only one preferred TURN allocation will be used per + // network interface. UDP is preferred over TCP and IPv6 over IPv4. This + // can be used to cut down on the number of candidate pairings. + bool prune_turn_ports = false; + + // If set to true, this means the ICE transport should presume TURN-to-TURN + // candidate pairs will succeed, even before a binding response is received. + // This can be used to optimize the initial connection time, since the DTLS + // handshake can begin immediately. + bool presume_writable_when_fully_relayed = false; + + // If true, "renomination" will be added to the ice options in the transport + // description. + // See: https://tools.ietf.org/html/draft-thatcher-ice-renomination-00 + bool enable_ice_renomination = false; + + // If true, the ICE role is re-determined when the PeerConnection sets a + // local transport description that indicates an ICE restart. + // + // This is standard RFC5245 ICE behavior, but causes unnecessary role + // thrashing, so an application may wish to avoid it. This role + // re-determining was removed in ICEbis (ICE v2). + bool redetermine_role_on_ice_restart = true; + + // The following fields define intervals in milliseconds at which ICE + // connectivity checks are sent. + // + // We consider ICE is "strongly connected" for an agent when there is at + // least one candidate pair that currently succeeds in connectivity check + // from its direction i.e. sending a STUN ping and receives a STUN ping + // response, AND all candidate pairs have sent a minimum number of pings for + // connectivity (this number is implementation-specific). Otherwise, ICE is + // considered in "weak connectivity". + // + // Note that the above notion of strong and weak connectivity is not defined + // in RFC 5245, and they apply to our current ICE implementation only. + // + // 1) ice_check_interval_strong_connectivity defines the interval applied to + // ALL candidate pairs when ICE is strongly connected, and it overrides the + // default value of this interval in the ICE implementation; + // 2) ice_check_interval_weak_connectivity defines the counterpart for ALL + // pairs when ICE is weakly connected, and it overrides the default value of + // this interval in the ICE implementation; + // 3) ice_check_min_interval defines the minimal interval (equivalently the + // maximum rate) that overrides the above two intervals when either of them + // is less. + absl::optional ice_check_interval_strong_connectivity; + absl::optional ice_check_interval_weak_connectivity; + absl::optional ice_check_min_interval; + + // The min time period for which a candidate pair must wait for response to + // connectivity checks before it becomes unwritable. This parameter + // overrides the default value in the ICE implementation if set. + absl::optional ice_unwritable_timeout; + + // The min number of connectivity checks that a candidate pair must sent + // without receiving response before it becomes unwritable. This parameter + // overrides the default value in the ICE implementation if set. + absl::optional ice_unwritable_min_checks; + + // The interval in milliseconds at which STUN candidates will resend STUN + // binding requests to keep NAT bindings open. + absl::optional stun_candidate_keepalive_interval; + + // ICE Periodic Regathering + // If set, WebRTC will periodically create and propose candidates without + // starting a new ICE generation. The regathering happens continuously with + // interval specified in milliseconds by the uniform distribution [a, b]. + absl::optional ice_regather_interval_range; + + // Optional TurnCustomizer. + // With this class one can modify outgoing TURN messages. + // The object passed in must remain valid until PeerConnection::Close() is + // called. + webrtc::TurnCustomizer* turn_customizer = nullptr; + + // Preferred network interface. + // A candidate pair on a preferred network has a higher precedence in ICE + // than one on an un-preferred network, regardless of priority or network + // cost. + absl::optional network_preference; + + // Configure the SDP semantics used by this PeerConnection. Note that the + // WebRTC 1.0 specification requires kUnifiedPlan semantics. The + // RtpTransceiver API is only available with kUnifiedPlan semantics. + // + // kPlanB will cause PeerConnection to create offers and answers with at + // most one audio and one video m= section with multiple RtpSenders and + // RtpReceivers specified as multiple a=ssrc lines within the section. This + // will also cause PeerConnection to ignore all but the first m= section of + // the same media type. + // + // kUnifiedPlan will cause PeerConnection to create offers and answers with + // multiple m= sections where each m= section maps to one RtpSender and one + // RtpReceiver (an RtpTransceiver), either both audio or both video. This + // will also cause PeerConnection to ignore all but the first a=ssrc lines + // that form a Plan B stream. + // + // For users who wish to send multiple audio/video streams and need to stay + // interoperable with legacy WebRTC implementations or use legacy APIs, + // specify kPlanB. + // + // For all other users, specify kUnifiedPlan. + SdpSemantics sdp_semantics = SdpSemantics::kPlanB; + + // Actively reset the SRTP parameters whenever the DTLS transports + // underneath are reset for every offer/answer negotiation. + // This is only intended to be a workaround for crbug.com/835958 + // WARNING: This would cause RTP/RTCP packets decryption failure if not used + // correctly. This flag will be deprecated soon. Do not rely on it. + bool active_reset_srtp_params = false; + + // + // Don't forget to update operator== if adding something. + // + }; + + // See: https://www.w3.org/TR/webrtc/#idl-def-rtcofferansweroptions + struct RTCOfferAnswerOptions { + static const int kUndefined = -1; + static const int kMaxOfferToReceiveMedia = 1; + + // The default value for constraint offerToReceiveX:true. + static const int kOfferToReceiveMediaTrue = 1; + + // These options are left as backwards compatibility for clients who need + // "Plan B" semantics. Clients who have switched to "Unified Plan" semantics + // should use the RtpTransceiver API (AddTransceiver) instead. + // + // offer_to_receive_X set to 1 will cause a media description to be + // generated in the offer, even if no tracks of that type have been added. + // Values greater than 1 are treated the same. + // + // If set to 0, the generated directional attribute will not include the + // "recv" direction (meaning it will be "sendonly" or "inactive". + int offer_to_receive_video = kUndefined; + int offer_to_receive_audio = kUndefined; + + bool voice_activity_detection = true; + bool ice_restart = false; + + // If true, will offer to BUNDLE audio/video/data together. Not to be + // confused with RTCP mux (multiplexing RTP and RTCP together). + bool use_rtp_mux = true; + + RTCOfferAnswerOptions() = default; + + RTCOfferAnswerOptions(int offer_to_receive_video, + int offer_to_receive_audio, + bool voice_activity_detection, + bool ice_restart, + bool use_rtp_mux) + : offer_to_receive_video(offer_to_receive_video), + offer_to_receive_audio(offer_to_receive_audio), + voice_activity_detection(voice_activity_detection), + ice_restart(ice_restart), + use_rtp_mux(use_rtp_mux) {} + }; + + // Used by GetStats to decide which stats to include in the stats reports. + // |kStatsOutputLevelStandard| includes the standard stats for Javascript API; + // |kStatsOutputLevelDebug| includes both the standard stats and additional + // stats for debugging purposes. + enum StatsOutputLevel { + kStatsOutputLevelStandard, + kStatsOutputLevelDebug, + }; + + // Accessor methods to active local streams. + // This method is not supported with kUnifiedPlan semantics. Please use + // GetSenders() instead. + virtual rtc::scoped_refptr local_streams() = 0; + + // Accessor methods to remote streams. + // This method is not supported with kUnifiedPlan semantics. Please use + // GetReceivers() instead. + virtual rtc::scoped_refptr remote_streams() = 0; + + // Add a new MediaStream to be sent on this PeerConnection. + // Note that a SessionDescription negotiation is needed before the + // remote peer can receive the stream. + // + // This has been removed from the standard in favor of a track-based API. So, + // this is equivalent to simply calling AddTrack for each track within the + // stream, with the one difference that if "stream->AddTrack(...)" is called + // later, the PeerConnection will automatically pick up the new track. Though + // this functionality will be deprecated in the future. + // + // This method is not supported with kUnifiedPlan semantics. Please use + // AddTrack instead. + virtual bool AddStream(MediaStreamInterface* stream) = 0; + + // Remove a MediaStream from this PeerConnection. + // Note that a SessionDescription negotiation is needed before the + // remote peer is notified. + // + // This method is not supported with kUnifiedPlan semantics. Please use + // RemoveTrack instead. + virtual void RemoveStream(MediaStreamInterface* stream) = 0; + + // Add a new MediaStreamTrack to be sent on this PeerConnection, and return + // the newly created RtpSender. The RtpSender will be associated with the + // streams specified in the |stream_ids| list. + // + // Errors: + // - INVALID_PARAMETER: |track| is null, has a kind other than audio or video, + // or a sender already exists for the track. + // - INVALID_STATE: The PeerConnection is closed. + virtual RTCErrorOr> AddTrack( + rtc::scoped_refptr track, + const std::vector& stream_ids); + + // Remove an RtpSender from this PeerConnection. + // Returns true on success. + // TODO(steveanton): Replace with signature that returns RTCError. + virtual bool RemoveTrack(RtpSenderInterface* sender); + + // Plan B semantics: Removes the RtpSender from this PeerConnection. + // Unified Plan semantics: Stop sending on the RtpSender and mark the + // corresponding RtpTransceiver direction as no longer sending. + // + // Errors: + // - INVALID_PARAMETER: |sender| is null or (Plan B only) the sender is not + // associated with this PeerConnection. + // - INVALID_STATE: PeerConnection is closed. + // TODO(bugs.webrtc.org/9534): Rename to RemoveTrack once the other signature + // is removed. + virtual RTCError RemoveTrackNew( + rtc::scoped_refptr sender); + + // AddTransceiver creates a new RtpTransceiver and adds it to the set of + // transceivers. Adding a transceiver will cause future calls to CreateOffer + // to add a media description for the corresponding transceiver. + // + // The initial value of |mid| in the returned transceiver is null. Setting a + // new session description may change it to a non-null value. + // + // https://w3c.github.io/webrtc-pc/#dom-rtcpeerconnection-addtransceiver + // + // Optionally, an RtpTransceiverInit structure can be specified to configure + // the transceiver from construction. If not specified, the transceiver will + // default to having a direction of kSendRecv and not be part of any streams. + // + // These methods are only available when Unified Plan is enabled (see + // RTCConfiguration). + // + // Common errors: + // - INTERNAL_ERROR: The configuration does not have Unified Plan enabled. + // TODO(steveanton): Make these pure virtual once downstream projects have + // updated. + + // Adds a transceiver with a sender set to transmit the given track. The kind + // of the transceiver (and sender/receiver) will be derived from the kind of + // the track. + // Errors: + // - INVALID_PARAMETER: |track| is null. + virtual RTCErrorOr> + AddTransceiver(rtc::scoped_refptr track); + virtual RTCErrorOr> + AddTransceiver(rtc::scoped_refptr track, + const RtpTransceiverInit& init); + + // Adds a transceiver with the given kind. Can either be MEDIA_TYPE_AUDIO or + // MEDIA_TYPE_VIDEO. + // Errors: + // - INVALID_PARAMETER: |media_type| is not MEDIA_TYPE_AUDIO or + // MEDIA_TYPE_VIDEO. + virtual RTCErrorOr> + AddTransceiver(cricket::MediaType media_type); + virtual RTCErrorOr> + AddTransceiver(cricket::MediaType media_type, const RtpTransceiverInit& init); + + // TODO(deadbeef): Make these pure virtual once all subclasses implement them. + + // Creates a sender without a track. Can be used for "early media"/"warmup" + // use cases, where the application may want to negotiate video attributes + // before a track is available to send. + // + // The standard way to do this would be through "addTransceiver", but we + // don't support that API yet. + // + // |kind| must be "audio" or "video". + // + // |stream_id| is used to populate the msid attribute; if empty, one will + // be generated automatically. + // + // This method is not supported with kUnifiedPlan semantics. Please use + // AddTransceiver instead. + virtual rtc::scoped_refptr CreateSender( + const std::string& kind, + const std::string& stream_id); + + // If Plan B semantics are specified, gets all RtpSenders, created either + // through AddStream, AddTrack, or CreateSender. All senders of a specific + // media type share the same media description. + // + // If Unified Plan semantics are specified, gets the RtpSender for each + // RtpTransceiver. + virtual std::vector> GetSenders() + const; + + // If Plan B semantics are specified, gets all RtpReceivers created when a + // remote description is applied. All receivers of a specific media type share + // the same media description. It is also possible to have a media description + // with no associated RtpReceivers, if the directional attribute does not + // indicate that the remote peer is sending any media. + // + // If Unified Plan semantics are specified, gets the RtpReceiver for each + // RtpTransceiver. + virtual std::vector> GetReceivers() + const; + + // Get all RtpTransceivers, created either through AddTransceiver, AddTrack or + // by a remote description applied with SetRemoteDescription. + // + // Note: This method is only available when Unified Plan is enabled (see + // RTCConfiguration). + virtual std::vector> + GetTransceivers() const; + + // The legacy non-compliant GetStats() API. This correspond to the + // callback-based version of getStats() in JavaScript. The returned metrics + // are UNDOCUMENTED and many of them rely on implementation-specific details. + // The goal is to DELETE THIS VERSION but we can't today because it is heavily + // relied upon by third parties. See https://crbug.com/822696. + // + // This version is wired up into Chrome. Any stats implemented are + // automatically exposed to the Web Platform. This has BYPASSED the Chrome + // release processes for years and lead to cross-browser incompatibility + // issues and web application reliance on Chrome-only behavior. + // + // This API is in "maintenance mode", serious regressions should be fixed but + // adding new stats is highly discouraged. + // + // TODO(hbos): Deprecate and remove this when third parties have migrated to + // the spec-compliant GetStats() API. https://crbug.com/822696 + virtual bool GetStats(StatsObserver* observer, + MediaStreamTrackInterface* track, // Optional + StatsOutputLevel level) = 0; + // The spec-compliant GetStats() API. This correspond to the promise-based + // version of getStats() in JavaScript. Implementation status is described in + // api/stats/rtcstats_objects.h. For more details on stats, see spec: + // https://w3c.github.io/webrtc-pc/#dom-rtcpeerconnection-getstats + // TODO(hbos): Takes shared ownership, use rtc::scoped_refptr<> instead. This + // requires stop overriding the current version in third party or making third + // party calls explicit to avoid ambiguity during switch. Make the future + // version abstract as soon as third party projects implement it. + virtual void GetStats(RTCStatsCollectorCallback* callback) {} + // Spec-compliant getStats() performing the stats selection algorithm with the + // sender. https://w3c.github.io/webrtc-pc/#dom-rtcrtpsender-getstats + // TODO(hbos): Make abstract as soon as third party projects implement it. + virtual void GetStats( + rtc::scoped_refptr selector, + rtc::scoped_refptr callback) {} + // Spec-compliant getStats() performing the stats selection algorithm with the + // receiver. https://w3c.github.io/webrtc-pc/#dom-rtcrtpreceiver-getstats + // TODO(hbos): Make abstract as soon as third party projects implement it. + virtual void GetStats( + rtc::scoped_refptr selector, + rtc::scoped_refptr callback) {} + // Clear cached stats in the RTCStatsCollector. + // Exposed for testing while waiting for automatic cache clear to work. + // https://bugs.webrtc.org/8693 + virtual void ClearStatsCache() {} + + // Create a data channel with the provided config, or default config if none + // is provided. Note that an offer/answer negotiation is still necessary + // before the data channel can be used. + // + // Also, calling CreateDataChannel is the only way to get a data "m=" section + // in SDP, so it should be done before CreateOffer is called, if the + // application plans to use data channels. + virtual rtc::scoped_refptr CreateDataChannel( + const std::string& label, + const DataChannelInit* config) = 0; + + // Returns the more recently applied description; "pending" if it exists, and + // otherwise "current". See below. + virtual const SessionDescriptionInterface* local_description() const = 0; + virtual const SessionDescriptionInterface* remote_description() const = 0; + + // A "current" description the one currently negotiated from a complete + // offer/answer exchange. + virtual const SessionDescriptionInterface* current_local_description() const; + virtual const SessionDescriptionInterface* current_remote_description() const; + + // A "pending" description is one that's part of an incomplete offer/answer + // exchange (thus, either an offer or a pranswer). Once the offer/answer + // exchange is finished, the "pending" description will become "current". + virtual const SessionDescriptionInterface* pending_local_description() const; + virtual const SessionDescriptionInterface* pending_remote_description() const; + + // Create a new offer. + // The CreateSessionDescriptionObserver callback will be called when done. + virtual void CreateOffer(CreateSessionDescriptionObserver* observer, + const MediaConstraintsInterface* constraints) {} + + // TODO(jiayl): remove the default impl and the old interface when chromium + // code is updated. + virtual void CreateOffer(CreateSessionDescriptionObserver* observer, + const RTCOfferAnswerOptions& options) {} + + // Create an answer to an offer. + // The CreateSessionDescriptionObserver callback will be called when done. + virtual void CreateAnswer(CreateSessionDescriptionObserver* observer, + const RTCOfferAnswerOptions& options) {} + // Deprecated - use version above. + // TODO(hta): Remove and remove default implementations when all callers + // are updated. + virtual void CreateAnswer(CreateSessionDescriptionObserver* observer, + const MediaConstraintsInterface* constraints) {} + + // Sets the local session description. + // The PeerConnection takes the ownership of |desc| even if it fails. + // The |observer| callback will be called when done. + // TODO(deadbeef): Change |desc| to be a unique_ptr, to make it clear + // that this method always takes ownership of it. + virtual void SetLocalDescription(SetSessionDescriptionObserver* observer, + SessionDescriptionInterface* desc) = 0; + // Sets the remote session description. + // The PeerConnection takes the ownership of |desc| even if it fails. + // The |observer| callback will be called when done. + // TODO(hbos): Remove when Chrome implements the new signature. + virtual void SetRemoteDescription(SetSessionDescriptionObserver* observer, + SessionDescriptionInterface* desc) {} + // TODO(hbos): Make pure virtual when Chrome has updated its signature. + virtual void SetRemoteDescription( + std::unique_ptr desc, + rtc::scoped_refptr observer) {} + + // TODO(deadbeef): Make this pure virtual once all Chrome subclasses of + // PeerConnectionInterface implement it. + virtual PeerConnectionInterface::RTCConfiguration GetConfiguration(); + + // Sets the PeerConnection's global configuration to |config|. + // + // The members of |config| that may be changed are |type|, |servers|, + // |ice_candidate_pool_size| and |prune_turn_ports| (though the candidate + // pool size can't be changed after the first call to SetLocalDescription). + // Note that this means the BUNDLE and RTCP-multiplexing policies cannot be + // changed with this method. + // + // Any changes to STUN/TURN servers or ICE candidate policy will affect the + // next gathering phase, and cause the next call to createOffer to generate + // new ICE credentials, as described in JSEP. This also occurs when + // |prune_turn_ports| changes, for the same reasoning. + // + // If an error occurs, returns false and populates |error| if non-null: + // - INVALID_MODIFICATION if |config| contains a modified parameter other + // than one of the parameters listed above. + // - INVALID_RANGE if |ice_candidate_pool_size| is out of range. + // - SYNTAX_ERROR if parsing an ICE server URL failed. + // - INVALID_PARAMETER if a TURN server is missing |username| or |password|. + // - INTERNAL_ERROR if an unexpected error occurred. + // + // TODO(deadbeef): Make this pure virtual once all Chrome subclasses of + // PeerConnectionInterface implement it. + virtual bool SetConfiguration( + const PeerConnectionInterface::RTCConfiguration& config, + RTCError* error); + + // Version without error output param for backwards compatibility. + // TODO(deadbeef): Remove once chromium is updated. + virtual bool SetConfiguration( + const PeerConnectionInterface::RTCConfiguration& config); + + // Provides a remote candidate to the ICE Agent. + // A copy of the |candidate| will be created and added to the remote + // description. So the caller of this method still has the ownership of the + // |candidate|. + virtual bool AddIceCandidate(const IceCandidateInterface* candidate) = 0; + + // Removes a group of remote candidates from the ICE agent. Needed mainly for + // continual gathering, to avoid an ever-growing list of candidates as + // networks come and go. + virtual bool RemoveIceCandidates( + const std::vector& candidates); + + // 0 <= min <= current <= max should hold for set parameters. + struct BitrateParameters { + BitrateParameters(); + ~BitrateParameters(); + + absl::optional min_bitrate_bps; + absl::optional current_bitrate_bps; + absl::optional max_bitrate_bps; + }; + + // SetBitrate limits the bandwidth allocated for all RTP streams sent by + // this PeerConnection. Other limitations might affect these limits and + // are respected (for example "b=AS" in SDP). + // + // Setting |current_bitrate_bps| will reset the current bitrate estimate + // to the provided value. + virtual RTCError SetBitrate(const BitrateSettings& bitrate); + + // TODO(nisse): Deprecated - use version above. These two default + // implementations require subclasses to implement one or the other + // of the methods. + virtual RTCError SetBitrate(const BitrateParameters& bitrate_parameters); + + // Sets current strategy. If not set default WebRTC allocator will be used. + // May be changed during an active session. The strategy + // ownership is passed with std::unique_ptr + // TODO(alexnarest): Make this pure virtual when tests will be updated + virtual void SetBitrateAllocationStrategy( + std::unique_ptr + bitrate_allocation_strategy) {} + + // Enable/disable playout of received audio streams. Enabled by default. Note + // that even if playout is enabled, streams will only be played out if the + // appropriate SDP is also applied. Setting |playout| to false will stop + // playout of the underlying audio device but starts a task which will poll + // for audio data every 10ms to ensure that audio processing happens and the + // audio statistics are updated. + // TODO(henrika): deprecate and remove this. + virtual void SetAudioPlayout(bool playout) {} + + // Enable/disable recording of transmitted audio streams. Enabled by default. + // Note that even if recording is enabled, streams will only be recorded if + // the appropriate SDP is also applied. + // TODO(henrika): deprecate and remove this. + virtual void SetAudioRecording(bool recording) {} + + // Returns the current SignalingState. + virtual SignalingState signaling_state() = 0; + + // Returns the aggregate state of all ICE *and* DTLS transports. + // TODO(deadbeef): Implement "PeerConnectionState" according to the standard, + // to aggregate ICE+DTLS state, and change the scope of IceConnectionState to + // be just the ICE layer. See: crbug.com/webrtc/6145 + virtual IceConnectionState ice_connection_state() = 0; + + virtual IceGatheringState ice_gathering_state() = 0; + + // Starts RtcEventLog using existing file. Takes ownership of |file| and + // passes it on to Call, which will take the ownership. If the + // operation fails the file will be closed. The logging will stop + // automatically after 10 minutes have passed, or when the StopRtcEventLog + // function is called. + // TODO(eladalon): Deprecate and remove this. + virtual bool StartRtcEventLog(rtc::PlatformFile file, int64_t max_size_bytes); + + // Start RtcEventLog using an existing output-sink. Takes ownership of + // |output| and passes it on to Call, which will take the ownership. If the + // operation fails the output will be closed and deallocated. The event log + // will send serialized events to the output object every |output_period_ms|. + virtual bool StartRtcEventLog(std::unique_ptr output, + int64_t output_period_ms); + + // Stops logging the RtcEventLog. + // TODO(ivoc): Make this pure virtual when Chrome is updated. + virtual void StopRtcEventLog() {} + + // Terminates all media, closes the transports, and in general releases any + // resources used by the PeerConnection. This is an irreversible operation. + // + // Note that after this method completes, the PeerConnection will no longer + // use the PeerConnectionObserver interface passed in on construction, and + // thus the observer object can be safely destroyed. + virtual void Close() = 0; + + protected: + // Dtor protected as objects shouldn't be deleted via this interface. + ~PeerConnectionInterface() override = default; +}; + +// PeerConnection callback interface, used for RTCPeerConnection events. +// Application should implement these methods. +class PeerConnectionObserver { + public: + virtual ~PeerConnectionObserver() = default; + + // Triggered when the SignalingState changed. + virtual void OnSignalingChange( + PeerConnectionInterface::SignalingState new_state) = 0; + + // Triggered when media is received on a new stream from remote peer. + virtual void OnAddStream(rtc::scoped_refptr stream) {} + + // Triggered when a remote peer closes a stream. + virtual void OnRemoveStream(rtc::scoped_refptr stream) { + } + + // Triggered when a remote peer opens a data channel. + virtual void OnDataChannel( + rtc::scoped_refptr data_channel) = 0; + + // Triggered when renegotiation is needed. For example, an ICE restart + // has begun. + virtual void OnRenegotiationNeeded() = 0; + + // Called any time the IceConnectionState changes. + // + // Note that our ICE states lag behind the standard slightly. The most + // notable differences include the fact that "failed" occurs after 15 + // seconds, not 30, and this actually represents a combination ICE + DTLS + // state, so it may be "failed" if DTLS fails while ICE succeeds. + virtual void OnIceConnectionChange( + PeerConnectionInterface::IceConnectionState new_state) = 0; + + // Called any time the IceGatheringState changes. + virtual void OnIceGatheringChange( + PeerConnectionInterface::IceGatheringState new_state) = 0; + + // A new ICE candidate has been gathered. + virtual void OnIceCandidate(const IceCandidateInterface* candidate) = 0; + + // Ice candidates have been removed. + // TODO(honghaiz): Make this a pure virtual method when all its subclasses + // implement it. + virtual void OnIceCandidatesRemoved( + const std::vector& candidates) {} + + // Called when the ICE connection receiving status changes. + virtual void OnIceConnectionReceivingChange(bool receiving) {} + + // This is called when a receiver and its track are created. + // TODO(zhihuang): Make this pure virtual when all subclasses implement it. + // Note: This is called with both Plan B and Unified Plan semantics. Unified + // Plan users should prefer OnTrack, OnAddTrack is only called as backwards + // compatibility (and is called in the exact same situations as OnTrack). + virtual void OnAddTrack( + rtc::scoped_refptr receiver, + const std::vector>& streams) {} + + // This is called when signaling indicates a transceiver will be receiving + // media from the remote endpoint. This is fired during a call to + // SetRemoteDescription. The receiving track can be accessed by: + // |transceiver->receiver()->track()| and its associated streams by + // |transceiver->receiver()->streams()|. + // Note: This will only be called if Unified Plan semantics are specified. + // This behavior is specified in section 2.2.8.2.5 of the "Set the + // RTCSessionDescription" algorithm: + // https://w3c.github.io/webrtc-pc/#set-description + virtual void OnTrack( + rtc::scoped_refptr transceiver) {} + + // Called when signaling indicates that media will no longer be received on a + // track. + // With Plan B semantics, the given receiver will have been removed from the + // PeerConnection and the track muted. + // With Unified Plan semantics, the receiver will remain but the transceiver + // will have changed direction to either sendonly or inactive. + // https://w3c.github.io/webrtc-pc/#process-remote-track-removal + // TODO(hbos,deadbeef): Make pure virtual when all subclasses implement it. + virtual void OnRemoveTrack( + rtc::scoped_refptr receiver) {} + + // Called when an interesting usage is detected by WebRTC. + // An appropriate action is to add information about the context of the + // PeerConnection and write the event to some kind of "interesting events" + // log function. + // The heuristics for defining what constitutes "interesting" are + // implementation-defined. + virtual void OnInterestingUsage(int usage_pattern) {} +}; + +// PeerConnectionDependencies holds all of PeerConnections dependencies. +// A dependency is distinct from a configuration as it defines significant +// executable code that can be provided by a user of the API. +// +// All new dependencies should be added as a unique_ptr to allow the +// PeerConnection object to be the definitive owner of the dependencies +// lifetime making injection safer. +struct PeerConnectionDependencies final { + explicit PeerConnectionDependencies(PeerConnectionObserver* observer_in); + // This object is not copyable or assignable. + PeerConnectionDependencies(const PeerConnectionDependencies&) = delete; + PeerConnectionDependencies& operator=(const PeerConnectionDependencies&) = + delete; + // This object is only moveable. + PeerConnectionDependencies(PeerConnectionDependencies&&); + PeerConnectionDependencies& operator=(PeerConnectionDependencies&&) = default; + ~PeerConnectionDependencies(); + // Mandatory dependencies + PeerConnectionObserver* observer = nullptr; + // Optional dependencies + std::unique_ptr allocator; + std::unique_ptr cert_generator; + std::unique_ptr tls_cert_verifier; +}; + +// PeerConnectionFactoryDependencies holds all of the PeerConnectionFactory +// dependencies. All new dependencies should be added here instead of +// overloading the function. This simplifies dependency injection and makes it +// clear which are mandatory and optional. If possible please allow the peer +// connection factory to take ownership of the dependency by adding a unique_ptr +// to this structure. +struct PeerConnectionFactoryDependencies final { + PeerConnectionFactoryDependencies(); + // This object is not copyable or assignable. + PeerConnectionFactoryDependencies(const PeerConnectionFactoryDependencies&) = + delete; + PeerConnectionFactoryDependencies& operator=( + const PeerConnectionFactoryDependencies&) = delete; + // This object is only moveable. + PeerConnectionFactoryDependencies(PeerConnectionFactoryDependencies&&); + PeerConnectionFactoryDependencies& operator=( + PeerConnectionFactoryDependencies&&) = default; + ~PeerConnectionFactoryDependencies(); + + // Optional dependencies + rtc::Thread* network_thread = nullptr; + rtc::Thread* worker_thread = nullptr; + rtc::Thread* signaling_thread = nullptr; + std::unique_ptr media_engine; + std::unique_ptr call_factory; + std::unique_ptr event_log_factory; + std::unique_ptr fec_controller_factory; + std::unique_ptr network_controller_factory; +}; + +// PeerConnectionFactoryInterface is the factory interface used for creating +// PeerConnection, MediaStream and MediaStreamTrack objects. +// +// The simplest method for obtaiing one, CreatePeerConnectionFactory will +// create the required libjingle threads, socket and network manager factory +// classes for networking if none are provided, though it requires that the +// application runs a message loop on the thread that called the method (see +// explanation below) +// +// If an application decides to provide its own threads and/or implementation +// of networking classes, it should use the alternate +// CreatePeerConnectionFactory method which accepts threads as input, and use +// the CreatePeerConnection version that takes a PortAllocator as an argument. +class PeerConnectionFactoryInterface : public rtc::RefCountInterface { + public: + class Options { + public: + Options() : crypto_options(rtc::CryptoOptions::NoGcm()) {} + + // If set to true, created PeerConnections won't enforce any SRTP + // requirement, allowing unsecured media. Should only be used for + // testing/debugging. + bool disable_encryption = false; + + // Deprecated. The only effect of setting this to true is that + // CreateDataChannel will fail, which is not that useful. + bool disable_sctp_data_channels = false; + + // If set to true, any platform-supported network monitoring capability + // won't be used, and instead networks will only be updated via polling. + // + // This only has an effect if a PeerConnection is created with the default + // PortAllocator implementation. + bool disable_network_monitor = false; + + // Sets the network types to ignore. For instance, calling this with + // ADAPTER_TYPE_ETHERNET | ADAPTER_TYPE_LOOPBACK will ignore Ethernet and + // loopback interfaces. + int network_ignore_mask = rtc::kDefaultNetworkIgnoreMask; + + // Sets the maximum supported protocol version. The highest version + // supported by both ends will be used for the connection, i.e. if one + // party supports DTLS 1.0 and the other DTLS 1.2, DTLS 1.0 will be used. + rtc::SSLProtocolVersion ssl_max_version = rtc::SSL_PROTOCOL_DTLS_12; + + // Sets crypto related options, e.g. enabled cipher suites. + rtc::CryptoOptions crypto_options; + }; + + // Set the options to be used for subsequently created PeerConnections. + virtual void SetOptions(const Options& options) = 0; + + // The preferred way to create a new peer connection. Simply provide the + // configuration and a PeerConnectionDependencies structure. + // TODO(benwright): Make pure virtual once downstream mock PC factory classes + // are updated. + virtual rtc::scoped_refptr CreatePeerConnection( + const PeerConnectionInterface::RTCConfiguration& configuration, + PeerConnectionDependencies dependencies); + + // Deprecated; |allocator| and |cert_generator| may be null, in which case + // default implementations will be used. + // + // |observer| must not be null. + // + // Note that this method does not take ownership of |observer|; it's the + // responsibility of the caller to delete it. It can be safely deleted after + // Close has been called on the returned PeerConnection, which ensures no + // more observer callbacks will be invoked. + virtual rtc::scoped_refptr CreatePeerConnection( + const PeerConnectionInterface::RTCConfiguration& configuration, + std::unique_ptr allocator, + std::unique_ptr cert_generator, + PeerConnectionObserver* observer); + + // Deprecated; should use RTCConfiguration for everything that previously + // used constraints. + virtual rtc::scoped_refptr CreatePeerConnection( + const PeerConnectionInterface::RTCConfiguration& configuration, + const MediaConstraintsInterface* constraints, + std::unique_ptr allocator, + std::unique_ptr cert_generator, + PeerConnectionObserver* observer); + + // Returns the capabilities of an RTP sender of type |kind|. + // If for some reason you pass in MEDIA_TYPE_DATA, returns an empty structure. + // TODO(orphis): Make pure virtual when all subclasses implement it. + virtual RtpCapabilities GetRtpSenderCapabilities( + cricket::MediaType kind) const; + + // Returns the capabilities of an RTP receiver of type |kind|. + // If for some reason you pass in MEDIA_TYPE_DATA, returns an empty structure. + // TODO(orphis): Make pure virtual when all subclasses implement it. + virtual RtpCapabilities GetRtpReceiverCapabilities( + cricket::MediaType kind) const; + + virtual rtc::scoped_refptr CreateLocalMediaStream( + const std::string& stream_id) = 0; + + // Creates an AudioSourceInterface. + // |options| decides audio processing settings. + virtual rtc::scoped_refptr CreateAudioSource( + const cricket::AudioOptions& options) = 0; + + // Creates a VideoTrackSourceInterface from |capturer|. + // TODO(deadbeef): We should aim to remove cricket::VideoCapturer from the + // API. It's mainly used as a wrapper around webrtc's provided + // platform-specific capturers, but these should be refactored to use + // VideoTrackSourceInterface directly. + // TODO(deadbeef): Make pure virtual once downstream mock PC factory classes + // are updated. + virtual rtc::scoped_refptr CreateVideoSource( + std::unique_ptr capturer); + + // A video source creator that allows selection of resolution and frame rate. + // |constraints| decides video resolution and frame rate but can be null. + // In the null case, use the version above. + // + // |constraints| is only used for the invocation of this method, and can + // safely be destroyed afterwards. + virtual rtc::scoped_refptr CreateVideoSource( + std::unique_ptr capturer, + const MediaConstraintsInterface* constraints); + + // Deprecated; please use the versions that take unique_ptrs above. + // TODO(deadbeef): Remove these once safe to do so. + virtual rtc::scoped_refptr CreateVideoSource( + cricket::VideoCapturer* capturer); + virtual rtc::scoped_refptr CreateVideoSource( + cricket::VideoCapturer* capturer, + const MediaConstraintsInterface* constraints); + + // Creates a new local VideoTrack. The same |source| can be used in several + // tracks. + virtual rtc::scoped_refptr CreateVideoTrack( + const std::string& label, + VideoTrackSourceInterface* source) = 0; + + // Creates an new AudioTrack. At the moment |source| can be null. + virtual rtc::scoped_refptr CreateAudioTrack( + const std::string& label, + AudioSourceInterface* source) = 0; + + // Starts AEC dump using existing file. Takes ownership of |file| and passes + // it on to VoiceEngine (via other objects) immediately, which will take + // the ownerhip. If the operation fails, the file will be closed. + // A maximum file size in bytes can be specified. When the file size limit is + // reached, logging is stopped automatically. If max_size_bytes is set to a + // value <= 0, no limit will be used, and logging will continue until the + // StopAecDump function is called. + virtual bool StartAecDump(rtc::PlatformFile file, int64_t max_size_bytes) = 0; + + // Stops logging the AEC dump. + virtual void StopAecDump() = 0; + + protected: + // Dtor and ctor protected as objects shouldn't be created or deleted via + // this interface. + PeerConnectionFactoryInterface() {} + ~PeerConnectionFactoryInterface() override = default; +}; + +// Create a new instance of PeerConnectionFactoryInterface. +// +// This method relies on the thread it's called on as the "signaling thread" +// for the PeerConnectionFactory it creates. +// +// As such, if the current thread is not already running an rtc::Thread message +// loop, an application using this method must eventually either call +// rtc::Thread::Current()->Run(), or call +// rtc::Thread::Current()->ProcessMessages() within the application's own +// message loop. +rtc::scoped_refptr CreatePeerConnectionFactory( + rtc::scoped_refptr audio_encoder_factory, + rtc::scoped_refptr audio_decoder_factory); + +// Create a new instance of PeerConnectionFactoryInterface. +// +// |network_thread|, |worker_thread| and |signaling_thread| are +// the only mandatory parameters. +// +// If non-null, a reference is added to |default_adm|, and ownership of +// |video_encoder_factory| and |video_decoder_factory| is transferred to the +// returned factory. +// TODO(deadbeef): Use rtc::scoped_refptr<> and std::unique_ptr<> to make this +// ownership transfer and ref counting more obvious. +rtc::scoped_refptr CreatePeerConnectionFactory( + rtc::Thread* network_thread, + rtc::Thread* worker_thread, + rtc::Thread* signaling_thread, + AudioDeviceModule* default_adm, + rtc::scoped_refptr audio_encoder_factory, + rtc::scoped_refptr audio_decoder_factory, + cricket::WebRtcVideoEncoderFactory* video_encoder_factory, + cricket::WebRtcVideoDecoderFactory* video_decoder_factory); + +// Create a new instance of PeerConnectionFactoryInterface with optional +// external audio mixed and audio processing modules. +// +// If |audio_mixer| is null, an internal audio mixer will be created and used. +// If |audio_processing| is null, an internal audio processing module will be +// created and used. +rtc::scoped_refptr CreatePeerConnectionFactory( + rtc::Thread* network_thread, + rtc::Thread* worker_thread, + rtc::Thread* signaling_thread, + AudioDeviceModule* default_adm, + rtc::scoped_refptr audio_encoder_factory, + rtc::scoped_refptr audio_decoder_factory, + cricket::WebRtcVideoEncoderFactory* video_encoder_factory, + cricket::WebRtcVideoDecoderFactory* video_decoder_factory, + rtc::scoped_refptr audio_mixer, + rtc::scoped_refptr audio_processing); + +// Create a new instance of PeerConnectionFactoryInterface with optional +// external audio mixer, audio processing, and fec controller modules. +// +// If |audio_mixer| is null, an internal audio mixer will be created and used. +// If |audio_processing| is null, an internal audio processing module will be +// created and used. +// If |fec_controller_factory| is null, an internal fec controller module will +// be created and used. +// If |network_controller_factory| is provided, it will be used if enabled via +// field trial. +rtc::scoped_refptr CreatePeerConnectionFactory( + rtc::Thread* network_thread, + rtc::Thread* worker_thread, + rtc::Thread* signaling_thread, + AudioDeviceModule* default_adm, + rtc::scoped_refptr audio_encoder_factory, + rtc::scoped_refptr audio_decoder_factory, + cricket::WebRtcVideoEncoderFactory* video_encoder_factory, + cricket::WebRtcVideoDecoderFactory* video_decoder_factory, + rtc::scoped_refptr audio_mixer, + rtc::scoped_refptr audio_processing, + std::unique_ptr fec_controller_factory, + std::unique_ptr + network_controller_factory = nullptr); + +// Create a new instance of PeerConnectionFactoryInterface with optional video +// codec factories. These video factories represents all video codecs, i.e. no +// extra internal video codecs will be added. +// When building WebRTC with rtc_use_builtin_sw_codecs = false, this is the +// only available CreatePeerConnectionFactory overload. +rtc::scoped_refptr CreatePeerConnectionFactory( + rtc::Thread* network_thread, + rtc::Thread* worker_thread, + rtc::Thread* signaling_thread, + rtc::scoped_refptr default_adm, + rtc::scoped_refptr audio_encoder_factory, + rtc::scoped_refptr audio_decoder_factory, + std::unique_ptr video_encoder_factory, + std::unique_ptr video_decoder_factory, + rtc::scoped_refptr audio_mixer, + rtc::scoped_refptr audio_processing); + +// Create a new instance of PeerConnectionFactoryInterface with external audio +// mixer. +// +// If |audio_mixer| is null, an internal audio mixer will be created and used. +rtc::scoped_refptr +CreatePeerConnectionFactoryWithAudioMixer( + rtc::Thread* network_thread, + rtc::Thread* worker_thread, + rtc::Thread* signaling_thread, + AudioDeviceModule* default_adm, + rtc::scoped_refptr audio_encoder_factory, + rtc::scoped_refptr audio_decoder_factory, + cricket::WebRtcVideoEncoderFactory* video_encoder_factory, + cricket::WebRtcVideoDecoderFactory* video_decoder_factory, + rtc::scoped_refptr audio_mixer); + +// Create a new instance of PeerConnectionFactoryInterface. +// Same thread is used as worker and network thread. +inline rtc::scoped_refptr +CreatePeerConnectionFactory( + rtc::Thread* worker_and_network_thread, + rtc::Thread* signaling_thread, + AudioDeviceModule* default_adm, + rtc::scoped_refptr audio_encoder_factory, + rtc::scoped_refptr audio_decoder_factory, + cricket::WebRtcVideoEncoderFactory* video_encoder_factory, + cricket::WebRtcVideoDecoderFactory* video_decoder_factory) { + return CreatePeerConnectionFactory( + worker_and_network_thread, worker_and_network_thread, signaling_thread, + default_adm, audio_encoder_factory, audio_decoder_factory, + video_encoder_factory, video_decoder_factory); +} + +// This is a lower-level version of the CreatePeerConnectionFactory functions +// above. It's implemented in the "peerconnection" build target, whereas the +// above methods are only implemented in the broader "libjingle_peerconnection" +// build target, which pulls in the implementations of every module webrtc may +// use. +// +// If an application knows it will only require certain modules, it can reduce +// webrtc's impact on its binary size by depending only on the "peerconnection" +// target and the modules the application requires, using +// CreateModularPeerConnectionFactory instead of one of the +// CreatePeerConnectionFactory methods above. For example, if an application +// only uses WebRTC for audio, it can pass in null pointers for the +// video-specific interfaces, and omit the corresponding modules from its +// build. +// +// If |network_thread| or |worker_thread| are null, the PeerConnectionFactory +// will create the necessary thread internally. If |signaling_thread| is null, +// the PeerConnectionFactory will use the thread on which this method is called +// as the signaling thread, wrapping it in an rtc::Thread object if needed. +// +// If non-null, a reference is added to |default_adm|, and ownership of +// |video_encoder_factory| and |video_decoder_factory| is transferred to the +// returned factory. +// +// If |audio_mixer| is null, an internal audio mixer will be created and used. +// +// TODO(deadbeef): Use rtc::scoped_refptr<> and std::unique_ptr<> to make this +// ownership transfer and ref counting more obvious. +// +// TODO(deadbeef): Encapsulate these modules in a struct, so that when a new +// module is inevitably exposed, we can just add a field to the struct instead +// of adding a whole new CreateModularPeerConnectionFactory overload. +rtc::scoped_refptr +CreateModularPeerConnectionFactory( + rtc::Thread* network_thread, + rtc::Thread* worker_thread, + rtc::Thread* signaling_thread, + std::unique_ptr media_engine, + std::unique_ptr call_factory, + std::unique_ptr event_log_factory); + +rtc::scoped_refptr +CreateModularPeerConnectionFactory( + rtc::Thread* network_thread, + rtc::Thread* worker_thread, + rtc::Thread* signaling_thread, + std::unique_ptr media_engine, + std::unique_ptr call_factory, + std::unique_ptr event_log_factory, + std::unique_ptr fec_controller_factory, + std::unique_ptr + network_controller_factory = nullptr); + +rtc::scoped_refptr +CreateModularPeerConnectionFactory( + PeerConnectionFactoryDependencies dependencies); + +} // namespace webrtc + +#endif // API_PEERCONNECTIONINTERFACE_H_ diff --git a/WebRtcNative/include/webrtc/api/peerconnectionproxy.h b/WebRtcNative/include/webrtc/api/peerconnectionproxy.h new file mode 100644 index 00000000..7fc5e171 --- /dev/null +++ b/WebRtcNative/include/webrtc/api/peerconnectionproxy.h @@ -0,0 +1,148 @@ +/* + * Copyright 2012 The WebRTC project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + +#ifndef API_PEERCONNECTIONPROXY_H_ +#define API_PEERCONNECTIONPROXY_H_ + +#include +#include +#include + +#include "api/peerconnectioninterface.h" +#include "api/proxy.h" + +namespace webrtc { + +// TODO(deadbeef): Move this to .cc file and out of api/. What threads methods +// are called on is an implementation detail. +BEGIN_SIGNALING_PROXY_MAP(PeerConnection) +PROXY_SIGNALING_THREAD_DESTRUCTOR() +PROXY_METHOD0(rtc::scoped_refptr, local_streams) +PROXY_METHOD0(rtc::scoped_refptr, remote_streams) +PROXY_METHOD1(bool, AddStream, MediaStreamInterface*) +PROXY_METHOD1(void, RemoveStream, MediaStreamInterface*) +PROXY_METHOD2(RTCErrorOr>, + AddTrack, + rtc::scoped_refptr, + const std::vector&); +PROXY_METHOD1(bool, RemoveTrack, RtpSenderInterface*) +PROXY_METHOD1(RTCErrorOr>, + AddTransceiver, + rtc::scoped_refptr) +PROXY_METHOD2(RTCErrorOr>, + AddTransceiver, + rtc::scoped_refptr, + const RtpTransceiverInit&) +PROXY_METHOD1(RTCErrorOr>, + AddTransceiver, + cricket::MediaType) +PROXY_METHOD2(RTCErrorOr>, + AddTransceiver, + cricket::MediaType, + const RtpTransceiverInit&) +PROXY_METHOD2(rtc::scoped_refptr, + CreateSender, + const std::string&, + const std::string&) +PROXY_CONSTMETHOD0(std::vector>, + GetSenders) +PROXY_CONSTMETHOD0(std::vector>, + GetReceivers) +PROXY_CONSTMETHOD0(std::vector>, + GetTransceivers) +PROXY_METHOD3(bool, + GetStats, + StatsObserver*, + MediaStreamTrackInterface*, + StatsOutputLevel) +PROXY_METHOD1(void, GetStats, RTCStatsCollectorCallback*) +PROXY_METHOD2(void, + GetStats, + rtc::scoped_refptr, + rtc::scoped_refptr); +PROXY_METHOD2(void, + GetStats, + rtc::scoped_refptr, + rtc::scoped_refptr); +PROXY_METHOD2(rtc::scoped_refptr, + CreateDataChannel, + const std::string&, + const DataChannelInit*) +PROXY_CONSTMETHOD0(const SessionDescriptionInterface*, local_description) +PROXY_CONSTMETHOD0(const SessionDescriptionInterface*, remote_description) +PROXY_CONSTMETHOD0(const SessionDescriptionInterface*, + pending_local_description) +PROXY_CONSTMETHOD0(const SessionDescriptionInterface*, + pending_remote_description) +PROXY_CONSTMETHOD0(const SessionDescriptionInterface*, + current_local_description) +PROXY_CONSTMETHOD0(const SessionDescriptionInterface*, + current_remote_description) +PROXY_METHOD2(void, + CreateOffer, + CreateSessionDescriptionObserver*, + const MediaConstraintsInterface*) +PROXY_METHOD2(void, + CreateAnswer, + CreateSessionDescriptionObserver*, + const MediaConstraintsInterface*) +PROXY_METHOD2(void, + CreateOffer, + CreateSessionDescriptionObserver*, + const RTCOfferAnswerOptions&) +PROXY_METHOD2(void, + CreateAnswer, + CreateSessionDescriptionObserver*, + const RTCOfferAnswerOptions&) +PROXY_METHOD2(void, + SetLocalDescription, + SetSessionDescriptionObserver*, + SessionDescriptionInterface*) +PROXY_METHOD2(void, + SetRemoteDescription, + SetSessionDescriptionObserver*, + SessionDescriptionInterface*) +PROXY_METHOD2(void, + SetRemoteDescription, + std::unique_ptr, + rtc::scoped_refptr); +PROXY_METHOD0(PeerConnectionInterface::RTCConfiguration, GetConfiguration); +PROXY_METHOD2(bool, + SetConfiguration, + const PeerConnectionInterface::RTCConfiguration&, + RTCError*); +PROXY_METHOD1(bool, + SetConfiguration, + const PeerConnectionInterface::RTCConfiguration&); +PROXY_METHOD1(bool, AddIceCandidate, const IceCandidateInterface*) +PROXY_METHOD1(bool, + RemoveIceCandidates, + const std::vector&); +PROXY_METHOD1(void, SetAudioPlayout, bool) +PROXY_METHOD1(void, SetAudioRecording, bool) +PROXY_METHOD1(RTCError, SetBitrate, const BitrateSettings&); +PROXY_METHOD1(void, + SetBitrateAllocationStrategy, + std::unique_ptr); +PROXY_METHOD0(SignalingState, signaling_state) +PROXY_METHOD0(IceConnectionState, ice_connection_state) +PROXY_METHOD0(IceGatheringState, ice_gathering_state) +PROXY_METHOD2(bool, StartRtcEventLog, rtc::PlatformFile, int64_t) +PROXY_METHOD2(bool, + StartRtcEventLog, + std::unique_ptr, + int64_t); +PROXY_METHOD0(void, StopRtcEventLog) +PROXY_METHOD0(void, Close) +END_PROXY_MAP() + +} // namespace webrtc + +#endif // API_PEERCONNECTIONPROXY_H_ diff --git a/WebRtcNative/include/webrtc/api/proxy.h b/WebRtcNative/include/webrtc/api/proxy.h new file mode 100644 index 00000000..c8962efe --- /dev/null +++ b/WebRtcNative/include/webrtc/api/proxy.h @@ -0,0 +1,588 @@ +/* + * Copyright 2013 The WebRTC project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + +// This file contains Macros for creating proxies for webrtc MediaStream and +// PeerConnection classes. +// TODO(deadbeef): Move this to pc/; this is part of the implementation. + +// +// Example usage: +// +// class TestInterface : public rtc::RefCountInterface { +// public: +// std::string FooA() = 0; +// std::string FooB(bool arg1) const = 0; +// std::string FooC(bool arg1) = 0; +// }; +// +// Note that return types can not be a const reference. +// +// class Test : public TestInterface { +// ... implementation of the interface. +// }; +// +// BEGIN_PROXY_MAP(Test) +// PROXY_SIGNALING_THREAD_DESTRUCTOR() +// PROXY_METHOD0(std::string, FooA) +// PROXY_CONSTMETHOD1(std::string, FooB, arg1) +// PROXY_WORKER_METHOD1(std::string, FooC, arg1) +// END_PROXY_MAP() +// +// Where the destructor and first two methods are invoked on the signaling +// thread, and the third is invoked on the worker thread. +// +// The proxy can be created using +// +// TestProxy::Create(Thread* signaling_thread, Thread* worker_thread, +// TestInterface*). +// +// The variant defined with BEGIN_SIGNALING_PROXY_MAP is unaware of +// the worker thread, and invokes all methods on the signaling thread. +// +// The variant defined with BEGIN_OWNED_PROXY_MAP does not use +// refcounting, and instead just takes ownership of the object being proxied. + +#ifndef API_PROXY_H_ +#define API_PROXY_H_ + +#include +#include + +#include "rtc_base/event.h" +#include "rtc_base/refcountedobject.h" +#include "rtc_base/thread.h" + +namespace webrtc { + +template +class ReturnType { + public: + template + void Invoke(C* c, M m) { + r_ = (c->*m)(); + } + template + void Invoke(C* c, M m, T1 a1) { + r_ = (c->*m)(std::move(a1)); + } + template + void Invoke(C* c, M m, T1 a1, T2 a2) { + r_ = (c->*m)(std::move(a1), std::move(a2)); + } + template + void Invoke(C* c, M m, T1 a1, T2 a2, T3 a3) { + r_ = (c->*m)(std::move(a1), std::move(a2), std::move(a3)); + } + template + void Invoke(C* c, M m, T1 a1, T2 a2, T3 a3, T4 a4) { + r_ = (c->*m)(std::move(a1), std::move(a2), std::move(a3), std::move(a4)); + } + template + void Invoke(C* c, M m, T1 a1, T2 a2, T3 a3, T4 a4, T5 a5) { + r_ = (c->*m)(std::move(a1), std::move(a2), std::move(a3), std::move(a4), + std::move(a5)); + } + + R moved_result() { return std::move(r_); } + + private: + R r_; +}; + +template <> +class ReturnType { + public: + template + void Invoke(C* c, M m) { + (c->*m)(); + } + template + void Invoke(C* c, M m, T1 a1) { + (c->*m)(std::move(a1)); + } + template + void Invoke(C* c, M m, T1 a1, T2 a2) { + (c->*m)(std::move(a1), std::move(a2)); + } + template + void Invoke(C* c, M m, T1 a1, T2 a2, T3 a3) { + (c->*m)(std::move(a1), std::move(a2), std::move(a3)); + } + + void moved_result() {} +}; + +namespace internal { + +class SynchronousMethodCall : public rtc::MessageData, + public rtc::MessageHandler { + public: + explicit SynchronousMethodCall(rtc::MessageHandler* proxy); + ~SynchronousMethodCall() override; + + void Invoke(const rtc::Location& posted_from, rtc::Thread* t); + + private: + void OnMessage(rtc::Message*) override; + + std::unique_ptr e_; + rtc::MessageHandler* proxy_; +}; + +} // namespace internal + +template +class MethodCall0 : public rtc::Message, public rtc::MessageHandler { + public: + typedef R (C::*Method)(); + MethodCall0(C* c, Method m) : c_(c), m_(m) {} + + R Marshal(const rtc::Location& posted_from, rtc::Thread* t) { + internal::SynchronousMethodCall(this).Invoke(posted_from, t); + return r_.moved_result(); + } + + private: + void OnMessage(rtc::Message*) { r_.Invoke(c_, m_); } + + C* c_; + Method m_; + ReturnType r_; +}; + +template +class ConstMethodCall0 : public rtc::Message, public rtc::MessageHandler { + public: + typedef R (C::*Method)() const; + ConstMethodCall0(C* c, Method m) : c_(c), m_(m) {} + + R Marshal(const rtc::Location& posted_from, rtc::Thread* t) { + internal::SynchronousMethodCall(this).Invoke(posted_from, t); + return r_.moved_result(); + } + + private: + void OnMessage(rtc::Message*) { r_.Invoke(c_, m_); } + + C* c_; + Method m_; + ReturnType r_; +}; + +template +class MethodCall1 : public rtc::Message, public rtc::MessageHandler { + public: + typedef R (C::*Method)(T1 a1); + MethodCall1(C* c, Method m, T1 a1) : c_(c), m_(m), a1_(std::move(a1)) {} + + R Marshal(const rtc::Location& posted_from, rtc::Thread* t) { + internal::SynchronousMethodCall(this).Invoke(posted_from, t); + return r_.moved_result(); + } + + private: + void OnMessage(rtc::Message*) { r_.Invoke(c_, m_, std::move(a1_)); } + + C* c_; + Method m_; + ReturnType r_; + T1 a1_; +}; + +template +class ConstMethodCall1 : public rtc::Message, public rtc::MessageHandler { + public: + typedef R (C::*Method)(T1 a1) const; + ConstMethodCall1(C* c, Method m, T1 a1) : c_(c), m_(m), a1_(std::move(a1)) {} + + R Marshal(const rtc::Location& posted_from, rtc::Thread* t) { + internal::SynchronousMethodCall(this).Invoke(posted_from, t); + return r_.moved_result(); + } + + private: + void OnMessage(rtc::Message*) { r_.Invoke(c_, m_, std::move(a1_)); } + + C* c_; + Method m_; + ReturnType r_; + T1 a1_; +}; + +template +class MethodCall2 : public rtc::Message, public rtc::MessageHandler { + public: + typedef R (C::*Method)(T1 a1, T2 a2); + MethodCall2(C* c, Method m, T1 a1, T2 a2) + : c_(c), m_(m), a1_(std::move(a1)), a2_(std::move(a2)) {} + + R Marshal(const rtc::Location& posted_from, rtc::Thread* t) { + internal::SynchronousMethodCall(this).Invoke(posted_from, t); + return r_.moved_result(); + } + + private: + void OnMessage(rtc::Message*) { + r_.Invoke(c_, m_, std::move(a1_), std::move(a2_)); + } + + C* c_; + Method m_; + ReturnType r_; + T1 a1_; + T2 a2_; +}; + +template +class MethodCall3 : public rtc::Message, public rtc::MessageHandler { + public: + typedef R (C::*Method)(T1 a1, T2 a2, T3 a3); + MethodCall3(C* c, Method m, T1 a1, T2 a2, T3 a3) + : c_(c), + m_(m), + a1_(std::move(a1)), + a2_(std::move(a2)), + a3_(std::move(a3)) {} + + R Marshal(const rtc::Location& posted_from, rtc::Thread* t) { + internal::SynchronousMethodCall(this).Invoke(posted_from, t); + return r_.moved_result(); + } + + private: + void OnMessage(rtc::Message*) { + r_.Invoke(c_, m_, std::move(a1_), std::move(a2_), std::move(a3_)); + } + + C* c_; + Method m_; + ReturnType r_; + T1 a1_; + T2 a2_; + T3 a3_; +}; + +template +class MethodCall4 : public rtc::Message, public rtc::MessageHandler { + public: + typedef R (C::*Method)(T1 a1, T2 a2, T3 a3, T4 a4); + MethodCall4(C* c, Method m, T1 a1, T2 a2, T3 a3, T4 a4) + : c_(c), + m_(m), + a1_(std::move(a1)), + a2_(std::move(a2)), + a3_(std::move(a3)), + a4_(std::move(a4)) {} + + R Marshal(const rtc::Location& posted_from, rtc::Thread* t) { + internal::SynchronousMethodCall(this).Invoke(posted_from, t); + return r_.moved_result(); + } + + private: + void OnMessage(rtc::Message*) { + r_.Invoke(c_, m_, std::move(a1_), std::move(a2_), std::move(a3_), + std::move(a4_)); + } + + C* c_; + Method m_; + ReturnType r_; + T1 a1_; + T2 a2_; + T3 a3_; + T4 a4_; +}; + +template +class MethodCall5 : public rtc::Message, public rtc::MessageHandler { + public: + typedef R (C::*Method)(T1 a1, T2 a2, T3 a3, T4 a4, T5 a5); + MethodCall5(C* c, Method m, T1 a1, T2 a2, T3 a3, T4 a4, T5 a5) + : c_(c), + m_(m), + a1_(std::move(a1)), + a2_(std::move(a2)), + a3_(std::move(a3)), + a4_(std::move(a4)), + a5_(std::move(a5)) {} + + R Marshal(const rtc::Location& posted_from, rtc::Thread* t) { + internal::SynchronousMethodCall(this).Invoke(posted_from, t); + return r_.moved_result(); + } + + private: + void OnMessage(rtc::Message*) { + r_.Invoke(c_, m_, std::move(a1_), std::move(a2_), std::move(a3_), + std::move(a4_), std::move(a5_)); + } + + C* c_; + Method m_; + ReturnType r_; + T1 a1_; + T2 a2_; + T3 a3_; + T4 a4_; + T5 a5_; +}; + +// Helper macros to reduce code duplication. +#define PROXY_MAP_BOILERPLATE(c) \ + template \ + class c##ProxyWithInternal; \ + typedef c##ProxyWithInternal c##Proxy; \ + template \ + class c##ProxyWithInternal : public c##Interface { \ + protected: \ + typedef c##Interface C; \ + \ + public: \ + const INTERNAL_CLASS* internal() const { return c_; } \ + INTERNAL_CLASS* internal() { return c_; } + +// clang-format off +// clang-format would put the semicolon alone, +// leading to a presubmit error (cpplint.py) +#define END_PROXY_MAP() \ + }; +// clang-format on + +#define SIGNALING_PROXY_MAP_BOILERPLATE(c) \ + protected: \ + c##ProxyWithInternal(rtc::Thread* signaling_thread, INTERNAL_CLASS* c) \ + : signaling_thread_(signaling_thread), c_(c) {} \ + \ + private: \ + mutable rtc::Thread* signaling_thread_; + +#define WORKER_PROXY_MAP_BOILERPLATE(c) \ + protected: \ + c##ProxyWithInternal(rtc::Thread* signaling_thread, \ + rtc::Thread* worker_thread, INTERNAL_CLASS* c) \ + : signaling_thread_(signaling_thread), \ + worker_thread_(worker_thread), \ + c_(c) {} \ + \ + private: \ + mutable rtc::Thread* signaling_thread_; \ + mutable rtc::Thread* worker_thread_; + +// Note that the destructor is protected so that the proxy can only be +// destroyed via RefCountInterface. +#define REFCOUNTED_PROXY_MAP_BOILERPLATE(c) \ + protected: \ + ~c##ProxyWithInternal() { \ + MethodCall0 call( \ + this, &c##ProxyWithInternal::DestroyInternal); \ + call.Marshal(RTC_FROM_HERE, destructor_thread()); \ + } \ + \ + private: \ + void DestroyInternal() { c_ = nullptr; } \ + rtc::scoped_refptr c_; + +// Note: This doesn't use a unique_ptr, because it intends to handle a corner +// case where an object's deletion triggers a callback that calls back into +// this proxy object. If relying on a unique_ptr to delete the object, its +// inner pointer would be set to null before this reentrant callback would have +// a chance to run, resulting in a segfault. +#define OWNED_PROXY_MAP_BOILERPLATE(c) \ + public: \ + ~c##ProxyWithInternal() { \ + MethodCall0 call( \ + this, &c##ProxyWithInternal::DestroyInternal); \ + call.Marshal(RTC_FROM_HERE, destructor_thread()); \ + } \ + \ + private: \ + void DestroyInternal() { delete c_; } \ + INTERNAL_CLASS* c_; + +#define BEGIN_SIGNALING_PROXY_MAP(c) \ + PROXY_MAP_BOILERPLATE(c) \ + SIGNALING_PROXY_MAP_BOILERPLATE(c) \ + REFCOUNTED_PROXY_MAP_BOILERPLATE(c) \ + public: \ + static rtc::scoped_refptr Create( \ + rtc::Thread* signaling_thread, INTERNAL_CLASS* c) { \ + return new rtc::RefCountedObject(signaling_thread, \ + c); \ + } + +#define BEGIN_PROXY_MAP(c) \ + PROXY_MAP_BOILERPLATE(c) \ + WORKER_PROXY_MAP_BOILERPLATE(c) \ + REFCOUNTED_PROXY_MAP_BOILERPLATE(c) \ + public: \ + static rtc::scoped_refptr Create( \ + rtc::Thread* signaling_thread, rtc::Thread* worker_thread, \ + INTERNAL_CLASS* c) { \ + return new rtc::RefCountedObject(signaling_thread, \ + worker_thread, c); \ + } + +#define BEGIN_OWNED_PROXY_MAP(c) \ + PROXY_MAP_BOILERPLATE(c) \ + WORKER_PROXY_MAP_BOILERPLATE(c) \ + OWNED_PROXY_MAP_BOILERPLATE(c) \ + public: \ + static std::unique_ptr Create( \ + rtc::Thread* signaling_thread, rtc::Thread* worker_thread, \ + std::unique_ptr c) { \ + return std::unique_ptr(new c##ProxyWithInternal( \ + signaling_thread, worker_thread, c.release())); \ + } + +#define PROXY_SIGNALING_THREAD_DESTRUCTOR() \ + private: \ + rtc::Thread* destructor_thread() const { return signaling_thread_; } \ + \ + public: // NOLINTNEXTLINE + +#define PROXY_WORKER_THREAD_DESTRUCTOR() \ + private: \ + rtc::Thread* destructor_thread() const { return worker_thread_; } \ + \ + public: // NOLINTNEXTLINE + +#define PROXY_METHOD0(r, method) \ + r method() override { \ + MethodCall0 call(c_, &C::method); \ + return call.Marshal(RTC_FROM_HERE, signaling_thread_); \ + } + +#define PROXY_CONSTMETHOD0(r, method) \ + r method() const override { \ + ConstMethodCall0 call(c_, &C::method); \ + return call.Marshal(RTC_FROM_HERE, signaling_thread_); \ + } + +#define PROXY_METHOD1(r, method, t1) \ + r method(t1 a1) override { \ + MethodCall1 call(c_, &C::method, std::move(a1)); \ + return call.Marshal(RTC_FROM_HERE, signaling_thread_); \ + } + +#define PROXY_CONSTMETHOD1(r, method, t1) \ + r method(t1 a1) const override { \ + ConstMethodCall1 call(c_, &C::method, std::move(a1)); \ + return call.Marshal(RTC_FROM_HERE, signaling_thread_); \ + } + +#define PROXY_METHOD2(r, method, t1, t2) \ + r method(t1 a1, t2 a2) override { \ + MethodCall2 call(c_, &C::method, std::move(a1), \ + std::move(a2)); \ + return call.Marshal(RTC_FROM_HERE, signaling_thread_); \ + } + +#define PROXY_METHOD3(r, method, t1, t2, t3) \ + r method(t1 a1, t2 a2, t3 a3) override { \ + MethodCall3 call(c_, &C::method, std::move(a1), \ + std::move(a2), std::move(a3)); \ + return call.Marshal(RTC_FROM_HERE, signaling_thread_); \ + } + +#define PROXY_METHOD4(r, method, t1, t2, t3, t4) \ + r method(t1 a1, t2 a2, t3 a3, t4 a4) override { \ + MethodCall4 call(c_, &C::method, std::move(a1), \ + std::move(a2), std::move(a3), \ + std::move(a4)); \ + return call.Marshal(RTC_FROM_HERE, signaling_thread_); \ + } + +#define PROXY_METHOD5(r, method, t1, t2, t3, t4, t5) \ + r method(t1 a1, t2 a2, t3 a3, t4 a4, t5 a5) override { \ + MethodCall5 call(c_, &C::method, std::move(a1), \ + std::move(a2), std::move(a3), \ + std::move(a4), std::move(a5)); \ + return call.Marshal(RTC_FROM_HERE, signaling_thread_); \ + } + +// Define methods which should be invoked on the worker thread. +#define PROXY_WORKER_METHOD0(r, method) \ + r method() override { \ + MethodCall0 call(c_, &C::method); \ + return call.Marshal(RTC_FROM_HERE, worker_thread_); \ + } + +#define PROXY_WORKER_CONSTMETHOD0(r, method) \ + r method() const override { \ + ConstMethodCall0 call(c_, &C::method); \ + return call.Marshal(RTC_FROM_HERE, worker_thread_); \ + } + +#define PROXY_WORKER_METHOD1(r, method, t1) \ + r method(t1 a1) override { \ + MethodCall1 call(c_, &C::method, std::move(a1)); \ + return call.Marshal(RTC_FROM_HERE, worker_thread_); \ + } + +#define PROXY_WORKER_CONSTMETHOD1(r, method, t1) \ + r method(t1 a1) const override { \ + ConstMethodCall1 call(c_, &C::method, std::move(a1)); \ + return call.Marshal(RTC_FROM_HERE, worker_thread_); \ + } + +#define PROXY_WORKER_METHOD2(r, method, t1, t2) \ + r method(t1 a1, t2 a2) override { \ + MethodCall2 call(c_, &C::method, std::move(a1), \ + std::move(a2)); \ + return call.Marshal(RTC_FROM_HERE, worker_thread_); \ + } + +#define PROXY_WORKER_CONSTMETHOD2(r, method, t1, t2) \ + r method(t1 a1, t2 a2) const override { \ + ConstMethodCall2 call(c_, &C::method, std::move(a1), \ + std::move(a2)); \ + return call.Marshal(RTC_FROM_HERE, worker_thread_); \ + } + +#define PROXY_WORKER_METHOD3(r, method, t1, t2, t3) \ + r method(t1 a1, t2 a2, t3 a3) override { \ + MethodCall3 call(c_, &C::method, std::move(a1), \ + std::move(a2), std::move(a3)); \ + return call.Marshal(RTC_FROM_HERE, worker_thread_); \ + } + +#define PROXY_WORKER_CONSTMETHOD3(r, method, t1, t2) \ + r method(t1 a1, t2 a2, t3 a3) const override { \ + ConstMethodCall3 call(c_, &C::method, std::move(a1), \ + std::move(a2), std::move(a3)); \ + return call.Marshal(RTC_FROM_HERE, worker_thread_); \ + } + +} // namespace webrtc + +#endif // API_PROXY_H_ diff --git a/WebRtcNative/include/webrtc/api/refcountedbase.h b/WebRtcNative/include/webrtc/api/refcountedbase.h new file mode 100644 index 00000000..8c26efd3 --- /dev/null +++ b/WebRtcNative/include/webrtc/api/refcountedbase.h @@ -0,0 +1,43 @@ +/* + * Copyright 2017 The WebRTC Project Authors. All rights reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ +#ifndef API_REFCOUNTEDBASE_H_ +#define API_REFCOUNTEDBASE_H_ + +#include "rtc_base/constructormagic.h" +#include "rtc_base/refcount.h" +#include "rtc_base/refcounter.h" + +namespace rtc { + +class RefCountedBase { + public: + RefCountedBase() = default; + + void AddRef() const { ref_count_.IncRef(); } + RefCountReleaseStatus Release() const { + const auto status = ref_count_.DecRef(); + if (status == RefCountReleaseStatus::kDroppedLastRef) { + delete this; + } + return status; + } + + protected: + virtual ~RefCountedBase() = default; + + private: + mutable webrtc::webrtc_impl::RefCounter ref_count_{0}; + + RTC_DISALLOW_COPY_AND_ASSIGN(RefCountedBase); +}; + +} // namespace rtc + +#endif // API_REFCOUNTEDBASE_H_ diff --git a/WebRtcNative/include/webrtc/api/rtcerror.h b/WebRtcNative/include/webrtc/api/rtcerror.h new file mode 100644 index 00000000..c87ce916 --- /dev/null +++ b/WebRtcNative/include/webrtc/api/rtcerror.h @@ -0,0 +1,310 @@ +/* + * Copyright 2017 The WebRTC project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + +#ifndef API_RTCERROR_H_ +#define API_RTCERROR_H_ + +#ifdef UNIT_TEST +#include +#endif // UNIT_TEST +#include +#include // For std::move. + +#include "rtc_base/checks.h" +#include "rtc_base/logging.h" + +namespace webrtc { + +// Enumeration to represent distinct classes of errors that an application +// may wish to act upon differently. These roughly map to DOMExceptions or +// RTCError "errorDetailEnum" values in the web API, as described in the +// comments below. +enum class RTCErrorType { + // No error. + NONE, + + // An operation is valid, but currently unsupported. + // Maps to OperationError DOMException. + UNSUPPORTED_OPERATION, + + // A supplied parameter is valid, but currently unsupported. + // Maps to OperationError DOMException. + UNSUPPORTED_PARAMETER, + + // General error indicating that a supplied parameter is invalid. + // Maps to InvalidAccessError or TypeError DOMException depending on context. + INVALID_PARAMETER, + + // Slightly more specific than INVALID_PARAMETER; a parameter's value was + // outside the allowed range. + // Maps to RangeError DOMException. + INVALID_RANGE, + + // Slightly more specific than INVALID_PARAMETER; an error occurred while + // parsing string input. + // Maps to SyntaxError DOMException. + SYNTAX_ERROR, + + // The object does not support this operation in its current state. + // Maps to InvalidStateError DOMException. + INVALID_STATE, + + // An attempt was made to modify the object in an invalid way. + // Maps to InvalidModificationError DOMException. + INVALID_MODIFICATION, + + // An error occurred within an underlying network protocol. + // Maps to NetworkError DOMException. + NETWORK_ERROR, + + // Some resource has been exhausted; file handles, hardware resources, ports, + // etc. + // Maps to OperationError DOMException. + RESOURCE_EXHAUSTED, + + // The operation failed due to an internal error. + // Maps to OperationError DOMException. + INTERNAL_ERROR, +}; + +// Roughly corresponds to RTCError in the web api. Holds an error type, a +// message, and possibly additional information specific to that error. +// +// Doesn't contain anything beyond a type and message now, but will in the +// future as more errors are implemented. +class RTCError { + public: + // Constructors. + + // Creates a "no error" error. + RTCError() {} + explicit RTCError(RTCErrorType type) : type_(type) {} + // For performance, prefer using the constructor that takes a const char* if + // the message is a static string. + RTCError(RTCErrorType type, const char* message) + : type_(type), static_message_(message), have_string_message_(false) {} + RTCError(RTCErrorType type, std::string&& message) + : type_(type), string_message_(message), have_string_message_(true) {} + + // Delete the copy constructor and assignment operator; there aren't any use + // cases where you should need to copy an RTCError, as opposed to moving it. + // Can revisit this decision if use cases arise in the future. + RTCError(const RTCError& other) = delete; + RTCError& operator=(const RTCError& other) = delete; + + // Move constructor and move-assignment operator. + RTCError(RTCError&& other); + RTCError& operator=(RTCError&& other); + + ~RTCError(); + + // Identical to default constructed error. + // + // Preferred over the default constructor for code readability. + static RTCError OK(); + + // Error type. + RTCErrorType type() const { return type_; } + void set_type(RTCErrorType type) { type_ = type; } + + // Human-readable message describing the error. Shouldn't be used for + // anything but logging/diagnostics, since messages are not guaranteed to be + // stable. + const char* message() const; + // For performance, prefer using the method that takes a const char* if the + // message is a static string. + void set_message(const char* message); + void set_message(std::string&& message); + + // Convenience method for situations where you only care whether or not an + // error occurred. + bool ok() const { return type_ == RTCErrorType::NONE; } + + private: + RTCErrorType type_ = RTCErrorType::NONE; + // For performance, we use static strings wherever possible. But in some + // cases the error string may need to be constructed, in which case an + // std::string is used. + union { + const char* static_message_ = ""; + std::string string_message_; + }; + // Whether or not |static_message_| or |string_message_| is being used in the + // above union. + bool have_string_message_ = false; +}; + +// Outputs the error as a friendly string. Update this method when adding a new +// error type. +// +// Only intended to be used for logging/disagnostics. +std::string ToString(RTCErrorType error); + +#ifdef UNIT_TEST +inline std::ostream& operator<<( // no-presubmit-check TODO(webrtc:8982) + std::ostream& stream, // no-presubmit-check TODO(webrtc:8982) + RTCErrorType error) { + return stream << ToString(error); +} +#endif // UNIT_TEST + +// Helper macro that can be used by implementations to create an error with a +// message and log it. |message| should be a string literal or movable +// std::string. +#define LOG_AND_RETURN_ERROR_EX(type, message, severity) \ + { \ + RTC_DCHECK(type != RTCErrorType::NONE); \ + RTC_LOG(severity) << message << " (" << ToString(type) << ")"; \ + return webrtc::RTCError(type, message); \ + } + +#define LOG_AND_RETURN_ERROR(type, message) \ + LOG_AND_RETURN_ERROR_EX(type, message, LS_ERROR) + +// RTCErrorOr is the union of an RTCError object and a T object. RTCErrorOr +// models the concept of an object that is either a usable value, or an error +// Status explaining why such a value is not present. To this end RTCErrorOr +// does not allow its RTCErrorType value to be RTCErrorType::NONE. This is +// enforced by a debug check in most cases. +// +// The primary use-case for RTCErrorOr is as the return value of a function +// which may fail. For example, CreateRtpSender will fail if the parameters +// could not be successfully applied at the media engine level, but if +// successful will return a unique_ptr to an RtpSender. +// +// Example client usage for a RTCErrorOr>: +// +// RTCErrorOr> result = FooFactory::MakeNewFoo(arg); +// if (result.ok()) { +// std::unique_ptr foo = result.ConsumeValue(); +// foo->DoSomethingCool(); +// } else { +// RTC_LOG(LS_ERROR) << result.error(); +// } +// +// Example factory implementation returning RTCErrorOr>: +// +// RTCErrorOr> FooFactory::MakeNewFoo(int arg) { +// if (arg <= 0) { +// return RTCError(RTCErrorType::INVALID_RANGE, "Arg must be positive"); +// } else { +// return std::unique_ptr(new Foo(arg)); +// } +// } +// +template +class RTCErrorOr { + // Used to convert between RTCErrorOr/RtcErrorOr, when an implicit + // conversion from Foo to Bar exists. + template + friend class RTCErrorOr; + + public: + typedef T element_type; + + // Constructs a new RTCErrorOr with RTCErrorType::INTERNAL_ERROR error. This + // is marked 'explicit' to try to catch cases like 'return {};', where people + // think RTCErrorOr> will be initialized with an empty + // vector, instead of a RTCErrorType::INTERNAL_ERROR error. + RTCErrorOr() : error_(RTCErrorType::INTERNAL_ERROR) {} + + // Constructs a new RTCErrorOr with the given non-ok error. After calling + // this constructor, calls to value() will DCHECK-fail. + // + // NOTE: Not explicit - we want to use RTCErrorOr as a return + // value, so it is convenient and sensible to be able to do 'return + // RTCError(...)' when the return type is RTCErrorOr. + // + // REQUIRES: !error.ok(). This requirement is DCHECKed. + RTCErrorOr(RTCError&& error) : error_(std::move(error)) { // NOLINT + RTC_DCHECK(!error.ok()); + } + + // Constructs a new RTCErrorOr with the given value. After calling this + // constructor, calls to value() will succeed, and calls to error() will + // return a default-constructed RTCError. + // + // NOTE: Not explicit - we want to use RTCErrorOr as a return type + // so it is convenient and sensible to be able to do 'return T()' + // when the return type is RTCErrorOr. + RTCErrorOr(T&& value) : value_(std::move(value)) {} // NOLINT + + // Delete the copy constructor and assignment operator; there aren't any use + // cases where you should need to copy an RTCErrorOr, as opposed to moving + // it. Can revisit this decision if use cases arise in the future. + RTCErrorOr(const RTCErrorOr& other) = delete; + RTCErrorOr& operator=(const RTCErrorOr& other) = delete; + + // Move constructor and move-assignment operator. + // + // Visual Studio doesn't support "= default" with move constructors or + // assignment operators (even though they compile, they segfault), so define + // them explicitly. + RTCErrorOr(RTCErrorOr&& other) + : error_(std::move(other.error_)), value_(std::move(other.value_)) {} + RTCErrorOr& operator=(RTCErrorOr&& other) { + error_ = std::move(other.error_); + value_ = std::move(other.value_); + return *this; + } + + // Conversion constructor and assignment operator; T must be copy or move + // constructible from U. + template + RTCErrorOr(RTCErrorOr other) // NOLINT + : error_(std::move(other.error_)), value_(std::move(other.value_)) {} + template + RTCErrorOr& operator=(RTCErrorOr other) { + error_ = std::move(other.error_); + value_ = std::move(other.value_); + return *this; + } + + // Returns a reference to our error. If this contains a T, then returns + // default-constructed RTCError. + const RTCError& error() const { return error_; } + + // Moves the error. Can be useful if, say "CreateFoo" returns an + // RTCErrorOr, and internally calls "CreateBar" which returns an + // RTCErrorOr, and wants to forward the error up the stack. + RTCError MoveError() { return std::move(error_); } + + // Returns this->error().ok() + bool ok() const { return error_.ok(); } + + // Returns a reference to our current value, or DCHECK-fails if !this->ok(). + // + // Can be convenient for the implementation; for example, a method may want + // to access the value in some way before returning it to the next method on + // the stack. + const T& value() const { + RTC_DCHECK(ok()); + return value_; + } + T& value() { + RTC_DCHECK(ok()); + return value_; + } + + // Moves our current value out of this object and returns it, or DCHECK-fails + // if !this->ok(). + T MoveValue() { + RTC_DCHECK(ok()); + return std::move(value_); + } + + private: + RTCError error_; + T value_; +}; + +} // namespace webrtc + +#endif // API_RTCERROR_H_ diff --git a/WebRtcNative/include/webrtc/api/rtceventlogoutput.h b/WebRtcNative/include/webrtc/api/rtceventlogoutput.h new file mode 100644 index 00000000..67e408d6 --- /dev/null +++ b/WebRtcNative/include/webrtc/api/rtceventlogoutput.h @@ -0,0 +1,39 @@ +/* + * Copyright (c) 2017 The WebRTC project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + +#ifndef API_RTCEVENTLOGOUTPUT_H_ +#define API_RTCEVENTLOGOUTPUT_H_ + +#include + +namespace webrtc { + +// NOTE: This class is still under development and may change without notice. +class RtcEventLogOutput { + public: + virtual ~RtcEventLogOutput() = default; + + // An output normally starts out active, though that might not always be + // the case (e.g. failed to open a file for writing). + // Once an output has become inactive (e.g. maximum file size reached), it can + // never become active again. + virtual bool IsActive() const = 0; + + // Write encoded events to an output. Returns true if the output was + // successfully written in its entirety. Otherwise, no guarantee is given + // about how much data was written, if any. The output sink becomes inactive + // after the first time |false| is returned. Write() may not be called on + // an inactive output sink. + virtual bool Write(const std::string& output) = 0; +}; + +} // namespace webrtc + +#endif // API_RTCEVENTLOGOUTPUT_H_ diff --git a/WebRtcNative/include/webrtc/api/rtp_headers.h b/WebRtcNative/include/webrtc/api/rtp_headers.h new file mode 100644 index 00000000..c0b22cc1 --- /dev/null +++ b/WebRtcNative/include/webrtc/api/rtp_headers.h @@ -0,0 +1,171 @@ +/* + * Copyright (c) 2017 The WebRTC project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + +#ifndef API_RTP_HEADERS_H_ +#define API_RTP_HEADERS_H_ + +#include +#include +#include +#include + +#include "absl/types/optional.h" +#include "api/array_view.h" +#include "api/video/video_content_type.h" +#include "api/video/video_rotation.h" +#include "api/video/video_timing.h" + +#include "common_types.h" // NOLINT(build/include) +#include "rtc_base/checks.h" +#include "rtc_base/deprecation.h" + +namespace webrtc { + +// Class to represent the value of RTP header extensions that are +// variable-length strings (e.g., RtpStreamId and RtpMid). +// Unlike std::string, it can be copied with memcpy and cleared with memset. +// +// Empty value represents unset header extension (use empty() to query). +class StringRtpHeaderExtension { + public: + // String RTP header extensions are limited to 16 bytes because it is the + // maximum length that can be encoded with one-byte header extensions. + static constexpr size_t kMaxSize = 16; + + static bool IsLegalName(rtc::ArrayView name); + + StringRtpHeaderExtension() { value_[0] = 0; } + explicit StringRtpHeaderExtension(rtc::ArrayView value) { + Set(value.data(), value.size()); + } + StringRtpHeaderExtension(const StringRtpHeaderExtension&) = default; + StringRtpHeaderExtension& operator=(const StringRtpHeaderExtension&) = + default; + + bool empty() const { return value_[0] == 0; } + const char* data() const { return value_; } + size_t size() const { return strnlen(value_, kMaxSize); } + + void Set(rtc::ArrayView value) { + Set(reinterpret_cast(value.data()), value.size()); + } + void Set(const char* data, size_t size); + + friend bool operator==(const StringRtpHeaderExtension& lhs, + const StringRtpHeaderExtension& rhs) { + return strncmp(lhs.value_, rhs.value_, kMaxSize) == 0; + } + friend bool operator!=(const StringRtpHeaderExtension& lhs, + const StringRtpHeaderExtension& rhs) { + return !(lhs == rhs); + } + + private: + char value_[kMaxSize]; +}; + +// StreamId represents RtpStreamId which is a string. +typedef StringRtpHeaderExtension StreamId; + +// Mid represents RtpMid which is a string. +typedef StringRtpHeaderExtension Mid; + +struct RTPHeaderExtension { + RTPHeaderExtension(); + RTPHeaderExtension(const RTPHeaderExtension& other); + RTPHeaderExtension& operator=(const RTPHeaderExtension& other); + + bool hasTransmissionTimeOffset; + int32_t transmissionTimeOffset; + bool hasAbsoluteSendTime; + uint32_t absoluteSendTime; + bool hasTransportSequenceNumber; + uint16_t transportSequenceNumber; + + // Audio Level includes both level in dBov and voiced/unvoiced bit. See: + // https://datatracker.ietf.org/doc/draft-lennox-avt-rtp-audio-level-exthdr/ + bool hasAudioLevel; + bool voiceActivity; + uint8_t audioLevel; + + // For Coordination of Video Orientation. See + // http://www.etsi.org/deliver/etsi_ts/126100_126199/126114/12.07.00_60/ + // ts_126114v120700p.pdf + bool hasVideoRotation; + VideoRotation videoRotation; + + // TODO(ilnik): Refactor this and one above to be absl::optional() and remove + // a corresponding bool flag. + bool hasVideoContentType; + VideoContentType videoContentType; + + bool has_video_timing; + VideoSendTiming video_timing; + + PlayoutDelay playout_delay = {-1, -1}; + + // For identification of a stream when ssrc is not signaled. See + // https://tools.ietf.org/html/draft-ietf-avtext-rid-09 + // TODO(danilchap): Update url from draft to release version. + StreamId stream_id; + StreamId repaired_stream_id; + + // For identifying the media section used to interpret this RTP packet. See + // https://tools.ietf.org/html/draft-ietf-mmusic-sdp-bundle-negotiation-38 + Mid mid; +}; + +struct RTPHeader { + RTPHeader(); + RTPHeader(const RTPHeader& other); + RTPHeader& operator=(const RTPHeader& other); + + bool markerBit; + uint8_t payloadType; + uint16_t sequenceNumber; + uint32_t timestamp; + uint32_t ssrc; + uint8_t numCSRCs; + uint32_t arrOfCSRCs[kRtpCsrcSize]; + size_t paddingLength; + size_t headerLength; + int payload_type_frequency; + RTPHeaderExtension extension; +}; + +// RTCP mode to use. Compound mode is described by RFC 4585 and reduced-size +// RTCP mode is described by RFC 5506. +enum class RtcpMode { kOff, kCompound, kReducedSize }; + +enum NetworkState { + kNetworkUp, + kNetworkDown, +}; + +struct RtpKeepAliveConfig final { + // If no packet has been sent for |timeout_interval_ms|, send a keep-alive + // packet. The keep-alive packet is an empty (no payload) RTP packet with a + // payload type of 20 as long as the other end has not negotiated the use of + // this value. If this value has already been negotiated, then some other + // unused static payload type from table 5 of RFC 3551 shall be used and set + // in |payload_type|. + int64_t timeout_interval_ms = -1; + uint8_t payload_type = 20; + + bool operator==(const RtpKeepAliveConfig& o) const { + return timeout_interval_ms == o.timeout_interval_ms && + payload_type == o.payload_type; + } + bool operator!=(const RtpKeepAliveConfig& o) const { return !(*this == o); } +}; + +} // namespace webrtc + +#endif // API_RTP_HEADERS_H_ diff --git a/WebRtcNative/include/webrtc/api/rtpparameters.h b/WebRtcNative/include/webrtc/api/rtpparameters.h new file mode 100644 index 00000000..9a29c08d --- /dev/null +++ b/WebRtcNative/include/webrtc/api/rtpparameters.h @@ -0,0 +1,629 @@ +/* + * Copyright 2015 The WebRTC project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + +#ifndef API_RTPPARAMETERS_H_ +#define API_RTPPARAMETERS_H_ + +#include +#include +#include + +#include "absl/types/optional.h" +#include "api/mediatypes.h" + +namespace webrtc { + +// These structures are intended to mirror those defined by: +// http://draft.ortc.org/#rtcrtpdictionaries* +// Contains everything specified as of 2017 Jan 24. +// +// They are used when retrieving or modifying the parameters of an +// RtpSender/RtpReceiver, or retrieving capabilities. +// +// Note on conventions: Where ORTC may use "octet", "short" and "unsigned" +// types, we typically use "int", in keeping with our style guidelines. The +// parameter's actual valid range will be enforced when the parameters are set, +// rather than when the parameters struct is built. An exception is made for +// SSRCs, since they use the full unsigned 32-bit range, and aren't expected to +// be used for any numeric comparisons/operations. +// +// Additionally, where ORTC uses strings, we may use enums for things that have +// a fixed number of supported values. However, for things that can be extended +// (such as codecs, by providing an external encoder factory), a string +// identifier is used. + +enum class FecMechanism { + RED, + RED_AND_ULPFEC, + FLEXFEC, +}; + +// Used in RtcpFeedback struct. +enum class RtcpFeedbackType { + CCM, + NACK, + REMB, // "goog-remb" + TRANSPORT_CC, +}; + +// Used in RtcpFeedback struct when type is NACK or CCM. +enum class RtcpFeedbackMessageType { + // Equivalent to {type: "nack", parameter: undefined} in ORTC. + GENERIC_NACK, + PLI, // Usable with NACK. + FIR, // Usable with CCM. +}; + +enum class DtxStatus { + DISABLED, + ENABLED, +}; + +// Based on the spec in +// https://w3c.github.io/webrtc-pc/#idl-def-rtcdegradationpreference. +// These options are enforced on a best-effort basis. For instance, all of +// these options may suffer some frame drops in order to avoid queuing. +// TODO(sprang): Look into possibility of more strictly enforcing the +// maintain-framerate option. +// TODO(deadbeef): Default to "balanced", as the spec indicates? +enum class DegradationPreference { + // Don't take any actions based on over-utilization signals. Not part of the + // web API. + DISABLED, + // On over-use, request lower frame rate, possibly causing frame drops. + MAINTAIN_FRAMERATE, + // On over-use, request lower resolution, possibly causing down-scaling. + MAINTAIN_RESOLUTION, + // Try to strike a "pleasing" balance between frame rate or resolution. + BALANCED, +}; + +extern const double kDefaultBitratePriority; + +struct RtcpFeedback { + RtcpFeedbackType type = RtcpFeedbackType::CCM; + + // Equivalent to ORTC "parameter" field with slight differences: + // 1. It's an enum instead of a string. + // 2. Generic NACK feedback is represented by a GENERIC_NACK message type, + // rather than an unset "parameter" value. + absl::optional message_type; + + // Constructors for convenience. + RtcpFeedback(); + explicit RtcpFeedback(RtcpFeedbackType type); + RtcpFeedback(RtcpFeedbackType type, RtcpFeedbackMessageType message_type); + RtcpFeedback(const RtcpFeedback&); + ~RtcpFeedback(); + + bool operator==(const RtcpFeedback& o) const { + return type == o.type && message_type == o.message_type; + } + bool operator!=(const RtcpFeedback& o) const { return !(*this == o); } +}; + +// RtpCodecCapability is to RtpCodecParameters as RtpCapabilities is to +// RtpParameters. This represents the static capabilities of an endpoint's +// implementation of a codec. +struct RtpCodecCapability { + RtpCodecCapability(); + ~RtpCodecCapability(); + + // Build MIME "type/subtype" string from |name| and |kind|. + std::string mime_type() const { return MediaTypeToString(kind) + "/" + name; } + + // Used to identify the codec. Equivalent to MIME subtype. + std::string name; + + // The media type of this codec. Equivalent to MIME top-level type. + cricket::MediaType kind = cricket::MEDIA_TYPE_AUDIO; + + // Clock rate in Hertz. If unset, the codec is applicable to any clock rate. + absl::optional clock_rate; + + // Default payload type for this codec. Mainly needed for codecs that use + // that have statically assigned payload types. + absl::optional preferred_payload_type; + + // Maximum packetization time supported by an RtpReceiver for this codec. + // TODO(deadbeef): Not implemented. + absl::optional max_ptime; + + // Preferred packetization time for an RtpReceiver or RtpSender of this + // codec. + // TODO(deadbeef): Not implemented. + absl::optional ptime; + + // The number of audio channels supported. Unused for video codecs. + absl::optional num_channels; + + // Feedback mechanisms supported for this codec. + std::vector rtcp_feedback; + + // Codec-specific parameters that must be signaled to the remote party. + // + // Corresponds to "a=fmtp" parameters in SDP. + // + // Contrary to ORTC, these parameters are named using all lowercase strings. + // This helps make the mapping to SDP simpler, if an application is using + // SDP. Boolean values are represented by the string "1". + std::unordered_map parameters; + + // Codec-specific parameters that may optionally be signaled to the remote + // party. + // TODO(deadbeef): Not implemented. + std::unordered_map options; + + // Maximum number of temporal layer extensions supported by this codec. + // For example, a value of 1 indicates that 2 total layers are supported. + // TODO(deadbeef): Not implemented. + int max_temporal_layer_extensions = 0; + + // Maximum number of spatial layer extensions supported by this codec. + // For example, a value of 1 indicates that 2 total layers are supported. + // TODO(deadbeef): Not implemented. + int max_spatial_layer_extensions = 0; + + // Whether the implementation can send/receive SVC layers with distinct + // SSRCs. Always false for audio codecs. True for video codecs that support + // scalable video coding with MRST. + // TODO(deadbeef): Not implemented. + bool svc_multi_stream_support = false; + + bool operator==(const RtpCodecCapability& o) const { + return name == o.name && kind == o.kind && clock_rate == o.clock_rate && + preferred_payload_type == o.preferred_payload_type && + max_ptime == o.max_ptime && ptime == o.ptime && + num_channels == o.num_channels && rtcp_feedback == o.rtcp_feedback && + parameters == o.parameters && options == o.options && + max_temporal_layer_extensions == o.max_temporal_layer_extensions && + max_spatial_layer_extensions == o.max_spatial_layer_extensions && + svc_multi_stream_support == o.svc_multi_stream_support; + } + bool operator!=(const RtpCodecCapability& o) const { return !(*this == o); } +}; + +// Used in RtpCapabilities; represents the capabilities/preferences of an +// implementation for a header extension. +// +// Just called "RtpHeaderExtension" in ORTC, but the "Capability" suffix was +// added here for consistency and to avoid confusion with +// RtpHeaderExtensionParameters. +// +// Note that ORTC includes a "kind" field, but we omit this because it's +// redundant; if you call "RtpReceiver::GetCapabilities(MEDIA_TYPE_AUDIO)", +// you know you're getting audio capabilities. +struct RtpHeaderExtensionCapability { + // URI of this extension, as defined in RFC5285. + std::string uri; + + // Preferred value of ID that goes in the packet. + absl::optional preferred_id; + + // If true, it's preferred that the value in the header is encrypted. + // TODO(deadbeef): Not implemented. + bool preferred_encrypt = false; + + // Constructors for convenience. + RtpHeaderExtensionCapability(); + explicit RtpHeaderExtensionCapability(const std::string& uri); + RtpHeaderExtensionCapability(const std::string& uri, int preferred_id); + ~RtpHeaderExtensionCapability(); + + bool operator==(const RtpHeaderExtensionCapability& o) const { + return uri == o.uri && preferred_id == o.preferred_id && + preferred_encrypt == o.preferred_encrypt; + } + bool operator!=(const RtpHeaderExtensionCapability& o) const { + return !(*this == o); + } +}; + +// RTP header extension, see RFC 5285. +struct RtpExtension { + RtpExtension(); + RtpExtension(const std::string& uri, int id); + RtpExtension(const std::string& uri, int id, bool encrypt); + ~RtpExtension(); + std::string ToString() const; + bool operator==(const RtpExtension& rhs) const { + return uri == rhs.uri && id == rhs.id && encrypt == rhs.encrypt; + } + static bool IsSupportedForAudio(const std::string& uri); + static bool IsSupportedForVideo(const std::string& uri); + // Return "true" if the given RTP header extension URI may be encrypted. + static bool IsEncryptionSupported(const std::string& uri); + + // Returns the named header extension if found among all extensions, + // nullptr otherwise. + static const RtpExtension* FindHeaderExtensionByUri( + const std::vector& extensions, + const std::string& uri); + + // Return a list of RTP header extensions with the non-encrypted extensions + // removed if both the encrypted and non-encrypted extension is present for + // the same URI. + static std::vector FilterDuplicateNonEncrypted( + const std::vector& extensions); + + // Header extension for audio levels, as defined in: + // http://tools.ietf.org/html/draft-ietf-avtext-client-to-mixer-audio-level-03 + static const char kAudioLevelUri[]; + static const int kAudioLevelDefaultId; + + // Header extension for RTP timestamp offset, see RFC 5450 for details: + // http://tools.ietf.org/html/rfc5450 + static const char kTimestampOffsetUri[]; + static const int kTimestampOffsetDefaultId; + + // Header extension for absolute send time, see url for details: + // http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time + static const char kAbsSendTimeUri[]; + static const int kAbsSendTimeDefaultId; + + // Header extension for coordination of video orientation, see url for + // details: + // http://www.etsi.org/deliver/etsi_ts/126100_126199/126114/12.07.00_60/ts_126114v120700p.pdf + static const char kVideoRotationUri[]; + static const int kVideoRotationDefaultId; + + // Header extension for video content type. E.g. default or screenshare. + static const char kVideoContentTypeUri[]; + static const int kVideoContentTypeDefaultId; + + // Header extension for video timing. + static const char kVideoTimingUri[]; + static const int kVideoTimingDefaultId; + + // Header extension for transport sequence number, see url for details: + // http://www.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions + static const char kTransportSequenceNumberUri[]; + static const int kTransportSequenceNumberDefaultId; + + static const char kPlayoutDelayUri[]; + static const int kPlayoutDelayDefaultId; + + // Header extension for identifying media section within a transport. + // https://tools.ietf.org/html/draft-ietf-mmusic-sdp-bundle-negotiation-49#section-15 + static const char kMidUri[]; + static const int kMidDefaultId; + + // Encryption of Header Extensions, see RFC 6904 for details: + // https://tools.ietf.org/html/rfc6904 + static const char kEncryptHeaderExtensionsUri[]; + + // Inclusive min and max IDs for one-byte header extensions, per RFC5285. + static const int kMinId; + static const int kMaxId; + + std::string uri; + int id = 0; + bool encrypt = false; +}; + +// TODO(deadbeef): This is missing the "encrypt" flag, which is unimplemented. +typedef RtpExtension RtpHeaderExtensionParameters; + +struct RtpFecParameters { + // If unset, a value is chosen by the implementation. + // Works just like RtpEncodingParameters::ssrc. + absl::optional ssrc; + + FecMechanism mechanism = FecMechanism::RED; + + // Constructors for convenience. + RtpFecParameters(); + explicit RtpFecParameters(FecMechanism mechanism); + RtpFecParameters(FecMechanism mechanism, uint32_t ssrc); + RtpFecParameters(const RtpFecParameters&); + ~RtpFecParameters(); + + bool operator==(const RtpFecParameters& o) const { + return ssrc == o.ssrc && mechanism == o.mechanism; + } + bool operator!=(const RtpFecParameters& o) const { return !(*this == o); } +}; + +struct RtpRtxParameters { + // If unset, a value is chosen by the implementation. + // Works just like RtpEncodingParameters::ssrc. + absl::optional ssrc; + + // Constructors for convenience. + RtpRtxParameters(); + explicit RtpRtxParameters(uint32_t ssrc); + RtpRtxParameters(const RtpRtxParameters&); + ~RtpRtxParameters(); + + bool operator==(const RtpRtxParameters& o) const { return ssrc == o.ssrc; } + bool operator!=(const RtpRtxParameters& o) const { return !(*this == o); } +}; + +struct RtpEncodingParameters { + RtpEncodingParameters(); + RtpEncodingParameters(const RtpEncodingParameters&); + ~RtpEncodingParameters(); + + // If unset, a value is chosen by the implementation. + // + // Note that the chosen value is NOT returned by GetParameters, because it + // may change due to an SSRC conflict, in which case the conflict is handled + // internally without any event. Another way of looking at this is that an + // unset SSRC acts as a "wildcard" SSRC. + absl::optional ssrc; + + // Can be used to reference a codec in the |codecs| member of the + // RtpParameters that contains this RtpEncodingParameters. If unset, the + // implementation will choose the first possible codec (if a sender), or + // prepare to receive any codec (for a receiver). + // TODO(deadbeef): Not implemented. Implementation of RtpSender will always + // choose the first codec from the list. + absl::optional codec_payload_type; + + // Specifies the FEC mechanism, if set. + // TODO(deadbeef): Not implemented. Current implementation will use whatever + // FEC codecs are available, including red+ulpfec. + absl::optional fec; + + // Specifies the RTX parameters, if set. + // TODO(deadbeef): Not implemented with PeerConnection senders/receivers. + absl::optional rtx; + + // Only used for audio. If set, determines whether or not discontinuous + // transmission will be used, if an available codec supports it. If not + // set, the implementation default setting will be used. + // TODO(deadbeef): Not implemented. Current implementation will use a CN + // codec as long as it's present. + absl::optional dtx; + + // The relative bitrate priority of this encoding. Currently this is + // implemented for the entire rtp sender by using the value of the first + // encoding parameter. + // TODO(webrtc.bugs.org/8630): Implement this per encoding parameter. + // Currently there is logic for how bitrate is distributed per simulcast layer + // in the VideoBitrateAllocator. This must be updated to incorporate relative + // bitrate priority. + double bitrate_priority = kDefaultBitratePriority; + + // Indicates the preferred duration of media represented by a packet in + // milliseconds for this encoding. If set, this will take precedence over the + // ptime set in the RtpCodecParameters. This could happen if SDP negotiation + // creates a ptime for a specific codec, which is later changed in the + // RtpEncodingParameters by the application. + // TODO(bugs.webrtc.org/8819): Not implemented. + absl::optional ptime; + + // If set, this represents the Transport Independent Application Specific + // maximum bandwidth defined in RFC3890. If unset, there is no maximum + // bitrate. Currently this is implemented for the entire rtp sender by using + // the value of the first encoding parameter. + // + // Just called "maxBitrate" in ORTC spec. + // + // TODO(deadbeef): With ORTC RtpSenders, this currently sets the total + // bandwidth for the entire bandwidth estimator (audio and video). This is + // just always how "b=AS" was handled, but it's not correct and should be + // fixed. + absl::optional max_bitrate_bps; + + // Specifies the minimum bitrate in bps for video. + // TODO(asapersson): Not implemented for ORTC API. + absl::optional min_bitrate_bps; + + // TODO(deadbeef): Not implemented. + absl::optional max_framerate; + + // For video, scale the resolution down by this factor. + // TODO(deadbeef): Not implemented. + absl::optional scale_resolution_down_by; + + // Scale the framerate down by this factor. + // TODO(deadbeef): Not implemented. + absl::optional scale_framerate_down_by; + + // For an RtpSender, set to true to cause this encoding to be encoded and + // sent, and false for it not to be encoded and sent. This allows control + // across multiple encodings of a sender for turning simulcast layers on and + // off. + // TODO(webrtc.bugs.org/8807): Updating this parameter will trigger an encoder + // reset, but this isn't necessarily required. + bool active = true; + + // Value to use for RID RTP header extension. + // Called "encodingId" in ORTC. + // TODO(deadbeef): Not implemented. + std::string rid; + + // RIDs of encodings on which this layer depends. + // Called "dependencyEncodingIds" in ORTC spec. + // TODO(deadbeef): Not implemented. + std::vector dependency_rids; + + bool operator==(const RtpEncodingParameters& o) const { + return ssrc == o.ssrc && codec_payload_type == o.codec_payload_type && + fec == o.fec && rtx == o.rtx && dtx == o.dtx && + bitrate_priority == o.bitrate_priority && ptime == o.ptime && + max_bitrate_bps == o.max_bitrate_bps && + max_framerate == o.max_framerate && + scale_resolution_down_by == o.scale_resolution_down_by && + scale_framerate_down_by == o.scale_framerate_down_by && + active == o.active && rid == o.rid && + dependency_rids == o.dependency_rids; + } + bool operator!=(const RtpEncodingParameters& o) const { + return !(*this == o); + } +}; + +struct RtpCodecParameters { + RtpCodecParameters(); + RtpCodecParameters(const RtpCodecParameters&); + ~RtpCodecParameters(); + + // Build MIME "type/subtype" string from |name| and |kind|. + std::string mime_type() const { return MediaTypeToString(kind) + "/" + name; } + + // Used to identify the codec. Equivalent to MIME subtype. + std::string name; + + // The media type of this codec. Equivalent to MIME top-level type. + cricket::MediaType kind = cricket::MEDIA_TYPE_AUDIO; + + // Payload type used to identify this codec in RTP packets. + // This must always be present, and must be unique across all codecs using + // the same transport. + int payload_type = 0; + + // If unset, the implementation default is used. + absl::optional clock_rate; + + // The number of audio channels used. Unset for video codecs. If unset for + // audio, the implementation default is used. + // TODO(deadbeef): The "implementation default" part isn't fully implemented. + // Only defaults to 1, even though some codecs (such as opus) should really + // default to 2. + absl::optional num_channels; + + // The maximum packetization time to be used by an RtpSender. + // If |ptime| is also set, this will be ignored. + // TODO(deadbeef): Not implemented. + absl::optional max_ptime; + + // The packetization time to be used by an RtpSender. + // If unset, will use any time up to max_ptime. + // TODO(deadbeef): Not implemented. + absl::optional ptime; + + // Feedback mechanisms to be used for this codec. + // TODO(deadbeef): Not implemented with PeerConnection senders/receivers. + std::vector rtcp_feedback; + + // Codec-specific parameters that must be signaled to the remote party. + // + // Corresponds to "a=fmtp" parameters in SDP. + // + // Contrary to ORTC, these parameters are named using all lowercase strings. + // This helps make the mapping to SDP simpler, if an application is using + // SDP. Boolean values are represented by the string "1". + std::unordered_map parameters; + + bool operator==(const RtpCodecParameters& o) const { + return name == o.name && kind == o.kind && payload_type == o.payload_type && + clock_rate == o.clock_rate && num_channels == o.num_channels && + max_ptime == o.max_ptime && ptime == o.ptime && + rtcp_feedback == o.rtcp_feedback && parameters == o.parameters; + } + bool operator!=(const RtpCodecParameters& o) const { return !(*this == o); } +}; + +// RtpCapabilities is used to represent the static capabilities of an +// endpoint. An application can use these capabilities to construct an +// RtpParameters. +struct RtpCapabilities { + RtpCapabilities(); + ~RtpCapabilities(); + + // Supported codecs. + std::vector codecs; + + // Supported RTP header extensions. + std::vector header_extensions; + + // Supported Forward Error Correction (FEC) mechanisms. Note that the RED, + // ulpfec and flexfec codecs used by these mechanisms will still appear in + // |codecs|. + std::vector fec; + + bool operator==(const RtpCapabilities& o) const { + return codecs == o.codecs && header_extensions == o.header_extensions && + fec == o.fec; + } + bool operator!=(const RtpCapabilities& o) const { return !(*this == o); } +}; + +struct RtcpParameters final { + RtcpParameters(); + RtcpParameters(const RtcpParameters&); + ~RtcpParameters(); + + // The SSRC to be used in the "SSRC of packet sender" field. If not set, one + // will be chosen by the implementation. + // TODO(deadbeef): Not implemented. + absl::optional ssrc; + + // The Canonical Name (CNAME) used by RTCP (e.g. in SDES messages). + // + // If empty in the construction of the RtpTransport, one will be generated by + // the implementation, and returned in GetRtcpParameters. Multiple + // RtpTransports created by the same OrtcFactory will use the same generated + // CNAME. + // + // If empty when passed into SetParameters, the CNAME simply won't be + // modified. + std::string cname; + + // Send reduced-size RTCP? + bool reduced_size = false; + + // Send RTCP multiplexed on the RTP transport? + // Not used with PeerConnection senders/receivers + bool mux = true; + + bool operator==(const RtcpParameters& o) const { + return ssrc == o.ssrc && cname == o.cname && + reduced_size == o.reduced_size && mux == o.mux; + } + bool operator!=(const RtcpParameters& o) const { return !(*this == o); } +}; + +struct RtpParameters { + RtpParameters(); + RtpParameters(const RtpParameters&); + ~RtpParameters(); + + // Used when calling getParameters/setParameters with a PeerConnection + // RtpSender, to ensure that outdated parameters are not unintentionally + // applied successfully. + std::string transaction_id; + + // Value to use for MID RTP header extension. + // Called "muxId" in ORTC. + // TODO(deadbeef): Not implemented. + std::string mid; + + std::vector codecs; + + std::vector header_extensions; + + std::vector encodings; + + // Only available with a Peerconnection RtpSender. + // In ORTC, our API includes an additional "RtpTransport" + // abstraction on which RTCP parameters are set. + RtcpParameters rtcp; + + // When bandwidth is constrained and the RtpSender needs to choose between + // degrading resolution or degrading framerate, degradationPreference + // indicates which is preferred. Only for video tracks. + DegradationPreference degradation_preference = + DegradationPreference::BALANCED; + + bool operator==(const RtpParameters& o) const { + return mid == o.mid && codecs == o.codecs && + header_extensions == o.header_extensions && + encodings == o.encodings && rtcp == o.rtcp && + degradation_preference == o.degradation_preference; + } + bool operator!=(const RtpParameters& o) const { return !(*this == o); } +}; + +} // namespace webrtc + +#endif // API_RTPPARAMETERS_H_ diff --git a/WebRtcNative/include/webrtc/api/rtpreceiverinterface.h b/WebRtcNative/include/webrtc/api/rtpreceiverinterface.h new file mode 100644 index 00000000..b2499b41 --- /dev/null +++ b/WebRtcNative/include/webrtc/api/rtpreceiverinterface.h @@ -0,0 +1,149 @@ +/* + * Copyright 2015 The WebRTC project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + +// This file contains interfaces for RtpReceivers +// http://w3c.github.io/webrtc-pc/#rtcrtpreceiver-interface + +#ifndef API_RTPRECEIVERINTERFACE_H_ +#define API_RTPRECEIVERINTERFACE_H_ + +#include +#include + +#include "api/mediastreaminterface.h" +#include "api/mediatypes.h" +#include "api/proxy.h" +#include "api/rtpparameters.h" +#include "rtc_base/refcount.h" +#include "rtc_base/scoped_ref_ptr.h" + +namespace webrtc { + +enum class RtpSourceType { + SSRC, + CSRC, +}; + +class RtpSource { + public: + RtpSource() = delete; + RtpSource(int64_t timestamp_ms, + uint32_t source_id, + RtpSourceType source_type); + RtpSource(int64_t timestamp_ms, + uint32_t source_id, + RtpSourceType source_type, + uint8_t audio_level); + RtpSource(const RtpSource&); + RtpSource& operator=(const RtpSource&); + ~RtpSource(); + + int64_t timestamp_ms() const { return timestamp_ms_; } + void update_timestamp_ms(int64_t timestamp_ms) { + RTC_DCHECK_LE(timestamp_ms_, timestamp_ms); + timestamp_ms_ = timestamp_ms; + } + + // The identifier of the source can be the CSRC or the SSRC. + uint32_t source_id() const { return source_id_; } + + // The source can be either a contributing source or a synchronization source. + RtpSourceType source_type() const { return source_type_; } + + absl::optional audio_level() const { return audio_level_; } + void set_audio_level(const absl::optional& level) { + audio_level_ = level; + } + + bool operator==(const RtpSource& o) const { + return timestamp_ms_ == o.timestamp_ms() && source_id_ == o.source_id() && + source_type_ == o.source_type() && audio_level_ == o.audio_level_; + } + + private: + int64_t timestamp_ms_; + uint32_t source_id_; + RtpSourceType source_type_; + absl::optional audio_level_; +}; + +class RtpReceiverObserverInterface { + public: + // Note: Currently if there are multiple RtpReceivers of the same media type, + // they will all call OnFirstPacketReceived at once. + // + // In the future, it's likely that an RtpReceiver will only call + // OnFirstPacketReceived when a packet is received specifically for its + // SSRC/mid. + virtual void OnFirstPacketReceived(cricket::MediaType media_type) = 0; + + protected: + virtual ~RtpReceiverObserverInterface() {} +}; + +class RtpReceiverInterface : public rtc::RefCountInterface { + public: + virtual rtc::scoped_refptr track() const = 0; + // The list of streams that |track| is associated with. This is the same as + // the [[AssociatedRemoteMediaStreams]] internal slot in the spec. + // https://w3c.github.io/webrtc-pc/#dfn-associatedremotemediastreams + // TODO(hbos): Make pure virtual as soon as Chromium's mock implements this. + // TODO(https://crbug.com/webrtc/9480): Remove streams() in favor of + // stream_ids() as soon as downstream projects are no longer dependent on + // stream objects. + virtual std::vector stream_ids() const; + virtual std::vector> streams() const; + + // Audio or video receiver? + virtual cricket::MediaType media_type() const = 0; + + // Not to be confused with "mid", this is a field we can temporarily use + // to uniquely identify a receiver until we implement Unified Plan SDP. + virtual std::string id() const = 0; + + // The WebRTC specification only defines RTCRtpParameters in terms of senders, + // but this API also applies them to receivers, similar to ORTC: + // http://ortc.org/wp-content/uploads/2016/03/ortc.html#rtcrtpparameters*. + virtual RtpParameters GetParameters() const = 0; + // Currently, doesn't support changing any parameters, but may in the future. + virtual bool SetParameters(const RtpParameters& parameters) = 0; + + // Does not take ownership of observer. + // Must call SetObserver(nullptr) before the observer is destroyed. + virtual void SetObserver(RtpReceiverObserverInterface* observer) = 0; + + // TODO(zhihuang): Remove the default implementation once the subclasses + // implement this. Currently, the only relevant subclass is the + // content::FakeRtpReceiver in Chromium. + virtual std::vector GetSources() const; + + protected: + ~RtpReceiverInterface() override = default; +}; + +// Define proxy for RtpReceiverInterface. +// TODO(deadbeef): Move this to .cc file and out of api/. What threads methods +// are called on is an implementation detail. +BEGIN_SIGNALING_PROXY_MAP(RtpReceiver) +PROXY_SIGNALING_THREAD_DESTRUCTOR() +PROXY_CONSTMETHOD0(rtc::scoped_refptr, track) +PROXY_CONSTMETHOD0(std::vector>, + streams) +PROXY_CONSTMETHOD0(cricket::MediaType, media_type) +PROXY_CONSTMETHOD0(std::string, id) +PROXY_CONSTMETHOD0(RtpParameters, GetParameters); +PROXY_METHOD1(bool, SetParameters, const RtpParameters&) +PROXY_METHOD1(void, SetObserver, RtpReceiverObserverInterface*); +PROXY_CONSTMETHOD0(std::vector, GetSources); +END_PROXY_MAP() + +} // namespace webrtc + +#endif // API_RTPRECEIVERINTERFACE_H_ diff --git a/WebRtcNative/include/webrtc/api/rtpsenderinterface.h b/WebRtcNative/include/webrtc/api/rtpsenderinterface.h new file mode 100644 index 00000000..a7eec497 --- /dev/null +++ b/WebRtcNative/include/webrtc/api/rtpsenderinterface.h @@ -0,0 +1,88 @@ +/* + * Copyright 2015 The WebRTC project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + +// This file contains interfaces for RtpSenders +// http://w3c.github.io/webrtc-pc/#rtcrtpsender-interface + +#ifndef API_RTPSENDERINTERFACE_H_ +#define API_RTPSENDERINTERFACE_H_ + +#include +#include + +#include "api/dtmfsenderinterface.h" +#include "api/mediastreaminterface.h" +#include "api/mediatypes.h" +#include "api/proxy.h" +#include "api/rtcerror.h" +#include "api/rtpparameters.h" +#include "rtc_base/deprecation.h" +#include "rtc_base/refcount.h" +#include "rtc_base/scoped_ref_ptr.h" + +namespace webrtc { + +class RtpSenderInterface : public rtc::RefCountInterface { + public: + // Returns true if successful in setting the track. + // Fails if an audio track is set on a video RtpSender, or vice-versa. + virtual bool SetTrack(MediaStreamTrackInterface* track) = 0; + virtual rtc::scoped_refptr track() const = 0; + + // Returns primary SSRC used by this sender for sending media. + // Returns 0 if not yet determined. + // TODO(deadbeef): Change to absl::optional. + // TODO(deadbeef): Remove? With GetParameters this should be redundant. + virtual uint32_t ssrc() const = 0; + + // Audio or video sender? + virtual cricket::MediaType media_type() const = 0; + + // Not to be confused with "mid", this is a field we can temporarily use + // to uniquely identify a receiver until we implement Unified Plan SDP. + virtual std::string id() const = 0; + + // Returns a list of media stream ids associated with this sender's track. + // These are signalled in the SDP so that the remote side can associate + // tracks. + virtual std::vector stream_ids() const = 0; + + virtual RtpParameters GetParameters() = 0; + // Note that only a subset of the parameters can currently be changed. See + // rtpparameters.h + // The encodings are in increasing quality order for simulcast. + virtual RTCError SetParameters(const RtpParameters& parameters) = 0; + + // Returns null for a video sender. + virtual rtc::scoped_refptr GetDtmfSender() const = 0; + + protected: + ~RtpSenderInterface() override = default; +}; + +// Define proxy for RtpSenderInterface. +// TODO(deadbeef): Move this to .cc file and out of api/. What threads methods +// are called on is an implementation detail. +BEGIN_SIGNALING_PROXY_MAP(RtpSender) +PROXY_SIGNALING_THREAD_DESTRUCTOR() +PROXY_METHOD1(bool, SetTrack, MediaStreamTrackInterface*) +PROXY_CONSTMETHOD0(rtc::scoped_refptr, track) +PROXY_CONSTMETHOD0(uint32_t, ssrc) +PROXY_CONSTMETHOD0(cricket::MediaType, media_type) +PROXY_CONSTMETHOD0(std::string, id) +PROXY_CONSTMETHOD0(std::vector, stream_ids) +PROXY_METHOD0(RtpParameters, GetParameters); +PROXY_METHOD1(RTCError, SetParameters, const RtpParameters&) +PROXY_CONSTMETHOD0(rtc::scoped_refptr, GetDtmfSender); +END_PROXY_MAP() + +} // namespace webrtc + +#endif // API_RTPSENDERINTERFACE_H_ diff --git a/WebRtcNative/include/webrtc/api/rtptransceiverinterface.h b/WebRtcNative/include/webrtc/api/rtptransceiverinterface.h new file mode 100644 index 00000000..4c22957b --- /dev/null +++ b/WebRtcNative/include/webrtc/api/rtptransceiverinterface.h @@ -0,0 +1,138 @@ +/* + * Copyright 2017 The WebRTC project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + +#ifndef API_RTPTRANSCEIVERINTERFACE_H_ +#define API_RTPTRANSCEIVERINTERFACE_H_ + +#include +#include + +#include "absl/types/optional.h" +#include "api/array_view.h" +#include "api/rtpreceiverinterface.h" +#include "api/rtpsenderinterface.h" +#include "rtc_base/refcount.h" + +namespace webrtc { + +// https://w3c.github.io/webrtc-pc/#dom-rtcrtptransceiverdirection +enum class RtpTransceiverDirection { + kSendRecv, + kSendOnly, + kRecvOnly, + kInactive +}; + +// Structure for initializing an RtpTransceiver in a call to +// PeerConnectionInterface::AddTransceiver. +// https://w3c.github.io/webrtc-pc/#dom-rtcrtptransceiverinit +struct RtpTransceiverInit final { + RtpTransceiverInit(); + RtpTransceiverInit(const RtpTransceiverInit&); + ~RtpTransceiverInit(); + // Direction of the RtpTransceiver. See RtpTransceiverInterface::direction(). + RtpTransceiverDirection direction = RtpTransceiverDirection::kSendRecv; + + // The added RtpTransceiver will be added to these streams. + std::vector stream_ids; + + // TODO(bugs.webrtc.org/7600): Not implemented. + std::vector send_encodings; +}; + +// The RtpTransceiverInterface maps to the RTCRtpTransceiver defined by the +// WebRTC specification. A transceiver represents a combination of an RtpSender +// and an RtpReceiver than share a common mid. As defined in JSEP, an +// RtpTransceiver is said to be associated with a media description if its mid +// property is non-null; otherwise, it is said to be disassociated. +// JSEP: https://tools.ietf.org/html/draft-ietf-rtcweb-jsep-24 +// +// Note that RtpTransceivers are only supported when using PeerConnection with +// Unified Plan SDP. +// +// This class is thread-safe. +// +// WebRTC specification for RTCRtpTransceiver, the JavaScript analog: +// https://w3c.github.io/webrtc-pc/#dom-rtcrtptransceiver +class RtpTransceiverInterface : public rtc::RefCountInterface { + public: + // Media type of the transceiver. Any sender(s)/receiver(s) will have this + // type as well. + virtual cricket::MediaType media_type() const = 0; + + // The mid attribute is the mid negotiated and present in the local and + // remote descriptions. Before negotiation is complete, the mid value may be + // null. After rollbacks, the value may change from a non-null value to null. + // https://w3c.github.io/webrtc-pc/#dom-rtcrtptransceiver-mid + virtual absl::optional mid() const = 0; + + // The sender attribute exposes the RtpSender corresponding to the RTP media + // that may be sent with the transceiver's mid. The sender is always present, + // regardless of the direction of media. + // https://w3c.github.io/webrtc-pc/#dom-rtcrtptransceiver-sender + virtual rtc::scoped_refptr sender() const = 0; + + // The receiver attribute exposes the RtpReceiver corresponding to the RTP + // media that may be received with the transceiver's mid. The receiver is + // always present, regardless of the direction of media. + // https://w3c.github.io/webrtc-pc/#dom-rtcrtptransceiver-receiver + virtual rtc::scoped_refptr receiver() const = 0; + + // The stopped attribute indicates that the sender of this transceiver will no + // longer send, and that the receiver will no longer receive. It is true if + // either stop has been called or if setting the local or remote description + // has caused the RtpTransceiver to be stopped. + // https://w3c.github.io/webrtc-pc/#dom-rtcrtptransceiver-stopped + virtual bool stopped() const = 0; + + // The direction attribute indicates the preferred direction of this + // transceiver, which will be used in calls to CreateOffer and CreateAnswer. + // https://w3c.github.io/webrtc-pc/#dom-rtcrtptransceiver-direction + virtual RtpTransceiverDirection direction() const = 0; + + // Sets the preferred direction of this transceiver. An update of + // directionality does not take effect immediately. Instead, future calls to + // CreateOffer and CreateAnswer mark the corresponding media descriptions as + // sendrecv, sendonly, recvonly, or inactive. + // https://w3c.github.io/webrtc-pc/#dom-rtcrtptransceiver-direction + virtual void SetDirection(RtpTransceiverDirection new_direction) = 0; + + // The current_direction attribute indicates the current direction negotiated + // for this transceiver. If this transceiver has never been represented in an + // offer/answer exchange, or if the transceiver is stopped, the value is null. + // https://w3c.github.io/webrtc-pc/#dom-rtcrtptransceiver-currentdirection + virtual absl::optional current_direction() const = 0; + + // An internal slot designating for which direction the relevant + // PeerConnection events have been fired. This is to ensure that events like + // OnAddTrack only get fired once even if the same session description is + // applied again. + // Exposed in the public interface for use by Chromium. + virtual absl::optional fired_direction() const; + + // The Stop method irreversibly stops the RtpTransceiver. The sender of this + // transceiver will no longer send, the receiver will no longer receive. + // https://w3c.github.io/webrtc-pc/#dom-rtcrtptransceiver-stop + virtual void Stop() = 0; + + // The SetCodecPreferences method overrides the default codec preferences used + // by WebRTC for this transceiver. + // https://w3c.github.io/webrtc-pc/#dom-rtcrtptransceiver-setcodecpreferences + // TODO(steveanton): Not implemented. + virtual void SetCodecPreferences( + rtc::ArrayView codecs) = 0; + + protected: + ~RtpTransceiverInterface() override = default; +}; + +} // namespace webrtc + +#endif // API_RTPTRANSCEIVERINTERFACE_H_ diff --git a/WebRtcNative/include/webrtc/api/setremotedescriptionobserverinterface.h b/WebRtcNative/include/webrtc/api/setremotedescriptionobserverinterface.h new file mode 100644 index 00000000..bea8b82b --- /dev/null +++ b/WebRtcNative/include/webrtc/api/setremotedescriptionobserverinterface.h @@ -0,0 +1,31 @@ +/* + * Copyright 2017 The WebRTC project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + +#ifndef API_SETREMOTEDESCRIPTIONOBSERVERINTERFACE_H_ +#define API_SETREMOTEDESCRIPTIONOBSERVERINTERFACE_H_ + +#include "api/rtcerror.h" +#include "rtc_base/refcount.h" + +namespace webrtc { + +// An observer for PeerConnectionInterface::SetRemoteDescription(). The +// callback is invoked such that the state of the peer connection can be +// examined to accurately reflect the effects of the SetRemoteDescription +// operation. +class SetRemoteDescriptionObserverInterface : public rtc::RefCountInterface { + public: + // On success, |error.ok()| is true. + virtual void OnSetRemoteDescriptionComplete(RTCError error) = 0; +}; + +} // namespace webrtc + +#endif // API_SETREMOTEDESCRIPTIONOBSERVERINTERFACE_H_ diff --git a/WebRtc.NET/include/webrtc/api/stats/rtcstats.h b/WebRtcNative/include/webrtc/api/stats/rtcstats.h similarity index 75% rename from WebRtc.NET/include/webrtc/api/stats/rtcstats.h rename to WebRtcNative/include/webrtc/api/stats/rtcstats.h index b3afee06..1705f6ab 100644 --- a/WebRtc.NET/include/webrtc/api/stats/rtcstats.h +++ b/WebRtcNative/include/webrtc/api/stats/rtcstats.h @@ -8,8 +8,8 @@ * be found in the AUTHORS file in the root of the source tree. */ -#ifndef WEBRTC_API_STATS_RTCSTATS_H_ -#define WEBRTC_API_STATS_RTCSTATS_H_ +#ifndef API_STATS_RTCSTATS_H_ +#define API_STATS_RTCSTATS_H_ #include #include @@ -17,7 +17,7 @@ #include #include -#include "webrtc/base/checks.h" +#include "rtc_base/checks.h" namespace webrtc { @@ -72,13 +72,13 @@ class RTCStats { bool operator==(const RTCStats& other) const; bool operator!=(const RTCStats& other) const; - // Creates a human readable string representation of the stats object, listing - // all of its members (names and values). - std::string ToString() const; + // Creates a JSON readable string representation of the stats + // object, listing all of its members (names and values). + std::string ToJson() const; // Downcasts the stats object to an |RTCStats| subclass |T|. DCHECKs that the // object is of type |T|. - template + template const T& cast_to() const { RTC_DCHECK_EQ(type(), T::kType); return static_cast(*this); @@ -90,8 +90,7 @@ class RTCStats { // shall be reserved in the vector (so that subclasses can allocate a vector // with room for both parent and child members without it having to resize). virtual std::vector - MembersOfThisObjectAndAncestors( - size_t additional_capacity) const; + MembersOfThisObjectAndAncestors(size_t additional_capacity) const; std::string const id_; int64_t timestamp_us_; @@ -138,18 +137,18 @@ class RTCStats { // bar("bar") { // } // -#define WEBRTC_RTCSTATS_DECL() \ - public: \ - static const char kType[]; \ - \ - std::unique_ptr copy() const override; \ - const char* type() const override; \ - \ - protected: \ - std::vector \ - MembersOfThisObjectAndAncestors( \ - size_t local_var_additional_capacity) const override; \ - \ +#define WEBRTC_RTCSTATS_DECL() \ + public: \ + static const char kType[]; \ + \ + std::unique_ptr copy() const override; \ + const char* type() const override; \ + \ + protected: \ + std::vector \ + MembersOfThisObjectAndAncestors(size_t local_var_additional_capacity) \ + const override; \ + \ public: #define WEBRTC_RTCSTATS_IMPL(this_class, parent_class, type_str, ...) \ @@ -159,20 +158,17 @@ class RTCStats { return std::unique_ptr(new this_class(*this)); \ } \ \ - const char* this_class::type() const { \ - return this_class::kType; \ - } \ + const char* this_class::type() const { return this_class::kType; } \ \ std::vector \ this_class::MembersOfThisObjectAndAncestors( \ size_t local_var_additional_capacity) const { \ const webrtc::RTCStatsMemberInterface* local_var_members[] = { \ - __VA_ARGS__ \ - }; \ + __VA_ARGS__}; \ size_t local_var_members_count = \ sizeof(local_var_members) / sizeof(local_var_members[0]); \ - std::vector local_var_members_vec =\ - parent_class::MembersOfThisObjectAndAncestors( \ + std::vector \ + local_var_members_vec = parent_class::MembersOfThisObjectAndAncestors( \ local_var_members_count + local_var_additional_capacity); \ RTC_DCHECK_GE( \ local_var_members_vec.capacity() - local_var_members_vec.size(), \ @@ -191,21 +187,21 @@ class RTCStatsMemberInterface { public: // Member value types. enum Type { - kBool, // bool - kInt32, // int32_t - kUint32, // uint32_t - kInt64, // int64_t - kUint64, // uint64_t - kDouble, // double - kString, // std::string + kBool, // bool + kInt32, // int32_t + kUint32, // uint32_t + kInt64, // int64_t + kUint64, // uint64_t + kDouble, // double + kString, // std::string - kSequenceBool, // std::vector - kSequenceInt32, // std::vector - kSequenceUint32, // std::vector - kSequenceInt64, // std::vector - kSequenceUint64, // std::vector - kSequenceDouble, // std::vector - kSequenceString, // std::vector + kSequenceBool, // std::vector + kSequenceInt32, // std::vector + kSequenceUint32, // std::vector + kSequenceInt64, // std::vector + kSequenceUint64, // std::vector + kSequenceDouble, // std::vector + kSequenceString, // std::vector }; virtual ~RTCStatsMemberInterface() {} @@ -215,6 +211,9 @@ class RTCStatsMemberInterface { virtual bool is_sequence() const = 0; virtual bool is_string() const = 0; bool is_defined() const { return is_defined_; } + // Is this part of the stats spec? Used so that chromium can easily filter + // out anything unstandardized. + virtual bool is_standardized() const = 0; // Type and value comparator. The names are not compared. These operators are // exposed for testing. virtual bool operator==(const RTCStatsMemberInterface& other) const = 0; @@ -222,8 +221,14 @@ class RTCStatsMemberInterface { return !(*this == other); } virtual std::string ValueToString() const = 0; + // This is the same as ValueToString except for kInt64 and kUint64 types, + // where the value is represented as a double instead of as an integer. + // Since JSON stores numbers as floating point numbers, very large integers + // cannot be accurately represented, so we prefer to display them as doubles + // instead. + virtual std::string ValueToJson() const = 0; - template + template const T& cast_to() const { RTC_DCHECK_EQ(type(), T::kType); return static_cast(*this); @@ -241,19 +246,17 @@ class RTCStatsMemberInterface { // specialized in rtcstats.cc, using a different |T| results in a linker error // (undefined reference to |kType|). The supported types are the ones described // by |RTCStatsMemberInterface::Type|. -template +template class RTCStatsMember : public RTCStatsMemberInterface { public: static const Type kType; explicit RTCStatsMember(const char* name) - : RTCStatsMemberInterface(name, false), - value_() {} + : RTCStatsMemberInterface(name, /*is_defined=*/false), value_() {} RTCStatsMember(const char* name, const T& value) - : RTCStatsMemberInterface(name, true), - value_(value) {} + : RTCStatsMemberInterface(name, /*is_defined=*/true), value_(value) {} RTCStatsMember(const char* name, T&& value) - : RTCStatsMemberInterface(name, true), + : RTCStatsMemberInterface(name, /*is_defined=*/true), value_(std::move(value)) {} explicit RTCStatsMember(const RTCStatsMember& other) : RTCStatsMemberInterface(other.name_, other.is_defined_), @@ -265,8 +268,9 @@ class RTCStatsMember : public RTCStatsMemberInterface { Type type() const override { return kType; } bool is_sequence() const override; bool is_string() const override; + bool is_standardized() const override { return true; } bool operator==(const RTCStatsMemberInterface& other) const override { - if (type() != other.type()) + if (type() != other.type() || is_standardized() != other.is_standardized()) return false; const RTCStatsMember& other_t = static_cast&>(other); @@ -277,6 +281,7 @@ class RTCStatsMember : public RTCStatsMemberInterface { return value_ == other_t.value_; } std::string ValueToString() const override; + std::string ValueToJson() const override; // Assignment operators. T& operator=(const T& value) { @@ -291,7 +296,10 @@ class RTCStatsMember : public RTCStatsMemberInterface { } T& operator=(const RTCStatsMember& other) { RTC_DCHECK(other.is_defined_); - value_ = other.is_defined_; + // Shouldn't be attempting to assign an RTCNonStandardStatsMember to an + // RTCStatsMember or vice versa. + RTC_DCHECK(is_standardized() == other.is_standardized()); + value_ = other.value_; is_defined_ = true; return value_; } @@ -320,6 +328,26 @@ class RTCStatsMember : public RTCStatsMemberInterface { T value_; }; +// Same as above, but "is_standardized" returns false. +// +// Using inheritance just so that it's obvious from the member's declaration +// whether it's standardized or not. +template +class RTCNonStandardStatsMember : public RTCStatsMember { + public: + explicit RTCNonStandardStatsMember(const char* name) + : RTCStatsMember(name) {} + RTCNonStandardStatsMember(const char* name, const T& value) + : RTCStatsMember(name, value) {} + RTCNonStandardStatsMember(const char* name, T&& value) + : RTCStatsMember(name, std::move(value)) {} + explicit RTCNonStandardStatsMember(const RTCNonStandardStatsMember& other) + : RTCStatsMember(other) {} + explicit RTCNonStandardStatsMember(RTCNonStandardStatsMember&& other) + : RTCStatsMember(std::move(other)) {} + + bool is_standardized() const override { return false; } +}; } // namespace webrtc -#endif // WEBRTC_API_STATS_RTCSTATS_H_ +#endif // API_STATS_RTCSTATS_H_ diff --git a/WebRtcNative/include/webrtc/api/stats/rtcstats_objects.h b/WebRtcNative/include/webrtc/api/stats/rtcstats_objects.h new file mode 100644 index 00000000..7e6bcd32 --- /dev/null +++ b/WebRtcNative/include/webrtc/api/stats/rtcstats_objects.h @@ -0,0 +1,445 @@ +/* + * Copyright 2016 The WebRTC Project Authors. All rights reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + +#ifndef API_STATS_RTCSTATS_OBJECTS_H_ +#define API_STATS_RTCSTATS_OBJECTS_H_ + +#include +#include +#include + +#include "api/stats/rtcstats.h" + +namespace webrtc { + +// https://w3c.github.io/webrtc-pc/#idl-def-rtcdatachannelstate +struct RTCDataChannelState { + static const char* const kConnecting; + static const char* const kOpen; + static const char* const kClosing; + static const char* const kClosed; +}; + +// https://w3c.github.io/webrtc-stats/#dom-rtcstatsicecandidatepairstate +struct RTCStatsIceCandidatePairState { + static const char* const kFrozen; + static const char* const kWaiting; + static const char* const kInProgress; + static const char* const kFailed; + static const char* const kSucceeded; +}; + +// https://w3c.github.io/webrtc-pc/#rtcicecandidatetype-enum +struct RTCIceCandidateType { + static const char* const kHost; + static const char* const kSrflx; + static const char* const kPrflx; + static const char* const kRelay; +}; + +// https://w3c.github.io/webrtc-pc/#idl-def-rtcdtlstransportstate +struct RTCDtlsTransportState { + static const char* const kNew; + static const char* const kConnecting; + static const char* const kConnected; + static const char* const kClosed; + static const char* const kFailed; +}; + +// |RTCMediaStreamTrackStats::kind| is not an enum in the spec but the only +// valid values are "audio" and "video". +// https://w3c.github.io/webrtc-stats/#dom-rtcmediastreamtrackstats-kind +struct RTCMediaStreamTrackKind { + static const char* const kAudio; + static const char* const kVideo; +}; + +// https://w3c.github.io/webrtc-stats/#dom-rtcnetworktype +struct RTCNetworkType { + static const char* const kBluetooth; + static const char* const kCellular; + static const char* const kEthernet; + static const char* const kWifi; + static const char* const kWimax; + static const char* const kVpn; + static const char* const kUnknown; +}; + +// https://w3c.github.io/webrtc-stats/#certificatestats-dict* +class RTCCertificateStats final : public RTCStats { + public: + WEBRTC_RTCSTATS_DECL(); + + RTCCertificateStats(const std::string& id, int64_t timestamp_us); + RTCCertificateStats(std::string&& id, int64_t timestamp_us); + RTCCertificateStats(const RTCCertificateStats& other); + ~RTCCertificateStats() override; + + RTCStatsMember fingerprint; + RTCStatsMember fingerprint_algorithm; + RTCStatsMember base64_certificate; + RTCStatsMember issuer_certificate_id; +}; + +// https://w3c.github.io/webrtc-stats/#codec-dict* +class RTCCodecStats final : public RTCStats { + public: + WEBRTC_RTCSTATS_DECL(); + + RTCCodecStats(const std::string& id, int64_t timestamp_us); + RTCCodecStats(std::string&& id, int64_t timestamp_us); + RTCCodecStats(const RTCCodecStats& other); + ~RTCCodecStats() override; + + RTCStatsMember payload_type; + RTCStatsMember mime_type; + RTCStatsMember clock_rate; + // TODO(hbos): Collect and populate this value. https://bugs.webrtc.org/7061 + RTCStatsMember channels; + // TODO(hbos): Collect and populate this value. https://bugs.webrtc.org/7061 + RTCStatsMember sdp_fmtp_line; + // TODO(hbos): Collect and populate this value. https://bugs.webrtc.org/7061 + RTCStatsMember implementation; +}; + +// https://w3c.github.io/webrtc-stats/#dcstats-dict* +class RTCDataChannelStats final : public RTCStats { + public: + WEBRTC_RTCSTATS_DECL(); + + RTCDataChannelStats(const std::string& id, int64_t timestamp_us); + RTCDataChannelStats(std::string&& id, int64_t timestamp_us); + RTCDataChannelStats(const RTCDataChannelStats& other); + ~RTCDataChannelStats() override; + + RTCStatsMember label; + RTCStatsMember protocol; + RTCStatsMember datachannelid; + // TODO(hbos): Support enum types? "RTCStatsMember"? + RTCStatsMember state; + RTCStatsMember messages_sent; + RTCStatsMember bytes_sent; + RTCStatsMember messages_received; + RTCStatsMember bytes_received; +}; + +// https://w3c.github.io/webrtc-stats/#candidatepair-dict* +// TODO(hbos): Tracking bug https://bugs.webrtc.org/7062 +class RTCIceCandidatePairStats final : public RTCStats { + public: + WEBRTC_RTCSTATS_DECL(); + + RTCIceCandidatePairStats(const std::string& id, int64_t timestamp_us); + RTCIceCandidatePairStats(std::string&& id, int64_t timestamp_us); + RTCIceCandidatePairStats(const RTCIceCandidatePairStats& other); + ~RTCIceCandidatePairStats() override; + + RTCStatsMember transport_id; + RTCStatsMember local_candidate_id; + RTCStatsMember remote_candidate_id; + // TODO(hbos): Support enum types? + // "RTCStatsMember"? + RTCStatsMember state; + RTCStatsMember priority; + RTCStatsMember nominated; + // TODO(hbos): Collect this the way the spec describes it. We have a value for + // it but it is not spec-compliant. https://bugs.webrtc.org/7062 + RTCStatsMember writable; + // TODO(hbos): Collect and populate this value. https://bugs.webrtc.org/7062 + RTCStatsMember readable; + RTCStatsMember bytes_sent; + RTCStatsMember bytes_received; + RTCStatsMember total_round_trip_time; + RTCStatsMember current_round_trip_time; + RTCStatsMember available_outgoing_bitrate; + // TODO(hbos): Populate this value. It is wired up and collected the same way + // "VideoBwe.googAvailableReceiveBandwidth" is, but that value is always + // undefined. https://bugs.webrtc.org/7062 + RTCStatsMember available_incoming_bitrate; + RTCStatsMember requests_received; + RTCStatsMember requests_sent; + RTCStatsMember responses_received; + RTCStatsMember responses_sent; + // TODO(hbos): Collect and populate this value. https://bugs.webrtc.org/7062 + RTCStatsMember retransmissions_received; + // TODO(hbos): Collect and populate this value. https://bugs.webrtc.org/7062 + RTCStatsMember retransmissions_sent; + // TODO(hbos): Collect and populate this value. https://bugs.webrtc.org/7062 + RTCStatsMember consent_requests_received; + RTCStatsMember consent_requests_sent; + // TODO(hbos): Collect and populate this value. https://bugs.webrtc.org/7062 + RTCStatsMember consent_responses_received; + // TODO(hbos): Collect and populate this value. https://bugs.webrtc.org/7062 + RTCStatsMember consent_responses_sent; +}; + +// https://w3c.github.io/webrtc-stats/#icecandidate-dict* +// TODO(hbos): |RTCStatsCollector| only collects candidates that are part of +// ice candidate pairs, but there could be candidates not paired with anything. +// crbug.com/632723 +// TODO(qingsi): Add the stats of STUN binding requests (keepalives) and collect +// them in the new PeerConnection::GetStats. +class RTCIceCandidateStats : public RTCStats { + public: + WEBRTC_RTCSTATS_DECL(); + + RTCIceCandidateStats(const RTCIceCandidateStats& other); + ~RTCIceCandidateStats() override; + + RTCStatsMember transport_id; + RTCStatsMember is_remote; + RTCStatsMember network_type; + RTCStatsMember ip; + RTCStatsMember port; + RTCStatsMember protocol; + // TODO(hbos): Support enum types? "RTCStatsMember"? + RTCStatsMember candidate_type; + RTCStatsMember priority; + // TODO(hbos): Not collected by |RTCStatsCollector|. crbug.com/632723 + RTCStatsMember url; + // TODO(hbos): |deleted = true| case is not supported by |RTCStatsCollector|. + // crbug.com/632723 + RTCStatsMember deleted; // = false + + protected: + RTCIceCandidateStats(const std::string& id, + int64_t timestamp_us, + bool is_remote); + RTCIceCandidateStats(std::string&& id, int64_t timestamp_us, bool is_remote); +}; + +// In the spec both local and remote varieties are of type RTCIceCandidateStats. +// But here we define them as subclasses of |RTCIceCandidateStats| because the +// |kType| need to be different ("RTCStatsType type") in the local/remote case. +// https://w3c.github.io/webrtc-stats/#rtcstatstype-str* +// This forces us to have to override copy() and type(). +class RTCLocalIceCandidateStats final : public RTCIceCandidateStats { + public: + static const char kType[]; + RTCLocalIceCandidateStats(const std::string& id, int64_t timestamp_us); + RTCLocalIceCandidateStats(std::string&& id, int64_t timestamp_us); + std::unique_ptr copy() const override; + const char* type() const override; +}; + +class RTCRemoteIceCandidateStats final : public RTCIceCandidateStats { + public: + static const char kType[]; + RTCRemoteIceCandidateStats(const std::string& id, int64_t timestamp_us); + RTCRemoteIceCandidateStats(std::string&& id, int64_t timestamp_us); + std::unique_ptr copy() const override; + const char* type() const override; +}; + +// https://w3c.github.io/webrtc-stats/#msstats-dict* +// TODO(hbos): Tracking bug crbug.com/660827 +class RTCMediaStreamStats final : public RTCStats { + public: + WEBRTC_RTCSTATS_DECL(); + + RTCMediaStreamStats(const std::string& id, int64_t timestamp_us); + RTCMediaStreamStats(std::string&& id, int64_t timestamp_us); + RTCMediaStreamStats(const RTCMediaStreamStats& other); + ~RTCMediaStreamStats() override; + + RTCStatsMember stream_identifier; + RTCStatsMember> track_ids; +}; + +// https://w3c.github.io/webrtc-stats/#mststats-dict* +// TODO(hbos): Tracking bug crbug.com/659137 +class RTCMediaStreamTrackStats final : public RTCStats { + public: + WEBRTC_RTCSTATS_DECL(); + + RTCMediaStreamTrackStats(const std::string& id, + int64_t timestamp_us, + const char* kind); + RTCMediaStreamTrackStats(std::string&& id, + int64_t timestamp_us, + const char* kind); + RTCMediaStreamTrackStats(const RTCMediaStreamTrackStats& other); + ~RTCMediaStreamTrackStats() override; + + RTCStatsMember track_identifier; + RTCStatsMember remote_source; + RTCStatsMember ended; + // TODO(hbos): |RTCStatsCollector| does not return stats for detached tracks. + // crbug.com/659137 + RTCStatsMember detached; + // See |RTCMediaStreamTrackKind| for valid values. + RTCStatsMember kind; + // TODO(gustaf): Implement jitter_buffer_delay for video (currently + // implemented for audio only). + // https://crbug.com/webrtc/8318 + RTCStatsMember jitter_buffer_delay; + // Video-only members + RTCStatsMember frame_width; + RTCStatsMember frame_height; + // TODO(hbos): Not collected by |RTCStatsCollector|. crbug.com/659137 + RTCStatsMember frames_per_second; + RTCStatsMember frames_sent; + RTCStatsMember huge_frames_sent; + RTCStatsMember frames_received; + RTCStatsMember frames_decoded; + RTCStatsMember frames_dropped; + // TODO(hbos): Not collected by |RTCStatsCollector|. crbug.com/659137 + RTCStatsMember frames_corrupted; + // TODO(hbos): Not collected by |RTCStatsCollector|. crbug.com/659137 + RTCStatsMember partial_frames_lost; + // TODO(hbos): Not collected by |RTCStatsCollector|. crbug.com/659137 + RTCStatsMember full_frames_lost; + // Audio-only members + RTCStatsMember audio_level; + RTCStatsMember total_audio_energy; + RTCStatsMember echo_return_loss; + RTCStatsMember echo_return_loss_enhancement; + RTCStatsMember total_samples_received; + RTCStatsMember total_samples_duration; + RTCStatsMember concealed_samples; + RTCStatsMember concealment_events; +}; + +// https://w3c.github.io/webrtc-stats/#pcstats-dict* +class RTCPeerConnectionStats final : public RTCStats { + public: + WEBRTC_RTCSTATS_DECL(); + + RTCPeerConnectionStats(const std::string& id, int64_t timestamp_us); + RTCPeerConnectionStats(std::string&& id, int64_t timestamp_us); + RTCPeerConnectionStats(const RTCPeerConnectionStats& other); + ~RTCPeerConnectionStats() override; + + RTCStatsMember data_channels_opened; + RTCStatsMember data_channels_closed; +}; + +// https://w3c.github.io/webrtc-stats/#streamstats-dict* +// TODO(hbos): Tracking bug crbug.com/657854 +class RTCRTPStreamStats : public RTCStats { + public: + WEBRTC_RTCSTATS_DECL(); + + RTCRTPStreamStats(const RTCRTPStreamStats& other); + ~RTCRTPStreamStats() override; + + RTCStatsMember ssrc; + // TODO(hbos): When the remote case is supported |RTCStatsCollector| needs to + // set this. crbug.com/657855, 657856 + RTCStatsMember associate_stats_id; + // TODO(hbos): Remote case not supported by |RTCStatsCollector|. + // crbug.com/657855, 657856 + RTCStatsMember is_remote; // = false + RTCStatsMember media_type; + RTCStatsMember track_id; + RTCStatsMember transport_id; + RTCStatsMember codec_id; + // FIR and PLI counts are only defined for |media_type == "video"|. + RTCStatsMember fir_count; + RTCStatsMember pli_count; + // TODO(hbos): NACK count should be collected by |RTCStatsCollector| for both + // audio and video but is only defined in the "video" case. crbug.com/657856 + RTCStatsMember nack_count; + // TODO(hbos): Not collected by |RTCStatsCollector|. crbug.com/657854 + // SLI count is only defined for |media_type == "video"|. + RTCStatsMember sli_count; + RTCStatsMember qp_sum; + + protected: + RTCRTPStreamStats(const std::string& id, int64_t timestamp_us); + RTCRTPStreamStats(std::string&& id, int64_t timestamp_us); +}; + +// https://w3c.github.io/webrtc-stats/#inboundrtpstats-dict* +// TODO(hbos): Support the remote case |is_remote = true|. +// https://bugs.webrtc.org/7065 +class RTCInboundRTPStreamStats final : public RTCRTPStreamStats { + public: + WEBRTC_RTCSTATS_DECL(); + + RTCInboundRTPStreamStats(const std::string& id, int64_t timestamp_us); + RTCInboundRTPStreamStats(std::string&& id, int64_t timestamp_us); + RTCInboundRTPStreamStats(const RTCInboundRTPStreamStats& other); + ~RTCInboundRTPStreamStats() override; + + RTCStatsMember packets_received; + RTCStatsMember bytes_received; + RTCStatsMember packets_lost; // Signed per RFC 3550 + // TODO(hbos): Collect and populate this value for both "audio" and "video", + // currently not collected for "video". https://bugs.webrtc.org/7065 + RTCStatsMember jitter; + RTCStatsMember fraction_lost; + // TODO(hbos): Collect and populate this value. https://bugs.webrtc.org/7065 + RTCStatsMember round_trip_time; + // TODO(hbos): Collect and populate this value. https://bugs.webrtc.org/7065 + RTCStatsMember packets_discarded; + // TODO(hbos): Collect and populate this value. https://bugs.webrtc.org/7065 + RTCStatsMember packets_repaired; + // TODO(hbos): Collect and populate this value. https://bugs.webrtc.org/7065 + RTCStatsMember burst_packets_lost; + // TODO(hbos): Collect and populate this value. https://bugs.webrtc.org/7065 + RTCStatsMember burst_packets_discarded; + // TODO(hbos): Collect and populate this value. https://bugs.webrtc.org/7065 + RTCStatsMember burst_loss_count; + // TODO(hbos): Collect and populate this value. https://bugs.webrtc.org/7065 + RTCStatsMember burst_discard_count; + // TODO(hbos): Collect and populate this value. https://bugs.webrtc.org/7065 + RTCStatsMember burst_loss_rate; + // TODO(hbos): Collect and populate this value. https://bugs.webrtc.org/7065 + RTCStatsMember burst_discard_rate; + // TODO(hbos): Collect and populate this value. https://bugs.webrtc.org/7065 + RTCStatsMember gap_loss_rate; + // TODO(hbos): Collect and populate this value. https://bugs.webrtc.org/7065 + RTCStatsMember gap_discard_rate; + RTCStatsMember frames_decoded; +}; + +// https://w3c.github.io/webrtc-stats/#outboundrtpstats-dict* +// TODO(hbos): Support the remote case |is_remote = true|. +// https://bugs.webrtc.org/7066 +class RTCOutboundRTPStreamStats final : public RTCRTPStreamStats { + public: + WEBRTC_RTCSTATS_DECL(); + + RTCOutboundRTPStreamStats(const std::string& id, int64_t timestamp_us); + RTCOutboundRTPStreamStats(std::string&& id, int64_t timestamp_us); + RTCOutboundRTPStreamStats(const RTCOutboundRTPStreamStats& other); + ~RTCOutboundRTPStreamStats() override; + + RTCStatsMember packets_sent; + RTCStatsMember bytes_sent; + // TODO(hbos): Collect and populate this value. https://bugs.webrtc.org/7066 + RTCStatsMember target_bitrate; + RTCStatsMember frames_encoded; +}; + +// https://w3c.github.io/webrtc-stats/#transportstats-dict* +class RTCTransportStats final : public RTCStats { + public: + WEBRTC_RTCSTATS_DECL(); + + RTCTransportStats(const std::string& id, int64_t timestamp_us); + RTCTransportStats(std::string&& id, int64_t timestamp_us); + RTCTransportStats(const RTCTransportStats& other); + ~RTCTransportStats() override; + + RTCStatsMember bytes_sent; + RTCStatsMember bytes_received; + RTCStatsMember rtcp_transport_stats_id; + // TODO(hbos): Support enum types? "RTCStatsMember"? + RTCStatsMember dtls_state; + RTCStatsMember selected_candidate_pair_id; + RTCStatsMember local_certificate_id; + RTCStatsMember remote_certificate_id; +}; + +} // namespace webrtc + +#endif // API_STATS_RTCSTATS_OBJECTS_H_ diff --git a/WebRtcNative/include/webrtc/api/stats/rtcstatscollectorcallback.h b/WebRtcNative/include/webrtc/api/stats/rtcstatscollectorcallback.h new file mode 100644 index 00000000..92422176 --- /dev/null +++ b/WebRtcNative/include/webrtc/api/stats/rtcstatscollectorcallback.h @@ -0,0 +1,30 @@ +/* + * Copyright 2016 The WebRTC Project Authors. All rights reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + +#ifndef API_STATS_RTCSTATSCOLLECTORCALLBACK_H_ +#define API_STATS_RTCSTATSCOLLECTORCALLBACK_H_ + +#include "api/stats/rtcstatsreport.h" +#include "rtc_base/refcount.h" +#include "rtc_base/scoped_ref_ptr.h" + +namespace webrtc { + +class RTCStatsCollectorCallback : public virtual rtc::RefCountInterface { + public: + ~RTCStatsCollectorCallback() override = default; + + virtual void OnStatsDelivered( + const rtc::scoped_refptr& report) = 0; +}; + +} // namespace webrtc + +#endif // API_STATS_RTCSTATSCOLLECTORCALLBACK_H_ diff --git a/WebRtc.NET/include/webrtc/api/stats/rtcstatsreport.h b/WebRtcNative/include/webrtc/api/stats/rtcstatsreport.h similarity index 81% rename from WebRtc.NET/include/webrtc/api/stats/rtcstatsreport.h rename to WebRtcNative/include/webrtc/api/stats/rtcstatsreport.h index 6d9ae6df..f7410b39 100644 --- a/WebRtc.NET/include/webrtc/api/stats/rtcstatsreport.h +++ b/WebRtcNative/include/webrtc/api/stats/rtcstatsreport.h @@ -8,17 +8,18 @@ * be found in the AUTHORS file in the root of the source tree. */ -#ifndef WEBRTC_API_STATS_RTCSTATSREPORT_H_ -#define WEBRTC_API_STATS_RTCSTATSREPORT_H_ +#ifndef API_STATS_RTCSTATSREPORT_H_ +#define API_STATS_RTCSTATSREPORT_H_ #include #include #include #include -#include "webrtc/api/stats/rtcstats.h" -#include "webrtc/base/refcount.h" -#include "webrtc/base/scoped_ref_ptr.h" +#include "api/stats/rtcstats.h" +#include "rtc_base/refcount.h" +#include "rtc_base/refcountedobject.h" +#include "rtc_base/scoped_ref_ptr.h" namespace webrtc { @@ -56,12 +57,16 @@ class RTCStatsReport : public rtc::RefCountInterface { explicit RTCStatsReport(int64_t timestamp_us); RTCStatsReport(const RTCStatsReport& other) = delete; + rtc::scoped_refptr Copy() const; int64_t timestamp_us() const { return timestamp_us_; } void AddStats(std::unique_ptr stats); const RTCStats* Get(const std::string& id) const; size_t size() const { return stats_.size(); } + // Removes the stats object from the report, returning ownership of it or null + // if there is no object with |id|. + std::unique_ptr Take(const std::string& id); // Takes ownership of all the stats in |victim|, leaving it empty. void TakeMembersFrom(rtc::scoped_refptr victim); @@ -71,7 +76,7 @@ class RTCStatsReport : public rtc::RefCountInterface { // Gets the subset of stats that are of type |T|, where |T| is any class // descending from |RTCStats|. - template + template std::vector GetStatsOfType() const { std::vector stats_of_type; for (const RTCStats& stats : *this) { @@ -81,9 +86,9 @@ class RTCStatsReport : public rtc::RefCountInterface { return stats_of_type; } - // Creates a human readable string representation of the report, listing all - // of its stats objects. - std::string ToString() const; + // Creates a JSON readable string representation of the report, + // listing all of its stats objects. + std::string ToJson() const; friend class rtc::RefCountedObject; @@ -96,4 +101,4 @@ class RTCStatsReport : public rtc::RefCountInterface { } // namespace webrtc -#endif // WEBRTC_API_STATS_RTCSTATSREPORT_H_ +#endif // API_STATS_RTCSTATSREPORT_H_ diff --git a/WebRtc.NET/include/webrtc/api/statstypes.h b/WebRtcNative/include/webrtc/api/statstypes.h similarity index 88% rename from WebRtc.NET/include/webrtc/api/statstypes.h rename to WebRtcNative/include/webrtc/api/statstypes.h index 788c2c40..e249d002 100644 --- a/WebRtc.NET/include/webrtc/api/statstypes.h +++ b/WebRtcNative/include/webrtc/api/statstypes.h @@ -11,21 +11,20 @@ // This file contains structures used for retrieving statistics from an ongoing // libjingle session. -#ifndef WEBRTC_API_STATSTYPES_H_ -#define WEBRTC_API_STATSTYPES_H_ +#ifndef API_STATSTYPES_H_ +#define API_STATSTYPES_H_ #include #include #include #include +#include -#include "webrtc/base/basictypes.h" -#include "webrtc/base/common.h" -#include "webrtc/base/constructormagic.h" -#include "webrtc/base/refcount.h" -#include "webrtc/base/scoped_ref_ptr.h" -#include "webrtc/base/stringencode.h" -#include "webrtc/base/thread_checker.h" +#include "rtc_base/constructormagic.h" +#include "rtc_base/refcount.h" +#include "rtc_base/scoped_ref_ptr.h" +#include "rtc_base/stringencode.h" +#include "rtc_base/thread_checker.h" namespace webrtc { @@ -104,9 +103,13 @@ class StatsReport { kStatsValueNameBytesReceived, kStatsValueNameBytesSent, kStatsValueNameCodecImplementationName, + kStatsValueNameConcealedSamples, + kStatsValueNameConcealmentEvents, kStatsValueNameDataChannelId, kStatsValueNameFramesDecoded, + kStatsValueNameFramesRendered, kStatsValueNameFramesEncoded, + kStatsValueNameJitterBufferDelay, kStatsValueNameMediaType, kStatsValueNamePacketsLost, kStatsValueNamePacketsReceived, @@ -117,12 +120,19 @@ class StatsReport { kStatsValueNameSelectedCandidatePairId, kStatsValueNameSsrc, kStatsValueNameState, + kStatsValueNameTotalAudioEnergy, + kStatsValueNameTotalSamplesDuration, + kStatsValueNameTotalSamplesReceived, kStatsValueNameTransportId, kStatsValueNameSentPingRequestsTotal, kStatsValueNameSentPingRequestsBeforeFirstResponse, kStatsValueNameSentPingResponses, kStatsValueNameRecvPingRequests, kStatsValueNameRecvPingResponses, + kStatsValueNameSentStunKeepaliveRequests, + kStatsValueNameRecvStunKeepaliveResponses, + kStatsValueNameStunKeepaliveRttTotal, + kStatsValueNameStunKeepaliveRttSquaredTotal, // Internal StatsValue names. kStatsValueNameAccelerateRate, @@ -144,6 +154,7 @@ class StatsReport { kStatsValueNameCodecName, kStatsValueNameComponent, kStatsValueNameContentName, + kStatsValueNameContentType, kStatsValueNameCpuLimitedResolution, kStatsValueNameCurrentDelayMs, kStatsValueNameDecodeMs, @@ -156,7 +167,6 @@ class StatsReport { kStatsValueNameDecodingPLCCNG, kStatsValueNameDer, kStatsValueNameDtlsCipher, - kStatsValueNameEchoCancellationQualityMin, kStatsValueNameEchoDelayMedian, kStatsValueNameEchoDelayStdDev, kStatsValueNameEchoReturnLoss, @@ -178,7 +188,10 @@ class StatsReport { kStatsValueNameFrameWidthInput, kStatsValueNameFrameWidthReceived, kStatsValueNameFrameWidthSent, + kStatsValueNameHasEnteredLowResolution, + kStatsValueNameHugeFramesSent, kStatsValueNameInitiator, + kStatsValueNameInterframeDelayMaxMs, // Max over last 10 seconds. kStatsValueNameIssuerId, kStatsValueNameJitterBufferMs, kStatsValueNameJitterReceived, @@ -202,14 +215,23 @@ class StatsReport { kStatsValueNameRenderDelayMs, kStatsValueNameResidualEchoLikelihood, kStatsValueNameResidualEchoLikelihoodRecentMax, + kStatsValueNameAnaBitrateActionCounter, + kStatsValueNameAnaChannelActionCounter, + kStatsValueNameAnaDtxActionCounter, + kStatsValueNameAnaFecActionCounter, + kStatsValueNameAnaFrameLengthIncreaseCounter, + kStatsValueNameAnaFrameLengthDecreaseCounter, + kStatsValueNameAnaUplinkPacketLossFraction, kStatsValueNameRetransmitBitrate, kStatsValueNameRtt, kStatsValueNameSecondaryDecodedRate, + kStatsValueNameSecondaryDiscardedRate, kStatsValueNameSendPacketsDiscarded, kStatsValueNameSpeechExpandRate, kStatsValueNameSrtpCipher, kStatsValueNameTargetDelayMs, kStatsValueNameTargetEncBitrate, + kStatsValueNameTimingFrameInfo, // Result of |TimingFrameInfo::ToString| kStatsValueNameTrackId, kStatsValueNameTransmitBitrate, kStatsValueNameTransportType, @@ -235,7 +257,7 @@ class StatsReport { // Protected since users of the IdBase type will be using the Id typedef. virtual bool Equals(const IdBase& other) const; - IdBase(StatsType type); // Only meant for derived classes. + explicit IdBase(StatsType type); // Only meant for derived classes. const StatsType type_; static const char kSeparator = '_'; @@ -320,7 +342,7 @@ class StatsReport { private: rtc::ThreadChecker thread_checker_; - mutable int ref_count_ ACCESS_ON(thread_checker_) = 0; + mutable int ref_count_ RTC_GUARDED_BY(thread_checker_) = 0; const Type type_; // TODO(tommi): Use C++ 11 union and make value_ const. @@ -342,18 +364,20 @@ class StatsReport { // Ownership of |id| is passed to |this|. explicit StatsReport(const Id& id); + ~StatsReport(); // Factory functions for various types of stats IDs. static Id NewBandwidthEstimationId(); static Id NewTypedId(StatsType type, const std::string& id); static Id NewTypedIntId(StatsType type, int id); - static Id NewIdWithDirection( - StatsType type, const std::string& id, Direction direction); + static Id NewIdWithDirection(StatsType type, + const std::string& id, + Direction direction); static Id NewCandidateId(bool local, const std::string& id); - static Id NewComponentId( - const std::string& content_name, int component); - static Id NewCandidatePairId( - const std::string& content_name, int component, int index); + static Id NewComponentId(const std::string& content_name, int component); + static Id NewCandidatePairId(const std::string& content_name, + int component, + int index); const Id& id() const { return id_; } StatsType type() const { return id_->type(); } @@ -414,7 +438,7 @@ class StatsCollection { StatsReport* FindOrAddNew(const StatsReport::Id& id); StatsReport* ReplaceOrAddNew(const StatsReport::Id& id); - // Looks for a report with the given |id|. If one is not found, NULL + // Looks for a report with the given |id|. If one is not found, null // will be returned. StatsReport* Find(const StatsReport::Id& id); @@ -425,4 +449,4 @@ class StatsCollection { } // namespace webrtc -#endif // WEBRTC_API_STATSTYPES_H_ +#endif // API_STATSTYPES_H_ diff --git a/WebRtcNative/include/webrtc/api/test/audioproc_float.h b/WebRtcNative/include/webrtc/api/test/audioproc_float.h new file mode 100644 index 00000000..25e4dd5b --- /dev/null +++ b/WebRtcNative/include/webrtc/api/test/audioproc_float.h @@ -0,0 +1,42 @@ +/* + * Copyright (c) 2018 The WebRTC project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + +#ifndef API_TEST_AUDIOPROC_FLOAT_H_ +#define API_TEST_AUDIOPROC_FLOAT_H_ + +#include + +#include "modules/audio_processing/include/audio_processing.h" + +namespace webrtc { +namespace test { + +// This is an interface for the audio processing simulation utility. This +// utility can be used to simulate the audioprocessing module using a recording +// (either an AEC dump or wav files), and generate the output as a wav file. +// The |ap_builder| object will be used to create the AudioProcessing instance +// that is used during the simulation. The |ap_builder| supports setting of +// injectable components, which will be passed on to the created AudioProcessing +// instance. It is needed to pass the command line flags as |argc| and |argv|, +// so these can be interpreted properly by the utility. +// To get a fully-working audioproc_f utility, all that is needed is to write a +// main function, create an AudioProcessingBuilder, optionally set custom +// processing components on it, and pass the builder together with the command +// line arguments into this function. +// To see a list of all supported command line flags, run the executable with +// the '--help' flag. +int AudioprocFloat(std::unique_ptr ap_builder, + int argc, + char* argv[]); + +} // namespace test +} // namespace webrtc + +#endif // API_TEST_AUDIOPROC_FLOAT_H_ diff --git a/WebRtcNative/include/webrtc/api/test/create_simulcast_test_fixture.h b/WebRtcNative/include/webrtc/api/test/create_simulcast_test_fixture.h new file mode 100644 index 00000000..87f229c0 --- /dev/null +++ b/WebRtcNative/include/webrtc/api/test/create_simulcast_test_fixture.h @@ -0,0 +1,32 @@ +/* + * Copyright (c) 2018 The WebRTC project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + +#ifndef API_TEST_CREATE_SIMULCAST_TEST_FIXTURE_H_ +#define API_TEST_CREATE_SIMULCAST_TEST_FIXTURE_H_ + +#include + +#include "api/test/simulcast_test_fixture.h" +#include "api/video_codecs/sdp_video_format.h" +#include "api/video_codecs/video_decoder_factory.h" +#include "api/video_codecs/video_encoder_factory.h" + +namespace webrtc { +namespace test { + +std::unique_ptr CreateSimulcastTestFixture( + std::unique_ptr encoder_factory, + std::unique_ptr decoder_factory, + SdpVideoFormat video_format); + +} // namespace test +} // namespace webrtc + +#endif // API_TEST_CREATE_SIMULCAST_TEST_FIXTURE_H_ diff --git a/WebRtcNative/include/webrtc/api/test/create_video_quality_test_fixture.h b/WebRtcNative/include/webrtc/api/test/create_video_quality_test_fixture.h new file mode 100644 index 00000000..07c222f1 --- /dev/null +++ b/WebRtcNative/include/webrtc/api/test/create_video_quality_test_fixture.h @@ -0,0 +1,29 @@ +/* + * Copyright (c) 2018 The WebRTC project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ +#ifndef API_TEST_CREATE_VIDEO_QUALITY_TEST_FIXTURE_H_ +#define API_TEST_CREATE_VIDEO_QUALITY_TEST_FIXTURE_H_ + +#include + +#include "api/fec_controller.h" +#include "api/test/video_quality_test_fixture.h" + +namespace webrtc { + +std::unique_ptr +CreateVideoQualityTestFixture(); + +std::unique_ptr +CreateVideoQualityTestFixture( + std::unique_ptr fec_controller_factory); + +} + +#endif // API_TEST_CREATE_VIDEO_QUALITY_TEST_FIXTURE_H_ diff --git a/WebRtcNative/include/webrtc/api/test/create_videocodec_test_fixture.h b/WebRtcNative/include/webrtc/api/test/create_videocodec_test_fixture.h new file mode 100644 index 00000000..7a44f6b0 --- /dev/null +++ b/WebRtcNative/include/webrtc/api/test/create_videocodec_test_fixture.h @@ -0,0 +1,34 @@ +/* + * Copyright (c) 2018 The WebRTC project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + +#ifndef API_TEST_CREATE_VIDEOCODEC_TEST_FIXTURE_H_ +#define API_TEST_CREATE_VIDEOCODEC_TEST_FIXTURE_H_ + +#include + +#include "api/test/videocodec_test_fixture.h" +#include "api/video_codecs/video_decoder_factory.h" +#include "api/video_codecs/video_encoder_factory.h" + +namespace webrtc { +namespace test { + +std::unique_ptr CreateVideoCodecTestFixture( + const VideoCodecTestFixture::Config& config); + +std::unique_ptr CreateVideoCodecTestFixture( + const VideoCodecTestFixture::Config& config, + std::unique_ptr decoder_factory, + std::unique_ptr encoder_factory); + +} // namespace test +} // namespace webrtc + +#endif // API_TEST_CREATE_VIDEOCODEC_TEST_FIXTURE_H_ diff --git a/WebRtc.NET/include/webrtc/api/test/fakeconstraints.h b/WebRtcNative/include/webrtc/api/test/fakeconstraints.h similarity index 86% rename from WebRtc.NET/include/webrtc/api/test/fakeconstraints.h rename to WebRtcNative/include/webrtc/api/test/fakeconstraints.h index 82c6728c..429826cc 100644 --- a/WebRtc.NET/include/webrtc/api/test/fakeconstraints.h +++ b/WebRtcNative/include/webrtc/api/test/fakeconstraints.h @@ -8,29 +8,25 @@ * be found in the AUTHORS file in the root of the source tree. */ -#ifndef WEBRTC_API_TEST_FAKECONSTRAINTS_H_ -#define WEBRTC_API_TEST_FAKECONSTRAINTS_H_ +#ifndef API_TEST_FAKECONSTRAINTS_H_ +#define API_TEST_FAKECONSTRAINTS_H_ #include #include -#include "webrtc/api/mediaconstraintsinterface.h" -#include "webrtc/base/stringencode.h" +#include "api/mediaconstraintsinterface.h" +#include "rtc_base/stringencode.h" namespace webrtc { class FakeConstraints : public webrtc::MediaConstraintsInterface { public: - FakeConstraints() { } - virtual ~FakeConstraints() { } + FakeConstraints() {} + virtual ~FakeConstraints() {} - virtual const Constraints& GetMandatory() const { - return mandatory_; - } + virtual const Constraints& GetMandatory() const { return mandatory_; } - virtual const Constraints& GetOptional() const { - return optional_; - } + virtual const Constraints& GetOptional() const { return optional_; } template void AddMandatory(const std::string& key, const T& value) { @@ -113,4 +109,4 @@ class FakeConstraints : public webrtc::MediaConstraintsInterface { } // namespace webrtc -#endif // WEBRTC_API_TEST_FAKECONSTRAINTS_H_ +#endif // API_TEST_FAKECONSTRAINTS_H_ diff --git a/WebRtc.NET/include/webrtc/api/test/mock_audio_mixer.h b/WebRtcNative/include/webrtc/api/test/mock_audio_mixer.h similarity index 79% rename from WebRtc.NET/include/webrtc/api/test/mock_audio_mixer.h rename to WebRtcNative/include/webrtc/api/test/mock_audio_mixer.h index 189455ff..7a6c7420 100644 --- a/WebRtc.NET/include/webrtc/api/test/mock_audio_mixer.h +++ b/WebRtcNative/include/webrtc/api/test/mock_audio_mixer.h @@ -8,12 +8,12 @@ * be found in the AUTHORS file in the root of the source tree. */ -#ifndef WEBRTC_API_TEST_MOCK_AUDIO_MIXER_H_ -#define WEBRTC_API_TEST_MOCK_AUDIO_MIXER_H_ +#ifndef API_TEST_MOCK_AUDIO_MIXER_H_ +#define API_TEST_MOCK_AUDIO_MIXER_H_ -#include "webrtc/api/audio/audio_mixer.h" +#include "api/audio/audio_mixer.h" -#include "webrtc/test/gmock.h" +#include "test/gmock.h" namespace webrtc { namespace test { @@ -29,4 +29,4 @@ class MockAudioMixer : public AudioMixer { } // namespace test } // namespace webrtc -#endif // WEBRTC_API_TEST_MOCK_AUDIO_MIXER_H_ +#endif // API_TEST_MOCK_AUDIO_MIXER_H_ diff --git a/WebRtcNative/include/webrtc/api/test/mock_peerconnectioninterface.h b/WebRtcNative/include/webrtc/api/test/mock_peerconnectioninterface.h new file mode 100644 index 00000000..58ca7410 --- /dev/null +++ b/WebRtcNative/include/webrtc/api/test/mock_peerconnectioninterface.h @@ -0,0 +1,139 @@ +/* + * Copyright 2016 The WebRTC project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + +#ifndef API_TEST_MOCK_PEERCONNECTIONINTERFACE_H_ +#define API_TEST_MOCK_PEERCONNECTIONINTERFACE_H_ + +#include +#include +#include +#include + +#include "api/peerconnectioninterface.h" +#include "test/gmock.h" + +namespace webrtc { + +class MockPeerConnectionInterface + : public rtc::RefCountedObject { + public: + // PeerConnectionInterface + MOCK_METHOD0(local_streams, rtc::scoped_refptr()); + MOCK_METHOD0(remote_streams, rtc::scoped_refptr()); + MOCK_METHOD1(AddStream, bool(MediaStreamInterface*)); + MOCK_METHOD1(RemoveStream, void(MediaStreamInterface*)); + MOCK_METHOD2(AddTrack, + RTCErrorOr>( + rtc::scoped_refptr, + const std::vector&)); + MOCK_METHOD2(AddTrack, + rtc::scoped_refptr( + MediaStreamTrackInterface*, + std::vector)); + MOCK_METHOD1(RemoveTrack, bool(RtpSenderInterface*)); + MOCK_METHOD1(AddTransceiver, + RTCErrorOr>( + rtc::scoped_refptr)); + MOCK_METHOD2(AddTransceiver, + RTCErrorOr>( + rtc::scoped_refptr, + const RtpTransceiverInit&)); + MOCK_METHOD1(AddTransceiver, + RTCErrorOr>( + cricket::MediaType)); + MOCK_METHOD2(AddTransceiver, + RTCErrorOr>( + cricket::MediaType, + const RtpTransceiverInit&)); + MOCK_METHOD2(CreateSender, + rtc::scoped_refptr(const std::string&, + const std::string&)); + MOCK_CONST_METHOD0(GetSenders, + std::vector>()); + MOCK_CONST_METHOD0(GetReceivers, + std::vector>()); + MOCK_CONST_METHOD0( + GetTransceivers, + std::vector>()); + MOCK_METHOD3(GetStats, + bool(StatsObserver*, + MediaStreamTrackInterface*, + StatsOutputLevel)); + MOCK_METHOD1(GetStats, void(RTCStatsCollectorCallback*)); + MOCK_METHOD2(GetStats, + void(rtc::scoped_refptr, + rtc::scoped_refptr)); + MOCK_METHOD2(GetStats, + void(rtc::scoped_refptr, + rtc::scoped_refptr)); + MOCK_METHOD0(ClearStatsCache, void()); + MOCK_METHOD2( + CreateDataChannel, + rtc::scoped_refptr(const std::string&, + const DataChannelInit*)); + MOCK_CONST_METHOD0(local_description, const SessionDescriptionInterface*()); + MOCK_CONST_METHOD0(remote_description, const SessionDescriptionInterface*()); + MOCK_CONST_METHOD0(current_local_description, + const SessionDescriptionInterface*()); + MOCK_CONST_METHOD0(current_remote_description, + const SessionDescriptionInterface*()); + MOCK_CONST_METHOD0(pending_local_description, + const SessionDescriptionInterface*()); + MOCK_CONST_METHOD0(pending_remote_description, + const SessionDescriptionInterface*()); + MOCK_METHOD2(CreateOffer, + void(CreateSessionDescriptionObserver*, + const MediaConstraintsInterface*)); + MOCK_METHOD2(CreateOffer, + void(CreateSessionDescriptionObserver*, + const RTCOfferAnswerOptions&)); + MOCK_METHOD2(CreateAnswer, + void(CreateSessionDescriptionObserver*, + const RTCOfferAnswerOptions&)); + MOCK_METHOD2(CreateAnswer, + void(CreateSessionDescriptionObserver*, + const MediaConstraintsInterface*)); + MOCK_METHOD2(SetLocalDescription, + void(SetSessionDescriptionObserver*, + SessionDescriptionInterface*)); + MOCK_METHOD2(SetRemoteDescription, + void(SetSessionDescriptionObserver*, + SessionDescriptionInterface*)); + MOCK_METHOD2(SetRemoteDescription, + void(std::unique_ptr, + rtc::scoped_refptr)); + MOCK_METHOD0(GetConfiguration, PeerConnectionInterface::RTCConfiguration()); + MOCK_METHOD2(SetConfiguration, + bool(const PeerConnectionInterface::RTCConfiguration&, + RTCError*)); + MOCK_METHOD1(SetConfiguration, + bool(const PeerConnectionInterface::RTCConfiguration&)); + MOCK_METHOD1(AddIceCandidate, bool(const IceCandidateInterface*)); + MOCK_METHOD1(RemoveIceCandidates, + bool(const std::vector&)); + MOCK_METHOD1(SetBitrate, RTCError(const BitrateSettings&)); + MOCK_METHOD1(SetBitrate, RTCError(const BitrateParameters&)); + MOCK_METHOD1(SetBitrateAllocationStrategy, + void(std::unique_ptr)); + MOCK_METHOD1(SetAudioPlayout, void(bool)); + MOCK_METHOD1(SetAudioRecording, void(bool)); + MOCK_METHOD0(signaling_state, SignalingState()); + MOCK_METHOD0(ice_connection_state, IceConnectionState()); + MOCK_METHOD0(ice_gathering_state, IceGatheringState()); + MOCK_METHOD2(StartRtcEventLog, bool(rtc::PlatformFile, int64_t)); + MOCK_METHOD2(StartRtcEventLog, + bool(std::unique_ptr, int64_t)); + MOCK_METHOD0(StopRtcEventLog, void()); + MOCK_METHOD0(Close, void()); +}; + +} // namespace webrtc + +#endif // API_TEST_MOCK_PEERCONNECTIONINTERFACE_H_ diff --git a/WebRtcNative/include/webrtc/api/test/mock_rtpreceiver.h b/WebRtcNative/include/webrtc/api/test/mock_rtpreceiver.h new file mode 100644 index 00000000..de69ceac --- /dev/null +++ b/WebRtcNative/include/webrtc/api/test/mock_rtpreceiver.h @@ -0,0 +1,38 @@ +/* + * Copyright 2016 The WebRTC project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + +#ifndef API_TEST_MOCK_RTPRECEIVER_H_ +#define API_TEST_MOCK_RTPRECEIVER_H_ + +#include +#include + +#include "api/rtpreceiverinterface.h" +#include "test/gmock.h" + +namespace webrtc { + +class MockRtpReceiver : public rtc::RefCountedObject { + public: + MOCK_METHOD1(SetTrack, void(MediaStreamTrackInterface*)); + MOCK_CONST_METHOD0(track, rtc::scoped_refptr()); + MOCK_CONST_METHOD0(streams, + std::vector>()); + MOCK_CONST_METHOD0(media_type, cricket::MediaType()); + MOCK_CONST_METHOD0(id, std::string()); + MOCK_CONST_METHOD0(GetParameters, RtpParameters()); + MOCK_METHOD1(SetParameters, bool(const RtpParameters&)); + MOCK_METHOD1(SetObserver, void(RtpReceiverObserverInterface*)); + MOCK_CONST_METHOD0(GetSources, std::vector()); +}; + +} // namespace webrtc + +#endif // API_TEST_MOCK_RTPRECEIVER_H_ diff --git a/WebRtcNative/include/webrtc/api/test/mock_rtpsender.h b/WebRtcNative/include/webrtc/api/test/mock_rtpsender.h new file mode 100644 index 00000000..22f391b8 --- /dev/null +++ b/WebRtcNative/include/webrtc/api/test/mock_rtpsender.h @@ -0,0 +1,37 @@ +/* + * Copyright 2016 The WebRTC project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + +#ifndef API_TEST_MOCK_RTPSENDER_H_ +#define API_TEST_MOCK_RTPSENDER_H_ + +#include +#include + +#include "api/rtpsenderinterface.h" +#include "test/gmock.h" + +namespace webrtc { + +class MockRtpSender : public rtc::RefCountedObject { + public: + MOCK_METHOD1(SetTrack, bool(MediaStreamTrackInterface*)); + MOCK_CONST_METHOD0(track, rtc::scoped_refptr()); + MOCK_CONST_METHOD0(ssrc, uint32_t()); + MOCK_CONST_METHOD0(media_type, cricket::MediaType()); + MOCK_CONST_METHOD0(id, std::string()); + MOCK_CONST_METHOD0(stream_ids, std::vector()); + MOCK_METHOD0(GetParameters, RtpParameters()); + MOCK_METHOD1(SetParameters, RTCError(const RtpParameters&)); + MOCK_CONST_METHOD0(GetDtmfSender, rtc::scoped_refptr()); +}; + +} // namespace webrtc + +#endif // API_TEST_MOCK_RTPSENDER_H_ diff --git a/WebRtcNative/include/webrtc/api/test/mock_video_bitrate_allocator.h b/WebRtcNative/include/webrtc/api/test/mock_video_bitrate_allocator.h new file mode 100644 index 00000000..d25537a2 --- /dev/null +++ b/WebRtcNative/include/webrtc/api/test/mock_video_bitrate_allocator.h @@ -0,0 +1,28 @@ +/* + * Copyright (c) 2018 The WebRTC project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + +#ifndef API_TEST_MOCK_VIDEO_BITRATE_ALLOCATOR_H_ +#define API_TEST_MOCK_VIDEO_BITRATE_ALLOCATOR_H_ + +#include "api/video/video_bitrate_allocator.h" +#include "test/gmock.h" + +namespace webrtc { + +class MockVideoBitrateAllocator : public webrtc::VideoBitrateAllocator { + MOCK_METHOD2(GetAllocation, + VideoBitrateAllocation(uint32_t total_bitrate, + uint32_t framerate)); + MOCK_METHOD1(GetPreferredBitrateBps, uint32_t(uint32_t framerate)); +}; + +} // namespace webrtc + +#endif // API_TEST_MOCK_VIDEO_BITRATE_ALLOCATOR_H_ diff --git a/WebRtcNative/include/webrtc/api/test/mock_video_decoder_factory.h b/WebRtcNative/include/webrtc/api/test/mock_video_decoder_factory.h new file mode 100644 index 00000000..915e3911 --- /dev/null +++ b/WebRtcNative/include/webrtc/api/test/mock_video_decoder_factory.h @@ -0,0 +1,42 @@ +/* + * Copyright (c) 2017 The WebRTC project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + +#ifndef API_TEST_MOCK_VIDEO_DECODER_FACTORY_H_ +#define API_TEST_MOCK_VIDEO_DECODER_FACTORY_H_ + +#include +#include + +#include "api/video_codecs/sdp_video_format.h" +#include "api/video_codecs/video_decoder_factory.h" +#include "test/gmock.h" + +namespace webrtc { + +class MockVideoDecoderFactory : public webrtc::VideoDecoderFactory { + public: + MOCK_CONST_METHOD0(GetSupportedFormats, + std::vector()); + + // We need to proxy to a return type that is copyable. + std::unique_ptr CreateVideoDecoder( + const webrtc::SdpVideoFormat& format) { + return std::unique_ptr( + CreateVideoDecoderProxy(format)); + } + MOCK_METHOD1(CreateVideoDecoderProxy, + webrtc::VideoDecoder*(const webrtc::SdpVideoFormat&)); + + MOCK_METHOD0(Die, void()); + ~MockVideoDecoderFactory() { Die(); } +}; +} // namespace webrtc + +#endif // API_TEST_MOCK_VIDEO_DECODER_FACTORY_H_ diff --git a/WebRtcNative/include/webrtc/api/test/mock_video_encoder_factory.h b/WebRtcNative/include/webrtc/api/test/mock_video_encoder_factory.h new file mode 100644 index 00000000..a694b636 --- /dev/null +++ b/WebRtcNative/include/webrtc/api/test/mock_video_encoder_factory.h @@ -0,0 +1,45 @@ +/* + * Copyright (c) 2017 The WebRTC project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + +#ifndef API_TEST_MOCK_VIDEO_ENCODER_FACTORY_H_ +#define API_TEST_MOCK_VIDEO_ENCODER_FACTORY_H_ + +#include +#include + +#include "api/video_codecs/sdp_video_format.h" +#include "api/video_codecs/video_encoder_factory.h" +#include "test/gmock.h" + +namespace webrtc { + +class MockVideoEncoderFactory : public webrtc::VideoEncoderFactory { + public: + MOCK_CONST_METHOD0(GetSupportedFormats, + std::vector()); + MOCK_CONST_METHOD1(QueryVideoEncoder, + CodecInfo(const webrtc::SdpVideoFormat&)); + + // We need to proxy to a return type that is copyable. + std::unique_ptr CreateVideoEncoder( + const webrtc::SdpVideoFormat& format) { + return std::unique_ptr( + CreateVideoEncoderProxy(format)); + } + MOCK_METHOD1(CreateVideoEncoderProxy, + webrtc::VideoEncoder*(const webrtc::SdpVideoFormat&)); + + MOCK_METHOD0(Die, void()); + ~MockVideoEncoderFactory() { Die(); } +}; + +} // namespace webrtc + +#endif // API_TEST_MOCK_VIDEO_ENCODER_FACTORY_H_ diff --git a/WebRtcNative/include/webrtc/api/test/simulated_network.h b/WebRtcNative/include/webrtc/api/test/simulated_network.h new file mode 100644 index 00000000..4ddc4377 --- /dev/null +++ b/WebRtcNative/include/webrtc/api/test/simulated_network.h @@ -0,0 +1,77 @@ +/* + * Copyright (c) 2018 The WebRTC project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + +#ifndef API_TEST_SIMULATED_NETWORK_H_ +#define API_TEST_SIMULATED_NETWORK_H_ + +#include +#include +#include +#include +#include + +#include "absl/types/optional.h" +#include "rtc_base/criticalsection.h" +#include "rtc_base/random.h" +#include "rtc_base/thread_annotations.h" + +namespace webrtc { + +struct PacketInFlightInfo { + PacketInFlightInfo(size_t size, int64_t send_time_us, uint64_t packet_id) + : size(size), send_time_us(send_time_us), packet_id(packet_id) {} + + size_t size; + int64_t send_time_us; + // Unique identifier for the packet in relation to other packets in flight. + uint64_t packet_id; +}; + +struct PacketDeliveryInfo { + static constexpr int kNotReceived = -1; + PacketDeliveryInfo(PacketInFlightInfo source, int64_t receive_time_us) + : receive_time_us(receive_time_us), packet_id(source.packet_id) {} + int64_t receive_time_us; + uint64_t packet_id; +}; + +class NetworkSimulationInterface { + public: + // TODO(phoglund): this one shouldn't really be here; make fake network pipes + // injectable instead in the video quality test fixture. + struct SimulatedNetworkConfig { + SimulatedNetworkConfig() {} + // Queue length in number of packets. + size_t queue_length_packets = 0; + // Delay in addition to capacity induced delay. + int queue_delay_ms = 0; + // Standard deviation of the extra delay. + int delay_standard_deviation_ms = 0; + // Link capacity in kbps. + int link_capacity_kbps = 0; + // Random packet loss. + int loss_percent = 0; + // If packets are allowed to be reordered. + bool allow_reordering = false; + // The average length of a burst of lost packets. + int avg_burst_loss_length = -1; + }; + + virtual bool EnqueuePacket(PacketInFlightInfo packet_info) = 0; + // Retrieves all packets that should be delivered by the given receive time. + virtual std::vector DequeueDeliverablePackets( + int64_t receive_time_us) = 0; + virtual absl::optional NextDeliveryTimeUs() const = 0; + virtual ~NetworkSimulationInterface() = default; +}; + +} // namespace webrtc + +#endif // API_TEST_SIMULATED_NETWORK_H_ diff --git a/WebRtcNative/include/webrtc/api/test/simulcast_test_fixture.h b/WebRtcNative/include/webrtc/api/test/simulcast_test_fixture.h new file mode 100644 index 00000000..e7eab241 --- /dev/null +++ b/WebRtcNative/include/webrtc/api/test/simulcast_test_fixture.h @@ -0,0 +1,41 @@ +/* + * Copyright (c) 2018 The WebRTC project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + +#ifndef API_TEST_SIMULCAST_TEST_FIXTURE_H_ +#define API_TEST_SIMULCAST_TEST_FIXTURE_H_ + +namespace webrtc { +namespace test { + +class SimulcastTestFixture { + public: + virtual ~SimulcastTestFixture() = default; + + virtual void TestKeyFrameRequestsOnAllStreams() = 0; + virtual void TestPaddingAllStreams() = 0; + virtual void TestPaddingTwoStreams() = 0; + virtual void TestPaddingTwoStreamsOneMaxedOut() = 0; + virtual void TestPaddingOneStream() = 0; + virtual void TestPaddingOneStreamTwoMaxedOut() = 0; + virtual void TestSendAllStreams() = 0; + virtual void TestDisablingStreams() = 0; + virtual void TestActiveStreams() = 0; + virtual void TestSwitchingToOneStream() = 0; + virtual void TestSwitchingToOneOddStream() = 0; + virtual void TestSwitchingToOneSmallStream() = 0; + virtual void TestSpatioTemporalLayers333PatternEncoder() = 0; + virtual void TestSpatioTemporalLayers321PatternEncoder() = 0; + virtual void TestStrideEncodeDecode() = 0; +}; + +} // namespace test +} // namespace webrtc + +#endif // API_TEST_SIMULCAST_TEST_FIXTURE_H_ diff --git a/WebRtcNative/include/webrtc/api/test/video_quality_test_fixture.h b/WebRtcNative/include/webrtc/api/test/video_quality_test_fixture.h new file mode 100644 index 00000000..5228f62a --- /dev/null +++ b/WebRtcNative/include/webrtc/api/test/video_quality_test_fixture.h @@ -0,0 +1,112 @@ +/* + * Copyright (c) 2018 The WebRTC project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + +#ifndef API_TEST_VIDEO_QUALITY_TEST_FIXTURE_H_ +#define API_TEST_VIDEO_QUALITY_TEST_FIXTURE_H_ + +#include +#include +#include +#include + +#include "api/bitrate_constraints.h" +#include "api/mediatypes.h" +#include "api/test/simulated_network.h" +#include "api/video_codecs/video_encoder_config.h" + +namespace webrtc { + +class VideoQualityTestFixtureInterface { + public: + // Parameters are grouped into smaller structs to make it easier to set + // the desired elements and skip unused, using aggregate initialization. + // Unfortunately, C++11 (as opposed to C11) doesn't support unnamed structs, + // which makes the implementation of VideoQualityTest a bit uglier. + struct Params { + Params(); + ~Params(); + struct CallConfig { + bool send_side_bwe; + BitrateConstraints call_bitrate_config; + int num_thumbnails; + // Indicates if secondary_(video|ss|screenshare) structures are used. + bool dual_video; + } call; + struct Video { + bool enabled; + size_t width; + size_t height; + int32_t fps; + int min_bitrate_bps; + int target_bitrate_bps; + int max_bitrate_bps; + bool suspend_below_min_bitrate; + std::string codec; + int num_temporal_layers; + int selected_tl; + int min_transmit_bps; + bool ulpfec; + bool flexfec; + bool automatic_scaling; + std::string clip_name; // "Generator" to generate frames instead. + size_t capture_device_index; + SdpVideoFormat::Parameters sdp_params; + } video[2]; + struct Audio { + bool enabled; + bool sync_video; + bool dtx; + } audio; + struct Screenshare { + bool enabled; + bool generate_slides; + int32_t slide_change_interval; + int32_t scroll_duration; + std::vector slides; + } screenshare[2]; + struct Analyzer { + std::string test_label; + double avg_psnr_threshold; // (*) + double avg_ssim_threshold; // (*) + int test_durations_secs; + std::string graph_data_output_filename; + std::string graph_title; + } analyzer; + NetworkSimulationInterface::SimulatedNetworkConfig pipe; + struct SS { // Spatial scalability. + std::vector streams; // If empty, one stream is assumed. + size_t selected_stream; + int num_spatial_layers; + int selected_sl; + InterLayerPredMode inter_layer_pred; + // If empty, bitrates are generated in VP9Impl automatically. + std::vector spatial_layers; + // If set, default parameters will be used instead of |streams|. + bool infer_streams; + } ss[2]; + struct Logging { + bool logs; + std::string rtc_event_log_name; + std::string rtp_dump_name; + std::string encoded_frame_base_path; + } logging; + }; + + virtual ~VideoQualityTestFixtureInterface() = default; + + virtual void RunWithAnalyzer(const Params& params) = 0; + virtual void RunWithRenderers(const Params& params) = 0; + + virtual const std::map& payload_type_map() = 0; +}; + +} // namespace webrtc + +#endif // API_TEST_VIDEO_QUALITY_TEST_FIXTURE_H_ diff --git a/WebRtcNative/include/webrtc/api/test/videocodec_test_fixture.h b/WebRtcNative/include/webrtc/api/test/videocodec_test_fixture.h new file mode 100644 index 00000000..ec69e50a --- /dev/null +++ b/WebRtcNative/include/webrtc/api/test/videocodec_test_fixture.h @@ -0,0 +1,153 @@ +/* + * Copyright (c) 2018 The WebRTC project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + +#ifndef API_TEST_VIDEOCODEC_TEST_FIXTURE_H_ +#define API_TEST_VIDEOCODEC_TEST_FIXTURE_H_ + +#include +#include + +#include "api/test/videocodec_test_stats.h" +#include "api/video_codecs/video_decoder_factory.h" +#include "api/video_codecs/video_encoder_factory.h" +#include "modules/video_coding/include/video_codec_interface.h" + +namespace webrtc { +namespace test { + +// Rates for the encoder and the frame number when to change profile. +struct RateProfile { + size_t target_kbps; + size_t input_fps; + size_t frame_index_rate_update; +}; + +struct RateControlThresholds { + double max_avg_bitrate_mismatch_percent; + double max_time_to_reach_target_bitrate_sec; + // TODO(ssilkin): Use absolute threshold for framerate. + double max_avg_framerate_mismatch_percent; + double max_avg_buffer_level_sec; + double max_max_key_frame_delay_sec; + double max_max_delta_frame_delay_sec; + size_t max_num_spatial_resizes; + size_t max_num_key_frames; +}; + +struct QualityThresholds { + double min_avg_psnr; + double min_min_psnr; + double min_avg_ssim; + double min_min_ssim; +}; + +struct BitstreamThresholds { + size_t max_max_nalu_size_bytes; +}; + +// NOTE: This class is still under development and may change without notice. +class VideoCodecTestFixture { + public: + class EncodedFrameChecker { + public: + virtual ~EncodedFrameChecker() = default; + virtual void CheckEncodedFrame(webrtc::VideoCodecType codec, + const EncodedImage& encoded_frame) const = 0; + }; + + struct Config { + Config(); + void SetCodecSettings(std::string codec_name, + size_t num_simulcast_streams, + size_t num_spatial_layers, + size_t num_temporal_layers, + bool denoising_on, + bool frame_dropper_on, + bool spatial_resize_on, + size_t width, + size_t height); + + size_t NumberOfCores() const; + size_t NumberOfTemporalLayers() const; + size_t NumberOfSpatialLayers() const; + size_t NumberOfSimulcastStreams() const; + + std::string ToString() const; + std::string CodecName() const; + bool IsAsyncCodec() const; + + // Plain name of YUV file to process without file extension. + std::string filename; + + // File to process. This must be a video file in the YUV format. + std::string filepath; + + // Number of frames to process. + size_t num_frames = 0; + + // Bitstream constraints. + size_t max_payload_size_bytes = 1440; + + // Should we decode the encoded frames? + bool decode = true; + + // Force the encoder and decoder to use a single core for processing. + bool use_single_core = false; + + // Should cpu usage be measured? + // If set to true, the encoding will run in real-time. + bool measure_cpu = false; + + // If > 0: forces the encoder to create a keyframe every Nth frame. + size_t keyframe_interval = 0; + + // Codec settings to use. + webrtc::VideoCodec codec_settings; + + // Name of the codec being tested. + std::string codec_name; + + // H.264 specific settings. + struct H264CodecSettings { + H264::Profile profile = H264::kProfileConstrainedBaseline; + H264PacketizationMode packetization_mode = + webrtc::H264PacketizationMode::NonInterleaved; + } h264_codec_settings; + + // Should hardware accelerated codecs be used? + bool hw_encoder = false; + bool hw_decoder = false; + + // Custom checker that will be called for each frame. + const EncodedFrameChecker* encoded_frame_checker = nullptr; + + // Print out frame level stats. + bool print_frame_level_stats = false; + + // Should video be saved persistently to disk for post-run visualization? + struct VisualizationParams { + bool save_encoded_ivf = false; + bool save_decoded_y4m = false; + } visualization_params; + }; + + virtual ~VideoCodecTestFixture() = default; + + virtual void RunTest(const std::vector& rate_profiles, + const std::vector* rc_thresholds, + const std::vector* quality_thresholds, + const BitstreamThresholds* bs_thresholds) = 0; + virtual VideoCodecTestStats& GetStats() = 0; +}; + +} // namespace test +} // namespace webrtc + +#endif // API_TEST_VIDEOCODEC_TEST_FIXTURE_H_ diff --git a/WebRtcNative/include/webrtc/api/test/videocodec_test_stats.h b/WebRtcNative/include/webrtc/api/test/videocodec_test_stats.h new file mode 100644 index 00000000..de6d3500 --- /dev/null +++ b/WebRtcNative/include/webrtc/api/test/videocodec_test_stats.h @@ -0,0 +1,149 @@ +/* + * Copyright (c) 2018 The WebRTC project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + +#ifndef API_TEST_VIDEOCODEC_TEST_STATS_H_ +#define API_TEST_VIDEOCODEC_TEST_STATS_H_ + +#include +#include +#include + +#include "common_types.h" // NOLINT(build/include) + +namespace webrtc { +namespace test { + +// Statistics for a sequence of processed frames. This class is not thread safe. +class VideoCodecTestStats { + public: + // Statistics for one processed frame. + struct FrameStatistics { + FrameStatistics(size_t frame_number, size_t rtp_timestamp); + FrameStatistics(const FrameStatistics& rhs); + + std::string ToString() const; + + size_t frame_number = 0; + size_t rtp_timestamp = 0; + + // Encoding. + int64_t encode_start_ns = 0; + int encode_return_code = 0; + bool encoding_successful = false; + size_t encode_time_us = 0; + size_t target_bitrate_kbps = 0; + size_t length_bytes = 0; + webrtc::FrameType frame_type = kVideoFrameDelta; + + // Layering. + size_t spatial_idx = 0; + size_t temporal_idx = 0; + bool inter_layer_predicted = false; + bool non_ref_for_inter_layer_pred = true; + + // H264 specific. + size_t max_nalu_size_bytes = 0; + + // Decoding. + int64_t decode_start_ns = 0; + int decode_return_code = 0; + bool decoding_successful = false; + size_t decode_time_us = 0; + size_t decoded_width = 0; + size_t decoded_height = 0; + + // Quantization. + int qp = -1; + + // Quality. + float psnr_y = 0.0f; + float psnr_u = 0.0f; + float psnr_v = 0.0f; + float psnr = 0.0f; // 10 * log10(255^2 / (mse_y + mse_u + mse_v)). + float ssim = 0.0f; // 0.8 * ssim_y + 0.1 * (ssim_u + ssim_v). + }; + + struct VideoStatistics { + VideoStatistics(); + VideoStatistics(const VideoStatistics&); + + std::string ToString(std::string prefix) const; + + size_t target_bitrate_kbps = 0; + float input_framerate_fps = 0.0f; + + size_t spatial_idx = 0; + size_t temporal_idx = 0; + + size_t width = 0; + size_t height = 0; + + size_t length_bytes = 0; + size_t bitrate_kbps = 0; + float framerate_fps = 0; + + float enc_speed_fps = 0.0f; + float dec_speed_fps = 0.0f; + + float avg_delay_sec = 0.0f; + float max_key_frame_delay_sec = 0.0f; + float max_delta_frame_delay_sec = 0.0f; + float time_to_reach_target_bitrate_sec = 0.0f; + + float avg_key_frame_size_bytes = 0.0f; + float avg_delta_frame_size_bytes = 0.0f; + float avg_qp = 0.0f; + + float avg_psnr_y = 0.0f; + float avg_psnr_u = 0.0f; + float avg_psnr_v = 0.0f; + float avg_psnr = 0.0f; + float min_psnr = 0.0f; + float avg_ssim = 0.0f; + float min_ssim = 0.0f; + + size_t num_input_frames = 0; + size_t num_encoded_frames = 0; + size_t num_decoded_frames = 0; + size_t num_key_frames = 0; + size_t num_spatial_resizes = 0; + size_t max_nalu_size_bytes = 0; + }; + + virtual ~VideoCodecTestStats() = default; + + // Creates a FrameStatistics for the next frame to be processed. + virtual FrameStatistics* AddFrame(size_t timestamp, size_t spatial_idx) = 0; + + // Returns the FrameStatistics corresponding to |frame_number| or |timestamp|. + virtual FrameStatistics* GetFrame(size_t frame_number, + size_t spatial_idx) = 0; + virtual FrameStatistics* GetFrameWithTimestamp(size_t timestamp, + size_t spatial_idx) = 0; + + virtual std::vector SliceAndCalcLayerVideoStatistic( + size_t first_frame_num, + size_t last_frame_num) = 0; + + virtual VideoStatistics SliceAndCalcAggregatedVideoStatistic( + size_t first_frame_num, + size_t last_frame_num) = 0; + + virtual void PrintFrameStatistics() = 0; + + virtual size_t Size(size_t spatial_idx) = 0; + + virtual void Clear() = 0; +}; + +} // namespace test +} // namespace webrtc + +#endif // API_TEST_VIDEOCODEC_TEST_STATS_H_ diff --git a/WebRtcNative/include/webrtc/api/transport/bitrate_settings.h b/WebRtcNative/include/webrtc/api/transport/bitrate_settings.h new file mode 100644 index 00000000..77654bc4 --- /dev/null +++ b/WebRtcNative/include/webrtc/api/transport/bitrate_settings.h @@ -0,0 +1,35 @@ +/* + * Copyright (c) 2018 The WebRTC project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + +#ifndef API_TRANSPORT_BITRATE_SETTINGS_H_ +#define API_TRANSPORT_BITRATE_SETTINGS_H_ + +#include "absl/types/optional.h" + +namespace webrtc { + +// Configuration of send bitrate. The |start_bitrate_bps| value is +// used for multiple purposes, both as a prior in the bandwidth +// estimator, and for initial configuration of the encoder. We may +// want to create separate apis for those, and use a smaller struct +// with only the min and max constraints. +struct BitrateSettings { + BitrateSettings(); + ~BitrateSettings(); + BitrateSettings(const BitrateSettings&); + // 0 <= min <= start <= max should hold for set parameters. + absl::optional min_bitrate_bps; + absl::optional start_bitrate_bps; + absl::optional max_bitrate_bps; +}; + +} // namespace webrtc + +#endif // API_TRANSPORT_BITRATE_SETTINGS_H_ diff --git a/WebRtcNative/include/webrtc/api/transport/network_control.h b/WebRtcNative/include/webrtc/api/transport/network_control.h new file mode 100644 index 00000000..abd945d8 --- /dev/null +++ b/WebRtcNative/include/webrtc/api/transport/network_control.h @@ -0,0 +1,93 @@ +/* + * Copyright (c) 2018 The WebRTC project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + +#ifndef API_TRANSPORT_NETWORK_CONTROL_H_ +#define API_TRANSPORT_NETWORK_CONTROL_H_ +#include +#include + +#include "api/transport/network_types.h" + +namespace webrtc { + +class TargetTransferRateObserver { + public: + virtual ~TargetTransferRateObserver() = default; + // Called to indicate target transfer rate as well as giving information about + // the current estimate of network parameters. + virtual void OnTargetTransferRate(TargetTransferRate) = 0; +}; + +// Configuration sent to factory create function. The parameters here are +// optional to use for a network controller implementation. +struct NetworkControllerConfig { + // The initial constraints to start with, these can be changed at any later + // time by calls to OnTargetRateConstraints. + TargetRateConstraints constraints; + // Initial stream specific configuration, these are changed at any later time + // by calls to OnStreamsConfig. + StreamsConfig stream_based_config; + // The initial bandwidth estimate to base target rate on. This should be used + // as the basis for initial OnTargetTransferRate and OnPacerConfig callbacks. + // Note that starting rate is only provided on construction. + DataRate starting_bandwidth = DataRate::Infinity(); +}; + +// NetworkControllerInterface is implemented by network controllers. A network +// controller is a class that uses information about network state and traffic +// to estimate network parameters such as round trip time and bandwidth. Network +// controllers does not guarantee thread safety, the interface must be used in a +// non-concurrent fashion. +class NetworkControllerInterface { + public: + virtual ~NetworkControllerInterface() = default; + + // Called when network availabilty changes. + virtual NetworkControlUpdate OnNetworkAvailability(NetworkAvailability) = 0; + // Called when the receiving or sending endpoint changes address. + virtual NetworkControlUpdate OnNetworkRouteChange(NetworkRouteChange) = 0; + // Called periodically with a periodicy as specified by + // NetworkControllerFactoryInterface::GetProcessInterval. + virtual NetworkControlUpdate OnProcessInterval(ProcessInterval) = 0; + // Called when remotely calculated bitrate is received. + virtual NetworkControlUpdate OnRemoteBitrateReport(RemoteBitrateReport) = 0; + // Called round trip time has been calculated by protocol specific mechanisms. + virtual NetworkControlUpdate OnRoundTripTimeUpdate(RoundTripTimeUpdate) = 0; + // Called when a packet is sent on the network. + virtual NetworkControlUpdate OnSentPacket(SentPacket) = 0; + // Called when the stream specific configuration has been updated. + virtual NetworkControlUpdate OnStreamsConfig(StreamsConfig) = 0; + // Called when target transfer rate constraints has been changed. + virtual NetworkControlUpdate OnTargetRateConstraints( + TargetRateConstraints) = 0; + // Called when a protocol specific calculation of packet loss has been made. + virtual NetworkControlUpdate OnTransportLossReport(TransportLossReport) = 0; + // Called with per packet feedback regarding receive time. + virtual NetworkControlUpdate OnTransportPacketsFeedback( + TransportPacketsFeedback) = 0; +}; + +// NetworkControllerFactoryInterface is an interface for creating a network +// controller. +class NetworkControllerFactoryInterface { + public: + virtual ~NetworkControllerFactoryInterface() = default; + + // Used to create a new network controller, requires an observer to be + // provided to handle callbacks. + virtual std::unique_ptr Create( + NetworkControllerConfig config) = 0; + // Returns the interval by which the network controller expects + // OnProcessInterval calls. + virtual TimeDelta GetProcessInterval() const = 0; +}; +} // namespace webrtc + +#endif // API_TRANSPORT_NETWORK_CONTROL_H_ diff --git a/WebRtcNative/include/webrtc/api/transport/network_types.h b/WebRtcNative/include/webrtc/api/transport/network_types.h new file mode 100644 index 00000000..a3897168 --- /dev/null +++ b/WebRtcNative/include/webrtc/api/transport/network_types.h @@ -0,0 +1,200 @@ +/* + * Copyright (c) 2018 The WebRTC project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + +#ifndef API_TRANSPORT_NETWORK_TYPES_H_ +#define API_TRANSPORT_NETWORK_TYPES_H_ +#include +#include + +#include "absl/types/optional.h" +#include "api/units/data_rate.h" +#include "api/units/data_size.h" +#include "api/units/time_delta.h" +#include "api/units/timestamp.h" + +namespace webrtc { + +// Configuration + +// Use StreamsConfig for information about streams that is required for specific +// adjustments to the algorithms in network controllers. Especially useful +// for experiments. +struct StreamsConfig { + StreamsConfig(); + StreamsConfig(const StreamsConfig&); + ~StreamsConfig(); + Timestamp at_time = Timestamp::Infinity(); + bool requests_alr_probing = false; + absl::optional pacing_factor; + absl::optional min_pacing_rate; + absl::optional max_padding_rate; + absl::optional max_total_allocated_bitrate; +}; + +struct TargetRateConstraints { + TargetRateConstraints(); + TargetRateConstraints(const TargetRateConstraints&); + ~TargetRateConstraints(); + Timestamp at_time = Timestamp::Infinity(); + absl::optional min_data_rate; + absl::optional max_data_rate; +}; + +// Send side information + +struct NetworkAvailability { + Timestamp at_time = Timestamp::Infinity(); + bool network_available = false; +}; + +struct NetworkRouteChange { + NetworkRouteChange(); + NetworkRouteChange(const NetworkRouteChange&); + ~NetworkRouteChange(); + Timestamp at_time = Timestamp::Infinity(); + // The TargetRateConstraints are set here so they can be changed synchronously + // when network route changes. + TargetRateConstraints constraints; + absl::optional starting_rate; +}; + +struct PacedPacketInfo { + PacedPacketInfo(); + PacedPacketInfo(int probe_cluster_id, + int probe_cluster_min_probes, + int probe_cluster_min_bytes); + + bool operator==(const PacedPacketInfo& rhs) const; + + // TODO(srte): Move probing info to a separate, optional struct. + static constexpr int kNotAProbe = -1; + int send_bitrate_bps = -1; + int probe_cluster_id = kNotAProbe; + int probe_cluster_min_probes = -1; + int probe_cluster_min_bytes = -1; +}; + +struct SentPacket { + Timestamp send_time = Timestamp::Infinity(); + DataSize size = DataSize::Zero(); + PacedPacketInfo pacing_info; + // Transport independent sequence number, any tracked packet should have a + // sequence number that is unique over the whole call and increasing by 1 for + // each packet. + int64_t sequence_number; + // Data in flight when the packet was sent, including the packet. + DataSize data_in_flight = DataSize::Zero(); +}; + +// Transport level feedback + +struct RemoteBitrateReport { + Timestamp receive_time = Timestamp::Infinity(); + DataRate bandwidth = DataRate::Infinity(); +}; + +struct RoundTripTimeUpdate { + Timestamp receive_time = Timestamp::Infinity(); + TimeDelta round_trip_time = TimeDelta::PlusInfinity(); + bool smoothed = false; +}; + +struct TransportLossReport { + Timestamp receive_time = Timestamp::Infinity(); + Timestamp start_time = Timestamp::Infinity(); + Timestamp end_time = Timestamp::Infinity(); + uint64_t packets_lost_delta = 0; + uint64_t packets_received_delta = 0; +}; + +// Packet level feedback + +struct PacketResult { + PacketResult(); + PacketResult(const PacketResult&); + ~PacketResult(); + + absl::optional sent_packet; + Timestamp receive_time = Timestamp::Infinity(); +}; + +struct TransportPacketsFeedback { + TransportPacketsFeedback(); + TransportPacketsFeedback(const TransportPacketsFeedback& other); + ~TransportPacketsFeedback(); + + Timestamp feedback_time = Timestamp::Infinity(); + DataSize data_in_flight = DataSize::Zero(); + DataSize prior_in_flight = DataSize::Zero(); + std::vector packet_feedbacks; + + std::vector ReceivedWithSendInfo() const; + std::vector LostWithSendInfo() const; + std::vector PacketsWithFeedback() const; +}; + +// Network estimation + +struct NetworkEstimate { + Timestamp at_time = Timestamp::Infinity(); + DataRate bandwidth = DataRate::Infinity(); + TimeDelta round_trip_time = TimeDelta::PlusInfinity(); + TimeDelta bwe_period = TimeDelta::PlusInfinity(); + + float loss_rate_ratio = 0; +}; + +// Network control + +struct PacerConfig { + Timestamp at_time = Timestamp::Infinity(); + // Pacer should send at most data_window data over time_window duration. + DataSize data_window = DataSize::Infinity(); + TimeDelta time_window = TimeDelta::PlusInfinity(); + // Pacer should send at least pad_window data over time_window duration. + DataSize pad_window = DataSize::Zero(); + DataRate data_rate() const { return data_window / time_window; } + DataRate pad_rate() const { return pad_window / time_window; } +}; + +struct ProbeClusterConfig { + Timestamp at_time = Timestamp::Infinity(); + DataRate target_data_rate = DataRate::Zero(); + TimeDelta target_duration = TimeDelta::Zero(); + int32_t target_probe_count = 0; +}; + +struct TargetTransferRate { + Timestamp at_time = Timestamp::Infinity(); + // The estimate on which the target rate is based on. + NetworkEstimate network_estimate; + DataRate target_rate = DataRate::Zero(); +}; + +// Contains updates of network controller comand state. Using optionals to +// indicate whether a member has been updated. The array of probe clusters +// should be used to send out probes if not empty. +struct NetworkControlUpdate { + NetworkControlUpdate(); + NetworkControlUpdate(const NetworkControlUpdate&); + ~NetworkControlUpdate(); + absl::optional congestion_window; + absl::optional pacer_config; + std::vector probe_cluster_configs; + absl::optional target_rate; +}; + +// Process control +struct ProcessInterval { + Timestamp at_time = Timestamp::Infinity(); +}; +} // namespace webrtc + +#endif // API_TRANSPORT_NETWORK_TYPES_H_ diff --git a/WebRtcNative/include/webrtc/api/transport/test/mock_network_control.h b/WebRtcNative/include/webrtc/api/transport/test/mock_network_control.h new file mode 100644 index 00000000..df83791e --- /dev/null +++ b/WebRtcNative/include/webrtc/api/transport/test/mock_network_control.h @@ -0,0 +1,26 @@ +/* + * Copyright (c) 2018 The WebRTC project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + +#ifndef API_TRANSPORT_TEST_MOCK_NETWORK_CONTROL_H_ +#define API_TRANSPORT_TEST_MOCK_NETWORK_CONTROL_H_ + +#include "api/transport/include/network_control.h" +#include "test/gmock.h" + +namespace webrtc { +namespace test { +class MockTargetTransferRateObserver : public TargetTransferRateObserver { + public: + MOCK_METHOD1(OnTargetTransferRate, void(TargetTransferRate)); +}; +} // namespace test +} // namespace webrtc + +#endif // API_TRANSPORT_TEST_MOCK_NETWORK_CONTROL_H_ diff --git a/WebRtcNative/include/webrtc/api/transport/test/network_control_tester.h b/WebRtcNative/include/webrtc/api/transport/test/network_control_tester.h new file mode 100644 index 00000000..4dfcc149 --- /dev/null +++ b/WebRtcNative/include/webrtc/api/transport/test/network_control_tester.h @@ -0,0 +1,73 @@ +/* + * Copyright (c) 2018 The WebRTC project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + +#ifndef API_TRANSPORT_TEST_NETWORK_CONTROL_TESTER_H_ +#define API_TRANSPORT_TEST_NETWORK_CONTROL_TESTER_H_ + +#include +#include +#include + +#include "absl/types/optional.h" +#include "api/transport/network_control.h" + +namespace webrtc { +namespace test { + +// Produces one packet per time delta +class SimpleTargetRateProducer { + public: + static SentPacket ProduceNext(const NetworkControlUpdate& state, + Timestamp current_time, + TimeDelta time_delta); +}; + +class NetworkControllerTester { + public: + // A PacketProducer is a function that takes a network control state, a + // timestamp representing the expected send time and a time delta of the send + // times (This allows the PacketProducer to be stateless). It returns a + // SentPacket struct with actual send time and packet size. + using PacketProducer = std::function< + SentPacket(const NetworkControlUpdate&, Timestamp, TimeDelta)>; + NetworkControllerTester(NetworkControllerFactoryInterface* factory, + NetworkControllerConfig initial_config); + ~NetworkControllerTester(); + + // Runs the simulations for the given duration, the PacketProducer will be + // called repeatedly based on the given packet interval and the network will + // be simulated using given bandwidth and propagation delay. The simulation + // will call the controller under test with OnSentPacket and + // OnTransportPacketsFeedback. + + // Note that OnTransportPacketsFeedback will only be called for + // packets with resulting feedback time within the simulated duration. Packets + // with later feedback time are saved and used in the next call to + // RunSimulation where enough simulated time has passed. + void RunSimulation(TimeDelta duration, + TimeDelta packet_interval, + DataRate actual_bandwidth, + TimeDelta propagation_delay, + PacketProducer next_packet); + NetworkControlUpdate GetState() { return state_; } + + private: + std::unique_ptr controller_; + TimeDelta process_interval_ = TimeDelta::PlusInfinity(); + Timestamp current_time_; + int64_t packet_sequence_number_; + TimeDelta accumulated_buffer_; + std::deque outstanding_packets_; + NetworkControlUpdate state_; +}; +} // namespace test +} // namespace webrtc + +#endif // API_TRANSPORT_TEST_NETWORK_CONTROL_TESTER_H_ diff --git a/WebRtcNative/include/webrtc/api/turncustomizer.h b/WebRtcNative/include/webrtc/api/turncustomizer.h new file mode 100644 index 00000000..85c4e77c --- /dev/null +++ b/WebRtcNative/include/webrtc/api/turncustomizer.h @@ -0,0 +1,45 @@ +/* + * Copyright 2017 The WebRTC Project Authors. All rights reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + +#ifndef API_TURNCUSTOMIZER_H_ +#define API_TURNCUSTOMIZER_H_ + +#include + +namespace cricket { +class PortInterface; +class StunMessage; +} // namespace cricket + +namespace webrtc { + +class TurnCustomizer { + public: + // This is called before a TURN message is sent. + // This could be used to add implementation specific attributes to a request. + virtual void MaybeModifyOutgoingStunMessage( + cricket::PortInterface* port, + cricket::StunMessage* message) = 0; + + // TURN can send data using channel data messages or Send indication. + // This method should return false if |data| should be sent using + // a Send indication instead of a ChannelData message, even if a + // channel is bound. + virtual bool AllowChannelData(cricket::PortInterface* port, + const void* data, + size_t size, + bool payload) = 0; + + virtual ~TurnCustomizer() {} +}; + +} // namespace webrtc + +#endif // API_TURNCUSTOMIZER_H_ diff --git a/WebRtcNative/include/webrtc/api/umametrics.h b/WebRtcNative/include/webrtc/api/umametrics.h new file mode 100644 index 00000000..88ab08c1 --- /dev/null +++ b/WebRtcNative/include/webrtc/api/umametrics.h @@ -0,0 +1,155 @@ +/* + * Copyright 2014 The WebRTC project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + +// This file contains enums related to IPv4/IPv6 metrics. + +#ifndef API_UMAMETRICS_H_ +#define API_UMAMETRICS_H_ + +#include "rtc_base/refcount.h" + +namespace webrtc { + +// Currently this contains information related to WebRTC network/transport +// information. + +// The difference between PeerConnectionEnumCounter and +// PeerConnectionMetricsName is that the "EnumCounter" is only counting the +// occurrences of events, while "Name" has a value associated with it which is +// used to form a histogram. + +// This enum is backed by Chromium's histograms.xml, +// chromium/src/tools/metrics/histograms/histograms.xml +// Existing values cannot be re-ordered and new enums must be added +// before kBoundary. +enum PeerConnectionAddressFamilyCounter { + kPeerConnection_IPv4, + kPeerConnection_IPv6, + kBestConnections_IPv4, + kBestConnections_IPv6, + kPeerConnectionAddressFamilyCounter_Max, +}; + +// TODO(guoweis): Keep previous name here until all references are renamed. +#define kBoundary kPeerConnectionAddressFamilyCounter_Max + +// TODO(guoweis): Keep previous name here until all references are renamed. +typedef PeerConnectionAddressFamilyCounter PeerConnectionUMAMetricsCounter; + +// This enum defines types for UMA samples, which will have a range. +enum PeerConnectionMetricsName { + kNetworkInterfaces_IPv4, // Number of IPv4 interfaces. + kNetworkInterfaces_IPv6, // Number of IPv6 interfaces. + kTimeToConnect, // In milliseconds. + kLocalCandidates_IPv4, // Number of IPv4 local candidates. + kLocalCandidates_IPv6, // Number of IPv6 local candidates. + kPeerConnectionMetricsName_Max +}; + +// TODO(guoweis): Keep previous name here until all references are renamed. +typedef PeerConnectionMetricsName PeerConnectionUMAMetricsName; + +// The IceCandidatePairType has the format of +// _. It is recorded based on the +// type of candidate pair used when the PeerConnection first goes to a completed +// state. When BUNDLE is enabled, only the first transport gets recorded. +enum IceCandidatePairType { + // HostHost is deprecated. It was replaced with the set of types at the bottom + // to report private or public host IP address. + kIceCandidatePairHostHost, + kIceCandidatePairHostSrflx, + kIceCandidatePairHostRelay, + kIceCandidatePairHostPrflx, + kIceCandidatePairSrflxHost, + kIceCandidatePairSrflxSrflx, + kIceCandidatePairSrflxRelay, + kIceCandidatePairSrflxPrflx, + kIceCandidatePairRelayHost, + kIceCandidatePairRelaySrflx, + kIceCandidatePairRelayRelay, + kIceCandidatePairRelayPrflx, + kIceCandidatePairPrflxHost, + kIceCandidatePairPrflxSrflx, + kIceCandidatePairPrflxRelay, + + // The following 4 types tell whether local and remote hosts have private or + // public IP addresses. + kIceCandidatePairHostPrivateHostPrivate, + kIceCandidatePairHostPrivateHostPublic, + kIceCandidatePairHostPublicHostPrivate, + kIceCandidatePairHostPublicHostPublic, + kIceCandidatePairMax +}; + +enum KeyExchangeProtocolType { + kEnumCounterKeyProtocolDtls, + kEnumCounterKeyProtocolSdes, + kEnumCounterKeyProtocolMax +}; + +enum KeyExchangeProtocolMedia { + kEnumCounterKeyProtocolMediaTypeDtlsAudio, + kEnumCounterKeyProtocolMediaTypeDtlsVideo, + kEnumCounterKeyProtocolMediaTypeDtlsData, + kEnumCounterKeyProtocolMediaTypeSdesAudio, + kEnumCounterKeyProtocolMediaTypeSdesVideo, + kEnumCounterKeyProtocolMediaTypeSdesData, + kEnumCounterKeyProtocolMediaTypeMax +}; + +enum SdpSemanticRequested { + kSdpSemanticRequestDefault, + kSdpSemanticRequestPlanB, + kSdpSemanticRequestUnifiedPlan, + kSdpSemanticRequestMax +}; + +enum SdpSemanticNegotiated { + kSdpSemanticNegotiatedNone, + kSdpSemanticNegotiatedPlanB, + kSdpSemanticNegotiatedUnifiedPlan, + kSdpSemanticNegotiatedMixed, + kSdpSemanticNegotiatedMax +}; + +// Metric which records the format of the received SDP for tracking how much the +// difference between Plan B and Unified Plan affect users. +enum SdpFormatReceived { + // No audio or video tracks. This is worth special casing since it seems to be + // the most common scenario (data-channel only). + kSdpFormatReceivedNoTracks, + // No more than one audio and one video track. Should be compatible with both + // Plan B and Unified Plan endpoints. + kSdpFormatReceivedSimple, + // More than one audio track or more than one video track in the Plan B format + // (e.g., one audio media section with multiple streams). + kSdpFormatReceivedComplexPlanB, + // More than one audio track or more than one video track in the Unified Plan + // format (e.g., two audio media sections). + kSdpFormatReceivedComplexUnifiedPlan, + kSdpFormatReceivedMax +}; + +// Metric for counting the outcome of adding an ICE candidate +enum AddIceCandidateResult { + kAddIceCandidateSuccess, + kAddIceCandidateFailClosed, + kAddIceCandidateFailNoRemoteDescription, + kAddIceCandidateFailNullCandidate, + kAddIceCandidateFailNotValid, + kAddIceCandidateFailNotReady, + kAddIceCandidateFailInAddition, + kAddIceCandidateFailNotUsable, + kAddIceCandidateMax +}; + +} // namespace webrtc + +#endif // API_UMAMETRICS_H_ diff --git a/WebRtcNative/include/webrtc/api/units/data_rate.h b/WebRtcNative/include/webrtc/api/units/data_rate.h new file mode 100644 index 00000000..c7164e34 --- /dev/null +++ b/WebRtcNative/include/webrtc/api/units/data_rate.h @@ -0,0 +1,182 @@ +/* + * Copyright (c) 2018 The WebRTC project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + +#ifndef API_UNITS_DATA_RATE_H_ +#define API_UNITS_DATA_RATE_H_ +#include +#include +#include +#include + +#include "rtc_base/checks.h" +#include "rtc_base/numerics/safe_conversions.h" + +#include "api/units/data_size.h" +#include "api/units/time_delta.h" + +namespace webrtc { +namespace data_rate_impl { +constexpr int64_t kPlusInfinityVal = std::numeric_limits::max(); + +inline int64_t Microbits(const DataSize& size) { + constexpr int64_t kMaxBeforeConversion = + std::numeric_limits::max() / 8000000; + RTC_DCHECK_LE(size.bytes(), kMaxBeforeConversion) + << "size is too large to be expressed in microbytes"; + return size.bytes() * 8000000; +} +} // namespace data_rate_impl + +// DataRate is a class that represents a given data rate. This can be used to +// represent bandwidth, encoding bitrate, etc. The internal storage is bits per +// second (bps). +class DataRate { + public: + DataRate() = delete; + static DataRate Zero() { return DataRate(0); } + static DataRate Infinity() { + return DataRate(data_rate_impl::kPlusInfinityVal); + } + + template < + typename T, + typename std::enable_if::value>::type* = nullptr> + static DataRate bps(T bits_per_second) { + RTC_DCHECK_GE(bits_per_second, 0); + RTC_DCHECK_LT(bits_per_second, data_rate_impl::kPlusInfinityVal); + return DataRate(rtc::dchecked_cast(bits_per_second)); + } + template < + typename T, + typename std::enable_if::value>::type* = nullptr> + static DataRate kbps(T kilobits_per_sec) { + RTC_DCHECK_GE(kilobits_per_sec, 0); + RTC_DCHECK_LT(kilobits_per_sec, data_rate_impl::kPlusInfinityVal / 1000); + return DataRate::bps(rtc::dchecked_cast(kilobits_per_sec) * 1000); + } + + template ::value>::type* = + nullptr> + static DataRate bps(T bits_per_second) { + if (bits_per_second == std::numeric_limits::infinity()) { + return Infinity(); + } else { + RTC_DCHECK(!std::isnan(bits_per_second)); + RTC_DCHECK_GE(bits_per_second, 0); + RTC_DCHECK_LT(bits_per_second, data_rate_impl::kPlusInfinityVal); + return DataRate(rtc::dchecked_cast(bits_per_second)); + } + } + template ::value>::type* = + nullptr> + static DataRate kbps(T kilobits_per_sec) { + return DataRate::bps(kilobits_per_sec * 1e3); + } + + template + typename std::enable_if::value, T>::type bps() const { + RTC_DCHECK(IsFinite()); + return rtc::dchecked_cast(bits_per_sec_); + } + template + typename std::enable_if::value, T>::type kbps() const { + return rtc::dchecked_cast((bps() + 500) / 1000); + } + + template + typename std::enable_if::value, T>::type bps() + const { + if (IsInfinite()) { + return std::numeric_limits::infinity(); + } else { + return bits_per_sec_; + } + } + template + typename std::enable_if::value, T>::type kbps() + const { + return bps() * 1e-3; + } + + bool IsZero() const { return bits_per_sec_ == 0; } + bool IsInfinite() const { + return bits_per_sec_ == data_rate_impl::kPlusInfinityVal; + } + bool IsFinite() const { return !IsInfinite(); } + + double operator/(const DataRate& other) const { + return bps() / other.bps(); + } + bool operator==(const DataRate& other) const { + return bits_per_sec_ == other.bits_per_sec_; + } + bool operator!=(const DataRate& other) const { + return bits_per_sec_ != other.bits_per_sec_; + } + bool operator<=(const DataRate& other) const { + return bits_per_sec_ <= other.bits_per_sec_; + } + bool operator>=(const DataRate& other) const { + return bits_per_sec_ >= other.bits_per_sec_; + } + bool operator>(const DataRate& other) const { + return bits_per_sec_ > other.bits_per_sec_; + } + bool operator<(const DataRate& other) const { + return bits_per_sec_ < other.bits_per_sec_; + } + + private: + // Bits per second used internally to simplify debugging by making the value + // more recognizable. + explicit DataRate(int64_t bits_per_second) : bits_per_sec_(bits_per_second) {} + int64_t bits_per_sec_; +}; + +inline DataRate operator*(const DataRate& rate, const double& scalar) { + return DataRate::bps(std::round(rate.bps() * scalar)); +} +inline DataRate operator*(const double& scalar, const DataRate& rate) { + return rate * scalar; +} +inline DataRate operator*(const DataRate& rate, const int64_t& scalar) { + return DataRate::bps(rate.bps() * scalar); +} +inline DataRate operator*(const int64_t& scalar, const DataRate& rate) { + return rate * scalar; +} +inline DataRate operator*(const DataRate& rate, const int32_t& scalar) { + return DataRate::bps(rate.bps() * scalar); +} +inline DataRate operator*(const int32_t& scalar, const DataRate& rate) { + return rate * scalar; +} + +inline DataRate operator/(const DataSize& size, const TimeDelta& duration) { + return DataRate::bps(data_rate_impl::Microbits(size) / duration.us()); +} +inline TimeDelta operator/(const DataSize& size, const DataRate& rate) { + return TimeDelta::us(data_rate_impl::Microbits(size) / rate.bps()); +} +inline DataSize operator*(const DataRate& rate, const TimeDelta& duration) { + int64_t microbits = rate.bps() * duration.us(); + return DataSize::bytes((microbits + 4000000) / 8000000); +} +inline DataSize operator*(const TimeDelta& duration, const DataRate& rate) { + return rate * duration; +} + +std::string ToString(const DataRate& value); + +} // namespace webrtc + +#endif // API_UNITS_DATA_RATE_H_ diff --git a/WebRtcNative/include/webrtc/api/units/data_size.h b/WebRtcNative/include/webrtc/api/units/data_size.h new file mode 100644 index 00000000..8c35766b --- /dev/null +++ b/WebRtcNative/include/webrtc/api/units/data_size.h @@ -0,0 +1,142 @@ +/* + * Copyright (c) 2018 The WebRTC project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + +#ifndef API_UNITS_DATA_SIZE_H_ +#define API_UNITS_DATA_SIZE_H_ + +#include +#include +#include +#include +#include + +#include "rtc_base/checks.h" +#include "rtc_base/numerics/safe_conversions.h" + +namespace webrtc { +namespace data_size_impl { +constexpr int64_t kPlusInfinityVal = std::numeric_limits::max(); +} // namespace data_size_impl + +// DataSize is a class represeting a count of bytes. +class DataSize { + public: + DataSize() = delete; + static DataSize Zero() { return DataSize(0); } + static DataSize Infinity() { + return DataSize(data_size_impl::kPlusInfinityVal); + } + + template < + typename T, + typename std::enable_if::value>::type* = nullptr> + static DataSize bytes(T bytes) { + RTC_DCHECK_GE(bytes, 0); + RTC_DCHECK_LT(bytes, data_size_impl::kPlusInfinityVal); + return DataSize(rtc::dchecked_cast(bytes)); + } + + template ::value>::type* = + nullptr> + static DataSize bytes(T bytes) { + if (bytes == std::numeric_limits::infinity()) { + return Infinity(); + } else { + RTC_DCHECK(!std::isnan(bytes)); + RTC_DCHECK_GE(bytes, 0); + RTC_DCHECK_LT(bytes, data_size_impl::kPlusInfinityVal); + return DataSize(rtc::dchecked_cast(bytes)); + } + } + + template + typename std::enable_if::value, T>::type bytes() const { + RTC_DCHECK(IsFinite()); + return rtc::dchecked_cast(bytes_); + } + + template + typename std::enable_if::value, T>::type bytes() + const { + if (IsInfinite()) { + return std::numeric_limits::infinity(); + } else { + return bytes_; + } + } + + bool IsZero() const { return bytes_ == 0; } + bool IsInfinite() const { return bytes_ == data_size_impl::kPlusInfinityVal; } + bool IsFinite() const { return !IsInfinite(); } + DataSize operator-(const DataSize& other) const { + return DataSize::bytes(bytes() - other.bytes()); + } + DataSize operator+(const DataSize& other) const { + return DataSize::bytes(bytes() + other.bytes()); + } + DataSize& operator-=(const DataSize& other) { + bytes_ -= other.bytes(); + return *this; + } + DataSize& operator+=(const DataSize& other) { + bytes_ += other.bytes(); + return *this; + } + double operator/(const DataSize& other) const { + return bytes() / other.bytes(); + } + bool operator==(const DataSize& other) const { + return bytes_ == other.bytes_; + } + bool operator!=(const DataSize& other) const { + return bytes_ != other.bytes_; + } + bool operator<=(const DataSize& other) const { + return bytes_ <= other.bytes_; + } + bool operator>=(const DataSize& other) const { + return bytes_ >= other.bytes_; + } + bool operator>(const DataSize& other) const { return bytes_ > other.bytes_; } + bool operator<(const DataSize& other) const { return bytes_ < other.bytes_; } + + private: + explicit DataSize(int64_t bytes) : bytes_(bytes) {} + int64_t bytes_; +}; + +inline DataSize operator*(const DataSize& size, const double& scalar) { + return DataSize::bytes(std::round(size.bytes() * scalar)); +} +inline DataSize operator*(const double& scalar, const DataSize& size) { + return size * scalar; +} +inline DataSize operator*(const DataSize& size, const int64_t& scalar) { + return DataSize::bytes(size.bytes() * scalar); +} +inline DataSize operator*(const int64_t& scalar, const DataSize& size) { + return size * scalar; +} +inline DataSize operator*(const DataSize& size, const int32_t& scalar) { + return DataSize::bytes(size.bytes() * scalar); +} +inline DataSize operator*(const int32_t& scalar, const DataSize& size) { + return size * scalar; +} +inline DataSize operator/(const DataSize& size, const int64_t& scalar) { + return DataSize::bytes(size.bytes() / scalar); +} + +std::string ToString(const DataSize& value); + +} // namespace webrtc + +#endif // API_UNITS_DATA_SIZE_H_ diff --git a/WebRtcNative/include/webrtc/api/units/time_delta.h b/WebRtcNative/include/webrtc/api/units/time_delta.h new file mode 100644 index 00000000..0f99e805 --- /dev/null +++ b/WebRtcNative/include/webrtc/api/units/time_delta.h @@ -0,0 +1,227 @@ +/* + * Copyright (c) 2018 The WebRTC project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + +#ifndef API_UNITS_TIME_DELTA_H_ +#define API_UNITS_TIME_DELTA_H_ + +#include +#include +#include +#include + +#include "rtc_base/checks.h" +#include "rtc_base/numerics/safe_conversions.h" + +namespace webrtc { +namespace timedelta_impl { +constexpr int64_t kPlusInfinityVal = std::numeric_limits::max(); +constexpr int64_t kMinusInfinityVal = std::numeric_limits::min(); +} // namespace timedelta_impl + +// TimeDelta represents the difference between two timestamps. Commonly this can +// be a duration. However since two Timestamps are not guaranteed to have the +// same epoch (they might come from different computers, making exact +// synchronisation infeasible), the duration covered by a TimeDelta can be +// undefined. To simplify usage, it can be constructed and converted to +// different units, specifically seconds (s), milliseconds (ms) and +// microseconds (us). +class TimeDelta { + public: + TimeDelta() = delete; + static TimeDelta Zero() { return TimeDelta(0); } + static TimeDelta PlusInfinity() { + return TimeDelta(timedelta_impl::kPlusInfinityVal); + } + static TimeDelta MinusInfinity() { + return TimeDelta(timedelta_impl::kMinusInfinityVal); + } + + template < + typename T, + typename std::enable_if::value>::type* = nullptr> + static TimeDelta seconds(T seconds) { + RTC_DCHECK_GT(seconds, timedelta_impl::kMinusInfinityVal / 1000000); + RTC_DCHECK_LT(seconds, timedelta_impl::kPlusInfinityVal / 1000000); + return TimeDelta(rtc::dchecked_cast(seconds) * 1000000); + } + template < + typename T, + typename std::enable_if::value>::type* = nullptr> + static TimeDelta ms(T milliseconds) { + RTC_DCHECK_GT(milliseconds, timedelta_impl::kMinusInfinityVal / 1000); + RTC_DCHECK_LT(milliseconds, timedelta_impl::kPlusInfinityVal / 1000); + return TimeDelta(rtc::dchecked_cast(milliseconds) * 1000); + } + template < + typename T, + typename std::enable_if::value>::type* = nullptr> + static TimeDelta us(T microseconds) { + RTC_DCHECK_GT(microseconds, timedelta_impl::kMinusInfinityVal); + RTC_DCHECK_LT(microseconds, timedelta_impl::kPlusInfinityVal); + return TimeDelta(rtc::dchecked_cast(microseconds)); + } + + template ::value>::type* = + nullptr> + static TimeDelta seconds(T seconds) { + return TimeDelta::us(seconds * 1e6); + } + template ::value>::type* = + nullptr> + static TimeDelta ms(T milliseconds) { + return TimeDelta::us(milliseconds * 1e3); + } + template ::value>::type* = + nullptr> + static TimeDelta us(T microseconds) { + if (microseconds == std::numeric_limits::infinity()) { + return PlusInfinity(); + } else if (microseconds == -std::numeric_limits::infinity()) { + return MinusInfinity(); + } else { + RTC_DCHECK(!std::isnan(microseconds)); + RTC_DCHECK_GT(microseconds, timedelta_impl::kMinusInfinityVal); + RTC_DCHECK_LT(microseconds, timedelta_impl::kPlusInfinityVal); + return TimeDelta(rtc::dchecked_cast(microseconds)); + } + } + + template + typename std::enable_if::value, T>::type seconds() const { + return rtc::dchecked_cast((us() + (us() >= 0 ? 500000 : -500000)) / + 1000000); + } + template + typename std::enable_if::value, T>::type ms() const { + return rtc::dchecked_cast((us() + (us() >= 0 ? 500 : -500)) / 1000); + } + template + typename std::enable_if::value, T>::type us() const { + RTC_DCHECK(IsFinite()); + return rtc::dchecked_cast(microseconds_); + } + template + typename std::enable_if::value, T>::type ns() const { + RTC_DCHECK_GE(us(), std::numeric_limits::min() / 1000); + RTC_DCHECK_LE(us(), std::numeric_limits::max() / 1000); + return rtc::dchecked_cast(us() * 1000); + } + + template + typename std::enable_if::value, T>::type seconds() + const { + return us() * 1e-6; + } + template + typename std::enable_if::value, T>::type ms() + const { + return us() * 1e-3; + } + template + typename std::enable_if::value, T>::type us() + const { + if (IsPlusInfinity()) { + return std::numeric_limits::infinity(); + } else if (IsMinusInfinity()) { + return -std::numeric_limits::infinity(); + } else { + return microseconds_; + } + } + template + typename std::enable_if::value, T>::type ns() + const { + return us() * 1e3; + } + + TimeDelta Abs() const { return TimeDelta::us(std::abs(us())); } + bool IsZero() const { return microseconds_ == 0; } + bool IsFinite() const { return !IsInfinite(); } + bool IsInfinite() const { + return microseconds_ == timedelta_impl::kPlusInfinityVal || + microseconds_ == timedelta_impl::kMinusInfinityVal; + } + bool IsPlusInfinity() const { + return microseconds_ == timedelta_impl::kPlusInfinityVal; + } + bool IsMinusInfinity() const { + return microseconds_ == timedelta_impl::kMinusInfinityVal; + } + TimeDelta operator+(const TimeDelta& other) const { + return TimeDelta::us(us() + other.us()); + } + TimeDelta operator-(const TimeDelta& other) const { + return TimeDelta::us(us() - other.us()); + } + TimeDelta& operator-=(const TimeDelta& other) { + microseconds_ -= other.us(); + return *this; + } + TimeDelta& operator+=(const TimeDelta& other) { + microseconds_ += other.us(); + return *this; + } + double operator/(const TimeDelta& other) const { + return us() / other.us(); + } + bool operator==(const TimeDelta& other) const { + return microseconds_ == other.microseconds_; + } + bool operator!=(const TimeDelta& other) const { + return microseconds_ != other.microseconds_; + } + bool operator<=(const TimeDelta& other) const { + return microseconds_ <= other.microseconds_; + } + bool operator>=(const TimeDelta& other) const { + return microseconds_ >= other.microseconds_; + } + bool operator>(const TimeDelta& other) const { + return microseconds_ > other.microseconds_; + } + bool operator<(const TimeDelta& other) const { + return microseconds_ < other.microseconds_; + } + + private: + explicit TimeDelta(int64_t us) : microseconds_(us) {} + int64_t microseconds_; +}; + +inline TimeDelta operator*(const TimeDelta& delta, const double& scalar) { + return TimeDelta::us(std::round(delta.us() * scalar)); +} +inline TimeDelta operator*(const double& scalar, const TimeDelta& delta) { + return delta * scalar; +} +inline TimeDelta operator*(const TimeDelta& delta, const int64_t& scalar) { + return TimeDelta::us(delta.us() * scalar); +} +inline TimeDelta operator*(const int64_t& scalar, const TimeDelta& delta) { + return delta * scalar; +} +inline TimeDelta operator*(const TimeDelta& delta, const int32_t& scalar) { + return TimeDelta::us(delta.us() * scalar); +} +inline TimeDelta operator*(const int32_t& scalar, const TimeDelta& delta) { + return delta * scalar; +} + +inline TimeDelta operator/(const TimeDelta& delta, const int64_t& scalar) { + return TimeDelta::us(delta.us() / scalar); +} + +std::string ToString(const TimeDelta& value); +} // namespace webrtc + +#endif // API_UNITS_TIME_DELTA_H_ diff --git a/WebRtcNative/include/webrtc/api/units/timestamp.h b/WebRtcNative/include/webrtc/api/units/timestamp.h new file mode 100644 index 00000000..a66e061f --- /dev/null +++ b/WebRtcNative/include/webrtc/api/units/timestamp.h @@ -0,0 +1,176 @@ +/* + * Copyright (c) 2018 The WebRTC project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + +#ifndef API_UNITS_TIMESTAMP_H_ +#define API_UNITS_TIMESTAMP_H_ + +#include +#include +#include + +#include "api/units/time_delta.h" +#include "rtc_base/checks.h" +#include "rtc_base/numerics/safe_conversions.h" + +namespace webrtc { +namespace timestamp_impl { +constexpr int64_t kPlusInfinityVal = std::numeric_limits::max(); +constexpr int64_t kMinusInfinityVal = std::numeric_limits::min(); +} // namespace timestamp_impl + +// Timestamp represents the time that has passed since some unspecified epoch. +// The epoch is assumed to be before any represented timestamps, this means that +// negative values are not valid. The most notable feature is that the +// difference of two Timestamps results in a TimeDelta. +class Timestamp { + public: + Timestamp() = delete; + static Timestamp Infinity() { + return Timestamp(timestamp_impl::kPlusInfinityVal); + } + + template < + typename T, + typename std::enable_if::value>::type* = nullptr> + static Timestamp seconds(T seconds) { + RTC_DCHECK_GE(seconds, 0); + RTC_DCHECK_LT(seconds, timestamp_impl::kPlusInfinityVal / 1000000); + return Timestamp(rtc::dchecked_cast(seconds) * 1000000); + } + + template < + typename T, + typename std::enable_if::value>::type* = nullptr> + static Timestamp ms(T milliseconds) { + RTC_DCHECK_GE(milliseconds, 0); + RTC_DCHECK_LT(milliseconds, timestamp_impl::kPlusInfinityVal / 1000); + return Timestamp(rtc::dchecked_cast(milliseconds) * 1000); + } + + template < + typename T, + typename std::enable_if::value>::type* = nullptr> + static Timestamp us(T microseconds) { + RTC_DCHECK_GE(microseconds, 0); + RTC_DCHECK_LT(microseconds, timestamp_impl::kPlusInfinityVal); + return Timestamp(rtc::dchecked_cast(microseconds)); + } + + template ::value>::type* = + nullptr> + static Timestamp seconds(T seconds) { + return Timestamp::us(seconds * 1e6); + } + + template ::value>::type* = + nullptr> + static Timestamp ms(T milliseconds) { + return Timestamp::us(milliseconds * 1e3); + } + template ::value>::type* = + nullptr> + static Timestamp us(T microseconds) { + if (microseconds == std::numeric_limits::infinity()) { + return Infinity(); + } else { + RTC_DCHECK(!std::isnan(microseconds)); + RTC_DCHECK_GE(microseconds, 0); + RTC_DCHECK_LT(microseconds, timestamp_impl::kPlusInfinityVal); + return Timestamp(rtc::dchecked_cast(microseconds)); + } + } + + template + typename std::enable_if::value, T>::type seconds() const { + return rtc::dchecked_cast((us() + 500000) / 1000000); + } + template + typename std::enable_if::value, T>::type ms() const { + return rtc::dchecked_cast((us() + 500) / 1000); + } + template + typename std::enable_if::value, T>::type us() const { + RTC_DCHECK(IsFinite()); + return rtc::dchecked_cast(microseconds_); + } + + template + typename std::enable_if::value, T>::type seconds() + const { + return us() * 1e-6; + } + template + typename std::enable_if::value, T>::type ms() + const { + return us() * 1e-3; + } + template + typename std::enable_if::value, T>::type us() + const { + if (IsInfinite()) { + return std::numeric_limits::infinity(); + } else { + return microseconds_; + } + } + + bool IsInfinite() const { + return microseconds_ == timestamp_impl::kPlusInfinityVal; + } + bool IsFinite() const { return !IsInfinite(); } + TimeDelta operator-(const Timestamp& other) const { + return TimeDelta::us(us() - other.us()); + } + Timestamp operator-(const TimeDelta& delta) const { + return Timestamp::us(us() - delta.us()); + } + Timestamp operator+(const TimeDelta& delta) const { + return Timestamp::us(us() + delta.us()); + } + Timestamp& operator-=(const TimeDelta& other) { + microseconds_ -= other.us(); + return *this; + } + Timestamp& operator+=(const TimeDelta& other) { + microseconds_ += other.us(); + return *this; + } + bool operator==(const Timestamp& other) const { + return microseconds_ == other.microseconds_; + } + bool operator!=(const Timestamp& other) const { + return microseconds_ != other.microseconds_; + } + bool operator<=(const Timestamp& other) const { + return microseconds_ <= other.microseconds_; + } + bool operator>=(const Timestamp& other) const { + return microseconds_ >= other.microseconds_; + } + bool operator>(const Timestamp& other) const { + return microseconds_ > other.microseconds_; + } + bool operator<(const Timestamp& other) const { + return microseconds_ < other.microseconds_; + } + + private: + explicit Timestamp(int64_t us) : microseconds_(us) {} + int64_t microseconds_; +}; + +std::string ToString(const Timestamp& value); + +} // namespace webrtc + +#endif // API_UNITS_TIMESTAMP_H_ diff --git a/WebRtcNative/include/webrtc/api/video/color_space.h b/WebRtcNative/include/webrtc/api/video/color_space.h new file mode 100644 index 00000000..8102647b --- /dev/null +++ b/WebRtcNative/include/webrtc/api/video/color_space.h @@ -0,0 +1,107 @@ +/* + * Copyright (c) 2018 The WebRTC project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + +#ifndef API_VIDEO_COLOR_SPACE_H_ +#define API_VIDEO_COLOR_SPACE_H_ + +namespace webrtc { + +// Used to represent a color space for the purpose of color conversion. This +// class only represents color information that can be transferred through the +// bitstream of WebRTC's internal supported codecs: +// - VP9 supports color profiles, see VP9 Bitstream & Decoding Process +// Specification Version 0.6 Section 7.2.2 "Color config semantics" available +// from https://www.webmproject.org. +// TODO(emircan): Extract these values from decode and add to the existing ones. +// - VP8 only supports BT.601, see +// https://tools.ietf.org/html/rfc6386#section-9.2 +// - H264 supports different color primaries, transfer characteristics, matrix +// coefficients and range. See T-REC-H.264 E.2.1, "VUI parameters semantics", +// available from https://www.itu.int/rec/T-REC-H.264. +class ColorSpace { + public: + enum class PrimaryID { + kInvalid, + kBT709, + kBT470M, + kBT470BG, + kSMPTE170M, // Identical to BT601 + kSMPTE240M, + kFILM, + kBT2020, + kSMPTEST428, + kSMPTEST431, + kSMPTEST432, + kJEDECP22, + }; + + enum class TransferID { + kInvalid, + kBT709, + kGAMMA22, + kGAMMA28, + kSMPTE170M, + kSMPTE240M, + kLINEAR, + kLOG, + kLOG_SQRT, + kIEC61966_2_4, + kBT1361_ECG, + kIEC61966_2_1, + kBT2020_10, + kBT2020_12, + kSMPTEST2084, + kSMPTEST428, + kARIB_STD_B67, + }; + + enum class MatrixID { + kInvalid, + kRGB, + kBT709, + kFCC, + kBT470BG, + kSMPTE170M, + kSMPTE240M, + kYCOCG, + kBT2020_NCL, + kBT2020_CL, + kSMPTE2085, + }; + + enum class RangeID { + kInvalid, + // Limited Rec. 709 color range with RGB values ranging from 16 to 235. + kLimited, + // Full RGB color range with RGB valees from 0 to 255. + kFull, + }; + + ColorSpace(); + ColorSpace(PrimaryID primaries, + TransferID transfer, + MatrixID matrix, + RangeID full_range); + + PrimaryID primaries() const; + TransferID transfer() const; + MatrixID matrix() const; + RangeID range() const; + + private: + PrimaryID primaries_ = PrimaryID::kInvalid; + TransferID transfer_ = TransferID::kInvalid; + MatrixID matrix_ = MatrixID::kInvalid; + RangeID range_ = RangeID::kInvalid; +}; + +} // namespace webrtc + +#endif // API_VIDEO_COLOR_SPACE_H_ diff --git a/WebRtcNative/include/webrtc/api/video/encoded_frame.h b/WebRtcNative/include/webrtc/api/video/encoded_frame.h new file mode 100644 index 00000000..1b0a26a5 --- /dev/null +++ b/WebRtcNative/include/webrtc/api/video/encoded_frame.h @@ -0,0 +1,93 @@ +/* + * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + +#ifndef API_VIDEO_ENCODED_FRAME_H_ +#define API_VIDEO_ENCODED_FRAME_H_ + +#include "modules/video_coding/encoded_frame.h" + +namespace webrtc { +namespace video_coding { + +// NOTE: This class is still under development and may change without notice. +struct VideoLayerFrameId { + // TODO(philipel): The default ctor is currently used internaly, but have a + // look if we can remove it. + VideoLayerFrameId() : picture_id(-1), spatial_layer(0) {} + VideoLayerFrameId(int64_t picture_id, uint8_t spatial_layer) + : picture_id(picture_id), spatial_layer(spatial_layer) {} + + bool operator==(const VideoLayerFrameId& rhs) const { + return picture_id == rhs.picture_id && spatial_layer == rhs.spatial_layer; + } + + bool operator!=(const VideoLayerFrameId& rhs) const { + return !(*this == rhs); + } + + bool operator<(const VideoLayerFrameId& rhs) const { + if (picture_id == rhs.picture_id) + return spatial_layer < rhs.spatial_layer; + return picture_id < rhs.picture_id; + } + + bool operator<=(const VideoLayerFrameId& rhs) const { return !(rhs < *this); } + bool operator>(const VideoLayerFrameId& rhs) const { return rhs < *this; } + bool operator>=(const VideoLayerFrameId& rhs) const { return rhs <= *this; } + + int64_t picture_id; + uint8_t spatial_layer; +}; + +// TODO(philipel): Remove webrtc::VCMEncodedFrame inheritance. +// TODO(philipel): Move transport specific info out of EncodedFrame. +// NOTE: This class is still under development and may change without notice. +class EncodedFrame : public webrtc::VCMEncodedFrame { + public: + static const uint8_t kMaxFrameReferences = 5; + + EncodedFrame() = default; + virtual ~EncodedFrame() {} + + virtual bool GetBitstream(uint8_t* destination) const = 0; + + // The capture timestamp of this frame, using the 90 kHz RTP clock. + virtual uint32_t Timestamp() const; + virtual void SetTimestamp(uint32_t rtp_timestamp); + + // When this frame was received. + virtual int64_t ReceivedTime() const = 0; + + // When this frame should be rendered. + virtual int64_t RenderTime() const = 0; + + // This information is currently needed by the timing calculation class. + // TODO(philipel): Remove this function when a new timing class has + // been implemented. + virtual bool delayed_by_retransmission() const; + + size_t size() const { return _length; } + + bool is_keyframe() const { return num_references == 0; } + + VideoLayerFrameId id; + uint32_t timestamp = 0; + + // TODO(philipel): Add simple modify/access functions to prevent adding too + // many |references|. + size_t num_references = 0; + int64_t references[kMaxFrameReferences]; + bool inter_layer_predicted = false; +}; + +} // namespace video_coding +} // namespace webrtc + +#endif // API_VIDEO_ENCODED_FRAME_H_ diff --git a/WebRtcNative/include/webrtc/api/video/i010_buffer.h b/WebRtcNative/include/webrtc/api/video/i010_buffer.h new file mode 100644 index 00000000..1208b318 --- /dev/null +++ b/WebRtcNative/include/webrtc/api/video/i010_buffer.h @@ -0,0 +1,81 @@ +/* + * Copyright (c) 2015 The WebRTC project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + +#ifndef API_VIDEO_I010_BUFFER_H_ +#define API_VIDEO_I010_BUFFER_H_ + +#include + +#include "api/video/video_frame_buffer.h" +#include "api/video/video_rotation.h" +#include "rtc_base/memory/aligned_malloc.h" + +namespace webrtc { + +// Plain I010 buffer in standard memory. +class I010Buffer : public I010BufferInterface { + public: + // Create a new buffer. + static rtc::scoped_refptr Create(int width, int height); + + // Create a new buffer and copy the pixel data. + static rtc::scoped_refptr Copy(const I010BufferInterface& buffer); + + // Convert and put I420 buffer into a new buffer. + static rtc::scoped_refptr Copy(const I420BufferInterface& buffer); + + // Return a rotated copy of |src|. + static rtc::scoped_refptr Rotate(const I010BufferInterface& src, + VideoRotation rotation); + + // VideoFrameBuffer implementation. + rtc::scoped_refptr ToI420() override; + + // PlanarYuv16BBuffer implementation. + int width() const override; + int height() const override; + const uint16_t* DataY() const override; + const uint16_t* DataU() const override; + const uint16_t* DataV() const override; + int StrideY() const override; + int StrideU() const override; + int StrideV() const override; + + uint16_t* MutableDataY(); + uint16_t* MutableDataU(); + uint16_t* MutableDataV(); + + // Scale the cropped area of |src| to the size of |this| buffer, and + // write the result into |this|. + void CropAndScaleFrom(const I010BufferInterface& src, + int offset_x, + int offset_y, + int crop_width, + int crop_height); + + // Scale all of |src| to the size of |this| buffer, with no cropping. + void ScaleFrom(const I010BufferInterface& src); + + protected: + I010Buffer(int width, int height, int stride_y, int stride_u, int stride_v); + ~I010Buffer() override; + + private: + const int width_; + const int height_; + const int stride_y_; + const int stride_u_; + const int stride_v_; + const std::unique_ptr data_; +}; + +} // namespace webrtc + +#endif // API_VIDEO_I010_BUFFER_H_ diff --git a/WebRtcNative/include/webrtc/api/video/i420_buffer.h b/WebRtcNative/include/webrtc/api/video/i420_buffer.h new file mode 100644 index 00000000..282b2426 --- /dev/null +++ b/WebRtcNative/include/webrtc/api/video/i420_buffer.h @@ -0,0 +1,114 @@ +/* + * Copyright (c) 2015 The WebRTC project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + +#ifndef API_VIDEO_I420_BUFFER_H_ +#define API_VIDEO_I420_BUFFER_H_ + +#include + +#include "api/video/video_frame_buffer.h" +#include "api/video/video_rotation.h" +#include "rtc_base/memory/aligned_malloc.h" + +namespace webrtc { + +// Plain I420 buffer in standard memory. +class I420Buffer : public I420BufferInterface { + public: + static rtc::scoped_refptr Create(int width, int height); + static rtc::scoped_refptr Create(int width, + int height, + int stride_y, + int stride_u, + int stride_v); + + // Create a new buffer and copy the pixel data. + static rtc::scoped_refptr Copy(const I420BufferInterface& buffer); + // Deprecated. + static rtc::scoped_refptr Copy(const VideoFrameBuffer& buffer) { + return Copy(*buffer.GetI420()); + } + + static rtc::scoped_refptr Copy(int width, + int height, + const uint8_t* data_y, + int stride_y, + const uint8_t* data_u, + int stride_u, + const uint8_t* data_v, + int stride_v); + + // Returns a rotated copy of |src|. + static rtc::scoped_refptr Rotate(const I420BufferInterface& src, + VideoRotation rotation); + // Deprecated. + static rtc::scoped_refptr Rotate(const VideoFrameBuffer& src, + VideoRotation rotation) { + return Rotate(*src.GetI420(), rotation); + } + + // Sets the buffer to all black. + static void SetBlack(I420Buffer* buffer); + + // Sets all three planes to all zeros. Used to work around for + // quirks in memory checkers + // (https://bugs.chromium.org/p/libyuv/issues/detail?id=377) and + // ffmpeg (http://crbug.com/390941). + // TODO(nisse): Deprecated. Should be deleted if/when those issues + // are resolved in a better way. Or in the mean time, use SetBlack. + void InitializeData(); + + int width() const override; + int height() const override; + const uint8_t* DataY() const override; + const uint8_t* DataU() const override; + const uint8_t* DataV() const override; + + int StrideY() const override; + int StrideU() const override; + int StrideV() const override; + + uint8_t* MutableDataY(); + uint8_t* MutableDataU(); + uint8_t* MutableDataV(); + + // Scale the cropped area of |src| to the size of |this| buffer, and + // write the result into |this|. + void CropAndScaleFrom(const I420BufferInterface& src, + int offset_x, + int offset_y, + int crop_width, + int crop_height); + + // The common case of a center crop, when needed to adjust the + // aspect ratio without distorting the image. + void CropAndScaleFrom(const I420BufferInterface& src); + + // Scale all of |src| to the size of |this| buffer, with no cropping. + void ScaleFrom(const I420BufferInterface& src); + + protected: + I420Buffer(int width, int height); + I420Buffer(int width, int height, int stride_y, int stride_u, int stride_v); + + ~I420Buffer() override; + + private: + const int width_; + const int height_; + const int stride_y_; + const int stride_u_; + const int stride_v_; + const std::unique_ptr data_; +}; + +} // namespace webrtc + +#endif // API_VIDEO_I420_BUFFER_H_ diff --git a/WebRtcNative/include/webrtc/api/video/video_bitrate_allocation.h b/WebRtcNative/include/webrtc/api/video/video_bitrate_allocation.h new file mode 100644 index 00000000..9e2501d8 --- /dev/null +++ b/WebRtcNative/include/webrtc/api/video/video_bitrate_allocation.h @@ -0,0 +1,90 @@ +/* + * Copyright (c) 2018 The WebRTC project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + +#ifndef API_VIDEO_VIDEO_BITRATE_ALLOCATION_H_ +#define API_VIDEO_VIDEO_BITRATE_ALLOCATION_H_ + +#include +#include +#include + +#include "absl/types/optional.h" + +namespace webrtc { + +// TODO(sprang): Move back to common_types when include of this is removed. +enum : int { kMaxSimulcastStreams = 4 }; +enum : int { kMaxSpatialLayers = 5 }; +enum : int { kMaxTemporalStreams = 4 }; + +// Class that describes how video bitrate, in bps, is allocated across temporal +// and spatial layers. Not that bitrates are NOT cumulative. Depending on if +// layers are dependent or not, it is up to the user to aggregate. +// For each index, the bitrate can also both set and unset. This is used with a +// set bps = 0 to signal an explicit "turn off" signal. +class VideoBitrateAllocation { + public: + static constexpr uint32_t kMaxBitrateBps = + std::numeric_limits::max(); + VideoBitrateAllocation(); + + bool SetBitrate(size_t spatial_index, + size_t temporal_index, + uint32_t bitrate_bps); + + bool HasBitrate(size_t spatial_index, size_t temporal_index) const; + + uint32_t GetBitrate(size_t spatial_index, size_t temporal_index) const; + + // Whether the specific spatial layers has the bitrate set in any of its + // temporal layers. + bool IsSpatialLayerUsed(size_t spatial_index) const; + + // Get the sum of all the temporal layer for a specific spatial layer. + uint32_t GetSpatialLayerSum(size_t spatial_index) const; + + // Sum of bitrates of temporal layers, from layer 0 to |temporal_index| + // inclusive, of specified spatial layer |spatial_index|. Bitrates of lower + // spatial layers are not included. + uint32_t GetTemporalLayerSum(size_t spatial_index, + size_t temporal_index) const; + + // Returns a vector of the temporal layer bitrates for the specific spatial + // layer. Length of the returned vector is cropped to the highest temporal + // layer with a defined bitrate. + std::vector GetTemporalLayerAllocation(size_t spatial_index) const; + + // Returns one VideoBitrateAllocation for each spatial layer. This is used to + // configure simulcast streams. Note that the length of the returned vector is + // always kMaxSpatialLayers, the optional is unset for unused layers. + std::vector> GetSimulcastAllocations() + const; + + uint32_t get_sum_bps() const { return sum_; } // Sum of all bitrates. + uint32_t get_sum_kbps() const { + // Round down to not exceed the allocated bitrate. + return sum_ / 1000; + } + + bool operator==(const VideoBitrateAllocation& other) const; + inline bool operator!=(const VideoBitrateAllocation& other) const { + return !(*this == other); + } + + std::string ToString() const; + + private: + uint32_t sum_; + absl::optional bitrates_[kMaxSpatialLayers][kMaxTemporalStreams]; +}; + +} // namespace webrtc + +#endif // API_VIDEO_VIDEO_BITRATE_ALLOCATION_H_ diff --git a/WebRtcNative/include/webrtc/api/video/video_bitrate_allocator.h b/WebRtcNative/include/webrtc/api/video/video_bitrate_allocator.h new file mode 100644 index 00000000..f85c633d --- /dev/null +++ b/WebRtcNative/include/webrtc/api/video/video_bitrate_allocator.h @@ -0,0 +1,38 @@ +/* + * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + +#ifndef API_VIDEO_VIDEO_BITRATE_ALLOCATOR_H_ +#define API_VIDEO_VIDEO_BITRATE_ALLOCATOR_H_ + +#include "api/video/video_bitrate_allocation.h" + +namespace webrtc { + +class VideoBitrateAllocator { + public: + VideoBitrateAllocator() {} + virtual ~VideoBitrateAllocator() {} + + virtual VideoBitrateAllocation GetAllocation(uint32_t total_bitrate_bps, + uint32_t framerate) = 0; +}; + +class VideoBitrateAllocationObserver { + public: + VideoBitrateAllocationObserver() {} + virtual ~VideoBitrateAllocationObserver() {} + + virtual void OnBitrateAllocationUpdated( + const VideoBitrateAllocation& allocation) = 0; +}; + +} // namespace webrtc + +#endif // API_VIDEO_VIDEO_BITRATE_ALLOCATOR_H_ diff --git a/WebRtcNative/include/webrtc/api/video/video_content_type.h b/WebRtcNative/include/webrtc/api/video/video_content_type.h new file mode 100644 index 00000000..8c646028 --- /dev/null +++ b/WebRtcNative/include/webrtc/api/video/video_content_type.h @@ -0,0 +1,41 @@ +/* + * Copyright (c) 2017 The WebRTC project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + +#ifndef API_VIDEO_VIDEO_CONTENT_TYPE_H_ +#define API_VIDEO_VIDEO_CONTENT_TYPE_H_ + +#include + +#include + +namespace webrtc { + +enum class VideoContentType : uint8_t { + UNSPECIFIED = 0, + SCREENSHARE = 1, +}; + +namespace videocontenttypehelpers { +bool SetExperimentId(VideoContentType* content_type, uint8_t experiment_id); +bool SetSimulcastId(VideoContentType* content_type, uint8_t simulcast_id); + +uint8_t GetExperimentId(const VideoContentType& content_type); +uint8_t GetSimulcastId(const VideoContentType& content_type); + +bool IsScreenshare(const VideoContentType& content_type); + +bool IsValidContentType(uint8_t value); + +const char* ToString(const VideoContentType& content_type); +} // namespace videocontenttypehelpers + +} // namespace webrtc + +#endif // API_VIDEO_VIDEO_CONTENT_TYPE_H_ diff --git a/WebRtcNative/include/webrtc/api/video/video_frame.h b/WebRtcNative/include/webrtc/api/video/video_frame.h new file mode 100644 index 00000000..dcb533e2 --- /dev/null +++ b/WebRtcNative/include/webrtc/api/video/video_frame.h @@ -0,0 +1,149 @@ +/* + * Copyright (c) 2014 The WebRTC project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + +#ifndef API_VIDEO_VIDEO_FRAME_H_ +#define API_VIDEO_VIDEO_FRAME_H_ + +#include + +#include "absl/types/optional.h" +#include "api/video/color_space.h" +#include "api/video/video_frame_buffer.h" +#include "api/video/video_rotation.h" + +namespace webrtc { + +class VideoFrame { + public: + // Preferred way of building VideoFrame objects. + class Builder { + public: + Builder(); + ~Builder(); + + VideoFrame build(); + Builder& set_video_frame_buffer( + const rtc::scoped_refptr& buffer); + Builder& set_timestamp_ms(int64_t timestamp_ms); + Builder& set_timestamp_us(int64_t timestamp_us); + Builder& set_timestamp_rtp(uint32_t timestamp_rtp); + Builder& set_ntp_time_ms(int64_t ntp_time_ms); + Builder& set_rotation(VideoRotation rotation); + Builder& set_color_space(const ColorSpace& color_space); + + private: + rtc::scoped_refptr video_frame_buffer_; + int64_t timestamp_us_ = 0; + uint32_t timestamp_rtp_ = 0; + int64_t ntp_time_ms_ = 0; + VideoRotation rotation_ = kVideoRotation_0; + absl::optional color_space_; + }; + + // To be deprecated. Migrate all use to Builder. + VideoFrame(const rtc::scoped_refptr& buffer, + webrtc::VideoRotation rotation, + int64_t timestamp_us); + VideoFrame(const rtc::scoped_refptr& buffer, + uint32_t timestamp_rtp, + int64_t render_time_ms, + VideoRotation rotation); + + ~VideoFrame(); + + // Support move and copy. + VideoFrame(const VideoFrame&); + VideoFrame(VideoFrame&&); + VideoFrame& operator=(const VideoFrame&); + VideoFrame& operator=(VideoFrame&&); + + // Get frame width. + int width() const; + // Get frame height. + int height() const; + // Get frame size in pixels. + uint32_t size() const; + + // System monotonic clock, same timebase as rtc::TimeMicros(). + int64_t timestamp_us() const { return timestamp_us_; } + void set_timestamp_us(int64_t timestamp_us) { timestamp_us_ = timestamp_us; } + + // TODO(nisse): After the cricket::VideoFrame and webrtc::VideoFrame + // merge, timestamps other than timestamp_us will likely be + // deprecated. + + // Set frame timestamp (90kHz). + void set_timestamp(uint32_t timestamp) { timestamp_rtp_ = timestamp; } + + // Get frame timestamp (90kHz). + uint32_t timestamp() const { return timestamp_rtp_; } + + // For now, transport_frame_id and rtp timestamp are the same. + // TODO(nisse): Must be handled differently for QUIC. + uint32_t transport_frame_id() const { return timestamp(); } + + // Set capture ntp time in milliseconds. + // TODO(nisse): Deprecated. Migrate all users to timestamp_us(). + void set_ntp_time_ms(int64_t ntp_time_ms) { ntp_time_ms_ = ntp_time_ms; } + + // Get capture ntp time in milliseconds. + // TODO(nisse): Deprecated. Migrate all users to timestamp_us(). + int64_t ntp_time_ms() const { return ntp_time_ms_; } + + // Naming convention for Coordination of Video Orientation. Please see + // http://www.etsi.org/deliver/etsi_ts/126100_126199/126114/12.07.00_60/ts_126114v120700p.pdf + // + // "pending rotation" or "pending" = a frame that has a VideoRotation > 0. + // + // "not pending" = a frame that has a VideoRotation == 0. + // + // "apply rotation" = modify a frame from being "pending" to being "not + // pending" rotation (a no-op for "unrotated"). + // + VideoRotation rotation() const { return rotation_; } + void set_rotation(VideoRotation rotation) { rotation_ = rotation; } + + // Set Color space when available. + absl::optional color_space() const { return color_space_; } + + // Get render time in milliseconds. + // TODO(nisse): Deprecated. Migrate all users to timestamp_us(). + int64_t render_time_ms() const; + + // Return the underlying buffer. Never nullptr for a properly + // initialized VideoFrame. + rtc::scoped_refptr video_frame_buffer() const; + + // TODO(nisse): Deprecated. + // Return true if the frame is stored in a texture. + bool is_texture() const { + return video_frame_buffer()->type() == VideoFrameBuffer::Type::kNative; + } + + private: + VideoFrame(const rtc::scoped_refptr& buffer, + int64_t timestamp_us, + uint32_t timestamp_rtp, + int64_t ntp_time_ms, + VideoRotation rotation, + const absl::optional& color_space); + + // An opaque reference counted handle that stores the pixel data. + rtc::scoped_refptr video_frame_buffer_; + uint32_t timestamp_rtp_; + int64_t ntp_time_ms_; + int64_t timestamp_us_; + VideoRotation rotation_; + absl::optional color_space_; +}; + +} // namespace webrtc + +#endif // API_VIDEO_VIDEO_FRAME_H_ diff --git a/WebRtcNative/include/webrtc/api/video/video_frame_buffer.h b/WebRtcNative/include/webrtc/api/video/video_frame_buffer.h new file mode 100644 index 00000000..1e8169ac --- /dev/null +++ b/WebRtcNative/include/webrtc/api/video/video_frame_buffer.h @@ -0,0 +1,177 @@ +/* + * Copyright (c) 2015 The WebRTC project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + +#ifndef API_VIDEO_VIDEO_FRAME_BUFFER_H_ +#define API_VIDEO_VIDEO_FRAME_BUFFER_H_ + +#include + +#include "rtc_base/refcount.h" +#include "rtc_base/scoped_ref_ptr.h" + +namespace webrtc { + +class I420BufferInterface; +class I420ABufferInterface; +class I444BufferInterface; +class I010BufferInterface; + +// Base class for frame buffers of different types of pixel format and storage. +// The tag in type() indicates how the data is represented, and each type is +// implemented as a subclass. To access the pixel data, call the appropriate +// GetXXX() function, where XXX represents the type. There is also a function +// ToI420() that returns a frame buffer in I420 format, converting from the +// underlying representation if necessary. I420 is the most widely accepted +// format and serves as a fallback for video sinks that can only handle I420, +// e.g. the internal WebRTC software encoders. A special enum value 'kNative' is +// provided for external clients to implement their own frame buffer +// representations, e.g. as textures. The external client can produce such +// native frame buffers from custom video sources, and then cast it back to the +// correct subclass in custom video sinks. The purpose of this is to improve +// performance by providing an optimized path without intermediate conversions. +// Frame metadata such as rotation and timestamp are stored in +// webrtc::VideoFrame, and not here. +class VideoFrameBuffer : public rtc::RefCountInterface { + public: + // New frame buffer types will be added conservatively when there is an + // opportunity to optimize the path between some pair of video source and + // video sink. + enum class Type { + kNative, + kI420, + kI420A, + kI444, + kI010, + }; + + // This function specifies in what pixel format the data is stored in. + virtual Type type() const = 0; + + // The resolution of the frame in pixels. For formats where some planes are + // subsampled, this is the highest-resolution plane. + virtual int width() const = 0; + virtual int height() const = 0; + + // Returns a memory-backed frame buffer in I420 format. If the pixel data is + // in another format, a conversion will take place. All implementations must + // provide a fallback to I420 for compatibility with e.g. the internal WebRTC + // software encoders. + virtual rtc::scoped_refptr ToI420() = 0; + + // These functions should only be called if type() is of the correct type. + // Calling with a different type will result in a crash. + // TODO(magjed): Return raw pointers for GetI420 once deprecated interface is + // removed. + rtc::scoped_refptr GetI420(); + rtc::scoped_refptr GetI420() const; + I420ABufferInterface* GetI420A(); + const I420ABufferInterface* GetI420A() const; + I444BufferInterface* GetI444(); + const I444BufferInterface* GetI444() const; + I010BufferInterface* GetI010(); + const I010BufferInterface* GetI010() const; + + protected: + ~VideoFrameBuffer() override {} +}; + +// This interface represents planar formats. +class PlanarYuvBuffer : public VideoFrameBuffer { + public: + virtual int ChromaWidth() const = 0; + virtual int ChromaHeight() const = 0; + + // Returns the number of steps(in terms of Data*() return type) between + // successive rows for a given plane. + virtual int StrideY() const = 0; + virtual int StrideU() const = 0; + virtual int StrideV() const = 0; + + protected: + ~PlanarYuvBuffer() override {} +}; + +// This interface represents 8-bit color depth formats: Type::kI420, +// Type::kI420A and Type::kI444. +class PlanarYuv8Buffer : public PlanarYuvBuffer { + public: + // Returns pointer to the pixel data for a given plane. The memory is owned by + // the VideoFrameBuffer object and must not be freed by the caller. + virtual const uint8_t* DataY() const = 0; + virtual const uint8_t* DataU() const = 0; + virtual const uint8_t* DataV() const = 0; + + protected: + ~PlanarYuv8Buffer() override {} +}; + +class I420BufferInterface : public PlanarYuv8Buffer { + public: + Type type() const override; + + int ChromaWidth() const final; + int ChromaHeight() const final; + + rtc::scoped_refptr ToI420() final; + + protected: + ~I420BufferInterface() override {} +}; + +class I420ABufferInterface : public I420BufferInterface { + public: + Type type() const final; + virtual const uint8_t* DataA() const = 0; + virtual int StrideA() const = 0; + + protected: + ~I420ABufferInterface() override {} +}; + +class I444BufferInterface : public PlanarYuv8Buffer { + public: + Type type() const final; + + int ChromaWidth() const final; + int ChromaHeight() const final; + + protected: + ~I444BufferInterface() override {} +}; + +// This interface represents 8-bit to 16-bit color depth formats: Type::kI010. +class PlanarYuv16BBuffer : public PlanarYuvBuffer { + public: + // Returns pointer to the pixel data for a given plane. The memory is owned by + // the VideoFrameBuffer object and must not be freed by the caller. + virtual const uint16_t* DataY() const = 0; + virtual const uint16_t* DataU() const = 0; + virtual const uint16_t* DataV() const = 0; + + protected: + ~PlanarYuv16BBuffer() override {} +}; + +// Represents Type::kI010, allocates 16 bits per pixel and fills 10 least +// significant bits with color information. +class I010BufferInterface : public PlanarYuv16BBuffer { + public: + Type type() const override; + + int ChromaWidth() const final; + int ChromaHeight() const final; + + protected: + ~I010BufferInterface() override {} +}; + +} // namespace webrtc + +#endif // API_VIDEO_VIDEO_FRAME_BUFFER_H_ diff --git a/WebRtc.NET/include/webrtc/api/video/video_rotation.h b/WebRtcNative/include/webrtc/api/video/video_rotation.h similarity index 82% rename from WebRtc.NET/include/webrtc/api/video/video_rotation.h rename to WebRtcNative/include/webrtc/api/video/video_rotation.h index b8b27674..6a29588e 100644 --- a/WebRtc.NET/include/webrtc/api/video/video_rotation.h +++ b/WebRtcNative/include/webrtc/api/video/video_rotation.h @@ -8,8 +8,8 @@ * be found in the AUTHORS file in the root of the source tree. */ -#ifndef WEBRTC_API_VIDEO_VIDEO_ROTATION_H_ -#define WEBRTC_API_VIDEO_VIDEO_ROTATION_H_ +#ifndef API_VIDEO_VIDEO_ROTATION_H_ +#define API_VIDEO_VIDEO_ROTATION_H_ namespace webrtc { @@ -23,4 +23,4 @@ enum VideoRotation { } // namespace webrtc -#endif // WEBRTC_API_VIDEO_VIDEO_ROTATION_H_ +#endif // API_VIDEO_VIDEO_ROTATION_H_ diff --git a/WebRtcNative/include/webrtc/api/video/video_sink_interface.h b/WebRtcNative/include/webrtc/api/video/video_sink_interface.h new file mode 100644 index 00000000..aac8b4ac --- /dev/null +++ b/WebRtcNative/include/webrtc/api/video/video_sink_interface.h @@ -0,0 +1,32 @@ +/* + * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + +#ifndef API_VIDEO_VIDEO_SINK_INTERFACE_H_ +#define API_VIDEO_VIDEO_SINK_INTERFACE_H_ + +#include + +namespace rtc { + +template +class VideoSinkInterface { + public: + virtual ~VideoSinkInterface() = default; + + virtual void OnFrame(const VideoFrameT& frame) = 0; + + // Should be called by the source when it discards the frame due to rate + // limiting. + virtual void OnDiscardedFrame() {} +}; + +} // namespace rtc + +#endif // API_VIDEO_VIDEO_SINK_INTERFACE_H_ diff --git a/WebRtcNative/include/webrtc/api/video/video_source_interface.h b/WebRtcNative/include/webrtc/api/video/video_source_interface.h new file mode 100644 index 00000000..4ee47194 --- /dev/null +++ b/WebRtcNative/include/webrtc/api/video/video_source_interface.h @@ -0,0 +1,61 @@ +/* + * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + +#ifndef API_VIDEO_VIDEO_SOURCE_INTERFACE_H_ +#define API_VIDEO_VIDEO_SOURCE_INTERFACE_H_ + +#include + +#include "absl/types/optional.h" +#include "api/video/video_sink_interface.h" + +namespace rtc { + +// VideoSinkWants is used for notifying the source of properties a video frame +// should have when it is delivered to a certain sink. +struct VideoSinkWants { + VideoSinkWants(); + VideoSinkWants(const VideoSinkWants&); + ~VideoSinkWants(); + // Tells the source whether the sink wants frames with rotation applied. + // By default, any rotation must be applied by the sink. + bool rotation_applied = false; + + // Tells the source that the sink only wants black frames. + bool black_frames = false; + + // Tells the source the maximum number of pixels the sink wants. + int max_pixel_count = std::numeric_limits::max(); + // Tells the source the desired number of pixels the sinks wants. This will + // typically be used when stepping the resolution up again when conditions + // have improved after an earlier downgrade. The source should select the + // closest resolution to this pixel count, but if max_pixel_count is set, it + // still sets the absolute upper bound. + absl::optional target_pixel_count; + // Tells the source the maximum framerate the sink wants. + int max_framerate_fps = std::numeric_limits::max(); +}; + +template +class VideoSourceInterface { + public: + virtual void AddOrUpdateSink(VideoSinkInterface* sink, + const VideoSinkWants& wants) = 0; + // RemoveSink must guarantee that at the time the method returns, + // there is no current and no future calls to VideoSinkInterface::OnFrame. + virtual void RemoveSink(VideoSinkInterface* sink) = 0; + + protected: + // Non-public, since one shouldn't own sources via this interface. + virtual ~VideoSourceInterface() {} +}; + +} // namespace rtc +#endif // API_VIDEO_VIDEO_SOURCE_INTERFACE_H_ diff --git a/WebRtcNative/include/webrtc/api/video/video_stream_decoder.h b/WebRtcNative/include/webrtc/api/video/video_stream_decoder.h new file mode 100644 index 00000000..dff60d87 --- /dev/null +++ b/WebRtcNative/include/webrtc/api/video/video_stream_decoder.h @@ -0,0 +1,51 @@ +/* + * Copyright (c) 2018 The WebRTC project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + +#ifndef API_VIDEO_VIDEO_STREAM_DECODER_H_ +#define API_VIDEO_VIDEO_STREAM_DECODER_H_ + +#include +#include +#include + +#include "api/video/encoded_frame.h" +#include "api/video/video_frame.h" +#include "api/video_codecs/sdp_video_format.h" +#include "api/video_codecs/video_decoder_factory.h" + +namespace webrtc { +// NOTE: This class is still under development and may change without notice. +class VideoStreamDecoder { + public: + class Callbacks { + public: + virtual ~Callbacks() = default; + + // Called when the VideoStreamDecoder enters a non-decodable state. + virtual void OnNonDecodableState() = 0; + + // Called with the last continuous frame. + virtual void OnContinuousUntil( + const video_coding::VideoLayerFrameId& key) = 0; + + // Called with the decoded frame. + virtual void OnDecodedFrame(VideoFrame decodedImage, + absl::optional decode_time_ms, + absl::optional qp) = 0; + }; + + virtual ~VideoStreamDecoder() = default; + + virtual void OnFrame(std::unique_ptr frame) = 0; +}; + +} // namespace webrtc + +#endif // API_VIDEO_VIDEO_STREAM_DECODER_H_ diff --git a/WebRtcNative/include/webrtc/api/video/video_stream_decoder_create.h b/WebRtcNative/include/webrtc/api/video/video_stream_decoder_create.h new file mode 100644 index 00000000..04682901 --- /dev/null +++ b/WebRtcNative/include/webrtc/api/video/video_stream_decoder_create.h @@ -0,0 +1,32 @@ +/* + * Copyright (c) 2018 The WebRTC project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + +#ifndef API_VIDEO_VIDEO_STREAM_DECODER_CREATE_H_ +#define API_VIDEO_VIDEO_STREAM_DECODER_CREATE_H_ + +#include +#include +#include + +#include "api/video/video_stream_decoder.h" + +namespace webrtc { +// The |decoder_settings| parameter is a map between: +// --> <